From f6ce25425a0bac51a703883bc0fe0b81ec0887eb Mon Sep 17 00:00:00 2001 From: Dan Schulte Date: Wed, 10 Jul 2019 16:34:51 -0700 Subject: [PATCH 001/244] Update schema in swagger_to_sdk_config.json --- swagger_to_sdk_config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swagger_to_sdk_config.json b/swagger_to_sdk_config.json index b993d3ff8785..27852c868bd0 100644 --- a/swagger_to_sdk_config.json +++ b/swagger_to_sdk_config.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/lmazuel/swagger-to-sdk/master/swagger_to_sdk_config.schema.json", + "$schema": "https://openapistoragetest.blob.core.windows.net/sdkautomation/test/schemas/swagger_to_sdk_config.schema.json", "meta": { "autorest_options": { "version": "preview", From 915ecd682f44f01d5b2cfc6af036685f4873a50c Mon Sep 17 00:00:00 2001 From: Dan Schulte Date: Thu, 11 Jul 2019 14:41:44 -0700 Subject: [PATCH 002/244] Enable generation pull requests --- swagger_to_sdk_config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swagger_to_sdk_config.json b/swagger_to_sdk_config.json index 27852c868bd0..4bad085c48f9 100644 --- a/swagger_to_sdk_config.json +++ b/swagger_to_sdk_config.json @@ -12,7 +12,7 @@ "no-async": "" }, "advanced_options": { - "create_sdk_pull_requests": false, + "create_sdk_pull_requests": true, "sdk_generation_pull_request_base": "integration_branch" }, "repotag": "azure-sdk-for-python", From 4eebd15ac418950b4fd1e344f84f5327d1044e3a Mon Sep 17 00:00:00 2001 From: "openapi-bot[bot]" <37845953+openapi-bot[bot]@users.noreply.github.com> Date: Thu, 1 Aug 2019 05:35:08 +0000 Subject: [PATCH 003/244] Generated from 368b5914a375e09ef413285c932b72038a8af7e4 (#48) fix: sql preview model validation errors - Remove empty "body" for RESPONSE_SCHEMA_NOT_IN_SPEC errors - IsAzureMonitorTargetEnabled -> isAzureMonitorTargetEnabled - "State" -> "state" - emailAccountAdmins "true" -> true - Add 202 response for RestorePoints_Create - password -> certPassword for ManagedInstanceTdeCertificates_Create and TdeCertificates_Create --- .../azure-mgmt-sql/azure/mgmt/sql/__init__.py | 7 +- .../azure/mgmt/sql/_configuration.py | 49 + ...nt_client.py => _sql_management_client.py} | 215 +- .../azure/mgmt/sql/models/__init__.py | 1004 +- .../azure/mgmt/sql/models/_models.py | 8891 +++++++++++++++++ .../azure/mgmt/sql/models/_models_py3.py | 8891 +++++++++++++++++ .../azure/mgmt/sql/models/_paged_models.py | 885 ++ ...ums.py => _sql_management_client_enums.py} | 49 +- .../sql/models/automatic_tuning_options.py | 57 - .../models/automatic_tuning_options_py3.py | 57 - .../models/automatic_tuning_server_options.py | 56 - .../automatic_tuning_server_options_py3.py | 56 - .../backup_long_term_retention_policy.py | 62 - .../backup_long_term_retention_policy_py3.py | 62 - .../backup_short_term_retention_policy.py | 47 - ...ackup_short_term_retention_policy_paged.py | 27 - .../backup_short_term_retention_policy_py3.py | 47 - .../models/check_name_availability_request.py | 44 - .../check_name_availability_request_py3.py | 44 - .../check_name_availability_response.py | 54 - .../check_name_availability_response_py3.py | 54 - .../complete_database_restore_definition.py | 35 - ...omplete_database_restore_definition_py3.py | 35 - ...reate_database_restore_point_definition.py | 35 - ...e_database_restore_point_definition_py3.py | 35 - .../mgmt/sql/models/data_masking_policy.py | 80 - .../sql/models/data_masking_policy_py3.py | 80 - .../mgmt/sql/models/data_masking_rule.py | 129 - .../sql/models/data_masking_rule_paged.py | 27 - .../mgmt/sql/models/data_masking_rule_py3.py | 129 - .../azure/mgmt/sql/models/database.py | 237 - .../sql/models/database_automatic_tuning.py | 57 - .../models/database_automatic_tuning_py3.py | 57 - .../models/database_blob_auditing_policy.py | 165 - .../database_blob_auditing_policy_py3.py | 165 - .../mgmt/sql/models/database_operation.py | 115 - .../sql/models/database_operation_paged.py | 27 - .../mgmt/sql/models/database_operation_py3.py | 115 - .../azure/mgmt/sql/models/database_paged.py | 27 - .../azure/mgmt/sql/models/database_py3.py | 237 - .../models/database_security_alert_policy.py | 102 - .../database_security_alert_policy_py3.py | 102 - .../azure/mgmt/sql/models/database_update.py | 209 - .../mgmt/sql/models/database_update_py3.py | 209 - .../azure/mgmt/sql/models/database_usage.py | 66 - .../mgmt/sql/models/database_usage_paged.py | 27 - .../mgmt/sql/models/database_usage_py3.py | 66 - .../database_vulnerability_assessment.py | 67 - ...database_vulnerability_assessment_paged.py | 27 - .../database_vulnerability_assessment_py3.py | 67 - ..._vulnerability_assessment_rule_baseline.py | 50 - ...erability_assessment_rule_baseline_item.py | 35 - ...ility_assessment_rule_baseline_item_py3.py | 35 - ...nerability_assessment_rule_baseline_py3.py | 50 - ...e_vulnerability_assessment_scans_export.py | 48 - ...lnerability_assessment_scans_export_py3.py | 48 - .../mgmt/sql/models/edition_capability.py | 58 - .../mgmt/sql/models/edition_capability_py3.py | 58 - .../azure/mgmt/sql/models/elastic_pool.py | 95 - .../mgmt/sql/models/elastic_pool_activity.py | 151 - .../sql/models/elastic_pool_activity_paged.py | 27 - .../sql/models/elastic_pool_activity_py3.py | 151 - .../models/elastic_pool_database_activity.py | 125 - .../elastic_pool_database_activity_paged.py | 27 - .../elastic_pool_database_activity_py3.py | 125 - .../models/elastic_pool_edition_capability.py | 58 - .../elastic_pool_edition_capability_py3.py | 58 - .../mgmt/sql/models/elastic_pool_operation.py | 114 - .../models/elastic_pool_operation_paged.py | 27 - .../sql/models/elastic_pool_operation_py3.py | 114 - .../mgmt/sql/models/elastic_pool_paged.py | 27 - ...tabase_max_performance_level_capability.py | 58 - ...se_max_performance_level_capability_py3.py | 58 - ...tabase_min_performance_level_capability.py | 51 - ...se_min_performance_level_capability_py3.py | 51 - .../elastic_pool_per_database_settings.py | 32 - .../elastic_pool_per_database_settings_py3.py | 32 - ...astic_pool_performance_level_capability.py | 88 - ...c_pool_performance_level_capability_py3.py | 88 - .../azure/mgmt/sql/models/elastic_pool_py3.py | 95 - .../mgmt/sql/models/elastic_pool_update.py | 54 - .../sql/models/elastic_pool_update_py3.py | 54 - .../mgmt/sql/models/encryption_protector.py | 80 - .../sql/models/encryption_protector_paged.py | 27 - .../sql/models/encryption_protector_py3.py | 80 - .../azure/mgmt/sql/models/export_request.py | 63 - .../mgmt/sql/models/export_request_py3.py | 63 - .../extended_database_blob_auditing_policy.py | 165 - ...ended_database_blob_auditing_policy_py3.py | 165 - .../extended_server_blob_auditing_policy.py | 165 - ...xtended_server_blob_auditing_policy_py3.py | 165 - .../azure/mgmt/sql/models/failover_group.py | 88 - .../mgmt/sql/models/failover_group_paged.py | 27 - .../mgmt/sql/models/failover_group_py3.py | 88 - .../failover_group_read_only_endpoint.py | 30 - .../failover_group_read_only_endpoint_py3.py | 30 - .../failover_group_read_write_endpoint.py | 45 - .../failover_group_read_write_endpoint_py3.py | 45 - .../mgmt/sql/models/failover_group_update.py | 44 - .../sql/models/failover_group_update_py3.py | 44 - .../azure/mgmt/sql/models/firewall_rule.py | 68 - .../mgmt/sql/models/firewall_rule_paged.py | 27 - .../mgmt/sql/models/firewall_rule_py3.py | 68 - .../mgmt/sql/models/geo_backup_policy.py | 66 - .../sql/models/geo_backup_policy_paged.py | 27 - .../mgmt/sql/models/geo_backup_policy_py3.py | 66 - .../mgmt/sql/models/import_export_response.py | 87 - .../sql/models/import_export_response_py3.py | 87 - .../sql/models/import_extension_request.py | 81 - .../models/import_extension_request_py3.py | 81 - .../azure/mgmt/sql/models/import_request.py | 91 - .../mgmt/sql/models/import_request_py3.py | 91 - .../sql/models/instance_failover_group.py | 82 - .../models/instance_failover_group_paged.py | 27 - .../sql/models/instance_failover_group_py3.py | 82 - ...tance_failover_group_read_only_endpoint.py | 30 - ...e_failover_group_read_only_endpoint_py3.py | 30 - ...ance_failover_group_read_write_endpoint.py | 45 - ..._failover_group_read_write_endpoint_py3.py | 45 - .../azure/mgmt/sql/models/job.py | 56 - .../azure/mgmt/sql/models/job_agent.py | 67 - .../azure/mgmt/sql/models/job_agent_paged.py | 27 - .../azure/mgmt/sql/models/job_agent_py3.py | 67 - .../azure/mgmt/sql/models/job_agent_update.py | 28 - .../mgmt/sql/models/job_agent_update_py3.py | 28 - .../azure/mgmt/sql/models/job_credential.py | 55 - .../mgmt/sql/models/job_credential_paged.py | 27 - .../mgmt/sql/models/job_credential_py3.py | 55 - .../azure/mgmt/sql/models/job_execution.py | 113 - .../mgmt/sql/models/job_execution_paged.py | 27 - .../mgmt/sql/models/job_execution_py3.py | 113 - .../mgmt/sql/models/job_execution_target.py | 46 - .../sql/models/job_execution_target_py3.py | 46 - .../azure/mgmt/sql/models/job_paged.py | 27 - .../azure/mgmt/sql/models/job_py3.py | 56 - .../azure/mgmt/sql/models/job_schedule.py | 48 - .../azure/mgmt/sql/models/job_schedule_py3.py | 48 - .../azure/mgmt/sql/models/job_step.py | 75 - .../azure/mgmt/sql/models/job_step_action.py | 45 - .../mgmt/sql/models/job_step_action_py3.py | 45 - .../sql/models/job_step_execution_options.py | 49 - .../models/job_step_execution_options_py3.py | 49 - .../azure/mgmt/sql/models/job_step_output.py | 67 - .../mgmt/sql/models/job_step_output_py3.py | 67 - .../azure/mgmt/sql/models/job_step_paged.py | 27 - .../azure/mgmt/sql/models/job_step_py3.py | 75 - .../azure/mgmt/sql/models/job_target.py | 65 - .../azure/mgmt/sql/models/job_target_group.py | 49 - .../mgmt/sql/models/job_target_group_paged.py | 27 - .../mgmt/sql/models/job_target_group_py3.py | 49 - .../azure/mgmt/sql/models/job_target_py3.py | 65 - .../azure/mgmt/sql/models/job_version.py | 42 - .../mgmt/sql/models/job_version_paged.py | 27 - .../azure/mgmt/sql/models/job_version_py3.py | 42 - .../sql/models/license_type_capability.py | 45 - .../sql/models/license_type_capability_py3.py | 45 - .../mgmt/sql/models/location_capabilities.py | 58 - .../sql/models/location_capabilities_py3.py | 58 - .../mgmt/sql/models/log_size_capability.py | 41 - .../sql/models/log_size_capability_py3.py | 41 - .../sql/models/long_term_retention_backup.py | 73 - .../long_term_retention_backup_paged.py | 27 - .../models/long_term_retention_backup_py3.py | 73 - ...aged_backup_short_term_retention_policy.py | 47 - ...ackup_short_term_retention_policy_paged.py | 27 - ..._backup_short_term_retention_policy_py3.py | 47 - .../azure/mgmt/sql/models/managed_database.py | 136 - .../mgmt/sql/models/managed_database_paged.py | 27 - .../mgmt/sql/models/managed_database_py3.py | 136 - .../managed_database_security_alert_policy.py | 88 - ...ed_database_security_alert_policy_paged.py | 27 - ...aged_database_security_alert_policy_py3.py | 88 - .../sql/models/managed_database_update.py | 119 - .../sql/models/managed_database_update_py3.py | 119 - .../azure/mgmt/sql/models/managed_instance.py | 139 - .../managed_instance_edition_capability.py | 51 - ...managed_instance_edition_capability_py3.py | 51 - .../managed_instance_encryption_protector.py | 71 - ...ged_instance_encryption_protector_paged.py | 27 - ...naged_instance_encryption_protector_py3.py | 71 - .../managed_instance_family_capability.py | 73 - .../managed_instance_family_capability_py3.py | 73 - .../mgmt/sql/models/managed_instance_key.py | 72 - .../sql/models/managed_instance_key_paged.py | 27 - .../sql/models/managed_instance_key_py3.py | 72 - .../mgmt/sql/models/managed_instance_paged.py | 27 - .../sql/models/managed_instance_pair_info.py | 34 - .../models/managed_instance_pair_info_py3.py | 34 - .../mgmt/sql/models/managed_instance_py3.py | 139 - .../sql/models/managed_instance_update.py | 117 - .../sql/models/managed_instance_update_py3.py | 117 - .../managed_instance_vcores_capability.py | 50 - .../managed_instance_vcores_capability_py3.py | 50 - .../managed_instance_version_capability.py | 51 - ...managed_instance_version_capability_py3.py | 51 - ...naged_instance_vulnerability_assessment.py | 70 - ...instance_vulnerability_assessment_paged.py | 27 - ...d_instance_vulnerability_assessment_py3.py | 70 - .../managed_server_security_alert_policy.py | 88 - ...aged_server_security_alert_policy_paged.py | 27 - ...anaged_server_security_alert_policy_py3.py | 88 - .../mgmt/sql/models/max_size_capability.py | 41 - .../sql/models/max_size_capability_py3.py | 41 - .../sql/models/max_size_range_capability.py | 61 - .../models/max_size_range_capability_py3.py | 61 - .../azure/mgmt/sql/models/metric.py | 62 - .../mgmt/sql/models/metric_availability.py | 40 - .../sql/models/metric_availability_py3.py | 40 - .../mgmt/sql/models/metric_definition.py | 61 - .../sql/models/metric_definition_paged.py | 27 - .../mgmt/sql/models/metric_definition_py3.py | 61 - .../azure/mgmt/sql/models/metric_name.py | 40 - .../azure/mgmt/sql/models/metric_name_py3.py | 40 - .../azure/mgmt/sql/models/metric_paged.py | 27 - .../azure/mgmt/sql/models/metric_py3.py | 62 - .../azure/mgmt/sql/models/metric_value.py | 60 - .../azure/mgmt/sql/models/metric_value_py3.py | 60 - .../azure/mgmt/sql/models/operation.py | 53 - .../mgmt/sql/models/operation_display.py | 51 - .../mgmt/sql/models/operation_display_py3.py | 51 - .../azure/mgmt/sql/models/operation_impact.py | 51 - .../mgmt/sql/models/operation_impact_py3.py | 51 - .../azure/mgmt/sql/models/operation_paged.py | 27 - .../azure/mgmt/sql/models/operation_py3.py | 53 - .../azure/mgmt/sql/models/partner_info.py | 49 - .../azure/mgmt/sql/models/partner_info_py3.py | 49 - .../mgmt/sql/models/partner_region_info.py | 41 - .../sql/models/partner_region_info_py3.py | 41 - .../models/performance_level_capability.py | 41 - .../performance_level_capability_py3.py | 41 - .../azure/mgmt/sql/models/proxy_resource.py | 42 - .../mgmt/sql/models/proxy_resource_py3.py | 42 - .../sql/models/recommended_elastic_pool.py | 100 - .../models/recommended_elastic_pool_metric.py | 37 - .../recommended_elastic_pool_metric_paged.py | 27 - .../recommended_elastic_pool_metric_py3.py | 37 - .../models/recommended_elastic_pool_paged.py | 27 - .../models/recommended_elastic_pool_py3.py | 100 - .../mgmt/sql/models/recommended_index.py | 112 - .../mgmt/sql/models/recommended_index_py3.py | 112 - .../mgmt/sql/models/recoverable_database.py | 64 - .../sql/models/recoverable_database_paged.py | 27 - .../sql/models/recoverable_database_py3.py | 64 - .../models/recoverable_managed_database.py | 47 - .../recoverable_managed_database_paged.py | 27 - .../recoverable_managed_database_py3.py | 47 - .../azure/mgmt/sql/models/replication_link.py | 104 - .../mgmt/sql/models/replication_link_paged.py | 27 - .../mgmt/sql/models/replication_link_py3.py | 104 - .../azure/mgmt/sql/models/resource.py | 45 - .../mgmt/sql/models/resource_identity.py | 46 - .../mgmt/sql/models/resource_identity_py3.py | 46 - .../sql/models/resource_move_definition.py | 34 - .../models/resource_move_definition_py3.py | 34 - .../azure/mgmt/sql/models/resource_py3.py | 45 - .../sql/models/restorable_dropped_database.py | 89 - .../restorable_dropped_database_paged.py | 27 - .../models/restorable_dropped_database_py3.py | 89 - .../restorable_dropped_managed_database.py | 72 - ...storable_dropped_managed_database_paged.py | 27 - ...restorable_dropped_managed_database_py3.py | 72 - .../azure/mgmt/sql/models/restore_point.py | 71 - .../mgmt/sql/models/restore_point_paged.py | 27 - .../mgmt/sql/models/restore_point_py3.py | 71 - .../mgmt/sql/models/sensitivity_label.py | 58 - .../sql/models/sensitivity_label_paged.py | 27 - .../mgmt/sql/models/sensitivity_label_py3.py | 58 - .../azure/mgmt/sql/models/server.py | 86 - .../sql/models/server_automatic_tuning.py | 60 - .../sql/models/server_automatic_tuning_py3.py | 60 - .../models/server_azure_ad_administrator.py | 67 - .../server_azure_ad_administrator_paged.py | 27 - .../server_azure_ad_administrator_py3.py | 67 - .../sql/models/server_blob_auditing_policy.py | 160 - .../models/server_blob_auditing_policy_py3.py | 160 - .../sql/models/server_communication_link.py | 65 - .../models/server_communication_link_paged.py | 27 - .../models/server_communication_link_py3.py | 65 - .../sql/models/server_connection_policy.py | 60 - .../models/server_connection_policy_py3.py | 60 - .../azure/mgmt/sql/models/server_dns_alias.py | 47 - .../models/server_dns_alias_acquisition.py | 29 - .../server_dns_alias_acquisition_py3.py | 29 - .../mgmt/sql/models/server_dns_alias_paged.py | 27 - .../mgmt/sql/models/server_dns_alias_py3.py | 47 - .../azure/mgmt/sql/models/server_key.py | 78 - .../azure/mgmt/sql/models/server_key_paged.py | 27 - .../azure/mgmt/sql/models/server_key_py3.py | 78 - .../azure/mgmt/sql/models/server_paged.py | 27 - .../azure/mgmt/sql/models/server_py3.py | 86 - .../models/server_security_alert_policy.py | 88 - .../server_security_alert_policy_paged.py | 27 - .../server_security_alert_policy_py3.py | 88 - .../azure/mgmt/sql/models/server_update.py | 59 - .../mgmt/sql/models/server_update_py3.py | 59 - .../azure/mgmt/sql/models/server_usage.py | 66 - .../mgmt/sql/models/server_usage_paged.py | 27 - .../azure/mgmt/sql/models/server_usage_py3.py | 66 - .../sql/models/server_version_capability.py | 58 - .../models/server_version_capability_py3.py | 58 - .../models/server_vulnerability_assessment.py | 70 - .../server_vulnerability_assessment_paged.py | 27 - .../server_vulnerability_assessment_py3.py | 70 - .../mgmt/sql/models/service_objective.py | 69 - .../models/service_objective_capability.py | 78 - .../service_objective_capability_py3.py | 78 - .../sql/models/service_objective_paged.py | 27 - .../mgmt/sql/models/service_objective_py3.py | 69 - .../mgmt/sql/models/service_tier_advisor.py | 157 - .../sql/models/service_tier_advisor_paged.py | 27 - .../sql/models/service_tier_advisor_py3.py | 157 - .../azure/mgmt/sql/models/sku.py | 57 - .../azure/mgmt/sql/models/sku_py3.py | 57 - .../azure/mgmt/sql/models/slo_usage_metric.py | 57 - .../mgmt/sql/models/slo_usage_metric_py3.py | 57 - .../mgmt/sql/models/subscription_usage.py | 62 - .../sql/models/subscription_usage_paged.py | 27 - .../mgmt/sql/models/subscription_usage_py3.py | 62 - .../azure/mgmt/sql/models/sync_agent.py | 78 - .../sql/models/sync_agent_key_properties.py | 35 - .../models/sync_agent_key_properties_py3.py | 35 - .../sql/models/sync_agent_linked_database.py | 73 - .../sync_agent_linked_database_paged.py | 27 - .../models/sync_agent_linked_database_py3.py | 73 - .../azure/mgmt/sql/models/sync_agent_paged.py | 27 - .../azure/mgmt/sql/models/sync_agent_py3.py | 78 - .../sql/models/sync_database_id_properties.py | 35 - .../sync_database_id_properties_paged.py | 27 - .../models/sync_database_id_properties_py3.py | 35 - .../sql/models/sync_full_schema_properties.py | 40 - .../sync_full_schema_properties_paged.py | 27 - .../models/sync_full_schema_properties_py3.py | 40 - .../mgmt/sql/models/sync_full_schema_table.py | 55 - .../models/sync_full_schema_table_column.py | 65 - .../sync_full_schema_table_column_py3.py | 65 - .../sql/models/sync_full_schema_table_py3.py | 55 - .../azure/mgmt/sql/models/sync_group.py | 82 - .../sql/models/sync_group_log_properties.py | 61 - .../models/sync_group_log_properties_paged.py | 27 - .../models/sync_group_log_properties_py3.py | 61 - .../azure/mgmt/sql/models/sync_group_paged.py | 27 - .../azure/mgmt/sql/models/sync_group_py3.py | 82 - .../mgmt/sql/models/sync_group_schema.py | 33 - .../mgmt/sql/models/sync_group_schema_py3.py | 33 - .../sql/models/sync_group_schema_table.py | 32 - .../models/sync_group_schema_table_column.py | 36 - .../sync_group_schema_table_column_py3.py | 36 - .../sql/models/sync_group_schema_table_py3.py | 32 - .../azure/mgmt/sql/models/sync_member.py | 89 - .../mgmt/sql/models/sync_member_paged.py | 27 - .../azure/mgmt/sql/models/sync_member_py3.py | 89 - .../azure/mgmt/sql/models/tde_certificate.py | 54 - .../mgmt/sql/models/tde_certificate_py3.py | 54 - .../azure/mgmt/sql/models/tracked_resource.py | 53 - .../mgmt/sql/models/tracked_resource_py3.py | 53 - .../sql/models/transparent_data_encryption.py | 53 - .../transparent_data_encryption_activity.py | 60 - ...nsparent_data_encryption_activity_paged.py | 27 - ...ransparent_data_encryption_activity_py3.py | 60 - .../models/transparent_data_encryption_py3.py | 53 - .../azure/mgmt/sql/models/virtual_cluster.py | 66 - .../mgmt/sql/models/virtual_cluster_paged.py | 27 - .../mgmt/sql/models/virtual_cluster_py3.py | 66 - .../mgmt/sql/models/virtual_cluster_update.py | 49 - .../sql/models/virtual_cluster_update_py3.py | 49 - .../mgmt/sql/models/virtual_network_rule.py | 61 - .../sql/models/virtual_network_rule_paged.py | 27 - .../sql/models/virtual_network_rule_py3.py | 61 - ...y_assessment_recurring_scans_properties.py | 39 - ...sessment_recurring_scans_properties_py3.py | 39 - .../vulnerability_assessment_scan_error.py | 40 - ...vulnerability_assessment_scan_error_py3.py | 40 - .../vulnerability_assessment_scan_record.py | 88 - ...nerability_assessment_scan_record_paged.py | 27 - ...ulnerability_assessment_scan_record_py3.py | 88 - .../azure/mgmt/sql/operations/__init__.py | 166 +- ...ong_term_retention_policies_operations.py} | 4 +- ...ort_term_retention_policies_operations.py} | 17 +- ...rations.py => _capabilities_operations.py} | 3 +- ...y => _data_masking_policies_operations.py} | 4 +- ...s.py => _data_masking_rules_operations.py} | 17 +- ... _database_automatic_tuning_operations.py} | 4 +- ...base_blob_auditing_policies_operations.py} | 4 +- ..._operations.py => _database_operations.py} | 16 +- ...e_threat_detection_policies_operations.py} | 4 +- ...ions.py => _database_usages_operations.py} | 16 +- ...y_assessment_rule_baselines_operations.py} | 4 +- ...nerability_assessment_scans_operations.py} | 18 +- ...e_vulnerability_assessments_operations.py} | 18 +- ...operations.py => _databases_operations.py} | 146 +- ...=> _elastic_pool_activities_operations.py} | 16 +- ...ic_pool_database_activities_operations.py} | 16 +- ...rations.py => _elastic_pool_operations.py} | 16 +- ...ations.py => _elastic_pools_operations.py} | 132 +- ...y => _encryption_protectors_operations.py} | 17 +- ...base_blob_auditing_policies_operations.py} | 4 +- ...rver_blob_auditing_policies_operations.py} | 3 +- ...ions.py => _failover_groups_operations.py} | 17 +- ...tions.py => _firewall_rules_operations.py} | 18 +- ....py => _geo_backup_policies_operations.py} | 18 +- ...> _instance_failover_groups_operations.py} | 17 +- .../operations/_instance_pools_operations.py | 534 + ...perations.py => _job_agents_operations.py} | 17 +- ...ions.py => _job_credentials_operations.py} | 18 +- ...tions.py => _job_executions_operations.py} | 31 +- ....py => _job_step_executions_operations.py} | 17 +- ...operations.py => _job_steps_operations.py} | 33 +- ...y => _job_target_executions_operations.py} | 31 +- ...ns.py => _job_target_groups_operations.py} | 18 +- ...rations.py => _job_versions_operations.py} | 17 +- ...jobs_operations.py => _jobs_operations.py} | 18 +- ..._long_term_retention_backups_operations.py | 880 ++ ...ort_term_retention_policies_operations.py} | 17 +- ...ase_security_alert_policies_operations.py} | 18 +- ...database_sensitivity_labels_operations.py} | 190 +- ...y_assessment_rule_baselines_operations.py} | 4 +- ...nerability_assessment_scans_operations.py} | 18 +- ...e_vulnerability_assessments_operations.py} | 18 +- ...ns.py => _managed_databases_operations.py} | 17 +- ...tance_encryption_protectors_operations.py} | 17 +- ...y => _managed_instance_keys_operations.py} | 17 +- ...d_instance_tde_certificates_operations.py} | 2 + ...e_vulnerability_assessments_operations.py} | 18 +- ...ns.py => _managed_instances_operations.py} | 119 +- ...ort_term_retention_policies_operations.py} | 17 +- ...ver_security_alert_policies_operations.py} | 17 +- .../{operations.py => _operations.py} | 16 +- ... _recommended_elastic_pools_operations.py} | 31 +- ...y => _recoverable_databases_operations.py} | 17 +- ...coverable_managed_databases_operations.py} | 17 +- ...ns.py => _replication_links_operations.py} | 17 +- ...estorable_dropped_databases_operations.py} | 17 +- ...e_dropped_managed_databases_operations.py} | 17 +- ...tions.py => _restore_points_operations.py} | 17 +- ...s.py => _sensitivity_labels_operations.py} | 190 +- ...=> _server_automatic_tuning_operations.py} | 4 +- ...ver_azure_ad_administrators_operations.py} | 17 +- ...rver_blob_auditing_policies_operations.py} | 3 +- ..._server_communication_links_operations.py} | 17 +- ..._server_connection_policies_operations.py} | 4 +- ...s.py => _server_dns_aliases_operations.py} | 17 +- ...erations.py => _server_keys_operations.py} | 17 +- ...ver_security_alert_policies_operations.py} | 17 +- ...ations.py => _server_usages_operations.py} | 16 +- ...r_vulnerability_assessments_operations.py} | 18 +- ...s_operations.py => _servers_operations.py} | 32 +- ...s.py => _service_objectives_operations.py} | 17 +- ...y => _service_tier_advisors_operations.py} | 17 +- ....py => _subscription_usages_operations.py} | 17 +- ...erations.py => _sync_agents_operations.py} | 32 +- ...erations.py => _sync_groups_operations.py} | 59 +- ...rations.py => _sync_members_operations.py} | 31 +- ...ons.py => _tde_certificates_operations.py} | 2 + ..._data_encryption_activities_operations.py} | 16 +- ...ransparent_data_encryptions_operations.py} | 4 +- .../mgmt/sql/operations/_usages_operations.py | 120 + ...ons.py => _virtual_clusters_operations.py} | 31 +- ...y => _virtual_network_rules_operations.py} | 17 +- .../long_term_retention_backups_operations.py | 441 - 459 files changed, 22360 insertions(+), 24337 deletions(-) create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_configuration.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/{sql_management_client.py => _sql_management_client.py} (75%) create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/{sql_management_client_enums.py => _sql_management_client_enums.py} (95%) delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_py3.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{backup_long_term_retention_policies_operations.py => _backup_long_term_retention_policies_operations.py} (99%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{backup_short_term_retention_policies_operations.py => _backup_short_term_retention_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{capabilities_operations.py => _capabilities_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{data_masking_policies_operations.py => _data_masking_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{data_masking_rules_operations.py => _data_masking_rules_operations.py} (96%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_automatic_tuning_operations.py => _database_automatic_tuning_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_blob_auditing_policies_operations.py => _database_blob_auditing_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_operations.py => _database_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_threat_detection_policies_operations.py => _database_threat_detection_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_usages_operations.py => _database_usages_operations.py} (92%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_vulnerability_assessment_rule_baselines_operations.py => _database_vulnerability_assessment_rule_baselines_operations.py} (99%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_vulnerability_assessment_scans_operations.py => _database_vulnerability_assessment_scans_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_vulnerability_assessments_operations.py => _database_vulnerability_assessments_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{databases_operations.py => _databases_operations.py} (92%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{elastic_pool_activities_operations.py => _elastic_pool_activities_operations.py} (92%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{elastic_pool_database_activities_operations.py => _elastic_pool_database_activities_operations.py} (92%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{elastic_pool_operations.py => _elastic_pool_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{elastic_pools_operations.py => _elastic_pools_operations.py} (85%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{encryption_protectors_operations.py => _encryption_protectors_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{extended_database_blob_auditing_policies_operations.py => _extended_database_blob_auditing_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{extended_server_blob_auditing_policies_operations.py => _extended_server_blob_auditing_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{failover_groups_operations.py => _failover_groups_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{firewall_rules_operations.py => _firewall_rules_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{geo_backup_policies_operations.py => _geo_backup_policies_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{instance_failover_groups_operations.py => _instance_failover_groups_operations.py} (98%) create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_pools_operations.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_agents_operations.py => _job_agents_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_credentials_operations.py => _job_credentials_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_executions_operations.py => _job_executions_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_step_executions_operations.py => _job_step_executions_operations.py} (96%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_steps_operations.py => _job_steps_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_target_executions_operations.py => _job_target_executions_operations.py} (96%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_target_groups_operations.py => _job_target_groups_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_versions_operations.py => _job_versions_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{jobs_operations.py => _jobs_operations.py} (97%) create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_backups_operations.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_backup_short_term_retention_policies_operations.py => _managed_backup_short_term_retention_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_database_security_alert_policies_operations.py => _managed_database_security_alert_policies_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_database_sensitivity_labels_operations.py => _managed_database_sensitivity_labels_operations.py} (70%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_database_vulnerability_assessment_rule_baselines_operations.py => _managed_database_vulnerability_assessment_rule_baselines_operations.py} (99%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_database_vulnerability_assessment_scans_operations.py => _managed_database_vulnerability_assessment_scans_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_database_vulnerability_assessments_operations.py => _managed_database_vulnerability_assessments_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_databases_operations.py => _managed_databases_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_instance_encryption_protectors_operations.py => _managed_instance_encryption_protectors_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_instance_keys_operations.py => _managed_instance_keys_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_instance_tde_certificates_operations.py => _managed_instance_tde_certificates_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_instance_vulnerability_assessments_operations.py => _managed_instance_vulnerability_assessments_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_instances_operations.py => _managed_instances_operations.py} (84%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py => _managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_server_security_alert_policies_operations.py => _managed_server_security_alert_policies_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{operations.py => _operations.py} (90%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{recommended_elastic_pools_operations.py => _recommended_elastic_pools_operations.py} (94%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{recoverable_databases_operations.py => _recoverable_databases_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{recoverable_managed_databases_operations.py => _recoverable_managed_databases_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{replication_links_operations.py => _replication_links_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{restorable_dropped_databases_operations.py => _restorable_dropped_databases_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{restorable_dropped_managed_databases_operations.py => _restorable_dropped_managed_databases_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{restore_points_operations.py => _restore_points_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{sensitivity_labels_operations.py => _sensitivity_labels_operations.py} (70%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_automatic_tuning_operations.py => _server_automatic_tuning_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_azure_ad_administrators_operations.py => _server_azure_ad_administrators_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_blob_auditing_policies_operations.py => _server_blob_auditing_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_communication_links_operations.py => _server_communication_links_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_connection_policies_operations.py => _server_connection_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_dns_aliases_operations.py => _server_dns_aliases_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_keys_operations.py => _server_keys_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_security_alert_policies_operations.py => _server_security_alert_policies_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_usages_operations.py => _server_usages_operations.py} (92%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_vulnerability_assessments_operations.py => _server_vulnerability_assessments_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{servers_operations.py => _servers_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{service_objectives_operations.py => _service_objectives_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{service_tier_advisors_operations.py => _service_tier_advisors_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{subscription_usages_operations.py => _subscription_usages_operations.py} (94%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{sync_agents_operations.py => _sync_agents_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{sync_groups_operations.py => _sync_groups_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{sync_members_operations.py => _sync_members_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{tde_certificates_operations.py => _tde_certificates_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{transparent_data_encryption_activities_operations.py => _transparent_data_encryption_activities_operations.py} (93%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{transparent_data_encryptions_operations.py => _transparent_data_encryptions_operations.py} (98%) create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_usages_operations.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{virtual_clusters_operations.py => _virtual_clusters_operations.py} (96%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{virtual_network_rules_operations.py => _virtual_network_rules_operations.py} (97%) delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/long_term_retention_backups_operations.py diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/__init__.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/__init__.py index 33b83233be3c..48b056c94dfa 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/__init__.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .sql_management_client import SqlManagementClient -from .version import VERSION +from ._configuration import SqlManagementClientConfiguration +from ._sql_management_client import SqlManagementClient +__all__ = ['SqlManagementClient', 'SqlManagementClientConfiguration'] -__all__ = ['SqlManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_configuration.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_configuration.py new file mode 100644 index 000000000000..ca7086f8dadf --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_configuration.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class SqlManagementClientConfiguration(AzureConfiguration): + """Configuration for SqlManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription ID that identifies an Azure + subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(SqlManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-sql/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py similarity index 75% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py index aae1ce917e14..1bedc764b599 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py @@ -11,122 +11,91 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.recoverable_databases_operations import RecoverableDatabasesOperations -from .operations.restorable_dropped_databases_operations import RestorableDroppedDatabasesOperations -from .operations.servers_operations import ServersOperations -from .operations.server_connection_policies_operations import ServerConnectionPoliciesOperations -from .operations.database_threat_detection_policies_operations import DatabaseThreatDetectionPoliciesOperations -from .operations.data_masking_policies_operations import DataMaskingPoliciesOperations -from .operations.data_masking_rules_operations import DataMaskingRulesOperations -from .operations.firewall_rules_operations import FirewallRulesOperations -from .operations.geo_backup_policies_operations import GeoBackupPoliciesOperations -from .operations.databases_operations import DatabasesOperations -from .operations.elastic_pools_operations import ElasticPoolsOperations -from .operations.recommended_elastic_pools_operations import RecommendedElasticPoolsOperations -from .operations.replication_links_operations import ReplicationLinksOperations -from .operations.server_azure_ad_administrators_operations import ServerAzureADAdministratorsOperations -from .operations.server_communication_links_operations import ServerCommunicationLinksOperations -from .operations.service_objectives_operations import ServiceObjectivesOperations -from .operations.elastic_pool_activities_operations import ElasticPoolActivitiesOperations -from .operations.elastic_pool_database_activities_operations import ElasticPoolDatabaseActivitiesOperations -from .operations.service_tier_advisors_operations import ServiceTierAdvisorsOperations -from .operations.transparent_data_encryptions_operations import TransparentDataEncryptionsOperations -from .operations.transparent_data_encryption_activities_operations import TransparentDataEncryptionActivitiesOperations -from .operations.server_usages_operations import ServerUsagesOperations -from .operations.database_usages_operations import DatabaseUsagesOperations -from .operations.database_automatic_tuning_operations import DatabaseAutomaticTuningOperations -from .operations.encryption_protectors_operations import EncryptionProtectorsOperations -from .operations.failover_groups_operations import FailoverGroupsOperations -from .operations.managed_instances_operations import ManagedInstancesOperations -from .operations.operations import Operations -from .operations.server_keys_operations import ServerKeysOperations -from .operations.sync_agents_operations import SyncAgentsOperations -from .operations.sync_groups_operations import SyncGroupsOperations -from .operations.sync_members_operations import SyncMembersOperations -from .operations.subscription_usages_operations import SubscriptionUsagesOperations -from .operations.virtual_clusters_operations import VirtualClustersOperations -from .operations.virtual_network_rules_operations import VirtualNetworkRulesOperations -from .operations.extended_database_blob_auditing_policies_operations import ExtendedDatabaseBlobAuditingPoliciesOperations -from .operations.extended_server_blob_auditing_policies_operations import ExtendedServerBlobAuditingPoliciesOperations -from .operations.server_blob_auditing_policies_operations import ServerBlobAuditingPoliciesOperations -from .operations.database_blob_auditing_policies_operations import DatabaseBlobAuditingPoliciesOperations -from .operations.database_vulnerability_assessment_rule_baselines_operations import DatabaseVulnerabilityAssessmentRuleBaselinesOperations -from .operations.database_vulnerability_assessments_operations import DatabaseVulnerabilityAssessmentsOperations -from .operations.job_agents_operations import JobAgentsOperations -from .operations.job_credentials_operations import JobCredentialsOperations -from .operations.job_executions_operations import JobExecutionsOperations -from .operations.jobs_operations import JobsOperations -from .operations.job_step_executions_operations import JobStepExecutionsOperations -from .operations.job_steps_operations import JobStepsOperations -from .operations.job_target_executions_operations import JobTargetExecutionsOperations -from .operations.job_target_groups_operations import JobTargetGroupsOperations -from .operations.job_versions_operations import JobVersionsOperations -from .operations.long_term_retention_backups_operations import LongTermRetentionBackupsOperations -from .operations.backup_long_term_retention_policies_operations import BackupLongTermRetentionPoliciesOperations -from .operations.managed_backup_short_term_retention_policies_operations import ManagedBackupShortTermRetentionPoliciesOperations -from .operations.managed_databases_operations import ManagedDatabasesOperations -from .operations.managed_restorable_dropped_database_backup_short_term_retention_policies_operations import ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations -from .operations.server_automatic_tuning_operations import ServerAutomaticTuningOperations -from .operations.server_dns_aliases_operations import ServerDnsAliasesOperations -from .operations.server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations -from .operations.restorable_dropped_managed_databases_operations import RestorableDroppedManagedDatabasesOperations -from .operations.restore_points_operations import RestorePointsOperations -from .operations.managed_database_security_alert_policies_operations import ManagedDatabaseSecurityAlertPoliciesOperations -from .operations.managed_server_security_alert_policies_operations import ManagedServerSecurityAlertPoliciesOperations -from .operations.sensitivity_labels_operations import SensitivityLabelsOperations -from .operations.database_operations import DatabaseOperations -from .operations.elastic_pool_operations import ElasticPoolOperations -from .operations.capabilities_operations import CapabilitiesOperations -from .operations.database_vulnerability_assessment_scans_operations import DatabaseVulnerabilityAssessmentScansOperations -from .operations.managed_database_vulnerability_assessment_rule_baselines_operations import ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations -from .operations.managed_database_vulnerability_assessment_scans_operations import ManagedDatabaseVulnerabilityAssessmentScansOperations -from .operations.managed_database_vulnerability_assessments_operations import ManagedDatabaseVulnerabilityAssessmentsOperations -from .operations.instance_failover_groups_operations import InstanceFailoverGroupsOperations -from .operations.backup_short_term_retention_policies_operations import BackupShortTermRetentionPoliciesOperations -from .operations.tde_certificates_operations import TdeCertificatesOperations -from .operations.managed_instance_tde_certificates_operations import ManagedInstanceTdeCertificatesOperations -from .operations.managed_instance_keys_operations import ManagedInstanceKeysOperations -from .operations.managed_instance_encryption_protectors_operations import ManagedInstanceEncryptionProtectorsOperations -from .operations.recoverable_managed_databases_operations import RecoverableManagedDatabasesOperations -from .operations.managed_instance_vulnerability_assessments_operations import ManagedInstanceVulnerabilityAssessmentsOperations -from .operations.server_vulnerability_assessments_operations import ServerVulnerabilityAssessmentsOperations -from .operations.managed_database_sensitivity_labels_operations import ManagedDatabaseSensitivityLabelsOperations -from . import models - - -class SqlManagementClientConfiguration(AzureConfiguration): - """Configuration for SqlManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The subscription ID that identifies an Azure - subscription. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(SqlManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-sql/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import SqlManagementClientConfiguration +from .operations import RecoverableDatabasesOperations +from .operations import RestorableDroppedDatabasesOperations +from .operations import ServersOperations +from .operations import ServerConnectionPoliciesOperations +from .operations import DatabaseThreatDetectionPoliciesOperations +from .operations import DataMaskingPoliciesOperations +from .operations import DataMaskingRulesOperations +from .operations import FirewallRulesOperations +from .operations import GeoBackupPoliciesOperations +from .operations import DatabasesOperations +from .operations import ElasticPoolsOperations +from .operations import RecommendedElasticPoolsOperations +from .operations import ReplicationLinksOperations +from .operations import ServerAzureADAdministratorsOperations +from .operations import ServerCommunicationLinksOperations +from .operations import ServiceObjectivesOperations +from .operations import ElasticPoolActivitiesOperations +from .operations import ElasticPoolDatabaseActivitiesOperations +from .operations import ServiceTierAdvisorsOperations +from .operations import TransparentDataEncryptionsOperations +from .operations import TransparentDataEncryptionActivitiesOperations +from .operations import ServerUsagesOperations +from .operations import DatabaseUsagesOperations +from .operations import DatabaseAutomaticTuningOperations +from .operations import EncryptionProtectorsOperations +from .operations import FailoverGroupsOperations +from .operations import Operations +from .operations import ServerKeysOperations +from .operations import SyncAgentsOperations +from .operations import SyncGroupsOperations +from .operations import SyncMembersOperations +from .operations import SubscriptionUsagesOperations +from .operations import VirtualClustersOperations +from .operations import VirtualNetworkRulesOperations +from .operations import ExtendedDatabaseBlobAuditingPoliciesOperations +from .operations import ExtendedServerBlobAuditingPoliciesOperations +from .operations import ServerBlobAuditingPoliciesOperations +from .operations import DatabaseBlobAuditingPoliciesOperations +from .operations import DatabaseVulnerabilityAssessmentRuleBaselinesOperations +from .operations import DatabaseVulnerabilityAssessmentsOperations +from .operations import JobAgentsOperations +from .operations import JobCredentialsOperations +from .operations import JobExecutionsOperations +from .operations import JobsOperations +from .operations import JobStepExecutionsOperations +from .operations import JobStepsOperations +from .operations import JobTargetExecutionsOperations +from .operations import JobTargetGroupsOperations +from .operations import JobVersionsOperations +from .operations import LongTermRetentionBackupsOperations +from .operations import BackupLongTermRetentionPoliciesOperations +from .operations import ManagedBackupShortTermRetentionPoliciesOperations +from .operations import ManagedDatabasesOperations +from .operations import ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations +from .operations import ServerAutomaticTuningOperations +from .operations import ServerDnsAliasesOperations +from .operations import ServerSecurityAlertPoliciesOperations +from .operations import RestorableDroppedManagedDatabasesOperations +from .operations import RestorePointsOperations +from .operations import ManagedDatabaseSecurityAlertPoliciesOperations +from .operations import ManagedServerSecurityAlertPoliciesOperations +from .operations import SensitivityLabelsOperations +from .operations import DatabaseOperations +from .operations import ElasticPoolOperations +from .operations import CapabilitiesOperations +from .operations import DatabaseVulnerabilityAssessmentScansOperations +from .operations import ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations +from .operations import ManagedDatabaseVulnerabilityAssessmentScansOperations +from .operations import ManagedDatabaseVulnerabilityAssessmentsOperations +from .operations import InstanceFailoverGroupsOperations +from .operations import BackupShortTermRetentionPoliciesOperations +from .operations import TdeCertificatesOperations +from .operations import ManagedInstanceTdeCertificatesOperations +from .operations import ManagedInstanceKeysOperations +from .operations import ManagedInstanceEncryptionProtectorsOperations +from .operations import RecoverableManagedDatabasesOperations +from .operations import ManagedInstanceVulnerabilityAssessmentsOperations +from .operations import ServerVulnerabilityAssessmentsOperations +from .operations import ManagedDatabaseSensitivityLabelsOperations +from .operations import InstancePoolsOperations +from .operations import UsagesOperations +from .operations import ManagedInstancesOperations +from . import models class SqlManagementClient(SDKClient): @@ -187,8 +156,6 @@ class SqlManagementClient(SDKClient): :vartype encryption_protectors: azure.mgmt.sql.operations.EncryptionProtectorsOperations :ivar failover_groups: FailoverGroups operations :vartype failover_groups: azure.mgmt.sql.operations.FailoverGroupsOperations - :ivar managed_instances: ManagedInstances operations - :vartype managed_instances: azure.mgmt.sql.operations.ManagedInstancesOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.sql.operations.Operations :ivar server_keys: ServerKeys operations @@ -295,6 +262,12 @@ class SqlManagementClient(SDKClient): :vartype server_vulnerability_assessments: azure.mgmt.sql.operations.ServerVulnerabilityAssessmentsOperations :ivar managed_database_sensitivity_labels: ManagedDatabaseSensitivityLabels operations :vartype managed_database_sensitivity_labels: azure.mgmt.sql.operations.ManagedDatabaseSensitivityLabelsOperations + :ivar instance_pools: InstancePools operations + :vartype instance_pools: azure.mgmt.sql.operations.InstancePoolsOperations + :ivar usages: Usages operations + :vartype usages: azure.mgmt.sql.operations.UsagesOperations + :ivar managed_instances: ManagedInstances operations + :vartype managed_instances: azure.mgmt.sql.operations.ManagedInstancesOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -367,8 +340,6 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.failover_groups = FailoverGroupsOperations( self._client, self.config, self._serialize, self._deserialize) - self.managed_instances = ManagedInstancesOperations( - self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) self.server_keys = ServerKeysOperations( @@ -475,3 +446,9 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.managed_database_sensitivity_labels = ManagedDatabaseSensitivityLabelsOperations( self._client, self.config, self._serialize, self._deserialize) + self.instance_pools = InstancePoolsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.usages = UsagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.managed_instances = ManagedInstancesOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py index 0a543180d7e4..57ac98e75568 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py @@ -10,375 +10,385 @@ # -------------------------------------------------------------------------- try: - from .recoverable_database_py3 import RecoverableDatabase - from .restorable_dropped_database_py3 import RestorableDroppedDatabase - from .tracked_resource_py3 import TrackedResource - from .resource_py3 import Resource - from .proxy_resource_py3 import ProxyResource - from .check_name_availability_request_py3 import CheckNameAvailabilityRequest - from .check_name_availability_response_py3 import CheckNameAvailabilityResponse - from .server_connection_policy_py3 import ServerConnectionPolicy - from .database_security_alert_policy_py3 import DatabaseSecurityAlertPolicy - from .data_masking_policy_py3 import DataMaskingPolicy - from .data_masking_rule_py3 import DataMaskingRule - from .firewall_rule_py3 import FirewallRule - from .geo_backup_policy_py3 import GeoBackupPolicy - from .import_extension_request_py3 import ImportExtensionRequest - from .import_export_response_py3 import ImportExportResponse - from .import_request_py3 import ImportRequest - from .export_request_py3 import ExportRequest - from .metric_value_py3 import MetricValue - from .metric_name_py3 import MetricName - from .metric_py3 import Metric - from .metric_availability_py3 import MetricAvailability - from .metric_definition_py3 import MetricDefinition - from .recommended_elastic_pool_metric_py3 import RecommendedElasticPoolMetric - from .recommended_elastic_pool_py3 import RecommendedElasticPool - from .replication_link_py3 import ReplicationLink - from .server_azure_ad_administrator_py3 import ServerAzureADAdministrator - from .server_communication_link_py3 import ServerCommunicationLink - from .service_objective_py3 import ServiceObjective - from .elastic_pool_activity_py3 import ElasticPoolActivity - from .elastic_pool_database_activity_py3 import ElasticPoolDatabaseActivity - from .operation_impact_py3 import OperationImpact - from .recommended_index_py3 import RecommendedIndex - from .transparent_data_encryption_py3 import TransparentDataEncryption - from .slo_usage_metric_py3 import SloUsageMetric - from .service_tier_advisor_py3 import ServiceTierAdvisor - from .transparent_data_encryption_activity_py3 import TransparentDataEncryptionActivity - from .server_usage_py3 import ServerUsage - from .database_usage_py3 import DatabaseUsage - from .automatic_tuning_options_py3 import AutomaticTuningOptions - from .database_automatic_tuning_py3 import DatabaseAutomaticTuning - from .encryption_protector_py3 import EncryptionProtector - from .failover_group_read_write_endpoint_py3 import FailoverGroupReadWriteEndpoint - from .failover_group_read_only_endpoint_py3 import FailoverGroupReadOnlyEndpoint - from .partner_info_py3 import PartnerInfo - from .failover_group_py3 import FailoverGroup - from .failover_group_update_py3 import FailoverGroupUpdate - from .resource_identity_py3 import ResourceIdentity - from .sku_py3 import Sku - from .managed_instance_py3 import ManagedInstance - from .managed_instance_update_py3 import ManagedInstanceUpdate - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .server_key_py3 import ServerKey - from .server_py3 import Server - from .server_update_py3 import ServerUpdate - from .sync_agent_py3 import SyncAgent - from .sync_agent_key_properties_py3 import SyncAgentKeyProperties - from .sync_agent_linked_database_py3 import SyncAgentLinkedDatabase - from .sync_database_id_properties_py3 import SyncDatabaseIdProperties - from .sync_full_schema_table_column_py3 import SyncFullSchemaTableColumn - from .sync_full_schema_table_py3 import SyncFullSchemaTable - from .sync_full_schema_properties_py3 import SyncFullSchemaProperties - from .sync_group_log_properties_py3 import SyncGroupLogProperties - from .sync_group_schema_table_column_py3 import SyncGroupSchemaTableColumn - from .sync_group_schema_table_py3 import SyncGroupSchemaTable - from .sync_group_schema_py3 import SyncGroupSchema - from .sync_group_py3 import SyncGroup - from .sync_member_py3 import SyncMember - from .subscription_usage_py3 import SubscriptionUsage - from .virtual_cluster_py3 import VirtualCluster - from .virtual_cluster_update_py3 import VirtualClusterUpdate - from .virtual_network_rule_py3 import VirtualNetworkRule - from .extended_database_blob_auditing_policy_py3 import ExtendedDatabaseBlobAuditingPolicy - from .extended_server_blob_auditing_policy_py3 import ExtendedServerBlobAuditingPolicy - from .server_blob_auditing_policy_py3 import ServerBlobAuditingPolicy - from .database_blob_auditing_policy_py3 import DatabaseBlobAuditingPolicy - from .database_vulnerability_assessment_rule_baseline_item_py3 import DatabaseVulnerabilityAssessmentRuleBaselineItem - from .database_vulnerability_assessment_rule_baseline_py3 import DatabaseVulnerabilityAssessmentRuleBaseline - from .vulnerability_assessment_recurring_scans_properties_py3 import VulnerabilityAssessmentRecurringScansProperties - from .database_vulnerability_assessment_py3 import DatabaseVulnerabilityAssessment - from .job_agent_py3 import JobAgent - from .job_agent_update_py3 import JobAgentUpdate - from .job_credential_py3 import JobCredential - from .job_execution_target_py3 import JobExecutionTarget - from .job_execution_py3 import JobExecution - from .job_schedule_py3 import JobSchedule - from .job_py3 import Job - from .job_step_action_py3 import JobStepAction - from .job_step_output_py3 import JobStepOutput - from .job_step_execution_options_py3 import JobStepExecutionOptions - from .job_step_py3 import JobStep - from .job_target_py3 import JobTarget - from .job_target_group_py3 import JobTargetGroup - from .job_version_py3 import JobVersion - from .long_term_retention_backup_py3 import LongTermRetentionBackup - from .backup_long_term_retention_policy_py3 import BackupLongTermRetentionPolicy - from .managed_backup_short_term_retention_policy_py3 import ManagedBackupShortTermRetentionPolicy - from .complete_database_restore_definition_py3 import CompleteDatabaseRestoreDefinition - from .managed_database_py3 import ManagedDatabase - from .managed_database_update_py3 import ManagedDatabaseUpdate - from .automatic_tuning_server_options_py3 import AutomaticTuningServerOptions - from .server_automatic_tuning_py3 import ServerAutomaticTuning - from .server_dns_alias_py3 import ServerDnsAlias - from .server_dns_alias_acquisition_py3 import ServerDnsAliasAcquisition - from .server_security_alert_policy_py3 import ServerSecurityAlertPolicy - from .restorable_dropped_managed_database_py3 import RestorableDroppedManagedDatabase - from .restore_point_py3 import RestorePoint - from .create_database_restore_point_definition_py3 import CreateDatabaseRestorePointDefinition - from .managed_database_security_alert_policy_py3 import ManagedDatabaseSecurityAlertPolicy - from .managed_server_security_alert_policy_py3 import ManagedServerSecurityAlertPolicy - from .sensitivity_label_py3 import SensitivityLabel - from .database_operation_py3 import DatabaseOperation - from .elastic_pool_operation_py3 import ElasticPoolOperation - from .max_size_capability_py3 import MaxSizeCapability - from .log_size_capability_py3 import LogSizeCapability - from .max_size_range_capability_py3 import MaxSizeRangeCapability - from .performance_level_capability_py3 import PerformanceLevelCapability - from .license_type_capability_py3 import LicenseTypeCapability - from .service_objective_capability_py3 import ServiceObjectiveCapability - from .edition_capability_py3 import EditionCapability - from .elastic_pool_per_database_min_performance_level_capability_py3 import ElasticPoolPerDatabaseMinPerformanceLevelCapability - from .elastic_pool_per_database_max_performance_level_capability_py3 import ElasticPoolPerDatabaseMaxPerformanceLevelCapability - from .elastic_pool_performance_level_capability_py3 import ElasticPoolPerformanceLevelCapability - from .elastic_pool_edition_capability_py3 import ElasticPoolEditionCapability - from .server_version_capability_py3 import ServerVersionCapability - from .managed_instance_vcores_capability_py3 import ManagedInstanceVcoresCapability - from .managed_instance_family_capability_py3 import ManagedInstanceFamilyCapability - from .managed_instance_edition_capability_py3 import ManagedInstanceEditionCapability - from .managed_instance_version_capability_py3 import ManagedInstanceVersionCapability - from .location_capabilities_py3 import LocationCapabilities - from .database_py3 import Database - from .database_update_py3 import DatabaseUpdate - from .resource_move_definition_py3 import ResourceMoveDefinition - from .elastic_pool_per_database_settings_py3 import ElasticPoolPerDatabaseSettings - from .elastic_pool_py3 import ElasticPool - from .elastic_pool_update_py3 import ElasticPoolUpdate - from .vulnerability_assessment_scan_error_py3 import VulnerabilityAssessmentScanError - from .vulnerability_assessment_scan_record_py3 import VulnerabilityAssessmentScanRecord - from .database_vulnerability_assessment_scans_export_py3 import DatabaseVulnerabilityAssessmentScansExport - from .instance_failover_group_read_write_endpoint_py3 import InstanceFailoverGroupReadWriteEndpoint - from .instance_failover_group_read_only_endpoint_py3 import InstanceFailoverGroupReadOnlyEndpoint - from .partner_region_info_py3 import PartnerRegionInfo - from .managed_instance_pair_info_py3 import ManagedInstancePairInfo - from .instance_failover_group_py3 import InstanceFailoverGroup - from .backup_short_term_retention_policy_py3 import BackupShortTermRetentionPolicy - from .tde_certificate_py3 import TdeCertificate - from .managed_instance_key_py3 import ManagedInstanceKey - from .managed_instance_encryption_protector_py3 import ManagedInstanceEncryptionProtector - from .recoverable_managed_database_py3 import RecoverableManagedDatabase - from .managed_instance_vulnerability_assessment_py3 import ManagedInstanceVulnerabilityAssessment - from .server_vulnerability_assessment_py3 import ServerVulnerabilityAssessment + from ._models_py3 import AutomaticTuningOptions + from ._models_py3 import AutomaticTuningServerOptions + from ._models_py3 import BackupLongTermRetentionPolicy + from ._models_py3 import BackupShortTermRetentionPolicy + from ._models_py3 import CheckNameAvailabilityRequest + from ._models_py3 import CheckNameAvailabilityResponse + from ._models_py3 import CompleteDatabaseRestoreDefinition + from ._models_py3 import CreateDatabaseRestorePointDefinition + from ._models_py3 import Database + from ._models_py3 import DatabaseAutomaticTuning + from ._models_py3 import DatabaseBlobAuditingPolicy + from ._models_py3 import DatabaseOperation + from ._models_py3 import DatabaseSecurityAlertPolicy + from ._models_py3 import DatabaseUpdate + from ._models_py3 import DatabaseUsage + from ._models_py3 import DatabaseVulnerabilityAssessment + from ._models_py3 import DatabaseVulnerabilityAssessmentRuleBaseline + from ._models_py3 import DatabaseVulnerabilityAssessmentRuleBaselineItem + from ._models_py3 import DatabaseVulnerabilityAssessmentScansExport + from ._models_py3 import DataMaskingPolicy + from ._models_py3 import DataMaskingRule + from ._models_py3 import EditionCapability + from ._models_py3 import ElasticPool + from ._models_py3 import ElasticPoolActivity + from ._models_py3 import ElasticPoolDatabaseActivity + from ._models_py3 import ElasticPoolEditionCapability + from ._models_py3 import ElasticPoolOperation + from ._models_py3 import ElasticPoolPerDatabaseMaxPerformanceLevelCapability + from ._models_py3 import ElasticPoolPerDatabaseMinPerformanceLevelCapability + from ._models_py3 import ElasticPoolPerDatabaseSettings + from ._models_py3 import ElasticPoolPerformanceLevelCapability + from ._models_py3 import ElasticPoolUpdate + from ._models_py3 import EncryptionProtector + from ._models_py3 import ExportRequest + from ._models_py3 import ExtendedDatabaseBlobAuditingPolicy + from ._models_py3 import ExtendedServerBlobAuditingPolicy + from ._models_py3 import FailoverGroup + from ._models_py3 import FailoverGroupReadOnlyEndpoint + from ._models_py3 import FailoverGroupReadWriteEndpoint + from ._models_py3 import FailoverGroupUpdate + from ._models_py3 import FirewallRule + from ._models_py3 import GeoBackupPolicy + from ._models_py3 import ImportExportResponse + from ._models_py3 import ImportExtensionRequest + from ._models_py3 import ImportRequest + from ._models_py3 import InstanceFailoverGroup + from ._models_py3 import InstanceFailoverGroupReadOnlyEndpoint + from ._models_py3 import InstanceFailoverGroupReadWriteEndpoint + from ._models_py3 import InstancePool + from ._models_py3 import InstancePoolUpdate + from ._models_py3 import Job + from ._models_py3 import JobAgent + from ._models_py3 import JobAgentUpdate + from ._models_py3 import JobCredential + from ._models_py3 import JobExecution + from ._models_py3 import JobExecutionTarget + from ._models_py3 import JobSchedule + from ._models_py3 import JobStep + from ._models_py3 import JobStepAction + from ._models_py3 import JobStepExecutionOptions + from ._models_py3 import JobStepOutput + from ._models_py3 import JobTarget + from ._models_py3 import JobTargetGroup + from ._models_py3 import JobVersion + from ._models_py3 import LicenseTypeCapability + from ._models_py3 import LocationCapabilities + from ._models_py3 import LogSizeCapability + from ._models_py3 import LongTermRetentionBackup + from ._models_py3 import ManagedBackupShortTermRetentionPolicy + from ._models_py3 import ManagedDatabase + from ._models_py3 import ManagedDatabaseSecurityAlertPolicy + from ._models_py3 import ManagedDatabaseUpdate + from ._models_py3 import ManagedInstance + from ._models_py3 import ManagedInstanceEditionCapability + from ._models_py3 import ManagedInstanceEncryptionProtector + from ._models_py3 import ManagedInstanceFamilyCapability + from ._models_py3 import ManagedInstanceKey + from ._models_py3 import ManagedInstancePairInfo + from ._models_py3 import ManagedInstanceUpdate + from ._models_py3 import ManagedInstanceVcoresCapability + from ._models_py3 import ManagedInstanceVersionCapability + from ._models_py3 import ManagedInstanceVulnerabilityAssessment + from ._models_py3 import ManagedServerSecurityAlertPolicy + from ._models_py3 import MaxSizeCapability + from ._models_py3 import MaxSizeRangeCapability + from ._models_py3 import Metric + from ._models_py3 import MetricAvailability + from ._models_py3 import MetricDefinition + from ._models_py3 import MetricName + from ._models_py3 import MetricValue + from ._models_py3 import Name + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationImpact + from ._models_py3 import PartnerInfo + from ._models_py3 import PartnerRegionInfo + from ._models_py3 import PerformanceLevelCapability + from ._models_py3 import ProxyResource + from ._models_py3 import RecommendedElasticPool + from ._models_py3 import RecommendedElasticPoolMetric + from ._models_py3 import RecommendedIndex + from ._models_py3 import RecoverableDatabase + from ._models_py3 import RecoverableManagedDatabase + from ._models_py3 import ReplicationLink + from ._models_py3 import Resource + from ._models_py3 import ResourceIdentity + from ._models_py3 import ResourceMoveDefinition + from ._models_py3 import RestorableDroppedDatabase + from ._models_py3 import RestorableDroppedManagedDatabase + from ._models_py3 import RestorePoint + from ._models_py3 import SensitivityLabel + from ._models_py3 import Server + from ._models_py3 import ServerAutomaticTuning + from ._models_py3 import ServerAzureADAdministrator + from ._models_py3 import ServerBlobAuditingPolicy + from ._models_py3 import ServerCommunicationLink + from ._models_py3 import ServerConnectionPolicy + from ._models_py3 import ServerDnsAlias + from ._models_py3 import ServerDnsAliasAcquisition + from ._models_py3 import ServerKey + from ._models_py3 import ServerSecurityAlertPolicy + from ._models_py3 import ServerUpdate + from ._models_py3 import ServerUsage + from ._models_py3 import ServerVersionCapability + from ._models_py3 import ServerVulnerabilityAssessment + from ._models_py3 import ServiceObjective + from ._models_py3 import ServiceObjectiveCapability + from ._models_py3 import ServiceTierAdvisor + from ._models_py3 import Sku + from ._models_py3 import SloUsageMetric + from ._models_py3 import SubscriptionUsage + from ._models_py3 import SyncAgent + from ._models_py3 import SyncAgentKeyProperties + from ._models_py3 import SyncAgentLinkedDatabase + from ._models_py3 import SyncDatabaseIdProperties + from ._models_py3 import SyncFullSchemaProperties + from ._models_py3 import SyncFullSchemaTable + from ._models_py3 import SyncFullSchemaTableColumn + from ._models_py3 import SyncGroup + from ._models_py3 import SyncGroupLogProperties + from ._models_py3 import SyncGroupSchema + from ._models_py3 import SyncGroupSchemaTable + from ._models_py3 import SyncGroupSchemaTableColumn + from ._models_py3 import SyncMember + from ._models_py3 import TdeCertificate + from ._models_py3 import TrackedResource + from ._models_py3 import TransparentDataEncryption + from ._models_py3 import TransparentDataEncryptionActivity + from ._models_py3 import Usage + from ._models_py3 import VirtualCluster + from ._models_py3 import VirtualClusterUpdate + from ._models_py3 import VirtualNetworkRule + from ._models_py3 import VulnerabilityAssessmentRecurringScansProperties + from ._models_py3 import VulnerabilityAssessmentScanError + from ._models_py3 import VulnerabilityAssessmentScanRecord except (SyntaxError, ImportError): - from .recoverable_database import RecoverableDatabase - from .restorable_dropped_database import RestorableDroppedDatabase - from .tracked_resource import TrackedResource - from .resource import Resource - from .proxy_resource import ProxyResource - from .check_name_availability_request import CheckNameAvailabilityRequest - from .check_name_availability_response import CheckNameAvailabilityResponse - from .server_connection_policy import ServerConnectionPolicy - from .database_security_alert_policy import DatabaseSecurityAlertPolicy - from .data_masking_policy import DataMaskingPolicy - from .data_masking_rule import DataMaskingRule - from .firewall_rule import FirewallRule - from .geo_backup_policy import GeoBackupPolicy - from .import_extension_request import ImportExtensionRequest - from .import_export_response import ImportExportResponse - from .import_request import ImportRequest - from .export_request import ExportRequest - from .metric_value import MetricValue - from .metric_name import MetricName - from .metric import Metric - from .metric_availability import MetricAvailability - from .metric_definition import MetricDefinition - from .recommended_elastic_pool_metric import RecommendedElasticPoolMetric - from .recommended_elastic_pool import RecommendedElasticPool - from .replication_link import ReplicationLink - from .server_azure_ad_administrator import ServerAzureADAdministrator - from .server_communication_link import ServerCommunicationLink - from .service_objective import ServiceObjective - from .elastic_pool_activity import ElasticPoolActivity - from .elastic_pool_database_activity import ElasticPoolDatabaseActivity - from .operation_impact import OperationImpact - from .recommended_index import RecommendedIndex - from .transparent_data_encryption import TransparentDataEncryption - from .slo_usage_metric import SloUsageMetric - from .service_tier_advisor import ServiceTierAdvisor - from .transparent_data_encryption_activity import TransparentDataEncryptionActivity - from .server_usage import ServerUsage - from .database_usage import DatabaseUsage - from .automatic_tuning_options import AutomaticTuningOptions - from .database_automatic_tuning import DatabaseAutomaticTuning - from .encryption_protector import EncryptionProtector - from .failover_group_read_write_endpoint import FailoverGroupReadWriteEndpoint - from .failover_group_read_only_endpoint import FailoverGroupReadOnlyEndpoint - from .partner_info import PartnerInfo - from .failover_group import FailoverGroup - from .failover_group_update import FailoverGroupUpdate - from .resource_identity import ResourceIdentity - from .sku import Sku - from .managed_instance import ManagedInstance - from .managed_instance_update import ManagedInstanceUpdate - from .operation_display import OperationDisplay - from .operation import Operation - from .server_key import ServerKey - from .server import Server - from .server_update import ServerUpdate - from .sync_agent import SyncAgent - from .sync_agent_key_properties import SyncAgentKeyProperties - from .sync_agent_linked_database import SyncAgentLinkedDatabase - from .sync_database_id_properties import SyncDatabaseIdProperties - from .sync_full_schema_table_column import SyncFullSchemaTableColumn - from .sync_full_schema_table import SyncFullSchemaTable - from .sync_full_schema_properties import SyncFullSchemaProperties - from .sync_group_log_properties import SyncGroupLogProperties - from .sync_group_schema_table_column import SyncGroupSchemaTableColumn - from .sync_group_schema_table import SyncGroupSchemaTable - from .sync_group_schema import SyncGroupSchema - from .sync_group import SyncGroup - from .sync_member import SyncMember - from .subscription_usage import SubscriptionUsage - from .virtual_cluster import VirtualCluster - from .virtual_cluster_update import VirtualClusterUpdate - from .virtual_network_rule import VirtualNetworkRule - from .extended_database_blob_auditing_policy import ExtendedDatabaseBlobAuditingPolicy - from .extended_server_blob_auditing_policy import ExtendedServerBlobAuditingPolicy - from .server_blob_auditing_policy import ServerBlobAuditingPolicy - from .database_blob_auditing_policy import DatabaseBlobAuditingPolicy - from .database_vulnerability_assessment_rule_baseline_item import DatabaseVulnerabilityAssessmentRuleBaselineItem - from .database_vulnerability_assessment_rule_baseline import DatabaseVulnerabilityAssessmentRuleBaseline - from .vulnerability_assessment_recurring_scans_properties import VulnerabilityAssessmentRecurringScansProperties - from .database_vulnerability_assessment import DatabaseVulnerabilityAssessment - from .job_agent import JobAgent - from .job_agent_update import JobAgentUpdate - from .job_credential import JobCredential - from .job_execution_target import JobExecutionTarget - from .job_execution import JobExecution - from .job_schedule import JobSchedule - from .job import Job - from .job_step_action import JobStepAction - from .job_step_output import JobStepOutput - from .job_step_execution_options import JobStepExecutionOptions - from .job_step import JobStep - from .job_target import JobTarget - from .job_target_group import JobTargetGroup - from .job_version import JobVersion - from .long_term_retention_backup import LongTermRetentionBackup - from .backup_long_term_retention_policy import BackupLongTermRetentionPolicy - from .managed_backup_short_term_retention_policy import ManagedBackupShortTermRetentionPolicy - from .complete_database_restore_definition import CompleteDatabaseRestoreDefinition - from .managed_database import ManagedDatabase - from .managed_database_update import ManagedDatabaseUpdate - from .automatic_tuning_server_options import AutomaticTuningServerOptions - from .server_automatic_tuning import ServerAutomaticTuning - from .server_dns_alias import ServerDnsAlias - from .server_dns_alias_acquisition import ServerDnsAliasAcquisition - from .server_security_alert_policy import ServerSecurityAlertPolicy - from .restorable_dropped_managed_database import RestorableDroppedManagedDatabase - from .restore_point import RestorePoint - from .create_database_restore_point_definition import CreateDatabaseRestorePointDefinition - from .managed_database_security_alert_policy import ManagedDatabaseSecurityAlertPolicy - from .managed_server_security_alert_policy import ManagedServerSecurityAlertPolicy - from .sensitivity_label import SensitivityLabel - from .database_operation import DatabaseOperation - from .elastic_pool_operation import ElasticPoolOperation - from .max_size_capability import MaxSizeCapability - from .log_size_capability import LogSizeCapability - from .max_size_range_capability import MaxSizeRangeCapability - from .performance_level_capability import PerformanceLevelCapability - from .license_type_capability import LicenseTypeCapability - from .service_objective_capability import ServiceObjectiveCapability - from .edition_capability import EditionCapability - from .elastic_pool_per_database_min_performance_level_capability import ElasticPoolPerDatabaseMinPerformanceLevelCapability - from .elastic_pool_per_database_max_performance_level_capability import ElasticPoolPerDatabaseMaxPerformanceLevelCapability - from .elastic_pool_performance_level_capability import ElasticPoolPerformanceLevelCapability - from .elastic_pool_edition_capability import ElasticPoolEditionCapability - from .server_version_capability import ServerVersionCapability - from .managed_instance_vcores_capability import ManagedInstanceVcoresCapability - from .managed_instance_family_capability import ManagedInstanceFamilyCapability - from .managed_instance_edition_capability import ManagedInstanceEditionCapability - from .managed_instance_version_capability import ManagedInstanceVersionCapability - from .location_capabilities import LocationCapabilities - from .database import Database - from .database_update import DatabaseUpdate - from .resource_move_definition import ResourceMoveDefinition - from .elastic_pool_per_database_settings import ElasticPoolPerDatabaseSettings - from .elastic_pool import ElasticPool - from .elastic_pool_update import ElasticPoolUpdate - from .vulnerability_assessment_scan_error import VulnerabilityAssessmentScanError - from .vulnerability_assessment_scan_record import VulnerabilityAssessmentScanRecord - from .database_vulnerability_assessment_scans_export import DatabaseVulnerabilityAssessmentScansExport - from .instance_failover_group_read_write_endpoint import InstanceFailoverGroupReadWriteEndpoint - from .instance_failover_group_read_only_endpoint import InstanceFailoverGroupReadOnlyEndpoint - from .partner_region_info import PartnerRegionInfo - from .managed_instance_pair_info import ManagedInstancePairInfo - from .instance_failover_group import InstanceFailoverGroup - from .backup_short_term_retention_policy import BackupShortTermRetentionPolicy - from .tde_certificate import TdeCertificate - from .managed_instance_key import ManagedInstanceKey - from .managed_instance_encryption_protector import ManagedInstanceEncryptionProtector - from .recoverable_managed_database import RecoverableManagedDatabase - from .managed_instance_vulnerability_assessment import ManagedInstanceVulnerabilityAssessment - from .server_vulnerability_assessment import ServerVulnerabilityAssessment -from .recoverable_database_paged import RecoverableDatabasePaged -from .restorable_dropped_database_paged import RestorableDroppedDatabasePaged -from .server_paged import ServerPaged -from .data_masking_rule_paged import DataMaskingRulePaged -from .firewall_rule_paged import FirewallRulePaged -from .geo_backup_policy_paged import GeoBackupPolicyPaged -from .metric_paged import MetricPaged -from .metric_definition_paged import MetricDefinitionPaged -from .database_paged import DatabasePaged -from .elastic_pool_paged import ElasticPoolPaged -from .recommended_elastic_pool_paged import RecommendedElasticPoolPaged -from .recommended_elastic_pool_metric_paged import RecommendedElasticPoolMetricPaged -from .replication_link_paged import ReplicationLinkPaged -from .server_azure_ad_administrator_paged import ServerAzureADAdministratorPaged -from .server_communication_link_paged import ServerCommunicationLinkPaged -from .service_objective_paged import ServiceObjectivePaged -from .elastic_pool_activity_paged import ElasticPoolActivityPaged -from .elastic_pool_database_activity_paged import ElasticPoolDatabaseActivityPaged -from .service_tier_advisor_paged import ServiceTierAdvisorPaged -from .transparent_data_encryption_activity_paged import TransparentDataEncryptionActivityPaged -from .server_usage_paged import ServerUsagePaged -from .database_usage_paged import DatabaseUsagePaged -from .encryption_protector_paged import EncryptionProtectorPaged -from .failover_group_paged import FailoverGroupPaged -from .managed_instance_paged import ManagedInstancePaged -from .operation_paged import OperationPaged -from .server_key_paged import ServerKeyPaged -from .sync_agent_paged import SyncAgentPaged -from .sync_agent_linked_database_paged import SyncAgentLinkedDatabasePaged -from .sync_database_id_properties_paged import SyncDatabaseIdPropertiesPaged -from .sync_full_schema_properties_paged import SyncFullSchemaPropertiesPaged -from .sync_group_log_properties_paged import SyncGroupLogPropertiesPaged -from .sync_group_paged import SyncGroupPaged -from .sync_member_paged import SyncMemberPaged -from .subscription_usage_paged import SubscriptionUsagePaged -from .virtual_cluster_paged import VirtualClusterPaged -from .virtual_network_rule_paged import VirtualNetworkRulePaged -from .database_vulnerability_assessment_paged import DatabaseVulnerabilityAssessmentPaged -from .job_agent_paged import JobAgentPaged -from .job_credential_paged import JobCredentialPaged -from .job_execution_paged import JobExecutionPaged -from .job_paged import JobPaged -from .job_step_paged import JobStepPaged -from .job_target_group_paged import JobTargetGroupPaged -from .job_version_paged import JobVersionPaged -from .long_term_retention_backup_paged import LongTermRetentionBackupPaged -from .managed_backup_short_term_retention_policy_paged import ManagedBackupShortTermRetentionPolicyPaged -from .managed_database_paged import ManagedDatabasePaged -from .server_dns_alias_paged import ServerDnsAliasPaged -from .server_security_alert_policy_paged import ServerSecurityAlertPolicyPaged -from .restorable_dropped_managed_database_paged import RestorableDroppedManagedDatabasePaged -from .restore_point_paged import RestorePointPaged -from .managed_database_security_alert_policy_paged import ManagedDatabaseSecurityAlertPolicyPaged -from .managed_server_security_alert_policy_paged import ManagedServerSecurityAlertPolicyPaged -from .sensitivity_label_paged import SensitivityLabelPaged -from .database_operation_paged import DatabaseOperationPaged -from .elastic_pool_operation_paged import ElasticPoolOperationPaged -from .vulnerability_assessment_scan_record_paged import VulnerabilityAssessmentScanRecordPaged -from .instance_failover_group_paged import InstanceFailoverGroupPaged -from .backup_short_term_retention_policy_paged import BackupShortTermRetentionPolicyPaged -from .managed_instance_key_paged import ManagedInstanceKeyPaged -from .managed_instance_encryption_protector_paged import ManagedInstanceEncryptionProtectorPaged -from .recoverable_managed_database_paged import RecoverableManagedDatabasePaged -from .managed_instance_vulnerability_assessment_paged import ManagedInstanceVulnerabilityAssessmentPaged -from .server_vulnerability_assessment_paged import ServerVulnerabilityAssessmentPaged -from .sql_management_client_enums import ( + from ._models import AutomaticTuningOptions + from ._models import AutomaticTuningServerOptions + from ._models import BackupLongTermRetentionPolicy + from ._models import BackupShortTermRetentionPolicy + from ._models import CheckNameAvailabilityRequest + from ._models import CheckNameAvailabilityResponse + from ._models import CompleteDatabaseRestoreDefinition + from ._models import CreateDatabaseRestorePointDefinition + from ._models import Database + from ._models import DatabaseAutomaticTuning + from ._models import DatabaseBlobAuditingPolicy + from ._models import DatabaseOperation + from ._models import DatabaseSecurityAlertPolicy + from ._models import DatabaseUpdate + from ._models import DatabaseUsage + from ._models import DatabaseVulnerabilityAssessment + from ._models import DatabaseVulnerabilityAssessmentRuleBaseline + from ._models import DatabaseVulnerabilityAssessmentRuleBaselineItem + from ._models import DatabaseVulnerabilityAssessmentScansExport + from ._models import DataMaskingPolicy + from ._models import DataMaskingRule + from ._models import EditionCapability + from ._models import ElasticPool + from ._models import ElasticPoolActivity + from ._models import ElasticPoolDatabaseActivity + from ._models import ElasticPoolEditionCapability + from ._models import ElasticPoolOperation + from ._models import ElasticPoolPerDatabaseMaxPerformanceLevelCapability + from ._models import ElasticPoolPerDatabaseMinPerformanceLevelCapability + from ._models import ElasticPoolPerDatabaseSettings + from ._models import ElasticPoolPerformanceLevelCapability + from ._models import ElasticPoolUpdate + from ._models import EncryptionProtector + from ._models import ExportRequest + from ._models import ExtendedDatabaseBlobAuditingPolicy + from ._models import ExtendedServerBlobAuditingPolicy + from ._models import FailoverGroup + from ._models import FailoverGroupReadOnlyEndpoint + from ._models import FailoverGroupReadWriteEndpoint + from ._models import FailoverGroupUpdate + from ._models import FirewallRule + from ._models import GeoBackupPolicy + from ._models import ImportExportResponse + from ._models import ImportExtensionRequest + from ._models import ImportRequest + from ._models import InstanceFailoverGroup + from ._models import InstanceFailoverGroupReadOnlyEndpoint + from ._models import InstanceFailoverGroupReadWriteEndpoint + from ._models import InstancePool + from ._models import InstancePoolUpdate + from ._models import Job + from ._models import JobAgent + from ._models import JobAgentUpdate + from ._models import JobCredential + from ._models import JobExecution + from ._models import JobExecutionTarget + from ._models import JobSchedule + from ._models import JobStep + from ._models import JobStepAction + from ._models import JobStepExecutionOptions + from ._models import JobStepOutput + from ._models import JobTarget + from ._models import JobTargetGroup + from ._models import JobVersion + from ._models import LicenseTypeCapability + from ._models import LocationCapabilities + from ._models import LogSizeCapability + from ._models import LongTermRetentionBackup + from ._models import ManagedBackupShortTermRetentionPolicy + from ._models import ManagedDatabase + from ._models import ManagedDatabaseSecurityAlertPolicy + from ._models import ManagedDatabaseUpdate + from ._models import ManagedInstance + from ._models import ManagedInstanceEditionCapability + from ._models import ManagedInstanceEncryptionProtector + from ._models import ManagedInstanceFamilyCapability + from ._models import ManagedInstanceKey + from ._models import ManagedInstancePairInfo + from ._models import ManagedInstanceUpdate + from ._models import ManagedInstanceVcoresCapability + from ._models import ManagedInstanceVersionCapability + from ._models import ManagedInstanceVulnerabilityAssessment + from ._models import ManagedServerSecurityAlertPolicy + from ._models import MaxSizeCapability + from ._models import MaxSizeRangeCapability + from ._models import Metric + from ._models import MetricAvailability + from ._models import MetricDefinition + from ._models import MetricName + from ._models import MetricValue + from ._models import Name + from ._models import Operation + from ._models import OperationDisplay + from ._models import OperationImpact + from ._models import PartnerInfo + from ._models import PartnerRegionInfo + from ._models import PerformanceLevelCapability + from ._models import ProxyResource + from ._models import RecommendedElasticPool + from ._models import RecommendedElasticPoolMetric + from ._models import RecommendedIndex + from ._models import RecoverableDatabase + from ._models import RecoverableManagedDatabase + from ._models import ReplicationLink + from ._models import Resource + from ._models import ResourceIdentity + from ._models import ResourceMoveDefinition + from ._models import RestorableDroppedDatabase + from ._models import RestorableDroppedManagedDatabase + from ._models import RestorePoint + from ._models import SensitivityLabel + from ._models import Server + from ._models import ServerAutomaticTuning + from ._models import ServerAzureADAdministrator + from ._models import ServerBlobAuditingPolicy + from ._models import ServerCommunicationLink + from ._models import ServerConnectionPolicy + from ._models import ServerDnsAlias + from ._models import ServerDnsAliasAcquisition + from ._models import ServerKey + from ._models import ServerSecurityAlertPolicy + from ._models import ServerUpdate + from ._models import ServerUsage + from ._models import ServerVersionCapability + from ._models import ServerVulnerabilityAssessment + from ._models import ServiceObjective + from ._models import ServiceObjectiveCapability + from ._models import ServiceTierAdvisor + from ._models import Sku + from ._models import SloUsageMetric + from ._models import SubscriptionUsage + from ._models import SyncAgent + from ._models import SyncAgentKeyProperties + from ._models import SyncAgentLinkedDatabase + from ._models import SyncDatabaseIdProperties + from ._models import SyncFullSchemaProperties + from ._models import SyncFullSchemaTable + from ._models import SyncFullSchemaTableColumn + from ._models import SyncGroup + from ._models import SyncGroupLogProperties + from ._models import SyncGroupSchema + from ._models import SyncGroupSchemaTable + from ._models import SyncGroupSchemaTableColumn + from ._models import SyncMember + from ._models import TdeCertificate + from ._models import TrackedResource + from ._models import TransparentDataEncryption + from ._models import TransparentDataEncryptionActivity + from ._models import Usage + from ._models import VirtualCluster + from ._models import VirtualClusterUpdate + from ._models import VirtualNetworkRule + from ._models import VulnerabilityAssessmentRecurringScansProperties + from ._models import VulnerabilityAssessmentScanError + from ._models import VulnerabilityAssessmentScanRecord +from ._paged_models import BackupShortTermRetentionPolicyPaged +from ._paged_models import DatabaseOperationPaged +from ._paged_models import DatabasePaged +from ._paged_models import DatabaseUsagePaged +from ._paged_models import DatabaseVulnerabilityAssessmentPaged +from ._paged_models import DataMaskingRulePaged +from ._paged_models import ElasticPoolActivityPaged +from ._paged_models import ElasticPoolDatabaseActivityPaged +from ._paged_models import ElasticPoolOperationPaged +from ._paged_models import ElasticPoolPaged +from ._paged_models import EncryptionProtectorPaged +from ._paged_models import FailoverGroupPaged +from ._paged_models import FirewallRulePaged +from ._paged_models import GeoBackupPolicyPaged +from ._paged_models import InstanceFailoverGroupPaged +from ._paged_models import InstancePoolPaged +from ._paged_models import JobAgentPaged +from ._paged_models import JobCredentialPaged +from ._paged_models import JobExecutionPaged +from ._paged_models import JobPaged +from ._paged_models import JobStepPaged +from ._paged_models import JobTargetGroupPaged +from ._paged_models import JobVersionPaged +from ._paged_models import LongTermRetentionBackupPaged +from ._paged_models import ManagedBackupShortTermRetentionPolicyPaged +from ._paged_models import ManagedDatabasePaged +from ._paged_models import ManagedDatabaseSecurityAlertPolicyPaged +from ._paged_models import ManagedInstanceEncryptionProtectorPaged +from ._paged_models import ManagedInstanceKeyPaged +from ._paged_models import ManagedInstancePaged +from ._paged_models import ManagedInstanceVulnerabilityAssessmentPaged +from ._paged_models import ManagedServerSecurityAlertPolicyPaged +from ._paged_models import MetricDefinitionPaged +from ._paged_models import MetricPaged +from ._paged_models import OperationPaged +from ._paged_models import RecommendedElasticPoolMetricPaged +from ._paged_models import RecommendedElasticPoolPaged +from ._paged_models import RecoverableDatabasePaged +from ._paged_models import RecoverableManagedDatabasePaged +from ._paged_models import ReplicationLinkPaged +from ._paged_models import RestorableDroppedDatabasePaged +from ._paged_models import RestorableDroppedManagedDatabasePaged +from ._paged_models import RestorePointPaged +from ._paged_models import SensitivityLabelPaged +from ._paged_models import ServerAzureADAdministratorPaged +from ._paged_models import ServerCommunicationLinkPaged +from ._paged_models import ServerDnsAliasPaged +from ._paged_models import ServerKeyPaged +from ._paged_models import ServerPaged +from ._paged_models import ServerSecurityAlertPolicyPaged +from ._paged_models import ServerUsagePaged +from ._paged_models import ServerVulnerabilityAssessmentPaged +from ._paged_models import ServiceObjectivePaged +from ._paged_models import ServiceTierAdvisorPaged +from ._paged_models import SubscriptionUsagePaged +from ._paged_models import SyncAgentLinkedDatabasePaged +from ._paged_models import SyncAgentPaged +from ._paged_models import SyncDatabaseIdPropertiesPaged +from ._paged_models import SyncFullSchemaPropertiesPaged +from ._paged_models import SyncGroupLogPropertiesPaged +from ._paged_models import SyncGroupPaged +from ._paged_models import SyncMemberPaged +from ._paged_models import TransparentDataEncryptionActivityPaged +from ._paged_models import UsagePaged +from ._paged_models import VirtualClusterPaged +from ._paged_models import VirtualNetworkRulePaged +from ._paged_models import VulnerabilityAssessmentScanRecordPaged +from ._sql_management_client_enums import ( CheckNameAvailabilityReason, ServerConnectionType, SecurityAlertPolicyState, @@ -411,9 +421,8 @@ ReadWriteEndpointFailoverPolicy, ReadOnlyEndpointFailoverPolicy, FailoverGroupReplicationRole, - IdentityType, - ManagedInstanceProxyOverride, OperationOrigin, + IdentityType, SyncAgentState, SyncMemberDbType, SyncGroupLogType, @@ -453,6 +462,10 @@ VulnerabilityAssessmentScanTriggerType, VulnerabilityAssessmentScanState, InstanceFailoverGroupReplicationRole, + InstancePoolLicenseType, + ManagedServerCreateMode, + ManagedInstanceLicenseType, + ManagedInstanceProxyOverride, LongTermRetentionDatabaseState, VulnerabilityAssessmentPolicyBaselineName, SensitivityLabelSource, @@ -460,157 +473,161 @@ ) __all__ = [ - 'RecoverableDatabase', - 'RestorableDroppedDatabase', - 'TrackedResource', - 'Resource', - 'ProxyResource', + 'AutomaticTuningOptions', + 'AutomaticTuningServerOptions', + 'BackupLongTermRetentionPolicy', + 'BackupShortTermRetentionPolicy', 'CheckNameAvailabilityRequest', 'CheckNameAvailabilityResponse', - 'ServerConnectionPolicy', + 'CompleteDatabaseRestoreDefinition', + 'CreateDatabaseRestorePointDefinition', + 'Database', + 'DatabaseAutomaticTuning', + 'DatabaseBlobAuditingPolicy', + 'DatabaseOperation', 'DatabaseSecurityAlertPolicy', + 'DatabaseUpdate', + 'DatabaseUsage', + 'DatabaseVulnerabilityAssessment', + 'DatabaseVulnerabilityAssessmentRuleBaseline', + 'DatabaseVulnerabilityAssessmentRuleBaselineItem', + 'DatabaseVulnerabilityAssessmentScansExport', 'DataMaskingPolicy', 'DataMaskingRule', + 'EditionCapability', + 'ElasticPool', + 'ElasticPoolActivity', + 'ElasticPoolDatabaseActivity', + 'ElasticPoolEditionCapability', + 'ElasticPoolOperation', + 'ElasticPoolPerDatabaseMaxPerformanceLevelCapability', + 'ElasticPoolPerDatabaseMinPerformanceLevelCapability', + 'ElasticPoolPerDatabaseSettings', + 'ElasticPoolPerformanceLevelCapability', + 'ElasticPoolUpdate', + 'EncryptionProtector', + 'ExportRequest', + 'ExtendedDatabaseBlobAuditingPolicy', + 'ExtendedServerBlobAuditingPolicy', + 'FailoverGroup', + 'FailoverGroupReadOnlyEndpoint', + 'FailoverGroupReadWriteEndpoint', + 'FailoverGroupUpdate', 'FirewallRule', 'GeoBackupPolicy', - 'ImportExtensionRequest', 'ImportExportResponse', + 'ImportExtensionRequest', 'ImportRequest', - 'ExportRequest', - 'MetricValue', - 'MetricName', + 'InstanceFailoverGroup', + 'InstanceFailoverGroupReadOnlyEndpoint', + 'InstanceFailoverGroupReadWriteEndpoint', + 'InstancePool', + 'InstancePoolUpdate', + 'Job', + 'JobAgent', + 'JobAgentUpdate', + 'JobCredential', + 'JobExecution', + 'JobExecutionTarget', + 'JobSchedule', + 'JobStep', + 'JobStepAction', + 'JobStepExecutionOptions', + 'JobStepOutput', + 'JobTarget', + 'JobTargetGroup', + 'JobVersion', + 'LicenseTypeCapability', + 'LocationCapabilities', + 'LogSizeCapability', + 'LongTermRetentionBackup', + 'ManagedBackupShortTermRetentionPolicy', + 'ManagedDatabase', + 'ManagedDatabaseSecurityAlertPolicy', + 'ManagedDatabaseUpdate', + 'ManagedInstance', + 'ManagedInstanceEditionCapability', + 'ManagedInstanceEncryptionProtector', + 'ManagedInstanceFamilyCapability', + 'ManagedInstanceKey', + 'ManagedInstancePairInfo', + 'ManagedInstanceUpdate', + 'ManagedInstanceVcoresCapability', + 'ManagedInstanceVersionCapability', + 'ManagedInstanceVulnerabilityAssessment', + 'ManagedServerSecurityAlertPolicy', + 'MaxSizeCapability', + 'MaxSizeRangeCapability', 'Metric', 'MetricAvailability', 'MetricDefinition', - 'RecommendedElasticPoolMetric', + 'MetricName', + 'MetricValue', + 'Name', + 'Operation', + 'OperationDisplay', + 'OperationImpact', + 'PartnerInfo', + 'PartnerRegionInfo', + 'PerformanceLevelCapability', + 'ProxyResource', 'RecommendedElasticPool', + 'RecommendedElasticPoolMetric', + 'RecommendedIndex', + 'RecoverableDatabase', + 'RecoverableManagedDatabase', 'ReplicationLink', + 'Resource', + 'ResourceIdentity', + 'ResourceMoveDefinition', + 'RestorableDroppedDatabase', + 'RestorableDroppedManagedDatabase', + 'RestorePoint', + 'SensitivityLabel', + 'Server', + 'ServerAutomaticTuning', 'ServerAzureADAdministrator', + 'ServerBlobAuditingPolicy', 'ServerCommunicationLink', + 'ServerConnectionPolicy', + 'ServerDnsAlias', + 'ServerDnsAliasAcquisition', + 'ServerKey', + 'ServerSecurityAlertPolicy', + 'ServerUpdate', + 'ServerUsage', + 'ServerVersionCapability', + 'ServerVulnerabilityAssessment', 'ServiceObjective', - 'ElasticPoolActivity', - 'ElasticPoolDatabaseActivity', - 'OperationImpact', - 'RecommendedIndex', - 'TransparentDataEncryption', - 'SloUsageMetric', + 'ServiceObjectiveCapability', 'ServiceTierAdvisor', - 'TransparentDataEncryptionActivity', - 'ServerUsage', - 'DatabaseUsage', - 'AutomaticTuningOptions', - 'DatabaseAutomaticTuning', - 'EncryptionProtector', - 'FailoverGroupReadWriteEndpoint', - 'FailoverGroupReadOnlyEndpoint', - 'PartnerInfo', - 'FailoverGroup', - 'FailoverGroupUpdate', - 'ResourceIdentity', 'Sku', - 'ManagedInstance', - 'ManagedInstanceUpdate', - 'OperationDisplay', - 'Operation', - 'ServerKey', - 'Server', - 'ServerUpdate', + 'SloUsageMetric', + 'SubscriptionUsage', 'SyncAgent', 'SyncAgentKeyProperties', 'SyncAgentLinkedDatabase', 'SyncDatabaseIdProperties', - 'SyncFullSchemaTableColumn', - 'SyncFullSchemaTable', 'SyncFullSchemaProperties', + 'SyncFullSchemaTable', + 'SyncFullSchemaTableColumn', + 'SyncGroup', 'SyncGroupLogProperties', - 'SyncGroupSchemaTableColumn', - 'SyncGroupSchemaTable', 'SyncGroupSchema', - 'SyncGroup', + 'SyncGroupSchemaTable', + 'SyncGroupSchemaTableColumn', 'SyncMember', - 'SubscriptionUsage', + 'TdeCertificate', + 'TrackedResource', + 'TransparentDataEncryption', + 'TransparentDataEncryptionActivity', + 'Usage', 'VirtualCluster', 'VirtualClusterUpdate', 'VirtualNetworkRule', - 'ExtendedDatabaseBlobAuditingPolicy', - 'ExtendedServerBlobAuditingPolicy', - 'ServerBlobAuditingPolicy', - 'DatabaseBlobAuditingPolicy', - 'DatabaseVulnerabilityAssessmentRuleBaselineItem', - 'DatabaseVulnerabilityAssessmentRuleBaseline', 'VulnerabilityAssessmentRecurringScansProperties', - 'DatabaseVulnerabilityAssessment', - 'JobAgent', - 'JobAgentUpdate', - 'JobCredential', - 'JobExecutionTarget', - 'JobExecution', - 'JobSchedule', - 'Job', - 'JobStepAction', - 'JobStepOutput', - 'JobStepExecutionOptions', - 'JobStep', - 'JobTarget', - 'JobTargetGroup', - 'JobVersion', - 'LongTermRetentionBackup', - 'BackupLongTermRetentionPolicy', - 'ManagedBackupShortTermRetentionPolicy', - 'CompleteDatabaseRestoreDefinition', - 'ManagedDatabase', - 'ManagedDatabaseUpdate', - 'AutomaticTuningServerOptions', - 'ServerAutomaticTuning', - 'ServerDnsAlias', - 'ServerDnsAliasAcquisition', - 'ServerSecurityAlertPolicy', - 'RestorableDroppedManagedDatabase', - 'RestorePoint', - 'CreateDatabaseRestorePointDefinition', - 'ManagedDatabaseSecurityAlertPolicy', - 'ManagedServerSecurityAlertPolicy', - 'SensitivityLabel', - 'DatabaseOperation', - 'ElasticPoolOperation', - 'MaxSizeCapability', - 'LogSizeCapability', - 'MaxSizeRangeCapability', - 'PerformanceLevelCapability', - 'LicenseTypeCapability', - 'ServiceObjectiveCapability', - 'EditionCapability', - 'ElasticPoolPerDatabaseMinPerformanceLevelCapability', - 'ElasticPoolPerDatabaseMaxPerformanceLevelCapability', - 'ElasticPoolPerformanceLevelCapability', - 'ElasticPoolEditionCapability', - 'ServerVersionCapability', - 'ManagedInstanceVcoresCapability', - 'ManagedInstanceFamilyCapability', - 'ManagedInstanceEditionCapability', - 'ManagedInstanceVersionCapability', - 'LocationCapabilities', - 'Database', - 'DatabaseUpdate', - 'ResourceMoveDefinition', - 'ElasticPoolPerDatabaseSettings', - 'ElasticPool', - 'ElasticPoolUpdate', 'VulnerabilityAssessmentScanError', 'VulnerabilityAssessmentScanRecord', - 'DatabaseVulnerabilityAssessmentScansExport', - 'InstanceFailoverGroupReadWriteEndpoint', - 'InstanceFailoverGroupReadOnlyEndpoint', - 'PartnerRegionInfo', - 'ManagedInstancePairInfo', - 'InstanceFailoverGroup', - 'BackupShortTermRetentionPolicy', - 'TdeCertificate', - 'ManagedInstanceKey', - 'ManagedInstanceEncryptionProtector', - 'RecoverableManagedDatabase', - 'ManagedInstanceVulnerabilityAssessment', - 'ServerVulnerabilityAssessment', 'RecoverableDatabasePaged', 'RestorableDroppedDatabasePaged', 'ServerPaged', @@ -635,7 +652,6 @@ 'DatabaseUsagePaged', 'EncryptionProtectorPaged', 'FailoverGroupPaged', - 'ManagedInstancePaged', 'OperationPaged', 'ServerKeyPaged', 'SyncAgentPaged', @@ -676,6 +692,9 @@ 'RecoverableManagedDatabasePaged', 'ManagedInstanceVulnerabilityAssessmentPaged', 'ServerVulnerabilityAssessmentPaged', + 'InstancePoolPaged', + 'UsagePaged', + 'ManagedInstancePaged', 'CheckNameAvailabilityReason', 'ServerConnectionType', 'SecurityAlertPolicyState', @@ -708,9 +727,8 @@ 'ReadWriteEndpointFailoverPolicy', 'ReadOnlyEndpointFailoverPolicy', 'FailoverGroupReplicationRole', - 'IdentityType', - 'ManagedInstanceProxyOverride', 'OperationOrigin', + 'IdentityType', 'SyncAgentState', 'SyncMemberDbType', 'SyncGroupLogType', @@ -750,6 +768,10 @@ 'VulnerabilityAssessmentScanTriggerType', 'VulnerabilityAssessmentScanState', 'InstanceFailoverGroupReplicationRole', + 'InstancePoolLicenseType', + 'ManagedServerCreateMode', + 'ManagedInstanceLicenseType', + 'ManagedInstanceProxyOverride', 'LongTermRetentionDatabaseState', 'VulnerabilityAssessmentPolicyBaselineName', 'SensitivityLabelSource', diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py new file mode 100644 index 000000000000..afc88d2be7ad --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py @@ -0,0 +1,8891 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AutomaticTuningOptions(Model): + """Automatic tuning properties for individual advisors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param desired_state: Automatic tuning option desired state. Possible + values include: 'Off', 'On', 'Default' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired + :ivar actual_state: Automatic tuning option actual state. Possible values + include: 'Off', 'On' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual + :ivar reason_code: Reason code if desired and actual state are different. + :vartype reason_code: int + :ivar reason_desc: Reason description if desired and actual state are + different. Possible values include: 'Default', 'Disabled', + 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', + 'QueryStoreReadOnly', 'NotSupported' + :vartype reason_desc: str or + ~azure.mgmt.sql.models.AutomaticTuningDisabledReason + """ + + _validation = { + 'actual_state': {'readonly': True}, + 'reason_code': {'readonly': True}, + 'reason_desc': {'readonly': True}, + } + + _attribute_map = { + 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, + 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, + 'reason_code': {'key': 'reasonCode', 'type': 'int'}, + 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningDisabledReason'}, + } + + def __init__(self, **kwargs): + super(AutomaticTuningOptions, self).__init__(**kwargs) + self.desired_state = kwargs.get('desired_state', None) + self.actual_state = None + self.reason_code = None + self.reason_desc = None + + +class AutomaticTuningServerOptions(Model): + """Automatic tuning properties for individual advisors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param desired_state: Automatic tuning option desired state. Possible + values include: 'Off', 'On', 'Default' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired + :ivar actual_state: Automatic tuning option actual state. Possible values + include: 'Off', 'On' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual + :ivar reason_code: Reason code if desired and actual state are different. + :vartype reason_code: int + :ivar reason_desc: Reason description if desired and actual state are + different. Possible values include: 'Default', 'Disabled', + 'AutoConfigured' + :vartype reason_desc: str or + ~azure.mgmt.sql.models.AutomaticTuningServerReason + """ + + _validation = { + 'actual_state': {'readonly': True}, + 'reason_code': {'readonly': True}, + 'reason_desc': {'readonly': True}, + } + + _attribute_map = { + 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, + 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, + 'reason_code': {'key': 'reasonCode', 'type': 'int'}, + 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningServerReason'}, + } + + def __init__(self, **kwargs): + super(AutomaticTuningServerOptions, self).__init__(**kwargs) + self.desired_state = kwargs.get('desired_state', None) + self.actual_state = None + self.reason_code = None + self.reason_desc = None + + +class Resource(Model): + """ARM resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ProxyResource(Resource): + """ARM proxy resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) + + +class BackupLongTermRetentionPolicy(ProxyResource): + """A long term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param weekly_retention: The weekly retention policy for an LTR backup in + an ISO 8601 format. + :type weekly_retention: str + :param monthly_retention: The monthly retention policy for an LTR backup + in an ISO 8601 format. + :type monthly_retention: str + :param yearly_retention: The yearly retention policy for an LTR backup in + an ISO 8601 format. + :type yearly_retention: str + :param week_of_year: The week of year to take the yearly backup in an ISO + 8601 format. + :type week_of_year: int + """ + + _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'}, + 'weekly_retention': {'key': 'properties.weeklyRetention', 'type': 'str'}, + 'monthly_retention': {'key': 'properties.monthlyRetention', 'type': 'str'}, + 'yearly_retention': {'key': 'properties.yearlyRetention', 'type': 'str'}, + 'week_of_year': {'key': 'properties.weekOfYear', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BackupLongTermRetentionPolicy, self).__init__(**kwargs) + self.weekly_retention = kwargs.get('weekly_retention', None) + self.monthly_retention = kwargs.get('monthly_retention', None) + self.yearly_retention = kwargs.get('yearly_retention', None) + self.week_of_year = kwargs.get('week_of_year', None) + + +class BackupShortTermRetentionPolicy(ProxyResource): + """A short term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param retention_days: The backup retention period in days. This is how + many days Point-in-Time Restore will be supported. + :type retention_days: int + """ + + _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'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) + self.retention_days = kwargs.get('retention_days', None) + + +class CheckNameAvailabilityRequest(Model): + """A request to check whether the specified name for a resource is available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name whose availability is to be checked. + :type name: str + :ivar type: Required. The type of resource that is used as the scope of + the availability check. Default value: "Microsoft.Sql/servers" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.Sql/servers" + + def __init__(self, **kwargs): + super(CheckNameAvailabilityRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class CheckNameAvailabilityResponse(Model): + """A response indicating whether the specified name for a resource is + available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar available: True if the name is available, otherwise false. + :vartype available: bool + :ivar message: A message explaining why the name is unavailable. Will be + null if the name is available. + :vartype message: str + :ivar name: The name whose availability was checked. + :vartype name: str + :ivar reason: The reason code explaining why the name is unavailable. Will + be null if the name is available. Possible values include: 'Invalid', + 'AlreadyExists' + :vartype reason: str or ~azure.mgmt.sql.models.CheckNameAvailabilityReason + """ + + _validation = { + 'available': {'readonly': True}, + 'message': {'readonly': True}, + 'name': {'readonly': True}, + 'reason': {'readonly': True}, + } + + _attribute_map = { + 'available': {'key': 'available', 'type': 'bool'}, + 'message': {'key': 'message', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'CheckNameAvailabilityReason'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailabilityResponse, self).__init__(**kwargs) + self.available = None + self.message = None + self.name = None + self.reason = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class CompleteDatabaseRestoreDefinition(Model): + """Contains the information necessary to perform a complete database restore + operation. + + All required parameters must be populated in order to send to Azure. + + :param last_backup_name: Required. The last backup name to apply + :type last_backup_name: str + """ + + _validation = { + 'last_backup_name': {'required': True}, + } + + _attribute_map = { + 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CompleteDatabaseRestoreDefinition, self).__init__(**kwargs) + self.last_backup_name = kwargs.get('last_backup_name', None) + + +class CreateDatabaseRestorePointDefinition(Model): + """Contains the information necessary to perform a create database restore + point operation. + + All required parameters must be populated in order to send to Azure. + + :param restore_point_label: Required. The restore point label to apply + :type restore_point_label: str + """ + + _validation = { + 'restore_point_label': {'required': True}, + } + + _attribute_map = { + 'restore_point_label': {'key': 'restorePointLabel', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CreateDatabaseRestorePointDefinition, self).__init__(**kwargs) + self.restore_point_label = kwargs.get('restore_point_label', None) + + +class TrackedResource(Resource): + """ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class Database(TrackedResource): + """A database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The database SKU. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location + ```` + :type sku: ~azure.mgmt.sql.models.Sku + :ivar kind: Kind of database. This is metadata used for the Azure portal + experience. + :vartype kind: str + :ivar managed_by: Resource that manages the database. + :vartype managed_by: str + :param create_mode: Specifies the mode of database creation. + Default: regular database creation. + Copy: creates a database as a copy of an existing database. + sourceDatabaseId must be specified as the resource ID of the source + database. + Secondary: creates a database as a secondary replica of an existing + database. sourceDatabaseId must be specified as the resource ID of the + existing primary database. + PointInTimeRestore: Creates a database by restoring a point in time backup + of an existing database. sourceDatabaseId must be specified as the + resource ID of the existing database, and restorePointInTime must be + specified. + Recovery: Creates a database by restoring a geo-replicated backup. + sourceDatabaseId must be specified as the recoverable database resource ID + to restore. + Restore: Creates a database by restoring a backup of a deleted database. + sourceDatabaseId must be specified. If sourceDatabaseId is the database's + original resource ID, then sourceDatabaseDeletionDate must be specified. + Otherwise sourceDatabaseId must be the restorable dropped database + resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime + may also be specified to restore from an earlier point in time. + RestoreLongTermRetentionBackup: Creates a database by restoring from a + long term retention vault. recoveryServicesRecoveryPointResourceId must be + specified as the recovery point resource ID. + Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for + DataWarehouse edition. Possible values include: 'Default', 'Copy', + 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', + 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', + 'RestoreLongTermRetentionBackup', 'OnlineSecondary' + :type create_mode: str or ~azure.mgmt.sql.models.CreateMode + :param collation: The collation of the database. + :type collation: str + :param max_size_bytes: The max size of the database expressed in bytes. + :type max_size_bytes: long + :param sample_name: The name of the sample schema to apply when creating + this database. Possible values include: 'AdventureWorksLT', + 'WideWorldImportersStd', 'WideWorldImportersFull' + :type sample_name: str or ~azure.mgmt.sql.models.SampleName + :param elastic_pool_id: The resource identifier of the elastic pool + containing this database. + :type elastic_pool_id: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :ivar status: The status of the database. Possible values include: + 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', + 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', + 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', + 'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers', + 'OnlineChangingDwPerformanceTiers' + :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus + :ivar database_id: The ID of the database. + :vartype database_id: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar current_service_objective_name: The current service level objective + name of the database. + :vartype current_service_objective_name: str + :ivar requested_service_objective_name: The requested service level + objective name of the database. + :vartype requested_service_objective_name: str + :ivar default_secondary_location: The default secondary region for this + database. + :vartype default_secondary_location: str + :ivar failover_group_id: Failover Group resource identifier that this + database belongs to. + :vartype failover_group_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param source_database_deletion_date: Specifies the time that the database + was deleted. + :type source_database_deletion_date: datetime + :param recovery_services_recovery_point_id: The resource identifier of the + recovery point associated with create operation of this database. + :type recovery_services_recovery_point_id: str + :param long_term_retention_backup_resource_id: The resource identifier of + the long term retention backup associated with create operation of this + database. + :type long_term_retention_backup_resource_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param restorable_dropped_database_id: The resource identifier of the + restorable dropped database associated with create operation of this + database. + :type restorable_dropped_database_id: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param zone_redundant: Whether or not this database is zone redundant, + which means the replicas of this database will be spread across multiple + availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this database. Possible + values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType + :ivar max_log_size_bytes: The max log size for this database. + :vartype max_log_size_bytes: long + :ivar earliest_restore_date: This records the earliest start date and time + that restore is available for this database (ISO8601 format). + :vartype earliest_restore_date: datetime + :param read_scale: The state of read-only routing. If enabled, connections + that have application intent set to readonly in their connection string + may be routed to a readonly secondary replica in the same region. Possible + values include: 'Enabled', 'Disabled' + :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale + :ivar current_sku: The name and tier of the SKU. + :vartype current_sku: ~azure.mgmt.sql.models.Sku + :param auto_pause_delay: Time in minutes after which database is + automatically paused. A value of -1 means that automatic pause is disabled + :type auto_pause_delay: int + :param min_capacity: Minimal capacity that database will always have + allocated, if not paused + :type min_capacity: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'managed_by': {'readonly': True}, + 'status': {'readonly': True}, + 'database_id': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'current_service_objective_name': {'readonly': True}, + 'requested_service_objective_name': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + 'max_log_size_bytes': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'current_sku': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, + 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, + 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, + 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, + 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, + 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, + 'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'}, + 'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(Database, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.kind = None + self.managed_by = None + self.create_mode = kwargs.get('create_mode', None) + self.collation = kwargs.get('collation', None) + self.max_size_bytes = kwargs.get('max_size_bytes', None) + self.sample_name = kwargs.get('sample_name', None) + self.elastic_pool_id = kwargs.get('elastic_pool_id', None) + self.source_database_id = kwargs.get('source_database_id', None) + self.status = None + self.database_id = None + self.creation_date = None + self.current_service_objective_name = None + self.requested_service_objective_name = None + self.default_secondary_location = None + self.failover_group_id = None + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.source_database_deletion_date = kwargs.get('source_database_deletion_date', None) + self.recovery_services_recovery_point_id = kwargs.get('recovery_services_recovery_point_id', None) + self.long_term_retention_backup_resource_id = kwargs.get('long_term_retention_backup_resource_id', None) + self.recoverable_database_id = kwargs.get('recoverable_database_id', None) + self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) + self.catalog_collation = kwargs.get('catalog_collation', None) + self.zone_redundant = kwargs.get('zone_redundant', None) + self.license_type = kwargs.get('license_type', None) + self.max_log_size_bytes = None + self.earliest_restore_date = None + self.read_scale = kwargs.get('read_scale', None) + self.current_sku = None + self.auto_pause_delay = kwargs.get('auto_pause_delay', None) + self.min_capacity = kwargs.get('min_capacity', None) + + +class DatabaseAutomaticTuning(ProxyResource): + """Database-level Automatic Tuning. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param desired_state: Automatic tuning desired state. Possible values + include: 'Inherit', 'Custom', 'Auto', 'Unspecified' + :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode + :ivar actual_state: Automatic tuning actual state. Possible values + include: 'Inherit', 'Custom', 'Auto', 'Unspecified' + :vartype actual_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode + :param options: Automatic tuning options definition. + :type options: dict[str, ~azure.mgmt.sql.models.AutomaticTuningOptions] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'actual_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningMode'}, + 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningMode'}, + 'options': {'key': 'properties.options', 'type': '{AutomaticTuningOptions}'}, + } + + def __init__(self, **kwargs): + super(DatabaseAutomaticTuning, self).__init__(**kwargs) + self.desired_state = kwargs.get('desired_state', None) + self.actual_state = None + self.options = kwargs.get('options', None) + + +class DatabaseBlobAuditingPolicy(ProxyResource): + """A database blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Resource kind. + :vartype kind: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DatabaseBlobAuditingPolicy, self).__init__(**kwargs) + self.kind = None + self.state = kwargs.get('state', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) + self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) + self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) + self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) + + +class DatabaseOperation(ProxyResource): + """A database operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_name: The name of the database the operation is being + performed on. + :vartype database_name: str + :ivar operation: The name of operation. + :vartype operation: str + :ivar operation_friendly_name: The friendly name of operation. + :vartype operation_friendly_name: str + :ivar percent_complete: The percentage of the operation completed. + :vartype percent_complete: int + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar start_time: The operation start time. + :vartype start_time: datetime + :ivar state: The operation state. Possible values include: 'Pending', + 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', 'Cancelled' + :vartype state: str or ~azure.mgmt.sql.models.ManagementOperationState + :ivar error_code: The operation error code. + :vartype error_code: int + :ivar error_description: The operation error description. + :vartype error_description: str + :ivar error_severity: The operation error severity. + :vartype error_severity: int + :ivar is_user_error: Whether or not the error is a user error. + :vartype is_user_error: bool + :ivar estimated_completion_time: The estimated completion time of the + operation. + :vartype estimated_completion_time: datetime + :ivar description: The operation description. + :vartype description: str + :ivar is_cancellable: Whether the operation can be cancelled. + :vartype is_cancellable: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_name': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_friendly_name': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_description': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'is_user_error': {'readonly': True}, + 'estimated_completion_time': {'readonly': True}, + 'description': {'readonly': True}, + 'is_cancellable': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, + 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DatabaseOperation, self).__init__(**kwargs) + self.database_name = None + self.operation = None + self.operation_friendly_name = None + self.percent_complete = None + self.server_name = None + self.start_time = None + self.state = None + self.error_code = None + self.error_description = None + self.error_severity = None + self.is_user_error = None + self.estimated_completion_time = None + self.description = None + self.is_cancellable = None + + +class DatabaseSecurityAlertPolicy(ProxyResource): + """Contains information about a database Threat Detection policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar kind: Resource kind. + :vartype kind: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint and storageAccountAccessKey are required. + Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies the semicolon-separated list of alerts + that are disabled, or empty string to disable no alerts. Possible values: + Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; + Data_Exfiltration; Unsafe_Action. + :type disabled_alerts: str + :param email_addresses: Specifies the semicolon-separated list of e-mail + addresses to which the alert is sent. + :type email_addresses: str + :param email_account_admins: Specifies that the alert is sent to the + account administrators. Possible values include: 'Enabled', 'Disabled' + :type email_account_admins: str or + ~azure.mgmt.sql.models.SecurityAlertPolicyEmailAccountAdmins + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. If state is Enabled, storageEndpoint is + required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. If state is Enabled, + storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :param use_server_default: Specifies whether to use the default server + policy. Possible values include: 'Enabled', 'Disabled' + :type use_server_default: str or + ~azure.mgmt.sql.models.SecurityAlertPolicyUseServerDefault + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': 'str'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': 'str'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'SecurityAlertPolicyEmailAccountAdmins'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'use_server_default': {'key': 'properties.useServerDefault', 'type': 'SecurityAlertPolicyUseServerDefault'}, + } + + def __init__(self, **kwargs): + super(DatabaseSecurityAlertPolicy, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.kind = None + self.state = kwargs.get('state', None) + self.disabled_alerts = kwargs.get('disabled_alerts', None) + self.email_addresses = kwargs.get('email_addresses', None) + self.email_account_admins = kwargs.get('email_account_admins', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.use_server_default = kwargs.get('use_server_default', None) + + +class DatabaseUpdate(Model): + """A database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param create_mode: Specifies the mode of database creation. + Default: regular database creation. + Copy: creates a database as a copy of an existing database. + sourceDatabaseId must be specified as the resource ID of the source + database. + Secondary: creates a database as a secondary replica of an existing + database. sourceDatabaseId must be specified as the resource ID of the + existing primary database. + PointInTimeRestore: Creates a database by restoring a point in time backup + of an existing database. sourceDatabaseId must be specified as the + resource ID of the existing database, and restorePointInTime must be + specified. + Recovery: Creates a database by restoring a geo-replicated backup. + sourceDatabaseId must be specified as the recoverable database resource ID + to restore. + Restore: Creates a database by restoring a backup of a deleted database. + sourceDatabaseId must be specified. If sourceDatabaseId is the database's + original resource ID, then sourceDatabaseDeletionDate must be specified. + Otherwise sourceDatabaseId must be the restorable dropped database + resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime + may also be specified to restore from an earlier point in time. + RestoreLongTermRetentionBackup: Creates a database by restoring from a + long term retention vault. recoveryServicesRecoveryPointResourceId must be + specified as the recovery point resource ID. + Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for + DataWarehouse edition. Possible values include: 'Default', 'Copy', + 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', + 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', + 'RestoreLongTermRetentionBackup', 'OnlineSecondary' + :type create_mode: str or ~azure.mgmt.sql.models.CreateMode + :param collation: The collation of the database. + :type collation: str + :param max_size_bytes: The max size of the database expressed in bytes. + :type max_size_bytes: long + :param sample_name: The name of the sample schema to apply when creating + this database. Possible values include: 'AdventureWorksLT', + 'WideWorldImportersStd', 'WideWorldImportersFull' + :type sample_name: str or ~azure.mgmt.sql.models.SampleName + :param elastic_pool_id: The resource identifier of the elastic pool + containing this database. + :type elastic_pool_id: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :ivar status: The status of the database. Possible values include: + 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', + 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', + 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', + 'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers', + 'OnlineChangingDwPerformanceTiers' + :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus + :ivar database_id: The ID of the database. + :vartype database_id: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar current_service_objective_name: The current service level objective + name of the database. + :vartype current_service_objective_name: str + :ivar requested_service_objective_name: The requested service level + objective name of the database. + :vartype requested_service_objective_name: str + :ivar default_secondary_location: The default secondary region for this + database. + :vartype default_secondary_location: str + :ivar failover_group_id: Failover Group resource identifier that this + database belongs to. + :vartype failover_group_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param source_database_deletion_date: Specifies the time that the database + was deleted. + :type source_database_deletion_date: datetime + :param recovery_services_recovery_point_id: The resource identifier of the + recovery point associated with create operation of this database. + :type recovery_services_recovery_point_id: str + :param long_term_retention_backup_resource_id: The resource identifier of + the long term retention backup associated with create operation of this + database. + :type long_term_retention_backup_resource_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param restorable_dropped_database_id: The resource identifier of the + restorable dropped database associated with create operation of this + database. + :type restorable_dropped_database_id: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param zone_redundant: Whether or not this database is zone redundant, + which means the replicas of this database will be spread across multiple + availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this database. Possible + values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType + :ivar max_log_size_bytes: The max log size for this database. + :vartype max_log_size_bytes: long + :ivar earliest_restore_date: This records the earliest start date and time + that restore is available for this database (ISO8601 format). + :vartype earliest_restore_date: datetime + :param read_scale: The state of read-only routing. If enabled, connections + that have application intent set to readonly in their connection string + may be routed to a readonly secondary replica in the same region. Possible + values include: 'Enabled', 'Disabled' + :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale + :ivar current_sku: The name and tier of the SKU. + :vartype current_sku: ~azure.mgmt.sql.models.Sku + :param auto_pause_delay: Time in minutes after which database is + automatically paused. A value of -1 means that automatic pause is disabled + :type auto_pause_delay: int + :param min_capacity: Minimal capacity that database will always have + allocated, if not paused + :type min_capacity: float + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'status': {'readonly': True}, + 'database_id': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'current_service_objective_name': {'readonly': True}, + 'requested_service_objective_name': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + 'max_log_size_bytes': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'current_sku': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, + 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, + 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, + 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, + 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, + 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, + 'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'}, + 'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(DatabaseUpdate, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.create_mode = kwargs.get('create_mode', None) + self.collation = kwargs.get('collation', None) + self.max_size_bytes = kwargs.get('max_size_bytes', None) + self.sample_name = kwargs.get('sample_name', None) + self.elastic_pool_id = kwargs.get('elastic_pool_id', None) + self.source_database_id = kwargs.get('source_database_id', None) + self.status = None + self.database_id = None + self.creation_date = None + self.current_service_objective_name = None + self.requested_service_objective_name = None + self.default_secondary_location = None + self.failover_group_id = None + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.source_database_deletion_date = kwargs.get('source_database_deletion_date', None) + self.recovery_services_recovery_point_id = kwargs.get('recovery_services_recovery_point_id', None) + self.long_term_retention_backup_resource_id = kwargs.get('long_term_retention_backup_resource_id', None) + self.recoverable_database_id = kwargs.get('recoverable_database_id', None) + self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) + self.catalog_collation = kwargs.get('catalog_collation', None) + self.zone_redundant = kwargs.get('zone_redundant', None) + self.license_type = kwargs.get('license_type', None) + self.max_log_size_bytes = None + self.earliest_restore_date = None + self.read_scale = kwargs.get('read_scale', None) + self.current_sku = None + self.auto_pause_delay = kwargs.get('auto_pause_delay', None) + self.min_capacity = kwargs.get('min_capacity', None) + self.tags = kwargs.get('tags', None) + + +class DatabaseUsage(Model): + """The database usages. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the usage metric. + :vartype name: str + :ivar resource_name: The name of the resource. + :vartype resource_name: str + :ivar display_name: The usage metric display name. + :vartype display_name: str + :ivar current_value: The current value of the usage metric. + :vartype current_value: float + :ivar limit: The current limit of the usage metric. + :vartype limit: float + :ivar unit: The units of the usage metric. + :vartype unit: str + :ivar next_reset_time: The next reset time for the usage metric (ISO8601 + format). + :vartype next_reset_time: datetime + """ + + _validation = { + 'name': {'readonly': True}, + 'resource_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'next_reset_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(DatabaseUsage, self).__init__(**kwargs) + self.name = None + self.resource_name = None + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + self.next_reset_time = None + + +class DatabaseVulnerabilityAssessment(ProxyResource): + """A database vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: A blob storage container path to hold the + scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It + is required if server level vulnerability assessment policy doesn't set + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _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'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, **kwargs): + super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = kwargs.get('storage_container_path', None) + self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.recurring_scans = kwargs.get('recurring_scans', None) + + +class DatabaseVulnerabilityAssessmentRuleBaseline(ProxyResource): + """A database vulnerability assessment rule baseline. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param baseline_results: Required. The rule baseline result + :type baseline_results: + list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'baseline_results': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'baseline_results': {'key': 'properties.baselineResults', 'type': '[DatabaseVulnerabilityAssessmentRuleBaselineItem]'}, + } + + def __init__(self, **kwargs): + super(DatabaseVulnerabilityAssessmentRuleBaseline, self).__init__(**kwargs) + self.baseline_results = kwargs.get('baseline_results', None) + + +class DatabaseVulnerabilityAssessmentRuleBaselineItem(Model): + """Properties for an Azure SQL Database Vulnerability Assessment rule + baseline's result. + + All required parameters must be populated in order to send to Azure. + + :param result: Required. The rule baseline result + :type result: list[str] + """ + + _validation = { + 'result': {'required': True}, + } + + _attribute_map = { + 'result': {'key': 'result', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(DatabaseVulnerabilityAssessmentRuleBaselineItem, self).__init__(**kwargs) + self.result = kwargs.get('result', None) + + +class DatabaseVulnerabilityAssessmentScansExport(ProxyResource): + """A database Vulnerability Assessment scan export resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar exported_report_location: Location of the exported report (e.g. + https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). + :vartype exported_report_location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'exported_report_location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs) + self.exported_report_location = None + + +class DataMaskingPolicy(ProxyResource): + """Represents a database data masking policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param data_masking_state: Required. The state of the data masking policy. + Possible values include: 'Disabled', 'Enabled' + :type data_masking_state: str or ~azure.mgmt.sql.models.DataMaskingState + :param exempt_principals: The list of the exempt principals. Specifies the + semicolon-separated list of database users for which the data masking + policy does not apply. The specified users receive data results without + masking for all of the database queries. + :type exempt_principals: str + :ivar application_principals: The list of the application principals. This + is a legacy parameter and is no longer used. + :vartype application_principals: str + :ivar masking_level: The masking level. This is a legacy parameter and is + no longer used. + :vartype masking_level: str + :ivar location: The location of the data masking policy. + :vartype location: str + :ivar kind: The kind of data masking policy. Metadata, used for Azure + portal. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_masking_state': {'required': True}, + 'application_principals': {'readonly': True}, + 'masking_level': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_masking_state': {'key': 'properties.dataMaskingState', 'type': 'DataMaskingState'}, + 'exempt_principals': {'key': 'properties.exemptPrincipals', 'type': 'str'}, + 'application_principals': {'key': 'properties.applicationPrincipals', 'type': 'str'}, + 'masking_level': {'key': 'properties.maskingLevel', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataMaskingPolicy, self).__init__(**kwargs) + self.data_masking_state = kwargs.get('data_masking_state', None) + self.exempt_principals = kwargs.get('exempt_principals', None) + self.application_principals = None + self.masking_level = None + self.location = None + self.kind = None + + +class DataMaskingRule(ProxyResource): + """Represents a database data masking rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar data_masking_rule_id: The rule Id. + :vartype data_masking_rule_id: str + :param alias_name: The alias name. This is a legacy parameter and is no + longer used. + :type alias_name: str + :param rule_state: The rule state. Used to delete a rule. To delete an + existing rule, specify the schemaName, tableName, columnName, + maskingFunction, and specify ruleState as disabled. However, if the rule + doesn't already exist, the rule will be created with ruleState set to + enabled, regardless of the provided value of ruleState. Possible values + include: 'Disabled', 'Enabled' + :type rule_state: str or ~azure.mgmt.sql.models.DataMaskingRuleState + :param schema_name: Required. The schema name on which the data masking + rule is applied. + :type schema_name: str + :param table_name: Required. The table name on which the data masking rule + is applied. + :type table_name: str + :param column_name: Required. The column name on which the data masking + rule is applied. + :type column_name: str + :param masking_function: Required. The masking function that is used for + the data masking rule. Possible values include: 'Default', 'CCN', 'Email', + 'Number', 'SSN', 'Text' + :type masking_function: str or ~azure.mgmt.sql.models.DataMaskingFunction + :param number_from: The numberFrom property of the masking rule. Required + if maskingFunction is set to Number, otherwise this parameter will be + ignored. + :type number_from: str + :param number_to: The numberTo property of the data masking rule. Required + if maskingFunction is set to Number, otherwise this parameter will be + ignored. + :type number_to: str + :param prefix_size: If maskingFunction is set to Text, the number of + characters to show unmasked in the beginning of the string. Otherwise, + this parameter will be ignored. + :type prefix_size: str + :param suffix_size: If maskingFunction is set to Text, the number of + characters to show unmasked at the end of the string. Otherwise, this + parameter will be ignored. + :type suffix_size: str + :param replacement_string: If maskingFunction is set to Text, the + character to use for masking the unexposed part of the string. Otherwise, + this parameter will be ignored. + :type replacement_string: str + :ivar location: The location of the data masking rule. + :vartype location: str + :ivar kind: The kind of Data Masking Rule. Metadata, used for Azure + portal. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_masking_rule_id': {'readonly': True}, + 'schema_name': {'required': True}, + 'table_name': {'required': True}, + 'column_name': {'required': True}, + 'masking_function': {'required': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_masking_rule_id': {'key': 'properties.id', 'type': 'str'}, + 'alias_name': {'key': 'properties.aliasName', 'type': 'str'}, + 'rule_state': {'key': 'properties.ruleState', 'type': 'DataMaskingRuleState'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, + 'table_name': {'key': 'properties.tableName', 'type': 'str'}, + 'column_name': {'key': 'properties.columnName', 'type': 'str'}, + 'masking_function': {'key': 'properties.maskingFunction', 'type': 'DataMaskingFunction'}, + 'number_from': {'key': 'properties.numberFrom', 'type': 'str'}, + 'number_to': {'key': 'properties.numberTo', 'type': 'str'}, + 'prefix_size': {'key': 'properties.prefixSize', 'type': 'str'}, + 'suffix_size': {'key': 'properties.suffixSize', 'type': 'str'}, + 'replacement_string': {'key': 'properties.replacementString', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataMaskingRule, self).__init__(**kwargs) + self.data_masking_rule_id = None + self.alias_name = kwargs.get('alias_name', None) + self.rule_state = kwargs.get('rule_state', None) + self.schema_name = kwargs.get('schema_name', None) + self.table_name = kwargs.get('table_name', None) + self.column_name = kwargs.get('column_name', None) + self.masking_function = kwargs.get('masking_function', None) + self.number_from = kwargs.get('number_from', None) + self.number_to = kwargs.get('number_to', None) + self.prefix_size = kwargs.get('prefix_size', None) + self.suffix_size = kwargs.get('suffix_size', None) + self.replacement_string = kwargs.get('replacement_string', None) + self.location = None + self.kind = None + + +class EditionCapability(Model): + """The edition capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The database edition name. + :vartype name: str + :ivar supported_service_level_objectives: The list of supported service + objectives for the edition. + :vartype supported_service_level_objectives: + list[~azure.mgmt.sql.models.ServiceObjectiveCapability] + :ivar zone_redundant: Whether or not zone redundancy is supported for the + edition. + :vartype zone_redundant: bool + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_service_level_objectives': {'readonly': True}, + 'zone_redundant': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_service_level_objectives': {'key': 'supportedServiceLevelObjectives', 'type': '[ServiceObjectiveCapability]'}, + 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_service_level_objectives = None + self.zone_redundant = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ElasticPool(TrackedResource): + """An elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The elastic pool SKU. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or the following command: + ```azurecli + az sql elastic-pool list-editions -l -o table + ```` + :type sku: ~azure.mgmt.sql.models.Sku + :ivar kind: Kind of elastic pool. This is metadata used for the Azure + portal experience. + :vartype kind: str + :ivar state: The state of the elastic pool. Possible values include: + 'Creating', 'Ready', 'Disabled' + :vartype state: str or ~azure.mgmt.sql.models.ElasticPoolState + :ivar creation_date: The creation date of the elastic pool (ISO8601 + format). + :vartype creation_date: datetime + :param max_size_bytes: The storage limit for the database elastic pool in + bytes. + :type max_size_bytes: long + :param per_database_settings: The per database settings for the elastic + pool. + :type per_database_settings: + ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings + :param zone_redundant: Whether or not this elastic pool is zone redundant, + which means the replicas of this elastic pool will be spread across + multiple availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this elastic pool. + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'state': {'readonly': True}, + 'creation_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPool, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.kind = None + self.state = None + self.creation_date = None + self.max_size_bytes = kwargs.get('max_size_bytes', None) + self.per_database_settings = kwargs.get('per_database_settings', None) + self.zone_redundant = kwargs.get('zone_redundant', None) + self.license_type = kwargs.get('license_type', None) + + +class ElasticPoolActivity(ProxyResource): + """Represents the activity on an elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar end_time: The time the operation finished (ISO8601 format). + :vartype end_time: datetime + :ivar error_code: The error code if available. + :vartype error_code: int + :ivar error_message: The error message if available. + :vartype error_message: str + :ivar error_severity: The error severity if available. + :vartype error_severity: int + :ivar operation: The operation name. + :vartype operation: str + :ivar operation_id: The unique operation ID. + :vartype operation_id: str + :ivar percent_complete: The percentage complete if available. + :vartype percent_complete: int + :ivar requested_database_dtu_max: The requested max DTU per database if + available. + :vartype requested_database_dtu_max: int + :ivar requested_database_dtu_min: The requested min DTU per database if + available. + :vartype requested_database_dtu_min: int + :ivar requested_dtu: The requested DTU for the pool if available. + :vartype requested_dtu: int + :ivar requested_elastic_pool_name: The requested name for the elastic pool + if available. + :vartype requested_elastic_pool_name: str + :ivar requested_storage_limit_in_gb: The requested storage limit for the + pool in GB if available. + :vartype requested_storage_limit_in_gb: long + :ivar elastic_pool_name: The name of the elastic pool. + :vartype elastic_pool_name: str + :ivar server_name: The name of the server the elastic pool is in. + :vartype server_name: str + :ivar start_time: The time the operation started (ISO8601 format). + :vartype start_time: datetime + :ivar state: The current state of the operation. + :vartype state: str + :ivar requested_storage_limit_in_mb: The requested storage limit in MB. + :vartype requested_storage_limit_in_mb: int + :ivar requested_database_dtu_guarantee: The requested per database DTU + guarantee. + :vartype requested_database_dtu_guarantee: int + :ivar requested_database_dtu_cap: The requested per database DTU cap. + :vartype requested_database_dtu_cap: int + :ivar requested_dtu_guarantee: The requested DTU guarantee. + :vartype requested_dtu_guarantee: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_message': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_id': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'requested_database_dtu_max': {'readonly': True}, + 'requested_database_dtu_min': {'readonly': True}, + 'requested_dtu': {'readonly': True}, + 'requested_elastic_pool_name': {'readonly': True}, + 'requested_storage_limit_in_gb': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'requested_storage_limit_in_mb': {'readonly': True}, + 'requested_database_dtu_guarantee': {'readonly': True}, + 'requested_database_dtu_cap': {'readonly': True}, + 'requested_dtu_guarantee': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'requested_database_dtu_max': {'key': 'properties.requestedDatabaseDtuMax', 'type': 'int'}, + 'requested_database_dtu_min': {'key': 'properties.requestedDatabaseDtuMin', 'type': 'int'}, + 'requested_dtu': {'key': 'properties.requestedDtu', 'type': 'int'}, + 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, + 'requested_storage_limit_in_gb': {'key': 'properties.requestedStorageLimitInGB', 'type': 'long'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'requested_storage_limit_in_mb': {'key': 'properties.requestedStorageLimitInMB', 'type': 'int'}, + 'requested_database_dtu_guarantee': {'key': 'properties.requestedDatabaseDtuGuarantee', 'type': 'int'}, + 'requested_database_dtu_cap': {'key': 'properties.requestedDatabaseDtuCap', 'type': 'int'}, + 'requested_dtu_guarantee': {'key': 'properties.requestedDtuGuarantee', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolActivity, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.end_time = None + self.error_code = None + self.error_message = None + self.error_severity = None + self.operation = None + self.operation_id = None + self.percent_complete = None + self.requested_database_dtu_max = None + self.requested_database_dtu_min = None + self.requested_dtu = None + self.requested_elastic_pool_name = None + self.requested_storage_limit_in_gb = None + self.elastic_pool_name = None + self.server_name = None + self.start_time = None + self.state = None + self.requested_storage_limit_in_mb = None + self.requested_database_dtu_guarantee = None + self.requested_database_dtu_cap = None + self.requested_dtu_guarantee = None + + +class ElasticPoolDatabaseActivity(ProxyResource): + """Represents the activity on an elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar database_name: The database name. + :vartype database_name: str + :ivar end_time: The time the operation finished (ISO8601 format). + :vartype end_time: datetime + :ivar error_code: The error code if available. + :vartype error_code: int + :ivar error_message: The error message if available. + :vartype error_message: str + :ivar error_severity: The error severity if available. + :vartype error_severity: int + :ivar operation: The operation name. + :vartype operation: str + :ivar operation_id: The unique operation ID. + :vartype operation_id: str + :ivar percent_complete: The percentage complete if available. + :vartype percent_complete: int + :ivar requested_elastic_pool_name: The name for the elastic pool the + database is moving into if available. + :vartype requested_elastic_pool_name: str + :ivar current_elastic_pool_name: The name of the current elastic pool the + database is in if available. + :vartype current_elastic_pool_name: str + :ivar current_service_objective: The name of the current service objective + if available. + :vartype current_service_objective: str + :ivar requested_service_objective: The name of the requested service + objective if available. + :vartype requested_service_objective: str + :ivar server_name: The name of the server the elastic pool is in. + :vartype server_name: str + :ivar start_time: The time the operation started (ISO8601 format). + :vartype start_time: datetime + :ivar state: The current state of the operation. + :vartype state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_name': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_message': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_id': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'requested_elastic_pool_name': {'readonly': True}, + 'current_elastic_pool_name': {'readonly': True}, + 'current_service_objective': {'readonly': True}, + 'requested_service_objective': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, + 'current_elastic_pool_name': {'key': 'properties.currentElasticPoolName', 'type': 'str'}, + 'current_service_objective': {'key': 'properties.currentServiceObjective', 'type': 'str'}, + 'requested_service_objective': {'key': 'properties.requestedServiceObjective', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolDatabaseActivity, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.database_name = None + self.end_time = None + self.error_code = None + self.error_message = None + self.error_severity = None + self.operation = None + self.operation_id = None + self.percent_complete = None + self.requested_elastic_pool_name = None + self.current_elastic_pool_name = None + self.current_service_objective = None + self.requested_service_objective = None + self.server_name = None + self.start_time = None + self.state = None + + +class ElasticPoolEditionCapability(Model): + """The elastic pool edition capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The elastic pool edition name. + :vartype name: str + :ivar supported_elastic_pool_performance_levels: The list of supported + elastic pool DTU levels for the edition. + :vartype supported_elastic_pool_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerformanceLevelCapability] + :ivar zone_redundant: Whether or not zone redundancy is supported for the + edition. + :vartype zone_redundant: bool + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_elastic_pool_performance_levels': {'readonly': True}, + 'zone_redundant': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_elastic_pool_performance_levels': {'key': 'supportedElasticPoolPerformanceLevels', 'type': '[ElasticPoolPerformanceLevelCapability]'}, + 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolEditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_elastic_pool_performance_levels = None + self.zone_redundant = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ElasticPoolOperation(ProxyResource): + """A elastic pool operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar elastic_pool_name: The name of the elastic pool the operation is + being performed on. + :vartype elastic_pool_name: str + :ivar operation: The name of operation. + :vartype operation: str + :ivar operation_friendly_name: The friendly name of operation. + :vartype operation_friendly_name: str + :ivar percent_complete: The percentage of the operation completed. + :vartype percent_complete: int + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar start_time: The operation start time. + :vartype start_time: datetime + :ivar state: The operation state. + :vartype state: str + :ivar error_code: The operation error code. + :vartype error_code: int + :ivar error_description: The operation error description. + :vartype error_description: str + :ivar error_severity: The operation error severity. + :vartype error_severity: int + :ivar is_user_error: Whether or not the error is a user error. + :vartype is_user_error: bool + :ivar estimated_completion_time: The estimated completion time of the + operation. + :vartype estimated_completion_time: datetime + :ivar description: The operation description. + :vartype description: str + :ivar is_cancellable: Whether the operation can be cancelled. + :vartype is_cancellable: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_friendly_name': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_description': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'is_user_error': {'readonly': True}, + 'estimated_completion_time': {'readonly': True}, + 'description': {'readonly': True}, + 'is_cancellable': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, + 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolOperation, self).__init__(**kwargs) + self.elastic_pool_name = None + self.operation = None + self.operation_friendly_name = None + self.percent_complete = None + self.server_name = None + self.start_time = None + self.state = None + self.error_code = None + self.error_description = None + self.error_severity = None + self.is_user_error = None + self.estimated_completion_time = None + self.description = None + self.is_cancellable = None + + +class ElasticPoolPerDatabaseMaxPerformanceLevelCapability(Model): + """The max per-database performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The maximum performance level per database. + :vartype limit: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + :ivar supported_per_database_min_performance_levels: The list of supported + min database performance levels. + :vartype supported_per_database_min_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMinPerformanceLevelCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'supported_per_database_min_performance_levels': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'supported_per_database_min_performance_levels': {'key': 'supportedPerDatabaseMinPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMinPerformanceLevelCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolPerDatabaseMaxPerformanceLevelCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + self.supported_per_database_min_performance_levels = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ElasticPoolPerDatabaseMinPerformanceLevelCapability(Model): + """The minimum per-database performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The minimum performance level per database. + :vartype limit: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolPerDatabaseMinPerformanceLevelCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ElasticPoolPerDatabaseSettings(Model): + """Per database settings of an elastic pool. + + :param min_capacity: The minimum capacity all databases are guaranteed. + :type min_capacity: float + :param max_capacity: The maximum capacity any one database can consume. + :type max_capacity: float + """ + + _attribute_map = { + 'min_capacity': {'key': 'minCapacity', 'type': 'float'}, + 'max_capacity': {'key': 'maxCapacity', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolPerDatabaseSettings, self).__init__(**kwargs) + self.min_capacity = kwargs.get('min_capacity', None) + self.max_capacity = kwargs.get('max_capacity', None) + + +class ElasticPoolPerformanceLevelCapability(Model): + """The Elastic Pool performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar performance_level: The performance level for the pool. + :vartype performance_level: + ~azure.mgmt.sql.models.PerformanceLevelCapability + :ivar sku: The sku. + :vartype sku: ~azure.mgmt.sql.models.Sku + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar max_database_count: The maximum number of databases supported. + :vartype max_database_count: int + :ivar included_max_size: The included (free) max size for this performance + level. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar supported_max_sizes: The list of supported max sizes. + :vartype supported_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar supported_per_database_max_sizes: The list of supported per database + max sizes. + :vartype supported_per_database_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar supported_per_database_max_performance_levels: The list of supported + per database max performance levels. + :vartype supported_per_database_max_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMaxPerformanceLevelCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'performance_level': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'max_database_count': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'supported_max_sizes': {'readonly': True}, + 'supported_per_database_max_sizes': {'readonly': True}, + 'supported_per_database_max_performance_levels': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'max_database_count': {'key': 'maxDatabaseCount', 'type': 'int'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'supported_per_database_max_sizes': {'key': 'supportedPerDatabaseMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'supported_per_database_max_performance_levels': {'key': 'supportedPerDatabaseMaxPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMaxPerformanceLevelCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolPerformanceLevelCapability, self).__init__(**kwargs) + self.performance_level = None + self.sku = None + self.supported_license_types = None + self.max_database_count = None + self.included_max_size = None + self.supported_max_sizes = None + self.supported_per_database_max_sizes = None + self.supported_per_database_max_performance_levels = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ElasticPoolUpdate(Model): + """An elastic pool update. + + :param sku: + :type sku: ~azure.mgmt.sql.models.Sku + :param max_size_bytes: The storage limit for the database elastic pool in + bytes. + :type max_size_bytes: long + :param per_database_settings: The per database settings for the elastic + pool. + :type per_database_settings: + ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings + :param zone_redundant: Whether or not this elastic pool is zone redundant, + which means the replicas of this elastic pool will be spread across + multiple availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this elastic pool. + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolUpdate, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.max_size_bytes = kwargs.get('max_size_bytes', None) + self.per_database_settings = kwargs.get('per_database_settings', None) + self.zone_redundant = kwargs.get('zone_redundant', None) + self.license_type = kwargs.get('license_type', None) + self.tags = kwargs.get('tags', None) + + +class EncryptionProtector(ProxyResource): + """The server encryption protector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :type kind: str + :ivar location: Resource location. + :vartype location: str + :ivar subregion: Subregion of the encryption protector. + :vartype subregion: str + :param server_key_name: The name of the server key. + :type server_key_name: str + :param server_key_type: Required. The encryption protector type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :ivar uri: The URI of the server key. + :vartype uri: str + :ivar thumbprint: Thumbprint of the server key. + :vartype thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'subregion': {'readonly': True}, + 'server_key_type': {'required': True}, + 'uri': {'readonly': True}, + 'thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'subregion': {'key': 'properties.subregion', 'type': 'str'}, + 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EncryptionProtector, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + self.location = None + self.subregion = None + self.server_key_name = kwargs.get('server_key_name', None) + self.server_key_type = kwargs.get('server_key_type', None) + self.uri = None + self.thumbprint = None + + +class ExportRequest(Model): + """Export database parameters. + + All required parameters must be populated in order to send to Azure. + + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + } + + _attribute_map = { + 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, + } + + def __init__(self, **kwargs): + super(ExportRequest, self).__init__(**kwargs) + self.storage_key_type = kwargs.get('storage_key_type', None) + self.storage_key = kwargs.get('storage_key', None) + self.storage_uri = kwargs.get('storage_uri', None) + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.authentication_type = kwargs.get('authentication_type', "SQL") + + +class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): + """An extended database blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param predicate_expression: Specifies condition of where clause when + creating an audit. + :type predicate_expression: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ExtendedDatabaseBlobAuditingPolicy, self).__init__(**kwargs) + self.predicate_expression = kwargs.get('predicate_expression', None) + self.state = kwargs.get('state', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) + self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) + self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) + self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) + + +class ExtendedServerBlobAuditingPolicy(ProxyResource): + """An extended server blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param predicate_expression: Specifies condition of where clause when + creating an audit. + :type predicate_expression: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ExtendedServerBlobAuditingPolicy, self).__init__(**kwargs) + self.predicate_expression = kwargs.get('predicate_expression', None) + self.state = kwargs.get('state', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) + self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) + self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) + self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) + + +class FailoverGroup(ProxyResource): + """A failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param read_write_endpoint: Required. Read-write endpoint of the failover + group instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint + :ivar replication_role: Local replication role of the failover group + instance. Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.FailoverGroupReplicationRole + :ivar replication_state: Replication state of the failover group instance. + :vartype replication_state: str + :param partner_servers: Required. List of partner server information for + the failover group. + :type partner_servers: list[~azure.mgmt.sql.models.PartnerInfo] + :param databases: List of databases in the failover group. + :type databases: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'read_write_endpoint': {'required': True}, + 'replication_role': {'readonly': True}, + 'replication_state': {'readonly': True}, + 'partner_servers': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, + 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + 'partner_servers': {'key': 'properties.partnerServers', 'type': '[PartnerInfo]'}, + 'databases': {'key': 'properties.databases', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(FailoverGroup, self).__init__(**kwargs) + self.location = None + self.tags = kwargs.get('tags', None) + self.read_write_endpoint = kwargs.get('read_write_endpoint', None) + self.read_only_endpoint = kwargs.get('read_only_endpoint', None) + self.replication_role = None + self.replication_state = None + self.partner_servers = kwargs.get('partner_servers', None) + self.databases = kwargs.get('databases', None) + + +class FailoverGroupReadOnlyEndpoint(Model): + """Read-only endpoint of the failover group instance. + + :param failover_policy: Failover policy of the read-only endpoint for the + failover group. Possible values include: 'Disabled', 'Enabled' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy + """ + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) + self.failover_policy = kwargs.get('failover_policy', None) + + +class FailoverGroupReadWriteEndpoint(Model): + """Read-write endpoint of the failover group instance. + + All required parameters must be populated in order to send to Azure. + + :param failover_policy: Required. Failover policy of the read-write + endpoint for the failover group. If failoverPolicy is Automatic then + failoverWithDataLossGracePeriodMinutes is required. Possible values + include: 'Manual', 'Automatic' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy + :param failover_with_data_loss_grace_period_minutes: Grace period before + failover with data loss is attempted for the read-write endpoint. If + failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is + required. + :type failover_with_data_loss_grace_period_minutes: int + """ + + _validation = { + 'failover_policy': {'required': True}, + } + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(FailoverGroupReadWriteEndpoint, self).__init__(**kwargs) + self.failover_policy = kwargs.get('failover_policy', None) + self.failover_with_data_loss_grace_period_minutes = kwargs.get('failover_with_data_loss_grace_period_minutes', None) + + +class FailoverGroupUpdate(Model): + """A failover group update request. + + :param read_write_endpoint: Read-write endpoint of the failover group + instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint + :param databases: List of databases in the failover group. + :type databases: list[str] + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, + 'databases': {'key': 'properties.databases', 'type': '[str]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(FailoverGroupUpdate, self).__init__(**kwargs) + self.read_write_endpoint = kwargs.get('read_write_endpoint', None) + self.read_only_endpoint = kwargs.get('read_only_endpoint', None) + self.databases = kwargs.get('databases', None) + self.tags = kwargs.get('tags', None) + + +class FirewallRule(ProxyResource): + """Represents a server firewall rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of server that contains this firewall rule. + :vartype kind: str + :ivar location: Location of the server that contains this firewall rule. + :vartype location: str + :param start_ip_address: Required. The start IP address of the firewall + rule. Must be IPv4 format. Use value '0.0.0.0' to represent all + Azure-internal IP addresses. + :type start_ip_address: str + :param end_ip_address: Required. The end IP address of the firewall rule. + Must be IPv4 format. Must be greater than or equal to startIpAddress. Use + value '0.0.0.0' to represent all Azure-internal IP addresses. + :type end_ip_address: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + 'start_ip_address': {'required': True}, + 'end_ip_address': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FirewallRule, self).__init__(**kwargs) + self.kind = None + self.location = None + self.start_ip_address = kwargs.get('start_ip_address', None) + self.end_ip_address = kwargs.get('end_ip_address', None) + + +class GeoBackupPolicy(ProxyResource): + """A database geo backup policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. The state of the geo backup policy. Possible + values include: 'Disabled', 'Enabled' + :type state: str or ~azure.mgmt.sql.models.GeoBackupPolicyState + :ivar storage_type: The storage type of the geo backup policy. + :vartype storage_type: str + :ivar kind: Kind of geo backup policy. This is metadata used for the + Azure portal experience. + :vartype kind: str + :ivar location: Backup policy location. + :vartype location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'storage_type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'GeoBackupPolicyState'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GeoBackupPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.storage_type = None + self.kind = None + self.location = None + + +class ImportExportResponse(ProxyResource): + """Response for Import/Export Get operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar request_type: The request type of the operation. + :vartype request_type: str + :ivar request_id: The request type of the operation. + :vartype request_id: str + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar database_name: The name of the database. + :vartype database_name: str + :ivar status: The status message returned from the server. + :vartype status: str + :ivar last_modified_time: The operation status last modified time. + :vartype last_modified_time: str + :ivar queued_time: The operation queued time. + :vartype queued_time: str + :ivar blob_uri: The blob uri. + :vartype blob_uri: str + :ivar error_message: The error message returned from the server. + :vartype error_message: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'request_type': {'readonly': True}, + 'request_id': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'status': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'queued_time': {'readonly': True}, + 'blob_uri': {'readonly': True}, + 'error_message': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'request_type': {'key': 'properties.requestType', 'type': 'str'}, + 'request_id': {'key': 'properties.requestId', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'str'}, + 'queued_time': {'key': 'properties.queuedTime', 'type': 'str'}, + 'blob_uri': {'key': 'properties.blobUri', 'type': 'str'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImportExportResponse, self).__init__(**kwargs) + self.request_type = None + self.request_id = None + self.server_name = None + self.database_name = None + self.status = None + self.last_modified_time = None + self.queued_time = None + self.blob_uri = None + self.error_message = None + + +class ImportExtensionRequest(Model): + """Import database parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: The name of the extension. + :type name: str + :param type: The type of the extension. + :type type: str + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + :ivar operation_mode: Required. The type of import operation being + performed. This is always Import. Default value: "Import" . + :vartype operation_mode: str + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + 'operation_mode': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_key_type': {'key': 'properties.storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'properties.storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'properties.storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'properties.authenticationType', 'type': 'AuthenticationType'}, + 'operation_mode': {'key': 'properties.operationMode', 'type': 'str'}, + } + + operation_mode = "Import" + + def __init__(self, **kwargs): + super(ImportExtensionRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.storage_key_type = kwargs.get('storage_key_type', None) + self.storage_key = kwargs.get('storage_key', None) + self.storage_uri = kwargs.get('storage_uri', None) + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.authentication_type = kwargs.get('authentication_type', "SQL") + + +class ImportRequest(ExportRequest): + """Import database parameters. + + All required parameters must be populated in order to send to Azure. + + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + :param database_name: Required. The name of the database to import. + :type database_name: str + :param edition: Required. The edition for the database being created. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location + ```` + . Possible values include: 'Web', 'Business', 'Basic', 'Standard', + 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', + 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale' + :type edition: str or ~azure.mgmt.sql.models.DatabaseEdition + :param service_objective_name: Required. The name of the service objective + to assign to the database. Possible values include: 'System', 'System0', + 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', + 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', + 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', + 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', + 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', + 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', + 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', + 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' + :type service_objective_name: str or + ~azure.mgmt.sql.models.ServiceObjectiveName + :param max_size_bytes: Required. The maximum size for the newly imported + database. + :type max_size_bytes: str + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + 'database_name': {'required': True}, + 'edition': {'required': True}, + 'service_objective_name': {'required': True}, + 'max_size_bytes': {'required': True}, + } + + _attribute_map = { + 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'edition': {'key': 'edition', 'type': 'str'}, + 'service_objective_name': {'key': 'serviceObjectiveName', 'type': 'str'}, + 'max_size_bytes': {'key': 'maxSizeBytes', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImportRequest, self).__init__(**kwargs) + self.database_name = kwargs.get('database_name', None) + self.edition = kwargs.get('edition', None) + self.service_objective_name = kwargs.get('service_objective_name', None) + self.max_size_bytes = kwargs.get('max_size_bytes', None) + + +class InstanceFailoverGroup(ProxyResource): + """An instance failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param read_write_endpoint: Required. Read-write endpoint of the failover + group instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.InstanceFailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.InstanceFailoverGroupReadOnlyEndpoint + :ivar replication_role: Local replication role of the failover group + instance. Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole + :ivar replication_state: Replication state of the failover group instance. + :vartype replication_state: str + :param partner_regions: Required. Partner region information for the + failover group. + :type partner_regions: list[~azure.mgmt.sql.models.PartnerRegionInfo] + :param managed_instance_pairs: Required. List of managed instance pairs in + the failover group. + :type managed_instance_pairs: + list[~azure.mgmt.sql.models.ManagedInstancePairInfo] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'read_write_endpoint': {'required': True}, + 'replication_role': {'readonly': True}, + 'replication_state': {'readonly': True}, + 'partner_regions': {'required': True}, + 'managed_instance_pairs': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'InstanceFailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'InstanceFailoverGroupReadOnlyEndpoint'}, + 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + 'partner_regions': {'key': 'properties.partnerRegions', 'type': '[PartnerRegionInfo]'}, + 'managed_instance_pairs': {'key': 'properties.managedInstancePairs', 'type': '[ManagedInstancePairInfo]'}, + } + + def __init__(self, **kwargs): + super(InstanceFailoverGroup, self).__init__(**kwargs) + self.read_write_endpoint = kwargs.get('read_write_endpoint', None) + self.read_only_endpoint = kwargs.get('read_only_endpoint', None) + self.replication_role = None + self.replication_state = None + self.partner_regions = kwargs.get('partner_regions', None) + self.managed_instance_pairs = kwargs.get('managed_instance_pairs', None) + + +class InstanceFailoverGroupReadOnlyEndpoint(Model): + """Read-only endpoint of the failover group instance. + + :param failover_policy: Failover policy of the read-only endpoint for the + failover group. Possible values include: 'Disabled', 'Enabled' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy + """ + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InstanceFailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) + self.failover_policy = kwargs.get('failover_policy', None) + + +class InstanceFailoverGroupReadWriteEndpoint(Model): + """Read-write endpoint of the failover group instance. + + All required parameters must be populated in order to send to Azure. + + :param failover_policy: Required. Failover policy of the read-write + endpoint for the failover group. If failoverPolicy is Automatic then + failoverWithDataLossGracePeriodMinutes is required. Possible values + include: 'Manual', 'Automatic' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy + :param failover_with_data_loss_grace_period_minutes: Grace period before + failover with data loss is attempted for the read-write endpoint. If + failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is + required. + :type failover_with_data_loss_grace_period_minutes: int + """ + + _validation = { + 'failover_policy': {'required': True}, + } + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(InstanceFailoverGroupReadWriteEndpoint, self).__init__(**kwargs) + self.failover_policy = kwargs.get('failover_policy', None) + self.failover_with_data_loss_grace_period_minutes = kwargs.get('failover_with_data_loss_grace_period_minutes', None) + + +class InstancePool(TrackedResource): + """An Azure SQL instance pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param subnet_id: Required. Resource ID of the subnet to place this + instance pool in. + :type subnet_id: str + :param v_cores: Required. Count of vCores belonging to this instance pool. + :type v_cores: int + :param license_type: Required. The license type. Possible values are + 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' + (without SQL license price). Possible values include: 'LicenseIncluded', + 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.InstancePoolLicenseType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'subnet_id': {'required': True}, + 'v_cores': {'required': True}, + 'license_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InstancePool, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.v_cores = kwargs.get('v_cores', None) + self.license_type = kwargs.get('license_type', None) + + +class InstancePoolUpdate(Model): + """An update to an Instance pool. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(InstancePoolUpdate, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class Job(ProxyResource): + """A job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param description: User-defined description of the job. Default value: "" + . + :type description: str + :ivar version: The job version number. + :vartype version: int + :param schedule: Schedule properties of the job. + :type schedule: ~azure.mgmt.sql.models.JobSchedule + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'int'}, + 'schedule': {'key': 'properties.schedule', 'type': 'JobSchedule'}, + } + + def __init__(self, **kwargs): + super(Job, self).__init__(**kwargs) + self.description = kwargs.get('description', "") + self.version = None + self.schedule = kwargs.get('schedule', None) + + +class JobAgent(TrackedResource): + """An Azure SQL job agent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param database_id: Required. Resource ID of the database to store job + metadata in. + :type database_id: str + :ivar state: The state of the job agent. Possible values include: + 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' + :vartype state: str or ~azure.mgmt.sql.models.JobAgentState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'database_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobAgent, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.database_id = kwargs.get('database_id', None) + self.state = None + + +class JobAgentUpdate(Model): + """An update to an Azure SQL job agent. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(JobAgentUpdate, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class JobCredential(ProxyResource): + """A stored credential that can be used by a job to connect to target + databases. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param username: Required. The credential user name. + :type username: str + :param password: Required. The credential password. + :type password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'username': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'username': {'key': 'properties.username', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobCredential, self).__init__(**kwargs) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + + +class JobExecution(ProxyResource): + """An execution of a job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar job_version: The job version number. + :vartype job_version: int + :ivar step_name: The job step name. + :vartype step_name: str + :ivar step_id: The job step id. + :vartype step_id: int + :ivar job_execution_id: The unique identifier of the job execution. + :vartype job_execution_id: str + :ivar lifecycle: The detailed state of the job execution. Possible values + include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', + 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', + 'TimedOut', 'Canceled', 'Skipped' + :vartype lifecycle: str or ~azure.mgmt.sql.models.JobExecutionLifecycle + :ivar provisioning_state: The ARM provisioning state of the job execution. + Possible values include: 'Created', 'InProgress', 'Succeeded', 'Failed', + 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.sql.models.ProvisioningState + :ivar create_time: The time that the job execution was created. + :vartype create_time: datetime + :ivar start_time: The time that the job execution started. + :vartype start_time: datetime + :ivar end_time: The time that the job execution completed. + :vartype end_time: datetime + :param current_attempts: Number of times the job execution has been + attempted. + :type current_attempts: int + :ivar current_attempt_start_time: Start time of the current attempt. + :vartype current_attempt_start_time: datetime + :ivar last_message: The last status or error message. + :vartype last_message: str + :ivar target: The target that this execution is executed on. + :vartype target: ~azure.mgmt.sql.models.JobExecutionTarget + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'job_version': {'readonly': True}, + 'step_name': {'readonly': True}, + 'step_id': {'readonly': True}, + 'job_execution_id': {'readonly': True}, + 'lifecycle': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'create_time': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'current_attempt_start_time': {'readonly': True}, + 'last_message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'job_version': {'key': 'properties.jobVersion', 'type': 'int'}, + 'step_name': {'key': 'properties.stepName', 'type': 'str'}, + 'step_id': {'key': 'properties.stepId', 'type': 'int'}, + 'job_execution_id': {'key': 'properties.jobExecutionId', 'type': 'str'}, + 'lifecycle': {'key': 'properties.lifecycle', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'current_attempts': {'key': 'properties.currentAttempts', 'type': 'int'}, + 'current_attempt_start_time': {'key': 'properties.currentAttemptStartTime', 'type': 'iso-8601'}, + 'last_message': {'key': 'properties.lastMessage', 'type': 'str'}, + 'target': {'key': 'properties.target', 'type': 'JobExecutionTarget'}, + } + + def __init__(self, **kwargs): + super(JobExecution, self).__init__(**kwargs) + self.job_version = None + self.step_name = None + self.step_id = None + self.job_execution_id = None + self.lifecycle = None + self.provisioning_state = None + self.create_time = None + self.start_time = None + self.end_time = None + self.current_attempts = kwargs.get('current_attempts', None) + self.current_attempt_start_time = None + self.last_message = None + self.target = None + + +class JobExecutionTarget(Model): + """The target that a job execution is executed on. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of the target. Possible values include: + 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + :vartype type: str or ~azure.mgmt.sql.models.JobTargetType + :ivar server_name: The server name. + :vartype server_name: str + :ivar database_name: The database name. + :vartype database_name: str + """ + + _validation = { + 'type': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobExecutionTarget, self).__init__(**kwargs) + self.type = None + self.server_name = None + self.database_name = None + + +class JobSchedule(Model): + """Scheduling properties of a job. + + :param start_time: Schedule start time. Default value: + "0001-01-01T00:00:00Z" . + :type start_time: datetime + :param end_time: Schedule end time. Default value: "9999-12-31T11:59:59Z" + . + :type end_time: datetime + :param type: Schedule interval type. Possible values include: 'Once', + 'Recurring'. Default value: "Once" . + :type type: str or ~azure.mgmt.sql.models.JobScheduleType + :param enabled: Whether or not the schedule is enabled. + :type enabled: bool + :param interval: Value of the schedule's recurring interval, if the + schedule type is recurring. ISO8601 duration format. + :type interval: str + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'JobScheduleType'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'interval': {'key': 'interval', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobSchedule, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', "0001-01-01T00:00:00Z") + self.end_time = kwargs.get('end_time', "9999-12-31T11:59:59Z") + self.type = kwargs.get('type', "Once") + self.enabled = kwargs.get('enabled', None) + self.interval = kwargs.get('interval', None) + + +class JobStep(ProxyResource): + """A job step. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param step_id: The job step's index within the job. If not specified when + creating the job step, it will be created as the last step. If not + specified when updating the job step, the step id is not modified. + :type step_id: int + :param target_group: Required. The resource ID of the target group that + the job step will be executed on. + :type target_group: str + :param credential: Required. The resource ID of the job credential that + will be used to connect to the targets. + :type credential: str + :param action: Required. The action payload of the job step. + :type action: ~azure.mgmt.sql.models.JobStepAction + :param output: Output destination properties of the job step. + :type output: ~azure.mgmt.sql.models.JobStepOutput + :param execution_options: Execution options for the job step. + :type execution_options: ~azure.mgmt.sql.models.JobStepExecutionOptions + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'target_group': {'required': True}, + 'credential': {'required': True}, + 'action': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'step_id': {'key': 'properties.stepId', 'type': 'int'}, + 'target_group': {'key': 'properties.targetGroup', 'type': 'str'}, + 'credential': {'key': 'properties.credential', 'type': 'str'}, + 'action': {'key': 'properties.action', 'type': 'JobStepAction'}, + 'output': {'key': 'properties.output', 'type': 'JobStepOutput'}, + 'execution_options': {'key': 'properties.executionOptions', 'type': 'JobStepExecutionOptions'}, + } + + def __init__(self, **kwargs): + super(JobStep, self).__init__(**kwargs) + self.step_id = kwargs.get('step_id', None) + self.target_group = kwargs.get('target_group', None) + self.credential = kwargs.get('credential', None) + self.action = kwargs.get('action', None) + self.output = kwargs.get('output', None) + self.execution_options = kwargs.get('execution_options', None) + + +class JobStepAction(Model): + """The action to be executed by a job step. + + All required parameters must be populated in order to send to Azure. + + :param type: Type of action being executed by the job step. Possible + values include: 'TSql'. Default value: "TSql" . + :type type: str or ~azure.mgmt.sql.models.JobStepActionType + :param source: The source of the action to execute. Possible values + include: 'Inline'. Default value: "Inline" . + :type source: str or ~azure.mgmt.sql.models.JobStepActionSource + :param value: Required. The action value, for example the text of the + T-SQL script to execute. + :type value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobStepAction, self).__init__(**kwargs) + self.type = kwargs.get('type', "TSql") + self.source = kwargs.get('source', "Inline") + self.value = kwargs.get('value', None) + + +class JobStepExecutionOptions(Model): + """The execution options of a job step. + + :param timeout_seconds: Execution timeout for the job step. Default value: + 43200 . + :type timeout_seconds: int + :param retry_attempts: Maximum number of times the job step will be + reattempted if the first attempt fails. Default value: 10 . + :type retry_attempts: int + :param initial_retry_interval_seconds: Initial delay between retries for + job step execution. Default value: 1 . + :type initial_retry_interval_seconds: int + :param maximum_retry_interval_seconds: The maximum amount of time to wait + between retries for job step execution. Default value: 120 . + :type maximum_retry_interval_seconds: int + :param retry_interval_backoff_multiplier: The backoff multiplier for the + time between retries. Default value: 2 . + :type retry_interval_backoff_multiplier: float + """ + + _attribute_map = { + 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, + 'retry_attempts': {'key': 'retryAttempts', 'type': 'int'}, + 'initial_retry_interval_seconds': {'key': 'initialRetryIntervalSeconds', 'type': 'int'}, + 'maximum_retry_interval_seconds': {'key': 'maximumRetryIntervalSeconds', 'type': 'int'}, + 'retry_interval_backoff_multiplier': {'key': 'retryIntervalBackoffMultiplier', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(JobStepExecutionOptions, self).__init__(**kwargs) + self.timeout_seconds = kwargs.get('timeout_seconds', 43200) + self.retry_attempts = kwargs.get('retry_attempts', 10) + self.initial_retry_interval_seconds = kwargs.get('initial_retry_interval_seconds', 1) + self.maximum_retry_interval_seconds = kwargs.get('maximum_retry_interval_seconds', 120) + self.retry_interval_backoff_multiplier = kwargs.get('retry_interval_backoff_multiplier', 2) + + +class JobStepOutput(Model): + """The output configuration of a job step. + + All required parameters must be populated in order to send to Azure. + + :param type: The output destination type. Possible values include: + 'SqlDatabase'. Default value: "SqlDatabase" . + :type type: str or ~azure.mgmt.sql.models.JobStepOutputType + :param subscription_id: The output destination subscription id. + :type subscription_id: str + :param resource_group_name: The output destination resource group. + :type resource_group_name: str + :param server_name: Required. The output destination server name. + :type server_name: str + :param database_name: Required. The output destination database. + :type database_name: str + :param schema_name: The output destination schema. Default value: "dbo" . + :type schema_name: str + :param table_name: Required. The output destination table. + :type table_name: str + :param credential: Required. The resource ID of the credential to use to + connect to the output destination. + :type credential: str + """ + + _validation = { + 'server_name': {'required': True}, + 'database_name': {'required': True}, + 'table_name': {'required': True}, + 'credential': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'credential': {'key': 'credential', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobStepOutput, self).__init__(**kwargs) + self.type = kwargs.get('type', "SqlDatabase") + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group_name = kwargs.get('resource_group_name', None) + self.server_name = kwargs.get('server_name', None) + self.database_name = kwargs.get('database_name', None) + self.schema_name = kwargs.get('schema_name', "dbo") + self.table_name = kwargs.get('table_name', None) + self.credential = kwargs.get('credential', None) + + +class JobTarget(Model): + """A job target, for example a specific database or a container of databases + that is evaluated during job execution. + + All required parameters must be populated in order to send to Azure. + + :param membership_type: Whether the target is included or excluded from + the group. Possible values include: 'Include', 'Exclude'. Default value: + "Include" . + :type membership_type: str or + ~azure.mgmt.sql.models.JobTargetGroupMembershipType + :param type: Required. The target type. Possible values include: + 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + :type type: str or ~azure.mgmt.sql.models.JobTargetType + :param server_name: The target server name. + :type server_name: str + :param database_name: The target database name. + :type database_name: str + :param elastic_pool_name: The target elastic pool name. + :type elastic_pool_name: str + :param shard_map_name: The target shard map. + :type shard_map_name: str + :param refresh_credential: The resource ID of the credential that is used + during job execution to connect to the target and determine the list of + databases inside the target. + :type refresh_credential: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'membership_type': {'key': 'membershipType', 'type': 'JobTargetGroupMembershipType'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'elastic_pool_name': {'key': 'elasticPoolName', 'type': 'str'}, + 'shard_map_name': {'key': 'shardMapName', 'type': 'str'}, + 'refresh_credential': {'key': 'refreshCredential', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobTarget, self).__init__(**kwargs) + self.membership_type = kwargs.get('membership_type', "Include") + self.type = kwargs.get('type', None) + self.server_name = kwargs.get('server_name', None) + self.database_name = kwargs.get('database_name', None) + self.elastic_pool_name = kwargs.get('elastic_pool_name', None) + self.shard_map_name = kwargs.get('shard_map_name', None) + self.refresh_credential = kwargs.get('refresh_credential', None) + + +class JobTargetGroup(ProxyResource): + """A group of job targets. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param members: Required. Members of the target group. + :type members: list[~azure.mgmt.sql.models.JobTarget] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'members': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'members': {'key': 'properties.members', 'type': '[JobTarget]'}, + } + + def __init__(self, **kwargs): + super(JobTargetGroup, self).__init__(**kwargs) + self.members = kwargs.get('members', None) + + +class JobVersion(ProxyResource): + """A job version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobVersion, self).__init__(**kwargs) + + +class LicenseTypeCapability(Model): + """The license type capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: License type identifier. + :vartype name: str + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LicenseTypeCapability, self).__init__(**kwargs) + self.name = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class LocationCapabilities(Model): + """The location capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The location name. + :vartype name: str + :ivar supported_server_versions: The list of supported server versions. + :vartype supported_server_versions: + list[~azure.mgmt.sql.models.ServerVersionCapability] + :ivar supported_managed_instance_versions: The list of supported managed + instance versions. + :vartype supported_managed_instance_versions: + list[~azure.mgmt.sql.models.ManagedInstanceVersionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_server_versions': {'readonly': True}, + 'supported_managed_instance_versions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_server_versions': {'key': 'supportedServerVersions', 'type': '[ServerVersionCapability]'}, + 'supported_managed_instance_versions': {'key': 'supportedManagedInstanceVersions', 'type': '[ManagedInstanceVersionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LocationCapabilities, self).__init__(**kwargs) + self.name = None + self.supported_server_versions = None + self.supported_managed_instance_versions = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class LogSizeCapability(Model): + """The log size capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The log size limit (see 'unit' for the units). + :vartype limit: int + :ivar unit: The units that the limit is expressed in. Possible values + include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes', 'Percent' + :vartype unit: str or ~azure.mgmt.sql.models.LogSizeUnit + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'int'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LogSizeCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + + +class LongTermRetentionBackup(ProxyResource): + """A long term retention backup. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar server_name: The server name that the backup database belong to. + :vartype server_name: str + :ivar server_create_time: The create time of the server. + :vartype server_create_time: datetime + :ivar database_name: The name of the database the backup belong to + :vartype database_name: str + :ivar database_deletion_time: The delete time of the database + :vartype database_deletion_time: datetime + :ivar backup_time: The time the backup was taken + :vartype backup_time: datetime + :ivar backup_expiration_time: The time the long term retention backup will + expire. + :vartype backup_expiration_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'server_name': {'readonly': True}, + 'server_create_time': {'readonly': True}, + 'database_name': {'readonly': True}, + 'database_deletion_time': {'readonly': True}, + 'backup_time': {'readonly': True}, + 'backup_expiration_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'server_create_time': {'key': 'properties.serverCreateTime', 'type': 'iso-8601'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'database_deletion_time': {'key': 'properties.databaseDeletionTime', 'type': 'iso-8601'}, + 'backup_time': {'key': 'properties.backupTime', 'type': 'iso-8601'}, + 'backup_expiration_time': {'key': 'properties.backupExpirationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(LongTermRetentionBackup, self).__init__(**kwargs) + self.server_name = None + self.server_create_time = None + self.database_name = None + self.database_deletion_time = None + self.backup_time = None + self.backup_expiration_time = None + + +class ManagedBackupShortTermRetentionPolicy(ProxyResource): + """A short term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param retention_days: The backup retention period in days. This is how + many days Point-in-Time Restore will be supported. + :type retention_days: int + """ + + _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'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ManagedBackupShortTermRetentionPolicy, self).__init__(**kwargs) + self.retention_days = kwargs.get('retention_days', None) + + +class ManagedDatabase(TrackedResource): + """A managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param collation: Collation of the managed database. + :type collation: str + :ivar status: Status of the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' + :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus + :ivar creation_date: Creation date of the database. + :vartype creation_date: datetime + :ivar earliest_restore_point: Earliest restore point in time for point in + time restore. + :vartype earliest_restore_point: datetime + :param restore_point_in_time: Conditional. If createMode is + PointInTimeRestore, this value is required. Specifies the point in time + (ISO8601 format) of the source database that will be restored to create + the new database. + :type restore_point_in_time: datetime + :ivar default_secondary_location: Geo paired region. + :vartype default_secondary_location: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param create_mode: Managed database create mode. PointInTimeRestore: + Create a database by restoring a point in time backup of an existing + database. SourceDatabaseName, SourceManagedInstanceName and PointInTime + must be specified. RestoreExternalBackup: Create a database by restoring + from external backup files. Collation, StorageContainerUri and + StorageContainerSasToken must be specified. Recovery: Creates a database + by restoring a geo-replicated backup. RecoverableDatabaseId must be + specified as the recoverable database resource ID to restore. Possible + values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', + 'Recovery' + :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode + :param storage_container_uri: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the uri of the + storage container where backups for this restore are stored. + :type storage_container_uri: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :param restorable_dropped_database_id: The restorable dropped database + resource id to restore when creating this database. + :type restorable_dropped_database_id: str + :param storage_container_sas_token: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the storage + container sas token. + :type storage_container_sas_token: str + :ivar failover_group_id: Instance Failover Group resource identifier that + this managed database belongs to. + :vartype failover_group_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'status': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'earliest_restore_point': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedDatabase, self).__init__(**kwargs) + self.collation = kwargs.get('collation', None) + self.status = None + self.creation_date = None + self.earliest_restore_point = None + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.default_secondary_location = None + self.catalog_collation = kwargs.get('catalog_collation', None) + self.create_mode = kwargs.get('create_mode', None) + self.storage_container_uri = kwargs.get('storage_container_uri', None) + self.source_database_id = kwargs.get('source_database_id', None) + self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) + self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None) + self.failover_group_id = None + self.recoverable_database_id = kwargs.get('recoverable_database_id', None) + + +class ManagedDatabaseSecurityAlertPolicy(ProxyResource): + """A managed database security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ManagedDatabaseSecurityAlertPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.disabled_alerts = kwargs.get('disabled_alerts', None) + self.email_addresses = kwargs.get('email_addresses', None) + self.email_account_admins = kwargs.get('email_account_admins', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.creation_time = None + + +class ManagedDatabaseUpdate(Model): + """An managed database update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param collation: Collation of the managed database. + :type collation: str + :ivar status: Status of the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' + :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus + :ivar creation_date: Creation date of the database. + :vartype creation_date: datetime + :ivar earliest_restore_point: Earliest restore point in time for point in + time restore. + :vartype earliest_restore_point: datetime + :param restore_point_in_time: Conditional. If createMode is + PointInTimeRestore, this value is required. Specifies the point in time + (ISO8601 format) of the source database that will be restored to create + the new database. + :type restore_point_in_time: datetime + :ivar default_secondary_location: Geo paired region. + :vartype default_secondary_location: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param create_mode: Managed database create mode. PointInTimeRestore: + Create a database by restoring a point in time backup of an existing + database. SourceDatabaseName, SourceManagedInstanceName and PointInTime + must be specified. RestoreExternalBackup: Create a database by restoring + from external backup files. Collation, StorageContainerUri and + StorageContainerSasToken must be specified. Recovery: Creates a database + by restoring a geo-replicated backup. RecoverableDatabaseId must be + specified as the recoverable database resource ID to restore. Possible + values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', + 'Recovery' + :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode + :param storage_container_uri: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the uri of the + storage container where backups for this restore are stored. + :type storage_container_uri: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :param restorable_dropped_database_id: The restorable dropped database + resource id to restore when creating this database. + :type restorable_dropped_database_id: str + :param storage_container_sas_token: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the storage + container sas token. + :type storage_container_sas_token: str + :ivar failover_group_id: Instance Failover Group resource identifier that + this managed database belongs to. + :vartype failover_group_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'status': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'earliest_restore_point': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + } + + _attribute_map = { + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ManagedDatabaseUpdate, self).__init__(**kwargs) + self.collation = kwargs.get('collation', None) + self.status = None + self.creation_date = None + self.earliest_restore_point = None + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.default_secondary_location = None + self.catalog_collation = kwargs.get('catalog_collation', None) + self.create_mode = kwargs.get('create_mode', None) + self.storage_container_uri = kwargs.get('storage_container_uri', None) + self.source_database_id = kwargs.get('source_database_id', None) + self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) + self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None) + self.failover_group_id = None + self.recoverable_database_id = kwargs.get('recoverable_database_id', None) + self.tags = kwargs.get('tags', None) + + +class ManagedInstance(TrackedResource): + """An Azure SQL managed instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param identity: The Azure Active Directory identity of the managed + instance. + :type identity: ~azure.mgmt.sql.models.ResourceIdentity + :param sku: Managed instance SKU. Allowed values for sku.name: GP_Gen4, + GP_Gen5, BC_Gen4, BC_Gen5 + :type sku: ~azure.mgmt.sql.models.Sku + :param managed_instance_create_mode: Specifies the mode of database + creation. + Default: Regular instance creation. + Restore: Creates an instance by restoring a set of backups to specific + point in time. RestorePointInTime and SourceManagedInstanceId must be + specified. Possible values include: 'Default', 'PointInTimeRestore' + :type managed_instance_create_mode: str or + ~azure.mgmt.sql.models.ManagedServerCreateMode + :ivar fully_qualified_domain_name: The fully qualified domain name of the + managed instance. + :vartype fully_qualified_domain_name: str + :param administrator_login: Administrator username for the managed + instance. Can only be specified when the managed instance is being created + (and is required for creation). + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for managed instance creation). + :type administrator_login_password: str + :param subnet_id: Subnet resource ID for the managed instance. + :type subnet_id: str + :ivar state: The state of the managed instance. + :vartype state: str + :param license_type: The license type. Possible values are + 'LicenseIncluded' (regular price inclusive of a new SQL license) and + 'BasePrice' (discounted AHB price for bringing your own SQL licenses). + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or + ~azure.mgmt.sql.models.ManagedInstanceLicenseType + :param v_cores: The number of vCores. Allowed values: 8, 16, 24, 32, 40, + 64, 80. + :type v_cores: int + :param storage_size_in_gb: Storage size in GB. Minimum value: 32. Maximum + value: 8192. Increments of 32 GB allowed only. + :type storage_size_in_gb: int + :param collation: Collation of the managed instance. + :type collation: str + :ivar dns_zone: The Dns Zone that the managed instance is in. + :vartype dns_zone: str + :param dns_zone_partner: The resource id of another managed instance whose + DNS zone this managed instance will share after creation. + :type dns_zone_partner: str + :param public_data_endpoint_enabled: Whether or not the public data + endpoint is enabled. + :type public_data_endpoint_enabled: bool + :param source_managed_instance_id: The resource identifier of the source + managed instance associated with create operation of this instance. + :type source_managed_instance_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param proxy_override: Connection type used for connecting to the + instance. Possible values include: 'Proxy', 'Redirect', 'Default' + :type proxy_override: str or + ~azure.mgmt.sql.models.ManagedInstanceProxyOverride + :param timezone_id: Id of the timezone. Allowed values are timezones + supported by Windows. + Windows keeps details on supported timezones, including the id, in + registry under + KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time + Zones. + You can get those registry values via SQL Server by querying SELECT name + AS timezone_id FROM sys.time_zone_info. + List of Ids can also be obtained by executing + [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + An example of valid timezone id is "Pacific Standard Time" or "W. Europe + Standard Time". + :type timezone_id: str + :param instance_pool_id: The Id of the instance pool this managed server + belongs to. + :type instance_pool_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'fully_qualified_domain_name': {'readonly': True}, + 'state': {'readonly': True}, + 'dns_zone': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, + 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, + 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, + 'source_managed_instance_id': {'key': 'properties.sourceManagedInstanceId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, + 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, + 'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstance, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.sku = kwargs.get('sku', None) + self.managed_instance_create_mode = kwargs.get('managed_instance_create_mode', None) + self.fully_qualified_domain_name = None + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.state = None + self.license_type = kwargs.get('license_type', None) + self.v_cores = kwargs.get('v_cores', None) + self.storage_size_in_gb = kwargs.get('storage_size_in_gb', None) + self.collation = kwargs.get('collation', None) + self.dns_zone = None + self.dns_zone_partner = kwargs.get('dns_zone_partner', None) + self.public_data_endpoint_enabled = kwargs.get('public_data_endpoint_enabled', None) + self.source_managed_instance_id = kwargs.get('source_managed_instance_id', None) + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.proxy_override = kwargs.get('proxy_override', None) + self.timezone_id = kwargs.get('timezone_id', None) + self.instance_pool_id = kwargs.get('instance_pool_id', None) + + +class ManagedInstanceEditionCapability(Model): + """The managed server capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The managed server version name. + :vartype name: str + :ivar supported_families: The supported families. + :vartype supported_families: + list[~azure.mgmt.sql.models.ManagedInstanceFamilyCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_families': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_families': {'key': 'supportedFamilies', 'type': '[ManagedInstanceFamilyCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceEditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_families = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ManagedInstanceEncryptionProtector(ProxyResource): + """The managed instance encryption protector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :vartype kind: str + :param server_key_name: The name of the managed instance key. + :type server_key_name: str + :param server_key_type: Required. The encryption protector type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :ivar uri: The URI of the server key. + :vartype uri: str + :ivar thumbprint: Thumbprint of the server key. + :vartype thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'server_key_type': {'required': True}, + 'uri': {'readonly': True}, + 'thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceEncryptionProtector, self).__init__(**kwargs) + self.kind = None + self.server_key_name = kwargs.get('server_key_name', None) + self.server_key_type = kwargs.get('server_key_type', None) + self.uri = None + self.thumbprint = None + + +class ManagedInstanceFamilyCapability(Model): + """The managed server family capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Family name. + :vartype name: str + :ivar sku: SKU name. + :vartype sku: str + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar supported_vcores_values: List of supported virtual cores values. + :vartype supported_vcores_values: + list[~azure.mgmt.sql.models.ManagedInstanceVcoresCapability] + :ivar included_max_size: Included size. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar supported_storage_sizes: Storage size ranges. + :vartype supported_storage_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'supported_vcores_values': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'supported_storage_sizes': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'supported_vcores_values': {'key': 'supportedVcoresValues', 'type': '[ManagedInstanceVcoresCapability]'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'supported_storage_sizes': {'key': 'supportedStorageSizes', 'type': '[MaxSizeRangeCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceFamilyCapability, self).__init__(**kwargs) + self.name = None + self.sku = None + self.supported_license_types = None + self.supported_vcores_values = None + self.included_max_size = None + self.supported_storage_sizes = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ManagedInstanceKey(ProxyResource): + """A managed instance key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :vartype kind: str + :param server_key_type: Required. The key type like 'ServiceManaged', + 'AzureKeyVault'. Possible values include: 'ServiceManaged', + 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :param uri: The URI of the key. If the ServerKeyType is AzureKeyVault, + then the URI is required. + :type uri: str + :ivar thumbprint: Thumbprint of the key. + :vartype thumbprint: str + :ivar creation_date: The key creation date. + :vartype creation_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'server_key_type': {'required': True}, + 'thumbprint': {'readonly': True}, + 'creation_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceKey, self).__init__(**kwargs) + self.kind = None + self.server_key_type = kwargs.get('server_key_type', None) + self.uri = kwargs.get('uri', None) + self.thumbprint = None + self.creation_date = None + + +class ManagedInstancePairInfo(Model): + """Pairs of Managed Instances in the failover group. + + :param primary_managed_instance_id: Id of Primary Managed Instance in + pair. + :type primary_managed_instance_id: str + :param partner_managed_instance_id: Id of Partner Managed Instance in + pair. + :type partner_managed_instance_id: str + """ + + _attribute_map = { + 'primary_managed_instance_id': {'key': 'primaryManagedInstanceId', 'type': 'str'}, + 'partner_managed_instance_id': {'key': 'partnerManagedInstanceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstancePairInfo, self).__init__(**kwargs) + self.primary_managed_instance_id = kwargs.get('primary_managed_instance_id', None) + self.partner_managed_instance_id = kwargs.get('partner_managed_instance_id', None) + + +class ManagedInstanceUpdate(Model): + """An update request for an Azure SQL Database managed instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param sku: Managed instance sku + :type sku: ~azure.mgmt.sql.models.Sku + :param managed_instance_create_mode: Specifies the mode of database + creation. + Default: Regular instance creation. + Restore: Creates an instance by restoring a set of backups to specific + point in time. RestorePointInTime and SourceManagedInstanceId must be + specified. Possible values include: 'Default', 'PointInTimeRestore' + :type managed_instance_create_mode: str or + ~azure.mgmt.sql.models.ManagedServerCreateMode + :ivar fully_qualified_domain_name: The fully qualified domain name of the + managed instance. + :vartype fully_qualified_domain_name: str + :param administrator_login: Administrator username for the managed + instance. Can only be specified when the managed instance is being created + (and is required for creation). + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for managed instance creation). + :type administrator_login_password: str + :param subnet_id: Subnet resource ID for the managed instance. + :type subnet_id: str + :ivar state: The state of the managed instance. + :vartype state: str + :param license_type: The license type. Possible values are + 'LicenseIncluded' (regular price inclusive of a new SQL license) and + 'BasePrice' (discounted AHB price for bringing your own SQL licenses). + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or + ~azure.mgmt.sql.models.ManagedInstanceLicenseType + :param v_cores: The number of vCores. Allowed values: 8, 16, 24, 32, 40, + 64, 80. + :type v_cores: int + :param storage_size_in_gb: Storage size in GB. Minimum value: 32. Maximum + value: 8192. Increments of 32 GB allowed only. + :type storage_size_in_gb: int + :param collation: Collation of the managed instance. + :type collation: str + :ivar dns_zone: The Dns Zone that the managed instance is in. + :vartype dns_zone: str + :param dns_zone_partner: The resource id of another managed instance whose + DNS zone this managed instance will share after creation. + :type dns_zone_partner: str + :param public_data_endpoint_enabled: Whether or not the public data + endpoint is enabled. + :type public_data_endpoint_enabled: bool + :param source_managed_instance_id: The resource identifier of the source + managed instance associated with create operation of this instance. + :type source_managed_instance_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param proxy_override: Connection type used for connecting to the + instance. Possible values include: 'Proxy', 'Redirect', 'Default' + :type proxy_override: str or + ~azure.mgmt.sql.models.ManagedInstanceProxyOverride + :param timezone_id: Id of the timezone. Allowed values are timezones + supported by Windows. + Windows keeps details on supported timezones, including the id, in + registry under + KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time + Zones. + You can get those registry values via SQL Server by querying SELECT name + AS timezone_id FROM sys.time_zone_info. + List of Ids can also be obtained by executing + [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + An example of valid timezone id is "Pacific Standard Time" or "W. Europe + Standard Time". + :type timezone_id: str + :param instance_pool_id: The Id of the instance pool this managed server + belongs to. + :type instance_pool_id: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'fully_qualified_domain_name': {'readonly': True}, + 'state': {'readonly': True}, + 'dns_zone': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, + 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, + 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, + 'source_managed_instance_id': {'key': 'properties.sourceManagedInstanceId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, + 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, + 'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceUpdate, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.managed_instance_create_mode = kwargs.get('managed_instance_create_mode', None) + self.fully_qualified_domain_name = None + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.state = None + self.license_type = kwargs.get('license_type', None) + self.v_cores = kwargs.get('v_cores', None) + self.storage_size_in_gb = kwargs.get('storage_size_in_gb', None) + self.collation = kwargs.get('collation', None) + self.dns_zone = None + self.dns_zone_partner = kwargs.get('dns_zone_partner', None) + self.public_data_endpoint_enabled = kwargs.get('public_data_endpoint_enabled', None) + self.source_managed_instance_id = kwargs.get('source_managed_instance_id', None) + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.proxy_override = kwargs.get('proxy_override', None) + self.timezone_id = kwargs.get('timezone_id', None) + self.instance_pool_id = kwargs.get('instance_pool_id', None) + self.tags = kwargs.get('tags', None) + + +class ManagedInstanceVcoresCapability(Model): + """The managed instance virtual cores capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The virtual cores identifier. + :vartype name: str + :ivar value: The virtual cores value. + :vartype value: int + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'int'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceVcoresCapability, self).__init__(**kwargs) + self.name = None + self.value = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ManagedInstanceVersionCapability(Model): + """The managed instance capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The server version name. + :vartype name: str + :ivar supported_editions: The list of supported managed instance editions. + :vartype supported_editions: + list[~azure.mgmt.sql.models.ManagedInstanceEditionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_editions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_editions': {'key': 'supportedEditions', 'type': '[ManagedInstanceEditionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceVersionCapability, self).__init__(**kwargs) + self.name = None + self.supported_editions = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ManagedInstanceVulnerabilityAssessment(ProxyResource): + """A managed instance vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: Required. A blob storage container path to + hold the scan results (e.g. + https://myStorage.blob.core.windows.net/VaScans/). + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_container_path': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = kwargs.get('storage_container_path', None) + self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.recurring_scans = kwargs.get('recurring_scans', None) + + +class ManagedServerSecurityAlertPolicy(ProxyResource): + """A managed server security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ManagedServerSecurityAlertPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.disabled_alerts = kwargs.get('disabled_alerts', None) + self.email_addresses = kwargs.get('email_addresses', None) + self.email_account_admins = kwargs.get('email_account_admins', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.creation_time = None + + +class MaxSizeCapability(Model): + """The maximum size capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The maximum size limit (see 'unit' for the units). + :vartype limit: int + :ivar unit: The units that the limit is expressed in. Possible values + include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' + :vartype unit: str or ~azure.mgmt.sql.models.MaxSizeUnit + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'int'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MaxSizeCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + + +class MaxSizeRangeCapability(Model): + """The maximum size range capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar min_value: Minimum value. + :vartype min_value: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar max_value: Maximum value. + :vartype max_value: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar scale_size: Scale/step size for discrete values between the minimum + value and the maximum value. + :vartype scale_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar log_size: Size of transaction log. + :vartype log_size: ~azure.mgmt.sql.models.LogSizeCapability + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'min_value': {'readonly': True}, + 'max_value': {'readonly': True}, + 'scale_size': {'readonly': True}, + 'log_size': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'min_value': {'key': 'minValue', 'type': 'MaxSizeCapability'}, + 'max_value': {'key': 'maxValue', 'type': 'MaxSizeCapability'}, + 'scale_size': {'key': 'scaleSize', 'type': 'MaxSizeCapability'}, + 'log_size': {'key': 'logSize', 'type': 'LogSizeCapability'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MaxSizeRangeCapability, self).__init__(**kwargs) + self.min_value = None + self.max_value = None + self.scale_size = None + self.log_size = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class Metric(Model): + """Database metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar start_time: The start time for the metric (ISO-8601 format). + :vartype start_time: datetime + :ivar end_time: The end time for the metric (ISO-8601 format). + :vartype end_time: datetime + :ivar time_grain: The time step to be used to summarize the metric values. + :vartype time_grain: str + :ivar unit: The unit of the metric. Possible values include: 'count', + 'bytes', 'seconds', 'percent', 'countPerSecond', 'bytesPerSecond' + :vartype unit: str or ~azure.mgmt.sql.models.UnitType + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.sql.models.MetricName + :ivar metric_values: The metric values for the specified time window and + timestep. + :vartype metric_values: list[~azure.mgmt.sql.models.MetricValue] + """ + + _validation = { + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'time_grain': {'readonly': True}, + 'unit': {'readonly': True}, + 'name': {'readonly': True}, + 'metric_values': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'MetricName'}, + 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, + } + + def __init__(self, **kwargs): + super(Metric, self).__init__(**kwargs) + self.start_time = None + self.end_time = None + self.time_grain = None + self.unit = None + self.name = None + self.metric_values = None + + +class MetricAvailability(Model): + """A metric availability value. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar retention: The length of retention for the database metric. + :vartype retention: str + :ivar time_grain: The granularity of the database metric. + :vartype time_grain: str + """ + + _validation = { + 'retention': {'readonly': True}, + 'time_grain': {'readonly': True}, + } + + _attribute_map = { + 'retention': {'key': 'retention', 'type': 'str'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetricAvailability, self).__init__(**kwargs) + self.retention = None + self.time_grain = None + + +class MetricDefinition(Model): + """A database metric definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.sql.models.MetricName + :ivar primary_aggregation_type: The primary aggregation type defining how + metric values are displayed. Possible values include: 'None', 'Average', + 'Count', 'Minimum', 'Maximum', 'Total' + :vartype primary_aggregation_type: str or + ~azure.mgmt.sql.models.PrimaryAggregationType + :ivar resource_uri: The resource uri of the database. + :vartype resource_uri: str + :ivar unit: The unit of the metric. Possible values include: 'Count', + 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' + :vartype unit: str or ~azure.mgmt.sql.models.UnitDefinitionType + :ivar metric_availabilities: The list of database metric availabilities + for the metric. + :vartype metric_availabilities: + list[~azure.mgmt.sql.models.MetricAvailability] + """ + + _validation = { + 'name': {'readonly': True}, + 'primary_aggregation_type': {'readonly': True}, + 'resource_uri': {'readonly': True}, + 'unit': {'readonly': True}, + 'metric_availabilities': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'MetricName'}, + 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, + } + + def __init__(self, **kwargs): + super(MetricDefinition, self).__init__(**kwargs) + self.name = None + self.primary_aggregation_type = None + self.resource_uri = None + self.unit = None + self.metric_availabilities = None + + +class MetricName(Model): + """A database metric name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The name of the database metric. + :vartype value: str + :ivar localized_value: The friendly name of the database metric. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetricName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class MetricValue(Model): + """Represents database metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar count: The number of values for the metric. + :vartype count: float + :ivar average: The average value of the metric. + :vartype average: float + :ivar maximum: The max value of the metric. + :vartype maximum: float + :ivar minimum: The min value of the metric. + :vartype minimum: float + :ivar timestamp: The metric timestamp (ISO-8601 format). + :vartype timestamp: datetime + :ivar total: The total value of the metric. + :vartype total: float + """ + + _validation = { + 'count': {'readonly': True}, + 'average': {'readonly': True}, + 'maximum': {'readonly': True}, + 'minimum': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'total': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'float'}, + 'average': {'key': 'average', 'type': 'float'}, + 'maximum': {'key': 'maximum', 'type': 'float'}, + 'minimum': {'key': 'minimum', 'type': 'float'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'total': {'key': 'total', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(MetricValue, self).__init__(**kwargs) + self.count = None + self.average = None + self.maximum = None + self.minimum = None + self.timestamp = None + self.total = None + + +class Name(Model): + """ARM Usage Name. + + :param value: Usage name value + :type value: str + :param localized_value: Usage name localized value. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Name, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) + + +class Operation(Model): + """SQL REST API operation definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the operation being performed on this particular + object. + :vartype name: str + :ivar display: The localized display information for this particular + operation / action. + :vartype display: ~azure.mgmt.sql.models.OperationDisplay + :ivar origin: The intended executor of the operation. Possible values + include: 'user', 'system' + :vartype origin: str or ~azure.mgmt.sql.models.OperationOrigin + :ivar properties: Additional descriptions for the operation. + :vartype properties: dict[str, object] + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + 'origin': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + self.origin = None + self.properties = None + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The localized friendly form of the resource provider name. + :vartype provider: str + :ivar resource: The localized friendly form of the resource type related + to this action/operation. + :vartype resource: str + :ivar operation: The localized friendly name for the operation. + :vartype operation: str + :ivar description: The localized friendly description for the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class OperationImpact(Model): + """The impact of an operation, both in absolute and relative terms. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the impact dimension. + :vartype name: str + :ivar unit: The unit in which estimated impact to dimension is measured. + :vartype unit: str + :ivar change_value_absolute: The absolute impact to dimension. + :vartype change_value_absolute: float + :ivar change_value_relative: The relative impact to dimension (null if not + applicable) + :vartype change_value_relative: float + """ + + _validation = { + 'name': {'readonly': True}, + 'unit': {'readonly': True}, + 'change_value_absolute': {'readonly': True}, + 'change_value_relative': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'change_value_absolute': {'key': 'changeValueAbsolute', 'type': 'float'}, + 'change_value_relative': {'key': 'changeValueRelative', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(OperationImpact, self).__init__(**kwargs) + self.name = None + self.unit = None + self.change_value_absolute = None + self.change_value_relative = None + + +class PartnerInfo(Model): + """Partner server information for the failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource identifier of the partner server. + :type id: str + :ivar location: Geo location of the partner server. + :vartype location: str + :ivar replication_role: Replication role of the partner server. Possible + values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.FailoverGroupReplicationRole + """ + + _validation = { + 'id': {'required': True}, + 'location': {'readonly': True}, + 'replication_role': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'replication_role': {'key': 'replicationRole', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PartnerInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.location = None + self.replication_role = None + + +class PartnerRegionInfo(Model): + """Partner region information for the failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param location: Geo location of the partner managed instances. + :type location: str + :ivar replication_role: Replication role of the partner managed instances. + Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole + """ + + _validation = { + 'replication_role': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'replication_role': {'key': 'replicationRole', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PartnerRegionInfo, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.replication_role = None + + +class PerformanceLevelCapability(Model): + """The performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: Performance level value. + :vartype value: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + """ + + _validation = { + 'value': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PerformanceLevelCapability, self).__init__(**kwargs) + self.value = None + self.unit = None + + +class RecommendedElasticPool(ProxyResource): + """Represents a recommended elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_edition: The edition of the recommended elastic pool. The + ElasticPoolEdition enumeration contains all the valid editions. Possible + values include: 'Basic', 'Standard', 'Premium', 'GeneralPurpose', + 'BusinessCritical' + :vartype database_edition: str or + ~azure.mgmt.sql.models.ElasticPoolEdition + :param dtu: The DTU for the recommended elastic pool. + :type dtu: float + :param database_dtu_min: The minimum DTU for the database. + :type database_dtu_min: float + :param database_dtu_max: The maximum DTU for the database. + :type database_dtu_max: float + :param storage_mb: Gets storage size in megabytes. + :type storage_mb: float + :ivar observation_period_start: The observation period start (ISO8601 + format). + :vartype observation_period_start: datetime + :ivar observation_period_end: The observation period start (ISO8601 + format). + :vartype observation_period_end: datetime + :ivar max_observed_dtu: Gets maximum observed DTU. + :vartype max_observed_dtu: float + :ivar max_observed_storage_mb: Gets maximum observed storage in megabytes. + :vartype max_observed_storage_mb: float + :ivar databases: The list of databases in this pool. Expanded property + :vartype databases: list[~azure.mgmt.sql.models.TrackedResource] + :ivar metrics: The list of databases housed in the server. Expanded + property + :vartype metrics: + list[~azure.mgmt.sql.models.RecommendedElasticPoolMetric] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_edition': {'readonly': True}, + 'observation_period_start': {'readonly': True}, + 'observation_period_end': {'readonly': True}, + 'max_observed_dtu': {'readonly': True}, + 'max_observed_storage_mb': {'readonly': True}, + 'databases': {'readonly': True}, + 'metrics': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'dtu': {'key': 'properties.dtu', 'type': 'float'}, + 'database_dtu_min': {'key': 'properties.databaseDtuMin', 'type': 'float'}, + 'database_dtu_max': {'key': 'properties.databaseDtuMax', 'type': 'float'}, + 'storage_mb': {'key': 'properties.storageMB', 'type': 'float'}, + 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, + 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, + 'max_observed_dtu': {'key': 'properties.maxObservedDtu', 'type': 'float'}, + 'max_observed_storage_mb': {'key': 'properties.maxObservedStorageMB', 'type': 'float'}, + 'databases': {'key': 'properties.databases', 'type': '[TrackedResource]'}, + 'metrics': {'key': 'properties.metrics', 'type': '[RecommendedElasticPoolMetric]'}, + } + + def __init__(self, **kwargs): + super(RecommendedElasticPool, self).__init__(**kwargs) + self.database_edition = None + self.dtu = kwargs.get('dtu', None) + self.database_dtu_min = kwargs.get('database_dtu_min', None) + self.database_dtu_max = kwargs.get('database_dtu_max', None) + self.storage_mb = kwargs.get('storage_mb', None) + self.observation_period_start = None + self.observation_period_end = None + self.max_observed_dtu = None + self.max_observed_storage_mb = None + self.databases = None + self.metrics = None + + +class RecommendedElasticPoolMetric(Model): + """Represents recommended elastic pool metric. + + :param date_time_property: The time of metric (ISO8601 format). + :type date_time_property: datetime + :param dtu: Gets or sets the DTUs (Database Transaction Units). See + https://azure.microsoft.com/documentation/articles/sql-database-what-is-a-dtu/ + :type dtu: float + :param size_gb: Gets or sets size in gigabytes. + :type size_gb: float + """ + + _attribute_map = { + 'date_time_property': {'key': 'dateTime', 'type': 'iso-8601'}, + 'dtu': {'key': 'dtu', 'type': 'float'}, + 'size_gb': {'key': 'sizeGB', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(RecommendedElasticPoolMetric, self).__init__(**kwargs) + self.date_time_property = kwargs.get('date_time_property', None) + self.dtu = kwargs.get('dtu', None) + self.size_gb = kwargs.get('size_gb', None) + + +class RecommendedIndex(ProxyResource): + """Represents a database recommended index. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar action: The proposed index action. You can create a missing index, + drop an unused index, or rebuild an existing index to improve its + performance. Possible values include: 'Create', 'Drop', 'Rebuild' + :vartype action: str or ~azure.mgmt.sql.models.RecommendedIndexAction + :ivar state: The current recommendation state. Possible values include: + 'Active', 'Pending', 'Executing', 'Verifying', 'Pending Revert', + 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success' + :vartype state: str or ~azure.mgmt.sql.models.RecommendedIndexState + :ivar created: The UTC datetime showing when this resource was created + (ISO8601 format). + :vartype created: datetime + :ivar last_modified: The UTC datetime of when was this resource last + changed (ISO8601 format). + :vartype last_modified: datetime + :ivar index_type: The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, + CLUSTERED COLUMNSTORE). Possible values include: 'CLUSTERED', + 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED COLUMNSTORE' + :vartype index_type: str or ~azure.mgmt.sql.models.RecommendedIndexType + :ivar schema: The schema where table to build index over resides + :vartype schema: str + :ivar table: The table on which to build index. + :vartype table: str + :ivar columns: Columns over which to build index + :vartype columns: list[str] + :ivar included_columns: The list of column names to be included in the + index + :vartype included_columns: list[str] + :ivar index_script: The full build index script + :vartype index_script: str + :ivar estimated_impact: The estimated impact of doing recommended index + action. + :vartype estimated_impact: list[~azure.mgmt.sql.models.OperationImpact] + :ivar reported_impact: The values reported after index action is complete. + :vartype reported_impact: list[~azure.mgmt.sql.models.OperationImpact] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'action': {'readonly': True}, + 'state': {'readonly': True}, + 'created': {'readonly': True}, + 'last_modified': {'readonly': True}, + 'index_type': {'readonly': True}, + 'schema': {'readonly': True}, + 'table': {'readonly': True}, + 'columns': {'readonly': True}, + 'included_columns': {'readonly': True}, + 'index_script': {'readonly': True}, + 'estimated_impact': {'readonly': True}, + 'reported_impact': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'action': {'key': 'properties.action', 'type': 'RecommendedIndexAction'}, + 'state': {'key': 'properties.state', 'type': 'RecommendedIndexState'}, + 'created': {'key': 'properties.created', 'type': 'iso-8601'}, + 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, + 'index_type': {'key': 'properties.indexType', 'type': 'RecommendedIndexType'}, + 'schema': {'key': 'properties.schema', 'type': 'str'}, + 'table': {'key': 'properties.table', 'type': 'str'}, + 'columns': {'key': 'properties.columns', 'type': '[str]'}, + 'included_columns': {'key': 'properties.includedColumns', 'type': '[str]'}, + 'index_script': {'key': 'properties.indexScript', 'type': 'str'}, + 'estimated_impact': {'key': 'properties.estimatedImpact', 'type': '[OperationImpact]'}, + 'reported_impact': {'key': 'properties.reportedImpact', 'type': '[OperationImpact]'}, + } + + def __init__(self, **kwargs): + super(RecommendedIndex, self).__init__(**kwargs) + self.action = None + self.state = None + self.created = None + self.last_modified = None + self.index_type = None + self.schema = None + self.table = None + self.columns = None + self.included_columns = None + self.index_script = None + self.estimated_impact = None + self.reported_impact = None + + +class RecoverableDatabase(ProxyResource): + """A recoverable database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar edition: The edition of the database + :vartype edition: str + :ivar service_level_objective: The service level objective name of the + database + :vartype service_level_objective: str + :ivar elastic_pool_name: The elastic pool name of the database + :vartype elastic_pool_name: str + :ivar last_available_backup_date: The last available backup date of the + database (ISO8601 format) + :vartype last_available_backup_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'edition': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'last_available_backup_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(RecoverableDatabase, self).__init__(**kwargs) + self.edition = None + self.service_level_objective = None + self.elastic_pool_name = None + self.last_available_backup_date = None + + +class RecoverableManagedDatabase(ProxyResource): + """A recoverable managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar last_available_backup_date: The last available backup date. + :vartype last_available_backup_date: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_available_backup_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RecoverableManagedDatabase, self).__init__(**kwargs) + self.last_available_backup_date = None + + +class ReplicationLink(ProxyResource): + """Represents a database replication link. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Location of the server that contains this firewall rule. + :vartype location: str + :ivar is_termination_allowed: Legacy value indicating whether termination + is allowed. Currently always returns true. + :vartype is_termination_allowed: bool + :ivar replication_mode: Replication mode of this replication link. + :vartype replication_mode: str + :ivar partner_server: The name of the server hosting the partner database. + :vartype partner_server: str + :ivar partner_database: The name of the partner database. + :vartype partner_database: str + :ivar partner_location: The Azure Region of the partner database. + :vartype partner_location: str + :ivar role: The role of the database in the replication link. Possible + values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', + 'Copy' + :vartype role: str or ~azure.mgmt.sql.models.ReplicationRole + :ivar partner_role: The role of the partner database in the replication + link. Possible values include: 'Primary', 'Secondary', + 'NonReadableSecondary', 'Source', 'Copy' + :vartype partner_role: str or ~azure.mgmt.sql.models.ReplicationRole + :ivar start_time: The start time for the replication link. + :vartype start_time: datetime + :ivar percent_complete: The percentage of seeding complete for the + replication link. + :vartype percent_complete: int + :ivar replication_state: The replication state for the replication link. + Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP', 'SUSPENDED' + :vartype replication_state: str or ~azure.mgmt.sql.models.ReplicationState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'is_termination_allowed': {'readonly': True}, + 'replication_mode': {'readonly': True}, + 'partner_server': {'readonly': True}, + 'partner_database': {'readonly': True}, + 'partner_location': {'readonly': True}, + 'role': {'readonly': True}, + 'partner_role': {'readonly': True}, + 'start_time': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'replication_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'is_termination_allowed': {'key': 'properties.isTerminationAllowed', 'type': 'bool'}, + 'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'}, + 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, + 'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'}, + 'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'}, + 'role': {'key': 'properties.role', 'type': 'ReplicationRole'}, + 'partner_role': {'key': 'properties.partnerRole', 'type': 'ReplicationRole'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ReplicationLink, self).__init__(**kwargs) + self.location = None + self.is_termination_allowed = None + self.replication_mode = None + self.partner_server = None + self.partner_database = None + self.partner_location = None + self.role = None + self.partner_role = None + self.start_time = None + self.percent_complete = None + self.replication_state = None + + +class ResourceIdentity(Model): + """Azure Active Directory identity configuration for a resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The Azure Active Directory principal id. + :vartype principal_id: str + :param type: The identity type. Set this to 'SystemAssigned' in order to + automatically create and assign an Azure Active Directory principal for + the resource. Possible values include: 'SystemAssigned' + :type type: str or ~azure.mgmt.sql.models.IdentityType + :ivar tenant_id: The Azure Active Directory tenant id. + :vartype tenant_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.type = kwargs.get('type', None) + self.tenant_id = None + + +class ResourceMoveDefinition(Model): + """Contains the information necessary to perform a resource move (rename). + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The target ID for the resource + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceMoveDefinition, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class RestorableDroppedDatabase(ProxyResource): + """A restorable dropped database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: The geo-location where the resource lives + :vartype location: str + :ivar database_name: The name of the database + :vartype database_name: str + :ivar edition: The edition of the database + :vartype edition: str + :ivar max_size_bytes: The max size in bytes of the database + :vartype max_size_bytes: str + :ivar service_level_objective: The service level objective name of the + database + :vartype service_level_objective: str + :ivar elastic_pool_name: The elastic pool name of the database + :vartype elastic_pool_name: str + :ivar creation_date: The creation date of the database (ISO8601 format) + :vartype creation_date: datetime + :ivar deletion_date: The deletion date of the database (ISO8601 format) + :vartype deletion_date: datetime + :ivar earliest_restore_date: The earliest restore date of the database + (ISO8601 format) + :vartype earliest_restore_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'database_name': {'readonly': True}, + 'edition': {'readonly': True}, + 'max_size_bytes': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(RestorableDroppedDatabase, self).__init__(**kwargs) + self.location = None + self.database_name = None + self.edition = None + self.max_size_bytes = None + self.service_level_objective = None + self.elastic_pool_name = None + self.creation_date = None + self.deletion_date = None + self.earliest_restore_date = None + + +class RestorableDroppedManagedDatabase(TrackedResource): + """A restorable dropped managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar database_name: The name of the database. + :vartype database_name: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar deletion_date: The deletion date of the database (ISO8601 format). + :vartype deletion_date: datetime + :ivar earliest_restore_date: The earliest restore date of the database + (ISO8601 format). + :vartype earliest_restore_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'database_name': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(RestorableDroppedManagedDatabase, self).__init__(**kwargs) + self.database_name = None + self.creation_date = None + self.deletion_date = None + self.earliest_restore_date = None + + +class RestorePoint(ProxyResource): + """Database restore points. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar restore_point_type: The type of restore point. Possible values + include: 'CONTINUOUS', 'DISCRETE' + :vartype restore_point_type: str or + ~azure.mgmt.sql.models.RestorePointType + :ivar earliest_restore_date: The earliest time to which this database can + be restored + :vartype earliest_restore_date: datetime + :ivar restore_point_creation_date: The time the backup was taken + :vartype restore_point_creation_date: datetime + :ivar restore_point_label: The label of restore point for backup request + by user + :vartype restore_point_label: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'restore_point_type': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'restore_point_creation_date': {'readonly': True}, + 'restore_point_label': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'restore_point_type': {'key': 'properties.restorePointType', 'type': 'RestorePointType'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, + 'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RestorePoint, self).__init__(**kwargs) + self.location = None + self.restore_point_type = None + self.earliest_restore_date = None + self.restore_point_creation_date = None + self.restore_point_label = None + + +class SensitivityLabel(ProxyResource): + """A sensitivity label. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param label_name: The label name. + :type label_name: str + :param label_id: The label ID. + :type label_id: str + :param information_type: The information type. + :type information_type: str + :param information_type_id: The information type ID. + :type information_type_id: str + :ivar is_disabled: Is sensitivity recommendation disabled. Applicable for + recommended sensitivity label only. Specifies whether the sensitivity + recommendation on this column is disabled (dismissed) or not. + :vartype is_disabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'is_disabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'label_name': {'key': 'properties.labelName', 'type': 'str'}, + 'label_id': {'key': 'properties.labelId', 'type': 'str'}, + 'information_type': {'key': 'properties.informationType', 'type': 'str'}, + 'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'}, + 'is_disabled': {'key': 'properties.isDisabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(SensitivityLabel, self).__init__(**kwargs) + self.label_name = kwargs.get('label_name', None) + self.label_id = kwargs.get('label_id', None) + self.information_type = kwargs.get('information_type', None) + self.information_type_id = kwargs.get('information_type_id', None) + self.is_disabled = None + + +class Server(TrackedResource): + """An Azure SQL Database server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param identity: The Azure Active Directory identity of the server. + :type identity: ~azure.mgmt.sql.models.ResourceIdentity + :ivar kind: Kind of sql server. This is metadata used for the Azure portal + experience. + :vartype kind: str + :param administrator_login: Administrator username for the server. Once + created it cannot be changed. + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for server creation). + :type administrator_login_password: str + :param version: The version of the server. + :type version: str + :ivar state: The state of the server. + :vartype state: str + :ivar fully_qualified_domain_name: The fully qualified domain name of the + server. + :vartype fully_qualified_domain_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'state': {'readonly': True}, + 'fully_qualified_domain_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Server, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.kind = None + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.version = kwargs.get('version', None) + self.state = None + self.fully_qualified_domain_name = None + + +class ServerAutomaticTuning(ProxyResource): + """Server-level Automatic Tuning. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param desired_state: Automatic tuning desired state. Possible values + include: 'Custom', 'Auto', 'Unspecified' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningServerMode + :ivar actual_state: Automatic tuning actual state. Possible values + include: 'Custom', 'Auto', 'Unspecified' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningServerMode + :param options: Automatic tuning options definition. + :type options: dict[str, + ~azure.mgmt.sql.models.AutomaticTuningServerOptions] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'actual_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningServerMode'}, + 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningServerMode'}, + 'options': {'key': 'properties.options', 'type': '{AutomaticTuningServerOptions}'}, + } + + def __init__(self, **kwargs): + super(ServerAutomaticTuning, self).__init__(**kwargs) + self.desired_state = kwargs.get('desired_state', None) + self.actual_state = None + self.options = kwargs.get('options', None) + + +class ServerAzureADAdministrator(ProxyResource): + """An server Active Directory Administrator. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar administrator_type: Required. The type of administrator. Default + value: "ActiveDirectory" . + :vartype administrator_type: str + :param login: Required. The server administrator login value. + :type login: str + :param sid: Required. The server administrator Sid (Secure ID). + :type sid: str + :param tenant_id: Required. The server Active Directory Administrator + tenant id. + :type tenant_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'administrator_type': {'required': True, 'constant': True}, + 'login': {'required': True}, + 'sid': {'required': True}, + 'tenant_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, + 'login': {'key': 'properties.login', 'type': 'str'}, + 'sid': {'key': 'properties.sid', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + } + + administrator_type = "ActiveDirectory" + + def __init__(self, **kwargs): + super(ServerAzureADAdministrator, self).__init__(**kwargs) + self.login = kwargs.get('login', None) + self.sid = kwargs.get('sid', None) + self.tenant_id = kwargs.get('tenant_id', None) + + +class ServerBlobAuditingPolicy(ProxyResource): + """A server blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ServerBlobAuditingPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) + self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) + self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) + self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) + + +class ServerCommunicationLink(ProxyResource): + """Server communication link. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar state: The state. + :vartype state: str + :param partner_server: Required. The name of the partner server. + :type partner_server: str + :ivar location: Communication link location. + :vartype location: str + :ivar kind: Communication link kind. This property is used for Azure + Portal metadata. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'partner_server': {'required': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerCommunicationLink, self).__init__(**kwargs) + self.state = None + self.partner_server = kwargs.get('partner_server', None) + self.location = None + self.kind = None + + +class ServerConnectionPolicy(ProxyResource): + """A server secure connection policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Metadata used for the Azure portal experience. + :vartype kind: str + :ivar location: Resource location. + :vartype location: str + :param connection_type: Required. The server connection type. Possible + values include: 'Default', 'Proxy', 'Redirect' + :type connection_type: str or ~azure.mgmt.sql.models.ServerConnectionType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + 'connection_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'connection_type': {'key': 'properties.connectionType', 'type': 'ServerConnectionType'}, + } + + def __init__(self, **kwargs): + super(ServerConnectionPolicy, self).__init__(**kwargs) + self.kind = None + self.location = None + self.connection_type = kwargs.get('connection_type', None) + + +class ServerDnsAlias(ProxyResource): + """A server DNS alias. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar azure_dns_record: The fully qualified DNS record for alias + :vartype azure_dns_record: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'azure_dns_record': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'azure_dns_record': {'key': 'properties.azureDnsRecord', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerDnsAlias, self).__init__(**kwargs) + self.azure_dns_record = None + + +class ServerDnsAliasAcquisition(Model): + """A server DNS alias acquisition request. + + :param old_server_dns_alias_id: The id of the server alias that will be + acquired to point to this server instead. + :type old_server_dns_alias_id: str + """ + + _attribute_map = { + 'old_server_dns_alias_id': {'key': 'oldServerDnsAliasId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerDnsAliasAcquisition, self).__init__(**kwargs) + self.old_server_dns_alias_id = kwargs.get('old_server_dns_alias_id', None) + + +class ServerKey(ProxyResource): + """A server key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :type kind: str + :ivar location: Resource location. + :vartype location: str + :ivar subregion: Subregion of the server key. + :vartype subregion: str + :param server_key_type: Required. The server key type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :param uri: The URI of the server key. + :type uri: str + :param thumbprint: Thumbprint of the server key. + :type thumbprint: str + :param creation_date: The server key creation date. + :type creation_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'subregion': {'readonly': True}, + 'server_key_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'subregion': {'key': 'properties.subregion', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ServerKey, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + self.location = None + self.subregion = None + self.server_key_type = kwargs.get('server_key_type', None) + self.uri = kwargs.get('uri', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.creation_date = kwargs.get('creation_date', None) + + +class ServerSecurityAlertPolicy(ProxyResource): + """A server security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ServerSecurityAlertPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.disabled_alerts = kwargs.get('disabled_alerts', None) + self.email_addresses = kwargs.get('email_addresses', None) + self.email_account_admins = kwargs.get('email_account_admins', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.creation_time = None + + +class ServerUpdate(Model): + """An update request for an Azure SQL Database server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param administrator_login: Administrator username for the server. Once + created it cannot be changed. + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for server creation). + :type administrator_login_password: str + :param version: The version of the server. + :type version: str + :ivar state: The state of the server. + :vartype state: str + :ivar fully_qualified_domain_name: The fully qualified domain name of the + server. + :vartype fully_qualified_domain_name: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'state': {'readonly': True}, + 'fully_qualified_domain_name': {'readonly': True}, + } + + _attribute_map = { + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ServerUpdate, self).__init__(**kwargs) + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.version = kwargs.get('version', None) + self.state = None + self.fully_qualified_domain_name = None + self.tags = kwargs.get('tags', None) + + +class ServerUsage(Model): + """Represents server metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the server usage metric. + :vartype name: str + :ivar resource_name: The name of the resource. + :vartype resource_name: str + :ivar display_name: The metric display name. + :vartype display_name: str + :ivar current_value: The current value of the metric. + :vartype current_value: float + :ivar limit: The current limit of the metric. + :vartype limit: float + :ivar unit: The units of the metric. + :vartype unit: str + :ivar next_reset_time: The next reset time for the metric (ISO8601 + format). + :vartype next_reset_time: datetime + """ + + _validation = { + 'name': {'readonly': True}, + 'resource_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'next_reset_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ServerUsage, self).__init__(**kwargs) + self.name = None + self.resource_name = None + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + self.next_reset_time = None + + +class ServerVersionCapability(Model): + """The server capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The server version name. + :vartype name: str + :ivar supported_editions: The list of supported database editions. + :vartype supported_editions: + list[~azure.mgmt.sql.models.EditionCapability] + :ivar supported_elastic_pool_editions: The list of supported elastic pool + editions. + :vartype supported_elastic_pool_editions: + list[~azure.mgmt.sql.models.ElasticPoolEditionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_editions': {'readonly': True}, + 'supported_elastic_pool_editions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_editions': {'key': 'supportedEditions', 'type': '[EditionCapability]'}, + 'supported_elastic_pool_editions': {'key': 'supportedElasticPoolEditions', 'type': '[ElasticPoolEditionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerVersionCapability, self).__init__(**kwargs) + self.name = None + self.supported_editions = None + self.supported_elastic_pool_editions = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ServerVulnerabilityAssessment(ProxyResource): + """A server vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: Required. A blob storage container path to + hold the scan results (e.g. + https://myStorage.blob.core.windows.net/VaScans/). + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_container_path': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, **kwargs): + super(ServerVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = kwargs.get('storage_container_path', None) + self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.recurring_scans = kwargs.get('recurring_scans', None) + + +class ServiceObjective(ProxyResource): + """Represents a database service objective. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar service_objective_name: The name for the service objective. + :vartype service_objective_name: str + :ivar is_default: Gets whether the service level objective is the default + service objective. + :vartype is_default: bool + :ivar is_system: Gets whether the service level objective is a system + service objective. + :vartype is_system: bool + :ivar description: The description for the service level objective. + :vartype description: str + :ivar enabled: Gets whether the service level objective is enabled. + :vartype enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'service_objective_name': {'readonly': True}, + 'is_default': {'readonly': True}, + 'is_system': {'readonly': True}, + 'description': {'readonly': True}, + 'enabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'service_objective_name': {'key': 'properties.serviceObjectiveName', 'type': 'str'}, + 'is_default': {'key': 'properties.isDefault', 'type': 'bool'}, + 'is_system': {'key': 'properties.isSystem', 'type': 'bool'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ServiceObjective, self).__init__(**kwargs) + self.service_objective_name = None + self.is_default = None + self.is_system = None + self.description = None + self.enabled = None + + +class ServiceObjectiveCapability(Model): + """The service objectives capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique ID of the service objective. + :vartype id: str + :ivar name: The service objective name. + :vartype name: str + :ivar supported_max_sizes: The list of supported maximum database sizes. + :vartype supported_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar performance_level: The performance level. + :vartype performance_level: + ~azure.mgmt.sql.models.PerformanceLevelCapability + :ivar sku: The sku. + :vartype sku: ~azure.mgmt.sql.models.Sku + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar included_max_size: The included (free) max size. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'supported_max_sizes': {'readonly': True}, + 'performance_level': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceObjectiveCapability, self).__init__(**kwargs) + self.id = None + self.name = None + self.supported_max_sizes = None + self.performance_level = None + self.sku = None + self.supported_license_types = None + self.included_max_size = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ServiceTierAdvisor(ProxyResource): + """Represents a Service Tier Advisor. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar observation_period_start: The observation period start (ISO8601 + format). + :vartype observation_period_start: datetime + :ivar observation_period_end: The observation period start (ISO8601 + format). + :vartype observation_period_end: datetime + :ivar active_time_ratio: The activeTimeRatio for service tier advisor. + :vartype active_time_ratio: float + :ivar min_dtu: Gets or sets minDtu for service tier advisor. + :vartype min_dtu: float + :ivar avg_dtu: Gets or sets avgDtu for service tier advisor. + :vartype avg_dtu: float + :ivar max_dtu: Gets or sets maxDtu for service tier advisor. + :vartype max_dtu: float + :ivar max_size_in_gb: Gets or sets maxSizeInGB for service tier advisor. + :vartype max_size_in_gb: float + :ivar service_level_objective_usage_metrics: Gets or sets + serviceLevelObjectiveUsageMetrics for the service tier advisor. + :vartype service_level_objective_usage_metrics: + list[~azure.mgmt.sql.models.SloUsageMetric] + :ivar current_service_level_objective: Gets or sets + currentServiceLevelObjective for service tier advisor. + :vartype current_service_level_objective: str + :ivar current_service_level_objective_id: Gets or sets + currentServiceLevelObjectiveId for service tier advisor. + :vartype current_service_level_objective_id: str + :ivar usage_based_recommendation_service_level_objective: Gets or sets + usageBasedRecommendationServiceLevelObjective for service tier advisor. + :vartype usage_based_recommendation_service_level_objective: str + :ivar usage_based_recommendation_service_level_objective_id: Gets or sets + usageBasedRecommendationServiceLevelObjectiveId for service tier advisor. + :vartype usage_based_recommendation_service_level_objective_id: str + :ivar database_size_based_recommendation_service_level_objective: Gets or + sets databaseSizeBasedRecommendationServiceLevelObjective for service tier + advisor. + :vartype database_size_based_recommendation_service_level_objective: str + :ivar database_size_based_recommendation_service_level_objective_id: Gets + or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service + tier advisor. + :vartype database_size_based_recommendation_service_level_objective_id: + str + :ivar disaster_plan_based_recommendation_service_level_objective: Gets or + sets disasterPlanBasedRecommendationServiceLevelObjective for service tier + advisor. + :vartype disaster_plan_based_recommendation_service_level_objective: str + :ivar disaster_plan_based_recommendation_service_level_objective_id: Gets + or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service + tier advisor. + :vartype disaster_plan_based_recommendation_service_level_objective_id: + str + :ivar overall_recommendation_service_level_objective: Gets or sets + overallRecommendationServiceLevelObjective for service tier advisor. + :vartype overall_recommendation_service_level_objective: str + :ivar overall_recommendation_service_level_objective_id: Gets or sets + overallRecommendationServiceLevelObjectiveId for service tier advisor. + :vartype overall_recommendation_service_level_objective_id: str + :ivar confidence: Gets or sets confidence for service tier advisor. + :vartype confidence: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'observation_period_start': {'readonly': True}, + 'observation_period_end': {'readonly': True}, + 'active_time_ratio': {'readonly': True}, + 'min_dtu': {'readonly': True}, + 'avg_dtu': {'readonly': True}, + 'max_dtu': {'readonly': True}, + 'max_size_in_gb': {'readonly': True}, + 'service_level_objective_usage_metrics': {'readonly': True}, + 'current_service_level_objective': {'readonly': True}, + 'current_service_level_objective_id': {'readonly': True}, + 'usage_based_recommendation_service_level_objective': {'readonly': True}, + 'usage_based_recommendation_service_level_objective_id': {'readonly': True}, + 'database_size_based_recommendation_service_level_objective': {'readonly': True}, + 'database_size_based_recommendation_service_level_objective_id': {'readonly': True}, + 'disaster_plan_based_recommendation_service_level_objective': {'readonly': True}, + 'disaster_plan_based_recommendation_service_level_objective_id': {'readonly': True}, + 'overall_recommendation_service_level_objective': {'readonly': True}, + 'overall_recommendation_service_level_objective_id': {'readonly': True}, + 'confidence': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, + 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, + 'active_time_ratio': {'key': 'properties.activeTimeRatio', 'type': 'float'}, + 'min_dtu': {'key': 'properties.minDtu', 'type': 'float'}, + 'avg_dtu': {'key': 'properties.avgDtu', 'type': 'float'}, + 'max_dtu': {'key': 'properties.maxDtu', 'type': 'float'}, + 'max_size_in_gb': {'key': 'properties.maxSizeInGB', 'type': 'float'}, + 'service_level_objective_usage_metrics': {'key': 'properties.serviceLevelObjectiveUsageMetrics', 'type': '[SloUsageMetric]'}, + 'current_service_level_objective': {'key': 'properties.currentServiceLevelObjective', 'type': 'str'}, + 'current_service_level_objective_id': {'key': 'properties.currentServiceLevelObjectiveId', 'type': 'str'}, + 'usage_based_recommendation_service_level_objective': {'key': 'properties.usageBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'usage_based_recommendation_service_level_objective_id': {'key': 'properties.usageBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'database_size_based_recommendation_service_level_objective': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'database_size_based_recommendation_service_level_objective_id': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'disaster_plan_based_recommendation_service_level_objective': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'disaster_plan_based_recommendation_service_level_objective_id': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'overall_recommendation_service_level_objective': {'key': 'properties.overallRecommendationServiceLevelObjective', 'type': 'str'}, + 'overall_recommendation_service_level_objective_id': {'key': 'properties.overallRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'confidence': {'key': 'properties.confidence', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ServiceTierAdvisor, self).__init__(**kwargs) + self.observation_period_start = None + self.observation_period_end = None + self.active_time_ratio = None + self.min_dtu = None + self.avg_dtu = None + self.max_dtu = None + self.max_size_in_gb = None + self.service_level_objective_usage_metrics = None + self.current_service_level_objective = None + self.current_service_level_objective_id = None + self.usage_based_recommendation_service_level_objective = None + self.usage_based_recommendation_service_level_objective_id = None + self.database_size_based_recommendation_service_level_objective = None + self.database_size_based_recommendation_service_level_objective_id = None + self.disaster_plan_based_recommendation_service_level_objective = None + self.disaster_plan_based_recommendation_service_level_objective_id = None + self.overall_recommendation_service_level_objective = None + self.overall_recommendation_service_level_objective_id = None + self.confidence = None + + +class Sku(Model): + """The resource model definition representing SKU. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Ex - P3. It is typically a + letter+number code + :type name: str + :param tier: This field is required to be implemented by the Resource + Provider if the service has more than one tier, but is not required on a + PUT. + :type tier: str + :param size: The SKU size. When the name field is the combination of tier + and some other value, this would be the standalone code. + :type size: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :param capacity: If the SKU supports scale out/in then the capacity + integer should be included. If scale out/in is not possible for the + resource this may be omitted. + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.size = kwargs.get('size', None) + self.family = kwargs.get('family', None) + self.capacity = kwargs.get('capacity', None) + + +class SloUsageMetric(Model): + """A Slo Usage Metric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar service_level_objective: The serviceLevelObjective for SLO usage + metric. Possible values include: 'System', 'System0', 'System1', + 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', + 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', + 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', + 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', + 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', + 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', + 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', + 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' + :vartype service_level_objective: str or + ~azure.mgmt.sql.models.ServiceObjectiveName + :ivar service_level_objective_id: The serviceLevelObjectiveId for SLO + usage metric. + :vartype service_level_objective_id: str + :ivar in_range_time_ratio: Gets or sets inRangeTimeRatio for SLO usage + metric. + :vartype in_range_time_ratio: float + """ + + _validation = { + 'service_level_objective': {'readonly': True}, + 'service_level_objective_id': {'readonly': True}, + 'in_range_time_ratio': {'readonly': True}, + } + + _attribute_map = { + 'service_level_objective': {'key': 'serviceLevelObjective', 'type': 'str'}, + 'service_level_objective_id': {'key': 'serviceLevelObjectiveId', 'type': 'str'}, + 'in_range_time_ratio': {'key': 'inRangeTimeRatio', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(SloUsageMetric, self).__init__(**kwargs) + self.service_level_objective = None + self.service_level_objective_id = None + self.in_range_time_ratio = None + + +class SubscriptionUsage(ProxyResource): + """Usage Metric of a Subscription in a Location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar display_name: User-readable name of the metric. + :vartype display_name: str + :ivar current_value: Current value of the metric. + :vartype current_value: float + :ivar limit: Boundary value of the metric. + :vartype limit: float + :ivar unit: Unit of the metric. + :vartype unit: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'current_value': {'key': 'properties.currentValue', 'type': 'float'}, + 'limit': {'key': 'properties.limit', 'type': 'float'}, + 'unit': {'key': 'properties.unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubscriptionUsage, self).__init__(**kwargs) + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + + +class SyncAgent(ProxyResource): + """An Azure SQL Database sync agent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar sync_agent_name: Name of the sync agent. + :vartype sync_agent_name: str + :param sync_database_id: ARM resource id of the sync database in the sync + agent. + :type sync_database_id: str + :ivar last_alive_time: Last alive time of the sync agent. + :vartype last_alive_time: datetime + :ivar state: State of the sync agent. Possible values include: 'Online', + 'Offline', 'NeverConnected' + :vartype state: str or ~azure.mgmt.sql.models.SyncAgentState + :ivar is_up_to_date: If the sync agent version is up to date. + :vartype is_up_to_date: bool + :ivar expiry_time: Expiration time of the sync agent version. + :vartype expiry_time: datetime + :ivar version: Version of the sync agent. + :vartype version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sync_agent_name': {'readonly': True}, + 'last_alive_time': {'readonly': True}, + 'state': {'readonly': True}, + 'is_up_to_date': {'readonly': True}, + 'expiry_time': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sync_agent_name': {'key': 'properties.name', 'type': 'str'}, + 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, + 'last_alive_time': {'key': 'properties.lastAliveTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'is_up_to_date': {'key': 'properties.isUpToDate', 'type': 'bool'}, + 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncAgent, self).__init__(**kwargs) + self.sync_agent_name = None + self.sync_database_id = kwargs.get('sync_database_id', None) + self.last_alive_time = None + self.state = None + self.is_up_to_date = None + self.expiry_time = None + self.version = None + + +class SyncAgentKeyProperties(Model): + """Properties of an Azure SQL Database sync agent key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar sync_agent_key: Key of sync agent. + :vartype sync_agent_key: str + """ + + _validation = { + 'sync_agent_key': {'readonly': True}, + } + + _attribute_map = { + 'sync_agent_key': {'key': 'syncAgentKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncAgentKeyProperties, self).__init__(**kwargs) + self.sync_agent_key = None + + +class SyncAgentLinkedDatabase(ProxyResource): + """An Azure SQL Database sync agent linked database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_type: Type of the sync agent linked database. Possible + values include: 'AzureSqlDatabase', 'SqlServerDatabase' + :vartype database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType + :ivar database_id: Id of the sync agent linked database. + :vartype database_id: str + :ivar description: Description of the sync agent linked database. + :vartype description: str + :ivar server_name: Server name of the sync agent linked database. + :vartype server_name: str + :ivar database_name: Database name of the sync agent linked database. + :vartype database_name: str + :ivar user_name: User name of the sync agent linked database. + :vartype user_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_type': {'readonly': True}, + 'database_id': {'readonly': True}, + 'description': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncAgentLinkedDatabase, self).__init__(**kwargs) + self.database_type = None + self.database_id = None + self.description = None + self.server_name = None + self.database_name = None + self.user_name = None + + +class SyncDatabaseIdProperties(Model): + """Properties of the sync database id. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: ARM resource id of sync database. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncDatabaseIdProperties, self).__init__(**kwargs) + self.id = None + + +class SyncFullSchemaProperties(Model): + """Properties of the database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar tables: List of tables in the database full schema. + :vartype tables: list[~azure.mgmt.sql.models.SyncFullSchemaTable] + :ivar last_update_time: Last update time of the database schema. + :vartype last_update_time: datetime + """ + + _validation = { + 'tables': {'readonly': True}, + 'last_update_time': {'readonly': True}, + } + + _attribute_map = { + 'tables': {'key': 'tables', 'type': '[SyncFullSchemaTable]'}, + 'last_update_time': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(SyncFullSchemaProperties, self).__init__(**kwargs) + self.tables = None + self.last_update_time = None + + +class SyncFullSchemaTable(Model): + """Properties of the table in the database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar columns: List of columns in the table of database full schema. + :vartype columns: list[~azure.mgmt.sql.models.SyncFullSchemaTableColumn] + :ivar error_id: Error id of the table. + :vartype error_id: str + :ivar has_error: If there is error in the table. + :vartype has_error: bool + :ivar name: Name of the table. + :vartype name: str + :ivar quoted_name: Quoted name of the table. + :vartype quoted_name: str + """ + + _validation = { + 'columns': {'readonly': True}, + 'error_id': {'readonly': True}, + 'has_error': {'readonly': True}, + 'name': {'readonly': True}, + 'quoted_name': {'readonly': True}, + } + + _attribute_map = { + 'columns': {'key': 'columns', 'type': '[SyncFullSchemaTableColumn]'}, + 'error_id': {'key': 'errorId', 'type': 'str'}, + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncFullSchemaTable, self).__init__(**kwargs) + self.columns = None + self.error_id = None + self.has_error = None + self.name = None + self.quoted_name = None + + +class SyncFullSchemaTableColumn(Model): + """Properties of the column in the table of database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar data_size: Data size of the column. + :vartype data_size: str + :ivar data_type: Data type of the column. + :vartype data_type: str + :ivar error_id: Error id of the column. + :vartype error_id: str + :ivar has_error: If there is error in the table. + :vartype has_error: bool + :ivar is_primary_key: If it is the primary key of the table. + :vartype is_primary_key: bool + :ivar name: Name of the column. + :vartype name: str + :ivar quoted_name: Quoted name of the column. + :vartype quoted_name: str + """ + + _validation = { + 'data_size': {'readonly': True}, + 'data_type': {'readonly': True}, + 'error_id': {'readonly': True}, + 'has_error': {'readonly': True}, + 'is_primary_key': {'readonly': True}, + 'name': {'readonly': True}, + 'quoted_name': {'readonly': True}, + } + + _attribute_map = { + 'data_size': {'key': 'dataSize', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + 'error_id': {'key': 'errorId', 'type': 'str'}, + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'is_primary_key': {'key': 'isPrimaryKey', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncFullSchemaTableColumn, self).__init__(**kwargs) + self.data_size = None + self.data_type = None + self.error_id = None + self.has_error = None + self.is_primary_key = None + self.name = None + self.quoted_name = None + + +class SyncGroup(ProxyResource): + """An Azure SQL Database sync group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param interval: Sync interval of the sync group. + :type interval: int + :ivar last_sync_time: Last sync time of the sync group. + :vartype last_sync_time: datetime + :param conflict_resolution_policy: Conflict resolution policy of the sync + group. Possible values include: 'HubWin', 'MemberWin' + :type conflict_resolution_policy: str or + ~azure.mgmt.sql.models.SyncConflictResolutionPolicy + :param sync_database_id: ARM resource id of the sync database in the sync + group. + :type sync_database_id: str + :param hub_database_user_name: User name for the sync group hub database + credential. + :type hub_database_user_name: str + :param hub_database_password: Password for the sync group hub database + credential. + :type hub_database_password: str + :ivar sync_state: Sync state of the sync group. Possible values include: + 'NotReady', 'Error', 'Warning', 'Progressing', 'Good' + :vartype sync_state: str or ~azure.mgmt.sql.models.SyncGroupState + :param schema: Sync schema of the sync group. + :type schema: ~azure.mgmt.sql.models.SyncGroupSchema + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_sync_time': {'readonly': True}, + 'sync_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'interval': {'key': 'properties.interval', 'type': 'int'}, + 'last_sync_time': {'key': 'properties.lastSyncTime', 'type': 'iso-8601'}, + 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'str'}, + 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, + 'hub_database_user_name': {'key': 'properties.hubDatabaseUserName', 'type': 'str'}, + 'hub_database_password': {'key': 'properties.hubDatabasePassword', 'type': 'str'}, + 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, + 'schema': {'key': 'properties.schema', 'type': 'SyncGroupSchema'}, + } + + def __init__(self, **kwargs): + super(SyncGroup, self).__init__(**kwargs) + self.interval = kwargs.get('interval', None) + self.last_sync_time = None + self.conflict_resolution_policy = kwargs.get('conflict_resolution_policy', None) + self.sync_database_id = kwargs.get('sync_database_id', None) + self.hub_database_user_name = kwargs.get('hub_database_user_name', None) + self.hub_database_password = kwargs.get('hub_database_password', None) + self.sync_state = None + self.schema = kwargs.get('schema', None) + + +class SyncGroupLogProperties(Model): + """Properties of an Azure SQL Database sync group log. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar timestamp: Timestamp of the sync group log. + :vartype timestamp: datetime + :ivar type: Type of the sync group log. Possible values include: 'All', + 'Error', 'Warning', 'Success' + :vartype type: str or ~azure.mgmt.sql.models.SyncGroupLogType + :ivar source: Source of the sync group log. + :vartype source: str + :ivar details: Details of the sync group log. + :vartype details: str + :ivar tracing_id: TracingId of the sync group log. + :vartype tracing_id: str + :ivar operation_status: OperationStatus of the sync group log. + :vartype operation_status: str + """ + + _validation = { + 'timestamp': {'readonly': True}, + 'type': {'readonly': True}, + 'source': {'readonly': True}, + 'details': {'readonly': True}, + 'tracing_id': {'readonly': True}, + 'operation_status': {'readonly': True}, + } + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, + 'tracing_id': {'key': 'tracingId', 'type': 'str'}, + 'operation_status': {'key': 'operationStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncGroupLogProperties, self).__init__(**kwargs) + self.timestamp = None + self.type = None + self.source = None + self.details = None + self.tracing_id = None + self.operation_status = None + + +class SyncGroupSchema(Model): + """Properties of sync group schema. + + :param tables: List of tables in sync group schema. + :type tables: list[~azure.mgmt.sql.models.SyncGroupSchemaTable] + :param master_sync_member_name: Name of master sync member where the + schema is from. + :type master_sync_member_name: str + """ + + _attribute_map = { + 'tables': {'key': 'tables', 'type': '[SyncGroupSchemaTable]'}, + 'master_sync_member_name': {'key': 'masterSyncMemberName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncGroupSchema, self).__init__(**kwargs) + self.tables = kwargs.get('tables', None) + self.master_sync_member_name = kwargs.get('master_sync_member_name', None) + + +class SyncGroupSchemaTable(Model): + """Properties of table in sync group schema. + + :param columns: List of columns in sync group schema. + :type columns: list[~azure.mgmt.sql.models.SyncGroupSchemaTableColumn] + :param quoted_name: Quoted name of sync group schema table. + :type quoted_name: str + """ + + _attribute_map = { + 'columns': {'key': 'columns', 'type': '[SyncGroupSchemaTableColumn]'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncGroupSchemaTable, self).__init__(**kwargs) + self.columns = kwargs.get('columns', None) + self.quoted_name = kwargs.get('quoted_name', None) + + +class SyncGroupSchemaTableColumn(Model): + """Properties of column in sync group table. + + :param quoted_name: Quoted name of sync group table column. + :type quoted_name: str + :param data_size: Data size of the column. + :type data_size: str + :param data_type: Data type of the column. + :type data_type: str + """ + + _attribute_map = { + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + 'data_size': {'key': 'dataSize', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncGroupSchemaTableColumn, self).__init__(**kwargs) + self.quoted_name = kwargs.get('quoted_name', None) + self.data_size = kwargs.get('data_size', None) + self.data_type = kwargs.get('data_type', None) + + +class SyncMember(ProxyResource): + """An Azure SQL Database sync member. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param database_type: Database type of the sync member. Possible values + include: 'AzureSqlDatabase', 'SqlServerDatabase' + :type database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType + :param sync_agent_id: ARM resource id of the sync agent in the sync + member. + :type sync_agent_id: str + :param sql_server_database_id: SQL Server database id of the sync member. + :type sql_server_database_id: str + :param server_name: Server name of the member database in the sync member + :type server_name: str + :param database_name: Database name of the member database in the sync + member. + :type database_name: str + :param user_name: User name of the member database in the sync member. + :type user_name: str + :param password: Password of the member database in the sync member. + :type password: str + :param sync_direction: Sync direction of the sync member. Possible values + include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember' + :type sync_direction: str or ~azure.mgmt.sql.models.SyncDirection + :ivar sync_state: Sync state of the sync member. Possible values include: + 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', + 'DisabledTombstoneCleanup', 'DisabledBackupRestore', + 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', + 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', + 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', + 'ReprovisionFailed', 'UnReprovisioned' + :vartype sync_state: str or ~azure.mgmt.sql.models.SyncMemberState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sync_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, + 'sync_agent_id': {'key': 'properties.syncAgentId', 'type': 'str'}, + 'sql_server_database_id': {'key': 'properties.sqlServerDatabaseId', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'sync_direction': {'key': 'properties.syncDirection', 'type': 'str'}, + 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncMember, self).__init__(**kwargs) + self.database_type = kwargs.get('database_type', None) + self.sync_agent_id = kwargs.get('sync_agent_id', None) + self.sql_server_database_id = kwargs.get('sql_server_database_id', None) + self.server_name = kwargs.get('server_name', None) + self.database_name = kwargs.get('database_name', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.sync_direction = kwargs.get('sync_direction', None) + self.sync_state = None + + +class TdeCertificate(ProxyResource): + """A TDE certificate that can be uploaded into a server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param private_blob: Required. The base64 encoded certificate private + blob. + :type private_blob: str + :param cert_password: The certificate password. + :type cert_password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'private_blob': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_blob': {'key': 'properties.privateBlob', 'type': 'str'}, + 'cert_password': {'key': 'properties.certPassword', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TdeCertificate, self).__init__(**kwargs) + self.private_blob = kwargs.get('private_blob', None) + self.cert_password = kwargs.get('cert_password', None) + + +class TransparentDataEncryption(ProxyResource): + """Represents a database transparent data encryption configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :param status: The status of the database transparent data encryption. + Possible values include: 'Enabled', 'Disabled' + :type status: str or + ~azure.mgmt.sql.models.TransparentDataEncryptionStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'TransparentDataEncryptionStatus'}, + } + + def __init__(self, **kwargs): + super(TransparentDataEncryption, self).__init__(**kwargs) + self.location = None + self.status = kwargs.get('status', None) + + +class TransparentDataEncryptionActivity(ProxyResource): + """Represents a database transparent data encryption Scan. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar status: The status of the database. Possible values include: + 'Encrypting', 'Decrypting' + :vartype status: str or + ~azure.mgmt.sql.models.TransparentDataEncryptionActivityStatus + :ivar percent_complete: The percent complete of the transparent data + encryption scan for a database. + :vartype percent_complete: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'status': {'readonly': True}, + 'percent_complete': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(TransparentDataEncryptionActivity, self).__init__(**kwargs) + self.location = None + self.status = None + self.percent_complete = None + + +class Usage(Model): + """ARM usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: ~azure.mgmt.sql.models.Name + :ivar type: Resource type. + :vartype type: str + :ivar unit: Usage unit. + :vartype unit: str + :ivar current_value: Usage current value. + :vartype current_value: int + :ivar limit: Usage limit. + :vartype limit: int + :ivar requested_limit: Usage requested limit. + :vartype requested_limit: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'unit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'requested_limit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'Name'}, + 'type': {'key': 'type', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'int'}, + 'requested_limit': {'key': 'requestedLimit', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(Usage, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.unit = None + self.current_value = None + self.limit = None + self.requested_limit = None + + +class VirtualCluster(TrackedResource): + """An Azure SQL virtual cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar subnet_id: Subnet resource ID for the virtual cluster. + :vartype subnet_id: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :ivar child_resources: List of resources in this virtual cluster. + :vartype child_resources: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'subnet_id': {'readonly': True}, + 'child_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'family': {'key': 'properties.family', 'type': 'str'}, + 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualCluster, self).__init__(**kwargs) + self.subnet_id = None + self.family = kwargs.get('family', None) + self.child_resources = None + + +class VirtualClusterUpdate(Model): + """An update request for an Azure SQL Database virtual cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar subnet_id: Subnet resource ID for the virtual cluster. + :vartype subnet_id: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :ivar child_resources: List of resources in this virtual cluster. + :vartype child_resources: list[str] + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'subnet_id': {'readonly': True}, + 'child_resources': {'readonly': True}, + } + + _attribute_map = { + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'family': {'key': 'properties.family', 'type': 'str'}, + 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(VirtualClusterUpdate, self).__init__(**kwargs) + self.subnet_id = None + self.family = kwargs.get('family', None) + self.child_resources = None + self.tags = kwargs.get('tags', None) + + +class VirtualNetworkRule(ProxyResource): + """A virtual network rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param virtual_network_subnet_id: Required. The ARM resource id of the + virtual network subnet. + :type virtual_network_subnet_id: str + :param ignore_missing_vnet_service_endpoint: Create firewall rule before + the virtual network has vnet service endpoint enabled. + :type ignore_missing_vnet_service_endpoint: bool + :ivar state: Virtual Network Rule State. Possible values include: + 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' + :vartype state: str or ~azure.mgmt.sql.models.VirtualNetworkRuleState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'virtual_network_subnet_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, + 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkRule, self).__init__(**kwargs) + self.virtual_network_subnet_id = kwargs.get('virtual_network_subnet_id', None) + self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) + self.state = None + + +class VulnerabilityAssessmentRecurringScansProperties(Model): + """Properties of a Vulnerability Assessment recurring scans. + + :param is_enabled: Recurring scans state. + :type is_enabled: bool + :param email_subscription_admins: Specifies that the schedule scan + notification will be is sent to the subscription administrators. Default + value: True . + :type email_subscription_admins: bool + :param emails: Specifies an array of e-mail addresses to which the scan + notification is sent. + :type emails: list[str] + """ + + _attribute_map = { + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'}, + 'emails': {'key': 'emails', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs) + self.is_enabled = kwargs.get('is_enabled', None) + self.email_subscription_admins = kwargs.get('email_subscription_admins', True) + self.emails = kwargs.get('emails', None) + + +class VulnerabilityAssessmentScanError(Model): + """Properties of a vulnerability assessment scan error. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VulnerabilityAssessmentScanError, self).__init__(**kwargs) + self.code = None + self.message = None + + +class VulnerabilityAssessmentScanRecord(ProxyResource): + """A vulnerability assessment scan record. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar scan_id: The scan ID. + :vartype scan_id: str + :ivar trigger_type: The scan trigger type. Possible values include: + 'OnDemand', 'Recurring' + :vartype trigger_type: str or + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanTriggerType + :ivar state: The scan status. Possible values include: 'Passed', 'Failed', + 'FailedToRun', 'InProgress' + :vartype state: str or + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanState + :ivar start_time: The scan start time (UTC). + :vartype start_time: datetime + :ivar end_time: The scan end time (UTC). + :vartype end_time: datetime + :ivar errors: The scan errors. + :vartype errors: + list[~azure.mgmt.sql.models.VulnerabilityAssessmentScanError] + :ivar storage_container_path: The scan results storage container path. + :vartype storage_container_path: str + :ivar number_of_failed_security_checks: The number of failed security + checks. + :vartype number_of_failed_security_checks: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'scan_id': {'readonly': True}, + 'trigger_type': {'readonly': True}, + 'state': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'errors': {'readonly': True}, + 'storage_container_path': {'readonly': True}, + 'number_of_failed_security_checks': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'scan_id': {'key': 'properties.scanId', 'type': 'str'}, + 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'errors': {'key': 'properties.errors', 'type': '[VulnerabilityAssessmentScanError]'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'number_of_failed_security_checks': {'key': 'properties.numberOfFailedSecurityChecks', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(VulnerabilityAssessmentScanRecord, self).__init__(**kwargs) + self.scan_id = None + self.trigger_type = None + self.state = None + self.start_time = None + self.end_time = None + self.errors = None + self.storage_container_path = None + self.number_of_failed_security_checks = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py new file mode 100644 index 000000000000..24ba7183e418 --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py @@ -0,0 +1,8891 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AutomaticTuningOptions(Model): + """Automatic tuning properties for individual advisors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param desired_state: Automatic tuning option desired state. Possible + values include: 'Off', 'On', 'Default' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired + :ivar actual_state: Automatic tuning option actual state. Possible values + include: 'Off', 'On' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual + :ivar reason_code: Reason code if desired and actual state are different. + :vartype reason_code: int + :ivar reason_desc: Reason description if desired and actual state are + different. Possible values include: 'Default', 'Disabled', + 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', + 'QueryStoreReadOnly', 'NotSupported' + :vartype reason_desc: str or + ~azure.mgmt.sql.models.AutomaticTuningDisabledReason + """ + + _validation = { + 'actual_state': {'readonly': True}, + 'reason_code': {'readonly': True}, + 'reason_desc': {'readonly': True}, + } + + _attribute_map = { + 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, + 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, + 'reason_code': {'key': 'reasonCode', 'type': 'int'}, + 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningDisabledReason'}, + } + + def __init__(self, *, desired_state=None, **kwargs) -> None: + super(AutomaticTuningOptions, self).__init__(**kwargs) + self.desired_state = desired_state + self.actual_state = None + self.reason_code = None + self.reason_desc = None + + +class AutomaticTuningServerOptions(Model): + """Automatic tuning properties for individual advisors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param desired_state: Automatic tuning option desired state. Possible + values include: 'Off', 'On', 'Default' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired + :ivar actual_state: Automatic tuning option actual state. Possible values + include: 'Off', 'On' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual + :ivar reason_code: Reason code if desired and actual state are different. + :vartype reason_code: int + :ivar reason_desc: Reason description if desired and actual state are + different. Possible values include: 'Default', 'Disabled', + 'AutoConfigured' + :vartype reason_desc: str or + ~azure.mgmt.sql.models.AutomaticTuningServerReason + """ + + _validation = { + 'actual_state': {'readonly': True}, + 'reason_code': {'readonly': True}, + 'reason_desc': {'readonly': True}, + } + + _attribute_map = { + 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, + 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, + 'reason_code': {'key': 'reasonCode', 'type': 'int'}, + 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningServerReason'}, + } + + def __init__(self, *, desired_state=None, **kwargs) -> None: + super(AutomaticTuningServerOptions, self).__init__(**kwargs) + self.desired_state = desired_state + self.actual_state = None + self.reason_code = None + self.reason_desc = None + + +class Resource(Model): + """ARM resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ProxyResource(Resource): + """ARM proxy resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) + + +class BackupLongTermRetentionPolicy(ProxyResource): + """A long term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param weekly_retention: The weekly retention policy for an LTR backup in + an ISO 8601 format. + :type weekly_retention: str + :param monthly_retention: The monthly retention policy for an LTR backup + in an ISO 8601 format. + :type monthly_retention: str + :param yearly_retention: The yearly retention policy for an LTR backup in + an ISO 8601 format. + :type yearly_retention: str + :param week_of_year: The week of year to take the yearly backup in an ISO + 8601 format. + :type week_of_year: int + """ + + _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'}, + 'weekly_retention': {'key': 'properties.weeklyRetention', 'type': 'str'}, + 'monthly_retention': {'key': 'properties.monthlyRetention', 'type': 'str'}, + 'yearly_retention': {'key': 'properties.yearlyRetention', 'type': 'str'}, + 'week_of_year': {'key': 'properties.weekOfYear', 'type': 'int'}, + } + + def __init__(self, *, weekly_retention: str=None, monthly_retention: str=None, yearly_retention: str=None, week_of_year: int=None, **kwargs) -> None: + super(BackupLongTermRetentionPolicy, self).__init__(**kwargs) + self.weekly_retention = weekly_retention + self.monthly_retention = monthly_retention + self.yearly_retention = yearly_retention + self.week_of_year = week_of_year + + +class BackupShortTermRetentionPolicy(ProxyResource): + """A short term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param retention_days: The backup retention period in days. This is how + many days Point-in-Time Restore will be supported. + :type retention_days: int + """ + + _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'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + } + + def __init__(self, *, retention_days: int=None, **kwargs) -> None: + super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) + self.retention_days = retention_days + + +class CheckNameAvailabilityRequest(Model): + """A request to check whether the specified name for a resource is available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name whose availability is to be checked. + :type name: str + :ivar type: Required. The type of resource that is used as the scope of + the availability check. Default value: "Microsoft.Sql/servers" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.Sql/servers" + + def __init__(self, *, name: str, **kwargs) -> None: + super(CheckNameAvailabilityRequest, self).__init__(**kwargs) + self.name = name + + +class CheckNameAvailabilityResponse(Model): + """A response indicating whether the specified name for a resource is + available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar available: True if the name is available, otherwise false. + :vartype available: bool + :ivar message: A message explaining why the name is unavailable. Will be + null if the name is available. + :vartype message: str + :ivar name: The name whose availability was checked. + :vartype name: str + :ivar reason: The reason code explaining why the name is unavailable. Will + be null if the name is available. Possible values include: 'Invalid', + 'AlreadyExists' + :vartype reason: str or ~azure.mgmt.sql.models.CheckNameAvailabilityReason + """ + + _validation = { + 'available': {'readonly': True}, + 'message': {'readonly': True}, + 'name': {'readonly': True}, + 'reason': {'readonly': True}, + } + + _attribute_map = { + 'available': {'key': 'available', 'type': 'bool'}, + 'message': {'key': 'message', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'CheckNameAvailabilityReason'}, + } + + def __init__(self, **kwargs) -> None: + super(CheckNameAvailabilityResponse, self).__init__(**kwargs) + self.available = None + self.message = None + self.name = None + self.reason = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class CompleteDatabaseRestoreDefinition(Model): + """Contains the information necessary to perform a complete database restore + operation. + + All required parameters must be populated in order to send to Azure. + + :param last_backup_name: Required. The last backup name to apply + :type last_backup_name: str + """ + + _validation = { + 'last_backup_name': {'required': True}, + } + + _attribute_map = { + 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, + } + + def __init__(self, *, last_backup_name: str, **kwargs) -> None: + super(CompleteDatabaseRestoreDefinition, self).__init__(**kwargs) + self.last_backup_name = last_backup_name + + +class CreateDatabaseRestorePointDefinition(Model): + """Contains the information necessary to perform a create database restore + point operation. + + All required parameters must be populated in order to send to Azure. + + :param restore_point_label: Required. The restore point label to apply + :type restore_point_label: str + """ + + _validation = { + 'restore_point_label': {'required': True}, + } + + _attribute_map = { + 'restore_point_label': {'key': 'restorePointLabel', 'type': 'str'}, + } + + def __init__(self, *, restore_point_label: str, **kwargs) -> None: + super(CreateDatabaseRestorePointDefinition, self).__init__(**kwargs) + self.restore_point_label = restore_point_label + + +class TrackedResource(Resource): + """ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.location = location + self.tags = tags + + +class Database(TrackedResource): + """A database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The database SKU. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location + ```` + :type sku: ~azure.mgmt.sql.models.Sku + :ivar kind: Kind of database. This is metadata used for the Azure portal + experience. + :vartype kind: str + :ivar managed_by: Resource that manages the database. + :vartype managed_by: str + :param create_mode: Specifies the mode of database creation. + Default: regular database creation. + Copy: creates a database as a copy of an existing database. + sourceDatabaseId must be specified as the resource ID of the source + database. + Secondary: creates a database as a secondary replica of an existing + database. sourceDatabaseId must be specified as the resource ID of the + existing primary database. + PointInTimeRestore: Creates a database by restoring a point in time backup + of an existing database. sourceDatabaseId must be specified as the + resource ID of the existing database, and restorePointInTime must be + specified. + Recovery: Creates a database by restoring a geo-replicated backup. + sourceDatabaseId must be specified as the recoverable database resource ID + to restore. + Restore: Creates a database by restoring a backup of a deleted database. + sourceDatabaseId must be specified. If sourceDatabaseId is the database's + original resource ID, then sourceDatabaseDeletionDate must be specified. + Otherwise sourceDatabaseId must be the restorable dropped database + resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime + may also be specified to restore from an earlier point in time. + RestoreLongTermRetentionBackup: Creates a database by restoring from a + long term retention vault. recoveryServicesRecoveryPointResourceId must be + specified as the recovery point resource ID. + Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for + DataWarehouse edition. Possible values include: 'Default', 'Copy', + 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', + 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', + 'RestoreLongTermRetentionBackup', 'OnlineSecondary' + :type create_mode: str or ~azure.mgmt.sql.models.CreateMode + :param collation: The collation of the database. + :type collation: str + :param max_size_bytes: The max size of the database expressed in bytes. + :type max_size_bytes: long + :param sample_name: The name of the sample schema to apply when creating + this database. Possible values include: 'AdventureWorksLT', + 'WideWorldImportersStd', 'WideWorldImportersFull' + :type sample_name: str or ~azure.mgmt.sql.models.SampleName + :param elastic_pool_id: The resource identifier of the elastic pool + containing this database. + :type elastic_pool_id: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :ivar status: The status of the database. Possible values include: + 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', + 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', + 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', + 'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers', + 'OnlineChangingDwPerformanceTiers' + :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus + :ivar database_id: The ID of the database. + :vartype database_id: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar current_service_objective_name: The current service level objective + name of the database. + :vartype current_service_objective_name: str + :ivar requested_service_objective_name: The requested service level + objective name of the database. + :vartype requested_service_objective_name: str + :ivar default_secondary_location: The default secondary region for this + database. + :vartype default_secondary_location: str + :ivar failover_group_id: Failover Group resource identifier that this + database belongs to. + :vartype failover_group_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param source_database_deletion_date: Specifies the time that the database + was deleted. + :type source_database_deletion_date: datetime + :param recovery_services_recovery_point_id: The resource identifier of the + recovery point associated with create operation of this database. + :type recovery_services_recovery_point_id: str + :param long_term_retention_backup_resource_id: The resource identifier of + the long term retention backup associated with create operation of this + database. + :type long_term_retention_backup_resource_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param restorable_dropped_database_id: The resource identifier of the + restorable dropped database associated with create operation of this + database. + :type restorable_dropped_database_id: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param zone_redundant: Whether or not this database is zone redundant, + which means the replicas of this database will be spread across multiple + availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this database. Possible + values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType + :ivar max_log_size_bytes: The max log size for this database. + :vartype max_log_size_bytes: long + :ivar earliest_restore_date: This records the earliest start date and time + that restore is available for this database (ISO8601 format). + :vartype earliest_restore_date: datetime + :param read_scale: The state of read-only routing. If enabled, connections + that have application intent set to readonly in their connection string + may be routed to a readonly secondary replica in the same region. Possible + values include: 'Enabled', 'Disabled' + :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale + :ivar current_sku: The name and tier of the SKU. + :vartype current_sku: ~azure.mgmt.sql.models.Sku + :param auto_pause_delay: Time in minutes after which database is + automatically paused. A value of -1 means that automatic pause is disabled + :type auto_pause_delay: int + :param min_capacity: Minimal capacity that database will always have + allocated, if not paused + :type min_capacity: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'managed_by': {'readonly': True}, + 'status': {'readonly': True}, + 'database_id': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'current_service_objective_name': {'readonly': True}, + 'requested_service_objective_name': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + 'max_log_size_bytes': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'current_sku': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, + 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, + 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, + 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, + 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, + 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, + 'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'}, + 'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'}, + } + + def __init__(self, *, location: str, tags=None, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, auto_pause_delay: int=None, min_capacity: float=None, **kwargs) -> None: + super(Database, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.kind = None + self.managed_by = None + self.create_mode = create_mode + self.collation = collation + self.max_size_bytes = max_size_bytes + self.sample_name = sample_name + self.elastic_pool_id = elastic_pool_id + self.source_database_id = source_database_id + self.status = None + self.database_id = None + self.creation_date = None + self.current_service_objective_name = None + self.requested_service_objective_name = None + self.default_secondary_location = None + self.failover_group_id = None + self.restore_point_in_time = restore_point_in_time + self.source_database_deletion_date = source_database_deletion_date + self.recovery_services_recovery_point_id = recovery_services_recovery_point_id + self.long_term_retention_backup_resource_id = long_term_retention_backup_resource_id + self.recoverable_database_id = recoverable_database_id + self.restorable_dropped_database_id = restorable_dropped_database_id + self.catalog_collation = catalog_collation + self.zone_redundant = zone_redundant + self.license_type = license_type + self.max_log_size_bytes = None + self.earliest_restore_date = None + self.read_scale = read_scale + self.current_sku = None + self.auto_pause_delay = auto_pause_delay + self.min_capacity = min_capacity + + +class DatabaseAutomaticTuning(ProxyResource): + """Database-level Automatic Tuning. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param desired_state: Automatic tuning desired state. Possible values + include: 'Inherit', 'Custom', 'Auto', 'Unspecified' + :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode + :ivar actual_state: Automatic tuning actual state. Possible values + include: 'Inherit', 'Custom', 'Auto', 'Unspecified' + :vartype actual_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode + :param options: Automatic tuning options definition. + :type options: dict[str, ~azure.mgmt.sql.models.AutomaticTuningOptions] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'actual_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningMode'}, + 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningMode'}, + 'options': {'key': 'properties.options', 'type': '{AutomaticTuningOptions}'}, + } + + def __init__(self, *, desired_state=None, options=None, **kwargs) -> None: + super(DatabaseAutomaticTuning, self).__init__(**kwargs) + self.desired_state = desired_state + self.actual_state = None + self.options = options + + +class DatabaseBlobAuditingPolicy(ProxyResource): + """A database blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Resource kind. + :vartype kind: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: + super(DatabaseBlobAuditingPolicy, self).__init__(**kwargs) + self.kind = None + self.state = state + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.audit_actions_and_groups = audit_actions_and_groups + self.storage_account_subscription_id = storage_account_subscription_id + self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use + self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + + +class DatabaseOperation(ProxyResource): + """A database operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_name: The name of the database the operation is being + performed on. + :vartype database_name: str + :ivar operation: The name of operation. + :vartype operation: str + :ivar operation_friendly_name: The friendly name of operation. + :vartype operation_friendly_name: str + :ivar percent_complete: The percentage of the operation completed. + :vartype percent_complete: int + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar start_time: The operation start time. + :vartype start_time: datetime + :ivar state: The operation state. Possible values include: 'Pending', + 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', 'Cancelled' + :vartype state: str or ~azure.mgmt.sql.models.ManagementOperationState + :ivar error_code: The operation error code. + :vartype error_code: int + :ivar error_description: The operation error description. + :vartype error_description: str + :ivar error_severity: The operation error severity. + :vartype error_severity: int + :ivar is_user_error: Whether or not the error is a user error. + :vartype is_user_error: bool + :ivar estimated_completion_time: The estimated completion time of the + operation. + :vartype estimated_completion_time: datetime + :ivar description: The operation description. + :vartype description: str + :ivar is_cancellable: Whether the operation can be cancelled. + :vartype is_cancellable: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_name': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_friendly_name': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_description': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'is_user_error': {'readonly': True}, + 'estimated_completion_time': {'readonly': True}, + 'description': {'readonly': True}, + 'is_cancellable': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, + 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(DatabaseOperation, self).__init__(**kwargs) + self.database_name = None + self.operation = None + self.operation_friendly_name = None + self.percent_complete = None + self.server_name = None + self.start_time = None + self.state = None + self.error_code = None + self.error_description = None + self.error_severity = None + self.is_user_error = None + self.estimated_completion_time = None + self.description = None + self.is_cancellable = None + + +class DatabaseSecurityAlertPolicy(ProxyResource): + """Contains information about a database Threat Detection policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar kind: Resource kind. + :vartype kind: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint and storageAccountAccessKey are required. + Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies the semicolon-separated list of alerts + that are disabled, or empty string to disable no alerts. Possible values: + Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; + Data_Exfiltration; Unsafe_Action. + :type disabled_alerts: str + :param email_addresses: Specifies the semicolon-separated list of e-mail + addresses to which the alert is sent. + :type email_addresses: str + :param email_account_admins: Specifies that the alert is sent to the + account administrators. Possible values include: 'Enabled', 'Disabled' + :type email_account_admins: str or + ~azure.mgmt.sql.models.SecurityAlertPolicyEmailAccountAdmins + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. If state is Enabled, storageEndpoint is + required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. If state is Enabled, + storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :param use_server_default: Specifies whether to use the default server + policy. Possible values include: 'Enabled', 'Disabled' + :type use_server_default: str or + ~azure.mgmt.sql.models.SecurityAlertPolicyUseServerDefault + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': 'str'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': 'str'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'SecurityAlertPolicyEmailAccountAdmins'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'use_server_default': {'key': 'properties.useServerDefault', 'type': 'SecurityAlertPolicyUseServerDefault'}, + } + + def __init__(self, *, state, location: str=None, disabled_alerts: str=None, email_addresses: str=None, email_account_admins=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, use_server_default=None, **kwargs) -> None: + super(DatabaseSecurityAlertPolicy, self).__init__(**kwargs) + self.location = location + self.kind = None + self.state = state + self.disabled_alerts = disabled_alerts + self.email_addresses = email_addresses + self.email_account_admins = email_account_admins + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.use_server_default = use_server_default + + +class DatabaseUpdate(Model): + """A database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param create_mode: Specifies the mode of database creation. + Default: regular database creation. + Copy: creates a database as a copy of an existing database. + sourceDatabaseId must be specified as the resource ID of the source + database. + Secondary: creates a database as a secondary replica of an existing + database. sourceDatabaseId must be specified as the resource ID of the + existing primary database. + PointInTimeRestore: Creates a database by restoring a point in time backup + of an existing database. sourceDatabaseId must be specified as the + resource ID of the existing database, and restorePointInTime must be + specified. + Recovery: Creates a database by restoring a geo-replicated backup. + sourceDatabaseId must be specified as the recoverable database resource ID + to restore. + Restore: Creates a database by restoring a backup of a deleted database. + sourceDatabaseId must be specified. If sourceDatabaseId is the database's + original resource ID, then sourceDatabaseDeletionDate must be specified. + Otherwise sourceDatabaseId must be the restorable dropped database + resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime + may also be specified to restore from an earlier point in time. + RestoreLongTermRetentionBackup: Creates a database by restoring from a + long term retention vault. recoveryServicesRecoveryPointResourceId must be + specified as the recovery point resource ID. + Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for + DataWarehouse edition. Possible values include: 'Default', 'Copy', + 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', + 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', + 'RestoreLongTermRetentionBackup', 'OnlineSecondary' + :type create_mode: str or ~azure.mgmt.sql.models.CreateMode + :param collation: The collation of the database. + :type collation: str + :param max_size_bytes: The max size of the database expressed in bytes. + :type max_size_bytes: long + :param sample_name: The name of the sample schema to apply when creating + this database. Possible values include: 'AdventureWorksLT', + 'WideWorldImportersStd', 'WideWorldImportersFull' + :type sample_name: str or ~azure.mgmt.sql.models.SampleName + :param elastic_pool_id: The resource identifier of the elastic pool + containing this database. + :type elastic_pool_id: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :ivar status: The status of the database. Possible values include: + 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', + 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', + 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', + 'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers', + 'OnlineChangingDwPerformanceTiers' + :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus + :ivar database_id: The ID of the database. + :vartype database_id: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar current_service_objective_name: The current service level objective + name of the database. + :vartype current_service_objective_name: str + :ivar requested_service_objective_name: The requested service level + objective name of the database. + :vartype requested_service_objective_name: str + :ivar default_secondary_location: The default secondary region for this + database. + :vartype default_secondary_location: str + :ivar failover_group_id: Failover Group resource identifier that this + database belongs to. + :vartype failover_group_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param source_database_deletion_date: Specifies the time that the database + was deleted. + :type source_database_deletion_date: datetime + :param recovery_services_recovery_point_id: The resource identifier of the + recovery point associated with create operation of this database. + :type recovery_services_recovery_point_id: str + :param long_term_retention_backup_resource_id: The resource identifier of + the long term retention backup associated with create operation of this + database. + :type long_term_retention_backup_resource_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param restorable_dropped_database_id: The resource identifier of the + restorable dropped database associated with create operation of this + database. + :type restorable_dropped_database_id: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param zone_redundant: Whether or not this database is zone redundant, + which means the replicas of this database will be spread across multiple + availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this database. Possible + values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType + :ivar max_log_size_bytes: The max log size for this database. + :vartype max_log_size_bytes: long + :ivar earliest_restore_date: This records the earliest start date and time + that restore is available for this database (ISO8601 format). + :vartype earliest_restore_date: datetime + :param read_scale: The state of read-only routing. If enabled, connections + that have application intent set to readonly in their connection string + may be routed to a readonly secondary replica in the same region. Possible + values include: 'Enabled', 'Disabled' + :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale + :ivar current_sku: The name and tier of the SKU. + :vartype current_sku: ~azure.mgmt.sql.models.Sku + :param auto_pause_delay: Time in minutes after which database is + automatically paused. A value of -1 means that automatic pause is disabled + :type auto_pause_delay: int + :param min_capacity: Minimal capacity that database will always have + allocated, if not paused + :type min_capacity: float + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'status': {'readonly': True}, + 'database_id': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'current_service_objective_name': {'readonly': True}, + 'requested_service_objective_name': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + 'max_log_size_bytes': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'current_sku': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, + 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, + 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, + 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, + 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, + 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, + 'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'}, + 'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, auto_pause_delay: int=None, min_capacity: float=None, tags=None, **kwargs) -> None: + super(DatabaseUpdate, self).__init__(**kwargs) + self.sku = sku + self.create_mode = create_mode + self.collation = collation + self.max_size_bytes = max_size_bytes + self.sample_name = sample_name + self.elastic_pool_id = elastic_pool_id + self.source_database_id = source_database_id + self.status = None + self.database_id = None + self.creation_date = None + self.current_service_objective_name = None + self.requested_service_objective_name = None + self.default_secondary_location = None + self.failover_group_id = None + self.restore_point_in_time = restore_point_in_time + self.source_database_deletion_date = source_database_deletion_date + self.recovery_services_recovery_point_id = recovery_services_recovery_point_id + self.long_term_retention_backup_resource_id = long_term_retention_backup_resource_id + self.recoverable_database_id = recoverable_database_id + self.restorable_dropped_database_id = restorable_dropped_database_id + self.catalog_collation = catalog_collation + self.zone_redundant = zone_redundant + self.license_type = license_type + self.max_log_size_bytes = None + self.earliest_restore_date = None + self.read_scale = read_scale + self.current_sku = None + self.auto_pause_delay = auto_pause_delay + self.min_capacity = min_capacity + self.tags = tags + + +class DatabaseUsage(Model): + """The database usages. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the usage metric. + :vartype name: str + :ivar resource_name: The name of the resource. + :vartype resource_name: str + :ivar display_name: The usage metric display name. + :vartype display_name: str + :ivar current_value: The current value of the usage metric. + :vartype current_value: float + :ivar limit: The current limit of the usage metric. + :vartype limit: float + :ivar unit: The units of the usage metric. + :vartype unit: str + :ivar next_reset_time: The next reset time for the usage metric (ISO8601 + format). + :vartype next_reset_time: datetime + """ + + _validation = { + 'name': {'readonly': True}, + 'resource_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'next_reset_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(DatabaseUsage, self).__init__(**kwargs) + self.name = None + self.resource_name = None + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + self.next_reset_time = None + + +class DatabaseVulnerabilityAssessment(ProxyResource): + """A database vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: A blob storage container path to hold the + scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It + is required if server level vulnerability assessment policy doesn't set + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _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'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, *, storage_container_path: str=None, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: + super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = storage_container_path + self.storage_container_sas_key = storage_container_sas_key + self.storage_account_access_key = storage_account_access_key + self.recurring_scans = recurring_scans + + +class DatabaseVulnerabilityAssessmentRuleBaseline(ProxyResource): + """A database vulnerability assessment rule baseline. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param baseline_results: Required. The rule baseline result + :type baseline_results: + list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'baseline_results': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'baseline_results': {'key': 'properties.baselineResults', 'type': '[DatabaseVulnerabilityAssessmentRuleBaselineItem]'}, + } + + def __init__(self, *, baseline_results, **kwargs) -> None: + super(DatabaseVulnerabilityAssessmentRuleBaseline, self).__init__(**kwargs) + self.baseline_results = baseline_results + + +class DatabaseVulnerabilityAssessmentRuleBaselineItem(Model): + """Properties for an Azure SQL Database Vulnerability Assessment rule + baseline's result. + + All required parameters must be populated in order to send to Azure. + + :param result: Required. The rule baseline result + :type result: list[str] + """ + + _validation = { + 'result': {'required': True}, + } + + _attribute_map = { + 'result': {'key': 'result', 'type': '[str]'}, + } + + def __init__(self, *, result, **kwargs) -> None: + super(DatabaseVulnerabilityAssessmentRuleBaselineItem, self).__init__(**kwargs) + self.result = result + + +class DatabaseVulnerabilityAssessmentScansExport(ProxyResource): + """A database Vulnerability Assessment scan export resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar exported_report_location: Location of the exported report (e.g. + https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). + :vartype exported_report_location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'exported_report_location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs) + self.exported_report_location = None + + +class DataMaskingPolicy(ProxyResource): + """Represents a database data masking policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param data_masking_state: Required. The state of the data masking policy. + Possible values include: 'Disabled', 'Enabled' + :type data_masking_state: str or ~azure.mgmt.sql.models.DataMaskingState + :param exempt_principals: The list of the exempt principals. Specifies the + semicolon-separated list of database users for which the data masking + policy does not apply. The specified users receive data results without + masking for all of the database queries. + :type exempt_principals: str + :ivar application_principals: The list of the application principals. This + is a legacy parameter and is no longer used. + :vartype application_principals: str + :ivar masking_level: The masking level. This is a legacy parameter and is + no longer used. + :vartype masking_level: str + :ivar location: The location of the data masking policy. + :vartype location: str + :ivar kind: The kind of data masking policy. Metadata, used for Azure + portal. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_masking_state': {'required': True}, + 'application_principals': {'readonly': True}, + 'masking_level': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_masking_state': {'key': 'properties.dataMaskingState', 'type': 'DataMaskingState'}, + 'exempt_principals': {'key': 'properties.exemptPrincipals', 'type': 'str'}, + 'application_principals': {'key': 'properties.applicationPrincipals', 'type': 'str'}, + 'masking_level': {'key': 'properties.maskingLevel', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, data_masking_state, exempt_principals: str=None, **kwargs) -> None: + super(DataMaskingPolicy, self).__init__(**kwargs) + self.data_masking_state = data_masking_state + self.exempt_principals = exempt_principals + self.application_principals = None + self.masking_level = None + self.location = None + self.kind = None + + +class DataMaskingRule(ProxyResource): + """Represents a database data masking rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar data_masking_rule_id: The rule Id. + :vartype data_masking_rule_id: str + :param alias_name: The alias name. This is a legacy parameter and is no + longer used. + :type alias_name: str + :param rule_state: The rule state. Used to delete a rule. To delete an + existing rule, specify the schemaName, tableName, columnName, + maskingFunction, and specify ruleState as disabled. However, if the rule + doesn't already exist, the rule will be created with ruleState set to + enabled, regardless of the provided value of ruleState. Possible values + include: 'Disabled', 'Enabled' + :type rule_state: str or ~azure.mgmt.sql.models.DataMaskingRuleState + :param schema_name: Required. The schema name on which the data masking + rule is applied. + :type schema_name: str + :param table_name: Required. The table name on which the data masking rule + is applied. + :type table_name: str + :param column_name: Required. The column name on which the data masking + rule is applied. + :type column_name: str + :param masking_function: Required. The masking function that is used for + the data masking rule. Possible values include: 'Default', 'CCN', 'Email', + 'Number', 'SSN', 'Text' + :type masking_function: str or ~azure.mgmt.sql.models.DataMaskingFunction + :param number_from: The numberFrom property of the masking rule. Required + if maskingFunction is set to Number, otherwise this parameter will be + ignored. + :type number_from: str + :param number_to: The numberTo property of the data masking rule. Required + if maskingFunction is set to Number, otherwise this parameter will be + ignored. + :type number_to: str + :param prefix_size: If maskingFunction is set to Text, the number of + characters to show unmasked in the beginning of the string. Otherwise, + this parameter will be ignored. + :type prefix_size: str + :param suffix_size: If maskingFunction is set to Text, the number of + characters to show unmasked at the end of the string. Otherwise, this + parameter will be ignored. + :type suffix_size: str + :param replacement_string: If maskingFunction is set to Text, the + character to use for masking the unexposed part of the string. Otherwise, + this parameter will be ignored. + :type replacement_string: str + :ivar location: The location of the data masking rule. + :vartype location: str + :ivar kind: The kind of Data Masking Rule. Metadata, used for Azure + portal. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_masking_rule_id': {'readonly': True}, + 'schema_name': {'required': True}, + 'table_name': {'required': True}, + 'column_name': {'required': True}, + 'masking_function': {'required': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_masking_rule_id': {'key': 'properties.id', 'type': 'str'}, + 'alias_name': {'key': 'properties.aliasName', 'type': 'str'}, + 'rule_state': {'key': 'properties.ruleState', 'type': 'DataMaskingRuleState'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, + 'table_name': {'key': 'properties.tableName', 'type': 'str'}, + 'column_name': {'key': 'properties.columnName', 'type': 'str'}, + 'masking_function': {'key': 'properties.maskingFunction', 'type': 'DataMaskingFunction'}, + 'number_from': {'key': 'properties.numberFrom', 'type': 'str'}, + 'number_to': {'key': 'properties.numberTo', 'type': 'str'}, + 'prefix_size': {'key': 'properties.prefixSize', 'type': 'str'}, + 'suffix_size': {'key': 'properties.suffixSize', 'type': 'str'}, + 'replacement_string': {'key': 'properties.replacementString', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, schema_name: str, table_name: str, column_name: str, masking_function, alias_name: str=None, rule_state=None, number_from: str=None, number_to: str=None, prefix_size: str=None, suffix_size: str=None, replacement_string: str=None, **kwargs) -> None: + super(DataMaskingRule, self).__init__(**kwargs) + self.data_masking_rule_id = None + self.alias_name = alias_name + self.rule_state = rule_state + self.schema_name = schema_name + self.table_name = table_name + self.column_name = column_name + self.masking_function = masking_function + self.number_from = number_from + self.number_to = number_to + self.prefix_size = prefix_size + self.suffix_size = suffix_size + self.replacement_string = replacement_string + self.location = None + self.kind = None + + +class EditionCapability(Model): + """The edition capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The database edition name. + :vartype name: str + :ivar supported_service_level_objectives: The list of supported service + objectives for the edition. + :vartype supported_service_level_objectives: + list[~azure.mgmt.sql.models.ServiceObjectiveCapability] + :ivar zone_redundant: Whether or not zone redundancy is supported for the + edition. + :vartype zone_redundant: bool + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_service_level_objectives': {'readonly': True}, + 'zone_redundant': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_service_level_objectives': {'key': 'supportedServiceLevelObjectives', 'type': '[ServiceObjectiveCapability]'}, + 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(EditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_service_level_objectives = None + self.zone_redundant = None + self.status = None + self.reason = reason + + +class ElasticPool(TrackedResource): + """An elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The elastic pool SKU. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or the following command: + ```azurecli + az sql elastic-pool list-editions -l -o table + ```` + :type sku: ~azure.mgmt.sql.models.Sku + :ivar kind: Kind of elastic pool. This is metadata used for the Azure + portal experience. + :vartype kind: str + :ivar state: The state of the elastic pool. Possible values include: + 'Creating', 'Ready', 'Disabled' + :vartype state: str or ~azure.mgmt.sql.models.ElasticPoolState + :ivar creation_date: The creation date of the elastic pool (ISO8601 + format). + :vartype creation_date: datetime + :param max_size_bytes: The storage limit for the database elastic pool in + bytes. + :type max_size_bytes: long + :param per_database_settings: The per database settings for the elastic + pool. + :type per_database_settings: + ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings + :param zone_redundant: Whether or not this elastic pool is zone redundant, + which means the replicas of this elastic pool will be spread across + multiple availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this elastic pool. + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'state': {'readonly': True}, + 'creation_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, sku=None, max_size_bytes: int=None, per_database_settings=None, zone_redundant: bool=None, license_type=None, **kwargs) -> None: + super(ElasticPool, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.kind = None + self.state = None + self.creation_date = None + self.max_size_bytes = max_size_bytes + self.per_database_settings = per_database_settings + self.zone_redundant = zone_redundant + self.license_type = license_type + + +class ElasticPoolActivity(ProxyResource): + """Represents the activity on an elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar end_time: The time the operation finished (ISO8601 format). + :vartype end_time: datetime + :ivar error_code: The error code if available. + :vartype error_code: int + :ivar error_message: The error message if available. + :vartype error_message: str + :ivar error_severity: The error severity if available. + :vartype error_severity: int + :ivar operation: The operation name. + :vartype operation: str + :ivar operation_id: The unique operation ID. + :vartype operation_id: str + :ivar percent_complete: The percentage complete if available. + :vartype percent_complete: int + :ivar requested_database_dtu_max: The requested max DTU per database if + available. + :vartype requested_database_dtu_max: int + :ivar requested_database_dtu_min: The requested min DTU per database if + available. + :vartype requested_database_dtu_min: int + :ivar requested_dtu: The requested DTU for the pool if available. + :vartype requested_dtu: int + :ivar requested_elastic_pool_name: The requested name for the elastic pool + if available. + :vartype requested_elastic_pool_name: str + :ivar requested_storage_limit_in_gb: The requested storage limit for the + pool in GB if available. + :vartype requested_storage_limit_in_gb: long + :ivar elastic_pool_name: The name of the elastic pool. + :vartype elastic_pool_name: str + :ivar server_name: The name of the server the elastic pool is in. + :vartype server_name: str + :ivar start_time: The time the operation started (ISO8601 format). + :vartype start_time: datetime + :ivar state: The current state of the operation. + :vartype state: str + :ivar requested_storage_limit_in_mb: The requested storage limit in MB. + :vartype requested_storage_limit_in_mb: int + :ivar requested_database_dtu_guarantee: The requested per database DTU + guarantee. + :vartype requested_database_dtu_guarantee: int + :ivar requested_database_dtu_cap: The requested per database DTU cap. + :vartype requested_database_dtu_cap: int + :ivar requested_dtu_guarantee: The requested DTU guarantee. + :vartype requested_dtu_guarantee: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_message': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_id': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'requested_database_dtu_max': {'readonly': True}, + 'requested_database_dtu_min': {'readonly': True}, + 'requested_dtu': {'readonly': True}, + 'requested_elastic_pool_name': {'readonly': True}, + 'requested_storage_limit_in_gb': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'requested_storage_limit_in_mb': {'readonly': True}, + 'requested_database_dtu_guarantee': {'readonly': True}, + 'requested_database_dtu_cap': {'readonly': True}, + 'requested_dtu_guarantee': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'requested_database_dtu_max': {'key': 'properties.requestedDatabaseDtuMax', 'type': 'int'}, + 'requested_database_dtu_min': {'key': 'properties.requestedDatabaseDtuMin', 'type': 'int'}, + 'requested_dtu': {'key': 'properties.requestedDtu', 'type': 'int'}, + 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, + 'requested_storage_limit_in_gb': {'key': 'properties.requestedStorageLimitInGB', 'type': 'long'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'requested_storage_limit_in_mb': {'key': 'properties.requestedStorageLimitInMB', 'type': 'int'}, + 'requested_database_dtu_guarantee': {'key': 'properties.requestedDatabaseDtuGuarantee', 'type': 'int'}, + 'requested_database_dtu_cap': {'key': 'properties.requestedDatabaseDtuCap', 'type': 'int'}, + 'requested_dtu_guarantee': {'key': 'properties.requestedDtuGuarantee', 'type': 'int'}, + } + + def __init__(self, *, location: str=None, **kwargs) -> None: + super(ElasticPoolActivity, self).__init__(**kwargs) + self.location = location + self.end_time = None + self.error_code = None + self.error_message = None + self.error_severity = None + self.operation = None + self.operation_id = None + self.percent_complete = None + self.requested_database_dtu_max = None + self.requested_database_dtu_min = None + self.requested_dtu = None + self.requested_elastic_pool_name = None + self.requested_storage_limit_in_gb = None + self.elastic_pool_name = None + self.server_name = None + self.start_time = None + self.state = None + self.requested_storage_limit_in_mb = None + self.requested_database_dtu_guarantee = None + self.requested_database_dtu_cap = None + self.requested_dtu_guarantee = None + + +class ElasticPoolDatabaseActivity(ProxyResource): + """Represents the activity on an elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar database_name: The database name. + :vartype database_name: str + :ivar end_time: The time the operation finished (ISO8601 format). + :vartype end_time: datetime + :ivar error_code: The error code if available. + :vartype error_code: int + :ivar error_message: The error message if available. + :vartype error_message: str + :ivar error_severity: The error severity if available. + :vartype error_severity: int + :ivar operation: The operation name. + :vartype operation: str + :ivar operation_id: The unique operation ID. + :vartype operation_id: str + :ivar percent_complete: The percentage complete if available. + :vartype percent_complete: int + :ivar requested_elastic_pool_name: The name for the elastic pool the + database is moving into if available. + :vartype requested_elastic_pool_name: str + :ivar current_elastic_pool_name: The name of the current elastic pool the + database is in if available. + :vartype current_elastic_pool_name: str + :ivar current_service_objective: The name of the current service objective + if available. + :vartype current_service_objective: str + :ivar requested_service_objective: The name of the requested service + objective if available. + :vartype requested_service_objective: str + :ivar server_name: The name of the server the elastic pool is in. + :vartype server_name: str + :ivar start_time: The time the operation started (ISO8601 format). + :vartype start_time: datetime + :ivar state: The current state of the operation. + :vartype state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_name': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_message': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_id': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'requested_elastic_pool_name': {'readonly': True}, + 'current_elastic_pool_name': {'readonly': True}, + 'current_service_objective': {'readonly': True}, + 'requested_service_objective': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, + 'current_elastic_pool_name': {'key': 'properties.currentElasticPoolName', 'type': 'str'}, + 'current_service_objective': {'key': 'properties.currentServiceObjective', 'type': 'str'}, + 'requested_service_objective': {'key': 'properties.requestedServiceObjective', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, **kwargs) -> None: + super(ElasticPoolDatabaseActivity, self).__init__(**kwargs) + self.location = location + self.database_name = None + self.end_time = None + self.error_code = None + self.error_message = None + self.error_severity = None + self.operation = None + self.operation_id = None + self.percent_complete = None + self.requested_elastic_pool_name = None + self.current_elastic_pool_name = None + self.current_service_objective = None + self.requested_service_objective = None + self.server_name = None + self.start_time = None + self.state = None + + +class ElasticPoolEditionCapability(Model): + """The elastic pool edition capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The elastic pool edition name. + :vartype name: str + :ivar supported_elastic_pool_performance_levels: The list of supported + elastic pool DTU levels for the edition. + :vartype supported_elastic_pool_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerformanceLevelCapability] + :ivar zone_redundant: Whether or not zone redundancy is supported for the + edition. + :vartype zone_redundant: bool + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_elastic_pool_performance_levels': {'readonly': True}, + 'zone_redundant': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_elastic_pool_performance_levels': {'key': 'supportedElasticPoolPerformanceLevels', 'type': '[ElasticPoolPerformanceLevelCapability]'}, + 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ElasticPoolEditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_elastic_pool_performance_levels = None + self.zone_redundant = None + self.status = None + self.reason = reason + + +class ElasticPoolOperation(ProxyResource): + """A elastic pool operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar elastic_pool_name: The name of the elastic pool the operation is + being performed on. + :vartype elastic_pool_name: str + :ivar operation: The name of operation. + :vartype operation: str + :ivar operation_friendly_name: The friendly name of operation. + :vartype operation_friendly_name: str + :ivar percent_complete: The percentage of the operation completed. + :vartype percent_complete: int + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar start_time: The operation start time. + :vartype start_time: datetime + :ivar state: The operation state. + :vartype state: str + :ivar error_code: The operation error code. + :vartype error_code: int + :ivar error_description: The operation error description. + :vartype error_description: str + :ivar error_severity: The operation error severity. + :vartype error_severity: int + :ivar is_user_error: Whether or not the error is a user error. + :vartype is_user_error: bool + :ivar estimated_completion_time: The estimated completion time of the + operation. + :vartype estimated_completion_time: datetime + :ivar description: The operation description. + :vartype description: str + :ivar is_cancellable: Whether the operation can be cancelled. + :vartype is_cancellable: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_friendly_name': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_description': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'is_user_error': {'readonly': True}, + 'estimated_completion_time': {'readonly': True}, + 'description': {'readonly': True}, + 'is_cancellable': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, + 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(ElasticPoolOperation, self).__init__(**kwargs) + self.elastic_pool_name = None + self.operation = None + self.operation_friendly_name = None + self.percent_complete = None + self.server_name = None + self.start_time = None + self.state = None + self.error_code = None + self.error_description = None + self.error_severity = None + self.is_user_error = None + self.estimated_completion_time = None + self.description = None + self.is_cancellable = None + + +class ElasticPoolPerDatabaseMaxPerformanceLevelCapability(Model): + """The max per-database performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The maximum performance level per database. + :vartype limit: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + :ivar supported_per_database_min_performance_levels: The list of supported + min database performance levels. + :vartype supported_per_database_min_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMinPerformanceLevelCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'supported_per_database_min_performance_levels': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'supported_per_database_min_performance_levels': {'key': 'supportedPerDatabaseMinPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMinPerformanceLevelCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ElasticPoolPerDatabaseMaxPerformanceLevelCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + self.supported_per_database_min_performance_levels = None + self.status = None + self.reason = reason + + +class ElasticPoolPerDatabaseMinPerformanceLevelCapability(Model): + """The minimum per-database performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The minimum performance level per database. + :vartype limit: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ElasticPoolPerDatabaseMinPerformanceLevelCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + self.status = None + self.reason = reason + + +class ElasticPoolPerDatabaseSettings(Model): + """Per database settings of an elastic pool. + + :param min_capacity: The minimum capacity all databases are guaranteed. + :type min_capacity: float + :param max_capacity: The maximum capacity any one database can consume. + :type max_capacity: float + """ + + _attribute_map = { + 'min_capacity': {'key': 'minCapacity', 'type': 'float'}, + 'max_capacity': {'key': 'maxCapacity', 'type': 'float'}, + } + + def __init__(self, *, min_capacity: float=None, max_capacity: float=None, **kwargs) -> None: + super(ElasticPoolPerDatabaseSettings, self).__init__(**kwargs) + self.min_capacity = min_capacity + self.max_capacity = max_capacity + + +class ElasticPoolPerformanceLevelCapability(Model): + """The Elastic Pool performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar performance_level: The performance level for the pool. + :vartype performance_level: + ~azure.mgmt.sql.models.PerformanceLevelCapability + :ivar sku: The sku. + :vartype sku: ~azure.mgmt.sql.models.Sku + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar max_database_count: The maximum number of databases supported. + :vartype max_database_count: int + :ivar included_max_size: The included (free) max size for this performance + level. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar supported_max_sizes: The list of supported max sizes. + :vartype supported_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar supported_per_database_max_sizes: The list of supported per database + max sizes. + :vartype supported_per_database_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar supported_per_database_max_performance_levels: The list of supported + per database max performance levels. + :vartype supported_per_database_max_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMaxPerformanceLevelCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'performance_level': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'max_database_count': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'supported_max_sizes': {'readonly': True}, + 'supported_per_database_max_sizes': {'readonly': True}, + 'supported_per_database_max_performance_levels': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'max_database_count': {'key': 'maxDatabaseCount', 'type': 'int'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'supported_per_database_max_sizes': {'key': 'supportedPerDatabaseMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'supported_per_database_max_performance_levels': {'key': 'supportedPerDatabaseMaxPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMaxPerformanceLevelCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ElasticPoolPerformanceLevelCapability, self).__init__(**kwargs) + self.performance_level = None + self.sku = None + self.supported_license_types = None + self.max_database_count = None + self.included_max_size = None + self.supported_max_sizes = None + self.supported_per_database_max_sizes = None + self.supported_per_database_max_performance_levels = None + self.status = None + self.reason = reason + + +class ElasticPoolUpdate(Model): + """An elastic pool update. + + :param sku: + :type sku: ~azure.mgmt.sql.models.Sku + :param max_size_bytes: The storage limit for the database elastic pool in + bytes. + :type max_size_bytes: long + :param per_database_settings: The per database settings for the elastic + pool. + :type per_database_settings: + ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings + :param zone_redundant: Whether or not this elastic pool is zone redundant, + which means the replicas of this elastic pool will be spread across + multiple availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this elastic pool. + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, sku=None, max_size_bytes: int=None, per_database_settings=None, zone_redundant: bool=None, license_type=None, tags=None, **kwargs) -> None: + super(ElasticPoolUpdate, self).__init__(**kwargs) + self.sku = sku + self.max_size_bytes = max_size_bytes + self.per_database_settings = per_database_settings + self.zone_redundant = zone_redundant + self.license_type = license_type + self.tags = tags + + +class EncryptionProtector(ProxyResource): + """The server encryption protector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :type kind: str + :ivar location: Resource location. + :vartype location: str + :ivar subregion: Subregion of the encryption protector. + :vartype subregion: str + :param server_key_name: The name of the server key. + :type server_key_name: str + :param server_key_type: Required. The encryption protector type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :ivar uri: The URI of the server key. + :vartype uri: str + :ivar thumbprint: Thumbprint of the server key. + :vartype thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'subregion': {'readonly': True}, + 'server_key_type': {'required': True}, + 'uri': {'readonly': True}, + 'thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'subregion': {'key': 'properties.subregion', 'type': 'str'}, + 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, *, server_key_type, kind: str=None, server_key_name: str=None, **kwargs) -> None: + super(EncryptionProtector, self).__init__(**kwargs) + self.kind = kind + self.location = None + self.subregion = None + self.server_key_name = server_key_name + self.server_key_type = server_key_type + self.uri = None + self.thumbprint = None + + +class ExportRequest(Model): + """Export database parameters. + + All required parameters must be populated in order to send to Azure. + + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + } + + _attribute_map = { + 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, + } + + def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, authentication_type="SQL", **kwargs) -> None: + super(ExportRequest, self).__init__(**kwargs) + self.storage_key_type = storage_key_type + self.storage_key = storage_key + self.storage_uri = storage_uri + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.authentication_type = authentication_type + + +class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): + """An extended database blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param predicate_expression: Specifies condition of where clause when + creating an audit. + :type predicate_expression: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: + super(ExtendedDatabaseBlobAuditingPolicy, self).__init__(**kwargs) + self.predicate_expression = predicate_expression + self.state = state + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.audit_actions_and_groups = audit_actions_and_groups + self.storage_account_subscription_id = storage_account_subscription_id + self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use + self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + + +class ExtendedServerBlobAuditingPolicy(ProxyResource): + """An extended server blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param predicate_expression: Specifies condition of where clause when + creating an audit. + :type predicate_expression: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: + super(ExtendedServerBlobAuditingPolicy, self).__init__(**kwargs) + self.predicate_expression = predicate_expression + self.state = state + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.audit_actions_and_groups = audit_actions_and_groups + self.storage_account_subscription_id = storage_account_subscription_id + self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use + self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + + +class FailoverGroup(ProxyResource): + """A failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param read_write_endpoint: Required. Read-write endpoint of the failover + group instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint + :ivar replication_role: Local replication role of the failover group + instance. Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.FailoverGroupReplicationRole + :ivar replication_state: Replication state of the failover group instance. + :vartype replication_state: str + :param partner_servers: Required. List of partner server information for + the failover group. + :type partner_servers: list[~azure.mgmt.sql.models.PartnerInfo] + :param databases: List of databases in the failover group. + :type databases: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'read_write_endpoint': {'required': True}, + 'replication_role': {'readonly': True}, + 'replication_state': {'readonly': True}, + 'partner_servers': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, + 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + 'partner_servers': {'key': 'properties.partnerServers', 'type': '[PartnerInfo]'}, + 'databases': {'key': 'properties.databases', 'type': '[str]'}, + } + + def __init__(self, *, read_write_endpoint, partner_servers, tags=None, read_only_endpoint=None, databases=None, **kwargs) -> None: + super(FailoverGroup, self).__init__(**kwargs) + self.location = None + self.tags = tags + self.read_write_endpoint = read_write_endpoint + self.read_only_endpoint = read_only_endpoint + self.replication_role = None + self.replication_state = None + self.partner_servers = partner_servers + self.databases = databases + + +class FailoverGroupReadOnlyEndpoint(Model): + """Read-only endpoint of the failover group instance. + + :param failover_policy: Failover policy of the read-only endpoint for the + failover group. Possible values include: 'Disabled', 'Enabled' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy + """ + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + } + + def __init__(self, *, failover_policy=None, **kwargs) -> None: + super(FailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) + self.failover_policy = failover_policy + + +class FailoverGroupReadWriteEndpoint(Model): + """Read-write endpoint of the failover group instance. + + All required parameters must be populated in order to send to Azure. + + :param failover_policy: Required. Failover policy of the read-write + endpoint for the failover group. If failoverPolicy is Automatic then + failoverWithDataLossGracePeriodMinutes is required. Possible values + include: 'Manual', 'Automatic' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy + :param failover_with_data_loss_grace_period_minutes: Grace period before + failover with data loss is attempted for the read-write endpoint. If + failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is + required. + :type failover_with_data_loss_grace_period_minutes: int + """ + + _validation = { + 'failover_policy': {'required': True}, + } + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, + } + + def __init__(self, *, failover_policy, failover_with_data_loss_grace_period_minutes: int=None, **kwargs) -> None: + super(FailoverGroupReadWriteEndpoint, self).__init__(**kwargs) + self.failover_policy = failover_policy + self.failover_with_data_loss_grace_period_minutes = failover_with_data_loss_grace_period_minutes + + +class FailoverGroupUpdate(Model): + """A failover group update request. + + :param read_write_endpoint: Read-write endpoint of the failover group + instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint + :param databases: List of databases in the failover group. + :type databases: list[str] + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, + 'databases': {'key': 'properties.databases', 'type': '[str]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, read_write_endpoint=None, read_only_endpoint=None, databases=None, tags=None, **kwargs) -> None: + super(FailoverGroupUpdate, self).__init__(**kwargs) + self.read_write_endpoint = read_write_endpoint + self.read_only_endpoint = read_only_endpoint + self.databases = databases + self.tags = tags + + +class FirewallRule(ProxyResource): + """Represents a server firewall rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of server that contains this firewall rule. + :vartype kind: str + :ivar location: Location of the server that contains this firewall rule. + :vartype location: str + :param start_ip_address: Required. The start IP address of the firewall + rule. Must be IPv4 format. Use value '0.0.0.0' to represent all + Azure-internal IP addresses. + :type start_ip_address: str + :param end_ip_address: Required. The end IP address of the firewall rule. + Must be IPv4 format. Must be greater than or equal to startIpAddress. Use + value '0.0.0.0' to represent all Azure-internal IP addresses. + :type end_ip_address: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + 'start_ip_address': {'required': True}, + 'end_ip_address': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + } + + def __init__(self, *, start_ip_address: str, end_ip_address: str, **kwargs) -> None: + super(FirewallRule, self).__init__(**kwargs) + self.kind = None + self.location = None + self.start_ip_address = start_ip_address + self.end_ip_address = end_ip_address + + +class GeoBackupPolicy(ProxyResource): + """A database geo backup policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. The state of the geo backup policy. Possible + values include: 'Disabled', 'Enabled' + :type state: str or ~azure.mgmt.sql.models.GeoBackupPolicyState + :ivar storage_type: The storage type of the geo backup policy. + :vartype storage_type: str + :ivar kind: Kind of geo backup policy. This is metadata used for the + Azure portal experience. + :vartype kind: str + :ivar location: Backup policy location. + :vartype location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'storage_type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'GeoBackupPolicyState'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, state, **kwargs) -> None: + super(GeoBackupPolicy, self).__init__(**kwargs) + self.state = state + self.storage_type = None + self.kind = None + self.location = None + + +class ImportExportResponse(ProxyResource): + """Response for Import/Export Get operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar request_type: The request type of the operation. + :vartype request_type: str + :ivar request_id: The request type of the operation. + :vartype request_id: str + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar database_name: The name of the database. + :vartype database_name: str + :ivar status: The status message returned from the server. + :vartype status: str + :ivar last_modified_time: The operation status last modified time. + :vartype last_modified_time: str + :ivar queued_time: The operation queued time. + :vartype queued_time: str + :ivar blob_uri: The blob uri. + :vartype blob_uri: str + :ivar error_message: The error message returned from the server. + :vartype error_message: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'request_type': {'readonly': True}, + 'request_id': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'status': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'queued_time': {'readonly': True}, + 'blob_uri': {'readonly': True}, + 'error_message': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'request_type': {'key': 'properties.requestType', 'type': 'str'}, + 'request_id': {'key': 'properties.requestId', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'str'}, + 'queued_time': {'key': 'properties.queuedTime', 'type': 'str'}, + 'blob_uri': {'key': 'properties.blobUri', 'type': 'str'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ImportExportResponse, self).__init__(**kwargs) + self.request_type = None + self.request_id = None + self.server_name = None + self.database_name = None + self.status = None + self.last_modified_time = None + self.queued_time = None + self.blob_uri = None + self.error_message = None + + +class ImportExtensionRequest(Model): + """Import database parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: The name of the extension. + :type name: str + :param type: The type of the extension. + :type type: str + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + :ivar operation_mode: Required. The type of import operation being + performed. This is always Import. Default value: "Import" . + :vartype operation_mode: str + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + 'operation_mode': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_key_type': {'key': 'properties.storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'properties.storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'properties.storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'properties.authenticationType', 'type': 'AuthenticationType'}, + 'operation_mode': {'key': 'properties.operationMode', 'type': 'str'}, + } + + operation_mode = "Import" + + def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, name: str=None, type: str=None, authentication_type="SQL", **kwargs) -> None: + super(ImportExtensionRequest, self).__init__(**kwargs) + self.name = name + self.type = type + self.storage_key_type = storage_key_type + self.storage_key = storage_key + self.storage_uri = storage_uri + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.authentication_type = authentication_type + + +class ImportRequest(ExportRequest): + """Import database parameters. + + All required parameters must be populated in order to send to Azure. + + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + :param database_name: Required. The name of the database to import. + :type database_name: str + :param edition: Required. The edition for the database being created. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location + ```` + . Possible values include: 'Web', 'Business', 'Basic', 'Standard', + 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', + 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale' + :type edition: str or ~azure.mgmt.sql.models.DatabaseEdition + :param service_objective_name: Required. The name of the service objective + to assign to the database. Possible values include: 'System', 'System0', + 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', + 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', + 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', + 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', + 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', + 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', + 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', + 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' + :type service_objective_name: str or + ~azure.mgmt.sql.models.ServiceObjectiveName + :param max_size_bytes: Required. The maximum size for the newly imported + database. + :type max_size_bytes: str + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + 'database_name': {'required': True}, + 'edition': {'required': True}, + 'service_objective_name': {'required': True}, + 'max_size_bytes': {'required': True}, + } + + _attribute_map = { + 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'edition': {'key': 'edition', 'type': 'str'}, + 'service_objective_name': {'key': 'serviceObjectiveName', 'type': 'str'}, + 'max_size_bytes': {'key': 'maxSizeBytes', 'type': 'str'}, + } + + def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, database_name: str, edition, service_objective_name, max_size_bytes: str, authentication_type="SQL", **kwargs) -> None: + super(ImportRequest, self).__init__(storage_key_type=storage_key_type, storage_key=storage_key, storage_uri=storage_uri, administrator_login=administrator_login, administrator_login_password=administrator_login_password, authentication_type=authentication_type, **kwargs) + self.database_name = database_name + self.edition = edition + self.service_objective_name = service_objective_name + self.max_size_bytes = max_size_bytes + + +class InstanceFailoverGroup(ProxyResource): + """An instance failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param read_write_endpoint: Required. Read-write endpoint of the failover + group instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.InstanceFailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.InstanceFailoverGroupReadOnlyEndpoint + :ivar replication_role: Local replication role of the failover group + instance. Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole + :ivar replication_state: Replication state of the failover group instance. + :vartype replication_state: str + :param partner_regions: Required. Partner region information for the + failover group. + :type partner_regions: list[~azure.mgmt.sql.models.PartnerRegionInfo] + :param managed_instance_pairs: Required. List of managed instance pairs in + the failover group. + :type managed_instance_pairs: + list[~azure.mgmt.sql.models.ManagedInstancePairInfo] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'read_write_endpoint': {'required': True}, + 'replication_role': {'readonly': True}, + 'replication_state': {'readonly': True}, + 'partner_regions': {'required': True}, + 'managed_instance_pairs': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'InstanceFailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'InstanceFailoverGroupReadOnlyEndpoint'}, + 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + 'partner_regions': {'key': 'properties.partnerRegions', 'type': '[PartnerRegionInfo]'}, + 'managed_instance_pairs': {'key': 'properties.managedInstancePairs', 'type': '[ManagedInstancePairInfo]'}, + } + + def __init__(self, *, read_write_endpoint, partner_regions, managed_instance_pairs, read_only_endpoint=None, **kwargs) -> None: + super(InstanceFailoverGroup, self).__init__(**kwargs) + self.read_write_endpoint = read_write_endpoint + self.read_only_endpoint = read_only_endpoint + self.replication_role = None + self.replication_state = None + self.partner_regions = partner_regions + self.managed_instance_pairs = managed_instance_pairs + + +class InstanceFailoverGroupReadOnlyEndpoint(Model): + """Read-only endpoint of the failover group instance. + + :param failover_policy: Failover policy of the read-only endpoint for the + failover group. Possible values include: 'Disabled', 'Enabled' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy + """ + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + } + + def __init__(self, *, failover_policy=None, **kwargs) -> None: + super(InstanceFailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) + self.failover_policy = failover_policy + + +class InstanceFailoverGroupReadWriteEndpoint(Model): + """Read-write endpoint of the failover group instance. + + All required parameters must be populated in order to send to Azure. + + :param failover_policy: Required. Failover policy of the read-write + endpoint for the failover group. If failoverPolicy is Automatic then + failoverWithDataLossGracePeriodMinutes is required. Possible values + include: 'Manual', 'Automatic' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy + :param failover_with_data_loss_grace_period_minutes: Grace period before + failover with data loss is attempted for the read-write endpoint. If + failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is + required. + :type failover_with_data_loss_grace_period_minutes: int + """ + + _validation = { + 'failover_policy': {'required': True}, + } + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, + } + + def __init__(self, *, failover_policy, failover_with_data_loss_grace_period_minutes: int=None, **kwargs) -> None: + super(InstanceFailoverGroupReadWriteEndpoint, self).__init__(**kwargs) + self.failover_policy = failover_policy + self.failover_with_data_loss_grace_period_minutes = failover_with_data_loss_grace_period_minutes + + +class InstancePool(TrackedResource): + """An Azure SQL instance pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param subnet_id: Required. Resource ID of the subnet to place this + instance pool in. + :type subnet_id: str + :param v_cores: Required. Count of vCores belonging to this instance pool. + :type v_cores: int + :param license_type: Required. The license type. Possible values are + 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' + (without SQL license price). Possible values include: 'LicenseIncluded', + 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.InstancePoolLicenseType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'subnet_id': {'required': True}, + 'v_cores': {'required': True}, + 'license_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + } + + def __init__(self, *, location: str, subnet_id: str, v_cores: int, license_type, tags=None, sku=None, **kwargs) -> None: + super(InstancePool, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.subnet_id = subnet_id + self.v_cores = v_cores + self.license_type = license_type + + +class InstancePoolUpdate(Model): + """An update to an Instance pool. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(InstancePoolUpdate, self).__init__(**kwargs) + self.tags = tags + + +class Job(ProxyResource): + """A job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param description: User-defined description of the job. Default value: "" + . + :type description: str + :ivar version: The job version number. + :vartype version: int + :param schedule: Schedule properties of the job. + :type schedule: ~azure.mgmt.sql.models.JobSchedule + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'int'}, + 'schedule': {'key': 'properties.schedule', 'type': 'JobSchedule'}, + } + + def __init__(self, *, description: str="", schedule=None, **kwargs) -> None: + super(Job, self).__init__(**kwargs) + self.description = description + self.version = None + self.schedule = schedule + + +class JobAgent(TrackedResource): + """An Azure SQL job agent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param database_id: Required. Resource ID of the database to store job + metadata in. + :type database_id: str + :ivar state: The state of the job agent. Possible values include: + 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' + :vartype state: str or ~azure.mgmt.sql.models.JobAgentState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'database_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, *, location: str, database_id: str, tags=None, sku=None, **kwargs) -> None: + super(JobAgent, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.database_id = database_id + self.state = None + + +class JobAgentUpdate(Model): + """An update to an Azure SQL job agent. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(JobAgentUpdate, self).__init__(**kwargs) + self.tags = tags + + +class JobCredential(ProxyResource): + """A stored credential that can be used by a job to connect to target + databases. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param username: Required. The credential user name. + :type username: str + :param password: Required. The credential password. + :type password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'username': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'username': {'key': 'properties.username', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + } + + def __init__(self, *, username: str, password: str, **kwargs) -> None: + super(JobCredential, self).__init__(**kwargs) + self.username = username + self.password = password + + +class JobExecution(ProxyResource): + """An execution of a job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar job_version: The job version number. + :vartype job_version: int + :ivar step_name: The job step name. + :vartype step_name: str + :ivar step_id: The job step id. + :vartype step_id: int + :ivar job_execution_id: The unique identifier of the job execution. + :vartype job_execution_id: str + :ivar lifecycle: The detailed state of the job execution. Possible values + include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', + 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', + 'TimedOut', 'Canceled', 'Skipped' + :vartype lifecycle: str or ~azure.mgmt.sql.models.JobExecutionLifecycle + :ivar provisioning_state: The ARM provisioning state of the job execution. + Possible values include: 'Created', 'InProgress', 'Succeeded', 'Failed', + 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.sql.models.ProvisioningState + :ivar create_time: The time that the job execution was created. + :vartype create_time: datetime + :ivar start_time: The time that the job execution started. + :vartype start_time: datetime + :ivar end_time: The time that the job execution completed. + :vartype end_time: datetime + :param current_attempts: Number of times the job execution has been + attempted. + :type current_attempts: int + :ivar current_attempt_start_time: Start time of the current attempt. + :vartype current_attempt_start_time: datetime + :ivar last_message: The last status or error message. + :vartype last_message: str + :ivar target: The target that this execution is executed on. + :vartype target: ~azure.mgmt.sql.models.JobExecutionTarget + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'job_version': {'readonly': True}, + 'step_name': {'readonly': True}, + 'step_id': {'readonly': True}, + 'job_execution_id': {'readonly': True}, + 'lifecycle': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'create_time': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'current_attempt_start_time': {'readonly': True}, + 'last_message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'job_version': {'key': 'properties.jobVersion', 'type': 'int'}, + 'step_name': {'key': 'properties.stepName', 'type': 'str'}, + 'step_id': {'key': 'properties.stepId', 'type': 'int'}, + 'job_execution_id': {'key': 'properties.jobExecutionId', 'type': 'str'}, + 'lifecycle': {'key': 'properties.lifecycle', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'current_attempts': {'key': 'properties.currentAttempts', 'type': 'int'}, + 'current_attempt_start_time': {'key': 'properties.currentAttemptStartTime', 'type': 'iso-8601'}, + 'last_message': {'key': 'properties.lastMessage', 'type': 'str'}, + 'target': {'key': 'properties.target', 'type': 'JobExecutionTarget'}, + } + + def __init__(self, *, current_attempts: int=None, **kwargs) -> None: + super(JobExecution, self).__init__(**kwargs) + self.job_version = None + self.step_name = None + self.step_id = None + self.job_execution_id = None + self.lifecycle = None + self.provisioning_state = None + self.create_time = None + self.start_time = None + self.end_time = None + self.current_attempts = current_attempts + self.current_attempt_start_time = None + self.last_message = None + self.target = None + + +class JobExecutionTarget(Model): + """The target that a job execution is executed on. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of the target. Possible values include: + 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + :vartype type: str or ~azure.mgmt.sql.models.JobTargetType + :ivar server_name: The server name. + :vartype server_name: str + :ivar database_name: The database name. + :vartype database_name: str + """ + + _validation = { + 'type': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(JobExecutionTarget, self).__init__(**kwargs) + self.type = None + self.server_name = None + self.database_name = None + + +class JobSchedule(Model): + """Scheduling properties of a job. + + :param start_time: Schedule start time. Default value: + "0001-01-01T00:00:00Z" . + :type start_time: datetime + :param end_time: Schedule end time. Default value: "9999-12-31T11:59:59Z" + . + :type end_time: datetime + :param type: Schedule interval type. Possible values include: 'Once', + 'Recurring'. Default value: "Once" . + :type type: str or ~azure.mgmt.sql.models.JobScheduleType + :param enabled: Whether or not the schedule is enabled. + :type enabled: bool + :param interval: Value of the schedule's recurring interval, if the + schedule type is recurring. ISO8601 duration format. + :type interval: str + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'JobScheduleType'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'interval': {'key': 'interval', 'type': 'str'}, + } + + def __init__(self, *, start_time="0001-01-01T00:00:00Z", end_time="9999-12-31T11:59:59Z", type="Once", enabled: bool=None, interval: str=None, **kwargs) -> None: + super(JobSchedule, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.type = type + self.enabled = enabled + self.interval = interval + + +class JobStep(ProxyResource): + """A job step. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param step_id: The job step's index within the job. If not specified when + creating the job step, it will be created as the last step. If not + specified when updating the job step, the step id is not modified. + :type step_id: int + :param target_group: Required. The resource ID of the target group that + the job step will be executed on. + :type target_group: str + :param credential: Required. The resource ID of the job credential that + will be used to connect to the targets. + :type credential: str + :param action: Required. The action payload of the job step. + :type action: ~azure.mgmt.sql.models.JobStepAction + :param output: Output destination properties of the job step. + :type output: ~azure.mgmt.sql.models.JobStepOutput + :param execution_options: Execution options for the job step. + :type execution_options: ~azure.mgmt.sql.models.JobStepExecutionOptions + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'target_group': {'required': True}, + 'credential': {'required': True}, + 'action': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'step_id': {'key': 'properties.stepId', 'type': 'int'}, + 'target_group': {'key': 'properties.targetGroup', 'type': 'str'}, + 'credential': {'key': 'properties.credential', 'type': 'str'}, + 'action': {'key': 'properties.action', 'type': 'JobStepAction'}, + 'output': {'key': 'properties.output', 'type': 'JobStepOutput'}, + 'execution_options': {'key': 'properties.executionOptions', 'type': 'JobStepExecutionOptions'}, + } + + def __init__(self, *, target_group: str, credential: str, action, step_id: int=None, output=None, execution_options=None, **kwargs) -> None: + super(JobStep, self).__init__(**kwargs) + self.step_id = step_id + self.target_group = target_group + self.credential = credential + self.action = action + self.output = output + self.execution_options = execution_options + + +class JobStepAction(Model): + """The action to be executed by a job step. + + All required parameters must be populated in order to send to Azure. + + :param type: Type of action being executed by the job step. Possible + values include: 'TSql'. Default value: "TSql" . + :type type: str or ~azure.mgmt.sql.models.JobStepActionType + :param source: The source of the action to execute. Possible values + include: 'Inline'. Default value: "Inline" . + :type source: str or ~azure.mgmt.sql.models.JobStepActionSource + :param value: Required. The action value, for example the text of the + T-SQL script to execute. + :type value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, value: str, type="TSql", source="Inline", **kwargs) -> None: + super(JobStepAction, self).__init__(**kwargs) + self.type = type + self.source = source + self.value = value + + +class JobStepExecutionOptions(Model): + """The execution options of a job step. + + :param timeout_seconds: Execution timeout for the job step. Default value: + 43200 . + :type timeout_seconds: int + :param retry_attempts: Maximum number of times the job step will be + reattempted if the first attempt fails. Default value: 10 . + :type retry_attempts: int + :param initial_retry_interval_seconds: Initial delay between retries for + job step execution. Default value: 1 . + :type initial_retry_interval_seconds: int + :param maximum_retry_interval_seconds: The maximum amount of time to wait + between retries for job step execution. Default value: 120 . + :type maximum_retry_interval_seconds: int + :param retry_interval_backoff_multiplier: The backoff multiplier for the + time between retries. Default value: 2 . + :type retry_interval_backoff_multiplier: float + """ + + _attribute_map = { + 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, + 'retry_attempts': {'key': 'retryAttempts', 'type': 'int'}, + 'initial_retry_interval_seconds': {'key': 'initialRetryIntervalSeconds', 'type': 'int'}, + 'maximum_retry_interval_seconds': {'key': 'maximumRetryIntervalSeconds', 'type': 'int'}, + 'retry_interval_backoff_multiplier': {'key': 'retryIntervalBackoffMultiplier', 'type': 'float'}, + } + + def __init__(self, *, timeout_seconds: int=43200, retry_attempts: int=10, initial_retry_interval_seconds: int=1, maximum_retry_interval_seconds: int=120, retry_interval_backoff_multiplier: float=2, **kwargs) -> None: + super(JobStepExecutionOptions, self).__init__(**kwargs) + self.timeout_seconds = timeout_seconds + self.retry_attempts = retry_attempts + self.initial_retry_interval_seconds = initial_retry_interval_seconds + self.maximum_retry_interval_seconds = maximum_retry_interval_seconds + self.retry_interval_backoff_multiplier = retry_interval_backoff_multiplier + + +class JobStepOutput(Model): + """The output configuration of a job step. + + All required parameters must be populated in order to send to Azure. + + :param type: The output destination type. Possible values include: + 'SqlDatabase'. Default value: "SqlDatabase" . + :type type: str or ~azure.mgmt.sql.models.JobStepOutputType + :param subscription_id: The output destination subscription id. + :type subscription_id: str + :param resource_group_name: The output destination resource group. + :type resource_group_name: str + :param server_name: Required. The output destination server name. + :type server_name: str + :param database_name: Required. The output destination database. + :type database_name: str + :param schema_name: The output destination schema. Default value: "dbo" . + :type schema_name: str + :param table_name: Required. The output destination table. + :type table_name: str + :param credential: Required. The resource ID of the credential to use to + connect to the output destination. + :type credential: str + """ + + _validation = { + 'server_name': {'required': True}, + 'database_name': {'required': True}, + 'table_name': {'required': True}, + 'credential': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'credential': {'key': 'credential', 'type': 'str'}, + } + + def __init__(self, *, server_name: str, database_name: str, table_name: str, credential: str, type="SqlDatabase", subscription_id: str=None, resource_group_name: str=None, schema_name: str="dbo", **kwargs) -> None: + super(JobStepOutput, self).__init__(**kwargs) + self.type = type + self.subscription_id = subscription_id + self.resource_group_name = resource_group_name + self.server_name = server_name + self.database_name = database_name + self.schema_name = schema_name + self.table_name = table_name + self.credential = credential + + +class JobTarget(Model): + """A job target, for example a specific database or a container of databases + that is evaluated during job execution. + + All required parameters must be populated in order to send to Azure. + + :param membership_type: Whether the target is included or excluded from + the group. Possible values include: 'Include', 'Exclude'. Default value: + "Include" . + :type membership_type: str or + ~azure.mgmt.sql.models.JobTargetGroupMembershipType + :param type: Required. The target type. Possible values include: + 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + :type type: str or ~azure.mgmt.sql.models.JobTargetType + :param server_name: The target server name. + :type server_name: str + :param database_name: The target database name. + :type database_name: str + :param elastic_pool_name: The target elastic pool name. + :type elastic_pool_name: str + :param shard_map_name: The target shard map. + :type shard_map_name: str + :param refresh_credential: The resource ID of the credential that is used + during job execution to connect to the target and determine the list of + databases inside the target. + :type refresh_credential: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'membership_type': {'key': 'membershipType', 'type': 'JobTargetGroupMembershipType'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'elastic_pool_name': {'key': 'elasticPoolName', 'type': 'str'}, + 'shard_map_name': {'key': 'shardMapName', 'type': 'str'}, + 'refresh_credential': {'key': 'refreshCredential', 'type': 'str'}, + } + + def __init__(self, *, type, membership_type="Include", server_name: str=None, database_name: str=None, elastic_pool_name: str=None, shard_map_name: str=None, refresh_credential: str=None, **kwargs) -> None: + super(JobTarget, self).__init__(**kwargs) + self.membership_type = membership_type + self.type = type + self.server_name = server_name + self.database_name = database_name + self.elastic_pool_name = elastic_pool_name + self.shard_map_name = shard_map_name + self.refresh_credential = refresh_credential + + +class JobTargetGroup(ProxyResource): + """A group of job targets. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param members: Required. Members of the target group. + :type members: list[~azure.mgmt.sql.models.JobTarget] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'members': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'members': {'key': 'properties.members', 'type': '[JobTarget]'}, + } + + def __init__(self, *, members, **kwargs) -> None: + super(JobTargetGroup, self).__init__(**kwargs) + self.members = members + + +class JobVersion(ProxyResource): + """A job version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(JobVersion, self).__init__(**kwargs) + + +class LicenseTypeCapability(Model): + """The license type capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: License type identifier. + :vartype name: str + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(LicenseTypeCapability, self).__init__(**kwargs) + self.name = None + self.status = None + self.reason = reason + + +class LocationCapabilities(Model): + """The location capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The location name. + :vartype name: str + :ivar supported_server_versions: The list of supported server versions. + :vartype supported_server_versions: + list[~azure.mgmt.sql.models.ServerVersionCapability] + :ivar supported_managed_instance_versions: The list of supported managed + instance versions. + :vartype supported_managed_instance_versions: + list[~azure.mgmt.sql.models.ManagedInstanceVersionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_server_versions': {'readonly': True}, + 'supported_managed_instance_versions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_server_versions': {'key': 'supportedServerVersions', 'type': '[ServerVersionCapability]'}, + 'supported_managed_instance_versions': {'key': 'supportedManagedInstanceVersions', 'type': '[ManagedInstanceVersionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(LocationCapabilities, self).__init__(**kwargs) + self.name = None + self.supported_server_versions = None + self.supported_managed_instance_versions = None + self.status = None + self.reason = reason + + +class LogSizeCapability(Model): + """The log size capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The log size limit (see 'unit' for the units). + :vartype limit: int + :ivar unit: The units that the limit is expressed in. Possible values + include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes', 'Percent' + :vartype unit: str or ~azure.mgmt.sql.models.LogSizeUnit + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'int'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(LogSizeCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + + +class LongTermRetentionBackup(ProxyResource): + """A long term retention backup. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar server_name: The server name that the backup database belong to. + :vartype server_name: str + :ivar server_create_time: The create time of the server. + :vartype server_create_time: datetime + :ivar database_name: The name of the database the backup belong to + :vartype database_name: str + :ivar database_deletion_time: The delete time of the database + :vartype database_deletion_time: datetime + :ivar backup_time: The time the backup was taken + :vartype backup_time: datetime + :ivar backup_expiration_time: The time the long term retention backup will + expire. + :vartype backup_expiration_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'server_name': {'readonly': True}, + 'server_create_time': {'readonly': True}, + 'database_name': {'readonly': True}, + 'database_deletion_time': {'readonly': True}, + 'backup_time': {'readonly': True}, + 'backup_expiration_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'server_create_time': {'key': 'properties.serverCreateTime', 'type': 'iso-8601'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'database_deletion_time': {'key': 'properties.databaseDeletionTime', 'type': 'iso-8601'}, + 'backup_time': {'key': 'properties.backupTime', 'type': 'iso-8601'}, + 'backup_expiration_time': {'key': 'properties.backupExpirationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(LongTermRetentionBackup, self).__init__(**kwargs) + self.server_name = None + self.server_create_time = None + self.database_name = None + self.database_deletion_time = None + self.backup_time = None + self.backup_expiration_time = None + + +class ManagedBackupShortTermRetentionPolicy(ProxyResource): + """A short term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param retention_days: The backup retention period in days. This is how + many days Point-in-Time Restore will be supported. + :type retention_days: int + """ + + _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'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + } + + def __init__(self, *, retention_days: int=None, **kwargs) -> None: + super(ManagedBackupShortTermRetentionPolicy, self).__init__(**kwargs) + self.retention_days = retention_days + + +class ManagedDatabase(TrackedResource): + """A managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param collation: Collation of the managed database. + :type collation: str + :ivar status: Status of the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' + :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus + :ivar creation_date: Creation date of the database. + :vartype creation_date: datetime + :ivar earliest_restore_point: Earliest restore point in time for point in + time restore. + :vartype earliest_restore_point: datetime + :param restore_point_in_time: Conditional. If createMode is + PointInTimeRestore, this value is required. Specifies the point in time + (ISO8601 format) of the source database that will be restored to create + the new database. + :type restore_point_in_time: datetime + :ivar default_secondary_location: Geo paired region. + :vartype default_secondary_location: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param create_mode: Managed database create mode. PointInTimeRestore: + Create a database by restoring a point in time backup of an existing + database. SourceDatabaseName, SourceManagedInstanceName and PointInTime + must be specified. RestoreExternalBackup: Create a database by restoring + from external backup files. Collation, StorageContainerUri and + StorageContainerSasToken must be specified. Recovery: Creates a database + by restoring a geo-replicated backup. RecoverableDatabaseId must be + specified as the recoverable database resource ID to restore. Possible + values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', + 'Recovery' + :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode + :param storage_container_uri: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the uri of the + storage container where backups for this restore are stored. + :type storage_container_uri: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :param restorable_dropped_database_id: The restorable dropped database + resource id to restore when creating this database. + :type restorable_dropped_database_id: str + :param storage_container_sas_token: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the storage + container sas token. + :type storage_container_sas_token: str + :ivar failover_group_id: Instance Failover Group resource identifier that + this managed database belongs to. + :vartype failover_group_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'status': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'earliest_restore_point': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, restorable_dropped_database_id: str=None, storage_container_sas_token: str=None, recoverable_database_id: str=None, **kwargs) -> None: + super(ManagedDatabase, self).__init__(location=location, tags=tags, **kwargs) + self.collation = collation + self.status = None + self.creation_date = None + self.earliest_restore_point = None + self.restore_point_in_time = restore_point_in_time + self.default_secondary_location = None + self.catalog_collation = catalog_collation + self.create_mode = create_mode + self.storage_container_uri = storage_container_uri + self.source_database_id = source_database_id + self.restorable_dropped_database_id = restorable_dropped_database_id + self.storage_container_sas_token = storage_container_sas_token + self.failover_group_id = None + self.recoverable_database_id = recoverable_database_id + + +class ManagedDatabaseSecurityAlertPolicy(ProxyResource): + """A managed database security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: + super(ManagedDatabaseSecurityAlertPolicy, self).__init__(**kwargs) + self.state = state + self.disabled_alerts = disabled_alerts + self.email_addresses = email_addresses + self.email_account_admins = email_account_admins + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.creation_time = None + + +class ManagedDatabaseUpdate(Model): + """An managed database update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param collation: Collation of the managed database. + :type collation: str + :ivar status: Status of the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' + :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus + :ivar creation_date: Creation date of the database. + :vartype creation_date: datetime + :ivar earliest_restore_point: Earliest restore point in time for point in + time restore. + :vartype earliest_restore_point: datetime + :param restore_point_in_time: Conditional. If createMode is + PointInTimeRestore, this value is required. Specifies the point in time + (ISO8601 format) of the source database that will be restored to create + the new database. + :type restore_point_in_time: datetime + :ivar default_secondary_location: Geo paired region. + :vartype default_secondary_location: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param create_mode: Managed database create mode. PointInTimeRestore: + Create a database by restoring a point in time backup of an existing + database. SourceDatabaseName, SourceManagedInstanceName and PointInTime + must be specified. RestoreExternalBackup: Create a database by restoring + from external backup files. Collation, StorageContainerUri and + StorageContainerSasToken must be specified. Recovery: Creates a database + by restoring a geo-replicated backup. RecoverableDatabaseId must be + specified as the recoverable database resource ID to restore. Possible + values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', + 'Recovery' + :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode + :param storage_container_uri: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the uri of the + storage container where backups for this restore are stored. + :type storage_container_uri: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :param restorable_dropped_database_id: The restorable dropped database + resource id to restore when creating this database. + :type restorable_dropped_database_id: str + :param storage_container_sas_token: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the storage + container sas token. + :type storage_container_sas_token: str + :ivar failover_group_id: Instance Failover Group resource identifier that + this managed database belongs to. + :vartype failover_group_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'status': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'earliest_restore_point': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + } + + _attribute_map = { + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, restorable_dropped_database_id: str=None, storage_container_sas_token: str=None, recoverable_database_id: str=None, tags=None, **kwargs) -> None: + super(ManagedDatabaseUpdate, self).__init__(**kwargs) + self.collation = collation + self.status = None + self.creation_date = None + self.earliest_restore_point = None + self.restore_point_in_time = restore_point_in_time + self.default_secondary_location = None + self.catalog_collation = catalog_collation + self.create_mode = create_mode + self.storage_container_uri = storage_container_uri + self.source_database_id = source_database_id + self.restorable_dropped_database_id = restorable_dropped_database_id + self.storage_container_sas_token = storage_container_sas_token + self.failover_group_id = None + self.recoverable_database_id = recoverable_database_id + self.tags = tags + + +class ManagedInstance(TrackedResource): + """An Azure SQL managed instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param identity: The Azure Active Directory identity of the managed + instance. + :type identity: ~azure.mgmt.sql.models.ResourceIdentity + :param sku: Managed instance SKU. Allowed values for sku.name: GP_Gen4, + GP_Gen5, BC_Gen4, BC_Gen5 + :type sku: ~azure.mgmt.sql.models.Sku + :param managed_instance_create_mode: Specifies the mode of database + creation. + Default: Regular instance creation. + Restore: Creates an instance by restoring a set of backups to specific + point in time. RestorePointInTime and SourceManagedInstanceId must be + specified. Possible values include: 'Default', 'PointInTimeRestore' + :type managed_instance_create_mode: str or + ~azure.mgmt.sql.models.ManagedServerCreateMode + :ivar fully_qualified_domain_name: The fully qualified domain name of the + managed instance. + :vartype fully_qualified_domain_name: str + :param administrator_login: Administrator username for the managed + instance. Can only be specified when the managed instance is being created + (and is required for creation). + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for managed instance creation). + :type administrator_login_password: str + :param subnet_id: Subnet resource ID for the managed instance. + :type subnet_id: str + :ivar state: The state of the managed instance. + :vartype state: str + :param license_type: The license type. Possible values are + 'LicenseIncluded' (regular price inclusive of a new SQL license) and + 'BasePrice' (discounted AHB price for bringing your own SQL licenses). + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or + ~azure.mgmt.sql.models.ManagedInstanceLicenseType + :param v_cores: The number of vCores. Allowed values: 8, 16, 24, 32, 40, + 64, 80. + :type v_cores: int + :param storage_size_in_gb: Storage size in GB. Minimum value: 32. Maximum + value: 8192. Increments of 32 GB allowed only. + :type storage_size_in_gb: int + :param collation: Collation of the managed instance. + :type collation: str + :ivar dns_zone: The Dns Zone that the managed instance is in. + :vartype dns_zone: str + :param dns_zone_partner: The resource id of another managed instance whose + DNS zone this managed instance will share after creation. + :type dns_zone_partner: str + :param public_data_endpoint_enabled: Whether or not the public data + endpoint is enabled. + :type public_data_endpoint_enabled: bool + :param source_managed_instance_id: The resource identifier of the source + managed instance associated with create operation of this instance. + :type source_managed_instance_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param proxy_override: Connection type used for connecting to the + instance. Possible values include: 'Proxy', 'Redirect', 'Default' + :type proxy_override: str or + ~azure.mgmt.sql.models.ManagedInstanceProxyOverride + :param timezone_id: Id of the timezone. Allowed values are timezones + supported by Windows. + Windows keeps details on supported timezones, including the id, in + registry under + KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time + Zones. + You can get those registry values via SQL Server by querying SELECT name + AS timezone_id FROM sys.time_zone_info. + List of Ids can also be obtained by executing + [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + An example of valid timezone id is "Pacific Standard Time" or "W. Europe + Standard Time". + :type timezone_id: str + :param instance_pool_id: The Id of the instance pool this managed server + belongs to. + :type instance_pool_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'fully_qualified_domain_name': {'readonly': True}, + 'state': {'readonly': True}, + 'dns_zone': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, + 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, + 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, + 'source_managed_instance_id': {'key': 'properties.sourceManagedInstanceId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, + 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, + 'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, identity=None, sku=None, managed_instance_create_mode=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type=None, v_cores: int=None, storage_size_in_gb: int=None, collation: str=None, dns_zone_partner: str=None, public_data_endpoint_enabled: bool=None, source_managed_instance_id: str=None, restore_point_in_time=None, proxy_override=None, timezone_id: str=None, instance_pool_id: str=None, **kwargs) -> None: + super(ManagedInstance, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity + self.sku = sku + self.managed_instance_create_mode = managed_instance_create_mode + self.fully_qualified_domain_name = None + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.subnet_id = subnet_id + self.state = None + self.license_type = license_type + self.v_cores = v_cores + self.storage_size_in_gb = storage_size_in_gb + self.collation = collation + self.dns_zone = None + self.dns_zone_partner = dns_zone_partner + self.public_data_endpoint_enabled = public_data_endpoint_enabled + self.source_managed_instance_id = source_managed_instance_id + self.restore_point_in_time = restore_point_in_time + self.proxy_override = proxy_override + self.timezone_id = timezone_id + self.instance_pool_id = instance_pool_id + + +class ManagedInstanceEditionCapability(Model): + """The managed server capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The managed server version name. + :vartype name: str + :ivar supported_families: The supported families. + :vartype supported_families: + list[~azure.mgmt.sql.models.ManagedInstanceFamilyCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_families': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_families': {'key': 'supportedFamilies', 'type': '[ManagedInstanceFamilyCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ManagedInstanceEditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_families = None + self.status = None + self.reason = reason + + +class ManagedInstanceEncryptionProtector(ProxyResource): + """The managed instance encryption protector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :vartype kind: str + :param server_key_name: The name of the managed instance key. + :type server_key_name: str + :param server_key_type: Required. The encryption protector type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :ivar uri: The URI of the server key. + :vartype uri: str + :ivar thumbprint: Thumbprint of the server key. + :vartype thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'server_key_type': {'required': True}, + 'uri': {'readonly': True}, + 'thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, *, server_key_type, server_key_name: str=None, **kwargs) -> None: + super(ManagedInstanceEncryptionProtector, self).__init__(**kwargs) + self.kind = None + self.server_key_name = server_key_name + self.server_key_type = server_key_type + self.uri = None + self.thumbprint = None + + +class ManagedInstanceFamilyCapability(Model): + """The managed server family capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Family name. + :vartype name: str + :ivar sku: SKU name. + :vartype sku: str + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar supported_vcores_values: List of supported virtual cores values. + :vartype supported_vcores_values: + list[~azure.mgmt.sql.models.ManagedInstanceVcoresCapability] + :ivar included_max_size: Included size. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar supported_storage_sizes: Storage size ranges. + :vartype supported_storage_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'supported_vcores_values': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'supported_storage_sizes': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'supported_vcores_values': {'key': 'supportedVcoresValues', 'type': '[ManagedInstanceVcoresCapability]'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'supported_storage_sizes': {'key': 'supportedStorageSizes', 'type': '[MaxSizeRangeCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ManagedInstanceFamilyCapability, self).__init__(**kwargs) + self.name = None + self.sku = None + self.supported_license_types = None + self.supported_vcores_values = None + self.included_max_size = None + self.supported_storage_sizes = None + self.status = None + self.reason = reason + + +class ManagedInstanceKey(ProxyResource): + """A managed instance key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :vartype kind: str + :param server_key_type: Required. The key type like 'ServiceManaged', + 'AzureKeyVault'. Possible values include: 'ServiceManaged', + 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :param uri: The URI of the key. If the ServerKeyType is AzureKeyVault, + then the URI is required. + :type uri: str + :ivar thumbprint: Thumbprint of the key. + :vartype thumbprint: str + :ivar creation_date: The key creation date. + :vartype creation_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'server_key_type': {'required': True}, + 'thumbprint': {'readonly': True}, + 'creation_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, server_key_type, uri: str=None, **kwargs) -> None: + super(ManagedInstanceKey, self).__init__(**kwargs) + self.kind = None + self.server_key_type = server_key_type + self.uri = uri + self.thumbprint = None + self.creation_date = None + + +class ManagedInstancePairInfo(Model): + """Pairs of Managed Instances in the failover group. + + :param primary_managed_instance_id: Id of Primary Managed Instance in + pair. + :type primary_managed_instance_id: str + :param partner_managed_instance_id: Id of Partner Managed Instance in + pair. + :type partner_managed_instance_id: str + """ + + _attribute_map = { + 'primary_managed_instance_id': {'key': 'primaryManagedInstanceId', 'type': 'str'}, + 'partner_managed_instance_id': {'key': 'partnerManagedInstanceId', 'type': 'str'}, + } + + def __init__(self, *, primary_managed_instance_id: str=None, partner_managed_instance_id: str=None, **kwargs) -> None: + super(ManagedInstancePairInfo, self).__init__(**kwargs) + self.primary_managed_instance_id = primary_managed_instance_id + self.partner_managed_instance_id = partner_managed_instance_id + + +class ManagedInstanceUpdate(Model): + """An update request for an Azure SQL Database managed instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param sku: Managed instance sku + :type sku: ~azure.mgmt.sql.models.Sku + :param managed_instance_create_mode: Specifies the mode of database + creation. + Default: Regular instance creation. + Restore: Creates an instance by restoring a set of backups to specific + point in time. RestorePointInTime and SourceManagedInstanceId must be + specified. Possible values include: 'Default', 'PointInTimeRestore' + :type managed_instance_create_mode: str or + ~azure.mgmt.sql.models.ManagedServerCreateMode + :ivar fully_qualified_domain_name: The fully qualified domain name of the + managed instance. + :vartype fully_qualified_domain_name: str + :param administrator_login: Administrator username for the managed + instance. Can only be specified when the managed instance is being created + (and is required for creation). + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for managed instance creation). + :type administrator_login_password: str + :param subnet_id: Subnet resource ID for the managed instance. + :type subnet_id: str + :ivar state: The state of the managed instance. + :vartype state: str + :param license_type: The license type. Possible values are + 'LicenseIncluded' (regular price inclusive of a new SQL license) and + 'BasePrice' (discounted AHB price for bringing your own SQL licenses). + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or + ~azure.mgmt.sql.models.ManagedInstanceLicenseType + :param v_cores: The number of vCores. Allowed values: 8, 16, 24, 32, 40, + 64, 80. + :type v_cores: int + :param storage_size_in_gb: Storage size in GB. Minimum value: 32. Maximum + value: 8192. Increments of 32 GB allowed only. + :type storage_size_in_gb: int + :param collation: Collation of the managed instance. + :type collation: str + :ivar dns_zone: The Dns Zone that the managed instance is in. + :vartype dns_zone: str + :param dns_zone_partner: The resource id of another managed instance whose + DNS zone this managed instance will share after creation. + :type dns_zone_partner: str + :param public_data_endpoint_enabled: Whether or not the public data + endpoint is enabled. + :type public_data_endpoint_enabled: bool + :param source_managed_instance_id: The resource identifier of the source + managed instance associated with create operation of this instance. + :type source_managed_instance_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param proxy_override: Connection type used for connecting to the + instance. Possible values include: 'Proxy', 'Redirect', 'Default' + :type proxy_override: str or + ~azure.mgmt.sql.models.ManagedInstanceProxyOverride + :param timezone_id: Id of the timezone. Allowed values are timezones + supported by Windows. + Windows keeps details on supported timezones, including the id, in + registry under + KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time + Zones. + You can get those registry values via SQL Server by querying SELECT name + AS timezone_id FROM sys.time_zone_info. + List of Ids can also be obtained by executing + [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + An example of valid timezone id is "Pacific Standard Time" or "W. Europe + Standard Time". + :type timezone_id: str + :param instance_pool_id: The Id of the instance pool this managed server + belongs to. + :type instance_pool_id: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'fully_qualified_domain_name': {'readonly': True}, + 'state': {'readonly': True}, + 'dns_zone': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, + 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, + 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, + 'source_managed_instance_id': {'key': 'properties.sourceManagedInstanceId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, + 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, + 'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, sku=None, managed_instance_create_mode=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type=None, v_cores: int=None, storage_size_in_gb: int=None, collation: str=None, dns_zone_partner: str=None, public_data_endpoint_enabled: bool=None, source_managed_instance_id: str=None, restore_point_in_time=None, proxy_override=None, timezone_id: str=None, instance_pool_id: str=None, tags=None, **kwargs) -> None: + super(ManagedInstanceUpdate, self).__init__(**kwargs) + self.sku = sku + self.managed_instance_create_mode = managed_instance_create_mode + self.fully_qualified_domain_name = None + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.subnet_id = subnet_id + self.state = None + self.license_type = license_type + self.v_cores = v_cores + self.storage_size_in_gb = storage_size_in_gb + self.collation = collation + self.dns_zone = None + self.dns_zone_partner = dns_zone_partner + self.public_data_endpoint_enabled = public_data_endpoint_enabled + self.source_managed_instance_id = source_managed_instance_id + self.restore_point_in_time = restore_point_in_time + self.proxy_override = proxy_override + self.timezone_id = timezone_id + self.instance_pool_id = instance_pool_id + self.tags = tags + + +class ManagedInstanceVcoresCapability(Model): + """The managed instance virtual cores capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The virtual cores identifier. + :vartype name: str + :ivar value: The virtual cores value. + :vartype value: int + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'int'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ManagedInstanceVcoresCapability, self).__init__(**kwargs) + self.name = None + self.value = None + self.status = None + self.reason = reason + + +class ManagedInstanceVersionCapability(Model): + """The managed instance capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The server version name. + :vartype name: str + :ivar supported_editions: The list of supported managed instance editions. + :vartype supported_editions: + list[~azure.mgmt.sql.models.ManagedInstanceEditionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_editions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_editions': {'key': 'supportedEditions', 'type': '[ManagedInstanceEditionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ManagedInstanceVersionCapability, self).__init__(**kwargs) + self.name = None + self.supported_editions = None + self.status = None + self.reason = reason + + +class ManagedInstanceVulnerabilityAssessment(ProxyResource): + """A managed instance vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: Required. A blob storage container path to + hold the scan results (e.g. + https://myStorage.blob.core.windows.net/VaScans/). + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_container_path': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, *, storage_container_path: str, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: + super(ManagedInstanceVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = storage_container_path + self.storage_container_sas_key = storage_container_sas_key + self.storage_account_access_key = storage_account_access_key + self.recurring_scans = recurring_scans + + +class ManagedServerSecurityAlertPolicy(ProxyResource): + """A managed server security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: + super(ManagedServerSecurityAlertPolicy, self).__init__(**kwargs) + self.state = state + self.disabled_alerts = disabled_alerts + self.email_addresses = email_addresses + self.email_account_admins = email_account_admins + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.creation_time = None + + +class MaxSizeCapability(Model): + """The maximum size capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The maximum size limit (see 'unit' for the units). + :vartype limit: int + :ivar unit: The units that the limit is expressed in. Possible values + include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' + :vartype unit: str or ~azure.mgmt.sql.models.MaxSizeUnit + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'int'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MaxSizeCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + + +class MaxSizeRangeCapability(Model): + """The maximum size range capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar min_value: Minimum value. + :vartype min_value: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar max_value: Maximum value. + :vartype max_value: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar scale_size: Scale/step size for discrete values between the minimum + value and the maximum value. + :vartype scale_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar log_size: Size of transaction log. + :vartype log_size: ~azure.mgmt.sql.models.LogSizeCapability + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'min_value': {'readonly': True}, + 'max_value': {'readonly': True}, + 'scale_size': {'readonly': True}, + 'log_size': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'min_value': {'key': 'minValue', 'type': 'MaxSizeCapability'}, + 'max_value': {'key': 'maxValue', 'type': 'MaxSizeCapability'}, + 'scale_size': {'key': 'scaleSize', 'type': 'MaxSizeCapability'}, + 'log_size': {'key': 'logSize', 'type': 'LogSizeCapability'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(MaxSizeRangeCapability, self).__init__(**kwargs) + self.min_value = None + self.max_value = None + self.scale_size = None + self.log_size = None + self.status = None + self.reason = reason + + +class Metric(Model): + """Database metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar start_time: The start time for the metric (ISO-8601 format). + :vartype start_time: datetime + :ivar end_time: The end time for the metric (ISO-8601 format). + :vartype end_time: datetime + :ivar time_grain: The time step to be used to summarize the metric values. + :vartype time_grain: str + :ivar unit: The unit of the metric. Possible values include: 'count', + 'bytes', 'seconds', 'percent', 'countPerSecond', 'bytesPerSecond' + :vartype unit: str or ~azure.mgmt.sql.models.UnitType + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.sql.models.MetricName + :ivar metric_values: The metric values for the specified time window and + timestep. + :vartype metric_values: list[~azure.mgmt.sql.models.MetricValue] + """ + + _validation = { + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'time_grain': {'readonly': True}, + 'unit': {'readonly': True}, + 'name': {'readonly': True}, + 'metric_values': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'MetricName'}, + 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, + } + + def __init__(self, **kwargs) -> None: + super(Metric, self).__init__(**kwargs) + self.start_time = None + self.end_time = None + self.time_grain = None + self.unit = None + self.name = None + self.metric_values = None + + +class MetricAvailability(Model): + """A metric availability value. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar retention: The length of retention for the database metric. + :vartype retention: str + :ivar time_grain: The granularity of the database metric. + :vartype time_grain: str + """ + + _validation = { + 'retention': {'readonly': True}, + 'time_grain': {'readonly': True}, + } + + _attribute_map = { + 'retention': {'key': 'retention', 'type': 'str'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MetricAvailability, self).__init__(**kwargs) + self.retention = None + self.time_grain = None + + +class MetricDefinition(Model): + """A database metric definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.sql.models.MetricName + :ivar primary_aggregation_type: The primary aggregation type defining how + metric values are displayed. Possible values include: 'None', 'Average', + 'Count', 'Minimum', 'Maximum', 'Total' + :vartype primary_aggregation_type: str or + ~azure.mgmt.sql.models.PrimaryAggregationType + :ivar resource_uri: The resource uri of the database. + :vartype resource_uri: str + :ivar unit: The unit of the metric. Possible values include: 'Count', + 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' + :vartype unit: str or ~azure.mgmt.sql.models.UnitDefinitionType + :ivar metric_availabilities: The list of database metric availabilities + for the metric. + :vartype metric_availabilities: + list[~azure.mgmt.sql.models.MetricAvailability] + """ + + _validation = { + 'name': {'readonly': True}, + 'primary_aggregation_type': {'readonly': True}, + 'resource_uri': {'readonly': True}, + 'unit': {'readonly': True}, + 'metric_availabilities': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'MetricName'}, + 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, + } + + def __init__(self, **kwargs) -> None: + super(MetricDefinition, self).__init__(**kwargs) + self.name = None + self.primary_aggregation_type = None + self.resource_uri = None + self.unit = None + self.metric_availabilities = None + + +class MetricName(Model): + """A database metric name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The name of the database metric. + :vartype value: str + :ivar localized_value: The friendly name of the database metric. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MetricName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class MetricValue(Model): + """Represents database metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar count: The number of values for the metric. + :vartype count: float + :ivar average: The average value of the metric. + :vartype average: float + :ivar maximum: The max value of the metric. + :vartype maximum: float + :ivar minimum: The min value of the metric. + :vartype minimum: float + :ivar timestamp: The metric timestamp (ISO-8601 format). + :vartype timestamp: datetime + :ivar total: The total value of the metric. + :vartype total: float + """ + + _validation = { + 'count': {'readonly': True}, + 'average': {'readonly': True}, + 'maximum': {'readonly': True}, + 'minimum': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'total': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'float'}, + 'average': {'key': 'average', 'type': 'float'}, + 'maximum': {'key': 'maximum', 'type': 'float'}, + 'minimum': {'key': 'minimum', 'type': 'float'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'total': {'key': 'total', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(MetricValue, self).__init__(**kwargs) + self.count = None + self.average = None + self.maximum = None + self.minimum = None + self.timestamp = None + self.total = None + + +class Name(Model): + """ARM Usage Name. + + :param value: Usage name value + :type value: str + :param localized_value: Usage name localized value. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: + super(Name, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class Operation(Model): + """SQL REST API operation definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the operation being performed on this particular + object. + :vartype name: str + :ivar display: The localized display information for this particular + operation / action. + :vartype display: ~azure.mgmt.sql.models.OperationDisplay + :ivar origin: The intended executor of the operation. Possible values + include: 'user', 'system' + :vartype origin: str or ~azure.mgmt.sql.models.OperationOrigin + :ivar properties: Additional descriptions for the operation. + :vartype properties: dict[str, object] + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + 'origin': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + } + + def __init__(self, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + self.origin = None + self.properties = None + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The localized friendly form of the resource provider name. + :vartype provider: str + :ivar resource: The localized friendly form of the resource type related + to this action/operation. + :vartype resource: str + :ivar operation: The localized friendly name for the operation. + :vartype operation: str + :ivar description: The localized friendly description for the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class OperationImpact(Model): + """The impact of an operation, both in absolute and relative terms. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the impact dimension. + :vartype name: str + :ivar unit: The unit in which estimated impact to dimension is measured. + :vartype unit: str + :ivar change_value_absolute: The absolute impact to dimension. + :vartype change_value_absolute: float + :ivar change_value_relative: The relative impact to dimension (null if not + applicable) + :vartype change_value_relative: float + """ + + _validation = { + 'name': {'readonly': True}, + 'unit': {'readonly': True}, + 'change_value_absolute': {'readonly': True}, + 'change_value_relative': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'change_value_absolute': {'key': 'changeValueAbsolute', 'type': 'float'}, + 'change_value_relative': {'key': 'changeValueRelative', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationImpact, self).__init__(**kwargs) + self.name = None + self.unit = None + self.change_value_absolute = None + self.change_value_relative = None + + +class PartnerInfo(Model): + """Partner server information for the failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource identifier of the partner server. + :type id: str + :ivar location: Geo location of the partner server. + :vartype location: str + :ivar replication_role: Replication role of the partner server. Possible + values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.FailoverGroupReplicationRole + """ + + _validation = { + 'id': {'required': True}, + 'location': {'readonly': True}, + 'replication_role': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'replication_role': {'key': 'replicationRole', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(PartnerInfo, self).__init__(**kwargs) + self.id = id + self.location = None + self.replication_role = None + + +class PartnerRegionInfo(Model): + """Partner region information for the failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param location: Geo location of the partner managed instances. + :type location: str + :ivar replication_role: Replication role of the partner managed instances. + Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole + """ + + _validation = { + 'replication_role': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'replication_role': {'key': 'replicationRole', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, **kwargs) -> None: + super(PartnerRegionInfo, self).__init__(**kwargs) + self.location = location + self.replication_role = None + + +class PerformanceLevelCapability(Model): + """The performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: Performance level value. + :vartype value: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + """ + + _validation = { + 'value': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(PerformanceLevelCapability, self).__init__(**kwargs) + self.value = None + self.unit = None + + +class RecommendedElasticPool(ProxyResource): + """Represents a recommended elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_edition: The edition of the recommended elastic pool. The + ElasticPoolEdition enumeration contains all the valid editions. Possible + values include: 'Basic', 'Standard', 'Premium', 'GeneralPurpose', + 'BusinessCritical' + :vartype database_edition: str or + ~azure.mgmt.sql.models.ElasticPoolEdition + :param dtu: The DTU for the recommended elastic pool. + :type dtu: float + :param database_dtu_min: The minimum DTU for the database. + :type database_dtu_min: float + :param database_dtu_max: The maximum DTU for the database. + :type database_dtu_max: float + :param storage_mb: Gets storage size in megabytes. + :type storage_mb: float + :ivar observation_period_start: The observation period start (ISO8601 + format). + :vartype observation_period_start: datetime + :ivar observation_period_end: The observation period start (ISO8601 + format). + :vartype observation_period_end: datetime + :ivar max_observed_dtu: Gets maximum observed DTU. + :vartype max_observed_dtu: float + :ivar max_observed_storage_mb: Gets maximum observed storage in megabytes. + :vartype max_observed_storage_mb: float + :ivar databases: The list of databases in this pool. Expanded property + :vartype databases: list[~azure.mgmt.sql.models.TrackedResource] + :ivar metrics: The list of databases housed in the server. Expanded + property + :vartype metrics: + list[~azure.mgmt.sql.models.RecommendedElasticPoolMetric] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_edition': {'readonly': True}, + 'observation_period_start': {'readonly': True}, + 'observation_period_end': {'readonly': True}, + 'max_observed_dtu': {'readonly': True}, + 'max_observed_storage_mb': {'readonly': True}, + 'databases': {'readonly': True}, + 'metrics': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'dtu': {'key': 'properties.dtu', 'type': 'float'}, + 'database_dtu_min': {'key': 'properties.databaseDtuMin', 'type': 'float'}, + 'database_dtu_max': {'key': 'properties.databaseDtuMax', 'type': 'float'}, + 'storage_mb': {'key': 'properties.storageMB', 'type': 'float'}, + 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, + 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, + 'max_observed_dtu': {'key': 'properties.maxObservedDtu', 'type': 'float'}, + 'max_observed_storage_mb': {'key': 'properties.maxObservedStorageMB', 'type': 'float'}, + 'databases': {'key': 'properties.databases', 'type': '[TrackedResource]'}, + 'metrics': {'key': 'properties.metrics', 'type': '[RecommendedElasticPoolMetric]'}, + } + + def __init__(self, *, dtu: float=None, database_dtu_min: float=None, database_dtu_max: float=None, storage_mb: float=None, **kwargs) -> None: + super(RecommendedElasticPool, self).__init__(**kwargs) + self.database_edition = None + self.dtu = dtu + self.database_dtu_min = database_dtu_min + self.database_dtu_max = database_dtu_max + self.storage_mb = storage_mb + self.observation_period_start = None + self.observation_period_end = None + self.max_observed_dtu = None + self.max_observed_storage_mb = None + self.databases = None + self.metrics = None + + +class RecommendedElasticPoolMetric(Model): + """Represents recommended elastic pool metric. + + :param date_time_property: The time of metric (ISO8601 format). + :type date_time_property: datetime + :param dtu: Gets or sets the DTUs (Database Transaction Units). See + https://azure.microsoft.com/documentation/articles/sql-database-what-is-a-dtu/ + :type dtu: float + :param size_gb: Gets or sets size in gigabytes. + :type size_gb: float + """ + + _attribute_map = { + 'date_time_property': {'key': 'dateTime', 'type': 'iso-8601'}, + 'dtu': {'key': 'dtu', 'type': 'float'}, + 'size_gb': {'key': 'sizeGB', 'type': 'float'}, + } + + def __init__(self, *, date_time_property=None, dtu: float=None, size_gb: float=None, **kwargs) -> None: + super(RecommendedElasticPoolMetric, self).__init__(**kwargs) + self.date_time_property = date_time_property + self.dtu = dtu + self.size_gb = size_gb + + +class RecommendedIndex(ProxyResource): + """Represents a database recommended index. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar action: The proposed index action. You can create a missing index, + drop an unused index, or rebuild an existing index to improve its + performance. Possible values include: 'Create', 'Drop', 'Rebuild' + :vartype action: str or ~azure.mgmt.sql.models.RecommendedIndexAction + :ivar state: The current recommendation state. Possible values include: + 'Active', 'Pending', 'Executing', 'Verifying', 'Pending Revert', + 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success' + :vartype state: str or ~azure.mgmt.sql.models.RecommendedIndexState + :ivar created: The UTC datetime showing when this resource was created + (ISO8601 format). + :vartype created: datetime + :ivar last_modified: The UTC datetime of when was this resource last + changed (ISO8601 format). + :vartype last_modified: datetime + :ivar index_type: The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, + CLUSTERED COLUMNSTORE). Possible values include: 'CLUSTERED', + 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED COLUMNSTORE' + :vartype index_type: str or ~azure.mgmt.sql.models.RecommendedIndexType + :ivar schema: The schema where table to build index over resides + :vartype schema: str + :ivar table: The table on which to build index. + :vartype table: str + :ivar columns: Columns over which to build index + :vartype columns: list[str] + :ivar included_columns: The list of column names to be included in the + index + :vartype included_columns: list[str] + :ivar index_script: The full build index script + :vartype index_script: str + :ivar estimated_impact: The estimated impact of doing recommended index + action. + :vartype estimated_impact: list[~azure.mgmt.sql.models.OperationImpact] + :ivar reported_impact: The values reported after index action is complete. + :vartype reported_impact: list[~azure.mgmt.sql.models.OperationImpact] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'action': {'readonly': True}, + 'state': {'readonly': True}, + 'created': {'readonly': True}, + 'last_modified': {'readonly': True}, + 'index_type': {'readonly': True}, + 'schema': {'readonly': True}, + 'table': {'readonly': True}, + 'columns': {'readonly': True}, + 'included_columns': {'readonly': True}, + 'index_script': {'readonly': True}, + 'estimated_impact': {'readonly': True}, + 'reported_impact': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'action': {'key': 'properties.action', 'type': 'RecommendedIndexAction'}, + 'state': {'key': 'properties.state', 'type': 'RecommendedIndexState'}, + 'created': {'key': 'properties.created', 'type': 'iso-8601'}, + 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, + 'index_type': {'key': 'properties.indexType', 'type': 'RecommendedIndexType'}, + 'schema': {'key': 'properties.schema', 'type': 'str'}, + 'table': {'key': 'properties.table', 'type': 'str'}, + 'columns': {'key': 'properties.columns', 'type': '[str]'}, + 'included_columns': {'key': 'properties.includedColumns', 'type': '[str]'}, + 'index_script': {'key': 'properties.indexScript', 'type': 'str'}, + 'estimated_impact': {'key': 'properties.estimatedImpact', 'type': '[OperationImpact]'}, + 'reported_impact': {'key': 'properties.reportedImpact', 'type': '[OperationImpact]'}, + } + + def __init__(self, **kwargs) -> None: + super(RecommendedIndex, self).__init__(**kwargs) + self.action = None + self.state = None + self.created = None + self.last_modified = None + self.index_type = None + self.schema = None + self.table = None + self.columns = None + self.included_columns = None + self.index_script = None + self.estimated_impact = None + self.reported_impact = None + + +class RecoverableDatabase(ProxyResource): + """A recoverable database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar edition: The edition of the database + :vartype edition: str + :ivar service_level_objective: The service level objective name of the + database + :vartype service_level_objective: str + :ivar elastic_pool_name: The elastic pool name of the database + :vartype elastic_pool_name: str + :ivar last_available_backup_date: The last available backup date of the + database (ISO8601 format) + :vartype last_available_backup_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'edition': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'last_available_backup_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(RecoverableDatabase, self).__init__(**kwargs) + self.edition = None + self.service_level_objective = None + self.elastic_pool_name = None + self.last_available_backup_date = None + + +class RecoverableManagedDatabase(ProxyResource): + """A recoverable managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar last_available_backup_date: The last available backup date. + :vartype last_available_backup_date: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_available_backup_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(RecoverableManagedDatabase, self).__init__(**kwargs) + self.last_available_backup_date = None + + +class ReplicationLink(ProxyResource): + """Represents a database replication link. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Location of the server that contains this firewall rule. + :vartype location: str + :ivar is_termination_allowed: Legacy value indicating whether termination + is allowed. Currently always returns true. + :vartype is_termination_allowed: bool + :ivar replication_mode: Replication mode of this replication link. + :vartype replication_mode: str + :ivar partner_server: The name of the server hosting the partner database. + :vartype partner_server: str + :ivar partner_database: The name of the partner database. + :vartype partner_database: str + :ivar partner_location: The Azure Region of the partner database. + :vartype partner_location: str + :ivar role: The role of the database in the replication link. Possible + values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', + 'Copy' + :vartype role: str or ~azure.mgmt.sql.models.ReplicationRole + :ivar partner_role: The role of the partner database in the replication + link. Possible values include: 'Primary', 'Secondary', + 'NonReadableSecondary', 'Source', 'Copy' + :vartype partner_role: str or ~azure.mgmt.sql.models.ReplicationRole + :ivar start_time: The start time for the replication link. + :vartype start_time: datetime + :ivar percent_complete: The percentage of seeding complete for the + replication link. + :vartype percent_complete: int + :ivar replication_state: The replication state for the replication link. + Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP', 'SUSPENDED' + :vartype replication_state: str or ~azure.mgmt.sql.models.ReplicationState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'is_termination_allowed': {'readonly': True}, + 'replication_mode': {'readonly': True}, + 'partner_server': {'readonly': True}, + 'partner_database': {'readonly': True}, + 'partner_location': {'readonly': True}, + 'role': {'readonly': True}, + 'partner_role': {'readonly': True}, + 'start_time': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'replication_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'is_termination_allowed': {'key': 'properties.isTerminationAllowed', 'type': 'bool'}, + 'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'}, + 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, + 'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'}, + 'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'}, + 'role': {'key': 'properties.role', 'type': 'ReplicationRole'}, + 'partner_role': {'key': 'properties.partnerRole', 'type': 'ReplicationRole'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ReplicationLink, self).__init__(**kwargs) + self.location = None + self.is_termination_allowed = None + self.replication_mode = None + self.partner_server = None + self.partner_database = None + self.partner_location = None + self.role = None + self.partner_role = None + self.start_time = None + self.percent_complete = None + self.replication_state = None + + +class ResourceIdentity(Model): + """Azure Active Directory identity configuration for a resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The Azure Active Directory principal id. + :vartype principal_id: str + :param type: The identity type. Set this to 'SystemAssigned' in order to + automatically create and assign an Azure Active Directory principal for + the resource. Possible values include: 'SystemAssigned' + :type type: str or ~azure.mgmt.sql.models.IdentityType + :ivar tenant_id: The Azure Active Directory tenant id. + :vartype tenant_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(ResourceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.type = type + self.tenant_id = None + + +class ResourceMoveDefinition(Model): + """Contains the information necessary to perform a resource move (rename). + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The target ID for the resource + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(ResourceMoveDefinition, self).__init__(**kwargs) + self.id = id + + +class RestorableDroppedDatabase(ProxyResource): + """A restorable dropped database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: The geo-location where the resource lives + :vartype location: str + :ivar database_name: The name of the database + :vartype database_name: str + :ivar edition: The edition of the database + :vartype edition: str + :ivar max_size_bytes: The max size in bytes of the database + :vartype max_size_bytes: str + :ivar service_level_objective: The service level objective name of the + database + :vartype service_level_objective: str + :ivar elastic_pool_name: The elastic pool name of the database + :vartype elastic_pool_name: str + :ivar creation_date: The creation date of the database (ISO8601 format) + :vartype creation_date: datetime + :ivar deletion_date: The deletion date of the database (ISO8601 format) + :vartype deletion_date: datetime + :ivar earliest_restore_date: The earliest restore date of the database + (ISO8601 format) + :vartype earliest_restore_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'database_name': {'readonly': True}, + 'edition': {'readonly': True}, + 'max_size_bytes': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(RestorableDroppedDatabase, self).__init__(**kwargs) + self.location = None + self.database_name = None + self.edition = None + self.max_size_bytes = None + self.service_level_objective = None + self.elastic_pool_name = None + self.creation_date = None + self.deletion_date = None + self.earliest_restore_date = None + + +class RestorableDroppedManagedDatabase(TrackedResource): + """A restorable dropped managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar database_name: The name of the database. + :vartype database_name: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar deletion_date: The deletion date of the database (ISO8601 format). + :vartype deletion_date: datetime + :ivar earliest_restore_date: The earliest restore date of the database + (ISO8601 format). + :vartype earliest_restore_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'database_name': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(RestorableDroppedManagedDatabase, self).__init__(location=location, tags=tags, **kwargs) + self.database_name = None + self.creation_date = None + self.deletion_date = None + self.earliest_restore_date = None + + +class RestorePoint(ProxyResource): + """Database restore points. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar restore_point_type: The type of restore point. Possible values + include: 'CONTINUOUS', 'DISCRETE' + :vartype restore_point_type: str or + ~azure.mgmt.sql.models.RestorePointType + :ivar earliest_restore_date: The earliest time to which this database can + be restored + :vartype earliest_restore_date: datetime + :ivar restore_point_creation_date: The time the backup was taken + :vartype restore_point_creation_date: datetime + :ivar restore_point_label: The label of restore point for backup request + by user + :vartype restore_point_label: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'restore_point_type': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'restore_point_creation_date': {'readonly': True}, + 'restore_point_label': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'restore_point_type': {'key': 'properties.restorePointType', 'type': 'RestorePointType'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, + 'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(RestorePoint, self).__init__(**kwargs) + self.location = None + self.restore_point_type = None + self.earliest_restore_date = None + self.restore_point_creation_date = None + self.restore_point_label = None + + +class SensitivityLabel(ProxyResource): + """A sensitivity label. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param label_name: The label name. + :type label_name: str + :param label_id: The label ID. + :type label_id: str + :param information_type: The information type. + :type information_type: str + :param information_type_id: The information type ID. + :type information_type_id: str + :ivar is_disabled: Is sensitivity recommendation disabled. Applicable for + recommended sensitivity label only. Specifies whether the sensitivity + recommendation on this column is disabled (dismissed) or not. + :vartype is_disabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'is_disabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'label_name': {'key': 'properties.labelName', 'type': 'str'}, + 'label_id': {'key': 'properties.labelId', 'type': 'str'}, + 'information_type': {'key': 'properties.informationType', 'type': 'str'}, + 'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'}, + 'is_disabled': {'key': 'properties.isDisabled', 'type': 'bool'}, + } + + def __init__(self, *, label_name: str=None, label_id: str=None, information_type: str=None, information_type_id: str=None, **kwargs) -> None: + super(SensitivityLabel, self).__init__(**kwargs) + self.label_name = label_name + self.label_id = label_id + self.information_type = information_type + self.information_type_id = information_type_id + self.is_disabled = None + + +class Server(TrackedResource): + """An Azure SQL Database server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param identity: The Azure Active Directory identity of the server. + :type identity: ~azure.mgmt.sql.models.ResourceIdentity + :ivar kind: Kind of sql server. This is metadata used for the Azure portal + experience. + :vartype kind: str + :param administrator_login: Administrator username for the server. Once + created it cannot be changed. + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for server creation). + :type administrator_login_password: str + :param version: The version of the server. + :type version: str + :ivar state: The state of the server. + :vartype state: str + :ivar fully_qualified_domain_name: The fully qualified domain name of the + server. + :vartype fully_qualified_domain_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'state': {'readonly': True}, + 'fully_qualified_domain_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, identity=None, administrator_login: str=None, administrator_login_password: str=None, version: str=None, **kwargs) -> None: + super(Server, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity + self.kind = None + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.version = version + self.state = None + self.fully_qualified_domain_name = None + + +class ServerAutomaticTuning(ProxyResource): + """Server-level Automatic Tuning. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param desired_state: Automatic tuning desired state. Possible values + include: 'Custom', 'Auto', 'Unspecified' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningServerMode + :ivar actual_state: Automatic tuning actual state. Possible values + include: 'Custom', 'Auto', 'Unspecified' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningServerMode + :param options: Automatic tuning options definition. + :type options: dict[str, + ~azure.mgmt.sql.models.AutomaticTuningServerOptions] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'actual_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningServerMode'}, + 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningServerMode'}, + 'options': {'key': 'properties.options', 'type': '{AutomaticTuningServerOptions}'}, + } + + def __init__(self, *, desired_state=None, options=None, **kwargs) -> None: + super(ServerAutomaticTuning, self).__init__(**kwargs) + self.desired_state = desired_state + self.actual_state = None + self.options = options + + +class ServerAzureADAdministrator(ProxyResource): + """An server Active Directory Administrator. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar administrator_type: Required. The type of administrator. Default + value: "ActiveDirectory" . + :vartype administrator_type: str + :param login: Required. The server administrator login value. + :type login: str + :param sid: Required. The server administrator Sid (Secure ID). + :type sid: str + :param tenant_id: Required. The server Active Directory Administrator + tenant id. + :type tenant_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'administrator_type': {'required': True, 'constant': True}, + 'login': {'required': True}, + 'sid': {'required': True}, + 'tenant_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, + 'login': {'key': 'properties.login', 'type': 'str'}, + 'sid': {'key': 'properties.sid', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + } + + administrator_type = "ActiveDirectory" + + def __init__(self, *, login: str, sid: str, tenant_id: str, **kwargs) -> None: + super(ServerAzureADAdministrator, self).__init__(**kwargs) + self.login = login + self.sid = sid + self.tenant_id = tenant_id + + +class ServerBlobAuditingPolicy(ProxyResource): + """A server blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: + super(ServerBlobAuditingPolicy, self).__init__(**kwargs) + self.state = state + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.audit_actions_and_groups = audit_actions_and_groups + self.storage_account_subscription_id = storage_account_subscription_id + self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use + self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + + +class ServerCommunicationLink(ProxyResource): + """Server communication link. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar state: The state. + :vartype state: str + :param partner_server: Required. The name of the partner server. + :type partner_server: str + :ivar location: Communication link location. + :vartype location: str + :ivar kind: Communication link kind. This property is used for Azure + Portal metadata. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'partner_server': {'required': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, partner_server: str, **kwargs) -> None: + super(ServerCommunicationLink, self).__init__(**kwargs) + self.state = None + self.partner_server = partner_server + self.location = None + self.kind = None + + +class ServerConnectionPolicy(ProxyResource): + """A server secure connection policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Metadata used for the Azure portal experience. + :vartype kind: str + :ivar location: Resource location. + :vartype location: str + :param connection_type: Required. The server connection type. Possible + values include: 'Default', 'Proxy', 'Redirect' + :type connection_type: str or ~azure.mgmt.sql.models.ServerConnectionType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + 'connection_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'connection_type': {'key': 'properties.connectionType', 'type': 'ServerConnectionType'}, + } + + def __init__(self, *, connection_type, **kwargs) -> None: + super(ServerConnectionPolicy, self).__init__(**kwargs) + self.kind = None + self.location = None + self.connection_type = connection_type + + +class ServerDnsAlias(ProxyResource): + """A server DNS alias. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar azure_dns_record: The fully qualified DNS record for alias + :vartype azure_dns_record: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'azure_dns_record': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'azure_dns_record': {'key': 'properties.azureDnsRecord', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ServerDnsAlias, self).__init__(**kwargs) + self.azure_dns_record = None + + +class ServerDnsAliasAcquisition(Model): + """A server DNS alias acquisition request. + + :param old_server_dns_alias_id: The id of the server alias that will be + acquired to point to this server instead. + :type old_server_dns_alias_id: str + """ + + _attribute_map = { + 'old_server_dns_alias_id': {'key': 'oldServerDnsAliasId', 'type': 'str'}, + } + + def __init__(self, *, old_server_dns_alias_id: str=None, **kwargs) -> None: + super(ServerDnsAliasAcquisition, self).__init__(**kwargs) + self.old_server_dns_alias_id = old_server_dns_alias_id + + +class ServerKey(ProxyResource): + """A server key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :type kind: str + :ivar location: Resource location. + :vartype location: str + :ivar subregion: Subregion of the server key. + :vartype subregion: str + :param server_key_type: Required. The server key type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :param uri: The URI of the server key. + :type uri: str + :param thumbprint: Thumbprint of the server key. + :type thumbprint: str + :param creation_date: The server key creation date. + :type creation_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'subregion': {'readonly': True}, + 'server_key_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'subregion': {'key': 'properties.subregion', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, server_key_type, kind: str=None, uri: str=None, thumbprint: str=None, creation_date=None, **kwargs) -> None: + super(ServerKey, self).__init__(**kwargs) + self.kind = kind + self.location = None + self.subregion = None + self.server_key_type = server_key_type + self.uri = uri + self.thumbprint = thumbprint + self.creation_date = creation_date + + +class ServerSecurityAlertPolicy(ProxyResource): + """A server security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: + super(ServerSecurityAlertPolicy, self).__init__(**kwargs) + self.state = state + self.disabled_alerts = disabled_alerts + self.email_addresses = email_addresses + self.email_account_admins = email_account_admins + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.creation_time = None + + +class ServerUpdate(Model): + """An update request for an Azure SQL Database server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param administrator_login: Administrator username for the server. Once + created it cannot be changed. + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for server creation). + :type administrator_login_password: str + :param version: The version of the server. + :type version: str + :ivar state: The state of the server. + :vartype state: str + :ivar fully_qualified_domain_name: The fully qualified domain name of the + server. + :vartype fully_qualified_domain_name: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'state': {'readonly': True}, + 'fully_qualified_domain_name': {'readonly': True}, + } + + _attribute_map = { + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, administrator_login: str=None, administrator_login_password: str=None, version: str=None, tags=None, **kwargs) -> None: + super(ServerUpdate, self).__init__(**kwargs) + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.version = version + self.state = None + self.fully_qualified_domain_name = None + self.tags = tags + + +class ServerUsage(Model): + """Represents server metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the server usage metric. + :vartype name: str + :ivar resource_name: The name of the resource. + :vartype resource_name: str + :ivar display_name: The metric display name. + :vartype display_name: str + :ivar current_value: The current value of the metric. + :vartype current_value: float + :ivar limit: The current limit of the metric. + :vartype limit: float + :ivar unit: The units of the metric. + :vartype unit: str + :ivar next_reset_time: The next reset time for the metric (ISO8601 + format). + :vartype next_reset_time: datetime + """ + + _validation = { + 'name': {'readonly': True}, + 'resource_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'next_reset_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(ServerUsage, self).__init__(**kwargs) + self.name = None + self.resource_name = None + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + self.next_reset_time = None + + +class ServerVersionCapability(Model): + """The server capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The server version name. + :vartype name: str + :ivar supported_editions: The list of supported database editions. + :vartype supported_editions: + list[~azure.mgmt.sql.models.EditionCapability] + :ivar supported_elastic_pool_editions: The list of supported elastic pool + editions. + :vartype supported_elastic_pool_editions: + list[~azure.mgmt.sql.models.ElasticPoolEditionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_editions': {'readonly': True}, + 'supported_elastic_pool_editions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_editions': {'key': 'supportedEditions', 'type': '[EditionCapability]'}, + 'supported_elastic_pool_editions': {'key': 'supportedElasticPoolEditions', 'type': '[ElasticPoolEditionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ServerVersionCapability, self).__init__(**kwargs) + self.name = None + self.supported_editions = None + self.supported_elastic_pool_editions = None + self.status = None + self.reason = reason + + +class ServerVulnerabilityAssessment(ProxyResource): + """A server vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: Required. A blob storage container path to + hold the scan results (e.g. + https://myStorage.blob.core.windows.net/VaScans/). + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_container_path': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, *, storage_container_path: str, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: + super(ServerVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = storage_container_path + self.storage_container_sas_key = storage_container_sas_key + self.storage_account_access_key = storage_account_access_key + self.recurring_scans = recurring_scans + + +class ServiceObjective(ProxyResource): + """Represents a database service objective. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar service_objective_name: The name for the service objective. + :vartype service_objective_name: str + :ivar is_default: Gets whether the service level objective is the default + service objective. + :vartype is_default: bool + :ivar is_system: Gets whether the service level objective is a system + service objective. + :vartype is_system: bool + :ivar description: The description for the service level objective. + :vartype description: str + :ivar enabled: Gets whether the service level objective is enabled. + :vartype enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'service_objective_name': {'readonly': True}, + 'is_default': {'readonly': True}, + 'is_system': {'readonly': True}, + 'description': {'readonly': True}, + 'enabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'service_objective_name': {'key': 'properties.serviceObjectiveName', 'type': 'str'}, + 'is_default': {'key': 'properties.isDefault', 'type': 'bool'}, + 'is_system': {'key': 'properties.isSystem', 'type': 'bool'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(ServiceObjective, self).__init__(**kwargs) + self.service_objective_name = None + self.is_default = None + self.is_system = None + self.description = None + self.enabled = None + + +class ServiceObjectiveCapability(Model): + """The service objectives capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique ID of the service objective. + :vartype id: str + :ivar name: The service objective name. + :vartype name: str + :ivar supported_max_sizes: The list of supported maximum database sizes. + :vartype supported_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar performance_level: The performance level. + :vartype performance_level: + ~azure.mgmt.sql.models.PerformanceLevelCapability + :ivar sku: The sku. + :vartype sku: ~azure.mgmt.sql.models.Sku + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar included_max_size: The included (free) max size. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'supported_max_sizes': {'readonly': True}, + 'performance_level': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ServiceObjectiveCapability, self).__init__(**kwargs) + self.id = None + self.name = None + self.supported_max_sizes = None + self.performance_level = None + self.sku = None + self.supported_license_types = None + self.included_max_size = None + self.status = None + self.reason = reason + + +class ServiceTierAdvisor(ProxyResource): + """Represents a Service Tier Advisor. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar observation_period_start: The observation period start (ISO8601 + format). + :vartype observation_period_start: datetime + :ivar observation_period_end: The observation period start (ISO8601 + format). + :vartype observation_period_end: datetime + :ivar active_time_ratio: The activeTimeRatio for service tier advisor. + :vartype active_time_ratio: float + :ivar min_dtu: Gets or sets minDtu for service tier advisor. + :vartype min_dtu: float + :ivar avg_dtu: Gets or sets avgDtu for service tier advisor. + :vartype avg_dtu: float + :ivar max_dtu: Gets or sets maxDtu for service tier advisor. + :vartype max_dtu: float + :ivar max_size_in_gb: Gets or sets maxSizeInGB for service tier advisor. + :vartype max_size_in_gb: float + :ivar service_level_objective_usage_metrics: Gets or sets + serviceLevelObjectiveUsageMetrics for the service tier advisor. + :vartype service_level_objective_usage_metrics: + list[~azure.mgmt.sql.models.SloUsageMetric] + :ivar current_service_level_objective: Gets or sets + currentServiceLevelObjective for service tier advisor. + :vartype current_service_level_objective: str + :ivar current_service_level_objective_id: Gets or sets + currentServiceLevelObjectiveId for service tier advisor. + :vartype current_service_level_objective_id: str + :ivar usage_based_recommendation_service_level_objective: Gets or sets + usageBasedRecommendationServiceLevelObjective for service tier advisor. + :vartype usage_based_recommendation_service_level_objective: str + :ivar usage_based_recommendation_service_level_objective_id: Gets or sets + usageBasedRecommendationServiceLevelObjectiveId for service tier advisor. + :vartype usage_based_recommendation_service_level_objective_id: str + :ivar database_size_based_recommendation_service_level_objective: Gets or + sets databaseSizeBasedRecommendationServiceLevelObjective for service tier + advisor. + :vartype database_size_based_recommendation_service_level_objective: str + :ivar database_size_based_recommendation_service_level_objective_id: Gets + or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service + tier advisor. + :vartype database_size_based_recommendation_service_level_objective_id: + str + :ivar disaster_plan_based_recommendation_service_level_objective: Gets or + sets disasterPlanBasedRecommendationServiceLevelObjective for service tier + advisor. + :vartype disaster_plan_based_recommendation_service_level_objective: str + :ivar disaster_plan_based_recommendation_service_level_objective_id: Gets + or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service + tier advisor. + :vartype disaster_plan_based_recommendation_service_level_objective_id: + str + :ivar overall_recommendation_service_level_objective: Gets or sets + overallRecommendationServiceLevelObjective for service tier advisor. + :vartype overall_recommendation_service_level_objective: str + :ivar overall_recommendation_service_level_objective_id: Gets or sets + overallRecommendationServiceLevelObjectiveId for service tier advisor. + :vartype overall_recommendation_service_level_objective_id: str + :ivar confidence: Gets or sets confidence for service tier advisor. + :vartype confidence: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'observation_period_start': {'readonly': True}, + 'observation_period_end': {'readonly': True}, + 'active_time_ratio': {'readonly': True}, + 'min_dtu': {'readonly': True}, + 'avg_dtu': {'readonly': True}, + 'max_dtu': {'readonly': True}, + 'max_size_in_gb': {'readonly': True}, + 'service_level_objective_usage_metrics': {'readonly': True}, + 'current_service_level_objective': {'readonly': True}, + 'current_service_level_objective_id': {'readonly': True}, + 'usage_based_recommendation_service_level_objective': {'readonly': True}, + 'usage_based_recommendation_service_level_objective_id': {'readonly': True}, + 'database_size_based_recommendation_service_level_objective': {'readonly': True}, + 'database_size_based_recommendation_service_level_objective_id': {'readonly': True}, + 'disaster_plan_based_recommendation_service_level_objective': {'readonly': True}, + 'disaster_plan_based_recommendation_service_level_objective_id': {'readonly': True}, + 'overall_recommendation_service_level_objective': {'readonly': True}, + 'overall_recommendation_service_level_objective_id': {'readonly': True}, + 'confidence': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, + 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, + 'active_time_ratio': {'key': 'properties.activeTimeRatio', 'type': 'float'}, + 'min_dtu': {'key': 'properties.minDtu', 'type': 'float'}, + 'avg_dtu': {'key': 'properties.avgDtu', 'type': 'float'}, + 'max_dtu': {'key': 'properties.maxDtu', 'type': 'float'}, + 'max_size_in_gb': {'key': 'properties.maxSizeInGB', 'type': 'float'}, + 'service_level_objective_usage_metrics': {'key': 'properties.serviceLevelObjectiveUsageMetrics', 'type': '[SloUsageMetric]'}, + 'current_service_level_objective': {'key': 'properties.currentServiceLevelObjective', 'type': 'str'}, + 'current_service_level_objective_id': {'key': 'properties.currentServiceLevelObjectiveId', 'type': 'str'}, + 'usage_based_recommendation_service_level_objective': {'key': 'properties.usageBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'usage_based_recommendation_service_level_objective_id': {'key': 'properties.usageBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'database_size_based_recommendation_service_level_objective': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'database_size_based_recommendation_service_level_objective_id': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'disaster_plan_based_recommendation_service_level_objective': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'disaster_plan_based_recommendation_service_level_objective_id': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'overall_recommendation_service_level_objective': {'key': 'properties.overallRecommendationServiceLevelObjective', 'type': 'str'}, + 'overall_recommendation_service_level_objective_id': {'key': 'properties.overallRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'confidence': {'key': 'properties.confidence', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(ServiceTierAdvisor, self).__init__(**kwargs) + self.observation_period_start = None + self.observation_period_end = None + self.active_time_ratio = None + self.min_dtu = None + self.avg_dtu = None + self.max_dtu = None + self.max_size_in_gb = None + self.service_level_objective_usage_metrics = None + self.current_service_level_objective = None + self.current_service_level_objective_id = None + self.usage_based_recommendation_service_level_objective = None + self.usage_based_recommendation_service_level_objective_id = None + self.database_size_based_recommendation_service_level_objective = None + self.database_size_based_recommendation_service_level_objective_id = None + self.disaster_plan_based_recommendation_service_level_objective = None + self.disaster_plan_based_recommendation_service_level_objective_id = None + self.overall_recommendation_service_level_objective = None + self.overall_recommendation_service_level_objective_id = None + self.confidence = None + + +class Sku(Model): + """The resource model definition representing SKU. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Ex - P3. It is typically a + letter+number code + :type name: str + :param tier: This field is required to be implemented by the Resource + Provider if the service has more than one tier, but is not required on a + PUT. + :type tier: str + :param size: The SKU size. When the name field is the combination of tier + and some other value, this would be the standalone code. + :type size: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :param capacity: If the SKU supports scale out/in then the capacity + integer should be included. If scale out/in is not possible for the + resource this may be omitted. + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, *, name: str, tier: str=None, size: str=None, family: str=None, capacity: int=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.size = size + self.family = family + self.capacity = capacity + + +class SloUsageMetric(Model): + """A Slo Usage Metric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar service_level_objective: The serviceLevelObjective for SLO usage + metric. Possible values include: 'System', 'System0', 'System1', + 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', + 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', + 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', + 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', + 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', + 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', + 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', + 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' + :vartype service_level_objective: str or + ~azure.mgmt.sql.models.ServiceObjectiveName + :ivar service_level_objective_id: The serviceLevelObjectiveId for SLO + usage metric. + :vartype service_level_objective_id: str + :ivar in_range_time_ratio: Gets or sets inRangeTimeRatio for SLO usage + metric. + :vartype in_range_time_ratio: float + """ + + _validation = { + 'service_level_objective': {'readonly': True}, + 'service_level_objective_id': {'readonly': True}, + 'in_range_time_ratio': {'readonly': True}, + } + + _attribute_map = { + 'service_level_objective': {'key': 'serviceLevelObjective', 'type': 'str'}, + 'service_level_objective_id': {'key': 'serviceLevelObjectiveId', 'type': 'str'}, + 'in_range_time_ratio': {'key': 'inRangeTimeRatio', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(SloUsageMetric, self).__init__(**kwargs) + self.service_level_objective = None + self.service_level_objective_id = None + self.in_range_time_ratio = None + + +class SubscriptionUsage(ProxyResource): + """Usage Metric of a Subscription in a Location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar display_name: User-readable name of the metric. + :vartype display_name: str + :ivar current_value: Current value of the metric. + :vartype current_value: float + :ivar limit: Boundary value of the metric. + :vartype limit: float + :ivar unit: Unit of the metric. + :vartype unit: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'current_value': {'key': 'properties.currentValue', 'type': 'float'}, + 'limit': {'key': 'properties.limit', 'type': 'float'}, + 'unit': {'key': 'properties.unit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubscriptionUsage, self).__init__(**kwargs) + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + + +class SyncAgent(ProxyResource): + """An Azure SQL Database sync agent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar sync_agent_name: Name of the sync agent. + :vartype sync_agent_name: str + :param sync_database_id: ARM resource id of the sync database in the sync + agent. + :type sync_database_id: str + :ivar last_alive_time: Last alive time of the sync agent. + :vartype last_alive_time: datetime + :ivar state: State of the sync agent. Possible values include: 'Online', + 'Offline', 'NeverConnected' + :vartype state: str or ~azure.mgmt.sql.models.SyncAgentState + :ivar is_up_to_date: If the sync agent version is up to date. + :vartype is_up_to_date: bool + :ivar expiry_time: Expiration time of the sync agent version. + :vartype expiry_time: datetime + :ivar version: Version of the sync agent. + :vartype version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sync_agent_name': {'readonly': True}, + 'last_alive_time': {'readonly': True}, + 'state': {'readonly': True}, + 'is_up_to_date': {'readonly': True}, + 'expiry_time': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sync_agent_name': {'key': 'properties.name', 'type': 'str'}, + 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, + 'last_alive_time': {'key': 'properties.lastAliveTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'is_up_to_date': {'key': 'properties.isUpToDate', 'type': 'bool'}, + 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + } + + def __init__(self, *, sync_database_id: str=None, **kwargs) -> None: + super(SyncAgent, self).__init__(**kwargs) + self.sync_agent_name = None + self.sync_database_id = sync_database_id + self.last_alive_time = None + self.state = None + self.is_up_to_date = None + self.expiry_time = None + self.version = None + + +class SyncAgentKeyProperties(Model): + """Properties of an Azure SQL Database sync agent key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar sync_agent_key: Key of sync agent. + :vartype sync_agent_key: str + """ + + _validation = { + 'sync_agent_key': {'readonly': True}, + } + + _attribute_map = { + 'sync_agent_key': {'key': 'syncAgentKey', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncAgentKeyProperties, self).__init__(**kwargs) + self.sync_agent_key = None + + +class SyncAgentLinkedDatabase(ProxyResource): + """An Azure SQL Database sync agent linked database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_type: Type of the sync agent linked database. Possible + values include: 'AzureSqlDatabase', 'SqlServerDatabase' + :vartype database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType + :ivar database_id: Id of the sync agent linked database. + :vartype database_id: str + :ivar description: Description of the sync agent linked database. + :vartype description: str + :ivar server_name: Server name of the sync agent linked database. + :vartype server_name: str + :ivar database_name: Database name of the sync agent linked database. + :vartype database_name: str + :ivar user_name: User name of the sync agent linked database. + :vartype user_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_type': {'readonly': True}, + 'database_id': {'readonly': True}, + 'description': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncAgentLinkedDatabase, self).__init__(**kwargs) + self.database_type = None + self.database_id = None + self.description = None + self.server_name = None + self.database_name = None + self.user_name = None + + +class SyncDatabaseIdProperties(Model): + """Properties of the sync database id. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: ARM resource id of sync database. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncDatabaseIdProperties, self).__init__(**kwargs) + self.id = None + + +class SyncFullSchemaProperties(Model): + """Properties of the database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar tables: List of tables in the database full schema. + :vartype tables: list[~azure.mgmt.sql.models.SyncFullSchemaTable] + :ivar last_update_time: Last update time of the database schema. + :vartype last_update_time: datetime + """ + + _validation = { + 'tables': {'readonly': True}, + 'last_update_time': {'readonly': True}, + } + + _attribute_map = { + 'tables': {'key': 'tables', 'type': '[SyncFullSchemaTable]'}, + 'last_update_time': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncFullSchemaProperties, self).__init__(**kwargs) + self.tables = None + self.last_update_time = None + + +class SyncFullSchemaTable(Model): + """Properties of the table in the database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar columns: List of columns in the table of database full schema. + :vartype columns: list[~azure.mgmt.sql.models.SyncFullSchemaTableColumn] + :ivar error_id: Error id of the table. + :vartype error_id: str + :ivar has_error: If there is error in the table. + :vartype has_error: bool + :ivar name: Name of the table. + :vartype name: str + :ivar quoted_name: Quoted name of the table. + :vartype quoted_name: str + """ + + _validation = { + 'columns': {'readonly': True}, + 'error_id': {'readonly': True}, + 'has_error': {'readonly': True}, + 'name': {'readonly': True}, + 'quoted_name': {'readonly': True}, + } + + _attribute_map = { + 'columns': {'key': 'columns', 'type': '[SyncFullSchemaTableColumn]'}, + 'error_id': {'key': 'errorId', 'type': 'str'}, + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncFullSchemaTable, self).__init__(**kwargs) + self.columns = None + self.error_id = None + self.has_error = None + self.name = None + self.quoted_name = None + + +class SyncFullSchemaTableColumn(Model): + """Properties of the column in the table of database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar data_size: Data size of the column. + :vartype data_size: str + :ivar data_type: Data type of the column. + :vartype data_type: str + :ivar error_id: Error id of the column. + :vartype error_id: str + :ivar has_error: If there is error in the table. + :vartype has_error: bool + :ivar is_primary_key: If it is the primary key of the table. + :vartype is_primary_key: bool + :ivar name: Name of the column. + :vartype name: str + :ivar quoted_name: Quoted name of the column. + :vartype quoted_name: str + """ + + _validation = { + 'data_size': {'readonly': True}, + 'data_type': {'readonly': True}, + 'error_id': {'readonly': True}, + 'has_error': {'readonly': True}, + 'is_primary_key': {'readonly': True}, + 'name': {'readonly': True}, + 'quoted_name': {'readonly': True}, + } + + _attribute_map = { + 'data_size': {'key': 'dataSize', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + 'error_id': {'key': 'errorId', 'type': 'str'}, + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'is_primary_key': {'key': 'isPrimaryKey', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncFullSchemaTableColumn, self).__init__(**kwargs) + self.data_size = None + self.data_type = None + self.error_id = None + self.has_error = None + self.is_primary_key = None + self.name = None + self.quoted_name = None + + +class SyncGroup(ProxyResource): + """An Azure SQL Database sync group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param interval: Sync interval of the sync group. + :type interval: int + :ivar last_sync_time: Last sync time of the sync group. + :vartype last_sync_time: datetime + :param conflict_resolution_policy: Conflict resolution policy of the sync + group. Possible values include: 'HubWin', 'MemberWin' + :type conflict_resolution_policy: str or + ~azure.mgmt.sql.models.SyncConflictResolutionPolicy + :param sync_database_id: ARM resource id of the sync database in the sync + group. + :type sync_database_id: str + :param hub_database_user_name: User name for the sync group hub database + credential. + :type hub_database_user_name: str + :param hub_database_password: Password for the sync group hub database + credential. + :type hub_database_password: str + :ivar sync_state: Sync state of the sync group. Possible values include: + 'NotReady', 'Error', 'Warning', 'Progressing', 'Good' + :vartype sync_state: str or ~azure.mgmt.sql.models.SyncGroupState + :param schema: Sync schema of the sync group. + :type schema: ~azure.mgmt.sql.models.SyncGroupSchema + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_sync_time': {'readonly': True}, + 'sync_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'interval': {'key': 'properties.interval', 'type': 'int'}, + 'last_sync_time': {'key': 'properties.lastSyncTime', 'type': 'iso-8601'}, + 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'str'}, + 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, + 'hub_database_user_name': {'key': 'properties.hubDatabaseUserName', 'type': 'str'}, + 'hub_database_password': {'key': 'properties.hubDatabasePassword', 'type': 'str'}, + 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, + 'schema': {'key': 'properties.schema', 'type': 'SyncGroupSchema'}, + } + + def __init__(self, *, interval: int=None, conflict_resolution_policy=None, sync_database_id: str=None, hub_database_user_name: str=None, hub_database_password: str=None, schema=None, **kwargs) -> None: + super(SyncGroup, self).__init__(**kwargs) + self.interval = interval + self.last_sync_time = None + self.conflict_resolution_policy = conflict_resolution_policy + self.sync_database_id = sync_database_id + self.hub_database_user_name = hub_database_user_name + self.hub_database_password = hub_database_password + self.sync_state = None + self.schema = schema + + +class SyncGroupLogProperties(Model): + """Properties of an Azure SQL Database sync group log. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar timestamp: Timestamp of the sync group log. + :vartype timestamp: datetime + :ivar type: Type of the sync group log. Possible values include: 'All', + 'Error', 'Warning', 'Success' + :vartype type: str or ~azure.mgmt.sql.models.SyncGroupLogType + :ivar source: Source of the sync group log. + :vartype source: str + :ivar details: Details of the sync group log. + :vartype details: str + :ivar tracing_id: TracingId of the sync group log. + :vartype tracing_id: str + :ivar operation_status: OperationStatus of the sync group log. + :vartype operation_status: str + """ + + _validation = { + 'timestamp': {'readonly': True}, + 'type': {'readonly': True}, + 'source': {'readonly': True}, + 'details': {'readonly': True}, + 'tracing_id': {'readonly': True}, + 'operation_status': {'readonly': True}, + } + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, + 'tracing_id': {'key': 'tracingId', 'type': 'str'}, + 'operation_status': {'key': 'operationStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncGroupLogProperties, self).__init__(**kwargs) + self.timestamp = None + self.type = None + self.source = None + self.details = None + self.tracing_id = None + self.operation_status = None + + +class SyncGroupSchema(Model): + """Properties of sync group schema. + + :param tables: List of tables in sync group schema. + :type tables: list[~azure.mgmt.sql.models.SyncGroupSchemaTable] + :param master_sync_member_name: Name of master sync member where the + schema is from. + :type master_sync_member_name: str + """ + + _attribute_map = { + 'tables': {'key': 'tables', 'type': '[SyncGroupSchemaTable]'}, + 'master_sync_member_name': {'key': 'masterSyncMemberName', 'type': 'str'}, + } + + def __init__(self, *, tables=None, master_sync_member_name: str=None, **kwargs) -> None: + super(SyncGroupSchema, self).__init__(**kwargs) + self.tables = tables + self.master_sync_member_name = master_sync_member_name + + +class SyncGroupSchemaTable(Model): + """Properties of table in sync group schema. + + :param columns: List of columns in sync group schema. + :type columns: list[~azure.mgmt.sql.models.SyncGroupSchemaTableColumn] + :param quoted_name: Quoted name of sync group schema table. + :type quoted_name: str + """ + + _attribute_map = { + 'columns': {'key': 'columns', 'type': '[SyncGroupSchemaTableColumn]'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, *, columns=None, quoted_name: str=None, **kwargs) -> None: + super(SyncGroupSchemaTable, self).__init__(**kwargs) + self.columns = columns + self.quoted_name = quoted_name + + +class SyncGroupSchemaTableColumn(Model): + """Properties of column in sync group table. + + :param quoted_name: Quoted name of sync group table column. + :type quoted_name: str + :param data_size: Data size of the column. + :type data_size: str + :param data_type: Data type of the column. + :type data_type: str + """ + + _attribute_map = { + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + 'data_size': {'key': 'dataSize', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + } + + def __init__(self, *, quoted_name: str=None, data_size: str=None, data_type: str=None, **kwargs) -> None: + super(SyncGroupSchemaTableColumn, self).__init__(**kwargs) + self.quoted_name = quoted_name + self.data_size = data_size + self.data_type = data_type + + +class SyncMember(ProxyResource): + """An Azure SQL Database sync member. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param database_type: Database type of the sync member. Possible values + include: 'AzureSqlDatabase', 'SqlServerDatabase' + :type database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType + :param sync_agent_id: ARM resource id of the sync agent in the sync + member. + :type sync_agent_id: str + :param sql_server_database_id: SQL Server database id of the sync member. + :type sql_server_database_id: str + :param server_name: Server name of the member database in the sync member + :type server_name: str + :param database_name: Database name of the member database in the sync + member. + :type database_name: str + :param user_name: User name of the member database in the sync member. + :type user_name: str + :param password: Password of the member database in the sync member. + :type password: str + :param sync_direction: Sync direction of the sync member. Possible values + include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember' + :type sync_direction: str or ~azure.mgmt.sql.models.SyncDirection + :ivar sync_state: Sync state of the sync member. Possible values include: + 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', + 'DisabledTombstoneCleanup', 'DisabledBackupRestore', + 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', + 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', + 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', + 'ReprovisionFailed', 'UnReprovisioned' + :vartype sync_state: str or ~azure.mgmt.sql.models.SyncMemberState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sync_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, + 'sync_agent_id': {'key': 'properties.syncAgentId', 'type': 'str'}, + 'sql_server_database_id': {'key': 'properties.sqlServerDatabaseId', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'sync_direction': {'key': 'properties.syncDirection', 'type': 'str'}, + 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, + } + + def __init__(self, *, database_type=None, sync_agent_id: str=None, sql_server_database_id: str=None, server_name: str=None, database_name: str=None, user_name: str=None, password: str=None, sync_direction=None, **kwargs) -> None: + super(SyncMember, self).__init__(**kwargs) + self.database_type = database_type + self.sync_agent_id = sync_agent_id + self.sql_server_database_id = sql_server_database_id + self.server_name = server_name + self.database_name = database_name + self.user_name = user_name + self.password = password + self.sync_direction = sync_direction + self.sync_state = None + + +class TdeCertificate(ProxyResource): + """A TDE certificate that can be uploaded into a server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param private_blob: Required. The base64 encoded certificate private + blob. + :type private_blob: str + :param cert_password: The certificate password. + :type cert_password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'private_blob': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_blob': {'key': 'properties.privateBlob', 'type': 'str'}, + 'cert_password': {'key': 'properties.certPassword', 'type': 'str'}, + } + + def __init__(self, *, private_blob: str, cert_password: str=None, **kwargs) -> None: + super(TdeCertificate, self).__init__(**kwargs) + self.private_blob = private_blob + self.cert_password = cert_password + + +class TransparentDataEncryption(ProxyResource): + """Represents a database transparent data encryption configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :param status: The status of the database transparent data encryption. + Possible values include: 'Enabled', 'Disabled' + :type status: str or + ~azure.mgmt.sql.models.TransparentDataEncryptionStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'TransparentDataEncryptionStatus'}, + } + + def __init__(self, *, status=None, **kwargs) -> None: + super(TransparentDataEncryption, self).__init__(**kwargs) + self.location = None + self.status = status + + +class TransparentDataEncryptionActivity(ProxyResource): + """Represents a database transparent data encryption Scan. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar status: The status of the database. Possible values include: + 'Encrypting', 'Decrypting' + :vartype status: str or + ~azure.mgmt.sql.models.TransparentDataEncryptionActivityStatus + :ivar percent_complete: The percent complete of the transparent data + encryption scan for a database. + :vartype percent_complete: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'status': {'readonly': True}, + 'percent_complete': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(TransparentDataEncryptionActivity, self).__init__(**kwargs) + self.location = None + self.status = None + self.percent_complete = None + + +class Usage(Model): + """ARM usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: ~azure.mgmt.sql.models.Name + :ivar type: Resource type. + :vartype type: str + :ivar unit: Usage unit. + :vartype unit: str + :ivar current_value: Usage current value. + :vartype current_value: int + :ivar limit: Usage limit. + :vartype limit: int + :ivar requested_limit: Usage requested limit. + :vartype requested_limit: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'unit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'requested_limit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'Name'}, + 'type': {'key': 'type', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'int'}, + 'requested_limit': {'key': 'requestedLimit', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(Usage, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.unit = None + self.current_value = None + self.limit = None + self.requested_limit = None + + +class VirtualCluster(TrackedResource): + """An Azure SQL virtual cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar subnet_id: Subnet resource ID for the virtual cluster. + :vartype subnet_id: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :ivar child_resources: List of resources in this virtual cluster. + :vartype child_resources: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'subnet_id': {'readonly': True}, + 'child_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'family': {'key': 'properties.family', 'type': 'str'}, + 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, + } + + def __init__(self, *, location: str, tags=None, family: str=None, **kwargs) -> None: + super(VirtualCluster, self).__init__(location=location, tags=tags, **kwargs) + self.subnet_id = None + self.family = family + self.child_resources = None + + +class VirtualClusterUpdate(Model): + """An update request for an Azure SQL Database virtual cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar subnet_id: Subnet resource ID for the virtual cluster. + :vartype subnet_id: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :ivar child_resources: List of resources in this virtual cluster. + :vartype child_resources: list[str] + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'subnet_id': {'readonly': True}, + 'child_resources': {'readonly': True}, + } + + _attribute_map = { + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'family': {'key': 'properties.family', 'type': 'str'}, + 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, family: str=None, tags=None, **kwargs) -> None: + super(VirtualClusterUpdate, self).__init__(**kwargs) + self.subnet_id = None + self.family = family + self.child_resources = None + self.tags = tags + + +class VirtualNetworkRule(ProxyResource): + """A virtual network rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param virtual_network_subnet_id: Required. The ARM resource id of the + virtual network subnet. + :type virtual_network_subnet_id: str + :param ignore_missing_vnet_service_endpoint: Create firewall rule before + the virtual network has vnet service endpoint enabled. + :type ignore_missing_vnet_service_endpoint: bool + :ivar state: Virtual Network Rule State. Possible values include: + 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' + :vartype state: str or ~azure.mgmt.sql.models.VirtualNetworkRuleState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'virtual_network_subnet_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, + 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, *, virtual_network_subnet_id: str, ignore_missing_vnet_service_endpoint: bool=None, **kwargs) -> None: + super(VirtualNetworkRule, self).__init__(**kwargs) + self.virtual_network_subnet_id = virtual_network_subnet_id + self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint + self.state = None + + +class VulnerabilityAssessmentRecurringScansProperties(Model): + """Properties of a Vulnerability Assessment recurring scans. + + :param is_enabled: Recurring scans state. + :type is_enabled: bool + :param email_subscription_admins: Specifies that the schedule scan + notification will be is sent to the subscription administrators. Default + value: True . + :type email_subscription_admins: bool + :param emails: Specifies an array of e-mail addresses to which the scan + notification is sent. + :type emails: list[str] + """ + + _attribute_map = { + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'}, + 'emails': {'key': 'emails', 'type': '[str]'}, + } + + def __init__(self, *, is_enabled: bool=None, email_subscription_admins: bool=True, emails=None, **kwargs) -> None: + super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs) + self.is_enabled = is_enabled + self.email_subscription_admins = email_subscription_admins + self.emails = emails + + +class VulnerabilityAssessmentScanError(Model): + """Properties of a vulnerability assessment scan error. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(VulnerabilityAssessmentScanError, self).__init__(**kwargs) + self.code = None + self.message = None + + +class VulnerabilityAssessmentScanRecord(ProxyResource): + """A vulnerability assessment scan record. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar scan_id: The scan ID. + :vartype scan_id: str + :ivar trigger_type: The scan trigger type. Possible values include: + 'OnDemand', 'Recurring' + :vartype trigger_type: str or + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanTriggerType + :ivar state: The scan status. Possible values include: 'Passed', 'Failed', + 'FailedToRun', 'InProgress' + :vartype state: str or + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanState + :ivar start_time: The scan start time (UTC). + :vartype start_time: datetime + :ivar end_time: The scan end time (UTC). + :vartype end_time: datetime + :ivar errors: The scan errors. + :vartype errors: + list[~azure.mgmt.sql.models.VulnerabilityAssessmentScanError] + :ivar storage_container_path: The scan results storage container path. + :vartype storage_container_path: str + :ivar number_of_failed_security_checks: The number of failed security + checks. + :vartype number_of_failed_security_checks: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'scan_id': {'readonly': True}, + 'trigger_type': {'readonly': True}, + 'state': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'errors': {'readonly': True}, + 'storage_container_path': {'readonly': True}, + 'number_of_failed_security_checks': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'scan_id': {'key': 'properties.scanId', 'type': 'str'}, + 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'errors': {'key': 'properties.errors', 'type': '[VulnerabilityAssessmentScanError]'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'number_of_failed_security_checks': {'key': 'properties.numberOfFailedSecurityChecks', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(VulnerabilityAssessmentScanRecord, self).__init__(**kwargs) + self.scan_id = None + self.trigger_type = None + self.state = None + self.start_time = None + self.end_time = None + self.errors = None + self.storage_container_path = None + self.number_of_failed_security_checks = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py new file mode 100644 index 000000000000..43eb7dc78de9 --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py @@ -0,0 +1,885 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class RecoverableDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`RecoverableDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RecoverableDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(RecoverableDatabasePaged, self).__init__(*args, **kwargs) +class RestorableDroppedDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`RestorableDroppedDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RestorableDroppedDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(RestorableDroppedDatabasePaged, self).__init__(*args, **kwargs) +class ServerPaged(Paged): + """ + A paging container for iterating over a list of :class:`Server ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Server]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerPaged, self).__init__(*args, **kwargs) +class DataMaskingRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`DataMaskingRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DataMaskingRule]'} + } + + def __init__(self, *args, **kwargs): + + super(DataMaskingRulePaged, self).__init__(*args, **kwargs) +class FirewallRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`FirewallRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[FirewallRule]'} + } + + def __init__(self, *args, **kwargs): + + super(FirewallRulePaged, self).__init__(*args, **kwargs) +class GeoBackupPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`GeoBackupPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GeoBackupPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(GeoBackupPolicyPaged, self).__init__(*args, **kwargs) +class MetricPaged(Paged): + """ + A paging container for iterating over a list of :class:`Metric ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Metric]'} + } + + def __init__(self, *args, **kwargs): + + super(MetricPaged, self).__init__(*args, **kwargs) +class MetricDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`MetricDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[MetricDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(MetricDefinitionPaged, self).__init__(*args, **kwargs) +class DatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`Database ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Database]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabasePaged, self).__init__(*args, **kwargs) +class ElasticPoolPaged(Paged): + """ + A paging container for iterating over a list of :class:`ElasticPool ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ElasticPool]'} + } + + def __init__(self, *args, **kwargs): + + super(ElasticPoolPaged, self).__init__(*args, **kwargs) +class RecommendedElasticPoolPaged(Paged): + """ + A paging container for iterating over a list of :class:`RecommendedElasticPool ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RecommendedElasticPool]'} + } + + def __init__(self, *args, **kwargs): + + super(RecommendedElasticPoolPaged, self).__init__(*args, **kwargs) +class RecommendedElasticPoolMetricPaged(Paged): + """ + A paging container for iterating over a list of :class:`RecommendedElasticPoolMetric ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RecommendedElasticPoolMetric]'} + } + + def __init__(self, *args, **kwargs): + + super(RecommendedElasticPoolMetricPaged, self).__init__(*args, **kwargs) +class ReplicationLinkPaged(Paged): + """ + A paging container for iterating over a list of :class:`ReplicationLink ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ReplicationLink]'} + } + + def __init__(self, *args, **kwargs): + + super(ReplicationLinkPaged, self).__init__(*args, **kwargs) +class ServerAzureADAdministratorPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerAzureADAdministrator ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerAzureADAdministrator]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerAzureADAdministratorPaged, self).__init__(*args, **kwargs) +class ServerCommunicationLinkPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerCommunicationLink ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerCommunicationLink]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerCommunicationLinkPaged, self).__init__(*args, **kwargs) +class ServiceObjectivePaged(Paged): + """ + A paging container for iterating over a list of :class:`ServiceObjective ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServiceObjective]'} + } + + def __init__(self, *args, **kwargs): + + super(ServiceObjectivePaged, self).__init__(*args, **kwargs) +class ElasticPoolActivityPaged(Paged): + """ + A paging container for iterating over a list of :class:`ElasticPoolActivity ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ElasticPoolActivity]'} + } + + def __init__(self, *args, **kwargs): + + super(ElasticPoolActivityPaged, self).__init__(*args, **kwargs) +class ElasticPoolDatabaseActivityPaged(Paged): + """ + A paging container for iterating over a list of :class:`ElasticPoolDatabaseActivity ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ElasticPoolDatabaseActivity]'} + } + + def __init__(self, *args, **kwargs): + + super(ElasticPoolDatabaseActivityPaged, self).__init__(*args, **kwargs) +class ServiceTierAdvisorPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServiceTierAdvisor ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServiceTierAdvisor]'} + } + + def __init__(self, *args, **kwargs): + + super(ServiceTierAdvisorPaged, self).__init__(*args, **kwargs) +class TransparentDataEncryptionActivityPaged(Paged): + """ + A paging container for iterating over a list of :class:`TransparentDataEncryptionActivity ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TransparentDataEncryptionActivity]'} + } + + def __init__(self, *args, **kwargs): + + super(TransparentDataEncryptionActivityPaged, self).__init__(*args, **kwargs) +class ServerUsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerUsage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerUsage]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerUsagePaged, self).__init__(*args, **kwargs) +class DatabaseUsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`DatabaseUsage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseUsage]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseUsagePaged, self).__init__(*args, **kwargs) +class EncryptionProtectorPaged(Paged): + """ + A paging container for iterating over a list of :class:`EncryptionProtector ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[EncryptionProtector]'} + } + + def __init__(self, *args, **kwargs): + + super(EncryptionProtectorPaged, self).__init__(*args, **kwargs) +class FailoverGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`FailoverGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[FailoverGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(FailoverGroupPaged, self).__init__(*args, **kwargs) +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class ServerKeyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerKey ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerKey]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerKeyPaged, self).__init__(*args, **kwargs) +class SyncAgentPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncAgent ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncAgent]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncAgentPaged, self).__init__(*args, **kwargs) +class SyncAgentLinkedDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncAgentLinkedDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncAgentLinkedDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncAgentLinkedDatabasePaged, self).__init__(*args, **kwargs) +class SyncDatabaseIdPropertiesPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncDatabaseIdProperties ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncDatabaseIdProperties]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncDatabaseIdPropertiesPaged, self).__init__(*args, **kwargs) +class SyncFullSchemaPropertiesPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncFullSchemaProperties ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncFullSchemaProperties]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncFullSchemaPropertiesPaged, self).__init__(*args, **kwargs) +class SyncGroupLogPropertiesPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncGroupLogProperties ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncGroupLogProperties]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncGroupLogPropertiesPaged, self).__init__(*args, **kwargs) +class SyncGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncGroupPaged, self).__init__(*args, **kwargs) +class SyncMemberPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncMember ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncMember]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncMemberPaged, self).__init__(*args, **kwargs) +class SubscriptionUsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`SubscriptionUsage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SubscriptionUsage]'} + } + + def __init__(self, *args, **kwargs): + + super(SubscriptionUsagePaged, self).__init__(*args, **kwargs) +class VirtualClusterPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualCluster ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualCluster]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualClusterPaged, self).__init__(*args, **kwargs) +class VirtualNetworkRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualNetworkRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualNetworkRule]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualNetworkRulePaged, self).__init__(*args, **kwargs) +class DatabaseVulnerabilityAssessmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`DatabaseVulnerabilityAssessment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseVulnerabilityAssessment]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) +class JobAgentPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobAgent ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobAgent]'} + } + + def __init__(self, *args, **kwargs): + + super(JobAgentPaged, self).__init__(*args, **kwargs) +class JobCredentialPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobCredential ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobCredential]'} + } + + def __init__(self, *args, **kwargs): + + super(JobCredentialPaged, self).__init__(*args, **kwargs) +class JobExecutionPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobExecution ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobExecution]'} + } + + def __init__(self, *args, **kwargs): + + super(JobExecutionPaged, self).__init__(*args, **kwargs) +class JobPaged(Paged): + """ + A paging container for iterating over a list of :class:`Job ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Job]'} + } + + def __init__(self, *args, **kwargs): + + super(JobPaged, self).__init__(*args, **kwargs) +class JobStepPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobStep ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobStep]'} + } + + def __init__(self, *args, **kwargs): + + super(JobStepPaged, self).__init__(*args, **kwargs) +class JobTargetGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobTargetGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobTargetGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(JobTargetGroupPaged, self).__init__(*args, **kwargs) +class JobVersionPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobVersion ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobVersion]'} + } + + def __init__(self, *args, **kwargs): + + super(JobVersionPaged, self).__init__(*args, **kwargs) +class LongTermRetentionBackupPaged(Paged): + """ + A paging container for iterating over a list of :class:`LongTermRetentionBackup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[LongTermRetentionBackup]'} + } + + def __init__(self, *args, **kwargs): + + super(LongTermRetentionBackupPaged, self).__init__(*args, **kwargs) +class ManagedBackupShortTermRetentionPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedBackupShortTermRetentionPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedBackupShortTermRetentionPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedBackupShortTermRetentionPolicyPaged, self).__init__(*args, **kwargs) +class ManagedDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedDatabasePaged, self).__init__(*args, **kwargs) +class ServerDnsAliasPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerDnsAlias ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerDnsAlias]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerDnsAliasPaged, self).__init__(*args, **kwargs) +class ServerSecurityAlertPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerSecurityAlertPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerSecurityAlertPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) +class RestorableDroppedManagedDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`RestorableDroppedManagedDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RestorableDroppedManagedDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(RestorableDroppedManagedDatabasePaged, self).__init__(*args, **kwargs) +class RestorePointPaged(Paged): + """ + A paging container for iterating over a list of :class:`RestorePoint ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RestorePoint]'} + } + + def __init__(self, *args, **kwargs): + + super(RestorePointPaged, self).__init__(*args, **kwargs) +class ManagedDatabaseSecurityAlertPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedDatabaseSecurityAlertPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedDatabaseSecurityAlertPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedDatabaseSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) +class ManagedServerSecurityAlertPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedServerSecurityAlertPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedServerSecurityAlertPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedServerSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) +class SensitivityLabelPaged(Paged): + """ + A paging container for iterating over a list of :class:`SensitivityLabel ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SensitivityLabel]'} + } + + def __init__(self, *args, **kwargs): + + super(SensitivityLabelPaged, self).__init__(*args, **kwargs) +class DatabaseOperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`DatabaseOperation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseOperation]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseOperationPaged, self).__init__(*args, **kwargs) +class ElasticPoolOperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`ElasticPoolOperation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ElasticPoolOperation]'} + } + + def __init__(self, *args, **kwargs): + + super(ElasticPoolOperationPaged, self).__init__(*args, **kwargs) +class VulnerabilityAssessmentScanRecordPaged(Paged): + """ + A paging container for iterating over a list of :class:`VulnerabilityAssessmentScanRecord ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VulnerabilityAssessmentScanRecord]'} + } + + def __init__(self, *args, **kwargs): + + super(VulnerabilityAssessmentScanRecordPaged, self).__init__(*args, **kwargs) +class InstanceFailoverGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`InstanceFailoverGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[InstanceFailoverGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(InstanceFailoverGroupPaged, self).__init__(*args, **kwargs) +class BackupShortTermRetentionPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`BackupShortTermRetentionPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BackupShortTermRetentionPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(BackupShortTermRetentionPolicyPaged, self).__init__(*args, **kwargs) +class ManagedInstanceKeyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedInstanceKey ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedInstanceKey]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedInstanceKeyPaged, self).__init__(*args, **kwargs) +class ManagedInstanceEncryptionProtectorPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedInstanceEncryptionProtector ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedInstanceEncryptionProtector]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedInstanceEncryptionProtectorPaged, self).__init__(*args, **kwargs) +class RecoverableManagedDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`RecoverableManagedDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RecoverableManagedDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(RecoverableManagedDatabasePaged, self).__init__(*args, **kwargs) +class ManagedInstanceVulnerabilityAssessmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedInstanceVulnerabilityAssessment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedInstanceVulnerabilityAssessment]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedInstanceVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) +class ServerVulnerabilityAssessmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerVulnerabilityAssessment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerVulnerabilityAssessment]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) +class InstancePoolPaged(Paged): + """ + A paging container for iterating over a list of :class:`InstancePool ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[InstancePool]'} + } + + def __init__(self, *args, **kwargs): + + super(InstancePoolPaged, self).__init__(*args, **kwargs) +class UsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Usage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Usage]'} + } + + def __init__(self, *args, **kwargs): + + super(UsagePaged, self).__init__(*args, **kwargs) +class ManagedInstancePaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedInstance ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedInstance]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedInstancePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py index de1d73caf27c..0ac10a4f69f8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py @@ -85,6 +85,9 @@ class DatabaseEdition(str, Enum): data_warehouse = "DataWarehouse" system = "System" system2 = "System2" + general_purpose = "GeneralPurpose" + business_critical = "BusinessCritical" + hyperscale = "Hyperscale" class ServiceObjectiveName(str, Enum): @@ -203,6 +206,8 @@ class ElasticPoolEdition(str, Enum): basic = "Basic" standard = "Standard" premium = "Premium" + general_purpose = "GeneralPurpose" + business_critical = "BusinessCritical" class ReplicationRole(str, Enum): @@ -320,24 +325,17 @@ class FailoverGroupReplicationRole(str, Enum): secondary = "Secondary" -class IdentityType(str, Enum): - - system_assigned = "SystemAssigned" - - -class ManagedInstanceProxyOverride(str, Enum): - - proxy = "Proxy" - redirect = "Redirect" - default = "Default" - - class OperationOrigin(str, Enum): user = "user" system = "system" +class IdentityType(str, Enum): + + system_assigned = "SystemAssigned" + + class SyncAgentState(str, Enum): online = "Online" @@ -612,6 +610,8 @@ class DatabaseStatus(str, Enum): paused = "Paused" resuming = "Resuming" scaling = "Scaling" + offline_changing_dw_performance_tiers = "OfflineChangingDwPerformanceTiers" + online_changing_dw_performance_tiers = "OnlineChangingDwPerformanceTiers" class DatabaseLicenseType(str, Enum): @@ -659,6 +659,31 @@ class InstanceFailoverGroupReplicationRole(str, Enum): secondary = "Secondary" +class InstancePoolLicenseType(str, Enum): + + license_included = "LicenseIncluded" + base_price = "BasePrice" + + +class ManagedServerCreateMode(str, Enum): + + default = "Default" + point_in_time_restore = "PointInTimeRestore" + + +class ManagedInstanceLicenseType(str, Enum): + + license_included = "LicenseIncluded" + base_price = "BasePrice" + + +class ManagedInstanceProxyOverride(str, Enum): + + proxy = "Proxy" + redirect = "Redirect" + default = "Default" + + class LongTermRetentionDatabaseState(str, Enum): all = "All" diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options.py deleted file mode 100644 index 42c5aa7ac8a1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutomaticTuningOptions(Model): - """Automatic tuning properties for individual advisors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param desired_state: Automatic tuning option desired state. Possible - values include: 'Off', 'On', 'Default' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired - :ivar actual_state: Automatic tuning option actual state. Possible values - include: 'Off', 'On' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual - :ivar reason_code: Reason code if desired and actual state are different. - :vartype reason_code: int - :ivar reason_desc: Reason description if desired and actual state are - different. Possible values include: 'Default', 'Disabled', - 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', - 'QueryStoreReadOnly', 'NotSupported' - :vartype reason_desc: str or - ~azure.mgmt.sql.models.AutomaticTuningDisabledReason - """ - - _validation = { - 'actual_state': {'readonly': True}, - 'reason_code': {'readonly': True}, - 'reason_desc': {'readonly': True}, - } - - _attribute_map = { - 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, - 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, - 'reason_code': {'key': 'reasonCode', 'type': 'int'}, - 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningDisabledReason'}, - } - - def __init__(self, **kwargs): - super(AutomaticTuningOptions, self).__init__(**kwargs) - self.desired_state = kwargs.get('desired_state', None) - self.actual_state = None - self.reason_code = None - self.reason_desc = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options_py3.py deleted file mode 100644 index b55fd35d8157..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutomaticTuningOptions(Model): - """Automatic tuning properties for individual advisors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param desired_state: Automatic tuning option desired state. Possible - values include: 'Off', 'On', 'Default' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired - :ivar actual_state: Automatic tuning option actual state. Possible values - include: 'Off', 'On' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual - :ivar reason_code: Reason code if desired and actual state are different. - :vartype reason_code: int - :ivar reason_desc: Reason description if desired and actual state are - different. Possible values include: 'Default', 'Disabled', - 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', - 'QueryStoreReadOnly', 'NotSupported' - :vartype reason_desc: str or - ~azure.mgmt.sql.models.AutomaticTuningDisabledReason - """ - - _validation = { - 'actual_state': {'readonly': True}, - 'reason_code': {'readonly': True}, - 'reason_desc': {'readonly': True}, - } - - _attribute_map = { - 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, - 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, - 'reason_code': {'key': 'reasonCode', 'type': 'int'}, - 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningDisabledReason'}, - } - - def __init__(self, *, desired_state=None, **kwargs) -> None: - super(AutomaticTuningOptions, self).__init__(**kwargs) - self.desired_state = desired_state - self.actual_state = None - self.reason_code = None - self.reason_desc = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options.py deleted file mode 100644 index ef7fbcc75e4b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutomaticTuningServerOptions(Model): - """Automatic tuning properties for individual advisors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param desired_state: Automatic tuning option desired state. Possible - values include: 'Off', 'On', 'Default' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired - :ivar actual_state: Automatic tuning option actual state. Possible values - include: 'Off', 'On' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual - :ivar reason_code: Reason code if desired and actual state are different. - :vartype reason_code: int - :ivar reason_desc: Reason description if desired and actual state are - different. Possible values include: 'Default', 'Disabled', - 'AutoConfigured' - :vartype reason_desc: str or - ~azure.mgmt.sql.models.AutomaticTuningServerReason - """ - - _validation = { - 'actual_state': {'readonly': True}, - 'reason_code': {'readonly': True}, - 'reason_desc': {'readonly': True}, - } - - _attribute_map = { - 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, - 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, - 'reason_code': {'key': 'reasonCode', 'type': 'int'}, - 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningServerReason'}, - } - - def __init__(self, **kwargs): - super(AutomaticTuningServerOptions, self).__init__(**kwargs) - self.desired_state = kwargs.get('desired_state', None) - self.actual_state = None - self.reason_code = None - self.reason_desc = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options_py3.py deleted file mode 100644 index 28e5fc0873ad..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutomaticTuningServerOptions(Model): - """Automatic tuning properties for individual advisors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param desired_state: Automatic tuning option desired state. Possible - values include: 'Off', 'On', 'Default' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired - :ivar actual_state: Automatic tuning option actual state. Possible values - include: 'Off', 'On' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual - :ivar reason_code: Reason code if desired and actual state are different. - :vartype reason_code: int - :ivar reason_desc: Reason description if desired and actual state are - different. Possible values include: 'Default', 'Disabled', - 'AutoConfigured' - :vartype reason_desc: str or - ~azure.mgmt.sql.models.AutomaticTuningServerReason - """ - - _validation = { - 'actual_state': {'readonly': True}, - 'reason_code': {'readonly': True}, - 'reason_desc': {'readonly': True}, - } - - _attribute_map = { - 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, - 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, - 'reason_code': {'key': 'reasonCode', 'type': 'int'}, - 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningServerReason'}, - } - - def __init__(self, *, desired_state=None, **kwargs) -> None: - super(AutomaticTuningServerOptions, self).__init__(**kwargs) - self.desired_state = desired_state - self.actual_state = None - self.reason_code = None - self.reason_desc = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy.py deleted file mode 100644 index 544110988a82..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class BackupLongTermRetentionPolicy(ProxyResource): - """A long term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param weekly_retention: The weekly retention policy for an LTR backup in - an ISO 8601 format. - :type weekly_retention: str - :param monthly_retention: The monthly retention policy for an LTR backup - in an ISO 8601 format. - :type monthly_retention: str - :param yearly_retention: The yearly retention policy for an LTR backup in - an ISO 8601 format. - :type yearly_retention: str - :param week_of_year: The week of year to take the yearly backup in an ISO - 8601 format. - :type week_of_year: int - """ - - _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'}, - 'weekly_retention': {'key': 'properties.weeklyRetention', 'type': 'str'}, - 'monthly_retention': {'key': 'properties.monthlyRetention', 'type': 'str'}, - 'yearly_retention': {'key': 'properties.yearlyRetention', 'type': 'str'}, - 'week_of_year': {'key': 'properties.weekOfYear', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(BackupLongTermRetentionPolicy, self).__init__(**kwargs) - self.weekly_retention = kwargs.get('weekly_retention', None) - self.monthly_retention = kwargs.get('monthly_retention', None) - self.yearly_retention = kwargs.get('yearly_retention', None) - self.week_of_year = kwargs.get('week_of_year', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_py3.py deleted file mode 100644 index 6e7cb8ace394..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class BackupLongTermRetentionPolicy(ProxyResource): - """A long term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param weekly_retention: The weekly retention policy for an LTR backup in - an ISO 8601 format. - :type weekly_retention: str - :param monthly_retention: The monthly retention policy for an LTR backup - in an ISO 8601 format. - :type monthly_retention: str - :param yearly_retention: The yearly retention policy for an LTR backup in - an ISO 8601 format. - :type yearly_retention: str - :param week_of_year: The week of year to take the yearly backup in an ISO - 8601 format. - :type week_of_year: int - """ - - _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'}, - 'weekly_retention': {'key': 'properties.weeklyRetention', 'type': 'str'}, - 'monthly_retention': {'key': 'properties.monthlyRetention', 'type': 'str'}, - 'yearly_retention': {'key': 'properties.yearlyRetention', 'type': 'str'}, - 'week_of_year': {'key': 'properties.weekOfYear', 'type': 'int'}, - } - - def __init__(self, *, weekly_retention: str=None, monthly_retention: str=None, yearly_retention: str=None, week_of_year: int=None, **kwargs) -> None: - super(BackupLongTermRetentionPolicy, self).__init__(**kwargs) - self.weekly_retention = weekly_retention - self.monthly_retention = monthly_retention - self.yearly_retention = yearly_retention - self.week_of_year = week_of_year diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy.py deleted file mode 100644 index 1d4fba2cfff4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class BackupShortTermRetentionPolicy(ProxyResource): - """A short term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param retention_days: The backup retention period in days. This is how - many days Point-in-Time Restore will be supported. - :type retention_days: int - """ - - _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'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) - self.retention_days = kwargs.get('retention_days', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_paged.py deleted file mode 100644 index 16d31e341795..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class BackupShortTermRetentionPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`BackupShortTermRetentionPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[BackupShortTermRetentionPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(BackupShortTermRetentionPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_py3.py deleted file mode 100644 index 9df25577baf3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class BackupShortTermRetentionPolicy(ProxyResource): - """A short term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param retention_days: The backup retention period in days. This is how - many days Point-in-Time Restore will be supported. - :type retention_days: int - """ - - _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'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, *, retention_days: int=None, **kwargs) -> None: - super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) - self.retention_days = retention_days diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request.py deleted file mode 100644 index 345059f6dd49..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailabilityRequest(Model): - """A request to check whether the specified name for a resource is available. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name whose availability is to be checked. - :type name: str - :ivar type: Required. The type of resource that is used as the scope of - the availability check. Default value: "Microsoft.Sql/servers" . - :vartype type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - type = "Microsoft.Sql/servers" - - def __init__(self, **kwargs): - super(CheckNameAvailabilityRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request_py3.py deleted file mode 100644 index 5399ec3a7ffb..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailabilityRequest(Model): - """A request to check whether the specified name for a resource is available. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name whose availability is to be checked. - :type name: str - :ivar type: Required. The type of resource that is used as the scope of - the availability check. Default value: "Microsoft.Sql/servers" . - :vartype type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - type = "Microsoft.Sql/servers" - - def __init__(self, *, name: str, **kwargs) -> None: - super(CheckNameAvailabilityRequest, self).__init__(**kwargs) - self.name = name diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response.py deleted file mode 100644 index 40f429db82da..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailabilityResponse(Model): - """A response indicating whether the specified name for a resource is - available. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar available: True if the name is available, otherwise false. - :vartype available: bool - :ivar message: A message explaining why the name is unavailable. Will be - null if the name is available. - :vartype message: str - :ivar name: The name whose availability was checked. - :vartype name: str - :ivar reason: The reason code explaining why the name is unavailable. Will - be null if the name is available. Possible values include: 'Invalid', - 'AlreadyExists' - :vartype reason: str or ~azure.mgmt.sql.models.CheckNameAvailabilityReason - """ - - _validation = { - 'available': {'readonly': True}, - 'message': {'readonly': True}, - 'name': {'readonly': True}, - 'reason': {'readonly': True}, - } - - _attribute_map = { - 'available': {'key': 'available', 'type': 'bool'}, - 'message': {'key': 'message', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'reason': {'key': 'reason', 'type': 'CheckNameAvailabilityReason'}, - } - - def __init__(self, **kwargs): - super(CheckNameAvailabilityResponse, self).__init__(**kwargs) - self.available = None - self.message = None - self.name = None - self.reason = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response_py3.py deleted file mode 100644 index 613c8fd41661..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailabilityResponse(Model): - """A response indicating whether the specified name for a resource is - available. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar available: True if the name is available, otherwise false. - :vartype available: bool - :ivar message: A message explaining why the name is unavailable. Will be - null if the name is available. - :vartype message: str - :ivar name: The name whose availability was checked. - :vartype name: str - :ivar reason: The reason code explaining why the name is unavailable. Will - be null if the name is available. Possible values include: 'Invalid', - 'AlreadyExists' - :vartype reason: str or ~azure.mgmt.sql.models.CheckNameAvailabilityReason - """ - - _validation = { - 'available': {'readonly': True}, - 'message': {'readonly': True}, - 'name': {'readonly': True}, - 'reason': {'readonly': True}, - } - - _attribute_map = { - 'available': {'key': 'available', 'type': 'bool'}, - 'message': {'key': 'message', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'reason': {'key': 'reason', 'type': 'CheckNameAvailabilityReason'}, - } - - def __init__(self, **kwargs) -> None: - super(CheckNameAvailabilityResponse, self).__init__(**kwargs) - self.available = None - self.message = None - self.name = None - self.reason = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition.py deleted file mode 100644 index 926012a21f09..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CompleteDatabaseRestoreDefinition(Model): - """Contains the information necessary to perform a complete database restore - operation. - - All required parameters must be populated in order to send to Azure. - - :param last_backup_name: Required. The last backup name to apply - :type last_backup_name: str - """ - - _validation = { - 'last_backup_name': {'required': True}, - } - - _attribute_map = { - 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CompleteDatabaseRestoreDefinition, self).__init__(**kwargs) - self.last_backup_name = kwargs.get('last_backup_name', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition_py3.py deleted file mode 100644 index 8b3c7f3da1f8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CompleteDatabaseRestoreDefinition(Model): - """Contains the information necessary to perform a complete database restore - operation. - - All required parameters must be populated in order to send to Azure. - - :param last_backup_name: Required. The last backup name to apply - :type last_backup_name: str - """ - - _validation = { - 'last_backup_name': {'required': True}, - } - - _attribute_map = { - 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, - } - - def __init__(self, *, last_backup_name: str, **kwargs) -> None: - super(CompleteDatabaseRestoreDefinition, self).__init__(**kwargs) - self.last_backup_name = last_backup_name diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition.py deleted file mode 100644 index 34ae6626306e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreateDatabaseRestorePointDefinition(Model): - """Contains the information necessary to perform a create database restore - point operation. - - All required parameters must be populated in order to send to Azure. - - :param restore_point_label: Required. The restore point label to apply - :type restore_point_label: str - """ - - _validation = { - 'restore_point_label': {'required': True}, - } - - _attribute_map = { - 'restore_point_label': {'key': 'restorePointLabel', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CreateDatabaseRestorePointDefinition, self).__init__(**kwargs) - self.restore_point_label = kwargs.get('restore_point_label', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition_py3.py deleted file mode 100644 index 7200fc8c236a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreateDatabaseRestorePointDefinition(Model): - """Contains the information necessary to perform a create database restore - point operation. - - All required parameters must be populated in order to send to Azure. - - :param restore_point_label: Required. The restore point label to apply - :type restore_point_label: str - """ - - _validation = { - 'restore_point_label': {'required': True}, - } - - _attribute_map = { - 'restore_point_label': {'key': 'restorePointLabel', 'type': 'str'}, - } - - def __init__(self, *, restore_point_label: str, **kwargs) -> None: - super(CreateDatabaseRestorePointDefinition, self).__init__(**kwargs) - self.restore_point_label = restore_point_label diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy.py deleted file mode 100644 index a872d3af9676..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DataMaskingPolicy(ProxyResource): - """Represents a database data masking policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param data_masking_state: Required. The state of the data masking policy. - Possible values include: 'Disabled', 'Enabled' - :type data_masking_state: str or ~azure.mgmt.sql.models.DataMaskingState - :param exempt_principals: The list of the exempt principals. Specifies the - semicolon-separated list of database users for which the data masking - policy does not apply. The specified users receive data results without - masking for all of the database queries. - :type exempt_principals: str - :ivar application_principals: The list of the application principals. This - is a legacy parameter and is no longer used. - :vartype application_principals: str - :ivar masking_level: The masking level. This is a legacy parameter and is - no longer used. - :vartype masking_level: str - :ivar location: The location of the data masking policy. - :vartype location: str - :ivar kind: The kind of data masking policy. Metadata, used for Azure - portal. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'data_masking_state': {'required': True}, - 'application_principals': {'readonly': True}, - 'masking_level': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data_masking_state': {'key': 'properties.dataMaskingState', 'type': 'DataMaskingState'}, - 'exempt_principals': {'key': 'properties.exemptPrincipals', 'type': 'str'}, - 'application_principals': {'key': 'properties.applicationPrincipals', 'type': 'str'}, - 'masking_level': {'key': 'properties.maskingLevel', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataMaskingPolicy, self).__init__(**kwargs) - self.data_masking_state = kwargs.get('data_masking_state', None) - self.exempt_principals = kwargs.get('exempt_principals', None) - self.application_principals = None - self.masking_level = None - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy_py3.py deleted file mode 100644 index c2227aeb60da..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DataMaskingPolicy(ProxyResource): - """Represents a database data masking policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param data_masking_state: Required. The state of the data masking policy. - Possible values include: 'Disabled', 'Enabled' - :type data_masking_state: str or ~azure.mgmt.sql.models.DataMaskingState - :param exempt_principals: The list of the exempt principals. Specifies the - semicolon-separated list of database users for which the data masking - policy does not apply. The specified users receive data results without - masking for all of the database queries. - :type exempt_principals: str - :ivar application_principals: The list of the application principals. This - is a legacy parameter and is no longer used. - :vartype application_principals: str - :ivar masking_level: The masking level. This is a legacy parameter and is - no longer used. - :vartype masking_level: str - :ivar location: The location of the data masking policy. - :vartype location: str - :ivar kind: The kind of data masking policy. Metadata, used for Azure - portal. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'data_masking_state': {'required': True}, - 'application_principals': {'readonly': True}, - 'masking_level': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data_masking_state': {'key': 'properties.dataMaskingState', 'type': 'DataMaskingState'}, - 'exempt_principals': {'key': 'properties.exemptPrincipals', 'type': 'str'}, - 'application_principals': {'key': 'properties.applicationPrincipals', 'type': 'str'}, - 'masking_level': {'key': 'properties.maskingLevel', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, data_masking_state, exempt_principals: str=None, **kwargs) -> None: - super(DataMaskingPolicy, self).__init__(**kwargs) - self.data_masking_state = data_masking_state - self.exempt_principals = exempt_principals - self.application_principals = None - self.masking_level = None - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule.py deleted file mode 100644 index 9c31fca591b6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DataMaskingRule(ProxyResource): - """Represents a database data masking rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar data_masking_rule_id: The rule Id. - :vartype data_masking_rule_id: str - :param alias_name: The alias name. This is a legacy parameter and is no - longer used. - :type alias_name: str - :param rule_state: The rule state. Used to delete a rule. To delete an - existing rule, specify the schemaName, tableName, columnName, - maskingFunction, and specify ruleState as disabled. However, if the rule - doesn't already exist, the rule will be created with ruleState set to - enabled, regardless of the provided value of ruleState. Possible values - include: 'Disabled', 'Enabled' - :type rule_state: str or ~azure.mgmt.sql.models.DataMaskingRuleState - :param schema_name: Required. The schema name on which the data masking - rule is applied. - :type schema_name: str - :param table_name: Required. The table name on which the data masking rule - is applied. - :type table_name: str - :param column_name: Required. The column name on which the data masking - rule is applied. - :type column_name: str - :param masking_function: Required. The masking function that is used for - the data masking rule. Possible values include: 'Default', 'CCN', 'Email', - 'Number', 'SSN', 'Text' - :type masking_function: str or ~azure.mgmt.sql.models.DataMaskingFunction - :param number_from: The numberFrom property of the masking rule. Required - if maskingFunction is set to Number, otherwise this parameter will be - ignored. - :type number_from: str - :param number_to: The numberTo property of the data masking rule. Required - if maskingFunction is set to Number, otherwise this parameter will be - ignored. - :type number_to: str - :param prefix_size: If maskingFunction is set to Text, the number of - characters to show unmasked in the beginning of the string. Otherwise, - this parameter will be ignored. - :type prefix_size: str - :param suffix_size: If maskingFunction is set to Text, the number of - characters to show unmasked at the end of the string. Otherwise, this - parameter will be ignored. - :type suffix_size: str - :param replacement_string: If maskingFunction is set to Text, the - character to use for masking the unexposed part of the string. Otherwise, - this parameter will be ignored. - :type replacement_string: str - :ivar location: The location of the data masking rule. - :vartype location: str - :ivar kind: The kind of Data Masking Rule. Metadata, used for Azure - portal. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'data_masking_rule_id': {'readonly': True}, - 'schema_name': {'required': True}, - 'table_name': {'required': True}, - 'column_name': {'required': True}, - 'masking_function': {'required': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data_masking_rule_id': {'key': 'properties.id', 'type': 'str'}, - 'alias_name': {'key': 'properties.aliasName', 'type': 'str'}, - 'rule_state': {'key': 'properties.ruleState', 'type': 'DataMaskingRuleState'}, - 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, - 'table_name': {'key': 'properties.tableName', 'type': 'str'}, - 'column_name': {'key': 'properties.columnName', 'type': 'str'}, - 'masking_function': {'key': 'properties.maskingFunction', 'type': 'DataMaskingFunction'}, - 'number_from': {'key': 'properties.numberFrom', 'type': 'str'}, - 'number_to': {'key': 'properties.numberTo', 'type': 'str'}, - 'prefix_size': {'key': 'properties.prefixSize', 'type': 'str'}, - 'suffix_size': {'key': 'properties.suffixSize', 'type': 'str'}, - 'replacement_string': {'key': 'properties.replacementString', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataMaskingRule, self).__init__(**kwargs) - self.data_masking_rule_id = None - self.alias_name = kwargs.get('alias_name', None) - self.rule_state = kwargs.get('rule_state', None) - self.schema_name = kwargs.get('schema_name', None) - self.table_name = kwargs.get('table_name', None) - self.column_name = kwargs.get('column_name', None) - self.masking_function = kwargs.get('masking_function', None) - self.number_from = kwargs.get('number_from', None) - self.number_to = kwargs.get('number_to', None) - self.prefix_size = kwargs.get('prefix_size', None) - self.suffix_size = kwargs.get('suffix_size', None) - self.replacement_string = kwargs.get('replacement_string', None) - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_paged.py deleted file mode 100644 index 4e1eed7b9f51..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DataMaskingRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`DataMaskingRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DataMaskingRule]'} - } - - def __init__(self, *args, **kwargs): - - super(DataMaskingRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_py3.py deleted file mode 100644 index 775fd78a2d6b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_py3.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DataMaskingRule(ProxyResource): - """Represents a database data masking rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar data_masking_rule_id: The rule Id. - :vartype data_masking_rule_id: str - :param alias_name: The alias name. This is a legacy parameter and is no - longer used. - :type alias_name: str - :param rule_state: The rule state. Used to delete a rule. To delete an - existing rule, specify the schemaName, tableName, columnName, - maskingFunction, and specify ruleState as disabled. However, if the rule - doesn't already exist, the rule will be created with ruleState set to - enabled, regardless of the provided value of ruleState. Possible values - include: 'Disabled', 'Enabled' - :type rule_state: str or ~azure.mgmt.sql.models.DataMaskingRuleState - :param schema_name: Required. The schema name on which the data masking - rule is applied. - :type schema_name: str - :param table_name: Required. The table name on which the data masking rule - is applied. - :type table_name: str - :param column_name: Required. The column name on which the data masking - rule is applied. - :type column_name: str - :param masking_function: Required. The masking function that is used for - the data masking rule. Possible values include: 'Default', 'CCN', 'Email', - 'Number', 'SSN', 'Text' - :type masking_function: str or ~azure.mgmt.sql.models.DataMaskingFunction - :param number_from: The numberFrom property of the masking rule. Required - if maskingFunction is set to Number, otherwise this parameter will be - ignored. - :type number_from: str - :param number_to: The numberTo property of the data masking rule. Required - if maskingFunction is set to Number, otherwise this parameter will be - ignored. - :type number_to: str - :param prefix_size: If maskingFunction is set to Text, the number of - characters to show unmasked in the beginning of the string. Otherwise, - this parameter will be ignored. - :type prefix_size: str - :param suffix_size: If maskingFunction is set to Text, the number of - characters to show unmasked at the end of the string. Otherwise, this - parameter will be ignored. - :type suffix_size: str - :param replacement_string: If maskingFunction is set to Text, the - character to use for masking the unexposed part of the string. Otherwise, - this parameter will be ignored. - :type replacement_string: str - :ivar location: The location of the data masking rule. - :vartype location: str - :ivar kind: The kind of Data Masking Rule. Metadata, used for Azure - portal. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'data_masking_rule_id': {'readonly': True}, - 'schema_name': {'required': True}, - 'table_name': {'required': True}, - 'column_name': {'required': True}, - 'masking_function': {'required': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data_masking_rule_id': {'key': 'properties.id', 'type': 'str'}, - 'alias_name': {'key': 'properties.aliasName', 'type': 'str'}, - 'rule_state': {'key': 'properties.ruleState', 'type': 'DataMaskingRuleState'}, - 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, - 'table_name': {'key': 'properties.tableName', 'type': 'str'}, - 'column_name': {'key': 'properties.columnName', 'type': 'str'}, - 'masking_function': {'key': 'properties.maskingFunction', 'type': 'DataMaskingFunction'}, - 'number_from': {'key': 'properties.numberFrom', 'type': 'str'}, - 'number_to': {'key': 'properties.numberTo', 'type': 'str'}, - 'prefix_size': {'key': 'properties.prefixSize', 'type': 'str'}, - 'suffix_size': {'key': 'properties.suffixSize', 'type': 'str'}, - 'replacement_string': {'key': 'properties.replacementString', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, schema_name: str, table_name: str, column_name: str, masking_function, alias_name: str=None, rule_state=None, number_from: str=None, number_to: str=None, prefix_size: str=None, suffix_size: str=None, replacement_string: str=None, **kwargs) -> None: - super(DataMaskingRule, self).__init__(**kwargs) - self.data_masking_rule_id = None - self.alias_name = alias_name - self.rule_state = rule_state - self.schema_name = schema_name - self.table_name = table_name - self.column_name = column_name - self.masking_function = masking_function - self.number_from = number_from - self.number_to = number_to - self.prefix_size = prefix_size - self.suffix_size = suffix_size - self.replacement_string = replacement_string - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database.py deleted file mode 100644 index f3f66d024a7a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database.py +++ /dev/null @@ -1,237 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class Database(TrackedResource): - """A database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :ivar kind: Kind of database. This is metadata used for the Azure portal - experience. - :vartype kind: str - :ivar managed_by: Resource that manages the database. - :vartype managed_by: str - :param create_mode: Specifies the mode of database creation. - Default: regular database creation. - Copy: creates a database as a copy of an existing database. - sourceDatabaseId must be specified as the resource ID of the source - database. - Secondary: creates a database as a secondary replica of an existing - database. sourceDatabaseId must be specified as the resource ID of the - existing primary database. - PointInTimeRestore: Creates a database by restoring a point in time backup - of an existing database. sourceDatabaseId must be specified as the - resource ID of the existing database, and restorePointInTime must be - specified. - Recovery: Creates a database by restoring a geo-replicated backup. - sourceDatabaseId must be specified as the recoverable database resource ID - to restore. - Restore: Creates a database by restoring a backup of a deleted database. - sourceDatabaseId must be specified. If sourceDatabaseId is the database's - original resource ID, then sourceDatabaseDeletionDate must be specified. - Otherwise sourceDatabaseId must be the restorable dropped database - resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime - may also be specified to restore from an earlier point in time. - RestoreLongTermRetentionBackup: Creates a database by restoring from a - long term retention vault. recoveryServicesRecoveryPointResourceId must be - specified as the recovery point resource ID. - Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for - DataWarehouse edition. Possible values include: 'Default', 'Copy', - 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', - 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', - 'RestoreLongTermRetentionBackup', 'OnlineSecondary' - :type create_mode: str or ~azure.mgmt.sql.models.CreateMode - :param collation: The collation of the database. - :type collation: str - :param max_size_bytes: The max size of the database expressed in bytes. - :type max_size_bytes: long - :param sample_name: The name of the sample schema to apply when creating - this database. Possible values include: 'AdventureWorksLT', - 'WideWorldImportersStd', 'WideWorldImportersFull' - :type sample_name: str or ~azure.mgmt.sql.models.SampleName - :param elastic_pool_id: The resource identifier of the elastic pool - containing this database. - :type elastic_pool_id: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :ivar status: The status of the database. Possible values include: - 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', - 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', - 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', - 'Paused', 'Resuming', 'Scaling' - :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus - :ivar database_id: The ID of the database. - :vartype database_id: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar current_service_objective_name: The current service level objective - name of the database. - :vartype current_service_objective_name: str - :ivar requested_service_objective_name: The requested service level - objective name of the database. - :vartype requested_service_objective_name: str - :ivar default_secondary_location: The default secondary region for this - database. - :vartype default_secondary_location: str - :ivar failover_group_id: Failover Group resource identifier that this - database belongs to. - :vartype failover_group_id: str - :param restore_point_in_time: Specifies the point in time (ISO8601 format) - of the source database that will be restored to create the new database. - :type restore_point_in_time: datetime - :param source_database_deletion_date: Specifies the time that the database - was deleted. - :type source_database_deletion_date: datetime - :param recovery_services_recovery_point_id: The resource identifier of the - recovery point associated with create operation of this database. - :type recovery_services_recovery_point_id: str - :param long_term_retention_backup_resource_id: The resource identifier of - the long term retention backup associated with create operation of this - database. - :type long_term_retention_backup_resource_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param restorable_dropped_database_id: The resource identifier of the - restorable dropped database associated with create operation of this - database. - :type restorable_dropped_database_id: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param zone_redundant: Whether or not this database is zone redundant, - which means the replicas of this database will be spread across multiple - availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this database. Possible - values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType - :ivar max_log_size_bytes: The max log size for this database. - :vartype max_log_size_bytes: long - :ivar earliest_restore_date: This records the earliest start date and time - that restore is available for this database (ISO8601 format). - :vartype earliest_restore_date: datetime - :param read_scale: The state of read-only routing. If enabled, connections - that have application intent set to readonly in their connection string - may be routed to a readonly secondary replica in the same region. Possible - values include: 'Enabled', 'Disabled' - :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale - :ivar current_sku: The name and tier of the SKU. - :vartype current_sku: ~azure.mgmt.sql.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'managed_by': {'readonly': True}, - 'status': {'readonly': True}, - 'database_id': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'current_service_objective_name': {'readonly': True}, - 'requested_service_objective_name': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - 'max_log_size_bytes': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'current_sku': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, - 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, - 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, - 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, - 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, - 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs): - super(Database, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.kind = None - self.managed_by = None - self.create_mode = kwargs.get('create_mode', None) - self.collation = kwargs.get('collation', None) - self.max_size_bytes = kwargs.get('max_size_bytes', None) - self.sample_name = kwargs.get('sample_name', None) - self.elastic_pool_id = kwargs.get('elastic_pool_id', None) - self.source_database_id = kwargs.get('source_database_id', None) - self.status = None - self.database_id = None - self.creation_date = None - self.current_service_objective_name = None - self.requested_service_objective_name = None - self.default_secondary_location = None - self.failover_group_id = None - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.source_database_deletion_date = kwargs.get('source_database_deletion_date', None) - self.recovery_services_recovery_point_id = kwargs.get('recovery_services_recovery_point_id', None) - self.long_term_retention_backup_resource_id = kwargs.get('long_term_retention_backup_resource_id', None) - self.recoverable_database_id = kwargs.get('recoverable_database_id', None) - self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) - self.catalog_collation = kwargs.get('catalog_collation', None) - self.zone_redundant = kwargs.get('zone_redundant', None) - self.license_type = kwargs.get('license_type', None) - self.max_log_size_bytes = None - self.earliest_restore_date = None - self.read_scale = kwargs.get('read_scale', None) - self.current_sku = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning.py deleted file mode 100644 index eca56cffda2c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseAutomaticTuning(ProxyResource): - """Database-level Automatic Tuning. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param desired_state: Automatic tuning desired state. Possible values - include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode - :ivar actual_state: Automatic tuning actual state. Possible values - include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - :vartype actual_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode - :param options: Automatic tuning options definition. - :type options: dict[str, ~azure.mgmt.sql.models.AutomaticTuningOptions] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'actual_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningMode'}, - 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningMode'}, - 'options': {'key': 'properties.options', 'type': '{AutomaticTuningOptions}'}, - } - - def __init__(self, **kwargs): - super(DatabaseAutomaticTuning, self).__init__(**kwargs) - self.desired_state = kwargs.get('desired_state', None) - self.actual_state = None - self.options = kwargs.get('options', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning_py3.py deleted file mode 100644 index 86bb068ce54f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseAutomaticTuning(ProxyResource): - """Database-level Automatic Tuning. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param desired_state: Automatic tuning desired state. Possible values - include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode - :ivar actual_state: Automatic tuning actual state. Possible values - include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - :vartype actual_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode - :param options: Automatic tuning options definition. - :type options: dict[str, ~azure.mgmt.sql.models.AutomaticTuningOptions] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'actual_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningMode'}, - 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningMode'}, - 'options': {'key': 'properties.options', 'type': '{AutomaticTuningOptions}'}, - } - - def __init__(self, *, desired_state=None, options=None, **kwargs) -> None: - super(DatabaseAutomaticTuning, self).__init__(**kwargs) - self.desired_state = desired_state - self.actual_state = None - self.options = options diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy.py deleted file mode 100644 index 6db06ede30ad..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseBlobAuditingPolicy(ProxyResource): - """A database blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Resource kind. - :vartype kind: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DatabaseBlobAuditingPolicy, self).__init__(**kwargs) - self.kind = None - self.state = kwargs.get('state', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) - self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) - self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) - self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy_py3.py deleted file mode 100644 index 2acc43dae952..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy_py3.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseBlobAuditingPolicy(ProxyResource): - """A database blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Resource kind. - :vartype kind: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: - super(DatabaseBlobAuditingPolicy, self).__init__(**kwargs) - self.kind = None - self.state = state - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.audit_actions_and_groups = audit_actions_and_groups - self.storage_account_subscription_id = storage_account_subscription_id - self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use - self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation.py deleted file mode 100644 index fec6e0e19b64..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseOperation(ProxyResource): - """A database operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_name: The name of the database the operation is being - performed on. - :vartype database_name: str - :ivar operation: The name of operation. - :vartype operation: str - :ivar operation_friendly_name: The friendly name of operation. - :vartype operation_friendly_name: str - :ivar percent_complete: The percentage of the operation completed. - :vartype percent_complete: int - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar start_time: The operation start time. - :vartype start_time: datetime - :ivar state: The operation state. Possible values include: 'Pending', - 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', 'Cancelled' - :vartype state: str or ~azure.mgmt.sql.models.ManagementOperationState - :ivar error_code: The operation error code. - :vartype error_code: int - :ivar error_description: The operation error description. - :vartype error_description: str - :ivar error_severity: The operation error severity. - :vartype error_severity: int - :ivar is_user_error: Whether or not the error is a user error. - :vartype is_user_error: bool - :ivar estimated_completion_time: The estimated completion time of the - operation. - :vartype estimated_completion_time: datetime - :ivar description: The operation description. - :vartype description: str - :ivar is_cancellable: Whether the operation can be cancelled. - :vartype is_cancellable: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_name': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_friendly_name': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_description': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'is_user_error': {'readonly': True}, - 'estimated_completion_time': {'readonly': True}, - 'description': {'readonly': True}, - 'is_cancellable': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, - 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DatabaseOperation, self).__init__(**kwargs) - self.database_name = None - self.operation = None - self.operation_friendly_name = None - self.percent_complete = None - self.server_name = None - self.start_time = None - self.state = None - self.error_code = None - self.error_description = None - self.error_severity = None - self.is_user_error = None - self.estimated_completion_time = None - self.description = None - self.is_cancellable = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_paged.py deleted file mode 100644 index 4c22372df877..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseOperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`DatabaseOperation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseOperation]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseOperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_py3.py deleted file mode 100644 index 66fb0bb0c602..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_py3.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseOperation(ProxyResource): - """A database operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_name: The name of the database the operation is being - performed on. - :vartype database_name: str - :ivar operation: The name of operation. - :vartype operation: str - :ivar operation_friendly_name: The friendly name of operation. - :vartype operation_friendly_name: str - :ivar percent_complete: The percentage of the operation completed. - :vartype percent_complete: int - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar start_time: The operation start time. - :vartype start_time: datetime - :ivar state: The operation state. Possible values include: 'Pending', - 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', 'Cancelled' - :vartype state: str or ~azure.mgmt.sql.models.ManagementOperationState - :ivar error_code: The operation error code. - :vartype error_code: int - :ivar error_description: The operation error description. - :vartype error_description: str - :ivar error_severity: The operation error severity. - :vartype error_severity: int - :ivar is_user_error: Whether or not the error is a user error. - :vartype is_user_error: bool - :ivar estimated_completion_time: The estimated completion time of the - operation. - :vartype estimated_completion_time: datetime - :ivar description: The operation description. - :vartype description: str - :ivar is_cancellable: Whether the operation can be cancelled. - :vartype is_cancellable: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_name': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_friendly_name': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_description': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'is_user_error': {'readonly': True}, - 'estimated_completion_time': {'readonly': True}, - 'description': {'readonly': True}, - 'is_cancellable': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, - 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, - } - - def __init__(self, **kwargs) -> None: - super(DatabaseOperation, self).__init__(**kwargs) - self.database_name = None - self.operation = None - self.operation_friendly_name = None - self.percent_complete = None - self.server_name = None - self.start_time = None - self.state = None - self.error_code = None - self.error_description = None - self.error_severity = None - self.is_user_error = None - self.estimated_completion_time = None - self.description = None - self.is_cancellable = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_paged.py deleted file mode 100644 index bc3842934a39..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`Database ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Database]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py deleted file mode 100644 index 9cfb4d07a7e6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py +++ /dev/null @@ -1,237 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class Database(TrackedResource): - """A database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :ivar kind: Kind of database. This is metadata used for the Azure portal - experience. - :vartype kind: str - :ivar managed_by: Resource that manages the database. - :vartype managed_by: str - :param create_mode: Specifies the mode of database creation. - Default: regular database creation. - Copy: creates a database as a copy of an existing database. - sourceDatabaseId must be specified as the resource ID of the source - database. - Secondary: creates a database as a secondary replica of an existing - database. sourceDatabaseId must be specified as the resource ID of the - existing primary database. - PointInTimeRestore: Creates a database by restoring a point in time backup - of an existing database. sourceDatabaseId must be specified as the - resource ID of the existing database, and restorePointInTime must be - specified. - Recovery: Creates a database by restoring a geo-replicated backup. - sourceDatabaseId must be specified as the recoverable database resource ID - to restore. - Restore: Creates a database by restoring a backup of a deleted database. - sourceDatabaseId must be specified. If sourceDatabaseId is the database's - original resource ID, then sourceDatabaseDeletionDate must be specified. - Otherwise sourceDatabaseId must be the restorable dropped database - resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime - may also be specified to restore from an earlier point in time. - RestoreLongTermRetentionBackup: Creates a database by restoring from a - long term retention vault. recoveryServicesRecoveryPointResourceId must be - specified as the recovery point resource ID. - Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for - DataWarehouse edition. Possible values include: 'Default', 'Copy', - 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', - 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', - 'RestoreLongTermRetentionBackup', 'OnlineSecondary' - :type create_mode: str or ~azure.mgmt.sql.models.CreateMode - :param collation: The collation of the database. - :type collation: str - :param max_size_bytes: The max size of the database expressed in bytes. - :type max_size_bytes: long - :param sample_name: The name of the sample schema to apply when creating - this database. Possible values include: 'AdventureWorksLT', - 'WideWorldImportersStd', 'WideWorldImportersFull' - :type sample_name: str or ~azure.mgmt.sql.models.SampleName - :param elastic_pool_id: The resource identifier of the elastic pool - containing this database. - :type elastic_pool_id: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :ivar status: The status of the database. Possible values include: - 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', - 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', - 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', - 'Paused', 'Resuming', 'Scaling' - :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus - :ivar database_id: The ID of the database. - :vartype database_id: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar current_service_objective_name: The current service level objective - name of the database. - :vartype current_service_objective_name: str - :ivar requested_service_objective_name: The requested service level - objective name of the database. - :vartype requested_service_objective_name: str - :ivar default_secondary_location: The default secondary region for this - database. - :vartype default_secondary_location: str - :ivar failover_group_id: Failover Group resource identifier that this - database belongs to. - :vartype failover_group_id: str - :param restore_point_in_time: Specifies the point in time (ISO8601 format) - of the source database that will be restored to create the new database. - :type restore_point_in_time: datetime - :param source_database_deletion_date: Specifies the time that the database - was deleted. - :type source_database_deletion_date: datetime - :param recovery_services_recovery_point_id: The resource identifier of the - recovery point associated with create operation of this database. - :type recovery_services_recovery_point_id: str - :param long_term_retention_backup_resource_id: The resource identifier of - the long term retention backup associated with create operation of this - database. - :type long_term_retention_backup_resource_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param restorable_dropped_database_id: The resource identifier of the - restorable dropped database associated with create operation of this - database. - :type restorable_dropped_database_id: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param zone_redundant: Whether or not this database is zone redundant, - which means the replicas of this database will be spread across multiple - availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this database. Possible - values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType - :ivar max_log_size_bytes: The max log size for this database. - :vartype max_log_size_bytes: long - :ivar earliest_restore_date: This records the earliest start date and time - that restore is available for this database (ISO8601 format). - :vartype earliest_restore_date: datetime - :param read_scale: The state of read-only routing. If enabled, connections - that have application intent set to readonly in their connection string - may be routed to a readonly secondary replica in the same region. Possible - values include: 'Enabled', 'Disabled' - :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale - :ivar current_sku: The name and tier of the SKU. - :vartype current_sku: ~azure.mgmt.sql.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'managed_by': {'readonly': True}, - 'status': {'readonly': True}, - 'database_id': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'current_service_objective_name': {'readonly': True}, - 'requested_service_objective_name': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - 'max_log_size_bytes': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'current_sku': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, - 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, - 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, - 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, - 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, - 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, - } - - def __init__(self, *, location: str, tags=None, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, **kwargs) -> None: - super(Database, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.kind = None - self.managed_by = None - self.create_mode = create_mode - self.collation = collation - self.max_size_bytes = max_size_bytes - self.sample_name = sample_name - self.elastic_pool_id = elastic_pool_id - self.source_database_id = source_database_id - self.status = None - self.database_id = None - self.creation_date = None - self.current_service_objective_name = None - self.requested_service_objective_name = None - self.default_secondary_location = None - self.failover_group_id = None - self.restore_point_in_time = restore_point_in_time - self.source_database_deletion_date = source_database_deletion_date - self.recovery_services_recovery_point_id = recovery_services_recovery_point_id - self.long_term_retention_backup_resource_id = long_term_retention_backup_resource_id - self.recoverable_database_id = recoverable_database_id - self.restorable_dropped_database_id = restorable_dropped_database_id - self.catalog_collation = catalog_collation - self.zone_redundant = zone_redundant - self.license_type = license_type - self.max_log_size_bytes = None - self.earliest_restore_date = None - self.read_scale = read_scale - self.current_sku = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy.py deleted file mode 100644 index c425573a5a91..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseSecurityAlertPolicy(ProxyResource): - """Contains information about a database Threat Detection policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar kind: Resource kind. - :vartype kind: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint and storageAccountAccessKey are required. - Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies the semicolon-separated list of alerts - that are disabled, or empty string to disable no alerts. Possible values: - Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; - Data_Exfiltration; Unsafe_Action. - :type disabled_alerts: str - :param email_addresses: Specifies the semicolon-separated list of e-mail - addresses to which the alert is sent. - :type email_addresses: str - :param email_account_admins: Specifies that the alert is sent to the - account administrators. Possible values include: 'Enabled', 'Disabled' - :type email_account_admins: str or - ~azure.mgmt.sql.models.SecurityAlertPolicyEmailAccountAdmins - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. If state is Enabled, storageEndpoint is - required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. If state is Enabled, - storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :param use_server_default: Specifies whether to use the default server - policy. Possible values include: 'Enabled', 'Disabled' - :type use_server_default: str or - ~azure.mgmt.sql.models.SecurityAlertPolicyUseServerDefault - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': 'str'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': 'str'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'SecurityAlertPolicyEmailAccountAdmins'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'use_server_default': {'key': 'properties.useServerDefault', 'type': 'SecurityAlertPolicyUseServerDefault'}, - } - - def __init__(self, **kwargs): - super(DatabaseSecurityAlertPolicy, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.kind = None - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.use_server_default = kwargs.get('use_server_default', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy_py3.py deleted file mode 100644 index 3d85e01a6635..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy_py3.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseSecurityAlertPolicy(ProxyResource): - """Contains information about a database Threat Detection policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar kind: Resource kind. - :vartype kind: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint and storageAccountAccessKey are required. - Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies the semicolon-separated list of alerts - that are disabled, or empty string to disable no alerts. Possible values: - Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; - Data_Exfiltration; Unsafe_Action. - :type disabled_alerts: str - :param email_addresses: Specifies the semicolon-separated list of e-mail - addresses to which the alert is sent. - :type email_addresses: str - :param email_account_admins: Specifies that the alert is sent to the - account administrators. Possible values include: 'Enabled', 'Disabled' - :type email_account_admins: str or - ~azure.mgmt.sql.models.SecurityAlertPolicyEmailAccountAdmins - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. If state is Enabled, storageEndpoint is - required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. If state is Enabled, - storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :param use_server_default: Specifies whether to use the default server - policy. Possible values include: 'Enabled', 'Disabled' - :type use_server_default: str or - ~azure.mgmt.sql.models.SecurityAlertPolicyUseServerDefault - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': 'str'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': 'str'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'SecurityAlertPolicyEmailAccountAdmins'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'use_server_default': {'key': 'properties.useServerDefault', 'type': 'SecurityAlertPolicyUseServerDefault'}, - } - - def __init__(self, *, state, location: str=None, disabled_alerts: str=None, email_addresses: str=None, email_account_admins=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, use_server_default=None, **kwargs) -> None: - super(DatabaseSecurityAlertPolicy, self).__init__(**kwargs) - self.location = location - self.kind = None - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.use_server_default = use_server_default diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update.py deleted file mode 100644 index d4d4cbdf4270..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update.py +++ /dev/null @@ -1,209 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseUpdate(Model): - """A database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :param create_mode: Specifies the mode of database creation. - Default: regular database creation. - Copy: creates a database as a copy of an existing database. - sourceDatabaseId must be specified as the resource ID of the source - database. - Secondary: creates a database as a secondary replica of an existing - database. sourceDatabaseId must be specified as the resource ID of the - existing primary database. - PointInTimeRestore: Creates a database by restoring a point in time backup - of an existing database. sourceDatabaseId must be specified as the - resource ID of the existing database, and restorePointInTime must be - specified. - Recovery: Creates a database by restoring a geo-replicated backup. - sourceDatabaseId must be specified as the recoverable database resource ID - to restore. - Restore: Creates a database by restoring a backup of a deleted database. - sourceDatabaseId must be specified. If sourceDatabaseId is the database's - original resource ID, then sourceDatabaseDeletionDate must be specified. - Otherwise sourceDatabaseId must be the restorable dropped database - resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime - may also be specified to restore from an earlier point in time. - RestoreLongTermRetentionBackup: Creates a database by restoring from a - long term retention vault. recoveryServicesRecoveryPointResourceId must be - specified as the recovery point resource ID. - Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for - DataWarehouse edition. Possible values include: 'Default', 'Copy', - 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', - 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', - 'RestoreLongTermRetentionBackup', 'OnlineSecondary' - :type create_mode: str or ~azure.mgmt.sql.models.CreateMode - :param collation: The collation of the database. - :type collation: str - :param max_size_bytes: The max size of the database expressed in bytes. - :type max_size_bytes: long - :param sample_name: The name of the sample schema to apply when creating - this database. Possible values include: 'AdventureWorksLT', - 'WideWorldImportersStd', 'WideWorldImportersFull' - :type sample_name: str or ~azure.mgmt.sql.models.SampleName - :param elastic_pool_id: The resource identifier of the elastic pool - containing this database. - :type elastic_pool_id: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :ivar status: The status of the database. Possible values include: - 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', - 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', - 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', - 'Paused', 'Resuming', 'Scaling' - :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus - :ivar database_id: The ID of the database. - :vartype database_id: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar current_service_objective_name: The current service level objective - name of the database. - :vartype current_service_objective_name: str - :ivar requested_service_objective_name: The requested service level - objective name of the database. - :vartype requested_service_objective_name: str - :ivar default_secondary_location: The default secondary region for this - database. - :vartype default_secondary_location: str - :ivar failover_group_id: Failover Group resource identifier that this - database belongs to. - :vartype failover_group_id: str - :param restore_point_in_time: Specifies the point in time (ISO8601 format) - of the source database that will be restored to create the new database. - :type restore_point_in_time: datetime - :param source_database_deletion_date: Specifies the time that the database - was deleted. - :type source_database_deletion_date: datetime - :param recovery_services_recovery_point_id: The resource identifier of the - recovery point associated with create operation of this database. - :type recovery_services_recovery_point_id: str - :param long_term_retention_backup_resource_id: The resource identifier of - the long term retention backup associated with create operation of this - database. - :type long_term_retention_backup_resource_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param restorable_dropped_database_id: The resource identifier of the - restorable dropped database associated with create operation of this - database. - :type restorable_dropped_database_id: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param zone_redundant: Whether or not this database is zone redundant, - which means the replicas of this database will be spread across multiple - availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this database. Possible - values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType - :ivar max_log_size_bytes: The max log size for this database. - :vartype max_log_size_bytes: long - :ivar earliest_restore_date: This records the earliest start date and time - that restore is available for this database (ISO8601 format). - :vartype earliest_restore_date: datetime - :param read_scale: The state of read-only routing. If enabled, connections - that have application intent set to readonly in their connection string - may be routed to a readonly secondary replica in the same region. Possible - values include: 'Enabled', 'Disabled' - :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale - :ivar current_sku: The name and tier of the SKU. - :vartype current_sku: ~azure.mgmt.sql.models.Sku - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'status': {'readonly': True}, - 'database_id': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'current_service_objective_name': {'readonly': True}, - 'requested_service_objective_name': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - 'max_log_size_bytes': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'current_sku': {'readonly': True}, - } - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, - 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, - 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, - 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, - 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, - 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(DatabaseUpdate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.create_mode = kwargs.get('create_mode', None) - self.collation = kwargs.get('collation', None) - self.max_size_bytes = kwargs.get('max_size_bytes', None) - self.sample_name = kwargs.get('sample_name', None) - self.elastic_pool_id = kwargs.get('elastic_pool_id', None) - self.source_database_id = kwargs.get('source_database_id', None) - self.status = None - self.database_id = None - self.creation_date = None - self.current_service_objective_name = None - self.requested_service_objective_name = None - self.default_secondary_location = None - self.failover_group_id = None - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.source_database_deletion_date = kwargs.get('source_database_deletion_date', None) - self.recovery_services_recovery_point_id = kwargs.get('recovery_services_recovery_point_id', None) - self.long_term_retention_backup_resource_id = kwargs.get('long_term_retention_backup_resource_id', None) - self.recoverable_database_id = kwargs.get('recoverable_database_id', None) - self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) - self.catalog_collation = kwargs.get('catalog_collation', None) - self.zone_redundant = kwargs.get('zone_redundant', None) - self.license_type = kwargs.get('license_type', None) - self.max_log_size_bytes = None - self.earliest_restore_date = None - self.read_scale = kwargs.get('read_scale', None) - self.current_sku = None - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update_py3.py deleted file mode 100644 index 5a9a6f3b742d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update_py3.py +++ /dev/null @@ -1,209 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseUpdate(Model): - """A database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :param create_mode: Specifies the mode of database creation. - Default: regular database creation. - Copy: creates a database as a copy of an existing database. - sourceDatabaseId must be specified as the resource ID of the source - database. - Secondary: creates a database as a secondary replica of an existing - database. sourceDatabaseId must be specified as the resource ID of the - existing primary database. - PointInTimeRestore: Creates a database by restoring a point in time backup - of an existing database. sourceDatabaseId must be specified as the - resource ID of the existing database, and restorePointInTime must be - specified. - Recovery: Creates a database by restoring a geo-replicated backup. - sourceDatabaseId must be specified as the recoverable database resource ID - to restore. - Restore: Creates a database by restoring a backup of a deleted database. - sourceDatabaseId must be specified. If sourceDatabaseId is the database's - original resource ID, then sourceDatabaseDeletionDate must be specified. - Otherwise sourceDatabaseId must be the restorable dropped database - resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime - may also be specified to restore from an earlier point in time. - RestoreLongTermRetentionBackup: Creates a database by restoring from a - long term retention vault. recoveryServicesRecoveryPointResourceId must be - specified as the recovery point resource ID. - Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for - DataWarehouse edition. Possible values include: 'Default', 'Copy', - 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', - 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', - 'RestoreLongTermRetentionBackup', 'OnlineSecondary' - :type create_mode: str or ~azure.mgmt.sql.models.CreateMode - :param collation: The collation of the database. - :type collation: str - :param max_size_bytes: The max size of the database expressed in bytes. - :type max_size_bytes: long - :param sample_name: The name of the sample schema to apply when creating - this database. Possible values include: 'AdventureWorksLT', - 'WideWorldImportersStd', 'WideWorldImportersFull' - :type sample_name: str or ~azure.mgmt.sql.models.SampleName - :param elastic_pool_id: The resource identifier of the elastic pool - containing this database. - :type elastic_pool_id: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :ivar status: The status of the database. Possible values include: - 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', - 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', - 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', - 'Paused', 'Resuming', 'Scaling' - :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus - :ivar database_id: The ID of the database. - :vartype database_id: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar current_service_objective_name: The current service level objective - name of the database. - :vartype current_service_objective_name: str - :ivar requested_service_objective_name: The requested service level - objective name of the database. - :vartype requested_service_objective_name: str - :ivar default_secondary_location: The default secondary region for this - database. - :vartype default_secondary_location: str - :ivar failover_group_id: Failover Group resource identifier that this - database belongs to. - :vartype failover_group_id: str - :param restore_point_in_time: Specifies the point in time (ISO8601 format) - of the source database that will be restored to create the new database. - :type restore_point_in_time: datetime - :param source_database_deletion_date: Specifies the time that the database - was deleted. - :type source_database_deletion_date: datetime - :param recovery_services_recovery_point_id: The resource identifier of the - recovery point associated with create operation of this database. - :type recovery_services_recovery_point_id: str - :param long_term_retention_backup_resource_id: The resource identifier of - the long term retention backup associated with create operation of this - database. - :type long_term_retention_backup_resource_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param restorable_dropped_database_id: The resource identifier of the - restorable dropped database associated with create operation of this - database. - :type restorable_dropped_database_id: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param zone_redundant: Whether or not this database is zone redundant, - which means the replicas of this database will be spread across multiple - availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this database. Possible - values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType - :ivar max_log_size_bytes: The max log size for this database. - :vartype max_log_size_bytes: long - :ivar earliest_restore_date: This records the earliest start date and time - that restore is available for this database (ISO8601 format). - :vartype earliest_restore_date: datetime - :param read_scale: The state of read-only routing. If enabled, connections - that have application intent set to readonly in their connection string - may be routed to a readonly secondary replica in the same region. Possible - values include: 'Enabled', 'Disabled' - :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale - :ivar current_sku: The name and tier of the SKU. - :vartype current_sku: ~azure.mgmt.sql.models.Sku - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'status': {'readonly': True}, - 'database_id': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'current_service_objective_name': {'readonly': True}, - 'requested_service_objective_name': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - 'max_log_size_bytes': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'current_sku': {'readonly': True}, - } - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, - 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, - 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, - 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, - 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, - 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, tags=None, **kwargs) -> None: - super(DatabaseUpdate, self).__init__(**kwargs) - self.sku = sku - self.create_mode = create_mode - self.collation = collation - self.max_size_bytes = max_size_bytes - self.sample_name = sample_name - self.elastic_pool_id = elastic_pool_id - self.source_database_id = source_database_id - self.status = None - self.database_id = None - self.creation_date = None - self.current_service_objective_name = None - self.requested_service_objective_name = None - self.default_secondary_location = None - self.failover_group_id = None - self.restore_point_in_time = restore_point_in_time - self.source_database_deletion_date = source_database_deletion_date - self.recovery_services_recovery_point_id = recovery_services_recovery_point_id - self.long_term_retention_backup_resource_id = long_term_retention_backup_resource_id - self.recoverable_database_id = recoverable_database_id - self.restorable_dropped_database_id = restorable_dropped_database_id - self.catalog_collation = catalog_collation - self.zone_redundant = zone_redundant - self.license_type = license_type - self.max_log_size_bytes = None - self.earliest_restore_date = None - self.read_scale = read_scale - self.current_sku = None - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage.py deleted file mode 100644 index 948942f56124..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseUsage(Model): - """The database usages. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the usage metric. - :vartype name: str - :ivar resource_name: The name of the resource. - :vartype resource_name: str - :ivar display_name: The usage metric display name. - :vartype display_name: str - :ivar current_value: The current value of the usage metric. - :vartype current_value: float - :ivar limit: The current limit of the usage metric. - :vartype limit: float - :ivar unit: The units of the usage metric. - :vartype unit: str - :ivar next_reset_time: The next reset time for the usage metric (ISO8601 - format). - :vartype next_reset_time: datetime - """ - - _validation = { - 'name': {'readonly': True}, - 'resource_name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'next_reset_time': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_name': {'key': 'resourceName', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(DatabaseUsage, self).__init__(**kwargs) - self.name = None - self.resource_name = None - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None - self.next_reset_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_paged.py deleted file mode 100644 index 9641161225df..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseUsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`DatabaseUsage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseUsage]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseUsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_py3.py deleted file mode 100644 index 46a0f5ca4ba9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseUsage(Model): - """The database usages. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the usage metric. - :vartype name: str - :ivar resource_name: The name of the resource. - :vartype resource_name: str - :ivar display_name: The usage metric display name. - :vartype display_name: str - :ivar current_value: The current value of the usage metric. - :vartype current_value: float - :ivar limit: The current limit of the usage metric. - :vartype limit: float - :ivar unit: The units of the usage metric. - :vartype unit: str - :ivar next_reset_time: The next reset time for the usage metric (ISO8601 - format). - :vartype next_reset_time: datetime - """ - - _validation = { - 'name': {'readonly': True}, - 'resource_name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'next_reset_time': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_name': {'key': 'resourceName', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(DatabaseUsage, self).__init__(**kwargs) - self.name = None - self.resource_name = None - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None - self.next_reset_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment.py deleted file mode 100644 index b4fbd42f864b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseVulnerabilityAssessment(ProxyResource): - """A database vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: A blob storage container path to hold the - scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It - is required if server level vulnerability assessment policy doesn't set - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _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'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, **kwargs): - super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = kwargs.get('storage_container_path', None) - self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.recurring_scans = kwargs.get('recurring_scans', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_paged.py deleted file mode 100644 index 8ec2fe4eae5f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseVulnerabilityAssessmentPaged(Paged): - """ - A paging container for iterating over a list of :class:`DatabaseVulnerabilityAssessment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseVulnerabilityAssessment]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_py3.py deleted file mode 100644 index e0d54f6105f1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseVulnerabilityAssessment(ProxyResource): - """A database vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: A blob storage container path to hold the - scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It - is required if server level vulnerability assessment policy doesn't set - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _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'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, *, storage_container_path: str=None, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: - super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = storage_container_path - self.storage_container_sas_key = storage_container_sas_key - self.storage_account_access_key = storage_account_access_key - self.recurring_scans = recurring_scans diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline.py deleted file mode 100644 index 66881dfb9b5c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseVulnerabilityAssessmentRuleBaseline(ProxyResource): - """A database vulnerability assessment rule baseline. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param baseline_results: Required. The rule baseline result - :type baseline_results: - list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'baseline_results': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'baseline_results': {'key': 'properties.baselineResults', 'type': '[DatabaseVulnerabilityAssessmentRuleBaselineItem]'}, - } - - def __init__(self, **kwargs): - super(DatabaseVulnerabilityAssessmentRuleBaseline, self).__init__(**kwargs) - self.baseline_results = kwargs.get('baseline_results', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item.py deleted file mode 100644 index 4bd7d0e16f52..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseVulnerabilityAssessmentRuleBaselineItem(Model): - """Properties for an Azure SQL Database Vulnerability Assessment rule - baseline's result. - - All required parameters must be populated in order to send to Azure. - - :param result: Required. The rule baseline result - :type result: list[str] - """ - - _validation = { - 'result': {'required': True}, - } - - _attribute_map = { - 'result': {'key': 'result', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(DatabaseVulnerabilityAssessmentRuleBaselineItem, self).__init__(**kwargs) - self.result = kwargs.get('result', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py deleted file mode 100644 index 9378a89cc0f0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseVulnerabilityAssessmentRuleBaselineItem(Model): - """Properties for an Azure SQL Database Vulnerability Assessment rule - baseline's result. - - All required parameters must be populated in order to send to Azure. - - :param result: Required. The rule baseline result - :type result: list[str] - """ - - _validation = { - 'result': {'required': True}, - } - - _attribute_map = { - 'result': {'key': 'result', 'type': '[str]'}, - } - - def __init__(self, *, result, **kwargs) -> None: - super(DatabaseVulnerabilityAssessmentRuleBaselineItem, self).__init__(**kwargs) - self.result = result diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_py3.py deleted file mode 100644 index 4997c258c475..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseVulnerabilityAssessmentRuleBaseline(ProxyResource): - """A database vulnerability assessment rule baseline. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param baseline_results: Required. The rule baseline result - :type baseline_results: - list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'baseline_results': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'baseline_results': {'key': 'properties.baselineResults', 'type': '[DatabaseVulnerabilityAssessmentRuleBaselineItem]'}, - } - - def __init__(self, *, baseline_results, **kwargs) -> None: - super(DatabaseVulnerabilityAssessmentRuleBaseline, self).__init__(**kwargs) - self.baseline_results = baseline_results diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export.py deleted file mode 100644 index 4d088fd265c0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseVulnerabilityAssessmentScansExport(ProxyResource): - """A database Vulnerability Assessment scan export resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar exported_report_location: Location of the exported report (e.g. - https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). - :vartype exported_report_location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'exported_report_location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs) - self.exported_report_location = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export_py3.py deleted file mode 100644 index 7e925fb428ce..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseVulnerabilityAssessmentScansExport(ProxyResource): - """A database Vulnerability Assessment scan export resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar exported_report_location: Location of the exported report (e.g. - https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). - :vartype exported_report_location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'exported_report_location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs) - self.exported_report_location = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability.py deleted file mode 100644 index e2b212e365b0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EditionCapability(Model): - """The edition capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The database edition name. - :vartype name: str - :ivar supported_service_level_objectives: The list of supported service - objectives for the edition. - :vartype supported_service_level_objectives: - list[~azure.mgmt.sql.models.ServiceObjectiveCapability] - :ivar zone_redundant: Whether or not zone redundancy is supported for the - edition. - :vartype zone_redundant: bool - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_service_level_objectives': {'readonly': True}, - 'zone_redundant': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_service_level_objectives': {'key': 'supportedServiceLevelObjectives', 'type': '[ServiceObjectiveCapability]'}, - 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_service_level_objectives = None - self.zone_redundant = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability_py3.py deleted file mode 100644 index e2eaad22c5d5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EditionCapability(Model): - """The edition capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The database edition name. - :vartype name: str - :ivar supported_service_level_objectives: The list of supported service - objectives for the edition. - :vartype supported_service_level_objectives: - list[~azure.mgmt.sql.models.ServiceObjectiveCapability] - :ivar zone_redundant: Whether or not zone redundancy is supported for the - edition. - :vartype zone_redundant: bool - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_service_level_objectives': {'readonly': True}, - 'zone_redundant': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_service_level_objectives': {'key': 'supportedServiceLevelObjectives', 'type': '[ServiceObjectiveCapability]'}, - 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(EditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_service_level_objectives = None - self.zone_redundant = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py deleted file mode 100644 index 10a28ea0f6e3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class ElasticPool(TrackedResource): - """An elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.sql.models.Sku - :ivar kind: Kind of elastic pool. This is metadata used for the Azure - portal experience. - :vartype kind: str - :ivar state: The state of the elastic pool. Possible values include: - 'Creating', 'Ready', 'Disabled' - :vartype state: str or ~azure.mgmt.sql.models.ElasticPoolState - :ivar creation_date: The creation date of the elastic pool (ISO8601 - format). - :vartype creation_date: datetime - :param max_size_bytes: The storage limit for the database elastic pool in - bytes. - :type max_size_bytes: long - :param per_database_settings: The per database settings for the elastic - pool. - :type per_database_settings: - ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings - :param zone_redundant: Whether or not this elastic pool is zone redundant, - which means the replicas of this elastic pool will be spread across - multiple availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this elastic pool. - Possible values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'state': {'readonly': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPool, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.kind = None - self.state = None - self.creation_date = None - self.max_size_bytes = kwargs.get('max_size_bytes', None) - self.per_database_settings = kwargs.get('per_database_settings', None) - self.zone_redundant = kwargs.get('zone_redundant', None) - self.license_type = kwargs.get('license_type', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity.py deleted file mode 100644 index 30c56a11077d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ElasticPoolActivity(ProxyResource): - """Represents the activity on an elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar end_time: The time the operation finished (ISO8601 format). - :vartype end_time: datetime - :ivar error_code: The error code if available. - :vartype error_code: int - :ivar error_message: The error message if available. - :vartype error_message: str - :ivar error_severity: The error severity if available. - :vartype error_severity: int - :ivar operation: The operation name. - :vartype operation: str - :ivar operation_id: The unique operation ID. - :vartype operation_id: str - :ivar percent_complete: The percentage complete if available. - :vartype percent_complete: int - :ivar requested_database_dtu_max: The requested max DTU per database if - available. - :vartype requested_database_dtu_max: int - :ivar requested_database_dtu_min: The requested min DTU per database if - available. - :vartype requested_database_dtu_min: int - :ivar requested_dtu: The requested DTU for the pool if available. - :vartype requested_dtu: int - :ivar requested_elastic_pool_name: The requested name for the elastic pool - if available. - :vartype requested_elastic_pool_name: str - :ivar requested_storage_limit_in_gb: The requested storage limit for the - pool in GB if available. - :vartype requested_storage_limit_in_gb: long - :ivar elastic_pool_name: The name of the elastic pool. - :vartype elastic_pool_name: str - :ivar server_name: The name of the server the elastic pool is in. - :vartype server_name: str - :ivar start_time: The time the operation started (ISO8601 format). - :vartype start_time: datetime - :ivar state: The current state of the operation. - :vartype state: str - :ivar requested_storage_limit_in_mb: The requested storage limit in MB. - :vartype requested_storage_limit_in_mb: int - :ivar requested_database_dtu_guarantee: The requested per database DTU - guarantee. - :vartype requested_database_dtu_guarantee: int - :ivar requested_database_dtu_cap: The requested per database DTU cap. - :vartype requested_database_dtu_cap: int - :ivar requested_dtu_guarantee: The requested DTU guarantee. - :vartype requested_dtu_guarantee: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_message': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_id': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'requested_database_dtu_max': {'readonly': True}, - 'requested_database_dtu_min': {'readonly': True}, - 'requested_dtu': {'readonly': True}, - 'requested_elastic_pool_name': {'readonly': True}, - 'requested_storage_limit_in_gb': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'requested_storage_limit_in_mb': {'readonly': True}, - 'requested_database_dtu_guarantee': {'readonly': True}, - 'requested_database_dtu_cap': {'readonly': True}, - 'requested_dtu_guarantee': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'requested_database_dtu_max': {'key': 'properties.requestedDatabaseDtuMax', 'type': 'int'}, - 'requested_database_dtu_min': {'key': 'properties.requestedDatabaseDtuMin', 'type': 'int'}, - 'requested_dtu': {'key': 'properties.requestedDtu', 'type': 'int'}, - 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, - 'requested_storage_limit_in_gb': {'key': 'properties.requestedStorageLimitInGB', 'type': 'long'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'requested_storage_limit_in_mb': {'key': 'properties.requestedStorageLimitInMB', 'type': 'int'}, - 'requested_database_dtu_guarantee': {'key': 'properties.requestedDatabaseDtuGuarantee', 'type': 'int'}, - 'requested_database_dtu_cap': {'key': 'properties.requestedDatabaseDtuCap', 'type': 'int'}, - 'requested_dtu_guarantee': {'key': 'properties.requestedDtuGuarantee', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolActivity, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.end_time = None - self.error_code = None - self.error_message = None - self.error_severity = None - self.operation = None - self.operation_id = None - self.percent_complete = None - self.requested_database_dtu_max = None - self.requested_database_dtu_min = None - self.requested_dtu = None - self.requested_elastic_pool_name = None - self.requested_storage_limit_in_gb = None - self.elastic_pool_name = None - self.server_name = None - self.start_time = None - self.state = None - self.requested_storage_limit_in_mb = None - self.requested_database_dtu_guarantee = None - self.requested_database_dtu_cap = None - self.requested_dtu_guarantee = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_paged.py deleted file mode 100644 index 729a44a94bb5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ElasticPoolActivityPaged(Paged): - """ - A paging container for iterating over a list of :class:`ElasticPoolActivity ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ElasticPoolActivity]'} - } - - def __init__(self, *args, **kwargs): - - super(ElasticPoolActivityPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_py3.py deleted file mode 100644 index 5d8d4f61727a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_py3.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ElasticPoolActivity(ProxyResource): - """Represents the activity on an elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar end_time: The time the operation finished (ISO8601 format). - :vartype end_time: datetime - :ivar error_code: The error code if available. - :vartype error_code: int - :ivar error_message: The error message if available. - :vartype error_message: str - :ivar error_severity: The error severity if available. - :vartype error_severity: int - :ivar operation: The operation name. - :vartype operation: str - :ivar operation_id: The unique operation ID. - :vartype operation_id: str - :ivar percent_complete: The percentage complete if available. - :vartype percent_complete: int - :ivar requested_database_dtu_max: The requested max DTU per database if - available. - :vartype requested_database_dtu_max: int - :ivar requested_database_dtu_min: The requested min DTU per database if - available. - :vartype requested_database_dtu_min: int - :ivar requested_dtu: The requested DTU for the pool if available. - :vartype requested_dtu: int - :ivar requested_elastic_pool_name: The requested name for the elastic pool - if available. - :vartype requested_elastic_pool_name: str - :ivar requested_storage_limit_in_gb: The requested storage limit for the - pool in GB if available. - :vartype requested_storage_limit_in_gb: long - :ivar elastic_pool_name: The name of the elastic pool. - :vartype elastic_pool_name: str - :ivar server_name: The name of the server the elastic pool is in. - :vartype server_name: str - :ivar start_time: The time the operation started (ISO8601 format). - :vartype start_time: datetime - :ivar state: The current state of the operation. - :vartype state: str - :ivar requested_storage_limit_in_mb: The requested storage limit in MB. - :vartype requested_storage_limit_in_mb: int - :ivar requested_database_dtu_guarantee: The requested per database DTU - guarantee. - :vartype requested_database_dtu_guarantee: int - :ivar requested_database_dtu_cap: The requested per database DTU cap. - :vartype requested_database_dtu_cap: int - :ivar requested_dtu_guarantee: The requested DTU guarantee. - :vartype requested_dtu_guarantee: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_message': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_id': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'requested_database_dtu_max': {'readonly': True}, - 'requested_database_dtu_min': {'readonly': True}, - 'requested_dtu': {'readonly': True}, - 'requested_elastic_pool_name': {'readonly': True}, - 'requested_storage_limit_in_gb': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'requested_storage_limit_in_mb': {'readonly': True}, - 'requested_database_dtu_guarantee': {'readonly': True}, - 'requested_database_dtu_cap': {'readonly': True}, - 'requested_dtu_guarantee': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'requested_database_dtu_max': {'key': 'properties.requestedDatabaseDtuMax', 'type': 'int'}, - 'requested_database_dtu_min': {'key': 'properties.requestedDatabaseDtuMin', 'type': 'int'}, - 'requested_dtu': {'key': 'properties.requestedDtu', 'type': 'int'}, - 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, - 'requested_storage_limit_in_gb': {'key': 'properties.requestedStorageLimitInGB', 'type': 'long'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'requested_storage_limit_in_mb': {'key': 'properties.requestedStorageLimitInMB', 'type': 'int'}, - 'requested_database_dtu_guarantee': {'key': 'properties.requestedDatabaseDtuGuarantee', 'type': 'int'}, - 'requested_database_dtu_cap': {'key': 'properties.requestedDatabaseDtuCap', 'type': 'int'}, - 'requested_dtu_guarantee': {'key': 'properties.requestedDtuGuarantee', 'type': 'int'}, - } - - def __init__(self, *, location: str=None, **kwargs) -> None: - super(ElasticPoolActivity, self).__init__(**kwargs) - self.location = location - self.end_time = None - self.error_code = None - self.error_message = None - self.error_severity = None - self.operation = None - self.operation_id = None - self.percent_complete = None - self.requested_database_dtu_max = None - self.requested_database_dtu_min = None - self.requested_dtu = None - self.requested_elastic_pool_name = None - self.requested_storage_limit_in_gb = None - self.elastic_pool_name = None - self.server_name = None - self.start_time = None - self.state = None - self.requested_storage_limit_in_mb = None - self.requested_database_dtu_guarantee = None - self.requested_database_dtu_cap = None - self.requested_dtu_guarantee = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity.py deleted file mode 100644 index 9427b6973ff9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity.py +++ /dev/null @@ -1,125 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ElasticPoolDatabaseActivity(ProxyResource): - """Represents the activity on an elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar database_name: The database name. - :vartype database_name: str - :ivar end_time: The time the operation finished (ISO8601 format). - :vartype end_time: datetime - :ivar error_code: The error code if available. - :vartype error_code: int - :ivar error_message: The error message if available. - :vartype error_message: str - :ivar error_severity: The error severity if available. - :vartype error_severity: int - :ivar operation: The operation name. - :vartype operation: str - :ivar operation_id: The unique operation ID. - :vartype operation_id: str - :ivar percent_complete: The percentage complete if available. - :vartype percent_complete: int - :ivar requested_elastic_pool_name: The name for the elastic pool the - database is moving into if available. - :vartype requested_elastic_pool_name: str - :ivar current_elastic_pool_name: The name of the current elastic pool the - database is in if available. - :vartype current_elastic_pool_name: str - :ivar current_service_objective: The name of the current service objective - if available. - :vartype current_service_objective: str - :ivar requested_service_objective: The name of the requested service - objective if available. - :vartype requested_service_objective: str - :ivar server_name: The name of the server the elastic pool is in. - :vartype server_name: str - :ivar start_time: The time the operation started (ISO8601 format). - :vartype start_time: datetime - :ivar state: The current state of the operation. - :vartype state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_name': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_message': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_id': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'requested_elastic_pool_name': {'readonly': True}, - 'current_elastic_pool_name': {'readonly': True}, - 'current_service_objective': {'readonly': True}, - 'requested_service_objective': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, - 'current_elastic_pool_name': {'key': 'properties.currentElasticPoolName', 'type': 'str'}, - 'current_service_objective': {'key': 'properties.currentServiceObjective', 'type': 'str'}, - 'requested_service_objective': {'key': 'properties.requestedServiceObjective', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolDatabaseActivity, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.database_name = None - self.end_time = None - self.error_code = None - self.error_message = None - self.error_severity = None - self.operation = None - self.operation_id = None - self.percent_complete = None - self.requested_elastic_pool_name = None - self.current_elastic_pool_name = None - self.current_service_objective = None - self.requested_service_objective = None - self.server_name = None - self.start_time = None - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_paged.py deleted file mode 100644 index e4d12fc20b4a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ElasticPoolDatabaseActivityPaged(Paged): - """ - A paging container for iterating over a list of :class:`ElasticPoolDatabaseActivity ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ElasticPoolDatabaseActivity]'} - } - - def __init__(self, *args, **kwargs): - - super(ElasticPoolDatabaseActivityPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_py3.py deleted file mode 100644 index 2e2818eee69a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_py3.py +++ /dev/null @@ -1,125 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ElasticPoolDatabaseActivity(ProxyResource): - """Represents the activity on an elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar database_name: The database name. - :vartype database_name: str - :ivar end_time: The time the operation finished (ISO8601 format). - :vartype end_time: datetime - :ivar error_code: The error code if available. - :vartype error_code: int - :ivar error_message: The error message if available. - :vartype error_message: str - :ivar error_severity: The error severity if available. - :vartype error_severity: int - :ivar operation: The operation name. - :vartype operation: str - :ivar operation_id: The unique operation ID. - :vartype operation_id: str - :ivar percent_complete: The percentage complete if available. - :vartype percent_complete: int - :ivar requested_elastic_pool_name: The name for the elastic pool the - database is moving into if available. - :vartype requested_elastic_pool_name: str - :ivar current_elastic_pool_name: The name of the current elastic pool the - database is in if available. - :vartype current_elastic_pool_name: str - :ivar current_service_objective: The name of the current service objective - if available. - :vartype current_service_objective: str - :ivar requested_service_objective: The name of the requested service - objective if available. - :vartype requested_service_objective: str - :ivar server_name: The name of the server the elastic pool is in. - :vartype server_name: str - :ivar start_time: The time the operation started (ISO8601 format). - :vartype start_time: datetime - :ivar state: The current state of the operation. - :vartype state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_name': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_message': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_id': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'requested_elastic_pool_name': {'readonly': True}, - 'current_elastic_pool_name': {'readonly': True}, - 'current_service_objective': {'readonly': True}, - 'requested_service_objective': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, - 'current_elastic_pool_name': {'key': 'properties.currentElasticPoolName', 'type': 'str'}, - 'current_service_objective': {'key': 'properties.currentServiceObjective', 'type': 'str'}, - 'requested_service_objective': {'key': 'properties.requestedServiceObjective', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, **kwargs) -> None: - super(ElasticPoolDatabaseActivity, self).__init__(**kwargs) - self.location = location - self.database_name = None - self.end_time = None - self.error_code = None - self.error_message = None - self.error_severity = None - self.operation = None - self.operation_id = None - self.percent_complete = None - self.requested_elastic_pool_name = None - self.current_elastic_pool_name = None - self.current_service_objective = None - self.requested_service_objective = None - self.server_name = None - self.start_time = None - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability.py deleted file mode 100644 index f870c33b6143..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolEditionCapability(Model): - """The elastic pool edition capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The elastic pool edition name. - :vartype name: str - :ivar supported_elastic_pool_performance_levels: The list of supported - elastic pool DTU levels for the edition. - :vartype supported_elastic_pool_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerformanceLevelCapability] - :ivar zone_redundant: Whether or not zone redundancy is supported for the - edition. - :vartype zone_redundant: bool - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_elastic_pool_performance_levels': {'readonly': True}, - 'zone_redundant': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_elastic_pool_performance_levels': {'key': 'supportedElasticPoolPerformanceLevels', 'type': '[ElasticPoolPerformanceLevelCapability]'}, - 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_elastic_pool_performance_levels = None - self.zone_redundant = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability_py3.py deleted file mode 100644 index 54af1f63906f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolEditionCapability(Model): - """The elastic pool edition capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The elastic pool edition name. - :vartype name: str - :ivar supported_elastic_pool_performance_levels: The list of supported - elastic pool DTU levels for the edition. - :vartype supported_elastic_pool_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerformanceLevelCapability] - :ivar zone_redundant: Whether or not zone redundancy is supported for the - edition. - :vartype zone_redundant: bool - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_elastic_pool_performance_levels': {'readonly': True}, - 'zone_redundant': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_elastic_pool_performance_levels': {'key': 'supportedElasticPoolPerformanceLevels', 'type': '[ElasticPoolPerformanceLevelCapability]'}, - 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ElasticPoolEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_elastic_pool_performance_levels = None - self.zone_redundant = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation.py deleted file mode 100644 index 7f01bbf3f1af..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ElasticPoolOperation(ProxyResource): - """A elastic pool operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar elastic_pool_name: The name of the elastic pool the operation is - being performed on. - :vartype elastic_pool_name: str - :ivar operation: The name of operation. - :vartype operation: str - :ivar operation_friendly_name: The friendly name of operation. - :vartype operation_friendly_name: str - :ivar percent_complete: The percentage of the operation completed. - :vartype percent_complete: int - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar start_time: The operation start time. - :vartype start_time: datetime - :ivar state: The operation state. - :vartype state: str - :ivar error_code: The operation error code. - :vartype error_code: int - :ivar error_description: The operation error description. - :vartype error_description: str - :ivar error_severity: The operation error severity. - :vartype error_severity: int - :ivar is_user_error: Whether or not the error is a user error. - :vartype is_user_error: bool - :ivar estimated_completion_time: The estimated completion time of the - operation. - :vartype estimated_completion_time: datetime - :ivar description: The operation description. - :vartype description: str - :ivar is_cancellable: Whether the operation can be cancelled. - :vartype is_cancellable: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_friendly_name': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_description': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'is_user_error': {'readonly': True}, - 'estimated_completion_time': {'readonly': True}, - 'description': {'readonly': True}, - 'is_cancellable': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, - 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolOperation, self).__init__(**kwargs) - self.elastic_pool_name = None - self.operation = None - self.operation_friendly_name = None - self.percent_complete = None - self.server_name = None - self.start_time = None - self.state = None - self.error_code = None - self.error_description = None - self.error_severity = None - self.is_user_error = None - self.estimated_completion_time = None - self.description = None - self.is_cancellable = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_paged.py deleted file mode 100644 index 530637e1479c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ElasticPoolOperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`ElasticPoolOperation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ElasticPoolOperation]'} - } - - def __init__(self, *args, **kwargs): - - super(ElasticPoolOperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_py3.py deleted file mode 100644 index c214b66532a5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_py3.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ElasticPoolOperation(ProxyResource): - """A elastic pool operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar elastic_pool_name: The name of the elastic pool the operation is - being performed on. - :vartype elastic_pool_name: str - :ivar operation: The name of operation. - :vartype operation: str - :ivar operation_friendly_name: The friendly name of operation. - :vartype operation_friendly_name: str - :ivar percent_complete: The percentage of the operation completed. - :vartype percent_complete: int - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar start_time: The operation start time. - :vartype start_time: datetime - :ivar state: The operation state. - :vartype state: str - :ivar error_code: The operation error code. - :vartype error_code: int - :ivar error_description: The operation error description. - :vartype error_description: str - :ivar error_severity: The operation error severity. - :vartype error_severity: int - :ivar is_user_error: Whether or not the error is a user error. - :vartype is_user_error: bool - :ivar estimated_completion_time: The estimated completion time of the - operation. - :vartype estimated_completion_time: datetime - :ivar description: The operation description. - :vartype description: str - :ivar is_cancellable: Whether the operation can be cancelled. - :vartype is_cancellable: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_friendly_name': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_description': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'is_user_error': {'readonly': True}, - 'estimated_completion_time': {'readonly': True}, - 'description': {'readonly': True}, - 'is_cancellable': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, - 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, - } - - def __init__(self, **kwargs) -> None: - super(ElasticPoolOperation, self).__init__(**kwargs) - self.elastic_pool_name = None - self.operation = None - self.operation_friendly_name = None - self.percent_complete = None - self.server_name = None - self.start_time = None - self.state = None - self.error_code = None - self.error_description = None - self.error_severity = None - self.is_user_error = None - self.estimated_completion_time = None - self.description = None - self.is_cancellable = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_paged.py deleted file mode 100644 index 4c391860ee2d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ElasticPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`ElasticPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ElasticPool]'} - } - - def __init__(self, *args, **kwargs): - - super(ElasticPoolPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability.py deleted file mode 100644 index 1f99b527f962..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseMaxPerformanceLevelCapability(Model): - """The max per-database performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The maximum performance level per database. - :vartype limit: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - :ivar supported_per_database_min_performance_levels: The list of supported - min database performance levels. - :vartype supported_per_database_min_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMinPerformanceLevelCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'supported_per_database_min_performance_levels': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'supported_per_database_min_performance_levels': {'key': 'supportedPerDatabaseMinPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMinPerformanceLevelCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolPerDatabaseMaxPerformanceLevelCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None - self.supported_per_database_min_performance_levels = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability_py3.py deleted file mode 100644 index 7e80c9d6cd5e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseMaxPerformanceLevelCapability(Model): - """The max per-database performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The maximum performance level per database. - :vartype limit: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - :ivar supported_per_database_min_performance_levels: The list of supported - min database performance levels. - :vartype supported_per_database_min_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMinPerformanceLevelCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'supported_per_database_min_performance_levels': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'supported_per_database_min_performance_levels': {'key': 'supportedPerDatabaseMinPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMinPerformanceLevelCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ElasticPoolPerDatabaseMaxPerformanceLevelCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None - self.supported_per_database_min_performance_levels = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability.py deleted file mode 100644 index 52306e685c47..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseMinPerformanceLevelCapability(Model): - """The minimum per-database performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The minimum performance level per database. - :vartype limit: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolPerDatabaseMinPerformanceLevelCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability_py3.py deleted file mode 100644 index d1dceda281f6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseMinPerformanceLevelCapability(Model): - """The minimum per-database performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The minimum performance level per database. - :vartype limit: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ElasticPoolPerDatabaseMinPerformanceLevelCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings.py deleted file mode 100644 index 5c7951cd9c4b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseSettings(Model): - """Per database settings of an elastic pool. - - :param min_capacity: The minimum capacity all databases are guaranteed. - :type min_capacity: float - :param max_capacity: The maximum capacity any one database can consume. - :type max_capacity: float - """ - - _attribute_map = { - 'min_capacity': {'key': 'minCapacity', 'type': 'float'}, - 'max_capacity': {'key': 'maxCapacity', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolPerDatabaseSettings, self).__init__(**kwargs) - self.min_capacity = kwargs.get('min_capacity', None) - self.max_capacity = kwargs.get('max_capacity', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings_py3.py deleted file mode 100644 index 64ab19c4217d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseSettings(Model): - """Per database settings of an elastic pool. - - :param min_capacity: The minimum capacity all databases are guaranteed. - :type min_capacity: float - :param max_capacity: The maximum capacity any one database can consume. - :type max_capacity: float - """ - - _attribute_map = { - 'min_capacity': {'key': 'minCapacity', 'type': 'float'}, - 'max_capacity': {'key': 'maxCapacity', 'type': 'float'}, - } - - def __init__(self, *, min_capacity: float=None, max_capacity: float=None, **kwargs) -> None: - super(ElasticPoolPerDatabaseSettings, self).__init__(**kwargs) - self.min_capacity = min_capacity - self.max_capacity = max_capacity diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability.py deleted file mode 100644 index 8d5de8c9e0db..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerformanceLevelCapability(Model): - """The Elastic Pool performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar performance_level: The performance level for the pool. - :vartype performance_level: - ~azure.mgmt.sql.models.PerformanceLevelCapability - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.sql.models.Sku - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar max_database_count: The maximum number of databases supported. - :vartype max_database_count: int - :ivar included_max_size: The included (free) max size for this performance - level. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar supported_max_sizes: The list of supported max sizes. - :vartype supported_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar supported_per_database_max_sizes: The list of supported per database - max sizes. - :vartype supported_per_database_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar supported_per_database_max_performance_levels: The list of supported - per database max performance levels. - :vartype supported_per_database_max_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMaxPerformanceLevelCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'performance_level': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'max_database_count': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'supported_max_sizes': {'readonly': True}, - 'supported_per_database_max_sizes': {'readonly': True}, - 'supported_per_database_max_performance_levels': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'max_database_count': {'key': 'maxDatabaseCount', 'type': 'int'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'supported_per_database_max_sizes': {'key': 'supportedPerDatabaseMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'supported_per_database_max_performance_levels': {'key': 'supportedPerDatabaseMaxPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMaxPerformanceLevelCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolPerformanceLevelCapability, self).__init__(**kwargs) - self.performance_level = None - self.sku = None - self.supported_license_types = None - self.max_database_count = None - self.included_max_size = None - self.supported_max_sizes = None - self.supported_per_database_max_sizes = None - self.supported_per_database_max_performance_levels = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability_py3.py deleted file mode 100644 index 6842c7fed8b8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerformanceLevelCapability(Model): - """The Elastic Pool performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar performance_level: The performance level for the pool. - :vartype performance_level: - ~azure.mgmt.sql.models.PerformanceLevelCapability - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.sql.models.Sku - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar max_database_count: The maximum number of databases supported. - :vartype max_database_count: int - :ivar included_max_size: The included (free) max size for this performance - level. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar supported_max_sizes: The list of supported max sizes. - :vartype supported_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar supported_per_database_max_sizes: The list of supported per database - max sizes. - :vartype supported_per_database_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar supported_per_database_max_performance_levels: The list of supported - per database max performance levels. - :vartype supported_per_database_max_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMaxPerformanceLevelCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'performance_level': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'max_database_count': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'supported_max_sizes': {'readonly': True}, - 'supported_per_database_max_sizes': {'readonly': True}, - 'supported_per_database_max_performance_levels': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'max_database_count': {'key': 'maxDatabaseCount', 'type': 'int'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'supported_per_database_max_sizes': {'key': 'supportedPerDatabaseMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'supported_per_database_max_performance_levels': {'key': 'supportedPerDatabaseMaxPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMaxPerformanceLevelCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ElasticPoolPerformanceLevelCapability, self).__init__(**kwargs) - self.performance_level = None - self.sku = None - self.supported_license_types = None - self.max_database_count = None - self.included_max_size = None - self.supported_max_sizes = None - self.supported_per_database_max_sizes = None - self.supported_per_database_max_performance_levels = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py deleted file mode 100644 index eb092529ac3b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class ElasticPool(TrackedResource): - """An elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.sql.models.Sku - :ivar kind: Kind of elastic pool. This is metadata used for the Azure - portal experience. - :vartype kind: str - :ivar state: The state of the elastic pool. Possible values include: - 'Creating', 'Ready', 'Disabled' - :vartype state: str or ~azure.mgmt.sql.models.ElasticPoolState - :ivar creation_date: The creation date of the elastic pool (ISO8601 - format). - :vartype creation_date: datetime - :param max_size_bytes: The storage limit for the database elastic pool in - bytes. - :type max_size_bytes: long - :param per_database_settings: The per database settings for the elastic - pool. - :type per_database_settings: - ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings - :param zone_redundant: Whether or not this elastic pool is zone redundant, - which means the replicas of this elastic pool will be spread across - multiple availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this elastic pool. - Possible values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'state': {'readonly': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, sku=None, max_size_bytes: int=None, per_database_settings=None, zone_redundant: bool=None, license_type=None, **kwargs) -> None: - super(ElasticPool, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.kind = None - self.state = None - self.creation_date = None - self.max_size_bytes = max_size_bytes - self.per_database_settings = per_database_settings - self.zone_redundant = zone_redundant - self.license_type = license_type diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update.py deleted file mode 100644 index ce71dfa7257e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolUpdate(Model): - """An elastic pool update. - - :param sku: - :type sku: ~azure.mgmt.sql.models.Sku - :param max_size_bytes: The storage limit for the database elastic pool in - bytes. - :type max_size_bytes: long - :param per_database_settings: The per database settings for the elastic - pool. - :type per_database_settings: - ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings - :param zone_redundant: Whether or not this elastic pool is zone redundant, - which means the replicas of this elastic pool will be spread across - multiple availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this elastic pool. - Possible values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolUpdate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.max_size_bytes = kwargs.get('max_size_bytes', None) - self.per_database_settings = kwargs.get('per_database_settings', None) - self.zone_redundant = kwargs.get('zone_redundant', None) - self.license_type = kwargs.get('license_type', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update_py3.py deleted file mode 100644 index d51753795c8a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolUpdate(Model): - """An elastic pool update. - - :param sku: - :type sku: ~azure.mgmt.sql.models.Sku - :param max_size_bytes: The storage limit for the database elastic pool in - bytes. - :type max_size_bytes: long - :param per_database_settings: The per database settings for the elastic - pool. - :type per_database_settings: - ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings - :param zone_redundant: Whether or not this elastic pool is zone redundant, - which means the replicas of this elastic pool will be spread across - multiple availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this elastic pool. - Possible values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, sku=None, max_size_bytes: int=None, per_database_settings=None, zone_redundant: bool=None, license_type=None, tags=None, **kwargs) -> None: - super(ElasticPoolUpdate, self).__init__(**kwargs) - self.sku = sku - self.max_size_bytes = max_size_bytes - self.per_database_settings = per_database_settings - self.zone_redundant = zone_redundant - self.license_type = license_type - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector.py deleted file mode 100644 index f6fe4ba3732d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class EncryptionProtector(ProxyResource): - """The server encryption protector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :type kind: str - :ivar location: Resource location. - :vartype location: str - :ivar subregion: Subregion of the encryption protector. - :vartype subregion: str - :param server_key_name: The name of the server key. - :type server_key_name: str - :param server_key_type: Required. The encryption protector type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :ivar uri: The URI of the server key. - :vartype uri: str - :ivar thumbprint: Thumbprint of the server key. - :vartype thumbprint: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'subregion': {'readonly': True}, - 'server_key_type': {'required': True}, - 'uri': {'readonly': True}, - 'thumbprint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'subregion': {'key': 'properties.subregion', 'type': 'str'}, - 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EncryptionProtector, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) - self.location = None - self.subregion = None - self.server_key_name = kwargs.get('server_key_name', None) - self.server_key_type = kwargs.get('server_key_type', None) - self.uri = None - self.thumbprint = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_paged.py deleted file mode 100644 index afb096561566..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class EncryptionProtectorPaged(Paged): - """ - A paging container for iterating over a list of :class:`EncryptionProtector ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[EncryptionProtector]'} - } - - def __init__(self, *args, **kwargs): - - super(EncryptionProtectorPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_py3.py deleted file mode 100644 index 6dd4bad3cfbe..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class EncryptionProtector(ProxyResource): - """The server encryption protector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :type kind: str - :ivar location: Resource location. - :vartype location: str - :ivar subregion: Subregion of the encryption protector. - :vartype subregion: str - :param server_key_name: The name of the server key. - :type server_key_name: str - :param server_key_type: Required. The encryption protector type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :ivar uri: The URI of the server key. - :vartype uri: str - :ivar thumbprint: Thumbprint of the server key. - :vartype thumbprint: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'subregion': {'readonly': True}, - 'server_key_type': {'required': True}, - 'uri': {'readonly': True}, - 'thumbprint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'subregion': {'key': 'properties.subregion', 'type': 'str'}, - 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, *, server_key_type, kind: str=None, server_key_name: str=None, **kwargs) -> None: - super(EncryptionProtector, self).__init__(**kwargs) - self.kind = kind - self.location = None - self.subregion = None - self.server_key_name = server_key_name - self.server_key_type = server_key_type - self.uri = None - self.thumbprint = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request.py deleted file mode 100644 index c0eb27d98299..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportRequest(Model): - """Export database parameters. - - All required parameters must be populated in order to send to Azure. - - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - } - - _attribute_map = { - 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, - } - - def __init__(self, **kwargs): - super(ExportRequest, self).__init__(**kwargs) - self.storage_key_type = kwargs.get('storage_key_type', None) - self.storage_key = kwargs.get('storage_key', None) - self.storage_uri = kwargs.get('storage_uri', None) - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.authentication_type = kwargs.get('authentication_type', "SQL") diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request_py3.py deleted file mode 100644 index 1cb99a5fe8fe..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportRequest(Model): - """Export database parameters. - - All required parameters must be populated in order to send to Azure. - - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - } - - _attribute_map = { - 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, - } - - def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, authentication_type="SQL", **kwargs) -> None: - super(ExportRequest, self).__init__(**kwargs) - self.storage_key_type = storage_key_type - self.storage_key = storage_key - self.storage_uri = storage_uri - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.authentication_type = authentication_type diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy.py deleted file mode 100644 index 48c324aa3153..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): - """An extended database blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param predicate_expression: Specifies condition of where clause when - creating an audit. - :type predicate_expression: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ExtendedDatabaseBlobAuditingPolicy, self).__init__(**kwargs) - self.predicate_expression = kwargs.get('predicate_expression', None) - self.state = kwargs.get('state', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) - self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) - self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) - self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy_py3.py deleted file mode 100644 index 9550f279968c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy_py3.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): - """An extended database blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param predicate_expression: Specifies condition of where clause when - creating an audit. - :type predicate_expression: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: - super(ExtendedDatabaseBlobAuditingPolicy, self).__init__(**kwargs) - self.predicate_expression = predicate_expression - self.state = state - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.audit_actions_and_groups = audit_actions_and_groups - self.storage_account_subscription_id = storage_account_subscription_id - self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use - self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy.py deleted file mode 100644 index ac110357f4b8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ExtendedServerBlobAuditingPolicy(ProxyResource): - """An extended server blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param predicate_expression: Specifies condition of where clause when - creating an audit. - :type predicate_expression: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ExtendedServerBlobAuditingPolicy, self).__init__(**kwargs) - self.predicate_expression = kwargs.get('predicate_expression', None) - self.state = kwargs.get('state', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) - self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) - self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) - self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy_py3.py deleted file mode 100644 index 89b96febe17d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy_py3.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ExtendedServerBlobAuditingPolicy(ProxyResource): - """An extended server blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param predicate_expression: Specifies condition of where clause when - creating an audit. - :type predicate_expression: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: - super(ExtendedServerBlobAuditingPolicy, self).__init__(**kwargs) - self.predicate_expression = predicate_expression - self.state = state - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.audit_actions_and_groups = audit_actions_and_groups - self.storage_account_subscription_id = storage_account_subscription_id - self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use - self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group.py deleted file mode 100644 index 1fd973aae6ff..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class FailoverGroup(ProxyResource): - """A failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param read_write_endpoint: Required. Read-write endpoint of the failover - group instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint - :ivar replication_role: Local replication role of the failover group - instance. Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.FailoverGroupReplicationRole - :ivar replication_state: Replication state of the failover group instance. - :vartype replication_state: str - :param partner_servers: Required. List of partner server information for - the failover group. - :type partner_servers: list[~azure.mgmt.sql.models.PartnerInfo] - :param databases: List of databases in the failover group. - :type databases: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'read_write_endpoint': {'required': True}, - 'replication_role': {'readonly': True}, - 'replication_state': {'readonly': True}, - 'partner_servers': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - 'partner_servers': {'key': 'properties.partnerServers', 'type': '[PartnerInfo]'}, - 'databases': {'key': 'properties.databases', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(FailoverGroup, self).__init__(**kwargs) - self.location = None - self.tags = kwargs.get('tags', None) - self.read_write_endpoint = kwargs.get('read_write_endpoint', None) - self.read_only_endpoint = kwargs.get('read_only_endpoint', None) - self.replication_role = None - self.replication_state = None - self.partner_servers = kwargs.get('partner_servers', None) - self.databases = kwargs.get('databases', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_paged.py deleted file mode 100644 index 5bdb8723cdc3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class FailoverGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`FailoverGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[FailoverGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(FailoverGroupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_py3.py deleted file mode 100644 index 4b179cf5b45f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class FailoverGroup(ProxyResource): - """A failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param read_write_endpoint: Required. Read-write endpoint of the failover - group instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint - :ivar replication_role: Local replication role of the failover group - instance. Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.FailoverGroupReplicationRole - :ivar replication_state: Replication state of the failover group instance. - :vartype replication_state: str - :param partner_servers: Required. List of partner server information for - the failover group. - :type partner_servers: list[~azure.mgmt.sql.models.PartnerInfo] - :param databases: List of databases in the failover group. - :type databases: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'read_write_endpoint': {'required': True}, - 'replication_role': {'readonly': True}, - 'replication_state': {'readonly': True}, - 'partner_servers': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - 'partner_servers': {'key': 'properties.partnerServers', 'type': '[PartnerInfo]'}, - 'databases': {'key': 'properties.databases', 'type': '[str]'}, - } - - def __init__(self, *, read_write_endpoint, partner_servers, tags=None, read_only_endpoint=None, databases=None, **kwargs) -> None: - super(FailoverGroup, self).__init__(**kwargs) - self.location = None - self.tags = tags - self.read_write_endpoint = read_write_endpoint - self.read_only_endpoint = read_only_endpoint - self.replication_role = None - self.replication_state = None - self.partner_servers = partner_servers - self.databases = databases diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint.py deleted file mode 100644 index c64da55dfec9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupReadOnlyEndpoint(Model): - """Read-only endpoint of the failover group instance. - - :param failover_policy: Failover policy of the read-only endpoint for the - failover group. Possible values include: 'Disabled', 'Enabled' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy - """ - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) - self.failover_policy = kwargs.get('failover_policy', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint_py3.py deleted file mode 100644 index aa923c8b0ce8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupReadOnlyEndpoint(Model): - """Read-only endpoint of the failover group instance. - - :param failover_policy: Failover policy of the read-only endpoint for the - failover group. Possible values include: 'Disabled', 'Enabled' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy - """ - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - } - - def __init__(self, *, failover_policy=None, **kwargs) -> None: - super(FailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) - self.failover_policy = failover_policy diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint.py deleted file mode 100644 index 8eb4368fe7be..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupReadWriteEndpoint(Model): - """Read-write endpoint of the failover group instance. - - All required parameters must be populated in order to send to Azure. - - :param failover_policy: Required. Failover policy of the read-write - endpoint for the failover group. If failoverPolicy is Automatic then - failoverWithDataLossGracePeriodMinutes is required. Possible values - include: 'Manual', 'Automatic' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy - :param failover_with_data_loss_grace_period_minutes: Grace period before - failover with data loss is attempted for the read-write endpoint. If - failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is - required. - :type failover_with_data_loss_grace_period_minutes: int - """ - - _validation = { - 'failover_policy': {'required': True}, - } - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(FailoverGroupReadWriteEndpoint, self).__init__(**kwargs) - self.failover_policy = kwargs.get('failover_policy', None) - self.failover_with_data_loss_grace_period_minutes = kwargs.get('failover_with_data_loss_grace_period_minutes', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint_py3.py deleted file mode 100644 index f9ffb4558ebc..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupReadWriteEndpoint(Model): - """Read-write endpoint of the failover group instance. - - All required parameters must be populated in order to send to Azure. - - :param failover_policy: Required. Failover policy of the read-write - endpoint for the failover group. If failoverPolicy is Automatic then - failoverWithDataLossGracePeriodMinutes is required. Possible values - include: 'Manual', 'Automatic' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy - :param failover_with_data_loss_grace_period_minutes: Grace period before - failover with data loss is attempted for the read-write endpoint. If - failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is - required. - :type failover_with_data_loss_grace_period_minutes: int - """ - - _validation = { - 'failover_policy': {'required': True}, - } - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, - } - - def __init__(self, *, failover_policy, failover_with_data_loss_grace_period_minutes: int=None, **kwargs) -> None: - super(FailoverGroupReadWriteEndpoint, self).__init__(**kwargs) - self.failover_policy = failover_policy - self.failover_with_data_loss_grace_period_minutes = failover_with_data_loss_grace_period_minutes diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update.py deleted file mode 100644 index e491b250f0da..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupUpdate(Model): - """A failover group update request. - - :param read_write_endpoint: Read-write endpoint of the failover group - instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint - :param databases: List of databases in the failover group. - :type databases: list[str] - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, - 'databases': {'key': 'properties.databases', 'type': '[str]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(FailoverGroupUpdate, self).__init__(**kwargs) - self.read_write_endpoint = kwargs.get('read_write_endpoint', None) - self.read_only_endpoint = kwargs.get('read_only_endpoint', None) - self.databases = kwargs.get('databases', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update_py3.py deleted file mode 100644 index 3aee1ee5c78c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupUpdate(Model): - """A failover group update request. - - :param read_write_endpoint: Read-write endpoint of the failover group - instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint - :param databases: List of databases in the failover group. - :type databases: list[str] - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, - 'databases': {'key': 'properties.databases', 'type': '[str]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, read_write_endpoint=None, read_only_endpoint=None, databases=None, tags=None, **kwargs) -> None: - super(FailoverGroupUpdate, self).__init__(**kwargs) - self.read_write_endpoint = read_write_endpoint - self.read_only_endpoint = read_only_endpoint - self.databases = databases - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule.py deleted file mode 100644 index 48004048c43a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class FirewallRule(ProxyResource): - """Represents a server firewall rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of server that contains this firewall rule. - :vartype kind: str - :ivar location: Location of the server that contains this firewall rule. - :vartype location: str - :param start_ip_address: Required. The start IP address of the firewall - rule. Must be IPv4 format. Use value '0.0.0.0' to represent all - Azure-internal IP addresses. - :type start_ip_address: str - :param end_ip_address: Required. The end IP address of the firewall rule. - Must be IPv4 format. Must be greater than or equal to startIpAddress. Use - value '0.0.0.0' to represent all Azure-internal IP addresses. - :type end_ip_address: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - 'start_ip_address': {'required': True}, - 'end_ip_address': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, - 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FirewallRule, self).__init__(**kwargs) - self.kind = None - self.location = None - self.start_ip_address = kwargs.get('start_ip_address', None) - self.end_ip_address = kwargs.get('end_ip_address', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_paged.py deleted file mode 100644 index 07586a09287a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class FirewallRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`FirewallRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[FirewallRule]'} - } - - def __init__(self, *args, **kwargs): - - super(FirewallRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_py3.py deleted file mode 100644 index c292730d9653..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_py3.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class FirewallRule(ProxyResource): - """Represents a server firewall rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of server that contains this firewall rule. - :vartype kind: str - :ivar location: Location of the server that contains this firewall rule. - :vartype location: str - :param start_ip_address: Required. The start IP address of the firewall - rule. Must be IPv4 format. Use value '0.0.0.0' to represent all - Azure-internal IP addresses. - :type start_ip_address: str - :param end_ip_address: Required. The end IP address of the firewall rule. - Must be IPv4 format. Must be greater than or equal to startIpAddress. Use - value '0.0.0.0' to represent all Azure-internal IP addresses. - :type end_ip_address: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - 'start_ip_address': {'required': True}, - 'end_ip_address': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, - 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, - } - - def __init__(self, *, start_ip_address: str, end_ip_address: str, **kwargs) -> None: - super(FirewallRule, self).__init__(**kwargs) - self.kind = None - self.location = None - self.start_ip_address = start_ip_address - self.end_ip_address = end_ip_address diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy.py deleted file mode 100644 index 3d8203075617..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class GeoBackupPolicy(ProxyResource): - """A database geo backup policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. The state of the geo backup policy. Possible - values include: 'Disabled', 'Enabled' - :type state: str or ~azure.mgmt.sql.models.GeoBackupPolicyState - :ivar storage_type: The storage type of the geo backup policy. - :vartype storage_type: str - :ivar kind: Kind of geo backup policy. This is metadata used for the - Azure portal experience. - :vartype kind: str - :ivar location: Backup policy location. - :vartype location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'storage_type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'GeoBackupPolicyState'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GeoBackupPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.storage_type = None - self.kind = None - self.location = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_paged.py deleted file mode 100644 index 7a207daa100e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class GeoBackupPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`GeoBackupPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GeoBackupPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(GeoBackupPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_py3.py deleted file mode 100644 index 23941df5ee47..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class GeoBackupPolicy(ProxyResource): - """A database geo backup policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. The state of the geo backup policy. Possible - values include: 'Disabled', 'Enabled' - :type state: str or ~azure.mgmt.sql.models.GeoBackupPolicyState - :ivar storage_type: The storage type of the geo backup policy. - :vartype storage_type: str - :ivar kind: Kind of geo backup policy. This is metadata used for the - Azure portal experience. - :vartype kind: str - :ivar location: Backup policy location. - :vartype location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'storage_type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'GeoBackupPolicyState'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, *, state, **kwargs) -> None: - super(GeoBackupPolicy, self).__init__(**kwargs) - self.state = state - self.storage_type = None - self.kind = None - self.location = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response.py deleted file mode 100644 index 5cfb638398f0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ImportExportResponse(ProxyResource): - """Response for Import/Export Get operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar request_type: The request type of the operation. - :vartype request_type: str - :ivar request_id: The request type of the operation. - :vartype request_id: str - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar database_name: The name of the database. - :vartype database_name: str - :ivar status: The status message returned from the server. - :vartype status: str - :ivar last_modified_time: The operation status last modified time. - :vartype last_modified_time: str - :ivar queued_time: The operation queued time. - :vartype queued_time: str - :ivar blob_uri: The blob uri. - :vartype blob_uri: str - :ivar error_message: The error message returned from the server. - :vartype error_message: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'request_type': {'readonly': True}, - 'request_id': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - 'status': {'readonly': True}, - 'last_modified_time': {'readonly': True}, - 'queued_time': {'readonly': True}, - 'blob_uri': {'readonly': True}, - 'error_message': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'request_type': {'key': 'properties.requestType', 'type': 'str'}, - 'request_id': {'key': 'properties.requestId', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'str'}, - 'queued_time': {'key': 'properties.queuedTime', 'type': 'str'}, - 'blob_uri': {'key': 'properties.blobUri', 'type': 'str'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImportExportResponse, self).__init__(**kwargs) - self.request_type = None - self.request_id = None - self.server_name = None - self.database_name = None - self.status = None - self.last_modified_time = None - self.queued_time = None - self.blob_uri = None - self.error_message = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response_py3.py deleted file mode 100644 index a344fc99266b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response_py3.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ImportExportResponse(ProxyResource): - """Response for Import/Export Get operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar request_type: The request type of the operation. - :vartype request_type: str - :ivar request_id: The request type of the operation. - :vartype request_id: str - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar database_name: The name of the database. - :vartype database_name: str - :ivar status: The status message returned from the server. - :vartype status: str - :ivar last_modified_time: The operation status last modified time. - :vartype last_modified_time: str - :ivar queued_time: The operation queued time. - :vartype queued_time: str - :ivar blob_uri: The blob uri. - :vartype blob_uri: str - :ivar error_message: The error message returned from the server. - :vartype error_message: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'request_type': {'readonly': True}, - 'request_id': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - 'status': {'readonly': True}, - 'last_modified_time': {'readonly': True}, - 'queued_time': {'readonly': True}, - 'blob_uri': {'readonly': True}, - 'error_message': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'request_type': {'key': 'properties.requestType', 'type': 'str'}, - 'request_id': {'key': 'properties.requestId', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'str'}, - 'queued_time': {'key': 'properties.queuedTime', 'type': 'str'}, - 'blob_uri': {'key': 'properties.blobUri', 'type': 'str'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ImportExportResponse, self).__init__(**kwargs) - self.request_type = None - self.request_id = None - self.server_name = None - self.database_name = None - self.status = None - self.last_modified_time = None - self.queued_time = None - self.blob_uri = None - self.error_message = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request.py deleted file mode 100644 index 3eba93dcec8e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImportExtensionRequest(Model): - """Import database parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: The name of the extension. - :type name: str - :param type: The type of the extension. - :type type: str - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - :ivar operation_mode: Required. The type of import operation being - performed. This is always Import. Default value: "Import" . - :vartype operation_mode: str - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - 'operation_mode': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_key_type': {'key': 'properties.storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'properties.storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'properties.storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'properties.authenticationType', 'type': 'AuthenticationType'}, - 'operation_mode': {'key': 'properties.operationMode', 'type': 'str'}, - } - - operation_mode = "Import" - - def __init__(self, **kwargs): - super(ImportExtensionRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.storage_key_type = kwargs.get('storage_key_type', None) - self.storage_key = kwargs.get('storage_key', None) - self.storage_uri = kwargs.get('storage_uri', None) - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.authentication_type = kwargs.get('authentication_type', "SQL") diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request_py3.py deleted file mode 100644 index 0486f0a68dbe..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImportExtensionRequest(Model): - """Import database parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: The name of the extension. - :type name: str - :param type: The type of the extension. - :type type: str - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - :ivar operation_mode: Required. The type of import operation being - performed. This is always Import. Default value: "Import" . - :vartype operation_mode: str - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - 'operation_mode': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_key_type': {'key': 'properties.storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'properties.storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'properties.storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'properties.authenticationType', 'type': 'AuthenticationType'}, - 'operation_mode': {'key': 'properties.operationMode', 'type': 'str'}, - } - - operation_mode = "Import" - - def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, name: str=None, type: str=None, authentication_type="SQL", **kwargs) -> None: - super(ImportExtensionRequest, self).__init__(**kwargs) - self.name = name - self.type = type - self.storage_key_type = storage_key_type - self.storage_key = storage_key - self.storage_uri = storage_uri - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.authentication_type = authentication_type diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request.py deleted file mode 100644 index a1683ffad9b4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .export_request import ExportRequest - - -class ImportRequest(ExportRequest): - """Import database parameters. - - All required parameters must be populated in order to send to Azure. - - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - :param database_name: Required. The name of the database to import. - :type database_name: str - :param edition: Required. The edition for the database being created. - Possible values include: 'Web', 'Business', 'Basic', 'Standard', - 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', - 'System2' - :type edition: str or ~azure.mgmt.sql.models.DatabaseEdition - :param service_objective_name: Required. The name of the service objective - to assign to the database. Possible values include: 'System', 'System0', - 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', - 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', - 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', - 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', - 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', - 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', - 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', - 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - :type service_objective_name: str or - ~azure.mgmt.sql.models.ServiceObjectiveName - :param max_size_bytes: Required. The maximum size for the newly imported - database. - :type max_size_bytes: str - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - 'database_name': {'required': True}, - 'edition': {'required': True}, - 'service_objective_name': {'required': True}, - 'max_size_bytes': {'required': True}, - } - - _attribute_map = { - 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'edition': {'key': 'edition', 'type': 'str'}, - 'service_objective_name': {'key': 'serviceObjectiveName', 'type': 'str'}, - 'max_size_bytes': {'key': 'maxSizeBytes', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImportRequest, self).__init__(**kwargs) - self.database_name = kwargs.get('database_name', None) - self.edition = kwargs.get('edition', None) - self.service_objective_name = kwargs.get('service_objective_name', None) - self.max_size_bytes = kwargs.get('max_size_bytes', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py deleted file mode 100644 index 68b97ae814a3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .export_request_py3 import ExportRequest - - -class ImportRequest(ExportRequest): - """Import database parameters. - - All required parameters must be populated in order to send to Azure. - - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - :param database_name: Required. The name of the database to import. - :type database_name: str - :param edition: Required. The edition for the database being created. - Possible values include: 'Web', 'Business', 'Basic', 'Standard', - 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', - 'System2' - :type edition: str or ~azure.mgmt.sql.models.DatabaseEdition - :param service_objective_name: Required. The name of the service objective - to assign to the database. Possible values include: 'System', 'System0', - 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', - 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', - 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', - 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', - 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', - 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', - 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', - 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - :type service_objective_name: str or - ~azure.mgmt.sql.models.ServiceObjectiveName - :param max_size_bytes: Required. The maximum size for the newly imported - database. - :type max_size_bytes: str - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - 'database_name': {'required': True}, - 'edition': {'required': True}, - 'service_objective_name': {'required': True}, - 'max_size_bytes': {'required': True}, - } - - _attribute_map = { - 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'edition': {'key': 'edition', 'type': 'str'}, - 'service_objective_name': {'key': 'serviceObjectiveName', 'type': 'str'}, - 'max_size_bytes': {'key': 'maxSizeBytes', 'type': 'str'}, - } - - def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, database_name: str, edition, service_objective_name, max_size_bytes: str, authentication_type="SQL", **kwargs) -> None: - super(ImportRequest, self).__init__(storage_key_type=storage_key_type, storage_key=storage_key, storage_uri=storage_uri, administrator_login=administrator_login, administrator_login_password=administrator_login_password, authentication_type=authentication_type, **kwargs) - self.database_name = database_name - self.edition = edition - self.service_objective_name = service_objective_name - self.max_size_bytes = max_size_bytes diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group.py deleted file mode 100644 index f360ffbfed57..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class InstanceFailoverGroup(ProxyResource): - """An instance failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param read_write_endpoint: Required. Read-write endpoint of the failover - group instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.InstanceFailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.InstanceFailoverGroupReadOnlyEndpoint - :ivar replication_role: Local replication role of the failover group - instance. Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole - :ivar replication_state: Replication state of the failover group instance. - :vartype replication_state: str - :param partner_regions: Required. Partner region information for the - failover group. - :type partner_regions: list[~azure.mgmt.sql.models.PartnerRegionInfo] - :param managed_instance_pairs: Required. List of managed instance pairs in - the failover group. - :type managed_instance_pairs: - list[~azure.mgmt.sql.models.ManagedInstancePairInfo] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'read_write_endpoint': {'required': True}, - 'replication_role': {'readonly': True}, - 'replication_state': {'readonly': True}, - 'partner_regions': {'required': True}, - 'managed_instance_pairs': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'InstanceFailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'InstanceFailoverGroupReadOnlyEndpoint'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - 'partner_regions': {'key': 'properties.partnerRegions', 'type': '[PartnerRegionInfo]'}, - 'managed_instance_pairs': {'key': 'properties.managedInstancePairs', 'type': '[ManagedInstancePairInfo]'}, - } - - def __init__(self, **kwargs): - super(InstanceFailoverGroup, self).__init__(**kwargs) - self.read_write_endpoint = kwargs.get('read_write_endpoint', None) - self.read_only_endpoint = kwargs.get('read_only_endpoint', None) - self.replication_role = None - self.replication_state = None - self.partner_regions = kwargs.get('partner_regions', None) - self.managed_instance_pairs = kwargs.get('managed_instance_pairs', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_paged.py deleted file mode 100644 index c67eaf2ef670..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class InstanceFailoverGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`InstanceFailoverGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[InstanceFailoverGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(InstanceFailoverGroupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_py3.py deleted file mode 100644 index 8959f26c9f69..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_py3.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class InstanceFailoverGroup(ProxyResource): - """An instance failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param read_write_endpoint: Required. Read-write endpoint of the failover - group instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.InstanceFailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.InstanceFailoverGroupReadOnlyEndpoint - :ivar replication_role: Local replication role of the failover group - instance. Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole - :ivar replication_state: Replication state of the failover group instance. - :vartype replication_state: str - :param partner_regions: Required. Partner region information for the - failover group. - :type partner_regions: list[~azure.mgmt.sql.models.PartnerRegionInfo] - :param managed_instance_pairs: Required. List of managed instance pairs in - the failover group. - :type managed_instance_pairs: - list[~azure.mgmt.sql.models.ManagedInstancePairInfo] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'read_write_endpoint': {'required': True}, - 'replication_role': {'readonly': True}, - 'replication_state': {'readonly': True}, - 'partner_regions': {'required': True}, - 'managed_instance_pairs': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'InstanceFailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'InstanceFailoverGroupReadOnlyEndpoint'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - 'partner_regions': {'key': 'properties.partnerRegions', 'type': '[PartnerRegionInfo]'}, - 'managed_instance_pairs': {'key': 'properties.managedInstancePairs', 'type': '[ManagedInstancePairInfo]'}, - } - - def __init__(self, *, read_write_endpoint, partner_regions, managed_instance_pairs, read_only_endpoint=None, **kwargs) -> None: - super(InstanceFailoverGroup, self).__init__(**kwargs) - self.read_write_endpoint = read_write_endpoint - self.read_only_endpoint = read_only_endpoint - self.replication_role = None - self.replication_state = None - self.partner_regions = partner_regions - self.managed_instance_pairs = managed_instance_pairs diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint.py deleted file mode 100644 index 2a9857817ae4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceFailoverGroupReadOnlyEndpoint(Model): - """Read-only endpoint of the failover group instance. - - :param failover_policy: Failover policy of the read-only endpoint for the - failover group. Possible values include: 'Disabled', 'Enabled' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy - """ - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(InstanceFailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) - self.failover_policy = kwargs.get('failover_policy', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint_py3.py deleted file mode 100644 index 71c9f180cdf7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceFailoverGroupReadOnlyEndpoint(Model): - """Read-only endpoint of the failover group instance. - - :param failover_policy: Failover policy of the read-only endpoint for the - failover group. Possible values include: 'Disabled', 'Enabled' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy - """ - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - } - - def __init__(self, *, failover_policy=None, **kwargs) -> None: - super(InstanceFailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) - self.failover_policy = failover_policy diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint.py deleted file mode 100644 index 89a86899e503..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceFailoverGroupReadWriteEndpoint(Model): - """Read-write endpoint of the failover group instance. - - All required parameters must be populated in order to send to Azure. - - :param failover_policy: Required. Failover policy of the read-write - endpoint for the failover group. If failoverPolicy is Automatic then - failoverWithDataLossGracePeriodMinutes is required. Possible values - include: 'Manual', 'Automatic' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy - :param failover_with_data_loss_grace_period_minutes: Grace period before - failover with data loss is attempted for the read-write endpoint. If - failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is - required. - :type failover_with_data_loss_grace_period_minutes: int - """ - - _validation = { - 'failover_policy': {'required': True}, - } - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(InstanceFailoverGroupReadWriteEndpoint, self).__init__(**kwargs) - self.failover_policy = kwargs.get('failover_policy', None) - self.failover_with_data_loss_grace_period_minutes = kwargs.get('failover_with_data_loss_grace_period_minutes', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint_py3.py deleted file mode 100644 index 7fdc047ba37c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceFailoverGroupReadWriteEndpoint(Model): - """Read-write endpoint of the failover group instance. - - All required parameters must be populated in order to send to Azure. - - :param failover_policy: Required. Failover policy of the read-write - endpoint for the failover group. If failoverPolicy is Automatic then - failoverWithDataLossGracePeriodMinutes is required. Possible values - include: 'Manual', 'Automatic' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy - :param failover_with_data_loss_grace_period_minutes: Grace period before - failover with data loss is attempted for the read-write endpoint. If - failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is - required. - :type failover_with_data_loss_grace_period_minutes: int - """ - - _validation = { - 'failover_policy': {'required': True}, - } - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, - } - - def __init__(self, *, failover_policy, failover_with_data_loss_grace_period_minutes: int=None, **kwargs) -> None: - super(InstanceFailoverGroupReadWriteEndpoint, self).__init__(**kwargs) - self.failover_policy = failover_policy - self.failover_with_data_loss_grace_period_minutes = failover_with_data_loss_grace_period_minutes diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job.py deleted file mode 100644 index 6b2c60fd1d4b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class Job(ProxyResource): - """A job. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param description: User-defined description of the job. Default value: "" - . - :type description: str - :ivar version: The job version number. - :vartype version: int - :param schedule: Schedule properties of the job. - :type schedule: ~azure.mgmt.sql.models.JobSchedule - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'version': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'int'}, - 'schedule': {'key': 'properties.schedule', 'type': 'JobSchedule'}, - } - - def __init__(self, **kwargs): - super(Job, self).__init__(**kwargs) - self.description = kwargs.get('description', "") - self.version = None - self.schedule = kwargs.get('schedule', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent.py deleted file mode 100644 index 48d42c28260c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class JobAgent(TrackedResource): - """An Azure SQL job agent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :param database_id: Required. Resource ID of the database to store job - metadata in. - :type database_id: str - :ivar state: The state of the job agent. Possible values include: - 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' - :vartype state: str or ~azure.mgmt.sql.models.JobAgentState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'database_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobAgent, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.database_id = kwargs.get('database_id', None) - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_paged.py deleted file mode 100644 index 25dd750b9d1f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobAgentPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobAgent ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobAgent]'} - } - - def __init__(self, *args, **kwargs): - - super(JobAgentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_py3.py deleted file mode 100644 index 936d87932ebc..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class JobAgent(TrackedResource): - """An Azure SQL job agent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :param database_id: Required. Resource ID of the database to store job - metadata in. - :type database_id: str - :ivar state: The state of the job agent. Possible values include: - 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' - :vartype state: str or ~azure.mgmt.sql.models.JobAgentState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'database_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, *, location: str, database_id: str, tags=None, sku=None, **kwargs) -> None: - super(JobAgent, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.database_id = database_id - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update.py deleted file mode 100644 index af781de91cbf..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobAgentUpdate(Model): - """An update to an Azure SQL job agent. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(JobAgentUpdate, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update_py3.py deleted file mode 100644 index ab5e71f7b1d1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobAgentUpdate(Model): - """An update to an Azure SQL job agent. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(JobAgentUpdate, self).__init__(**kwargs) - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential.py deleted file mode 100644 index 807d34975114..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class JobCredential(ProxyResource): - """A stored credential that can be used by a job to connect to target - databases. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param username: Required. The credential user name. - :type username: str - :param password: Required. The credential password. - :type password: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'username': {'required': True}, - 'password': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'username': {'key': 'properties.username', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobCredential, self).__init__(**kwargs) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_paged.py deleted file mode 100644 index 550108e41c93..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobCredentialPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobCredential ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobCredential]'} - } - - def __init__(self, *args, **kwargs): - - super(JobCredentialPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_py3.py deleted file mode 100644 index 5158010b9c74..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class JobCredential(ProxyResource): - """A stored credential that can be used by a job to connect to target - databases. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param username: Required. The credential user name. - :type username: str - :param password: Required. The credential password. - :type password: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'username': {'required': True}, - 'password': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'username': {'key': 'properties.username', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - } - - def __init__(self, *, username: str, password: str, **kwargs) -> None: - super(JobCredential, self).__init__(**kwargs) - self.username = username - self.password = password diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution.py deleted file mode 100644 index 92744fb7c75b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class JobExecution(ProxyResource): - """An execution of a job. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar job_version: The job version number. - :vartype job_version: int - :ivar step_name: The job step name. - :vartype step_name: str - :ivar step_id: The job step id. - :vartype step_id: int - :ivar job_execution_id: The unique identifier of the job execution. - :vartype job_execution_id: str - :ivar lifecycle: The detailed state of the job execution. Possible values - include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', - 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', - 'TimedOut', 'Canceled', 'Skipped' - :vartype lifecycle: str or ~azure.mgmt.sql.models.JobExecutionLifecycle - :ivar provisioning_state: The ARM provisioning state of the job execution. - Possible values include: 'Created', 'InProgress', 'Succeeded', 'Failed', - 'Canceled' - :vartype provisioning_state: str or - ~azure.mgmt.sql.models.ProvisioningState - :ivar create_time: The time that the job execution was created. - :vartype create_time: datetime - :ivar start_time: The time that the job execution started. - :vartype start_time: datetime - :ivar end_time: The time that the job execution completed. - :vartype end_time: datetime - :param current_attempts: Number of times the job execution has been - attempted. - :type current_attempts: int - :ivar current_attempt_start_time: Start time of the current attempt. - :vartype current_attempt_start_time: datetime - :ivar last_message: The last status or error message. - :vartype last_message: str - :ivar target: The target that this execution is executed on. - :vartype target: ~azure.mgmt.sql.models.JobExecutionTarget - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'job_version': {'readonly': True}, - 'step_name': {'readonly': True}, - 'step_id': {'readonly': True}, - 'job_execution_id': {'readonly': True}, - 'lifecycle': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'create_time': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'current_attempt_start_time': {'readonly': True}, - 'last_message': {'readonly': True}, - 'target': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'job_version': {'key': 'properties.jobVersion', 'type': 'int'}, - 'step_name': {'key': 'properties.stepName', 'type': 'str'}, - 'step_id': {'key': 'properties.stepId', 'type': 'int'}, - 'job_execution_id': {'key': 'properties.jobExecutionId', 'type': 'str'}, - 'lifecycle': {'key': 'properties.lifecycle', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'current_attempts': {'key': 'properties.currentAttempts', 'type': 'int'}, - 'current_attempt_start_time': {'key': 'properties.currentAttemptStartTime', 'type': 'iso-8601'}, - 'last_message': {'key': 'properties.lastMessage', 'type': 'str'}, - 'target': {'key': 'properties.target', 'type': 'JobExecutionTarget'}, - } - - def __init__(self, **kwargs): - super(JobExecution, self).__init__(**kwargs) - self.job_version = None - self.step_name = None - self.step_id = None - self.job_execution_id = None - self.lifecycle = None - self.provisioning_state = None - self.create_time = None - self.start_time = None - self.end_time = None - self.current_attempts = kwargs.get('current_attempts', None) - self.current_attempt_start_time = None - self.last_message = None - self.target = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_paged.py deleted file mode 100644 index bfcdb03ea9aa..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobExecutionPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobExecution ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobExecution]'} - } - - def __init__(self, *args, **kwargs): - - super(JobExecutionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_py3.py deleted file mode 100644 index b7fdaba7c147..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_py3.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class JobExecution(ProxyResource): - """An execution of a job. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar job_version: The job version number. - :vartype job_version: int - :ivar step_name: The job step name. - :vartype step_name: str - :ivar step_id: The job step id. - :vartype step_id: int - :ivar job_execution_id: The unique identifier of the job execution. - :vartype job_execution_id: str - :ivar lifecycle: The detailed state of the job execution. Possible values - include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', - 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', - 'TimedOut', 'Canceled', 'Skipped' - :vartype lifecycle: str or ~azure.mgmt.sql.models.JobExecutionLifecycle - :ivar provisioning_state: The ARM provisioning state of the job execution. - Possible values include: 'Created', 'InProgress', 'Succeeded', 'Failed', - 'Canceled' - :vartype provisioning_state: str or - ~azure.mgmt.sql.models.ProvisioningState - :ivar create_time: The time that the job execution was created. - :vartype create_time: datetime - :ivar start_time: The time that the job execution started. - :vartype start_time: datetime - :ivar end_time: The time that the job execution completed. - :vartype end_time: datetime - :param current_attempts: Number of times the job execution has been - attempted. - :type current_attempts: int - :ivar current_attempt_start_time: Start time of the current attempt. - :vartype current_attempt_start_time: datetime - :ivar last_message: The last status or error message. - :vartype last_message: str - :ivar target: The target that this execution is executed on. - :vartype target: ~azure.mgmt.sql.models.JobExecutionTarget - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'job_version': {'readonly': True}, - 'step_name': {'readonly': True}, - 'step_id': {'readonly': True}, - 'job_execution_id': {'readonly': True}, - 'lifecycle': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'create_time': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'current_attempt_start_time': {'readonly': True}, - 'last_message': {'readonly': True}, - 'target': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'job_version': {'key': 'properties.jobVersion', 'type': 'int'}, - 'step_name': {'key': 'properties.stepName', 'type': 'str'}, - 'step_id': {'key': 'properties.stepId', 'type': 'int'}, - 'job_execution_id': {'key': 'properties.jobExecutionId', 'type': 'str'}, - 'lifecycle': {'key': 'properties.lifecycle', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'current_attempts': {'key': 'properties.currentAttempts', 'type': 'int'}, - 'current_attempt_start_time': {'key': 'properties.currentAttemptStartTime', 'type': 'iso-8601'}, - 'last_message': {'key': 'properties.lastMessage', 'type': 'str'}, - 'target': {'key': 'properties.target', 'type': 'JobExecutionTarget'}, - } - - def __init__(self, *, current_attempts: int=None, **kwargs) -> None: - super(JobExecution, self).__init__(**kwargs) - self.job_version = None - self.step_name = None - self.step_id = None - self.job_execution_id = None - self.lifecycle = None - self.provisioning_state = None - self.create_time = None - self.start_time = None - self.end_time = None - self.current_attempts = current_attempts - self.current_attempt_start_time = None - self.last_message = None - self.target = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target.py deleted file mode 100644 index 50557aaf96d0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobExecutionTarget(Model): - """The target that a job execution is executed on. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The type of the target. Possible values include: - 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' - :vartype type: str or ~azure.mgmt.sql.models.JobTargetType - :ivar server_name: The server name. - :vartype server_name: str - :ivar database_name: The database name. - :vartype database_name: str - """ - - _validation = { - 'type': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobExecutionTarget, self).__init__(**kwargs) - self.type = None - self.server_name = None - self.database_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target_py3.py deleted file mode 100644 index 551716c3cd31..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobExecutionTarget(Model): - """The target that a job execution is executed on. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The type of the target. Possible values include: - 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' - :vartype type: str or ~azure.mgmt.sql.models.JobTargetType - :ivar server_name: The server name. - :vartype server_name: str - :ivar database_name: The database name. - :vartype database_name: str - """ - - _validation = { - 'type': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(JobExecutionTarget, self).__init__(**kwargs) - self.type = None - self.server_name = None - self.database_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_paged.py deleted file mode 100644 index 3b85770570f2..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobPaged(Paged): - """ - A paging container for iterating over a list of :class:`Job ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Job]'} - } - - def __init__(self, *args, **kwargs): - - super(JobPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_py3.py deleted file mode 100644 index 5bfb9b53f03f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class Job(ProxyResource): - """A job. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param description: User-defined description of the job. Default value: "" - . - :type description: str - :ivar version: The job version number. - :vartype version: int - :param schedule: Schedule properties of the job. - :type schedule: ~azure.mgmt.sql.models.JobSchedule - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'version': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'int'}, - 'schedule': {'key': 'properties.schedule', 'type': 'JobSchedule'}, - } - - def __init__(self, *, description: str="", schedule=None, **kwargs) -> None: - super(Job, self).__init__(**kwargs) - self.description = description - self.version = None - self.schedule = schedule diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule.py deleted file mode 100644 index 354e32c4f5b0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobSchedule(Model): - """Scheduling properties of a job. - - :param start_time: Schedule start time. Default value: - "0001-01-01T00:00:00Z" . - :type start_time: datetime - :param end_time: Schedule end time. Default value: "9999-12-31T11:59:59Z" - . - :type end_time: datetime - :param type: Schedule interval type. Possible values include: 'Once', - 'Recurring'. Default value: "Once" . - :type type: str or ~azure.mgmt.sql.models.JobScheduleType - :param enabled: Whether or not the schedule is enabled. - :type enabled: bool - :param interval: Value of the schedule's recurring interval, if the - schedule type is recurring. ISO8601 duration format. - :type interval: str - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'JobScheduleType'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'interval': {'key': 'interval', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobSchedule, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', "0001-01-01T00:00:00Z") - self.end_time = kwargs.get('end_time', "9999-12-31T11:59:59Z") - self.type = kwargs.get('type', "Once") - self.enabled = kwargs.get('enabled', None) - self.interval = kwargs.get('interval', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule_py3.py deleted file mode 100644 index 4b4a6a8f8971..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobSchedule(Model): - """Scheduling properties of a job. - - :param start_time: Schedule start time. Default value: - "0001-01-01T00:00:00Z" . - :type start_time: datetime - :param end_time: Schedule end time. Default value: "9999-12-31T11:59:59Z" - . - :type end_time: datetime - :param type: Schedule interval type. Possible values include: 'Once', - 'Recurring'. Default value: "Once" . - :type type: str or ~azure.mgmt.sql.models.JobScheduleType - :param enabled: Whether or not the schedule is enabled. - :type enabled: bool - :param interval: Value of the schedule's recurring interval, if the - schedule type is recurring. ISO8601 duration format. - :type interval: str - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'JobScheduleType'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'interval': {'key': 'interval', 'type': 'str'}, - } - - def __init__(self, *, start_time="0001-01-01T00:00:00Z", end_time="9999-12-31T11:59:59Z", type="Once", enabled: bool=None, interval: str=None, **kwargs) -> None: - super(JobSchedule, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time - self.type = type - self.enabled = enabled - self.interval = interval diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step.py deleted file mode 100644 index f032375dec32..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class JobStep(ProxyResource): - """A job step. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param step_id: The job step's index within the job. If not specified when - creating the job step, it will be created as the last step. If not - specified when updating the job step, the step id is not modified. - :type step_id: int - :param target_group: Required. The resource ID of the target group that - the job step will be executed on. - :type target_group: str - :param credential: Required. The resource ID of the job credential that - will be used to connect to the targets. - :type credential: str - :param action: Required. The action payload of the job step. - :type action: ~azure.mgmt.sql.models.JobStepAction - :param output: Output destination properties of the job step. - :type output: ~azure.mgmt.sql.models.JobStepOutput - :param execution_options: Execution options for the job step. - :type execution_options: ~azure.mgmt.sql.models.JobStepExecutionOptions - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'target_group': {'required': True}, - 'credential': {'required': True}, - 'action': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'step_id': {'key': 'properties.stepId', 'type': 'int'}, - 'target_group': {'key': 'properties.targetGroup', 'type': 'str'}, - 'credential': {'key': 'properties.credential', 'type': 'str'}, - 'action': {'key': 'properties.action', 'type': 'JobStepAction'}, - 'output': {'key': 'properties.output', 'type': 'JobStepOutput'}, - 'execution_options': {'key': 'properties.executionOptions', 'type': 'JobStepExecutionOptions'}, - } - - def __init__(self, **kwargs): - super(JobStep, self).__init__(**kwargs) - self.step_id = kwargs.get('step_id', None) - self.target_group = kwargs.get('target_group', None) - self.credential = kwargs.get('credential', None) - self.action = kwargs.get('action', None) - self.output = kwargs.get('output', None) - self.execution_options = kwargs.get('execution_options', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action.py deleted file mode 100644 index 68e55b1fa38f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepAction(Model): - """The action to be executed by a job step. - - All required parameters must be populated in order to send to Azure. - - :param type: Type of action being executed by the job step. Possible - values include: 'TSql'. Default value: "TSql" . - :type type: str or ~azure.mgmt.sql.models.JobStepActionType - :param source: The source of the action to execute. Possible values - include: 'Inline'. Default value: "Inline" . - :type source: str or ~azure.mgmt.sql.models.JobStepActionSource - :param value: Required. The action value, for example the text of the - T-SQL script to execute. - :type value: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobStepAction, self).__init__(**kwargs) - self.type = kwargs.get('type', "TSql") - self.source = kwargs.get('source', "Inline") - self.value = kwargs.get('value', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action_py3.py deleted file mode 100644 index 4d8848c8eaef..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepAction(Model): - """The action to be executed by a job step. - - All required parameters must be populated in order to send to Azure. - - :param type: Type of action being executed by the job step. Possible - values include: 'TSql'. Default value: "TSql" . - :type type: str or ~azure.mgmt.sql.models.JobStepActionType - :param source: The source of the action to execute. Possible values - include: 'Inline'. Default value: "Inline" . - :type source: str or ~azure.mgmt.sql.models.JobStepActionSource - :param value: Required. The action value, for example the text of the - T-SQL script to execute. - :type value: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, value: str, type="TSql", source="Inline", **kwargs) -> None: - super(JobStepAction, self).__init__(**kwargs) - self.type = type - self.source = source - self.value = value diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options.py deleted file mode 100644 index 6a49f1d10f25..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepExecutionOptions(Model): - """The execution options of a job step. - - :param timeout_seconds: Execution timeout for the job step. Default value: - 43200 . - :type timeout_seconds: int - :param retry_attempts: Maximum number of times the job step will be - reattempted if the first attempt fails. Default value: 10 . - :type retry_attempts: int - :param initial_retry_interval_seconds: Initial delay between retries for - job step execution. Default value: 1 . - :type initial_retry_interval_seconds: int - :param maximum_retry_interval_seconds: The maximum amount of time to wait - between retries for job step execution. Default value: 120 . - :type maximum_retry_interval_seconds: int - :param retry_interval_backoff_multiplier: The backoff multiplier for the - time between retries. Default value: 2 . - :type retry_interval_backoff_multiplier: float - """ - - _attribute_map = { - 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, - 'retry_attempts': {'key': 'retryAttempts', 'type': 'int'}, - 'initial_retry_interval_seconds': {'key': 'initialRetryIntervalSeconds', 'type': 'int'}, - 'maximum_retry_interval_seconds': {'key': 'maximumRetryIntervalSeconds', 'type': 'int'}, - 'retry_interval_backoff_multiplier': {'key': 'retryIntervalBackoffMultiplier', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(JobStepExecutionOptions, self).__init__(**kwargs) - self.timeout_seconds = kwargs.get('timeout_seconds', 43200) - self.retry_attempts = kwargs.get('retry_attempts', 10) - self.initial_retry_interval_seconds = kwargs.get('initial_retry_interval_seconds', 1) - self.maximum_retry_interval_seconds = kwargs.get('maximum_retry_interval_seconds', 120) - self.retry_interval_backoff_multiplier = kwargs.get('retry_interval_backoff_multiplier', 2) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options_py3.py deleted file mode 100644 index 712f0e947436..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepExecutionOptions(Model): - """The execution options of a job step. - - :param timeout_seconds: Execution timeout for the job step. Default value: - 43200 . - :type timeout_seconds: int - :param retry_attempts: Maximum number of times the job step will be - reattempted if the first attempt fails. Default value: 10 . - :type retry_attempts: int - :param initial_retry_interval_seconds: Initial delay between retries for - job step execution. Default value: 1 . - :type initial_retry_interval_seconds: int - :param maximum_retry_interval_seconds: The maximum amount of time to wait - between retries for job step execution. Default value: 120 . - :type maximum_retry_interval_seconds: int - :param retry_interval_backoff_multiplier: The backoff multiplier for the - time between retries. Default value: 2 . - :type retry_interval_backoff_multiplier: float - """ - - _attribute_map = { - 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, - 'retry_attempts': {'key': 'retryAttempts', 'type': 'int'}, - 'initial_retry_interval_seconds': {'key': 'initialRetryIntervalSeconds', 'type': 'int'}, - 'maximum_retry_interval_seconds': {'key': 'maximumRetryIntervalSeconds', 'type': 'int'}, - 'retry_interval_backoff_multiplier': {'key': 'retryIntervalBackoffMultiplier', 'type': 'float'}, - } - - def __init__(self, *, timeout_seconds: int=43200, retry_attempts: int=10, initial_retry_interval_seconds: int=1, maximum_retry_interval_seconds: int=120, retry_interval_backoff_multiplier: float=2, **kwargs) -> None: - super(JobStepExecutionOptions, self).__init__(**kwargs) - self.timeout_seconds = timeout_seconds - self.retry_attempts = retry_attempts - self.initial_retry_interval_seconds = initial_retry_interval_seconds - self.maximum_retry_interval_seconds = maximum_retry_interval_seconds - self.retry_interval_backoff_multiplier = retry_interval_backoff_multiplier diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output.py deleted file mode 100644 index 8a015a7505bd..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepOutput(Model): - """The output configuration of a job step. - - All required parameters must be populated in order to send to Azure. - - :param type: The output destination type. Possible values include: - 'SqlDatabase'. Default value: "SqlDatabase" . - :type type: str or ~azure.mgmt.sql.models.JobStepOutputType - :param subscription_id: The output destination subscription id. - :type subscription_id: str - :param resource_group_name: The output destination resource group. - :type resource_group_name: str - :param server_name: Required. The output destination server name. - :type server_name: str - :param database_name: Required. The output destination database. - :type database_name: str - :param schema_name: The output destination schema. Default value: "dbo" . - :type schema_name: str - :param table_name: Required. The output destination table. - :type table_name: str - :param credential: Required. The resource ID of the credential to use to - connect to the output destination. - :type credential: str - """ - - _validation = { - 'server_name': {'required': True}, - 'database_name': {'required': True}, - 'table_name': {'required': True}, - 'credential': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'schema_name': {'key': 'schemaName', 'type': 'str'}, - 'table_name': {'key': 'tableName', 'type': 'str'}, - 'credential': {'key': 'credential', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobStepOutput, self).__init__(**kwargs) - self.type = kwargs.get('type', "SqlDatabase") - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group_name = kwargs.get('resource_group_name', None) - self.server_name = kwargs.get('server_name', None) - self.database_name = kwargs.get('database_name', None) - self.schema_name = kwargs.get('schema_name', "dbo") - self.table_name = kwargs.get('table_name', None) - self.credential = kwargs.get('credential', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output_py3.py deleted file mode 100644 index d10ecbbd6f8c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepOutput(Model): - """The output configuration of a job step. - - All required parameters must be populated in order to send to Azure. - - :param type: The output destination type. Possible values include: - 'SqlDatabase'. Default value: "SqlDatabase" . - :type type: str or ~azure.mgmt.sql.models.JobStepOutputType - :param subscription_id: The output destination subscription id. - :type subscription_id: str - :param resource_group_name: The output destination resource group. - :type resource_group_name: str - :param server_name: Required. The output destination server name. - :type server_name: str - :param database_name: Required. The output destination database. - :type database_name: str - :param schema_name: The output destination schema. Default value: "dbo" . - :type schema_name: str - :param table_name: Required. The output destination table. - :type table_name: str - :param credential: Required. The resource ID of the credential to use to - connect to the output destination. - :type credential: str - """ - - _validation = { - 'server_name': {'required': True}, - 'database_name': {'required': True}, - 'table_name': {'required': True}, - 'credential': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'schema_name': {'key': 'schemaName', 'type': 'str'}, - 'table_name': {'key': 'tableName', 'type': 'str'}, - 'credential': {'key': 'credential', 'type': 'str'}, - } - - def __init__(self, *, server_name: str, database_name: str, table_name: str, credential: str, type="SqlDatabase", subscription_id: str=None, resource_group_name: str=None, schema_name: str="dbo", **kwargs) -> None: - super(JobStepOutput, self).__init__(**kwargs) - self.type = type - self.subscription_id = subscription_id - self.resource_group_name = resource_group_name - self.server_name = server_name - self.database_name = database_name - self.schema_name = schema_name - self.table_name = table_name - self.credential = credential diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_paged.py deleted file mode 100644 index 1bda4f5adf6e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobStepPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobStep ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobStep]'} - } - - def __init__(self, *args, **kwargs): - - super(JobStepPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_py3.py deleted file mode 100644 index bd267f9fd9a6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_py3.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class JobStep(ProxyResource): - """A job step. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param step_id: The job step's index within the job. If not specified when - creating the job step, it will be created as the last step. If not - specified when updating the job step, the step id is not modified. - :type step_id: int - :param target_group: Required. The resource ID of the target group that - the job step will be executed on. - :type target_group: str - :param credential: Required. The resource ID of the job credential that - will be used to connect to the targets. - :type credential: str - :param action: Required. The action payload of the job step. - :type action: ~azure.mgmt.sql.models.JobStepAction - :param output: Output destination properties of the job step. - :type output: ~azure.mgmt.sql.models.JobStepOutput - :param execution_options: Execution options for the job step. - :type execution_options: ~azure.mgmt.sql.models.JobStepExecutionOptions - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'target_group': {'required': True}, - 'credential': {'required': True}, - 'action': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'step_id': {'key': 'properties.stepId', 'type': 'int'}, - 'target_group': {'key': 'properties.targetGroup', 'type': 'str'}, - 'credential': {'key': 'properties.credential', 'type': 'str'}, - 'action': {'key': 'properties.action', 'type': 'JobStepAction'}, - 'output': {'key': 'properties.output', 'type': 'JobStepOutput'}, - 'execution_options': {'key': 'properties.executionOptions', 'type': 'JobStepExecutionOptions'}, - } - - def __init__(self, *, target_group: str, credential: str, action, step_id: int=None, output=None, execution_options=None, **kwargs) -> None: - super(JobStep, self).__init__(**kwargs) - self.step_id = step_id - self.target_group = target_group - self.credential = credential - self.action = action - self.output = output - self.execution_options = execution_options diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target.py deleted file mode 100644 index a608d87c1af1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobTarget(Model): - """A job target, for example a specific database or a container of databases - that is evaluated during job execution. - - All required parameters must be populated in order to send to Azure. - - :param membership_type: Whether the target is included or excluded from - the group. Possible values include: 'Include', 'Exclude'. Default value: - "Include" . - :type membership_type: str or - ~azure.mgmt.sql.models.JobTargetGroupMembershipType - :param type: Required. The target type. Possible values include: - 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' - :type type: str or ~azure.mgmt.sql.models.JobTargetType - :param server_name: The target server name. - :type server_name: str - :param database_name: The target database name. - :type database_name: str - :param elastic_pool_name: The target elastic pool name. - :type elastic_pool_name: str - :param shard_map_name: The target shard map. - :type shard_map_name: str - :param refresh_credential: The resource ID of the credential that is used - during job execution to connect to the target and determine the list of - databases inside the target. - :type refresh_credential: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'membership_type': {'key': 'membershipType', 'type': 'JobTargetGroupMembershipType'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'elastic_pool_name': {'key': 'elasticPoolName', 'type': 'str'}, - 'shard_map_name': {'key': 'shardMapName', 'type': 'str'}, - 'refresh_credential': {'key': 'refreshCredential', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobTarget, self).__init__(**kwargs) - self.membership_type = kwargs.get('membership_type', "Include") - self.type = kwargs.get('type', None) - self.server_name = kwargs.get('server_name', None) - self.database_name = kwargs.get('database_name', None) - self.elastic_pool_name = kwargs.get('elastic_pool_name', None) - self.shard_map_name = kwargs.get('shard_map_name', None) - self.refresh_credential = kwargs.get('refresh_credential', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group.py deleted file mode 100644 index 38148fb244c4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class JobTargetGroup(ProxyResource): - """A group of job targets. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param members: Required. Members of the target group. - :type members: list[~azure.mgmt.sql.models.JobTarget] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'members': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'members': {'key': 'properties.members', 'type': '[JobTarget]'}, - } - - def __init__(self, **kwargs): - super(JobTargetGroup, self).__init__(**kwargs) - self.members = kwargs.get('members', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_paged.py deleted file mode 100644 index cd466e5afa84..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobTargetGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobTargetGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobTargetGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(JobTargetGroupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_py3.py deleted file mode 100644 index a9582212ff82..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class JobTargetGroup(ProxyResource): - """A group of job targets. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param members: Required. Members of the target group. - :type members: list[~azure.mgmt.sql.models.JobTarget] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'members': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'members': {'key': 'properties.members', 'type': '[JobTarget]'}, - } - - def __init__(self, *, members, **kwargs) -> None: - super(JobTargetGroup, self).__init__(**kwargs) - self.members = members diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_py3.py deleted file mode 100644 index 281eb7598f18..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobTarget(Model): - """A job target, for example a specific database or a container of databases - that is evaluated during job execution. - - All required parameters must be populated in order to send to Azure. - - :param membership_type: Whether the target is included or excluded from - the group. Possible values include: 'Include', 'Exclude'. Default value: - "Include" . - :type membership_type: str or - ~azure.mgmt.sql.models.JobTargetGroupMembershipType - :param type: Required. The target type. Possible values include: - 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' - :type type: str or ~azure.mgmt.sql.models.JobTargetType - :param server_name: The target server name. - :type server_name: str - :param database_name: The target database name. - :type database_name: str - :param elastic_pool_name: The target elastic pool name. - :type elastic_pool_name: str - :param shard_map_name: The target shard map. - :type shard_map_name: str - :param refresh_credential: The resource ID of the credential that is used - during job execution to connect to the target and determine the list of - databases inside the target. - :type refresh_credential: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'membership_type': {'key': 'membershipType', 'type': 'JobTargetGroupMembershipType'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'elastic_pool_name': {'key': 'elasticPoolName', 'type': 'str'}, - 'shard_map_name': {'key': 'shardMapName', 'type': 'str'}, - 'refresh_credential': {'key': 'refreshCredential', 'type': 'str'}, - } - - def __init__(self, *, type, membership_type="Include", server_name: str=None, database_name: str=None, elastic_pool_name: str=None, shard_map_name: str=None, refresh_credential: str=None, **kwargs) -> None: - super(JobTarget, self).__init__(**kwargs) - self.membership_type = membership_type - self.type = type - self.server_name = server_name - self.database_name = database_name - self.elastic_pool_name = elastic_pool_name - self.shard_map_name = shard_map_name - self.refresh_credential = refresh_credential diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version.py deleted file mode 100644 index 3c480e739607..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class JobVersion(ProxyResource): - """A job version. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobVersion, self).__init__(**kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_paged.py deleted file mode 100644 index 162e4d8cfb5e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobVersionPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobVersion ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobVersion]'} - } - - def __init__(self, *args, **kwargs): - - super(JobVersionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_py3.py deleted file mode 100644 index 16a8798c5949..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class JobVersion(ProxyResource): - """A job version. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(JobVersion, self).__init__(**kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability.py deleted file mode 100644 index f40ad624e1c5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LicenseTypeCapability(Model): - """The license type capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: License type identifier. - :vartype name: str - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LicenseTypeCapability, self).__init__(**kwargs) - self.name = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability_py3.py deleted file mode 100644 index ecfa1918210a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LicenseTypeCapability(Model): - """The license type capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: License type identifier. - :vartype name: str - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(LicenseTypeCapability, self).__init__(**kwargs) - self.name = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities.py deleted file mode 100644 index b7e7f0980834..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LocationCapabilities(Model): - """The location capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The location name. - :vartype name: str - :ivar supported_server_versions: The list of supported server versions. - :vartype supported_server_versions: - list[~azure.mgmt.sql.models.ServerVersionCapability] - :ivar supported_managed_instance_versions: The list of supported managed - instance versions. - :vartype supported_managed_instance_versions: - list[~azure.mgmt.sql.models.ManagedInstanceVersionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_server_versions': {'readonly': True}, - 'supported_managed_instance_versions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_server_versions': {'key': 'supportedServerVersions', 'type': '[ServerVersionCapability]'}, - 'supported_managed_instance_versions': {'key': 'supportedManagedInstanceVersions', 'type': '[ManagedInstanceVersionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LocationCapabilities, self).__init__(**kwargs) - self.name = None - self.supported_server_versions = None - self.supported_managed_instance_versions = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities_py3.py deleted file mode 100644 index 69b257f605a9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LocationCapabilities(Model): - """The location capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The location name. - :vartype name: str - :ivar supported_server_versions: The list of supported server versions. - :vartype supported_server_versions: - list[~azure.mgmt.sql.models.ServerVersionCapability] - :ivar supported_managed_instance_versions: The list of supported managed - instance versions. - :vartype supported_managed_instance_versions: - list[~azure.mgmt.sql.models.ManagedInstanceVersionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_server_versions': {'readonly': True}, - 'supported_managed_instance_versions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_server_versions': {'key': 'supportedServerVersions', 'type': '[ServerVersionCapability]'}, - 'supported_managed_instance_versions': {'key': 'supportedManagedInstanceVersions', 'type': '[ManagedInstanceVersionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(LocationCapabilities, self).__init__(**kwargs) - self.name = None - self.supported_server_versions = None - self.supported_managed_instance_versions = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability.py deleted file mode 100644 index ad86f97123cf..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogSizeCapability(Model): - """The log size capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The log size limit (see 'unit' for the units). - :vartype limit: int - :ivar unit: The units that the limit is expressed in. Possible values - include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes', 'Percent' - :vartype unit: str or ~azure.mgmt.sql.models.LogSizeUnit - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'int'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LogSizeCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability_py3.py deleted file mode 100644 index 787e781b3025..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogSizeCapability(Model): - """The log size capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The log size limit (see 'unit' for the units). - :vartype limit: int - :ivar unit: The units that the limit is expressed in. Possible values - include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes', 'Percent' - :vartype unit: str or ~azure.mgmt.sql.models.LogSizeUnit - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'int'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(LogSizeCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup.py deleted file mode 100644 index 288ac55f501f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class LongTermRetentionBackup(ProxyResource): - """A long term retention backup. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar server_name: The server name that the backup database belong to. - :vartype server_name: str - :ivar server_create_time: The create time of the server. - :vartype server_create_time: datetime - :ivar database_name: The name of the database the backup belong to - :vartype database_name: str - :ivar database_deletion_time: The delete time of the database - :vartype database_deletion_time: datetime - :ivar backup_time: The time the backup was taken - :vartype backup_time: datetime - :ivar backup_expiration_time: The time the long term retention backup will - expire. - :vartype backup_expiration_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'server_name': {'readonly': True}, - 'server_create_time': {'readonly': True}, - 'database_name': {'readonly': True}, - 'database_deletion_time': {'readonly': True}, - 'backup_time': {'readonly': True}, - 'backup_expiration_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'server_create_time': {'key': 'properties.serverCreateTime', 'type': 'iso-8601'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'database_deletion_time': {'key': 'properties.databaseDeletionTime', 'type': 'iso-8601'}, - 'backup_time': {'key': 'properties.backupTime', 'type': 'iso-8601'}, - 'backup_expiration_time': {'key': 'properties.backupExpirationTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(LongTermRetentionBackup, self).__init__(**kwargs) - self.server_name = None - self.server_create_time = None - self.database_name = None - self.database_deletion_time = None - self.backup_time = None - self.backup_expiration_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_paged.py deleted file mode 100644 index 15e32283bbd7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class LongTermRetentionBackupPaged(Paged): - """ - A paging container for iterating over a list of :class:`LongTermRetentionBackup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[LongTermRetentionBackup]'} - } - - def __init__(self, *args, **kwargs): - - super(LongTermRetentionBackupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_py3.py deleted file mode 100644 index eb1372180fb0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class LongTermRetentionBackup(ProxyResource): - """A long term retention backup. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar server_name: The server name that the backup database belong to. - :vartype server_name: str - :ivar server_create_time: The create time of the server. - :vartype server_create_time: datetime - :ivar database_name: The name of the database the backup belong to - :vartype database_name: str - :ivar database_deletion_time: The delete time of the database - :vartype database_deletion_time: datetime - :ivar backup_time: The time the backup was taken - :vartype backup_time: datetime - :ivar backup_expiration_time: The time the long term retention backup will - expire. - :vartype backup_expiration_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'server_name': {'readonly': True}, - 'server_create_time': {'readonly': True}, - 'database_name': {'readonly': True}, - 'database_deletion_time': {'readonly': True}, - 'backup_time': {'readonly': True}, - 'backup_expiration_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'server_create_time': {'key': 'properties.serverCreateTime', 'type': 'iso-8601'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'database_deletion_time': {'key': 'properties.databaseDeletionTime', 'type': 'iso-8601'}, - 'backup_time': {'key': 'properties.backupTime', 'type': 'iso-8601'}, - 'backup_expiration_time': {'key': 'properties.backupExpirationTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(LongTermRetentionBackup, self).__init__(**kwargs) - self.server_name = None - self.server_create_time = None - self.database_name = None - self.database_deletion_time = None - self.backup_time = None - self.backup_expiration_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy.py deleted file mode 100644 index 4cab44ce75c7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedBackupShortTermRetentionPolicy(ProxyResource): - """A short term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param retention_days: The backup retention period in days. This is how - many days Point-in-Time Restore will be supported. - :type retention_days: int - """ - - _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'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedBackupShortTermRetentionPolicy, self).__init__(**kwargs) - self.retention_days = kwargs.get('retention_days', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_paged.py deleted file mode 100644 index 17bcf3e363fc..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedBackupShortTermRetentionPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedBackupShortTermRetentionPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedBackupShortTermRetentionPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedBackupShortTermRetentionPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_py3.py deleted file mode 100644 index 46a3fafddeee..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedBackupShortTermRetentionPolicy(ProxyResource): - """A short term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param retention_days: The backup retention period in days. This is how - many days Point-in-Time Restore will be supported. - :type retention_days: int - """ - - _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'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, *, retention_days: int=None, **kwargs) -> None: - super(ManagedBackupShortTermRetentionPolicy, self).__init__(**kwargs) - self.retention_days = retention_days diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py deleted file mode 100644 index 0c5141eaaef5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class ManagedDatabase(TrackedResource): - """A managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param collation: Collation of the managed database. - :type collation: str - :ivar status: Status of the database. Possible values include: 'Online', - 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' - :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus - :ivar creation_date: Creation date of the database. - :vartype creation_date: datetime - :ivar earliest_restore_point: Earliest restore point in time for point in - time restore. - :vartype earliest_restore_point: datetime - :param restore_point_in_time: Conditional. If createMode is - PointInTimeRestore, this value is required. Specifies the point in time - (ISO8601 format) of the source database that will be restored to create - the new database. - :type restore_point_in_time: datetime - :ivar default_secondary_location: Geo paired region. - :vartype default_secondary_location: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param create_mode: Managed database create mode. PointInTimeRestore: - Create a database by restoring a point in time backup of an existing - database. SourceDatabaseName, SourceManagedInstanceName and PointInTime - must be specified. RestoreExternalBackup: Create a database by restoring - from external backup files. Collation, StorageContainerUri and - StorageContainerSasToken must be specified. Recovery: Creates a database - by restoring a geo-replicated backup. RecoverableDatabaseId must be - specified as the recoverable database resource ID to restore. Possible - values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', - 'Recovery' - :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode - :param storage_container_uri: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the uri of the - storage container where backups for this restore are stored. - :type storage_container_uri: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :param restorable_dropped_database_id: The restorable dropped database - resource id to restore when creating this database. - :type restorable_dropped_database_id: str - :param storage_container_sas_token: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the storage - container sas token. - :type storage_container_sas_token: str - :ivar failover_group_id: Instance Failover Group resource identifier that - this managed database belongs to. - :vartype failover_group_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'status': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'earliest_restore_point': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedDatabase, self).__init__(**kwargs) - self.collation = kwargs.get('collation', None) - self.status = None - self.creation_date = None - self.earliest_restore_point = None - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.default_secondary_location = None - self.catalog_collation = kwargs.get('catalog_collation', None) - self.create_mode = kwargs.get('create_mode', None) - self.storage_container_uri = kwargs.get('storage_container_uri', None) - self.source_database_id = kwargs.get('source_database_id', None) - self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) - self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None) - self.failover_group_id = None - self.recoverable_database_id = kwargs.get('recoverable_database_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_paged.py deleted file mode 100644 index e15d9d532b5a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py deleted file mode 100644 index cc5b655604ad..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class ManagedDatabase(TrackedResource): - """A managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param collation: Collation of the managed database. - :type collation: str - :ivar status: Status of the database. Possible values include: 'Online', - 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' - :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus - :ivar creation_date: Creation date of the database. - :vartype creation_date: datetime - :ivar earliest_restore_point: Earliest restore point in time for point in - time restore. - :vartype earliest_restore_point: datetime - :param restore_point_in_time: Conditional. If createMode is - PointInTimeRestore, this value is required. Specifies the point in time - (ISO8601 format) of the source database that will be restored to create - the new database. - :type restore_point_in_time: datetime - :ivar default_secondary_location: Geo paired region. - :vartype default_secondary_location: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param create_mode: Managed database create mode. PointInTimeRestore: - Create a database by restoring a point in time backup of an existing - database. SourceDatabaseName, SourceManagedInstanceName and PointInTime - must be specified. RestoreExternalBackup: Create a database by restoring - from external backup files. Collation, StorageContainerUri and - StorageContainerSasToken must be specified. Recovery: Creates a database - by restoring a geo-replicated backup. RecoverableDatabaseId must be - specified as the recoverable database resource ID to restore. Possible - values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', - 'Recovery' - :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode - :param storage_container_uri: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the uri of the - storage container where backups for this restore are stored. - :type storage_container_uri: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :param restorable_dropped_database_id: The restorable dropped database - resource id to restore when creating this database. - :type restorable_dropped_database_id: str - :param storage_container_sas_token: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the storage - container sas token. - :type storage_container_sas_token: str - :ivar failover_group_id: Instance Failover Group resource identifier that - this managed database belongs to. - :vartype failover_group_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'status': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'earliest_restore_point': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, restorable_dropped_database_id: str=None, storage_container_sas_token: str=None, recoverable_database_id: str=None, **kwargs) -> None: - super(ManagedDatabase, self).__init__(location=location, tags=tags, **kwargs) - self.collation = collation - self.status = None - self.creation_date = None - self.earliest_restore_point = None - self.restore_point_in_time = restore_point_in_time - self.default_secondary_location = None - self.catalog_collation = catalog_collation - self.create_mode = create_mode - self.storage_container_uri = storage_container_uri - self.source_database_id = source_database_id - self.restorable_dropped_database_id = restorable_dropped_database_id - self.storage_container_sas_token = storage_container_sas_token - self.failover_group_id = None - self.recoverable_database_id = recoverable_database_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy.py deleted file mode 100644 index e3117c33610e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedDatabaseSecurityAlertPolicy(ProxyResource): - """A managed database security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ManagedDatabaseSecurityAlertPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_paged.py deleted file mode 100644 index e05f23ba364c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedDatabaseSecurityAlertPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedDatabaseSecurityAlertPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedDatabaseSecurityAlertPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedDatabaseSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_py3.py deleted file mode 100644 index 365f34280641..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedDatabaseSecurityAlertPolicy(ProxyResource): - """A managed database security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: - super(ManagedDatabaseSecurityAlertPolicy, self).__init__(**kwargs) - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py deleted file mode 100644 index 5ce3a036dcb9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedDatabaseUpdate(Model): - """An managed database update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param collation: Collation of the managed database. - :type collation: str - :ivar status: Status of the database. Possible values include: 'Online', - 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' - :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus - :ivar creation_date: Creation date of the database. - :vartype creation_date: datetime - :ivar earliest_restore_point: Earliest restore point in time for point in - time restore. - :vartype earliest_restore_point: datetime - :param restore_point_in_time: Conditional. If createMode is - PointInTimeRestore, this value is required. Specifies the point in time - (ISO8601 format) of the source database that will be restored to create - the new database. - :type restore_point_in_time: datetime - :ivar default_secondary_location: Geo paired region. - :vartype default_secondary_location: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param create_mode: Managed database create mode. PointInTimeRestore: - Create a database by restoring a point in time backup of an existing - database. SourceDatabaseName, SourceManagedInstanceName and PointInTime - must be specified. RestoreExternalBackup: Create a database by restoring - from external backup files. Collation, StorageContainerUri and - StorageContainerSasToken must be specified. Recovery: Creates a database - by restoring a geo-replicated backup. RecoverableDatabaseId must be - specified as the recoverable database resource ID to restore. Possible - values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', - 'Recovery' - :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode - :param storage_container_uri: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the uri of the - storage container where backups for this restore are stored. - :type storage_container_uri: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :param restorable_dropped_database_id: The restorable dropped database - resource id to restore when creating this database. - :type restorable_dropped_database_id: str - :param storage_container_sas_token: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the storage - container sas token. - :type storage_container_sas_token: str - :ivar failover_group_id: Instance Failover Group resource identifier that - this managed database belongs to. - :vartype failover_group_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'status': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'earliest_restore_point': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - } - - _attribute_map = { - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedDatabaseUpdate, self).__init__(**kwargs) - self.collation = kwargs.get('collation', None) - self.status = None - self.creation_date = None - self.earliest_restore_point = None - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.default_secondary_location = None - self.catalog_collation = kwargs.get('catalog_collation', None) - self.create_mode = kwargs.get('create_mode', None) - self.storage_container_uri = kwargs.get('storage_container_uri', None) - self.source_database_id = kwargs.get('source_database_id', None) - self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) - self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None) - self.failover_group_id = None - self.recoverable_database_id = kwargs.get('recoverable_database_id', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py deleted file mode 100644 index 34ae1be2b3fe..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedDatabaseUpdate(Model): - """An managed database update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param collation: Collation of the managed database. - :type collation: str - :ivar status: Status of the database. Possible values include: 'Online', - 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' - :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus - :ivar creation_date: Creation date of the database. - :vartype creation_date: datetime - :ivar earliest_restore_point: Earliest restore point in time for point in - time restore. - :vartype earliest_restore_point: datetime - :param restore_point_in_time: Conditional. If createMode is - PointInTimeRestore, this value is required. Specifies the point in time - (ISO8601 format) of the source database that will be restored to create - the new database. - :type restore_point_in_time: datetime - :ivar default_secondary_location: Geo paired region. - :vartype default_secondary_location: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param create_mode: Managed database create mode. PointInTimeRestore: - Create a database by restoring a point in time backup of an existing - database. SourceDatabaseName, SourceManagedInstanceName and PointInTime - must be specified. RestoreExternalBackup: Create a database by restoring - from external backup files. Collation, StorageContainerUri and - StorageContainerSasToken must be specified. Recovery: Creates a database - by restoring a geo-replicated backup. RecoverableDatabaseId must be - specified as the recoverable database resource ID to restore. Possible - values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', - 'Recovery' - :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode - :param storage_container_uri: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the uri of the - storage container where backups for this restore are stored. - :type storage_container_uri: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :param restorable_dropped_database_id: The restorable dropped database - resource id to restore when creating this database. - :type restorable_dropped_database_id: str - :param storage_container_sas_token: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the storage - container sas token. - :type storage_container_sas_token: str - :ivar failover_group_id: Instance Failover Group resource identifier that - this managed database belongs to. - :vartype failover_group_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'status': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'earliest_restore_point': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - } - - _attribute_map = { - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, restorable_dropped_database_id: str=None, storage_container_sas_token: str=None, recoverable_database_id: str=None, tags=None, **kwargs) -> None: - super(ManagedDatabaseUpdate, self).__init__(**kwargs) - self.collation = collation - self.status = None - self.creation_date = None - self.earliest_restore_point = None - self.restore_point_in_time = restore_point_in_time - self.default_secondary_location = None - self.catalog_collation = catalog_collation - self.create_mode = create_mode - self.storage_container_uri = storage_container_uri - self.source_database_id = source_database_id - self.restorable_dropped_database_id = restorable_dropped_database_id - self.storage_container_sas_token = storage_container_sas_token - self.failover_group_id = None - self.recoverable_database_id = recoverable_database_id - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance.py deleted file mode 100644 index cf680e0ddac0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class ManagedInstance(TrackedResource): - """An Azure SQL managed instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param identity: The Azure Active Directory identity of the managed - instance. - :type identity: ~azure.mgmt.sql.models.ResourceIdentity - :param sku: Managed instance sku - :type sku: ~azure.mgmt.sql.models.Sku - :ivar fully_qualified_domain_name: The fully qualified domain name of the - managed instance. - :vartype fully_qualified_domain_name: str - :param administrator_login: Administrator username for the managed - instance. Can only be specified when the managed instance is being created - (and is required for creation). - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for managed instance creation). - :type administrator_login_password: str - :param subnet_id: Subnet resource ID for the managed instance. - :type subnet_id: str - :ivar state: The state of the managed instance. - :vartype state: str - :param license_type: The license type. Possible values are - 'LicenseIncluded' and 'BasePrice'. - :type license_type: str - :param v_cores: The number of VCores. - :type v_cores: int - :param storage_size_in_gb: The maximum storage size in GB. - :type storage_size_in_gb: int - :param collation: Collation of the managed instance. - :type collation: str - :ivar dns_zone: The Dns Zone that the managed instance is in. - :vartype dns_zone: str - :param dns_zone_partner: The resource id of another managed instance whose - DNS zone this managed instance will share after creation. - :type dns_zone_partner: str - :param public_data_endpoint_enabled: Whether or not the public data - endpoint is enabled. - :type public_data_endpoint_enabled: bool - :param proxy_override: Connection type used for connecting to the - instance. Possible values include: 'Proxy', 'Redirect', 'Default' - :type proxy_override: str or - ~azure.mgmt.sql.models.ManagedInstanceProxyOverride - :param timezone_id: Id of the timezone. Allowed values are timezones - supported by Windows. - Windows keeps details on supported timezones, including the id, in - registry under - KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time - Zones. - You can get those registry values via SQL Server by querying SELECT name - AS timezone_id FROM sys.time_zone_info. - List of Ids can also be obtained by executing - [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. - An example of valid timezone id is "Pacific Standard Time" or "W. Europe - Standard Time". - :type timezone_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'fully_qualified_domain_name': {'readonly': True}, - 'state': {'readonly': True}, - 'dns_zone': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, - 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, - 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, - 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, - 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, - 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstance, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - self.fully_qualified_domain_name = None - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.subnet_id = kwargs.get('subnet_id', None) - self.state = None - self.license_type = kwargs.get('license_type', None) - self.v_cores = kwargs.get('v_cores', None) - self.storage_size_in_gb = kwargs.get('storage_size_in_gb', None) - self.collation = kwargs.get('collation', None) - self.dns_zone = None - self.dns_zone_partner = kwargs.get('dns_zone_partner', None) - self.public_data_endpoint_enabled = kwargs.get('public_data_endpoint_enabled', None) - self.proxy_override = kwargs.get('proxy_override', None) - self.timezone_id = kwargs.get('timezone_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability.py deleted file mode 100644 index adeab90a3543..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceEditionCapability(Model): - """The managed server capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The managed server version name. - :vartype name: str - :ivar supported_families: The supported families. - :vartype supported_families: - list[~azure.mgmt.sql.models.ManagedInstanceFamilyCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_families': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_families': {'key': 'supportedFamilies', 'type': '[ManagedInstanceFamilyCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_families = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability_py3.py deleted file mode 100644 index 1627f4652fec..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceEditionCapability(Model): - """The managed server capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The managed server version name. - :vartype name: str - :ivar supported_families: The supported families. - :vartype supported_families: - list[~azure.mgmt.sql.models.ManagedInstanceFamilyCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_families': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_families': {'key': 'supportedFamilies', 'type': '[ManagedInstanceFamilyCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ManagedInstanceEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_families = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector.py deleted file mode 100644 index 87ffcbf35af7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedInstanceEncryptionProtector(ProxyResource): - """The managed instance encryption protector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :vartype kind: str - :param server_key_name: The name of the managed instance key. - :type server_key_name: str - :param server_key_type: Required. The encryption protector type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :ivar uri: The URI of the server key. - :vartype uri: str - :ivar thumbprint: Thumbprint of the server key. - :vartype thumbprint: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True}, - 'uri': {'readonly': True}, - 'thumbprint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceEncryptionProtector, self).__init__(**kwargs) - self.kind = None - self.server_key_name = kwargs.get('server_key_name', None) - self.server_key_type = kwargs.get('server_key_type', None) - self.uri = None - self.thumbprint = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_paged.py deleted file mode 100644 index 39ba69c33e17..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedInstanceEncryptionProtectorPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedInstanceEncryptionProtector ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedInstanceEncryptionProtector]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedInstanceEncryptionProtectorPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_py3.py deleted file mode 100644 index 4d45efcf8c5d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedInstanceEncryptionProtector(ProxyResource): - """The managed instance encryption protector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :vartype kind: str - :param server_key_name: The name of the managed instance key. - :type server_key_name: str - :param server_key_type: Required. The encryption protector type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :ivar uri: The URI of the server key. - :vartype uri: str - :ivar thumbprint: Thumbprint of the server key. - :vartype thumbprint: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True}, - 'uri': {'readonly': True}, - 'thumbprint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, *, server_key_type, server_key_name: str=None, **kwargs) -> None: - super(ManagedInstanceEncryptionProtector, self).__init__(**kwargs) - self.kind = None - self.server_key_name = server_key_name - self.server_key_type = server_key_type - self.uri = None - self.thumbprint = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability.py deleted file mode 100644 index df08ea8764c9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceFamilyCapability(Model): - """The managed server family capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Family name. - :vartype name: str - :ivar sku: SKU name. - :vartype sku: str - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar supported_vcores_values: List of supported virtual cores values. - :vartype supported_vcores_values: - list[~azure.mgmt.sql.models.ManagedInstanceVcoresCapability] - :ivar included_max_size: Included size. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar supported_storage_sizes: Storage size ranges. - :vartype supported_storage_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'supported_vcores_values': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'supported_storage_sizes': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'supported_vcores_values': {'key': 'supportedVcoresValues', 'type': '[ManagedInstanceVcoresCapability]'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'supported_storage_sizes': {'key': 'supportedStorageSizes', 'type': '[MaxSizeRangeCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceFamilyCapability, self).__init__(**kwargs) - self.name = None - self.sku = None - self.supported_license_types = None - self.supported_vcores_values = None - self.included_max_size = None - self.supported_storage_sizes = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability_py3.py deleted file mode 100644 index 5ea36be729d5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceFamilyCapability(Model): - """The managed server family capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Family name. - :vartype name: str - :ivar sku: SKU name. - :vartype sku: str - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar supported_vcores_values: List of supported virtual cores values. - :vartype supported_vcores_values: - list[~azure.mgmt.sql.models.ManagedInstanceVcoresCapability] - :ivar included_max_size: Included size. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar supported_storage_sizes: Storage size ranges. - :vartype supported_storage_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'supported_vcores_values': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'supported_storage_sizes': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'supported_vcores_values': {'key': 'supportedVcoresValues', 'type': '[ManagedInstanceVcoresCapability]'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'supported_storage_sizes': {'key': 'supportedStorageSizes', 'type': '[MaxSizeRangeCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ManagedInstanceFamilyCapability, self).__init__(**kwargs) - self.name = None - self.sku = None - self.supported_license_types = None - self.supported_vcores_values = None - self.included_max_size = None - self.supported_storage_sizes = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key.py deleted file mode 100644 index 5a7ee9724f96..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedInstanceKey(ProxyResource): - """A managed instance key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :vartype kind: str - :param server_key_type: Required. The key type like 'ServiceManaged', - 'AzureKeyVault'. Possible values include: 'ServiceManaged', - 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :param uri: The URI of the key. If the ServerKeyType is AzureKeyVault, - then the URI is required. - :type uri: str - :ivar thumbprint: Thumbprint of the key. - :vartype thumbprint: str - :ivar creation_date: The key creation date. - :vartype creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True}, - 'thumbprint': {'readonly': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceKey, self).__init__(**kwargs) - self.kind = None - self.server_key_type = kwargs.get('server_key_type', None) - self.uri = kwargs.get('uri', None) - self.thumbprint = None - self.creation_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_paged.py deleted file mode 100644 index 8c730f73a383..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedInstanceKeyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedInstanceKey ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedInstanceKey]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedInstanceKeyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_py3.py deleted file mode 100644 index f00bafa838f2..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedInstanceKey(ProxyResource): - """A managed instance key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :vartype kind: str - :param server_key_type: Required. The key type like 'ServiceManaged', - 'AzureKeyVault'. Possible values include: 'ServiceManaged', - 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :param uri: The URI of the key. If the ServerKeyType is AzureKeyVault, - then the URI is required. - :type uri: str - :ivar thumbprint: Thumbprint of the key. - :vartype thumbprint: str - :ivar creation_date: The key creation date. - :vartype creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True}, - 'thumbprint': {'readonly': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, server_key_type, uri: str=None, **kwargs) -> None: - super(ManagedInstanceKey, self).__init__(**kwargs) - self.kind = None - self.server_key_type = server_key_type - self.uri = uri - self.thumbprint = None - self.creation_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_paged.py deleted file mode 100644 index c39881da9f3b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedInstancePaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedInstance ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedInstance]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedInstancePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info.py deleted file mode 100644 index ee49c1db0c62..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstancePairInfo(Model): - """Pairs of Managed Instances in the failover group. - - :param primary_managed_instance_id: Id of Primary Managed Instance in - pair. - :type primary_managed_instance_id: str - :param partner_managed_instance_id: Id of Partner Managed Instance in - pair. - :type partner_managed_instance_id: str - """ - - _attribute_map = { - 'primary_managed_instance_id': {'key': 'primaryManagedInstanceId', 'type': 'str'}, - 'partner_managed_instance_id': {'key': 'partnerManagedInstanceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstancePairInfo, self).__init__(**kwargs) - self.primary_managed_instance_id = kwargs.get('primary_managed_instance_id', None) - self.partner_managed_instance_id = kwargs.get('partner_managed_instance_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info_py3.py deleted file mode 100644 index 49f52752b439..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstancePairInfo(Model): - """Pairs of Managed Instances in the failover group. - - :param primary_managed_instance_id: Id of Primary Managed Instance in - pair. - :type primary_managed_instance_id: str - :param partner_managed_instance_id: Id of Partner Managed Instance in - pair. - :type partner_managed_instance_id: str - """ - - _attribute_map = { - 'primary_managed_instance_id': {'key': 'primaryManagedInstanceId', 'type': 'str'}, - 'partner_managed_instance_id': {'key': 'partnerManagedInstanceId', 'type': 'str'}, - } - - def __init__(self, *, primary_managed_instance_id: str=None, partner_managed_instance_id: str=None, **kwargs) -> None: - super(ManagedInstancePairInfo, self).__init__(**kwargs) - self.primary_managed_instance_id = primary_managed_instance_id - self.partner_managed_instance_id = partner_managed_instance_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_py3.py deleted file mode 100644 index 9233da80dae4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_py3.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class ManagedInstance(TrackedResource): - """An Azure SQL managed instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param identity: The Azure Active Directory identity of the managed - instance. - :type identity: ~azure.mgmt.sql.models.ResourceIdentity - :param sku: Managed instance sku - :type sku: ~azure.mgmt.sql.models.Sku - :ivar fully_qualified_domain_name: The fully qualified domain name of the - managed instance. - :vartype fully_qualified_domain_name: str - :param administrator_login: Administrator username for the managed - instance. Can only be specified when the managed instance is being created - (and is required for creation). - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for managed instance creation). - :type administrator_login_password: str - :param subnet_id: Subnet resource ID for the managed instance. - :type subnet_id: str - :ivar state: The state of the managed instance. - :vartype state: str - :param license_type: The license type. Possible values are - 'LicenseIncluded' and 'BasePrice'. - :type license_type: str - :param v_cores: The number of VCores. - :type v_cores: int - :param storage_size_in_gb: The maximum storage size in GB. - :type storage_size_in_gb: int - :param collation: Collation of the managed instance. - :type collation: str - :ivar dns_zone: The Dns Zone that the managed instance is in. - :vartype dns_zone: str - :param dns_zone_partner: The resource id of another managed instance whose - DNS zone this managed instance will share after creation. - :type dns_zone_partner: str - :param public_data_endpoint_enabled: Whether or not the public data - endpoint is enabled. - :type public_data_endpoint_enabled: bool - :param proxy_override: Connection type used for connecting to the - instance. Possible values include: 'Proxy', 'Redirect', 'Default' - :type proxy_override: str or - ~azure.mgmt.sql.models.ManagedInstanceProxyOverride - :param timezone_id: Id of the timezone. Allowed values are timezones - supported by Windows. - Windows keeps details on supported timezones, including the id, in - registry under - KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time - Zones. - You can get those registry values via SQL Server by querying SELECT name - AS timezone_id FROM sys.time_zone_info. - List of Ids can also be obtained by executing - [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. - An example of valid timezone id is "Pacific Standard Time" or "W. Europe - Standard Time". - :type timezone_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'fully_qualified_domain_name': {'readonly': True}, - 'state': {'readonly': True}, - 'dns_zone': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, - 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, - 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, - 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, - 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, - 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, identity=None, sku=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type: str=None, v_cores: int=None, storage_size_in_gb: int=None, collation: str=None, dns_zone_partner: str=None, public_data_endpoint_enabled: bool=None, proxy_override=None, timezone_id: str=None, **kwargs) -> None: - super(ManagedInstance, self).__init__(location=location, tags=tags, **kwargs) - self.identity = identity - self.sku = sku - self.fully_qualified_domain_name = None - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.subnet_id = subnet_id - self.state = None - self.license_type = license_type - self.v_cores = v_cores - self.storage_size_in_gb = storage_size_in_gb - self.collation = collation - self.dns_zone = None - self.dns_zone_partner = dns_zone_partner - self.public_data_endpoint_enabled = public_data_endpoint_enabled - self.proxy_override = proxy_override - self.timezone_id = timezone_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update.py deleted file mode 100644 index e3c543f0a6b1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceUpdate(Model): - """An update request for an Azure SQL Database managed instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param sku: Managed instance sku - :type sku: ~azure.mgmt.sql.models.Sku - :ivar fully_qualified_domain_name: The fully qualified domain name of the - managed instance. - :vartype fully_qualified_domain_name: str - :param administrator_login: Administrator username for the managed - instance. Can only be specified when the managed instance is being created - (and is required for creation). - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for managed instance creation). - :type administrator_login_password: str - :param subnet_id: Subnet resource ID for the managed instance. - :type subnet_id: str - :ivar state: The state of the managed instance. - :vartype state: str - :param license_type: The license type. Possible values are - 'LicenseIncluded' and 'BasePrice'. - :type license_type: str - :param v_cores: The number of VCores. - :type v_cores: int - :param storage_size_in_gb: The maximum storage size in GB. - :type storage_size_in_gb: int - :param collation: Collation of the managed instance. - :type collation: str - :ivar dns_zone: The Dns Zone that the managed instance is in. - :vartype dns_zone: str - :param dns_zone_partner: The resource id of another managed instance whose - DNS zone this managed instance will share after creation. - :type dns_zone_partner: str - :param public_data_endpoint_enabled: Whether or not the public data - endpoint is enabled. - :type public_data_endpoint_enabled: bool - :param proxy_override: Connection type used for connecting to the - instance. Possible values include: 'Proxy', 'Redirect', 'Default' - :type proxy_override: str or - ~azure.mgmt.sql.models.ManagedInstanceProxyOverride - :param timezone_id: Id of the timezone. Allowed values are timezones - supported by Windows. - Windows keeps details on supported timezones, including the id, in - registry under - KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time - Zones. - You can get those registry values via SQL Server by querying SELECT name - AS timezone_id FROM sys.time_zone_info. - List of Ids can also be obtained by executing - [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. - An example of valid timezone id is "Pacific Standard Time" or "W. Europe - Standard Time". - :type timezone_id: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'fully_qualified_domain_name': {'readonly': True}, - 'state': {'readonly': True}, - 'dns_zone': {'readonly': True}, - } - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, - 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, - 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, - 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, - 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, - 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceUpdate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.fully_qualified_domain_name = None - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.subnet_id = kwargs.get('subnet_id', None) - self.state = None - self.license_type = kwargs.get('license_type', None) - self.v_cores = kwargs.get('v_cores', None) - self.storage_size_in_gb = kwargs.get('storage_size_in_gb', None) - self.collation = kwargs.get('collation', None) - self.dns_zone = None - self.dns_zone_partner = kwargs.get('dns_zone_partner', None) - self.public_data_endpoint_enabled = kwargs.get('public_data_endpoint_enabled', None) - self.proxy_override = kwargs.get('proxy_override', None) - self.timezone_id = kwargs.get('timezone_id', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update_py3.py deleted file mode 100644 index 4a2e6aa0bd78..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update_py3.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceUpdate(Model): - """An update request for an Azure SQL Database managed instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param sku: Managed instance sku - :type sku: ~azure.mgmt.sql.models.Sku - :ivar fully_qualified_domain_name: The fully qualified domain name of the - managed instance. - :vartype fully_qualified_domain_name: str - :param administrator_login: Administrator username for the managed - instance. Can only be specified when the managed instance is being created - (and is required for creation). - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for managed instance creation). - :type administrator_login_password: str - :param subnet_id: Subnet resource ID for the managed instance. - :type subnet_id: str - :ivar state: The state of the managed instance. - :vartype state: str - :param license_type: The license type. Possible values are - 'LicenseIncluded' and 'BasePrice'. - :type license_type: str - :param v_cores: The number of VCores. - :type v_cores: int - :param storage_size_in_gb: The maximum storage size in GB. - :type storage_size_in_gb: int - :param collation: Collation of the managed instance. - :type collation: str - :ivar dns_zone: The Dns Zone that the managed instance is in. - :vartype dns_zone: str - :param dns_zone_partner: The resource id of another managed instance whose - DNS zone this managed instance will share after creation. - :type dns_zone_partner: str - :param public_data_endpoint_enabled: Whether or not the public data - endpoint is enabled. - :type public_data_endpoint_enabled: bool - :param proxy_override: Connection type used for connecting to the - instance. Possible values include: 'Proxy', 'Redirect', 'Default' - :type proxy_override: str or - ~azure.mgmt.sql.models.ManagedInstanceProxyOverride - :param timezone_id: Id of the timezone. Allowed values are timezones - supported by Windows. - Windows keeps details on supported timezones, including the id, in - registry under - KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time - Zones. - You can get those registry values via SQL Server by querying SELECT name - AS timezone_id FROM sys.time_zone_info. - List of Ids can also be obtained by executing - [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. - An example of valid timezone id is "Pacific Standard Time" or "W. Europe - Standard Time". - :type timezone_id: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'fully_qualified_domain_name': {'readonly': True}, - 'state': {'readonly': True}, - 'dns_zone': {'readonly': True}, - } - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, - 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, - 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, - 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, - 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, - 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, sku=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type: str=None, v_cores: int=None, storage_size_in_gb: int=None, collation: str=None, dns_zone_partner: str=None, public_data_endpoint_enabled: bool=None, proxy_override=None, timezone_id: str=None, tags=None, **kwargs) -> None: - super(ManagedInstanceUpdate, self).__init__(**kwargs) - self.sku = sku - self.fully_qualified_domain_name = None - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.subnet_id = subnet_id - self.state = None - self.license_type = license_type - self.v_cores = v_cores - self.storage_size_in_gb = storage_size_in_gb - self.collation = collation - self.dns_zone = None - self.dns_zone_partner = dns_zone_partner - self.public_data_endpoint_enabled = public_data_endpoint_enabled - self.proxy_override = proxy_override - self.timezone_id = timezone_id - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability.py deleted file mode 100644 index 29503dd20ae2..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceVcoresCapability(Model): - """The managed instance virtual cores capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The virtual cores identifier. - :vartype name: str - :ivar value: The virtual cores value. - :vartype value: int - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'int'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceVcoresCapability, self).__init__(**kwargs) - self.name = None - self.value = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability_py3.py deleted file mode 100644 index 23d3bb49d4e8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceVcoresCapability(Model): - """The managed instance virtual cores capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The virtual cores identifier. - :vartype name: str - :ivar value: The virtual cores value. - :vartype value: int - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'int'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ManagedInstanceVcoresCapability, self).__init__(**kwargs) - self.name = None - self.value = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability.py deleted file mode 100644 index 949b1fcf4ad5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceVersionCapability(Model): - """The managed instance capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The server version name. - :vartype name: str - :ivar supported_editions: The list of supported managed instance editions. - :vartype supported_editions: - list[~azure.mgmt.sql.models.ManagedInstanceEditionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_editions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_editions': {'key': 'supportedEditions', 'type': '[ManagedInstanceEditionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceVersionCapability, self).__init__(**kwargs) - self.name = None - self.supported_editions = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability_py3.py deleted file mode 100644 index 6d078061def9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceVersionCapability(Model): - """The managed instance capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The server version name. - :vartype name: str - :ivar supported_editions: The list of supported managed instance editions. - :vartype supported_editions: - list[~azure.mgmt.sql.models.ManagedInstanceEditionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_editions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_editions': {'key': 'supportedEditions', 'type': '[ManagedInstanceEditionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ManagedInstanceVersionCapability, self).__init__(**kwargs) - self.name = None - self.supported_editions = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment.py deleted file mode 100644 index 78d257382e26..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedInstanceVulnerabilityAssessment(ProxyResource): - """A managed instance vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: Required. A blob storage container path to - hold the scan results (e.g. - https://myStorage.blob.core.windows.net/VaScans/). - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_container_path': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = kwargs.get('storage_container_path', None) - self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.recurring_scans = kwargs.get('recurring_scans', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_paged.py deleted file mode 100644 index a7322fe506bf..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedInstanceVulnerabilityAssessmentPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedInstanceVulnerabilityAssessment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedInstanceVulnerabilityAssessment]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedInstanceVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_py3.py deleted file mode 100644 index 6f3da10fea84..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedInstanceVulnerabilityAssessment(ProxyResource): - """A managed instance vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: Required. A blob storage container path to - hold the scan results (e.g. - https://myStorage.blob.core.windows.net/VaScans/). - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_container_path': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, *, storage_container_path: str, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: - super(ManagedInstanceVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = storage_container_path - self.storage_container_sas_key = storage_container_sas_key - self.storage_account_access_key = storage_account_access_key - self.recurring_scans = recurring_scans diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy.py deleted file mode 100644 index e3a0a5062157..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedServerSecurityAlertPolicy(ProxyResource): - """A managed server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ManagedServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_paged.py deleted file mode 100644 index 2d99504f4744..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedServerSecurityAlertPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedServerSecurityAlertPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedServerSecurityAlertPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedServerSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_py3.py deleted file mode 100644 index b16c97c79bea..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedServerSecurityAlertPolicy(ProxyResource): - """A managed server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: - super(ManagedServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability.py deleted file mode 100644 index d103c6f969f7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaxSizeCapability(Model): - """The maximum size capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The maximum size limit (see 'unit' for the units). - :vartype limit: int - :ivar unit: The units that the limit is expressed in. Possible values - include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' - :vartype unit: str or ~azure.mgmt.sql.models.MaxSizeUnit - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'int'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MaxSizeCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability_py3.py deleted file mode 100644 index 54bd7cb00171..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaxSizeCapability(Model): - """The maximum size capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The maximum size limit (see 'unit' for the units). - :vartype limit: int - :ivar unit: The units that the limit is expressed in. Possible values - include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' - :vartype unit: str or ~azure.mgmt.sql.models.MaxSizeUnit - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'int'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MaxSizeCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability.py deleted file mode 100644 index 3ec6c663b559..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaxSizeRangeCapability(Model): - """The maximum size range capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar min_value: Minimum value. - :vartype min_value: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar max_value: Maximum value. - :vartype max_value: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar scale_size: Scale/step size for discrete values between the minimum - value and the maximum value. - :vartype scale_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar log_size: Size of transaction log. - :vartype log_size: ~azure.mgmt.sql.models.LogSizeCapability - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'min_value': {'readonly': True}, - 'max_value': {'readonly': True}, - 'scale_size': {'readonly': True}, - 'log_size': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'min_value': {'key': 'minValue', 'type': 'MaxSizeCapability'}, - 'max_value': {'key': 'maxValue', 'type': 'MaxSizeCapability'}, - 'scale_size': {'key': 'scaleSize', 'type': 'MaxSizeCapability'}, - 'log_size': {'key': 'logSize', 'type': 'LogSizeCapability'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MaxSizeRangeCapability, self).__init__(**kwargs) - self.min_value = None - self.max_value = None - self.scale_size = None - self.log_size = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability_py3.py deleted file mode 100644 index f0f95ebd7f36..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaxSizeRangeCapability(Model): - """The maximum size range capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar min_value: Minimum value. - :vartype min_value: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar max_value: Maximum value. - :vartype max_value: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar scale_size: Scale/step size for discrete values between the minimum - value and the maximum value. - :vartype scale_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar log_size: Size of transaction log. - :vartype log_size: ~azure.mgmt.sql.models.LogSizeCapability - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'min_value': {'readonly': True}, - 'max_value': {'readonly': True}, - 'scale_size': {'readonly': True}, - 'log_size': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'min_value': {'key': 'minValue', 'type': 'MaxSizeCapability'}, - 'max_value': {'key': 'maxValue', 'type': 'MaxSizeCapability'}, - 'scale_size': {'key': 'scaleSize', 'type': 'MaxSizeCapability'}, - 'log_size': {'key': 'logSize', 'type': 'LogSizeCapability'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(MaxSizeRangeCapability, self).__init__(**kwargs) - self.min_value = None - self.max_value = None - self.scale_size = None - self.log_size = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric.py deleted file mode 100644 index 3d3b4b8df154..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Metric(Model): - """Database metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar start_time: The start time for the metric (ISO-8601 format). - :vartype start_time: datetime - :ivar end_time: The end time for the metric (ISO-8601 format). - :vartype end_time: datetime - :ivar time_grain: The time step to be used to summarize the metric values. - :vartype time_grain: str - :ivar unit: The unit of the metric. Possible values include: 'count', - 'bytes', 'seconds', 'percent', 'countPerSecond', 'bytesPerSecond' - :vartype unit: str or ~azure.mgmt.sql.models.UnitType - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.sql.models.MetricName - :ivar metric_values: The metric values for the specified time window and - timestep. - :vartype metric_values: list[~azure.mgmt.sql.models.MetricValue] - """ - - _validation = { - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'unit': {'readonly': True}, - 'name': {'readonly': True}, - 'metric_values': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, - } - - def __init__(self, **kwargs): - super(Metric, self).__init__(**kwargs) - self.start_time = None - self.end_time = None - self.time_grain = None - self.unit = None - self.name = None - self.metric_values = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability.py deleted file mode 100644 index ef43027b61ba..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricAvailability(Model): - """A metric availability value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar retention: The length of retention for the database metric. - :vartype retention: str - :ivar time_grain: The granularity of the database metric. - :vartype time_grain: str - """ - - _validation = { - 'retention': {'readonly': True}, - 'time_grain': {'readonly': True}, - } - - _attribute_map = { - 'retention': {'key': 'retention', 'type': 'str'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MetricAvailability, self).__init__(**kwargs) - self.retention = None - self.time_grain = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability_py3.py deleted file mode 100644 index 6e47c8134a38..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricAvailability(Model): - """A metric availability value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar retention: The length of retention for the database metric. - :vartype retention: str - :ivar time_grain: The granularity of the database metric. - :vartype time_grain: str - """ - - _validation = { - 'retention': {'readonly': True}, - 'time_grain': {'readonly': True}, - } - - _attribute_map = { - 'retention': {'key': 'retention', 'type': 'str'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MetricAvailability, self).__init__(**kwargs) - self.retention = None - self.time_grain = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition.py deleted file mode 100644 index 0b760f50f3ba..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricDefinition(Model): - """A database metric definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.sql.models.MetricName - :ivar primary_aggregation_type: The primary aggregation type defining how - metric values are displayed. Possible values include: 'None', 'Average', - 'Count', 'Minimum', 'Maximum', 'Total' - :vartype primary_aggregation_type: str or - ~azure.mgmt.sql.models.PrimaryAggregationType - :ivar resource_uri: The resource uri of the database. - :vartype resource_uri: str - :ivar unit: The unit of the metric. Possible values include: 'Count', - 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' - :vartype unit: str or ~azure.mgmt.sql.models.UnitDefinitionType - :ivar metric_availabilities: The list of database metric availabilities - for the metric. - :vartype metric_availabilities: - list[~azure.mgmt.sql.models.MetricAvailability] - """ - - _validation = { - 'name': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'resource_uri': {'readonly': True}, - 'unit': {'readonly': True}, - 'metric_availabilities': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'MetricName'}, - 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, - } - - def __init__(self, **kwargs): - super(MetricDefinition, self).__init__(**kwargs) - self.name = None - self.primary_aggregation_type = None - self.resource_uri = None - self.unit = None - self.metric_availabilities = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_paged.py deleted file mode 100644 index 95a01ebf4e85..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class MetricDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`MetricDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[MetricDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(MetricDefinitionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_py3.py deleted file mode 100644 index 33d5fa9e1323..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricDefinition(Model): - """A database metric definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.sql.models.MetricName - :ivar primary_aggregation_type: The primary aggregation type defining how - metric values are displayed. Possible values include: 'None', 'Average', - 'Count', 'Minimum', 'Maximum', 'Total' - :vartype primary_aggregation_type: str or - ~azure.mgmt.sql.models.PrimaryAggregationType - :ivar resource_uri: The resource uri of the database. - :vartype resource_uri: str - :ivar unit: The unit of the metric. Possible values include: 'Count', - 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' - :vartype unit: str or ~azure.mgmt.sql.models.UnitDefinitionType - :ivar metric_availabilities: The list of database metric availabilities - for the metric. - :vartype metric_availabilities: - list[~azure.mgmt.sql.models.MetricAvailability] - """ - - _validation = { - 'name': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'resource_uri': {'readonly': True}, - 'unit': {'readonly': True}, - 'metric_availabilities': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'MetricName'}, - 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, - } - - def __init__(self, **kwargs) -> None: - super(MetricDefinition, self).__init__(**kwargs) - self.name = None - self.primary_aggregation_type = None - self.resource_uri = None - self.unit = None - self.metric_availabilities = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name.py deleted file mode 100644 index 10643031ce5a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricName(Model): - """A database metric name. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: The name of the database metric. - :vartype value: str - :ivar localized_value: The friendly name of the database metric. - :vartype localized_value: str - """ - - _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MetricName, self).__init__(**kwargs) - self.value = None - self.localized_value = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name_py3.py deleted file mode 100644 index 67551bc7aed9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricName(Model): - """A database metric name. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: The name of the database metric. - :vartype value: str - :ivar localized_value: The friendly name of the database metric. - :vartype localized_value: str - """ - - _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MetricName, self).__init__(**kwargs) - self.value = None - self.localized_value = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_paged.py deleted file mode 100644 index 61aa43a2fced..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class MetricPaged(Paged): - """ - A paging container for iterating over a list of :class:`Metric ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Metric]'} - } - - def __init__(self, *args, **kwargs): - - super(MetricPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_py3.py deleted file mode 100644 index 5eae901bca7e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Metric(Model): - """Database metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar start_time: The start time for the metric (ISO-8601 format). - :vartype start_time: datetime - :ivar end_time: The end time for the metric (ISO-8601 format). - :vartype end_time: datetime - :ivar time_grain: The time step to be used to summarize the metric values. - :vartype time_grain: str - :ivar unit: The unit of the metric. Possible values include: 'count', - 'bytes', 'seconds', 'percent', 'countPerSecond', 'bytesPerSecond' - :vartype unit: str or ~azure.mgmt.sql.models.UnitType - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.sql.models.MetricName - :ivar metric_values: The metric values for the specified time window and - timestep. - :vartype metric_values: list[~azure.mgmt.sql.models.MetricValue] - """ - - _validation = { - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'unit': {'readonly': True}, - 'name': {'readonly': True}, - 'metric_values': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, - } - - def __init__(self, **kwargs) -> None: - super(Metric, self).__init__(**kwargs) - self.start_time = None - self.end_time = None - self.time_grain = None - self.unit = None - self.name = None - self.metric_values = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value.py deleted file mode 100644 index a506295d5bfb..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricValue(Model): - """Represents database metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar count: The number of values for the metric. - :vartype count: float - :ivar average: The average value of the metric. - :vartype average: float - :ivar maximum: The max value of the metric. - :vartype maximum: float - :ivar minimum: The min value of the metric. - :vartype minimum: float - :ivar timestamp: The metric timestamp (ISO-8601 format). - :vartype timestamp: datetime - :ivar total: The total value of the metric. - :vartype total: float - """ - - _validation = { - 'count': {'readonly': True}, - 'average': {'readonly': True}, - 'maximum': {'readonly': True}, - 'minimum': {'readonly': True}, - 'timestamp': {'readonly': True}, - 'total': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'float'}, - 'average': {'key': 'average', 'type': 'float'}, - 'maximum': {'key': 'maximum', 'type': 'float'}, - 'minimum': {'key': 'minimum', 'type': 'float'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'total': {'key': 'total', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(MetricValue, self).__init__(**kwargs) - self.count = None - self.average = None - self.maximum = None - self.minimum = None - self.timestamp = None - self.total = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value_py3.py deleted file mode 100644 index a1b027d62864..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricValue(Model): - """Represents database metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar count: The number of values for the metric. - :vartype count: float - :ivar average: The average value of the metric. - :vartype average: float - :ivar maximum: The max value of the metric. - :vartype maximum: float - :ivar minimum: The min value of the metric. - :vartype minimum: float - :ivar timestamp: The metric timestamp (ISO-8601 format). - :vartype timestamp: datetime - :ivar total: The total value of the metric. - :vartype total: float - """ - - _validation = { - 'count': {'readonly': True}, - 'average': {'readonly': True}, - 'maximum': {'readonly': True}, - 'minimum': {'readonly': True}, - 'timestamp': {'readonly': True}, - 'total': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'float'}, - 'average': {'key': 'average', 'type': 'float'}, - 'maximum': {'key': 'maximum', 'type': 'float'}, - 'minimum': {'key': 'minimum', 'type': 'float'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'total': {'key': 'total', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(MetricValue, self).__init__(**kwargs) - self.count = None - self.average = None - self.maximum = None - self.minimum = None - self.timestamp = None - self.total = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation.py deleted file mode 100644 index 09138c4b9086..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """SQL REST API operation definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the operation being performed on this particular - object. - :vartype name: str - :ivar display: The localized display information for this particular - operation / action. - :vartype display: ~azure.mgmt.sql.models.OperationDisplay - :ivar origin: The intended executor of the operation. Possible values - include: 'user', 'system' - :vartype origin: str or ~azure.mgmt.sql.models.OperationOrigin - :ivar properties: Additional descriptions for the operation. - :vartype properties: dict[str, object] - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - 'origin': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{object}'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.origin = None - self.properties = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display.py deleted file mode 100644 index dfbc4a6fcff3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """Display metadata associated with the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: The localized friendly form of the resource provider name. - :vartype provider: str - :ivar resource: The localized friendly form of the resource type related - to this action/operation. - :vartype resource: str - :ivar operation: The localized friendly name for the operation. - :vartype operation: str - :ivar description: The localized friendly description for the operation. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display_py3.py deleted file mode 100644 index 0541321c178c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """Display metadata associated with the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: The localized friendly form of the resource provider name. - :vartype provider: str - :ivar resource: The localized friendly form of the resource type related - to this action/operation. - :vartype resource: str - :ivar operation: The localized friendly name for the operation. - :vartype operation: str - :ivar description: The localized friendly description for the operation. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact.py deleted file mode 100644 index 6b69a122de4c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationImpact(Model): - """The impact of an operation, both in absolute and relative terms. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the impact dimension. - :vartype name: str - :ivar unit: The unit in which estimated impact to dimension is measured. - :vartype unit: str - :ivar change_value_absolute: The absolute impact to dimension. - :vartype change_value_absolute: float - :ivar change_value_relative: The relative impact to dimension (null if not - applicable) - :vartype change_value_relative: float - """ - - _validation = { - 'name': {'readonly': True}, - 'unit': {'readonly': True}, - 'change_value_absolute': {'readonly': True}, - 'change_value_relative': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'change_value_absolute': {'key': 'changeValueAbsolute', 'type': 'float'}, - 'change_value_relative': {'key': 'changeValueRelative', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(OperationImpact, self).__init__(**kwargs) - self.name = None - self.unit = None - self.change_value_absolute = None - self.change_value_relative = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact_py3.py deleted file mode 100644 index f53b9445f998..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationImpact(Model): - """The impact of an operation, both in absolute and relative terms. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the impact dimension. - :vartype name: str - :ivar unit: The unit in which estimated impact to dimension is measured. - :vartype unit: str - :ivar change_value_absolute: The absolute impact to dimension. - :vartype change_value_absolute: float - :ivar change_value_relative: The relative impact to dimension (null if not - applicable) - :vartype change_value_relative: float - """ - - _validation = { - 'name': {'readonly': True}, - 'unit': {'readonly': True}, - 'change_value_absolute': {'readonly': True}, - 'change_value_relative': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'change_value_absolute': {'key': 'changeValueAbsolute', 'type': 'float'}, - 'change_value_relative': {'key': 'changeValueRelative', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationImpact, self).__init__(**kwargs) - self.name = None - self.unit = None - self.change_value_absolute = None - self.change_value_relative = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_paged.py deleted file mode 100644 index ec8c4dc4c1c7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_py3.py deleted file mode 100644 index 4968981d1858..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """SQL REST API operation definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the operation being performed on this particular - object. - :vartype name: str - :ivar display: The localized display information for this particular - operation / action. - :vartype display: ~azure.mgmt.sql.models.OperationDisplay - :ivar origin: The intended executor of the operation. Possible values - include: 'user', 'system' - :vartype origin: str or ~azure.mgmt.sql.models.OperationOrigin - :ivar properties: Additional descriptions for the operation. - :vartype properties: dict[str, object] - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - 'origin': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{object}'}, - } - - def __init__(self, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.origin = None - self.properties = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info.py deleted file mode 100644 index de30bd259f7a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartnerInfo(Model): - """Partner server information for the failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource identifier of the partner server. - :type id: str - :ivar location: Geo location of the partner server. - :vartype location: str - :ivar replication_role: Replication role of the partner server. Possible - values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.FailoverGroupReplicationRole - """ - - _validation = { - 'id': {'required': True}, - 'location': {'readonly': True}, - 'replication_role': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'replication_role': {'key': 'replicationRole', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PartnerInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.location = None - self.replication_role = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info_py3.py deleted file mode 100644 index 0edede88118a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartnerInfo(Model): - """Partner server information for the failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource identifier of the partner server. - :type id: str - :ivar location: Geo location of the partner server. - :vartype location: str - :ivar replication_role: Replication role of the partner server. Possible - values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.FailoverGroupReplicationRole - """ - - _validation = { - 'id': {'required': True}, - 'location': {'readonly': True}, - 'replication_role': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'replication_role': {'key': 'replicationRole', 'type': 'str'}, - } - - def __init__(self, *, id: str, **kwargs) -> None: - super(PartnerInfo, self).__init__(**kwargs) - self.id = id - self.location = None - self.replication_role = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info.py deleted file mode 100644 index 4d8e2688acb1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartnerRegionInfo(Model): - """Partner region information for the failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param location: Geo location of the partner managed instances. - :type location: str - :ivar replication_role: Replication role of the partner managed instances. - Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole - """ - - _validation = { - 'replication_role': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'replication_role': {'key': 'replicationRole', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PartnerRegionInfo, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.replication_role = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info_py3.py deleted file mode 100644 index 76c52b49c0ba..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartnerRegionInfo(Model): - """Partner region information for the failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param location: Geo location of the partner managed instances. - :type location: str - :ivar replication_role: Replication role of the partner managed instances. - Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole - """ - - _validation = { - 'replication_role': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'replication_role': {'key': 'replicationRole', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, **kwargs) -> None: - super(PartnerRegionInfo, self).__init__(**kwargs) - self.location = location - self.replication_role = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability.py deleted file mode 100644 index 2463e1818718..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PerformanceLevelCapability(Model): - """The performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: Performance level value. - :vartype value: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - """ - - _validation = { - 'value': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PerformanceLevelCapability, self).__init__(**kwargs) - self.value = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability_py3.py deleted file mode 100644 index 96119e14568d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PerformanceLevelCapability(Model): - """The performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: Performance level value. - :vartype value: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - """ - - _validation = { - 'value': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(PerformanceLevelCapability, self).__init__(**kwargs) - self.value = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource.py deleted file mode 100644 index 21fea4f24360..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ProxyResource(Resource): - """ARM proxy resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProxyResource, self).__init__(**kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource_py3.py deleted file mode 100644 index 707323dfc134..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ProxyResource(Resource): - """ARM proxy resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ProxyResource, self).__init__(**kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool.py deleted file mode 100644 index 0d80a9a31ac9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RecommendedElasticPool(ProxyResource): - """Represents a recommended elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_edition: The edition of the recommended elastic pool. The - ElasticPoolEdition enumeration contains all the valid editions. Possible - values include: 'Basic', 'Standard', 'Premium' - :vartype database_edition: str or - ~azure.mgmt.sql.models.ElasticPoolEdition - :param dtu: The DTU for the recommended elastic pool. - :type dtu: float - :param database_dtu_min: The minimum DTU for the database. - :type database_dtu_min: float - :param database_dtu_max: The maximum DTU for the database. - :type database_dtu_max: float - :param storage_mb: Gets storage size in megabytes. - :type storage_mb: float - :ivar observation_period_start: The observation period start (ISO8601 - format). - :vartype observation_period_start: datetime - :ivar observation_period_end: The observation period start (ISO8601 - format). - :vartype observation_period_end: datetime - :ivar max_observed_dtu: Gets maximum observed DTU. - :vartype max_observed_dtu: float - :ivar max_observed_storage_mb: Gets maximum observed storage in megabytes. - :vartype max_observed_storage_mb: float - :ivar databases: The list of databases in this pool. Expanded property - :vartype databases: list[~azure.mgmt.sql.models.TrackedResource] - :ivar metrics: The list of databases housed in the server. Expanded - property - :vartype metrics: - list[~azure.mgmt.sql.models.RecommendedElasticPoolMetric] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_edition': {'readonly': True}, - 'observation_period_start': {'readonly': True}, - 'observation_period_end': {'readonly': True}, - 'max_observed_dtu': {'readonly': True}, - 'max_observed_storage_mb': {'readonly': True}, - 'databases': {'readonly': True}, - 'metrics': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'dtu': {'key': 'properties.dtu', 'type': 'float'}, - 'database_dtu_min': {'key': 'properties.databaseDtuMin', 'type': 'float'}, - 'database_dtu_max': {'key': 'properties.databaseDtuMax', 'type': 'float'}, - 'storage_mb': {'key': 'properties.storageMB', 'type': 'float'}, - 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, - 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, - 'max_observed_dtu': {'key': 'properties.maxObservedDtu', 'type': 'float'}, - 'max_observed_storage_mb': {'key': 'properties.maxObservedStorageMB', 'type': 'float'}, - 'databases': {'key': 'properties.databases', 'type': '[TrackedResource]'}, - 'metrics': {'key': 'properties.metrics', 'type': '[RecommendedElasticPoolMetric]'}, - } - - def __init__(self, **kwargs): - super(RecommendedElasticPool, self).__init__(**kwargs) - self.database_edition = None - self.dtu = kwargs.get('dtu', None) - self.database_dtu_min = kwargs.get('database_dtu_min', None) - self.database_dtu_max = kwargs.get('database_dtu_max', None) - self.storage_mb = kwargs.get('storage_mb', None) - self.observation_period_start = None - self.observation_period_end = None - self.max_observed_dtu = None - self.max_observed_storage_mb = None - self.databases = None - self.metrics = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric.py deleted file mode 100644 index 9ed07ced53d7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecommendedElasticPoolMetric(Model): - """Represents recommended elastic pool metric. - - :param date_time_property: The time of metric (ISO8601 format). - :type date_time_property: datetime - :param dtu: Gets or sets the DTUs (Database Transaction Units). See - https://azure.microsoft.com/documentation/articles/sql-database-what-is-a-dtu/ - :type dtu: float - :param size_gb: Gets or sets size in gigabytes. - :type size_gb: float - """ - - _attribute_map = { - 'date_time_property': {'key': 'dateTime', 'type': 'iso-8601'}, - 'dtu': {'key': 'dtu', 'type': 'float'}, - 'size_gb': {'key': 'sizeGB', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(RecommendedElasticPoolMetric, self).__init__(**kwargs) - self.date_time_property = kwargs.get('date_time_property', None) - self.dtu = kwargs.get('dtu', None) - self.size_gb = kwargs.get('size_gb', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_paged.py deleted file mode 100644 index a5106f989535..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RecommendedElasticPoolMetricPaged(Paged): - """ - A paging container for iterating over a list of :class:`RecommendedElasticPoolMetric ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RecommendedElasticPoolMetric]'} - } - - def __init__(self, *args, **kwargs): - - super(RecommendedElasticPoolMetricPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_py3.py deleted file mode 100644 index d33210bf6e58..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecommendedElasticPoolMetric(Model): - """Represents recommended elastic pool metric. - - :param date_time_property: The time of metric (ISO8601 format). - :type date_time_property: datetime - :param dtu: Gets or sets the DTUs (Database Transaction Units). See - https://azure.microsoft.com/documentation/articles/sql-database-what-is-a-dtu/ - :type dtu: float - :param size_gb: Gets or sets size in gigabytes. - :type size_gb: float - """ - - _attribute_map = { - 'date_time_property': {'key': 'dateTime', 'type': 'iso-8601'}, - 'dtu': {'key': 'dtu', 'type': 'float'}, - 'size_gb': {'key': 'sizeGB', 'type': 'float'}, - } - - def __init__(self, *, date_time_property=None, dtu: float=None, size_gb: float=None, **kwargs) -> None: - super(RecommendedElasticPoolMetric, self).__init__(**kwargs) - self.date_time_property = date_time_property - self.dtu = dtu - self.size_gb = size_gb diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_paged.py deleted file mode 100644 index ceb235126fbe..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RecommendedElasticPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`RecommendedElasticPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RecommendedElasticPool]'} - } - - def __init__(self, *args, **kwargs): - - super(RecommendedElasticPoolPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_py3.py deleted file mode 100644 index 2f8a14d6abfa..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_py3.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RecommendedElasticPool(ProxyResource): - """Represents a recommended elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_edition: The edition of the recommended elastic pool. The - ElasticPoolEdition enumeration contains all the valid editions. Possible - values include: 'Basic', 'Standard', 'Premium' - :vartype database_edition: str or - ~azure.mgmt.sql.models.ElasticPoolEdition - :param dtu: The DTU for the recommended elastic pool. - :type dtu: float - :param database_dtu_min: The minimum DTU for the database. - :type database_dtu_min: float - :param database_dtu_max: The maximum DTU for the database. - :type database_dtu_max: float - :param storage_mb: Gets storage size in megabytes. - :type storage_mb: float - :ivar observation_period_start: The observation period start (ISO8601 - format). - :vartype observation_period_start: datetime - :ivar observation_period_end: The observation period start (ISO8601 - format). - :vartype observation_period_end: datetime - :ivar max_observed_dtu: Gets maximum observed DTU. - :vartype max_observed_dtu: float - :ivar max_observed_storage_mb: Gets maximum observed storage in megabytes. - :vartype max_observed_storage_mb: float - :ivar databases: The list of databases in this pool. Expanded property - :vartype databases: list[~azure.mgmt.sql.models.TrackedResource] - :ivar metrics: The list of databases housed in the server. Expanded - property - :vartype metrics: - list[~azure.mgmt.sql.models.RecommendedElasticPoolMetric] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_edition': {'readonly': True}, - 'observation_period_start': {'readonly': True}, - 'observation_period_end': {'readonly': True}, - 'max_observed_dtu': {'readonly': True}, - 'max_observed_storage_mb': {'readonly': True}, - 'databases': {'readonly': True}, - 'metrics': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'dtu': {'key': 'properties.dtu', 'type': 'float'}, - 'database_dtu_min': {'key': 'properties.databaseDtuMin', 'type': 'float'}, - 'database_dtu_max': {'key': 'properties.databaseDtuMax', 'type': 'float'}, - 'storage_mb': {'key': 'properties.storageMB', 'type': 'float'}, - 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, - 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, - 'max_observed_dtu': {'key': 'properties.maxObservedDtu', 'type': 'float'}, - 'max_observed_storage_mb': {'key': 'properties.maxObservedStorageMB', 'type': 'float'}, - 'databases': {'key': 'properties.databases', 'type': '[TrackedResource]'}, - 'metrics': {'key': 'properties.metrics', 'type': '[RecommendedElasticPoolMetric]'}, - } - - def __init__(self, *, dtu: float=None, database_dtu_min: float=None, database_dtu_max: float=None, storage_mb: float=None, **kwargs) -> None: - super(RecommendedElasticPool, self).__init__(**kwargs) - self.database_edition = None - self.dtu = dtu - self.database_dtu_min = database_dtu_min - self.database_dtu_max = database_dtu_max - self.storage_mb = storage_mb - self.observation_period_start = None - self.observation_period_end = None - self.max_observed_dtu = None - self.max_observed_storage_mb = None - self.databases = None - self.metrics = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index.py deleted file mode 100644 index df1eba91f84f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RecommendedIndex(ProxyResource): - """Represents a database recommended index. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar action: The proposed index action. You can create a missing index, - drop an unused index, or rebuild an existing index to improve its - performance. Possible values include: 'Create', 'Drop', 'Rebuild' - :vartype action: str or ~azure.mgmt.sql.models.RecommendedIndexAction - :ivar state: The current recommendation state. Possible values include: - 'Active', 'Pending', 'Executing', 'Verifying', 'Pending Revert', - 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success' - :vartype state: str or ~azure.mgmt.sql.models.RecommendedIndexState - :ivar created: The UTC datetime showing when this resource was created - (ISO8601 format). - :vartype created: datetime - :ivar last_modified: The UTC datetime of when was this resource last - changed (ISO8601 format). - :vartype last_modified: datetime - :ivar index_type: The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, - CLUSTERED COLUMNSTORE). Possible values include: 'CLUSTERED', - 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED COLUMNSTORE' - :vartype index_type: str or ~azure.mgmt.sql.models.RecommendedIndexType - :ivar schema: The schema where table to build index over resides - :vartype schema: str - :ivar table: The table on which to build index. - :vartype table: str - :ivar columns: Columns over which to build index - :vartype columns: list[str] - :ivar included_columns: The list of column names to be included in the - index - :vartype included_columns: list[str] - :ivar index_script: The full build index script - :vartype index_script: str - :ivar estimated_impact: The estimated impact of doing recommended index - action. - :vartype estimated_impact: list[~azure.mgmt.sql.models.OperationImpact] - :ivar reported_impact: The values reported after index action is complete. - :vartype reported_impact: list[~azure.mgmt.sql.models.OperationImpact] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'action': {'readonly': True}, - 'state': {'readonly': True}, - 'created': {'readonly': True}, - 'last_modified': {'readonly': True}, - 'index_type': {'readonly': True}, - 'schema': {'readonly': True}, - 'table': {'readonly': True}, - 'columns': {'readonly': True}, - 'included_columns': {'readonly': True}, - 'index_script': {'readonly': True}, - 'estimated_impact': {'readonly': True}, - 'reported_impact': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'action': {'key': 'properties.action', 'type': 'RecommendedIndexAction'}, - 'state': {'key': 'properties.state', 'type': 'RecommendedIndexState'}, - 'created': {'key': 'properties.created', 'type': 'iso-8601'}, - 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, - 'index_type': {'key': 'properties.indexType', 'type': 'RecommendedIndexType'}, - 'schema': {'key': 'properties.schema', 'type': 'str'}, - 'table': {'key': 'properties.table', 'type': 'str'}, - 'columns': {'key': 'properties.columns', 'type': '[str]'}, - 'included_columns': {'key': 'properties.includedColumns', 'type': '[str]'}, - 'index_script': {'key': 'properties.indexScript', 'type': 'str'}, - 'estimated_impact': {'key': 'properties.estimatedImpact', 'type': '[OperationImpact]'}, - 'reported_impact': {'key': 'properties.reportedImpact', 'type': '[OperationImpact]'}, - } - - def __init__(self, **kwargs): - super(RecommendedIndex, self).__init__(**kwargs) - self.action = None - self.state = None - self.created = None - self.last_modified = None - self.index_type = None - self.schema = None - self.table = None - self.columns = None - self.included_columns = None - self.index_script = None - self.estimated_impact = None - self.reported_impact = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index_py3.py deleted file mode 100644 index 5aea5620371e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index_py3.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RecommendedIndex(ProxyResource): - """Represents a database recommended index. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar action: The proposed index action. You can create a missing index, - drop an unused index, or rebuild an existing index to improve its - performance. Possible values include: 'Create', 'Drop', 'Rebuild' - :vartype action: str or ~azure.mgmt.sql.models.RecommendedIndexAction - :ivar state: The current recommendation state. Possible values include: - 'Active', 'Pending', 'Executing', 'Verifying', 'Pending Revert', - 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success' - :vartype state: str or ~azure.mgmt.sql.models.RecommendedIndexState - :ivar created: The UTC datetime showing when this resource was created - (ISO8601 format). - :vartype created: datetime - :ivar last_modified: The UTC datetime of when was this resource last - changed (ISO8601 format). - :vartype last_modified: datetime - :ivar index_type: The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, - CLUSTERED COLUMNSTORE). Possible values include: 'CLUSTERED', - 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED COLUMNSTORE' - :vartype index_type: str or ~azure.mgmt.sql.models.RecommendedIndexType - :ivar schema: The schema where table to build index over resides - :vartype schema: str - :ivar table: The table on which to build index. - :vartype table: str - :ivar columns: Columns over which to build index - :vartype columns: list[str] - :ivar included_columns: The list of column names to be included in the - index - :vartype included_columns: list[str] - :ivar index_script: The full build index script - :vartype index_script: str - :ivar estimated_impact: The estimated impact of doing recommended index - action. - :vartype estimated_impact: list[~azure.mgmt.sql.models.OperationImpact] - :ivar reported_impact: The values reported after index action is complete. - :vartype reported_impact: list[~azure.mgmt.sql.models.OperationImpact] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'action': {'readonly': True}, - 'state': {'readonly': True}, - 'created': {'readonly': True}, - 'last_modified': {'readonly': True}, - 'index_type': {'readonly': True}, - 'schema': {'readonly': True}, - 'table': {'readonly': True}, - 'columns': {'readonly': True}, - 'included_columns': {'readonly': True}, - 'index_script': {'readonly': True}, - 'estimated_impact': {'readonly': True}, - 'reported_impact': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'action': {'key': 'properties.action', 'type': 'RecommendedIndexAction'}, - 'state': {'key': 'properties.state', 'type': 'RecommendedIndexState'}, - 'created': {'key': 'properties.created', 'type': 'iso-8601'}, - 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, - 'index_type': {'key': 'properties.indexType', 'type': 'RecommendedIndexType'}, - 'schema': {'key': 'properties.schema', 'type': 'str'}, - 'table': {'key': 'properties.table', 'type': 'str'}, - 'columns': {'key': 'properties.columns', 'type': '[str]'}, - 'included_columns': {'key': 'properties.includedColumns', 'type': '[str]'}, - 'index_script': {'key': 'properties.indexScript', 'type': 'str'}, - 'estimated_impact': {'key': 'properties.estimatedImpact', 'type': '[OperationImpact]'}, - 'reported_impact': {'key': 'properties.reportedImpact', 'type': '[OperationImpact]'}, - } - - def __init__(self, **kwargs) -> None: - super(RecommendedIndex, self).__init__(**kwargs) - self.action = None - self.state = None - self.created = None - self.last_modified = None - self.index_type = None - self.schema = None - self.table = None - self.columns = None - self.included_columns = None - self.index_script = None - self.estimated_impact = None - self.reported_impact = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database.py deleted file mode 100644 index 0d3b630ce18d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RecoverableDatabase(ProxyResource): - """A recoverable database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar edition: The edition of the database - :vartype edition: str - :ivar service_level_objective: The service level objective name of the - database - :vartype service_level_objective: str - :ivar elastic_pool_name: The elastic pool name of the database - :vartype elastic_pool_name: str - :ivar last_available_backup_date: The last available backup date of the - database (ISO8601 format) - :vartype last_available_backup_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'edition': {'readonly': True}, - 'service_level_objective': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'last_available_backup_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'edition': {'key': 'properties.edition', 'type': 'str'}, - 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(RecoverableDatabase, self).__init__(**kwargs) - self.edition = None - self.service_level_objective = None - self.elastic_pool_name = None - self.last_available_backup_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_paged.py deleted file mode 100644 index cf4cde8ae7e0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RecoverableDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`RecoverableDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RecoverableDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(RecoverableDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_py3.py deleted file mode 100644 index 8eb9d5510689..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RecoverableDatabase(ProxyResource): - """A recoverable database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar edition: The edition of the database - :vartype edition: str - :ivar service_level_objective: The service level objective name of the - database - :vartype service_level_objective: str - :ivar elastic_pool_name: The elastic pool name of the database - :vartype elastic_pool_name: str - :ivar last_available_backup_date: The last available backup date of the - database (ISO8601 format) - :vartype last_available_backup_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'edition': {'readonly': True}, - 'service_level_objective': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'last_available_backup_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'edition': {'key': 'properties.edition', 'type': 'str'}, - 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(RecoverableDatabase, self).__init__(**kwargs) - self.edition = None - self.service_level_objective = None - self.elastic_pool_name = None - self.last_available_backup_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database.py deleted file mode 100644 index cd6adeaeac89..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RecoverableManagedDatabase(ProxyResource): - """A recoverable managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar last_available_backup_date: The last available backup date. - :vartype last_available_backup_date: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'last_available_backup_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RecoverableManagedDatabase, self).__init__(**kwargs) - self.last_available_backup_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_paged.py deleted file mode 100644 index 9c3a35713275..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RecoverableManagedDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`RecoverableManagedDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RecoverableManagedDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(RecoverableManagedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_py3.py deleted file mode 100644 index b6f295aceffb..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RecoverableManagedDatabase(ProxyResource): - """A recoverable managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar last_available_backup_date: The last available backup date. - :vartype last_available_backup_date: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'last_available_backup_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(RecoverableManagedDatabase, self).__init__(**kwargs) - self.last_available_backup_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link.py deleted file mode 100644 index 450161ab6c9b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ReplicationLink(ProxyResource): - """Represents a database replication link. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Location of the server that contains this firewall rule. - :vartype location: str - :ivar is_termination_allowed: Legacy value indicating whether termination - is allowed. Currently always returns true. - :vartype is_termination_allowed: bool - :ivar replication_mode: Replication mode of this replication link. - :vartype replication_mode: str - :ivar partner_server: The name of the server hosting the partner database. - :vartype partner_server: str - :ivar partner_database: The name of the partner database. - :vartype partner_database: str - :ivar partner_location: The Azure Region of the partner database. - :vartype partner_location: str - :ivar role: The role of the database in the replication link. Possible - values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', - 'Copy' - :vartype role: str or ~azure.mgmt.sql.models.ReplicationRole - :ivar partner_role: The role of the partner database in the replication - link. Possible values include: 'Primary', 'Secondary', - 'NonReadableSecondary', 'Source', 'Copy' - :vartype partner_role: str or ~azure.mgmt.sql.models.ReplicationRole - :ivar start_time: The start time for the replication link. - :vartype start_time: datetime - :ivar percent_complete: The percentage of seeding complete for the - replication link. - :vartype percent_complete: int - :ivar replication_state: The replication state for the replication link. - Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP', 'SUSPENDED' - :vartype replication_state: str or ~azure.mgmt.sql.models.ReplicationState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'is_termination_allowed': {'readonly': True}, - 'replication_mode': {'readonly': True}, - 'partner_server': {'readonly': True}, - 'partner_database': {'readonly': True}, - 'partner_location': {'readonly': True}, - 'role': {'readonly': True}, - 'partner_role': {'readonly': True}, - 'start_time': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'replication_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'is_termination_allowed': {'key': 'properties.isTerminationAllowed', 'type': 'bool'}, - 'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'}, - 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, - 'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'}, - 'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'}, - 'role': {'key': 'properties.role', 'type': 'ReplicationRole'}, - 'partner_role': {'key': 'properties.partnerRole', 'type': 'ReplicationRole'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ReplicationLink, self).__init__(**kwargs) - self.location = None - self.is_termination_allowed = None - self.replication_mode = None - self.partner_server = None - self.partner_database = None - self.partner_location = None - self.role = None - self.partner_role = None - self.start_time = None - self.percent_complete = None - self.replication_state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_paged.py deleted file mode 100644 index 18b96c9e0e3c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ReplicationLinkPaged(Paged): - """ - A paging container for iterating over a list of :class:`ReplicationLink ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ReplicationLink]'} - } - - def __init__(self, *args, **kwargs): - - super(ReplicationLinkPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_py3.py deleted file mode 100644 index 740748f154b2..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_py3.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ReplicationLink(ProxyResource): - """Represents a database replication link. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Location of the server that contains this firewall rule. - :vartype location: str - :ivar is_termination_allowed: Legacy value indicating whether termination - is allowed. Currently always returns true. - :vartype is_termination_allowed: bool - :ivar replication_mode: Replication mode of this replication link. - :vartype replication_mode: str - :ivar partner_server: The name of the server hosting the partner database. - :vartype partner_server: str - :ivar partner_database: The name of the partner database. - :vartype partner_database: str - :ivar partner_location: The Azure Region of the partner database. - :vartype partner_location: str - :ivar role: The role of the database in the replication link. Possible - values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', - 'Copy' - :vartype role: str or ~azure.mgmt.sql.models.ReplicationRole - :ivar partner_role: The role of the partner database in the replication - link. Possible values include: 'Primary', 'Secondary', - 'NonReadableSecondary', 'Source', 'Copy' - :vartype partner_role: str or ~azure.mgmt.sql.models.ReplicationRole - :ivar start_time: The start time for the replication link. - :vartype start_time: datetime - :ivar percent_complete: The percentage of seeding complete for the - replication link. - :vartype percent_complete: int - :ivar replication_state: The replication state for the replication link. - Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP', 'SUSPENDED' - :vartype replication_state: str or ~azure.mgmt.sql.models.ReplicationState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'is_termination_allowed': {'readonly': True}, - 'replication_mode': {'readonly': True}, - 'partner_server': {'readonly': True}, - 'partner_database': {'readonly': True}, - 'partner_location': {'readonly': True}, - 'role': {'readonly': True}, - 'partner_role': {'readonly': True}, - 'start_time': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'replication_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'is_termination_allowed': {'key': 'properties.isTerminationAllowed', 'type': 'bool'}, - 'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'}, - 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, - 'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'}, - 'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'}, - 'role': {'key': 'properties.role', 'type': 'ReplicationRole'}, - 'partner_role': {'key': 'properties.partnerRole', 'type': 'ReplicationRole'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ReplicationLink, self).__init__(**kwargs) - self.location = None - self.is_termination_allowed = None - self.replication_mode = None - self.partner_server = None - self.partner_database = None - self.partner_location = None - self.role = None - self.partner_role = None - self.start_time = None - self.percent_complete = None - self.replication_state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource.py deleted file mode 100644 index fc92549d32e9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """ARM resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity.py deleted file mode 100644 index 57a9e4b4a161..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceIdentity(Model): - """Azure Active Directory identity configuration for a resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The Azure Active Directory principal id. - :vartype principal_id: str - :param type: The identity type. Set this to 'SystemAssigned' in order to - automatically create and assign an Azure Active Directory principal for - the resource. Possible values include: 'SystemAssigned' - :type type: str or ~azure.mgmt.sql.models.IdentityType - :ivar tenant_id: The Azure Active Directory tenant id. - :vartype tenant_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceIdentity, self).__init__(**kwargs) - self.principal_id = None - self.type = kwargs.get('type', None) - self.tenant_id = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity_py3.py deleted file mode 100644 index 3b1d8d90f100..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceIdentity(Model): - """Azure Active Directory identity configuration for a resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The Azure Active Directory principal id. - :vartype principal_id: str - :param type: The identity type. Set this to 'SystemAssigned' in order to - automatically create and assign an Azure Active Directory principal for - the resource. Possible values include: 'SystemAssigned' - :type type: str or ~azure.mgmt.sql.models.IdentityType - :ivar tenant_id: The Azure Active Directory tenant id. - :vartype tenant_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ResourceIdentity, self).__init__(**kwargs) - self.principal_id = None - self.type = type - self.tenant_id = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition.py deleted file mode 100644 index 2c933120d7c8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceMoveDefinition(Model): - """Contains the information necessary to perform a resource move (rename). - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The target ID for the resource - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceMoveDefinition, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition_py3.py deleted file mode 100644 index f6ce2ac0f628..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceMoveDefinition(Model): - """Contains the information necessary to perform a resource move (rename). - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The target ID for the resource - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str, **kwargs) -> None: - super(ResourceMoveDefinition, self).__init__(**kwargs) - self.id = id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_py3.py deleted file mode 100644 index aedc5cfaf0b9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """ARM resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database.py deleted file mode 100644 index 8e419fb0b50b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RestorableDroppedDatabase(ProxyResource): - """A restorable dropped database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: The geo-location where the resource lives - :vartype location: str - :ivar database_name: The name of the database - :vartype database_name: str - :ivar edition: The edition of the database - :vartype edition: str - :ivar max_size_bytes: The max size in bytes of the database - :vartype max_size_bytes: str - :ivar service_level_objective: The service level objective name of the - database - :vartype service_level_objective: str - :ivar elastic_pool_name: The elastic pool name of the database - :vartype elastic_pool_name: str - :ivar creation_date: The creation date of the database (ISO8601 format) - :vartype creation_date: datetime - :ivar deletion_date: The deletion date of the database (ISO8601 format) - :vartype deletion_date: datetime - :ivar earliest_restore_date: The earliest restore date of the database - (ISO8601 format) - :vartype earliest_restore_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'database_name': {'readonly': True}, - 'edition': {'readonly': True}, - 'max_size_bytes': {'readonly': True}, - 'service_level_objective': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'edition': {'key': 'properties.edition', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'str'}, - 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(RestorableDroppedDatabase, self).__init__(**kwargs) - self.location = None - self.database_name = None - self.edition = None - self.max_size_bytes = None - self.service_level_objective = None - self.elastic_pool_name = None - self.creation_date = None - self.deletion_date = None - self.earliest_restore_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_paged.py deleted file mode 100644 index b0eb93010942..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RestorableDroppedDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`RestorableDroppedDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RestorableDroppedDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(RestorableDroppedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_py3.py deleted file mode 100644 index 0e4a5f45ec89..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_py3.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RestorableDroppedDatabase(ProxyResource): - """A restorable dropped database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: The geo-location where the resource lives - :vartype location: str - :ivar database_name: The name of the database - :vartype database_name: str - :ivar edition: The edition of the database - :vartype edition: str - :ivar max_size_bytes: The max size in bytes of the database - :vartype max_size_bytes: str - :ivar service_level_objective: The service level objective name of the - database - :vartype service_level_objective: str - :ivar elastic_pool_name: The elastic pool name of the database - :vartype elastic_pool_name: str - :ivar creation_date: The creation date of the database (ISO8601 format) - :vartype creation_date: datetime - :ivar deletion_date: The deletion date of the database (ISO8601 format) - :vartype deletion_date: datetime - :ivar earliest_restore_date: The earliest restore date of the database - (ISO8601 format) - :vartype earliest_restore_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'database_name': {'readonly': True}, - 'edition': {'readonly': True}, - 'max_size_bytes': {'readonly': True}, - 'service_level_objective': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'edition': {'key': 'properties.edition', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'str'}, - 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(RestorableDroppedDatabase, self).__init__(**kwargs) - self.location = None - self.database_name = None - self.edition = None - self.max_size_bytes = None - self.service_level_objective = None - self.elastic_pool_name = None - self.creation_date = None - self.deletion_date = None - self.earliest_restore_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database.py deleted file mode 100644 index e23713aa2a2d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class RestorableDroppedManagedDatabase(TrackedResource): - """A restorable dropped managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :ivar database_name: The name of the database. - :vartype database_name: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar deletion_date: The deletion date of the database (ISO8601 format). - :vartype deletion_date: datetime - :ivar earliest_restore_date: The earliest restore date of the database - (ISO8601 format). - :vartype earliest_restore_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'database_name': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(RestorableDroppedManagedDatabase, self).__init__(**kwargs) - self.database_name = None - self.creation_date = None - self.deletion_date = None - self.earliest_restore_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_paged.py deleted file mode 100644 index d6e432c2c351..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RestorableDroppedManagedDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`RestorableDroppedManagedDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RestorableDroppedManagedDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(RestorableDroppedManagedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_py3.py deleted file mode 100644 index 7997b13a21ce..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class RestorableDroppedManagedDatabase(TrackedResource): - """A restorable dropped managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :ivar database_name: The name of the database. - :vartype database_name: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar deletion_date: The deletion date of the database (ISO8601 format). - :vartype deletion_date: datetime - :ivar earliest_restore_date: The earliest restore date of the database - (ISO8601 format). - :vartype earliest_restore_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'database_name': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(RestorableDroppedManagedDatabase, self).__init__(location=location, tags=tags, **kwargs) - self.database_name = None - self.creation_date = None - self.deletion_date = None - self.earliest_restore_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point.py deleted file mode 100644 index 86cf0382ffc8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RestorePoint(ProxyResource): - """Database restore points. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar restore_point_type: The type of restore point. Possible values - include: 'CONTINUOUS', 'DISCRETE' - :vartype restore_point_type: str or - ~azure.mgmt.sql.models.RestorePointType - :ivar earliest_restore_date: The earliest time to which this database can - be restored - :vartype earliest_restore_date: datetime - :ivar restore_point_creation_date: The time the backup was taken - :vartype restore_point_creation_date: datetime - :ivar restore_point_label: The label of restore point for backup request - by user - :vartype restore_point_label: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'restore_point_type': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'restore_point_creation_date': {'readonly': True}, - 'restore_point_label': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'restore_point_type': {'key': 'properties.restorePointType', 'type': 'RestorePointType'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, - 'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RestorePoint, self).__init__(**kwargs) - self.location = None - self.restore_point_type = None - self.earliest_restore_date = None - self.restore_point_creation_date = None - self.restore_point_label = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_paged.py deleted file mode 100644 index b77cde666dd0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RestorePointPaged(Paged): - """ - A paging container for iterating over a list of :class:`RestorePoint ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RestorePoint]'} - } - - def __init__(self, *args, **kwargs): - - super(RestorePointPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_py3.py deleted file mode 100644 index 886f576a4575..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RestorePoint(ProxyResource): - """Database restore points. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar restore_point_type: The type of restore point. Possible values - include: 'CONTINUOUS', 'DISCRETE' - :vartype restore_point_type: str or - ~azure.mgmt.sql.models.RestorePointType - :ivar earliest_restore_date: The earliest time to which this database can - be restored - :vartype earliest_restore_date: datetime - :ivar restore_point_creation_date: The time the backup was taken - :vartype restore_point_creation_date: datetime - :ivar restore_point_label: The label of restore point for backup request - by user - :vartype restore_point_label: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'restore_point_type': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'restore_point_creation_date': {'readonly': True}, - 'restore_point_label': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'restore_point_type': {'key': 'properties.restorePointType', 'type': 'RestorePointType'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, - 'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(RestorePoint, self).__init__(**kwargs) - self.location = None - self.restore_point_type = None - self.earliest_restore_date = None - self.restore_point_creation_date = None - self.restore_point_label = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label.py deleted file mode 100644 index a076a11634e6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SensitivityLabel(ProxyResource): - """A sensitivity label. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param label_name: The label name. - :type label_name: str - :param label_id: The label ID. - :type label_id: str - :param information_type: The information type. - :type information_type: str - :param information_type_id: The information type ID. - :type information_type_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'label_name': {'key': 'properties.labelName', 'type': 'str'}, - 'label_id': {'key': 'properties.labelId', 'type': 'str'}, - 'information_type': {'key': 'properties.informationType', 'type': 'str'}, - 'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SensitivityLabel, self).__init__(**kwargs) - self.label_name = kwargs.get('label_name', None) - self.label_id = kwargs.get('label_id', None) - self.information_type = kwargs.get('information_type', None) - self.information_type_id = kwargs.get('information_type_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_paged.py deleted file mode 100644 index 438bfd86f9be..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SensitivityLabelPaged(Paged): - """ - A paging container for iterating over a list of :class:`SensitivityLabel ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SensitivityLabel]'} - } - - def __init__(self, *args, **kwargs): - - super(SensitivityLabelPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_py3.py deleted file mode 100644 index f304363d916b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SensitivityLabel(ProxyResource): - """A sensitivity label. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param label_name: The label name. - :type label_name: str - :param label_id: The label ID. - :type label_id: str - :param information_type: The information type. - :type information_type: str - :param information_type_id: The information type ID. - :type information_type_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'label_name': {'key': 'properties.labelName', 'type': 'str'}, - 'label_id': {'key': 'properties.labelId', 'type': 'str'}, - 'information_type': {'key': 'properties.informationType', 'type': 'str'}, - 'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'}, - } - - def __init__(self, *, label_name: str=None, label_id: str=None, information_type: str=None, information_type_id: str=None, **kwargs) -> None: - super(SensitivityLabel, self).__init__(**kwargs) - self.label_name = label_name - self.label_id = label_id - self.information_type = information_type - self.information_type_id = information_type_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server.py deleted file mode 100644 index 1c399fadb353..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class Server(TrackedResource): - """An Azure SQL Database server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.sql.models.ResourceIdentity - :ivar kind: Kind of sql server. This is metadata used for the Azure portal - experience. - :vartype kind: str - :param administrator_login: Administrator username for the server. Once - created it cannot be changed. - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for server creation). - :type administrator_login_password: str - :param version: The version of the server. - :type version: str - :ivar state: The state of the server. - :vartype state: str - :ivar fully_qualified_domain_name: The fully qualified domain name of the - server. - :vartype fully_qualified_domain_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'state': {'readonly': True}, - 'fully_qualified_domain_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Server, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.kind = None - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.version = kwargs.get('version', None) - self.state = None - self.fully_qualified_domain_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning.py deleted file mode 100644 index 583c0b843c1b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerAutomaticTuning(ProxyResource): - """Server-level Automatic Tuning. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param desired_state: Automatic tuning desired state. Possible values - include: 'Custom', 'Auto', 'Unspecified' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningServerMode - :ivar actual_state: Automatic tuning actual state. Possible values - include: 'Custom', 'Auto', 'Unspecified' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningServerMode - :param options: Automatic tuning options definition. - :type options: dict[str, - ~azure.mgmt.sql.models.AutomaticTuningServerOptions] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'actual_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningServerMode'}, - 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningServerMode'}, - 'options': {'key': 'properties.options', 'type': '{AutomaticTuningServerOptions}'}, - } - - def __init__(self, **kwargs): - super(ServerAutomaticTuning, self).__init__(**kwargs) - self.desired_state = kwargs.get('desired_state', None) - self.actual_state = None - self.options = kwargs.get('options', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning_py3.py deleted file mode 100644 index fb8fb4804610..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerAutomaticTuning(ProxyResource): - """Server-level Automatic Tuning. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param desired_state: Automatic tuning desired state. Possible values - include: 'Custom', 'Auto', 'Unspecified' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningServerMode - :ivar actual_state: Automatic tuning actual state. Possible values - include: 'Custom', 'Auto', 'Unspecified' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningServerMode - :param options: Automatic tuning options definition. - :type options: dict[str, - ~azure.mgmt.sql.models.AutomaticTuningServerOptions] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'actual_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningServerMode'}, - 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningServerMode'}, - 'options': {'key': 'properties.options', 'type': '{AutomaticTuningServerOptions}'}, - } - - def __init__(self, *, desired_state=None, options=None, **kwargs) -> None: - super(ServerAutomaticTuning, self).__init__(**kwargs) - self.desired_state = desired_state - self.actual_state = None - self.options = options diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator.py deleted file mode 100644 index ef037e8a9dc8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerAzureADAdministrator(ProxyResource): - """An server Active Directory Administrator. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar administrator_type: Required. The type of administrator. Default - value: "ActiveDirectory" . - :vartype administrator_type: str - :param login: Required. The server administrator login value. - :type login: str - :param sid: Required. The server administrator Sid (Secure ID). - :type sid: str - :param tenant_id: Required. The server Active Directory Administrator - tenant id. - :type tenant_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'administrator_type': {'required': True, 'constant': True}, - 'login': {'required': True}, - 'sid': {'required': True}, - 'tenant_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, - 'login': {'key': 'properties.login', 'type': 'str'}, - 'sid': {'key': 'properties.sid', 'type': 'str'}, - 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, - } - - administrator_type = "ActiveDirectory" - - def __init__(self, **kwargs): - super(ServerAzureADAdministrator, self).__init__(**kwargs) - self.login = kwargs.get('login', None) - self.sid = kwargs.get('sid', None) - self.tenant_id = kwargs.get('tenant_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_paged.py deleted file mode 100644 index 519adc226385..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerAzureADAdministratorPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerAzureADAdministrator ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerAzureADAdministrator]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerAzureADAdministratorPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_py3.py deleted file mode 100644 index 3dfeb71123c3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerAzureADAdministrator(ProxyResource): - """An server Active Directory Administrator. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar administrator_type: Required. The type of administrator. Default - value: "ActiveDirectory" . - :vartype administrator_type: str - :param login: Required. The server administrator login value. - :type login: str - :param sid: Required. The server administrator Sid (Secure ID). - :type sid: str - :param tenant_id: Required. The server Active Directory Administrator - tenant id. - :type tenant_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'administrator_type': {'required': True, 'constant': True}, - 'login': {'required': True}, - 'sid': {'required': True}, - 'tenant_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, - 'login': {'key': 'properties.login', 'type': 'str'}, - 'sid': {'key': 'properties.sid', 'type': 'str'}, - 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, - } - - administrator_type = "ActiveDirectory" - - def __init__(self, *, login: str, sid: str, tenant_id: str, **kwargs) -> None: - super(ServerAzureADAdministrator, self).__init__(**kwargs) - self.login = login - self.sid = sid - self.tenant_id = tenant_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy.py deleted file mode 100644 index 9a7bc69b8c5d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy.py +++ /dev/null @@ -1,160 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerBlobAuditingPolicy(ProxyResource): - """A server blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ServerBlobAuditingPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) - self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) - self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) - self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy_py3.py deleted file mode 100644 index 120d066e6427..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy_py3.py +++ /dev/null @@ -1,160 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerBlobAuditingPolicy(ProxyResource): - """A server blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: - super(ServerBlobAuditingPolicy, self).__init__(**kwargs) - self.state = state - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.audit_actions_and_groups = audit_actions_and_groups - self.storage_account_subscription_id = storage_account_subscription_id - self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use - self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link.py deleted file mode 100644 index 88fef4fa788f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerCommunicationLink(ProxyResource): - """Server communication link. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar state: The state. - :vartype state: str - :param partner_server: Required. The name of the partner server. - :type partner_server: str - :ivar location: Communication link location. - :vartype location: str - :ivar kind: Communication link kind. This property is used for Azure - Portal metadata. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'readonly': True}, - 'partner_server': {'required': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerCommunicationLink, self).__init__(**kwargs) - self.state = None - self.partner_server = kwargs.get('partner_server', None) - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_paged.py deleted file mode 100644 index 6e2fef5d7ce0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerCommunicationLinkPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerCommunicationLink ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerCommunicationLink]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerCommunicationLinkPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_py3.py deleted file mode 100644 index 6a32069ca067..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerCommunicationLink(ProxyResource): - """Server communication link. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar state: The state. - :vartype state: str - :param partner_server: Required. The name of the partner server. - :type partner_server: str - :ivar location: Communication link location. - :vartype location: str - :ivar kind: Communication link kind. This property is used for Azure - Portal metadata. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'readonly': True}, - 'partner_server': {'required': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, partner_server: str, **kwargs) -> None: - super(ServerCommunicationLink, self).__init__(**kwargs) - self.state = None - self.partner_server = partner_server - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy.py deleted file mode 100644 index dd0097235550..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerConnectionPolicy(ProxyResource): - """A server secure connection policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Metadata used for the Azure portal experience. - :vartype kind: str - :ivar location: Resource location. - :vartype location: str - :param connection_type: Required. The server connection type. Possible - values include: 'Default', 'Proxy', 'Redirect' - :type connection_type: str or ~azure.mgmt.sql.models.ServerConnectionType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - 'connection_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'connection_type': {'key': 'properties.connectionType', 'type': 'ServerConnectionType'}, - } - - def __init__(self, **kwargs): - super(ServerConnectionPolicy, self).__init__(**kwargs) - self.kind = None - self.location = None - self.connection_type = kwargs.get('connection_type', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy_py3.py deleted file mode 100644 index 10bd81052301..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerConnectionPolicy(ProxyResource): - """A server secure connection policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Metadata used for the Azure portal experience. - :vartype kind: str - :ivar location: Resource location. - :vartype location: str - :param connection_type: Required. The server connection type. Possible - values include: 'Default', 'Proxy', 'Redirect' - :type connection_type: str or ~azure.mgmt.sql.models.ServerConnectionType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - 'connection_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'connection_type': {'key': 'properties.connectionType', 'type': 'ServerConnectionType'}, - } - - def __init__(self, *, connection_type, **kwargs) -> None: - super(ServerConnectionPolicy, self).__init__(**kwargs) - self.kind = None - self.location = None - self.connection_type = connection_type diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias.py deleted file mode 100644 index 691db960c1a7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerDnsAlias(ProxyResource): - """A server DNS alias. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar azure_dns_record: The fully qualified DNS record for alias - :vartype azure_dns_record: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'azure_dns_record': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'azure_dns_record': {'key': 'properties.azureDnsRecord', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerDnsAlias, self).__init__(**kwargs) - self.azure_dns_record = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition.py deleted file mode 100644 index 2f7757f5daf2..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerDnsAliasAcquisition(Model): - """A server DNS alias acquisition request. - - :param old_server_dns_alias_id: The id of the server alias that will be - acquired to point to this server instead. - :type old_server_dns_alias_id: str - """ - - _attribute_map = { - 'old_server_dns_alias_id': {'key': 'oldServerDnsAliasId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerDnsAliasAcquisition, self).__init__(**kwargs) - self.old_server_dns_alias_id = kwargs.get('old_server_dns_alias_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition_py3.py deleted file mode 100644 index 93cf9e0027c9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerDnsAliasAcquisition(Model): - """A server DNS alias acquisition request. - - :param old_server_dns_alias_id: The id of the server alias that will be - acquired to point to this server instead. - :type old_server_dns_alias_id: str - """ - - _attribute_map = { - 'old_server_dns_alias_id': {'key': 'oldServerDnsAliasId', 'type': 'str'}, - } - - def __init__(self, *, old_server_dns_alias_id: str=None, **kwargs) -> None: - super(ServerDnsAliasAcquisition, self).__init__(**kwargs) - self.old_server_dns_alias_id = old_server_dns_alias_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_paged.py deleted file mode 100644 index 2fdd93879f3b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerDnsAliasPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerDnsAlias ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerDnsAlias]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerDnsAliasPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_py3.py deleted file mode 100644 index c57df1a85f06..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerDnsAlias(ProxyResource): - """A server DNS alias. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar azure_dns_record: The fully qualified DNS record for alias - :vartype azure_dns_record: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'azure_dns_record': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'azure_dns_record': {'key': 'properties.azureDnsRecord', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ServerDnsAlias, self).__init__(**kwargs) - self.azure_dns_record = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key.py deleted file mode 100644 index 1258d1e0da7f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerKey(ProxyResource): - """A server key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :type kind: str - :ivar location: Resource location. - :vartype location: str - :ivar subregion: Subregion of the server key. - :vartype subregion: str - :param server_key_type: Required. The server key type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :param uri: The URI of the server key. - :type uri: str - :param thumbprint: Thumbprint of the server key. - :type thumbprint: str - :param creation_date: The server key creation date. - :type creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'subregion': {'readonly': True}, - 'server_key_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'subregion': {'key': 'properties.subregion', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ServerKey, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) - self.location = None - self.subregion = None - self.server_key_type = kwargs.get('server_key_type', None) - self.uri = kwargs.get('uri', None) - self.thumbprint = kwargs.get('thumbprint', None) - self.creation_date = kwargs.get('creation_date', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_paged.py deleted file mode 100644 index 1d5e262c9c89..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerKeyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerKey ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerKey]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerKeyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_py3.py deleted file mode 100644 index 41ef40ab165a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerKey(ProxyResource): - """A server key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :type kind: str - :ivar location: Resource location. - :vartype location: str - :ivar subregion: Subregion of the server key. - :vartype subregion: str - :param server_key_type: Required. The server key type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :param uri: The URI of the server key. - :type uri: str - :param thumbprint: Thumbprint of the server key. - :type thumbprint: str - :param creation_date: The server key creation date. - :type creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'subregion': {'readonly': True}, - 'server_key_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'subregion': {'key': 'properties.subregion', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, server_key_type, kind: str=None, uri: str=None, thumbprint: str=None, creation_date=None, **kwargs) -> None: - super(ServerKey, self).__init__(**kwargs) - self.kind = kind - self.location = None - self.subregion = None - self.server_key_type = server_key_type - self.uri = uri - self.thumbprint = thumbprint - self.creation_date = creation_date diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_paged.py deleted file mode 100644 index 2d6e6fe0e114..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerPaged(Paged): - """ - A paging container for iterating over a list of :class:`Server ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Server]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_py3.py deleted file mode 100644 index 625c4d0aea4c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_py3.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class Server(TrackedResource): - """An Azure SQL Database server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.sql.models.ResourceIdentity - :ivar kind: Kind of sql server. This is metadata used for the Azure portal - experience. - :vartype kind: str - :param administrator_login: Administrator username for the server. Once - created it cannot be changed. - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for server creation). - :type administrator_login_password: str - :param version: The version of the server. - :type version: str - :ivar state: The state of the server. - :vartype state: str - :ivar fully_qualified_domain_name: The fully qualified domain name of the - server. - :vartype fully_qualified_domain_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'state': {'readonly': True}, - 'fully_qualified_domain_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, identity=None, administrator_login: str=None, administrator_login_password: str=None, version: str=None, **kwargs) -> None: - super(Server, self).__init__(location=location, tags=tags, **kwargs) - self.identity = identity - self.kind = None - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.version = version - self.state = None - self.fully_qualified_domain_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy.py deleted file mode 100644 index 06c40dd93125..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerSecurityAlertPolicy(ProxyResource): - """A server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_paged.py deleted file mode 100644 index 3a8836b45245..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerSecurityAlertPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerSecurityAlertPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerSecurityAlertPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_py3.py deleted file mode 100644 index 38c0c87b0372..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerSecurityAlertPolicy(ProxyResource): - """A server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: - super(ServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update.py deleted file mode 100644 index d39d49bea953..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerUpdate(Model): - """An update request for an Azure SQL Database server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param administrator_login: Administrator username for the server. Once - created it cannot be changed. - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for server creation). - :type administrator_login_password: str - :param version: The version of the server. - :type version: str - :ivar state: The state of the server. - :vartype state: str - :ivar fully_qualified_domain_name: The fully qualified domain name of the - server. - :vartype fully_qualified_domain_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'state': {'readonly': True}, - 'fully_qualified_domain_name': {'readonly': True}, - } - - _attribute_map = { - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ServerUpdate, self).__init__(**kwargs) - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.version = kwargs.get('version', None) - self.state = None - self.fully_qualified_domain_name = None - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update_py3.py deleted file mode 100644 index 863f2b52fa01..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerUpdate(Model): - """An update request for an Azure SQL Database server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param administrator_login: Administrator username for the server. Once - created it cannot be changed. - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for server creation). - :type administrator_login_password: str - :param version: The version of the server. - :type version: str - :ivar state: The state of the server. - :vartype state: str - :ivar fully_qualified_domain_name: The fully qualified domain name of the - server. - :vartype fully_qualified_domain_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'state': {'readonly': True}, - 'fully_qualified_domain_name': {'readonly': True}, - } - - _attribute_map = { - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, administrator_login: str=None, administrator_login_password: str=None, version: str=None, tags=None, **kwargs) -> None: - super(ServerUpdate, self).__init__(**kwargs) - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.version = version - self.state = None - self.fully_qualified_domain_name = None - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage.py deleted file mode 100644 index e04fb8c60a82..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerUsage(Model): - """Represents server metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of the server usage metric. - :vartype name: str - :ivar resource_name: The name of the resource. - :vartype resource_name: str - :ivar display_name: The metric display name. - :vartype display_name: str - :ivar current_value: The current value of the metric. - :vartype current_value: float - :ivar limit: The current limit of the metric. - :vartype limit: float - :ivar unit: The units of the metric. - :vartype unit: str - :ivar next_reset_time: The next reset time for the metric (ISO8601 - format). - :vartype next_reset_time: datetime - """ - - _validation = { - 'name': {'readonly': True}, - 'resource_name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'next_reset_time': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_name': {'key': 'resourceName', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ServerUsage, self).__init__(**kwargs) - self.name = None - self.resource_name = None - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None - self.next_reset_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_paged.py deleted file mode 100644 index 688d3b408383..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerUsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerUsage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerUsage]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerUsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_py3.py deleted file mode 100644 index 3a6feaecdc8d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerUsage(Model): - """Represents server metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of the server usage metric. - :vartype name: str - :ivar resource_name: The name of the resource. - :vartype resource_name: str - :ivar display_name: The metric display name. - :vartype display_name: str - :ivar current_value: The current value of the metric. - :vartype current_value: float - :ivar limit: The current limit of the metric. - :vartype limit: float - :ivar unit: The units of the metric. - :vartype unit: str - :ivar next_reset_time: The next reset time for the metric (ISO8601 - format). - :vartype next_reset_time: datetime - """ - - _validation = { - 'name': {'readonly': True}, - 'resource_name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'next_reset_time': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_name': {'key': 'resourceName', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(ServerUsage, self).__init__(**kwargs) - self.name = None - self.resource_name = None - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None - self.next_reset_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability.py deleted file mode 100644 index 811e93df8aa4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerVersionCapability(Model): - """The server capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The server version name. - :vartype name: str - :ivar supported_editions: The list of supported database editions. - :vartype supported_editions: - list[~azure.mgmt.sql.models.EditionCapability] - :ivar supported_elastic_pool_editions: The list of supported elastic pool - editions. - :vartype supported_elastic_pool_editions: - list[~azure.mgmt.sql.models.ElasticPoolEditionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_editions': {'readonly': True}, - 'supported_elastic_pool_editions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_editions': {'key': 'supportedEditions', 'type': '[EditionCapability]'}, - 'supported_elastic_pool_editions': {'key': 'supportedElasticPoolEditions', 'type': '[ElasticPoolEditionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerVersionCapability, self).__init__(**kwargs) - self.name = None - self.supported_editions = None - self.supported_elastic_pool_editions = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability_py3.py deleted file mode 100644 index 66a1a0251ede..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerVersionCapability(Model): - """The server capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The server version name. - :vartype name: str - :ivar supported_editions: The list of supported database editions. - :vartype supported_editions: - list[~azure.mgmt.sql.models.EditionCapability] - :ivar supported_elastic_pool_editions: The list of supported elastic pool - editions. - :vartype supported_elastic_pool_editions: - list[~azure.mgmt.sql.models.ElasticPoolEditionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_editions': {'readonly': True}, - 'supported_elastic_pool_editions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_editions': {'key': 'supportedEditions', 'type': '[EditionCapability]'}, - 'supported_elastic_pool_editions': {'key': 'supportedElasticPoolEditions', 'type': '[ElasticPoolEditionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ServerVersionCapability, self).__init__(**kwargs) - self.name = None - self.supported_editions = None - self.supported_elastic_pool_editions = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment.py deleted file mode 100644 index eecad7a9b04d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerVulnerabilityAssessment(ProxyResource): - """A server vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: Required. A blob storage container path to - hold the scan results (e.g. - https://myStorage.blob.core.windows.net/VaScans/). - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_container_path': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, **kwargs): - super(ServerVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = kwargs.get('storage_container_path', None) - self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.recurring_scans = kwargs.get('recurring_scans', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_paged.py deleted file mode 100644 index 43c1a3b65779..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerVulnerabilityAssessmentPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerVulnerabilityAssessment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerVulnerabilityAssessment]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_py3.py deleted file mode 100644 index bb42c3866a3f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerVulnerabilityAssessment(ProxyResource): - """A server vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: Required. A blob storage container path to - hold the scan results (e.g. - https://myStorage.blob.core.windows.net/VaScans/). - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_container_path': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, *, storage_container_path: str, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: - super(ServerVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = storage_container_path - self.storage_container_sas_key = storage_container_sas_key - self.storage_account_access_key = storage_account_access_key - self.recurring_scans = recurring_scans diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective.py deleted file mode 100644 index 71133da2f551..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServiceObjective(ProxyResource): - """Represents a database service objective. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar service_objective_name: The name for the service objective. - :vartype service_objective_name: str - :ivar is_default: Gets whether the service level objective is the default - service objective. - :vartype is_default: bool - :ivar is_system: Gets whether the service level objective is a system - service objective. - :vartype is_system: bool - :ivar description: The description for the service level objective. - :vartype description: str - :ivar enabled: Gets whether the service level objective is enabled. - :vartype enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'service_objective_name': {'readonly': True}, - 'is_default': {'readonly': True}, - 'is_system': {'readonly': True}, - 'description': {'readonly': True}, - 'enabled': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'service_objective_name': {'key': 'properties.serviceObjectiveName', 'type': 'str'}, - 'is_default': {'key': 'properties.isDefault', 'type': 'bool'}, - 'is_system': {'key': 'properties.isSystem', 'type': 'bool'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ServiceObjective, self).__init__(**kwargs) - self.service_objective_name = None - self.is_default = None - self.is_system = None - self.description = None - self.enabled = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability.py deleted file mode 100644 index 1e6c2158be9a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceObjectiveCapability(Model): - """The service objectives capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique ID of the service objective. - :vartype id: str - :ivar name: The service objective name. - :vartype name: str - :ivar supported_max_sizes: The list of supported maximum database sizes. - :vartype supported_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar performance_level: The performance level. - :vartype performance_level: - ~azure.mgmt.sql.models.PerformanceLevelCapability - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.sql.models.Sku - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar included_max_size: The included (free) max size. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'supported_max_sizes': {'readonly': True}, - 'performance_level': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceObjectiveCapability, self).__init__(**kwargs) - self.id = None - self.name = None - self.supported_max_sizes = None - self.performance_level = None - self.sku = None - self.supported_license_types = None - self.included_max_size = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability_py3.py deleted file mode 100644 index f777ffd74f97..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceObjectiveCapability(Model): - """The service objectives capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique ID of the service objective. - :vartype id: str - :ivar name: The service objective name. - :vartype name: str - :ivar supported_max_sizes: The list of supported maximum database sizes. - :vartype supported_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar performance_level: The performance level. - :vartype performance_level: - ~azure.mgmt.sql.models.PerformanceLevelCapability - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.sql.models.Sku - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar included_max_size: The included (free) max size. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'supported_max_sizes': {'readonly': True}, - 'performance_level': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ServiceObjectiveCapability, self).__init__(**kwargs) - self.id = None - self.name = None - self.supported_max_sizes = None - self.performance_level = None - self.sku = None - self.supported_license_types = None - self.included_max_size = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_paged.py deleted file mode 100644 index 7afe16629d1d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServiceObjectivePaged(Paged): - """ - A paging container for iterating over a list of :class:`ServiceObjective ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServiceObjective]'} - } - - def __init__(self, *args, **kwargs): - - super(ServiceObjectivePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_py3.py deleted file mode 100644 index 2fc00134e6ec..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServiceObjective(ProxyResource): - """Represents a database service objective. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar service_objective_name: The name for the service objective. - :vartype service_objective_name: str - :ivar is_default: Gets whether the service level objective is the default - service objective. - :vartype is_default: bool - :ivar is_system: Gets whether the service level objective is a system - service objective. - :vartype is_system: bool - :ivar description: The description for the service level objective. - :vartype description: str - :ivar enabled: Gets whether the service level objective is enabled. - :vartype enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'service_objective_name': {'readonly': True}, - 'is_default': {'readonly': True}, - 'is_system': {'readonly': True}, - 'description': {'readonly': True}, - 'enabled': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'service_objective_name': {'key': 'properties.serviceObjectiveName', 'type': 'str'}, - 'is_default': {'key': 'properties.isDefault', 'type': 'bool'}, - 'is_system': {'key': 'properties.isSystem', 'type': 'bool'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs) -> None: - super(ServiceObjective, self).__init__(**kwargs) - self.service_objective_name = None - self.is_default = None - self.is_system = None - self.description = None - self.enabled = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor.py deleted file mode 100644 index cb8974906ee6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServiceTierAdvisor(ProxyResource): - """Represents a Service Tier Advisor. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar observation_period_start: The observation period start (ISO8601 - format). - :vartype observation_period_start: datetime - :ivar observation_period_end: The observation period start (ISO8601 - format). - :vartype observation_period_end: datetime - :ivar active_time_ratio: The activeTimeRatio for service tier advisor. - :vartype active_time_ratio: float - :ivar min_dtu: Gets or sets minDtu for service tier advisor. - :vartype min_dtu: float - :ivar avg_dtu: Gets or sets avgDtu for service tier advisor. - :vartype avg_dtu: float - :ivar max_dtu: Gets or sets maxDtu for service tier advisor. - :vartype max_dtu: float - :ivar max_size_in_gb: Gets or sets maxSizeInGB for service tier advisor. - :vartype max_size_in_gb: float - :ivar service_level_objective_usage_metrics: Gets or sets - serviceLevelObjectiveUsageMetrics for the service tier advisor. - :vartype service_level_objective_usage_metrics: - list[~azure.mgmt.sql.models.SloUsageMetric] - :ivar current_service_level_objective: Gets or sets - currentServiceLevelObjective for service tier advisor. - :vartype current_service_level_objective: str - :ivar current_service_level_objective_id: Gets or sets - currentServiceLevelObjectiveId for service tier advisor. - :vartype current_service_level_objective_id: str - :ivar usage_based_recommendation_service_level_objective: Gets or sets - usageBasedRecommendationServiceLevelObjective for service tier advisor. - :vartype usage_based_recommendation_service_level_objective: str - :ivar usage_based_recommendation_service_level_objective_id: Gets or sets - usageBasedRecommendationServiceLevelObjectiveId for service tier advisor. - :vartype usage_based_recommendation_service_level_objective_id: str - :ivar database_size_based_recommendation_service_level_objective: Gets or - sets databaseSizeBasedRecommendationServiceLevelObjective for service tier - advisor. - :vartype database_size_based_recommendation_service_level_objective: str - :ivar database_size_based_recommendation_service_level_objective_id: Gets - or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service - tier advisor. - :vartype database_size_based_recommendation_service_level_objective_id: - str - :ivar disaster_plan_based_recommendation_service_level_objective: Gets or - sets disasterPlanBasedRecommendationServiceLevelObjective for service tier - advisor. - :vartype disaster_plan_based_recommendation_service_level_objective: str - :ivar disaster_plan_based_recommendation_service_level_objective_id: Gets - or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service - tier advisor. - :vartype disaster_plan_based_recommendation_service_level_objective_id: - str - :ivar overall_recommendation_service_level_objective: Gets or sets - overallRecommendationServiceLevelObjective for service tier advisor. - :vartype overall_recommendation_service_level_objective: str - :ivar overall_recommendation_service_level_objective_id: Gets or sets - overallRecommendationServiceLevelObjectiveId for service tier advisor. - :vartype overall_recommendation_service_level_objective_id: str - :ivar confidence: Gets or sets confidence for service tier advisor. - :vartype confidence: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'observation_period_start': {'readonly': True}, - 'observation_period_end': {'readonly': True}, - 'active_time_ratio': {'readonly': True}, - 'min_dtu': {'readonly': True}, - 'avg_dtu': {'readonly': True}, - 'max_dtu': {'readonly': True}, - 'max_size_in_gb': {'readonly': True}, - 'service_level_objective_usage_metrics': {'readonly': True}, - 'current_service_level_objective': {'readonly': True}, - 'current_service_level_objective_id': {'readonly': True}, - 'usage_based_recommendation_service_level_objective': {'readonly': True}, - 'usage_based_recommendation_service_level_objective_id': {'readonly': True}, - 'database_size_based_recommendation_service_level_objective': {'readonly': True}, - 'database_size_based_recommendation_service_level_objective_id': {'readonly': True}, - 'disaster_plan_based_recommendation_service_level_objective': {'readonly': True}, - 'disaster_plan_based_recommendation_service_level_objective_id': {'readonly': True}, - 'overall_recommendation_service_level_objective': {'readonly': True}, - 'overall_recommendation_service_level_objective_id': {'readonly': True}, - 'confidence': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, - 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, - 'active_time_ratio': {'key': 'properties.activeTimeRatio', 'type': 'float'}, - 'min_dtu': {'key': 'properties.minDtu', 'type': 'float'}, - 'avg_dtu': {'key': 'properties.avgDtu', 'type': 'float'}, - 'max_dtu': {'key': 'properties.maxDtu', 'type': 'float'}, - 'max_size_in_gb': {'key': 'properties.maxSizeInGB', 'type': 'float'}, - 'service_level_objective_usage_metrics': {'key': 'properties.serviceLevelObjectiveUsageMetrics', 'type': '[SloUsageMetric]'}, - 'current_service_level_objective': {'key': 'properties.currentServiceLevelObjective', 'type': 'str'}, - 'current_service_level_objective_id': {'key': 'properties.currentServiceLevelObjectiveId', 'type': 'str'}, - 'usage_based_recommendation_service_level_objective': {'key': 'properties.usageBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'usage_based_recommendation_service_level_objective_id': {'key': 'properties.usageBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'database_size_based_recommendation_service_level_objective': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'database_size_based_recommendation_service_level_objective_id': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'disaster_plan_based_recommendation_service_level_objective': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'disaster_plan_based_recommendation_service_level_objective_id': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'overall_recommendation_service_level_objective': {'key': 'properties.overallRecommendationServiceLevelObjective', 'type': 'str'}, - 'overall_recommendation_service_level_objective_id': {'key': 'properties.overallRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'confidence': {'key': 'properties.confidence', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ServiceTierAdvisor, self).__init__(**kwargs) - self.observation_period_start = None - self.observation_period_end = None - self.active_time_ratio = None - self.min_dtu = None - self.avg_dtu = None - self.max_dtu = None - self.max_size_in_gb = None - self.service_level_objective_usage_metrics = None - self.current_service_level_objective = None - self.current_service_level_objective_id = None - self.usage_based_recommendation_service_level_objective = None - self.usage_based_recommendation_service_level_objective_id = None - self.database_size_based_recommendation_service_level_objective = None - self.database_size_based_recommendation_service_level_objective_id = None - self.disaster_plan_based_recommendation_service_level_objective = None - self.disaster_plan_based_recommendation_service_level_objective_id = None - self.overall_recommendation_service_level_objective = None - self.overall_recommendation_service_level_objective_id = None - self.confidence = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_paged.py deleted file mode 100644 index 8275906eb639..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServiceTierAdvisorPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServiceTierAdvisor ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServiceTierAdvisor]'} - } - - def __init__(self, *args, **kwargs): - - super(ServiceTierAdvisorPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_py3.py deleted file mode 100644 index 04f5dceca1c0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_py3.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServiceTierAdvisor(ProxyResource): - """Represents a Service Tier Advisor. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar observation_period_start: The observation period start (ISO8601 - format). - :vartype observation_period_start: datetime - :ivar observation_period_end: The observation period start (ISO8601 - format). - :vartype observation_period_end: datetime - :ivar active_time_ratio: The activeTimeRatio for service tier advisor. - :vartype active_time_ratio: float - :ivar min_dtu: Gets or sets minDtu for service tier advisor. - :vartype min_dtu: float - :ivar avg_dtu: Gets or sets avgDtu for service tier advisor. - :vartype avg_dtu: float - :ivar max_dtu: Gets or sets maxDtu for service tier advisor. - :vartype max_dtu: float - :ivar max_size_in_gb: Gets or sets maxSizeInGB for service tier advisor. - :vartype max_size_in_gb: float - :ivar service_level_objective_usage_metrics: Gets or sets - serviceLevelObjectiveUsageMetrics for the service tier advisor. - :vartype service_level_objective_usage_metrics: - list[~azure.mgmt.sql.models.SloUsageMetric] - :ivar current_service_level_objective: Gets or sets - currentServiceLevelObjective for service tier advisor. - :vartype current_service_level_objective: str - :ivar current_service_level_objective_id: Gets or sets - currentServiceLevelObjectiveId for service tier advisor. - :vartype current_service_level_objective_id: str - :ivar usage_based_recommendation_service_level_objective: Gets or sets - usageBasedRecommendationServiceLevelObjective for service tier advisor. - :vartype usage_based_recommendation_service_level_objective: str - :ivar usage_based_recommendation_service_level_objective_id: Gets or sets - usageBasedRecommendationServiceLevelObjectiveId for service tier advisor. - :vartype usage_based_recommendation_service_level_objective_id: str - :ivar database_size_based_recommendation_service_level_objective: Gets or - sets databaseSizeBasedRecommendationServiceLevelObjective for service tier - advisor. - :vartype database_size_based_recommendation_service_level_objective: str - :ivar database_size_based_recommendation_service_level_objective_id: Gets - or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service - tier advisor. - :vartype database_size_based_recommendation_service_level_objective_id: - str - :ivar disaster_plan_based_recommendation_service_level_objective: Gets or - sets disasterPlanBasedRecommendationServiceLevelObjective for service tier - advisor. - :vartype disaster_plan_based_recommendation_service_level_objective: str - :ivar disaster_plan_based_recommendation_service_level_objective_id: Gets - or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service - tier advisor. - :vartype disaster_plan_based_recommendation_service_level_objective_id: - str - :ivar overall_recommendation_service_level_objective: Gets or sets - overallRecommendationServiceLevelObjective for service tier advisor. - :vartype overall_recommendation_service_level_objective: str - :ivar overall_recommendation_service_level_objective_id: Gets or sets - overallRecommendationServiceLevelObjectiveId for service tier advisor. - :vartype overall_recommendation_service_level_objective_id: str - :ivar confidence: Gets or sets confidence for service tier advisor. - :vartype confidence: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'observation_period_start': {'readonly': True}, - 'observation_period_end': {'readonly': True}, - 'active_time_ratio': {'readonly': True}, - 'min_dtu': {'readonly': True}, - 'avg_dtu': {'readonly': True}, - 'max_dtu': {'readonly': True}, - 'max_size_in_gb': {'readonly': True}, - 'service_level_objective_usage_metrics': {'readonly': True}, - 'current_service_level_objective': {'readonly': True}, - 'current_service_level_objective_id': {'readonly': True}, - 'usage_based_recommendation_service_level_objective': {'readonly': True}, - 'usage_based_recommendation_service_level_objective_id': {'readonly': True}, - 'database_size_based_recommendation_service_level_objective': {'readonly': True}, - 'database_size_based_recommendation_service_level_objective_id': {'readonly': True}, - 'disaster_plan_based_recommendation_service_level_objective': {'readonly': True}, - 'disaster_plan_based_recommendation_service_level_objective_id': {'readonly': True}, - 'overall_recommendation_service_level_objective': {'readonly': True}, - 'overall_recommendation_service_level_objective_id': {'readonly': True}, - 'confidence': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, - 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, - 'active_time_ratio': {'key': 'properties.activeTimeRatio', 'type': 'float'}, - 'min_dtu': {'key': 'properties.minDtu', 'type': 'float'}, - 'avg_dtu': {'key': 'properties.avgDtu', 'type': 'float'}, - 'max_dtu': {'key': 'properties.maxDtu', 'type': 'float'}, - 'max_size_in_gb': {'key': 'properties.maxSizeInGB', 'type': 'float'}, - 'service_level_objective_usage_metrics': {'key': 'properties.serviceLevelObjectiveUsageMetrics', 'type': '[SloUsageMetric]'}, - 'current_service_level_objective': {'key': 'properties.currentServiceLevelObjective', 'type': 'str'}, - 'current_service_level_objective_id': {'key': 'properties.currentServiceLevelObjectiveId', 'type': 'str'}, - 'usage_based_recommendation_service_level_objective': {'key': 'properties.usageBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'usage_based_recommendation_service_level_objective_id': {'key': 'properties.usageBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'database_size_based_recommendation_service_level_objective': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'database_size_based_recommendation_service_level_objective_id': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'disaster_plan_based_recommendation_service_level_objective': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'disaster_plan_based_recommendation_service_level_objective_id': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'overall_recommendation_service_level_objective': {'key': 'properties.overallRecommendationServiceLevelObjective', 'type': 'str'}, - 'overall_recommendation_service_level_objective_id': {'key': 'properties.overallRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'confidence': {'key': 'properties.confidence', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(ServiceTierAdvisor, self).__init__(**kwargs) - self.observation_period_start = None - self.observation_period_end = None - self.active_time_ratio = None - self.min_dtu = None - self.avg_dtu = None - self.max_dtu = None - self.max_size_in_gb = None - self.service_level_objective_usage_metrics = None - self.current_service_level_objective = None - self.current_service_level_objective_id = None - self.usage_based_recommendation_service_level_objective = None - self.usage_based_recommendation_service_level_objective_id = None - self.database_size_based_recommendation_service_level_objective = None - self.database_size_based_recommendation_service_level_objective_id = None - self.disaster_plan_based_recommendation_service_level_objective = None - self.disaster_plan_based_recommendation_service_level_objective_id = None - self.overall_recommendation_service_level_objective = None - self.overall_recommendation_service_level_objective_id = None - self.confidence = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku.py deleted file mode 100644 index e37091dc4e2f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """The resource model definition representing SKU. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU. Ex - P3. It is typically a - letter+number code - :type name: str - :param tier: This field is required to be implemented by the Resource - Provider if the service has more than one tier, but is not required on a - PUT. - :type tier: str - :param size: The SKU size. When the name field is the combination of tier - and some other value, this would be the standalone code. - :type size: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :param capacity: If the SKU supports scale out/in then the capacity - integer should be included. If scale out/in is not possible for the - resource this may be omitted. - :type capacity: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.size = kwargs.get('size', None) - self.family = kwargs.get('family', None) - self.capacity = kwargs.get('capacity', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku_py3.py deleted file mode 100644 index a6f04765e87c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """The resource model definition representing SKU. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU. Ex - P3. It is typically a - letter+number code - :type name: str - :param tier: This field is required to be implemented by the Resource - Provider if the service has more than one tier, but is not required on a - PUT. - :type tier: str - :param size: The SKU size. When the name field is the combination of tier - and some other value, this would be the standalone code. - :type size: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :param capacity: If the SKU supports scale out/in then the capacity - integer should be included. If scale out/in is not possible for the - resource this may be omitted. - :type capacity: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__(self, *, name: str, tier: str=None, size: str=None, family: str=None, capacity: int=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.size = size - self.family = family - self.capacity = capacity diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric.py deleted file mode 100644 index 262017a0b87c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SloUsageMetric(Model): - """A Slo Usage Metric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar service_level_objective: The serviceLevelObjective for SLO usage - metric. Possible values include: 'System', 'System0', 'System1', - 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', - 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', - 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', - 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', - 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', - 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', - 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', - 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - :vartype service_level_objective: str or - ~azure.mgmt.sql.models.ServiceObjectiveName - :ivar service_level_objective_id: The serviceLevelObjectiveId for SLO - usage metric. - :vartype service_level_objective_id: str - :ivar in_range_time_ratio: Gets or sets inRangeTimeRatio for SLO usage - metric. - :vartype in_range_time_ratio: float - """ - - _validation = { - 'service_level_objective': {'readonly': True}, - 'service_level_objective_id': {'readonly': True}, - 'in_range_time_ratio': {'readonly': True}, - } - - _attribute_map = { - 'service_level_objective': {'key': 'serviceLevelObjective', 'type': 'str'}, - 'service_level_objective_id': {'key': 'serviceLevelObjectiveId', 'type': 'str'}, - 'in_range_time_ratio': {'key': 'inRangeTimeRatio', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(SloUsageMetric, self).__init__(**kwargs) - self.service_level_objective = None - self.service_level_objective_id = None - self.in_range_time_ratio = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric_py3.py deleted file mode 100644 index 6b221a8eb36f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SloUsageMetric(Model): - """A Slo Usage Metric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar service_level_objective: The serviceLevelObjective for SLO usage - metric. Possible values include: 'System', 'System0', 'System1', - 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', - 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', - 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', - 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', - 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', - 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', - 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', - 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - :vartype service_level_objective: str or - ~azure.mgmt.sql.models.ServiceObjectiveName - :ivar service_level_objective_id: The serviceLevelObjectiveId for SLO - usage metric. - :vartype service_level_objective_id: str - :ivar in_range_time_ratio: Gets or sets inRangeTimeRatio for SLO usage - metric. - :vartype in_range_time_ratio: float - """ - - _validation = { - 'service_level_objective': {'readonly': True}, - 'service_level_objective_id': {'readonly': True}, - 'in_range_time_ratio': {'readonly': True}, - } - - _attribute_map = { - 'service_level_objective': {'key': 'serviceLevelObjective', 'type': 'str'}, - 'service_level_objective_id': {'key': 'serviceLevelObjectiveId', 'type': 'str'}, - 'in_range_time_ratio': {'key': 'inRangeTimeRatio', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(SloUsageMetric, self).__init__(**kwargs) - self.service_level_objective = None - self.service_level_objective_id = None - self.in_range_time_ratio = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage.py deleted file mode 100644 index 5fe0b0fe90a0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SubscriptionUsage(ProxyResource): - """Usage Metric of a Subscription in a Location. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar display_name: User-readable name of the metric. - :vartype display_name: str - :ivar current_value: Current value of the metric. - :vartype current_value: float - :ivar limit: Boundary value of the metric. - :vartype limit: float - :ivar unit: Unit of the metric. - :vartype unit: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'current_value': {'key': 'properties.currentValue', 'type': 'float'}, - 'limit': {'key': 'properties.limit', 'type': 'float'}, - 'unit': {'key': 'properties.unit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubscriptionUsage, self).__init__(**kwargs) - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_paged.py deleted file mode 100644 index 14875f12bfe6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SubscriptionUsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`SubscriptionUsage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SubscriptionUsage]'} - } - - def __init__(self, *args, **kwargs): - - super(SubscriptionUsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_py3.py deleted file mode 100644 index d55e3275a74b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SubscriptionUsage(ProxyResource): - """Usage Metric of a Subscription in a Location. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar display_name: User-readable name of the metric. - :vartype display_name: str - :ivar current_value: Current value of the metric. - :vartype current_value: float - :ivar limit: Boundary value of the metric. - :vartype limit: float - :ivar unit: Unit of the metric. - :vartype unit: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'current_value': {'key': 'properties.currentValue', 'type': 'float'}, - 'limit': {'key': 'properties.limit', 'type': 'float'}, - 'unit': {'key': 'properties.unit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubscriptionUsage, self).__init__(**kwargs) - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent.py deleted file mode 100644 index c617de5bdf26..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SyncAgent(ProxyResource): - """An Azure SQL Database sync agent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar sync_agent_name: Name of the sync agent. - :vartype sync_agent_name: str - :param sync_database_id: ARM resource id of the sync database in the sync - agent. - :type sync_database_id: str - :ivar last_alive_time: Last alive time of the sync agent. - :vartype last_alive_time: datetime - :ivar state: State of the sync agent. Possible values include: 'Online', - 'Offline', 'NeverConnected' - :vartype state: str or ~azure.mgmt.sql.models.SyncAgentState - :ivar is_up_to_date: If the sync agent version is up to date. - :vartype is_up_to_date: bool - :ivar expiry_time: Expiration time of the sync agent version. - :vartype expiry_time: datetime - :ivar version: Version of the sync agent. - :vartype version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sync_agent_name': {'readonly': True}, - 'last_alive_time': {'readonly': True}, - 'state': {'readonly': True}, - 'is_up_to_date': {'readonly': True}, - 'expiry_time': {'readonly': True}, - 'version': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'sync_agent_name': {'key': 'properties.name', 'type': 'str'}, - 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, - 'last_alive_time': {'key': 'properties.lastAliveTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'is_up_to_date': {'key': 'properties.isUpToDate', 'type': 'bool'}, - 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncAgent, self).__init__(**kwargs) - self.sync_agent_name = None - self.sync_database_id = kwargs.get('sync_database_id', None) - self.last_alive_time = None - self.state = None - self.is_up_to_date = None - self.expiry_time = None - self.version = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties.py deleted file mode 100644 index da65194bc61a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncAgentKeyProperties(Model): - """Properties of an Azure SQL Database sync agent key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar sync_agent_key: Key of sync agent. - :vartype sync_agent_key: str - """ - - _validation = { - 'sync_agent_key': {'readonly': True}, - } - - _attribute_map = { - 'sync_agent_key': {'key': 'syncAgentKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncAgentKeyProperties, self).__init__(**kwargs) - self.sync_agent_key = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties_py3.py deleted file mode 100644 index 4230f4d95712..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncAgentKeyProperties(Model): - """Properties of an Azure SQL Database sync agent key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar sync_agent_key: Key of sync agent. - :vartype sync_agent_key: str - """ - - _validation = { - 'sync_agent_key': {'readonly': True}, - } - - _attribute_map = { - 'sync_agent_key': {'key': 'syncAgentKey', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncAgentKeyProperties, self).__init__(**kwargs) - self.sync_agent_key = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database.py deleted file mode 100644 index 597c51388f47..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SyncAgentLinkedDatabase(ProxyResource): - """An Azure SQL Database sync agent linked database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_type: Type of the sync agent linked database. Possible - values include: 'AzureSqlDatabase', 'SqlServerDatabase' - :vartype database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType - :ivar database_id: Id of the sync agent linked database. - :vartype database_id: str - :ivar description: Description of the sync agent linked database. - :vartype description: str - :ivar server_name: Server name of the sync agent linked database. - :vartype server_name: str - :ivar database_name: Database name of the sync agent linked database. - :vartype database_name: str - :ivar user_name: User name of the sync agent linked database. - :vartype user_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_type': {'readonly': True}, - 'database_id': {'readonly': True}, - 'description': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - 'user_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncAgentLinkedDatabase, self).__init__(**kwargs) - self.database_type = None - self.database_id = None - self.description = None - self.server_name = None - self.database_name = None - self.user_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_paged.py deleted file mode 100644 index 6c0fad6ae749..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncAgentLinkedDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncAgentLinkedDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncAgentLinkedDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncAgentLinkedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_py3.py deleted file mode 100644 index 7d92287e1a37..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SyncAgentLinkedDatabase(ProxyResource): - """An Azure SQL Database sync agent linked database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_type: Type of the sync agent linked database. Possible - values include: 'AzureSqlDatabase', 'SqlServerDatabase' - :vartype database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType - :ivar database_id: Id of the sync agent linked database. - :vartype database_id: str - :ivar description: Description of the sync agent linked database. - :vartype description: str - :ivar server_name: Server name of the sync agent linked database. - :vartype server_name: str - :ivar database_name: Database name of the sync agent linked database. - :vartype database_name: str - :ivar user_name: User name of the sync agent linked database. - :vartype user_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_type': {'readonly': True}, - 'database_id': {'readonly': True}, - 'description': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - 'user_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncAgentLinkedDatabase, self).__init__(**kwargs) - self.database_type = None - self.database_id = None - self.description = None - self.server_name = None - self.database_name = None - self.user_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_paged.py deleted file mode 100644 index 116fc542dbbd..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncAgentPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncAgent ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncAgent]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncAgentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_py3.py deleted file mode 100644 index f07649750457..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SyncAgent(ProxyResource): - """An Azure SQL Database sync agent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar sync_agent_name: Name of the sync agent. - :vartype sync_agent_name: str - :param sync_database_id: ARM resource id of the sync database in the sync - agent. - :type sync_database_id: str - :ivar last_alive_time: Last alive time of the sync agent. - :vartype last_alive_time: datetime - :ivar state: State of the sync agent. Possible values include: 'Online', - 'Offline', 'NeverConnected' - :vartype state: str or ~azure.mgmt.sql.models.SyncAgentState - :ivar is_up_to_date: If the sync agent version is up to date. - :vartype is_up_to_date: bool - :ivar expiry_time: Expiration time of the sync agent version. - :vartype expiry_time: datetime - :ivar version: Version of the sync agent. - :vartype version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sync_agent_name': {'readonly': True}, - 'last_alive_time': {'readonly': True}, - 'state': {'readonly': True}, - 'is_up_to_date': {'readonly': True}, - 'expiry_time': {'readonly': True}, - 'version': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'sync_agent_name': {'key': 'properties.name', 'type': 'str'}, - 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, - 'last_alive_time': {'key': 'properties.lastAliveTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'is_up_to_date': {'key': 'properties.isUpToDate', 'type': 'bool'}, - 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - } - - def __init__(self, *, sync_database_id: str=None, **kwargs) -> None: - super(SyncAgent, self).__init__(**kwargs) - self.sync_agent_name = None - self.sync_database_id = sync_database_id - self.last_alive_time = None - self.state = None - self.is_up_to_date = None - self.expiry_time = None - self.version = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties.py deleted file mode 100644 index 6dd5a323fd61..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncDatabaseIdProperties(Model): - """Properties of the sync database id. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: ARM resource id of sync database. - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncDatabaseIdProperties, self).__init__(**kwargs) - self.id = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_paged.py deleted file mode 100644 index 2f70734f930a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncDatabaseIdPropertiesPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncDatabaseIdProperties ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncDatabaseIdProperties]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncDatabaseIdPropertiesPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_py3.py deleted file mode 100644 index cdb7ce89c435..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncDatabaseIdProperties(Model): - """Properties of the sync database id. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: ARM resource id of sync database. - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncDatabaseIdProperties, self).__init__(**kwargs) - self.id = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties.py deleted file mode 100644 index 984d4c7a5d56..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaProperties(Model): - """Properties of the database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar tables: List of tables in the database full schema. - :vartype tables: list[~azure.mgmt.sql.models.SyncFullSchemaTable] - :ivar last_update_time: Last update time of the database schema. - :vartype last_update_time: datetime - """ - - _validation = { - 'tables': {'readonly': True}, - 'last_update_time': {'readonly': True}, - } - - _attribute_map = { - 'tables': {'key': 'tables', 'type': '[SyncFullSchemaTable]'}, - 'last_update_time': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(SyncFullSchemaProperties, self).__init__(**kwargs) - self.tables = None - self.last_update_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_paged.py deleted file mode 100644 index 20c3b2df16d4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncFullSchemaPropertiesPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncFullSchemaProperties ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncFullSchemaProperties]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncFullSchemaPropertiesPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_py3.py deleted file mode 100644 index b3d4a75c65bf..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaProperties(Model): - """Properties of the database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar tables: List of tables in the database full schema. - :vartype tables: list[~azure.mgmt.sql.models.SyncFullSchemaTable] - :ivar last_update_time: Last update time of the database schema. - :vartype last_update_time: datetime - """ - - _validation = { - 'tables': {'readonly': True}, - 'last_update_time': {'readonly': True}, - } - - _attribute_map = { - 'tables': {'key': 'tables', 'type': '[SyncFullSchemaTable]'}, - 'last_update_time': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncFullSchemaProperties, self).__init__(**kwargs) - self.tables = None - self.last_update_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table.py deleted file mode 100644 index dcec31c48f1c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaTable(Model): - """Properties of the table in the database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar columns: List of columns in the table of database full schema. - :vartype columns: list[~azure.mgmt.sql.models.SyncFullSchemaTableColumn] - :ivar error_id: Error id of the table. - :vartype error_id: str - :ivar has_error: If there is error in the table. - :vartype has_error: bool - :ivar name: Name of the table. - :vartype name: str - :ivar quoted_name: Quoted name of the table. - :vartype quoted_name: str - """ - - _validation = { - 'columns': {'readonly': True}, - 'error_id': {'readonly': True}, - 'has_error': {'readonly': True}, - 'name': {'readonly': True}, - 'quoted_name': {'readonly': True}, - } - - _attribute_map = { - 'columns': {'key': 'columns', 'type': '[SyncFullSchemaTableColumn]'}, - 'error_id': {'key': 'errorId', 'type': 'str'}, - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncFullSchemaTable, self).__init__(**kwargs) - self.columns = None - self.error_id = None - self.has_error = None - self.name = None - self.quoted_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column.py deleted file mode 100644 index 8eaa3659873b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaTableColumn(Model): - """Properties of the column in the table of database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar data_size: Data size of the column. - :vartype data_size: str - :ivar data_type: Data type of the column. - :vartype data_type: str - :ivar error_id: Error id of the column. - :vartype error_id: str - :ivar has_error: If there is error in the table. - :vartype has_error: bool - :ivar is_primary_key: If it is the primary key of the table. - :vartype is_primary_key: bool - :ivar name: Name of the column. - :vartype name: str - :ivar quoted_name: Quoted name of the column. - :vartype quoted_name: str - """ - - _validation = { - 'data_size': {'readonly': True}, - 'data_type': {'readonly': True}, - 'error_id': {'readonly': True}, - 'has_error': {'readonly': True}, - 'is_primary_key': {'readonly': True}, - 'name': {'readonly': True}, - 'quoted_name': {'readonly': True}, - } - - _attribute_map = { - 'data_size': {'key': 'dataSize', 'type': 'str'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'error_id': {'key': 'errorId', 'type': 'str'}, - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'is_primary_key': {'key': 'isPrimaryKey', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncFullSchemaTableColumn, self).__init__(**kwargs) - self.data_size = None - self.data_type = None - self.error_id = None - self.has_error = None - self.is_primary_key = None - self.name = None - self.quoted_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column_py3.py deleted file mode 100644 index 33df54b37b59..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaTableColumn(Model): - """Properties of the column in the table of database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar data_size: Data size of the column. - :vartype data_size: str - :ivar data_type: Data type of the column. - :vartype data_type: str - :ivar error_id: Error id of the column. - :vartype error_id: str - :ivar has_error: If there is error in the table. - :vartype has_error: bool - :ivar is_primary_key: If it is the primary key of the table. - :vartype is_primary_key: bool - :ivar name: Name of the column. - :vartype name: str - :ivar quoted_name: Quoted name of the column. - :vartype quoted_name: str - """ - - _validation = { - 'data_size': {'readonly': True}, - 'data_type': {'readonly': True}, - 'error_id': {'readonly': True}, - 'has_error': {'readonly': True}, - 'is_primary_key': {'readonly': True}, - 'name': {'readonly': True}, - 'quoted_name': {'readonly': True}, - } - - _attribute_map = { - 'data_size': {'key': 'dataSize', 'type': 'str'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'error_id': {'key': 'errorId', 'type': 'str'}, - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'is_primary_key': {'key': 'isPrimaryKey', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncFullSchemaTableColumn, self).__init__(**kwargs) - self.data_size = None - self.data_type = None - self.error_id = None - self.has_error = None - self.is_primary_key = None - self.name = None - self.quoted_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_py3.py deleted file mode 100644 index 194f50826875..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaTable(Model): - """Properties of the table in the database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar columns: List of columns in the table of database full schema. - :vartype columns: list[~azure.mgmt.sql.models.SyncFullSchemaTableColumn] - :ivar error_id: Error id of the table. - :vartype error_id: str - :ivar has_error: If there is error in the table. - :vartype has_error: bool - :ivar name: Name of the table. - :vartype name: str - :ivar quoted_name: Quoted name of the table. - :vartype quoted_name: str - """ - - _validation = { - 'columns': {'readonly': True}, - 'error_id': {'readonly': True}, - 'has_error': {'readonly': True}, - 'name': {'readonly': True}, - 'quoted_name': {'readonly': True}, - } - - _attribute_map = { - 'columns': {'key': 'columns', 'type': '[SyncFullSchemaTableColumn]'}, - 'error_id': {'key': 'errorId', 'type': 'str'}, - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncFullSchemaTable, self).__init__(**kwargs) - self.columns = None - self.error_id = None - self.has_error = None - self.name = None - self.quoted_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group.py deleted file mode 100644 index 5a252358a340..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SyncGroup(ProxyResource): - """An Azure SQL Database sync group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param interval: Sync interval of the sync group. - :type interval: int - :ivar last_sync_time: Last sync time of the sync group. - :vartype last_sync_time: datetime - :param conflict_resolution_policy: Conflict resolution policy of the sync - group. Possible values include: 'HubWin', 'MemberWin' - :type conflict_resolution_policy: str or - ~azure.mgmt.sql.models.SyncConflictResolutionPolicy - :param sync_database_id: ARM resource id of the sync database in the sync - group. - :type sync_database_id: str - :param hub_database_user_name: User name for the sync group hub database - credential. - :type hub_database_user_name: str - :param hub_database_password: Password for the sync group hub database - credential. - :type hub_database_password: str - :ivar sync_state: Sync state of the sync group. Possible values include: - 'NotReady', 'Error', 'Warning', 'Progressing', 'Good' - :vartype sync_state: str or ~azure.mgmt.sql.models.SyncGroupState - :param schema: Sync schema of the sync group. - :type schema: ~azure.mgmt.sql.models.SyncGroupSchema - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'last_sync_time': {'readonly': True}, - 'sync_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'interval': {'key': 'properties.interval', 'type': 'int'}, - 'last_sync_time': {'key': 'properties.lastSyncTime', 'type': 'iso-8601'}, - 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'str'}, - 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, - 'hub_database_user_name': {'key': 'properties.hubDatabaseUserName', 'type': 'str'}, - 'hub_database_password': {'key': 'properties.hubDatabasePassword', 'type': 'str'}, - 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, - 'schema': {'key': 'properties.schema', 'type': 'SyncGroupSchema'}, - } - - def __init__(self, **kwargs): - super(SyncGroup, self).__init__(**kwargs) - self.interval = kwargs.get('interval', None) - self.last_sync_time = None - self.conflict_resolution_policy = kwargs.get('conflict_resolution_policy', None) - self.sync_database_id = kwargs.get('sync_database_id', None) - self.hub_database_user_name = kwargs.get('hub_database_user_name', None) - self.hub_database_password = kwargs.get('hub_database_password', None) - self.sync_state = None - self.schema = kwargs.get('schema', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties.py deleted file mode 100644 index 22cb584b67be..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupLogProperties(Model): - """Properties of an Azure SQL Database sync group log. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar timestamp: Timestamp of the sync group log. - :vartype timestamp: datetime - :ivar type: Type of the sync group log. Possible values include: 'All', - 'Error', 'Warning', 'Success' - :vartype type: str or ~azure.mgmt.sql.models.SyncGroupLogType - :ivar source: Source of the sync group log. - :vartype source: str - :ivar details: Details of the sync group log. - :vartype details: str - :ivar tracing_id: TracingId of the sync group log. - :vartype tracing_id: str - :ivar operation_status: OperationStatus of the sync group log. - :vartype operation_status: str - """ - - _validation = { - 'timestamp': {'readonly': True}, - 'type': {'readonly': True}, - 'source': {'readonly': True}, - 'details': {'readonly': True}, - 'tracing_id': {'readonly': True}, - 'operation_status': {'readonly': True}, - } - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'str'}, - 'tracing_id': {'key': 'tracingId', 'type': 'str'}, - 'operation_status': {'key': 'operationStatus', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncGroupLogProperties, self).__init__(**kwargs) - self.timestamp = None - self.type = None - self.source = None - self.details = None - self.tracing_id = None - self.operation_status = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_paged.py deleted file mode 100644 index bc7e0c3e7750..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncGroupLogPropertiesPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncGroupLogProperties ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncGroupLogProperties]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncGroupLogPropertiesPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_py3.py deleted file mode 100644 index 067424b40232..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupLogProperties(Model): - """Properties of an Azure SQL Database sync group log. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar timestamp: Timestamp of the sync group log. - :vartype timestamp: datetime - :ivar type: Type of the sync group log. Possible values include: 'All', - 'Error', 'Warning', 'Success' - :vartype type: str or ~azure.mgmt.sql.models.SyncGroupLogType - :ivar source: Source of the sync group log. - :vartype source: str - :ivar details: Details of the sync group log. - :vartype details: str - :ivar tracing_id: TracingId of the sync group log. - :vartype tracing_id: str - :ivar operation_status: OperationStatus of the sync group log. - :vartype operation_status: str - """ - - _validation = { - 'timestamp': {'readonly': True}, - 'type': {'readonly': True}, - 'source': {'readonly': True}, - 'details': {'readonly': True}, - 'tracing_id': {'readonly': True}, - 'operation_status': {'readonly': True}, - } - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'str'}, - 'tracing_id': {'key': 'tracingId', 'type': 'str'}, - 'operation_status': {'key': 'operationStatus', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncGroupLogProperties, self).__init__(**kwargs) - self.timestamp = None - self.type = None - self.source = None - self.details = None - self.tracing_id = None - self.operation_status = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_paged.py deleted file mode 100644 index b20ca4d8e098..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncGroupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_py3.py deleted file mode 100644 index 1654af79245f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_py3.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SyncGroup(ProxyResource): - """An Azure SQL Database sync group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param interval: Sync interval of the sync group. - :type interval: int - :ivar last_sync_time: Last sync time of the sync group. - :vartype last_sync_time: datetime - :param conflict_resolution_policy: Conflict resolution policy of the sync - group. Possible values include: 'HubWin', 'MemberWin' - :type conflict_resolution_policy: str or - ~azure.mgmt.sql.models.SyncConflictResolutionPolicy - :param sync_database_id: ARM resource id of the sync database in the sync - group. - :type sync_database_id: str - :param hub_database_user_name: User name for the sync group hub database - credential. - :type hub_database_user_name: str - :param hub_database_password: Password for the sync group hub database - credential. - :type hub_database_password: str - :ivar sync_state: Sync state of the sync group. Possible values include: - 'NotReady', 'Error', 'Warning', 'Progressing', 'Good' - :vartype sync_state: str or ~azure.mgmt.sql.models.SyncGroupState - :param schema: Sync schema of the sync group. - :type schema: ~azure.mgmt.sql.models.SyncGroupSchema - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'last_sync_time': {'readonly': True}, - 'sync_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'interval': {'key': 'properties.interval', 'type': 'int'}, - 'last_sync_time': {'key': 'properties.lastSyncTime', 'type': 'iso-8601'}, - 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'str'}, - 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, - 'hub_database_user_name': {'key': 'properties.hubDatabaseUserName', 'type': 'str'}, - 'hub_database_password': {'key': 'properties.hubDatabasePassword', 'type': 'str'}, - 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, - 'schema': {'key': 'properties.schema', 'type': 'SyncGroupSchema'}, - } - - def __init__(self, *, interval: int=None, conflict_resolution_policy=None, sync_database_id: str=None, hub_database_user_name: str=None, hub_database_password: str=None, schema=None, **kwargs) -> None: - super(SyncGroup, self).__init__(**kwargs) - self.interval = interval - self.last_sync_time = None - self.conflict_resolution_policy = conflict_resolution_policy - self.sync_database_id = sync_database_id - self.hub_database_user_name = hub_database_user_name - self.hub_database_password = hub_database_password - self.sync_state = None - self.schema = schema diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema.py deleted file mode 100644 index ece05d7301d0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchema(Model): - """Properties of sync group schema. - - :param tables: List of tables in sync group schema. - :type tables: list[~azure.mgmt.sql.models.SyncGroupSchemaTable] - :param master_sync_member_name: Name of master sync member where the - schema is from. - :type master_sync_member_name: str - """ - - _attribute_map = { - 'tables': {'key': 'tables', 'type': '[SyncGroupSchemaTable]'}, - 'master_sync_member_name': {'key': 'masterSyncMemberName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncGroupSchema, self).__init__(**kwargs) - self.tables = kwargs.get('tables', None) - self.master_sync_member_name = kwargs.get('master_sync_member_name', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_py3.py deleted file mode 100644 index b26d4b1b791c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchema(Model): - """Properties of sync group schema. - - :param tables: List of tables in sync group schema. - :type tables: list[~azure.mgmt.sql.models.SyncGroupSchemaTable] - :param master_sync_member_name: Name of master sync member where the - schema is from. - :type master_sync_member_name: str - """ - - _attribute_map = { - 'tables': {'key': 'tables', 'type': '[SyncGroupSchemaTable]'}, - 'master_sync_member_name': {'key': 'masterSyncMemberName', 'type': 'str'}, - } - - def __init__(self, *, tables=None, master_sync_member_name: str=None, **kwargs) -> None: - super(SyncGroupSchema, self).__init__(**kwargs) - self.tables = tables - self.master_sync_member_name = master_sync_member_name diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table.py deleted file mode 100644 index cf83bba5825d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchemaTable(Model): - """Properties of table in sync group schema. - - :param columns: List of columns in sync group schema. - :type columns: list[~azure.mgmt.sql.models.SyncGroupSchemaTableColumn] - :param quoted_name: Quoted name of sync group schema table. - :type quoted_name: str - """ - - _attribute_map = { - 'columns': {'key': 'columns', 'type': '[SyncGroupSchemaTableColumn]'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncGroupSchemaTable, self).__init__(**kwargs) - self.columns = kwargs.get('columns', None) - self.quoted_name = kwargs.get('quoted_name', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column.py deleted file mode 100644 index 705810d1d2a3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchemaTableColumn(Model): - """Properties of column in sync group table. - - :param quoted_name: Quoted name of sync group table column. - :type quoted_name: str - :param data_size: Data size of the column. - :type data_size: str - :param data_type: Data type of the column. - :type data_type: str - """ - - _attribute_map = { - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - 'data_size': {'key': 'dataSize', 'type': 'str'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncGroupSchemaTableColumn, self).__init__(**kwargs) - self.quoted_name = kwargs.get('quoted_name', None) - self.data_size = kwargs.get('data_size', None) - self.data_type = kwargs.get('data_type', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column_py3.py deleted file mode 100644 index bb8cce2d8c34..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchemaTableColumn(Model): - """Properties of column in sync group table. - - :param quoted_name: Quoted name of sync group table column. - :type quoted_name: str - :param data_size: Data size of the column. - :type data_size: str - :param data_type: Data type of the column. - :type data_type: str - """ - - _attribute_map = { - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - 'data_size': {'key': 'dataSize', 'type': 'str'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - } - - def __init__(self, *, quoted_name: str=None, data_size: str=None, data_type: str=None, **kwargs) -> None: - super(SyncGroupSchemaTableColumn, self).__init__(**kwargs) - self.quoted_name = quoted_name - self.data_size = data_size - self.data_type = data_type diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_py3.py deleted file mode 100644 index ecbbd26a576d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchemaTable(Model): - """Properties of table in sync group schema. - - :param columns: List of columns in sync group schema. - :type columns: list[~azure.mgmt.sql.models.SyncGroupSchemaTableColumn] - :param quoted_name: Quoted name of sync group schema table. - :type quoted_name: str - """ - - _attribute_map = { - 'columns': {'key': 'columns', 'type': '[SyncGroupSchemaTableColumn]'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, *, columns=None, quoted_name: str=None, **kwargs) -> None: - super(SyncGroupSchemaTable, self).__init__(**kwargs) - self.columns = columns - self.quoted_name = quoted_name diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member.py deleted file mode 100644 index 1474c6320dc1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SyncMember(ProxyResource): - """An Azure SQL Database sync member. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param database_type: Database type of the sync member. Possible values - include: 'AzureSqlDatabase', 'SqlServerDatabase' - :type database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType - :param sync_agent_id: ARM resource id of the sync agent in the sync - member. - :type sync_agent_id: str - :param sql_server_database_id: SQL Server database id of the sync member. - :type sql_server_database_id: str - :param server_name: Server name of the member database in the sync member - :type server_name: str - :param database_name: Database name of the member database in the sync - member. - :type database_name: str - :param user_name: User name of the member database in the sync member. - :type user_name: str - :param password: Password of the member database in the sync member. - :type password: str - :param sync_direction: Sync direction of the sync member. Possible values - include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember' - :type sync_direction: str or ~azure.mgmt.sql.models.SyncDirection - :ivar sync_state: Sync state of the sync member. Possible values include: - 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', - 'DisabledTombstoneCleanup', 'DisabledBackupRestore', - 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', - 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', - 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', - 'ReprovisionFailed', 'UnReprovisioned' - :vartype sync_state: str or ~azure.mgmt.sql.models.SyncMemberState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sync_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, - 'sync_agent_id': {'key': 'properties.syncAgentId', 'type': 'str'}, - 'sql_server_database_id': {'key': 'properties.sqlServerDatabaseId', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'sync_direction': {'key': 'properties.syncDirection', 'type': 'str'}, - 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncMember, self).__init__(**kwargs) - self.database_type = kwargs.get('database_type', None) - self.sync_agent_id = kwargs.get('sync_agent_id', None) - self.sql_server_database_id = kwargs.get('sql_server_database_id', None) - self.server_name = kwargs.get('server_name', None) - self.database_name = kwargs.get('database_name', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.sync_direction = kwargs.get('sync_direction', None) - self.sync_state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_paged.py deleted file mode 100644 index 68bddeeeec1b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncMemberPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncMember ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncMember]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncMemberPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_py3.py deleted file mode 100644 index 50cf8fe2d65c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_py3.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SyncMember(ProxyResource): - """An Azure SQL Database sync member. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param database_type: Database type of the sync member. Possible values - include: 'AzureSqlDatabase', 'SqlServerDatabase' - :type database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType - :param sync_agent_id: ARM resource id of the sync agent in the sync - member. - :type sync_agent_id: str - :param sql_server_database_id: SQL Server database id of the sync member. - :type sql_server_database_id: str - :param server_name: Server name of the member database in the sync member - :type server_name: str - :param database_name: Database name of the member database in the sync - member. - :type database_name: str - :param user_name: User name of the member database in the sync member. - :type user_name: str - :param password: Password of the member database in the sync member. - :type password: str - :param sync_direction: Sync direction of the sync member. Possible values - include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember' - :type sync_direction: str or ~azure.mgmt.sql.models.SyncDirection - :ivar sync_state: Sync state of the sync member. Possible values include: - 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', - 'DisabledTombstoneCleanup', 'DisabledBackupRestore', - 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', - 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', - 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', - 'ReprovisionFailed', 'UnReprovisioned' - :vartype sync_state: str or ~azure.mgmt.sql.models.SyncMemberState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sync_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, - 'sync_agent_id': {'key': 'properties.syncAgentId', 'type': 'str'}, - 'sql_server_database_id': {'key': 'properties.sqlServerDatabaseId', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'sync_direction': {'key': 'properties.syncDirection', 'type': 'str'}, - 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, - } - - def __init__(self, *, database_type=None, sync_agent_id: str=None, sql_server_database_id: str=None, server_name: str=None, database_name: str=None, user_name: str=None, password: str=None, sync_direction=None, **kwargs) -> None: - super(SyncMember, self).__init__(**kwargs) - self.database_type = database_type - self.sync_agent_id = sync_agent_id - self.sql_server_database_id = sql_server_database_id - self.server_name = server_name - self.database_name = database_name - self.user_name = user_name - self.password = password - self.sync_direction = sync_direction - self.sync_state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate.py deleted file mode 100644 index 1171ee8adf94..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class TdeCertificate(ProxyResource): - """A TDE certificate that can be uploaded into a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param private_blob: Required. The base64 encoded certificate private - blob. - :type private_blob: str - :param cert_password: The certificate password. - :type cert_password: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'private_blob': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'private_blob': {'key': 'properties.privateBlob', 'type': 'str'}, - 'cert_password': {'key': 'properties.certPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TdeCertificate, self).__init__(**kwargs) - self.private_blob = kwargs.get('private_blob', None) - self.cert_password = kwargs.get('cert_password', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate_py3.py deleted file mode 100644 index b4e54453cae1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class TdeCertificate(ProxyResource): - """A TDE certificate that can be uploaded into a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param private_blob: Required. The base64 encoded certificate private - blob. - :type private_blob: str - :param cert_password: The certificate password. - :type cert_password: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'private_blob': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'private_blob': {'key': 'properties.privateBlob', 'type': 'str'}, - 'cert_password': {'key': 'properties.certPassword', 'type': 'str'}, - } - - def __init__(self, *, private_blob: str, cert_password: str=None, **kwargs) -> None: - super(TdeCertificate, self).__init__(**kwargs) - self.private_blob = private_blob - self.cert_password = cert_password diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource.py deleted file mode 100644 index dc99e096cf18..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class TrackedResource(Resource): - """ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TrackedResource, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource_py3.py deleted file mode 100644 index 5edf04ac0a73..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class TrackedResource(Resource): - """ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(TrackedResource, self).__init__(**kwargs) - self.location = location - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption.py deleted file mode 100644 index 4270fa860c1d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class TransparentDataEncryption(ProxyResource): - """Represents a database transparent data encryption configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :param status: The status of the database transparent data encryption. - Possible values include: 'Enabled', 'Disabled' - :type status: str or - ~azure.mgmt.sql.models.TransparentDataEncryptionStatus - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'TransparentDataEncryptionStatus'}, - } - - def __init__(self, **kwargs): - super(TransparentDataEncryption, self).__init__(**kwargs) - self.location = None - self.status = kwargs.get('status', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity.py deleted file mode 100644 index 60e9505eba4c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class TransparentDataEncryptionActivity(ProxyResource): - """Represents a database transparent data encryption Scan. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar status: The status of the database. Possible values include: - 'Encrypting', 'Decrypting' - :vartype status: str or - ~azure.mgmt.sql.models.TransparentDataEncryptionActivityStatus - :ivar percent_complete: The percent complete of the transparent data - encryption scan for a database. - :vartype percent_complete: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, - 'percent_complete': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(TransparentDataEncryptionActivity, self).__init__(**kwargs) - self.location = None - self.status = None - self.percent_complete = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_paged.py deleted file mode 100644 index b86dce24923c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class TransparentDataEncryptionActivityPaged(Paged): - """ - A paging container for iterating over a list of :class:`TransparentDataEncryptionActivity ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TransparentDataEncryptionActivity]'} - } - - def __init__(self, *args, **kwargs): - - super(TransparentDataEncryptionActivityPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_py3.py deleted file mode 100644 index 9bf146137c20..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class TransparentDataEncryptionActivity(ProxyResource): - """Represents a database transparent data encryption Scan. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar status: The status of the database. Possible values include: - 'Encrypting', 'Decrypting' - :vartype status: str or - ~azure.mgmt.sql.models.TransparentDataEncryptionActivityStatus - :ivar percent_complete: The percent complete of the transparent data - encryption scan for a database. - :vartype percent_complete: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, - 'percent_complete': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(TransparentDataEncryptionActivity, self).__init__(**kwargs) - self.location = None - self.status = None - self.percent_complete = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_py3.py deleted file mode 100644 index db2b2096f798..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class TransparentDataEncryption(ProxyResource): - """Represents a database transparent data encryption configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :param status: The status of the database transparent data encryption. - Possible values include: 'Enabled', 'Disabled' - :type status: str or - ~azure.mgmt.sql.models.TransparentDataEncryptionStatus - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'TransparentDataEncryptionStatus'}, - } - - def __init__(self, *, status=None, **kwargs) -> None: - super(TransparentDataEncryption, self).__init__(**kwargs) - self.location = None - self.status = status diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster.py deleted file mode 100644 index a3c9dd04abca..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class VirtualCluster(TrackedResource): - """An Azure SQL virtual cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :ivar subnet_id: Subnet resource ID for the virtual cluster. - :vartype subnet_id: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :ivar child_resources: List of resources in this virtual cluster. - :vartype child_resources: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'subnet_id': {'readonly': True}, - 'child_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'family': {'key': 'properties.family', 'type': 'str'}, - 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualCluster, self).__init__(**kwargs) - self.subnet_id = None - self.family = kwargs.get('family', None) - self.child_resources = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_paged.py deleted file mode 100644 index 865bbd5e9f86..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualClusterPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_py3.py deleted file mode 100644 index e11fb730e2be..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class VirtualCluster(TrackedResource): - """An Azure SQL virtual cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :ivar subnet_id: Subnet resource ID for the virtual cluster. - :vartype subnet_id: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :ivar child_resources: List of resources in this virtual cluster. - :vartype child_resources: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'subnet_id': {'readonly': True}, - 'child_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'family': {'key': 'properties.family', 'type': 'str'}, - 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, - } - - def __init__(self, *, location: str, tags=None, family: str=None, **kwargs) -> None: - super(VirtualCluster, self).__init__(location=location, tags=tags, **kwargs) - self.subnet_id = None - self.family = family - self.child_resources = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update.py deleted file mode 100644 index c6604df3568a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualClusterUpdate(Model): - """An update request for an Azure SQL Database virtual cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar subnet_id: Subnet resource ID for the virtual cluster. - :vartype subnet_id: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :ivar child_resources: List of resources in this virtual cluster. - :vartype child_resources: list[str] - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'subnet_id': {'readonly': True}, - 'child_resources': {'readonly': True}, - } - - _attribute_map = { - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'family': {'key': 'properties.family', 'type': 'str'}, - 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(VirtualClusterUpdate, self).__init__(**kwargs) - self.subnet_id = None - self.family = kwargs.get('family', None) - self.child_resources = None - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update_py3.py deleted file mode 100644 index ec26101b089a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualClusterUpdate(Model): - """An update request for an Azure SQL Database virtual cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar subnet_id: Subnet resource ID for the virtual cluster. - :vartype subnet_id: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :ivar child_resources: List of resources in this virtual cluster. - :vartype child_resources: list[str] - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'subnet_id': {'readonly': True}, - 'child_resources': {'readonly': True}, - } - - _attribute_map = { - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'family': {'key': 'properties.family', 'type': 'str'}, - 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, family: str=None, tags=None, **kwargs) -> None: - super(VirtualClusterUpdate, self).__init__(**kwargs) - self.subnet_id = None - self.family = family - self.child_resources = None - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule.py deleted file mode 100644 index 0960e4289c66..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class VirtualNetworkRule(ProxyResource): - """A virtual network rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param virtual_network_subnet_id: Required. The ARM resource id of the - virtual network subnet. - :type virtual_network_subnet_id: str - :param ignore_missing_vnet_service_endpoint: Create firewall rule before - the virtual network has vnet service endpoint enabled. - :type ignore_missing_vnet_service_endpoint: bool - :ivar state: Virtual Network Rule State. Possible values include: - 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' - :vartype state: str or ~azure.mgmt.sql.models.VirtualNetworkRuleState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_subnet_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, - 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualNetworkRule, self).__init__(**kwargs) - self.virtual_network_subnet_id = kwargs.get('virtual_network_subnet_id', None) - self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_paged.py deleted file mode 100644 index 1cc23039a558..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualNetworkRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualNetworkRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualNetworkRule]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualNetworkRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_py3.py deleted file mode 100644 index 19e6bd30ff5e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class VirtualNetworkRule(ProxyResource): - """A virtual network rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param virtual_network_subnet_id: Required. The ARM resource id of the - virtual network subnet. - :type virtual_network_subnet_id: str - :param ignore_missing_vnet_service_endpoint: Create firewall rule before - the virtual network has vnet service endpoint enabled. - :type ignore_missing_vnet_service_endpoint: bool - :ivar state: Virtual Network Rule State. Possible values include: - 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' - :vartype state: str or ~azure.mgmt.sql.models.VirtualNetworkRuleState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_subnet_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, - 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, *, virtual_network_subnet_id: str, ignore_missing_vnet_service_endpoint: bool=None, **kwargs) -> None: - super(VirtualNetworkRule, self).__init__(**kwargs) - self.virtual_network_subnet_id = virtual_network_subnet_id - self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties.py deleted file mode 100644 index e7d424543f2b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VulnerabilityAssessmentRecurringScansProperties(Model): - """Properties of a Vulnerability Assessment recurring scans. - - :param is_enabled: Recurring scans state. - :type is_enabled: bool - :param email_subscription_admins: Specifies that the schedule scan - notification will be is sent to the subscription administrators. Default - value: True . - :type email_subscription_admins: bool - :param emails: Specifies an array of e-mail addresses to which the scan - notification is sent. - :type emails: list[str] - """ - - _attribute_map = { - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'}, - 'emails': {'key': 'emails', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs) - self.is_enabled = kwargs.get('is_enabled', None) - self.email_subscription_admins = kwargs.get('email_subscription_admins', True) - self.emails = kwargs.get('emails', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py deleted file mode 100644 index 3a55afaa0a5e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VulnerabilityAssessmentRecurringScansProperties(Model): - """Properties of a Vulnerability Assessment recurring scans. - - :param is_enabled: Recurring scans state. - :type is_enabled: bool - :param email_subscription_admins: Specifies that the schedule scan - notification will be is sent to the subscription administrators. Default - value: True . - :type email_subscription_admins: bool - :param emails: Specifies an array of e-mail addresses to which the scan - notification is sent. - :type emails: list[str] - """ - - _attribute_map = { - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'}, - 'emails': {'key': 'emails', 'type': '[str]'}, - } - - def __init__(self, *, is_enabled: bool=None, email_subscription_admins: bool=True, emails=None, **kwargs) -> None: - super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs) - self.is_enabled = is_enabled - self.email_subscription_admins = email_subscription_admins - self.emails = emails diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error.py deleted file mode 100644 index 1d465691ba60..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VulnerabilityAssessmentScanError(Model): - """Properties of a vulnerability assessment scan error. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VulnerabilityAssessmentScanError, self).__init__(**kwargs) - self.code = None - self.message = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error_py3.py deleted file mode 100644 index 93c13998eb25..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VulnerabilityAssessmentScanError(Model): - """Properties of a vulnerability assessment scan error. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(VulnerabilityAssessmentScanError, self).__init__(**kwargs) - self.code = None - self.message = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record.py deleted file mode 100644 index 67a6d163f90c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class VulnerabilityAssessmentScanRecord(ProxyResource): - """A vulnerability assessment scan record. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar scan_id: The scan ID. - :vartype scan_id: str - :ivar trigger_type: The scan trigger type. Possible values include: - 'OnDemand', 'Recurring' - :vartype trigger_type: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentScanTriggerType - :ivar state: The scan status. Possible values include: 'Passed', 'Failed', - 'FailedToRun', 'InProgress' - :vartype state: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentScanState - :ivar start_time: The scan start time (UTC). - :vartype start_time: datetime - :ivar end_time: The scan end time (UTC). - :vartype end_time: datetime - :ivar errors: The scan errors. - :vartype errors: - list[~azure.mgmt.sql.models.VulnerabilityAssessmentScanError] - :ivar storage_container_path: The scan results storage container path. - :vartype storage_container_path: str - :ivar number_of_failed_security_checks: The number of failed security - checks. - :vartype number_of_failed_security_checks: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'scan_id': {'readonly': True}, - 'trigger_type': {'readonly': True}, - 'state': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'errors': {'readonly': True}, - 'storage_container_path': {'readonly': True}, - 'number_of_failed_security_checks': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'scan_id': {'key': 'properties.scanId', 'type': 'str'}, - 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'errors': {'key': 'properties.errors', 'type': '[VulnerabilityAssessmentScanError]'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'number_of_failed_security_checks': {'key': 'properties.numberOfFailedSecurityChecks', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(VulnerabilityAssessmentScanRecord, self).__init__(**kwargs) - self.scan_id = None - self.trigger_type = None - self.state = None - self.start_time = None - self.end_time = None - self.errors = None - self.storage_container_path = None - self.number_of_failed_security_checks = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_paged.py deleted file mode 100644 index 7076acc9290f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VulnerabilityAssessmentScanRecordPaged(Paged): - """ - A paging container for iterating over a list of :class:`VulnerabilityAssessmentScanRecord ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VulnerabilityAssessmentScanRecord]'} - } - - def __init__(self, *args, **kwargs): - - super(VulnerabilityAssessmentScanRecordPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_py3.py deleted file mode 100644 index e31d141065af..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class VulnerabilityAssessmentScanRecord(ProxyResource): - """A vulnerability assessment scan record. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar scan_id: The scan ID. - :vartype scan_id: str - :ivar trigger_type: The scan trigger type. Possible values include: - 'OnDemand', 'Recurring' - :vartype trigger_type: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentScanTriggerType - :ivar state: The scan status. Possible values include: 'Passed', 'Failed', - 'FailedToRun', 'InProgress' - :vartype state: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentScanState - :ivar start_time: The scan start time (UTC). - :vartype start_time: datetime - :ivar end_time: The scan end time (UTC). - :vartype end_time: datetime - :ivar errors: The scan errors. - :vartype errors: - list[~azure.mgmt.sql.models.VulnerabilityAssessmentScanError] - :ivar storage_container_path: The scan results storage container path. - :vartype storage_container_path: str - :ivar number_of_failed_security_checks: The number of failed security - checks. - :vartype number_of_failed_security_checks: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'scan_id': {'readonly': True}, - 'trigger_type': {'readonly': True}, - 'state': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'errors': {'readonly': True}, - 'storage_container_path': {'readonly': True}, - 'number_of_failed_security_checks': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'scan_id': {'key': 'properties.scanId', 'type': 'str'}, - 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'errors': {'key': 'properties.errors', 'type': '[VulnerabilityAssessmentScanError]'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'number_of_failed_security_checks': {'key': 'properties.numberOfFailedSecurityChecks', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(VulnerabilityAssessmentScanRecord, self).__init__(**kwargs) - self.scan_id = None - self.trigger_type = None - self.state = None - self.start_time = None - self.end_time = None - self.errors = None - self.storage_container_path = None - self.number_of_failed_security_checks = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py index 3db410ac9cd7..57aa89c2fe9a 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py @@ -9,86 +9,88 @@ # regenerated. # -------------------------------------------------------------------------- -from .recoverable_databases_operations import RecoverableDatabasesOperations -from .restorable_dropped_databases_operations import RestorableDroppedDatabasesOperations -from .servers_operations import ServersOperations -from .server_connection_policies_operations import ServerConnectionPoliciesOperations -from .database_threat_detection_policies_operations import DatabaseThreatDetectionPoliciesOperations -from .data_masking_policies_operations import DataMaskingPoliciesOperations -from .data_masking_rules_operations import DataMaskingRulesOperations -from .firewall_rules_operations import FirewallRulesOperations -from .geo_backup_policies_operations import GeoBackupPoliciesOperations -from .databases_operations import DatabasesOperations -from .elastic_pools_operations import ElasticPoolsOperations -from .recommended_elastic_pools_operations import RecommendedElasticPoolsOperations -from .replication_links_operations import ReplicationLinksOperations -from .server_azure_ad_administrators_operations import ServerAzureADAdministratorsOperations -from .server_communication_links_operations import ServerCommunicationLinksOperations -from .service_objectives_operations import ServiceObjectivesOperations -from .elastic_pool_activities_operations import ElasticPoolActivitiesOperations -from .elastic_pool_database_activities_operations import ElasticPoolDatabaseActivitiesOperations -from .service_tier_advisors_operations import ServiceTierAdvisorsOperations -from .transparent_data_encryptions_operations import TransparentDataEncryptionsOperations -from .transparent_data_encryption_activities_operations import TransparentDataEncryptionActivitiesOperations -from .server_usages_operations import ServerUsagesOperations -from .database_usages_operations import DatabaseUsagesOperations -from .database_automatic_tuning_operations import DatabaseAutomaticTuningOperations -from .encryption_protectors_operations import EncryptionProtectorsOperations -from .failover_groups_operations import FailoverGroupsOperations -from .managed_instances_operations import ManagedInstancesOperations -from .operations import Operations -from .server_keys_operations import ServerKeysOperations -from .sync_agents_operations import SyncAgentsOperations -from .sync_groups_operations import SyncGroupsOperations -from .sync_members_operations import SyncMembersOperations -from .subscription_usages_operations import SubscriptionUsagesOperations -from .virtual_clusters_operations import VirtualClustersOperations -from .virtual_network_rules_operations import VirtualNetworkRulesOperations -from .extended_database_blob_auditing_policies_operations import ExtendedDatabaseBlobAuditingPoliciesOperations -from .extended_server_blob_auditing_policies_operations import ExtendedServerBlobAuditingPoliciesOperations -from .server_blob_auditing_policies_operations import ServerBlobAuditingPoliciesOperations -from .database_blob_auditing_policies_operations import DatabaseBlobAuditingPoliciesOperations -from .database_vulnerability_assessment_rule_baselines_operations import DatabaseVulnerabilityAssessmentRuleBaselinesOperations -from .database_vulnerability_assessments_operations import DatabaseVulnerabilityAssessmentsOperations -from .job_agents_operations import JobAgentsOperations -from .job_credentials_operations import JobCredentialsOperations -from .job_executions_operations import JobExecutionsOperations -from .jobs_operations import JobsOperations -from .job_step_executions_operations import JobStepExecutionsOperations -from .job_steps_operations import JobStepsOperations -from .job_target_executions_operations import JobTargetExecutionsOperations -from .job_target_groups_operations import JobTargetGroupsOperations -from .job_versions_operations import JobVersionsOperations -from .long_term_retention_backups_operations import LongTermRetentionBackupsOperations -from .backup_long_term_retention_policies_operations import BackupLongTermRetentionPoliciesOperations -from .managed_backup_short_term_retention_policies_operations import ManagedBackupShortTermRetentionPoliciesOperations -from .managed_databases_operations import ManagedDatabasesOperations -from .managed_restorable_dropped_database_backup_short_term_retention_policies_operations import ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations -from .server_automatic_tuning_operations import ServerAutomaticTuningOperations -from .server_dns_aliases_operations import ServerDnsAliasesOperations -from .server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations -from .restorable_dropped_managed_databases_operations import RestorableDroppedManagedDatabasesOperations -from .restore_points_operations import RestorePointsOperations -from .managed_database_security_alert_policies_operations import ManagedDatabaseSecurityAlertPoliciesOperations -from .managed_server_security_alert_policies_operations import ManagedServerSecurityAlertPoliciesOperations -from .sensitivity_labels_operations import SensitivityLabelsOperations -from .database_operations import DatabaseOperations -from .elastic_pool_operations import ElasticPoolOperations -from .capabilities_operations import CapabilitiesOperations -from .database_vulnerability_assessment_scans_operations import DatabaseVulnerabilityAssessmentScansOperations -from .managed_database_vulnerability_assessment_rule_baselines_operations import ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations -from .managed_database_vulnerability_assessment_scans_operations import ManagedDatabaseVulnerabilityAssessmentScansOperations -from .managed_database_vulnerability_assessments_operations import ManagedDatabaseVulnerabilityAssessmentsOperations -from .instance_failover_groups_operations import InstanceFailoverGroupsOperations -from .backup_short_term_retention_policies_operations import BackupShortTermRetentionPoliciesOperations -from .tde_certificates_operations import TdeCertificatesOperations -from .managed_instance_tde_certificates_operations import ManagedInstanceTdeCertificatesOperations -from .managed_instance_keys_operations import ManagedInstanceKeysOperations -from .managed_instance_encryption_protectors_operations import ManagedInstanceEncryptionProtectorsOperations -from .recoverable_managed_databases_operations import RecoverableManagedDatabasesOperations -from .managed_instance_vulnerability_assessments_operations import ManagedInstanceVulnerabilityAssessmentsOperations -from .server_vulnerability_assessments_operations import ServerVulnerabilityAssessmentsOperations -from .managed_database_sensitivity_labels_operations import ManagedDatabaseSensitivityLabelsOperations +from ._recoverable_databases_operations import RecoverableDatabasesOperations +from ._restorable_dropped_databases_operations import RestorableDroppedDatabasesOperations +from ._servers_operations import ServersOperations +from ._server_connection_policies_operations import ServerConnectionPoliciesOperations +from ._database_threat_detection_policies_operations import DatabaseThreatDetectionPoliciesOperations +from ._data_masking_policies_operations import DataMaskingPoliciesOperations +from ._data_masking_rules_operations import DataMaskingRulesOperations +from ._firewall_rules_operations import FirewallRulesOperations +from ._geo_backup_policies_operations import GeoBackupPoliciesOperations +from ._databases_operations import DatabasesOperations +from ._elastic_pools_operations import ElasticPoolsOperations +from ._recommended_elastic_pools_operations import RecommendedElasticPoolsOperations +from ._replication_links_operations import ReplicationLinksOperations +from ._server_azure_ad_administrators_operations import ServerAzureADAdministratorsOperations +from ._server_communication_links_operations import ServerCommunicationLinksOperations +from ._service_objectives_operations import ServiceObjectivesOperations +from ._elastic_pool_activities_operations import ElasticPoolActivitiesOperations +from ._elastic_pool_database_activities_operations import ElasticPoolDatabaseActivitiesOperations +from ._service_tier_advisors_operations import ServiceTierAdvisorsOperations +from ._transparent_data_encryptions_operations import TransparentDataEncryptionsOperations +from ._transparent_data_encryption_activities_operations import TransparentDataEncryptionActivitiesOperations +from ._server_usages_operations import ServerUsagesOperations +from ._database_usages_operations import DatabaseUsagesOperations +from ._database_automatic_tuning_operations import DatabaseAutomaticTuningOperations +from ._encryption_protectors_operations import EncryptionProtectorsOperations +from ._failover_groups_operations import FailoverGroupsOperations +from ._operations import Operations +from ._server_keys_operations import ServerKeysOperations +from ._sync_agents_operations import SyncAgentsOperations +from ._sync_groups_operations import SyncGroupsOperations +from ._sync_members_operations import SyncMembersOperations +from ._subscription_usages_operations import SubscriptionUsagesOperations +from ._virtual_clusters_operations import VirtualClustersOperations +from ._virtual_network_rules_operations import VirtualNetworkRulesOperations +from ._extended_database_blob_auditing_policies_operations import ExtendedDatabaseBlobAuditingPoliciesOperations +from ._extended_server_blob_auditing_policies_operations import ExtendedServerBlobAuditingPoliciesOperations +from ._server_blob_auditing_policies_operations import ServerBlobAuditingPoliciesOperations +from ._database_blob_auditing_policies_operations import DatabaseBlobAuditingPoliciesOperations +from ._database_vulnerability_assessment_rule_baselines_operations import DatabaseVulnerabilityAssessmentRuleBaselinesOperations +from ._database_vulnerability_assessments_operations import DatabaseVulnerabilityAssessmentsOperations +from ._job_agents_operations import JobAgentsOperations +from ._job_credentials_operations import JobCredentialsOperations +from ._job_executions_operations import JobExecutionsOperations +from ._jobs_operations import JobsOperations +from ._job_step_executions_operations import JobStepExecutionsOperations +from ._job_steps_operations import JobStepsOperations +from ._job_target_executions_operations import JobTargetExecutionsOperations +from ._job_target_groups_operations import JobTargetGroupsOperations +from ._job_versions_operations import JobVersionsOperations +from ._long_term_retention_backups_operations import LongTermRetentionBackupsOperations +from ._backup_long_term_retention_policies_operations import BackupLongTermRetentionPoliciesOperations +from ._managed_backup_short_term_retention_policies_operations import ManagedBackupShortTermRetentionPoliciesOperations +from ._managed_databases_operations import ManagedDatabasesOperations +from ._managed_restorable_dropped_database_backup_short_term_retention_policies_operations import ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations +from ._server_automatic_tuning_operations import ServerAutomaticTuningOperations +from ._server_dns_aliases_operations import ServerDnsAliasesOperations +from ._server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations +from ._restorable_dropped_managed_databases_operations import RestorableDroppedManagedDatabasesOperations +from ._restore_points_operations import RestorePointsOperations +from ._managed_database_security_alert_policies_operations import ManagedDatabaseSecurityAlertPoliciesOperations +from ._managed_server_security_alert_policies_operations import ManagedServerSecurityAlertPoliciesOperations +from ._sensitivity_labels_operations import SensitivityLabelsOperations +from ._database_operations import DatabaseOperations +from ._elastic_pool_operations import ElasticPoolOperations +from ._capabilities_operations import CapabilitiesOperations +from ._database_vulnerability_assessment_scans_operations import DatabaseVulnerabilityAssessmentScansOperations +from ._managed_database_vulnerability_assessment_rule_baselines_operations import ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations +from ._managed_database_vulnerability_assessment_scans_operations import ManagedDatabaseVulnerabilityAssessmentScansOperations +from ._managed_database_vulnerability_assessments_operations import ManagedDatabaseVulnerabilityAssessmentsOperations +from ._instance_failover_groups_operations import InstanceFailoverGroupsOperations +from ._backup_short_term_retention_policies_operations import BackupShortTermRetentionPoliciesOperations +from ._tde_certificates_operations import TdeCertificatesOperations +from ._managed_instance_tde_certificates_operations import ManagedInstanceTdeCertificatesOperations +from ._managed_instance_keys_operations import ManagedInstanceKeysOperations +from ._managed_instance_encryption_protectors_operations import ManagedInstanceEncryptionProtectorsOperations +from ._recoverable_managed_databases_operations import RecoverableManagedDatabasesOperations +from ._managed_instance_vulnerability_assessments_operations import ManagedInstanceVulnerabilityAssessmentsOperations +from ._server_vulnerability_assessments_operations import ServerVulnerabilityAssessmentsOperations +from ._managed_database_sensitivity_labels_operations import ManagedDatabaseSensitivityLabelsOperations +from ._instance_pools_operations import InstancePoolsOperations +from ._usages_operations import UsagesOperations +from ._managed_instances_operations import ManagedInstancesOperations __all__ = [ 'RecoverableDatabasesOperations', @@ -117,7 +119,6 @@ 'DatabaseAutomaticTuningOperations', 'EncryptionProtectorsOperations', 'FailoverGroupsOperations', - 'ManagedInstancesOperations', 'Operations', 'ServerKeysOperations', 'SyncAgentsOperations', @@ -171,4 +172,7 @@ 'ManagedInstanceVulnerabilityAssessmentsOperations', 'ServerVulnerabilityAssessmentsOperations', 'ManagedDatabaseSensitivityLabelsOperations', + 'InstancePoolsOperations', + 'UsagesOperations', + 'ManagedInstancesOperations', ] diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_long_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_long_term_retention_policies_operations.py similarity index 99% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_long_term_retention_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_long_term_retention_policies_operations.py index c42ba1ab812b..532ce23b9aef 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_long_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_long_term_retention_policies_operations.py @@ -21,6 +21,8 @@ class BackupLongTermRetentionPoliciesOperations(object): """BackupLongTermRetentionPoliciesOperations 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. @@ -99,7 +101,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BackupLongTermRetentionPolicy', response) @@ -275,7 +276,6 @@ def list_by_database( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BackupLongTermRetentionPolicy', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_short_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_short_term_retention_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_short_term_retention_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_short_term_retention_policies_operations.py index c7957810c281..1fab2366624f 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_short_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_short_term_retention_policies_operations.py @@ -21,6 +21,8 @@ class BackupShortTermRetentionPoliciesOperations(object): """BackupShortTermRetentionPoliciesOperations 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. @@ -99,7 +101,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BackupShortTermRetentionPolicy', response) @@ -354,8 +355,7 @@ def list_by_database( ~azure.mgmt.sql.models.BackupShortTermRetentionPolicyPaged[~azure.mgmt.sql.models.BackupShortTermRetentionPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -387,6 +387,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -397,12 +402,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.BackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.BackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.BackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/capabilities_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_capabilities_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/capabilities_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_capabilities_operations.py index a873a3a87f92..755f2dd6c70f 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/capabilities_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_capabilities_operations.py @@ -19,6 +19,8 @@ class CapabilitiesOperations(object): """CapabilitiesOperations 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. @@ -93,7 +95,6 @@ def list_by_location( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LocationCapabilities', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_policies_operations.py index 2d1099c8be0d..3d51678f036d 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_policies_operations.py @@ -19,6 +19,8 @@ class DataMaskingPoliciesOperations(object): """DataMaskingPoliciesOperations 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. @@ -111,7 +113,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DataMaskingPolicy', response) @@ -179,7 +180,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DataMaskingPolicy', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_rules_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_rules_operations.py similarity index 96% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_rules_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_rules_operations.py index c5fd4c63ab46..4430f4d7bc9c 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_rules_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_rules_operations.py @@ -19,6 +19,8 @@ class DataMaskingRulesOperations(object): """DataMaskingRulesOperations 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. @@ -106,7 +108,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DataMaskingRule', response) if response.status_code == 201: @@ -141,8 +142,7 @@ def list_by_database( ~azure.mgmt.sql.models.DataMaskingRulePaged[~azure.mgmt.sql.models.DataMaskingRule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -175,6 +175,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -185,12 +190,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DataMaskingRulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DataMaskingRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DataMaskingRulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_automatic_tuning_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_automatic_tuning_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_automatic_tuning_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_automatic_tuning_operations.py index 7a94b97b9546..30b493d10191 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_automatic_tuning_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_automatic_tuning_operations.py @@ -19,6 +19,8 @@ class DatabaseAutomaticTuningOperations(object): """DatabaseAutomaticTuningOperations 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. @@ -93,7 +95,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseAutomaticTuning', response) @@ -172,7 +173,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseAutomaticTuning', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_blob_auditing_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_blob_auditing_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_blob_auditing_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_blob_auditing_policies_operations.py index a0c09cfd8f09..873e1dc55d36 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_blob_auditing_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_blob_auditing_policies_operations.py @@ -19,6 +19,8 @@ class DatabaseBlobAuditingPoliciesOperations(object): """DatabaseBlobAuditingPoliciesOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseBlobAuditingPolicy', response) @@ -170,7 +171,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseBlobAuditingPolicy', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_operations.py index 8d482411f199..9fdb5969fcff 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_operations.py @@ -19,6 +19,8 @@ class DatabaseOperations(object): """DatabaseOperations 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. @@ -120,8 +122,7 @@ def list_by_database( ~azure.mgmt.sql.models.DatabaseOperationPaged[~azure.mgmt.sql.models.DatabaseOperation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -153,6 +154,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -163,12 +169,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabaseOperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabaseOperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabaseOperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_threat_detection_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_threat_detection_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_threat_detection_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_threat_detection_policies_operations.py index 38501854c428..888228ba55d3 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_threat_detection_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_threat_detection_policies_operations.py @@ -19,6 +19,8 @@ class DatabaseThreatDetectionPoliciesOperations(object): """DatabaseThreatDetectionPoliciesOperations 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. @@ -97,7 +99,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseSecurityAlertPolicy', response) @@ -172,7 +173,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseSecurityAlertPolicy', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_usages_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_usages_operations.py similarity index 92% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_usages_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_usages_operations.py index 543a8ba6f509..8cf8df83a5a8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_usages_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_usages_operations.py @@ -19,6 +19,8 @@ class DatabaseUsagesOperations(object): """DatabaseUsagesOperations 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. @@ -59,8 +61,7 @@ def list_by_database( ~azure.mgmt.sql.models.DatabaseUsagePaged[~azure.mgmt.sql.models.DatabaseUsage] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -92,6 +93,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -102,12 +108,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabaseUsagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabaseUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabaseUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/usages'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_rule_baselines_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_rule_baselines_operations.py similarity index 99% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_rule_baselines_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_rule_baselines_operations.py index 9dba003a5ff2..8e04b1fbc4a1 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_rule_baselines_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_rule_baselines_operations.py @@ -19,6 +19,8 @@ class DatabaseVulnerabilityAssessmentRuleBaselinesOperations(object): """DatabaseVulnerabilityAssessmentRuleBaselinesOperations 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. @@ -109,7 +111,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentRuleBaseline', response) @@ -199,7 +200,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentRuleBaseline', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_scans_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_scans_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_scans_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_scans_operations.py index 97725d782e9e..06efd2638038 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_scans_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_scans_operations.py @@ -21,6 +21,8 @@ class DatabaseVulnerabilityAssessmentScansOperations(object): """DatabaseVulnerabilityAssessmentScansOperations 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. @@ -64,8 +66,7 @@ def list_by_database( ~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecordPaged[~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecord] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -98,6 +99,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -108,12 +114,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans'} @@ -180,7 +184,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VulnerabilityAssessmentScanRecord', response) @@ -345,7 +348,6 @@ def export( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentScansExport', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessments_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessments_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessments_operations.py index 5fa6a1ef7ade..4fbf4f24a995 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessments_operations.py @@ -19,6 +19,8 @@ class DatabaseVulnerabilityAssessmentsOperations(object): """DatabaseVulnerabilityAssessmentsOperations 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. @@ -98,7 +100,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessment', response) @@ -175,7 +176,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessment', response) if response.status_code == 201: @@ -271,8 +271,7 @@ def list_by_database( ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentPaged[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessment] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -304,6 +303,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -314,12 +318,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_databases_operations.py similarity index 92% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_databases_operations.py index 3b4e01e8a397..e3b5174323da 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_databases_operations.py @@ -21,6 +21,8 @@ class DatabasesOperations(object): """DatabasesOperations 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. @@ -390,8 +392,7 @@ def list_metrics( """ api_version = "2014-04-01" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metrics.metadata['url'] @@ -424,6 +425,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -434,12 +440,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metrics'} @@ -468,8 +472,7 @@ def list_metric_definitions( """ api_version = "2014-04-01" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metric_definitions.metadata['url'] @@ -501,6 +504,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -511,12 +519,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metricDefinitions'} @@ -630,8 +636,7 @@ def list_by_server( """ api_version = "2017-10-01-preview" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -662,6 +667,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -672,12 +682,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases'} @@ -740,7 +748,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Database', response) @@ -1080,8 +1087,7 @@ def list_by_elastic_pool( """ api_version = "2017-10-01-preview" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_elastic_pool.metadata['url'] @@ -1113,6 +1119,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -1123,12 +1134,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_elastic_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases'} @@ -1402,3 +1411,90 @@ def rename( client_raw_response = ClientRawResponse(None, response) return client_raw_response rename.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/move'} + + + def _failover_initial( + self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): + api_version = "2018-06-01-preview" + + # Construct URL + url = self.failover.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def failover( + self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Failovers a database. + + :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 server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database to failover. + :type database_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._failover_initial( + resource_group_name=resource_group_name, + server_name=server_name, + database_name=database_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) + failover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/failover'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_activities_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_activities_operations.py similarity index 92% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_activities_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_activities_operations.py index a2d2dc49c203..3fb2cfc9bb14 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_activities_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_activities_operations.py @@ -19,6 +19,8 @@ class ElasticPoolActivitiesOperations(object): """ElasticPoolActivitiesOperations 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. @@ -60,8 +62,7 @@ def list_by_elastic_pool( ~azure.mgmt.sql.models.ElasticPoolActivityPaged[~azure.mgmt.sql.models.ElasticPoolActivity] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_elastic_pool.metadata['url'] @@ -93,6 +94,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -103,12 +109,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ElasticPoolActivityPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ElasticPoolActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ElasticPoolActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_elastic_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolActivity'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_database_activities_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_database_activities_operations.py similarity index 92% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_database_activities_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_database_activities_operations.py index 5ed1492b9615..6280285c5e59 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_database_activities_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_database_activities_operations.py @@ -19,6 +19,8 @@ class ElasticPoolDatabaseActivitiesOperations(object): """ElasticPoolDatabaseActivitiesOperations 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. @@ -59,8 +61,7 @@ def list_by_elastic_pool( ~azure.mgmt.sql.models.ElasticPoolDatabaseActivityPaged[~azure.mgmt.sql.models.ElasticPoolDatabaseActivity] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_elastic_pool.metadata['url'] @@ -92,6 +93,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -102,12 +108,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ElasticPoolDatabaseActivityPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ElasticPoolDatabaseActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ElasticPoolDatabaseActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_elastic_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolDatabaseActivity'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_operations.py index eb71face0db1..26dd59fe4abf 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_operations.py @@ -19,6 +19,8 @@ class ElasticPoolOperations(object): """ElasticPoolOperations 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. @@ -120,8 +122,7 @@ def list_by_elastic_pool( ~azure.mgmt.sql.models.ElasticPoolOperationPaged[~azure.mgmt.sql.models.ElasticPoolOperation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_elastic_pool.metadata['url'] @@ -153,6 +154,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -163,12 +169,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ElasticPoolOperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ElasticPoolOperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ElasticPoolOperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_elastic_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/operations'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pools_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pools_operations.py similarity index 85% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pools_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pools_operations.py index e7fba924b0c6..8f780c6995e1 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pools_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pools_operations.py @@ -21,6 +21,8 @@ class ElasticPoolsOperations(object): """ElasticPoolsOperations 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. @@ -64,8 +66,7 @@ def list_metrics( """ api_version = "2014-04-01" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metrics.metadata['url'] @@ -98,6 +99,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -108,12 +114,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metrics'} @@ -142,8 +146,7 @@ def list_metric_definitions( """ api_version = "2014-04-01" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metric_definitions.metadata['url'] @@ -175,6 +178,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -185,12 +193,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metricDefinitions'} @@ -219,8 +225,7 @@ def list_by_server( """ api_version = "2017-10-01-preview" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -253,6 +258,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -263,12 +273,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ElasticPoolPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ElasticPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ElasticPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools'} @@ -331,7 +339,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ElasticPool', response) @@ -646,3 +653,90 @@ def get_long_running_output(response): 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.Sql/servers/{serverName}/elasticPools/{elasticPoolName}'} + + + def _failover_initial( + self, resource_group_name, server_name, elastic_pool_name, custom_headers=None, raw=False, **operation_config): + api_version = "2018-06-01-preview" + + # Construct URL + url = self.failover.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'elasticPoolName': self._serialize.url("elastic_pool_name", elastic_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def failover( + self, resource_group_name, server_name, elastic_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Failovers an elastic pool. + + :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 server_name: The name of the server. + :type server_name: str + :param elastic_pool_name: The name of the elastic pool to failover. + :type elastic_pool_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._failover_initial( + resource_group_name=resource_group_name, + server_name=server_name, + elastic_pool_name=elastic_pool_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) + failover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/failover'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/encryption_protectors_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_encryption_protectors_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/encryption_protectors_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_encryption_protectors_operations.py index d19233971f4c..4ee94af811f2 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/encryption_protectors_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_encryption_protectors_operations.py @@ -21,6 +21,8 @@ class EncryptionProtectorsOperations(object): """EncryptionProtectorsOperations 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. @@ -61,8 +63,7 @@ def list_by_server( ~azure.mgmt.sql.models.EncryptionProtectorPaged[~azure.mgmt.sql.models.EncryptionProtector] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -93,6 +94,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -103,12 +109,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.EncryptionProtectorPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.EncryptionProtectorPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.EncryptionProtectorPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector'} @@ -167,7 +171,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('EncryptionProtector', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_database_blob_auditing_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_database_blob_auditing_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_database_blob_auditing_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_database_blob_auditing_policies_operations.py index 38bdfb2a0875..ea9c9d8d7aaf 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_database_blob_auditing_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_database_blob_auditing_policies_operations.py @@ -19,6 +19,8 @@ class ExtendedDatabaseBlobAuditingPoliciesOperations(object): """ExtendedDatabaseBlobAuditingPoliciesOperations 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. @@ -97,7 +99,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ExtendedDatabaseBlobAuditingPolicy', response) @@ -173,7 +174,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ExtendedDatabaseBlobAuditingPolicy', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_server_blob_auditing_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_server_blob_auditing_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_server_blob_auditing_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_server_blob_auditing_policies_operations.py index 64524eb42a17..dff8fac62031 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_server_blob_auditing_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_server_blob_auditing_policies_operations.py @@ -21,6 +21,8 @@ class ExtendedServerBlobAuditingPoliciesOperations(object): """ExtendedServerBlobAuditingPoliciesOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ExtendedServerBlobAuditingPolicy', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/failover_groups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_failover_groups_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/failover_groups_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_failover_groups_operations.py index fb779255c2a8..797c0d27ab17 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/failover_groups_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_failover_groups_operations.py @@ -21,6 +21,8 @@ class FailoverGroupsOperations(object): """FailoverGroupsOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('FailoverGroup', response) @@ -430,8 +431,7 @@ def list_by_server( ~azure.mgmt.sql.models.FailoverGroupPaged[~azure.mgmt.sql.models.FailoverGroup] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -462,6 +462,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -472,12 +477,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.FailoverGroupPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.FailoverGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.FailoverGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/firewall_rules_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_firewall_rules_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/firewall_rules_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_firewall_rules_operations.py index 7f62a3fa0811..e211cff58cbb 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/firewall_rules_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_firewall_rules_operations.py @@ -19,6 +19,8 @@ class FirewallRulesOperations(object): """FirewallRulesOperations 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. @@ -107,7 +109,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('FirewallRule', response) if response.status_code == 201: @@ -234,7 +235,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('FirewallRule', response) @@ -265,8 +265,7 @@ def list_by_server( ~azure.mgmt.sql.models.FirewallRulePaged[~azure.mgmt.sql.models.FirewallRule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -297,6 +296,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -307,12 +311,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.FirewallRulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.FirewallRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.FirewallRulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/geo_backup_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_geo_backup_policies_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/geo_backup_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_geo_backup_policies_operations.py index bd81aeca5fa6..e3b1cc9cd7ec 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/geo_backup_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_geo_backup_policies_operations.py @@ -19,6 +19,8 @@ class GeoBackupPoliciesOperations(object): """GeoBackupPoliciesOperations 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. @@ -105,7 +107,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('GeoBackupPolicy', response) if response.status_code == 201: @@ -175,7 +176,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('GeoBackupPolicy', response) @@ -208,8 +208,7 @@ def list_by_database( ~azure.mgmt.sql.models.GeoBackupPolicyPaged[~azure.mgmt.sql.models.GeoBackupPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -241,6 +240,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -251,12 +255,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.GeoBackupPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.GeoBackupPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.GeoBackupPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/instance_failover_groups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_failover_groups_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/instance_failover_groups_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_failover_groups_operations.py index 795d169692ab..33960af71031 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/instance_failover_groups_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_failover_groups_operations.py @@ -21,6 +21,8 @@ class InstanceFailoverGroupsOperations(object): """InstanceFailoverGroupsOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('InstanceFailoverGroup', response) @@ -323,8 +324,7 @@ def list_by_location( ~azure.mgmt.sql.models.InstanceFailoverGroupPaged[~azure.mgmt.sql.models.InstanceFailoverGroup] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_location.metadata['url'] @@ -355,6 +355,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -365,12 +370,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.InstanceFailoverGroupPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.InstanceFailoverGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.InstanceFailoverGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_pools_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_pools_operations.py new file mode 100644 index 000000000000..43721ed26b1b --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_pools_operations.py @@ -0,0 +1,534 @@ +# 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 InstancePoolsOperations(object): + """InstancePoolsOperations 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: The API version to use for the request. Constant value: "2018-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01-preview" + + self.config = config + + def get( + self, resource_group_name, instance_pool_name, custom_headers=None, raw=False, **operation_config): + """Gets an instance pool. + + :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 instance_pool_name: The name of the instance pool to be + retrieved. + :type instance_pool_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: InstancePool or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.InstancePool or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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('InstancePool', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}'} + + + def _create_or_update_initial( + self, resource_group_name, instance_pool_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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(parameters, 'InstancePool') + + # 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, 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('InstancePool', response) + if response.status_code == 201: + deserialized = self._deserialize('InstancePool', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, instance_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates an instance pool. + + :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 instance_pool_name: The name of the instance pool to be created + or updated. + :type instance_pool_name: str + :param parameters: The requested instance pool resource state. + :type parameters: ~azure.mgmt.sql.models.InstancePool + :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 InstancePool or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.InstancePool] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.InstancePool]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + instance_pool_name=instance_pool_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('InstancePool', 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.Sql/instancePools/{instancePoolName}'} + + + def _delete_initial( + self, resource_group_name, instance_pool_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, instance_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an instance pool. + + :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 instance_pool_name: The name of the instance pool to be deleted + :type instance_pool_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, + instance_pool_name=instance_pool_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.Sql/instancePools/{instancePoolName}'} + + + def _update_initial( + self, resource_group_name, instance_pool_name, tags=None, custom_headers=None, raw=False, **operation_config): + parameters = models.InstancePoolUpdate(tags=tags) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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(parameters, 'InstancePoolUpdate') + + # 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('InstancePool', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, instance_pool_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates an instance pool. + + :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 instance_pool_name: The name of the instance pool to be + updated. + :type instance_pool_name: str + :param tags: Resource tags. + :type tags: dict[str, 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 InstancePool or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.InstancePool] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.InstancePool]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + instance_pool_name=instance_pool_name, + tags=tags, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('InstancePool', 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.Sql/instancePools/{instancePoolName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of instance pools in the resource group. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :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: An iterator like instance of InstancePool + :rtype: + ~azure.mgmt.sql.models.InstancePoolPaged[~azure.mgmt.sql.models.InstancePool] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.InstancePoolPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of all instance pools in the subscription. + + :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: An iterator like instance of InstancePool + :rtype: + ~azure.mgmt.sql.models.InstancePoolPaged[~azure.mgmt.sql.models.InstancePool] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.InstancePoolPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/instancePools'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_agents_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_agents_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_agents_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_agents_operations.py index eaeb4480cab8..a6641946abaf 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_agents_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_agents_operations.py @@ -21,6 +21,8 @@ class JobAgentsOperations(object): """JobAgentsOperations 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. @@ -59,8 +61,7 @@ def list_by_server( ~azure.mgmt.sql.models.JobAgentPaged[~azure.mgmt.sql.models.JobAgent] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -91,6 +92,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -101,12 +107,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobAgentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobAgentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobAgentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents'} @@ -167,7 +171,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobAgent', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_credentials_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_credentials_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_credentials_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_credentials_operations.py index 309d5212b81e..9c469c605600 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_credentials_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_credentials_operations.py @@ -19,6 +19,8 @@ class JobCredentialsOperations(object): """JobCredentialsOperations 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. @@ -59,8 +61,7 @@ def list_by_agent( ~azure.mgmt.sql.models.JobCredentialPaged[~azure.mgmt.sql.models.JobCredential] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_agent.metadata['url'] @@ -92,6 +93,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -102,12 +108,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobCredentialPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobCredentialPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobCredentialPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials'} @@ -171,7 +175,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobCredential', response) @@ -251,7 +254,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobCredential', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_executions_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_executions_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_executions_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_executions_operations.py index f874991f8510..71885bdb661e 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_executions_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_executions_operations.py @@ -21,6 +21,8 @@ class JobExecutionsOperations(object): """JobExecutionsOperations 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. @@ -80,8 +82,7 @@ def list_by_agent( ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_agent.metadata['url'] @@ -127,6 +128,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -137,12 +143,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/executions'} @@ -357,8 +361,7 @@ def list_by_job( ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_job.metadata['url'] @@ -405,6 +408,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -415,12 +423,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions'} @@ -487,7 +493,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobExecution', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_step_executions_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_step_executions_operations.py similarity index 96% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_step_executions_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_step_executions_operations.py index 92c6442fc7e5..8410a94138e8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_step_executions_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_step_executions_operations.py @@ -19,6 +19,8 @@ class JobStepExecutionsOperations(object): """JobStepExecutionsOperations 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. @@ -82,8 +84,7 @@ def list_by_job_execution( ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_job_execution.metadata['url'] @@ -131,6 +132,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -141,12 +147,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_job_execution.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps'} @@ -216,7 +220,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobExecution', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_steps_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_steps_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_steps_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_steps_operations.py index a37bfc3f4474..e7383e961171 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_steps_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_steps_operations.py @@ -19,6 +19,8 @@ class JobStepsOperations(object): """JobStepsOperations 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. @@ -63,8 +65,7 @@ def list_by_version( ~azure.mgmt.sql.models.JobStepPaged[~azure.mgmt.sql.models.JobStep] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_version.metadata['url'] @@ -98,6 +99,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -108,12 +114,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobStepPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobStepPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobStepPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps'} @@ -183,7 +187,6 @@ def get_by_version( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobStep', response) @@ -218,8 +221,7 @@ def list_by_job( ~azure.mgmt.sql.models.JobStepPaged[~azure.mgmt.sql.models.JobStep] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_job.metadata['url'] @@ -252,6 +254,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -262,12 +269,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobStepPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobStepPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobStepPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps'} @@ -334,7 +339,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobStep', response) @@ -414,7 +418,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobStep', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_executions_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_executions_operations.py similarity index 96% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_executions_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_executions_operations.py index 6c664709c063..a6722c0278bc 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_executions_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_executions_operations.py @@ -19,6 +19,8 @@ class JobTargetExecutionsOperations(object): """JobTargetExecutionsOperations 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. @@ -82,8 +84,7 @@ def list_by_job_execution( ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_job_execution.metadata['url'] @@ -131,6 +132,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -141,12 +147,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_job_execution.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/targets'} @@ -198,8 +202,7 @@ def list_by_step( ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_step.metadata['url'] @@ -248,6 +251,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -258,12 +266,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_step.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets'} @@ -336,7 +342,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobExecution', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_groups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_groups_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_groups_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_groups_operations.py index 6a8bf6eed349..a3769c0e2bcb 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_groups_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_groups_operations.py @@ -19,6 +19,8 @@ class JobTargetGroupsOperations(object): """JobTargetGroupsOperations 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. @@ -59,8 +61,7 @@ def list_by_agent( ~azure.mgmt.sql.models.JobTargetGroupPaged[~azure.mgmt.sql.models.JobTargetGroup] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_agent.metadata['url'] @@ -92,6 +93,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -102,12 +108,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobTargetGroupPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobTargetGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobTargetGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups'} @@ -171,7 +175,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobTargetGroup', response) @@ -249,7 +252,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobTargetGroup', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_versions_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_versions_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_versions_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_versions_operations.py index d03635534ff4..da92973e0695 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_versions_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_versions_operations.py @@ -19,6 +19,8 @@ class JobVersionsOperations(object): """JobVersionsOperations 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. @@ -61,8 +63,7 @@ def list_by_job( ~azure.mgmt.sql.models.JobVersionPaged[~azure.mgmt.sql.models.JobVersion] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_job.metadata['url'] @@ -95,6 +96,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -105,12 +111,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobVersionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobVersionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobVersionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions'} @@ -177,7 +181,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobVersion', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/jobs_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_jobs_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/jobs_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_jobs_operations.py index 2545fc1514e5..f0830d089829 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/jobs_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_jobs_operations.py @@ -19,6 +19,8 @@ class JobsOperations(object): """JobsOperations 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. @@ -58,8 +60,7 @@ def list_by_agent( :rtype: ~azure.mgmt.sql.models.JobPaged[~azure.mgmt.sql.models.Job] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_agent.metadata['url'] @@ -91,6 +92,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -101,12 +107,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs'} @@ -170,7 +174,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Job', response) @@ -250,7 +253,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Job', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_backups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_backups_operations.py new file mode 100644 index 000000000000..55a0bbdd777a --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_backups_operations.py @@ -0,0 +1,880 @@ +# 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 LongTermRetentionBackupsOperations(object): + """LongTermRetentionBackupsOperations 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: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-01-preview" + + self.config = config + + def get_by_resource_group( + self, resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): + """Gets a long term retention backup. + + :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 location_name: The location of the database. + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param backup_name: The backup name. + :type backup_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: LongTermRetentionBackup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.LongTermRetentionBackup or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'backupName': self._serialize.url("backup_name", backup_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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('LongTermRetentionBackup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} + + + def _delete_by_resource_group_initial( + self, resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'backupName': self._serialize.url("backup_name", backup_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.delete(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete_by_resource_group( + self, resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a long term retention backup. + + :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 location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param backup_name: The backup name. + :type backup_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_by_resource_group_initial( + resource_group_name=resource_group_name, + location_name=location_name, + long_term_retention_server_name=long_term_retention_server_name, + long_term_retention_database_name=long_term_retention_database_name, + backup_name=backup_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_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} + + def list_by_resource_group_database( + self, resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists all long term retention backups for a database. + + :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 location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group_database.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups'} + + def list_by_resource_group_location( + self, resource_group_name, location_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists the long term retention backups for a given location. + + :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 location_name: The location of the database + :type location_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group_location.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group_location.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups'} + + def list_by_resource_group_server( + self, resource_group_name, location_name, long_term_retention_server_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists the long term retention backups for a given 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 location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group_server.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups'} + + def get( + self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): + """Gets a long term retention backup. + + :param location_name: The location of the database. + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param backup_name: The backup name. + :type backup_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: LongTermRetentionBackup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.LongTermRetentionBackup or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'backupName': self._serialize.url("backup_name", backup_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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('LongTermRetentionBackup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} + + + def _delete_initial( + self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'backupName': self._serialize.url("backup_name", backup_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.delete(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a long term retention backup. + + :param location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param backup_name: The backup name. + :type backup_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( + location_name=location_name, + long_term_retention_server_name=long_term_retention_server_name, + long_term_retention_database_name=long_term_retention_database_name, + backup_name=backup_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}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} + + def list_by_database( + self, location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists all long term retention backups for a database. + + :param location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_database.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups'} + + def list_by_location( + self, location_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists the long term retention backups for a given location. + + :param location_name: The location of the database + :type location_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_location.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups'} + + def list_by_server( + self, location_name, long_term_retention_server_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists the long term retention backups for a given server. + + :param location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_backup_short_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_backup_short_term_retention_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_backup_short_term_retention_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_backup_short_term_retention_policies_operations.py index 8f50f44b5354..475f8b2228e1 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_backup_short_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_backup_short_term_retention_policies_operations.py @@ -21,6 +21,8 @@ class ManagedBackupShortTermRetentionPoliciesOperations(object): """ManagedBackupShortTermRetentionPoliciesOperations 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. @@ -99,7 +101,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedBackupShortTermRetentionPolicy', response) @@ -355,8 +356,7 @@ def list_by_database( ~azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicyPaged[~azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -388,6 +388,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -398,12 +403,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_security_alert_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_security_alert_policies_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_security_alert_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_security_alert_policies_operations.py index 87ba42c8193a..c1f7467d795c 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_security_alert_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_security_alert_policies_operations.py @@ -19,6 +19,8 @@ class ManagedDatabaseSecurityAlertPoliciesOperations(object): """ManagedDatabaseSecurityAlertPoliciesOperations 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. @@ -98,7 +100,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedDatabaseSecurityAlertPolicy', response) @@ -175,7 +176,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedDatabaseSecurityAlertPolicy', response) if response.status_code == 201: @@ -212,8 +212,7 @@ def list_by_database( ~azure.mgmt.sql.models.ManagedDatabaseSecurityAlertPolicyPaged[~azure.mgmt.sql.models.ManagedDatabaseSecurityAlertPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -245,6 +244,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -255,12 +259,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedDatabaseSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedDatabaseSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedDatabaseSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_sensitivity_labels_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_sensitivity_labels_operations.py similarity index 70% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_sensitivity_labels_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_sensitivity_labels_operations.py index 1b03564854f8..5ff97dd77a49 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_sensitivity_labels_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_sensitivity_labels_operations.py @@ -19,12 +19,13 @@ class ManagedDatabaseSensitivityLabelsOperations(object): """ManagedDatabaseSensitivityLabelsOperations 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: The API version to use for the request. Constant value: "2018-06-01-preview". - :ivar sensitivity_label_source: The source of the sensitivity label. Constant value: "current". """ models = models @@ -35,7 +36,6 @@ def __init__(self, client, config, serializer, deserializer): self._serialize = serializer self._deserialize = deserializer self.api_version = "2018-06-01-preview" - self.sensitivity_label_source = "current" self.config = config @@ -109,7 +109,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SensitivityLabel', response) @@ -150,6 +149,8 @@ def create_or_update( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + sensitivity_label_source = "current" + # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { @@ -159,7 +160,7 @@ def create_or_update( 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), 'tableName': self._serialize.url("table_name", table_name, 'str'), 'columnName': self._serialize.url("column_name", column_name, 'str'), - 'sensitivityLabelSource': self._serialize.url("self.sensitivity_label_source", self.sensitivity_label_source, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -192,7 +193,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SensitivityLabel', response) if response.status_code == 201: @@ -232,6 +232,8 @@ def delete( :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + sensitivity_label_source = "current" + # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -241,7 +243,7 @@ def delete( 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), 'tableName': self._serialize.url("table_name", table_name, 'str'), 'columnName': self._serialize.url("column_name", column_name, 'str'), - 'sensitivityLabelSource': self._serialize.url("self.sensitivity_label_source", self.sensitivity_label_source, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -273,6 +275,147 @@ def delete( return client_raw_response delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}'} + def disable_recommendation( + self, resource_group_name, managed_instance_name, database_name, schema_name, table_name, column_name, custom_headers=None, raw=False, **operation_config): + """Disables sensitivity recommendations on a given column. + + :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 managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param database_name: The name of the database. + :type database_name: str + :param schema_name: The name of the schema. + :type schema_name: str + :param table_name: The name of the table. + :type table_name: str + :param column_name: The name of the column. + :type column_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` + """ + sensitivity_label_source = "recommended" + + # Construct URL + url = self.disable_recommendation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str'), + 'columnName': self._serialize.url("column_name", column_name, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_recommendation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable'} + + def enable_recommendation( + self, resource_group_name, managed_instance_name, database_name, schema_name, table_name, column_name, custom_headers=None, raw=False, **operation_config): + """Enables sensitivity recommendations on a given column (recommendations + are enabled by default on all columns). + + :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 managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param database_name: The name of the database. + :type database_name: str + :param schema_name: The name of the schema. + :type schema_name: str + :param table_name: The name of the table. + :type table_name: str + :param column_name: The name of the column. + :type column_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` + """ + sensitivity_label_source = "recommended" + + # Construct URL + url = self.enable_recommendation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str'), + 'columnName': self._serialize.url("column_name", column_name, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + enable_recommendation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable'} + def list_current_by_database( self, resource_group_name, managed_instance_name, database_name, filter=None, custom_headers=None, raw=False, **operation_config): """Gets the sensitivity labels of a given database. @@ -298,8 +441,7 @@ def list_current_by_database( ~azure.mgmt.sql.models.SensitivityLabelPaged[~azure.mgmt.sql.models.SensitivityLabel] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_current_by_database.metadata['url'] @@ -333,6 +475,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -343,18 +490,16 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_current_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels'} def list_recommended_by_database( - self, resource_group_name, managed_instance_name, database_name, skip_token=None, filter=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, managed_instance_name, database_name, include_disabled_recommendations=None, skip_token=None, filter=None, custom_headers=None, raw=False, **operation_config): """Gets the sensitivity labels of a given database. :param resource_group_name: The name of the resource group that @@ -365,6 +510,9 @@ def list_recommended_by_database( :type managed_instance_name: str :param database_name: The name of the database. :type database_name: str + :param include_disabled_recommendations: Specifies whether to include + disabled recommendations or not. + :type include_disabled_recommendations: bool :param skip_token: :type skip_token: str :param filter: An OData filter expression that filters elements in the @@ -380,8 +528,7 @@ def list_recommended_by_database( ~azure.mgmt.sql.models.SensitivityLabelPaged[~azure.mgmt.sql.models.SensitivityLabel] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_recommended_by_database.metadata['url'] @@ -395,6 +542,8 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} + if include_disabled_recommendations is not None: + query_parameters['includeDisabledRecommendations'] = self._serialize.query("include_disabled_recommendations", include_disabled_recommendations, 'bool') if skip_token is not None: query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') if filter is not None: @@ -417,6 +566,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -427,12 +581,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_recommended_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/recommendedSensitivityLabels'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_rule_baselines_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_rule_baselines_operations.py similarity index 99% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_rule_baselines_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_rule_baselines_operations.py index bf5121b3707b..2c4017b6193b 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_rule_baselines_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_rule_baselines_operations.py @@ -19,6 +19,8 @@ class ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations(object): """ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations 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. @@ -109,7 +111,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentRuleBaseline', response) @@ -199,7 +200,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentRuleBaseline', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_scans_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_scans_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_scans_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_scans_operations.py index d45dc1beb3b7..e3a2b20ffdc4 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_scans_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_scans_operations.py @@ -21,6 +21,8 @@ class ManagedDatabaseVulnerabilityAssessmentScansOperations(object): """ManagedDatabaseVulnerabilityAssessmentScansOperations 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. @@ -64,8 +66,7 @@ def list_by_database( ~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecordPaged[~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecord] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -98,6 +99,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -108,12 +114,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans'} @@ -180,7 +184,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VulnerabilityAssessmentScanRecord', response) @@ -345,7 +348,6 @@ def export( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentScansExport', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessments_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessments_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessments_operations.py index 6c224244c8fc..c5d8e57cb81f 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessments_operations.py @@ -19,6 +19,8 @@ class ManagedDatabaseVulnerabilityAssessmentsOperations(object): """ManagedDatabaseVulnerabilityAssessmentsOperations 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. @@ -98,7 +100,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessment', response) @@ -175,7 +176,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessment', response) if response.status_code == 201: @@ -271,8 +271,7 @@ def list_by_database( ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentPaged[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessment] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -304,6 +303,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -314,12 +318,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_databases_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_databases_operations.py index e2b8d02ae534..9825283b3ab6 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_databases_operations.py @@ -21,6 +21,8 @@ class ManagedDatabasesOperations(object): """ManagedDatabasesOperations 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. @@ -149,8 +151,7 @@ def list_by_instance( ~azure.mgmt.sql.models.ManagedDatabasePaged[~azure.mgmt.sql.models.ManagedDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -181,6 +182,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -191,12 +197,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases'} @@ -257,7 +261,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedDatabase', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_encryption_protectors_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_encryption_protectors_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_encryption_protectors_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_encryption_protectors_operations.py index 61ab8baa5d32..5c35d34aac66 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_encryption_protectors_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_encryption_protectors_operations.py @@ -21,6 +21,8 @@ class ManagedInstanceEncryptionProtectorsOperations(object): """ManagedInstanceEncryptionProtectorsOperations 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. @@ -62,8 +64,7 @@ def list_by_instance( ~azure.mgmt.sql.models.ManagedInstanceEncryptionProtectorPaged[~azure.mgmt.sql.models.ManagedInstanceEncryptionProtector] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -94,6 +95,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -104,12 +110,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedInstanceEncryptionProtectorPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedInstanceEncryptionProtectorPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedInstanceEncryptionProtectorPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector'} @@ -169,7 +173,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedInstanceEncryptionProtector', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_keys_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_keys_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_keys_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_keys_operations.py index adb5c4bfa0f0..7d7876efc7bd 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_keys_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_keys_operations.py @@ -21,6 +21,8 @@ class ManagedInstanceKeysOperations(object): """ManagedInstanceKeysOperations 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. @@ -62,8 +64,7 @@ def list_by_instance( ~azure.mgmt.sql.models.ManagedInstanceKeyPaged[~azure.mgmt.sql.models.ManagedInstanceKey] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -96,6 +97,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -106,12 +112,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedInstanceKeyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedInstanceKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedInstanceKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys'} @@ -172,7 +176,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedInstanceKey', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_tde_certificates_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_tde_certificates_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_tde_certificates_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_tde_certificates_operations.py index be4ee1969fdd..c3f3e3fdc8e5 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_tde_certificates_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_tde_certificates_operations.py @@ -21,6 +21,8 @@ class ManagedInstanceTdeCertificatesOperations(object): """ManagedInstanceTdeCertificatesOperations 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. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_vulnerability_assessments_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_vulnerability_assessments_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_vulnerability_assessments_operations.py index 601294eb6777..04c452d37993 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_vulnerability_assessments_operations.py @@ -19,6 +19,8 @@ class ManagedInstanceVulnerabilityAssessmentsOperations(object): """ManagedInstanceVulnerabilityAssessmentsOperations 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. @@ -95,7 +97,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedInstanceVulnerabilityAssessment', response) @@ -169,7 +170,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedInstanceVulnerabilityAssessment', response) if response.status_code == 201: @@ -261,8 +261,7 @@ def list_by_instance( ~azure.mgmt.sql.models.ManagedInstanceVulnerabilityAssessmentPaged[~azure.mgmt.sql.models.ManagedInstanceVulnerabilityAssessment] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -293,6 +292,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -303,12 +307,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedInstanceVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedInstanceVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedInstanceVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instances_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instances_operations.py similarity index 84% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instances_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instances_operations.py index 1fee247c7c96..c1cb3d973264 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instances_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instances_operations.py @@ -21,11 +21,13 @@ class ManagedInstancesOperations(object): """ManagedInstancesOperations 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: The API version to use for the request. Constant value: "2015-05-01-preview". + :ivar api_version: The API version to use for the request. Constant value: "2018-06-01-preview". """ models = models @@ -35,14 +37,20 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-05-01-preview" + self.api_version = "2018-06-01-preview" self.config = config - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of all managed instances in the subscription. + def list_by_instance_pool( + self, resource_group_name, instance_pool_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of all managed instances in an instance pool. + :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 instance_pool_name: The instance pool name. + :type instance_pool_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 @@ -53,12 +61,13 @@ def list( ~azure.mgmt.sql.models.ManagedInstancePaged[~azure.mgmt.sql.models.ManagedInstance] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list_by_instance_pool.metadata['url'] path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -83,6 +92,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -93,15 +107,13 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances'} + list_by_instance_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/managedInstances'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -121,8 +133,7 @@ def list_by_resource_group( ~azure.mgmt.sql.models.ManagedInstancePaged[~azure.mgmt.sql.models.ManagedInstance] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -152,6 +163,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -162,12 +178,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances'} @@ -225,7 +239,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedInstance', response) @@ -522,3 +535,69 @@ def get_long_running_output(response): 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.Sql/managedInstances/{managedInstanceName}'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of all managed instances in the subscription. + + :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: An iterator like instance of ManagedInstance + :rtype: + ~azure.mgmt.sql.models.ManagedInstancePaged[~azure.mgmt.sql.models.ManagedInstance] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py index df833033a1b9..882500ff53e5 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py @@ -21,6 +21,8 @@ class ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations(object): """ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations 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. @@ -99,7 +101,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedBackupShortTermRetentionPolicy', response) @@ -355,8 +356,7 @@ def list_by_restorable_dropped_database( ~azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicyPaged[~azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_restorable_dropped_database.metadata['url'] @@ -388,6 +388,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -398,12 +403,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_restorable_dropped_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_server_security_alert_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_server_security_alert_policies_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_server_security_alert_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_server_security_alert_policies_operations.py index 16ad81dac173..1f75bd170197 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_server_security_alert_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_server_security_alert_policies_operations.py @@ -21,6 +21,8 @@ class ManagedServerSecurityAlertPoliciesOperations(object): """ManagedServerSecurityAlertPoliciesOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedServerSecurityAlertPolicy', response) @@ -232,8 +233,7 @@ def list_by_instance( ~azure.mgmt.sql.models.ManagedServerSecurityAlertPolicyPaged[~azure.mgmt.sql.models.ManagedServerSecurityAlertPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -264,6 +264,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -274,12 +279,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/securityAlertPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_operations.py similarity index 90% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_operations.py index 5f8f397a39b9..7ccdf683aa8a 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_operations.py @@ -19,6 +19,8 @@ class Operations(object): """Operations 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. @@ -51,8 +53,7 @@ def list( ~azure.mgmt.sql.models.OperationPaged[~azure.mgmt.sql.models.Operation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -77,6 +78,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -87,12 +93,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.Sql/operations'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recommended_elastic_pools_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recommended_elastic_pools_operations.py similarity index 94% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recommended_elastic_pools_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recommended_elastic_pools_operations.py index 960bd52a034b..95c89bf1df1b 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recommended_elastic_pools_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recommended_elastic_pools_operations.py @@ -19,6 +19,8 @@ class RecommendedElasticPoolsOperations(object): """RecommendedElasticPoolsOperations 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. @@ -94,7 +96,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RecommendedElasticPool', response) @@ -125,8 +126,7 @@ def list_by_server( ~azure.mgmt.sql.models.RecommendedElasticPoolPaged[~azure.mgmt.sql.models.RecommendedElasticPool] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -157,6 +157,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -167,12 +172,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RecommendedElasticPoolPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RecommendedElasticPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RecommendedElasticPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools'} @@ -200,8 +203,7 @@ def list_metrics( ~azure.mgmt.sql.models.RecommendedElasticPoolMetricPaged[~azure.mgmt.sql.models.RecommendedElasticPoolMetric] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metrics.metadata['url'] @@ -233,6 +235,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -243,12 +250,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RecommendedElasticPoolMetricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RecommendedElasticPoolMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RecommendedElasticPoolMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}/metrics'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_databases_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_databases_operations.py index 87b5873c5619..178abf85f1b5 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_databases_operations.py @@ -19,6 +19,8 @@ class RecoverableDatabasesOperations(object): """RecoverableDatabasesOperations 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. @@ -94,7 +96,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RecoverableDatabase', response) @@ -125,8 +126,7 @@ def list_by_server( ~azure.mgmt.sql.models.RecoverableDatabasePaged[~azure.mgmt.sql.models.RecoverableDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -157,6 +157,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -167,12 +172,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RecoverableDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RecoverableDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RecoverableDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_managed_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_managed_databases_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_managed_databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_managed_databases_operations.py index d8bf8cbb6665..2595a4069152 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_managed_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_managed_databases_operations.py @@ -19,6 +19,8 @@ class RecoverableManagedDatabasesOperations(object): """RecoverableManagedDatabasesOperations 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. @@ -57,8 +59,7 @@ def list_by_instance( ~azure.mgmt.sql.models.RecoverableManagedDatabasePaged[~azure.mgmt.sql.models.RecoverableManagedDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -89,6 +90,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -99,12 +105,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RecoverableManagedDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RecoverableManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RecoverableManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/recoverableDatabases'} @@ -165,7 +169,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RecoverableManagedDatabase', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/replication_links_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_replication_links_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/replication_links_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_replication_links_operations.py index d3d3cee87622..bebd9d62e04d 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/replication_links_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_replication_links_operations.py @@ -21,6 +21,8 @@ class ReplicationLinksOperations(object): """ReplicationLinksOperations 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. @@ -160,7 +162,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ReplicationLink', response) @@ -375,8 +376,7 @@ def list_by_database( ~azure.mgmt.sql.models.ReplicationLinkPaged[~azure.mgmt.sql.models.ReplicationLink] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -408,6 +408,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -418,12 +423,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ReplicationLinkPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ReplicationLinkPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ReplicationLinkPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_databases_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_databases_operations.py index 0dfb4989691a..aa2480c63f73 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_databases_operations.py @@ -19,6 +19,8 @@ class RestorableDroppedDatabasesOperations(object): """RestorableDroppedDatabasesOperations 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. @@ -94,7 +96,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RestorableDroppedDatabase', response) @@ -125,8 +126,7 @@ def list_by_server( ~azure.mgmt.sql.models.RestorableDroppedDatabasePaged[~azure.mgmt.sql.models.RestorableDroppedDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -157,6 +157,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -167,12 +172,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RestorableDroppedDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RestorableDroppedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RestorableDroppedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_managed_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_managed_databases_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_managed_databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_managed_databases_operations.py index 58e81f79908a..0ef3d7b7c3c8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_managed_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_managed_databases_operations.py @@ -19,6 +19,8 @@ class RestorableDroppedManagedDatabasesOperations(object): """RestorableDroppedManagedDatabasesOperations 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. @@ -57,8 +59,7 @@ def list_by_instance( ~azure.mgmt.sql.models.RestorableDroppedManagedDatabasePaged[~azure.mgmt.sql.models.RestorableDroppedManagedDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -89,6 +90,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -99,12 +105,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RestorableDroppedManagedDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RestorableDroppedManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RestorableDroppedManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases'} @@ -166,7 +170,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RestorableDroppedManagedDatabase', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restore_points_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restore_points_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restore_points_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restore_points_operations.py index e5b49d9d1ed3..0a7f74a92b42 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restore_points_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restore_points_operations.py @@ -21,6 +21,8 @@ class RestorePointsOperations(object): """RestorePointsOperations 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. @@ -61,8 +63,7 @@ def list_by_database( ~azure.mgmt.sql.models.RestorePointPaged[~azure.mgmt.sql.models.RestorePoint] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -94,6 +95,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -104,12 +110,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RestorePointPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RestorePointPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RestorePointPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints'} @@ -283,7 +287,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RestorePoint', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sensitivity_labels_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sensitivity_labels_operations.py similarity index 70% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sensitivity_labels_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sensitivity_labels_operations.py index 5be551f7fd12..2cfb2974a8b8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sensitivity_labels_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sensitivity_labels_operations.py @@ -19,12 +19,13 @@ class SensitivityLabelsOperations(object): """SensitivityLabelsOperations 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: The API version to use for the request. Constant value: "2017-03-01-preview". - :ivar sensitivity_label_source: The source of the sensitivity label. Constant value: "current". """ models = models @@ -35,7 +36,6 @@ def __init__(self, client, config, serializer, deserializer): self._serialize = serializer self._deserialize = deserializer self.api_version = "2017-03-01-preview" - self.sensitivity_label_source = "current" self.config = config @@ -64,8 +64,7 @@ def list_current_by_database( ~azure.mgmt.sql.models.SensitivityLabelPaged[~azure.mgmt.sql.models.SensitivityLabel] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_current_by_database.metadata['url'] @@ -99,6 +98,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -109,18 +113,16 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_current_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/currentSensitivityLabels'} def list_recommended_by_database( - self, resource_group_name, server_name, database_name, skip_token=None, filter=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, server_name, database_name, include_disabled_recommendations=None, skip_token=None, filter=None, custom_headers=None, raw=False, **operation_config): """Gets the sensitivity labels of a given database. :param resource_group_name: The name of the resource group that @@ -131,6 +133,9 @@ def list_recommended_by_database( :type server_name: str :param database_name: The name of the database. :type database_name: str + :param include_disabled_recommendations: Specifies whether to include + disabled recommendations or not. + :type include_disabled_recommendations: bool :param skip_token: :type skip_token: str :param filter: An OData filter expression that filters elements in the @@ -146,8 +151,7 @@ def list_recommended_by_database( ~azure.mgmt.sql.models.SensitivityLabelPaged[~azure.mgmt.sql.models.SensitivityLabel] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_recommended_by_database.metadata['url'] @@ -161,6 +165,8 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} + if include_disabled_recommendations is not None: + query_parameters['includeDisabledRecommendations'] = self._serialize.query("include_disabled_recommendations", include_disabled_recommendations, 'bool') if skip_token is not None: query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') if filter is not None: @@ -183,6 +189,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -193,16 +204,155 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_recommended_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/recommendedSensitivityLabels'} + def enable_recommendation( + self, resource_group_name, server_name, database_name, schema_name, table_name, column_name, custom_headers=None, raw=False, **operation_config): + """Enables sensitivity recommendations on a given column (recommendations + are enabled by default on all columns). + + :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 server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param schema_name: The name of the schema. + :type schema_name: str + :param table_name: The name of the table. + :type table_name: str + :param column_name: The name of the column. + :type column_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` + """ + sensitivity_label_source = "recommended" + + # Construct URL + url = self.enable_recommendation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str'), + 'columnName': self._serialize.url("column_name", column_name, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + enable_recommendation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable'} + + def disable_recommendation( + self, resource_group_name, server_name, database_name, schema_name, table_name, column_name, custom_headers=None, raw=False, **operation_config): + """Disables sensitivity recommendations on a given column. + + :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 server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param schema_name: The name of the schema. + :type schema_name: str + :param table_name: The name of the table. + :type table_name: str + :param column_name: The name of the column. + :type column_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` + """ + sensitivity_label_source = "recommended" + + # Construct URL + url = self.disable_recommendation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str'), + 'columnName': self._serialize.url("column_name", column_name, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_recommendation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable'} + def get( self, resource_group_name, server_name, database_name, schema_name, table_name, column_name, sensitivity_label_source, custom_headers=None, raw=False, **operation_config): """Gets the sensitivity label of a given column. @@ -273,7 +423,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SensitivityLabel', response) @@ -314,6 +463,8 @@ def create_or_update( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + sensitivity_label_source = "current" + # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { @@ -323,7 +474,7 @@ def create_or_update( 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), 'tableName': self._serialize.url("table_name", table_name, 'str'), 'columnName': self._serialize.url("column_name", column_name, 'str'), - 'sensitivityLabelSource': self._serialize.url("self.sensitivity_label_source", self.sensitivity_label_source, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -356,7 +507,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SensitivityLabel', response) if response.status_code == 201: @@ -396,6 +546,8 @@ def delete( :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + sensitivity_label_source = "current" + # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -405,7 +557,7 @@ def delete( 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), 'tableName': self._serialize.url("table_name", table_name, 'str'), 'columnName': self._serialize.url("column_name", column_name, 'str'), - 'sensitivityLabelSource': self._serialize.url("self.sensitivity_label_source", self.sensitivity_label_source, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_automatic_tuning_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_automatic_tuning_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_automatic_tuning_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_automatic_tuning_operations.py index 675d886377c6..243174bc107d 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_automatic_tuning_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_automatic_tuning_operations.py @@ -19,6 +19,8 @@ class ServerAutomaticTuningOperations(object): """ServerAutomaticTuningOperations 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. @@ -90,7 +92,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerAutomaticTuning', response) @@ -167,7 +168,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerAutomaticTuning', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_azure_ad_administrators_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_administrators_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_azure_ad_administrators_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_administrators_operations.py index c7a66d57ea08..7fdf686673b7 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_azure_ad_administrators_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_administrators_operations.py @@ -21,6 +21,8 @@ class ServerAzureADAdministratorsOperations(object): """ServerAzureADAdministratorsOperations 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. @@ -306,7 +308,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerAzureADAdministrator', response) @@ -337,8 +338,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerAzureADAdministratorPaged[~azure.mgmt.sql.models.ServerAzureADAdministrator] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -369,6 +369,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -379,12 +384,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerAzureADAdministratorPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerAzureADAdministratorPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerAzureADAdministratorPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_blob_auditing_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_blob_auditing_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_blob_auditing_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_blob_auditing_policies_operations.py index ac7c8ef280ac..88cb823e64e9 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_blob_auditing_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_blob_auditing_policies_operations.py @@ -21,6 +21,8 @@ class ServerBlobAuditingPoliciesOperations(object): """ServerBlobAuditingPoliciesOperations 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. @@ -95,7 +97,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerBlobAuditingPolicy', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_communication_links_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_communication_links_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_communication_links_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_communication_links_operations.py index 2844c4068ea4..3a8782c7510f 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_communication_links_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_communication_links_operations.py @@ -21,6 +21,8 @@ class ServerCommunicationLinksOperations(object): """ServerCommunicationLinksOperations 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. @@ -155,7 +157,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerCommunicationLink', response) @@ -295,8 +296,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerCommunicationLinkPaged[~azure.mgmt.sql.models.ServerCommunicationLink] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -327,6 +327,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -337,12 +342,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerCommunicationLinkPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerCommunicationLinkPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerCommunicationLinkPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_connection_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_connection_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_connection_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_connection_policies_operations.py index c1d5c68e7f7f..4813f39f62ac 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_connection_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_connection_policies_operations.py @@ -19,6 +19,8 @@ class ServerConnectionPoliciesOperations(object): """ServerConnectionPoliciesOperations 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. @@ -103,7 +105,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerConnectionPolicy', response) if response.status_code == 201: @@ -170,7 +171,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerConnectionPolicy', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_dns_aliases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_dns_aliases_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_dns_aliases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_dns_aliases_operations.py index a4f79dfce854..d8ec5ec33941 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_dns_aliases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_dns_aliases_operations.py @@ -21,6 +21,8 @@ class ServerDnsAliasesOperations(object): """ServerDnsAliasesOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerDnsAlias', response) @@ -316,8 +317,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerDnsAliasPaged[~azure.mgmt.sql.models.ServerDnsAlias] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -348,6 +348,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -358,12 +363,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerDnsAliasPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerDnsAliasPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerDnsAliasPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_keys_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_keys_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_keys_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_keys_operations.py index e52b751d7eb8..ffbd75711807 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_keys_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_keys_operations.py @@ -21,6 +21,8 @@ class ServerKeysOperations(object): """ServerKeysOperations 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. @@ -59,8 +61,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerKeyPaged[~azure.mgmt.sql.models.ServerKey] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -91,6 +92,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -101,12 +107,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerKeyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys'} @@ -167,7 +171,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerKey', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_security_alert_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_security_alert_policies_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_security_alert_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_security_alert_policies_operations.py index 95e884990da2..b5b8e4d82427 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_security_alert_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_security_alert_policies_operations.py @@ -21,6 +21,8 @@ class ServerSecurityAlertPoliciesOperations(object): """ServerSecurityAlertPoliciesOperations 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. @@ -95,7 +97,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerSecurityAlertPolicy', response) @@ -230,8 +231,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerSecurityAlertPolicyPaged[~azure.mgmt.sql.models.ServerSecurityAlertPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -262,6 +262,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -272,12 +277,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_usages_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_usages_operations.py similarity index 92% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_usages_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_usages_operations.py index 4d60726ff42f..5ac207d27f69 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_usages_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_usages_operations.py @@ -19,6 +19,8 @@ class ServerUsagesOperations(object): """ServerUsagesOperations 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. @@ -57,8 +59,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerUsagePaged[~azure.mgmt.sql.models.ServerUsage] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -89,6 +90,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -99,12 +105,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerUsagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/usages'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_vulnerability_assessments_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_vulnerability_assessments_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_vulnerability_assessments_operations.py index ffe8dd567342..4caee1f1fb49 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_vulnerability_assessments_operations.py @@ -19,6 +19,8 @@ class ServerVulnerabilityAssessmentsOperations(object): """ServerVulnerabilityAssessmentsOperations 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. @@ -95,7 +97,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerVulnerabilityAssessment', response) @@ -168,7 +169,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerVulnerabilityAssessment', response) if response.status_code == 201: @@ -258,8 +258,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerVulnerabilityAssessmentPaged[~azure.mgmt.sql.models.ServerVulnerabilityAssessment] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -290,6 +289,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -300,12 +304,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/servers_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_servers_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/servers_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_servers_operations.py index 7abad6723542..16fd05d12be8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/servers_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_servers_operations.py @@ -21,6 +21,8 @@ class ServersOperations(object): """ServersOperations 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. @@ -93,7 +95,6 @@ def check_name_availability( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CheckNameAvailabilityResponse', response) @@ -120,8 +121,7 @@ def list( """ api_version = "2015-05-01-preview" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -150,6 +150,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -160,12 +165,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers'} @@ -190,8 +193,7 @@ def list_by_resource_group( """ api_version = "2015-05-01-preview" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -221,6 +223,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -231,12 +238,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers'} @@ -296,7 +301,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Server', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_objectives_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_objectives_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_objectives_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_objectives_operations.py index d4f53c7313af..f1ae98c7828e 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_objectives_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_objectives_operations.py @@ -19,6 +19,8 @@ class ServiceObjectivesOperations(object): """ServiceObjectivesOperations 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. @@ -94,7 +96,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceObjective', response) @@ -125,8 +126,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServiceObjectivePaged[~azure.mgmt.sql.models.ServiceObjective] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -157,6 +157,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -167,12 +172,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServiceObjectivePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServiceObjectivePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServiceObjectivePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/serviceObjectives'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_tier_advisors_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_tier_advisors_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_tier_advisors_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_tier_advisors_operations.py index cc9ba091db21..ff0328f21bd7 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_tier_advisors_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_tier_advisors_operations.py @@ -19,6 +19,8 @@ class ServiceTierAdvisorsOperations(object): """ServiceTierAdvisorsOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceTierAdvisor', response) @@ -129,8 +130,7 @@ def list_by_database( ~azure.mgmt.sql.models.ServiceTierAdvisorPaged[~azure.mgmt.sql.models.ServiceTierAdvisor] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -162,6 +162,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -172,12 +177,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServiceTierAdvisorPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServiceTierAdvisorPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServiceTierAdvisorPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/serviceTierAdvisors'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/subscription_usages_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_subscription_usages_operations.py similarity index 94% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/subscription_usages_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_subscription_usages_operations.py index b70973ca790e..355be5f6fd68 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/subscription_usages_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_subscription_usages_operations.py @@ -19,6 +19,8 @@ class SubscriptionUsagesOperations(object): """SubscriptionUsagesOperations 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. @@ -54,8 +56,7 @@ def list_by_location( ~azure.mgmt.sql.models.SubscriptionUsagePaged[~azure.mgmt.sql.models.SubscriptionUsage] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_location.metadata['url'] @@ -85,6 +86,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -95,12 +101,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SubscriptionUsagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SubscriptionUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SubscriptionUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages'} @@ -157,7 +161,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SubscriptionUsage', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_agents_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_agents_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_agents_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_agents_operations.py index 9ac0651a57d3..ec00730c027a 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_agents_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_agents_operations.py @@ -21,6 +21,8 @@ class SyncAgentsOperations(object): """SyncAgentsOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SyncAgent', response) @@ -326,8 +327,7 @@ def list_by_server( ~azure.mgmt.sql.models.SyncAgentPaged[~azure.mgmt.sql.models.SyncAgent] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -358,6 +358,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -368,12 +373,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncAgentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncAgentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncAgentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents'} @@ -435,7 +438,6 @@ def generate_key( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SyncAgentKeyProperties', response) @@ -469,8 +471,7 @@ def list_linked_databases( ~azure.mgmt.sql.models.SyncAgentLinkedDatabasePaged[~azure.mgmt.sql.models.SyncAgentLinkedDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_linked_databases.metadata['url'] @@ -502,6 +503,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -512,12 +518,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncAgentLinkedDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncAgentLinkedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncAgentLinkedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_linked_databases.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}/linkedDatabases'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_groups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_groups_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_groups_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_groups_operations.py index 484f24f33781..bf78088e717b 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_groups_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_groups_operations.py @@ -21,6 +21,8 @@ class SyncGroupsOperations(object): """SyncGroupsOperations 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. @@ -56,8 +58,7 @@ def list_sync_database_ids( ~azure.mgmt.sql.models.SyncDatabaseIdPropertiesPaged[~azure.mgmt.sql.models.SyncDatabaseIdProperties] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_sync_database_ids.metadata['url'] @@ -87,6 +88,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -97,12 +103,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncDatabaseIdPropertiesPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncDatabaseIdPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncDatabaseIdPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_sync_database_ids.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds'} @@ -222,8 +226,7 @@ def list_hub_schemas( ~azure.mgmt.sql.models.SyncFullSchemaPropertiesPaged[~azure.mgmt.sql.models.SyncFullSchemaProperties] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_hub_schemas.metadata['url'] @@ -256,6 +259,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -266,12 +274,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_hub_schemas.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/hubSchemas'} @@ -310,8 +316,7 @@ def list_logs( ~azure.mgmt.sql.models.SyncGroupLogPropertiesPaged[~azure.mgmt.sql.models.SyncGroupLogProperties] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_logs.metadata['url'] @@ -349,6 +354,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -359,12 +369,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncGroupLogPropertiesPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncGroupLogPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncGroupLogPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/logs'} @@ -553,7 +561,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SyncGroup', response) @@ -901,8 +908,7 @@ def list_by_database( ~azure.mgmt.sql.models.SyncGroupPaged[~azure.mgmt.sql.models.SyncGroup] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -934,6 +940,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -944,12 +955,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncGroupPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_members_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_members_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_members_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_members_operations.py index 4eab11133d05..23343d374072 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_members_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_members_operations.py @@ -21,6 +21,8 @@ class SyncMembersOperations(object): """SyncMembersOperations 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. @@ -103,7 +105,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SyncMember', response) @@ -468,8 +469,7 @@ def list_by_sync_group( ~azure.mgmt.sql.models.SyncMemberPaged[~azure.mgmt.sql.models.SyncMember] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_sync_group.metadata['url'] @@ -502,6 +502,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -512,12 +517,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncMemberPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncMemberPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncMemberPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_sync_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers'} @@ -550,8 +553,7 @@ def list_member_schemas( ~azure.mgmt.sql.models.SyncFullSchemaPropertiesPaged[~azure.mgmt.sql.models.SyncFullSchemaProperties] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_member_schemas.metadata['url'] @@ -585,6 +587,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -595,12 +602,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_member_schemas.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/schemas'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/tde_certificates_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_tde_certificates_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/tde_certificates_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_tde_certificates_operations.py index bc529a38043f..86037d49ca05 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/tde_certificates_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_tde_certificates_operations.py @@ -21,6 +21,8 @@ class TdeCertificatesOperations(object): """TdeCertificatesOperations 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. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryption_activities_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryption_activities_operations.py similarity index 93% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryption_activities_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryption_activities_operations.py index ae930a401246..6807645bd6c0 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryption_activities_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryption_activities_operations.py @@ -19,6 +19,8 @@ class TransparentDataEncryptionActivitiesOperations(object): """TransparentDataEncryptionActivitiesOperations 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. @@ -63,8 +65,7 @@ def list_by_configuration( ~azure.mgmt.sql.models.TransparentDataEncryptionActivityPaged[~azure.mgmt.sql.models.TransparentDataEncryptionActivity] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_configuration.metadata['url'] @@ -97,6 +98,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -107,12 +113,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.TransparentDataEncryptionActivityPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.TransparentDataEncryptionActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.TransparentDataEncryptionActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{transparentDataEncryptionName}/operationResults'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryptions_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryptions_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryptions_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryptions_operations.py index a0f3c8184f57..b497a7ee5656 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryptions_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryptions_operations.py @@ -19,6 +19,8 @@ class TransparentDataEncryptionsOperations(object): """TransparentDataEncryptionsOperations 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. @@ -108,7 +110,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('TransparentDataEncryption', response) if response.status_code == 201: @@ -179,7 +180,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('TransparentDataEncryption', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_usages_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_usages_operations.py new file mode 100644 index 000000000000..59164a38e347 --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_usages_operations.py @@ -0,0 +1,120 @@ +# 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 .. import models + + +class UsagesOperations(object): + """UsagesOperations 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: The API version to use for the request. Constant value: "2018-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01-preview" + + self.config = config + + def list_by_instance_pool( + self, resource_group_name, instance_pool_name, expand_children=None, custom_headers=None, raw=False, **operation_config): + """Gets all instance pool usage metrics. + + :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 instance_pool_name: The name of the instance pool to be + retrieved. + :type instance_pool_name: str + :param expand_children: Optional request parameter to include managed + instance usages within the instance pool. + :type expand_children: bool + :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: An iterator like instance of Usage + :rtype: + ~azure.mgmt.sql.models.UsagePaged[~azure.mgmt.sql.models.Usage] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_instance_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand_children is not None: + query_parameters['expandChildren'] = self._serialize.query("expand_children", expand_children, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_instance_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/usages'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_clusters_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_clusters_operations.py similarity index 96% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_clusters_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_clusters_operations.py index 90a685e001a5..b91ece534ef3 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_clusters_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_clusters_operations.py @@ -21,6 +21,8 @@ class VirtualClustersOperations(object): """VirtualClustersOperations 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. @@ -53,8 +55,7 @@ def list( ~azure.mgmt.sql.models.VirtualClusterPaged[~azure.mgmt.sql.models.VirtualCluster] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -83,6 +84,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -93,12 +99,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/virtualClusters'} @@ -121,8 +125,7 @@ def list_by_resource_group( ~azure.mgmt.sql.models.VirtualClusterPaged[~azure.mgmt.sql.models.VirtualCluster] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -152,6 +155,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -162,12 +170,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters'} @@ -225,7 +231,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VirtualCluster', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_network_rules_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_network_rules_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_network_rules_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_network_rules_operations.py index 01bc6f5bdf3e..3485f42e9f85 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_network_rules_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_network_rules_operations.py @@ -21,6 +21,8 @@ class VirtualNetworkRulesOperations(object): """VirtualNetworkRulesOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VirtualNetworkRule', response) @@ -329,8 +330,7 @@ def list_by_server( ~azure.mgmt.sql.models.VirtualNetworkRulePaged[~azure.mgmt.sql.models.VirtualNetworkRule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -361,6 +361,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -371,12 +376,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/long_term_retention_backups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/long_term_retention_backups_operations.py deleted file mode 100644 index c803786f5ff3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/long_term_retention_backups_operations.py +++ /dev/null @@ -1,441 +0,0 @@ -# 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 LongTermRetentionBackupsOperations(object): - """LongTermRetentionBackupsOperations operations. - - :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: The API version to use for the request. Constant value: "2017-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-01-preview" - - self.config = config - - def get( - self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): - """Gets a long term retention backup. - - :param location_name: The location of the database. - :type location_name: str - :param long_term_retention_server_name: The name of the server - :type long_term_retention_server_name: str - :param long_term_retention_database_name: The name of the database - :type long_term_retention_database_name: str - :param backup_name: The backup name. - :type backup_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: LongTermRetentionBackup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.LongTermRetentionBackup or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), - 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), - 'backupName': self._serialize.url("backup_name", backup_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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('LongTermRetentionBackup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} - - - def _delete_initial( - self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), - 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), - 'backupName': self._serialize.url("backup_name", backup_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - 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.delete(url, query_parameters, header_parameters) - 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a long term retention backup. - - :param location_name: The location of the database - :type location_name: str - :param long_term_retention_server_name: The name of the server - :type long_term_retention_server_name: str - :param long_term_retention_database_name: The name of the database - :type long_term_retention_database_name: str - :param backup_name: The backup name. - :type backup_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( - location_name=location_name, - long_term_retention_server_name=long_term_retention_server_name, - long_term_retention_database_name=long_term_retention_database_name, - backup_name=backup_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}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} - - def list_by_database( - self, location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): - """Lists all long term retention backups for a database. - - :param location_name: The location of the database - :type location_name: str - :param long_term_retention_server_name: The name of the server - :type long_term_retention_server_name: str - :param long_term_retention_database_name: The name of the database - :type long_term_retention_database_name: str - :param only_latest_per_database: Whether or not to only get the latest - backup for each database. - :type only_latest_per_database: bool - :param database_state: Whether to query against just live databases, - just deleted databases, or all databases. Possible values include: - 'All', 'Live', 'Deleted' - :type database_state: str or - ~azure.mgmt.sql.models.LongTermRetentionDatabaseState - :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: An iterator like instance of LongTermRetentionBackup - :rtype: - ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_database.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), - 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if only_latest_per_database is not None: - query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') - if database_state is not None: - query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # 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 - - return response - - # Deserialize response - deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups'} - - def list_by_location( - self, location_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): - """Lists the long term retention backups for a given location. - - :param location_name: The location of the database - :type location_name: str - :param only_latest_per_database: Whether or not to only get the latest - backup for each database. - :type only_latest_per_database: bool - :param database_state: Whether to query against just live databases, - just deleted databases, or all databases. Possible values include: - 'All', 'Live', 'Deleted' - :type database_state: str or - ~azure.mgmt.sql.models.LongTermRetentionDatabaseState - :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: An iterator like instance of LongTermRetentionBackup - :rtype: - ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_location.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if only_latest_per_database is not None: - query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') - if database_state is not None: - query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # 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 - - return response - - # Deserialize response - deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups'} - - def list_by_server( - self, location_name, long_term_retention_server_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): - """Lists the long term retention backups for a given server. - - :param location_name: The location of the database - :type location_name: str - :param long_term_retention_server_name: The name of the server - :type long_term_retention_server_name: str - :param only_latest_per_database: Whether or not to only get the latest - backup for each database. - :type only_latest_per_database: bool - :param database_state: Whether to query against just live databases, - just deleted databases, or all databases. Possible values include: - 'All', 'Live', 'Deleted' - :type database_state: str or - ~azure.mgmt.sql.models.LongTermRetentionDatabaseState - :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: An iterator like instance of LongTermRetentionBackup - :rtype: - ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if only_latest_per_database is not None: - query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') - if database_state is not None: - query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # 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 - - return response - - # Deserialize response - deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups'} From 19f19cbd65b897711da6737cc9b559b5af5679cc Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Wed, 24 Jul 2019 17:41:59 -0700 Subject: [PATCH 004/244] Trace identity (#6455) * make sure its int. Need it to pass the test * added policy and decorator * dont decorate authn * loggin policy behind retry policy * managed should not be decoratored * dont need my workaround * dont trace get_token * dont need this extra indent --- .../azure-identity/azure/identity/_authn_client.py | 3 ++- .../azure-identity/azure/identity/aio/_authn_client.py | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/sdk/identity/azure-identity/azure/identity/_authn_client.py b/sdk/identity/azure-identity/azure/identity/_authn_client.py index 14d86ff8c9f7..09fc166d917e 100644 --- a/sdk/identity/azure-identity/azure/identity/_authn_client.py +++ b/sdk/identity/azure-identity/azure/identity/_authn_client.py @@ -10,6 +10,7 @@ from azure.core.exceptions import ClientAuthenticationError from azure.core.pipeline import Pipeline from azure.core.pipeline.policies import ContentDecodePolicy, NetworkTraceLoggingPolicy, RetryPolicy +from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy from azure.core.pipeline.transport import HttpTransport, RequestsTransport from msal import TokenCache @@ -119,7 +120,7 @@ class AuthnClient(AuthnClientBase): def __init__(self, auth_url, config=None, policies=None, transport=None, **kwargs): # type: (str, Optional[Configuration], Optional[Iterable[HTTPPolicy]], Optional[HttpTransport], Mapping[str, Any]) -> None config = config or self.create_config(**kwargs) - policies = policies or [ContentDecodePolicy(), config.logging_policy, config.retry_policy] + policies = policies or [ContentDecodePolicy(), config.retry_policy, config.logging_policy, DistributedTracingPolicy()] if not transport: transport = RequestsTransport(**kwargs) self._pipeline = Pipeline(transport=transport, policies=policies) diff --git a/sdk/identity/azure-identity/azure/identity/aio/_authn_client.py b/sdk/identity/azure-identity/azure/identity/aio/_authn_client.py index 6b57a9d02d2d..4d75cd07b1a3 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/_authn_client.py +++ b/sdk/identity/azure-identity/azure/identity/aio/_authn_client.py @@ -8,6 +8,7 @@ from azure.core import Configuration from azure.core.credentials import AccessToken from azure.core.pipeline import AsyncPipeline +from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy from azure.core.pipeline.policies import AsyncRetryPolicy, ContentDecodePolicy, HTTPPolicy, NetworkTraceLoggingPolicy from azure.core.pipeline.transport import AsyncHttpTransport from azure.core.pipeline.transport.requests_asyncio import AsyncioRequestsTransport @@ -27,7 +28,12 @@ def __init__( **kwargs: Mapping[str, Any] ) -> None: config = config or self.create_config(**kwargs) - policies = policies or [ContentDecodePolicy(), config.logging_policy, config.retry_policy] + policies = policies or [ + ContentDecodePolicy(), + config.retry_policy, + config.logging_policy, + DistributedTracingPolicy(), + ] if not transport: transport = AsyncioRequestsTransport(**kwargs) self._pipeline = AsyncPipeline(transport=transport, policies=policies) From 9bcde475aeb7b0dbfbe43417242fd1b38f649eae Mon Sep 17 00:00:00 2001 From: Kate Olszewska Date: Thu, 25 Jul 2019 09:52:14 -0700 Subject: [PATCH 005/244] Update root README.md Updating the Contributing section according to the guidelines --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index de33c04f8fa3..e11a735c6574 100644 --- a/README.md +++ b/README.md @@ -53,9 +53,14 @@ Libraries which enable you to provision specific resources. They are responsible ## Contributing For details on contributing to this repository, see the [contributing guide](CONTRIBUTING.md). -## Code of Conduct +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit +https://cla.microsoft.com. -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2FREADME.png) From 1d9c134d829d137766e2adb3b5dafdc3978ed393 Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 10:16:27 -0700 Subject: [PATCH 006/244] Update CODEOWNERS --- .github/CODEOWNERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e7da96b211dc..518b5aa20c8c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -37,6 +37,9 @@ /sql/sql/ @jaredmoo /sdk/servicebus/azure-servicebus/ @annatisch +# Management Plane +/**/*mgmt*/ @zikalino + ########### # Eng Sys ########### From b4d521b2846e4d19708cb31fe734e58852de07bf Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 11:03:35 -0700 Subject: [PATCH 007/244] more code owners --- .github/CODEOWNERS | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 518b5aa20c8c..07d57ac48320 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -6,20 +6,20 @@ ########### # Catch all -# /sdk/ @mayurid +/sdk/ @mayurid # Core -/sdk/core/ @lmazuel +/sdk/core/ @lmazuel @xiangyan99 @johanste /sdk/core/azure-core/ @xiangyan99 @bryevdv # Service team -# /sdk/identity/ -# /sdk/eventhub/ +/sdk/identity/ @chlowell @schaabs +/sdk/eventhub/ @annatisch @yunhaoling @YijunXieMS /sdk/storage/ @zezha-msft @annatisch @rakshith91 /sdk/applicationinsights/ @alexeldeib /sdk/batch/ @bgklein @matthchr @xingwu1 /sdk/cognitiveservices/azure-cognitiveservices-vision-customvision/ @areddish -/sdk/keyvault/ @schaabs @chlowell +/sdk/keyvault/ @schaabs @chlowell @iscai-msft /sdk/loganalytics/ @alexeldeib /sdk/consumption/ @sandeepnl /sdk/containerinstance/ @samkreter @xizhamsft @@ -35,7 +35,7 @@ /sdk/recoveryservices/ @DheerendraRathor /sdk/servicefabric/ @QingChenmsft @samedder /sql/sql/ @jaredmoo -/sdk/servicebus/azure-servicebus/ @annatisch +/sdk/servicebus/azure-servicebus/ @annatisch @yunhaoling @YijunXieMS # Management Plane /**/*mgmt*/ @zikalino From 913c1e9602acbf06139069449344e53989eb7368 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 11:58:35 -0700 Subject: [PATCH 008/244] add policy and decorators for secrets (#6453) --- .../azure/keyvault/secrets/_client.py | 13 +++++++++++++ .../keyvault/secrets/_shared/async_client_base.py | 2 ++ .../azure/keyvault/secrets/_shared/client_base.py | 2 ++ .../azure/keyvault/secrets/aio/_client.py | 14 ++++++++++++++ 4 files changed, 31 insertions(+) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py index f15b6779b9d3..1f0a670bf217 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py @@ -13,6 +13,7 @@ from typing import Any, Dict, Generator, Mapping, Optional from azure.core.exceptions import ResourceExistsError, ResourceNotFoundError +from azure.core.tracing.decorator import distributed_trace from ._shared import KeyVaultClientBase from ._models import Secret, DeletedSecret, SecretAttributes @@ -32,6 +33,7 @@ class SecretClient(KeyVaultClientBase): # pylint:disable=protected-access + @distributed_trace def get_secret(self, name, version=None, **kwargs): # type: (str, str, Mapping[str, Any]) -> Secret """Get a specified secret from the vault. @@ -59,6 +61,7 @@ def get_secret(self, name, version=None, **kwargs): ) return Secret._from_secret_bundle(bundle) + @distributed_trace def set_secret( self, name, value, content_type=None, enabled=None, not_before=None, expires=None, tags=None, **kwargs ): @@ -101,6 +104,7 @@ def set_secret( ) return Secret._from_secret_bundle(bundle) + @distributed_trace def update_secret( self, name, version=None, content_type=None, enabled=None, not_before=None, expires=None, tags=None, **kwargs ): @@ -151,6 +155,7 @@ def update_secret( ) return SecretAttributes._from_secret_bundle(bundle) # pylint: disable=protected-access + @distributed_trace def list_secrets(self, **kwargs): # type: (Mapping[str, Any]) -> Generator[SecretAttributes] """List secrets in the vault. @@ -177,6 +182,7 @@ def list_secrets(self, **kwargs): pages = self._client.get_secrets(self._vault_url, maxresults=max_page_size, **kwargs) return (SecretAttributes._from_secret_item(item) for item in pages) + @distributed_trace def list_secret_versions(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> Generator[SecretAttributes] """List all versions of the specified secret. @@ -203,6 +209,7 @@ def list_secret_versions(self, name, **kwargs): pages = self._client.get_secret_versions(self._vault_url, name, maxresults=max_page_size, **kwargs) return (SecretAttributes._from_secret_item(item) for item in pages) + @distributed_trace def backup_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> bytes """Backs up the specified secret. @@ -230,6 +237,7 @@ def backup_secret(self, name, **kwargs): ) return backup_result.value + @distributed_trace def restore_secret(self, backup, **kwargs): # type: (bytes, Mapping[str, Any]) -> SecretAttributes """Restore a backed up secret to the vault. @@ -254,6 +262,7 @@ def restore_secret(self, backup, **kwargs): bundle = self._client.restore_secret(self.vault_url, backup, error_map={409: ResourceExistsError}, **kwargs) return SecretAttributes._from_secret_bundle(bundle) + @distributed_trace def delete_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> DeletedSecret """Deletes a secret from the vault. @@ -279,6 +288,7 @@ def delete_secret(self, name, **kwargs): bundle = self._client.delete_secret(self.vault_url, name, error_map={404: ResourceNotFoundError}, **kwargs) return DeletedSecret._from_deleted_secret_bundle(bundle) + @distributed_trace def get_deleted_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> DeletedSecret """Gets the specified deleted secret. @@ -303,6 +313,7 @@ def get_deleted_secret(self, name, **kwargs): bundle = self._client.get_deleted_secret(self.vault_url, name, error_map={404: ResourceNotFoundError}, **kwargs) return DeletedSecret._from_deleted_secret_bundle(bundle) + @distributed_trace def list_deleted_secrets(self, **kwargs): # type: (Mapping[str, Any]) -> Generator[DeletedSecret] """Lists deleted secrets of the vault. @@ -328,6 +339,7 @@ def list_deleted_secrets(self, **kwargs): pages = self._client.get_deleted_secrets(self._vault_url, maxresults=max_page_size, **kwargs) return (DeletedSecret._from_deleted_secret_item(item) for item in pages) + @distributed_trace def purge_deleted_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> None """Permanently deletes the specified secret. @@ -350,6 +362,7 @@ def purge_deleted_secret(self, name, **kwargs): """ self._client.purge_deleted_secret(self.vault_url, name, **kwargs) + @distributed_trace def recover_deleted_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> SecretAttributes """Recovers the deleted secret to the latest version. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index a24761a6afe6..c40e314accc7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,6 +6,7 @@ from azure.core.async_paging import AsyncPagedMixin from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline +from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport from msrest.serialization import Model @@ -100,6 +101,7 @@ def _build_pipeline(config: Configuration, transport: HttpTransport, **kwargs: A config.retry_policy, config.authentication_policy, config.logging_policy, + DistributedTracingPolicy(), ] if transport is None: diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/client_base.py index 6a3253c77655..dbde6d74f640 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/client_base.py @@ -15,6 +15,7 @@ from azure.core.pipeline.transport import HttpTransport from .challenge_auth_policy import ChallengeAuthPolicy +from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy KEY_VAULT_SCOPE = "https://vault.azure.net/.default" @@ -73,6 +74,7 @@ def _build_pipeline(self, config, transport, **kwargs): config.retry_policy, config.authentication_policy, config.logging_policy, + DistributedTracingPolicy(), ] if transport is None: diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py index d7cf860c4309..89a0fa98836e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py @@ -6,6 +6,8 @@ from typing import Any, AsyncIterable, Mapping, Optional, Dict from azure.core.exceptions import ResourceExistsError, ResourceNotFoundError +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.keyvault.secrets._models import Secret, DeletedSecret, SecretAttributes from .._shared import AsyncKeyVaultClientBase, AsyncPagingAdapter @@ -25,6 +27,7 @@ class SecretClient(AsyncKeyVaultClientBase): # pylint:disable=protected-access + @distributed_trace_async async def get_secret(self, name: str, version: Optional[str] = None, **kwargs: Mapping[str, Any]) -> Secret: """Get a specified secret from the vault. @@ -51,6 +54,7 @@ async def get_secret(self, name: str, version: Optional[str] = None, **kwargs: M ) return Secret._from_secret_bundle(bundle) + @distributed_trace_async async def set_secret( self, name: str, @@ -99,6 +103,7 @@ async def set_secret( ) return Secret._from_secret_bundle(bundle) + @distributed_trace_async async def update_secret( self, name: str, @@ -155,6 +160,7 @@ async def update_secret( ) return SecretAttributes._from_secret_bundle(bundle) # pylint: disable=protected-access + @distributed_trace def list_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[SecretAttributes]: """List secrets in the vault. @@ -180,6 +186,7 @@ def list_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[SecretAttri iterable = AsyncPagingAdapter(pages, SecretAttributes._from_secret_item) return iterable + @distributed_trace def list_secret_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncIterable[SecretAttributes]: """List all versions of the specified secret. @@ -205,6 +212,7 @@ def list_secret_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncI iterable = AsyncPagingAdapter(pages, SecretAttributes._from_secret_item) return iterable + @distributed_trace_async async def backup_secret(self, name: str, **kwargs: Mapping[str, Any]) -> bytes: """Backs up the specified secret. @@ -230,6 +238,7 @@ async def backup_secret(self, name: str, **kwargs: Mapping[str, Any]) -> bytes: ) return backup_result.value + @distributed_trace_async async def restore_secret(self, backup: bytes, **kwargs: Mapping[str, Any]) -> SecretAttributes: """Restores a backed up secret to a vault. @@ -254,6 +263,7 @@ async def restore_secret(self, backup: bytes, **kwargs: Mapping[str, Any]) -> Se ) return SecretAttributes._from_secret_bundle(bundle) + @distributed_trace_async async def delete_secret(self, name: str, **kwargs: Mapping[str, Any]) -> DeletedSecret: """Deletes a secret from the vault. @@ -279,6 +289,7 @@ async def delete_secret(self, name: str, **kwargs: Mapping[str, Any]) -> Deleted ) return DeletedSecret._from_deleted_secret_bundle(bundle) + @distributed_trace_async async def get_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> DeletedSecret: """Gets the specified deleted secret. @@ -303,6 +314,7 @@ async def get_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> De ) return DeletedSecret._from_deleted_secret_bundle(bundle) + @distributed_trace def list_deleted_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[DeletedSecret]: """Lists deleted secrets of the vault. @@ -327,6 +339,7 @@ def list_deleted_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[Del iterable = AsyncPagingAdapter(pages, DeletedSecret._from_deleted_secret_item) return iterable + @distributed_trace_async async def purge_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> None: """Permanently deletes the specified secret. @@ -347,6 +360,7 @@ async def purge_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> """ await self._client.purge_deleted_secret(self.vault_url, name, **kwargs) + @distributed_trace_async async def recover_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> SecretAttributes: """Recovers the deleted secret to the latest version. From 5c0b47f1778865b9072db278cf5ac6ef5ee75222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20C=C3=A1rdenas?= Date: Thu, 25 Jul 2019 12:01:53 -0700 Subject: [PATCH 009/244] Smoke test for Python (#6412) * Smoke Test Sample for Track 2 libraries Smoke Test for Indentity, Key Vault Secrets, Storage Blobs, Event Hubs and Cosmos DB * simpleQuery method added * Method's names updated * Create README.md * Update README.md * Commented lines deleted * README.md moved to correct folder * Create requirements.txt * Update README.md * Update README.md * Imports changed * Use of literals instead of append * Database Name variable to class level. * Use of Pythonic with statements * Update requirements.txt * Revert "Update requirements.txt" This reverts commit 4b79c6a84780f169e15c17d96e5728f32ed419f3. * Revert "Use of Pythonic with statements" This reverts commit 81adc4ca46f67d3a068aeee5e41c4514d63d8758. * Revert "Revert "Use of Pythonic with statements"" This reverts commit 27b2a2d635ff47880dee2c741bcb5c81c187df7d. * requiriments.txt encoded as a txt file * requirements.txt as text file * Misspelling in "Key concepts" * Update .docsettings.yml to match the tittle of Smoke Test * Went trought Suyog comments * Revert "Went trought Suyog comments" This reverts commit 35c62232f8e0562087b7f5eb3d4bdf57ea6e502f. * Gone trought Suyog comments * use of snake case in file names --- .docsettings.yml | 2 +- samples/smoketest/Program.py | 13 +++ samples/smoketest/README.md | 116 +++++++++++++++++++++++++ samples/smoketest/cosmos_db.py | 84 ++++++++++++++++++ samples/smoketest/event_hubs.py | 66 ++++++++++++++ samples/smoketest/key_vault_secrets.py | 46 ++++++++++ samples/smoketest/requirements.txt | 8 ++ samples/smoketest/storage_blob.py | 51 +++++++++++ 8 files changed, 385 insertions(+), 1 deletion(-) create mode 100644 samples/smoketest/Program.py create mode 100644 samples/smoketest/README.md create mode 100644 samples/smoketest/cosmos_db.py create mode 100644 samples/smoketest/event_hubs.py create mode 100644 samples/smoketest/key_vault_secrets.py create mode 100644 samples/smoketest/requirements.txt create mode 100644 samples/smoketest/storage_blob.py diff --git a/.docsettings.yml b/.docsettings.yml index 317e26b199cd..a8b9d07e4c40 100644 --- a/.docsettings.yml +++ b/.docsettings.yml @@ -9,7 +9,7 @@ omitted_paths: language: python root_check_enabled: True required_readme_sections: - - "Azure .+ client library for Python" + - ^Azure (.+ client library for Python|Smoke Test for Python) - ^Getting started$ - ^Key concepts$ - ^Examples$ diff --git a/samples/smoketest/Program.py b/samples/smoketest/Program.py new file mode 100644 index 000000000000..dd43a67f9287 --- /dev/null +++ b/samples/smoketest/Program.py @@ -0,0 +1,13 @@ +from key_vault_secrets import KeyVault +from storage_blob import StorageBlob +from event_hubs import EventHub +from cosmos_db import CosmosDB + +print("==========================================") +print(" AZURE TRACK 2 SDKs SMOKE TEST") +print("==========================================") + +KeyVault().Run() +StorageBlob().Run() +EventHub().Run() +CosmosDB().Run() diff --git a/samples/smoketest/README.md b/samples/smoketest/README.md new file mode 100644 index 000000000000..6e0a21c70235 --- /dev/null +++ b/samples/smoketest/README.md @@ -0,0 +1,116 @@ +# Azure Smoke Test for Python +This sample code is a smoke test to ensure that Azure Preview for Python work while loaded into the same process by performing 2 or more actions with them. + +Libraries tested: +* keyvault-secrets +* identity +* storage-blob +* event-hubs +* cosmos + +## Getting started +### Setup Azure resources +For this sample, it is necessary to create/have the following resources in the [Azure Portal](https://portal.azure.com/): +* **App registration**: Register a new app or use an existing one. + * Under _Certificates & secrets_ create a new **client secret** and store the value in a safe place. +* **Key Vaults**: Create a new Key Vault resource or use an existing one. + * Under _Access policies_, add the app registrated in the previous step. +* **Storage acounts**: Create a container in a new or existing storage account. The container in this sample is named "mycontainer", if you want to use other name you can change the value in `BlobStorage.ts` file: +`const containerName = "mycontainer";` +* **Event Hubs**: Create an event hub inside a new or existing Event Hubs Namespace. The container in this sample is named "myeventhub", if you want to use other name you can change the value in `EventHubsTest.ts` file: `let eventHubName = "myeventhub";` +* **Azure Cosmos DB**: Create a new account or use an existing one. + +### Azure credentials +The following environment variables are needed: +* From **App Registration**, in the _Overview_ section: + * AZURE_TENANT_ID: The directory tentant ID. + * AZURE_CLIENT_ID: The application ID. + * AZURE_CLIENT_SECRET: The client secret stored previusly when creating the _client secret_. + +* From **Key Vault**, in the _Overview_ section: + * AZURE_PROJECT_URL: The DNS Name + +* From **Event Hubs**, in _Shared access policies_ section: + * EVENT_HUBS_CONNECTION_STRING: Connection string from a policy + +* From **Storage Account**, in the _Access Keys_ section: + * STORAGE_CONNECTION_STRING : A connection strings. + +* From **Azure Cosmos DB**, in the _Keys_ section, select the _Read-Write Keys_ tab: + * COSMOS_ENDPOINT: URI. + * COSMOS_KEY: Primary or secondary key. + +``` +//Bash code to create the environment variables +export AZURE_CLIENT_ID="" +export AZURE_CLIENT_SECRET="" +export AZURE_TENANT_ID="" +export EVENT_HUBS_CONNECTION_STRING="" +export AZURE_PROJECT_URL="" +export STORAGE_CONNECTION_STRING="" +export COSMOS_ENDPOINT="" +export COSMOS_KEY="" +``` + +### Running the console app +[Python](https://www.python.org/downloads/) version 3.7.4 was used to run this sample. + +In the \SmokeTest\ directory, run Program.py +``` +python .\Program.py +``` + +## Key concepts + + +## Examples +All the classes in this sample has a `Run()` method as entry point, and do not depend on each other. + +It is possible to run them individually: +```python +from KeyVaultSecrets import KeyVault + +KeyVault().Run() +``` + +They can be included in other projects by moving the class in it: +```python +from KeyVaultSecrets import KeyVault + +... + +def myTests(): + console.log("Smoke Test imported from other project") + KeyVault().Run() + +myTests() +otherFunction() +... +``` + +The classes can be used as base code and be changed to satisfied specific needs. For example, the method `EventHub().SendAndReceiveEvents()` can be change to only send events from an array given from a parameter: +```python +def SendAndReceiveEvents(self, partitionID, events): + producer = self.client.create_producer(partition_id=partitionID) + producer.send(events) + producer.close() +``` + +**Note:** The methods in the classes are not necessary independent on each other, and the order matters. For example, in order to run `BlobStorage().DeleteBlob();`, the method `BlobStorage().UploadBLob();` must be run before, since in the other way it will fail because there is not going to be a blob to delete. + +## Troubleshooting + +### Authentication +Be sure to set the environment variables and credentials required before running the sample. + +## Next steps +Check the [Azure SDK for Python Repository](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk) for more samples inside the sdk folder. + +## Contributing +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. + +If you'd like to contribute to this library, please read the contributing guide to learn more about how to build and test the code. + +This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. \ No newline at end of file diff --git a/samples/smoketest/cosmos_db.py b/samples/smoketest/cosmos_db.py new file mode 100644 index 000000000000..b4e2a56aa025 --- /dev/null +++ b/samples/smoketest/cosmos_db.py @@ -0,0 +1,84 @@ +import os +from azure.cosmos import CosmosClient +from azure.cosmos.partition_key import PartitionKey + + +class CosmosDB: + def __init__(self): + URL = os.environ["COSMOS_ENDPOINT"] + KEY = os.environ["COSMOS_KEY"] + self.client = CosmosClient(URL, {"masterKey": KEY}) + self.dbName = "pySolarSystem" + + def CreateDatabase(self): + print("Creating '{0}' database...".format(self.dbName)) + return self.client.create_database(self.dbName) + + def CreateContainer(self, db): + collectionName = "Planets" + print("Creating '{0}' collection...".format(collectionName)) + partition_key = PartitionKey(path="/id", kind="Hash") + return db.create_container(id="Planets", partition_key=partition_key) + + def CreateDocuments(self, container): + # Cosmos will look for an 'id' field in the items, if the 'id' is not specify Cosmos is going to assing a random key. + planets = [ + { + "id": "Earth", + "HasRings": False, + "Radius": 3959, + "Moons": [{"Name": "Moon"}], + }, + { + "id": "Mars", + "HasRings": False, + "Radius": 2106, + "Moons": [{"Name": "Phobos"}, {"Name": "Deimos"}], + }, + ] + + print("Inserting items in the collection...") + for planet in planets: + container.create_item(planet) + print("\t'{0}' created".format(planet["id"])) + print("\tdone") + + def SimpleQuery(self, container): + print("Quering the container...") + items = list( + container.query_items( + query="SELECT c.id FROM c", enable_cross_partition_query=True + ) + ) + print("\tdone: {0}".format(items)) + + def DeleteDatabase(self): + print("Cleaning up the resource...") + self.client.delete_database(self.dbName) + print("\tdone") + + def Run(self): + print() + print("------------------------") + print("Cosmos DB") + print("------------------------") + print("1) Create a Database") + print("2) Create a Container in the database") + print("3) Insert Documents (items) into the Container") + print("4) Delete Database (Clean up the resource)") + print() + + # Ensure that the database does not exists + try: + self.DeleteDatabase() + except: + pass + + try: + db = self.CreateDatabase() + container = self.CreateContainer(db=db) + self.CreateDocuments(container=container) + self.SimpleQuery(container=container) + finally: + # if something goes wrong, the resource should be cleaned anyway + self.DeleteDatabase() diff --git a/samples/smoketest/event_hubs.py b/samples/smoketest/event_hubs.py new file mode 100644 index 000000000000..9a0ed400b5c5 --- /dev/null +++ b/samples/smoketest/event_hubs.py @@ -0,0 +1,66 @@ +import os +from datetime import datetime +from azure.eventhub import EventHubClient, EventData, EventPosition + + +class EventHub: + def __init__(self): + # This test requires a previusly created Event Hub. + # In this example the name is "myeventhub", but it could be change below + connectionString = os.environ["EVENT_HUBS_CONNECTION_STRING"] + eventHubName = "myeventhub" + self.client = EventHubClient.from_connection_string( + connectionString, eventHubName + ) + + def GetPartitionIds(self): + print("Getting partitions id...") + partition_ids = self.client.get_partition_ids() + print("\tdone") + return partition_ids + + def SendAndReceiveEvents(self, partitionID): + with self.client.create_consumer( + consumer_group="$default", + partition_id=partitionID, + event_position=EventPosition(datetime.utcnow()), + ) as consumer: + + print("Sending events...") + with self.client.create_producer(partition_id=partitionID) as producer: + event_list = [ + EventData(b"Test Event 1 in Python"), + EventData(b"Test Event 2 in Python"), + EventData(b"Test Event 3 in Python"), + ] + producer.send(event_list) + print("\tdone") + + print("Receiving events...") + received = consumer.receive(max_batch_size=len(event_list), timeout=2) + for event_data in received: + print("\tEvent Received: " + event_data.body_as_str()) + + print("\tdone") + + if len(received) != len(event_list): + raise Exception( + "Error, expecting {0} events, but {1} were received.".format( + str(len(event_list)), str(len(received)) + ) + ) + + def Run(self): + print() + print("------------------------") + print("Event Hubs") + print("------------------------") + print("1) Get partition ID") + print("2) Send Events") + print("3) Consume Events") + print() + + partitionID = self.GetPartitionIds() + # In this sample the same partition id is going to be used for the producer and consumer, + # It is the first one, but it could be any (is not relevant as long as it is the same in both producer and consumer) + self.SendAndReceiveEvents(partitionID[0]) diff --git a/samples/smoketest/key_vault_secrets.py b/samples/smoketest/key_vault_secrets.py new file mode 100644 index 000000000000..7f27b02460f1 --- /dev/null +++ b/samples/smoketest/key_vault_secrets.py @@ -0,0 +1,46 @@ +import os +from azure.identity import DefaultAzureCredential +from azure.keyvault.secrets import SecretClient + + +class KeyVault: + def __init__(self): + # DefaultAzureCredential() expects the following environment variables: + # * AZURE_CLIENT_ID + # * AZURE_CLIENT_SECRET + # * AZURE_TENANT_ID + credential = DefaultAzureCredential() + self.secret_client = SecretClient( + vault_url=os.environ["AZURE_PROJECT_URL"], credential=credential + ) + + def SetSecret(self): + print("Setting a secret...") + self.secret_client.set_secret("secret-name", "secret-value") + print("\tdone") + + def GetSecret(self): + print("Getting a secret...") + secret = self.secret_client.get_secret("secret-name") + print("\tdone: " + secret.name) + + def DeleteSecret(self): + print("Deleting a secret...") + deleted_secret = self.secret_client.delete_secret("secret-name") + print("\tdone: " + deleted_secret.name) + + def Run(self): + print() + print("------------------------") + print("Key Vault - Secrets\nIdentity - Credential") + print("------------------------") + print("1) Set a secret") + print("2) Get that secret") + print("3) Delete that secret (Clean up the resource)") + print() + + try: + self.SetSecret() + self.GetSecret() + finally: + self.DeleteSecret() diff --git a/samples/smoketest/requirements.txt b/samples/smoketest/requirements.txt new file mode 100644 index 000000000000..eaf49d15335d --- /dev/null +++ b/samples/smoketest/requirements.txt @@ -0,0 +1,8 @@ +azure-common==1.1.23 +azure-core==1.0.0b1 +azure-cosmos==4.0.0b1 +azure-eventhub==5.0.0b1 +azure-identity==1.0.0b1 +azure-keyvault-secrets==4.0.0b1 +azure-storage-blob==12.0.0b1 +azure-storage-common==2.0.0 \ No newline at end of file diff --git a/samples/smoketest/storage_blob.py b/samples/smoketest/storage_blob.py new file mode 100644 index 000000000000..7e0c394f9580 --- /dev/null +++ b/samples/smoketest/storage_blob.py @@ -0,0 +1,51 @@ +import os +from azure.storage.blob import BlobClient +from azure.core import exceptions + + +class StorageBlob: + def __init__(self): + connectionString = os.environ["STORAGE_CONNECTION_STRING"] + self.blob = BlobClient.from_connection_string( + connectionString, container="mycontainer", blob="pyTestBlob.txt" + ) + + def UploadBLob(self): + print("uploading blob...") + self.data = "This is a sample data for Python Test" + self.blob.upload_blob(self.data) + print("\tdone") + + def DownloadBlob(self): + print("downloading blob...") + with open("./downloadedBlob.txt", "wb+") as my_blob: + my_blob.writelines(self.blob.download_blob()) + + print("\tdone") + + def DeleteBlob(self): + print("Cleaning up the resource...") + self.blob.delete_blob() + print("\tdone") + + def Run(self): + print() + print("------------------------") + print("Storage - Blob") + print("------------------------") + print("1) Upload a Blob") + print("2) Download a Blob") + print("3) Delete that Blob (Clean up the resource)") + print() + + # Ensure that the blob does not exists before the tests + try: + self.DeleteBlob() + except exceptions.AzureError: + pass + + try: + self.UploadBLob() + self.DownloadBlob() + finally: + self.DeleteBlob() From 846a8ad489f652f50286c3ea56db9e794364f1bd Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Thu, 25 Jul 2019 12:41:38 -0700 Subject: [PATCH 010/244] Paging v2 (#6420) * First version of paging * Clean sync paging * Async paging * Name AsyncList without underscore * MyPy happyness * pylint * black * PageIterator as conf * Simplify ItemPaged * Use chain to link iterable * Make Paging more open * Docstring * pylint / mypy / black * Regenerate KV with latest Autorest + Paging branch (#6479) * Regenerate KV with latest Autorest + Paging branch * Remove unused import in tests * Make the async adapter more generic * Regeneration after operation mixin fix in Autorest * COmmit changes forgotten in #6418 * Fixing syntax for 2.7 * Move Storage Queue to new Paging (#6447) * Move Storage Queue to new Paging * Working Storage queue on new paging * Fix types * First shot of blob tests update * Fixing blob tests * File to new paging * Doc fix * Feedbacks from @annatisch * Fix last @annatisch comment * Simplify paging contract * Fix storage queue after new paging contract --- .../azure-core/azure/core/async_paging.py | 153 +- sdk/core/azure-core/azure/core/paging.py | 153 +- .../azure_core_asynctests/test_paging.py | 122 ++ sdk/core/azure-core/tests/test_paging.py | 99 +- .../_generated/v2016_10_01/__init__.py | 3 +- .../_generated/v2016_10_01/_configuration.py | 2 +- .../v2016_10_01/_key_vault_client.py | 4 +- .../_generated/v2016_10_01/aio/__init__.py | 3 +- .../v2016_10_01/aio/_configuration_async.py | 1 - .../aio/_key_vault_client_async.py | 4 +- .../_key_vault_client_operations_async.py | 543 ++---- .../_generated/v2016_10_01/models/__init__.py | 45 +- .../_generated/v2016_10_01/models/_models.py | 265 +++ .../v2016_10_01/models/_models_py3.py | 265 +++ .../v2016_10_01/models/_paged_models.py | 131 -- .../_key_vault_client_operations.py | 399 ++--- .../keys/_shared/_generated/v7_0/__init__.py | 3 +- .../_shared/_generated/v7_0/_configuration.py | 2 +- .../_generated/v7_0/_key_vault_client.py | 4 +- .../_shared/_generated/v7_0/aio/__init__.py | 3 +- .../v7_0/aio/_configuration_async.py | 1 - .../v7_0/aio/_key_vault_client_async.py | 4 +- .../_key_vault_client_operations_async.py | 633 ++----- .../_generated/v7_0/models/__init__.py | 55 +- .../_shared/_generated/v7_0/models/_models.py | 323 ++++ .../_generated/v7_0/models/_models_py3.py | 323 ++++ .../_generated/v7_0/models/_paged_models.py | 157 -- .../_key_vault_client_operations.py | 465 ++--- .../keys/_shared/async_client_base.py | 7 +- .../tests/keys_vault_client_async.py | 1 - .../_shared/_generated/key_vault_client.py | 8 +- .../_generated/v2016_10_01/__init__.py | 3 +- .../_generated/v2016_10_01/_configuration.py | 2 +- .../v2016_10_01/_key_vault_client.py | 4 +- .../_generated/v2016_10_01/aio/__init__.py | 3 +- .../v2016_10_01/aio/_configuration_async.py | 1 - .../aio/_key_vault_client_async.py | 4 +- .../_key_vault_client_operations_async.py | 543 ++---- .../_generated/v2016_10_01/models/__init__.py | 45 +- .../_generated/v2016_10_01/models/_models.py | 265 +++ .../v2016_10_01/models/_models_py3.py | 265 +++ .../v2016_10_01/models/_paged_models.py | 131 -- .../_key_vault_client_operations.py | 399 ++--- .../_shared/_generated/v7_0/__init__.py | 3 +- .../_shared/_generated/v7_0/_configuration.py | 2 +- .../_generated/v7_0/_key_vault_client.py | 4 +- .../_shared/_generated/v7_0/aio/__init__.py | 3 +- .../v7_0/aio/_configuration_async.py | 1 - .../v7_0/aio/_key_vault_client_async.py | 4 +- .../_key_vault_client_operations_async.py | 633 ++----- .../_generated/v7_0/models/__init__.py | 55 +- .../_shared/_generated/v7_0/models/_models.py | 323 ++++ .../_generated/v7_0/models/_models_py3.py | 323 ++++ .../_generated/v7_0/models/_paged_models.py | 157 -- .../_key_vault_client_operations.py | 465 ++--- .../secrets/_shared/async_client_base.py | 7 +- .../tests/secrets_vault_client_async.py | 1 - .../azure/storage/blob/blob_service_client.py | 15 +- .../azure/storage/blob/container_client.py | 28 +- .../azure/storage/blob/models.py | 171 +- .../tests/test_container.py | 22 +- .../azure/storage/file/directory_client.py | 29 +- .../azure/storage/file/file_client.py | 14 +- .../azure/storage/file/file_service_client.py | 18 +- .../azure/storage/file/models.py | 124 +- .../azure-storage-file/tests/test_handle.py | 13 +- .../azure-storage-file/tests/test_share.py | 37 +- .../azure/storage/queue/models.py | 83 +- .../azure/storage/queue/queue_client.py | 8 +- .../storage/queue/queue_service_client.py | 19 +- .../test_queue.test_delete_message.yaml | 1563 ++--------------- ..._queue.test_get_messages_with_options.yaml | 1209 ++----------- .../azure-storage-queue/tests/test_queue.py | 28 +- 73 files changed, 4595 insertions(+), 6613 deletions(-) create mode 100644 sdk/core/azure-core/tests/azure_core_asynctests/test_paging.py delete mode 100644 sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_paged_models.py delete mode 100644 sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_paged_models.py delete mode 100644 sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_paged_models.py delete mode 100644 sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_paged_models.py diff --git a/sdk/core/azure-core/azure/core/async_paging.py b/sdk/core/azure-core/azure/core/async_paging.py index 4a4af4d28cc5..8a61c5b00ddc 100644 --- a/sdk/core/azure-core/azure/core/async_paging.py +++ b/sdk/core/azure-core/azure/core/async_paging.py @@ -23,44 +23,127 @@ # IN THE SOFTWARE. # # -------------------------------------------------------------------------- -from collections.abc import AsyncIterator +import collections.abc import logging +from typing import ( + Iterable, + AsyncIterator, + TypeVar, + Callable, + Tuple, + Optional, + Awaitable, +) + _LOGGER = logging.getLogger(__name__) -class AsyncPagedMixin(AsyncIterator): - """Bring async to Paging. - - **Keyword argument:** - - *async_command* - Mandatory keyword argument for this mixin to work. - """ - def __init__(self, *args, **kwargs): # pylint: disable=unused-argument - self._async_get_next = kwargs.get("async_command") - if not self._async_get_next: - _LOGGER.debug("Paging async iterator protocol is not available for %s", - self.__class__.__name__) - - async def _async_advance_page(self): - if not self._async_get_next: - raise NotImplementedError( - "The class {} does not support async paging.".format(self.__class__.__name__) - ) - if self.next_link is None: - raise StopAsyncIteration("End of paging") - self._current_page_iter_index = 0 - self._response = await self._async_get_next(self.next_link) - self._deserializer(self, self._response) - return self.current_page +ReturnType = TypeVar("ReturnType") +ResponseType = TypeVar("ResponseType") + + +class AsyncList(AsyncIterator[ReturnType]): + def __init__(self, iterable: Iterable[ReturnType]) -> None: + """Change an iterable into a fake async iterator. + + Coul be useful to fill the async iterator contract when you get a list. + + :param iterable: A sync iterable of T + """ + # Technically, if it's a real iterator, I don't need "iter" + # but that will cover iterable and list as well with no troubles created. + self._iterator = iter(iterable) + + async def __anext__(self) -> ReturnType: + try: + return next(self._iterator) + except StopIteration as err: + raise StopAsyncIteration() from err + + +class AsyncPageIterator(AsyncIterator[AsyncIterator[ReturnType]]): + def __init__( + self, + get_next: Callable[[Optional[str]], Awaitable[ResponseType]], + extract_data: Callable[ + [ResponseType], Awaitable[Tuple[str, AsyncIterator[ReturnType]]] + ], + continuation_token: Optional[str] = None, + ) -> None: + """Return an async iterator of pages. + + :param get_next: Callable that take the continuation token and return a HTTP response + :param extract_data: Callable that take an HTTP response and return a tuple continuation token, + list of ReturnType + :param str continuation_token: The continuation token needed by get_next + """ + self._get_next = get_next + self._extract_data = extract_data + self.continuation_token = continuation_token + self._did_a_call_already = False + self._response = None + self._current_page = None async def __anext__(self): - """Iterate through responses.""" - # Storing the list iterator might work out better, but there's no - # guarantee that some code won't replace the list entirely with a copy, - # invalidating an list iterator that might be saved between iterations. - if self.current_page and self._current_page_iter_index < len(self.current_page): - response = self.current_page[self._current_page_iter_index] - self._current_page_iter_index += 1 - return response - await self._async_advance_page() - return await self.__anext__() + if self.continuation_token is None and self._did_a_call_already: + raise StopAsyncIteration("End of paging") + + self._response = await self._get_next(self.continuation_token) + self._did_a_call_already = True + + self.continuation_token, self._current_page = await self._extract_data( + self._response + ) + + # If current_page was a sync list, wrap it async-like + if isinstance(self._current_page, collections.abc.Iterable): + self._current_page = AsyncList(self._current_page) + + return self._current_page + + +class AsyncItemPaged(AsyncIterator[ReturnType]): + def __init__(self, *args, **kwargs) -> None: + """Return an async iterator of items. + + args and kwargs will be passed to the AsyncPageIterator constructor directly, + except page_iterator_class + """ + self._args = args + self._kwargs = kwargs + self._page_iterator = ( + None + ) # type: Optional[AsyncIterator[AsyncIterator[ReturnType]]] + self._page = None # type: Optional[AsyncIterator[ReturnType]] + self._page_iterator_class = self._kwargs.pop( + "page_iterator_class", AsyncPageIterator + ) + + def by_page( + self, continuation_token: Optional[str] = None + ) -> AsyncIterator[AsyncIterator[ReturnType]]: + """Get an async iterator of pages of objects, instead of an async iterator of objects. + + :param str continuation_token: + An opaque continuation token. This value can be retrieved from the + continuation_token field of a previous generator object. If specified, + this generator will begin returning results from this point. + :returns: An async iterator of pages (themselves async iterator of objects) + """ + return self._page_iterator_class( + *self._args, **self._kwargs, continuation_token=continuation_token + ) + + async def __anext__(self) -> ReturnType: + if self._page_iterator is None: + self._page_iterator = self.by_page() + return await self.__anext__() + if self._page is None: + # Let it raise StopAsyncIteration + self._page = await self._page_iterator.__anext__() + return await self.__anext__() + try: + return await self._page.__anext__() + except StopAsyncIteration: + self._page = None + return await self.__anext__() diff --git a/sdk/core/azure-core/azure/core/paging.py b/sdk/core/azure-core/azure/core/paging.py index 9a04250dc932..9f4089d02099 100644 --- a/sdk/core/azure-core/azure/core/paging.py +++ b/sdk/core/azure-core/azure/core/paging.py @@ -23,86 +23,99 @@ # IN THE SOFTWARE. # # -------------------------------------------------------------------------- -import sys -try: - from collections.abc import Iterator - xrange = range -except ImportError: - from collections import Iterator - -from typing import Dict, Any, List, Callable, Optional, TYPE_CHECKING # pylint: disable=unused-import - -if TYPE_CHECKING: - from .pipeline.transport.base import HttpResponse - from msrest.serialization import Deserializer, Model # type: ignore # pylint: disable=unused-import - -if sys.version_info >= (3, 5, 2): - # Not executed on old Python, no syntax error - from .async_paging import AsyncPagedMixin # type: ignore -else: - class AsyncPagedMixin(object): # type: ignore - pass - -class Paged(AsyncPagedMixin, Iterator): - """A container for paged REST responses. - - :param response: server response object. - :type response: ~azure.core.pipeline.transport.HttpResponse - :param callable command: Function to retrieve the next page of items. - :param Deserializer deserializer: a Deserializer instance to use - """ - _validation = {} # type: Dict[str, Dict[str, Any]] - _attribute_map = {} # type: Dict[str, Dict[str, Any]] - - def __init__(self, command, deserializer, **kwargs): - # type: (Callable[[str], HttpResponse], Deserializer, Any) -> None - super(Paged, self).__init__(**kwargs) # type: ignore - # Sets next_link, current_page, and _current_page_iter_index. - self.next_link = "" - self.current_page = [] # type: List[Model] - self._current_page_iter_index = 0 - self._deserializer = deserializer - self._get_next = command - self._response = None # type: Optional[HttpResponse] +import itertools +from typing import ( + Callable, + Optional, + TypeVar, + Iterator, + Iterable, + Tuple, +) # pylint: disable=unused-import +import logging + + +_LOGGER = logging.getLogger(__name__) + +ReturnType = TypeVar("ReturnType") +ResponseType = TypeVar("ResponseType") + + +class PageIterator(Iterator[Iterator[ReturnType]]): + def __init__( + self, + get_next, # type: Callable[[Optional[str]], ResponseType] + extract_data, # type: Callable[[ResponseType], Tuple[str, Iterable[ReturnType]]] + continuation_token=None, # type: Optional[str] + ): + """Return an iterator of pages. + + :param get_next: Callable that take the continuation token and return a HTTP response + :param extract_data: Callable that take an HTTP response and return a tuple continuation token, + list of ReturnType + :param str continuation_token: The continuation token needed by get_next + """ + self._get_next = get_next + self._extract_data = extract_data + self.continuation_token = continuation_token + self._did_a_call_already = False + self._response = None # type: Optional[ResponseType] + self._current_page = None # type: Optional[Iterable[ReturnType]] def __iter__(self): """Return 'self'.""" - # Since iteration mutates this object, consider it an iterator in-and-of - # itself. return self - @classmethod - def _get_subtype_map(cls): - """Required for parity to Model object for deserialization.""" - return {} + def __next__(self): + # type: () -> Iterator[ReturnType] + if self.continuation_token is None and self._did_a_call_already: + raise StopIteration("End of paging") + + self._response = self._get_next(self.continuation_token) + self._did_a_call_already = True + + self.continuation_token, self._current_page = self._extract_data(self._response) - def _advance_page(self): - # type: () -> List[Model] - """Force moving the cursor to the next azure call. + return iter(self._current_page) - This method is for advanced usage, iterator protocol is prefered. + next = __next__ # Python 2 compatibility. + + +class ItemPaged(Iterator[ReturnType]): + def __init__(self, *args, **kwargs): + """Return an iterator of items. - :raises: StopIteration if no further page - :return: The current page list - :rtype: list + args and kwargs will be passed to the PageIterator constructor directly, + except page_iterator_class """ - if self.next_link is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 - self._response = self._get_next(self.next_link) - self._deserializer(self, self._response) - return self.current_page + self._args = args + self._kwargs = kwargs + self._page_iterator = None + self._page_iterator_class = self._kwargs.pop( + "page_iterator_class", PageIterator + ) + + def by_page(self, continuation_token=None): + # type: (Optional[str]) -> Iterator[Iterator[ReturnType]] + """Get an iterator of pages of objects, instead of an iterator of objects. + + :param str continuation_token: + An opaque continuation token. This value can be retrieved from the + continuation_token field of a previous generator object. If specified, + this generator will begin returning results from this point. + :returns: An iterator of pages (themselves iterator of objects) + """ + return self._page_iterator_class( + continuation_token=continuation_token, *self._args, **self._kwargs + ) + + def __iter__(self): + """Return 'self'.""" + return self def __next__(self): - """Iterate through responses.""" - # Storing the list iterator might work out better, but there's no - # guarantee that some code won't replace the list entirely with a copy, - # invalidating an list iterator that might be saved between iterations. - if self.current_page and self._current_page_iter_index < len(self.current_page): - response = self.current_page[self._current_page_iter_index] - self._current_page_iter_index += 1 - return response - self._advance_page() - return self.__next__() + if self._page_iterator is None: + self._page_iterator = itertools.chain.from_iterable(self.by_page()) + return next(self._page_iterator) next = __next__ # Python 2 compatibility. diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_paging.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_paging.py new file mode 100644 index 000000000000..88d8cbe147d1 --- /dev/null +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_paging.py @@ -0,0 +1,122 @@ +#-------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# +#-------------------------------------------------------------------------- + +from typing import AsyncIterator, TypeVar, List + +from azure.core.async_paging import AsyncItemPaged, AsyncList + +import pytest + + +T = TypeVar("T") + + +async def _as_list(async_iter: AsyncIterator[T]) -> List[T]: + """Flatten an async iterator into a list. + + For testing purpose. + """ + # 3.6 only : result_iterated = [obj async for obj in deserialized] + result = [] + async for el in async_iter: + result.append(el) + return result + + +class TestPaging: + + @pytest.mark.asyncio + async def test_basic_paging(self): + + async def get_next(continuation_token=None): + """Simplify my life and return JSON and not response, but should be response. + """ + if not continuation_token: + return { + 'nextLink': 'page2', + 'value': ['value1.0', 'value1.1'] + } + else: + return { + 'nextLink': None, + 'value': ['value2.0', 'value2.1'] + } + + async def extract_data(response): + return response['nextLink'], AsyncList(response['value']) + + pager = AsyncItemPaged(get_next, extract_data) + result_iterated = await _as_list(pager) + + assert ['value1.0', 'value1.1', 'value2.0', 'value2.1'] == result_iterated + + @pytest.mark.asyncio + async def test_advance_paging(self): + + async def get_next(continuation_token=None): + """Simplify my life and return JSON and not response, but should be response. + """ + if not continuation_token: + return { + 'nextLink': 'page2', + 'value': ['value1.0', 'value1.1'] + } + else: + return { + 'nextLink': None, + 'value': ['value2.0', 'value2.1'] + } + + async def extract_data(response): + return response['nextLink'], AsyncList(response['value']) + + pager = AsyncItemPaged(get_next, extract_data).by_page() + + page1 = await pager.__anext__() + assert ['value1.0', 'value1.1'] == await _as_list(page1) + + page2 = await pager.__anext__() + assert ['value2.0', 'value2.1'] == await _as_list(page2) + + with pytest.raises(StopAsyncIteration): + await pager.__anext__() + + + @pytest.mark.asyncio + async def test_none_value(self): + async def get_next(continuation_token=None): + return { + 'nextLink': None, + 'value': None + } + + async def extract_data(response): + return response['nextLink'], AsyncList(response['value'] or []) + + pager = AsyncItemPaged(get_next, extract_data) + result_iterated = await _as_list(pager) + + assert len(result_iterated) == 0 diff --git a/sdk/core/azure-core/tests/test_paging.py b/sdk/core/azure-core/tests/test_paging.py index 41e00b0b86af..945f133cf7a9 100644 --- a/sdk/core/azure-core/tests/test_paging.py +++ b/sdk/core/azure-core/tests/test_paging.py @@ -1,6 +1,6 @@ #-------------------------------------------------------------------------- # -# Copyright (c) Microsoft Corporation. All rights reserved. +# Copyright (c) Microsoft Corporation. All rights reserved. # # The MIT License (MIT) # @@ -24,29 +24,43 @@ # #-------------------------------------------------------------------------- -import unittest +from azure.core.paging import ItemPaged -from azure.core.paging import Paged +import pytest -from msrest.serialization import Deserializer -class FakePaged(Paged): - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[str]'} - } +class TestPaging(object): - def __init__(self, *args, **kwargs): - super(FakePaged, self).__init__(*args, **kwargs) + def test_basic_paging(self): + + def get_next(continuation_token=None): + """Simplify my life and return JSON and not response, but should be response. + """ + if not continuation_token: + return { + 'nextLink': 'page2', + 'value': ['value1.0', 'value1.1'] + } + else: + return { + 'nextLink': None, + 'value': ['value2.0', 'value2.1'] + } -_test_deserializer = Deserializer({}) + def extract_data(response): + return response['nextLink'], iter(response['value']) -class TestPaging(unittest.TestCase): + pager = ItemPaged(get_next, extract_data) + result_iterated = list(pager) - def test_basic_paging(self): + assert ['value1.0', 'value1.1', 'value2.0', 'value2.1'] == result_iterated - def internal_paging(next_link=None, raw=False): - if not next_link: + def test_by_page_paging(self): + + def get_next(continuation_token=None): + """Simplify my life and return JSON and not response, but should be response. + """ + if not continuation_token: return { 'nextLink': 'page2', 'value': ['value1.0', 'value1.1'] @@ -57,17 +71,25 @@ def internal_paging(next_link=None, raw=False): 'value': ['value2.0', 'value2.1'] } - deserialized = FakePaged(internal_paging, _test_deserializer) - result_iterated = list(deserialized) - self.assertListEqual( - ['value1.0', 'value1.1', 'value2.0', 'value2.1'], - result_iterated - ) + def extract_data(response): + return response['nextLink'], iter(response['value']) + + pager = ItemPaged(get_next, extract_data).by_page() + page1 = next(pager) + assert list(page1) == ['value1.0', 'value1.1'] + + page2 = next(pager) + assert list(page2) == ['value2.0', 'value2.1'] + + with pytest.raises(StopIteration): + next(pager) def test_advance_paging(self): - def internal_paging(next_link=None, raw=False): - if not next_link: + def get_next(continuation_token=None): + """Simplify my life and return JSON and not response, but should be response. + """ + if not continuation_token: return { 'nextLink': 'page2', 'value': ['value1.0', 'value1.1'] @@ -78,27 +100,32 @@ def internal_paging(next_link=None, raw=False): 'value': ['value2.0', 'value2.1'] } - deserialized = FakePaged(internal_paging, _test_deserializer) - page1 = next(deserialized) + def extract_data(response): + return response['nextLink'], iter(response['value']) + + pager = ItemPaged(get_next, extract_data) + page1 = next(pager) assert page1 == 'value1.0' - page1 = next(deserialized) + page1 = next(pager) assert page1 == 'value1.1' - - page2 = next(deserialized) + + page2 = next(pager) assert page2 == 'value2.0' - page2 = next(deserialized) + page2 = next(pager) assert page2 == 'value2.1' - with self.assertRaises(StopIteration): - next(deserialized) + with pytest.raises(StopIteration): + next(pager) def test_none_value(self): - def internal_paging(next_link=None, raw=False): + def get_next(continuation_token=None): return { 'nextLink': None, 'value': None } + def extract_data(response): + return response['nextLink'], iter(response['value'] or []) - deserialized = FakePaged(internal_paging, _test_deserializer) - result_iterated = list(deserialized) - self.assertEqual(len(result_iterated), 0) + pager = ItemPaged(get_next, extract_data) + result_iterated = list(pager) + assert len(result_iterated) == 0 diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/__init__.py index d3fda25cc7ab..e913d4cf6c46 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/__init__.py @@ -9,9 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from ._configuration import KeyVaultClientConfiguration from ._key_vault_client import KeyVaultClient -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] from .version import VERSION diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_configuration.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_configuration.py index beb5eb930fa8..28cf75e3d2b4 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_configuration.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_configuration.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials @@ -45,4 +44,5 @@ def _configure(self, **kwargs): self.proxy_policy = policies.ProxyPolicy(**kwargs) self.logging_policy = policies.NetworkTraceLoggingPolicy(**kwargs) self.retry_policy = policies.RetryPolicy(**kwargs) + self.custom_hook_policy = policies.CustomHookPolicy(**kwargs) self.redirect_policy = policies.RedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_key_vault_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_key_vault_client.py index 0252b1e16a5e..e3ec609b6cd3 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_key_vault_client.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/__init__.py index ffece9055d9b..fb2e6c3866fd 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/__init__.py @@ -10,5 +10,4 @@ # -------------------------------------------------------------------------- from ._key_vault_client_async import KeyVaultClient -from ._configuration_async import KeyVaultClientConfiguration -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_configuration_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_configuration_async.py index 2144132ebe2d..a61d9eeff444 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_configuration_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_configuration_async.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py index 559d48da029a..ad4b8a97754f 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 28ea64adc6a6..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.async_paging import AsyncItemPaged, AsyncList from ... import models import uuid @@ -78,8 +79,6 @@ async def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops 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 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(parameters, 'KeyCreateParameters') @@ -154,8 +153,6 @@ async def import_key(self, vault_base_url, key_name, key, hsm=None, key_attribut 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 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(parameters, 'KeyImportParameters') @@ -218,8 +215,6 @@ async def delete_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -294,8 +289,6 @@ async def update_key(self, vault_base_url, key_name, key_version, key_ops=None, 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 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(parameters, 'KeyUpdateParameters') @@ -360,8 +353,6 @@ async def get_key(self, vault_base_url, key_name, key_version, *, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -399,11 +390,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -412,60 +404,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -487,11 +462,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -499,60 +475,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_keys.metadata = {'url': '/keys'} async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -604,8 +563,6 @@ async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -677,8 +634,6 @@ async def restore_key(self, vault_base_url, key_bundle_backup, *, cls=None, **kw 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 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(parameters, 'KeyRestoreParameters') @@ -759,8 +714,6 @@ async def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -838,8 +791,6 @@ async def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -915,8 +866,6 @@ async def sign(self, vault_base_url, key_name, key_version, algorithm, value, *, 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 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(parameters, 'KeySignParameters') @@ -998,8 +947,6 @@ async def verify(self, vault_base_url, key_name, key_version, algorithm, digest, 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 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(parameters, 'KeyVerifyParameters') @@ -1077,8 +1024,6 @@ async def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value 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 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(parameters, 'KeyOperationsParameters') @@ -1154,8 +1099,6 @@ async def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, val 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 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(parameters, 'KeyOperationsParameters') @@ -1199,11 +1142,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedKeyItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1211,60 +1155,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -1305,8 +1232,6 @@ async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs) header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1364,8 +1289,6 @@ async def purge_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwarg header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1421,8 +1344,6 @@ async def recover_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1493,8 +1414,6 @@ async def set_secret(self, vault_base_url, secret_name, value, tags=None, conten 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 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(parameters, 'SecretSetParameters') @@ -1555,8 +1474,6 @@ async def delete_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1630,8 +1547,6 @@ async def update_secret(self, vault_base_url, secret_name, secret_version, conte 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 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(parameters, 'SecretUpdateParameters') @@ -1694,8 +1609,6 @@ async def get_secret(self, vault_base_url, secret_name, secret_version, *, cls=N header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1733,11 +1646,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1745,60 +1659,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1819,11 +1716,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1832,60 +1730,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1904,11 +1785,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedSecretItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1916,60 +1798,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs): @@ -2009,8 +1874,6 @@ async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2068,8 +1931,6 @@ async def purge_deleted_secret(self, vault_base_url, secret_name, *, cls=None, * header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2122,8 +1983,6 @@ async def recover_deleted_secret(self, vault_base_url, secret_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2181,8 +2040,6 @@ async def backup_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2242,8 +2099,6 @@ async def restore_secret(self, vault_base_url, secret_bundle_backup, *, cls=None 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 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(parameters, 'SecretRestoreParameters') @@ -2283,11 +2138,12 @@ def get_certificates( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2295,60 +2151,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificates.metadata = {'url': '/certificates'} async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -2389,8 +2228,6 @@ async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2449,8 +2286,6 @@ async def set_certificate_contacts(self, vault_base_url, contact_list=None, *, c 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 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(contacts, 'Contacts') @@ -2508,8 +2343,6 @@ async def get_certificate_contacts(self, vault_base_url, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2563,8 +2396,6 @@ async def delete_certificate_contacts(self, vault_base_url, *, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2601,11 +2432,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateIssuerItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2613,60 +2445,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, *, cls=None, **kwargs): @@ -2720,8 +2535,6 @@ async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, cr 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2796,8 +2609,6 @@ async def update_certificate_issuer(self, vault_base_url, issuer_name, provider= 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2858,8 +2669,6 @@ async def get_certificate_issuer(self, vault_base_url, issuer_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2917,8 +2726,6 @@ async def delete_certificate_issuer(self, vault_base_url, issuer_name, *, cls=No header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2988,8 +2795,6 @@ async def create_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateCreateParameters') @@ -3072,8 +2877,6 @@ async def import_certificate(self, vault_base_url, certificate_name, base64_enco 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 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(parameters, 'CertificateImportParameters') @@ -3115,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3128,60 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3222,8 +3009,6 @@ async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3285,8 +3070,6 @@ async def update_certificate_policy(self, vault_base_url, certificate_name, cert 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 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(certificate_policy, 'CertificatePolicy') @@ -3364,8 +3147,6 @@ async def update_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateUpdateParameters') @@ -3429,8 +3210,6 @@ async def get_certificate(self, vault_base_url, certificate_name, certificate_ve header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3493,8 +3272,6 @@ async def update_certificate_operation(self, vault_base_url, certificate_name, c 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3554,8 +3331,6 @@ async def get_certificate_operation(self, vault_base_url, certificate_name, *, c header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3613,8 +3388,6 @@ async def delete_certificate_operation(self, vault_base_url, certificate_name, * header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3686,8 +3459,6 @@ async def merge_certificate(self, vault_base_url, certificate_name, x509_certifi 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 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(parameters, 'CertificateMergeParameters') @@ -3730,11 +3501,12 @@ def get_deleted_certificates( :type maxresults: int :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedCertificateItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3742,60 +3514,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3836,8 +3591,6 @@ async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3895,8 +3648,6 @@ async def purge_deleted_certificate(self, vault_base_url, certificate_name, *, c header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3952,8 +3703,6 @@ async def recover_deleted_certificate(self, vault_base_url, certificate_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3987,11 +3736,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v2016_10_01.models.StorageAccountItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3999,60 +3749,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_storage_accounts.metadata = {'url': '/storage'} async def delete_storage_account(self, vault_base_url, storage_account_name, *, cls=None, **kwargs): @@ -4089,8 +3822,6 @@ async def delete_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4145,8 +3876,6 @@ async def get_storage_account(self, vault_base_url, storage_account_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4221,8 +3950,6 @@ async def set_storage_account(self, vault_base_url, storage_account_name, resour 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 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(parameters, 'StorageAccountCreateParameters') @@ -4298,8 +4025,6 @@ async def update_storage_account(self, vault_base_url, storage_account_name, act 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4362,8 +4087,6 @@ async def regenerate_storage_account_key(self, vault_base_url, storage_account_n 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4402,11 +4125,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v2016_10_01.models.SasDefinitionItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4415,60 +4139,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, *, cls=None, **kwargs): @@ -4508,8 +4215,6 @@ async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4567,8 +4272,6 @@ async def get_sas_definition(self, vault_base_url, storage_account_name, sas_def header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4639,8 +4342,6 @@ async def set_sas_definition(self, vault_base_url, storage_account_name, sas_def 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 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(parameters1, 'SasDefinitionCreateParameters') @@ -4714,8 +4415,6 @@ async def update_sas_definition(self, vault_base_url, storage_account_name, sas_ 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 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(parameters1, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/__init__.py index 76f4bf1ab9bc..6f134becdbd3 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/__init__.py @@ -20,9 +20,11 @@ from ._models_py3 import CertificateCreateParameters from ._models_py3 import CertificateImportParameters from ._models_py3 import CertificateIssuerItem + from ._models_py3 import CertificateIssuerListResult from ._models_py3 import CertificateIssuerSetParameters from ._models_py3 import CertificateIssuerUpdateParameters from ._models_py3 import CertificateItem + from ._models_py3 import CertificateListResult from ._models_py3 import CertificateMergeParameters from ._models_py3 import CertificateOperation from ._models_py3 import CertificateOperationUpdateParameter @@ -32,10 +34,13 @@ from ._models_py3 import Contacts from ._models_py3 import DeletedCertificateBundle from ._models_py3 import DeletedCertificateItem + from ._models_py3 import DeletedCertificateListResult from ._models_py3 import DeletedKeyBundle from ._models_py3 import DeletedKeyItem + from ._models_py3 import DeletedKeyListResult from ._models_py3 import DeletedSecretBundle from ._models_py3 import DeletedSecretItem + from ._models_py3 import DeletedSecretListResult from ._models_py3 import Error from ._models_py3 import IssuerAttributes from ._models_py3 import IssuerBundle @@ -47,6 +52,7 @@ from ._models_py3 import KeyCreateParameters from ._models_py3 import KeyImportParameters from ._models_py3 import KeyItem + from ._models_py3 import KeyListResult from ._models_py3 import KeyOperationResult from ._models_py3 import KeyOperationsParameters from ._models_py3 import KeyProperties @@ -63,10 +69,12 @@ from ._models_py3 import SasDefinitionBundle from ._models_py3 import SasDefinitionCreateParameters from ._models_py3 import SasDefinitionItem + from ._models_py3 import SasDefinitionListResult from ._models_py3 import SasDefinitionUpdateParameters from ._models_py3 import SecretAttributes from ._models_py3 import SecretBundle from ._models_py3 import SecretItem + from ._models_py3 import SecretListResult from ._models_py3 import SecretProperties from ._models_py3 import SecretRestoreParameters from ._models_py3 import SecretSetParameters @@ -77,6 +85,7 @@ from ._models_py3 import StorageAccountRegenerteKeyParameters from ._models_py3 import StorageAccountUpdateParameters from ._models_py3 import StorageBundle + from ._models_py3 import StorageListResult from ._models_py3 import SubjectAlternativeNames from ._models_py3 import Trigger from ._models_py3 import X509CertificateProperties @@ -91,9 +100,11 @@ from ._models import CertificateCreateParameters from ._models import CertificateImportParameters from ._models import CertificateIssuerItem + from ._models import CertificateIssuerListResult from ._models import CertificateIssuerSetParameters from ._models import CertificateIssuerUpdateParameters from ._models import CertificateItem + from ._models import CertificateListResult from ._models import CertificateMergeParameters from ._models import CertificateOperation from ._models import CertificateOperationUpdateParameter @@ -103,10 +114,13 @@ from ._models import Contacts from ._models import DeletedCertificateBundle from ._models import DeletedCertificateItem + from ._models import DeletedCertificateListResult from ._models import DeletedKeyBundle from ._models import DeletedKeyItem + from ._models import DeletedKeyListResult from ._models import DeletedSecretBundle from ._models import DeletedSecretItem + from ._models import DeletedSecretListResult from ._models import Error from ._models import IssuerAttributes from ._models import IssuerBundle @@ -118,6 +132,7 @@ from ._models import KeyCreateParameters from ._models import KeyImportParameters from ._models import KeyItem + from ._models import KeyListResult from ._models import KeyOperationResult from ._models import KeyOperationsParameters from ._models import KeyProperties @@ -134,10 +149,12 @@ from ._models import SasDefinitionBundle from ._models import SasDefinitionCreateParameters from ._models import SasDefinitionItem + from ._models import SasDefinitionListResult from ._models import SasDefinitionUpdateParameters from ._models import SecretAttributes from ._models import SecretBundle from ._models import SecretItem + from ._models import SecretListResult from ._models import SecretProperties from ._models import SecretRestoreParameters from ._models import SecretSetParameters @@ -148,18 +165,10 @@ from ._models import StorageAccountRegenerteKeyParameters from ._models import StorageAccountUpdateParameters from ._models import StorageBundle + from ._models import StorageListResult from ._models import SubjectAlternativeNames from ._models import Trigger from ._models import X509CertificateProperties -from ._paged_models import CertificateIssuerItemPaged -from ._paged_models import CertificateItemPaged -from ._paged_models import DeletedCertificateItemPaged -from ._paged_models import DeletedKeyItemPaged -from ._paged_models import DeletedSecretItemPaged -from ._paged_models import KeyItemPaged -from ._paged_models import SasDefinitionItemPaged -from ._paged_models import SecretItemPaged -from ._paged_models import StorageAccountItemPaged from ._key_vault_client_enums import ( JsonWebKeyType, JsonWebKeyCurveName, @@ -182,9 +191,11 @@ 'CertificateCreateParameters', 'CertificateImportParameters', 'CertificateIssuerItem', + 'CertificateIssuerListResult', 'CertificateIssuerSetParameters', 'CertificateIssuerUpdateParameters', 'CertificateItem', + 'CertificateListResult', 'CertificateMergeParameters', 'CertificateOperation', 'CertificateOperationUpdateParameter', @@ -194,10 +205,13 @@ 'Contacts', 'DeletedCertificateBundle', 'DeletedCertificateItem', + 'DeletedCertificateListResult', 'DeletedKeyBundle', 'DeletedKeyItem', + 'DeletedKeyListResult', 'DeletedSecretBundle', 'DeletedSecretItem', + 'DeletedSecretListResult', 'Error', 'IssuerAttributes', 'IssuerBundle', @@ -209,6 +223,7 @@ 'KeyCreateParameters', 'KeyImportParameters', 'KeyItem', + 'KeyListResult', 'KeyOperationResult', 'KeyOperationsParameters', 'KeyProperties', @@ -225,10 +240,12 @@ 'SasDefinitionBundle', 'SasDefinitionCreateParameters', 'SasDefinitionItem', + 'SasDefinitionListResult', 'SasDefinitionUpdateParameters', 'SecretAttributes', 'SecretBundle', 'SecretItem', + 'SecretListResult', 'SecretProperties', 'SecretRestoreParameters', 'SecretSetParameters', @@ -239,18 +256,10 @@ 'StorageAccountRegenerteKeyParameters', 'StorageAccountUpdateParameters', 'StorageBundle', + 'StorageListResult', 'SubjectAlternativeNames', 'Trigger', 'X509CertificateProperties', - 'KeyItemPaged', - 'DeletedKeyItemPaged', - 'SecretItemPaged', - 'DeletedSecretItemPaged', - 'CertificateItemPaged', - 'CertificateIssuerItemPaged', - 'DeletedCertificateItemPaged', - 'StorageAccountItemPaged', - 'SasDefinitionItemPaged', 'JsonWebKeyType', 'JsonWebKeyCurveName', 'DeletionRecoveryLevel', diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py index f9caaf92c16e..e918a167f2dd 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py @@ -341,6 +341,37 @@ def __init__(self, **kwargs): self.provider = kwargs.get('provider', None) +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -435,6 +466,35 @@ def __init__(self, **kwargs): self.x509_thumbprint = kwargs.get('x509_thumbprint', None) +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v2016_10_01.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -805,6 +865,36 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: + list[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -975,6 +1065,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1176,6 +1295,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -1531,6 +1679,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v2016_10_01.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2012,6 +2189,35 @@ def __init__(self, **kwargs): self.tags = None +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2084,6 +2290,35 @@ def __init__(self, **kwargs): self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2415,6 +2650,36 @@ def __init__(self, **kwargs): self.tags = None +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SubjectAlternativeNames(Model): """The subject alternate names of a X509 object. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py index 4920c195ef89..07d530b486f6 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py @@ -341,6 +341,37 @@ def __init__(self, *, id: str=None, provider: str=None, **kwargs) -> None: self.provider = provider +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -435,6 +466,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.x509_thumbprint = x509_thumbprint +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v2016_10_01.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -805,6 +865,36 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: + list[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -975,6 +1065,35 @@ def __init__(self, *, kid: str=None, attributes=None, tags=None, recovery_id: st self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1176,6 +1295,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, content_type: st self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -1531,6 +1679,35 @@ def __init__(self, *, key, hsm: bool=None, key_attributes=None, tags=None, **kwa self.tags = tags +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v2016_10_01.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2012,6 +2189,35 @@ def __init__(self, **kwargs) -> None: self.tags = None +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2084,6 +2290,35 @@ def __init__(self, *, enabled: bool=None, not_before=None, expires=None, **kwarg self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2415,6 +2650,36 @@ def __init__(self, **kwargs) -> None: self.tags = None +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SubjectAlternativeNames(Model): """The subject alternate names of a X509 object. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_paged_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_paged_models.py deleted file mode 100644 index e5ddd1d7edc4..000000000000 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_paged_models.py +++ /dev/null @@ -1,131 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from azure.core.paging import Paged - - -class KeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`KeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[KeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(KeyItemPaged, self).__init__(*args, **kwargs) -class DeletedKeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedKeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedKeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedKeyItemPaged, self).__init__(*args, **kwargs) -class SecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SecretItemPaged, self).__init__(*args, **kwargs) -class DeletedSecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSecretItemPaged, self).__init__(*args, **kwargs) -class CertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateItemPaged, self).__init__(*args, **kwargs) -class CertificateIssuerItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateIssuerItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateIssuerItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateIssuerItemPaged, self).__init__(*args, **kwargs) -class DeletedCertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedCertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedCertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedCertificateItemPaged, self).__init__(*args, **kwargs) -class StorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`StorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(StorageAccountItemPaged, self).__init__(*args, **kwargs) -class SasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SasDefinitionItemPaged, self).__init__(*args, **kwargs) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 40ad1ab95087..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.paging import ItemPaged from .. import models import uuid @@ -78,8 +79,6 @@ def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops=None, 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 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(parameters, 'KeyCreateParameters') @@ -154,8 +153,6 @@ def import_key(self, vault_base_url, key_name, key, hsm=None, key_attributes=Non 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 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(parameters, 'KeyImportParameters') @@ -218,8 +215,6 @@ def delete_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -294,8 +289,6 @@ def update_key(self, vault_base_url, key_name, key_version, key_ops=None, key_at 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 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(parameters, 'KeyUpdateParameters') @@ -360,8 +353,6 @@ def get_key(self, vault_base_url, key_name, key_version, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -399,11 +390,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -412,46 +404,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -473,11 +462,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -485,46 +475,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_keys.metadata = {'url': '/keys'} def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -576,8 +563,6 @@ def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -649,8 +634,6 @@ def restore_key(self, vault_base_url, key_bundle_backup, cls=None, **kwargs): 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 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(parameters, 'KeyRestoreParameters') @@ -731,8 +714,6 @@ def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -810,8 +791,6 @@ def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -887,8 +866,6 @@ def sign(self, vault_base_url, key_name, key_version, algorithm, value, cls=None 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 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(parameters, 'KeySignParameters') @@ -970,8 +947,6 @@ def verify(self, vault_base_url, key_name, key_version, algorithm, digest, signa 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 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(parameters, 'KeyVerifyParameters') @@ -1049,8 +1024,6 @@ def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cls= 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 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(parameters, 'KeyOperationsParameters') @@ -1126,8 +1099,6 @@ def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cl 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 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(parameters, 'KeyOperationsParameters') @@ -1171,11 +1142,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedKeyItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1183,46 +1155,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -1263,8 +1232,6 @@ def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1322,8 +1289,6 @@ def purge_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1379,8 +1344,6 @@ def recover_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1451,8 +1414,6 @@ def set_secret(self, vault_base_url, secret_name, value, tags=None, content_type 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 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(parameters, 'SecretSetParameters') @@ -1513,8 +1474,6 @@ def delete_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1588,8 +1547,6 @@ def update_secret(self, vault_base_url, secret_name, secret_version, content_typ 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 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(parameters, 'SecretUpdateParameters') @@ -1652,8 +1609,6 @@ def get_secret(self, vault_base_url, secret_name, secret_version, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1691,11 +1646,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1703,46 +1659,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1763,11 +1716,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1776,46 +1730,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1834,11 +1785,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedSecretItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1846,46 +1798,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): @@ -1925,8 +1874,6 @@ def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1984,8 +1931,6 @@ def purge_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2038,8 +1983,6 @@ def recover_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2097,8 +2040,6 @@ def backup_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2158,8 +2099,6 @@ def restore_secret(self, vault_base_url, secret_bundle_backup, cls=None, **kwarg 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 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(parameters, 'SecretRestoreParameters') @@ -2199,11 +2138,12 @@ def get_certificates( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2211,46 +2151,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificates.metadata = {'url': '/certificates'} def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -2291,8 +2228,6 @@ def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2351,8 +2286,6 @@ def set_certificate_contacts(self, vault_base_url, contact_list=None, cls=None, 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 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(contacts, 'Contacts') @@ -2410,8 +2343,6 @@ def get_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2465,8 +2396,6 @@ def delete_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2503,11 +2432,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateIssuerItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2515,46 +2445,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, cls=None, **kwargs): @@ -2608,8 +2535,6 @@ def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credenti 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2684,8 +2609,6 @@ def update_certificate_issuer(self, vault_base_url, issuer_name, provider=None, 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2746,8 +2669,6 @@ def get_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2805,8 +2726,6 @@ def delete_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2876,8 +2795,6 @@ def create_certificate(self, vault_base_url, certificate_name, certificate_polic 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 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(parameters, 'CertificateCreateParameters') @@ -2960,8 +2877,6 @@ def import_certificate(self, vault_base_url, certificate_name, base64_encoded_ce 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 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(parameters, 'CertificateImportParameters') @@ -3003,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3016,46 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3096,8 +3009,6 @@ def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3159,8 +3070,6 @@ def update_certificate_policy(self, vault_base_url, certificate_name, certificat 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 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(certificate_policy, 'CertificatePolicy') @@ -3238,8 +3147,6 @@ def update_certificate(self, vault_base_url, certificate_name, certificate_versi 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 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(parameters, 'CertificateUpdateParameters') @@ -3303,8 +3210,6 @@ def get_certificate(self, vault_base_url, certificate_name, certificate_version, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3367,8 +3272,6 @@ def update_certificate_operation(self, vault_base_url, certificate_name, cancell 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3428,8 +3331,6 @@ def get_certificate_operation(self, vault_base_url, certificate_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3487,8 +3388,6 @@ def delete_certificate_operation(self, vault_base_url, certificate_name, cls=Non header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3560,8 +3459,6 @@ def merge_certificate(self, vault_base_url, certificate_name, x509_certificates, 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 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(parameters, 'CertificateMergeParameters') @@ -3604,11 +3501,12 @@ def get_deleted_certificates( :type maxresults: int :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedCertificateItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3616,46 +3514,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3696,8 +3591,6 @@ def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3755,8 +3648,6 @@ def purge_deleted_certificate(self, vault_base_url, certificate_name, cls=None, header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3812,8 +3703,6 @@ def recover_deleted_certificate(self, vault_base_url, certificate_name, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3847,11 +3736,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v2016_10_01.models.StorageAccountItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3859,46 +3749,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_storage_accounts.metadata = {'url': '/storage'} def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, **kwargs): @@ -3935,8 +3822,6 @@ def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3991,8 +3876,6 @@ def get_storage_account(self, vault_base_url, storage_account_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4067,8 +3950,6 @@ def set_storage_account(self, vault_base_url, storage_account_name, resource_id, 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 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(parameters, 'StorageAccountCreateParameters') @@ -4144,8 +4025,6 @@ def update_storage_account(self, vault_base_url, storage_account_name, active_ke 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4208,8 +4087,6 @@ def regenerate_storage_account_key(self, vault_base_url, storage_account_name, k 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4248,11 +4125,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v2016_10_01.models.SasDefinitionItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4261,46 +4139,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def delete_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, cls=None, **kwargs): @@ -4340,8 +4215,6 @@ def delete_sas_definition(self, vault_base_url, storage_account_name, sas_defini header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4399,8 +4272,6 @@ def get_sas_definition(self, vault_base_url, storage_account_name, sas_definitio header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4471,8 +4342,6 @@ def set_sas_definition(self, vault_base_url, storage_account_name, sas_definitio 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 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(parameters1, 'SasDefinitionCreateParameters') @@ -4546,8 +4415,6 @@ def update_sas_definition(self, vault_base_url, storage_account_name, sas_defini 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 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(parameters1, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/__init__.py index d3fda25cc7ab..e913d4cf6c46 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/__init__.py @@ -9,9 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from ._configuration import KeyVaultClientConfiguration from ._key_vault_client import KeyVaultClient -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] from .version import VERSION diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_configuration.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_configuration.py index beb5eb930fa8..28cf75e3d2b4 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_configuration.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_configuration.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials @@ -45,4 +44,5 @@ def _configure(self, **kwargs): self.proxy_policy = policies.ProxyPolicy(**kwargs) self.logging_policy = policies.NetworkTraceLoggingPolicy(**kwargs) self.retry_policy = policies.RetryPolicy(**kwargs) + self.custom_hook_policy = policies.CustomHookPolicy(**kwargs) self.redirect_policy = policies.RedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_key_vault_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_key_vault_client.py index 699433682e60..a1a1eb19328b 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_key_vault_client.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/__init__.py index ffece9055d9b..fb2e6c3866fd 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/__init__.py @@ -10,5 +10,4 @@ # -------------------------------------------------------------------------- from ._key_vault_client_async import KeyVaultClient -from ._configuration_async import KeyVaultClientConfiguration -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_configuration_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_configuration_async.py index 2144132ebe2d..a61d9eeff444 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_configuration_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_configuration_async.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_key_vault_client_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_key_vault_client_async.py index 739ab6ea407d..482d6336ab1a 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_key_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_key_vault_client_async.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index a97144221c6a..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.async_paging import AsyncItemPaged, AsyncList from ... import models import uuid @@ -77,8 +78,6 @@ async def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops 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 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(parameters, 'KeyCreateParameters') @@ -153,8 +152,6 @@ async def import_key(self, vault_base_url, key_name, key, hsm=None, key_attribut 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 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(parameters, 'KeyImportParameters') @@ -217,8 +214,6 @@ async def delete_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -293,8 +288,6 @@ async def update_key(self, vault_base_url, key_name, key_version, key_ops=None, 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 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(parameters, 'KeyUpdateParameters') @@ -359,8 +352,6 @@ async def get_key(self, vault_base_url, key_name, key_version, *, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -398,11 +389,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -411,60 +403,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -486,11 +461,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -498,60 +474,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_keys.metadata = {'url': '/keys'} async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -603,8 +562,6 @@ async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -676,8 +633,6 @@ async def restore_key(self, vault_base_url, key_bundle_backup, *, cls=None, **kw 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 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(parameters, 'KeyRestoreParameters') @@ -758,8 +713,6 @@ async def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -837,8 +790,6 @@ async def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -914,8 +865,6 @@ async def sign(self, vault_base_url, key_name, key_version, algorithm, value, *, 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 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(parameters, 'KeySignParameters') @@ -997,8 +946,6 @@ async def verify(self, vault_base_url, key_name, key_version, algorithm, digest, 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 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(parameters, 'KeyVerifyParameters') @@ -1076,8 +1023,6 @@ async def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value 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 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(parameters, 'KeyOperationsParameters') @@ -1153,8 +1098,6 @@ async def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, val 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 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(parameters, 'KeyOperationsParameters') @@ -1198,11 +1141,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v7_0.models.DeletedKeyItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1210,60 +1154,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -1304,8 +1231,6 @@ async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs) header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1363,8 +1288,6 @@ async def purge_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwarg header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1420,8 +1343,6 @@ async def recover_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1491,8 +1412,6 @@ async def set_secret(self, vault_base_url, secret_name, value, tags=None, conten 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 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(parameters, 'SecretSetParameters') @@ -1553,8 +1472,6 @@ async def delete_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1627,8 +1544,6 @@ async def update_secret(self, vault_base_url, secret_name, secret_version, conte 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 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(parameters, 'SecretUpdateParameters') @@ -1691,8 +1606,6 @@ async def get_secret(self, vault_base_url, secret_name, secret_version, *, cls=N header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1730,11 +1643,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1742,60 +1656,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1816,11 +1713,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1829,60 +1727,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1901,11 +1782,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSecretItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1913,60 +1795,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs): @@ -2006,8 +1871,6 @@ async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2065,8 +1928,6 @@ async def purge_deleted_secret(self, vault_base_url, secret_name, *, cls=None, * header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2119,8 +1980,6 @@ async def recover_deleted_secret(self, vault_base_url, secret_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2178,8 +2037,6 @@ async def backup_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2239,8 +2096,6 @@ async def restore_secret(self, vault_base_url, secret_bundle_backup, *, cls=None 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 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(parameters, 'SecretRestoreParameters') @@ -2283,11 +2138,12 @@ def get_certificates( :type include_pending: bool :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2295,9 +2151,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -2306,51 +2159,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificates.metadata = {'url': '/certificates'} async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -2391,8 +2230,6 @@ async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2451,8 +2288,6 @@ async def set_certificate_contacts(self, vault_base_url, contact_list=None, *, c 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 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(contacts, 'Contacts') @@ -2510,8 +2345,6 @@ async def get_certificate_contacts(self, vault_base_url, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2565,8 +2398,6 @@ async def delete_certificate_contacts(self, vault_base_url, *, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2603,11 +2434,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v7_0.models.CertificateIssuerItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2615,60 +2447,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, *, cls=None, **kwargs): @@ -2721,8 +2536,6 @@ async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, cr 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2796,8 +2609,6 @@ async def update_certificate_issuer(self, vault_base_url, issuer_name, provider= 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2858,8 +2669,6 @@ async def get_certificate_issuer(self, vault_base_url, issuer_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2917,8 +2726,6 @@ async def delete_certificate_issuer(self, vault_base_url, issuer_name, *, cls=No header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2988,8 +2795,6 @@ async def create_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateCreateParameters') @@ -3072,8 +2877,6 @@ async def import_certificate(self, vault_base_url, certificate_name, base64_enco 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 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(parameters, 'CertificateImportParameters') @@ -3115,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3128,60 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3222,8 +3009,6 @@ async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3285,8 +3070,6 @@ async def update_certificate_policy(self, vault_base_url, certificate_name, cert 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 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(certificate_policy, 'CertificatePolicy') @@ -3364,8 +3147,6 @@ async def update_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateUpdateParameters') @@ -3429,8 +3210,6 @@ async def get_certificate(self, vault_base_url, certificate_name, certificate_ve header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3493,8 +3272,6 @@ async def update_certificate_operation(self, vault_base_url, certificate_name, c 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3554,8 +3331,6 @@ async def get_certificate_operation(self, vault_base_url, certificate_name, *, c header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3613,8 +3388,6 @@ async def delete_certificate_operation(self, vault_base_url, certificate_name, * header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3686,8 +3459,6 @@ async def merge_certificate(self, vault_base_url, certificate_name, x509_certifi 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 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(parameters, 'CertificateMergeParameters') @@ -3748,8 +3519,6 @@ async def backup_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3809,8 +3578,6 @@ async def restore_certificate(self, vault_base_url, certificate_bundle_backup, * 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 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(parameters, 'CertificateRestoreParameters') @@ -3856,11 +3623,12 @@ def get_deleted_certificates( :type include_pending: bool :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v7_0.models.DeletedCertificateItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3868,9 +3636,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -3879,51 +3644,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3964,8 +3715,6 @@ async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4023,8 +3772,6 @@ async def purge_deleted_certificate(self, vault_base_url, certificate_name, *, c header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4080,8 +3827,6 @@ async def recover_deleted_certificate(self, vault_base_url, certificate_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4115,11 +3860,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.StorageAccountItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -4127,60 +3873,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_storage_accounts.metadata = {'url': '/storage'} def get_deleted_storage_accounts( @@ -4199,11 +3928,12 @@ def get_deleted_storage_accounts( :type maxresults: int :return: An iterator like instance of DeletedStorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.DeletedStorageAccountItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_storage_accounts.metadata['url'] @@ -4211,60 +3941,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('DeletedStorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedStorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_storage_accounts.metadata = {'url': '/deletedstorage'} async def get_deleted_storage_account(self, vault_base_url, storage_account_name, *, cls=None, **kwargs): @@ -4304,8 +4017,6 @@ async def get_deleted_storage_account(self, vault_base_url, storage_account_name header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4363,8 +4074,6 @@ async def purge_deleted_storage_account(self, vault_base_url, storage_account_na header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4417,8 +4126,6 @@ async def recover_deleted_storage_account(self, vault_base_url, storage_account_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4475,8 +4182,6 @@ async def backup_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4536,8 +4241,6 @@ async def restore_storage_account(self, vault_base_url, storage_bundle_backup, * 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 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(parameters, 'StorageRestoreParameters') @@ -4595,8 +4298,6 @@ async def delete_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4651,8 +4352,6 @@ async def get_storage_account(self, vault_base_url, storage_account_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4727,8 +4426,6 @@ async def set_storage_account(self, vault_base_url, storage_account_name, resour 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 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(parameters, 'StorageAccountCreateParameters') @@ -4804,8 +4501,6 @@ async def update_storage_account(self, vault_base_url, storage_account_name, act 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4868,8 +4563,6 @@ async def regenerate_storage_account_key(self, vault_base_url, storage_account_n 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4908,11 +4601,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.SasDefinitionItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4921,60 +4615,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def get_deleted_sas_definitions( @@ -4996,11 +4673,12 @@ def get_deleted_sas_definitions( :type maxresults: int :return: An iterator like instance of DeletedSasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSasDefinitionItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_sas_definitions.metadata['url'] @@ -5009,60 +4687,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_sas_definitions.metadata = {'url': '/deletedstorage/{storage-account-name}/sas'} async def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, *, cls=None, **kwargs): @@ -5105,8 +4766,6 @@ async def get_deleted_sas_definition(self, vault_base_url, storage_account_name, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5167,8 +4826,6 @@ async def recover_deleted_sas_definition(self, vault_base_url, storage_account_n header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -5226,8 +4883,6 @@ async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -5285,8 +4940,6 @@ async def get_sas_definition(self, vault_base_url, storage_account_name, sas_def header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5364,8 +5017,6 @@ async def set_sas_definition(self, vault_base_url, storage_account_name, sas_def 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 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(parameters, 'SasDefinitionCreateParameters') @@ -5446,8 +5097,6 @@ async def update_sas_definition(self, vault_base_url, storage_account_name, sas_ 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 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(parameters, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/__init__.py index 4debdd0f3d13..5e72f49a73f6 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/__init__.py @@ -22,9 +22,11 @@ from ._models_py3 import CertificateCreateParameters from ._models_py3 import CertificateImportParameters from ._models_py3 import CertificateIssuerItem + from ._models_py3 import CertificateIssuerListResult from ._models_py3 import CertificateIssuerSetParameters from ._models_py3 import CertificateIssuerUpdateParameters from ._models_py3 import CertificateItem + from ._models_py3 import CertificateListResult from ._models_py3 import CertificateMergeParameters from ._models_py3 import CertificateOperation from ._models_py3 import CertificateOperationUpdateParameter @@ -35,14 +37,19 @@ from ._models_py3 import Contacts from ._models_py3 import DeletedCertificateBundle from ._models_py3 import DeletedCertificateItem + from ._models_py3 import DeletedCertificateListResult from ._models_py3 import DeletedKeyBundle from ._models_py3 import DeletedKeyItem + from ._models_py3 import DeletedKeyListResult from ._models_py3 import DeletedSasDefinitionBundle from ._models_py3 import DeletedSasDefinitionItem + from ._models_py3 import DeletedSasDefinitionListResult from ._models_py3 import DeletedSecretBundle from ._models_py3 import DeletedSecretItem + from ._models_py3 import DeletedSecretListResult from ._models_py3 import DeletedStorageAccountItem from ._models_py3 import DeletedStorageBundle + from ._models_py3 import DeletedStorageListResult from ._models_py3 import Error from ._models_py3 import IssuerAttributes from ._models_py3 import IssuerBundle @@ -54,6 +61,7 @@ from ._models_py3 import KeyCreateParameters from ._models_py3 import KeyImportParameters from ._models_py3 import KeyItem + from ._models_py3 import KeyListResult from ._models_py3 import KeyOperationResult from ._models_py3 import KeyOperationsParameters from ._models_py3 import KeyProperties @@ -70,10 +78,12 @@ from ._models_py3 import SasDefinitionBundle from ._models_py3 import SasDefinitionCreateParameters from ._models_py3 import SasDefinitionItem + from ._models_py3 import SasDefinitionListResult from ._models_py3 import SasDefinitionUpdateParameters from ._models_py3 import SecretAttributes from ._models_py3 import SecretBundle from ._models_py3 import SecretItem + from ._models_py3 import SecretListResult from ._models_py3 import SecretProperties from ._models_py3 import SecretRestoreParameters from ._models_py3 import SecretSetParameters @@ -84,6 +94,7 @@ from ._models_py3 import StorageAccountRegenerteKeyParameters from ._models_py3 import StorageAccountUpdateParameters from ._models_py3 import StorageBundle + from ._models_py3 import StorageListResult from ._models_py3 import StorageRestoreParameters from ._models_py3 import SubjectAlternativeNames from ._models_py3 import Trigger @@ -101,9 +112,11 @@ from ._models import CertificateCreateParameters from ._models import CertificateImportParameters from ._models import CertificateIssuerItem + from ._models import CertificateIssuerListResult from ._models import CertificateIssuerSetParameters from ._models import CertificateIssuerUpdateParameters from ._models import CertificateItem + from ._models import CertificateListResult from ._models import CertificateMergeParameters from ._models import CertificateOperation from ._models import CertificateOperationUpdateParameter @@ -114,14 +127,19 @@ from ._models import Contacts from ._models import DeletedCertificateBundle from ._models import DeletedCertificateItem + from ._models import DeletedCertificateListResult from ._models import DeletedKeyBundle from ._models import DeletedKeyItem + from ._models import DeletedKeyListResult from ._models import DeletedSasDefinitionBundle from ._models import DeletedSasDefinitionItem + from ._models import DeletedSasDefinitionListResult from ._models import DeletedSecretBundle from ._models import DeletedSecretItem + from ._models import DeletedSecretListResult from ._models import DeletedStorageAccountItem from ._models import DeletedStorageBundle + from ._models import DeletedStorageListResult from ._models import Error from ._models import IssuerAttributes from ._models import IssuerBundle @@ -133,6 +151,7 @@ from ._models import KeyCreateParameters from ._models import KeyImportParameters from ._models import KeyItem + from ._models import KeyListResult from ._models import KeyOperationResult from ._models import KeyOperationsParameters from ._models import KeyProperties @@ -149,10 +168,12 @@ from ._models import SasDefinitionBundle from ._models import SasDefinitionCreateParameters from ._models import SasDefinitionItem + from ._models import SasDefinitionListResult from ._models import SasDefinitionUpdateParameters from ._models import SecretAttributes from ._models import SecretBundle from ._models import SecretItem + from ._models import SecretListResult from ._models import SecretProperties from ._models import SecretRestoreParameters from ._models import SecretSetParameters @@ -163,21 +184,11 @@ from ._models import StorageAccountRegenerteKeyParameters from ._models import StorageAccountUpdateParameters from ._models import StorageBundle + from ._models import StorageListResult from ._models import StorageRestoreParameters from ._models import SubjectAlternativeNames from ._models import Trigger from ._models import X509CertificateProperties -from ._paged_models import CertificateIssuerItemPaged -from ._paged_models import CertificateItemPaged -from ._paged_models import DeletedCertificateItemPaged -from ._paged_models import DeletedKeyItemPaged -from ._paged_models import DeletedSasDefinitionItemPaged -from ._paged_models import DeletedSecretItemPaged -from ._paged_models import DeletedStorageAccountItemPaged -from ._paged_models import KeyItemPaged -from ._paged_models import SasDefinitionItemPaged -from ._paged_models import SecretItemPaged -from ._paged_models import StorageAccountItemPaged from ._key_vault_client_enums import ( JsonWebKeyType, JsonWebKeyCurveName, @@ -203,9 +214,11 @@ 'CertificateCreateParameters', 'CertificateImportParameters', 'CertificateIssuerItem', + 'CertificateIssuerListResult', 'CertificateIssuerSetParameters', 'CertificateIssuerUpdateParameters', 'CertificateItem', + 'CertificateListResult', 'CertificateMergeParameters', 'CertificateOperation', 'CertificateOperationUpdateParameter', @@ -216,14 +229,19 @@ 'Contacts', 'DeletedCertificateBundle', 'DeletedCertificateItem', + 'DeletedCertificateListResult', 'DeletedKeyBundle', 'DeletedKeyItem', + 'DeletedKeyListResult', 'DeletedSasDefinitionBundle', 'DeletedSasDefinitionItem', + 'DeletedSasDefinitionListResult', 'DeletedSecretBundle', 'DeletedSecretItem', + 'DeletedSecretListResult', 'DeletedStorageAccountItem', 'DeletedStorageBundle', + 'DeletedStorageListResult', 'Error', 'IssuerAttributes', 'IssuerBundle', @@ -235,6 +253,7 @@ 'KeyCreateParameters', 'KeyImportParameters', 'KeyItem', + 'KeyListResult', 'KeyOperationResult', 'KeyOperationsParameters', 'KeyProperties', @@ -251,10 +270,12 @@ 'SasDefinitionBundle', 'SasDefinitionCreateParameters', 'SasDefinitionItem', + 'SasDefinitionListResult', 'SasDefinitionUpdateParameters', 'SecretAttributes', 'SecretBundle', 'SecretItem', + 'SecretListResult', 'SecretProperties', 'SecretRestoreParameters', 'SecretSetParameters', @@ -265,21 +286,11 @@ 'StorageAccountRegenerteKeyParameters', 'StorageAccountUpdateParameters', 'StorageBundle', + 'StorageListResult', 'StorageRestoreParameters', 'SubjectAlternativeNames', 'Trigger', 'X509CertificateProperties', - 'KeyItemPaged', - 'DeletedKeyItemPaged', - 'SecretItemPaged', - 'DeletedSecretItemPaged', - 'CertificateItemPaged', - 'CertificateIssuerItemPaged', - 'DeletedCertificateItemPaged', - 'StorageAccountItemPaged', - 'DeletedStorageAccountItemPaged', - 'SasDefinitionItemPaged', - 'DeletedSasDefinitionItemPaged', 'JsonWebKeyType', 'JsonWebKeyCurveName', 'DeletionRecoveryLevel', diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py index e02ddd417cdb..24dfe4beb6a9 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py @@ -385,6 +385,36 @@ def __init__(self, **kwargs): self.provider = kwargs.get('provider', None) +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -479,6 +509,35 @@ def __init__(self, **kwargs): self.x509_thumbprint = kwargs.get('x509_thumbprint', None) +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -867,6 +926,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: list[~azure.keyvault.v7_0.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -1037,6 +1125,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v7_0.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionBundle(Model): """A SAS definition bundle consists of key vault SAS definition details plus its attributes. @@ -1251,6 +1368,36 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSasDefinitionListResult(Model): + """The deleted SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted SAS + definitions in the vault along with a link to the next page of deleted sas + definitions + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + :ivar next_link: The URL to get the next set of deleted SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1452,6 +1599,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageAccountItem(Model): """The storage account item containing storage account metadata. @@ -1662,6 +1838,37 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedStorageListResult(Model): + """The deleted storage account list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted storage + accounts in the vault along with a link to the next page of deleted + storage accounts + :vartype value: + list[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + :ivar next_link: The URL to get the next set of deleted storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedStorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedStorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -2023,6 +2230,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v7_0.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2451,6 +2687,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v7_0.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2534,6 +2799,35 @@ def __init__(self, **kwargs): self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v7_0.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2779,6 +3073,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: list[~azure.keyvault.v7_0.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageRestoreParameters(Model): """The secret restore parameters. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py index 1f394c8f5f38..52f4aa981815 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py @@ -385,6 +385,36 @@ def __init__(self, *, id: str=None, provider: str=None, **kwargs) -> None: self.provider = provider +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -479,6 +509,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.x509_thumbprint = x509_thumbprint +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -867,6 +926,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: list[~azure.keyvault.v7_0.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -1037,6 +1125,35 @@ def __init__(self, *, kid: str=None, attributes=None, tags=None, recovery_id: st self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v7_0.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionBundle(Model): """A SAS definition bundle consists of key vault SAS definition details plus its attributes. @@ -1251,6 +1368,36 @@ def __init__(self, *, recovery_id: str=None, **kwargs) -> None: self.deleted_date = None +class DeletedSasDefinitionListResult(Model): + """The deleted SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted SAS + definitions in the vault along with a link to the next page of deleted sas + definitions + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + :ivar next_link: The URL to get the next set of deleted SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1452,6 +1599,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, content_type: st self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageAccountItem(Model): """The storage account item containing storage account metadata. @@ -1662,6 +1838,37 @@ def __init__(self, *, recovery_id: str=None, **kwargs) -> None: self.deleted_date = None +class DeletedStorageListResult(Model): + """The deleted storage account list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted storage + accounts in the vault along with a link to the next page of deleted + storage accounts + :vartype value: + list[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + :ivar next_link: The URL to get the next set of deleted storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedStorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedStorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -2023,6 +2230,35 @@ def __init__(self, *, key, hsm: bool=None, key_attributes=None, tags=None, **kwa self.tags = tags +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v7_0.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2451,6 +2687,35 @@ def __init__(self, *, template_uri: str, sas_type, validity_period: str, sas_def self.tags = tags +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v7_0.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2534,6 +2799,35 @@ def __init__(self, *, enabled: bool=None, not_before=None, expires=None, **kwarg self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v7_0.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2779,6 +3073,35 @@ def __init__(self, *, active_key_name: str=None, auto_regenerate_key: bool=None, self.tags = tags +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: list[~azure.keyvault.v7_0.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageRestoreParameters(Model): """The secret restore parameters. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_paged_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_paged_models.py deleted file mode 100644 index 0fbf874da2a7..000000000000 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_paged_models.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from azure.core.paging import Paged - - -class KeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`KeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[KeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(KeyItemPaged, self).__init__(*args, **kwargs) -class DeletedKeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedKeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedKeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedKeyItemPaged, self).__init__(*args, **kwargs) -class SecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SecretItemPaged, self).__init__(*args, **kwargs) -class DeletedSecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSecretItemPaged, self).__init__(*args, **kwargs) -class CertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateItemPaged, self).__init__(*args, **kwargs) -class CertificateIssuerItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateIssuerItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateIssuerItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateIssuerItemPaged, self).__init__(*args, **kwargs) -class DeletedCertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedCertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedCertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedCertificateItemPaged, self).__init__(*args, **kwargs) -class StorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`StorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(StorageAccountItemPaged, self).__init__(*args, **kwargs) -class DeletedStorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedStorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedStorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedStorageAccountItemPaged, self).__init__(*args, **kwargs) -class SasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SasDefinitionItemPaged, self).__init__(*args, **kwargs) -class DeletedSasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSasDefinitionItemPaged, self).__init__(*args, **kwargs) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index c0e15566f02e..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.paging import ItemPaged from .. import models import uuid @@ -77,8 +78,6 @@ def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops=None, 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 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(parameters, 'KeyCreateParameters') @@ -153,8 +152,6 @@ def import_key(self, vault_base_url, key_name, key, hsm=None, key_attributes=Non 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 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(parameters, 'KeyImportParameters') @@ -217,8 +214,6 @@ def delete_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -293,8 +288,6 @@ def update_key(self, vault_base_url, key_name, key_version, key_ops=None, key_at 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 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(parameters, 'KeyUpdateParameters') @@ -359,8 +352,6 @@ def get_key(self, vault_base_url, key_name, key_version, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -398,11 +389,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -411,46 +403,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -472,11 +461,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -484,46 +474,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_keys.metadata = {'url': '/keys'} def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -575,8 +562,6 @@ def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -648,8 +633,6 @@ def restore_key(self, vault_base_url, key_bundle_backup, cls=None, **kwargs): 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 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(parameters, 'KeyRestoreParameters') @@ -730,8 +713,6 @@ def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -809,8 +790,6 @@ def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -886,8 +865,6 @@ def sign(self, vault_base_url, key_name, key_version, algorithm, value, cls=None 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 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(parameters, 'KeySignParameters') @@ -969,8 +946,6 @@ def verify(self, vault_base_url, key_name, key_version, algorithm, digest, signa 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 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(parameters, 'KeyVerifyParameters') @@ -1048,8 +1023,6 @@ def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cls= 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 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(parameters, 'KeyOperationsParameters') @@ -1125,8 +1098,6 @@ def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cl 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 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(parameters, 'KeyOperationsParameters') @@ -1170,11 +1141,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v7_0.models.DeletedKeyItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1182,46 +1154,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -1262,8 +1231,6 @@ def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1321,8 +1288,6 @@ def purge_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1378,8 +1343,6 @@ def recover_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1449,8 +1412,6 @@ def set_secret(self, vault_base_url, secret_name, value, tags=None, content_type 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 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(parameters, 'SecretSetParameters') @@ -1511,8 +1472,6 @@ def delete_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1585,8 +1544,6 @@ def update_secret(self, vault_base_url, secret_name, secret_version, content_typ 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 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(parameters, 'SecretUpdateParameters') @@ -1649,8 +1606,6 @@ def get_secret(self, vault_base_url, secret_name, secret_version, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1688,11 +1643,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1700,46 +1656,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1760,11 +1713,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1773,46 +1727,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1831,11 +1782,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSecretItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1843,46 +1795,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): @@ -1922,8 +1871,6 @@ def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1981,8 +1928,6 @@ def purge_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2035,8 +1980,6 @@ def recover_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2094,8 +2037,6 @@ def backup_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2155,8 +2096,6 @@ def restore_secret(self, vault_base_url, secret_bundle_backup, cls=None, **kwarg 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 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(parameters, 'SecretRestoreParameters') @@ -2199,11 +2138,12 @@ def get_certificates( :type include_pending: bool :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2211,9 +2151,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -2222,37 +2159,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificates.metadata = {'url': '/certificates'} def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -2293,8 +2230,6 @@ def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2353,8 +2288,6 @@ def set_certificate_contacts(self, vault_base_url, contact_list=None, cls=None, 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 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(contacts, 'Contacts') @@ -2412,8 +2345,6 @@ def get_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2467,8 +2398,6 @@ def delete_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2505,11 +2434,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v7_0.models.CertificateIssuerItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2517,46 +2447,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, cls=None, **kwargs): @@ -2609,8 +2536,6 @@ def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credenti 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2684,8 +2609,6 @@ def update_certificate_issuer(self, vault_base_url, issuer_name, provider=None, 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2746,8 +2669,6 @@ def get_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2805,8 +2726,6 @@ def delete_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2876,8 +2795,6 @@ def create_certificate(self, vault_base_url, certificate_name, certificate_polic 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 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(parameters, 'CertificateCreateParameters') @@ -2960,8 +2877,6 @@ def import_certificate(self, vault_base_url, certificate_name, base64_encoded_ce 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 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(parameters, 'CertificateImportParameters') @@ -3003,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3016,46 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3096,8 +3009,6 @@ def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3159,8 +3070,6 @@ def update_certificate_policy(self, vault_base_url, certificate_name, certificat 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 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(certificate_policy, 'CertificatePolicy') @@ -3238,8 +3147,6 @@ def update_certificate(self, vault_base_url, certificate_name, certificate_versi 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 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(parameters, 'CertificateUpdateParameters') @@ -3303,8 +3210,6 @@ def get_certificate(self, vault_base_url, certificate_name, certificate_version, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3367,8 +3272,6 @@ def update_certificate_operation(self, vault_base_url, certificate_name, cancell 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3428,8 +3331,6 @@ def get_certificate_operation(self, vault_base_url, certificate_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3487,8 +3388,6 @@ def delete_certificate_operation(self, vault_base_url, certificate_name, cls=Non header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3560,8 +3459,6 @@ def merge_certificate(self, vault_base_url, certificate_name, x509_certificates, 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 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(parameters, 'CertificateMergeParameters') @@ -3622,8 +3519,6 @@ def backup_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3683,8 +3578,6 @@ def restore_certificate(self, vault_base_url, certificate_bundle_backup, cls=Non 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 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(parameters, 'CertificateRestoreParameters') @@ -3730,11 +3623,12 @@ def get_deleted_certificates( :type include_pending: bool :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v7_0.models.DeletedCertificateItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3742,9 +3636,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -3753,37 +3644,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3824,8 +3715,6 @@ def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3883,8 +3772,6 @@ def purge_deleted_certificate(self, vault_base_url, certificate_name, cls=None, header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3940,8 +3827,6 @@ def recover_deleted_certificate(self, vault_base_url, certificate_name, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3975,11 +3860,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.StorageAccountItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3987,46 +3873,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_storage_accounts.metadata = {'url': '/storage'} def get_deleted_storage_accounts( @@ -4045,11 +3928,12 @@ def get_deleted_storage_accounts( :type maxresults: int :return: An iterator like instance of DeletedStorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.DeletedStorageAccountItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_storage_accounts.metadata['url'] @@ -4057,46 +3941,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedStorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedStorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_storage_accounts.metadata = {'url': '/deletedstorage'} def get_deleted_storage_account(self, vault_base_url, storage_account_name, cls=None, **kwargs): @@ -4136,8 +4017,6 @@ def get_deleted_storage_account(self, vault_base_url, storage_account_name, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4195,8 +4074,6 @@ def purge_deleted_storage_account(self, vault_base_url, storage_account_name, cl header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4249,8 +4126,6 @@ def recover_deleted_storage_account(self, vault_base_url, storage_account_name, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4307,8 +4182,6 @@ def backup_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4368,8 +4241,6 @@ def restore_storage_account(self, vault_base_url, storage_bundle_backup, cls=Non 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 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(parameters, 'StorageRestoreParameters') @@ -4427,8 +4298,6 @@ def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4483,8 +4352,6 @@ def get_storage_account(self, vault_base_url, storage_account_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4559,8 +4426,6 @@ def set_storage_account(self, vault_base_url, storage_account_name, resource_id, 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 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(parameters, 'StorageAccountCreateParameters') @@ -4636,8 +4501,6 @@ def update_storage_account(self, vault_base_url, storage_account_name, active_ke 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4700,8 +4563,6 @@ def regenerate_storage_account_key(self, vault_base_url, storage_account_name, k 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4740,11 +4601,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.SasDefinitionItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4753,46 +4615,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def get_deleted_sas_definitions( @@ -4814,11 +4673,12 @@ def get_deleted_sas_definitions( :type maxresults: int :return: An iterator like instance of DeletedSasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSasDefinitionItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_sas_definitions.metadata['url'] @@ -4827,46 +4687,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_sas_definitions.metadata = {'url': '/deletedstorage/{storage-account-name}/sas'} def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, cls=None, **kwargs): @@ -4909,8 +4766,6 @@ def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_d header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4971,8 +4826,6 @@ def recover_deleted_sas_definition(self, vault_base_url, storage_account_name, s header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -5030,8 +4883,6 @@ def delete_sas_definition(self, vault_base_url, storage_account_name, sas_defini header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -5089,8 +4940,6 @@ def get_sas_definition(self, vault_base_url, storage_account_name, sas_definitio header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5168,8 +5017,6 @@ def set_sas_definition(self, vault_base_url, storage_account_name, sas_definitio 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 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(parameters, 'SasDefinitionCreateParameters') @@ -5250,8 +5097,6 @@ def update_sas_definition(self, vault_base_url, storage_account_name, sas_defini 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 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(parameters, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 56148a5820ef..0714edabf420 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -2,8 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from typing import Any, Callable, Mapping, TYPE_CHECKING -from azure.core.async_paging import AsyncPagedMixin +from typing import Any, Callable, Mapping, AsyncIterator, TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy @@ -23,10 +22,10 @@ class AsyncPagingAdapter: - """For each item in an AsyncPagedMixin, returns the result of applying fn to that item. + """For each item in an AsyncIterator, returns the result of applying fn to that item. Python 3.6 added syntax that could replace this (yield within async for).""" - def __init__(self, pages: AsyncPagedMixin, fn: Callable[[Model], Any]) -> None: + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: self._pages = pages self._fn = fn diff --git a/sdk/keyvault/azure-keyvault-keys/tests/keys_vault_client_async.py b/sdk/keyvault/azure-keyvault-keys/tests/keys_vault_client_async.py index b95fd1aa7ad4..a09d581eb39a 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/keys_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/keys_vault_client_async.py @@ -3,7 +3,6 @@ # Licensed under the MIT License. # ------------------------------------ from typing import Any, Callable, Mapping, TYPE_CHECKING -from azure.core.async_paging import AsyncPagedMixin from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies import AsyncBearerTokenCredentialPolicy diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/key_vault_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/key_vault_client.py index afec64f70804..6221dd5e7bec 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/key_vault_client.py @@ -50,14 +50,14 @@ def get_configuration_class(api_version, aio=False): """ if api_version == V7_0_VERSION: if aio: - from .v7_0.aio import KeyVaultClientConfiguration as ImplConfig + from .v7_0.aio._configuration_async import KeyVaultClientConfiguration as ImplConfig else: - from .v7_0 import KeyVaultClientConfiguration as ImplConfig + from .v7_0._configuration import KeyVaultClientConfiguration as ImplConfig elif api_version == V2016_10_01_VERSION: if aio: - from .v2016_10_01.aio import KeyVaultClientConfiguration as ImplConfig + from .v2016_10_01.aio._configuration_async import KeyVaultClientConfiguration as ImplConfig else: - from .v2016_10_01 import KeyVaultClientConfiguration as ImplConfig + from .v2016_10_01._configuration import KeyVaultClientConfiguration as ImplConfig else: raise NotImplementedError("API version {} is not available".format(api_version)) return ImplConfig diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/__init__.py index d3fda25cc7ab..e913d4cf6c46 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/__init__.py @@ -9,9 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from ._configuration import KeyVaultClientConfiguration from ._key_vault_client import KeyVaultClient -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] from .version import VERSION diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_configuration.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_configuration.py index beb5eb930fa8..28cf75e3d2b4 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_configuration.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_configuration.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials @@ -45,4 +44,5 @@ def _configure(self, **kwargs): self.proxy_policy = policies.ProxyPolicy(**kwargs) self.logging_policy = policies.NetworkTraceLoggingPolicy(**kwargs) self.retry_policy = policies.RetryPolicy(**kwargs) + self.custom_hook_policy = policies.CustomHookPolicy(**kwargs) self.redirect_policy = policies.RedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_key_vault_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_key_vault_client.py index 0252b1e16a5e..e3ec609b6cd3 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_key_vault_client.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/__init__.py index ffece9055d9b..fb2e6c3866fd 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/__init__.py @@ -10,5 +10,4 @@ # -------------------------------------------------------------------------- from ._key_vault_client_async import KeyVaultClient -from ._configuration_async import KeyVaultClientConfiguration -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_configuration_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_configuration_async.py index 2144132ebe2d..a61d9eeff444 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_configuration_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_configuration_async.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py index 559d48da029a..ad4b8a97754f 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 28ea64adc6a6..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.async_paging import AsyncItemPaged, AsyncList from ... import models import uuid @@ -78,8 +79,6 @@ async def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops 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 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(parameters, 'KeyCreateParameters') @@ -154,8 +153,6 @@ async def import_key(self, vault_base_url, key_name, key, hsm=None, key_attribut 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 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(parameters, 'KeyImportParameters') @@ -218,8 +215,6 @@ async def delete_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -294,8 +289,6 @@ async def update_key(self, vault_base_url, key_name, key_version, key_ops=None, 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 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(parameters, 'KeyUpdateParameters') @@ -360,8 +353,6 @@ async def get_key(self, vault_base_url, key_name, key_version, *, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -399,11 +390,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -412,60 +404,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -487,11 +462,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -499,60 +475,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_keys.metadata = {'url': '/keys'} async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -604,8 +563,6 @@ async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -677,8 +634,6 @@ async def restore_key(self, vault_base_url, key_bundle_backup, *, cls=None, **kw 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 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(parameters, 'KeyRestoreParameters') @@ -759,8 +714,6 @@ async def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -838,8 +791,6 @@ async def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -915,8 +866,6 @@ async def sign(self, vault_base_url, key_name, key_version, algorithm, value, *, 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 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(parameters, 'KeySignParameters') @@ -998,8 +947,6 @@ async def verify(self, vault_base_url, key_name, key_version, algorithm, digest, 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 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(parameters, 'KeyVerifyParameters') @@ -1077,8 +1024,6 @@ async def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value 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 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(parameters, 'KeyOperationsParameters') @@ -1154,8 +1099,6 @@ async def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, val 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 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(parameters, 'KeyOperationsParameters') @@ -1199,11 +1142,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedKeyItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1211,60 +1155,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -1305,8 +1232,6 @@ async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs) header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1364,8 +1289,6 @@ async def purge_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwarg header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1421,8 +1344,6 @@ async def recover_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1493,8 +1414,6 @@ async def set_secret(self, vault_base_url, secret_name, value, tags=None, conten 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 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(parameters, 'SecretSetParameters') @@ -1555,8 +1474,6 @@ async def delete_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1630,8 +1547,6 @@ async def update_secret(self, vault_base_url, secret_name, secret_version, conte 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 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(parameters, 'SecretUpdateParameters') @@ -1694,8 +1609,6 @@ async def get_secret(self, vault_base_url, secret_name, secret_version, *, cls=N header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1733,11 +1646,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1745,60 +1659,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1819,11 +1716,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1832,60 +1730,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1904,11 +1785,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedSecretItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1916,60 +1798,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs): @@ -2009,8 +1874,6 @@ async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2068,8 +1931,6 @@ async def purge_deleted_secret(self, vault_base_url, secret_name, *, cls=None, * header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2122,8 +1983,6 @@ async def recover_deleted_secret(self, vault_base_url, secret_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2181,8 +2040,6 @@ async def backup_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2242,8 +2099,6 @@ async def restore_secret(self, vault_base_url, secret_bundle_backup, *, cls=None 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 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(parameters, 'SecretRestoreParameters') @@ -2283,11 +2138,12 @@ def get_certificates( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2295,60 +2151,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificates.metadata = {'url': '/certificates'} async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -2389,8 +2228,6 @@ async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2449,8 +2286,6 @@ async def set_certificate_contacts(self, vault_base_url, contact_list=None, *, c 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 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(contacts, 'Contacts') @@ -2508,8 +2343,6 @@ async def get_certificate_contacts(self, vault_base_url, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2563,8 +2396,6 @@ async def delete_certificate_contacts(self, vault_base_url, *, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2601,11 +2432,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateIssuerItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2613,60 +2445,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, *, cls=None, **kwargs): @@ -2720,8 +2535,6 @@ async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, cr 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2796,8 +2609,6 @@ async def update_certificate_issuer(self, vault_base_url, issuer_name, provider= 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2858,8 +2669,6 @@ async def get_certificate_issuer(self, vault_base_url, issuer_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2917,8 +2726,6 @@ async def delete_certificate_issuer(self, vault_base_url, issuer_name, *, cls=No header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2988,8 +2795,6 @@ async def create_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateCreateParameters') @@ -3072,8 +2877,6 @@ async def import_certificate(self, vault_base_url, certificate_name, base64_enco 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 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(parameters, 'CertificateImportParameters') @@ -3115,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3128,60 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3222,8 +3009,6 @@ async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3285,8 +3070,6 @@ async def update_certificate_policy(self, vault_base_url, certificate_name, cert 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 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(certificate_policy, 'CertificatePolicy') @@ -3364,8 +3147,6 @@ async def update_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateUpdateParameters') @@ -3429,8 +3210,6 @@ async def get_certificate(self, vault_base_url, certificate_name, certificate_ve header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3493,8 +3272,6 @@ async def update_certificate_operation(self, vault_base_url, certificate_name, c 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3554,8 +3331,6 @@ async def get_certificate_operation(self, vault_base_url, certificate_name, *, c header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3613,8 +3388,6 @@ async def delete_certificate_operation(self, vault_base_url, certificate_name, * header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3686,8 +3459,6 @@ async def merge_certificate(self, vault_base_url, certificate_name, x509_certifi 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 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(parameters, 'CertificateMergeParameters') @@ -3730,11 +3501,12 @@ def get_deleted_certificates( :type maxresults: int :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedCertificateItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3742,60 +3514,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3836,8 +3591,6 @@ async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3895,8 +3648,6 @@ async def purge_deleted_certificate(self, vault_base_url, certificate_name, *, c header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3952,8 +3703,6 @@ async def recover_deleted_certificate(self, vault_base_url, certificate_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3987,11 +3736,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v2016_10_01.models.StorageAccountItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3999,60 +3749,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_storage_accounts.metadata = {'url': '/storage'} async def delete_storage_account(self, vault_base_url, storage_account_name, *, cls=None, **kwargs): @@ -4089,8 +3822,6 @@ async def delete_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4145,8 +3876,6 @@ async def get_storage_account(self, vault_base_url, storage_account_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4221,8 +3950,6 @@ async def set_storage_account(self, vault_base_url, storage_account_name, resour 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 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(parameters, 'StorageAccountCreateParameters') @@ -4298,8 +4025,6 @@ async def update_storage_account(self, vault_base_url, storage_account_name, act 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4362,8 +4087,6 @@ async def regenerate_storage_account_key(self, vault_base_url, storage_account_n 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4402,11 +4125,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v2016_10_01.models.SasDefinitionItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4415,60 +4139,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, *, cls=None, **kwargs): @@ -4508,8 +4215,6 @@ async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4567,8 +4272,6 @@ async def get_sas_definition(self, vault_base_url, storage_account_name, sas_def header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4639,8 +4342,6 @@ async def set_sas_definition(self, vault_base_url, storage_account_name, sas_def 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 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(parameters1, 'SasDefinitionCreateParameters') @@ -4714,8 +4415,6 @@ async def update_sas_definition(self, vault_base_url, storage_account_name, sas_ 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 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(parameters1, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/__init__.py index 76f4bf1ab9bc..6f134becdbd3 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/__init__.py @@ -20,9 +20,11 @@ from ._models_py3 import CertificateCreateParameters from ._models_py3 import CertificateImportParameters from ._models_py3 import CertificateIssuerItem + from ._models_py3 import CertificateIssuerListResult from ._models_py3 import CertificateIssuerSetParameters from ._models_py3 import CertificateIssuerUpdateParameters from ._models_py3 import CertificateItem + from ._models_py3 import CertificateListResult from ._models_py3 import CertificateMergeParameters from ._models_py3 import CertificateOperation from ._models_py3 import CertificateOperationUpdateParameter @@ -32,10 +34,13 @@ from ._models_py3 import Contacts from ._models_py3 import DeletedCertificateBundle from ._models_py3 import DeletedCertificateItem + from ._models_py3 import DeletedCertificateListResult from ._models_py3 import DeletedKeyBundle from ._models_py3 import DeletedKeyItem + from ._models_py3 import DeletedKeyListResult from ._models_py3 import DeletedSecretBundle from ._models_py3 import DeletedSecretItem + from ._models_py3 import DeletedSecretListResult from ._models_py3 import Error from ._models_py3 import IssuerAttributes from ._models_py3 import IssuerBundle @@ -47,6 +52,7 @@ from ._models_py3 import KeyCreateParameters from ._models_py3 import KeyImportParameters from ._models_py3 import KeyItem + from ._models_py3 import KeyListResult from ._models_py3 import KeyOperationResult from ._models_py3 import KeyOperationsParameters from ._models_py3 import KeyProperties @@ -63,10 +69,12 @@ from ._models_py3 import SasDefinitionBundle from ._models_py3 import SasDefinitionCreateParameters from ._models_py3 import SasDefinitionItem + from ._models_py3 import SasDefinitionListResult from ._models_py3 import SasDefinitionUpdateParameters from ._models_py3 import SecretAttributes from ._models_py3 import SecretBundle from ._models_py3 import SecretItem + from ._models_py3 import SecretListResult from ._models_py3 import SecretProperties from ._models_py3 import SecretRestoreParameters from ._models_py3 import SecretSetParameters @@ -77,6 +85,7 @@ from ._models_py3 import StorageAccountRegenerteKeyParameters from ._models_py3 import StorageAccountUpdateParameters from ._models_py3 import StorageBundle + from ._models_py3 import StorageListResult from ._models_py3 import SubjectAlternativeNames from ._models_py3 import Trigger from ._models_py3 import X509CertificateProperties @@ -91,9 +100,11 @@ from ._models import CertificateCreateParameters from ._models import CertificateImportParameters from ._models import CertificateIssuerItem + from ._models import CertificateIssuerListResult from ._models import CertificateIssuerSetParameters from ._models import CertificateIssuerUpdateParameters from ._models import CertificateItem + from ._models import CertificateListResult from ._models import CertificateMergeParameters from ._models import CertificateOperation from ._models import CertificateOperationUpdateParameter @@ -103,10 +114,13 @@ from ._models import Contacts from ._models import DeletedCertificateBundle from ._models import DeletedCertificateItem + from ._models import DeletedCertificateListResult from ._models import DeletedKeyBundle from ._models import DeletedKeyItem + from ._models import DeletedKeyListResult from ._models import DeletedSecretBundle from ._models import DeletedSecretItem + from ._models import DeletedSecretListResult from ._models import Error from ._models import IssuerAttributes from ._models import IssuerBundle @@ -118,6 +132,7 @@ from ._models import KeyCreateParameters from ._models import KeyImportParameters from ._models import KeyItem + from ._models import KeyListResult from ._models import KeyOperationResult from ._models import KeyOperationsParameters from ._models import KeyProperties @@ -134,10 +149,12 @@ from ._models import SasDefinitionBundle from ._models import SasDefinitionCreateParameters from ._models import SasDefinitionItem + from ._models import SasDefinitionListResult from ._models import SasDefinitionUpdateParameters from ._models import SecretAttributes from ._models import SecretBundle from ._models import SecretItem + from ._models import SecretListResult from ._models import SecretProperties from ._models import SecretRestoreParameters from ._models import SecretSetParameters @@ -148,18 +165,10 @@ from ._models import StorageAccountRegenerteKeyParameters from ._models import StorageAccountUpdateParameters from ._models import StorageBundle + from ._models import StorageListResult from ._models import SubjectAlternativeNames from ._models import Trigger from ._models import X509CertificateProperties -from ._paged_models import CertificateIssuerItemPaged -from ._paged_models import CertificateItemPaged -from ._paged_models import DeletedCertificateItemPaged -from ._paged_models import DeletedKeyItemPaged -from ._paged_models import DeletedSecretItemPaged -from ._paged_models import KeyItemPaged -from ._paged_models import SasDefinitionItemPaged -from ._paged_models import SecretItemPaged -from ._paged_models import StorageAccountItemPaged from ._key_vault_client_enums import ( JsonWebKeyType, JsonWebKeyCurveName, @@ -182,9 +191,11 @@ 'CertificateCreateParameters', 'CertificateImportParameters', 'CertificateIssuerItem', + 'CertificateIssuerListResult', 'CertificateIssuerSetParameters', 'CertificateIssuerUpdateParameters', 'CertificateItem', + 'CertificateListResult', 'CertificateMergeParameters', 'CertificateOperation', 'CertificateOperationUpdateParameter', @@ -194,10 +205,13 @@ 'Contacts', 'DeletedCertificateBundle', 'DeletedCertificateItem', + 'DeletedCertificateListResult', 'DeletedKeyBundle', 'DeletedKeyItem', + 'DeletedKeyListResult', 'DeletedSecretBundle', 'DeletedSecretItem', + 'DeletedSecretListResult', 'Error', 'IssuerAttributes', 'IssuerBundle', @@ -209,6 +223,7 @@ 'KeyCreateParameters', 'KeyImportParameters', 'KeyItem', + 'KeyListResult', 'KeyOperationResult', 'KeyOperationsParameters', 'KeyProperties', @@ -225,10 +240,12 @@ 'SasDefinitionBundle', 'SasDefinitionCreateParameters', 'SasDefinitionItem', + 'SasDefinitionListResult', 'SasDefinitionUpdateParameters', 'SecretAttributes', 'SecretBundle', 'SecretItem', + 'SecretListResult', 'SecretProperties', 'SecretRestoreParameters', 'SecretSetParameters', @@ -239,18 +256,10 @@ 'StorageAccountRegenerteKeyParameters', 'StorageAccountUpdateParameters', 'StorageBundle', + 'StorageListResult', 'SubjectAlternativeNames', 'Trigger', 'X509CertificateProperties', - 'KeyItemPaged', - 'DeletedKeyItemPaged', - 'SecretItemPaged', - 'DeletedSecretItemPaged', - 'CertificateItemPaged', - 'CertificateIssuerItemPaged', - 'DeletedCertificateItemPaged', - 'StorageAccountItemPaged', - 'SasDefinitionItemPaged', 'JsonWebKeyType', 'JsonWebKeyCurveName', 'DeletionRecoveryLevel', diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py index f9caaf92c16e..e918a167f2dd 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py @@ -341,6 +341,37 @@ def __init__(self, **kwargs): self.provider = kwargs.get('provider', None) +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -435,6 +466,35 @@ def __init__(self, **kwargs): self.x509_thumbprint = kwargs.get('x509_thumbprint', None) +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v2016_10_01.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -805,6 +865,36 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: + list[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -975,6 +1065,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1176,6 +1295,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -1531,6 +1679,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v2016_10_01.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2012,6 +2189,35 @@ def __init__(self, **kwargs): self.tags = None +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2084,6 +2290,35 @@ def __init__(self, **kwargs): self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2415,6 +2650,36 @@ def __init__(self, **kwargs): self.tags = None +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SubjectAlternativeNames(Model): """The subject alternate names of a X509 object. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py index 4920c195ef89..07d530b486f6 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py @@ -341,6 +341,37 @@ def __init__(self, *, id: str=None, provider: str=None, **kwargs) -> None: self.provider = provider +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -435,6 +466,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.x509_thumbprint = x509_thumbprint +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v2016_10_01.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -805,6 +865,36 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: + list[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -975,6 +1065,35 @@ def __init__(self, *, kid: str=None, attributes=None, tags=None, recovery_id: st self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1176,6 +1295,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, content_type: st self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -1531,6 +1679,35 @@ def __init__(self, *, key, hsm: bool=None, key_attributes=None, tags=None, **kwa self.tags = tags +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v2016_10_01.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2012,6 +2189,35 @@ def __init__(self, **kwargs) -> None: self.tags = None +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2084,6 +2290,35 @@ def __init__(self, *, enabled: bool=None, not_before=None, expires=None, **kwarg self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2415,6 +2650,36 @@ def __init__(self, **kwargs) -> None: self.tags = None +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SubjectAlternativeNames(Model): """The subject alternate names of a X509 object. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_paged_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_paged_models.py deleted file mode 100644 index e5ddd1d7edc4..000000000000 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_paged_models.py +++ /dev/null @@ -1,131 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from azure.core.paging import Paged - - -class KeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`KeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[KeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(KeyItemPaged, self).__init__(*args, **kwargs) -class DeletedKeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedKeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedKeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedKeyItemPaged, self).__init__(*args, **kwargs) -class SecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SecretItemPaged, self).__init__(*args, **kwargs) -class DeletedSecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSecretItemPaged, self).__init__(*args, **kwargs) -class CertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateItemPaged, self).__init__(*args, **kwargs) -class CertificateIssuerItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateIssuerItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateIssuerItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateIssuerItemPaged, self).__init__(*args, **kwargs) -class DeletedCertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedCertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedCertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedCertificateItemPaged, self).__init__(*args, **kwargs) -class StorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`StorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(StorageAccountItemPaged, self).__init__(*args, **kwargs) -class SasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SasDefinitionItemPaged, self).__init__(*args, **kwargs) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 40ad1ab95087..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.paging import ItemPaged from .. import models import uuid @@ -78,8 +79,6 @@ def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops=None, 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 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(parameters, 'KeyCreateParameters') @@ -154,8 +153,6 @@ def import_key(self, vault_base_url, key_name, key, hsm=None, key_attributes=Non 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 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(parameters, 'KeyImportParameters') @@ -218,8 +215,6 @@ def delete_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -294,8 +289,6 @@ def update_key(self, vault_base_url, key_name, key_version, key_ops=None, key_at 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 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(parameters, 'KeyUpdateParameters') @@ -360,8 +353,6 @@ def get_key(self, vault_base_url, key_name, key_version, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -399,11 +390,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -412,46 +404,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -473,11 +462,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -485,46 +475,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_keys.metadata = {'url': '/keys'} def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -576,8 +563,6 @@ def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -649,8 +634,6 @@ def restore_key(self, vault_base_url, key_bundle_backup, cls=None, **kwargs): 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 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(parameters, 'KeyRestoreParameters') @@ -731,8 +714,6 @@ def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -810,8 +791,6 @@ def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -887,8 +866,6 @@ def sign(self, vault_base_url, key_name, key_version, algorithm, value, cls=None 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 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(parameters, 'KeySignParameters') @@ -970,8 +947,6 @@ def verify(self, vault_base_url, key_name, key_version, algorithm, digest, signa 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 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(parameters, 'KeyVerifyParameters') @@ -1049,8 +1024,6 @@ def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cls= 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 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(parameters, 'KeyOperationsParameters') @@ -1126,8 +1099,6 @@ def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cl 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 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(parameters, 'KeyOperationsParameters') @@ -1171,11 +1142,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedKeyItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1183,46 +1155,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -1263,8 +1232,6 @@ def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1322,8 +1289,6 @@ def purge_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1379,8 +1344,6 @@ def recover_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1451,8 +1414,6 @@ def set_secret(self, vault_base_url, secret_name, value, tags=None, content_type 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 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(parameters, 'SecretSetParameters') @@ -1513,8 +1474,6 @@ def delete_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1588,8 +1547,6 @@ def update_secret(self, vault_base_url, secret_name, secret_version, content_typ 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 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(parameters, 'SecretUpdateParameters') @@ -1652,8 +1609,6 @@ def get_secret(self, vault_base_url, secret_name, secret_version, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1691,11 +1646,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1703,46 +1659,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1763,11 +1716,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1776,46 +1730,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1834,11 +1785,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedSecretItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1846,46 +1798,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): @@ -1925,8 +1874,6 @@ def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1984,8 +1931,6 @@ def purge_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2038,8 +1983,6 @@ def recover_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2097,8 +2040,6 @@ def backup_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2158,8 +2099,6 @@ def restore_secret(self, vault_base_url, secret_bundle_backup, cls=None, **kwarg 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 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(parameters, 'SecretRestoreParameters') @@ -2199,11 +2138,12 @@ def get_certificates( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2211,46 +2151,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificates.metadata = {'url': '/certificates'} def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -2291,8 +2228,6 @@ def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2351,8 +2286,6 @@ def set_certificate_contacts(self, vault_base_url, contact_list=None, cls=None, 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 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(contacts, 'Contacts') @@ -2410,8 +2343,6 @@ def get_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2465,8 +2396,6 @@ def delete_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2503,11 +2432,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateIssuerItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2515,46 +2445,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, cls=None, **kwargs): @@ -2608,8 +2535,6 @@ def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credenti 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2684,8 +2609,6 @@ def update_certificate_issuer(self, vault_base_url, issuer_name, provider=None, 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2746,8 +2669,6 @@ def get_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2805,8 +2726,6 @@ def delete_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2876,8 +2795,6 @@ def create_certificate(self, vault_base_url, certificate_name, certificate_polic 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 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(parameters, 'CertificateCreateParameters') @@ -2960,8 +2877,6 @@ def import_certificate(self, vault_base_url, certificate_name, base64_encoded_ce 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 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(parameters, 'CertificateImportParameters') @@ -3003,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3016,46 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3096,8 +3009,6 @@ def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3159,8 +3070,6 @@ def update_certificate_policy(self, vault_base_url, certificate_name, certificat 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 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(certificate_policy, 'CertificatePolicy') @@ -3238,8 +3147,6 @@ def update_certificate(self, vault_base_url, certificate_name, certificate_versi 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 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(parameters, 'CertificateUpdateParameters') @@ -3303,8 +3210,6 @@ def get_certificate(self, vault_base_url, certificate_name, certificate_version, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3367,8 +3272,6 @@ def update_certificate_operation(self, vault_base_url, certificate_name, cancell 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3428,8 +3331,6 @@ def get_certificate_operation(self, vault_base_url, certificate_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3487,8 +3388,6 @@ def delete_certificate_operation(self, vault_base_url, certificate_name, cls=Non header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3560,8 +3459,6 @@ def merge_certificate(self, vault_base_url, certificate_name, x509_certificates, 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 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(parameters, 'CertificateMergeParameters') @@ -3604,11 +3501,12 @@ def get_deleted_certificates( :type maxresults: int :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedCertificateItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3616,46 +3514,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3696,8 +3591,6 @@ def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3755,8 +3648,6 @@ def purge_deleted_certificate(self, vault_base_url, certificate_name, cls=None, header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3812,8 +3703,6 @@ def recover_deleted_certificate(self, vault_base_url, certificate_name, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3847,11 +3736,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v2016_10_01.models.StorageAccountItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3859,46 +3749,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_storage_accounts.metadata = {'url': '/storage'} def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, **kwargs): @@ -3935,8 +3822,6 @@ def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3991,8 +3876,6 @@ def get_storage_account(self, vault_base_url, storage_account_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4067,8 +3950,6 @@ def set_storage_account(self, vault_base_url, storage_account_name, resource_id, 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 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(parameters, 'StorageAccountCreateParameters') @@ -4144,8 +4025,6 @@ def update_storage_account(self, vault_base_url, storage_account_name, active_ke 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4208,8 +4087,6 @@ def regenerate_storage_account_key(self, vault_base_url, storage_account_name, k 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4248,11 +4125,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v2016_10_01.models.SasDefinitionItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4261,46 +4139,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def delete_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, cls=None, **kwargs): @@ -4340,8 +4215,6 @@ def delete_sas_definition(self, vault_base_url, storage_account_name, sas_defini header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4399,8 +4272,6 @@ def get_sas_definition(self, vault_base_url, storage_account_name, sas_definitio header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4471,8 +4342,6 @@ def set_sas_definition(self, vault_base_url, storage_account_name, sas_definitio 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 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(parameters1, 'SasDefinitionCreateParameters') @@ -4546,8 +4415,6 @@ def update_sas_definition(self, vault_base_url, storage_account_name, sas_defini 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 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(parameters1, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/__init__.py index d3fda25cc7ab..e913d4cf6c46 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/__init__.py @@ -9,9 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from ._configuration import KeyVaultClientConfiguration from ._key_vault_client import KeyVaultClient -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] from .version import VERSION diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_configuration.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_configuration.py index beb5eb930fa8..28cf75e3d2b4 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_configuration.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_configuration.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials @@ -45,4 +44,5 @@ def _configure(self, **kwargs): self.proxy_policy = policies.ProxyPolicy(**kwargs) self.logging_policy = policies.NetworkTraceLoggingPolicy(**kwargs) self.retry_policy = policies.RetryPolicy(**kwargs) + self.custom_hook_policy = policies.CustomHookPolicy(**kwargs) self.redirect_policy = policies.RedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_key_vault_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_key_vault_client.py index 699433682e60..a1a1eb19328b 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_key_vault_client.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/__init__.py index ffece9055d9b..fb2e6c3866fd 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/__init__.py @@ -10,5 +10,4 @@ # -------------------------------------------------------------------------- from ._key_vault_client_async import KeyVaultClient -from ._configuration_async import KeyVaultClientConfiguration -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_configuration_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_configuration_async.py index 2144132ebe2d..a61d9eeff444 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_configuration_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_configuration_async.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_key_vault_client_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_key_vault_client_async.py index 739ab6ea407d..482d6336ab1a 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_key_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_key_vault_client_async.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index a97144221c6a..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.async_paging import AsyncItemPaged, AsyncList from ... import models import uuid @@ -77,8 +78,6 @@ async def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops 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 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(parameters, 'KeyCreateParameters') @@ -153,8 +152,6 @@ async def import_key(self, vault_base_url, key_name, key, hsm=None, key_attribut 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 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(parameters, 'KeyImportParameters') @@ -217,8 +214,6 @@ async def delete_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -293,8 +288,6 @@ async def update_key(self, vault_base_url, key_name, key_version, key_ops=None, 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 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(parameters, 'KeyUpdateParameters') @@ -359,8 +352,6 @@ async def get_key(self, vault_base_url, key_name, key_version, *, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -398,11 +389,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -411,60 +403,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -486,11 +461,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -498,60 +474,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_keys.metadata = {'url': '/keys'} async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -603,8 +562,6 @@ async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -676,8 +633,6 @@ async def restore_key(self, vault_base_url, key_bundle_backup, *, cls=None, **kw 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 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(parameters, 'KeyRestoreParameters') @@ -758,8 +713,6 @@ async def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -837,8 +790,6 @@ async def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -914,8 +865,6 @@ async def sign(self, vault_base_url, key_name, key_version, algorithm, value, *, 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 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(parameters, 'KeySignParameters') @@ -997,8 +946,6 @@ async def verify(self, vault_base_url, key_name, key_version, algorithm, digest, 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 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(parameters, 'KeyVerifyParameters') @@ -1076,8 +1023,6 @@ async def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value 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 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(parameters, 'KeyOperationsParameters') @@ -1153,8 +1098,6 @@ async def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, val 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 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(parameters, 'KeyOperationsParameters') @@ -1198,11 +1141,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v7_0.models.DeletedKeyItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1210,60 +1154,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -1304,8 +1231,6 @@ async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs) header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1363,8 +1288,6 @@ async def purge_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwarg header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1420,8 +1343,6 @@ async def recover_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1491,8 +1412,6 @@ async def set_secret(self, vault_base_url, secret_name, value, tags=None, conten 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 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(parameters, 'SecretSetParameters') @@ -1553,8 +1472,6 @@ async def delete_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1627,8 +1544,6 @@ async def update_secret(self, vault_base_url, secret_name, secret_version, conte 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 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(parameters, 'SecretUpdateParameters') @@ -1691,8 +1606,6 @@ async def get_secret(self, vault_base_url, secret_name, secret_version, *, cls=N header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1730,11 +1643,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1742,60 +1656,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1816,11 +1713,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1829,60 +1727,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1901,11 +1782,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSecretItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1913,60 +1795,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs): @@ -2006,8 +1871,6 @@ async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2065,8 +1928,6 @@ async def purge_deleted_secret(self, vault_base_url, secret_name, *, cls=None, * header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2119,8 +1980,6 @@ async def recover_deleted_secret(self, vault_base_url, secret_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2178,8 +2037,6 @@ async def backup_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2239,8 +2096,6 @@ async def restore_secret(self, vault_base_url, secret_bundle_backup, *, cls=None 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 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(parameters, 'SecretRestoreParameters') @@ -2283,11 +2138,12 @@ def get_certificates( :type include_pending: bool :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2295,9 +2151,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -2306,51 +2159,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificates.metadata = {'url': '/certificates'} async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -2391,8 +2230,6 @@ async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2451,8 +2288,6 @@ async def set_certificate_contacts(self, vault_base_url, contact_list=None, *, c 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 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(contacts, 'Contacts') @@ -2510,8 +2345,6 @@ async def get_certificate_contacts(self, vault_base_url, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2565,8 +2398,6 @@ async def delete_certificate_contacts(self, vault_base_url, *, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2603,11 +2434,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v7_0.models.CertificateIssuerItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2615,60 +2447,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, *, cls=None, **kwargs): @@ -2721,8 +2536,6 @@ async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, cr 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2796,8 +2609,6 @@ async def update_certificate_issuer(self, vault_base_url, issuer_name, provider= 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2858,8 +2669,6 @@ async def get_certificate_issuer(self, vault_base_url, issuer_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2917,8 +2726,6 @@ async def delete_certificate_issuer(self, vault_base_url, issuer_name, *, cls=No header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2988,8 +2795,6 @@ async def create_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateCreateParameters') @@ -3072,8 +2877,6 @@ async def import_certificate(self, vault_base_url, certificate_name, base64_enco 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 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(parameters, 'CertificateImportParameters') @@ -3115,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3128,60 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3222,8 +3009,6 @@ async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3285,8 +3070,6 @@ async def update_certificate_policy(self, vault_base_url, certificate_name, cert 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 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(certificate_policy, 'CertificatePolicy') @@ -3364,8 +3147,6 @@ async def update_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateUpdateParameters') @@ -3429,8 +3210,6 @@ async def get_certificate(self, vault_base_url, certificate_name, certificate_ve header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3493,8 +3272,6 @@ async def update_certificate_operation(self, vault_base_url, certificate_name, c 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3554,8 +3331,6 @@ async def get_certificate_operation(self, vault_base_url, certificate_name, *, c header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3613,8 +3388,6 @@ async def delete_certificate_operation(self, vault_base_url, certificate_name, * header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3686,8 +3459,6 @@ async def merge_certificate(self, vault_base_url, certificate_name, x509_certifi 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 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(parameters, 'CertificateMergeParameters') @@ -3748,8 +3519,6 @@ async def backup_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3809,8 +3578,6 @@ async def restore_certificate(self, vault_base_url, certificate_bundle_backup, * 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 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(parameters, 'CertificateRestoreParameters') @@ -3856,11 +3623,12 @@ def get_deleted_certificates( :type include_pending: bool :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v7_0.models.DeletedCertificateItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3868,9 +3636,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -3879,51 +3644,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3964,8 +3715,6 @@ async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4023,8 +3772,6 @@ async def purge_deleted_certificate(self, vault_base_url, certificate_name, *, c header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4080,8 +3827,6 @@ async def recover_deleted_certificate(self, vault_base_url, certificate_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4115,11 +3860,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.StorageAccountItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -4127,60 +3873,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_storage_accounts.metadata = {'url': '/storage'} def get_deleted_storage_accounts( @@ -4199,11 +3928,12 @@ def get_deleted_storage_accounts( :type maxresults: int :return: An iterator like instance of DeletedStorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.DeletedStorageAccountItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_storage_accounts.metadata['url'] @@ -4211,60 +3941,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('DeletedStorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedStorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_storage_accounts.metadata = {'url': '/deletedstorage'} async def get_deleted_storage_account(self, vault_base_url, storage_account_name, *, cls=None, **kwargs): @@ -4304,8 +4017,6 @@ async def get_deleted_storage_account(self, vault_base_url, storage_account_name header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4363,8 +4074,6 @@ async def purge_deleted_storage_account(self, vault_base_url, storage_account_na header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4417,8 +4126,6 @@ async def recover_deleted_storage_account(self, vault_base_url, storage_account_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4475,8 +4182,6 @@ async def backup_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4536,8 +4241,6 @@ async def restore_storage_account(self, vault_base_url, storage_bundle_backup, * 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 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(parameters, 'StorageRestoreParameters') @@ -4595,8 +4298,6 @@ async def delete_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4651,8 +4352,6 @@ async def get_storage_account(self, vault_base_url, storage_account_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4727,8 +4426,6 @@ async def set_storage_account(self, vault_base_url, storage_account_name, resour 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 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(parameters, 'StorageAccountCreateParameters') @@ -4804,8 +4501,6 @@ async def update_storage_account(self, vault_base_url, storage_account_name, act 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4868,8 +4563,6 @@ async def regenerate_storage_account_key(self, vault_base_url, storage_account_n 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4908,11 +4601,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.SasDefinitionItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4921,60 +4615,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def get_deleted_sas_definitions( @@ -4996,11 +4673,12 @@ def get_deleted_sas_definitions( :type maxresults: int :return: An iterator like instance of DeletedSasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSasDefinitionItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_sas_definitions.metadata['url'] @@ -5009,60 +4687,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_sas_definitions.metadata = {'url': '/deletedstorage/{storage-account-name}/sas'} async def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, *, cls=None, **kwargs): @@ -5105,8 +4766,6 @@ async def get_deleted_sas_definition(self, vault_base_url, storage_account_name, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5167,8 +4826,6 @@ async def recover_deleted_sas_definition(self, vault_base_url, storage_account_n header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -5226,8 +4883,6 @@ async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -5285,8 +4940,6 @@ async def get_sas_definition(self, vault_base_url, storage_account_name, sas_def header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5364,8 +5017,6 @@ async def set_sas_definition(self, vault_base_url, storage_account_name, sas_def 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 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(parameters, 'SasDefinitionCreateParameters') @@ -5446,8 +5097,6 @@ async def update_sas_definition(self, vault_base_url, storage_account_name, sas_ 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 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(parameters, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/__init__.py index 4debdd0f3d13..5e72f49a73f6 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/__init__.py @@ -22,9 +22,11 @@ from ._models_py3 import CertificateCreateParameters from ._models_py3 import CertificateImportParameters from ._models_py3 import CertificateIssuerItem + from ._models_py3 import CertificateIssuerListResult from ._models_py3 import CertificateIssuerSetParameters from ._models_py3 import CertificateIssuerUpdateParameters from ._models_py3 import CertificateItem + from ._models_py3 import CertificateListResult from ._models_py3 import CertificateMergeParameters from ._models_py3 import CertificateOperation from ._models_py3 import CertificateOperationUpdateParameter @@ -35,14 +37,19 @@ from ._models_py3 import Contacts from ._models_py3 import DeletedCertificateBundle from ._models_py3 import DeletedCertificateItem + from ._models_py3 import DeletedCertificateListResult from ._models_py3 import DeletedKeyBundle from ._models_py3 import DeletedKeyItem + from ._models_py3 import DeletedKeyListResult from ._models_py3 import DeletedSasDefinitionBundle from ._models_py3 import DeletedSasDefinitionItem + from ._models_py3 import DeletedSasDefinitionListResult from ._models_py3 import DeletedSecretBundle from ._models_py3 import DeletedSecretItem + from ._models_py3 import DeletedSecretListResult from ._models_py3 import DeletedStorageAccountItem from ._models_py3 import DeletedStorageBundle + from ._models_py3 import DeletedStorageListResult from ._models_py3 import Error from ._models_py3 import IssuerAttributes from ._models_py3 import IssuerBundle @@ -54,6 +61,7 @@ from ._models_py3 import KeyCreateParameters from ._models_py3 import KeyImportParameters from ._models_py3 import KeyItem + from ._models_py3 import KeyListResult from ._models_py3 import KeyOperationResult from ._models_py3 import KeyOperationsParameters from ._models_py3 import KeyProperties @@ -70,10 +78,12 @@ from ._models_py3 import SasDefinitionBundle from ._models_py3 import SasDefinitionCreateParameters from ._models_py3 import SasDefinitionItem + from ._models_py3 import SasDefinitionListResult from ._models_py3 import SasDefinitionUpdateParameters from ._models_py3 import SecretAttributes from ._models_py3 import SecretBundle from ._models_py3 import SecretItem + from ._models_py3 import SecretListResult from ._models_py3 import SecretProperties from ._models_py3 import SecretRestoreParameters from ._models_py3 import SecretSetParameters @@ -84,6 +94,7 @@ from ._models_py3 import StorageAccountRegenerteKeyParameters from ._models_py3 import StorageAccountUpdateParameters from ._models_py3 import StorageBundle + from ._models_py3 import StorageListResult from ._models_py3 import StorageRestoreParameters from ._models_py3 import SubjectAlternativeNames from ._models_py3 import Trigger @@ -101,9 +112,11 @@ from ._models import CertificateCreateParameters from ._models import CertificateImportParameters from ._models import CertificateIssuerItem + from ._models import CertificateIssuerListResult from ._models import CertificateIssuerSetParameters from ._models import CertificateIssuerUpdateParameters from ._models import CertificateItem + from ._models import CertificateListResult from ._models import CertificateMergeParameters from ._models import CertificateOperation from ._models import CertificateOperationUpdateParameter @@ -114,14 +127,19 @@ from ._models import Contacts from ._models import DeletedCertificateBundle from ._models import DeletedCertificateItem + from ._models import DeletedCertificateListResult from ._models import DeletedKeyBundle from ._models import DeletedKeyItem + from ._models import DeletedKeyListResult from ._models import DeletedSasDefinitionBundle from ._models import DeletedSasDefinitionItem + from ._models import DeletedSasDefinitionListResult from ._models import DeletedSecretBundle from ._models import DeletedSecretItem + from ._models import DeletedSecretListResult from ._models import DeletedStorageAccountItem from ._models import DeletedStorageBundle + from ._models import DeletedStorageListResult from ._models import Error from ._models import IssuerAttributes from ._models import IssuerBundle @@ -133,6 +151,7 @@ from ._models import KeyCreateParameters from ._models import KeyImportParameters from ._models import KeyItem + from ._models import KeyListResult from ._models import KeyOperationResult from ._models import KeyOperationsParameters from ._models import KeyProperties @@ -149,10 +168,12 @@ from ._models import SasDefinitionBundle from ._models import SasDefinitionCreateParameters from ._models import SasDefinitionItem + from ._models import SasDefinitionListResult from ._models import SasDefinitionUpdateParameters from ._models import SecretAttributes from ._models import SecretBundle from ._models import SecretItem + from ._models import SecretListResult from ._models import SecretProperties from ._models import SecretRestoreParameters from ._models import SecretSetParameters @@ -163,21 +184,11 @@ from ._models import StorageAccountRegenerteKeyParameters from ._models import StorageAccountUpdateParameters from ._models import StorageBundle + from ._models import StorageListResult from ._models import StorageRestoreParameters from ._models import SubjectAlternativeNames from ._models import Trigger from ._models import X509CertificateProperties -from ._paged_models import CertificateIssuerItemPaged -from ._paged_models import CertificateItemPaged -from ._paged_models import DeletedCertificateItemPaged -from ._paged_models import DeletedKeyItemPaged -from ._paged_models import DeletedSasDefinitionItemPaged -from ._paged_models import DeletedSecretItemPaged -from ._paged_models import DeletedStorageAccountItemPaged -from ._paged_models import KeyItemPaged -from ._paged_models import SasDefinitionItemPaged -from ._paged_models import SecretItemPaged -from ._paged_models import StorageAccountItemPaged from ._key_vault_client_enums import ( JsonWebKeyType, JsonWebKeyCurveName, @@ -203,9 +214,11 @@ 'CertificateCreateParameters', 'CertificateImportParameters', 'CertificateIssuerItem', + 'CertificateIssuerListResult', 'CertificateIssuerSetParameters', 'CertificateIssuerUpdateParameters', 'CertificateItem', + 'CertificateListResult', 'CertificateMergeParameters', 'CertificateOperation', 'CertificateOperationUpdateParameter', @@ -216,14 +229,19 @@ 'Contacts', 'DeletedCertificateBundle', 'DeletedCertificateItem', + 'DeletedCertificateListResult', 'DeletedKeyBundle', 'DeletedKeyItem', + 'DeletedKeyListResult', 'DeletedSasDefinitionBundle', 'DeletedSasDefinitionItem', + 'DeletedSasDefinitionListResult', 'DeletedSecretBundle', 'DeletedSecretItem', + 'DeletedSecretListResult', 'DeletedStorageAccountItem', 'DeletedStorageBundle', + 'DeletedStorageListResult', 'Error', 'IssuerAttributes', 'IssuerBundle', @@ -235,6 +253,7 @@ 'KeyCreateParameters', 'KeyImportParameters', 'KeyItem', + 'KeyListResult', 'KeyOperationResult', 'KeyOperationsParameters', 'KeyProperties', @@ -251,10 +270,12 @@ 'SasDefinitionBundle', 'SasDefinitionCreateParameters', 'SasDefinitionItem', + 'SasDefinitionListResult', 'SasDefinitionUpdateParameters', 'SecretAttributes', 'SecretBundle', 'SecretItem', + 'SecretListResult', 'SecretProperties', 'SecretRestoreParameters', 'SecretSetParameters', @@ -265,21 +286,11 @@ 'StorageAccountRegenerteKeyParameters', 'StorageAccountUpdateParameters', 'StorageBundle', + 'StorageListResult', 'StorageRestoreParameters', 'SubjectAlternativeNames', 'Trigger', 'X509CertificateProperties', - 'KeyItemPaged', - 'DeletedKeyItemPaged', - 'SecretItemPaged', - 'DeletedSecretItemPaged', - 'CertificateItemPaged', - 'CertificateIssuerItemPaged', - 'DeletedCertificateItemPaged', - 'StorageAccountItemPaged', - 'DeletedStorageAccountItemPaged', - 'SasDefinitionItemPaged', - 'DeletedSasDefinitionItemPaged', 'JsonWebKeyType', 'JsonWebKeyCurveName', 'DeletionRecoveryLevel', diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py index e02ddd417cdb..24dfe4beb6a9 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py @@ -385,6 +385,36 @@ def __init__(self, **kwargs): self.provider = kwargs.get('provider', None) +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -479,6 +509,35 @@ def __init__(self, **kwargs): self.x509_thumbprint = kwargs.get('x509_thumbprint', None) +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -867,6 +926,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: list[~azure.keyvault.v7_0.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -1037,6 +1125,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v7_0.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionBundle(Model): """A SAS definition bundle consists of key vault SAS definition details plus its attributes. @@ -1251,6 +1368,36 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSasDefinitionListResult(Model): + """The deleted SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted SAS + definitions in the vault along with a link to the next page of deleted sas + definitions + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + :ivar next_link: The URL to get the next set of deleted SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1452,6 +1599,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageAccountItem(Model): """The storage account item containing storage account metadata. @@ -1662,6 +1838,37 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedStorageListResult(Model): + """The deleted storage account list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted storage + accounts in the vault along with a link to the next page of deleted + storage accounts + :vartype value: + list[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + :ivar next_link: The URL to get the next set of deleted storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedStorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedStorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -2023,6 +2230,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v7_0.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2451,6 +2687,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v7_0.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2534,6 +2799,35 @@ def __init__(self, **kwargs): self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v7_0.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2779,6 +3073,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: list[~azure.keyvault.v7_0.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageRestoreParameters(Model): """The secret restore parameters. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py index 1f394c8f5f38..52f4aa981815 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py @@ -385,6 +385,36 @@ def __init__(self, *, id: str=None, provider: str=None, **kwargs) -> None: self.provider = provider +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -479,6 +509,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.x509_thumbprint = x509_thumbprint +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -867,6 +926,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: list[~azure.keyvault.v7_0.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -1037,6 +1125,35 @@ def __init__(self, *, kid: str=None, attributes=None, tags=None, recovery_id: st self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v7_0.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionBundle(Model): """A SAS definition bundle consists of key vault SAS definition details plus its attributes. @@ -1251,6 +1368,36 @@ def __init__(self, *, recovery_id: str=None, **kwargs) -> None: self.deleted_date = None +class DeletedSasDefinitionListResult(Model): + """The deleted SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted SAS + definitions in the vault along with a link to the next page of deleted sas + definitions + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + :ivar next_link: The URL to get the next set of deleted SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1452,6 +1599,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, content_type: st self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageAccountItem(Model): """The storage account item containing storage account metadata. @@ -1662,6 +1838,37 @@ def __init__(self, *, recovery_id: str=None, **kwargs) -> None: self.deleted_date = None +class DeletedStorageListResult(Model): + """The deleted storage account list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted storage + accounts in the vault along with a link to the next page of deleted + storage accounts + :vartype value: + list[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + :ivar next_link: The URL to get the next set of deleted storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedStorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedStorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -2023,6 +2230,35 @@ def __init__(self, *, key, hsm: bool=None, key_attributes=None, tags=None, **kwa self.tags = tags +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v7_0.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2451,6 +2687,35 @@ def __init__(self, *, template_uri: str, sas_type, validity_period: str, sas_def self.tags = tags +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v7_0.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2534,6 +2799,35 @@ def __init__(self, *, enabled: bool=None, not_before=None, expires=None, **kwarg self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v7_0.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2779,6 +3073,35 @@ def __init__(self, *, active_key_name: str=None, auto_regenerate_key: bool=None, self.tags = tags +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: list[~azure.keyvault.v7_0.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageRestoreParameters(Model): """The secret restore parameters. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_paged_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_paged_models.py deleted file mode 100644 index 0fbf874da2a7..000000000000 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_paged_models.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from azure.core.paging import Paged - - -class KeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`KeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[KeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(KeyItemPaged, self).__init__(*args, **kwargs) -class DeletedKeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedKeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedKeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedKeyItemPaged, self).__init__(*args, **kwargs) -class SecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SecretItemPaged, self).__init__(*args, **kwargs) -class DeletedSecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSecretItemPaged, self).__init__(*args, **kwargs) -class CertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateItemPaged, self).__init__(*args, **kwargs) -class CertificateIssuerItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateIssuerItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateIssuerItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateIssuerItemPaged, self).__init__(*args, **kwargs) -class DeletedCertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedCertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedCertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedCertificateItemPaged, self).__init__(*args, **kwargs) -class StorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`StorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(StorageAccountItemPaged, self).__init__(*args, **kwargs) -class DeletedStorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedStorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedStorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedStorageAccountItemPaged, self).__init__(*args, **kwargs) -class SasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SasDefinitionItemPaged, self).__init__(*args, **kwargs) -class DeletedSasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSasDefinitionItemPaged, self).__init__(*args, **kwargs) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index c0e15566f02e..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.paging import ItemPaged from .. import models import uuid @@ -77,8 +78,6 @@ def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops=None, 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 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(parameters, 'KeyCreateParameters') @@ -153,8 +152,6 @@ def import_key(self, vault_base_url, key_name, key, hsm=None, key_attributes=Non 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 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(parameters, 'KeyImportParameters') @@ -217,8 +214,6 @@ def delete_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -293,8 +288,6 @@ def update_key(self, vault_base_url, key_name, key_version, key_ops=None, key_at 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 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(parameters, 'KeyUpdateParameters') @@ -359,8 +352,6 @@ def get_key(self, vault_base_url, key_name, key_version, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -398,11 +389,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -411,46 +403,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -472,11 +461,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -484,46 +474,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_keys.metadata = {'url': '/keys'} def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -575,8 +562,6 @@ def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -648,8 +633,6 @@ def restore_key(self, vault_base_url, key_bundle_backup, cls=None, **kwargs): 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 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(parameters, 'KeyRestoreParameters') @@ -730,8 +713,6 @@ def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -809,8 +790,6 @@ def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -886,8 +865,6 @@ def sign(self, vault_base_url, key_name, key_version, algorithm, value, cls=None 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 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(parameters, 'KeySignParameters') @@ -969,8 +946,6 @@ def verify(self, vault_base_url, key_name, key_version, algorithm, digest, signa 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 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(parameters, 'KeyVerifyParameters') @@ -1048,8 +1023,6 @@ def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cls= 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 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(parameters, 'KeyOperationsParameters') @@ -1125,8 +1098,6 @@ def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cl 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 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(parameters, 'KeyOperationsParameters') @@ -1170,11 +1141,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v7_0.models.DeletedKeyItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1182,46 +1154,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -1262,8 +1231,6 @@ def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1321,8 +1288,6 @@ def purge_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1378,8 +1343,6 @@ def recover_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1449,8 +1412,6 @@ def set_secret(self, vault_base_url, secret_name, value, tags=None, content_type 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 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(parameters, 'SecretSetParameters') @@ -1511,8 +1472,6 @@ def delete_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1585,8 +1544,6 @@ def update_secret(self, vault_base_url, secret_name, secret_version, content_typ 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 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(parameters, 'SecretUpdateParameters') @@ -1649,8 +1606,6 @@ def get_secret(self, vault_base_url, secret_name, secret_version, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1688,11 +1643,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1700,46 +1656,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1760,11 +1713,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1773,46 +1727,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1831,11 +1782,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSecretItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1843,46 +1795,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): @@ -1922,8 +1871,6 @@ def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1981,8 +1928,6 @@ def purge_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2035,8 +1980,6 @@ def recover_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2094,8 +2037,6 @@ def backup_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2155,8 +2096,6 @@ def restore_secret(self, vault_base_url, secret_bundle_backup, cls=None, **kwarg 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 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(parameters, 'SecretRestoreParameters') @@ -2199,11 +2138,12 @@ def get_certificates( :type include_pending: bool :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2211,9 +2151,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -2222,37 +2159,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificates.metadata = {'url': '/certificates'} def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -2293,8 +2230,6 @@ def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2353,8 +2288,6 @@ def set_certificate_contacts(self, vault_base_url, contact_list=None, cls=None, 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 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(contacts, 'Contacts') @@ -2412,8 +2345,6 @@ def get_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2467,8 +2398,6 @@ def delete_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2505,11 +2434,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v7_0.models.CertificateIssuerItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2517,46 +2447,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, cls=None, **kwargs): @@ -2609,8 +2536,6 @@ def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credenti 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2684,8 +2609,6 @@ def update_certificate_issuer(self, vault_base_url, issuer_name, provider=None, 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2746,8 +2669,6 @@ def get_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2805,8 +2726,6 @@ def delete_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2876,8 +2795,6 @@ def create_certificate(self, vault_base_url, certificate_name, certificate_polic 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 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(parameters, 'CertificateCreateParameters') @@ -2960,8 +2877,6 @@ def import_certificate(self, vault_base_url, certificate_name, base64_encoded_ce 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 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(parameters, 'CertificateImportParameters') @@ -3003,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3016,46 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3096,8 +3009,6 @@ def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3159,8 +3070,6 @@ def update_certificate_policy(self, vault_base_url, certificate_name, certificat 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 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(certificate_policy, 'CertificatePolicy') @@ -3238,8 +3147,6 @@ def update_certificate(self, vault_base_url, certificate_name, certificate_versi 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 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(parameters, 'CertificateUpdateParameters') @@ -3303,8 +3210,6 @@ def get_certificate(self, vault_base_url, certificate_name, certificate_version, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3367,8 +3272,6 @@ def update_certificate_operation(self, vault_base_url, certificate_name, cancell 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3428,8 +3331,6 @@ def get_certificate_operation(self, vault_base_url, certificate_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3487,8 +3388,6 @@ def delete_certificate_operation(self, vault_base_url, certificate_name, cls=Non header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3560,8 +3459,6 @@ def merge_certificate(self, vault_base_url, certificate_name, x509_certificates, 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 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(parameters, 'CertificateMergeParameters') @@ -3622,8 +3519,6 @@ def backup_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3683,8 +3578,6 @@ def restore_certificate(self, vault_base_url, certificate_bundle_backup, cls=Non 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 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(parameters, 'CertificateRestoreParameters') @@ -3730,11 +3623,12 @@ def get_deleted_certificates( :type include_pending: bool :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v7_0.models.DeletedCertificateItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3742,9 +3636,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -3753,37 +3644,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3824,8 +3715,6 @@ def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3883,8 +3772,6 @@ def purge_deleted_certificate(self, vault_base_url, certificate_name, cls=None, header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3940,8 +3827,6 @@ def recover_deleted_certificate(self, vault_base_url, certificate_name, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3975,11 +3860,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.StorageAccountItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3987,46 +3873,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_storage_accounts.metadata = {'url': '/storage'} def get_deleted_storage_accounts( @@ -4045,11 +3928,12 @@ def get_deleted_storage_accounts( :type maxresults: int :return: An iterator like instance of DeletedStorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.DeletedStorageAccountItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_storage_accounts.metadata['url'] @@ -4057,46 +3941,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedStorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedStorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_storage_accounts.metadata = {'url': '/deletedstorage'} def get_deleted_storage_account(self, vault_base_url, storage_account_name, cls=None, **kwargs): @@ -4136,8 +4017,6 @@ def get_deleted_storage_account(self, vault_base_url, storage_account_name, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4195,8 +4074,6 @@ def purge_deleted_storage_account(self, vault_base_url, storage_account_name, cl header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4249,8 +4126,6 @@ def recover_deleted_storage_account(self, vault_base_url, storage_account_name, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4307,8 +4182,6 @@ def backup_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4368,8 +4241,6 @@ def restore_storage_account(self, vault_base_url, storage_bundle_backup, cls=Non 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 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(parameters, 'StorageRestoreParameters') @@ -4427,8 +4298,6 @@ def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4483,8 +4352,6 @@ def get_storage_account(self, vault_base_url, storage_account_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4559,8 +4426,6 @@ def set_storage_account(self, vault_base_url, storage_account_name, resource_id, 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 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(parameters, 'StorageAccountCreateParameters') @@ -4636,8 +4501,6 @@ def update_storage_account(self, vault_base_url, storage_account_name, active_ke 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4700,8 +4563,6 @@ def regenerate_storage_account_key(self, vault_base_url, storage_account_name, k 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4740,11 +4601,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.SasDefinitionItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4753,46 +4615,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def get_deleted_sas_definitions( @@ -4814,11 +4673,12 @@ def get_deleted_sas_definitions( :type maxresults: int :return: An iterator like instance of DeletedSasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSasDefinitionItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_sas_definitions.metadata['url'] @@ -4827,46 +4687,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_sas_definitions.metadata = {'url': '/deletedstorage/{storage-account-name}/sas'} def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, cls=None, **kwargs): @@ -4909,8 +4766,6 @@ def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_d header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4971,8 +4826,6 @@ def recover_deleted_sas_definition(self, vault_base_url, storage_account_name, s header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -5030,8 +4883,6 @@ def delete_sas_definition(self, vault_base_url, storage_account_name, sas_defini header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -5089,8 +4940,6 @@ def get_sas_definition(self, vault_base_url, storage_account_name, sas_definitio header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5168,8 +5017,6 @@ def set_sas_definition(self, vault_base_url, storage_account_name, sas_definitio 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 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(parameters, 'SasDefinitionCreateParameters') @@ -5250,8 +5097,6 @@ def update_sas_definition(self, vault_base_url, storage_account_name, sas_defini 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 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(parameters, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index c40e314accc7..dd2c6f0a9b95 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -2,8 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from typing import Any, Callable, Mapping, TYPE_CHECKING -from azure.core.async_paging import AsyncPagedMixin +from typing import Any, Callable, Mapping, AsyncIterator, TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy @@ -23,10 +22,10 @@ class AsyncPagingAdapter: - """For each item in an AsyncPagedMixin, returns the result of applying fn to that item. + """For each item in an AsyncIterator, returns the result of applying fn to that item. Python 3.6 added syntax that could replace this (yield within async for).""" - def __init__(self, pages: AsyncPagedMixin, fn: Callable[[Model], Any]) -> None: + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: self._pages = pages self._fn = fn diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/secrets_vault_client_async.py b/sdk/keyvault/azure-keyvault-secrets/tests/secrets_vault_client_async.py index 73578320e809..a374f9a3782c 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/secrets_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/tests/secrets_vault_client_async.py @@ -3,7 +3,6 @@ # Licensed under the MIT License. # ------------------------------------ from typing import Any, Callable, Mapping, TYPE_CHECKING -from azure.core.async_paging import AsyncPagedMixin from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies import AsyncBearerTokenCredentialPolicy diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py index c2b7cce9f255..6484882d65bb 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py @@ -14,6 +14,8 @@ except ImportError: from urlparse import urlparse # type: ignore +from azure.core.paging import ItemPaged + from ._shared.shared_access_signature import SharedAccessSignature from ._shared.models import LocationMode, Services from ._shared.utils import ( @@ -380,12 +382,11 @@ def set_service_properties( def list_containers( self, name_starts_with=None, # type: Optional[str] include_metadata=False, # type: Optional[bool] - marker=None, # type: Optional[str] results_per_page=None, # type: Optional[int] timeout=None, # type: Optional[int] **kwargs ): - # type: (...) -> ContainerPropertiesPaged + # type: (...) -> ItemPaged[ContainerProperties] """Returns a generator to list the containers under the specified account. The generator will lazily follow the continuation tokens returned by @@ -397,17 +398,13 @@ def list_containers( :param bool include_metadata: Specifies that container metadata be returned in the response. The default value is `False`. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int results_per_page: The maximum number of container names to retrieve per API call. If the request does not specify the server will return up to 5,000 items. :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) of ContainerProperties. - :rtype: ~azure.core.blob.models.ContainerPropertiesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.core.blob.models.ContainerProperties] Example: .. literalinclude:: ../tests/test_blob_samples_service.py @@ -424,8 +421,8 @@ def list_containers( include=include, timeout=timeout, **kwargs) - return ContainerPropertiesPaged( - command, prefix=name_starts_with, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, prefix=name_starts_with, results_per_page=results_per_page, page_iterator_class=ContainerPropertiesPaged) def create_container( self, name, # type: str diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py index 28da09873c1e..2f43f56806e3 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py @@ -16,6 +16,8 @@ from urlparse import urlparse # type: ignore from urllib2 import quote, unquote # type: ignore +from azure.core.paging import ItemPaged + import six from ._shared.shared_access_signature import BlobSharedAccessSignature @@ -658,8 +660,8 @@ def set_container_access_policy( except StorageErrorException as error: process_storage_error(error) - def list_blobs(self, name_starts_with=None, include=None, marker=None, timeout=None, **kwargs): - # type: (Optional[str], Optional[Any], Optional[str], Optional[int], **Any) -> Iterable[BlobProperties] + def list_blobs(self, name_starts_with=None, include=None, timeout=None, **kwargs): + # type: (Optional[str], Optional[Any], Optional[int], **Any) -> ItemPaged[BlobProperties] """Returns a generator to list the blobs under the specified container. The generator will lazily follow the continuation tokens returned by the service. @@ -670,14 +672,10 @@ def list_blobs(self, name_starts_with=None, include=None, marker=None, timeout=N :param list[str] include: Specifies one or more additional datasets to include in the response. Options include: 'snapshots', 'metadata', 'uncommittedblobs', 'copy', 'deleted'. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) response of BlobProperties. - :rtype: ~azure.storage.blob.models.BlobPropertiesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.models.BlobProperties] Example: .. literalinclude:: ../tests/test_blob_samples_containers.py @@ -696,17 +694,19 @@ def list_blobs(self, name_starts_with=None, include=None, marker=None, timeout=N include=include, timeout=timeout, **kwargs) - return BlobPropertiesPaged(command, prefix=name_starts_with, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, prefix=name_starts_with, results_per_page=results_per_page, + page_iterator_class=BlobPropertiesPaged) + def walk_blobs( self, name_starts_with=None, # type: Optional[str] include=None, # type: Optional[Any] delimiter="/", # type: str - marker=None, # type: Optional[str] timeout=None, # type: Optional[int] **kwargs # type: Optional[Any] ): - # type: (...) -> Iterable[BlobProperties] + # type: (...) -> ItemPaged[BlobProperties] """Returns a generator to list the blobs under the specified container. The generator will lazily follow the continuation tokens returned by the service. This operation will list blobs in accordance with a hierarchy, @@ -723,20 +723,15 @@ def walk_blobs( element in the response body that acts as a placeholder for all blobs whose names begin with the same substring up to the appearance of the delimiter character. The delimiter may be a single character or a string. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) response of BlobProperties. - :rtype: ~azure.storage.blob.models.BlobPrefix + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.models.BlobProperties] """ if include and not isinstance(include, list): include = [include] results_per_page = kwargs.pop('results_per_page', None) - marker = kwargs.pop('marker', "") command = functools.partial( self._client.container.list_blob_hierarchy_segment, delimiter=delimiter, @@ -747,7 +742,6 @@ def walk_blobs( command, prefix=name_starts_with, results_per_page=results_per_page, - marker=marker, delimiter=delimiter) def upload_blob( diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/models.py b/sdk/storage/azure-storage-blob/azure/storage/blob/models.py index ab75e1d7722d..c5c90d21f15e 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/models.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/models.py @@ -9,7 +9,7 @@ from enum import Enum from typing import List, Any, TYPE_CHECKING # pylint: disable=unused-import -from azure.core.paging import Paged +from azure.core.paging import PageIterator, ItemPaged from ._shared.utils import ( decode_base64, @@ -287,14 +287,14 @@ def _from_generated(cls, generated): return props -class ContainerPropertiesPaged(Paged): +class ContainerPropertiesPaged(PageIterator): """An Iterable of Container properties. :ivar str service_endpoint: The service URL. :ivar str prefix: A container name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. - :ivar str next_marker: The continuation token to retrieve the next page of results. + :ivar str continuation_token: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available options include "primary" and "secondary". :ivar current_page: The current page of listed results. @@ -305,53 +305,45 @@ class ContainerPropertiesPaged(Paged): begin with the specified prefix. :param int results_per_page: The maximum number of container names to retrieve per call. - :param str marker: An opaque continuation token. - """ - def __init__(self, command, prefix=None, results_per_page=None, marker=None): - super(ContainerPropertiesPaged, self).__init__(command, None) + :param str continuation_token: An opaque continuation token. + """ + def __init__(self, command, prefix=None, results_per_page=None, continuation_token=None): + super(ContainerPropertiesPaged, self).__init__( + get_next=self._get_next_cb, + extract_data=self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command self.service_endpoint = None self.prefix = prefix - self.current_marker = None + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.location_mode = None + self.current_page = [] - def _advance_page(self): - """Force moving the cursor to the next azure call. - - This method is for advanced usage, iterator protocol is prefered. - - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( - marker=self.next_marker or None, + return self._command( + marker=continuation_token or None, maxresults=self.results_per_page, cls=return_context_and_deserialized, use_location=self.location_mode) except StorageErrorException as error: process_storage_error(error) + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.service_endpoint = self._response.service_endpoint self.prefix = self._response.prefix - self.current_marker = self._response.marker + self.marker = self._response.marker self.results_per_page = self._response.max_results - self.current_page = self._response.container_items - self.next_marker = self._response.next_marker or None - return self.current_page + self.current_page = [self._build_item(item) for item in self._response.container_items] - def __next__(self): # type: ignore - item = super(ContainerPropertiesPaged, self).__next__() - if isinstance(item, ContainerProperties): - return item - return ContainerProperties._from_generated(item) # pylint: disable=protected-access + return self._response.next_marker or None, self.current_page - next = __next__ + @staticmethod + def _build_item(item): + return ContainerProperties._from_generated(item) # pylint: disable=protected-access class BlobProperties(DictMixin): @@ -469,14 +461,14 @@ def _from_generated(cls, generated): return blob -class BlobPropertiesPaged(Paged): +class BlobPropertiesPaged(PageIterator): """An Iterable of Blob properties. :ivar str service_endpoint: The service URL. :ivar str prefix: A blob name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. - :ivar str next_marker: The continuation token to retrieve the next page of results. + :ivar str continuation_token: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available options include "primary" and "secondary". :ivar current_page: The current page of listed results. @@ -489,7 +481,7 @@ class BlobPropertiesPaged(Paged): begin with the specified prefix. :param int results_per_page: The maximum number of blobs to retrieve per call. - :param str marker: An opaque continuation token. + :param str continuation_token: An opaque continuation token. :param str delimiter: Used to capture blobs whose names begin with the same substring up to the appearance of the delimiter character. The delimiter may be a single @@ -503,55 +495,48 @@ def __init__( container=None, prefix=None, results_per_page=None, - marker=None, + continuation_token=None, delimiter=None, location_mode=None): - super(BlobPropertiesPaged, self).__init__(command, None) + super(BlobPropertiesPaged, self).__init__( + get_next=self._get_next_cb, + extract_data=self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command self.service_endpoint = None self.prefix = prefix - self.current_marker = None + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.container = container self.delimiter = delimiter self.current_page = None self.location_mode = location_mode - def _advance_page(self): - """Force moving the cursor to the next azure call. - - This method is for advanced usage, iterator protocol is prefered. - - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 - + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( + return self._command( prefix=self.prefix, - marker=self.next_marker or None, + marker=continuation_token or None, maxresults=self.results_per_page, cls=return_context_and_deserialized, use_location=self.location_mode) except StorageErrorException as error: process_storage_error(error) + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.service_endpoint = self._response.service_endpoint self.prefix = self._response.prefix - self.current_marker = self._response.marker + self.marker = self._response.marker self.results_per_page = self._response.max_results - self.current_page = self._response.segment.blob_items - self.next_marker = self._response.next_marker or None self.container = self._response.container_name + self.current_page = [self._build_item(item) for item in self._response.segment.blob_items] self.delimiter = self._response.delimiter - return self.current_page - def __next__(self): - item = super(BlobPropertiesPaged, self).__next__() + return self._response.next_marker or None, self.current_page + + def _build_item(self, item): if isinstance(item, BlobProperties): return item if isinstance(item, BlobItem): @@ -560,10 +545,8 @@ def __next__(self): return blob return item - next = __next__ - -class BlobPrefix(BlobPropertiesPaged, DictMixin): +class BlobPrefix(ItemPaged, DictMixin): """An Iterable of Blob properties. Returned from walk_blobs when a delimiter is used. @@ -572,7 +555,7 @@ class BlobPrefix(BlobPropertiesPaged, DictMixin): :ivar str name: The prefix, or "directory name" of the blob. :ivar str service_endpoint: The service URL. :ivar str prefix: A blob name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. :ivar str next_marker: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available @@ -597,51 +580,37 @@ class BlobPrefix(BlobPropertiesPaged, DictMixin): Options include 'primary' or 'secondary'. """ def __init__(self, *args, **kwargs): - super(BlobPrefix, self).__init__(*args, **kwargs) + super(BlobPrefix, self).__init__(*args, page_iterator_class=BlobPrefixPaged, **kwargs) + self.name = kwargs.get('prefix') + self.prefix = kwargs.get('prefix') + self.results_per_page = kwargs.get('results_per_page') + self.container = kwargs.get('container') + self.delimiter = kwargs.get('delimiter') + self.location_mode = kwargs.get('location_mode') + +class BlobPrefixPaged(BlobPropertiesPaged): + def __init__(self, *args, **kwargs): + super(BlobPrefixPaged, self).__init__(*args, **kwargs) self.name = self.prefix - def _advance_page(self): - """Force moving the cursor to the next azure call. - - This method is for advanced usage, iterator protocol is prefered. - - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 - self.location_mode, self._response = self._get_next( - prefix=self.prefix, - marker=self.next_marker or None, - maxresults=self.results_per_page, - cls=return_context_and_deserialized, - use_location=self.location_mode) - self.service_endpoint = self._response.service_endpoint - self.prefix = self._response.prefix - self.current_marker = self._response.marker - self.results_per_page = self._response.max_results - self.current_page = self._response.segment.blob_prefixes - self.current_page.extend(self._response.segment.blob_items) - self.next_marker = self._response.next_marker or None - self.container = self._response.container_name - self.delimiter = self._response.delimiter + def _extract_data_cb(self, get_next_return): + continuation_token, _ = super(BlobPrefixPaged, self)._extract_data_cb(get_next_return) + self.current_page = self._response.segment.blob_prefixes + self._response.segment.blob_items + self.current_page = [self._build_item(item) for item in self.current_page] - def __next__(self): - item = super(BlobPrefix, self).__next__() + return continuation_token, self.current_page + + def _build_item(self, item): + item = super(BlobPrefixPaged, self)._build_item(item) if isinstance(item, GenBlobPrefix): return BlobPrefix( - self._get_next, + self._command, container=self.container, prefix=item.name, results_per_page=self.results_per_page, location_mode=self.location_mode) return item - next = __next__ - - class LeaseProperties(DictMixin): """Blob Lease Properties. diff --git a/sdk/storage/azure-storage-blob/tests/test_container.py b/sdk/storage/azure-storage-blob/tests/test_container.py index 889e270dd662..a22b8e50f62a 100644 --- a/sdk/storage/azure-storage-blob/tests/test_container.py +++ b/sdk/storage/azure-storage-blob/tests/test_container.py @@ -120,7 +120,7 @@ def test_create_container_with_public_access_blob(self): blob = container.get_blob_client("blob1") blob.upload_blob(u'xyz') - + anonymous_service = BlobClient( self._get_account_url(), container=container_name, @@ -247,15 +247,12 @@ def test_list_containers_with_num_results_and_marker(self): container_names.sort() # Act - generator1 = self.bsc.list_containers(name_starts_with=prefix, results_per_page=2) - next(generator1) + generator1 = self.bsc.list_containers(name_starts_with=prefix, results_per_page=2).by_page() + containers1 = list(next(generator1)) generator2 = self.bsc.list_containers( - name_starts_with=prefix, marker=generator1.next_marker, results_per_page=2) - next(generator2) - - containers1 = list(generator1.current_page) - containers2 = list(generator2.current_page) + name_starts_with=prefix, results_per_page=2).by_page(generator1.continuation_token) + containers2 = list(next(generator2)) # Assert self.assertIsNotNone(containers1) @@ -817,14 +814,13 @@ def test_list_blobs_with_num_results(self): # Act - blobs = container.list_blobs(results_per_page=2) - next(blobs) + blobs = list(next(container.list_blobs(results_per_page=2).by_page())) # Assert self.assertIsNotNone(blobs) - self.assertEqual(len(blobs.current_page), 2) - self.assertNamedItemInContainer(blobs.current_page, 'blob_a1') - self.assertNamedItemInContainer(blobs.current_page, 'blob_a2') + self.assertEqual(len(blobs), 2) + self.assertNamedItemInContainer(blobs, 'blob_a1') + self.assertNamedItemInContainer(blobs, 'blob_a2') @record def test_list_blobs_with_include_snapshots(self): diff --git a/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py b/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py index 7e0bb4f4885c..50a1dacb7298 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py @@ -16,6 +16,7 @@ import six from azure.core.polling import LROPoller +from azure.core.paging import ItemPaged from .file_client import FileClient @@ -269,21 +270,17 @@ def delete_directory(self, timeout=None, **kwargs): except StorageErrorException as error: process_storage_error(error) - def list_directories_and_files(self, name_starts_with=None, marker=None, timeout=None, **kwargs): - # type: (Optional[str], Optional[str], Optional[int], **Any) -> DirectoryProperties + def list_directories_and_files(self, name_starts_with=None, timeout=None, **kwargs): + # type: (Optional[str], Optional[str], Optional[int], **Any) -> ItemPaged """Lists all the directories and files under the directory. :param str name_starts_with: Filters the results to return only entities whose names begin with the specified prefix. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int timeout: The timeout parameter is expressed in seconds. :returns: An auto-paging iterable of dict-like DirectoryProperties and FileProperties - :rtype: ~azure.storage.file.models.DirectoryPropertiesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.models.DirectoryProperties] Example: .. literalinclude:: ../tests/test_file_samples_directory.py @@ -299,23 +296,20 @@ def list_directories_and_files(self, name_starts_with=None, marker=None, timeout sharesnapshot=self.snapshot, timeout=timeout, **kwargs) - return DirectoryPropertiesPaged( - command, prefix=name_starts_with, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, prefix=name_starts_with, results_per_page=results_per_page, + page_iterator_class=DirectoryPropertiesPaged) - def list_handles(self, marker=None, recursive=False, timeout=None, **kwargs): + def list_handles(self, recursive=False, timeout=None, **kwargs): """Lists opened handles on a directory or a file under the directory. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param bool recursive: Boolean that specifies if operation should apply to the directory specified by the client, its files, its subdirectories and their files. Default value is False. :param int timeout: The timeout parameter is expressed in seconds. :returns: An auto-paging iterable of HandleItems - :rtype: ~azure.storage.file.models.HandlesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.models.Handles] """ results_per_page = kwargs.pop('results_per_page', None) command = functools.partial( @@ -324,8 +318,9 @@ def list_handles(self, marker=None, recursive=False, timeout=None, **kwargs): timeout=timeout, recursive=recursive, **kwargs) - return HandlesPaged( - command, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, results_per_page=results_per_page, + page_iterator_class=HandlesPaged) def close_handles( self, handle=None, # type: Union[str, HandleItem] diff --git a/sdk/storage/azure-storage-file/azure/storage/file/file_client.py b/sdk/storage/azure-storage-file/azure/storage/file/file_client.py index ec492fe25197..a67cc9736fad 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/file_client.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/file_client.py @@ -18,6 +18,7 @@ import six from azure.core.polling import LROPoller +from azure.core.paging import ItemPaged from .models import HandlesPaged from ._generated import AzureFileStorage @@ -781,16 +782,14 @@ def resize_file(self, size, timeout=None, **kwargs): # type: ignore except StorageErrorException as error: process_storage_error(error) - def list_handles(self, marker=None, timeout=None, **kwargs): + def list_handles(self, timeout=None, **kwargs): + # type: (int, Any) -> ItemPaged[Handle] """Lists handles for file. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int timeout: The timeout parameter is expressed in seconds. :returns: An auto-paging iterable of HandleItems + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.models.Handle] """ results_per_page = kwargs.pop('results_per_page', None) command = functools.partial( @@ -798,8 +797,9 @@ def list_handles(self, marker=None, timeout=None, **kwargs): sharesnapshot=self.snapshot, timeout=timeout, **kwargs) - return HandlesPaged( - command, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, results_per_page=results_per_page, + page_iterator_class=HandlesPaged) def close_handles( self, handle=None, # type: Union[str, HandleItem] diff --git a/sdk/storage/azure-storage-file/azure/storage/file/file_service_client.py b/sdk/storage/azure-storage-file/azure/storage/file/file_service_client.py index ffde63e24f69..160a73a7af6a 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/file_service_client.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/file_service_client.py @@ -6,7 +6,7 @@ import functools from typing import ( # pylint: disable=unused-import - Union, Optional, Any, Iterable, Dict, List, + Union, Optional, Any, Dict, List, TYPE_CHECKING ) try: @@ -14,6 +14,8 @@ except ImportError: from urlparse import urlparse # type: ignore +from azure.core.paging import ItemPaged + from .share_client import ShareClient from ._shared.shared_access_signature import SharedAccessSignature from ._shared.models import Services @@ -270,11 +272,10 @@ def list_shares( self, name_starts_with=None, # type: Optional[str] include_metadata=False, # type: Optional[bool] include_snapshots=False, # type: Optional[bool] - marker=None, timeout=None, # type: Optional[int] **kwargs ): - # type: (...) -> SharePropertiesPaged + # type: (...) -> ItemPaged[ShareProperties] """Returns auto-paging iterable of dict-like ShareProperties under the specified account. The generator will lazily follow the continuation tokens returned by the service and stop when all shares have been returned. @@ -286,14 +287,10 @@ def list_shares( Specifies that share metadata be returned in the response. :param bool include_snapshots: Specifies that share snapshot be returned in the response. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) of ShareProperties. - :rtype: ~azure.storage.file.models.SharePropertiesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.models.ShareProperties] Example: .. literalinclude:: ../tests/test_file_samples_service.py @@ -314,8 +311,9 @@ def list_shares( include=include, timeout=timeout, **kwargs) - return SharePropertiesPaged( - command, prefix=name_starts_with, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, prefix=name_starts_with, results_per_page=results_per_page, + page_iterator_class=SharePropertiesPaged) def create_share( self, share_name, # type: str diff --git a/sdk/storage/azure-storage-file/azure/storage/file/models.py b/sdk/storage/azure-storage-file/azure/storage/file/models.py index d77baed48d7d..8a393cc37417 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/models.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/models.py @@ -6,7 +6,7 @@ # pylint: disable=too-few-public-methods, too-many-instance-attributes # pylint: disable=super-init-not-called, too-many-lines -from azure.core.paging import Paged +from azure.core.paging import PageIterator from ._shared.utils import ( return_context_and_deserialized, process_storage_error) @@ -243,12 +243,12 @@ def _from_generated(cls, generated): return props -class SharePropertiesPaged(Paged): +class SharePropertiesPaged(PageIterator): """An iterable of Share properties. :ivar str service_endpoint: The service URL. :ivar str prefix: A file name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. :ivar str next_marker: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available @@ -261,43 +261,40 @@ class SharePropertiesPaged(Paged): begin with the specified prefix. :param int results_per_page: The maximum number of share names to retrieve per call. - :param str marker: An opaque continuation token. + :param str continuation_token: An opaque continuation token. """ - def __init__(self, command, prefix=None, results_per_page=None, marker=None, **kwargs): - super(SharePropertiesPaged, self).__init__(command, None) + def __init__(self, command, prefix=None, results_per_page=None, continuation_token=None): + super(SharePropertiesPaged, self).__init__( + get_next=self._get_next_cb, + extract_data=self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command self.service_endpoint = None self.prefix = prefix - self.current_marker = None + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.location_mode = None + self.current_page = [] - def _advance_page(self): - """Force moving the cursor to the next azure call. - This method is for advanced usage, iterator protocol is prefered. - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( - marker=self.next_marker or None, + return self._command( + marker=continuation_token or None, maxresults=self.results_per_page, cls=return_context_and_deserialized, use_location=self.location_mode) except StorageErrorException as error: process_storage_error(error) + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.service_endpoint = self._response.service_endpoint self.prefix = self._response.prefix - self.current_marker = self._response.marker + self.marker = self._response.marker self.results_per_page = self._response.max_results self.current_page = [ShareProperties._from_generated(i) for i in self._response.share_items] # pylint: disable=protected-access - self.next_marker = self._response.next_marker or None - return self.current_page + return self._response.next_marker or None, self.current_page class Handle(DictMixin): @@ -352,10 +349,10 @@ def _from_generated(cls, generated): return handle -class HandlesPaged(Paged): +class HandlesPaged(PageIterator): """An iterable of Handles. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. :ivar str next_marker: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available @@ -366,36 +363,34 @@ class HandlesPaged(Paged): :param callable command: Function to retrieve the next page of items. :param int results_per_page: The maximum number of share names to retrieve per call. - :param str marker: An opaque continuation token. + :param str continuation_token: An opaque continuation token. """ - def __init__(self, command, results_per_page=None, marker=None, **kwargs): - super(HandlesPaged, self).__init__(command, None) - self.current_marker = None + def __init__(self, command, results_per_page=None, continuation_token=None): + super(HandlesPaged, self).__init__( + get_next=self._get_next_cb, + extract_data=self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.location_mode = None + self.current_page = [] - def _advance_page(self): - """Force moving the cursor to the next azure call. - This method is for advanced usage, iterator protocol is prefered. - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( - marker=self.next_marker or None, + return self._command( + marker=continuation_token or None, maxresults=self.results_per_page, cls=return_context_and_deserialized, use_location=self.location_mode) except StorageErrorException as error: process_storage_error(error) + + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.current_page = [Handle._from_generated(h) for h in self._response.handle_list] # pylint: disable=protected-access - self.next_marker = self._response.next_marker or None - return self.current_page + return self._response.next_marker or None, self.current_page class DirectoryProperties(DictMixin): @@ -432,7 +427,7 @@ def _from_generated(cls, generated): return props -class DirectoryPropertiesPaged(Paged): +class DirectoryPropertiesPaged(PageIterator): """An iterable for the contents of a directory. This iterable will yield dicts for the contents of the directory. The dicts @@ -441,7 +436,7 @@ class DirectoryPropertiesPaged(Paged): :ivar str service_endpoint: The service URL. :ivar str prefix: A file name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. :ivar str next_marker: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available @@ -454,30 +449,26 @@ class DirectoryPropertiesPaged(Paged): begin with the specified prefix. :param int results_per_page: The maximum number of share names to retrieve per call. - :param str marker: An opaque continuation token. + :param str continuation_token: An opaque continuation token. """ - def __init__(self, command, prefix=None, results_per_page=None, marker=None, **kwargs): - super(DirectoryPropertiesPaged, self).__init__(command, None) + def __init__(self, command, prefix=None, results_per_page=None, continuation_token=None): + super(DirectoryPropertiesPaged, self).__init__( + get_next=self._get_next_cb, + extract_data=self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command self.service_endpoint = None self.prefix = prefix - self.current_marker = None + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.location_mode = None + self.current_page = [] - def _advance_page(self): - """Force moving the cursor to the next azure call. - This method is for advanced usage, iterator protocol is prefered. - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( - marker=self.next_marker or None, + return self._command( + marker=continuation_token or None, prefix=self.prefix, maxresults=self.results_per_page, cls=return_context_and_deserialized, @@ -485,14 +476,15 @@ def _advance_page(self): except StorageErrorException as error: process_storage_error(error) + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.service_endpoint = self._response.service_endpoint self.prefix = self._response.prefix - self.current_marker = self._response.marker + self.marker = self._response.marker self.results_per_page = self._response.max_results self.current_page = [_wrap_item(i) for i in self._response.segment.directory_items] self.current_page.extend([_wrap_item(i) for i in self._response.segment.file_items]) - self.next_marker = self._response.next_marker or None - return self.current_page + return self._response.next_marker or None, self.current_page class FileProperties(DictMixin): diff --git a/sdk/storage/azure-storage-file/tests/test_handle.py b/sdk/storage/azure-storage-file/tests/test_handle.py index 7fe3d3a5e3d4..220e71d679c2 100644 --- a/sdk/storage/azure-storage-file/tests/test_handle.py +++ b/sdk/storage/azure-storage-file/tests/test_handle.py @@ -114,20 +114,21 @@ def test_list_handles_with_marker(self): root = share.get_directory_client() # Act - handle_generator = root.list_handles(recursive=True, results_per_page=1) - next(handle_generator) + handle_generator = root.list_handles(recursive=True, results_per_page=1).by_page() + handles = list(next(handle_generator)) # Assert - self.assertIsNotNone(handle_generator.next_marker) - handles = handle_generator.current_page + self.assertIsNotNone(handle_generator.continuation_token) self._validate_handles(handles) # Note down a handle that we saw old_handle = handles[0] # Continue listing - remaining_handles = list( - root.list_handles(recursive=True, marker=handle_generator.next_marker)) + remaining_handles = list(next( + root.list_handles(recursive=True).by_page( + continuation_token=handle_generator.continuation_token) + )) self._validate_handles(handles) # Make sure the old handle did not appear diff --git a/sdk/storage/azure-storage-file/tests/test_share.py b/sdk/storage/azure-storage-file/tests/test_share.py index 4eabf312d3f4..cc134be6c710 100644 --- a/sdk/storage/azure-storage-file/tests/test_share.py +++ b/sdk/storage/azure-storage-file/tests/test_share.py @@ -341,14 +341,12 @@ def test_list_shares_with_num_results_and_marker(self): share_names.sort() # Act - generator1 = self.fsc.list_shares(prefix, results_per_page=2) - next(generator1) - generator2 = self.fsc.list_shares( - prefix, marker=generator1.next_marker, results_per_page=2) - next(generator2) + generator1 = self.fsc.list_shares(prefix, results_per_page=2).by_page() + shares1 = list(next(generator1)) - shares1 = generator1.current_page - shares2 = generator2.current_page + generator2 = self.fsc.list_shares( + prefix, results_per_page=2).by_page(continuation_token=generator1.continuation_token) + shares2 = list(next(generator2)) # Assert self.assertIsNotNone(shares1) @@ -606,14 +604,14 @@ def test_list_directories_and_files_with_num_results(self): root.upload_file('fileb1', '1024') # Act - result = share_name.list_directories_and_files(results_per_page=2) - next(result) + result = share_name.list_directories_and_files(results_per_page=2).by_page() + result = list(next(result)) # Assert self.assertIsNotNone(result) - self.assertEqual(len(result.current_page), 2) - self.assertNamedItemInContainer(result.current_page, 'dir1') - self.assertNamedItemInContainer(result.current_page, 'filea1') + self.assertEqual(len(result), 2) + self.assertNamedItemInContainer(result, 'dir1') + self.assertNamedItemInContainer(result, 'filea1') @record def test_list_directories_and_files_with_num_results_and_marker(self): @@ -627,14 +625,13 @@ def test_list_directories_and_files_with_num_results_and_marker(self): dir1.upload_file('fileb1', '1024') # Act - generator1 = share_name.list_directories_and_files('dir1', results_per_page=2) - next(generator1) - generator2 = share_name.list_directories_and_files( - 'dir1', marker=generator1.next_marker, results_per_page=2) - next(generator2) + generator1 = share_name.list_directories_and_files( + 'dir1', results_per_page=2).by_page() + result1 = list(next(generator1)) - result1 = generator1.current_page - result2 = generator2.current_page + generator2 = share_name.list_directories_and_files( + 'dir1', results_per_page=2).by_page(continuation_token=generator1.continuation_token) + result2 = list(next(generator2)) # Assert self.assertEqual(len(result1), 2) @@ -643,7 +640,7 @@ def test_list_directories_and_files_with_num_results_and_marker(self): self.assertNamedItemInContainer(result1, 'filea2') self.assertNamedItemInContainer(result2, 'filea3') self.assertNamedItemInContainer(result2, 'fileb1') - self.assertEqual(generator2.next_marker, None) + self.assertEqual(generator2.continuation_token, None) @record def test_list_directories_and_files_with_prefix(self): diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/models.py b/sdk/storage/azure-storage-queue/azure/storage/queue/models.py index 224508d959fc..eb8250e918f6 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/models.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/models.py @@ -7,7 +7,7 @@ # pylint: disable=super-init-not-called from typing import List # pylint: disable=unused-import -from azure.core.paging import Paged +from azure.core.paging import PageIterator from ._shared.utils import ( return_context_and_deserialized, process_storage_error) @@ -220,7 +220,7 @@ def _from_generated(cls, generated): return message -class MessagesPaged(Paged): +class MessagesPaged(PageIterator): """An iterable of Queue Messages. :ivar int results_per_page: The maximum number of results retrieved per API call. @@ -231,28 +231,28 @@ class MessagesPaged(Paged): :param int results_per_page: The maximum number of messages to retrieve per call. """ - def __init__(self, command, results_per_page=None): - super(MessagesPaged, self).__init__(command, None) + def __init__(self, command, results_per_page=None, continuation_token=None): + if continuation_token is not None: + raise ValueError("This operation does not support continuation token") + + super(MessagesPaged, self).__init__( + self._get_next_cb, + self._extract_data_cb, + ) + self._command = command self.results_per_page = results_per_page - def _advance_page(self): - """Force moving the cursor to the next azure call. - - This method is for advanced usage, iterator protocol is prefered. - - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - messages = self._get_next(number_of_messages=self.results_per_page) - if not messages: - raise StopIteration() + return self._command(number_of_messages=self.results_per_page) except StorageErrorException as error: process_storage_error(error) - self.current_page = [QueueMessage._from_generated(q) for q in messages] # pylint: disable=protected-access - return self.current_page + + def _extract_data_cb(self, messages): + # There is no concept of continuation token, so raising on my own condition + if not messages: + raise StopIteration("End of paging") + return "TOKEN_IGNORED", [QueueMessage._from_generated(q) for q in messages] # pylint: disable=protected-access class QueueProperties(DictMixin): @@ -280,12 +280,12 @@ def _from_generated(cls, generated): return props -class QueuePropertiesPaged(Paged): +class QueuePropertiesPaged(PageIterator): """An iterable of Queue properties. :ivar str service_endpoint: The service URL. :ivar str prefix: A queue name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. :ivar str next_marker: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available @@ -298,44 +298,39 @@ class QueuePropertiesPaged(Paged): begin with the specified prefix. :param int results_per_page: The maximum number of queue names to retrieve per call. - :param str marker: An opaque continuation token. + :param str continuation_token: An opaque continuation token. """ - def __init__(self, command, prefix=None, results_per_page=None, marker=None): - super(QueuePropertiesPaged, self).__init__(command, None) + def __init__(self, command, prefix=None, results_per_page=None, continuation_token=None): + super(QueuePropertiesPaged, self).__init__( + self._get_next_cb, + self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command self.service_endpoint = None self.prefix = prefix - self.current_marker = None + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.location_mode = None - def _advance_page(self): - """Force moving the cursor to the next azure call. - - This method is for advanced usage, iterator protocol is prefered. - - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( - marker=self.next_marker or None, + return self._command( + marker=continuation_token or None, maxresults=self.results_per_page, cls=return_context_and_deserialized, use_location=self.location_mode) except StorageErrorException as error: process_storage_error(error) + + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.service_endpoint = self._response.service_endpoint self.prefix = self._response.prefix - self.current_marker = self._response.marker + self.marker = self._response.marker self.results_per_page = self._response.max_results - self.current_page = [QueueProperties._from_generated(q) for q in self._response.queue_items] # pylint: disable=protected-access - self.next_marker = self._response.next_marker or None - return self.current_page + + return self._response.next_marker or None, [QueueProperties._from_generated(q) for q in self._response.queue_items] # pylint: disable=protected-access class QueuePermissions(object): diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py index a8d58b638f73..ff780029de0c 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py @@ -16,6 +16,8 @@ import six +from azure.core.paging import ItemPaged + from ._shared.shared_access_signature import QueueSharedAccessSignature from ._shared.utils import ( StorageAccountHostsMixin, @@ -512,7 +514,7 @@ def enqueue_message( # type: ignore process_storage_error(error) def receive_messages(self, messages_per_page=None, visibility_timeout=None, timeout=None, **kwargs): # type: ignore - # type: (Optional[int], Optional[int], Optional[int], Optional[Any]) -> QueueMessage + # type: (Optional[int], Optional[int], Optional[int], Optional[Any]) -> ItemPaged[Message] """Removes one or more messages from the front of the queue. When a message is retrieved from the queue, the response includes the message @@ -540,7 +542,7 @@ def receive_messages(self, messages_per_page=None, visibility_timeout=None, time The server timeout, expressed in seconds. :return: Returns a message iterator of dict-like Message objects. - :rtype: ~azure.storage.queue.models.MessagesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.queue.models.Message] Example: .. literalinclude:: ../tests/test_queue_samples_message.py @@ -562,7 +564,7 @@ def receive_messages(self, messages_per_page=None, visibility_timeout=None, time cls=self._config.message_decode_policy, **kwargs ) - return MessagesPaged(command, results_per_page=messages_per_page) + return ItemPaged(command, results_per_page=messages_per_page, page_iterator_class=MessagesPaged) except StorageErrorException as error: process_storage_error(error) diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py index 41be25c1d6bf..1e7fca250953 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py @@ -13,6 +13,8 @@ except ImportError: from urlparse import urlparse # type: ignore +from azure.core.paging import ItemPaged + from ._shared.shared_access_signature import SharedAccessSignature from ._shared.models import LocationMode, Services from ._shared.utils import ( @@ -302,12 +304,11 @@ def set_service_properties( # type: ignore def list_queues( self, name_starts_with=None, # type: Optional[str] include_metadata=False, # type: Optional[bool] - marker=None, # type: Optional[str] results_per_page=None, # type: Optional[int] timeout=None, # type: Optional[int] **kwargs ): - # type: (...) -> QueuePropertiesPaged + # type: (...) -> ItemPaged[QueueProperties] """Returns a generator to list the queues under the specified account. The generator will lazily follow the continuation tokens returned by @@ -318,10 +319,6 @@ def list_queues( begin with the specified prefix. :param bool include_metadata: Specifies that queue metadata be returned in the response. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int results_per_page: The maximum number of queue names to retrieve per API call. If the request does not specify the server will return up to 5,000 items. @@ -330,7 +327,7 @@ def list_queues( calls to the service in which case the timeout value specified will be applied to each individual call. :returns: An iterable (auto-paging) of QueueProperties. - :rtype: ~azure.core.queue.models.QueuePropertiesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.core.queue.models.QueueProperties] Example: .. literalinclude:: ../tests/test_queue_samples_service.py @@ -347,8 +344,10 @@ def list_queues( include=include, timeout=timeout, **kwargs) - return QueuePropertiesPaged( - command, prefix=name_starts_with, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, prefix=name_starts_with, results_per_page=results_per_page, + page_iterator_class=QueuePropertiesPaged + ) def create_queue( self, name, # type: str @@ -357,7 +356,7 @@ def create_queue( **kwargs ): # type: (...) -> QueueClient - """Creates a new queue under the specified account. + """Creates a new queue under the specified account. If a queue with the same name already exists, the operation fails. Returns a client with which to interact with the newly created queue. diff --git a/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_delete_message.yaml b/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_delete_message.yaml index 51d38817ff39..7b9a2fe78803 100644 --- a/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_delete_message.yaml +++ b/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_delete_message.yaml @@ -2,1441 +2,246 @@ interactions: - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1b7a7e3a-952a-11e9-bd27-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49 - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - fd4a8222-9003-00c8-3c36-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1b9a01c6-952a-11e9-8b0c-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF442e2d59-b9ee-4fc1-b57f-1eede999ed26Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAAZ71f3TYp1QE=Sat,\ - \ 22 Jun 2019 20:12:49 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - fd4a822e-9003-00c8-4436-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1ba2cc3e-952a-11e9-84a6-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF4b1f4b61-a5c0-48fa-8473-231196864687Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAAayNo3TYp1QE=Sat,\ - \ 22 Jun 2019 20:12:49 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - fd4a8238-9003-00c8-4e36-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1bab46ca-952a-11e9-8a40-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFFbc529b8c-9f40-41ef-96f3-354cb25025b7Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAAkNdw3TYp1QE=Sat,\ - \ 22 Jun 2019 20:12:49 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - fd4a8241-9003-00c8-5536-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1bb3e9c6-952a-11e9-b2c0-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF635425fc-8557-4a2c-81fb-14a27d8b1c50Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAApmR53TYp1QE=Sat,\ - \ 22 Jun 2019 20:12:49 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - fd4a8249-9003-00c8-5c36-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1bbc4aba-952a-11e9-9d3a-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF442e2d59-b9ee-4fc1-b57f-1eede999ed26Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAAhkZj7zYp1QE=Sat,\ - \ 22 Jun 2019 20:13:19 GMT1message1" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - fd4a8253-9003-00c8-6536-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1bc4c398-952a-11e9-9d06-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: DELETE - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages/442e2d59-b9ee-4fc1-b57f-1eede999ed26?popreceipt=AgAAAAMAAAAAAAAAhkZj7zYp1QE%3D - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - fd4a825b-9003-00c8-6c36-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1bcd588c-952a-11e9-895b-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages?numofmessages=32 - response: - body: - string: "\uFEFF4b1f4b61-a5c0-48fa-8473-231196864687Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAA16507zYp1QE=Sat,\ - \ 22 Jun 2019 20:13:19 GMT1message2bc529b8c-9f40-41ef-96f3-354cb25025b7Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAA16507zYp1QE=Sat,\ - \ 22 Jun 2019 20:13:19 GMT1message3635425fc-8557-4a2c-81fb-14a27d8b1c50Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAA16507zYp1QE=Sat,\ - \ 22 Jun 2019 20:13:19 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - fd4a8261-9003-00c8-7236-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dcd5898c-952a-11e9-806a-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:13 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49 - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 0b5f410d-2003-0070-7d37-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dcf60022-952a-11e9-954d-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:13 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF1208b99d-12bd-4073-a3c8-9b0ad6bfdf33Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAASC69njcp1QE=Sat,\ - \ 22 Jun 2019 20:18:14 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 0b5f411d-2003-0070-0a37-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dcff4f9c-952a-11e9-83d3-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF3de1106c-a4cf-4a5f-a7dc-d5f70ad5c8b0Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAAzn7Gnjcp1QE=Sat,\ - \ 22 Jun 2019 20:18:14 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 0b5f412a-2003-0070-1637-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dd08b014-952a-11e9-aee4-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF4ec3ee4b-b0f3-48e9-a5d1-8b7fc1e2180aSat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAA+DLPnjcp1QE=Sat,\ - \ 22 Jun 2019 20:18:14 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 0b5f4137-2003-0070-1f37-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dd11436e-952a-11e9-8240-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFFea4ee1a4-2c09-42d5-bad1-210be95e91c7Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAATzXYnjcp1QE=Sat,\ - \ 22 Jun 2019 20:18:14 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 0b5f4149-2003-0070-2e37-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dd1a7bd2-952a-11e9-95d1-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF1208b99d-12bd-4073-a3c8-9b0ad6bfdf33Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAAkLPCsDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:44 GMT1message1" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 0b5f4151-2003-0070-3637-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dd23aae8-952a-11e9-b0bf-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: DELETE - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages/1208b99d-12bd-4073-a3c8-9b0ad6bfdf33?popreceipt=AgAAAAMAAAAAAAAAkLPCsDcp1QE%3D - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:18:14 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 0b5f4164-2003-0070-4737-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dd2c7de6-952a-11e9-9262-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages?numofmessages=32 - response: - body: - string: "\uFEFF3de1106c-a4cf-4a5f-a7dc-d5f70ad5c8b0Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAAV9/UsDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:44 GMT1message24ec3ee4b-b0f3-48e9-a5d1-8b7fc1e2180aSat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAAV9/UsDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:44 GMT1message3ea4ee1a4-2c09-42d5-bad1-210be95e91c7Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAAV9/UsDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:44 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:14 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 0b5f4172-2003-0070-5337-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 740b52d2-952b-11e9-9d3a-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b7b05c9c-ad96-11e9-ab10-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:44 GMT'] + x-ms-version: ['2018-03-28'] method: PUT uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49 response: - body: - string: '' + body: {string: ''} headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:22:26 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - f5f43da9-6003-0099-3638-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Length: ['0'] + Date: ['Tue, 23 Jul 2019 22:10:44 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [b462afff-6003-00dd-0ba3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message1' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 742c9034-952b-11e9-95de-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b81371ae-ad96-11e9-923b-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages response: - body: - string: "\uFEFF193f415e-aabc-46e0-9209-48d6f7dad682Sat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAxCb0NTgp1QE=Sat,\ - \ 22 Jun 2019 20:22:27 GMT" + body: {string: "\uFEFF8c67a6da-dc58-453c-a32c-2357250782d6Tue, + 23 Jul 2019 22:10:45 GMTTue, 30 Jul 2019 22:10:45 + GMTAgAAAAMAAAAAAAAASa7peaNB1QE=Tue, + 23 Jul 2019 22:10:45 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:26 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - f5f43db1-6003-0099-3a38-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [b462b023-6003-00dd-25a3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message2' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 7435d566-952b-11e9-a739-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b82af13e-ad96-11e9-89e9-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages response: - body: - string: "\uFEFF5b8f5b8c-25ca-42c2-a759-8feeba150f7cSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAGyn9NTgp1QE=Sat,\ - \ 22 Jun 2019 20:22:27 GMT" + body: {string: "\uFEFF53352c13-0ace-4405-a299-848592033386Tue, + 23 Jul 2019 22:10:45 GMTTue, 30 Jul 2019 22:10:45 + GMTAgAAAAMAAAAAAAAA9DX/eaNB1QE=Tue, + 23 Jul 2019 22:10:45 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:26 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - f5f43db7-6003-0099-3f38-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [b462b041-6003-00dd-3fa3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message3' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 743eee58-952b-11e9-8745-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b84060c8-ad96-11e9-89c5-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages response: - body: - string: "\uFEFFd867e71b-a641-4b87-b534-4659d5016cfdSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAcysGNjgp1QE=Sat,\ - \ 22 Jun 2019 20:22:27 GMT" + body: {string: "\uFEFF831f51e4-bdae-46c9-8085-7eb7ddf44022Tue, + 23 Jul 2019 22:10:46 GMTTue, 30 Jul 2019 22:10:46 + GMTAgAAAAMAAAAAAAAAow8TeqNB1QE=Tue, + 23 Jul 2019 22:10:46 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:26 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - f5f43dba-6003-0099-4238-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [b462b055-6003-00dd-51a3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message4' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 74482aa4-952b-11e9-9902-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b85423be-ad96-11e9-ad5e-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:46 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages response: - body: - string: "\uFEFF1cafa96b-c8b4-41b7-8dcf-407fffd8661cSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAA+XsPNjgp1QE=Sat,\ - \ 22 Jun 2019 20:22:27 GMT" + body: {string: "\uFEFF415e7230-45f9-423d-9090-b53936c23314Tue, + 23 Jul 2019 22:10:46 GMTTue, 30 Jul 2019 22:10:46 + GMTAgAAAAMAAAAAAAAAfeUoeqNB1QE=Tue, + 23 Jul 2019 22:10:46 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:26 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - f5f43dbe-6003-0099-4538-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [b462b073-6003-00dd-67a3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: null headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 74515192-952b-11e9-be15-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b86961c6-ad96-11e9-9926-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:46 GMT'] + x-ms-version: ['2018-03-28'] method: GET uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages response: - body: - string: "\uFEFF193f415e-aabc-46e0-9209-48d6f7dad682Sat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAl5b6Rzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:57 GMT1message1" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:27 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - f5f43dbf-6003-0099-4638-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 745b1524-952b-11e9-b3c4-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + body: {string: "\uFEFF8c67a6da-dc58-453c-a32c-2357250782d6Tue, + 23 Jul 2019 22:10:45 GMTTue, 30 Jul 2019 22:10:45 + GMTAgAAAAMAAAAAAAAAA7gajKNB1QE=Tue, + 23 Jul 2019 22:11:16 GMT1message1"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + Vary: [Origin] + x-ms-request-id: [b462b090-6003-00dd-7ca3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b879b574-ad96-11e9-8ec6-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:46 GMT'] + x-ms-version: ['2018-03-28'] method: DELETE - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages/193f415e-aabc-46e0-9209-48d6f7dad682?popreceipt=AgAAAAMAAAAAAAAAl5b6Rzgp1QE%3D + uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages/8c67a6da-dc58-453c-a32c-2357250782d6?popreceipt=AgAAAAMAAAAAAAAAA7gajKNB1QE%3D response: - body: - string: '' + body: {string: ''} headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:22:27 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - f5f43dc3-6003-0099-4a38-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 204 - message: No Content + Content-Length: ['0'] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [b462b0b7-6003-00dd-1ba3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 204, message: No Content} - request: body: null headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 74643122-952b-11e9-b8fb-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:28 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b88a0908-ad96-11e9-9586-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:46 GMT'] + x-ms-version: ['2018-03-28'] method: GET uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages?numofmessages=32 response: - body: - string: "\uFEFF5b8f5b8c-25ca-42c2-a759-8feeba150f7cSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAul4NSDgp1QE=Sat,\ - \ 22 Jun 2019 20:22:58 GMT1message2d867e71b-a641-4b87-b534-4659d5016cfdSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAul4NSDgp1QE=Sat,\ - \ 22 Jun 2019 20:22:58 GMT1message31cafa96b-c8b4-41b7-8dcf-407fffd8661cSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAul4NSDgp1QE=Sat,\ - \ 22 Jun 2019 20:22:58 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:27 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - f5f43dc5-6003-0099-4c38-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - aee1db86-952d-11e9-9f94-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49 - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 24506b4c-4003-00ca-6e3a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af02a3ac-952d-11e9-bdc7-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF914e12cd-da29-4d7f-828a-393828adfbbeSat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAeuTKcDop1QE=Sat,\ - \ 22 Jun 2019 20:38:25 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 24506b5e-4003-00ca-7e3a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af0bd666-952d-11e9-a81d-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFFcd560872-1500-4081-9887-44a67792f515Sat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAzubTcDop1QE=Sat,\ - \ 22 Jun 2019 20:38:25 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 24506b71-4003-00ca-103a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af14a5f4-952d-11e9-bfa3-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFFa047b162-8bd6-4ca3-8393-245d7af6dd90Sat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAA3HPccDop1QE=Sat,\ - \ 22 Jun 2019 20:38:25 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 24506b7f-4003-00ca-1d3a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af1d518c-952d-11e9-bc94-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFFcb60022d-89e1-4c86-afdb-627d48e3250fSat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAAijlcDop1QE=Sat,\ - \ 22 Jun 2019 20:38:25 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 24506b9c-4003-00ca-363a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af261bca-952d-11e9-8a6d-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF914e12cd-da29-4d7f-828a-393828adfbbeSat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAVs3Pgjop1QE=Sat,\ - \ 22 Jun 2019 20:38:55 GMT1message1" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 24506baa-4003-00ca-443a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af2f5190-952d-11e9-a222-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: DELETE - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages/914e12cd-da29-4d7f-828a-393828adfbbe?popreceipt=AgAAAAMAAAAAAAAAVs3Pgjop1QE%3D - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 24506bc9-4003-00ca-5e3a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af389908-952d-11e9-9591-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' + body: {string: "\uFEFF53352c13-0ace-4405-a299-848592033386Tue, + 23 Jul 2019 22:10:45 GMTTue, 30 Jul 2019 22:10:45 + GMTAgAAAAMAAAAAAAAAl689jKNB1QE=Tue, + 23 Jul 2019 22:11:16 GMT1message2831f51e4-bdae-46c9-8085-7eb7ddf44022Tue, + 23 Jul 2019 22:10:46 GMTTue, 30 Jul 2019 22:10:46 + GMTAgAAAAMAAAAAAAAAl689jKNB1QE=Tue, + 23 Jul 2019 22:11:16 GMT1message3415e7230-45f9-423d-9090-b53936c23314Tue, + 23 Jul 2019 22:10:46 GMTTue, 30 Jul 2019 22:10:46 + GMTAgAAAAMAAAAAAAAAl689jKNB1QE=Tue, + 23 Jul 2019 22:11:16 GMT1message4"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + Vary: [Origin] + x-ms-request-id: [b462b0e0-6003-00dd-3da3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b89de61a-ad96-11e9-94f2-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:46 GMT'] + x-ms-version: ['2018-03-28'] method: GET uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages?numofmessages=32 response: - body: - string: "\uFEFFcd560872-1500-4081-9887-44a67792f515Sat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAX27igjop1QE=Sat,\ - \ 22 Jun 2019 20:38:55 GMT1message2a047b162-8bd6-4ca3-8393-245d7af6dd90Sat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAX27igjop1QE=Sat,\ - \ 22 Jun 2019 20:38:55 GMT1message3cb60022d-89e1-4c86-afdb-627d48e3250fSat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAX27igjop1QE=Sat,\ - \ 22 Jun 2019 20:38:55 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 24506bd7-4003-00ca-6b3a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK + body: {string: "\uFEFF"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + Vary: [Origin] + x-ms-request-id: [b462b112-6003-00dd-66a3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 200, message: OK} version: 1 diff --git a/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_get_messages_with_options.yaml b/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_get_messages_with_options.yaml index 4f79ec258033..cb18246850ef 100644 --- a/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_get_messages_with_options.yaml +++ b/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_get_messages_with_options.yaml @@ -2,1121 +2,200 @@ interactions: - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1cb5f240-952a-11e9-8690-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 4ce61f8f-6003-0033-1436-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1cdbdadc-952a-11e9-908b-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFc07a14fe-0248-49ac-84ef-9183eec8c1f9Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAyXih3jYp1QE=Sat,\ - \ 22 Jun 2019 20:12:51 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 4ce61f99-6003-0033-1b36-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1ce4762e-952a-11e9-9f63-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF8c47bcca-e16f-4b92-92b1-15e94379eb52Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAwd6p3jYp1QE=Sat,\ - \ 22 Jun 2019 20:12:51 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 4ce61f9a-6003-0033-1c36-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1cecec34-952a-11e9-a5e2-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFee5ab552-39a9-40a8-ad63-d94e3b486906Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAtESy3jYp1QE=Sat,\ - \ 22 Jun 2019 20:12:51 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 4ce61f9f-6003-0033-2136-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1cf568ee-952a-11e9-bb36-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFd1646c72-1aa6-423b-a070-0cfc5d649668Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAmYO63jYp1QE=Sat,\ - \ 22 Jun 2019 20:12:51 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 4ce61fab-6003-0033-2c36-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1cfd9dfa-952a-11e9-896e-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f/messages?numofmessages=4&visibilitytimeout=20 - response: - body: - string: "\uFEFFc07a14fe-0248-49ac-84ef-9183eec8c1f9Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAkquu6jYp1QE=Sat,\ - \ 22 Jun 2019 20:13:11 GMT1message18c47bcca-e16f-4b92-92b1-15e94379eb52Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAkquu6jYp1QE=Sat,\ - \ 22 Jun 2019 20:13:11 GMT1message2ee5ab552-39a9-40a8-ad63-d94e3b486906Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAkquu6jYp1QE=Sat,\ - \ 22 Jun 2019 20:13:11 GMT1message3d1646c72-1aa6-423b-a070-0cfc5d649668Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAkquu6jYp1QE=Sat,\ - \ 22 Jun 2019 20:13:11 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 4ce61fb4-6003-0033-3536-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de5c3670-952a-11e9-837b-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [eb8b0f92-ad90-11e9-ad43-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + x-ms-version: ['2018-03-28'] method: PUT uri: https://storagename.queue.core.windows.net/pythonqueue6405110f response: - body: - string: '' + body: {string: ''} headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:18:15 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - e1a897ac-1003-0073-2a37-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Length: ['0'] + Date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [ab763224-9003-000f-719d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message1' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de7c09d2-952a-11e9-a68c-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ebe04322-ad90-11e9-90d1-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages response: - body: - string: "\uFEFF4a3e7e24-0f9b-488d-a93e-8f6c52511bd4Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAG91CoDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:16 GMT" + body: {string: "\uFEFF1aea519c-55e7-4613-a635-11e894f3f1cdTue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAiP6wrZ1B1QE=Tue, + 23 Jul 2019 21:29:15 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:16 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - e1a897b4-1003-0073-2e37-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [ab763242-9003-000f-099d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message2' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de8504a6-952a-11e9-b42e-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ebf1ec6c-ad90-11e9-a1a9-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages response: - body: - string: "\uFEFF6382f360-4bb2-4635-bbb0-0a2bdb1bc21bSat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAhwZMoDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:16 GMT" + body: {string: "\uFEFFfcc1b957-6743-4cd8-9a37-561f4e76a694Tue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAtJHArZ1B1QE=Tue, + 23 Jul 2019 21:29:15 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:16 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - e1a897bc-1003-0073-3337-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [ab76324f-9003-000f-159d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message3' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de8e1458-952a-11e9-8ed7-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ec017d92-ad90-11e9-9118-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages response: - body: - string: "\uFEFF4aa83d39-8722-46ab-a654-897fc8ff05b4Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAxOFUoDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:16 GMT" + body: {string: "\uFEFFb6cf0c16-2d49-40fc-93bb-29e45e32ec5bTue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAbA/RrZ1B1QE=Tue, + 23 Jul 2019 21:29:15 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:16 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - e1a897c8-1003-0073-3a37-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [ab76325c-9003-000f-209d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message4' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de96f262-952a-11e9-b5f5-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ec129446-ad90-11e9-9a37-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages response: - body: - string: "\uFEFF5425bc84-4683-47e1-bfe0-f38ddb517178Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAA6ZVdoDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:16 GMT" + body: {string: "\uFEFFee1fb3f0-9d97-49bf-87d6-46e6403847cfTue, + 23 Jul 2019 21:29:16 GMTTue, 30 Jul 2019 21:29:16 + GMTAgAAAAMAAAAAAAAAwPDgrZ1B1QE=Tue, + 23 Jul 2019 21:29:16 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:16 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - e1a897cf-1003-0073-3f37-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [ab76326e-9003-000f-309d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: null headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de9f9886-952a-11e9-bd95-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ec21afd2-ad90-11e9-b00f-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:16 GMT'] + x-ms-version: ['2018-03-28'] method: GET uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages?numofmessages=4&visibilitytimeout=20 response: - body: - string: "\uFEFF4a3e7e24-0f9b-488d-a93e-8f6c52511bd4Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAVYFSrDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:36 GMT1message16382f360-4bb2-4635-bbb0-0a2bdb1bc21bSat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAVYFSrDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:36 GMT1message24aa83d39-8722-46ab-a654-897fc8ff05b4Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAVYFSrDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:36 GMT1message35425bc84-4683-47e1-bfe0-f38ddb517178Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAVYFSrDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:36 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:16 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - e1a897d5-1003-0073-4437-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK + body: {string: "\uFEFF1aea519c-55e7-4613-a635-11e894f3f1cdTue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAXQnduZ1B1QE=Tue, + 23 Jul 2019 21:29:36 GMT1message1fcc1b957-6743-4cd8-9a37-561f4e76a694Tue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAXQnduZ1B1QE=Tue, + 23 Jul 2019 21:29:36 GMT1message2b6cf0c16-2d49-40fc-93bb-29e45e32ec5bTue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAXQnduZ1B1QE=Tue, + 23 Jul 2019 21:29:36 GMT1message3ee1fb3f0-9d97-49bf-87d6-46e6403847cfTue, + 23 Jul 2019 21:29:16 GMTTue, 30 Jul 2019 21:29:16 + GMTAgAAAAMAAAAAAAAAXQnduZ1B1QE=Tue, + 23 Jul 2019 21:29:36 GMT1message4"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:16 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + Vary: [Origin] + x-ms-request-id: [ab763281-9003-000f-3f9d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 200, message: OK} - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 75ccf3fa-952b-11e9-aff5-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 7df02fa6-3003-00ec-1538-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 75ed5910-952b-11e9-be2b-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF75b37bc0-c7e6-48e8-9ce3-94d914932dabSat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAqu20Nzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:30 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 7df02faf-3003-00ec-1b38-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 75f69162-952b-11e9-bff9-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFf4e91262-01c6-48ae-bc09-7af40ee60c6bSat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAA58i9Nzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:30 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 7df02fb3-3003-00ec-1f38-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 75ff663a-952b-11e9-adab-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF7001b035-8d54-406a-82b5-69753b3448e6Sat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAADX3GNzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:30 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 7df02fba-3003-00ec-2638-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 76087c36-952b-11e9-9eae-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF1ab76e0f-1d96-42d7-999c-3accd5230ee2Sat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAYX/PNzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:30 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 7df02fbd-3003-00ec-2938-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 76115afe-952b-11e9-8512-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ec33efd0-ad90-11e9-a453-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:16 GMT'] + x-ms-version: ['2018-03-28'] method: GET uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages?numofmessages=4&visibilitytimeout=20 response: - body: - string: "\uFEFF75b37bc0-c7e6-48e8-9ce3-94d914932dabSat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAtUPEQzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:50 GMT1message1f4e91262-01c6-48ae-bc09-7af40ee60c6bSat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAtUPEQzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:50 GMT1message27001b035-8d54-406a-82b5-69753b3448e6Sat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAtUPEQzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:50 GMT1message31ab76e0f-1d96-42d7-999c-3accd5230ee2Sat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAtUPEQzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:50 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 7df02fc2-3003-00ec-2e38-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b0efd498-952d-11e9-a770-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:28 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - abd1b919-4003-0006-193a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b11061ac-952d-11e9-b8b8-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:28 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFe2a1644d-981b-4c48-8b4c-fc8b539037f3Sat,\ - \ 22 Jun 2019 20:38:28 GMTSat, 29 Jun 2019\ - \ 20:38:28 GMTAgAAAAMAAAAAAAAA2cfYcjop1QE=Sat,\ - \ 22 Jun 2019 20:38:28 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - abd1b924-4003-0006-213a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b1198976-952d-11e9-a7a0-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:28 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF26981b56-716f-4f72-af1e-301773a26c92Sat,\ - \ 22 Jun 2019 20:38:28 GMTSat, 29 Jun 2019\ - \ 20:38:28 GMTAgAAAAMAAAAAAAAAAnzhcjop1QE=Sat,\ - \ 22 Jun 2019 20:38:28 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - abd1b929-4003-0006-263a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b1222c70-952d-11e9-ab5a-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:28 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFdebf68ee-14a5-4669-a34b-3e8092fe04a1Sat,\ - \ 22 Jun 2019 20:38:29 GMTSat, 29 Jun 2019\ - \ 20:38:29 GMTAgAAAAMAAAAAAAAAQ1fqcjop1QE=Sat,\ - \ 22 Jun 2019 20:38:29 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - abd1b932-4003-0006-2d3a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b12b1240-952d-11e9-afa4-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:28 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF103e9ae6-f20c-4d69-aede-b0d740fba873Sat,\ - \ 22 Jun 2019 20:38:29 GMTSat, 29 Jun 2019\ - \ 20:38:29 GMTAgAAAAMAAAAAAAAA+PXzcjop1QE=Sat,\ - \ 22 Jun 2019 20:38:29 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - abd1b93b-4003-0006-343a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b134a7ec-952d-11e9-a776-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:29 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages?numofmessages=4&visibilitytimeout=20 - response: - body: - string: "\uFEFFe2a1644d-981b-4c48-8b4c-fc8b539037f3Sat,\ - \ 22 Jun 2019 20:38:28 GMTSat, 29 Jun 2019\ - \ 20:38:28 GMTAgAAAAMAAAAAAAAAIWzofjop1QE=Sat,\ - \ 22 Jun 2019 20:38:49 GMT1message126981b56-716f-4f72-af1e-301773a26c92Sat,\ - \ 22 Jun 2019 20:38:28 GMTSat, 29 Jun 2019\ - \ 20:38:28 GMTAgAAAAMAAAAAAAAAIWzofjop1QE=Sat,\ - \ 22 Jun 2019 20:38:49 GMT1message2debf68ee-14a5-4669-a34b-3e8092fe04a1Sat,\ - \ 22 Jun 2019 20:38:29 GMTSat, 29 Jun 2019\ - \ 20:38:29 GMTAgAAAAMAAAAAAAAAIWzofjop1QE=Sat,\ - \ 22 Jun 2019 20:38:49 GMT1message3103e9ae6-f20c-4d69-aede-b0d740fba873Sat,\ - \ 22 Jun 2019 20:38:29 GMTSat, 29 Jun 2019\ - \ 20:38:29 GMTAgAAAAMAAAAAAAAAIWzofjop1QE=Sat,\ - \ 22 Jun 2019 20:38:49 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - abd1b940-4003-0006-383a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK + body: {string: "\uFEFF"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:16 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + Vary: [Origin] + x-ms-request-id: [ab763289-9003-000f-479d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 200, message: OK} version: 1 diff --git a/sdk/storage/azure-storage-queue/tests/test_queue.py b/sdk/storage/azure-storage-queue/tests/test_queue.py index 8df7fc472476..1aa1e14536ba 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue.py @@ -158,16 +158,13 @@ def test_list_queues_with_options(self): # Action generator1 = self.qsc.list_queues( name_starts_with=prefix, - results_per_page=3) - next(generator1) - queues1 = generator1.current_page + results_per_page=3).by_page() + queues1 = list(next(generator1)) generator2 = self.qsc.list_queues( name_starts_with=prefix, - marker=generator1.next_marker, - include_metadata=True) - next(generator2) - queues2 = generator2.current_page + include_metadata=True).by_page(generator1.continuation_token) + queues2 = list(next(generator2)) # Asserts self.assertIsNotNone(queues1) @@ -175,6 +172,7 @@ def test_list_queues_with_options(self): self.assertIsNotNone(queues1[0]) self.assertIsNone(queues1[0].metadata) self.assertNotEqual('', queues1[0].name) + assert generator1.location_mode is not None # Asserts self.assertIsNotNone(queues2) self.assertTrue(len(self.test_queues) - 3 <= len(queues2)) @@ -317,14 +315,14 @@ def test_get_messages_with_options(self): queue_client.enqueue_message(u'message2') queue_client.enqueue_message(u'message3') queue_client.enqueue_message(u'message4') - result = queue_client.receive_messages(messages_per_page=4, visibility_timeout=20) - next(result) + pager = queue_client.receive_messages(messages_per_page=4, visibility_timeout=20) + result = list(pager) # Asserts self.assertIsNotNone(result) - self.assertEqual(4, len(result.current_page)) + self.assertEqual(4, len(result)) - for message in result.current_page: + for message in result: self.assertIsNotNone(message) self.assertNotEqual('', message.id) self.assertNotEqual('', message.content) @@ -406,12 +404,12 @@ def test_delete_message(self): message = next(queue_client.receive_messages()) queue_client.delete_message(message) - messages = queue_client.receive_messages(messages_per_page=32) - next(messages) + messages_pager = queue_client.receive_messages(messages_per_page=32) + messages = list(messages_pager) # Asserts - self.assertIsNotNone(messages) - self.assertEqual(3, len(messages.current_page)) + assert messages is not None + assert len(messages) == 3 @record def test_update_message(self): From 2a9fbf5099e992f6d249efd94ef5daff9fda5a51 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 15:48:49 -0700 Subject: [PATCH 011/244] get rid of should only propagate (#6497) --- .../pipeline/policies/distributed_tracing.py | 8 +----- sdk/core/azure-core/azure/core/settings.py | 4 --- .../azure-core/azure/core/tracing/common.py | 7 ----- .../azure/core/tracing/decorator.py | 2 +- .../azure/core/tracing/decorator_async.py | 2 +- .../test_tracing_decorator_async.py | 20 -------------- sdk/core/azure-core/tests/test_settings.py | 6 ++--- .../tests/test_tracing_decorator.py | 27 ------------------- .../azure-core/tests/test_tracing_policy.py | 6 +++-- sdk/core/azure-core/tests/tracing_common.py | 6 +---- 10 files changed, 10 insertions(+), 78 deletions(-) diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/distributed_tracing.py b/sdk/core/azure-core/azure/core/pipeline/policies/distributed_tracing.py index 229b7d4380b5..ee6c1a36109f 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/distributed_tracing.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/distributed_tracing.py @@ -77,11 +77,6 @@ def on_request(self, request): if parent_span is None: return - only_propagate = settings.tracing_should_only_propagate() - if only_propagate: - self.set_header(request, parent_span) - return - path = urlparse(request.http_request.url).path if not path: path = "/" @@ -96,8 +91,7 @@ def end_span(self, request, response=None): # type: (HttpRequest, Optional[HttpResponse]) -> None """Ends the span that is tracing the network and updates its status.""" span = tracing_context.current_span.get() # type: AbstractSpan - only_propagate = settings.tracing_should_only_propagate() - if span and not only_propagate: + if span is not None: span.set_http_attributes(request, response=response) request_id = request.headers.get(self._request_id) if request_id is not None: diff --git a/sdk/core/azure-core/azure/core/settings.py b/sdk/core/azure-core/azure/core/settings.py index e1b4c738cdb8..6bc71c9e850c 100644 --- a/sdk/core/azure-core/azure/core/settings.py +++ b/sdk/core/azure-core/azure/core/settings.py @@ -410,9 +410,5 @@ def _config(self, props): # pylint: disable=no-self-use "tracing_implementation", env_var="AZURE_SDK_TRACING_IMPLEMENTATION", convert=convert_tracing_impl, default=None ) - tracing_should_only_propagate = PrioritizedSetting( - "tracing_should_only_propagate", env_var="AZURE_TRACING_ONLY_PROPAGATE", convert=convert_bool, default=False - ) - settings = Settings() diff --git a/sdk/core/azure-core/azure/core/tracing/common.py b/sdk/core/azure-core/azure/core/tracing/common.py index f6e4716a2eb8..b0e425a14d10 100644 --- a/sdk/core/azure-core/azure/core/tracing/common.py +++ b/sdk/core/azure-core/azure/core/tracing/common.py @@ -83,10 +83,3 @@ def get_parent_span(parent_span): ) return parent_span - - -def should_use_trace(parent_span): - # type: (AbstractSpan) -> bool - """Given Parent Span Returns whether the function should be traced""" - only_propagate = settings.tracing_should_only_propagate() - return bool(parent_span and not only_propagate) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 9f647f3333c4..7d5d7bfce407 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if common.should_use_trace(parent_span): + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 1440f86525e2..781e20a6bef2 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if common.should_use_trace(parent_span): + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index 7fb903037d80..8b43ddf71a62 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -149,23 +149,3 @@ async def test_span_with_opencensus_complicated(value): assert parent.children[3].children[1].span_data.name == "MockClient.make_request" children = parent.children[1].children assert len(children) == 2 - - -@pytest.mark.asyncio -async def test_should_only_propagate(): - with ContextHelper(should_only_propagate=True): - exporter = MockExporter() - trace = tracer_module.Tracer(sampler=AlwaysOnSampler(), exporter=exporter) - with trace.start_span(name="OverAll") as parent: - client = MockClient() - await client.make_request(2) - with trace.span("child") as child: - await client.make_request(2, parent_span=parent) - assert OpenCensusSpan.get_current_span() == child - await client.make_request(2) - trace.finish() - exporter.build_tree() - parent = exporter.root - assert len(parent.children) == 1 - assert parent.children[0].span_data.name == "child" - assert not parent.children[0].children diff --git a/sdk/core/azure-core/tests/test_settings.py b/sdk/core/azure-core/tests/test_settings.py index 11e9dc48d523..1975c1adc6f3 100644 --- a/sdk/core/azure-core/tests/test_settings.py +++ b/sdk/core/azure-core/tests/test_settings.py @@ -217,20 +217,18 @@ def test_defaults(self): val = m.settings.defaults # assert isinstance(val, tuple) defaults = m.settings.config( - log_level=20, tracing_enabled=False, tracing_implementation=None, tracing_should_only_propagate=False + log_level=20, tracing_enabled=False, tracing_implementation=None ) assert val.log_level == defaults.log_level assert val.tracing_enabled == defaults.tracing_enabled assert val.tracing_implementation == defaults.tracing_implementation - assert val.tracing_should_only_propagate == defaults.tracing_should_only_propagate os.environ["AZURE_LOG_LEVEL"] = "debug" defaults = m.settings.config( - log_level=20, tracing_enabled=False, tracing_implementation=None, tracing_should_only_propagate=False + log_level=20, tracing_enabled=False, tracing_implementation=None ) assert val.log_level == defaults.log_level assert val.tracing_enabled == defaults.tracing_enabled assert val.tracing_implementation == defaults.tracing_implementation - assert val.tracing_should_only_propagate == defaults.tracing_should_only_propagate del os.environ["AZURE_LOG_LEVEL"] def test_current(self): diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index 873871f5b222..473060f6097a 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -105,15 +105,6 @@ def test_get_parent_span(self): should_be_old_parent = common.get_parent_span(parent.span_instance) assert should_be_old_parent.span_instance == parent.span_instance - def test_should_use_trace(self): - with ContextHelper(environ={"AZURE_TRACING_ONLY_PROPAGATE": "yes"}): - parent_span = OpenCensusSpan() - assert not common.should_use_trace(parent_span) - assert not common.should_use_trace(None) - parent_span = OpenCensusSpan() - assert common.should_use_trace(parent_span) - assert not common.should_use_trace(None) - class TestDecorator(object): def test_decorator_has_different_name(self): @@ -190,21 +181,3 @@ def test_span_with_opencensus_complicated(self, value): assert parent.children[3].children[1].span_data.name == "MockClient.make_request" children = parent.children[1].children assert len(children) == 2 - - def test_should_only_propagate(self): - with ContextHelper(should_only_propagate=True): - exporter = MockExporter() - trace = tracer_module.Tracer(sampler=AlwaysOnSampler(), exporter=exporter) - with trace.start_span(name="OverAll") as parent: - client = MockClient() - client.make_request(2) - with trace.span("child") as child: - client.make_request(2, parent_span=parent) - assert OpenCensusSpan.get_current_span() == child - client.make_request(2) - trace.finish() - exporter.build_tree() - parent = exporter.root - assert len(parent.children) == 1 - assert parent.children[0].span_data.name == "child" - assert not parent.children[0].children diff --git a/sdk/core/azure-core/tests/test_tracing_policy.py b/sdk/core/azure-core/tests/test_tracing_policy.py index 450baa2f4f1e..be7e1adf98e9 100644 --- a/sdk/core/azure-core/tests/test_tracing_policy.py +++ b/sdk/core/azure-core/tests/test_tracing_policy.py @@ -72,13 +72,15 @@ def test_distributed_tracing_policy_solo(should_set_sdk_context): assert network_span.span_data.attributes.get("http.status_code") == 504 -def test_distributed_tracing_policy_with_user_agent(): +@pytest.mark.parametrize("should_set_sdk_context", [True, False]) +def test_distributed_tracing_policy_with_user_agent(should_set_sdk_context): """Test policy working with user agent.""" with ContextHelper(environ={"AZURE_HTTP_USER_AGENT": "mytools"}): exporter = MockExporter() trace = tracer_module.Tracer(sampler=AlwaysOnSampler(), exporter=exporter) with trace.span("parent"): - tracing_context.current_span.set(OpenCensusSpan(trace.current_span())) + if should_set_sdk_context: + tracing_context.current_span.set(OpenCensusSpan(trace.current_span())) policy = DistributedTracingPolicy() request = HttpRequest("GET", "http://127.0.0.1") diff --git a/sdk/core/azure-core/tests/tracing_common.py b/sdk/core/azure-core/tests/tracing_common.py index 18f9b4e9f839..7fecf1d746f8 100644 --- a/sdk/core/azure-core/tests/tracing_common.py +++ b/sdk/core/azure-core/tests/tracing_common.py @@ -22,13 +22,12 @@ class ContextHelper(object): - def __init__(self, environ={}, tracer_to_use=None, should_only_propagate=None): + def __init__(self, environ={}, tracer_to_use=None): self.orig_tracer = OpenCensusSpan.get_current_tracer() self.orig_current_span = OpenCensusSpan.get_current_span() self.orig_sdk_context_span = tracing_context.current_span.get() self.os_env = mock.patch.dict(os.environ, environ) self.tracer_to_use = tracer_to_use - self.should_only_propagate = should_only_propagate def __enter__(self): self.orig_tracer = OpenCensusSpan.get_current_tracer() @@ -38,8 +37,6 @@ def __enter__(self): tracing_context.current_span.clear() if self.tracer_to_use is not None: settings.tracing_implementation.set_value(self.tracer_to_use) - if self.should_only_propagate is not None: - settings.tracing_should_only_propagate.set_value(self.should_only_propagate) self.os_env.start() execution_context.clear() tracing_context.current_span.clear() @@ -50,7 +47,6 @@ def __exit__(self, exc_type, exc_val, exc_tb): OpenCensusSpan.set_current_span(self.orig_current_span) tracing_context.current_span.set(self.orig_sdk_context_span) settings.tracing_implementation.unset_value() - settings.tracing_should_only_propagate.unset_value() self.os_env.stop() From 4a294928691080a6300a4d737cf57bc38cf3af3f Mon Sep 17 00:00:00 2001 From: Dan Schulte Date: Thu, 25 Jul 2019 18:49:01 -0700 Subject: [PATCH 012/244] Enable SDK Automation pull requests (#6498) --- swagger_to_sdk_config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swagger_to_sdk_config.json b/swagger_to_sdk_config.json index 4bad085c48f9..bae8c63cefa0 100644 --- a/swagger_to_sdk_config.json +++ b/swagger_to_sdk_config.json @@ -1,5 +1,5 @@ { - "$schema": "https://openapistoragetest.blob.core.windows.net/sdkautomation/test/schemas/swagger_to_sdk_config.schema.json", + "$schema": "https://openapistorageprod.blob.core.windows.net/sdkautomation/prod/schemas/swagger_to_sdk_config.schema.json", "meta": { "autorest_options": { "version": "preview", From fd6b7ce456abc34176277437f59bfbfa2ac9dd06 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 26 Jul 2019 02:57:37 -0700 Subject: [PATCH 013/244] [AutoPR] devtestlabs/resource-manager (#6414) * [AutoPR devtestlabs/resource-manager] [Hub Generated] Review request for Microsoft.DevTestLab to add version stable/2018-09-15 (#6359) * Generated from c64177b58d5905986be6a16e270986ccfad08d25 Modification of PATCH description, plus minor fixes * Packaging update of azure-mgmt-devtestlabs * Generated from c2786532a6bf80ceb9cddda5e2c8b8abc09d6b30 Update specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/DTL.json Co-Authored-By: Nick Schonning * modified history and version * Added general breaking changes note * fixed indentation --- .../azure-mgmt-devtestlabs/HISTORY.rst | 19 + .../azure-mgmt-devtestlabs/MANIFEST.in | 1 + .../azure-mgmt-devtestlabs/README.rst | 2 +- .../azure/mgmt/devtestlabs/__init__.py | 7 +- .../azure/mgmt/devtestlabs/_configuration.py | 48 + ...abs_client.py => _dev_test_labs_client.py} | 86 +- .../azure/mgmt/devtestlabs/models/__init__.py | 744 ++- ...nums.py => _dev_test_labs_client_enums.py} | 2 + .../azure/mgmt/devtestlabs/models/_models.py | 5702 +++++++++++++++++ .../mgmt/devtestlabs/models/_models_py3.py | 5702 +++++++++++++++++ .../mgmt/devtestlabs/models/_paged_models.py | 261 + .../devtestlabs/models/applicable_schedule.py | 59 - .../models/applicable_schedule_fragment.py | 38 - .../applicable_schedule_fragment_py3.py | 38 - .../models/applicable_schedule_py3.py | 59 - .../models/apply_artifacts_request.py | 29 - .../models/apply_artifacts_request_py3.py | 29 - .../mgmt/devtestlabs/models/arm_template.py | 90 - .../devtestlabs/models/arm_template_info.py | 32 - .../models/arm_template_info_py3.py | 32 - .../devtestlabs/models/arm_template_paged.py | 27 - .../arm_template_parameter_properties.py | 32 - ..._template_parameter_properties_fragment.py | 32 - ...plate_parameter_properties_fragment_py3.py | 32 - .../arm_template_parameter_properties_py3.py | 32 - .../devtestlabs/models/arm_template_py3.py | 90 - .../azure/mgmt/devtestlabs/models/artifact.py | 88 - .../artifact_deployment_status_properties.py | 38 - ...t_deployment_status_properties_fragment.py | 38 - ...ployment_status_properties_fragment_py3.py | 38 - ...tifact_deployment_status_properties_py3.py | 38 - .../models/artifact_install_properties.py | 55 - .../artifact_install_properties_fragment.py | 55 - ...rtifact_install_properties_fragment_py3.py | 55 - .../models/artifact_install_properties_py3.py | 55 - .../mgmt/devtestlabs/models/artifact_paged.py | 27 - .../models/artifact_parameter_properties.py | 32 - .../artifact_parameter_properties_fragment.py | 32 - ...ifact_parameter_properties_fragment_py3.py | 32 - .../artifact_parameter_properties_py3.py | 32 - .../mgmt/devtestlabs/models/artifact_py3.py | 88 - .../devtestlabs/models/artifact_source.py | 100 - .../models/artifact_source_fragment.py | 63 - .../models/artifact_source_fragment_py3.py | 63 - .../models/artifact_source_paged.py | 27 - .../devtestlabs/models/artifact_source_py3.py | 100 - .../models/attach_disk_properties.py | 29 - .../models/attach_disk_properties_py3.py | 29 - .../models/attach_new_data_disk_options.py | 37 - .../attach_new_data_disk_options_fragment.py | 37 - ...tach_new_data_disk_options_fragment_py3.py | 37 - .../attach_new_data_disk_options_py3.py | 37 - .../models/bulk_creation_parameters.py | 28 - .../bulk_creation_parameters_fragment.py | 28 - .../bulk_creation_parameters_fragment_py3.py | 28 - .../models/bulk_creation_parameters_py3.py | 28 - .../devtestlabs/models/compute_data_disk.py | 41 - .../models/compute_data_disk_fragment.py | 41 - .../models/compute_data_disk_fragment_py3.py | 41 - .../models/compute_data_disk_py3.py | 41 - .../models/compute_vm_instance_view_status.py | 36 - ...ompute_vm_instance_view_status_fragment.py | 36 - ...te_vm_instance_view_status_fragment_py3.py | 36 - .../compute_vm_instance_view_status_py3.py | 36 - .../models/compute_vm_properties.py | 54 - .../models/compute_vm_properties_fragment.py | 55 - .../compute_vm_properties_fragment_py3.py | 55 - .../models/compute_vm_properties_py3.py | 54 - .../models/cost_threshold_properties.py | 51 - .../models/cost_threshold_properties_py3.py | 51 - .../mgmt/devtestlabs/models/custom_image.py | 106 - .../models/custom_image_fragment.py | 71 - .../models/custom_image_fragment_py3.py | 71 - .../devtestlabs/models/custom_image_paged.py | 27 - .../models/custom_image_properties_custom.py | 43 - ...custom_image_properties_custom_fragment.py | 37 - ...om_image_properties_custom_fragment_py3.py | 37 - .../custom_image_properties_custom_py3.py | 43 - .../custom_image_properties_from_plan.py | 38 - ...tom_image_properties_from_plan_fragment.py | 38 - ...image_properties_from_plan_fragment_py3.py | 38 - .../custom_image_properties_from_plan_py3.py | 38 - .../models/custom_image_properties_from_vm.py | 36 - ...ustom_image_properties_from_vm_fragment.py | 37 - ...m_image_properties_from_vm_fragment_py3.py | 37 - .../custom_image_properties_from_vm_py3.py | 36 - .../devtestlabs/models/custom_image_py3.py | 106 - .../models/data_disk_properties.py | 41 - .../models/data_disk_properties_fragment.py | 41 - .../data_disk_properties_fragment_py3.py | 41 - .../models/data_disk_properties_py3.py | 41 - .../models/data_disk_storage_type_info.py | 33 - .../data_disk_storage_type_info_fragment.py | 33 - ...ata_disk_storage_type_info_fragment_py3.py | 33 - .../models/data_disk_storage_type_info_py3.py | 33 - .../mgmt/devtestlabs/models/day_details.py | 28 - .../models/day_details_fragment.py | 28 - .../models/day_details_fragment_py3.py | 28 - .../devtestlabs/models/day_details_py3.py | 28 - .../models/detach_data_disk_properties.py | 29 - .../models/detach_data_disk_properties_py3.py | 29 - .../models/detach_disk_properties.py | 29 - .../models/detach_disk_properties_py3.py | 29 - .../azure/mgmt/devtestlabs/models/disk.py | 97 - .../mgmt/devtestlabs/models/disk_fragment.py | 60 - .../devtestlabs/models/disk_fragment_py3.py | 60 - .../mgmt/devtestlabs/models/disk_paged.py | 27 - .../azure/mgmt/devtestlabs/models/disk_py3.py | 97 - .../devtestlabs/models/dtl_environment.py | 81 - .../models/dtl_environment_fragment.py | 38 - .../models/dtl_environment_fragment_py3.py | 38 - .../models/dtl_environment_paged.py | 27 - .../devtestlabs/models/dtl_environment_py3.py | 81 - .../environment_deployment_properties.py | 33 - ...ironment_deployment_properties_fragment.py | 33 - ...ment_deployment_properties_fragment_py3.py | 33 - .../environment_deployment_properties_py3.py | 33 - .../models/evaluate_policies_properties.py | 40 - .../evaluate_policies_properties_py3.py | 40 - .../models/evaluate_policies_request.py | 29 - .../models/evaluate_policies_request_py3.py | 29 - .../models/evaluate_policies_response.py | 28 - .../models/evaluate_policies_response_py3.py | 28 - .../azure/mgmt/devtestlabs/models/event.py | 30 - .../mgmt/devtestlabs/models/event_fragment.py | 30 - .../devtestlabs/models/event_fragment_py3.py | 30 - .../mgmt/devtestlabs/models/event_py3.py | 30 - .../export_resource_usage_parameters.py | 35 - .../export_resource_usage_parameters_py3.py | 35 - .../devtestlabs/models/external_subnet.py | 32 - .../models/external_subnet_fragment.py | 32 - .../models/external_subnet_fragment_py3.py | 32 - .../devtestlabs/models/external_subnet_py3.py | 32 - .../azure/mgmt/devtestlabs/models/formula.py | 85 - .../devtestlabs/models/formula_fragment.py | 48 - .../models/formula_fragment_py3.py | 48 - .../mgmt/devtestlabs/models/formula_paged.py | 27 - .../models/formula_properties_from_vm.py | 29 - .../formula_properties_from_vm_fragment.py | 29 - ...formula_properties_from_vm_fragment_py3.py | 29 - .../models/formula_properties_from_vm_py3.py | 29 - .../mgmt/devtestlabs/models/formula_py3.py | 85 - .../mgmt/devtestlabs/models/gallery_image.py | 83 - .../devtestlabs/models/gallery_image_paged.py | 27 - .../devtestlabs/models/gallery_image_py3.py | 83 - .../models/gallery_image_reference.py | 44 - .../gallery_image_reference_fragment.py | 44 - .../gallery_image_reference_fragment_py3.py | 44 - .../models/gallery_image_reference_py3.py | 44 - .../models/generate_arm_template_request.py | 43 - .../generate_arm_template_request_py3.py | 43 - .../models/generate_upload_uri_parameter.py | 28 - .../generate_upload_uri_parameter_py3.py | 28 - .../models/generate_upload_uri_response.py | 28 - .../generate_upload_uri_response_py3.py | 28 - .../mgmt/devtestlabs/models/hour_details.py | 28 - .../models/hour_details_fragment.py | 28 - .../models/hour_details_fragment_py3.py | 28 - .../devtestlabs/models/hour_details_py3.py | 28 - .../devtestlabs/models/identity_properties.py | 40 - .../models/identity_properties_py3.py | 40 - .../import_lab_virtual_machine_request.py | 35 - .../import_lab_virtual_machine_request_py3.py | 35 - .../devtestlabs/models/inbound_nat_rule.py | 42 - .../models/inbound_nat_rule_fragment.py | 42 - .../models/inbound_nat_rule_fragment_py3.py | 42 - .../models/inbound_nat_rule_py3.py | 42 - .../azure/mgmt/devtestlabs/models/lab.py | 165 - .../models/lab_announcement_properties.py | 64 - .../lab_announcement_properties_fragment.py | 47 - ...ab_announcement_properties_fragment_py3.py | 47 - .../models/lab_announcement_properties_py3.py | 64 - .../azure/mgmt/devtestlabs/models/lab_cost.py | 97 - .../models/lab_cost_details_properties.py | 37 - .../models/lab_cost_details_properties_py3.py | 37 - .../mgmt/devtestlabs/models/lab_cost_py3.py | 97 - .../models/lab_cost_summary_properties.py | 28 - .../models/lab_cost_summary_properties_py3.py | 28 - .../mgmt/devtestlabs/models/lab_fragment.py | 78 - .../devtestlabs/models/lab_fragment_py3.py | 78 - .../mgmt/devtestlabs/models/lab_paged.py | 27 - .../azure/mgmt/devtestlabs/models/lab_py3.py | 165 - .../models/lab_resource_cost_properties.py | 63 - .../lab_resource_cost_properties_py3.py | 63 - .../models/lab_support_properties.py | 34 - .../models/lab_support_properties_fragment.py | 34 - .../lab_support_properties_fragment_py3.py | 34 - .../models/lab_support_properties_py3.py | 34 - .../azure/mgmt/devtestlabs/models/lab_vhd.py | 28 - .../mgmt/devtestlabs/models/lab_vhd_paged.py | 27 - .../mgmt/devtestlabs/models/lab_vhd_py3.py | 28 - .../devtestlabs/models/lab_virtual_machine.py | 221 - .../lab_virtual_machine_creation_parameter.py | 192 - ...ual_machine_creation_parameter_fragment.py | 192 - ...machine_creation_parameter_fragment_py3.py | 192 - ..._virtual_machine_creation_parameter_py3.py | 192 - .../models/lab_virtual_machine_fragment.py | 177 - .../lab_virtual_machine_fragment_py3.py | 177 - .../models/lab_virtual_machine_paged.py | 27 - .../models/lab_virtual_machine_py3.py | 221 - .../mgmt/devtestlabs/models/linux_os_info.py | 30 - .../models/linux_os_info_fragment.py | 30 - .../models/linux_os_info_fragment_py3.py | 30 - .../devtestlabs/models/linux_os_info_py3.py | 30 - .../models/network_interface_properties.py | 65 - .../network_interface_properties_fragment.py | 65 - ...twork_interface_properties_fragment_py3.py | 65 - .../network_interface_properties_py3.py | 65 - .../models/notification_channel.py | 86 - .../models/notification_channel_fragment.py | 49 - .../notification_channel_fragment_py3.py | 49 - .../models/notification_channel_paged.py | 27 - .../models/notification_channel_py3.py | 86 - .../models/notification_settings.py | 49 - .../models/notification_settings_fragment.py | 49 - .../notification_settings_fragment_py3.py | 49 - .../models/notification_settings_py3.py | 49 - .../devtestlabs/models/notify_parameters.py | 34 - .../models/notify_parameters_py3.py | 34 - .../devtestlabs/models/operation_error.py | 32 - .../devtestlabs/models/operation_error_py3.py | 32 - .../devtestlabs/models/operation_metadata.py | 32 - .../models/operation_metadata_display.py | 41 - .../models/operation_metadata_display_py3.py | 41 - .../models/operation_metadata_paged.py | 27 - .../models/operation_metadata_py3.py | 32 - .../devtestlabs/models/operation_result.py | 48 - .../models/operation_result_py3.py | 48 - .../mgmt/devtestlabs/models/parameter_info.py | 32 - .../devtestlabs/models/parameter_info_py3.py | 32 - .../models/parameters_value_file_info.py | 32 - .../models/parameters_value_file_info_py3.py | 32 - .../percentage_cost_threshold_properties.py | 28 - ...ercentage_cost_threshold_properties_py3.py | 28 - .../azure/mgmt/devtestlabs/models/policy.py | 97 - .../devtestlabs/models/policy_fragment.py | 60 - .../devtestlabs/models/policy_fragment_py3.py | 60 - .../mgmt/devtestlabs/models/policy_paged.py | 27 - .../mgmt/devtestlabs/models/policy_py3.py | 97 - .../devtestlabs/models/policy_set_result.py | 34 - .../models/policy_set_result_py3.py | 34 - .../devtestlabs/models/policy_violation.py | 32 - .../models/policy_violation_py3.py | 32 - .../azure/mgmt/devtestlabs/models/port.py | 34 - .../mgmt/devtestlabs/models/port_fragment.py | 34 - .../devtestlabs/models/port_fragment_py3.py | 34 - .../azure/mgmt/devtestlabs/models/port_py3.py | 34 - .../mgmt/devtestlabs/models/rdp_connection.py | 28 - .../devtestlabs/models/rdp_connection_py3.py | 28 - .../resize_lab_virtual_machine_properties.py | 28 - ...size_lab_virtual_machine_properties_py3.py | 28 - .../azure/mgmt/devtestlabs/models/resource.py | 53 - .../mgmt/devtestlabs/models/resource_py3.py | 53 - .../models/retarget_schedule_properties.py | 34 - .../retarget_schedule_properties_py3.py | 34 - .../azure/mgmt/devtestlabs/models/schedule.py | 102 - .../models/schedule_creation_parameter.py | 74 - .../schedule_creation_parameter_fragment.py | 76 - ...chedule_creation_parameter_fragment_py3.py | 76 - .../models/schedule_creation_parameter_py3.py | 74 - .../devtestlabs/models/schedule_fragment.py | 67 - .../models/schedule_fragment_py3.py | 67 - .../mgmt/devtestlabs/models/schedule_paged.py | 27 - .../mgmt/devtestlabs/models/schedule_py3.py | 102 - .../azure/mgmt/devtestlabs/models/secret.py | 63 - .../devtestlabs/models/secret_fragment.py | 31 - .../devtestlabs/models/secret_fragment_py3.py | 31 - .../mgmt/devtestlabs/models/secret_paged.py | 27 - .../mgmt/devtestlabs/models/secret_py3.py | 63 - .../mgmt/devtestlabs/models/service_fabric.py | 76 - .../models/service_fabric_fragment.py | 37 - .../models/service_fabric_fragment_py3.py | 37 - .../models/service_fabric_paged.py | 27 - .../devtestlabs/models/service_fabric_py3.py | 76 - .../mgmt/devtestlabs/models/service_runner.py | 52 - .../models/service_runner_paged.py | 27 - .../devtestlabs/models/service_runner_py3.py | 52 - .../shared_public_ip_address_configuration.py | 30 - ...ublic_ip_address_configuration_fragment.py | 30 - ...c_ip_address_configuration_fragment_py3.py | 30 - ...red_public_ip_address_configuration_py3.py | 30 - .../models/shutdown_notification_content.py | 78 - .../shutdown_notification_content_py3.py | 78 - .../azure/mgmt/devtestlabs/models/subnet.py | 39 - .../devtestlabs/models/subnet_fragment.py | 39 - .../devtestlabs/models/subnet_fragment_py3.py | 39 - .../devtestlabs/models/subnet_override.py | 57 - .../models/subnet_override_fragment.py | 57 - .../models/subnet_override_fragment_py3.py | 57 - .../devtestlabs/models/subnet_override_py3.py | 57 - .../mgmt/devtestlabs/models/subnet_py3.py | 39 - ..._shared_public_ip_address_configuration.py | 29 - ...ublic_ip_address_configuration_fragment.py | 29 - ...c_ip_address_configuration_fragment_py3.py | 29 - ...red_public_ip_address_configuration_py3.py | 29 - .../models/target_cost_properties.py | 51 - .../models/target_cost_properties_py3.py | 51 - .../devtestlabs/models/update_resource.py | 28 - .../devtestlabs/models/update_resource_py3.py | 28 - .../azure/mgmt/devtestlabs/models/user.py | 72 - .../mgmt/devtestlabs/models/user_fragment.py | 35 - .../devtestlabs/models/user_fragment_py3.py | 35 - .../mgmt/devtestlabs/models/user_identity.py | 49 - .../models/user_identity_fragment.py | 49 - .../models/user_identity_fragment_py3.py | 49 - .../devtestlabs/models/user_identity_py3.py | 49 - .../mgmt/devtestlabs/models/user_paged.py | 27 - .../azure/mgmt/devtestlabs/models/user_py3.py | 72 - .../devtestlabs/models/user_secret_store.py | 32 - .../models/user_secret_store_fragment.py | 32 - .../models/user_secret_store_fragment_py3.py | 32 - .../models/user_secret_store_py3.py | 32 - .../devtestlabs/models/virtual_network.py | 88 - .../models/virtual_network_fragment.py | 45 - .../models/virtual_network_fragment_py3.py | 45 - .../models/virtual_network_paged.py | 27 - .../devtestlabs/models/virtual_network_py3.py | 88 - .../mgmt/devtestlabs/models/week_details.py | 33 - .../models/week_details_fragment.py | 33 - .../models/week_details_fragment_py3.py | 33 - .../devtestlabs/models/week_details_py3.py | 33 - .../devtestlabs/models/windows_os_info.py | 31 - .../models/windows_os_info_fragment.py | 31 - .../models/windows_os_info_fragment_py3.py | 31 - .../devtestlabs/models/windows_os_info_py3.py | 31 - .../mgmt/devtestlabs/operations/__init__.py | 50 +- ...ations.py => _arm_templates_operations.py} | 19 +- ...ons.py => _artifact_sources_operations.py} | 22 +- ...operations.py => _artifacts_operations.py} | 18 +- ...sts_operations.py => _costs_operations.py} | 4 +- ...ations.py => _custom_images_operations.py} | 21 +- ...sks_operations.py => _disks_operations.py} | 20 +- ...rations.py => _environments_operations.py} | 21 +- ..._operations.py => _formulas_operations.py} | 23 +- ...tions.py => _gallery_images_operations.py} | 16 +- ...ons.py => _global_schedules_operations.py} | 36 +- ...labs_operations.py => _labs_operations.py} | 49 +- ...y => _notification_channels_operations.py} | 34 +- .../{operations.py => _operations.py} | 3 +- ..._operations.py => _policies_operations.py} | 22 +- ...erations.py => _policy_sets_operations.py} | 3 +- ..._operations.py => _provider_operations.py} | 16 +- ...operations.py => _schedules_operations.py} | 36 +- ...s_operations.py => _secrets_operations.py} | 20 +- ...> _service_fabric_schedules_operations.py} | 34 +- ...ions.py => _service_fabrics_operations.py} | 38 +- ...ions.py => _service_runners_operations.py} | 91 +- ...ers_operations.py => _users_operations.py} | 21 +- ... _virtual_machine_schedules_operations.py} | 22 +- ...ons.py => _virtual_machines_operations.py} | 25 +- ...ons.py => _virtual_networks_operations.py} | 21 +- .../azure/mgmt/devtestlabs/version.py | 2 +- .../azure-mgmt-devtestlabs/setup.py | 2 +- 353 files changed, 12470 insertions(+), 16125 deletions(-) create mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_configuration.py rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/{dev_test_labs_client.py => _dev_test_labs_client.py} (72%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/{dev_test_labs_client_enums.py => _dev_test_labs_client_enums.py} (98%) create mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models.py create mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models_py3.py create mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_paged_models.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_py3.py rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{arm_templates_operations.py => _arm_templates_operations.py} (95%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{artifact_sources_operations.py => _artifact_sources_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{artifacts_operations.py => _artifacts_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{costs_operations.py => _costs_operations.py} (98%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{custom_images_operations.py => _custom_images_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{disks_operations.py => _disks_operations.py} (98%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{environments_operations.py => _environments_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{formulas_operations.py => _formulas_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{gallery_images_operations.py => _gallery_images_operations.py} (93%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{global_schedules_operations.py => _global_schedules_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{labs_operations.py => _labs_operations.py} (98%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{notification_channels_operations.py => _notification_channels_operations.py} (96%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{operations.py => _operations.py} (96%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{policies_operations.py => _policies_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{policy_sets_operations.py => _policy_sets_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{provider_operations.py => _provider_operations.py} (90%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{schedules_operations.py => _schedules_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{secrets_operations.py => _secrets_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{service_fabric_schedules_operations.py => _service_fabric_schedules_operations.py} (96%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{service_fabrics_operations.py => _service_fabrics_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{service_runners_operations.py => _service_runners_operations.py} (71%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{users_operations.py => _users_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{virtual_machine_schedules_operations.py => _virtual_machine_schedules_operations.py} (98%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{virtual_machines_operations.py => _virtual_machines_operations.py} (99%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{virtual_networks_operations.py => _virtual_networks_operations.py} (97%) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/HISTORY.rst b/sdk/devtestlabs/azure-mgmt-devtestlabs/HISTORY.rst index ca00766f84e0..bfb266aba9c4 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/HISTORY.rst +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/HISTORY.rst @@ -3,6 +3,25 @@ Release History =============== +4.0.0 (2019-07-26) +++++++++++++++++++ + +**Breaking changes** + +- Removed operation ServiceRunnersOperations.list + +**General breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes if from some import. +In summary, some modules were incorrectly visible/importable and have been renamed. This fixed several issues caused by usage of classes that were not supposed to be used in the first place. + +- DevTestLabsClient cannot be imported from `azure.mgmt.devtestlabs.dev_test_labs_management_client` anymore (import from `azure.mgmt.devtestlabs` works like before) +- DevTestLabsManagementClientConfiguration import has been moved from `azure.mgmt.devtestlabs.dev_test_labs_management_client` to `azure.mgmt.devtestlabs` +- A model `MyClass` from a "models" sub-module cannot be imported anymore using `azure.mgmt.devtestlabs.models.my_class` (import from `azure.mgmt.devtestlabs.models` works like before) +- An operation class `MyClassOperations` from an `operations` sub-module cannot be imported anymore using `azure.mgmt.devtestlabs.operations.my_class_operations` (import from `azure.mgmt.devtestlabs.operations` works like before) + +Last but not least, HTTP connection pooling is now enabled by default. You should always use a client as a context manager, or call close(), or use no more than one client per process. + 3.0.0 (2019-02-07) ++++++++++++++++++ diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/MANIFEST.in b/sdk/devtestlabs/azure-mgmt-devtestlabs/MANIFEST.in index 6ceb27f7a96e..e4884efef41b 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/MANIFEST.in +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/MANIFEST.in @@ -1,3 +1,4 @@ +recursive-include tests *.py *.yaml include *.rst include azure/__init__.py include azure/mgmt/__init__.py diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/README.rst b/sdk/devtestlabs/azure-mgmt-devtestlabs/README.rst index 3b266c6e0f32..7863788f2412 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/README.rst +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure DevTestLabs Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/__init__.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/__init__.py index 18ce91ae3337..a60396771701 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/__init__.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .dev_test_labs_client import DevTestLabsClient -from .version import VERSION +from ._configuration import DevTestLabsClientConfiguration +from ._dev_test_labs_client import DevTestLabsClient +__all__ = ['DevTestLabsClient', 'DevTestLabsClientConfiguration'] -__all__ = ['DevTestLabsClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_configuration.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_configuration.py new file mode 100644 index 000000000000..ad4e6c48fb8d --- /dev/null +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_configuration.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class DevTestLabsClientConfiguration(AzureConfiguration): + """Configuration for DevTestLabsClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(DevTestLabsClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-devtestlabs/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/dev_test_labs_client.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_dev_test_labs_client.py similarity index 72% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/dev_test_labs_client.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_dev_test_labs_client.py index 74bdf0ef0fdc..aa051d2d128d 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/dev_test_labs_client.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_dev_test_labs_client.py @@ -11,66 +11,34 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.provider_operations import ProviderOperations -from .operations.labs_operations import LabsOperations -from .operations.operations import Operations -from .operations.global_schedules_operations import GlobalSchedulesOperations -from .operations.artifact_sources_operations import ArtifactSourcesOperations -from .operations.arm_templates_operations import ArmTemplatesOperations -from .operations.artifacts_operations import ArtifactsOperations -from .operations.costs_operations import CostsOperations -from .operations.custom_images_operations import CustomImagesOperations -from .operations.formulas_operations import FormulasOperations -from .operations.gallery_images_operations import GalleryImagesOperations -from .operations.notification_channels_operations import NotificationChannelsOperations -from .operations.policy_sets_operations import PolicySetsOperations -from .operations.policies_operations import PoliciesOperations -from .operations.schedules_operations import SchedulesOperations -from .operations.service_runners_operations import ServiceRunnersOperations -from .operations.users_operations import UsersOperations -from .operations.disks_operations import DisksOperations -from .operations.environments_operations import EnvironmentsOperations -from .operations.secrets_operations import SecretsOperations -from .operations.service_fabrics_operations import ServiceFabricsOperations -from .operations.service_fabric_schedules_operations import ServiceFabricSchedulesOperations -from .operations.virtual_machines_operations import VirtualMachinesOperations -from .operations.virtual_machine_schedules_operations import VirtualMachineSchedulesOperations -from .operations.virtual_networks_operations import VirtualNetworksOperations -from . import models - - -class DevTestLabsClientConfiguration(AzureConfiguration): - """Configuration for DevTestLabsClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(DevTestLabsClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-devtestlabs/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import DevTestLabsClientConfiguration +from .operations import ProviderOperations +from .operations import LabsOperations +from .operations import Operations +from .operations import GlobalSchedulesOperations +from .operations import ArtifactSourcesOperations +from .operations import ArmTemplatesOperations +from .operations import ArtifactsOperations +from .operations import CostsOperations +from .operations import CustomImagesOperations +from .operations import FormulasOperations +from .operations import GalleryImagesOperations +from .operations import NotificationChannelsOperations +from .operations import PolicySetsOperations +from .operations import PoliciesOperations +from .operations import SchedulesOperations +from .operations import ServiceRunnersOperations +from .operations import UsersOperations +from .operations import DisksOperations +from .operations import EnvironmentsOperations +from .operations import SecretsOperations +from .operations import ServiceFabricsOperations +from .operations import ServiceFabricSchedulesOperations +from .operations import VirtualMachinesOperations +from .operations import VirtualMachineSchedulesOperations +from .operations import VirtualNetworksOperations +from . import models class DevTestLabsClient(SDKClient): diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py index 56d0fd0fe73f..1bb40772c367 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py @@ -10,322 +10,321 @@ # -------------------------------------------------------------------------- try: - from .week_details_py3 import WeekDetails - from .day_details_py3 import DayDetails - from .hour_details_py3 import HourDetails - from .notification_settings_py3 import NotificationSettings - from .schedule_py3 import Schedule - from .applicable_schedule_py3 import ApplicableSchedule - from .week_details_fragment_py3 import WeekDetailsFragment - from .day_details_fragment_py3 import DayDetailsFragment - from .hour_details_fragment_py3 import HourDetailsFragment - from .notification_settings_fragment_py3 import NotificationSettingsFragment - from .schedule_fragment_py3 import ScheduleFragment - from .applicable_schedule_fragment_py3 import ApplicableScheduleFragment - from .artifact_parameter_properties_py3 import ArtifactParameterProperties - from .artifact_install_properties_py3 import ArtifactInstallProperties - from .apply_artifacts_request_py3 import ApplyArtifactsRequest - from .parameters_value_file_info_py3 import ParametersValueFileInfo - from .arm_template_py3 import ArmTemplate - from .arm_template_info_py3 import ArmTemplateInfo - from .arm_template_parameter_properties_py3 import ArmTemplateParameterProperties - from .arm_template_parameter_properties_fragment_py3 import ArmTemplateParameterPropertiesFragment - from .artifact_py3 import Artifact - from .artifact_deployment_status_properties_py3 import ArtifactDeploymentStatusProperties - from .artifact_deployment_status_properties_fragment_py3 import ArtifactDeploymentStatusPropertiesFragment - from .artifact_parameter_properties_fragment_py3 import ArtifactParameterPropertiesFragment - from .artifact_install_properties_fragment_py3 import ArtifactInstallPropertiesFragment - from .artifact_source_py3 import ArtifactSource - from .artifact_source_fragment_py3 import ArtifactSourceFragment - from .attach_disk_properties_py3 import AttachDiskProperties - from .attach_new_data_disk_options_py3 import AttachNewDataDiskOptions - from .attach_new_data_disk_options_fragment_py3 import AttachNewDataDiskOptionsFragment - from .bulk_creation_parameters_py3 import BulkCreationParameters - from .bulk_creation_parameters_fragment_py3 import BulkCreationParametersFragment - from .compute_data_disk_py3 import ComputeDataDisk - from .compute_data_disk_fragment_py3 import ComputeDataDiskFragment - from .compute_vm_instance_view_status_py3 import ComputeVmInstanceViewStatus - from .compute_vm_instance_view_status_fragment_py3 import ComputeVmInstanceViewStatusFragment - from .compute_vm_properties_py3 import ComputeVmProperties - from .compute_vm_properties_fragment_py3 import ComputeVmPropertiesFragment - from .percentage_cost_threshold_properties_py3 import PercentageCostThresholdProperties - from .cost_threshold_properties_py3 import CostThresholdProperties - from .windows_os_info_py3 import WindowsOsInfo - from .linux_os_info_py3 import LinuxOsInfo - from .custom_image_properties_from_vm_py3 import CustomImagePropertiesFromVm - from .custom_image_properties_custom_py3 import CustomImagePropertiesCustom - from .data_disk_storage_type_info_py3 import DataDiskStorageTypeInfo - from .custom_image_properties_from_plan_py3 import CustomImagePropertiesFromPlan - from .custom_image_py3 import CustomImage - from .windows_os_info_fragment_py3 import WindowsOsInfoFragment - from .linux_os_info_fragment_py3 import LinuxOsInfoFragment - from .custom_image_properties_from_vm_fragment_py3 import CustomImagePropertiesFromVmFragment - from .custom_image_properties_custom_fragment_py3 import CustomImagePropertiesCustomFragment - from .data_disk_storage_type_info_fragment_py3 import DataDiskStorageTypeInfoFragment - from .custom_image_properties_from_plan_fragment_py3 import CustomImagePropertiesFromPlanFragment - from .custom_image_fragment_py3 import CustomImageFragment - from .data_disk_properties_py3 import DataDiskProperties - from .data_disk_properties_fragment_py3 import DataDiskPropertiesFragment - from .detach_data_disk_properties_py3 import DetachDataDiskProperties - from .detach_disk_properties_py3 import DetachDiskProperties - from .disk_py3 import Disk - from .disk_fragment_py3 import DiskFragment - from .environment_deployment_properties_py3 import EnvironmentDeploymentProperties - from .dtl_environment_py3 import DtlEnvironment - from .environment_deployment_properties_fragment_py3 import EnvironmentDeploymentPropertiesFragment - from .dtl_environment_fragment_py3 import DtlEnvironmentFragment - from .evaluate_policies_properties_py3 import EvaluatePoliciesProperties - from .evaluate_policies_request_py3 import EvaluatePoliciesRequest - from .policy_violation_py3 import PolicyViolation - from .policy_set_result_py3 import PolicySetResult - from .evaluate_policies_response_py3 import EvaluatePoliciesResponse - from .event_py3 import Event - from .event_fragment_py3 import EventFragment - from .export_resource_usage_parameters_py3 import ExportResourceUsageParameters - from .external_subnet_py3 import ExternalSubnet - from .external_subnet_fragment_py3 import ExternalSubnetFragment - from .gallery_image_reference_py3 import GalleryImageReference - from .inbound_nat_rule_py3 import InboundNatRule - from .shared_public_ip_address_configuration_py3 import SharedPublicIpAddressConfiguration - from .network_interface_properties_py3 import NetworkInterfaceProperties - from .schedule_creation_parameter_py3 import ScheduleCreationParameter - from .lab_virtual_machine_creation_parameter_py3 import LabVirtualMachineCreationParameter - from .formula_properties_from_vm_py3 import FormulaPropertiesFromVm - from .formula_py3 import Formula - from .gallery_image_reference_fragment_py3 import GalleryImageReferenceFragment - from .inbound_nat_rule_fragment_py3 import InboundNatRuleFragment - from .shared_public_ip_address_configuration_fragment_py3 import SharedPublicIpAddressConfigurationFragment - from .network_interface_properties_fragment_py3 import NetworkInterfacePropertiesFragment - from .schedule_creation_parameter_fragment_py3 import ScheduleCreationParameterFragment - from .lab_virtual_machine_creation_parameter_fragment_py3 import LabVirtualMachineCreationParameterFragment - from .formula_properties_from_vm_fragment_py3 import FormulaPropertiesFromVmFragment - from .formula_fragment_py3 import FormulaFragment - from .gallery_image_py3 import GalleryImage - from .parameter_info_py3 import ParameterInfo - from .generate_arm_template_request_py3 import GenerateArmTemplateRequest - from .generate_upload_uri_parameter_py3 import GenerateUploadUriParameter - from .generate_upload_uri_response_py3 import GenerateUploadUriResponse - from .identity_properties_py3 import IdentityProperties - from .import_lab_virtual_machine_request_py3 import ImportLabVirtualMachineRequest - from .lab_announcement_properties_py3 import LabAnnouncementProperties - from .lab_support_properties_py3 import LabSupportProperties - from .lab_py3 import Lab - from .lab_announcement_properties_fragment_py3 import LabAnnouncementPropertiesFragment - from .target_cost_properties_py3 import TargetCostProperties - from .lab_cost_summary_properties_py3 import LabCostSummaryProperties - from .lab_cost_details_properties_py3 import LabCostDetailsProperties - from .lab_resource_cost_properties_py3 import LabResourceCostProperties - from .lab_cost_py3 import LabCost - from .lab_support_properties_fragment_py3 import LabSupportPropertiesFragment - from .lab_fragment_py3 import LabFragment - from .lab_vhd_py3 import LabVhd - from .lab_virtual_machine_py3 import LabVirtualMachine - from .lab_virtual_machine_fragment_py3 import LabVirtualMachineFragment - from .notification_channel_py3 import NotificationChannel - from .notification_channel_fragment_py3 import NotificationChannelFragment - from .notify_parameters_py3 import NotifyParameters - from .operation_error_py3 import OperationError - from .operation_metadata_display_py3 import OperationMetadataDisplay - from .operation_metadata_py3 import OperationMetadata - from .operation_result_py3 import OperationResult - from .policy_py3 import Policy - from .policy_fragment_py3 import PolicyFragment - from .port_py3 import Port - from .port_fragment_py3 import PortFragment - from .rdp_connection_py3 import RdpConnection - from .resize_lab_virtual_machine_properties_py3 import ResizeLabVirtualMachineProperties - from .resource_py3 import Resource - from .retarget_schedule_properties_py3 import RetargetScheduleProperties - from .secret_py3 import Secret - from .secret_fragment_py3 import SecretFragment - from .service_fabric_py3 import ServiceFabric - from .service_fabric_fragment_py3 import ServiceFabricFragment - from .service_runner_py3 import ServiceRunner - from .shutdown_notification_content_py3 import ShutdownNotificationContent - from .subnet_py3 import Subnet - from .subnet_fragment_py3 import SubnetFragment - from .subnet_shared_public_ip_address_configuration_py3 import SubnetSharedPublicIpAddressConfiguration - from .subnet_override_py3 import SubnetOverride - from .subnet_shared_public_ip_address_configuration_fragment_py3 import SubnetSharedPublicIpAddressConfigurationFragment - from .subnet_override_fragment_py3 import SubnetOverrideFragment - from .update_resource_py3 import UpdateResource - from .user_identity_py3 import UserIdentity - from .user_secret_store_py3 import UserSecretStore - from .user_py3 import User - from .user_identity_fragment_py3 import UserIdentityFragment - from .user_secret_store_fragment_py3 import UserSecretStoreFragment - from .user_fragment_py3 import UserFragment - from .virtual_network_py3 import VirtualNetwork - from .virtual_network_fragment_py3 import VirtualNetworkFragment + from ._models_py3 import ApplicableSchedule + from ._models_py3 import ApplicableScheduleFragment + from ._models_py3 import ApplyArtifactsRequest + from ._models_py3 import ArmTemplate + from ._models_py3 import ArmTemplateInfo + from ._models_py3 import ArmTemplateParameterProperties + from ._models_py3 import ArmTemplateParameterPropertiesFragment + from ._models_py3 import Artifact + from ._models_py3 import ArtifactDeploymentStatusProperties + from ._models_py3 import ArtifactDeploymentStatusPropertiesFragment + from ._models_py3 import ArtifactInstallProperties + from ._models_py3 import ArtifactInstallPropertiesFragment + from ._models_py3 import ArtifactParameterProperties + from ._models_py3 import ArtifactParameterPropertiesFragment + from ._models_py3 import ArtifactSource + from ._models_py3 import ArtifactSourceFragment + from ._models_py3 import AttachDiskProperties + from ._models_py3 import AttachNewDataDiskOptions + from ._models_py3 import AttachNewDataDiskOptionsFragment + from ._models_py3 import BulkCreationParameters + from ._models_py3 import BulkCreationParametersFragment + from ._models_py3 import ComputeDataDisk + from ._models_py3 import ComputeDataDiskFragment + from ._models_py3 import ComputeVmInstanceViewStatus + from ._models_py3 import ComputeVmInstanceViewStatusFragment + from ._models_py3 import ComputeVmProperties + from ._models_py3 import ComputeVmPropertiesFragment + from ._models_py3 import CostThresholdProperties + from ._models_py3 import CustomImage + from ._models_py3 import CustomImageFragment + from ._models_py3 import CustomImagePropertiesCustom + from ._models_py3 import CustomImagePropertiesCustomFragment + from ._models_py3 import CustomImagePropertiesFromPlan + from ._models_py3 import CustomImagePropertiesFromPlanFragment + from ._models_py3 import CustomImagePropertiesFromVm + from ._models_py3 import CustomImagePropertiesFromVmFragment + from ._models_py3 import DataDiskProperties + from ._models_py3 import DataDiskPropertiesFragment + from ._models_py3 import DataDiskStorageTypeInfo + from ._models_py3 import DataDiskStorageTypeInfoFragment + from ._models_py3 import DayDetails + from ._models_py3 import DayDetailsFragment + from ._models_py3 import DetachDataDiskProperties + from ._models_py3 import DetachDiskProperties + from ._models_py3 import Disk + from ._models_py3 import DiskFragment + from ._models_py3 import DtlEnvironment + from ._models_py3 import DtlEnvironmentFragment + from ._models_py3 import EnvironmentDeploymentProperties + from ._models_py3 import EnvironmentDeploymentPropertiesFragment + from ._models_py3 import EvaluatePoliciesProperties + from ._models_py3 import EvaluatePoliciesRequest + from ._models_py3 import EvaluatePoliciesResponse + from ._models_py3 import Event + from ._models_py3 import EventFragment + from ._models_py3 import ExportResourceUsageParameters + from ._models_py3 import ExternalSubnet + from ._models_py3 import ExternalSubnetFragment + from ._models_py3 import Formula + from ._models_py3 import FormulaFragment + from ._models_py3 import FormulaPropertiesFromVm + from ._models_py3 import FormulaPropertiesFromVmFragment + from ._models_py3 import GalleryImage + from ._models_py3 import GalleryImageReference + from ._models_py3 import GalleryImageReferenceFragment + from ._models_py3 import GenerateArmTemplateRequest + from ._models_py3 import GenerateUploadUriParameter + from ._models_py3 import GenerateUploadUriResponse + from ._models_py3 import HourDetails + from ._models_py3 import HourDetailsFragment + from ._models_py3 import IdentityProperties + from ._models_py3 import ImportLabVirtualMachineRequest + from ._models_py3 import InboundNatRule + from ._models_py3 import InboundNatRuleFragment + from ._models_py3 import Lab + from ._models_py3 import LabAnnouncementProperties + from ._models_py3 import LabAnnouncementPropertiesFragment + from ._models_py3 import LabCost + from ._models_py3 import LabCostDetailsProperties + from ._models_py3 import LabCostSummaryProperties + from ._models_py3 import LabFragment + from ._models_py3 import LabResourceCostProperties + from ._models_py3 import LabSupportProperties + from ._models_py3 import LabSupportPropertiesFragment + from ._models_py3 import LabVhd + from ._models_py3 import LabVirtualMachine + from ._models_py3 import LabVirtualMachineCreationParameter + from ._models_py3 import LabVirtualMachineCreationParameterFragment + from ._models_py3 import LabVirtualMachineFragment + from ._models_py3 import LinuxOsInfo + from ._models_py3 import LinuxOsInfoFragment + from ._models_py3 import NetworkInterfaceProperties + from ._models_py3 import NetworkInterfacePropertiesFragment + from ._models_py3 import NotificationChannel + from ._models_py3 import NotificationChannelFragment + from ._models_py3 import NotificationSettings + from ._models_py3 import NotificationSettingsFragment + from ._models_py3 import NotifyParameters + from ._models_py3 import OperationError + from ._models_py3 import OperationMetadata + from ._models_py3 import OperationMetadataDisplay + from ._models_py3 import OperationResult + from ._models_py3 import ParameterInfo + from ._models_py3 import ParametersValueFileInfo + from ._models_py3 import PercentageCostThresholdProperties + from ._models_py3 import Policy + from ._models_py3 import PolicyFragment + from ._models_py3 import PolicySetResult + from ._models_py3 import PolicyViolation + from ._models_py3 import Port + from ._models_py3 import PortFragment + from ._models_py3 import RdpConnection + from ._models_py3 import ResizeLabVirtualMachineProperties + from ._models_py3 import Resource + from ._models_py3 import RetargetScheduleProperties + from ._models_py3 import Schedule + from ._models_py3 import ScheduleCreationParameter + from ._models_py3 import ScheduleCreationParameterFragment + from ._models_py3 import ScheduleFragment + from ._models_py3 import Secret + from ._models_py3 import SecretFragment + from ._models_py3 import ServiceFabric + from ._models_py3 import ServiceFabricFragment + from ._models_py3 import ServiceRunner + from ._models_py3 import SharedPublicIpAddressConfiguration + from ._models_py3 import SharedPublicIpAddressConfigurationFragment + from ._models_py3 import ShutdownNotificationContent + from ._models_py3 import Subnet + from ._models_py3 import SubnetFragment + from ._models_py3 import SubnetOverride + from ._models_py3 import SubnetOverrideFragment + from ._models_py3 import SubnetSharedPublicIpAddressConfiguration + from ._models_py3 import SubnetSharedPublicIpAddressConfigurationFragment + from ._models_py3 import TargetCostProperties + from ._models_py3 import UpdateResource + from ._models_py3 import User + from ._models_py3 import UserFragment + from ._models_py3 import UserIdentity + from ._models_py3 import UserIdentityFragment + from ._models_py3 import UserSecretStore + from ._models_py3 import UserSecretStoreFragment + from ._models_py3 import VirtualNetwork + from ._models_py3 import VirtualNetworkFragment + from ._models_py3 import WeekDetails + from ._models_py3 import WeekDetailsFragment + from ._models_py3 import WindowsOsInfo + from ._models_py3 import WindowsOsInfoFragment except (SyntaxError, ImportError): - from .week_details import WeekDetails - from .day_details import DayDetails - from .hour_details import HourDetails - from .notification_settings import NotificationSettings - from .schedule import Schedule - from .applicable_schedule import ApplicableSchedule - from .week_details_fragment import WeekDetailsFragment - from .day_details_fragment import DayDetailsFragment - from .hour_details_fragment import HourDetailsFragment - from .notification_settings_fragment import NotificationSettingsFragment - from .schedule_fragment import ScheduleFragment - from .applicable_schedule_fragment import ApplicableScheduleFragment - from .artifact_parameter_properties import ArtifactParameterProperties - from .artifact_install_properties import ArtifactInstallProperties - from .apply_artifacts_request import ApplyArtifactsRequest - from .parameters_value_file_info import ParametersValueFileInfo - from .arm_template import ArmTemplate - from .arm_template_info import ArmTemplateInfo - from .arm_template_parameter_properties import ArmTemplateParameterProperties - from .arm_template_parameter_properties_fragment import ArmTemplateParameterPropertiesFragment - from .artifact import Artifact - from .artifact_deployment_status_properties import ArtifactDeploymentStatusProperties - from .artifact_deployment_status_properties_fragment import ArtifactDeploymentStatusPropertiesFragment - from .artifact_parameter_properties_fragment import ArtifactParameterPropertiesFragment - from .artifact_install_properties_fragment import ArtifactInstallPropertiesFragment - from .artifact_source import ArtifactSource - from .artifact_source_fragment import ArtifactSourceFragment - from .attach_disk_properties import AttachDiskProperties - from .attach_new_data_disk_options import AttachNewDataDiskOptions - from .attach_new_data_disk_options_fragment import AttachNewDataDiskOptionsFragment - from .bulk_creation_parameters import BulkCreationParameters - from .bulk_creation_parameters_fragment import BulkCreationParametersFragment - from .compute_data_disk import ComputeDataDisk - from .compute_data_disk_fragment import ComputeDataDiskFragment - from .compute_vm_instance_view_status import ComputeVmInstanceViewStatus - from .compute_vm_instance_view_status_fragment import ComputeVmInstanceViewStatusFragment - from .compute_vm_properties import ComputeVmProperties - from .compute_vm_properties_fragment import ComputeVmPropertiesFragment - from .percentage_cost_threshold_properties import PercentageCostThresholdProperties - from .cost_threshold_properties import CostThresholdProperties - from .windows_os_info import WindowsOsInfo - from .linux_os_info import LinuxOsInfo - from .custom_image_properties_from_vm import CustomImagePropertiesFromVm - from .custom_image_properties_custom import CustomImagePropertiesCustom - from .data_disk_storage_type_info import DataDiskStorageTypeInfo - from .custom_image_properties_from_plan import CustomImagePropertiesFromPlan - from .custom_image import CustomImage - from .windows_os_info_fragment import WindowsOsInfoFragment - from .linux_os_info_fragment import LinuxOsInfoFragment - from .custom_image_properties_from_vm_fragment import CustomImagePropertiesFromVmFragment - from .custom_image_properties_custom_fragment import CustomImagePropertiesCustomFragment - from .data_disk_storage_type_info_fragment import DataDiskStorageTypeInfoFragment - from .custom_image_properties_from_plan_fragment import CustomImagePropertiesFromPlanFragment - from .custom_image_fragment import CustomImageFragment - from .data_disk_properties import DataDiskProperties - from .data_disk_properties_fragment import DataDiskPropertiesFragment - from .detach_data_disk_properties import DetachDataDiskProperties - from .detach_disk_properties import DetachDiskProperties - from .disk import Disk - from .disk_fragment import DiskFragment - from .environment_deployment_properties import EnvironmentDeploymentProperties - from .dtl_environment import DtlEnvironment - from .environment_deployment_properties_fragment import EnvironmentDeploymentPropertiesFragment - from .dtl_environment_fragment import DtlEnvironmentFragment - from .evaluate_policies_properties import EvaluatePoliciesProperties - from .evaluate_policies_request import EvaluatePoliciesRequest - from .policy_violation import PolicyViolation - from .policy_set_result import PolicySetResult - from .evaluate_policies_response import EvaluatePoliciesResponse - from .event import Event - from .event_fragment import EventFragment - from .export_resource_usage_parameters import ExportResourceUsageParameters - from .external_subnet import ExternalSubnet - from .external_subnet_fragment import ExternalSubnetFragment - from .gallery_image_reference import GalleryImageReference - from .inbound_nat_rule import InboundNatRule - from .shared_public_ip_address_configuration import SharedPublicIpAddressConfiguration - from .network_interface_properties import NetworkInterfaceProperties - from .schedule_creation_parameter import ScheduleCreationParameter - from .lab_virtual_machine_creation_parameter import LabVirtualMachineCreationParameter - from .formula_properties_from_vm import FormulaPropertiesFromVm - from .formula import Formula - from .gallery_image_reference_fragment import GalleryImageReferenceFragment - from .inbound_nat_rule_fragment import InboundNatRuleFragment - from .shared_public_ip_address_configuration_fragment import SharedPublicIpAddressConfigurationFragment - from .network_interface_properties_fragment import NetworkInterfacePropertiesFragment - from .schedule_creation_parameter_fragment import ScheduleCreationParameterFragment - from .lab_virtual_machine_creation_parameter_fragment import LabVirtualMachineCreationParameterFragment - from .formula_properties_from_vm_fragment import FormulaPropertiesFromVmFragment - from .formula_fragment import FormulaFragment - from .gallery_image import GalleryImage - from .parameter_info import ParameterInfo - from .generate_arm_template_request import GenerateArmTemplateRequest - from .generate_upload_uri_parameter import GenerateUploadUriParameter - from .generate_upload_uri_response import GenerateUploadUriResponse - from .identity_properties import IdentityProperties - from .import_lab_virtual_machine_request import ImportLabVirtualMachineRequest - from .lab_announcement_properties import LabAnnouncementProperties - from .lab_support_properties import LabSupportProperties - from .lab import Lab - from .lab_announcement_properties_fragment import LabAnnouncementPropertiesFragment - from .target_cost_properties import TargetCostProperties - from .lab_cost_summary_properties import LabCostSummaryProperties - from .lab_cost_details_properties import LabCostDetailsProperties - from .lab_resource_cost_properties import LabResourceCostProperties - from .lab_cost import LabCost - from .lab_support_properties_fragment import LabSupportPropertiesFragment - from .lab_fragment import LabFragment - from .lab_vhd import LabVhd - from .lab_virtual_machine import LabVirtualMachine - from .lab_virtual_machine_fragment import LabVirtualMachineFragment - from .notification_channel import NotificationChannel - from .notification_channel_fragment import NotificationChannelFragment - from .notify_parameters import NotifyParameters - from .operation_error import OperationError - from .operation_metadata_display import OperationMetadataDisplay - from .operation_metadata import OperationMetadata - from .operation_result import OperationResult - from .policy import Policy - from .policy_fragment import PolicyFragment - from .port import Port - from .port_fragment import PortFragment - from .rdp_connection import RdpConnection - from .resize_lab_virtual_machine_properties import ResizeLabVirtualMachineProperties - from .resource import Resource - from .retarget_schedule_properties import RetargetScheduleProperties - from .secret import Secret - from .secret_fragment import SecretFragment - from .service_fabric import ServiceFabric - from .service_fabric_fragment import ServiceFabricFragment - from .service_runner import ServiceRunner - from .shutdown_notification_content import ShutdownNotificationContent - from .subnet import Subnet - from .subnet_fragment import SubnetFragment - from .subnet_shared_public_ip_address_configuration import SubnetSharedPublicIpAddressConfiguration - from .subnet_override import SubnetOverride - from .subnet_shared_public_ip_address_configuration_fragment import SubnetSharedPublicIpAddressConfigurationFragment - from .subnet_override_fragment import SubnetOverrideFragment - from .update_resource import UpdateResource - from .user_identity import UserIdentity - from .user_secret_store import UserSecretStore - from .user import User - from .user_identity_fragment import UserIdentityFragment - from .user_secret_store_fragment import UserSecretStoreFragment - from .user_fragment import UserFragment - from .virtual_network import VirtualNetwork - from .virtual_network_fragment import VirtualNetworkFragment -from .operation_metadata_paged import OperationMetadataPaged -from .lab_paged import LabPaged -from .lab_vhd_paged import LabVhdPaged -from .schedule_paged import SchedulePaged -from .artifact_source_paged import ArtifactSourcePaged -from .arm_template_paged import ArmTemplatePaged -from .artifact_paged import ArtifactPaged -from .custom_image_paged import CustomImagePaged -from .formula_paged import FormulaPaged -from .gallery_image_paged import GalleryImagePaged -from .notification_channel_paged import NotificationChannelPaged -from .policy_paged import PolicyPaged -from .service_runner_paged import ServiceRunnerPaged -from .user_paged import UserPaged -from .disk_paged import DiskPaged -from .dtl_environment_paged import DtlEnvironmentPaged -from .secret_paged import SecretPaged -from .service_fabric_paged import ServiceFabricPaged -from .lab_virtual_machine_paged import LabVirtualMachinePaged -from .virtual_network_paged import VirtualNetworkPaged -from .dev_test_labs_client_enums import ( + from ._models import ApplicableSchedule + from ._models import ApplicableScheduleFragment + from ._models import ApplyArtifactsRequest + from ._models import ArmTemplate + from ._models import ArmTemplateInfo + from ._models import ArmTemplateParameterProperties + from ._models import ArmTemplateParameterPropertiesFragment + from ._models import Artifact + from ._models import ArtifactDeploymentStatusProperties + from ._models import ArtifactDeploymentStatusPropertiesFragment + from ._models import ArtifactInstallProperties + from ._models import ArtifactInstallPropertiesFragment + from ._models import ArtifactParameterProperties + from ._models import ArtifactParameterPropertiesFragment + from ._models import ArtifactSource + from ._models import ArtifactSourceFragment + from ._models import AttachDiskProperties + from ._models import AttachNewDataDiskOptions + from ._models import AttachNewDataDiskOptionsFragment + from ._models import BulkCreationParameters + from ._models import BulkCreationParametersFragment + from ._models import ComputeDataDisk + from ._models import ComputeDataDiskFragment + from ._models import ComputeVmInstanceViewStatus + from ._models import ComputeVmInstanceViewStatusFragment + from ._models import ComputeVmProperties + from ._models import ComputeVmPropertiesFragment + from ._models import CostThresholdProperties + from ._models import CustomImage + from ._models import CustomImageFragment + from ._models import CustomImagePropertiesCustom + from ._models import CustomImagePropertiesCustomFragment + from ._models import CustomImagePropertiesFromPlan + from ._models import CustomImagePropertiesFromPlanFragment + from ._models import CustomImagePropertiesFromVm + from ._models import CustomImagePropertiesFromVmFragment + from ._models import DataDiskProperties + from ._models import DataDiskPropertiesFragment + from ._models import DataDiskStorageTypeInfo + from ._models import DataDiskStorageTypeInfoFragment + from ._models import DayDetails + from ._models import DayDetailsFragment + from ._models import DetachDataDiskProperties + from ._models import DetachDiskProperties + from ._models import Disk + from ._models import DiskFragment + from ._models import DtlEnvironment + from ._models import DtlEnvironmentFragment + from ._models import EnvironmentDeploymentProperties + from ._models import EnvironmentDeploymentPropertiesFragment + from ._models import EvaluatePoliciesProperties + from ._models import EvaluatePoliciesRequest + from ._models import EvaluatePoliciesResponse + from ._models import Event + from ._models import EventFragment + from ._models import ExportResourceUsageParameters + from ._models import ExternalSubnet + from ._models import ExternalSubnetFragment + from ._models import Formula + from ._models import FormulaFragment + from ._models import FormulaPropertiesFromVm + from ._models import FormulaPropertiesFromVmFragment + from ._models import GalleryImage + from ._models import GalleryImageReference + from ._models import GalleryImageReferenceFragment + from ._models import GenerateArmTemplateRequest + from ._models import GenerateUploadUriParameter + from ._models import GenerateUploadUriResponse + from ._models import HourDetails + from ._models import HourDetailsFragment + from ._models import IdentityProperties + from ._models import ImportLabVirtualMachineRequest + from ._models import InboundNatRule + from ._models import InboundNatRuleFragment + from ._models import Lab + from ._models import LabAnnouncementProperties + from ._models import LabAnnouncementPropertiesFragment + from ._models import LabCost + from ._models import LabCostDetailsProperties + from ._models import LabCostSummaryProperties + from ._models import LabFragment + from ._models import LabResourceCostProperties + from ._models import LabSupportProperties + from ._models import LabSupportPropertiesFragment + from ._models import LabVhd + from ._models import LabVirtualMachine + from ._models import LabVirtualMachineCreationParameter + from ._models import LabVirtualMachineCreationParameterFragment + from ._models import LabVirtualMachineFragment + from ._models import LinuxOsInfo + from ._models import LinuxOsInfoFragment + from ._models import NetworkInterfaceProperties + from ._models import NetworkInterfacePropertiesFragment + from ._models import NotificationChannel + from ._models import NotificationChannelFragment + from ._models import NotificationSettings + from ._models import NotificationSettingsFragment + from ._models import NotifyParameters + from ._models import OperationError + from ._models import OperationMetadata + from ._models import OperationMetadataDisplay + from ._models import OperationResult + from ._models import ParameterInfo + from ._models import ParametersValueFileInfo + from ._models import PercentageCostThresholdProperties + from ._models import Policy + from ._models import PolicyFragment + from ._models import PolicySetResult + from ._models import PolicyViolation + from ._models import Port + from ._models import PortFragment + from ._models import RdpConnection + from ._models import ResizeLabVirtualMachineProperties + from ._models import Resource + from ._models import RetargetScheduleProperties + from ._models import Schedule + from ._models import ScheduleCreationParameter + from ._models import ScheduleCreationParameterFragment + from ._models import ScheduleFragment + from ._models import Secret + from ._models import SecretFragment + from ._models import ServiceFabric + from ._models import ServiceFabricFragment + from ._models import ServiceRunner + from ._models import SharedPublicIpAddressConfiguration + from ._models import SharedPublicIpAddressConfigurationFragment + from ._models import ShutdownNotificationContent + from ._models import Subnet + from ._models import SubnetFragment + from ._models import SubnetOverride + from ._models import SubnetOverrideFragment + from ._models import SubnetSharedPublicIpAddressConfiguration + from ._models import SubnetSharedPublicIpAddressConfigurationFragment + from ._models import TargetCostProperties + from ._models import UpdateResource + from ._models import User + from ._models import UserFragment + from ._models import UserIdentity + from ._models import UserIdentityFragment + from ._models import UserSecretStore + from ._models import UserSecretStoreFragment + from ._models import VirtualNetwork + from ._models import VirtualNetworkFragment + from ._models import WeekDetails + from ._models import WeekDetailsFragment + from ._models import WindowsOsInfo + from ._models import WindowsOsInfoFragment +from ._paged_models import ArmTemplatePaged +from ._paged_models import ArtifactPaged +from ._paged_models import ArtifactSourcePaged +from ._paged_models import CustomImagePaged +from ._paged_models import DiskPaged +from ._paged_models import DtlEnvironmentPaged +from ._paged_models import FormulaPaged +from ._paged_models import GalleryImagePaged +from ._paged_models import LabPaged +from ._paged_models import LabVhdPaged +from ._paged_models import LabVirtualMachinePaged +from ._paged_models import NotificationChannelPaged +from ._paged_models import OperationMetadataPaged +from ._paged_models import PolicyPaged +from ._paged_models import SchedulePaged +from ._paged_models import SecretPaged +from ._paged_models import ServiceFabricPaged +from ._paged_models import UserPaged +from ._paged_models import VirtualNetworkPaged +from ._dev_test_labs_client_enums import ( EnableStatus, SourceControlType, StorageType, @@ -351,22 +350,9 @@ ) __all__ = [ - 'WeekDetails', - 'DayDetails', - 'HourDetails', - 'NotificationSettings', - 'Schedule', 'ApplicableSchedule', - 'WeekDetailsFragment', - 'DayDetailsFragment', - 'HourDetailsFragment', - 'NotificationSettingsFragment', - 'ScheduleFragment', 'ApplicableScheduleFragment', - 'ArtifactParameterProperties', - 'ArtifactInstallProperties', 'ApplyArtifactsRequest', - 'ParametersValueFileInfo', 'ArmTemplate', 'ArmTemplateInfo', 'ArmTemplateParameterProperties', @@ -374,8 +360,10 @@ 'Artifact', 'ArtifactDeploymentStatusProperties', 'ArtifactDeploymentStatusPropertiesFragment', - 'ArtifactParameterPropertiesFragment', + 'ArtifactInstallProperties', 'ArtifactInstallPropertiesFragment', + 'ArtifactParameterProperties', + 'ArtifactParameterPropertiesFragment', 'ArtifactSource', 'ArtifactSourceFragment', 'AttachDiskProperties', @@ -389,115 +377,126 @@ 'ComputeVmInstanceViewStatusFragment', 'ComputeVmProperties', 'ComputeVmPropertiesFragment', - 'PercentageCostThresholdProperties', 'CostThresholdProperties', - 'WindowsOsInfo', - 'LinuxOsInfo', - 'CustomImagePropertiesFromVm', - 'CustomImagePropertiesCustom', - 'DataDiskStorageTypeInfo', - 'CustomImagePropertiesFromPlan', 'CustomImage', - 'WindowsOsInfoFragment', - 'LinuxOsInfoFragment', - 'CustomImagePropertiesFromVmFragment', + 'CustomImageFragment', + 'CustomImagePropertiesCustom', 'CustomImagePropertiesCustomFragment', - 'DataDiskStorageTypeInfoFragment', + 'CustomImagePropertiesFromPlan', 'CustomImagePropertiesFromPlanFragment', - 'CustomImageFragment', + 'CustomImagePropertiesFromVm', + 'CustomImagePropertiesFromVmFragment', 'DataDiskProperties', 'DataDiskPropertiesFragment', + 'DataDiskStorageTypeInfo', + 'DataDiskStorageTypeInfoFragment', + 'DayDetails', + 'DayDetailsFragment', 'DetachDataDiskProperties', 'DetachDiskProperties', 'Disk', 'DiskFragment', - 'EnvironmentDeploymentProperties', 'DtlEnvironment', - 'EnvironmentDeploymentPropertiesFragment', 'DtlEnvironmentFragment', + 'EnvironmentDeploymentProperties', + 'EnvironmentDeploymentPropertiesFragment', 'EvaluatePoliciesProperties', 'EvaluatePoliciesRequest', - 'PolicyViolation', - 'PolicySetResult', 'EvaluatePoliciesResponse', 'Event', 'EventFragment', 'ExportResourceUsageParameters', 'ExternalSubnet', 'ExternalSubnetFragment', - 'GalleryImageReference', - 'InboundNatRule', - 'SharedPublicIpAddressConfiguration', - 'NetworkInterfaceProperties', - 'ScheduleCreationParameter', - 'LabVirtualMachineCreationParameter', - 'FormulaPropertiesFromVm', 'Formula', - 'GalleryImageReferenceFragment', - 'InboundNatRuleFragment', - 'SharedPublicIpAddressConfigurationFragment', - 'NetworkInterfacePropertiesFragment', - 'ScheduleCreationParameterFragment', - 'LabVirtualMachineCreationParameterFragment', - 'FormulaPropertiesFromVmFragment', 'FormulaFragment', + 'FormulaPropertiesFromVm', + 'FormulaPropertiesFromVmFragment', 'GalleryImage', - 'ParameterInfo', + 'GalleryImageReference', + 'GalleryImageReferenceFragment', 'GenerateArmTemplateRequest', 'GenerateUploadUriParameter', 'GenerateUploadUriResponse', + 'HourDetails', + 'HourDetailsFragment', 'IdentityProperties', 'ImportLabVirtualMachineRequest', - 'LabAnnouncementProperties', - 'LabSupportProperties', + 'InboundNatRule', + 'InboundNatRuleFragment', 'Lab', + 'LabAnnouncementProperties', 'LabAnnouncementPropertiesFragment', - 'TargetCostProperties', - 'LabCostSummaryProperties', + 'LabCost', 'LabCostDetailsProperties', + 'LabCostSummaryProperties', + 'LabFragment', 'LabResourceCostProperties', - 'LabCost', + 'LabSupportProperties', 'LabSupportPropertiesFragment', - 'LabFragment', 'LabVhd', 'LabVirtualMachine', + 'LabVirtualMachineCreationParameter', + 'LabVirtualMachineCreationParameterFragment', 'LabVirtualMachineFragment', + 'LinuxOsInfo', + 'LinuxOsInfoFragment', + 'NetworkInterfaceProperties', + 'NetworkInterfacePropertiesFragment', 'NotificationChannel', 'NotificationChannelFragment', + 'NotificationSettings', + 'NotificationSettingsFragment', 'NotifyParameters', 'OperationError', - 'OperationMetadataDisplay', 'OperationMetadata', + 'OperationMetadataDisplay', 'OperationResult', + 'ParameterInfo', + 'ParametersValueFileInfo', + 'PercentageCostThresholdProperties', 'Policy', 'PolicyFragment', + 'PolicySetResult', + 'PolicyViolation', 'Port', 'PortFragment', 'RdpConnection', 'ResizeLabVirtualMachineProperties', 'Resource', 'RetargetScheduleProperties', + 'Schedule', + 'ScheduleCreationParameter', + 'ScheduleCreationParameterFragment', + 'ScheduleFragment', 'Secret', 'SecretFragment', 'ServiceFabric', 'ServiceFabricFragment', 'ServiceRunner', + 'SharedPublicIpAddressConfiguration', + 'SharedPublicIpAddressConfigurationFragment', 'ShutdownNotificationContent', 'Subnet', 'SubnetFragment', - 'SubnetSharedPublicIpAddressConfiguration', 'SubnetOverride', - 'SubnetSharedPublicIpAddressConfigurationFragment', 'SubnetOverrideFragment', + 'SubnetSharedPublicIpAddressConfiguration', + 'SubnetSharedPublicIpAddressConfigurationFragment', + 'TargetCostProperties', 'UpdateResource', - 'UserIdentity', - 'UserSecretStore', 'User', + 'UserFragment', + 'UserIdentity', 'UserIdentityFragment', + 'UserSecretStore', 'UserSecretStoreFragment', - 'UserFragment', 'VirtualNetwork', 'VirtualNetworkFragment', + 'WeekDetails', + 'WeekDetailsFragment', + 'WindowsOsInfo', + 'WindowsOsInfoFragment', 'OperationMetadataPaged', 'LabPaged', 'LabVhdPaged', @@ -510,7 +509,6 @@ 'GalleryImagePaged', 'NotificationChannelPaged', 'PolicyPaged', - 'ServiceRunnerPaged', 'UserPaged', 'DiskPaged', 'DtlEnvironmentPaged', diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dev_test_labs_client_enums.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_dev_test_labs_client_enums.py similarity index 98% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dev_test_labs_client_enums.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_dev_test_labs_client_enums.py index 035e4b81b91c..6a60d733ee01 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dev_test_labs_client_enums.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_dev_test_labs_client_enums.py @@ -28,6 +28,7 @@ class StorageType(str, Enum): standard = "Standard" premium = "Premium" + standard_ssd = "StandardSSD" class CostThresholdStatus(str, Enum): @@ -80,6 +81,7 @@ class VirtualMachineCreationSource(str, Enum): from_custom_image = "FromCustomImage" from_gallery_image = "FromGalleryImage" + from_shared_gallery_image = "FromSharedGalleryImage" class FileUploadOptions(str, Enum): diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models.py new file mode 100644 index 000000000000..cd489495c90c --- /dev/null +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models.py @@ -0,0 +1,5702 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Resource(Model): + """An Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ApplicableSchedule(Resource): + """Schedules applicable to a virtual machine. The schedules may have been + defined on a VM or on lab level. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set + at the lab or lab resource level. + :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.Schedule + :param lab_vms_startup: The auto-startup schedule, if one has been set at + the lab or lab resource level. + :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.Schedule + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'Schedule'}, + 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'Schedule'}, + } + + def __init__(self, **kwargs): + super(ApplicableSchedule, self).__init__(**kwargs) + self.lab_vms_shutdown = kwargs.get('lab_vms_shutdown', None) + self.lab_vms_startup = kwargs.get('lab_vms_startup', None) + + +class UpdateResource(Model): + """Represents an update resource. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(UpdateResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class ApplicableScheduleFragment(UpdateResource): + """Schedules applicable to a virtual machine. The schedules may have been + defined on a VM or on lab level. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set + at the lab or lab resource level. + :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.ScheduleFragment + :param lab_vms_startup: The auto-startup schedule, if one has been set at + the lab or lab resource level. + :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.ScheduleFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'ScheduleFragment'}, + 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'ScheduleFragment'}, + } + + def __init__(self, **kwargs): + super(ApplicableScheduleFragment, self).__init__(**kwargs) + self.lab_vms_shutdown = kwargs.get('lab_vms_shutdown', None) + self.lab_vms_startup = kwargs.get('lab_vms_startup', None) + + +class ApplyArtifactsRequest(Model): + """Request body for applying artifacts to a virtual machine. + + :param artifacts: The list of artifacts to apply. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + """ + + _attribute_map = { + 'artifacts': {'key': 'artifacts', 'type': '[ArtifactInstallProperties]'}, + } + + def __init__(self, **kwargs): + super(ApplyArtifactsRequest, self).__init__(**kwargs) + self.artifacts = kwargs.get('artifacts', None) + + +class ArmTemplate(Resource): + """An Azure Resource Manager template. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar display_name: The display name of the ARM template. + :vartype display_name: str + :ivar description: The description of the ARM template. + :vartype description: str + :ivar publisher: The publisher of the ARM template. + :vartype publisher: str + :ivar icon: The URI to the icon of the ARM template. + :vartype icon: str + :ivar contents: The contents of the ARM template. + :vartype contents: object + :ivar created_date: The creation date of the armTemplate. + :vartype created_date: datetime + :ivar parameters_value_files_info: File name and parameter values + information from all azuredeploy.*.parameters.json for the ARM template. + :vartype parameters_value_files_info: + list[~azure.mgmt.devtestlabs.models.ParametersValueFileInfo] + :ivar enabled: Whether or not ARM template is enabled for use by lab user. + :vartype enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'publisher': {'readonly': True}, + 'icon': {'readonly': True}, + 'contents': {'readonly': True}, + 'created_date': {'readonly': True}, + 'parameters_value_files_info': {'readonly': True}, + 'enabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'contents': {'key': 'properties.contents', 'type': 'object'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'parameters_value_files_info': {'key': 'properties.parametersValueFilesInfo', 'type': '[ParametersValueFileInfo]'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ArmTemplate, self).__init__(**kwargs) + self.display_name = None + self.description = None + self.publisher = None + self.icon = None + self.contents = None + self.created_date = None + self.parameters_value_files_info = None + self.enabled = None + + +class ArmTemplateInfo(Model): + """Information about a generated ARM template. + + :param template: The template's contents. + :type template: object + :param parameters: The parameters of the ARM template. + :type parameters: object + """ + + _attribute_map = { + 'template': {'key': 'template', 'type': 'object'}, + 'parameters': {'key': 'parameters', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ArmTemplateInfo, self).__init__(**kwargs) + self.template = kwargs.get('template', None) + self.parameters = kwargs.get('parameters', None) + + +class ArmTemplateParameterProperties(Model): + """Properties of an Azure Resource Manager template parameter. + + :param name: The name of the template parameter. + :type name: str + :param value: The value of the template parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArmTemplateParameterProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class ArmTemplateParameterPropertiesFragment(Model): + """Properties of an Azure Resource Manager template parameter. + + :param name: The name of the template parameter. + :type name: str + :param value: The value of the template parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArmTemplateParameterPropertiesFragment, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class Artifact(Resource): + """An artifact. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar title: The artifact's title. + :vartype title: str + :ivar description: The artifact's description. + :vartype description: str + :ivar publisher: The artifact's publisher. + :vartype publisher: str + :ivar file_path: The file path to the artifact. + :vartype file_path: str + :ivar icon: The URI to the artifact icon. + :vartype icon: str + :ivar target_os_type: The artifact's target OS. + :vartype target_os_type: str + :ivar parameters: The artifact's parameters. + :vartype parameters: object + :ivar created_date: The artifact's creation date. + :vartype created_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'title': {'readonly': True}, + 'description': {'readonly': True}, + 'publisher': {'readonly': True}, + 'file_path': {'readonly': True}, + 'icon': {'readonly': True}, + 'target_os_type': {'readonly': True}, + 'parameters': {'readonly': True}, + 'created_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'file_path': {'key': 'properties.filePath', 'type': 'str'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'target_os_type': {'key': 'properties.targetOsType', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': 'object'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(Artifact, self).__init__(**kwargs) + self.title = None + self.description = None + self.publisher = None + self.file_path = None + self.icon = None + self.target_os_type = None + self.parameters = None + self.created_date = None + + +class ArtifactDeploymentStatusProperties(Model): + """Properties of an artifact deployment. + + :param deployment_status: The deployment status of the artifact. + :type deployment_status: str + :param artifacts_applied: The total count of the artifacts that were + successfully applied. + :type artifacts_applied: int + :param total_artifacts: The total count of the artifacts that were + tentatively applied. + :type total_artifacts: int + """ + + _attribute_map = { + 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, + 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, + 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ArtifactDeploymentStatusProperties, self).__init__(**kwargs) + self.deployment_status = kwargs.get('deployment_status', None) + self.artifacts_applied = kwargs.get('artifacts_applied', None) + self.total_artifacts = kwargs.get('total_artifacts', None) + + +class ArtifactDeploymentStatusPropertiesFragment(Model): + """Properties of an artifact deployment. + + :param deployment_status: The deployment status of the artifact. + :type deployment_status: str + :param artifacts_applied: The total count of the artifacts that were + successfully applied. + :type artifacts_applied: int + :param total_artifacts: The total count of the artifacts that were + tentatively applied. + :type total_artifacts: int + """ + + _attribute_map = { + 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, + 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, + 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ArtifactDeploymentStatusPropertiesFragment, self).__init__(**kwargs) + self.deployment_status = kwargs.get('deployment_status', None) + self.artifacts_applied = kwargs.get('artifacts_applied', None) + self.total_artifacts = kwargs.get('total_artifacts', None) + + +class ArtifactInstallProperties(Model): + """Properties of an artifact. + + :param artifact_id: The artifact's identifier. + :type artifact_id: str + :param artifact_title: The artifact's title. + :type artifact_title: str + :param parameters: The parameters of the artifact. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArtifactParameterProperties] + :param status: The status of the artifact. + :type status: str + :param deployment_status_message: The status message from the deployment. + :type deployment_status_message: str + :param vm_extension_status_message: The status message from the virtual + machine extension. + :type vm_extension_status_message: str + :param install_time: The time that the artifact starts to install on the + virtual machine. + :type install_time: datetime + """ + + _attribute_map = { + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterProperties]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, + 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, + 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ArtifactInstallProperties, self).__init__(**kwargs) + self.artifact_id = kwargs.get('artifact_id', None) + self.artifact_title = kwargs.get('artifact_title', None) + self.parameters = kwargs.get('parameters', None) + self.status = kwargs.get('status', None) + self.deployment_status_message = kwargs.get('deployment_status_message', None) + self.vm_extension_status_message = kwargs.get('vm_extension_status_message', None) + self.install_time = kwargs.get('install_time', None) + + +class ArtifactInstallPropertiesFragment(Model): + """Properties of an artifact. + + :param artifact_id: The artifact's identifier. + :type artifact_id: str + :param artifact_title: The artifact's title. + :type artifact_title: str + :param parameters: The parameters of the artifact. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArtifactParameterPropertiesFragment] + :param status: The status of the artifact. + :type status: str + :param deployment_status_message: The status message from the deployment. + :type deployment_status_message: str + :param vm_extension_status_message: The status message from the virtual + machine extension. + :type vm_extension_status_message: str + :param install_time: The time that the artifact starts to install on the + virtual machine. + :type install_time: datetime + """ + + _attribute_map = { + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterPropertiesFragment]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, + 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, + 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ArtifactInstallPropertiesFragment, self).__init__(**kwargs) + self.artifact_id = kwargs.get('artifact_id', None) + self.artifact_title = kwargs.get('artifact_title', None) + self.parameters = kwargs.get('parameters', None) + self.status = kwargs.get('status', None) + self.deployment_status_message = kwargs.get('deployment_status_message', None) + self.vm_extension_status_message = kwargs.get('vm_extension_status_message', None) + self.install_time = kwargs.get('install_time', None) + + +class ArtifactParameterProperties(Model): + """Properties of an artifact parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArtifactParameterProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class ArtifactParameterPropertiesFragment(Model): + """Properties of an artifact parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArtifactParameterPropertiesFragment, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class ArtifactSource(Resource): + """Properties of an artifact source. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param display_name: The artifact source's display name. + :type display_name: str + :param uri: The artifact source's URI. + :type uri: str + :param source_type: The artifact source's type. Possible values include: + 'VsoGit', 'GitHub' + :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType + :param folder_path: The folder containing artifacts. + :type folder_path: str + :param arm_template_folder_path: The folder containing Azure Resource + Manager templates. + :type arm_template_folder_path: str + :param branch_ref: The artifact source's branch reference. + :type branch_ref: str + :param security_token: The security token to authenticate to the artifact + source. + :type security_token: str + :param status: Indicates if the artifact source is enabled (values: + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :ivar created_date: The artifact source's creation date. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, + 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, + 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArtifactSource, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.uri = kwargs.get('uri', None) + self.source_type = kwargs.get('source_type', None) + self.folder_path = kwargs.get('folder_path', None) + self.arm_template_folder_path = kwargs.get('arm_template_folder_path', None) + self.branch_ref = kwargs.get('branch_ref', None) + self.security_token = kwargs.get('security_token', None) + self.status = kwargs.get('status', None) + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class ArtifactSourceFragment(UpdateResource): + """Properties of an artifact source. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param display_name: The artifact source's display name. + :type display_name: str + :param uri: The artifact source's URI. + :type uri: str + :param source_type: The artifact source's type. Possible values include: + 'VsoGit', 'GitHub' + :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType + :param folder_path: The folder containing artifacts. + :type folder_path: str + :param arm_template_folder_path: The folder containing Azure Resource + Manager templates. + :type arm_template_folder_path: str + :param branch_ref: The artifact source's branch reference. + :type branch_ref: str + :param security_token: The security token to authenticate to the artifact + source. + :type security_token: str + :param status: Indicates if the artifact source is enabled (values: + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, + 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, + 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArtifactSourceFragment, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.uri = kwargs.get('uri', None) + self.source_type = kwargs.get('source_type', None) + self.folder_path = kwargs.get('folder_path', None) + self.arm_template_folder_path = kwargs.get('arm_template_folder_path', None) + self.branch_ref = kwargs.get('branch_ref', None) + self.security_token = kwargs.get('security_token', None) + self.status = kwargs.get('status', None) + + +class AttachDiskProperties(Model): + """Properties of the disk to attach. + + :param leased_by_lab_vm_id: The resource ID of the Lab virtual machine to + which the disk is attached. + :type leased_by_lab_vm_id: str + """ + + _attribute_map = { + 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AttachDiskProperties, self).__init__(**kwargs) + self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) + + +class AttachNewDataDiskOptions(Model): + """Properties to attach new disk to the Virtual Machine. + + :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :type disk_size_gi_b: int + :param disk_name: The name of the disk to be attached. + :type disk_name: str + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + 'disk_name': {'key': 'diskName', 'type': 'str'}, + 'disk_type': {'key': 'diskType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AttachNewDataDiskOptions, self).__init__(**kwargs) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + self.disk_name = kwargs.get('disk_name', None) + self.disk_type = kwargs.get('disk_type', None) + + +class AttachNewDataDiskOptionsFragment(Model): + """Properties to attach new disk to the Virtual Machine. + + :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :type disk_size_gi_b: int + :param disk_name: The name of the disk to be attached. + :type disk_name: str + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + 'disk_name': {'key': 'diskName', 'type': 'str'}, + 'disk_type': {'key': 'diskType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AttachNewDataDiskOptionsFragment, self).__init__(**kwargs) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + self.disk_name = kwargs.get('disk_name', None) + self.disk_type = kwargs.get('disk_type', None) + + +class BulkCreationParameters(Model): + """Parameters for creating multiple virtual machines as a single action. + + :param instance_count: The number of virtual machine instances to create. + :type instance_count: int + """ + + _attribute_map = { + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BulkCreationParameters, self).__init__(**kwargs) + self.instance_count = kwargs.get('instance_count', None) + + +class BulkCreationParametersFragment(Model): + """Parameters for creating multiple virtual machines as a single action. + + :param instance_count: The number of virtual machine instances to create. + :type instance_count: int + """ + + _attribute_map = { + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BulkCreationParametersFragment, self).__init__(**kwargs) + self.instance_count = kwargs.get('instance_count', None) + + +class CloudError(Model): + """Error from a REST request. + + :param error: The cloud error that occurred + :type error: ~azure.mgmt.devtestlabs.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, **kwargs): + super(CloudError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """Body of an error from a REST request. + + :param code: The error code. + :type code: str + :param message: The error message. + :type message: str + :param target: The error target. + :type target: str + :param details: Inner errors. + :type details: list[~azure.mgmt.devtestlabs.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, **kwargs): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class ComputeDataDisk(Model): + """A data disks attached to a virtual machine. + + :param name: Gets data disk name. + :type name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :param disk_size_gi_b: Gets data disk size in GiB. + :type disk_size_gi_b: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disk_uri': {'key': 'diskUri', 'type': 'str'}, + 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ComputeDataDisk, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.disk_uri = kwargs.get('disk_uri', None) + self.managed_disk_id = kwargs.get('managed_disk_id', None) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + + +class ComputeDataDiskFragment(Model): + """A data disks attached to a virtual machine. + + :param name: Gets data disk name. + :type name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :param disk_size_gi_b: Gets data disk size in GiB. + :type disk_size_gi_b: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disk_uri': {'key': 'diskUri', 'type': 'str'}, + 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ComputeDataDiskFragment, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.disk_uri = kwargs.get('disk_uri', None) + self.managed_disk_id = kwargs.get('managed_disk_id', None) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + + +class ComputeVmInstanceViewStatus(Model): + """Status information about a virtual machine. + + :param code: Gets the status Code. + :type code: str + :param display_status: Gets the short localizable label for the status. + :type display_status: str + :param message: Gets the message associated with the status. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComputeVmInstanceViewStatus, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.display_status = kwargs.get('display_status', None) + self.message = kwargs.get('message', None) + + +class ComputeVmInstanceViewStatusFragment(Model): + """Status information about a virtual machine. + + :param code: Gets the status Code. + :type code: str + :param display_status: Gets the short localizable label for the status. + :type display_status: str + :param message: Gets the message associated with the status. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComputeVmInstanceViewStatusFragment, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.display_status = kwargs.get('display_status', None) + self.message = kwargs.get('message', None) + + +class ComputeVmProperties(Model): + """Properties of a virtual machine returned by the Microsoft.Compute API. + + :param statuses: Gets the statuses of the virtual machine. + :type statuses: + list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatus] + :param os_type: Gets the OS type of the virtual machine. + :type os_type: str + :param vm_size: Gets the size of the virtual machine. + :type vm_size: str + :param network_interface_id: Gets the network interface ID of the virtual + machine. + :type network_interface_id: str + :param os_disk_id: Gets OS disk blob uri for the virtual machine. + :type os_disk_id: str + :param data_disk_ids: Gets data disks blob uri for the virtual machine. + :type data_disk_ids: list[str] + :param data_disks: Gets all data disks attached to the virtual machine. + :type data_disks: list[~azure.mgmt.devtestlabs.models.ComputeDataDisk] + """ + + _attribute_map = { + 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatus]'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, + 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, + 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDisk]'}, + } + + def __init__(self, **kwargs): + super(ComputeVmProperties, self).__init__(**kwargs) + self.statuses = kwargs.get('statuses', None) + self.os_type = kwargs.get('os_type', None) + self.vm_size = kwargs.get('vm_size', None) + self.network_interface_id = kwargs.get('network_interface_id', None) + self.os_disk_id = kwargs.get('os_disk_id', None) + self.data_disk_ids = kwargs.get('data_disk_ids', None) + self.data_disks = kwargs.get('data_disks', None) + + +class ComputeVmPropertiesFragment(Model): + """Properties of a virtual machine returned by the Microsoft.Compute API. + + :param statuses: Gets the statuses of the virtual machine. + :type statuses: + list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatusFragment] + :param os_type: Gets the OS type of the virtual machine. + :type os_type: str + :param vm_size: Gets the size of the virtual machine. + :type vm_size: str + :param network_interface_id: Gets the network interface ID of the virtual + machine. + :type network_interface_id: str + :param os_disk_id: Gets OS disk blob uri for the virtual machine. + :type os_disk_id: str + :param data_disk_ids: Gets data disks blob uri for the virtual machine. + :type data_disk_ids: list[str] + :param data_disks: Gets all data disks attached to the virtual machine. + :type data_disks: + list[~azure.mgmt.devtestlabs.models.ComputeDataDiskFragment] + """ + + _attribute_map = { + 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatusFragment]'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, + 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, + 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDiskFragment]'}, + } + + def __init__(self, **kwargs): + super(ComputeVmPropertiesFragment, self).__init__(**kwargs) + self.statuses = kwargs.get('statuses', None) + self.os_type = kwargs.get('os_type', None) + self.vm_size = kwargs.get('vm_size', None) + self.network_interface_id = kwargs.get('network_interface_id', None) + self.os_disk_id = kwargs.get('os_disk_id', None) + self.data_disk_ids = kwargs.get('data_disk_ids', None) + self.data_disks = kwargs.get('data_disks', None) + + +class CostThresholdProperties(Model): + """Properties of a cost threshold item. + + :param threshold_id: The ID of the cost threshold item. + :type threshold_id: str + :param percentage_threshold: The value of the percentage cost threshold. + :type percentage_threshold: + ~azure.mgmt.devtestlabs.models.PercentageCostThresholdProperties + :param display_on_chart: Indicates whether this threshold will be + displayed on cost charts. Possible values include: 'Enabled', 'Disabled' + :type display_on_chart: str or + ~azure.mgmt.devtestlabs.models.CostThresholdStatus + :param send_notification_when_exceeded: Indicates whether notifications + will be sent when this threshold is exceeded. Possible values include: + 'Enabled', 'Disabled' + :type send_notification_when_exceeded: str or + ~azure.mgmt.devtestlabs.models.CostThresholdStatus + :param notification_sent: Indicates the datetime when notifications were + last sent for this threshold. + :type notification_sent: str + """ + + _attribute_map = { + 'threshold_id': {'key': 'thresholdId', 'type': 'str'}, + 'percentage_threshold': {'key': 'percentageThreshold', 'type': 'PercentageCostThresholdProperties'}, + 'display_on_chart': {'key': 'displayOnChart', 'type': 'str'}, + 'send_notification_when_exceeded': {'key': 'sendNotificationWhenExceeded', 'type': 'str'}, + 'notification_sent': {'key': 'notificationSent', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CostThresholdProperties, self).__init__(**kwargs) + self.threshold_id = kwargs.get('threshold_id', None) + self.percentage_threshold = kwargs.get('percentage_threshold', None) + self.display_on_chart = kwargs.get('display_on_chart', None) + self.send_notification_when_exceeded = kwargs.get('send_notification_when_exceeded', None) + self.notification_sent = kwargs.get('notification_sent', None) + + +class CustomImage(Resource): + """A custom image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param vm: The virtual machine from which the image is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVm + :param vhd: The VHD from which the image is to be created. + :type vhd: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustom + :param description: The description of the custom image. + :type description: str + :param author: The author of the custom image. + :type author: str + :ivar creation_date: The creation date of the custom image. + :vartype creation_date: datetime + :param managed_image_id: The Managed Image Id backing the custom image. + :type managed_image_id: str + :param managed_snapshot_id: The Managed Snapshot Id backing the custom + image. + :type managed_snapshot_id: str + :param data_disk_storage_info: Storage information about the data disks + present in the custom image + :type data_disk_storage_info: + list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfo] + :param custom_image_plan: Storage information about the plan related to + this custom image + :type custom_image_plan: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlan + :param is_plan_authorized: Whether or not the custom images underlying + offer/plan has been enabled for programmatic deployment + :type is_plan_authorized: bool + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVm'}, + 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustom'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, + 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, + 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfo]'}, + 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlan'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomImage, self).__init__(**kwargs) + self.vm = kwargs.get('vm', None) + self.vhd = kwargs.get('vhd', None) + self.description = kwargs.get('description', None) + self.author = kwargs.get('author', None) + self.creation_date = None + self.managed_image_id = kwargs.get('managed_image_id', None) + self.managed_snapshot_id = kwargs.get('managed_snapshot_id', None) + self.data_disk_storage_info = kwargs.get('data_disk_storage_info', None) + self.custom_image_plan = kwargs.get('custom_image_plan', None) + self.is_plan_authorized = kwargs.get('is_plan_authorized', None) + self.provisioning_state = None + self.unique_identifier = None + + +class CustomImageFragment(UpdateResource): + """A custom image. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param vm: The virtual machine from which the image is to be created. + :type vm: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVmFragment + :param vhd: The VHD from which the image is to be created. + :type vhd: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustomFragment + :param description: The description of the custom image. + :type description: str + :param author: The author of the custom image. + :type author: str + :param managed_image_id: The Managed Image Id backing the custom image. + :type managed_image_id: str + :param managed_snapshot_id: The Managed Snapshot Id backing the custom + image. + :type managed_snapshot_id: str + :param data_disk_storage_info: Storage information about the data disks + present in the custom image + :type data_disk_storage_info: + list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfoFragment] + :param custom_image_plan: Storage information about the plan related to + this custom image + :type custom_image_plan: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlanFragment + :param is_plan_authorized: Whether or not the custom images underlying + offer/plan has been enabled for programmatic deployment + :type is_plan_authorized: bool + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVmFragment'}, + 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustomFragment'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, + 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, + 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfoFragment]'}, + 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlanFragment'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(CustomImageFragment, self).__init__(**kwargs) + self.vm = kwargs.get('vm', None) + self.vhd = kwargs.get('vhd', None) + self.description = kwargs.get('description', None) + self.author = kwargs.get('author', None) + self.managed_image_id = kwargs.get('managed_image_id', None) + self.managed_snapshot_id = kwargs.get('managed_snapshot_id', None) + self.data_disk_storage_info = kwargs.get('data_disk_storage_info', None) + self.custom_image_plan = kwargs.get('custom_image_plan', None) + self.is_plan_authorized = kwargs.get('is_plan_authorized', None) + + +class CustomImagePropertiesCustom(Model): + """Properties for creating a custom image from a VHD. + + All required parameters must be populated in order to send to Azure. + + :param image_name: The image name. + :type image_name: str + :param sys_prep: Indicates whether sysprep has been run on the VHD. + :type sys_prep: bool + :param os_type: Required. The OS type of the custom image (i.e. Windows, + Linux). Possible values include: 'Windows', 'Linux', 'None' + :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType + """ + + _validation = { + 'os_type': {'required': True}, + } + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesCustom, self).__init__(**kwargs) + self.image_name = kwargs.get('image_name', None) + self.sys_prep = kwargs.get('sys_prep', None) + self.os_type = kwargs.get('os_type', None) + + +class CustomImagePropertiesCustomFragment(Model): + """Properties for creating a custom image from a VHD. + + :param image_name: The image name. + :type image_name: str + :param sys_prep: Indicates whether sysprep has been run on the VHD. + :type sys_prep: bool + :param os_type: The OS type of the custom image (i.e. Windows, Linux). + Possible values include: 'Windows', 'Linux', 'None' + :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType + """ + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesCustomFragment, self).__init__(**kwargs) + self.image_name = kwargs.get('image_name', None) + self.sys_prep = kwargs.get('sys_prep', None) + self.os_type = kwargs.get('os_type', None) + + +class CustomImagePropertiesFromPlan(Model): + """Properties for plan on a custom image. + + :param id: The id of the plan, equivalent to name of the plan + :type id: str + :param publisher: The publisher for the plan from the marketplace image + the custom image is derived from + :type publisher: str + :param offer: The offer for the plan from the marketplace image the custom + image is derived from + :type offer: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesFromPlan, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) + + +class CustomImagePropertiesFromPlanFragment(Model): + """Properties for plan on a custom image. + + :param id: The id of the plan, equivalent to name of the plan + :type id: str + :param publisher: The publisher for the plan from the marketplace image + the custom image is derived from + :type publisher: str + :param offer: The offer for the plan from the marketplace image the custom + image is derived from + :type offer: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesFromPlanFragment, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) + + +class CustomImagePropertiesFromVm(Model): + """Properties for creating a custom image from a virtual machine. + + :param source_vm_id: The source vm identifier. + :type source_vm_id: str + :param windows_os_info: The Windows OS information of the VM. + :type windows_os_info: ~azure.mgmt.devtestlabs.models.WindowsOsInfo + :param linux_os_info: The Linux OS information of the VM. + :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfo + """ + + _attribute_map = { + 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, + 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfo'}, + 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfo'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesFromVm, self).__init__(**kwargs) + self.source_vm_id = kwargs.get('source_vm_id', None) + self.windows_os_info = kwargs.get('windows_os_info', None) + self.linux_os_info = kwargs.get('linux_os_info', None) + + +class CustomImagePropertiesFromVmFragment(Model): + """Properties for creating a custom image from a virtual machine. + + :param source_vm_id: The source vm identifier. + :type source_vm_id: str + :param windows_os_info: The Windows OS information of the VM. + :type windows_os_info: + ~azure.mgmt.devtestlabs.models.WindowsOsInfoFragment + :param linux_os_info: The Linux OS information of the VM. + :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfoFragment + """ + + _attribute_map = { + 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, + 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfoFragment'}, + 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfoFragment'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesFromVmFragment, self).__init__(**kwargs) + self.source_vm_id = kwargs.get('source_vm_id', None) + self.windows_os_info = kwargs.get('windows_os_info', None) + self.linux_os_info = kwargs.get('linux_os_info', None) + + +class DataDiskProperties(Model): + """Request body for adding a new or existing data disk to a virtual machine. + + :param attach_new_data_disk_options: Specifies options to attach a new + disk to the virtual machine. + :type attach_new_data_disk_options: + ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptions + :param existing_lab_disk_id: Specifies the existing lab disk id to attach + to virtual machine. + :type existing_lab_disk_id: str + :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, + ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type host_caching: str or + ~azure.mgmt.devtestlabs.models.HostCachingOptions + """ + + _attribute_map = { + 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptions'}, + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + 'host_caching': {'key': 'hostCaching', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataDiskProperties, self).__init__(**kwargs) + self.attach_new_data_disk_options = kwargs.get('attach_new_data_disk_options', None) + self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) + self.host_caching = kwargs.get('host_caching', None) + + +class DataDiskPropertiesFragment(Model): + """Request body for adding a new or existing data disk to a virtual machine. + + :param attach_new_data_disk_options: Specifies options to attach a new + disk to the virtual machine. + :type attach_new_data_disk_options: + ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptionsFragment + :param existing_lab_disk_id: Specifies the existing lab disk id to attach + to virtual machine. + :type existing_lab_disk_id: str + :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, + ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type host_caching: str or + ~azure.mgmt.devtestlabs.models.HostCachingOptions + """ + + _attribute_map = { + 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptionsFragment'}, + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + 'host_caching': {'key': 'hostCaching', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataDiskPropertiesFragment, self).__init__(**kwargs) + self.attach_new_data_disk_options = kwargs.get('attach_new_data_disk_options', None) + self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) + self.host_caching = kwargs.get('host_caching', None) + + +class DataDiskStorageTypeInfo(Model): + """Storage information about the data disks present in the custom image. + + :param lun: Disk Lun + :type lun: str + :param storage_type: Disk Storage Type. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataDiskStorageTypeInfo, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.storage_type = kwargs.get('storage_type', None) + + +class DataDiskStorageTypeInfoFragment(Model): + """Storage information about the data disks present in the custom image. + + :param lun: Disk Lun + :type lun: str + :param storage_type: Disk Storage Type. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataDiskStorageTypeInfoFragment, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.storage_type = kwargs.get('storage_type', None) + + +class DayDetails(Model): + """Properties of a daily schedule. + + :param time: The time of day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DayDetails, self).__init__(**kwargs) + self.time = kwargs.get('time', None) + + +class DayDetailsFragment(Model): + """Properties of a daily schedule. + + :param time: The time of day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DayDetailsFragment, self).__init__(**kwargs) + self.time = kwargs.get('time', None) + + +class DetachDataDiskProperties(Model): + """Request body for detaching data disk from a virtual machine. + + :param existing_lab_disk_id: Specifies the disk resource ID to detach from + virtual machine. + :type existing_lab_disk_id: str + """ + + _attribute_map = { + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DetachDataDiskProperties, self).__init__(**kwargs) + self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) + + +class DetachDiskProperties(Model): + """Properties of the disk to detach. + + :param leased_by_lab_vm_id: The resource ID of the Lab VM to which the + disk is attached. + :type leased_by_lab_vm_id: str + """ + + _attribute_map = { + 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DetachDiskProperties, self).__init__(**kwargs) + self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) + + +class Disk(Resource): + """A Disk. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param disk_size_gi_b: The size of the disk in GibiBytes. + :type disk_size_gi_b: int + :param leased_by_lab_vm_id: The resource ID of the VM to which this disk + is leased. + :type leased_by_lab_vm_id: str + :param disk_blob_name: When backed by a blob, the name of the VHD blob + without extension. + :type disk_blob_name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :ivar created_date: The creation date of the disk. + :vartype created_date: datetime + :param host_caching: The host caching policy of the disk (i.e. None, + ReadOnly, ReadWrite). + :type host_caching: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, + 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, + 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, + 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, + 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Disk, self).__init__(**kwargs) + self.disk_type = kwargs.get('disk_type', None) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) + self.disk_blob_name = kwargs.get('disk_blob_name', None) + self.disk_uri = kwargs.get('disk_uri', None) + self.created_date = None + self.host_caching = kwargs.get('host_caching', None) + self.managed_disk_id = kwargs.get('managed_disk_id', None) + self.provisioning_state = None + self.unique_identifier = None + + +class DiskFragment(UpdateResource): + """A Disk. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param disk_size_gi_b: The size of the disk in GibiBytes. + :type disk_size_gi_b: int + :param leased_by_lab_vm_id: The resource ID of the VM to which this disk + is leased. + :type leased_by_lab_vm_id: str + :param disk_blob_name: When backed by a blob, the name of the VHD blob + without extension. + :type disk_blob_name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param host_caching: The host caching policy of the disk (i.e. None, + ReadOnly, ReadWrite). + :type host_caching: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, + 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, + 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, + 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, + 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, + 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DiskFragment, self).__init__(**kwargs) + self.disk_type = kwargs.get('disk_type', None) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) + self.disk_blob_name = kwargs.get('disk_blob_name', None) + self.disk_uri = kwargs.get('disk_uri', None) + self.host_caching = kwargs.get('host_caching', None) + self.managed_disk_id = kwargs.get('managed_disk_id', None) + + +class DtlEnvironment(Resource): + """An environment, which is essentially an ARM template deployment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param deployment_properties: The deployment properties of the + environment. + :type deployment_properties: + ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentProperties + :param arm_template_display_name: The display name of the Azure Resource + Manager template that produced the environment. + :type arm_template_display_name: str + :ivar resource_group_id: The identifier of the resource group containing + the environment's resources. + :vartype resource_group_id: str + :ivar created_by_user: The creator of the environment. + :vartype created_by_user: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_group_id': {'readonly': True}, + 'created_by_user': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentProperties'}, + 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, + 'resource_group_id': {'key': 'properties.resourceGroupId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DtlEnvironment, self).__init__(**kwargs) + self.deployment_properties = kwargs.get('deployment_properties', None) + self.arm_template_display_name = kwargs.get('arm_template_display_name', None) + self.resource_group_id = None + self.created_by_user = None + self.provisioning_state = None + self.unique_identifier = None + + +class DtlEnvironmentFragment(UpdateResource): + """An environment, which is essentially an ARM template deployment. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param deployment_properties: The deployment properties of the + environment. + :type deployment_properties: + ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentPropertiesFragment + :param arm_template_display_name: The display name of the Azure Resource + Manager template that produced the environment. + :type arm_template_display_name: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentPropertiesFragment'}, + 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DtlEnvironmentFragment, self).__init__(**kwargs) + self.deployment_properties = kwargs.get('deployment_properties', None) + self.arm_template_display_name = kwargs.get('arm_template_display_name', None) + + +class EnvironmentDeploymentProperties(Model): + """Properties of an environment deployment. + + :param arm_template_id: The Azure Resource Manager template's identifier. + :type arm_template_id: str + :param parameters: The parameters of the Azure Resource Manager template. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterProperties] + """ + + _attribute_map = { + 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterProperties]'}, + } + + def __init__(self, **kwargs): + super(EnvironmentDeploymentProperties, self).__init__(**kwargs) + self.arm_template_id = kwargs.get('arm_template_id', None) + self.parameters = kwargs.get('parameters', None) + + +class EnvironmentDeploymentPropertiesFragment(Model): + """Properties of an environment deployment. + + :param arm_template_id: The Azure Resource Manager template's identifier. + :type arm_template_id: str + :param parameters: The parameters of the Azure Resource Manager template. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterPropertiesFragment] + """ + + _attribute_map = { + 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterPropertiesFragment]'}, + } + + def __init__(self, **kwargs): + super(EnvironmentDeploymentPropertiesFragment, self).__init__(**kwargs) + self.arm_template_id = kwargs.get('arm_template_id', None) + self.parameters = kwargs.get('parameters', None) + + +class EvaluatePoliciesProperties(Model): + """Properties for evaluating a policy set. + + :param fact_name: The fact name. + :type fact_name: str + :param fact_data: The fact data. + :type fact_data: str + :param value_offset: The value offset. + :type value_offset: str + :param user_object_id: The user for which policies will be evaluated + :type user_object_id: str + """ + + _attribute_map = { + 'fact_name': {'key': 'factName', 'type': 'str'}, + 'fact_data': {'key': 'factData', 'type': 'str'}, + 'value_offset': {'key': 'valueOffset', 'type': 'str'}, + 'user_object_id': {'key': 'userObjectId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EvaluatePoliciesProperties, self).__init__(**kwargs) + self.fact_name = kwargs.get('fact_name', None) + self.fact_data = kwargs.get('fact_data', None) + self.value_offset = kwargs.get('value_offset', None) + self.user_object_id = kwargs.get('user_object_id', None) + + +class EvaluatePoliciesRequest(Model): + """Request body for evaluating a policy set. + + :param policies: Policies to evaluate. + :type policies: + list[~azure.mgmt.devtestlabs.models.EvaluatePoliciesProperties] + """ + + _attribute_map = { + 'policies': {'key': 'policies', 'type': '[EvaluatePoliciesProperties]'}, + } + + def __init__(self, **kwargs): + super(EvaluatePoliciesRequest, self).__init__(**kwargs) + self.policies = kwargs.get('policies', None) + + +class EvaluatePoliciesResponse(Model): + """Response body for evaluating a policy set. + + :param results: Results of evaluating a policy set. + :type results: list[~azure.mgmt.devtestlabs.models.PolicySetResult] + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': '[PolicySetResult]'}, + } + + def __init__(self, **kwargs): + super(EvaluatePoliciesResponse, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + + +class Event(Model): + """An event to be notified for. + + :param event_name: The event type for which this notification is enabled + (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Event, self).__init__(**kwargs) + self.event_name = kwargs.get('event_name', None) + + +class EventFragment(Model): + """An event to be notified for. + + :param event_name: The event type for which this notification is enabled + (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EventFragment, self).__init__(**kwargs) + self.event_name = kwargs.get('event_name', None) + + +class ExportResourceUsageParameters(Model): + """The parameters of the export operation. + + :param blob_storage_absolute_sas_uri: The blob storage absolute sas uri + with write permission to the container which the usage data needs to be + uploaded to. + :type blob_storage_absolute_sas_uri: str + :param usage_start_date: The start time of the usage. If not provided, + usage will be reported since the beginning of data collection. + :type usage_start_date: datetime + """ + + _attribute_map = { + 'blob_storage_absolute_sas_uri': {'key': 'blobStorageAbsoluteSasUri', 'type': 'str'}, + 'usage_start_date': {'key': 'usageStartDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ExportResourceUsageParameters, self).__init__(**kwargs) + self.blob_storage_absolute_sas_uri = kwargs.get('blob_storage_absolute_sas_uri', None) + self.usage_start_date = kwargs.get('usage_start_date', None) + + +class ExternalSubnet(Model): + """Subnet information as returned by the Microsoft.Network API. + + :param id: Gets or sets the identifier. + :type id: str + :param name: Gets or sets the name. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExternalSubnet, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + + +class ExternalSubnetFragment(Model): + """Subnet information as returned by the Microsoft.Network API. + + :param id: Gets or sets the identifier. + :type id: str + :param name: Gets or sets the name. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExternalSubnetFragment, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + + +class Formula(Resource): + """A formula for creating a VM, specifying an image base and other parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the formula. + :type description: str + :param author: The author of the formula. + :type author: str + :param os_type: The OS type of the formula. + :type os_type: str + :ivar creation_date: The creation date of the formula. + :vartype creation_date: datetime + :param formula_content: The content of the formula. + :type formula_content: + ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameter + :param vm: Information about a VM from which a formula is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVm + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameter'}, + 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVm'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Formula, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.author = kwargs.get('author', None) + self.os_type = kwargs.get('os_type', None) + self.creation_date = None + self.formula_content = kwargs.get('formula_content', None) + self.vm = kwargs.get('vm', None) + self.provisioning_state = None + self.unique_identifier = None + + +class FormulaFragment(UpdateResource): + """A formula for creating a VM, specifying an image base and other parameters. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the formula. + :type description: str + :param author: The author of the formula. + :type author: str + :param os_type: The OS type of the formula. + :type os_type: str + :param formula_content: The content of the formula. + :type formula_content: + ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameterFragment + :param vm: Information about a VM from which a formula is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVmFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameterFragment'}, + 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVmFragment'}, + } + + def __init__(self, **kwargs): + super(FormulaFragment, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.author = kwargs.get('author', None) + self.os_type = kwargs.get('os_type', None) + self.formula_content = kwargs.get('formula_content', None) + self.vm = kwargs.get('vm', None) + + +class FormulaPropertiesFromVm(Model): + """Information about a VM from which a formula is to be created. + + :param lab_vm_id: The identifier of the VM from which a formula is to be + created. + :type lab_vm_id: str + """ + + _attribute_map = { + 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FormulaPropertiesFromVm, self).__init__(**kwargs) + self.lab_vm_id = kwargs.get('lab_vm_id', None) + + +class FormulaPropertiesFromVmFragment(Model): + """Information about a VM from which a formula is to be created. + + :param lab_vm_id: The identifier of the VM from which a formula is to be + created. + :type lab_vm_id: str + """ + + _attribute_map = { + 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FormulaPropertiesFromVmFragment, self).__init__(**kwargs) + self.lab_vm_id = kwargs.get('lab_vm_id', None) + + +class GalleryImage(Resource): + """A gallery image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param author: The author of the gallery image. + :type author: str + :ivar created_date: The creation date of the gallery image. + :vartype created_date: datetime + :param description: The description of the gallery image. + :type description: str + :param image_reference: The image reference of the gallery image. + :type image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param icon: The icon of the gallery image. + :type icon: str + :param enabled: Indicates whether this gallery image is enabled. + :type enabled: bool + :param plan_id: The third party plan that applies to this image + :type plan_id: str + :param is_plan_authorized: Indicates if the plan has been authorized for + programmatic deployment. + :type is_plan_authorized: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'image_reference': {'key': 'properties.imageReference', 'type': 'GalleryImageReference'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(GalleryImage, self).__init__(**kwargs) + self.author = kwargs.get('author', None) + self.created_date = None + self.description = kwargs.get('description', None) + self.image_reference = kwargs.get('image_reference', None) + self.icon = kwargs.get('icon', None) + self.enabled = kwargs.get('enabled', None) + self.plan_id = kwargs.get('plan_id', None) + self.is_plan_authorized = kwargs.get('is_plan_authorized', None) + + +class GalleryImageReference(Model): + """The reference information for an Azure Marketplace image. + + :param offer: The offer of the gallery image. + :type offer: str + :param publisher: The publisher of the gallery image. + :type publisher: str + :param sku: The SKU of the gallery image. + :type sku: str + :param os_type: The OS type of the gallery image. + :type os_type: str + :param version: The version of the gallery image. + :type version: str + """ + + _attribute_map = { + 'offer': {'key': 'offer', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GalleryImageReference, self).__init__(**kwargs) + self.offer = kwargs.get('offer', None) + self.publisher = kwargs.get('publisher', None) + self.sku = kwargs.get('sku', None) + self.os_type = kwargs.get('os_type', None) + self.version = kwargs.get('version', None) + + +class GalleryImageReferenceFragment(Model): + """The reference information for an Azure Marketplace image. + + :param offer: The offer of the gallery image. + :type offer: str + :param publisher: The publisher of the gallery image. + :type publisher: str + :param sku: The SKU of the gallery image. + :type sku: str + :param os_type: The OS type of the gallery image. + :type os_type: str + :param version: The version of the gallery image. + :type version: str + """ + + _attribute_map = { + 'offer': {'key': 'offer', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GalleryImageReferenceFragment, self).__init__(**kwargs) + self.offer = kwargs.get('offer', None) + self.publisher = kwargs.get('publisher', None) + self.sku = kwargs.get('sku', None) + self.os_type = kwargs.get('os_type', None) + self.version = kwargs.get('version', None) + + +class GenerateArmTemplateRequest(Model): + """Parameters for generating an ARM template for deploying artifacts. + + :param virtual_machine_name: The resource name of the virtual machine. + :type virtual_machine_name: str + :param parameters: The parameters of the ARM template. + :type parameters: list[~azure.mgmt.devtestlabs.models.ParameterInfo] + :param location: The location of the virtual machine. + :type location: str + :param file_upload_options: Options for uploading the files for the + artifact. UploadFilesAndGenerateSasTokens is the default value. Possible + values include: 'UploadFilesAndGenerateSasTokens', 'None' + :type file_upload_options: str or + ~azure.mgmt.devtestlabs.models.FileUploadOptions + """ + + _attribute_map = { + 'virtual_machine_name': {'key': 'virtualMachineName', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ParameterInfo]'}, + 'location': {'key': 'location', 'type': 'str'}, + 'file_upload_options': {'key': 'fileUploadOptions', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenerateArmTemplateRequest, self).__init__(**kwargs) + self.virtual_machine_name = kwargs.get('virtual_machine_name', None) + self.parameters = kwargs.get('parameters', None) + self.location = kwargs.get('location', None) + self.file_upload_options = kwargs.get('file_upload_options', None) + + +class GenerateUploadUriParameter(Model): + """Properties for generating an upload URI. + + :param blob_name: The blob name of the upload URI. + :type blob_name: str + """ + + _attribute_map = { + 'blob_name': {'key': 'blobName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenerateUploadUriParameter, self).__init__(**kwargs) + self.blob_name = kwargs.get('blob_name', None) + + +class GenerateUploadUriResponse(Model): + """Response body for generating an upload URI. + + :param upload_uri: The upload URI for the VHD. + :type upload_uri: str + """ + + _attribute_map = { + 'upload_uri': {'key': 'uploadUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenerateUploadUriResponse, self).__init__(**kwargs) + self.upload_uri = kwargs.get('upload_uri', None) + + +class HourDetails(Model): + """Properties of an hourly schedule. + + :param minute: Minutes of the hour the schedule will run. + :type minute: int + """ + + _attribute_map = { + 'minute': {'key': 'minute', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(HourDetails, self).__init__(**kwargs) + self.minute = kwargs.get('minute', None) + + +class HourDetailsFragment(Model): + """Properties of an hourly schedule. + + :param minute: Minutes of the hour the schedule will run. + :type minute: int + """ + + _attribute_map = { + 'minute': {'key': 'minute', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(HourDetailsFragment, self).__init__(**kwargs) + self.minute = kwargs.get('minute', None) + + +class IdentityProperties(Model): + """Properties of a managed identity. + + :param type: Managed identity. + :type type: str + :param principal_id: The principal id of resource identity. + :type principal_id: str + :param tenant_id: The tenant identifier of resource. + :type tenant_id: str + :param client_secret_url: The client secret URL of the identity. + :type client_secret_url: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'client_secret_url': {'key': 'clientSecretUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IdentityProperties, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.principal_id = kwargs.get('principal_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.client_secret_url = kwargs.get('client_secret_url', None) + + +class ImportLabVirtualMachineRequest(Model): + """This represents the payload required to import a virtual machine from a + different lab into the current one. + + :param source_virtual_machine_resource_id: The full resource ID of the + virtual machine to be imported. + :type source_virtual_machine_resource_id: str + :param destination_virtual_machine_name: The name of the virtual machine + in the destination lab + :type destination_virtual_machine_name: str + """ + + _attribute_map = { + 'source_virtual_machine_resource_id': {'key': 'sourceVirtualMachineResourceId', 'type': 'str'}, + 'destination_virtual_machine_name': {'key': 'destinationVirtualMachineName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImportLabVirtualMachineRequest, self).__init__(**kwargs) + self.source_virtual_machine_resource_id = kwargs.get('source_virtual_machine_resource_id', None) + self.destination_virtual_machine_name = kwargs.get('destination_virtual_machine_name', None) + + +class InboundNatRule(Model): + """A rule for NAT - exposing a VM's port (backendPort) on the public IP + address using a load balancer. + + :param transport_protocol: The transport protocol for the endpoint. + Possible values include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param frontend_port: The external endpoint port of the inbound + connection. Possible values range between 1 and 65535, inclusive. If + unspecified, a value will be allocated automatically. + :type frontend_port: int + :param backend_port: The port to which the external traffic will be + redirected. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(InboundNatRule, self).__init__(**kwargs) + self.transport_protocol = kwargs.get('transport_protocol', None) + self.frontend_port = kwargs.get('frontend_port', None) + self.backend_port = kwargs.get('backend_port', None) + + +class InboundNatRuleFragment(Model): + """A rule for NAT - exposing a VM's port (backendPort) on the public IP + address using a load balancer. + + :param transport_protocol: The transport protocol for the endpoint. + Possible values include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param frontend_port: The external endpoint port of the inbound + connection. Possible values range between 1 and 65535, inclusive. If + unspecified, a value will be allocated automatically. + :type frontend_port: int + :param backend_port: The port to which the external traffic will be + redirected. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(InboundNatRuleFragment, self).__init__(**kwargs) + self.transport_protocol = kwargs.get('transport_protocol', None) + self.frontend_port = kwargs.get('frontend_port', None) + self.backend_port = kwargs.get('backend_port', None) + + +class Lab(Resource): + """A lab. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar default_storage_account: The lab's default storage account. + :vartype default_storage_account: str + :ivar default_premium_storage_account: The lab's default premium storage + account. + :vartype default_premium_storage_account: str + :ivar artifacts_storage_account: The lab's artifact storage account. + :vartype artifacts_storage_account: str + :ivar premium_data_disk_storage_account: The lab's premium data disk + storage account. + :vartype premium_data_disk_storage_account: str + :ivar vault_name: The lab's Key vault. + :vartype vault_name: str + :param lab_storage_type: Type of storage used by the lab. It can be either + Premium or Standard. Default is Premium. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param mandatory_artifacts_resource_ids_linux: The ordered list of + artifact resource IDs that should be applied on all Linux VM creations by + default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_linux: list[str] + :param mandatory_artifacts_resource_ids_windows: The ordered list of + artifact resource IDs that should be applied on all Windows VM creations + by default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_windows: list[str] + :ivar created_date: The creation date of the lab. + :vartype created_date: datetime + :param premium_data_disks: The setting to enable usage of premium data + disks. + When its value is 'Enabled', creation of standard or premium data disks is + allowed. + When its value is 'Disabled', only creation of standard data disks is + allowed. Possible values include: 'Disabled', 'Enabled' + :type premium_data_disks: str or + ~azure.mgmt.devtestlabs.models.PremiumDataDisk + :param environment_permission: The access rights to be granted to the user + when provisioning an environment. Possible values include: 'Reader', + 'Contributor' + :type environment_permission: str or + ~azure.mgmt.devtestlabs.models.EnvironmentPermission + :param announcement: The properties of any lab announcement associated + with this lab + :type announcement: + ~azure.mgmt.devtestlabs.models.LabAnnouncementProperties + :param support: The properties of any lab support message associated with + this lab + :type support: ~azure.mgmt.devtestlabs.models.LabSupportProperties + :ivar vm_creation_resource_group: The resource group in which all new lab + virtual machines will be created. To let DevTest Labs manage resource + group creation, set this value to null. + :vartype vm_creation_resource_group: str + :ivar public_ip_id: The public IP address for the lab's load balancer. + :vartype public_ip_id: str + :ivar load_balancer_id: The load balancer used to for lab VMs that use + shared IP address. + :vartype load_balancer_id: str + :ivar network_security_group_id: The Network Security Group attached to + the lab VMs Network interfaces to restrict open ports. + :vartype network_security_group_id: str + :param extended_properties: Extended properties of the lab used for + experimental features + :type extended_properties: dict[str, str] + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'default_storage_account': {'readonly': True}, + 'default_premium_storage_account': {'readonly': True}, + 'artifacts_storage_account': {'readonly': True}, + 'premium_data_disk_storage_account': {'readonly': True}, + 'vault_name': {'readonly': True}, + 'created_date': {'readonly': True}, + 'vm_creation_resource_group': {'readonly': True}, + 'public_ip_id': {'readonly': True}, + 'load_balancer_id': {'readonly': True}, + 'network_security_group_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'default_storage_account': {'key': 'properties.defaultStorageAccount', 'type': 'str'}, + 'default_premium_storage_account': {'key': 'properties.defaultPremiumStorageAccount', 'type': 'str'}, + 'artifacts_storage_account': {'key': 'properties.artifactsStorageAccount', 'type': 'str'}, + 'premium_data_disk_storage_account': {'key': 'properties.premiumDataDiskStorageAccount', 'type': 'str'}, + 'vault_name': {'key': 'properties.vaultName', 'type': 'str'}, + 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, + 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, + 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, + 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, + 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementProperties'}, + 'support': {'key': 'properties.support', 'type': 'LabSupportProperties'}, + 'vm_creation_resource_group': {'key': 'properties.vmCreationResourceGroup', 'type': 'str'}, + 'public_ip_id': {'key': 'properties.publicIpId', 'type': 'str'}, + 'load_balancer_id': {'key': 'properties.loadBalancerId', 'type': 'str'}, + 'network_security_group_id': {'key': 'properties.networkSecurityGroupId', 'type': 'str'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Lab, self).__init__(**kwargs) + self.default_storage_account = None + self.default_premium_storage_account = None + self.artifacts_storage_account = None + self.premium_data_disk_storage_account = None + self.vault_name = None + self.lab_storage_type = kwargs.get('lab_storage_type', None) + self.mandatory_artifacts_resource_ids_linux = kwargs.get('mandatory_artifacts_resource_ids_linux', None) + self.mandatory_artifacts_resource_ids_windows = kwargs.get('mandatory_artifacts_resource_ids_windows', None) + self.created_date = None + self.premium_data_disks = kwargs.get('premium_data_disks', None) + self.environment_permission = kwargs.get('environment_permission', None) + self.announcement = kwargs.get('announcement', None) + self.support = kwargs.get('support', None) + self.vm_creation_resource_group = None + self.public_ip_id = None + self.load_balancer_id = None + self.network_security_group_id = None + self.extended_properties = kwargs.get('extended_properties', None) + self.provisioning_state = None + self.unique_identifier = None + + +class LabAnnouncementProperties(Model): + """Properties of a lab's announcement banner. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param title: The plain text title for the lab announcement + :type title: str + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + :param enabled: Is the lab announcement active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param expiration_date: The time at which the announcement expires (null + for never) + :type expiration_date: datetime + :param expired: Has this announcement expired? + :type expired: bool + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'expired': {'key': 'expired', 'type': 'bool'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabAnnouncementProperties, self).__init__(**kwargs) + self.title = kwargs.get('title', None) + self.markdown = kwargs.get('markdown', None) + self.enabled = kwargs.get('enabled', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.expired = kwargs.get('expired', None) + self.provisioning_state = None + self.unique_identifier = None + + +class LabAnnouncementPropertiesFragment(Model): + """Properties of a lab's announcement banner. + + :param title: The plain text title for the lab announcement + :type title: str + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + :param enabled: Is the lab announcement active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param expiration_date: The time at which the announcement expires (null + for never) + :type expiration_date: datetime + :param expired: Has this announcement expired? + :type expired: bool + """ + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'expired': {'key': 'expired', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(LabAnnouncementPropertiesFragment, self).__init__(**kwargs) + self.title = kwargs.get('title', None) + self.markdown = kwargs.get('markdown', None) + self.enabled = kwargs.get('enabled', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.expired = kwargs.get('expired', None) + + +class LabCost(Resource): + """A cost item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param target_cost: The target cost properties + :type target_cost: ~azure.mgmt.devtestlabs.models.TargetCostProperties + :ivar lab_cost_summary: The lab cost summary component of the cost data. + :vartype lab_cost_summary: + ~azure.mgmt.devtestlabs.models.LabCostSummaryProperties + :ivar lab_cost_details: The lab cost details component of the cost data. + :vartype lab_cost_details: + list[~azure.mgmt.devtestlabs.models.LabCostDetailsProperties] + :ivar resource_costs: The resource cost component of the cost data. + :vartype resource_costs: + list[~azure.mgmt.devtestlabs.models.LabResourceCostProperties] + :param currency_code: The currency code of the cost. + :type currency_code: str + :param start_date_time: The start time of the cost data. + :type start_date_time: datetime + :param end_date_time: The end time of the cost data. + :type end_date_time: datetime + :param created_date: The creation date of the cost. + :type created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'lab_cost_summary': {'readonly': True}, + 'lab_cost_details': {'readonly': True}, + 'resource_costs': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'target_cost': {'key': 'properties.targetCost', 'type': 'TargetCostProperties'}, + 'lab_cost_summary': {'key': 'properties.labCostSummary', 'type': 'LabCostSummaryProperties'}, + 'lab_cost_details': {'key': 'properties.labCostDetails', 'type': '[LabCostDetailsProperties]'}, + 'resource_costs': {'key': 'properties.resourceCosts', 'type': '[LabResourceCostProperties]'}, + 'currency_code': {'key': 'properties.currencyCode', 'type': 'str'}, + 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, + 'end_date_time': {'key': 'properties.endDateTime', 'type': 'iso-8601'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabCost, self).__init__(**kwargs) + self.target_cost = kwargs.get('target_cost', None) + self.lab_cost_summary = None + self.lab_cost_details = None + self.resource_costs = None + self.currency_code = kwargs.get('currency_code', None) + self.start_date_time = kwargs.get('start_date_time', None) + self.end_date_time = kwargs.get('end_date_time', None) + self.created_date = kwargs.get('created_date', None) + self.provisioning_state = None + self.unique_identifier = None + + +class LabCostDetailsProperties(Model): + """The properties of a lab cost item. + + :param date_property: The date of the cost item. + :type date_property: datetime + :param cost: The cost component of the cost item. + :type cost: float + :param cost_type: The type of the cost. Possible values include: + 'Unavailable', 'Reported', 'Projected' + :type cost_type: str or ~azure.mgmt.devtestlabs.models.CostType + """ + + _attribute_map = { + 'date_property': {'key': 'date', 'type': 'iso-8601'}, + 'cost': {'key': 'cost', 'type': 'float'}, + 'cost_type': {'key': 'costType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabCostDetailsProperties, self).__init__(**kwargs) + self.date_property = kwargs.get('date_property', None) + self.cost = kwargs.get('cost', None) + self.cost_type = kwargs.get('cost_type', None) + + +class LabCostSummaryProperties(Model): + """The properties of the cost summary. + + :param estimated_lab_cost: The cost component of the cost item. + :type estimated_lab_cost: float + """ + + _attribute_map = { + 'estimated_lab_cost': {'key': 'estimatedLabCost', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(LabCostSummaryProperties, self).__init__(**kwargs) + self.estimated_lab_cost = kwargs.get('estimated_lab_cost', None) + + +class LabFragment(UpdateResource): + """A lab. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_storage_type: Type of storage used by the lab. It can be either + Premium or Standard. Default is Premium. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param mandatory_artifacts_resource_ids_linux: The ordered list of + artifact resource IDs that should be applied on all Linux VM creations by + default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_linux: list[str] + :param mandatory_artifacts_resource_ids_windows: The ordered list of + artifact resource IDs that should be applied on all Windows VM creations + by default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_windows: list[str] + :param premium_data_disks: The setting to enable usage of premium data + disks. + When its value is 'Enabled', creation of standard or premium data disks is + allowed. + When its value is 'Disabled', only creation of standard data disks is + allowed. Possible values include: 'Disabled', 'Enabled' + :type premium_data_disks: str or + ~azure.mgmt.devtestlabs.models.PremiumDataDisk + :param environment_permission: The access rights to be granted to the user + when provisioning an environment. Possible values include: 'Reader', + 'Contributor' + :type environment_permission: str or + ~azure.mgmt.devtestlabs.models.EnvironmentPermission + :param announcement: The properties of any lab announcement associated + with this lab + :type announcement: + ~azure.mgmt.devtestlabs.models.LabAnnouncementPropertiesFragment + :param support: The properties of any lab support message associated with + this lab + :type support: ~azure.mgmt.devtestlabs.models.LabSupportPropertiesFragment + :param extended_properties: Extended properties of the lab used for + experimental features + :type extended_properties: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, + 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, + 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, + 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, + 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, + 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementPropertiesFragment'}, + 'support': {'key': 'properties.support', 'type': 'LabSupportPropertiesFragment'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(LabFragment, self).__init__(**kwargs) + self.lab_storage_type = kwargs.get('lab_storage_type', None) + self.mandatory_artifacts_resource_ids_linux = kwargs.get('mandatory_artifacts_resource_ids_linux', None) + self.mandatory_artifacts_resource_ids_windows = kwargs.get('mandatory_artifacts_resource_ids_windows', None) + self.premium_data_disks = kwargs.get('premium_data_disks', None) + self.environment_permission = kwargs.get('environment_permission', None) + self.announcement = kwargs.get('announcement', None) + self.support = kwargs.get('support', None) + self.extended_properties = kwargs.get('extended_properties', None) + + +class LabResourceCostProperties(Model): + """The properties of a resource cost item. + + :param resourcename: The name of the resource. + :type resourcename: str + :param resource_uid: The unique identifier of the resource. + :type resource_uid: str + :param resource_cost: The cost component of the resource cost item. + :type resource_cost: float + :param resource_type: The logical resource type (ex. virtualmachine, + storageaccount) + :type resource_type: str + :param resource_owner: The owner of the resource (ex. + janedoe@microsoft.com) + :type resource_owner: str + :param resource_pricing_tier: The category of the resource (ex. + Premium_LRS, Standard_DS1) + :type resource_pricing_tier: str + :param resource_status: The status of the resource (ex. Active) + :type resource_status: str + :param resource_id: The ID of the resource + :type resource_id: str + :param external_resource_id: The ID of the external resource + :type external_resource_id: str + """ + + _attribute_map = { + 'resourcename': {'key': 'resourcename', 'type': 'str'}, + 'resource_uid': {'key': 'resourceUId', 'type': 'str'}, + 'resource_cost': {'key': 'resourceCost', 'type': 'float'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_owner': {'key': 'resourceOwner', 'type': 'str'}, + 'resource_pricing_tier': {'key': 'resourcePricingTier', 'type': 'str'}, + 'resource_status': {'key': 'resourceStatus', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'external_resource_id': {'key': 'externalResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabResourceCostProperties, self).__init__(**kwargs) + self.resourcename = kwargs.get('resourcename', None) + self.resource_uid = kwargs.get('resource_uid', None) + self.resource_cost = kwargs.get('resource_cost', None) + self.resource_type = kwargs.get('resource_type', None) + self.resource_owner = kwargs.get('resource_owner', None) + self.resource_pricing_tier = kwargs.get('resource_pricing_tier', None) + self.resource_status = kwargs.get('resource_status', None) + self.resource_id = kwargs.get('resource_id', None) + self.external_resource_id = kwargs.get('external_resource_id', None) + + +class LabSupportProperties(Model): + """Properties of a lab's support banner. + + :param enabled: Is the lab support banner active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabSupportProperties, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.markdown = kwargs.get('markdown', None) + + +class LabSupportPropertiesFragment(Model): + """Properties of a lab's support banner. + + :param enabled: Is the lab support banner active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabSupportPropertiesFragment, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.markdown = kwargs.get('markdown', None) + + +class LabVhd(Model): + """Properties of a VHD in the lab. + + :param id: The URI to the VHD. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabVhd, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class LabVirtualMachine(Resource): + """A virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :ivar compute_vm: The compute virtual machine properties. + :vartype compute_vm: ~azure.mgmt.devtestlabs.models.ComputeVmProperties + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties + :ivar applicable_schedule: The applicable schedule for the virtual + machine. + :vartype applicable_schedule: + ~azure.mgmt.devtestlabs.models.ApplicableSchedule + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskProperties] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'compute_vm': {'readonly': True}, + 'applicable_schedule': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'compute_vm': {'key': 'properties.computeVm', 'type': 'ComputeVmProperties'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, + 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabVirtualMachine, self).__init__(**kwargs) + self.notes = kwargs.get('notes', None) + self.owner_object_id = kwargs.get('owner_object_id', None) + self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) + self.created_by_user_id = kwargs.get('created_by_user_id', None) + self.created_by_user = kwargs.get('created_by_user', None) + self.created_date = kwargs.get('created_date', None) + self.compute_id = kwargs.get('compute_id', None) + self.custom_image_id = kwargs.get('custom_image_id', None) + self.os_type = kwargs.get('os_type', None) + self.size = kwargs.get('size', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.ssh_key = kwargs.get('ssh_key', None) + self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) + self.fqdn = kwargs.get('fqdn', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) + self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) + self.artifacts = kwargs.get('artifacts', None) + self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) + self.gallery_image_reference = kwargs.get('gallery_image_reference', None) + self.plan_id = kwargs.get('plan_id', None) + self.compute_vm = None + self.network_interface = kwargs.get('network_interface', None) + self.applicable_schedule = None + self.expiration_date = kwargs.get('expiration_date', None) + self.allow_claim = kwargs.get('allow_claim', None) + self.storage_type = kwargs.get('storage_type', None) + self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) + self.environment_id = kwargs.get('environment_id', None) + self.data_disk_parameters = kwargs.get('data_disk_parameters', None) + self.schedule_parameters = kwargs.get('schedule_parameters', None) + self.last_known_power_state = kwargs.get('last_known_power_state', None) + self.provisioning_state = None + self.unique_identifier = None + + +class LabVirtualMachineCreationParameter(Model): + """Properties for creating a virtual machine. + + :param bulk_creation_parameters: The number of virtual machine instances + to create. + :type bulk_creation_parameters: + ~azure.mgmt.devtestlabs.models.BulkCreationParameters + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskProperties] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParameters'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(LabVirtualMachineCreationParameter, self).__init__(**kwargs) + self.bulk_creation_parameters = kwargs.get('bulk_creation_parameters', None) + self.notes = kwargs.get('notes', None) + self.owner_object_id = kwargs.get('owner_object_id', None) + self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) + self.created_by_user_id = kwargs.get('created_by_user_id', None) + self.created_by_user = kwargs.get('created_by_user', None) + self.created_date = kwargs.get('created_date', None) + self.compute_id = kwargs.get('compute_id', None) + self.custom_image_id = kwargs.get('custom_image_id', None) + self.os_type = kwargs.get('os_type', None) + self.size = kwargs.get('size', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.ssh_key = kwargs.get('ssh_key', None) + self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) + self.fqdn = kwargs.get('fqdn', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) + self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) + self.artifacts = kwargs.get('artifacts', None) + self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) + self.gallery_image_reference = kwargs.get('gallery_image_reference', None) + self.plan_id = kwargs.get('plan_id', None) + self.network_interface = kwargs.get('network_interface', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.allow_claim = kwargs.get('allow_claim', None) + self.storage_type = kwargs.get('storage_type', None) + self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) + self.environment_id = kwargs.get('environment_id', None) + self.data_disk_parameters = kwargs.get('data_disk_parameters', None) + self.schedule_parameters = kwargs.get('schedule_parameters', None) + self.last_known_power_state = kwargs.get('last_known_power_state', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class LabVirtualMachineCreationParameterFragment(Model): + """Properties for creating a virtual machine. + + :param bulk_creation_parameters: The number of virtual machine instances + to create. + :type bulk_creation_parameters: + ~azure.mgmt.devtestlabs.models.BulkCreationParametersFragment + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParametersFragment'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(LabVirtualMachineCreationParameterFragment, self).__init__(**kwargs) + self.bulk_creation_parameters = kwargs.get('bulk_creation_parameters', None) + self.notes = kwargs.get('notes', None) + self.owner_object_id = kwargs.get('owner_object_id', None) + self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) + self.created_by_user_id = kwargs.get('created_by_user_id', None) + self.created_by_user = kwargs.get('created_by_user', None) + self.created_date = kwargs.get('created_date', None) + self.compute_id = kwargs.get('compute_id', None) + self.custom_image_id = kwargs.get('custom_image_id', None) + self.os_type = kwargs.get('os_type', None) + self.size = kwargs.get('size', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.ssh_key = kwargs.get('ssh_key', None) + self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) + self.fqdn = kwargs.get('fqdn', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) + self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) + self.artifacts = kwargs.get('artifacts', None) + self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) + self.gallery_image_reference = kwargs.get('gallery_image_reference', None) + self.plan_id = kwargs.get('plan_id', None) + self.network_interface = kwargs.get('network_interface', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.allow_claim = kwargs.get('allow_claim', None) + self.storage_type = kwargs.get('storage_type', None) + self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) + self.environment_id = kwargs.get('environment_id', None) + self.data_disk_parameters = kwargs.get('data_disk_parameters', None) + self.schedule_parameters = kwargs.get('schedule_parameters', None) + self.last_known_power_state = kwargs.get('last_known_power_state', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class LabVirtualMachineFragment(UpdateResource): + """A virtual machine. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabVirtualMachineFragment, self).__init__(**kwargs) + self.notes = kwargs.get('notes', None) + self.owner_object_id = kwargs.get('owner_object_id', None) + self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) + self.created_by_user_id = kwargs.get('created_by_user_id', None) + self.created_by_user = kwargs.get('created_by_user', None) + self.created_date = kwargs.get('created_date', None) + self.compute_id = kwargs.get('compute_id', None) + self.custom_image_id = kwargs.get('custom_image_id', None) + self.os_type = kwargs.get('os_type', None) + self.size = kwargs.get('size', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.ssh_key = kwargs.get('ssh_key', None) + self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) + self.fqdn = kwargs.get('fqdn', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) + self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) + self.artifacts = kwargs.get('artifacts', None) + self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) + self.gallery_image_reference = kwargs.get('gallery_image_reference', None) + self.plan_id = kwargs.get('plan_id', None) + self.network_interface = kwargs.get('network_interface', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.allow_claim = kwargs.get('allow_claim', None) + self.storage_type = kwargs.get('storage_type', None) + self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) + self.environment_id = kwargs.get('environment_id', None) + self.data_disk_parameters = kwargs.get('data_disk_parameters', None) + self.schedule_parameters = kwargs.get('schedule_parameters', None) + self.last_known_power_state = kwargs.get('last_known_power_state', None) + + +class LinuxOsInfo(Model): + """Information about a Linux OS. + + :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, + DeprovisionRequested, DeprovisionApplied). Possible values include: + 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' + :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState + """ + + _attribute_map = { + 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LinuxOsInfo, self).__init__(**kwargs) + self.linux_os_state = kwargs.get('linux_os_state', None) + + +class LinuxOsInfoFragment(Model): + """Information about a Linux OS. + + :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, + DeprovisionRequested, DeprovisionApplied). Possible values include: + 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' + :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState + """ + + _attribute_map = { + 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LinuxOsInfoFragment, self).__init__(**kwargs) + self.linux_os_state = kwargs.get('linux_os_state', None) + + +class NetworkInterfaceProperties(Model): + """Properties of a network interface. + + :param virtual_network_id: The resource ID of the virtual network. + :type virtual_network_id: str + :param subnet_id: The resource ID of the sub net. + :type subnet_id: str + :param public_ip_address_id: The resource ID of the public IP address. + :type public_ip_address_id: str + :param public_ip_address: The public IP address. + :type public_ip_address: str + :param private_ip_address: The private IP address. + :type private_ip_address: str + :param dns_name: The DNS name. + :type dns_name: str + :param rdp_authority: The RdpAuthority property is a server DNS host name + or IP address followed by the service port number for RDP (Remote Desktop + Protocol). + :type rdp_authority: str + :param ssh_authority: The SshAuthority property is a server DNS host name + or IP address followed by the service port number for SSH. + :type ssh_authority: str + :param shared_public_ip_address_configuration: The configuration for + sharing a public IP address across multiple virtual machines. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfiguration + """ + + _attribute_map = { + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, + 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfiguration'}, + } + + def __init__(self, **kwargs): + super(NetworkInterfaceProperties, self).__init__(**kwargs) + self.virtual_network_id = kwargs.get('virtual_network_id', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.public_ip_address_id = kwargs.get('public_ip_address_id', None) + self.public_ip_address = kwargs.get('public_ip_address', None) + self.private_ip_address = kwargs.get('private_ip_address', None) + self.dns_name = kwargs.get('dns_name', None) + self.rdp_authority = kwargs.get('rdp_authority', None) + self.ssh_authority = kwargs.get('ssh_authority', None) + self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) + + +class NetworkInterfacePropertiesFragment(Model): + """Properties of a network interface. + + :param virtual_network_id: The resource ID of the virtual network. + :type virtual_network_id: str + :param subnet_id: The resource ID of the sub net. + :type subnet_id: str + :param public_ip_address_id: The resource ID of the public IP address. + :type public_ip_address_id: str + :param public_ip_address: The public IP address. + :type public_ip_address: str + :param private_ip_address: The private IP address. + :type private_ip_address: str + :param dns_name: The DNS name. + :type dns_name: str + :param rdp_authority: The RdpAuthority property is a server DNS host name + or IP address followed by the service port number for RDP (Remote Desktop + Protocol). + :type rdp_authority: str + :param ssh_authority: The SshAuthority property is a server DNS host name + or IP address followed by the service port number for SSH. + :type ssh_authority: str + :param shared_public_ip_address_configuration: The configuration for + sharing a public IP address across multiple virtual machines. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfigurationFragment + """ + + _attribute_map = { + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, + 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfigurationFragment'}, + } + + def __init__(self, **kwargs): + super(NetworkInterfacePropertiesFragment, self).__init__(**kwargs) + self.virtual_network_id = kwargs.get('virtual_network_id', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.public_ip_address_id = kwargs.get('public_ip_address_id', None) + self.public_ip_address = kwargs.get('public_ip_address', None) + self.private_ip_address = kwargs.get('private_ip_address', None) + self.dns_name = kwargs.get('dns_name', None) + self.rdp_authority = kwargs.get('rdp_authority', None) + self.ssh_authority = kwargs.get('ssh_authority', None) + self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) + + +class NotificationChannel(Resource): + """A notification. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param web_hook_url: The webhook URL to send notifications to. + :type web_hook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + :param description: Description of notification. + :type description: str + :param events: The list of event for which this notification is enabled. + :type events: list[~azure.mgmt.devtestlabs.models.Event] + :ivar created_date: The creation date of the notification channel. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'events': {'key': 'properties.events', 'type': '[Event]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NotificationChannel, self).__init__(**kwargs) + self.web_hook_url = kwargs.get('web_hook_url', None) + self.email_recipient = kwargs.get('email_recipient', None) + self.notification_locale = kwargs.get('notification_locale', None) + self.description = kwargs.get('description', None) + self.events = kwargs.get('events', None) + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class NotificationChannelFragment(UpdateResource): + """A notification. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param web_hook_url: The webhook URL to send notifications to. + :type web_hook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + :param description: Description of notification. + :type description: str + :param events: The list of event for which this notification is enabled. + :type events: list[~azure.mgmt.devtestlabs.models.EventFragment] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'events': {'key': 'properties.events', 'type': '[EventFragment]'}, + } + + def __init__(self, **kwargs): + super(NotificationChannelFragment, self).__init__(**kwargs) + self.web_hook_url = kwargs.get('web_hook_url', None) + self.email_recipient = kwargs.get('email_recipient', None) + self.notification_locale = kwargs.get('notification_locale', None) + self.description = kwargs.get('description', None) + self.events = kwargs.get('events', None) + + +class NotificationSettings(Model): + """Notification settings for a schedule. + + :param status: If notifications are enabled for this schedule (i.e. + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param time_in_minutes: Time in minutes before event at which notification + will be sent. + :type time_in_minutes: int + :param webhook_url: The webhook URL to which the notification will be + sent. + :type webhook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, + 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NotificationSettings, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.time_in_minutes = kwargs.get('time_in_minutes', None) + self.webhook_url = kwargs.get('webhook_url', None) + self.email_recipient = kwargs.get('email_recipient', None) + self.notification_locale = kwargs.get('notification_locale', None) + + +class NotificationSettingsFragment(Model): + """Notification settings for a schedule. + + :param status: If notifications are enabled for this schedule (i.e. + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param time_in_minutes: Time in minutes before event at which notification + will be sent. + :type time_in_minutes: int + :param webhook_url: The webhook URL to which the notification will be + sent. + :type webhook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, + 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NotificationSettingsFragment, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.time_in_minutes = kwargs.get('time_in_minutes', None) + self.webhook_url = kwargs.get('webhook_url', None) + self.email_recipient = kwargs.get('email_recipient', None) + self.notification_locale = kwargs.get('notification_locale', None) + + +class NotifyParameters(Model): + """Properties for generating a Notification. + + :param event_name: The type of event (i.e. AutoShutdown, Cost). Possible + values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + :param json_payload: Properties for the notification in json format. + :type json_payload: str + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + 'json_payload': {'key': 'jsonPayload', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NotifyParameters, self).__init__(**kwargs) + self.event_name = kwargs.get('event_name', None) + self.json_payload = kwargs.get('json_payload', None) + + +class OperationError(Model): + """Error details for the operation in case of a failure. + + :param code: The error code of the operation error. + :type code: str + :param message: The error message of the operation error. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class OperationMetadata(Model): + """The REST API operation supported by DevTestLab ResourceProvider. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that describes the operations + :type display: ~azure.mgmt.devtestlabs.models.OperationMetadataDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationMetadataDisplay'}, + } + + def __init__(self, **kwargs): + super(OperationMetadata, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + + +class OperationMetadataDisplay(Model): + """The object that describes the operations. + + :param provider: Friendly name of the resource provider + :type provider: str + :param resource: Resource type on which the operation is performed. + :type resource: str + :param operation: Operation type: read, write, delete, listKeys/action, + etc. + :type operation: str + :param description: Friendly name of the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationMetadataDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class OperationResult(Model): + """An Operation Result. + + :param status: The operation status. + :type status: str + :param status_code: The status code for the operation. Possible values + include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', + 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', + 'PartialContent', 'MultipleChoices', 'MovedPermanently', 'Redirect', + 'SeeOther', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', + 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', + 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', + 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', + 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', + 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', + 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', + 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', + 'HttpVersionNotSupported' + :type status_code: str or ~azure.mgmt.devtestlabs.models.HttpStatusCode + :param error: Error details for the operation in case of a failure. + :type error: ~azure.mgmt.devtestlabs.models.OperationError + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'OperationError'}, + } + + def __init__(self, **kwargs): + super(OperationResult, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.status_code = kwargs.get('status_code', None) + self.error = kwargs.get('error', None) + + +class ParameterInfo(Model): + """Information about an artifact's parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ParameterInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class ParametersValueFileInfo(Model): + """A file containing a set of parameter values for an ARM template. + + :param file_name: File name. + :type file_name: str + :param parameters_value_info: Contents of the file. + :type parameters_value_info: object + """ + + _attribute_map = { + 'file_name': {'key': 'fileName', 'type': 'str'}, + 'parameters_value_info': {'key': 'parametersValueInfo', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ParametersValueFileInfo, self).__init__(**kwargs) + self.file_name = kwargs.get('file_name', None) + self.parameters_value_info = kwargs.get('parameters_value_info', None) + + +class PercentageCostThresholdProperties(Model): + """Properties of a percentage cost threshold. + + :param threshold_value: The cost threshold value. + :type threshold_value: float + """ + + _attribute_map = { + 'threshold_value': {'key': 'thresholdValue', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(PercentageCostThresholdProperties, self).__init__(**kwargs) + self.threshold_value = kwargs.get('threshold_value', None) + + +class Policy(Resource): + """A Policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the policy. + :type description: str + :param status: The status of the policy. Possible values include: + 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus + :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, + MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', + 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', + 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', + 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' + :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName + :param fact_data: The fact data of the policy. + :type fact_data: str + :param threshold: The threshold of the policy (i.e. a number for + MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). + :type threshold: str + :param evaluator_type: The evaluator type of the policy (i.e. + AllowedValuesPolicy, MaxValuePolicy). Possible values include: + 'AllowedValuesPolicy', 'MaxValuePolicy' + :type evaluator_type: str or + ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType + :ivar created_date: The creation date of the policy. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'fact_name': {'key': 'properties.factName', 'type': 'str'}, + 'fact_data': {'key': 'properties.factData', 'type': 'str'}, + 'threshold': {'key': 'properties.threshold', 'type': 'str'}, + 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Policy, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.status = kwargs.get('status', None) + self.fact_name = kwargs.get('fact_name', None) + self.fact_data = kwargs.get('fact_data', None) + self.threshold = kwargs.get('threshold', None) + self.evaluator_type = kwargs.get('evaluator_type', None) + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class PolicyFragment(UpdateResource): + """A Policy. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the policy. + :type description: str + :param status: The status of the policy. Possible values include: + 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus + :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, + MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', + 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', + 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', + 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' + :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName + :param fact_data: The fact data of the policy. + :type fact_data: str + :param threshold: The threshold of the policy (i.e. a number for + MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). + :type threshold: str + :param evaluator_type: The evaluator type of the policy (i.e. + AllowedValuesPolicy, MaxValuePolicy). Possible values include: + 'AllowedValuesPolicy', 'MaxValuePolicy' + :type evaluator_type: str or + ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'fact_name': {'key': 'properties.factName', 'type': 'str'}, + 'fact_data': {'key': 'properties.factData', 'type': 'str'}, + 'threshold': {'key': 'properties.threshold', 'type': 'str'}, + 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PolicyFragment, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.status = kwargs.get('status', None) + self.fact_name = kwargs.get('fact_name', None) + self.fact_data = kwargs.get('fact_data', None) + self.threshold = kwargs.get('threshold', None) + self.evaluator_type = kwargs.get('evaluator_type', None) + + +class PolicySetResult(Model): + """Result of a policy set evaluation. + + :param has_error: A value indicating whether this policy set evaluation + has discovered violations. + :type has_error: bool + :param policy_violations: The list of policy violations. + :type policy_violations: + list[~azure.mgmt.devtestlabs.models.PolicyViolation] + """ + + _attribute_map = { + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'policy_violations': {'key': 'policyViolations', 'type': '[PolicyViolation]'}, + } + + def __init__(self, **kwargs): + super(PolicySetResult, self).__init__(**kwargs) + self.has_error = kwargs.get('has_error', None) + self.policy_violations = kwargs.get('policy_violations', None) + + +class PolicyViolation(Model): + """Policy violation. + + :param code: The code of the policy violation. + :type code: str + :param message: The message of the policy violation. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PolicyViolation, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class Port(Model): + """Properties of a network port. + + :param transport_protocol: Protocol type of the port. Possible values + include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param backend_port: Backend port of the target virtual machine. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(Port, self).__init__(**kwargs) + self.transport_protocol = kwargs.get('transport_protocol', None) + self.backend_port = kwargs.get('backend_port', None) + + +class PortFragment(Model): + """Properties of a network port. + + :param transport_protocol: Protocol type of the port. Possible values + include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param backend_port: Backend port of the target virtual machine. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(PortFragment, self).__init__(**kwargs) + self.transport_protocol = kwargs.get('transport_protocol', None) + self.backend_port = kwargs.get('backend_port', None) + + +class RdpConnection(Model): + """Represents a .rdp file. + + :param contents: The contents of the .rdp file + :type contents: str + """ + + _attribute_map = { + 'contents': {'key': 'contents', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RdpConnection, self).__init__(**kwargs) + self.contents = kwargs.get('contents', None) + + +class ResizeLabVirtualMachineProperties(Model): + """Request body for resizing a virtual machine. + + :param size: Specifies the size of the virtual machine. + :type size: str + """ + + _attribute_map = { + 'size': {'key': 'size', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResizeLabVirtualMachineProperties, self).__init__(**kwargs) + self.size = kwargs.get('size', None) + + +class RetargetScheduleProperties(Model): + """Properties for retargeting a virtual machine schedule. + + :param current_resource_id: The resource Id of the virtual machine on + which the schedule operates + :type current_resource_id: str + :param target_resource_id: The resource Id of the virtual machine that the + schedule should be retargeted to + :type target_resource_id: str + """ + + _attribute_map = { + 'current_resource_id': {'key': 'currentResourceId', 'type': 'str'}, + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RetargetScheduleProperties, self).__init__(**kwargs) + self.current_resource_id = kwargs.get('current_resource_id', None) + self.target_resource_id = kwargs.get('target_resource_id', None) + + +class Schedule(Resource): + """A schedule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettings + :ivar created_date: The creation date of the schedule. + :vartype created_date: datetime + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Schedule, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.task_type = kwargs.get('task_type', None) + self.weekly_recurrence = kwargs.get('weekly_recurrence', None) + self.daily_recurrence = kwargs.get('daily_recurrence', None) + self.hourly_recurrence = kwargs.get('hourly_recurrence', None) + self.time_zone_id = kwargs.get('time_zone_id', None) + self.notification_settings = kwargs.get('notification_settings', None) + self.created_date = None + self.target_resource_id = kwargs.get('target_resource_id', None) + self.provisioning_state = None + self.unique_identifier = None + + +class ScheduleCreationParameter(Model): + """Properties for creating a schedule. + + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettings + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ScheduleCreationParameter, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.task_type = kwargs.get('task_type', None) + self.weekly_recurrence = kwargs.get('weekly_recurrence', None) + self.daily_recurrence = kwargs.get('daily_recurrence', None) + self.hourly_recurrence = kwargs.get('hourly_recurrence', None) + self.time_zone_id = kwargs.get('time_zone_id', None) + self.notification_settings = kwargs.get('notification_settings', None) + self.target_resource_id = kwargs.get('target_resource_id', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ScheduleCreationParameterFragment(Model): + """Properties for creating a schedule. + + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: + ~azure.mgmt.devtestlabs.models.WeekDetailsFragment + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: + ~azure.mgmt.devtestlabs.models.HourDetailsFragment + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ScheduleCreationParameterFragment, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.task_type = kwargs.get('task_type', None) + self.weekly_recurrence = kwargs.get('weekly_recurrence', None) + self.daily_recurrence = kwargs.get('daily_recurrence', None) + self.hourly_recurrence = kwargs.get('hourly_recurrence', None) + self.time_zone_id = kwargs.get('time_zone_id', None) + self.notification_settings = kwargs.get('notification_settings', None) + self.target_resource_id = kwargs.get('target_resource_id', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ScheduleFragment(UpdateResource): + """A schedule. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: + ~azure.mgmt.devtestlabs.models.WeekDetailsFragment + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: + ~azure.mgmt.devtestlabs.models.HourDetailsFragment + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ScheduleFragment, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.task_type = kwargs.get('task_type', None) + self.weekly_recurrence = kwargs.get('weekly_recurrence', None) + self.daily_recurrence = kwargs.get('daily_recurrence', None) + self.hourly_recurrence = kwargs.get('hourly_recurrence', None) + self.time_zone_id = kwargs.get('time_zone_id', None) + self.notification_settings = kwargs.get('notification_settings', None) + self.target_resource_id = kwargs.get('target_resource_id', None) + + +class Secret(Resource): + """A secret. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param value: The value of the secret for secret creation. + :type value: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Secret, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.provisioning_state = None + self.unique_identifier = None + + +class SecretFragment(UpdateResource): + """A secret. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param value: The value of the secret for secret creation. + :type value: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretFragment, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class ServiceFabric(Resource): + """A Service Fabric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param external_service_fabric_id: The backing service fabric resource's + id + :type external_service_fabric_id: str + :param environment_id: The resource id of the environment under which the + service fabric resource is present + :type environment_id: str + :ivar applicable_schedule: The applicable schedule for the virtual + machine. + :vartype applicable_schedule: + ~azure.mgmt.devtestlabs.models.ApplicableSchedule + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'applicable_schedule': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceFabric, self).__init__(**kwargs) + self.external_service_fabric_id = kwargs.get('external_service_fabric_id', None) + self.environment_id = kwargs.get('environment_id', None) + self.applicable_schedule = None + self.provisioning_state = None + self.unique_identifier = None + + +class ServiceFabricFragment(UpdateResource): + """A Service Fabric. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param external_service_fabric_id: The backing service fabric resource's + id + :type external_service_fabric_id: str + :param environment_id: The resource id of the environment under which the + service fabric resource is present + :type environment_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceFabricFragment, self).__init__(**kwargs) + self.external_service_fabric_id = kwargs.get('external_service_fabric_id', None) + self.environment_id = kwargs.get('environment_id', None) + + +class ServiceRunner(Resource): + """A container for a managed identity to execute DevTest lab services. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.devtestlabs.models.IdentityProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, + } + + def __init__(self, **kwargs): + super(ServiceRunner, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + + +class SharedPublicIpAddressConfiguration(Model): + """Properties of a virtual machine that determine how it is connected to a + load balancer. + + :param inbound_nat_rules: The incoming NAT rules + :type inbound_nat_rules: + list[~azure.mgmt.devtestlabs.models.InboundNatRule] + """ + + _attribute_map = { + 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRule]'}, + } + + def __init__(self, **kwargs): + super(SharedPublicIpAddressConfiguration, self).__init__(**kwargs) + self.inbound_nat_rules = kwargs.get('inbound_nat_rules', None) + + +class SharedPublicIpAddressConfigurationFragment(Model): + """Properties of a virtual machine that determine how it is connected to a + load balancer. + + :param inbound_nat_rules: The incoming NAT rules + :type inbound_nat_rules: + list[~azure.mgmt.devtestlabs.models.InboundNatRuleFragment] + """ + + _attribute_map = { + 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRuleFragment]'}, + } + + def __init__(self, **kwargs): + super(SharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) + self.inbound_nat_rules = kwargs.get('inbound_nat_rules', None) + + +class ShutdownNotificationContent(Model): + """The contents of a shutdown notification. Webhooks can use this type to + deserialize the request body when they get notified of an imminent + shutdown. + + :param skip_url: The URL to skip auto-shutdown. + :type skip_url: str + :param delay_url60: The URL to delay shutdown by 60 minutes. + :type delay_url60: str + :param delay_url120: The URL to delay shutdown by 2 hours. + :type delay_url120: str + :param vm_name: The virtual machine to be shut down. + :type vm_name: str + :param guid: The GUID for the virtual machine to be shut down. + :type guid: str + :param owner: The owner of the virtual machine. + :type owner: str + :param vm_url: The URL of the virtual machine. + :type vm_url: str + :param minutes_until_shutdown: Minutes remaining until shutdown + :type minutes_until_shutdown: str + :param event_type: The event for which a notification will be sent. + :type event_type: str + :param text: The text for the notification. + :type text: str + :param subscription_id: The subscription ID for the schedule. + :type subscription_id: str + :param resource_group_name: The resource group name for the schedule. + :type resource_group_name: str + :param lab_name: The lab for the schedule. + :type lab_name: str + """ + + _attribute_map = { + 'skip_url': {'key': 'skipUrl', 'type': 'str'}, + 'delay_url60': {'key': 'delayUrl60', 'type': 'str'}, + 'delay_url120': {'key': 'delayUrl120', 'type': 'str'}, + 'vm_name': {'key': 'vmName', 'type': 'str'}, + 'guid': {'key': 'guid', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'str'}, + 'vm_url': {'key': 'vmUrl', 'type': 'str'}, + 'minutes_until_shutdown': {'key': 'minutesUntilShutdown', 'type': 'str'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'lab_name': {'key': 'labName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ShutdownNotificationContent, self).__init__(**kwargs) + self.skip_url = kwargs.get('skip_url', None) + self.delay_url60 = kwargs.get('delay_url60', None) + self.delay_url120 = kwargs.get('delay_url120', None) + self.vm_name = kwargs.get('vm_name', None) + self.guid = kwargs.get('guid', None) + self.owner = kwargs.get('owner', None) + self.vm_url = kwargs.get('vm_url', None) + self.minutes_until_shutdown = kwargs.get('minutes_until_shutdown', None) + self.event_type = kwargs.get('event_type', None) + self.text = kwargs.get('text', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group_name = kwargs.get('resource_group_name', None) + self.lab_name = kwargs.get('lab_name', None) + + +class Subnet(Model): + """Subnet information. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name of the subnet as seen in the lab. + :type lab_subnet_name: str + :param allow_public_ip: The permission policy of the subnet for allowing + public IP addresses (i.e. Allow, Deny)). Possible values include: + 'Default', 'Deny', 'Allow' + :type allow_public_ip: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Subnet, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.allow_public_ip = kwargs.get('allow_public_ip', None) + + +class SubnetFragment(Model): + """Subnet information. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name of the subnet as seen in the lab. + :type lab_subnet_name: str + :param allow_public_ip: The permission policy of the subnet for allowing + public IP addresses (i.e. Allow, Deny)). Possible values include: + 'Default', 'Deny', 'Allow' + :type allow_public_ip: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubnetFragment, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.allow_public_ip = kwargs.get('allow_public_ip', None) + + +class SubnetOverride(Model): + """Property overrides on a subnet of a virtual network. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name given to the subnet within the lab. + :type lab_subnet_name: str + :param use_in_vm_creation_permission: Indicates whether this subnet can be + used during virtual machine creation (i.e. Allow, Deny). Possible values + include: 'Default', 'Deny', 'Allow' + :type use_in_vm_creation_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param use_public_ip_address_permission: Indicates whether public IP + addresses can be assigned to virtual machines on this subnet (i.e. Allow, + Deny). Possible values include: 'Default', 'Deny', 'Allow' + :type use_public_ip_address_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param shared_public_ip_address_configuration: Properties that virtual + machines on this subnet will share. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfiguration + :param virtual_network_pool_name: The virtual network pool associated with + this subnet. + :type virtual_network_pool_name: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, + 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfiguration'}, + 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubnetOverride, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.use_in_vm_creation_permission = kwargs.get('use_in_vm_creation_permission', None) + self.use_public_ip_address_permission = kwargs.get('use_public_ip_address_permission', None) + self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) + self.virtual_network_pool_name = kwargs.get('virtual_network_pool_name', None) + + +class SubnetOverrideFragment(Model): + """Property overrides on a subnet of a virtual network. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name given to the subnet within the lab. + :type lab_subnet_name: str + :param use_in_vm_creation_permission: Indicates whether this subnet can be + used during virtual machine creation (i.e. Allow, Deny). Possible values + include: 'Default', 'Deny', 'Allow' + :type use_in_vm_creation_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param use_public_ip_address_permission: Indicates whether public IP + addresses can be assigned to virtual machines on this subnet (i.e. Allow, + Deny). Possible values include: 'Default', 'Deny', 'Allow' + :type use_public_ip_address_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param shared_public_ip_address_configuration: Properties that virtual + machines on this subnet will share. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfigurationFragment + :param virtual_network_pool_name: The virtual network pool associated with + this subnet. + :type virtual_network_pool_name: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, + 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfigurationFragment'}, + 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubnetOverrideFragment, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.use_in_vm_creation_permission = kwargs.get('use_in_vm_creation_permission', None) + self.use_public_ip_address_permission = kwargs.get('use_public_ip_address_permission', None) + self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) + self.virtual_network_pool_name = kwargs.get('virtual_network_pool_name', None) + + +class SubnetSharedPublicIpAddressConfiguration(Model): + """Configuration for public IP address sharing. + + :param allowed_ports: Backend ports that virtual machines on this subnet + are allowed to expose + :type allowed_ports: list[~azure.mgmt.devtestlabs.models.Port] + """ + + _attribute_map = { + 'allowed_ports': {'key': 'allowedPorts', 'type': '[Port]'}, + } + + def __init__(self, **kwargs): + super(SubnetSharedPublicIpAddressConfiguration, self).__init__(**kwargs) + self.allowed_ports = kwargs.get('allowed_ports', None) + + +class SubnetSharedPublicIpAddressConfigurationFragment(Model): + """Configuration for public IP address sharing. + + :param allowed_ports: Backend ports that virtual machines on this subnet + are allowed to expose + :type allowed_ports: list[~azure.mgmt.devtestlabs.models.PortFragment] + """ + + _attribute_map = { + 'allowed_ports': {'key': 'allowedPorts', 'type': '[PortFragment]'}, + } + + def __init__(self, **kwargs): + super(SubnetSharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) + self.allowed_ports = kwargs.get('allowed_ports', None) + + +class TargetCostProperties(Model): + """Properties of a cost target. + + :param status: Target cost status. Possible values include: 'Enabled', + 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.TargetCostStatus + :param target: Lab target cost + :type target: int + :param cost_thresholds: Cost thresholds. + :type cost_thresholds: + list[~azure.mgmt.devtestlabs.models.CostThresholdProperties] + :param cycle_start_date_time: Reporting cycle start date. + :type cycle_start_date_time: datetime + :param cycle_end_date_time: Reporting cycle end date. + :type cycle_end_date_time: datetime + :param cycle_type: Reporting cycle type. Possible values include: + 'CalendarMonth', 'Custom' + :type cycle_type: str or ~azure.mgmt.devtestlabs.models.ReportingCycleType + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'int'}, + 'cost_thresholds': {'key': 'costThresholds', 'type': '[CostThresholdProperties]'}, + 'cycle_start_date_time': {'key': 'cycleStartDateTime', 'type': 'iso-8601'}, + 'cycle_end_date_time': {'key': 'cycleEndDateTime', 'type': 'iso-8601'}, + 'cycle_type': {'key': 'cycleType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TargetCostProperties, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.target = kwargs.get('target', None) + self.cost_thresholds = kwargs.get('cost_thresholds', None) + self.cycle_start_date_time = kwargs.get('cycle_start_date_time', None) + self.cycle_end_date_time = kwargs.get('cycle_end_date_time', None) + self.cycle_type = kwargs.get('cycle_type', None) + + +class User(Resource): + """Profile of a lab user. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the user. + :type identity: ~azure.mgmt.devtestlabs.models.UserIdentity + :param secret_store: The secret store of the user. + :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStore + :ivar created_date: The creation date of the user profile. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'properties.identity', 'type': 'UserIdentity'}, + 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStore'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(User, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.secret_store = kwargs.get('secret_store', None) + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class UserFragment(UpdateResource): + """Profile of a lab user. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the user. + :type identity: ~azure.mgmt.devtestlabs.models.UserIdentityFragment + :param secret_store: The secret store of the user. + :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStoreFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'properties.identity', 'type': 'UserIdentityFragment'}, + 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStoreFragment'}, + } + + def __init__(self, **kwargs): + super(UserFragment, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.secret_store = kwargs.get('secret_store', None) + + +class UserIdentity(Model): + """Identity attributes of a lab user. + + :param principal_name: Set to the principal name / UPN of the client JWT + making the request. + :type principal_name: str + :param principal_id: Set to the principal Id of the client JWT making the + request. Service principal will not have the principal Id. + :type principal_id: str + :param tenant_id: Set to the tenant ID of the client JWT making the + request. + :type tenant_id: str + :param object_id: Set to the object Id of the client JWT making the + request. Not all users have object Id. For CSP (reseller) scenarios for + example, object Id is not available. + :type object_id: str + :param app_id: Set to the app Id of the client JWT making the request. + :type app_id: str + """ + + _attribute_map = { + 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'app_id': {'key': 'appId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserIdentity, self).__init__(**kwargs) + self.principal_name = kwargs.get('principal_name', None) + self.principal_id = kwargs.get('principal_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.object_id = kwargs.get('object_id', None) + self.app_id = kwargs.get('app_id', None) + + +class UserIdentityFragment(Model): + """Identity attributes of a lab user. + + :param principal_name: Set to the principal name / UPN of the client JWT + making the request. + :type principal_name: str + :param principal_id: Set to the principal Id of the client JWT making the + request. Service principal will not have the principal Id. + :type principal_id: str + :param tenant_id: Set to the tenant ID of the client JWT making the + request. + :type tenant_id: str + :param object_id: Set to the object Id of the client JWT making the + request. Not all users have object Id. For CSP (reseller) scenarios for + example, object Id is not available. + :type object_id: str + :param app_id: Set to the app Id of the client JWT making the request. + :type app_id: str + """ + + _attribute_map = { + 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'app_id': {'key': 'appId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserIdentityFragment, self).__init__(**kwargs) + self.principal_name = kwargs.get('principal_name', None) + self.principal_id = kwargs.get('principal_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.object_id = kwargs.get('object_id', None) + self.app_id = kwargs.get('app_id', None) + + +class UserSecretStore(Model): + """Properties of a user's secret store. + + :param key_vault_uri: The URI of the user's Key vault. + :type key_vault_uri: str + :param key_vault_id: The ID of the user's Key vault. + :type key_vault_id: str + """ + + _attribute_map = { + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserSecretStore, self).__init__(**kwargs) + self.key_vault_uri = kwargs.get('key_vault_uri', None) + self.key_vault_id = kwargs.get('key_vault_id', None) + + +class UserSecretStoreFragment(Model): + """Properties of a user's secret store. + + :param key_vault_uri: The URI of the user's Key vault. + :type key_vault_uri: str + :param key_vault_id: The ID of the user's Key vault. + :type key_vault_id: str + """ + + _attribute_map = { + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserSecretStoreFragment, self).__init__(**kwargs) + self.key_vault_uri = kwargs.get('key_vault_uri', None) + self.key_vault_id = kwargs.get('key_vault_id', None) + + +class VirtualNetwork(Resource): + """A virtual network. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param allowed_subnets: The allowed subnets of the virtual network. + :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.Subnet] + :param description: The description of the virtual network. + :type description: str + :param external_provider_resource_id: The Microsoft.Network resource + identifier of the virtual network. + :type external_provider_resource_id: str + :ivar external_subnets: The external subnet properties. + :vartype external_subnets: + list[~azure.mgmt.devtestlabs.models.ExternalSubnet] + :param subnet_overrides: The subnet overrides of the virtual network. + :type subnet_overrides: + list[~azure.mgmt.devtestlabs.models.SubnetOverride] + :ivar created_date: The creation date of the virtual network. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'external_subnets': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[Subnet]'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, + 'external_subnets': {'key': 'properties.externalSubnets', 'type': '[ExternalSubnet]'}, + 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverride]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualNetwork, self).__init__(**kwargs) + self.allowed_subnets = kwargs.get('allowed_subnets', None) + self.description = kwargs.get('description', None) + self.external_provider_resource_id = kwargs.get('external_provider_resource_id', None) + self.external_subnets = None + self.subnet_overrides = kwargs.get('subnet_overrides', None) + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class VirtualNetworkFragment(UpdateResource): + """A virtual network. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param allowed_subnets: The allowed subnets of the virtual network. + :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.SubnetFragment] + :param description: The description of the virtual network. + :type description: str + :param external_provider_resource_id: The Microsoft.Network resource + identifier of the virtual network. + :type external_provider_resource_id: str + :param subnet_overrides: The subnet overrides of the virtual network. + :type subnet_overrides: + list[~azure.mgmt.devtestlabs.models.SubnetOverrideFragment] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[SubnetFragment]'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, + 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverrideFragment]'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkFragment, self).__init__(**kwargs) + self.allowed_subnets = kwargs.get('allowed_subnets', None) + self.description = kwargs.get('description', None) + self.external_provider_resource_id = kwargs.get('external_provider_resource_id', None) + self.subnet_overrides = kwargs.get('subnet_overrides', None) + + +class WeekDetails(Model): + """Properties of a weekly schedule. + + :param weekdays: The days of the week for which the schedule is set (e.g. + Sunday, Monday, Tuesday, etc.). + :type weekdays: list[str] + :param time: The time of the day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'weekdays': {'key': 'weekdays', 'type': '[str]'}, + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WeekDetails, self).__init__(**kwargs) + self.weekdays = kwargs.get('weekdays', None) + self.time = kwargs.get('time', None) + + +class WeekDetailsFragment(Model): + """Properties of a weekly schedule. + + :param weekdays: The days of the week for which the schedule is set (e.g. + Sunday, Monday, Tuesday, etc.). + :type weekdays: list[str] + :param time: The time of the day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'weekdays': {'key': 'weekdays', 'type': '[str]'}, + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WeekDetailsFragment, self).__init__(**kwargs) + self.weekdays = kwargs.get('weekdays', None) + self.time = kwargs.get('time', None) + + +class WindowsOsInfo(Model): + """Information about a Windows OS. + + :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, + SysprepRequested, SysprepApplied). Possible values include: + 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' + :type windows_os_state: str or + ~azure.mgmt.devtestlabs.models.WindowsOsState + """ + + _attribute_map = { + 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WindowsOsInfo, self).__init__(**kwargs) + self.windows_os_state = kwargs.get('windows_os_state', None) + + +class WindowsOsInfoFragment(Model): + """Information about a Windows OS. + + :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, + SysprepRequested, SysprepApplied). Possible values include: + 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' + :type windows_os_state: str or + ~azure.mgmt.devtestlabs.models.WindowsOsState + """ + + _attribute_map = { + 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WindowsOsInfoFragment, self).__init__(**kwargs) + self.windows_os_state = kwargs.get('windows_os_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models_py3.py new file mode 100644 index 000000000000..17a0bd5726ce --- /dev/null +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models_py3.py @@ -0,0 +1,5702 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Resource(Model): + """An Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class ApplicableSchedule(Resource): + """Schedules applicable to a virtual machine. The schedules may have been + defined on a VM or on lab level. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set + at the lab or lab resource level. + :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.Schedule + :param lab_vms_startup: The auto-startup schedule, if one has been set at + the lab or lab resource level. + :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.Schedule + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'Schedule'}, + 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'Schedule'}, + } + + def __init__(self, *, location: str=None, tags=None, lab_vms_shutdown=None, lab_vms_startup=None, **kwargs) -> None: + super(ApplicableSchedule, self).__init__(location=location, tags=tags, **kwargs) + self.lab_vms_shutdown = lab_vms_shutdown + self.lab_vms_startup = lab_vms_startup + + +class UpdateResource(Model): + """Represents an update resource. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(UpdateResource, self).__init__(**kwargs) + self.tags = tags + + +class ApplicableScheduleFragment(UpdateResource): + """Schedules applicable to a virtual machine. The schedules may have been + defined on a VM or on lab level. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set + at the lab or lab resource level. + :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.ScheduleFragment + :param lab_vms_startup: The auto-startup schedule, if one has been set at + the lab or lab resource level. + :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.ScheduleFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'ScheduleFragment'}, + 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'ScheduleFragment'}, + } + + def __init__(self, *, tags=None, lab_vms_shutdown=None, lab_vms_startup=None, **kwargs) -> None: + super(ApplicableScheduleFragment, self).__init__(tags=tags, **kwargs) + self.lab_vms_shutdown = lab_vms_shutdown + self.lab_vms_startup = lab_vms_startup + + +class ApplyArtifactsRequest(Model): + """Request body for applying artifacts to a virtual machine. + + :param artifacts: The list of artifacts to apply. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + """ + + _attribute_map = { + 'artifacts': {'key': 'artifacts', 'type': '[ArtifactInstallProperties]'}, + } + + def __init__(self, *, artifacts=None, **kwargs) -> None: + super(ApplyArtifactsRequest, self).__init__(**kwargs) + self.artifacts = artifacts + + +class ArmTemplate(Resource): + """An Azure Resource Manager template. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar display_name: The display name of the ARM template. + :vartype display_name: str + :ivar description: The description of the ARM template. + :vartype description: str + :ivar publisher: The publisher of the ARM template. + :vartype publisher: str + :ivar icon: The URI to the icon of the ARM template. + :vartype icon: str + :ivar contents: The contents of the ARM template. + :vartype contents: object + :ivar created_date: The creation date of the armTemplate. + :vartype created_date: datetime + :ivar parameters_value_files_info: File name and parameter values + information from all azuredeploy.*.parameters.json for the ARM template. + :vartype parameters_value_files_info: + list[~azure.mgmt.devtestlabs.models.ParametersValueFileInfo] + :ivar enabled: Whether or not ARM template is enabled for use by lab user. + :vartype enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'publisher': {'readonly': True}, + 'icon': {'readonly': True}, + 'contents': {'readonly': True}, + 'created_date': {'readonly': True}, + 'parameters_value_files_info': {'readonly': True}, + 'enabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'contents': {'key': 'properties.contents', 'type': 'object'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'parameters_value_files_info': {'key': 'properties.parametersValueFilesInfo', 'type': '[ParametersValueFileInfo]'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(ArmTemplate, self).__init__(location=location, tags=tags, **kwargs) + self.display_name = None + self.description = None + self.publisher = None + self.icon = None + self.contents = None + self.created_date = None + self.parameters_value_files_info = None + self.enabled = None + + +class ArmTemplateInfo(Model): + """Information about a generated ARM template. + + :param template: The template's contents. + :type template: object + :param parameters: The parameters of the ARM template. + :type parameters: object + """ + + _attribute_map = { + 'template': {'key': 'template', 'type': 'object'}, + 'parameters': {'key': 'parameters', 'type': 'object'}, + } + + def __init__(self, *, template=None, parameters=None, **kwargs) -> None: + super(ArmTemplateInfo, self).__init__(**kwargs) + self.template = template + self.parameters = parameters + + +class ArmTemplateParameterProperties(Model): + """Properties of an Azure Resource Manager template parameter. + + :param name: The name of the template parameter. + :type name: str + :param value: The value of the template parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ArmTemplateParameterProperties, self).__init__(**kwargs) + self.name = name + self.value = value + + +class ArmTemplateParameterPropertiesFragment(Model): + """Properties of an Azure Resource Manager template parameter. + + :param name: The name of the template parameter. + :type name: str + :param value: The value of the template parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ArmTemplateParameterPropertiesFragment, self).__init__(**kwargs) + self.name = name + self.value = value + + +class Artifact(Resource): + """An artifact. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar title: The artifact's title. + :vartype title: str + :ivar description: The artifact's description. + :vartype description: str + :ivar publisher: The artifact's publisher. + :vartype publisher: str + :ivar file_path: The file path to the artifact. + :vartype file_path: str + :ivar icon: The URI to the artifact icon. + :vartype icon: str + :ivar target_os_type: The artifact's target OS. + :vartype target_os_type: str + :ivar parameters: The artifact's parameters. + :vartype parameters: object + :ivar created_date: The artifact's creation date. + :vartype created_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'title': {'readonly': True}, + 'description': {'readonly': True}, + 'publisher': {'readonly': True}, + 'file_path': {'readonly': True}, + 'icon': {'readonly': True}, + 'target_os_type': {'readonly': True}, + 'parameters': {'readonly': True}, + 'created_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'file_path': {'key': 'properties.filePath', 'type': 'str'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'target_os_type': {'key': 'properties.targetOsType', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': 'object'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(Artifact, self).__init__(location=location, tags=tags, **kwargs) + self.title = None + self.description = None + self.publisher = None + self.file_path = None + self.icon = None + self.target_os_type = None + self.parameters = None + self.created_date = None + + +class ArtifactDeploymentStatusProperties(Model): + """Properties of an artifact deployment. + + :param deployment_status: The deployment status of the artifact. + :type deployment_status: str + :param artifacts_applied: The total count of the artifacts that were + successfully applied. + :type artifacts_applied: int + :param total_artifacts: The total count of the artifacts that were + tentatively applied. + :type total_artifacts: int + """ + + _attribute_map = { + 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, + 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, + 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, + } + + def __init__(self, *, deployment_status: str=None, artifacts_applied: int=None, total_artifacts: int=None, **kwargs) -> None: + super(ArtifactDeploymentStatusProperties, self).__init__(**kwargs) + self.deployment_status = deployment_status + self.artifacts_applied = artifacts_applied + self.total_artifacts = total_artifacts + + +class ArtifactDeploymentStatusPropertiesFragment(Model): + """Properties of an artifact deployment. + + :param deployment_status: The deployment status of the artifact. + :type deployment_status: str + :param artifacts_applied: The total count of the artifacts that were + successfully applied. + :type artifacts_applied: int + :param total_artifacts: The total count of the artifacts that were + tentatively applied. + :type total_artifacts: int + """ + + _attribute_map = { + 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, + 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, + 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, + } + + def __init__(self, *, deployment_status: str=None, artifacts_applied: int=None, total_artifacts: int=None, **kwargs) -> None: + super(ArtifactDeploymentStatusPropertiesFragment, self).__init__(**kwargs) + self.deployment_status = deployment_status + self.artifacts_applied = artifacts_applied + self.total_artifacts = total_artifacts + + +class ArtifactInstallProperties(Model): + """Properties of an artifact. + + :param artifact_id: The artifact's identifier. + :type artifact_id: str + :param artifact_title: The artifact's title. + :type artifact_title: str + :param parameters: The parameters of the artifact. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArtifactParameterProperties] + :param status: The status of the artifact. + :type status: str + :param deployment_status_message: The status message from the deployment. + :type deployment_status_message: str + :param vm_extension_status_message: The status message from the virtual + machine extension. + :type vm_extension_status_message: str + :param install_time: The time that the artifact starts to install on the + virtual machine. + :type install_time: datetime + """ + + _attribute_map = { + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterProperties]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, + 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, + 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, artifact_id: str=None, artifact_title: str=None, parameters=None, status: str=None, deployment_status_message: str=None, vm_extension_status_message: str=None, install_time=None, **kwargs) -> None: + super(ArtifactInstallProperties, self).__init__(**kwargs) + self.artifact_id = artifact_id + self.artifact_title = artifact_title + self.parameters = parameters + self.status = status + self.deployment_status_message = deployment_status_message + self.vm_extension_status_message = vm_extension_status_message + self.install_time = install_time + + +class ArtifactInstallPropertiesFragment(Model): + """Properties of an artifact. + + :param artifact_id: The artifact's identifier. + :type artifact_id: str + :param artifact_title: The artifact's title. + :type artifact_title: str + :param parameters: The parameters of the artifact. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArtifactParameterPropertiesFragment] + :param status: The status of the artifact. + :type status: str + :param deployment_status_message: The status message from the deployment. + :type deployment_status_message: str + :param vm_extension_status_message: The status message from the virtual + machine extension. + :type vm_extension_status_message: str + :param install_time: The time that the artifact starts to install on the + virtual machine. + :type install_time: datetime + """ + + _attribute_map = { + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterPropertiesFragment]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, + 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, + 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, artifact_id: str=None, artifact_title: str=None, parameters=None, status: str=None, deployment_status_message: str=None, vm_extension_status_message: str=None, install_time=None, **kwargs) -> None: + super(ArtifactInstallPropertiesFragment, self).__init__(**kwargs) + self.artifact_id = artifact_id + self.artifact_title = artifact_title + self.parameters = parameters + self.status = status + self.deployment_status_message = deployment_status_message + self.vm_extension_status_message = vm_extension_status_message + self.install_time = install_time + + +class ArtifactParameterProperties(Model): + """Properties of an artifact parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ArtifactParameterProperties, self).__init__(**kwargs) + self.name = name + self.value = value + + +class ArtifactParameterPropertiesFragment(Model): + """Properties of an artifact parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ArtifactParameterPropertiesFragment, self).__init__(**kwargs) + self.name = name + self.value = value + + +class ArtifactSource(Resource): + """Properties of an artifact source. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param display_name: The artifact source's display name. + :type display_name: str + :param uri: The artifact source's URI. + :type uri: str + :param source_type: The artifact source's type. Possible values include: + 'VsoGit', 'GitHub' + :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType + :param folder_path: The folder containing artifacts. + :type folder_path: str + :param arm_template_folder_path: The folder containing Azure Resource + Manager templates. + :type arm_template_folder_path: str + :param branch_ref: The artifact source's branch reference. + :type branch_ref: str + :param security_token: The security token to authenticate to the artifact + source. + :type security_token: str + :param status: Indicates if the artifact source is enabled (values: + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :ivar created_date: The artifact source's creation date. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, + 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, + 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, display_name: str=None, uri: str=None, source_type=None, folder_path: str=None, arm_template_folder_path: str=None, branch_ref: str=None, security_token: str=None, status=None, **kwargs) -> None: + super(ArtifactSource, self).__init__(location=location, tags=tags, **kwargs) + self.display_name = display_name + self.uri = uri + self.source_type = source_type + self.folder_path = folder_path + self.arm_template_folder_path = arm_template_folder_path + self.branch_ref = branch_ref + self.security_token = security_token + self.status = status + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class ArtifactSourceFragment(UpdateResource): + """Properties of an artifact source. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param display_name: The artifact source's display name. + :type display_name: str + :param uri: The artifact source's URI. + :type uri: str + :param source_type: The artifact source's type. Possible values include: + 'VsoGit', 'GitHub' + :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType + :param folder_path: The folder containing artifacts. + :type folder_path: str + :param arm_template_folder_path: The folder containing Azure Resource + Manager templates. + :type arm_template_folder_path: str + :param branch_ref: The artifact source's branch reference. + :type branch_ref: str + :param security_token: The security token to authenticate to the artifact + source. + :type security_token: str + :param status: Indicates if the artifact source is enabled (values: + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, + 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, + 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + } + + def __init__(self, *, tags=None, display_name: str=None, uri: str=None, source_type=None, folder_path: str=None, arm_template_folder_path: str=None, branch_ref: str=None, security_token: str=None, status=None, **kwargs) -> None: + super(ArtifactSourceFragment, self).__init__(tags=tags, **kwargs) + self.display_name = display_name + self.uri = uri + self.source_type = source_type + self.folder_path = folder_path + self.arm_template_folder_path = arm_template_folder_path + self.branch_ref = branch_ref + self.security_token = security_token + self.status = status + + +class AttachDiskProperties(Model): + """Properties of the disk to attach. + + :param leased_by_lab_vm_id: The resource ID of the Lab virtual machine to + which the disk is attached. + :type leased_by_lab_vm_id: str + """ + + _attribute_map = { + 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, + } + + def __init__(self, *, leased_by_lab_vm_id: str=None, **kwargs) -> None: + super(AttachDiskProperties, self).__init__(**kwargs) + self.leased_by_lab_vm_id = leased_by_lab_vm_id + + +class AttachNewDataDiskOptions(Model): + """Properties to attach new disk to the Virtual Machine. + + :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :type disk_size_gi_b: int + :param disk_name: The name of the disk to be attached. + :type disk_name: str + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + 'disk_name': {'key': 'diskName', 'type': 'str'}, + 'disk_type': {'key': 'diskType', 'type': 'str'}, + } + + def __init__(self, *, disk_size_gi_b: int=None, disk_name: str=None, disk_type=None, **kwargs) -> None: + super(AttachNewDataDiskOptions, self).__init__(**kwargs) + self.disk_size_gi_b = disk_size_gi_b + self.disk_name = disk_name + self.disk_type = disk_type + + +class AttachNewDataDiskOptionsFragment(Model): + """Properties to attach new disk to the Virtual Machine. + + :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :type disk_size_gi_b: int + :param disk_name: The name of the disk to be attached. + :type disk_name: str + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + 'disk_name': {'key': 'diskName', 'type': 'str'}, + 'disk_type': {'key': 'diskType', 'type': 'str'}, + } + + def __init__(self, *, disk_size_gi_b: int=None, disk_name: str=None, disk_type=None, **kwargs) -> None: + super(AttachNewDataDiskOptionsFragment, self).__init__(**kwargs) + self.disk_size_gi_b = disk_size_gi_b + self.disk_name = disk_name + self.disk_type = disk_type + + +class BulkCreationParameters(Model): + """Parameters for creating multiple virtual machines as a single action. + + :param instance_count: The number of virtual machine instances to create. + :type instance_count: int + """ + + _attribute_map = { + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + } + + def __init__(self, *, instance_count: int=None, **kwargs) -> None: + super(BulkCreationParameters, self).__init__(**kwargs) + self.instance_count = instance_count + + +class BulkCreationParametersFragment(Model): + """Parameters for creating multiple virtual machines as a single action. + + :param instance_count: The number of virtual machine instances to create. + :type instance_count: int + """ + + _attribute_map = { + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + } + + def __init__(self, *, instance_count: int=None, **kwargs) -> None: + super(BulkCreationParametersFragment, self).__init__(**kwargs) + self.instance_count = instance_count + + +class CloudError(Model): + """Error from a REST request. + + :param error: The cloud error that occurred + :type error: ~azure.mgmt.devtestlabs.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.error = error + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """Body of an error from a REST request. + + :param code: The error code. + :type code: str + :param message: The error message. + :type message: str + :param target: The error target. + :type target: str + :param details: Inner errors. + :type details: list[~azure.mgmt.devtestlabs.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class ComputeDataDisk(Model): + """A data disks attached to a virtual machine. + + :param name: Gets data disk name. + :type name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :param disk_size_gi_b: Gets data disk size in GiB. + :type disk_size_gi_b: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disk_uri': {'key': 'diskUri', 'type': 'str'}, + 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, disk_uri: str=None, managed_disk_id: str=None, disk_size_gi_b: int=None, **kwargs) -> None: + super(ComputeDataDisk, self).__init__(**kwargs) + self.name = name + self.disk_uri = disk_uri + self.managed_disk_id = managed_disk_id + self.disk_size_gi_b = disk_size_gi_b + + +class ComputeDataDiskFragment(Model): + """A data disks attached to a virtual machine. + + :param name: Gets data disk name. + :type name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :param disk_size_gi_b: Gets data disk size in GiB. + :type disk_size_gi_b: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disk_uri': {'key': 'diskUri', 'type': 'str'}, + 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, disk_uri: str=None, managed_disk_id: str=None, disk_size_gi_b: int=None, **kwargs) -> None: + super(ComputeDataDiskFragment, self).__init__(**kwargs) + self.name = name + self.disk_uri = disk_uri + self.managed_disk_id = managed_disk_id + self.disk_size_gi_b = disk_size_gi_b + + +class ComputeVmInstanceViewStatus(Model): + """Status information about a virtual machine. + + :param code: Gets the status Code. + :type code: str + :param display_status: Gets the short localizable label for the status. + :type display_status: str + :param message: Gets the message associated with the status. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, display_status: str=None, message: str=None, **kwargs) -> None: + super(ComputeVmInstanceViewStatus, self).__init__(**kwargs) + self.code = code + self.display_status = display_status + self.message = message + + +class ComputeVmInstanceViewStatusFragment(Model): + """Status information about a virtual machine. + + :param code: Gets the status Code. + :type code: str + :param display_status: Gets the short localizable label for the status. + :type display_status: str + :param message: Gets the message associated with the status. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, display_status: str=None, message: str=None, **kwargs) -> None: + super(ComputeVmInstanceViewStatusFragment, self).__init__(**kwargs) + self.code = code + self.display_status = display_status + self.message = message + + +class ComputeVmProperties(Model): + """Properties of a virtual machine returned by the Microsoft.Compute API. + + :param statuses: Gets the statuses of the virtual machine. + :type statuses: + list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatus] + :param os_type: Gets the OS type of the virtual machine. + :type os_type: str + :param vm_size: Gets the size of the virtual machine. + :type vm_size: str + :param network_interface_id: Gets the network interface ID of the virtual + machine. + :type network_interface_id: str + :param os_disk_id: Gets OS disk blob uri for the virtual machine. + :type os_disk_id: str + :param data_disk_ids: Gets data disks blob uri for the virtual machine. + :type data_disk_ids: list[str] + :param data_disks: Gets all data disks attached to the virtual machine. + :type data_disks: list[~azure.mgmt.devtestlabs.models.ComputeDataDisk] + """ + + _attribute_map = { + 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatus]'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, + 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, + 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDisk]'}, + } + + def __init__(self, *, statuses=None, os_type: str=None, vm_size: str=None, network_interface_id: str=None, os_disk_id: str=None, data_disk_ids=None, data_disks=None, **kwargs) -> None: + super(ComputeVmProperties, self).__init__(**kwargs) + self.statuses = statuses + self.os_type = os_type + self.vm_size = vm_size + self.network_interface_id = network_interface_id + self.os_disk_id = os_disk_id + self.data_disk_ids = data_disk_ids + self.data_disks = data_disks + + +class ComputeVmPropertiesFragment(Model): + """Properties of a virtual machine returned by the Microsoft.Compute API. + + :param statuses: Gets the statuses of the virtual machine. + :type statuses: + list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatusFragment] + :param os_type: Gets the OS type of the virtual machine. + :type os_type: str + :param vm_size: Gets the size of the virtual machine. + :type vm_size: str + :param network_interface_id: Gets the network interface ID of the virtual + machine. + :type network_interface_id: str + :param os_disk_id: Gets OS disk blob uri for the virtual machine. + :type os_disk_id: str + :param data_disk_ids: Gets data disks blob uri for the virtual machine. + :type data_disk_ids: list[str] + :param data_disks: Gets all data disks attached to the virtual machine. + :type data_disks: + list[~azure.mgmt.devtestlabs.models.ComputeDataDiskFragment] + """ + + _attribute_map = { + 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatusFragment]'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, + 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, + 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDiskFragment]'}, + } + + def __init__(self, *, statuses=None, os_type: str=None, vm_size: str=None, network_interface_id: str=None, os_disk_id: str=None, data_disk_ids=None, data_disks=None, **kwargs) -> None: + super(ComputeVmPropertiesFragment, self).__init__(**kwargs) + self.statuses = statuses + self.os_type = os_type + self.vm_size = vm_size + self.network_interface_id = network_interface_id + self.os_disk_id = os_disk_id + self.data_disk_ids = data_disk_ids + self.data_disks = data_disks + + +class CostThresholdProperties(Model): + """Properties of a cost threshold item. + + :param threshold_id: The ID of the cost threshold item. + :type threshold_id: str + :param percentage_threshold: The value of the percentage cost threshold. + :type percentage_threshold: + ~azure.mgmt.devtestlabs.models.PercentageCostThresholdProperties + :param display_on_chart: Indicates whether this threshold will be + displayed on cost charts. Possible values include: 'Enabled', 'Disabled' + :type display_on_chart: str or + ~azure.mgmt.devtestlabs.models.CostThresholdStatus + :param send_notification_when_exceeded: Indicates whether notifications + will be sent when this threshold is exceeded. Possible values include: + 'Enabled', 'Disabled' + :type send_notification_when_exceeded: str or + ~azure.mgmt.devtestlabs.models.CostThresholdStatus + :param notification_sent: Indicates the datetime when notifications were + last sent for this threshold. + :type notification_sent: str + """ + + _attribute_map = { + 'threshold_id': {'key': 'thresholdId', 'type': 'str'}, + 'percentage_threshold': {'key': 'percentageThreshold', 'type': 'PercentageCostThresholdProperties'}, + 'display_on_chart': {'key': 'displayOnChart', 'type': 'str'}, + 'send_notification_when_exceeded': {'key': 'sendNotificationWhenExceeded', 'type': 'str'}, + 'notification_sent': {'key': 'notificationSent', 'type': 'str'}, + } + + def __init__(self, *, threshold_id: str=None, percentage_threshold=None, display_on_chart=None, send_notification_when_exceeded=None, notification_sent: str=None, **kwargs) -> None: + super(CostThresholdProperties, self).__init__(**kwargs) + self.threshold_id = threshold_id + self.percentage_threshold = percentage_threshold + self.display_on_chart = display_on_chart + self.send_notification_when_exceeded = send_notification_when_exceeded + self.notification_sent = notification_sent + + +class CustomImage(Resource): + """A custom image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param vm: The virtual machine from which the image is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVm + :param vhd: The VHD from which the image is to be created. + :type vhd: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustom + :param description: The description of the custom image. + :type description: str + :param author: The author of the custom image. + :type author: str + :ivar creation_date: The creation date of the custom image. + :vartype creation_date: datetime + :param managed_image_id: The Managed Image Id backing the custom image. + :type managed_image_id: str + :param managed_snapshot_id: The Managed Snapshot Id backing the custom + image. + :type managed_snapshot_id: str + :param data_disk_storage_info: Storage information about the data disks + present in the custom image + :type data_disk_storage_info: + list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfo] + :param custom_image_plan: Storage information about the plan related to + this custom image + :type custom_image_plan: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlan + :param is_plan_authorized: Whether or not the custom images underlying + offer/plan has been enabled for programmatic deployment + :type is_plan_authorized: bool + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVm'}, + 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustom'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, + 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, + 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfo]'}, + 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlan'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, vm=None, vhd=None, description: str=None, author: str=None, managed_image_id: str=None, managed_snapshot_id: str=None, data_disk_storage_info=None, custom_image_plan=None, is_plan_authorized: bool=None, **kwargs) -> None: + super(CustomImage, self).__init__(location=location, tags=tags, **kwargs) + self.vm = vm + self.vhd = vhd + self.description = description + self.author = author + self.creation_date = None + self.managed_image_id = managed_image_id + self.managed_snapshot_id = managed_snapshot_id + self.data_disk_storage_info = data_disk_storage_info + self.custom_image_plan = custom_image_plan + self.is_plan_authorized = is_plan_authorized + self.provisioning_state = None + self.unique_identifier = None + + +class CustomImageFragment(UpdateResource): + """A custom image. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param vm: The virtual machine from which the image is to be created. + :type vm: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVmFragment + :param vhd: The VHD from which the image is to be created. + :type vhd: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustomFragment + :param description: The description of the custom image. + :type description: str + :param author: The author of the custom image. + :type author: str + :param managed_image_id: The Managed Image Id backing the custom image. + :type managed_image_id: str + :param managed_snapshot_id: The Managed Snapshot Id backing the custom + image. + :type managed_snapshot_id: str + :param data_disk_storage_info: Storage information about the data disks + present in the custom image + :type data_disk_storage_info: + list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfoFragment] + :param custom_image_plan: Storage information about the plan related to + this custom image + :type custom_image_plan: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlanFragment + :param is_plan_authorized: Whether or not the custom images underlying + offer/plan has been enabled for programmatic deployment + :type is_plan_authorized: bool + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVmFragment'}, + 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustomFragment'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, + 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, + 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfoFragment]'}, + 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlanFragment'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + } + + def __init__(self, *, tags=None, vm=None, vhd=None, description: str=None, author: str=None, managed_image_id: str=None, managed_snapshot_id: str=None, data_disk_storage_info=None, custom_image_plan=None, is_plan_authorized: bool=None, **kwargs) -> None: + super(CustomImageFragment, self).__init__(tags=tags, **kwargs) + self.vm = vm + self.vhd = vhd + self.description = description + self.author = author + self.managed_image_id = managed_image_id + self.managed_snapshot_id = managed_snapshot_id + self.data_disk_storage_info = data_disk_storage_info + self.custom_image_plan = custom_image_plan + self.is_plan_authorized = is_plan_authorized + + +class CustomImagePropertiesCustom(Model): + """Properties for creating a custom image from a VHD. + + All required parameters must be populated in order to send to Azure. + + :param image_name: The image name. + :type image_name: str + :param sys_prep: Indicates whether sysprep has been run on the VHD. + :type sys_prep: bool + :param os_type: Required. The OS type of the custom image (i.e. Windows, + Linux). Possible values include: 'Windows', 'Linux', 'None' + :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType + """ + + _validation = { + 'os_type': {'required': True}, + } + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, *, os_type, image_name: str=None, sys_prep: bool=None, **kwargs) -> None: + super(CustomImagePropertiesCustom, self).__init__(**kwargs) + self.image_name = image_name + self.sys_prep = sys_prep + self.os_type = os_type + + +class CustomImagePropertiesCustomFragment(Model): + """Properties for creating a custom image from a VHD. + + :param image_name: The image name. + :type image_name: str + :param sys_prep: Indicates whether sysprep has been run on the VHD. + :type sys_prep: bool + :param os_type: The OS type of the custom image (i.e. Windows, Linux). + Possible values include: 'Windows', 'Linux', 'None' + :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType + """ + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, *, image_name: str=None, sys_prep: bool=None, os_type=None, **kwargs) -> None: + super(CustomImagePropertiesCustomFragment, self).__init__(**kwargs) + self.image_name = image_name + self.sys_prep = sys_prep + self.os_type = os_type + + +class CustomImagePropertiesFromPlan(Model): + """Properties for plan on a custom image. + + :param id: The id of the plan, equivalent to name of the plan + :type id: str + :param publisher: The publisher for the plan from the marketplace image + the custom image is derived from + :type publisher: str + :param offer: The offer for the plan from the marketplace image the custom + image is derived from + :type offer: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, **kwargs) -> None: + super(CustomImagePropertiesFromPlan, self).__init__(**kwargs) + self.id = id + self.publisher = publisher + self.offer = offer + + +class CustomImagePropertiesFromPlanFragment(Model): + """Properties for plan on a custom image. + + :param id: The id of the plan, equivalent to name of the plan + :type id: str + :param publisher: The publisher for the plan from the marketplace image + the custom image is derived from + :type publisher: str + :param offer: The offer for the plan from the marketplace image the custom + image is derived from + :type offer: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, **kwargs) -> None: + super(CustomImagePropertiesFromPlanFragment, self).__init__(**kwargs) + self.id = id + self.publisher = publisher + self.offer = offer + + +class CustomImagePropertiesFromVm(Model): + """Properties for creating a custom image from a virtual machine. + + :param source_vm_id: The source vm identifier. + :type source_vm_id: str + :param windows_os_info: The Windows OS information of the VM. + :type windows_os_info: ~azure.mgmt.devtestlabs.models.WindowsOsInfo + :param linux_os_info: The Linux OS information of the VM. + :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfo + """ + + _attribute_map = { + 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, + 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfo'}, + 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfo'}, + } + + def __init__(self, *, source_vm_id: str=None, windows_os_info=None, linux_os_info=None, **kwargs) -> None: + super(CustomImagePropertiesFromVm, self).__init__(**kwargs) + self.source_vm_id = source_vm_id + self.windows_os_info = windows_os_info + self.linux_os_info = linux_os_info + + +class CustomImagePropertiesFromVmFragment(Model): + """Properties for creating a custom image from a virtual machine. + + :param source_vm_id: The source vm identifier. + :type source_vm_id: str + :param windows_os_info: The Windows OS information of the VM. + :type windows_os_info: + ~azure.mgmt.devtestlabs.models.WindowsOsInfoFragment + :param linux_os_info: The Linux OS information of the VM. + :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfoFragment + """ + + _attribute_map = { + 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, + 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfoFragment'}, + 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfoFragment'}, + } + + def __init__(self, *, source_vm_id: str=None, windows_os_info=None, linux_os_info=None, **kwargs) -> None: + super(CustomImagePropertiesFromVmFragment, self).__init__(**kwargs) + self.source_vm_id = source_vm_id + self.windows_os_info = windows_os_info + self.linux_os_info = linux_os_info + + +class DataDiskProperties(Model): + """Request body for adding a new or existing data disk to a virtual machine. + + :param attach_new_data_disk_options: Specifies options to attach a new + disk to the virtual machine. + :type attach_new_data_disk_options: + ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptions + :param existing_lab_disk_id: Specifies the existing lab disk id to attach + to virtual machine. + :type existing_lab_disk_id: str + :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, + ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type host_caching: str or + ~azure.mgmt.devtestlabs.models.HostCachingOptions + """ + + _attribute_map = { + 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptions'}, + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + 'host_caching': {'key': 'hostCaching', 'type': 'str'}, + } + + def __init__(self, *, attach_new_data_disk_options=None, existing_lab_disk_id: str=None, host_caching=None, **kwargs) -> None: + super(DataDiskProperties, self).__init__(**kwargs) + self.attach_new_data_disk_options = attach_new_data_disk_options + self.existing_lab_disk_id = existing_lab_disk_id + self.host_caching = host_caching + + +class DataDiskPropertiesFragment(Model): + """Request body for adding a new or existing data disk to a virtual machine. + + :param attach_new_data_disk_options: Specifies options to attach a new + disk to the virtual machine. + :type attach_new_data_disk_options: + ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptionsFragment + :param existing_lab_disk_id: Specifies the existing lab disk id to attach + to virtual machine. + :type existing_lab_disk_id: str + :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, + ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type host_caching: str or + ~azure.mgmt.devtestlabs.models.HostCachingOptions + """ + + _attribute_map = { + 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptionsFragment'}, + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + 'host_caching': {'key': 'hostCaching', 'type': 'str'}, + } + + def __init__(self, *, attach_new_data_disk_options=None, existing_lab_disk_id: str=None, host_caching=None, **kwargs) -> None: + super(DataDiskPropertiesFragment, self).__init__(**kwargs) + self.attach_new_data_disk_options = attach_new_data_disk_options + self.existing_lab_disk_id = existing_lab_disk_id + self.host_caching = host_caching + + +class DataDiskStorageTypeInfo(Model): + """Storage information about the data disks present in the custom image. + + :param lun: Disk Lun + :type lun: str + :param storage_type: Disk Storage Type. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + } + + def __init__(self, *, lun: str=None, storage_type=None, **kwargs) -> None: + super(DataDiskStorageTypeInfo, self).__init__(**kwargs) + self.lun = lun + self.storage_type = storage_type + + +class DataDiskStorageTypeInfoFragment(Model): + """Storage information about the data disks present in the custom image. + + :param lun: Disk Lun + :type lun: str + :param storage_type: Disk Storage Type. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + } + + def __init__(self, *, lun: str=None, storage_type=None, **kwargs) -> None: + super(DataDiskStorageTypeInfoFragment, self).__init__(**kwargs) + self.lun = lun + self.storage_type = storage_type + + +class DayDetails(Model): + """Properties of a daily schedule. + + :param time: The time of day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, *, time: str=None, **kwargs) -> None: + super(DayDetails, self).__init__(**kwargs) + self.time = time + + +class DayDetailsFragment(Model): + """Properties of a daily schedule. + + :param time: The time of day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, *, time: str=None, **kwargs) -> None: + super(DayDetailsFragment, self).__init__(**kwargs) + self.time = time + + +class DetachDataDiskProperties(Model): + """Request body for detaching data disk from a virtual machine. + + :param existing_lab_disk_id: Specifies the disk resource ID to detach from + virtual machine. + :type existing_lab_disk_id: str + """ + + _attribute_map = { + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + } + + def __init__(self, *, existing_lab_disk_id: str=None, **kwargs) -> None: + super(DetachDataDiskProperties, self).__init__(**kwargs) + self.existing_lab_disk_id = existing_lab_disk_id + + +class DetachDiskProperties(Model): + """Properties of the disk to detach. + + :param leased_by_lab_vm_id: The resource ID of the Lab VM to which the + disk is attached. + :type leased_by_lab_vm_id: str + """ + + _attribute_map = { + 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, + } + + def __init__(self, *, leased_by_lab_vm_id: str=None, **kwargs) -> None: + super(DetachDiskProperties, self).__init__(**kwargs) + self.leased_by_lab_vm_id = leased_by_lab_vm_id + + +class Disk(Resource): + """A Disk. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param disk_size_gi_b: The size of the disk in GibiBytes. + :type disk_size_gi_b: int + :param leased_by_lab_vm_id: The resource ID of the VM to which this disk + is leased. + :type leased_by_lab_vm_id: str + :param disk_blob_name: When backed by a blob, the name of the VHD blob + without extension. + :type disk_blob_name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :ivar created_date: The creation date of the disk. + :vartype created_date: datetime + :param host_caching: The host caching policy of the disk (i.e. None, + ReadOnly, ReadWrite). + :type host_caching: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, + 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, + 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, + 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, + 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, disk_type=None, disk_size_gi_b: int=None, leased_by_lab_vm_id: str=None, disk_blob_name: str=None, disk_uri: str=None, host_caching: str=None, managed_disk_id: str=None, **kwargs) -> None: + super(Disk, self).__init__(location=location, tags=tags, **kwargs) + self.disk_type = disk_type + self.disk_size_gi_b = disk_size_gi_b + self.leased_by_lab_vm_id = leased_by_lab_vm_id + self.disk_blob_name = disk_blob_name + self.disk_uri = disk_uri + self.created_date = None + self.host_caching = host_caching + self.managed_disk_id = managed_disk_id + self.provisioning_state = None + self.unique_identifier = None + + +class DiskFragment(UpdateResource): + """A Disk. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param disk_size_gi_b: The size of the disk in GibiBytes. + :type disk_size_gi_b: int + :param leased_by_lab_vm_id: The resource ID of the VM to which this disk + is leased. + :type leased_by_lab_vm_id: str + :param disk_blob_name: When backed by a blob, the name of the VHD blob + without extension. + :type disk_blob_name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param host_caching: The host caching policy of the disk (i.e. None, + ReadOnly, ReadWrite). + :type host_caching: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, + 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, + 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, + 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, + 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, + 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, + } + + def __init__(self, *, tags=None, disk_type=None, disk_size_gi_b: int=None, leased_by_lab_vm_id: str=None, disk_blob_name: str=None, disk_uri: str=None, host_caching: str=None, managed_disk_id: str=None, **kwargs) -> None: + super(DiskFragment, self).__init__(tags=tags, **kwargs) + self.disk_type = disk_type + self.disk_size_gi_b = disk_size_gi_b + self.leased_by_lab_vm_id = leased_by_lab_vm_id + self.disk_blob_name = disk_blob_name + self.disk_uri = disk_uri + self.host_caching = host_caching + self.managed_disk_id = managed_disk_id + + +class DtlEnvironment(Resource): + """An environment, which is essentially an ARM template deployment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param deployment_properties: The deployment properties of the + environment. + :type deployment_properties: + ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentProperties + :param arm_template_display_name: The display name of the Azure Resource + Manager template that produced the environment. + :type arm_template_display_name: str + :ivar resource_group_id: The identifier of the resource group containing + the environment's resources. + :vartype resource_group_id: str + :ivar created_by_user: The creator of the environment. + :vartype created_by_user: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_group_id': {'readonly': True}, + 'created_by_user': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentProperties'}, + 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, + 'resource_group_id': {'key': 'properties.resourceGroupId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, deployment_properties=None, arm_template_display_name: str=None, **kwargs) -> None: + super(DtlEnvironment, self).__init__(location=location, tags=tags, **kwargs) + self.deployment_properties = deployment_properties + self.arm_template_display_name = arm_template_display_name + self.resource_group_id = None + self.created_by_user = None + self.provisioning_state = None + self.unique_identifier = None + + +class DtlEnvironmentFragment(UpdateResource): + """An environment, which is essentially an ARM template deployment. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param deployment_properties: The deployment properties of the + environment. + :type deployment_properties: + ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentPropertiesFragment + :param arm_template_display_name: The display name of the Azure Resource + Manager template that produced the environment. + :type arm_template_display_name: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentPropertiesFragment'}, + 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, + } + + def __init__(self, *, tags=None, deployment_properties=None, arm_template_display_name: str=None, **kwargs) -> None: + super(DtlEnvironmentFragment, self).__init__(tags=tags, **kwargs) + self.deployment_properties = deployment_properties + self.arm_template_display_name = arm_template_display_name + + +class EnvironmentDeploymentProperties(Model): + """Properties of an environment deployment. + + :param arm_template_id: The Azure Resource Manager template's identifier. + :type arm_template_id: str + :param parameters: The parameters of the Azure Resource Manager template. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterProperties] + """ + + _attribute_map = { + 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterProperties]'}, + } + + def __init__(self, *, arm_template_id: str=None, parameters=None, **kwargs) -> None: + super(EnvironmentDeploymentProperties, self).__init__(**kwargs) + self.arm_template_id = arm_template_id + self.parameters = parameters + + +class EnvironmentDeploymentPropertiesFragment(Model): + """Properties of an environment deployment. + + :param arm_template_id: The Azure Resource Manager template's identifier. + :type arm_template_id: str + :param parameters: The parameters of the Azure Resource Manager template. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterPropertiesFragment] + """ + + _attribute_map = { + 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterPropertiesFragment]'}, + } + + def __init__(self, *, arm_template_id: str=None, parameters=None, **kwargs) -> None: + super(EnvironmentDeploymentPropertiesFragment, self).__init__(**kwargs) + self.arm_template_id = arm_template_id + self.parameters = parameters + + +class EvaluatePoliciesProperties(Model): + """Properties for evaluating a policy set. + + :param fact_name: The fact name. + :type fact_name: str + :param fact_data: The fact data. + :type fact_data: str + :param value_offset: The value offset. + :type value_offset: str + :param user_object_id: The user for which policies will be evaluated + :type user_object_id: str + """ + + _attribute_map = { + 'fact_name': {'key': 'factName', 'type': 'str'}, + 'fact_data': {'key': 'factData', 'type': 'str'}, + 'value_offset': {'key': 'valueOffset', 'type': 'str'}, + 'user_object_id': {'key': 'userObjectId', 'type': 'str'}, + } + + def __init__(self, *, fact_name: str=None, fact_data: str=None, value_offset: str=None, user_object_id: str=None, **kwargs) -> None: + super(EvaluatePoliciesProperties, self).__init__(**kwargs) + self.fact_name = fact_name + self.fact_data = fact_data + self.value_offset = value_offset + self.user_object_id = user_object_id + + +class EvaluatePoliciesRequest(Model): + """Request body for evaluating a policy set. + + :param policies: Policies to evaluate. + :type policies: + list[~azure.mgmt.devtestlabs.models.EvaluatePoliciesProperties] + """ + + _attribute_map = { + 'policies': {'key': 'policies', 'type': '[EvaluatePoliciesProperties]'}, + } + + def __init__(self, *, policies=None, **kwargs) -> None: + super(EvaluatePoliciesRequest, self).__init__(**kwargs) + self.policies = policies + + +class EvaluatePoliciesResponse(Model): + """Response body for evaluating a policy set. + + :param results: Results of evaluating a policy set. + :type results: list[~azure.mgmt.devtestlabs.models.PolicySetResult] + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': '[PolicySetResult]'}, + } + + def __init__(self, *, results=None, **kwargs) -> None: + super(EvaluatePoliciesResponse, self).__init__(**kwargs) + self.results = results + + +class Event(Model): + """An event to be notified for. + + :param event_name: The event type for which this notification is enabled + (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + } + + def __init__(self, *, event_name=None, **kwargs) -> None: + super(Event, self).__init__(**kwargs) + self.event_name = event_name + + +class EventFragment(Model): + """An event to be notified for. + + :param event_name: The event type for which this notification is enabled + (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + } + + def __init__(self, *, event_name=None, **kwargs) -> None: + super(EventFragment, self).__init__(**kwargs) + self.event_name = event_name + + +class ExportResourceUsageParameters(Model): + """The parameters of the export operation. + + :param blob_storage_absolute_sas_uri: The blob storage absolute sas uri + with write permission to the container which the usage data needs to be + uploaded to. + :type blob_storage_absolute_sas_uri: str + :param usage_start_date: The start time of the usage. If not provided, + usage will be reported since the beginning of data collection. + :type usage_start_date: datetime + """ + + _attribute_map = { + 'blob_storage_absolute_sas_uri': {'key': 'blobStorageAbsoluteSasUri', 'type': 'str'}, + 'usage_start_date': {'key': 'usageStartDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, blob_storage_absolute_sas_uri: str=None, usage_start_date=None, **kwargs) -> None: + super(ExportResourceUsageParameters, self).__init__(**kwargs) + self.blob_storage_absolute_sas_uri = blob_storage_absolute_sas_uri + self.usage_start_date = usage_start_date + + +class ExternalSubnet(Model): + """Subnet information as returned by the Microsoft.Network API. + + :param id: Gets or sets the identifier. + :type id: str + :param name: Gets or sets the name. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: + super(ExternalSubnet, self).__init__(**kwargs) + self.id = id + self.name = name + + +class ExternalSubnetFragment(Model): + """Subnet information as returned by the Microsoft.Network API. + + :param id: Gets or sets the identifier. + :type id: str + :param name: Gets or sets the name. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: + super(ExternalSubnetFragment, self).__init__(**kwargs) + self.id = id + self.name = name + + +class Formula(Resource): + """A formula for creating a VM, specifying an image base and other parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the formula. + :type description: str + :param author: The author of the formula. + :type author: str + :param os_type: The OS type of the formula. + :type os_type: str + :ivar creation_date: The creation date of the formula. + :vartype creation_date: datetime + :param formula_content: The content of the formula. + :type formula_content: + ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameter + :param vm: Information about a VM from which a formula is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVm + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameter'}, + 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVm'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, description: str=None, author: str=None, os_type: str=None, formula_content=None, vm=None, **kwargs) -> None: + super(Formula, self).__init__(location=location, tags=tags, **kwargs) + self.description = description + self.author = author + self.os_type = os_type + self.creation_date = None + self.formula_content = formula_content + self.vm = vm + self.provisioning_state = None + self.unique_identifier = None + + +class FormulaFragment(UpdateResource): + """A formula for creating a VM, specifying an image base and other parameters. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the formula. + :type description: str + :param author: The author of the formula. + :type author: str + :param os_type: The OS type of the formula. + :type os_type: str + :param formula_content: The content of the formula. + :type formula_content: + ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameterFragment + :param vm: Information about a VM from which a formula is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVmFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameterFragment'}, + 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVmFragment'}, + } + + def __init__(self, *, tags=None, description: str=None, author: str=None, os_type: str=None, formula_content=None, vm=None, **kwargs) -> None: + super(FormulaFragment, self).__init__(tags=tags, **kwargs) + self.description = description + self.author = author + self.os_type = os_type + self.formula_content = formula_content + self.vm = vm + + +class FormulaPropertiesFromVm(Model): + """Information about a VM from which a formula is to be created. + + :param lab_vm_id: The identifier of the VM from which a formula is to be + created. + :type lab_vm_id: str + """ + + _attribute_map = { + 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, + } + + def __init__(self, *, lab_vm_id: str=None, **kwargs) -> None: + super(FormulaPropertiesFromVm, self).__init__(**kwargs) + self.lab_vm_id = lab_vm_id + + +class FormulaPropertiesFromVmFragment(Model): + """Information about a VM from which a formula is to be created. + + :param lab_vm_id: The identifier of the VM from which a formula is to be + created. + :type lab_vm_id: str + """ + + _attribute_map = { + 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, + } + + def __init__(self, *, lab_vm_id: str=None, **kwargs) -> None: + super(FormulaPropertiesFromVmFragment, self).__init__(**kwargs) + self.lab_vm_id = lab_vm_id + + +class GalleryImage(Resource): + """A gallery image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param author: The author of the gallery image. + :type author: str + :ivar created_date: The creation date of the gallery image. + :vartype created_date: datetime + :param description: The description of the gallery image. + :type description: str + :param image_reference: The image reference of the gallery image. + :type image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param icon: The icon of the gallery image. + :type icon: str + :param enabled: Indicates whether this gallery image is enabled. + :type enabled: bool + :param plan_id: The third party plan that applies to this image + :type plan_id: str + :param is_plan_authorized: Indicates if the plan has been authorized for + programmatic deployment. + :type is_plan_authorized: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'image_reference': {'key': 'properties.imageReference', 'type': 'GalleryImageReference'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + } + + def __init__(self, *, location: str=None, tags=None, author: str=None, description: str=None, image_reference=None, icon: str=None, enabled: bool=None, plan_id: str=None, is_plan_authorized: bool=None, **kwargs) -> None: + super(GalleryImage, self).__init__(location=location, tags=tags, **kwargs) + self.author = author + self.created_date = None + self.description = description + self.image_reference = image_reference + self.icon = icon + self.enabled = enabled + self.plan_id = plan_id + self.is_plan_authorized = is_plan_authorized + + +class GalleryImageReference(Model): + """The reference information for an Azure Marketplace image. + + :param offer: The offer of the gallery image. + :type offer: str + :param publisher: The publisher of the gallery image. + :type publisher: str + :param sku: The SKU of the gallery image. + :type sku: str + :param os_type: The OS type of the gallery image. + :type os_type: str + :param version: The version of the gallery image. + :type version: str + """ + + _attribute_map = { + 'offer': {'key': 'offer', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, offer: str=None, publisher: str=None, sku: str=None, os_type: str=None, version: str=None, **kwargs) -> None: + super(GalleryImageReference, self).__init__(**kwargs) + self.offer = offer + self.publisher = publisher + self.sku = sku + self.os_type = os_type + self.version = version + + +class GalleryImageReferenceFragment(Model): + """The reference information for an Azure Marketplace image. + + :param offer: The offer of the gallery image. + :type offer: str + :param publisher: The publisher of the gallery image. + :type publisher: str + :param sku: The SKU of the gallery image. + :type sku: str + :param os_type: The OS type of the gallery image. + :type os_type: str + :param version: The version of the gallery image. + :type version: str + """ + + _attribute_map = { + 'offer': {'key': 'offer', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, offer: str=None, publisher: str=None, sku: str=None, os_type: str=None, version: str=None, **kwargs) -> None: + super(GalleryImageReferenceFragment, self).__init__(**kwargs) + self.offer = offer + self.publisher = publisher + self.sku = sku + self.os_type = os_type + self.version = version + + +class GenerateArmTemplateRequest(Model): + """Parameters for generating an ARM template for deploying artifacts. + + :param virtual_machine_name: The resource name of the virtual machine. + :type virtual_machine_name: str + :param parameters: The parameters of the ARM template. + :type parameters: list[~azure.mgmt.devtestlabs.models.ParameterInfo] + :param location: The location of the virtual machine. + :type location: str + :param file_upload_options: Options for uploading the files for the + artifact. UploadFilesAndGenerateSasTokens is the default value. Possible + values include: 'UploadFilesAndGenerateSasTokens', 'None' + :type file_upload_options: str or + ~azure.mgmt.devtestlabs.models.FileUploadOptions + """ + + _attribute_map = { + 'virtual_machine_name': {'key': 'virtualMachineName', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ParameterInfo]'}, + 'location': {'key': 'location', 'type': 'str'}, + 'file_upload_options': {'key': 'fileUploadOptions', 'type': 'str'}, + } + + def __init__(self, *, virtual_machine_name: str=None, parameters=None, location: str=None, file_upload_options=None, **kwargs) -> None: + super(GenerateArmTemplateRequest, self).__init__(**kwargs) + self.virtual_machine_name = virtual_machine_name + self.parameters = parameters + self.location = location + self.file_upload_options = file_upload_options + + +class GenerateUploadUriParameter(Model): + """Properties for generating an upload URI. + + :param blob_name: The blob name of the upload URI. + :type blob_name: str + """ + + _attribute_map = { + 'blob_name': {'key': 'blobName', 'type': 'str'}, + } + + def __init__(self, *, blob_name: str=None, **kwargs) -> None: + super(GenerateUploadUriParameter, self).__init__(**kwargs) + self.blob_name = blob_name + + +class GenerateUploadUriResponse(Model): + """Response body for generating an upload URI. + + :param upload_uri: The upload URI for the VHD. + :type upload_uri: str + """ + + _attribute_map = { + 'upload_uri': {'key': 'uploadUri', 'type': 'str'}, + } + + def __init__(self, *, upload_uri: str=None, **kwargs) -> None: + super(GenerateUploadUriResponse, self).__init__(**kwargs) + self.upload_uri = upload_uri + + +class HourDetails(Model): + """Properties of an hourly schedule. + + :param minute: Minutes of the hour the schedule will run. + :type minute: int + """ + + _attribute_map = { + 'minute': {'key': 'minute', 'type': 'int'}, + } + + def __init__(self, *, minute: int=None, **kwargs) -> None: + super(HourDetails, self).__init__(**kwargs) + self.minute = minute + + +class HourDetailsFragment(Model): + """Properties of an hourly schedule. + + :param minute: Minutes of the hour the schedule will run. + :type minute: int + """ + + _attribute_map = { + 'minute': {'key': 'minute', 'type': 'int'}, + } + + def __init__(self, *, minute: int=None, **kwargs) -> None: + super(HourDetailsFragment, self).__init__(**kwargs) + self.minute = minute + + +class IdentityProperties(Model): + """Properties of a managed identity. + + :param type: Managed identity. + :type type: str + :param principal_id: The principal id of resource identity. + :type principal_id: str + :param tenant_id: The tenant identifier of resource. + :type tenant_id: str + :param client_secret_url: The client secret URL of the identity. + :type client_secret_url: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'client_secret_url': {'key': 'clientSecretUrl', 'type': 'str'}, + } + + def __init__(self, *, type: str=None, principal_id: str=None, tenant_id: str=None, client_secret_url: str=None, **kwargs) -> None: + super(IdentityProperties, self).__init__(**kwargs) + self.type = type + self.principal_id = principal_id + self.tenant_id = tenant_id + self.client_secret_url = client_secret_url + + +class ImportLabVirtualMachineRequest(Model): + """This represents the payload required to import a virtual machine from a + different lab into the current one. + + :param source_virtual_machine_resource_id: The full resource ID of the + virtual machine to be imported. + :type source_virtual_machine_resource_id: str + :param destination_virtual_machine_name: The name of the virtual machine + in the destination lab + :type destination_virtual_machine_name: str + """ + + _attribute_map = { + 'source_virtual_machine_resource_id': {'key': 'sourceVirtualMachineResourceId', 'type': 'str'}, + 'destination_virtual_machine_name': {'key': 'destinationVirtualMachineName', 'type': 'str'}, + } + + def __init__(self, *, source_virtual_machine_resource_id: str=None, destination_virtual_machine_name: str=None, **kwargs) -> None: + super(ImportLabVirtualMachineRequest, self).__init__(**kwargs) + self.source_virtual_machine_resource_id = source_virtual_machine_resource_id + self.destination_virtual_machine_name = destination_virtual_machine_name + + +class InboundNatRule(Model): + """A rule for NAT - exposing a VM's port (backendPort) on the public IP + address using a load balancer. + + :param transport_protocol: The transport protocol for the endpoint. + Possible values include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param frontend_port: The external endpoint port of the inbound + connection. Possible values range between 1 and 65535, inclusive. If + unspecified, a value will be allocated automatically. + :type frontend_port: int + :param backend_port: The port to which the external traffic will be + redirected. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, *, transport_protocol=None, frontend_port: int=None, backend_port: int=None, **kwargs) -> None: + super(InboundNatRule, self).__init__(**kwargs) + self.transport_protocol = transport_protocol + self.frontend_port = frontend_port + self.backend_port = backend_port + + +class InboundNatRuleFragment(Model): + """A rule for NAT - exposing a VM's port (backendPort) on the public IP + address using a load balancer. + + :param transport_protocol: The transport protocol for the endpoint. + Possible values include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param frontend_port: The external endpoint port of the inbound + connection. Possible values range between 1 and 65535, inclusive. If + unspecified, a value will be allocated automatically. + :type frontend_port: int + :param backend_port: The port to which the external traffic will be + redirected. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, *, transport_protocol=None, frontend_port: int=None, backend_port: int=None, **kwargs) -> None: + super(InboundNatRuleFragment, self).__init__(**kwargs) + self.transport_protocol = transport_protocol + self.frontend_port = frontend_port + self.backend_port = backend_port + + +class Lab(Resource): + """A lab. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar default_storage_account: The lab's default storage account. + :vartype default_storage_account: str + :ivar default_premium_storage_account: The lab's default premium storage + account. + :vartype default_premium_storage_account: str + :ivar artifacts_storage_account: The lab's artifact storage account. + :vartype artifacts_storage_account: str + :ivar premium_data_disk_storage_account: The lab's premium data disk + storage account. + :vartype premium_data_disk_storage_account: str + :ivar vault_name: The lab's Key vault. + :vartype vault_name: str + :param lab_storage_type: Type of storage used by the lab. It can be either + Premium or Standard. Default is Premium. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param mandatory_artifacts_resource_ids_linux: The ordered list of + artifact resource IDs that should be applied on all Linux VM creations by + default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_linux: list[str] + :param mandatory_artifacts_resource_ids_windows: The ordered list of + artifact resource IDs that should be applied on all Windows VM creations + by default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_windows: list[str] + :ivar created_date: The creation date of the lab. + :vartype created_date: datetime + :param premium_data_disks: The setting to enable usage of premium data + disks. + When its value is 'Enabled', creation of standard or premium data disks is + allowed. + When its value is 'Disabled', only creation of standard data disks is + allowed. Possible values include: 'Disabled', 'Enabled' + :type premium_data_disks: str or + ~azure.mgmt.devtestlabs.models.PremiumDataDisk + :param environment_permission: The access rights to be granted to the user + when provisioning an environment. Possible values include: 'Reader', + 'Contributor' + :type environment_permission: str or + ~azure.mgmt.devtestlabs.models.EnvironmentPermission + :param announcement: The properties of any lab announcement associated + with this lab + :type announcement: + ~azure.mgmt.devtestlabs.models.LabAnnouncementProperties + :param support: The properties of any lab support message associated with + this lab + :type support: ~azure.mgmt.devtestlabs.models.LabSupportProperties + :ivar vm_creation_resource_group: The resource group in which all new lab + virtual machines will be created. To let DevTest Labs manage resource + group creation, set this value to null. + :vartype vm_creation_resource_group: str + :ivar public_ip_id: The public IP address for the lab's load balancer. + :vartype public_ip_id: str + :ivar load_balancer_id: The load balancer used to for lab VMs that use + shared IP address. + :vartype load_balancer_id: str + :ivar network_security_group_id: The Network Security Group attached to + the lab VMs Network interfaces to restrict open ports. + :vartype network_security_group_id: str + :param extended_properties: Extended properties of the lab used for + experimental features + :type extended_properties: dict[str, str] + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'default_storage_account': {'readonly': True}, + 'default_premium_storage_account': {'readonly': True}, + 'artifacts_storage_account': {'readonly': True}, + 'premium_data_disk_storage_account': {'readonly': True}, + 'vault_name': {'readonly': True}, + 'created_date': {'readonly': True}, + 'vm_creation_resource_group': {'readonly': True}, + 'public_ip_id': {'readonly': True}, + 'load_balancer_id': {'readonly': True}, + 'network_security_group_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'default_storage_account': {'key': 'properties.defaultStorageAccount', 'type': 'str'}, + 'default_premium_storage_account': {'key': 'properties.defaultPremiumStorageAccount', 'type': 'str'}, + 'artifacts_storage_account': {'key': 'properties.artifactsStorageAccount', 'type': 'str'}, + 'premium_data_disk_storage_account': {'key': 'properties.premiumDataDiskStorageAccount', 'type': 'str'}, + 'vault_name': {'key': 'properties.vaultName', 'type': 'str'}, + 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, + 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, + 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, + 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, + 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementProperties'}, + 'support': {'key': 'properties.support', 'type': 'LabSupportProperties'}, + 'vm_creation_resource_group': {'key': 'properties.vmCreationResourceGroup', 'type': 'str'}, + 'public_ip_id': {'key': 'properties.publicIpId', 'type': 'str'}, + 'load_balancer_id': {'key': 'properties.loadBalancerId', 'type': 'str'}, + 'network_security_group_id': {'key': 'properties.networkSecurityGroupId', 'type': 'str'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, lab_storage_type=None, mandatory_artifacts_resource_ids_linux=None, mandatory_artifacts_resource_ids_windows=None, premium_data_disks=None, environment_permission=None, announcement=None, support=None, extended_properties=None, **kwargs) -> None: + super(Lab, self).__init__(location=location, tags=tags, **kwargs) + self.default_storage_account = None + self.default_premium_storage_account = None + self.artifacts_storage_account = None + self.premium_data_disk_storage_account = None + self.vault_name = None + self.lab_storage_type = lab_storage_type + self.mandatory_artifacts_resource_ids_linux = mandatory_artifacts_resource_ids_linux + self.mandatory_artifacts_resource_ids_windows = mandatory_artifacts_resource_ids_windows + self.created_date = None + self.premium_data_disks = premium_data_disks + self.environment_permission = environment_permission + self.announcement = announcement + self.support = support + self.vm_creation_resource_group = None + self.public_ip_id = None + self.load_balancer_id = None + self.network_security_group_id = None + self.extended_properties = extended_properties + self.provisioning_state = None + self.unique_identifier = None + + +class LabAnnouncementProperties(Model): + """Properties of a lab's announcement banner. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param title: The plain text title for the lab announcement + :type title: str + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + :param enabled: Is the lab announcement active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param expiration_date: The time at which the announcement expires (null + for never) + :type expiration_date: datetime + :param expired: Has this announcement expired? + :type expired: bool + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'expired': {'key': 'expired', 'type': 'bool'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, title: str=None, markdown: str=None, enabled=None, expiration_date=None, expired: bool=None, **kwargs) -> None: + super(LabAnnouncementProperties, self).__init__(**kwargs) + self.title = title + self.markdown = markdown + self.enabled = enabled + self.expiration_date = expiration_date + self.expired = expired + self.provisioning_state = None + self.unique_identifier = None + + +class LabAnnouncementPropertiesFragment(Model): + """Properties of a lab's announcement banner. + + :param title: The plain text title for the lab announcement + :type title: str + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + :param enabled: Is the lab announcement active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param expiration_date: The time at which the announcement expires (null + for never) + :type expiration_date: datetime + :param expired: Has this announcement expired? + :type expired: bool + """ + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'expired': {'key': 'expired', 'type': 'bool'}, + } + + def __init__(self, *, title: str=None, markdown: str=None, enabled=None, expiration_date=None, expired: bool=None, **kwargs) -> None: + super(LabAnnouncementPropertiesFragment, self).__init__(**kwargs) + self.title = title + self.markdown = markdown + self.enabled = enabled + self.expiration_date = expiration_date + self.expired = expired + + +class LabCost(Resource): + """A cost item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param target_cost: The target cost properties + :type target_cost: ~azure.mgmt.devtestlabs.models.TargetCostProperties + :ivar lab_cost_summary: The lab cost summary component of the cost data. + :vartype lab_cost_summary: + ~azure.mgmt.devtestlabs.models.LabCostSummaryProperties + :ivar lab_cost_details: The lab cost details component of the cost data. + :vartype lab_cost_details: + list[~azure.mgmt.devtestlabs.models.LabCostDetailsProperties] + :ivar resource_costs: The resource cost component of the cost data. + :vartype resource_costs: + list[~azure.mgmt.devtestlabs.models.LabResourceCostProperties] + :param currency_code: The currency code of the cost. + :type currency_code: str + :param start_date_time: The start time of the cost data. + :type start_date_time: datetime + :param end_date_time: The end time of the cost data. + :type end_date_time: datetime + :param created_date: The creation date of the cost. + :type created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'lab_cost_summary': {'readonly': True}, + 'lab_cost_details': {'readonly': True}, + 'resource_costs': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'target_cost': {'key': 'properties.targetCost', 'type': 'TargetCostProperties'}, + 'lab_cost_summary': {'key': 'properties.labCostSummary', 'type': 'LabCostSummaryProperties'}, + 'lab_cost_details': {'key': 'properties.labCostDetails', 'type': '[LabCostDetailsProperties]'}, + 'resource_costs': {'key': 'properties.resourceCosts', 'type': '[LabResourceCostProperties]'}, + 'currency_code': {'key': 'properties.currencyCode', 'type': 'str'}, + 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, + 'end_date_time': {'key': 'properties.endDateTime', 'type': 'iso-8601'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, target_cost=None, currency_code: str=None, start_date_time=None, end_date_time=None, created_date=None, **kwargs) -> None: + super(LabCost, self).__init__(location=location, tags=tags, **kwargs) + self.target_cost = target_cost + self.lab_cost_summary = None + self.lab_cost_details = None + self.resource_costs = None + self.currency_code = currency_code + self.start_date_time = start_date_time + self.end_date_time = end_date_time + self.created_date = created_date + self.provisioning_state = None + self.unique_identifier = None + + +class LabCostDetailsProperties(Model): + """The properties of a lab cost item. + + :param date_property: The date of the cost item. + :type date_property: datetime + :param cost: The cost component of the cost item. + :type cost: float + :param cost_type: The type of the cost. Possible values include: + 'Unavailable', 'Reported', 'Projected' + :type cost_type: str or ~azure.mgmt.devtestlabs.models.CostType + """ + + _attribute_map = { + 'date_property': {'key': 'date', 'type': 'iso-8601'}, + 'cost': {'key': 'cost', 'type': 'float'}, + 'cost_type': {'key': 'costType', 'type': 'str'}, + } + + def __init__(self, *, date_property=None, cost: float=None, cost_type=None, **kwargs) -> None: + super(LabCostDetailsProperties, self).__init__(**kwargs) + self.date_property = date_property + self.cost = cost + self.cost_type = cost_type + + +class LabCostSummaryProperties(Model): + """The properties of the cost summary. + + :param estimated_lab_cost: The cost component of the cost item. + :type estimated_lab_cost: float + """ + + _attribute_map = { + 'estimated_lab_cost': {'key': 'estimatedLabCost', 'type': 'float'}, + } + + def __init__(self, *, estimated_lab_cost: float=None, **kwargs) -> None: + super(LabCostSummaryProperties, self).__init__(**kwargs) + self.estimated_lab_cost = estimated_lab_cost + + +class LabFragment(UpdateResource): + """A lab. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_storage_type: Type of storage used by the lab. It can be either + Premium or Standard. Default is Premium. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param mandatory_artifacts_resource_ids_linux: The ordered list of + artifact resource IDs that should be applied on all Linux VM creations by + default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_linux: list[str] + :param mandatory_artifacts_resource_ids_windows: The ordered list of + artifact resource IDs that should be applied on all Windows VM creations + by default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_windows: list[str] + :param premium_data_disks: The setting to enable usage of premium data + disks. + When its value is 'Enabled', creation of standard or premium data disks is + allowed. + When its value is 'Disabled', only creation of standard data disks is + allowed. Possible values include: 'Disabled', 'Enabled' + :type premium_data_disks: str or + ~azure.mgmt.devtestlabs.models.PremiumDataDisk + :param environment_permission: The access rights to be granted to the user + when provisioning an environment. Possible values include: 'Reader', + 'Contributor' + :type environment_permission: str or + ~azure.mgmt.devtestlabs.models.EnvironmentPermission + :param announcement: The properties of any lab announcement associated + with this lab + :type announcement: + ~azure.mgmt.devtestlabs.models.LabAnnouncementPropertiesFragment + :param support: The properties of any lab support message associated with + this lab + :type support: ~azure.mgmt.devtestlabs.models.LabSupportPropertiesFragment + :param extended_properties: Extended properties of the lab used for + experimental features + :type extended_properties: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, + 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, + 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, + 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, + 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, + 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementPropertiesFragment'}, + 'support': {'key': 'properties.support', 'type': 'LabSupportPropertiesFragment'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, lab_storage_type=None, mandatory_artifacts_resource_ids_linux=None, mandatory_artifacts_resource_ids_windows=None, premium_data_disks=None, environment_permission=None, announcement=None, support=None, extended_properties=None, **kwargs) -> None: + super(LabFragment, self).__init__(tags=tags, **kwargs) + self.lab_storage_type = lab_storage_type + self.mandatory_artifacts_resource_ids_linux = mandatory_artifacts_resource_ids_linux + self.mandatory_artifacts_resource_ids_windows = mandatory_artifacts_resource_ids_windows + self.premium_data_disks = premium_data_disks + self.environment_permission = environment_permission + self.announcement = announcement + self.support = support + self.extended_properties = extended_properties + + +class LabResourceCostProperties(Model): + """The properties of a resource cost item. + + :param resourcename: The name of the resource. + :type resourcename: str + :param resource_uid: The unique identifier of the resource. + :type resource_uid: str + :param resource_cost: The cost component of the resource cost item. + :type resource_cost: float + :param resource_type: The logical resource type (ex. virtualmachine, + storageaccount) + :type resource_type: str + :param resource_owner: The owner of the resource (ex. + janedoe@microsoft.com) + :type resource_owner: str + :param resource_pricing_tier: The category of the resource (ex. + Premium_LRS, Standard_DS1) + :type resource_pricing_tier: str + :param resource_status: The status of the resource (ex. Active) + :type resource_status: str + :param resource_id: The ID of the resource + :type resource_id: str + :param external_resource_id: The ID of the external resource + :type external_resource_id: str + """ + + _attribute_map = { + 'resourcename': {'key': 'resourcename', 'type': 'str'}, + 'resource_uid': {'key': 'resourceUId', 'type': 'str'}, + 'resource_cost': {'key': 'resourceCost', 'type': 'float'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_owner': {'key': 'resourceOwner', 'type': 'str'}, + 'resource_pricing_tier': {'key': 'resourcePricingTier', 'type': 'str'}, + 'resource_status': {'key': 'resourceStatus', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'external_resource_id': {'key': 'externalResourceId', 'type': 'str'}, + } + + def __init__(self, *, resourcename: str=None, resource_uid: str=None, resource_cost: float=None, resource_type: str=None, resource_owner: str=None, resource_pricing_tier: str=None, resource_status: str=None, resource_id: str=None, external_resource_id: str=None, **kwargs) -> None: + super(LabResourceCostProperties, self).__init__(**kwargs) + self.resourcename = resourcename + self.resource_uid = resource_uid + self.resource_cost = resource_cost + self.resource_type = resource_type + self.resource_owner = resource_owner + self.resource_pricing_tier = resource_pricing_tier + self.resource_status = resource_status + self.resource_id = resource_id + self.external_resource_id = external_resource_id + + +class LabSupportProperties(Model): + """Properties of a lab's support banner. + + :param enabled: Is the lab support banner active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + } + + def __init__(self, *, enabled=None, markdown: str=None, **kwargs) -> None: + super(LabSupportProperties, self).__init__(**kwargs) + self.enabled = enabled + self.markdown = markdown + + +class LabSupportPropertiesFragment(Model): + """Properties of a lab's support banner. + + :param enabled: Is the lab support banner active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + } + + def __init__(self, *, enabled=None, markdown: str=None, **kwargs) -> None: + super(LabSupportPropertiesFragment, self).__init__(**kwargs) + self.enabled = enabled + self.markdown = markdown + + +class LabVhd(Model): + """Properties of a VHD in the lab. + + :param id: The URI to the VHD. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(LabVhd, self).__init__(**kwargs) + self.id = id + + +class LabVirtualMachine(Resource): + """A virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :ivar compute_vm: The compute virtual machine properties. + :vartype compute_vm: ~azure.mgmt.devtestlabs.models.ComputeVmProperties + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties + :ivar applicable_schedule: The applicable schedule for the virtual + machine. + :vartype applicable_schedule: + ~azure.mgmt.devtestlabs.models.ApplicableSchedule + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskProperties] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'compute_vm': {'readonly': True}, + 'applicable_schedule': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'compute_vm': {'key': 'properties.computeVm', 'type': 'ComputeVmProperties'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, + 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, **kwargs) -> None: + super(LabVirtualMachine, self).__init__(location=location, tags=tags, **kwargs) + self.notes = notes + self.owner_object_id = owner_object_id + self.owner_user_principal_name = owner_user_principal_name + self.created_by_user_id = created_by_user_id + self.created_by_user = created_by_user + self.created_date = created_date + self.compute_id = compute_id + self.custom_image_id = custom_image_id + self.os_type = os_type + self.size = size + self.user_name = user_name + self.password = password + self.ssh_key = ssh_key + self.is_authentication_with_ssh_key = is_authentication_with_ssh_key + self.fqdn = fqdn + self.lab_subnet_name = lab_subnet_name + self.lab_virtual_network_id = lab_virtual_network_id + self.disallow_public_ip_address = disallow_public_ip_address + self.artifacts = artifacts + self.artifact_deployment_status = artifact_deployment_status + self.gallery_image_reference = gallery_image_reference + self.plan_id = plan_id + self.compute_vm = None + self.network_interface = network_interface + self.applicable_schedule = None + self.expiration_date = expiration_date + self.allow_claim = allow_claim + self.storage_type = storage_type + self.virtual_machine_creation_source = virtual_machine_creation_source + self.environment_id = environment_id + self.data_disk_parameters = data_disk_parameters + self.schedule_parameters = schedule_parameters + self.last_known_power_state = last_known_power_state + self.provisioning_state = None + self.unique_identifier = None + + +class LabVirtualMachineCreationParameter(Model): + """Properties for creating a virtual machine. + + :param bulk_creation_parameters: The number of virtual machine instances + to create. + :type bulk_creation_parameters: + ~azure.mgmt.devtestlabs.models.BulkCreationParameters + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskProperties] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParameters'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, bulk_creation_parameters=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(LabVirtualMachineCreationParameter, self).__init__(**kwargs) + self.bulk_creation_parameters = bulk_creation_parameters + self.notes = notes + self.owner_object_id = owner_object_id + self.owner_user_principal_name = owner_user_principal_name + self.created_by_user_id = created_by_user_id + self.created_by_user = created_by_user + self.created_date = created_date + self.compute_id = compute_id + self.custom_image_id = custom_image_id + self.os_type = os_type + self.size = size + self.user_name = user_name + self.password = password + self.ssh_key = ssh_key + self.is_authentication_with_ssh_key = is_authentication_with_ssh_key + self.fqdn = fqdn + self.lab_subnet_name = lab_subnet_name + self.lab_virtual_network_id = lab_virtual_network_id + self.disallow_public_ip_address = disallow_public_ip_address + self.artifacts = artifacts + self.artifact_deployment_status = artifact_deployment_status + self.gallery_image_reference = gallery_image_reference + self.plan_id = plan_id + self.network_interface = network_interface + self.expiration_date = expiration_date + self.allow_claim = allow_claim + self.storage_type = storage_type + self.virtual_machine_creation_source = virtual_machine_creation_source + self.environment_id = environment_id + self.data_disk_parameters = data_disk_parameters + self.schedule_parameters = schedule_parameters + self.last_known_power_state = last_known_power_state + self.name = name + self.location = location + self.tags = tags + + +class LabVirtualMachineCreationParameterFragment(Model): + """Properties for creating a virtual machine. + + :param bulk_creation_parameters: The number of virtual machine instances + to create. + :type bulk_creation_parameters: + ~azure.mgmt.devtestlabs.models.BulkCreationParametersFragment + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParametersFragment'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, bulk_creation_parameters=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(LabVirtualMachineCreationParameterFragment, self).__init__(**kwargs) + self.bulk_creation_parameters = bulk_creation_parameters + self.notes = notes + self.owner_object_id = owner_object_id + self.owner_user_principal_name = owner_user_principal_name + self.created_by_user_id = created_by_user_id + self.created_by_user = created_by_user + self.created_date = created_date + self.compute_id = compute_id + self.custom_image_id = custom_image_id + self.os_type = os_type + self.size = size + self.user_name = user_name + self.password = password + self.ssh_key = ssh_key + self.is_authentication_with_ssh_key = is_authentication_with_ssh_key + self.fqdn = fqdn + self.lab_subnet_name = lab_subnet_name + self.lab_virtual_network_id = lab_virtual_network_id + self.disallow_public_ip_address = disallow_public_ip_address + self.artifacts = artifacts + self.artifact_deployment_status = artifact_deployment_status + self.gallery_image_reference = gallery_image_reference + self.plan_id = plan_id + self.network_interface = network_interface + self.expiration_date = expiration_date + self.allow_claim = allow_claim + self.storage_type = storage_type + self.virtual_machine_creation_source = virtual_machine_creation_source + self.environment_id = environment_id + self.data_disk_parameters = data_disk_parameters + self.schedule_parameters = schedule_parameters + self.last_known_power_state = last_known_power_state + self.name = name + self.location = location + self.tags = tags + + +class LabVirtualMachineFragment(UpdateResource): + """A virtual machine. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + } + + def __init__(self, *, tags=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, **kwargs) -> None: + super(LabVirtualMachineFragment, self).__init__(tags=tags, **kwargs) + self.notes = notes + self.owner_object_id = owner_object_id + self.owner_user_principal_name = owner_user_principal_name + self.created_by_user_id = created_by_user_id + self.created_by_user = created_by_user + self.created_date = created_date + self.compute_id = compute_id + self.custom_image_id = custom_image_id + self.os_type = os_type + self.size = size + self.user_name = user_name + self.password = password + self.ssh_key = ssh_key + self.is_authentication_with_ssh_key = is_authentication_with_ssh_key + self.fqdn = fqdn + self.lab_subnet_name = lab_subnet_name + self.lab_virtual_network_id = lab_virtual_network_id + self.disallow_public_ip_address = disallow_public_ip_address + self.artifacts = artifacts + self.artifact_deployment_status = artifact_deployment_status + self.gallery_image_reference = gallery_image_reference + self.plan_id = plan_id + self.network_interface = network_interface + self.expiration_date = expiration_date + self.allow_claim = allow_claim + self.storage_type = storage_type + self.virtual_machine_creation_source = virtual_machine_creation_source + self.environment_id = environment_id + self.data_disk_parameters = data_disk_parameters + self.schedule_parameters = schedule_parameters + self.last_known_power_state = last_known_power_state + + +class LinuxOsInfo(Model): + """Information about a Linux OS. + + :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, + DeprovisionRequested, DeprovisionApplied). Possible values include: + 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' + :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState + """ + + _attribute_map = { + 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, + } + + def __init__(self, *, linux_os_state=None, **kwargs) -> None: + super(LinuxOsInfo, self).__init__(**kwargs) + self.linux_os_state = linux_os_state + + +class LinuxOsInfoFragment(Model): + """Information about a Linux OS. + + :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, + DeprovisionRequested, DeprovisionApplied). Possible values include: + 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' + :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState + """ + + _attribute_map = { + 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, + } + + def __init__(self, *, linux_os_state=None, **kwargs) -> None: + super(LinuxOsInfoFragment, self).__init__(**kwargs) + self.linux_os_state = linux_os_state + + +class NetworkInterfaceProperties(Model): + """Properties of a network interface. + + :param virtual_network_id: The resource ID of the virtual network. + :type virtual_network_id: str + :param subnet_id: The resource ID of the sub net. + :type subnet_id: str + :param public_ip_address_id: The resource ID of the public IP address. + :type public_ip_address_id: str + :param public_ip_address: The public IP address. + :type public_ip_address: str + :param private_ip_address: The private IP address. + :type private_ip_address: str + :param dns_name: The DNS name. + :type dns_name: str + :param rdp_authority: The RdpAuthority property is a server DNS host name + or IP address followed by the service port number for RDP (Remote Desktop + Protocol). + :type rdp_authority: str + :param ssh_authority: The SshAuthority property is a server DNS host name + or IP address followed by the service port number for SSH. + :type ssh_authority: str + :param shared_public_ip_address_configuration: The configuration for + sharing a public IP address across multiple virtual machines. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfiguration + """ + + _attribute_map = { + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, + 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfiguration'}, + } + + def __init__(self, *, virtual_network_id: str=None, subnet_id: str=None, public_ip_address_id: str=None, public_ip_address: str=None, private_ip_address: str=None, dns_name: str=None, rdp_authority: str=None, ssh_authority: str=None, shared_public_ip_address_configuration=None, **kwargs) -> None: + super(NetworkInterfaceProperties, self).__init__(**kwargs) + self.virtual_network_id = virtual_network_id + self.subnet_id = subnet_id + self.public_ip_address_id = public_ip_address_id + self.public_ip_address = public_ip_address + self.private_ip_address = private_ip_address + self.dns_name = dns_name + self.rdp_authority = rdp_authority + self.ssh_authority = ssh_authority + self.shared_public_ip_address_configuration = shared_public_ip_address_configuration + + +class NetworkInterfacePropertiesFragment(Model): + """Properties of a network interface. + + :param virtual_network_id: The resource ID of the virtual network. + :type virtual_network_id: str + :param subnet_id: The resource ID of the sub net. + :type subnet_id: str + :param public_ip_address_id: The resource ID of the public IP address. + :type public_ip_address_id: str + :param public_ip_address: The public IP address. + :type public_ip_address: str + :param private_ip_address: The private IP address. + :type private_ip_address: str + :param dns_name: The DNS name. + :type dns_name: str + :param rdp_authority: The RdpAuthority property is a server DNS host name + or IP address followed by the service port number for RDP (Remote Desktop + Protocol). + :type rdp_authority: str + :param ssh_authority: The SshAuthority property is a server DNS host name + or IP address followed by the service port number for SSH. + :type ssh_authority: str + :param shared_public_ip_address_configuration: The configuration for + sharing a public IP address across multiple virtual machines. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfigurationFragment + """ + + _attribute_map = { + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, + 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfigurationFragment'}, + } + + def __init__(self, *, virtual_network_id: str=None, subnet_id: str=None, public_ip_address_id: str=None, public_ip_address: str=None, private_ip_address: str=None, dns_name: str=None, rdp_authority: str=None, ssh_authority: str=None, shared_public_ip_address_configuration=None, **kwargs) -> None: + super(NetworkInterfacePropertiesFragment, self).__init__(**kwargs) + self.virtual_network_id = virtual_network_id + self.subnet_id = subnet_id + self.public_ip_address_id = public_ip_address_id + self.public_ip_address = public_ip_address + self.private_ip_address = private_ip_address + self.dns_name = dns_name + self.rdp_authority = rdp_authority + self.ssh_authority = ssh_authority + self.shared_public_ip_address_configuration = shared_public_ip_address_configuration + + +class NotificationChannel(Resource): + """A notification. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param web_hook_url: The webhook URL to send notifications to. + :type web_hook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + :param description: Description of notification. + :type description: str + :param events: The list of event for which this notification is enabled. + :type events: list[~azure.mgmt.devtestlabs.models.Event] + :ivar created_date: The creation date of the notification channel. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'events': {'key': 'properties.events', 'type': '[Event]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, web_hook_url: str=None, email_recipient: str=None, notification_locale: str=None, description: str=None, events=None, **kwargs) -> None: + super(NotificationChannel, self).__init__(location=location, tags=tags, **kwargs) + self.web_hook_url = web_hook_url + self.email_recipient = email_recipient + self.notification_locale = notification_locale + self.description = description + self.events = events + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class NotificationChannelFragment(UpdateResource): + """A notification. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param web_hook_url: The webhook URL to send notifications to. + :type web_hook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + :param description: Description of notification. + :type description: str + :param events: The list of event for which this notification is enabled. + :type events: list[~azure.mgmt.devtestlabs.models.EventFragment] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'events': {'key': 'properties.events', 'type': '[EventFragment]'}, + } + + def __init__(self, *, tags=None, web_hook_url: str=None, email_recipient: str=None, notification_locale: str=None, description: str=None, events=None, **kwargs) -> None: + super(NotificationChannelFragment, self).__init__(tags=tags, **kwargs) + self.web_hook_url = web_hook_url + self.email_recipient = email_recipient + self.notification_locale = notification_locale + self.description = description + self.events = events + + +class NotificationSettings(Model): + """Notification settings for a schedule. + + :param status: If notifications are enabled for this schedule (i.e. + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param time_in_minutes: Time in minutes before event at which notification + will be sent. + :type time_in_minutes: int + :param webhook_url: The webhook URL to which the notification will be + sent. + :type webhook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, + 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, + } + + def __init__(self, *, status=None, time_in_minutes: int=None, webhook_url: str=None, email_recipient: str=None, notification_locale: str=None, **kwargs) -> None: + super(NotificationSettings, self).__init__(**kwargs) + self.status = status + self.time_in_minutes = time_in_minutes + self.webhook_url = webhook_url + self.email_recipient = email_recipient + self.notification_locale = notification_locale + + +class NotificationSettingsFragment(Model): + """Notification settings for a schedule. + + :param status: If notifications are enabled for this schedule (i.e. + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param time_in_minutes: Time in minutes before event at which notification + will be sent. + :type time_in_minutes: int + :param webhook_url: The webhook URL to which the notification will be + sent. + :type webhook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, + 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, + } + + def __init__(self, *, status=None, time_in_minutes: int=None, webhook_url: str=None, email_recipient: str=None, notification_locale: str=None, **kwargs) -> None: + super(NotificationSettingsFragment, self).__init__(**kwargs) + self.status = status + self.time_in_minutes = time_in_minutes + self.webhook_url = webhook_url + self.email_recipient = email_recipient + self.notification_locale = notification_locale + + +class NotifyParameters(Model): + """Properties for generating a Notification. + + :param event_name: The type of event (i.e. AutoShutdown, Cost). Possible + values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + :param json_payload: Properties for the notification in json format. + :type json_payload: str + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + 'json_payload': {'key': 'jsonPayload', 'type': 'str'}, + } + + def __init__(self, *, event_name=None, json_payload: str=None, **kwargs) -> None: + super(NotifyParameters, self).__init__(**kwargs) + self.event_name = event_name + self.json_payload = json_payload + + +class OperationError(Model): + """Error details for the operation in case of a failure. + + :param code: The error code of the operation error. + :type code: str + :param message: The error message of the operation error. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(OperationError, self).__init__(**kwargs) + self.code = code + self.message = message + + +class OperationMetadata(Model): + """The REST API operation supported by DevTestLab ResourceProvider. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that describes the operations + :type display: ~azure.mgmt.devtestlabs.models.OperationMetadataDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationMetadataDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(OperationMetadata, self).__init__(**kwargs) + self.name = name + self.display = display + + +class OperationMetadataDisplay(Model): + """The object that describes the operations. + + :param provider: Friendly name of the resource provider + :type provider: str + :param resource: Resource type on which the operation is performed. + :type resource: str + :param operation: Operation type: read, write, delete, listKeys/action, + etc. + :type operation: str + :param description: Friendly name of the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationMetadataDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class OperationResult(Model): + """An Operation Result. + + :param status: The operation status. + :type status: str + :param status_code: The status code for the operation. Possible values + include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', + 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', + 'PartialContent', 'MultipleChoices', 'MovedPermanently', 'Redirect', + 'SeeOther', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', + 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', + 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', + 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', + 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', + 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', + 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', + 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', + 'HttpVersionNotSupported' + :type status_code: str or ~azure.mgmt.devtestlabs.models.HttpStatusCode + :param error: Error details for the operation in case of a failure. + :type error: ~azure.mgmt.devtestlabs.models.OperationError + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'OperationError'}, + } + + def __init__(self, *, status: str=None, status_code=None, error=None, **kwargs) -> None: + super(OperationResult, self).__init__(**kwargs) + self.status = status + self.status_code = status_code + self.error = error + + +class ParameterInfo(Model): + """Information about an artifact's parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ParameterInfo, self).__init__(**kwargs) + self.name = name + self.value = value + + +class ParametersValueFileInfo(Model): + """A file containing a set of parameter values for an ARM template. + + :param file_name: File name. + :type file_name: str + :param parameters_value_info: Contents of the file. + :type parameters_value_info: object + """ + + _attribute_map = { + 'file_name': {'key': 'fileName', 'type': 'str'}, + 'parameters_value_info': {'key': 'parametersValueInfo', 'type': 'object'}, + } + + def __init__(self, *, file_name: str=None, parameters_value_info=None, **kwargs) -> None: + super(ParametersValueFileInfo, self).__init__(**kwargs) + self.file_name = file_name + self.parameters_value_info = parameters_value_info + + +class PercentageCostThresholdProperties(Model): + """Properties of a percentage cost threshold. + + :param threshold_value: The cost threshold value. + :type threshold_value: float + """ + + _attribute_map = { + 'threshold_value': {'key': 'thresholdValue', 'type': 'float'}, + } + + def __init__(self, *, threshold_value: float=None, **kwargs) -> None: + super(PercentageCostThresholdProperties, self).__init__(**kwargs) + self.threshold_value = threshold_value + + +class Policy(Resource): + """A Policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the policy. + :type description: str + :param status: The status of the policy. Possible values include: + 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus + :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, + MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', + 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', + 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', + 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' + :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName + :param fact_data: The fact data of the policy. + :type fact_data: str + :param threshold: The threshold of the policy (i.e. a number for + MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). + :type threshold: str + :param evaluator_type: The evaluator type of the policy (i.e. + AllowedValuesPolicy, MaxValuePolicy). Possible values include: + 'AllowedValuesPolicy', 'MaxValuePolicy' + :type evaluator_type: str or + ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType + :ivar created_date: The creation date of the policy. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'fact_name': {'key': 'properties.factName', 'type': 'str'}, + 'fact_data': {'key': 'properties.factData', 'type': 'str'}, + 'threshold': {'key': 'properties.threshold', 'type': 'str'}, + 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, description: str=None, status=None, fact_name=None, fact_data: str=None, threshold: str=None, evaluator_type=None, **kwargs) -> None: + super(Policy, self).__init__(location=location, tags=tags, **kwargs) + self.description = description + self.status = status + self.fact_name = fact_name + self.fact_data = fact_data + self.threshold = threshold + self.evaluator_type = evaluator_type + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class PolicyFragment(UpdateResource): + """A Policy. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the policy. + :type description: str + :param status: The status of the policy. Possible values include: + 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus + :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, + MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', + 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', + 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', + 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' + :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName + :param fact_data: The fact data of the policy. + :type fact_data: str + :param threshold: The threshold of the policy (i.e. a number for + MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). + :type threshold: str + :param evaluator_type: The evaluator type of the policy (i.e. + AllowedValuesPolicy, MaxValuePolicy). Possible values include: + 'AllowedValuesPolicy', 'MaxValuePolicy' + :type evaluator_type: str or + ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'fact_name': {'key': 'properties.factName', 'type': 'str'}, + 'fact_data': {'key': 'properties.factData', 'type': 'str'}, + 'threshold': {'key': 'properties.threshold', 'type': 'str'}, + 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, + } + + def __init__(self, *, tags=None, description: str=None, status=None, fact_name=None, fact_data: str=None, threshold: str=None, evaluator_type=None, **kwargs) -> None: + super(PolicyFragment, self).__init__(tags=tags, **kwargs) + self.description = description + self.status = status + self.fact_name = fact_name + self.fact_data = fact_data + self.threshold = threshold + self.evaluator_type = evaluator_type + + +class PolicySetResult(Model): + """Result of a policy set evaluation. + + :param has_error: A value indicating whether this policy set evaluation + has discovered violations. + :type has_error: bool + :param policy_violations: The list of policy violations. + :type policy_violations: + list[~azure.mgmt.devtestlabs.models.PolicyViolation] + """ + + _attribute_map = { + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'policy_violations': {'key': 'policyViolations', 'type': '[PolicyViolation]'}, + } + + def __init__(self, *, has_error: bool=None, policy_violations=None, **kwargs) -> None: + super(PolicySetResult, self).__init__(**kwargs) + self.has_error = has_error + self.policy_violations = policy_violations + + +class PolicyViolation(Model): + """Policy violation. + + :param code: The code of the policy violation. + :type code: str + :param message: The message of the policy violation. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(PolicyViolation, self).__init__(**kwargs) + self.code = code + self.message = message + + +class Port(Model): + """Properties of a network port. + + :param transport_protocol: Protocol type of the port. Possible values + include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param backend_port: Backend port of the target virtual machine. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, *, transport_protocol=None, backend_port: int=None, **kwargs) -> None: + super(Port, self).__init__(**kwargs) + self.transport_protocol = transport_protocol + self.backend_port = backend_port + + +class PortFragment(Model): + """Properties of a network port. + + :param transport_protocol: Protocol type of the port. Possible values + include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param backend_port: Backend port of the target virtual machine. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, *, transport_protocol=None, backend_port: int=None, **kwargs) -> None: + super(PortFragment, self).__init__(**kwargs) + self.transport_protocol = transport_protocol + self.backend_port = backend_port + + +class RdpConnection(Model): + """Represents a .rdp file. + + :param contents: The contents of the .rdp file + :type contents: str + """ + + _attribute_map = { + 'contents': {'key': 'contents', 'type': 'str'}, + } + + def __init__(self, *, contents: str=None, **kwargs) -> None: + super(RdpConnection, self).__init__(**kwargs) + self.contents = contents + + +class ResizeLabVirtualMachineProperties(Model): + """Request body for resizing a virtual machine. + + :param size: Specifies the size of the virtual machine. + :type size: str + """ + + _attribute_map = { + 'size': {'key': 'size', 'type': 'str'}, + } + + def __init__(self, *, size: str=None, **kwargs) -> None: + super(ResizeLabVirtualMachineProperties, self).__init__(**kwargs) + self.size = size + + +class RetargetScheduleProperties(Model): + """Properties for retargeting a virtual machine schedule. + + :param current_resource_id: The resource Id of the virtual machine on + which the schedule operates + :type current_resource_id: str + :param target_resource_id: The resource Id of the virtual machine that the + schedule should be retargeted to + :type target_resource_id: str + """ + + _attribute_map = { + 'current_resource_id': {'key': 'currentResourceId', 'type': 'str'}, + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + } + + def __init__(self, *, current_resource_id: str=None, target_resource_id: str=None, **kwargs) -> None: + super(RetargetScheduleProperties, self).__init__(**kwargs) + self.current_resource_id = current_resource_id + self.target_resource_id = target_resource_id + + +class Schedule(Resource): + """A schedule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettings + :ivar created_date: The creation date of the schedule. + :vartype created_date: datetime + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, **kwargs) -> None: + super(Schedule, self).__init__(location=location, tags=tags, **kwargs) + self.status = status + self.task_type = task_type + self.weekly_recurrence = weekly_recurrence + self.daily_recurrence = daily_recurrence + self.hourly_recurrence = hourly_recurrence + self.time_zone_id = time_zone_id + self.notification_settings = notification_settings + self.created_date = None + self.target_resource_id = target_resource_id + self.provisioning_state = None + self.unique_identifier = None + + +class ScheduleCreationParameter(Model): + """Properties for creating a schedule. + + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettings + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(ScheduleCreationParameter, self).__init__(**kwargs) + self.status = status + self.task_type = task_type + self.weekly_recurrence = weekly_recurrence + self.daily_recurrence = daily_recurrence + self.hourly_recurrence = hourly_recurrence + self.time_zone_id = time_zone_id + self.notification_settings = notification_settings + self.target_resource_id = target_resource_id + self.name = name + self.location = location + self.tags = tags + + +class ScheduleCreationParameterFragment(Model): + """Properties for creating a schedule. + + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: + ~azure.mgmt.devtestlabs.models.WeekDetailsFragment + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: + ~azure.mgmt.devtestlabs.models.HourDetailsFragment + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(ScheduleCreationParameterFragment, self).__init__(**kwargs) + self.status = status + self.task_type = task_type + self.weekly_recurrence = weekly_recurrence + self.daily_recurrence = daily_recurrence + self.hourly_recurrence = hourly_recurrence + self.time_zone_id = time_zone_id + self.notification_settings = notification_settings + self.target_resource_id = target_resource_id + self.name = name + self.location = location + self.tags = tags + + +class ScheduleFragment(UpdateResource): + """A schedule. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: + ~azure.mgmt.devtestlabs.models.WeekDetailsFragment + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: + ~azure.mgmt.devtestlabs.models.HourDetailsFragment + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + } + + def __init__(self, *, tags=None, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, **kwargs) -> None: + super(ScheduleFragment, self).__init__(tags=tags, **kwargs) + self.status = status + self.task_type = task_type + self.weekly_recurrence = weekly_recurrence + self.daily_recurrence = daily_recurrence + self.hourly_recurrence = hourly_recurrence + self.time_zone_id = time_zone_id + self.notification_settings = notification_settings + self.target_resource_id = target_resource_id + + +class Secret(Resource): + """A secret. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param value: The value of the secret for secret creation. + :type value: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, value: str=None, **kwargs) -> None: + super(Secret, self).__init__(location=location, tags=tags, **kwargs) + self.value = value + self.provisioning_state = None + self.unique_identifier = None + + +class SecretFragment(UpdateResource): + """A secret. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param value: The value of the secret for secret creation. + :type value: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + } + + def __init__(self, *, tags=None, value: str=None, **kwargs) -> None: + super(SecretFragment, self).__init__(tags=tags, **kwargs) + self.value = value + + +class ServiceFabric(Resource): + """A Service Fabric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param external_service_fabric_id: The backing service fabric resource's + id + :type external_service_fabric_id: str + :param environment_id: The resource id of the environment under which the + service fabric resource is present + :type environment_id: str + :ivar applicable_schedule: The applicable schedule for the virtual + machine. + :vartype applicable_schedule: + ~azure.mgmt.devtestlabs.models.ApplicableSchedule + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'applicable_schedule': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, external_service_fabric_id: str=None, environment_id: str=None, **kwargs) -> None: + super(ServiceFabric, self).__init__(location=location, tags=tags, **kwargs) + self.external_service_fabric_id = external_service_fabric_id + self.environment_id = environment_id + self.applicable_schedule = None + self.provisioning_state = None + self.unique_identifier = None + + +class ServiceFabricFragment(UpdateResource): + """A Service Fabric. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param external_service_fabric_id: The backing service fabric resource's + id + :type external_service_fabric_id: str + :param environment_id: The resource id of the environment under which the + service fabric resource is present + :type environment_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + } + + def __init__(self, *, tags=None, external_service_fabric_id: str=None, environment_id: str=None, **kwargs) -> None: + super(ServiceFabricFragment, self).__init__(tags=tags, **kwargs) + self.external_service_fabric_id = external_service_fabric_id + self.environment_id = environment_id + + +class ServiceRunner(Resource): + """A container for a managed identity to execute DevTest lab services. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.devtestlabs.models.IdentityProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, + } + + def __init__(self, *, location: str=None, tags=None, identity=None, **kwargs) -> None: + super(ServiceRunner, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity + + +class SharedPublicIpAddressConfiguration(Model): + """Properties of a virtual machine that determine how it is connected to a + load balancer. + + :param inbound_nat_rules: The incoming NAT rules + :type inbound_nat_rules: + list[~azure.mgmt.devtestlabs.models.InboundNatRule] + """ + + _attribute_map = { + 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRule]'}, + } + + def __init__(self, *, inbound_nat_rules=None, **kwargs) -> None: + super(SharedPublicIpAddressConfiguration, self).__init__(**kwargs) + self.inbound_nat_rules = inbound_nat_rules + + +class SharedPublicIpAddressConfigurationFragment(Model): + """Properties of a virtual machine that determine how it is connected to a + load balancer. + + :param inbound_nat_rules: The incoming NAT rules + :type inbound_nat_rules: + list[~azure.mgmt.devtestlabs.models.InboundNatRuleFragment] + """ + + _attribute_map = { + 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRuleFragment]'}, + } + + def __init__(self, *, inbound_nat_rules=None, **kwargs) -> None: + super(SharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) + self.inbound_nat_rules = inbound_nat_rules + + +class ShutdownNotificationContent(Model): + """The contents of a shutdown notification. Webhooks can use this type to + deserialize the request body when they get notified of an imminent + shutdown. + + :param skip_url: The URL to skip auto-shutdown. + :type skip_url: str + :param delay_url60: The URL to delay shutdown by 60 minutes. + :type delay_url60: str + :param delay_url120: The URL to delay shutdown by 2 hours. + :type delay_url120: str + :param vm_name: The virtual machine to be shut down. + :type vm_name: str + :param guid: The GUID for the virtual machine to be shut down. + :type guid: str + :param owner: The owner of the virtual machine. + :type owner: str + :param vm_url: The URL of the virtual machine. + :type vm_url: str + :param minutes_until_shutdown: Minutes remaining until shutdown + :type minutes_until_shutdown: str + :param event_type: The event for which a notification will be sent. + :type event_type: str + :param text: The text for the notification. + :type text: str + :param subscription_id: The subscription ID for the schedule. + :type subscription_id: str + :param resource_group_name: The resource group name for the schedule. + :type resource_group_name: str + :param lab_name: The lab for the schedule. + :type lab_name: str + """ + + _attribute_map = { + 'skip_url': {'key': 'skipUrl', 'type': 'str'}, + 'delay_url60': {'key': 'delayUrl60', 'type': 'str'}, + 'delay_url120': {'key': 'delayUrl120', 'type': 'str'}, + 'vm_name': {'key': 'vmName', 'type': 'str'}, + 'guid': {'key': 'guid', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'str'}, + 'vm_url': {'key': 'vmUrl', 'type': 'str'}, + 'minutes_until_shutdown': {'key': 'minutesUntilShutdown', 'type': 'str'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'lab_name': {'key': 'labName', 'type': 'str'}, + } + + def __init__(self, *, skip_url: str=None, delay_url60: str=None, delay_url120: str=None, vm_name: str=None, guid: str=None, owner: str=None, vm_url: str=None, minutes_until_shutdown: str=None, event_type: str=None, text: str=None, subscription_id: str=None, resource_group_name: str=None, lab_name: str=None, **kwargs) -> None: + super(ShutdownNotificationContent, self).__init__(**kwargs) + self.skip_url = skip_url + self.delay_url60 = delay_url60 + self.delay_url120 = delay_url120 + self.vm_name = vm_name + self.guid = guid + self.owner = owner + self.vm_url = vm_url + self.minutes_until_shutdown = minutes_until_shutdown + self.event_type = event_type + self.text = text + self.subscription_id = subscription_id + self.resource_group_name = resource_group_name + self.lab_name = lab_name + + +class Subnet(Model): + """Subnet information. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name of the subnet as seen in the lab. + :type lab_subnet_name: str + :param allow_public_ip: The permission policy of the subnet for allowing + public IP addresses (i.e. Allow, Deny)). Possible values include: + 'Default', 'Deny', 'Allow' + :type allow_public_ip: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, allow_public_ip=None, **kwargs) -> None: + super(Subnet, self).__init__(**kwargs) + self.resource_id = resource_id + self.lab_subnet_name = lab_subnet_name + self.allow_public_ip = allow_public_ip + + +class SubnetFragment(Model): + """Subnet information. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name of the subnet as seen in the lab. + :type lab_subnet_name: str + :param allow_public_ip: The permission policy of the subnet for allowing + public IP addresses (i.e. Allow, Deny)). Possible values include: + 'Default', 'Deny', 'Allow' + :type allow_public_ip: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, allow_public_ip=None, **kwargs) -> None: + super(SubnetFragment, self).__init__(**kwargs) + self.resource_id = resource_id + self.lab_subnet_name = lab_subnet_name + self.allow_public_ip = allow_public_ip + + +class SubnetOverride(Model): + """Property overrides on a subnet of a virtual network. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name given to the subnet within the lab. + :type lab_subnet_name: str + :param use_in_vm_creation_permission: Indicates whether this subnet can be + used during virtual machine creation (i.e. Allow, Deny). Possible values + include: 'Default', 'Deny', 'Allow' + :type use_in_vm_creation_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param use_public_ip_address_permission: Indicates whether public IP + addresses can be assigned to virtual machines on this subnet (i.e. Allow, + Deny). Possible values include: 'Default', 'Deny', 'Allow' + :type use_public_ip_address_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param shared_public_ip_address_configuration: Properties that virtual + machines on this subnet will share. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfiguration + :param virtual_network_pool_name: The virtual network pool associated with + this subnet. + :type virtual_network_pool_name: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, + 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfiguration'}, + 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, use_in_vm_creation_permission=None, use_public_ip_address_permission=None, shared_public_ip_address_configuration=None, virtual_network_pool_name: str=None, **kwargs) -> None: + super(SubnetOverride, self).__init__(**kwargs) + self.resource_id = resource_id + self.lab_subnet_name = lab_subnet_name + self.use_in_vm_creation_permission = use_in_vm_creation_permission + self.use_public_ip_address_permission = use_public_ip_address_permission + self.shared_public_ip_address_configuration = shared_public_ip_address_configuration + self.virtual_network_pool_name = virtual_network_pool_name + + +class SubnetOverrideFragment(Model): + """Property overrides on a subnet of a virtual network. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name given to the subnet within the lab. + :type lab_subnet_name: str + :param use_in_vm_creation_permission: Indicates whether this subnet can be + used during virtual machine creation (i.e. Allow, Deny). Possible values + include: 'Default', 'Deny', 'Allow' + :type use_in_vm_creation_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param use_public_ip_address_permission: Indicates whether public IP + addresses can be assigned to virtual machines on this subnet (i.e. Allow, + Deny). Possible values include: 'Default', 'Deny', 'Allow' + :type use_public_ip_address_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param shared_public_ip_address_configuration: Properties that virtual + machines on this subnet will share. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfigurationFragment + :param virtual_network_pool_name: The virtual network pool associated with + this subnet. + :type virtual_network_pool_name: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, + 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfigurationFragment'}, + 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, use_in_vm_creation_permission=None, use_public_ip_address_permission=None, shared_public_ip_address_configuration=None, virtual_network_pool_name: str=None, **kwargs) -> None: + super(SubnetOverrideFragment, self).__init__(**kwargs) + self.resource_id = resource_id + self.lab_subnet_name = lab_subnet_name + self.use_in_vm_creation_permission = use_in_vm_creation_permission + self.use_public_ip_address_permission = use_public_ip_address_permission + self.shared_public_ip_address_configuration = shared_public_ip_address_configuration + self.virtual_network_pool_name = virtual_network_pool_name + + +class SubnetSharedPublicIpAddressConfiguration(Model): + """Configuration for public IP address sharing. + + :param allowed_ports: Backend ports that virtual machines on this subnet + are allowed to expose + :type allowed_ports: list[~azure.mgmt.devtestlabs.models.Port] + """ + + _attribute_map = { + 'allowed_ports': {'key': 'allowedPorts', 'type': '[Port]'}, + } + + def __init__(self, *, allowed_ports=None, **kwargs) -> None: + super(SubnetSharedPublicIpAddressConfiguration, self).__init__(**kwargs) + self.allowed_ports = allowed_ports + + +class SubnetSharedPublicIpAddressConfigurationFragment(Model): + """Configuration for public IP address sharing. + + :param allowed_ports: Backend ports that virtual machines on this subnet + are allowed to expose + :type allowed_ports: list[~azure.mgmt.devtestlabs.models.PortFragment] + """ + + _attribute_map = { + 'allowed_ports': {'key': 'allowedPorts', 'type': '[PortFragment]'}, + } + + def __init__(self, *, allowed_ports=None, **kwargs) -> None: + super(SubnetSharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) + self.allowed_ports = allowed_ports + + +class TargetCostProperties(Model): + """Properties of a cost target. + + :param status: Target cost status. Possible values include: 'Enabled', + 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.TargetCostStatus + :param target: Lab target cost + :type target: int + :param cost_thresholds: Cost thresholds. + :type cost_thresholds: + list[~azure.mgmt.devtestlabs.models.CostThresholdProperties] + :param cycle_start_date_time: Reporting cycle start date. + :type cycle_start_date_time: datetime + :param cycle_end_date_time: Reporting cycle end date. + :type cycle_end_date_time: datetime + :param cycle_type: Reporting cycle type. Possible values include: + 'CalendarMonth', 'Custom' + :type cycle_type: str or ~azure.mgmt.devtestlabs.models.ReportingCycleType + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'int'}, + 'cost_thresholds': {'key': 'costThresholds', 'type': '[CostThresholdProperties]'}, + 'cycle_start_date_time': {'key': 'cycleStartDateTime', 'type': 'iso-8601'}, + 'cycle_end_date_time': {'key': 'cycleEndDateTime', 'type': 'iso-8601'}, + 'cycle_type': {'key': 'cycleType', 'type': 'str'}, + } + + def __init__(self, *, status=None, target: int=None, cost_thresholds=None, cycle_start_date_time=None, cycle_end_date_time=None, cycle_type=None, **kwargs) -> None: + super(TargetCostProperties, self).__init__(**kwargs) + self.status = status + self.target = target + self.cost_thresholds = cost_thresholds + self.cycle_start_date_time = cycle_start_date_time + self.cycle_end_date_time = cycle_end_date_time + self.cycle_type = cycle_type + + +class User(Resource): + """Profile of a lab user. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the user. + :type identity: ~azure.mgmt.devtestlabs.models.UserIdentity + :param secret_store: The secret store of the user. + :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStore + :ivar created_date: The creation date of the user profile. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'properties.identity', 'type': 'UserIdentity'}, + 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStore'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, identity=None, secret_store=None, **kwargs) -> None: + super(User, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity + self.secret_store = secret_store + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class UserFragment(UpdateResource): + """Profile of a lab user. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the user. + :type identity: ~azure.mgmt.devtestlabs.models.UserIdentityFragment + :param secret_store: The secret store of the user. + :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStoreFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'properties.identity', 'type': 'UserIdentityFragment'}, + 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStoreFragment'}, + } + + def __init__(self, *, tags=None, identity=None, secret_store=None, **kwargs) -> None: + super(UserFragment, self).__init__(tags=tags, **kwargs) + self.identity = identity + self.secret_store = secret_store + + +class UserIdentity(Model): + """Identity attributes of a lab user. + + :param principal_name: Set to the principal name / UPN of the client JWT + making the request. + :type principal_name: str + :param principal_id: Set to the principal Id of the client JWT making the + request. Service principal will not have the principal Id. + :type principal_id: str + :param tenant_id: Set to the tenant ID of the client JWT making the + request. + :type tenant_id: str + :param object_id: Set to the object Id of the client JWT making the + request. Not all users have object Id. For CSP (reseller) scenarios for + example, object Id is not available. + :type object_id: str + :param app_id: Set to the app Id of the client JWT making the request. + :type app_id: str + """ + + _attribute_map = { + 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'app_id': {'key': 'appId', 'type': 'str'}, + } + + def __init__(self, *, principal_name: str=None, principal_id: str=None, tenant_id: str=None, object_id: str=None, app_id: str=None, **kwargs) -> None: + super(UserIdentity, self).__init__(**kwargs) + self.principal_name = principal_name + self.principal_id = principal_id + self.tenant_id = tenant_id + self.object_id = object_id + self.app_id = app_id + + +class UserIdentityFragment(Model): + """Identity attributes of a lab user. + + :param principal_name: Set to the principal name / UPN of the client JWT + making the request. + :type principal_name: str + :param principal_id: Set to the principal Id of the client JWT making the + request. Service principal will not have the principal Id. + :type principal_id: str + :param tenant_id: Set to the tenant ID of the client JWT making the + request. + :type tenant_id: str + :param object_id: Set to the object Id of the client JWT making the + request. Not all users have object Id. For CSP (reseller) scenarios for + example, object Id is not available. + :type object_id: str + :param app_id: Set to the app Id of the client JWT making the request. + :type app_id: str + """ + + _attribute_map = { + 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'app_id': {'key': 'appId', 'type': 'str'}, + } + + def __init__(self, *, principal_name: str=None, principal_id: str=None, tenant_id: str=None, object_id: str=None, app_id: str=None, **kwargs) -> None: + super(UserIdentityFragment, self).__init__(**kwargs) + self.principal_name = principal_name + self.principal_id = principal_id + self.tenant_id = tenant_id + self.object_id = object_id + self.app_id = app_id + + +class UserSecretStore(Model): + """Properties of a user's secret store. + + :param key_vault_uri: The URI of the user's Key vault. + :type key_vault_uri: str + :param key_vault_id: The ID of the user's Key vault. + :type key_vault_id: str + """ + + _attribute_map = { + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + } + + def __init__(self, *, key_vault_uri: str=None, key_vault_id: str=None, **kwargs) -> None: + super(UserSecretStore, self).__init__(**kwargs) + self.key_vault_uri = key_vault_uri + self.key_vault_id = key_vault_id + + +class UserSecretStoreFragment(Model): + """Properties of a user's secret store. + + :param key_vault_uri: The URI of the user's Key vault. + :type key_vault_uri: str + :param key_vault_id: The ID of the user's Key vault. + :type key_vault_id: str + """ + + _attribute_map = { + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + } + + def __init__(self, *, key_vault_uri: str=None, key_vault_id: str=None, **kwargs) -> None: + super(UserSecretStoreFragment, self).__init__(**kwargs) + self.key_vault_uri = key_vault_uri + self.key_vault_id = key_vault_id + + +class VirtualNetwork(Resource): + """A virtual network. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param allowed_subnets: The allowed subnets of the virtual network. + :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.Subnet] + :param description: The description of the virtual network. + :type description: str + :param external_provider_resource_id: The Microsoft.Network resource + identifier of the virtual network. + :type external_provider_resource_id: str + :ivar external_subnets: The external subnet properties. + :vartype external_subnets: + list[~azure.mgmt.devtestlabs.models.ExternalSubnet] + :param subnet_overrides: The subnet overrides of the virtual network. + :type subnet_overrides: + list[~azure.mgmt.devtestlabs.models.SubnetOverride] + :ivar created_date: The creation date of the virtual network. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'external_subnets': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[Subnet]'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, + 'external_subnets': {'key': 'properties.externalSubnets', 'type': '[ExternalSubnet]'}, + 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverride]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, allowed_subnets=None, description: str=None, external_provider_resource_id: str=None, subnet_overrides=None, **kwargs) -> None: + super(VirtualNetwork, self).__init__(location=location, tags=tags, **kwargs) + self.allowed_subnets = allowed_subnets + self.description = description + self.external_provider_resource_id = external_provider_resource_id + self.external_subnets = None + self.subnet_overrides = subnet_overrides + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class VirtualNetworkFragment(UpdateResource): + """A virtual network. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param allowed_subnets: The allowed subnets of the virtual network. + :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.SubnetFragment] + :param description: The description of the virtual network. + :type description: str + :param external_provider_resource_id: The Microsoft.Network resource + identifier of the virtual network. + :type external_provider_resource_id: str + :param subnet_overrides: The subnet overrides of the virtual network. + :type subnet_overrides: + list[~azure.mgmt.devtestlabs.models.SubnetOverrideFragment] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[SubnetFragment]'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, + 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverrideFragment]'}, + } + + def __init__(self, *, tags=None, allowed_subnets=None, description: str=None, external_provider_resource_id: str=None, subnet_overrides=None, **kwargs) -> None: + super(VirtualNetworkFragment, self).__init__(tags=tags, **kwargs) + self.allowed_subnets = allowed_subnets + self.description = description + self.external_provider_resource_id = external_provider_resource_id + self.subnet_overrides = subnet_overrides + + +class WeekDetails(Model): + """Properties of a weekly schedule. + + :param weekdays: The days of the week for which the schedule is set (e.g. + Sunday, Monday, Tuesday, etc.). + :type weekdays: list[str] + :param time: The time of the day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'weekdays': {'key': 'weekdays', 'type': '[str]'}, + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, *, weekdays=None, time: str=None, **kwargs) -> None: + super(WeekDetails, self).__init__(**kwargs) + self.weekdays = weekdays + self.time = time + + +class WeekDetailsFragment(Model): + """Properties of a weekly schedule. + + :param weekdays: The days of the week for which the schedule is set (e.g. + Sunday, Monday, Tuesday, etc.). + :type weekdays: list[str] + :param time: The time of the day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'weekdays': {'key': 'weekdays', 'type': '[str]'}, + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, *, weekdays=None, time: str=None, **kwargs) -> None: + super(WeekDetailsFragment, self).__init__(**kwargs) + self.weekdays = weekdays + self.time = time + + +class WindowsOsInfo(Model): + """Information about a Windows OS. + + :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, + SysprepRequested, SysprepApplied). Possible values include: + 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' + :type windows_os_state: str or + ~azure.mgmt.devtestlabs.models.WindowsOsState + """ + + _attribute_map = { + 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, + } + + def __init__(self, *, windows_os_state=None, **kwargs) -> None: + super(WindowsOsInfo, self).__init__(**kwargs) + self.windows_os_state = windows_os_state + + +class WindowsOsInfoFragment(Model): + """Information about a Windows OS. + + :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, + SysprepRequested, SysprepApplied). Possible values include: + 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' + :type windows_os_state: str or + ~azure.mgmt.devtestlabs.models.WindowsOsState + """ + + _attribute_map = { + 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, + } + + def __init__(self, *, windows_os_state=None, **kwargs) -> None: + super(WindowsOsInfoFragment, self).__init__(**kwargs) + self.windows_os_state = windows_os_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_paged_models.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_paged_models.py new file mode 100644 index 000000000000..3e947c89d709 --- /dev/null +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_paged_models.py @@ -0,0 +1,261 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationMetadataPaged(Paged): + """ + A paging container for iterating over a list of :class:`OperationMetadata ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[OperationMetadata]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationMetadataPaged, self).__init__(*args, **kwargs) +class LabPaged(Paged): + """ + A paging container for iterating over a list of :class:`Lab ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Lab]'} + } + + def __init__(self, *args, **kwargs): + + super(LabPaged, self).__init__(*args, **kwargs) +class LabVhdPaged(Paged): + """ + A paging container for iterating over a list of :class:`LabVhd ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[LabVhd]'} + } + + def __init__(self, *args, **kwargs): + + super(LabVhdPaged, self).__init__(*args, **kwargs) +class SchedulePaged(Paged): + """ + A paging container for iterating over a list of :class:`Schedule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Schedule]'} + } + + def __init__(self, *args, **kwargs): + + super(SchedulePaged, self).__init__(*args, **kwargs) +class ArtifactSourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`ArtifactSource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ArtifactSource]'} + } + + def __init__(self, *args, **kwargs): + + super(ArtifactSourcePaged, self).__init__(*args, **kwargs) +class ArmTemplatePaged(Paged): + """ + A paging container for iterating over a list of :class:`ArmTemplate ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ArmTemplate]'} + } + + def __init__(self, *args, **kwargs): + + super(ArmTemplatePaged, self).__init__(*args, **kwargs) +class ArtifactPaged(Paged): + """ + A paging container for iterating over a list of :class:`Artifact ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Artifact]'} + } + + def __init__(self, *args, **kwargs): + + super(ArtifactPaged, self).__init__(*args, **kwargs) +class CustomImagePaged(Paged): + """ + A paging container for iterating over a list of :class:`CustomImage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CustomImage]'} + } + + def __init__(self, *args, **kwargs): + + super(CustomImagePaged, self).__init__(*args, **kwargs) +class FormulaPaged(Paged): + """ + A paging container for iterating over a list of :class:`Formula ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Formula]'} + } + + def __init__(self, *args, **kwargs): + + super(FormulaPaged, self).__init__(*args, **kwargs) +class GalleryImagePaged(Paged): + """ + A paging container for iterating over a list of :class:`GalleryImage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GalleryImage]'} + } + + def __init__(self, *args, **kwargs): + + super(GalleryImagePaged, self).__init__(*args, **kwargs) +class NotificationChannelPaged(Paged): + """ + A paging container for iterating over a list of :class:`NotificationChannel ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[NotificationChannel]'} + } + + def __init__(self, *args, **kwargs): + + super(NotificationChannelPaged, self).__init__(*args, **kwargs) +class PolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`Policy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Policy]'} + } + + def __init__(self, *args, **kwargs): + + super(PolicyPaged, self).__init__(*args, **kwargs) +class UserPaged(Paged): + """ + A paging container for iterating over a list of :class:`User ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[User]'} + } + + def __init__(self, *args, **kwargs): + + super(UserPaged, self).__init__(*args, **kwargs) +class DiskPaged(Paged): + """ + A paging container for iterating over a list of :class:`Disk ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Disk]'} + } + + def __init__(self, *args, **kwargs): + + super(DiskPaged, self).__init__(*args, **kwargs) +class DtlEnvironmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`DtlEnvironment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DtlEnvironment]'} + } + + def __init__(self, *args, **kwargs): + + super(DtlEnvironmentPaged, self).__init__(*args, **kwargs) +class SecretPaged(Paged): + """ + A paging container for iterating over a list of :class:`Secret ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Secret]'} + } + + def __init__(self, *args, **kwargs): + + super(SecretPaged, self).__init__(*args, **kwargs) +class ServiceFabricPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServiceFabric ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServiceFabric]'} + } + + def __init__(self, *args, **kwargs): + + super(ServiceFabricPaged, self).__init__(*args, **kwargs) +class LabVirtualMachinePaged(Paged): + """ + A paging container for iterating over a list of :class:`LabVirtualMachine ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[LabVirtualMachine]'} + } + + def __init__(self, *args, **kwargs): + + super(LabVirtualMachinePaged, self).__init__(*args, **kwargs) +class VirtualNetworkPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualNetwork ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualNetwork]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualNetworkPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule.py deleted file mode 100644 index bbdc049f2f3f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ApplicableSchedule(Resource): - """Schedules applicable to a virtual machine. The schedules may have been - defined on a VM or on lab level. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set - at the lab or lab resource level. - :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.Schedule - :param lab_vms_startup: The auto-startup schedule, if one has been set at - the lab or lab resource level. - :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.Schedule - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'Schedule'}, - 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'Schedule'}, - } - - def __init__(self, **kwargs): - super(ApplicableSchedule, self).__init__(**kwargs) - self.lab_vms_shutdown = kwargs.get('lab_vms_shutdown', None) - self.lab_vms_startup = kwargs.get('lab_vms_startup', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment.py deleted file mode 100644 index 8139b26bbb37..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class ApplicableScheduleFragment(UpdateResource): - """Schedules applicable to a virtual machine. The schedules may have been - defined on a VM or on lab level. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set - at the lab or lab resource level. - :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.ScheduleFragment - :param lab_vms_startup: The auto-startup schedule, if one has been set at - the lab or lab resource level. - :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.ScheduleFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'ScheduleFragment'}, - 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'ScheduleFragment'}, - } - - def __init__(self, **kwargs): - super(ApplicableScheduleFragment, self).__init__(**kwargs) - self.lab_vms_shutdown = kwargs.get('lab_vms_shutdown', None) - self.lab_vms_startup = kwargs.get('lab_vms_startup', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment_py3.py deleted file mode 100644 index d1ddb7b37caa..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class ApplicableScheduleFragment(UpdateResource): - """Schedules applicable to a virtual machine. The schedules may have been - defined on a VM or on lab level. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set - at the lab or lab resource level. - :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.ScheduleFragment - :param lab_vms_startup: The auto-startup schedule, if one has been set at - the lab or lab resource level. - :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.ScheduleFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'ScheduleFragment'}, - 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'ScheduleFragment'}, - } - - def __init__(self, *, tags=None, lab_vms_shutdown=None, lab_vms_startup=None, **kwargs) -> None: - super(ApplicableScheduleFragment, self).__init__(tags=tags, **kwargs) - self.lab_vms_shutdown = lab_vms_shutdown - self.lab_vms_startup = lab_vms_startup diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_py3.py deleted file mode 100644 index dabce38bbcae..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ApplicableSchedule(Resource): - """Schedules applicable to a virtual machine. The schedules may have been - defined on a VM or on lab level. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set - at the lab or lab resource level. - :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.Schedule - :param lab_vms_startup: The auto-startup schedule, if one has been set at - the lab or lab resource level. - :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.Schedule - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'Schedule'}, - 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'Schedule'}, - } - - def __init__(self, *, location: str=None, tags=None, lab_vms_shutdown=None, lab_vms_startup=None, **kwargs) -> None: - super(ApplicableSchedule, self).__init__(location=location, tags=tags, **kwargs) - self.lab_vms_shutdown = lab_vms_shutdown - self.lab_vms_startup = lab_vms_startup diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request.py deleted file mode 100644 index 5576e79bf0ad..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplyArtifactsRequest(Model): - """Request body for applying artifacts to a virtual machine. - - :param artifacts: The list of artifacts to apply. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - """ - - _attribute_map = { - 'artifacts': {'key': 'artifacts', 'type': '[ArtifactInstallProperties]'}, - } - - def __init__(self, **kwargs): - super(ApplyArtifactsRequest, self).__init__(**kwargs) - self.artifacts = kwargs.get('artifacts', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request_py3.py deleted file mode 100644 index 2e5de7eca69f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplyArtifactsRequest(Model): - """Request body for applying artifacts to a virtual machine. - - :param artifacts: The list of artifacts to apply. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - """ - - _attribute_map = { - 'artifacts': {'key': 'artifacts', 'type': '[ArtifactInstallProperties]'}, - } - - def __init__(self, *, artifacts=None, **kwargs) -> None: - super(ApplyArtifactsRequest, self).__init__(**kwargs) - self.artifacts = artifacts diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template.py deleted file mode 100644 index 9ff3ebed92de..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ArmTemplate(Resource): - """An Azure Resource Manager template. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar display_name: The display name of the ARM template. - :vartype display_name: str - :ivar description: The description of the ARM template. - :vartype description: str - :ivar publisher: The publisher of the ARM template. - :vartype publisher: str - :ivar icon: The URI to the icon of the ARM template. - :vartype icon: str - :ivar contents: The contents of the ARM template. - :vartype contents: object - :ivar created_date: The creation date of the armTemplate. - :vartype created_date: datetime - :ivar parameters_value_files_info: File name and parameter values - information from all azuredeploy.*.parameters.json for the ARM template. - :vartype parameters_value_files_info: - list[~azure.mgmt.devtestlabs.models.ParametersValueFileInfo] - :ivar enabled: Whether or not ARM template is enabled for use by lab user. - :vartype enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'publisher': {'readonly': True}, - 'icon': {'readonly': True}, - 'contents': {'readonly': True}, - 'created_date': {'readonly': True}, - 'parameters_value_files_info': {'readonly': True}, - 'enabled': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'contents': {'key': 'properties.contents', 'type': 'object'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'parameters_value_files_info': {'key': 'properties.parametersValueFilesInfo', 'type': '[ParametersValueFileInfo]'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ArmTemplate, self).__init__(**kwargs) - self.display_name = None - self.description = None - self.publisher = None - self.icon = None - self.contents = None - self.created_date = None - self.parameters_value_files_info = None - self.enabled = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info.py deleted file mode 100644 index 9706cf3d1122..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArmTemplateInfo(Model): - """Information about a generated ARM template. - - :param template: The template's contents. - :type template: object - :param parameters: The parameters of the ARM template. - :type parameters: object - """ - - _attribute_map = { - 'template': {'key': 'template', 'type': 'object'}, - 'parameters': {'key': 'parameters', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ArmTemplateInfo, self).__init__(**kwargs) - self.template = kwargs.get('template', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info_py3.py deleted file mode 100644 index 6194e4d20559..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArmTemplateInfo(Model): - """Information about a generated ARM template. - - :param template: The template's contents. - :type template: object - :param parameters: The parameters of the ARM template. - :type parameters: object - """ - - _attribute_map = { - 'template': {'key': 'template', 'type': 'object'}, - 'parameters': {'key': 'parameters', 'type': 'object'}, - } - - def __init__(self, *, template=None, parameters=None, **kwargs) -> None: - super(ArmTemplateInfo, self).__init__(**kwargs) - self.template = template - self.parameters = parameters diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_paged.py deleted file mode 100644 index e209fa704487..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ArmTemplatePaged(Paged): - """ - A paging container for iterating over a list of :class:`ArmTemplate ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ArmTemplate]'} - } - - def __init__(self, *args, **kwargs): - - super(ArmTemplatePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties.py deleted file mode 100644 index 9c939b46ff98..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArmTemplateParameterProperties(Model): - """Properties of an Azure Resource Manager template parameter. - - :param name: The name of the template parameter. - :type name: str - :param value: The value of the template parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArmTemplateParameterProperties, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment.py deleted file mode 100644 index c73b8c260aee..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArmTemplateParameterPropertiesFragment(Model): - """Properties of an Azure Resource Manager template parameter. - - :param name: The name of the template parameter. - :type name: str - :param value: The value of the template parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArmTemplateParameterPropertiesFragment, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment_py3.py deleted file mode 100644 index ca110d0ee441..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArmTemplateParameterPropertiesFragment(Model): - """Properties of an Azure Resource Manager template parameter. - - :param name: The name of the template parameter. - :type name: str - :param value: The value of the template parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: - super(ArmTemplateParameterPropertiesFragment, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_py3.py deleted file mode 100644 index 16ab6753be2e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArmTemplateParameterProperties(Model): - """Properties of an Azure Resource Manager template parameter. - - :param name: The name of the template parameter. - :type name: str - :param value: The value of the template parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: - super(ArmTemplateParameterProperties, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_py3.py deleted file mode 100644 index 64b55696e79c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_py3.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ArmTemplate(Resource): - """An Azure Resource Manager template. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar display_name: The display name of the ARM template. - :vartype display_name: str - :ivar description: The description of the ARM template. - :vartype description: str - :ivar publisher: The publisher of the ARM template. - :vartype publisher: str - :ivar icon: The URI to the icon of the ARM template. - :vartype icon: str - :ivar contents: The contents of the ARM template. - :vartype contents: object - :ivar created_date: The creation date of the armTemplate. - :vartype created_date: datetime - :ivar parameters_value_files_info: File name and parameter values - information from all azuredeploy.*.parameters.json for the ARM template. - :vartype parameters_value_files_info: - list[~azure.mgmt.devtestlabs.models.ParametersValueFileInfo] - :ivar enabled: Whether or not ARM template is enabled for use by lab user. - :vartype enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'publisher': {'readonly': True}, - 'icon': {'readonly': True}, - 'contents': {'readonly': True}, - 'created_date': {'readonly': True}, - 'parameters_value_files_info': {'readonly': True}, - 'enabled': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'contents': {'key': 'properties.contents', 'type': 'object'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'parameters_value_files_info': {'key': 'properties.parametersValueFilesInfo', 'type': '[ParametersValueFileInfo]'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(ArmTemplate, self).__init__(location=location, tags=tags, **kwargs) - self.display_name = None - self.description = None - self.publisher = None - self.icon = None - self.contents = None - self.created_date = None - self.parameters_value_files_info = None - self.enabled = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact.py deleted file mode 100644 index cf1884020662..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Artifact(Resource): - """An artifact. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar title: The artifact's title. - :vartype title: str - :ivar description: The artifact's description. - :vartype description: str - :ivar publisher: The artifact's publisher. - :vartype publisher: str - :ivar file_path: The file path to the artifact. - :vartype file_path: str - :ivar icon: The URI to the artifact icon. - :vartype icon: str - :ivar target_os_type: The artifact's target OS. - :vartype target_os_type: str - :ivar parameters: The artifact's parameters. - :vartype parameters: object - :ivar created_date: The artifact's creation date. - :vartype created_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'title': {'readonly': True}, - 'description': {'readonly': True}, - 'publisher': {'readonly': True}, - 'file_path': {'readonly': True}, - 'icon': {'readonly': True}, - 'target_os_type': {'readonly': True}, - 'parameters': {'readonly': True}, - 'created_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'file_path': {'key': 'properties.filePath', 'type': 'str'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'target_os_type': {'key': 'properties.targetOsType', 'type': 'str'}, - 'parameters': {'key': 'properties.parameters', 'type': 'object'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(Artifact, self).__init__(**kwargs) - self.title = None - self.description = None - self.publisher = None - self.file_path = None - self.icon = None - self.target_os_type = None - self.parameters = None - self.created_date = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties.py deleted file mode 100644 index 00e10ab200d7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactDeploymentStatusProperties(Model): - """Properties of an artifact deployment. - - :param deployment_status: The deployment status of the artifact. - :type deployment_status: str - :param artifacts_applied: The total count of the artifacts that were - successfully applied. - :type artifacts_applied: int - :param total_artifacts: The total count of the artifacts that were - tentatively applied. - :type total_artifacts: int - """ - - _attribute_map = { - 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, - 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, - 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ArtifactDeploymentStatusProperties, self).__init__(**kwargs) - self.deployment_status = kwargs.get('deployment_status', None) - self.artifacts_applied = kwargs.get('artifacts_applied', None) - self.total_artifacts = kwargs.get('total_artifacts', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment.py deleted file mode 100644 index b5231c92c635..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactDeploymentStatusPropertiesFragment(Model): - """Properties of an artifact deployment. - - :param deployment_status: The deployment status of the artifact. - :type deployment_status: str - :param artifacts_applied: The total count of the artifacts that were - successfully applied. - :type artifacts_applied: int - :param total_artifacts: The total count of the artifacts that were - tentatively applied. - :type total_artifacts: int - """ - - _attribute_map = { - 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, - 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, - 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ArtifactDeploymentStatusPropertiesFragment, self).__init__(**kwargs) - self.deployment_status = kwargs.get('deployment_status', None) - self.artifacts_applied = kwargs.get('artifacts_applied', None) - self.total_artifacts = kwargs.get('total_artifacts', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment_py3.py deleted file mode 100644 index d3dd5372ef6d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactDeploymentStatusPropertiesFragment(Model): - """Properties of an artifact deployment. - - :param deployment_status: The deployment status of the artifact. - :type deployment_status: str - :param artifacts_applied: The total count of the artifacts that were - successfully applied. - :type artifacts_applied: int - :param total_artifacts: The total count of the artifacts that were - tentatively applied. - :type total_artifacts: int - """ - - _attribute_map = { - 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, - 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, - 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, - } - - def __init__(self, *, deployment_status: str=None, artifacts_applied: int=None, total_artifacts: int=None, **kwargs) -> None: - super(ArtifactDeploymentStatusPropertiesFragment, self).__init__(**kwargs) - self.deployment_status = deployment_status - self.artifacts_applied = artifacts_applied - self.total_artifacts = total_artifacts diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_py3.py deleted file mode 100644 index 5b38610af59e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactDeploymentStatusProperties(Model): - """Properties of an artifact deployment. - - :param deployment_status: The deployment status of the artifact. - :type deployment_status: str - :param artifacts_applied: The total count of the artifacts that were - successfully applied. - :type artifacts_applied: int - :param total_artifacts: The total count of the artifacts that were - tentatively applied. - :type total_artifacts: int - """ - - _attribute_map = { - 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, - 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, - 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, - } - - def __init__(self, *, deployment_status: str=None, artifacts_applied: int=None, total_artifacts: int=None, **kwargs) -> None: - super(ArtifactDeploymentStatusProperties, self).__init__(**kwargs) - self.deployment_status = deployment_status - self.artifacts_applied = artifacts_applied - self.total_artifacts = total_artifacts diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties.py deleted file mode 100644 index 7a976ea8f7b1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactInstallProperties(Model): - """Properties of an artifact. - - :param artifact_id: The artifact's identifier. - :type artifact_id: str - :param artifact_title: The artifact's title. - :type artifact_title: str - :param parameters: The parameters of the artifact. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArtifactParameterProperties] - :param status: The status of the artifact. - :type status: str - :param deployment_status_message: The status message from the deployment. - :type deployment_status_message: str - :param vm_extension_status_message: The status message from the virtual - machine extension. - :type vm_extension_status_message: str - :param install_time: The time that the artifact starts to install on the - virtual machine. - :type install_time: datetime - """ - - _attribute_map = { - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterProperties]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, - 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, - 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ArtifactInstallProperties, self).__init__(**kwargs) - self.artifact_id = kwargs.get('artifact_id', None) - self.artifact_title = kwargs.get('artifact_title', None) - self.parameters = kwargs.get('parameters', None) - self.status = kwargs.get('status', None) - self.deployment_status_message = kwargs.get('deployment_status_message', None) - self.vm_extension_status_message = kwargs.get('vm_extension_status_message', None) - self.install_time = kwargs.get('install_time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment.py deleted file mode 100644 index 0149af16d549..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactInstallPropertiesFragment(Model): - """Properties of an artifact. - - :param artifact_id: The artifact's identifier. - :type artifact_id: str - :param artifact_title: The artifact's title. - :type artifact_title: str - :param parameters: The parameters of the artifact. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArtifactParameterPropertiesFragment] - :param status: The status of the artifact. - :type status: str - :param deployment_status_message: The status message from the deployment. - :type deployment_status_message: str - :param vm_extension_status_message: The status message from the virtual - machine extension. - :type vm_extension_status_message: str - :param install_time: The time that the artifact starts to install on the - virtual machine. - :type install_time: datetime - """ - - _attribute_map = { - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterPropertiesFragment]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, - 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, - 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ArtifactInstallPropertiesFragment, self).__init__(**kwargs) - self.artifact_id = kwargs.get('artifact_id', None) - self.artifact_title = kwargs.get('artifact_title', None) - self.parameters = kwargs.get('parameters', None) - self.status = kwargs.get('status', None) - self.deployment_status_message = kwargs.get('deployment_status_message', None) - self.vm_extension_status_message = kwargs.get('vm_extension_status_message', None) - self.install_time = kwargs.get('install_time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment_py3.py deleted file mode 100644 index 4aa552477186..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactInstallPropertiesFragment(Model): - """Properties of an artifact. - - :param artifact_id: The artifact's identifier. - :type artifact_id: str - :param artifact_title: The artifact's title. - :type artifact_title: str - :param parameters: The parameters of the artifact. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArtifactParameterPropertiesFragment] - :param status: The status of the artifact. - :type status: str - :param deployment_status_message: The status message from the deployment. - :type deployment_status_message: str - :param vm_extension_status_message: The status message from the virtual - machine extension. - :type vm_extension_status_message: str - :param install_time: The time that the artifact starts to install on the - virtual machine. - :type install_time: datetime - """ - - _attribute_map = { - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterPropertiesFragment]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, - 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, - 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, artifact_id: str=None, artifact_title: str=None, parameters=None, status: str=None, deployment_status_message: str=None, vm_extension_status_message: str=None, install_time=None, **kwargs) -> None: - super(ArtifactInstallPropertiesFragment, self).__init__(**kwargs) - self.artifact_id = artifact_id - self.artifact_title = artifact_title - self.parameters = parameters - self.status = status - self.deployment_status_message = deployment_status_message - self.vm_extension_status_message = vm_extension_status_message - self.install_time = install_time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_py3.py deleted file mode 100644 index 3df682e56bc6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactInstallProperties(Model): - """Properties of an artifact. - - :param artifact_id: The artifact's identifier. - :type artifact_id: str - :param artifact_title: The artifact's title. - :type artifact_title: str - :param parameters: The parameters of the artifact. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArtifactParameterProperties] - :param status: The status of the artifact. - :type status: str - :param deployment_status_message: The status message from the deployment. - :type deployment_status_message: str - :param vm_extension_status_message: The status message from the virtual - machine extension. - :type vm_extension_status_message: str - :param install_time: The time that the artifact starts to install on the - virtual machine. - :type install_time: datetime - """ - - _attribute_map = { - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterProperties]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, - 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, - 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, artifact_id: str=None, artifact_title: str=None, parameters=None, status: str=None, deployment_status_message: str=None, vm_extension_status_message: str=None, install_time=None, **kwargs) -> None: - super(ArtifactInstallProperties, self).__init__(**kwargs) - self.artifact_id = artifact_id - self.artifact_title = artifact_title - self.parameters = parameters - self.status = status - self.deployment_status_message = deployment_status_message - self.vm_extension_status_message = vm_extension_status_message - self.install_time = install_time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_paged.py deleted file mode 100644 index 67c8e3601237..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ArtifactPaged(Paged): - """ - A paging container for iterating over a list of :class:`Artifact ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Artifact]'} - } - - def __init__(self, *args, **kwargs): - - super(ArtifactPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties.py deleted file mode 100644 index 546480baabd2..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactParameterProperties(Model): - """Properties of an artifact parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArtifactParameterProperties, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment.py deleted file mode 100644 index 77be250d5e11..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactParameterPropertiesFragment(Model): - """Properties of an artifact parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArtifactParameterPropertiesFragment, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment_py3.py deleted file mode 100644 index 326ea3643623..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactParameterPropertiesFragment(Model): - """Properties of an artifact parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: - super(ArtifactParameterPropertiesFragment, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_py3.py deleted file mode 100644 index c3ef4207b385..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactParameterProperties(Model): - """Properties of an artifact parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: - super(ArtifactParameterProperties, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_py3.py deleted file mode 100644 index 9e36ad2abf3f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Artifact(Resource): - """An artifact. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar title: The artifact's title. - :vartype title: str - :ivar description: The artifact's description. - :vartype description: str - :ivar publisher: The artifact's publisher. - :vartype publisher: str - :ivar file_path: The file path to the artifact. - :vartype file_path: str - :ivar icon: The URI to the artifact icon. - :vartype icon: str - :ivar target_os_type: The artifact's target OS. - :vartype target_os_type: str - :ivar parameters: The artifact's parameters. - :vartype parameters: object - :ivar created_date: The artifact's creation date. - :vartype created_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'title': {'readonly': True}, - 'description': {'readonly': True}, - 'publisher': {'readonly': True}, - 'file_path': {'readonly': True}, - 'icon': {'readonly': True}, - 'target_os_type': {'readonly': True}, - 'parameters': {'readonly': True}, - 'created_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'file_path': {'key': 'properties.filePath', 'type': 'str'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'target_os_type': {'key': 'properties.targetOsType', 'type': 'str'}, - 'parameters': {'key': 'properties.parameters', 'type': 'object'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(Artifact, self).__init__(location=location, tags=tags, **kwargs) - self.title = None - self.description = None - self.publisher = None - self.file_path = None - self.icon = None - self.target_os_type = None - self.parameters = None - self.created_date = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source.py deleted file mode 100644 index ba6cbfc20988..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ArtifactSource(Resource): - """Properties of an artifact source. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param display_name: The artifact source's display name. - :type display_name: str - :param uri: The artifact source's URI. - :type uri: str - :param source_type: The artifact source's type. Possible values include: - 'VsoGit', 'GitHub' - :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType - :param folder_path: The folder containing artifacts. - :type folder_path: str - :param arm_template_folder_path: The folder containing Azure Resource - Manager templates. - :type arm_template_folder_path: str - :param branch_ref: The artifact source's branch reference. - :type branch_ref: str - :param security_token: The security token to authenticate to the artifact - source. - :type security_token: str - :param status: Indicates if the artifact source is enabled (values: - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :ivar created_date: The artifact source's creation date. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, - 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, - 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, - 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, - 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArtifactSource, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.uri = kwargs.get('uri', None) - self.source_type = kwargs.get('source_type', None) - self.folder_path = kwargs.get('folder_path', None) - self.arm_template_folder_path = kwargs.get('arm_template_folder_path', None) - self.branch_ref = kwargs.get('branch_ref', None) - self.security_token = kwargs.get('security_token', None) - self.status = kwargs.get('status', None) - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment.py deleted file mode 100644 index 3c07b25eeb13..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class ArtifactSourceFragment(UpdateResource): - """Properties of an artifact source. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param display_name: The artifact source's display name. - :type display_name: str - :param uri: The artifact source's URI. - :type uri: str - :param source_type: The artifact source's type. Possible values include: - 'VsoGit', 'GitHub' - :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType - :param folder_path: The folder containing artifacts. - :type folder_path: str - :param arm_template_folder_path: The folder containing Azure Resource - Manager templates. - :type arm_template_folder_path: str - :param branch_ref: The artifact source's branch reference. - :type branch_ref: str - :param security_token: The security token to authenticate to the artifact - source. - :type security_token: str - :param status: Indicates if the artifact source is enabled (values: - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, - 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, - 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, - 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, - 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArtifactSourceFragment, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.uri = kwargs.get('uri', None) - self.source_type = kwargs.get('source_type', None) - self.folder_path = kwargs.get('folder_path', None) - self.arm_template_folder_path = kwargs.get('arm_template_folder_path', None) - self.branch_ref = kwargs.get('branch_ref', None) - self.security_token = kwargs.get('security_token', None) - self.status = kwargs.get('status', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment_py3.py deleted file mode 100644 index a243837b76d0..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class ArtifactSourceFragment(UpdateResource): - """Properties of an artifact source. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param display_name: The artifact source's display name. - :type display_name: str - :param uri: The artifact source's URI. - :type uri: str - :param source_type: The artifact source's type. Possible values include: - 'VsoGit', 'GitHub' - :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType - :param folder_path: The folder containing artifacts. - :type folder_path: str - :param arm_template_folder_path: The folder containing Azure Resource - Manager templates. - :type arm_template_folder_path: str - :param branch_ref: The artifact source's branch reference. - :type branch_ref: str - :param security_token: The security token to authenticate to the artifact - source. - :type security_token: str - :param status: Indicates if the artifact source is enabled (values: - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, - 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, - 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, - 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, - 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - } - - def __init__(self, *, tags=None, display_name: str=None, uri: str=None, source_type=None, folder_path: str=None, arm_template_folder_path: str=None, branch_ref: str=None, security_token: str=None, status=None, **kwargs) -> None: - super(ArtifactSourceFragment, self).__init__(tags=tags, **kwargs) - self.display_name = display_name - self.uri = uri - self.source_type = source_type - self.folder_path = folder_path - self.arm_template_folder_path = arm_template_folder_path - self.branch_ref = branch_ref - self.security_token = security_token - self.status = status diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_paged.py deleted file mode 100644 index d5990ee0e94f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ArtifactSourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`ArtifactSource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ArtifactSource]'} - } - - def __init__(self, *args, **kwargs): - - super(ArtifactSourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_py3.py deleted file mode 100644 index 53eeac5462f6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_py3.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ArtifactSource(Resource): - """Properties of an artifact source. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param display_name: The artifact source's display name. - :type display_name: str - :param uri: The artifact source's URI. - :type uri: str - :param source_type: The artifact source's type. Possible values include: - 'VsoGit', 'GitHub' - :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType - :param folder_path: The folder containing artifacts. - :type folder_path: str - :param arm_template_folder_path: The folder containing Azure Resource - Manager templates. - :type arm_template_folder_path: str - :param branch_ref: The artifact source's branch reference. - :type branch_ref: str - :param security_token: The security token to authenticate to the artifact - source. - :type security_token: str - :param status: Indicates if the artifact source is enabled (values: - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :ivar created_date: The artifact source's creation date. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, - 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, - 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, - 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, - 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, display_name: str=None, uri: str=None, source_type=None, folder_path: str=None, arm_template_folder_path: str=None, branch_ref: str=None, security_token: str=None, status=None, **kwargs) -> None: - super(ArtifactSource, self).__init__(location=location, tags=tags, **kwargs) - self.display_name = display_name - self.uri = uri - self.source_type = source_type - self.folder_path = folder_path - self.arm_template_folder_path = arm_template_folder_path - self.branch_ref = branch_ref - self.security_token = security_token - self.status = status - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties.py deleted file mode 100644 index 1935925ef669..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachDiskProperties(Model): - """Properties of the disk to attach. - - :param leased_by_lab_vm_id: The resource ID of the Lab virtual machine to - which the disk is attached. - :type leased_by_lab_vm_id: str - """ - - _attribute_map = { - 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AttachDiskProperties, self).__init__(**kwargs) - self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties_py3.py deleted file mode 100644 index 6cf94213e53e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachDiskProperties(Model): - """Properties of the disk to attach. - - :param leased_by_lab_vm_id: The resource ID of the Lab virtual machine to - which the disk is attached. - :type leased_by_lab_vm_id: str - """ - - _attribute_map = { - 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, - } - - def __init__(self, *, leased_by_lab_vm_id: str=None, **kwargs) -> None: - super(AttachDiskProperties, self).__init__(**kwargs) - self.leased_by_lab_vm_id = leased_by_lab_vm_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options.py deleted file mode 100644 index c4c18be9b277..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachNewDataDiskOptions(Model): - """Properties to attach new disk to the Virtual Machine. - - :param disk_size_gi_b: Size of the disk to be attached in Gibibytes. - :type disk_size_gi_b: int - :param disk_name: The name of the disk to be attached. - :type disk_name: str - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - 'disk_name': {'key': 'diskName', 'type': 'str'}, - 'disk_type': {'key': 'diskType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AttachNewDataDiskOptions, self).__init__(**kwargs) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) - self.disk_name = kwargs.get('disk_name', None) - self.disk_type = kwargs.get('disk_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment.py deleted file mode 100644 index 4ab7695dd872..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachNewDataDiskOptionsFragment(Model): - """Properties to attach new disk to the Virtual Machine. - - :param disk_size_gi_b: Size of the disk to be attached in Gibibytes. - :type disk_size_gi_b: int - :param disk_name: The name of the disk to be attached. - :type disk_name: str - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - 'disk_name': {'key': 'diskName', 'type': 'str'}, - 'disk_type': {'key': 'diskType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AttachNewDataDiskOptionsFragment, self).__init__(**kwargs) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) - self.disk_name = kwargs.get('disk_name', None) - self.disk_type = kwargs.get('disk_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment_py3.py deleted file mode 100644 index ec8d6863f811..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachNewDataDiskOptionsFragment(Model): - """Properties to attach new disk to the Virtual Machine. - - :param disk_size_gi_b: Size of the disk to be attached in Gibibytes. - :type disk_size_gi_b: int - :param disk_name: The name of the disk to be attached. - :type disk_name: str - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - 'disk_name': {'key': 'diskName', 'type': 'str'}, - 'disk_type': {'key': 'diskType', 'type': 'str'}, - } - - def __init__(self, *, disk_size_gi_b: int=None, disk_name: str=None, disk_type=None, **kwargs) -> None: - super(AttachNewDataDiskOptionsFragment, self).__init__(**kwargs) - self.disk_size_gi_b = disk_size_gi_b - self.disk_name = disk_name - self.disk_type = disk_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_py3.py deleted file mode 100644 index a03bb685e96c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachNewDataDiskOptions(Model): - """Properties to attach new disk to the Virtual Machine. - - :param disk_size_gi_b: Size of the disk to be attached in Gibibytes. - :type disk_size_gi_b: int - :param disk_name: The name of the disk to be attached. - :type disk_name: str - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - 'disk_name': {'key': 'diskName', 'type': 'str'}, - 'disk_type': {'key': 'diskType', 'type': 'str'}, - } - - def __init__(self, *, disk_size_gi_b: int=None, disk_name: str=None, disk_type=None, **kwargs) -> None: - super(AttachNewDataDiskOptions, self).__init__(**kwargs) - self.disk_size_gi_b = disk_size_gi_b - self.disk_name = disk_name - self.disk_type = disk_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters.py deleted file mode 100644 index f54138ff7a98..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BulkCreationParameters(Model): - """Parameters for creating multiple virtual machines as a single action. - - :param instance_count: The number of virtual machine instances to create. - :type instance_count: int - """ - - _attribute_map = { - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(BulkCreationParameters, self).__init__(**kwargs) - self.instance_count = kwargs.get('instance_count', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment.py deleted file mode 100644 index 1f03bf7aeffd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BulkCreationParametersFragment(Model): - """Parameters for creating multiple virtual machines as a single action. - - :param instance_count: The number of virtual machine instances to create. - :type instance_count: int - """ - - _attribute_map = { - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(BulkCreationParametersFragment, self).__init__(**kwargs) - self.instance_count = kwargs.get('instance_count', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment_py3.py deleted file mode 100644 index 3d78014f88c5..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BulkCreationParametersFragment(Model): - """Parameters for creating multiple virtual machines as a single action. - - :param instance_count: The number of virtual machine instances to create. - :type instance_count: int - """ - - _attribute_map = { - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - } - - def __init__(self, *, instance_count: int=None, **kwargs) -> None: - super(BulkCreationParametersFragment, self).__init__(**kwargs) - self.instance_count = instance_count diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_py3.py deleted file mode 100644 index c17ac0c6da94..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BulkCreationParameters(Model): - """Parameters for creating multiple virtual machines as a single action. - - :param instance_count: The number of virtual machine instances to create. - :type instance_count: int - """ - - _attribute_map = { - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - } - - def __init__(self, *, instance_count: int=None, **kwargs) -> None: - super(BulkCreationParameters, self).__init__(**kwargs) - self.instance_count = instance_count diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk.py deleted file mode 100644 index 36637b964ecc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeDataDisk(Model): - """A data disks attached to a virtual machine. - - :param name: Gets data disk name. - :type name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :param disk_size_gi_b: Gets data disk size in GiB. - :type disk_size_gi_b: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'disk_uri': {'key': 'diskUri', 'type': 'str'}, - 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ComputeDataDisk, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.disk_uri = kwargs.get('disk_uri', None) - self.managed_disk_id = kwargs.get('managed_disk_id', None) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment.py deleted file mode 100644 index 5dc673a52f22..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeDataDiskFragment(Model): - """A data disks attached to a virtual machine. - - :param name: Gets data disk name. - :type name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :param disk_size_gi_b: Gets data disk size in GiB. - :type disk_size_gi_b: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'disk_uri': {'key': 'diskUri', 'type': 'str'}, - 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ComputeDataDiskFragment, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.disk_uri = kwargs.get('disk_uri', None) - self.managed_disk_id = kwargs.get('managed_disk_id', None) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment_py3.py deleted file mode 100644 index 22fcaa4b3ad8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeDataDiskFragment(Model): - """A data disks attached to a virtual machine. - - :param name: Gets data disk name. - :type name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :param disk_size_gi_b: Gets data disk size in GiB. - :type disk_size_gi_b: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'disk_uri': {'key': 'diskUri', 'type': 'str'}, - 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - } - - def __init__(self, *, name: str=None, disk_uri: str=None, managed_disk_id: str=None, disk_size_gi_b: int=None, **kwargs) -> None: - super(ComputeDataDiskFragment, self).__init__(**kwargs) - self.name = name - self.disk_uri = disk_uri - self.managed_disk_id = managed_disk_id - self.disk_size_gi_b = disk_size_gi_b diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_py3.py deleted file mode 100644 index c88f007a5c0d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeDataDisk(Model): - """A data disks attached to a virtual machine. - - :param name: Gets data disk name. - :type name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :param disk_size_gi_b: Gets data disk size in GiB. - :type disk_size_gi_b: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'disk_uri': {'key': 'diskUri', 'type': 'str'}, - 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - } - - def __init__(self, *, name: str=None, disk_uri: str=None, managed_disk_id: str=None, disk_size_gi_b: int=None, **kwargs) -> None: - super(ComputeDataDisk, self).__init__(**kwargs) - self.name = name - self.disk_uri = disk_uri - self.managed_disk_id = managed_disk_id - self.disk_size_gi_b = disk_size_gi_b diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status.py deleted file mode 100644 index 896d9562e61d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmInstanceViewStatus(Model): - """Status information about a virtual machine. - - :param code: Gets the status Code. - :type code: str - :param display_status: Gets the short localizable label for the status. - :type display_status: str - :param message: Gets the message associated with the status. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ComputeVmInstanceViewStatus, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.display_status = kwargs.get('display_status', None) - self.message = kwargs.get('message', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment.py deleted file mode 100644 index 2b403562e4df..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmInstanceViewStatusFragment(Model): - """Status information about a virtual machine. - - :param code: Gets the status Code. - :type code: str - :param display_status: Gets the short localizable label for the status. - :type display_status: str - :param message: Gets the message associated with the status. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ComputeVmInstanceViewStatusFragment, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.display_status = kwargs.get('display_status', None) - self.message = kwargs.get('message', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment_py3.py deleted file mode 100644 index 81b1bd388f89..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmInstanceViewStatusFragment(Model): - """Status information about a virtual machine. - - :param code: Gets the status Code. - :type code: str - :param display_status: Gets the short localizable label for the status. - :type display_status: str - :param message: Gets the message associated with the status. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, display_status: str=None, message: str=None, **kwargs) -> None: - super(ComputeVmInstanceViewStatusFragment, self).__init__(**kwargs) - self.code = code - self.display_status = display_status - self.message = message diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_py3.py deleted file mode 100644 index 75fca83157a1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmInstanceViewStatus(Model): - """Status information about a virtual machine. - - :param code: Gets the status Code. - :type code: str - :param display_status: Gets the short localizable label for the status. - :type display_status: str - :param message: Gets the message associated with the status. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, display_status: str=None, message: str=None, **kwargs) -> None: - super(ComputeVmInstanceViewStatus, self).__init__(**kwargs) - self.code = code - self.display_status = display_status - self.message = message diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties.py deleted file mode 100644 index e4b785b9c47a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmProperties(Model): - """Properties of a virtual machine returned by the Microsoft.Compute API. - - :param statuses: Gets the statuses of the virtual machine. - :type statuses: - list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatus] - :param os_type: Gets the OS type of the virtual machine. - :type os_type: str - :param vm_size: Gets the size of the virtual machine. - :type vm_size: str - :param network_interface_id: Gets the network interface ID of the virtual - machine. - :type network_interface_id: str - :param os_disk_id: Gets OS disk blob uri for the virtual machine. - :type os_disk_id: str - :param data_disk_ids: Gets data disks blob uri for the virtual machine. - :type data_disk_ids: list[str] - :param data_disks: Gets all data disks attached to the virtual machine. - :type data_disks: list[~azure.mgmt.devtestlabs.models.ComputeDataDisk] - """ - - _attribute_map = { - 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatus]'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, - 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, - 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDisk]'}, - } - - def __init__(self, **kwargs): - super(ComputeVmProperties, self).__init__(**kwargs) - self.statuses = kwargs.get('statuses', None) - self.os_type = kwargs.get('os_type', None) - self.vm_size = kwargs.get('vm_size', None) - self.network_interface_id = kwargs.get('network_interface_id', None) - self.os_disk_id = kwargs.get('os_disk_id', None) - self.data_disk_ids = kwargs.get('data_disk_ids', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment.py deleted file mode 100644 index c6295526ebd6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmPropertiesFragment(Model): - """Properties of a virtual machine returned by the Microsoft.Compute API. - - :param statuses: Gets the statuses of the virtual machine. - :type statuses: - list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatusFragment] - :param os_type: Gets the OS type of the virtual machine. - :type os_type: str - :param vm_size: Gets the size of the virtual machine. - :type vm_size: str - :param network_interface_id: Gets the network interface ID of the virtual - machine. - :type network_interface_id: str - :param os_disk_id: Gets OS disk blob uri for the virtual machine. - :type os_disk_id: str - :param data_disk_ids: Gets data disks blob uri for the virtual machine. - :type data_disk_ids: list[str] - :param data_disks: Gets all data disks attached to the virtual machine. - :type data_disks: - list[~azure.mgmt.devtestlabs.models.ComputeDataDiskFragment] - """ - - _attribute_map = { - 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatusFragment]'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, - 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, - 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDiskFragment]'}, - } - - def __init__(self, **kwargs): - super(ComputeVmPropertiesFragment, self).__init__(**kwargs) - self.statuses = kwargs.get('statuses', None) - self.os_type = kwargs.get('os_type', None) - self.vm_size = kwargs.get('vm_size', None) - self.network_interface_id = kwargs.get('network_interface_id', None) - self.os_disk_id = kwargs.get('os_disk_id', None) - self.data_disk_ids = kwargs.get('data_disk_ids', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment_py3.py deleted file mode 100644 index 7668ed7983c1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmPropertiesFragment(Model): - """Properties of a virtual machine returned by the Microsoft.Compute API. - - :param statuses: Gets the statuses of the virtual machine. - :type statuses: - list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatusFragment] - :param os_type: Gets the OS type of the virtual machine. - :type os_type: str - :param vm_size: Gets the size of the virtual machine. - :type vm_size: str - :param network_interface_id: Gets the network interface ID of the virtual - machine. - :type network_interface_id: str - :param os_disk_id: Gets OS disk blob uri for the virtual machine. - :type os_disk_id: str - :param data_disk_ids: Gets data disks blob uri for the virtual machine. - :type data_disk_ids: list[str] - :param data_disks: Gets all data disks attached to the virtual machine. - :type data_disks: - list[~azure.mgmt.devtestlabs.models.ComputeDataDiskFragment] - """ - - _attribute_map = { - 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatusFragment]'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, - 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, - 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDiskFragment]'}, - } - - def __init__(self, *, statuses=None, os_type: str=None, vm_size: str=None, network_interface_id: str=None, os_disk_id: str=None, data_disk_ids=None, data_disks=None, **kwargs) -> None: - super(ComputeVmPropertiesFragment, self).__init__(**kwargs) - self.statuses = statuses - self.os_type = os_type - self.vm_size = vm_size - self.network_interface_id = network_interface_id - self.os_disk_id = os_disk_id - self.data_disk_ids = data_disk_ids - self.data_disks = data_disks diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_py3.py deleted file mode 100644 index 90c4ae4e246a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmProperties(Model): - """Properties of a virtual machine returned by the Microsoft.Compute API. - - :param statuses: Gets the statuses of the virtual machine. - :type statuses: - list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatus] - :param os_type: Gets the OS type of the virtual machine. - :type os_type: str - :param vm_size: Gets the size of the virtual machine. - :type vm_size: str - :param network_interface_id: Gets the network interface ID of the virtual - machine. - :type network_interface_id: str - :param os_disk_id: Gets OS disk blob uri for the virtual machine. - :type os_disk_id: str - :param data_disk_ids: Gets data disks blob uri for the virtual machine. - :type data_disk_ids: list[str] - :param data_disks: Gets all data disks attached to the virtual machine. - :type data_disks: list[~azure.mgmt.devtestlabs.models.ComputeDataDisk] - """ - - _attribute_map = { - 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatus]'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, - 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, - 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDisk]'}, - } - - def __init__(self, *, statuses=None, os_type: str=None, vm_size: str=None, network_interface_id: str=None, os_disk_id: str=None, data_disk_ids=None, data_disks=None, **kwargs) -> None: - super(ComputeVmProperties, self).__init__(**kwargs) - self.statuses = statuses - self.os_type = os_type - self.vm_size = vm_size - self.network_interface_id = network_interface_id - self.os_disk_id = os_disk_id - self.data_disk_ids = data_disk_ids - self.data_disks = data_disks diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties.py deleted file mode 100644 index 73269a4dd25d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CostThresholdProperties(Model): - """Properties of a cost threshold item. - - :param threshold_id: The ID of the cost threshold item. - :type threshold_id: str - :param percentage_threshold: The value of the percentage cost threshold. - :type percentage_threshold: - ~azure.mgmt.devtestlabs.models.PercentageCostThresholdProperties - :param display_on_chart: Indicates whether this threshold will be - displayed on cost charts. Possible values include: 'Enabled', 'Disabled' - :type display_on_chart: str or - ~azure.mgmt.devtestlabs.models.CostThresholdStatus - :param send_notification_when_exceeded: Indicates whether notifications - will be sent when this threshold is exceeded. Possible values include: - 'Enabled', 'Disabled' - :type send_notification_when_exceeded: str or - ~azure.mgmt.devtestlabs.models.CostThresholdStatus - :param notification_sent: Indicates the datetime when notifications were - last sent for this threshold. - :type notification_sent: str - """ - - _attribute_map = { - 'threshold_id': {'key': 'thresholdId', 'type': 'str'}, - 'percentage_threshold': {'key': 'percentageThreshold', 'type': 'PercentageCostThresholdProperties'}, - 'display_on_chart': {'key': 'displayOnChart', 'type': 'str'}, - 'send_notification_when_exceeded': {'key': 'sendNotificationWhenExceeded', 'type': 'str'}, - 'notification_sent': {'key': 'notificationSent', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CostThresholdProperties, self).__init__(**kwargs) - self.threshold_id = kwargs.get('threshold_id', None) - self.percentage_threshold = kwargs.get('percentage_threshold', None) - self.display_on_chart = kwargs.get('display_on_chart', None) - self.send_notification_when_exceeded = kwargs.get('send_notification_when_exceeded', None) - self.notification_sent = kwargs.get('notification_sent', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties_py3.py deleted file mode 100644 index fba335d6c3e5..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CostThresholdProperties(Model): - """Properties of a cost threshold item. - - :param threshold_id: The ID of the cost threshold item. - :type threshold_id: str - :param percentage_threshold: The value of the percentage cost threshold. - :type percentage_threshold: - ~azure.mgmt.devtestlabs.models.PercentageCostThresholdProperties - :param display_on_chart: Indicates whether this threshold will be - displayed on cost charts. Possible values include: 'Enabled', 'Disabled' - :type display_on_chart: str or - ~azure.mgmt.devtestlabs.models.CostThresholdStatus - :param send_notification_when_exceeded: Indicates whether notifications - will be sent when this threshold is exceeded. Possible values include: - 'Enabled', 'Disabled' - :type send_notification_when_exceeded: str or - ~azure.mgmt.devtestlabs.models.CostThresholdStatus - :param notification_sent: Indicates the datetime when notifications were - last sent for this threshold. - :type notification_sent: str - """ - - _attribute_map = { - 'threshold_id': {'key': 'thresholdId', 'type': 'str'}, - 'percentage_threshold': {'key': 'percentageThreshold', 'type': 'PercentageCostThresholdProperties'}, - 'display_on_chart': {'key': 'displayOnChart', 'type': 'str'}, - 'send_notification_when_exceeded': {'key': 'sendNotificationWhenExceeded', 'type': 'str'}, - 'notification_sent': {'key': 'notificationSent', 'type': 'str'}, - } - - def __init__(self, *, threshold_id: str=None, percentage_threshold=None, display_on_chart=None, send_notification_when_exceeded=None, notification_sent: str=None, **kwargs) -> None: - super(CostThresholdProperties, self).__init__(**kwargs) - self.threshold_id = threshold_id - self.percentage_threshold = percentage_threshold - self.display_on_chart = display_on_chart - self.send_notification_when_exceeded = send_notification_when_exceeded - self.notification_sent = notification_sent diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image.py deleted file mode 100644 index 136ee0481ee1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class CustomImage(Resource): - """A custom image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param vm: The virtual machine from which the image is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVm - :param vhd: The VHD from which the image is to be created. - :type vhd: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustom - :param description: The description of the custom image. - :type description: str - :param author: The author of the custom image. - :type author: str - :ivar creation_date: The creation date of the custom image. - :vartype creation_date: datetime - :param managed_image_id: The Managed Image Id backing the custom image. - :type managed_image_id: str - :param managed_snapshot_id: The Managed Snapshot Id backing the custom - image. - :type managed_snapshot_id: str - :param data_disk_storage_info: Storage information about the data disks - present in the custom image - :type data_disk_storage_info: - list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfo] - :param custom_image_plan: Storage information about the plan related to - this custom image - :type custom_image_plan: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlan - :param is_plan_authorized: Whether or not the custom images underlying - offer/plan has been enabled for programmatic deployment - :type is_plan_authorized: bool - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVm'}, - 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustom'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, - 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, - 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfo]'}, - 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlan'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CustomImage, self).__init__(**kwargs) - self.vm = kwargs.get('vm', None) - self.vhd = kwargs.get('vhd', None) - self.description = kwargs.get('description', None) - self.author = kwargs.get('author', None) - self.creation_date = None - self.managed_image_id = kwargs.get('managed_image_id', None) - self.managed_snapshot_id = kwargs.get('managed_snapshot_id', None) - self.data_disk_storage_info = kwargs.get('data_disk_storage_info', None) - self.custom_image_plan = kwargs.get('custom_image_plan', None) - self.is_plan_authorized = kwargs.get('is_plan_authorized', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment.py deleted file mode 100644 index 5ac36c53a6cd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class CustomImageFragment(UpdateResource): - """A custom image. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param vm: The virtual machine from which the image is to be created. - :type vm: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVmFragment - :param vhd: The VHD from which the image is to be created. - :type vhd: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustomFragment - :param description: The description of the custom image. - :type description: str - :param author: The author of the custom image. - :type author: str - :param managed_image_id: The Managed Image Id backing the custom image. - :type managed_image_id: str - :param managed_snapshot_id: The Managed Snapshot Id backing the custom - image. - :type managed_snapshot_id: str - :param data_disk_storage_info: Storage information about the data disks - present in the custom image - :type data_disk_storage_info: - list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfoFragment] - :param custom_image_plan: Storage information about the plan related to - this custom image - :type custom_image_plan: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlanFragment - :param is_plan_authorized: Whether or not the custom images underlying - offer/plan has been enabled for programmatic deployment - :type is_plan_authorized: bool - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVmFragment'}, - 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustomFragment'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, - 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, - 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfoFragment]'}, - 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlanFragment'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(CustomImageFragment, self).__init__(**kwargs) - self.vm = kwargs.get('vm', None) - self.vhd = kwargs.get('vhd', None) - self.description = kwargs.get('description', None) - self.author = kwargs.get('author', None) - self.managed_image_id = kwargs.get('managed_image_id', None) - self.managed_snapshot_id = kwargs.get('managed_snapshot_id', None) - self.data_disk_storage_info = kwargs.get('data_disk_storage_info', None) - self.custom_image_plan = kwargs.get('custom_image_plan', None) - self.is_plan_authorized = kwargs.get('is_plan_authorized', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment_py3.py deleted file mode 100644 index a3ccac2274eb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class CustomImageFragment(UpdateResource): - """A custom image. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param vm: The virtual machine from which the image is to be created. - :type vm: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVmFragment - :param vhd: The VHD from which the image is to be created. - :type vhd: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustomFragment - :param description: The description of the custom image. - :type description: str - :param author: The author of the custom image. - :type author: str - :param managed_image_id: The Managed Image Id backing the custom image. - :type managed_image_id: str - :param managed_snapshot_id: The Managed Snapshot Id backing the custom - image. - :type managed_snapshot_id: str - :param data_disk_storage_info: Storage information about the data disks - present in the custom image - :type data_disk_storage_info: - list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfoFragment] - :param custom_image_plan: Storage information about the plan related to - this custom image - :type custom_image_plan: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlanFragment - :param is_plan_authorized: Whether or not the custom images underlying - offer/plan has been enabled for programmatic deployment - :type is_plan_authorized: bool - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVmFragment'}, - 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustomFragment'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, - 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, - 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfoFragment]'}, - 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlanFragment'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - } - - def __init__(self, *, tags=None, vm=None, vhd=None, description: str=None, author: str=None, managed_image_id: str=None, managed_snapshot_id: str=None, data_disk_storage_info=None, custom_image_plan=None, is_plan_authorized: bool=None, **kwargs) -> None: - super(CustomImageFragment, self).__init__(tags=tags, **kwargs) - self.vm = vm - self.vhd = vhd - self.description = description - self.author = author - self.managed_image_id = managed_image_id - self.managed_snapshot_id = managed_snapshot_id - self.data_disk_storage_info = data_disk_storage_info - self.custom_image_plan = custom_image_plan - self.is_plan_authorized = is_plan_authorized diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_paged.py deleted file mode 100644 index d0e4b61d4560..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class CustomImagePaged(Paged): - """ - A paging container for iterating over a list of :class:`CustomImage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CustomImage]'} - } - - def __init__(self, *args, **kwargs): - - super(CustomImagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom.py deleted file mode 100644 index a1bd5ab66712..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesCustom(Model): - """Properties for creating a custom image from a VHD. - - All required parameters must be populated in order to send to Azure. - - :param image_name: The image name. - :type image_name: str - :param sys_prep: Indicates whether sysprep has been run on the VHD. - :type sys_prep: bool - :param os_type: Required. The OS type of the custom image (i.e. Windows, - Linux). Possible values include: 'Windows', 'Linux', 'None' - :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType - """ - - _validation = { - 'os_type': {'required': True}, - } - - _attribute_map = { - 'image_name': {'key': 'imageName', 'type': 'str'}, - 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesCustom, self).__init__(**kwargs) - self.image_name = kwargs.get('image_name', None) - self.sys_prep = kwargs.get('sys_prep', None) - self.os_type = kwargs.get('os_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment.py deleted file mode 100644 index 4fc581738e57..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesCustomFragment(Model): - """Properties for creating a custom image from a VHD. - - :param image_name: The image name. - :type image_name: str - :param sys_prep: Indicates whether sysprep has been run on the VHD. - :type sys_prep: bool - :param os_type: The OS type of the custom image (i.e. Windows, Linux). - Possible values include: 'Windows', 'Linux', 'None' - :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType - """ - - _attribute_map = { - 'image_name': {'key': 'imageName', 'type': 'str'}, - 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesCustomFragment, self).__init__(**kwargs) - self.image_name = kwargs.get('image_name', None) - self.sys_prep = kwargs.get('sys_prep', None) - self.os_type = kwargs.get('os_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment_py3.py deleted file mode 100644 index 3869682ca53d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesCustomFragment(Model): - """Properties for creating a custom image from a VHD. - - :param image_name: The image name. - :type image_name: str - :param sys_prep: Indicates whether sysprep has been run on the VHD. - :type sys_prep: bool - :param os_type: The OS type of the custom image (i.e. Windows, Linux). - Possible values include: 'Windows', 'Linux', 'None' - :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType - """ - - _attribute_map = { - 'image_name': {'key': 'imageName', 'type': 'str'}, - 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, *, image_name: str=None, sys_prep: bool=None, os_type=None, **kwargs) -> None: - super(CustomImagePropertiesCustomFragment, self).__init__(**kwargs) - self.image_name = image_name - self.sys_prep = sys_prep - self.os_type = os_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_py3.py deleted file mode 100644 index 5aede6b5507c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesCustom(Model): - """Properties for creating a custom image from a VHD. - - All required parameters must be populated in order to send to Azure. - - :param image_name: The image name. - :type image_name: str - :param sys_prep: Indicates whether sysprep has been run on the VHD. - :type sys_prep: bool - :param os_type: Required. The OS type of the custom image (i.e. Windows, - Linux). Possible values include: 'Windows', 'Linux', 'None' - :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType - """ - - _validation = { - 'os_type': {'required': True}, - } - - _attribute_map = { - 'image_name': {'key': 'imageName', 'type': 'str'}, - 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, *, os_type, image_name: str=None, sys_prep: bool=None, **kwargs) -> None: - super(CustomImagePropertiesCustom, self).__init__(**kwargs) - self.image_name = image_name - self.sys_prep = sys_prep - self.os_type = os_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan.py deleted file mode 100644 index 37067a750936..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromPlan(Model): - """Properties for plan on a custom image. - - :param id: The id of the plan, equivalent to name of the plan - :type id: str - :param publisher: The publisher for the plan from the marketplace image - the custom image is derived from - :type publisher: str - :param offer: The offer for the plan from the marketplace image the custom - image is derived from - :type offer: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesFromPlan, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.publisher = kwargs.get('publisher', None) - self.offer = kwargs.get('offer', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment.py deleted file mode 100644 index b8db62a3738f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromPlanFragment(Model): - """Properties for plan on a custom image. - - :param id: The id of the plan, equivalent to name of the plan - :type id: str - :param publisher: The publisher for the plan from the marketplace image - the custom image is derived from - :type publisher: str - :param offer: The offer for the plan from the marketplace image the custom - image is derived from - :type offer: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesFromPlanFragment, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.publisher = kwargs.get('publisher', None) - self.offer = kwargs.get('offer', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment_py3.py deleted file mode 100644 index 159740e13c32..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromPlanFragment(Model): - """Properties for plan on a custom image. - - :param id: The id of the plan, equivalent to name of the plan - :type id: str - :param publisher: The publisher for the plan from the marketplace image - the custom image is derived from - :type publisher: str - :param offer: The offer for the plan from the marketplace image the custom - image is derived from - :type offer: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, **kwargs) -> None: - super(CustomImagePropertiesFromPlanFragment, self).__init__(**kwargs) - self.id = id - self.publisher = publisher - self.offer = offer diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_py3.py deleted file mode 100644 index fcbfeea22012..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromPlan(Model): - """Properties for plan on a custom image. - - :param id: The id of the plan, equivalent to name of the plan - :type id: str - :param publisher: The publisher for the plan from the marketplace image - the custom image is derived from - :type publisher: str - :param offer: The offer for the plan from the marketplace image the custom - image is derived from - :type offer: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, **kwargs) -> None: - super(CustomImagePropertiesFromPlan, self).__init__(**kwargs) - self.id = id - self.publisher = publisher - self.offer = offer diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm.py deleted file mode 100644 index d08828df0def..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromVm(Model): - """Properties for creating a custom image from a virtual machine. - - :param source_vm_id: The source vm identifier. - :type source_vm_id: str - :param windows_os_info: The Windows OS information of the VM. - :type windows_os_info: ~azure.mgmt.devtestlabs.models.WindowsOsInfo - :param linux_os_info: The Linux OS information of the VM. - :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfo - """ - - _attribute_map = { - 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, - 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfo'}, - 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfo'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesFromVm, self).__init__(**kwargs) - self.source_vm_id = kwargs.get('source_vm_id', None) - self.windows_os_info = kwargs.get('windows_os_info', None) - self.linux_os_info = kwargs.get('linux_os_info', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment.py deleted file mode 100644 index c0274dab51e7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromVmFragment(Model): - """Properties for creating a custom image from a virtual machine. - - :param source_vm_id: The source vm identifier. - :type source_vm_id: str - :param windows_os_info: The Windows OS information of the VM. - :type windows_os_info: - ~azure.mgmt.devtestlabs.models.WindowsOsInfoFragment - :param linux_os_info: The Linux OS information of the VM. - :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfoFragment - """ - - _attribute_map = { - 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, - 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfoFragment'}, - 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfoFragment'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesFromVmFragment, self).__init__(**kwargs) - self.source_vm_id = kwargs.get('source_vm_id', None) - self.windows_os_info = kwargs.get('windows_os_info', None) - self.linux_os_info = kwargs.get('linux_os_info', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment_py3.py deleted file mode 100644 index 437a4005cf1e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromVmFragment(Model): - """Properties for creating a custom image from a virtual machine. - - :param source_vm_id: The source vm identifier. - :type source_vm_id: str - :param windows_os_info: The Windows OS information of the VM. - :type windows_os_info: - ~azure.mgmt.devtestlabs.models.WindowsOsInfoFragment - :param linux_os_info: The Linux OS information of the VM. - :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfoFragment - """ - - _attribute_map = { - 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, - 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfoFragment'}, - 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfoFragment'}, - } - - def __init__(self, *, source_vm_id: str=None, windows_os_info=None, linux_os_info=None, **kwargs) -> None: - super(CustomImagePropertiesFromVmFragment, self).__init__(**kwargs) - self.source_vm_id = source_vm_id - self.windows_os_info = windows_os_info - self.linux_os_info = linux_os_info diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_py3.py deleted file mode 100644 index 02a54467b6a7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromVm(Model): - """Properties for creating a custom image from a virtual machine. - - :param source_vm_id: The source vm identifier. - :type source_vm_id: str - :param windows_os_info: The Windows OS information of the VM. - :type windows_os_info: ~azure.mgmt.devtestlabs.models.WindowsOsInfo - :param linux_os_info: The Linux OS information of the VM. - :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfo - """ - - _attribute_map = { - 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, - 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfo'}, - 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfo'}, - } - - def __init__(self, *, source_vm_id: str=None, windows_os_info=None, linux_os_info=None, **kwargs) -> None: - super(CustomImagePropertiesFromVm, self).__init__(**kwargs) - self.source_vm_id = source_vm_id - self.windows_os_info = windows_os_info - self.linux_os_info = linux_os_info diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_py3.py deleted file mode 100644 index fd4736a3744b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_py3.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class CustomImage(Resource): - """A custom image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param vm: The virtual machine from which the image is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVm - :param vhd: The VHD from which the image is to be created. - :type vhd: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustom - :param description: The description of the custom image. - :type description: str - :param author: The author of the custom image. - :type author: str - :ivar creation_date: The creation date of the custom image. - :vartype creation_date: datetime - :param managed_image_id: The Managed Image Id backing the custom image. - :type managed_image_id: str - :param managed_snapshot_id: The Managed Snapshot Id backing the custom - image. - :type managed_snapshot_id: str - :param data_disk_storage_info: Storage information about the data disks - present in the custom image - :type data_disk_storage_info: - list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfo] - :param custom_image_plan: Storage information about the plan related to - this custom image - :type custom_image_plan: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlan - :param is_plan_authorized: Whether or not the custom images underlying - offer/plan has been enabled for programmatic deployment - :type is_plan_authorized: bool - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVm'}, - 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustom'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, - 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, - 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfo]'}, - 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlan'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, vm=None, vhd=None, description: str=None, author: str=None, managed_image_id: str=None, managed_snapshot_id: str=None, data_disk_storage_info=None, custom_image_plan=None, is_plan_authorized: bool=None, **kwargs) -> None: - super(CustomImage, self).__init__(location=location, tags=tags, **kwargs) - self.vm = vm - self.vhd = vhd - self.description = description - self.author = author - self.creation_date = None - self.managed_image_id = managed_image_id - self.managed_snapshot_id = managed_snapshot_id - self.data_disk_storage_info = data_disk_storage_info - self.custom_image_plan = custom_image_plan - self.is_plan_authorized = is_plan_authorized - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties.py deleted file mode 100644 index 7bbfad08d256..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskProperties(Model): - """Request body for adding a new or existing data disk to a virtual machine. - - :param attach_new_data_disk_options: Specifies options to attach a new - disk to the virtual machine. - :type attach_new_data_disk_options: - ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptions - :param existing_lab_disk_id: Specifies the existing lab disk id to attach - to virtual machine. - :type existing_lab_disk_id: str - :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, - ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type host_caching: str or - ~azure.mgmt.devtestlabs.models.HostCachingOptions - """ - - _attribute_map = { - 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptions'}, - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - 'host_caching': {'key': 'hostCaching', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataDiskProperties, self).__init__(**kwargs) - self.attach_new_data_disk_options = kwargs.get('attach_new_data_disk_options', None) - self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) - self.host_caching = kwargs.get('host_caching', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment.py deleted file mode 100644 index 71e152680e3f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskPropertiesFragment(Model): - """Request body for adding a new or existing data disk to a virtual machine. - - :param attach_new_data_disk_options: Specifies options to attach a new - disk to the virtual machine. - :type attach_new_data_disk_options: - ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptionsFragment - :param existing_lab_disk_id: Specifies the existing lab disk id to attach - to virtual machine. - :type existing_lab_disk_id: str - :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, - ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type host_caching: str or - ~azure.mgmt.devtestlabs.models.HostCachingOptions - """ - - _attribute_map = { - 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptionsFragment'}, - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - 'host_caching': {'key': 'hostCaching', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataDiskPropertiesFragment, self).__init__(**kwargs) - self.attach_new_data_disk_options = kwargs.get('attach_new_data_disk_options', None) - self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) - self.host_caching = kwargs.get('host_caching', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment_py3.py deleted file mode 100644 index d709d92d7113..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskPropertiesFragment(Model): - """Request body for adding a new or existing data disk to a virtual machine. - - :param attach_new_data_disk_options: Specifies options to attach a new - disk to the virtual machine. - :type attach_new_data_disk_options: - ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptionsFragment - :param existing_lab_disk_id: Specifies the existing lab disk id to attach - to virtual machine. - :type existing_lab_disk_id: str - :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, - ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type host_caching: str or - ~azure.mgmt.devtestlabs.models.HostCachingOptions - """ - - _attribute_map = { - 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptionsFragment'}, - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - 'host_caching': {'key': 'hostCaching', 'type': 'str'}, - } - - def __init__(self, *, attach_new_data_disk_options=None, existing_lab_disk_id: str=None, host_caching=None, **kwargs) -> None: - super(DataDiskPropertiesFragment, self).__init__(**kwargs) - self.attach_new_data_disk_options = attach_new_data_disk_options - self.existing_lab_disk_id = existing_lab_disk_id - self.host_caching = host_caching diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_py3.py deleted file mode 100644 index 9e654d16cd45..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskProperties(Model): - """Request body for adding a new or existing data disk to a virtual machine. - - :param attach_new_data_disk_options: Specifies options to attach a new - disk to the virtual machine. - :type attach_new_data_disk_options: - ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptions - :param existing_lab_disk_id: Specifies the existing lab disk id to attach - to virtual machine. - :type existing_lab_disk_id: str - :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, - ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type host_caching: str or - ~azure.mgmt.devtestlabs.models.HostCachingOptions - """ - - _attribute_map = { - 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptions'}, - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - 'host_caching': {'key': 'hostCaching', 'type': 'str'}, - } - - def __init__(self, *, attach_new_data_disk_options=None, existing_lab_disk_id: str=None, host_caching=None, **kwargs) -> None: - super(DataDiskProperties, self).__init__(**kwargs) - self.attach_new_data_disk_options = attach_new_data_disk_options - self.existing_lab_disk_id = existing_lab_disk_id - self.host_caching = host_caching diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info.py deleted file mode 100644 index 68a97bf75845..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskStorageTypeInfo(Model): - """Storage information about the data disks present in the custom image. - - :param lun: Disk Lun - :type lun: str - :param storage_type: Disk Storage Type. Possible values include: - 'Standard', 'Premium' - :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'str'}, - 'storage_type': {'key': 'storageType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataDiskStorageTypeInfo, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) - self.storage_type = kwargs.get('storage_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment.py deleted file mode 100644 index 62b512b1f863..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskStorageTypeInfoFragment(Model): - """Storage information about the data disks present in the custom image. - - :param lun: Disk Lun - :type lun: str - :param storage_type: Disk Storage Type. Possible values include: - 'Standard', 'Premium' - :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'str'}, - 'storage_type': {'key': 'storageType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataDiskStorageTypeInfoFragment, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) - self.storage_type = kwargs.get('storage_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment_py3.py deleted file mode 100644 index 9a1c830a7dcb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskStorageTypeInfoFragment(Model): - """Storage information about the data disks present in the custom image. - - :param lun: Disk Lun - :type lun: str - :param storage_type: Disk Storage Type. Possible values include: - 'Standard', 'Premium' - :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'str'}, - 'storage_type': {'key': 'storageType', 'type': 'str'}, - } - - def __init__(self, *, lun: str=None, storage_type=None, **kwargs) -> None: - super(DataDiskStorageTypeInfoFragment, self).__init__(**kwargs) - self.lun = lun - self.storage_type = storage_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_py3.py deleted file mode 100644 index d817ca84fdd8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskStorageTypeInfo(Model): - """Storage information about the data disks present in the custom image. - - :param lun: Disk Lun - :type lun: str - :param storage_type: Disk Storage Type. Possible values include: - 'Standard', 'Premium' - :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'str'}, - 'storage_type': {'key': 'storageType', 'type': 'str'}, - } - - def __init__(self, *, lun: str=None, storage_type=None, **kwargs) -> None: - super(DataDiskStorageTypeInfo, self).__init__(**kwargs) - self.lun = lun - self.storage_type = storage_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details.py deleted file mode 100644 index 7391a793dc1b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DayDetails(Model): - """Properties of a daily schedule. - - :param time: The time of day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DayDetails, self).__init__(**kwargs) - self.time = kwargs.get('time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment.py deleted file mode 100644 index b4f977d74fdf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DayDetailsFragment(Model): - """Properties of a daily schedule. - - :param time: The time of day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DayDetailsFragment, self).__init__(**kwargs) - self.time = kwargs.get('time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment_py3.py deleted file mode 100644 index 38c15b48bc89..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DayDetailsFragment(Model): - """Properties of a daily schedule. - - :param time: The time of day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, *, time: str=None, **kwargs) -> None: - super(DayDetailsFragment, self).__init__(**kwargs) - self.time = time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_py3.py deleted file mode 100644 index 593e341169d8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DayDetails(Model): - """Properties of a daily schedule. - - :param time: The time of day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, *, time: str=None, **kwargs) -> None: - super(DayDetails, self).__init__(**kwargs) - self.time = time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties.py deleted file mode 100644 index 9e66b91c3832..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DetachDataDiskProperties(Model): - """Request body for detaching data disk from a virtual machine. - - :param existing_lab_disk_id: Specifies the disk resource ID to detach from - virtual machine. - :type existing_lab_disk_id: str - """ - - _attribute_map = { - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DetachDataDiskProperties, self).__init__(**kwargs) - self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties_py3.py deleted file mode 100644 index ece9ea7842fb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DetachDataDiskProperties(Model): - """Request body for detaching data disk from a virtual machine. - - :param existing_lab_disk_id: Specifies the disk resource ID to detach from - virtual machine. - :type existing_lab_disk_id: str - """ - - _attribute_map = { - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - } - - def __init__(self, *, existing_lab_disk_id: str=None, **kwargs) -> None: - super(DetachDataDiskProperties, self).__init__(**kwargs) - self.existing_lab_disk_id = existing_lab_disk_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties.py deleted file mode 100644 index 2b781ad4f7ec..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DetachDiskProperties(Model): - """Properties of the disk to detach. - - :param leased_by_lab_vm_id: The resource ID of the Lab VM to which the - disk is attached. - :type leased_by_lab_vm_id: str - """ - - _attribute_map = { - 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DetachDiskProperties, self).__init__(**kwargs) - self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties_py3.py deleted file mode 100644 index bc02a7d21dc2..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DetachDiskProperties(Model): - """Properties of the disk to detach. - - :param leased_by_lab_vm_id: The resource ID of the Lab VM to which the - disk is attached. - :type leased_by_lab_vm_id: str - """ - - _attribute_map = { - 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, - } - - def __init__(self, *, leased_by_lab_vm_id: str=None, **kwargs) -> None: - super(DetachDiskProperties, self).__init__(**kwargs) - self.leased_by_lab_vm_id = leased_by_lab_vm_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk.py deleted file mode 100644 index e61a526ec3f7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Disk(Resource): - """A Disk. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param disk_size_gi_b: The size of the disk in Gibibytes. - :type disk_size_gi_b: int - :param leased_by_lab_vm_id: The resource ID of the VM to which this disk - is leased. - :type leased_by_lab_vm_id: str - :param disk_blob_name: When backed by a blob, the name of the VHD blob - without extension. - :type disk_blob_name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :ivar created_date: The creation date of the disk. - :vartype created_date: datetime - :param host_caching: The host caching policy of the disk (i.e. None, - ReadOnly, ReadWrite). - :type host_caching: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, - 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, - 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, - 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, - 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Disk, self).__init__(**kwargs) - self.disk_type = kwargs.get('disk_type', None) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) - self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) - self.disk_blob_name = kwargs.get('disk_blob_name', None) - self.disk_uri = kwargs.get('disk_uri', None) - self.created_date = None - self.host_caching = kwargs.get('host_caching', None) - self.managed_disk_id = kwargs.get('managed_disk_id', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment.py deleted file mode 100644 index fd351baa9716..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class DiskFragment(UpdateResource): - """A Disk. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param disk_size_gi_b: The size of the disk in Gibibytes. - :type disk_size_gi_b: int - :param leased_by_lab_vm_id: The resource ID of the VM to which this disk - is leased. - :type leased_by_lab_vm_id: str - :param disk_blob_name: When backed by a blob, the name of the VHD blob - without extension. - :type disk_blob_name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param host_caching: The host caching policy of the disk (i.e. None, - ReadOnly, ReadWrite). - :type host_caching: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, - 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, - 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, - 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, - 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, - 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DiskFragment, self).__init__(**kwargs) - self.disk_type = kwargs.get('disk_type', None) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) - self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) - self.disk_blob_name = kwargs.get('disk_blob_name', None) - self.disk_uri = kwargs.get('disk_uri', None) - self.host_caching = kwargs.get('host_caching', None) - self.managed_disk_id = kwargs.get('managed_disk_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment_py3.py deleted file mode 100644 index 6becee37891a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class DiskFragment(UpdateResource): - """A Disk. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param disk_size_gi_b: The size of the disk in Gibibytes. - :type disk_size_gi_b: int - :param leased_by_lab_vm_id: The resource ID of the VM to which this disk - is leased. - :type leased_by_lab_vm_id: str - :param disk_blob_name: When backed by a blob, the name of the VHD blob - without extension. - :type disk_blob_name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param host_caching: The host caching policy of the disk (i.e. None, - ReadOnly, ReadWrite). - :type host_caching: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, - 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, - 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, - 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, - 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, - 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, - } - - def __init__(self, *, tags=None, disk_type=None, disk_size_gi_b: int=None, leased_by_lab_vm_id: str=None, disk_blob_name: str=None, disk_uri: str=None, host_caching: str=None, managed_disk_id: str=None, **kwargs) -> None: - super(DiskFragment, self).__init__(tags=tags, **kwargs) - self.disk_type = disk_type - self.disk_size_gi_b = disk_size_gi_b - self.leased_by_lab_vm_id = leased_by_lab_vm_id - self.disk_blob_name = disk_blob_name - self.disk_uri = disk_uri - self.host_caching = host_caching - self.managed_disk_id = managed_disk_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_paged.py deleted file mode 100644 index 18396d66590a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DiskPaged(Paged): - """ - A paging container for iterating over a list of :class:`Disk ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Disk]'} - } - - def __init__(self, *args, **kwargs): - - super(DiskPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_py3.py deleted file mode 100644 index 5263a0668bcf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Disk(Resource): - """A Disk. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param disk_size_gi_b: The size of the disk in Gibibytes. - :type disk_size_gi_b: int - :param leased_by_lab_vm_id: The resource ID of the VM to which this disk - is leased. - :type leased_by_lab_vm_id: str - :param disk_blob_name: When backed by a blob, the name of the VHD blob - without extension. - :type disk_blob_name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :ivar created_date: The creation date of the disk. - :vartype created_date: datetime - :param host_caching: The host caching policy of the disk (i.e. None, - ReadOnly, ReadWrite). - :type host_caching: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, - 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, - 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, - 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, - 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, disk_type=None, disk_size_gi_b: int=None, leased_by_lab_vm_id: str=None, disk_blob_name: str=None, disk_uri: str=None, host_caching: str=None, managed_disk_id: str=None, **kwargs) -> None: - super(Disk, self).__init__(location=location, tags=tags, **kwargs) - self.disk_type = disk_type - self.disk_size_gi_b = disk_size_gi_b - self.leased_by_lab_vm_id = leased_by_lab_vm_id - self.disk_blob_name = disk_blob_name - self.disk_uri = disk_uri - self.created_date = None - self.host_caching = host_caching - self.managed_disk_id = managed_disk_id - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment.py deleted file mode 100644 index 47f7a67992f7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DtlEnvironment(Resource): - """An environment, which is essentially an ARM template deployment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param deployment_properties: The deployment properties of the - environment. - :type deployment_properties: - ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentProperties - :param arm_template_display_name: The display name of the Azure Resource - Manager template that produced the environment. - :type arm_template_display_name: str - :ivar resource_group_id: The identifier of the resource group containing - the environment's resources. - :vartype resource_group_id: str - :ivar created_by_user: The creator of the environment. - :vartype created_by_user: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource_group_id': {'readonly': True}, - 'created_by_user': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentProperties'}, - 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, - 'resource_group_id': {'key': 'properties.resourceGroupId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DtlEnvironment, self).__init__(**kwargs) - self.deployment_properties = kwargs.get('deployment_properties', None) - self.arm_template_display_name = kwargs.get('arm_template_display_name', None) - self.resource_group_id = None - self.created_by_user = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment.py deleted file mode 100644 index 14103673db5f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class DtlEnvironmentFragment(UpdateResource): - """An environment, which is essentially an ARM template deployment. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param deployment_properties: The deployment properties of the - environment. - :type deployment_properties: - ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentPropertiesFragment - :param arm_template_display_name: The display name of the Azure Resource - Manager template that produced the environment. - :type arm_template_display_name: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentPropertiesFragment'}, - 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DtlEnvironmentFragment, self).__init__(**kwargs) - self.deployment_properties = kwargs.get('deployment_properties', None) - self.arm_template_display_name = kwargs.get('arm_template_display_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment_py3.py deleted file mode 100644 index 9cd4e5caa7bf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class DtlEnvironmentFragment(UpdateResource): - """An environment, which is essentially an ARM template deployment. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param deployment_properties: The deployment properties of the - environment. - :type deployment_properties: - ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentPropertiesFragment - :param arm_template_display_name: The display name of the Azure Resource - Manager template that produced the environment. - :type arm_template_display_name: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentPropertiesFragment'}, - 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, - } - - def __init__(self, *, tags=None, deployment_properties=None, arm_template_display_name: str=None, **kwargs) -> None: - super(DtlEnvironmentFragment, self).__init__(tags=tags, **kwargs) - self.deployment_properties = deployment_properties - self.arm_template_display_name = arm_template_display_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_paged.py deleted file mode 100644 index e7c297f07ffa..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DtlEnvironmentPaged(Paged): - """ - A paging container for iterating over a list of :class:`DtlEnvironment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DtlEnvironment]'} - } - - def __init__(self, *args, **kwargs): - - super(DtlEnvironmentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_py3.py deleted file mode 100644 index f2fbb899f8cf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class DtlEnvironment(Resource): - """An environment, which is essentially an ARM template deployment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param deployment_properties: The deployment properties of the - environment. - :type deployment_properties: - ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentProperties - :param arm_template_display_name: The display name of the Azure Resource - Manager template that produced the environment. - :type arm_template_display_name: str - :ivar resource_group_id: The identifier of the resource group containing - the environment's resources. - :vartype resource_group_id: str - :ivar created_by_user: The creator of the environment. - :vartype created_by_user: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource_group_id': {'readonly': True}, - 'created_by_user': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentProperties'}, - 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, - 'resource_group_id': {'key': 'properties.resourceGroupId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, deployment_properties=None, arm_template_display_name: str=None, **kwargs) -> None: - super(DtlEnvironment, self).__init__(location=location, tags=tags, **kwargs) - self.deployment_properties = deployment_properties - self.arm_template_display_name = arm_template_display_name - self.resource_group_id = None - self.created_by_user = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties.py deleted file mode 100644 index 31dc62dfc89e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnvironmentDeploymentProperties(Model): - """Properties of an environment deployment. - - :param arm_template_id: The Azure Resource Manager template's identifier. - :type arm_template_id: str - :param parameters: The parameters of the Azure Resource Manager template. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterProperties] - """ - - _attribute_map = { - 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterProperties]'}, - } - - def __init__(self, **kwargs): - super(EnvironmentDeploymentProperties, self).__init__(**kwargs) - self.arm_template_id = kwargs.get('arm_template_id', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment.py deleted file mode 100644 index e441cfd4a17d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnvironmentDeploymentPropertiesFragment(Model): - """Properties of an environment deployment. - - :param arm_template_id: The Azure Resource Manager template's identifier. - :type arm_template_id: str - :param parameters: The parameters of the Azure Resource Manager template. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterPropertiesFragment] - """ - - _attribute_map = { - 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterPropertiesFragment]'}, - } - - def __init__(self, **kwargs): - super(EnvironmentDeploymentPropertiesFragment, self).__init__(**kwargs) - self.arm_template_id = kwargs.get('arm_template_id', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment_py3.py deleted file mode 100644 index 1a30a6aef98e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnvironmentDeploymentPropertiesFragment(Model): - """Properties of an environment deployment. - - :param arm_template_id: The Azure Resource Manager template's identifier. - :type arm_template_id: str - :param parameters: The parameters of the Azure Resource Manager template. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterPropertiesFragment] - """ - - _attribute_map = { - 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterPropertiesFragment]'}, - } - - def __init__(self, *, arm_template_id: str=None, parameters=None, **kwargs) -> None: - super(EnvironmentDeploymentPropertiesFragment, self).__init__(**kwargs) - self.arm_template_id = arm_template_id - self.parameters = parameters diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_py3.py deleted file mode 100644 index 866bbe7d7ebf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnvironmentDeploymentProperties(Model): - """Properties of an environment deployment. - - :param arm_template_id: The Azure Resource Manager template's identifier. - :type arm_template_id: str - :param parameters: The parameters of the Azure Resource Manager template. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterProperties] - """ - - _attribute_map = { - 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterProperties]'}, - } - - def __init__(self, *, arm_template_id: str=None, parameters=None, **kwargs) -> None: - super(EnvironmentDeploymentProperties, self).__init__(**kwargs) - self.arm_template_id = arm_template_id - self.parameters = parameters diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties.py deleted file mode 100644 index ec21cf9c743e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EvaluatePoliciesProperties(Model): - """Properties for evaluating a policy set. - - :param fact_name: The fact name. - :type fact_name: str - :param fact_data: The fact data. - :type fact_data: str - :param value_offset: The value offset. - :type value_offset: str - :param user_object_id: The user for which policies will be evaluated - :type user_object_id: str - """ - - _attribute_map = { - 'fact_name': {'key': 'factName', 'type': 'str'}, - 'fact_data': {'key': 'factData', 'type': 'str'}, - 'value_offset': {'key': 'valueOffset', 'type': 'str'}, - 'user_object_id': {'key': 'userObjectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EvaluatePoliciesProperties, self).__init__(**kwargs) - self.fact_name = kwargs.get('fact_name', None) - self.fact_data = kwargs.get('fact_data', None) - self.value_offset = kwargs.get('value_offset', None) - self.user_object_id = kwargs.get('user_object_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties_py3.py deleted file mode 100644 index 5f45b40617a1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EvaluatePoliciesProperties(Model): - """Properties for evaluating a policy set. - - :param fact_name: The fact name. - :type fact_name: str - :param fact_data: The fact data. - :type fact_data: str - :param value_offset: The value offset. - :type value_offset: str - :param user_object_id: The user for which policies will be evaluated - :type user_object_id: str - """ - - _attribute_map = { - 'fact_name': {'key': 'factName', 'type': 'str'}, - 'fact_data': {'key': 'factData', 'type': 'str'}, - 'value_offset': {'key': 'valueOffset', 'type': 'str'}, - 'user_object_id': {'key': 'userObjectId', 'type': 'str'}, - } - - def __init__(self, *, fact_name: str=None, fact_data: str=None, value_offset: str=None, user_object_id: str=None, **kwargs) -> None: - super(EvaluatePoliciesProperties, self).__init__(**kwargs) - self.fact_name = fact_name - self.fact_data = fact_data - self.value_offset = value_offset - self.user_object_id = user_object_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request.py deleted file mode 100644 index 3476c2176cd0..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EvaluatePoliciesRequest(Model): - """Request body for evaluating a policy set. - - :param policies: Policies to evaluate. - :type policies: - list[~azure.mgmt.devtestlabs.models.EvaluatePoliciesProperties] - """ - - _attribute_map = { - 'policies': {'key': 'policies', 'type': '[EvaluatePoliciesProperties]'}, - } - - def __init__(self, **kwargs): - super(EvaluatePoliciesRequest, self).__init__(**kwargs) - self.policies = kwargs.get('policies', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request_py3.py deleted file mode 100644 index 657e3a980fbb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EvaluatePoliciesRequest(Model): - """Request body for evaluating a policy set. - - :param policies: Policies to evaluate. - :type policies: - list[~azure.mgmt.devtestlabs.models.EvaluatePoliciesProperties] - """ - - _attribute_map = { - 'policies': {'key': 'policies', 'type': '[EvaluatePoliciesProperties]'}, - } - - def __init__(self, *, policies=None, **kwargs) -> None: - super(EvaluatePoliciesRequest, self).__init__(**kwargs) - self.policies = policies diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response.py deleted file mode 100644 index be1baad1d5a8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EvaluatePoliciesResponse(Model): - """Response body for evaluating a policy set. - - :param results: Results of evaluating a policy set. - :type results: list[~azure.mgmt.devtestlabs.models.PolicySetResult] - """ - - _attribute_map = { - 'results': {'key': 'results', 'type': '[PolicySetResult]'}, - } - - def __init__(self, **kwargs): - super(EvaluatePoliciesResponse, self).__init__(**kwargs) - self.results = kwargs.get('results', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response_py3.py deleted file mode 100644 index 166eb2130754..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EvaluatePoliciesResponse(Model): - """Response body for evaluating a policy set. - - :param results: Results of evaluating a policy set. - :type results: list[~azure.mgmt.devtestlabs.models.PolicySetResult] - """ - - _attribute_map = { - 'results': {'key': 'results', 'type': '[PolicySetResult]'}, - } - - def __init__(self, *, results=None, **kwargs) -> None: - super(EvaluatePoliciesResponse, self).__init__(**kwargs) - self.results = results diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event.py deleted file mode 100644 index 98395545b13e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Event(Model): - """An event to be notified for. - - :param event_name: The event type for which this notification is enabled - (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Event, self).__init__(**kwargs) - self.event_name = kwargs.get('event_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment.py deleted file mode 100644 index f6d18b5ba3e9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventFragment(Model): - """An event to be notified for. - - :param event_name: The event type for which this notification is enabled - (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EventFragment, self).__init__(**kwargs) - self.event_name = kwargs.get('event_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment_py3.py deleted file mode 100644 index a785e4b7201a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventFragment(Model): - """An event to be notified for. - - :param event_name: The event type for which this notification is enabled - (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - } - - def __init__(self, *, event_name=None, **kwargs) -> None: - super(EventFragment, self).__init__(**kwargs) - self.event_name = event_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_py3.py deleted file mode 100644 index faa50f83daea..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Event(Model): - """An event to be notified for. - - :param event_name: The event type for which this notification is enabled - (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - } - - def __init__(self, *, event_name=None, **kwargs) -> None: - super(Event, self).__init__(**kwargs) - self.event_name = event_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters.py deleted file mode 100644 index 464db115a353..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportResourceUsageParameters(Model): - """The parameters of the export operation. - - :param blob_storage_absolute_sas_uri: The blob storage absolute sas uri - with write permission to the container which the usage data needs to be - uploaded to. - :type blob_storage_absolute_sas_uri: str - :param usage_start_date: The start time of the usage. If not provided, - usage will be reported since the beginning of data collection. - :type usage_start_date: datetime - """ - - _attribute_map = { - 'blob_storage_absolute_sas_uri': {'key': 'blobStorageAbsoluteSasUri', 'type': 'str'}, - 'usage_start_date': {'key': 'usageStartDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ExportResourceUsageParameters, self).__init__(**kwargs) - self.blob_storage_absolute_sas_uri = kwargs.get('blob_storage_absolute_sas_uri', None) - self.usage_start_date = kwargs.get('usage_start_date', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters_py3.py deleted file mode 100644 index f58597733273..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportResourceUsageParameters(Model): - """The parameters of the export operation. - - :param blob_storage_absolute_sas_uri: The blob storage absolute sas uri - with write permission to the container which the usage data needs to be - uploaded to. - :type blob_storage_absolute_sas_uri: str - :param usage_start_date: The start time of the usage. If not provided, - usage will be reported since the beginning of data collection. - :type usage_start_date: datetime - """ - - _attribute_map = { - 'blob_storage_absolute_sas_uri': {'key': 'blobStorageAbsoluteSasUri', 'type': 'str'}, - 'usage_start_date': {'key': 'usageStartDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, blob_storage_absolute_sas_uri: str=None, usage_start_date=None, **kwargs) -> None: - super(ExportResourceUsageParameters, self).__init__(**kwargs) - self.blob_storage_absolute_sas_uri = blob_storage_absolute_sas_uri - self.usage_start_date = usage_start_date diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet.py deleted file mode 100644 index 6f7f1ff89fca..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExternalSubnet(Model): - """Subnet information as returned by the Microsoft.Network API. - - :param id: Gets or sets the identifier. - :type id: str - :param name: Gets or sets the name. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExternalSubnet, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment.py deleted file mode 100644 index ab2d5769fdab..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExternalSubnetFragment(Model): - """Subnet information as returned by the Microsoft.Network API. - - :param id: Gets or sets the identifier. - :type id: str - :param name: Gets or sets the name. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExternalSubnetFragment, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment_py3.py deleted file mode 100644 index f5f57186e9e5..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExternalSubnetFragment(Model): - """Subnet information as returned by the Microsoft.Network API. - - :param id: Gets or sets the identifier. - :type id: str - :param name: Gets or sets the name. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: - super(ExternalSubnetFragment, self).__init__(**kwargs) - self.id = id - self.name = name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_py3.py deleted file mode 100644 index 8a780e424313..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExternalSubnet(Model): - """Subnet information as returned by the Microsoft.Network API. - - :param id: Gets or sets the identifier. - :type id: str - :param name: Gets or sets the name. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: - super(ExternalSubnet, self).__init__(**kwargs) - self.id = id - self.name = name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula.py deleted file mode 100644 index e4b18a64b9fa..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Formula(Resource): - """A formula for creating a VM, specifying an image base and other parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the formula. - :type description: str - :param author: The author of the formula. - :type author: str - :param os_type: The OS type of the formula. - :type os_type: str - :ivar creation_date: The creation date of the formula. - :vartype creation_date: datetime - :param formula_content: The content of the formula. - :type formula_content: - ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameter - :param vm: Information about a VM from which a formula is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVm - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameter'}, - 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVm'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Formula, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.author = kwargs.get('author', None) - self.os_type = kwargs.get('os_type', None) - self.creation_date = None - self.formula_content = kwargs.get('formula_content', None) - self.vm = kwargs.get('vm', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment.py deleted file mode 100644 index f072e37b3036..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class FormulaFragment(UpdateResource): - """A formula for creating a VM, specifying an image base and other parameters. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the formula. - :type description: str - :param author: The author of the formula. - :type author: str - :param os_type: The OS type of the formula. - :type os_type: str - :param formula_content: The content of the formula. - :type formula_content: - ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameterFragment - :param vm: Information about a VM from which a formula is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVmFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameterFragment'}, - 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVmFragment'}, - } - - def __init__(self, **kwargs): - super(FormulaFragment, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.author = kwargs.get('author', None) - self.os_type = kwargs.get('os_type', None) - self.formula_content = kwargs.get('formula_content', None) - self.vm = kwargs.get('vm', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment_py3.py deleted file mode 100644 index 0f212fb85237..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class FormulaFragment(UpdateResource): - """A formula for creating a VM, specifying an image base and other parameters. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the formula. - :type description: str - :param author: The author of the formula. - :type author: str - :param os_type: The OS type of the formula. - :type os_type: str - :param formula_content: The content of the formula. - :type formula_content: - ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameterFragment - :param vm: Information about a VM from which a formula is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVmFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameterFragment'}, - 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVmFragment'}, - } - - def __init__(self, *, tags=None, description: str=None, author: str=None, os_type: str=None, formula_content=None, vm=None, **kwargs) -> None: - super(FormulaFragment, self).__init__(tags=tags, **kwargs) - self.description = description - self.author = author - self.os_type = os_type - self.formula_content = formula_content - self.vm = vm diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_paged.py deleted file mode 100644 index b8ae79e7de9d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class FormulaPaged(Paged): - """ - A paging container for iterating over a list of :class:`Formula ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Formula]'} - } - - def __init__(self, *args, **kwargs): - - super(FormulaPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm.py deleted file mode 100644 index 0811ea901b40..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FormulaPropertiesFromVm(Model): - """Information about a VM from which a formula is to be created. - - :param lab_vm_id: The identifier of the VM from which a formula is to be - created. - :type lab_vm_id: str - """ - - _attribute_map = { - 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FormulaPropertiesFromVm, self).__init__(**kwargs) - self.lab_vm_id = kwargs.get('lab_vm_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment.py deleted file mode 100644 index 240d0674d57e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FormulaPropertiesFromVmFragment(Model): - """Information about a VM from which a formula is to be created. - - :param lab_vm_id: The identifier of the VM from which a formula is to be - created. - :type lab_vm_id: str - """ - - _attribute_map = { - 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FormulaPropertiesFromVmFragment, self).__init__(**kwargs) - self.lab_vm_id = kwargs.get('lab_vm_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment_py3.py deleted file mode 100644 index 1fff926ae626..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FormulaPropertiesFromVmFragment(Model): - """Information about a VM from which a formula is to be created. - - :param lab_vm_id: The identifier of the VM from which a formula is to be - created. - :type lab_vm_id: str - """ - - _attribute_map = { - 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, - } - - def __init__(self, *, lab_vm_id: str=None, **kwargs) -> None: - super(FormulaPropertiesFromVmFragment, self).__init__(**kwargs) - self.lab_vm_id = lab_vm_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_py3.py deleted file mode 100644 index 2d7ac51274fe..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FormulaPropertiesFromVm(Model): - """Information about a VM from which a formula is to be created. - - :param lab_vm_id: The identifier of the VM from which a formula is to be - created. - :type lab_vm_id: str - """ - - _attribute_map = { - 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, - } - - def __init__(self, *, lab_vm_id: str=None, **kwargs) -> None: - super(FormulaPropertiesFromVm, self).__init__(**kwargs) - self.lab_vm_id = lab_vm_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_py3.py deleted file mode 100644 index 907919f44485..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_py3.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Formula(Resource): - """A formula for creating a VM, specifying an image base and other parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the formula. - :type description: str - :param author: The author of the formula. - :type author: str - :param os_type: The OS type of the formula. - :type os_type: str - :ivar creation_date: The creation date of the formula. - :vartype creation_date: datetime - :param formula_content: The content of the formula. - :type formula_content: - ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameter - :param vm: Information about a VM from which a formula is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVm - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameter'}, - 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVm'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, description: str=None, author: str=None, os_type: str=None, formula_content=None, vm=None, **kwargs) -> None: - super(Formula, self).__init__(location=location, tags=tags, **kwargs) - self.description = description - self.author = author - self.os_type = os_type - self.creation_date = None - self.formula_content = formula_content - self.vm = vm - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image.py deleted file mode 100644 index c16dcfd6e97f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class GalleryImage(Resource): - """A gallery image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param author: The author of the gallery image. - :type author: str - :ivar created_date: The creation date of the gallery image. - :vartype created_date: datetime - :param description: The description of the gallery image. - :type description: str - :param image_reference: The image reference of the gallery image. - :type image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param icon: The icon of the gallery image. - :type icon: str - :param enabled: Indicates whether this gallery image is enabled. - :type enabled: bool - :param plan_id: The third party plan that applies to this image - :type plan_id: str - :param is_plan_authorized: Indicates if the plan has been authorized for - programmatic deployment. - :type is_plan_authorized: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'image_reference': {'key': 'properties.imageReference', 'type': 'GalleryImageReference'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(GalleryImage, self).__init__(**kwargs) - self.author = kwargs.get('author', None) - self.created_date = None - self.description = kwargs.get('description', None) - self.image_reference = kwargs.get('image_reference', None) - self.icon = kwargs.get('icon', None) - self.enabled = kwargs.get('enabled', None) - self.plan_id = kwargs.get('plan_id', None) - self.is_plan_authorized = kwargs.get('is_plan_authorized', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_paged.py deleted file mode 100644 index 2712de454c83..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class GalleryImagePaged(Paged): - """ - A paging container for iterating over a list of :class:`GalleryImage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GalleryImage]'} - } - - def __init__(self, *args, **kwargs): - - super(GalleryImagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_py3.py deleted file mode 100644 index 2097997302c9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_py3.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class GalleryImage(Resource): - """A gallery image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param author: The author of the gallery image. - :type author: str - :ivar created_date: The creation date of the gallery image. - :vartype created_date: datetime - :param description: The description of the gallery image. - :type description: str - :param image_reference: The image reference of the gallery image. - :type image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param icon: The icon of the gallery image. - :type icon: str - :param enabled: Indicates whether this gallery image is enabled. - :type enabled: bool - :param plan_id: The third party plan that applies to this image - :type plan_id: str - :param is_plan_authorized: Indicates if the plan has been authorized for - programmatic deployment. - :type is_plan_authorized: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'image_reference': {'key': 'properties.imageReference', 'type': 'GalleryImageReference'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - } - - def __init__(self, *, location: str=None, tags=None, author: str=None, description: str=None, image_reference=None, icon: str=None, enabled: bool=None, plan_id: str=None, is_plan_authorized: bool=None, **kwargs) -> None: - super(GalleryImage, self).__init__(location=location, tags=tags, **kwargs) - self.author = author - self.created_date = None - self.description = description - self.image_reference = image_reference - self.icon = icon - self.enabled = enabled - self.plan_id = plan_id - self.is_plan_authorized = is_plan_authorized diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference.py deleted file mode 100644 index c896911316fd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryImageReference(Model): - """The reference information for an Azure Marketplace image. - - :param offer: The offer of the gallery image. - :type offer: str - :param publisher: The publisher of the gallery image. - :type publisher: str - :param sku: The SKU of the gallery image. - :type sku: str - :param os_type: The OS type of the gallery image. - :type os_type: str - :param version: The version of the gallery image. - :type version: str - """ - - _attribute_map = { - 'offer': {'key': 'offer', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GalleryImageReference, self).__init__(**kwargs) - self.offer = kwargs.get('offer', None) - self.publisher = kwargs.get('publisher', None) - self.sku = kwargs.get('sku', None) - self.os_type = kwargs.get('os_type', None) - self.version = kwargs.get('version', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment.py deleted file mode 100644 index 6bd266dbfbd8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryImageReferenceFragment(Model): - """The reference information for an Azure Marketplace image. - - :param offer: The offer of the gallery image. - :type offer: str - :param publisher: The publisher of the gallery image. - :type publisher: str - :param sku: The SKU of the gallery image. - :type sku: str - :param os_type: The OS type of the gallery image. - :type os_type: str - :param version: The version of the gallery image. - :type version: str - """ - - _attribute_map = { - 'offer': {'key': 'offer', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GalleryImageReferenceFragment, self).__init__(**kwargs) - self.offer = kwargs.get('offer', None) - self.publisher = kwargs.get('publisher', None) - self.sku = kwargs.get('sku', None) - self.os_type = kwargs.get('os_type', None) - self.version = kwargs.get('version', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment_py3.py deleted file mode 100644 index 3ebbfa4662f7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryImageReferenceFragment(Model): - """The reference information for an Azure Marketplace image. - - :param offer: The offer of the gallery image. - :type offer: str - :param publisher: The publisher of the gallery image. - :type publisher: str - :param sku: The SKU of the gallery image. - :type sku: str - :param os_type: The OS type of the gallery image. - :type os_type: str - :param version: The version of the gallery image. - :type version: str - """ - - _attribute_map = { - 'offer': {'key': 'offer', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, offer: str=None, publisher: str=None, sku: str=None, os_type: str=None, version: str=None, **kwargs) -> None: - super(GalleryImageReferenceFragment, self).__init__(**kwargs) - self.offer = offer - self.publisher = publisher - self.sku = sku - self.os_type = os_type - self.version = version diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_py3.py deleted file mode 100644 index 2541dc5b63e9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryImageReference(Model): - """The reference information for an Azure Marketplace image. - - :param offer: The offer of the gallery image. - :type offer: str - :param publisher: The publisher of the gallery image. - :type publisher: str - :param sku: The SKU of the gallery image. - :type sku: str - :param os_type: The OS type of the gallery image. - :type os_type: str - :param version: The version of the gallery image. - :type version: str - """ - - _attribute_map = { - 'offer': {'key': 'offer', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, offer: str=None, publisher: str=None, sku: str=None, os_type: str=None, version: str=None, **kwargs) -> None: - super(GalleryImageReference, self).__init__(**kwargs) - self.offer = offer - self.publisher = publisher - self.sku = sku - self.os_type = os_type - self.version = version diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request.py deleted file mode 100644 index 3c5fb7b2fafd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GenerateArmTemplateRequest(Model): - """Parameters for generating an ARM template for deploying artifacts. - - :param virtual_machine_name: The resource name of the virtual machine. - :type virtual_machine_name: str - :param parameters: The parameters of the ARM template. - :type parameters: list[~azure.mgmt.devtestlabs.models.ParameterInfo] - :param location: The location of the virtual machine. - :type location: str - :param file_upload_options: Options for uploading the files for the - artifact. UploadFilesAndGenerateSasTokens is the default value. Possible - values include: 'UploadFilesAndGenerateSasTokens', 'None' - :type file_upload_options: str or - ~azure.mgmt.devtestlabs.models.FileUploadOptions - """ - - _attribute_map = { - 'virtual_machine_name': {'key': 'virtualMachineName', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ParameterInfo]'}, - 'location': {'key': 'location', 'type': 'str'}, - 'file_upload_options': {'key': 'fileUploadOptions', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GenerateArmTemplateRequest, self).__init__(**kwargs) - self.virtual_machine_name = kwargs.get('virtual_machine_name', None) - self.parameters = kwargs.get('parameters', None) - self.location = kwargs.get('location', None) - self.file_upload_options = kwargs.get('file_upload_options', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request_py3.py deleted file mode 100644 index 677085554d25..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GenerateArmTemplateRequest(Model): - """Parameters for generating an ARM template for deploying artifacts. - - :param virtual_machine_name: The resource name of the virtual machine. - :type virtual_machine_name: str - :param parameters: The parameters of the ARM template. - :type parameters: list[~azure.mgmt.devtestlabs.models.ParameterInfo] - :param location: The location of the virtual machine. - :type location: str - :param file_upload_options: Options for uploading the files for the - artifact. UploadFilesAndGenerateSasTokens is the default value. Possible - values include: 'UploadFilesAndGenerateSasTokens', 'None' - :type file_upload_options: str or - ~azure.mgmt.devtestlabs.models.FileUploadOptions - """ - - _attribute_map = { - 'virtual_machine_name': {'key': 'virtualMachineName', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ParameterInfo]'}, - 'location': {'key': 'location', 'type': 'str'}, - 'file_upload_options': {'key': 'fileUploadOptions', 'type': 'str'}, - } - - def __init__(self, *, virtual_machine_name: str=None, parameters=None, location: str=None, file_upload_options=None, **kwargs) -> None: - super(GenerateArmTemplateRequest, self).__init__(**kwargs) - self.virtual_machine_name = virtual_machine_name - self.parameters = parameters - self.location = location - self.file_upload_options = file_upload_options diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter.py deleted file mode 100644 index 801afae7e028..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GenerateUploadUriParameter(Model): - """Properties for generating an upload URI. - - :param blob_name: The blob name of the upload URI. - :type blob_name: str - """ - - _attribute_map = { - 'blob_name': {'key': 'blobName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GenerateUploadUriParameter, self).__init__(**kwargs) - self.blob_name = kwargs.get('blob_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter_py3.py deleted file mode 100644 index ebc5724f0614..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GenerateUploadUriParameter(Model): - """Properties for generating an upload URI. - - :param blob_name: The blob name of the upload URI. - :type blob_name: str - """ - - _attribute_map = { - 'blob_name': {'key': 'blobName', 'type': 'str'}, - } - - def __init__(self, *, blob_name: str=None, **kwargs) -> None: - super(GenerateUploadUriParameter, self).__init__(**kwargs) - self.blob_name = blob_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response.py deleted file mode 100644 index 6b89d3111051..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GenerateUploadUriResponse(Model): - """Response body for generating an upload URI. - - :param upload_uri: The upload URI for the VHD. - :type upload_uri: str - """ - - _attribute_map = { - 'upload_uri': {'key': 'uploadUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GenerateUploadUriResponse, self).__init__(**kwargs) - self.upload_uri = kwargs.get('upload_uri', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response_py3.py deleted file mode 100644 index 8807569409ac..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GenerateUploadUriResponse(Model): - """Response body for generating an upload URI. - - :param upload_uri: The upload URI for the VHD. - :type upload_uri: str - """ - - _attribute_map = { - 'upload_uri': {'key': 'uploadUri', 'type': 'str'}, - } - - def __init__(self, *, upload_uri: str=None, **kwargs) -> None: - super(GenerateUploadUriResponse, self).__init__(**kwargs) - self.upload_uri = upload_uri diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details.py deleted file mode 100644 index e310a1bbc923..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HourDetails(Model): - """Properties of an hourly schedule. - - :param minute: Minutes of the hour the schedule will run. - :type minute: int - """ - - _attribute_map = { - 'minute': {'key': 'minute', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(HourDetails, self).__init__(**kwargs) - self.minute = kwargs.get('minute', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment.py deleted file mode 100644 index 3a41af20481d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HourDetailsFragment(Model): - """Properties of an hourly schedule. - - :param minute: Minutes of the hour the schedule will run. - :type minute: int - """ - - _attribute_map = { - 'minute': {'key': 'minute', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(HourDetailsFragment, self).__init__(**kwargs) - self.minute = kwargs.get('minute', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment_py3.py deleted file mode 100644 index afa962a3c628..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HourDetailsFragment(Model): - """Properties of an hourly schedule. - - :param minute: Minutes of the hour the schedule will run. - :type minute: int - """ - - _attribute_map = { - 'minute': {'key': 'minute', 'type': 'int'}, - } - - def __init__(self, *, minute: int=None, **kwargs) -> None: - super(HourDetailsFragment, self).__init__(**kwargs) - self.minute = minute diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_py3.py deleted file mode 100644 index 52c323352b24..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HourDetails(Model): - """Properties of an hourly schedule. - - :param minute: Minutes of the hour the schedule will run. - :type minute: int - """ - - _attribute_map = { - 'minute': {'key': 'minute', 'type': 'int'}, - } - - def __init__(self, *, minute: int=None, **kwargs) -> None: - super(HourDetails, self).__init__(**kwargs) - self.minute = minute diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties.py deleted file mode 100644 index ed4b127fc39c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IdentityProperties(Model): - """Properties of a managed identity. - - :param type: Managed identity. - :type type: str - :param principal_id: The principal id of resource identity. - :type principal_id: str - :param tenant_id: The tenant identifier of resource. - :type tenant_id: str - :param client_secret_url: The client secret URL of the identity. - :type client_secret_url: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'client_secret_url': {'key': 'clientSecretUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IdentityProperties, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.principal_id = kwargs.get('principal_id', None) - self.tenant_id = kwargs.get('tenant_id', None) - self.client_secret_url = kwargs.get('client_secret_url', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties_py3.py deleted file mode 100644 index 63fb90a1b974..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IdentityProperties(Model): - """Properties of a managed identity. - - :param type: Managed identity. - :type type: str - :param principal_id: The principal id of resource identity. - :type principal_id: str - :param tenant_id: The tenant identifier of resource. - :type tenant_id: str - :param client_secret_url: The client secret URL of the identity. - :type client_secret_url: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'client_secret_url': {'key': 'clientSecretUrl', 'type': 'str'}, - } - - def __init__(self, *, type: str=None, principal_id: str=None, tenant_id: str=None, client_secret_url: str=None, **kwargs) -> None: - super(IdentityProperties, self).__init__(**kwargs) - self.type = type - self.principal_id = principal_id - self.tenant_id = tenant_id - self.client_secret_url = client_secret_url diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request.py deleted file mode 100644 index 0c910e9b203e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImportLabVirtualMachineRequest(Model): - """This represents the payload required to import a virtual machine from a - different lab into the current one. - - :param source_virtual_machine_resource_id: The full resource ID of the - virtual machine to be imported. - :type source_virtual_machine_resource_id: str - :param destination_virtual_machine_name: The name of the virtual machine - in the destination lab - :type destination_virtual_machine_name: str - """ - - _attribute_map = { - 'source_virtual_machine_resource_id': {'key': 'sourceVirtualMachineResourceId', 'type': 'str'}, - 'destination_virtual_machine_name': {'key': 'destinationVirtualMachineName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImportLabVirtualMachineRequest, self).__init__(**kwargs) - self.source_virtual_machine_resource_id = kwargs.get('source_virtual_machine_resource_id', None) - self.destination_virtual_machine_name = kwargs.get('destination_virtual_machine_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request_py3.py deleted file mode 100644 index 6ca10ecff7a6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImportLabVirtualMachineRequest(Model): - """This represents the payload required to import a virtual machine from a - different lab into the current one. - - :param source_virtual_machine_resource_id: The full resource ID of the - virtual machine to be imported. - :type source_virtual_machine_resource_id: str - :param destination_virtual_machine_name: The name of the virtual machine - in the destination lab - :type destination_virtual_machine_name: str - """ - - _attribute_map = { - 'source_virtual_machine_resource_id': {'key': 'sourceVirtualMachineResourceId', 'type': 'str'}, - 'destination_virtual_machine_name': {'key': 'destinationVirtualMachineName', 'type': 'str'}, - } - - def __init__(self, *, source_virtual_machine_resource_id: str=None, destination_virtual_machine_name: str=None, **kwargs) -> None: - super(ImportLabVirtualMachineRequest, self).__init__(**kwargs) - self.source_virtual_machine_resource_id = source_virtual_machine_resource_id - self.destination_virtual_machine_name = destination_virtual_machine_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule.py deleted file mode 100644 index 56d745d71893..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InboundNatRule(Model): - """A rule for NAT - exposing a VM's port (backendPort) on the public IP - address using a load balancer. - - :param transport_protocol: The transport protocol for the endpoint. - Possible values include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param frontend_port: The external endpoint port of the inbound - connection. Possible values range between 1 and 65535, inclusive. If - unspecified, a value will be allocated automatically. - :type frontend_port: int - :param backend_port: The port to which the external traffic will be - redirected. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(InboundNatRule, self).__init__(**kwargs) - self.transport_protocol = kwargs.get('transport_protocol', None) - self.frontend_port = kwargs.get('frontend_port', None) - self.backend_port = kwargs.get('backend_port', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment.py deleted file mode 100644 index 034404f9923f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InboundNatRuleFragment(Model): - """A rule for NAT - exposing a VM's port (backendPort) on the public IP - address using a load balancer. - - :param transport_protocol: The transport protocol for the endpoint. - Possible values include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param frontend_port: The external endpoint port of the inbound - connection. Possible values range between 1 and 65535, inclusive. If - unspecified, a value will be allocated automatically. - :type frontend_port: int - :param backend_port: The port to which the external traffic will be - redirected. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(InboundNatRuleFragment, self).__init__(**kwargs) - self.transport_protocol = kwargs.get('transport_protocol', None) - self.frontend_port = kwargs.get('frontend_port', None) - self.backend_port = kwargs.get('backend_port', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment_py3.py deleted file mode 100644 index 397d4c523e32..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InboundNatRuleFragment(Model): - """A rule for NAT - exposing a VM's port (backendPort) on the public IP - address using a load balancer. - - :param transport_protocol: The transport protocol for the endpoint. - Possible values include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param frontend_port: The external endpoint port of the inbound - connection. Possible values range between 1 and 65535, inclusive. If - unspecified, a value will be allocated automatically. - :type frontend_port: int - :param backend_port: The port to which the external traffic will be - redirected. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, *, transport_protocol=None, frontend_port: int=None, backend_port: int=None, **kwargs) -> None: - super(InboundNatRuleFragment, self).__init__(**kwargs) - self.transport_protocol = transport_protocol - self.frontend_port = frontend_port - self.backend_port = backend_port diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_py3.py deleted file mode 100644 index 9ec4bd8a3d52..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InboundNatRule(Model): - """A rule for NAT - exposing a VM's port (backendPort) on the public IP - address using a load balancer. - - :param transport_protocol: The transport protocol for the endpoint. - Possible values include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param frontend_port: The external endpoint port of the inbound - connection. Possible values range between 1 and 65535, inclusive. If - unspecified, a value will be allocated automatically. - :type frontend_port: int - :param backend_port: The port to which the external traffic will be - redirected. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, *, transport_protocol=None, frontend_port: int=None, backend_port: int=None, **kwargs) -> None: - super(InboundNatRule, self).__init__(**kwargs) - self.transport_protocol = transport_protocol - self.frontend_port = frontend_port - self.backend_port = backend_port diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab.py deleted file mode 100644 index e495c96e01fa..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Lab(Resource): - """A lab. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar default_storage_account: The lab's default storage account. - :vartype default_storage_account: str - :ivar default_premium_storage_account: The lab's default premium storage - account. - :vartype default_premium_storage_account: str - :ivar artifacts_storage_account: The lab's artifact storage account. - :vartype artifacts_storage_account: str - :ivar premium_data_disk_storage_account: The lab's premium data disk - storage account. - :vartype premium_data_disk_storage_account: str - :ivar vault_name: The lab's Key vault. - :vartype vault_name: str - :param lab_storage_type: Type of storage used by the lab. It can be either - Premium or Standard. Default is Premium. Possible values include: - 'Standard', 'Premium' - :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param mandatory_artifacts_resource_ids_linux: The ordered list of - artifact resource IDs that should be applied on all Linux VM creations by - default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_linux: list[str] - :param mandatory_artifacts_resource_ids_windows: The ordered list of - artifact resource IDs that should be applied on all Windows VM creations - by default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_windows: list[str] - :ivar created_date: The creation date of the lab. - :vartype created_date: datetime - :param premium_data_disks: The setting to enable usage of premium data - disks. - When its value is 'Enabled', creation of standard or premium data disks is - allowed. - When its value is 'Disabled', only creation of standard data disks is - allowed. Possible values include: 'Disabled', 'Enabled' - :type premium_data_disks: str or - ~azure.mgmt.devtestlabs.models.PremiumDataDisk - :param environment_permission: The access rights to be granted to the user - when provisioning an environment. Possible values include: 'Reader', - 'Contributor' - :type environment_permission: str or - ~azure.mgmt.devtestlabs.models.EnvironmentPermission - :param announcement: The properties of any lab announcement associated - with this lab - :type announcement: - ~azure.mgmt.devtestlabs.models.LabAnnouncementProperties - :param support: The properties of any lab support message associated with - this lab - :type support: ~azure.mgmt.devtestlabs.models.LabSupportProperties - :ivar vm_creation_resource_group: The resource group in which lab virtual - machines will be created in. - :vartype vm_creation_resource_group: str - :ivar public_ip_id: The public IP address for the lab's load balancer. - :vartype public_ip_id: str - :ivar load_balancer_id: The load balancer used to for lab VMs that use - shared IP address. - :vartype load_balancer_id: str - :ivar network_security_group_id: The Network Security Group attached to - the lab VMs Network interfaces to restrict open ports. - :vartype network_security_group_id: str - :param extended_properties: Extended properties of the lab used for - experimental features - :type extended_properties: dict[str, str] - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'default_storage_account': {'readonly': True}, - 'default_premium_storage_account': {'readonly': True}, - 'artifacts_storage_account': {'readonly': True}, - 'premium_data_disk_storage_account': {'readonly': True}, - 'vault_name': {'readonly': True}, - 'created_date': {'readonly': True}, - 'vm_creation_resource_group': {'readonly': True}, - 'public_ip_id': {'readonly': True}, - 'load_balancer_id': {'readonly': True}, - 'network_security_group_id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'default_storage_account': {'key': 'properties.defaultStorageAccount', 'type': 'str'}, - 'default_premium_storage_account': {'key': 'properties.defaultPremiumStorageAccount', 'type': 'str'}, - 'artifacts_storage_account': {'key': 'properties.artifactsStorageAccount', 'type': 'str'}, - 'premium_data_disk_storage_account': {'key': 'properties.premiumDataDiskStorageAccount', 'type': 'str'}, - 'vault_name': {'key': 'properties.vaultName', 'type': 'str'}, - 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, - 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, - 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, - 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, - 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementProperties'}, - 'support': {'key': 'properties.support', 'type': 'LabSupportProperties'}, - 'vm_creation_resource_group': {'key': 'properties.vmCreationResourceGroup', 'type': 'str'}, - 'public_ip_id': {'key': 'properties.publicIpId', 'type': 'str'}, - 'load_balancer_id': {'key': 'properties.loadBalancerId', 'type': 'str'}, - 'network_security_group_id': {'key': 'properties.networkSecurityGroupId', 'type': 'str'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Lab, self).__init__(**kwargs) - self.default_storage_account = None - self.default_premium_storage_account = None - self.artifacts_storage_account = None - self.premium_data_disk_storage_account = None - self.vault_name = None - self.lab_storage_type = kwargs.get('lab_storage_type', None) - self.mandatory_artifacts_resource_ids_linux = kwargs.get('mandatory_artifacts_resource_ids_linux', None) - self.mandatory_artifacts_resource_ids_windows = kwargs.get('mandatory_artifacts_resource_ids_windows', None) - self.created_date = None - self.premium_data_disks = kwargs.get('premium_data_disks', None) - self.environment_permission = kwargs.get('environment_permission', None) - self.announcement = kwargs.get('announcement', None) - self.support = kwargs.get('support', None) - self.vm_creation_resource_group = None - self.public_ip_id = None - self.load_balancer_id = None - self.network_security_group_id = None - self.extended_properties = kwargs.get('extended_properties', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties.py deleted file mode 100644 index aee243079a09..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabAnnouncementProperties(Model): - """Properties of a lab's announcement banner. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param title: The plain text title for the lab announcement - :type title: str - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - :param enabled: Is the lab announcement active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param expiration_date: The time at which the announcement expires (null - for never) - :type expiration_date: datetime - :param expired: Has this announcement expired? - :type expired: bool - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'expired': {'key': 'expired', 'type': 'bool'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabAnnouncementProperties, self).__init__(**kwargs) - self.title = kwargs.get('title', None) - self.markdown = kwargs.get('markdown', None) - self.enabled = kwargs.get('enabled', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.expired = kwargs.get('expired', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment.py deleted file mode 100644 index 9d82a4819afa..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabAnnouncementPropertiesFragment(Model): - """Properties of a lab's announcement banner. - - :param title: The plain text title for the lab announcement - :type title: str - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - :param enabled: Is the lab announcement active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param expiration_date: The time at which the announcement expires (null - for never) - :type expiration_date: datetime - :param expired: Has this announcement expired? - :type expired: bool - """ - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'expired': {'key': 'expired', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(LabAnnouncementPropertiesFragment, self).__init__(**kwargs) - self.title = kwargs.get('title', None) - self.markdown = kwargs.get('markdown', None) - self.enabled = kwargs.get('enabled', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.expired = kwargs.get('expired', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment_py3.py deleted file mode 100644 index 33eea147dcf1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabAnnouncementPropertiesFragment(Model): - """Properties of a lab's announcement banner. - - :param title: The plain text title for the lab announcement - :type title: str - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - :param enabled: Is the lab announcement active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param expiration_date: The time at which the announcement expires (null - for never) - :type expiration_date: datetime - :param expired: Has this announcement expired? - :type expired: bool - """ - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'expired': {'key': 'expired', 'type': 'bool'}, - } - - def __init__(self, *, title: str=None, markdown: str=None, enabled=None, expiration_date=None, expired: bool=None, **kwargs) -> None: - super(LabAnnouncementPropertiesFragment, self).__init__(**kwargs) - self.title = title - self.markdown = markdown - self.enabled = enabled - self.expiration_date = expiration_date - self.expired = expired diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_py3.py deleted file mode 100644 index 3d818d58a02f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabAnnouncementProperties(Model): - """Properties of a lab's announcement banner. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param title: The plain text title for the lab announcement - :type title: str - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - :param enabled: Is the lab announcement active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param expiration_date: The time at which the announcement expires (null - for never) - :type expiration_date: datetime - :param expired: Has this announcement expired? - :type expired: bool - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'expired': {'key': 'expired', 'type': 'bool'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, title: str=None, markdown: str=None, enabled=None, expiration_date=None, expired: bool=None, **kwargs) -> None: - super(LabAnnouncementProperties, self).__init__(**kwargs) - self.title = title - self.markdown = markdown - self.enabled = enabled - self.expiration_date = expiration_date - self.expired = expired - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost.py deleted file mode 100644 index 6825b1e82b74..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class LabCost(Resource): - """A cost item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param target_cost: The target cost properties - :type target_cost: ~azure.mgmt.devtestlabs.models.TargetCostProperties - :ivar lab_cost_summary: The lab cost summary component of the cost data. - :vartype lab_cost_summary: - ~azure.mgmt.devtestlabs.models.LabCostSummaryProperties - :ivar lab_cost_details: The lab cost details component of the cost data. - :vartype lab_cost_details: - list[~azure.mgmt.devtestlabs.models.LabCostDetailsProperties] - :ivar resource_costs: The resource cost component of the cost data. - :vartype resource_costs: - list[~azure.mgmt.devtestlabs.models.LabResourceCostProperties] - :param currency_code: The currency code of the cost. - :type currency_code: str - :param start_date_time: The start time of the cost data. - :type start_date_time: datetime - :param end_date_time: The end time of the cost data. - :type end_date_time: datetime - :param created_date: The creation date of the cost. - :type created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'lab_cost_summary': {'readonly': True}, - 'lab_cost_details': {'readonly': True}, - 'resource_costs': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'target_cost': {'key': 'properties.targetCost', 'type': 'TargetCostProperties'}, - 'lab_cost_summary': {'key': 'properties.labCostSummary', 'type': 'LabCostSummaryProperties'}, - 'lab_cost_details': {'key': 'properties.labCostDetails', 'type': '[LabCostDetailsProperties]'}, - 'resource_costs': {'key': 'properties.resourceCosts', 'type': '[LabResourceCostProperties]'}, - 'currency_code': {'key': 'properties.currencyCode', 'type': 'str'}, - 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, - 'end_date_time': {'key': 'properties.endDateTime', 'type': 'iso-8601'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabCost, self).__init__(**kwargs) - self.target_cost = kwargs.get('target_cost', None) - self.lab_cost_summary = None - self.lab_cost_details = None - self.resource_costs = None - self.currency_code = kwargs.get('currency_code', None) - self.start_date_time = kwargs.get('start_date_time', None) - self.end_date_time = kwargs.get('end_date_time', None) - self.created_date = kwargs.get('created_date', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties.py deleted file mode 100644 index ac7c70074036..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabCostDetailsProperties(Model): - """The properties of a lab cost item. - - :param date_property: The date of the cost item. - :type date_property: datetime - :param cost: The cost component of the cost item. - :type cost: float - :param cost_type: The type of the cost. Possible values include: - 'Unavailable', 'Reported', 'Projected' - :type cost_type: str or ~azure.mgmt.devtestlabs.models.CostType - """ - - _attribute_map = { - 'date_property': {'key': 'date', 'type': 'iso-8601'}, - 'cost': {'key': 'cost', 'type': 'float'}, - 'cost_type': {'key': 'costType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabCostDetailsProperties, self).__init__(**kwargs) - self.date_property = kwargs.get('date_property', None) - self.cost = kwargs.get('cost', None) - self.cost_type = kwargs.get('cost_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties_py3.py deleted file mode 100644 index f6690c8c2184..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabCostDetailsProperties(Model): - """The properties of a lab cost item. - - :param date_property: The date of the cost item. - :type date_property: datetime - :param cost: The cost component of the cost item. - :type cost: float - :param cost_type: The type of the cost. Possible values include: - 'Unavailable', 'Reported', 'Projected' - :type cost_type: str or ~azure.mgmt.devtestlabs.models.CostType - """ - - _attribute_map = { - 'date_property': {'key': 'date', 'type': 'iso-8601'}, - 'cost': {'key': 'cost', 'type': 'float'}, - 'cost_type': {'key': 'costType', 'type': 'str'}, - } - - def __init__(self, *, date_property=None, cost: float=None, cost_type=None, **kwargs) -> None: - super(LabCostDetailsProperties, self).__init__(**kwargs) - self.date_property = date_property - self.cost = cost - self.cost_type = cost_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_py3.py deleted file mode 100644 index cef3ac68fdf8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class LabCost(Resource): - """A cost item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param target_cost: The target cost properties - :type target_cost: ~azure.mgmt.devtestlabs.models.TargetCostProperties - :ivar lab_cost_summary: The lab cost summary component of the cost data. - :vartype lab_cost_summary: - ~azure.mgmt.devtestlabs.models.LabCostSummaryProperties - :ivar lab_cost_details: The lab cost details component of the cost data. - :vartype lab_cost_details: - list[~azure.mgmt.devtestlabs.models.LabCostDetailsProperties] - :ivar resource_costs: The resource cost component of the cost data. - :vartype resource_costs: - list[~azure.mgmt.devtestlabs.models.LabResourceCostProperties] - :param currency_code: The currency code of the cost. - :type currency_code: str - :param start_date_time: The start time of the cost data. - :type start_date_time: datetime - :param end_date_time: The end time of the cost data. - :type end_date_time: datetime - :param created_date: The creation date of the cost. - :type created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'lab_cost_summary': {'readonly': True}, - 'lab_cost_details': {'readonly': True}, - 'resource_costs': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'target_cost': {'key': 'properties.targetCost', 'type': 'TargetCostProperties'}, - 'lab_cost_summary': {'key': 'properties.labCostSummary', 'type': 'LabCostSummaryProperties'}, - 'lab_cost_details': {'key': 'properties.labCostDetails', 'type': '[LabCostDetailsProperties]'}, - 'resource_costs': {'key': 'properties.resourceCosts', 'type': '[LabResourceCostProperties]'}, - 'currency_code': {'key': 'properties.currencyCode', 'type': 'str'}, - 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, - 'end_date_time': {'key': 'properties.endDateTime', 'type': 'iso-8601'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, target_cost=None, currency_code: str=None, start_date_time=None, end_date_time=None, created_date=None, **kwargs) -> None: - super(LabCost, self).__init__(location=location, tags=tags, **kwargs) - self.target_cost = target_cost - self.lab_cost_summary = None - self.lab_cost_details = None - self.resource_costs = None - self.currency_code = currency_code - self.start_date_time = start_date_time - self.end_date_time = end_date_time - self.created_date = created_date - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties.py deleted file mode 100644 index edeb814ef472..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabCostSummaryProperties(Model): - """The properties of the cost summary. - - :param estimated_lab_cost: The cost component of the cost item. - :type estimated_lab_cost: float - """ - - _attribute_map = { - 'estimated_lab_cost': {'key': 'estimatedLabCost', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(LabCostSummaryProperties, self).__init__(**kwargs) - self.estimated_lab_cost = kwargs.get('estimated_lab_cost', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties_py3.py deleted file mode 100644 index df5a84f3e609..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabCostSummaryProperties(Model): - """The properties of the cost summary. - - :param estimated_lab_cost: The cost component of the cost item. - :type estimated_lab_cost: float - """ - - _attribute_map = { - 'estimated_lab_cost': {'key': 'estimatedLabCost', 'type': 'float'}, - } - - def __init__(self, *, estimated_lab_cost: float=None, **kwargs) -> None: - super(LabCostSummaryProperties, self).__init__(**kwargs) - self.estimated_lab_cost = estimated_lab_cost diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment.py deleted file mode 100644 index 2ad6dc84b4ae..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class LabFragment(UpdateResource): - """A lab. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_storage_type: Type of storage used by the lab. It can be either - Premium or Standard. Default is Premium. Possible values include: - 'Standard', 'Premium' - :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param mandatory_artifacts_resource_ids_linux: The ordered list of - artifact resource IDs that should be applied on all Linux VM creations by - default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_linux: list[str] - :param mandatory_artifacts_resource_ids_windows: The ordered list of - artifact resource IDs that should be applied on all Windows VM creations - by default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_windows: list[str] - :param premium_data_disks: The setting to enable usage of premium data - disks. - When its value is 'Enabled', creation of standard or premium data disks is - allowed. - When its value is 'Disabled', only creation of standard data disks is - allowed. Possible values include: 'Disabled', 'Enabled' - :type premium_data_disks: str or - ~azure.mgmt.devtestlabs.models.PremiumDataDisk - :param environment_permission: The access rights to be granted to the user - when provisioning an environment. Possible values include: 'Reader', - 'Contributor' - :type environment_permission: str or - ~azure.mgmt.devtestlabs.models.EnvironmentPermission - :param announcement: The properties of any lab announcement associated - with this lab - :type announcement: - ~azure.mgmt.devtestlabs.models.LabAnnouncementPropertiesFragment - :param support: The properties of any lab support message associated with - this lab - :type support: ~azure.mgmt.devtestlabs.models.LabSupportPropertiesFragment - :param extended_properties: Extended properties of the lab used for - experimental features - :type extended_properties: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, - 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, - 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, - 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, - 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, - 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementPropertiesFragment'}, - 'support': {'key': 'properties.support', 'type': 'LabSupportPropertiesFragment'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(LabFragment, self).__init__(**kwargs) - self.lab_storage_type = kwargs.get('lab_storage_type', None) - self.mandatory_artifacts_resource_ids_linux = kwargs.get('mandatory_artifacts_resource_ids_linux', None) - self.mandatory_artifacts_resource_ids_windows = kwargs.get('mandatory_artifacts_resource_ids_windows', None) - self.premium_data_disks = kwargs.get('premium_data_disks', None) - self.environment_permission = kwargs.get('environment_permission', None) - self.announcement = kwargs.get('announcement', None) - self.support = kwargs.get('support', None) - self.extended_properties = kwargs.get('extended_properties', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment_py3.py deleted file mode 100644 index c5aa5b816807..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class LabFragment(UpdateResource): - """A lab. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_storage_type: Type of storage used by the lab. It can be either - Premium or Standard. Default is Premium. Possible values include: - 'Standard', 'Premium' - :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param mandatory_artifacts_resource_ids_linux: The ordered list of - artifact resource IDs that should be applied on all Linux VM creations by - default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_linux: list[str] - :param mandatory_artifacts_resource_ids_windows: The ordered list of - artifact resource IDs that should be applied on all Windows VM creations - by default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_windows: list[str] - :param premium_data_disks: The setting to enable usage of premium data - disks. - When its value is 'Enabled', creation of standard or premium data disks is - allowed. - When its value is 'Disabled', only creation of standard data disks is - allowed. Possible values include: 'Disabled', 'Enabled' - :type premium_data_disks: str or - ~azure.mgmt.devtestlabs.models.PremiumDataDisk - :param environment_permission: The access rights to be granted to the user - when provisioning an environment. Possible values include: 'Reader', - 'Contributor' - :type environment_permission: str or - ~azure.mgmt.devtestlabs.models.EnvironmentPermission - :param announcement: The properties of any lab announcement associated - with this lab - :type announcement: - ~azure.mgmt.devtestlabs.models.LabAnnouncementPropertiesFragment - :param support: The properties of any lab support message associated with - this lab - :type support: ~azure.mgmt.devtestlabs.models.LabSupportPropertiesFragment - :param extended_properties: Extended properties of the lab used for - experimental features - :type extended_properties: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, - 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, - 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, - 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, - 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, - 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementPropertiesFragment'}, - 'support': {'key': 'properties.support', 'type': 'LabSupportPropertiesFragment'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, lab_storage_type=None, mandatory_artifacts_resource_ids_linux=None, mandatory_artifacts_resource_ids_windows=None, premium_data_disks=None, environment_permission=None, announcement=None, support=None, extended_properties=None, **kwargs) -> None: - super(LabFragment, self).__init__(tags=tags, **kwargs) - self.lab_storage_type = lab_storage_type - self.mandatory_artifacts_resource_ids_linux = mandatory_artifacts_resource_ids_linux - self.mandatory_artifacts_resource_ids_windows = mandatory_artifacts_resource_ids_windows - self.premium_data_disks = premium_data_disks - self.environment_permission = environment_permission - self.announcement = announcement - self.support = support - self.extended_properties = extended_properties diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_paged.py deleted file mode 100644 index 869d4b1dee38..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class LabPaged(Paged): - """ - A paging container for iterating over a list of :class:`Lab ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Lab]'} - } - - def __init__(self, *args, **kwargs): - - super(LabPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_py3.py deleted file mode 100644 index ec30462d9336..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_py3.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Lab(Resource): - """A lab. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar default_storage_account: The lab's default storage account. - :vartype default_storage_account: str - :ivar default_premium_storage_account: The lab's default premium storage - account. - :vartype default_premium_storage_account: str - :ivar artifacts_storage_account: The lab's artifact storage account. - :vartype artifacts_storage_account: str - :ivar premium_data_disk_storage_account: The lab's premium data disk - storage account. - :vartype premium_data_disk_storage_account: str - :ivar vault_name: The lab's Key vault. - :vartype vault_name: str - :param lab_storage_type: Type of storage used by the lab. It can be either - Premium or Standard. Default is Premium. Possible values include: - 'Standard', 'Premium' - :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param mandatory_artifacts_resource_ids_linux: The ordered list of - artifact resource IDs that should be applied on all Linux VM creations by - default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_linux: list[str] - :param mandatory_artifacts_resource_ids_windows: The ordered list of - artifact resource IDs that should be applied on all Windows VM creations - by default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_windows: list[str] - :ivar created_date: The creation date of the lab. - :vartype created_date: datetime - :param premium_data_disks: The setting to enable usage of premium data - disks. - When its value is 'Enabled', creation of standard or premium data disks is - allowed. - When its value is 'Disabled', only creation of standard data disks is - allowed. Possible values include: 'Disabled', 'Enabled' - :type premium_data_disks: str or - ~azure.mgmt.devtestlabs.models.PremiumDataDisk - :param environment_permission: The access rights to be granted to the user - when provisioning an environment. Possible values include: 'Reader', - 'Contributor' - :type environment_permission: str or - ~azure.mgmt.devtestlabs.models.EnvironmentPermission - :param announcement: The properties of any lab announcement associated - with this lab - :type announcement: - ~azure.mgmt.devtestlabs.models.LabAnnouncementProperties - :param support: The properties of any lab support message associated with - this lab - :type support: ~azure.mgmt.devtestlabs.models.LabSupportProperties - :ivar vm_creation_resource_group: The resource group in which lab virtual - machines will be created in. - :vartype vm_creation_resource_group: str - :ivar public_ip_id: The public IP address for the lab's load balancer. - :vartype public_ip_id: str - :ivar load_balancer_id: The load balancer used to for lab VMs that use - shared IP address. - :vartype load_balancer_id: str - :ivar network_security_group_id: The Network Security Group attached to - the lab VMs Network interfaces to restrict open ports. - :vartype network_security_group_id: str - :param extended_properties: Extended properties of the lab used for - experimental features - :type extended_properties: dict[str, str] - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'default_storage_account': {'readonly': True}, - 'default_premium_storage_account': {'readonly': True}, - 'artifacts_storage_account': {'readonly': True}, - 'premium_data_disk_storage_account': {'readonly': True}, - 'vault_name': {'readonly': True}, - 'created_date': {'readonly': True}, - 'vm_creation_resource_group': {'readonly': True}, - 'public_ip_id': {'readonly': True}, - 'load_balancer_id': {'readonly': True}, - 'network_security_group_id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'default_storage_account': {'key': 'properties.defaultStorageAccount', 'type': 'str'}, - 'default_premium_storage_account': {'key': 'properties.defaultPremiumStorageAccount', 'type': 'str'}, - 'artifacts_storage_account': {'key': 'properties.artifactsStorageAccount', 'type': 'str'}, - 'premium_data_disk_storage_account': {'key': 'properties.premiumDataDiskStorageAccount', 'type': 'str'}, - 'vault_name': {'key': 'properties.vaultName', 'type': 'str'}, - 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, - 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, - 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, - 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, - 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementProperties'}, - 'support': {'key': 'properties.support', 'type': 'LabSupportProperties'}, - 'vm_creation_resource_group': {'key': 'properties.vmCreationResourceGroup', 'type': 'str'}, - 'public_ip_id': {'key': 'properties.publicIpId', 'type': 'str'}, - 'load_balancer_id': {'key': 'properties.loadBalancerId', 'type': 'str'}, - 'network_security_group_id': {'key': 'properties.networkSecurityGroupId', 'type': 'str'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, lab_storage_type=None, mandatory_artifacts_resource_ids_linux=None, mandatory_artifacts_resource_ids_windows=None, premium_data_disks=None, environment_permission=None, announcement=None, support=None, extended_properties=None, **kwargs) -> None: - super(Lab, self).__init__(location=location, tags=tags, **kwargs) - self.default_storage_account = None - self.default_premium_storage_account = None - self.artifacts_storage_account = None - self.premium_data_disk_storage_account = None - self.vault_name = None - self.lab_storage_type = lab_storage_type - self.mandatory_artifacts_resource_ids_linux = mandatory_artifacts_resource_ids_linux - self.mandatory_artifacts_resource_ids_windows = mandatory_artifacts_resource_ids_windows - self.created_date = None - self.premium_data_disks = premium_data_disks - self.environment_permission = environment_permission - self.announcement = announcement - self.support = support - self.vm_creation_resource_group = None - self.public_ip_id = None - self.load_balancer_id = None - self.network_security_group_id = None - self.extended_properties = extended_properties - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties.py deleted file mode 100644 index 8883745b9735..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabResourceCostProperties(Model): - """The properties of a resource cost item. - - :param resourcename: The name of the resource. - :type resourcename: str - :param resource_uid: The unique identifier of the resource. - :type resource_uid: str - :param resource_cost: The cost component of the resource cost item. - :type resource_cost: float - :param resource_type: The logical resource type (ex. virtualmachine, - storageaccount) - :type resource_type: str - :param resource_owner: The owner of the resource (ex. - janedoe@microsoft.com) - :type resource_owner: str - :param resource_pricing_tier: The category of the resource (ex. - Premium_LRS, Standard_DS1) - :type resource_pricing_tier: str - :param resource_status: The status of the resource (ex. Active) - :type resource_status: str - :param resource_id: The ID of the resource - :type resource_id: str - :param external_resource_id: The ID of the external resource - :type external_resource_id: str - """ - - _attribute_map = { - 'resourcename': {'key': 'resourcename', 'type': 'str'}, - 'resource_uid': {'key': 'resourceUId', 'type': 'str'}, - 'resource_cost': {'key': 'resourceCost', 'type': 'float'}, - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'resource_owner': {'key': 'resourceOwner', 'type': 'str'}, - 'resource_pricing_tier': {'key': 'resourcePricingTier', 'type': 'str'}, - 'resource_status': {'key': 'resourceStatus', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'external_resource_id': {'key': 'externalResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabResourceCostProperties, self).__init__(**kwargs) - self.resourcename = kwargs.get('resourcename', None) - self.resource_uid = kwargs.get('resource_uid', None) - self.resource_cost = kwargs.get('resource_cost', None) - self.resource_type = kwargs.get('resource_type', None) - self.resource_owner = kwargs.get('resource_owner', None) - self.resource_pricing_tier = kwargs.get('resource_pricing_tier', None) - self.resource_status = kwargs.get('resource_status', None) - self.resource_id = kwargs.get('resource_id', None) - self.external_resource_id = kwargs.get('external_resource_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties_py3.py deleted file mode 100644 index 5b360dee84b9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabResourceCostProperties(Model): - """The properties of a resource cost item. - - :param resourcename: The name of the resource. - :type resourcename: str - :param resource_uid: The unique identifier of the resource. - :type resource_uid: str - :param resource_cost: The cost component of the resource cost item. - :type resource_cost: float - :param resource_type: The logical resource type (ex. virtualmachine, - storageaccount) - :type resource_type: str - :param resource_owner: The owner of the resource (ex. - janedoe@microsoft.com) - :type resource_owner: str - :param resource_pricing_tier: The category of the resource (ex. - Premium_LRS, Standard_DS1) - :type resource_pricing_tier: str - :param resource_status: The status of the resource (ex. Active) - :type resource_status: str - :param resource_id: The ID of the resource - :type resource_id: str - :param external_resource_id: The ID of the external resource - :type external_resource_id: str - """ - - _attribute_map = { - 'resourcename': {'key': 'resourcename', 'type': 'str'}, - 'resource_uid': {'key': 'resourceUId', 'type': 'str'}, - 'resource_cost': {'key': 'resourceCost', 'type': 'float'}, - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'resource_owner': {'key': 'resourceOwner', 'type': 'str'}, - 'resource_pricing_tier': {'key': 'resourcePricingTier', 'type': 'str'}, - 'resource_status': {'key': 'resourceStatus', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'external_resource_id': {'key': 'externalResourceId', 'type': 'str'}, - } - - def __init__(self, *, resourcename: str=None, resource_uid: str=None, resource_cost: float=None, resource_type: str=None, resource_owner: str=None, resource_pricing_tier: str=None, resource_status: str=None, resource_id: str=None, external_resource_id: str=None, **kwargs) -> None: - super(LabResourceCostProperties, self).__init__(**kwargs) - self.resourcename = resourcename - self.resource_uid = resource_uid - self.resource_cost = resource_cost - self.resource_type = resource_type - self.resource_owner = resource_owner - self.resource_pricing_tier = resource_pricing_tier - self.resource_status = resource_status - self.resource_id = resource_id - self.external_resource_id = external_resource_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties.py deleted file mode 100644 index e948a530fa44..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabSupportProperties(Model): - """Properties of a lab's support banner. - - :param enabled: Is the lab support banner active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabSupportProperties, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.markdown = kwargs.get('markdown', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment.py deleted file mode 100644 index 53bf876c5a2c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabSupportPropertiesFragment(Model): - """Properties of a lab's support banner. - - :param enabled: Is the lab support banner active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabSupportPropertiesFragment, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.markdown = kwargs.get('markdown', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment_py3.py deleted file mode 100644 index 0495bf2657d2..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabSupportPropertiesFragment(Model): - """Properties of a lab's support banner. - - :param enabled: Is the lab support banner active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - } - - def __init__(self, *, enabled=None, markdown: str=None, **kwargs) -> None: - super(LabSupportPropertiesFragment, self).__init__(**kwargs) - self.enabled = enabled - self.markdown = markdown diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_py3.py deleted file mode 100644 index 0eac2ef2c950..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabSupportProperties(Model): - """Properties of a lab's support banner. - - :param enabled: Is the lab support banner active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - } - - def __init__(self, *, enabled=None, markdown: str=None, **kwargs) -> None: - super(LabSupportProperties, self).__init__(**kwargs) - self.enabled = enabled - self.markdown = markdown diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd.py deleted file mode 100644 index acb777ea8f1b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabVhd(Model): - """Properties of a VHD in the lab. - - :param id: The URI to the VHD. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabVhd, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_paged.py deleted file mode 100644 index 34d5dda853fe..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class LabVhdPaged(Paged): - """ - A paging container for iterating over a list of :class:`LabVhd ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[LabVhd]'} - } - - def __init__(self, *args, **kwargs): - - super(LabVhdPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_py3.py deleted file mode 100644 index 7f0adddb42ae..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabVhd(Model): - """Properties of a VHD in the lab. - - :param id: The URI to the VHD. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(LabVhd, self).__init__(**kwargs) - self.id = id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine.py deleted file mode 100644 index 079a4c3bb59f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine.py +++ /dev/null @@ -1,221 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class LabVirtualMachine(Resource): - """A virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :ivar compute_vm: The compute virtual machine properties. - :vartype compute_vm: ~azure.mgmt.devtestlabs.models.ComputeVmProperties - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties - :ivar applicable_schedule: The applicable schedule for the virtual - machine. - :vartype applicable_schedule: - ~azure.mgmt.devtestlabs.models.ApplicableSchedule - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskProperties] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'compute_vm': {'readonly': True}, - 'applicable_schedule': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'compute_vm': {'key': 'properties.computeVm', 'type': 'ComputeVmProperties'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, - 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabVirtualMachine, self).__init__(**kwargs) - self.notes = kwargs.get('notes', None) - self.owner_object_id = kwargs.get('owner_object_id', None) - self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) - self.created_by_user_id = kwargs.get('created_by_user_id', None) - self.created_by_user = kwargs.get('created_by_user', None) - self.created_date = kwargs.get('created_date', None) - self.compute_id = kwargs.get('compute_id', None) - self.custom_image_id = kwargs.get('custom_image_id', None) - self.os_type = kwargs.get('os_type', None) - self.size = kwargs.get('size', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.ssh_key = kwargs.get('ssh_key', None) - self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) - self.fqdn = kwargs.get('fqdn', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) - self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) - self.artifacts = kwargs.get('artifacts', None) - self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) - self.gallery_image_reference = kwargs.get('gallery_image_reference', None) - self.plan_id = kwargs.get('plan_id', None) - self.compute_vm = None - self.network_interface = kwargs.get('network_interface', None) - self.applicable_schedule = None - self.expiration_date = kwargs.get('expiration_date', None) - self.allow_claim = kwargs.get('allow_claim', None) - self.storage_type = kwargs.get('storage_type', None) - self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) - self.environment_id = kwargs.get('environment_id', None) - self.data_disk_parameters = kwargs.get('data_disk_parameters', None) - self.schedule_parameters = kwargs.get('schedule_parameters', None) - self.last_known_power_state = kwargs.get('last_known_power_state', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter.py deleted file mode 100644 index db9aad603356..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabVirtualMachineCreationParameter(Model): - """Properties for creating a virtual machine. - - :param bulk_creation_parameters: The number of virtual machine instances - to create. - :type bulk_creation_parameters: - ~azure.mgmt.devtestlabs.models.BulkCreationParameters - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskProperties] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParameters'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(LabVirtualMachineCreationParameter, self).__init__(**kwargs) - self.bulk_creation_parameters = kwargs.get('bulk_creation_parameters', None) - self.notes = kwargs.get('notes', None) - self.owner_object_id = kwargs.get('owner_object_id', None) - self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) - self.created_by_user_id = kwargs.get('created_by_user_id', None) - self.created_by_user = kwargs.get('created_by_user', None) - self.created_date = kwargs.get('created_date', None) - self.compute_id = kwargs.get('compute_id', None) - self.custom_image_id = kwargs.get('custom_image_id', None) - self.os_type = kwargs.get('os_type', None) - self.size = kwargs.get('size', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.ssh_key = kwargs.get('ssh_key', None) - self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) - self.fqdn = kwargs.get('fqdn', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) - self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) - self.artifacts = kwargs.get('artifacts', None) - self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) - self.gallery_image_reference = kwargs.get('gallery_image_reference', None) - self.plan_id = kwargs.get('plan_id', None) - self.network_interface = kwargs.get('network_interface', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.allow_claim = kwargs.get('allow_claim', None) - self.storage_type = kwargs.get('storage_type', None) - self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) - self.environment_id = kwargs.get('environment_id', None) - self.data_disk_parameters = kwargs.get('data_disk_parameters', None) - self.schedule_parameters = kwargs.get('schedule_parameters', None) - self.last_known_power_state = kwargs.get('last_known_power_state', None) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment.py deleted file mode 100644 index 2a58002ea2bf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabVirtualMachineCreationParameterFragment(Model): - """Properties for creating a virtual machine. - - :param bulk_creation_parameters: The number of virtual machine instances - to create. - :type bulk_creation_parameters: - ~azure.mgmt.devtestlabs.models.BulkCreationParametersFragment - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParametersFragment'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(LabVirtualMachineCreationParameterFragment, self).__init__(**kwargs) - self.bulk_creation_parameters = kwargs.get('bulk_creation_parameters', None) - self.notes = kwargs.get('notes', None) - self.owner_object_id = kwargs.get('owner_object_id', None) - self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) - self.created_by_user_id = kwargs.get('created_by_user_id', None) - self.created_by_user = kwargs.get('created_by_user', None) - self.created_date = kwargs.get('created_date', None) - self.compute_id = kwargs.get('compute_id', None) - self.custom_image_id = kwargs.get('custom_image_id', None) - self.os_type = kwargs.get('os_type', None) - self.size = kwargs.get('size', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.ssh_key = kwargs.get('ssh_key', None) - self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) - self.fqdn = kwargs.get('fqdn', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) - self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) - self.artifacts = kwargs.get('artifacts', None) - self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) - self.gallery_image_reference = kwargs.get('gallery_image_reference', None) - self.plan_id = kwargs.get('plan_id', None) - self.network_interface = kwargs.get('network_interface', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.allow_claim = kwargs.get('allow_claim', None) - self.storage_type = kwargs.get('storage_type', None) - self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) - self.environment_id = kwargs.get('environment_id', None) - self.data_disk_parameters = kwargs.get('data_disk_parameters', None) - self.schedule_parameters = kwargs.get('schedule_parameters', None) - self.last_known_power_state = kwargs.get('last_known_power_state', None) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment_py3.py deleted file mode 100644 index d583a499210f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment_py3.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabVirtualMachineCreationParameterFragment(Model): - """Properties for creating a virtual machine. - - :param bulk_creation_parameters: The number of virtual machine instances - to create. - :type bulk_creation_parameters: - ~azure.mgmt.devtestlabs.models.BulkCreationParametersFragment - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParametersFragment'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, bulk_creation_parameters=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: - super(LabVirtualMachineCreationParameterFragment, self).__init__(**kwargs) - self.bulk_creation_parameters = bulk_creation_parameters - self.notes = notes - self.owner_object_id = owner_object_id - self.owner_user_principal_name = owner_user_principal_name - self.created_by_user_id = created_by_user_id - self.created_by_user = created_by_user - self.created_date = created_date - self.compute_id = compute_id - self.custom_image_id = custom_image_id - self.os_type = os_type - self.size = size - self.user_name = user_name - self.password = password - self.ssh_key = ssh_key - self.is_authentication_with_ssh_key = is_authentication_with_ssh_key - self.fqdn = fqdn - self.lab_subnet_name = lab_subnet_name - self.lab_virtual_network_id = lab_virtual_network_id - self.disallow_public_ip_address = disallow_public_ip_address - self.artifacts = artifacts - self.artifact_deployment_status = artifact_deployment_status - self.gallery_image_reference = gallery_image_reference - self.plan_id = plan_id - self.network_interface = network_interface - self.expiration_date = expiration_date - self.allow_claim = allow_claim - self.storage_type = storage_type - self.virtual_machine_creation_source = virtual_machine_creation_source - self.environment_id = environment_id - self.data_disk_parameters = data_disk_parameters - self.schedule_parameters = schedule_parameters - self.last_known_power_state = last_known_power_state - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_py3.py deleted file mode 100644 index f6df337a6179..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_py3.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabVirtualMachineCreationParameter(Model): - """Properties for creating a virtual machine. - - :param bulk_creation_parameters: The number of virtual machine instances - to create. - :type bulk_creation_parameters: - ~azure.mgmt.devtestlabs.models.BulkCreationParameters - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskProperties] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParameters'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, bulk_creation_parameters=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: - super(LabVirtualMachineCreationParameter, self).__init__(**kwargs) - self.bulk_creation_parameters = bulk_creation_parameters - self.notes = notes - self.owner_object_id = owner_object_id - self.owner_user_principal_name = owner_user_principal_name - self.created_by_user_id = created_by_user_id - self.created_by_user = created_by_user - self.created_date = created_date - self.compute_id = compute_id - self.custom_image_id = custom_image_id - self.os_type = os_type - self.size = size - self.user_name = user_name - self.password = password - self.ssh_key = ssh_key - self.is_authentication_with_ssh_key = is_authentication_with_ssh_key - self.fqdn = fqdn - self.lab_subnet_name = lab_subnet_name - self.lab_virtual_network_id = lab_virtual_network_id - self.disallow_public_ip_address = disallow_public_ip_address - self.artifacts = artifacts - self.artifact_deployment_status = artifact_deployment_status - self.gallery_image_reference = gallery_image_reference - self.plan_id = plan_id - self.network_interface = network_interface - self.expiration_date = expiration_date - self.allow_claim = allow_claim - self.storage_type = storage_type - self.virtual_machine_creation_source = virtual_machine_creation_source - self.environment_id = environment_id - self.data_disk_parameters = data_disk_parameters - self.schedule_parameters = schedule_parameters - self.last_known_power_state = last_known_power_state - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment.py deleted file mode 100644 index 132affe5f1ba..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment.py +++ /dev/null @@ -1,177 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class LabVirtualMachineFragment(UpdateResource): - """A virtual machine. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabVirtualMachineFragment, self).__init__(**kwargs) - self.notes = kwargs.get('notes', None) - self.owner_object_id = kwargs.get('owner_object_id', None) - self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) - self.created_by_user_id = kwargs.get('created_by_user_id', None) - self.created_by_user = kwargs.get('created_by_user', None) - self.created_date = kwargs.get('created_date', None) - self.compute_id = kwargs.get('compute_id', None) - self.custom_image_id = kwargs.get('custom_image_id', None) - self.os_type = kwargs.get('os_type', None) - self.size = kwargs.get('size', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.ssh_key = kwargs.get('ssh_key', None) - self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) - self.fqdn = kwargs.get('fqdn', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) - self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) - self.artifacts = kwargs.get('artifacts', None) - self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) - self.gallery_image_reference = kwargs.get('gallery_image_reference', None) - self.plan_id = kwargs.get('plan_id', None) - self.network_interface = kwargs.get('network_interface', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.allow_claim = kwargs.get('allow_claim', None) - self.storage_type = kwargs.get('storage_type', None) - self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) - self.environment_id = kwargs.get('environment_id', None) - self.data_disk_parameters = kwargs.get('data_disk_parameters', None) - self.schedule_parameters = kwargs.get('schedule_parameters', None) - self.last_known_power_state = kwargs.get('last_known_power_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment_py3.py deleted file mode 100644 index 11dca443d47b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment_py3.py +++ /dev/null @@ -1,177 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class LabVirtualMachineFragment(UpdateResource): - """A virtual machine. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - } - - def __init__(self, *, tags=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, **kwargs) -> None: - super(LabVirtualMachineFragment, self).__init__(tags=tags, **kwargs) - self.notes = notes - self.owner_object_id = owner_object_id - self.owner_user_principal_name = owner_user_principal_name - self.created_by_user_id = created_by_user_id - self.created_by_user = created_by_user - self.created_date = created_date - self.compute_id = compute_id - self.custom_image_id = custom_image_id - self.os_type = os_type - self.size = size - self.user_name = user_name - self.password = password - self.ssh_key = ssh_key - self.is_authentication_with_ssh_key = is_authentication_with_ssh_key - self.fqdn = fqdn - self.lab_subnet_name = lab_subnet_name - self.lab_virtual_network_id = lab_virtual_network_id - self.disallow_public_ip_address = disallow_public_ip_address - self.artifacts = artifacts - self.artifact_deployment_status = artifact_deployment_status - self.gallery_image_reference = gallery_image_reference - self.plan_id = plan_id - self.network_interface = network_interface - self.expiration_date = expiration_date - self.allow_claim = allow_claim - self.storage_type = storage_type - self.virtual_machine_creation_source = virtual_machine_creation_source - self.environment_id = environment_id - self.data_disk_parameters = data_disk_parameters - self.schedule_parameters = schedule_parameters - self.last_known_power_state = last_known_power_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_paged.py deleted file mode 100644 index 08e2d31e58dc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class LabVirtualMachinePaged(Paged): - """ - A paging container for iterating over a list of :class:`LabVirtualMachine ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[LabVirtualMachine]'} - } - - def __init__(self, *args, **kwargs): - - super(LabVirtualMachinePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_py3.py deleted file mode 100644 index 354acb458cc9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_py3.py +++ /dev/null @@ -1,221 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class LabVirtualMachine(Resource): - """A virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :ivar compute_vm: The compute virtual machine properties. - :vartype compute_vm: ~azure.mgmt.devtestlabs.models.ComputeVmProperties - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties - :ivar applicable_schedule: The applicable schedule for the virtual - machine. - :vartype applicable_schedule: - ~azure.mgmt.devtestlabs.models.ApplicableSchedule - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskProperties] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'compute_vm': {'readonly': True}, - 'applicable_schedule': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'compute_vm': {'key': 'properties.computeVm', 'type': 'ComputeVmProperties'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, - 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, **kwargs) -> None: - super(LabVirtualMachine, self).__init__(location=location, tags=tags, **kwargs) - self.notes = notes - self.owner_object_id = owner_object_id - self.owner_user_principal_name = owner_user_principal_name - self.created_by_user_id = created_by_user_id - self.created_by_user = created_by_user - self.created_date = created_date - self.compute_id = compute_id - self.custom_image_id = custom_image_id - self.os_type = os_type - self.size = size - self.user_name = user_name - self.password = password - self.ssh_key = ssh_key - self.is_authentication_with_ssh_key = is_authentication_with_ssh_key - self.fqdn = fqdn - self.lab_subnet_name = lab_subnet_name - self.lab_virtual_network_id = lab_virtual_network_id - self.disallow_public_ip_address = disallow_public_ip_address - self.artifacts = artifacts - self.artifact_deployment_status = artifact_deployment_status - self.gallery_image_reference = gallery_image_reference - self.plan_id = plan_id - self.compute_vm = None - self.network_interface = network_interface - self.applicable_schedule = None - self.expiration_date = expiration_date - self.allow_claim = allow_claim - self.storage_type = storage_type - self.virtual_machine_creation_source = virtual_machine_creation_source - self.environment_id = environment_id - self.data_disk_parameters = data_disk_parameters - self.schedule_parameters = schedule_parameters - self.last_known_power_state = last_known_power_state - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info.py deleted file mode 100644 index 70154219e989..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxOsInfo(Model): - """Information about a Linux OS. - - :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, - DeprovisionRequested, DeprovisionApplied). Possible values include: - 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' - :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState - """ - - _attribute_map = { - 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LinuxOsInfo, self).__init__(**kwargs) - self.linux_os_state = kwargs.get('linux_os_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment.py deleted file mode 100644 index a7b98b278ea7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxOsInfoFragment(Model): - """Information about a Linux OS. - - :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, - DeprovisionRequested, DeprovisionApplied). Possible values include: - 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' - :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState - """ - - _attribute_map = { - 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LinuxOsInfoFragment, self).__init__(**kwargs) - self.linux_os_state = kwargs.get('linux_os_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment_py3.py deleted file mode 100644 index b8b4919c8eab..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxOsInfoFragment(Model): - """Information about a Linux OS. - - :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, - DeprovisionRequested, DeprovisionApplied). Possible values include: - 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' - :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState - """ - - _attribute_map = { - 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, - } - - def __init__(self, *, linux_os_state=None, **kwargs) -> None: - super(LinuxOsInfoFragment, self).__init__(**kwargs) - self.linux_os_state = linux_os_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_py3.py deleted file mode 100644 index a8176b7be240..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxOsInfo(Model): - """Information about a Linux OS. - - :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, - DeprovisionRequested, DeprovisionApplied). Possible values include: - 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' - :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState - """ - - _attribute_map = { - 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, - } - - def __init__(self, *, linux_os_state=None, **kwargs) -> None: - super(LinuxOsInfo, self).__init__(**kwargs) - self.linux_os_state = linux_os_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties.py deleted file mode 100644 index 67bd4ee0a9fc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkInterfaceProperties(Model): - """Properties of a network interface. - - :param virtual_network_id: The resource ID of the virtual network. - :type virtual_network_id: str - :param subnet_id: The resource ID of the sub net. - :type subnet_id: str - :param public_ip_address_id: The resource ID of the public IP address. - :type public_ip_address_id: str - :param public_ip_address: The public IP address. - :type public_ip_address: str - :param private_ip_address: The private IP address. - :type private_ip_address: str - :param dns_name: The DNS name. - :type dns_name: str - :param rdp_authority: The RdpAuthority property is a server DNS host name - or IP address followed by the service port number for RDP (Remote Desktop - Protocol). - :type rdp_authority: str - :param ssh_authority: The SshAuthority property is a server DNS host name - or IP address followed by the service port number for SSH. - :type ssh_authority: str - :param shared_public_ip_address_configuration: The configuration for - sharing a public IP address across multiple virtual machines. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfiguration - """ - - _attribute_map = { - 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, - 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, - 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, - 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfiguration'}, - } - - def __init__(self, **kwargs): - super(NetworkInterfaceProperties, self).__init__(**kwargs) - self.virtual_network_id = kwargs.get('virtual_network_id', None) - self.subnet_id = kwargs.get('subnet_id', None) - self.public_ip_address_id = kwargs.get('public_ip_address_id', None) - self.public_ip_address = kwargs.get('public_ip_address', None) - self.private_ip_address = kwargs.get('private_ip_address', None) - self.dns_name = kwargs.get('dns_name', None) - self.rdp_authority = kwargs.get('rdp_authority', None) - self.ssh_authority = kwargs.get('ssh_authority', None) - self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment.py deleted file mode 100644 index e42965548e38..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkInterfacePropertiesFragment(Model): - """Properties of a network interface. - - :param virtual_network_id: The resource ID of the virtual network. - :type virtual_network_id: str - :param subnet_id: The resource ID of the sub net. - :type subnet_id: str - :param public_ip_address_id: The resource ID of the public IP address. - :type public_ip_address_id: str - :param public_ip_address: The public IP address. - :type public_ip_address: str - :param private_ip_address: The private IP address. - :type private_ip_address: str - :param dns_name: The DNS name. - :type dns_name: str - :param rdp_authority: The RdpAuthority property is a server DNS host name - or IP address followed by the service port number for RDP (Remote Desktop - Protocol). - :type rdp_authority: str - :param ssh_authority: The SshAuthority property is a server DNS host name - or IP address followed by the service port number for SSH. - :type ssh_authority: str - :param shared_public_ip_address_configuration: The configuration for - sharing a public IP address across multiple virtual machines. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfigurationFragment - """ - - _attribute_map = { - 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, - 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, - 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, - 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfigurationFragment'}, - } - - def __init__(self, **kwargs): - super(NetworkInterfacePropertiesFragment, self).__init__(**kwargs) - self.virtual_network_id = kwargs.get('virtual_network_id', None) - self.subnet_id = kwargs.get('subnet_id', None) - self.public_ip_address_id = kwargs.get('public_ip_address_id', None) - self.public_ip_address = kwargs.get('public_ip_address', None) - self.private_ip_address = kwargs.get('private_ip_address', None) - self.dns_name = kwargs.get('dns_name', None) - self.rdp_authority = kwargs.get('rdp_authority', None) - self.ssh_authority = kwargs.get('ssh_authority', None) - self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment_py3.py deleted file mode 100644 index 87854401d799..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkInterfacePropertiesFragment(Model): - """Properties of a network interface. - - :param virtual_network_id: The resource ID of the virtual network. - :type virtual_network_id: str - :param subnet_id: The resource ID of the sub net. - :type subnet_id: str - :param public_ip_address_id: The resource ID of the public IP address. - :type public_ip_address_id: str - :param public_ip_address: The public IP address. - :type public_ip_address: str - :param private_ip_address: The private IP address. - :type private_ip_address: str - :param dns_name: The DNS name. - :type dns_name: str - :param rdp_authority: The RdpAuthority property is a server DNS host name - or IP address followed by the service port number for RDP (Remote Desktop - Protocol). - :type rdp_authority: str - :param ssh_authority: The SshAuthority property is a server DNS host name - or IP address followed by the service port number for SSH. - :type ssh_authority: str - :param shared_public_ip_address_configuration: The configuration for - sharing a public IP address across multiple virtual machines. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfigurationFragment - """ - - _attribute_map = { - 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, - 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, - 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, - 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfigurationFragment'}, - } - - def __init__(self, *, virtual_network_id: str=None, subnet_id: str=None, public_ip_address_id: str=None, public_ip_address: str=None, private_ip_address: str=None, dns_name: str=None, rdp_authority: str=None, ssh_authority: str=None, shared_public_ip_address_configuration=None, **kwargs) -> None: - super(NetworkInterfacePropertiesFragment, self).__init__(**kwargs) - self.virtual_network_id = virtual_network_id - self.subnet_id = subnet_id - self.public_ip_address_id = public_ip_address_id - self.public_ip_address = public_ip_address - self.private_ip_address = private_ip_address - self.dns_name = dns_name - self.rdp_authority = rdp_authority - self.ssh_authority = ssh_authority - self.shared_public_ip_address_configuration = shared_public_ip_address_configuration diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_py3.py deleted file mode 100644 index c68daf4e897b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkInterfaceProperties(Model): - """Properties of a network interface. - - :param virtual_network_id: The resource ID of the virtual network. - :type virtual_network_id: str - :param subnet_id: The resource ID of the sub net. - :type subnet_id: str - :param public_ip_address_id: The resource ID of the public IP address. - :type public_ip_address_id: str - :param public_ip_address: The public IP address. - :type public_ip_address: str - :param private_ip_address: The private IP address. - :type private_ip_address: str - :param dns_name: The DNS name. - :type dns_name: str - :param rdp_authority: The RdpAuthority property is a server DNS host name - or IP address followed by the service port number for RDP (Remote Desktop - Protocol). - :type rdp_authority: str - :param ssh_authority: The SshAuthority property is a server DNS host name - or IP address followed by the service port number for SSH. - :type ssh_authority: str - :param shared_public_ip_address_configuration: The configuration for - sharing a public IP address across multiple virtual machines. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfiguration - """ - - _attribute_map = { - 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, - 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, - 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, - 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfiguration'}, - } - - def __init__(self, *, virtual_network_id: str=None, subnet_id: str=None, public_ip_address_id: str=None, public_ip_address: str=None, private_ip_address: str=None, dns_name: str=None, rdp_authority: str=None, ssh_authority: str=None, shared_public_ip_address_configuration=None, **kwargs) -> None: - super(NetworkInterfaceProperties, self).__init__(**kwargs) - self.virtual_network_id = virtual_network_id - self.subnet_id = subnet_id - self.public_ip_address_id = public_ip_address_id - self.public_ip_address = public_ip_address - self.private_ip_address = private_ip_address - self.dns_name = dns_name - self.rdp_authority = rdp_authority - self.ssh_authority = ssh_authority - self.shared_public_ip_address_configuration = shared_public_ip_address_configuration diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel.py deleted file mode 100644 index 7132c4436c6e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class NotificationChannel(Resource): - """A notification. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param web_hook_url: The webhook URL to send notifications to. - :type web_hook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - :param description: Description of notification. - :type description: str - :param events: The list of event for which this notification is enabled. - :type events: list[~azure.mgmt.devtestlabs.models.Event] - :ivar created_date: The creation date of the notification channel. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'events': {'key': 'properties.events', 'type': '[Event]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NotificationChannel, self).__init__(**kwargs) - self.web_hook_url = kwargs.get('web_hook_url', None) - self.email_recipient = kwargs.get('email_recipient', None) - self.notification_locale = kwargs.get('notification_locale', None) - self.description = kwargs.get('description', None) - self.events = kwargs.get('events', None) - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment.py deleted file mode 100644 index 588dee5b2395..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class NotificationChannelFragment(UpdateResource): - """A notification. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param web_hook_url: The webhook URL to send notifications to. - :type web_hook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - :param description: Description of notification. - :type description: str - :param events: The list of event for which this notification is enabled. - :type events: list[~azure.mgmt.devtestlabs.models.EventFragment] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'events': {'key': 'properties.events', 'type': '[EventFragment]'}, - } - - def __init__(self, **kwargs): - super(NotificationChannelFragment, self).__init__(**kwargs) - self.web_hook_url = kwargs.get('web_hook_url', None) - self.email_recipient = kwargs.get('email_recipient', None) - self.notification_locale = kwargs.get('notification_locale', None) - self.description = kwargs.get('description', None) - self.events = kwargs.get('events', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment_py3.py deleted file mode 100644 index a7179388c512..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class NotificationChannelFragment(UpdateResource): - """A notification. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param web_hook_url: The webhook URL to send notifications to. - :type web_hook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - :param description: Description of notification. - :type description: str - :param events: The list of event for which this notification is enabled. - :type events: list[~azure.mgmt.devtestlabs.models.EventFragment] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'events': {'key': 'properties.events', 'type': '[EventFragment]'}, - } - - def __init__(self, *, tags=None, web_hook_url: str=None, email_recipient: str=None, notification_locale: str=None, description: str=None, events=None, **kwargs) -> None: - super(NotificationChannelFragment, self).__init__(tags=tags, **kwargs) - self.web_hook_url = web_hook_url - self.email_recipient = email_recipient - self.notification_locale = notification_locale - self.description = description - self.events = events diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_paged.py deleted file mode 100644 index 9a74839b31a1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class NotificationChannelPaged(Paged): - """ - A paging container for iterating over a list of :class:`NotificationChannel ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[NotificationChannel]'} - } - - def __init__(self, *args, **kwargs): - - super(NotificationChannelPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_py3.py deleted file mode 100644 index 08a0f47db1da..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_py3.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class NotificationChannel(Resource): - """A notification. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param web_hook_url: The webhook URL to send notifications to. - :type web_hook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - :param description: Description of notification. - :type description: str - :param events: The list of event for which this notification is enabled. - :type events: list[~azure.mgmt.devtestlabs.models.Event] - :ivar created_date: The creation date of the notification channel. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'events': {'key': 'properties.events', 'type': '[Event]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, web_hook_url: str=None, email_recipient: str=None, notification_locale: str=None, description: str=None, events=None, **kwargs) -> None: - super(NotificationChannel, self).__init__(location=location, tags=tags, **kwargs) - self.web_hook_url = web_hook_url - self.email_recipient = email_recipient - self.notification_locale = notification_locale - self.description = description - self.events = events - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings.py deleted file mode 100644 index 656eae9f9cb4..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NotificationSettings(Model): - """Notification settings for a schedule. - - :param status: If notifications are enabled for this schedule (i.e. - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param time_in_minutes: Time in minutes before event at which notification - will be sent. - :type time_in_minutes: int - :param webhook_url: The webhook URL to which the notification will be - sent. - :type webhook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, - 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NotificationSettings, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.time_in_minutes = kwargs.get('time_in_minutes', None) - self.webhook_url = kwargs.get('webhook_url', None) - self.email_recipient = kwargs.get('email_recipient', None) - self.notification_locale = kwargs.get('notification_locale', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.py deleted file mode 100644 index bc707e6ecfe7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NotificationSettingsFragment(Model): - """Notification settings for a schedule. - - :param status: If notifications are enabled for this schedule (i.e. - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param time_in_minutes: Time in minutes before event at which notification - will be sent. - :type time_in_minutes: int - :param webhook_url: The webhook URL to which the notification will be - sent. - :type webhook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, - 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NotificationSettingsFragment, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.time_in_minutes = kwargs.get('time_in_minutes', None) - self.webhook_url = kwargs.get('webhook_url', None) - self.email_recipient = kwargs.get('email_recipient', None) - self.notification_locale = kwargs.get('notification_locale', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment_py3.py deleted file mode 100644 index 260ce034f89d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NotificationSettingsFragment(Model): - """Notification settings for a schedule. - - :param status: If notifications are enabled for this schedule (i.e. - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param time_in_minutes: Time in minutes before event at which notification - will be sent. - :type time_in_minutes: int - :param webhook_url: The webhook URL to which the notification will be - sent. - :type webhook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, - 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, - } - - def __init__(self, *, status=None, time_in_minutes: int=None, webhook_url: str=None, email_recipient: str=None, notification_locale: str=None, **kwargs) -> None: - super(NotificationSettingsFragment, self).__init__(**kwargs) - self.status = status - self.time_in_minutes = time_in_minutes - self.webhook_url = webhook_url - self.email_recipient = email_recipient - self.notification_locale = notification_locale diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_py3.py deleted file mode 100644 index 66c77b99768a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NotificationSettings(Model): - """Notification settings for a schedule. - - :param status: If notifications are enabled for this schedule (i.e. - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param time_in_minutes: Time in minutes before event at which notification - will be sent. - :type time_in_minutes: int - :param webhook_url: The webhook URL to which the notification will be - sent. - :type webhook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, - 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, - } - - def __init__(self, *, status=None, time_in_minutes: int=None, webhook_url: str=None, email_recipient: str=None, notification_locale: str=None, **kwargs) -> None: - super(NotificationSettings, self).__init__(**kwargs) - self.status = status - self.time_in_minutes = time_in_minutes - self.webhook_url = webhook_url - self.email_recipient = email_recipient - self.notification_locale = notification_locale diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters.py deleted file mode 100644 index 8adc994f1e40..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NotifyParameters(Model): - """Properties for generating a Notification. - - :param event_name: The type of event (i.e. AutoShutdown, Cost). Possible - values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - :param json_payload: Properties for the notification in json format. - :type json_payload: str - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - 'json_payload': {'key': 'jsonPayload', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NotifyParameters, self).__init__(**kwargs) - self.event_name = kwargs.get('event_name', None) - self.json_payload = kwargs.get('json_payload', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters_py3.py deleted file mode 100644 index 40b8e900f189..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NotifyParameters(Model): - """Properties for generating a Notification. - - :param event_name: The type of event (i.e. AutoShutdown, Cost). Possible - values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - :param json_payload: Properties for the notification in json format. - :type json_payload: str - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - 'json_payload': {'key': 'jsonPayload', 'type': 'str'}, - } - - def __init__(self, *, event_name=None, json_payload: str=None, **kwargs) -> None: - super(NotifyParameters, self).__init__(**kwargs) - self.event_name = event_name - self.json_payload = json_payload diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error.py deleted file mode 100644 index 5ee1f80b2712..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationError(Model): - """Error details for the operation in case of a failure. - - :param code: The error code of the operation error. - :type code: str - :param message: The error message of the operation error. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationError, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error_py3.py deleted file mode 100644 index 19c57b944297..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationError(Model): - """Error details for the operation in case of a failure. - - :param code: The error code of the operation error. - :type code: str - :param message: The error message of the operation error. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: - super(OperationError, self).__init__(**kwargs) - self.code = code - self.message = message diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata.py deleted file mode 100644 index 3551895bd8c6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationMetadata(Model): - """The REST API operation supported by DevTestLab ResourceProvider. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: The object that describes the operations - :type display: ~azure.mgmt.devtestlabs.models.OperationMetadataDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationMetadataDisplay'}, - } - - def __init__(self, **kwargs): - super(OperationMetadata, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display.py deleted file mode 100644 index c20b0b519d3e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationMetadataDisplay(Model): - """The object that describes the operations. - - :param provider: Friendly name of the resource provider - :type provider: str - :param resource: Resource type on which the operation is performed. - :type resource: str - :param operation: Operation type: read, write, delete, listKeys/action, - etc. - :type operation: str - :param description: Friendly name of the operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationMetadataDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display_py3.py deleted file mode 100644 index a566cc55bfe8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationMetadataDisplay(Model): - """The object that describes the operations. - - :param provider: Friendly name of the resource provider - :type provider: str - :param resource: Resource type on which the operation is performed. - :type resource: str - :param operation: Operation type: read, write, delete, listKeys/action, - etc. - :type operation: str - :param description: Friendly name of the operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - super(OperationMetadataDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_paged.py deleted file mode 100644 index f0fa25a37bed..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationMetadataPaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationMetadata ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationMetadata]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationMetadataPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_py3.py deleted file mode 100644 index c1f8e2997f51..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationMetadata(Model): - """The REST API operation supported by DevTestLab ResourceProvider. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: The object that describes the operations - :type display: ~azure.mgmt.devtestlabs.models.OperationMetadataDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationMetadataDisplay'}, - } - - def __init__(self, *, name: str=None, display=None, **kwargs) -> None: - super(OperationMetadata, self).__init__(**kwargs) - self.name = name - self.display = display diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result.py deleted file mode 100644 index 90f43aa80f9f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationResult(Model): - """An Operation Result. - - :param status: The operation status. - :type status: str - :param status_code: The status code for the operation. Possible values - include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', - 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', - 'PartialContent', 'MultipleChoices', 'MovedPermanently', 'Redirect', - 'SeeOther', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', - 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', - 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', - 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', - 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', - 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', - 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', - 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', - 'HttpVersionNotSupported' - :type status_code: str or ~azure.mgmt.devtestlabs.models.HttpStatusCode - :param error: Error details for the operation in case of a failure. - :type error: ~azure.mgmt.devtestlabs.models.OperationError - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'status_code': {'key': 'statusCode', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'OperationError'}, - } - - def __init__(self, **kwargs): - super(OperationResult, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.status_code = kwargs.get('status_code', None) - self.error = kwargs.get('error', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result_py3.py deleted file mode 100644 index cb371c521fb0..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationResult(Model): - """An Operation Result. - - :param status: The operation status. - :type status: str - :param status_code: The status code for the operation. Possible values - include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', - 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', - 'PartialContent', 'MultipleChoices', 'MovedPermanently', 'Redirect', - 'SeeOther', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', - 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', - 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', - 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', - 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', - 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', - 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', - 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', - 'HttpVersionNotSupported' - :type status_code: str or ~azure.mgmt.devtestlabs.models.HttpStatusCode - :param error: Error details for the operation in case of a failure. - :type error: ~azure.mgmt.devtestlabs.models.OperationError - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'status_code': {'key': 'statusCode', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'OperationError'}, - } - - def __init__(self, *, status: str=None, status_code=None, error=None, **kwargs) -> None: - super(OperationResult, self).__init__(**kwargs) - self.status = status - self.status_code = status_code - self.error = error diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info.py deleted file mode 100644 index 6e1972e6eace..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ParameterInfo(Model): - """Information about an artifact's parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ParameterInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info_py3.py deleted file mode 100644 index f35b39ef3fe4..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ParameterInfo(Model): - """Information about an artifact's parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: - super(ParameterInfo, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info.py deleted file mode 100644 index a671306eac1c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ParametersValueFileInfo(Model): - """A file containing a set of parameter values for an ARM template. - - :param file_name: File name. - :type file_name: str - :param parameters_value_info: Contents of the file. - :type parameters_value_info: object - """ - - _attribute_map = { - 'file_name': {'key': 'fileName', 'type': 'str'}, - 'parameters_value_info': {'key': 'parametersValueInfo', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ParametersValueFileInfo, self).__init__(**kwargs) - self.file_name = kwargs.get('file_name', None) - self.parameters_value_info = kwargs.get('parameters_value_info', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info_py3.py deleted file mode 100644 index fcbc00df3f23..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ParametersValueFileInfo(Model): - """A file containing a set of parameter values for an ARM template. - - :param file_name: File name. - :type file_name: str - :param parameters_value_info: Contents of the file. - :type parameters_value_info: object - """ - - _attribute_map = { - 'file_name': {'key': 'fileName', 'type': 'str'}, - 'parameters_value_info': {'key': 'parametersValueInfo', 'type': 'object'}, - } - - def __init__(self, *, file_name: str=None, parameters_value_info=None, **kwargs) -> None: - super(ParametersValueFileInfo, self).__init__(**kwargs) - self.file_name = file_name - self.parameters_value_info = parameters_value_info diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties.py deleted file mode 100644 index 73de17d9ee24..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PercentageCostThresholdProperties(Model): - """Properties of a percentage cost threshold. - - :param threshold_value: The cost threshold value. - :type threshold_value: float - """ - - _attribute_map = { - 'threshold_value': {'key': 'thresholdValue', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(PercentageCostThresholdProperties, self).__init__(**kwargs) - self.threshold_value = kwargs.get('threshold_value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties_py3.py deleted file mode 100644 index 22ae6e7d274c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PercentageCostThresholdProperties(Model): - """Properties of a percentage cost threshold. - - :param threshold_value: The cost threshold value. - :type threshold_value: float - """ - - _attribute_map = { - 'threshold_value': {'key': 'thresholdValue', 'type': 'float'}, - } - - def __init__(self, *, threshold_value: float=None, **kwargs) -> None: - super(PercentageCostThresholdProperties, self).__init__(**kwargs) - self.threshold_value = threshold_value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy.py deleted file mode 100644 index 96719fffb5d7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Policy(Resource): - """A Policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the policy. - :type description: str - :param status: The status of the policy. Possible values include: - 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus - :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, - MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', - 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', - 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', - 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' - :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName - :param fact_data: The fact data of the policy. - :type fact_data: str - :param threshold: The threshold of the policy (i.e. a number for - MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). - :type threshold: str - :param evaluator_type: The evaluator type of the policy (i.e. - AllowedValuesPolicy, MaxValuePolicy). Possible values include: - 'AllowedValuesPolicy', 'MaxValuePolicy' - :type evaluator_type: str or - ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType - :ivar created_date: The creation date of the policy. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'fact_name': {'key': 'properties.factName', 'type': 'str'}, - 'fact_data': {'key': 'properties.factData', 'type': 'str'}, - 'threshold': {'key': 'properties.threshold', 'type': 'str'}, - 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Policy, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.status = kwargs.get('status', None) - self.fact_name = kwargs.get('fact_name', None) - self.fact_data = kwargs.get('fact_data', None) - self.threshold = kwargs.get('threshold', None) - self.evaluator_type = kwargs.get('evaluator_type', None) - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment.py deleted file mode 100644 index 4d240945e5a7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class PolicyFragment(UpdateResource): - """A Policy. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the policy. - :type description: str - :param status: The status of the policy. Possible values include: - 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus - :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, - MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', - 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', - 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', - 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' - :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName - :param fact_data: The fact data of the policy. - :type fact_data: str - :param threshold: The threshold of the policy (i.e. a number for - MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). - :type threshold: str - :param evaluator_type: The evaluator type of the policy (i.e. - AllowedValuesPolicy, MaxValuePolicy). Possible values include: - 'AllowedValuesPolicy', 'MaxValuePolicy' - :type evaluator_type: str or - ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'fact_name': {'key': 'properties.factName', 'type': 'str'}, - 'fact_data': {'key': 'properties.factData', 'type': 'str'}, - 'threshold': {'key': 'properties.threshold', 'type': 'str'}, - 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PolicyFragment, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.status = kwargs.get('status', None) - self.fact_name = kwargs.get('fact_name', None) - self.fact_data = kwargs.get('fact_data', None) - self.threshold = kwargs.get('threshold', None) - self.evaluator_type = kwargs.get('evaluator_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment_py3.py deleted file mode 100644 index b10648b0cdc7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class PolicyFragment(UpdateResource): - """A Policy. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the policy. - :type description: str - :param status: The status of the policy. Possible values include: - 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus - :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, - MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', - 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', - 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', - 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' - :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName - :param fact_data: The fact data of the policy. - :type fact_data: str - :param threshold: The threshold of the policy (i.e. a number for - MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). - :type threshold: str - :param evaluator_type: The evaluator type of the policy (i.e. - AllowedValuesPolicy, MaxValuePolicy). Possible values include: - 'AllowedValuesPolicy', 'MaxValuePolicy' - :type evaluator_type: str or - ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'fact_name': {'key': 'properties.factName', 'type': 'str'}, - 'fact_data': {'key': 'properties.factData', 'type': 'str'}, - 'threshold': {'key': 'properties.threshold', 'type': 'str'}, - 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, - } - - def __init__(self, *, tags=None, description: str=None, status=None, fact_name=None, fact_data: str=None, threshold: str=None, evaluator_type=None, **kwargs) -> None: - super(PolicyFragment, self).__init__(tags=tags, **kwargs) - self.description = description - self.status = status - self.fact_name = fact_name - self.fact_data = fact_data - self.threshold = threshold - self.evaluator_type = evaluator_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_paged.py deleted file mode 100644 index 6ef7f073726e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class PolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`Policy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Policy]'} - } - - def __init__(self, *args, **kwargs): - - super(PolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_py3.py deleted file mode 100644 index 1bfd40ab2402..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Policy(Resource): - """A Policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the policy. - :type description: str - :param status: The status of the policy. Possible values include: - 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus - :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, - MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', - 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', - 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', - 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' - :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName - :param fact_data: The fact data of the policy. - :type fact_data: str - :param threshold: The threshold of the policy (i.e. a number for - MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). - :type threshold: str - :param evaluator_type: The evaluator type of the policy (i.e. - AllowedValuesPolicy, MaxValuePolicy). Possible values include: - 'AllowedValuesPolicy', 'MaxValuePolicy' - :type evaluator_type: str or - ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType - :ivar created_date: The creation date of the policy. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'fact_name': {'key': 'properties.factName', 'type': 'str'}, - 'fact_data': {'key': 'properties.factData', 'type': 'str'}, - 'threshold': {'key': 'properties.threshold', 'type': 'str'}, - 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, description: str=None, status=None, fact_name=None, fact_data: str=None, threshold: str=None, evaluator_type=None, **kwargs) -> None: - super(Policy, self).__init__(location=location, tags=tags, **kwargs) - self.description = description - self.status = status - self.fact_name = fact_name - self.fact_data = fact_data - self.threshold = threshold - self.evaluator_type = evaluator_type - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result.py deleted file mode 100644 index 3dc1698dc354..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicySetResult(Model): - """Result of a policy set evaluation. - - :param has_error: A value indicating whether this policy set evaluation - has discovered violations. - :type has_error: bool - :param policy_violations: The list of policy violations. - :type policy_violations: - list[~azure.mgmt.devtestlabs.models.PolicyViolation] - """ - - _attribute_map = { - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'policy_violations': {'key': 'policyViolations', 'type': '[PolicyViolation]'}, - } - - def __init__(self, **kwargs): - super(PolicySetResult, self).__init__(**kwargs) - self.has_error = kwargs.get('has_error', None) - self.policy_violations = kwargs.get('policy_violations', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result_py3.py deleted file mode 100644 index 5368647ec498..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicySetResult(Model): - """Result of a policy set evaluation. - - :param has_error: A value indicating whether this policy set evaluation - has discovered violations. - :type has_error: bool - :param policy_violations: The list of policy violations. - :type policy_violations: - list[~azure.mgmt.devtestlabs.models.PolicyViolation] - """ - - _attribute_map = { - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'policy_violations': {'key': 'policyViolations', 'type': '[PolicyViolation]'}, - } - - def __init__(self, *, has_error: bool=None, policy_violations=None, **kwargs) -> None: - super(PolicySetResult, self).__init__(**kwargs) - self.has_error = has_error - self.policy_violations = policy_violations diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation.py deleted file mode 100644 index b8404db70da6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicyViolation(Model): - """Policy violation. - - :param code: The code of the policy violation. - :type code: str - :param message: The message of the policy violation. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PolicyViolation, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation_py3.py deleted file mode 100644 index 8f33f97afeed..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicyViolation(Model): - """Policy violation. - - :param code: The code of the policy violation. - :type code: str - :param message: The message of the policy violation. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: - super(PolicyViolation, self).__init__(**kwargs) - self.code = code - self.message = message diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port.py deleted file mode 100644 index 794610b68871..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Port(Model): - """Properties of a network port. - - :param transport_protocol: Protocol type of the port. Possible values - include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param backend_port: Backend port of the target virtual machine. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(Port, self).__init__(**kwargs) - self.transport_protocol = kwargs.get('transport_protocol', None) - self.backend_port = kwargs.get('backend_port', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment.py deleted file mode 100644 index 60e28efa9dd8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PortFragment(Model): - """Properties of a network port. - - :param transport_protocol: Protocol type of the port. Possible values - include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param backend_port: Backend port of the target virtual machine. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(PortFragment, self).__init__(**kwargs) - self.transport_protocol = kwargs.get('transport_protocol', None) - self.backend_port = kwargs.get('backend_port', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment_py3.py deleted file mode 100644 index dd39e446c5ff..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PortFragment(Model): - """Properties of a network port. - - :param transport_protocol: Protocol type of the port. Possible values - include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param backend_port: Backend port of the target virtual machine. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, *, transport_protocol=None, backend_port: int=None, **kwargs) -> None: - super(PortFragment, self).__init__(**kwargs) - self.transport_protocol = transport_protocol - self.backend_port = backend_port diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_py3.py deleted file mode 100644 index c4b7645a0a18..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Port(Model): - """Properties of a network port. - - :param transport_protocol: Protocol type of the port. Possible values - include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param backend_port: Backend port of the target virtual machine. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, *, transport_protocol=None, backend_port: int=None, **kwargs) -> None: - super(Port, self).__init__(**kwargs) - self.transport_protocol = transport_protocol - self.backend_port = backend_port diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection.py deleted file mode 100644 index 71926d62a621..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RdpConnection(Model): - """Represents a .rdp file. - - :param contents: The contents of the .rdp file - :type contents: str - """ - - _attribute_map = { - 'contents': {'key': 'contents', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RdpConnection, self).__init__(**kwargs) - self.contents = kwargs.get('contents', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection_py3.py deleted file mode 100644 index 3f92de164fea..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RdpConnection(Model): - """Represents a .rdp file. - - :param contents: The contents of the .rdp file - :type contents: str - """ - - _attribute_map = { - 'contents': {'key': 'contents', 'type': 'str'}, - } - - def __init__(self, *, contents: str=None, **kwargs) -> None: - super(RdpConnection, self).__init__(**kwargs) - self.contents = contents diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties.py deleted file mode 100644 index 13725ea5e306..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResizeLabVirtualMachineProperties(Model): - """Request body for resizing a virtual machine. - - :param size: Specifies the size of the virtual machine. - :type size: str - """ - - _attribute_map = { - 'size': {'key': 'size', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResizeLabVirtualMachineProperties, self).__init__(**kwargs) - self.size = kwargs.get('size', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties_py3.py deleted file mode 100644 index 266b19149f7a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResizeLabVirtualMachineProperties(Model): - """Request body for resizing a virtual machine. - - :param size: Specifies the size of the virtual machine. - :type size: str - """ - - _attribute_map = { - 'size': {'key': 'size', 'type': 'str'}, - } - - def __init__(self, *, size: str=None, **kwargs) -> None: - super(ResizeLabVirtualMachineProperties, self).__init__(**kwargs) - self.size = size diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource.py deleted file mode 100644 index f25b57698413..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """An Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource_py3.py deleted file mode 100644 index e59df581aa79..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """An Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties.py deleted file mode 100644 index 210f4a7b2eca..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RetargetScheduleProperties(Model): - """Properties for retargeting a virtual machine schedule. - - :param current_resource_id: The resource Id of the virtual machine on - which the schedule operates - :type current_resource_id: str - :param target_resource_id: The resource Id of the virtual machine that the - schedule should be retargeted to - :type target_resource_id: str - """ - - _attribute_map = { - 'current_resource_id': {'key': 'currentResourceId', 'type': 'str'}, - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RetargetScheduleProperties, self).__init__(**kwargs) - self.current_resource_id = kwargs.get('current_resource_id', None) - self.target_resource_id = kwargs.get('target_resource_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties_py3.py deleted file mode 100644 index debd7258fb28..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RetargetScheduleProperties(Model): - """Properties for retargeting a virtual machine schedule. - - :param current_resource_id: The resource Id of the virtual machine on - which the schedule operates - :type current_resource_id: str - :param target_resource_id: The resource Id of the virtual machine that the - schedule should be retargeted to - :type target_resource_id: str - """ - - _attribute_map = { - 'current_resource_id': {'key': 'currentResourceId', 'type': 'str'}, - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__(self, *, current_resource_id: str=None, target_resource_id: str=None, **kwargs) -> None: - super(RetargetScheduleProperties, self).__init__(**kwargs) - self.current_resource_id = current_resource_id - self.target_resource_id = target_resource_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule.py deleted file mode 100644 index a0c09919fa48..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Schedule(Resource): - """A schedule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettings - :ivar created_date: The creation date of the schedule. - :vartype created_date: datetime - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Schedule, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.task_type = kwargs.get('task_type', None) - self.weekly_recurrence = kwargs.get('weekly_recurrence', None) - self.daily_recurrence = kwargs.get('daily_recurrence', None) - self.hourly_recurrence = kwargs.get('hourly_recurrence', None) - self.time_zone_id = kwargs.get('time_zone_id', None) - self.notification_settings = kwargs.get('notification_settings', None) - self.created_date = None - self.target_resource_id = kwargs.get('target_resource_id', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter.py deleted file mode 100644 index 1eced41c432d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ScheduleCreationParameter(Model): - """Properties for creating a schedule. - - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettings - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ScheduleCreationParameter, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.task_type = kwargs.get('task_type', None) - self.weekly_recurrence = kwargs.get('weekly_recurrence', None) - self.daily_recurrence = kwargs.get('daily_recurrence', None) - self.hourly_recurrence = kwargs.get('hourly_recurrence', None) - self.time_zone_id = kwargs.get('time_zone_id', None) - self.notification_settings = kwargs.get('notification_settings', None) - self.target_resource_id = kwargs.get('target_resource_id', None) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment.py deleted file mode 100644 index e3f67d9d59bf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ScheduleCreationParameterFragment(Model): - """Properties for creating a schedule. - - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: - ~azure.mgmt.devtestlabs.models.WeekDetailsFragment - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: - ~azure.mgmt.devtestlabs.models.HourDetailsFragment - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ScheduleCreationParameterFragment, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.task_type = kwargs.get('task_type', None) - self.weekly_recurrence = kwargs.get('weekly_recurrence', None) - self.daily_recurrence = kwargs.get('daily_recurrence', None) - self.hourly_recurrence = kwargs.get('hourly_recurrence', None) - self.time_zone_id = kwargs.get('time_zone_id', None) - self.notification_settings = kwargs.get('notification_settings', None) - self.target_resource_id = kwargs.get('target_resource_id', None) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment_py3.py deleted file mode 100644 index 47e9ece35bfb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ScheduleCreationParameterFragment(Model): - """Properties for creating a schedule. - - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: - ~azure.mgmt.devtestlabs.models.WeekDetailsFragment - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: - ~azure.mgmt.devtestlabs.models.HourDetailsFragment - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: - super(ScheduleCreationParameterFragment, self).__init__(**kwargs) - self.status = status - self.task_type = task_type - self.weekly_recurrence = weekly_recurrence - self.daily_recurrence = daily_recurrence - self.hourly_recurrence = hourly_recurrence - self.time_zone_id = time_zone_id - self.notification_settings = notification_settings - self.target_resource_id = target_resource_id - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_py3.py deleted file mode 100644 index 8254f67c85be..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_py3.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ScheduleCreationParameter(Model): - """Properties for creating a schedule. - - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettings - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: - super(ScheduleCreationParameter, self).__init__(**kwargs) - self.status = status - self.task_type = task_type - self.weekly_recurrence = weekly_recurrence - self.daily_recurrence = daily_recurrence - self.hourly_recurrence = hourly_recurrence - self.time_zone_id = time_zone_id - self.notification_settings = notification_settings - self.target_resource_id = target_resource_id - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment.py deleted file mode 100644 index 17cb84a52572..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class ScheduleFragment(UpdateResource): - """A schedule. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: - ~azure.mgmt.devtestlabs.models.WeekDetailsFragment - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: - ~azure.mgmt.devtestlabs.models.HourDetailsFragment - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ScheduleFragment, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.task_type = kwargs.get('task_type', None) - self.weekly_recurrence = kwargs.get('weekly_recurrence', None) - self.daily_recurrence = kwargs.get('daily_recurrence', None) - self.hourly_recurrence = kwargs.get('hourly_recurrence', None) - self.time_zone_id = kwargs.get('time_zone_id', None) - self.notification_settings = kwargs.get('notification_settings', None) - self.target_resource_id = kwargs.get('target_resource_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment_py3.py deleted file mode 100644 index a51222b2406e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class ScheduleFragment(UpdateResource): - """A schedule. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: - ~azure.mgmt.devtestlabs.models.WeekDetailsFragment - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: - ~azure.mgmt.devtestlabs.models.HourDetailsFragment - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - } - - def __init__(self, *, tags=None, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, **kwargs) -> None: - super(ScheduleFragment, self).__init__(tags=tags, **kwargs) - self.status = status - self.task_type = task_type - self.weekly_recurrence = weekly_recurrence - self.daily_recurrence = daily_recurrence - self.hourly_recurrence = hourly_recurrence - self.time_zone_id = time_zone_id - self.notification_settings = notification_settings - self.target_resource_id = target_resource_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_paged.py deleted file mode 100644 index 1aa4946ff51e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SchedulePaged(Paged): - """ - A paging container for iterating over a list of :class:`Schedule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Schedule]'} - } - - def __init__(self, *args, **kwargs): - - super(SchedulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_py3.py deleted file mode 100644 index efd16216ef6e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_py3.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Schedule(Resource): - """A schedule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettings - :ivar created_date: The creation date of the schedule. - :vartype created_date: datetime - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, **kwargs) -> None: - super(Schedule, self).__init__(location=location, tags=tags, **kwargs) - self.status = status - self.task_type = task_type - self.weekly_recurrence = weekly_recurrence - self.daily_recurrence = daily_recurrence - self.hourly_recurrence = hourly_recurrence - self.time_zone_id = time_zone_id - self.notification_settings = notification_settings - self.created_date = None - self.target_resource_id = target_resource_id - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret.py deleted file mode 100644 index ae1048a9e9ec..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Secret(Resource): - """A secret. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param value: The value of the secret for secret creation. - :type value: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Secret, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment.py deleted file mode 100644 index 06df551c944b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class SecretFragment(UpdateResource): - """A secret. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param value: The value of the secret for secret creation. - :type value: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SecretFragment, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment_py3.py deleted file mode 100644 index 64907637295e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class SecretFragment(UpdateResource): - """A secret. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param value: The value of the secret for secret creation. - :type value: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - } - - def __init__(self, *, tags=None, value: str=None, **kwargs) -> None: - super(SecretFragment, self).__init__(tags=tags, **kwargs) - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_paged.py deleted file mode 100644 index 1c6a8f295064..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SecretPaged(Paged): - """ - A paging container for iterating over a list of :class:`Secret ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Secret]'} - } - - def __init__(self, *args, **kwargs): - - super(SecretPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_py3.py deleted file mode 100644 index 16b45cb8ccde..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Secret(Resource): - """A secret. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param value: The value of the secret for secret creation. - :type value: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, value: str=None, **kwargs) -> None: - super(Secret, self).__init__(location=location, tags=tags, **kwargs) - self.value = value - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric.py deleted file mode 100644 index e8f46ff06337..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ServiceFabric(Resource): - """A Service Fabric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param external_service_fabric_id: The backing service fabric resource's - id - :type external_service_fabric_id: str - :param environment_id: The resource id of the environment under which the - service fabric resource is present - :type environment_id: str - :ivar applicable_schedule: The applicable schedule for the virtual - machine. - :vartype applicable_schedule: - ~azure.mgmt.devtestlabs.models.ApplicableSchedule - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'applicable_schedule': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceFabric, self).__init__(**kwargs) - self.external_service_fabric_id = kwargs.get('external_service_fabric_id', None) - self.environment_id = kwargs.get('environment_id', None) - self.applicable_schedule = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment.py deleted file mode 100644 index 8feb8f2b0dcd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class ServiceFabricFragment(UpdateResource): - """A Service Fabric. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param external_service_fabric_id: The backing service fabric resource's - id - :type external_service_fabric_id: str - :param environment_id: The resource id of the environment under which the - service fabric resource is present - :type environment_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceFabricFragment, self).__init__(**kwargs) - self.external_service_fabric_id = kwargs.get('external_service_fabric_id', None) - self.environment_id = kwargs.get('environment_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment_py3.py deleted file mode 100644 index a1471c5984ea..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class ServiceFabricFragment(UpdateResource): - """A Service Fabric. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param external_service_fabric_id: The backing service fabric resource's - id - :type external_service_fabric_id: str - :param environment_id: The resource id of the environment under which the - service fabric resource is present - :type environment_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - } - - def __init__(self, *, tags=None, external_service_fabric_id: str=None, environment_id: str=None, **kwargs) -> None: - super(ServiceFabricFragment, self).__init__(tags=tags, **kwargs) - self.external_service_fabric_id = external_service_fabric_id - self.environment_id = environment_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_paged.py deleted file mode 100644 index 7de95722931e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServiceFabricPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServiceFabric ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServiceFabric]'} - } - - def __init__(self, *args, **kwargs): - - super(ServiceFabricPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_py3.py deleted file mode 100644 index 50cf5f715bf4..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ServiceFabric(Resource): - """A Service Fabric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param external_service_fabric_id: The backing service fabric resource's - id - :type external_service_fabric_id: str - :param environment_id: The resource id of the environment under which the - service fabric resource is present - :type environment_id: str - :ivar applicable_schedule: The applicable schedule for the virtual - machine. - :vartype applicable_schedule: - ~azure.mgmt.devtestlabs.models.ApplicableSchedule - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'applicable_schedule': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, external_service_fabric_id: str=None, environment_id: str=None, **kwargs) -> None: - super(ServiceFabric, self).__init__(location=location, tags=tags, **kwargs) - self.external_service_fabric_id = external_service_fabric_id - self.environment_id = environment_id - self.applicable_schedule = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner.py deleted file mode 100644 index 38d8100572ac..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ServiceRunner(Resource): - """A container for a managed identity to execute DevTest lab services. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the resource. - :type identity: ~azure.mgmt.devtestlabs.models.IdentityProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, - } - - def __init__(self, **kwargs): - super(ServiceRunner, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_paged.py deleted file mode 100644 index c5f8658f70e1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServiceRunnerPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServiceRunner ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServiceRunner]'} - } - - def __init__(self, *args, **kwargs): - - super(ServiceRunnerPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_py3.py deleted file mode 100644 index 5afa18026e0c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ServiceRunner(Resource): - """A container for a managed identity to execute DevTest lab services. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the resource. - :type identity: ~azure.mgmt.devtestlabs.models.IdentityProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, - } - - def __init__(self, *, location: str=None, tags=None, identity=None, **kwargs) -> None: - super(ServiceRunner, self).__init__(location=location, tags=tags, **kwargs) - self.identity = identity diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration.py deleted file mode 100644 index c372a21093bd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SharedPublicIpAddressConfiguration(Model): - """Properties of a virtual machine that determine how it is connected to a - load balancer. - - :param inbound_nat_rules: The incoming NAT rules - :type inbound_nat_rules: - list[~azure.mgmt.devtestlabs.models.InboundNatRule] - """ - - _attribute_map = { - 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRule]'}, - } - - def __init__(self, **kwargs): - super(SharedPublicIpAddressConfiguration, self).__init__(**kwargs) - self.inbound_nat_rules = kwargs.get('inbound_nat_rules', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment.py deleted file mode 100644 index 48eef7b014cc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SharedPublicIpAddressConfigurationFragment(Model): - """Properties of a virtual machine that determine how it is connected to a - load balancer. - - :param inbound_nat_rules: The incoming NAT rules - :type inbound_nat_rules: - list[~azure.mgmt.devtestlabs.models.InboundNatRuleFragment] - """ - - _attribute_map = { - 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRuleFragment]'}, - } - - def __init__(self, **kwargs): - super(SharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) - self.inbound_nat_rules = kwargs.get('inbound_nat_rules', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment_py3.py deleted file mode 100644 index d2121254c806..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SharedPublicIpAddressConfigurationFragment(Model): - """Properties of a virtual machine that determine how it is connected to a - load balancer. - - :param inbound_nat_rules: The incoming NAT rules - :type inbound_nat_rules: - list[~azure.mgmt.devtestlabs.models.InboundNatRuleFragment] - """ - - _attribute_map = { - 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRuleFragment]'}, - } - - def __init__(self, *, inbound_nat_rules=None, **kwargs) -> None: - super(SharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) - self.inbound_nat_rules = inbound_nat_rules diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_py3.py deleted file mode 100644 index 13c9209e5140..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SharedPublicIpAddressConfiguration(Model): - """Properties of a virtual machine that determine how it is connected to a - load balancer. - - :param inbound_nat_rules: The incoming NAT rules - :type inbound_nat_rules: - list[~azure.mgmt.devtestlabs.models.InboundNatRule] - """ - - _attribute_map = { - 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRule]'}, - } - - def __init__(self, *, inbound_nat_rules=None, **kwargs) -> None: - super(SharedPublicIpAddressConfiguration, self).__init__(**kwargs) - self.inbound_nat_rules = inbound_nat_rules diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content.py deleted file mode 100644 index 00b760315ab8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ShutdownNotificationContent(Model): - """The contents of a shutdown notification. Webhooks can use this type to - deserialize the request body when they get notified of an imminent - shutdown. - - :param skip_url: The URL to skip auto-shutdown. - :type skip_url: str - :param delay_url60: The URL to delay shutdown by 60 minutes. - :type delay_url60: str - :param delay_url120: The URL to delay shutdown by 2 hours. - :type delay_url120: str - :param vm_name: The virtual machine to be shut down. - :type vm_name: str - :param guid: The GUID for the virtual machine to be shut down. - :type guid: str - :param owner: The owner of the virtual machine. - :type owner: str - :param vm_url: The URL of the virtual machine. - :type vm_url: str - :param minutes_until_shutdown: Minutes remaining until shutdown - :type minutes_until_shutdown: str - :param event_type: The event for which a notification will be sent. - :type event_type: str - :param text: The text for the notification. - :type text: str - :param subscription_id: The subscription ID for the schedule. - :type subscription_id: str - :param resource_group_name: The resource group name for the schedule. - :type resource_group_name: str - :param lab_name: The lab for the schedule. - :type lab_name: str - """ - - _attribute_map = { - 'skip_url': {'key': 'skipUrl', 'type': 'str'}, - 'delay_url60': {'key': 'delayUrl60', 'type': 'str'}, - 'delay_url120': {'key': 'delayUrl120', 'type': 'str'}, - 'vm_name': {'key': 'vmName', 'type': 'str'}, - 'guid': {'key': 'guid', 'type': 'str'}, - 'owner': {'key': 'owner', 'type': 'str'}, - 'vm_url': {'key': 'vmUrl', 'type': 'str'}, - 'minutes_until_shutdown': {'key': 'minutesUntilShutdown', 'type': 'str'}, - 'event_type': {'key': 'eventType', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, - 'lab_name': {'key': 'labName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ShutdownNotificationContent, self).__init__(**kwargs) - self.skip_url = kwargs.get('skip_url', None) - self.delay_url60 = kwargs.get('delay_url60', None) - self.delay_url120 = kwargs.get('delay_url120', None) - self.vm_name = kwargs.get('vm_name', None) - self.guid = kwargs.get('guid', None) - self.owner = kwargs.get('owner', None) - self.vm_url = kwargs.get('vm_url', None) - self.minutes_until_shutdown = kwargs.get('minutes_until_shutdown', None) - self.event_type = kwargs.get('event_type', None) - self.text = kwargs.get('text', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group_name = kwargs.get('resource_group_name', None) - self.lab_name = kwargs.get('lab_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content_py3.py deleted file mode 100644 index 47242c6a1816..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ShutdownNotificationContent(Model): - """The contents of a shutdown notification. Webhooks can use this type to - deserialize the request body when they get notified of an imminent - shutdown. - - :param skip_url: The URL to skip auto-shutdown. - :type skip_url: str - :param delay_url60: The URL to delay shutdown by 60 minutes. - :type delay_url60: str - :param delay_url120: The URL to delay shutdown by 2 hours. - :type delay_url120: str - :param vm_name: The virtual machine to be shut down. - :type vm_name: str - :param guid: The GUID for the virtual machine to be shut down. - :type guid: str - :param owner: The owner of the virtual machine. - :type owner: str - :param vm_url: The URL of the virtual machine. - :type vm_url: str - :param minutes_until_shutdown: Minutes remaining until shutdown - :type minutes_until_shutdown: str - :param event_type: The event for which a notification will be sent. - :type event_type: str - :param text: The text for the notification. - :type text: str - :param subscription_id: The subscription ID for the schedule. - :type subscription_id: str - :param resource_group_name: The resource group name for the schedule. - :type resource_group_name: str - :param lab_name: The lab for the schedule. - :type lab_name: str - """ - - _attribute_map = { - 'skip_url': {'key': 'skipUrl', 'type': 'str'}, - 'delay_url60': {'key': 'delayUrl60', 'type': 'str'}, - 'delay_url120': {'key': 'delayUrl120', 'type': 'str'}, - 'vm_name': {'key': 'vmName', 'type': 'str'}, - 'guid': {'key': 'guid', 'type': 'str'}, - 'owner': {'key': 'owner', 'type': 'str'}, - 'vm_url': {'key': 'vmUrl', 'type': 'str'}, - 'minutes_until_shutdown': {'key': 'minutesUntilShutdown', 'type': 'str'}, - 'event_type': {'key': 'eventType', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, - 'lab_name': {'key': 'labName', 'type': 'str'}, - } - - def __init__(self, *, skip_url: str=None, delay_url60: str=None, delay_url120: str=None, vm_name: str=None, guid: str=None, owner: str=None, vm_url: str=None, minutes_until_shutdown: str=None, event_type: str=None, text: str=None, subscription_id: str=None, resource_group_name: str=None, lab_name: str=None, **kwargs) -> None: - super(ShutdownNotificationContent, self).__init__(**kwargs) - self.skip_url = skip_url - self.delay_url60 = delay_url60 - self.delay_url120 = delay_url120 - self.vm_name = vm_name - self.guid = guid - self.owner = owner - self.vm_url = vm_url - self.minutes_until_shutdown = minutes_until_shutdown - self.event_type = event_type - self.text = text - self.subscription_id = subscription_id - self.resource_group_name = resource_group_name - self.lab_name = lab_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet.py deleted file mode 100644 index 520ea0b84c0b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Subnet(Model): - """Subnet information. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name of the subnet as seen in the lab. - :type lab_subnet_name: str - :param allow_public_ip: The permission policy of the subnet for allowing - public IP addresses (i.e. Allow, Deny)). Possible values include: - 'Default', 'Deny', 'Allow' - :type allow_public_ip: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Subnet, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.allow_public_ip = kwargs.get('allow_public_ip', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment.py deleted file mode 100644 index db484aef5efc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetFragment(Model): - """Subnet information. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name of the subnet as seen in the lab. - :type lab_subnet_name: str - :param allow_public_ip: The permission policy of the subnet for allowing - public IP addresses (i.e. Allow, Deny)). Possible values include: - 'Default', 'Deny', 'Allow' - :type allow_public_ip: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubnetFragment, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.allow_public_ip = kwargs.get('allow_public_ip', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment_py3.py deleted file mode 100644 index bdca8f51fc58..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetFragment(Model): - """Subnet information. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name of the subnet as seen in the lab. - :type lab_subnet_name: str - :param allow_public_ip: The permission policy of the subnet for allowing - public IP addresses (i.e. Allow, Deny)). Possible values include: - 'Default', 'Deny', 'Allow' - :type allow_public_ip: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, allow_public_ip=None, **kwargs) -> None: - super(SubnetFragment, self).__init__(**kwargs) - self.resource_id = resource_id - self.lab_subnet_name = lab_subnet_name - self.allow_public_ip = allow_public_ip diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override.py deleted file mode 100644 index c091e516241d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetOverride(Model): - """Property overrides on a subnet of a virtual network. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name given to the subnet within the lab. - :type lab_subnet_name: str - :param use_in_vm_creation_permission: Indicates whether this subnet can be - used during virtual machine creation (i.e. Allow, Deny). Possible values - include: 'Default', 'Deny', 'Allow' - :type use_in_vm_creation_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param use_public_ip_address_permission: Indicates whether public IP - addresses can be assigned to virtual machines on this subnet (i.e. Allow, - Deny). Possible values include: 'Default', 'Deny', 'Allow' - :type use_public_ip_address_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param shared_public_ip_address_configuration: Properties that virtual - machines on this subnet will share. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfiguration - :param virtual_network_pool_name: The virtual network pool associated with - this subnet. - :type virtual_network_pool_name: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, - 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfiguration'}, - 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubnetOverride, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.use_in_vm_creation_permission = kwargs.get('use_in_vm_creation_permission', None) - self.use_public_ip_address_permission = kwargs.get('use_public_ip_address_permission', None) - self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) - self.virtual_network_pool_name = kwargs.get('virtual_network_pool_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment.py deleted file mode 100644 index 839368724e6a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetOverrideFragment(Model): - """Property overrides on a subnet of a virtual network. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name given to the subnet within the lab. - :type lab_subnet_name: str - :param use_in_vm_creation_permission: Indicates whether this subnet can be - used during virtual machine creation (i.e. Allow, Deny). Possible values - include: 'Default', 'Deny', 'Allow' - :type use_in_vm_creation_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param use_public_ip_address_permission: Indicates whether public IP - addresses can be assigned to virtual machines on this subnet (i.e. Allow, - Deny). Possible values include: 'Default', 'Deny', 'Allow' - :type use_public_ip_address_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param shared_public_ip_address_configuration: Properties that virtual - machines on this subnet will share. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfigurationFragment - :param virtual_network_pool_name: The virtual network pool associated with - this subnet. - :type virtual_network_pool_name: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, - 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfigurationFragment'}, - 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubnetOverrideFragment, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.use_in_vm_creation_permission = kwargs.get('use_in_vm_creation_permission', None) - self.use_public_ip_address_permission = kwargs.get('use_public_ip_address_permission', None) - self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) - self.virtual_network_pool_name = kwargs.get('virtual_network_pool_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment_py3.py deleted file mode 100644 index a48b90a27c65..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetOverrideFragment(Model): - """Property overrides on a subnet of a virtual network. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name given to the subnet within the lab. - :type lab_subnet_name: str - :param use_in_vm_creation_permission: Indicates whether this subnet can be - used during virtual machine creation (i.e. Allow, Deny). Possible values - include: 'Default', 'Deny', 'Allow' - :type use_in_vm_creation_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param use_public_ip_address_permission: Indicates whether public IP - addresses can be assigned to virtual machines on this subnet (i.e. Allow, - Deny). Possible values include: 'Default', 'Deny', 'Allow' - :type use_public_ip_address_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param shared_public_ip_address_configuration: Properties that virtual - machines on this subnet will share. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfigurationFragment - :param virtual_network_pool_name: The virtual network pool associated with - this subnet. - :type virtual_network_pool_name: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, - 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfigurationFragment'}, - 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, use_in_vm_creation_permission=None, use_public_ip_address_permission=None, shared_public_ip_address_configuration=None, virtual_network_pool_name: str=None, **kwargs) -> None: - super(SubnetOverrideFragment, self).__init__(**kwargs) - self.resource_id = resource_id - self.lab_subnet_name = lab_subnet_name - self.use_in_vm_creation_permission = use_in_vm_creation_permission - self.use_public_ip_address_permission = use_public_ip_address_permission - self.shared_public_ip_address_configuration = shared_public_ip_address_configuration - self.virtual_network_pool_name = virtual_network_pool_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_py3.py deleted file mode 100644 index 30ddcbe9a971..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetOverride(Model): - """Property overrides on a subnet of a virtual network. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name given to the subnet within the lab. - :type lab_subnet_name: str - :param use_in_vm_creation_permission: Indicates whether this subnet can be - used during virtual machine creation (i.e. Allow, Deny). Possible values - include: 'Default', 'Deny', 'Allow' - :type use_in_vm_creation_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param use_public_ip_address_permission: Indicates whether public IP - addresses can be assigned to virtual machines on this subnet (i.e. Allow, - Deny). Possible values include: 'Default', 'Deny', 'Allow' - :type use_public_ip_address_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param shared_public_ip_address_configuration: Properties that virtual - machines on this subnet will share. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfiguration - :param virtual_network_pool_name: The virtual network pool associated with - this subnet. - :type virtual_network_pool_name: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, - 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfiguration'}, - 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, use_in_vm_creation_permission=None, use_public_ip_address_permission=None, shared_public_ip_address_configuration=None, virtual_network_pool_name: str=None, **kwargs) -> None: - super(SubnetOverride, self).__init__(**kwargs) - self.resource_id = resource_id - self.lab_subnet_name = lab_subnet_name - self.use_in_vm_creation_permission = use_in_vm_creation_permission - self.use_public_ip_address_permission = use_public_ip_address_permission - self.shared_public_ip_address_configuration = shared_public_ip_address_configuration - self.virtual_network_pool_name = virtual_network_pool_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_py3.py deleted file mode 100644 index 6faba11229c2..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Subnet(Model): - """Subnet information. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name of the subnet as seen in the lab. - :type lab_subnet_name: str - :param allow_public_ip: The permission policy of the subnet for allowing - public IP addresses (i.e. Allow, Deny)). Possible values include: - 'Default', 'Deny', 'Allow' - :type allow_public_ip: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, allow_public_ip=None, **kwargs) -> None: - super(Subnet, self).__init__(**kwargs) - self.resource_id = resource_id - self.lab_subnet_name = lab_subnet_name - self.allow_public_ip = allow_public_ip diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration.py deleted file mode 100644 index c300efe3e12a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetSharedPublicIpAddressConfiguration(Model): - """Configuration for public IP address sharing. - - :param allowed_ports: Backend ports that virtual machines on this subnet - are allowed to expose - :type allowed_ports: list[~azure.mgmt.devtestlabs.models.Port] - """ - - _attribute_map = { - 'allowed_ports': {'key': 'allowedPorts', 'type': '[Port]'}, - } - - def __init__(self, **kwargs): - super(SubnetSharedPublicIpAddressConfiguration, self).__init__(**kwargs) - self.allowed_ports = kwargs.get('allowed_ports', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.py deleted file mode 100644 index 737aba0c3385..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetSharedPublicIpAddressConfigurationFragment(Model): - """Configuration for public IP address sharing. - - :param allowed_ports: Backend ports that virtual machines on this subnet - are allowed to expose - :type allowed_ports: list[~azure.mgmt.devtestlabs.models.PortFragment] - """ - - _attribute_map = { - 'allowed_ports': {'key': 'allowedPorts', 'type': '[PortFragment]'}, - } - - def __init__(self, **kwargs): - super(SubnetSharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) - self.allowed_ports = kwargs.get('allowed_ports', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment_py3.py deleted file mode 100644 index b108414e8db0..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetSharedPublicIpAddressConfigurationFragment(Model): - """Configuration for public IP address sharing. - - :param allowed_ports: Backend ports that virtual machines on this subnet - are allowed to expose - :type allowed_ports: list[~azure.mgmt.devtestlabs.models.PortFragment] - """ - - _attribute_map = { - 'allowed_ports': {'key': 'allowedPorts', 'type': '[PortFragment]'}, - } - - def __init__(self, *, allowed_ports=None, **kwargs) -> None: - super(SubnetSharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) - self.allowed_ports = allowed_ports diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_py3.py deleted file mode 100644 index b0149a863f64..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetSharedPublicIpAddressConfiguration(Model): - """Configuration for public IP address sharing. - - :param allowed_ports: Backend ports that virtual machines on this subnet - are allowed to expose - :type allowed_ports: list[~azure.mgmt.devtestlabs.models.Port] - """ - - _attribute_map = { - 'allowed_ports': {'key': 'allowedPorts', 'type': '[Port]'}, - } - - def __init__(self, *, allowed_ports=None, **kwargs) -> None: - super(SubnetSharedPublicIpAddressConfiguration, self).__init__(**kwargs) - self.allowed_ports = allowed_ports diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties.py deleted file mode 100644 index d6eca3dfd40e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TargetCostProperties(Model): - """Properties of a cost target. - - :param status: Target cost status. Possible values include: 'Enabled', - 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.TargetCostStatus - :param target: Lab target cost - :type target: int - :param cost_thresholds: Cost thresholds. - :type cost_thresholds: - list[~azure.mgmt.devtestlabs.models.CostThresholdProperties] - :param cycle_start_date_time: Reporting cycle start date. - :type cycle_start_date_time: datetime - :param cycle_end_date_time: Reporting cycle end date. - :type cycle_end_date_time: datetime - :param cycle_type: Reporting cycle type. Possible values include: - 'CalendarMonth', 'Custom' - :type cycle_type: str or ~azure.mgmt.devtestlabs.models.ReportingCycleType - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'int'}, - 'cost_thresholds': {'key': 'costThresholds', 'type': '[CostThresholdProperties]'}, - 'cycle_start_date_time': {'key': 'cycleStartDateTime', 'type': 'iso-8601'}, - 'cycle_end_date_time': {'key': 'cycleEndDateTime', 'type': 'iso-8601'}, - 'cycle_type': {'key': 'cycleType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TargetCostProperties, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.target = kwargs.get('target', None) - self.cost_thresholds = kwargs.get('cost_thresholds', None) - self.cycle_start_date_time = kwargs.get('cycle_start_date_time', None) - self.cycle_end_date_time = kwargs.get('cycle_end_date_time', None) - self.cycle_type = kwargs.get('cycle_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties_py3.py deleted file mode 100644 index 8e79d34b0ed9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TargetCostProperties(Model): - """Properties of a cost target. - - :param status: Target cost status. Possible values include: 'Enabled', - 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.TargetCostStatus - :param target: Lab target cost - :type target: int - :param cost_thresholds: Cost thresholds. - :type cost_thresholds: - list[~azure.mgmt.devtestlabs.models.CostThresholdProperties] - :param cycle_start_date_time: Reporting cycle start date. - :type cycle_start_date_time: datetime - :param cycle_end_date_time: Reporting cycle end date. - :type cycle_end_date_time: datetime - :param cycle_type: Reporting cycle type. Possible values include: - 'CalendarMonth', 'Custom' - :type cycle_type: str or ~azure.mgmt.devtestlabs.models.ReportingCycleType - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'int'}, - 'cost_thresholds': {'key': 'costThresholds', 'type': '[CostThresholdProperties]'}, - 'cycle_start_date_time': {'key': 'cycleStartDateTime', 'type': 'iso-8601'}, - 'cycle_end_date_time': {'key': 'cycleEndDateTime', 'type': 'iso-8601'}, - 'cycle_type': {'key': 'cycleType', 'type': 'str'}, - } - - def __init__(self, *, status=None, target: int=None, cost_thresholds=None, cycle_start_date_time=None, cycle_end_date_time=None, cycle_type=None, **kwargs) -> None: - super(TargetCostProperties, self).__init__(**kwargs) - self.status = status - self.target = target - self.cost_thresholds = cost_thresholds - self.cycle_start_date_time = cycle_start_date_time - self.cycle_end_date_time = cycle_end_date_time - self.cycle_type = cycle_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource.py deleted file mode 100644 index 4849be7f6102..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateResource(Model): - """Represents an update resource. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(UpdateResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource_py3.py deleted file mode 100644 index 62a3c23c2164..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateResource(Model): - """Represents an update resource. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(UpdateResource, self).__init__(**kwargs) - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user.py deleted file mode 100644 index 28099b85f900..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class User(Resource): - """Profile of a lab user. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the user. - :type identity: ~azure.mgmt.devtestlabs.models.UserIdentity - :param secret_store: The secret store of the user. - :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStore - :ivar created_date: The creation date of the user profile. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'properties.identity', 'type': 'UserIdentity'}, - 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStore'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(User, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.secret_store = kwargs.get('secret_store', None) - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment.py deleted file mode 100644 index cd9a685bdbbe..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class UserFragment(UpdateResource): - """Profile of a lab user. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the user. - :type identity: ~azure.mgmt.devtestlabs.models.UserIdentityFragment - :param secret_store: The secret store of the user. - :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStoreFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'properties.identity', 'type': 'UserIdentityFragment'}, - 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStoreFragment'}, - } - - def __init__(self, **kwargs): - super(UserFragment, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.secret_store = kwargs.get('secret_store', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment_py3.py deleted file mode 100644 index 357a81712e45..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class UserFragment(UpdateResource): - """Profile of a lab user. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the user. - :type identity: ~azure.mgmt.devtestlabs.models.UserIdentityFragment - :param secret_store: The secret store of the user. - :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStoreFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'properties.identity', 'type': 'UserIdentityFragment'}, - 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStoreFragment'}, - } - - def __init__(self, *, tags=None, identity=None, secret_store=None, **kwargs) -> None: - super(UserFragment, self).__init__(tags=tags, **kwargs) - self.identity = identity - self.secret_store = secret_store diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity.py deleted file mode 100644 index 557f65e2b82f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserIdentity(Model): - """Identity attributes of a lab user. - - :param principal_name: Set to the principal name / UPN of the client JWT - making the request. - :type principal_name: str - :param principal_id: Set to the principal Id of the client JWT making the - request. Service principal will not have the principal Id. - :type principal_id: str - :param tenant_id: Set to the tenant ID of the client JWT making the - request. - :type tenant_id: str - :param object_id: Set to the object Id of the client JWT making the - request. Not all users have object Id. For CSP (reseller) scenarios for - example, object Id is not available. - :type object_id: str - :param app_id: Set to the app Id of the client JWT making the request. - :type app_id: str - """ - - _attribute_map = { - 'principal_name': {'key': 'principalName', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserIdentity, self).__init__(**kwargs) - self.principal_name = kwargs.get('principal_name', None) - self.principal_id = kwargs.get('principal_id', None) - self.tenant_id = kwargs.get('tenant_id', None) - self.object_id = kwargs.get('object_id', None) - self.app_id = kwargs.get('app_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment.py deleted file mode 100644 index 0783b56f47b3..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserIdentityFragment(Model): - """Identity attributes of a lab user. - - :param principal_name: Set to the principal name / UPN of the client JWT - making the request. - :type principal_name: str - :param principal_id: Set to the principal Id of the client JWT making the - request. Service principal will not have the principal Id. - :type principal_id: str - :param tenant_id: Set to the tenant ID of the client JWT making the - request. - :type tenant_id: str - :param object_id: Set to the object Id of the client JWT making the - request. Not all users have object Id. For CSP (reseller) scenarios for - example, object Id is not available. - :type object_id: str - :param app_id: Set to the app Id of the client JWT making the request. - :type app_id: str - """ - - _attribute_map = { - 'principal_name': {'key': 'principalName', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserIdentityFragment, self).__init__(**kwargs) - self.principal_name = kwargs.get('principal_name', None) - self.principal_id = kwargs.get('principal_id', None) - self.tenant_id = kwargs.get('tenant_id', None) - self.object_id = kwargs.get('object_id', None) - self.app_id = kwargs.get('app_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment_py3.py deleted file mode 100644 index 3c2fdb6e005b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserIdentityFragment(Model): - """Identity attributes of a lab user. - - :param principal_name: Set to the principal name / UPN of the client JWT - making the request. - :type principal_name: str - :param principal_id: Set to the principal Id of the client JWT making the - request. Service principal will not have the principal Id. - :type principal_id: str - :param tenant_id: Set to the tenant ID of the client JWT making the - request. - :type tenant_id: str - :param object_id: Set to the object Id of the client JWT making the - request. Not all users have object Id. For CSP (reseller) scenarios for - example, object Id is not available. - :type object_id: str - :param app_id: Set to the app Id of the client JWT making the request. - :type app_id: str - """ - - _attribute_map = { - 'principal_name': {'key': 'principalName', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - } - - def __init__(self, *, principal_name: str=None, principal_id: str=None, tenant_id: str=None, object_id: str=None, app_id: str=None, **kwargs) -> None: - super(UserIdentityFragment, self).__init__(**kwargs) - self.principal_name = principal_name - self.principal_id = principal_id - self.tenant_id = tenant_id - self.object_id = object_id - self.app_id = app_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_py3.py deleted file mode 100644 index 03615a6e15b7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserIdentity(Model): - """Identity attributes of a lab user. - - :param principal_name: Set to the principal name / UPN of the client JWT - making the request. - :type principal_name: str - :param principal_id: Set to the principal Id of the client JWT making the - request. Service principal will not have the principal Id. - :type principal_id: str - :param tenant_id: Set to the tenant ID of the client JWT making the - request. - :type tenant_id: str - :param object_id: Set to the object Id of the client JWT making the - request. Not all users have object Id. For CSP (reseller) scenarios for - example, object Id is not available. - :type object_id: str - :param app_id: Set to the app Id of the client JWT making the request. - :type app_id: str - """ - - _attribute_map = { - 'principal_name': {'key': 'principalName', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - } - - def __init__(self, *, principal_name: str=None, principal_id: str=None, tenant_id: str=None, object_id: str=None, app_id: str=None, **kwargs) -> None: - super(UserIdentity, self).__init__(**kwargs) - self.principal_name = principal_name - self.principal_id = principal_id - self.tenant_id = tenant_id - self.object_id = object_id - self.app_id = app_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_paged.py deleted file mode 100644 index b48ce5901d56..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class UserPaged(Paged): - """ - A paging container for iterating over a list of :class:`User ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[User]'} - } - - def __init__(self, *args, **kwargs): - - super(UserPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_py3.py deleted file mode 100644 index 96d981829827..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class User(Resource): - """Profile of a lab user. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the user. - :type identity: ~azure.mgmt.devtestlabs.models.UserIdentity - :param secret_store: The secret store of the user. - :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStore - :ivar created_date: The creation date of the user profile. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'properties.identity', 'type': 'UserIdentity'}, - 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStore'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, identity=None, secret_store=None, **kwargs) -> None: - super(User, self).__init__(location=location, tags=tags, **kwargs) - self.identity = identity - self.secret_store = secret_store - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store.py deleted file mode 100644 index de4ee5cb6447..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserSecretStore(Model): - """Properties of a user's secret store. - - :param key_vault_uri: The URI of the user's Key vault. - :type key_vault_uri: str - :param key_vault_id: The ID of the user's Key vault. - :type key_vault_id: str - """ - - _attribute_map = { - 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, - 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserSecretStore, self).__init__(**kwargs) - self.key_vault_uri = kwargs.get('key_vault_uri', None) - self.key_vault_id = kwargs.get('key_vault_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment.py deleted file mode 100644 index 7789bff72056..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserSecretStoreFragment(Model): - """Properties of a user's secret store. - - :param key_vault_uri: The URI of the user's Key vault. - :type key_vault_uri: str - :param key_vault_id: The ID of the user's Key vault. - :type key_vault_id: str - """ - - _attribute_map = { - 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, - 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserSecretStoreFragment, self).__init__(**kwargs) - self.key_vault_uri = kwargs.get('key_vault_uri', None) - self.key_vault_id = kwargs.get('key_vault_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment_py3.py deleted file mode 100644 index 241c44664e06..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserSecretStoreFragment(Model): - """Properties of a user's secret store. - - :param key_vault_uri: The URI of the user's Key vault. - :type key_vault_uri: str - :param key_vault_id: The ID of the user's Key vault. - :type key_vault_id: str - """ - - _attribute_map = { - 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, - 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, - } - - def __init__(self, *, key_vault_uri: str=None, key_vault_id: str=None, **kwargs) -> None: - super(UserSecretStoreFragment, self).__init__(**kwargs) - self.key_vault_uri = key_vault_uri - self.key_vault_id = key_vault_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_py3.py deleted file mode 100644 index ad56603f7926..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserSecretStore(Model): - """Properties of a user's secret store. - - :param key_vault_uri: The URI of the user's Key vault. - :type key_vault_uri: str - :param key_vault_id: The ID of the user's Key vault. - :type key_vault_id: str - """ - - _attribute_map = { - 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, - 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, - } - - def __init__(self, *, key_vault_uri: str=None, key_vault_id: str=None, **kwargs) -> None: - super(UserSecretStore, self).__init__(**kwargs) - self.key_vault_uri = key_vault_uri - self.key_vault_id = key_vault_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network.py deleted file mode 100644 index 460ae9a78af0..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualNetwork(Resource): - """A virtual network. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param allowed_subnets: The allowed subnets of the virtual network. - :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.Subnet] - :param description: The description of the virtual network. - :type description: str - :param external_provider_resource_id: The Microsoft.Network resource - identifier of the virtual network. - :type external_provider_resource_id: str - :ivar external_subnets: The external subnet properties. - :vartype external_subnets: - list[~azure.mgmt.devtestlabs.models.ExternalSubnet] - :param subnet_overrides: The subnet overrides of the virtual network. - :type subnet_overrides: - list[~azure.mgmt.devtestlabs.models.SubnetOverride] - :ivar created_date: The creation date of the virtual network. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'external_subnets': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[Subnet]'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, - 'external_subnets': {'key': 'properties.externalSubnets', 'type': '[ExternalSubnet]'}, - 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverride]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualNetwork, self).__init__(**kwargs) - self.allowed_subnets = kwargs.get('allowed_subnets', None) - self.description = kwargs.get('description', None) - self.external_provider_resource_id = kwargs.get('external_provider_resource_id', None) - self.external_subnets = None - self.subnet_overrides = kwargs.get('subnet_overrides', None) - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment.py deleted file mode 100644 index 4840d07f21bb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class VirtualNetworkFragment(UpdateResource): - """A virtual network. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param allowed_subnets: The allowed subnets of the virtual network. - :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.SubnetFragment] - :param description: The description of the virtual network. - :type description: str - :param external_provider_resource_id: The Microsoft.Network resource - identifier of the virtual network. - :type external_provider_resource_id: str - :param subnet_overrides: The subnet overrides of the virtual network. - :type subnet_overrides: - list[~azure.mgmt.devtestlabs.models.SubnetOverrideFragment] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[SubnetFragment]'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, - 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverrideFragment]'}, - } - - def __init__(self, **kwargs): - super(VirtualNetworkFragment, self).__init__(**kwargs) - self.allowed_subnets = kwargs.get('allowed_subnets', None) - self.description = kwargs.get('description', None) - self.external_provider_resource_id = kwargs.get('external_provider_resource_id', None) - self.subnet_overrides = kwargs.get('subnet_overrides', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment_py3.py deleted file mode 100644 index bdc572018008..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class VirtualNetworkFragment(UpdateResource): - """A virtual network. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param allowed_subnets: The allowed subnets of the virtual network. - :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.SubnetFragment] - :param description: The description of the virtual network. - :type description: str - :param external_provider_resource_id: The Microsoft.Network resource - identifier of the virtual network. - :type external_provider_resource_id: str - :param subnet_overrides: The subnet overrides of the virtual network. - :type subnet_overrides: - list[~azure.mgmt.devtestlabs.models.SubnetOverrideFragment] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[SubnetFragment]'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, - 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverrideFragment]'}, - } - - def __init__(self, *, tags=None, allowed_subnets=None, description: str=None, external_provider_resource_id: str=None, subnet_overrides=None, **kwargs) -> None: - super(VirtualNetworkFragment, self).__init__(tags=tags, **kwargs) - self.allowed_subnets = allowed_subnets - self.description = description - self.external_provider_resource_id = external_provider_resource_id - self.subnet_overrides = subnet_overrides diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_paged.py deleted file mode 100644 index c4a6bac12054..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualNetworkPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualNetwork ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualNetwork]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualNetworkPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_py3.py deleted file mode 100644 index 4af05c325513..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualNetwork(Resource): - """A virtual network. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param allowed_subnets: The allowed subnets of the virtual network. - :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.Subnet] - :param description: The description of the virtual network. - :type description: str - :param external_provider_resource_id: The Microsoft.Network resource - identifier of the virtual network. - :type external_provider_resource_id: str - :ivar external_subnets: The external subnet properties. - :vartype external_subnets: - list[~azure.mgmt.devtestlabs.models.ExternalSubnet] - :param subnet_overrides: The subnet overrides of the virtual network. - :type subnet_overrides: - list[~azure.mgmt.devtestlabs.models.SubnetOverride] - :ivar created_date: The creation date of the virtual network. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'external_subnets': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[Subnet]'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, - 'external_subnets': {'key': 'properties.externalSubnets', 'type': '[ExternalSubnet]'}, - 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverride]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, allowed_subnets=None, description: str=None, external_provider_resource_id: str=None, subnet_overrides=None, **kwargs) -> None: - super(VirtualNetwork, self).__init__(location=location, tags=tags, **kwargs) - self.allowed_subnets = allowed_subnets - self.description = description - self.external_provider_resource_id = external_provider_resource_id - self.external_subnets = None - self.subnet_overrides = subnet_overrides - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details.py deleted file mode 100644 index 92d7a61279c1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WeekDetails(Model): - """Properties of a weekly schedule. - - :param weekdays: The days of the week for which the schedule is set (e.g. - Sunday, Monday, Tuesday, etc.). - :type weekdays: list[str] - :param time: The time of the day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'weekdays': {'key': 'weekdays', 'type': '[str]'}, - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WeekDetails, self).__init__(**kwargs) - self.weekdays = kwargs.get('weekdays', None) - self.time = kwargs.get('time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment.py deleted file mode 100644 index f40c5e26d54a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WeekDetailsFragment(Model): - """Properties of a weekly schedule. - - :param weekdays: The days of the week for which the schedule is set (e.g. - Sunday, Monday, Tuesday, etc.). - :type weekdays: list[str] - :param time: The time of the day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'weekdays': {'key': 'weekdays', 'type': '[str]'}, - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WeekDetailsFragment, self).__init__(**kwargs) - self.weekdays = kwargs.get('weekdays', None) - self.time = kwargs.get('time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment_py3.py deleted file mode 100644 index 4521250deffc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WeekDetailsFragment(Model): - """Properties of a weekly schedule. - - :param weekdays: The days of the week for which the schedule is set (e.g. - Sunday, Monday, Tuesday, etc.). - :type weekdays: list[str] - :param time: The time of the day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'weekdays': {'key': 'weekdays', 'type': '[str]'}, - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, *, weekdays=None, time: str=None, **kwargs) -> None: - super(WeekDetailsFragment, self).__init__(**kwargs) - self.weekdays = weekdays - self.time = time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_py3.py deleted file mode 100644 index d3bdddf6f4e4..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WeekDetails(Model): - """Properties of a weekly schedule. - - :param weekdays: The days of the week for which the schedule is set (e.g. - Sunday, Monday, Tuesday, etc.). - :type weekdays: list[str] - :param time: The time of the day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'weekdays': {'key': 'weekdays', 'type': '[str]'}, - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, *, weekdays=None, time: str=None, **kwargs) -> None: - super(WeekDetails, self).__init__(**kwargs) - self.weekdays = weekdays - self.time = time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info.py deleted file mode 100644 index 377c585b9162..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsOsInfo(Model): - """Information about a Windows OS. - - :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, - SysprepRequested, SysprepApplied). Possible values include: - 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' - :type windows_os_state: str or - ~azure.mgmt.devtestlabs.models.WindowsOsState - """ - - _attribute_map = { - 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WindowsOsInfo, self).__init__(**kwargs) - self.windows_os_state = kwargs.get('windows_os_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment.py deleted file mode 100644 index c54bfea8922a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsOsInfoFragment(Model): - """Information about a Windows OS. - - :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, - SysprepRequested, SysprepApplied). Possible values include: - 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' - :type windows_os_state: str or - ~azure.mgmt.devtestlabs.models.WindowsOsState - """ - - _attribute_map = { - 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WindowsOsInfoFragment, self).__init__(**kwargs) - self.windows_os_state = kwargs.get('windows_os_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment_py3.py deleted file mode 100644 index e2009eab0094..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsOsInfoFragment(Model): - """Information about a Windows OS. - - :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, - SysprepRequested, SysprepApplied). Possible values include: - 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' - :type windows_os_state: str or - ~azure.mgmt.devtestlabs.models.WindowsOsState - """ - - _attribute_map = { - 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, - } - - def __init__(self, *, windows_os_state=None, **kwargs) -> None: - super(WindowsOsInfoFragment, self).__init__(**kwargs) - self.windows_os_state = windows_os_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_py3.py deleted file mode 100644 index 6c59c08b3f5a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsOsInfo(Model): - """Information about a Windows OS. - - :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, - SysprepRequested, SysprepApplied). Possible values include: - 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' - :type windows_os_state: str or - ~azure.mgmt.devtestlabs.models.WindowsOsState - """ - - _attribute_map = { - 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, - } - - def __init__(self, *, windows_os_state=None, **kwargs) -> None: - super(WindowsOsInfo, self).__init__(**kwargs) - self.windows_os_state = windows_os_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/__init__.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/__init__.py index 89d5496052a3..659acdca2a6c 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/__init__.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/__init__.py @@ -9,31 +9,31 @@ # regenerated. # -------------------------------------------------------------------------- -from .provider_operations import ProviderOperations -from .labs_operations import LabsOperations -from .operations import Operations -from .global_schedules_operations import GlobalSchedulesOperations -from .artifact_sources_operations import ArtifactSourcesOperations -from .arm_templates_operations import ArmTemplatesOperations -from .artifacts_operations import ArtifactsOperations -from .costs_operations import CostsOperations -from .custom_images_operations import CustomImagesOperations -from .formulas_operations import FormulasOperations -from .gallery_images_operations import GalleryImagesOperations -from .notification_channels_operations import NotificationChannelsOperations -from .policy_sets_operations import PolicySetsOperations -from .policies_operations import PoliciesOperations -from .schedules_operations import SchedulesOperations -from .service_runners_operations import ServiceRunnersOperations -from .users_operations import UsersOperations -from .disks_operations import DisksOperations -from .environments_operations import EnvironmentsOperations -from .secrets_operations import SecretsOperations -from .service_fabrics_operations import ServiceFabricsOperations -from .service_fabric_schedules_operations import ServiceFabricSchedulesOperations -from .virtual_machines_operations import VirtualMachinesOperations -from .virtual_machine_schedules_operations import VirtualMachineSchedulesOperations -from .virtual_networks_operations import VirtualNetworksOperations +from ._provider_operations import ProviderOperations +from ._labs_operations import LabsOperations +from ._operations import Operations +from ._global_schedules_operations import GlobalSchedulesOperations +from ._artifact_sources_operations import ArtifactSourcesOperations +from ._arm_templates_operations import ArmTemplatesOperations +from ._artifacts_operations import ArtifactsOperations +from ._costs_operations import CostsOperations +from ._custom_images_operations import CustomImagesOperations +from ._formulas_operations import FormulasOperations +from ._gallery_images_operations import GalleryImagesOperations +from ._notification_channels_operations import NotificationChannelsOperations +from ._policy_sets_operations import PolicySetsOperations +from ._policies_operations import PoliciesOperations +from ._schedules_operations import SchedulesOperations +from ._service_runners_operations import ServiceRunnersOperations +from ._users_operations import UsersOperations +from ._disks_operations import DisksOperations +from ._environments_operations import EnvironmentsOperations +from ._secrets_operations import SecretsOperations +from ._service_fabrics_operations import ServiceFabricsOperations +from ._service_fabric_schedules_operations import ServiceFabricSchedulesOperations +from ._virtual_machines_operations import VirtualMachinesOperations +from ._virtual_machine_schedules_operations import VirtualMachineSchedulesOperations +from ._virtual_networks_operations import VirtualNetworksOperations __all__ = [ 'ProviderOperations', diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/arm_templates_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_arm_templates_operations.py similarity index 95% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/arm_templates_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_arm_templates_operations.py index fd4567544366..245a750452de 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/arm_templates_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_arm_templates_operations.py @@ -19,6 +19,8 @@ class ArmTemplatesOperations(object): """ArmTemplatesOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.ArmTemplatePaged[~azure.mgmt.devtestlabs.models.ArmTemplate] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -110,6 +111,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -120,12 +126,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ArmTemplatePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ArmTemplatePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ArmTemplatePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/armtemplates'} @@ -140,7 +144,7 @@ def get( :type lab_name: str :param artifact_source_name: The name of the artifact source. :type artifact_source_name: str - :param name: The name of the azure Resource Manager template. + :param name: The name of the azure resource manager template. :type name: str :param expand: Specify the $expand query. Example: 'properties($select=displayName)' @@ -192,7 +196,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ArmTemplate', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifact_sources_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifact_sources_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifact_sources_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifact_sources_operations.py index 67f75d5d6079..6ec87de82fc0 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifact_sources_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifact_sources_operations.py @@ -19,6 +19,8 @@ class ArtifactSourcesOperations(object): """ArtifactSourcesOperations 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. @@ -67,8 +69,7 @@ def list( ~azure.mgmt.devtestlabs.models.ArtifactSourcePaged[~azure.mgmt.devtestlabs.models.ArtifactSource] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -107,6 +108,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -117,12 +123,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ArtifactSourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ArtifactSourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ArtifactSourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources'} @@ -186,7 +190,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ArtifactSource', response) @@ -257,7 +260,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ArtifactSource', response) if response.status_code == 201: @@ -328,7 +330,8 @@ def delete( def update( self, resource_group_name, lab_name, name, artifact_source, custom_headers=None, raw=False, **operation_config): - """Modify properties of artifact sources. + """Allows modifying tags of artifact sources. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -387,7 +390,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ArtifactSource', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifacts_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifacts_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifacts_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifacts_operations.py index d036a6026f51..e4a5d9693cd5 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifacts_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifacts_operations.py @@ -19,6 +19,8 @@ class ArtifactsOperations(object): """ArtifactsOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.ArtifactPaged[~azure.mgmt.devtestlabs.models.Artifact] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -110,6 +111,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -120,12 +126,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ArtifactPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ArtifactPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ArtifactPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/artifacts'} @@ -192,7 +196,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Artifact', response) @@ -269,7 +272,6 @@ def generate_arm_template( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ArmTemplateInfo', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/costs_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_costs_operations.py similarity index 98% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/costs_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_costs_operations.py index b63651cdcedc..b0f9ccc59db7 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/costs_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_costs_operations.py @@ -19,6 +19,8 @@ class CostsOperations(object): """CostsOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LabCost', response) @@ -167,7 +168,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LabCost', response) if response.status_code == 201: diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/custom_images_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_custom_images_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/custom_images_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_custom_images_operations.py index 4471269a40a5..06d30d912df6 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/custom_images_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_custom_images_operations.py @@ -21,6 +21,8 @@ class CustomImagesOperations(object): """CustomImagesOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.CustomImagePaged[~azure.mgmt.devtestlabs.models.CustomImage] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -109,6 +110,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.CustomImagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.CustomImagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.CustomImagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/customimages'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CustomImage', response) @@ -391,7 +394,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, name, custom_image, custom_headers=None, raw=False, **operation_config): - """Modify properties of custom images. + """Allows modifying tags of custom images. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -449,7 +453,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CustomImage', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/disks_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_disks_operations.py similarity index 98% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/disks_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_disks_operations.py index 3fbe8eac7cb0..5e5fea17acdd 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/disks_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_disks_operations.py @@ -21,6 +21,8 @@ class DisksOperations(object): """DisksOperations 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. @@ -71,8 +73,7 @@ def list( ~azure.mgmt.devtestlabs.models.DiskPaged[~azure.mgmt.devtestlabs.models.Disk] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -112,6 +113,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -122,12 +128,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks'} @@ -194,7 +198,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Disk', response) @@ -405,7 +408,7 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, user_name, name, disk, custom_headers=None, raw=False, **operation_config): - """Modify properties of disks. + """Allows modifying tags of disks. All other properties will be ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -466,7 +469,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Disk', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/environments_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_environments_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/environments_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_environments_operations.py index 61947381c66d..5805df9f86c1 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/environments_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_environments_operations.py @@ -21,6 +21,8 @@ class EnvironmentsOperations(object): """EnvironmentsOperations 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. @@ -71,8 +73,7 @@ def list( ~azure.mgmt.devtestlabs.models.DtlEnvironmentPaged[~azure.mgmt.devtestlabs.models.DtlEnvironment] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -112,6 +113,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -122,12 +128,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DtlEnvironmentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DtlEnvironmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DtlEnvironmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/environments'} @@ -194,7 +198,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DtlEnvironment', response) @@ -406,7 +409,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, user_name, name, dtl_environment, custom_headers=None, raw=False, **operation_config): - """Modify properties of environments. + """Allows modifying tags of environments. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -469,7 +473,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DtlEnvironment', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/formulas_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_formulas_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/formulas_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_formulas_operations.py index 366a1a2a129e..1c0665356f52 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/formulas_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_formulas_operations.py @@ -21,6 +21,8 @@ class FormulasOperations(object): """FormulasOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.FormulaPaged[~azure.mgmt.devtestlabs.models.Formula] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -109,6 +110,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.FormulaPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.FormulaPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.FormulaPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/formulas'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Formula', response) @@ -254,7 +257,7 @@ def _create_or_update_initial( def create_or_update( self, resource_group_name, lab_name, name, formula, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or replace an existing Formula. This operation can take a while + """Create or replace an existing formula. This operation can take a while to complete. :param resource_group_name: The name of the resource group. @@ -365,7 +368,8 @@ def delete( def update( self, resource_group_name, lab_name, name, formula, custom_headers=None, raw=False, **operation_config): - """Modify properties of formulas. + """Allows modifying tags of formulas. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -424,7 +428,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Formula', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/gallery_images_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_gallery_images_operations.py similarity index 93% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/gallery_images_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_gallery_images_operations.py index 849946066b15..97c3cf13e2c0 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/gallery_images_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_gallery_images_operations.py @@ -19,6 +19,8 @@ class GalleryImagesOperations(object): """GalleryImagesOperations 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. @@ -67,8 +69,7 @@ def list( ~azure.mgmt.devtestlabs.models.GalleryImagePaged[~azure.mgmt.devtestlabs.models.GalleryImage] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -107,6 +108,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -117,12 +123,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.GalleryImagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.GalleryImagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.GalleryImagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/galleryimages'} diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/global_schedules_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_global_schedules_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/global_schedules_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_global_schedules_operations.py index 736efa3c0cea..c05fe0f1308e 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/global_schedules_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_global_schedules_operations.py @@ -21,6 +21,8 @@ class GlobalSchedulesOperations(object): """GlobalSchedulesOperations 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. @@ -65,8 +67,7 @@ def list_by_subscription( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_subscription.metadata['url'] @@ -103,6 +104,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -113,12 +119,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DevTestLab/schedules'} @@ -151,8 +155,7 @@ def list_by_resource_group( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -190,6 +193,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -200,12 +208,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules'} @@ -266,7 +272,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -334,7 +339,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) if response.status_code == 201: @@ -402,7 +406,8 @@ def delete( def update( self, resource_group_name, name, schedule, custom_headers=None, raw=False, **operation_config): - """Modify properties of schedules. + """Allows modifying tags of schedules. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -457,7 +462,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/labs_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_labs_operations.py similarity index 98% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/labs_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_labs_operations.py index d6ce7c62635f..a0b03f5a0c53 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/labs_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_labs_operations.py @@ -21,6 +21,8 @@ class LabsOperations(object): """LabsOperations 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. @@ -65,8 +67,7 @@ def list_by_subscription( ~azure.mgmt.devtestlabs.models.LabPaged[~azure.mgmt.devtestlabs.models.Lab] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_subscription.metadata['url'] @@ -103,6 +104,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -113,12 +119,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.LabPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.LabPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.LabPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DevTestLab/labs'} @@ -151,8 +155,7 @@ def list_by_resource_group( ~azure.mgmt.devtestlabs.models.LabPaged[~azure.mgmt.devtestlabs.models.Lab] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -190,6 +193,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -200,12 +208,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.LabPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.LabPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.LabPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs'} @@ -266,7 +272,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Lab', response) @@ -461,7 +466,7 @@ def get_long_running_output(response): def update( self, resource_group_name, name, lab, custom_headers=None, raw=False, **operation_config): - """Modify properties of labs. + """Allows modifying tags of labs. All other properties will be ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -516,7 +521,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Lab', response) @@ -850,7 +854,6 @@ def generate_upload_uri( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('GenerateUploadUriResponse', response) @@ -973,8 +976,7 @@ def list_vhds( ~azure.mgmt.devtestlabs.models.LabVhdPaged[~azure.mgmt.devtestlabs.models.LabVhd] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_vhds.metadata['url'] @@ -1005,6 +1007,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -1015,12 +1022,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.LabVhdPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.LabVhdPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.LabVhdPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_vhds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/listVhds'} diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/notification_channels_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_notification_channels_operations.py similarity index 96% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/notification_channels_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_notification_channels_operations.py index 0c19dd07462e..d0f4de2d054b 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/notification_channels_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_notification_channels_operations.py @@ -19,6 +19,8 @@ class NotificationChannelsOperations(object): """NotificationChannelsOperations 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. @@ -67,8 +69,7 @@ def list( ~azure.mgmt.devtestlabs.models.NotificationChannelPaged[~azure.mgmt.devtestlabs.models.NotificationChannel] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -107,6 +108,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -117,12 +123,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.NotificationChannelPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.NotificationChannelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.NotificationChannelPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/notificationchannels'} @@ -135,7 +139,7 @@ def get( :type resource_group_name: str :param lab_name: The name of the lab. :type lab_name: str - :param name: The name of the notificationChannel. + :param name: The name of the notification channel. :type name: str :param expand: Specify the $expand query. Example: 'properties($select=webHookUrl)' @@ -186,7 +190,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('NotificationChannel', response) @@ -199,13 +202,13 @@ def get( def create_or_update( self, resource_group_name, lab_name, name, notification_channel, custom_headers=None, raw=False, **operation_config): - """Create or replace an existing notificationChannel. + """Create or replace an existing notification channel. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param lab_name: The name of the lab. :type lab_name: str - :param name: The name of the notificationChannel. + :param name: The name of the notification channel. :type name: str :param notification_channel: A notification. :type notification_channel: @@ -258,7 +261,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('NotificationChannel', response) if response.status_code == 201: @@ -279,7 +281,7 @@ def delete( :type resource_group_name: str :param lab_name: The name of the lab. :type lab_name: str - :param name: The name of the notificationChannel. + :param name: The name of the notification channel. :type name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -329,13 +331,14 @@ def delete( def update( self, resource_group_name, lab_name, name, notification_channel, custom_headers=None, raw=False, **operation_config): - """Modify properties of notification channels. + """Allows modifying tags of notification channels. All other properties + will be ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param lab_name: The name of the lab. :type lab_name: str - :param name: The name of the notificationChannel. + :param name: The name of the notification channel. :type name: str :param notification_channel: A notification. :type notification_channel: @@ -388,7 +391,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('NotificationChannel', response) @@ -407,7 +409,7 @@ def notify( :type resource_group_name: str :param lab_name: The name of the lab. :type lab_name: str - :param name: The name of the notificationChannel. + :param name: The name of the notification channel. :type name: str :param event_name: The type of event (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_operations.py similarity index 96% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_operations.py index 2f0636e39f26..5576b0e6fc0f 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_operations.py @@ -19,6 +19,8 @@ class Operations(object): """Operations 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. @@ -88,7 +90,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('OperationResult', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policies_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policies_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policies_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policies_operations.py index da02489f324b..90b956a0d88c 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policies_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policies_operations.py @@ -19,6 +19,8 @@ class PoliciesOperations(object): """PoliciesOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.PolicyPaged[~azure.mgmt.devtestlabs.models.Policy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -110,6 +111,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -120,12 +126,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.PolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.PolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.PolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies'} @@ -192,7 +196,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Policy', response) @@ -266,7 +269,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Policy', response) if response.status_code == 201: @@ -340,7 +342,8 @@ def delete( def update( self, resource_group_name, lab_name, policy_set_name, name, policy, custom_headers=None, raw=False, **operation_config): - """Modify properties of policies. + """Allows modifying tags of policies. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -401,7 +404,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Policy', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policy_sets_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policy_sets_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policy_sets_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policy_sets_operations.py index ed602a5ba340..66acd3ffb5e6 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policy_sets_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policy_sets_operations.py @@ -19,6 +19,8 @@ class PolicySetsOperations(object): """PolicySetsOperations 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. @@ -100,7 +102,6 @@ def evaluate_policies( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('EvaluatePoliciesResponse', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/provider_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_provider_operations.py similarity index 90% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/provider_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_provider_operations.py index 3597edb7fa87..5b12492d4b39 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/provider_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_provider_operations.py @@ -19,6 +19,8 @@ class ProviderOperations(object): """ProviderOperations 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. @@ -51,8 +53,7 @@ def list( ~azure.mgmt.devtestlabs.models.OperationMetadataPaged[~azure.mgmt.devtestlabs.models.OperationMetadata] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -77,6 +78,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -87,12 +93,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationMetadataPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.DevTestLab/operations'} diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/schedules_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_schedules_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/schedules_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_schedules_operations.py index 5f4e9429e3a1..996b11b9e6d4 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/schedules_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_schedules_operations.py @@ -21,6 +21,8 @@ class SchedulesOperations(object): """SchedulesOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -109,6 +110,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -259,7 +262,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) if response.status_code == 201: @@ -330,7 +332,8 @@ def delete( def update( self, resource_group_name, lab_name, name, schedule, custom_headers=None, raw=False, **operation_config): - """Modify properties of schedules. + """Allows modifying tags of schedules. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -388,7 +391,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -502,8 +504,7 @@ def list_applicable( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_applicable.metadata['url'] @@ -535,6 +536,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -545,12 +551,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_applicable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}/listApplicable'} diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/secrets_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_secrets_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/secrets_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_secrets_operations.py index 46e2a62a2b88..aa04f243c68c 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/secrets_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_secrets_operations.py @@ -21,6 +21,8 @@ class SecretsOperations(object): """SecretsOperations 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. @@ -71,8 +73,7 @@ def list( ~azure.mgmt.devtestlabs.models.SecretPaged[~azure.mgmt.devtestlabs.models.Secret] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -112,6 +113,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -122,12 +128,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SecretPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SecretPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SecretPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/secrets'} @@ -194,7 +198,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Secret', response) @@ -377,7 +380,7 @@ def delete( def update( self, resource_group_name, lab_name, user_name, name, tags=None, value=None, custom_headers=None, raw=False, **operation_config): - """Modify properties of secrets. + """Allows modifying tags of secrets. All other properties will be ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -442,7 +445,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Secret', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabric_schedules_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabric_schedules_operations.py similarity index 96% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabric_schedules_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabric_schedules_operations.py index 892b9b3fb50b..62ac4ca15eb1 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabric_schedules_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabric_schedules_operations.py @@ -21,6 +21,8 @@ class ServiceFabricSchedulesOperations(object): """ServiceFabricSchedulesOperations 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. @@ -49,7 +51,7 @@ def list( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param expand: Specify the $expand query. Example: 'properties($select=status)' @@ -73,8 +75,7 @@ def list( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -115,6 +116,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -125,12 +131,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{serviceFabricName}/schedules'} @@ -145,7 +149,7 @@ def get( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param name: The name of the schedule. :type name: str @@ -200,7 +204,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -221,7 +224,7 @@ def create_or_update( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param name: The name of the schedule. :type name: str @@ -277,7 +280,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) if response.status_code == 201: @@ -300,7 +302,7 @@ def delete( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param name: The name of the schedule. :type name: str @@ -354,7 +356,8 @@ def delete( def update( self, resource_group_name, lab_name, user_name, service_fabric_name, name, schedule, custom_headers=None, raw=False, **operation_config): - """Modify properties of schedules. + """Allows modifying tags of schedules. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -362,7 +365,7 @@ def update( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param name: The name of the schedule. :type name: str @@ -418,7 +421,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -480,7 +482,7 @@ def execute( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param name: The name of the schedule. :type name: str diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabrics_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabrics_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabrics_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabrics_operations.py index 076aa87a7963..f3ef18b8584e 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabrics_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabrics_operations.py @@ -21,6 +21,8 @@ class ServiceFabricsOperations(object): """ServiceFabricsOperations 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. @@ -71,8 +73,7 @@ def list( ~azure.mgmt.devtestlabs.models.ServiceFabricPaged[~azure.mgmt.devtestlabs.models.ServiceFabric] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -112,6 +113,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -122,12 +128,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServiceFabricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServiceFabricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServiceFabricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/servicefabrics'} @@ -142,7 +146,7 @@ def get( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param expand: Specify the $expand query. Example: 'properties($expand=applicableSchedule)' @@ -194,7 +198,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceFabric', response) @@ -261,7 +264,7 @@ def _create_or_update_initial( def create_or_update( self, resource_group_name, lab_name, user_name, name, service_fabric, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or replace an existing Service Fabric. This operation can take a + """Create or replace an existing service fabric. This operation can take a while to complete. :param resource_group_name: The name of the resource group. @@ -270,7 +273,7 @@ def create_or_update( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param service_fabric: A Service Fabric. :type service_fabric: ~azure.mgmt.devtestlabs.models.ServiceFabric @@ -366,7 +369,7 @@ def delete( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the @@ -405,7 +408,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, user_name, name, service_fabric, custom_headers=None, raw=False, **operation_config): - """Modify properties of service fabrics. + """Allows modifying tags of service fabrics. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -413,7 +417,7 @@ def update( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param service_fabric: A Service Fabric. :type service_fabric: @@ -467,7 +471,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceFabric', response) @@ -488,7 +491,7 @@ def list_applicable_schedules( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -535,7 +538,6 @@ def list_applicable_schedules( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ApplicableSchedule', response) @@ -596,7 +598,7 @@ def start( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the @@ -683,7 +685,7 @@ def stop( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_runners_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_runners_operations.py similarity index 71% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_runners_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_runners_operations.py index 83b4e9dae88c..aa464691b2fd 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_runners_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_runners_operations.py @@ -19,6 +19,8 @@ class ServiceRunnersOperations(object): """ServiceRunnersOperations 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. @@ -37,91 +39,6 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def list( - self, resource_group_name, lab_name, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """List service runners in a given lab. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param lab_name: The name of the lab. - :type lab_name: str - :param filter: The filter to apply to the operation. Example: - '$filter=contains(name,'myName') - :type filter: str - :param top: The maximum number of resources to return from the - operation. Example: '$top=10' - :type top: int - :param orderby: The ordering expression for the results, using OData - notation. Example: '$orderby=name desc' - :type orderby: 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: An iterator like instance of ServiceRunner - :rtype: - ~azure.mgmt.devtestlabs.models.ServiceRunnerPaged[~azure.mgmt.devtestlabs.models.ServiceRunner] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.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'), - 'labName': self._serialize.url("lab_name", lab_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # 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 - - return response - - # Deserialize response - deserialized = models.ServiceRunnerPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ServiceRunnerPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/servicerunners'} - def get( self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): """Get service runner. @@ -176,7 +93,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceRunner', response) @@ -189,7 +105,7 @@ def get( def create_or_update( self, resource_group_name, lab_name, name, service_runner, custom_headers=None, raw=False, **operation_config): - """Create or replace an existing Service runner. + """Create or replace an existing service runner. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -248,7 +164,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceRunner', response) if response.status_code == 201: diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/users_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_users_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/users_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_users_operations.py index 5f68155fece3..7e4d74c46fab 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/users_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_users_operations.py @@ -21,6 +21,8 @@ class UsersOperations(object): """UsersOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.UserPaged[~azure.mgmt.devtestlabs.models.User] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -109,6 +110,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.UserPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.UserPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.UserPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('User', response) @@ -391,7 +394,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, name, user, custom_headers=None, raw=False, **operation_config): - """Modify properties of user profiles. + """Allows modifying tags of user profiles. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -449,7 +453,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('User', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machine_schedules_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machine_schedules_operations.py similarity index 98% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machine_schedules_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machine_schedules_operations.py index dadb93a7e064..080a6514a343 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machine_schedules_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machine_schedules_operations.py @@ -21,6 +21,8 @@ class VirtualMachineSchedulesOperations(object): """VirtualMachineSchedulesOperations 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. @@ -71,8 +73,7 @@ def list( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -112,6 +113,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -122,12 +128,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{virtualMachineName}/schedules'} @@ -194,7 +198,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -268,7 +271,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) if response.status_code == 201: @@ -342,7 +344,8 @@ def delete( def update( self, resource_group_name, lab_name, virtual_machine_name, name, schedule, custom_headers=None, raw=False, **operation_config): - """Modify properties of schedules. + """Allows modifying tags of schedules. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -403,7 +406,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machines_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machines_operations.py similarity index 99% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machines_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machines_operations.py index 16c7762bfc04..32c51685fb71 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machines_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machines_operations.py @@ -21,6 +21,8 @@ class VirtualMachinesOperations(object): """VirtualMachinesOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.LabVirtualMachinePaged[~azure.mgmt.devtestlabs.models.LabVirtualMachine] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -109,6 +110,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.LabVirtualMachinePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.LabVirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.LabVirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LabVirtualMachine', response) @@ -254,7 +257,7 @@ def _create_or_update_initial( def create_or_update( self, resource_group_name, lab_name, name, lab_virtual_machine, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or replace an existing Virtual machine. This operation can take + """Create or replace an existing virtual machine. This operation can take a while to complete. :param resource_group_name: The name of the resource group. @@ -392,7 +395,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, name, lab_virtual_machine, custom_headers=None, raw=False, **operation_config): - """Modify properties of virtual machines. + """Allows modifying tags of virtual machines. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -451,7 +455,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LabVirtualMachine', response) @@ -882,7 +885,6 @@ def get_rdp_file_contents( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RdpConnection', response) @@ -947,7 +949,6 @@ def list_applicable_schedules( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ApplicableSchedule', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_networks_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_networks_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_networks_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_networks_operations.py index 12ee56cd36ad..659a7cc31b2f 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_networks_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_networks_operations.py @@ -21,6 +21,8 @@ class VirtualNetworksOperations(object): """VirtualNetworksOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.VirtualNetworkPaged[~azure.mgmt.devtestlabs.models.VirtualNetwork] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -109,6 +110,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VirtualNetworkPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VirtualNetworkPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VirtualNetworkPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VirtualNetwork', response) @@ -391,7 +394,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, name, virtual_network, custom_headers=None, raw=False, **operation_config): - """Modify properties of virtual networks. + """Allows modifying tags of virtual networks. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -450,7 +454,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VirtualNetwork', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py index 7f225c6aab41..20cee28211d4 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "3.0.0" +VERSION = "4.0.0" diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/setup.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/setup.py index c74bcc7d5281..b136f9c8d9bf 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/setup.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/setup.py @@ -53,6 +53,7 @@ version=version, description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), long_description=readme + '\n\n' + history, + long_description_content_type='text/x-rst', license='MIT License', author='Microsoft Corporation', author_email='azpysdkhelp@microsoft.com', @@ -63,7 +64,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', From d0b807a85a3d503bf1ea62fef7ea721307e49da8 Mon Sep 17 00:00:00 2001 From: annatisch Date: Fri, 26 Jul 2019 12:15:22 -0700 Subject: [PATCH 014/244] [azure-core] Small fixes for aiohttp (#6490) * Aiohttp read timeout * Aiohttp response status code * Aiohttp content type header * Review feedback * Fixed typo * Fixed async transport sleep coroutine * Fix for stream generators * Reverted attribute error handling * Fixed trio sleep test * Fixed identity test mocks * Fix identity mock to return content-type as string * Fix universal policy tests --- sdk/core/azure-core/azure/core/exceptions.py | 1 + .../azure/core/pipeline/policies/universal.py | 2 +- .../azure/core/pipeline/transport/aiohttp.py | 26 +++++++++---------- .../pipeline/transport/requests_asyncio.py | 20 +++++++------- .../core/pipeline/transport/requests_basic.py | 20 ++++++-------- .../core/pipeline/transport/requests_trio.py | 17 +++++------- .../azure_core_asynctests/test_pipeline.py | 17 ++++++++++++ .../tests/test_universal_pipeline.py | 4 +-- sdk/identity/azure-identity/tests/helpers.py | 2 +- .../azure-identity/tests/test_authn_client.py | 8 +++--- .../azure-identity/tests/test_identity.py | 4 +-- .../tests/test_identity_async.py | 4 +-- 12 files changed, 66 insertions(+), 59 deletions(-) diff --git a/sdk/core/azure-core/azure/core/exceptions.py b/sdk/core/azure-core/azure/core/exceptions.py index ae6ff7c53eb8..b69912108a40 100644 --- a/sdk/core/azure-core/azure/core/exceptions.py +++ b/sdk/core/azure-core/azure/core/exceptions.py @@ -114,6 +114,7 @@ def __init__(self, message=None, response=None, **kwargs): if response: self.reason = response.reason self.status_code = response.status_code + message = message or "Operation returned an invalid status '{}'".format(self.reason) try: try: diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/universal.py b/sdk/core/azure-core/azure/core/pipeline/policies/universal.py index 79b48bb162ce..b9338950ff38 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/universal.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/universal.py @@ -350,7 +350,7 @@ def deserialize_from_http_generics(cls, response): # Try to use content-type from headers if available content_type = None if response.content_type: # type: ignore - content_type = response.content_type[0].strip().lower() # type: ignore + content_type = response.content_type.split(";")[0].strip().lower() # type: ignore # Ouch, this server did not declare what it sent... # Let's guess it's JSON... diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/aiohttp.py b/sdk/core/azure-core/azure/core/pipeline/transport/aiohttp.py index f6ee555cea1c..9fb2eb125a5c 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/aiohttp.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/aiohttp.py @@ -31,7 +31,7 @@ import aiohttp from azure.core.configuration import ConnectionConfiguration -from azure.core.exceptions import ServiceRequestError +from azure.core.exceptions import ServiceRequestError, ServiceResponseError from azure.core.pipeline import Pipeline from requests.exceptions import ( @@ -181,7 +181,8 @@ async def send(self, request: HttpRequest, **config: Any) -> Optional[AsyncHttpR await response.load_body() except aiohttp.client_exceptions.ClientConnectorError as err: error = ServiceRequestError(err, error=err) - + except asyncio.TimeoutError as err: + error = ServiceResponseError(err, error=err) if error: raise error return response @@ -191,19 +192,16 @@ class AioHttpStreamDownloadGenerator(AsyncIterator): """Streams the response body data. :param pipeline: The pipeline object - :param request: The request object :param response: The client response object. - :type response: aiohttp.ClientResponse :param block_size: block size of data sent over connection. :type block_size: int """ - def __init__(self, pipeline: Pipeline, request: HttpRequest, - response: aiohttp.ClientResponse, block_size: int) -> None: + def __init__(self, pipeline: Pipeline, response: AsyncHttpResponse) -> None: self.pipeline = pipeline - self.request = request + self.request = response.request self.response = response - self.block_size = block_size - self.content_length = int(response.headers.get('Content-Length', 0)) + self.block_size = response.block_size + self.content_length = int(response.internal_response.headers.get('Content-Length', 0)) self.downloaded = 0 def __len__(self): @@ -215,13 +213,13 @@ async def __anext__(self): retry_interval = 1000 while retry_active: try: - chunk = await self.response.content.read(self.block_size) + chunk = await self.response.internal_response.content.read(self.block_size) if not chunk: raise _ResponseStopIteration() self.downloaded += self.block_size return chunk except _ResponseStopIteration: - self.response.close() + self.response.internal_response.close() raise StopAsyncIteration() except (ChunkedEncodingError, ConnectionError): retry_total -= 1 @@ -233,7 +231,7 @@ async def __anext__(self): resp = self.pipeline.run(self.request, stream=True, headers=headers) if resp.status_code == 416: raise - chunk = await self.response.content.read(self.block_size) + chunk = await self.response.internal_response.content.read(self.block_size) if not chunk: raise StopIteration() self.downloaded += chunk @@ -243,7 +241,7 @@ async def __anext__(self): raise except Exception as err: _LOGGER.warning("Unable to stream download: %s", err) - self.response.close() + self.response.internal_response.close() raise class AioHttpTransportResponse(AsyncHttpResponse): @@ -282,4 +280,4 @@ def stream_download(self, pipeline) -> AsyncIteratorType[bytes]: :param pipeline: The pipeline object :type pipeline: azure.core.pipeline """ - return AioHttpStreamDownloadGenerator(pipeline, self.request, self.internal_response, self.block_size) + return AioHttpStreamDownloadGenerator(pipeline, self) diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/requests_asyncio.py b/sdk/core/azure-core/azure/core/pipeline/transport/requests_asyncio.py index 1f302034a173..6093713c2928 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/requests_asyncio.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/requests_asyncio.py @@ -78,6 +78,9 @@ async def __aenter__(self): async def __aexit__(self, *exc_details): # pylint: disable=arguments-differ return super(AsyncioRequestsTransport, self).__exit__() + async def sleep(self, duration): + await asyncio.sleep(duration) + async def send(self, request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: # type: ignore """Send the request using this HTTP sender. @@ -135,18 +138,16 @@ class AsyncioStreamDownloadGenerator(AsyncIterator): """Streams the response body data. :param pipeline: The pipeline object - :param request: The request object :param response: The response object. - :param int block_size: block size of data sent over connection. :param generator iter_content_func: Iterator for response data. :param int content_length: size of body in bytes. """ - def __init__(self, pipeline: Pipeline, request: HttpRequest, response: requests.Response, block_size: int) -> None: + def __init__(self, pipeline: Pipeline, response: AsyncHttpResponse) -> None: self.pipeline = pipeline - self.request = request + self.request = response.request self.response = response - self.block_size = block_size - self.iter_content_func = self.response.iter_content(self.block_size) + self.block_size = response.block_size + self.iter_content_func = self.response.internal_response.iter_content(self.block_size) self.content_length = int(response.headers.get('Content-Length', 0)) self.downloaded = 0 @@ -170,7 +171,7 @@ async def __anext__(self): self.downloaded += self.block_size return chunk except _ResponseStopIteration: - self.response.close() + self.response.internal_response.close() raise StopAsyncIteration() except (requests.exceptions.ChunkedEncodingError, requests.exceptions.ConnectionError): @@ -197,7 +198,7 @@ async def __anext__(self): raise except Exception as err: _LOGGER.warning("Unable to stream download: %s", err) - self.response.close() + self.response.internal_response.close() raise @@ -206,5 +207,4 @@ class AsyncioRequestsTransportResponse(AsyncHttpResponse, RequestsTransportRespo """ def stream_download(self, pipeline) -> AsyncIteratorType[bytes]: # type: ignore """Generator for streaming request body data.""" - return AsyncioStreamDownloadGenerator(pipeline, self.request, - self.internal_response, self.block_size) # type: ignore + return AsyncioStreamDownloadGenerator(pipeline, self) # type: ignore diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/requests_basic.py b/sdk/core/azure-core/azure/core/pipeline/transport/requests_basic.py index 8907937c9a5a..95757edb63dd 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/requests_basic.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/requests_basic.py @@ -65,9 +65,7 @@ def __init__(self, request, requests_response, block_size=None): self.status_code = requests_response.status_code self.headers = requests_response.headers self.reason = requests_response.reason - content_type = requests_response.headers.get('content-type') - if content_type: - self.content_type = content_type.split(";") + self.content_type = requests_response.headers.get('content-type') def body(self): return self.internal_response.content @@ -82,18 +80,16 @@ class StreamDownloadGenerator(object): """Generator for streaming response data. :param pipeline: The pipeline object - :param request: The request object :param response: The response object. - :param int block_size: Number of bytes to read into memory. :param generator iter_content_func: Iterator for response data. :param int content_length: size of body in bytes. """ - def __init__(self, pipeline, request, response, block_size): + def __init__(self, pipeline, response): self.pipeline = pipeline - self.request = request + self.request = response.request self.response = response - self.block_size = block_size - self.iter_content_func = self.response.iter_content(self.block_size) + self.block_size = response.block_size + self.iter_content_func = self.response.internal_response.iter_content(self.block_size) self.content_length = int(response.headers.get('Content-Length', 0)) self.downloaded = 0 @@ -115,7 +111,7 @@ def __next__(self): self.downloaded += self.block_size return chunk except StopIteration: - self.response.close() + self.response.internal_response.close() raise StopIteration() except (requests.exceptions.ChunkedEncodingError, requests.exceptions.ConnectionError): @@ -138,7 +134,7 @@ def __next__(self): raise except Exception as err: _LOGGER.warning("Unable to stream download: %s", err) - self.response.close() + self.response.internal_response.close() raise next = __next__ # Python 2 compatibility. @@ -149,7 +145,7 @@ class RequestsTransportResponse(HttpResponse, _RequestsTransportResponseBase): def stream_download(self, pipeline): # type: (PipelineType) -> Iterator[bytes] """Generator for streaming request body data.""" - return StreamDownloadGenerator(pipeline, self.request, self.internal_response, self.block_size) + return StreamDownloadGenerator(pipeline, self) class RequestsTransport(HttpTransport): diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/requests_trio.py b/sdk/core/azure-core/azure/core/pipeline/transport/requests_trio.py index c3a1c591587b..f27f034033ea 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/requests_trio.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/requests_trio.py @@ -53,18 +53,16 @@ class TrioStreamDownloadGenerator(AsyncIterator): """Generator for streaming response data. :param pipeline: The pipeline object - :param request: The request object :param response: The response object. - :param int block_size: Number of bytes to read into memory. :param generator iter_content_func: Iterator for response data. :param int content_length: size of body in bytes. """ - def __init__(self, pipeline: Pipeline, request: HttpRequest, response: requests.Response, block_size: int) -> None: + def __init__(self, pipeline: Pipeline, response: AsyncHttpResponse) -> None: self.pipeline = pipeline - self.request = request + self.request = response.request self.response = response - self.block_size = block_size - self.iter_content_func = self.response.iter_content(self.block_size) + self.block_size = response.block_size + self.iter_content_func = self.response.internal_response.iter_content(self.block_size) self.content_length = int(response.headers.get('Content-Length', 0)) self.downloaded = 0 @@ -85,7 +83,7 @@ async def __anext__(self): self.downloaded += self.block_size return chunk except _ResponseStopIteration: - self.response.close() + self.response.internal_response.close() raise StopAsyncIteration() except (requests.exceptions.ChunkedEncodingError, requests.exceptions.ConnectionError): @@ -111,7 +109,7 @@ async def __anext__(self): raise except Exception as err: _LOGGER.warning("Unable to stream download: %s", err) - self.response.close() + self.response.internal_response.close() raise class TrioRequestsTransportResponse(AsyncHttpResponse, RequestsTransportResponse): # type: ignore @@ -120,8 +118,7 @@ class TrioRequestsTransportResponse(AsyncHttpResponse, RequestsTransportResponse def stream_download(self, pipeline) -> AsyncIteratorType[bytes]: # type: ignore """Generator for streaming response data. """ - return TrioStreamDownloadGenerator(pipeline, self.request, - self.internal_response, self.block_size) # type: ignore + return TrioStreamDownloadGenerator(pipeline, self) # type: ignore class TrioRequestsTransport(RequestsTransport, AsyncHttpTransport): # type: ignore diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_pipeline.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_pipeline.py index d344a9f90fff..bcefb9b4bb1a 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_pipeline.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_pipeline.py @@ -119,6 +119,23 @@ async def test_basic_async_requests(): assert response.http_response.status_code == 200 +@pytest.mark.asyncio +async def test_async_transport_sleep(): + + async with AsyncioRequestsTransport() as transport: + await transport.sleep(1) + + async with AioHttpTransport() as transport: + await transport.sleep(1) + +def test_async_trio_transport_sleep(): + + async def do(): + async with TrioRequestsTransport() as transport: + await transport.sleep(1) + + response = trio.run(do) + @pytest.mark.asyncio async def test_conf_async_requests(): diff --git a/sdk/core/azure-core/tests/test_universal_pipeline.py b/sdk/core/azure-core/tests/test_universal_pipeline.py index 0049e2277374..cc783b0d4c74 100644 --- a/sdk/core/azure-core/tests/test_universal_pipeline.py +++ b/sdk/core/azure-core/tests/test_universal_pipeline.py @@ -123,9 +123,7 @@ class MockResponse(HttpResponse): def __init__(self, body, content_type): super(MockResponse, self).__init__(None, None) self._body = body - self.content_type = None - if content_type: - self.content_type = [content_type] + self.content_type = content_type def body(self): return self._body diff --git a/sdk/identity/azure-identity/tests/helpers.py b/sdk/identity/azure-identity/tests/helpers.py index 8acb3d5f646b..694a92df922a 100644 --- a/sdk/identity/azure-identity/tests/helpers.py +++ b/sdk/identity/azure-identity/tests/helpers.py @@ -41,7 +41,7 @@ def mock_response(status_code=200, headers={}, json_payload=None): if json_payload is not None: response.text = lambda: json.dumps(json_payload) response.headers["content-type"] = "application/json" - response.content_type = ["application/json"] + response.content_type = "application/json" return response diff --git a/sdk/identity/azure-identity/tests/test_authn_client.py b/sdk/identity/azure-identity/tests/test_authn_client.py index 39889f003627..1aca947b3d89 100644 --- a/sdk/identity/azure-identity/tests/test_authn_client.py +++ b/sdk/identity/azure-identity/tests/test_authn_client.py @@ -28,7 +28,7 @@ def test_authn_client_deserialization(): scope = "scope" mock_response = Mock( - headers={"content-type": "application/json"}, status_code=200, content_type=["application/json"] + headers={"content-type": "application/json"}, status_code=200, content_type="application/json" ) mock_send = Mock(return_value=mock_response) @@ -87,7 +87,7 @@ def test_caching_when_only_expires_in_set(): text=lambda: json.dumps({"access_token": access_token, "expires_in": expires_in, "token_type": "Bearer"}), headers={"content-type": "application/json"}, status_code=200, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) @@ -106,7 +106,7 @@ def test_expires_in_strings(): expected_token = "token" mock_response = Mock( - headers={"content-type": "application/json"}, status_code=200, content_type=["application/json"] + headers={"content-type": "application/json"}, status_code=200, content_type="application/json" ) mock_send = Mock(return_value=mock_response) @@ -133,7 +133,7 @@ def test_cache_expiry(): text=lambda: json.dumps(token_payload), headers={"content-type": "application/json"}, status_code=200, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index c9756ad3b344..b017792595a8 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -191,7 +191,7 @@ def test_imds_credential_cache(): text=lambda: json.dumps(token_payload), headers={"content-type": "application/json"}, status_code=200, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) @@ -219,7 +219,7 @@ def test_imds_credential_retries(): mock_response = Mock( text=lambda: b"{}", headers={"content-type": "application/json", "Retry-After": "0"}, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) diff --git a/sdk/identity/azure-identity/tests/test_identity_async.py b/sdk/identity/azure-identity/tests/test_identity_async.py index ba203cd2eb59..03b53db9eccd 100644 --- a/sdk/identity/azure-identity/tests/test_identity_async.py +++ b/sdk/identity/azure-identity/tests/test_identity_async.py @@ -196,7 +196,7 @@ async def test_imds_credential_cache(): text=lambda: json.dumps(token_payload), headers={"content-type": "application/json"}, status_code=200, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) @@ -225,7 +225,7 @@ async def test_imds_credential_retries(): mock_response = Mock( text=lambda: b"{}", headers={"content-type": "application/json", "Retry-After": "0"}, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) From df002bf94f9f21793f687e6a3b3849f9475df400 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Mon, 29 Jul 2019 14:05:36 -0700 Subject: [PATCH 015/244] decorator only trace very top level function (#6530) --- sdk/core/azure-core/azure/core/tracing/decorator.py | 2 +- .../azure-core/azure/core/tracing/decorator_async.py | 2 +- .../test_tracing_decorator_async.py | 9 +++------ sdk/core/azure-core/tests/test_tracing_decorator.py | 9 +++------ 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 7d5d7bfce407..3986dcaf31ed 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 781e20a6bef2..4df65fee77ef 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index 8b43ddf71a62..82b4f97dc92f 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -139,13 +139,10 @@ async def test_span_with_opencensus_complicated(value): parent = exporter.root assert len(parent.children) == 4 assert parent.children[0].span_data.name == "MockClient.__init__" + assert not parent.children[0].children assert parent.children[1].span_data.name == "MockClient.make_request" - assert parent.children[1].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[1].children[1].span_data.name == "MockClient.make_request" + assert not parent.children[1].children assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index 473060f6097a..764c09396255 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -171,13 +171,10 @@ def test_span_with_opencensus_complicated(self, value): parent = exporter.root assert len(parent.children) == 4 assert parent.children[0].span_data.name == "MockClient.__init__" + assert not parent.children[0].children assert parent.children[1].span_data.name == "MockClient.make_request" - assert parent.children[1].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[1].children[1].span_data.name == "MockClient.make_request" + assert not parent.children[1].children assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children From a825826fb4ea8bc4df429c3cfbc891502b0526bc Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Mon, 29 Jul 2019 14:46:26 -0700 Subject: [PATCH 016/244] Import aiohttp only when necessary (#6496) --- sdk/core/azure-core/azure/core/pipeline_client_async.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/core/azure-core/azure/core/pipeline_client_async.py b/sdk/core/azure-core/azure/core/pipeline_client_async.py index 39b6c87c61fb..ad70f9ea7434 100644 --- a/sdk/core/azure-core/azure/core/pipeline_client_async.py +++ b/sdk/core/azure-core/azure/core/pipeline_client_async.py @@ -48,7 +48,6 @@ from .pipeline import AsyncPipeline from .pipeline.transport.base import PipelineClientBase from .pipeline.policies import ContentDecodePolicy -from .pipeline.transport import AioHttpTransport from .pipeline.policies.distributed_tracing import DistributedTracingPolicy @@ -121,6 +120,7 @@ def _build_pipeline(self, config, **kwargs): # pylint: disable=no-self-use ] if not transport: + from .pipeline.transport import AioHttpTransport transport = AioHttpTransport(**kwargs) return AsyncPipeline(transport, policies) From 43f5dfc3bd5b50cfd2e14f467f6f4b7bc9dc088d Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Mon, 29 Jul 2019 19:03:11 -0700 Subject: [PATCH 017/244] document async transport requirement (#6541) --- sdk/identity/azure-identity/README.md | 6 ++++++ sdk/keyvault/azure-keyvault-keys/README.md | 10 +++++----- sdk/keyvault/azure-keyvault-secrets/README.md | 10 +++++----- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/sdk/identity/azure-identity/README.md b/sdk/identity/azure-identity/README.md index b80aa7cb539b..22b1bf6c2019 100644 --- a/sdk/identity/azure-identity/README.md +++ b/sdk/identity/azure-identity/README.md @@ -173,6 +173,12 @@ client = EventHubClient(host, event_hub_path, credential) ``` ## Async credentials: +This library includes a complete async API supported on Python 3.5+. To use the +async credentials in `azure.identity.aio`, you must first install an async +transport, such as [`aiohttp`](https://pypi.org/project/aiohttp/). See +[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/README.md#transport) +for more information. + This example demonstrates authenticating the asynchronous `SecretClient` from [`azure-keyvault-secrets`][azure_keyvault_secrets] with asynchronous credentials. ```py diff --git a/sdk/keyvault/azure-keyvault-keys/README.md b/sdk/keyvault/azure-keyvault-keys/README.md index 0690e0822427..44d5ee7e9179 100644 --- a/sdk/keyvault/azure-keyvault-keys/README.md +++ b/sdk/keyvault/azure-keyvault-keys/README.md @@ -153,10 +153,11 @@ for key in keys: ``` ### Async operations -Python’s [asyncio package][asyncio_package] and its two keywords `async` and `await` serves to declare, build, execute, and manage asynchronous code. -The package supports async API on Python 3.5+ and is identical to synchronous API. - -The following examples provide code snippets for performing async operations in the Key Client library: +This library includes a complete async API supported on Python 3.5+. To use it, you must +first install an async transport, such as [`aiohttp`](https://pypi.org/project/aiohttp/). +See +[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/README.md#transport) +for more information. ### Asynchronously create a Key `create_rsa_key` and `create_ec_key` create RSA and elliptic curve keys in the vault, respectively. @@ -257,7 +258,6 @@ When you submit a pull request, a CLA-bot will automatically determine whether y This project has adopted the [Microsoft Open Source Code of Conduct][code_of_conduct]. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. -[asyncio_package]: https://docs.python.org/3/library/asyncio.html [azure_cloud_shell]: https://shell.azure.com/bash [azure_core_exceptions]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/docs/exceptions.md [azure_identity]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/identity/azure-identity diff --git a/sdk/keyvault/azure-keyvault-secrets/README.md b/sdk/keyvault/azure-keyvault-secrets/README.md index ab50a297d194..a94af9ac724b 100644 --- a/sdk/keyvault/azure-keyvault-secrets/README.md +++ b/sdk/keyvault/azure-keyvault-secrets/README.md @@ -148,10 +148,11 @@ This example lists all the secrets in the specified Key Vault. ``` ### Async operations -Python’s [asyncio package][asyncio_package] and its two keywords `async` and `await` serves to declare, build, execute, and manage asynchronous code. -The package supports async API on Python 3.5+ and is identical to synchronous API. - -The following examples provide code snippets for performing async operations in the Secret Client library: +This library includes a complete async API supported on Python 3.5+. To use it, you must +first install an async transport, such as [`aiohttp`](https://pypi.org/project/aiohttp/). +See +[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/README.md#transport) +for more information. ### Async create a secret This example creates a secret in the Key Vault with the specified optional arguments. @@ -247,7 +248,6 @@ When you submit a pull request, a CLA-bot will automatically determine whether y This project has adopted the [Microsoft Open Source Code of Conduct][code_of_conduct]. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. -[asyncio_package]: https://docs.python.org/3/library/asyncio.html [azure_cloud_shell]: https://shell.azure.com/bash [azure_core_exceptions]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/docs/exceptions.md [azure_identity]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/identity/azure-identity From 23a0c79635bc1090e389e87c63536fca6740cf40 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 29 Jul 2019 19:44:44 -0700 Subject: [PATCH 018/244] [AutoPR] alertsmanagement/resource-manager (#5697) * Generated from f4b30b3785ae1fa51f4333f2acd863137d9c84b2 (#5696) removed "required" field from ExpandDetectorParameter * Packaging update of azure-mgmt-alertsmanagement * Packaging update of azure-mgmt-alertsmanagement * regenerated package * recent version * update history and version... again... * added note about general breaking changes --- .../azure-mgmt-alertsmanagement/HISTORY.rst | 21 + .../azure-mgmt-alertsmanagement/MANIFEST.in | 4 + .../azure-mgmt-alertsmanagement/README.rst | 21 +- .../azure/mgmt/alertsmanagement/__init__.py | 7 +- ...client.py => _alerts_management_client.py} | 61 +- .../mgmt/alertsmanagement/_configuration.py | 55 + .../mgmt/alertsmanagement/models/__init__.py | 192 +- ....py => _alerts_management_client_enums.py} | 35 + .../mgmt/alertsmanagement/models/_models.py | 1704 +++++++++++++++++ .../alertsmanagement/models/_models_py3.py | 1704 +++++++++++++++++ .../alertsmanagement/models/_paged_models.py | 79 + .../mgmt/alertsmanagement/models/alert.py | 46 - .../models/alert_modification.py | 47 - .../models/alert_modification_item.py | 54 - .../models/alert_modification_item_py3.py | 54 - .../models/alert_modification_properties.py | 41 - .../alert_modification_properties_py3.py | 41 - .../models/alert_modification_py3.py | 47 - .../alertsmanagement/models/alert_paged.py | 27 - .../models/alert_properties.py | 36 - .../models/alert_properties_py3.py | 36 - .../mgmt/alertsmanagement/models/alert_py3.py | 46 - .../alertsmanagement/models/alerts_summary.py | 46 - .../models/alerts_summary_group.py | 41 - .../models/alerts_summary_group_item.py | 41 - .../models/alerts_summary_group_item_py3.py | 41 - .../models/alerts_summary_group_py3.py | 41 - .../models/alerts_summary_py3.py | 46 - .../alertsmanagement/models/essentials.py | 138 -- .../alertsmanagement/models/essentials_py3.py | 138 -- .../mgmt/alertsmanagement/models/operation.py | 32 - .../models/operation_display.py | 40 - .../models/operation_display_py3.py | 40 - .../models/operation_paged.py | 27 - .../alertsmanagement/models/operation_py3.py | 32 - .../mgmt/alertsmanagement/models/resource.py | 45 - .../alertsmanagement/models/resource_py3.py | 45 - .../alertsmanagement/models/smart_group.py | 118 -- .../models/smart_group_aggregated_property.py | 32 - .../smart_group_aggregated_property_py3.py | 32 - .../models/smart_group_modification.py | 47 - .../models/smart_group_modification_item.py | 54 - .../smart_group_modification_item_py3.py | 54 - .../smart_group_modification_properties.py | 45 - ...smart_group_modification_properties_py3.py | 45 - .../models/smart_group_modification_py3.py | 47 - .../models/smart_group_py3.py | 118 -- .../models/smart_groups_list.py | 32 - .../models/smart_groups_list_py3.py | 32 - .../alertsmanagement/operations/__init__.py | 10 +- .../operations/_action_rules_operations.py | 575 ++++++ ...ts_operations.py => _alerts_operations.py} | 162 +- .../{operations.py => _operations.py} | 20 +- .../_smart_detector_alert_rules_operations.py | 436 +++++ ...rations.py => _smart_groups_operations.py} | 180 +- .../azure/mgmt/alertsmanagement/version.py | 2 +- .../azure-mgmt-alertsmanagement/setup.py | 2 +- 57 files changed, 5003 insertions(+), 2191 deletions(-) rename sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/{alerts_management_client.py => _alerts_management_client.py} (57%) create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py rename sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/{alerts_management_client_enums.py => _alerts_management_client_enums.py} (84%) create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models.py create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models_py3.py create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_paged_models.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_paged.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_paged.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list_py3.py create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_action_rules_operations.py rename sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/{alerts_operations.py => _alerts_operations.py} (81%) rename sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/{operations.py => _operations.py} (87%) create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py rename sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/{smart_groups_operations.py => _smart_groups_operations.py} (70%) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/HISTORY.rst b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/HISTORY.rst index 2719b1b9c080..145999b84643 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/HISTORY.rst +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/HISTORY.rst @@ -3,6 +3,27 @@ Release History =============== +0.2.0rc1 (2019-07-29) ++++++++++++++++++++++ + +**Features** + +- Added operation AlertsOperations.meta_data +- Added operation group SmartDetectorAlertRulesOperations +- Added operation group ActionRulesOperations + +**General breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes if from some import. +In summary, some modules were incorrectly visible/importable and have been renamed. This fixed several issues caused by usage of classes that were not supposed to be used in the first place. + +- AlertsManagementClient cannot be imported from `azure.mgmt.alertsmanagement.alerts_management_client` anymore (import from `azure.mgmt.alertsmanagement` works like before) +- AlertsManagementClientConfiguration import has been moved from `azure.mgmt.alertsmanagement.alerts_management_client` to `azure.mgmt.alertsmanagement` +- A model `MyClass` from a "models" sub-module cannot be imported anymore using `azure.mgmt.alertsmanagement.models.my_class` (import from `azure.mgmt.alertsmanagement.models` works like before) +- An operation class `MyClassOperations` from an `operations` sub-module cannot be imported anymore using `azure.mgmt.alertsmanagement.operations.my_class_operations` (import from `azure.mgmt.alertsmanagement.operations` works like before) + +Last but not least, HTTP connection pooling is now enabled by default. You should always use a client as a context manager, or call close(), or use no more than one client per process. + 0.1.0 (2018-09-17) ++++++++++++++++++ diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/MANIFEST.in b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/MANIFEST.in index bb37a2723dae..e4884efef41b 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/MANIFEST.in +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/MANIFEST.in @@ -1 +1,5 @@ +recursive-include tests *.py *.yaml include *.rst +include azure/__init__.py +include azure/mgmt/__init__.py + diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/README.rst b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/README.rst index aa17aea1b51f..dad7b90d290e 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/README.rst +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Alerts Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see For a more complete set of Azure libraries, see the `azure `__ bundle package. -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - Usage ===== diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/__init__.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/__init__.py index 5512ab09648e..97a96941bfdd 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/__init__.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .alerts_management_client import AlertsManagementClient -from .version import VERSION +from ._configuration import AlertsManagementClientConfiguration +from ._alerts_management_client import AlertsManagementClient +__all__ = ['AlertsManagementClient', 'AlertsManagementClientConfiguration'] -__all__ = ['AlertsManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/alerts_management_client.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_alerts_management_client.py similarity index 57% rename from sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/alerts_management_client.py rename to sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_alerts_management_client.py index 735b0c12b85c..dea82c97209f 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/alerts_management_client.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_alerts_management_client.py @@ -11,46 +11,14 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.alerts_operations import AlertsOperations -from .operations.smart_groups_operations import SmartGroupsOperations -from . import models - - -class AlertsManagementClientConfiguration(AzureConfiguration): - """Configuration for AlertsManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'http://localhost' - - super(AlertsManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-alertsmanagement/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import AlertsManagementClientConfiguration +from .operations import Operations +from .operations import AlertsOperations +from .operations import SmartGroupsOperations +from .operations import ActionRulesOperations +from .operations import SmartDetectorAlertRulesOperations +from . import models class AlertsManagementClient(SDKClient): @@ -65,6 +33,10 @@ class AlertsManagementClient(SDKClient): :vartype alerts: azure.mgmt.alertsmanagement.operations.AlertsOperations :ivar smart_groups: SmartGroups operations :vartype smart_groups: azure.mgmt.alertsmanagement.operations.SmartGroupsOperations + :ivar action_rules: ActionRules operations + :vartype action_rules: azure.mgmt.alertsmanagement.operations.ActionRulesOperations + :ivar smart_detector_alert_rules: SmartDetectorAlertRules operations + :vartype smart_detector_alert_rules: azure.mgmt.alertsmanagement.operations.SmartDetectorAlertRulesOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -73,17 +45,18 @@ class AlertsManagementClient(SDKClient): Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. :type subscription_id: str + :param subscription_id1: The Azure subscription id. + :type subscription_id1: str :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, base_url=None): + self, credentials, subscription_id, subscription_id1, base_url=None): - self.config = AlertsManagementClientConfiguration(credentials, subscription_id, base_url) + self.config = AlertsManagementClientConfiguration(credentials, subscription_id, subscription_id1, base_url) super(AlertsManagementClient, 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 = '2018-05-05' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -93,3 +66,7 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.smart_groups = SmartGroupsOperations( self._client, self.config, self._serialize, self._deserialize) + self.action_rules = ActionRulesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.smart_detector_alert_rules = SmartDetectorAlertRulesOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py new file mode 100644 index 000000000000..cc778d8d1c6d --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class AlertsManagementClientConfiguration(AzureConfiguration): + """Configuration for AlertsManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param subscription_id1: The Azure subscription id. + :type subscription_id1: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, subscription_id1, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if subscription_id1 is None: + raise ValueError("Parameter 'subscription_id1' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(AlertsManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-alertsmanagement/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + self.subscription_id1 = subscription_id1 diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py index b5d44aef16b9..84870cf01aa0 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py @@ -10,46 +10,97 @@ # -------------------------------------------------------------------------- try: - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .resource_py3 import Resource - from .essentials_py3 import Essentials - from .alert_properties_py3 import AlertProperties - from .alert_py3 import Alert - from .alert_modification_item_py3 import AlertModificationItem - from .alert_modification_properties_py3 import AlertModificationProperties - from .alert_modification_py3 import AlertModification - from .smart_group_modification_item_py3 import SmartGroupModificationItem - from .smart_group_modification_properties_py3 import SmartGroupModificationProperties - from .smart_group_modification_py3 import SmartGroupModification - from .alerts_summary_group_item_py3 import AlertsSummaryGroupItem - from .alerts_summary_group_py3 import AlertsSummaryGroup - from .alerts_summary_py3 import AlertsSummary - from .smart_group_aggregated_property_py3 import SmartGroupAggregatedProperty - from .smart_group_py3 import SmartGroup - from .smart_groups_list_py3 import SmartGroupsList + from ._models_py3 import ActionGroup + from ._models_py3 import ActionGroupsInformation + from ._models_py3 import ActionRule + from ._models_py3 import ActionRuleProperties + from ._models_py3 import Alert + from ._models_py3 import AlertModification + from ._models_py3 import AlertModificationItem + from ._models_py3 import AlertModificationProperties + from ._models_py3 import AlertProperties + from ._models_py3 import AlertRule + from ._models_py3 import AlertRulePatchObject + from ._models_py3 import AlertsMetaData + from ._models_py3 import AlertsMetaDataProperties + from ._models_py3 import AlertsSummary + from ._models_py3 import AlertsSummaryGroup + from ._models_py3 import AlertsSummaryGroupItem + from ._models_py3 import AzureResource + from ._models_py3 import Condition + from ._models_py3 import Conditions + from ._models_py3 import Detector + from ._models_py3 import Diagnostics + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import ErrorResponse1, ErrorResponse1Exception + from ._models_py3 import ErrorResponseBody + from ._models_py3 import Essentials + from ._models_py3 import ManagedResource + from ._models_py3 import MonitorServiceDetails + from ._models_py3 import MonitorServiceList + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import PatchObject + from ._models_py3 import Resource + from ._models_py3 import Scope + from ._models_py3 import SmartGroup + from ._models_py3 import SmartGroupAggregatedProperty + from ._models_py3 import SmartGroupModification + from ._models_py3 import SmartGroupModificationItem + from ._models_py3 import SmartGroupModificationProperties + from ._models_py3 import Suppression + from ._models_py3 import SuppressionConfig + from ._models_py3 import SuppressionSchedule + from ._models_py3 import ThrottlingInformation except (SyntaxError, ImportError): - from .operation_display import OperationDisplay - from .operation import Operation - from .resource import Resource - from .essentials import Essentials - from .alert_properties import AlertProperties - from .alert import Alert - from .alert_modification_item import AlertModificationItem - from .alert_modification_properties import AlertModificationProperties - from .alert_modification import AlertModification - from .smart_group_modification_item import SmartGroupModificationItem - from .smart_group_modification_properties import SmartGroupModificationProperties - from .smart_group_modification import SmartGroupModification - from .alerts_summary_group_item import AlertsSummaryGroupItem - from .alerts_summary_group import AlertsSummaryGroup - from .alerts_summary import AlertsSummary - from .smart_group_aggregated_property import SmartGroupAggregatedProperty - from .smart_group import SmartGroup - from .smart_groups_list import SmartGroupsList -from .operation_paged import OperationPaged -from .alert_paged import AlertPaged -from .alerts_management_client_enums import ( + from ._models import ActionGroup + from ._models import ActionGroupsInformation + from ._models import ActionRule + from ._models import ActionRuleProperties + from ._models import Alert + from ._models import AlertModification + from ._models import AlertModificationItem + from ._models import AlertModificationProperties + from ._models import AlertProperties + from ._models import AlertRule + from ._models import AlertRulePatchObject + from ._models import AlertsMetaData + from ._models import AlertsMetaDataProperties + from ._models import AlertsSummary + from ._models import AlertsSummaryGroup + from ._models import AlertsSummaryGroupItem + from ._models import AzureResource + from ._models import Condition + from ._models import Conditions + from ._models import Detector + from ._models import Diagnostics + from ._models import ErrorResponse, ErrorResponseException + from ._models import ErrorResponse1, ErrorResponse1Exception + from ._models import ErrorResponseBody + from ._models import Essentials + from ._models import ManagedResource + from ._models import MonitorServiceDetails + from ._models import MonitorServiceList + from ._models import Operation + from ._models import OperationDisplay + from ._models import PatchObject + from ._models import Resource + from ._models import Scope + from ._models import SmartGroup + from ._models import SmartGroupAggregatedProperty + from ._models import SmartGroupModification + from ._models import SmartGroupModificationItem + from ._models import SmartGroupModificationProperties + from ._models import Suppression + from ._models import SuppressionConfig + from ._models import SuppressionSchedule + from ._models import ThrottlingInformation +from ._paged_models import ActionRulePaged +from ._paged_models import AlertPaged +from ._paged_models import AlertRulePaged +from ._paged_models import OperationPaged +from ._paged_models import SmartGroupPaged +from ._alerts_management_client_enums import ( Severity, SignalType, AlertState, @@ -58,6 +109,11 @@ AlertModificationEvent, SmartGroupModificationEvent, State, + ScopeType, + Operator, + SuppressionType, + ActionRuleStatus, + AlertRuleState, TimeRange, AlertsSortByFields, AlertsSummaryGroupByFields, @@ -65,26 +121,53 @@ ) __all__ = [ - 'OperationDisplay', - 'Operation', - 'Resource', - 'Essentials', - 'AlertProperties', + 'ActionGroup', + 'ActionGroupsInformation', + 'ActionRule', + 'ActionRuleProperties', 'Alert', + 'AlertModification', 'AlertModificationItem', 'AlertModificationProperties', - 'AlertModification', - 'SmartGroupModificationItem', - 'SmartGroupModificationProperties', - 'SmartGroupModification', - 'AlertsSummaryGroupItem', - 'AlertsSummaryGroup', + 'AlertProperties', + 'AlertRule', + 'AlertRulePatchObject', + 'AlertsMetaData', + 'AlertsMetaDataProperties', 'AlertsSummary', - 'SmartGroupAggregatedProperty', + 'AlertsSummaryGroup', + 'AlertsSummaryGroupItem', + 'AzureResource', + 'Condition', + 'Conditions', + 'Detector', + 'Diagnostics', + 'ErrorResponse', 'ErrorResponseException', + 'ErrorResponse1', 'ErrorResponse1Exception', + 'ErrorResponseBody', + 'Essentials', + 'ManagedResource', + 'MonitorServiceDetails', + 'MonitorServiceList', + 'Operation', + 'OperationDisplay', + 'PatchObject', + 'Resource', + 'Scope', 'SmartGroup', - 'SmartGroupsList', + 'SmartGroupAggregatedProperty', + 'SmartGroupModification', + 'SmartGroupModificationItem', + 'SmartGroupModificationProperties', + 'Suppression', + 'SuppressionConfig', + 'SuppressionSchedule', + 'ThrottlingInformation', 'OperationPaged', 'AlertPaged', + 'SmartGroupPaged', + 'ActionRulePaged', + 'AlertRulePaged', 'Severity', 'SignalType', 'AlertState', @@ -93,6 +176,11 @@ 'AlertModificationEvent', 'SmartGroupModificationEvent', 'State', + 'ScopeType', + 'Operator', + 'SuppressionType', + 'ActionRuleStatus', + 'AlertRuleState', 'TimeRange', 'AlertsSortByFields', 'AlertsSummaryGroupByFields', diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_management_client_enums.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_alerts_management_client_enums.py similarity index 84% rename from sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_management_client_enums.py rename to sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_alerts_management_client_enums.py index f3295fc6ef88..2d9334e583c7 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_management_client_enums.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_alerts_management_client_enums.py @@ -81,6 +81,41 @@ class State(str, Enum): closed = "Closed" +class ScopeType(str, Enum): + + resource_group = "ResourceGroup" + resource = "Resource" + + +class Operator(str, Enum): + + equals = "Equals" + not_equals = "NotEquals" + contains = "Contains" + does_not_contain = "DoesNotContain" + + +class SuppressionType(str, Enum): + + always = "Always" + once = "Once" + daily = "Daily" + weekly = "Weekly" + monthly = "Monthly" + + +class ActionRuleStatus(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class AlertRuleState(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + class TimeRange(str, Enum): oneh = "1h" diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models.py new file mode 100644 index 000000000000..a602fe2c9347 --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models.py @@ -0,0 +1,1704 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ActionRuleProperties(Model): + """Action rule properties defining scope, conditions, suppression logic for + action rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Suppression, ActionGroup, Diagnostics + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Suppression': 'Suppression', 'ActionGroup': 'ActionGroup', 'Diagnostics': 'Diagnostics'} + } + + def __init__(self, **kwargs): + super(ActionRuleProperties, self).__init__(**kwargs) + self.scope = kwargs.get('scope', None) + self.conditions = kwargs.get('conditions', None) + self.description = kwargs.get('description', None) + self.created_at = None + self.last_modified_at = None + self.created_by = None + self.last_modified_by = None + self.status = kwargs.get('status', None) + self.type = None + + +class ActionGroup(ActionRuleProperties): + """Action Group based Action Rule. + + Action rule with action group configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + :param action_group_id: Required. Action group to trigger if action rule + matches + :type action_group_id: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + 'action_group_id': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'action_group_id': {'key': 'actionGroupId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ActionGroup, self).__init__(**kwargs) + self.action_group_id = kwargs.get('action_group_id', None) + self.type = 'ActionGroup' + + +class ActionGroupsInformation(Model): + """The Action Groups information, used by the alert rule. + + All required parameters must be populated in order to send to Azure. + + :param custom_email_subject: An optional custom email subject to use in + email notifications. + :type custom_email_subject: str + :param custom_webhook_payload: An optional custom web-hook payload to use + in web-hook notifications. + :type custom_webhook_payload: str + :param group_ids: Required. The Action Group resource IDs. + :type group_ids: list[str] + """ + + _validation = { + 'group_ids': {'required': True}, + } + + _attribute_map = { + 'custom_email_subject': {'key': 'customEmailSubject', 'type': 'str'}, + 'custom_webhook_payload': {'key': 'customWebhookPayload', 'type': 'str'}, + 'group_ids': {'key': 'groupIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ActionGroupsInformation, self).__init__(**kwargs) + self.custom_email_subject = kwargs.get('custom_email_subject', None) + self.custom_webhook_payload = kwargs.get('custom_webhook_payload', None) + self.group_ids = kwargs.get('group_ids', None) + + +class Resource(Model): + """An azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + + +class ManagedResource(Resource): + """An azure managed resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ManagedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ActionRule(ManagedResource): + """Action rule object containing target scope, conditions and suppression + logic. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param properties: action rule properties + :type properties: ~azure.mgmt.alertsmanagement.models.ActionRuleProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'ActionRuleProperties'}, + } + + def __init__(self, **kwargs): + super(ActionRule, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class Alert(Resource): + """An alert created in alert management service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: ~azure.mgmt.alertsmanagement.models.AlertProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertProperties'}, + } + + def __init__(self, **kwargs): + super(Alert, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AlertModification(Resource): + """Alert Modification details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.AlertModificationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertModificationProperties'}, + } + + def __init__(self, **kwargs): + super(AlertModification, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AlertModificationItem(Model): + """Alert modification item. + + :param modification_event: Reason for the modification. Possible values + include: 'AlertCreated', 'StateChange', 'MonitorConditionChange' + :type modification_event: str or + ~azure.mgmt.alertsmanagement.models.AlertModificationEvent + :param old_value: Old value + :type old_value: str + :param new_value: New value + :type new_value: str + :param modified_at: Modified date and time + :type modified_at: str + :param modified_by: Modified user details (Principal client name) + :type modified_by: str + :param comments: Modification comments + :type comments: str + :param description: Description of the modification + :type description: str + """ + + _attribute_map = { + 'modification_event': {'key': 'modificationEvent', 'type': 'AlertModificationEvent'}, + 'old_value': {'key': 'oldValue', 'type': 'str'}, + 'new_value': {'key': 'newValue', 'type': 'str'}, + 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AlertModificationItem, self).__init__(**kwargs) + self.modification_event = kwargs.get('modification_event', None) + self.old_value = kwargs.get('old_value', None) + self.new_value = kwargs.get('new_value', None) + self.modified_at = kwargs.get('modified_at', None) + self.modified_by = kwargs.get('modified_by', None) + self.comments = kwargs.get('comments', None) + self.description = kwargs.get('description', None) + + +class AlertModificationProperties(Model): + """Properties of the alert modification item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar alert_id: Unique Id of the alert for which the history is being + retrieved + :vartype alert_id: str + :param modifications: Modification details + :type modifications: + list[~azure.mgmt.alertsmanagement.models.AlertModificationItem] + """ + + _validation = { + 'alert_id': {'readonly': True}, + } + + _attribute_map = { + 'alert_id': {'key': 'alertId', 'type': 'str'}, + 'modifications': {'key': 'modifications', 'type': '[AlertModificationItem]'}, + } + + def __init__(self, **kwargs): + super(AlertModificationProperties, self).__init__(**kwargs) + self.alert_id = None + self.modifications = kwargs.get('modifications', None) + + +class AlertProperties(Model): + """Alert property bag. + + :param essentials: + :type essentials: ~azure.mgmt.alertsmanagement.models.Essentials + :param context: + :type context: object + :param egress_config: + :type egress_config: object + """ + + _attribute_map = { + 'essentials': {'key': 'essentials', 'type': 'Essentials'}, + 'context': {'key': 'context', 'type': 'object'}, + 'egress_config': {'key': 'egressConfig', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AlertProperties, self).__init__(**kwargs) + self.essentials = kwargs.get('essentials', None) + self.context = kwargs.get('context', None) + self.egress_config = kwargs.get('egress_config', None) + + +class AzureResource(Model): + """An Azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param location: The resource location. Default value: "global" . + :type location: str + :param tags: The resource tags. + :type tags: object + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureResource, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.location = kwargs.get('location', "global") + self.tags = kwargs.get('tags', None) + + +class AlertRule(AzureResource): + """The alert rule information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param location: The resource location. Default value: "global" . + :type location: str + :param tags: The resource tags. + :type tags: object + :param description: The alert rule description. + :type description: str + :param state: Required. The alert rule state. Possible values include: + 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.alertsmanagement.models.AlertRuleState + :param severity: Required. The alert rule severity. Possible values + include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param frequency: Required. The alert rule frequency in ISO8601 format. + The time granularity must be in minutes and minimum value is 5 minutes. + :type frequency: timedelta + :param detector: Required. The alert rule's detector. + :type detector: ~azure.mgmt.alertsmanagement.models.Detector + :param scope: Required. The alert rule resources scope. + :type scope: list[str] + :param action_groups: Required. The alert rule actions. + :type action_groups: + ~azure.mgmt.alertsmanagement.models.ActionGroupsInformation + :param throttling: The alert rule throttling information. + :type throttling: + ~azure.mgmt.alertsmanagement.models.ThrottlingInformation + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'state': {'required': True}, + 'severity': {'required': True}, + 'frequency': {'required': True}, + 'detector': {'required': True}, + 'scope': {'required': True}, + 'action_groups': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'duration'}, + 'detector': {'key': 'properties.detector', 'type': 'Detector'}, + 'scope': {'key': 'properties.scope', 'type': '[str]'}, + 'action_groups': {'key': 'properties.actionGroups', 'type': 'ActionGroupsInformation'}, + 'throttling': {'key': 'properties.throttling', 'type': 'ThrottlingInformation'}, + } + + def __init__(self, **kwargs): + super(AlertRule, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.state = kwargs.get('state', None) + self.severity = kwargs.get('severity', None) + self.frequency = kwargs.get('frequency', None) + self.detector = kwargs.get('detector', None) + self.scope = kwargs.get('scope', None) + self.action_groups = kwargs.get('action_groups', None) + self.throttling = kwargs.get('throttling', None) + + +class AlertRulePatchObject(Model): + """The alert rule patch information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param tags: The resource tags. + :type tags: object + :param description: The alert rule description. + :type description: str + :param state: The alert rule state. Possible values include: 'Enabled', + 'Disabled' + :type state: str or ~azure.mgmt.alertsmanagement.models.AlertRuleState + :param severity: The alert rule severity. Possible values include: 'Sev0', + 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param frequency: The alert rule frequency in ISO8601 format. The time + granularity must be in minutes and minimum value is 5 minutes. + :type frequency: timedelta + :param action_groups: The alert rule actions. + :type action_groups: + ~azure.mgmt.alertsmanagement.models.ActionGroupsInformation + :param throttling: The alert rule throttling information. + :type throttling: + ~azure.mgmt.alertsmanagement.models.ThrottlingInformation + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'duration'}, + 'action_groups': {'key': 'properties.actionGroups', 'type': 'ActionGroupsInformation'}, + 'throttling': {'key': 'properties.throttling', 'type': 'ThrottlingInformation'}, + } + + def __init__(self, **kwargs): + super(AlertRulePatchObject, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.tags = kwargs.get('tags', None) + self.description = kwargs.get('description', None) + self.state = kwargs.get('state', None) + self.severity = kwargs.get('severity', None) + self.frequency = kwargs.get('frequency', None) + self.action_groups = kwargs.get('action_groups', None) + self.throttling = kwargs.get('throttling', None) + + +class AlertsMetaData(Model): + """alert meta data information. + + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.AlertsMetaDataProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'AlertsMetaDataProperties'}, + } + + def __init__(self, **kwargs): + super(AlertsMetaData, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AlertsMetaDataProperties(Model): + """alert meta data property bag. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MonitorServiceList + + All required parameters must be populated in order to send to Azure. + + :param metadata_identifier: Required. Constant filled by server. + :type metadata_identifier: str + """ + + _validation = { + 'metadata_identifier': {'required': True}, + } + + _attribute_map = { + 'metadata_identifier': {'key': 'metadataIdentifier', 'type': 'str'}, + } + + _subtype_map = { + 'metadata_identifier': {'MonitorServiceList': 'MonitorServiceList'} + } + + def __init__(self, **kwargs): + super(AlertsMetaDataProperties, self).__init__(**kwargs) + self.metadata_identifier = None + + +class AlertsSummary(Resource): + """Summary of alerts based on the input filters and 'groupby' parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroup + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertsSummaryGroup'}, + } + + def __init__(self, **kwargs): + super(AlertsSummary, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AlertsSummaryGroup(Model): + """Group the result set. + + :param total: Total count of the result set. + :type total: int + :param smart_groups_count: Total count of the smart groups. + :type smart_groups_count: int + :param groupedby: Name of the field aggregated + :type groupedby: str + :param values: List of the items + :type values: + list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] + """ + + _attribute_map = { + 'total': {'key': 'total', 'type': 'int'}, + 'smart_groups_count': {'key': 'smartGroupsCount', 'type': 'int'}, + 'groupedby': {'key': 'groupedby', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryGroup, self).__init__(**kwargs) + self.total = kwargs.get('total', None) + self.smart_groups_count = kwargs.get('smart_groups_count', None) + self.groupedby = kwargs.get('groupedby', None) + self.values = kwargs.get('values', None) + + +class AlertsSummaryGroupItem(Model): + """Alerts summary group item. + + :param name: Value of the aggregated field + :type name: str + :param count: Count of the aggregated field + :type count: int + :param groupedby: Name of the field aggregated + :type groupedby: str + :param values: List of the items + :type values: + list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'groupedby': {'key': 'groupedby', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryGroupItem, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.count = kwargs.get('count', None) + self.groupedby = kwargs.get('groupedby', None) + self.values = kwargs.get('values', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Condition(Model): + """condition to trigger an action rule. + + :param operator: operator for a given condition. Possible values include: + 'Equals', 'NotEquals', 'Contains', 'DoesNotContain' + :type operator: str or ~azure.mgmt.alertsmanagement.models.Operator + :param values: list of values to match for a given condition. + :type values: list[str] + """ + + _attribute_map = { + 'operator': {'key': 'operator', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Condition, self).__init__(**kwargs) + self.operator = kwargs.get('operator', None) + self.values = kwargs.get('values', None) + + +class Conditions(Model): + """Conditions in alert instance to be matched for a given action rule. Default + value is all. Multiple values could be provided with comma separation. + + :param severity: filter alerts by severity + :type severity: ~azure.mgmt.alertsmanagement.models.Condition + :param monitor_service: filter alerts by monitor service + :type monitor_service: ~azure.mgmt.alertsmanagement.models.Condition + :param monitor_condition: filter alerts by monitor condition + :type monitor_condition: ~azure.mgmt.alertsmanagement.models.Condition + :param target_resource_type: filter alerts by target resource type + :type target_resource_type: ~azure.mgmt.alertsmanagement.models.Condition + :param alert_rule_id: filter alerts by alert rule id + :type alert_rule_id: ~azure.mgmt.alertsmanagement.models.Condition + :param description: filter alerts by alert rule description + :type description: ~azure.mgmt.alertsmanagement.models.Condition + :param alert_context: filter alerts by alert context (payload) + :type alert_context: ~azure.mgmt.alertsmanagement.models.Condition + """ + + _attribute_map = { + 'severity': {'key': 'severity', 'type': 'Condition'}, + 'monitor_service': {'key': 'monitorService', 'type': 'Condition'}, + 'monitor_condition': {'key': 'monitorCondition', 'type': 'Condition'}, + 'target_resource_type': {'key': 'targetResourceType', 'type': 'Condition'}, + 'alert_rule_id': {'key': 'alertRuleId', 'type': 'Condition'}, + 'description': {'key': 'description', 'type': 'Condition'}, + 'alert_context': {'key': 'alertContext', 'type': 'Condition'}, + } + + def __init__(self, **kwargs): + super(Conditions, self).__init__(**kwargs) + self.severity = kwargs.get('severity', None) + self.monitor_service = kwargs.get('monitor_service', None) + self.monitor_condition = kwargs.get('monitor_condition', None) + self.target_resource_type = kwargs.get('target_resource_type', None) + self.alert_rule_id = kwargs.get('alert_rule_id', None) + self.description = kwargs.get('description', None) + self.alert_context = kwargs.get('alert_context', None) + + +class Detector(Model): + """The detector information. By default this is not populated, unless it's + specified in expandDetector. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The detector id. + :type id: str + :param parameters: The detector's parameters.' + :type parameters: dict[str, object] + :param name: The Smart Detector name. By default this is not populated, + unless it's specified in expandDetector + :type name: str + :param description: The Smart Detector description. By default this is not + populated, unless it's specified in expandDetector + :type description: str + :param supported_resource_types: The Smart Detector supported resource + types. By default this is not populated, unless it's specified in + expandDetector + :type supported_resource_types: list[str] + :param image_paths: The Smart Detector image path. By default this is not + populated, unless it's specified in expandDetector + :type image_paths: list[str] + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'supported_resource_types': {'key': 'supportedResourceTypes', 'type': '[str]'}, + 'image_paths': {'key': 'imagePaths', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Detector, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.parameters = kwargs.get('parameters', None) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.supported_resource_types = kwargs.get('supported_resource_types', None) + self.image_paths = kwargs.get('image_paths', None) + + +class Diagnostics(ActionRuleProperties): + """Diagnostics based Action Rule. + + Action rule with diagnostics configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Diagnostics, self).__init__(**kwargs) + self.type = 'Diagnostics' + + +class ErrorResponse(Model): + """An error response from the service. + + :param error: + :type error: ~azure.mgmt.alertsmanagement.models.ErrorResponseBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class ErrorResponse1(Model): + """Describe the format of an Error response. + + :param code: Error code + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse1, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class ErrorResponse1Exception(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse1'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponse1Exception, self).__init__(deserialize, response, 'ErrorResponse1', *args) + + +class ErrorResponseBody(Model): + """Details of error response. + + :param code: Error code, intended to be consumed programmatically. + :type code: str + :param message: Description of the error, intended for display in user + interface. + :type message: str + :param target: Target of the particular error, for example name of the + property. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.alertsmanagement.models.ErrorResponseBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorResponseBody]'}, + } + + def __init__(self, **kwargs): + super(ErrorResponseBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class Essentials(Model): + """This object contains consistent fields across different monitor services. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar severity: Severity of alert Sev0 being highest and Sev4 being + lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :ivar signal_type: The type of signal the alert is based on, which could + be metrics, logs or activity logs. Possible values include: 'Metric', + 'Log', 'Unknown' + :vartype signal_type: str or + ~azure.mgmt.alertsmanagement.models.SignalType + :ivar alert_state: Alert object state, which can be modified by the user. + Possible values include: 'New', 'Acknowledged', 'Closed' + :vartype alert_state: str or + ~azure.mgmt.alertsmanagement.models.AlertState + :ivar monitor_condition: Condition of the rule at the monitor service. It + represents whether the underlying conditions have crossed the defined + alert rule thresholds. Possible values include: 'Fired', 'Resolved' + :vartype monitor_condition: str or + ~azure.mgmt.alertsmanagement.models.MonitorCondition + :param target_resource: Target ARM resource, on which alert got created. + :type target_resource: str + :param target_resource_name: Name of the target ARM resource name, on + which alert got created. + :type target_resource_name: str + :param target_resource_group: Resource group of target ARM resource, on + which alert got created. + :type target_resource_group: str + :param target_resource_type: Resource type of target ARM resource, on + which alert got created. + :type target_resource_type: str + :ivar monitor_service: Monitor service on which the rule(monitor) is set. + Possible values include: 'Application Insights', 'ActivityLog + Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', + 'ActivityLog Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', + 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', + 'Zabbix' + :vartype monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :ivar alert_rule: Rule(monitor) which fired alert instance. Depending on + the monitor service, this would be ARM id or name of the rule. + :vartype alert_rule: str + :ivar source_created_id: Unique Id created by monitor service for each + alert instance. This could be used to track the issue at the monitor + service, in case of Nagios, Zabbix, SCOM etc. + :vartype source_created_id: str + :ivar smart_group_id: Unique Id of the smart group + :vartype smart_group_id: str + :ivar smart_grouping_reason: Verbose reason describing the reason why this + alert instance is added to a smart group + :vartype smart_grouping_reason: str + :ivar start_date_time: Creation time(ISO-8601 format) of alert instance. + :vartype start_date_time: datetime + :ivar last_modified_date_time: Last modification time(ISO-8601 format) of + alert instance. + :vartype last_modified_date_time: datetime + :ivar monitor_condition_resolved_date_time: Resolved time(ISO-8601 format) + of alert instance. This will be updated when monitor service resolves the + alert instance because the rule condition is no longer met. + :vartype monitor_condition_resolved_date_time: datetime + :ivar last_modified_user_name: User who last modified the alert, in case + of monitor service updates user would be 'system', otherwise name of the + user. + :vartype last_modified_user_name: str + """ + + _validation = { + 'severity': {'readonly': True}, + 'signal_type': {'readonly': True}, + 'alert_state': {'readonly': True}, + 'monitor_condition': {'readonly': True}, + 'monitor_service': {'readonly': True}, + 'alert_rule': {'readonly': True}, + 'source_created_id': {'readonly': True}, + 'smart_group_id': {'readonly': True}, + 'smart_grouping_reason': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'monitor_condition_resolved_date_time': {'readonly': True}, + 'last_modified_user_name': {'readonly': True}, + } + + _attribute_map = { + 'severity': {'key': 'severity', 'type': 'str'}, + 'signal_type': {'key': 'signalType', 'type': 'str'}, + 'alert_state': {'key': 'alertState', 'type': 'str'}, + 'monitor_condition': {'key': 'monitorCondition', 'type': 'str'}, + 'target_resource': {'key': 'targetResource', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'target_resource_type': {'key': 'targetResourceType', 'type': 'str'}, + 'monitor_service': {'key': 'monitorService', 'type': 'str'}, + 'alert_rule': {'key': 'alertRule', 'type': 'str'}, + 'source_created_id': {'key': 'sourceCreatedId', 'type': 'str'}, + 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, + 'smart_grouping_reason': {'key': 'smartGroupingReason', 'type': 'str'}, + 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, + 'monitor_condition_resolved_date_time': {'key': 'monitorConditionResolvedDateTime', 'type': 'iso-8601'}, + 'last_modified_user_name': {'key': 'lastModifiedUserName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Essentials, self).__init__(**kwargs) + self.severity = None + self.signal_type = None + self.alert_state = None + self.monitor_condition = None + self.target_resource = kwargs.get('target_resource', None) + self.target_resource_name = kwargs.get('target_resource_name', None) + self.target_resource_group = kwargs.get('target_resource_group', None) + self.target_resource_type = kwargs.get('target_resource_type', None) + self.monitor_service = None + self.alert_rule = None + self.source_created_id = None + self.smart_group_id = None + self.smart_grouping_reason = None + self.start_date_time = None + self.last_modified_date_time = None + self.monitor_condition_resolved_date_time = None + self.last_modified_user_name = None + + +class MonitorServiceDetails(Model): + """Details of a monitor service. + + :param name: Monitor service name + :type name: str + :param display_name: Monitor service display name + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MonitorServiceDetails, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + + +class MonitorServiceList(AlertsMetaDataProperties): + """Monitor service details. + + Monitor service details. + + All required parameters must be populated in order to send to Azure. + + :param metadata_identifier: Required. Constant filled by server. + :type metadata_identifier: str + :param data: Required. Array of operations + :type data: + list[~azure.mgmt.alertsmanagement.models.MonitorServiceDetails] + """ + + _validation = { + 'metadata_identifier': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'metadata_identifier': {'key': 'metadataIdentifier', 'type': 'str'}, + 'data': {'key': 'data', 'type': '[MonitorServiceDetails]'}, + } + + def __init__(self, **kwargs): + super(MonitorServiceList, self).__init__(**kwargs) + self.data = kwargs.get('data', None) + self.metadata_identifier = 'MonitorServiceList' + + +class Operation(Model): + """Operation provided by provider. + + :param name: Name of the operation + :type name: str + :param display: Properties of the operation + :type display: ~azure.mgmt.alertsmanagement.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """Properties of the operation. + + :param provider: Provider name + :type provider: str + :param resource: Resource name + :type resource: str + :param operation: Operation name + :type operation: str + :param description: Description of the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class PatchObject(Model): + """Data contract for patch. + + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param tags: tags to be updated + :type tags: object + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(PatchObject, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.tags = kwargs.get('tags', None) + + +class Scope(Model): + """Target scope for a given action rule. By default scope will be the + subscription. User can also provide list of resource groups or list of + resources from the scope subscription as well. + + :param scope_type: type of target scope. Possible values include: + 'ResourceGroup', 'Resource' + :type scope_type: str or ~azure.mgmt.alertsmanagement.models.ScopeType + :param values: list of ARM IDs of the given scope type which will be the + target of the given action rule. + :type values: list[str] + """ + + _attribute_map = { + 'scope_type': {'key': 'scopeType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Scope, self).__init__(**kwargs) + self.scope_type = kwargs.get('scope_type', None) + self.values = kwargs.get('values', None) + + +class SmartGroup(Resource): + """Set of related alerts grouped together smartly by AMS. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param alerts_count: Total number of alerts in smart group + :type alerts_count: int + :ivar smart_group_state: Smart group state. Possible values include: + 'New', 'Acknowledged', 'Closed' + :vartype smart_group_state: str or + ~azure.mgmt.alertsmanagement.models.State + :ivar severity: Severity of smart group is the highest(Sev0 >... > Sev4) + severity of all the alerts in the group. Possible values include: 'Sev0', + 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :ivar start_date_time: Creation time of smart group. Date-Time in ISO-8601 + format. + :vartype start_date_time: datetime + :ivar last_modified_date_time: Last updated time of smart group. Date-Time + in ISO-8601 format. + :vartype last_modified_date_time: datetime + :ivar last_modified_user_name: Last modified by user name. + :vartype last_modified_user_name: str + :param resources: Summary of target resources in the smart group + :type resources: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param resource_types: Summary of target resource types in the smart group + :type resource_types: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param resource_groups: Summary of target resource groups in the smart + group + :type resource_groups: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param monitor_services: Summary of monitorServices in the smart group + :type monitor_services: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param monitor_conditions: Summary of monitorConditions in the smart group + :type monitor_conditions: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param alert_states: Summary of alertStates in the smart group + :type alert_states: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param alert_severities: Summary of alertSeverities in the smart group + :type alert_severities: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param next_link: The URI to fetch the next page of alerts. Call + ListNext() with this URI to fetch the next page alerts. + :type next_link: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'smart_group_state': {'readonly': True}, + 'severity': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'last_modified_user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'alerts_count': {'key': 'properties.alertsCount', 'type': 'int'}, + 'smart_group_state': {'key': 'properties.smartGroupState', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'properties.lastModifiedDateTime', 'type': 'iso-8601'}, + 'last_modified_user_name': {'key': 'properties.lastModifiedUserName', 'type': 'str'}, + 'resources': {'key': 'properties.resources', 'type': '[SmartGroupAggregatedProperty]'}, + 'resource_types': {'key': 'properties.resourceTypes', 'type': '[SmartGroupAggregatedProperty]'}, + 'resource_groups': {'key': 'properties.resourceGroups', 'type': '[SmartGroupAggregatedProperty]'}, + 'monitor_services': {'key': 'properties.monitorServices', 'type': '[SmartGroupAggregatedProperty]'}, + 'monitor_conditions': {'key': 'properties.monitorConditions', 'type': '[SmartGroupAggregatedProperty]'}, + 'alert_states': {'key': 'properties.alertStates', 'type': '[SmartGroupAggregatedProperty]'}, + 'alert_severities': {'key': 'properties.alertSeverities', 'type': '[SmartGroupAggregatedProperty]'}, + 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SmartGroup, self).__init__(**kwargs) + self.alerts_count = kwargs.get('alerts_count', None) + self.smart_group_state = None + self.severity = None + self.start_date_time = None + self.last_modified_date_time = None + self.last_modified_user_name = None + self.resources = kwargs.get('resources', None) + self.resource_types = kwargs.get('resource_types', None) + self.resource_groups = kwargs.get('resource_groups', None) + self.monitor_services = kwargs.get('monitor_services', None) + self.monitor_conditions = kwargs.get('monitor_conditions', None) + self.alert_states = kwargs.get('alert_states', None) + self.alert_severities = kwargs.get('alert_severities', None) + self.next_link = kwargs.get('next_link', None) + + +class SmartGroupAggregatedProperty(Model): + """Aggregated property of each type. + + :param name: Name of the type. + :type name: str + :param count: Total number of items of type. + :type count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(SmartGroupAggregatedProperty, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.count = kwargs.get('count', None) + + +class SmartGroupModification(Resource): + """Alert Modification details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.SmartGroupModificationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'SmartGroupModificationProperties'}, + } + + def __init__(self, **kwargs): + super(SmartGroupModification, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class SmartGroupModificationItem(Model): + """smartGroup modification item. + + :param modification_event: Reason for the modification. Possible values + include: 'SmartGroupCreated', 'StateChange', 'AlertAdded', 'AlertRemoved' + :type modification_event: str or + ~azure.mgmt.alertsmanagement.models.SmartGroupModificationEvent + :param old_value: Old value + :type old_value: str + :param new_value: New value + :type new_value: str + :param modified_at: Modified date and time + :type modified_at: str + :param modified_by: Modified user details (Principal client name) + :type modified_by: str + :param comments: Modification comments + :type comments: str + :param description: Description of the modification + :type description: str + """ + + _attribute_map = { + 'modification_event': {'key': 'modificationEvent', 'type': 'SmartGroupModificationEvent'}, + 'old_value': {'key': 'oldValue', 'type': 'str'}, + 'new_value': {'key': 'newValue', 'type': 'str'}, + 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SmartGroupModificationItem, self).__init__(**kwargs) + self.modification_event = kwargs.get('modification_event', None) + self.old_value = kwargs.get('old_value', None) + self.new_value = kwargs.get('new_value', None) + self.modified_at = kwargs.get('modified_at', None) + self.modified_by = kwargs.get('modified_by', None) + self.comments = kwargs.get('comments', None) + self.description = kwargs.get('description', None) + + +class SmartGroupModificationProperties(Model): + """Properties of the smartGroup modification item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar smart_group_id: Unique Id of the smartGroup for which the history is + being retrieved + :vartype smart_group_id: str + :param modifications: Modification details + :type modifications: + list[~azure.mgmt.alertsmanagement.models.SmartGroupModificationItem] + :param next_link: URL to fetch the next set of results. + :type next_link: str + """ + + _validation = { + 'smart_group_id': {'readonly': True}, + } + + _attribute_map = { + 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, + 'modifications': {'key': 'modifications', 'type': '[SmartGroupModificationItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SmartGroupModificationProperties, self).__init__(**kwargs) + self.smart_group_id = None + self.modifications = kwargs.get('modifications', None) + self.next_link = kwargs.get('next_link', None) + + +class Suppression(ActionRuleProperties): + """Suppression based Action Rule. + + Action rule with suppression configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + :param suppression_config: Required. suppression configuration for the + action rule + :type suppression_config: + ~azure.mgmt.alertsmanagement.models.SuppressionConfig + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + 'suppression_config': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'suppression_config': {'key': 'suppressionConfig', 'type': 'SuppressionConfig'}, + } + + def __init__(self, **kwargs): + super(Suppression, self).__init__(**kwargs) + self.suppression_config = kwargs.get('suppression_config', None) + self.type = 'Suppression' + + +class SuppressionConfig(Model): + """Suppression logic for a given action rule. + + All required parameters must be populated in order to send to Azure. + + :param recurrence_type: Required. Specifies when the suppression should be + applied. Possible values include: 'Always', 'Once', 'Daily', 'Weekly', + 'Monthly' + :type recurrence_type: str or + ~azure.mgmt.alertsmanagement.models.SuppressionType + :param schedule: suppression schedule configuration + :type schedule: ~azure.mgmt.alertsmanagement.models.SuppressionSchedule + """ + + _validation = { + 'recurrence_type': {'required': True}, + } + + _attribute_map = { + 'recurrence_type': {'key': 'recurrenceType', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'SuppressionSchedule'}, + } + + def __init__(self, **kwargs): + super(SuppressionConfig, self).__init__(**kwargs) + self.recurrence_type = kwargs.get('recurrence_type', None) + self.schedule = kwargs.get('schedule', None) + + +class SuppressionSchedule(Model): + """Schedule for a given suppression configuration. + + :param start_date: Start date for suppression + :type start_date: str + :param end_date: End date for suppression + :type end_date: str + :param start_time: Start time for suppression + :type start_time: str + :param end_time: End date for suppression + :type end_time: str + :param recurrence_values: Specifies the values for recurrence pattern + :type recurrence_values: list[int] + """ + + _attribute_map = { + 'start_date': {'key': 'startDate', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'recurrence_values': {'key': 'recurrenceValues', 'type': '[int]'}, + } + + def __init__(self, **kwargs): + super(SuppressionSchedule, self).__init__(**kwargs) + self.start_date = kwargs.get('start_date', None) + self.end_date = kwargs.get('end_date', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.recurrence_values = kwargs.get('recurrence_values', None) + + +class ThrottlingInformation(Model): + """Optional throttling information for the alert rule. + + :param duration: The required duration (in ISO8601 format) to wait before + notifying on the alert rule again. The time granularity must be in minutes + and minimum value is 0 minutes + :type duration: timedelta + """ + + _attribute_map = { + 'duration': {'key': 'duration', 'type': 'duration'}, + } + + def __init__(self, **kwargs): + super(ThrottlingInformation, self).__init__(**kwargs) + self.duration = kwargs.get('duration', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models_py3.py new file mode 100644 index 000000000000..635be9d76f8e --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models_py3.py @@ -0,0 +1,1704 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ActionRuleProperties(Model): + """Action rule properties defining scope, conditions, suppression logic for + action rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Suppression, ActionGroup, Diagnostics + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Suppression': 'Suppression', 'ActionGroup': 'ActionGroup', 'Diagnostics': 'Diagnostics'} + } + + def __init__(self, *, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(ActionRuleProperties, self).__init__(**kwargs) + self.scope = scope + self.conditions = conditions + self.description = description + self.created_at = None + self.last_modified_at = None + self.created_by = None + self.last_modified_by = None + self.status = status + self.type = None + + +class ActionGroup(ActionRuleProperties): + """Action Group based Action Rule. + + Action rule with action group configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + :param action_group_id: Required. Action group to trigger if action rule + matches + :type action_group_id: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + 'action_group_id': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'action_group_id': {'key': 'actionGroupId', 'type': 'str'}, + } + + def __init__(self, *, action_group_id: str, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(ActionGroup, self).__init__(scope=scope, conditions=conditions, description=description, status=status, **kwargs) + self.action_group_id = action_group_id + self.type = 'ActionGroup' + + +class ActionGroupsInformation(Model): + """The Action Groups information, used by the alert rule. + + All required parameters must be populated in order to send to Azure. + + :param custom_email_subject: An optional custom email subject to use in + email notifications. + :type custom_email_subject: str + :param custom_webhook_payload: An optional custom web-hook payload to use + in web-hook notifications. + :type custom_webhook_payload: str + :param group_ids: Required. The Action Group resource IDs. + :type group_ids: list[str] + """ + + _validation = { + 'group_ids': {'required': True}, + } + + _attribute_map = { + 'custom_email_subject': {'key': 'customEmailSubject', 'type': 'str'}, + 'custom_webhook_payload': {'key': 'customWebhookPayload', 'type': 'str'}, + 'group_ids': {'key': 'groupIds', 'type': '[str]'}, + } + + def __init__(self, *, group_ids, custom_email_subject: str=None, custom_webhook_payload: str=None, **kwargs) -> None: + super(ActionGroupsInformation, self).__init__(**kwargs) + self.custom_email_subject = custom_email_subject + self.custom_webhook_payload = custom_webhook_payload + self.group_ids = group_ids + + +class Resource(Model): + """An azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + + +class ManagedResource(Resource): + """An azure managed resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(ManagedResource, self).__init__(**kwargs) + self.location = location + self.tags = tags + + +class ActionRule(ManagedResource): + """Action rule object containing target scope, conditions and suppression + logic. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param properties: action rule properties + :type properties: ~azure.mgmt.alertsmanagement.models.ActionRuleProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'ActionRuleProperties'}, + } + + def __init__(self, *, location: str, tags=None, properties=None, **kwargs) -> None: + super(ActionRule, self).__init__(location=location, tags=tags, **kwargs) + self.properties = properties + + +class Alert(Resource): + """An alert created in alert management service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: ~azure.mgmt.alertsmanagement.models.AlertProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(Alert, self).__init__(**kwargs) + self.properties = properties + + +class AlertModification(Resource): + """Alert Modification details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.AlertModificationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertModificationProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(AlertModification, self).__init__(**kwargs) + self.properties = properties + + +class AlertModificationItem(Model): + """Alert modification item. + + :param modification_event: Reason for the modification. Possible values + include: 'AlertCreated', 'StateChange', 'MonitorConditionChange' + :type modification_event: str or + ~azure.mgmt.alertsmanagement.models.AlertModificationEvent + :param old_value: Old value + :type old_value: str + :param new_value: New value + :type new_value: str + :param modified_at: Modified date and time + :type modified_at: str + :param modified_by: Modified user details (Principal client name) + :type modified_by: str + :param comments: Modification comments + :type comments: str + :param description: Description of the modification + :type description: str + """ + + _attribute_map = { + 'modification_event': {'key': 'modificationEvent', 'type': 'AlertModificationEvent'}, + 'old_value': {'key': 'oldValue', 'type': 'str'}, + 'new_value': {'key': 'newValue', 'type': 'str'}, + 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, modification_event=None, old_value: str=None, new_value: str=None, modified_at: str=None, modified_by: str=None, comments: str=None, description: str=None, **kwargs) -> None: + super(AlertModificationItem, self).__init__(**kwargs) + self.modification_event = modification_event + self.old_value = old_value + self.new_value = new_value + self.modified_at = modified_at + self.modified_by = modified_by + self.comments = comments + self.description = description + + +class AlertModificationProperties(Model): + """Properties of the alert modification item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar alert_id: Unique Id of the alert for which the history is being + retrieved + :vartype alert_id: str + :param modifications: Modification details + :type modifications: + list[~azure.mgmt.alertsmanagement.models.AlertModificationItem] + """ + + _validation = { + 'alert_id': {'readonly': True}, + } + + _attribute_map = { + 'alert_id': {'key': 'alertId', 'type': 'str'}, + 'modifications': {'key': 'modifications', 'type': '[AlertModificationItem]'}, + } + + def __init__(self, *, modifications=None, **kwargs) -> None: + super(AlertModificationProperties, self).__init__(**kwargs) + self.alert_id = None + self.modifications = modifications + + +class AlertProperties(Model): + """Alert property bag. + + :param essentials: + :type essentials: ~azure.mgmt.alertsmanagement.models.Essentials + :param context: + :type context: object + :param egress_config: + :type egress_config: object + """ + + _attribute_map = { + 'essentials': {'key': 'essentials', 'type': 'Essentials'}, + 'context': {'key': 'context', 'type': 'object'}, + 'egress_config': {'key': 'egressConfig', 'type': 'object'}, + } + + def __init__(self, *, essentials=None, context=None, egress_config=None, **kwargs) -> None: + super(AlertProperties, self).__init__(**kwargs) + self.essentials = essentials + self.context = context + self.egress_config = egress_config + + +class AzureResource(Model): + """An Azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param location: The resource location. Default value: "global" . + :type location: str + :param tags: The resource tags. + :type tags: object + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + } + + def __init__(self, *, location: str="global", tags=None, **kwargs) -> None: + super(AzureResource, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.location = location + self.tags = tags + + +class AlertRule(AzureResource): + """The alert rule information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param location: The resource location. Default value: "global" . + :type location: str + :param tags: The resource tags. + :type tags: object + :param description: The alert rule description. + :type description: str + :param state: Required. The alert rule state. Possible values include: + 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.alertsmanagement.models.AlertRuleState + :param severity: Required. The alert rule severity. Possible values + include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param frequency: Required. The alert rule frequency in ISO8601 format. + The time granularity must be in minutes and minimum value is 5 minutes. + :type frequency: timedelta + :param detector: Required. The alert rule's detector. + :type detector: ~azure.mgmt.alertsmanagement.models.Detector + :param scope: Required. The alert rule resources scope. + :type scope: list[str] + :param action_groups: Required. The alert rule actions. + :type action_groups: + ~azure.mgmt.alertsmanagement.models.ActionGroupsInformation + :param throttling: The alert rule throttling information. + :type throttling: + ~azure.mgmt.alertsmanagement.models.ThrottlingInformation + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'state': {'required': True}, + 'severity': {'required': True}, + 'frequency': {'required': True}, + 'detector': {'required': True}, + 'scope': {'required': True}, + 'action_groups': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'duration'}, + 'detector': {'key': 'properties.detector', 'type': 'Detector'}, + 'scope': {'key': 'properties.scope', 'type': '[str]'}, + 'action_groups': {'key': 'properties.actionGroups', 'type': 'ActionGroupsInformation'}, + 'throttling': {'key': 'properties.throttling', 'type': 'ThrottlingInformation'}, + } + + def __init__(self, *, state, severity, frequency, detector, scope, action_groups, location: str="global", tags=None, description: str=None, throttling=None, **kwargs) -> None: + super(AlertRule, self).__init__(location=location, tags=tags, **kwargs) + self.description = description + self.state = state + self.severity = severity + self.frequency = frequency + self.detector = detector + self.scope = scope + self.action_groups = action_groups + self.throttling = throttling + + +class AlertRulePatchObject(Model): + """The alert rule patch information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param tags: The resource tags. + :type tags: object + :param description: The alert rule description. + :type description: str + :param state: The alert rule state. Possible values include: 'Enabled', + 'Disabled' + :type state: str or ~azure.mgmt.alertsmanagement.models.AlertRuleState + :param severity: The alert rule severity. Possible values include: 'Sev0', + 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param frequency: The alert rule frequency in ISO8601 format. The time + granularity must be in minutes and minimum value is 5 minutes. + :type frequency: timedelta + :param action_groups: The alert rule actions. + :type action_groups: + ~azure.mgmt.alertsmanagement.models.ActionGroupsInformation + :param throttling: The alert rule throttling information. + :type throttling: + ~azure.mgmt.alertsmanagement.models.ThrottlingInformation + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'duration'}, + 'action_groups': {'key': 'properties.actionGroups', 'type': 'ActionGroupsInformation'}, + 'throttling': {'key': 'properties.throttling', 'type': 'ThrottlingInformation'}, + } + + def __init__(self, *, tags=None, description: str=None, state=None, severity=None, frequency=None, action_groups=None, throttling=None, **kwargs) -> None: + super(AlertRulePatchObject, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.tags = tags + self.description = description + self.state = state + self.severity = severity + self.frequency = frequency + self.action_groups = action_groups + self.throttling = throttling + + +class AlertsMetaData(Model): + """alert meta data information. + + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.AlertsMetaDataProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'AlertsMetaDataProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(AlertsMetaData, self).__init__(**kwargs) + self.properties = properties + + +class AlertsMetaDataProperties(Model): + """alert meta data property bag. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MonitorServiceList + + All required parameters must be populated in order to send to Azure. + + :param metadata_identifier: Required. Constant filled by server. + :type metadata_identifier: str + """ + + _validation = { + 'metadata_identifier': {'required': True}, + } + + _attribute_map = { + 'metadata_identifier': {'key': 'metadataIdentifier', 'type': 'str'}, + } + + _subtype_map = { + 'metadata_identifier': {'MonitorServiceList': 'MonitorServiceList'} + } + + def __init__(self, **kwargs) -> None: + super(AlertsMetaDataProperties, self).__init__(**kwargs) + self.metadata_identifier = None + + +class AlertsSummary(Resource): + """Summary of alerts based on the input filters and 'groupby' parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroup + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertsSummaryGroup'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(AlertsSummary, self).__init__(**kwargs) + self.properties = properties + + +class AlertsSummaryGroup(Model): + """Group the result set. + + :param total: Total count of the result set. + :type total: int + :param smart_groups_count: Total count of the smart groups. + :type smart_groups_count: int + :param groupedby: Name of the field aggregated + :type groupedby: str + :param values: List of the items + :type values: + list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] + """ + + _attribute_map = { + 'total': {'key': 'total', 'type': 'int'}, + 'smart_groups_count': {'key': 'smartGroupsCount', 'type': 'int'}, + 'groupedby': {'key': 'groupedby', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, + } + + def __init__(self, *, total: int=None, smart_groups_count: int=None, groupedby: str=None, values=None, **kwargs) -> None: + super(AlertsSummaryGroup, self).__init__(**kwargs) + self.total = total + self.smart_groups_count = smart_groups_count + self.groupedby = groupedby + self.values = values + + +class AlertsSummaryGroupItem(Model): + """Alerts summary group item. + + :param name: Value of the aggregated field + :type name: str + :param count: Count of the aggregated field + :type count: int + :param groupedby: Name of the field aggregated + :type groupedby: str + :param values: List of the items + :type values: + list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'groupedby': {'key': 'groupedby', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, + } + + def __init__(self, *, name: str=None, count: int=None, groupedby: str=None, values=None, **kwargs) -> None: + super(AlertsSummaryGroupItem, self).__init__(**kwargs) + self.name = name + self.count = count + self.groupedby = groupedby + self.values = values + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Condition(Model): + """condition to trigger an action rule. + + :param operator: operator for a given condition. Possible values include: + 'Equals', 'NotEquals', 'Contains', 'DoesNotContain' + :type operator: str or ~azure.mgmt.alertsmanagement.models.Operator + :param values: list of values to match for a given condition. + :type values: list[str] + """ + + _attribute_map = { + 'operator': {'key': 'operator', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, *, operator=None, values=None, **kwargs) -> None: + super(Condition, self).__init__(**kwargs) + self.operator = operator + self.values = values + + +class Conditions(Model): + """Conditions in alert instance to be matched for a given action rule. Default + value is all. Multiple values could be provided with comma separation. + + :param severity: filter alerts by severity + :type severity: ~azure.mgmt.alertsmanagement.models.Condition + :param monitor_service: filter alerts by monitor service + :type monitor_service: ~azure.mgmt.alertsmanagement.models.Condition + :param monitor_condition: filter alerts by monitor condition + :type monitor_condition: ~azure.mgmt.alertsmanagement.models.Condition + :param target_resource_type: filter alerts by target resource type + :type target_resource_type: ~azure.mgmt.alertsmanagement.models.Condition + :param alert_rule_id: filter alerts by alert rule id + :type alert_rule_id: ~azure.mgmt.alertsmanagement.models.Condition + :param description: filter alerts by alert rule description + :type description: ~azure.mgmt.alertsmanagement.models.Condition + :param alert_context: filter alerts by alert context (payload) + :type alert_context: ~azure.mgmt.alertsmanagement.models.Condition + """ + + _attribute_map = { + 'severity': {'key': 'severity', 'type': 'Condition'}, + 'monitor_service': {'key': 'monitorService', 'type': 'Condition'}, + 'monitor_condition': {'key': 'monitorCondition', 'type': 'Condition'}, + 'target_resource_type': {'key': 'targetResourceType', 'type': 'Condition'}, + 'alert_rule_id': {'key': 'alertRuleId', 'type': 'Condition'}, + 'description': {'key': 'description', 'type': 'Condition'}, + 'alert_context': {'key': 'alertContext', 'type': 'Condition'}, + } + + def __init__(self, *, severity=None, monitor_service=None, monitor_condition=None, target_resource_type=None, alert_rule_id=None, description=None, alert_context=None, **kwargs) -> None: + super(Conditions, self).__init__(**kwargs) + self.severity = severity + self.monitor_service = monitor_service + self.monitor_condition = monitor_condition + self.target_resource_type = target_resource_type + self.alert_rule_id = alert_rule_id + self.description = description + self.alert_context = alert_context + + +class Detector(Model): + """The detector information. By default this is not populated, unless it's + specified in expandDetector. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The detector id. + :type id: str + :param parameters: The detector's parameters.' + :type parameters: dict[str, object] + :param name: The Smart Detector name. By default this is not populated, + unless it's specified in expandDetector + :type name: str + :param description: The Smart Detector description. By default this is not + populated, unless it's specified in expandDetector + :type description: str + :param supported_resource_types: The Smart Detector supported resource + types. By default this is not populated, unless it's specified in + expandDetector + :type supported_resource_types: list[str] + :param image_paths: The Smart Detector image path. By default this is not + populated, unless it's specified in expandDetector + :type image_paths: list[str] + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'supported_resource_types': {'key': 'supportedResourceTypes', 'type': '[str]'}, + 'image_paths': {'key': 'imagePaths', 'type': '[str]'}, + } + + def __init__(self, *, id: str, parameters=None, name: str=None, description: str=None, supported_resource_types=None, image_paths=None, **kwargs) -> None: + super(Detector, self).__init__(**kwargs) + self.id = id + self.parameters = parameters + self.name = name + self.description = description + self.supported_resource_types = supported_resource_types + self.image_paths = image_paths + + +class Diagnostics(ActionRuleProperties): + """Diagnostics based Action Rule. + + Action rule with diagnostics configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(Diagnostics, self).__init__(scope=scope, conditions=conditions, description=description, status=status, **kwargs) + self.type = 'Diagnostics' + + +class ErrorResponse(Model): + """An error response from the service. + + :param error: + :type error: ~azure.mgmt.alertsmanagement.models.ErrorResponseBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class ErrorResponse1(Model): + """Describe the format of an Error response. + + :param code: Error code + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(ErrorResponse1, self).__init__(**kwargs) + self.code = code + self.message = message + + +class ErrorResponse1Exception(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse1'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponse1Exception, self).__init__(deserialize, response, 'ErrorResponse1', *args) + + +class ErrorResponseBody(Model): + """Details of error response. + + :param code: Error code, intended to be consumed programmatically. + :type code: str + :param message: Description of the error, intended for display in user + interface. + :type message: str + :param target: Target of the particular error, for example name of the + property. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.alertsmanagement.models.ErrorResponseBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorResponseBody]'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + super(ErrorResponseBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class Essentials(Model): + """This object contains consistent fields across different monitor services. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar severity: Severity of alert Sev0 being highest and Sev4 being + lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :ivar signal_type: The type of signal the alert is based on, which could + be metrics, logs or activity logs. Possible values include: 'Metric', + 'Log', 'Unknown' + :vartype signal_type: str or + ~azure.mgmt.alertsmanagement.models.SignalType + :ivar alert_state: Alert object state, which can be modified by the user. + Possible values include: 'New', 'Acknowledged', 'Closed' + :vartype alert_state: str or + ~azure.mgmt.alertsmanagement.models.AlertState + :ivar monitor_condition: Condition of the rule at the monitor service. It + represents whether the underlying conditions have crossed the defined + alert rule thresholds. Possible values include: 'Fired', 'Resolved' + :vartype monitor_condition: str or + ~azure.mgmt.alertsmanagement.models.MonitorCondition + :param target_resource: Target ARM resource, on which alert got created. + :type target_resource: str + :param target_resource_name: Name of the target ARM resource name, on + which alert got created. + :type target_resource_name: str + :param target_resource_group: Resource group of target ARM resource, on + which alert got created. + :type target_resource_group: str + :param target_resource_type: Resource type of target ARM resource, on + which alert got created. + :type target_resource_type: str + :ivar monitor_service: Monitor service on which the rule(monitor) is set. + Possible values include: 'Application Insights', 'ActivityLog + Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', + 'ActivityLog Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', + 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', + 'Zabbix' + :vartype monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :ivar alert_rule: Rule(monitor) which fired alert instance. Depending on + the monitor service, this would be ARM id or name of the rule. + :vartype alert_rule: str + :ivar source_created_id: Unique Id created by monitor service for each + alert instance. This could be used to track the issue at the monitor + service, in case of Nagios, Zabbix, SCOM etc. + :vartype source_created_id: str + :ivar smart_group_id: Unique Id of the smart group + :vartype smart_group_id: str + :ivar smart_grouping_reason: Verbose reason describing the reason why this + alert instance is added to a smart group + :vartype smart_grouping_reason: str + :ivar start_date_time: Creation time(ISO-8601 format) of alert instance. + :vartype start_date_time: datetime + :ivar last_modified_date_time: Last modification time(ISO-8601 format) of + alert instance. + :vartype last_modified_date_time: datetime + :ivar monitor_condition_resolved_date_time: Resolved time(ISO-8601 format) + of alert instance. This will be updated when monitor service resolves the + alert instance because the rule condition is no longer met. + :vartype monitor_condition_resolved_date_time: datetime + :ivar last_modified_user_name: User who last modified the alert, in case + of monitor service updates user would be 'system', otherwise name of the + user. + :vartype last_modified_user_name: str + """ + + _validation = { + 'severity': {'readonly': True}, + 'signal_type': {'readonly': True}, + 'alert_state': {'readonly': True}, + 'monitor_condition': {'readonly': True}, + 'monitor_service': {'readonly': True}, + 'alert_rule': {'readonly': True}, + 'source_created_id': {'readonly': True}, + 'smart_group_id': {'readonly': True}, + 'smart_grouping_reason': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'monitor_condition_resolved_date_time': {'readonly': True}, + 'last_modified_user_name': {'readonly': True}, + } + + _attribute_map = { + 'severity': {'key': 'severity', 'type': 'str'}, + 'signal_type': {'key': 'signalType', 'type': 'str'}, + 'alert_state': {'key': 'alertState', 'type': 'str'}, + 'monitor_condition': {'key': 'monitorCondition', 'type': 'str'}, + 'target_resource': {'key': 'targetResource', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'target_resource_type': {'key': 'targetResourceType', 'type': 'str'}, + 'monitor_service': {'key': 'monitorService', 'type': 'str'}, + 'alert_rule': {'key': 'alertRule', 'type': 'str'}, + 'source_created_id': {'key': 'sourceCreatedId', 'type': 'str'}, + 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, + 'smart_grouping_reason': {'key': 'smartGroupingReason', 'type': 'str'}, + 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, + 'monitor_condition_resolved_date_time': {'key': 'monitorConditionResolvedDateTime', 'type': 'iso-8601'}, + 'last_modified_user_name': {'key': 'lastModifiedUserName', 'type': 'str'}, + } + + def __init__(self, *, target_resource: str=None, target_resource_name: str=None, target_resource_group: str=None, target_resource_type: str=None, **kwargs) -> None: + super(Essentials, self).__init__(**kwargs) + self.severity = None + self.signal_type = None + self.alert_state = None + self.monitor_condition = None + self.target_resource = target_resource + self.target_resource_name = target_resource_name + self.target_resource_group = target_resource_group + self.target_resource_type = target_resource_type + self.monitor_service = None + self.alert_rule = None + self.source_created_id = None + self.smart_group_id = None + self.smart_grouping_reason = None + self.start_date_time = None + self.last_modified_date_time = None + self.monitor_condition_resolved_date_time = None + self.last_modified_user_name = None + + +class MonitorServiceDetails(Model): + """Details of a monitor service. + + :param name: Monitor service name + :type name: str + :param display_name: Monitor service display name + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, **kwargs) -> None: + super(MonitorServiceDetails, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + + +class MonitorServiceList(AlertsMetaDataProperties): + """Monitor service details. + + Monitor service details. + + All required parameters must be populated in order to send to Azure. + + :param metadata_identifier: Required. Constant filled by server. + :type metadata_identifier: str + :param data: Required. Array of operations + :type data: + list[~azure.mgmt.alertsmanagement.models.MonitorServiceDetails] + """ + + _validation = { + 'metadata_identifier': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'metadata_identifier': {'key': 'metadataIdentifier', 'type': 'str'}, + 'data': {'key': 'data', 'type': '[MonitorServiceDetails]'}, + } + + def __init__(self, *, data, **kwargs) -> None: + super(MonitorServiceList, self).__init__(**kwargs) + self.data = data + self.metadata_identifier = 'MonitorServiceList' + + +class Operation(Model): + """Operation provided by provider. + + :param name: Name of the operation + :type name: str + :param display: Properties of the operation + :type display: ~azure.mgmt.alertsmanagement.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + + +class OperationDisplay(Model): + """Properties of the operation. + + :param provider: Provider name + :type provider: str + :param resource: Resource name + :type resource: str + :param operation: Operation name + :type operation: str + :param description: Description of the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class PatchObject(Model): + """Data contract for patch. + + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param tags: tags to be updated + :type tags: object + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + } + + def __init__(self, *, status=None, tags=None, **kwargs) -> None: + super(PatchObject, self).__init__(**kwargs) + self.status = status + self.tags = tags + + +class Scope(Model): + """Target scope for a given action rule. By default scope will be the + subscription. User can also provide list of resource groups or list of + resources from the scope subscription as well. + + :param scope_type: type of target scope. Possible values include: + 'ResourceGroup', 'Resource' + :type scope_type: str or ~azure.mgmt.alertsmanagement.models.ScopeType + :param values: list of ARM IDs of the given scope type which will be the + target of the given action rule. + :type values: list[str] + """ + + _attribute_map = { + 'scope_type': {'key': 'scopeType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, *, scope_type=None, values=None, **kwargs) -> None: + super(Scope, self).__init__(**kwargs) + self.scope_type = scope_type + self.values = values + + +class SmartGroup(Resource): + """Set of related alerts grouped together smartly by AMS. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param alerts_count: Total number of alerts in smart group + :type alerts_count: int + :ivar smart_group_state: Smart group state. Possible values include: + 'New', 'Acknowledged', 'Closed' + :vartype smart_group_state: str or + ~azure.mgmt.alertsmanagement.models.State + :ivar severity: Severity of smart group is the highest(Sev0 >... > Sev4) + severity of all the alerts in the group. Possible values include: 'Sev0', + 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :ivar start_date_time: Creation time of smart group. Date-Time in ISO-8601 + format. + :vartype start_date_time: datetime + :ivar last_modified_date_time: Last updated time of smart group. Date-Time + in ISO-8601 format. + :vartype last_modified_date_time: datetime + :ivar last_modified_user_name: Last modified by user name. + :vartype last_modified_user_name: str + :param resources: Summary of target resources in the smart group + :type resources: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param resource_types: Summary of target resource types in the smart group + :type resource_types: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param resource_groups: Summary of target resource groups in the smart + group + :type resource_groups: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param monitor_services: Summary of monitorServices in the smart group + :type monitor_services: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param monitor_conditions: Summary of monitorConditions in the smart group + :type monitor_conditions: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param alert_states: Summary of alertStates in the smart group + :type alert_states: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param alert_severities: Summary of alertSeverities in the smart group + :type alert_severities: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param next_link: The URI to fetch the next page of alerts. Call + ListNext() with this URI to fetch the next page alerts. + :type next_link: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'smart_group_state': {'readonly': True}, + 'severity': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'last_modified_user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'alerts_count': {'key': 'properties.alertsCount', 'type': 'int'}, + 'smart_group_state': {'key': 'properties.smartGroupState', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'properties.lastModifiedDateTime', 'type': 'iso-8601'}, + 'last_modified_user_name': {'key': 'properties.lastModifiedUserName', 'type': 'str'}, + 'resources': {'key': 'properties.resources', 'type': '[SmartGroupAggregatedProperty]'}, + 'resource_types': {'key': 'properties.resourceTypes', 'type': '[SmartGroupAggregatedProperty]'}, + 'resource_groups': {'key': 'properties.resourceGroups', 'type': '[SmartGroupAggregatedProperty]'}, + 'monitor_services': {'key': 'properties.monitorServices', 'type': '[SmartGroupAggregatedProperty]'}, + 'monitor_conditions': {'key': 'properties.monitorConditions', 'type': '[SmartGroupAggregatedProperty]'}, + 'alert_states': {'key': 'properties.alertStates', 'type': '[SmartGroupAggregatedProperty]'}, + 'alert_severities': {'key': 'properties.alertSeverities', 'type': '[SmartGroupAggregatedProperty]'}, + 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, + } + + def __init__(self, *, alerts_count: int=None, resources=None, resource_types=None, resource_groups=None, monitor_services=None, monitor_conditions=None, alert_states=None, alert_severities=None, next_link: str=None, **kwargs) -> None: + super(SmartGroup, self).__init__(**kwargs) + self.alerts_count = alerts_count + self.smart_group_state = None + self.severity = None + self.start_date_time = None + self.last_modified_date_time = None + self.last_modified_user_name = None + self.resources = resources + self.resource_types = resource_types + self.resource_groups = resource_groups + self.monitor_services = monitor_services + self.monitor_conditions = monitor_conditions + self.alert_states = alert_states + self.alert_severities = alert_severities + self.next_link = next_link + + +class SmartGroupAggregatedProperty(Model): + """Aggregated property of each type. + + :param name: Name of the type. + :type name: str + :param count: Total number of items of type. + :type count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, count: int=None, **kwargs) -> None: + super(SmartGroupAggregatedProperty, self).__init__(**kwargs) + self.name = name + self.count = count + + +class SmartGroupModification(Resource): + """Alert Modification details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.SmartGroupModificationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'SmartGroupModificationProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(SmartGroupModification, self).__init__(**kwargs) + self.properties = properties + + +class SmartGroupModificationItem(Model): + """smartGroup modification item. + + :param modification_event: Reason for the modification. Possible values + include: 'SmartGroupCreated', 'StateChange', 'AlertAdded', 'AlertRemoved' + :type modification_event: str or + ~azure.mgmt.alertsmanagement.models.SmartGroupModificationEvent + :param old_value: Old value + :type old_value: str + :param new_value: New value + :type new_value: str + :param modified_at: Modified date and time + :type modified_at: str + :param modified_by: Modified user details (Principal client name) + :type modified_by: str + :param comments: Modification comments + :type comments: str + :param description: Description of the modification + :type description: str + """ + + _attribute_map = { + 'modification_event': {'key': 'modificationEvent', 'type': 'SmartGroupModificationEvent'}, + 'old_value': {'key': 'oldValue', 'type': 'str'}, + 'new_value': {'key': 'newValue', 'type': 'str'}, + 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, modification_event=None, old_value: str=None, new_value: str=None, modified_at: str=None, modified_by: str=None, comments: str=None, description: str=None, **kwargs) -> None: + super(SmartGroupModificationItem, self).__init__(**kwargs) + self.modification_event = modification_event + self.old_value = old_value + self.new_value = new_value + self.modified_at = modified_at + self.modified_by = modified_by + self.comments = comments + self.description = description + + +class SmartGroupModificationProperties(Model): + """Properties of the smartGroup modification item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar smart_group_id: Unique Id of the smartGroup for which the history is + being retrieved + :vartype smart_group_id: str + :param modifications: Modification details + :type modifications: + list[~azure.mgmt.alertsmanagement.models.SmartGroupModificationItem] + :param next_link: URL to fetch the next set of results. + :type next_link: str + """ + + _validation = { + 'smart_group_id': {'readonly': True}, + } + + _attribute_map = { + 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, + 'modifications': {'key': 'modifications', 'type': '[SmartGroupModificationItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, modifications=None, next_link: str=None, **kwargs) -> None: + super(SmartGroupModificationProperties, self).__init__(**kwargs) + self.smart_group_id = None + self.modifications = modifications + self.next_link = next_link + + +class Suppression(ActionRuleProperties): + """Suppression based Action Rule. + + Action rule with suppression configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + :param suppression_config: Required. suppression configuration for the + action rule + :type suppression_config: + ~azure.mgmt.alertsmanagement.models.SuppressionConfig + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + 'suppression_config': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'suppression_config': {'key': 'suppressionConfig', 'type': 'SuppressionConfig'}, + } + + def __init__(self, *, suppression_config, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(Suppression, self).__init__(scope=scope, conditions=conditions, description=description, status=status, **kwargs) + self.suppression_config = suppression_config + self.type = 'Suppression' + + +class SuppressionConfig(Model): + """Suppression logic for a given action rule. + + All required parameters must be populated in order to send to Azure. + + :param recurrence_type: Required. Specifies when the suppression should be + applied. Possible values include: 'Always', 'Once', 'Daily', 'Weekly', + 'Monthly' + :type recurrence_type: str or + ~azure.mgmt.alertsmanagement.models.SuppressionType + :param schedule: suppression schedule configuration + :type schedule: ~azure.mgmt.alertsmanagement.models.SuppressionSchedule + """ + + _validation = { + 'recurrence_type': {'required': True}, + } + + _attribute_map = { + 'recurrence_type': {'key': 'recurrenceType', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'SuppressionSchedule'}, + } + + def __init__(self, *, recurrence_type, schedule=None, **kwargs) -> None: + super(SuppressionConfig, self).__init__(**kwargs) + self.recurrence_type = recurrence_type + self.schedule = schedule + + +class SuppressionSchedule(Model): + """Schedule for a given suppression configuration. + + :param start_date: Start date for suppression + :type start_date: str + :param end_date: End date for suppression + :type end_date: str + :param start_time: Start time for suppression + :type start_time: str + :param end_time: End date for suppression + :type end_time: str + :param recurrence_values: Specifies the values for recurrence pattern + :type recurrence_values: list[int] + """ + + _attribute_map = { + 'start_date': {'key': 'startDate', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'recurrence_values': {'key': 'recurrenceValues', 'type': '[int]'}, + } + + def __init__(self, *, start_date: str=None, end_date: str=None, start_time: str=None, end_time: str=None, recurrence_values=None, **kwargs) -> None: + super(SuppressionSchedule, self).__init__(**kwargs) + self.start_date = start_date + self.end_date = end_date + self.start_time = start_time + self.end_time = end_time + self.recurrence_values = recurrence_values + + +class ThrottlingInformation(Model): + """Optional throttling information for the alert rule. + + :param duration: The required duration (in ISO8601 format) to wait before + notifying on the alert rule again. The time granularity must be in minutes + and minimum value is 0 minutes + :type duration: timedelta + """ + + _attribute_map = { + 'duration': {'key': 'duration', 'type': 'duration'}, + } + + def __init__(self, *, duration=None, **kwargs) -> None: + super(ThrottlingInformation, self).__init__(**kwargs) + self.duration = duration diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_paged_models.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_paged_models.py new file mode 100644 index 000000000000..aece7093df75 --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_paged_models.py @@ -0,0 +1,79 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class AlertPaged(Paged): + """ + A paging container for iterating over a list of :class:`Alert ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Alert]'} + } + + def __init__(self, *args, **kwargs): + + super(AlertPaged, self).__init__(*args, **kwargs) +class SmartGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`SmartGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SmartGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(SmartGroupPaged, self).__init__(*args, **kwargs) +class ActionRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`ActionRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ActionRule]'} + } + + def __init__(self, *args, **kwargs): + + super(ActionRulePaged, self).__init__(*args, **kwargs) +class AlertRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`AlertRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AlertRule]'} + } + + def __init__(self, *args, **kwargs): + + super(AlertRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert.py deleted file mode 100644 index 634c2c747b17..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Alert(Resource): - """An alert created in alert management service. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: ~azure.mgmt.alertsmanagement.models.AlertProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertProperties'}, - } - - def __init__(self, **kwargs): - super(Alert, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification.py deleted file mode 100644 index e2d77167596c..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AlertModification(Resource): - """Alert Modification details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: - ~azure.mgmt.alertsmanagement.models.AlertModificationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertModificationProperties'}, - } - - def __init__(self, **kwargs): - super(AlertModification, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item.py deleted file mode 100644 index 50915b06ce40..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertModificationItem(Model): - """Alert modification item. - - :param modification_event: Reason for the modification. Possible values - include: 'AlertCreated', 'StateChange', 'MonitorConditionChange' - :type modification_event: str or - ~azure.mgmt.alertsmanagement.models.AlertModificationEvent - :param old_value: Old value - :type old_value: str - :param new_value: New value - :type new_value: str - :param modified_at: Modified date and time - :type modified_at: str - :param modified_by: Modified user details (Principal client name) - :type modified_by: str - :param comments: Modification comments - :type comments: str - :param description: Description of the modification - :type description: str - """ - - _attribute_map = { - 'modification_event': {'key': 'modificationEvent', 'type': 'AlertModificationEvent'}, - 'old_value': {'key': 'oldValue', 'type': 'str'}, - 'new_value': {'key': 'newValue', 'type': 'str'}, - 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, - 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, - 'comments': {'key': 'comments', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AlertModificationItem, self).__init__(**kwargs) - self.modification_event = kwargs.get('modification_event', None) - self.old_value = kwargs.get('old_value', None) - self.new_value = kwargs.get('new_value', None) - self.modified_at = kwargs.get('modified_at', None) - self.modified_by = kwargs.get('modified_by', None) - self.comments = kwargs.get('comments', None) - self.description = kwargs.get('description', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item_py3.py deleted file mode 100644 index b051daad6d2a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertModificationItem(Model): - """Alert modification item. - - :param modification_event: Reason for the modification. Possible values - include: 'AlertCreated', 'StateChange', 'MonitorConditionChange' - :type modification_event: str or - ~azure.mgmt.alertsmanagement.models.AlertModificationEvent - :param old_value: Old value - :type old_value: str - :param new_value: New value - :type new_value: str - :param modified_at: Modified date and time - :type modified_at: str - :param modified_by: Modified user details (Principal client name) - :type modified_by: str - :param comments: Modification comments - :type comments: str - :param description: Description of the modification - :type description: str - """ - - _attribute_map = { - 'modification_event': {'key': 'modificationEvent', 'type': 'AlertModificationEvent'}, - 'old_value': {'key': 'oldValue', 'type': 'str'}, - 'new_value': {'key': 'newValue', 'type': 'str'}, - 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, - 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, - 'comments': {'key': 'comments', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, modification_event=None, old_value: str=None, new_value: str=None, modified_at: str=None, modified_by: str=None, comments: str=None, description: str=None, **kwargs) -> None: - super(AlertModificationItem, self).__init__(**kwargs) - self.modification_event = modification_event - self.old_value = old_value - self.new_value = new_value - self.modified_at = modified_at - self.modified_by = modified_by - self.comments = comments - self.description = description diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties.py deleted file mode 100644 index c1d1b8123ecd..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertModificationProperties(Model): - """Properties of the alert modification item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar alert_id: Unique Id of the alert for which the history is being - retrieved - :vartype alert_id: str - :param modifications: Modification details - :type modifications: - list[~azure.mgmt.alertsmanagement.models.AlertModificationItem] - """ - - _validation = { - 'alert_id': {'readonly': True}, - } - - _attribute_map = { - 'alert_id': {'key': 'alertId', 'type': 'str'}, - 'modifications': {'key': 'modifications', 'type': '[AlertModificationItem]'}, - } - - def __init__(self, **kwargs): - super(AlertModificationProperties, self).__init__(**kwargs) - self.alert_id = None - self.modifications = kwargs.get('modifications', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties_py3.py deleted file mode 100644 index 51e67637a07a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertModificationProperties(Model): - """Properties of the alert modification item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar alert_id: Unique Id of the alert for which the history is being - retrieved - :vartype alert_id: str - :param modifications: Modification details - :type modifications: - list[~azure.mgmt.alertsmanagement.models.AlertModificationItem] - """ - - _validation = { - 'alert_id': {'readonly': True}, - } - - _attribute_map = { - 'alert_id': {'key': 'alertId', 'type': 'str'}, - 'modifications': {'key': 'modifications', 'type': '[AlertModificationItem]'}, - } - - def __init__(self, *, modifications=None, **kwargs) -> None: - super(AlertModificationProperties, self).__init__(**kwargs) - self.alert_id = None - self.modifications = modifications diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_py3.py deleted file mode 100644 index b7cae8114091..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AlertModification(Resource): - """Alert Modification details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: - ~azure.mgmt.alertsmanagement.models.AlertModificationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertModificationProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(AlertModification, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_paged.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_paged.py deleted file mode 100644 index 2ae2c88ee2e1..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AlertPaged(Paged): - """ - A paging container for iterating over a list of :class:`Alert ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Alert]'} - } - - def __init__(self, *args, **kwargs): - - super(AlertPaged, self).__init__(*args, **kwargs) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties.py deleted file mode 100644 index a8c7b761aba5..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertProperties(Model): - """Alert property bag. - - :param essentials: - :type essentials: ~azure.mgmt.alertsmanagement.models.Essentials - :param context: - :type context: object - :param egress_config: - :type egress_config: object - """ - - _attribute_map = { - 'essentials': {'key': 'essentials', 'type': 'Essentials'}, - 'context': {'key': 'context', 'type': 'object'}, - 'egress_config': {'key': 'egressConfig', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AlertProperties, self).__init__(**kwargs) - self.essentials = kwargs.get('essentials', None) - self.context = kwargs.get('context', None) - self.egress_config = kwargs.get('egress_config', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties_py3.py deleted file mode 100644 index a6c9cf43db24..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertProperties(Model): - """Alert property bag. - - :param essentials: - :type essentials: ~azure.mgmt.alertsmanagement.models.Essentials - :param context: - :type context: object - :param egress_config: - :type egress_config: object - """ - - _attribute_map = { - 'essentials': {'key': 'essentials', 'type': 'Essentials'}, - 'context': {'key': 'context', 'type': 'object'}, - 'egress_config': {'key': 'egressConfig', 'type': 'object'}, - } - - def __init__(self, *, essentials=None, context=None, egress_config=None, **kwargs) -> None: - super(AlertProperties, self).__init__(**kwargs) - self.essentials = essentials - self.context = context - self.egress_config = egress_config diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_py3.py deleted file mode 100644 index 4068ed33b63a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Alert(Resource): - """An alert created in alert management service. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: ~azure.mgmt.alertsmanagement.models.AlertProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(Alert, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary.py deleted file mode 100644 index 9521d5cb5d32..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AlertsSummary(Resource): - """Summary of alerts based on the input filters and 'groupby' parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroup - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertsSummaryGroup'}, - } - - def __init__(self, **kwargs): - super(AlertsSummary, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group.py deleted file mode 100644 index 470f52f8efdf..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertsSummaryGroup(Model): - """Group the result set. - - :param total: Total count of the result set. - :type total: int - :param smart_groups_count: Total count of the smart groups. - :type smart_groups_count: int - :param groupedby: Name of the field aggregated - :type groupedby: str - :param values: List of the items - :type values: - list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] - """ - - _attribute_map = { - 'total': {'key': 'total', 'type': 'int'}, - 'smart_groups_count': {'key': 'smartGroupsCount', 'type': 'int'}, - 'groupedby': {'key': 'groupedby', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, - } - - def __init__(self, **kwargs): - super(AlertsSummaryGroup, self).__init__(**kwargs) - self.total = kwargs.get('total', None) - self.smart_groups_count = kwargs.get('smart_groups_count', None) - self.groupedby = kwargs.get('groupedby', None) - self.values = kwargs.get('values', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item.py deleted file mode 100644 index 232fd9f12e08..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertsSummaryGroupItem(Model): - """Alerts summary group item. - - :param name: Value of the aggregated field - :type name: str - :param count: Count of the aggregated field - :type count: int - :param groupedby: Name of the field aggregated - :type groupedby: str - :param values: List of the items - :type values: - list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'groupedby': {'key': 'groupedby', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, - } - - def __init__(self, **kwargs): - super(AlertsSummaryGroupItem, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.count = kwargs.get('count', None) - self.groupedby = kwargs.get('groupedby', None) - self.values = kwargs.get('values', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_py3.py deleted file mode 100644 index f802c4f1eaa3..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertsSummaryGroupItem(Model): - """Alerts summary group item. - - :param name: Value of the aggregated field - :type name: str - :param count: Count of the aggregated field - :type count: int - :param groupedby: Name of the field aggregated - :type groupedby: str - :param values: List of the items - :type values: - list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'groupedby': {'key': 'groupedby', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, - } - - def __init__(self, *, name: str=None, count: int=None, groupedby: str=None, values=None, **kwargs) -> None: - super(AlertsSummaryGroupItem, self).__init__(**kwargs) - self.name = name - self.count = count - self.groupedby = groupedby - self.values = values diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_py3.py deleted file mode 100644 index b9d4c71d3403..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertsSummaryGroup(Model): - """Group the result set. - - :param total: Total count of the result set. - :type total: int - :param smart_groups_count: Total count of the smart groups. - :type smart_groups_count: int - :param groupedby: Name of the field aggregated - :type groupedby: str - :param values: List of the items - :type values: - list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] - """ - - _attribute_map = { - 'total': {'key': 'total', 'type': 'int'}, - 'smart_groups_count': {'key': 'smartGroupsCount', 'type': 'int'}, - 'groupedby': {'key': 'groupedby', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, - } - - def __init__(self, *, total: int=None, smart_groups_count: int=None, groupedby: str=None, values=None, **kwargs) -> None: - super(AlertsSummaryGroup, self).__init__(**kwargs) - self.total = total - self.smart_groups_count = smart_groups_count - self.groupedby = groupedby - self.values = values diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_py3.py deleted file mode 100644 index ed41ea6d10de..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AlertsSummary(Resource): - """Summary of alerts based on the input filters and 'groupby' parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroup - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertsSummaryGroup'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(AlertsSummary, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials.py deleted file mode 100644 index a333d42f1b82..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Essentials(Model): - """This object contains normalized fields across different monitor service and - also contains state related fields. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar severity: Severity of alert Sev0 being highest and Sev3 being - lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :ivar signal_type: Log based alert or metric based alert. Possible values - include: 'Metric', 'Log', 'Unknown' - :vartype signal_type: str or - ~azure.mgmt.alertsmanagement.models.SignalType - :ivar alert_state: Alert object state, which is modified by the user. - Possible values include: 'New', 'Acknowledged', 'Closed' - :vartype alert_state: str or - ~azure.mgmt.alertsmanagement.models.AlertState - :ivar monitor_condition: Represents rule condition(Fired/Resolved) - maintained by monitor service depending on the state of the state. - Possible values include: 'Fired', 'Resolved' - :vartype monitor_condition: str or - ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param target_resource: Target ARM resource, on which alert got created. - :type target_resource: str - :param target_resource_name: Name of the target ARM resource name, on - which alert got created. - :type target_resource_name: str - :param target_resource_group: Resource group of target ARM resource, on - which alert got created. - :type target_resource_group: str - :param target_resource_type: Resource type of target ARM resource, on - which alert got created. - :type target_resource_type: str - :ivar monitor_service: Monitor service on which the rule(monitor) is set. - Possible values include: 'Application Insights', 'ActivityLog - Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', - 'ActivityLog Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' - :vartype monitor_service: str or - ~azure.mgmt.alertsmanagement.models.MonitorService - :ivar alert_rule: Rule(monitor) which fired alert instance. Depending on - the monitor service, this would be ARM id or name of the rule. - :vartype alert_rule: str - :ivar source_created_id: Unique Id created by monitor service for each - alert instance. This could be used to track the issue at the monitor - service, in case of Nagios, Zabbix, SCOM etc. - :vartype source_created_id: str - :ivar smart_group_id: Unique Id of the smart group - :vartype smart_group_id: str - :ivar smart_grouping_reason: Verbose reason describing the reason why this - alert instance is added to a smart group - :vartype smart_grouping_reason: str - :ivar start_date_time: Creation time(ISO-8601 format) of alert instance. - :vartype start_date_time: datetime - :ivar last_modified_date_time: Last modification time(ISO-8601 format) of - alert instance. - :vartype last_modified_date_time: datetime - :ivar monitor_condition_resolved_date_time: Resolved time(ISO-8601 format) - of alert instance. This will be updated when monitor service resolves the - alert instance because of the rule condition is not met. - :vartype monitor_condition_resolved_date_time: datetime - :ivar last_modified_user_name: User who last modified the alert, in case - of monitor service updates user would be 'system', otherwise name of the - user. - :vartype last_modified_user_name: str - """ - - _validation = { - 'severity': {'readonly': True}, - 'signal_type': {'readonly': True}, - 'alert_state': {'readonly': True}, - 'monitor_condition': {'readonly': True}, - 'monitor_service': {'readonly': True}, - 'alert_rule': {'readonly': True}, - 'source_created_id': {'readonly': True}, - 'smart_group_id': {'readonly': True}, - 'smart_grouping_reason': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'last_modified_date_time': {'readonly': True}, - 'monitor_condition_resolved_date_time': {'readonly': True}, - 'last_modified_user_name': {'readonly': True}, - } - - _attribute_map = { - 'severity': {'key': 'severity', 'type': 'str'}, - 'signal_type': {'key': 'signalType', 'type': 'str'}, - 'alert_state': {'key': 'alertState', 'type': 'str'}, - 'monitor_condition': {'key': 'monitorCondition', 'type': 'str'}, - 'target_resource': {'key': 'targetResource', 'type': 'str'}, - 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, - 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, - 'target_resource_type': {'key': 'targetResourceType', 'type': 'str'}, - 'monitor_service': {'key': 'monitorService', 'type': 'str'}, - 'alert_rule': {'key': 'alertRule', 'type': 'str'}, - 'source_created_id': {'key': 'sourceCreatedId', 'type': 'str'}, - 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, - 'smart_grouping_reason': {'key': 'smartGroupingReason', 'type': 'str'}, - 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, - 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, - 'monitor_condition_resolved_date_time': {'key': 'monitorConditionResolvedDateTime', 'type': 'iso-8601'}, - 'last_modified_user_name': {'key': 'lastModifiedUserName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Essentials, self).__init__(**kwargs) - self.severity = None - self.signal_type = None - self.alert_state = None - self.monitor_condition = None - self.target_resource = kwargs.get('target_resource', None) - self.target_resource_name = kwargs.get('target_resource_name', None) - self.target_resource_group = kwargs.get('target_resource_group', None) - self.target_resource_type = kwargs.get('target_resource_type', None) - self.monitor_service = None - self.alert_rule = None - self.source_created_id = None - self.smart_group_id = None - self.smart_grouping_reason = None - self.start_date_time = None - self.last_modified_date_time = None - self.monitor_condition_resolved_date_time = None - self.last_modified_user_name = None diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials_py3.py deleted file mode 100644 index 01052b35702e..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials_py3.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Essentials(Model): - """This object contains normalized fields across different monitor service and - also contains state related fields. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar severity: Severity of alert Sev0 being highest and Sev3 being - lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :ivar signal_type: Log based alert or metric based alert. Possible values - include: 'Metric', 'Log', 'Unknown' - :vartype signal_type: str or - ~azure.mgmt.alertsmanagement.models.SignalType - :ivar alert_state: Alert object state, which is modified by the user. - Possible values include: 'New', 'Acknowledged', 'Closed' - :vartype alert_state: str or - ~azure.mgmt.alertsmanagement.models.AlertState - :ivar monitor_condition: Represents rule condition(Fired/Resolved) - maintained by monitor service depending on the state of the state. - Possible values include: 'Fired', 'Resolved' - :vartype monitor_condition: str or - ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param target_resource: Target ARM resource, on which alert got created. - :type target_resource: str - :param target_resource_name: Name of the target ARM resource name, on - which alert got created. - :type target_resource_name: str - :param target_resource_group: Resource group of target ARM resource, on - which alert got created. - :type target_resource_group: str - :param target_resource_type: Resource type of target ARM resource, on - which alert got created. - :type target_resource_type: str - :ivar monitor_service: Monitor service on which the rule(monitor) is set. - Possible values include: 'Application Insights', 'ActivityLog - Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', - 'ActivityLog Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' - :vartype monitor_service: str or - ~azure.mgmt.alertsmanagement.models.MonitorService - :ivar alert_rule: Rule(monitor) which fired alert instance. Depending on - the monitor service, this would be ARM id or name of the rule. - :vartype alert_rule: str - :ivar source_created_id: Unique Id created by monitor service for each - alert instance. This could be used to track the issue at the monitor - service, in case of Nagios, Zabbix, SCOM etc. - :vartype source_created_id: str - :ivar smart_group_id: Unique Id of the smart group - :vartype smart_group_id: str - :ivar smart_grouping_reason: Verbose reason describing the reason why this - alert instance is added to a smart group - :vartype smart_grouping_reason: str - :ivar start_date_time: Creation time(ISO-8601 format) of alert instance. - :vartype start_date_time: datetime - :ivar last_modified_date_time: Last modification time(ISO-8601 format) of - alert instance. - :vartype last_modified_date_time: datetime - :ivar monitor_condition_resolved_date_time: Resolved time(ISO-8601 format) - of alert instance. This will be updated when monitor service resolves the - alert instance because of the rule condition is not met. - :vartype monitor_condition_resolved_date_time: datetime - :ivar last_modified_user_name: User who last modified the alert, in case - of monitor service updates user would be 'system', otherwise name of the - user. - :vartype last_modified_user_name: str - """ - - _validation = { - 'severity': {'readonly': True}, - 'signal_type': {'readonly': True}, - 'alert_state': {'readonly': True}, - 'monitor_condition': {'readonly': True}, - 'monitor_service': {'readonly': True}, - 'alert_rule': {'readonly': True}, - 'source_created_id': {'readonly': True}, - 'smart_group_id': {'readonly': True}, - 'smart_grouping_reason': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'last_modified_date_time': {'readonly': True}, - 'monitor_condition_resolved_date_time': {'readonly': True}, - 'last_modified_user_name': {'readonly': True}, - } - - _attribute_map = { - 'severity': {'key': 'severity', 'type': 'str'}, - 'signal_type': {'key': 'signalType', 'type': 'str'}, - 'alert_state': {'key': 'alertState', 'type': 'str'}, - 'monitor_condition': {'key': 'monitorCondition', 'type': 'str'}, - 'target_resource': {'key': 'targetResource', 'type': 'str'}, - 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, - 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, - 'target_resource_type': {'key': 'targetResourceType', 'type': 'str'}, - 'monitor_service': {'key': 'monitorService', 'type': 'str'}, - 'alert_rule': {'key': 'alertRule', 'type': 'str'}, - 'source_created_id': {'key': 'sourceCreatedId', 'type': 'str'}, - 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, - 'smart_grouping_reason': {'key': 'smartGroupingReason', 'type': 'str'}, - 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, - 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, - 'monitor_condition_resolved_date_time': {'key': 'monitorConditionResolvedDateTime', 'type': 'iso-8601'}, - 'last_modified_user_name': {'key': 'lastModifiedUserName', 'type': 'str'}, - } - - def __init__(self, *, target_resource: str=None, target_resource_name: str=None, target_resource_group: str=None, target_resource_type: str=None, **kwargs) -> None: - super(Essentials, self).__init__(**kwargs) - self.severity = None - self.signal_type = None - self.alert_state = None - self.monitor_condition = None - self.target_resource = target_resource - self.target_resource_name = target_resource_name - self.target_resource_group = target_resource_group - self.target_resource_type = target_resource_type - self.monitor_service = None - self.alert_rule = None - self.source_created_id = None - self.smart_group_id = None - self.smart_grouping_reason = None - self.start_date_time = None - self.last_modified_date_time = None - self.monitor_condition_resolved_date_time = None - self.last_modified_user_name = None diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation.py deleted file mode 100644 index 1b5fea4ff02a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """Operation provided by provider. - - :param name: Name of the operation - :type name: str - :param display: Properties of the operation - :type display: ~azure.mgmt.alertsmanagement.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display.py deleted file mode 100644 index 89c4bdd6ccb6..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """Properties of the operation. - - :param provider: Provider name - :type provider: str - :param resource: Resource name - :type resource: str - :param operation: Operation name - :type operation: str - :param description: Description of the operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display_py3.py deleted file mode 100644 index fa3740dfc655..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """Properties of the operation. - - :param provider: Provider name - :type provider: str - :param resource: Resource name - :type resource: str - :param operation: Operation name - :type operation: str - :param description: Description of the operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_paged.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_paged.py deleted file mode 100644 index 3794d02c84f1..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_py3.py deleted file mode 100644 index ee66b4cfa181..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """Operation provided by provider. - - :param name: Name of the operation - :type name: str - :param display: Properties of the operation - :type display: ~azure.mgmt.alertsmanagement.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, name: str=None, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource.py deleted file mode 100644 index 7454d56b9033..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """An azure resource object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.type = None - self.name = None diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource_py3.py deleted file mode 100644 index 83ff9951fb91..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """An azure resource object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.type = None - self.name = None diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group.py deleted file mode 100644 index b1754f67fb4c..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class SmartGroup(Resource): - """Set of related alerts grouped together smartly by AMS. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param alerts_count: Total number of alerts in smart group - :type alerts_count: int - :ivar smart_group_state: Smart group state. Possible values include: - 'New', 'Acknowledged', 'Closed' - :vartype smart_group_state: str or - ~azure.mgmt.alertsmanagement.models.State - :ivar severity: Severity of smart group is the highest(Sev0 >... > Sev4) - severity of all the alerts in the group. Possible values include: 'Sev0', - 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :ivar start_date_time: Creation time of smart group. Date-Time in ISO-8601 - format. - :vartype start_date_time: datetime - :ivar last_modified_date_time: Last updated time of smart group. Date-Time - in ISO-8601 format. - :vartype last_modified_date_time: datetime - :ivar last_modified_user_name: Last modified by user name. - :vartype last_modified_user_name: str - :param resources: Summary of target resources in the smart group - :type resources: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param resource_types: Summary of target resource types in the smart group - :type resource_types: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param resource_groups: Summary of target resource groups in the smart - group - :type resource_groups: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param monitor_services: Summary of monitorServices in the smart group - :type monitor_services: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param monitor_conditions: Summary of monitorConditions in the smart group - :type monitor_conditions: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param alert_states: Summary of alertStates in the smart group - :type alert_states: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param alert_severities: Summary of alertSeverities in the smart group - :type alert_severities: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param next_link: The URI to fetch the next page of alerts. Call - ListNext() with this URI to fetch the next page alerts. - :type next_link: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - 'smart_group_state': {'readonly': True}, - 'severity': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'last_modified_date_time': {'readonly': True}, - 'last_modified_user_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'alerts_count': {'key': 'properties.alertsCount', 'type': 'int'}, - 'smart_group_state': {'key': 'properties.smartGroupState', 'type': 'str'}, - 'severity': {'key': 'properties.severity', 'type': 'str'}, - 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, - 'last_modified_date_time': {'key': 'properties.lastModifiedDateTime', 'type': 'iso-8601'}, - 'last_modified_user_name': {'key': 'properties.lastModifiedUserName', 'type': 'str'}, - 'resources': {'key': 'properties.resources', 'type': '[SmartGroupAggregatedProperty]'}, - 'resource_types': {'key': 'properties.resourceTypes', 'type': '[SmartGroupAggregatedProperty]'}, - 'resource_groups': {'key': 'properties.resourceGroups', 'type': '[SmartGroupAggregatedProperty]'}, - 'monitor_services': {'key': 'properties.monitorServices', 'type': '[SmartGroupAggregatedProperty]'}, - 'monitor_conditions': {'key': 'properties.monitorConditions', 'type': '[SmartGroupAggregatedProperty]'}, - 'alert_states': {'key': 'properties.alertStates', 'type': '[SmartGroupAggregatedProperty]'}, - 'alert_severities': {'key': 'properties.alertSeverities', 'type': '[SmartGroupAggregatedProperty]'}, - 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SmartGroup, self).__init__(**kwargs) - self.alerts_count = kwargs.get('alerts_count', None) - self.smart_group_state = None - self.severity = None - self.start_date_time = None - self.last_modified_date_time = None - self.last_modified_user_name = None - self.resources = kwargs.get('resources', None) - self.resource_types = kwargs.get('resource_types', None) - self.resource_groups = kwargs.get('resource_groups', None) - self.monitor_services = kwargs.get('monitor_services', None) - self.monitor_conditions = kwargs.get('monitor_conditions', None) - self.alert_states = kwargs.get('alert_states', None) - self.alert_severities = kwargs.get('alert_severities', None) - self.next_link = kwargs.get('next_link', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property.py deleted file mode 100644 index 4681ff600eff..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupAggregatedProperty(Model): - """Aggregated property of each type. - - :param name: Name of the type. - :type name: str - :param count: Total number of items of type. - :type count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(SmartGroupAggregatedProperty, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.count = kwargs.get('count', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property_py3.py deleted file mode 100644 index 5a6bfb2d896e..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupAggregatedProperty(Model): - """Aggregated property of each type. - - :param name: Name of the type. - :type name: str - :param count: Total number of items of type. - :type count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, *, name: str=None, count: int=None, **kwargs) -> None: - super(SmartGroupAggregatedProperty, self).__init__(**kwargs) - self.name = name - self.count = count diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification.py deleted file mode 100644 index b0c27ebc02c4..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class SmartGroupModification(Resource): - """Alert Modification details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: - ~azure.mgmt.alertsmanagement.models.SmartGroupModificationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'SmartGroupModificationProperties'}, - } - - def __init__(self, **kwargs): - super(SmartGroupModification, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item.py deleted file mode 100644 index b87b7a06465d..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupModificationItem(Model): - """smartGroup modification item. - - :param modification_event: Reason for the modification. Possible values - include: 'SmartGroupCreated', 'StateChange', 'AlertAdded', 'AlertRemoved' - :type modification_event: str or - ~azure.mgmt.alertsmanagement.models.SmartGroupModificationEvent - :param old_value: Old value - :type old_value: str - :param new_value: New value - :type new_value: str - :param modified_at: Modified date and time - :type modified_at: str - :param modified_by: Modified user details (Principal client name) - :type modified_by: str - :param comments: Modification comments - :type comments: str - :param description: Description of the modification - :type description: str - """ - - _attribute_map = { - 'modification_event': {'key': 'modificationEvent', 'type': 'SmartGroupModificationEvent'}, - 'old_value': {'key': 'oldValue', 'type': 'str'}, - 'new_value': {'key': 'newValue', 'type': 'str'}, - 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, - 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, - 'comments': {'key': 'comments', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SmartGroupModificationItem, self).__init__(**kwargs) - self.modification_event = kwargs.get('modification_event', None) - self.old_value = kwargs.get('old_value', None) - self.new_value = kwargs.get('new_value', None) - self.modified_at = kwargs.get('modified_at', None) - self.modified_by = kwargs.get('modified_by', None) - self.comments = kwargs.get('comments', None) - self.description = kwargs.get('description', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item_py3.py deleted file mode 100644 index aa07075fb384..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupModificationItem(Model): - """smartGroup modification item. - - :param modification_event: Reason for the modification. Possible values - include: 'SmartGroupCreated', 'StateChange', 'AlertAdded', 'AlertRemoved' - :type modification_event: str or - ~azure.mgmt.alertsmanagement.models.SmartGroupModificationEvent - :param old_value: Old value - :type old_value: str - :param new_value: New value - :type new_value: str - :param modified_at: Modified date and time - :type modified_at: str - :param modified_by: Modified user details (Principal client name) - :type modified_by: str - :param comments: Modification comments - :type comments: str - :param description: Description of the modification - :type description: str - """ - - _attribute_map = { - 'modification_event': {'key': 'modificationEvent', 'type': 'SmartGroupModificationEvent'}, - 'old_value': {'key': 'oldValue', 'type': 'str'}, - 'new_value': {'key': 'newValue', 'type': 'str'}, - 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, - 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, - 'comments': {'key': 'comments', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, modification_event=None, old_value: str=None, new_value: str=None, modified_at: str=None, modified_by: str=None, comments: str=None, description: str=None, **kwargs) -> None: - super(SmartGroupModificationItem, self).__init__(**kwargs) - self.modification_event = modification_event - self.old_value = old_value - self.new_value = new_value - self.modified_at = modified_at - self.modified_by = modified_by - self.comments = comments - self.description = description diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties.py deleted file mode 100644 index 5535552813b3..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupModificationProperties(Model): - """Properties of the smartGroup modification item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar smart_group_id: Unique Id of the smartGroup for which the history is - being retrieved - :vartype smart_group_id: str - :param modifications: Modification details - :type modifications: - list[~azure.mgmt.alertsmanagement.models.SmartGroupModificationItem] - :param next_link: URL to fetch the next set of results. - :type next_link: str - """ - - _validation = { - 'smart_group_id': {'readonly': True}, - } - - _attribute_map = { - 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, - 'modifications': {'key': 'modifications', 'type': '[SmartGroupModificationItem]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SmartGroupModificationProperties, self).__init__(**kwargs) - self.smart_group_id = None - self.modifications = kwargs.get('modifications', None) - self.next_link = kwargs.get('next_link', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties_py3.py deleted file mode 100644 index 40d128112187..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupModificationProperties(Model): - """Properties of the smartGroup modification item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar smart_group_id: Unique Id of the smartGroup for which the history is - being retrieved - :vartype smart_group_id: str - :param modifications: Modification details - :type modifications: - list[~azure.mgmt.alertsmanagement.models.SmartGroupModificationItem] - :param next_link: URL to fetch the next set of results. - :type next_link: str - """ - - _validation = { - 'smart_group_id': {'readonly': True}, - } - - _attribute_map = { - 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, - 'modifications': {'key': 'modifications', 'type': '[SmartGroupModificationItem]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, modifications=None, next_link: str=None, **kwargs) -> None: - super(SmartGroupModificationProperties, self).__init__(**kwargs) - self.smart_group_id = None - self.modifications = modifications - self.next_link = next_link diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_py3.py deleted file mode 100644 index b8cb946b706a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class SmartGroupModification(Resource): - """Alert Modification details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: - ~azure.mgmt.alertsmanagement.models.SmartGroupModificationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'SmartGroupModificationProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(SmartGroupModification, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_py3.py deleted file mode 100644 index a0c00f029485..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_py3.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class SmartGroup(Resource): - """Set of related alerts grouped together smartly by AMS. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param alerts_count: Total number of alerts in smart group - :type alerts_count: int - :ivar smart_group_state: Smart group state. Possible values include: - 'New', 'Acknowledged', 'Closed' - :vartype smart_group_state: str or - ~azure.mgmt.alertsmanagement.models.State - :ivar severity: Severity of smart group is the highest(Sev0 >... > Sev4) - severity of all the alerts in the group. Possible values include: 'Sev0', - 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :ivar start_date_time: Creation time of smart group. Date-Time in ISO-8601 - format. - :vartype start_date_time: datetime - :ivar last_modified_date_time: Last updated time of smart group. Date-Time - in ISO-8601 format. - :vartype last_modified_date_time: datetime - :ivar last_modified_user_name: Last modified by user name. - :vartype last_modified_user_name: str - :param resources: Summary of target resources in the smart group - :type resources: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param resource_types: Summary of target resource types in the smart group - :type resource_types: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param resource_groups: Summary of target resource groups in the smart - group - :type resource_groups: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param monitor_services: Summary of monitorServices in the smart group - :type monitor_services: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param monitor_conditions: Summary of monitorConditions in the smart group - :type monitor_conditions: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param alert_states: Summary of alertStates in the smart group - :type alert_states: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param alert_severities: Summary of alertSeverities in the smart group - :type alert_severities: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param next_link: The URI to fetch the next page of alerts. Call - ListNext() with this URI to fetch the next page alerts. - :type next_link: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - 'smart_group_state': {'readonly': True}, - 'severity': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'last_modified_date_time': {'readonly': True}, - 'last_modified_user_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'alerts_count': {'key': 'properties.alertsCount', 'type': 'int'}, - 'smart_group_state': {'key': 'properties.smartGroupState', 'type': 'str'}, - 'severity': {'key': 'properties.severity', 'type': 'str'}, - 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, - 'last_modified_date_time': {'key': 'properties.lastModifiedDateTime', 'type': 'iso-8601'}, - 'last_modified_user_name': {'key': 'properties.lastModifiedUserName', 'type': 'str'}, - 'resources': {'key': 'properties.resources', 'type': '[SmartGroupAggregatedProperty]'}, - 'resource_types': {'key': 'properties.resourceTypes', 'type': '[SmartGroupAggregatedProperty]'}, - 'resource_groups': {'key': 'properties.resourceGroups', 'type': '[SmartGroupAggregatedProperty]'}, - 'monitor_services': {'key': 'properties.monitorServices', 'type': '[SmartGroupAggregatedProperty]'}, - 'monitor_conditions': {'key': 'properties.monitorConditions', 'type': '[SmartGroupAggregatedProperty]'}, - 'alert_states': {'key': 'properties.alertStates', 'type': '[SmartGroupAggregatedProperty]'}, - 'alert_severities': {'key': 'properties.alertSeverities', 'type': '[SmartGroupAggregatedProperty]'}, - 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, - } - - def __init__(self, *, alerts_count: int=None, resources=None, resource_types=None, resource_groups=None, monitor_services=None, monitor_conditions=None, alert_states=None, alert_severities=None, next_link: str=None, **kwargs) -> None: - super(SmartGroup, self).__init__(**kwargs) - self.alerts_count = alerts_count - self.smart_group_state = None - self.severity = None - self.start_date_time = None - self.last_modified_date_time = None - self.last_modified_user_name = None - self.resources = resources - self.resource_types = resource_types - self.resource_groups = resource_groups - self.monitor_services = monitor_services - self.monitor_conditions = monitor_conditions - self.alert_states = alert_states - self.alert_severities = alert_severities - self.next_link = next_link diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list.py deleted file mode 100644 index 17302096edc5..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupsList(Model): - """List the alerts. - - :param next_link: URL to fetch the next set of alerts. - :type next_link: str - :param value: List of alerts - :type value: list[~azure.mgmt.alertsmanagement.models.SmartGroup] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[SmartGroup]'}, - } - - def __init__(self, **kwargs): - super(SmartGroupsList, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list_py3.py deleted file mode 100644 index 538de5af7747..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupsList(Model): - """List the alerts. - - :param next_link: URL to fetch the next set of alerts. - :type next_link: str - :param value: List of alerts - :type value: list[~azure.mgmt.alertsmanagement.models.SmartGroup] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[SmartGroup]'}, - } - - def __init__(self, *, next_link: str=None, value=None, **kwargs) -> None: - super(SmartGroupsList, self).__init__(**kwargs) - self.next_link = next_link - self.value = value diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py index 9341f4bfee3b..946b389ce5fb 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py @@ -9,12 +9,16 @@ # regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .alerts_operations import AlertsOperations -from .smart_groups_operations import SmartGroupsOperations +from ._operations import Operations +from ._alerts_operations import AlertsOperations +from ._smart_groups_operations import SmartGroupsOperations +from ._action_rules_operations import ActionRulesOperations +from ._smart_detector_alert_rules_operations import SmartDetectorAlertRulesOperations __all__ = [ 'Operations', 'AlertsOperations', 'SmartGroupsOperations', + 'ActionRulesOperations', + 'SmartDetectorAlertRulesOperations', ] diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_action_rules_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_action_rules_operations.py new file mode 100644 index 000000000000..4b988fecc8a6 --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_action_rules_operations.py @@ -0,0 +1,575 @@ +# 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 .. import models + + +class ActionRulesOperations(object): + """ActionRulesOperations 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: "2019-05-05-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-05-05-preview" + + self.config = config + + def list_by_subscription( + self, target_resource_group=None, target_resource_type=None, target_resource=None, severity=None, monitor_service=None, impacted_scope=None, description=None, alert_rule_id=None, action_group=None, name=None, custom_headers=None, raw=False, **operation_config): + """Get all action rule in a given subscription. + + List all action rules of the subscription and given input filters. + + :param target_resource_group: Filter by target resource group name. + Default value is select all. + :type target_resource_group: str + :param target_resource_type: Filter by target resource type. Default + value is select all. + :type target_resource_type: str + :param target_resource: Filter by target resource( which is full ARM + ID) Default value is select all. + :type target_resource: str + :param severity: Filter by severity. Default value is select all. + Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' + :type monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :param impacted_scope: filter by impacted/target scope (provide comma + separated list for multiple scopes). The value should be an well + constructed ARM id of the scope. + :type impacted_scope: str + :param description: filter by alert rule description + :type description: str + :param alert_rule_id: filter by alert rule id + :type alert_rule_id: str + :param action_group: filter by action group configured as part of + action rule + :type action_group: str + :param name: filter by action rule name + :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: An iterator like instance of ActionRule + :rtype: + ~azure.mgmt.alertsmanagement.models.ActionRulePaged[~azure.mgmt.alertsmanagement.models.ActionRule] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if target_resource_group is not None: + query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') + if target_resource_type is not None: + query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') + if target_resource is not None: + query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') + if severity is not None: + query_parameters['severity'] = self._serialize.query("severity", severity, 'str') + if monitor_service is not None: + query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') + if impacted_scope is not None: + query_parameters['impactedScope'] = self._serialize.query("impacted_scope", impacted_scope, 'str') + if description is not None: + query_parameters['description'] = self._serialize.query("description", description, 'str') + if alert_rule_id is not None: + query_parameters['alertRuleId'] = self._serialize.query("alert_rule_id", alert_rule_id, 'str') + if action_group is not None: + query_parameters['actionGroup'] = self._serialize.query("action_group", action_group, 'str') + if name is not None: + query_parameters['name'] = self._serialize.query("name", name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ActionRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/actionRules'} + + def list_by_resource_group( + self, resource_group_name, target_resource_group=None, target_resource_type=None, target_resource=None, severity=None, monitor_service=None, impacted_scope=None, description=None, alert_rule_id=None, action_group=None, name=None, custom_headers=None, raw=False, **operation_config): + """Get all action rules created in a resource group. + + List all action rules of the subscription, created in given resource + group and given input filters. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param target_resource_group: Filter by target resource group name. + Default value is select all. + :type target_resource_group: str + :param target_resource_type: Filter by target resource type. Default + value is select all. + :type target_resource_type: str + :param target_resource: Filter by target resource( which is full ARM + ID) Default value is select all. + :type target_resource: str + :param severity: Filter by severity. Default value is select all. + Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' + :type monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :param impacted_scope: filter by impacted/target scope (provide comma + separated list for multiple scopes). The value should be an well + constructed ARM id of the scope. + :type impacted_scope: str + :param description: filter by alert rule description + :type description: str + :param alert_rule_id: filter by alert rule id + :type alert_rule_id: str + :param action_group: filter by action group configured as part of + action rule + :type action_group: str + :param name: filter by action rule name + :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: An iterator like instance of ActionRule + :rtype: + ~azure.mgmt.alertsmanagement.models.ActionRulePaged[~azure.mgmt.alertsmanagement.models.ActionRule] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if target_resource_group is not None: + query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') + if target_resource_type is not None: + query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') + if target_resource is not None: + query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') + if severity is not None: + query_parameters['severity'] = self._serialize.query("severity", severity, 'str') + if monitor_service is not None: + query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') + if impacted_scope is not None: + query_parameters['impactedScope'] = self._serialize.query("impacted_scope", impacted_scope, 'str') + if description is not None: + query_parameters['description'] = self._serialize.query("description", description, 'str') + if alert_rule_id is not None: + query_parameters['alertRuleId'] = self._serialize.query("alert_rule_id", alert_rule_id, 'str') + if action_group is not None: + query_parameters['actionGroup'] = self._serialize.query("action_group", action_group, 'str') + if name is not None: + query_parameters['name'] = self._serialize.query("name", name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ActionRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules'} + + def get_by_name( + self, resource_group_name, action_rule_name, custom_headers=None, raw=False, **operation_config): + """Get action rule by name. + + Get a specific action rule. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param action_rule_name: The name of action rule that needs to be + fetched + :type action_rule_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: ActionRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.ActionRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_by_name.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'), + 'actionRuleName': self._serialize.url("action_rule_name", action_rule_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]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ActionRule', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}'} + + def create_update( + self, resource_group_name, action_rule_name, action_rule, custom_headers=None, raw=False, **operation_config): + """Create/update an action rule. + + Creates/Updates a specific action rule. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param action_rule_name: The name of action rule that needs to be + created/updated + :type action_rule_name: str + :param action_rule: action rule to be created/updated + :type action_rule: ~azure.mgmt.alertsmanagement.models.ActionRule + :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: ActionRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.ActionRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_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'), + 'actionRuleName': self._serialize.url("action_rule_name", action_rule_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(action_rule, 'ActionRule') + + # 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]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ActionRule', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}'} + + def delete( + self, resource_group_name, action_rule_name, custom_headers=None, raw=False, **operation_config): + """Delete action rule. + + Deletes a given action rule. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param action_rule_name: The name that needs to be deleted + :type action_rule_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: bool or ClientRawResponse if raw=true + :rtype: bool or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.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'), + 'actionRuleName': self._serialize.url("action_rule_name", action_rule_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.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('bool', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}'} + + def update( + self, resource_group_name, action_rule_name, status=None, tags=None, custom_headers=None, raw=False, **operation_config): + """Patch action rule. + + Update enabled flag and/or tags for the given action rule. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param action_rule_name: The name that needs to be updated + :type action_rule_name: str + :param status: Indicates if the given action rule is enabled or + disabled. Possible values include: 'Enabled', 'Disabled' + :type status: str or + ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param tags: tags to be updated + :type tags: object + :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: ActionRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.ActionRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + action_rule_patch = models.PatchObject(status=status, tags=tags) + + # Construct 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'), + 'actionRuleName': self._serialize.url("action_rule_name", action_rule_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(action_rule_patch, 'PatchObject') + + # 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]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ActionRule', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}'} diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/alerts_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_alerts_operations.py similarity index 81% rename from sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/alerts_operations.py rename to sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_alerts_operations.py index fd15f46bc817..7d0a9fa6d063 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/alerts_operations.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_alerts_operations.py @@ -11,6 +11,7 @@ import uuid from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError from .. import models @@ -18,11 +19,14 @@ class AlertsOperations(object): """AlertsOperations 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: API version. Constant value: "2018-05-05". + :ivar api_version: client API version. Constant value: "2019-05-05-preview". + :ivar identifier: Identification of the information to be retrieved by API call. Constant value: "MonitorServiceList". """ models = models @@ -32,15 +36,70 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-05-05" + self.api_version = "2019-05-05-preview" + self.identifier = "MonitorServiceList" self.config = config + def meta_data( + self, custom_headers=None, raw=False, **operation_config): + """List alerts meta data information based on value of identifier + parameter. + + :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: AlertsMetaData or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.AlertsMetaData or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.meta_data.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['identifier'] = self._serialize.query("self.identifier", self.identifier, '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('AlertsMetaData', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + meta_data.metadata = {'url': '/providers/Microsoft.AlertsManagement/alertsMetaData'} + def get_all( self, target_resource=None, target_resource_type=None, target_resource_group=None, monitor_service=None, monitor_condition=None, severity=None, alert_state=None, alert_rule=None, smart_group_id=None, include_context=None, include_egress_config=None, page_count=None, sort_by=None, sort_order=None, select=None, time_range=None, custom_time_range=None, custom_headers=None, raw=False, **operation_config): - """List all the existing alerts, where the results can be selective by - passing multiple filter parameters including time range and sorted on - specific fields. . + """List all existing alerts, where the results can be filtered on the + basis of multiple parameters (e.g. time range). The results can then be + sorted on the basis specific fields, with the default being + lastModifiedDateTime. . :param target_resource: Filter by target resource( which is full ARM ID) Default value is select all. @@ -51,21 +110,20 @@ def get_all( :param target_resource_group: Filter by target resource group name. Default value is select all. :type target_resource_group: str - :param monitor_service: Filter by monitor service which is the source - of the alert instance. Default value is select all. Possible values - include: 'Application Insights', 'ActivityLog Administrative', - 'ActivityLog Security', 'ActivityLog Recommendation', 'ActivityLog - Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' :type monitor_service: str or ~azure.mgmt.alertsmanagement.models.MonitorService - :param monitor_condition: Filter by monitor condition which is the - state of the monitor(alertRule) at monitor service. Default value is - to select all. Possible values include: 'Fired', 'Resolved' + :param monitor_condition: Filter by monitor condition which is either + 'Fired' or 'Resolved'. Default value is to select all. Possible values + include: 'Fired', 'Resolved' :type monitor_condition: str or ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param severity: Filter by severity. Defaut value is select all. + :param severity: Filter by severity. Default value is select all. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity :param alert_state: Filter by state of the alert instance. Default @@ -73,14 +131,14 @@ def get_all( 'Acknowledged', 'Closed' :type alert_state: str or ~azure.mgmt.alertsmanagement.models.AlertState - :param alert_rule: Filter by alert rule(monitor) which fired alert - instance. Default value is to select all. + :param alert_rule: Filter by specific alert rule. Default value is to + select all. :type alert_rule: str :param smart_group_id: Filter the alerts list by the Smart Group Id. Default value is none. :type smart_group_id: str - :param include_context: Include context which has data contextual to - the monitor service. Default value is false' + :param include_context: Include context which has contextual data + specific to the monitor service. Default value is false' :type include_context: bool :param include_egress_config: Include egress config which would be used for displaying the content in portal. Default value is 'false'. @@ -102,9 +160,9 @@ def get_all( others. Possible values include: 'asc', 'desc' :type sort_order: str :param select: This filter allows to selection of the fields(comma - seperated) which would be part of the the essential section. This - would allow to project only the required fields rather than getting - entire content. Default is to fetch all the fields in the essentials + separated) which would be part of the essential section. This would + allow to project only the required fields rather than getting entire + content. Default is to fetch all the fields in the essentials section. :type select: str :param time_range: Filter by time range by below listed values. @@ -128,8 +186,7 @@ def get_all( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.get_all.metadata['url'] @@ -192,6 +249,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -200,12 +262,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized get_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts'} @@ -259,7 +319,6 @@ def get_by_id( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Alert', response) @@ -272,7 +331,7 @@ def get_by_id( def change_state( self, alert_id, new_state, custom_headers=None, raw=False, **operation_config): - """Change the state of the alert. + """Change the state of an alert. :param alert_id: Unique ID of an alert instance. :type alert_id: str @@ -321,7 +380,6 @@ def change_state( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Alert', response) @@ -334,7 +392,9 @@ def change_state( def get_history( self, alert_id, custom_headers=None, raw=False, **operation_config): - """Get the history of the changes of an alert. + """Get the history of an alert, which captures any monitor condition + changes (Fired/Resolved) and alert state changes + (New/Acknowledged/Closed). :param alert_id: Unique ID of an alert instance. :type alert_id: str @@ -379,7 +439,6 @@ def get_history( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AlertModification', response) @@ -392,10 +451,13 @@ def get_history( def get_summary( self, groupby, include_smart_groups_count=None, target_resource=None, target_resource_type=None, target_resource_group=None, monitor_service=None, monitor_condition=None, severity=None, alert_state=None, alert_rule=None, time_range=None, custom_time_range=None, custom_headers=None, raw=False, **operation_config): - """Summary of alerts with the count each severity. + """Get a summarized count of your alerts grouped by various parameters + (e.g. grouping by 'Severity' returns the count of alerts for each + severity). - :param groupby: This parameter allows the result set to be aggregated - by input fields. For example, groupby=severity,alertstate. Possible + :param groupby: This parameter allows the result set to be grouped by + input fields (Maximum 2 comma separated fields supported). For + example, groupby=severity or groupby=severity,alertstate. Possible values include: 'severity', 'alertState', 'monitorCondition', 'monitorService', 'signalType', 'alertRule' :type groupby: str or @@ -412,21 +474,20 @@ def get_summary( :param target_resource_group: Filter by target resource group name. Default value is select all. :type target_resource_group: str - :param monitor_service: Filter by monitor service which is the source - of the alert instance. Default value is select all. Possible values - include: 'Application Insights', 'ActivityLog Administrative', - 'ActivityLog Security', 'ActivityLog Recommendation', 'ActivityLog - Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' :type monitor_service: str or ~azure.mgmt.alertsmanagement.models.MonitorService - :param monitor_condition: Filter by monitor condition which is the - state of the monitor(alertRule) at monitor service. Default value is - to select all. Possible values include: 'Fired', 'Resolved' + :param monitor_condition: Filter by monitor condition which is either + 'Fired' or 'Resolved'. Default value is to select all. Possible values + include: 'Fired', 'Resolved' :type monitor_condition: str or ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param severity: Filter by severity. Defaut value is select all. + :param severity: Filter by severity. Default value is select all. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity :param alert_state: Filter by state of the alert instance. Default @@ -434,8 +495,8 @@ def get_summary( 'Acknowledged', 'Closed' :type alert_state: str or ~azure.mgmt.alertsmanagement.models.AlertState - :param alert_rule: Filter by alert rule(monitor) which fired alert - instance. Default value is to select all. + :param alert_rule: Filter by specific alert rule. Default value is to + select all. :type alert_rule: str :param time_range: Filter by time range by below listed values. Default value is 1 day. Possible values include: '1h', '1d', '7d', @@ -510,7 +571,6 @@ def get_summary( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AlertsSummary', response) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_operations.py similarity index 87% rename from sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/operations.py rename to sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_operations.py index 9718bb4566f6..057900f678f2 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/operations.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_operations.py @@ -19,11 +19,13 @@ class Operations(object): """Operations 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: API version. Constant value: "2018-05-05". + :ivar api_version: client API version. Constant value: "2019-05-05-preview". """ models = models @@ -33,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-05-05" + self.api_version = "2019-05-05-preview" self.config = config @@ -52,8 +54,7 @@ def list( ~azure.mgmt.alertsmanagement.models.OperationPaged[~azure.mgmt.alertsmanagement.models.Operation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -78,6 +79,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -88,12 +94,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.AlertsManagement/operations'} diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py new file mode 100644 index 000000000000..2cc0b1152ea4 --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py @@ -0,0 +1,436 @@ +# 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 .. import models + + +class SmartDetectorAlertRulesOperations(object): + """SmartDetectorAlertRulesOperations 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: "2019-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-06-01" + + self.config = config + + def list( + self, expand_detector=None, custom_headers=None, raw=False, **operation_config): + """List all the existing Smart Detector alert rules within the + subscription. + + :param expand_detector: Indicates if Smart Detector should be + expanded. + :type expand_detector: bool + :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: An iterator like instance of AlertRule + :rtype: + ~azure.mgmt.alertsmanagement.models.AlertRulePaged[~azure.mgmt.alertsmanagement.models.AlertRule] + :raises: + :class:`ErrorResponse1Exception` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if expand_detector is not None: + query_parameters['expandDetector'] = self._serialize.query("expand_detector", expand_detector, 'bool') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AlertRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.alertsManagement/smartDetectorAlertRules'} + + def list_by_resource_group( + self, resource_group_name, expand_detector=None, custom_headers=None, raw=False, **operation_config): + """List all the existing Smart Detector alert rules within the + subscription and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param expand_detector: Indicates if Smart Detector should be + expanded. + :type expand_detector: bool + :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: An iterator like instance of AlertRule + :rtype: + ~azure.mgmt.alertsmanagement.models.AlertRulePaged[~azure.mgmt.alertsmanagement.models.AlertRule] + :raises: + :class:`ErrorResponse1Exception` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.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') + } + 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') + if expand_detector is not None: + query_parameters['expandDetector'] = self._serialize.query("expand_detector", expand_detector, 'bool') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AlertRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules'} + + def get( + self, resource_group_name, alert_rule_name, expand_detector=None, custom_headers=None, raw=False, **operation_config): + """Get a specific Smart Detector alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param alert_rule_name: The name of the alert rule. + :type alert_rule_name: str + :param expand_detector: Indicates if Smart Detector should be + expanded. + :type expand_detector: bool + :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: AlertRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.AlertRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponse1Exception` + """ + # 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'), + 'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_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') + if expand_detector is not None: + query_parameters['expandDetector'] = self._serialize.query("expand_detector", expand_detector, 'bool') + + # 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]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AlertRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules/{alertRuleName}'} + + def create_or_update( + self, resource_group_name, alert_rule_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or update a Smart Detector alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param alert_rule_name: The name of the alert rule. + :type alert_rule_name: str + :param parameters: Parameters supplied to the operation. + :type parameters: ~azure.mgmt.alertsmanagement.models.AlertRule + :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: AlertRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.AlertRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponse1Exception` + """ + # Construct URL + url = self.create_or_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'), + 'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_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(parameters, 'AlertRule') + + # 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, 201]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AlertRule', response) + if response.status_code == 201: + deserialized = self._deserialize('AlertRule', 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.alertsManagement/smartDetectorAlertRules/{alertRuleName}'} + + def patch( + self, resource_group_name, alert_rule_name, parameters, custom_headers=None, raw=False, **operation_config): + """Patch a specific Smart Detector alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param alert_rule_name: The name of the alert rule. + :type alert_rule_name: str + :param parameters: Parameters supplied to the operation. + :type parameters: + ~azure.mgmt.alertsmanagement.models.AlertRulePatchObject + :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: AlertRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.AlertRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponse1Exception` + """ + # Construct URL + url = self.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'), + 'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_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(parameters, 'AlertRulePatchObject') + + # 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]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AlertRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules/{alertRuleName}'} + + def delete( + self, resource_group_name, alert_rule_name, custom_headers=None, raw=False, **operation_config): + """Delete an existing Smart Detector alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param alert_rule_name: The name of the alert rule. + :type alert_rule_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:`ErrorResponse1Exception` + """ + # Construct URL + url = self.delete.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'), + 'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_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 = {} + 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.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules/{alertRuleName}'} diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/smart_groups_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_groups_operations.py similarity index 70% rename from sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/smart_groups_operations.py rename to sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_groups_operations.py index 8ff2c33ae120..bd4c0cfce5c1 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/smart_groups_operations.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_groups_operations.py @@ -18,11 +18,13 @@ class SmartGroupsOperations(object): """SmartGroupsOperations 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: API version. Constant value: "2018-05-05". + :ivar api_version: client API version. Constant value: "2019-05-05-preview". """ models = models @@ -32,15 +34,15 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-05-05" + self.api_version = "2019-05-05-preview" self.config = config def get_all( self, target_resource=None, target_resource_group=None, target_resource_type=None, monitor_service=None, monitor_condition=None, severity=None, smart_group_state=None, time_range=None, page_count=None, sort_by=None, sort_order=None, custom_headers=None, raw=False, **operation_config): - """Get all smartGroups within the subscription. + """Get all Smart Groups within a specified subscription. - List all the smartGroups within the specified subscription. . + List all the Smart Groups within a specified subscription. . :param target_resource: Filter by target resource( which is full ARM ID) Default value is select all. @@ -51,21 +53,20 @@ def get_all( :param target_resource_type: Filter by target resource type. Default value is select all. :type target_resource_type: str - :param monitor_service: Filter by monitor service which is the source - of the alert instance. Default value is select all. Possible values - include: 'Application Insights', 'ActivityLog Administrative', - 'ActivityLog Security', 'ActivityLog Recommendation', 'ActivityLog - Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' :type monitor_service: str or ~azure.mgmt.alertsmanagement.models.MonitorService - :param monitor_condition: Filter by monitor condition which is the - state of the monitor(alertRule) at monitor service. Default value is - to select all. Possible values include: 'Fired', 'Resolved' + :param monitor_condition: Filter by monitor condition which is either + 'Fired' or 'Resolved'. Default value is to select all. Possible values + include: 'Fired', 'Resolved' :type monitor_condition: str or ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param severity: Filter by severity. Defaut value is select all. + :param severity: Filter by severity. Default value is select all. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity :param smart_group_state: Filter by state of the smart group. Default @@ -82,7 +83,7 @@ def get_all( "includeContent" filter is selected, maximum value allowed is 25. Default value is 25. :type page_count: int - :param sort_by: Sort the query results by input field Default value + :param sort_by: Sort the query results by input field. Default value is sort by 'lastModifiedDateTime'. Possible values include: 'alertsCount', 'state', 'severity', 'startDateTime', 'lastModifiedDateTime' @@ -97,79 +98,89 @@ def get_all( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: SmartGroupsList or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.alertsmanagement.models.SmartGroupsList or - ~msrest.pipeline.ClientRawResponse + :return: An iterator like instance of SmartGroup + :rtype: + ~azure.mgmt.alertsmanagement.models.SmartGroupPaged[~azure.mgmt.alertsmanagement.models.SmartGroup] :raises: :class:`ErrorResponseException` """ - # Construct URL - url = self.get_all.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if target_resource is not None: - query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') - if target_resource_group is not None: - query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') - if target_resource_type is not None: - query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') - if monitor_service is not None: - query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') - if monitor_condition is not None: - query_parameters['monitorCondition'] = self._serialize.query("monitor_condition", monitor_condition, 'str') - if severity is not None: - query_parameters['severity'] = self._serialize.query("severity", severity, 'str') - if smart_group_state is not None: - query_parameters['smartGroupState'] = self._serialize.query("smart_group_state", smart_group_state, 'str') - if time_range is not None: - query_parameters['timeRange'] = self._serialize.query("time_range", time_range, 'str') - if page_count is not None: - query_parameters['pageCount'] = self._serialize.query("page_count", page_count, 'int') - if sort_by is not None: - query_parameters['sortBy'] = self._serialize.query("sort_by", sort_by, 'str') - if sort_order is not None: - query_parameters['sortOrder'] = self._serialize.query("sort_order", sort_order, 'str') - 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]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SmartGroupsList', response) - + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_all.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if target_resource is not None: + query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') + if target_resource_group is not None: + query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') + if target_resource_type is not None: + query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') + if monitor_service is not None: + query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') + if monitor_condition is not None: + query_parameters['monitorCondition'] = self._serialize.query("monitor_condition", monitor_condition, 'str') + if severity is not None: + query_parameters['severity'] = self._serialize.query("severity", severity, 'str') + if smart_group_state is not None: + query_parameters['smartGroupState'] = self._serialize.query("smart_group_state", smart_group_state, 'str') + if time_range is not None: + query_parameters['timeRange'] = self._serialize.query("time_range", time_range, 'str') + if page_count is not None: + query_parameters['pageCount'] = self._serialize.query("page_count", page_count, 'int') + if sort_by is not None: + query_parameters['sortBy'] = self._serialize.query("sort_by", sort_by, 'str') + if sort_order is not None: + query_parameters['sortOrder'] = self._serialize.query("sort_order", sort_order, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + header_dict = {} + deserialized = models.SmartGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized get_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups'} def get_by_id( self, smart_group_id, custom_headers=None, raw=False, **operation_config): - """Get information of smart alerts group. + """Get information related to a specific Smart Group. - Get details of smart group. + Get information related to a specific Smart Group. :param smart_group_id: Smart group unique id. :type smart_group_id: str @@ -213,9 +224,8 @@ def get_by_id( if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) - deserialized = None header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('SmartGroup', response) header_dict = { @@ -232,8 +242,7 @@ def get_by_id( def change_state( self, smart_group_id, new_state, custom_headers=None, raw=False, **operation_config): - """Change the state from unresolved to resolved and all the alerts within - the smart group will also be resolved. + """Change the state of a Smart Group. :param smart_group_id: Smart group unique id. :type smart_group_id: str @@ -281,9 +290,8 @@ def change_state( if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) - deserialized = None header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('SmartGroup', response) header_dict = { @@ -300,7 +308,8 @@ def change_state( def get_history( self, smart_group_id, custom_headers=None, raw=False, **operation_config): - """Get the history of the changes of smart group. + """Get the history a smart group, which captures any Smart Group state + changes (New/Acknowledged/Closed) . :param smart_group_id: Smart group unique id. :type smart_group_id: str @@ -345,7 +354,6 @@ def get_history( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SmartGroupModification', response) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py index e0ec669828cb..fda99682a9d1 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.0" +VERSION = "0.2.0rc1" diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py index 129b94c14ea7..899d78df4c87 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py @@ -53,6 +53,7 @@ version=version, description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), long_description=readme + '\n\n' + history, + long_description_content_type='text/x-rst', license='MIT License', author='Microsoft Corporation', author_email='azpysdkhelp@microsoft.com', @@ -63,7 +64,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', From f47afb849d7a43b94843019769251f8d647f9fcb Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 08:51:19 -0700 Subject: [PATCH 019/244] Synchronous username/password auth (#6416) --- .../azure-identity/azure/identity/__init__.py | 2 + .../azure/identity/_internal/__init__.py | 4 +- .../identity/_internal/msal_credentials.py | 98 +++++++++++------ .../azure/identity/constants.py | 4 + .../azure/identity/credentials.py | 100 +++++++++++++++--- .../azure-identity/tests/test_identity.py | 31 ++++++ .../tests/{helpers.py => keys_helpers.py} | 0 .../tests/test_challenge_auth.py | 2 +- .../tests/test_challenge_auth_async.py | 2 +- 9 files changed, 194 insertions(+), 49 deletions(-) rename sdk/keyvault/azure-keyvault-keys/tests/{helpers.py => keys_helpers.py} (100%) diff --git a/sdk/identity/azure-identity/azure/identity/__init__.py b/sdk/identity/azure-identity/azure/identity/__init__.py index 512b415a27ec..fd23d51c8e32 100644 --- a/sdk/identity/azure-identity/azure/identity/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/__init__.py @@ -8,6 +8,7 @@ ClientSecretCredential, EnvironmentCredential, ManagedIdentityCredential, + UsernamePasswordCredential, ) @@ -35,4 +36,5 @@ def __init__(self, **kwargs): "DefaultAzureCredential", "EnvironmentCredential", "ManagedIdentityCredential", + "UsernamePasswordCredential", ] diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index 9ea29a25784d..cfdf935b801c 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,5 +2,5 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from .msal_credentials import ConfidentialClientCredential -from .msal_transport_adapter import MsalTransportResponse, MsalTransportAdapter +from .msal_credentials import ConfidentialClientCredential, PublicClientCredential +from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/azure/identity/_internal/msal_credentials.py b/sdk/identity/azure-identity/azure/identity/_internal/msal_credentials.py index 9bf44cbb3219..83906bf71c2e 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/msal_credentials.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/msal_credentials.py @@ -5,35 +5,40 @@ """Credentials wrapping MSAL applications and delegating token acquisition and caching to them. This entails monkeypatching MSAL's OAuth client with an adapter substituting an azure-core pipeline for Requests. """ - +import abc import time +import msal +from azure.core.credentials import AccessToken +from azure.core.exceptions import ClientAuthenticationError + +from .msal_transport_adapter import MsalTransportAdapter + try: - from typing import TYPE_CHECKING -except ImportError: - TYPE_CHECKING = False + ABC = abc.ABC +except AttributeError: # Python 2.7, abc exists, but not ABC + ABC = abc.ABCMeta("ABC", (object,), {"__slots__": ()}) # type: ignore try: from unittest import mock except ImportError: # python < 3.3 import mock # type: ignore +try: + from typing import TYPE_CHECKING +except ImportError: + TYPE_CHECKING = False + if TYPE_CHECKING: # pylint:disable=unused-import - from typing import Any, Mapping, Optional, Union + from typing import Any, Mapping, Optional, Type, Union -from azure.core.credentials import AccessToken -from azure.core.exceptions import ClientAuthenticationError -import msal - -from .msal_transport_adapter import MsalTransportAdapter - -class MsalCredential(object): +class MsalCredential(ABC): """Base class for credentials wrapping MSAL applications""" - def __init__(self, client_id, authority, app_class, client_credential=None, **kwargs): - # type: (str, str, msal.ClientApplication, Optional[Union[str, Mapping[str, str]]], Any) -> None + def __init__(self, client_id, authority, client_credential=None, **kwargs): + # type: (str, str, Optional[Union[str, Mapping[str, str]]], Any) -> None self._authority = authority self._client_credential = client_credential self._client_id = client_id @@ -41,35 +46,35 @@ def __init__(self, client_id, authority, app_class, client_credential=None, **kw self._adapter = kwargs.pop("msal_adapter", None) or MsalTransportAdapter(**kwargs) # postpone creating the wrapped application because its initializer uses the network - self._app_class = app_class self._msal_app = None # type: Optional[msal.ClientApplication] - @property - def _app(self): + @abc.abstractmethod + def get_token(self, *scopes): + # type: (str) -> AccessToken + pass + + @abc.abstractmethod + def _get_app(self): # type: () -> msal.ClientApplication - """The wrapped MSAL application""" + pass - if not self._msal_app: - # MSAL application initializers use msal.authority to send AAD tenant discovery requests - with mock.patch("msal.authority.requests", self._adapter): - app = self._app_class( - client_id=self._client_id, client_credential=self._client_credential, authority=self._authority - ) + def _create_app(self, cls): + # type: (Type[msal.ClientApplication]) -> msal.ClientApplication + """Creates an MSAL application, patching msal.authority to use an azure-core pipeline during tenant discovery""" - # monkeypatch the app to replace requests.Session with MsalTransportAdapter - app.client.session = self._adapter - self._msal_app = app + # MSAL application initializers use msal.authority to send AAD tenant discovery requests + with mock.patch("msal.authority.requests", self._adapter): + app = cls(client_id=self._client_id, client_credential=self._client_credential, authority=self._authority) - return self._msal_app + # monkeypatch the app to replace requests.Session with MsalTransportAdapter + app.client.session = self._adapter + + return app class ConfidentialClientCredential(MsalCredential): """Wraps an MSAL ConfidentialClientApplication with the TokenCredential API""" - def __init__(self, **kwargs): - # type: (Any) -> None - super(ConfidentialClientCredential, self).__init__(app_class=msal.ConfidentialClientApplication, **kwargs) - def get_token(self, *scopes): # type: (str) -> AccessToken @@ -79,10 +84,37 @@ def get_token(self, *scopes): # First try to get a cached access token or if a refresh token is cached, redeem it for an access token. # Failing that, acquire a new token. - app = self._app # type: msal.ConfidentialClientApplication + app = self._get_app() result = app.acquire_token_silent(scopes, account=None) or app.acquire_token_for_client(scopes) if "access_token" not in result: raise ClientAuthenticationError(message="authentication failed: {}".format(result.get("error_description"))) return AccessToken(result["access_token"], now + int(result["expires_in"])) + + def _get_app(self): + # type: () -> msal.ConfidentialClientApplication + if not self._msal_app: + self._msal_app = self._create_app(msal.ConfidentialClientApplication) + return self._msal_app + + +class PublicClientCredential(MsalCredential): + """Wraps an MSAL PublicClientApplication with the TokenCredential API""" + + def __init__(self, **kwargs): + # type: (Any) -> None + super(PublicClientCredential, self).__init__( + authority="https://login.microsoftonline.com/" + kwargs.pop("tenant", "organizations"), **kwargs + ) + + @abc.abstractmethod + def get_token(self, *scopes): + # type: (str) -> AccessToken + pass + + def _get_app(self): + # type: () -> msal.PublicClientApplication + if not self._msal_app: + self._msal_app = self._create_app(msal.PublicClientApplication) + return self._msal_app diff --git a/sdk/identity/azure-identity/azure/identity/constants.py b/sdk/identity/azure-identity/azure/identity/constants.py index 5b50dd98625b..1c2608e5da8b 100644 --- a/sdk/identity/azure-identity/azure/identity/constants.py +++ b/sdk/identity/azure-identity/azure/identity/constants.py @@ -13,6 +13,10 @@ class EnvironmentVariables: AZURE_CLIENT_CERTIFICATE_PATH = "AZURE_CLIENT_CERTIFICATE_PATH" CERT_VARS = (AZURE_CLIENT_ID, AZURE_CLIENT_CERTIFICATE_PATH, AZURE_TENANT_ID) + AZURE_USERNAME = "AZURE_USERNAME" + AZURE_PASSWORD = "AZURE_PASSWORD" + USERNAME_PASSWORD_VARS = (AZURE_CLIENT_ID, AZURE_USERNAME, AZURE_PASSWORD) + MSI_ENDPOINT = "MSI_ENDPOINT" MSI_SECRET = "MSI_SECRET" diff --git a/sdk/identity/azure-identity/azure/identity/credentials.py b/sdk/identity/azure-identity/azure/identity/credentials.py index d53edf8e2c62..2e09a306aa71 100644 --- a/sdk/identity/azure-identity/azure/identity/credentials.py +++ b/sdk/identity/azure-identity/azure/identity/credentials.py @@ -6,6 +6,7 @@ Credentials for Azure SDK authentication. """ import os +import time from azure.core import Configuration from azure.core.credentials import AccessToken @@ -14,6 +15,7 @@ from ._authn_client import AuthnClient from ._base import ClientSecretCredentialBase, CertificateCredentialBase +from ._internal import PublicClientCredential from ._managed_identity import ImdsCredential, MsiCredential from .constants import Endpoints, EnvironmentVariables @@ -26,6 +28,7 @@ # pylint:disable=unused-import from typing import Any, Dict, Mapping, Optional, Union from azure.core.credentials import TokenCredential + EnvironmentCredentialTypes = Union["CertificateCredential", "ClientSecretCredential", "UsernamePasswordCredential"] # pylint:disable=too-few-public-methods @@ -96,23 +99,29 @@ def get_token(self, *scopes): class EnvironmentCredential: """ - Authenticates as a service principal using a client ID/secret pair or a certificate, - depending on environment variable settings. - - These environment variables are required: + Authenticates as a service principal using a client secret or a certificate, or as a user with a username and + password, depending on environment variable settings. Configuration is attempted in this order, using these + environment variables: + Service principal with secret: - **AZURE_CLIENT_ID**: the service principal's client ID + - **AZURE_CLIENT_SECRET**: one of the service principal's client secrets - **AZURE_TENANT_ID**: ID of the service principal's tenant. Also called its 'directory' ID. - Additionally, set **one** of these to configure client secret or certificate authentication: - - - **AZURE_CLIENT_SECRET**: one of the service principal's client secrets + Service principal with certificate: + - **AZURE_CLIENT_ID**: the service principal's client ID - **AZURE_CLIENT_CERTIFICATE_PATH**: path to a PEM-encoded certificate file including the private key + - **AZURE_TENANT_ID**: ID of the service principal's tenant. Also called its 'directory' ID. + + User with username and password: + - **AZURE_CLIENT_ID**: the application's client ID + - **AZURE_USERNAME**: a username (usually an email address) + - **AZURE_PASSWORD**: that user's password """ def __init__(self, **kwargs): # type: (Mapping[str, Any]) -> None - self._credential = None # type: Optional[Union[CertificateCredential, ClientSecretCredential]] + self._credential = None # type: Optional[EnvironmentCredentialTypes] if all(os.environ.get(v) is not None for v in EnvironmentVariables.CLIENT_SECRET_VARS): self._credential = ClientSecretCredential( @@ -128,6 +137,14 @@ def __init__(self, **kwargs): certificate_path=os.environ[EnvironmentVariables.AZURE_CLIENT_CERTIFICATE_PATH], **kwargs ) + elif all(os.environ.get(v) is not None for v in EnvironmentVariables.USERNAME_PASSWORD_VARS): + self._credential = UsernamePasswordCredential( + client_id=os.environ[EnvironmentVariables.AZURE_CLIENT_ID], + username=os.environ[EnvironmentVariables.AZURE_USERNAME], + password=os.environ[EnvironmentVariables.AZURE_PASSWORD], + tenant=os.environ.get(EnvironmentVariables.AZURE_TENANT_ID), # optional for username/password auth + **kwargs + ) def get_token(self, *scopes): # type (*str) -> AccessToken @@ -139,10 +156,7 @@ def get_token(self, *scopes): :raises: :class:`azure.core.exceptions.ClientAuthenticationError` """ if not self._credential: - message = "Missing environment settings. To authenticate with one of the service principal's client secrets, set {}. To authenticate with a certificate, set {}.".format( - ", ".join(EnvironmentVariables.CLIENT_SECRET_VARS), ", ".join(EnvironmentVariables.CERT_VARS) - ) - raise ClientAuthenticationError(message=message) + raise ClientAuthenticationError(message="Incomplete environment configuration.") return self._credential.get_token(*scopes) @@ -233,3 +247,65 @@ def _get_error_message(history): else: attempts.append(credential.__class__.__name__) return "No valid token received. {}".format(". ".join(attempts)) + + +class UsernamePasswordCredential(PublicClientCredential): + """ + Authenticates a user with a username and password. In general, Microsoft doesn't recommend this kind of + authentication, because it's less secure than other authentication flows. + + Authentication with this credential is not interactive, so it is **not compatible with any form of + multi-factor authentication or consent prompting**. The application must already have the user's consent. + + This credential can only authenticate work and school accounts; Microsoft accounts are not supported. + See this document for more information about account types: + https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/sign-up-organization + + :param str client_id: the application's client ID + :param str username: the user's username (usually an email address) + :param str password: the user's password + + **Keyword arguments:** + + *tenant (str)* - a tenant ID or a domain associated with a tenant. If not provided, the credential defaults to the + 'organizations' tenant. + """ + + def __init__(self, client_id, username, password, **kwargs): + # type: (str, str, str, Any) -> None + super(UsernamePasswordCredential, self).__init__(client_id=client_id, **kwargs) + self._username = username + self._password = password + + def get_token(self, *scopes): + # type (*str) -> AccessToken + """ + Request an access token for `scopes`. + + :param str scopes: desired scopes for the token + :rtype: :class:`azure.core.credentials.AccessToken` + :raises: :class:`azure.core.exceptions.ClientAuthenticationError` + """ + + # MSAL requires scopes be a list + scopes = list(scopes) # type: ignore + now = int(time.time()) + + app = self._get_app() + accounts = app.get_accounts(username=self._username) + result = None + for account in accounts: + result = app.acquire_token_silent(scopes, account=account) + if result: + break + + if not result: + # cache miss -> request a new token + result = app.acquire_token_by_username_password( + username=self._username, password=self._password, scopes=scopes + ) + + if "access_token" not in result: + raise ClientAuthenticationError(message="authentication failed: {}".format(result.get("error_description"))) + + return AccessToken(result["access_token"], now + int(result["expires_in"])) diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index b017792595a8..4e7fb13b4f6b 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -21,6 +21,7 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, + UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential from azure.identity.constants import EnvironmentVariables @@ -239,3 +240,33 @@ def test_imds_credential_retries(): def test_default_credential(): DefaultAzureCredential() + + +def test_username_password_credential(): + expected_token = "access-token" + transport = validating_transport( + requests=[Request()] * 2, # not validating requests because they're formed by MSAL + responses=[ + # expecting tenant discovery then a token request + mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), + mock_response( + json_payload={ + "access_token": expected_token, + "expires_in": 42, + "token_type": "Bearer", + "ext_expires_in": 42, + } + ), + ], + ) + + credential = UsernamePasswordCredential( + client_id="some-guid", + username="user@azure", + password="secret_password", + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + token = credential.get_token("scope") + assert token.token == expected_token diff --git a/sdk/keyvault/azure-keyvault-keys/tests/helpers.py b/sdk/keyvault/azure-keyvault-keys/tests/keys_helpers.py similarity index 100% rename from sdk/keyvault/azure-keyvault-keys/tests/helpers.py rename to sdk/keyvault/azure-keyvault-keys/tests/keys_helpers.py diff --git a/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth.py b/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth.py index 04ead0b933b1..13054cc0b1d2 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth.py @@ -18,7 +18,7 @@ from azure.keyvault.keys._shared import ChallengeAuthPolicy, HttpChallenge, HttpChallengeCache import pytest -from helpers import mock_response, Request, validating_transport +from keys_helpers import mock_response, Request, validating_transport def test_challenge_cache(): diff --git a/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py b/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py index c4d72b1c7550..27cda5f91d8e 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py @@ -19,7 +19,7 @@ from azure.keyvault.keys._shared import AsyncChallengeAuthPolicy, HttpChallenge, HttpChallengeCache import pytest -from helpers import async_validating_transport, mock_response, Request +from keys_helpers import async_validating_transport, mock_response, Request @pytest.mark.asyncio From 47c4a2af50608111c7bc56e9efb3cf6200748307 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 14:04:30 -0700 Subject: [PATCH 020/244] Synchronous interactive browser authentication (#6466) --- .../azure-identity/azure/identity/__init__.py | 2 + .../azure/identity/_internal/__init__.py | 1 + .../_internal/auth_code_redirect_handler.py | 75 +++++++++++ .../azure/identity/browser_auth.py | 121 ++++++++++++++++++ .../azure-identity/tests/test_identity.py | 73 ++++++++++- 5 files changed, 270 insertions(+), 2 deletions(-) create mode 100644 sdk/identity/azure-identity/azure/identity/_internal/auth_code_redirect_handler.py create mode 100644 sdk/identity/azure-identity/azure/identity/browser_auth.py diff --git a/sdk/identity/azure-identity/azure/identity/__init__.py b/sdk/identity/azure-identity/azure/identity/__init__.py index fd23d51c8e32..1df14dd617f5 100644 --- a/sdk/identity/azure-identity/azure/identity/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/__init__.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +from .browser_auth import InteractiveBrowserCredential from .credentials import ( CertificateCredential, ChainedTokenCredential, @@ -35,6 +36,7 @@ def __init__(self, **kwargs): "ClientSecretCredential", "DefaultAzureCredential", "EnvironmentCredential", + "InteractiveBrowserCredential", "ManagedIdentityCredential", "UsernamePasswordCredential", ] diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index cfdf935b801c..e7583139395b 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,5 +2,6 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +from .auth_code_redirect_handler import AuthCodeRedirectServer from .msal_credentials import ConfidentialClientCredential, PublicClientCredential from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/azure/identity/_internal/auth_code_redirect_handler.py b/sdk/identity/azure-identity/azure/identity/_internal/auth_code_redirect_handler.py new file mode 100644 index 000000000000..caaa9519033c --- /dev/null +++ b/sdk/identity/azure-identity/azure/identity/_internal/auth_code_redirect_handler.py @@ -0,0 +1,75 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +try: + from typing import TYPE_CHECKING +except ImportError: + TYPE_CHECKING = False + +if TYPE_CHECKING: + from typing import Any, Mapping, Optional + +try: + from http.server import HTTPServer, BaseHTTPRequestHandler +except ImportError: + from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler # type: ignore + +try: + from urllib.parse import parse_qs +except ImportError: + from urlparse import parse_qs # type: ignore + + +class AuthCodeRedirectHandler(BaseHTTPRequestHandler): + """HTTP request handler to capture the authentication server's response. + Largely from the Azure CLI: https://github.com/Azure/azure-cli/blob/dev/src/azure-cli-core/azure/cli/core/_profile.py + """ + + def do_GET(self): + if self.path.endswith("/favicon.ico"): # deal with legacy IE + self.send_response(204) + return + + query = self.path.split("?", 1)[-1] + query = parse_qs(query, keep_blank_values=True) + self.server.query_params = query + + self.send_response(200) + self.send_header("Content-Type", "text/html") + self.end_headers() + + self.wfile.write(b"Authentication complete. You can close this window.") + + def log_message(self, format, *args): # pylint: disable=redefined-builtin,unused-argument,no-self-use + pass # this prevents server dumping messages to stdout + + +class AuthCodeRedirectServer(HTTPServer): + """HTTP server that listens on localhost for the redirect request following an authorization code authentication""" + + query_params = {} # type: Mapping[str, Any] + + def __init__(self, port, timeout): + # type: (int, int) -> None + super(AuthCodeRedirectServer, self).__init__(("localhost", port), AuthCodeRedirectHandler) + self.timeout = timeout + + def wait_for_redirect(self): + # type: () -> Mapping[str, Any] + while not self.query_params: + try: + self.handle_request() + except ValueError: + # socket has been closed, probably by handle_timeout + break + + # ensure the underlying socket is closed (a no-op when the socket is already closed) + self.server_close() + + # if we timed out, this returns an empty dict + return self.query_params + + def handle_timeout(self): + """Break the request-handling loop by tearing down the server""" + self.server_close() diff --git a/sdk/identity/azure-identity/azure/identity/browser_auth.py b/sdk/identity/azure-identity/azure/identity/browser_auth.py new file mode 100644 index 000000000000..82460513092d --- /dev/null +++ b/sdk/identity/azure-identity/azure/identity/browser_auth.py @@ -0,0 +1,121 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +import socket +import time +import uuid +import webbrowser + +try: + from typing import TYPE_CHECKING +except ImportError: + TYPE_CHECKING = False + +if TYPE_CHECKING: + from typing import Any, List, Mapping + +from azure.core.credentials import AccessToken +from azure.core.exceptions import ClientAuthenticationError + +from ._internal import AuthCodeRedirectServer, ConfidentialClientCredential + + +class InteractiveBrowserCredential(ConfidentialClientCredential): + """ + Authenticates a user through the authorization code flow. This is an interactive flow: ``get_token`` opens a + browser to a login URL provided by Azure Active Directory, and waits for the user to authenticate there. + + Azure Active Directory documentation describes the authorization code flow in more detail: + https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-protocols-oauth-code + + :param str client_id: the application's client ID + :param str secret: one of the application's client secrets + + **Keyword arguments:** + + *tenant (str)* - a tenant ID or a domain associated with a tenant. If not provided, the credential defaults to the + 'organizations' tenant, which can authenticate work or school accounts. + *timeout (str)* - seconds to wait for the user to complete authentication. Defaults to 300 (5 minutes). + """ + + def __init__(self, client_id, client_secret, **kwargs): + # type: (str, str, Any) -> None + self._timeout = kwargs.pop("timeout", 300) + self._server_class = kwargs.pop("server_class", AuthCodeRedirectServer) # facilitate mocking + authority = "https://login.microsoftonline.com/" + kwargs.pop("tenant", "organizations") + super(InteractiveBrowserCredential, self).__init__( + client_id=client_id, client_credential=client_secret, authority=authority, **kwargs + ) + + def get_token(self, *scopes): + # type: (str) -> AccessToken + """ + Request an access token for `scopes`. This will open a browser to a login page and listen on localhost for a + request indicating authentication has completed. + + :param str scopes: desired scopes for the token + :rtype: :class:`azure.core.credentials.AccessToken` + :raises: :class:`azure.core.exceptions.ClientAuthenticationError` + """ + + # start an HTTP server on localhost to receive the redirect + for port in range(8400, 9000): + try: + server = self._server_class(port, timeout=self._timeout) + redirect_uri = "http://localhost:{}".format(port) + break + except socket.error: + continue # keep looking for an open port + + if not redirect_uri: + raise ClientAuthenticationError(message="Couldn't start an HTTP server on localhost") + + # get the url the user must visit to authenticate + scopes = list(scopes) # type: ignore + request_state = str(uuid.uuid4()) + app = self._get_app() + auth_url = app.get_authorization_request_url(scopes, redirect_uri=redirect_uri, state=request_state) + + # open browser to that url + webbrowser.open(auth_url) + + # block until the server times out or receives the post-authentication redirect + response = server.wait_for_redirect() + if not response: + raise ClientAuthenticationError( + message="Timed out after waiting {} seconds for the user to authenticate".format(self._timeout) + ) + + # redeem the authorization code for a token + code = self._parse_response(request_state, response) + now = int(time.time()) + result = app.acquire_token_by_authorization_code(code, scopes=scopes, redirect_uri=redirect_uri) + + if "access_token" not in result: + raise ClientAuthenticationError(message="Authentication failed: {}".format(result.get("error_description"))) + + return AccessToken(result["access_token"], now + int(result["expires_in"])) + + def _parse_response(self, request_state, response): + # type: (str, Mapping[str, Any]) -> List[str] + """ + Validates ``response`` and returns the authorization code it contains, if authentication succeeded. Raises + :class:`azure.core.exceptions.ClientAuthenticationError`, if authentication failed or ``response`` is malformed. + """ + + if "error" in response: + message = "Authentication failed: {}".format(response.get("error_description") or response["error"]) + raise ClientAuthenticationError(message=message) + if "code" not in response: + # a response with no error or code is malformed; we don't know what to do with it + message = "Authentication server didn't send an authorization code" + raise ClientAuthenticationError(message=message) + + # response must include the state sent in the auth request + if "state" not in response: + raise ClientAuthenticationError(message="Authentication response doesn't include OAuth state") + if response["state"][0] != request_state: + raise ClientAuthenticationError(message="Authentication response's OAuth state doesn't match the request's") + + return response["code"] diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 4e7fb13b4f6b..3aaa54a1f28f 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -2,15 +2,16 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +import functools import json import os import time import uuid try: - from unittest.mock import Mock + from unittest.mock import Mock, patch except ImportError: # python < 3.3 - from mock import Mock + from mock import Mock, patch import pytest from azure.core.credentials import AccessToken @@ -21,6 +22,7 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, + InteractiveBrowserCredential, UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential @@ -242,6 +244,73 @@ def test_default_credential(): DefaultAzureCredential() +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential(): + oauth_state = "state" + expected_token = "access-token" + + transport = validating_transport( + requests=[Request()] * 2, # not validating requests because they're formed by MSAL + responses=[ + # expecting tenant discovery then a token request + mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), + mock_response( + json_payload={ + "access_token": expected_token, + "expires_in": 42, + "token_type": "Bearer", + "ext_expires_in": 42, + } + ), + ], + ) + + # mock local server fakes successful authentication by immediately returning a well-formed response + auth_code_response = {"code": "authorization-code", "state": [oauth_state]} + server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + # ensure the request beginning the flow has a known state value + with patch("azure.identity.browser_auth.uuid.uuid4", lambda: oauth_state): + token = credential.get_token("scope") + assert token.token == expected_token + + +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential_timeout(): + # mock transport handles MSAL's tenant discovery + transport = Mock( + send=lambda _, **__: mock_response( + json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"} + ) + ) + + # mock local server blocks long enough to exceed the timeout + timeout = 1 + server_instance = Mock(wait_for_redirect=functools.partial(time.sleep, timeout + 1)) + server_class = Mock(return_value=server_instance) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + timeout=timeout, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + with pytest.raises(ClientAuthenticationError) as ex: + credential.get_token("scope") + assert "timed out" in ex.value.message.lower() + + def test_username_password_credential(): expected_token = "access-token" transport = validating_transport( From f8e53a61d728844220e748af8a58575d30809c59 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Tue, 30 Jul 2019 16:27:05 -0700 Subject: [PATCH 021/244] we dont need thread locks (#6551) --- .../azure-core/azure/core/tracing/context.py | 38 +++++-------------- .../azure-core/tests/test_tracing_context.py | 11 ++---- 2 files changed, 13 insertions(+), 36 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/context.py b/sdk/core/azure-core/azure/core/tracing/context.py index a00f88f2d854..f8761cd71502 100644 --- a/sdk/core/azure-core/azure/core/tracing/context.py +++ b/sdk/core/azure-core/azure/core/tracing/context.py @@ -29,8 +29,8 @@ class ContextProtocol(Protocol): Implements set and get variables in a thread safe way. """ - def __init__(self, name, default, lock): - # type: (string, Any, threading.Lock) -> None + def __init__(self, name, default): + # type: (string, Any) -> None pass def clear(self): @@ -54,11 +54,10 @@ class _AsyncContext(object): Uses contextvars to set and get variables globally in a thread safe way. """ - def __init__(self, name, default, lock): + def __init__(self, name, default): self.name = name self.contextvar = contextvars.ContextVar(name) self.default = default if callable(default) else (lambda: default) - self.lock = lock def clear(self): # type: () -> None @@ -78,8 +77,7 @@ def get(self): def set(self, value): # type: (Any) -> None """Set the value in the context.""" - with self.lock: - self.contextvar.set(value) + self.contextvar.set(value) class _ThreadLocalContext(object): @@ -88,11 +86,10 @@ class _ThreadLocalContext(object): """ _thread_local = threading.local() - def __init__(self, name, default, lock): - # type: (str, Any, threading.Lock) -> None + def __init__(self, name, default): + # type: (str, Any) -> None self.name = name self.default = default if callable(default) else (lambda: default) - self.lock = lock def clear(self): # type: () -> None @@ -112,16 +109,14 @@ def get(self): def set(self, value): # type: (Any) -> None """Set the value in the context.""" - with self.lock: - setattr(self._thread_local, self.name, value) + setattr(self._thread_local, self.name, value) -class TracingContext: - _lock = threading.Lock() - +class TracingContext(object): def __init__(self): # type: () -> None - self.current_span = TracingContext._get_context_class("current_span", None) + context_class = _AsyncContext if contextvars else _ThreadLocalContext + self.current_span = context_class("current_span", None) def with_current_context(self, func): # type: (Callable[[Any], Any]) -> Any @@ -146,17 +141,4 @@ def call_with_current_context(*args, **kwargs): return call_with_current_context - @classmethod - def _get_context_class(cls, name, default_val): - # type: (str, Any) -> ContextProtocol - """ - Returns an instance of the the context class that stores the variable. - :param name: The key to store the variable in the context class - :param default_val: The default value of the variable if unset - :return: An instance that implements the context protocol class - """ - context_class = _AsyncContext if contextvars else _ThreadLocalContext - return context_class(name, default_val, cls._lock) - - tracing_context = TracingContext() diff --git a/sdk/core/azure-core/tests/test_tracing_context.py b/sdk/core/azure-core/tests/test_tracing_context.py index 59aa2c8a8b60..984d2ad480d3 100644 --- a/sdk/core/azure-core/tests/test_tracing_context.py +++ b/sdk/core/azure-core/tests/test_tracing_context.py @@ -34,19 +34,14 @@ def __exit__(self, exc_type, exc_val, exc_tb): class TestContext(unittest.TestCase): - def test_get_context_class(self): - with ContextHelper(): - slot = tracing_context._get_context_class("temp", 1) - assert slot.get() == 1 - slot.set(2) - assert slot.get() == 2 - def test_current_span(self): with ContextHelper(): - assert tracing_context.current_span.get() is None + assert not tracing_context.current_span.get() val = mock.Mock(spec=AbstractSpan) tracing_context.current_span.set(val) assert tracing_context.current_span.get() == val + tracing_context.current_span.clear() + assert not tracing_context.current_span.get() def test_with_current_context(self): with ContextHelper(tracer_to_use=mock.Mock(AbstractSpan)): From de663f26a59573eb9dc0170e9982194d586d1410 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Tue, 30 Jul 2019 20:19:31 -0700 Subject: [PATCH 022/244] KV aiohttp by default (#6563) * Aiohttp default async transport * Record keys with aiohttp * Record secrets with aiohttp --- .../keys/_shared/async_client_base.py | 11 +- .../tests/keys_async_preparer.py | 16 +- .../test_keys_async.test_backup_restore.yaml | 294 +- ...t_keys_async.test_key_crud_operations.yaml | 886 ++--- .../test_keys_async.test_key_list.yaml | 522 ++- ...t_keys_async.test_key_wrap_and_unwrap.yaml | 354 +- ...est_keys_async.test_list_deleted_keys.yaml | 922 +++-- .../test_keys_async.test_list_versions.yaml | 520 ++- .../test_keys_async.test_purge.yaml | 1946 +++++----- .../test_keys_async.test_recover.yaml | 3248 +++++++---------- ...sync.test_example_key_crud_operations.yaml | 472 +-- ...sync.test_example_key_list_operations.yaml | 690 ++-- ...sync.test_example_keys_backup_restore.yaml | 294 +- ..._keys_async.test_example_keys_recover.yaml | 670 ++-- .../secrets/_shared/async_client_base.py | 9 +- ...c.test_example_secret_crud_operations.yaml | 340 +- ...c.test_example_secret_list_operations.yaml | 619 ++-- ...c.test_example_secrets_backup_restore.yaml | 337 +- ...ts_async.test_example_secrets_recover.yaml | 700 ++-- ...est_secrets_async.test_backup_restore.yaml | 281 +- ...crets_async.test_list_deleted_secrets.yaml | 945 ++--- ...test_secrets_async.test_list_versions.yaml | 507 ++- .../test_secrets_async.test_purge.yaml | 2032 +++++------ .../test_secrets_async.test_recover.yaml | 2956 +++++++-------- ...ets_async.test_secret_crud_operations.yaml | 459 ++- .../test_secrets_async.test_secret_list.yaml | 507 ++- .../tests/secrets_async_preparer.py | 16 +- 27 files changed, 9104 insertions(+), 11449 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 0714edabf420..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport +from azure.core.pipeline.transport import AsyncHttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient @@ -64,7 +64,7 @@ def __init__( self, vault_url: str, credential: "TokenCredential", - transport: HttpTransport = None, + transport: AsyncHttpTransport = None, api_version: str = None, **kwargs: Any ) -> None: @@ -91,7 +91,7 @@ def __init__( self._client = KeyVaultClient(credential, api_version=api_version, pipeline=pipeline, aio=True) @staticmethod - def _build_pipeline(config: Configuration, transport: HttpTransport, **kwargs: Any) -> AsyncPipeline: + def _build_pipeline(config: Configuration, transport: AsyncHttpTransport, **kwargs: Any) -> AsyncPipeline: policies = [ config.headers_policy, config.user_agent_policy, @@ -100,11 +100,12 @@ def _build_pipeline(config: Configuration, transport: HttpTransport, **kwargs: A config.retry_policy, config.authentication_policy, config.logging_policy, - DistributedTracingPolicy() + DistributedTracingPolicy(), ] if transport is None: - transport = AsyncioRequestsTransport(**kwargs) + from azure.core.pipeline.transport import AioHttpTransport + transport = AioHttpTransport(**kwargs) return AsyncPipeline(transport, policies=policies) diff --git a/sdk/keyvault/azure-keyvault-keys/tests/keys_async_preparer.py b/sdk/keyvault/azure-keyvault-keys/tests/keys_async_preparer.py index a232358ec959..4db357acc42b 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/keys_async_preparer.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/keys_async_preparer.py @@ -6,17 +6,31 @@ from unittest.mock import Mock from azure.core.credentials import AccessToken +from azure.core.pipeline.transport import AioHttpTransport from azure.identity.aio import EnvironmentCredential +from multidict import CIMultiDict, CIMultiDictProxy + from keys_preparer import VaultClientPreparer from keys_vault_client_async import VaultClient +class AiohttpTestTransport(AioHttpTransport): + """Workaround to vcrpy bug: https://github.com/kevin1024/vcrpy/pull/461 + """ + async def send(self, request, **config): + response = await super(AiohttpTestTransport, self).send(request, **config) + if not isinstance(response.headers, CIMultiDictProxy): + response.headers = CIMultiDictProxy(CIMultiDict(response.internal_response.headers)) + response.content_type = response.headers.get("content-type") + return response + + class AsyncVaultClientPreparer(VaultClientPreparer): def create_vault_client(self, vault_uri): if self.is_live: credential = EnvironmentCredential() else: credential = Mock(get_token=asyncio.coroutine(lambda _: AccessToken("fake-token", 0))) - return VaultClient(vault_uri, credential) + return VaultClient(vault_uri, credential, transport=AiohttpTestTransport()) diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_backup_restore.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_backup_restore.yaml index 1bdab8917b58..38a47ce653ba 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_backup_restore.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_backup_restore.yaml @@ -4,256 +4,202 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:51 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:49:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault4e00e7f.vault.azure.net + - /keys/keybak4e00e7f/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/54248fddc148400a9df744075bbfe2e8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lsgBFBFSUvohGWs21xzMCFc1IRDfnH0UlZ8aJnqVozFkc9rZgaBdr5IOVmt41hxbJY2MWuJxGpS4xAZ8AmrQZ1MOmS7nUiMmorcyqZZIcZYz3P7YXLjiv-ncb9rTty7IJ2R9v111Beiq3tNdHUrQYUt1wiysQPcPk69FGq7h4B5UqDM4SHQqXF-Rm3R2fU9wct7bx3F2XqYcaMmQWZBiYMH8vbooZWyh2QziCXVB2MhfBt0gTfoLUGT4hheDyLfIgbhhky6Hi0DC-3Ecll3tlK6JHAR6V1jLxJveWPgUy2WgRMSTATWdlcYL_i9Ji9OT4dSLkCFqXWhRN8krxXf9dw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/6335121a5c4e43919f25f6688e470924","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zPfZm_2ZxRIlx2K1MjSGUuBBpyaJjU_gk2yp9T9Ow8bvac_t6RgXTmsdK-4x27G4h1XjY0QVXkuJwnNxrUbSwrrNsxJtaz-KyCpetoPLcAEp4-EbEF2w-Q5fAPB76ngr-RKlHUv6fww8rfWWRxKb-GmtmYAq_BsUG7Ci1ALoF3dIxKyEpqueY0TeWofWxUKpftXLyjAIcuBVRO5UVSUv1bSfLl1mzm5Wxl6pk6G_BtAi9cn6TS7DERSSEilg_Raz53fCXt5MaoFnDpT5oRIl5E2ZaxaLJ2KwLxoZERB4oZ2vPGgjr8MocaOGY66xwVKZQJKttZmDy-7pUKWMxoBG4w","e":"AQAB"},"attributes":{"enabled":true,"created":1564526988,"updated":1564526988,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '648' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '648' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:49:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault4e00e7f.vault.azure.net + - /keys/keybak4e00e7f/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/backup?api-version=7.0 response: body: - string: '{"value":"JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmFvY0lxQ1Z1WFpwOTZLSTZQdmVlbENFZlMzeVl4ZC1yRm5rZkNTcmdXUVlwU2tzUGVpTmJENFZuVEdEbGR6dE1GRlZ5SGdMRHVwb2VJWDlIU3ExTEQ3MVFSNWpYQUE2aUZpendrLTYxbkJ5ZFY1SEVLcHFpdjJwckp0T0FRTlQwZmpsWlJadzBiSG9zSldIenF6SDZXZktQT25pOS1GTm1TV0xvZFF1cE84WGU2bC1PN1RoWVlhc3hoLXJNN3M4QUJrekZEUkVPUm5rTnczMVJ6SDAyQjJhOGk2R3VfcUVtbTdvUDdOTnJRaTJfRGJ6YnZBOFROdHBwU1gwbnc1c2ZnaWVFWmUxTmZwVXNSZDcxMmd4YWxWNUpuWklJaDAxcnF4ZUVZaVRRNlhxdXhPbkZJd1RaTTV6WTZSSVJ4QW5rTk8zb0pMUjlkSTU1cG02ZVlxMnFoZy5DUnVlaDRPYncwWGVkMXY3TU9GSVNnLlZRVXdIMno3UWV3SXJZN0kwSXhEU2h6Y0FLQmlKdThBVFVTQWZvUTBfd3J4WEZBNkxyOGlhM0k3clFMYm15X1hLbjNwa3FFR3VnVHZlTm9BenVmaDJNR1pHV1ZtOUJibGhCV0Z1OTZUS0s4cVRqOHJHUHpaZHB0MHpsSlloOTc1S3hZSnljNkdpNExzMVVqVDAzaExEcXVpYm9SMkZpNk9oZFRQQ2p5MXd3OXlNLUhKREswUHdzSUw1VW41YXFGaTMxUW52VlVja20tZUVNRFlJRWwyeTNtang0SmtVS2Rtc3FudzYtckRRcmd1OHFxV09NNXpDaFVKRW82dkQ1bnVCLWNLa2hJS0JPOEItM3RVbnQ0bjBQWldGSzhDaW0yb0dyV1JNZWtjSGxYdFp2Z2M0OHhVRVdQdjBhQ1l5QlhzOTlac29DN2ZRd3JIUllYdzZXNTFycUJqcTA4ckt2YWhTaVBxb2dkMmNfLTB0VVlOQ1BUWnBrcjVzanA2TTVvZUZlTG1KOURlUnVES3I3bWg0eTc5UndWam9xZ1JGdlptbmVBcmY3Wi1USmZydmlLZ3lLUjlUdjN5ZFVjNzI3aGJMTGQ5NC1LNFduMU41NE9paUtRNmJEbjRoWTd6a283aTdHV2s3NmdXWlRrRGFlVTFtaDgwQUE0UGEySXNsNXMtaXNuZkYwVTFXNXh6WUZaWWVYUnlNSDZkcUpHYm81RDBnNzZhdHdvTjg4eEZlNXNDVEpYQjBnQTBRUUNRNWRlX0E4WS1rcGFWakpKNDJPQ1NEX3RkWWR4a3JDOVZwZ1FlM0Q3ZzA3QmdqVlU4aHdFZTVkTzR2QmlRekdxcGtxX1lqWkRzSTcwWkFWYlk2UTE4QjRoWnJFd3VUZEs0QVdfS3Q4YmZiYVVuQlE3d2Z4cnJ0SldZeko4eUJaaFNOV201MThfekRoMmdYLTBuNjViMm5rUlVFckszWXBEVEpMZ0RZMnk5dGtETkdHX1dJUURIWkNiV3dDRDBTbDBheHdybWxHYmYxWS1heEhudHQtd214ODROZ09DcllEZU1SUnVkbjhScWlKSXF6d3I5N1JEU1pQMGx6dVZ5Y2xMX2RRSmdTYmtrRjVTdWdZbHotOFkyN2wybWV6VldrTDgxZ2w5enVMb0RiNmFMalA5WFBqdjV0WjZsOXF1azZCcjF0X3pBTVpadzNjUGZXOUVXa2hOdGNNbEZITXBYMlFkUTd5enVQSzJEb3V3bzVWV3gzQUFTelJCb3FJQmhIZEZLUWgzNUVFQlhHcEprcG9USzktTWhINkw4Tmd1dl9MVHJQNnBlOXBvS2otTjVha1VtUWtDY3ViTGRSUjQxcnFUeXNoYUl5WHBEYnVQZ19pbUF1eWpTLWR4VlZwb0Z1bXIyMk1aMFgyRTN5R0piZGg4cjVBTk1mM2lwZUNDdThOeF9VWUxubGFqczlMR3M2bVBneEktUFY4ZHBoUUxwa2dfM1FYR2xLOHcwcTVJMU1uMFNlc1R5NGJiMG12N0ZDdUYySzFKYXR4SGJqY0FFcmlpbm9QTk1yYUt4X29Kb1k0cVc0R09rYUFkQjA3MTBnZUJuYnBXcENuOGJNWkJ4RUZHNE1XU1lfbmV0cHFDVUhUZlQ2S2QwRzU4LUZQUHpxY05naXNGMUVuY1VhU0IxTVJ0YXVPMV9rSHgzT0RPNEhfSm5nYnd2bFRENWdXcjRpU1VYYldSdWQ0ak9YNXhJYkY0NzVyeGUxa2RNc1pORWhkZTVHbU1aQm9lSUd5VEM5bDJpTXNMQzFmdXp3YjU2SVczVlRmTzlTazVqOUN1RUdsMlVGcGd3N011U0laQ1VhSWZId3V2bEpXUXp4QlkwaG9xdEtSSjRQT1dWU2FhRWJ5OUdMa1VUSmFEV0p0YWFfc2x2UkVnb1E1WFFWeC1oUHZaWFczWDJlc1JsanJtQXZnVGJFWDQ5NUpJbUNsZTByaU1adjlETE9OS0k0a2NzUU12cGNsaUpQWHhsUE11X1dfZ2RBejExdHM2RUNGY2lVdHJOU1RMU19Qb0dqSlRSa2lEcERYSFBFSWpoaVp2X2xES0NUMjF4b0VsUE9kekk3OTYtNGpaYUUtbFBxOFpmTjdzQ19iRUxtdW92TjZIOS1yQ2oyc3BuczhLSDZzQXliZDBFNmxjTU42UHlCRWJWazU1R3V3UWNrLUNjaDA0M0l2OTJVVmZsNmJROUJsc1ZjenFoMlVGV3Y4SC1qaHVFeF9XNHZidFhHRVdsSDVSRDdEWlUwRmNCbkprQW5senF0d0tnMy00UGg1bHhTSWppWVJpdTRKZzg5clRuLXZIZUZnc0hBWF91TDFjM2xSZkd6MmVtQ202Z0RrNVVKdHZSWGtmUHREUGVHckp0SVlTRExqWjduaTlpRXl5X1JFVDR0T3NEX0R2N3hieXZ5SHFHUzZOa0JLRUkwY0g4OWpTVllVaGRxZk9hMUhqUU42OW8wRmt3OHE1TG51c2NXSW40UFVyajBYOGd5c3RIMWVha1ViSU9mRm05RWtzdzh0a1Z3S1g2LVlMbHktUS1mTlpwVXF1Mm9HbkxOcmV1dmhoWkJHdnJzQ0pzUVF0NHRjTWNwakc1dmVRd2RQT2l2R0tRUmVCOE9MazJCR2RlZGZXeVlyRGk2d2ZUclJ4VjZyb2tWUlpvVk85dTd6ZjkxWl9fMHZaRlFSN2ZubE5DVHpEM1dpOWdUUEZJaThFekdfS3BiRHNmRkRNN1lCeGx6SWNkeDdLZW9aZXhHRXpUdDR6T2JfTUllWTFGWkpFbDdJRUxxUWJydXhFMjBURVYyYi1VaWJvWWpvU3hRVUNZLTg4TmJ2czZCWWF4NGs2eU9yU3ByVVg1OXNNcVFPd25uMWRZUlFaeHZ3WGh0U3pWS2d2OGtzYkNvd0RHRW5pb0cxaUJKa2NDR2tlbUxPRzlMb2xpOWxRVDJVRlpBR0VzZXp1S0h3endPOGprRkEzODk5V1JXWHBqVFRuaEN6Wkdqd2JRN3BESUVBWFhyakIxZmJ1LUZhU2VYUGVhS2VkZDdMUy12LThJaTJFaXVLcUdIaWttV3MzaVJQNTNTN0VkNlhtMHJydHpSVE10RlJ5LUdQOXlWWlNiR3JyN2lFZ2YtMFhLT3ZPZ1FrQlo5enFua1FIM09rZVlfRHlNQVJqSEdkbTRIYnQ3d0VrZjM3MHJ5M2JVNTlud1ljWEI1b1l6YUQ5STVxM0Zmc09yTWhlN3hIVDZxZWRqbXlYRHNqdi1DQmJVYUVpc1lPTmFUUW5TbF8tRjhBZU4yajJrYmtCSl9tYzBSa1BncHA3cjZJQVRCRHg5dkd0ZjZkcTRpcndybWY4MV9SM1dfQ2ZhMmZlZWtzUDBFVjB0THVUVGloM0lEUlR0eU80MjVEQ0pCSm5BVGNkc0tPOVhuTDl2NGlMbG1Bd1E2S2U2Y1N0cTNTelNNUXhLUDI4TnlXS2lKV3NLemlMZ3ZGV21zQWQ3TG5Gd1dzWUFRa1ZidjR1WlZVYXhIaWJ4OUEzZGhsZFV5cHBEaUxlcWswck12U0JnTHNZVWk5SXJHbkdfSDdISzY5bU5CS2lNel9abDdBMjBLbFlJdlRVaUFBbnFLQi1kdnlCdmNVN3l6bzkxY2l4dUVidnNtYkNFUy16WVo0MUNLWGoyZ3BTZEdlUDRBVHhOYnV1eDdZWkFPUnlFamdHYmlJS3dUN1ViU0ROcEZEeml1eHBVby1jZmxabjlZZTNNcHFlLUI2NXF1RElxcDNvelJvdGt2SzVCcUpXMkRnTEVvUjBKZTNxb0gxVVJTT3Q5MlY3bmttSWRrUWloMURuUkttSEczQUUxS2YxUS1fRFJGSmJxTkozRklFYl9ONVlMT2hGaldmN2p5ZG92WEVqUnhvYWl3ODJOR0tHZTBOZDRhNW5JanhHbWhuRkpVVkxEajhnZHNyNG9ueTR3RWtsVnVqdG1DU1prb2VSRm9tQmtfNjlEY0pFbVl3U2hlY1JJdktxeWJ5MWx2VlNWTTZuSlpPam9FSEE1clNBVGxHQ2VxbEdWaVB1YVZGdXhmOGs3S0FwcGVFMzI1aVJXVzRhU1FHeE5NVjNWWHpIa2dZRjg3UldnLWNWNDI5M0ptSC1IOTlmT09Ic3JiVW9oaFRIS0E0MFMzV3kyTWc2anllQ1Jldko0SXhYVWVZclJVcVhBWnVOalgyM2pZcExKYTk2bkoyZEwzcHRiMW1WNF9vWnM1eG5pRjhmdEFEcTZfTDZFV3dRdHdfS0pDVkE3a3dGZHBOaFM4YU56V1g3d0ltNndRQ3lsTC1jTHQzSm9EX0ZtWmhfeEhmOFludFRUUFpwaVZyc0dpRlFKRE1YSk9OQ0FEekFlbk52cFVUMTIwaEtiX3BEUjdDa2RLbThQb0t6ZWU1UzhaN0h0NTZjYWltOF9ZSXZJLURZdWFuOTJ0ZXgySk9Ca0paV2p1Mk1LZHVOUDd3UzQ1dWZhTHZyT3dKSlRRQTk3eHNnVERXejN2WGJmSTVCX2VHMzVJVG9RX3EydXJOMlBfb2NlN2FRVU1mTkpzcHNQeTBkckVfekFoUW9QclVPNk1uU0dlS3NrRVAybHJzU2dhNUpsTUZyclVNNVdtMUREcW9oWnFqTDZPeXlPVFVvUXRrQ0dQUlVTM1lmbVFJcVpQV01NSG1wbXlwZUdiX0xSVDJXQm1hSFFOUVhfdVNWVG1LUWIxbDBJa1R0eEFNQmQ2NzNTQUJNVVllQ01zUWlXRWdxT1dBbVk3MjZWeWhneFg1bjMycEV5d2x0cXFGLUd2djlUMm82blFQRnVrWmNSc3c3TGROREx4V2hkMHVyTHFneDVyQkh4QXV4NlllaE9QYV9sYVR6WUVwUFhGSm5yR1c3LXpsYkU1UmtUUUFRNm8zbnh3TWkyLWFPREthSmxWS2EzNW5ZTHZPWUZtSUg1b3gwcHVBOFZGUXNmVGdGSjZQa2U5cWxic0JwcW82S3F3di16czIyWkxhWVkyNzlhRkUySXZ2RXhHakk2cW1HV2Y4RTVPbjFwOGZWSndqQXlqc0gzLXlwelFJOWFMYzF5WHVWcXFvNzVSbGlHZGE2Z21Ec2ZSRW5wVVNrdUgtYzVXTFBsX25jdFlmY1pKUU1IbWlLNUpPT3pnTk1IOC12ek1FY214NXJQeHpuTHI2cV9tWjhKb3MzSkFiMXliYm1PNmFoR0IwQ0hqZ0ppY0FOdXRQME1SMXd2eVd5Q3ZVUzFpclVnQ1RyLWNYOGFGblNKY2REdUxhMWY5TVV3ZmJzZTV6YkpTcFRpNUplckc5Sl8wLUwwajYzc0Q4ZkxyU2l2MGRiVnlhSl9SMTg3UWRWQzRMRERWMzhhRFZNM3FOdmNwYm5MdzBtYlZzZ2NFX1czTmtlWTRsbDBLa0I5T3BmRmdNX294d1p6T0R1S0lsdHZ2YVhkbGZha2E4a1BDdXJxS1BJZGxydC12bHNLdkdpQnBjNXVTUG12aGcyUEV4YThCQ1BBZHdocXo4aDl4Y2YwVko1MWtPRG44dWFWOVlzUlhtY0pOdzhZTXZXQXJnOXU2RnJzaWtsRXQ2NUdZbnZETTN5V3V3WlV1UUw5LUVvUUpCdTM2bUY3amwtQUFrYTRhUEZONWtlOVdlMEtObEtRZDFOVG9KR2w1dmZBUV9UQ0FXQUtQZjlGSjRyOEpzVFpWWW9lZE53OUJzQ2RLX3gyQ3pTdkZubzgxbE1JT2pyYWZLT0NpZ012QTBoTkM3NE00MXo5alZ5S1d0T0JXdVRWNEFFbGtDS1FDUXVBTnVmRFIxWUNoX0lsRzhVcklFR0VIdTdGMzhHUWVvWmtCd1NNMHoxZlEtZVVPUi1GX205ZHN4bHYzNGh6TFhUckx2ZGJ6YzJuYkV5R1pnSGhBWGVIZkx3eHFNWURwY0RmSW1XcEwwekJlT3JWWkNjZjdwcmNON2FRUGxSbTVYUUNnLWlVOUY1VXdkMUVQd1pFUGlNTGxGX1k5cGg2N0lzemNReG5VTmZZYzg1bnhIWVRBUzQxakFicmdJSjdfSy1KMDR5MVBib1lDb2dRcHN3cGlyNGZNdjR2c2RuMUtVbERxdkh4UjdZTkNXU1l4dlFmek4tNzUzazQwRERYd0xlXy1yS0tzSUo1LTY1RTJXYzZkNXZYLXpzdmJTbmhDRnlidE42X2FIZzZzeHlPc3lqTnh3N1pQVER4QXRXeHlZOWpZMzNnamI3eEw1WmdSMFlKRGVfaGpNS1FpUWk4LU02VHBlOS1YY3FuakVuWnBFdVJjUVBldnZKdjF6LVQ1YkpLMDZ0VnRLc01wSU9vR3FnbXBYNktzYWxNTXg4QVdCWUoxc2VfNmRZQ2o2TVVuckpIeEUwSXhzR3pOWkJlOXlVS1dzU2h5bUhZWGRTM1RDekxfNXhycjVuVy1nbUt3MkJTZUViNm52NGFoNTh6cjZ2MVBFZ2tMTGRuaFdPbjZZQWZCMzRzMDhWMDFiUnhUNEdSNEhSOWExSVJERVFVY3c2b21POWdoeDZCTkJKN29sNnVlZnBZbzYxNmdFMXgwWEFjQlBrVUJqTmw4eTVockJsOVlGMW1MWTJ1bEZUQkctaVlOdHhIdlZOZXllYzY2NTdxWlpYcUM5WlFfQ0txT09Qc1hrdWtEdndxMjhyNXdyWjAtbXhpOWZ2Z0J1NElsZ3FpbDIwQVZtSlZJRno4c0E3cFF1VThYeVlKTHdRbllTbG1mU1NqZEtoMUtrWnlsN2pwVjJ6ZlBBV2I1RWxsSkM5QmZUXzViQ2xfbTdpWUFlRGlnTkJXZXNwaVhuLXBUOWNnc1djdUZoYm5BTlB6SGtOYzZmOWVlb3p1OUk5N194SVpKSjF6eENtQUtZck0zTTFCNE1sb1lpcWJfblJDWGExbW4wdXFBVzBqSDZ4RFFLWW5tQVQyYnpRYXdYQVhxSmd0TXlza2xVaU04MkpOR01LWGFDLUZPTEhvYWt0NENBRm9CMzg1OTJHZ1NxODV2TXRqX0d1NHVYRmRtMGFTeUZjQThSTzlVTTZPelhncUNkaTVRWjZLMlVMc0FQTEdWdDFFUmZsWlFuX19SeUhfanFfbXZKTzhHcS0wWGd1RzZkN0pLQTluSE9QaVRnUW5yeWV0OTJqTEgtVTZuMjlIZkhrUnFNQWp6eGlCTk9WQk1namd4Y2VGeEVXRVFCYk9EQk5PcFJxM29oaXZ0WlFaMFN3ajI0eWloREQ3UzRTOVg4cXhhTVBGNFhOS0M5TW1YVzkzSGhLd01ZYXJfcTZ0UERxTlJJVGV1VGZCWnN1bWJITGR1YVZnWlVLczJTQ1dEQ1lrSXpHSHVyTmY5TFNtYWppOGJhZXVBal9PTTZ3TnIzUkFTdHhadlM0bGl3RmRreFBvNFB1NE9qbDFDTDFqY05BbTlsZXBLNlJxX1QtVkREeWdkWUxsSmM4U1UtZ3JCVUFiRzJtaGpPTXF4dUd5emdXNnExLTVjelBDeUZ3TGhkaVB2MHh2TGtyNm1Id3hMbWhldVBiUzNsNVlaMENQUl9qNTVNVnFwcGFzZW5Qc2JFYnpjbWlaQlhCNF9uV3Q3bWlSUFdnbWNCcFp6MUpMNFI0N3ZyX2pIanN6SkRfbmJhRHh3c2RPakFEV0lGSTlhTUhpM3lFdUpwMzgwRlFrWmptUndwaHoxSTJfNDhXaHhqLWlJcjc1WXFlUjVaRGRDNExNUTRDU2R1cVREV1Z3dm1wY21BWXRzalJaTlFESHZlTjdYbnJBU0s2b2pBN0dvOW4ydThoWGNyS1U0Sm5uc0dod1ZRSnJlN085SDJsWG5XaGZraF9IUnB3QUJQd2xZQmJRUUFzb19YUkFaV1AzOS1oODhNUlRiaE1jaXVHdl9Yb0c3LUpkSmpWYnAtT0c1cUo2dFAtM1Z6OEtSZFdJT2Z2enUyZ3YxSmJfeEp6LXBDY2xxWjlDT1ZNRlhCNXEwRHVTTGR5S1hpa0xVZll0M1hyM0Z1N1RyeVpzMDlrR3drV09NRmFCTnJXTHlKNkJIQW1TUURjZUc2cmNhTmtRZGlCOVItNVJKWXpEWWs3SFQzdDFvZHlEUDZBdDdfVzBxcXlsak80ZlFiRzJmM1RBMjQ4bHE0dE14c0R3Q240UmRtOGowU3Uwd2lQdzRJNnlvRkZaSUh3bjJhcVljSWJ1SllyZ2xJeXZ5a1cxSzBUdlg2ZVFId2k1YTZ3MTZZOFF3S085aEFJZlV6SWtxbl9ZRUo4dGp2ZW90UXMzWFZEaGtaMnI3UkZjdTBCc2xKVEo4TFVPLXhRNEdtSjZsVlN3OUw5TjRJNjhIMzRwUU9Ta1hValNaczFYRlhJbVlQZ3pRSEhwc0gyTTVOV3NsSmlucU1oLUxLd0xsQjBpaWF6b0lMRXVFWmJjNEpuakxCa2JoU2FuUEZZU0pNUXNRc21wYmxzUXVhZVFzQUNITUJIQ3pHQ3BicE83blBBbEFpU0xpc1hlOUs1TWZScHVLVDFDQTM2Q1Vpb0xEQ0haSW9ZMEVlVDJzQWthWW1tMjR2S183cjdWSHR3NklpTUxGdzlhMXJhdVdZSl8td0tjNERYM0pubXRWRDU2M2RwNm9ta1pMSm1Xd1hQOU9BaVFKd2g1bmFvMmFkX1JQbUdTbFZpa0x5OVk3U0NKbjlUTE9jV1k0R2hxVGZzTEE2RkN0RkxLNDl0dzZCT2hZSEF3ZkJlWnNnb3cwV0hYeldENzRiUHYxWkV0Q1o0VnFoTFdzRnRaWFF2V2FMNmhLUTZaS2llcktCdTcxbnVxSE9UT2JIVXhxOGJ3Y2lDVnhXaTNJalZUZlJ0cUltSXQ3Zi1yc3BncTFzbm5QRDJGUHEwRmNrdHMyUEJIWkJMOTEwTEtKVnlsRE5uR1J5cG9zWmliRlNkVlVqeU5HYUpyVTNEZGZFTmJ2R1A1TjZFbi0yTzNqckUyWWJPY0EyNXp0eTVvblhJQXRpM2hzZlAzWE5NREFpUXY3Rno5cjZNcGdxUnUwdndUelJtSDl2ZmNJaDhRX3VPV3c2cTkxbWNWTHBzcHhSNnE3a3hZbmYzTEhTYjE4YXd2bEsyMGg0TzVFVTJNWlVkWHJNaHRIZ3hXRmFtTTNLeVh1bHM3Ym13NFhVN3ctYWxiRC1oQ2dkWTNLUjU2U3MtM3hQdUwyNUpPS29ERHdldVVJWkx2WnJwNnI5bnN3VmZIZ3h1bU1GcTFQVG0zbzl2ZmZyc0xxcmQySm9VZU5zc1lVY1R5N1QtNkZpOXgwdFB2MDlzdGkxT2JCYVVvNGRiWHRRczRTSEwzTE5aZE5yNm9SdUpUa0hHYnJtc3ctUzZ3cmtBdDE3Z2c3TmpHOU5fX09GYS1VTVlyM0tJWXdudnBHQW03YVQ5QlBkODBjbFQ1UTVUWDJPYTRNbTEtSzh2VEoyN01CUjllMjZMMUNfcnNXTE5rZE91a0ZsUHNaNXdCTU5kVXNUajhVc21JQ080c1ZQWVpnbGhEMEtZSUNyeUpXdHR4Z25TNWFzQkZPdjJWOWszWktFOFZ0VE9GckhFb0I2QTNUQy1OdE1YNHluNk9KT3Z0OEcxdE96dkU2aHdPRHV2QllFZTFtb1pDblI2OC01WFctaGRVXzRwOFFzMmtTaGgtWFh6dUdaalVJb1Z1R0NsdWQwZzdIUTZtcC1wTDhhb1ZKbnRHWjVlVHRRSDBGNmk0Q3BQVl9hMkthT3NFbzRtMVd3VjhOSVdodW1XMGR2OHpfOERrcndPTlJwUVFKQWZsRkp1enFaanRYZExLdEN3d0ZoZ3ZnMWwtVWYzYmJjc2FjODNFc0l2R2pMcW9rZVdFdzBBSHkzZkdyTGd1UlVtZGZ3MEtjQjFuaFdnLlIwTk5LazVCRlFwSXJnRUJCc0I4emc"}' + string: '{"value":"JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLk9kems3TFFIaU9MbVZjcS1ubWZIWHZPTGlRMjEzeW5NOHlzU29JYkhyV2FoSlNsb2pQa2JjOWRfMG9JX0xBVnFFWjRUQWE5dDR3M1B5emRYRDloaTRPcWh5THRvbFRmajlxUndWcE1nZXVJaVp4WndpVnlFR29FOTN4dWNfOXp0Qy1aV3hmTTR2RHRPUG9KZUNDRnIxS1d2XzFNblV5ZGNjVzhvRWxXS0JscGlkRjZJQzI2V1BRMEQyWThscFNmMnZrN3FUejJzUjRkX01RSGwzSkZtdWtaU1hYTXJyNC1LcFBqaDNtNUhvWXM1bXFhNDZDNVFQUWVLRGNuR1lGTndhV1REQW5EcTZHaFZJNS1mU2ZEWUhqZVhJcUhtN3hmdllmVlBPTGdRdFJMbGt6VHNCUUgzZjlaYnlUczFWQ1JkeTN2MlNLNjhnbFFDOGFEcXBIU1FNdy5iby1PMVE1VG5HMGx4MGdpRjVSQVFBLm9lYUJUR043ZzNMNndRVS0wU0c3ZzRwXzdzU19KSVpJUmFqbktPZjdBNldnZ1AtbEZTTlVtV3RoQ0p1SjAyaFpyZW1mamRqcFBtLTJPRWZ3UFhzVjk1YnB2RGdMc1h3T28tRHZlTTdhNXRZVUxuYXJNXzhXVmp3emVpZ1BlUVpCV0c2UXAwbVZKX2J5RG4wUWJDb1FIRGdtTkVZWi04MGNXWVpJOEowNjBZVG1xTG0wM1RNN0h3ekpuN2ZjUnU5aXQ4WVVTZGl6Vk1nb3lNM1F3RWswRUlKWFJCZ19GVElEdWJIZ0Zub3NPaG81ZFRDSV9ZZXpTMVpkQndDOE5JZnBDalRSb2pEVFJpaUgwMmhXcTVacUEyNktIOXl1MGRZNTJ5TWYzWUlnSGZ4WjJrY3N6d0UwdlRBandyMGtSY0lnTXNSZV9MREROMWl4bjJQNlpzRkQzZVBLa3VNYmNmUi11RUxSV2VPRnpuWXVqeVRPVU40YkktZ3kxTVhpbm41aGJuZDYwb0tqZW5JYlVvT00yaFcyYURVRXlpWldXZ1hPNW5RWDVPSUcybEhEYmRUNTJzOGoyQVV2blJ3bTN1ZWF3dERjMFBveENCRzZMSE5CcUZJRkhqNkZfejl6S0FUUTlDaXBON1RRZE5yek1Pd3Q4NWVNTnN3bEZOOVdQd3pTSFJTb05maWxQN2EyaklQOW44SDN2NVloUlVQRFhaQ0VyYk44UDRLWEl3c0EydWY2czFia0J3UW1QRjk4UjdsLWZ1TDVRVnpWZGt4VzQyREdoMXJGcEwyQTFhQVpmU3lON3hNVEpzZ2lBNlRReTUwVENEc3lfcUIyMUh0ckRhMlhlT2JtNWI0QlBxelVjNXZYajU5LTBYeHZjX0ZoYUV4Nkx1Y1UtTmFVaWFfME41US1iZW9vMlh2SDZTNkhOSm94bFZ5RVVfUHF1a1E1bnZ0WW1JS0F3VVFXMng5WXhFa1gxTzVpd2N6Mzk0VlF1cjc0b3hkUnpzVHhKTGNIeDlpYnNBZkxtWjUwaUZFb3g2WnJJOWdVOGtTSmZ4ekhHOHRpSGNnYzhLTUpMaTdNZHhyZzEzSG12Y0hfMW5FemloMF9OUVJVY3c3X2xQSVBuZVJEX0hlUmRiU0ktOE9wN09hT2wwWGhMYWpKVUNrMXhzV0plNXVYLTh6SGxyT0ZTSWtlLXFIRkpjeDVlcFNyVWN0ME42bVo3akQ3bzJGb2h0cl9KNDA2Rk5hdXkxM2FEWTItTFRSSmhTSWNReUVzVGs3NXZBTHV3WElZYzJzMk16VXc1cEk1Qm9GaWhWOERqMExzNmVSNXAwbkpDeGFqXzFmWU5takFHSHhSZ2NGbzItQUg0RjF3ZXVhTEhDS0NNekc2bFBrQWZQb09kTHFWY2ZvRHozOGJlVl9ST0M0SFpmV0hySDAzVmxZaFFGdEVkRVI1XzMxQmdyQkpjV1JtQjJFTzFUTzJiYW42X056Z25wMU0zRTZkUExBaWZ4aUk3amxBWUlBUGU2UkVVc0lFaXdtd244MzQzRGdOR3FpeWk1S0YtSHZ4OXdCdmtoRFVDWmsyM0JzRWkydEs5ZkF6LTI4R3RHUW1TRi1Obmk5Q3NFQUlTRXlzcFBRSDFpV0ZXbU9WdGFJSk44QlowVXdXMjZRZ2I3NE9qTlZrem9KbTBibWtjSnVEb1pxMUZPX0RSd3VHYzdzd1JPTG9yTnNUSmFEdXB5d3ZlY1dLUi1rdlBIRnh1b1R0Rng3UjBVZ0FtQWhrZFZWMWlUd201LTJFYllJNm5iYXUwN0h3VXZHbzBfazU0dURoU05uMVVST0lHd1NqUWR1c1UzZThkTzNiVVhxdTVfVGFfYlB3QkI5TFQybkNPWlBSQ3A4TzlaZ1dKRWZxamZldl83NmJ6U05BZzJwOFh3UzBmbU5NdEphb0Nub0ZOWmhRSndtZ1g3cVlYX29oT0lEM01sUW5KQl95Wi1id1RFcjRKY21fdVkwRk5pVThSTjZvTjgwMjdfRWNybEI4ckw3d3RTRHhUUUxlVnl4UVFxaENFaXJNNWVHRGVNNldWc0lMR2tfNnRxSmM2bmNJdkxDc3hxZ2RNdlpYc2dqVTdHVkV5eVJNRnAwX2NQNVBndGYwdTJuclVJRmFUbWlUR2dhMXU1UWJUVk9hRDVSbTZvOHFmaTFzeGQtMlIzdEMtdkpIcU5rUTFLWGZNRDJ6d3U2LUJzTVRLUHk0bms0aEVxXzBIdU5DNFlyUk8ydmIzclNXZ3FHVEhmeGQ2bHdjMTJMazNDdDhIWW1vR0JzVS1vYldFejRYLWgzY1F1ZUdQcmNMaWNZZmsyTkVYV0Iwem5yV3BSaFd3enNTVEc2Nm9kSDRfeDRZei1HSVB1UXRNUjFNZ1BzSFVpOWFiam9rcmxRc3NqeU0wX21idGx3VkZob2paU3JzVW9LV0tBTXV0bVlkRFZKcmNmRGxCX1dXVF9PX0xxeHEzYVl2ejF6RmJadWVBcTBBMXlCSjFjdkJvZTVQS1JZcDRkS0c1NVpfVFp3NzlvYjVkaS11SWxoUzd5Z09XRi14bnFDdmg0TlpPME45SUkyWUduVW5wcU43TlNtbXJ3LWx6QzhnS0JfUmp0T1RqVWdSWjZtakFHZ0toYmViVTBGNWdYRENNeXRLM2NtNkpiRGs0SjZMaGI2bVJLTEhmVjN4SkNwMEdQOHN2UUdyOWx3d3NyNmJNMHNUQm51NllkYTRPeE9SNDg3aG5QVFowWU01RjFoc2pFM0p5cTV6MklWQXQycGNsTHhET3I2REMzUU9oN3NhTHNVWGRkbzVlejQ5V1E5dm9qU2RqU3YtMzEtZ0hncTVUaVFYY0xwcDVaeUZCcFNzMnVaVWdCb0lKLWpmRjY0ek1kU1lzZTRzbXgydjNESWlCNFNsRi1Kb05uejRLaUxkdEdTUVlMNW41VU9iX1pQa0Fwa2FQRnYza1dNM3Y5cjUxQ2dTS21ZWXNMMmJFUHBlV045aEFkUXJtYlJ3ako1aFZXT3RZT2dWcXM1dHBYSU1reDFvSnVuanF3dlJfS291MGw4cm5rSHhHVE00V1FGb0hqWGNFS1ozNHk1QnFmSGhiUUUydGUtRXNjek1QOFFaN0l2NzFEX3JwYm1IdDg5WTRGb1Bfb1ZkYW5YSUdJT3RDdmVsWVdsdGZ3blgwYTZTeWtRc2JDcXowb1A5RmFueDhibUlyeVNSSXdZVjVKaENQR1ZlMVluaXhqVmEtcVlVT0tXWG5tZU42M29RS0gtd0FyVTgzR2lhbFlCT1pNWVBCQTB6TzlyYkVYaHNLajFXQ2VnQk1iaHRvemhuY3VmZWpQX0JlUUdBOXBIRndsNnFJU3pPUGt6UC1ucEFCbjRxWVhXWk5JbWxNb1pyNzRmNnhVSXduVThyQU5EZGgxb250ZmlSbmxFdjJucFFiRFF6ZklvemFraTlsUXkzVWZCV0ZvMWR1emUyMVRWb1lqc2E2a2RSZzVJSUNyVDlnNVY3NGptdnc2SmVROUdQRkdHTXlablN5bG5yNEN0ZC1TY2xmZnRXamxkUW92cGhzaU1sc09YQVZEaVFsNktSazFkTEpTSVVwME93MXhOMG1FNUY3UF9OLWVTWWJ6azVGcFZTaUFjNWMtNklha0toUk5wd3NyX1ZPem41amt0UFBWWTFpcFZXNUhuVUpDaElhSFRXMDB1NmU1TVd3NVMyQzJsWTdIVXNESXF4Zks4bXJJXzZlcTV6LVNlaC1jMVJfLWw0aVdlemJULWEwUWxBNGtYdWpZNzRvNVduTDNwMDNDT0l2UzZUYjhMN2VXNndyYzRab29XRHFrUTlhQjNscXdwT0tBMEFCV2tSSUprV2dsZlZMUlQxUVM3Q29abmxFeUVlbTBhRnNKdGtTZWNnX1RkUFBUNndfT0I0Y0xXY0NJZGV1ZFd3THlieGgwNkhBQVR5dGYtMHZreTJxT0hkd0dJbFoxQlhTdmlSX3Y1LV9SY0JUcEZEcjVMcnR1U1JWQmVsRmlMWjJoaUUwQi1VUGwzQ0Z5OWtHdy01TTlVNmNKNE9CZnNMemF1Q3N2eDRYeVl3VnA3N3BzR3M3M2h1T0t0T05td1BHWVlPOUFuUm5ENFRmeV92ZVdZdXpRclZHV0Y1bms1WnFJUVZ3SVBaUHhLaUpIZXdFcVRiMXN3Z2RKSnV3ZC1PV29HMnZLZ3hWdVk0UXlzVjQzSUtjYURERzNROXZEWXNTNWU4enp4NVlFQVBXaGNhZ3M5UUh2NkJFVDU0LUpCTEUxc3F4Wm9jOXRVVmQtVWV2NC0wSHU5TEN2LXNnSWROVVlHT21ZRTB4NDlsc3NwQmVod0JBaUQ2OUh3V3Nud0NpNTBFSDdQcVVoOTZSYW1VU1IwVGxSWmx4REZoSlNsMTNWWExtLWZiX2VjV0I0NHl3NWt2WDhCTFJ6c1JDLTlfV2tyOWNRUGNLMWVxWWRDeVdxUEpBMG1NUWFqRlh5QTlwQ2JwZ1hGZWloLWgxaExLdHE3anJydnh1RWVxa09BM3QxdjB0cThCRUxTTUlxTGd4R3BwU21QeEtZeUgtVXdPS1A4ck05NmFacTY5STNpVlFuV2J4OFVnMEpNQ1liNmRVWHVOdGplSlk5TEFoXzl2QWRZSGtQYUVVZzRwV1h6X0JWMjA5SVFxVk5ZNHpmX1dVU3dQNHlYUUFqdElUbUR6b1REVUEyamk0R1dPOUNxN3pRNzVUcmVoZFlNNWVhLVpwY3RKQjlCX0xOdEhVclpNdHY4SlNZMUVscWxRdGc1dXladFBid3pWOF9jUkdEZnY4M08zR3hvYzF4bld1aHQ2UDRuQi10UGVyZC1taWN1U3g1VFRjMGU2Zl94TmJUc3dpRUE0QmhRS3dZVDBKY2xvS0c0UkQtUE5UOExlZk52UFBWZnVQSEdfSm1aQUdDOVJEcWFra0tXSF9EU0Y1Y0RfdW9BTndBYkhNUFlpY2ZDOHZETXZUcGNEdUs4NlZyTVRSNjFMdXpQWWxMdENxNWdiQlhZaWZFdlFJVm11TXVHZHF0SFpiUHZFSUo4eUEwMHFxdVd5cFFVRTZ0RWhibzRNZWt4R0NqTzJDaEoydjBobnh0MFYwenFBcm1xaXFYOVJHdUVQSmstOXkwY3lfWVNPX01jRmpMWGZhYTdHQjl4aDlTSVA3UGlSUmE0MzBEaXBaSnktejJxbTNXbE1KNW42Z3g4OFE5U3FqSU9mODZHQUJLRG1XZzhFbnJZa3lxNDhReWFwdUhOUlVHMFQwTFFGYjc0U0wzMUhPbWhQV0F1WjJrRl9XTDYzZW9JTlZTeFBoU3ZSMEVWYmFpdWtvcHhVYW5pRTlCdWYta1JHTnVlX0pBdTJZYzBKcjJ3UDd6YllIZTJ2QTdGMFBvWmt0cWp4LVZTTlN4QmE3cFYxZ2hpV3ZfZlhILVQ1MF9XQXFNSUZjWWhkeFdNNXJTZnFPaWxrVmNCbkJ5TUhQLUJwTEo3RTJLVmNoRzBGemxvQkZvazBEYzdtYkJBTEM2NEQwMVA1U01zZGY3bGpaOThUdFAwc0dDcUJuOTVsTUwtSWpnOUhDblZNZ0ViODFma3hLaFBXWTUzNDNDVjhiWnNyUDhtamZZUzNqUThoSmlocjdCb0c3amZPOUI5aDJkamFScnp3OHFKeEJDRHZRZ0M4VGZjOTBMY0pxS2YxVEc5UE9GQ1dLV2tRWXNSck1JdHhDWF9kTi1jekNNV0FSSUNhYUYycFdvTXNEY2tZdTRWV241UzFpNjF1NTdvdG02NUxPV3RoSlBDc3ZKaXFGaUtoajhHYWk4OUYzcE5xTU1YN2c0V1JmUXZIVmxucmJUeTdSVmZPaE1HYnlLX0VKWXVVTnU4dzFVVWFSS0JoMW9VcWNVMnBpNG9JV1k4LTFWb2NYMkpfTW9KTFRsTWlNSFZ2V2k3bDdLMDByNE1WbFhHWWhJSXBLdEJnN3BZRVQ1YlRqeTZfWVFqZjFKbVF6TnNJT1U4aGdtc1lCcTI0eFRoSmRONmdsNlhTRzI2YmgzMkNYZnBvS0U0M0tuY2tDUm1MeTdCbzQyV0t5SFhFUk9qYzJHdHh3TmJ3ak4wWnVkX2JJSkNtOW44d1hMOEpqencxeDZRQ1RKY1hSTGdLb1J2RWRvNmlaOUMyR0F2UWw0T1B1dkxobWpEV3p4LW9Ec3NnRXZmdEFYd0dWSlZvYVJhVWJET1EwM2FBdGh1ek9LRXhaTzNZamxHTzZrWjFHRnhGbWVneXlNQ3JoOTJiVm9tYUdSaDkwX2s4ZjVIbmlHT2dGdGlRMzFaUmtCc1JyTnJoZUlLb2Q3dTZRX2xSUEhMWk5pRk9UZTU4cjUwdkdKMVdRMzhYbFBHclhoekNWYTdFVGdRUURDNGRlTDhuM3FoN1lJbHlpcnBmakxyTVBUaURYMWNQSEppR3pjMmVQbVBiUkk3VFpnRE1HR1BTdUwyRUltWXNINzhvZi1HdDVya0t0eHZidW5jblJuZVMwUm53UFRYQmdFT1FKSExoWW5PbXRmcmIxTjkzVDI5U19udnZjRUZFOEpGZWtadXhxaEZJRUlKZ0lmbHQxSURxNEZSRFJVaXh6N3R6eVlIcGFtM1gzbmxUMzA0UWthR1hLb0N6YndUVVFsdldGR3BCVHZQcnB1dmp0VllNNzc4cGUtZHZxQjM4Snl3VkNoQVhnbDV5d3dpRHlCOFlTWUs0V21BNzQ4a1A0T0k1N25oc2hwSWNVX2pfS1NQclFQd1BXN2pxbzY4TjNiYXNYTW5ORHNUcjQ5QjF2cE40NGQwWWIyRzdTZXRzaU5SV1lhdmhZa0d5YjJPZ1dqTG5LMExZbGI1Uzc3SzdXN3J6S21uUUNfb0VnX0I3aERFY2NKUlJQd2dvazJiR2dYN1R0Y3pydkNtOElMTEpnUXVvVmFoREx1OGxGT3o0aEtYUlV3dlRwdEYxV2Z2WG9QOFlDc3VLYkRTUW4tVGxOc25DQzhmX214M0Vob01vUU9YS3pRRTN2NzhLb1NSRTZXWUJmVjlCNjlzY21pdWpSOHFyYTR4dVZfbDBnWVNLNDJaQU03enFKN1NqQmt1eGd2Vm5wSmVTbTc1c2NSZFdaSFVJam8wNDB6bTFlbmlLZlBGSWFZNmQxLWt2Y1BkRFFVLXhabmgzZWRQRlNTM0NDTUI2Rk92OG9CTWZ6Y2RmZllqM3JHRHVfSFJLbF8xaElwa01xdTNfckpNVjBhcVdsZm9aSVRhZnhYZ2tPZlhaemNiQnNCOGdXLXgxZ3FMT3pqUllVRGowVTk3N1NxX2x3c0ItQ053eVFoczBNNXI4bWRPeS1hQVBOUW9xb2VlN2I2MGR2RklUZUxMUE54TnB3LWVnbDNlRThucnhNN2FrRVB6enZLZlJOMHNPOE5QZHE2SUdKM1lDZzJQNnZPeVI0aDZPcjZiQlF1cXYwVkJ6cWo5bUJuZ0pyT3p2YnI1dTZFMUhORGZObk9NbFpzeGRnQnQwOENHUXdJUTdPbXM5blYycjRrYmQyNVk2OEZLbE1DMFhGLTZHdHVFY18ycFhQR1pldXlVUGNVVDNVUnlWVUp3UFJfSy1YaEdQZnJiN1d1TERTcms2LTV2Zk1OOC1ZanUwSzk3dEx3b0lkOHVVTVg4VHZvUWF0LTJCemc4cWVzSml5ZzdiWFl3anNiQW04dm9GcDQxSTdmWWVpYzNoQnZ5OVBuYVFsZUZ1a2JZY2N3bF91YzdzRl9Ea2NiZFpuYU1SNTRvOHkwZm5tT19sbl9PYTdNTmRMcGhWWmY1LWkwTXprdjJ3U3J0REVGYmo0ZFc5UWNHWlNpY2YyaGZiUEQ2NkFKVlRKVnBxbnAwd1Bia3hGajg2TUZxWllIYmFkajNaY0tmWDh1S0dXdlhZdE9QWFAxT1kxby0xWVNVSDA0ZV9oSWhud09acTZYNVJVajNoZnExQ0RyVmxTU0lzc3NhWHRkNHR0Tm1SUjYwaUlxOXBOR2gxZzJKMEdNWHFZUnQ0cHpVNTRlMjJXUjhnWjlPTV9XNkMyV2t0N29uWWZFcU1FNjR5cTZKamF3TDRzcHN4WFVBSTZ0LV9IY3JNZGd0Nm43Sl9ZVkgtWnJRZTEtN0NYUkJYcnF1cVF3VVctMkRmOUozaWcwcXR4VlFaRG1sZXdCbUZnZ3FXS1Z0OHgzQnl3d3RLWnRaai1saGJHTlNYTEpkSlIyTW1wSEY0YnhIWUxaanlITjlRb3JZOUxaNzBabFFBX2xSQ1BSTDdIYXZWZER6YVMyNXVhOW9iNWtNb2ZfcF9SZmpYNm8waVk0dUVUMTUxRGoySzBZMHlRb1J4UWs5dDhiNTJBdUNzUTA5NDVlU1pDY3lDNG9SN09uZHJiclJuWWtDTnVMdm5ZOUJYSHZjbkwweUJRQTZIUHRRM05qNllCUzktSHV5Y0dQNDJTY3pZNUJDQ1NnYTlxaFVtTDh3UUNhbEc1akZuZ3VDbU5mMmRCaTJWUnFucmNlWUVyaHJkWmxrMWF5UjZ0X2ZJOGc0emdzQ3NkTUswN3lJck9kbWZhZXBERzZ5ZTM5YWJyN21PdmJ4eEZBNjlINTFSUENfUDhOQ2pBRmpYVVp5UHdLOVNmQ1hLb0VwZVZVWlpRWWgwVFQxR0hJTy1WZGJoR0x1T2dDNGh4RS1jc3FHQ1hGS2xFMjV4dU5maS1uZFpaZzRNc0F4cVp5VTJpbm1sN19RdkhpaUkwVFB4eXZfdUtlSFItbGJ1eEw1RlAzY1Rpc182X2pteTE4T0pIT0hXaF92WExKdk1JT3BlU3o4Y0ZWeWRwMGpUbEVfMVRyR2xmQklIQmFKRnJJQkxfc1BXZEtJSUFDUUxUemZpUHdTSGZDR183V2c2U2I2MG1yTFhSc24zUDlLTGNkYVVoanVsOTZKbWJrTnZxM3JwUDJlUjJkWW9TYXhsTTZUNGVDRzVEREtlVFZFQXYtQ3J6SzZxWElzQmxEdDFGUnpEQ3lGLW9tSFRIMTRWZUJUcWxsNWl3dFpwSTkxMkIxUDNiYXNwLVVlSFdTSy1ZVmhBSVZXN0VBSE45UVhGMm1OVFhWYnozLWd2SlgtM29wMkhXWEtBMlctQ19PMWZTZWpyY3NhTjNGNThFd2h1UEpncVd4NFdsQkY1SDdjYk9JTzkxUkZ4OW1qcTB0SjFYaDF2UEo0OUJiTjhJeFRKOEZPSG9sRXFnclhiQ3FpZnF0X19kRUlON0JhS2Y0SE93a191T3lybWs0XzBkU1FCZ0ROWFdNNkQwQVVXbHJKdkxhaVhjVlhXOFRNX0ZwRVhEUVc0MzRvNGhmdi1zTkctWUE3Y2gtUFVET0pOR0JROFhjOHRvWmtfb19mdG9sUm9rS0Y0LTlOZHp6RVdDRjNnRzVBaEJzN3lsbUtldDhxNWJoZkgySWR6Ulphaml3eHFCV3IxdXloZDFXRG9sbXd3dFc4dU8yWlAyMkRsbFhPRXB0bERfUmF5bVpDQ291Vy1CbUprVFpJaGlOeDh4aTBubGhzNTQyZUt5eXAtQk1RdXl6YzB6c0pZVEJzN3I4QXVpeTlJM0hma1dnYVNoZ3huM0Jwdjh3NUJiTjZGSWozTVRvZDljaVVFVU9GckRlTThMVFBTa2ZOcm5hUEpSTS1sWEt1Mk1ER0w1VVV1VHdqOHYxc1AwaUFMSWpOYjFraXFvWGRyXzA4YzB6OEp5QS0yQ1U4LS02YndGNEZfZFdpbmd4elBoOGt1cVFhdlk4Zi1hWVFLWm1JYW9nUjFLT1dhR2M5V3Y4N0xPXzN5SkFqVUNGVFF0amhFdm9TbjViS2xRLWpwQjlFVzh6djJwUUFwSFJyV2ZCNFJlMTlTR1BNLkR1QmVad2xRamtvb0lfNXRvRFJQVVE"}' headers: - cache-control: - - no-cache - content-length: - - '10607' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '10607' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:49:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault4e00e7f.vault.azure.net + - /keys/keybak4e00e7f/backup + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/54248fddc148400a9df744075bbfe2e8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lsgBFBFSUvohGWs21xzMCFc1IRDfnH0UlZ8aJnqVozFkc9rZgaBdr5IOVmt41hxbJY2MWuJxGpS4xAZ8AmrQZ1MOmS7nUiMmorcyqZZIcZYz3P7YXLjiv-ncb9rTty7IJ2R9v111Beiq3tNdHUrQYUt1wiysQPcPk69FGq7h4B5UqDM4SHQqXF-Rm3R2fU9wct7bx3F2XqYcaMmQWZBiYMH8vbooZWyh2QziCXVB2MhfBt0gTfoLUGT4hheDyLfIgbhhky6Hi0DC-3Ecll3tlK6JHAR6V1jLxJveWPgUy2WgRMSTATWdlcYL_i9Ji9OT4dSLkCFqXWhRN8krxXf9dw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/6335121a5c4e43919f25f6688e470924","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zPfZm_2ZxRIlx2K1MjSGUuBBpyaJjU_gk2yp9T9Ow8bvac_t6RgXTmsdK-4x27G4h1XjY0QVXkuJwnNxrUbSwrrNsxJtaz-KyCpetoPLcAEp4-EbEF2w-Q5fAPB76ngr-RKlHUv6fww8rfWWRxKb-GmtmYAq_BsUG7Ci1ALoF3dIxKyEpqueY0TeWofWxUKpftXLyjAIcuBVRO5UVSUv1bSfLl1mzm5Wxl6pk6G_BtAi9cn6TS7DERSSEilg_Raz53fCXt5MaoFnDpT5oRIl5E2ZaxaLJ2KwLxoZERB4oZ2vPGgjr8MocaOGY66xwVKZQJKttZmDy-7pUKWMxoBG4w","e":"AQAB"},"attributes":{"enabled":true,"created":1564526988,"updated":1564526988,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '648' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '648' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:49:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault4e00e7f.vault.azure.net + - /keys/keybak4e00e7f + - api-version=7.0 + - '' - request: - body: '{"value": "JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmFvY0lxQ1Z1WFpwOTZLSTZQdmVlbENFZlMzeVl4ZC1yRm5rZkNTcmdXUVlwU2tzUGVpTmJENFZuVEdEbGR6dE1GRlZ5SGdMRHVwb2VJWDlIU3ExTEQ3MVFSNWpYQUE2aUZpendrLTYxbkJ5ZFY1SEVLcHFpdjJwckp0T0FRTlQwZmpsWlJadzBiSG9zSldIenF6SDZXZktQT25pOS1GTm1TV0xvZFF1cE84WGU2bC1PN1RoWVlhc3hoLXJNN3M4QUJrekZEUkVPUm5rTnczMVJ6SDAyQjJhOGk2R3VfcUVtbTdvUDdOTnJRaTJfRGJ6YnZBOFROdHBwU1gwbnc1c2ZnaWVFWmUxTmZwVXNSZDcxMmd4YWxWNUpuWklJaDAxcnF4ZUVZaVRRNlhxdXhPbkZJd1RaTTV6WTZSSVJ4QW5rTk8zb0pMUjlkSTU1cG02ZVlxMnFoZy5DUnVlaDRPYncwWGVkMXY3TU9GSVNnLlZRVXdIMno3UWV3SXJZN0kwSXhEU2h6Y0FLQmlKdThBVFVTQWZvUTBfd3J4WEZBNkxyOGlhM0k3clFMYm15X1hLbjNwa3FFR3VnVHZlTm9BenVmaDJNR1pHV1ZtOUJibGhCV0Z1OTZUS0s4cVRqOHJHUHpaZHB0MHpsSlloOTc1S3hZSnljNkdpNExzMVVqVDAzaExEcXVpYm9SMkZpNk9oZFRQQ2p5MXd3OXlNLUhKREswUHdzSUw1VW41YXFGaTMxUW52VlVja20tZUVNRFlJRWwyeTNtang0SmtVS2Rtc3FudzYtckRRcmd1OHFxV09NNXpDaFVKRW82dkQ1bnVCLWNLa2hJS0JPOEItM3RVbnQ0bjBQWldGSzhDaW0yb0dyV1JNZWtjSGxYdFp2Z2M0OHhVRVdQdjBhQ1l5QlhzOTlac29DN2ZRd3JIUllYdzZXNTFycUJqcTA4ckt2YWhTaVBxb2dkMmNfLTB0VVlOQ1BUWnBrcjVzanA2TTVvZUZlTG1KOURlUnVES3I3bWg0eTc5UndWam9xZ1JGdlptbmVBcmY3Wi1USmZydmlLZ3lLUjlUdjN5ZFVjNzI3aGJMTGQ5NC1LNFduMU41NE9paUtRNmJEbjRoWTd6a283aTdHV2s3NmdXWlRrRGFlVTFtaDgwQUE0UGEySXNsNXMtaXNuZkYwVTFXNXh6WUZaWWVYUnlNSDZkcUpHYm81RDBnNzZhdHdvTjg4eEZlNXNDVEpYQjBnQTBRUUNRNWRlX0E4WS1rcGFWakpKNDJPQ1NEX3RkWWR4a3JDOVZwZ1FlM0Q3ZzA3QmdqVlU4aHdFZTVkTzR2QmlRekdxcGtxX1lqWkRzSTcwWkFWYlk2UTE4QjRoWnJFd3VUZEs0QVdfS3Q4YmZiYVVuQlE3d2Z4cnJ0SldZeko4eUJaaFNOV201MThfekRoMmdYLTBuNjViMm5rUlVFckszWXBEVEpMZ0RZMnk5dGtETkdHX1dJUURIWkNiV3dDRDBTbDBheHdybWxHYmYxWS1heEhudHQtd214ODROZ09DcllEZU1SUnVkbjhScWlKSXF6d3I5N1JEU1pQMGx6dVZ5Y2xMX2RRSmdTYmtrRjVTdWdZbHotOFkyN2wybWV6VldrTDgxZ2w5enVMb0RiNmFMalA5WFBqdjV0WjZsOXF1azZCcjF0X3pBTVpadzNjUGZXOUVXa2hOdGNNbEZITXBYMlFkUTd5enVQSzJEb3V3bzVWV3gzQUFTelJCb3FJQmhIZEZLUWgzNUVFQlhHcEprcG9USzktTWhINkw4Tmd1dl9MVHJQNnBlOXBvS2otTjVha1VtUWtDY3ViTGRSUjQxcnFUeXNoYUl5WHBEYnVQZ19pbUF1eWpTLWR4VlZwb0Z1bXIyMk1aMFgyRTN5R0piZGg4cjVBTk1mM2lwZUNDdThOeF9VWUxubGFqczlMR3M2bVBneEktUFY4ZHBoUUxwa2dfM1FYR2xLOHcwcTVJMU1uMFNlc1R5NGJiMG12N0ZDdUYySzFKYXR4SGJqY0FFcmlpbm9QTk1yYUt4X29Kb1k0cVc0R09rYUFkQjA3MTBnZUJuYnBXcENuOGJNWkJ4RUZHNE1XU1lfbmV0cHFDVUhUZlQ2S2QwRzU4LUZQUHpxY05naXNGMUVuY1VhU0IxTVJ0YXVPMV9rSHgzT0RPNEhfSm5nYnd2bFRENWdXcjRpU1VYYldSdWQ0ak9YNXhJYkY0NzVyeGUxa2RNc1pORWhkZTVHbU1aQm9lSUd5VEM5bDJpTXNMQzFmdXp3YjU2SVczVlRmTzlTazVqOUN1RUdsMlVGcGd3N011U0laQ1VhSWZId3V2bEpXUXp4QlkwaG9xdEtSSjRQT1dWU2FhRWJ5OUdMa1VUSmFEV0p0YWFfc2x2UkVnb1E1WFFWeC1oUHZaWFczWDJlc1JsanJtQXZnVGJFWDQ5NUpJbUNsZTByaU1adjlETE9OS0k0a2NzUU12cGNsaUpQWHhsUE11X1dfZ2RBejExdHM2RUNGY2lVdHJOU1RMU19Qb0dqSlRSa2lEcERYSFBFSWpoaVp2X2xES0NUMjF4b0VsUE9kekk3OTYtNGpaYUUtbFBxOFpmTjdzQ19iRUxtdW92TjZIOS1yQ2oyc3BuczhLSDZzQXliZDBFNmxjTU42UHlCRWJWazU1R3V3UWNrLUNjaDA0M0l2OTJVVmZsNmJROUJsc1ZjenFoMlVGV3Y4SC1qaHVFeF9XNHZidFhHRVdsSDVSRDdEWlUwRmNCbkprQW5senF0d0tnMy00UGg1bHhTSWppWVJpdTRKZzg5clRuLXZIZUZnc0hBWF91TDFjM2xSZkd6MmVtQ202Z0RrNVVKdHZSWGtmUHREUGVHckp0SVlTRExqWjduaTlpRXl5X1JFVDR0T3NEX0R2N3hieXZ5SHFHUzZOa0JLRUkwY0g4OWpTVllVaGRxZk9hMUhqUU42OW8wRmt3OHE1TG51c2NXSW40UFVyajBYOGd5c3RIMWVha1ViSU9mRm05RWtzdzh0a1Z3S1g2LVlMbHktUS1mTlpwVXF1Mm9HbkxOcmV1dmhoWkJHdnJzQ0pzUVF0NHRjTWNwakc1dmVRd2RQT2l2R0tRUmVCOE9MazJCR2RlZGZXeVlyRGk2d2ZUclJ4VjZyb2tWUlpvVk85dTd6ZjkxWl9fMHZaRlFSN2ZubE5DVHpEM1dpOWdUUEZJaThFekdfS3BiRHNmRkRNN1lCeGx6SWNkeDdLZW9aZXhHRXpUdDR6T2JfTUllWTFGWkpFbDdJRUxxUWJydXhFMjBURVYyYi1VaWJvWWpvU3hRVUNZLTg4TmJ2czZCWWF4NGs2eU9yU3ByVVg1OXNNcVFPd25uMWRZUlFaeHZ3WGh0U3pWS2d2OGtzYkNvd0RHRW5pb0cxaUJKa2NDR2tlbUxPRzlMb2xpOWxRVDJVRlpBR0VzZXp1S0h3endPOGprRkEzODk5V1JXWHBqVFRuaEN6Wkdqd2JRN3BESUVBWFhyakIxZmJ1LUZhU2VYUGVhS2VkZDdMUy12LThJaTJFaXVLcUdIaWttV3MzaVJQNTNTN0VkNlhtMHJydHpSVE10RlJ5LUdQOXlWWlNiR3JyN2lFZ2YtMFhLT3ZPZ1FrQlo5enFua1FIM09rZVlfRHlNQVJqSEdkbTRIYnQ3d0VrZjM3MHJ5M2JVNTlud1ljWEI1b1l6YUQ5STVxM0Zmc09yTWhlN3hIVDZxZWRqbXlYRHNqdi1DQmJVYUVpc1lPTmFUUW5TbF8tRjhBZU4yajJrYmtCSl9tYzBSa1BncHA3cjZJQVRCRHg5dkd0ZjZkcTRpcndybWY4MV9SM1dfQ2ZhMmZlZWtzUDBFVjB0THVUVGloM0lEUlR0eU80MjVEQ0pCSm5BVGNkc0tPOVhuTDl2NGlMbG1Bd1E2S2U2Y1N0cTNTelNNUXhLUDI4TnlXS2lKV3NLemlMZ3ZGV21zQWQ3TG5Gd1dzWUFRa1ZidjR1WlZVYXhIaWJ4OUEzZGhsZFV5cHBEaUxlcWswck12U0JnTHNZVWk5SXJHbkdfSDdISzY5bU5CS2lNel9abDdBMjBLbFlJdlRVaUFBbnFLQi1kdnlCdmNVN3l6bzkxY2l4dUVidnNtYkNFUy16WVo0MUNLWGoyZ3BTZEdlUDRBVHhOYnV1eDdZWkFPUnlFamdHYmlJS3dUN1ViU0ROcEZEeml1eHBVby1jZmxabjlZZTNNcHFlLUI2NXF1RElxcDNvelJvdGt2SzVCcUpXMkRnTEVvUjBKZTNxb0gxVVJTT3Q5MlY3bmttSWRrUWloMURuUkttSEczQUUxS2YxUS1fRFJGSmJxTkozRklFYl9ONVlMT2hGaldmN2p5ZG92WEVqUnhvYWl3ODJOR0tHZTBOZDRhNW5JanhHbWhuRkpVVkxEajhnZHNyNG9ueTR3RWtsVnVqdG1DU1prb2VSRm9tQmtfNjlEY0pFbVl3U2hlY1JJdktxeWJ5MWx2VlNWTTZuSlpPam9FSEE1clNBVGxHQ2VxbEdWaVB1YVZGdXhmOGs3S0FwcGVFMzI1aVJXVzRhU1FHeE5NVjNWWHpIa2dZRjg3UldnLWNWNDI5M0ptSC1IOTlmT09Ic3JiVW9oaFRIS0E0MFMzV3kyTWc2anllQ1Jldko0SXhYVWVZclJVcVhBWnVOalgyM2pZcExKYTk2bkoyZEwzcHRiMW1WNF9vWnM1eG5pRjhmdEFEcTZfTDZFV3dRdHdfS0pDVkE3a3dGZHBOaFM4YU56V1g3d0ltNndRQ3lsTC1jTHQzSm9EX0ZtWmhfeEhmOFludFRUUFpwaVZyc0dpRlFKRE1YSk9OQ0FEekFlbk52cFVUMTIwaEtiX3BEUjdDa2RLbThQb0t6ZWU1UzhaN0h0NTZjYWltOF9ZSXZJLURZdWFuOTJ0ZXgySk9Ca0paV2p1Mk1LZHVOUDd3UzQ1dWZhTHZyT3dKSlRRQTk3eHNnVERXejN2WGJmSTVCX2VHMzVJVG9RX3EydXJOMlBfb2NlN2FRVU1mTkpzcHNQeTBkckVfekFoUW9QclVPNk1uU0dlS3NrRVAybHJzU2dhNUpsTUZyclVNNVdtMUREcW9oWnFqTDZPeXlPVFVvUXRrQ0dQUlVTM1lmbVFJcVpQV01NSG1wbXlwZUdiX0xSVDJXQm1hSFFOUVhfdVNWVG1LUWIxbDBJa1R0eEFNQmQ2NzNTQUJNVVllQ01zUWlXRWdxT1dBbVk3MjZWeWhneFg1bjMycEV5d2x0cXFGLUd2djlUMm82blFQRnVrWmNSc3c3TGROREx4V2hkMHVyTHFneDVyQkh4QXV4NlllaE9QYV9sYVR6WUVwUFhGSm5yR1c3LXpsYkU1UmtUUUFRNm8zbnh3TWkyLWFPREthSmxWS2EzNW5ZTHZPWUZtSUg1b3gwcHVBOFZGUXNmVGdGSjZQa2U5cWxic0JwcW82S3F3di16czIyWkxhWVkyNzlhRkUySXZ2RXhHakk2cW1HV2Y4RTVPbjFwOGZWSndqQXlqc0gzLXlwelFJOWFMYzF5WHVWcXFvNzVSbGlHZGE2Z21Ec2ZSRW5wVVNrdUgtYzVXTFBsX25jdFlmY1pKUU1IbWlLNUpPT3pnTk1IOC12ek1FY214NXJQeHpuTHI2cV9tWjhKb3MzSkFiMXliYm1PNmFoR0IwQ0hqZ0ppY0FOdXRQME1SMXd2eVd5Q3ZVUzFpclVnQ1RyLWNYOGFGblNKY2REdUxhMWY5TVV3ZmJzZTV6YkpTcFRpNUplckc5Sl8wLUwwajYzc0Q4ZkxyU2l2MGRiVnlhSl9SMTg3UWRWQzRMRERWMzhhRFZNM3FOdmNwYm5MdzBtYlZzZ2NFX1czTmtlWTRsbDBLa0I5T3BmRmdNX294d1p6T0R1S0lsdHZ2YVhkbGZha2E4a1BDdXJxS1BJZGxydC12bHNLdkdpQnBjNXVTUG12aGcyUEV4YThCQ1BBZHdocXo4aDl4Y2YwVko1MWtPRG44dWFWOVlzUlhtY0pOdzhZTXZXQXJnOXU2RnJzaWtsRXQ2NUdZbnZETTN5V3V3WlV1UUw5LUVvUUpCdTM2bUY3amwtQUFrYTRhUEZONWtlOVdlMEtObEtRZDFOVG9KR2w1dmZBUV9UQ0FXQUtQZjlGSjRyOEpzVFpWWW9lZE53OUJzQ2RLX3gyQ3pTdkZubzgxbE1JT2pyYWZLT0NpZ012QTBoTkM3NE00MXo5alZ5S1d0T0JXdVRWNEFFbGtDS1FDUXVBTnVmRFIxWUNoX0lsRzhVcklFR0VIdTdGMzhHUWVvWmtCd1NNMHoxZlEtZVVPUi1GX205ZHN4bHYzNGh6TFhUckx2ZGJ6YzJuYkV5R1pnSGhBWGVIZkx3eHFNWURwY0RmSW1XcEwwekJlT3JWWkNjZjdwcmNON2FRUGxSbTVYUUNnLWlVOUY1VXdkMUVQd1pFUGlNTGxGX1k5cGg2N0lzemNReG5VTmZZYzg1bnhIWVRBUzQxakFicmdJSjdfSy1KMDR5MVBib1lDb2dRcHN3cGlyNGZNdjR2c2RuMUtVbERxdkh4UjdZTkNXU1l4dlFmek4tNzUzazQwRERYd0xlXy1yS0tzSUo1LTY1RTJXYzZkNXZYLXpzdmJTbmhDRnlidE42X2FIZzZzeHlPc3lqTnh3N1pQVER4QXRXeHlZOWpZMzNnamI3eEw1WmdSMFlKRGVfaGpNS1FpUWk4LU02VHBlOS1YY3FuakVuWnBFdVJjUVBldnZKdjF6LVQ1YkpLMDZ0VnRLc01wSU9vR3FnbXBYNktzYWxNTXg4QVdCWUoxc2VfNmRZQ2o2TVVuckpIeEUwSXhzR3pOWkJlOXlVS1dzU2h5bUhZWGRTM1RDekxfNXhycjVuVy1nbUt3MkJTZUViNm52NGFoNTh6cjZ2MVBFZ2tMTGRuaFdPbjZZQWZCMzRzMDhWMDFiUnhUNEdSNEhSOWExSVJERVFVY3c2b21POWdoeDZCTkJKN29sNnVlZnBZbzYxNmdFMXgwWEFjQlBrVUJqTmw4eTVockJsOVlGMW1MWTJ1bEZUQkctaVlOdHhIdlZOZXllYzY2NTdxWlpYcUM5WlFfQ0txT09Qc1hrdWtEdndxMjhyNXdyWjAtbXhpOWZ2Z0J1NElsZ3FpbDIwQVZtSlZJRno4c0E3cFF1VThYeVlKTHdRbllTbG1mU1NqZEtoMUtrWnlsN2pwVjJ6ZlBBV2I1RWxsSkM5QmZUXzViQ2xfbTdpWUFlRGlnTkJXZXNwaVhuLXBUOWNnc1djdUZoYm5BTlB6SGtOYzZmOWVlb3p1OUk5N194SVpKSjF6eENtQUtZck0zTTFCNE1sb1lpcWJfblJDWGExbW4wdXFBVzBqSDZ4RFFLWW5tQVQyYnpRYXdYQVhxSmd0TXlza2xVaU04MkpOR01LWGFDLUZPTEhvYWt0NENBRm9CMzg1OTJHZ1NxODV2TXRqX0d1NHVYRmRtMGFTeUZjQThSTzlVTTZPelhncUNkaTVRWjZLMlVMc0FQTEdWdDFFUmZsWlFuX19SeUhfanFfbXZKTzhHcS0wWGd1RzZkN0pLQTluSE9QaVRnUW5yeWV0OTJqTEgtVTZuMjlIZkhrUnFNQWp6eGlCTk9WQk1namd4Y2VGeEVXRVFCYk9EQk5PcFJxM29oaXZ0WlFaMFN3ajI0eWloREQ3UzRTOVg4cXhhTVBGNFhOS0M5TW1YVzkzSGhLd01ZYXJfcTZ0UERxTlJJVGV1VGZCWnN1bWJITGR1YVZnWlVLczJTQ1dEQ1lrSXpHSHVyTmY5TFNtYWppOGJhZXVBal9PTTZ3TnIzUkFTdHhadlM0bGl3RmRreFBvNFB1NE9qbDFDTDFqY05BbTlsZXBLNlJxX1QtVkREeWdkWUxsSmM4U1UtZ3JCVUFiRzJtaGpPTXF4dUd5emdXNnExLTVjelBDeUZ3TGhkaVB2MHh2TGtyNm1Id3hMbWhldVBiUzNsNVlaMENQUl9qNTVNVnFwcGFzZW5Qc2JFYnpjbWlaQlhCNF9uV3Q3bWlSUFdnbWNCcFp6MUpMNFI0N3ZyX2pIanN6SkRfbmJhRHh3c2RPakFEV0lGSTlhTUhpM3lFdUpwMzgwRlFrWmptUndwaHoxSTJfNDhXaHhqLWlJcjc1WXFlUjVaRGRDNExNUTRDU2R1cVREV1Z3dm1wY21BWXRzalJaTlFESHZlTjdYbnJBU0s2b2pBN0dvOW4ydThoWGNyS1U0Sm5uc0dod1ZRSnJlN085SDJsWG5XaGZraF9IUnB3QUJQd2xZQmJRUUFzb19YUkFaV1AzOS1oODhNUlRiaE1jaXVHdl9Yb0c3LUpkSmpWYnAtT0c1cUo2dFAtM1Z6OEtSZFdJT2Z2enUyZ3YxSmJfeEp6LXBDY2xxWjlDT1ZNRlhCNXEwRHVTTGR5S1hpa0xVZll0M1hyM0Z1N1RyeVpzMDlrR3drV09NRmFCTnJXTHlKNkJIQW1TUURjZUc2cmNhTmtRZGlCOVItNVJKWXpEWWs3SFQzdDFvZHlEUDZBdDdfVzBxcXlsak80ZlFiRzJmM1RBMjQ4bHE0dE14c0R3Q240UmRtOGowU3Uwd2lQdzRJNnlvRkZaSUh3bjJhcVljSWJ1SllyZ2xJeXZ5a1cxSzBUdlg2ZVFId2k1YTZ3MTZZOFF3S085aEFJZlV6SWtxbl9ZRUo4dGp2ZW90UXMzWFZEaGtaMnI3UkZjdTBCc2xKVEo4TFVPLXhRNEdtSjZsVlN3OUw5TjRJNjhIMzRwUU9Ta1hValNaczFYRlhJbVlQZ3pRSEhwc0gyTTVOV3NsSmlucU1oLUxLd0xsQjBpaWF6b0lMRXVFWmJjNEpuakxCa2JoU2FuUEZZU0pNUXNRc21wYmxzUXVhZVFzQUNITUJIQ3pHQ3BicE83blBBbEFpU0xpc1hlOUs1TWZScHVLVDFDQTM2Q1Vpb0xEQ0haSW9ZMEVlVDJzQWthWW1tMjR2S183cjdWSHR3NklpTUxGdzlhMXJhdVdZSl8td0tjNERYM0pubXRWRDU2M2RwNm9ta1pMSm1Xd1hQOU9BaVFKd2g1bmFvMmFkX1JQbUdTbFZpa0x5OVk3U0NKbjlUTE9jV1k0R2hxVGZzTEE2RkN0RkxLNDl0dzZCT2hZSEF3ZkJlWnNnb3cwV0hYeldENzRiUHYxWkV0Q1o0VnFoTFdzRnRaWFF2V2FMNmhLUTZaS2llcktCdTcxbnVxSE9UT2JIVXhxOGJ3Y2lDVnhXaTNJalZUZlJ0cUltSXQ3Zi1yc3BncTFzbm5QRDJGUHEwRmNrdHMyUEJIWkJMOTEwTEtKVnlsRE5uR1J5cG9zWmliRlNkVlVqeU5HYUpyVTNEZGZFTmJ2R1A1TjZFbi0yTzNqckUyWWJPY0EyNXp0eTVvblhJQXRpM2hzZlAzWE5NREFpUXY3Rno5cjZNcGdxUnUwdndUelJtSDl2ZmNJaDhRX3VPV3c2cTkxbWNWTHBzcHhSNnE3a3hZbmYzTEhTYjE4YXd2bEsyMGg0TzVFVTJNWlVkWHJNaHRIZ3hXRmFtTTNLeVh1bHM3Ym13NFhVN3ctYWxiRC1oQ2dkWTNLUjU2U3MtM3hQdUwyNUpPS29ERHdldVVJWkx2WnJwNnI5bnN3VmZIZ3h1bU1GcTFQVG0zbzl2ZmZyc0xxcmQySm9VZU5zc1lVY1R5N1QtNkZpOXgwdFB2MDlzdGkxT2JCYVVvNGRiWHRRczRTSEwzTE5aZE5yNm9SdUpUa0hHYnJtc3ctUzZ3cmtBdDE3Z2c3TmpHOU5fX09GYS1VTVlyM0tJWXdudnBHQW03YVQ5QlBkODBjbFQ1UTVUWDJPYTRNbTEtSzh2VEoyN01CUjllMjZMMUNfcnNXTE5rZE91a0ZsUHNaNXdCTU5kVXNUajhVc21JQ080c1ZQWVpnbGhEMEtZSUNyeUpXdHR4Z25TNWFzQkZPdjJWOWszWktFOFZ0VE9GckhFb0I2QTNUQy1OdE1YNHluNk9KT3Z0OEcxdE96dkU2aHdPRHV2QllFZTFtb1pDblI2OC01WFctaGRVXzRwOFFzMmtTaGgtWFh6dUdaalVJb1Z1R0NsdWQwZzdIUTZtcC1wTDhhb1ZKbnRHWjVlVHRRSDBGNmk0Q3BQVl9hMkthT3NFbzRtMVd3VjhOSVdodW1XMGR2OHpfOERrcndPTlJwUVFKQWZsRkp1enFaanRYZExLdEN3d0ZoZ3ZnMWwtVWYzYmJjc2FjODNFc0l2R2pMcW9rZVdFdzBBSHkzZkdyTGd1UlVtZGZ3MEtjQjFuaFdnLlIwTk5LazVCRlFwSXJnRUJCc0I4emc"}' + body: '{"value": "JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLk9kems3TFFIaU9MbVZjcS1ubWZIWHZPTGlRMjEzeW5NOHlzU29JYkhyV2FoSlNsb2pQa2JjOWRfMG9JX0xBVnFFWjRUQWE5dDR3M1B5emRYRDloaTRPcWh5THRvbFRmajlxUndWcE1nZXVJaVp4WndpVnlFR29FOTN4dWNfOXp0Qy1aV3hmTTR2RHRPUG9KZUNDRnIxS1d2XzFNblV5ZGNjVzhvRWxXS0JscGlkRjZJQzI2V1BRMEQyWThscFNmMnZrN3FUejJzUjRkX01RSGwzSkZtdWtaU1hYTXJyNC1LcFBqaDNtNUhvWXM1bXFhNDZDNVFQUWVLRGNuR1lGTndhV1REQW5EcTZHaFZJNS1mU2ZEWUhqZVhJcUhtN3hmdllmVlBPTGdRdFJMbGt6VHNCUUgzZjlaYnlUczFWQ1JkeTN2MlNLNjhnbFFDOGFEcXBIU1FNdy5iby1PMVE1VG5HMGx4MGdpRjVSQVFBLm9lYUJUR043ZzNMNndRVS0wU0c3ZzRwXzdzU19KSVpJUmFqbktPZjdBNldnZ1AtbEZTTlVtV3RoQ0p1SjAyaFpyZW1mamRqcFBtLTJPRWZ3UFhzVjk1YnB2RGdMc1h3T28tRHZlTTdhNXRZVUxuYXJNXzhXVmp3emVpZ1BlUVpCV0c2UXAwbVZKX2J5RG4wUWJDb1FIRGdtTkVZWi04MGNXWVpJOEowNjBZVG1xTG0wM1RNN0h3ekpuN2ZjUnU5aXQ4WVVTZGl6Vk1nb3lNM1F3RWswRUlKWFJCZ19GVElEdWJIZ0Zub3NPaG81ZFRDSV9ZZXpTMVpkQndDOE5JZnBDalRSb2pEVFJpaUgwMmhXcTVacUEyNktIOXl1MGRZNTJ5TWYzWUlnSGZ4WjJrY3N6d0UwdlRBandyMGtSY0lnTXNSZV9MREROMWl4bjJQNlpzRkQzZVBLa3VNYmNmUi11RUxSV2VPRnpuWXVqeVRPVU40YkktZ3kxTVhpbm41aGJuZDYwb0tqZW5JYlVvT00yaFcyYURVRXlpWldXZ1hPNW5RWDVPSUcybEhEYmRUNTJzOGoyQVV2blJ3bTN1ZWF3dERjMFBveENCRzZMSE5CcUZJRkhqNkZfejl6S0FUUTlDaXBON1RRZE5yek1Pd3Q4NWVNTnN3bEZOOVdQd3pTSFJTb05maWxQN2EyaklQOW44SDN2NVloUlVQRFhaQ0VyYk44UDRLWEl3c0EydWY2czFia0J3UW1QRjk4UjdsLWZ1TDVRVnpWZGt4VzQyREdoMXJGcEwyQTFhQVpmU3lON3hNVEpzZ2lBNlRReTUwVENEc3lfcUIyMUh0ckRhMlhlT2JtNWI0QlBxelVjNXZYajU5LTBYeHZjX0ZoYUV4Nkx1Y1UtTmFVaWFfME41US1iZW9vMlh2SDZTNkhOSm94bFZ5RVVfUHF1a1E1bnZ0WW1JS0F3VVFXMng5WXhFa1gxTzVpd2N6Mzk0VlF1cjc0b3hkUnpzVHhKTGNIeDlpYnNBZkxtWjUwaUZFb3g2WnJJOWdVOGtTSmZ4ekhHOHRpSGNnYzhLTUpMaTdNZHhyZzEzSG12Y0hfMW5FemloMF9OUVJVY3c3X2xQSVBuZVJEX0hlUmRiU0ktOE9wN09hT2wwWGhMYWpKVUNrMXhzV0plNXVYLTh6SGxyT0ZTSWtlLXFIRkpjeDVlcFNyVWN0ME42bVo3akQ3bzJGb2h0cl9KNDA2Rk5hdXkxM2FEWTItTFRSSmhTSWNReUVzVGs3NXZBTHV3WElZYzJzMk16VXc1cEk1Qm9GaWhWOERqMExzNmVSNXAwbkpDeGFqXzFmWU5takFHSHhSZ2NGbzItQUg0RjF3ZXVhTEhDS0NNekc2bFBrQWZQb09kTHFWY2ZvRHozOGJlVl9ST0M0SFpmV0hySDAzVmxZaFFGdEVkRVI1XzMxQmdyQkpjV1JtQjJFTzFUTzJiYW42X056Z25wMU0zRTZkUExBaWZ4aUk3amxBWUlBUGU2UkVVc0lFaXdtd244MzQzRGdOR3FpeWk1S0YtSHZ4OXdCdmtoRFVDWmsyM0JzRWkydEs5ZkF6LTI4R3RHUW1TRi1Obmk5Q3NFQUlTRXlzcFBRSDFpV0ZXbU9WdGFJSk44QlowVXdXMjZRZ2I3NE9qTlZrem9KbTBibWtjSnVEb1pxMUZPX0RSd3VHYzdzd1JPTG9yTnNUSmFEdXB5d3ZlY1dLUi1rdlBIRnh1b1R0Rng3UjBVZ0FtQWhrZFZWMWlUd201LTJFYllJNm5iYXUwN0h3VXZHbzBfazU0dURoU05uMVVST0lHd1NqUWR1c1UzZThkTzNiVVhxdTVfVGFfYlB3QkI5TFQybkNPWlBSQ3A4TzlaZ1dKRWZxamZldl83NmJ6U05BZzJwOFh3UzBmbU5NdEphb0Nub0ZOWmhRSndtZ1g3cVlYX29oT0lEM01sUW5KQl95Wi1id1RFcjRKY21fdVkwRk5pVThSTjZvTjgwMjdfRWNybEI4ckw3d3RTRHhUUUxlVnl4UVFxaENFaXJNNWVHRGVNNldWc0lMR2tfNnRxSmM2bmNJdkxDc3hxZ2RNdlpYc2dqVTdHVkV5eVJNRnAwX2NQNVBndGYwdTJuclVJRmFUbWlUR2dhMXU1UWJUVk9hRDVSbTZvOHFmaTFzeGQtMlIzdEMtdkpIcU5rUTFLWGZNRDJ6d3U2LUJzTVRLUHk0bms0aEVxXzBIdU5DNFlyUk8ydmIzclNXZ3FHVEhmeGQ2bHdjMTJMazNDdDhIWW1vR0JzVS1vYldFejRYLWgzY1F1ZUdQcmNMaWNZZmsyTkVYV0Iwem5yV3BSaFd3enNTVEc2Nm9kSDRfeDRZei1HSVB1UXRNUjFNZ1BzSFVpOWFiam9rcmxRc3NqeU0wX21idGx3VkZob2paU3JzVW9LV0tBTXV0bVlkRFZKcmNmRGxCX1dXVF9PX0xxeHEzYVl2ejF6RmJadWVBcTBBMXlCSjFjdkJvZTVQS1JZcDRkS0c1NVpfVFp3NzlvYjVkaS11SWxoUzd5Z09XRi14bnFDdmg0TlpPME45SUkyWUduVW5wcU43TlNtbXJ3LWx6QzhnS0JfUmp0T1RqVWdSWjZtakFHZ0toYmViVTBGNWdYRENNeXRLM2NtNkpiRGs0SjZMaGI2bVJLTEhmVjN4SkNwMEdQOHN2UUdyOWx3d3NyNmJNMHNUQm51NllkYTRPeE9SNDg3aG5QVFowWU01RjFoc2pFM0p5cTV6MklWQXQycGNsTHhET3I2REMzUU9oN3NhTHNVWGRkbzVlejQ5V1E5dm9qU2RqU3YtMzEtZ0hncTVUaVFYY0xwcDVaeUZCcFNzMnVaVWdCb0lKLWpmRjY0ek1kU1lzZTRzbXgydjNESWlCNFNsRi1Kb05uejRLaUxkdEdTUVlMNW41VU9iX1pQa0Fwa2FQRnYza1dNM3Y5cjUxQ2dTS21ZWXNMMmJFUHBlV045aEFkUXJtYlJ3ako1aFZXT3RZT2dWcXM1dHBYSU1reDFvSnVuanF3dlJfS291MGw4cm5rSHhHVE00V1FGb0hqWGNFS1ozNHk1QnFmSGhiUUUydGUtRXNjek1QOFFaN0l2NzFEX3JwYm1IdDg5WTRGb1Bfb1ZkYW5YSUdJT3RDdmVsWVdsdGZ3blgwYTZTeWtRc2JDcXowb1A5RmFueDhibUlyeVNSSXdZVjVKaENQR1ZlMVluaXhqVmEtcVlVT0tXWG5tZU42M29RS0gtd0FyVTgzR2lhbFlCT1pNWVBCQTB6TzlyYkVYaHNLajFXQ2VnQk1iaHRvemhuY3VmZWpQX0JlUUdBOXBIRndsNnFJU3pPUGt6UC1ucEFCbjRxWVhXWk5JbWxNb1pyNzRmNnhVSXduVThyQU5EZGgxb250ZmlSbmxFdjJucFFiRFF6ZklvemFraTlsUXkzVWZCV0ZvMWR1emUyMVRWb1lqc2E2a2RSZzVJSUNyVDlnNVY3NGptdnc2SmVROUdQRkdHTXlablN5bG5yNEN0ZC1TY2xmZnRXamxkUW92cGhzaU1sc09YQVZEaVFsNktSazFkTEpTSVVwME93MXhOMG1FNUY3UF9OLWVTWWJ6azVGcFZTaUFjNWMtNklha0toUk5wd3NyX1ZPem41amt0UFBWWTFpcFZXNUhuVUpDaElhSFRXMDB1NmU1TVd3NVMyQzJsWTdIVXNESXF4Zks4bXJJXzZlcTV6LVNlaC1jMVJfLWw0aVdlemJULWEwUWxBNGtYdWpZNzRvNVduTDNwMDNDT0l2UzZUYjhMN2VXNndyYzRab29XRHFrUTlhQjNscXdwT0tBMEFCV2tSSUprV2dsZlZMUlQxUVM3Q29abmxFeUVlbTBhRnNKdGtTZWNnX1RkUFBUNndfT0I0Y0xXY0NJZGV1ZFd3THlieGgwNkhBQVR5dGYtMHZreTJxT0hkd0dJbFoxQlhTdmlSX3Y1LV9SY0JUcEZEcjVMcnR1U1JWQmVsRmlMWjJoaUUwQi1VUGwzQ0Z5OWtHdy01TTlVNmNKNE9CZnNMemF1Q3N2eDRYeVl3VnA3N3BzR3M3M2h1T0t0T05td1BHWVlPOUFuUm5ENFRmeV92ZVdZdXpRclZHV0Y1bms1WnFJUVZ3SVBaUHhLaUpIZXdFcVRiMXN3Z2RKSnV3ZC1PV29HMnZLZ3hWdVk0UXlzVjQzSUtjYURERzNROXZEWXNTNWU4enp4NVlFQVBXaGNhZ3M5UUh2NkJFVDU0LUpCTEUxc3F4Wm9jOXRVVmQtVWV2NC0wSHU5TEN2LXNnSWROVVlHT21ZRTB4NDlsc3NwQmVod0JBaUQ2OUh3V3Nud0NpNTBFSDdQcVVoOTZSYW1VU1IwVGxSWmx4REZoSlNsMTNWWExtLWZiX2VjV0I0NHl3NWt2WDhCTFJ6c1JDLTlfV2tyOWNRUGNLMWVxWWRDeVdxUEpBMG1NUWFqRlh5QTlwQ2JwZ1hGZWloLWgxaExLdHE3anJydnh1RWVxa09BM3QxdjB0cThCRUxTTUlxTGd4R3BwU21QeEtZeUgtVXdPS1A4ck05NmFacTY5STNpVlFuV2J4OFVnMEpNQ1liNmRVWHVOdGplSlk5TEFoXzl2QWRZSGtQYUVVZzRwV1h6X0JWMjA5SVFxVk5ZNHpmX1dVU3dQNHlYUUFqdElUbUR6b1REVUEyamk0R1dPOUNxN3pRNzVUcmVoZFlNNWVhLVpwY3RKQjlCX0xOdEhVclpNdHY4SlNZMUVscWxRdGc1dXladFBid3pWOF9jUkdEZnY4M08zR3hvYzF4bld1aHQ2UDRuQi10UGVyZC1taWN1U3g1VFRjMGU2Zl94TmJUc3dpRUE0QmhRS3dZVDBKY2xvS0c0UkQtUE5UOExlZk52UFBWZnVQSEdfSm1aQUdDOVJEcWFra0tXSF9EU0Y1Y0RfdW9BTndBYkhNUFlpY2ZDOHZETXZUcGNEdUs4NlZyTVRSNjFMdXpQWWxMdENxNWdiQlhZaWZFdlFJVm11TXVHZHF0SFpiUHZFSUo4eUEwMHFxdVd5cFFVRTZ0RWhibzRNZWt4R0NqTzJDaEoydjBobnh0MFYwenFBcm1xaXFYOVJHdUVQSmstOXkwY3lfWVNPX01jRmpMWGZhYTdHQjl4aDlTSVA3UGlSUmE0MzBEaXBaSnktejJxbTNXbE1KNW42Z3g4OFE5U3FqSU9mODZHQUJLRG1XZzhFbnJZa3lxNDhReWFwdUhOUlVHMFQwTFFGYjc0U0wzMUhPbWhQV0F1WjJrRl9XTDYzZW9JTlZTeFBoU3ZSMEVWYmFpdWtvcHhVYW5pRTlCdWYta1JHTnVlX0pBdTJZYzBKcjJ3UDd6YllIZTJ2QTdGMFBvWmt0cWp4LVZTTlN4QmE3cFYxZ2hpV3ZfZlhILVQ1MF9XQXFNSUZjWWhkeFdNNXJTZnFPaWxrVmNCbkJ5TUhQLUJwTEo3RTJLVmNoRzBGemxvQkZvazBEYzdtYkJBTEM2NEQwMVA1U01zZGY3bGpaOThUdFAwc0dDcUJuOTVsTUwtSWpnOUhDblZNZ0ViODFma3hLaFBXWTUzNDNDVjhiWnNyUDhtamZZUzNqUThoSmlocjdCb0c3amZPOUI5aDJkamFScnp3OHFKeEJDRHZRZ0M4VGZjOTBMY0pxS2YxVEc5UE9GQ1dLV2tRWXNSck1JdHhDWF9kTi1jekNNV0FSSUNhYUYycFdvTXNEY2tZdTRWV241UzFpNjF1NTdvdG02NUxPV3RoSlBDc3ZKaXFGaUtoajhHYWk4OUYzcE5xTU1YN2c0V1JmUXZIVmxucmJUeTdSVmZPaE1HYnlLX0VKWXVVTnU4dzFVVWFSS0JoMW9VcWNVMnBpNG9JV1k4LTFWb2NYMkpfTW9KTFRsTWlNSFZ2V2k3bDdLMDByNE1WbFhHWWhJSXBLdEJnN3BZRVQ1YlRqeTZfWVFqZjFKbVF6TnNJT1U4aGdtc1lCcTI0eFRoSmRONmdsNlhTRzI2YmgzMkNYZnBvS0U0M0tuY2tDUm1MeTdCbzQyV0t5SFhFUk9qYzJHdHh3TmJ3ak4wWnVkX2JJSkNtOW44d1hMOEpqencxeDZRQ1RKY1hSTGdLb1J2RWRvNmlaOUMyR0F2UWw0T1B1dkxobWpEV3p4LW9Ec3NnRXZmdEFYd0dWSlZvYVJhVWJET1EwM2FBdGh1ek9LRXhaTzNZamxHTzZrWjFHRnhGbWVneXlNQ3JoOTJiVm9tYUdSaDkwX2s4ZjVIbmlHT2dGdGlRMzFaUmtCc1JyTnJoZUlLb2Q3dTZRX2xSUEhMWk5pRk9UZTU4cjUwdkdKMVdRMzhYbFBHclhoekNWYTdFVGdRUURDNGRlTDhuM3FoN1lJbHlpcnBmakxyTVBUaURYMWNQSEppR3pjMmVQbVBiUkk3VFpnRE1HR1BTdUwyRUltWXNINzhvZi1HdDVya0t0eHZidW5jblJuZVMwUm53UFRYQmdFT1FKSExoWW5PbXRmcmIxTjkzVDI5U19udnZjRUZFOEpGZWtadXhxaEZJRUlKZ0lmbHQxSURxNEZSRFJVaXh6N3R6eVlIcGFtM1gzbmxUMzA0UWthR1hLb0N6YndUVVFsdldGR3BCVHZQcnB1dmp0VllNNzc4cGUtZHZxQjM4Snl3VkNoQVhnbDV5d3dpRHlCOFlTWUs0V21BNzQ4a1A0T0k1N25oc2hwSWNVX2pfS1NQclFQd1BXN2pxbzY4TjNiYXNYTW5ORHNUcjQ5QjF2cE40NGQwWWIyRzdTZXRzaU5SV1lhdmhZa0d5YjJPZ1dqTG5LMExZbGI1Uzc3SzdXN3J6S21uUUNfb0VnX0I3aERFY2NKUlJQd2dvazJiR2dYN1R0Y3pydkNtOElMTEpnUXVvVmFoREx1OGxGT3o0aEtYUlV3dlRwdEYxV2Z2WG9QOFlDc3VLYkRTUW4tVGxOc25DQzhmX214M0Vob01vUU9YS3pRRTN2NzhLb1NSRTZXWUJmVjlCNjlzY21pdWpSOHFyYTR4dVZfbDBnWVNLNDJaQU03enFKN1NqQmt1eGd2Vm5wSmVTbTc1c2NSZFdaSFVJam8wNDB6bTFlbmlLZlBGSWFZNmQxLWt2Y1BkRFFVLXhabmgzZWRQRlNTM0NDTUI2Rk92OG9CTWZ6Y2RmZllqM3JHRHVfSFJLbF8xaElwa01xdTNfckpNVjBhcVdsZm9aSVRhZnhYZ2tPZlhaemNiQnNCOGdXLXgxZ3FMT3pqUllVRGowVTk3N1NxX2x3c0ItQ053eVFoczBNNXI4bWRPeS1hQVBOUW9xb2VlN2I2MGR2RklUZUxMUE54TnB3LWVnbDNlRThucnhNN2FrRVB6enZLZlJOMHNPOE5QZHE2SUdKM1lDZzJQNnZPeVI0aDZPcjZiQlF1cXYwVkJ6cWo5bUJuZ0pyT3p2YnI1dTZFMUhORGZObk9NbFpzeGRnQnQwOENHUXdJUTdPbXM5blYycjRrYmQyNVk2OEZLbE1DMFhGLTZHdHVFY18ycFhQR1pldXlVUGNVVDNVUnlWVUp3UFJfSy1YaEdQZnJiN1d1TERTcms2LTV2Zk1OOC1ZanUwSzk3dEx3b0lkOHVVTVg4VHZvUWF0LTJCemc4cWVzSml5ZzdiWFl3anNiQW04dm9GcDQxSTdmWWVpYzNoQnZ5OVBuYVFsZUZ1a2JZY2N3bF91YzdzRl9Ea2NiZFpuYU1SNTRvOHkwZm5tT19sbl9PYTdNTmRMcGhWWmY1LWkwTXprdjJ3U3J0REVGYmo0ZFc5UWNHWlNpY2YyaGZiUEQ2NkFKVlRKVnBxbnAwd1Bia3hGajg2TUZxWllIYmFkajNaY0tmWDh1S0dXdlhZdE9QWFAxT1kxby0xWVNVSDA0ZV9oSWhud09acTZYNVJVajNoZnExQ0RyVmxTU0lzc3NhWHRkNHR0Tm1SUjYwaUlxOXBOR2gxZzJKMEdNWHFZUnQ0cHpVNTRlMjJXUjhnWjlPTV9XNkMyV2t0N29uWWZFcU1FNjR5cTZKamF3TDRzcHN4WFVBSTZ0LV9IY3JNZGd0Nm43Sl9ZVkgtWnJRZTEtN0NYUkJYcnF1cVF3VVctMkRmOUozaWcwcXR4VlFaRG1sZXdCbUZnZ3FXS1Z0OHgzQnl3d3RLWnRaai1saGJHTlNYTEpkSlIyTW1wSEY0YnhIWUxaanlITjlRb3JZOUxaNzBabFFBX2xSQ1BSTDdIYXZWZER6YVMyNXVhOW9iNWtNb2ZfcF9SZmpYNm8waVk0dUVUMTUxRGoySzBZMHlRb1J4UWs5dDhiNTJBdUNzUTA5NDVlU1pDY3lDNG9SN09uZHJiclJuWWtDTnVMdm5ZOUJYSHZjbkwweUJRQTZIUHRRM05qNllCUzktSHV5Y0dQNDJTY3pZNUJDQ1NnYTlxaFVtTDh3UUNhbEc1akZuZ3VDbU5mMmRCaTJWUnFucmNlWUVyaHJkWmxrMWF5UjZ0X2ZJOGc0emdzQ3NkTUswN3lJck9kbWZhZXBERzZ5ZTM5YWJyN21PdmJ4eEZBNjlINTFSUENfUDhOQ2pBRmpYVVp5UHdLOVNmQ1hLb0VwZVZVWlpRWWgwVFQxR0hJTy1WZGJoR0x1T2dDNGh4RS1jc3FHQ1hGS2xFMjV4dU5maS1uZFpaZzRNc0F4cVp5VTJpbm1sN19RdkhpaUkwVFB4eXZfdUtlSFItbGJ1eEw1RlAzY1Rpc182X2pteTE4T0pIT0hXaF92WExKdk1JT3BlU3o4Y0ZWeWRwMGpUbEVfMVRyR2xmQklIQmFKRnJJQkxfc1BXZEtJSUFDUUxUemZpUHdTSGZDR183V2c2U2I2MG1yTFhSc24zUDlLTGNkYVVoanVsOTZKbWJrTnZxM3JwUDJlUjJkWW9TYXhsTTZUNGVDRzVEREtlVFZFQXYtQ3J6SzZxWElzQmxEdDFGUnpEQ3lGLW9tSFRIMTRWZUJUcWxsNWl3dFpwSTkxMkIxUDNiYXNwLVVlSFdTSy1ZVmhBSVZXN0VBSE45UVhGMm1OVFhWYnozLWd2SlgtM29wMkhXWEtBMlctQ19PMWZTZWpyY3NhTjNGNThFd2h1UEpncVd4NFdsQkY1SDdjYk9JTzkxUkZ4OW1qcTB0SjFYaDF2UEo0OUJiTjhJeFRKOEZPSG9sRXFnclhiQ3FpZnF0X19kRUlON0JhS2Y0SE93a191T3lybWs0XzBkU1FCZ0ROWFdNNkQwQVVXbHJKdkxhaVhjVlhXOFRNX0ZwRVhEUVc0MzRvNGhmdi1zTkctWUE3Y2gtUFVET0pOR0JROFhjOHRvWmtfb19mdG9sUm9rS0Y0LTlOZHp6RVdDRjNnRzVBaEJzN3lsbUtldDhxNWJoZkgySWR6Ulphaml3eHFCV3IxdXloZDFXRG9sbXd3dFc4dU8yWlAyMkRsbFhPRXB0bERfUmF5bVpDQ291Vy1CbUprVFpJaGlOeDh4aTBubGhzNTQyZUt5eXAtQk1RdXl6YzB6c0pZVEJzN3I4QXVpeTlJM0hma1dnYVNoZ3huM0Jwdjh3NUJiTjZGSWozTVRvZDljaVVFVU9GckRlTThMVFBTa2ZOcm5hUEpSTS1sWEt1Mk1ER0w1VVV1VHdqOHYxc1AwaUFMSWpOYjFraXFvWGRyXzA4YzB6OEp5QS0yQ1U4LS02YndGNEZfZFdpbmd4elBoOGt1cVFhdlk4Zi1hWVFLWm1JYW9nUjFLT1dhR2M5V3Y4N0xPXzN5SkFqVUNGVFF0amhFdm9TbjViS2xRLWpwQjlFVzh6djJwUUFwSFJyV2ZCNFJlMTlTR1BNLkR1QmVad2xRamtvb0lfNXRvRFJQVVE"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '10608' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault4e00e7f.vault.azure.net/keys/restore?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/54248fddc148400a9df744075bbfe2e8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lsgBFBFSUvohGWs21xzMCFc1IRDfnH0UlZ8aJnqVozFkc9rZgaBdr5IOVmt41hxbJY2MWuJxGpS4xAZ8AmrQZ1MOmS7nUiMmorcyqZZIcZYz3P7YXLjiv-ncb9rTty7IJ2R9v111Beiq3tNdHUrQYUt1wiysQPcPk69FGq7h4B5UqDM4SHQqXF-Rm3R2fU9wct7bx3F2XqYcaMmQWZBiYMH8vbooZWyh2QziCXVB2MhfBt0gTfoLUGT4hheDyLfIgbhhky6Hi0DC-3Ecll3tlK6JHAR6V1jLxJveWPgUy2WgRMSTATWdlcYL_i9Ji9OT4dSLkCFqXWhRN8krxXf9dw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/6335121a5c4e43919f25f6688e470924","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zPfZm_2ZxRIlx2K1MjSGUuBBpyaJjU_gk2yp9T9Ow8bvac_t6RgXTmsdK-4x27G4h1XjY0QVXkuJwnNxrUbSwrrNsxJtaz-KyCpetoPLcAEp4-EbEF2w-Q5fAPB76ngr-RKlHUv6fww8rfWWRxKb-GmtmYAq_BsUG7Ci1ALoF3dIxKyEpqueY0TeWofWxUKpftXLyjAIcuBVRO5UVSUv1bSfLl1mzm5Wxl6pk6G_BtAi9cn6TS7DERSSEilg_Raz53fCXt5MaoFnDpT5oRIl5E2ZaxaLJ2KwLxoZERB4oZ2vPGgjr8MocaOGY66xwVKZQJKttZmDy-7pUKWMxoBG4w","e":"AQAB"},"attributes":{"enabled":true,"created":1564526988,"updated":1564526988,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '648' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '648' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:49:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault4e00e7f.vault.azure.net + - /keys/restore + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_crud_operations.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_crud_operations.yaml index 15050919b2c8..bd62679835e0 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_crud_operations.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_crud_operations.yaml @@ -4,620 +4,650 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault5416109f.vault.azure.net/keys/crud-ec-key/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:51 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:50:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-ec-key/create + - api-version=7.0 + - '' - request: - body: '{"attributes": {"enabled": true}, "tags": {"purpose": "unit test", "test - name": "CreateECKeyTest"}, "kty": "EC-HSM"}' + body: '{"kty": "EC-HSM", "attributes": {"enabled": true}, "tags": {"purpose": + "unit test", "test name": "CreateECKeyTest"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '116' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault5416109f.vault.azure.net/keys/crud-ec-key/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-ec-key/7e76b0fc24ca49de8d22b283874b4aa8","kty":"EC-HSM","key_ops":["sign","verify"],"crv":"P-256","x":"FDZyxw3F8gSsjKrFwIAxsZ7UFqXykyn9dhPZqUCZ2uw","y":"uwkjuEzOUxSMEh1gm35SysHWS9wrpCUObRu3bzy5eoE"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"purpose":"unit + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-ec-key/3f38336e9de04e7ea3a3ba86094fe0c0","kty":"EC-HSM","key_ops":["sign","verify"],"crv":"P-256","x":"KPH8P9UF3zj4Mb-E16WdJk2yE1v4RYMbbI3eraGUS0Y","y":"wXamLF3U4ekD8lKEixbJ1JNaveo_aWkvD6fllRvCAz8"},"attributes":{"enabled":true,"created":1564527027,"updated":1564527027,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"purpose":"unit test","test name":"CreateECKeyTest"}}' headers: - cache-control: - - no-cache - content-length: - - '435' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '435' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-ec-key/create + - api-version=7.0 + - '' - request: - body: '{"crv": "P-256", "kty": "EC"}' + body: '{"kty": "EC", "crv": "P-256"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '29' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault5416109f.vault.azure.net/keys/crud-P-256-ec-key/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-P-256-ec-key/ccf44a9e1f0a4f65b16196c5115e7580","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"Xp3Dh254KJvTKQEI-SEno4nr47Ste9Q0OozXC1mB3os","y":"jJ2D4Cm41HnPPyqeAtcPGUAOLX7e8B2dzBLz4-HpEiw"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-P-256-ec-key/1085fdf8d174406bb92d1c4dc73559f0","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"29pQuyVmhkbuizq-9M-ngz-H59dPnQ07GpzXpWolEVE","y":"b3owWVWqXekjdSKuf5RnuJqyGAtUQr8J5DxP1CQhG4o"},"attributes":{"enabled":true,"created":1564527027,"updated":1564527027,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '376' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '376' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-P-256-ec-key/create + - api-version=7.0 + - '' - request: - body: '{"key": {"n": "AKCRTQAjSsaDshtMFdW-2Ie9yVnC5Xr1Suc06PAHINd10nXkVSB-N4TO62ClCkZV3XKnqU0nHo7o95WaZpym53W_DiO62umRtFKdl4UotL2QUh0y3SZWeWuoK2u_x2aMj17rUFN0f9GZMZ0pqEQNCPRBLVJ_-TEe2nGCWSC0exxGsRqz6R1zFkB-icfzQPe4WjQELOUXQ7J9RxhAPTTHtDivYYG-BeTRHrmF04JT1_6b9T_C8bAC0i0teT-nmlBLarQtBJKATXBx1yegbPOoiTqlQrFQP4MrKWNxtnB9Tcbjcvj-Z9je0ckI_eRc4DvAhqcUh_p15Dqg4GeaoNIO_jU", - "q": "AMPcZrZBqbc82DO8Q5zTT8ZXRGWrW36KktMllaIk1W2RHnRiQiW0jBWmcCgqUcQNHa1LwumjyNqwx28QBS37BTvG7ULGUoio6LrOeoiBGEMj-U19sX6m37plEhj5Mak7j3OPPY_T9rohjTW5aGGg9YSwq4jdz0RrmBX00ofYOjI3", - "p": "ANHerI1o3dLB_VLVmZZVss8VZSYN5SaeQ_0qhfOSgOFwj__waCFmy2EG7l6l6f_Z-Y0L7Mn_LNov68lyWSFa2EuQUeVj4UoFHc5Di8ZUGiSsTwFM-XMtNuv8HmGgDYLL5BIJD3eTz71LdgW-Ez38OZH34b7VeG8zfeUDb8Hi30zz", - "key_ops": ["encrypt", "decrypt", "sign", "verify", "wrapKey", "unwrapKey"], - "kty": "RSA", "dq": "AKC9TAo9n2RDaggjdLXK8kiLrBVoaWFTpqXkzYXRhtsx4vWPAkxhfSnze05rVMl6HiXv7FnE0f0wYawzUJzoyuXBH0zS6D9BqCZPeF543AmWB27iPf38Q9Z8Rjr6oBgMSnGDV_mm8nDVQkeaDyE4cOZh-5UKvKShTKKQVwunmDNH", - "e": "AQAB", "dp": "AMmhWb5yZcu6vJr8xJZ-t0_likxJRUMZAtEULaWZt2DgODj4y9JrZDJP6mvckzhQP0WXk2NuWbU2HR5pUeCN2wieG1B76VKoH76vfnaJDqT1NuJVBcP2SLHog3ffwZtMME5zjfygchG3kihqOSpwTQ9ETAqAJTkRC38fEhwAz_Cp", + body: '{"key": {"kty": "RSA", "key_ops": ["encrypt", "decrypt", "sign", "verify", + "wrapKey", "unwrapKey"], "n": "AKCRTQAjSsaDshtMFdW-2Ie9yVnC5Xr1Suc06PAHINd10nXkVSB-N4TO62ClCkZV3XKnqU0nHo7o95WaZpym53W_DiO62umRtFKdl4UotL2QUh0y3SZWeWuoK2u_x2aMj17rUFN0f9GZMZ0pqEQNCPRBLVJ_-TEe2nGCWSC0exxGsRqz6R1zFkB-icfzQPe4WjQELOUXQ7J9RxhAPTTHtDivYYG-BeTRHrmF04JT1_6b9T_C8bAC0i0teT-nmlBLarQtBJKATXBx1yegbPOoiTqlQrFQP4MrKWNxtnB9Tcbjcvj-Z9je0ckI_eRc4DvAhqcUh_p15Dqg4GeaoNIO_jU", + "e": "AQAB", "d": "Ynx9JGaBSP4iUsf6ZJ6opantRNdcdmzaQrKbZg6ZQE8Ohi1FYabJWvaoPSE-CiJEsDzShXZHMhUHN4X7Bn8BXaGQhK3p9HXgiwQKmix7oAJTu4ElUIyd8UC3UWHSZr40el4PaQD-HYu_eMzCXus34MnRiNbh_BUWm6T-Eidhk9d3kNIyaSi9YNDQHW6tjWrEhhq63O7JU1j9ZonFChZxpKk20jdkQKQURVAdpOdL-5j4I70ZxFuU6wHZj8DS8oRQfwGOvZKbgYDb5jgf3UNL_7eACqq92XPVX56vm7iKbqeyjCqAIx5y3hrSRIJtZlWCwjYnYQGd4unxDLi8wmJWSQ", + "dp": "AMmhWb5yZcu6vJr8xJZ-t0_likxJRUMZAtEULaWZt2DgODj4y9JrZDJP6mvckzhQP0WXk2NuWbU2HR5pUeCN2wieG1B76VKoH76vfnaJDqT1NuJVBcP2SLHog3ffwZtMME5zjfygchG3kihqOSpwTQ9ETAqAJTkRC38fEhwAz_Cp", + "dq": "AKC9TAo9n2RDaggjdLXK8kiLrBVoaWFTpqXkzYXRhtsx4vWPAkxhfSnze05rVMl6HiXv7FnE0f0wYawzUJzoyuXBH0zS6D9BqCZPeF543AmWB27iPf38Q9Z8Rjr6oBgMSnGDV_mm8nDVQkeaDyE4cOZh-5UKvKShTKKQVwunmDNH", "qi": "AJ_nrkLpK8BPzVeARkvSHQyKwMWZ-a8CD95qsKfn0dOZAvXY-2xhQYTEwbED-0bpTNEKbIpA-ZkaHygmnzJkNbbFAnb9pkkzU8ZQqDP3JNgMfVIroWx58Oth9nJza2j7i-MkPRCUPEq3Ao0J52z7WJIiLji8TTVYW_NaiM1oxzsH", - "d": "Ynx9JGaBSP4iUsf6ZJ6opantRNdcdmzaQrKbZg6ZQE8Ohi1FYabJWvaoPSE-CiJEsDzShXZHMhUHN4X7Bn8BXaGQhK3p9HXgiwQKmix7oAJTu4ElUIyd8UC3UWHSZr40el4PaQD-HYu_eMzCXus34MnRiNbh_BUWm6T-Eidhk9d3kNIyaSi9YNDQHW6tjWrEhhq63O7JU1j9ZonFChZxpKk20jdkQKQURVAdpOdL-5j4I70ZxFuU6wHZj8DS8oRQfwGOvZKbgYDb5jgf3UNL_7eACqq92XPVX56vm7iKbqeyjCqAIx5y3hrSRIJtZlWCwjYnYQGd4unxDLi8wmJWSQ"}}' + "p": "ANHerI1o3dLB_VLVmZZVss8VZSYN5SaeQ_0qhfOSgOFwj__waCFmy2EG7l6l6f_Z-Y0L7Mn_LNov68lyWSFa2EuQUeVj4UoFHc5Di8ZUGiSsTwFM-XMtNuv8HmGgDYLL5BIJD3eTz71LdgW-Ez38OZH34b7VeG8zfeUDb8Hi30zz", + "q": "AMPcZrZBqbc82DO8Q5zTT8ZXRGWrW36KktMllaIk1W2RHnRiQiW0jBWmcCgqUcQNHa1LwumjyNqwx28QBS37BTvG7ULGUoio6LrOeoiBGEMj-U19sX6m37plEhj5Mak7j3OPPY_T9rohjTW5aGGg9YSwq4jdz0RrmBX00ofYOjI3"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '1724' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5416109f.vault.azure.net/keys/import-test-key?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/import-test-key/7123c497acc9445cb23e076358438cbe","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"AKCRTQAjSsaDshtMFdW-2Ie9yVnC5Xr1Suc06PAHINd10nXkVSB-N4TO62ClCkZV3XKnqU0nHo7o95WaZpym53W_DiO62umRtFKdl4UotL2QUh0y3SZWeWuoK2u_x2aMj17rUFN0f9GZMZ0pqEQNCPRBLVJ_-TEe2nGCWSC0exxGsRqz6R1zFkB-icfzQPe4WjQELOUXQ7J9RxhAPTTHtDivYYG-BeTRHrmF04JT1_6b9T_C8bAC0i0teT-nmlBLarQtBJKATXBx1yegbPOoiTqlQrFQP4MrKWNxtnB9Tcbjcvj-Z9je0ckI_eRc4DvAhqcUh_p15Dqg4GeaoNIO_jU","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/import-test-key/42143a5692c24ebb9e9b3a5e951aead6","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"AKCRTQAjSsaDshtMFdW-2Ie9yVnC5Xr1Suc06PAHINd10nXkVSB-N4TO62ClCkZV3XKnqU0nHo7o95WaZpym53W_DiO62umRtFKdl4UotL2QUh0y3SZWeWuoK2u_x2aMj17rUFN0f9GZMZ0pqEQNCPRBLVJ_-TEe2nGCWSC0exxGsRqz6R1zFkB-icfzQPe4WjQELOUXQ7J9RxhAPTTHtDivYYG-BeTRHrmF04JT1_6b9T_C8bAC0i0teT-nmlBLarQtBJKATXBx1yegbPOoiTqlQrFQP4MrKWNxtnB9Tcbjcvj-Z9je0ckI_eRc4DvAhqcUh_p15Dqg4GeaoNIO_jU","e":"AQAB"},"attributes":{"enabled":true,"created":1564527027,"updated":1564527027,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '664' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '664' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/import-test-key + - api-version=7.0 + - '' - request: - body: '{"tags": {"test name ": "CreateRSAKeyTest", "purpose": "unit test"}, "key_ops": - ["encrypt", "decrypt", "sign", "verify", "wrapKey", "unwrapKey"], "kty": "RSA", - "key_size": 2048}' + body: '{"kty": "RSA", "key_size": 2048, "key_ops": ["encrypt", "decrypt", "sign", + "verify", "wrapKey", "unwrapKey"], "tags": {"purpose": "unit test", "test name + ": "CreateRSAKeyTest"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '177' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"test - name ":"CreateRSAKeyTest","purpose":"unit test"}}' - headers: - cache-control: - - no-cache - content-length: - - '723' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527028,"updated":1564527028,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"purpose":"unit + test","test name ":"CreateRSAKeyTest"}}' + headers: + cache-control: no-cache + content-length: '723' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-rsa-key/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123?api-version=7.0 + uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"test - name ":"CreateRSAKeyTest","purpose":"unit test"}}' - headers: - cache-control: - - no-cache - content-length: - - '723' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527028,"updated":1564527028,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"purpose":"unit + test","test name ":"CreateRSAKeyTest"}}' + headers: + cache-control: no-cache + content-length: '723' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"test - name ":"CreateRSAKeyTest","purpose":"unit test"}}' - headers: - cache-control: - - no-cache - content-length: - - '723' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527028,"updated":1564527028,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"purpose":"unit + test","test name ":"CreateRSAKeyTest"}}' + headers: + cache-control: no-cache + content-length: '723' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-rsa-key/ + - api-version=7.0 + - '' - request: body: '{"attributes": {"exp": 2524723200}, "tags": {"foo": "updated tag"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '67' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PATCH uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703473,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527028,"updated":1564527029,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '706' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '706' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-rsa-key/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703473,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1564527029,"scheduledPurgeDate":1572303029,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527028,"updated":1564527029,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '841' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '841' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-rsa-key + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: crud-rsa-key"}}' headers: - cache-control: - - no-cache - content-length: - - '80' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '80' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: crud-rsa-key"}}' + headers: + cache-control: no-cache + content-length: '80' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:32 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703473,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: crud-rsa-key"}}' + headers: + cache-control: no-cache + content-length: '80' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:35 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: crud-rsa-key"}}' + headers: + cache-control: no-cache + content-length: '80' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:38 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: crud-rsa-key"}}' + headers: + cache-control: no-cache + content-length: '80' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 + response: + body: + string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1564527029,"scheduledPurgeDate":1572303029,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527028,"updated":1564527029,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '841' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:57 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '841' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703473,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1564527029,"scheduledPurgeDate":1572303029,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527028,"updated":1564527029,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '841' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:57 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '841' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_list.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_list.yaml index 51c87bd8cbb5..b32c1b43787b 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_list.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_list.yaml @@ -4,464 +4,374 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key0/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:51:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key0/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key0/c3878937d48c43329f222ec5d2b76c1e","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lJIfl9xtZMQVY21_qGFK5QXeCbwhavw_7CUAht9SAK_gIEG4AI4NIOeOi3dS0QdJTYfPUrcpySR7Bk3T87AqqBh-CKkWKIZ3nhYL6PAyycCddK4M4NWaQcwrjhi14AXZJi1qmokZIs92yvrXWy9oUh2QjatpCkL1EWtZph7UGHhWda4qU48-rL-e8BwN1LglFlR-fFTc6N_tfQHgdN0hQaM4YELOx9le2unTtPuR5acj_JTGBZwvttERTF5PBupYd3h3VbfTTecXG1EPsUelLHMRc1EaAw0q5vjwdbaLwDXfyvFEypkn8iEH_5CdYSFV0oPtwEpGi7yF4WThT6U4DQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703472,"updated":1562703472,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key0/f69e28d9f4324473b5bd0975bef0b17f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r5KgC3SObkSXF1aWoNtdHkM9ht3YC6Hte6-DtL8A7B0XnOJWBt6GThkjd9rmrYcLE0MXjs-oskYY0Iir6cyQapZ3HEOi_zlOU09e7dk1piADk838EImb46UZxbnDtoCRlMX87JMRWFmEqKvUvkLjEf64IvN7QAleRJdwFx79CJ_qRhZbvVTd7ZD8vt5PFTccwDb_wM4TQdPnanEGHQZFFmB75faNZefnNRbROMwgUkFHSJu4Ono8nW-LsmLZlQKEZO5JiI69wA8VjgsLQXi1ION_ujDuFp5ojMG7YlD8G_njTGjHvdmhIqZmJSumNlGEPB1k4B2O281-l-hBK6A3wQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527109,"updated":1564527109,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key1/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key1/b023d80926a5491abbdd63338ffc168b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tXG3Izs9RyCg-553a9N_Yz4N3H0AQEftAK4HNfmAM1JeEEci-F2ByaSeTs4R3jQYuQpJE1iY2YcQUop_ojFfy11CwUZnBR-wWYLj634VxuARoTDEFJTsWBACToK_D9IAsyphscqcmz3vBAnCkpnqd-Yc0UxBpLOBbv-RZfH-uuSm5xX33bU68h5ry1YDoxDK_3GEZg39SxjQu7j6T9nZmnfT1do_Ccny8TBAsViJJZga5SsjPAOwjSSw2-4ZIz2bvu65gWdck17IBulXTdatjpvdOOYoXudAHR3ZduDDkns6Id2gXuy4CHqwGCgKXpVaWd6C50w01JjGAFXuAS-TWw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key1/7abf970d281f4eb98e3f870688da9f89","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tkecVG8HJoW1QSh1DkZPm2op8q6Cvc6-0CpQjaobDBeJNSwbj_c-9Z8mEmIrGH-Inq89iSKvVXcvCOP7uiIkjOKFFzFpHc9ItdQqImNmDyLFlp8UBRyR8VTMxYiCq04i80www8Js1ALsp9Nup-2uVCrq-9z2pWUV8-QQO-1bgQJeUYkWHOsdv1uMkPBfLNNkFTSlSiAtHipNh2NtYi_OnkOofvrDFF4gX5ULllA4v17mZQspfeDU4llIJmEZNvTQXPLwQixX4hjBwXdH-7yGrEGPA_ZXPBl9ljkz0VjwJLZ294HEcLFfBcB66ePZ6rtRiMFZ345dGZKs4W38IMap8w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527109,"updated":1564527109,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key1/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key2/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key2/37574dac891145798031bdc16ae59c2c","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sG0yoon1QqM_RKNd0MAN2qmvjwSXCQ581sbogwBCNGcxX6CH2oRubUqVeQr4Nm__NGmjD4mikbKkkpxzaf9rd0-YCRpKRUL0ATCuhfIj8u0acP7uUPBrJXyqSsOUze0jvRCCCV9s3_QtqsLIxbID9uZuIu8xcJ5zkdYhtVWd2U9_601XWlboeWhWiTIMggsf5wj9PnTVYgM1tN4TY0AuFYjgb6FJD9MbJ92Y5bCDRH4Lpxze3bgskArHjOfZTVUjPd5_sCyi2a48Ky8u5N2uqEgv8OaNLML3JAeoSz07k7mg3hLnlDdldIgR0vdJPeW8MiwN1WkC2w35eRu4JGHXsQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key2/dcab406fd2b14132b97afa7241f0cdcd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"pnYNev0ZqxpCrih-DOzgA0RRXfCPF4fS2DmFWitUvpYR8PmqEzg23NSkh5lsFtQDj0zIcE_hrbrf91ZXbXTi10bBjO7SystNXHplIiQOXKYPx5J7od8ADLLZwJMGCY-FLc2zGUHAWHRJlB0oYSKOxXREwziT0qOyIhubwUXR2hDOxE4GuAeQCMgaU_HyHG42RVWoWis2Wgg26miJTzdfs9LLzrqbsvUfFSG5skFq5SltyHyzeLVzBjIvxKoMt-R_8RacsbUXc85sJfMBym4V4FRH7xkgQMc_3_TmRvBbO7fS-QzD6V7Mfdv8bv1y4398LYVHQMtdomjJrylohwUlpw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key2/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key3/90b5aac48baa474f9c13e295e3d593fe","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"y2AJUotY9EXCjtEq815wHGDerpkwIFgMRW-5vpt8RIhScsPc7-GK4Cog62_JwtRSduqJtEw3NWL6icZ8i-5HmRTfN-uDr7xt0iVs3sDVArc-osPBan07LTgiMPMyw_qlmwvzrdkl2LmSvipNZymHGcg-kUh7_7ZQS_ZxCAUNu9eA1zmjENAux3svJLl1ISXoVk9OwRXYeU7WdN82s8_GbkeAG6js-mazlO99z7iAM2eLKWV6rGqZgouBMfr3POBPhg895vgHDpCIX_1QQzGVwJld2mzuC81_dSDc6eTbQKEgf0Sr1-P8ywXo23DR76fYC7pzILh-LuFLnf-NbnmBpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key3/ff3f5ac04b114bcb8d398abd238d900d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"uefbUngKT-RjMND2guq1DLRxUHBjJYNnWdYWd58Y6xodyu2aup8wQysPurgdYMQiNQI58JPo-7dlVgAi__63cZ357df1SzQOGx2erne-RJ5MzmxnB3W-Dg5d_w8Fv7wwbnkoZx8QUi54geI1Gp0o9qratTjNLjnbEFBNZ74E9NiMT63Ps_KU4-2l5HAQPXoXpehFfY4buvsVLNBIno_kBqrqAh1tSPTE7OT-uidwtxdFZAxtL_abz5XSR0sLwRmdrmDvqlaGWTniAWUD_l3imisOYj1I3bhshCwKlge3BJ6m706fgP7LGrTmtIZBJYBBNBsG9BrAskWyBYFDwCLzCw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key4/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key4/897d30c8c9a64c5baf42ddc28cc323a2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"nBnwU-Tc_DQd5xt8pxaNa1jJytxCM6nXf0TLMG-K7fURjW8FuYpaUdLEkK8PXGzxrUdJVgR-9tRLjbDgYdqxa0RG4-jHy6Rwbm3XO7gUUoQrQzlDot7HBEvrjldOKfu-evN510V-ZrH1ABJ717cm2CPtmhyW7WQ_jGxmvFq-sWwhWOUfC6UpV7AnYyBkq_fAn9vnbPRH7dXoMf1G5lCtJ5uoAlt8ys9Vr6Bq1tkf3U2JW9-SnWwfb51dZjbRkKCVuqIVm90Ik7qnUoV-r32Ehdo1t-VbKpiTfyOdhxclV8fbgCQ2NO0P1oWoC6wDEs8ut_JaX-1V6NuiocpvmSt4Tw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key4/1783678540a949af87bb325dc25ca8a7","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"td-f0a_KPz3Koohs9dhl2kZuH9ZJa9xXhZrugBZBsOrTb6TbJuP1YcPSaKpseA_edeR-jT0gdm503PcKMskF5KQCtr5v90zOnpYWafJ_8Q16m7h9DjfChFkDxxIVvi68YMYwT-R0eL2Cr-9j5rotjqPp2wPBRFQ8hcH2FY4aJMvZ5CqTCI9Ci_S0DB26G2IbianCAYhn7_KHvZCnOFaP42UpqS5DDMnq1KJtIjImuAhOsmHtm6RvjUR9MPD4B9LxydnP0lzBhkzPXo9vnR8NeJjhGgALFyDB-09w7XzcroPDtq1--SmUpF9GqiXBoJnOa7TlQnCc7dphqGCTnPJtqQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key4/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key5/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key5/689d4f8f09004d8aab516b94aca67d00","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"67VK0tZg5Ui7KAtcdVy4I4Y-IHca4jl966D8DWcj8ZEovCAGIWlQvFSlVRvFeEqrmoVD3zSeO5yXOQwKRzDI3rrKmc2a4b_so2cuCqxtP6OuMbiCzTS5vV57UpkqIDuN1IuyKjFnS9T_ZLAQE9y_4SLRXM9vUzzC0tCaOR924WJ-mEIfKtUlab6IytrcUHLdJi5kkO-882I-HptJfjzoyGAvHTmJIDuQWgMuMAkQP1-5ZG8V3pEinuj8FtLKcfmI8RGixEEAvTxO5FAre1aEeta2EdbsdIVTi85xXOcPu5LrWdo0URY400ytWN5yQvSDsCOEqO5Apdhk5elgl6trTw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key5/4ff953ee148d4cd8816f3dfbcade0691","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1ApBVUvnMDvdH_yGJfdTzMZmtwLm2k7tg_2IVywj5ZvxxTiZ5aTTCiwuVXjXzqMdGAcj3hmrAC7m0kr8gLSAXye5Tq-5oofu-48jZ91SzY9bWfi5Ss1NpaWTJ0RIe7bEvcjdYQprz1A5FIr_B7IaHYdhbkXz3qzf96gLq8elRBeSDev1NC4bFz0CkWKOeXZF3vTOsHo38q9Ne9XZMW_hEb0ln4ZCADsVV20pLZ4IZmsRIUuwwEaSAkaPzpJYOsGc3Oh_qRXr-hMRkdZv7dPYsZ1LfdeuIb9slHgBEza5OBb9NGOhNFMfk3Kyiez4rHdlk3JF7fPIvkt9St-7lnHJbQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527111,"updated":1564527111,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key5/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key6/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key6/a1f7acfaafc34a6495a429c6aed2eadf","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"l0gxdJyCn-voQuNg_2bqrlOXgnQStVxXHDYdvBdOlZpoq2BzzvvC73MoPcldBuI5ySRiF8B1nx82yXQKnEabXpXWvvl70Ye36l7YrDrg_Dhq38MU4Uv7i_rdqdBQPG4tr6cBz0BWR5yHqGy4LL7dcWhLtyUH3-wbC74zj2KqjCGIx3AfadEwkR8HIjCGmLhbtaUbCEU5PoHrIfLOFt1u4Ah2NripLqv54n75PeJSXaRffSzQJOU6qC4eOnHcEbP85w9SsnSlOZp4gvjqN9JvwWaoy7E20anft6zt7tjFLG_inkASqUU8QcrN9SwBkV_saE4WAWcd31-6dBpeGY9Jww","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key6/3863898fb4ea4c8ca57c47785d614ba5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"x3Hyl5Sqttjt1gg_OK1g1ghjqGiDUrUpKkq5k7hiBs9KkYK5sSvKQCalGHWStOE2YUB5tt056_PYbXIG3KO_z58BNXy3yneEiqZxAWyPKDyvQcuyPj_zqXdDDMVuBe1mrIXTU5kgyQ3JgWB69PE6ALtAY6BnFz5vx97yLdgnebHzv486Ti23VdusiDagnLkY8_chGtcZZ-9VE8OSOrNH1zk46wxDP7gERk2O64nT_EKViMBn9vWTJs093v7SIrWrJKUXL8RGMPW5jJ1uCgdBDOPz5pWz1Wl6VLcqHfUsVjgKrU9QffxugIMeFpx9vSFUOVeKiI__iRHUTE0Y_T35Ow","e":"AQAB"},"attributes":{"enabled":true,"created":1564527111,"updated":1564527111,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key6/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb4dd0c0a.vault.azure.net/keys?api-version=7.0&maxresults=7 + uri: https://vaultb4dd0c0a.vault.azure.net/keys?maxresults=7&api-version=7.0 response: body: - string: '{"value":[{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key0","attributes":{"enabled":true,"created":1562703472,"updated":1562703472,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key1","attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key2","attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key3","attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key4","attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key5","attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key6","attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}],"nextLink":null}' + string: '{"value":[{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key0","attributes":{"enabled":true,"created":1564527109,"updated":1564527109,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key1","attributes":{"enabled":true,"created":1564527109,"updated":1564527109,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key2","attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key3","attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key4","attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key5","attributes":{"enabled":true,"created":1564527111,"updated":1564527111,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key6","attributes":{"enabled":true,"created":1564527111,"updated":1564527111,"recoveryLevel":"Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '1133' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '1133' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:51 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys + - maxresults=7&api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_wrap_and_unwrap.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_wrap_and_unwrap.yaml index f4b7259e3499..d8b5e54d09b3 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_wrap_and_unwrap.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_wrap_and_unwrap.yaml @@ -4,312 +4,252 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"ny6wNPsxof_QVouEvyn1dKEiKG8hArgSRJzUhtQKuA9A5Nij2CxUdqgezqmm4CAqyj9sBuQqIHI_BO1RKq7Jea1BzfbWmce40hhPqa1RLDG8Kb_LrYRz3GavBXCl9QR_lzn5DQYawzLCQFKvt4lXOJVhSOAiGmAayV2axTNxCM---8pwfztqf6g4dc7cUEIiLc0ZtnzcqwmgBuLu2ysrEkVRvhRY517fp5M17OLQDmIx75f9y2Nc8t_w4ZsWhIZKiUJBDfNKcBxN08Nljnowhc2CwemQ5aZLQCPZiibsOMVIi9FufjBOTBxnD2MSoaGrIuEDrLv1Y1UEK1wHE_MFuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"kUy_5eJ-0LXYETECBi2NIkf184IoLXhY30v3XFmJYSyy4roFaUr-0CQNtZ-Rztee5M1LNJpROZ4uSZjSZgabLj-IGpO27NLc8_jw1tR956bLlphc2D4jPPq9AXEDotXGAjAop8FXUCyDYmAStaEu0VZWK66S9N1mFTRG46aiy4F4sj_68ZeMQDlbzrR6aH7zq-1FEuSiQGAVMkMGS4CCoXAWm68WexBui0_CgJbcd5z-050qEBkGVvWXYkAA_uko9hsQNNCCh7-pGW4hwavS-T8s2g95UOiYlDSJwzLUqSfw_mNWjr490gtP76OaHyT3DB5JGGeHFWLsGdJhW10rvQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527149,"updated":1564527149,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096/create + - api-version=7.0 + - '' - request: body: '{"alg": "RSA-OAEP", "value": "NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '299' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/wrapkey?api-version=7.0 response: body: - string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db","value":"IQvJgnnmWgtVoYpCoo_iIDfVfgYpJSe6IA-XUdpXgkQYwjzvvtQANNJtDQY3jhbWiMV71oy6uVFmDD9ey5erJrEJHpKMEivQ0FZ6H566SFd8srhiV_x3trpoFxvXgOe6osF7YCzS-DMP7GHYVRRIDf-VldIbldpS-OL7jn6ZW3SSdmKrTfHEpOyXK_78c91VVpDbf0j8QCaj_bzNWs1Xtpgxut1f0V-Yof2fX2nh7DGauR0Vk1ryopjyciU3YAozxT7CSTPalCr-EPqY48RvCCEIMf1htLaTq20mCUHVinVOSpE-cEzF2WUdmMzZXa6zvb1Ls59lO8ZhKHUSFSuVjg"}' + string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b","value":"RC2-jG4FsccE0rV8izEDzvoxLovaDxdMek6YJHMW3MOvTy3LSm9FihBTo-XLZz4pdS7XZ7VvHVNpEbcKXRuSeCyViVt6Umv_7XOx9TkMUmmhFxgsBcPY52K4r_4W6LyYWpG6y3yN07Mj9u8HHWuf-2H-SOPykAEFd6xWteMFtGSU-RKLXHI0Xb-YdixlxUU4twfcp3uDuRMgs0NT3d4VZVi8o44YCPtMiVG1NplWKepWkTb4l_rphclayQ062Ln5o-1fWAIUhnyfYY4HzHdFh75ELkkQGi8ZeI6-rL6o-WtQrsSAyBLpS3ioytuaPazyTHeAMN69YVUJz01cc9IETg"}' headers: - cache-control: - - no-cache - content-length: - - '454' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '454' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096//wrapkey + - api-version=7.0 + - '' - request: - body: '{"alg": "RSA-OAEP", "value": "IQvJgnnmWgtVoYpCoo_iIDfVfgYpJSe6IA-XUdpXgkQYwjzvvtQANNJtDQY3jhbWiMV71oy6uVFmDD9ey5erJrEJHpKMEivQ0FZ6H566SFd8srhiV_x3trpoFxvXgOe6osF7YCzS-DMP7GHYVRRIDf-VldIbldpS-OL7jn6ZW3SSdmKrTfHEpOyXK_78c91VVpDbf0j8QCaj_bzNWs1Xtpgxut1f0V-Yof2fX2nh7DGauR0Vk1ryopjyciU3YAozxT7CSTPalCr-EPqY48RvCCEIMf1htLaTq20mCUHVinVOSpE-cEzF2WUdmMzZXa6zvb1Ls59lO8ZhKHUSFSuVjg"}' + body: '{"alg": "RSA-OAEP", "value": "RC2-jG4FsccE0rV8izEDzvoxLovaDxdMek6YJHMW3MOvTy3LSm9FihBTo-XLZz4pdS7XZ7VvHVNpEbcKXRuSeCyViVt6Umv_7XOx9TkMUmmhFxgsBcPY52K4r_4W6LyYWpG6y3yN07Mj9u8HHWuf-2H-SOPykAEFd6xWteMFtGSU-RKLXHI0Xb-YdixlxUU4twfcp3uDuRMgs0NT3d4VZVi8o44YCPtMiVG1NplWKepWkTb4l_rphclayQ062Ln5o-1fWAIUhnyfYY4HzHdFh75ELkkQGi8ZeI6-rL6o-WtQrsSAyBLpS3ioytuaPazyTHeAMN69YVUJz01cc9IETg"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '374' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/unwrapkey?api-version=7.0 response: body: - string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db","value":"NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' + string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b","value":"NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' headers: - cache-control: - - no-cache - content-length: - - '379' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '379' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096//unwrapkey + - api-version=7.0 + - '' - request: body: '{"alg": "RSA-OAEP", "value": "NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '299' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db/wrapkey?api-version=7.0 + uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b/wrapkey?api-version=7.0 response: body: - string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db","value":"Vxzu0xm5GG276Yj9qMpc_EBbTPPlv0wuH43zSp75370UohLnX-QimTYjncIpJtcFaXDmJb2_USJUbt5GBHaBpy8MAdQWwskj4eUWLtK3b53CO3lg8aoFETRbNQqAoTp3tqihmMFhNTxTXcm5bU7e3s0VdzQ8U8_J6vAmipB6IGe-T7xDWO288DoZbubPlSylnuUu5rdfZSpzoQ-UxD77uyqpS7ll0_SpOJ8DrcrsesaCDkVDuzcCDQ5lfvh7ptdJf68faiSGIJQ_0LW7jUwv4aJzN5xf9TD27WEg9XCe6grH5x6GA38E8Yc5CsCbMlAjD_dTUyjOAFqaYUV5QdMJvw"}' + string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b","value":"X768DS_JoGXi8mHl_PTmWnjSOkA5qvrlDQzvebrWTCBgHQiMuRXsyFqpS3urvodJcpatIjfqbGPaG-50d5J-BlUtvevA8a5vFVNjrmjqN1jR4PHvIEnA3Y4m940Mq0Z4-ESgCIMw12trkZfN3U0j3X9HggJNJkolepRCcF7wnn0CoK7Yqt3rMSR6aMg-gMJINApJ22jhlRz8omsI--bJEXjObz-cR041NMY8bxIm_R5s6Hxi9XId-jAMpedmuQchhliOSlIqbs0jidn-5wUCpCTKOao5lVXVN2kqmsvICWxLj15HwcRuCoi_2ciMRjcCnhrqHcQEUH-L-jKrkoI79w"}' headers: - cache-control: - - no-cache - content-length: - - '454' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '454' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b/wrapkey + - api-version=7.0 + - '' - request: - body: '{"alg": "RSA-OAEP", "value": "Vxzu0xm5GG276Yj9qMpc_EBbTPPlv0wuH43zSp75370UohLnX-QimTYjncIpJtcFaXDmJb2_USJUbt5GBHaBpy8MAdQWwskj4eUWLtK3b53CO3lg8aoFETRbNQqAoTp3tqihmMFhNTxTXcm5bU7e3s0VdzQ8U8_J6vAmipB6IGe-T7xDWO288DoZbubPlSylnuUu5rdfZSpzoQ-UxD77uyqpS7ll0_SpOJ8DrcrsesaCDkVDuzcCDQ5lfvh7ptdJf68faiSGIJQ_0LW7jUwv4aJzN5xf9TD27WEg9XCe6grH5x6GA38E8Yc5CsCbMlAjD_dTUyjOAFqaYUV5QdMJvw"}' + body: '{"alg": "RSA-OAEP", "value": "X768DS_JoGXi8mHl_PTmWnjSOkA5qvrlDQzvebrWTCBgHQiMuRXsyFqpS3urvodJcpatIjfqbGPaG-50d5J-BlUtvevA8a5vFVNjrmjqN1jR4PHvIEnA3Y4m940Mq0Z4-ESgCIMw12trkZfN3U0j3X9HggJNJkolepRCcF7wnn0CoK7Yqt3rMSR6aMg-gMJINApJ22jhlRz8omsI--bJEXjObz-cR041NMY8bxIm_R5s6Hxi9XId-jAMpedmuQchhliOSlIqbs0jidn-5wUCpCTKOao5lVXVN2kqmsvICWxLj15HwcRuCoi_2ciMRjcCnhrqHcQEUH-L-jKrkoI79w"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '374' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db/unwrapkey?api-version=7.0 + uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b/unwrapkey?api-version=7.0 response: body: - string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db","value":"NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' + string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b","value":"NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' headers: - cache-control: - - no-cache - content-length: - - '379' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '379' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b/unwrapkey + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_deleted_keys.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_deleted_keys.yaml index 235cb77d07bd..c59b3ce7c6e0 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_deleted_keys.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_deleted_keys.yaml @@ -4,706 +4,678 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:53:13 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/a724cd7584454a3cbe29f3a05d7eef10","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"nC7idSUXK32dkqtn8M-4UB3JoMvCGygFa1TlYH0nQQUvYGn7aNp5t1vtJFqq2Jlafl5pZhdHTumt-R-Plewno2zO3iyjza1MOTdeK8FJEHPpK7I7FNH01KdYnU5Q0xY95L8tbXUcQAYW7ankxMIeKxqrokt7flCGUQeXDwOalJIyQyFvdUe4buytdGHTMFV7lgHIQx4mvekZi3yzuWgyDiuohRd8Krb0lo6suUYOIetzbcXMWqrSRmQdEO_vvptApgSOwxPrqx7OkcNsrcgJkrXQzd6xjgho57GQ6u_TxmGB7uW3LBTKnwqgWOfmELKVCH5laRfjmZk2S-Fwc1tXyQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/f96ace71d4b941eca3ae0490e503d288","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"28DloB07w40yR2-_MHpdg-prfQ_xseRn-d10ZMoZg5jZaU1prixa2ZCWOtLXPVMsFU-fNOb4QtZJ3fJbJTVU-h-tPzKsixRwVljpiAwLw2wlRExZWUbQETs6Rd8B4q_GKJZpiHzO2-NLk61PJJyLoQ1iKA0SOIAtZMROAHx5CHuEc6wsuIsGEDpwdjncXH6-REvllgkOQ_SpfeiERvMlaAoFPceg4bi6SVE47xDGl0J1yEAaXiCba49o_jhO4SQ2fh2nYR-2sN5ZlgYFFVyPfp1PyvzL-NQLNp5KXwuQQY0-GNsXz-PWZMGstAqSRWjR76vWx5-lB0ohA7JwM_VCuw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527194,"updated":1564527194,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:14 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/4c4f6f8faf7b48a7bef7972fb705379d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"k8Ow-6LTG9ELTNRnQC3MqQncYGqmUY-6EgNnX1Ed5Q_SM8hJUl7dBtb8gVn0qc3KFy6Q32gBgveziuCaEaMK_wN48RCLmRLCuFsXmnHsHDdxMzEv2YL_dV0RrpcW0O0m-bgAt6z5aOOY4Pwa5EOBTyqNS5H56Rp9mm7MQijt1mcWRwOUHIRteZWpjQ2DPoSu20bufIldM97wdC7dZd38q5NFDY9W7TCNLTD__MEl-ySmkVRIEPaMpcObNtRPiB6kadylcgBsoAAR871Wzb1tdRiQkpyEko5of_9iAdZEbUY0XiG_zJpdFxfvy9rds3fXfXhSppolt-CC20IHfyjEqQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/dca838942cc249aba2f9d052ee4d9bd0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2azn8ADVPwbppZCfxsCvr_XKqCeA49ZRxxyuIUC-_Cue-13fIKGkHqFqbJVdJuPftJxsh1MmrUVcfUGMPsTFdUBCVfpuiFXEXSe9exEudUAZNmBYb3HiCbbu3ThWw2Z5-OioKDwf-qKA_H_vooI9YP-yYEDhJcfvjsiyxzBNGoLBld6yiPi3PhCw9kqvEHUYnS-XPgTqhJChf7g4oYRT-XMVPhR8nkbQ-NQ_IQjjZzxkhkpltWfEYX_KL0-Uy4x3kz2ykPtQXRpeZuaD2PpuRXIt5ssqTC4segtWiyzCKhp4H9A8pVbJKd_9fnSArsfNQXY0e5bJac6ZhJJd_ES2XQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:14 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/5c71fbc7997e4fe2b2aff141a6886d11","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"nPBVYE_5WfYi6r0Z_rnhhYuBQe_qy67NeGm6dAJCSFT_4Mc2iitb5cJmEJO_0cUxMaiSWatpHzGYTzQ_c51yKjpW0CNX08FZi4ZO0JsZVUnUUL8gYjEK9VNNaeSJPvrNMHPsp-ee1TieBpdB-emZanoRtKVlotJ35-B5KYcs2BIv6KG81LI_F-ZFleqBAlR0u6ty1cggkEgz7OsKjIePcfG0wIdttqyzlKoYOVPTx6wWfHHZDcseTPWpikGUaSTi8GWL9HJ_BugI16JEW9WIALoWOlflQ7884UoH2S7WZ0wQ97MT0NbwdkwgcowiKzD6li0euweojvu2D8WYk1M-VQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/f50f900706a24363be08c408cd3d8908","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"oMEeM4hmofM8AW7C67c_Jubcu1t9yh3uDLGSQP8cowwyKh3IVtLgyruzGwLoXF8B9gJZaj39iaKhMdPzc8metT1746Ub3vFiIGGXDBJ_R8EXPxSjSFvOn43QwRBQhEmfsqqnjIqHvj-e_IXyLtUMFj8HteNPbfpzAdlKsXAZhNd1l9INIekQZKfuOLRdB2SIMC6saG_gkQcL5y80lDozJCOQEhHfRdvVg5H1HDa994SPwGZqygKS-JTwYvNDyjFR2HMpAYK1d-2PHCLAMD-n-b_FRcg8EPU6g8DtEBqWpXSlFmTmBDA9hs9bVUZgbPMOIg0edSHPj4n4oxcupmsw9Q","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:14 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/ae0bb0500b5a4899873962cedbd62ef3","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1XLrHrA2xR35sNHz7Bl23TuCTwcdOO8aY891NJLUnxQUvPxj90vLf9iQA7Kd_J9-XxU3ImXY-qp0kOb7qJPeRI2MydpRxbpipmmU1aMjDhHReaY-4eiEt1Wq4H1i73qE62VnQMY04pSkweNqcG5GANlpuBKqmaFvi6uLeK0b38ioK5leJsZ-bQyVveNa23hxZ7bAt3WlMe1-eoh0S5yITRFIlq3GDieFC546e2oL0H-TJOPsdZ6aUiF9Ff2D9mMtw1V44ulaZHs9wyQXPPcukY495_yBPq7W6NvEq4C7FJgYroBRNw1wg7y_iFQ8cvf3vTfK2m8ofwtoaeePWC75lw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/7b75b1c578a94a1a814f889d2edfa79e","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vm4vIl0Qd7O-kBaGB5xZUi-1s6PjVoiOOrA1vJC3jCYDb2YB-xO5Okibq_rrmeqKCGqA1BvjAYU5koHNuI81HwYLVnSuaH05xxX4h2_tDpupmHNMyvaixEAFldoS_rY6LXu0sjU-NiTxug8qesZSk2D6Y8dtblv87MxPbz11Asc-IjhseHzkn6U8HfPx4Z0IVRtKtC83Qa_fE5PvFXE-vgzDCKbJcpQKvk_ykByxZGyYn9etCJntKuPCob1w5MnFoWbIAvLmkd_xXr1c75jhRT1Wio6eKPUYk3oj13kn0Wci5t_MYz7PeAUVlLXgx38hxU6rlkAKI5_c_mEaLF4mpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/22e7a0ac26f541309d942aae55f56069","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"i3dwC_iG7Pnosa0C-7DGNoZ1mnH-wWPwXdYDPUr0Tl4ZQna3klAnLRO-yVO4zeB3t3kgVmQ3nYSw-M4HYM4FA-_BcbddPqcelUSWgD5LMH4SKW0sQyKPfeUWqgQQq1Q2K4LO55nLjPzu87FOdGT-fJ1hNCqCOWb6WMio6fIAA7Aw91ZfgDt1_icif_c7OzIyskD657ryxPn45P2t3z-XRUmYVg2Xt4WLSlqc-jScZtGYGNwq82E-t2IviQplaBvLB4sNtCRYzqu5NChFYUXEhZal87Q0kWTq6xZa9D-82OmwCk9WnHCia_XDf8zPNcQQsvMisoD-bDbipGZIHjLrPw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/57fccb90503944cf8c8cb4f5ff94cf96","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1FfP070rHhDf3XumOs1t9fiXrXnYxt4mj1JQaz73YveKVuUGZ8MhY05So7SZlTnCaYGjY0p_pyMJK5hMRQX_gSUXFdKsB3HJZdxcEEnsgkXoLHI4tpGfGjznjj-Ky0G4rV6hQjlsIf6n4nxRCiPG4CjJw7nWlBJn4eDw1HSwEFtKcMHIW0p79rrHhuHGMYRbGWAMYgVTkGypsH45e6PyVXE5ueEERzJKA0f4S9LioIsp5LEleThm_E4CE9azlnYvl2WbKeensPKnYVlw_30gIDGsd719UJizsYxyn0Z6q-6ki7Ws4RWrWmZRaZii1c3CdhIpT8h504_DB-4DECqKSw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/39f5c626c2234116b55e89a302e37cd0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tIN4UcaySsLj1sY6wvLbFT2WCKGqf-VtnzBfNcnTNqGe0dZbX8fE4LJmPF7--uy3zN3zucHJS9TptQJuyHUI8Opb9dTnA_O7BpECmCLxdpEucmhdpX_Jn4rSZ_B2Gd6ssBO03QjwqUEiNWiIdeASyx7sCy1AazekV6jPIyiAiZH9aW9KtPp0x-hHCEnoiCTo_vsX7L0q6ZIxA1ro6pLEt6HhTFRQN3MpFU-rMMHgyqDhbgquOUzTmWaUMtMJhRvH2Fyfyd07Q3BnguhZMulT7uOWGbF3uorMcVq-TMxi3XA97ri3BQzAgDwfXxLpWxWu3cstSJwsdjs6hp-QkIFAMQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/e8ff437f48034bc08401754943403333","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"iW4vfWb9owDVk2P5GGu4qfMbIrRhcQUenHS6BRkAQPhqrDQ-8FuHO27r-fliHlm7bGNRlBgD7dMtPBrsAPdGHS21MX4T5Yo8YjQvYwGkqiMHlDeGiWqrEKZhj7yOWvqJXtCJkgCYLoswMgy6nIz3Ptj3yKhQ6nzb4djeVgNnaatxgas-QUbhLobplHq94AoxlJDqIBvBqLv2C4AR9XqtxS0mOFu_BM4eCNq_-ALK3hMpdYGfxpoDCRiWAsC8s1iHsv5DjeKF44Gmoexw7A081shyar5HW067ttOyMz_iI3lj9Dxo8n2g5o8HSQgz7ysPDR_QcxEY-rxsUhDdxwFUqw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/38ddd3f6f70d422a8aad4175d9d01acd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"rPb0on1WhFWeJd5-woJsOTbLA9Y_lFO9Mw0NtXGQ0gzwkpcvm8pSNDrudla-Dw_jKu_Yh35fL3AnsVzvttcsyNu4BrJ5lG_Nd2ApgAOtT2NqRgScCkCXheeKPtxeht7ambqKcbk7C6NBDa81zd1jqVnVojucsVAY1jkYKjw8r3WQQ53zAt2oMO4XCkEi-jQgIL4QwfY_eBfWiMZDzcYz8u8BlC07QLBHkT200YfIVDSjoKLf4pOx1hCWvzA27ndkemgt0thlL84EjLp5PE0chNtZCuLK2ojKkcSU21kZ3GV7NptS_IwyjkEvO3j9YKshOXzwFzIeMsyHMnQ5BsyRCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/2fa84ef9423a4cb5b286ca7bf77cfd02","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qInaUwEM6ZQAcb_Hk5d5rUP-DannLP_iAToOZeoUFgDi_dQBjwL5z0KMO2OBXUPgTh1ms_ePW0fvjRD7xyS-ZQ1aftrIX3pK_1OdnOpO5dDgFDOAEW9LCTz31RCCyMS9FMkjjbQ1iwX1ydEpM8eCw5_MrXhGL5FrPuorIq_GHpTbyV-ars_u1oJfdsUHOaD7riBizEk4sGld58EBoOHiH3HRojQ86E7WoXMUnX5KBX6CLggP9_SlVg2nnLPjDKWPddTPPpBmelCy9VF5g7T7UV3BtMymC-2XFZuPHOq8VjAjzZOn2Ant3IWotwRnokM1axlRqKa9rNGdEJvit6JB2w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1562703474,"scheduledPurgeDate":1570479474,"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/38ddd3f6f70d422a8aad4175d9d01acd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"rPb0on1WhFWeJd5-woJsOTbLA9Y_lFO9Mw0NtXGQ0gzwkpcvm8pSNDrudla-Dw_jKu_Yh35fL3AnsVzvttcsyNu4BrJ5lG_Nd2ApgAOtT2NqRgScCkCXheeKPtxeht7ambqKcbk7C6NBDa81zd1jqVnVojucsVAY1jkYKjw8r3WQQ53zAt2oMO4XCkEi-jQgIL4QwfY_eBfWiMZDzcYz8u8BlC07QLBHkT200YfIVDSjoKLf4pOx1hCWvzA27ndkemgt0thlL84EjLp5PE0chNtZCuLK2ojKkcSU21kZ3GV7NptS_IwyjkEvO3j9YKshOXzwFzIeMsyHMnQ5BsyRCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1564527196,"scheduledPurgeDate":1572303196,"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/2fa84ef9423a4cb5b286ca7bf77cfd02","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qInaUwEM6ZQAcb_Hk5d5rUP-DannLP_iAToOZeoUFgDi_dQBjwL5z0KMO2OBXUPgTh1ms_ePW0fvjRD7xyS-ZQ1aftrIX3pK_1OdnOpO5dDgFDOAEW9LCTz31RCCyMS9FMkjjbQ1iwX1ydEpM8eCw5_MrXhGL5FrPuorIq_GHpTbyV-ars_u1oJfdsUHOaD7riBizEk4sGld58EBoOHiH3HRojQ86E7WoXMUnX5KBX6CLggP9_SlVg2nnLPjDKWPddTPPpBmelCy9VF5g7T7UV3BtMymC-2XFZuPHOq8VjAjzZOn2Ant3IWotwRnokM1axlRqKa9rNGdEJvit6JB2w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '793' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '793' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: sec32f70fb3"}}' headers: - cache-control: - - no-cache - content-length: - - '79' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '79' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: sec32f70fb3"}}' headers: - cache-control: - - no-cache - content-length: - - '79' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:57 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '79' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1562703474,"scheduledPurgeDate":1570479474,"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/38ddd3f6f70d422a8aad4175d9d01acd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"rPb0on1WhFWeJd5-woJsOTbLA9Y_lFO9Mw0NtXGQ0gzwkpcvm8pSNDrudla-Dw_jKu_Yh35fL3AnsVzvttcsyNu4BrJ5lG_Nd2ApgAOtT2NqRgScCkCXheeKPtxeht7ambqKcbk7C6NBDa81zd1jqVnVojucsVAY1jkYKjw8r3WQQ53zAt2oMO4XCkEi-jQgIL4QwfY_eBfWiMZDzcYz8u8BlC07QLBHkT200YfIVDSjoKLf4pOx1hCWvzA27ndkemgt0thlL84EjLp5PE0chNtZCuLK2ojKkcSU21kZ3GV7NptS_IwyjkEvO3j9YKshOXzwFzIeMsyHMnQ5BsyRCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: sec32f70fb3"}}' headers: - cache-control: - - no-cache - content-length: - - '793' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '79' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:21 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: sec32f70fb3"}}' + headers: + cache-control: no-cache + content-length: '79' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: sec32f70fb3"}}' + headers: + cache-control: no-cache + content-length: '79' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 + response: + body: + string: '{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1564527196,"scheduledPurgeDate":1572303196,"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/2fa84ef9423a4cb5b286ca7bf77cfd02","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qInaUwEM6ZQAcb_Hk5d5rUP-DannLP_iAToOZeoUFgDi_dQBjwL5z0KMO2OBXUPgTh1ms_ePW0fvjRD7xyS-ZQ1aftrIX3pK_1OdnOpO5dDgFDOAEW9LCTz31RCCyMS9FMkjjbQ1iwX1ydEpM8eCw5_MrXhGL5FrPuorIq_GHpTbyV-ars_u1oJfdsUHOaD7riBizEk4sGld58EBoOHiH3HRojQ86E7WoXMUnX5KBX6CLggP9_SlVg2nnLPjDKWPddTPPpBmelCy9VF5g7T7UV3BtMymC-2XFZuPHOq8VjAjzZOn2Ant3IWotwRnokM1axlRqKa9rNGdEJvit6JB2w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '793' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault32f70fb3.vault.azure.net/deletedkeys?api-version=7.0 response: body: - string: '{"value":[{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1562703474,"scheduledPurgeDate":1570479474,"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3","attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + string: '{"value":[{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1564527196,"scheduledPurgeDate":1572303196,"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3","attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '338' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '338' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault32f70fb3.vault.azure.net/deletedkeys?api-version=7.0 response: body: - string: '{"value":[{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1562703474,"scheduledPurgeDate":1570479474,"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3","attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + string: '{"value":[{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1564527196,"scheduledPurgeDate":1572303196,"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3","attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '338' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '338' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_versions.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_versions.yaml index 506c1eec8c5b..8fc2e743bbf5 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_versions.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_versions.yaml @@ -4,464 +4,374 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:54:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/786f33cf86024134b1795f24b3f0f955","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"7koFGg8HikMmRoD_jMkk75c8jcJPc16nIpU3e3HxM8svQlFT3nM3gV2WCmkuydO98UYQIeHvm7mPNAAIpIZtnYHnDdT-YNZt4o4VEsUQvd-caLXLWaNaUkZDycCC3NLnOltKVoKNIcZz1AstY5I4o-4OYvYkTp1YeXBsHAzafCClwGbUF9bXx0N8InLGsUzNnU38Pi-RiBZQDyloHJ6x6_n5vhu2gBQUgfyCCwnknQDJD6Gw0DG0JM0lNKN3NhtMRgsuJSd0BXvty6pVN1TFvS320eNSlHIBX--hdN5U1ByKuy8MWIzSNyeF18nyW_ThlJCb-M3W4NgQN3B9hWm76w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/6c0645bada774c53829be1e9d92b8033","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1Cae7MgCaUb8l3cPvfpb97X4idEo2n6G3duPbBtVrarFg_hxNMrcRCeRhURHqZSc8vMnXnAoGWI43WWOJxm9ZCsTJ4h3KOHKv3t6BSB-cI28UNvTolGeVcs6SPfaj6ZinqkS9FNIvUQd7hanoXDq3l8qurjD1HKP8nYvnny0g8V3v_lcuIrexQbp1E3o0V3XX9eaFTD_NMNN28bELyRSM9dqnFTnelqrw4PBkaPfZ7hcUyCVHki6DCIAceuaneCwwZnOQyDYNsFdaEK8ahdorMrSQ5Z00ZYT3gWMgFjEP5mRzTOya6uMw-8Tqy5DDRf-ajTydYamzXjYzSoY00uapw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527265,"updated":1564527265,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/c2b39ea5f3ee4c1181284d3109f4f66e","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"96s63BcHVYpDmfb9hVIqsWAovKP2CaBMRrOSzB4LNxD7iVCEBubsoFoc37_CqK5dhcNIRV8Z6GQoP2gDjP317V_ToJxPk6dqhSymhQGvIT6PvTaIovmzQUgl9CCn8rRC366kcZofyB4FOZVjs2UJe30EjqdyZOBraXsWWa6DCBM7uuRTXHorOcA464mz4RFSHgyoaEhQrtTwGUBUEK_4zXSnrUO7_k4tLjCgZhvNIRaC2pBQ5XY4n-jCSRw2R-5BbjSvqoVYzQ_P-6iZs2Krj9VWNzAdWTHXDr-vS5isShwo2FODdiygabZMnwtJRUv-N_QicsXe4QRii0DHPFFtLw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/f68bb459f88048a28511a6bc9546c4f4","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"pv95cZnMAvrZ6RYvddRwe9Mh46LsolgFNHT0S_NFIL-Lk_HQkpR90iRR3hMhv8zucL8bFDo-JFVktFG1mf4kYXIwSNELfHQW5STjRzZePeE9waRtXRtvm9pwifGCS5lD8xq3zm5BMtRYJlNlrymLVbCK9U9bzB7aSi-ByTUd7SaFCFV7mHNrSaNjonLZWtWMcEh76P8DZC0GBO4cxG0XyLXd51fDNnwBd0DlXFPXUHlQ3d2TGHtd7aQCCsO3iOfdmoOJNv6RjsHR67ZUsHHE1sBm1rOoMHNUUTWSoEhYi9WeAWcahijZfcABjoXmNHyPmByDVNmxrNwgSbMlKOjzww","e":"AQAB"},"attributes":{"enabled":true,"created":1564527265,"updated":1564527265,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/8bf922cf4b0640ad8fbe53288acbcbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vkJZ9m9QRSVxUOx1X1Ag2MVp3Hnl9Fs3tQ5VXXMm7d-KxntbQH2xr5KHZe3YmUK1ZHHOH_TWjneoQS0fGwkarA0GAzhGr8O_SpDDQ8l5KttNe4niAYuxRT9_5-DTOzkMAuTKyJPJS0RblaPWxo9lQLpvQLdLPD5HyQBRlz0N4g2wi5Rcdu5rqKPBFBWnNRz-CfpEPA7ov_vec5bEATmqIphxAPasKuxGGyJ4ceLWM4dnQlxsgLjI_QE4r1UoLucZPkK8_lV9W76uh28SLY4Ve-wwyq8anPYT5oOLXWrWhqrxxCHeKpFhXgpLYd3_Mong9A6OSvGmL2nG-G7LBXxfpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/0889019e6e1146a5b4b9e2cee6f21c72","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"xk9Ix3IM9NfXTXbn7KV3Fe34jpKghO0M7X1ZwFTDa2bcWvxBewgsI5L2m017H9EoCqRpbu2-HkHGztKZfwSfpEKYA4OvdObgwBXA_IVHDUiExsjrtkcQJR_LtPrsIrZpIZt5_g_RMOhjpWG40iOHtzo7XiYjg26-MV1LNWGiooPRECJNaXZaS1fy2FCNXxHff6kR7kpKBSZQSx4qNUwnfmLmIvGSyOdLnCOvdrQtESGaSc7LMWCLJs1HlyN1wlaXmZnIIAs7Vo15ABCK3FCP5zZ0DpppAZUdMay4tWyevvlMG5CK6NpQTLkc49U884XqXILVfkEAzkwZekdr6gu_Cw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/a0d22140c0ed4278870724e54d99b938","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"n9pVD9XL43BykxzcY1c6XKmGMuN20UbSM6uaku1GdCzvuPCWO54fdRqs8JduEvUOgRTuYV52QMGLvyb2_AXrzvedEZI6o2PE2FO5kJH8qfFyCjqiqY6H-MeFfMfa2UoVSG-ykYIxqayh_HpwSwndVMPnoc0p5_lmecZqsFCJrT5OZZTmHat9iyNXEp9G-nY4EVOPnxb_HsqxWoIivjqO_OeVUXneLYzU9iCEpihr3eXYrE8nIeiGMimehDC0EF3RlJ9BvsC2Aj6EddajS9xh8mrTXMms4k-2X_8IJwQcarPpAqiz9K7GWbCcTPdQEbddQSX5FkZ_FeeLC013JEap9Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/c4cf39ef0106455198808a4ba6619fb3","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"h-72gARqMwXp7XtwAwPww4PVBoPuK5UA6mXubetsECLjnjrAU5W90bGcj9hM6qqLxZzUHWXB17SNObjBK39Up9DSaq7nX9N8MDslgW0NgQ5Sm2fRc2t7Rr87qrk8HqRQrqqo3MwArB5C-K7AYQrfihBMG8C21XTrv_NFS7VSWc1dzA9nWm7ch96I5pK7b-VCJ1M5UMuMBpu4JAOrebwiIbyt51CWkq2Qn0FBwg433ygFJFJCTjDV9biGFWePS1TknaJGFGwh6oMqokpItcWBIlD5qWbq-DaCjKD2HLnt7pWWjee6Qcjwoib4MrqBoJCZ8hK4J0oWZiYS93gfuGpDHw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/b329bb00403f4aaebbd90983b562d23d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wOKd__6i8rgLj8FY36VE4_r912xmbafiiaruIKRg0YH88kkDeFyrtuma13WFYco4C_Mpd9_VmTOBYydkLUJG3skk0pYj_lpaXgickbrUfYUO518-3rMXR6ZEfP_UAZonk6rc6rMAl1mBHPxJSI_61TKFRyDPFIVN3cfn3Rlu32MTTk4yFlGKzkx03z1DHjxNvAoDWOq4Rx7M2y-SFb3hS-Cbo9S3k3EObwpyqyLab9NuHjK8_TlaTChVSyaKegaxDKPdZSOwLpaugzKGiuYDc2Pv7FBvBysrZwWo9y8g-djQTCW7de4Sg4d1e_OgXkVd9jKM-iDmZP-0FG1KNrODUw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/4dede8ef1f0c4896876f41d26e623eda","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"pj2NZDpblOdcn9WnMuduYVQH6L4sQaHLnENAgOpBVJrmPGFaTC06UizxlnFQQgXFrWFIDV3fMRYZjvKj0CDTZw3ArUDI1AC3rAMez07CNJrxBc-pyRJo2qm7yET4JjUcoNUzPe49Jg0sTm_GjYCU5oO8hNPjmkvFBqk_tK21wn-GUezhNSw5Xt5wrNut5D9bx9Ec6SNw1jhtC58jyB4BAfyprpbPEBf7jbQ4rmEbPmFNWYtRp2wu-dd2AJ8rUzkyrtDsMIrZeki4J9VmrOd3sfxb2mrTh52u8MMUr4LpVC57YsExMluLEAgKS7BORvwL0zUhbsLE0gbYJ29ovETHbw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/b948df1fd198403b9d957fe3c2b304c8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"ywQxBhO2g4PKjb28A6xkhoNpIJpbEB7CR9XnCQYugrMCTBbgn1Wu5WUIL4nFbOHQqfZFgVm3Iz3GxQx9qbEuKZAZLrQemQvPKfJxShysmvaUvfOFkWAHreHROokOOhpz6RONaOKCExDLebh6xrwY_QX4Mu3CQRLrxXAXCpNCpLkLxSGcwf2QsxyfDgDk5_do5CHWUdDIrfYeBwphry-amLVnevfaMiy-cfuEA7uNXT-g6E0G0IKpK7d4BC_-D_Ik-H1Za5lbMDYCzIDaTyILuoQ3o6AyP2sSQFu287_RMlwny17Z1z_uUSp4t33mLBmKfqnofOpj3DTFV1cSVi_58Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/6e6d01abed4a44119e2a6f7fb100301a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"xny3krbx8hK8KQxeapgTJ062YqcjL40lwn3SaYZF6jvd_NdgExGmHBwqzZhaK0PGciDWQjUSDffKWuOAMJpZRskJ-HkHqB5s2kDQxqNcgHC0M20HA-JjiPRWHqAOpd7-CwaP4Dh0WkuCUZZ2cFHn13AzPifHE9W3uaRVm4UqsSJ9DhVYMxmtdykXkxPbamuv7C7-Cc7OJepctGFRI-z2_locTjZCjLAioOLkR-TiO8HC-dwhdVHGVLb6ndKfnK1oONyKMYmdamciR_xoswsR64k9L8zRH4mQXs1JLcK5bdZGSI9TC8HLsJ1pbISmbvcB8UBWr-vKBvLyyQxCh-oVxQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/90e449bfebae4beabf380cb73f8f9db9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"u1FSeDgoMKXed5j9AedatfVS7qA5zOZuIV5Si5_8A9H5AbJnR6SixEbxH-en_MEeFGIegUfuV_KGnGI7prxZtNH8Wcb5j3FPRsHo4icHMGXfXIJBKsGzP6pt6SzCF3PyGW9IjLFfIf1HD3LLzd5OiaYSHxtpOuHYNPzyo26O0ElTtHBwhUnp0YLSN6_gfCXLEMwjsXMk3EJ-XCDBuPXmRz4CqWgBtA8sABeU9Sy4Ptv_MsdDjLz5wRnvE-_WPHmux2-7BjMvgxln5c_vMEhkmU3L3Jaz5vEK_JO41Q3TVT09mVqudpGCu0qGzd3U4dGn_T-lEW89bR-K9Oqt52ZChQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/e0acb596946145368fd13c8b4e0c2c31","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p6oM5Rje-NLaSvWUXblUxWhXXQ57Uu-4TshEi02pY8Prj9j77Noem7d8RjwPVhTFWEcVoBsivfU8QOHb4yv9v2vWNxCXf6pcqCQU6edvRaxT8C71FlKcMcaRCOqJJRT0lCyf6lbGKsAhpMAfztyV9HBcLUnLtQPtQtqif4tBfCkiDGSI0606lZHmP3bUd5EurPOXGpcLq9gV2m_L5_EjDa5ZgTl_weMHOrzxsIyKjDG3z0Mf66SSLkpt2e6qvsa2bvsV10m0mqAo1jHkJPa2XXdrE4EAe5X2EWoesw_voom0zsrfemdFD1poDPwWsbZvkRBR1T-GmN7cj6xjucJspQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/versions?api-version=7.0 response: body: - string: '{"value":[{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/786f33cf86024134b1795f24b3f0f955","attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/8bf922cf4b0640ad8fbe53288acbcbbb","attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/90e449bfebae4beabf380cb73f8f9db9","attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/a0d22140c0ed4278870724e54d99b938","attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/b329bb00403f4aaebbd90983b562d23d","attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/b948df1fd198403b9d957fe3c2b304c8","attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/c2b39ea5f3ee4c1181284d3109f4f66e","attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}],"nextLink":null}' + string: '{"value":[{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/0889019e6e1146a5b4b9e2cee6f21c72","attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/4dede8ef1f0c4896876f41d26e623eda","attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/6c0645bada774c53829be1e9d92b8033","attributes":{"enabled":true,"created":1564527265,"updated":1564527265,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/6e6d01abed4a44119e2a6f7fb100301a","attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/c4cf39ef0106455198808a4ba6619fb3","attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/e0acb596946145368fd13c8b4e0c2c31","attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/f68bb459f88048a28511a6bc9546c4f4","attributes":{"enabled":true,"created":1564527265,"updated":1564527265,"recoveryLevel":"Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '1441' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '1441' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/versions + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_purge.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_purge.yaml index 8986e7164929..2d209bec87d0 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_purge.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_purge.yaml @@ -4,1472 +4,1334 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key0/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:55:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key0/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/b7b15c069a764103aca616941247c05b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2yh-wv0OiJllHsJD2ksiZ2az_143p22PHO_3mqj_W76twCIcehvLnGrVvqBKphuOV81ZHAe0_T491wBWyagcbda_pYlYKMbhnh_U9Xm-UvQB3u6z1S7D4SotH03DCdAUFIjOad6ghlfBUJ-A-hOCOIh3QTv2vqtg7WrdUbuV_4zy1BuW0QfoBZ13apKtU-8HyalVMqkenk3__Rpqub8yifPod3Mx81JqMWGeVqKA2wwAsC8PNbu6mbjC1mGpeI1HwEZRjObRXllYLZoyN2lTOsrxZdzTQQ0biU5RL320u98tg-3a58qclvXJA8TfjEcMQyfi90fVnUBCz58A28jBUQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/a4543a8280204c68978f6f2caae4cbec","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"7wL18EOC3opS5mWL6zSV_0crQP8HuBTVxmpcE1EfePfWRFVc242HNftjbwh-D-3ypnfx0pngk5dM2Wys6K7uC8UDX7xvEIz8Q4yov6EJHFERbUH4QHy5RrywBSry31vmIHdCyLikwyekjeuYDg7jHViKLGU-aRkdSYPhXBZnGjDqzbYwH8_fh9SQnsBDVtJ5dUF0ua2xstnqjZfoTdzvMGMTqrO4rivXc34kdhMAAcbAlg7yvfN8dr9legQfIQq-vSaBuhiLpQXJ7yrCIjWtFyz52F6sVYWFRZDhAEsVfFg0KwMROwPhLDZuolRnc5113C8rZTjSrPGTvzKloqgybQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key1/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/e2105e596e1244a496166f11ef3fcc83","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"q_cGt1m0sRbgdPQvIy5YpXC4LQ49mOhVO1IH4XoTMiGgSAF5RtJzSPBWPx93I1Lmuvlml15EroYaudSZRivYgOM9BmVet_ZEAl0yL7FySYG1aepyalxZ1HU00b6Thn0MCYZawsK_HR6_VQsK4uVf0uBiwjSXgAT39yK9M6YC09ny5Tokdxi0CtlI88TBzhGVcsU4GBLB7zziUMsIdMNvU_08XXMdyFO0MZCCtZ4FKQ-LWrMXTd9TonbeyxHjKK55RYk73vOrurPdtncmL-7Tal-ReUfWNa8IBTbv2-5HF9pKeWiugPsYx5LZDkeMPShLLXLhUl9IrAWNJ75TbJnqCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/594bd6b877b549e78c65e8e6065f9b61","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vL6fWpzKR-eh3DEeb8meE7BVQhQ3EslTQ2YFnfI7z1PSJbTYL9GzOEYDOCEw3HK1-kDQlQNuG9cS9w8a-XyXN2GaIN1d3wCsvkiF8IxSgZvyzah76cnJlY9k8s2_-xpH9-eDn2V_O_oT5S05ZDGE8S3yQXX40b12GbCzox2ydAmbiG26o75ee9Ep-VcA65Sn8gSGR8GyBeu_pfuEZR2ExG6ykluUJWV5S-aHNQP1QwC5J5lN6BA6IQw_CNiu5IIen69RATOv9OUlEcb8qUzAa6w77y2BfIPW-721Al6AVsQc5qfs-fPGvlAMMTgRpUULbZtJf_Ua_x4SJLEg5gqEEQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key1/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key2/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/1d4636bd96ce41dbbca191bf2d58f491","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vUAwWk483zwp364hcyCNX8EzclzX-56CvL-UAmRkaI3rDttCvgo9lDk6unH7S1E6lB1J9ZfF5LebqqfNR7MheTPuvlq034V-eQHiMFmYgbpHkyM3YYElSQulBk7dlJ5JmVW9LgdDkVeRdKU0NXzFSbScn2gynewJx5uJDREcKRKLKbD4WXMtpUep_YgJG3tT3Moy0OrgB8GD1EeGU5xGb9HKLU6B4YxT7vOTd9oP_vrUGzWLzv2gUVcat3ey0KLymyS2UEQcXazrJ8I48plMYRFuo7rVDolp2KmqrQLYutqn5c-bW_mq0kytdH-9-NxDW_zrsVSMSjuXfa3rPXQQ1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/4cf7e15813524ce8a0cbbff407e4320f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lCN9N51jfLTckgcgoUDBIa8fKsi-BBeyz6RtKo0rxdiU8HiI8bPwjWomaGom950KKIvxVZO81xh7R7wOsVMoo4pmfM6IoSX9xRJKDG0Z3-rjkXi8wswKbcVP2EgPZ0ZZfMi1MgPHarfMXPMCtA1fOndYM_FGWijYbf6ngXvgvRsMkg-d5AOU0vP9A_Cw4f5CvdeVKGsbaHkXy8udls-Ir5we-S749TcCzpje2UJ7UftWOMynXPl5bagZ1jZBXqPI0Yn4lLUXmI2xLw-QkZPEBgMGyMwcjI3bGZUKHVQdnFymdXIN8xZyiTnWvjaYHGQK7w-c_bjBxs4WA5EgiIUAGw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key2/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/bf97328c64bc4190b7c0b5025152e0ef","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"iC40PZjyzCPorzlWM7YTGIcZp4zP9YeUzig51DOE5iAHLXaIDbjZs2H-TO0l3q205oCX3R3dBBoJvxlEDbLjSLI4NdLym0EqIWTd4B6JelFBq-3zEeJJt4SHkMRQdkWPA7dwIEi4JgfyazFN8JkL3x-S2zSqqyzmoG4U4gpxKN3NPAyk1qmszmpKjnGzNJg7ywY9tewDlqx6MiMQkODxr27rOjXHx_hbp7iKhD3ZwTKAvX7g14JzpYIkXmKsyUtCU_pLx6HEqNUVLNyV0xfAtXctSSuudeE5LDItakUEY5oFe7iT1DlqPDOGoVmtfg3wf5OocdtajvdfZGfMRUpi4w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/00e02fa485e44c17afda5770e8153dcb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1p-HLSbIn1lvsmxtwTf9Gmsd7r--sUU9C0CSjMQzz_yXSt4nnKzNbtbPfpkG1UPSyysrnNKfz9YWIaJWrYUZbdDRF_xNMV_QHiXHrsW851fZqZZYYz_KICrD9PZoBgE9SMIZznXBnx1AXEhDtZeMsHixlIWCmW1zrnwtaa1a9jjbNCArj3bF9WK7Fz4lm4sov5J98XaOHFvaFmDIVSW1mPlU7IFY7qzvim_ADeWFFZ2ibgb2fZbdo4EK1sL8HpkrVaryidFBRYVfQjIAusI8bNTcrEp2RLvaiPTh9Kqcwqz1GIJ8rWMCjflxOHsXiwpucyekYpEMX0PJD9RKYeBSZQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key4/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/df257ae8ce7445499e565c897a68dfbd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"3nDxOtRk2XEekU3CDix3JvDSL_ovOzFqQOiGcm4gAsnxKBF7KAOINLVdOU-jgDU1tW0lDU9EB7tgt09O3ZRn6wHfX11FbsWX_UQVVZZ1-9TN8qNm05VCT41hXVJXp0orAnc8oMj3zBgWuHRzNOO3H6HECD0O1rTtgpSzBVlkRjvJFoNZ_VeM4ALRdghGM5pZwDhZmXjPwWMNBhrxsehGcIwWwapylZUSjDTkv6RcVs7nROpDZiEyXxGkLMDZgQKcbZPUP8pUmWaWS9639d3NL-y8wvBrxkz2YLcLU4rVMZBKwQD-QA6kfRBZ-tSdm2Wjosn9tY_4ZaF5BT2bSZ4jWQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/7744766f37c84db6b97adf44cfdf3c01","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"5ffGsn2LropTgRfM75DCYE5k_rlbSIgAVqf4IFIHhIVwHdbco3qg8ROnX36f6jsH_x8JMvGfACIuFTwGLhw8VCK4NZOHIHFeq2kSSOHrqBLhIw7WZKCWrKfPBDtdKAvVmhMzLIn31FFAbNpbgDNVYa681ajXk7kBMdJaCX9ymT8a-DvNLDh3K33ImrqXZLNLX6KOh8-sAECfOVZcoRDfvzi6I5edrzxG-jMZnyYXMvdOWWO4SfmmD_-L6_kCksibxIbL-7LFqfO4rtcbv2ew87GA-V4Drm3OwQrX0h13xIuGZ5J6GVOQ8uhXwrHdz_UCL38_A5wLlWzMnDe7iMDMmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key4/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key5/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/1977c712eff64ef9a3384f93eec3920d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"0V3D3E6vH_DcYMtkqMZjr6Cw1M6sYzYjUlu3eyNrh2h8qq2oIWFgDRzm_wvfG0k1JOuS28L_ZkYaAsIeW3mQx0liwfi0Qw3nMWFjzcLpLw9GBM6WZBr1C8uh0DbSvoWGo82FIIWONKWYZtimkep2UtBpEkbWXtBK7HMwWr1YhQxLwya-eq7R7L_F-d5CmAJCWZAfIU7shSesGIFZLYV8UzM2rfWueyEVQw0jrC5SC7eVoiIQ9t7bkGw_mooqod7KdIDIIyeaOpe-7xd8EqntmOeOl2EYehTeH2oaUwm-SWSfE53-Jf8GzqHMYLsXO0FcYTkZO2RCl630YSJWOQ0J_Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/0b821b69a2a3451793d33595b4b52674","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2i-Yevb0gLnOGSWkCrRSfbsui3vbi5PcXH8mYAA-O5DF64zVu3tgj7MD1bHG9Xnw9KX75MRwPFZoZnXByNEWEPyndhbOsNTypLxcFYagDEB9tMH9oO_M6SO7pOotlnqKT_Zhf4w3hWK-Gsrmovl6T2729nyAOmbVjNosC-u5JCU128WXpnel8HbJXKMjtmGDVKCOBErTm1ZYTeGjr8nMnlhnOFbaRkGST3c3YcaabJ0ZZQ7BVhna_ddt4de5yGxfNUi4-E2KwwcC8EWBWAL4idDfeaRGf-J954hMdtQXvIFjM4ovpZtajP5OjjcGsp9spfChZ4UMsmk8LMWptzjukQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key5/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key6/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/a46d41e3df94485998d628effc1cc9fa","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2pOHXzB_Ek3t-w1EPmq6Wv9tDkaP1tekAEn1FDJNKSMPRwsoQ77_2VE3aggrKhRAEhxxXJqCpsnSK3aOxeiO3PAnPkXBg9FqQ2GcFykqXwQaKEeJi3oFo_Ik4O3VgaGca4g3LyAIjhcU5RglkrdP6gxBPd38ykGmi5kmxBViQc2LVCSwWSK34a_QoYi_mTEu4ai3yyfn4c2DvvJA4Nc-jUoQi4XydgzaDwFIHwBpJ5VZvHbfj88iEQ5r-Ym4xsDZhPv2ywyKokNSocbNDgpk5mpzOGW4v_ZkAuS1DsMd7ZdVYtuVzg1y_jNtaK985OWrJhTz0_VWXKLoR_sBGkNN1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/06c3cfdcaa30440e80108348d890bfe0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"70-948DTxaM8NbPNVnBTYQQ9bBjrA1jLjmDHW8RHZA_DvPxLHiTOLIcXX_YoZNVpjqzvBMhtoyHawmD8b6dKeyeefqkjXryxFBo2L89IDp2MKsg8iG75eeAP0p6FFWBljpfwyduuUCsOZ_x5M6_K5M3aaC2R6oTedX5Gp90dZKUQ97W4S1Im8hW0qrg_HM09vQ7RZ5w_reDC2hk18c6CnERE_W7Z8Q3AEoi17t3cRez616DvLWZxkj2YMyP5mTnYaniSIbpgBU-Eqb4UVKBAAScLHpslfS-cdQr3vyYeIOI-EO1I2K5gLq_2UVn3-VL1fySHw7zvkS9bX_TkdzZnyQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key6/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/keys/key3?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/keys/key0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key3","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/bf97328c64bc4190b7c0b5025152e0ef","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"iC40PZjyzCPorzlWM7YTGIcZp4zP9YeUzig51DOE5iAHLXaIDbjZs2H-TO0l3q205oCX3R3dBBoJvxlEDbLjSLI4NdLym0EqIWTd4B6JelFBq-3zEeJJt4SHkMRQdkWPA7dwIEi4JgfyazFN8JkL3x-S2zSqqyzmoG4U4gpxKN3NPAyk1qmszmpKjnGzNJg7ywY9tewDlqx6MiMQkODxr27rOjXHx_hbp7iKhD3ZwTKAvX7g14JzpYIkXmKsyUtCU_pLx6HEqNUVLNyV0xfAtXctSSuudeE5LDItakUEY5oFe7iT1DlqPDOGoVmtfg3wf5OocdtajvdfZGfMRUpi4w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key0","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/a4543a8280204c68978f6f2caae4cbec","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"7wL18EOC3opS5mWL6zSV_0crQP8HuBTVxmpcE1EfePfWRFVc242HNftjbwh-D-3ypnfx0pngk5dM2Wys6K7uC8UDX7xvEIz8Q4yov6EJHFERbUH4QHy5RrywBSry31vmIHdCyLikwyekjeuYDg7jHViKLGU-aRkdSYPhXBZnGjDqzbYwH8_fh9SQnsBDVtJ5dUF0ua2xstnqjZfoTdzvMGMTqrO4rivXc34kdhMAAcbAlg7yvfN8dr9legQfIQq-vSaBuhiLpQXJ7yrCIjWtFyz52F6sVYWFRZDhAEsVfFg0KwMROwPhLDZuolRnc5113C8rZTjSrPGTvzKloqgybQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/keys/key2?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/keys/key1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key2","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/1d4636bd96ce41dbbca191bf2d58f491","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vUAwWk483zwp364hcyCNX8EzclzX-56CvL-UAmRkaI3rDttCvgo9lDk6unH7S1E6lB1J9ZfF5LebqqfNR7MheTPuvlq034V-eQHiMFmYgbpHkyM3YYElSQulBk7dlJ5JmVW9LgdDkVeRdKU0NXzFSbScn2gynewJx5uJDREcKRKLKbD4WXMtpUep_YgJG3tT3Moy0OrgB8GD1EeGU5xGb9HKLU6B4YxT7vOTd9oP_vrUGzWLzv2gUVcat3ey0KLymyS2UEQcXazrJ8I48plMYRFuo7rVDolp2KmqrQLYutqn5c-bW_mq0kytdH-9-NxDW_zrsVSMSjuXfa3rPXQQ1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key1","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/594bd6b877b549e78c65e8e6065f9b61","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vL6fWpzKR-eh3DEeb8meE7BVQhQ3EslTQ2YFnfI7z1PSJbTYL9GzOEYDOCEw3HK1-kDQlQNuG9cS9w8a-XyXN2GaIN1d3wCsvkiF8IxSgZvyzah76cnJlY9k8s2_-xpH9-eDn2V_O_oT5S05ZDGE8S3yQXX40b12GbCzox2ydAmbiG26o75ee9Ep-VcA65Sn8gSGR8GyBeu_pfuEZR2ExG6ykluUJWV5S-aHNQP1QwC5J5lN6BA6IQw_CNiu5IIen69RATOv9OUlEcb8qUzAa6w77y2BfIPW-721Al6AVsQc5qfs-fPGvlAMMTgRpUULbZtJf_Ua_x4SJLEg5gqEEQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/keys/key6?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/keys/key2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key6","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/a46d41e3df94485998d628effc1cc9fa","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2pOHXzB_Ek3t-w1EPmq6Wv9tDkaP1tekAEn1FDJNKSMPRwsoQ77_2VE3aggrKhRAEhxxXJqCpsnSK3aOxeiO3PAnPkXBg9FqQ2GcFykqXwQaKEeJi3oFo_Ik4O3VgaGca4g3LyAIjhcU5RglkrdP6gxBPd38ykGmi5kmxBViQc2LVCSwWSK34a_QoYi_mTEu4ai3yyfn4c2DvvJA4Nc-jUoQi4XydgzaDwFIHwBpJ5VZvHbfj88iEQ5r-Ym4xsDZhPv2ywyKokNSocbNDgpk5mpzOGW4v_ZkAuS1DsMd7ZdVYtuVzg1y_jNtaK985OWrJhTz0_VWXKLoR_sBGkNN1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key2","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/4cf7e15813524ce8a0cbbff407e4320f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lCN9N51jfLTckgcgoUDBIa8fKsi-BBeyz6RtKo0rxdiU8HiI8bPwjWomaGom950KKIvxVZO81xh7R7wOsVMoo4pmfM6IoSX9xRJKDG0Z3-rjkXi8wswKbcVP2EgPZ0ZZfMi1MgPHarfMXPMCtA1fOndYM_FGWijYbf6ngXvgvRsMkg-d5AOU0vP9A_Cw4f5CvdeVKGsbaHkXy8udls-Ir5we-S749TcCzpje2UJ7UftWOMynXPl5bagZ1jZBXqPI0Yn4lLUXmI2xLw-QkZPEBgMGyMwcjI3bGZUKHVQdnFymdXIN8xZyiTnWvjaYHGQK7w-c_bjBxs4WA5EgiIUAGw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/keys/key0?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/keys/key3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key0","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/b7b15c069a764103aca616941247c05b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2yh-wv0OiJllHsJD2ksiZ2az_143p22PHO_3mqj_W76twCIcehvLnGrVvqBKphuOV81ZHAe0_T491wBWyagcbda_pYlYKMbhnh_U9Xm-UvQB3u6z1S7D4SotH03DCdAUFIjOad6ghlfBUJ-A-hOCOIh3QTv2vqtg7WrdUbuV_4zy1BuW0QfoBZ13apKtU-8HyalVMqkenk3__Rpqub8yifPod3Mx81JqMWGeVqKA2wwAsC8PNbu6mbjC1mGpeI1HwEZRjObRXllYLZoyN2lTOsrxZdzTQQ0biU5RL320u98tg-3a58qclvXJA8TfjEcMQyfi90fVnUBCz58A28jBUQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key3","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/00e02fa485e44c17afda5770e8153dcb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1p-HLSbIn1lvsmxtwTf9Gmsd7r--sUU9C0CSjMQzz_yXSt4nnKzNbtbPfpkG1UPSyysrnNKfz9YWIaJWrYUZbdDRF_xNMV_QHiXHrsW851fZqZZYYz_KICrD9PZoBgE9SMIZznXBnx1AXEhDtZeMsHixlIWCmW1zrnwtaa1a9jjbNCArj3bF9WK7Fz4lm4sov5J98XaOHFvaFmDIVSW1mPlU7IFY7qzvim_ADeWFFZ2ibgb2fZbdo4EK1sL8HpkrVaryidFBRYVfQjIAusI8bNTcrEp2RLvaiPTh9Kqcwqz1GIJ8rWMCjflxOHsXiwpucyekYpEMX0PJD9RKYeBSZQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault92670ac9.vault.azure.net/keys/key4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key4","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/df257ae8ce7445499e565c897a68dfbd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"3nDxOtRk2XEekU3CDix3JvDSL_ovOzFqQOiGcm4gAsnxKBF7KAOINLVdOU-jgDU1tW0lDU9EB7tgt09O3ZRn6wHfX11FbsWX_UQVVZZ1-9TN8qNm05VCT41hXVJXp0orAnc8oMj3zBgWuHRzNOO3H6HECD0O1rTtgpSzBVlkRjvJFoNZ_VeM4ALRdghGM5pZwDhZmXjPwWMNBhrxsehGcIwWwapylZUSjDTkv6RcVs7nROpDZiEyXxGkLMDZgQKcbZPUP8pUmWaWS9639d3NL-y8wvBrxkz2YLcLU4rVMZBKwQD-QA6kfRBZ-tSdm2Wjosn9tY_4ZaF5BT2bSZ4jWQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key4","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/7744766f37c84db6b97adf44cfdf3c01","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"5ffGsn2LropTgRfM75DCYE5k_rlbSIgAVqf4IFIHhIVwHdbco3qg8ROnX36f6jsH_x8JMvGfACIuFTwGLhw8VCK4NZOHIHFeq2kSSOHrqBLhIw7WZKCWrKfPBDtdKAvVmhMzLIn31FFAbNpbgDNVYa681ajXk7kBMdJaCX9ymT8a-DvNLDh3K33ImrqXZLNLX6KOh8-sAECfOVZcoRDfvzi6I5edrzxG-jMZnyYXMvdOWWO4SfmmD_-L6_kCksibxIbL-7LFqfO4rtcbv2ew87GA-V4Drm3OwQrX0h13xIuGZ5J6GVOQ8uhXwrHdz_UCL38_A5wLlWzMnDe7iMDMmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault92670ac9.vault.azure.net/keys/key5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key5","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/1977c712eff64ef9a3384f93eec3920d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"0V3D3E6vH_DcYMtkqMZjr6Cw1M6sYzYjUlu3eyNrh2h8qq2oIWFgDRzm_wvfG0k1JOuS28L_ZkYaAsIeW3mQx0liwfi0Qw3nMWFjzcLpLw9GBM6WZBr1C8uh0DbSvoWGo82FIIWONKWYZtimkep2UtBpEkbWXtBK7HMwWr1YhQxLwya-eq7R7L_F-d5CmAJCWZAfIU7shSesGIFZLYV8UzM2rfWueyEVQw0jrC5SC7eVoiIQ9t7bkGw_mooqod7KdIDIIyeaOpe-7xd8EqntmOeOl2EYehTeH2oaUwm-SWSfE53-Jf8GzqHMYLsXO0FcYTkZO2RCl630YSJWOQ0J_Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key5","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/0b821b69a2a3451793d33595b4b52674","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2i-Yevb0gLnOGSWkCrRSfbsui3vbi5PcXH8mYAA-O5DF64zVu3tgj7MD1bHG9Xnw9KX75MRwPFZoZnXByNEWEPyndhbOsNTypLxcFYagDEB9tMH9oO_M6SO7pOotlnqKT_Zhf4w3hWK-Gsrmovl6T2729nyAOmbVjNosC-u5JCU128WXpnel8HbJXKMjtmGDVKCOBErTm1ZYTeGjr8nMnlhnOFbaRkGST3c3YcaabJ0ZZQ7BVhna_ddt4de5yGxfNUi4-E2KwwcC8EWBWAL4idDfeaRGf-J954hMdtQXvIFjM4ovpZtajP5OjjcGsp9spfChZ4UMsmk8LMWptzjukQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/keys/key1?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/keys/key6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key1","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/e2105e596e1244a496166f11ef3fcc83","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"q_cGt1m0sRbgdPQvIy5YpXC4LQ49mOhVO1IH4XoTMiGgSAF5RtJzSPBWPx93I1Lmuvlml15EroYaudSZRivYgOM9BmVet_ZEAl0yL7FySYG1aepyalxZ1HU00b6Thn0MCYZawsK_HR6_VQsK4uVf0uBiwjSXgAT39yK9M6YC09ny5Tokdxi0CtlI88TBzhGVcsU4GBLB7zziUMsIdMNvU_08XXMdyFO0MZCCtZ4FKQ-LWrMXTd9TonbeyxHjKK55RYk73vOrurPdtncmL-7Tal-ReUfWNa8IBTbv2-5HF9pKeWiugPsYx5LZDkeMPShLLXLhUl9IrAWNJ75TbJnqCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key6","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/06c3cfdcaa30440e80108348d890bfe0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"70-948DTxaM8NbPNVnBTYQQ9bBjrA1jLjmDHW8RHZA_DvPxLHiTOLIcXX_YoZNVpjqzvBMhtoyHawmD8b6dKeyeefqkjXryxFBo2L89IDp2MKsg8iG75eeAP0p6FFWBljpfwyduuUCsOZ_x5M6_K5M3aaC2R6oTedX5Gp90dZKUQ97W4S1Im8hW0qrg_HM09vQ7RZ5w_reDC2hk18c6CnERE_W7Z8Q3AEoi17t3cRez616DvLWZxkj2YMyP5mTnYaniSIbpgBU-Eqb4UVKBAAScLHpslfS-cdQr3vyYeIOI-EO1I2K5gLq_2UVn3-VL1fySHw7zvkS9bX_TkdzZnyQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key3?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key3"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key3?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key3","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/bf97328c64bc4190b7c0b5025152e0ef","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"iC40PZjyzCPorzlWM7YTGIcZp4zP9YeUzig51DOE5iAHLXaIDbjZs2H-TO0l3q205oCX3R3dBBoJvxlEDbLjSLI4NdLym0EqIWTd4B6JelFBq-3zEeJJt4SHkMRQdkWPA7dwIEi4JgfyazFN8JkL3x-S2zSqqyzmoG4U4gpxKN3NPAyk1qmszmpKjnGzNJg7ywY9tewDlqx6MiMQkODxr27rOjXHx_hbp7iKhD3ZwTKAvX7g14JzpYIkXmKsyUtCU_pLx6HEqNUVLNyV0xfAtXctSSuudeE5LDItakUEY5oFe7iT1DlqPDOGoVmtfg3wf5OocdtajvdfZGfMRUpi4w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' + headers: + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:33 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' + headers: + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:36 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' + headers: + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:39 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' + headers: + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + response: + body: + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key0","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/a4543a8280204c68978f6f2caae4cbec","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"7wL18EOC3opS5mWL6zSV_0crQP8HuBTVxmpcE1EfePfWRFVc242HNftjbwh-D-3ypnfx0pngk5dM2Wys6K7uC8UDX7xvEIz8Q4yov6EJHFERbUH4QHy5RrywBSry31vmIHdCyLikwyekjeuYDg7jHViKLGU-aRkdSYPhXBZnGjDqzbYwH8_fh9SQnsBDVtJ5dUF0ua2xstnqjZfoTdzvMGMTqrO4rivXc34kdhMAAcbAlg7yvfN8dr9legQfIQq-vSaBuhiLpQXJ7yrCIjWtFyz52F6sVYWFRZDhAEsVfFg0KwMROwPhLDZuolRnc5113C8rZTjSrPGTvzKloqgybQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key2?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key2","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/1d4636bd96ce41dbbca191bf2d58f491","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vUAwWk483zwp364hcyCNX8EzclzX-56CvL-UAmRkaI3rDttCvgo9lDk6unH7S1E6lB1J9ZfF5LebqqfNR7MheTPuvlq034V-eQHiMFmYgbpHkyM3YYElSQulBk7dlJ5JmVW9LgdDkVeRdKU0NXzFSbScn2gynewJx5uJDREcKRKLKbD4WXMtpUep_YgJG3tT3Moy0OrgB8GD1EeGU5xGb9HKLU6B4YxT7vOTd9oP_vrUGzWLzv2gUVcat3ey0KLymyS2UEQcXazrJ8I48plMYRFuo7rVDolp2KmqrQLYutqn5c-bW_mq0kytdH-9-NxDW_zrsVSMSjuXfa3rPXQQ1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key1","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/594bd6b877b549e78c65e8e6065f9b61","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vL6fWpzKR-eh3DEeb8meE7BVQhQ3EslTQ2YFnfI7z1PSJbTYL9GzOEYDOCEw3HK1-kDQlQNuG9cS9w8a-XyXN2GaIN1d3wCsvkiF8IxSgZvyzah76cnJlY9k8s2_-xpH9-eDn2V_O_oT5S05ZDGE8S3yQXX40b12GbCzox2ydAmbiG26o75ee9Ep-VcA65Sn8gSGR8GyBeu_pfuEZR2ExG6ykluUJWV5S-aHNQP1QwC5J5lN6BA6IQw_CNiu5IIen69RATOv9OUlEcb8qUzAa6w77y2BfIPW-721Al6AVsQc5qfs-fPGvlAMMTgRpUULbZtJf_Ua_x4SJLEg5gqEEQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key6?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key6","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/a46d41e3df94485998d628effc1cc9fa","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2pOHXzB_Ek3t-w1EPmq6Wv9tDkaP1tekAEn1FDJNKSMPRwsoQ77_2VE3aggrKhRAEhxxXJqCpsnSK3aOxeiO3PAnPkXBg9FqQ2GcFykqXwQaKEeJi3oFo_Ik4O3VgaGca4g3LyAIjhcU5RglkrdP6gxBPd38ykGmi5kmxBViQc2LVCSwWSK34a_QoYi_mTEu4ai3yyfn4c2DvvJA4Nc-jUoQi4XydgzaDwFIHwBpJ5VZvHbfj88iEQ5r-Ym4xsDZhPv2ywyKokNSocbNDgpk5mpzOGW4v_ZkAuS1DsMd7ZdVYtuVzg1y_jNtaK985OWrJhTz0_VWXKLoR_sBGkNN1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key2","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/4cf7e15813524ce8a0cbbff407e4320f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lCN9N51jfLTckgcgoUDBIa8fKsi-BBeyz6RtKo0rxdiU8HiI8bPwjWomaGom950KKIvxVZO81xh7R7wOsVMoo4pmfM6IoSX9xRJKDG0Z3-rjkXi8wswKbcVP2EgPZ0ZZfMi1MgPHarfMXPMCtA1fOndYM_FGWijYbf6ngXvgvRsMkg-d5AOU0vP9A_Cw4f5CvdeVKGsbaHkXy8udls-Ir5we-S749TcCzpje2UJ7UftWOMynXPl5bagZ1jZBXqPI0Yn4lLUXmI2xLw-QkZPEBgMGyMwcjI3bGZUKHVQdnFymdXIN8xZyiTnWvjaYHGQK7w-c_bjBxs4WA5EgiIUAGw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key0","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/b7b15c069a764103aca616941247c05b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2yh-wv0OiJllHsJD2ksiZ2az_143p22PHO_3mqj_W76twCIcehvLnGrVvqBKphuOV81ZHAe0_T491wBWyagcbda_pYlYKMbhnh_U9Xm-UvQB3u6z1S7D4SotH03DCdAUFIjOad6ghlfBUJ-A-hOCOIh3QTv2vqtg7WrdUbuV_4zy1BuW0QfoBZ13apKtU-8HyalVMqkenk3__Rpqub8yifPod3Mx81JqMWGeVqKA2wwAsC8PNbu6mbjC1mGpeI1HwEZRjObRXllYLZoyN2lTOsrxZdzTQQ0biU5RL320u98tg-3a58qclvXJA8TfjEcMQyfi90fVnUBCz58A28jBUQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key3","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/00e02fa485e44c17afda5770e8153dcb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1p-HLSbIn1lvsmxtwTf9Gmsd7r--sUU9C0CSjMQzz_yXSt4nnKzNbtbPfpkG1UPSyysrnNKfz9YWIaJWrYUZbdDRF_xNMV_QHiXHrsW851fZqZZYYz_KICrD9PZoBgE9SMIZznXBnx1AXEhDtZeMsHixlIWCmW1zrnwtaa1a9jjbNCArj3bF9WK7Fz4lm4sov5J98XaOHFvaFmDIVSW1mPlU7IFY7qzvim_ADeWFFZ2ibgb2fZbdo4EK1sL8HpkrVaryidFBRYVfQjIAusI8bNTcrEp2RLvaiPTh9Kqcwqz1GIJ8rWMCjflxOHsXiwpucyekYpEMX0PJD9RKYeBSZQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault92670ac9.vault.azure.net/deletedkeys/key4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key4","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/df257ae8ce7445499e565c897a68dfbd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"3nDxOtRk2XEekU3CDix3JvDSL_ovOzFqQOiGcm4gAsnxKBF7KAOINLVdOU-jgDU1tW0lDU9EB7tgt09O3ZRn6wHfX11FbsWX_UQVVZZ1-9TN8qNm05VCT41hXVJXp0orAnc8oMj3zBgWuHRzNOO3H6HECD0O1rTtgpSzBVlkRjvJFoNZ_VeM4ALRdghGM5pZwDhZmXjPwWMNBhrxsehGcIwWwapylZUSjDTkv6RcVs7nROpDZiEyXxGkLMDZgQKcbZPUP8pUmWaWS9639d3NL-y8wvBrxkz2YLcLU4rVMZBKwQD-QA6kfRBZ-tSdm2Wjosn9tY_4ZaF5BT2bSZ4jWQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key4","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/7744766f37c84db6b97adf44cfdf3c01","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"5ffGsn2LropTgRfM75DCYE5k_rlbSIgAVqf4IFIHhIVwHdbco3qg8ROnX36f6jsH_x8JMvGfACIuFTwGLhw8VCK4NZOHIHFeq2kSSOHrqBLhIw7WZKCWrKfPBDtdKAvVmhMzLIn31FFAbNpbgDNVYa681ajXk7kBMdJaCX9ymT8a-DvNLDh3K33ImrqXZLNLX6KOh8-sAECfOVZcoRDfvzi6I5edrzxG-jMZnyYXMvdOWWO4SfmmD_-L6_kCksibxIbL-7LFqfO4rtcbv2ew87GA-V4Drm3OwQrX0h13xIuGZ5J6GVOQ8uhXwrHdz_UCL38_A5wLlWzMnDe7iMDMmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault92670ac9.vault.azure.net/deletedkeys/key5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key5","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/1977c712eff64ef9a3384f93eec3920d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"0V3D3E6vH_DcYMtkqMZjr6Cw1M6sYzYjUlu3eyNrh2h8qq2oIWFgDRzm_wvfG0k1JOuS28L_ZkYaAsIeW3mQx0liwfi0Qw3nMWFjzcLpLw9GBM6WZBr1C8uh0DbSvoWGo82FIIWONKWYZtimkep2UtBpEkbWXtBK7HMwWr1YhQxLwya-eq7R7L_F-d5CmAJCWZAfIU7shSesGIFZLYV8UzM2rfWueyEVQw0jrC5SC7eVoiIQ9t7bkGw_mooqod7KdIDIIyeaOpe-7xd8EqntmOeOl2EYehTeH2oaUwm-SWSfE53-Jf8GzqHMYLsXO0FcYTkZO2RCl630YSJWOQ0J_Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key5","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/0b821b69a2a3451793d33595b4b52674","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2i-Yevb0gLnOGSWkCrRSfbsui3vbi5PcXH8mYAA-O5DF64zVu3tgj7MD1bHG9Xnw9KX75MRwPFZoZnXByNEWEPyndhbOsNTypLxcFYagDEB9tMH9oO_M6SO7pOotlnqKT_Zhf4w3hWK-Gsrmovl6T2729nyAOmbVjNosC-u5JCU128WXpnel8HbJXKMjtmGDVKCOBErTm1ZYTeGjr8nMnlhnOFbaRkGST3c3YcaabJ0ZZQ7BVhna_ddt4de5yGxfNUi4-E2KwwcC8EWBWAL4idDfeaRGf-J954hMdtQXvIFjM4ovpZtajP5OjjcGsp9spfChZ4UMsmk8LMWptzjukQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key1","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/e2105e596e1244a496166f11ef3fcc83","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"q_cGt1m0sRbgdPQvIy5YpXC4LQ49mOhVO1IH4XoTMiGgSAF5RtJzSPBWPx93I1Lmuvlml15EroYaudSZRivYgOM9BmVet_ZEAl0yL7FySYG1aepyalxZ1HU00b6Thn0MCYZawsK_HR6_VQsK4uVf0uBiwjSXgAT39yK9M6YC09ny5Tokdxi0CtlI88TBzhGVcsU4GBLB7zziUMsIdMNvU_08XXMdyFO0MZCCtZ4FKQ-LWrMXTd9TonbeyxHjKK55RYk73vOrurPdtncmL-7Tal-ReUfWNa8IBTbv2-5HF9pKeWiugPsYx5LZDkeMPShLLXLhUl9IrAWNJ75TbJnqCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key6","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/06c3cfdcaa30440e80108348d890bfe0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"70-948DTxaM8NbPNVnBTYQQ9bBjrA1jLjmDHW8RHZA_DvPxLHiTOLIcXX_YoZNVpjqzvBMhtoyHawmD8b6dKeyeefqkjXryxFBo2L89IDp2MKsg8iG75eeAP0p6FFWBljpfwyduuUCsOZ_x5M6_K5M3aaC2R6oTedX5Gp90dZKUQ97W4S1Im8hW0qrg_HM09vQ7RZ5w_reDC2hk18c6CnERE_W7Z8Q3AEoi17t3cRez616DvLWZxkj2YMyP5mTnYaniSIbpgBU-Eqb4UVKBAAScLHpslfS-cdQr3vyYeIOI-EO1I2K5gLq_2UVn3-VL1fySHw7zvkS9bX_TkdzZnyQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key6 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key3?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key2?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key1?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key1 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key6?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key2?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key2 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key3?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:47 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key3 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault92670ac9.vault.azure.net/deletedkeys/key4?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:47 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key4 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault92670ac9.vault.azure.net/deletedkeys/key5?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:59 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:47 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key5 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key6?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:59 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:47 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key6 + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_recover.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_recover.yaml index 4ee4fb170618..e24f206c563f 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_recover.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_recover.yaml @@ -4,2604 +4,2008 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:57:22 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:22 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key1/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key1/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key2/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key4/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key5/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key6/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0","deletedDate":1564527444,"scheduledPurgeDate":1572303444,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key1?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5","deletedDate":1562703477,"scheduledPurgeDate":1570479477,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:59 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4?api-version=7.0 - response: - body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:59 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 200 - message: OK + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 200 - message: OK + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key1"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:35 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key1"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:04 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:37 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key1"}}' - headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:07 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0","deletedDate":1564527444,"scheduledPurgeDate":1572303444,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 404 - message: Not Found + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key1"}}' - headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:10 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 404 - message: Not Found + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5","deletedDate":1562703477,"scheduledPurgeDate":1570479477,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 - method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0/recover?api-version=7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4/recover?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3/recover?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key1/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1/recover?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key2/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6/recover?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key3/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2/recover?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key4/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key5/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: POST + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6/recover?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Key not found: key0"}}' - headers: - cache-control: - - no-cache - content-length: - - '64' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 404 - message: Not Found + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key6/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '64' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:17 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '64' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '64' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:20 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '64' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '64' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '64' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '64' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:26 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '64' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:51 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key1/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key1/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key2/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key3/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key4/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key5/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key6/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key1/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key1/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key2/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key3/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:55 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key4/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:55 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key5/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:55 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key6/ + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_crud_operations.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_crud_operations.yaml index c4fcbb136ec5..311c72bb7799 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_crud_operations.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_crud_operations.yaml @@ -4,409 +4,327 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault9627173e.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:18:51 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:58:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: - body: '{"attributes": {"exp": 2527401600}, "key_ops": ["encrypt", "decrypt", "sign", - "verify", "wrapKey", "unwrapKey"], "kty": "RSA", "key_size": 2048}' + body: '{"kty": "RSA", "key_size": 2048, "key_ops": ["encrypt", "decrypt", "sign", + "verify", "wrapKey", "unwrapKey"], "attributes": {"exp": 2527401600}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '144' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault9627173e.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/1bb7bf47dd094b40aa9c050474731167","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-JtT7b6aQoFd3zphPJ6UkTUHc3j0wzUXYodlpplJVWbNc0wOkaeA41omIFcMIVekvTmFJrFPMw3NFTwGeO0TrbQvQJtmksfIx3dTPWOG4zlWcnWrHMhSS2m5HZwYQPWFhSHB9VtgBE6fCzosaInazhiI61f1eGULobYGiRWv3fZ8Ez4iF531AC1RbgYT9uHoOCZ6a2LvwBOOEC3vGLJGRy0A9Ez-s2Yek_fy95ZVySOD7J6OSh4h_GC9roVICi0v9fHwGd8MXCRnKzq-lUxrylIsyfXU78PbG4rojGMQswD8oPfkONH45jWSBe2e2SXkx-HiRQ4VzbMKOxm9bpSYQ","e":"AQAB"},"attributes":{"enabled":true,"exp":2527401600,"created":1562703532,"updated":1562703532,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/5bb4d99959504269a7f5e4bf00ae97a6","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"pmTUlox1v_IPM5MvQyBqp98q8Xhf9Jl_sLc_Z-GN-MSIEXJUuy9otFpP7AxaiF_EpmRWHfhvnnYvjHMEiye29zhavf_nreGFJFoTtWi0ONPF9CCEjG1xyxwnp6wA6EuvhdVzY7NZAlgqQOGULH4QSFsiQw4WZrEJBdV3nsV8aBAhe7uDhHEuy9GZR92l1p1QUrMwOfW1-ELKV0B0naLY5bScduOJADZAe_C6ChHye_e4Ha4L9xH0arfgf5A42t7UCYF7N0DAKK94EDRHTJlFXWt--MzFatkLQtaAYrR8PhBIRB3lwmPmE0LS73KHxOMqBJRlilUMCUxTUXkGYIuxsQ","e":"AQAB"},"attributes":{"enabled":true,"exp":2527401600,"created":1564527529,"updated":1564527529,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '673' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '673' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA-HSM", "key_size": 2048}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '36' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault9627173e.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/ab5beb5937e94d788ebb0ccbdc4859aa","kty":"RSA-HSM","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"pebUyWT5U8L33ZSuWtyPAcoHvB8gOQySsc1PJVzt03rA5UJrfwtJ4Qr5sHS4phxkUmG3gb4FzUHwztAPRaTdwquqM7b9Qk8OPP1BRZeZrrM78iATXd0gM_xzcFs6GE58WFc-ZFVTC9PDVb9ktwDwwf5nSLGsPlqW0dPZEaOkFwv6w9RBqyJtdvGw7zQGeKm9oRG1eQXNSenhJfiYLyDM1Ve6eiSYEBwiG3KAr7QxBIoRxIqecutM2e7MwLWedoPr0BwMUnI6x9k78ytHv9YaHkRU0cLN34o4t4sghoRGape1sg-SR8NW298U5LyukSRX68zAn89d1LU2X-gBSUA9Yw","e":"AAEAAQ"},"attributes":{"enabled":true,"created":1562703532,"updated":1562703532,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/eb05248e5ec54109bf3b4cc3d9880773","kty":"RSA-HSM","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"rlLVJ4CJfxs5CnDFBNqjxlE7c5pcfDFU7PR3v47sL0r0-pPHBya1yUY7Q5FaqCqOIaYAZ9y48MLmcBWHrY5A1xj70DnLXc4ss5KazZopPjCGDLjNzzsfd8YSb0BGm3CrmaYgTXWy3KUbBNR8GX1KaSZkL_OtlPh0jHluHukTZDCsNZWXFqC2ffms31dh-IG9JL-zwtb1zDHJ2oBI43Che5nJVY1_y4ebFDXanwyHzbww2KkbXupR2mK0GqbI3uvjD4v5BEJCX6mCtY2gEW35B1K6lsFgqEFwybD8zbjGKPmrLE0WwFZoXXtQtqch0dica4G4lZm2oX9LnHq_3tPYUQ","e":"AAEAAQ"},"attributes":{"enabled":true,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '662' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '662' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: - body: '{"crv": "P-256", "kty": "EC"}' + body: '{"kty": "EC", "crv": "P-256"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '29' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault9627173e.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"uiR3274tb0zkEvMPr_sxHsmHhutBdxftwkqFiamW1-w","y":"7xk9VqY3UcNGM3V5gnmtHb3vq_q1Q36Sp4s1zA7lDKM"},"attributes":{"enabled":true,"created":1562703532,"updated":1562703532,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"CYFBDHsovMeX0Skq-Jz-spYFLV1KvE4hOEOizQIQHz4","y":"J2E_YSzULuCNo4LZDDRn8IP7inCBoCS-85vkGd8pGf8"},"attributes":{"enabled":true,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '367' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '367' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault9627173e.vault.azure.net/keys/key-name/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"uiR3274tb0zkEvMPr_sxHsmHhutBdxftwkqFiamW1-w","y":"7xk9VqY3UcNGM3V5gnmtHb3vq_q1Q36Sp4s1zA7lDKM"},"attributes":{"enabled":true,"created":1562703532,"updated":1562703532,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"CYFBDHsovMeX0Skq-Jz-spYFLV1KvE4hOEOizQIQHz4","y":"J2E_YSzULuCNo4LZDDRn8IP7inCBoCS-85vkGd8pGf8"},"attributes":{"enabled":true,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '367' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '367' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2?api-version=7.0 + uri: https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"uiR3274tb0zkEvMPr_sxHsmHhutBdxftwkqFiamW1-w","y":"7xk9VqY3UcNGM3V5gnmtHb3vq_q1Q36Sp4s1zA7lDKM"},"attributes":{"enabled":true,"created":1562703532,"updated":1562703532,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"CYFBDHsovMeX0Skq-Jz-spYFLV1KvE4hOEOizQIQHz4","y":"J2E_YSzULuCNo4LZDDRn8IP7inCBoCS-85vkGd8pGf8"},"attributes":{"enabled":true,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '367' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '367' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f + - api-version=7.0 + - '' - request: body: '{"attributes": {"exp": 2524723200}, "tags": {"foo": "updated tag"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '67' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PATCH uri: https://vault9627173e.vault.azure.net/keys/key-name/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"uiR3274tb0zkEvMPr_sxHsmHhutBdxftwkqFiamW1-w","y":"7xk9VqY3UcNGM3V5gnmtHb3vq_q1Q36Sp4s1zA7lDKM"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703532,"updated":1562703533,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"CYFBDHsovMeX0Skq-Jz-spYFLV1KvE4hOEOizQIQHz4","y":"J2E_YSzULuCNo4LZDDRn8IP7inCBoCS-85vkGd8pGf8"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '413' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '413' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault9627173e.vault.azure.net/keys/key-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault9627173e.vault.azure.net/deletedkeys/key-name","deletedDate":1562703533,"scheduledPurgeDate":1570479533,"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"uiR3274tb0zkEvMPr_sxHsmHhutBdxftwkqFiamW1-w","y":"7xk9VqY3UcNGM3V5gnmtHb3vq_q1Q36Sp4s1zA7lDKM"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703532,"updated":1562703533,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"recoveryId":"https://vault9627173e.vault.azure.net/deletedkeys/key-name","deletedDate":1564527530,"scheduledPurgeDate":1572303530,"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"CYFBDHsovMeX0Skq-Jz-spYFLV1KvE4hOEOizQIQHz4","y":"J2E_YSzULuCNo4LZDDRn8IP7inCBoCS-85vkGd8pGf8"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '544' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '544' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_list_operations.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_list_operations.yaml index 6c925adfa57b..d69c5663290a 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_list_operations.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_list_operations.yaml @@ -4,612 +4,492 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key0/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:59:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "EC"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '13' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key0/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key0/8bd25d6c7e4d4c95b249df2ad1a06f03","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"kt3oH8H10CKe2_VPcIxBJ4PQt6O1eCkmCrtyHmdmF6Y","y":"Oje7K1kKsEoeFQn7WZgJ0pZ5n325HykdIeOXoOgVes8"},"attributes":{"enabled":true,"created":1562703511,"updated":1562703511,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key0/99a194f5b97f44ae9125c47157810df2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"b-JfAkvIfu_ILrlz684i-pj0cpd55tzyHDWcW8T0OaA","y":"w1TcOgtEU3ehfOd5jRiZl9PNRHieGIDDwUcWCGuNeQM"},"attributes":{"enabled":true,"created":1564527584,"updated":1564527584,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '363' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '363' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "EC"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '13' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key1/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key1/986a1037ce7845eb9b3927fc07576f12","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"Ulzv_dmHaTAW68YM9dNRAAtYHSxfIWG1pJsl_ZVknvo","y":"ywMBREwV1gC0OBCHul6Mm-sbwku3DjQA1yK7CpQyFBk"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key1/fbc0bda5d70640fe85e5fb435aa55d93","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"7q_mEVJXTIDf7a0CVque6SFN5tXoJyzlZENayGeWsSI","y":"rL-ILnqU7evEpes10rf3xzsnlEbg6gdsDfc08s8LN4k"},"attributes":{"enabled":true,"created":1564527584,"updated":1564527584,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '363' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '363' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key1/create + - api-version=7.0 + - '' - request: body: '{"kty": "EC"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '13' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key2/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key2/a0501fcbc568481b829637c6a92e4abb","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"--BpzoUqMk2FLfcY1VnrLKSzW4GtjfBu_cVUFATu7mY","y":"BU_Q-pS8w3hH9elSSPe0jKzKj4Ey03I3GdgGy_tS7mo"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key2/21946cb8e9d14344a7c9ba8d3db75227","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"Qw1ppcyCUcBHgQ2UEyuTdPYTwOGn7OHLxsT8lXeKdRY","y":"gTWfs8Cjd6QWnWeaAR9lzVePttSlFLzoX1c80aNAkyI"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '363' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '363' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key2/create + - api-version=7.0 + - '' - request: body: '{"kty": "EC"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '13' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key3/b62f8f82b76b47549153d116b383815f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"VQqpb7RotE1iQu9i-7iRZGg8GOpxVQQB6tx_7tMPMZU","y":"SRqLIoGAGpKgrXYP8JwBPSEdW50xNPXpMOeh4YkpvgI"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key3/8bb57a6e699544c6b71d279fd8df32e9","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"xs5QeiF_UBlgmjt9gcJPoI_d71xgE8RqUl_q3Gna760","y":"rfbSl_9PK-Pq704mE6SQIyrhDRK66QIme0DEZHi2rPQ"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '363' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '363' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key0/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key0/6b36301002db4081bfc37dc15a3cf31b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"9rz853RQmmMerwKCfQpSONzDOwC9mniosBB0IWOQldmNJL53cj-yYVaXIaXyblWBA3uDkwWFLFvtz8_mxDowBxMamsJ46_njsKswVOHCgvxwilwc22EwEPyxaQimvRipMtU7mHMEyETOhvMKNhifTa3kv7YKKNGrIO2Psa2MvH7mxdYmjFhbPgdXwF_b7cINa2UGrf0fI_aXryJjY7E1L6J2GDAXiBGaVh59FMRU1DQQkRBBDVIzuGep6QLhpi9Jk4fUKYpFwL6ees5KRmg_Ztgz8E15yWkSRmsoEcNvrL6Enb05blHGNc6uCUYrRcwki1VV_mGW-DWEOE0zHaQysw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key0/0be8a06e74a14348be5604f2d9b2f3ce","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tBGkSMbkIgrbJ61a9DarlO_4f08KDkv8II8OHveKO7JCC2oWX6tOuXdn_zK00wY_Z7QkpBcsdStiPVjdyh9EsyqpaMoheM-HYFPNIMFOa8olntSvHs1D3pAoaHlJOh4-w9QF7CQALLHb6AM5t6molo8Upui1Z7XdHGKXX7RO4IYA752AzaLIakjLO3TCAMinZmnDDGAhunUB94_WpsWv1AAJSFSPjDHCz2dakZnLvreR-EVZz9nk-l3R8aQcr9y9p__ksIshnGKwJJ9l2vMO6p7MiK2RJLd-HFzEWDFKkWfYm9iRfp5vcoNxujLbXP2Rde4qvVlW5PmjLiBSLBxEhQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key1/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key1/a298f2b63271489f807d41d71a2e10c4","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wWuHzO89M8QbAl7BsuKWydhq_xj0RkrAsUjJTtRiLJs6CGl4jkvI9jBJb25Wis0anulK7cQKLv9K7MwtZtpLhnbUya-Qj_D9d9BSOCyjm_DFH9v6tNqKuexqKDu2aUrulDxXqUng4jW_4Is7P2g1uhkdoMJ0pzkToEIi0TUETmfUT7SBOgwr3zwPKcLGeO8H5jwT7AS7lVaz6MKFn07vVnE6sVq6Jxi9jyB6IHO7iwRB6w3cGVPexJGft5m3bt9Kuf47WHyOzVHqmwMMv5W2r8Wb5zVv6cVnb08o44OqGKOGXk0vqqiM2QAB__vM5MbVQMK2TcuJiotjiSHrNJZ8pw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key1/6bd05085b2d54b9093127c75e5109209","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sUhJXxGr6fnKoM9o2q_-XBTFhglYPxfx3XpPPRaTCQlS12cWlu9mKBY1RyuJafMWsUP73N8iNJKa4qFF1C_F6PGBMPJ8lANW98WmJwaF764ZpkEkndGC7wCmqeWQkx0s3PH7mG8jj5uZdCVRAkWqGtmPfxBmV9dYRyDWVgr1r26XnqYzHhXclfIlOdg7VLg5xbtJ_rzrGP5PeETOeBDLJy_4iANPL8YVaJg8r75W_g9JjvLm2ieg66uqwvIm5RlZ8RtqcNgUXLlaCmYXL1jFbTP5lRXFPkXFl1DmXT9pXKS43Wo34MFOuU1tCJsHvtXgyeUHUKHpBdbhxSRc-UZmow","e":"AQAB"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key1/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key2/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key2/022d0289f15b460c830fcd30ddfdafca","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"z56wacSTQoxXCtyq_6uTAUvh-UESgYVJy2RbWQ5DMl1ZJDeIHTublcGy8e_kBOUgkiCFhObP29e8DaTEhuc-vJ62XX2EuDzvmMp2tUido83IIeXatP1gb4TQpXAVBviFXdPQNbce1sDZ5XpA4Zi8HCV1QqVyAJLKTJB6hOpwTW_HXG2qpYQVqOhMXv-39ZkWnVWSWLfz9kKDvfbXCeBDiLz7iVDVdB8ELExAi6vz4xjCRZPExQCCvXXu22OsbehfoW4FLb_NhcTjmTQQfCQ-3G_eskXYl8envgVsi5dxMqklnb0aHM3PTadXrY1wcnjLhYL1vgC7LKS7dc8c5rX29Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703513,"updated":1562703513,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key2/a7fd89dcc95045e9adac42c03dcc7c42","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"n1XbURcEge3wXm6Nk0F10k896dMK7xHaM4pJM6en8WHWuP0OJbTM9NzSmtyhZKh0akiphWCgfaycX4aChrB-7tYGxGcNS3iACwuciBbYeE39tzhJ5eD8byzCWUQVJkx4vsMOhICsaZcrc1Rei5b_LHu-U-T0CTdRDGM-Xvc7-5zP0fLWhhgxahTnTzEne_j4LGIp62H8ijge-btNpU4yK_lWMl0JNgtSSmkY9GTfU0hOqBvCQqWeZ2rfOczeROyzk1XEaLIsjBeSK4us8qjg74OpRGyl4khN__eYIjNPf3gO0qTQMljWtGc4iwG5n72tlx9yg8uIQP9fR38O5xXBVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key2/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key3/f9aabe1e98594882908b42b110e3bc82","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tazNLMksNQi1DwDd3CF2qpnUteGfDXKoraalUO1qmpnVVta8m0z3Ekl9QQocQNFoJlIAnG0PHRrnKRdLt5QMiacE4VO61G-KqP7l-2L6CbC1fEywIqE_FNC7U1neWDuSpel5s1v9HSQp616yUz4zGaBMdwzPykyp4bo2MPcRXkrpZjOBUaX2Z9MGW58Q5ic3Aj3l3MrNY_uOj8JdisNSShn0tnzez5QOV1rdEOcYzmzrNCr00xqjY1qE70uhKSFfdIuxKEsRU05dCuJTbAyLKj_vhsnnnyKQEN1pXcQCO2XaH_ZlCsXdvwWbH5Ptldyn2AHJQ2FT9iLGNOmgr820jw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703513,"updated":1562703513,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key3/14a31e671a3542528b59e4dc06e16bc2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vJCL4Hqk2sGCa8jhMLNRXkUW5fxYdXReSH8K7p7ntVCWnTQGxQVo4gWDHT21Jl8hPCsowiPcddNMLBPV0PTH7J4hTtH-Qsf0nTxduGXvsUCPZIE8noWq4ExTUhoiBysZ6ginKjc_YHH8Dvd3Ei9CK7GP5JF2sfswra1MzU9M2sOQrcFy9-vr6HzThDyhSZpfcy3wN4RvQPLKGxS7tv9bpNrUWoP-1anA6rlj3I1qgbbKS6JFr8X8bxfbql77qOAl07j7zpdaPLGONa2WW8V7XOgR9x_2DLwLJxccBXHURPa3YvMm0av_xSuLZIEIk1cQ11WLSRUZemY-PXtXb_kXww","e":"AQAB"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key3/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault96d6174c.vault.azure.net/keys?api-version=7.0 response: body: - string: '{"value":[{"kid":"https://vault96d6174c.vault.azure.net/keys/key0","attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key1","attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key2","attributes":{"enabled":true,"created":1562703513,"updated":1562703513,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key3","attributes":{"enabled":true,"created":1562703513,"updated":1562703513,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + string: '{"value":[{"kid":"https://vault96d6174c.vault.azure.net/keys/key0","attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key1","attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key2","attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key3","attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '707' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '707' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault96d6174c.vault.azure.net/keys/key-name/versions?api-version=7.0 response: body: string: '{"value":[],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '28' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '28' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key-name/versions + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault96d6174c.vault.azure.net/deletedkeys?api-version=7.0 response: body: string: '{"value":[],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '28' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '28' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /deletedkeys + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_backup_restore.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_backup_restore.yaml index 16f0745fa807..84db990cff27 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_backup_restore.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_backup_restore.yaml @@ -4,256 +4,202 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96041739.vault.azure.net/keys/test-key/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:00:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96041739.vault.azure.net + - /keys/test-key/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96041739.vault.azure.net/keys/test-key/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/7089b08b10a64ec68db241e20e2109d0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qbGcivUVxthKiCxcjxOGdsiItrjjTm0_-o0gkZmRSDlEY4ixbjJYBZMwZLxLm7_ZzoGTVTdON-_6bLu-ZwFqAAe2Nc_HDLkL3FTn1YkjTSA5I6FTXI-CC79m3mPLbrVNkHRUkN7QPpl9Qak8RyRl4TA5XtOp_ztKm5Lfuc1eJsosaRdqaMe2UlEbu0XCdYDoP1UoNRAhrUZwli-GHH6yWQxq0SBtnfUsXH0CkgprrnpDYM3dxUkjJJ6IRpW4acRXrFDg-ccCBQDRLty6eSRehugfZyTGciaT4fBcj245OjytQZHxz2ZGixRxN0YsvjoZXqquXKqfkKEcknMDNapyFw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/d2c863b455c9439b87fc78c6ac184217","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"uWCbdAq6V_Z3_JRNeKK4o27y-v8lL_IUNGXQHywjTU4aoVK8iDvM0ChRMhlChsMcI-SyGaAk7kiS2ywdNx5JI3rcaZiiasFZ-4CUnUQbOB_p5L_r2dDXvfdQzGaigM6cttEW5Iwze5dEd3BOcDQumxRrtSJNld4AlxEK-Kp7xaOUFc_2yAV1QPvELtjJLN1zMNw12FXNqocpZwZ8t1BGvvXKYfz3yrS6rq0nG36n3S1yA9Cb0NnrTjp84na3diRQXpuaUg65QXrbhcBW6o1aKTsuEAVH5FAqDliBa4v5lqTNsWxOGS996rMfjsJHJQ_fymvIy69zHrMe2UPupwz_OQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527628,"updated":1564527628,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '644' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '644' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:00:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96041739.vault.azure.net + - /keys/test-key/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96041739.vault.azure.net/keys/test-key/backup?api-version=7.0 response: body: - string: '{"value":"JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLk4zTkxnQUltVllzMTBLb0R6T2ZkcGI2aHRhMFBQNGxQOXh2VWQ5dEJEaUE4X2dPa1hQcnFza1dMTDd6d1psd2FOYlZNbFZpbnVzbmVwZndNUnlQdENmaHZUSjBMWG5PdUh0TmJfcTNpY1F1LUt2UnhfTHZpaGp4bnVCMUtKNW5ac08xR19RbTVPLXEwdkZySGZJNE9ZQjhIY01fR1VaOGx1dlFYWW5aSl9mY3ZaREZmazlWdVRzaW5fQmxCbXN6Q0JrdnA1LUFrMkwzQXFDUml5TUNjNTMwTVFPbjI4eElXTEhUcUdBTHpLM1pRRTNFMTdqVk9iT1ZtN2ZoWWh5Y3JHYjJWZFpQdmkzR2Vmd2xQZlFNal9VUlM3SzNUc1FkSnRUazREdVdsWkZJTThHY1R1NjZ0dDhIblA5LUE0Vjd5RTliQWJnWXlCZG9QUnhzem01TVg3US54dXBZUjhXMGdvNTI1eUlCSVdsUzF3LnJ0MHZkWFFDUlAyYjJ5b2htdk8wdlRjY1pKLWVlQWNlVHF2WVpEd0tqX1R5SE5iV0RQcFQ4ckN1Z3JpcVJ6ekFvY1hNNDZWME1Fc1JFbGNKTnBKNVNPR0pzeEQ0dVM2c194aDlCQjgwUkRxZTRHcllGckpsSlc4Wl9GLTljMGI2dm54aEhvck9vQ0VxS19VU0xTcU1wNE5pS05CMlZ4aGV4My1NSldJS0Q3M1BxaTZQdnU0MVZnUlR1NGlqTmhMeDJYQ3NtRFpxZkVuUGZHeHFQcWdVYTVvRm9uYUh1enNyRV93LVNORlhlWFQ0Skp2SWkwTFNMRDF0d25CTkVpNUo0Qk16TzJzZExJODhWX001SlpBLXp3RmtGRGNHUnJGeXJkOHVwaDhMVmFrMUpKZExvWkxocERmRjRpQWVLWW0wT0ZtdV9zNEFzbWJCR3ZuTnpUS3IxNlpNZlNrcUtuMm5uUHc2aV9JN3FzR1lEX2xEdm5KaGx2cmQweW0zb1RlSEFRR010OFRZRFhqNXZTejUyNExyNC14M0JMaWx3QlI3UF9SQVhfa2d3LTFYbjdGa3pGM0lscm8wMmNsSUxPWDcySjJUT0JRT2ZZVjRyOGxscE5Bakt0SEJ2cFFRMXV2MTRZbkhhN2VKTVlWWkEwV0VnSlg4elhJb1Nwemd4VnNLSTlRU2ZQLWZQVGdMQ3VUNm1iZVBHWWdSczE4dDdjbGhJaTJwQXRtaVYtam5GVXZJMXZwbWJzekg4SDAzYmZxZF85QmpHbzlzRklNVTBwZjR1Rk1aSmpfUnBldU00MjBmak91clpNY0xFV3lYQm0tU0E0ZUdjb0ViRTlqaVA3RUlveHVOSE5STVpWYjJtdTVzTHplZTNlNXJENzhMazV6bHpld1hPRHdyOHBiY2t5N25hTmRhMi1zOWF0WThwejBQZkhqUGpkdEh6NDEtZkhObl8tb0t4RWU4RDE5LWhRY3pGZkZkaGUyVloxYkRQRV9FckdJSGg0dndSaGNudXllS3p5bFMyQm1WSUdMZ2xzN2lRc2Zta1NpUUl0ZnoyVjZFMGh4aGFWd09PS21tNkpDbWRLR2s3aGE0a3h4aHRxNHZoQi0tclpFTlRTamc3MHdOOVVacFVlUnFQanYyQ1RVcUQxdXZPMHRRTW5zQjRVSWxwa3lqTlpaaVJqVFNaY2FhRzZGRXpDUVczV3c3T0l0S0FBc1AxNnJDYklZVUdRTkZKcUpYSnMybDEzR2JkTTU2OUx2Nnh4V2dSUm1UQ1dKMnJSTEtvY0ptOTh6S0gtV0dKQjA1cVlaT0JZYTdQOVlrdExNZTYzUkRuc0RoZzM5N054UEJFT1pvenh4Rzk0U0tLSUNyUXJYMEJvYmcxRUFlcWFfY1lvMWpIcjUzTFhBV3J2Nno3UHFCYmRVSXM1cEI2cGo0M091MDhzV0c3UTVyREZkd3JHZEpmallLR1hQZnpJcUVJWi02a2xZeE94cC1kazlKT1dpZFdQd2hmblhyWFBsa1ZnOUhDMkdrYzVwM0ptMlVCWE9MQzRZM04tYTBYT1UwSHhjbDhjbHlwVEVpNExCNV9VU25sSFVDVERuS2h0TjE1WEZieG9obnpySDJRYkFKeWM0eUJKeHNZUDRJcVV6QTdBdklfYmpxQTQwX2UxNk5yMHB6YktIU1czZWlLTzBPSmJqa0JONnBlSjdveU9vX0FUU3Q1RGsyWW5DRnBHMDFnY3V4aFdpaE1NWVVzdm1Td2RQb05FX2xnazcwS3FwbG0zbVlTM2UzSXhCNnA4NFBFT3pnMUpwRUt4U25EcHZ4SGxUTmJzSXprUTlIN2Zmb2dLcUx0T2VySkg5NGZ0d3hVNGwwRXFTUHRfMHVFTjlBLTd3WkY4REhhOHlReW9wSUxkS0JOZ0hsN3p0dzJVOVN1TEVGeTM4Wlc5THllVWRqM0dDNjN6SURXM1pHM3B3MDVHSVlMVHQzdHI0NS1LdnZlaHpLYmhfQWxGcTFnaGV5bS11R3ZyME54cUVuTDJzdUFyUy1oS2ljenZiaFNuUFRuQTNHdkVaRWZkVDcyTW4xT2JTVnBVNzZSZlUxand2MXpVOUZ0V1l3dk5YVHU5bF94cmIzSGJVeE1vQ1l2cjJnQUZ2RXVHaTJwS0NEb1J4LWlRcmZlS1Q5Rm5xZmpic1RxQ0pseHViNDA1MjRuVFhTWVJQTnJscEhJaVhBMkRyUGtBUUdGakcwTG43S2VrY3V5ajF0LVU0T0dNM2JaYnY5ZGJPV1hIcVFQUGhrcmNvTTd0SFVyT1lPUmM0ZFdsX1JyNHlqYnRmQl9Zb3BtOHl4ay1uZUJ5VzJqUldaSHhMWC1vZUlQZWFBVFBvTE4wZURsX2F2bTNiY2hfb2xNOEFfNExTdjlDMzRwN3BkcnVtd3ZaWTYyNWpqTFBxVFBOMTFzQXRDVDdma3FUODZxUU0ydGkzS2JBRmVSY0ZtTzRvQjA4YzZRWDRCWTJVQ21xT0Q1OWV2RDBhanFBdnhOSEZ4eWVnS21MZERoREN6MmJIbmJUMlhqQU53aUhIQUV4SnRINmtSMGZiRGF5QzRZZjZsZUFva2xVeF9LaGNwUjY3Y29VZWN2MTJPa0NhZXhCZFJKTmI0aGUzTEVhQ3pOUGZ3YXc5MGVMRnE4RjlKSEFLdzgwNW9URlFyMkZBcWl6OEppMnRsR1RsTW80YndNM0FJZUhpTFZzU0xheWRJMzJRbWVzeE9ScG1ZNVRPSHZLMW5QaUduZGZnWkpNajlpMTdOVUlKcTRaeDhHN1BYWERJcWlseU95UWdvN3UtcTlhd1VmcHh3Z0tMb0pQNXVqVXZucWxBV2VPZ05KbXZNcTIxRU9RTUdZdWlROU9CUTJROXpyQVNXWC1BQW1qemZEUENXcW5BOHNUQnRTZ21FY3l5eDkzek5wdjBnZDdhd2l0LVBlVlZBWXpfRGxickk4dkNOVHZxU181ZWJwZmhPZmlkbDBJV1lBZEZQOXJVLVI0M1JOZWZ3bWM5V1pLek1RZm1HR0lsN01RSjZBQ1FORVNsYUIzdXl6RmVKeVdfQWFTMWh1RS1PVGVoVGpaWEtKY2VPSEo5MXotSFFQNEk5bVhrTXllRDh6UFZUVnVNN1BUNnRYcWNoR1FSdktIckVudmFUZ2tsRGt3bXZHOXI5N3FGQ1htRDB0Um9pSXFKN3lSNFlNN0ZLVWdaRnRpVEVvWEgwb0tKc3ZQQzZBcU9ZcXNlTVBWN0t3VGdZbUdjTWRFVlBCT3BBSkF6MWtyVTN3UVRtb1pDNlhhSlZ0VHptVGo1QzhFekdEMkFsT0VFSjNrcnJyTGVRR25hTFdhOHlPUzVWa3VpNjNvQ2RhZHdqLTZ5ejVtYTQzLXQ4Slp1a1UyWC1HYTAwZ0J2aVhWcnVuNW5BczFRMmwyUTlMWlVESG45UGdCd05SNWM0WUN4d1l0a3FmR1Yxb3FLSV9rQ3lSbWYtSVdTM1BLbFpNQnZYaHFzakIySFd4aHR3RlhJWkpPZ09YUkcxdDBaNGVERWo1b0tlMGFzdHNvNnpySWZ5dEZMMHZhT2oxZ1VjR2R2ZHc2UXRNLXJ2el9tNmRUWktLb293YmJpTmt6SGRuMEQ4Q25MU3JKUW44YmstWDJyTm42VmgzRUhZZWNBSE9BNWRyUHVBdy1WNnJXQl9FblV5ckJwYVVUVTV3MWhNYnMtcnY0OUc2bk1WYjZtTFVkU2ZCZURfdE9XQXptZXhVdXB1eGxkWTdOVGRfTGxKRVFxNUVQQWt2SXM5N3Q3WnlVMVZuYzJ5N2ZXZ1N2NkVLQmNmanZDWno2V0FjaVpPRkhWcm9hQ2dsM0NFQzFkNW1wcHluWUxyS3FRRDQ3OGRoRmNuQXp3WmgxNVl2NldzR2lkRGRiOEVDQmdOZ0tZakJ4YnpmZWZJNTRtaERrRWl2Yi1nYnhfZlJJTWV3MWdBb3ZKTWQ4ZnJRaTNhRExBNVFySl9ZNkpMWGtKdzNUdVNpV3dOX0pvNmRJT1lTTEZhdk9aMXZjaDNWaTJKcWVJXzAwbEs1TGo2MmZYNzhHTDBsd2RGRk00azVBUjZMVEl6bFlNRVJuM0dHbXN0cUh2bWxpVFkzaGNnNXlpTEx5dmRsWVB0WURQTjVRRE1NaGdWdFctUm9QMVNHbk16cVVrU0pfcUxYZ3BzQjNoanFkbUFZSEk1cXJDWkdyR1pieV9Ock9zVGMxczV5QlhGOVhkWkFDZkthWFcxdmpaTjJFSWEwMzRNOEw3ak5DdFdCRmhzM1VRMm9aZmJHQ2ZqbFdqdWJsV3VON2pBWDJTVnQwREppb2ZBZFJUZXhwY2hrU0dNRGJNR2daT29Yc0dJM3I4NUttV2RQOTN1WVJ5a0dxVVBnRlJxMjVDaVh0eF9BbWdVOGRmb0F3M29takNMcTZUVUVkZVoxaWZJZDFIeWRWdDFFZFlCU1Y4cGU0dzQyVnpxY2FONkNiYVh5T2NqX0ZicUJsV1owM0FES0oxaFM4Zy1wVDF0aG9SRWQ3U2RhYlFfUFhJVlYwMFRKR3AwdS1VYW5kZ21zU1BCYTU0QVVIQjBrbzNWV2ctdmdhSmU0WC1DY054SjREbmZzVTVzNWlSVm15aEZmajNBUzVTREdPNjlMQ1RoZUlhd3d4M2NwZDZHa19nTjdwel9IbFhCNTkycFA0TXcwTk9IUG5lQ1F4SlljVkpvTC14ZVJBWHMxT1VJMDItcy1tWWE4bTRGTzU5OVZwbnBWQzd2eEZybmluUm0tU09KSktSSDJYSGRBbjlTVTZlMUlVMnZJaE14djBjdHh3NHVWa0d1cUhnRW9xWWYtQW01dkpLNWs2dE1BSVI1RDAzdlBpLWtGY2w1YlZUNnVEOWJSQmVDVnZXdzZac2lydjdmMEdPcXpiTFljWDZVSEtOYXhPV3AzMWxnRndEbjFQSG1zWmZJaHB2VWJCd2tocl9VZFNFdDdRRjAzNFdsRkV6TVRTU0dpZ2tCTlltNTZ6QVpfY2VSaS05TG91ZUUtaS1aLTNBTC1vSzVfbXNmOTl3UkdsZ2pWb2kxYy1PUTZQY1hPOEZERHNTVEw0V25vdzdJUlByRnRhTnRBcDBEX1RQNmgwSGpqYnFjdU44eU40MEhvU1NXbl9HOXJTLVozRzM3cURsZkdEcXZyOWROaFB3d0twN1BHNDZNZWF4bkI5dGYxSEZ1S2h3dkk2MEZLMC1kVFU4b2pqRDQ3SS1teXZMaDJITy1hTU9PMS1iQTA3dkltT2pobWh4RS1uSXdzQVk5TURvQ1hFQTZYeE10ckdFQkNOVFVaQ1hTSW4wYmpUYTVKNlhXLUl6XzdLU2dhclRla045N1RMVzdFdEpUNXFwekhYajViZld6c2JKMWF5bWVDczFybFkyZjBLSnpLXzk3QmlCazlMVjdwU0VfX2JOcTFpa1hvZlVRZkFKekhaWDF0M0xRUzhTUVRhRzBsX192em9pb05NeWhTZ0tUR0dGenpabE5jdmRCRTJEeURLZ2VkZ09lZDJsd0MxTjg3bFY5U1pSNUdPbTV3ZjY5MmVMYWN6cEZFMGUzUHg4T002TlM0UkQ5QXgzNDhZcU9RS2tlTElFRjR1UnVzdTlGUjhDZ1Z4dXBlckxabFdaaWZIVkdudDBrdWdqSy0zU3FwZVg0ZlVlbS04LVZBY2V6LVNpbVc4Q3JybnlCSDdWNUlqamk1MEZUNjFFVUh4aE5JeFQtendlLTRlUkRvWUVhN3hwdUs2MDNZTlFUSU84a25QeHZaUE4ybjJoZkp3ckRhbkxkaVhLSUxWUjdONE9RcGYxd0RUbFplNXJuTzJQbVBNSk1zZHZvUDZ6ellYakN6SmtqQ3kyVTBnb0pYQ0hrWi00Rm9FZkpnQWJLNGlEY0lLWGIzTGZRSE9SQUFfTmx4THU0bmFpdElaUVdfNktqR0g1eXV6ZXFKdnVqTHVqam4tUXU5MGthOU5JaS11QUxxcU1QYTJ6S0padnJlNkJBTU5QTU1PODFFckRNc3lNTDZ6cl8zSWl1ZDE1dWtaRjVDQkpmSXZWeklxSldwanJiYTRldGF5S0dLUGZSc1k4dUpNU0daUTZSa0dra1RrWU1scnhlaG9tM2JzcG5QSkJqMVUtaU1paDlKVEE3d1JMa0RsVHEta2lKbDZQYkVielVsQ2RvRFNLUkxiR0RlLXEtM0xWeV9Wa1E0OXlrUy05Tm5GRF9PTDVFNlYxSG9JMW10dVI4SmprOWlsbWxmR25NVHp3emY1UGI0Wkp2Tjc2WWRZZTE0dnoxbWtPZFZnVTVicm9PNl9aY0NWQ3E0MUxVZVhmZTJDZlN3SGJfM0x2aW5ZMWZMMVJ4UFhIZzlwendIX0lINXFjRWFybUdQcFpVNUFKenN6dVNXQ0k2QlNEdmNpbnptN3pNNjNoUlFxNG42Z1U4NERJWjRhMW1pQXJyN05rbjlDVnVRdDJEWHVUcWV1N1l2UkNtUk1qNVFYenVEeHJzdGpfaHlIdHJmUDFNdmlxWnFMckUzbzZCRm1vZlVLNGpWUEJzZC1YaHMyU0J5dlFjVjlCQ0RjRGU5X0c3bWpobTVRelprMEZxM0l2d3BpWWI2bkc5Uk9vZzZRQnJQVjFwUExjc09TMm42WWoyX0RNLXFBSzNLdVVMamdXRlNMNUVyRzhwUldHT3ZWU0p2X1c3VXBLVHI5WXZGUVEzbWZyN0REYTVER0tRbzlfblRyVDUySkh0bTNSVUE2bzlqNy1hUUVidnBNUEx6eDRGSThGWWRtejQzMXlpMDhEbVMwVkU5SVYtRzhoOXpJY19yZjZsWmU1dS15bnVZNnJQUV95bGFYSGIydHpLb0Fjdkxpckw1RVJBZFNBNk96bEU1SVdZcTNhU2JPTUdxN0dCc3d2LUR2UUxlRGtBSWhQbHFyTGpfX1pxTHkxRTVrOEt6cllnZXBjdUc4M0I0SEFfWGp5RXRPMDQ3cEZma0ptektBckdOU2V6NFN4cENIaWdyNkZIMHpaVWYxdVNFNVFPeGliUVVJa0ZQV2FQcUUyOVV4STEyQ1JETUtQLVlpZjlWQTd0NjB2XzNPS05XUVlHZl9UcGRKM3pEaC1xR0NOZFlxa3d0eTU0TUtvU3BLNzZ0X1lEZ2NCcm9SNm15NmZtbVRUei1lSDVpS0ZvSnFxYWtoX0o5dGhrU1l1alNzYm1zckcwMmZidmNMMW5uOURRSUdVMlJLRGcwWWI1cVVoek1nTHBraWNjbXZ0SGlrQVFmSW9nZWVmNTMwTnhpb3VBOTNYSEd0dTVfcHVYVGp3REJzZjhPdGQ0eE1LMWZoYnFvZXpGYzVJRklxWWt5WXlBMXFCN1E3VmVwc1djSHF1cEVtOHhjendOYnhyeXh4dmpHaUJwbjllbW9HejdQc1RuWmpGRnVRNzZxcEhqblRqUENWRnFHdEp0N3pEZnBkcGZ0cVBYVk1sQldzT3NOY2pYVFQ4eUJWa0ZSbVN2akNzeE55OHZuZGFEZWh5dno2Z3ZRbXBzNWRGekhNNmNHOWw4M2ZSNWxwTEc1a0JQbXlkQkNiRno2NHhsX2VGVW0yUFVtTWI2Q1ZSaHBmNXJjZmxHWGRRWDlDLVBGSjFVSG1pc1JWMG1VM2xnekJuTWpDSzg4MFctNGZodldLTFZ4OW5KbEJObTdtWF9ZeGVMQUg2Vjh6VFA0YTVRaEVIUGVvVFJ4WlEyQTM4emEzcG5iSS1YaXZsOTE4eHBGVUN3UExpbGRjU2ZGQU5xNDk5OU43X1lUVmd4bXRPTi00YXJkWWZwbE9yRnMwbzRzbEhYVVNOUUtNQUFLNXQzbGFtcDVNaFZRUWExWFAwVk5SdV9KS0lZYUJCV1V5T01hd25vZDA2MEY5T2N2Qkw3ZVUtQlJkak5NeVgyMFRMT3NkWUQ5SXR6STd6RVFIX3l5R1FEdVFfall0X2ttTURTMl9FTFd6TVhDSUs4Ni10bGFCT293dnZGNlVpWlRDM2N5WG9Ic0ZoNzFjRC1MWks1VXg3ZFhRNmR4bUtGRDE5SG9uNlQtV0FySk5lOEk1NGpUaHU2SWZqX3M4VDhMQVY3QU5jMl9INGZzeHFuLXg5MjJ3T21BamQzNmYzMF9wMmc2VWdlQWZNVkFFc3czWG1uUjhhbGFLOTVkMnJKSF9fNzVOSDNIUjl1RXBaNV9sLWRhNmVDOGdvUDBLbTk1UU4zeEtVSWxjb0Z2d3AwTTh4QUZMelN0RUVSN0l5dDNGRnNBalVuNzFIWlVIM3dEVHpNUW5Bdnp5RWdsNmtkRnp0dG1PQ1NOclBGTXJpQ3FCejEtRXpYT2YxR0d2NXJ0N05aUW9VX0hjM2xUN2N5eWNUSV9JNDJQUjdmRG5RUHAyLXZJRXNOQXoxNF9zXzZxUktVVldoTEJWWUVnOU1NMXR3bkNkM0d5MjBKMmdvZ2xxbzdRa3JXYXp5MzNBdVdXMV82RWxOZHQ0OS0xYWNpTHNCQUZxaDdxcUM4eDM3bGR1MFhRTzczU0pYMDV1dzRSTk5fUHFXOGY1cnJFblhuWTV4cl84d1gwOF9EOHlXNjc1NkxFT2Q3Qk9XYmRCbHl2a2lhTG5naDN5UDlPQVQ1ZjV5cHlhc0l1S3lPckFnX1JqQUtPZzNUQm1UZjJZTGs1OUNxWFpnbWhKNHJrS1M5X2p3UXI1c2lXZnNFclVXbVFRaExueGZZNGVXMVR6NDdRNnEtSThJdmJHdm9NZEc4aGRESXhzczJTQmZLZ0lpZlB6NGpuLXp2TVVzOEZnTDA4UWpDVEFheHFHOFJYbVNqSW5aRERESHlzY3owSmRabHpITDJsZkNMMVk1eE9Ha2JrTV9YZjBreER4ODF3bVFjWTNXbjl0eFlFLXhFVDloNndOTGN6UVh6TzlONXFpSDZpNGJadlR0MkxqdmJrV1M5MEw0TFVFZ2puSE9PTVQtWmtYbWI2d3FoVzlfbjNvWkRZcjlNQ0xPWU5FQ3BUVzF0aGZtTVRDTkk5dW95V1hHZDdDVXAxaUo2UGRDT3lXb19vblpnaGVQY0JNUkhmdU9NN3pfRnJIdTlqNEN2Yk5nd1A2cnFvQnNWcFJMRUp6bHhZbU0xZFF1WnFheVlYbXBiOS1XTnhtZ01tWVd3TVhaZFZWWXJhOTJmSXJUVzdkU0lkeVpZQWI0YUtIZVlMdExJTEtkRjZHLWZiNmVVZTU1Vm9sMEl5S2I1X0xqTFhRLUtBUW92OC1RaXhUODN4N3k3cFZDeEZ4R3R3ZnBOLTFVaklfTDVEZHQ3N1dxMi1wN3JaNDFoOE9ER18yUmlOVVFucUFEeDc0WVlFX2I1SlA4MjY2SDhCSEQxVjFWUFR0aVFvUFNETF9kZTBFVnZ3dUt4Y1pRYnV1UnpzRUpXZHZfWkVJRks0dXdfaHdQOEV4ZGFpb2M5a1FzMmdJem9DVW1yaGFjSkZUU2J6YXI5elBteld2Vmc0a3ZjVUMwSVkzTTMxS1JhT0plWkkxQ2FWWmlfblZHLUYtbmFJQ3hIcm9tQUVBZDBEVFJJOTNBU1E3QUlIVE10bDlfQkxOaEo0UU1RQ0dSblFXdkF0SzhvbnA2NGVzcXBubzFfODktWDFzTVBaejlOMWVOOWR5UHBfZlVfOEpUdmwtVF9lRGwtOXJaS3duUnFOdHhHeEZuVXBNdXE0MEg5dThlMHhYbXJlOGdTTzhxZEtKeFpvMkNEUE9Ca2RGcF94Rk9GNFNCUjdQWGx4aHl3SWJ4dVYyRlYtd2FERzR6UDZCa1ZKdlZHejJSNkpzTXVELUoxdWJtc2hhQTJsR19fbXItLXVUbFlybGxLanFVUHBQS1BGUDZVZU9weFVWdV9CWlZBYnBJRmV4VVdxc3hrZXdxaGlFS0lSckF5Lk9YUTNscWkxdk4wNG1sb1Mxa2xPdVE"}' + string: '{"value":"JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmR5bWh1WnJvMmhHTEdNakFVNEMzbXlJU1JPUFNDRmpvckxUcU81TkZCU25RT19LOW5BSGxoeUFHSXJnSDhmZ21CY3QxZndxdTI2TEVPVmJZT29Cbk5xMWg3U3c2S2tVTkVhY1ptcVJFYzRmb0hZVzJDYW55ZHJEb1JZY2VUME1aSEt0MTFIZF9KUndTZWNnS2ZyTVMxTFhjdlZab2MzY3hiT2wxRG1rOENsZElZZ2dROGwwcXZTclpsWV9qTHRtaTc4SHBjSTZoczE3aFRoYTkzYXIyVGszMUg4UjhFR042Y09JcW55YldCSFFRQlpOSU12RnRnY3hZRWIzWDBmMzlmdk1sajVTajFtZG00TDN3VUYzZWNHUWVIODdLQWtIemJiWWV2QTZmcU9vaHVuWUY0aE9XSzVsaS11R0pGOUprdFBDQmkydF9jSlJ2eGdBQlJpRlZLUS5EUEtzYVRwaEVKb1ZJdEpXcC1MR3pnLjRjMnlBMzFLcHdSQkNDb0pkTzdqdFk0NmxBZUlJOHhORUp6TU9xd3JwWjNQREtVa1JhOXhKdWVIVG5SU1F5bk5YSmY1LURZVjNqRGZlVjhKamIzRTZaeTQ5VTdqZ0pvV2lkZUthTHRXQjVTcWtEd0pSY1FuLW5aTVdJajgwcTM5RXV4eC0yeGdNdDlGOFhObmlWNHN3R2xOZnJYeUkzNV9OMktGNTh3RmtTcVEybmZRN2owLS0zeXBGZjZrN05TNlFJYXNWUEIxMkxXRGFQSzBVcm5NV2xyQ0hGbkp0WmZ2Zm11TnRMVnRQYUVIdDFzZFVad3lsOVhQSTk3ZzNpbXFPM3N5UjJ3ZmtTUGtXdE9kR0VQaGZKWElvN0F6NGcxckpucTN5OEd4d0hQbklHVlZTODl1aTJRdFVpMXM1VHVNZWxtTUJmczl1ZDVpQ29lSS1vNmtJQ3FqN3Rjdy1rTkN4SGQ3NWE0cXdDTnU2ZlNjM2VyY29BU2RUMEdZYVdXU1ZBWmg5cC1QZzZlVXlSUF8xbjFPcUlLWDJPR2NIelNvRWZkQmZMSVZxQUZJaDB4X0tqckcxOE5ZXzY1V1kzNkRJVjR4X2ZHcEQ5QXdzdVN2a19PSVZ3VDB4NkhtRTRhMU1pTzl4TlY1R3Q0N2dIY1NrdldpM2JteTE5VHF4X05fdm5PZnE2Q216WVhDb1JtdVZnaU53WS1fNXNoSVpHUlk5YUF3cUVxRUNkOWJLbUgzeDZlWGdUR04tWWRrSkVHdkt6RTZ5UExHdGdMX0RqQmNMcW5JNHMxOXhDRFFLTnJIZEx4WEpQcVpHYmRqTHVfbGFWcXdBUnI3S0lZUG5FNTBOalZyUEpZU2ZaRjRCMWVPTUJvang1cFJFbERDODRqSTRvTENJdTBhbTlnNVBudlhUQ2FHSUJPaTBCX0J1ZkZZajBndWp1dTdHZl8zdDhrQ1UxQklEYXQwX2JlUmx2MmJrR2RNQnBNRFlRaTZ0NmV5U2drYkZZM2dseVo2U1ZWNE1HNER0cUJCWnVISmRCZTZzSFFNRnliNHFQTkpfN1pGVEJHLWRfc2gxYWJhWEM5Wk9qV3FwZGx5RXBKaE9kd2dXZWRXcDFOQy1sSWE0eWZoLUVjVTl5VDZxU2FXcGd4SUNEdjJZekc1QjE0aGlUU2ZKb2txVG9PeEtWV1gwTjJGc2VBNHduYjBZWGdXSW5aYVk1WThsUkQydzVrNEpTaGYtUm1GejRvU0JLWEQ3UEp2dTNCTEg1RF9GVlM3SEZHajdMRG55MkF2RnY0ZVdLT1ZCWWphb2hndVhFOGc0eXFsUVZERGM5NzJVWVVsTS1SSjdqUjlGYUJGM1htdlViUjZSSjd0WTlDeURuQ0xJUWI3YUFJM01iRi1uTkI1aTZaY2RyaWNXWWo1UHM2NUpBZzFGZlRrUmRINXRkRXVlbDhqandXNDFoRWlfSl95QWVCX3BTNF9MYno3RS1qWTFOTmEtX2loYUtqVDZEM3JpQWc5WU5Ud0hndHRzTGZReTJWM25admlEUEZSRkJUVGIyNW5qeXQ2VGwxanNmMVNibkhnaXp1NDUzQXVWNXJjNzlHYlBsZ01pd0Q0TDR2Y0JLSzdVMVNNNXVXN2pPc3czeVUzMFQtSXlDUUJ5aUlpbnU0R1Z3LUhuLTZKeUFYZjExQWpsSG8tcW03dDltZmJxOUNYaU9Td2Y3N2FsNXQyMER4T2tfUkU1cW04ZEk0NWozMjBia284SkxjV3VVODdNNThYTXNVaEVycGM4OU0xeXpBMUM3TUg3VnhSZnlQNUFBdzdBVTVBUkx1VVhleXd1Zk91aEtqVjEzZ1ExNUYxS3FNVkdxWFY1U1g3Sy1waWdrN21HUFVQVW4tTXlQYXQ5OTVDZ1BGMTl4NnFmd2M3RGxZSDBLbklQd056bHVfTHA0ZXQ4T0NST0sxOFd4ZzZmNUdJdmQzOF9TWEZWMjJyOEp2enNzZDFrX3htbTdWOTVGbTE4QW5WZWRVanhueDQ3aGFyS3JQdGFsOHo0TDM1azZCSDVFQlQ3SXFxUWhodFQtenUzTUsyMzZISWdsd3hGci1kM19IRnlCMjd4M3U3ODFpQmlBTVZ2R2tERW1uVGhOQ1c5Qm1JcEJ1bnE5eS0yNE1HRUlSY0FoWFN6R3VzQUtwcUJObElTWl9ZQWVxOXJRVXowYnZfSUxsNkRJdTdGYmlGLVVuTFdOMWdRUWlkU1dHVVh3Q2YzN2JMeFpIUGFCOVFnYnp5R3ozUDNxMHNiWk1Ra1BWTVZPSWF3S29FeEdvX2lPd2pSMDJiaGh5aWI3em10NmJKZ3Z6R2xZbC1uM3lYYVZWeEx6M0pQVWVPVU40Uk1hT2F6SHYtWE5wYlFWQndUQ2MzdHlwSlJpanpHVzUxOFVNeFFMRmZYajV6eHZrb3NxSGl1c3llR0NoVWFSWm00Si1CQkRuYWxCLUlaX1NoMXR1dnRXT0dJSHRCV01qY1lmckxrSUNJUDktOGQxc3AtZVV2Um1nRzNseFFWQVNuRnJyYk9NNnVzUEc2bEtiZHVhdnU4VDFLUWlNSHdhMVdYNGJYYUp4LUxqcE5rbW0wbFltT1RwUjV4bEE4RkdwY2lvM1licGxZVnVzNHhWV0NmS1lEZTJ4elhwMGJvSWU1Nm8zYThwOERrbDhWR0Fwd2JRdDI5TXZGdnRhSWpDRnJyYUdRZjV4ZG1sa01PSFNLaDhQb3R5TG5talFSTlZva3pEYUl1dUtMSjNRaGdrNlRhejc5b0pLZGlMVkNPdXNwMERSS1I0SFlBV2pURHVCLVhITmd2YnNzWFNFTkQwMHoteDVfcjZfTnNzaVhFU0hodENTMHNjT09DZEdVNTA3MTZpZ0szYlVSU2RzZ1BzOXBnd29vZG9Cc0VQdXpFN2ItZFhVbWdxNUVFNlgzY1Itcm4wblRFczNac1dOdjhuanFfSVYxMjlNMVpNenJnT002THhmVGl5WjBScl9BOF9UQUFXRWpkODV1VUI3NnBiMUZXdXFOTHVwLW1fNUt0elc5MTJEZmVndVNoSEljS1lsT1M2U3YzZUVhWlZlTnJSWUJsUzZYLWlINVl2cVJYX19yOGYydTNYb2JpTWxNbk42TC1jN3VqVHlCa09wQ1lVU3hoNFptWHZfSHhJZ0t6OVlLMXVzNEV2Z1h2bWFoN0NXSy1NRmItSzRMLUUydWV3eGc5WlpMRm1iTE4zcXRhMm5FRGF3ckFIN0E1QTNBU0dDenFmR3c3VzlwQzA0SnpSS3FYMnZ5U2lzaVlJUWpCNUVSQzdYTlNYN2xWQ3ZpYnpsRXJlNzFSaHh5bUlLekEzQ2VTTFlIX2pMTEE4cEh5Qlo0Q2kzWlNOcVBrZXhOWlZRdkxKZWY0TV9JanV3UkxmY0pQSUxiOFM1Ymt6ZmpaSDZKdWp4Ry1ycl9LcTE3STQ4N3ZuWVVGSGM2UVQ3XzZzR0lCUzZncjRPSkFLSUdMNjQ2SXhJRTExdWw3YTZJYkZHeGl3X0c1QU9kd1Nvd0tmckVVVzFMOEE2ZWF5VjVjSFRIT0ZHUHYzM1R1U1VpN2pFMTJXdm40eThNTWJKYVhTNkFJVS0zN2Q0WjRmbFpjNU1ZbUxIVktoQ1pMYjh1Rnc2REZCamdyY0Y3MVhUVG52dVp0cEgwZ09EM3ZqV1dvZEZwNzlqdzNfNHkxbVJvbG1semhDaDBZd1IwYkJ5R21qS2dDVEQtNjdidEdZb1FHLUY4SWprUzJxcXhWWGpvWkdyOXVJZkNuQUpTUmRlYWNLaWpkc3FKYUtHSk85dEF2YXhXWXc4MUFMQUVqdElySk1fcTJ3c3liV0tSWkJmX3JUQVNfTFJUSGVpd2prRVVtZ2lWelQwUEdfSjRDWGM0YnFhcERhQURGTGlScFNwYUlKS3JhdVc4UDFsNzROeHRVbXB5SDBRZ2U4SnJ4b3lYTDQzdFI0T0dOLWg0aUUwRzNoa0MzSzFRQ0Z5NXN2VmtBdGxha2l0aXc3ZVFGN1pjcEtSeE5hREZEYllUb3pFTVJWQUtWa0RYbWEycjRxVXJPc2ROSlROQnFlWWdhbnh5Q1RpR2FNRVZEZjdEanJTWjktTVJ3a3R5UVF2d1NYa0k0VmR5SlViX2xJdEF4UERkMUNpV1BYRkgtdWdEa1RrQmRCdEpYMEN5N3Jaby1kSUJ6VHU3cDItNTJvOUotVUhfbDV3LU9FZ0dZaENnQUtGTkpaSWh0Z21nY3ljUVdHcm1RT0plN3QzNUlIeExwZ1Z6aTJGVWp0QWNGR0dPeDVuQW1DTVZOdzhxQnZQbnV4bzJSV3NZa0VJcGRRU2MwS3Z4MHBvWmEzeDhObW1BYnYxa0VzdzhZNjhFNG5wSTB6bnFLYmV4NFU2OFh3ZTBlSGVpV2lwemthREpUUnRqVWg1eE5Wak5RMktPYTEteHJjSjJ6MXdJc1JqdXp4VklNaGdpSXVleGp0aWNleU81WnBjUWVDZ3J4UWx5bFdTdnNOd21nOUJIWmNwVnZaNWN0LWVvZ1pQSUN4S1pZSmNpTXd1ZHlZdUtXdEdiTVRMWF9jYzd2NXdTa0o5VnZFQXdfUi1QeW5VY1hZY2RNcUw3WldxY2E4czVIRG1lWlNZb1RWTnBSUzdJRFZBMnh5Q3JZWjZkanppYUZHT0NSS196d0pPWVEyeE4zWGpMYXAxSWNFOV9qUkhJM3loYUQwUlVyVkppNVdGdC12VnlsYldVeVNZa3JzZElzUGVzQ2U2S3NpXy0zdHNzNDNGU0NCVkZ3azhhbkdxcGVwWmdneFkzX3JtSERiSjBaZmV5SUlkb1RKYzF4Q3dGZ0kxZ3o1X08yS1BXWWF1ZGdiMVpjRmstS1cxSG1ISmx1cU9Qa0NzZUFGYmc0M2NZTUtsNjJKY0VsVjhQdlB2Xy1pMFU4ZDJ6bEpfUm4zakpvb2NnV2o4RXR4ZEh6UGozdnMzRU13ZlpVQjIyVnZGM243N3g3STZxTkhVZlNObGo0TWxnc2ctVFJfVW9Nc0M0dUlQYnp6XzBUdlJfMXQ5LWVYaWZWcF9zYXhEWEJuS1R2LUxSaEIxRjA0d0R3SzZpX2h2cmdwd0ZVbldSME9ObURSNVp3TmVaMGZ5U1V5M3lFNnFZLXZSbXB5RjVqdE80V1dSQW9mb3R2OXJNd3FvNTlvNUNmY0kycVVockJvOERSd3JzOHFMczR6Q2Fxa190RlZ6dzVrdkoxSWs4U29EQ01COFYwWFJnblVLS2FndFJ0UFVfUGh3c1BpMlU4NGJpeU1WMmJBQlZsVEx1QmF6ekg1UE9Jc1o3bDlyLXV6ZW5XR1ZwbEpFUHB2c0ZEMy16OHJ0VXN6SjVNU0NJcERRc0xMUTB6WmZCY212ZURJMnZ0c2JvVEgwSVo2QWl6VnlTVUtaMnZDNFNCRml4Sm9GT25YT3ZUZGVfeFQwRGJLcUlac3llX1lLbG1Kd21LNHlRT3JwckY2NkRjZmV1d05YWkJ3a09RMktJVVJOenFQX01ERmtIRWIwamtlektrTjJ2amtHcXgzQ2VjZHY1SkZCWC1lSDlVeWIyajd0VGphSkVYbUtvZ3VDY1hJNjBOX3RyZGhRQUpjeExnQkloekJjQ0s0RmRkZ24zMDh6b1VHMU5pc29pWnBKekIySkZuZzFDeUpJMXlSTWhSUEdJNFRlMmJxV04weUdXS2NJTmI5NUIxcXE4Vmg3Si1IM1RZeEtydTVKTjBDNmdoVDJKXzRDdzZMNWdMd2dwWXA3VkM2WDJmY2ROcWRIUW1tRy1uLVFYc2Vfa29MNWF5U0tidkowYVN3UF84OFlYYmNBU0dhZW4zSVpwMUNhaVRfTXNMaXBXX05rOUZYcmlXcHhNZVYyQU9sZFE3MmhjYWVhNlBTS0g0blZwalhwMTk2X3lMT0JOTV9Vbl9Wc3FZZzl3NlVZSlZHYloxS0dUd1RVMGIzb2Y3b0ZnLVJNTUV0bGtBYlNUTk53ajRQSDM3a0JGVmhra0VkYmxQdlFDRk9zYzFRM1BDcVpqS2dsZHg4Q21xaHNHVDN4QlEtczd0bEdUMlJLaVdnbWZORDA4dHdOYlptZnV2QnEwYnpmandnQVhsYVZwUVp3d19sV3JoNmJUamVVREtfQmc1bHljSl9JeFhQOXl3X1pDZ28tN1dYaDlONm9fRDEwM2ZVUjBhLWRuaGs4UXhCbGc2bm1QVWVLekt3cGRrWmxYRGNMazBmMW9DNURoaGR5SEY4SkM5czRBY01LVzUxZ0pBSHRFczYwZzQwcko0eTJKWG5sbnoyenJHNG5zMkNRc3lfblNWUXlWOG8xaXdxYm1pZUN1dXBSTFNZcnF6M0xsX18yYUp2UTB1cmdqVkI1bkhhMkpkVmZvTXh5WDVwMm9KaHYxZE8tMlFuZmJoaHpZNExVNG9qNmhMMG04MXhfQXJWRjBUaVNNX2dLWlM5bHlPR0FCSHRPZi1GYmZzNVpOMmJKR0d0ek82QVRGaWFiQ3VTX0RzbHA0YUg4M0xaNGZ3WXphZFZPeG1UaHFIUXJyaGl2TDAxTzVlYk5aa2Rnc2NmblowLTNTNjA4QXNYRkFYM0lhRFR1ZVhDa3VQc1BtcWxLeXRLVmtjOU9BVktIb0I2YkR1cDVIQzZZQVY0dkt3VXAyUlN3dDIyNE52eTJ4RHRfd194c3VieGdSbnhPMEFGaFdUQ0dqMWhKeExZaXJLQVlKNTlVY3hoV195RURlcjhhTWdrWUNkWHVMNTNxQ2dLbFlVNHNmN1hGYktFWHdXUUE1RWd3cTVsRHlVbksyT2kwMlIwVFpBbWRfZFh1ZG0wMWFnZ1FiNlVwYU54VDU3MDM0Wng5U0Q2T0IxRzFlbGtITEFHcThaT2d3Qm84c2YyOWhaLVBBZDhpa3QwQkhSOHhBODA4SXJlNmtzSkJDbVk0WTB0OGo2Q1NvNVF0UWtSdzZmVmE0ZHctVWNSc2s3NkxZSGZWTVRXQnZMRlVNdEVSRUpoSGVLdlRjVHcwdXpTRHJPcFFMRXlISkRrZV9hVjRpenRYVy1nTHNDd3l3czNCLUtoQ3JJOTktZ214QTVVOVczMEdHRWY3NVFWU1FiallhU2JxVmFQMHRuWVc1R09meGFtYVdNMnRUcC1VRVRyRHhFMGMwY1pCbEdEUFpjT180Zm5nOXVvSG0zVG5EYk51Z1ZIdGI3N0F0RzJ2ZU0zc1o1WldpTWFmRXRTYUNHb242OG5kWDRFR1V3STdEMzQ0YVhFeGR0UDRaSWFnQ1d2Ukd1NHk0Ym1RbURqaHhFbnVMOFdLS2JXTDFYQ0NyNVFyU3liT3VIUl94d1RnRFFRY0k3YnVxTGhMME1jbHBTR2VTZ25VaHRkekI2ZTJiT1E0QnVyRExjbHpCVFVwMzhtWm95TVRfN05PWTYtNHktTjE2SDdiZTRQVFozTGh5eUg3dUNYYUtsbFF3VExERGIyZ3ZUdmU1N1hfNzRkbHBlNFFxVVZ6cWIxcnViVXk0Q0c3MHdsTUFGMlphdEh5WmlhVHVVR1lSbWFUQmhJamNSZFJzZUVMdmV1U3pMMVEyZGdmbGNsTGdQVU4yMFdHSURKOGxHdklqU2NzbVNjZjFNSnNRSjVPRzVzcmpMdVYxZXFHUkVBR084bmlXd1MtN3p6QlZxbGptUW56MGhmS2tVbXRMMEJuYktXYURLeUtsa192TnNBSkFqVEJRSlpTdkxaUG1xbmJ6b0p2N1dNN3Q1dngycEJsbDJ0dTBRM1R1aDdSWTFOZUROWDZta3B5bmtrR2N6V2E2TU1KWkdLYU1iSDIzVkF5V1JScC1BRkx0b3hWYXFqOUpkei1lNmUtaVNwQlFpRWFxcGpvdFpBT2twVGM5VXNsT0szQWdrZ2FMX0RBU1FDOEc3VVM0VDJlLUxrci1Dd2QxeUswdVdmVmU5LVpBYW04R2ZzclpWTHJGMEJIXzVkWlZoNlB3N3FEZS14ZVRfenljenlqOXFFYkhTTjlqd3VRMmNmWTJSZkUzZEpoTlJaYzBlZXpyVWZxa1JuRXFvX2xTMVBYampXV0VoUE1PcENYbURqMV8zWllaLUVpSlItWVZBUEJSNXQ0eE9hdFhULXVyT2N5NlByQ2s2QjNLNTNQOTdSU05WLUZ2MDE5NzJlTVdZVllOMVdjaDRfbmJGcjVhYkpQV0I2UzFuUEprU0hyU2Z4WVptRmNHaG1jc1BSMFI2V19hMm5DQmhPTFBOUVdQc184Tk1JN1ZPS1VEU0lLMVZRWmJpLW5kcElfRGxKZ0pGcnYwU3Q1NTlINThjXzZrNFBENWZsQWdkWFBKbmlRX2FYckRpTFFaSlhRM243ZUt0Z2J2VzFGek1sSHAwOG4wd3g2b29xcU1aenE4eVY3RDkzSE9wUVNLQ2hBVTNNNDVEZnZzdktFTVo0ZFRlaFJIYWo3SlZGc2pWRFVFS0JrckYwSDZsMl9zMjZmNjJGbEhSY0ppeVd3eW80Tmt2YkFCdG9LSEpSUzBLVGZUS3BRYmE3OEVqZGZoX19SOURQUFlkWnNDQzlOQnVyV1VlWm0zbTRsSFd1emNJMkpLZ1RxN3VlaUFkWVdFQkljMkNld1d1S0tGUnI0Vm5QODNNdm83NXZwd0JRT29DdWhvZkJNSGFzbThhNWEtWW05VlRLNGRSQnZ3TDI2b01hQU1PWVQ0VVhUd1plVW9UVUlQZURvZGRNbk9PSGVEelZuVGF5ajN4a2d6dDQwWUdqazZwcTlnejZoSnN5eXhSc2w1RU90NUNxZXZzY2NtZHVrQUVvQ0dhb2pTeVJ1ZUlLWUtLR2M0YktNR3RnSC1nR0FYck1GT1BZNHo5NDV5MXZfVktGZ254blBITnM1VFRxS1NFY0tLc2EwNWZIM3htSktrTnlUTy1MeXA1ZzlxMS1CeDZIUzZxVmVKLWFtaTgyUHRzcFFOZUc3cVFIbDF4LWxPWjlla29ZclVteXV4bnBJeDNnRlc0eGkyUWlHNWV4TWxxRFRWM19JTTBCSEdZbUNMTFUzTzhjTWEyUTBucFd1THJYZ1U0LXE2c1YzVlFYM1pydG9NdzVRXzRtd24xYV9PbklpNHdYSTJrVWVYSWVVOVFINzFVYWZJcHVWWUhqRDhTOTdYVVVOQnJ6YVN6d0VJcVhvc0FZazJsaG9FSy01Y3d1ekdEaUU5Z0JSMjJ2em85T0xhYy1ERGpSN3pDM2ptX2lSRlVqbFNJTE9fYXNRYm9VSnctVnlWRy1kOWFKZGV3aVV5bmEydXcyTkhsYVhFUUk0Ri1wS3hMNk04bFhMVDhDdnFVVVA3ZnFWVFZCUnRmZlRkSEtGZ3BZUFZRbk5ka202SmtVZEp1Z05NSG8xRnMtbDdBZmxnVHRKeEZ1Um5ZcVZkVVlWdkJBamVqdXZoQ1FtaGFlcDdwSEUwQVhPSGp5dC1jWjFpN2RqQTNrTTNONDJSVC1ucFNfQnExYkJoUUFLRFl5NnhzOTJTMWdHZVpMcmhYRnBMMkt0b0E0Y2g5YVNESEVhRUVoM3BTSDJydnhfRGhLYkxhazJXZWVpMXZHVWpMZDBiZjRYcm5NcExhSlV5M1htbjZVdXBsZHA3UFIyRGpZVVV3dTJHS3FONUhKLUlWVlNvNlMtaWhuLXhFZUNSVmo3QVdQM1FPLUw5OHVUQy1NR0laOW5pU0ZuUGJOZnlHMUp3ei1FbEhYOVZXdloxS0pKMVpXSU9PZ3ZtZWppY04xTUcxZ0F6V0NkRFhIaUpkU3c2RDJPMnNiUGdFWFlLZFJNWG5CYjVJQlRzZkNIc1RmNHlGZGxOaVNqNm5DdlU3VlVoeVdudmZhd1hiaTBwbkoxejV3WDRBQURRODdPdmdQRzd5dkxBM0sweXpXeXhOajhuLkxkd0syeDBvSUxocXZtMnZpSzhseXc"}' headers: - cache-control: - - no-cache - content-length: - - '10635' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '10635' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:00:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96041739.vault.azure.net + - /keys/test-key/backup + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault96041739.vault.azure.net/keys/test-key?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/7089b08b10a64ec68db241e20e2109d0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qbGcivUVxthKiCxcjxOGdsiItrjjTm0_-o0gkZmRSDlEY4ixbjJYBZMwZLxLm7_ZzoGTVTdON-_6bLu-ZwFqAAe2Nc_HDLkL3FTn1YkjTSA5I6FTXI-CC79m3mPLbrVNkHRUkN7QPpl9Qak8RyRl4TA5XtOp_ztKm5Lfuc1eJsosaRdqaMe2UlEbu0XCdYDoP1UoNRAhrUZwli-GHH6yWQxq0SBtnfUsXH0CkgprrnpDYM3dxUkjJJ6IRpW4acRXrFDg-ccCBQDRLty6eSRehugfZyTGciaT4fBcj245OjytQZHxz2ZGixRxN0YsvjoZXqquXKqfkKEcknMDNapyFw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/d2c863b455c9439b87fc78c6ac184217","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"uWCbdAq6V_Z3_JRNeKK4o27y-v8lL_IUNGXQHywjTU4aoVK8iDvM0ChRMhlChsMcI-SyGaAk7kiS2ywdNx5JI3rcaZiiasFZ-4CUnUQbOB_p5L_r2dDXvfdQzGaigM6cttEW5Iwze5dEd3BOcDQumxRrtSJNld4AlxEK-Kp7xaOUFc_2yAV1QPvELtjJLN1zMNw12FXNqocpZwZ8t1BGvvXKYfz3yrS6rq0nG36n3S1yA9Cb0NnrTjp84na3diRQXpuaUg65QXrbhcBW6o1aKTsuEAVH5FAqDliBa4v5lqTNsWxOGS996rMfjsJHJQ_fymvIy69zHrMe2UPupwz_OQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527628,"updated":1564527628,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '644' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '644' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:00:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96041739.vault.azure.net + - /keys/test-key + - api-version=7.0 + - '' - request: - body: '{"value": "JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLk4zTkxnQUltVllzMTBLb0R6T2ZkcGI2aHRhMFBQNGxQOXh2VWQ5dEJEaUE4X2dPa1hQcnFza1dMTDd6d1psd2FOYlZNbFZpbnVzbmVwZndNUnlQdENmaHZUSjBMWG5PdUh0TmJfcTNpY1F1LUt2UnhfTHZpaGp4bnVCMUtKNW5ac08xR19RbTVPLXEwdkZySGZJNE9ZQjhIY01fR1VaOGx1dlFYWW5aSl9mY3ZaREZmazlWdVRzaW5fQmxCbXN6Q0JrdnA1LUFrMkwzQXFDUml5TUNjNTMwTVFPbjI4eElXTEhUcUdBTHpLM1pRRTNFMTdqVk9iT1ZtN2ZoWWh5Y3JHYjJWZFpQdmkzR2Vmd2xQZlFNal9VUlM3SzNUc1FkSnRUazREdVdsWkZJTThHY1R1NjZ0dDhIblA5LUE0Vjd5RTliQWJnWXlCZG9QUnhzem01TVg3US54dXBZUjhXMGdvNTI1eUlCSVdsUzF3LnJ0MHZkWFFDUlAyYjJ5b2htdk8wdlRjY1pKLWVlQWNlVHF2WVpEd0tqX1R5SE5iV0RQcFQ4ckN1Z3JpcVJ6ekFvY1hNNDZWME1Fc1JFbGNKTnBKNVNPR0pzeEQ0dVM2c194aDlCQjgwUkRxZTRHcllGckpsSlc4Wl9GLTljMGI2dm54aEhvck9vQ0VxS19VU0xTcU1wNE5pS05CMlZ4aGV4My1NSldJS0Q3M1BxaTZQdnU0MVZnUlR1NGlqTmhMeDJYQ3NtRFpxZkVuUGZHeHFQcWdVYTVvRm9uYUh1enNyRV93LVNORlhlWFQ0Skp2SWkwTFNMRDF0d25CTkVpNUo0Qk16TzJzZExJODhWX001SlpBLXp3RmtGRGNHUnJGeXJkOHVwaDhMVmFrMUpKZExvWkxocERmRjRpQWVLWW0wT0ZtdV9zNEFzbWJCR3ZuTnpUS3IxNlpNZlNrcUtuMm5uUHc2aV9JN3FzR1lEX2xEdm5KaGx2cmQweW0zb1RlSEFRR010OFRZRFhqNXZTejUyNExyNC14M0JMaWx3QlI3UF9SQVhfa2d3LTFYbjdGa3pGM0lscm8wMmNsSUxPWDcySjJUT0JRT2ZZVjRyOGxscE5Bakt0SEJ2cFFRMXV2MTRZbkhhN2VKTVlWWkEwV0VnSlg4elhJb1Nwemd4VnNLSTlRU2ZQLWZQVGdMQ3VUNm1iZVBHWWdSczE4dDdjbGhJaTJwQXRtaVYtam5GVXZJMXZwbWJzekg4SDAzYmZxZF85QmpHbzlzRklNVTBwZjR1Rk1aSmpfUnBldU00MjBmak91clpNY0xFV3lYQm0tU0E0ZUdjb0ViRTlqaVA3RUlveHVOSE5STVpWYjJtdTVzTHplZTNlNXJENzhMazV6bHpld1hPRHdyOHBiY2t5N25hTmRhMi1zOWF0WThwejBQZkhqUGpkdEh6NDEtZkhObl8tb0t4RWU4RDE5LWhRY3pGZkZkaGUyVloxYkRQRV9FckdJSGg0dndSaGNudXllS3p5bFMyQm1WSUdMZ2xzN2lRc2Zta1NpUUl0ZnoyVjZFMGh4aGFWd09PS21tNkpDbWRLR2s3aGE0a3h4aHRxNHZoQi0tclpFTlRTamc3MHdOOVVacFVlUnFQanYyQ1RVcUQxdXZPMHRRTW5zQjRVSWxwa3lqTlpaaVJqVFNaY2FhRzZGRXpDUVczV3c3T0l0S0FBc1AxNnJDYklZVUdRTkZKcUpYSnMybDEzR2JkTTU2OUx2Nnh4V2dSUm1UQ1dKMnJSTEtvY0ptOTh6S0gtV0dKQjA1cVlaT0JZYTdQOVlrdExNZTYzUkRuc0RoZzM5N054UEJFT1pvenh4Rzk0U0tLSUNyUXJYMEJvYmcxRUFlcWFfY1lvMWpIcjUzTFhBV3J2Nno3UHFCYmRVSXM1cEI2cGo0M091MDhzV0c3UTVyREZkd3JHZEpmallLR1hQZnpJcUVJWi02a2xZeE94cC1kazlKT1dpZFdQd2hmblhyWFBsa1ZnOUhDMkdrYzVwM0ptMlVCWE9MQzRZM04tYTBYT1UwSHhjbDhjbHlwVEVpNExCNV9VU25sSFVDVERuS2h0TjE1WEZieG9obnpySDJRYkFKeWM0eUJKeHNZUDRJcVV6QTdBdklfYmpxQTQwX2UxNk5yMHB6YktIU1czZWlLTzBPSmJqa0JONnBlSjdveU9vX0FUU3Q1RGsyWW5DRnBHMDFnY3V4aFdpaE1NWVVzdm1Td2RQb05FX2xnazcwS3FwbG0zbVlTM2UzSXhCNnA4NFBFT3pnMUpwRUt4U25EcHZ4SGxUTmJzSXprUTlIN2Zmb2dLcUx0T2VySkg5NGZ0d3hVNGwwRXFTUHRfMHVFTjlBLTd3WkY4REhhOHlReW9wSUxkS0JOZ0hsN3p0dzJVOVN1TEVGeTM4Wlc5THllVWRqM0dDNjN6SURXM1pHM3B3MDVHSVlMVHQzdHI0NS1LdnZlaHpLYmhfQWxGcTFnaGV5bS11R3ZyME54cUVuTDJzdUFyUy1oS2ljenZiaFNuUFRuQTNHdkVaRWZkVDcyTW4xT2JTVnBVNzZSZlUxand2MXpVOUZ0V1l3dk5YVHU5bF94cmIzSGJVeE1vQ1l2cjJnQUZ2RXVHaTJwS0NEb1J4LWlRcmZlS1Q5Rm5xZmpic1RxQ0pseHViNDA1MjRuVFhTWVJQTnJscEhJaVhBMkRyUGtBUUdGakcwTG43S2VrY3V5ajF0LVU0T0dNM2JaYnY5ZGJPV1hIcVFQUGhrcmNvTTd0SFVyT1lPUmM0ZFdsX1JyNHlqYnRmQl9Zb3BtOHl4ay1uZUJ5VzJqUldaSHhMWC1vZUlQZWFBVFBvTE4wZURsX2F2bTNiY2hfb2xNOEFfNExTdjlDMzRwN3BkcnVtd3ZaWTYyNWpqTFBxVFBOMTFzQXRDVDdma3FUODZxUU0ydGkzS2JBRmVSY0ZtTzRvQjA4YzZRWDRCWTJVQ21xT0Q1OWV2RDBhanFBdnhOSEZ4eWVnS21MZERoREN6MmJIbmJUMlhqQU53aUhIQUV4SnRINmtSMGZiRGF5QzRZZjZsZUFva2xVeF9LaGNwUjY3Y29VZWN2MTJPa0NhZXhCZFJKTmI0aGUzTEVhQ3pOUGZ3YXc5MGVMRnE4RjlKSEFLdzgwNW9URlFyMkZBcWl6OEppMnRsR1RsTW80YndNM0FJZUhpTFZzU0xheWRJMzJRbWVzeE9ScG1ZNVRPSHZLMW5QaUduZGZnWkpNajlpMTdOVUlKcTRaeDhHN1BYWERJcWlseU95UWdvN3UtcTlhd1VmcHh3Z0tMb0pQNXVqVXZucWxBV2VPZ05KbXZNcTIxRU9RTUdZdWlROU9CUTJROXpyQVNXWC1BQW1qemZEUENXcW5BOHNUQnRTZ21FY3l5eDkzek5wdjBnZDdhd2l0LVBlVlZBWXpfRGxickk4dkNOVHZxU181ZWJwZmhPZmlkbDBJV1lBZEZQOXJVLVI0M1JOZWZ3bWM5V1pLek1RZm1HR0lsN01RSjZBQ1FORVNsYUIzdXl6RmVKeVdfQWFTMWh1RS1PVGVoVGpaWEtKY2VPSEo5MXotSFFQNEk5bVhrTXllRDh6UFZUVnVNN1BUNnRYcWNoR1FSdktIckVudmFUZ2tsRGt3bXZHOXI5N3FGQ1htRDB0Um9pSXFKN3lSNFlNN0ZLVWdaRnRpVEVvWEgwb0tKc3ZQQzZBcU9ZcXNlTVBWN0t3VGdZbUdjTWRFVlBCT3BBSkF6MWtyVTN3UVRtb1pDNlhhSlZ0VHptVGo1QzhFekdEMkFsT0VFSjNrcnJyTGVRR25hTFdhOHlPUzVWa3VpNjNvQ2RhZHdqLTZ5ejVtYTQzLXQ4Slp1a1UyWC1HYTAwZ0J2aVhWcnVuNW5BczFRMmwyUTlMWlVESG45UGdCd05SNWM0WUN4d1l0a3FmR1Yxb3FLSV9rQ3lSbWYtSVdTM1BLbFpNQnZYaHFzakIySFd4aHR3RlhJWkpPZ09YUkcxdDBaNGVERWo1b0tlMGFzdHNvNnpySWZ5dEZMMHZhT2oxZ1VjR2R2ZHc2UXRNLXJ2el9tNmRUWktLb293YmJpTmt6SGRuMEQ4Q25MU3JKUW44YmstWDJyTm42VmgzRUhZZWNBSE9BNWRyUHVBdy1WNnJXQl9FblV5ckJwYVVUVTV3MWhNYnMtcnY0OUc2bk1WYjZtTFVkU2ZCZURfdE9XQXptZXhVdXB1eGxkWTdOVGRfTGxKRVFxNUVQQWt2SXM5N3Q3WnlVMVZuYzJ5N2ZXZ1N2NkVLQmNmanZDWno2V0FjaVpPRkhWcm9hQ2dsM0NFQzFkNW1wcHluWUxyS3FRRDQ3OGRoRmNuQXp3WmgxNVl2NldzR2lkRGRiOEVDQmdOZ0tZakJ4YnpmZWZJNTRtaERrRWl2Yi1nYnhfZlJJTWV3MWdBb3ZKTWQ4ZnJRaTNhRExBNVFySl9ZNkpMWGtKdzNUdVNpV3dOX0pvNmRJT1lTTEZhdk9aMXZjaDNWaTJKcWVJXzAwbEs1TGo2MmZYNzhHTDBsd2RGRk00azVBUjZMVEl6bFlNRVJuM0dHbXN0cUh2bWxpVFkzaGNnNXlpTEx5dmRsWVB0WURQTjVRRE1NaGdWdFctUm9QMVNHbk16cVVrU0pfcUxYZ3BzQjNoanFkbUFZSEk1cXJDWkdyR1pieV9Ock9zVGMxczV5QlhGOVhkWkFDZkthWFcxdmpaTjJFSWEwMzRNOEw3ak5DdFdCRmhzM1VRMm9aZmJHQ2ZqbFdqdWJsV3VON2pBWDJTVnQwREppb2ZBZFJUZXhwY2hrU0dNRGJNR2daT29Yc0dJM3I4NUttV2RQOTN1WVJ5a0dxVVBnRlJxMjVDaVh0eF9BbWdVOGRmb0F3M29takNMcTZUVUVkZVoxaWZJZDFIeWRWdDFFZFlCU1Y4cGU0dzQyVnpxY2FONkNiYVh5T2NqX0ZicUJsV1owM0FES0oxaFM4Zy1wVDF0aG9SRWQ3U2RhYlFfUFhJVlYwMFRKR3AwdS1VYW5kZ21zU1BCYTU0QVVIQjBrbzNWV2ctdmdhSmU0WC1DY054SjREbmZzVTVzNWlSVm15aEZmajNBUzVTREdPNjlMQ1RoZUlhd3d4M2NwZDZHa19nTjdwel9IbFhCNTkycFA0TXcwTk9IUG5lQ1F4SlljVkpvTC14ZVJBWHMxT1VJMDItcy1tWWE4bTRGTzU5OVZwbnBWQzd2eEZybmluUm0tU09KSktSSDJYSGRBbjlTVTZlMUlVMnZJaE14djBjdHh3NHVWa0d1cUhnRW9xWWYtQW01dkpLNWs2dE1BSVI1RDAzdlBpLWtGY2w1YlZUNnVEOWJSQmVDVnZXdzZac2lydjdmMEdPcXpiTFljWDZVSEtOYXhPV3AzMWxnRndEbjFQSG1zWmZJaHB2VWJCd2tocl9VZFNFdDdRRjAzNFdsRkV6TVRTU0dpZ2tCTlltNTZ6QVpfY2VSaS05TG91ZUUtaS1aLTNBTC1vSzVfbXNmOTl3UkdsZ2pWb2kxYy1PUTZQY1hPOEZERHNTVEw0V25vdzdJUlByRnRhTnRBcDBEX1RQNmgwSGpqYnFjdU44eU40MEhvU1NXbl9HOXJTLVozRzM3cURsZkdEcXZyOWROaFB3d0twN1BHNDZNZWF4bkI5dGYxSEZ1S2h3dkk2MEZLMC1kVFU4b2pqRDQ3SS1teXZMaDJITy1hTU9PMS1iQTA3dkltT2pobWh4RS1uSXdzQVk5TURvQ1hFQTZYeE10ckdFQkNOVFVaQ1hTSW4wYmpUYTVKNlhXLUl6XzdLU2dhclRla045N1RMVzdFdEpUNXFwekhYajViZld6c2JKMWF5bWVDczFybFkyZjBLSnpLXzk3QmlCazlMVjdwU0VfX2JOcTFpa1hvZlVRZkFKekhaWDF0M0xRUzhTUVRhRzBsX192em9pb05NeWhTZ0tUR0dGenpabE5jdmRCRTJEeURLZ2VkZ09lZDJsd0MxTjg3bFY5U1pSNUdPbTV3ZjY5MmVMYWN6cEZFMGUzUHg4T002TlM0UkQ5QXgzNDhZcU9RS2tlTElFRjR1UnVzdTlGUjhDZ1Z4dXBlckxabFdaaWZIVkdudDBrdWdqSy0zU3FwZVg0ZlVlbS04LVZBY2V6LVNpbVc4Q3JybnlCSDdWNUlqamk1MEZUNjFFVUh4aE5JeFQtendlLTRlUkRvWUVhN3hwdUs2MDNZTlFUSU84a25QeHZaUE4ybjJoZkp3ckRhbkxkaVhLSUxWUjdONE9RcGYxd0RUbFplNXJuTzJQbVBNSk1zZHZvUDZ6ellYakN6SmtqQ3kyVTBnb0pYQ0hrWi00Rm9FZkpnQWJLNGlEY0lLWGIzTGZRSE9SQUFfTmx4THU0bmFpdElaUVdfNktqR0g1eXV6ZXFKdnVqTHVqam4tUXU5MGthOU5JaS11QUxxcU1QYTJ6S0padnJlNkJBTU5QTU1PODFFckRNc3lNTDZ6cl8zSWl1ZDE1dWtaRjVDQkpmSXZWeklxSldwanJiYTRldGF5S0dLUGZSc1k4dUpNU0daUTZSa0dra1RrWU1scnhlaG9tM2JzcG5QSkJqMVUtaU1paDlKVEE3d1JMa0RsVHEta2lKbDZQYkVielVsQ2RvRFNLUkxiR0RlLXEtM0xWeV9Wa1E0OXlrUy05Tm5GRF9PTDVFNlYxSG9JMW10dVI4SmprOWlsbWxmR25NVHp3emY1UGI0Wkp2Tjc2WWRZZTE0dnoxbWtPZFZnVTVicm9PNl9aY0NWQ3E0MUxVZVhmZTJDZlN3SGJfM0x2aW5ZMWZMMVJ4UFhIZzlwendIX0lINXFjRWFybUdQcFpVNUFKenN6dVNXQ0k2QlNEdmNpbnptN3pNNjNoUlFxNG42Z1U4NERJWjRhMW1pQXJyN05rbjlDVnVRdDJEWHVUcWV1N1l2UkNtUk1qNVFYenVEeHJzdGpfaHlIdHJmUDFNdmlxWnFMckUzbzZCRm1vZlVLNGpWUEJzZC1YaHMyU0J5dlFjVjlCQ0RjRGU5X0c3bWpobTVRelprMEZxM0l2d3BpWWI2bkc5Uk9vZzZRQnJQVjFwUExjc09TMm42WWoyX0RNLXFBSzNLdVVMamdXRlNMNUVyRzhwUldHT3ZWU0p2X1c3VXBLVHI5WXZGUVEzbWZyN0REYTVER0tRbzlfblRyVDUySkh0bTNSVUE2bzlqNy1hUUVidnBNUEx6eDRGSThGWWRtejQzMXlpMDhEbVMwVkU5SVYtRzhoOXpJY19yZjZsWmU1dS15bnVZNnJQUV95bGFYSGIydHpLb0Fjdkxpckw1RVJBZFNBNk96bEU1SVdZcTNhU2JPTUdxN0dCc3d2LUR2UUxlRGtBSWhQbHFyTGpfX1pxTHkxRTVrOEt6cllnZXBjdUc4M0I0SEFfWGp5RXRPMDQ3cEZma0ptektBckdOU2V6NFN4cENIaWdyNkZIMHpaVWYxdVNFNVFPeGliUVVJa0ZQV2FQcUUyOVV4STEyQ1JETUtQLVlpZjlWQTd0NjB2XzNPS05XUVlHZl9UcGRKM3pEaC1xR0NOZFlxa3d0eTU0TUtvU3BLNzZ0X1lEZ2NCcm9SNm15NmZtbVRUei1lSDVpS0ZvSnFxYWtoX0o5dGhrU1l1alNzYm1zckcwMmZidmNMMW5uOURRSUdVMlJLRGcwWWI1cVVoek1nTHBraWNjbXZ0SGlrQVFmSW9nZWVmNTMwTnhpb3VBOTNYSEd0dTVfcHVYVGp3REJzZjhPdGQ0eE1LMWZoYnFvZXpGYzVJRklxWWt5WXlBMXFCN1E3VmVwc1djSHF1cEVtOHhjendOYnhyeXh4dmpHaUJwbjllbW9HejdQc1RuWmpGRnVRNzZxcEhqblRqUENWRnFHdEp0N3pEZnBkcGZ0cVBYVk1sQldzT3NOY2pYVFQ4eUJWa0ZSbVN2akNzeE55OHZuZGFEZWh5dno2Z3ZRbXBzNWRGekhNNmNHOWw4M2ZSNWxwTEc1a0JQbXlkQkNiRno2NHhsX2VGVW0yUFVtTWI2Q1ZSaHBmNXJjZmxHWGRRWDlDLVBGSjFVSG1pc1JWMG1VM2xnekJuTWpDSzg4MFctNGZodldLTFZ4OW5KbEJObTdtWF9ZeGVMQUg2Vjh6VFA0YTVRaEVIUGVvVFJ4WlEyQTM4emEzcG5iSS1YaXZsOTE4eHBGVUN3UExpbGRjU2ZGQU5xNDk5OU43X1lUVmd4bXRPTi00YXJkWWZwbE9yRnMwbzRzbEhYVVNOUUtNQUFLNXQzbGFtcDVNaFZRUWExWFAwVk5SdV9KS0lZYUJCV1V5T01hd25vZDA2MEY5T2N2Qkw3ZVUtQlJkak5NeVgyMFRMT3NkWUQ5SXR6STd6RVFIX3l5R1FEdVFfall0X2ttTURTMl9FTFd6TVhDSUs4Ni10bGFCT293dnZGNlVpWlRDM2N5WG9Ic0ZoNzFjRC1MWks1VXg3ZFhRNmR4bUtGRDE5SG9uNlQtV0FySk5lOEk1NGpUaHU2SWZqX3M4VDhMQVY3QU5jMl9INGZzeHFuLXg5MjJ3T21BamQzNmYzMF9wMmc2VWdlQWZNVkFFc3czWG1uUjhhbGFLOTVkMnJKSF9fNzVOSDNIUjl1RXBaNV9sLWRhNmVDOGdvUDBLbTk1UU4zeEtVSWxjb0Z2d3AwTTh4QUZMelN0RUVSN0l5dDNGRnNBalVuNzFIWlVIM3dEVHpNUW5Bdnp5RWdsNmtkRnp0dG1PQ1NOclBGTXJpQ3FCejEtRXpYT2YxR0d2NXJ0N05aUW9VX0hjM2xUN2N5eWNUSV9JNDJQUjdmRG5RUHAyLXZJRXNOQXoxNF9zXzZxUktVVldoTEJWWUVnOU1NMXR3bkNkM0d5MjBKMmdvZ2xxbzdRa3JXYXp5MzNBdVdXMV82RWxOZHQ0OS0xYWNpTHNCQUZxaDdxcUM4eDM3bGR1MFhRTzczU0pYMDV1dzRSTk5fUHFXOGY1cnJFblhuWTV4cl84d1gwOF9EOHlXNjc1NkxFT2Q3Qk9XYmRCbHl2a2lhTG5naDN5UDlPQVQ1ZjV5cHlhc0l1S3lPckFnX1JqQUtPZzNUQm1UZjJZTGs1OUNxWFpnbWhKNHJrS1M5X2p3UXI1c2lXZnNFclVXbVFRaExueGZZNGVXMVR6NDdRNnEtSThJdmJHdm9NZEc4aGRESXhzczJTQmZLZ0lpZlB6NGpuLXp2TVVzOEZnTDA4UWpDVEFheHFHOFJYbVNqSW5aRERESHlzY3owSmRabHpITDJsZkNMMVk1eE9Ha2JrTV9YZjBreER4ODF3bVFjWTNXbjl0eFlFLXhFVDloNndOTGN6UVh6TzlONXFpSDZpNGJadlR0MkxqdmJrV1M5MEw0TFVFZ2puSE9PTVQtWmtYbWI2d3FoVzlfbjNvWkRZcjlNQ0xPWU5FQ3BUVzF0aGZtTVRDTkk5dW95V1hHZDdDVXAxaUo2UGRDT3lXb19vblpnaGVQY0JNUkhmdU9NN3pfRnJIdTlqNEN2Yk5nd1A2cnFvQnNWcFJMRUp6bHhZbU0xZFF1WnFheVlYbXBiOS1XTnhtZ01tWVd3TVhaZFZWWXJhOTJmSXJUVzdkU0lkeVpZQWI0YUtIZVlMdExJTEtkRjZHLWZiNmVVZTU1Vm9sMEl5S2I1X0xqTFhRLUtBUW92OC1RaXhUODN4N3k3cFZDeEZ4R3R3ZnBOLTFVaklfTDVEZHQ3N1dxMi1wN3JaNDFoOE9ER18yUmlOVVFucUFEeDc0WVlFX2I1SlA4MjY2SDhCSEQxVjFWUFR0aVFvUFNETF9kZTBFVnZ3dUt4Y1pRYnV1UnpzRUpXZHZfWkVJRks0dXdfaHdQOEV4ZGFpb2M5a1FzMmdJem9DVW1yaGFjSkZUU2J6YXI5elBteld2Vmc0a3ZjVUMwSVkzTTMxS1JhT0plWkkxQ2FWWmlfblZHLUYtbmFJQ3hIcm9tQUVBZDBEVFJJOTNBU1E3QUlIVE10bDlfQkxOaEo0UU1RQ0dSblFXdkF0SzhvbnA2NGVzcXBubzFfODktWDFzTVBaejlOMWVOOWR5UHBfZlVfOEpUdmwtVF9lRGwtOXJaS3duUnFOdHhHeEZuVXBNdXE0MEg5dThlMHhYbXJlOGdTTzhxZEtKeFpvMkNEUE9Ca2RGcF94Rk9GNFNCUjdQWGx4aHl3SWJ4dVYyRlYtd2FERzR6UDZCa1ZKdlZHejJSNkpzTXVELUoxdWJtc2hhQTJsR19fbXItLXVUbFlybGxLanFVUHBQS1BGUDZVZU9weFVWdV9CWlZBYnBJRmV4VVdxc3hrZXdxaGlFS0lSckF5Lk9YUTNscWkxdk4wNG1sb1Mxa2xPdVE"}' + body: '{"value": "JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmR5bWh1WnJvMmhHTEdNakFVNEMzbXlJU1JPUFNDRmpvckxUcU81TkZCU25RT19LOW5BSGxoeUFHSXJnSDhmZ21CY3QxZndxdTI2TEVPVmJZT29Cbk5xMWg3U3c2S2tVTkVhY1ptcVJFYzRmb0hZVzJDYW55ZHJEb1JZY2VUME1aSEt0MTFIZF9KUndTZWNnS2ZyTVMxTFhjdlZab2MzY3hiT2wxRG1rOENsZElZZ2dROGwwcXZTclpsWV9qTHRtaTc4SHBjSTZoczE3aFRoYTkzYXIyVGszMUg4UjhFR042Y09JcW55YldCSFFRQlpOSU12RnRnY3hZRWIzWDBmMzlmdk1sajVTajFtZG00TDN3VUYzZWNHUWVIODdLQWtIemJiWWV2QTZmcU9vaHVuWUY0aE9XSzVsaS11R0pGOUprdFBDQmkydF9jSlJ2eGdBQlJpRlZLUS5EUEtzYVRwaEVKb1ZJdEpXcC1MR3pnLjRjMnlBMzFLcHdSQkNDb0pkTzdqdFk0NmxBZUlJOHhORUp6TU9xd3JwWjNQREtVa1JhOXhKdWVIVG5SU1F5bk5YSmY1LURZVjNqRGZlVjhKamIzRTZaeTQ5VTdqZ0pvV2lkZUthTHRXQjVTcWtEd0pSY1FuLW5aTVdJajgwcTM5RXV4eC0yeGdNdDlGOFhObmlWNHN3R2xOZnJYeUkzNV9OMktGNTh3RmtTcVEybmZRN2owLS0zeXBGZjZrN05TNlFJYXNWUEIxMkxXRGFQSzBVcm5NV2xyQ0hGbkp0WmZ2Zm11TnRMVnRQYUVIdDFzZFVad3lsOVhQSTk3ZzNpbXFPM3N5UjJ3ZmtTUGtXdE9kR0VQaGZKWElvN0F6NGcxckpucTN5OEd4d0hQbklHVlZTODl1aTJRdFVpMXM1VHVNZWxtTUJmczl1ZDVpQ29lSS1vNmtJQ3FqN3Rjdy1rTkN4SGQ3NWE0cXdDTnU2ZlNjM2VyY29BU2RUMEdZYVdXU1ZBWmg5cC1QZzZlVXlSUF8xbjFPcUlLWDJPR2NIelNvRWZkQmZMSVZxQUZJaDB4X0tqckcxOE5ZXzY1V1kzNkRJVjR4X2ZHcEQ5QXdzdVN2a19PSVZ3VDB4NkhtRTRhMU1pTzl4TlY1R3Q0N2dIY1NrdldpM2JteTE5VHF4X05fdm5PZnE2Q216WVhDb1JtdVZnaU53WS1fNXNoSVpHUlk5YUF3cUVxRUNkOWJLbUgzeDZlWGdUR04tWWRrSkVHdkt6RTZ5UExHdGdMX0RqQmNMcW5JNHMxOXhDRFFLTnJIZEx4WEpQcVpHYmRqTHVfbGFWcXdBUnI3S0lZUG5FNTBOalZyUEpZU2ZaRjRCMWVPTUJvang1cFJFbERDODRqSTRvTENJdTBhbTlnNVBudlhUQ2FHSUJPaTBCX0J1ZkZZajBndWp1dTdHZl8zdDhrQ1UxQklEYXQwX2JlUmx2MmJrR2RNQnBNRFlRaTZ0NmV5U2drYkZZM2dseVo2U1ZWNE1HNER0cUJCWnVISmRCZTZzSFFNRnliNHFQTkpfN1pGVEJHLWRfc2gxYWJhWEM5Wk9qV3FwZGx5RXBKaE9kd2dXZWRXcDFOQy1sSWE0eWZoLUVjVTl5VDZxU2FXcGd4SUNEdjJZekc1QjE0aGlUU2ZKb2txVG9PeEtWV1gwTjJGc2VBNHduYjBZWGdXSW5aYVk1WThsUkQydzVrNEpTaGYtUm1GejRvU0JLWEQ3UEp2dTNCTEg1RF9GVlM3SEZHajdMRG55MkF2RnY0ZVdLT1ZCWWphb2hndVhFOGc0eXFsUVZERGM5NzJVWVVsTS1SSjdqUjlGYUJGM1htdlViUjZSSjd0WTlDeURuQ0xJUWI3YUFJM01iRi1uTkI1aTZaY2RyaWNXWWo1UHM2NUpBZzFGZlRrUmRINXRkRXVlbDhqandXNDFoRWlfSl95QWVCX3BTNF9MYno3RS1qWTFOTmEtX2loYUtqVDZEM3JpQWc5WU5Ud0hndHRzTGZReTJWM25admlEUEZSRkJUVGIyNW5qeXQ2VGwxanNmMVNibkhnaXp1NDUzQXVWNXJjNzlHYlBsZ01pd0Q0TDR2Y0JLSzdVMVNNNXVXN2pPc3czeVUzMFQtSXlDUUJ5aUlpbnU0R1Z3LUhuLTZKeUFYZjExQWpsSG8tcW03dDltZmJxOUNYaU9Td2Y3N2FsNXQyMER4T2tfUkU1cW04ZEk0NWozMjBia284SkxjV3VVODdNNThYTXNVaEVycGM4OU0xeXpBMUM3TUg3VnhSZnlQNUFBdzdBVTVBUkx1VVhleXd1Zk91aEtqVjEzZ1ExNUYxS3FNVkdxWFY1U1g3Sy1waWdrN21HUFVQVW4tTXlQYXQ5OTVDZ1BGMTl4NnFmd2M3RGxZSDBLbklQd056bHVfTHA0ZXQ4T0NST0sxOFd4ZzZmNUdJdmQzOF9TWEZWMjJyOEp2enNzZDFrX3htbTdWOTVGbTE4QW5WZWRVanhueDQ3aGFyS3JQdGFsOHo0TDM1azZCSDVFQlQ3SXFxUWhodFQtenUzTUsyMzZISWdsd3hGci1kM19IRnlCMjd4M3U3ODFpQmlBTVZ2R2tERW1uVGhOQ1c5Qm1JcEJ1bnE5eS0yNE1HRUlSY0FoWFN6R3VzQUtwcUJObElTWl9ZQWVxOXJRVXowYnZfSUxsNkRJdTdGYmlGLVVuTFdOMWdRUWlkU1dHVVh3Q2YzN2JMeFpIUGFCOVFnYnp5R3ozUDNxMHNiWk1Ra1BWTVZPSWF3S29FeEdvX2lPd2pSMDJiaGh5aWI3em10NmJKZ3Z6R2xZbC1uM3lYYVZWeEx6M0pQVWVPVU40Uk1hT2F6SHYtWE5wYlFWQndUQ2MzdHlwSlJpanpHVzUxOFVNeFFMRmZYajV6eHZrb3NxSGl1c3llR0NoVWFSWm00Si1CQkRuYWxCLUlaX1NoMXR1dnRXT0dJSHRCV01qY1lmckxrSUNJUDktOGQxc3AtZVV2Um1nRzNseFFWQVNuRnJyYk9NNnVzUEc2bEtiZHVhdnU4VDFLUWlNSHdhMVdYNGJYYUp4LUxqcE5rbW0wbFltT1RwUjV4bEE4RkdwY2lvM1licGxZVnVzNHhWV0NmS1lEZTJ4elhwMGJvSWU1Nm8zYThwOERrbDhWR0Fwd2JRdDI5TXZGdnRhSWpDRnJyYUdRZjV4ZG1sa01PSFNLaDhQb3R5TG5talFSTlZva3pEYUl1dUtMSjNRaGdrNlRhejc5b0pLZGlMVkNPdXNwMERSS1I0SFlBV2pURHVCLVhITmd2YnNzWFNFTkQwMHoteDVfcjZfTnNzaVhFU0hodENTMHNjT09DZEdVNTA3MTZpZ0szYlVSU2RzZ1BzOXBnd29vZG9Cc0VQdXpFN2ItZFhVbWdxNUVFNlgzY1Itcm4wblRFczNac1dOdjhuanFfSVYxMjlNMVpNenJnT002THhmVGl5WjBScl9BOF9UQUFXRWpkODV1VUI3NnBiMUZXdXFOTHVwLW1fNUt0elc5MTJEZmVndVNoSEljS1lsT1M2U3YzZUVhWlZlTnJSWUJsUzZYLWlINVl2cVJYX19yOGYydTNYb2JpTWxNbk42TC1jN3VqVHlCa09wQ1lVU3hoNFptWHZfSHhJZ0t6OVlLMXVzNEV2Z1h2bWFoN0NXSy1NRmItSzRMLUUydWV3eGc5WlpMRm1iTE4zcXRhMm5FRGF3ckFIN0E1QTNBU0dDenFmR3c3VzlwQzA0SnpSS3FYMnZ5U2lzaVlJUWpCNUVSQzdYTlNYN2xWQ3ZpYnpsRXJlNzFSaHh5bUlLekEzQ2VTTFlIX2pMTEE4cEh5Qlo0Q2kzWlNOcVBrZXhOWlZRdkxKZWY0TV9JanV3UkxmY0pQSUxiOFM1Ymt6ZmpaSDZKdWp4Ry1ycl9LcTE3STQ4N3ZuWVVGSGM2UVQ3XzZzR0lCUzZncjRPSkFLSUdMNjQ2SXhJRTExdWw3YTZJYkZHeGl3X0c1QU9kd1Nvd0tmckVVVzFMOEE2ZWF5VjVjSFRIT0ZHUHYzM1R1U1VpN2pFMTJXdm40eThNTWJKYVhTNkFJVS0zN2Q0WjRmbFpjNU1ZbUxIVktoQ1pMYjh1Rnc2REZCamdyY0Y3MVhUVG52dVp0cEgwZ09EM3ZqV1dvZEZwNzlqdzNfNHkxbVJvbG1semhDaDBZd1IwYkJ5R21qS2dDVEQtNjdidEdZb1FHLUY4SWprUzJxcXhWWGpvWkdyOXVJZkNuQUpTUmRlYWNLaWpkc3FKYUtHSk85dEF2YXhXWXc4MUFMQUVqdElySk1fcTJ3c3liV0tSWkJmX3JUQVNfTFJUSGVpd2prRVVtZ2lWelQwUEdfSjRDWGM0YnFhcERhQURGTGlScFNwYUlKS3JhdVc4UDFsNzROeHRVbXB5SDBRZ2U4SnJ4b3lYTDQzdFI0T0dOLWg0aUUwRzNoa0MzSzFRQ0Z5NXN2VmtBdGxha2l0aXc3ZVFGN1pjcEtSeE5hREZEYllUb3pFTVJWQUtWa0RYbWEycjRxVXJPc2ROSlROQnFlWWdhbnh5Q1RpR2FNRVZEZjdEanJTWjktTVJ3a3R5UVF2d1NYa0k0VmR5SlViX2xJdEF4UERkMUNpV1BYRkgtdWdEa1RrQmRCdEpYMEN5N3Jaby1kSUJ6VHU3cDItNTJvOUotVUhfbDV3LU9FZ0dZaENnQUtGTkpaSWh0Z21nY3ljUVdHcm1RT0plN3QzNUlIeExwZ1Z6aTJGVWp0QWNGR0dPeDVuQW1DTVZOdzhxQnZQbnV4bzJSV3NZa0VJcGRRU2MwS3Z4MHBvWmEzeDhObW1BYnYxa0VzdzhZNjhFNG5wSTB6bnFLYmV4NFU2OFh3ZTBlSGVpV2lwemthREpUUnRqVWg1eE5Wak5RMktPYTEteHJjSjJ6MXdJc1JqdXp4VklNaGdpSXVleGp0aWNleU81WnBjUWVDZ3J4UWx5bFdTdnNOd21nOUJIWmNwVnZaNWN0LWVvZ1pQSUN4S1pZSmNpTXd1ZHlZdUtXdEdiTVRMWF9jYzd2NXdTa0o5VnZFQXdfUi1QeW5VY1hZY2RNcUw3WldxY2E4czVIRG1lWlNZb1RWTnBSUzdJRFZBMnh5Q3JZWjZkanppYUZHT0NSS196d0pPWVEyeE4zWGpMYXAxSWNFOV9qUkhJM3loYUQwUlVyVkppNVdGdC12VnlsYldVeVNZa3JzZElzUGVzQ2U2S3NpXy0zdHNzNDNGU0NCVkZ3azhhbkdxcGVwWmdneFkzX3JtSERiSjBaZmV5SUlkb1RKYzF4Q3dGZ0kxZ3o1X08yS1BXWWF1ZGdiMVpjRmstS1cxSG1ISmx1cU9Qa0NzZUFGYmc0M2NZTUtsNjJKY0VsVjhQdlB2Xy1pMFU4ZDJ6bEpfUm4zakpvb2NnV2o4RXR4ZEh6UGozdnMzRU13ZlpVQjIyVnZGM243N3g3STZxTkhVZlNObGo0TWxnc2ctVFJfVW9Nc0M0dUlQYnp6XzBUdlJfMXQ5LWVYaWZWcF9zYXhEWEJuS1R2LUxSaEIxRjA0d0R3SzZpX2h2cmdwd0ZVbldSME9ObURSNVp3TmVaMGZ5U1V5M3lFNnFZLXZSbXB5RjVqdE80V1dSQW9mb3R2OXJNd3FvNTlvNUNmY0kycVVockJvOERSd3JzOHFMczR6Q2Fxa190RlZ6dzVrdkoxSWs4U29EQ01COFYwWFJnblVLS2FndFJ0UFVfUGh3c1BpMlU4NGJpeU1WMmJBQlZsVEx1QmF6ekg1UE9Jc1o3bDlyLXV6ZW5XR1ZwbEpFUHB2c0ZEMy16OHJ0VXN6SjVNU0NJcERRc0xMUTB6WmZCY212ZURJMnZ0c2JvVEgwSVo2QWl6VnlTVUtaMnZDNFNCRml4Sm9GT25YT3ZUZGVfeFQwRGJLcUlac3llX1lLbG1Kd21LNHlRT3JwckY2NkRjZmV1d05YWkJ3a09RMktJVVJOenFQX01ERmtIRWIwamtlektrTjJ2amtHcXgzQ2VjZHY1SkZCWC1lSDlVeWIyajd0VGphSkVYbUtvZ3VDY1hJNjBOX3RyZGhRQUpjeExnQkloekJjQ0s0RmRkZ24zMDh6b1VHMU5pc29pWnBKekIySkZuZzFDeUpJMXlSTWhSUEdJNFRlMmJxV04weUdXS2NJTmI5NUIxcXE4Vmg3Si1IM1RZeEtydTVKTjBDNmdoVDJKXzRDdzZMNWdMd2dwWXA3VkM2WDJmY2ROcWRIUW1tRy1uLVFYc2Vfa29MNWF5U0tidkowYVN3UF84OFlYYmNBU0dhZW4zSVpwMUNhaVRfTXNMaXBXX05rOUZYcmlXcHhNZVYyQU9sZFE3MmhjYWVhNlBTS0g0blZwalhwMTk2X3lMT0JOTV9Vbl9Wc3FZZzl3NlVZSlZHYloxS0dUd1RVMGIzb2Y3b0ZnLVJNTUV0bGtBYlNUTk53ajRQSDM3a0JGVmhra0VkYmxQdlFDRk9zYzFRM1BDcVpqS2dsZHg4Q21xaHNHVDN4QlEtczd0bEdUMlJLaVdnbWZORDA4dHdOYlptZnV2QnEwYnpmandnQVhsYVZwUVp3d19sV3JoNmJUamVVREtfQmc1bHljSl9JeFhQOXl3X1pDZ28tN1dYaDlONm9fRDEwM2ZVUjBhLWRuaGs4UXhCbGc2bm1QVWVLekt3cGRrWmxYRGNMazBmMW9DNURoaGR5SEY4SkM5czRBY01LVzUxZ0pBSHRFczYwZzQwcko0eTJKWG5sbnoyenJHNG5zMkNRc3lfblNWUXlWOG8xaXdxYm1pZUN1dXBSTFNZcnF6M0xsX18yYUp2UTB1cmdqVkI1bkhhMkpkVmZvTXh5WDVwMm9KaHYxZE8tMlFuZmJoaHpZNExVNG9qNmhMMG04MXhfQXJWRjBUaVNNX2dLWlM5bHlPR0FCSHRPZi1GYmZzNVpOMmJKR0d0ek82QVRGaWFiQ3VTX0RzbHA0YUg4M0xaNGZ3WXphZFZPeG1UaHFIUXJyaGl2TDAxTzVlYk5aa2Rnc2NmblowLTNTNjA4QXNYRkFYM0lhRFR1ZVhDa3VQc1BtcWxLeXRLVmtjOU9BVktIb0I2YkR1cDVIQzZZQVY0dkt3VXAyUlN3dDIyNE52eTJ4RHRfd194c3VieGdSbnhPMEFGaFdUQ0dqMWhKeExZaXJLQVlKNTlVY3hoV195RURlcjhhTWdrWUNkWHVMNTNxQ2dLbFlVNHNmN1hGYktFWHdXUUE1RWd3cTVsRHlVbksyT2kwMlIwVFpBbWRfZFh1ZG0wMWFnZ1FiNlVwYU54VDU3MDM0Wng5U0Q2T0IxRzFlbGtITEFHcThaT2d3Qm84c2YyOWhaLVBBZDhpa3QwQkhSOHhBODA4SXJlNmtzSkJDbVk0WTB0OGo2Q1NvNVF0UWtSdzZmVmE0ZHctVWNSc2s3NkxZSGZWTVRXQnZMRlVNdEVSRUpoSGVLdlRjVHcwdXpTRHJPcFFMRXlISkRrZV9hVjRpenRYVy1nTHNDd3l3czNCLUtoQ3JJOTktZ214QTVVOVczMEdHRWY3NVFWU1FiallhU2JxVmFQMHRuWVc1R09meGFtYVdNMnRUcC1VRVRyRHhFMGMwY1pCbEdEUFpjT180Zm5nOXVvSG0zVG5EYk51Z1ZIdGI3N0F0RzJ2ZU0zc1o1WldpTWFmRXRTYUNHb242OG5kWDRFR1V3STdEMzQ0YVhFeGR0UDRaSWFnQ1d2Ukd1NHk0Ym1RbURqaHhFbnVMOFdLS2JXTDFYQ0NyNVFyU3liT3VIUl94d1RnRFFRY0k3YnVxTGhMME1jbHBTR2VTZ25VaHRkekI2ZTJiT1E0QnVyRExjbHpCVFVwMzhtWm95TVRfN05PWTYtNHktTjE2SDdiZTRQVFozTGh5eUg3dUNYYUtsbFF3VExERGIyZ3ZUdmU1N1hfNzRkbHBlNFFxVVZ6cWIxcnViVXk0Q0c3MHdsTUFGMlphdEh5WmlhVHVVR1lSbWFUQmhJamNSZFJzZUVMdmV1U3pMMVEyZGdmbGNsTGdQVU4yMFdHSURKOGxHdklqU2NzbVNjZjFNSnNRSjVPRzVzcmpMdVYxZXFHUkVBR084bmlXd1MtN3p6QlZxbGptUW56MGhmS2tVbXRMMEJuYktXYURLeUtsa192TnNBSkFqVEJRSlpTdkxaUG1xbmJ6b0p2N1dNN3Q1dngycEJsbDJ0dTBRM1R1aDdSWTFOZUROWDZta3B5bmtrR2N6V2E2TU1KWkdLYU1iSDIzVkF5V1JScC1BRkx0b3hWYXFqOUpkei1lNmUtaVNwQlFpRWFxcGpvdFpBT2twVGM5VXNsT0szQWdrZ2FMX0RBU1FDOEc3VVM0VDJlLUxrci1Dd2QxeUswdVdmVmU5LVpBYW04R2ZzclpWTHJGMEJIXzVkWlZoNlB3N3FEZS14ZVRfenljenlqOXFFYkhTTjlqd3VRMmNmWTJSZkUzZEpoTlJaYzBlZXpyVWZxa1JuRXFvX2xTMVBYampXV0VoUE1PcENYbURqMV8zWllaLUVpSlItWVZBUEJSNXQ0eE9hdFhULXVyT2N5NlByQ2s2QjNLNTNQOTdSU05WLUZ2MDE5NzJlTVdZVllOMVdjaDRfbmJGcjVhYkpQV0I2UzFuUEprU0hyU2Z4WVptRmNHaG1jc1BSMFI2V19hMm5DQmhPTFBOUVdQc184Tk1JN1ZPS1VEU0lLMVZRWmJpLW5kcElfRGxKZ0pGcnYwU3Q1NTlINThjXzZrNFBENWZsQWdkWFBKbmlRX2FYckRpTFFaSlhRM243ZUt0Z2J2VzFGek1sSHAwOG4wd3g2b29xcU1aenE4eVY3RDkzSE9wUVNLQ2hBVTNNNDVEZnZzdktFTVo0ZFRlaFJIYWo3SlZGc2pWRFVFS0JrckYwSDZsMl9zMjZmNjJGbEhSY0ppeVd3eW80Tmt2YkFCdG9LSEpSUzBLVGZUS3BRYmE3OEVqZGZoX19SOURQUFlkWnNDQzlOQnVyV1VlWm0zbTRsSFd1emNJMkpLZ1RxN3VlaUFkWVdFQkljMkNld1d1S0tGUnI0Vm5QODNNdm83NXZwd0JRT29DdWhvZkJNSGFzbThhNWEtWW05VlRLNGRSQnZ3TDI2b01hQU1PWVQ0VVhUd1plVW9UVUlQZURvZGRNbk9PSGVEelZuVGF5ajN4a2d6dDQwWUdqazZwcTlnejZoSnN5eXhSc2w1RU90NUNxZXZzY2NtZHVrQUVvQ0dhb2pTeVJ1ZUlLWUtLR2M0YktNR3RnSC1nR0FYck1GT1BZNHo5NDV5MXZfVktGZ254blBITnM1VFRxS1NFY0tLc2EwNWZIM3htSktrTnlUTy1MeXA1ZzlxMS1CeDZIUzZxVmVKLWFtaTgyUHRzcFFOZUc3cVFIbDF4LWxPWjlla29ZclVteXV4bnBJeDNnRlc0eGkyUWlHNWV4TWxxRFRWM19JTTBCSEdZbUNMTFUzTzhjTWEyUTBucFd1THJYZ1U0LXE2c1YzVlFYM1pydG9NdzVRXzRtd24xYV9PbklpNHdYSTJrVWVYSWVVOVFINzFVYWZJcHVWWUhqRDhTOTdYVVVOQnJ6YVN6d0VJcVhvc0FZazJsaG9FSy01Y3d1ekdEaUU5Z0JSMjJ2em85T0xhYy1ERGpSN3pDM2ptX2lSRlVqbFNJTE9fYXNRYm9VSnctVnlWRy1kOWFKZGV3aVV5bmEydXcyTkhsYVhFUUk0Ri1wS3hMNk04bFhMVDhDdnFVVVA3ZnFWVFZCUnRmZlRkSEtGZ3BZUFZRbk5ka202SmtVZEp1Z05NSG8xRnMtbDdBZmxnVHRKeEZ1Um5ZcVZkVVlWdkJBamVqdXZoQ1FtaGFlcDdwSEUwQVhPSGp5dC1jWjFpN2RqQTNrTTNONDJSVC1ucFNfQnExYkJoUUFLRFl5NnhzOTJTMWdHZVpMcmhYRnBMMkt0b0E0Y2g5YVNESEVhRUVoM3BTSDJydnhfRGhLYkxhazJXZWVpMXZHVWpMZDBiZjRYcm5NcExhSlV5M1htbjZVdXBsZHA3UFIyRGpZVVV3dTJHS3FONUhKLUlWVlNvNlMtaWhuLXhFZUNSVmo3QVdQM1FPLUw5OHVUQy1NR0laOW5pU0ZuUGJOZnlHMUp3ei1FbEhYOVZXdloxS0pKMVpXSU9PZ3ZtZWppY04xTUcxZ0F6V0NkRFhIaUpkU3c2RDJPMnNiUGdFWFlLZFJNWG5CYjVJQlRzZkNIc1RmNHlGZGxOaVNqNm5DdlU3VlVoeVdudmZhd1hiaTBwbkoxejV3WDRBQURRODdPdmdQRzd5dkxBM0sweXpXeXhOajhuLkxkd0syeDBvSUxocXZtMnZpSzhseXc"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '10636' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96041739.vault.azure.net/keys/restore?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/7089b08b10a64ec68db241e20e2109d0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qbGcivUVxthKiCxcjxOGdsiItrjjTm0_-o0gkZmRSDlEY4ixbjJYBZMwZLxLm7_ZzoGTVTdON-_6bLu-ZwFqAAe2Nc_HDLkL3FTn1YkjTSA5I6FTXI-CC79m3mPLbrVNkHRUkN7QPpl9Qak8RyRl4TA5XtOp_ztKm5Lfuc1eJsosaRdqaMe2UlEbu0XCdYDoP1UoNRAhrUZwli-GHH6yWQxq0SBtnfUsXH0CkgprrnpDYM3dxUkjJJ6IRpW4acRXrFDg-ccCBQDRLty6eSRehugfZyTGciaT4fBcj245OjytQZHxz2ZGixRxN0YsvjoZXqquXKqfkKEcknMDNapyFw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/d2c863b455c9439b87fc78c6ac184217","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"uWCbdAq6V_Z3_JRNeKK4o27y-v8lL_IUNGXQHywjTU4aoVK8iDvM0ChRMhlChsMcI-SyGaAk7kiS2ywdNx5JI3rcaZiiasFZ-4CUnUQbOB_p5L_r2dDXvfdQzGaigM6cttEW5Iwze5dEd3BOcDQumxRrtSJNld4AlxEK-Kp7xaOUFc_2yAV1QPvELtjJLN1zMNw12FXNqocpZwZ8t1BGvvXKYfz3yrS6rq0nG36n3S1yA9Cb0NnrTjp84na3diRQXpuaUg65QXrbhcBW6o1aKTsuEAVH5FAqDliBa4v5lqTNsWxOGS996rMfjsJHJQ_fymvIy69zHrMe2UPupwz_OQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527628,"updated":1564527628,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '644' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '644' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:00:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96041739.vault.azure.net + - /keys/restore + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_recover.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_recover.yaml index d1318da0dda6..f2bac86a4b60 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_recover.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_recover.yaml @@ -4,444 +4,502 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultfcf91456.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:18:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:01:06 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultfcf91456.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/c062f7d6222743fc8ce103b1d9850298","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wTcadP8ONiTwlvzh9KqAqaScUg1734Ux7ykEs-X3wyoi7MjSFaGb-ZAhDrH7iKSbArQeT_Pp4EvCl2axAvOJvT_P2Kw9CE9rtOaD2p6lMZjqY2R0jiMQVyYHpvOICi-87uhEe_N3pdoWxS93WXjo8NblF2dmvwbwCmuAD4IPWD5Ve0VGf2kKh9QtGmJHrQ2C1tdkPP1VHQmfgLNjBQmvPPxK1aAUgTf1jw1NxNErOyHOyiKuYe_phcO8qg0st7Q3wRuDfRYs2_J_1veYQGytghxlAlZ8DjiyUyKNK2fTDUKU5-zDCFWnn9mI1eiTVKXo_4FgEWLfno9vhZEvsO4EOw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703534,"updated":1562703534,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/896fd129ece84f1781b0fbc146a5ecf5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tC-zwt_MYEF4cZ4DDFjtfMUrlie9a0s5ZdkhA2p-BpOGpfcR1jkXQtOirLaC-c7vCyHTj7FauK-j-sZp6tLLQVTrjxuF4yr23qnJPaOsmmMT5um36xNg8eNaMF7p7z9VYEAwXOAWx1ei77MdfgBRV_YMzdxRLYvyzvorUDWhHg58Ple1ZM37VStOpU8layK0T12wJOsqJnPvOvz_m24WlbaP94UJcjs79GZPCXdrK-XRmmaw0ibKbE2mtAltfJHOMdQ7etmlUUW4eY838dTGudYi3vdvJI77h6700K7QH8xRm9jlUlp9AH8PIcBqfW-QI1a45N4GvsGYfHFYCz4piw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527667,"updated":1564527667,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '656' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '656' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vaultfcf91456.vault.azure.net/keys/key-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1562703534,"scheduledPurgeDate":1570479534,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/c062f7d6222743fc8ce103b1d9850298","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wTcadP8ONiTwlvzh9KqAqaScUg1734Ux7ykEs-X3wyoi7MjSFaGb-ZAhDrH7iKSbArQeT_Pp4EvCl2axAvOJvT_P2Kw9CE9rtOaD2p6lMZjqY2R0jiMQVyYHpvOICi-87uhEe_N3pdoWxS93WXjo8NblF2dmvwbwCmuAD4IPWD5Ve0VGf2kKh9QtGmJHrQ2C1tdkPP1VHQmfgLNjBQmvPPxK1aAUgTf1jw1NxNErOyHOyiKuYe_phcO8qg0st7Q3wRuDfRYs2_J_1veYQGytghxlAlZ8DjiyUyKNK2fTDUKU5-zDCFWnn9mI1eiTVKXo_4FgEWLfno9vhZEvsO4EOw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703534,"updated":1562703534,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1564527667,"scheduledPurgeDate":1572303667,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/896fd129ece84f1781b0fbc146a5ecf5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tC-zwt_MYEF4cZ4DDFjtfMUrlie9a0s5ZdkhA2p-BpOGpfcR1jkXQtOirLaC-c7vCyHTj7FauK-j-sZp6tLLQVTrjxuF4yr23qnJPaOsmmMT5um36xNg8eNaMF7p7z9VYEAwXOAWx1ei77MdfgBRV_YMzdxRLYvyzvorUDWhHg58Ple1ZM37VStOpU8layK0T12wJOsqJnPvOvz_m24WlbaP94UJcjs79GZPCXdrK-XRmmaw0ibKbE2mtAltfJHOMdQ7etmlUUW4eY838dTGudYi3vdvJI77h6700K7QH8xRm9jlUlp9AH8PIcBqfW-QI1a45N4GvsGYfHFYCz4piw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527667,"updated":1564527667,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '787' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '787' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /keys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' headers: - cache-control: - - no-cache - content-length: - - '76' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' headers: - cache-control: - - no-cache - content-length: - - '76' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:10 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' headers: - cache-control: - - no-cache - content-length: - - '76' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:19:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:13 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1562703534,"scheduledPurgeDate":1570479534,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/c062f7d6222743fc8ce103b1d9850298","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wTcadP8ONiTwlvzh9KqAqaScUg1734Ux7ykEs-X3wyoi7MjSFaGb-ZAhDrH7iKSbArQeT_Pp4EvCl2axAvOJvT_P2Kw9CE9rtOaD2p6lMZjqY2R0jiMQVyYHpvOICi-87uhEe_N3pdoWxS93WXjo8NblF2dmvwbwCmuAD4IPWD5Ve0VGf2kKh9QtGmJHrQ2C1tdkPP1VHQmfgLNjBQmvPPxK1aAUgTf1jw1NxNErOyHOyiKuYe_phcO8qg0st7Q3wRuDfRYs2_J_1veYQGytghxlAlZ8DjiyUyKNK2fTDUKU5-zDCFWnn9mI1eiTVKXo_4FgEWLfno9vhZEvsO4EOw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703534,"updated":1562703534,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' headers: - cache-control: - - no-cache - content-length: - - '787' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:19:03 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:16 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' + headers: + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' + headers: + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:22 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' + headers: + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 + response: + body: + string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1564527667,"scheduledPurgeDate":1572303667,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/896fd129ece84f1781b0fbc146a5ecf5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tC-zwt_MYEF4cZ4DDFjtfMUrlie9a0s5ZdkhA2p-BpOGpfcR1jkXQtOirLaC-c7vCyHTj7FauK-j-sZp6tLLQVTrjxuF4yr23qnJPaOsmmMT5um36xNg8eNaMF7p7z9VYEAwXOAWx1ei77MdfgBRV_YMzdxRLYvyzvorUDWhHg58Ple1ZM37VStOpU8layK0T12wJOsqJnPvOvz_m24WlbaP94UJcjs79GZPCXdrK-XRmmaw0ibKbE2mtAltfJHOMdQ7etmlUUW4eY838dTGudYi3vdvJI77h6700K7QH8xRm9jlUlp9AH8PIcBqfW-QI1a45N4GvsGYfHFYCz4piw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527667,"updated":1564527667,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '787' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1562703534,"scheduledPurgeDate":1570479534,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/c062f7d6222743fc8ce103b1d9850298","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wTcadP8ONiTwlvzh9KqAqaScUg1734Ux7ykEs-X3wyoi7MjSFaGb-ZAhDrH7iKSbArQeT_Pp4EvCl2axAvOJvT_P2Kw9CE9rtOaD2p6lMZjqY2R0jiMQVyYHpvOICi-87uhEe_N3pdoWxS93WXjo8NblF2dmvwbwCmuAD4IPWD5Ve0VGf2kKh9QtGmJHrQ2C1tdkPP1VHQmfgLNjBQmvPPxK1aAUgTf1jw1NxNErOyHOyiKuYe_phcO8qg0st7Q3wRuDfRYs2_J_1veYQGytghxlAlZ8DjiyUyKNK2fTDUKU5-zDCFWnn9mI1eiTVKXo_4FgEWLfno9vhZEvsO4EOw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703534,"updated":1562703534,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1564527667,"scheduledPurgeDate":1572303667,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/896fd129ece84f1781b0fbc146a5ecf5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tC-zwt_MYEF4cZ4DDFjtfMUrlie9a0s5ZdkhA2p-BpOGpfcR1jkXQtOirLaC-c7vCyHTj7FauK-j-sZp6tLLQVTrjxuF4yr23qnJPaOsmmMT5um36xNg8eNaMF7p7z9VYEAwXOAWx1ei77MdfgBRV_YMzdxRLYvyzvorUDWhHg58Ple1ZM37VStOpU8layK0T12wJOsqJnPvOvz_m24WlbaP94UJcjs79GZPCXdrK-XRmmaw0ibKbE2mtAltfJHOMdQ7etmlUUW4eY838dTGudYi3vdvJI77h6700K7QH8xRm9jlUlp9AH8PIcBqfW-QI1a45N4GvsGYfHFYCz4piw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527667,"updated":1564527667,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '787' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:19:03 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '787' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/c062f7d6222743fc8ce103b1d9850298","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wTcadP8ONiTwlvzh9KqAqaScUg1734Ux7ykEs-X3wyoi7MjSFaGb-ZAhDrH7iKSbArQeT_Pp4EvCl2axAvOJvT_P2Kw9CE9rtOaD2p6lMZjqY2R0jiMQVyYHpvOICi-87uhEe_N3pdoWxS93WXjo8NblF2dmvwbwCmuAD4IPWD5Ve0VGf2kKh9QtGmJHrQ2C1tdkPP1VHQmfgLNjBQmvPPxK1aAUgTf1jw1NxNErOyHOyiKuYe_phcO8qg0st7Q3wRuDfRYs2_J_1veYQGytghxlAlZ8DjiyUyKNK2fTDUKU5-zDCFWnn9mI1eiTVKXo_4FgEWLfno9vhZEvsO4EOw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703534,"updated":1562703534,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/896fd129ece84f1781b0fbc146a5ecf5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tC-zwt_MYEF4cZ4DDFjtfMUrlie9a0s5ZdkhA2p-BpOGpfcR1jkXQtOirLaC-c7vCyHTj7FauK-j-sZp6tLLQVTrjxuF4yr23qnJPaOsmmMT5um36xNg8eNaMF7p7z9VYEAwXOAWx1ei77MdfgBRV_YMzdxRLYvyzvorUDWhHg58Ple1ZM37VStOpU8layK0T12wJOsqJnPvOvz_m24WlbaP94UJcjs79GZPCXdrK-XRmmaw0ibKbE2mtAltfJHOMdQ7etmlUUW4eY838dTGudYi3vdvJI77h6700K7QH8xRm9jlUlp9AH8PIcBqfW-QI1a45N4GvsGYfHFYCz4piw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527667,"updated":1564527667,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '656' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:19:03 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '656' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name/recover + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index dd2c6f0a9b95..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport +from azure.core.pipeline.transport import AsyncHttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient @@ -64,7 +64,7 @@ def __init__( self, vault_url: str, credential: "TokenCredential", - transport: HttpTransport = None, + transport: AsyncHttpTransport = None, api_version: str = None, **kwargs: Any ) -> None: @@ -91,7 +91,7 @@ def __init__( self._client = KeyVaultClient(credential, api_version=api_version, pipeline=pipeline, aio=True) @staticmethod - def _build_pipeline(config: Configuration, transport: HttpTransport, **kwargs: Any) -> AsyncPipeline: + def _build_pipeline(config: Configuration, transport: AsyncHttpTransport, **kwargs: Any) -> AsyncPipeline: policies = [ config.headers_policy, config.user_agent_policy, @@ -104,7 +104,8 @@ def _build_pipeline(config: Configuration, transport: HttpTransport, **kwargs: A ] if transport is None: - transport = AsyncioRequestsTransport(**kwargs) + from azure.core.pipeline.transport import AioHttpTransport + transport = AioHttpTransport(**kwargs) return AsyncPipeline(transport, policies=policies) diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_crud_operations.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_crud_operations.yaml index aa5bf8efab58..cc15961c68b4 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_crud_operations.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_crud_operations.yaml @@ -1,255 +1,245 @@ interactions: - request: - body: '{"value": "secret-value", "attributes": {"exp": 2527401600, "enabled": - true}}' + body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - - '77' + - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43","attributes":{"enabled":true,"exp":2527401600,"created":1562687784,"updated":1562687784,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' +- request: + body: '{"value": "secret-value", "attributes": {"enabled": true, "exp": 2527401600}}' headers: - cache-control: - - no-cache - content-length: - - '251' - content-type: + Accept: + - application/json + Content-Length: + - '77' + Content-Type: - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name?api-version=7.0 + response: + body: + string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d","attributes":{"enabled":true,"exp":2527401600,"created":1564528272,"updated":1564528272,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '251' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name/?api-version=7.0 response: body: - string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43","attributes":{"enabled":true,"exp":2527401600,"created":1562687784,"updated":1562687784,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d","attributes":{"enabled":true,"exp":2527401600,"created":1564528272,"updated":1564528272,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '251' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '251' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43?api-version=7.0 + uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d?api-version=7.0 response: body: - string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43","attributes":{"enabled":true,"exp":2527401600,"created":1562687784,"updated":1562687784,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d","attributes":{"enabled":true,"exp":2527401600,"created":1564528272,"updated":1564528272,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '251' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '251' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name/20166f0199b14d72b73abfd7de4a766d + - api-version=7.0 + - '' - request: body: '{"contentType": "text/plain", "tags": {"foo": "updated tag"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '61' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PATCH uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name/?api-version=7.0 response: body: - string: '{"contentType":"text/plain","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43","attributes":{"enabled":true,"exp":2527401600,"created":1562687784,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"contentType":"text/plain","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d","attributes":{"enabled":true,"exp":2527401600,"created":1564528272,"updated":1564528273,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '284' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '284' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault29fe19b8.vault.azure.net/deletedsecrets/secret-name","deletedDate":1562687785,"scheduledPurgeDate":1570463785,"contentType":"text/plain","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43","attributes":{"enabled":true,"exp":2527401600,"created":1562687784,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"recoveryId":"https://vault29fe19b8.vault.azure.net/deletedsecrets/secret-name","deletedDate":1564528273,"scheduledPurgeDate":1572304273,"contentType":"text/plain","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d","attributes":{"enabled":true,"exp":2527401600,"created":1564528272,"updated":1564528273,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '421' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '421' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_list_operations.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_list_operations.yaml index a8f8117e3c14..d51d5f132c6f 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_list_operations.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_list_operations.yaml @@ -1,510 +1,453 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault2aad19c6.vault.azure.net/secrets/key0?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:12:01 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key0 + - api-version=7.0 + - '' - request: body: '{"value": "value0"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key0?api-version=7.0 response: body: - string: '{"value":"value0","id":"https://vault2aad19c6.vault.azure.net/secrets/key0/7b96a58d018e4599ab88e88b9572c2bf","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value0","id":"https://vault2aad19c6.vault.azure.net/secrets/key0/36914dd1657f4c27a5b0b018511debd4","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:01 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key0 + - api-version=7.0 + - '' - request: body: '{"value": "value1"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key1?api-version=7.0 response: body: - string: '{"value":"value1","id":"https://vault2aad19c6.vault.azure.net/secrets/key1/c83f87d170cb4436b96399150e087f63","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value1","id":"https://vault2aad19c6.vault.azure.net/secrets/key1/4ba6609ebc11430eb24e151319af2559","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key1 + - api-version=7.0 + - '' - request: body: '{"value": "value2"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key2?api-version=7.0 response: body: - string: '{"value":"value2","id":"https://vault2aad19c6.vault.azure.net/secrets/key2/5f6ee6ed44b044edb5a6f00fe7f9061d","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value2","id":"https://vault2aad19c6.vault.azure.net/secrets/key2/407135ffe3844dfda97b308d219da2bc","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key2 + - api-version=7.0 + - '' - request: body: '{"value": "value3"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key3?api-version=7.0 response: body: - string: '{"value":"value3","id":"https://vault2aad19c6.vault.azure.net/secrets/key3/39faf9645abe43a7afa4833e92ca1fff","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value3","id":"https://vault2aad19c6.vault.azure.net/secrets/key3/64057abdfdb845e49ba1693718fde7ae","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key3 + - api-version=7.0 + - '' - request: body: '{"value": "value4"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key4?api-version=7.0 response: body: - string: '{"value":"value4","id":"https://vault2aad19c6.vault.azure.net/secrets/key4/15315d867b184d72968338963ef8306c","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value4","id":"https://vault2aad19c6.vault.azure.net/secrets/key4/ec5f2a5b6971486e87bbb9a0c9c6ed5a","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key4 + - api-version=7.0 + - '' - request: body: '{"value": "value5"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key5?api-version=7.0 response: body: - string: '{"value":"value5","id":"https://vault2aad19c6.vault.azure.net/secrets/key5/e5301eed3f1d4dec927bf145794b0465","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value5","id":"https://vault2aad19c6.vault.azure.net/secrets/key5/22314f577cda4d898c295eaf427c83e6","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key5 + - api-version=7.0 + - '' - request: body: '{"value": "value6"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key6?api-version=7.0 response: body: - string: '{"value":"value6","id":"https://vault2aad19c6.vault.azure.net/secrets/key6/82158634aff74f8881ccef96e604a47b","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value6","id":"https://vault2aad19c6.vault.azure.net/secrets/key6/f78f624a3cb046c4927a84f599e6eeb1","attributes":{"enabled":true,"created":1564528323,"updated":1564528323,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault2aad19c6.vault.azure.net/secrets?api-version=7.0 response: body: - string: '{"value":[{"id":"https://vault2aad19c6.vault.azure.net/secrets/key0","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key1","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key2","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key3","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key4","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key5","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key6","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + string: '{"value":[{"id":"https://vault2aad19c6.vault.azure.net/secrets/key0","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key1","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key2","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key3","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key4","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key5","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key6","attributes":{"enabled":true,"created":1564528323,"updated":1564528323,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '1231' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '1231' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault2aad19c6.vault.azure.net/secrets/secret-name/versions?api-version=7.0 response: body: string: '{"value":[],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '28' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '28' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/secret-name/versions + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault2aad19c6.vault.azure.net/deletedsecrets?api-version=7.0 response: body: string: '{"value":[],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '28' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '28' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /deletedsecrets + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_backup_restore.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_backup_restore.yaml index 9f94d903ad43..28cbfb841c0e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_backup_restore.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_backup_restore.yaml @@ -1,254 +1,243 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault29db19b3.vault.azure.net/secrets/secret-name?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:12:51 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: '{"value": "secret-value"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '25' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault29db19b3.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"value":"secret-value","id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/16a8591563fc434f8ea6e2ed9a17d76b","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secret-value","id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/53a7c0e391b243b98ff0838306e5f101","attributes":{"enabled":true,"created":1564528371,"updated":1564528371,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '222' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '222' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:51 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault29db19b3.vault.azure.net/secrets/secret-name/backup?api-version=7.0 response: body: - string: '{"value":"KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLlJWZjNKWlg0WEpua3QyOGF5VUplTTdDNFBvMV9kYWRVZHVYbjlqUUF0MGFkdUJOeTcxTm5ZSEtXbmpOWW1kTWU2WXZMR2pUMGFFeXcwaWVSNWczMEZsNXI0MVFhaWFnZUNYbGxkNER2VGd2cmFxZ3BCY21WYVlXQkRhQm4wRm51SzV6Z2QweG1IUmhOamh1bks4aVZ6ZzRFN0RETHBNMlZiaVBkb09ZOEhSNVNlMUNHZUloRWpQMms0VkVtVzlPOWxKM2lHdTNLRk45SVVKVjE5TmVOOVo2bnJmOHhlOVhtdHRoZnlaUWhMdzdWQjM1WnlTd01pR2dsN2o2XzlTWnl4azkwbVFCUDhMLUVNbHVFZjhXNUlQckFIdXAyRHZydDZrSEo5RGdhX2RrVzExVy1UeVhzZW8xSGhHRWFrUkVBVExGckFuU2VFeTVRTjFFRzhHYk1Kdy40WmNsbDNmcHo4Tkw4SkhTUnRGRnFRLlhnUm9mbXBEX2YtVFpJRkxFWnJpQ2w2ZTA0OFN6THc5VGE0TkVCTDFGcW81ZjdYLU9uQjE3cURWOExabW5WRWhLNXZVVzktNHlPNS1CdGprR0xFV3c2QnZMZjlhd2NCcVhLUlYxeHI5RXBqWTN6UWpVTV9aQVI2YzdCbzVOMC1oQnNEbERiUU1iYVlSX2JxTTQ2LWtOMHdKX1FpbkRHSllzLWFZSC1BR2liOUlhdE9IbzlPdk1vVUtUckxkMGwtWDJrSlFTVUhvb1d5QmNKeExlZlBiMGNOamRtVk5uTlhFS1VCRy1nLU9IWDNPTUdSVmQ0amZiZFBIMGI3MGxvbWlLOEZRcFhpcUw2dXJxOG1zTGJrQlhSMnpjYVlNMmJWUU9DS1l3U0FLb0t0MWU0d0JXNUdvdnJHZnl3YVB1YzFyaUoxWmMwZFpyZk5WVGZaQVJ3bk1IMldsZkMxVm5GUm1hUThGQTZ2VnJrb3FVRVVYQzN3M011UVktaWk4UFVYMTAtWVV6RTdHN1RWWHFuN1l6a2s4NmdRdzdub1pDNGtNS1J6WS11OUQxYlVlYzEzdjg2SXJXZldVZWN2NldtLTlCWC1YenliS2djdVRTQ3ZUY1ZWdF9wSVdMZkpoMkZZb040ZWV5YThLRmZUV3BqZnc2ZmlpSUgzN0ZtVHJUYUt0X3dFdTV4MDd1WkUzdkJHV3BPWktrYmlsX1pGQUhJYWtMaS1yR0ZuTEp3cGJKV0pLSDZGM1VBYVE5anpBOVB1UnpxaVp2VWNHcUJDam9HUGphaF8zcWxsazZCLWZaQ0c2aERYRlpTei1WX1NGWkViNU0ydlA5Z3Y4OU03QjJOeXRpd1hZRzhhMFBlc2VSdXFGNkRNTXQ1SXJyY1g4TjZ5QlVDMF9Ya1hZT2Yxb2phM0xMeFZKUVEzdVdhRTJLbW0waEZla25hc0lLNzA2MjFRSUFncTNyel9YS3RNakU2MGpZT21UUWpNY3BNbFRBMzNTWjlwTTlRX3dEdFVXLTZualZOMXJla1huZEFFZzRJMTFsZkQzck42b1k1WTdHb0dBYW8tRWE2dkVkS0dfMlk5eGNUbEtiMHpyRWxtNk83TDd5ZGFVcGJBblNaRDVPdm84UHFFQUVzeWJwb1lCVnQ3dTFXRXFUQVBJa0ZrRC1sZWFaWHlnalViZFZPV1BaNEtnUlBrU0ZSakNxblhTTVpWcDQzaUh6ODVjTnRJSVVzMXVnNXVpU2dNS3ZpYW4zVTZjWkVEd1NkaTE1bFpDVGZ5ZmZmbUxyLURabFpTdWxEYjN5dk9DZmE1ajB5emRNOC1Jd0pWZUJJM2pZNXZJVWlYRnRuM2pTRC1CMERLaHliS2FsMGZ3NTV0T25zZzIyRFM1TnJ0TTgyWGw0SGF0ZG92Sm5OSGp0bVVYNFpxYTI2RmRzdmVraUdLQ2ZxWWdtbUZpX1dXaXphZU5rM3dzNTFOZmpCQTBKQnhORVBKeUFsZlcwN3NtbVhDdHZ5dDZ4Y3FtRVc0NXpQeWxNX21yazhoQ09HcnVlR3RENExGcURqTW1mT0Z5Mjc1eXlRTDNCU3lJOExfNktzblBaTGJtc0M1LU50ZzE4VjVRVmNkOVZQY0UzMlI5dTRUOHYxS1pqbXQ3S19tYmJGS2x2NkZEQ0lvRDJ4S015UzhFSURSd3VqbUotRTRiQWEzVlhtSmZ5MlpPaUVYNTJnZVlFVGswTUhqaWxlVzhsOWNaNHZJTzZnYVp1UW1kMEM3Zi02Umx3WG9jaWtYeWtCeWYxbU1Qakt4blYtWTRRenZObENmaU1fczNJdnUxUWRUUTRValh1OERDOTcxTk92VWJuNGJCVVN6NW1KY0FQRkQ4dGhVVXE2UFJnVW1WcVB2dlEtcFZiNmxNeUFxSDF1RWlpd240eFBwRWp2V2tmX2ltVGtBb2ZhTmNhdnYxcmpHS1ZrX0J1MmZINVlxWUZqSXFIQzJ3TE0tZzhhY3ZjMHk1MmM2MVpwcjc0aGxmSTc5WV9Oc1BwUng2RmI1XzUtbzVQZWw3Y0VOd05mZ0pPdTk4d3d3RGFSOUktLVJrUDJnTDloVVRsY0JYcUJRalpWZTR3aGVxT00yTW0ybmpIWEFIU0ZRSDZ1bHFvb0V3YXl1LXZ3d25ZU1lzX3Roa2RTQjJUZG5rY3VHbTRtQWxJSGM4YW5vU2prTnI5cklsSDc1M0dNNXJiM2ZHb3IzWm1kOGJ1RUExcmN2YlpmWFlkWjF1MmdlT0VZN2FwZWtUMFFIeHJtU1M4NFZnOXhMM2VHSl81cmVzcW5XYmJhVTdqZU44RTRlWGx6OUhiTzM5aGpuNVhsMkpsTWVLV0JnWTRvOG1lYmJNNG94QndRWkUxVGJPcThXSGRzSE9TQ2VHNmF6U2ZHSTAySUEzYmtEcUNSNjluVG1RbTY2NWM4LUxKc2NFT1dQSWoxX1c3bnUzY18ya1J4RDFHbDBtWFNIM1BRMl9qdE03bVpNSm9tdkdGemRlRUNZdWFVRlVPWjJ4Rnk4ZlU3Ulk2V2ZHUGFBeVF6Z0V3ajdnV3I0RUd4cFJ6d0tzUnI3NXJWd3ZtbE5XR1VtM1VLc01DTmwxckluc0lfd0I3Y184STU4S1hCbUk0dGNUdEF6MGNsd25RMDFIY2dod3BrbkhiRWZ3VVZybkhnNGRZdG1OeDE0T0J0QXFRTG5lMHVoSndyWTlrblN1Tlh1eWNENmt6d3JCQVVKSXgySXpvcXVENVhJRVV1UG55UFVlWDZiLU9BTmR4dTR1WGZBWFc0TWd2dHVDcnQ4VS13TlpMTkNBQjQ5eWRKSGItWUhVSlRWLXVKaTBQb0NzOWhCTzJWZkZDSUh6VERicGVXdk40bGFYRFNCc3dsdGdURXdIai1kcVBLUVl3aUpCcjk5akI2ekZZWVp1MkRtMXNuRjUtR0t1VUZyU2M5UTU4Mnk2a3ZLLS0zYXRwNUN5SlJRQkRqMnY1VnBmdWJCNmc4R3FpdGV4ZzAwaXJwc0c4TW11clNwTTRhQUF4SHMwV2xFQWtCZ18tTEZ2ODIzNGg0aFBzY1FVdnNaeTcySlJXTzVsdC1Ka0lQandZNC1pOV9CMXRzZmRlVlI5eGdzM2RHU1ZHSkpfQlcxQWhmUGppSndhWGFwOEFNRzFzYzJQQnBwQ0wxdk5admNDTzRHOWhkTEFsenNUaGtUaFE5M2YwWVhjTzRhNThNSGNpVjZaUlZOOTNXWVpsbzZxOFZBdWZuZ0t3b2sxd1d0ZVhLVk5DVk8tWjVBV05LMkp6Nmg0eW9FSmU0SGUweFQ5VlJISWU4V0MwSlpMVFZaaXZUY1ZyOXR1cFk1YVNBUFUzRi1hV3B1SzVfRFg4ZkdHX1kybnp2MmsycmtmcFNRMTdRR1lRQ2RMTUxDN3hRNHFEbUMzVGlKTVBGNDB1bGZBQ0hiZDh4RkdBV050LTl1MU5obE9aNGNPM1VhRlVOT0h2dEVFbHRRMUpkQzF6RVpSUGx3VFMxYTVJdkVWV2pockNoZnEwTG43Uk1XaktNOERQNjdfbDJ3MU9rd3VUM3VOejFpTnBZeUZSdEpORjh3NUxjYV9LTkdSVU50V3ZyZUVwU0k0UXlPY1V1REpLc0p1YjY4M2pmaVlHaUJXX0FyblRkS0x1cks3Nlc4UUQ5VFM1aTdWeHhockxwaGFvbkluMjVMMGxpeXJSRmt0UnNGT0JvSXY3LVoxd19tTmpRdXlrQU1DSTBZTG0tandkb3M2TllncXFUQktWS01YRGwzZTFhRUlOa2NEZ0gzcEg2MUNMZTR3c2hRSGl4X3FDQ21lbVBSN0l6T28wY1hzeHdKb21jS1J4bk56QTFKakZUenFJQUhTNm9GbHQ5LXJObU1Sb0ZpNTRlRkJDOFctLUw4QjFIVWVTYkF6WnU1MzFfbUJadWdRVUllV0NLQzJta1B5cjFhZFVYa1QwUTRQVjVlSVhmTWVWcHBPSnJGQ1dXSGJkelB5WkVtZ0psTFlsSGZBMXJ2Z2cyRTJMVDFfd1NzSEtMb2t2UWFNaTNSRUFmSEpINGRoUlZjOGlHM1RyUkFsZ0ZUSnZ4NVY3aXJzcW92RkVsQVhRY0w2UHB6OUJrVFhCcFlxRGhRNXhvS01vcDdrSkRmSXFscXZxWVo3NG15X0FNNDhMZ1AzQzhKMEFjMTJzNzFjR2gzel9QTWpnN282WE0ya21VX2dzT0llY2FTM0czMEtPdjNxSmFHVmk1QzVqTVpfQjUtMTJtZll2R2h0aGYzUVBqUl9PUmpWY3pxT2wxUUpqSEFqN29FU1R6dDQ2SEd6MFJnbG1mVFNVdFl1ODdNNmpfaFpwWktIUXB1RVpkaDViWXFpYjhJQWY1d3pvYl83RGNoRHU2WU5CbW1raHIweThEMlBuZmMyazlrRjhDbVVBaFZQX19YSng1eV9lbGJpTGhhWmh4N0V0UHVHaEdwX3FjNlI3c1laZmNwdGt1RUVxM043aWRDd24tYnpabDFObndMRGQ2MjhyLTNDdGlwVGJsMVNsRVdYX0h1Nk5oMTh1V0l0bmdXanNJcUt2RUlZV1hsSHlEN29meEhKaHAyWms2V2JRRTdfcWFDM3F1TnZmR2hjZHVmb1VkemxPMFdVanRVbm93TnRjamVsV1BMUVBTVE5yN1kuRmg3TzJVbHIyTzdzVVhJZ2FiY0dNdw"}' + string: '{"value":"KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLkhpSUhtRzluUXFhVUZXcnRlQ0Z1TEEwVV90YnlPczJ4TnN5YnBEUUR5SkltNWlKWVJmeUZhVFVlLXZsVFI1VDFxMm5SU3NFaHBnWkk4Z1ZBZ3ZmN3Q3Z0VDZVQ1RUVzRXZzTjFKS0lPc1JzeVlXRGVwWnU0U2pOQWtScHkxT0RfbnFmeWpCLXpqNUswaW9KVVJTS09Md0d2Tm1MUXlJZjZObUZFSE1CUEpVaXQ0OWpOYXNHYlphalhsYUk5Qjk0SERsVlI1bEFzYVNKMnlMM2JlRTBncGYyNUFLX3NDa1hFc1RFbFU2bmVnUjdjQjllUS1IWXNqY3dTaGVNWmM4cFdibE50cXFJZGhOMkpBYW1wR3J2dHc0VDRpd0UtTEVCUDJCaWt4TmctNWN6ajN5azdHSHpaSDJlOWhpak0tRDVGZ2VaMGhiZ19paHV5R0FlWDFmbHBCUS5SQ2Q5RUhTZ28yenlNbTJQZ04yUExBLlJLRkVyZnl1ck1MNGFHOUhKQ3pfc1U3ZUFOMnBTV1AwdWU2YzRGYU9XY2VGaDJDNUppVlBqOGFFRFVxaWFzNEJWVGd4Q2htbHNpMmpQd0V1SENGY3RqRHNSVzZtSGhINUJSZFFKUG94a0V3eEpGZi1PQ0poN3RPR21CczdIbWFOTGo2aGd3Skl3TnZPX0VsSGdhZTEwd2VqTWxTQ19WZDIzYWRiSGRuUXRCQWlVYTVydi0wOTdWRUdwWnpvMHN0a2w2QUFvcjYweXo3WWpWcWdKRm85X2t3TTFIcVY3bWtNSWJKUVhTSTI3YWpHYVBUdTcyZFpkUGdvX21la2FJaDRlSmVRZWlfMDZZeEtwSUZDTS1QaUxNSUpzWU12X2c5ZDJjbEQwQU8wWmNhaEhaeXZfOEZJS3g0RHpYV1E0bkNRS1dDeDh0Nlh6TmlBYnNsMk1OM2lFb3l3VUhma0w5WFNQYVJXZExJamo0SzY4eUpJU2R6aVhudDlaNS02VE9qYUdXdUtSQ0lvSlZOM2FHVUt3aXVBcEtDdkVSbXlNLXctaWNHZmNfZVFHUHNlNTZHQVR5dG02SFZ4OTlUYnpYUHJaeWtqY0tfT2ZlRVRHc0tzSkZZQmtWVE9UTXdJdDFid0JDT1ZuNEdkSndsWDd2eUx2RVRTOHIzM1lqNXo1OUZ5TnJ6QjBqamRaLXBPeFc3ZU9zRUl6MTFVcnMxYkJzcWpXcXV5bTdGdk42dktNdFp3cGgwYUoxMXNULVJkcHgtX3E2a1lsTWc1MHpVWlRYUnpPY0VzQktselNkRjROdUx4ZlFUUVd5UmtWdEQ4UlEyV2czV0JhaTZrZUFpOWpjdVNTN2F2VUw0ODZJMmlpTFJtOEItVG9vQnl2XzJOd0s4OTRlNjc4bTdna0ZtS0pwUUJhMVdOclU3cDV3SUJ0eUQ4RlYyRURYMjc5QThISzNCZnNNZ0NTUWxLdmUtRURzTzdOaTBTclRHN29RLVRVVWpIdmM0RHY4RkUxOW9Yc3VYMHd4dm9CczdRZ2k1eTV2Q2FYSmtMbGVHc3hSeGV1cUhaUE1STHZ0eVBvMEVoTUhSblMtbXp6WWVhcHh4V05VSUhRWFB6MDdLSDZiY1JOMkptbndnb2ZhcDdxYUNyV1l1OGNjLU0zM2N1UnlOc05pRDhWWV94WlhTdXZNT0RmWXo1VkpMX29JZlRjMEVCWDlOQm5ISlZ2Qk5KZ2lUemZXYWlRdE4wdlZ5elg4TjBoOXY3UXMzTENJbmp1aXczbzJSdThISEY1cDNubVhQbFFaOFVOUWdENlZTaXBQUzNwS1RGRF9fTjNDWUYxNzNobHo1ei1MRVFSX25LYTZjREQ5QXAxRkExZDRNX29JWFJvSktkV1JUV0pHdThXaG5OSWFDN0ZlNzlhWk9XYnJwTWlad1hfSUdUWHU5Y0dzYTljbHN4Q05yN2dmUnN4c3VJOGlNMDBTVHZHUkUya0t1RGRRT3JyOXRkMDFoQXhIZmh2cFYyc3lHRnVSTjA5aUc1YVc5Rlo1UnNoMGVybWl1c29WRUlwREMtYWZFbWNLa0l6WmJWb3NSZnktSF9BV3d4VWVMb3hnN3NuUFBmaE5SYTM4TU43bGdhOW43Mk1ZZzN4Zl91VWl2aEw5SWF6OFdRdHlTZzhMMnh1VmwxazZDTjZ3SF9JV09vVGljNzh2bk5qLXBoTU84cFFqYklaMnhueWRzdi1ZRTlFR1RjOHFFc2ozdEpXUVhOOFc1MC1CREtlLTZTMGxjRXdQQkM4cnVuQ19VVHJxc3MwSTd1Mmk0V3k5azBWSzdZb090UWhuTGc0MHJOZERubTdHUDg4R0JTamdvU2JTeURmQUNhRDREMXlJWFVqWG1vQ2pGZ1o3bUQxWTludk1YUFZjSWp2V3F2Ml9kUU15eXlkeDgxRnNEVVNyTE1sODZQYmlnSVlJV2NPY0FLSGdsWnRKTVZHNXZ6ZWNhUU93ek9iMEQyVGdKSmladndOa3MwWWpIQ0ZXa0xXTDZEcnB4b1lEVGRwUzNoWFhYSDRRN2VaOFV5M3U5MjFmWjQ4Z0JodEpDSVVtY2U5Q05EemttUHlKS0kyVkJiWDgxQUxkVzNyTVZlY0lheG1hOEdLNS1DbGFDcUVUWGpheU9yNFNxUW1ZWEI5YnFQeXlQZDVwSTZUVkJ3M2lYdWVSV2VxcDdjVnZ6UmE2YjhvTE1aSlFoR3JxX2VGOElMLVlnRE52NmRXLTlPRk5ad29TOGtRM3RUbGNLUXlIT05WUmVMWXhZNjRPM1ZVYm9iSXY0RzVaZUljV2VaS2NjN3I5ZVBMdTJrcllRbXIwRzd6Y2M4cUdfOWo2eHhDU2NIVlk1Zm1OcWxBRlMtcEcyM01mRW41aUNxdzA5R0c3bWY4a01qMThTZF9kbGw5RC1MbW1UWFZzYi1QMDVZSHBqTHB2TFFQYlZVSTQxRU5VVENnUFFpd2I3US15ODNJdm1IZ3IyVkdTRllrZm9wam5yVWMzM1VXTERnc1pDQzgwTGF3ZGxtZWxFYThDZ1FnVm5EeFJBZ0NMN1BmQWhyV0h1YkduZlQwbndyc1h1ZkRWa0llTkJfVjhrZTlPMXY5WVRlYkZiaFJvR0JBbC1ndHdCNlcyaXY1emxVR2dfcGdQUUlqdXgyMHRtNVZCVGlYbzBLV3ZidGdLVm51V2c5U1dUSnEzOWs1WnRieFpGX0M2NGNvSnlBOUE2TTlHRjlPMkd2WHVPd0lpU1JZazBySGNDMmpudkJwVzMxVjF4TDE3RE84NGpreVNUaF95WW1sSnBkd3VrSlJaNUJsOWpWTnI3bGFrNW15R3ZuTU5PS1NvejF3dXVBY1IyRFBSdEJXVFgzZUVraG9DaFR1V3ZwSmF0Ung2a1ZFTUY1eDcxLTBJMUlkZEJFYlhLM0pxSnJFVTVmTmZBdU9TMU0wSE5mLXNQZjFfZHpVY05vVkN1cUMza1pSSVViY3RwT1pORFBxd282amdyak92MWlOeGFtemZJWHVyZXJuSW5fcDV3OFRmSmUwZHIxTXVycTAwdHhEamxJR0lIMjJoQm9TYW1adkNYUktJYk00LUhiYzlmTlhudnZSRVROWjV6MlFqS2lieDBJd2tDWjZxVS1OTnBnZGN4SHZ4SGhJTWlieVBRWkxkS0t2ZHo4S01ucjNaUGVnWTAwTWx5VkpKY1BGRm1MMloyeVBzb25uT0tjd05lNUFpVkt1S0gwbTJyQmRZMXVzbGljaF9MZEdmbHdrMHA0TTBSaUZBaXluRWlqMl8tZTVjcWJoWFdXdGYyWUZGNmNZSF9OeVhYallIWGZQTllkNzlOV0d5dVk1N051WXk5ZllfY21WVVdPTVFnd1NWcW9qeC00NHEwRWlkTE1RLUVEcFduTlpPX0xaOWNSeTl6anhOSjR1cXRnY2Z4STNXX0ltTTRKbGNuOWJDMzA4WGJSM2dHVkl1OUdkeS13NERVcTFwVWVITGdQbFRfVFg0eVYtbHFRWHNTc0ZkSkZLbzlic3NUS0V1dGNBQTZKRzcwOUJCSkdoMDFIT3BpUFFPWTYzSmNoMFBiSXZubmxmeXc3M2tCWU40MWJMTGxRUnV5dXA4emtzOFVvVW5uT3ZIb2xveE0wQ3VlX0owTmZBdExtU0xEWHozVHUxeDV0RGVJdjlHcDBheUlJZy1wcHZ6RzNMb3pnQUowUjVrMzNkeG9udjVxVFI2MXhnc2JaNUZZT0ljMXBqTVgwQUU4WVZLMGpVcTZ3QzlnTnRDN0M5LXg1cW56Z0pjdHQwbkRHV3NFdElnX3J6SFJhdlFpNlF1SGJIS3doOTBBekVVems5VXFPWjdnTjVoa2FvVkprVFdYZlhTc3B0Zml6WGU2MDFfMlFKNkhtUG1FbGJSeFRCbU1janhiSDE1SDJCcHR6bHdxVWJhSlB3MWd4Q2h1LTNGWC04S3RaY25DaGNrOXBya3VCaEl4czdVaDdDYjE0T1VjVExlcjZGVHZaa3FLczBhcXJPZGpZaDBVeFE1amRIQTc5TDJrMFF1enNYWkNfZXA4YkJQa094RzRCUGpaN2ZSVkRPcjdaaFlRenRQbnpHZXo1eFJoVGhEWWU5eEZTTkRsM1pqXzYyNzduMXllNFAwLU54V3ZTWExFc1ZJUzVabVNYd25KOUpjX3YwTWRkMjliZno4aXFBSVpXX2QzakNsWVBzWG0tMlNzTjBkYnJ0TG5NUzNkOXV0cC13blRfRDN4Qmc2R000MGZSZzFnaG5uM3dhWnB6YzU0T2xORDNZR2RnclQtc3dNY1NwcExiM0FRZEVSQVFycjFSUXJNUHczaUpEdlVKdFFyVElTMHJpRE5rb2kyMFJHQjMzYUtRR2VSZkt0ZldOUFJmSGh5Z0lTdUpWLVZqdHZHT2dWTFAyZ0RUZGNMZ1VQX19kNUxlUzllWEFiaUZWVUJyOWhhdTNzVnFYazR1QWE1QkZRaFlTQWVyN3RxclZGbGRhM1N5UURSU0dETWtyaksyZHFlVlVpTHRYTnJ3VHRfQ01iLXd3LWhhTDcyTmZSaEQtYkpoS2s3X1JIM09GQV9DaDZnaUZQUDBzTzF3a0t6NHNJelhQQ0pUY0pTMTZFNV9sSkkxTGtHOGVfMFItMEk1ejk2blVKRS1RTDQuMktGazBXd2JUdVBadHJMMnFRSXF4QQ"}' headers: - cache-control: - - no-cache - content-length: - - '5406' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '5406' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:51 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/secret-name/backup + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault29db19b3.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/16a8591563fc434f8ea6e2ed9a17d76b","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Purgeable"}}' + string: '{"id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/53a7c0e391b243b98ff0838306e5f101","attributes":{"enabled":true,"created":1564528371,"updated":1564528371,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '199' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '199' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:52 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault29db19b3.vault.azure.net/secrets/secret-name/?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret-name"}}' headers: - cache-control: - - no-cache - content-length: - - '77' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '77' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:52 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/secret-name/ + - api-version=7.0 + - '' - request: - body: '{"value": "KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLlJWZjNKWlg0WEpua3QyOGF5VUplTTdDNFBvMV9kYWRVZHVYbjlqUUF0MGFkdUJOeTcxTm5ZSEtXbmpOWW1kTWU2WXZMR2pUMGFFeXcwaWVSNWczMEZsNXI0MVFhaWFnZUNYbGxkNER2VGd2cmFxZ3BCY21WYVlXQkRhQm4wRm51SzV6Z2QweG1IUmhOamh1bks4aVZ6ZzRFN0RETHBNMlZiaVBkb09ZOEhSNVNlMUNHZUloRWpQMms0VkVtVzlPOWxKM2lHdTNLRk45SVVKVjE5TmVOOVo2bnJmOHhlOVhtdHRoZnlaUWhMdzdWQjM1WnlTd01pR2dsN2o2XzlTWnl4azkwbVFCUDhMLUVNbHVFZjhXNUlQckFIdXAyRHZydDZrSEo5RGdhX2RrVzExVy1UeVhzZW8xSGhHRWFrUkVBVExGckFuU2VFeTVRTjFFRzhHYk1Kdy40WmNsbDNmcHo4Tkw4SkhTUnRGRnFRLlhnUm9mbXBEX2YtVFpJRkxFWnJpQ2w2ZTA0OFN6THc5VGE0TkVCTDFGcW81ZjdYLU9uQjE3cURWOExabW5WRWhLNXZVVzktNHlPNS1CdGprR0xFV3c2QnZMZjlhd2NCcVhLUlYxeHI5RXBqWTN6UWpVTV9aQVI2YzdCbzVOMC1oQnNEbERiUU1iYVlSX2JxTTQ2LWtOMHdKX1FpbkRHSllzLWFZSC1BR2liOUlhdE9IbzlPdk1vVUtUckxkMGwtWDJrSlFTVUhvb1d5QmNKeExlZlBiMGNOamRtVk5uTlhFS1VCRy1nLU9IWDNPTUdSVmQ0amZiZFBIMGI3MGxvbWlLOEZRcFhpcUw2dXJxOG1zTGJrQlhSMnpjYVlNMmJWUU9DS1l3U0FLb0t0MWU0d0JXNUdvdnJHZnl3YVB1YzFyaUoxWmMwZFpyZk5WVGZaQVJ3bk1IMldsZkMxVm5GUm1hUThGQTZ2VnJrb3FVRVVYQzN3M011UVktaWk4UFVYMTAtWVV6RTdHN1RWWHFuN1l6a2s4NmdRdzdub1pDNGtNS1J6WS11OUQxYlVlYzEzdjg2SXJXZldVZWN2NldtLTlCWC1YenliS2djdVRTQ3ZUY1ZWdF9wSVdMZkpoMkZZb040ZWV5YThLRmZUV3BqZnc2ZmlpSUgzN0ZtVHJUYUt0X3dFdTV4MDd1WkUzdkJHV3BPWktrYmlsX1pGQUhJYWtMaS1yR0ZuTEp3cGJKV0pLSDZGM1VBYVE5anpBOVB1UnpxaVp2VWNHcUJDam9HUGphaF8zcWxsazZCLWZaQ0c2aERYRlpTei1WX1NGWkViNU0ydlA5Z3Y4OU03QjJOeXRpd1hZRzhhMFBlc2VSdXFGNkRNTXQ1SXJyY1g4TjZ5QlVDMF9Ya1hZT2Yxb2phM0xMeFZKUVEzdVdhRTJLbW0waEZla25hc0lLNzA2MjFRSUFncTNyel9YS3RNakU2MGpZT21UUWpNY3BNbFRBMzNTWjlwTTlRX3dEdFVXLTZualZOMXJla1huZEFFZzRJMTFsZkQzck42b1k1WTdHb0dBYW8tRWE2dkVkS0dfMlk5eGNUbEtiMHpyRWxtNk83TDd5ZGFVcGJBblNaRDVPdm84UHFFQUVzeWJwb1lCVnQ3dTFXRXFUQVBJa0ZrRC1sZWFaWHlnalViZFZPV1BaNEtnUlBrU0ZSakNxblhTTVpWcDQzaUh6ODVjTnRJSVVzMXVnNXVpU2dNS3ZpYW4zVTZjWkVEd1NkaTE1bFpDVGZ5ZmZmbUxyLURabFpTdWxEYjN5dk9DZmE1ajB5emRNOC1Jd0pWZUJJM2pZNXZJVWlYRnRuM2pTRC1CMERLaHliS2FsMGZ3NTV0T25zZzIyRFM1TnJ0TTgyWGw0SGF0ZG92Sm5OSGp0bVVYNFpxYTI2RmRzdmVraUdLQ2ZxWWdtbUZpX1dXaXphZU5rM3dzNTFOZmpCQTBKQnhORVBKeUFsZlcwN3NtbVhDdHZ5dDZ4Y3FtRVc0NXpQeWxNX21yazhoQ09HcnVlR3RENExGcURqTW1mT0Z5Mjc1eXlRTDNCU3lJOExfNktzblBaTGJtc0M1LU50ZzE4VjVRVmNkOVZQY0UzMlI5dTRUOHYxS1pqbXQ3S19tYmJGS2x2NkZEQ0lvRDJ4S015UzhFSURSd3VqbUotRTRiQWEzVlhtSmZ5MlpPaUVYNTJnZVlFVGswTUhqaWxlVzhsOWNaNHZJTzZnYVp1UW1kMEM3Zi02Umx3WG9jaWtYeWtCeWYxbU1Qakt4blYtWTRRenZObENmaU1fczNJdnUxUWRUUTRValh1OERDOTcxTk92VWJuNGJCVVN6NW1KY0FQRkQ4dGhVVXE2UFJnVW1WcVB2dlEtcFZiNmxNeUFxSDF1RWlpd240eFBwRWp2V2tmX2ltVGtBb2ZhTmNhdnYxcmpHS1ZrX0J1MmZINVlxWUZqSXFIQzJ3TE0tZzhhY3ZjMHk1MmM2MVpwcjc0aGxmSTc5WV9Oc1BwUng2RmI1XzUtbzVQZWw3Y0VOd05mZ0pPdTk4d3d3RGFSOUktLVJrUDJnTDloVVRsY0JYcUJRalpWZTR3aGVxT00yTW0ybmpIWEFIU0ZRSDZ1bHFvb0V3YXl1LXZ3d25ZU1lzX3Roa2RTQjJUZG5rY3VHbTRtQWxJSGM4YW5vU2prTnI5cklsSDc1M0dNNXJiM2ZHb3IzWm1kOGJ1RUExcmN2YlpmWFlkWjF1MmdlT0VZN2FwZWtUMFFIeHJtU1M4NFZnOXhMM2VHSl81cmVzcW5XYmJhVTdqZU44RTRlWGx6OUhiTzM5aGpuNVhsMkpsTWVLV0JnWTRvOG1lYmJNNG94QndRWkUxVGJPcThXSGRzSE9TQ2VHNmF6U2ZHSTAySUEzYmtEcUNSNjluVG1RbTY2NWM4LUxKc2NFT1dQSWoxX1c3bnUzY18ya1J4RDFHbDBtWFNIM1BRMl9qdE03bVpNSm9tdkdGemRlRUNZdWFVRlVPWjJ4Rnk4ZlU3Ulk2V2ZHUGFBeVF6Z0V3ajdnV3I0RUd4cFJ6d0tzUnI3NXJWd3ZtbE5XR1VtM1VLc01DTmwxckluc0lfd0I3Y184STU4S1hCbUk0dGNUdEF6MGNsd25RMDFIY2dod3BrbkhiRWZ3VVZybkhnNGRZdG1OeDE0T0J0QXFRTG5lMHVoSndyWTlrblN1Tlh1eWNENmt6d3JCQVVKSXgySXpvcXVENVhJRVV1UG55UFVlWDZiLU9BTmR4dTR1WGZBWFc0TWd2dHVDcnQ4VS13TlpMTkNBQjQ5eWRKSGItWUhVSlRWLXVKaTBQb0NzOWhCTzJWZkZDSUh6VERicGVXdk40bGFYRFNCc3dsdGdURXdIai1kcVBLUVl3aUpCcjk5akI2ekZZWVp1MkRtMXNuRjUtR0t1VUZyU2M5UTU4Mnk2a3ZLLS0zYXRwNUN5SlJRQkRqMnY1VnBmdWJCNmc4R3FpdGV4ZzAwaXJwc0c4TW11clNwTTRhQUF4SHMwV2xFQWtCZ18tTEZ2ODIzNGg0aFBzY1FVdnNaeTcySlJXTzVsdC1Ka0lQandZNC1pOV9CMXRzZmRlVlI5eGdzM2RHU1ZHSkpfQlcxQWhmUGppSndhWGFwOEFNRzFzYzJQQnBwQ0wxdk5admNDTzRHOWhkTEFsenNUaGtUaFE5M2YwWVhjTzRhNThNSGNpVjZaUlZOOTNXWVpsbzZxOFZBdWZuZ0t3b2sxd1d0ZVhLVk5DVk8tWjVBV05LMkp6Nmg0eW9FSmU0SGUweFQ5VlJISWU4V0MwSlpMVFZaaXZUY1ZyOXR1cFk1YVNBUFUzRi1hV3B1SzVfRFg4ZkdHX1kybnp2MmsycmtmcFNRMTdRR1lRQ2RMTUxDN3hRNHFEbUMzVGlKTVBGNDB1bGZBQ0hiZDh4RkdBV050LTl1MU5obE9aNGNPM1VhRlVOT0h2dEVFbHRRMUpkQzF6RVpSUGx3VFMxYTVJdkVWV2pockNoZnEwTG43Uk1XaktNOERQNjdfbDJ3MU9rd3VUM3VOejFpTnBZeUZSdEpORjh3NUxjYV9LTkdSVU50V3ZyZUVwU0k0UXlPY1V1REpLc0p1YjY4M2pmaVlHaUJXX0FyblRkS0x1cks3Nlc4UUQ5VFM1aTdWeHhockxwaGFvbkluMjVMMGxpeXJSRmt0UnNGT0JvSXY3LVoxd19tTmpRdXlrQU1DSTBZTG0tandkb3M2TllncXFUQktWS01YRGwzZTFhRUlOa2NEZ0gzcEg2MUNMZTR3c2hRSGl4X3FDQ21lbVBSN0l6T28wY1hzeHdKb21jS1J4bk56QTFKakZUenFJQUhTNm9GbHQ5LXJObU1Sb0ZpNTRlRkJDOFctLUw4QjFIVWVTYkF6WnU1MzFfbUJadWdRVUllV0NLQzJta1B5cjFhZFVYa1QwUTRQVjVlSVhmTWVWcHBPSnJGQ1dXSGJkelB5WkVtZ0psTFlsSGZBMXJ2Z2cyRTJMVDFfd1NzSEtMb2t2UWFNaTNSRUFmSEpINGRoUlZjOGlHM1RyUkFsZ0ZUSnZ4NVY3aXJzcW92RkVsQVhRY0w2UHB6OUJrVFhCcFlxRGhRNXhvS01vcDdrSkRmSXFscXZxWVo3NG15X0FNNDhMZ1AzQzhKMEFjMTJzNzFjR2gzel9QTWpnN282WE0ya21VX2dzT0llY2FTM0czMEtPdjNxSmFHVmk1QzVqTVpfQjUtMTJtZll2R2h0aGYzUVBqUl9PUmpWY3pxT2wxUUpqSEFqN29FU1R6dDQ2SEd6MFJnbG1mVFNVdFl1ODdNNmpfaFpwWktIUXB1RVpkaDViWXFpYjhJQWY1d3pvYl83RGNoRHU2WU5CbW1raHIweThEMlBuZmMyazlrRjhDbVVBaFZQX19YSng1eV9lbGJpTGhhWmh4N0V0UHVHaEdwX3FjNlI3c1laZmNwdGt1RUVxM043aWRDd24tYnpabDFObndMRGQ2MjhyLTNDdGlwVGJsMVNsRVdYX0h1Nk5oMTh1V0l0bmdXanNJcUt2RUlZV1hsSHlEN29meEhKaHAyWms2V2JRRTdfcWFDM3F1TnZmR2hjZHVmb1VkemxPMFdVanRVbm93TnRjamVsV1BMUVBTVE5yN1kuRmg3TzJVbHIyTzdzVVhJZ2FiY0dNdw"}' + body: '{"value": "KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLkhpSUhtRzluUXFhVUZXcnRlQ0Z1TEEwVV90YnlPczJ4TnN5YnBEUUR5SkltNWlKWVJmeUZhVFVlLXZsVFI1VDFxMm5SU3NFaHBnWkk4Z1ZBZ3ZmN3Q3Z0VDZVQ1RUVzRXZzTjFKS0lPc1JzeVlXRGVwWnU0U2pOQWtScHkxT0RfbnFmeWpCLXpqNUswaW9KVVJTS09Md0d2Tm1MUXlJZjZObUZFSE1CUEpVaXQ0OWpOYXNHYlphalhsYUk5Qjk0SERsVlI1bEFzYVNKMnlMM2JlRTBncGYyNUFLX3NDa1hFc1RFbFU2bmVnUjdjQjllUS1IWXNqY3dTaGVNWmM4cFdibE50cXFJZGhOMkpBYW1wR3J2dHc0VDRpd0UtTEVCUDJCaWt4TmctNWN6ajN5azdHSHpaSDJlOWhpak0tRDVGZ2VaMGhiZ19paHV5R0FlWDFmbHBCUS5SQ2Q5RUhTZ28yenlNbTJQZ04yUExBLlJLRkVyZnl1ck1MNGFHOUhKQ3pfc1U3ZUFOMnBTV1AwdWU2YzRGYU9XY2VGaDJDNUppVlBqOGFFRFVxaWFzNEJWVGd4Q2htbHNpMmpQd0V1SENGY3RqRHNSVzZtSGhINUJSZFFKUG94a0V3eEpGZi1PQ0poN3RPR21CczdIbWFOTGo2aGd3Skl3TnZPX0VsSGdhZTEwd2VqTWxTQ19WZDIzYWRiSGRuUXRCQWlVYTVydi0wOTdWRUdwWnpvMHN0a2w2QUFvcjYweXo3WWpWcWdKRm85X2t3TTFIcVY3bWtNSWJKUVhTSTI3YWpHYVBUdTcyZFpkUGdvX21la2FJaDRlSmVRZWlfMDZZeEtwSUZDTS1QaUxNSUpzWU12X2c5ZDJjbEQwQU8wWmNhaEhaeXZfOEZJS3g0RHpYV1E0bkNRS1dDeDh0Nlh6TmlBYnNsMk1OM2lFb3l3VUhma0w5WFNQYVJXZExJamo0SzY4eUpJU2R6aVhudDlaNS02VE9qYUdXdUtSQ0lvSlZOM2FHVUt3aXVBcEtDdkVSbXlNLXctaWNHZmNfZVFHUHNlNTZHQVR5dG02SFZ4OTlUYnpYUHJaeWtqY0tfT2ZlRVRHc0tzSkZZQmtWVE9UTXdJdDFid0JDT1ZuNEdkSndsWDd2eUx2RVRTOHIzM1lqNXo1OUZ5TnJ6QjBqamRaLXBPeFc3ZU9zRUl6MTFVcnMxYkJzcWpXcXV5bTdGdk42dktNdFp3cGgwYUoxMXNULVJkcHgtX3E2a1lsTWc1MHpVWlRYUnpPY0VzQktselNkRjROdUx4ZlFUUVd5UmtWdEQ4UlEyV2czV0JhaTZrZUFpOWpjdVNTN2F2VUw0ODZJMmlpTFJtOEItVG9vQnl2XzJOd0s4OTRlNjc4bTdna0ZtS0pwUUJhMVdOclU3cDV3SUJ0eUQ4RlYyRURYMjc5QThISzNCZnNNZ0NTUWxLdmUtRURzTzdOaTBTclRHN29RLVRVVWpIdmM0RHY4RkUxOW9Yc3VYMHd4dm9CczdRZ2k1eTV2Q2FYSmtMbGVHc3hSeGV1cUhaUE1STHZ0eVBvMEVoTUhSblMtbXp6WWVhcHh4V05VSUhRWFB6MDdLSDZiY1JOMkptbndnb2ZhcDdxYUNyV1l1OGNjLU0zM2N1UnlOc05pRDhWWV94WlhTdXZNT0RmWXo1VkpMX29JZlRjMEVCWDlOQm5ISlZ2Qk5KZ2lUemZXYWlRdE4wdlZ5elg4TjBoOXY3UXMzTENJbmp1aXczbzJSdThISEY1cDNubVhQbFFaOFVOUWdENlZTaXBQUzNwS1RGRF9fTjNDWUYxNzNobHo1ei1MRVFSX25LYTZjREQ5QXAxRkExZDRNX29JWFJvSktkV1JUV0pHdThXaG5OSWFDN0ZlNzlhWk9XYnJwTWlad1hfSUdUWHU5Y0dzYTljbHN4Q05yN2dmUnN4c3VJOGlNMDBTVHZHUkUya0t1RGRRT3JyOXRkMDFoQXhIZmh2cFYyc3lHRnVSTjA5aUc1YVc5Rlo1UnNoMGVybWl1c29WRUlwREMtYWZFbWNLa0l6WmJWb3NSZnktSF9BV3d4VWVMb3hnN3NuUFBmaE5SYTM4TU43bGdhOW43Mk1ZZzN4Zl91VWl2aEw5SWF6OFdRdHlTZzhMMnh1VmwxazZDTjZ3SF9JV09vVGljNzh2bk5qLXBoTU84cFFqYklaMnhueWRzdi1ZRTlFR1RjOHFFc2ozdEpXUVhOOFc1MC1CREtlLTZTMGxjRXdQQkM4cnVuQ19VVHJxc3MwSTd1Mmk0V3k5azBWSzdZb090UWhuTGc0MHJOZERubTdHUDg4R0JTamdvU2JTeURmQUNhRDREMXlJWFVqWG1vQ2pGZ1o3bUQxWTludk1YUFZjSWp2V3F2Ml9kUU15eXlkeDgxRnNEVVNyTE1sODZQYmlnSVlJV2NPY0FLSGdsWnRKTVZHNXZ6ZWNhUU93ek9iMEQyVGdKSmladndOa3MwWWpIQ0ZXa0xXTDZEcnB4b1lEVGRwUzNoWFhYSDRRN2VaOFV5M3U5MjFmWjQ4Z0JodEpDSVVtY2U5Q05EemttUHlKS0kyVkJiWDgxQUxkVzNyTVZlY0lheG1hOEdLNS1DbGFDcUVUWGpheU9yNFNxUW1ZWEI5YnFQeXlQZDVwSTZUVkJ3M2lYdWVSV2VxcDdjVnZ6UmE2YjhvTE1aSlFoR3JxX2VGOElMLVlnRE52NmRXLTlPRk5ad29TOGtRM3RUbGNLUXlIT05WUmVMWXhZNjRPM1ZVYm9iSXY0RzVaZUljV2VaS2NjN3I5ZVBMdTJrcllRbXIwRzd6Y2M4cUdfOWo2eHhDU2NIVlk1Zm1OcWxBRlMtcEcyM01mRW41aUNxdzA5R0c3bWY4a01qMThTZF9kbGw5RC1MbW1UWFZzYi1QMDVZSHBqTHB2TFFQYlZVSTQxRU5VVENnUFFpd2I3US15ODNJdm1IZ3IyVkdTRllrZm9wam5yVWMzM1VXTERnc1pDQzgwTGF3ZGxtZWxFYThDZ1FnVm5EeFJBZ0NMN1BmQWhyV0h1YkduZlQwbndyc1h1ZkRWa0llTkJfVjhrZTlPMXY5WVRlYkZiaFJvR0JBbC1ndHdCNlcyaXY1emxVR2dfcGdQUUlqdXgyMHRtNVZCVGlYbzBLV3ZidGdLVm51V2c5U1dUSnEzOWs1WnRieFpGX0M2NGNvSnlBOUE2TTlHRjlPMkd2WHVPd0lpU1JZazBySGNDMmpudkJwVzMxVjF4TDE3RE84NGpreVNUaF95WW1sSnBkd3VrSlJaNUJsOWpWTnI3bGFrNW15R3ZuTU5PS1NvejF3dXVBY1IyRFBSdEJXVFgzZUVraG9DaFR1V3ZwSmF0Ung2a1ZFTUY1eDcxLTBJMUlkZEJFYlhLM0pxSnJFVTVmTmZBdU9TMU0wSE5mLXNQZjFfZHpVY05vVkN1cUMza1pSSVViY3RwT1pORFBxd282amdyak92MWlOeGFtemZJWHVyZXJuSW5fcDV3OFRmSmUwZHIxTXVycTAwdHhEamxJR0lIMjJoQm9TYW1adkNYUktJYk00LUhiYzlmTlhudnZSRVROWjV6MlFqS2lieDBJd2tDWjZxVS1OTnBnZGN4SHZ4SGhJTWlieVBRWkxkS0t2ZHo4S01ucjNaUGVnWTAwTWx5VkpKY1BGRm1MMloyeVBzb25uT0tjd05lNUFpVkt1S0gwbTJyQmRZMXVzbGljaF9MZEdmbHdrMHA0TTBSaUZBaXluRWlqMl8tZTVjcWJoWFdXdGYyWUZGNmNZSF9OeVhYallIWGZQTllkNzlOV0d5dVk1N051WXk5ZllfY21WVVdPTVFnd1NWcW9qeC00NHEwRWlkTE1RLUVEcFduTlpPX0xaOWNSeTl6anhOSjR1cXRnY2Z4STNXX0ltTTRKbGNuOWJDMzA4WGJSM2dHVkl1OUdkeS13NERVcTFwVWVITGdQbFRfVFg0eVYtbHFRWHNTc0ZkSkZLbzlic3NUS0V1dGNBQTZKRzcwOUJCSkdoMDFIT3BpUFFPWTYzSmNoMFBiSXZubmxmeXc3M2tCWU40MWJMTGxRUnV5dXA4emtzOFVvVW5uT3ZIb2xveE0wQ3VlX0owTmZBdExtU0xEWHozVHUxeDV0RGVJdjlHcDBheUlJZy1wcHZ6RzNMb3pnQUowUjVrMzNkeG9udjVxVFI2MXhnc2JaNUZZT0ljMXBqTVgwQUU4WVZLMGpVcTZ3QzlnTnRDN0M5LXg1cW56Z0pjdHQwbkRHV3NFdElnX3J6SFJhdlFpNlF1SGJIS3doOTBBekVVems5VXFPWjdnTjVoa2FvVkprVFdYZlhTc3B0Zml6WGU2MDFfMlFKNkhtUG1FbGJSeFRCbU1janhiSDE1SDJCcHR6bHdxVWJhSlB3MWd4Q2h1LTNGWC04S3RaY25DaGNrOXBya3VCaEl4czdVaDdDYjE0T1VjVExlcjZGVHZaa3FLczBhcXJPZGpZaDBVeFE1amRIQTc5TDJrMFF1enNYWkNfZXA4YkJQa094RzRCUGpaN2ZSVkRPcjdaaFlRenRQbnpHZXo1eFJoVGhEWWU5eEZTTkRsM1pqXzYyNzduMXllNFAwLU54V3ZTWExFc1ZJUzVabVNYd25KOUpjX3YwTWRkMjliZno4aXFBSVpXX2QzakNsWVBzWG0tMlNzTjBkYnJ0TG5NUzNkOXV0cC13blRfRDN4Qmc2R000MGZSZzFnaG5uM3dhWnB6YzU0T2xORDNZR2RnclQtc3dNY1NwcExiM0FRZEVSQVFycjFSUXJNUHczaUpEdlVKdFFyVElTMHJpRE5rb2kyMFJHQjMzYUtRR2VSZkt0ZldOUFJmSGh5Z0lTdUpWLVZqdHZHT2dWTFAyZ0RUZGNMZ1VQX19kNUxlUzllWEFiaUZWVUJyOWhhdTNzVnFYazR1QWE1QkZRaFlTQWVyN3RxclZGbGRhM1N5UURSU0dETWtyaksyZHFlVlVpTHRYTnJ3VHRfQ01iLXd3LWhhTDcyTmZSaEQtYkpoS2s3X1JIM09GQV9DaDZnaUZQUDBzTzF3a0t6NHNJelhQQ0pUY0pTMTZFNV9sSkkxTGtHOGVfMFItMEk1ejk2blVKRS1RTDQuMktGazBXd2JUdVBadHJMMnFRSXF4QQ"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '5407' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault29db19b3.vault.azure.net/secrets/restore?api-version=7.0 response: body: - string: '{"id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/16a8591563fc434f8ea6e2ed9a17d76b","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Purgeable"}}' + string: '{"id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/53a7c0e391b243b98ff0838306e5f101","attributes":{"enabled":true,"created":1564528371,"updated":1564528371,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '199' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '199' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:52 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/restore + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_recover.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_recover.yaml index c42445d00a55..8936cbf3e59b 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_recover.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_recover.yaml @@ -1,117 +1,134 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault7f7a16d0.vault.azure.net/secrets/secret-name?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:13:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: '{"value": "secret-value"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '25' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault7f7a16d0.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"value":"secret-value","id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/387abddfcc2c4b7eb4a4604d274a39cb","attributes":{"enabled":true,"created":1562687832,"updated":1562687832,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"secret-value","id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/731695cfdc604c60809900f0dded0c26","attributes":{"enabled":true,"created":1564528411,"updated":1564528411,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '234' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:12 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '234' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault7f7a16d0.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1562687832,"scheduledPurgeDate":1570463832,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/387abddfcc2c4b7eb4a4604d274a39cb","attributes":{"enabled":true,"created":1562687832,"updated":1562687832,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1564528411,"scheduledPurgeDate":1572304411,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/731695cfdc604c60809900f0dded0c26","attributes":{"enabled":true,"created":1564528411,"updated":1564528411,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '348' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:12 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '348' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 response: @@ -119,48 +136,38 @@ interactions: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: secret-name"}}' headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:12 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 response: @@ -168,48 +175,38 @@ interactions: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: secret-name"}}' headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:15 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:34 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 response: @@ -217,181 +214,338 @@ interactions: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: secret-name"}}' headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:37 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1562687832,"scheduledPurgeDate":1570463832,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/387abddfcc2c4b7eb4a4604d274a39cb","attributes":{"enabled":true,"created":1562687832,"updated":1562687832,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: + secret-name"}}' headers: - cache-control: - - no-cache - content-length: - - '348' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:40 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: + secret-name"}}' + headers: + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:43 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: + secret-name"}}' + headers: + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: + secret-name"}}' + headers: + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: + secret-name"}}' + headers: + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:52 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 + response: + body: + string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1564528411,"scheduledPurgeDate":1572304411,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/731695cfdc604c60809900f0dded0c26","attributes":{"enabled":true,"created":1564528411,"updated":1564528411,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '348' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:55 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1562687832,"scheduledPurgeDate":1570463832,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/387abddfcc2c4b7eb4a4604d274a39cb","attributes":{"enabled":true,"created":1562687832,"updated":1562687832,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1564528411,"scheduledPurgeDate":1572304411,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/731695cfdc604c60809900f0dded0c26","attributes":{"enabled":true,"created":1564528411,"updated":1564528411,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '348' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '348' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:55 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name/recover?api-version=7.0 response: body: - string: '{"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/387abddfcc2c4b7eb4a4604d274a39cb","attributes":{"enabled":true,"created":1562687832,"updated":1562687832,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/731695cfdc604c60809900f0dded0c26","attributes":{"enabled":true,"created":1564528411,"updated":1564528411,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '211' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '211' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:56 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name/recover + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_backup_restore.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_backup_restore.yaml index b6c8060bf441..90c8d9b81ab1 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_backup_restore.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_backup_restore.yaml @@ -1,206 +1,205 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:14:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f60fbc.vault.azure.net + - /secrets/secbak32f60fbc + - api-version=7.0 + - '' - request: body: '{"value": "secVal32f60fbc"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc?api-version=7.0 response: body: - string: '{"value":"secVal32f60fbc","id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/8968fbea165844c6ba86c8774431bfd2","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal32f60fbc","id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/778d727d3bae4014a6285fdaad85736f","attributes":{"enabled":true,"created":1564528490,"updated":1564528490,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '227' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '227' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:14:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f60fbc.vault.azure.net + - /secrets/secbak32f60fbc + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/backup?api-version=7.0 response: body: - string: '{"value":"KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmZENXM5Qkl4M3FfWWd4OHAteWRFVXF1SDRqRWUxalhCZUczbkh2WFZtaHQtaXZXWnZaLUpGV2hKTGg3SmJkOGhMTlJzSnJ0OGtJeEVENW1rNnc3blpkVDRiRUIzRWlVdkx0eE9UakpsX1JwdWxhTDhabmY4a1B4RHdsSzh3VWpTX3hSTjI0Y2M3WU1KR2o1aHUxT29oZXJHT2FzRmthM2w3ek1ZMlVWVFFFck5GLXlyOHkyYnd1WW9HNGpUSGtNZkN5OWZ1OEMwdHcyRWVwWlNGdl9aMk94bjY3aVZLTDU2LTZybVhRZnBMYmhic2t3QTRUaGJiRl8yRlhXZTg2a2s3NEp2cjJzazczMVFkTGdWNGc2TFlpV2lISmR4aXdKOEsyZ01BX2RXLVBMZHA3N2d4endzTk1Tb2hHeVFLbU15M3ltVFRkMHRjS0g2VVp6d1Rnb1AwQS5oR2F2aHlIMzRPRnBVTmVJUVNrbWdRLjl0alJIYkpDUjgtbkFzLUh6VHM1RDl6ZzV6dlR2ZC1YbDFfREpZbzBJYnRBanNBWVBFWGdUQUFDUTlMTDFJdTA4OUhpblN3MWUwUDRyd3poNHpTdG5saHlDNGlPdDQ4SzVoMGZUR2dPa1ZsOE1PdGl1bFhwTHJtZUdzeHJaVjFoaE0tUW8yb2g2VGJwUmM3bnphcTBpcnBNeUxiRTU0S2EwRTNCNlpEb3ExQkpzRmNMZ2RTeTRMLXhyRk9ZclEzc0xYUU1FTFRIRkNMVHV4dFlianBtdUlrTHo0UHFjV0p5TFFSQ1EwV2ZObHVFel9razY3N0VpS0V3UDcyb095RElnZ0ZjT0k1VEh0VVFGeXRRX3BpMEtvajJkRExRM3J2WXhYVVRqUm9uN3BnVmxnZVltZGM4aTR5QmFYUm10TW5VYWV3WC1fblNQWkhTNUJ1MlV2VEMxVEJGQk8wWUhpamlVWnd2WTNrLXVtY0xlT0lGeWxzNnBMLTdELXJRZk5SWnowVkh4dF91aThSMUZaSFZHeGlyMmI1N0xJU3hBUDBHejJPQ3NDQWVGMy1Gb2NaSVM2UkRsbE1WdHlCNE9kUFUxTktOdUwwdlY4bVdyRzVlSU5ncVFWZFRUN0EwRjBOd2dSd2l5dTFHcXo1NVhXVVVxMjN3cDhMdDR2R2wwelNzblJsNldrRWtrRDZUcFFrTm1xdU4zM1p0UjZHejJ3NmpBRGJHMzFreHhkVEMyN095QUJiWjdUUWF6ZzZKcUlaZllpdkFJOVpuNXIxV05RWDQxV2s4aEo4bXdWc1ZXbkRFeURLRFhGUF8yYWNSX3hDSjlpU2gycnlQeEFtaUFySi1vSHFoSWI0TFlJZTIxbmNGMFRoYzNoNnZrMVNPS1JTSl9zemFnazRySEVfZm04WWkzNi1RU2pMdlJ6SFJtTEpPNWVvQzNNMF9Vb2FQdHpEUE1FUGpXVk1GY2FNbmZ0QmxjY3AwSUo4Rk5nR0YzTmttcFpEcmFPcWRtYWc5TnViaXpQM0V3YjBuR0lwUWc4QzNHOHdtWmdwV3ItV3BQQUszRXo4SVVXc2xOVmZKMjBQSEg5SVIyS2UxMmVsM3ZlbkdsYWtXbW1ZR1NMLUFOTHI5TXQtUWdLeGtGdW1leVFRdTJZaEZxMDlHU2tBcFk5WkVENDFDa2JocVlOTUcwbzVGR1BmSWFGM3FYcGNPdEdhd0k1RkI0Zzh6LXktUXd4UDhnUzI5X3hSWEZLd3BJYU5sRDVHWi1rYVJVSU5kTXY0SC1LcUZ4VlFKYUxiOHRCbTNsdWp4dHYyelJ0cXRlRkVoRnBhLW5MRmhlR0ktdjJJSF9idUJDNHVSajJyRDZNYjVYZjBGSGo3bnNtdl9GX1h0VDlsNXFwbmV6U294MWdhUExKY1pzSlZVbzNCR2hiQ1VMTkt6ZnFNWm1jNml6QW1hcGpCUGtRRDNtejVoT1l4RUxOWUhiUHJjZlFuaGR4Z3ZHVjFJa1lSbVFZb2ltUkx2ay0wWVpMMzVIT2xEYWxNTmNnUkNZdXRTSmJpZ3B3MjBHVG9tdkVQUV94TTRQUXh2MFU1bl9hMzIza3ZNY25nbGFyQldMb0NBMjJtbXZlYm5GbXAyUGwtY1BOYS1zd0FHYnRHVlhQMV9jd25hUzlwbWRlZTJ2MlBmVlhWa1Boa3l6TVB1bEpKNUp0bkt1SWhyTk1SWEFwT3FoTzlFVG1WOXRYTTNhT19aY2wxWDBaSlRQMS1EZXdQTVNpUGdzMjJuM2sxWmVOUEFMYjM2MmxsZzk0RFBuTkxLeTVTaUkwWkdpWjd1U0psdTNFSWFUQW9NbVRseDZBSmI5T3R4aUtCMjNTODhJYV9SNmR5Z0ZmTHd2SzBZSjN2WjdEakctWDBLRU5QbTRqTl9kamwxOEJ3eUJuZXZoRG1DbTZjLWpndFJWcHo0bTUxcGFjMHVKaFBJLWt4cElCSmlaZC1HUW1wc01hOGs1MFdHdHctU0E1c0JxeUVuRkNXdi12QWZEUzl2VHRoOFhGUE5hM05JUWdZaUYzUE5mMk0xZzlEZ0poQ053OW5yRTcwVkVIeHNRRFdNR1pib1NoSEhLWW5UbUVfOGVRbXY1c3BEbDcxaVR6OHdCT2MyeE1seTNkY1pUT2pzMFFQUTY3N2xNd2VoWVh4NFFSMG5MT2psd3h5WGs4VG42LWpFdWlaS1pFaGJVclA2OExKSHc4YnVJOWFoeXRuWFRKVWZfWlB3a1NBU0VBRjV1V2JEeG1ISTdFUE9SejgyN2t4anBZcnAtSmJ5NHFzRW5MUFlqS3Z5OEY1Yk1POGc4djRralB3YXhYRHgzSHI4VlJoUlRiN2dpcjhIb3A4UkNtYkM1c3lwZy16MmNaVmk4dmh1NWxjN3l6elg2Qmp4Vy1zUzlDV2YtM0FWX0NlQ1JJUmJjV0dSR21PeVZ1czBpTGlmVVhEdEdhazVBdkhtLUNxZDNkdDFrRlBmbk5TbmZvMHZYWUhTTmljaGVQVm9xNGkzZm1FYlJmazFqQlNXT0FDT3NyS3pIQU1BWEVZNGxCWXUxWDRQVExOYTlFS1BCd1h1RmdveURKSkdHSWp4RmN3Z1JBeXp0TEZBV0o2MFJ4YnpUd3VhdENqREUyM1BEZlZNMm9nYkxKNVZ3NDlLWUR3UmRMN0EtbGQ0V0daSHVVYTE1djA1ZlF4d3ZsYTQ5Mngyek9OdG1NajZtbGZYUTJhMlVGTTVWeTVnQUJEMmFjbVZZSzV0dTR2SDFTT19kckxIZmdJR2lEcUluemNyQmtSZ3ZvQjd6Rng3OVBkdllXVllxODFWQmxfWkZHRk9lZ2dxSXNFdkhZZjRHdVdwTXo1T21WVERCWTh5Yzh6RExxTUhGa1M5bEQtbXFxTTdrUmFxdHlOMkdvenp0M1ZVNjFRbjBFQ1FXNG8zYmcwS0NsWUxWVXpPNjVrRnl0VVQ5bGt6Zm9HYkdJMWphS0ZwVFMxSk01RUFwVm1fSkJJOTRRdk5vSjUzWmg3T0xPWTQ5UUpUTTZvY1U5MmhHUmtyeThyRVpsc2VPN2lZenVhX0sxZTUwS01INzlrM09DdDlkMXpBZVdTakVyWHpHMW5zemFXRE1XSk5BVXlFTVpGZVRDX3FraGJhZzd2a0ROS1hvQVB4R2oyQWNMWXNaRXhUa3IzUFBTYThjSVphWmk3T09xOEpjb0JSMG5BQXJXSTR0YlRQRHJ6NHBNaXRjQ1lVVG5RYUpFV2N3WWpqQWp3eTZzLVhqNHZDSXBmQTNEei1mSS1MSHdHeTZMcExuZ0pnLTVHVVFiS0dEbW5OSGdmXzd1YXo3YUp5OGhaV0VTd2cxQ2poMGJkNXIxS24tOW1WZ21ZcVpHckQ4YUZCNVA0ZGxYWVotNXpqMThkU2VlNE5sbjZGRTllbUdWVnN3SnFSblo2V1ZJaVZJUDNKN19iVmdGSW5INklQSWFNY1dLU2tZbmVZUFRjODFFZ2ZndDBEWjFTaklYRWI0eWxmV0tjenJyODR1WGJYLThUaGJCRklMSk5oazhWTDJKOVVkSS1hcTFES1lUbmc4TzlyMS1qa0NnRjNYNmd0MHpnWW1qcmxZR2NNVm1ENTR6WHRkbENGWDBPN0RpMHJmemZ0WEhXV25IaHFjNzQzR3YwUjVtbnVndEJkQXN1SzJFS1p3bUFOc2hnRV9EbmVZOW1sckZYc3g2NVZlOE44SGlMdlFBb1ZkR0lsXzdSMG15b21IOWowam1idnhGeDJCUEZ6RHQwREJyZFdVRWdXOU9pRTUtNFRWOWEwWEs3UHY1UVJ0SFRIMHhfSEw5bndFeTN4VlE1eHQ5WGs0NWM1djhTRXBCd0czamJDM1A5UkZZWnp3YWo0SjBnazlPbloxSXRvaDQwZmJfLVNjZ0k0WE9pUnBkaGM2bnJIWkhjckg3dHFqeFVVNTlUaDJjSURLQnJEcVJIX1E5emVmODlMNUZDakxsUTJIVXlmT0tZOHh2LWpqS0hldkt2OUFuZ0JTd2FrcklCU0tLV2JvZks3bXJHamJzcWp5SC1TX2RLT3ZkRmFxVlM4c2xyeWwtUnNwWFJscENpem16R19OWm40ZjBhN1JGVmZPSGxMVUV4Q1BWVDllMVFIVmhmUk9Ld2FpNGRLcDVtNGZTZ1FubGkzbEs3QW90OXFVTkZhX1F4aWxya01jM19OOGFlRklmZjN5ZVlGWUluOHpqd1RrZVJURmtEeGFKOGlJa09HVHhYNEhtWXhpSmkxZ2ZiTXpiYWlBeHBtdU9QOXI2dEZvTTQtVmpaUnFFTkJqUnNKSGQtZnpLVE5OV3VrVlNfYkN1dkhzZEZkSkxmZm80NXBWMmVUS1dZVUNibHhEU2hTZ1JqUXo5Z2tJTXd1RW5iNTZ2amcxUzNkMDhGNDBTU3hKYXhPcTRqUW85ZEpPaFR5NXRaaWc1djluaDFhVU8wSUtFZ2tsVERJR2hyVjZkWUFiSW5FbWhZWi1LejJEdjlRNzZ3MXQ3Y0trQ28tb3I0UU1XM3dVUm5NdkRCYjZubVNkOS12M0xKZWN2dDF1dS1RMzNCb2kyYk9fdTNtSk5nRVBBalhMQ3MtQ3RCNnhBNnVxbU1HSTU2R1pYdHVwTXloVXcuOGc3M3ZHQVdDam1YYW0xeVYzbXhnUQ"}' + string: '{"value":"KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLkFMc0piLWlWcUk5Y01EcVRhS2w1d3g0UTd4dGtzZ3FTWjFfdVEtRGxuR19yaXZ4bGlWakFfbGlxQ3dhZ2lNaTQydkRGa29Jd2U3UnYwYmwzMXlzY1NpQmdkSmxvSzl4SjBJVWJQdjI0Y182amd4TmVVNWx0M2hKRTZ1R1JFQTZYSWpOeEJkazQ1a18yMTZ2a2hRbEt0X3g4dC1oZzk3ems2bkNpT0RTLWtWQmhIS2RST1RmRFZXUmJhVlcyQm9wTHBKM0E2cEpadEtPMjF1dHgwQWRkTVVSMXQyamdkZEs0eTJxWDJTX2hrY3ZUdnR5VGxiUXkxTmF2WnFodlptc0ZIY3ZZT0ZWdW83VTEtWWR1TUI4SmtuaFljanZkSU5lNmJSdzg0UWxQQzQwNzZXTk5TSlh0V2NNbkVMaWF0ZnFLT0RGQzY3TUVTVlA4TVNMWHZQOGIxZy5TTXhZMkRyaDlzckJCQldYNDJMVDBBLjY3S0pxd3FQekFPMVR6ZGNOTHpOY2ROQmNsVWc1SE5CSFRRYWNqNFJHN0RlWGRZMWJ1c05UMUdYUXFqTDNURzVqM0Y2TVVGYXh2R2drcjQ3czJ3cW1KVmRON2JEYlhyR2dobU9ENThmanBXbzA4ZHQ2ZHJWTC1yX0FDeV9CRGFERFFrb3Q5VHU2RW9FSjB0WjVsNFpPWUxaSmVFS0JfaUlCVWRfaW02MzkyeWtrZDIzT0dlNFRuZ2xNSzlJc25sMWMyN2JySl82aUR5R2hheEpiQTBHc0ZDM1I2Q3dlenRjdV9COUY2WE9WNlJTLWoyOW9vd29URUxpM3pwZXJaN0h0OGFlSnFzRHFkMzFLT2tlUDNEcEpVdnpEczJKNDRTNC1Qanl5dDV6UTk2LVFrLVhaZ3FSVndETWQ1VFAweHFQZXdTX3Y0dmlDRUxfbTBvTW5jY3lYTEhvMmVvMzdRUDUzU2Nodm1ocFVCTEpmYUl1dG11TC1XN0Fla0xJbjU0R0NfMzVWV2VHR1lQWnJtNERYbHp3d3huY1E5U3h0OVAtQXctTHJleHVFUWlOWGlrVXh6R2djYm9HVWJ2VFlzdnBGR2JWN21oN3B6SHQtc21Td0hoRkczczd2Z0xvc2tPbUNuQVJ6REwxcXR4dzRERmNONERQRk93YzMzUUdTb3Z6ZVByblVnTU1NRHlvT1NwS1ZwdlA2Wm9zdTdTTy1LUUV2MlJ4TE5ZaHJVZWtKdnlXMkRGbFhkV3VwaXZnbU1fcWFYM09ZVHZtbnlwNDNtcDFyNHFqSzNOTkZKNEJ3M0VCT2xHSV9UdHo5cjF6ancxenJXcTNWVTlkdzQyeXJQSk5na3REY1dzWGdoN1NNRWV5X213R21sNEJLRmtnTWpCVWYtV0kwWkdhVDVrT1QwZGVjRGxaUXpHcG1KTVI3N0p3ZUZsaDhTZDd1ZXVEU285ZkhCODFfeGIzUVhWb29iUXJfcUtMRmpMbFZSLThjd1BLeURCUEhtLTBrd1JyN3FGb3BmQjNfOG81UHFhSENvbHBRQ00wTlhhaXhaN2xBV1daRUxyTXI1RGxzMlE4cUh1UWo0dE91VzRFbW9xb3Vpb1ZYclZwMlBOMGV1ZmkzU1YtRUJhdXZfZ0Jzcy13YzZQSEZ4TFRaRGJyTDBpSDlsSE5YOTZLS1dQQjV5YktNM0x2cWdQMk0wOTlESS02TnN4V1B3U2tTdGFjQzJlUk04MmZQNENyS1Z2c1BqTkFTd256M3NqbXUzR0xBWDlKem56d1Vrem1mVC13SDVqM1FIMUs3T0lzeEdnWXQ0THlWSnZQQWFJenU5Mzd6bmpyQ2JNUmloM1ctMzNGZG5QdFdJa1FrN254VmtITHlfaTU2NS1FZHBZNW1sVTBIMnJCTjE4cEoyZUJscmpWcXFMT0VPMzFxQy12M0dJS1lTbkVhdTZGNjY4ZVE0dU91R1AwZUhqLWFzNm1pLUVZSXk4WVhKTlBxanB1OHEtZG5BdkdSRFFUaWs1bHZHQW9JMXBzcU94aENNdVp4amhNbHA2aXY5aTctMWxNUkpKVnpoY3BwRmdXLVpvX3I1Y1NDbmFsZkN2UzhvQklOdVdJdzNWMERIREw1ZGhUTTBfZ3JEazdheEpjVlZISFZMR0tMSi1hbTJBLUc1MjlxMGJ4UzJJUVVWV1lhcGNHZjdvVHc5TXluOFdJOTVhRVN1a0Y4XzluVFdqVmI2d1VQeXpIRWpUOHhGVTVuTW1HSDdLSnpIT2cxNDM4eV9lVjJPZTNqX3kxclN2Sm1FUFM4OWpHa3dNOXZGSWxGcDY2Xzc3Y2FUR201MmRoemo2d1dkbi1rVVBWS1dwZW00VHcxSTZ0eTdkWUYweUtRQTFRWmppMm00dlUyS1JSeXV4NFF6alVVUWtPQzJ2dW9ZMXdzbGFkNVdycjI1VDMtMkIyODdtaUVOSGdGNEt5eFhiLUFmZ0hiWU5SbWVwR2c4UktRX2dnbEQ5Qllib1ZfMWM2RkpjaUszemZDQzB4QVBMSU9ZYzZZQTE2QV9XWGJ1RWZVM3Vwclh1TjhWckFTeTlPV3Q2UnhDVjB4Wmc0R28xeFhxRDROaC1KZ1NibExCOEVkNG9MZ3hDRUtwWVdUbU91alFlQ2R3STVZZUxBTS1Sdm5zN09HN0JRN0JaTlpEOXBoeHZmcjZLM1oyVGRNMVBSRTI2YjEwSUZTMmJiY05tVERxcjRfOTd4RzF0cURqQWFTX1loMWgxczM3QWxpQ01RRS16TDY4MHA5ai1XeURnTW1IVWs3ZEpFcGo5RlBPdEthcXdmLTZlc0ZmazdCQkxvSGl3YUx1SDZqTmVRNXdpMjRNeUZ3NlJqTTlzTlpHQm9HRTk3RmFwdXg3T3ZYWHRQWjhxYkpmSUtJYzR6Q2NHdDRDakhQMWdqX2tERkJLeGZuNlItekRlS3hGX1NuSlJpWUNnRGJnVjlUMU9OcXhqLXA4LXNFdTRleWdIcVhHaDVGcXZ1dld4OTd2X0lkVF9HYUtTWUN5bGxDaFVwS1hWbWZnVUtnQVNZWkx1RnJrd3V5VGFmODloQVY4YmVXVkNZaUxORDd1bDRwZHlMajlnZ0ZFSTdaYVNXSFRsX29uZndDNUZmRGs5VGI4aHp3NVBWanNWNU9pU2QweENpSlotbGdvTnQwaFRsYUZ5UUYyWnBxU0FrRm9SSWVnYlNxTVlpSDRGcE1IZWY2eEZFblpxSUpxeG0yc2VycWhRTWZfVURBYVotZ05Ra09qalptcHg1Y0NRTXpvdUpKcnNrVzBDNHFpZ25CQTdlWmZCQ01TYkIzREtPbjJQNEQxTDdIUnZ3TnZUVXpDS3RYWGlnUWk4dWpvWUc1SUdQMVNVS2dRMTZqMEgtc1hTZGFBR0RiRDFvNk1ocjNZNzhQV0NEd0toWkpmNkpxaXNZYWNEUXZuYWg0LWdhbGd6dDY4dzBoWncybDNKRmFUNnJNMjBsdWR5eHluZW1ldXJISUE1c0Rfb1d3YmZmemcxaHlKbDRQVjVORmNLZlZ3THBJNU9PbEFXRW00VTRDbl9sR3lZak15cDFRSTVieEVwRjR4NUg2dXI2WW1vQks0Uk1kMDBHdUowMUZ0cEVENFJ1akFiNUhIVVhseEp3TkMwanNrYVpMVW5kcGdIYnZqMVV5YnhZc055VnFRUjVvWjFqSHFkT0ZLckc5dmxnN25EZHpFekJoeTdndWtuV0xmb3duRnhlZVZyaGVSOEhzZDE5SW1lTHI3a0FOWkhEVjh1czdsZHV2bkNjWlFYaGZxSnBtcUozZEgwblhuWWZCalpEZV92eHpoUkYwbGc1SFhZanhybVNpYXI5dHBWV1hVWmJnRVE0Zkp5bllES0JLOVdWZjBxMnBveVpGRzA0Q3ZYeUpIeTZCaktzNXRIRTRZLV9EbE12OUI4NXN5OXFBb2N2d2N1d0UzbGRXbzdoZnBCN2lkekthaTlqN0lNV1E4YWE4RURFclNnUXpnVFdDZW12VGZPUlVPVXRtWnJZZGt0TWNpYXZibVFvd0Uwb3RxZ3ZQM211NHJkMUFjdHA4eWFGNDVTUlhtQkZuS1pWTkdMM2Z0dFZuR25QbXdLNU1qOFB6NWs4c2RqZ1I4akhLSjUydEdkQzV1TWE2RjVLb3FROUVGNEJKMWNLemhkSE1kRkRieVhLazJyaDN2UVY3a1FiRHZmMjh2ZnNWUFNqWHJXWUpXZ0hIUXlFdVItUzJIRExuVUtPa3BGbkwtUWhjcW5iWE51VHZtOUxRbEFJeEdoRUo1M0gzUW44S1RjODViUWxLeU5aa2RtOWxhRTAyemExRXJzYnQwU1E2ZGhIR1hRblFHUS1HSzFJcE0wT3loLVdWYmZidzNwN19GeTVlRnZ3S3duNzhxQWZtM2N6alQ4NUlacWJxb3dmb1VvS25rUVVlNEdJWmQtZ29LS0d0WTlFZDRxb3BqV1hOM1dYVHlYRWdmOGVuUXhqblhLeEM4MDdqWWhaeE0zWmVDNE01d1hyMzJZRmRPc3Z5SmtLb2FTampER3liblNaOFdHVHR4Mk1HM0hHR0NHdW5xWG9vOFZHRjQzemVteVU5RGtZQ3pmZm9qU09tc2pERkUyTW1LWTNYd04wdmdGSkExY0pjWjVySE8taVROZ1Bsa2h3eXNkek1GdDFoVEdFaEY2aERWQ2taQ2NpSEktNEdfVEJFZmJ3eTZJV0tPeHpETTlRejlRNV9lWGlVbUR0M2hBdXZyMkdHZDJNWEI4R29PWGhJekNKbl9IalA1QzlMclh5VFQ0TEQxSVh1UWRpSXJqNWJUTVFKX0oxeFlRQW1EaG9QVXhCdGlGSVRxaWJOcGk2V0lzMWF3VlhWUWRwcWlaMjVfRG8yRjQ5QnU5UHRuX3Z3SHR4REdGUlMzQTF6QUtYUlBjTlpCWHl1a1JjWGVCb2lHR2I0OHNVOXhBMUtnZlNSTDRUS1NOV0JjTTJtLUNPN0VnMDM1QldQUGU3ZGhEWE5CWl82VzJRMzVKcWlYd3FqZTBPUmNUY0FmR0NSTC1NZHFvWVYtaHd3UnQtdEtwbEdDMElXS1d1Yk5ldm43NzRQbGpqV2ZJMFR4ZEkzNkFKa1YzdzN2WlVfUDAwQlEuY0Y5bXk4cXZWMjRVV2JKcGZJRDVCQQ"}' headers: - cache-control: - - no-cache - content-length: - - '5378' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '5378' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:14:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f60fbc.vault.azure.net + - /secrets/secbak32f60fbc/backup + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc?api-version=7.0 response: body: - string: '{"id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/8968fbea165844c6ba86c8774431bfd2","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/778d727d3bae4014a6285fdaad85736f","attributes":{"enabled":true,"created":1564528490,"updated":1564528490,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '202' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '202' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:14:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f60fbc.vault.azure.net + - /secrets/secbak32f60fbc + - api-version=7.0 + - '' - request: - body: '{"value": "KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmZENXM5Qkl4M3FfWWd4OHAteWRFVXF1SDRqRWUxalhCZUczbkh2WFZtaHQtaXZXWnZaLUpGV2hKTGg3SmJkOGhMTlJzSnJ0OGtJeEVENW1rNnc3blpkVDRiRUIzRWlVdkx0eE9UakpsX1JwdWxhTDhabmY4a1B4RHdsSzh3VWpTX3hSTjI0Y2M3WU1KR2o1aHUxT29oZXJHT2FzRmthM2w3ek1ZMlVWVFFFck5GLXlyOHkyYnd1WW9HNGpUSGtNZkN5OWZ1OEMwdHcyRWVwWlNGdl9aMk94bjY3aVZLTDU2LTZybVhRZnBMYmhic2t3QTRUaGJiRl8yRlhXZTg2a2s3NEp2cjJzazczMVFkTGdWNGc2TFlpV2lISmR4aXdKOEsyZ01BX2RXLVBMZHA3N2d4endzTk1Tb2hHeVFLbU15M3ltVFRkMHRjS0g2VVp6d1Rnb1AwQS5oR2F2aHlIMzRPRnBVTmVJUVNrbWdRLjl0alJIYkpDUjgtbkFzLUh6VHM1RDl6ZzV6dlR2ZC1YbDFfREpZbzBJYnRBanNBWVBFWGdUQUFDUTlMTDFJdTA4OUhpblN3MWUwUDRyd3poNHpTdG5saHlDNGlPdDQ4SzVoMGZUR2dPa1ZsOE1PdGl1bFhwTHJtZUdzeHJaVjFoaE0tUW8yb2g2VGJwUmM3bnphcTBpcnBNeUxiRTU0S2EwRTNCNlpEb3ExQkpzRmNMZ2RTeTRMLXhyRk9ZclEzc0xYUU1FTFRIRkNMVHV4dFlianBtdUlrTHo0UHFjV0p5TFFSQ1EwV2ZObHVFel9razY3N0VpS0V3UDcyb095RElnZ0ZjT0k1VEh0VVFGeXRRX3BpMEtvajJkRExRM3J2WXhYVVRqUm9uN3BnVmxnZVltZGM4aTR5QmFYUm10TW5VYWV3WC1fblNQWkhTNUJ1MlV2VEMxVEJGQk8wWUhpamlVWnd2WTNrLXVtY0xlT0lGeWxzNnBMLTdELXJRZk5SWnowVkh4dF91aThSMUZaSFZHeGlyMmI1N0xJU3hBUDBHejJPQ3NDQWVGMy1Gb2NaSVM2UkRsbE1WdHlCNE9kUFUxTktOdUwwdlY4bVdyRzVlSU5ncVFWZFRUN0EwRjBOd2dSd2l5dTFHcXo1NVhXVVVxMjN3cDhMdDR2R2wwelNzblJsNldrRWtrRDZUcFFrTm1xdU4zM1p0UjZHejJ3NmpBRGJHMzFreHhkVEMyN095QUJiWjdUUWF6ZzZKcUlaZllpdkFJOVpuNXIxV05RWDQxV2s4aEo4bXdWc1ZXbkRFeURLRFhGUF8yYWNSX3hDSjlpU2gycnlQeEFtaUFySi1vSHFoSWI0TFlJZTIxbmNGMFRoYzNoNnZrMVNPS1JTSl9zemFnazRySEVfZm04WWkzNi1RU2pMdlJ6SFJtTEpPNWVvQzNNMF9Vb2FQdHpEUE1FUGpXVk1GY2FNbmZ0QmxjY3AwSUo4Rk5nR0YzTmttcFpEcmFPcWRtYWc5TnViaXpQM0V3YjBuR0lwUWc4QzNHOHdtWmdwV3ItV3BQQUszRXo4SVVXc2xOVmZKMjBQSEg5SVIyS2UxMmVsM3ZlbkdsYWtXbW1ZR1NMLUFOTHI5TXQtUWdLeGtGdW1leVFRdTJZaEZxMDlHU2tBcFk5WkVENDFDa2JocVlOTUcwbzVGR1BmSWFGM3FYcGNPdEdhd0k1RkI0Zzh6LXktUXd4UDhnUzI5X3hSWEZLd3BJYU5sRDVHWi1rYVJVSU5kTXY0SC1LcUZ4VlFKYUxiOHRCbTNsdWp4dHYyelJ0cXRlRkVoRnBhLW5MRmhlR0ktdjJJSF9idUJDNHVSajJyRDZNYjVYZjBGSGo3bnNtdl9GX1h0VDlsNXFwbmV6U294MWdhUExKY1pzSlZVbzNCR2hiQ1VMTkt6ZnFNWm1jNml6QW1hcGpCUGtRRDNtejVoT1l4RUxOWUhiUHJjZlFuaGR4Z3ZHVjFJa1lSbVFZb2ltUkx2ay0wWVpMMzVIT2xEYWxNTmNnUkNZdXRTSmJpZ3B3MjBHVG9tdkVQUV94TTRQUXh2MFU1bl9hMzIza3ZNY25nbGFyQldMb0NBMjJtbXZlYm5GbXAyUGwtY1BOYS1zd0FHYnRHVlhQMV9jd25hUzlwbWRlZTJ2MlBmVlhWa1Boa3l6TVB1bEpKNUp0bkt1SWhyTk1SWEFwT3FoTzlFVG1WOXRYTTNhT19aY2wxWDBaSlRQMS1EZXdQTVNpUGdzMjJuM2sxWmVOUEFMYjM2MmxsZzk0RFBuTkxLeTVTaUkwWkdpWjd1U0psdTNFSWFUQW9NbVRseDZBSmI5T3R4aUtCMjNTODhJYV9SNmR5Z0ZmTHd2SzBZSjN2WjdEakctWDBLRU5QbTRqTl9kamwxOEJ3eUJuZXZoRG1DbTZjLWpndFJWcHo0bTUxcGFjMHVKaFBJLWt4cElCSmlaZC1HUW1wc01hOGs1MFdHdHctU0E1c0JxeUVuRkNXdi12QWZEUzl2VHRoOFhGUE5hM05JUWdZaUYzUE5mMk0xZzlEZ0poQ053OW5yRTcwVkVIeHNRRFdNR1pib1NoSEhLWW5UbUVfOGVRbXY1c3BEbDcxaVR6OHdCT2MyeE1seTNkY1pUT2pzMFFQUTY3N2xNd2VoWVh4NFFSMG5MT2psd3h5WGs4VG42LWpFdWlaS1pFaGJVclA2OExKSHc4YnVJOWFoeXRuWFRKVWZfWlB3a1NBU0VBRjV1V2JEeG1ISTdFUE9SejgyN2t4anBZcnAtSmJ5NHFzRW5MUFlqS3Z5OEY1Yk1POGc4djRralB3YXhYRHgzSHI4VlJoUlRiN2dpcjhIb3A4UkNtYkM1c3lwZy16MmNaVmk4dmh1NWxjN3l6elg2Qmp4Vy1zUzlDV2YtM0FWX0NlQ1JJUmJjV0dSR21PeVZ1czBpTGlmVVhEdEdhazVBdkhtLUNxZDNkdDFrRlBmbk5TbmZvMHZYWUhTTmljaGVQVm9xNGkzZm1FYlJmazFqQlNXT0FDT3NyS3pIQU1BWEVZNGxCWXUxWDRQVExOYTlFS1BCd1h1RmdveURKSkdHSWp4RmN3Z1JBeXp0TEZBV0o2MFJ4YnpUd3VhdENqREUyM1BEZlZNMm9nYkxKNVZ3NDlLWUR3UmRMN0EtbGQ0V0daSHVVYTE1djA1ZlF4d3ZsYTQ5Mngyek9OdG1NajZtbGZYUTJhMlVGTTVWeTVnQUJEMmFjbVZZSzV0dTR2SDFTT19kckxIZmdJR2lEcUluemNyQmtSZ3ZvQjd6Rng3OVBkdllXVllxODFWQmxfWkZHRk9lZ2dxSXNFdkhZZjRHdVdwTXo1T21WVERCWTh5Yzh6RExxTUhGa1M5bEQtbXFxTTdrUmFxdHlOMkdvenp0M1ZVNjFRbjBFQ1FXNG8zYmcwS0NsWUxWVXpPNjVrRnl0VVQ5bGt6Zm9HYkdJMWphS0ZwVFMxSk01RUFwVm1fSkJJOTRRdk5vSjUzWmg3T0xPWTQ5UUpUTTZvY1U5MmhHUmtyeThyRVpsc2VPN2lZenVhX0sxZTUwS01INzlrM09DdDlkMXpBZVdTakVyWHpHMW5zemFXRE1XSk5BVXlFTVpGZVRDX3FraGJhZzd2a0ROS1hvQVB4R2oyQWNMWXNaRXhUa3IzUFBTYThjSVphWmk3T09xOEpjb0JSMG5BQXJXSTR0YlRQRHJ6NHBNaXRjQ1lVVG5RYUpFV2N3WWpqQWp3eTZzLVhqNHZDSXBmQTNEei1mSS1MSHdHeTZMcExuZ0pnLTVHVVFiS0dEbW5OSGdmXzd1YXo3YUp5OGhaV0VTd2cxQ2poMGJkNXIxS24tOW1WZ21ZcVpHckQ4YUZCNVA0ZGxYWVotNXpqMThkU2VlNE5sbjZGRTllbUdWVnN3SnFSblo2V1ZJaVZJUDNKN19iVmdGSW5INklQSWFNY1dLU2tZbmVZUFRjODFFZ2ZndDBEWjFTaklYRWI0eWxmV0tjenJyODR1WGJYLThUaGJCRklMSk5oazhWTDJKOVVkSS1hcTFES1lUbmc4TzlyMS1qa0NnRjNYNmd0MHpnWW1qcmxZR2NNVm1ENTR6WHRkbENGWDBPN0RpMHJmemZ0WEhXV25IaHFjNzQzR3YwUjVtbnVndEJkQXN1SzJFS1p3bUFOc2hnRV9EbmVZOW1sckZYc3g2NVZlOE44SGlMdlFBb1ZkR0lsXzdSMG15b21IOWowam1idnhGeDJCUEZ6RHQwREJyZFdVRWdXOU9pRTUtNFRWOWEwWEs3UHY1UVJ0SFRIMHhfSEw5bndFeTN4VlE1eHQ5WGs0NWM1djhTRXBCd0czamJDM1A5UkZZWnp3YWo0SjBnazlPbloxSXRvaDQwZmJfLVNjZ0k0WE9pUnBkaGM2bnJIWkhjckg3dHFqeFVVNTlUaDJjSURLQnJEcVJIX1E5emVmODlMNUZDakxsUTJIVXlmT0tZOHh2LWpqS0hldkt2OUFuZ0JTd2FrcklCU0tLV2JvZks3bXJHamJzcWp5SC1TX2RLT3ZkRmFxVlM4c2xyeWwtUnNwWFJscENpem16R19OWm40ZjBhN1JGVmZPSGxMVUV4Q1BWVDllMVFIVmhmUk9Ld2FpNGRLcDVtNGZTZ1FubGkzbEs3QW90OXFVTkZhX1F4aWxya01jM19OOGFlRklmZjN5ZVlGWUluOHpqd1RrZVJURmtEeGFKOGlJa09HVHhYNEhtWXhpSmkxZ2ZiTXpiYWlBeHBtdU9QOXI2dEZvTTQtVmpaUnFFTkJqUnNKSGQtZnpLVE5OV3VrVlNfYkN1dkhzZEZkSkxmZm80NXBWMmVUS1dZVUNibHhEU2hTZ1JqUXo5Z2tJTXd1RW5iNTZ2amcxUzNkMDhGNDBTU3hKYXhPcTRqUW85ZEpPaFR5NXRaaWc1djluaDFhVU8wSUtFZ2tsVERJR2hyVjZkWUFiSW5FbWhZWi1LejJEdjlRNzZ3MXQ3Y0trQ28tb3I0UU1XM3dVUm5NdkRCYjZubVNkOS12M0xKZWN2dDF1dS1RMzNCb2kyYk9fdTNtSk5nRVBBalhMQ3MtQ3RCNnhBNnVxbU1HSTU2R1pYdHVwTXloVXcuOGc3M3ZHQVdDam1YYW0xeVYzbXhnUQ"}' + body: '{"value": "KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLkFMc0piLWlWcUk5Y01EcVRhS2w1d3g0UTd4dGtzZ3FTWjFfdVEtRGxuR19yaXZ4bGlWakFfbGlxQ3dhZ2lNaTQydkRGa29Jd2U3UnYwYmwzMXlzY1NpQmdkSmxvSzl4SjBJVWJQdjI0Y182amd4TmVVNWx0M2hKRTZ1R1JFQTZYSWpOeEJkazQ1a18yMTZ2a2hRbEt0X3g4dC1oZzk3ems2bkNpT0RTLWtWQmhIS2RST1RmRFZXUmJhVlcyQm9wTHBKM0E2cEpadEtPMjF1dHgwQWRkTVVSMXQyamdkZEs0eTJxWDJTX2hrY3ZUdnR5VGxiUXkxTmF2WnFodlptc0ZIY3ZZT0ZWdW83VTEtWWR1TUI4SmtuaFljanZkSU5lNmJSdzg0UWxQQzQwNzZXTk5TSlh0V2NNbkVMaWF0ZnFLT0RGQzY3TUVTVlA4TVNMWHZQOGIxZy5TTXhZMkRyaDlzckJCQldYNDJMVDBBLjY3S0pxd3FQekFPMVR6ZGNOTHpOY2ROQmNsVWc1SE5CSFRRYWNqNFJHN0RlWGRZMWJ1c05UMUdYUXFqTDNURzVqM0Y2TVVGYXh2R2drcjQ3czJ3cW1KVmRON2JEYlhyR2dobU9ENThmanBXbzA4ZHQ2ZHJWTC1yX0FDeV9CRGFERFFrb3Q5VHU2RW9FSjB0WjVsNFpPWUxaSmVFS0JfaUlCVWRfaW02MzkyeWtrZDIzT0dlNFRuZ2xNSzlJc25sMWMyN2JySl82aUR5R2hheEpiQTBHc0ZDM1I2Q3dlenRjdV9COUY2WE9WNlJTLWoyOW9vd29URUxpM3pwZXJaN0h0OGFlSnFzRHFkMzFLT2tlUDNEcEpVdnpEczJKNDRTNC1Qanl5dDV6UTk2LVFrLVhaZ3FSVndETWQ1VFAweHFQZXdTX3Y0dmlDRUxfbTBvTW5jY3lYTEhvMmVvMzdRUDUzU2Nodm1ocFVCTEpmYUl1dG11TC1XN0Fla0xJbjU0R0NfMzVWV2VHR1lQWnJtNERYbHp3d3huY1E5U3h0OVAtQXctTHJleHVFUWlOWGlrVXh6R2djYm9HVWJ2VFlzdnBGR2JWN21oN3B6SHQtc21Td0hoRkczczd2Z0xvc2tPbUNuQVJ6REwxcXR4dzRERmNONERQRk93YzMzUUdTb3Z6ZVByblVnTU1NRHlvT1NwS1ZwdlA2Wm9zdTdTTy1LUUV2MlJ4TE5ZaHJVZWtKdnlXMkRGbFhkV3VwaXZnbU1fcWFYM09ZVHZtbnlwNDNtcDFyNHFqSzNOTkZKNEJ3M0VCT2xHSV9UdHo5cjF6ancxenJXcTNWVTlkdzQyeXJQSk5na3REY1dzWGdoN1NNRWV5X213R21sNEJLRmtnTWpCVWYtV0kwWkdhVDVrT1QwZGVjRGxaUXpHcG1KTVI3N0p3ZUZsaDhTZDd1ZXVEU285ZkhCODFfeGIzUVhWb29iUXJfcUtMRmpMbFZSLThjd1BLeURCUEhtLTBrd1JyN3FGb3BmQjNfOG81UHFhSENvbHBRQ00wTlhhaXhaN2xBV1daRUxyTXI1RGxzMlE4cUh1UWo0dE91VzRFbW9xb3Vpb1ZYclZwMlBOMGV1ZmkzU1YtRUJhdXZfZ0Jzcy13YzZQSEZ4TFRaRGJyTDBpSDlsSE5YOTZLS1dQQjV5YktNM0x2cWdQMk0wOTlESS02TnN4V1B3U2tTdGFjQzJlUk04MmZQNENyS1Z2c1BqTkFTd256M3NqbXUzR0xBWDlKem56d1Vrem1mVC13SDVqM1FIMUs3T0lzeEdnWXQ0THlWSnZQQWFJenU5Mzd6bmpyQ2JNUmloM1ctMzNGZG5QdFdJa1FrN254VmtITHlfaTU2NS1FZHBZNW1sVTBIMnJCTjE4cEoyZUJscmpWcXFMT0VPMzFxQy12M0dJS1lTbkVhdTZGNjY4ZVE0dU91R1AwZUhqLWFzNm1pLUVZSXk4WVhKTlBxanB1OHEtZG5BdkdSRFFUaWs1bHZHQW9JMXBzcU94aENNdVp4amhNbHA2aXY5aTctMWxNUkpKVnpoY3BwRmdXLVpvX3I1Y1NDbmFsZkN2UzhvQklOdVdJdzNWMERIREw1ZGhUTTBfZ3JEazdheEpjVlZISFZMR0tMSi1hbTJBLUc1MjlxMGJ4UzJJUVVWV1lhcGNHZjdvVHc5TXluOFdJOTVhRVN1a0Y4XzluVFdqVmI2d1VQeXpIRWpUOHhGVTVuTW1HSDdLSnpIT2cxNDM4eV9lVjJPZTNqX3kxclN2Sm1FUFM4OWpHa3dNOXZGSWxGcDY2Xzc3Y2FUR201MmRoemo2d1dkbi1rVVBWS1dwZW00VHcxSTZ0eTdkWUYweUtRQTFRWmppMm00dlUyS1JSeXV4NFF6alVVUWtPQzJ2dW9ZMXdzbGFkNVdycjI1VDMtMkIyODdtaUVOSGdGNEt5eFhiLUFmZ0hiWU5SbWVwR2c4UktRX2dnbEQ5Qllib1ZfMWM2RkpjaUszemZDQzB4QVBMSU9ZYzZZQTE2QV9XWGJ1RWZVM3Vwclh1TjhWckFTeTlPV3Q2UnhDVjB4Wmc0R28xeFhxRDROaC1KZ1NibExCOEVkNG9MZ3hDRUtwWVdUbU91alFlQ2R3STVZZUxBTS1Sdm5zN09HN0JRN0JaTlpEOXBoeHZmcjZLM1oyVGRNMVBSRTI2YjEwSUZTMmJiY05tVERxcjRfOTd4RzF0cURqQWFTX1loMWgxczM3QWxpQ01RRS16TDY4MHA5ai1XeURnTW1IVWs3ZEpFcGo5RlBPdEthcXdmLTZlc0ZmazdCQkxvSGl3YUx1SDZqTmVRNXdpMjRNeUZ3NlJqTTlzTlpHQm9HRTk3RmFwdXg3T3ZYWHRQWjhxYkpmSUtJYzR6Q2NHdDRDakhQMWdqX2tERkJLeGZuNlItekRlS3hGX1NuSlJpWUNnRGJnVjlUMU9OcXhqLXA4LXNFdTRleWdIcVhHaDVGcXZ1dld4OTd2X0lkVF9HYUtTWUN5bGxDaFVwS1hWbWZnVUtnQVNZWkx1RnJrd3V5VGFmODloQVY4YmVXVkNZaUxORDd1bDRwZHlMajlnZ0ZFSTdaYVNXSFRsX29uZndDNUZmRGs5VGI4aHp3NVBWanNWNU9pU2QweENpSlotbGdvTnQwaFRsYUZ5UUYyWnBxU0FrRm9SSWVnYlNxTVlpSDRGcE1IZWY2eEZFblpxSUpxeG0yc2VycWhRTWZfVURBYVotZ05Ra09qalptcHg1Y0NRTXpvdUpKcnNrVzBDNHFpZ25CQTdlWmZCQ01TYkIzREtPbjJQNEQxTDdIUnZ3TnZUVXpDS3RYWGlnUWk4dWpvWUc1SUdQMVNVS2dRMTZqMEgtc1hTZGFBR0RiRDFvNk1ocjNZNzhQV0NEd0toWkpmNkpxaXNZYWNEUXZuYWg0LWdhbGd6dDY4dzBoWncybDNKRmFUNnJNMjBsdWR5eHluZW1ldXJISUE1c0Rfb1d3YmZmemcxaHlKbDRQVjVORmNLZlZ3THBJNU9PbEFXRW00VTRDbl9sR3lZak15cDFRSTVieEVwRjR4NUg2dXI2WW1vQks0Uk1kMDBHdUowMUZ0cEVENFJ1akFiNUhIVVhseEp3TkMwanNrYVpMVW5kcGdIYnZqMVV5YnhZc055VnFRUjVvWjFqSHFkT0ZLckc5dmxnN25EZHpFekJoeTdndWtuV0xmb3duRnhlZVZyaGVSOEhzZDE5SW1lTHI3a0FOWkhEVjh1czdsZHV2bkNjWlFYaGZxSnBtcUozZEgwblhuWWZCalpEZV92eHpoUkYwbGc1SFhZanhybVNpYXI5dHBWV1hVWmJnRVE0Zkp5bllES0JLOVdWZjBxMnBveVpGRzA0Q3ZYeUpIeTZCaktzNXRIRTRZLV9EbE12OUI4NXN5OXFBb2N2d2N1d0UzbGRXbzdoZnBCN2lkekthaTlqN0lNV1E4YWE4RURFclNnUXpnVFdDZW12VGZPUlVPVXRtWnJZZGt0TWNpYXZibVFvd0Uwb3RxZ3ZQM211NHJkMUFjdHA4eWFGNDVTUlhtQkZuS1pWTkdMM2Z0dFZuR25QbXdLNU1qOFB6NWs4c2RqZ1I4akhLSjUydEdkQzV1TWE2RjVLb3FROUVGNEJKMWNLemhkSE1kRkRieVhLazJyaDN2UVY3a1FiRHZmMjh2ZnNWUFNqWHJXWUpXZ0hIUXlFdVItUzJIRExuVUtPa3BGbkwtUWhjcW5iWE51VHZtOUxRbEFJeEdoRUo1M0gzUW44S1RjODViUWxLeU5aa2RtOWxhRTAyemExRXJzYnQwU1E2ZGhIR1hRblFHUS1HSzFJcE0wT3loLVdWYmZidzNwN19GeTVlRnZ3S3duNzhxQWZtM2N6alQ4NUlacWJxb3dmb1VvS25rUVVlNEdJWmQtZ29LS0d0WTlFZDRxb3BqV1hOM1dYVHlYRWdmOGVuUXhqblhLeEM4MDdqWWhaeE0zWmVDNE01d1hyMzJZRmRPc3Z5SmtLb2FTampER3liblNaOFdHVHR4Mk1HM0hHR0NHdW5xWG9vOFZHRjQzemVteVU5RGtZQ3pmZm9qU09tc2pERkUyTW1LWTNYd04wdmdGSkExY0pjWjVySE8taVROZ1Bsa2h3eXNkek1GdDFoVEdFaEY2aERWQ2taQ2NpSEktNEdfVEJFZmJ3eTZJV0tPeHpETTlRejlRNV9lWGlVbUR0M2hBdXZyMkdHZDJNWEI4R29PWGhJekNKbl9IalA1QzlMclh5VFQ0TEQxSVh1UWRpSXJqNWJUTVFKX0oxeFlRQW1EaG9QVXhCdGlGSVRxaWJOcGk2V0lzMWF3VlhWUWRwcWlaMjVfRG8yRjQ5QnU5UHRuX3Z3SHR4REdGUlMzQTF6QUtYUlBjTlpCWHl1a1JjWGVCb2lHR2I0OHNVOXhBMUtnZlNSTDRUS1NOV0JjTTJtLUNPN0VnMDM1QldQUGU3ZGhEWE5CWl82VzJRMzVKcWlYd3FqZTBPUmNUY0FmR0NSTC1NZHFvWVYtaHd3UnQtdEtwbEdDMElXS1d1Yk5ldm43NzRQbGpqV2ZJMFR4ZEkzNkFKa1YzdzN2WlVfUDAwQlEuY0Y5bXk4cXZWMjRVV2JKcGZJRDVCQQ"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '5379' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f60fbc.vault.azure.net/secrets/restore?api-version=7.0 response: body: - string: '{"id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/8968fbea165844c6ba86c8774431bfd2","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/778d727d3bae4014a6285fdaad85736f","attributes":{"enabled":true,"created":1564528490,"updated":1564528490,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '202' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '202' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:14:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f60fbc.vault.azure.net + - /secrets/restore + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_deleted_secrets.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_deleted_secrets.yaml index e8638c8abf32..dba0b9685274 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_deleted_secrets.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_deleted_secrets.yaml @@ -1,625 +1,386 @@ interactions: - request: - body: '{"value": "secval99e4122d"}' + body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - - '27' + - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/4176712f5ccc49e69605dba983a4f344","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:17 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:15:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 200 - message: OK + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/bebb1fbf2bf34988b8e02c8ee5f925ad","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/093a7c0702ba41e2920961edf29252e1","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/2c24f5bc003541cca1fea12d2bd5f82b","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/1b12330c84764ba9a010e7cc65d06ea3","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/398ba2a5091d435ca4b7ac05058b509b","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/1c47984da2fd45ca960731c2d62031ab","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/b76683bd312a4f129eb83d59901cae55","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/354aa036d79d4ec9aacc5a0c762e8e88","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/ac1f506c933b41c3a5732247e2334429","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/c591ae13276d4e84848e59c8bda9db05","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/e99017ab4bc14aa6a8aabd4482f4b784","attributes":{"enabled":true,"created":1560538519,"updated":1560538519,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/6eec08471fbc443daa555c8b44a4ed6f","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: - body: null + body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - - '0' + - '27' + Content-Type: + - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: DELETE + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1560538519,"scheduledPurgeDate":1568314519,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/e99017ab4bc14aa6a8aabd4482f4b784","attributes":{"enabled":true,"created":1560538519,"updated":1560538519,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '348' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:19 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/fa8f25489fac47afa288a741ab227858","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 - response: - body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - sec99e4122d"}}' - headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:19 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 - response: - body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - sec99e4122d"}}' - headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 - response: - body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - sec99e4122d"}}' - headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: DELETE + uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - sec99e4122d"}}' - headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:28 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1564528528,"scheduledPurgeDate":1572304528,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/fa8f25489fac47afa288a741ab227858","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '348' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 404 - message: Not Found + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 response: @@ -627,48 +388,38 @@ interactions: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: sec99e4122d"}}' headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /deletedsecrets/sec99e4122d + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 response: @@ -676,131 +427,105 @@ interactions: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: sec99e4122d"}}' headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /deletedsecrets/sec99e4122d + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1560538519,"scheduledPurgeDate":1568314519,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/e99017ab4bc14aa6a8aabd4482f4b784","attributes":{"enabled":true,"created":1560538519,"updated":1560538519,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '348' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:38 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1564528528,"scheduledPurgeDate":1572304528,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/fa8f25489fac47afa288a741ab227858","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '348' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:34 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /deletedsecrets/sec99e4122d + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault99e4122d.vault.azure.net/deletedsecrets?api-version=7.0 response: body: - string: '{"value":[{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1560538519,"scheduledPurgeDate":1568314519,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d","attributes":{"enabled":true,"created":1560538519,"updated":1560538519,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' - headers: - cache-control: - - no-cache - content-length: - - '343' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:38 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":[{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1564528528,"scheduledPurgeDate":1572304528,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + headers: + cache-control: no-cache + content-length: '343' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:34 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /deletedsecrets + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_versions.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_versions.yaml index 0891a7d98254..f21aa267f8e2 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_versions.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_versions.yaml @@ -1,414 +1,377 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:16:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/01a1c421f99d4e11bd1faf3385a638ca","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/d14f229e00a0466588945a17f72f9ef4","attributes":{"enabled":true,"created":1564528588,"updated":1564528588,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/6df9785175c94931bb8f9f7bf54a43bf","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/62bd3e1ae4c943b0834475dcf0593813","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/5aaaf0401ced49dbb6b5376220eb6bd4","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/548690f3d6e448a4afa1946ddd2ad9a3","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/bdf0770f231b4f13bc5f6dabfb907e9c","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/6e93babb4bf34f64a3096fe587c1a874","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/194031008cdc435abc85946271e16fb9","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/8ef101e684de4189ae32349d68c7563c","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/416f926b2a2c415da3756c2cf9110302","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/877971b0463b4d4f8f0b3dd1c8ee74ab","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/ab4bd70148bf4d1984aa143b95d7f738","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/581cbd091a3646daa866c6c54732fed3","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/versions?api-version=7.0 response: body: - string: '{"value":[{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/01a1c421f99d4e11bd1faf3385a638ca","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/194031008cdc435abc85946271e16fb9","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/416f926b2a2c415da3756c2cf9110302","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/5aaaf0401ced49dbb6b5376220eb6bd4","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/6df9785175c94931bb8f9f7bf54a43bf","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/ab4bd70148bf4d1984aa143b95d7f738","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/bdf0770f231b4f13bc5f6dabfb907e9c","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}],"nextLink":null}' + string: '{"value":[{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/548690f3d6e448a4afa1946ddd2ad9a3","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/581cbd091a3646daa866c6c54732fed3","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/62bd3e1ae4c943b0834475dcf0593813","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/6e93babb4bf34f64a3096fe587c1a874","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/877971b0463b4d4f8f0b3dd1c8ee74ab","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/8ef101e684de4189ae32349d68c7563c","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/d14f229e00a0466588945a17f72f9ef4","attributes":{"enabled":true,"created":1564528588,"updated":1564528588,"recoveryLevel":"Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '1427' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:45 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '1427' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77/versions + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_purge.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_purge.yaml index c68d8212f97b..2a5134de0b12 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_purge.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_purge.yaml @@ -1,1618 +1,1264 @@ interactions: - request: - body: '{"value": "value0"}' + body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - - '19' + - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret0?api-version=7.0 response: body: - string: '{"value":"value0","id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/c31d65f64d5b40fa805f9e3eb67bde05","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:17:06 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' +- request: + body: '{"value": "value0"}' + headers: + Accept: + - application/json + Content-Length: + - '19' + Content-Type: - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vaultb5580c06.vault.azure.net/secrets/secret0?api-version=7.0 + response: + body: + string: '{"value":"value0","id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/8966cffcb88e467687e8634e8837df4e","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:06 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' - request: body: '{"value": "value1"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret1?api-version=7.0 response: body: - string: '{"value":"value1","id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/0cc8e9fc0e1642f6a1041ff4ad2c013e","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value1","id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/01a16d10e4834f40a9f50ee36ec02781","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret1 + - api-version=7.0 + - '' - request: body: '{"value": "value2"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret2?api-version=7.0 response: body: - string: '{"value":"value2","id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/de7fc9fd9f4448f081cb23de8ed7da0d","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value2","id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/3fff9d5c111a42b1bd1815f56ed4c797","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret2 + - api-version=7.0 + - '' - request: body: '{"value": "value3"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret3?api-version=7.0 response: body: - string: '{"value":"value3","id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/47e941e1cdbd4a558231536fff8e05ab","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value3","id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/b4be0b4560154409a4ac6f740b272133","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret3 + - api-version=7.0 + - '' - request: body: '{"value": "value4"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret4?api-version=7.0 response: body: - string: '{"value":"value4","id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/333b17ecad69484f84a8dfd4b8d6b5f7","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value4","id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/eb62dde290ba42da9735cf34b575fcfd","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret4 + - api-version=7.0 + - '' - request: body: '{"value": "value5"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret5?api-version=7.0 response: body: - string: '{"value":"value5","id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/571e47d981d64ad0b5b35d692dd1fd29","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value5","id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/13d1a85f33f94d95afadf8cef91c3d17","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret5 + - api-version=7.0 + - '' - request: body: '{"value": "value6"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret6?api-version=7.0 response: body: - string: '{"value":"value6","id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/d2ff1a7f7fd14e989fdb7ebbac87d7ff","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value6","id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/b7804c43991a414ba965299128f66458","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/333b17ecad69484f84a8dfd4b8d6b5f7","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/8966cffcb88e467687e8634e8837df4e","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret3?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/47e941e1cdbd4a558231536fff8e05ab","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/01a16d10e4834f40a9f50ee36ec02781","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret5?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/571e47d981d64ad0b5b35d692dd1fd29","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/3fff9d5c111a42b1bd1815f56ed4c797","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret0?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/c31d65f64d5b40fa805f9e3eb67bde05","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/b4be0b4560154409a4ac6f740b272133","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:08 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret6?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/d2ff1a7f7fd14e989fdb7ebbac87d7ff","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/eb62dde290ba42da9735cf34b575fcfd","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:08 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret1?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/0cc8e9fc0e1642f6a1041ff4ad2c013e","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/13d1a85f33f94d95afadf8cef91c3d17","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:08 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret2?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/de7fc9fd9f4448f081cb23de8ed7da0d","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528629,"scheduledPurgeDate":1572304629,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/b7804c43991a414ba965299128f66458","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:08 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 - response: - body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret4"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret4"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:08 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret4"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret4"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/333b17ecad69484f84a8dfd4b8d6b5f7","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/8966cffcb88e467687e8634e8837df4e","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/47e941e1cdbd4a558231536fff8e05ab","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/01a16d10e4834f40a9f50ee36ec02781","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/571e47d981d64ad0b5b35d692dd1fd29","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/3fff9d5c111a42b1bd1815f56ed4c797","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/c31d65f64d5b40fa805f9e3eb67bde05","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/b4be0b4560154409a4ac6f740b272133","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/d2ff1a7f7fd14e989fdb7ebbac87d7ff","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/eb62dde290ba42da9735cf34b575fcfd","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/0cc8e9fc0e1642f6a1041ff4ad2c013e","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/13d1a85f33f94d95afadf8cef91c3d17","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/de7fc9fd9f4448f081cb23de8ed7da0d","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528629,"scheduledPurgeDate":1572304629,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/b7804c43991a414ba965299128f66458","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultb5580c06.vault.azure.net/deletedsecrets?api-version=7.0 response: body: - string: '{"value":[{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' - headers: - cache-control: - - no-cache - content-length: - - '2183' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":[{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528629,"scheduledPurgeDate":1572304629,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + headers: + cache-control: no-cache + content-length: '2183' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret1 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret2 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret3 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret4 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret5 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:38 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret6 + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_recover.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_recover.yaml index 57e1f8288b5f..aee5c8738d11 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_recover.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_recover.yaml @@ -1,2320 +1,1826 @@ interactions: - request: - body: '{"value": "value0"}' + body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - - '19' + - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret0?api-version=7.0 response: body: - string: '{"value":"value0","id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/fa36e67096af4f899772f9950aaa0f72","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' +- request: + body: '{"value": "value0"}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: + Accept: + - application/json + Content-Length: + - '19' + Content-Type: - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0?api-version=7.0 + response: + body: + string: '{"value":"value0","id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/d1f164c23b8d4dd99f17bb50e84c5d1f","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' - request: body: '{"value": "value1"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret1?api-version=7.0 response: body: - string: '{"value":"value1","id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/fbb5f0622390490dbb7848336086f4cc","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value1","id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/07653aa977ab498f8cae0d495ecda5f3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret1 + - api-version=7.0 + - '' - request: body: '{"value": "value2"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret2?api-version=7.0 response: body: - string: '{"value":"value2","id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/f3332fded0d54da6b5a61a96aab2a3d7","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value2","id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/9a46000095e543a6b265060a97979e76","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret2 + - api-version=7.0 + - '' - request: body: '{"value": "value3"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret3?api-version=7.0 response: body: - string: '{"value":"value3","id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/23599f329eb74f91b52de1268affa7a2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value3","id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/a9a6431ed3af4764a21358fe1670f659","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret3 + - api-version=7.0 + - '' - request: body: '{"value": "value4"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret4?api-version=7.0 response: body: - string: '{"value":"value4","id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/41dcbf735cd546e98fd732857184ee41","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value4","id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/5519e4d02b96446c920e66b494eef218","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret4 + - api-version=7.0 + - '' - request: body: '{"value": "value5"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret5?api-version=7.0 response: body: - string: '{"value":"value5","id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/aa198d7afe694c34acc709384cbe2d77","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value5","id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/1d21e63d093447d48133cf4350e1b5bc","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret5 + - api-version=7.0 + - '' - request: body: '{"value": "value6"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret6?api-version=7.0 response: body: - string: '{"value":"value6","id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/a8b0b304c73441f4a9c609f10edaf8c9","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value6","id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/04d8d9d3f519485683412facb79f3240","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/f3332fded0d54da6b5a61a96aab2a3d7","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/d1f164c23b8d4dd99f17bb50e84c5d1f","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret3?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/23599f329eb74f91b52de1268affa7a2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/07653aa977ab498f8cae0d495ecda5f3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret1?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/fbb5f0622390490dbb7848336086f4cc","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/9a46000095e543a6b265060a97979e76","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret0?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/fa36e67096af4f899772f9950aaa0f72","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/a9a6431ed3af4764a21358fe1670f659","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret5?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/aa198d7afe694c34acc709384cbe2d77","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/5519e4d02b96446c920e66b494eef218","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret6?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/a8b0b304c73441f4a9c609f10edaf8c9","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/1d21e63d093447d48133cf4350e1b5bc","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret4?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/41dcbf735cd546e98fd732857184ee41","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/04d8d9d3f519485683412facb79f3240","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:13 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 - response: - body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:05 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:13 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:09 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:16 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:12 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:20 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:15 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/f3332fded0d54da6b5a61a96aab2a3d7","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/d1f164c23b8d4dd99f17bb50e84c5d1f","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/23599f329eb74f91b52de1268affa7a2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/07653aa977ab498f8cae0d495ecda5f3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/fbb5f0622390490dbb7848336086f4cc","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/9a46000095e543a6b265060a97979e76","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/fa36e67096af4f899772f9950aaa0f72","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/a9a6431ed3af4764a21358fe1670f659","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/aa198d7afe694c34acc709384cbe2d77","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/5519e4d02b96446c920e66b494eef218","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/a8b0b304c73441f4a9c609f10edaf8c9","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/1d21e63d093447d48133cf4350e1b5bc","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/41dcbf735cd546e98fd732857184ee41","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/04d8d9d3f519485683412facb79f3240","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultce560cd9.vault.azure.net/deletedsecrets?api-version=7.0 response: body: - string: '{"value":[{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' - headers: - cache-control: - - no-cache - content-length: - - '2183' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":[{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + headers: + cache-control: no-cache + content-length: '2183' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/f3332fded0d54da6b5a61a96aab2a3d7","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/d1f164c23b8d4dd99f17bb50e84c5d1f","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/23599f329eb74f91b52de1268affa7a2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/07653aa977ab498f8cae0d495ecda5f3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret1/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/fbb5f0622390490dbb7848336086f4cc","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/9a46000095e543a6b265060a97979e76","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret2/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/fa36e67096af4f899772f9950aaa0f72","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/a9a6431ed3af4764a21358fe1670f659","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret3/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/aa198d7afe694c34acc709384cbe2d77","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/5519e4d02b96446c920e66b494eef218","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret4/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/a8b0b304c73441f4a9c609f10edaf8c9","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/1d21e63d093447d48133cf4350e1b5bc","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret5/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/41dcbf735cd546e98fd732857184ee41","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/04d8d9d3f519485683412facb79f3240","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret6/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '73' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret0"}}' + headers: + cache-control: no-cache + content-length: '73' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '73' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:26 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret0"}}' + headers: + cache-control: no-cache + content-length: '73' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:33 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '73' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret0"}}' + headers: + cache-control: no-cache + content-length: '73' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:36 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '73' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret0"}}' + headers: + cache-control: no-cache + content-length: '73' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:39 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '73' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret0"}}' + headers: + cache-control: no-cache + content-length: '73' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"value":"value2","id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/f3332fded0d54da6b5a61a96aab2a3d7","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value0","id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/d1f164c23b8d4dd99f17bb50e84c5d1f","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret3/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret1/?api-version=7.0 response: body: - string: '{"value":"value3","id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/23599f329eb74f91b52de1268affa7a2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value1","id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/07653aa977ab498f8cae0d495ecda5f3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret1/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret1/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 response: body: - string: '{"value":"value1","id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/fbb5f0622390490dbb7848336086f4cc","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value2","id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/9a46000095e543a6b265060a97979e76","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret2/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret3/?api-version=7.0 response: body: - string: '{"value":"value0","id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/fa36e67096af4f899772f9950aaa0f72","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value3","id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/a9a6431ed3af4764a21358fe1670f659","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret3/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret5/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret4/?api-version=7.0 response: body: - string: '{"value":"value5","id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/aa198d7afe694c34acc709384cbe2d77","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value4","id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/5519e4d02b96446c920e66b494eef218","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret4/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret6/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret5/?api-version=7.0 response: body: - string: '{"value":"value6","id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/a8b0b304c73441f4a9c609f10edaf8c9","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value5","id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/1d21e63d093447d48133cf4350e1b5bc","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret5/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret4/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret6/?api-version=7.0 response: body: - string: '{"value":"value4","id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/41dcbf735cd546e98fd732857184ee41","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value6","id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/04d8d9d3f519485683412facb79f3240","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret6/ + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_crud_operations.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_crud_operations.yaml index 5267d8020874..5d9a0991c11a 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_crud_operations.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_crud_operations.yaml @@ -1,359 +1,330 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:19:38 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret + - api-version=7.0 + - '' - request: body: '{"value": "crud_secret_valuec01d1319"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '38' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret?api-version=7.0 response: body: - string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/177427fb4ac34d35be6430082742ca9d","attributes":{"enabled":true,"created":1560296924,"updated":1560296924,"recoveryLevel":"Purgeable"}}' + string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/eeecb8113ad344299d57e9d44eb3694c","attributes":{"enabled":true,"created":1564528779,"updated":1564528779,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '235' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:44 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '235' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:38 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret + - api-version=7.0 + - '' - request: - body: '{"value": "crud_secret_valuec01d1319", "attributes": {"enabled": true, - "nbf": 1422864000}, "tags": {"foo": "created tag"}}' + body: '{"value": "crud_secret_valuec01d1319", "tags": {"foo": "created tag"}, + "attributes": {"enabled": true, "nbf": 1422864000}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '122' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret?api-version=7.0 response: body: - string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd","attributes":{"enabled":true,"nbf":1422864000,"created":1560296924,"updated":1560296924,"recoveryLevel":"Purgeable"},"tags":{"foo":"created + string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27","attributes":{"enabled":true,"nbf":1422864000,"created":1564528779,"updated":1564528779,"recoveryLevel":"Purgeable"},"tags":{"foo":"created tag"}}' headers: - cache-control: - - no-cache - content-length: - - '281' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:44 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '281' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:38 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/?api-version=7.0 response: body: - string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd","attributes":{"enabled":true,"nbf":1422864000,"created":1560296924,"updated":1560296924,"recoveryLevel":"Purgeable"},"tags":{"foo":"created + string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27","attributes":{"enabled":true,"nbf":1422864000,"created":1564528779,"updated":1564528779,"recoveryLevel":"Purgeable"},"tags":{"foo":"created tag"}}' headers: - cache-control: - - no-cache - content-length: - - '281' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:44 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '281' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:38 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd?api-version=7.0 + uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27?api-version=7.0 response: body: - string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd","attributes":{"enabled":true,"nbf":1422864000,"created":1560296924,"updated":1560296924,"recoveryLevel":"Purgeable"},"tags":{"foo":"created + string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27","attributes":{"enabled":true,"nbf":1422864000,"created":1564528779,"updated":1564528779,"recoveryLevel":"Purgeable"},"tags":{"foo":"created tag"}}' headers: - cache-control: - - no-cache - content-length: - - '281' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:44 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '281' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:39 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret/f75b715b3c51403198b5cbd26287da27 + - api-version=7.0 + - '' - request: - body: '{"attributes": {"exp": 2527401600, "enabled": false}, "contentType": "text/plain", + body: '{"contentType": "text/plain", "attributes": {"enabled": false, "exp": 2527401600}, "tags": {"foo": "updated tag"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '114' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PATCH - uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd?api-version=7.0 + uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27?api-version=7.0 response: body: - string: '{"contentType":"text/plain","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd","attributes":{"enabled":false,"nbf":1422864000,"exp":2527401600,"created":1560296924,"updated":1560296926,"recoveryLevel":"Purgeable"},"tags":{"foo":"updated + string: '{"contentType":"text/plain","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27","attributes":{"enabled":false,"nbf":1422864000,"exp":2527401600,"created":1564528779,"updated":1564528780,"recoveryLevel":"Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '290' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:45 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '290' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:40 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret/f75b715b3c51403198b5cbd26287da27 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret?api-version=7.0 response: body: - string: '{"contentType":"text/plain","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd","attributes":{"enabled":false,"nbf":1422864000,"exp":2527401600,"created":1560296924,"updated":1560296926,"recoveryLevel":"Purgeable"},"tags":{"foo":"updated + string: '{"contentType":"text/plain","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27","attributes":{"enabled":false,"nbf":1422864000,"exp":2527401600,"created":1564528779,"updated":1564528780,"recoveryLevel":"Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '290' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:45 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '290' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:40 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Secret not found: crud-secret"}}' headers: - cache-control: - - no-cache - content-length: - - '77' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:46 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '77' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:40 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret/ + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_list.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_list.yaml index 35c4ed11f967..96d5382039a5 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_list.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_list.yaml @@ -1,414 +1,377 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault5b50e84.vault.azure.net/secrets/sec0?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec0 + - api-version=7.0 + - '' - request: body: '{"value": "secVal05b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec0?api-version=7.0 response: body: - string: '{"value":"secVal05b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec0/bfaad709fbaa4d57ae07facbff500795","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal05b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec0/7f3cb1f832414f19a13156842b138e4f","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec0 + - api-version=7.0 + - '' - request: body: '{"value": "secVal15b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec1?api-version=7.0 response: body: - string: '{"value":"secVal15b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec1/392da3f3b4b44b71aefb2e9ffdba9321","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal15b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec1/b11f6d6c11ec4c84b08b9b759540bf96","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec1 + - api-version=7.0 + - '' - request: body: '{"value": "secVal25b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec2?api-version=7.0 response: body: - string: '{"value":"secVal25b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec2/59fa973224914f6fb53d37c20f2e87e6","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal25b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec2/f50f507c68ff48e593f32de9f03de503","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec2 + - api-version=7.0 + - '' - request: body: '{"value": "secVal35b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec3?api-version=7.0 response: body: - string: '{"value":"secVal35b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec3/050564bf189641819bc88c0d70d31ee6","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal35b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec3/699ddadf328143de8c19b32677a5b3ac","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec3 + - api-version=7.0 + - '' - request: body: '{"value": "secVal45b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec4?api-version=7.0 response: body: - string: '{"value":"secVal45b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec4/aae71679bf754b668f14bcd9bd9fe2f9","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal45b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec4/b57c587071b4448a89ecac767c62435f","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec4 + - api-version=7.0 + - '' - request: body: '{"value": "secVal55b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec5?api-version=7.0 response: body: - string: '{"value":"secVal55b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec5/48cf92ab65f340f6a98002ebf0ca4dcd","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal55b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec5/ea4090f7b0294803b170516bc009cc16","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec5 + - api-version=7.0 + - '' - request: body: '{"value": "secVal65b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec6?api-version=7.0 response: body: - string: '{"value":"secVal65b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec6/53fcee1dc3ac4805940914670cc50199","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal65b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec6/2eb7ddee8282440fb1cf9d0b37517c41","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault5b50e84.vault.azure.net/secrets?api-version=7.0 response: body: - string: '{"value":[{"id":"https://vault5b50e84.vault.azure.net/secrets/sec0","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec1","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec2","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec3","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec4","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec5","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec6","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}}],"nextLink":null}' + string: '{"value":[{"id":"https://vault5b50e84.vault.azure.net/secrets/sec0","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec1","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec2","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec3","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec4","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec5","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec6","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '1140' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '1140' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/secrets_async_preparer.py b/sdk/keyvault/azure-keyvault-secrets/tests/secrets_async_preparer.py index 6472b3d3308d..da13fcdc54c8 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/secrets_async_preparer.py +++ b/sdk/keyvault/azure-keyvault-secrets/tests/secrets_async_preparer.py @@ -6,17 +6,31 @@ from unittest.mock import Mock from azure.core.credentials import AccessToken +from azure.core.pipeline.transport import AioHttpTransport from azure.identity.aio import EnvironmentCredential +from multidict import CIMultiDict, CIMultiDictProxy + from secrets_preparer import VaultClientPreparer from secrets_vault_client_async import VaultClient +class AiohttpTestTransport(AioHttpTransport): + """Workaround to vcrpy bug: https://github.com/kevin1024/vcrpy/pull/461 + """ + async def send(self, request, **config): + response = await super(AiohttpTestTransport, self).send(request, **config) + if not isinstance(response.headers, CIMultiDictProxy): + response.headers = CIMultiDictProxy(CIMultiDict(response.internal_response.headers)) + response.content_type = response.headers.get("content-type") + return response + + class AsyncVaultClientPreparer(VaultClientPreparer): def create_vault_client(self, vault_uri): if self.is_live: credential = EnvironmentCredential() else: credential = Mock(get_token=asyncio.coroutine(lambda _: AccessToken("fake-token", 0))) - return VaultClient(vault_uri, credential) + return VaultClient(vault_uri, credential, transport=AiohttpTestTransport()) From 2baaaba26c0f05f23aa2c41466d81316a55ce889 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 31 Jul 2019 01:19:55 -0700 Subject: [PATCH 023/244] [AutoPR hanaonazure/resource-manager] Removing monitoring hana instance API (#6535) * Generated from 70b51057c4cca0cdb6a743b4e02f39c132121570 Removing monitoring hana instance API * Generated from a6757c439ed37f69147b6a7b50a20f1ca69789be Removing monitoring hana instance API * Packaging update of azure-mgmt-hanaonazure * Updated Release History --- .../azure-mgmt-hanaonazure/HISTORY.rst | 12 +++ .../azure-mgmt-hanaonazure/README.rst | 2 +- .../azure/mgmt/hanaonazure/models/_models.py | 10 +++ .../mgmt/hanaonazure/models/_models_py3.py | 12 ++- .../operations/_hana_instances_operations.py | 89 ------------------- .../azure/mgmt/hanaonazure/version.py | 2 +- .../azure-mgmt-hanaonazure/setup.py | 1 - 7 files changed, 35 insertions(+), 93 deletions(-) diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/HISTORY.rst b/sdk/hanaonazure/azure-mgmt-hanaonazure/HISTORY.rst index b99767ae2a90..cdda9582b52b 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/HISTORY.rst +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/HISTORY.rst @@ -3,6 +3,18 @@ Release History =============== +0.9.0 (2019-07-31) +++++++++++++++++++ + +**Features** + +- Model SapMonitor has a new parameter hana_db_credentials_msi_id +- Model SapMonitor has a new parameter hana_db_password_key_vault_url + +**Breaking changes** + +- Removed operation HanaInstancesOperations.enable_monitoring + 0.8.0 (2019-06-26) ++++++++++++++++++ diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/README.rst b/sdk/hanaonazure/azure-mgmt-hanaonazure/README.rst index 3751f89d5670..1c9ad134cc31 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/README.rst +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure SAP Hana on Azure Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models.py index d9c93b5d62d8..2643e4c67737 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models.py @@ -489,6 +489,12 @@ class SapMonitor(Resource): :type hana_db_username: str :param hana_db_password: Database password of the HANA instance. :type hana_db_password: str + :param hana_db_password_key_vault_url: KeyVault URL link to the password + for the HANA database. + :type hana_db_password_key_vault_url: str + :param hana_db_credentials_msi_id: MSI ID passed by customer which has + access to customer's KeyVault and to be assigned to the Collector VM. + :type hana_db_credentials_msi_id: str :ivar provisioning_state: State of provisioning of the HanaInstance. Possible values include: 'Accepted', 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', 'Migrating' @@ -516,6 +522,8 @@ class SapMonitor(Resource): 'hana_db_sql_port': {'key': 'properties.hanaDbSqlPort', 'type': 'int'}, 'hana_db_username': {'key': 'properties.hanaDbUsername', 'type': 'str'}, 'hana_db_password': {'key': 'properties.hanaDbPassword', 'type': 'str'}, + 'hana_db_password_key_vault_url': {'key': 'properties.hanaDbPasswordKeyVaultUrl', 'type': 'str'}, + 'hana_db_credentials_msi_id': {'key': 'properties.hanaDbCredentialsMsiId', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } @@ -527,6 +535,8 @@ def __init__(self, **kwargs): self.hana_db_sql_port = kwargs.get('hana_db_sql_port', None) self.hana_db_username = kwargs.get('hana_db_username', None) self.hana_db_password = kwargs.get('hana_db_password', None) + self.hana_db_password_key_vault_url = kwargs.get('hana_db_password_key_vault_url', None) + self.hana_db_credentials_msi_id = kwargs.get('hana_db_credentials_msi_id', None) self.provisioning_state = None diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models_py3.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models_py3.py index dece72c8661c..9f6950525157 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models_py3.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models_py3.py @@ -489,6 +489,12 @@ class SapMonitor(Resource): :type hana_db_username: str :param hana_db_password: Database password of the HANA instance. :type hana_db_password: str + :param hana_db_password_key_vault_url: KeyVault URL link to the password + for the HANA database. + :type hana_db_password_key_vault_url: str + :param hana_db_credentials_msi_id: MSI ID passed by customer which has + access to customer's KeyVault and to be assigned to the Collector VM. + :type hana_db_credentials_msi_id: str :ivar provisioning_state: State of provisioning of the HanaInstance. Possible values include: 'Accepted', 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', 'Migrating' @@ -516,10 +522,12 @@ class SapMonitor(Resource): 'hana_db_sql_port': {'key': 'properties.hanaDbSqlPort', 'type': 'int'}, 'hana_db_username': {'key': 'properties.hanaDbUsername', 'type': 'str'}, 'hana_db_password': {'key': 'properties.hanaDbPassword', 'type': 'str'}, + 'hana_db_password_key_vault_url': {'key': 'properties.hanaDbPasswordKeyVaultUrl', 'type': 'str'}, + 'hana_db_credentials_msi_id': {'key': 'properties.hanaDbCredentialsMsiId', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, *, location: str=None, hana_subnet: str=None, hana_hostname: str=None, hana_db_name: str=None, hana_db_sql_port: int=None, hana_db_username: str=None, hana_db_password: str=None, **kwargs) -> None: + def __init__(self, *, location: str=None, hana_subnet: str=None, hana_hostname: str=None, hana_db_name: str=None, hana_db_sql_port: int=None, hana_db_username: str=None, hana_db_password: str=None, hana_db_password_key_vault_url: str=None, hana_db_credentials_msi_id: str=None, **kwargs) -> None: super(SapMonitor, self).__init__(location=location, **kwargs) self.hana_subnet = hana_subnet self.hana_hostname = hana_hostname @@ -527,6 +535,8 @@ def __init__(self, *, location: str=None, hana_subnet: str=None, hana_hostname: self.hana_db_sql_port = hana_db_sql_port self.hana_db_username = hana_db_username self.hana_db_password = hana_db_password + self.hana_db_password_key_vault_url = hana_db_password_key_vault_url + self.hana_db_credentials_msi_id = hana_db_credentials_msi_id self.provisioning_state = None diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_hana_instances_operations.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_hana_instances_operations.py index b4932fa45b64..2165693784cd 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_hana_instances_operations.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_hana_instances_operations.py @@ -11,7 +11,6 @@ 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 @@ -737,91 +736,3 @@ def get_long_running_output(response): else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) shutdown.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}/shutdown'} - - - def _enable_monitoring_initial( - self, resource_group_name, hana_instance_name, monitoring_parameter, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.enable_monitoring.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'), - 'hanaInstanceName': self._serialize.url("hana_instance_name", hana_instance_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['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_parameter, 'MonitoringDetails') - - # 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def enable_monitoring( - self, resource_group_name, hana_instance_name, monitoring_parameter, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to add a monitor to an SAP HANA instance. - - :param resource_group_name: Name of the resource group. - :type resource_group_name: str - :param hana_instance_name: Name of the SAP HANA on Azure instance. - :type hana_instance_name: str - :param monitoring_parameter: Request body that only contains - monitoring attributes - :type monitoring_parameter: - ~azure.mgmt.hanaonazure.models.MonitoringDetails - :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._enable_monitoring_initial( - resource_group_name=resource_group_name, - hana_instance_name=hana_instance_name, - monitoring_parameter=monitoring_parameter, - 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) - enable_monitoring.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}/monitoring'} diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py index e4f3d5055303..3697d9b71739 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.8.0" +VERSION = "0.9.0" diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/setup.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/setup.py index d88dbac05eaf..57c68ff652aa 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/setup.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/setup.py @@ -64,7 +64,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', From 6484ddd3ce54ec88ca29b9a84d436ca74ecc4be1 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 10:27:22 -0700 Subject: [PATCH 024/244] KV moved paging return type to ItemPaged (#6558) * KV with latest autorest * Make KV return ItemPaged from azure-core --- .../azure/keyvault/keys/_client.py | 25 +++++-- .../azure/keyvault/keys/_shared/__init__.py | 4 +- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_generated/v2016_10_01/models/_models.py | 8 --- .../v2016_10_01/models/_models_py3.py | 8 --- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_shared/_generated/v7_0/models/_models.py | 8 --- .../_generated/v7_0/models/_models_py3.py | 8 --- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../keys/_shared/async_client_base.py | 19 ----- .../azure/keyvault/keys/aio/_client.py | 30 +++++--- .../azure/keyvault/secrets/_client.py | 25 +++++-- .../keyvault/secrets/_shared/__init__.py | 4 +- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_generated/v2016_10_01/models/_models.py | 8 --- .../v2016_10_01/models/_models_py3.py | 8 --- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_shared/_generated/v7_0/models/_models.py | 8 --- .../_generated/v7_0/models/_models_py3.py | 8 --- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../secrets/_shared/async_client_base.py | 19 ----- .../azure/keyvault/secrets/aio/_client.py | 30 +++++--- 24 files changed, 498 insertions(+), 242 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py index ee0e81d07f73..b591ffdcaf0f 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py @@ -353,8 +353,12 @@ def list_deleted_keys(self, **kwargs): :dedent: 8 """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_deleted_keys(self._vault_url, maxresults=max_page_size, **kwargs) - return (DeletedKey._from_deleted_key_item(item) for item in pages) + return self._client.get_deleted_keys( + self._vault_url, + maxresults=max_page_size, + cls=lambda objs: [DeletedKey._from_deleted_key_item(x) for x in objs], + **kwargs + ) @distributed_trace def list_keys(self, **kwargs): @@ -381,8 +385,12 @@ def list_keys(self, **kwargs): :dedent: 8 """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_keys(self._vault_url, maxresults=max_page_size, **kwargs) - return (KeyBase._from_key_item(item) for item in pages) + return self._client.get_keys( + self._vault_url, + maxresults=max_page_size, + cls=lambda objs: [KeyBase._from_key_item(x) for x in objs], + **kwargs + ) @distributed_trace def list_key_versions(self, name, **kwargs): @@ -407,8 +415,13 @@ def list_key_versions(self, name, **kwargs): :dedent: 8 """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_key_versions(self._vault_url, name, maxresults=max_page_size, **kwargs) - return (KeyBase._from_key_item(item) for item in pages) + return self._client.get_key_versions( + self._vault_url, + name, + maxresults=max_page_size, + cls=lambda objs: [KeyBase._from_key_item(x) for x in objs], + **kwargs + ) @distributed_trace def purge_deleted_key(self, name, **kwargs): diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py index beb24c202495..72fb27441900 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py @@ -49,8 +49,8 @@ def parse_vault_id(url): try: from .async_challenge_auth_policy import AsyncChallengeAuthPolicy - from .async_client_base import AsyncKeyVaultClientBase, AsyncPagingAdapter + from .async_client_base import AsyncKeyVaultClientBase - __all__.extend(["AsyncChallengeAuthPolicy", "AsyncKeyVaultClientBase", "AsyncPagingAdapter"]) + __all__.extend(["AsyncChallengeAuthPolicy", "AsyncKeyVaultClientBase"]) except (SyntaxError, ImportError): pass diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py index e918a167f2dd..d1b025916b46 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py @@ -692,14 +692,6 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py index 07d530b486f6..94ec3b96083e 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py @@ -692,14 +692,6 @@ def __init__(self, *, certificate_policy=None, certificate_attributes=None, tags self.tags = tags -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py index 24dfe4beb6a9..8b8ed5a83d62 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py @@ -753,14 +753,6 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py index 52f4aa981815..59e6f039d4b6 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py @@ -753,14 +753,6 @@ def __init__(self, *, certificate_policy=None, certificate_attributes=None, tags self.tags = tags -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py index 51f916d2938f..28bccc61f053 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py @@ -9,7 +9,7 @@ from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.keyvault.keys._models import Key, DeletedKey, KeyBase, KeyOperationResult -from azure.keyvault.keys._shared import AsyncKeyVaultClientBase, AsyncPagingAdapter +from azure.keyvault.keys._shared import AsyncKeyVaultClientBase class KeyClient(AsyncKeyVaultClientBase): @@ -354,9 +354,12 @@ def list_keys(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[KeyBase]: :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_keys(self.vault_url, maxresults=max_results, **kwargs) - iterable = AsyncPagingAdapter(pages, KeyBase._from_key_item) - return iterable + return self._client.get_keys( + self.vault_url, + maxresults=max_results, + cls=lambda objs: [KeyBase._from_key_item(x) for x in objs], + **kwargs + ) @distributed_trace def list_key_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncIterable[KeyBase]: @@ -380,9 +383,13 @@ def list_key_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncIter :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_key_versions(self.vault_url, name, maxresults=max_results, **kwargs) - iterable = AsyncPagingAdapter(pages, KeyBase._from_key_item) - return iterable + return self._client.get_key_versions( + self.vault_url, + name, + maxresults=max_results, + cls=lambda objs: [KeyBase._from_key_item(x) for x in objs], + **kwargs + ) @distributed_trace_async async def backup_key(self, name: str, **kwargs: Mapping[str, Any]) -> bytes: @@ -538,9 +545,12 @@ def list_deleted_keys(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[Delete :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_deleted_keys(self.vault_url, maxresults=max_results, **kwargs) - iterable = AsyncPagingAdapter(pages, DeletedKey._from_deleted_key_item) - return iterable + return self._client.get_deleted_keys( + self.vault_url, + maxresults=max_results, + cls=lambda objs: [DeletedKey._from_deleted_key_item(x) for x in objs], + **kwargs + ) @distributed_trace_async async def purge_deleted_key(self, name: str, **kwargs: Mapping[str, Any]) -> None: diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py index 1f0a670bf217..40678aabf7d4 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py @@ -179,8 +179,12 @@ def list_secrets(self, **kwargs): """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_secrets(self._vault_url, maxresults=max_page_size, **kwargs) - return (SecretAttributes._from_secret_item(item) for item in pages) + return self._client.get_secrets( + self._vault_url, + maxresults=max_page_size, + cls=lambda objs: [DeletedSecret._from_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace def list_secret_versions(self, name, **kwargs): @@ -206,8 +210,13 @@ def list_secret_versions(self, name, **kwargs): """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_secret_versions(self._vault_url, name, maxresults=max_page_size, **kwargs) - return (SecretAttributes._from_secret_item(item) for item in pages) + return self._client.get_secret_versions( + self._vault_url, + name, + maxresults=max_page_size, + cls=lambda objs: [DeletedSecret._from_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace def backup_secret(self, name, **kwargs): @@ -336,8 +345,12 @@ def list_deleted_secrets(self, **kwargs): """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_deleted_secrets(self._vault_url, maxresults=max_page_size, **kwargs) - return (DeletedSecret._from_deleted_secret_item(item) for item in pages) + return self._client.get_deleted_secrets( + self._vault_url, + maxresults=max_page_size, + cls=lambda objs: [DeletedSecret._from_deleted_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace def purge_deleted_secret(self, name, **kwargs): diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/__init__.py index beb24c202495..72fb27441900 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/__init__.py @@ -49,8 +49,8 @@ def parse_vault_id(url): try: from .async_challenge_auth_policy import AsyncChallengeAuthPolicy - from .async_client_base import AsyncKeyVaultClientBase, AsyncPagingAdapter + from .async_client_base import AsyncKeyVaultClientBase - __all__.extend(["AsyncChallengeAuthPolicy", "AsyncKeyVaultClientBase", "AsyncPagingAdapter"]) + __all__.extend(["AsyncChallengeAuthPolicy", "AsyncKeyVaultClientBase"]) except (SyntaxError, ImportError): pass diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py index e918a167f2dd..d1b025916b46 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py @@ -692,14 +692,6 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py index 07d530b486f6..94ec3b96083e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py @@ -692,14 +692,6 @@ def __init__(self, *, certificate_policy=None, certificate_attributes=None, tags self.tags = tags -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py index 24dfe4beb6a9..8b8ed5a83d62 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py @@ -753,14 +753,6 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py index 52f4aa981815..59e6f039d4b6 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py @@ -753,14 +753,6 @@ def __init__(self, *, certificate_policy=None, certificate_attributes=None, tags self.tags = tags -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py index 89a0fa98836e..9a4a92375ad9 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py @@ -10,7 +10,7 @@ from azure.core.tracing.decorator_async import distributed_trace_async from azure.keyvault.secrets._models import Secret, DeletedSecret, SecretAttributes -from .._shared import AsyncKeyVaultClientBase, AsyncPagingAdapter +from .._shared import AsyncKeyVaultClientBase class SecretClient(AsyncKeyVaultClientBase): @@ -182,9 +182,12 @@ def list_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[SecretAttri :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_secrets(self.vault_url, maxresults=max_results) - iterable = AsyncPagingAdapter(pages, SecretAttributes._from_secret_item) - return iterable + return self._client.get_secrets( + self.vault_url, + maxresults=max_results, + cls=lambda objs: [SecretAttributes._from_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace def list_secret_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncIterable[SecretAttributes]: @@ -208,9 +211,13 @@ def list_secret_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncI :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_secret_versions(self.vault_url, name, maxresults=max_results) - iterable = AsyncPagingAdapter(pages, SecretAttributes._from_secret_item) - return iterable + return self._client.get_secret_versions( + self.vault_url, + name, + maxresults=max_results, + cls=lambda objs: [SecretAttributes._from_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace_async async def backup_secret(self, name: str, **kwargs: Mapping[str, Any]) -> bytes: @@ -335,9 +342,12 @@ def list_deleted_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[Del :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_deleted_secrets(self.vault_url, maxresults=max_results, **kwargs) - iterable = AsyncPagingAdapter(pages, DeletedSecret._from_deleted_secret_item) - return iterable + return self._client.get_deleted_secrets( + self.vault_url, + maxresults=max_results, + cls=lambda objs: [DeletedSecret._from_deleted_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace_async async def purge_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> None: From 32bb582f0bc17c419aebcf1f5cc2f824a80c9786 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 10:33:30 -0700 Subject: [PATCH 025/244] azure-core history 1.0.0b2 (#6562) * azure-core history * Update HISTORY.md --- sdk/core/azure-core/HISTORY.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/sdk/core/azure-core/HISTORY.md b/sdk/core/azure-core/HISTORY.md index b54129f9c2e0..2123f6308b80 100644 --- a/sdk/core/azure-core/HISTORY.md +++ b/sdk/core/azure-core/HISTORY.md @@ -3,6 +3,27 @@ ------------------- +2019-08-XX Version 1.0.0b2 + +## Breaking changes + +- Transport classes don't take `config` parameter anymore (use kwargs instead) #6372 +- `azure.core.paging` has been completely refactored #6420 +- HttpResponse.content_type attribute is now a string (was a list) #6490 +- For `StreamDownloadGenerator` subclasses, `response` is now an `HttpResponse`, and not a transport response like `aiohttp.ClientResponse` or `requests.Response`. The transport response is available in `internal_response` attribute #6490 + +## Bug fixes + +- aiohttp is not required to import async pipelines classes #6496 +- `AsyncioRequestsTransport.sleep` is now a coroutine as expected #6490 +- `RequestsTransport` is not tight to `ProxyPolicy` implementation details anymore #6372 +- `AiohttpTransport` does not raise on unexpected kwargs #6355 + +## Features + +- New paging base classes that support `continuation_token` and `by_page()` #6420 +- Proxy support for `AiohttpTransport` #6372 + 2019-06-26 Version 1.0.0b1 - Preview 1 release From 26c6d78984019585fd84c3625b98347adc34ce2b Mon Sep 17 00:00:00 2001 From: Bryan Van de Ven Date: Wed, 31 Jul 2019 11:28:59 -0700 Subject: [PATCH 026/244] Make private Cosmos modules private [WIP] (#6329) * make consistent_hash_ring private * make default_retry_policy private * make endpoint_discovery_retry_policy private * make hash_partition_resolver private * make location_cache private * make murmur_hash private * make range private * make range_partition_resolver private * make vector_session_token private * make resource_throttle_retry_policy private * make retry_utility private * make utils private * make routing private * make execution_context private * make cosmos_client_connection private * make retry_options private * make query_iterable private * make constants private * make synchronized_request private * make session_retry_policy private * make partition private * make global_endpoint_manager private * make runtime_constants private * make session private * make request_object private * make base private --- .../azure/cosmos/{base.py => _base.py} | 8 +- ..._hash_ring.py => _consistent_hash_ring.py} | 8 +- .../cosmos/{constants.py => _constants.py} | 0 ...ection.py => _cosmos_client_connection.py} | 48 ++++++------ ...try_policy.py => _default_retry_policy.py} | 4 +- ...py => _endpoint_discovery_retry_policy.py} | 6 +- .../__init__.py | 0 .../aggregators.py | 2 +- .../base_execution_context.py | 14 ++-- .../document_producer.py | 8 +- .../endpoint_component.py | 2 +- .../execution_dispatcher.py | 10 +-- .../multi_execution_aggregator.py | 8 +- .../query_execution_info.py | 0 ...manager.py => _global_endpoint_manager.py} | 4 +- ...esolver.py => _hash_partition_resolver.py} | 8 +- .../{location_cache.py => _location_cache.py} | 1 - .../{murmur_hash.py => _murmur_hash.py} | 2 +- .../cosmos/{partition.py => _partition.py} | 2 +- .../{query_iterable.py => _query_iterable.py} | 4 +- .../azure/cosmos/{range.py => _range.py} | 0 ...solver.py => _range_partition_resolver.py} | 0 .../{request_object.py => _request_object.py} | 2 +- ....py => _resource_throttle_retry_policy.py} | 2 +- .../{retry_options.py => _retry_options.py} | 0 .../{retry_utility.py => _retry_utility.py} | 24 +++--- .../cosmos/{routing => _routing}/__init__.py | 0 .../collection_routing_map.py | 34 ++++---- .../routing_map_provider.py | 42 +++++----- .../{routing => _routing}/routing_range.py | 12 +-- ...ime_constants.py => _runtime_constants.py} | 0 .../azure/cosmos/{session.py => _session.py} | 12 +-- ...try_policy.py => _session_retry_policy.py} | 0 ...ed_request.py => _synchronized_request.py} | 4 +- .../azure/cosmos/{utils.py => _utils.py} | 10 +-- ...sion_token.py => _vector_session_token.py} | 1 - .../azure-cosmos/azure/cosmos/container.py | 14 ++-- .../azure/cosmos/cosmos_client.py | 8 +- .../azure-cosmos/azure/cosmos/database.py | 12 +-- .../azure-cosmos/azure/cosmos/documents.py | 4 +- .../azure-cosmos/azure/cosmos/scripts.py | 16 ++-- sdk/cosmos/azure-cosmos/azure/cosmos/user.py | 6 +- .../MultiMasterOperations/ConflictWorker.py | 1 - .../MultiMasterScenario.py | 2 +- .../azure-cosmos/test/base_unit_tests.py | 2 +- sdk/cosmos/azure-cosmos/test/crud_tests.py | 52 ++++++------- .../azure-cosmos/test/globaldb_mock_tests.py | 18 ++--- .../azure-cosmos/test/globaldb_tests.py | 18 ++--- .../azure-cosmos/test/location_cache_tests.py | 24 +++--- .../azure-cosmos/test/multimaster_tests.py | 10 +-- sdk/cosmos/azure-cosmos/test/orderby_tests.py | 4 +- sdk/cosmos/azure-cosmos/test/proxy_tests.py | 2 +- .../test/query_execution_context_tests.py | 4 +- .../azure-cosmos/test/retry_policy_tests.py | 46 +++++------ .../routing/collection_routing_map_test.py | 34 ++++---- .../routing/routing_map_provider_tests.py | 78 +++++++++---------- .../azure-cosmos/test/routing_map_tests.py | 8 +- sdk/cosmos/azure-cosmos/test/session_tests.py | 16 ++-- .../test/session_token_unit_tests.py | 2 +- .../test/streaming_failover_test.py | 24 +++--- sdk/cosmos/azure-cosmos/test/utils_tests.py | 4 +- 61 files changed, 344 insertions(+), 347 deletions(-) rename sdk/cosmos/azure-cosmos/azure/cosmos/{base.py => _base.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{consistent_hash_ring.py => _consistent_hash_ring.py} (96%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{constants.py => _constants.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{cosmos_client_connection.py => _cosmos_client_connection.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{default_retry_policy.py => _default_retry_policy.py} (96%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{endpoint_discovery_retry_policy.py => _endpoint_discovery_retry_policy.py} (94%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/__init__.py (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/aggregators.py (97%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/base_execution_context.py (94%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/document_producer.py (97%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/endpoint_component.py (97%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/execution_dispatcher.py (94%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/multi_execution_aggregator.py (95%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/query_execution_info.py (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{global_endpoint_manager.py => _global_endpoint_manager.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{hash_partition_resolver.py => _hash_partition_resolver.py} (95%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{location_cache.py => _location_cache.py} (99%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{murmur_hash.py => _murmur_hash.py} (99%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{partition.py => _partition.py} (99%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{query_iterable.py => _query_iterable.py} (97%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{range.py => _range.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{range_partition_resolver.py => _range_partition_resolver.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{request_object.py => _request_object.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{resource_throttle_retry_policy.py => _resource_throttle_retry_policy.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{retry_options.py => _retry_options.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{retry_utility.py => _retry_utility.py} (83%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{routing => _routing}/__init__.py (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{routing => _routing}/collection_routing_map.py (79%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{routing => _routing}/routing_map_provider.py (80%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{routing => _routing}/routing_range.py (89%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{runtime_constants.py => _runtime_constants.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{session.py => _session.py} (95%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{session_retry_policy.py => _session_retry_policy.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{synchronized_request.py => _synchronized_request.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{utils.py => _utils.py} (86%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{vector_session_token.py => _vector_session_token.py} (99%) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/base.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_base.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/base.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_base.py index 5fa2839f0b0d..6e4bf3e10888 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/base.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_base.py @@ -33,8 +33,8 @@ from . import documents from . import partition_key from . import http_constants -from . import constants -from . import runtime_constants +from . import _constants as constants +from . import _runtime_constants import six from six.moves.urllib.parse import quote as urllib_quote @@ -178,10 +178,10 @@ def GetHeaders(cosmos_client_connection, if verb == 'post' or verb == 'put': if not headers.get(http_constants.HttpHeaders.ContentType): - headers[http_constants.HttpHeaders.ContentType] = runtime_constants.MediaTypes.Json + headers[http_constants.HttpHeaders.ContentType] = _runtime_constants.MediaTypes.Json if not headers.get(http_constants.HttpHeaders.Accept): - headers[http_constants.HttpHeaders.Accept] = runtime_constants.MediaTypes.Json + headers[http_constants.HttpHeaders.Accept] = _runtime_constants.MediaTypes.Json if partition_key_range_id is not None: headers[http_constants.HttpHeaders.PartitionKeyRangeID] = partition_key_range_id diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/consistent_hash_ring.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_consistent_hash_ring.py similarity index 96% rename from sdk/cosmos/azure-cosmos/azure/cosmos/consistent_hash_ring.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_consistent_hash_ring.py index 6b6bdd086b62..93198b3f1d72 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/consistent_hash_ring.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_consistent_hash_ring.py @@ -26,10 +26,10 @@ import six from six.moves import xrange -from . import partition +from . import _partition -class _ConsistentHashRing(object): +class ConsistentHashRing(object): """The ConsistentHashRing class implements a consistent hash ring using the hash generator specified. """ @@ -79,13 +79,13 @@ def _ConstructPartitions(self, collection_links, partitions_per_node): using the hashing algorithm and then finally sorting the partitions based on the hash value. """ collections_node_count = len(collection_links) - partitions = [partition._Partition() for _ in xrange(0, partitions_per_node * collections_node_count)] + partitions = [_partition.Partition() for _ in xrange(0, partitions_per_node * collections_node_count)] index = 0 for collection_node in collection_links: hash_value = self.hash_generator.ComputeHash(self._GetBytes(collection_node)) for _ in xrange(0, partitions_per_node): - partitions[index] = partition._Partition(hash_value, collection_node) + partitions[index] = _partition.Partition(hash_value, collection_node) index += 1 hash_value = self.hash_generator.ComputeHash(hash_value) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/constants.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_constants.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/constants.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_constants.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client_connection.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_client_connection.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client_connection.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_client_connection.py index f7b2fe1cca57..6f9fe50a1c86 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client_connection.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_client_connection.py @@ -25,18 +25,18 @@ import six from typing import cast -from . import base +from . import _base as base from . import documents -from . import constants +from . import _constants as constants from . import http_constants -from . import query_iterable -from . import runtime_constants -from . import request_object -from . import synchronized_request -from . import global_endpoint_manager -from .routing import routing_map_provider as routing_map_provider -from . import session -from . import utils +from . import _query_iterable as query_iterable +from . import _runtime_constants as runtime_constants +from . import _request_object +from . import _synchronized_request as synchronized_request +from . import _global_endpoint_manager as global_endpoint_manager +from ._routing import routing_map_provider as routing_map_provider +from . import _session +from . import _utils from .partition_key import _Undefined, _Empty @@ -110,7 +110,7 @@ def __init__(self, http_constants.HttpHeaders.Version: http_constants.Versions.CurrentVersion, http_constants.HttpHeaders.UserAgent: - utils._get_user_agent(), + _utils.get_user_agent(), # For single partition query with aggregate functions we would try to accumulate the results on the SDK. # We need to set continuation as not expected. http_constants.HttpHeaders.IsContinuationExpected: False @@ -127,7 +127,7 @@ def __init__(self, '''create a session - this is maintained only if the default consistency level on the client is set to session, or if the user explicitly sets it as a property via setter''' - self.session = session.Session(self.url_connection) + self.session = _session.Session(self.url_connection) else: self.session = None @@ -150,7 +150,7 @@ def __init__(self, self._query_compatibility_mode = CosmosClientConnection._QueryCompatibilityMode.Default # Routing map provider - self._routing_map_provider = routing_map_provider._SmartRoutingMapProvider(self) + self._routing_map_provider = routing_map_provider.SmartRoutingMapProvider(self) database_account = self._global_endpoint_manager._GetDatabaseAccount() self._global_endpoint_manager.force_refresh(database_account) @@ -1932,7 +1932,7 @@ def ReadMedia(self, media_link): {}) # ReadMedia will always use WriteEndpoint since it's not replicated in readable Geo regions - request = request_object._RequestObject('media', documents._OperationType.Read) + request = _request_object.RequestObject('media', documents._OperationType.Read) result, self.last_response_headers = self.__Get(path, request, headers) @@ -1981,7 +1981,7 @@ def UpdateMedia(self, media_link, readable_stream, options=None): options) # UpdateMedia will use WriteEndpoint since it uses PUT operation - request = request_object._RequestObject('media', documents._OperationType.Update) + request = _request_object.RequestObject('media', documents._OperationType.Update) result, self.last_response_headers = self.__Put(path, request, readable_stream, @@ -2200,7 +2200,7 @@ def ExecuteStoredProcedure(self, sproc_link, params, options=None): options) # ExecuteStoredProcedure will use WriteEndpoint since it uses POST operation - request = request_object._RequestObject('sprocs', documents._OperationType.ExecuteJavaScript) + request = _request_object.RequestObject('sprocs', documents._OperationType.ExecuteJavaScript) result, self.last_response_headers = self.__Post(path, request, params, @@ -2389,7 +2389,7 @@ def GetDatabaseAccount(self, url_connection=None): '', # type {}) - request = request_object._RequestObject('databaseaccount', documents._OperationType.Read, url_connection) + request = _request_object.RequestObject('databaseaccount', documents._OperationType.Read, url_connection) result, self.last_response_headers = self.__Get('', request, headers) @@ -2449,7 +2449,7 @@ def Create(self, body, path, type, id, initial_headers, options=None): options) # Create will use WriteEndpoint since it uses POST operation - request = request_object._RequestObject(type, documents._OperationType.Create) + request = _request_object.RequestObject(type, documents._OperationType.Create) result, self.last_response_headers = self.__Post(path, request, body, @@ -2491,7 +2491,7 @@ def Upsert(self, body, path, type, id, initial_headers, options=None): headers[http_constants.HttpHeaders.IsUpsert] = True # Upsert will use WriteEndpoint since it uses POST operation - request = request_object._RequestObject(type, documents._OperationType.Upsert) + request = _request_object.RequestObject(type, documents._OperationType.Upsert) result, self.last_response_headers = self.__Post(path, request, body, @@ -2529,7 +2529,7 @@ def Replace(self, resource, path, type, id, initial_headers, options=None): type, options) # Replace will use WriteEndpoint since it uses PUT operation - request = request_object._RequestObject(type, documents._OperationType.Replace) + request = _request_object.RequestObject(type, documents._OperationType.Replace) result, self.last_response_headers = self.__Put(path, request, resource, @@ -2567,7 +2567,7 @@ def Read(self, path, type, id, initial_headers, options=None): type, options) # Read will use ReadEndpoint since it uses GET operation - request = request_object._RequestObject(type, documents._OperationType.Read) + request = _request_object.RequestObject(type, documents._OperationType.Read) result, self.last_response_headers = self.__Get(path, request, headers) @@ -2601,7 +2601,7 @@ def DeleteResource(self, path, type, id, initial_headers, options=None): type, options) # Delete will use WriteEndpoint since it uses DELETE operation - request = request_object._RequestObject(type, documents._OperationType.Delete) + request = _request_object.RequestObject(type, documents._OperationType.Delete) result, self.last_response_headers = self.__Delete(path, request, headers) @@ -2783,7 +2783,7 @@ def __GetBodiesFromQueryResult(result): # Copy to make sure that default_headers won't be changed. if query is None: # Query operations will use ReadEndpoint even though it uses GET(for feed requests) - request = request_object._RequestObject(type, documents._OperationType.ReadFeed) + request = _request_object.RequestObject(type, documents._OperationType.ReadFeed) headers = base.GetHeaders(self, initial_headers, 'get', @@ -2811,7 +2811,7 @@ def __GetBodiesFromQueryResult(result): raise SystemError('Unexpected query compatibility mode.') # Query operations will use ReadEndpoint even though it uses POST(for regular query operations) - request = request_object._RequestObject(type, documents._OperationType.SqlQuery) + request = _request_object.RequestObject(type, documents._OperationType.SqlQuery) headers = base.GetHeaders(self, initial_headers, 'post', diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/default_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_default_retry_policy.py similarity index 96% rename from sdk/cosmos/azure-cosmos/azure/cosmos/default_retry_policy.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_default_retry_policy.py index 1fc309c98302..8cb094c1552a 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/default_retry_policy.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_default_retry_policy.py @@ -23,7 +23,7 @@ """ from . import http_constants -class _DefaultRetryPolicy(object): +class DefaultRetryPolicy(object): error_codes = http_constants._ErrorCodes CONNECTION_ERROR_CODES = [ @@ -52,7 +52,7 @@ def __init__(self, *args): self.args = args def needsRetry(self, error_code): - if error_code in _DefaultRetryPolicy.CONNECTION_ERROR_CODES: + if error_code in DefaultRetryPolicy.CONNECTION_ERROR_CODES: if (len(self.args) > 0): if (self.args[4]['method'] == 'GET') or (http_constants.HttpHeaders.IsQuery in self.args[4]['headers']): return True diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/endpoint_discovery_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_endpoint_discovery_retry_policy.py similarity index 94% rename from sdk/cosmos/azure-cosmos/azure/cosmos/endpoint_discovery_retry_policy.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_endpoint_discovery_retry_policy.py index dbc1e41f845f..d3158cd20035 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/endpoint_discovery_retry_policy.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_endpoint_discovery_retry_policy.py @@ -33,7 +33,7 @@ logger.addHandler(log_handler) -class _EndpointDiscoveryRetryPolicy(object): +class EndpointDiscoveryRetryPolicy(object): """The endpoint discovery retry policy class used for geo-replicated database accounts to handle the write forbidden exceptions due to writable/readable location changes (say, after a failover). @@ -44,9 +44,9 @@ class _EndpointDiscoveryRetryPolicy(object): def __init__(self, connection_policy, global_endpoint_manager, *args): self.global_endpoint_manager = global_endpoint_manager - self._max_retry_attempt_count = _EndpointDiscoveryRetryPolicy.Max_retry_attempt_count + self._max_retry_attempt_count = EndpointDiscoveryRetryPolicy.Max_retry_attempt_count self.failover_retry_count = 0 - self.retry_after_in_milliseconds = _EndpointDiscoveryRetryPolicy.Retry_after_in_milliseconds + self.retry_after_in_milliseconds = EndpointDiscoveryRetryPolicy.Retry_after_in_milliseconds self.connection_policy = connection_policy self.request = args[0] if args else None #clear previous location-based routing directive diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/__init__.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/__init__.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/__init__.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/__init__.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/aggregators.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aggregators.py similarity index 97% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/aggregators.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aggregators.py index 402acb514fbc..2a3ed76bce64 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/aggregators.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aggregators.py @@ -22,7 +22,7 @@ """Internal class for aggregation queries implementation in the Azure Cosmos database service. """ from abc import abstractmethod, ABCMeta -from azure.cosmos.execution_context.document_producer import _OrderByHelper +from azure.cosmos._execution_context.document_producer import _OrderByHelper class _Aggregator(object): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/base_execution_context.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/base_execution_context.py similarity index 94% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/base_execution_context.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/base_execution_context.py index 42bd23269da2..e32fb2e95b28 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/base_execution_context.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/base_execution_context.py @@ -23,9 +23,9 @@ """ from collections import deque -from .. import retry_utility +from .. import _retry_utility from .. import http_constants -from .. import base +from .. import _base class _QueryExecutionContextBase(object): """ @@ -140,7 +140,7 @@ def _fetch_items_helper_with_retries(self, fetch_function): def callback(): return self._fetch_items_helper_no_retries(fetch_function) - return retry_utility._Execute(self._client, self._client._global_endpoint_manager, callback) + return _retry_utility.Execute(self._client, self._client._global_endpoint_manager, callback) class _DefaultQueryExecutionContext(_QueryExecutionContextBase): @@ -208,8 +208,8 @@ def __init__(self, client, options, database_link, query, partition_key): raise ValueError("_collection_links_length is not greater than 0.") # Creating the QueryFeed for the first collection - path = base.GetPathFromLink(self._collection_links[self._current_collection_index], 'docs') - collection_id = base.GetResourceIdOrFullNameFromLink(self._collection_links[self._current_collection_index]) + path = _base.GetPathFromLink(self._collection_links[self._current_collection_index], 'docs') + collection_id = _base.GetResourceIdOrFullNameFromLink(self._collection_links[self._current_collection_index]) self._current_collection_index += 1 @@ -241,8 +241,8 @@ def _fetch_next_block(self): # creating separate feed queries for each collection and fetching the items while not fetched_items: if self._collection_links and self._current_collection_index < self._collection_links_length: - path = base.GetPathFromLink(self._collection_links[self._current_collection_index], 'docs') - collection_id = base.GetResourceIdOrFullNameFromLink(self._collection_links[self._current_collection_index]) + path = _base.GetPathFromLink(self._collection_links[self._current_collection_index], 'docs') + collection_id = _base.GetResourceIdOrFullNameFromLink(self._collection_links[self._current_collection_index]) self._continuation = None self._has_started = False diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/document_producer.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/document_producer.py similarity index 97% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/document_producer.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/document_producer.py index c74a60e3bade..f6f7db7e911e 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/document_producer.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/document_producer.py @@ -25,8 +25,8 @@ import six import numbers from collections import deque -from azure.cosmos import base -from azure.cosmos.execution_context.base_execution_context import _DefaultQueryExecutionContext +from azure.cosmos import _base +from azure.cosmos._execution_context.base_execution_context import _DefaultQueryExecutionContext from six.moves import xrange class _DocumentProducer(object): @@ -51,8 +51,8 @@ def __init__(self, partition_key_target_range, client, collection_link, query, d self._cur_item = None # initiate execution context - path = base.GetPathFromLink(collection_link, 'docs') - collection_id = base.GetResourceIdOrFullNameFromLink(collection_link) + path = _base.GetPathFromLink(collection_link, 'docs') + collection_id = _base.GetResourceIdOrFullNameFromLink(collection_link) def fetch_fn(options): return self._client.QueryFeed(path, collection_id, diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/endpoint_component.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/endpoint_component.py similarity index 97% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/endpoint_component.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/endpoint_component.py index 868a55464639..77dda8512b00 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/endpoint_component.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/endpoint_component.py @@ -23,7 +23,7 @@ """ import numbers -from azure.cosmos.execution_context.aggregators import _AverageAggregator, _CountAggregator, _MaxAggregator, \ +from azure.cosmos._execution_context.aggregators import _AverageAggregator, _CountAggregator, _MaxAggregator, \ _MinAggregator, _SumAggregator diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/execution_dispatcher.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/execution_dispatcher.py similarity index 94% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/execution_dispatcher.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/execution_dispatcher.py index 6f7740af4f43..acc7452da9ab 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/execution_dispatcher.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/execution_dispatcher.py @@ -25,11 +25,11 @@ import json from six.moves import xrange from azure.cosmos.errors import HTTPFailure -from azure.cosmos.execution_context.base_execution_context import _QueryExecutionContextBase -from azure.cosmos.execution_context.base_execution_context import _DefaultQueryExecutionContext -from azure.cosmos.execution_context.query_execution_info import _PartitionedQueryExecutionInfo -from azure.cosmos.execution_context import endpoint_component -from azure.cosmos.execution_context import multi_execution_aggregator +from azure.cosmos._execution_context.base_execution_context import _QueryExecutionContextBase +from azure.cosmos._execution_context.base_execution_context import _DefaultQueryExecutionContext +from azure.cosmos._execution_context.query_execution_info import _PartitionedQueryExecutionInfo +from azure.cosmos._execution_context import endpoint_component +from azure.cosmos._execution_context import multi_execution_aggregator from azure.cosmos.http_constants import StatusCodes, SubStatusCodes class _ProxyQueryExecutionContext(_QueryExecutionContextBase): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/multi_execution_aggregator.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/multi_execution_aggregator.py similarity index 95% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/multi_execution_aggregator.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/multi_execution_aggregator.py index 63a2dfb3b706..f0bfb8887fd1 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/multi_execution_aggregator.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/multi_execution_aggregator.py @@ -23,9 +23,9 @@ """ import heapq -from azure.cosmos.execution_context.base_execution_context import _QueryExecutionContextBase -from azure.cosmos.execution_context import document_producer -from azure.cosmos.routing import routing_range +from azure.cosmos._execution_context.base_execution_context import _QueryExecutionContextBase +from azure.cosmos._execution_context import document_producer +from azure.cosmos._routing import routing_range class _MultiExecutionContextAggregator(_QueryExecutionContextBase): """This class is capable of queries which requires rewriting based on @@ -147,4 +147,4 @@ def _createTargetPartitionQueryExecutionContext(self, partition_key_target_range def _get_target_parition_key_range(self): query_ranges = self._partitioned_query_ex_info.get_query_ranges() - return self._routing_provider.get_overlapping_ranges(self._resource_link, [routing_range._Range.ParseFromDict(range_as_dict) for range_as_dict in query_ranges]) + return self._routing_provider.get_overlapping_ranges(self._resource_link, [routing_range.Range.ParseFromDict(range_as_dict) for range_as_dict in query_ranges]) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/query_execution_info.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/query_execution_info.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/query_execution_info.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/query_execution_info.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/global_endpoint_manager.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_global_endpoint_manager.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/global_endpoint_manager.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_global_endpoint_manager.py index 0d7ff3936b76..0c44a81a138a 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/global_endpoint_manager.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_global_endpoint_manager.py @@ -24,9 +24,9 @@ from six.moves.urllib.parse import urlparse import threading -from . import constants +from . import _constants as constants from . import errors -from .location_cache import LocationCache +from ._location_cache import LocationCache class _GlobalEndpointManager(object): """ diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/hash_partition_resolver.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_hash_partition_resolver.py similarity index 95% rename from sdk/cosmos/azure-cosmos/azure/cosmos/hash_partition_resolver.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_hash_partition_resolver.py index 8b15926ec680..fca0cfe85d6f 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/hash_partition_resolver.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_hash_partition_resolver.py @@ -22,8 +22,8 @@ """Hash partition resolver implementation in the Azure Cosmos database service. """ -from . import murmur_hash -from . import consistent_hash_ring +from . import _murmur_hash +from . import _consistent_hash_ring class HashPartitionResolver(object): """HashPartitionResolver implements partitioning based on the value of a hash function, allowing you to evenly @@ -51,9 +51,9 @@ def __init__(self, partition_key_extractor, collection_links, default_number_of_ self.collection_links = collection_links if hash_generator is None: - hash_generator = murmur_hash._MurmurHash() + hash_generator = _murmur_hash.MurmurHash() - self.consistent_hash_ring = consistent_hash_ring._ConsistentHashRing(self.collection_links, default_number_of_virtual_nodes_per_collection, hash_generator) + self.consistent_hash_ring = _consistent_hash_ring.ConsistentHashRing(self.collection_links, default_number_of_virtual_nodes_per_collection, hash_generator) def ResolveForCreate(self, document): """Resolves the collection for creating the document based on the partition key. diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/location_cache.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_location_cache.py similarity index 99% rename from sdk/cosmos/azure-cosmos/azure/cosmos/location_cache.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_location_cache.py index 1534cef4f9ea..68f7cdb23a24 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/location_cache.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_location_cache.py @@ -25,7 +25,6 @@ import collections import time -from . import base from . import documents from . import http_constants diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/murmur_hash.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_murmur_hash.py similarity index 99% rename from sdk/cosmos/azure-cosmos/azure/cosmos/murmur_hash.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_murmur_hash.py index d94b5f39044b..0785b75096e6 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/murmur_hash.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_murmur_hash.py @@ -43,7 +43,7 @@ https://pypi.python.org/pypi/mmh3/2.0 ''' -class _MurmurHash(object): +class MurmurHash(object): """ The 32 bit x86 version of MurmurHash3 implementation. """ def ComputeHash(self, key): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/partition.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_partition.py similarity index 99% rename from sdk/cosmos/azure-cosmos/azure/cosmos/partition.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_partition.py index ffd931965bca..35f1611a21bc 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/partition.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_partition.py @@ -24,7 +24,7 @@ from six.moves import xrange -class _Partition(object): +class Partition(object): """Represents a class that holds the hash value and node name for each partition. """ def __init__(self, hash_value = None, node = None): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/query_iterable.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_query_iterable.py similarity index 97% rename from sdk/cosmos/azure-cosmos/azure/cosmos/query_iterable.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_query_iterable.py index ad2e8cd98d96..8abd73b4f8c1 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/query_iterable.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_query_iterable.py @@ -21,8 +21,8 @@ """Iterable query results in the Azure Cosmos database service. """ -from azure.cosmos.execution_context import execution_dispatcher -from azure.cosmos.execution_context import base_execution_context +from azure.cosmos._execution_context import execution_dispatcher +from azure.cosmos._execution_context import base_execution_context class QueryIterable(object): """Represents an iterable object of the query results. diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/range.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_range.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/range.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_range.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/range_partition_resolver.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_range_partition_resolver.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/range_partition_resolver.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_range_partition_resolver.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/request_object.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_request_object.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/request_object.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_request_object.py index db9ef786765f..fa882a0a0c54 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/request_object.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_request_object.py @@ -21,7 +21,7 @@ """Represents a request object. """ -class _RequestObject(object): +class RequestObject(object): def __init__(self, resource_type, operation_type, endpoint_override = None): self.resource_type = resource_type self.operation_type = operation_type diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/resource_throttle_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_resource_throttle_retry_policy.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/resource_throttle_retry_policy.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_resource_throttle_retry_policy.py index f3179a1902ef..57d32fd2b8e7 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/resource_throttle_retry_policy.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_resource_throttle_retry_policy.py @@ -24,7 +24,7 @@ from . import http_constants -class _ResourceThrottleRetryPolicy(object): +class ResourceThrottleRetryPolicy(object): def __init__(self, max_retry_attempt_count, fixed_retry_interval_in_milliseconds, max_wait_time_in_seconds): self._max_retry_attempt_count = max_retry_attempt_count diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/retry_options.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_retry_options.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/retry_options.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_retry_options.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/retry_utility.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_retry_utility.py similarity index 83% rename from sdk/cosmos/azure-cosmos/azure/cosmos/retry_utility.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_retry_utility.py index 1daa9a1f8c26..95f611fe4f2d 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/retry_utility.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_retry_utility.py @@ -25,13 +25,13 @@ import time from . import errors -from . import endpoint_discovery_retry_policy -from . import resource_throttle_retry_policy -from . import default_retry_policy -from . import session_retry_policy +from . import _endpoint_discovery_retry_policy +from . import _resource_throttle_retry_policy +from . import _default_retry_policy +from . import _session_retry_policy from .http_constants import HttpHeaders, StatusCodes, SubStatusCodes -def _Execute(client, global_endpoint_manager, function, *args, **kwargs): +def Execute(client, global_endpoint_manager, function, *args, **kwargs): """Exectutes the function with passed parameters applying all retry policies :param object client: @@ -45,20 +45,20 @@ def _Execute(client, global_endpoint_manager, function, *args, **kwargs): """ # instantiate all retry policies here to be applied for each request execution - endpointDiscovery_retry_policy = endpoint_discovery_retry_policy._EndpointDiscoveryRetryPolicy(client.connection_policy, global_endpoint_manager, *args) + endpointDiscovery_retry_policy = _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy(client.connection_policy, global_endpoint_manager, *args) - resourceThrottle_retry_policy = resource_throttle_retry_policy._ResourceThrottleRetryPolicy(client.connection_policy.RetryOptions.MaxRetryAttemptCount, + resourceThrottle_retry_policy = _resource_throttle_retry_policy.ResourceThrottleRetryPolicy(client.connection_policy.RetryOptions.MaxRetryAttemptCount, client.connection_policy.RetryOptions.FixedRetryIntervalInMilliseconds, client.connection_policy.RetryOptions.MaxWaitTimeInSeconds) - defaultRetry_policy = default_retry_policy._DefaultRetryPolicy(*args) + defaultRetry_policy = _default_retry_policy.DefaultRetryPolicy(*args) - sessionRetry_policy = session_retry_policy._SessionRetryPolicy(client.connection_policy.EnableEndpointDiscovery, global_endpoint_manager, *args) + sessionRetry_policy = _session_retry_policy._SessionRetryPolicy(client.connection_policy.EnableEndpointDiscovery, global_endpoint_manager, *args) while True: try: if args: - result = _ExecuteFunction(function, global_endpoint_manager, *args, **kwargs) + result = ExecuteFunction(function, global_endpoint_manager, *args, **kwargs) else: - result = _ExecuteFunction(function, *args, **kwargs) + result = ExecuteFunction(function, *args, **kwargs) if not client.last_response_headers: client.last_response_headers = {} @@ -94,7 +94,7 @@ def _Execute(client, global_endpoint_manager, function, *args, **kwargs): # Wait for retry_after_in_milliseconds time before the next retry time.sleep(retry_policy.retry_after_in_milliseconds / 1000.0) -def _ExecuteFunction(function, *args, **kwargs): +def ExecuteFunction(function, *args, **kwargs): """ Stub method so that it can be used for mocking purposes as well. """ return function(*args, **kwargs) \ No newline at end of file diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/__init__.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/__init__.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/routing/__init__.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_routing/__init__.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/collection_routing_map.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/collection_routing_map.py similarity index 79% rename from sdk/cosmos/azure-cosmos/azure/cosmos/routing/collection_routing_map.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_routing/collection_routing_map.py index bb030c3fc223..d1f86eb05b89 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/collection_routing_map.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/collection_routing_map.py @@ -23,11 +23,11 @@ """ import bisect -from azure.cosmos.routing import routing_range -from azure.cosmos.routing.routing_range import _PartitionKeyRange +from azure.cosmos._routing import routing_range +from azure.cosmos._routing.routing_range import PartitionKeyRange from six.moves import xrange -class _CollectionRoutingMap(object): +class CollectionRoutingMap(object): """Stores partition key ranges in an efficient way with some additional information and provides convenience methods for working with set of ranges. """ @@ -40,7 +40,7 @@ def __init__(self, range_by_id, range_by_info, ordered_partition_key_ranges, ord self._rangeByInfo = range_by_info self._orderedPartitionKeyRanges = ordered_partition_key_ranges - self._orderedRanges = [routing_range._Range(pkr[_PartitionKeyRange.MinInclusive], pkr[_PartitionKeyRange.MaxExclusive], True, False) for pkr in ordered_partition_key_ranges] + self._orderedRanges = [routing_range.Range(pkr[PartitionKeyRange.MinInclusive], pkr[PartitionKeyRange.MaxExclusive], True, False) for pkr in ordered_partition_key_ranges] self._orderedPartitionInfo = ordered_partition_info self._collectionUniqueId = collection_unique_id @@ -51,15 +51,15 @@ def CompleteRoutingMap(cls, partition_key_range_info_tupple_list, collection_uni sortedRanges = [] for r in partition_key_range_info_tupple_list: - rangeById[r[0][_PartitionKeyRange.Id]] = r + rangeById[r[0][PartitionKeyRange.Id]] = r rangeByInfo[r[1]] = r[0] sortedRanges.append(r) - sortedRanges.sort(key = lambda r: r[0][_PartitionKeyRange.MinInclusive]) + sortedRanges.sort(key = lambda r: r[0][PartitionKeyRange.MinInclusive]) partitionKeyOrderedRange = [r[0] for r in sortedRanges] orderedPartitionInfo = [r[1] for r in sortedRanges] - if not _CollectionRoutingMap.is_complete_set_of_range(partitionKeyOrderedRange): return None + if not CollectionRoutingMap.is_complete_set_of_range(partitionKeyOrderedRange): return None return cls(rangeById, rangeByInfo, partitionKeyOrderedRange, orderedPartitionInfo, collection_unique_id) def get_ordered_partition_key_ranges(self): @@ -80,10 +80,10 @@ def get_range_by_effective_partition_key(self, effective_partition_key_value): The partition key range. :rtype: dict """ - if _CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey == effective_partition_key_value: + if CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey == effective_partition_key_value: return self._orderedPartitionKeyRanges[0] - if _CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey == effective_partition_key_value: + if CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey == effective_partition_key_value: return None sortedLow = [(r.min, not r.isMinInclusive) for r in self._orderedRanges] @@ -118,7 +118,7 @@ def get_overlapping_ranges(self, provided_partition_key_ranges): :rtype: list """ - if isinstance(provided_partition_key_ranges, routing_range._Range): + if isinstance(provided_partition_key_ranges, routing_range.Range): return self.get_overlapping_ranges([provided_partition_key_ranges]) minToPartitionRange = {} @@ -135,14 +135,14 @@ def get_overlapping_ranges(self, provided_partition_key_ranges): maxIndex = maxIndex - 1 for i in xrange(minIndex, maxIndex + 1): - if routing_range._Range.overlaps(self._orderedRanges[i], providedRange): - minToPartitionRange[self._orderedPartitionKeyRanges[i][_PartitionKeyRange.MinInclusive]] = self._orderedPartitionKeyRanges[i] + if routing_range.Range.overlaps(self._orderedRanges[i], providedRange): + minToPartitionRange[self._orderedPartitionKeyRanges[i][PartitionKeyRange.MinInclusive]] = self._orderedPartitionKeyRanges[i] overlapping_partition_key_ranges = list(minToPartitionRange.values()) def getKey(r): - return r[_PartitionKeyRange.MinInclusive] + return r[PartitionKeyRange.MinInclusive] overlapping_partition_key_ranges.sort(key = getKey) return overlapping_partition_key_ranges @@ -153,16 +153,16 @@ def is_complete_set_of_range(ordered_partition_key_range_list): firstRange = ordered_partition_key_range_list[0] lastRange = ordered_partition_key_range_list[-1] - isComplete = (firstRange[_PartitionKeyRange.MinInclusive] == _CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey) - isComplete &= (lastRange[_PartitionKeyRange.MaxExclusive] == _CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey) + isComplete = (firstRange[PartitionKeyRange.MinInclusive] == CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey) + isComplete &= (lastRange[PartitionKeyRange.MaxExclusive] == CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey) for i in range(1, len(ordered_partition_key_range_list)): previousRange = ordered_partition_key_range_list[i - 1] currentRange = ordered_partition_key_range_list[i] - isComplete &= previousRange[_PartitionKeyRange.MaxExclusive] == currentRange[_PartitionKeyRange.MinInclusive] + isComplete &= previousRange[PartitionKeyRange.MaxExclusive] == currentRange[PartitionKeyRange.MinInclusive] if not isComplete: - if previousRange[_PartitionKeyRange.MaxExclusive] > currentRange[_PartitionKeyRange.MinInclusive]: + if previousRange[PartitionKeyRange.MaxExclusive] > currentRange[PartitionKeyRange.MinInclusive]: raise ValueError("Ranges overlap") break diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_map_provider.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_map_provider.py similarity index 80% rename from sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_map_provider.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_map_provider.py index 73c9ed56529d..7b371e97e2d3 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_map_provider.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_map_provider.py @@ -22,14 +22,14 @@ """Internal class for partition key range cache implementation in the Azure Cosmos database service. """ -from .. import base -from .collection_routing_map import _CollectionRoutingMap +from .. import _base +from .collection_routing_map import CollectionRoutingMap from . import routing_range -from .routing_range import _PartitionKeyRange +from .routing_range import PartitionKeyRange -class _PartitionKeyRangeCache(object): +class PartitionKeyRangeCache(object): ''' - _PartitionKeyRangeCache provides list of effective partition key ranges for a collection. + PartitionKeyRangeCache provides list of effective partition key ranges for a collection. This implementation loads and caches the collection routing map per collection on demand. ''' @@ -59,7 +59,7 @@ def get_overlapping_ranges(self, collection_link, partition_key_ranges): ''' cl = self._documentClient - collection_id = base.GetResourceIdOrFullNameFromLink(collection_link) + collection_id = _base.GetResourceIdOrFullNameFromLink(collection_link) collection_routing_map = self._collection_routing_map_by_item.get(collection_id) if collection_routing_map is None: @@ -67,8 +67,8 @@ def get_overlapping_ranges(self, collection_link, partition_key_ranges): # for large collections, a split may complete between the read partition key ranges query page responses, # causing the partitionKeyRanges to have both the children ranges and their parents. Therefore, we need # to discard the parent ranges to have a valid routing map. - collection_pk_ranges = _PartitionKeyRangeCache._discard_parent_ranges(collection_pk_ranges) - collection_routing_map = _CollectionRoutingMap.CompleteRoutingMap([(r, True) for r in collection_pk_ranges], collection_id) + collection_pk_ranges = PartitionKeyRangeCache._discard_parent_ranges(collection_pk_ranges) + collection_routing_map = CollectionRoutingMap.CompleteRoutingMap([(r, True) for r in collection_pk_ranges], collection_id) self._collection_routing_map_by_item[collection_id] = collection_routing_map return collection_routing_map.get_overlapping_ranges(partition_key_ranges) @@ -76,17 +76,17 @@ def get_overlapping_ranges(self, collection_link, partition_key_ranges): def _discard_parent_ranges(partitionKeyRanges): parentIds = set() for r in partitionKeyRanges: - if isinstance(r, dict) and _PartitionKeyRange.Parents in r: - for parentId in r[_PartitionKeyRange.Parents]: + if isinstance(r, dict) and PartitionKeyRange.Parents in r: + for parentId in r[PartitionKeyRange.Parents]: parentIds.add(parentId) - return (r for r in partitionKeyRanges if r[_PartitionKeyRange.Id] not in parentIds) + return (r for r in partitionKeyRanges if r[PartitionKeyRange.Id] not in parentIds) -class _SmartRoutingMapProvider(_PartitionKeyRangeCache): +class SmartRoutingMapProvider(PartitionKeyRangeCache): """ - Efficiently uses PartitionKeyRangeCach and minimizes the unnecessary invocation of _CollectionRoutingMap.get_overlapping_ranges() + Efficiently uses PartitionKeyRangeCach and minimizes the unnecessary invocation of CollectionRoutingMap.get_overlapping_ranges() """ def __init__(self, client): - super(_SmartRoutingMapProvider, self).__init__(client) + super(SmartRoutingMapProvider, self).__init__(client) def _second_range_is_after_first_range(self, range1, range2): @@ -112,20 +112,20 @@ def _subtract_range(self, r, partition_key_range): Evaluates and returns r - partition_key_range :param dict partition_key_range: Partition key range. - :param routing_range._Range r: query range. + :param routing_range.Range r: query range. :return: The subtract r - partition_key_range. - :rtype: routing_range._Range + :rtype: routing_range.Range """ - left = max(partition_key_range[routing_range._PartitionKeyRange.MaxExclusive], r.min) + left = max(partition_key_range[routing_range.PartitionKeyRange.MaxExclusive], r.min) if left == r.min: leftInclusive = r.isMinInclusive else: leftInclusive = False - queryRange = routing_range._Range(left, r.max, leftInclusive, + queryRange = routing_range.Range(left, r.max, leftInclusive, r.isMaxInclusive) return queryRange @@ -136,7 +136,7 @@ def get_overlapping_ranges(self, collection_link, sorted_ranges): :param str collection_link: The collection link. - :param (list of routing_range._Range) sorted_ranges: The sorted list of non-overlapping ranges. + :param (list of routing_range.Range) sorted_ranges: The sorted list of non-overlapping ranges. :return: List of partition key ranges. :rtype: list of dict @@ -163,11 +163,11 @@ def get_overlapping_ranges(self, collection_link, sorted_ranges): else: queryRange = currentProvidedRange - overlappingRanges = _PartitionKeyRangeCache.get_overlapping_ranges(self, collection_link, queryRange) + overlappingRanges = PartitionKeyRangeCache.get_overlapping_ranges(self, collection_link, queryRange) assert len(overlappingRanges), ("code bug: returned overlapping ranges for queryRange {} is empty".format(queryRange)) target_partition_key_ranges.extend(overlappingRanges) - lastKnownTargetRange = routing_range._Range.PartitionKeyRangeToRange(target_partition_key_ranges[-1]) + lastKnownTargetRange = routing_range.Range.PartitionKeyRangeToRange(target_partition_key_ranges[-1]) # the overlapping ranges must contain the requested range assert currentProvidedRange.max <= lastKnownTargetRange.max, "code bug: returned overlapping ranges {} does not contain the requested range {}".format(overlappingRanges, queryRange) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_range.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_range.py similarity index 89% rename from sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_range.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_range.py index f2ca0d76e148..fa0678f5b57c 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_range.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_range.py @@ -22,14 +22,14 @@ """Internal class for partition key range implementation in the Azure Cosmos database service. """ -class _PartitionKeyRange(object): +class PartitionKeyRange(object): """Partition Key Range Constants""" MinInclusive = 'minInclusive' MaxExclusive = 'maxExclusive' Id = 'id' Parents = 'parents' -class _Range(object): +class Range(object): """description of class""" MinPath = 'min' @@ -58,13 +58,13 @@ def contains(self, value): @classmethod def PartitionKeyRangeToRange(cls, partition_key_range): - self = cls(partition_key_range[_PartitionKeyRange.MinInclusive], partition_key_range[_PartitionKeyRange.MaxExclusive], + self = cls(partition_key_range[PartitionKeyRange.MinInclusive], partition_key_range[PartitionKeyRange.MaxExclusive], True, False) return self @classmethod def ParseFromDict(cls, range_as_dict): - self = cls(range_as_dict[_Range.MinPath], range_as_dict[_Range.MaxPath], range_as_dict[_Range.IsMinInclusivePath], range_as_dict[_Range.IsMaxInclusivePath]) + self = cls(range_as_dict[Range.MinPath], range_as_dict[Range.MaxPath], range_as_dict[Range.IsMinInclusivePath], range_as_dict[Range.IsMaxInclusivePath]) return self def isSingleValue(self): @@ -97,8 +97,8 @@ def overlaps(range1, range2): if range1 is None or range2 is None: return False if range1.isEmpty() or range2.isEmpty(): return False - cmp1 = _Range._compare_helper(range1.min, range2.max) - cmp2 = _Range._compare_helper(range2.min, range1.max) + cmp1 = Range._compare_helper(range1.min, range2.max) + cmp2 = Range._compare_helper(range2.min, range1.max) if (cmp1 <= 0 or cmp2 <= 0): if ((cmp1 == 0 and not(range1.isMinInclusive and range2.isMaxInclusive)) or (cmp2 == 0 and not(range2.isMinInclusive and range1.isMaxInclusive))): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/runtime_constants.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_runtime_constants.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/runtime_constants.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_runtime_constants.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/session.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_session.py similarity index 95% rename from sdk/cosmos/azure-cosmos/azure/cosmos/session.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_session.py index 38eece56dec2..fe7c35cdf9d6 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/session.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_session.py @@ -25,9 +25,9 @@ import sys, traceback import threading -from . import base +from . import _base from . import http_constants -from .vector_session_token import VectorSessionToken +from ._vector_session_token import VectorSessionToken from .errors import HTTPFailure class SessionContainer(object): @@ -51,17 +51,17 @@ def get_session_token(self, resource_path): """ with self.session_lock: - is_name_based = base.IsNameBased(resource_path) + is_name_based = _base.IsNameBased(resource_path) collection_rid = '' session_token = '' try: if is_name_based: # get the collection name - collection_name = base.GetItemContainerLink(resource_path) + collection_name = _base.GetItemContainerLink(resource_path) collection_rid = self.collection_name_to_rid[collection_name] else: - collection_rid = base.GetItemContainerLink(resource_path) + collection_rid = _base.GetItemContainerLink(resource_path) if collection_rid in self.rid_to_session_token: token_dict = self.rid_to_session_token[collection_rid] @@ -112,7 +112,7 @@ def set_session_token(self, response_result, response_headers): response_result_id = response_result[response_result_id_key] else: return - collection_rid, collection_name = base.GetItemContainerInfo(self_link, alt_content_path, response_result_id) + collection_rid, collection_name = _base.GetItemContainerInfo(self_link, alt_content_path, response_result_id) except ValueError: return diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/session_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_session_retry_policy.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/session_retry_policy.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_session_retry_policy.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/synchronized_request.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_synchronized_request.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/synchronized_request.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_synchronized_request.py index 9538a993580c..2ba8c1b2cdd8 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/synchronized_request.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_synchronized_request.py @@ -30,7 +30,7 @@ from . import documents from . import errors from . import http_constants -from . import retry_utility +from . import _retry_utility def _IsReadableStream(obj): """Checks whether obj is a file-like readable stream. @@ -224,5 +224,5 @@ def SynchronizedRequest(client, request_options['headers'][http_constants.HttpHeaders.ContentLength] = 0 # Pass _Request function with it's parameters to retry_utility's Execute method that wraps the call with retries - return retry_utility._Execute(client, global_endpoint_manager, _Request, request, connection_policy, requests_session, path, request_options, request_body) + return _retry_utility.Execute(client, global_endpoint_manager, _Request, request, connection_policy, requests_session, path, request_options, request_body) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/utils.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_utils.py similarity index 86% rename from sdk/cosmos/azure-cosmos/azure/cosmos/utils.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_utils.py index e20216199ef5..8178ef426084 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/utils.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_utils.py @@ -26,17 +26,17 @@ import re as re from . import http_constants -def _get_user_agent(): - os_name = _safe_user_agent_header(platform.system()) - os_version = _safe_user_agent_header(platform.release()) - python_version = _safe_user_agent_header(platform.python_version()) +def get_user_agent(): + os_name = safe_user_agent_header(platform.system()) + os_version = safe_user_agent_header(platform.release()) + python_version = safe_user_agent_header(platform.python_version()) user_agent = "{}/{} Python/{} {}/{}".format(os_name, os_version, python_version, http_constants.Versions.SDKName, http_constants.Versions.SDKVersion) return user_agent -def _safe_user_agent_header(s): +def safe_user_agent_header(s): if s is None: s = "unknown" # remove all white spaces diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/vector_session_token.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_vector_session_token.py similarity index 99% rename from sdk/cosmos/azure-cosmos/azure/cosmos/vector_session_token.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_vector_session_token.py index 1dfee1974e6b..d2cd6920fc1c 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/vector_session_token.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_vector_session_token.py @@ -23,7 +23,6 @@ """ from . import errors -from . import base from .http_constants import StatusCodes class VectorSessionToken(object): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/container.py b/sdk/cosmos/azure-cosmos/azure/cosmos/container.py index 8326d5224260..7d2b9fd35795 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/container.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/container.py @@ -23,12 +23,12 @@ """ import six -from .cosmos_client_connection import CosmosClientConnection +from ._cosmos_client_connection import CosmosClientConnection from .errors import HTTPFailure from .http_constants import StatusCodes from .offer import Offer from .scripts import Scripts -from .query_iterable import QueryIterable +from ._query_iterable import QueryIterable from .partition_key import NonePartitionKeyValue from typing import ( Any, @@ -222,7 +222,7 @@ def read_all_items( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of items (dicts). + :returns: An Iterable of items (dicts). """ if not feed_options: feed_options = {} # type: Dict[str, Any] @@ -264,7 +264,7 @@ def query_items_change_feed( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of items (dicts). + :returns: An Iterable of items (dicts). """ if not feed_options: @@ -317,7 +317,7 @@ def query_items( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of items (dicts). + :returns: An Iterable of items (dicts). You can use any value for the container name in the FROM clause, but typically the container name is used. In the examples below, the container name is "products," and is aliased as "p" for easier referencing @@ -675,7 +675,7 @@ def read_all_conflicts( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of conflicts (dicts). + :returns: An Iterable of conflicts (dicts). """ if not feed_options: @@ -712,7 +712,7 @@ def query_conflicts( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of conflicts (dicts). + :returns: An Iterable of conflicts (dicts). """ if not feed_options: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client.py b/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client.py index f1de1976f98a..a4d5ff828734 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client.py @@ -23,10 +23,10 @@ """ import six -from .cosmos_client_connection import CosmosClientConnection +from ._cosmos_client_connection import CosmosClientConnection from .database import Database from .documents import ConnectionPolicy, DatabaseAccount -from .query_iterable import QueryIterable +from ._query_iterable import QueryIterable from typing import ( Any, Callable, @@ -184,7 +184,7 @@ def read_all_databases( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of database properties (dicts). + :returns: An Iterable of database properties (dicts). """ if not feed_options: @@ -231,7 +231,7 @@ def query_databases( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of database properties (dicts). + :returns: An Iterable of database properties (dicts). """ if not feed_options: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/database.py b/sdk/cosmos/azure-cosmos/azure/cosmos/database.py index 68ef288106e5..21df096ca050 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/database.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/database.py @@ -23,13 +23,13 @@ """ import six -from .cosmos_client_connection import CosmosClientConnection +from ._cosmos_client_connection import CosmosClientConnection from .container import Container from .offer import Offer from .http_constants import StatusCodes from .errors import HTTPFailure from .user import User -from .query_iterable import QueryIterable +from ._query_iterable import QueryIterable from .partition_key import PartitionKey from typing import ( @@ -332,7 +332,7 @@ def read_all_containers( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of container properties (dicts). + :returns: An Iterable of container properties (dicts). .. literalinclude:: ../../examples/examples.py :start-after: [START list_containers] @@ -385,7 +385,7 @@ def query_containers( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of container properties (dicts). + :returns: An Iterable of container properties (dicts). """ if not feed_options: @@ -503,7 +503,7 @@ def read_all_users( :param max_item_count: Max number of users to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of user properties (dicts). + :returns: An Iterable of user properties (dicts). """ if not feed_options: @@ -536,7 +536,7 @@ def query_users( :param max_item_count: Max number of users to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of user properties (dicts). + :returns: An Iterable of user properties (dicts). """ if not feed_options: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/documents.py b/sdk/cosmos/azure-cosmos/azure/cosmos/documents.py index fc45f5157dfc..33be86d9004f 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/documents.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/documents.py @@ -22,7 +22,7 @@ """AzureDocument classes and enums for the Azure Cosmos database service. """ -from . import retry_options +from . import _retry_options class DatabaseAccount(object): """Database account. A DatabaseAccount is the container for databases. @@ -368,7 +368,7 @@ def __init__(self): self.ProxyConfiguration = None self.EnableEndpointDiscovery = True self.PreferredLocations = [] - self.RetryOptions = retry_options.RetryOptions() + self.RetryOptions = _retry_options.RetryOptions() self.DisableSSLVerification = False self.UseMultipleWriteLocations = False diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/scripts.py b/sdk/cosmos/azure-cosmos/azure/cosmos/scripts.py index 7487c36a4d3b..52f9ccfdd6e3 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/scripts.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/scripts.py @@ -23,9 +23,9 @@ """ import six -from azure.cosmos.cosmos_client_connection import CosmosClientConnection +from azure.cosmos._cosmos_client_connection import CosmosClientConnection from .partition_key import NonePartitionKeyValue -from.query_iterable import QueryIterable +from ._query_iterable import QueryIterable from typing import ( Any, List, @@ -64,7 +64,7 @@ def list_stored_procedures( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of stored procedures (dicts). + :returns: An Iterable of stored procedures (dicts). """ if not feed_options: @@ -91,7 +91,7 @@ def query_stored_procedures( :param parameters: Optional array of parameters to the query. Ignored if no query is provided. :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of stored procedures (dicts). + :returns: An Iterable of stored procedures (dicts). """ if not feed_options: @@ -246,7 +246,7 @@ def list_triggers( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of triggers (dicts). + :returns: An Iterable of triggers (dicts). """ if not feed_options: @@ -273,7 +273,7 @@ def query_triggers( :param parameters: Optional array of parameters to the query. Ignored if no query is provided. :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of triggers (dicts). + :returns: An Iterable of triggers (dicts). """ if not feed_options: @@ -394,7 +394,7 @@ def list_user_defined_functions( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of user defined functions (dicts). + :returns: An Iterable of user defined functions (dicts). """ if not feed_options: @@ -421,7 +421,7 @@ def query_user_defined_functions( :param parameters: Optional array of parameters to the query. Ignored if no query is provided. :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of user defined functions (dicts). + :returns: An Iterable of user defined functions (dicts). """ if not feed_options: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/user.py b/sdk/cosmos/azure-cosmos/azure/cosmos/user.py index f7c212c56c27..9b1eaf39236b 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/user.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/user.py @@ -23,7 +23,7 @@ """ import six -from .cosmos_client_connection import CosmosClientConnection +from ._cosmos_client_connection import CosmosClientConnection from typing import ( Any, List, @@ -99,7 +99,7 @@ def read_all_permissions( :param max_item_count: Max number of permissions to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of permissions (dicts). + :returns: An Iterable of permissions (dicts). """ if not feed_options: @@ -133,7 +133,7 @@ def query_permissions( :param max_item_count: Max number of permissions to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of permissions (dicts). + :returns: An Iterable of permissions (dicts). """ if not feed_options: diff --git a/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/ConflictWorker.py b/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/ConflictWorker.py index 52f31029be52..a714278dc71d 100644 --- a/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/ConflictWorker.py +++ b/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/ConflictWorker.py @@ -4,7 +4,6 @@ import json import azure.cosmos.errors as errors from azure.cosmos.http_constants import StatusCodes -import azure.cosmos.base as base class ConflictWorker(object): def __init__(self, database_name, basic_collection_name, manual_collection_name, lww_collection_name, udp_collection_name): diff --git a/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/MultiMasterScenario.py b/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/MultiMasterScenario.py index 8b36c27ba0fe..8b97f0899838 100644 --- a/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/MultiMasterScenario.py +++ b/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/MultiMasterScenario.py @@ -3,7 +3,7 @@ from Worker import Worker from multiprocessing.pool import ThreadPool import azure.cosmos.documents as documents -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection class MultiMasterScenario(object): def __init__(self): diff --git a/sdk/cosmos/azure-cosmos/test/base_unit_tests.py b/sdk/cosmos/azure-cosmos/test/base_unit_tests.py index 2dd41a646231..cd0082c5582e 100644 --- a/sdk/cosmos/azure-cosmos/test/base_unit_tests.py +++ b/sdk/cosmos/azure-cosmos/test/base_unit_tests.py @@ -1,6 +1,6 @@ import unittest import pytest -import azure.cosmos.base as base +import azure.cosmos._base as base pytestmark = pytest.mark.cosmosEmulator diff --git a/sdk/cosmos/azure-cosmos/test/crud_tests.py b/sdk/cosmos/azure-cosmos/test/crud_tests.py index 12f1d53df464..77a20f52709c 100644 --- a/sdk/cosmos/azure-cosmos/test/crud_tests.py +++ b/sdk/cosmos/azure-cosmos/test/crud_tests.py @@ -41,18 +41,18 @@ import urllib.parse as urllib import uuid import pytest -import azure.cosmos.consistent_hash_ring as consistent_hash_ring +from azure.cosmos import _consistent_hash_ring import azure.cosmos.documents as documents import azure.cosmos.errors as errors from azure.cosmos.http_constants import HttpHeaders, StatusCodes, SubStatusCodes -import azure.cosmos.murmur_hash as murmur_hash +import azure.cosmos._murmur_hash as _murmur_hash import test_config -import azure.cosmos.base as base +import azure.cosmos._base as base import azure.cosmos.cosmos_client as cosmos_client from azure.cosmos.diagnostics import RecordDiagnostics from azure.cosmos.partition_key import PartitionKey import conftest -import azure.cosmos.retry_utility as retry_utility +from azure.cosmos import _retry_utility pytestmark = pytest.mark.cosmosEmulator @@ -298,11 +298,11 @@ def test_partitioned_collection_partition_key_extraction(self): } } - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction # create document without partition key being specified created_document = created_collection.create_item(body=document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction self.assertEquals(self.last_headers[1], '["WA"]') del self.last_headers[:] @@ -315,11 +315,11 @@ def test_partitioned_collection_partition_key_extraction(self): partition_key=PartitionKey(path='/address', kind=documents.PartitionKind.Hash) ) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction # Create document with partitionkey not present as a leaf level property but a dict created_document = created_collection1.create_item(document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction self.assertEquals(self.last_headers[1], [{}]) del self.last_headers[:] @@ -331,11 +331,11 @@ def test_partitioned_collection_partition_key_extraction(self): partition_key=PartitionKey(path='/address/state/city', kind=documents.PartitionKind.Hash) ) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction # Create document with partitionkey not present in the document created_document = created_collection2.create_item(document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction self.assertEquals(self.last_headers[1], [{}]) del self.last_headers[:] @@ -358,10 +358,10 @@ def test_partitioned_collection_partition_key_extraction_special_chars(self): "level' 1*()": {"le/vel2": 'val1'} } - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction created_document = created_collection1.create_item(body=document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction self.assertEquals(self.last_headers[1], '["val1"]') del self.last_headers[:] @@ -385,11 +385,11 @@ def test_partitioned_collection_partition_key_extraction_special_chars(self): 'level\" 1*()': {'le/vel2': 'val2'} } - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction # create document without partition key being specified created_document = created_collection2.create_item(body=document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction self.assertEquals(self.last_headers[1], '["val2"]') del self.last_headers[:] @@ -851,13 +851,13 @@ def test_murmur_hash(self): str = 'afdgdd' bytes = bytearray(str, encoding='utf-8') - hash_value = murmur_hash._MurmurHash._ComputeHash(bytes) + hash_value = _murmur_hash.MurmurHash._ComputeHash(bytes) self.assertEqual(1099701186, hash_value) num = 374.0 bytes = bytearray(pack('d', num)) - hash_value = murmur_hash._MurmurHash._ComputeHash(bytes) + hash_value = _murmur_hash.MurmurHash._ComputeHash(bytes) self.assertEqual(3717946798, hash_value) self._validate_bytes("", 0x1B873593, bytearray(b'\xEE\xA8\xA2\x67'), 1738713326) @@ -878,25 +878,25 @@ def test_murmur_hash(self): 3381504877) def _validate_bytes(self, str, seed, expected_hash_bytes, expected_value): - hash_value = murmur_hash._MurmurHash._ComputeHash(bytearray(str, encoding='utf-8'), seed) + hash_value = _murmur_hash.MurmurHash._ComputeHash(bytearray(str, encoding='utf-8'), seed) bytes = bytearray(pack('I', hash_value)) self.assertEqual(expected_value, hash_value) self.assertEqual(expected_hash_bytes, bytes) def test_get_bytes(self): - actual_bytes = consistent_hash_ring._ConsistentHashRing._GetBytes("documentdb") + actual_bytes = _consistent_hash_ring.ConsistentHashRing._GetBytes("documentdb") expected_bytes = bytearray(b'\x64\x6F\x63\x75\x6D\x65\x6E\x74\x64\x62') self.assertEqual(expected_bytes, actual_bytes) - actual_bytes = consistent_hash_ring._ConsistentHashRing._GetBytes("azure") + actual_bytes = _consistent_hash_ring.ConsistentHashRing._GetBytes("azure") expected_bytes = bytearray(b'\x61\x7A\x75\x72\x65') self.assertEqual(expected_bytes, actual_bytes) - actual_bytes = consistent_hash_ring._ConsistentHashRing._GetBytes("json") + actual_bytes = _consistent_hash_ring.ConsistentHashRing._GetBytes("json") expected_bytes = bytearray(b'\x6A\x73\x6F\x6E') self.assertEqual(expected_bytes, actual_bytes) - actual_bytes = consistent_hash_ring._ConsistentHashRing._GetBytes("nosql") + actual_bytes = _consistent_hash_ring.ConsistentHashRing._GetBytes("nosql") expected_bytes = bytearray(b'\x6E\x6F\x73\x71\x6C') self.assertEqual(expected_bytes, actual_bytes) diff --git a/sdk/cosmos/azure-cosmos/test/globaldb_mock_tests.py b/sdk/cosmos/azure-cosmos/test/globaldb_mock_tests.py index c387000390d9..5c07812625bf 100644 --- a/sdk/cosmos/azure-cosmos/test/globaldb_mock_tests.py +++ b/sdk/cosmos/azure-cosmos/test/globaldb_mock_tests.py @@ -23,13 +23,13 @@ import json import pytest -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection import azure.cosmos.documents as documents import azure.cosmos.errors as errors -import azure.cosmos.constants as constants +import azure.cosmos._constants as constants from azure.cosmos.http_constants import StatusCodes -import azure.cosmos.global_endpoint_manager as global_endpoint_manager -import azure.cosmos.retry_utility as retry_utility +import azure.cosmos._global_endpoint_manager as global_endpoint_manager +from azure.cosmos import _retry_utility import test_config pytestmark = pytest.mark.cosmosEmulator @@ -132,7 +132,7 @@ def setUp(self): # Copying the original objects and functions before assigning the mock versions of them self.OriginalGetDatabaseAccountStub = global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub self.OriginalGlobalEndpointManager = global_endpoint_manager._GlobalEndpointManager - self.OriginalExecuteFunction = retry_utility._ExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction # Make azure-cosmos use the MockGlobalEndpointManager global_endpoint_manager._GlobalEndpointManager = MockGlobalEndpointManager @@ -141,13 +141,13 @@ def tearDown(self): # Restoring the original objects and functions global_endpoint_manager._GlobalEndpointManager = self.OriginalGlobalEndpointManager global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = self.OriginalGetDatabaseAccountStub - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def MockExecuteFunction(self, function, *args, **kwargs): global location_changed if self.endpoint_discovery_retry_count == 2: - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction return (json.dumps([{ 'id': 'mock database' }]), None) else: self.endpoint_discovery_retry_count += 1 @@ -158,8 +158,8 @@ def MockGetDatabaseAccountStub(self, endpoint): raise errors.HTTPFailure(StatusCodes.SERVICE_UNAVAILABLE, "Service unavailable") def MockCreateDatabase(self, client, database): - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self.MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self.MockExecuteFunction client.CreateDatabase(database) def test_globaldb_endpoint_discovery_retry_policy(self): diff --git a/sdk/cosmos/azure-cosmos/test/globaldb_tests.py b/sdk/cosmos/azure-cosmos/test/globaldb_tests.py index 5241118dbfa7..e0e8eb41db7e 100644 --- a/sdk/cosmos/azure-cosmos/test/globaldb_tests.py +++ b/sdk/cosmos/azure-cosmos/test/globaldb_tests.py @@ -26,12 +26,12 @@ import time import pytest -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection import azure.cosmos.documents as documents import azure.cosmos.errors as errors -import azure.cosmos.global_endpoint_manager as global_endpoint_manager -import azure.cosmos.endpoint_discovery_retry_policy as endpoint_discovery_retry_policy -import azure.cosmos.retry_utility as retry_utility +import azure.cosmos._global_endpoint_manager as global_endpoint_manager +from azure.cosmos import _endpoint_discovery_retry_policy +from azure.cosmos import _retry_utility from azure.cosmos.http_constants import HttpHeaders, StatusCodes, SubStatusCodes import test_config @@ -359,8 +359,8 @@ def test_globaldb_locational_endpoint_parser(self): def test_globaldb_endpoint_discovery_retry_policy_mock(self): client = cosmos_client_connection.CosmosClientConnection(Test_globaldb_tests.host, {'masterKey': Test_globaldb_tests.masterKey}) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction self.OriginalGetDatabaseAccount = client.GetDatabaseAccount client.GetDatabaseAccount = self._MockGetDatabaseAccount @@ -368,8 +368,8 @@ def test_globaldb_endpoint_discovery_retry_policy_mock(self): max_retry_attempt_count = 10 retry_after_in_milliseconds = 500 - endpoint_discovery_retry_policy._EndpointDiscoveryRetryPolicy.Max_retry_attempt_count = max_retry_attempt_count - endpoint_discovery_retry_policy._EndpointDiscoveryRetryPolicy.Retry_after_in_milliseconds = retry_after_in_milliseconds + _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy.Max_retry_attempt_count = max_retry_attempt_count + _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy.Retry_after_in_milliseconds = retry_after_in_milliseconds document_definition = { 'id': 'doc', 'name': 'sample document', @@ -382,7 +382,7 @@ def test_globaldb_endpoint_discovery_retry_policy_mock(self): self.test_coll['_self'], document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def _MockExecuteFunction(self, function, *args, **kwargs): raise errors.HTTPFailure(StatusCodes.FORBIDDEN, "Write Forbidden", {'x-ms-substatus' : SubStatusCodes.WRITE_FORBIDDEN}) diff --git a/sdk/cosmos/azure-cosmos/test/location_cache_tests.py b/sdk/cosmos/azure-cosmos/test/location_cache_tests.py index 22e2689cded4..a2772ce270e8 100644 --- a/sdk/cosmos/azure-cosmos/test/location_cache_tests.py +++ b/sdk/cosmos/azure-cosmos/test/location_cache_tests.py @@ -4,13 +4,13 @@ from time import sleep from azure.cosmos.http_constants import ResourceType -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection import azure.cosmos.documents as documents -from azure.cosmos.request_object import _RequestObject -from azure.cosmos.location_cache import LocationCache +from azure.cosmos._request_object import RequestObject +from azure.cosmos._location_cache import LocationCache import azure.cosmos.errors as errors from azure.cosmos.http_constants import StatusCodes, SubStatusCodes, HttpHeaders -import azure.cosmos.retry_utility as retry_utility +from azure.cosmos import _retry_utility import six pytestmark = pytest.mark.cosmosEmulator @@ -74,8 +74,8 @@ def test_validate_retry_on_session_not_availabe_with_disable_multiple_write_loca def validate_retry_on_session_not_availabe_with_endpoint_discovery_disabled(self, is_preferred_locations_list_empty, use_multiple_write_locations, is_read_request): self.counter = 0 - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunctionSessionReadFailureOnce + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunctionSessionReadFailureOnce self.original_get_database_account = cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount = self.mock_create_db_with_flag_enabled if use_multiple_write_locations else self.mock_create_db_with_flag_disabled enable_endpoint_discovery = False @@ -95,7 +95,7 @@ def validate_retry_on_session_not_availabe_with_endpoint_discovery_disabled(self self.assertEqual(e.sub_status, SubStatusCodes.READ_SESSION_NOTAVAILABLE) cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount = self.original_get_database_account - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def _MockExecuteFunctionSessionReadFailureOnce(self, function, *args, **kwargs): self.counter += 1 @@ -116,8 +116,8 @@ def test_validate_retry_on_session_not_availabe_with_endpoint_discovery_enabled( def validate_retry_on_session_not_availabe(self, is_preferred_locations_list_empty, use_multiple_write_locations): self.counter = 0 - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunctionSessionReadFailureTwice + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunctionSessionReadFailureTwice self.original_get_database_account = cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount = self.mock_create_db_with_flag_enabled if use_multiple_write_locations else self.mock_create_db_with_flag_disabled @@ -136,7 +136,7 @@ def validate_retry_on_session_not_availabe(self, is_preferred_locations_list_emp self.assertEqual(e.sub_status, SubStatusCodes.READ_SESSION_NOTAVAILABLE) cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount = self.original_get_database_account - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def _MockExecuteFunctionSessionReadFailureTwice(self, function, *args, **kwargs): request = args[1] @@ -376,11 +376,11 @@ def validate_request_endpoint_resolution(self, use_multiple_write_locations, end def resolve_endpoint_for_read_request(self, master_resource_type): operation_type = documents._OperationType.Read resource_type = ResourceType.Database if master_resource_type else ResourceType.Document - request = _RequestObject(resource_type, operation_type) + request = RequestObject(resource_type, operation_type) return self.location_cache.resolve_service_endpoint(request) def resolve_endpoint_for_write_request(self, resource_type, use_alternate_write_endpoint): operation_type = documents._OperationType.Create - request = _RequestObject(resource_type, operation_type) + request = RequestObject(resource_type, operation_type) request.route_to_location_with_preferred_location_flag(1 if use_alternate_write_endpoint else 0, ResourceType.IsCollectionChild(resource_type)) return self.location_cache.resolve_service_endpoint(request) diff --git a/sdk/cosmos/azure-cosmos/test/multimaster_tests.py b/sdk/cosmos/azure-cosmos/test/multimaster_tests.py index 8c0b5b24fa1a..11c740244dcc 100644 --- a/sdk/cosmos/azure-cosmos/test/multimaster_tests.py +++ b/sdk/cosmos/azure-cosmos/test/multimaster_tests.py @@ -2,9 +2,9 @@ import uuid import azure.cosmos.cosmos_client as cosmos_client import pytest -import azure.cosmos.constants as constants +import azure.cosmos._constants as constants from azure.cosmos.http_constants import HttpHeaders -import azure.cosmos.retry_utility as retry_utility +from azure.cosmos import _retry_utility import test_config from azure.cosmos.partition_key import PartitionKey @@ -31,8 +31,8 @@ def test_tentative_writes_header_not_present(self): def _validate_tentative_write_headers(self): - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction connectionPolicy = MultiMasterTests.connectionPolicy connectionPolicy.UseMultipleWriteLocations = True @@ -115,7 +115,7 @@ def _validate_tentative_write_headers(self): # Delete Database self.assertEqual(self.last_headers[10], is_allow_tentative_writes_set) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def _MockExecuteFunction(self, function, *args, **kwargs): self.counter += 1 diff --git a/sdk/cosmos/azure-cosmos/test/orderby_tests.py b/sdk/cosmos/azure-cosmos/test/orderby_tests.py index d8f85a49eb03..7b84ed856aaa 100644 --- a/sdk/cosmos/azure-cosmos/test/orderby_tests.py +++ b/sdk/cosmos/azure-cosmos/test/orderby_tests.py @@ -25,8 +25,8 @@ import azure.cosmos.documents as documents from azure.cosmos.partition_key import PartitionKey import azure.cosmos.cosmos_client as cosmos_client -from azure.cosmos import query_iterable -import azure.cosmos.base as base +from azure.cosmos import _query_iterable as query_iterable +import azure.cosmos._base as base from six.moves import xrange import test_config diff --git a/sdk/cosmos/azure-cosmos/test/proxy_tests.py b/sdk/cosmos/azure-cosmos/test/proxy_tests.py index c9144b8bec9e..552f76ee301c 100644 --- a/sdk/cosmos/azure-cosmos/test/proxy_tests.py +++ b/sdk/cosmos/azure-cosmos/test/proxy_tests.py @@ -22,7 +22,7 @@ import unittest import pytest import azure.cosmos.documents as documents -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection import test_config import six if six.PY2: diff --git a/sdk/cosmos/azure-cosmos/test/query_execution_context_tests.py b/sdk/cosmos/azure-cosmos/test/query_execution_context_tests.py index 4a0ac5692459..f8138b6d5a8a 100644 --- a/sdk/cosmos/azure-cosmos/test/query_execution_context_tests.py +++ b/sdk/cosmos/azure-cosmos/test/query_execution_context_tests.py @@ -24,8 +24,8 @@ import pytest from six.moves import xrange import azure.cosmos.cosmos_client as cosmos_client -from azure.cosmos.execution_context import base_execution_context as base_execution_context -import azure.cosmos.base as base +from azure.cosmos._execution_context import base_execution_context as base_execution_context +import azure.cosmos._base as base import test_config from azure.cosmos.partition_key import PartitionKey diff --git a/sdk/cosmos/azure-cosmos/test/retry_policy_tests.py b/sdk/cosmos/azure-cosmos/test/retry_policy_tests.py index bffe7a194d0e..f25dfce77e78 100644 --- a/sdk/cosmos/azure-cosmos/test/retry_policy_tests.py +++ b/sdk/cosmos/azure-cosmos/test/retry_policy_tests.py @@ -25,9 +25,9 @@ import pytest import azure.cosmos.documents as documents import azure.cosmos.errors as errors -import azure.cosmos.retry_options as retry_options +import azure.cosmos._retry_options as retry_options from azure.cosmos.http_constants import HttpHeaders, StatusCodes, SubStatusCodes -import azure.cosmos.retry_utility as retry_utility +from azure.cosmos import _retry_utility import test_config pytestmark = pytest.mark.cosmosEmulator @@ -78,9 +78,9 @@ def test_resource_throttle_retry_policy_default_retry_after(self): connection_policy = Test_retry_policy_tests.connectionPolicy connection_policy.RetryOptions = retry_options.RetryOptions(5) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction try: - retry_utility._ExecuteFunction = self._MockExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction document_definition = { 'id': 'doc', 'name': 'sample document', @@ -94,15 +94,15 @@ def test_resource_throttle_retry_policy_default_retry_after(self): self.assertGreaterEqual( self.created_collection.client_connection.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs], connection_policy.RetryOptions.MaxRetryAttemptCount * self.retry_after_in_milliseconds) finally: - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def test_resource_throttle_retry_policy_fixed_retry_after(self): connection_policy = Test_retry_policy_tests.connectionPolicy connection_policy.RetryOptions = retry_options.RetryOptions(5, 2000) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction try: - retry_utility._ExecuteFunction = self._MockExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction document_definition = { 'id': 'doc', 'name': 'sample document', @@ -117,15 +117,15 @@ def test_resource_throttle_retry_policy_fixed_retry_after(self): connection_policy.RetryOptions.MaxRetryAttemptCount * connection_policy.RetryOptions.FixedRetryIntervalInMilliseconds) finally: - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def test_resource_throttle_retry_policy_max_wait_time(self): connection_policy = Test_retry_policy_tests.connectionPolicy connection_policy.RetryOptions = retry_options.RetryOptions(5, 2000, 3) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction try: - retry_utility._ExecuteFunction = self._MockExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction document_definition = { 'id': 'doc', 'name': 'sample document', @@ -138,7 +138,7 @@ def test_resource_throttle_retry_policy_max_wait_time(self): self.assertGreaterEqual(self.created_collection.client_connection.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs], connection_policy.RetryOptions.MaxWaitTimeInSeconds * 1000) finally: - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def test_resource_throttle_retry_policy_query(self): connection_policy = Test_retry_policy_tests.connectionPolicy @@ -150,9 +150,9 @@ def test_resource_throttle_retry_policy_query(self): self.created_collection.create_item(body=document_definition) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction try: - retry_utility._ExecuteFunction = self._MockExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction try: list(self.created_collection.query_items( @@ -169,7 +169,7 @@ def test_resource_throttle_retry_policy_query(self): self.assertGreaterEqual(self.created_collection.client_connection.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs], connection_policy.RetryOptions.MaxRetryAttemptCount * self.retry_after_in_milliseconds) finally: - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def test_default_retry_policy_for_query(self): document_definition_1 = { 'id': 'doc1', @@ -183,9 +183,9 @@ def test_default_retry_policy_for_query(self): self.created_collection.create_item(body=document_definition_2) try: - original_execute_function = retry_utility._ExecuteFunction + original_execute_function = _retry_utility.ExecuteFunction mf = self.MockExecuteFunctionConnectionReset(original_execute_function) - retry_utility._ExecuteFunction = mf + _retry_utility.ExecuteFunction = mf docs = self.created_collection.query_items(query="Select * from c", max_item_count=1, enable_cross_partition_query=True) @@ -194,7 +194,7 @@ def test_default_retry_policy_for_query(self): self.assertEqual(result_docs[1]['id'], 'doc2') self.assertEqual(mf.counter, 12) finally: - retry_utility._ExecuteFunction = original_execute_function + _retry_utility.ExecuteFunction = original_execute_function self.created_collection.delete_item(item=result_docs[0], partition_key=result_docs[0]['id']) self.created_collection.delete_item(item=result_docs[1], partition_key=result_docs[1]['id']) @@ -207,16 +207,16 @@ def test_default_retry_policy_for_read(self): created_document = self.created_collection.create_item(body=document_definition) try: - original_execute_function = retry_utility._ExecuteFunction + original_execute_function = _retry_utility.ExecuteFunction mf = self.MockExecuteFunctionConnectionReset(original_execute_function) - retry_utility._ExecuteFunction = mf + _retry_utility.ExecuteFunction = mf doc = self.created_collection.read_item(item=created_document['id'], partition_key=created_document['id']) self.assertEqual(doc['id'], 'doc') self.assertEqual(mf.counter, 3) finally: - retry_utility._ExecuteFunction = original_execute_function + _retry_utility.ExecuteFunction = original_execute_function self.created_collection.delete_item(item=created_document, partition_key=created_document['id']) @@ -226,9 +226,9 @@ def test_default_retry_policy_for_create(self): 'key': 'value'} try: - original_execute_function = retry_utility._ExecuteFunction + original_execute_function = _retry_utility.ExecuteFunction mf = self.MockExecuteFunctionConnectionReset(original_execute_function) - retry_utility._ExecuteFunction = mf + _retry_utility.ExecuteFunction = mf created_document = {} try : @@ -241,7 +241,7 @@ def test_default_retry_policy_for_create(self): # 3 retries for readCollection. No retry for createDocument. self.assertEqual(mf.counter, 1) # TODO: The comment above implies that there should be a read in the test. But there isn't... finally: - retry_utility._ExecuteFunction = original_execute_function + _retry_utility.ExecuteFunction = original_execute_function def _MockExecuteFunction(self, function, *args, **kwargs): raise errors.HTTPFailure(StatusCodes.TOO_MANY_REQUESTS, "Request rate is too large", {HttpHeaders.RetryAfterInMilliseconds: self.retry_after_in_milliseconds}) diff --git a/sdk/cosmos/azure-cosmos/test/routing/collection_routing_map_test.py b/sdk/cosmos/azure-cosmos/test/routing/collection_routing_map_test.py index ae5fa2c011af..c6cae9afd4ce 100644 --- a/sdk/cosmos/azure-cosmos/test/routing/collection_routing_map_test.py +++ b/sdk/cosmos/azure-cosmos/test/routing/collection_routing_map_test.py @@ -21,9 +21,9 @@ import unittest import pytest -from azure.cosmos.routing.collection_routing_map import _CollectionRoutingMap -import azure.cosmos.routing.routing_range as routing_range -from azure.cosmos.routing.routing_map_provider import _PartitionKeyRangeCache +from azure.cosmos._routing.collection_routing_map import CollectionRoutingMap +import azure.cosmos._routing.routing_range as routing_range +from azure.cosmos._routing.routing_map_provider import PartitionKeyRangeCache pytestmark = pytest.mark.cosmosEmulator @@ -34,8 +34,8 @@ def test_advanced(self): partition_key_ranges = [{u'id': u'0', u'minInclusive': u'', u'maxExclusive': u'05C1C9CD673398'}, {u'id': u'1', u'minInclusive': u'05C1C9CD673398', u'maxExclusive': u'05C1D9CD673398'}, {u'id': u'2', u'minInclusive': u'05C1D9CD673398', u'maxExclusive': u'05C1E399CD6732'}, {u'id': u'3', u'minInclusive': u'05C1E399CD6732', u'maxExclusive': u'05C1E9CD673398'}, {u'id': u'4', u'minInclusive': u'05C1E9CD673398', u'maxExclusive': u'FF'}] partitionRangeWithInfo = [(r, True) for r in partition_key_ranges] - pkRange = routing_range._Range("", "FF", True, False) - collection_routing_map = _CollectionRoutingMap.CompleteRoutingMap(partitionRangeWithInfo, 'sample collection id') + pkRange = routing_range.Range("", "FF", True, False) + collection_routing_map = CollectionRoutingMap.CompleteRoutingMap(partitionRangeWithInfo, 'sample collection id') overlapping_partition_key_ranges = collection_routing_map.get_overlapping_ranges(pkRange) self.assertEqual(len(overlapping_partition_key_ranges), len(partition_key_ranges)) @@ -74,7 +74,7 @@ def get_range_id(r): return r[Id] # verify no thing is filtered out since there is no children ranges - filteredRanges = _PartitionKeyRangeCache._discard_parent_ranges(partitionKeyRanges) + filteredRanges = PartitionKeyRangeCache._discard_parent_ranges(partitionKeyRanges) self.assertEqual(['2', '0', '1', '3'], list(map(get_range_id, filteredRanges))) # add some children partition key ranges with parents Ids @@ -93,7 +93,7 @@ def get_range_id(r): Parents : ["0"]}) # verify the filtered range list has children ranges and the parent Ids are discarded - filteredRanges = _PartitionKeyRangeCache._discard_parent_ranges(partitionKeyRanges) + filteredRanges = PartitionKeyRangeCache._discard_parent_ranges(partitionKeyRanges) expectedRanges = ['2', '1', '3', '6', '7', '5'] self.assertEqual(expectedRanges, list(map(get_range_id, filteredRanges))) @@ -123,7 +123,7 @@ def test_collection_routing_map(self): 3) ] - crm = _CollectionRoutingMap.CompleteRoutingMap(partitionKeyRanges, "") + crm = CollectionRoutingMap.CompleteRoutingMap(partitionKeyRanges, "") self.assertEqual("0", crm._orderedPartitionKeyRanges[0][Id]) self.assertEqual("1", crm._orderedPartitionKeyRanges[1][Id]) @@ -144,7 +144,7 @@ def test_collection_routing_map(self): self.assertEqual("0", crm.get_range_by_partition_key_range_id("0")[Id]) self.assertEqual("1", crm.get_range_by_partition_key_range_id("1")[Id]) - fullRangeMinToMaxRange = routing_range._Range(_CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, _CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey, True, False) + fullRangeMinToMaxRange = routing_range.Range(CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey, True, False) overlappingRanges = crm.get_overlapping_ranges([fullRangeMinToMaxRange]) self.assertEqual(4, len(overlappingRanges)) @@ -154,18 +154,18 @@ def getKey(r): onlyParitionRanges.sort(key = getKey) self.assertEqual(overlappingRanges, onlyParitionRanges) - noPoint = routing_range._Range(_CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, _CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, False, False) + noPoint = routing_range.Range(CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, False, False) self.assertEqual(0, len(crm.get_overlapping_ranges([noPoint]))) - onePoint = routing_range._Range("0000000040", "0000000040", True, True) + onePoint = routing_range.Range("0000000040", "0000000040", True, True) overlappingPartitionKeyRanges = crm.get_overlapping_ranges([onePoint]) self.assertEqual(1, len(overlappingPartitionKeyRanges)) self.assertEqual("1", overlappingPartitionKeyRanges[0][Id]) ranges = [ - routing_range._Range("0000000040", "0000000045", True, True), - routing_range._Range("0000000045", "0000000046", True, True), - routing_range._Range("0000000046", "0000000050", True, True) + routing_range.Range("0000000040", "0000000045", True, True), + routing_range.Range("0000000045", "0000000046", True, True), + routing_range.Range("0000000046", "0000000050", True, True) ] overlappingPartitionKeyRanges = crm.get_overlapping_ranges(ranges) @@ -182,12 +182,12 @@ def test_invalid_routing_map(self): collectionUniqueId = "" def createRoutingMap(): - _CollectionRoutingMap.CompleteRoutingMap(partitionKeyRanges, collectionUniqueId) + CollectionRoutingMap.CompleteRoutingMap(partitionKeyRanges, collectionUniqueId) self.assertRaises(ValueError, createRoutingMap) def test_incomplete_routing_map(self): - crm = _CollectionRoutingMap.CompleteRoutingMap( + crm = CollectionRoutingMap.CompleteRoutingMap( [ ({ 'id' : "2", 'minInclusive' : "", 'maxExclusive' : "0000000030"}, 2), ({ 'id' : "3", 'minInclusive' : "0000000031", 'maxExclusive' : "FF"}, 2), @@ -195,7 +195,7 @@ def test_incomplete_routing_map(self): , "") self.assertIsNone(crm) - crm = _CollectionRoutingMap.CompleteRoutingMap( + crm = CollectionRoutingMap.CompleteRoutingMap( [ ({ 'id' : "2", 'minInclusive' : "", 'maxExclusive' : "0000000030"}, 2), ({ 'id' : "2", 'minInclusive' : "0000000030", 'maxExclusive' : "FF"}, 2), diff --git a/sdk/cosmos/azure-cosmos/test/routing/routing_map_provider_tests.py b/sdk/cosmos/azure-cosmos/test/routing/routing_map_provider_tests.py index 252c79e418d3..2601084c6fa4 100644 --- a/sdk/cosmos/azure-cosmos/test/routing/routing_map_provider_tests.py +++ b/sdk/cosmos/azure-cosmos/test/routing/routing_map_provider_tests.py @@ -21,9 +21,9 @@ import unittest import pytest -from azure.cosmos.routing.routing_map_provider import _SmartRoutingMapProvider -from azure.cosmos.routing.routing_map_provider import _CollectionRoutingMap -from azure.cosmos.routing import routing_range as routing_range +from azure.cosmos._routing.routing_map_provider import SmartRoutingMapProvider +from azure.cosmos._routing.routing_map_provider import CollectionRoutingMap +from azure.cosmos._routing import routing_range as routing_range pytestmark = pytest.mark.cosmosEmulator @@ -43,27 +43,27 @@ def setUp(self): self.smart_routing_map_provider = self.instantiate_smart_routing_map_provider(self.partition_key_ranges) partitionRangeWithInfo = map(lambda r: (r, True), self.partition_key_ranges) - self.cached_collection_routing_map = _CollectionRoutingMap.CompleteRoutingMap(partitionRangeWithInfo, 'sample collection id') + self.cached_collection_routing_map = CollectionRoutingMap.CompleteRoutingMap(partitionRangeWithInfo, 'sample collection id') def instantiate_smart_routing_map_provider(self, partition_key_ranges): client = RoutingMapProviderTests.MockedCosmosClientConnection(partition_key_ranges) - return _SmartRoutingMapProvider(client) + return SmartRoutingMapProvider(client) def test_full_range(self): # query range is the whole partition key range - pkRange = routing_range._Range("", "FF", True, False) + pkRange = routing_range.Range("", "FF", True, False) overlapping_partition_key_ranges = self.get_overlapping_ranges([pkRange]) self.assertEqual(len(overlapping_partition_key_ranges), len(self.partition_key_ranges)) self.assertEqual(overlapping_partition_key_ranges, self.partition_key_ranges) - pkRange = routing_range._Range("", "FF", False, False) + pkRange = routing_range.Range("", "FF", False, False) overlapping_partition_key_ranges = self.get_overlapping_ranges([pkRange]) self.assertEqual(overlapping_partition_key_ranges, self.partition_key_ranges) self.assertEqual(self.cached_collection_routing_map.get_overlapping_ranges([pkRange]), self.partition_key_ranges) def test_empty_ranges(self): # query range is the whole partition key range - pkRange = routing_range._Range("", "FF", True, False) + pkRange = routing_range.Range("", "FF", True, False) overlapping_partition_key_ranges = self.get_overlapping_ranges([pkRange]) self.assertEqual(len(overlapping_partition_key_ranges), len(self.partition_key_ranges)) self.assertEqual(overlapping_partition_key_ranges, self.partition_key_ranges) @@ -73,17 +73,17 @@ def test_empty_ranges(self): self.assertEqual(len(overlapping_partition_key_ranges), 0) # validate the overlaping partition key ranges results for empty ranges is empty - empty_start_range = routing_range._Range("", "", False, True) - empty_end_range = routing_range._Range("FF", "FF", False, True) - empty_range = routing_range._Range("AA", "AA", False, True) + empty_start_range = routing_range.Range("", "", False, True) + empty_end_range = routing_range.Range("FF", "FF", False, True) + empty_range = routing_range.Range("AA", "AA", False, True) self.validate_empty_query_ranges([empty_range], [empty_start_range], [empty_end_range], [empty_start_range, empty_range], [empty_start_range, empty_end_range], [empty_range, empty_end_range], [empty_range, empty_range, empty_end_range]) def test_bad_overlapping_query_ranges(self): # they share AA point - r1 = routing_range._Range("", "AA", True, True) - r2 = routing_range._Range("AA", "FF", True, False) + r1 = routing_range.Range("", "AA", True, True) + r2 = routing_range.Range("AA", "FF", True, False) def func_one_point_overlap(): self.smart_routing_map_provider.get_overlapping_ranges("sample collection id", [r1, r2]) @@ -91,16 +91,16 @@ def func_one_point_overlap(): self.assertRaises(ValueError, func_one_point_overlap) # overlapping range - r1 = routing_range._Range("", "AB", True, False) - r2 = routing_range._Range("AA", "FA", True, False) + r1 = routing_range.Range("", "AB", True, False) + r2 = routing_range.Range("AA", "FA", True, False) def func_overlap(): self.smart_routing_map_provider.get_overlapping_ranges("sample collection id", [r1, r2]) self.assertRaises(ValueError, func_overlap) - r1 = routing_range._Range("AB", "AC", True, False) - r1 = routing_range._Range("AA", "AB", True, False) + r1 = routing_range.Range("AB", "AC", True, False) + r1 = routing_range.Range("AA", "AB", True, False) def func_non_sorted(): self.smart_routing_map_provider.get_overlapping_ranges("sample collection id", [r1, r2]) @@ -108,31 +108,31 @@ def func_non_sorted(): self.assertRaises(ValueError, func_overlap) def test_empty_ranges_are_thrown_away(self): - e1 = routing_range._Range("", "", True, False) - r1 = routing_range._Range("", "AB", True, False) - e2 = routing_range._Range("AB", "AB", True, False) - r2 = routing_range._Range("AB", "AC", True, False) - e3 = routing_range._Range("AC", "AC", True, False) - e4 = routing_range._Range("AD", "AD", True, False) + e1 = routing_range.Range("", "", True, False) + r1 = routing_range.Range("", "AB", True, False) + e2 = routing_range.Range("AB", "AB", True, False) + r2 = routing_range.Range("AB", "AC", True, False) + e3 = routing_range.Range("AC", "AC", True, False) + e4 = routing_range.Range("AD", "AD", True, False) self.validate_overlapping_ranges_results([e1, r1, e2, r2, e3, e4], self.get_overlapping_ranges([r1, r2])) self.validate_against_cached_collection_results([e1, r1, e2, r2, e3, e4]) def test_simple(self): - r = routing_range._Range("AB", "AC", True, False) + r = routing_range.Range("AB", "AC", True, False) self.validate_against_cached_collection_results([r]) ranges = [ - routing_range._Range("0000000040", "0000000045", True, False), - routing_range._Range("0000000045", "0000000046", True, False), - routing_range._Range("0000000046", "0000000050", True, False) + routing_range.Range("0000000040", "0000000045", True, False), + routing_range.Range("0000000045", "0000000046", True, False), + routing_range.Range("0000000046", "0000000050", True, False) ] self.validate_against_cached_collection_results(ranges) def test_simple_boundary(self): ranges = [ - routing_range._Range("05C1C9CD673398", "05C1D9CD673398", True, False), + routing_range.Range("05C1C9CD673398", "05C1D9CD673398", True, False), ] self.validate_against_cached_collection_results(ranges) self.validate_overlapping_ranges_results(ranges, self.partition_key_ranges[1:2]) @@ -140,10 +140,10 @@ def test_simple_boundary(self): def test_two_adjacent_boundary(self): ranges = [ # self.partition_key_ranges[1] - routing_range._Range("05C1C9CD673398", "05C1D9CD673398", True, False), + routing_range.Range("05C1C9CD673398", "05C1D9CD673398", True, False), # self.partition_key_ranges[2] - routing_range._Range("05C1D9CD673398", "05C1D9CD673399", True, False), + routing_range.Range("05C1D9CD673398", "05C1D9CD673399", True, False), ] self.validate_against_cached_collection_results(ranges) self.validate_overlapping_ranges_results(ranges, self.partition_key_ranges[1:3]) @@ -151,8 +151,8 @@ def test_two_adjacent_boundary(self): def test_two_ranges_in_one_partition_key_range(self): # two ranges fall in the same partition key range ranges = [ - routing_range._Range("05C1C9CD673400", "05C1C9CD673401", True, False), - routing_range._Range("05C1C9CD673402", "05C1C9CD673403", True, False), + routing_range.Range("05C1C9CD673400", "05C1C9CD673401", True, False), + routing_range.Range("05C1C9CD673402", "05C1C9CD673403", True, False), ] self.validate_against_cached_collection_results(ranges) @@ -161,15 +161,15 @@ def test_two_ranges_in_one_partition_key_range(self): def test_complex(self): ranges = [ # all are covered by self.partition_key_ranges[1] - routing_range._Range("05C1C9CD673398", "05C1D9CD673391", True, False), - routing_range._Range("05C1D9CD673391", "05C1D9CD673392", True, False), - routing_range._Range("05C1D9CD673393", "05C1D9CD673395", True, False), - routing_range._Range("05C1D9CD673395", "05C1D9CD673395", True, False), + routing_range.Range("05C1C9CD673398", "05C1D9CD673391", True, False), + routing_range.Range("05C1D9CD673391", "05C1D9CD673392", True, False), + routing_range.Range("05C1D9CD673393", "05C1D9CD673395", True, False), + routing_range.Range("05C1D9CD673395", "05C1D9CD673395", True, False), # all are covered by self.partition_key_ranges[4]] - routing_range._Range("05C1E9CD673398", "05C1E9CD673401", True, False), - routing_range._Range("05C1E9CD673402", "05C1E9CD673403", True, False), + routing_range.Range("05C1E9CD673398", "05C1E9CD673401", True, False), + routing_range.Range("05C1E9CD673402", "05C1E9CD673403", True, False), # empty range - routing_range._Range("FF", "FF", True, False), + routing_range.Range("FF", "FF", True, False), ] self.validate_against_cached_collection_results(ranges) self.validate_overlapping_ranges_results(ranges, [self.partition_key_ranges[1], self.partition_key_ranges[4]]) diff --git a/sdk/cosmos/azure-cosmos/test/routing_map_tests.py b/sdk/cosmos/azure-cosmos/test/routing_map_tests.py index 48bbae7b173c..f2f396700be2 100644 --- a/sdk/cosmos/azure-cosmos/test/routing_map_tests.py +++ b/sdk/cosmos/azure-cosmos/test/routing_map_tests.py @@ -23,8 +23,8 @@ import pytest import azure.cosmos.documents as documents import azure.cosmos.cosmos_client as cosmos_client -from azure.cosmos.routing.routing_map_provider import _PartitionKeyRangeCache -from azure.cosmos.routing import routing_range as routing_range +from azure.cosmos._routing.routing_map_provider import PartitionKeyRangeCache +from azure.cosmos._routing import routing_range as routing_range import test_config pytestmark = pytest.mark.cosmosEmulator @@ -66,8 +66,8 @@ def test_read_partition_key_ranges(self): def test_routing_map_provider(self): partition_key_ranges = list(self.client.client_connection._ReadPartitionKeyRanges(self.collection_link)) - routing_mp = _PartitionKeyRangeCache(self.client.client_connection) - overlapping_partition_key_ranges = routing_mp.get_overlapping_ranges(self.collection_link, routing_range._Range("", "FF", True, False)) + routing_mp = PartitionKeyRangeCache(self.client.client_connection) + overlapping_partition_key_ranges = routing_mp.get_overlapping_ranges(self.collection_link, routing_range.Range("", "FF", True, False)) self.assertEqual(len(overlapping_partition_key_ranges), len(partition_key_ranges)) self.assertEqual(overlapping_partition_key_ranges, partition_key_ranges) diff --git a/sdk/cosmos/azure-cosmos/test/session_tests.py b/sdk/cosmos/azure-cosmos/test/session_tests.py index 03c28703615b..cdd0799dafd5 100644 --- a/sdk/cosmos/azure-cosmos/test/session_tests.py +++ b/sdk/cosmos/azure-cosmos/test/session_tests.py @@ -9,8 +9,8 @@ import test_config import azure.cosmos.errors as errors from azure.cosmos.http_constants import StatusCodes, SubStatusCodes, HttpHeaders -import azure.cosmos.synchronized_request as synchronized_request -import azure.cosmos.retry_utility as retry_utility +import azure.cosmos._synchronized_request as synchronized_request +from azure.cosmos import _retry_utility pytestmark = pytest.mark.cosmosEmulator @@ -62,8 +62,8 @@ def _MockExecuteFunctionSessionReadFailureOnce(self, function, *args, **kwargs): def test_clear_session_token(self): created_document = self.created_collection.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunctionSessionReadFailureOnce + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunctionSessionReadFailureOnce try: self.created_collection.read_item(item=created_document['id'], partition_key='mypk') except errors.HTTPFailure as e: @@ -71,7 +71,7 @@ def test_clear_session_token(self): 'dbs/' + self.created_db.id + '/colls/' + self.created_collection.id), "") self.assertEqual(e.status_code, StatusCodes.NOT_FOUND) self.assertEqual(e.sub_status, SubStatusCodes.READ_SESSION_NOTAVAILABLE) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def _MockExecuteFunctionInvalidSessionToken(self, function, *args, **kwargs): response = {'_self':'dbs/90U1AA==/colls/90U1AJ4o6iA=/docs/90U1AJ4o6iABCT0AAAAABA==/', 'id':'1'} @@ -79,12 +79,12 @@ def _MockExecuteFunctionInvalidSessionToken(self, function, *args, **kwargs): return (response, headers) def test_internal_server_error_raised_for_invalid_session_token_received_from_server(self): - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunctionInvalidSessionToken + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunctionInvalidSessionToken try: self.created_collection.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}) self.fail() except errors.HTTPFailure as e: self.assertEqual(e._http_error_message, "Could not parse the received session token: 2") self.assertEqual(e.status_code, StatusCodes.INTERNAL_SERVER_ERROR) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction diff --git a/sdk/cosmos/azure-cosmos/test/session_token_unit_tests.py b/sdk/cosmos/azure-cosmos/test/session_token_unit_tests.py index ecdc2b1de238..76e9482ade4f 100644 --- a/sdk/cosmos/azure-cosmos/test/session_token_unit_tests.py +++ b/sdk/cosmos/azure-cosmos/test/session_token_unit_tests.py @@ -1,6 +1,6 @@ import unittest import pytest -from azure.cosmos.vector_session_token import VectorSessionToken +from azure.cosmos._vector_session_token import VectorSessionToken from azure.cosmos.errors import CosmosError pytestmark = pytest.mark.cosmosEmulator diff --git a/sdk/cosmos/azure-cosmos/test/streaming_failover_test.py b/sdk/cosmos/azure-cosmos/test/streaming_failover_test.py index 4a594fed9e96..73ab656627b2 100644 --- a/sdk/cosmos/azure-cosmos/test/streaming_failover_test.py +++ b/sdk/cosmos/azure-cosmos/test/streaming_failover_test.py @@ -1,13 +1,13 @@ import unittest -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection import pytest import azure.cosmos.documents as documents import azure.cosmos.errors as errors from azure.cosmos.http_constants import HttpHeaders, StatusCodes, SubStatusCodes -import azure.cosmos.retry_utility as retry_utility -import azure.cosmos.endpoint_discovery_retry_policy as endpoint_discovery_retry_policy -from azure.cosmos.request_object import _RequestObject -import azure.cosmos.global_endpoint_manager as global_endpoint_manager +from azure.cosmos import _retry_utility +from azure.cosmos import _endpoint_discovery_retry_policy +from azure.cosmos._request_object import RequestObject +import azure.cosmos._global_endpoint_manager as global_endpoint_manager import azure.cosmos.http_constants as http_constants pytestmark = pytest.mark.cosmosEmulator @@ -30,8 +30,8 @@ class TestStreamingFailover(unittest.TestCase): endpoint_sequence = [] def test_streaming_failover(self): - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunctionEndpointDiscover + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunctionEndpointDiscover connection_policy = documents.ConnectionPolicy() connection_policy.PreferredLocations = self.preferred_regional_endpoints connection_policy.DisableSSLVerification = True @@ -62,7 +62,7 @@ def test_streaming_failover(self): self.assertEqual(self.endpoint_sequence[i], self.WRITE_ENDPOINT2) cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount = self.original_get_database_account - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def mock_get_database_account(self, url_connection = None): database_account = documents.DatabaseAccount() @@ -105,16 +105,16 @@ def test_retry_policy_does_not_mark_null_locations_unavailable(self): # these functions should not be called self._read_counter = 0 self._write_counter = 0 - request = _RequestObject(http_constants.ResourceType.Document, documents._OperationType.Read) - endpointDiscovery_retry_policy = endpoint_discovery_retry_policy._EndpointDiscoveryRetryPolicy(documents.ConnectionPolicy(), endpoint_manager, request) + request = RequestObject(http_constants.ResourceType.Document, documents._OperationType.Read) + endpointDiscovery_retry_policy = _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy(documents.ConnectionPolicy(), endpoint_manager, request) endpointDiscovery_retry_policy.ShouldRetry(errors.HTTPFailure(http_constants.StatusCodes.FORBIDDEN)) self.assertEqual(self._read_counter, 0) self.assertEqual(self._write_counter, 0) self._read_counter = 0 self._write_counter = 0 - request = _RequestObject(http_constants.ResourceType.Document, documents._OperationType.Create) - endpointDiscovery_retry_policy = endpoint_discovery_retry_policy._EndpointDiscoveryRetryPolicy(documents.ConnectionPolicy(), endpoint_manager, request) + request = RequestObject(http_constants.ResourceType.Document, documents._OperationType.Create) + endpointDiscovery_retry_policy = _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy(documents.ConnectionPolicy(), endpoint_manager, request) endpointDiscovery_retry_policy.ShouldRetry(errors.HTTPFailure(http_constants.StatusCodes.FORBIDDEN)) self.assertEqual(self._read_counter, 0) self.assertEqual(self._write_counter, 0) diff --git a/sdk/cosmos/azure-cosmos/test/utils_tests.py b/sdk/cosmos/azure-cosmos/test/utils_tests.py index 0dc7d7b8315a..4349502fe854 100644 --- a/sdk/cosmos/azure-cosmos/test/utils_tests.py +++ b/sdk/cosmos/azure-cosmos/test/utils_tests.py @@ -21,7 +21,7 @@ import unittest import pytest -import azure.cosmos.utils as utils +import azure.cosmos._utils as _utils import platform import azure.cosmos.http_constants as http_constants @@ -33,7 +33,7 @@ class UtilsTests(unittest.TestCase): """ def test_user_agent(self): - user_agent = utils._get_user_agent() + user_agent = _utils.get_user_agent() expected_user_agent = "{}/{} Python/{} azure-cosmos/{}".format( platform.system(), platform.release(), platform.python_version(), From a108a21e67646beadd05f0e2834f5153fdcb7ed8 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:17:51 -0700 Subject: [PATCH 027/244] Accept extension of JSON content-type (#6583) * Accept extension of JSON content-type * Adding text/something+json test * Support digit --- .../azure/core/pipeline/policies/universal.py | 9 ++++----- sdk/core/azure-core/tests/test_universal_pipeline.py | 12 ++++++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/universal.py b/sdk/core/azure-core/azure/core/pipeline/policies/universal.py index b9338950ff38..77ffd69c6a39 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/universal.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/universal.py @@ -266,10 +266,9 @@ def on_response(self, request, response): class ContentDecodePolicy(SansIOHTTPPolicy): """Policy for decoding unstreamed response content. """ - JSON_MIMETYPES = [ - 'application/json', - 'text/json' # Because we're open minded people... - ] + # Accept "text" because we're open minded people... + JSON_REGEXP = re.compile(r'^(application|text)/([0-9a-z+.]+\+)?json$') + # Name used in context CONTEXT_NAME = "deserialized_data" @@ -301,7 +300,7 @@ def deserialize_from_text(cls, response, content_type=None): if content_type is None: return data - if content_type in cls.JSON_MIMETYPES: + if cls.JSON_REGEXP.match(content_type): try: return json.loads(data_as_str) except ValueError as err: diff --git a/sdk/core/azure-core/tests/test_universal_pipeline.py b/sdk/core/azure-core/tests/test_universal_pipeline.py index cc783b0d4c74..035a462d388a 100644 --- a/sdk/core/azure-core/tests/test_universal_pipeline.py +++ b/sdk/core/azure-core/tests/test_universal_pipeline.py @@ -160,6 +160,18 @@ def body(self): result = response.context["deserialized_data"] assert result["success"] is True + # Simple JSON with complex content_type + response = build_response(b'{"success": true}', content_type="application/vnd.microsoft.appconfig.kv.v1+json") + raw_deserializer.on_response(None, response) + result = response.context["deserialized_data"] + assert result["success"] is True + + # Simple JSON with complex content_type, v2 + response = build_response(b'{"success": true}', content_type="text/vnd.microsoft.appconfig.kv.v1+json") + raw_deserializer.on_response(None, response) + result = response.context["deserialized_data"] + assert result["success"] is True + # For compat, if no content-type, decode JSON response = build_response(b'"data"') raw_deserializer.on_response(None, response) From b24fafec9b73bc78772f8478507be54584b19b22 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:40:30 -0700 Subject: [PATCH 028/244] Remove docdb mgmt package from master (#6585) --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 - sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 - sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 - .../azure-mgmt-documentdb/azure/__init__.py | 1 - .../azure/mgmt/__init__.py | 1 - .../azure/mgmt/documentdb/__init__.py | 18 - .../azure/mgmt/documentdb/document_db.py | 83 -- .../azure/mgmt/documentdb/models/__init__.py | 52 - .../documentdb/models/consistency_policy.py | 50 - .../documentdb/models/database_account.py | 117 --- .../database_account_connection_string.py | 39 - ...tabase_account_create_update_parameters.py | 90 -- ..._account_list_connection_strings_result.py | 29 - .../database_account_list_keys_result.py | 53 - ...base_account_list_read_only_keys_result.py | 41 - .../models/database_account_paged.py | 27 - .../database_account_patch_parameters.py | 31 - ...abase_account_regenerate_key_parameters.py | 33 - .../documentdb/models/document_db_enums.py | 41 - .../documentdb/models/failover_policies.py | 28 - .../mgmt/documentdb/models/failover_policy.py | 48 - .../azure/mgmt/documentdb/models/location.py | 58 -- .../azure/mgmt/documentdb/models/resource.py | 54 -- .../mgmt/documentdb/operations/__init__.py | 16 - .../database_accounts_operations.py | 918 ------------------ .../azure/mgmt/documentdb/version.py | 13 - .../azure_bdist_wheel.py | 54 -- sdk/cosmos/azure-mgmt-documentdb/build.json | 5 - .../dev_requirements.txt | 1 - .../azure-mgmt-documentdb/sdk_packaging.toml | 2 - sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 - sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 -- ..._mgmt_documentdb.test_accounts_create.yaml | 193 ---- ..._mgmt_documentdb.test_accounts_delete.yaml | 467 --------- ...gmt_documentdb.test_accounts_features.yaml | 272 ------ .../tests/test_mgmt_documentdb.py | 146 --- 36 files changed, 3147 deletions(-) delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst deleted file mode 100644 index eb7345b4071e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. :changelog: - -Release History -=============== - -0.1.3 (2017-05-02) -++++++++++++++++++ - -* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix - -0.1.2 (2017-04-20) -++++++++++++++++++ - -This wheel package is now built with the azure wheel extension - -0.1.1 (2017-03-21) -++++++++++++++++++ - -* Added support for listing database account connection strings - -0.1.0 (2017-01-31) -++++++++++++++++++ - -* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in deleted file mode 100644 index 9ecaeb15de50..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst deleted file mode 100644 index a5204ea75358..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/README.rst +++ /dev/null @@ -1,52 +0,0 @@ -Microsoft Azure SDK for Python -============================== - -This is the Microsoft Azure DocumentDB Management Client Library. - -Azure Resource Manager (ARM) is the next generation of management APIs that -replace the old Azure Service Management (ASM). - -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. - -For the older Azure Service Management (ASM) libraries, see -`azure-servicemanagement-legacy `__ library. - -For a more complete set of Azure libraries, see the `azure `__ bundle package. - - -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - -Usage -===== - -For code examples, see `DocumentDB Management -`__ -on readthedocs.org. - - -Provide Feedback -================ - -If you encounter any bugs or have suggestions, please file an issue in the -`Issues `__ -section of the project. - - -.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py deleted file mode 100755 index 3ec900145f1e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .document_db import DocumentDB -from .version import VERSION - -__all__ = ['DocumentDB'] - -__version__ = VERSION - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py deleted file mode 100755 index 5eda44ab3e32..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import ServiceClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.database_accounts_operations import DatabaseAccountsOperations -from . import models - - -class DocumentDBConfiguration(AzureConfiguration): - """Configuration for DocumentDB - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") - if not base_url: - base_url = 'https://management.azure.com' - - super(DocumentDBConfiguration, self).__init__(base_url) - - self.add_user_agent('documentdb/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class DocumentDB(object): - """Azure DocumentDB Database Service Resource Provider REST API - - :ivar config: Configuration for client. - :vartype config: DocumentDBConfiguration - - :ivar database_accounts: DatabaseAccounts operations - :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2015-04-08' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.database_accounts = DatabaseAccountsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py deleted file mode 100755 index 2ed68c568a84..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .consistency_policy import ConsistencyPolicy -from .location import Location -from .failover_policy import FailoverPolicy -from .database_account import DatabaseAccount -from .failover_policies import FailoverPolicies -from .resource import Resource -from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters -from .database_account_patch_parameters import DatabaseAccountPatchParameters -from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult -from .database_account_list_keys_result import DatabaseAccountListKeysResult -from .database_account_connection_string import DatabaseAccountConnectionString -from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult -from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters -from .database_account_paged import DatabaseAccountPaged -from .document_db_enums import ( - DatabaseAccountKind, - DatabaseAccountOfferType, - DefaultConsistencyLevel, - KeyKind, -) - -__all__ = [ - 'ConsistencyPolicy', - 'Location', - 'FailoverPolicy', - 'DatabaseAccount', - 'FailoverPolicies', - 'Resource', - 'DatabaseAccountCreateUpdateParameters', - 'DatabaseAccountPatchParameters', - 'DatabaseAccountListReadOnlyKeysResult', - 'DatabaseAccountListKeysResult', - 'DatabaseAccountConnectionString', - 'DatabaseAccountListConnectionStringsResult', - 'DatabaseAccountRegenerateKeyParameters', - 'DatabaseAccountPaged', - 'DatabaseAccountKind', - 'DatabaseAccountOfferType', - 'DefaultConsistencyLevel', - 'KeyKind', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py deleted file mode 100755 index d8cefd4c0b59..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConsistencyPolicy(Model): - """The consistency policy for the DocumentDB database account. - - :param default_consistency_level: The default consistency level and - configuration settings of the DocumentDB account. Possible values include: - 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' - :type default_consistency_level: str or :class:`DefaultConsistencyLevel - ` - :param max_staleness_prefix: When used with the Bounded Staleness - consistency level, this value represents the number of stale requests - tolerated. Accepted range for this value is 1 – 2,147,483,647. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_staleness_prefix: long - :param max_interval_in_seconds: When used with the Bounded Staleness - consistency level, this value represents the time amount of staleness (in - seconds) tolerated. Accepted range for this value is 1 - 100. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_interval_in_seconds: int - """ - - _validation = { - 'default_consistency_level': {'required': True}, - 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, - 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, - 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, - 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, - } - - def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): - self.default_consistency_level = default_consistency_level - self.max_staleness_prefix = max_staleness_prefix - self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py deleted file mode 100755 index 89031adc35cb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccount(Resource): - """A DocumentDB database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param provisioning_state: - :type provisioning_state: str - :ivar document_endpoint: The connection endpoint for the DocumentDB - database account. - :vartype document_endpoint: str - :ivar database_account_offer_type: The offer type for the DocumentDB - database account. Default value: Standard. Possible values include: - 'Standard' - :vartype database_account_offer_type: str or - :class:`DatabaseAccountOfferType - ` - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - :param consistency_policy: The consistency policy for the DocumentDB - database account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :ivar write_locations: An array that contains the write location for the - DocumentDB account. - :vartype write_locations: list of :class:`Location - ` - :ivar read_locations: An array that contains of the read locations enabled - for the DocumentDB account. - :vartype read_locations: list of :class:`Location - ` - :ivar failover_policies: An array that contains the regions ordered by - their failover priorities. - :vartype failover_policies: list of :class:`FailoverPolicy - ` - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'document_endpoint': {'readonly': True}, - 'database_account_offer_type': {'readonly': True}, - 'write_locations': {'readonly': True}, - 'read_locations': {'readonly': True}, - 'failover_policies': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, - 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, - 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): - super(DatabaseAccount, self).__init__(location=location, tags=tags) - self.kind = kind - self.provisioning_state = provisioning_state - self.document_endpoint = None - self.database_account_offer_type = None - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover - self.consistency_policy = consistency_policy - self.write_locations = None - self.read_locations = None - self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py deleted file mode 100755 index db1828208069..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountConnectionString(Model): - """Connection string for the DocumentDB account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar connection_string: Value of the connection string - :vartype connection_string: str - :ivar description: Description of the connection string - :vartype description: str - """ - - _validation = { - 'connection_string': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self): - self.connection_string = None - self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py deleted file mode 100755 index 30978f482f0b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccountCreateUpdateParameters(Resource): - """Parameters to create and update DocumentDB database accounts. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param consistency_policy: The consistency policy for the DocumentDB - account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :param locations: An array that contains the georeplication locations - enabled for the DocumentDB account. - :type locations: list of :class:`Location - ` - :ivar database_account_offer_type: Default value: "Standard" . - :vartype database_account_offer_type: str - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - } - - database_account_offer_type = "Standard" - - def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): - super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) - self.kind = kind - self.consistency_policy = consistency_policy - self.locations = locations - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py deleted file mode 100755 index 7cddc00a3de1..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListConnectionStringsResult(Model): - """The connection strings for the given database account. - - :param connection_strings: An array that contains the connection strings - for the DocumentDB account. - :type connection_strings: list of :class:`DatabaseAccountConnectionString - ` - """ - - _attribute_map = { - 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, - } - - def __init__(self, connection_strings=None): - self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py deleted file mode 100755 index 4d775054ac14..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListKeysResult(Model): - """The access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_master_key: Base 64 encoded value of the primary read-write - key. - :vartype primary_master_key: str - :ivar secondary_master_key: Base 64 encoded value of the secondary - read-write key. - :vartype secondary_master_key: str - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_master_key': {'readonly': True}, - 'secondary_master_key': {'readonly': True}, - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, - 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, - 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_master_key = None - self.secondary_master_key = None - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py deleted file mode 100755 index 3330353950c6..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListReadOnlyKeysResult(Model): - """The read-only access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py deleted file mode 100755 index 4cb94909c515..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseAccountPaged(Paged): - """ - A paging container for iterating over a list of DatabaseAccount object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py deleted file mode 100755 index be78a4fd6817..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountPatchParameters(Model): - """Parameters for patching Azure DocumentDB database account properties. - - :param tags: - :type tags: dict - """ - - _validation = { - 'tags': {'required': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, tags): - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py deleted file mode 100755 index 3bff90d33db3..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountRegenerateKeyParameters(Model): - """Parameters to regenerate the keys within the database account. - - :param key_kind: The access key to regenerate. Possible values include: - 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - """ - - _validation = { - 'key_kind': {'required': True}, - } - - _attribute_map = { - 'key_kind': {'key': 'keyKind', 'type': 'str'}, - } - - def __init__(self, key_kind): - self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py deleted file mode 100755 index 1e87cecaeb2a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class DatabaseAccountKind(Enum): - - global_document_db = "GlobalDocumentDB" - mongo_db = "MongoDB" - parse = "Parse" - - -class DatabaseAccountOfferType(Enum): - - standard = "Standard" - - -class DefaultConsistencyLevel(Enum): - - eventual = "Eventual" - session = "Session" - bounded_staleness = "BoundedStaleness" - strong = "Strong" - consistent_prefix = "ConsistentPrefix" - - -class KeyKind(Enum): - - primary = "primary" - secondary = "secondary" - primary_readonly = "primaryReadonly" - secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py deleted file mode 100755 index 4c3ebff5e3b5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicies(Model): - """The list of new failover policies for the failover priority change. - - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - """ - - _attribute_map = { - 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, failover_policies=None): - self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py deleted file mode 100755 index 99cc2769403b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicy(Model): - """The failover policy for a given region of a database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region in which the database - account replicates to. Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region in which the database account - exists. - :type location_name: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py deleted file mode 100755 index 8bc82bde2c3f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Location(Model): - """A region in which the Azure DocumentDB database account is deployed. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region within the database account. - Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region. - :type location_name: str - :ivar document_endpoint: The connection endpoint for the specific region. - Example: - https://<accountName>-<locationName>.documents.azure.com:443/ - :vartype document_endpoint: str - :param provisioning_state: - :type provisioning_state: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.document_endpoint = None - self.provisioning_state = provisioning_state - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py deleted file mode 100755 index d5e887d0b78a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """A database account resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, location, tags=None): - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py deleted file mode 100755 index 27ed7c069537..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .database_accounts_operations import DatabaseAccountsOperations - -__all__ = [ - 'DatabaseAccountsOperations', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py deleted file mode 100755 index 2bb39b1f6839..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py +++ /dev/null @@ -1,918 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrestazure.azure_operation import AzureOperationPoller -import uuid - -from .. import models - - -class DatabaseAccountsOperations(object): - """DatabaseAccountsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". - """ - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-04-08" - - self.config = config - - def get( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Retrieves the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def patch( - self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): - """Patches the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param tags: - :type tags: dict - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - update_parameters = models.DatabaseAccountPatchParameters(tags=tags) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(update_parameters, 'DatabaseAccountPatchParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.patch(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def create_or_update( - self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): - """Creates or updates an Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param create_update_parameters: The parameters to provide for the - current database account. - :type create_update_parameters: - :class:`DatabaseAccountCreateUpdateParameters - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def delete( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Deletes an existing Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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 - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - def long_running_send(): - - request = self._client.delete(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def failover_priority_change( - self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): - """Changes the failover priority for the Azure DocumentDB database - account. A failover priority of 0 indicates a write region. The maximum - value for a failover priority = (total number of regions - 1). Failover - priority values must be unique for each of the regions in which the - database account exists. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(failover_parameters, 'FailoverPolicies') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - subscription. - - :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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - given resource group. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the access keys for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_connection_strings( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the connection strings for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListConnectionStringsResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_read_only_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the read-only access keys for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListReadOnlyKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def regenerate_key( - self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): - """Regenerates an access key for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param key_kind: The access key to regenerate. Possible values - include: 'primary', 'secondary', 'primaryReadonly', - 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def check_name_exists( - self, account_name, custom_headers=None, raw=False, **operation_config): - """Checks that the Azure DocumentDB account name already exists. A valid - account name may contain only lowercase letters, numbers, and the '-' - character, and must be between 3 and 50 characters. - - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: bool - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' - path_format_arguments = { - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.head(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = (response.status_code == 200) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py deleted file mode 100755 index 95ed79d29108..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.3" - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -from distutils import log as logger -import os.path - -from wheel.bdist_wheel import bdist_wheel -class azure_bdist_wheel(bdist_wheel): - """The purpose of this class is to build wheel a little differently than the sdist, - without requiring to build the wheel from the sdist (i.e. you can build the wheel - directly from source). - """ - - description = "Create an Azure wheel distribution" - - user_options = bdist_wheel.user_options + \ - [('azure-namespace-package=', None, - "Name of the deepest nspkg used")] - - def initialize_options(self): - bdist_wheel.initialize_options(self) - self.azure_namespace_package = None - - def finalize_options(self): - bdist_wheel.finalize_options(self) - if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): - raise ValueError("azure_namespace_package must finish by -nspkg") - - def run(self): - if not self.distribution.install_requires: - self.distribution.install_requires = [] - self.distribution.install_requires.append( - "{}>=2.0.0".format(self.azure_namespace_package)) - bdist_wheel.run(self) - - def write_record(self, bdist_dir, distinfo_dir): - if self.azure_namespace_package: - # Split and remove last part, assuming it's "nspkg" - subparts = self.azure_namespace_package.split('-')[0:-1] - folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] - for azure_sub_package in folder_with_init: - init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') - if os.path.isfile(init_file): - logger.info("manually remove {} while building the wheel".format(init_file)) - os.remove(init_file) - else: - raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) - bdist_wheel.write_record(self, bdist_dir, distinfo_dir) -cmdclass = { - 'bdist_wheel': azure_bdist_wheel, -} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json deleted file mode 100644 index 4d98fc12a39e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/build.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "autorest": "1.0.1-20170501-2300-nightly", - "date": "2017-05-01T20:13:42Z", - "version": "0.1.3" -} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt deleted file mode 100644 index 6ccb7f031ddd..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt +++ /dev/null @@ -1 +0,0 @@ --e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml deleted file mode 100644 index e7687fdae93b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml +++ /dev/null @@ -1,2 +0,0 @@ -[packaging] -auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg deleted file mode 100644 index 856f4164982c..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[bdist_wheel] -universal=1 -azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py deleted file mode 100644 index ddef54e31bb5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.py +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env python - -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup -try: - from azure_bdist_wheel import cmdclass -except ImportError: - from distutils import log as logger - logger.warn("Wheel is not available, disabling bdist_wheel hook") - cmdclass = {} - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-documentdb" -PACKAGE_PPRINT_NAME = "DocumentDB Management" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') - -# azure v0.x is not compatible with this package -# azure v0.x used to have a __version__ attribute (newer versions don't) -try: - import azure - try: - ver = azure.__version__ - raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' - ) - except AttributeError: - pass -except ImportError: - pass - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError('Cannot find version information') - -with open('README.rst', encoding='utf-8') as f: - readme = f.read() -with open('HISTORY.rst', encoding='utf-8') as f: - history = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + history, - license='MIT License', - author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', - classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'License :: OSI Approved :: MIT License', - ], - zip_safe=False, - packages=find_packages(), - install_requires=[ - 'msrestazure~=0.4.7', - 'azure-common~=1.1.5', - ], - cmdclass=cmdclass -) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml deleted file mode 100644 index d470d7f8673d..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml +++ /dev/null @@ -1,193 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] - method: HEAD - uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: ''} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['142'] - Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-ratelimit-remaining-tenant-reads: ['14999'] - x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] - status: {code: 404, message: NotFound} -- request: - body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], - "databaseAccountOfferType": "Standard"}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['121'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['910'] - x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Completed","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['33'] - x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml deleted file mode 100644 index e6f4e2348f8f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml +++ /dev/null @@ -1,467 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' - under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' - was not found."}}'} - headers: - Cache-Control: [no-cache] - Content-Length: ['214'] - Content-Type: [application/json; charset=utf-8] - Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-failure-cause: [gateway] - x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] - status: {code: 404, message: Not Found} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml deleted file mode 100644 index b2e4b82a9d9e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml +++ /dev/null @@ -1,272 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1144'] - x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1156'] - x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['2225'] - x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] - status: {code: 200, message: Ok} -- request: - body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['73'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 - response: - body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique - and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['170'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] - status: {code: 400, message: BadRequest} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 - response: - body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['239'] - x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] - status: {code: 200, message: Ok} -- request: - body: '{"keyKind": "primary"}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['22'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] - x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py deleted file mode 100644 index 902666a22cf0..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py +++ /dev/null @@ -1,146 +0,0 @@ -# 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. -#-------------------------------------------------------------------------- -import unittest - -import azure.mgmt.documentdb -from msrestazure.azure_exceptions import CloudError -from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer - - -class MgmtDocDBTest(AzureMgmtTestCase): - - def setUp(self): - super(MgmtDocDBTest, self).setUp() - self.client = self.create_mgmt_client( - azure.mgmt.documentdb.DocumentDB - ) - - @ResourceGroupPreparer() - def test_accounts_create(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtst') - - self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) - - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - account = async_docdb_create.result() - self.assertIsNotNone(account) - # Rest API issue - # self.assertEqual(account.name, account_name) - - @ResourceGroupPreparer() - def test_accounts_features(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtest') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - account = self.client.database_accounts.get( - resource_group.name, - account_name - ) - self.assertEqual(account.name, account_name) - - my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) - self.assertEqual(len(my_accounts), 1) - self.assertEqual(my_accounts[0].name, account_name) - - my_accounts = list(self.client.database_accounts.list()) - self.assertTrue(len(my_accounts) >= 1) - self.assertTrue(any(db.name == account_name for db in my_accounts)) - - # I guess we can make this test with no error, need to check with DocDB team - # This is an interesting test anyway, this implies that the serialization works - # and error message is available. Since this method does not return an object - # (i.e. no deserialization to test), this is a complete test. - # We are NOT here to test the RestAPI, but the Swagger file and Python code. - with self.assertRaises(CloudError) as cm: - async_change = self.client.database_accounts.failover_priority_change( - resource_group.name, - account_name, - [{ - 'location_name': self.region, - 'failover_priority': 0 - }] - ) - async_change.wait() - self.assertIn('Failover priorities must be unique', cm.exception.message) - - my_keys = self.client.database_accounts.list_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_master_key) - self.assertIsNotNone(my_keys.secondary_master_key) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - my_keys = self.client.database_accounts.list_read_only_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - async_regenerate = self.client.database_accounts.regenerate_key( - resource_group.name, - account_name, - "primary" - ) - async_regenerate.wait() - - @ResourceGroupPreparer() - def test_accounts_delete(self, resource_group, location): - account_name = self.get_resource_name('pydocumentdbtst') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - # Current implementation of msrestazure does not support 404 as a end of LRO delete - # https://github.com/Azure/msrestazure-for-python/issues/7 - async_delete = self.client.database_accounts.delete(resource_group.name, account_name) - try: - async_delete.wait() - except CloudError as err: - if err.response.status_code != 404: - raise - - -#------------------------------------------------------------------------------ -if __name__ == '__main__': - unittest.main() From 0fcf1056d3cfdd825cdba83b7269ae45e030869b Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:42:03 -0700 Subject: [PATCH 029/244] Revert "Remove docdb mgmt package from master (#6585)" (#6593) This reverts commit d2ed7d87997eac9b715ee9802c15349a12446b84. --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 + sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 + sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 + .../azure-mgmt-documentdb/azure/__init__.py | 1 + .../azure/mgmt/__init__.py | 1 + .../azure/mgmt/documentdb/__init__.py | 18 + .../azure/mgmt/documentdb/document_db.py | 83 ++ .../azure/mgmt/documentdb/models/__init__.py | 52 + .../documentdb/models/consistency_policy.py | 50 + .../documentdb/models/database_account.py | 117 +++ .../database_account_connection_string.py | 39 + ...tabase_account_create_update_parameters.py | 90 ++ ..._account_list_connection_strings_result.py | 29 + .../database_account_list_keys_result.py | 53 + ...base_account_list_read_only_keys_result.py | 41 + .../models/database_account_paged.py | 27 + .../database_account_patch_parameters.py | 31 + ...abase_account_regenerate_key_parameters.py | 33 + .../documentdb/models/document_db_enums.py | 41 + .../documentdb/models/failover_policies.py | 28 + .../mgmt/documentdb/models/failover_policy.py | 48 + .../azure/mgmt/documentdb/models/location.py | 58 ++ .../azure/mgmt/documentdb/models/resource.py | 54 ++ .../mgmt/documentdb/operations/__init__.py | 16 + .../database_accounts_operations.py | 918 ++++++++++++++++++ .../azure/mgmt/documentdb/version.py | 13 + .../azure_bdist_wheel.py | 54 ++ sdk/cosmos/azure-mgmt-documentdb/build.json | 5 + .../dev_requirements.txt | 1 + .../azure-mgmt-documentdb/sdk_packaging.toml | 2 + sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 + sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 ++ ..._mgmt_documentdb.test_accounts_create.yaml | 193 ++++ ..._mgmt_documentdb.test_accounts_delete.yaml | 467 +++++++++ ...gmt_documentdb.test_accounts_features.yaml | 272 ++++++ .../tests/test_mgmt_documentdb.py | 146 +++ 36 files changed, 3147 insertions(+) create mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in create mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json create mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt create mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst new file mode 100644 index 000000000000..eb7345b4071e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst @@ -0,0 +1,24 @@ +.. :changelog: + +Release History +=============== + +0.1.3 (2017-05-02) +++++++++++++++++++ + +* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix + +0.1.2 (2017-04-20) +++++++++++++++++++ + +This wheel package is now built with the azure wheel extension + +0.1.1 (2017-03-21) +++++++++++++++++++ + +* Added support for listing database account connection strings + +0.1.0 (2017-01-31) +++++++++++++++++++ + +* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in new file mode 100644 index 000000000000..9ecaeb15de50 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in @@ -0,0 +1,2 @@ +include *.rst +include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst new file mode 100644 index 000000000000..a5204ea75358 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/README.rst @@ -0,0 +1,52 @@ +Microsoft Azure SDK for Python +============================== + +This is the Microsoft Azure DocumentDB Management Client Library. + +Azure Resource Manager (ARM) is the next generation of management APIs that +replace the old Azure Service Management (ASM). + +This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. + +For the older Azure Service Management (ASM) libraries, see +`azure-servicemanagement-legacy `__ library. + +For a more complete set of Azure libraries, see the `azure `__ bundle package. + + +Compatibility +============= + +**IMPORTANT**: If you have an earlier version of the azure package +(version < 1.0), you should uninstall it before installing this package. + +You can check the version using pip: + +.. code:: shell + + pip freeze + +If you see azure==0.11.0 (or any version below 1.0), uninstall it first: + +.. code:: shell + + pip uninstall azure + + +Usage +===== + +For code examples, see `DocumentDB Management +`__ +on readthedocs.org. + + +Provide Feedback +================ + +If you encounter any bugs or have suggestions, please file an issue in the +`Issues `__ +section of the project. + + +.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py new file mode 100755 index 000000000000..3ec900145f1e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .document_db import DocumentDB +from .version import VERSION + +__all__ = ['DocumentDB'] + +__version__ = VERSION + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py new file mode 100755 index 000000000000..5eda44ab3e32 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import ServiceClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.database_accounts_operations import DatabaseAccountsOperations +from . import models + + +class DocumentDBConfiguration(AzureConfiguration): + """Configuration for DocumentDB + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not isinstance(subscription_id, str): + raise TypeError("Parameter 'subscription_id' must be str.") + if not base_url: + base_url = 'https://management.azure.com' + + super(DocumentDBConfiguration, self).__init__(base_url) + + self.add_user_agent('documentdb/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class DocumentDB(object): + """Azure DocumentDB Database Service Resource Provider REST API + + :ivar config: Configuration for client. + :vartype config: DocumentDBConfiguration + + :ivar database_accounts: DatabaseAccounts operations + :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) + self._client = ServiceClient(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2015-04-08' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.database_accounts = DatabaseAccountsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py new file mode 100755 index 000000000000..2ed68c568a84 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .consistency_policy import ConsistencyPolicy +from .location import Location +from .failover_policy import FailoverPolicy +from .database_account import DatabaseAccount +from .failover_policies import FailoverPolicies +from .resource import Resource +from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters +from .database_account_patch_parameters import DatabaseAccountPatchParameters +from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult +from .database_account_list_keys_result import DatabaseAccountListKeysResult +from .database_account_connection_string import DatabaseAccountConnectionString +from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult +from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters +from .database_account_paged import DatabaseAccountPaged +from .document_db_enums import ( + DatabaseAccountKind, + DatabaseAccountOfferType, + DefaultConsistencyLevel, + KeyKind, +) + +__all__ = [ + 'ConsistencyPolicy', + 'Location', + 'FailoverPolicy', + 'DatabaseAccount', + 'FailoverPolicies', + 'Resource', + 'DatabaseAccountCreateUpdateParameters', + 'DatabaseAccountPatchParameters', + 'DatabaseAccountListReadOnlyKeysResult', + 'DatabaseAccountListKeysResult', + 'DatabaseAccountConnectionString', + 'DatabaseAccountListConnectionStringsResult', + 'DatabaseAccountRegenerateKeyParameters', + 'DatabaseAccountPaged', + 'DatabaseAccountKind', + 'DatabaseAccountOfferType', + 'DefaultConsistencyLevel', + 'KeyKind', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py new file mode 100755 index 000000000000..d8cefd4c0b59 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConsistencyPolicy(Model): + """The consistency policy for the DocumentDB database account. + + :param default_consistency_level: The default consistency level and + configuration settings of the DocumentDB account. Possible values include: + 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' + :type default_consistency_level: str or :class:`DefaultConsistencyLevel + ` + :param max_staleness_prefix: When used with the Bounded Staleness + consistency level, this value represents the number of stale requests + tolerated. Accepted range for this value is 1 – 2,147,483,647. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_staleness_prefix: long + :param max_interval_in_seconds: When used with the Bounded Staleness + consistency level, this value represents the time amount of staleness (in + seconds) tolerated. Accepted range for this value is 1 - 100. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_interval_in_seconds: int + """ + + _validation = { + 'default_consistency_level': {'required': True}, + 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, + 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, + 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, + 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, + } + + def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): + self.default_consistency_level = default_consistency_level + self.max_staleness_prefix = max_staleness_prefix + self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py new file mode 100755 index 000000000000..89031adc35cb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py @@ -0,0 +1,117 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccount(Resource): + """A DocumentDB database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param provisioning_state: + :type provisioning_state: str + :ivar document_endpoint: The connection endpoint for the DocumentDB + database account. + :vartype document_endpoint: str + :ivar database_account_offer_type: The offer type for the DocumentDB + database account. Default value: Standard. Possible values include: + 'Standard' + :vartype database_account_offer_type: str or + :class:`DatabaseAccountOfferType + ` + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + :param consistency_policy: The consistency policy for the DocumentDB + database account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :ivar write_locations: An array that contains the write location for the + DocumentDB account. + :vartype write_locations: list of :class:`Location + ` + :ivar read_locations: An array that contains of the read locations enabled + for the DocumentDB account. + :vartype read_locations: list of :class:`Location + ` + :ivar failover_policies: An array that contains the regions ordered by + their failover priorities. + :vartype failover_policies: list of :class:`FailoverPolicy + ` + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'document_endpoint': {'readonly': True}, + 'database_account_offer_type': {'readonly': True}, + 'write_locations': {'readonly': True}, + 'read_locations': {'readonly': True}, + 'failover_policies': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, + 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, + 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): + super(DatabaseAccount, self).__init__(location=location, tags=tags) + self.kind = kind + self.provisioning_state = provisioning_state + self.document_endpoint = None + self.database_account_offer_type = None + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover + self.consistency_policy = consistency_policy + self.write_locations = None + self.read_locations = None + self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py new file mode 100755 index 000000000000..db1828208069 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountConnectionString(Model): + """Connection string for the DocumentDB account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar connection_string: Value of the connection string + :vartype connection_string: str + :ivar description: Description of the connection string + :vartype description: str + """ + + _validation = { + 'connection_string': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self): + self.connection_string = None + self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py new file mode 100755 index 000000000000..30978f482f0b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccountCreateUpdateParameters(Resource): + """Parameters to create and update DocumentDB database accounts. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param consistency_policy: The consistency policy for the DocumentDB + account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :param locations: An array that contains the georeplication locations + enabled for the DocumentDB account. + :type locations: list of :class:`Location + ` + :ivar database_account_offer_type: Default value: "Standard" . + :vartype database_account_offer_type: str + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'locations': {'required': True}, + 'database_account_offer_type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + } + + database_account_offer_type = "Standard" + + def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): + super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) + self.kind = kind + self.consistency_policy = consistency_policy + self.locations = locations + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py new file mode 100755 index 000000000000..7cddc00a3de1 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListConnectionStringsResult(Model): + """The connection strings for the given database account. + + :param connection_strings: An array that contains the connection strings + for the DocumentDB account. + :type connection_strings: list of :class:`DatabaseAccountConnectionString + ` + """ + + _attribute_map = { + 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, + } + + def __init__(self, connection_strings=None): + self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py new file mode 100755 index 000000000000..4d775054ac14 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListKeysResult(Model): + """The access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_master_key: Base 64 encoded value of the primary read-write + key. + :vartype primary_master_key: str + :ivar secondary_master_key: Base 64 encoded value of the secondary + read-write key. + :vartype secondary_master_key: str + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_master_key': {'readonly': True}, + 'secondary_master_key': {'readonly': True}, + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, + 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, + 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_master_key = None + self.secondary_master_key = None + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py new file mode 100755 index 000000000000..3330353950c6 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListReadOnlyKeysResult(Model): + """The read-only access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py new file mode 100755 index 000000000000..4cb94909c515 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class DatabaseAccountPaged(Paged): + """ + A paging container for iterating over a list of DatabaseAccount object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py new file mode 100755 index 000000000000..be78a4fd6817 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountPatchParameters(Model): + """Parameters for patching Azure DocumentDB database account properties. + + :param tags: + :type tags: dict + """ + + _validation = { + 'tags': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, tags): + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py new file mode 100755 index 000000000000..3bff90d33db3 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountRegenerateKeyParameters(Model): + """Parameters to regenerate the keys within the database account. + + :param key_kind: The access key to regenerate. Possible values include: + 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + """ + + _validation = { + 'key_kind': {'required': True}, + } + + _attribute_map = { + 'key_kind': {'key': 'keyKind', 'type': 'str'}, + } + + def __init__(self, key_kind): + self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py new file mode 100755 index 000000000000..1e87cecaeb2a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class DatabaseAccountKind(Enum): + + global_document_db = "GlobalDocumentDB" + mongo_db = "MongoDB" + parse = "Parse" + + +class DatabaseAccountOfferType(Enum): + + standard = "Standard" + + +class DefaultConsistencyLevel(Enum): + + eventual = "Eventual" + session = "Session" + bounded_staleness = "BoundedStaleness" + strong = "Strong" + consistent_prefix = "ConsistentPrefix" + + +class KeyKind(Enum): + + primary = "primary" + secondary = "secondary" + primary_readonly = "primaryReadonly" + secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py new file mode 100755 index 000000000000..4c3ebff5e3b5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicies(Model): + """The list of new failover policies for the failover priority change. + + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + """ + + _attribute_map = { + 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, failover_policies=None): + self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py new file mode 100755 index 000000000000..99cc2769403b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicy(Model): + """The failover policy for a given region of a database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region in which the database + account replicates to. Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region in which the database account + exists. + :type location_name: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py new file mode 100755 index 000000000000..8bc82bde2c3f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Location(Model): + """A region in which the Azure DocumentDB database account is deployed. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region within the database account. + Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region. + :type location_name: str + :ivar document_endpoint: The connection endpoint for the specific region. + Example: + https://<accountName>-<locationName>.documents.azure.com:443/ + :vartype document_endpoint: str + :param provisioning_state: + :type provisioning_state: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'document_endpoint': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.document_endpoint = None + self.provisioning_state = provisioning_state + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py new file mode 100755 index 000000000000..d5e887d0b78a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """A database account resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, location, tags=None): + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py new file mode 100755 index 000000000000..27ed7c069537 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py @@ -0,0 +1,16 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .database_accounts_operations import DatabaseAccountsOperations + +__all__ = [ + 'DatabaseAccountsOperations', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py new file mode 100755 index 000000000000..2bb39b1f6839 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py @@ -0,0 +1,918 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrestazure.azure_operation import AzureOperationPoller +import uuid + +from .. import models + + +class DatabaseAccountsOperations(object): + """DatabaseAccountsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". + """ + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-04-08" + + self.config = config + + def get( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Retrieves the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def patch( + self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): + """Patches the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param tags: + :type tags: dict + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + update_parameters = models.DatabaseAccountPatchParameters(tags=tags) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(update_parameters, 'DatabaseAccountPatchParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.patch(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def create_or_update( + self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates an Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param create_update_parameters: The parameters to provide for the + current database account. + :type create_update_parameters: + :class:`DatabaseAccountCreateUpdateParameters + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.put(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def delete( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Deletes an existing Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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 + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + def long_running_send(): + + request = self._client.delete(url, query_parameters) + return self._client.send(request, header_parameters, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def failover_priority_change( + self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): + """Changes the failover priority for the Azure DocumentDB database + account. A failover priority of 0 indicates a write region. The maximum + value for a failover priority = (total number of regions - 1). Failover + priority values must be unique for each of the regions in which the + database account exists. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(failover_parameters, 'FailoverPolicies') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + subscription. + + :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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + given resource group. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the access keys for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_connection_strings( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the connection strings for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListConnectionStringsResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_read_only_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the read-only access keys for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListReadOnlyKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def regenerate_key( + self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): + """Regenerates an access key for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param key_kind: The access key to regenerate. Possible values + include: 'primary', 'secondary', 'primaryReadonly', + 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def check_name_exists( + self, account_name, custom_headers=None, raw=False, **operation_config): + """Checks that the Azure DocumentDB account name already exists. A valid + account name may contain only lowercase letters, numbers, and the '-' + character, and must be between 3 and 50 characters. + + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: bool + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' + path_format_arguments = { + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.head(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = (response.status_code == 200) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py new file mode 100755 index 000000000000..95ed79d29108 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.3" + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py new file mode 100644 index 000000000000..8a81d1b61775 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py @@ -0,0 +1,54 @@ +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +from distutils import log as logger +import os.path + +from wheel.bdist_wheel import bdist_wheel +class azure_bdist_wheel(bdist_wheel): + """The purpose of this class is to build wheel a little differently than the sdist, + without requiring to build the wheel from the sdist (i.e. you can build the wheel + directly from source). + """ + + description = "Create an Azure wheel distribution" + + user_options = bdist_wheel.user_options + \ + [('azure-namespace-package=', None, + "Name of the deepest nspkg used")] + + def initialize_options(self): + bdist_wheel.initialize_options(self) + self.azure_namespace_package = None + + def finalize_options(self): + bdist_wheel.finalize_options(self) + if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): + raise ValueError("azure_namespace_package must finish by -nspkg") + + def run(self): + if not self.distribution.install_requires: + self.distribution.install_requires = [] + self.distribution.install_requires.append( + "{}>=2.0.0".format(self.azure_namespace_package)) + bdist_wheel.run(self) + + def write_record(self, bdist_dir, distinfo_dir): + if self.azure_namespace_package: + # Split and remove last part, assuming it's "nspkg" + subparts = self.azure_namespace_package.split('-')[0:-1] + folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] + for azure_sub_package in folder_with_init: + init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') + if os.path.isfile(init_file): + logger.info("manually remove {} while building the wheel".format(init_file)) + os.remove(init_file) + else: + raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) + bdist_wheel.write_record(self, bdist_dir, distinfo_dir) +cmdclass = { + 'bdist_wheel': azure_bdist_wheel, +} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json new file mode 100644 index 000000000000..4d98fc12a39e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/build.json @@ -0,0 +1,5 @@ +{ + "autorest": "1.0.1-20170501-2300-nightly", + "date": "2017-05-01T20:13:42Z", + "version": "0.1.3" +} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt new file mode 100644 index 000000000000..6ccb7f031ddd --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt @@ -0,0 +1 @@ +-e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml new file mode 100644 index 000000000000..e7687fdae93b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg new file mode 100644 index 000000000000..856f4164982c --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg @@ -0,0 +1,3 @@ +[bdist_wheel] +universal=1 +azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py new file mode 100644 index 000000000000..ddef54e31bb5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup +try: + from azure_bdist_wheel import cmdclass +except ImportError: + from distutils import log as logger + logger.warn("Wheel is not available, disabling bdist_wheel hook") + cmdclass = {} + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-documentdb" +PACKAGE_PPRINT_NAME = "DocumentDB Management" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.rst', encoding='utf-8') as f: + readme = f.read() +with open('HISTORY.rst', encoding='utf-8') as f: + history = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + history, + license='MIT License', + author='Microsoft Corporation', + author_email='ptvshelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(), + install_requires=[ + 'msrestazure~=0.4.7', + 'azure-common~=1.1.5', + ], + cmdclass=cmdclass +) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml new file mode 100644 index 000000000000..d470d7f8673d --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml @@ -0,0 +1,193 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] + method: HEAD + uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: ''} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['142'] + Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-ratelimit-remaining-tenant-reads: ['14999'] + x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] + status: {code: 404, message: NotFound} +- request: + body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], + "databaseAccountOfferType": "Standard"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['121'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['910'] + x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Completed","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['33'] + x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml new file mode 100644 index 000000000000..e6f4e2348f8f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml @@ -0,0 +1,467 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' + under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' + was not found."}}'} + headers: + Cache-Control: [no-cache] + Content-Length: ['214'] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-failure-cause: [gateway] + x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] + status: {code: 404, message: Not Found} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml new file mode 100644 index 000000000000..b2e4b82a9d9e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml @@ -0,0 +1,272 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1144'] + x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1156'] + x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2225'] + x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] + status: {code: 200, message: Ok} +- request: + body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['73'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 + response: + body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique + and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['170'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] + status: {code: 400, message: BadRequest} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 + response: + body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['239'] + x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] + status: {code: 200, message: Ok} +- request: + body: '{"keyKind": "primary"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['22'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] + x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py new file mode 100644 index 000000000000..902666a22cf0 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py @@ -0,0 +1,146 @@ +# 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. +#-------------------------------------------------------------------------- +import unittest + +import azure.mgmt.documentdb +from msrestazure.azure_exceptions import CloudError +from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer + + +class MgmtDocDBTest(AzureMgmtTestCase): + + def setUp(self): + super(MgmtDocDBTest, self).setUp() + self.client = self.create_mgmt_client( + azure.mgmt.documentdb.DocumentDB + ) + + @ResourceGroupPreparer() + def test_accounts_create(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtst') + + self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) + + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + account = async_docdb_create.result() + self.assertIsNotNone(account) + # Rest API issue + # self.assertEqual(account.name, account_name) + + @ResourceGroupPreparer() + def test_accounts_features(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtest') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + account = self.client.database_accounts.get( + resource_group.name, + account_name + ) + self.assertEqual(account.name, account_name) + + my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) + self.assertEqual(len(my_accounts), 1) + self.assertEqual(my_accounts[0].name, account_name) + + my_accounts = list(self.client.database_accounts.list()) + self.assertTrue(len(my_accounts) >= 1) + self.assertTrue(any(db.name == account_name for db in my_accounts)) + + # I guess we can make this test with no error, need to check with DocDB team + # This is an interesting test anyway, this implies that the serialization works + # and error message is available. Since this method does not return an object + # (i.e. no deserialization to test), this is a complete test. + # We are NOT here to test the RestAPI, but the Swagger file and Python code. + with self.assertRaises(CloudError) as cm: + async_change = self.client.database_accounts.failover_priority_change( + resource_group.name, + account_name, + [{ + 'location_name': self.region, + 'failover_priority': 0 + }] + ) + async_change.wait() + self.assertIn('Failover priorities must be unique', cm.exception.message) + + my_keys = self.client.database_accounts.list_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_master_key) + self.assertIsNotNone(my_keys.secondary_master_key) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + my_keys = self.client.database_accounts.list_read_only_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + async_regenerate = self.client.database_accounts.regenerate_key( + resource_group.name, + account_name, + "primary" + ) + async_regenerate.wait() + + @ResourceGroupPreparer() + def test_accounts_delete(self, resource_group, location): + account_name = self.get_resource_name('pydocumentdbtst') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + # Current implementation of msrestazure does not support 404 as a end of LRO delete + # https://github.com/Azure/msrestazure-for-python/issues/7 + async_delete = self.client.database_accounts.delete(resource_group.name, account_name) + try: + async_delete.wait() + except CloudError as err: + if err.response.status_code != 404: + raise + + +#------------------------------------------------------------------------------ +if __name__ == '__main__': + unittest.main() From 7297ae4bc5f03331e86984fa7d49ea9e872c00b8 Mon Sep 17 00:00:00 2001 From: "openapi-bot[bot]" <37845953+openapi-bot[bot]@users.noreply.github.com> Date: Thu, 1 Aug 2019 05:35:08 +0000 Subject: [PATCH 030/244] Generated from 368b5914a375e09ef413285c932b72038a8af7e4 (#48) fix: sql preview model validation errors - Remove empty "body" for RESPONSE_SCHEMA_NOT_IN_SPEC errors - IsAzureMonitorTargetEnabled -> isAzureMonitorTargetEnabled - "State" -> "state" - emailAccountAdmins "true" -> true - Add 202 response for RestorePoints_Create - password -> certPassword for ManagedInstanceTdeCertificates_Create and TdeCertificates_Create --- .../azure-mgmt-sql/azure/mgmt/sql/__init__.py | 7 +- .../azure/mgmt/sql/_configuration.py | 49 + ...nt_client.py => _sql_management_client.py} | 215 +- .../azure/mgmt/sql/models/__init__.py | 1004 +- .../azure/mgmt/sql/models/_models.py | 8891 +++++++++++++++++ .../azure/mgmt/sql/models/_models_py3.py | 8891 +++++++++++++++++ .../azure/mgmt/sql/models/_paged_models.py | 885 ++ ...ums.py => _sql_management_client_enums.py} | 49 +- .../sql/models/automatic_tuning_options.py | 57 - .../models/automatic_tuning_options_py3.py | 57 - .../models/automatic_tuning_server_options.py | 56 - .../automatic_tuning_server_options_py3.py | 56 - .../backup_long_term_retention_policy.py | 62 - .../backup_long_term_retention_policy_py3.py | 62 - .../backup_short_term_retention_policy.py | 47 - ...ackup_short_term_retention_policy_paged.py | 27 - .../backup_short_term_retention_policy_py3.py | 47 - .../models/check_name_availability_request.py | 44 - .../check_name_availability_request_py3.py | 44 - .../check_name_availability_response.py | 54 - .../check_name_availability_response_py3.py | 54 - .../complete_database_restore_definition.py | 35 - ...omplete_database_restore_definition_py3.py | 35 - ...reate_database_restore_point_definition.py | 35 - ...e_database_restore_point_definition_py3.py | 35 - .../mgmt/sql/models/data_masking_policy.py | 80 - .../sql/models/data_masking_policy_py3.py | 80 - .../mgmt/sql/models/data_masking_rule.py | 129 - .../sql/models/data_masking_rule_paged.py | 27 - .../mgmt/sql/models/data_masking_rule_py3.py | 129 - .../azure/mgmt/sql/models/database.py | 237 - .../sql/models/database_automatic_tuning.py | 57 - .../models/database_automatic_tuning_py3.py | 57 - .../models/database_blob_auditing_policy.py | 165 - .../database_blob_auditing_policy_py3.py | 165 - .../mgmt/sql/models/database_operation.py | 115 - .../sql/models/database_operation_paged.py | 27 - .../mgmt/sql/models/database_operation_py3.py | 115 - .../azure/mgmt/sql/models/database_paged.py | 27 - .../azure/mgmt/sql/models/database_py3.py | 237 - .../models/database_security_alert_policy.py | 102 - .../database_security_alert_policy_py3.py | 102 - .../azure/mgmt/sql/models/database_update.py | 209 - .../mgmt/sql/models/database_update_py3.py | 209 - .../azure/mgmt/sql/models/database_usage.py | 66 - .../mgmt/sql/models/database_usage_paged.py | 27 - .../mgmt/sql/models/database_usage_py3.py | 66 - .../database_vulnerability_assessment.py | 67 - ...database_vulnerability_assessment_paged.py | 27 - .../database_vulnerability_assessment_py3.py | 67 - ..._vulnerability_assessment_rule_baseline.py | 50 - ...erability_assessment_rule_baseline_item.py | 35 - ...ility_assessment_rule_baseline_item_py3.py | 35 - ...nerability_assessment_rule_baseline_py3.py | 50 - ...e_vulnerability_assessment_scans_export.py | 48 - ...lnerability_assessment_scans_export_py3.py | 48 - .../mgmt/sql/models/edition_capability.py | 58 - .../mgmt/sql/models/edition_capability_py3.py | 58 - .../azure/mgmt/sql/models/elastic_pool.py | 95 - .../mgmt/sql/models/elastic_pool_activity.py | 151 - .../sql/models/elastic_pool_activity_paged.py | 27 - .../sql/models/elastic_pool_activity_py3.py | 151 - .../models/elastic_pool_database_activity.py | 125 - .../elastic_pool_database_activity_paged.py | 27 - .../elastic_pool_database_activity_py3.py | 125 - .../models/elastic_pool_edition_capability.py | 58 - .../elastic_pool_edition_capability_py3.py | 58 - .../mgmt/sql/models/elastic_pool_operation.py | 114 - .../models/elastic_pool_operation_paged.py | 27 - .../sql/models/elastic_pool_operation_py3.py | 114 - .../mgmt/sql/models/elastic_pool_paged.py | 27 - ...tabase_max_performance_level_capability.py | 58 - ...se_max_performance_level_capability_py3.py | 58 - ...tabase_min_performance_level_capability.py | 51 - ...se_min_performance_level_capability_py3.py | 51 - .../elastic_pool_per_database_settings.py | 32 - .../elastic_pool_per_database_settings_py3.py | 32 - ...astic_pool_performance_level_capability.py | 88 - ...c_pool_performance_level_capability_py3.py | 88 - .../azure/mgmt/sql/models/elastic_pool_py3.py | 95 - .../mgmt/sql/models/elastic_pool_update.py | 54 - .../sql/models/elastic_pool_update_py3.py | 54 - .../mgmt/sql/models/encryption_protector.py | 80 - .../sql/models/encryption_protector_paged.py | 27 - .../sql/models/encryption_protector_py3.py | 80 - .../azure/mgmt/sql/models/export_request.py | 63 - .../mgmt/sql/models/export_request_py3.py | 63 - .../extended_database_blob_auditing_policy.py | 165 - ...ended_database_blob_auditing_policy_py3.py | 165 - .../extended_server_blob_auditing_policy.py | 165 - ...xtended_server_blob_auditing_policy_py3.py | 165 - .../azure/mgmt/sql/models/failover_group.py | 88 - .../mgmt/sql/models/failover_group_paged.py | 27 - .../mgmt/sql/models/failover_group_py3.py | 88 - .../failover_group_read_only_endpoint.py | 30 - .../failover_group_read_only_endpoint_py3.py | 30 - .../failover_group_read_write_endpoint.py | 45 - .../failover_group_read_write_endpoint_py3.py | 45 - .../mgmt/sql/models/failover_group_update.py | 44 - .../sql/models/failover_group_update_py3.py | 44 - .../azure/mgmt/sql/models/firewall_rule.py | 68 - .../mgmt/sql/models/firewall_rule_paged.py | 27 - .../mgmt/sql/models/firewall_rule_py3.py | 68 - .../mgmt/sql/models/geo_backup_policy.py | 66 - .../sql/models/geo_backup_policy_paged.py | 27 - .../mgmt/sql/models/geo_backup_policy_py3.py | 66 - .../mgmt/sql/models/import_export_response.py | 87 - .../sql/models/import_export_response_py3.py | 87 - .../sql/models/import_extension_request.py | 81 - .../models/import_extension_request_py3.py | 81 - .../azure/mgmt/sql/models/import_request.py | 91 - .../mgmt/sql/models/import_request_py3.py | 91 - .../sql/models/instance_failover_group.py | 82 - .../models/instance_failover_group_paged.py | 27 - .../sql/models/instance_failover_group_py3.py | 82 - ...tance_failover_group_read_only_endpoint.py | 30 - ...e_failover_group_read_only_endpoint_py3.py | 30 - ...ance_failover_group_read_write_endpoint.py | 45 - ..._failover_group_read_write_endpoint_py3.py | 45 - .../azure/mgmt/sql/models/job.py | 56 - .../azure/mgmt/sql/models/job_agent.py | 67 - .../azure/mgmt/sql/models/job_agent_paged.py | 27 - .../azure/mgmt/sql/models/job_agent_py3.py | 67 - .../azure/mgmt/sql/models/job_agent_update.py | 28 - .../mgmt/sql/models/job_agent_update_py3.py | 28 - .../azure/mgmt/sql/models/job_credential.py | 55 - .../mgmt/sql/models/job_credential_paged.py | 27 - .../mgmt/sql/models/job_credential_py3.py | 55 - .../azure/mgmt/sql/models/job_execution.py | 113 - .../mgmt/sql/models/job_execution_paged.py | 27 - .../mgmt/sql/models/job_execution_py3.py | 113 - .../mgmt/sql/models/job_execution_target.py | 46 - .../sql/models/job_execution_target_py3.py | 46 - .../azure/mgmt/sql/models/job_paged.py | 27 - .../azure/mgmt/sql/models/job_py3.py | 56 - .../azure/mgmt/sql/models/job_schedule.py | 48 - .../azure/mgmt/sql/models/job_schedule_py3.py | 48 - .../azure/mgmt/sql/models/job_step.py | 75 - .../azure/mgmt/sql/models/job_step_action.py | 45 - .../mgmt/sql/models/job_step_action_py3.py | 45 - .../sql/models/job_step_execution_options.py | 49 - .../models/job_step_execution_options_py3.py | 49 - .../azure/mgmt/sql/models/job_step_output.py | 67 - .../mgmt/sql/models/job_step_output_py3.py | 67 - .../azure/mgmt/sql/models/job_step_paged.py | 27 - .../azure/mgmt/sql/models/job_step_py3.py | 75 - .../azure/mgmt/sql/models/job_target.py | 65 - .../azure/mgmt/sql/models/job_target_group.py | 49 - .../mgmt/sql/models/job_target_group_paged.py | 27 - .../mgmt/sql/models/job_target_group_py3.py | 49 - .../azure/mgmt/sql/models/job_target_py3.py | 65 - .../azure/mgmt/sql/models/job_version.py | 42 - .../mgmt/sql/models/job_version_paged.py | 27 - .../azure/mgmt/sql/models/job_version_py3.py | 42 - .../sql/models/license_type_capability.py | 45 - .../sql/models/license_type_capability_py3.py | 45 - .../mgmt/sql/models/location_capabilities.py | 58 - .../sql/models/location_capabilities_py3.py | 58 - .../mgmt/sql/models/log_size_capability.py | 41 - .../sql/models/log_size_capability_py3.py | 41 - .../sql/models/long_term_retention_backup.py | 73 - .../long_term_retention_backup_paged.py | 27 - .../models/long_term_retention_backup_py3.py | 73 - ...aged_backup_short_term_retention_policy.py | 47 - ...ackup_short_term_retention_policy_paged.py | 27 - ..._backup_short_term_retention_policy_py3.py | 47 - .../azure/mgmt/sql/models/managed_database.py | 136 - .../mgmt/sql/models/managed_database_paged.py | 27 - .../mgmt/sql/models/managed_database_py3.py | 136 - .../managed_database_security_alert_policy.py | 88 - ...ed_database_security_alert_policy_paged.py | 27 - ...aged_database_security_alert_policy_py3.py | 88 - .../sql/models/managed_database_update.py | 119 - .../sql/models/managed_database_update_py3.py | 119 - .../azure/mgmt/sql/models/managed_instance.py | 139 - .../managed_instance_edition_capability.py | 51 - ...managed_instance_edition_capability_py3.py | 51 - .../managed_instance_encryption_protector.py | 71 - ...ged_instance_encryption_protector_paged.py | 27 - ...naged_instance_encryption_protector_py3.py | 71 - .../managed_instance_family_capability.py | 73 - .../managed_instance_family_capability_py3.py | 73 - .../mgmt/sql/models/managed_instance_key.py | 72 - .../sql/models/managed_instance_key_paged.py | 27 - .../sql/models/managed_instance_key_py3.py | 72 - .../mgmt/sql/models/managed_instance_paged.py | 27 - .../sql/models/managed_instance_pair_info.py | 34 - .../models/managed_instance_pair_info_py3.py | 34 - .../mgmt/sql/models/managed_instance_py3.py | 139 - .../sql/models/managed_instance_update.py | 117 - .../sql/models/managed_instance_update_py3.py | 117 - .../managed_instance_vcores_capability.py | 50 - .../managed_instance_vcores_capability_py3.py | 50 - .../managed_instance_version_capability.py | 51 - ...managed_instance_version_capability_py3.py | 51 - ...naged_instance_vulnerability_assessment.py | 70 - ...instance_vulnerability_assessment_paged.py | 27 - ...d_instance_vulnerability_assessment_py3.py | 70 - .../managed_server_security_alert_policy.py | 88 - ...aged_server_security_alert_policy_paged.py | 27 - ...anaged_server_security_alert_policy_py3.py | 88 - .../mgmt/sql/models/max_size_capability.py | 41 - .../sql/models/max_size_capability_py3.py | 41 - .../sql/models/max_size_range_capability.py | 61 - .../models/max_size_range_capability_py3.py | 61 - .../azure/mgmt/sql/models/metric.py | 62 - .../mgmt/sql/models/metric_availability.py | 40 - .../sql/models/metric_availability_py3.py | 40 - .../mgmt/sql/models/metric_definition.py | 61 - .../sql/models/metric_definition_paged.py | 27 - .../mgmt/sql/models/metric_definition_py3.py | 61 - .../azure/mgmt/sql/models/metric_name.py | 40 - .../azure/mgmt/sql/models/metric_name_py3.py | 40 - .../azure/mgmt/sql/models/metric_paged.py | 27 - .../azure/mgmt/sql/models/metric_py3.py | 62 - .../azure/mgmt/sql/models/metric_value.py | 60 - .../azure/mgmt/sql/models/metric_value_py3.py | 60 - .../azure/mgmt/sql/models/operation.py | 53 - .../mgmt/sql/models/operation_display.py | 51 - .../mgmt/sql/models/operation_display_py3.py | 51 - .../azure/mgmt/sql/models/operation_impact.py | 51 - .../mgmt/sql/models/operation_impact_py3.py | 51 - .../azure/mgmt/sql/models/operation_paged.py | 27 - .../azure/mgmt/sql/models/operation_py3.py | 53 - .../azure/mgmt/sql/models/partner_info.py | 49 - .../azure/mgmt/sql/models/partner_info_py3.py | 49 - .../mgmt/sql/models/partner_region_info.py | 41 - .../sql/models/partner_region_info_py3.py | 41 - .../models/performance_level_capability.py | 41 - .../performance_level_capability_py3.py | 41 - .../azure/mgmt/sql/models/proxy_resource.py | 42 - .../mgmt/sql/models/proxy_resource_py3.py | 42 - .../sql/models/recommended_elastic_pool.py | 100 - .../models/recommended_elastic_pool_metric.py | 37 - .../recommended_elastic_pool_metric_paged.py | 27 - .../recommended_elastic_pool_metric_py3.py | 37 - .../models/recommended_elastic_pool_paged.py | 27 - .../models/recommended_elastic_pool_py3.py | 100 - .../mgmt/sql/models/recommended_index.py | 112 - .../mgmt/sql/models/recommended_index_py3.py | 112 - .../mgmt/sql/models/recoverable_database.py | 64 - .../sql/models/recoverable_database_paged.py | 27 - .../sql/models/recoverable_database_py3.py | 64 - .../models/recoverable_managed_database.py | 47 - .../recoverable_managed_database_paged.py | 27 - .../recoverable_managed_database_py3.py | 47 - .../azure/mgmt/sql/models/replication_link.py | 104 - .../mgmt/sql/models/replication_link_paged.py | 27 - .../mgmt/sql/models/replication_link_py3.py | 104 - .../azure/mgmt/sql/models/resource.py | 45 - .../mgmt/sql/models/resource_identity.py | 46 - .../mgmt/sql/models/resource_identity_py3.py | 46 - .../sql/models/resource_move_definition.py | 34 - .../models/resource_move_definition_py3.py | 34 - .../azure/mgmt/sql/models/resource_py3.py | 45 - .../sql/models/restorable_dropped_database.py | 89 - .../restorable_dropped_database_paged.py | 27 - .../models/restorable_dropped_database_py3.py | 89 - .../restorable_dropped_managed_database.py | 72 - ...storable_dropped_managed_database_paged.py | 27 - ...restorable_dropped_managed_database_py3.py | 72 - .../azure/mgmt/sql/models/restore_point.py | 71 - .../mgmt/sql/models/restore_point_paged.py | 27 - .../mgmt/sql/models/restore_point_py3.py | 71 - .../mgmt/sql/models/sensitivity_label.py | 58 - .../sql/models/sensitivity_label_paged.py | 27 - .../mgmt/sql/models/sensitivity_label_py3.py | 58 - .../azure/mgmt/sql/models/server.py | 86 - .../sql/models/server_automatic_tuning.py | 60 - .../sql/models/server_automatic_tuning_py3.py | 60 - .../models/server_azure_ad_administrator.py | 67 - .../server_azure_ad_administrator_paged.py | 27 - .../server_azure_ad_administrator_py3.py | 67 - .../sql/models/server_blob_auditing_policy.py | 160 - .../models/server_blob_auditing_policy_py3.py | 160 - .../sql/models/server_communication_link.py | 65 - .../models/server_communication_link_paged.py | 27 - .../models/server_communication_link_py3.py | 65 - .../sql/models/server_connection_policy.py | 60 - .../models/server_connection_policy_py3.py | 60 - .../azure/mgmt/sql/models/server_dns_alias.py | 47 - .../models/server_dns_alias_acquisition.py | 29 - .../server_dns_alias_acquisition_py3.py | 29 - .../mgmt/sql/models/server_dns_alias_paged.py | 27 - .../mgmt/sql/models/server_dns_alias_py3.py | 47 - .../azure/mgmt/sql/models/server_key.py | 78 - .../azure/mgmt/sql/models/server_key_paged.py | 27 - .../azure/mgmt/sql/models/server_key_py3.py | 78 - .../azure/mgmt/sql/models/server_paged.py | 27 - .../azure/mgmt/sql/models/server_py3.py | 86 - .../models/server_security_alert_policy.py | 88 - .../server_security_alert_policy_paged.py | 27 - .../server_security_alert_policy_py3.py | 88 - .../azure/mgmt/sql/models/server_update.py | 59 - .../mgmt/sql/models/server_update_py3.py | 59 - .../azure/mgmt/sql/models/server_usage.py | 66 - .../mgmt/sql/models/server_usage_paged.py | 27 - .../azure/mgmt/sql/models/server_usage_py3.py | 66 - .../sql/models/server_version_capability.py | 58 - .../models/server_version_capability_py3.py | 58 - .../models/server_vulnerability_assessment.py | 70 - .../server_vulnerability_assessment_paged.py | 27 - .../server_vulnerability_assessment_py3.py | 70 - .../mgmt/sql/models/service_objective.py | 69 - .../models/service_objective_capability.py | 78 - .../service_objective_capability_py3.py | 78 - .../sql/models/service_objective_paged.py | 27 - .../mgmt/sql/models/service_objective_py3.py | 69 - .../mgmt/sql/models/service_tier_advisor.py | 157 - .../sql/models/service_tier_advisor_paged.py | 27 - .../sql/models/service_tier_advisor_py3.py | 157 - .../azure/mgmt/sql/models/sku.py | 57 - .../azure/mgmt/sql/models/sku_py3.py | 57 - .../azure/mgmt/sql/models/slo_usage_metric.py | 57 - .../mgmt/sql/models/slo_usage_metric_py3.py | 57 - .../mgmt/sql/models/subscription_usage.py | 62 - .../sql/models/subscription_usage_paged.py | 27 - .../mgmt/sql/models/subscription_usage_py3.py | 62 - .../azure/mgmt/sql/models/sync_agent.py | 78 - .../sql/models/sync_agent_key_properties.py | 35 - .../models/sync_agent_key_properties_py3.py | 35 - .../sql/models/sync_agent_linked_database.py | 73 - .../sync_agent_linked_database_paged.py | 27 - .../models/sync_agent_linked_database_py3.py | 73 - .../azure/mgmt/sql/models/sync_agent_paged.py | 27 - .../azure/mgmt/sql/models/sync_agent_py3.py | 78 - .../sql/models/sync_database_id_properties.py | 35 - .../sync_database_id_properties_paged.py | 27 - .../models/sync_database_id_properties_py3.py | 35 - .../sql/models/sync_full_schema_properties.py | 40 - .../sync_full_schema_properties_paged.py | 27 - .../models/sync_full_schema_properties_py3.py | 40 - .../mgmt/sql/models/sync_full_schema_table.py | 55 - .../models/sync_full_schema_table_column.py | 65 - .../sync_full_schema_table_column_py3.py | 65 - .../sql/models/sync_full_schema_table_py3.py | 55 - .../azure/mgmt/sql/models/sync_group.py | 82 - .../sql/models/sync_group_log_properties.py | 61 - .../models/sync_group_log_properties_paged.py | 27 - .../models/sync_group_log_properties_py3.py | 61 - .../azure/mgmt/sql/models/sync_group_paged.py | 27 - .../azure/mgmt/sql/models/sync_group_py3.py | 82 - .../mgmt/sql/models/sync_group_schema.py | 33 - .../mgmt/sql/models/sync_group_schema_py3.py | 33 - .../sql/models/sync_group_schema_table.py | 32 - .../models/sync_group_schema_table_column.py | 36 - .../sync_group_schema_table_column_py3.py | 36 - .../sql/models/sync_group_schema_table_py3.py | 32 - .../azure/mgmt/sql/models/sync_member.py | 89 - .../mgmt/sql/models/sync_member_paged.py | 27 - .../azure/mgmt/sql/models/sync_member_py3.py | 89 - .../azure/mgmt/sql/models/tde_certificate.py | 54 - .../mgmt/sql/models/tde_certificate_py3.py | 54 - .../azure/mgmt/sql/models/tracked_resource.py | 53 - .../mgmt/sql/models/tracked_resource_py3.py | 53 - .../sql/models/transparent_data_encryption.py | 53 - .../transparent_data_encryption_activity.py | 60 - ...nsparent_data_encryption_activity_paged.py | 27 - ...ransparent_data_encryption_activity_py3.py | 60 - .../models/transparent_data_encryption_py3.py | 53 - .../azure/mgmt/sql/models/virtual_cluster.py | 66 - .../mgmt/sql/models/virtual_cluster_paged.py | 27 - .../mgmt/sql/models/virtual_cluster_py3.py | 66 - .../mgmt/sql/models/virtual_cluster_update.py | 49 - .../sql/models/virtual_cluster_update_py3.py | 49 - .../mgmt/sql/models/virtual_network_rule.py | 61 - .../sql/models/virtual_network_rule_paged.py | 27 - .../sql/models/virtual_network_rule_py3.py | 61 - ...y_assessment_recurring_scans_properties.py | 39 - ...sessment_recurring_scans_properties_py3.py | 39 - .../vulnerability_assessment_scan_error.py | 40 - ...vulnerability_assessment_scan_error_py3.py | 40 - .../vulnerability_assessment_scan_record.py | 88 - ...nerability_assessment_scan_record_paged.py | 27 - ...ulnerability_assessment_scan_record_py3.py | 88 - .../azure/mgmt/sql/operations/__init__.py | 166 +- ...ong_term_retention_policies_operations.py} | 4 +- ...ort_term_retention_policies_operations.py} | 17 +- ...rations.py => _capabilities_operations.py} | 3 +- ...y => _data_masking_policies_operations.py} | 4 +- ...s.py => _data_masking_rules_operations.py} | 17 +- ... _database_automatic_tuning_operations.py} | 4 +- ...base_blob_auditing_policies_operations.py} | 4 +- ..._operations.py => _database_operations.py} | 16 +- ...e_threat_detection_policies_operations.py} | 4 +- ...ions.py => _database_usages_operations.py} | 16 +- ...y_assessment_rule_baselines_operations.py} | 4 +- ...nerability_assessment_scans_operations.py} | 18 +- ...e_vulnerability_assessments_operations.py} | 18 +- ...operations.py => _databases_operations.py} | 146 +- ...=> _elastic_pool_activities_operations.py} | 16 +- ...ic_pool_database_activities_operations.py} | 16 +- ...rations.py => _elastic_pool_operations.py} | 16 +- ...ations.py => _elastic_pools_operations.py} | 132 +- ...y => _encryption_protectors_operations.py} | 17 +- ...base_blob_auditing_policies_operations.py} | 4 +- ...rver_blob_auditing_policies_operations.py} | 3 +- ...ions.py => _failover_groups_operations.py} | 17 +- ...tions.py => _firewall_rules_operations.py} | 18 +- ....py => _geo_backup_policies_operations.py} | 18 +- ...> _instance_failover_groups_operations.py} | 17 +- .../operations/_instance_pools_operations.py | 534 + ...perations.py => _job_agents_operations.py} | 17 +- ...ions.py => _job_credentials_operations.py} | 18 +- ...tions.py => _job_executions_operations.py} | 31 +- ....py => _job_step_executions_operations.py} | 17 +- ...operations.py => _job_steps_operations.py} | 33 +- ...y => _job_target_executions_operations.py} | 31 +- ...ns.py => _job_target_groups_operations.py} | 18 +- ...rations.py => _job_versions_operations.py} | 17 +- ...jobs_operations.py => _jobs_operations.py} | 18 +- ..._long_term_retention_backups_operations.py | 880 ++ ...ort_term_retention_policies_operations.py} | 17 +- ...ase_security_alert_policies_operations.py} | 18 +- ...database_sensitivity_labels_operations.py} | 190 +- ...y_assessment_rule_baselines_operations.py} | 4 +- ...nerability_assessment_scans_operations.py} | 18 +- ...e_vulnerability_assessments_operations.py} | 18 +- ...ns.py => _managed_databases_operations.py} | 17 +- ...tance_encryption_protectors_operations.py} | 17 +- ...y => _managed_instance_keys_operations.py} | 17 +- ...d_instance_tde_certificates_operations.py} | 2 + ...e_vulnerability_assessments_operations.py} | 18 +- ...ns.py => _managed_instances_operations.py} | 119 +- ...ort_term_retention_policies_operations.py} | 17 +- ...ver_security_alert_policies_operations.py} | 17 +- .../{operations.py => _operations.py} | 16 +- ... _recommended_elastic_pools_operations.py} | 31 +- ...y => _recoverable_databases_operations.py} | 17 +- ...coverable_managed_databases_operations.py} | 17 +- ...ns.py => _replication_links_operations.py} | 17 +- ...estorable_dropped_databases_operations.py} | 17 +- ...e_dropped_managed_databases_operations.py} | 17 +- ...tions.py => _restore_points_operations.py} | 17 +- ...s.py => _sensitivity_labels_operations.py} | 190 +- ...=> _server_automatic_tuning_operations.py} | 4 +- ...ver_azure_ad_administrators_operations.py} | 17 +- ...rver_blob_auditing_policies_operations.py} | 3 +- ..._server_communication_links_operations.py} | 17 +- ..._server_connection_policies_operations.py} | 4 +- ...s.py => _server_dns_aliases_operations.py} | 17 +- ...erations.py => _server_keys_operations.py} | 17 +- ...ver_security_alert_policies_operations.py} | 17 +- ...ations.py => _server_usages_operations.py} | 16 +- ...r_vulnerability_assessments_operations.py} | 18 +- ...s_operations.py => _servers_operations.py} | 32 +- ...s.py => _service_objectives_operations.py} | 17 +- ...y => _service_tier_advisors_operations.py} | 17 +- ....py => _subscription_usages_operations.py} | 17 +- ...erations.py => _sync_agents_operations.py} | 32 +- ...erations.py => _sync_groups_operations.py} | 59 +- ...rations.py => _sync_members_operations.py} | 31 +- ...ons.py => _tde_certificates_operations.py} | 2 + ..._data_encryption_activities_operations.py} | 16 +- ...ransparent_data_encryptions_operations.py} | 4 +- .../mgmt/sql/operations/_usages_operations.py | 120 + ...ons.py => _virtual_clusters_operations.py} | 31 +- ...y => _virtual_network_rules_operations.py} | 17 +- .../long_term_retention_backups_operations.py | 441 - 459 files changed, 22360 insertions(+), 24337 deletions(-) create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_configuration.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/{sql_management_client.py => _sql_management_client.py} (75%) create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/{sql_management_client_enums.py => _sql_management_client_enums.py} (95%) delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_py3.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{backup_long_term_retention_policies_operations.py => _backup_long_term_retention_policies_operations.py} (99%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{backup_short_term_retention_policies_operations.py => _backup_short_term_retention_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{capabilities_operations.py => _capabilities_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{data_masking_policies_operations.py => _data_masking_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{data_masking_rules_operations.py => _data_masking_rules_operations.py} (96%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_automatic_tuning_operations.py => _database_automatic_tuning_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_blob_auditing_policies_operations.py => _database_blob_auditing_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_operations.py => _database_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_threat_detection_policies_operations.py => _database_threat_detection_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_usages_operations.py => _database_usages_operations.py} (92%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_vulnerability_assessment_rule_baselines_operations.py => _database_vulnerability_assessment_rule_baselines_operations.py} (99%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_vulnerability_assessment_scans_operations.py => _database_vulnerability_assessment_scans_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_vulnerability_assessments_operations.py => _database_vulnerability_assessments_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{databases_operations.py => _databases_operations.py} (92%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{elastic_pool_activities_operations.py => _elastic_pool_activities_operations.py} (92%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{elastic_pool_database_activities_operations.py => _elastic_pool_database_activities_operations.py} (92%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{elastic_pool_operations.py => _elastic_pool_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{elastic_pools_operations.py => _elastic_pools_operations.py} (85%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{encryption_protectors_operations.py => _encryption_protectors_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{extended_database_blob_auditing_policies_operations.py => _extended_database_blob_auditing_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{extended_server_blob_auditing_policies_operations.py => _extended_server_blob_auditing_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{failover_groups_operations.py => _failover_groups_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{firewall_rules_operations.py => _firewall_rules_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{geo_backup_policies_operations.py => _geo_backup_policies_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{instance_failover_groups_operations.py => _instance_failover_groups_operations.py} (98%) create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_pools_operations.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_agents_operations.py => _job_agents_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_credentials_operations.py => _job_credentials_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_executions_operations.py => _job_executions_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_step_executions_operations.py => _job_step_executions_operations.py} (96%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_steps_operations.py => _job_steps_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_target_executions_operations.py => _job_target_executions_operations.py} (96%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_target_groups_operations.py => _job_target_groups_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_versions_operations.py => _job_versions_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{jobs_operations.py => _jobs_operations.py} (97%) create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_backups_operations.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_backup_short_term_retention_policies_operations.py => _managed_backup_short_term_retention_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_database_security_alert_policies_operations.py => _managed_database_security_alert_policies_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_database_sensitivity_labels_operations.py => _managed_database_sensitivity_labels_operations.py} (70%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_database_vulnerability_assessment_rule_baselines_operations.py => _managed_database_vulnerability_assessment_rule_baselines_operations.py} (99%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_database_vulnerability_assessment_scans_operations.py => _managed_database_vulnerability_assessment_scans_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_database_vulnerability_assessments_operations.py => _managed_database_vulnerability_assessments_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_databases_operations.py => _managed_databases_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_instance_encryption_protectors_operations.py => _managed_instance_encryption_protectors_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_instance_keys_operations.py => _managed_instance_keys_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_instance_tde_certificates_operations.py => _managed_instance_tde_certificates_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_instance_vulnerability_assessments_operations.py => _managed_instance_vulnerability_assessments_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_instances_operations.py => _managed_instances_operations.py} (84%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py => _managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_server_security_alert_policies_operations.py => _managed_server_security_alert_policies_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{operations.py => _operations.py} (90%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{recommended_elastic_pools_operations.py => _recommended_elastic_pools_operations.py} (94%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{recoverable_databases_operations.py => _recoverable_databases_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{recoverable_managed_databases_operations.py => _recoverable_managed_databases_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{replication_links_operations.py => _replication_links_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{restorable_dropped_databases_operations.py => _restorable_dropped_databases_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{restorable_dropped_managed_databases_operations.py => _restorable_dropped_managed_databases_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{restore_points_operations.py => _restore_points_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{sensitivity_labels_operations.py => _sensitivity_labels_operations.py} (70%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_automatic_tuning_operations.py => _server_automatic_tuning_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_azure_ad_administrators_operations.py => _server_azure_ad_administrators_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_blob_auditing_policies_operations.py => _server_blob_auditing_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_communication_links_operations.py => _server_communication_links_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_connection_policies_operations.py => _server_connection_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_dns_aliases_operations.py => _server_dns_aliases_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_keys_operations.py => _server_keys_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_security_alert_policies_operations.py => _server_security_alert_policies_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_usages_operations.py => _server_usages_operations.py} (92%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_vulnerability_assessments_operations.py => _server_vulnerability_assessments_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{servers_operations.py => _servers_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{service_objectives_operations.py => _service_objectives_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{service_tier_advisors_operations.py => _service_tier_advisors_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{subscription_usages_operations.py => _subscription_usages_operations.py} (94%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{sync_agents_operations.py => _sync_agents_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{sync_groups_operations.py => _sync_groups_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{sync_members_operations.py => _sync_members_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{tde_certificates_operations.py => _tde_certificates_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{transparent_data_encryption_activities_operations.py => _transparent_data_encryption_activities_operations.py} (93%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{transparent_data_encryptions_operations.py => _transparent_data_encryptions_operations.py} (98%) create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_usages_operations.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{virtual_clusters_operations.py => _virtual_clusters_operations.py} (96%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{virtual_network_rules_operations.py => _virtual_network_rules_operations.py} (97%) delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/long_term_retention_backups_operations.py diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/__init__.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/__init__.py index 33b83233be3c..48b056c94dfa 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/__init__.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .sql_management_client import SqlManagementClient -from .version import VERSION +from ._configuration import SqlManagementClientConfiguration +from ._sql_management_client import SqlManagementClient +__all__ = ['SqlManagementClient', 'SqlManagementClientConfiguration'] -__all__ = ['SqlManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_configuration.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_configuration.py new file mode 100644 index 000000000000..ca7086f8dadf --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_configuration.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class SqlManagementClientConfiguration(AzureConfiguration): + """Configuration for SqlManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription ID that identifies an Azure + subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(SqlManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-sql/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py similarity index 75% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py index aae1ce917e14..1bedc764b599 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py @@ -11,122 +11,91 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.recoverable_databases_operations import RecoverableDatabasesOperations -from .operations.restorable_dropped_databases_operations import RestorableDroppedDatabasesOperations -from .operations.servers_operations import ServersOperations -from .operations.server_connection_policies_operations import ServerConnectionPoliciesOperations -from .operations.database_threat_detection_policies_operations import DatabaseThreatDetectionPoliciesOperations -from .operations.data_masking_policies_operations import DataMaskingPoliciesOperations -from .operations.data_masking_rules_operations import DataMaskingRulesOperations -from .operations.firewall_rules_operations import FirewallRulesOperations -from .operations.geo_backup_policies_operations import GeoBackupPoliciesOperations -from .operations.databases_operations import DatabasesOperations -from .operations.elastic_pools_operations import ElasticPoolsOperations -from .operations.recommended_elastic_pools_operations import RecommendedElasticPoolsOperations -from .operations.replication_links_operations import ReplicationLinksOperations -from .operations.server_azure_ad_administrators_operations import ServerAzureADAdministratorsOperations -from .operations.server_communication_links_operations import ServerCommunicationLinksOperations -from .operations.service_objectives_operations import ServiceObjectivesOperations -from .operations.elastic_pool_activities_operations import ElasticPoolActivitiesOperations -from .operations.elastic_pool_database_activities_operations import ElasticPoolDatabaseActivitiesOperations -from .operations.service_tier_advisors_operations import ServiceTierAdvisorsOperations -from .operations.transparent_data_encryptions_operations import TransparentDataEncryptionsOperations -from .operations.transparent_data_encryption_activities_operations import TransparentDataEncryptionActivitiesOperations -from .operations.server_usages_operations import ServerUsagesOperations -from .operations.database_usages_operations import DatabaseUsagesOperations -from .operations.database_automatic_tuning_operations import DatabaseAutomaticTuningOperations -from .operations.encryption_protectors_operations import EncryptionProtectorsOperations -from .operations.failover_groups_operations import FailoverGroupsOperations -from .operations.managed_instances_operations import ManagedInstancesOperations -from .operations.operations import Operations -from .operations.server_keys_operations import ServerKeysOperations -from .operations.sync_agents_operations import SyncAgentsOperations -from .operations.sync_groups_operations import SyncGroupsOperations -from .operations.sync_members_operations import SyncMembersOperations -from .operations.subscription_usages_operations import SubscriptionUsagesOperations -from .operations.virtual_clusters_operations import VirtualClustersOperations -from .operations.virtual_network_rules_operations import VirtualNetworkRulesOperations -from .operations.extended_database_blob_auditing_policies_operations import ExtendedDatabaseBlobAuditingPoliciesOperations -from .operations.extended_server_blob_auditing_policies_operations import ExtendedServerBlobAuditingPoliciesOperations -from .operations.server_blob_auditing_policies_operations import ServerBlobAuditingPoliciesOperations -from .operations.database_blob_auditing_policies_operations import DatabaseBlobAuditingPoliciesOperations -from .operations.database_vulnerability_assessment_rule_baselines_operations import DatabaseVulnerabilityAssessmentRuleBaselinesOperations -from .operations.database_vulnerability_assessments_operations import DatabaseVulnerabilityAssessmentsOperations -from .operations.job_agents_operations import JobAgentsOperations -from .operations.job_credentials_operations import JobCredentialsOperations -from .operations.job_executions_operations import JobExecutionsOperations -from .operations.jobs_operations import JobsOperations -from .operations.job_step_executions_operations import JobStepExecutionsOperations -from .operations.job_steps_operations import JobStepsOperations -from .operations.job_target_executions_operations import JobTargetExecutionsOperations -from .operations.job_target_groups_operations import JobTargetGroupsOperations -from .operations.job_versions_operations import JobVersionsOperations -from .operations.long_term_retention_backups_operations import LongTermRetentionBackupsOperations -from .operations.backup_long_term_retention_policies_operations import BackupLongTermRetentionPoliciesOperations -from .operations.managed_backup_short_term_retention_policies_operations import ManagedBackupShortTermRetentionPoliciesOperations -from .operations.managed_databases_operations import ManagedDatabasesOperations -from .operations.managed_restorable_dropped_database_backup_short_term_retention_policies_operations import ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations -from .operations.server_automatic_tuning_operations import ServerAutomaticTuningOperations -from .operations.server_dns_aliases_operations import ServerDnsAliasesOperations -from .operations.server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations -from .operations.restorable_dropped_managed_databases_operations import RestorableDroppedManagedDatabasesOperations -from .operations.restore_points_operations import RestorePointsOperations -from .operations.managed_database_security_alert_policies_operations import ManagedDatabaseSecurityAlertPoliciesOperations -from .operations.managed_server_security_alert_policies_operations import ManagedServerSecurityAlertPoliciesOperations -from .operations.sensitivity_labels_operations import SensitivityLabelsOperations -from .operations.database_operations import DatabaseOperations -from .operations.elastic_pool_operations import ElasticPoolOperations -from .operations.capabilities_operations import CapabilitiesOperations -from .operations.database_vulnerability_assessment_scans_operations import DatabaseVulnerabilityAssessmentScansOperations -from .operations.managed_database_vulnerability_assessment_rule_baselines_operations import ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations -from .operations.managed_database_vulnerability_assessment_scans_operations import ManagedDatabaseVulnerabilityAssessmentScansOperations -from .operations.managed_database_vulnerability_assessments_operations import ManagedDatabaseVulnerabilityAssessmentsOperations -from .operations.instance_failover_groups_operations import InstanceFailoverGroupsOperations -from .operations.backup_short_term_retention_policies_operations import BackupShortTermRetentionPoliciesOperations -from .operations.tde_certificates_operations import TdeCertificatesOperations -from .operations.managed_instance_tde_certificates_operations import ManagedInstanceTdeCertificatesOperations -from .operations.managed_instance_keys_operations import ManagedInstanceKeysOperations -from .operations.managed_instance_encryption_protectors_operations import ManagedInstanceEncryptionProtectorsOperations -from .operations.recoverable_managed_databases_operations import RecoverableManagedDatabasesOperations -from .operations.managed_instance_vulnerability_assessments_operations import ManagedInstanceVulnerabilityAssessmentsOperations -from .operations.server_vulnerability_assessments_operations import ServerVulnerabilityAssessmentsOperations -from .operations.managed_database_sensitivity_labels_operations import ManagedDatabaseSensitivityLabelsOperations -from . import models - - -class SqlManagementClientConfiguration(AzureConfiguration): - """Configuration for SqlManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The subscription ID that identifies an Azure - subscription. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(SqlManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-sql/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import SqlManagementClientConfiguration +from .operations import RecoverableDatabasesOperations +from .operations import RestorableDroppedDatabasesOperations +from .operations import ServersOperations +from .operations import ServerConnectionPoliciesOperations +from .operations import DatabaseThreatDetectionPoliciesOperations +from .operations import DataMaskingPoliciesOperations +from .operations import DataMaskingRulesOperations +from .operations import FirewallRulesOperations +from .operations import GeoBackupPoliciesOperations +from .operations import DatabasesOperations +from .operations import ElasticPoolsOperations +from .operations import RecommendedElasticPoolsOperations +from .operations import ReplicationLinksOperations +from .operations import ServerAzureADAdministratorsOperations +from .operations import ServerCommunicationLinksOperations +from .operations import ServiceObjectivesOperations +from .operations import ElasticPoolActivitiesOperations +from .operations import ElasticPoolDatabaseActivitiesOperations +from .operations import ServiceTierAdvisorsOperations +from .operations import TransparentDataEncryptionsOperations +from .operations import TransparentDataEncryptionActivitiesOperations +from .operations import ServerUsagesOperations +from .operations import DatabaseUsagesOperations +from .operations import DatabaseAutomaticTuningOperations +from .operations import EncryptionProtectorsOperations +from .operations import FailoverGroupsOperations +from .operations import Operations +from .operations import ServerKeysOperations +from .operations import SyncAgentsOperations +from .operations import SyncGroupsOperations +from .operations import SyncMembersOperations +from .operations import SubscriptionUsagesOperations +from .operations import VirtualClustersOperations +from .operations import VirtualNetworkRulesOperations +from .operations import ExtendedDatabaseBlobAuditingPoliciesOperations +from .operations import ExtendedServerBlobAuditingPoliciesOperations +from .operations import ServerBlobAuditingPoliciesOperations +from .operations import DatabaseBlobAuditingPoliciesOperations +from .operations import DatabaseVulnerabilityAssessmentRuleBaselinesOperations +from .operations import DatabaseVulnerabilityAssessmentsOperations +from .operations import JobAgentsOperations +from .operations import JobCredentialsOperations +from .operations import JobExecutionsOperations +from .operations import JobsOperations +from .operations import JobStepExecutionsOperations +from .operations import JobStepsOperations +from .operations import JobTargetExecutionsOperations +from .operations import JobTargetGroupsOperations +from .operations import JobVersionsOperations +from .operations import LongTermRetentionBackupsOperations +from .operations import BackupLongTermRetentionPoliciesOperations +from .operations import ManagedBackupShortTermRetentionPoliciesOperations +from .operations import ManagedDatabasesOperations +from .operations import ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations +from .operations import ServerAutomaticTuningOperations +from .operations import ServerDnsAliasesOperations +from .operations import ServerSecurityAlertPoliciesOperations +from .operations import RestorableDroppedManagedDatabasesOperations +from .operations import RestorePointsOperations +from .operations import ManagedDatabaseSecurityAlertPoliciesOperations +from .operations import ManagedServerSecurityAlertPoliciesOperations +from .operations import SensitivityLabelsOperations +from .operations import DatabaseOperations +from .operations import ElasticPoolOperations +from .operations import CapabilitiesOperations +from .operations import DatabaseVulnerabilityAssessmentScansOperations +from .operations import ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations +from .operations import ManagedDatabaseVulnerabilityAssessmentScansOperations +from .operations import ManagedDatabaseVulnerabilityAssessmentsOperations +from .operations import InstanceFailoverGroupsOperations +from .operations import BackupShortTermRetentionPoliciesOperations +from .operations import TdeCertificatesOperations +from .operations import ManagedInstanceTdeCertificatesOperations +from .operations import ManagedInstanceKeysOperations +from .operations import ManagedInstanceEncryptionProtectorsOperations +from .operations import RecoverableManagedDatabasesOperations +from .operations import ManagedInstanceVulnerabilityAssessmentsOperations +from .operations import ServerVulnerabilityAssessmentsOperations +from .operations import ManagedDatabaseSensitivityLabelsOperations +from .operations import InstancePoolsOperations +from .operations import UsagesOperations +from .operations import ManagedInstancesOperations +from . import models class SqlManagementClient(SDKClient): @@ -187,8 +156,6 @@ class SqlManagementClient(SDKClient): :vartype encryption_protectors: azure.mgmt.sql.operations.EncryptionProtectorsOperations :ivar failover_groups: FailoverGroups operations :vartype failover_groups: azure.mgmt.sql.operations.FailoverGroupsOperations - :ivar managed_instances: ManagedInstances operations - :vartype managed_instances: azure.mgmt.sql.operations.ManagedInstancesOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.sql.operations.Operations :ivar server_keys: ServerKeys operations @@ -295,6 +262,12 @@ class SqlManagementClient(SDKClient): :vartype server_vulnerability_assessments: azure.mgmt.sql.operations.ServerVulnerabilityAssessmentsOperations :ivar managed_database_sensitivity_labels: ManagedDatabaseSensitivityLabels operations :vartype managed_database_sensitivity_labels: azure.mgmt.sql.operations.ManagedDatabaseSensitivityLabelsOperations + :ivar instance_pools: InstancePools operations + :vartype instance_pools: azure.mgmt.sql.operations.InstancePoolsOperations + :ivar usages: Usages operations + :vartype usages: azure.mgmt.sql.operations.UsagesOperations + :ivar managed_instances: ManagedInstances operations + :vartype managed_instances: azure.mgmt.sql.operations.ManagedInstancesOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -367,8 +340,6 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.failover_groups = FailoverGroupsOperations( self._client, self.config, self._serialize, self._deserialize) - self.managed_instances = ManagedInstancesOperations( - self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) self.server_keys = ServerKeysOperations( @@ -475,3 +446,9 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.managed_database_sensitivity_labels = ManagedDatabaseSensitivityLabelsOperations( self._client, self.config, self._serialize, self._deserialize) + self.instance_pools = InstancePoolsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.usages = UsagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.managed_instances = ManagedInstancesOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py index 0a543180d7e4..57ac98e75568 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py @@ -10,375 +10,385 @@ # -------------------------------------------------------------------------- try: - from .recoverable_database_py3 import RecoverableDatabase - from .restorable_dropped_database_py3 import RestorableDroppedDatabase - from .tracked_resource_py3 import TrackedResource - from .resource_py3 import Resource - from .proxy_resource_py3 import ProxyResource - from .check_name_availability_request_py3 import CheckNameAvailabilityRequest - from .check_name_availability_response_py3 import CheckNameAvailabilityResponse - from .server_connection_policy_py3 import ServerConnectionPolicy - from .database_security_alert_policy_py3 import DatabaseSecurityAlertPolicy - from .data_masking_policy_py3 import DataMaskingPolicy - from .data_masking_rule_py3 import DataMaskingRule - from .firewall_rule_py3 import FirewallRule - from .geo_backup_policy_py3 import GeoBackupPolicy - from .import_extension_request_py3 import ImportExtensionRequest - from .import_export_response_py3 import ImportExportResponse - from .import_request_py3 import ImportRequest - from .export_request_py3 import ExportRequest - from .metric_value_py3 import MetricValue - from .metric_name_py3 import MetricName - from .metric_py3 import Metric - from .metric_availability_py3 import MetricAvailability - from .metric_definition_py3 import MetricDefinition - from .recommended_elastic_pool_metric_py3 import RecommendedElasticPoolMetric - from .recommended_elastic_pool_py3 import RecommendedElasticPool - from .replication_link_py3 import ReplicationLink - from .server_azure_ad_administrator_py3 import ServerAzureADAdministrator - from .server_communication_link_py3 import ServerCommunicationLink - from .service_objective_py3 import ServiceObjective - from .elastic_pool_activity_py3 import ElasticPoolActivity - from .elastic_pool_database_activity_py3 import ElasticPoolDatabaseActivity - from .operation_impact_py3 import OperationImpact - from .recommended_index_py3 import RecommendedIndex - from .transparent_data_encryption_py3 import TransparentDataEncryption - from .slo_usage_metric_py3 import SloUsageMetric - from .service_tier_advisor_py3 import ServiceTierAdvisor - from .transparent_data_encryption_activity_py3 import TransparentDataEncryptionActivity - from .server_usage_py3 import ServerUsage - from .database_usage_py3 import DatabaseUsage - from .automatic_tuning_options_py3 import AutomaticTuningOptions - from .database_automatic_tuning_py3 import DatabaseAutomaticTuning - from .encryption_protector_py3 import EncryptionProtector - from .failover_group_read_write_endpoint_py3 import FailoverGroupReadWriteEndpoint - from .failover_group_read_only_endpoint_py3 import FailoverGroupReadOnlyEndpoint - from .partner_info_py3 import PartnerInfo - from .failover_group_py3 import FailoverGroup - from .failover_group_update_py3 import FailoverGroupUpdate - from .resource_identity_py3 import ResourceIdentity - from .sku_py3 import Sku - from .managed_instance_py3 import ManagedInstance - from .managed_instance_update_py3 import ManagedInstanceUpdate - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .server_key_py3 import ServerKey - from .server_py3 import Server - from .server_update_py3 import ServerUpdate - from .sync_agent_py3 import SyncAgent - from .sync_agent_key_properties_py3 import SyncAgentKeyProperties - from .sync_agent_linked_database_py3 import SyncAgentLinkedDatabase - from .sync_database_id_properties_py3 import SyncDatabaseIdProperties - from .sync_full_schema_table_column_py3 import SyncFullSchemaTableColumn - from .sync_full_schema_table_py3 import SyncFullSchemaTable - from .sync_full_schema_properties_py3 import SyncFullSchemaProperties - from .sync_group_log_properties_py3 import SyncGroupLogProperties - from .sync_group_schema_table_column_py3 import SyncGroupSchemaTableColumn - from .sync_group_schema_table_py3 import SyncGroupSchemaTable - from .sync_group_schema_py3 import SyncGroupSchema - from .sync_group_py3 import SyncGroup - from .sync_member_py3 import SyncMember - from .subscription_usage_py3 import SubscriptionUsage - from .virtual_cluster_py3 import VirtualCluster - from .virtual_cluster_update_py3 import VirtualClusterUpdate - from .virtual_network_rule_py3 import VirtualNetworkRule - from .extended_database_blob_auditing_policy_py3 import ExtendedDatabaseBlobAuditingPolicy - from .extended_server_blob_auditing_policy_py3 import ExtendedServerBlobAuditingPolicy - from .server_blob_auditing_policy_py3 import ServerBlobAuditingPolicy - from .database_blob_auditing_policy_py3 import DatabaseBlobAuditingPolicy - from .database_vulnerability_assessment_rule_baseline_item_py3 import DatabaseVulnerabilityAssessmentRuleBaselineItem - from .database_vulnerability_assessment_rule_baseline_py3 import DatabaseVulnerabilityAssessmentRuleBaseline - from .vulnerability_assessment_recurring_scans_properties_py3 import VulnerabilityAssessmentRecurringScansProperties - from .database_vulnerability_assessment_py3 import DatabaseVulnerabilityAssessment - from .job_agent_py3 import JobAgent - from .job_agent_update_py3 import JobAgentUpdate - from .job_credential_py3 import JobCredential - from .job_execution_target_py3 import JobExecutionTarget - from .job_execution_py3 import JobExecution - from .job_schedule_py3 import JobSchedule - from .job_py3 import Job - from .job_step_action_py3 import JobStepAction - from .job_step_output_py3 import JobStepOutput - from .job_step_execution_options_py3 import JobStepExecutionOptions - from .job_step_py3 import JobStep - from .job_target_py3 import JobTarget - from .job_target_group_py3 import JobTargetGroup - from .job_version_py3 import JobVersion - from .long_term_retention_backup_py3 import LongTermRetentionBackup - from .backup_long_term_retention_policy_py3 import BackupLongTermRetentionPolicy - from .managed_backup_short_term_retention_policy_py3 import ManagedBackupShortTermRetentionPolicy - from .complete_database_restore_definition_py3 import CompleteDatabaseRestoreDefinition - from .managed_database_py3 import ManagedDatabase - from .managed_database_update_py3 import ManagedDatabaseUpdate - from .automatic_tuning_server_options_py3 import AutomaticTuningServerOptions - from .server_automatic_tuning_py3 import ServerAutomaticTuning - from .server_dns_alias_py3 import ServerDnsAlias - from .server_dns_alias_acquisition_py3 import ServerDnsAliasAcquisition - from .server_security_alert_policy_py3 import ServerSecurityAlertPolicy - from .restorable_dropped_managed_database_py3 import RestorableDroppedManagedDatabase - from .restore_point_py3 import RestorePoint - from .create_database_restore_point_definition_py3 import CreateDatabaseRestorePointDefinition - from .managed_database_security_alert_policy_py3 import ManagedDatabaseSecurityAlertPolicy - from .managed_server_security_alert_policy_py3 import ManagedServerSecurityAlertPolicy - from .sensitivity_label_py3 import SensitivityLabel - from .database_operation_py3 import DatabaseOperation - from .elastic_pool_operation_py3 import ElasticPoolOperation - from .max_size_capability_py3 import MaxSizeCapability - from .log_size_capability_py3 import LogSizeCapability - from .max_size_range_capability_py3 import MaxSizeRangeCapability - from .performance_level_capability_py3 import PerformanceLevelCapability - from .license_type_capability_py3 import LicenseTypeCapability - from .service_objective_capability_py3 import ServiceObjectiveCapability - from .edition_capability_py3 import EditionCapability - from .elastic_pool_per_database_min_performance_level_capability_py3 import ElasticPoolPerDatabaseMinPerformanceLevelCapability - from .elastic_pool_per_database_max_performance_level_capability_py3 import ElasticPoolPerDatabaseMaxPerformanceLevelCapability - from .elastic_pool_performance_level_capability_py3 import ElasticPoolPerformanceLevelCapability - from .elastic_pool_edition_capability_py3 import ElasticPoolEditionCapability - from .server_version_capability_py3 import ServerVersionCapability - from .managed_instance_vcores_capability_py3 import ManagedInstanceVcoresCapability - from .managed_instance_family_capability_py3 import ManagedInstanceFamilyCapability - from .managed_instance_edition_capability_py3 import ManagedInstanceEditionCapability - from .managed_instance_version_capability_py3 import ManagedInstanceVersionCapability - from .location_capabilities_py3 import LocationCapabilities - from .database_py3 import Database - from .database_update_py3 import DatabaseUpdate - from .resource_move_definition_py3 import ResourceMoveDefinition - from .elastic_pool_per_database_settings_py3 import ElasticPoolPerDatabaseSettings - from .elastic_pool_py3 import ElasticPool - from .elastic_pool_update_py3 import ElasticPoolUpdate - from .vulnerability_assessment_scan_error_py3 import VulnerabilityAssessmentScanError - from .vulnerability_assessment_scan_record_py3 import VulnerabilityAssessmentScanRecord - from .database_vulnerability_assessment_scans_export_py3 import DatabaseVulnerabilityAssessmentScansExport - from .instance_failover_group_read_write_endpoint_py3 import InstanceFailoverGroupReadWriteEndpoint - from .instance_failover_group_read_only_endpoint_py3 import InstanceFailoverGroupReadOnlyEndpoint - from .partner_region_info_py3 import PartnerRegionInfo - from .managed_instance_pair_info_py3 import ManagedInstancePairInfo - from .instance_failover_group_py3 import InstanceFailoverGroup - from .backup_short_term_retention_policy_py3 import BackupShortTermRetentionPolicy - from .tde_certificate_py3 import TdeCertificate - from .managed_instance_key_py3 import ManagedInstanceKey - from .managed_instance_encryption_protector_py3 import ManagedInstanceEncryptionProtector - from .recoverable_managed_database_py3 import RecoverableManagedDatabase - from .managed_instance_vulnerability_assessment_py3 import ManagedInstanceVulnerabilityAssessment - from .server_vulnerability_assessment_py3 import ServerVulnerabilityAssessment + from ._models_py3 import AutomaticTuningOptions + from ._models_py3 import AutomaticTuningServerOptions + from ._models_py3 import BackupLongTermRetentionPolicy + from ._models_py3 import BackupShortTermRetentionPolicy + from ._models_py3 import CheckNameAvailabilityRequest + from ._models_py3 import CheckNameAvailabilityResponse + from ._models_py3 import CompleteDatabaseRestoreDefinition + from ._models_py3 import CreateDatabaseRestorePointDefinition + from ._models_py3 import Database + from ._models_py3 import DatabaseAutomaticTuning + from ._models_py3 import DatabaseBlobAuditingPolicy + from ._models_py3 import DatabaseOperation + from ._models_py3 import DatabaseSecurityAlertPolicy + from ._models_py3 import DatabaseUpdate + from ._models_py3 import DatabaseUsage + from ._models_py3 import DatabaseVulnerabilityAssessment + from ._models_py3 import DatabaseVulnerabilityAssessmentRuleBaseline + from ._models_py3 import DatabaseVulnerabilityAssessmentRuleBaselineItem + from ._models_py3 import DatabaseVulnerabilityAssessmentScansExport + from ._models_py3 import DataMaskingPolicy + from ._models_py3 import DataMaskingRule + from ._models_py3 import EditionCapability + from ._models_py3 import ElasticPool + from ._models_py3 import ElasticPoolActivity + from ._models_py3 import ElasticPoolDatabaseActivity + from ._models_py3 import ElasticPoolEditionCapability + from ._models_py3 import ElasticPoolOperation + from ._models_py3 import ElasticPoolPerDatabaseMaxPerformanceLevelCapability + from ._models_py3 import ElasticPoolPerDatabaseMinPerformanceLevelCapability + from ._models_py3 import ElasticPoolPerDatabaseSettings + from ._models_py3 import ElasticPoolPerformanceLevelCapability + from ._models_py3 import ElasticPoolUpdate + from ._models_py3 import EncryptionProtector + from ._models_py3 import ExportRequest + from ._models_py3 import ExtendedDatabaseBlobAuditingPolicy + from ._models_py3 import ExtendedServerBlobAuditingPolicy + from ._models_py3 import FailoverGroup + from ._models_py3 import FailoverGroupReadOnlyEndpoint + from ._models_py3 import FailoverGroupReadWriteEndpoint + from ._models_py3 import FailoverGroupUpdate + from ._models_py3 import FirewallRule + from ._models_py3 import GeoBackupPolicy + from ._models_py3 import ImportExportResponse + from ._models_py3 import ImportExtensionRequest + from ._models_py3 import ImportRequest + from ._models_py3 import InstanceFailoverGroup + from ._models_py3 import InstanceFailoverGroupReadOnlyEndpoint + from ._models_py3 import InstanceFailoverGroupReadWriteEndpoint + from ._models_py3 import InstancePool + from ._models_py3 import InstancePoolUpdate + from ._models_py3 import Job + from ._models_py3 import JobAgent + from ._models_py3 import JobAgentUpdate + from ._models_py3 import JobCredential + from ._models_py3 import JobExecution + from ._models_py3 import JobExecutionTarget + from ._models_py3 import JobSchedule + from ._models_py3 import JobStep + from ._models_py3 import JobStepAction + from ._models_py3 import JobStepExecutionOptions + from ._models_py3 import JobStepOutput + from ._models_py3 import JobTarget + from ._models_py3 import JobTargetGroup + from ._models_py3 import JobVersion + from ._models_py3 import LicenseTypeCapability + from ._models_py3 import LocationCapabilities + from ._models_py3 import LogSizeCapability + from ._models_py3 import LongTermRetentionBackup + from ._models_py3 import ManagedBackupShortTermRetentionPolicy + from ._models_py3 import ManagedDatabase + from ._models_py3 import ManagedDatabaseSecurityAlertPolicy + from ._models_py3 import ManagedDatabaseUpdate + from ._models_py3 import ManagedInstance + from ._models_py3 import ManagedInstanceEditionCapability + from ._models_py3 import ManagedInstanceEncryptionProtector + from ._models_py3 import ManagedInstanceFamilyCapability + from ._models_py3 import ManagedInstanceKey + from ._models_py3 import ManagedInstancePairInfo + from ._models_py3 import ManagedInstanceUpdate + from ._models_py3 import ManagedInstanceVcoresCapability + from ._models_py3 import ManagedInstanceVersionCapability + from ._models_py3 import ManagedInstanceVulnerabilityAssessment + from ._models_py3 import ManagedServerSecurityAlertPolicy + from ._models_py3 import MaxSizeCapability + from ._models_py3 import MaxSizeRangeCapability + from ._models_py3 import Metric + from ._models_py3 import MetricAvailability + from ._models_py3 import MetricDefinition + from ._models_py3 import MetricName + from ._models_py3 import MetricValue + from ._models_py3 import Name + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationImpact + from ._models_py3 import PartnerInfo + from ._models_py3 import PartnerRegionInfo + from ._models_py3 import PerformanceLevelCapability + from ._models_py3 import ProxyResource + from ._models_py3 import RecommendedElasticPool + from ._models_py3 import RecommendedElasticPoolMetric + from ._models_py3 import RecommendedIndex + from ._models_py3 import RecoverableDatabase + from ._models_py3 import RecoverableManagedDatabase + from ._models_py3 import ReplicationLink + from ._models_py3 import Resource + from ._models_py3 import ResourceIdentity + from ._models_py3 import ResourceMoveDefinition + from ._models_py3 import RestorableDroppedDatabase + from ._models_py3 import RestorableDroppedManagedDatabase + from ._models_py3 import RestorePoint + from ._models_py3 import SensitivityLabel + from ._models_py3 import Server + from ._models_py3 import ServerAutomaticTuning + from ._models_py3 import ServerAzureADAdministrator + from ._models_py3 import ServerBlobAuditingPolicy + from ._models_py3 import ServerCommunicationLink + from ._models_py3 import ServerConnectionPolicy + from ._models_py3 import ServerDnsAlias + from ._models_py3 import ServerDnsAliasAcquisition + from ._models_py3 import ServerKey + from ._models_py3 import ServerSecurityAlertPolicy + from ._models_py3 import ServerUpdate + from ._models_py3 import ServerUsage + from ._models_py3 import ServerVersionCapability + from ._models_py3 import ServerVulnerabilityAssessment + from ._models_py3 import ServiceObjective + from ._models_py3 import ServiceObjectiveCapability + from ._models_py3 import ServiceTierAdvisor + from ._models_py3 import Sku + from ._models_py3 import SloUsageMetric + from ._models_py3 import SubscriptionUsage + from ._models_py3 import SyncAgent + from ._models_py3 import SyncAgentKeyProperties + from ._models_py3 import SyncAgentLinkedDatabase + from ._models_py3 import SyncDatabaseIdProperties + from ._models_py3 import SyncFullSchemaProperties + from ._models_py3 import SyncFullSchemaTable + from ._models_py3 import SyncFullSchemaTableColumn + from ._models_py3 import SyncGroup + from ._models_py3 import SyncGroupLogProperties + from ._models_py3 import SyncGroupSchema + from ._models_py3 import SyncGroupSchemaTable + from ._models_py3 import SyncGroupSchemaTableColumn + from ._models_py3 import SyncMember + from ._models_py3 import TdeCertificate + from ._models_py3 import TrackedResource + from ._models_py3 import TransparentDataEncryption + from ._models_py3 import TransparentDataEncryptionActivity + from ._models_py3 import Usage + from ._models_py3 import VirtualCluster + from ._models_py3 import VirtualClusterUpdate + from ._models_py3 import VirtualNetworkRule + from ._models_py3 import VulnerabilityAssessmentRecurringScansProperties + from ._models_py3 import VulnerabilityAssessmentScanError + from ._models_py3 import VulnerabilityAssessmentScanRecord except (SyntaxError, ImportError): - from .recoverable_database import RecoverableDatabase - from .restorable_dropped_database import RestorableDroppedDatabase - from .tracked_resource import TrackedResource - from .resource import Resource - from .proxy_resource import ProxyResource - from .check_name_availability_request import CheckNameAvailabilityRequest - from .check_name_availability_response import CheckNameAvailabilityResponse - from .server_connection_policy import ServerConnectionPolicy - from .database_security_alert_policy import DatabaseSecurityAlertPolicy - from .data_masking_policy import DataMaskingPolicy - from .data_masking_rule import DataMaskingRule - from .firewall_rule import FirewallRule - from .geo_backup_policy import GeoBackupPolicy - from .import_extension_request import ImportExtensionRequest - from .import_export_response import ImportExportResponse - from .import_request import ImportRequest - from .export_request import ExportRequest - from .metric_value import MetricValue - from .metric_name import MetricName - from .metric import Metric - from .metric_availability import MetricAvailability - from .metric_definition import MetricDefinition - from .recommended_elastic_pool_metric import RecommendedElasticPoolMetric - from .recommended_elastic_pool import RecommendedElasticPool - from .replication_link import ReplicationLink - from .server_azure_ad_administrator import ServerAzureADAdministrator - from .server_communication_link import ServerCommunicationLink - from .service_objective import ServiceObjective - from .elastic_pool_activity import ElasticPoolActivity - from .elastic_pool_database_activity import ElasticPoolDatabaseActivity - from .operation_impact import OperationImpact - from .recommended_index import RecommendedIndex - from .transparent_data_encryption import TransparentDataEncryption - from .slo_usage_metric import SloUsageMetric - from .service_tier_advisor import ServiceTierAdvisor - from .transparent_data_encryption_activity import TransparentDataEncryptionActivity - from .server_usage import ServerUsage - from .database_usage import DatabaseUsage - from .automatic_tuning_options import AutomaticTuningOptions - from .database_automatic_tuning import DatabaseAutomaticTuning - from .encryption_protector import EncryptionProtector - from .failover_group_read_write_endpoint import FailoverGroupReadWriteEndpoint - from .failover_group_read_only_endpoint import FailoverGroupReadOnlyEndpoint - from .partner_info import PartnerInfo - from .failover_group import FailoverGroup - from .failover_group_update import FailoverGroupUpdate - from .resource_identity import ResourceIdentity - from .sku import Sku - from .managed_instance import ManagedInstance - from .managed_instance_update import ManagedInstanceUpdate - from .operation_display import OperationDisplay - from .operation import Operation - from .server_key import ServerKey - from .server import Server - from .server_update import ServerUpdate - from .sync_agent import SyncAgent - from .sync_agent_key_properties import SyncAgentKeyProperties - from .sync_agent_linked_database import SyncAgentLinkedDatabase - from .sync_database_id_properties import SyncDatabaseIdProperties - from .sync_full_schema_table_column import SyncFullSchemaTableColumn - from .sync_full_schema_table import SyncFullSchemaTable - from .sync_full_schema_properties import SyncFullSchemaProperties - from .sync_group_log_properties import SyncGroupLogProperties - from .sync_group_schema_table_column import SyncGroupSchemaTableColumn - from .sync_group_schema_table import SyncGroupSchemaTable - from .sync_group_schema import SyncGroupSchema - from .sync_group import SyncGroup - from .sync_member import SyncMember - from .subscription_usage import SubscriptionUsage - from .virtual_cluster import VirtualCluster - from .virtual_cluster_update import VirtualClusterUpdate - from .virtual_network_rule import VirtualNetworkRule - from .extended_database_blob_auditing_policy import ExtendedDatabaseBlobAuditingPolicy - from .extended_server_blob_auditing_policy import ExtendedServerBlobAuditingPolicy - from .server_blob_auditing_policy import ServerBlobAuditingPolicy - from .database_blob_auditing_policy import DatabaseBlobAuditingPolicy - from .database_vulnerability_assessment_rule_baseline_item import DatabaseVulnerabilityAssessmentRuleBaselineItem - from .database_vulnerability_assessment_rule_baseline import DatabaseVulnerabilityAssessmentRuleBaseline - from .vulnerability_assessment_recurring_scans_properties import VulnerabilityAssessmentRecurringScansProperties - from .database_vulnerability_assessment import DatabaseVulnerabilityAssessment - from .job_agent import JobAgent - from .job_agent_update import JobAgentUpdate - from .job_credential import JobCredential - from .job_execution_target import JobExecutionTarget - from .job_execution import JobExecution - from .job_schedule import JobSchedule - from .job import Job - from .job_step_action import JobStepAction - from .job_step_output import JobStepOutput - from .job_step_execution_options import JobStepExecutionOptions - from .job_step import JobStep - from .job_target import JobTarget - from .job_target_group import JobTargetGroup - from .job_version import JobVersion - from .long_term_retention_backup import LongTermRetentionBackup - from .backup_long_term_retention_policy import BackupLongTermRetentionPolicy - from .managed_backup_short_term_retention_policy import ManagedBackupShortTermRetentionPolicy - from .complete_database_restore_definition import CompleteDatabaseRestoreDefinition - from .managed_database import ManagedDatabase - from .managed_database_update import ManagedDatabaseUpdate - from .automatic_tuning_server_options import AutomaticTuningServerOptions - from .server_automatic_tuning import ServerAutomaticTuning - from .server_dns_alias import ServerDnsAlias - from .server_dns_alias_acquisition import ServerDnsAliasAcquisition - from .server_security_alert_policy import ServerSecurityAlertPolicy - from .restorable_dropped_managed_database import RestorableDroppedManagedDatabase - from .restore_point import RestorePoint - from .create_database_restore_point_definition import CreateDatabaseRestorePointDefinition - from .managed_database_security_alert_policy import ManagedDatabaseSecurityAlertPolicy - from .managed_server_security_alert_policy import ManagedServerSecurityAlertPolicy - from .sensitivity_label import SensitivityLabel - from .database_operation import DatabaseOperation - from .elastic_pool_operation import ElasticPoolOperation - from .max_size_capability import MaxSizeCapability - from .log_size_capability import LogSizeCapability - from .max_size_range_capability import MaxSizeRangeCapability - from .performance_level_capability import PerformanceLevelCapability - from .license_type_capability import LicenseTypeCapability - from .service_objective_capability import ServiceObjectiveCapability - from .edition_capability import EditionCapability - from .elastic_pool_per_database_min_performance_level_capability import ElasticPoolPerDatabaseMinPerformanceLevelCapability - from .elastic_pool_per_database_max_performance_level_capability import ElasticPoolPerDatabaseMaxPerformanceLevelCapability - from .elastic_pool_performance_level_capability import ElasticPoolPerformanceLevelCapability - from .elastic_pool_edition_capability import ElasticPoolEditionCapability - from .server_version_capability import ServerVersionCapability - from .managed_instance_vcores_capability import ManagedInstanceVcoresCapability - from .managed_instance_family_capability import ManagedInstanceFamilyCapability - from .managed_instance_edition_capability import ManagedInstanceEditionCapability - from .managed_instance_version_capability import ManagedInstanceVersionCapability - from .location_capabilities import LocationCapabilities - from .database import Database - from .database_update import DatabaseUpdate - from .resource_move_definition import ResourceMoveDefinition - from .elastic_pool_per_database_settings import ElasticPoolPerDatabaseSettings - from .elastic_pool import ElasticPool - from .elastic_pool_update import ElasticPoolUpdate - from .vulnerability_assessment_scan_error import VulnerabilityAssessmentScanError - from .vulnerability_assessment_scan_record import VulnerabilityAssessmentScanRecord - from .database_vulnerability_assessment_scans_export import DatabaseVulnerabilityAssessmentScansExport - from .instance_failover_group_read_write_endpoint import InstanceFailoverGroupReadWriteEndpoint - from .instance_failover_group_read_only_endpoint import InstanceFailoverGroupReadOnlyEndpoint - from .partner_region_info import PartnerRegionInfo - from .managed_instance_pair_info import ManagedInstancePairInfo - from .instance_failover_group import InstanceFailoverGroup - from .backup_short_term_retention_policy import BackupShortTermRetentionPolicy - from .tde_certificate import TdeCertificate - from .managed_instance_key import ManagedInstanceKey - from .managed_instance_encryption_protector import ManagedInstanceEncryptionProtector - from .recoverable_managed_database import RecoverableManagedDatabase - from .managed_instance_vulnerability_assessment import ManagedInstanceVulnerabilityAssessment - from .server_vulnerability_assessment import ServerVulnerabilityAssessment -from .recoverable_database_paged import RecoverableDatabasePaged -from .restorable_dropped_database_paged import RestorableDroppedDatabasePaged -from .server_paged import ServerPaged -from .data_masking_rule_paged import DataMaskingRulePaged -from .firewall_rule_paged import FirewallRulePaged -from .geo_backup_policy_paged import GeoBackupPolicyPaged -from .metric_paged import MetricPaged -from .metric_definition_paged import MetricDefinitionPaged -from .database_paged import DatabasePaged -from .elastic_pool_paged import ElasticPoolPaged -from .recommended_elastic_pool_paged import RecommendedElasticPoolPaged -from .recommended_elastic_pool_metric_paged import RecommendedElasticPoolMetricPaged -from .replication_link_paged import ReplicationLinkPaged -from .server_azure_ad_administrator_paged import ServerAzureADAdministratorPaged -from .server_communication_link_paged import ServerCommunicationLinkPaged -from .service_objective_paged import ServiceObjectivePaged -from .elastic_pool_activity_paged import ElasticPoolActivityPaged -from .elastic_pool_database_activity_paged import ElasticPoolDatabaseActivityPaged -from .service_tier_advisor_paged import ServiceTierAdvisorPaged -from .transparent_data_encryption_activity_paged import TransparentDataEncryptionActivityPaged -from .server_usage_paged import ServerUsagePaged -from .database_usage_paged import DatabaseUsagePaged -from .encryption_protector_paged import EncryptionProtectorPaged -from .failover_group_paged import FailoverGroupPaged -from .managed_instance_paged import ManagedInstancePaged -from .operation_paged import OperationPaged -from .server_key_paged import ServerKeyPaged -from .sync_agent_paged import SyncAgentPaged -from .sync_agent_linked_database_paged import SyncAgentLinkedDatabasePaged -from .sync_database_id_properties_paged import SyncDatabaseIdPropertiesPaged -from .sync_full_schema_properties_paged import SyncFullSchemaPropertiesPaged -from .sync_group_log_properties_paged import SyncGroupLogPropertiesPaged -from .sync_group_paged import SyncGroupPaged -from .sync_member_paged import SyncMemberPaged -from .subscription_usage_paged import SubscriptionUsagePaged -from .virtual_cluster_paged import VirtualClusterPaged -from .virtual_network_rule_paged import VirtualNetworkRulePaged -from .database_vulnerability_assessment_paged import DatabaseVulnerabilityAssessmentPaged -from .job_agent_paged import JobAgentPaged -from .job_credential_paged import JobCredentialPaged -from .job_execution_paged import JobExecutionPaged -from .job_paged import JobPaged -from .job_step_paged import JobStepPaged -from .job_target_group_paged import JobTargetGroupPaged -from .job_version_paged import JobVersionPaged -from .long_term_retention_backup_paged import LongTermRetentionBackupPaged -from .managed_backup_short_term_retention_policy_paged import ManagedBackupShortTermRetentionPolicyPaged -from .managed_database_paged import ManagedDatabasePaged -from .server_dns_alias_paged import ServerDnsAliasPaged -from .server_security_alert_policy_paged import ServerSecurityAlertPolicyPaged -from .restorable_dropped_managed_database_paged import RestorableDroppedManagedDatabasePaged -from .restore_point_paged import RestorePointPaged -from .managed_database_security_alert_policy_paged import ManagedDatabaseSecurityAlertPolicyPaged -from .managed_server_security_alert_policy_paged import ManagedServerSecurityAlertPolicyPaged -from .sensitivity_label_paged import SensitivityLabelPaged -from .database_operation_paged import DatabaseOperationPaged -from .elastic_pool_operation_paged import ElasticPoolOperationPaged -from .vulnerability_assessment_scan_record_paged import VulnerabilityAssessmentScanRecordPaged -from .instance_failover_group_paged import InstanceFailoverGroupPaged -from .backup_short_term_retention_policy_paged import BackupShortTermRetentionPolicyPaged -from .managed_instance_key_paged import ManagedInstanceKeyPaged -from .managed_instance_encryption_protector_paged import ManagedInstanceEncryptionProtectorPaged -from .recoverable_managed_database_paged import RecoverableManagedDatabasePaged -from .managed_instance_vulnerability_assessment_paged import ManagedInstanceVulnerabilityAssessmentPaged -from .server_vulnerability_assessment_paged import ServerVulnerabilityAssessmentPaged -from .sql_management_client_enums import ( + from ._models import AutomaticTuningOptions + from ._models import AutomaticTuningServerOptions + from ._models import BackupLongTermRetentionPolicy + from ._models import BackupShortTermRetentionPolicy + from ._models import CheckNameAvailabilityRequest + from ._models import CheckNameAvailabilityResponse + from ._models import CompleteDatabaseRestoreDefinition + from ._models import CreateDatabaseRestorePointDefinition + from ._models import Database + from ._models import DatabaseAutomaticTuning + from ._models import DatabaseBlobAuditingPolicy + from ._models import DatabaseOperation + from ._models import DatabaseSecurityAlertPolicy + from ._models import DatabaseUpdate + from ._models import DatabaseUsage + from ._models import DatabaseVulnerabilityAssessment + from ._models import DatabaseVulnerabilityAssessmentRuleBaseline + from ._models import DatabaseVulnerabilityAssessmentRuleBaselineItem + from ._models import DatabaseVulnerabilityAssessmentScansExport + from ._models import DataMaskingPolicy + from ._models import DataMaskingRule + from ._models import EditionCapability + from ._models import ElasticPool + from ._models import ElasticPoolActivity + from ._models import ElasticPoolDatabaseActivity + from ._models import ElasticPoolEditionCapability + from ._models import ElasticPoolOperation + from ._models import ElasticPoolPerDatabaseMaxPerformanceLevelCapability + from ._models import ElasticPoolPerDatabaseMinPerformanceLevelCapability + from ._models import ElasticPoolPerDatabaseSettings + from ._models import ElasticPoolPerformanceLevelCapability + from ._models import ElasticPoolUpdate + from ._models import EncryptionProtector + from ._models import ExportRequest + from ._models import ExtendedDatabaseBlobAuditingPolicy + from ._models import ExtendedServerBlobAuditingPolicy + from ._models import FailoverGroup + from ._models import FailoverGroupReadOnlyEndpoint + from ._models import FailoverGroupReadWriteEndpoint + from ._models import FailoverGroupUpdate + from ._models import FirewallRule + from ._models import GeoBackupPolicy + from ._models import ImportExportResponse + from ._models import ImportExtensionRequest + from ._models import ImportRequest + from ._models import InstanceFailoverGroup + from ._models import InstanceFailoverGroupReadOnlyEndpoint + from ._models import InstanceFailoverGroupReadWriteEndpoint + from ._models import InstancePool + from ._models import InstancePoolUpdate + from ._models import Job + from ._models import JobAgent + from ._models import JobAgentUpdate + from ._models import JobCredential + from ._models import JobExecution + from ._models import JobExecutionTarget + from ._models import JobSchedule + from ._models import JobStep + from ._models import JobStepAction + from ._models import JobStepExecutionOptions + from ._models import JobStepOutput + from ._models import JobTarget + from ._models import JobTargetGroup + from ._models import JobVersion + from ._models import LicenseTypeCapability + from ._models import LocationCapabilities + from ._models import LogSizeCapability + from ._models import LongTermRetentionBackup + from ._models import ManagedBackupShortTermRetentionPolicy + from ._models import ManagedDatabase + from ._models import ManagedDatabaseSecurityAlertPolicy + from ._models import ManagedDatabaseUpdate + from ._models import ManagedInstance + from ._models import ManagedInstanceEditionCapability + from ._models import ManagedInstanceEncryptionProtector + from ._models import ManagedInstanceFamilyCapability + from ._models import ManagedInstanceKey + from ._models import ManagedInstancePairInfo + from ._models import ManagedInstanceUpdate + from ._models import ManagedInstanceVcoresCapability + from ._models import ManagedInstanceVersionCapability + from ._models import ManagedInstanceVulnerabilityAssessment + from ._models import ManagedServerSecurityAlertPolicy + from ._models import MaxSizeCapability + from ._models import MaxSizeRangeCapability + from ._models import Metric + from ._models import MetricAvailability + from ._models import MetricDefinition + from ._models import MetricName + from ._models import MetricValue + from ._models import Name + from ._models import Operation + from ._models import OperationDisplay + from ._models import OperationImpact + from ._models import PartnerInfo + from ._models import PartnerRegionInfo + from ._models import PerformanceLevelCapability + from ._models import ProxyResource + from ._models import RecommendedElasticPool + from ._models import RecommendedElasticPoolMetric + from ._models import RecommendedIndex + from ._models import RecoverableDatabase + from ._models import RecoverableManagedDatabase + from ._models import ReplicationLink + from ._models import Resource + from ._models import ResourceIdentity + from ._models import ResourceMoveDefinition + from ._models import RestorableDroppedDatabase + from ._models import RestorableDroppedManagedDatabase + from ._models import RestorePoint + from ._models import SensitivityLabel + from ._models import Server + from ._models import ServerAutomaticTuning + from ._models import ServerAzureADAdministrator + from ._models import ServerBlobAuditingPolicy + from ._models import ServerCommunicationLink + from ._models import ServerConnectionPolicy + from ._models import ServerDnsAlias + from ._models import ServerDnsAliasAcquisition + from ._models import ServerKey + from ._models import ServerSecurityAlertPolicy + from ._models import ServerUpdate + from ._models import ServerUsage + from ._models import ServerVersionCapability + from ._models import ServerVulnerabilityAssessment + from ._models import ServiceObjective + from ._models import ServiceObjectiveCapability + from ._models import ServiceTierAdvisor + from ._models import Sku + from ._models import SloUsageMetric + from ._models import SubscriptionUsage + from ._models import SyncAgent + from ._models import SyncAgentKeyProperties + from ._models import SyncAgentLinkedDatabase + from ._models import SyncDatabaseIdProperties + from ._models import SyncFullSchemaProperties + from ._models import SyncFullSchemaTable + from ._models import SyncFullSchemaTableColumn + from ._models import SyncGroup + from ._models import SyncGroupLogProperties + from ._models import SyncGroupSchema + from ._models import SyncGroupSchemaTable + from ._models import SyncGroupSchemaTableColumn + from ._models import SyncMember + from ._models import TdeCertificate + from ._models import TrackedResource + from ._models import TransparentDataEncryption + from ._models import TransparentDataEncryptionActivity + from ._models import Usage + from ._models import VirtualCluster + from ._models import VirtualClusterUpdate + from ._models import VirtualNetworkRule + from ._models import VulnerabilityAssessmentRecurringScansProperties + from ._models import VulnerabilityAssessmentScanError + from ._models import VulnerabilityAssessmentScanRecord +from ._paged_models import BackupShortTermRetentionPolicyPaged +from ._paged_models import DatabaseOperationPaged +from ._paged_models import DatabasePaged +from ._paged_models import DatabaseUsagePaged +from ._paged_models import DatabaseVulnerabilityAssessmentPaged +from ._paged_models import DataMaskingRulePaged +from ._paged_models import ElasticPoolActivityPaged +from ._paged_models import ElasticPoolDatabaseActivityPaged +from ._paged_models import ElasticPoolOperationPaged +from ._paged_models import ElasticPoolPaged +from ._paged_models import EncryptionProtectorPaged +from ._paged_models import FailoverGroupPaged +from ._paged_models import FirewallRulePaged +from ._paged_models import GeoBackupPolicyPaged +from ._paged_models import InstanceFailoverGroupPaged +from ._paged_models import InstancePoolPaged +from ._paged_models import JobAgentPaged +from ._paged_models import JobCredentialPaged +from ._paged_models import JobExecutionPaged +from ._paged_models import JobPaged +from ._paged_models import JobStepPaged +from ._paged_models import JobTargetGroupPaged +from ._paged_models import JobVersionPaged +from ._paged_models import LongTermRetentionBackupPaged +from ._paged_models import ManagedBackupShortTermRetentionPolicyPaged +from ._paged_models import ManagedDatabasePaged +from ._paged_models import ManagedDatabaseSecurityAlertPolicyPaged +from ._paged_models import ManagedInstanceEncryptionProtectorPaged +from ._paged_models import ManagedInstanceKeyPaged +from ._paged_models import ManagedInstancePaged +from ._paged_models import ManagedInstanceVulnerabilityAssessmentPaged +from ._paged_models import ManagedServerSecurityAlertPolicyPaged +from ._paged_models import MetricDefinitionPaged +from ._paged_models import MetricPaged +from ._paged_models import OperationPaged +from ._paged_models import RecommendedElasticPoolMetricPaged +from ._paged_models import RecommendedElasticPoolPaged +from ._paged_models import RecoverableDatabasePaged +from ._paged_models import RecoverableManagedDatabasePaged +from ._paged_models import ReplicationLinkPaged +from ._paged_models import RestorableDroppedDatabasePaged +from ._paged_models import RestorableDroppedManagedDatabasePaged +from ._paged_models import RestorePointPaged +from ._paged_models import SensitivityLabelPaged +from ._paged_models import ServerAzureADAdministratorPaged +from ._paged_models import ServerCommunicationLinkPaged +from ._paged_models import ServerDnsAliasPaged +from ._paged_models import ServerKeyPaged +from ._paged_models import ServerPaged +from ._paged_models import ServerSecurityAlertPolicyPaged +from ._paged_models import ServerUsagePaged +from ._paged_models import ServerVulnerabilityAssessmentPaged +from ._paged_models import ServiceObjectivePaged +from ._paged_models import ServiceTierAdvisorPaged +from ._paged_models import SubscriptionUsagePaged +from ._paged_models import SyncAgentLinkedDatabasePaged +from ._paged_models import SyncAgentPaged +from ._paged_models import SyncDatabaseIdPropertiesPaged +from ._paged_models import SyncFullSchemaPropertiesPaged +from ._paged_models import SyncGroupLogPropertiesPaged +from ._paged_models import SyncGroupPaged +from ._paged_models import SyncMemberPaged +from ._paged_models import TransparentDataEncryptionActivityPaged +from ._paged_models import UsagePaged +from ._paged_models import VirtualClusterPaged +from ._paged_models import VirtualNetworkRulePaged +from ._paged_models import VulnerabilityAssessmentScanRecordPaged +from ._sql_management_client_enums import ( CheckNameAvailabilityReason, ServerConnectionType, SecurityAlertPolicyState, @@ -411,9 +421,8 @@ ReadWriteEndpointFailoverPolicy, ReadOnlyEndpointFailoverPolicy, FailoverGroupReplicationRole, - IdentityType, - ManagedInstanceProxyOverride, OperationOrigin, + IdentityType, SyncAgentState, SyncMemberDbType, SyncGroupLogType, @@ -453,6 +462,10 @@ VulnerabilityAssessmentScanTriggerType, VulnerabilityAssessmentScanState, InstanceFailoverGroupReplicationRole, + InstancePoolLicenseType, + ManagedServerCreateMode, + ManagedInstanceLicenseType, + ManagedInstanceProxyOverride, LongTermRetentionDatabaseState, VulnerabilityAssessmentPolicyBaselineName, SensitivityLabelSource, @@ -460,157 +473,161 @@ ) __all__ = [ - 'RecoverableDatabase', - 'RestorableDroppedDatabase', - 'TrackedResource', - 'Resource', - 'ProxyResource', + 'AutomaticTuningOptions', + 'AutomaticTuningServerOptions', + 'BackupLongTermRetentionPolicy', + 'BackupShortTermRetentionPolicy', 'CheckNameAvailabilityRequest', 'CheckNameAvailabilityResponse', - 'ServerConnectionPolicy', + 'CompleteDatabaseRestoreDefinition', + 'CreateDatabaseRestorePointDefinition', + 'Database', + 'DatabaseAutomaticTuning', + 'DatabaseBlobAuditingPolicy', + 'DatabaseOperation', 'DatabaseSecurityAlertPolicy', + 'DatabaseUpdate', + 'DatabaseUsage', + 'DatabaseVulnerabilityAssessment', + 'DatabaseVulnerabilityAssessmentRuleBaseline', + 'DatabaseVulnerabilityAssessmentRuleBaselineItem', + 'DatabaseVulnerabilityAssessmentScansExport', 'DataMaskingPolicy', 'DataMaskingRule', + 'EditionCapability', + 'ElasticPool', + 'ElasticPoolActivity', + 'ElasticPoolDatabaseActivity', + 'ElasticPoolEditionCapability', + 'ElasticPoolOperation', + 'ElasticPoolPerDatabaseMaxPerformanceLevelCapability', + 'ElasticPoolPerDatabaseMinPerformanceLevelCapability', + 'ElasticPoolPerDatabaseSettings', + 'ElasticPoolPerformanceLevelCapability', + 'ElasticPoolUpdate', + 'EncryptionProtector', + 'ExportRequest', + 'ExtendedDatabaseBlobAuditingPolicy', + 'ExtendedServerBlobAuditingPolicy', + 'FailoverGroup', + 'FailoverGroupReadOnlyEndpoint', + 'FailoverGroupReadWriteEndpoint', + 'FailoverGroupUpdate', 'FirewallRule', 'GeoBackupPolicy', - 'ImportExtensionRequest', 'ImportExportResponse', + 'ImportExtensionRequest', 'ImportRequest', - 'ExportRequest', - 'MetricValue', - 'MetricName', + 'InstanceFailoverGroup', + 'InstanceFailoverGroupReadOnlyEndpoint', + 'InstanceFailoverGroupReadWriteEndpoint', + 'InstancePool', + 'InstancePoolUpdate', + 'Job', + 'JobAgent', + 'JobAgentUpdate', + 'JobCredential', + 'JobExecution', + 'JobExecutionTarget', + 'JobSchedule', + 'JobStep', + 'JobStepAction', + 'JobStepExecutionOptions', + 'JobStepOutput', + 'JobTarget', + 'JobTargetGroup', + 'JobVersion', + 'LicenseTypeCapability', + 'LocationCapabilities', + 'LogSizeCapability', + 'LongTermRetentionBackup', + 'ManagedBackupShortTermRetentionPolicy', + 'ManagedDatabase', + 'ManagedDatabaseSecurityAlertPolicy', + 'ManagedDatabaseUpdate', + 'ManagedInstance', + 'ManagedInstanceEditionCapability', + 'ManagedInstanceEncryptionProtector', + 'ManagedInstanceFamilyCapability', + 'ManagedInstanceKey', + 'ManagedInstancePairInfo', + 'ManagedInstanceUpdate', + 'ManagedInstanceVcoresCapability', + 'ManagedInstanceVersionCapability', + 'ManagedInstanceVulnerabilityAssessment', + 'ManagedServerSecurityAlertPolicy', + 'MaxSizeCapability', + 'MaxSizeRangeCapability', 'Metric', 'MetricAvailability', 'MetricDefinition', - 'RecommendedElasticPoolMetric', + 'MetricName', + 'MetricValue', + 'Name', + 'Operation', + 'OperationDisplay', + 'OperationImpact', + 'PartnerInfo', + 'PartnerRegionInfo', + 'PerformanceLevelCapability', + 'ProxyResource', 'RecommendedElasticPool', + 'RecommendedElasticPoolMetric', + 'RecommendedIndex', + 'RecoverableDatabase', + 'RecoverableManagedDatabase', 'ReplicationLink', + 'Resource', + 'ResourceIdentity', + 'ResourceMoveDefinition', + 'RestorableDroppedDatabase', + 'RestorableDroppedManagedDatabase', + 'RestorePoint', + 'SensitivityLabel', + 'Server', + 'ServerAutomaticTuning', 'ServerAzureADAdministrator', + 'ServerBlobAuditingPolicy', 'ServerCommunicationLink', + 'ServerConnectionPolicy', + 'ServerDnsAlias', + 'ServerDnsAliasAcquisition', + 'ServerKey', + 'ServerSecurityAlertPolicy', + 'ServerUpdate', + 'ServerUsage', + 'ServerVersionCapability', + 'ServerVulnerabilityAssessment', 'ServiceObjective', - 'ElasticPoolActivity', - 'ElasticPoolDatabaseActivity', - 'OperationImpact', - 'RecommendedIndex', - 'TransparentDataEncryption', - 'SloUsageMetric', + 'ServiceObjectiveCapability', 'ServiceTierAdvisor', - 'TransparentDataEncryptionActivity', - 'ServerUsage', - 'DatabaseUsage', - 'AutomaticTuningOptions', - 'DatabaseAutomaticTuning', - 'EncryptionProtector', - 'FailoverGroupReadWriteEndpoint', - 'FailoverGroupReadOnlyEndpoint', - 'PartnerInfo', - 'FailoverGroup', - 'FailoverGroupUpdate', - 'ResourceIdentity', 'Sku', - 'ManagedInstance', - 'ManagedInstanceUpdate', - 'OperationDisplay', - 'Operation', - 'ServerKey', - 'Server', - 'ServerUpdate', + 'SloUsageMetric', + 'SubscriptionUsage', 'SyncAgent', 'SyncAgentKeyProperties', 'SyncAgentLinkedDatabase', 'SyncDatabaseIdProperties', - 'SyncFullSchemaTableColumn', - 'SyncFullSchemaTable', 'SyncFullSchemaProperties', + 'SyncFullSchemaTable', + 'SyncFullSchemaTableColumn', + 'SyncGroup', 'SyncGroupLogProperties', - 'SyncGroupSchemaTableColumn', - 'SyncGroupSchemaTable', 'SyncGroupSchema', - 'SyncGroup', + 'SyncGroupSchemaTable', + 'SyncGroupSchemaTableColumn', 'SyncMember', - 'SubscriptionUsage', + 'TdeCertificate', + 'TrackedResource', + 'TransparentDataEncryption', + 'TransparentDataEncryptionActivity', + 'Usage', 'VirtualCluster', 'VirtualClusterUpdate', 'VirtualNetworkRule', - 'ExtendedDatabaseBlobAuditingPolicy', - 'ExtendedServerBlobAuditingPolicy', - 'ServerBlobAuditingPolicy', - 'DatabaseBlobAuditingPolicy', - 'DatabaseVulnerabilityAssessmentRuleBaselineItem', - 'DatabaseVulnerabilityAssessmentRuleBaseline', 'VulnerabilityAssessmentRecurringScansProperties', - 'DatabaseVulnerabilityAssessment', - 'JobAgent', - 'JobAgentUpdate', - 'JobCredential', - 'JobExecutionTarget', - 'JobExecution', - 'JobSchedule', - 'Job', - 'JobStepAction', - 'JobStepOutput', - 'JobStepExecutionOptions', - 'JobStep', - 'JobTarget', - 'JobTargetGroup', - 'JobVersion', - 'LongTermRetentionBackup', - 'BackupLongTermRetentionPolicy', - 'ManagedBackupShortTermRetentionPolicy', - 'CompleteDatabaseRestoreDefinition', - 'ManagedDatabase', - 'ManagedDatabaseUpdate', - 'AutomaticTuningServerOptions', - 'ServerAutomaticTuning', - 'ServerDnsAlias', - 'ServerDnsAliasAcquisition', - 'ServerSecurityAlertPolicy', - 'RestorableDroppedManagedDatabase', - 'RestorePoint', - 'CreateDatabaseRestorePointDefinition', - 'ManagedDatabaseSecurityAlertPolicy', - 'ManagedServerSecurityAlertPolicy', - 'SensitivityLabel', - 'DatabaseOperation', - 'ElasticPoolOperation', - 'MaxSizeCapability', - 'LogSizeCapability', - 'MaxSizeRangeCapability', - 'PerformanceLevelCapability', - 'LicenseTypeCapability', - 'ServiceObjectiveCapability', - 'EditionCapability', - 'ElasticPoolPerDatabaseMinPerformanceLevelCapability', - 'ElasticPoolPerDatabaseMaxPerformanceLevelCapability', - 'ElasticPoolPerformanceLevelCapability', - 'ElasticPoolEditionCapability', - 'ServerVersionCapability', - 'ManagedInstanceVcoresCapability', - 'ManagedInstanceFamilyCapability', - 'ManagedInstanceEditionCapability', - 'ManagedInstanceVersionCapability', - 'LocationCapabilities', - 'Database', - 'DatabaseUpdate', - 'ResourceMoveDefinition', - 'ElasticPoolPerDatabaseSettings', - 'ElasticPool', - 'ElasticPoolUpdate', 'VulnerabilityAssessmentScanError', 'VulnerabilityAssessmentScanRecord', - 'DatabaseVulnerabilityAssessmentScansExport', - 'InstanceFailoverGroupReadWriteEndpoint', - 'InstanceFailoverGroupReadOnlyEndpoint', - 'PartnerRegionInfo', - 'ManagedInstancePairInfo', - 'InstanceFailoverGroup', - 'BackupShortTermRetentionPolicy', - 'TdeCertificate', - 'ManagedInstanceKey', - 'ManagedInstanceEncryptionProtector', - 'RecoverableManagedDatabase', - 'ManagedInstanceVulnerabilityAssessment', - 'ServerVulnerabilityAssessment', 'RecoverableDatabasePaged', 'RestorableDroppedDatabasePaged', 'ServerPaged', @@ -635,7 +652,6 @@ 'DatabaseUsagePaged', 'EncryptionProtectorPaged', 'FailoverGroupPaged', - 'ManagedInstancePaged', 'OperationPaged', 'ServerKeyPaged', 'SyncAgentPaged', @@ -676,6 +692,9 @@ 'RecoverableManagedDatabasePaged', 'ManagedInstanceVulnerabilityAssessmentPaged', 'ServerVulnerabilityAssessmentPaged', + 'InstancePoolPaged', + 'UsagePaged', + 'ManagedInstancePaged', 'CheckNameAvailabilityReason', 'ServerConnectionType', 'SecurityAlertPolicyState', @@ -708,9 +727,8 @@ 'ReadWriteEndpointFailoverPolicy', 'ReadOnlyEndpointFailoverPolicy', 'FailoverGroupReplicationRole', - 'IdentityType', - 'ManagedInstanceProxyOverride', 'OperationOrigin', + 'IdentityType', 'SyncAgentState', 'SyncMemberDbType', 'SyncGroupLogType', @@ -750,6 +768,10 @@ 'VulnerabilityAssessmentScanTriggerType', 'VulnerabilityAssessmentScanState', 'InstanceFailoverGroupReplicationRole', + 'InstancePoolLicenseType', + 'ManagedServerCreateMode', + 'ManagedInstanceLicenseType', + 'ManagedInstanceProxyOverride', 'LongTermRetentionDatabaseState', 'VulnerabilityAssessmentPolicyBaselineName', 'SensitivityLabelSource', diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py new file mode 100644 index 000000000000..afc88d2be7ad --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py @@ -0,0 +1,8891 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AutomaticTuningOptions(Model): + """Automatic tuning properties for individual advisors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param desired_state: Automatic tuning option desired state. Possible + values include: 'Off', 'On', 'Default' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired + :ivar actual_state: Automatic tuning option actual state. Possible values + include: 'Off', 'On' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual + :ivar reason_code: Reason code if desired and actual state are different. + :vartype reason_code: int + :ivar reason_desc: Reason description if desired and actual state are + different. Possible values include: 'Default', 'Disabled', + 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', + 'QueryStoreReadOnly', 'NotSupported' + :vartype reason_desc: str or + ~azure.mgmt.sql.models.AutomaticTuningDisabledReason + """ + + _validation = { + 'actual_state': {'readonly': True}, + 'reason_code': {'readonly': True}, + 'reason_desc': {'readonly': True}, + } + + _attribute_map = { + 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, + 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, + 'reason_code': {'key': 'reasonCode', 'type': 'int'}, + 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningDisabledReason'}, + } + + def __init__(self, **kwargs): + super(AutomaticTuningOptions, self).__init__(**kwargs) + self.desired_state = kwargs.get('desired_state', None) + self.actual_state = None + self.reason_code = None + self.reason_desc = None + + +class AutomaticTuningServerOptions(Model): + """Automatic tuning properties for individual advisors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param desired_state: Automatic tuning option desired state. Possible + values include: 'Off', 'On', 'Default' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired + :ivar actual_state: Automatic tuning option actual state. Possible values + include: 'Off', 'On' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual + :ivar reason_code: Reason code if desired and actual state are different. + :vartype reason_code: int + :ivar reason_desc: Reason description if desired and actual state are + different. Possible values include: 'Default', 'Disabled', + 'AutoConfigured' + :vartype reason_desc: str or + ~azure.mgmt.sql.models.AutomaticTuningServerReason + """ + + _validation = { + 'actual_state': {'readonly': True}, + 'reason_code': {'readonly': True}, + 'reason_desc': {'readonly': True}, + } + + _attribute_map = { + 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, + 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, + 'reason_code': {'key': 'reasonCode', 'type': 'int'}, + 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningServerReason'}, + } + + def __init__(self, **kwargs): + super(AutomaticTuningServerOptions, self).__init__(**kwargs) + self.desired_state = kwargs.get('desired_state', None) + self.actual_state = None + self.reason_code = None + self.reason_desc = None + + +class Resource(Model): + """ARM resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ProxyResource(Resource): + """ARM proxy resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) + + +class BackupLongTermRetentionPolicy(ProxyResource): + """A long term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param weekly_retention: The weekly retention policy for an LTR backup in + an ISO 8601 format. + :type weekly_retention: str + :param monthly_retention: The monthly retention policy for an LTR backup + in an ISO 8601 format. + :type monthly_retention: str + :param yearly_retention: The yearly retention policy for an LTR backup in + an ISO 8601 format. + :type yearly_retention: str + :param week_of_year: The week of year to take the yearly backup in an ISO + 8601 format. + :type week_of_year: int + """ + + _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'}, + 'weekly_retention': {'key': 'properties.weeklyRetention', 'type': 'str'}, + 'monthly_retention': {'key': 'properties.monthlyRetention', 'type': 'str'}, + 'yearly_retention': {'key': 'properties.yearlyRetention', 'type': 'str'}, + 'week_of_year': {'key': 'properties.weekOfYear', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BackupLongTermRetentionPolicy, self).__init__(**kwargs) + self.weekly_retention = kwargs.get('weekly_retention', None) + self.monthly_retention = kwargs.get('monthly_retention', None) + self.yearly_retention = kwargs.get('yearly_retention', None) + self.week_of_year = kwargs.get('week_of_year', None) + + +class BackupShortTermRetentionPolicy(ProxyResource): + """A short term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param retention_days: The backup retention period in days. This is how + many days Point-in-Time Restore will be supported. + :type retention_days: int + """ + + _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'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) + self.retention_days = kwargs.get('retention_days', None) + + +class CheckNameAvailabilityRequest(Model): + """A request to check whether the specified name for a resource is available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name whose availability is to be checked. + :type name: str + :ivar type: Required. The type of resource that is used as the scope of + the availability check. Default value: "Microsoft.Sql/servers" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.Sql/servers" + + def __init__(self, **kwargs): + super(CheckNameAvailabilityRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class CheckNameAvailabilityResponse(Model): + """A response indicating whether the specified name for a resource is + available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar available: True if the name is available, otherwise false. + :vartype available: bool + :ivar message: A message explaining why the name is unavailable. Will be + null if the name is available. + :vartype message: str + :ivar name: The name whose availability was checked. + :vartype name: str + :ivar reason: The reason code explaining why the name is unavailable. Will + be null if the name is available. Possible values include: 'Invalid', + 'AlreadyExists' + :vartype reason: str or ~azure.mgmt.sql.models.CheckNameAvailabilityReason + """ + + _validation = { + 'available': {'readonly': True}, + 'message': {'readonly': True}, + 'name': {'readonly': True}, + 'reason': {'readonly': True}, + } + + _attribute_map = { + 'available': {'key': 'available', 'type': 'bool'}, + 'message': {'key': 'message', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'CheckNameAvailabilityReason'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailabilityResponse, self).__init__(**kwargs) + self.available = None + self.message = None + self.name = None + self.reason = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class CompleteDatabaseRestoreDefinition(Model): + """Contains the information necessary to perform a complete database restore + operation. + + All required parameters must be populated in order to send to Azure. + + :param last_backup_name: Required. The last backup name to apply + :type last_backup_name: str + """ + + _validation = { + 'last_backup_name': {'required': True}, + } + + _attribute_map = { + 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CompleteDatabaseRestoreDefinition, self).__init__(**kwargs) + self.last_backup_name = kwargs.get('last_backup_name', None) + + +class CreateDatabaseRestorePointDefinition(Model): + """Contains the information necessary to perform a create database restore + point operation. + + All required parameters must be populated in order to send to Azure. + + :param restore_point_label: Required. The restore point label to apply + :type restore_point_label: str + """ + + _validation = { + 'restore_point_label': {'required': True}, + } + + _attribute_map = { + 'restore_point_label': {'key': 'restorePointLabel', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CreateDatabaseRestorePointDefinition, self).__init__(**kwargs) + self.restore_point_label = kwargs.get('restore_point_label', None) + + +class TrackedResource(Resource): + """ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class Database(TrackedResource): + """A database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The database SKU. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location + ```` + :type sku: ~azure.mgmt.sql.models.Sku + :ivar kind: Kind of database. This is metadata used for the Azure portal + experience. + :vartype kind: str + :ivar managed_by: Resource that manages the database. + :vartype managed_by: str + :param create_mode: Specifies the mode of database creation. + Default: regular database creation. + Copy: creates a database as a copy of an existing database. + sourceDatabaseId must be specified as the resource ID of the source + database. + Secondary: creates a database as a secondary replica of an existing + database. sourceDatabaseId must be specified as the resource ID of the + existing primary database. + PointInTimeRestore: Creates a database by restoring a point in time backup + of an existing database. sourceDatabaseId must be specified as the + resource ID of the existing database, and restorePointInTime must be + specified. + Recovery: Creates a database by restoring a geo-replicated backup. + sourceDatabaseId must be specified as the recoverable database resource ID + to restore. + Restore: Creates a database by restoring a backup of a deleted database. + sourceDatabaseId must be specified. If sourceDatabaseId is the database's + original resource ID, then sourceDatabaseDeletionDate must be specified. + Otherwise sourceDatabaseId must be the restorable dropped database + resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime + may also be specified to restore from an earlier point in time. + RestoreLongTermRetentionBackup: Creates a database by restoring from a + long term retention vault. recoveryServicesRecoveryPointResourceId must be + specified as the recovery point resource ID. + Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for + DataWarehouse edition. Possible values include: 'Default', 'Copy', + 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', + 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', + 'RestoreLongTermRetentionBackup', 'OnlineSecondary' + :type create_mode: str or ~azure.mgmt.sql.models.CreateMode + :param collation: The collation of the database. + :type collation: str + :param max_size_bytes: The max size of the database expressed in bytes. + :type max_size_bytes: long + :param sample_name: The name of the sample schema to apply when creating + this database. Possible values include: 'AdventureWorksLT', + 'WideWorldImportersStd', 'WideWorldImportersFull' + :type sample_name: str or ~azure.mgmt.sql.models.SampleName + :param elastic_pool_id: The resource identifier of the elastic pool + containing this database. + :type elastic_pool_id: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :ivar status: The status of the database. Possible values include: + 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', + 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', + 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', + 'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers', + 'OnlineChangingDwPerformanceTiers' + :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus + :ivar database_id: The ID of the database. + :vartype database_id: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar current_service_objective_name: The current service level objective + name of the database. + :vartype current_service_objective_name: str + :ivar requested_service_objective_name: The requested service level + objective name of the database. + :vartype requested_service_objective_name: str + :ivar default_secondary_location: The default secondary region for this + database. + :vartype default_secondary_location: str + :ivar failover_group_id: Failover Group resource identifier that this + database belongs to. + :vartype failover_group_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param source_database_deletion_date: Specifies the time that the database + was deleted. + :type source_database_deletion_date: datetime + :param recovery_services_recovery_point_id: The resource identifier of the + recovery point associated with create operation of this database. + :type recovery_services_recovery_point_id: str + :param long_term_retention_backup_resource_id: The resource identifier of + the long term retention backup associated with create operation of this + database. + :type long_term_retention_backup_resource_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param restorable_dropped_database_id: The resource identifier of the + restorable dropped database associated with create operation of this + database. + :type restorable_dropped_database_id: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param zone_redundant: Whether or not this database is zone redundant, + which means the replicas of this database will be spread across multiple + availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this database. Possible + values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType + :ivar max_log_size_bytes: The max log size for this database. + :vartype max_log_size_bytes: long + :ivar earliest_restore_date: This records the earliest start date and time + that restore is available for this database (ISO8601 format). + :vartype earliest_restore_date: datetime + :param read_scale: The state of read-only routing. If enabled, connections + that have application intent set to readonly in their connection string + may be routed to a readonly secondary replica in the same region. Possible + values include: 'Enabled', 'Disabled' + :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale + :ivar current_sku: The name and tier of the SKU. + :vartype current_sku: ~azure.mgmt.sql.models.Sku + :param auto_pause_delay: Time in minutes after which database is + automatically paused. A value of -1 means that automatic pause is disabled + :type auto_pause_delay: int + :param min_capacity: Minimal capacity that database will always have + allocated, if not paused + :type min_capacity: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'managed_by': {'readonly': True}, + 'status': {'readonly': True}, + 'database_id': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'current_service_objective_name': {'readonly': True}, + 'requested_service_objective_name': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + 'max_log_size_bytes': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'current_sku': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, + 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, + 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, + 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, + 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, + 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, + 'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'}, + 'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(Database, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.kind = None + self.managed_by = None + self.create_mode = kwargs.get('create_mode', None) + self.collation = kwargs.get('collation', None) + self.max_size_bytes = kwargs.get('max_size_bytes', None) + self.sample_name = kwargs.get('sample_name', None) + self.elastic_pool_id = kwargs.get('elastic_pool_id', None) + self.source_database_id = kwargs.get('source_database_id', None) + self.status = None + self.database_id = None + self.creation_date = None + self.current_service_objective_name = None + self.requested_service_objective_name = None + self.default_secondary_location = None + self.failover_group_id = None + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.source_database_deletion_date = kwargs.get('source_database_deletion_date', None) + self.recovery_services_recovery_point_id = kwargs.get('recovery_services_recovery_point_id', None) + self.long_term_retention_backup_resource_id = kwargs.get('long_term_retention_backup_resource_id', None) + self.recoverable_database_id = kwargs.get('recoverable_database_id', None) + self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) + self.catalog_collation = kwargs.get('catalog_collation', None) + self.zone_redundant = kwargs.get('zone_redundant', None) + self.license_type = kwargs.get('license_type', None) + self.max_log_size_bytes = None + self.earliest_restore_date = None + self.read_scale = kwargs.get('read_scale', None) + self.current_sku = None + self.auto_pause_delay = kwargs.get('auto_pause_delay', None) + self.min_capacity = kwargs.get('min_capacity', None) + + +class DatabaseAutomaticTuning(ProxyResource): + """Database-level Automatic Tuning. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param desired_state: Automatic tuning desired state. Possible values + include: 'Inherit', 'Custom', 'Auto', 'Unspecified' + :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode + :ivar actual_state: Automatic tuning actual state. Possible values + include: 'Inherit', 'Custom', 'Auto', 'Unspecified' + :vartype actual_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode + :param options: Automatic tuning options definition. + :type options: dict[str, ~azure.mgmt.sql.models.AutomaticTuningOptions] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'actual_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningMode'}, + 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningMode'}, + 'options': {'key': 'properties.options', 'type': '{AutomaticTuningOptions}'}, + } + + def __init__(self, **kwargs): + super(DatabaseAutomaticTuning, self).__init__(**kwargs) + self.desired_state = kwargs.get('desired_state', None) + self.actual_state = None + self.options = kwargs.get('options', None) + + +class DatabaseBlobAuditingPolicy(ProxyResource): + """A database blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Resource kind. + :vartype kind: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DatabaseBlobAuditingPolicy, self).__init__(**kwargs) + self.kind = None + self.state = kwargs.get('state', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) + self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) + self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) + self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) + + +class DatabaseOperation(ProxyResource): + """A database operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_name: The name of the database the operation is being + performed on. + :vartype database_name: str + :ivar operation: The name of operation. + :vartype operation: str + :ivar operation_friendly_name: The friendly name of operation. + :vartype operation_friendly_name: str + :ivar percent_complete: The percentage of the operation completed. + :vartype percent_complete: int + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar start_time: The operation start time. + :vartype start_time: datetime + :ivar state: The operation state. Possible values include: 'Pending', + 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', 'Cancelled' + :vartype state: str or ~azure.mgmt.sql.models.ManagementOperationState + :ivar error_code: The operation error code. + :vartype error_code: int + :ivar error_description: The operation error description. + :vartype error_description: str + :ivar error_severity: The operation error severity. + :vartype error_severity: int + :ivar is_user_error: Whether or not the error is a user error. + :vartype is_user_error: bool + :ivar estimated_completion_time: The estimated completion time of the + operation. + :vartype estimated_completion_time: datetime + :ivar description: The operation description. + :vartype description: str + :ivar is_cancellable: Whether the operation can be cancelled. + :vartype is_cancellable: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_name': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_friendly_name': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_description': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'is_user_error': {'readonly': True}, + 'estimated_completion_time': {'readonly': True}, + 'description': {'readonly': True}, + 'is_cancellable': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, + 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DatabaseOperation, self).__init__(**kwargs) + self.database_name = None + self.operation = None + self.operation_friendly_name = None + self.percent_complete = None + self.server_name = None + self.start_time = None + self.state = None + self.error_code = None + self.error_description = None + self.error_severity = None + self.is_user_error = None + self.estimated_completion_time = None + self.description = None + self.is_cancellable = None + + +class DatabaseSecurityAlertPolicy(ProxyResource): + """Contains information about a database Threat Detection policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar kind: Resource kind. + :vartype kind: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint and storageAccountAccessKey are required. + Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies the semicolon-separated list of alerts + that are disabled, or empty string to disable no alerts. Possible values: + Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; + Data_Exfiltration; Unsafe_Action. + :type disabled_alerts: str + :param email_addresses: Specifies the semicolon-separated list of e-mail + addresses to which the alert is sent. + :type email_addresses: str + :param email_account_admins: Specifies that the alert is sent to the + account administrators. Possible values include: 'Enabled', 'Disabled' + :type email_account_admins: str or + ~azure.mgmt.sql.models.SecurityAlertPolicyEmailAccountAdmins + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. If state is Enabled, storageEndpoint is + required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. If state is Enabled, + storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :param use_server_default: Specifies whether to use the default server + policy. Possible values include: 'Enabled', 'Disabled' + :type use_server_default: str or + ~azure.mgmt.sql.models.SecurityAlertPolicyUseServerDefault + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': 'str'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': 'str'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'SecurityAlertPolicyEmailAccountAdmins'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'use_server_default': {'key': 'properties.useServerDefault', 'type': 'SecurityAlertPolicyUseServerDefault'}, + } + + def __init__(self, **kwargs): + super(DatabaseSecurityAlertPolicy, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.kind = None + self.state = kwargs.get('state', None) + self.disabled_alerts = kwargs.get('disabled_alerts', None) + self.email_addresses = kwargs.get('email_addresses', None) + self.email_account_admins = kwargs.get('email_account_admins', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.use_server_default = kwargs.get('use_server_default', None) + + +class DatabaseUpdate(Model): + """A database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param create_mode: Specifies the mode of database creation. + Default: regular database creation. + Copy: creates a database as a copy of an existing database. + sourceDatabaseId must be specified as the resource ID of the source + database. + Secondary: creates a database as a secondary replica of an existing + database. sourceDatabaseId must be specified as the resource ID of the + existing primary database. + PointInTimeRestore: Creates a database by restoring a point in time backup + of an existing database. sourceDatabaseId must be specified as the + resource ID of the existing database, and restorePointInTime must be + specified. + Recovery: Creates a database by restoring a geo-replicated backup. + sourceDatabaseId must be specified as the recoverable database resource ID + to restore. + Restore: Creates a database by restoring a backup of a deleted database. + sourceDatabaseId must be specified. If sourceDatabaseId is the database's + original resource ID, then sourceDatabaseDeletionDate must be specified. + Otherwise sourceDatabaseId must be the restorable dropped database + resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime + may also be specified to restore from an earlier point in time. + RestoreLongTermRetentionBackup: Creates a database by restoring from a + long term retention vault. recoveryServicesRecoveryPointResourceId must be + specified as the recovery point resource ID. + Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for + DataWarehouse edition. Possible values include: 'Default', 'Copy', + 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', + 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', + 'RestoreLongTermRetentionBackup', 'OnlineSecondary' + :type create_mode: str or ~azure.mgmt.sql.models.CreateMode + :param collation: The collation of the database. + :type collation: str + :param max_size_bytes: The max size of the database expressed in bytes. + :type max_size_bytes: long + :param sample_name: The name of the sample schema to apply when creating + this database. Possible values include: 'AdventureWorksLT', + 'WideWorldImportersStd', 'WideWorldImportersFull' + :type sample_name: str or ~azure.mgmt.sql.models.SampleName + :param elastic_pool_id: The resource identifier of the elastic pool + containing this database. + :type elastic_pool_id: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :ivar status: The status of the database. Possible values include: + 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', + 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', + 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', + 'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers', + 'OnlineChangingDwPerformanceTiers' + :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus + :ivar database_id: The ID of the database. + :vartype database_id: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar current_service_objective_name: The current service level objective + name of the database. + :vartype current_service_objective_name: str + :ivar requested_service_objective_name: The requested service level + objective name of the database. + :vartype requested_service_objective_name: str + :ivar default_secondary_location: The default secondary region for this + database. + :vartype default_secondary_location: str + :ivar failover_group_id: Failover Group resource identifier that this + database belongs to. + :vartype failover_group_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param source_database_deletion_date: Specifies the time that the database + was deleted. + :type source_database_deletion_date: datetime + :param recovery_services_recovery_point_id: The resource identifier of the + recovery point associated with create operation of this database. + :type recovery_services_recovery_point_id: str + :param long_term_retention_backup_resource_id: The resource identifier of + the long term retention backup associated with create operation of this + database. + :type long_term_retention_backup_resource_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param restorable_dropped_database_id: The resource identifier of the + restorable dropped database associated with create operation of this + database. + :type restorable_dropped_database_id: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param zone_redundant: Whether or not this database is zone redundant, + which means the replicas of this database will be spread across multiple + availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this database. Possible + values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType + :ivar max_log_size_bytes: The max log size for this database. + :vartype max_log_size_bytes: long + :ivar earliest_restore_date: This records the earliest start date and time + that restore is available for this database (ISO8601 format). + :vartype earliest_restore_date: datetime + :param read_scale: The state of read-only routing. If enabled, connections + that have application intent set to readonly in their connection string + may be routed to a readonly secondary replica in the same region. Possible + values include: 'Enabled', 'Disabled' + :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale + :ivar current_sku: The name and tier of the SKU. + :vartype current_sku: ~azure.mgmt.sql.models.Sku + :param auto_pause_delay: Time in minutes after which database is + automatically paused. A value of -1 means that automatic pause is disabled + :type auto_pause_delay: int + :param min_capacity: Minimal capacity that database will always have + allocated, if not paused + :type min_capacity: float + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'status': {'readonly': True}, + 'database_id': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'current_service_objective_name': {'readonly': True}, + 'requested_service_objective_name': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + 'max_log_size_bytes': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'current_sku': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, + 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, + 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, + 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, + 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, + 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, + 'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'}, + 'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(DatabaseUpdate, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.create_mode = kwargs.get('create_mode', None) + self.collation = kwargs.get('collation', None) + self.max_size_bytes = kwargs.get('max_size_bytes', None) + self.sample_name = kwargs.get('sample_name', None) + self.elastic_pool_id = kwargs.get('elastic_pool_id', None) + self.source_database_id = kwargs.get('source_database_id', None) + self.status = None + self.database_id = None + self.creation_date = None + self.current_service_objective_name = None + self.requested_service_objective_name = None + self.default_secondary_location = None + self.failover_group_id = None + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.source_database_deletion_date = kwargs.get('source_database_deletion_date', None) + self.recovery_services_recovery_point_id = kwargs.get('recovery_services_recovery_point_id', None) + self.long_term_retention_backup_resource_id = kwargs.get('long_term_retention_backup_resource_id', None) + self.recoverable_database_id = kwargs.get('recoverable_database_id', None) + self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) + self.catalog_collation = kwargs.get('catalog_collation', None) + self.zone_redundant = kwargs.get('zone_redundant', None) + self.license_type = kwargs.get('license_type', None) + self.max_log_size_bytes = None + self.earliest_restore_date = None + self.read_scale = kwargs.get('read_scale', None) + self.current_sku = None + self.auto_pause_delay = kwargs.get('auto_pause_delay', None) + self.min_capacity = kwargs.get('min_capacity', None) + self.tags = kwargs.get('tags', None) + + +class DatabaseUsage(Model): + """The database usages. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the usage metric. + :vartype name: str + :ivar resource_name: The name of the resource. + :vartype resource_name: str + :ivar display_name: The usage metric display name. + :vartype display_name: str + :ivar current_value: The current value of the usage metric. + :vartype current_value: float + :ivar limit: The current limit of the usage metric. + :vartype limit: float + :ivar unit: The units of the usage metric. + :vartype unit: str + :ivar next_reset_time: The next reset time for the usage metric (ISO8601 + format). + :vartype next_reset_time: datetime + """ + + _validation = { + 'name': {'readonly': True}, + 'resource_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'next_reset_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(DatabaseUsage, self).__init__(**kwargs) + self.name = None + self.resource_name = None + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + self.next_reset_time = None + + +class DatabaseVulnerabilityAssessment(ProxyResource): + """A database vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: A blob storage container path to hold the + scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It + is required if server level vulnerability assessment policy doesn't set + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _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'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, **kwargs): + super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = kwargs.get('storage_container_path', None) + self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.recurring_scans = kwargs.get('recurring_scans', None) + + +class DatabaseVulnerabilityAssessmentRuleBaseline(ProxyResource): + """A database vulnerability assessment rule baseline. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param baseline_results: Required. The rule baseline result + :type baseline_results: + list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'baseline_results': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'baseline_results': {'key': 'properties.baselineResults', 'type': '[DatabaseVulnerabilityAssessmentRuleBaselineItem]'}, + } + + def __init__(self, **kwargs): + super(DatabaseVulnerabilityAssessmentRuleBaseline, self).__init__(**kwargs) + self.baseline_results = kwargs.get('baseline_results', None) + + +class DatabaseVulnerabilityAssessmentRuleBaselineItem(Model): + """Properties for an Azure SQL Database Vulnerability Assessment rule + baseline's result. + + All required parameters must be populated in order to send to Azure. + + :param result: Required. The rule baseline result + :type result: list[str] + """ + + _validation = { + 'result': {'required': True}, + } + + _attribute_map = { + 'result': {'key': 'result', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(DatabaseVulnerabilityAssessmentRuleBaselineItem, self).__init__(**kwargs) + self.result = kwargs.get('result', None) + + +class DatabaseVulnerabilityAssessmentScansExport(ProxyResource): + """A database Vulnerability Assessment scan export resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar exported_report_location: Location of the exported report (e.g. + https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). + :vartype exported_report_location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'exported_report_location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs) + self.exported_report_location = None + + +class DataMaskingPolicy(ProxyResource): + """Represents a database data masking policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param data_masking_state: Required. The state of the data masking policy. + Possible values include: 'Disabled', 'Enabled' + :type data_masking_state: str or ~azure.mgmt.sql.models.DataMaskingState + :param exempt_principals: The list of the exempt principals. Specifies the + semicolon-separated list of database users for which the data masking + policy does not apply. The specified users receive data results without + masking for all of the database queries. + :type exempt_principals: str + :ivar application_principals: The list of the application principals. This + is a legacy parameter and is no longer used. + :vartype application_principals: str + :ivar masking_level: The masking level. This is a legacy parameter and is + no longer used. + :vartype masking_level: str + :ivar location: The location of the data masking policy. + :vartype location: str + :ivar kind: The kind of data masking policy. Metadata, used for Azure + portal. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_masking_state': {'required': True}, + 'application_principals': {'readonly': True}, + 'masking_level': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_masking_state': {'key': 'properties.dataMaskingState', 'type': 'DataMaskingState'}, + 'exempt_principals': {'key': 'properties.exemptPrincipals', 'type': 'str'}, + 'application_principals': {'key': 'properties.applicationPrincipals', 'type': 'str'}, + 'masking_level': {'key': 'properties.maskingLevel', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataMaskingPolicy, self).__init__(**kwargs) + self.data_masking_state = kwargs.get('data_masking_state', None) + self.exempt_principals = kwargs.get('exempt_principals', None) + self.application_principals = None + self.masking_level = None + self.location = None + self.kind = None + + +class DataMaskingRule(ProxyResource): + """Represents a database data masking rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar data_masking_rule_id: The rule Id. + :vartype data_masking_rule_id: str + :param alias_name: The alias name. This is a legacy parameter and is no + longer used. + :type alias_name: str + :param rule_state: The rule state. Used to delete a rule. To delete an + existing rule, specify the schemaName, tableName, columnName, + maskingFunction, and specify ruleState as disabled. However, if the rule + doesn't already exist, the rule will be created with ruleState set to + enabled, regardless of the provided value of ruleState. Possible values + include: 'Disabled', 'Enabled' + :type rule_state: str or ~azure.mgmt.sql.models.DataMaskingRuleState + :param schema_name: Required. The schema name on which the data masking + rule is applied. + :type schema_name: str + :param table_name: Required. The table name on which the data masking rule + is applied. + :type table_name: str + :param column_name: Required. The column name on which the data masking + rule is applied. + :type column_name: str + :param masking_function: Required. The masking function that is used for + the data masking rule. Possible values include: 'Default', 'CCN', 'Email', + 'Number', 'SSN', 'Text' + :type masking_function: str or ~azure.mgmt.sql.models.DataMaskingFunction + :param number_from: The numberFrom property of the masking rule. Required + if maskingFunction is set to Number, otherwise this parameter will be + ignored. + :type number_from: str + :param number_to: The numberTo property of the data masking rule. Required + if maskingFunction is set to Number, otherwise this parameter will be + ignored. + :type number_to: str + :param prefix_size: If maskingFunction is set to Text, the number of + characters to show unmasked in the beginning of the string. Otherwise, + this parameter will be ignored. + :type prefix_size: str + :param suffix_size: If maskingFunction is set to Text, the number of + characters to show unmasked at the end of the string. Otherwise, this + parameter will be ignored. + :type suffix_size: str + :param replacement_string: If maskingFunction is set to Text, the + character to use for masking the unexposed part of the string. Otherwise, + this parameter will be ignored. + :type replacement_string: str + :ivar location: The location of the data masking rule. + :vartype location: str + :ivar kind: The kind of Data Masking Rule. Metadata, used for Azure + portal. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_masking_rule_id': {'readonly': True}, + 'schema_name': {'required': True}, + 'table_name': {'required': True}, + 'column_name': {'required': True}, + 'masking_function': {'required': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_masking_rule_id': {'key': 'properties.id', 'type': 'str'}, + 'alias_name': {'key': 'properties.aliasName', 'type': 'str'}, + 'rule_state': {'key': 'properties.ruleState', 'type': 'DataMaskingRuleState'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, + 'table_name': {'key': 'properties.tableName', 'type': 'str'}, + 'column_name': {'key': 'properties.columnName', 'type': 'str'}, + 'masking_function': {'key': 'properties.maskingFunction', 'type': 'DataMaskingFunction'}, + 'number_from': {'key': 'properties.numberFrom', 'type': 'str'}, + 'number_to': {'key': 'properties.numberTo', 'type': 'str'}, + 'prefix_size': {'key': 'properties.prefixSize', 'type': 'str'}, + 'suffix_size': {'key': 'properties.suffixSize', 'type': 'str'}, + 'replacement_string': {'key': 'properties.replacementString', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataMaskingRule, self).__init__(**kwargs) + self.data_masking_rule_id = None + self.alias_name = kwargs.get('alias_name', None) + self.rule_state = kwargs.get('rule_state', None) + self.schema_name = kwargs.get('schema_name', None) + self.table_name = kwargs.get('table_name', None) + self.column_name = kwargs.get('column_name', None) + self.masking_function = kwargs.get('masking_function', None) + self.number_from = kwargs.get('number_from', None) + self.number_to = kwargs.get('number_to', None) + self.prefix_size = kwargs.get('prefix_size', None) + self.suffix_size = kwargs.get('suffix_size', None) + self.replacement_string = kwargs.get('replacement_string', None) + self.location = None + self.kind = None + + +class EditionCapability(Model): + """The edition capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The database edition name. + :vartype name: str + :ivar supported_service_level_objectives: The list of supported service + objectives for the edition. + :vartype supported_service_level_objectives: + list[~azure.mgmt.sql.models.ServiceObjectiveCapability] + :ivar zone_redundant: Whether or not zone redundancy is supported for the + edition. + :vartype zone_redundant: bool + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_service_level_objectives': {'readonly': True}, + 'zone_redundant': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_service_level_objectives': {'key': 'supportedServiceLevelObjectives', 'type': '[ServiceObjectiveCapability]'}, + 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_service_level_objectives = None + self.zone_redundant = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ElasticPool(TrackedResource): + """An elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The elastic pool SKU. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or the following command: + ```azurecli + az sql elastic-pool list-editions -l -o table + ```` + :type sku: ~azure.mgmt.sql.models.Sku + :ivar kind: Kind of elastic pool. This is metadata used for the Azure + portal experience. + :vartype kind: str + :ivar state: The state of the elastic pool. Possible values include: + 'Creating', 'Ready', 'Disabled' + :vartype state: str or ~azure.mgmt.sql.models.ElasticPoolState + :ivar creation_date: The creation date of the elastic pool (ISO8601 + format). + :vartype creation_date: datetime + :param max_size_bytes: The storage limit for the database elastic pool in + bytes. + :type max_size_bytes: long + :param per_database_settings: The per database settings for the elastic + pool. + :type per_database_settings: + ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings + :param zone_redundant: Whether or not this elastic pool is zone redundant, + which means the replicas of this elastic pool will be spread across + multiple availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this elastic pool. + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'state': {'readonly': True}, + 'creation_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPool, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.kind = None + self.state = None + self.creation_date = None + self.max_size_bytes = kwargs.get('max_size_bytes', None) + self.per_database_settings = kwargs.get('per_database_settings', None) + self.zone_redundant = kwargs.get('zone_redundant', None) + self.license_type = kwargs.get('license_type', None) + + +class ElasticPoolActivity(ProxyResource): + """Represents the activity on an elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar end_time: The time the operation finished (ISO8601 format). + :vartype end_time: datetime + :ivar error_code: The error code if available. + :vartype error_code: int + :ivar error_message: The error message if available. + :vartype error_message: str + :ivar error_severity: The error severity if available. + :vartype error_severity: int + :ivar operation: The operation name. + :vartype operation: str + :ivar operation_id: The unique operation ID. + :vartype operation_id: str + :ivar percent_complete: The percentage complete if available. + :vartype percent_complete: int + :ivar requested_database_dtu_max: The requested max DTU per database if + available. + :vartype requested_database_dtu_max: int + :ivar requested_database_dtu_min: The requested min DTU per database if + available. + :vartype requested_database_dtu_min: int + :ivar requested_dtu: The requested DTU for the pool if available. + :vartype requested_dtu: int + :ivar requested_elastic_pool_name: The requested name for the elastic pool + if available. + :vartype requested_elastic_pool_name: str + :ivar requested_storage_limit_in_gb: The requested storage limit for the + pool in GB if available. + :vartype requested_storage_limit_in_gb: long + :ivar elastic_pool_name: The name of the elastic pool. + :vartype elastic_pool_name: str + :ivar server_name: The name of the server the elastic pool is in. + :vartype server_name: str + :ivar start_time: The time the operation started (ISO8601 format). + :vartype start_time: datetime + :ivar state: The current state of the operation. + :vartype state: str + :ivar requested_storage_limit_in_mb: The requested storage limit in MB. + :vartype requested_storage_limit_in_mb: int + :ivar requested_database_dtu_guarantee: The requested per database DTU + guarantee. + :vartype requested_database_dtu_guarantee: int + :ivar requested_database_dtu_cap: The requested per database DTU cap. + :vartype requested_database_dtu_cap: int + :ivar requested_dtu_guarantee: The requested DTU guarantee. + :vartype requested_dtu_guarantee: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_message': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_id': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'requested_database_dtu_max': {'readonly': True}, + 'requested_database_dtu_min': {'readonly': True}, + 'requested_dtu': {'readonly': True}, + 'requested_elastic_pool_name': {'readonly': True}, + 'requested_storage_limit_in_gb': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'requested_storage_limit_in_mb': {'readonly': True}, + 'requested_database_dtu_guarantee': {'readonly': True}, + 'requested_database_dtu_cap': {'readonly': True}, + 'requested_dtu_guarantee': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'requested_database_dtu_max': {'key': 'properties.requestedDatabaseDtuMax', 'type': 'int'}, + 'requested_database_dtu_min': {'key': 'properties.requestedDatabaseDtuMin', 'type': 'int'}, + 'requested_dtu': {'key': 'properties.requestedDtu', 'type': 'int'}, + 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, + 'requested_storage_limit_in_gb': {'key': 'properties.requestedStorageLimitInGB', 'type': 'long'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'requested_storage_limit_in_mb': {'key': 'properties.requestedStorageLimitInMB', 'type': 'int'}, + 'requested_database_dtu_guarantee': {'key': 'properties.requestedDatabaseDtuGuarantee', 'type': 'int'}, + 'requested_database_dtu_cap': {'key': 'properties.requestedDatabaseDtuCap', 'type': 'int'}, + 'requested_dtu_guarantee': {'key': 'properties.requestedDtuGuarantee', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolActivity, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.end_time = None + self.error_code = None + self.error_message = None + self.error_severity = None + self.operation = None + self.operation_id = None + self.percent_complete = None + self.requested_database_dtu_max = None + self.requested_database_dtu_min = None + self.requested_dtu = None + self.requested_elastic_pool_name = None + self.requested_storage_limit_in_gb = None + self.elastic_pool_name = None + self.server_name = None + self.start_time = None + self.state = None + self.requested_storage_limit_in_mb = None + self.requested_database_dtu_guarantee = None + self.requested_database_dtu_cap = None + self.requested_dtu_guarantee = None + + +class ElasticPoolDatabaseActivity(ProxyResource): + """Represents the activity on an elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar database_name: The database name. + :vartype database_name: str + :ivar end_time: The time the operation finished (ISO8601 format). + :vartype end_time: datetime + :ivar error_code: The error code if available. + :vartype error_code: int + :ivar error_message: The error message if available. + :vartype error_message: str + :ivar error_severity: The error severity if available. + :vartype error_severity: int + :ivar operation: The operation name. + :vartype operation: str + :ivar operation_id: The unique operation ID. + :vartype operation_id: str + :ivar percent_complete: The percentage complete if available. + :vartype percent_complete: int + :ivar requested_elastic_pool_name: The name for the elastic pool the + database is moving into if available. + :vartype requested_elastic_pool_name: str + :ivar current_elastic_pool_name: The name of the current elastic pool the + database is in if available. + :vartype current_elastic_pool_name: str + :ivar current_service_objective: The name of the current service objective + if available. + :vartype current_service_objective: str + :ivar requested_service_objective: The name of the requested service + objective if available. + :vartype requested_service_objective: str + :ivar server_name: The name of the server the elastic pool is in. + :vartype server_name: str + :ivar start_time: The time the operation started (ISO8601 format). + :vartype start_time: datetime + :ivar state: The current state of the operation. + :vartype state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_name': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_message': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_id': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'requested_elastic_pool_name': {'readonly': True}, + 'current_elastic_pool_name': {'readonly': True}, + 'current_service_objective': {'readonly': True}, + 'requested_service_objective': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, + 'current_elastic_pool_name': {'key': 'properties.currentElasticPoolName', 'type': 'str'}, + 'current_service_objective': {'key': 'properties.currentServiceObjective', 'type': 'str'}, + 'requested_service_objective': {'key': 'properties.requestedServiceObjective', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolDatabaseActivity, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.database_name = None + self.end_time = None + self.error_code = None + self.error_message = None + self.error_severity = None + self.operation = None + self.operation_id = None + self.percent_complete = None + self.requested_elastic_pool_name = None + self.current_elastic_pool_name = None + self.current_service_objective = None + self.requested_service_objective = None + self.server_name = None + self.start_time = None + self.state = None + + +class ElasticPoolEditionCapability(Model): + """The elastic pool edition capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The elastic pool edition name. + :vartype name: str + :ivar supported_elastic_pool_performance_levels: The list of supported + elastic pool DTU levels for the edition. + :vartype supported_elastic_pool_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerformanceLevelCapability] + :ivar zone_redundant: Whether or not zone redundancy is supported for the + edition. + :vartype zone_redundant: bool + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_elastic_pool_performance_levels': {'readonly': True}, + 'zone_redundant': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_elastic_pool_performance_levels': {'key': 'supportedElasticPoolPerformanceLevels', 'type': '[ElasticPoolPerformanceLevelCapability]'}, + 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolEditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_elastic_pool_performance_levels = None + self.zone_redundant = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ElasticPoolOperation(ProxyResource): + """A elastic pool operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar elastic_pool_name: The name of the elastic pool the operation is + being performed on. + :vartype elastic_pool_name: str + :ivar operation: The name of operation. + :vartype operation: str + :ivar operation_friendly_name: The friendly name of operation. + :vartype operation_friendly_name: str + :ivar percent_complete: The percentage of the operation completed. + :vartype percent_complete: int + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar start_time: The operation start time. + :vartype start_time: datetime + :ivar state: The operation state. + :vartype state: str + :ivar error_code: The operation error code. + :vartype error_code: int + :ivar error_description: The operation error description. + :vartype error_description: str + :ivar error_severity: The operation error severity. + :vartype error_severity: int + :ivar is_user_error: Whether or not the error is a user error. + :vartype is_user_error: bool + :ivar estimated_completion_time: The estimated completion time of the + operation. + :vartype estimated_completion_time: datetime + :ivar description: The operation description. + :vartype description: str + :ivar is_cancellable: Whether the operation can be cancelled. + :vartype is_cancellable: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_friendly_name': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_description': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'is_user_error': {'readonly': True}, + 'estimated_completion_time': {'readonly': True}, + 'description': {'readonly': True}, + 'is_cancellable': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, + 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolOperation, self).__init__(**kwargs) + self.elastic_pool_name = None + self.operation = None + self.operation_friendly_name = None + self.percent_complete = None + self.server_name = None + self.start_time = None + self.state = None + self.error_code = None + self.error_description = None + self.error_severity = None + self.is_user_error = None + self.estimated_completion_time = None + self.description = None + self.is_cancellable = None + + +class ElasticPoolPerDatabaseMaxPerformanceLevelCapability(Model): + """The max per-database performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The maximum performance level per database. + :vartype limit: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + :ivar supported_per_database_min_performance_levels: The list of supported + min database performance levels. + :vartype supported_per_database_min_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMinPerformanceLevelCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'supported_per_database_min_performance_levels': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'supported_per_database_min_performance_levels': {'key': 'supportedPerDatabaseMinPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMinPerformanceLevelCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolPerDatabaseMaxPerformanceLevelCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + self.supported_per_database_min_performance_levels = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ElasticPoolPerDatabaseMinPerformanceLevelCapability(Model): + """The minimum per-database performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The minimum performance level per database. + :vartype limit: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolPerDatabaseMinPerformanceLevelCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ElasticPoolPerDatabaseSettings(Model): + """Per database settings of an elastic pool. + + :param min_capacity: The minimum capacity all databases are guaranteed. + :type min_capacity: float + :param max_capacity: The maximum capacity any one database can consume. + :type max_capacity: float + """ + + _attribute_map = { + 'min_capacity': {'key': 'minCapacity', 'type': 'float'}, + 'max_capacity': {'key': 'maxCapacity', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolPerDatabaseSettings, self).__init__(**kwargs) + self.min_capacity = kwargs.get('min_capacity', None) + self.max_capacity = kwargs.get('max_capacity', None) + + +class ElasticPoolPerformanceLevelCapability(Model): + """The Elastic Pool performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar performance_level: The performance level for the pool. + :vartype performance_level: + ~azure.mgmt.sql.models.PerformanceLevelCapability + :ivar sku: The sku. + :vartype sku: ~azure.mgmt.sql.models.Sku + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar max_database_count: The maximum number of databases supported. + :vartype max_database_count: int + :ivar included_max_size: The included (free) max size for this performance + level. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar supported_max_sizes: The list of supported max sizes. + :vartype supported_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar supported_per_database_max_sizes: The list of supported per database + max sizes. + :vartype supported_per_database_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar supported_per_database_max_performance_levels: The list of supported + per database max performance levels. + :vartype supported_per_database_max_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMaxPerformanceLevelCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'performance_level': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'max_database_count': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'supported_max_sizes': {'readonly': True}, + 'supported_per_database_max_sizes': {'readonly': True}, + 'supported_per_database_max_performance_levels': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'max_database_count': {'key': 'maxDatabaseCount', 'type': 'int'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'supported_per_database_max_sizes': {'key': 'supportedPerDatabaseMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'supported_per_database_max_performance_levels': {'key': 'supportedPerDatabaseMaxPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMaxPerformanceLevelCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolPerformanceLevelCapability, self).__init__(**kwargs) + self.performance_level = None + self.sku = None + self.supported_license_types = None + self.max_database_count = None + self.included_max_size = None + self.supported_max_sizes = None + self.supported_per_database_max_sizes = None + self.supported_per_database_max_performance_levels = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ElasticPoolUpdate(Model): + """An elastic pool update. + + :param sku: + :type sku: ~azure.mgmt.sql.models.Sku + :param max_size_bytes: The storage limit for the database elastic pool in + bytes. + :type max_size_bytes: long + :param per_database_settings: The per database settings for the elastic + pool. + :type per_database_settings: + ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings + :param zone_redundant: Whether or not this elastic pool is zone redundant, + which means the replicas of this elastic pool will be spread across + multiple availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this elastic pool. + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolUpdate, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.max_size_bytes = kwargs.get('max_size_bytes', None) + self.per_database_settings = kwargs.get('per_database_settings', None) + self.zone_redundant = kwargs.get('zone_redundant', None) + self.license_type = kwargs.get('license_type', None) + self.tags = kwargs.get('tags', None) + + +class EncryptionProtector(ProxyResource): + """The server encryption protector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :type kind: str + :ivar location: Resource location. + :vartype location: str + :ivar subregion: Subregion of the encryption protector. + :vartype subregion: str + :param server_key_name: The name of the server key. + :type server_key_name: str + :param server_key_type: Required. The encryption protector type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :ivar uri: The URI of the server key. + :vartype uri: str + :ivar thumbprint: Thumbprint of the server key. + :vartype thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'subregion': {'readonly': True}, + 'server_key_type': {'required': True}, + 'uri': {'readonly': True}, + 'thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'subregion': {'key': 'properties.subregion', 'type': 'str'}, + 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EncryptionProtector, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + self.location = None + self.subregion = None + self.server_key_name = kwargs.get('server_key_name', None) + self.server_key_type = kwargs.get('server_key_type', None) + self.uri = None + self.thumbprint = None + + +class ExportRequest(Model): + """Export database parameters. + + All required parameters must be populated in order to send to Azure. + + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + } + + _attribute_map = { + 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, + } + + def __init__(self, **kwargs): + super(ExportRequest, self).__init__(**kwargs) + self.storage_key_type = kwargs.get('storage_key_type', None) + self.storage_key = kwargs.get('storage_key', None) + self.storage_uri = kwargs.get('storage_uri', None) + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.authentication_type = kwargs.get('authentication_type', "SQL") + + +class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): + """An extended database blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param predicate_expression: Specifies condition of where clause when + creating an audit. + :type predicate_expression: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ExtendedDatabaseBlobAuditingPolicy, self).__init__(**kwargs) + self.predicate_expression = kwargs.get('predicate_expression', None) + self.state = kwargs.get('state', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) + self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) + self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) + self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) + + +class ExtendedServerBlobAuditingPolicy(ProxyResource): + """An extended server blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param predicate_expression: Specifies condition of where clause when + creating an audit. + :type predicate_expression: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ExtendedServerBlobAuditingPolicy, self).__init__(**kwargs) + self.predicate_expression = kwargs.get('predicate_expression', None) + self.state = kwargs.get('state', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) + self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) + self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) + self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) + + +class FailoverGroup(ProxyResource): + """A failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param read_write_endpoint: Required. Read-write endpoint of the failover + group instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint + :ivar replication_role: Local replication role of the failover group + instance. Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.FailoverGroupReplicationRole + :ivar replication_state: Replication state of the failover group instance. + :vartype replication_state: str + :param partner_servers: Required. List of partner server information for + the failover group. + :type partner_servers: list[~azure.mgmt.sql.models.PartnerInfo] + :param databases: List of databases in the failover group. + :type databases: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'read_write_endpoint': {'required': True}, + 'replication_role': {'readonly': True}, + 'replication_state': {'readonly': True}, + 'partner_servers': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, + 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + 'partner_servers': {'key': 'properties.partnerServers', 'type': '[PartnerInfo]'}, + 'databases': {'key': 'properties.databases', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(FailoverGroup, self).__init__(**kwargs) + self.location = None + self.tags = kwargs.get('tags', None) + self.read_write_endpoint = kwargs.get('read_write_endpoint', None) + self.read_only_endpoint = kwargs.get('read_only_endpoint', None) + self.replication_role = None + self.replication_state = None + self.partner_servers = kwargs.get('partner_servers', None) + self.databases = kwargs.get('databases', None) + + +class FailoverGroupReadOnlyEndpoint(Model): + """Read-only endpoint of the failover group instance. + + :param failover_policy: Failover policy of the read-only endpoint for the + failover group. Possible values include: 'Disabled', 'Enabled' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy + """ + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) + self.failover_policy = kwargs.get('failover_policy', None) + + +class FailoverGroupReadWriteEndpoint(Model): + """Read-write endpoint of the failover group instance. + + All required parameters must be populated in order to send to Azure. + + :param failover_policy: Required. Failover policy of the read-write + endpoint for the failover group. If failoverPolicy is Automatic then + failoverWithDataLossGracePeriodMinutes is required. Possible values + include: 'Manual', 'Automatic' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy + :param failover_with_data_loss_grace_period_minutes: Grace period before + failover with data loss is attempted for the read-write endpoint. If + failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is + required. + :type failover_with_data_loss_grace_period_minutes: int + """ + + _validation = { + 'failover_policy': {'required': True}, + } + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(FailoverGroupReadWriteEndpoint, self).__init__(**kwargs) + self.failover_policy = kwargs.get('failover_policy', None) + self.failover_with_data_loss_grace_period_minutes = kwargs.get('failover_with_data_loss_grace_period_minutes', None) + + +class FailoverGroupUpdate(Model): + """A failover group update request. + + :param read_write_endpoint: Read-write endpoint of the failover group + instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint + :param databases: List of databases in the failover group. + :type databases: list[str] + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, + 'databases': {'key': 'properties.databases', 'type': '[str]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(FailoverGroupUpdate, self).__init__(**kwargs) + self.read_write_endpoint = kwargs.get('read_write_endpoint', None) + self.read_only_endpoint = kwargs.get('read_only_endpoint', None) + self.databases = kwargs.get('databases', None) + self.tags = kwargs.get('tags', None) + + +class FirewallRule(ProxyResource): + """Represents a server firewall rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of server that contains this firewall rule. + :vartype kind: str + :ivar location: Location of the server that contains this firewall rule. + :vartype location: str + :param start_ip_address: Required. The start IP address of the firewall + rule. Must be IPv4 format. Use value '0.0.0.0' to represent all + Azure-internal IP addresses. + :type start_ip_address: str + :param end_ip_address: Required. The end IP address of the firewall rule. + Must be IPv4 format. Must be greater than or equal to startIpAddress. Use + value '0.0.0.0' to represent all Azure-internal IP addresses. + :type end_ip_address: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + 'start_ip_address': {'required': True}, + 'end_ip_address': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FirewallRule, self).__init__(**kwargs) + self.kind = None + self.location = None + self.start_ip_address = kwargs.get('start_ip_address', None) + self.end_ip_address = kwargs.get('end_ip_address', None) + + +class GeoBackupPolicy(ProxyResource): + """A database geo backup policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. The state of the geo backup policy. Possible + values include: 'Disabled', 'Enabled' + :type state: str or ~azure.mgmt.sql.models.GeoBackupPolicyState + :ivar storage_type: The storage type of the geo backup policy. + :vartype storage_type: str + :ivar kind: Kind of geo backup policy. This is metadata used for the + Azure portal experience. + :vartype kind: str + :ivar location: Backup policy location. + :vartype location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'storage_type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'GeoBackupPolicyState'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GeoBackupPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.storage_type = None + self.kind = None + self.location = None + + +class ImportExportResponse(ProxyResource): + """Response for Import/Export Get operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar request_type: The request type of the operation. + :vartype request_type: str + :ivar request_id: The request type of the operation. + :vartype request_id: str + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar database_name: The name of the database. + :vartype database_name: str + :ivar status: The status message returned from the server. + :vartype status: str + :ivar last_modified_time: The operation status last modified time. + :vartype last_modified_time: str + :ivar queued_time: The operation queued time. + :vartype queued_time: str + :ivar blob_uri: The blob uri. + :vartype blob_uri: str + :ivar error_message: The error message returned from the server. + :vartype error_message: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'request_type': {'readonly': True}, + 'request_id': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'status': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'queued_time': {'readonly': True}, + 'blob_uri': {'readonly': True}, + 'error_message': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'request_type': {'key': 'properties.requestType', 'type': 'str'}, + 'request_id': {'key': 'properties.requestId', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'str'}, + 'queued_time': {'key': 'properties.queuedTime', 'type': 'str'}, + 'blob_uri': {'key': 'properties.blobUri', 'type': 'str'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImportExportResponse, self).__init__(**kwargs) + self.request_type = None + self.request_id = None + self.server_name = None + self.database_name = None + self.status = None + self.last_modified_time = None + self.queued_time = None + self.blob_uri = None + self.error_message = None + + +class ImportExtensionRequest(Model): + """Import database parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: The name of the extension. + :type name: str + :param type: The type of the extension. + :type type: str + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + :ivar operation_mode: Required. The type of import operation being + performed. This is always Import. Default value: "Import" . + :vartype operation_mode: str + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + 'operation_mode': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_key_type': {'key': 'properties.storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'properties.storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'properties.storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'properties.authenticationType', 'type': 'AuthenticationType'}, + 'operation_mode': {'key': 'properties.operationMode', 'type': 'str'}, + } + + operation_mode = "Import" + + def __init__(self, **kwargs): + super(ImportExtensionRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.storage_key_type = kwargs.get('storage_key_type', None) + self.storage_key = kwargs.get('storage_key', None) + self.storage_uri = kwargs.get('storage_uri', None) + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.authentication_type = kwargs.get('authentication_type', "SQL") + + +class ImportRequest(ExportRequest): + """Import database parameters. + + All required parameters must be populated in order to send to Azure. + + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + :param database_name: Required. The name of the database to import. + :type database_name: str + :param edition: Required. The edition for the database being created. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location + ```` + . Possible values include: 'Web', 'Business', 'Basic', 'Standard', + 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', + 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale' + :type edition: str or ~azure.mgmt.sql.models.DatabaseEdition + :param service_objective_name: Required. The name of the service objective + to assign to the database. Possible values include: 'System', 'System0', + 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', + 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', + 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', + 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', + 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', + 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', + 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', + 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' + :type service_objective_name: str or + ~azure.mgmt.sql.models.ServiceObjectiveName + :param max_size_bytes: Required. The maximum size for the newly imported + database. + :type max_size_bytes: str + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + 'database_name': {'required': True}, + 'edition': {'required': True}, + 'service_objective_name': {'required': True}, + 'max_size_bytes': {'required': True}, + } + + _attribute_map = { + 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'edition': {'key': 'edition', 'type': 'str'}, + 'service_objective_name': {'key': 'serviceObjectiveName', 'type': 'str'}, + 'max_size_bytes': {'key': 'maxSizeBytes', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImportRequest, self).__init__(**kwargs) + self.database_name = kwargs.get('database_name', None) + self.edition = kwargs.get('edition', None) + self.service_objective_name = kwargs.get('service_objective_name', None) + self.max_size_bytes = kwargs.get('max_size_bytes', None) + + +class InstanceFailoverGroup(ProxyResource): + """An instance failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param read_write_endpoint: Required. Read-write endpoint of the failover + group instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.InstanceFailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.InstanceFailoverGroupReadOnlyEndpoint + :ivar replication_role: Local replication role of the failover group + instance. Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole + :ivar replication_state: Replication state of the failover group instance. + :vartype replication_state: str + :param partner_regions: Required. Partner region information for the + failover group. + :type partner_regions: list[~azure.mgmt.sql.models.PartnerRegionInfo] + :param managed_instance_pairs: Required. List of managed instance pairs in + the failover group. + :type managed_instance_pairs: + list[~azure.mgmt.sql.models.ManagedInstancePairInfo] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'read_write_endpoint': {'required': True}, + 'replication_role': {'readonly': True}, + 'replication_state': {'readonly': True}, + 'partner_regions': {'required': True}, + 'managed_instance_pairs': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'InstanceFailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'InstanceFailoverGroupReadOnlyEndpoint'}, + 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + 'partner_regions': {'key': 'properties.partnerRegions', 'type': '[PartnerRegionInfo]'}, + 'managed_instance_pairs': {'key': 'properties.managedInstancePairs', 'type': '[ManagedInstancePairInfo]'}, + } + + def __init__(self, **kwargs): + super(InstanceFailoverGroup, self).__init__(**kwargs) + self.read_write_endpoint = kwargs.get('read_write_endpoint', None) + self.read_only_endpoint = kwargs.get('read_only_endpoint', None) + self.replication_role = None + self.replication_state = None + self.partner_regions = kwargs.get('partner_regions', None) + self.managed_instance_pairs = kwargs.get('managed_instance_pairs', None) + + +class InstanceFailoverGroupReadOnlyEndpoint(Model): + """Read-only endpoint of the failover group instance. + + :param failover_policy: Failover policy of the read-only endpoint for the + failover group. Possible values include: 'Disabled', 'Enabled' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy + """ + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InstanceFailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) + self.failover_policy = kwargs.get('failover_policy', None) + + +class InstanceFailoverGroupReadWriteEndpoint(Model): + """Read-write endpoint of the failover group instance. + + All required parameters must be populated in order to send to Azure. + + :param failover_policy: Required. Failover policy of the read-write + endpoint for the failover group. If failoverPolicy is Automatic then + failoverWithDataLossGracePeriodMinutes is required. Possible values + include: 'Manual', 'Automatic' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy + :param failover_with_data_loss_grace_period_minutes: Grace period before + failover with data loss is attempted for the read-write endpoint. If + failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is + required. + :type failover_with_data_loss_grace_period_minutes: int + """ + + _validation = { + 'failover_policy': {'required': True}, + } + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(InstanceFailoverGroupReadWriteEndpoint, self).__init__(**kwargs) + self.failover_policy = kwargs.get('failover_policy', None) + self.failover_with_data_loss_grace_period_minutes = kwargs.get('failover_with_data_loss_grace_period_minutes', None) + + +class InstancePool(TrackedResource): + """An Azure SQL instance pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param subnet_id: Required. Resource ID of the subnet to place this + instance pool in. + :type subnet_id: str + :param v_cores: Required. Count of vCores belonging to this instance pool. + :type v_cores: int + :param license_type: Required. The license type. Possible values are + 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' + (without SQL license price). Possible values include: 'LicenseIncluded', + 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.InstancePoolLicenseType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'subnet_id': {'required': True}, + 'v_cores': {'required': True}, + 'license_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InstancePool, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.v_cores = kwargs.get('v_cores', None) + self.license_type = kwargs.get('license_type', None) + + +class InstancePoolUpdate(Model): + """An update to an Instance pool. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(InstancePoolUpdate, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class Job(ProxyResource): + """A job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param description: User-defined description of the job. Default value: "" + . + :type description: str + :ivar version: The job version number. + :vartype version: int + :param schedule: Schedule properties of the job. + :type schedule: ~azure.mgmt.sql.models.JobSchedule + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'int'}, + 'schedule': {'key': 'properties.schedule', 'type': 'JobSchedule'}, + } + + def __init__(self, **kwargs): + super(Job, self).__init__(**kwargs) + self.description = kwargs.get('description', "") + self.version = None + self.schedule = kwargs.get('schedule', None) + + +class JobAgent(TrackedResource): + """An Azure SQL job agent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param database_id: Required. Resource ID of the database to store job + metadata in. + :type database_id: str + :ivar state: The state of the job agent. Possible values include: + 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' + :vartype state: str or ~azure.mgmt.sql.models.JobAgentState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'database_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobAgent, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.database_id = kwargs.get('database_id', None) + self.state = None + + +class JobAgentUpdate(Model): + """An update to an Azure SQL job agent. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(JobAgentUpdate, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class JobCredential(ProxyResource): + """A stored credential that can be used by a job to connect to target + databases. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param username: Required. The credential user name. + :type username: str + :param password: Required. The credential password. + :type password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'username': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'username': {'key': 'properties.username', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobCredential, self).__init__(**kwargs) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + + +class JobExecution(ProxyResource): + """An execution of a job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar job_version: The job version number. + :vartype job_version: int + :ivar step_name: The job step name. + :vartype step_name: str + :ivar step_id: The job step id. + :vartype step_id: int + :ivar job_execution_id: The unique identifier of the job execution. + :vartype job_execution_id: str + :ivar lifecycle: The detailed state of the job execution. Possible values + include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', + 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', + 'TimedOut', 'Canceled', 'Skipped' + :vartype lifecycle: str or ~azure.mgmt.sql.models.JobExecutionLifecycle + :ivar provisioning_state: The ARM provisioning state of the job execution. + Possible values include: 'Created', 'InProgress', 'Succeeded', 'Failed', + 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.sql.models.ProvisioningState + :ivar create_time: The time that the job execution was created. + :vartype create_time: datetime + :ivar start_time: The time that the job execution started. + :vartype start_time: datetime + :ivar end_time: The time that the job execution completed. + :vartype end_time: datetime + :param current_attempts: Number of times the job execution has been + attempted. + :type current_attempts: int + :ivar current_attempt_start_time: Start time of the current attempt. + :vartype current_attempt_start_time: datetime + :ivar last_message: The last status or error message. + :vartype last_message: str + :ivar target: The target that this execution is executed on. + :vartype target: ~azure.mgmt.sql.models.JobExecutionTarget + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'job_version': {'readonly': True}, + 'step_name': {'readonly': True}, + 'step_id': {'readonly': True}, + 'job_execution_id': {'readonly': True}, + 'lifecycle': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'create_time': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'current_attempt_start_time': {'readonly': True}, + 'last_message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'job_version': {'key': 'properties.jobVersion', 'type': 'int'}, + 'step_name': {'key': 'properties.stepName', 'type': 'str'}, + 'step_id': {'key': 'properties.stepId', 'type': 'int'}, + 'job_execution_id': {'key': 'properties.jobExecutionId', 'type': 'str'}, + 'lifecycle': {'key': 'properties.lifecycle', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'current_attempts': {'key': 'properties.currentAttempts', 'type': 'int'}, + 'current_attempt_start_time': {'key': 'properties.currentAttemptStartTime', 'type': 'iso-8601'}, + 'last_message': {'key': 'properties.lastMessage', 'type': 'str'}, + 'target': {'key': 'properties.target', 'type': 'JobExecutionTarget'}, + } + + def __init__(self, **kwargs): + super(JobExecution, self).__init__(**kwargs) + self.job_version = None + self.step_name = None + self.step_id = None + self.job_execution_id = None + self.lifecycle = None + self.provisioning_state = None + self.create_time = None + self.start_time = None + self.end_time = None + self.current_attempts = kwargs.get('current_attempts', None) + self.current_attempt_start_time = None + self.last_message = None + self.target = None + + +class JobExecutionTarget(Model): + """The target that a job execution is executed on. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of the target. Possible values include: + 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + :vartype type: str or ~azure.mgmt.sql.models.JobTargetType + :ivar server_name: The server name. + :vartype server_name: str + :ivar database_name: The database name. + :vartype database_name: str + """ + + _validation = { + 'type': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobExecutionTarget, self).__init__(**kwargs) + self.type = None + self.server_name = None + self.database_name = None + + +class JobSchedule(Model): + """Scheduling properties of a job. + + :param start_time: Schedule start time. Default value: + "0001-01-01T00:00:00Z" . + :type start_time: datetime + :param end_time: Schedule end time. Default value: "9999-12-31T11:59:59Z" + . + :type end_time: datetime + :param type: Schedule interval type. Possible values include: 'Once', + 'Recurring'. Default value: "Once" . + :type type: str or ~azure.mgmt.sql.models.JobScheduleType + :param enabled: Whether or not the schedule is enabled. + :type enabled: bool + :param interval: Value of the schedule's recurring interval, if the + schedule type is recurring. ISO8601 duration format. + :type interval: str + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'JobScheduleType'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'interval': {'key': 'interval', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobSchedule, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', "0001-01-01T00:00:00Z") + self.end_time = kwargs.get('end_time', "9999-12-31T11:59:59Z") + self.type = kwargs.get('type', "Once") + self.enabled = kwargs.get('enabled', None) + self.interval = kwargs.get('interval', None) + + +class JobStep(ProxyResource): + """A job step. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param step_id: The job step's index within the job. If not specified when + creating the job step, it will be created as the last step. If not + specified when updating the job step, the step id is not modified. + :type step_id: int + :param target_group: Required. The resource ID of the target group that + the job step will be executed on. + :type target_group: str + :param credential: Required. The resource ID of the job credential that + will be used to connect to the targets. + :type credential: str + :param action: Required. The action payload of the job step. + :type action: ~azure.mgmt.sql.models.JobStepAction + :param output: Output destination properties of the job step. + :type output: ~azure.mgmt.sql.models.JobStepOutput + :param execution_options: Execution options for the job step. + :type execution_options: ~azure.mgmt.sql.models.JobStepExecutionOptions + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'target_group': {'required': True}, + 'credential': {'required': True}, + 'action': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'step_id': {'key': 'properties.stepId', 'type': 'int'}, + 'target_group': {'key': 'properties.targetGroup', 'type': 'str'}, + 'credential': {'key': 'properties.credential', 'type': 'str'}, + 'action': {'key': 'properties.action', 'type': 'JobStepAction'}, + 'output': {'key': 'properties.output', 'type': 'JobStepOutput'}, + 'execution_options': {'key': 'properties.executionOptions', 'type': 'JobStepExecutionOptions'}, + } + + def __init__(self, **kwargs): + super(JobStep, self).__init__(**kwargs) + self.step_id = kwargs.get('step_id', None) + self.target_group = kwargs.get('target_group', None) + self.credential = kwargs.get('credential', None) + self.action = kwargs.get('action', None) + self.output = kwargs.get('output', None) + self.execution_options = kwargs.get('execution_options', None) + + +class JobStepAction(Model): + """The action to be executed by a job step. + + All required parameters must be populated in order to send to Azure. + + :param type: Type of action being executed by the job step. Possible + values include: 'TSql'. Default value: "TSql" . + :type type: str or ~azure.mgmt.sql.models.JobStepActionType + :param source: The source of the action to execute. Possible values + include: 'Inline'. Default value: "Inline" . + :type source: str or ~azure.mgmt.sql.models.JobStepActionSource + :param value: Required. The action value, for example the text of the + T-SQL script to execute. + :type value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobStepAction, self).__init__(**kwargs) + self.type = kwargs.get('type', "TSql") + self.source = kwargs.get('source', "Inline") + self.value = kwargs.get('value', None) + + +class JobStepExecutionOptions(Model): + """The execution options of a job step. + + :param timeout_seconds: Execution timeout for the job step. Default value: + 43200 . + :type timeout_seconds: int + :param retry_attempts: Maximum number of times the job step will be + reattempted if the first attempt fails. Default value: 10 . + :type retry_attempts: int + :param initial_retry_interval_seconds: Initial delay between retries for + job step execution. Default value: 1 . + :type initial_retry_interval_seconds: int + :param maximum_retry_interval_seconds: The maximum amount of time to wait + between retries for job step execution. Default value: 120 . + :type maximum_retry_interval_seconds: int + :param retry_interval_backoff_multiplier: The backoff multiplier for the + time between retries. Default value: 2 . + :type retry_interval_backoff_multiplier: float + """ + + _attribute_map = { + 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, + 'retry_attempts': {'key': 'retryAttempts', 'type': 'int'}, + 'initial_retry_interval_seconds': {'key': 'initialRetryIntervalSeconds', 'type': 'int'}, + 'maximum_retry_interval_seconds': {'key': 'maximumRetryIntervalSeconds', 'type': 'int'}, + 'retry_interval_backoff_multiplier': {'key': 'retryIntervalBackoffMultiplier', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(JobStepExecutionOptions, self).__init__(**kwargs) + self.timeout_seconds = kwargs.get('timeout_seconds', 43200) + self.retry_attempts = kwargs.get('retry_attempts', 10) + self.initial_retry_interval_seconds = kwargs.get('initial_retry_interval_seconds', 1) + self.maximum_retry_interval_seconds = kwargs.get('maximum_retry_interval_seconds', 120) + self.retry_interval_backoff_multiplier = kwargs.get('retry_interval_backoff_multiplier', 2) + + +class JobStepOutput(Model): + """The output configuration of a job step. + + All required parameters must be populated in order to send to Azure. + + :param type: The output destination type. Possible values include: + 'SqlDatabase'. Default value: "SqlDatabase" . + :type type: str or ~azure.mgmt.sql.models.JobStepOutputType + :param subscription_id: The output destination subscription id. + :type subscription_id: str + :param resource_group_name: The output destination resource group. + :type resource_group_name: str + :param server_name: Required. The output destination server name. + :type server_name: str + :param database_name: Required. The output destination database. + :type database_name: str + :param schema_name: The output destination schema. Default value: "dbo" . + :type schema_name: str + :param table_name: Required. The output destination table. + :type table_name: str + :param credential: Required. The resource ID of the credential to use to + connect to the output destination. + :type credential: str + """ + + _validation = { + 'server_name': {'required': True}, + 'database_name': {'required': True}, + 'table_name': {'required': True}, + 'credential': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'credential': {'key': 'credential', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobStepOutput, self).__init__(**kwargs) + self.type = kwargs.get('type', "SqlDatabase") + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group_name = kwargs.get('resource_group_name', None) + self.server_name = kwargs.get('server_name', None) + self.database_name = kwargs.get('database_name', None) + self.schema_name = kwargs.get('schema_name', "dbo") + self.table_name = kwargs.get('table_name', None) + self.credential = kwargs.get('credential', None) + + +class JobTarget(Model): + """A job target, for example a specific database or a container of databases + that is evaluated during job execution. + + All required parameters must be populated in order to send to Azure. + + :param membership_type: Whether the target is included or excluded from + the group. Possible values include: 'Include', 'Exclude'. Default value: + "Include" . + :type membership_type: str or + ~azure.mgmt.sql.models.JobTargetGroupMembershipType + :param type: Required. The target type. Possible values include: + 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + :type type: str or ~azure.mgmt.sql.models.JobTargetType + :param server_name: The target server name. + :type server_name: str + :param database_name: The target database name. + :type database_name: str + :param elastic_pool_name: The target elastic pool name. + :type elastic_pool_name: str + :param shard_map_name: The target shard map. + :type shard_map_name: str + :param refresh_credential: The resource ID of the credential that is used + during job execution to connect to the target and determine the list of + databases inside the target. + :type refresh_credential: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'membership_type': {'key': 'membershipType', 'type': 'JobTargetGroupMembershipType'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'elastic_pool_name': {'key': 'elasticPoolName', 'type': 'str'}, + 'shard_map_name': {'key': 'shardMapName', 'type': 'str'}, + 'refresh_credential': {'key': 'refreshCredential', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobTarget, self).__init__(**kwargs) + self.membership_type = kwargs.get('membership_type', "Include") + self.type = kwargs.get('type', None) + self.server_name = kwargs.get('server_name', None) + self.database_name = kwargs.get('database_name', None) + self.elastic_pool_name = kwargs.get('elastic_pool_name', None) + self.shard_map_name = kwargs.get('shard_map_name', None) + self.refresh_credential = kwargs.get('refresh_credential', None) + + +class JobTargetGroup(ProxyResource): + """A group of job targets. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param members: Required. Members of the target group. + :type members: list[~azure.mgmt.sql.models.JobTarget] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'members': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'members': {'key': 'properties.members', 'type': '[JobTarget]'}, + } + + def __init__(self, **kwargs): + super(JobTargetGroup, self).__init__(**kwargs) + self.members = kwargs.get('members', None) + + +class JobVersion(ProxyResource): + """A job version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobVersion, self).__init__(**kwargs) + + +class LicenseTypeCapability(Model): + """The license type capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: License type identifier. + :vartype name: str + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LicenseTypeCapability, self).__init__(**kwargs) + self.name = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class LocationCapabilities(Model): + """The location capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The location name. + :vartype name: str + :ivar supported_server_versions: The list of supported server versions. + :vartype supported_server_versions: + list[~azure.mgmt.sql.models.ServerVersionCapability] + :ivar supported_managed_instance_versions: The list of supported managed + instance versions. + :vartype supported_managed_instance_versions: + list[~azure.mgmt.sql.models.ManagedInstanceVersionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_server_versions': {'readonly': True}, + 'supported_managed_instance_versions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_server_versions': {'key': 'supportedServerVersions', 'type': '[ServerVersionCapability]'}, + 'supported_managed_instance_versions': {'key': 'supportedManagedInstanceVersions', 'type': '[ManagedInstanceVersionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LocationCapabilities, self).__init__(**kwargs) + self.name = None + self.supported_server_versions = None + self.supported_managed_instance_versions = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class LogSizeCapability(Model): + """The log size capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The log size limit (see 'unit' for the units). + :vartype limit: int + :ivar unit: The units that the limit is expressed in. Possible values + include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes', 'Percent' + :vartype unit: str or ~azure.mgmt.sql.models.LogSizeUnit + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'int'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LogSizeCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + + +class LongTermRetentionBackup(ProxyResource): + """A long term retention backup. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar server_name: The server name that the backup database belong to. + :vartype server_name: str + :ivar server_create_time: The create time of the server. + :vartype server_create_time: datetime + :ivar database_name: The name of the database the backup belong to + :vartype database_name: str + :ivar database_deletion_time: The delete time of the database + :vartype database_deletion_time: datetime + :ivar backup_time: The time the backup was taken + :vartype backup_time: datetime + :ivar backup_expiration_time: The time the long term retention backup will + expire. + :vartype backup_expiration_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'server_name': {'readonly': True}, + 'server_create_time': {'readonly': True}, + 'database_name': {'readonly': True}, + 'database_deletion_time': {'readonly': True}, + 'backup_time': {'readonly': True}, + 'backup_expiration_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'server_create_time': {'key': 'properties.serverCreateTime', 'type': 'iso-8601'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'database_deletion_time': {'key': 'properties.databaseDeletionTime', 'type': 'iso-8601'}, + 'backup_time': {'key': 'properties.backupTime', 'type': 'iso-8601'}, + 'backup_expiration_time': {'key': 'properties.backupExpirationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(LongTermRetentionBackup, self).__init__(**kwargs) + self.server_name = None + self.server_create_time = None + self.database_name = None + self.database_deletion_time = None + self.backup_time = None + self.backup_expiration_time = None + + +class ManagedBackupShortTermRetentionPolicy(ProxyResource): + """A short term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param retention_days: The backup retention period in days. This is how + many days Point-in-Time Restore will be supported. + :type retention_days: int + """ + + _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'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ManagedBackupShortTermRetentionPolicy, self).__init__(**kwargs) + self.retention_days = kwargs.get('retention_days', None) + + +class ManagedDatabase(TrackedResource): + """A managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param collation: Collation of the managed database. + :type collation: str + :ivar status: Status of the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' + :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus + :ivar creation_date: Creation date of the database. + :vartype creation_date: datetime + :ivar earliest_restore_point: Earliest restore point in time for point in + time restore. + :vartype earliest_restore_point: datetime + :param restore_point_in_time: Conditional. If createMode is + PointInTimeRestore, this value is required. Specifies the point in time + (ISO8601 format) of the source database that will be restored to create + the new database. + :type restore_point_in_time: datetime + :ivar default_secondary_location: Geo paired region. + :vartype default_secondary_location: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param create_mode: Managed database create mode. PointInTimeRestore: + Create a database by restoring a point in time backup of an existing + database. SourceDatabaseName, SourceManagedInstanceName and PointInTime + must be specified. RestoreExternalBackup: Create a database by restoring + from external backup files. Collation, StorageContainerUri and + StorageContainerSasToken must be specified. Recovery: Creates a database + by restoring a geo-replicated backup. RecoverableDatabaseId must be + specified as the recoverable database resource ID to restore. Possible + values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', + 'Recovery' + :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode + :param storage_container_uri: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the uri of the + storage container where backups for this restore are stored. + :type storage_container_uri: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :param restorable_dropped_database_id: The restorable dropped database + resource id to restore when creating this database. + :type restorable_dropped_database_id: str + :param storage_container_sas_token: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the storage + container sas token. + :type storage_container_sas_token: str + :ivar failover_group_id: Instance Failover Group resource identifier that + this managed database belongs to. + :vartype failover_group_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'status': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'earliest_restore_point': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedDatabase, self).__init__(**kwargs) + self.collation = kwargs.get('collation', None) + self.status = None + self.creation_date = None + self.earliest_restore_point = None + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.default_secondary_location = None + self.catalog_collation = kwargs.get('catalog_collation', None) + self.create_mode = kwargs.get('create_mode', None) + self.storage_container_uri = kwargs.get('storage_container_uri', None) + self.source_database_id = kwargs.get('source_database_id', None) + self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) + self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None) + self.failover_group_id = None + self.recoverable_database_id = kwargs.get('recoverable_database_id', None) + + +class ManagedDatabaseSecurityAlertPolicy(ProxyResource): + """A managed database security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ManagedDatabaseSecurityAlertPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.disabled_alerts = kwargs.get('disabled_alerts', None) + self.email_addresses = kwargs.get('email_addresses', None) + self.email_account_admins = kwargs.get('email_account_admins', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.creation_time = None + + +class ManagedDatabaseUpdate(Model): + """An managed database update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param collation: Collation of the managed database. + :type collation: str + :ivar status: Status of the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' + :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus + :ivar creation_date: Creation date of the database. + :vartype creation_date: datetime + :ivar earliest_restore_point: Earliest restore point in time for point in + time restore. + :vartype earliest_restore_point: datetime + :param restore_point_in_time: Conditional. If createMode is + PointInTimeRestore, this value is required. Specifies the point in time + (ISO8601 format) of the source database that will be restored to create + the new database. + :type restore_point_in_time: datetime + :ivar default_secondary_location: Geo paired region. + :vartype default_secondary_location: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param create_mode: Managed database create mode. PointInTimeRestore: + Create a database by restoring a point in time backup of an existing + database. SourceDatabaseName, SourceManagedInstanceName and PointInTime + must be specified. RestoreExternalBackup: Create a database by restoring + from external backup files. Collation, StorageContainerUri and + StorageContainerSasToken must be specified. Recovery: Creates a database + by restoring a geo-replicated backup. RecoverableDatabaseId must be + specified as the recoverable database resource ID to restore. Possible + values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', + 'Recovery' + :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode + :param storage_container_uri: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the uri of the + storage container where backups for this restore are stored. + :type storage_container_uri: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :param restorable_dropped_database_id: The restorable dropped database + resource id to restore when creating this database. + :type restorable_dropped_database_id: str + :param storage_container_sas_token: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the storage + container sas token. + :type storage_container_sas_token: str + :ivar failover_group_id: Instance Failover Group resource identifier that + this managed database belongs to. + :vartype failover_group_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'status': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'earliest_restore_point': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + } + + _attribute_map = { + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ManagedDatabaseUpdate, self).__init__(**kwargs) + self.collation = kwargs.get('collation', None) + self.status = None + self.creation_date = None + self.earliest_restore_point = None + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.default_secondary_location = None + self.catalog_collation = kwargs.get('catalog_collation', None) + self.create_mode = kwargs.get('create_mode', None) + self.storage_container_uri = kwargs.get('storage_container_uri', None) + self.source_database_id = kwargs.get('source_database_id', None) + self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) + self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None) + self.failover_group_id = None + self.recoverable_database_id = kwargs.get('recoverable_database_id', None) + self.tags = kwargs.get('tags', None) + + +class ManagedInstance(TrackedResource): + """An Azure SQL managed instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param identity: The Azure Active Directory identity of the managed + instance. + :type identity: ~azure.mgmt.sql.models.ResourceIdentity + :param sku: Managed instance SKU. Allowed values for sku.name: GP_Gen4, + GP_Gen5, BC_Gen4, BC_Gen5 + :type sku: ~azure.mgmt.sql.models.Sku + :param managed_instance_create_mode: Specifies the mode of database + creation. + Default: Regular instance creation. + Restore: Creates an instance by restoring a set of backups to specific + point in time. RestorePointInTime and SourceManagedInstanceId must be + specified. Possible values include: 'Default', 'PointInTimeRestore' + :type managed_instance_create_mode: str or + ~azure.mgmt.sql.models.ManagedServerCreateMode + :ivar fully_qualified_domain_name: The fully qualified domain name of the + managed instance. + :vartype fully_qualified_domain_name: str + :param administrator_login: Administrator username for the managed + instance. Can only be specified when the managed instance is being created + (and is required for creation). + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for managed instance creation). + :type administrator_login_password: str + :param subnet_id: Subnet resource ID for the managed instance. + :type subnet_id: str + :ivar state: The state of the managed instance. + :vartype state: str + :param license_type: The license type. Possible values are + 'LicenseIncluded' (regular price inclusive of a new SQL license) and + 'BasePrice' (discounted AHB price for bringing your own SQL licenses). + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or + ~azure.mgmt.sql.models.ManagedInstanceLicenseType + :param v_cores: The number of vCores. Allowed values: 8, 16, 24, 32, 40, + 64, 80. + :type v_cores: int + :param storage_size_in_gb: Storage size in GB. Minimum value: 32. Maximum + value: 8192. Increments of 32 GB allowed only. + :type storage_size_in_gb: int + :param collation: Collation of the managed instance. + :type collation: str + :ivar dns_zone: The Dns Zone that the managed instance is in. + :vartype dns_zone: str + :param dns_zone_partner: The resource id of another managed instance whose + DNS zone this managed instance will share after creation. + :type dns_zone_partner: str + :param public_data_endpoint_enabled: Whether or not the public data + endpoint is enabled. + :type public_data_endpoint_enabled: bool + :param source_managed_instance_id: The resource identifier of the source + managed instance associated with create operation of this instance. + :type source_managed_instance_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param proxy_override: Connection type used for connecting to the + instance. Possible values include: 'Proxy', 'Redirect', 'Default' + :type proxy_override: str or + ~azure.mgmt.sql.models.ManagedInstanceProxyOverride + :param timezone_id: Id of the timezone. Allowed values are timezones + supported by Windows. + Windows keeps details on supported timezones, including the id, in + registry under + KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time + Zones. + You can get those registry values via SQL Server by querying SELECT name + AS timezone_id FROM sys.time_zone_info. + List of Ids can also be obtained by executing + [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + An example of valid timezone id is "Pacific Standard Time" or "W. Europe + Standard Time". + :type timezone_id: str + :param instance_pool_id: The Id of the instance pool this managed server + belongs to. + :type instance_pool_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'fully_qualified_domain_name': {'readonly': True}, + 'state': {'readonly': True}, + 'dns_zone': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, + 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, + 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, + 'source_managed_instance_id': {'key': 'properties.sourceManagedInstanceId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, + 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, + 'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstance, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.sku = kwargs.get('sku', None) + self.managed_instance_create_mode = kwargs.get('managed_instance_create_mode', None) + self.fully_qualified_domain_name = None + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.state = None + self.license_type = kwargs.get('license_type', None) + self.v_cores = kwargs.get('v_cores', None) + self.storage_size_in_gb = kwargs.get('storage_size_in_gb', None) + self.collation = kwargs.get('collation', None) + self.dns_zone = None + self.dns_zone_partner = kwargs.get('dns_zone_partner', None) + self.public_data_endpoint_enabled = kwargs.get('public_data_endpoint_enabled', None) + self.source_managed_instance_id = kwargs.get('source_managed_instance_id', None) + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.proxy_override = kwargs.get('proxy_override', None) + self.timezone_id = kwargs.get('timezone_id', None) + self.instance_pool_id = kwargs.get('instance_pool_id', None) + + +class ManagedInstanceEditionCapability(Model): + """The managed server capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The managed server version name. + :vartype name: str + :ivar supported_families: The supported families. + :vartype supported_families: + list[~azure.mgmt.sql.models.ManagedInstanceFamilyCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_families': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_families': {'key': 'supportedFamilies', 'type': '[ManagedInstanceFamilyCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceEditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_families = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ManagedInstanceEncryptionProtector(ProxyResource): + """The managed instance encryption protector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :vartype kind: str + :param server_key_name: The name of the managed instance key. + :type server_key_name: str + :param server_key_type: Required. The encryption protector type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :ivar uri: The URI of the server key. + :vartype uri: str + :ivar thumbprint: Thumbprint of the server key. + :vartype thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'server_key_type': {'required': True}, + 'uri': {'readonly': True}, + 'thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceEncryptionProtector, self).__init__(**kwargs) + self.kind = None + self.server_key_name = kwargs.get('server_key_name', None) + self.server_key_type = kwargs.get('server_key_type', None) + self.uri = None + self.thumbprint = None + + +class ManagedInstanceFamilyCapability(Model): + """The managed server family capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Family name. + :vartype name: str + :ivar sku: SKU name. + :vartype sku: str + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar supported_vcores_values: List of supported virtual cores values. + :vartype supported_vcores_values: + list[~azure.mgmt.sql.models.ManagedInstanceVcoresCapability] + :ivar included_max_size: Included size. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar supported_storage_sizes: Storage size ranges. + :vartype supported_storage_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'supported_vcores_values': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'supported_storage_sizes': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'supported_vcores_values': {'key': 'supportedVcoresValues', 'type': '[ManagedInstanceVcoresCapability]'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'supported_storage_sizes': {'key': 'supportedStorageSizes', 'type': '[MaxSizeRangeCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceFamilyCapability, self).__init__(**kwargs) + self.name = None + self.sku = None + self.supported_license_types = None + self.supported_vcores_values = None + self.included_max_size = None + self.supported_storage_sizes = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ManagedInstanceKey(ProxyResource): + """A managed instance key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :vartype kind: str + :param server_key_type: Required. The key type like 'ServiceManaged', + 'AzureKeyVault'. Possible values include: 'ServiceManaged', + 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :param uri: The URI of the key. If the ServerKeyType is AzureKeyVault, + then the URI is required. + :type uri: str + :ivar thumbprint: Thumbprint of the key. + :vartype thumbprint: str + :ivar creation_date: The key creation date. + :vartype creation_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'server_key_type': {'required': True}, + 'thumbprint': {'readonly': True}, + 'creation_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceKey, self).__init__(**kwargs) + self.kind = None + self.server_key_type = kwargs.get('server_key_type', None) + self.uri = kwargs.get('uri', None) + self.thumbprint = None + self.creation_date = None + + +class ManagedInstancePairInfo(Model): + """Pairs of Managed Instances in the failover group. + + :param primary_managed_instance_id: Id of Primary Managed Instance in + pair. + :type primary_managed_instance_id: str + :param partner_managed_instance_id: Id of Partner Managed Instance in + pair. + :type partner_managed_instance_id: str + """ + + _attribute_map = { + 'primary_managed_instance_id': {'key': 'primaryManagedInstanceId', 'type': 'str'}, + 'partner_managed_instance_id': {'key': 'partnerManagedInstanceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstancePairInfo, self).__init__(**kwargs) + self.primary_managed_instance_id = kwargs.get('primary_managed_instance_id', None) + self.partner_managed_instance_id = kwargs.get('partner_managed_instance_id', None) + + +class ManagedInstanceUpdate(Model): + """An update request for an Azure SQL Database managed instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param sku: Managed instance sku + :type sku: ~azure.mgmt.sql.models.Sku + :param managed_instance_create_mode: Specifies the mode of database + creation. + Default: Regular instance creation. + Restore: Creates an instance by restoring a set of backups to specific + point in time. RestorePointInTime and SourceManagedInstanceId must be + specified. Possible values include: 'Default', 'PointInTimeRestore' + :type managed_instance_create_mode: str or + ~azure.mgmt.sql.models.ManagedServerCreateMode + :ivar fully_qualified_domain_name: The fully qualified domain name of the + managed instance. + :vartype fully_qualified_domain_name: str + :param administrator_login: Administrator username for the managed + instance. Can only be specified when the managed instance is being created + (and is required for creation). + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for managed instance creation). + :type administrator_login_password: str + :param subnet_id: Subnet resource ID for the managed instance. + :type subnet_id: str + :ivar state: The state of the managed instance. + :vartype state: str + :param license_type: The license type. Possible values are + 'LicenseIncluded' (regular price inclusive of a new SQL license) and + 'BasePrice' (discounted AHB price for bringing your own SQL licenses). + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or + ~azure.mgmt.sql.models.ManagedInstanceLicenseType + :param v_cores: The number of vCores. Allowed values: 8, 16, 24, 32, 40, + 64, 80. + :type v_cores: int + :param storage_size_in_gb: Storage size in GB. Minimum value: 32. Maximum + value: 8192. Increments of 32 GB allowed only. + :type storage_size_in_gb: int + :param collation: Collation of the managed instance. + :type collation: str + :ivar dns_zone: The Dns Zone that the managed instance is in. + :vartype dns_zone: str + :param dns_zone_partner: The resource id of another managed instance whose + DNS zone this managed instance will share after creation. + :type dns_zone_partner: str + :param public_data_endpoint_enabled: Whether or not the public data + endpoint is enabled. + :type public_data_endpoint_enabled: bool + :param source_managed_instance_id: The resource identifier of the source + managed instance associated with create operation of this instance. + :type source_managed_instance_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param proxy_override: Connection type used for connecting to the + instance. Possible values include: 'Proxy', 'Redirect', 'Default' + :type proxy_override: str or + ~azure.mgmt.sql.models.ManagedInstanceProxyOverride + :param timezone_id: Id of the timezone. Allowed values are timezones + supported by Windows. + Windows keeps details on supported timezones, including the id, in + registry under + KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time + Zones. + You can get those registry values via SQL Server by querying SELECT name + AS timezone_id FROM sys.time_zone_info. + List of Ids can also be obtained by executing + [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + An example of valid timezone id is "Pacific Standard Time" or "W. Europe + Standard Time". + :type timezone_id: str + :param instance_pool_id: The Id of the instance pool this managed server + belongs to. + :type instance_pool_id: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'fully_qualified_domain_name': {'readonly': True}, + 'state': {'readonly': True}, + 'dns_zone': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, + 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, + 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, + 'source_managed_instance_id': {'key': 'properties.sourceManagedInstanceId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, + 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, + 'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceUpdate, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.managed_instance_create_mode = kwargs.get('managed_instance_create_mode', None) + self.fully_qualified_domain_name = None + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.state = None + self.license_type = kwargs.get('license_type', None) + self.v_cores = kwargs.get('v_cores', None) + self.storage_size_in_gb = kwargs.get('storage_size_in_gb', None) + self.collation = kwargs.get('collation', None) + self.dns_zone = None + self.dns_zone_partner = kwargs.get('dns_zone_partner', None) + self.public_data_endpoint_enabled = kwargs.get('public_data_endpoint_enabled', None) + self.source_managed_instance_id = kwargs.get('source_managed_instance_id', None) + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.proxy_override = kwargs.get('proxy_override', None) + self.timezone_id = kwargs.get('timezone_id', None) + self.instance_pool_id = kwargs.get('instance_pool_id', None) + self.tags = kwargs.get('tags', None) + + +class ManagedInstanceVcoresCapability(Model): + """The managed instance virtual cores capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The virtual cores identifier. + :vartype name: str + :ivar value: The virtual cores value. + :vartype value: int + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'int'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceVcoresCapability, self).__init__(**kwargs) + self.name = None + self.value = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ManagedInstanceVersionCapability(Model): + """The managed instance capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The server version name. + :vartype name: str + :ivar supported_editions: The list of supported managed instance editions. + :vartype supported_editions: + list[~azure.mgmt.sql.models.ManagedInstanceEditionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_editions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_editions': {'key': 'supportedEditions', 'type': '[ManagedInstanceEditionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceVersionCapability, self).__init__(**kwargs) + self.name = None + self.supported_editions = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ManagedInstanceVulnerabilityAssessment(ProxyResource): + """A managed instance vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: Required. A blob storage container path to + hold the scan results (e.g. + https://myStorage.blob.core.windows.net/VaScans/). + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_container_path': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = kwargs.get('storage_container_path', None) + self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.recurring_scans = kwargs.get('recurring_scans', None) + + +class ManagedServerSecurityAlertPolicy(ProxyResource): + """A managed server security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ManagedServerSecurityAlertPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.disabled_alerts = kwargs.get('disabled_alerts', None) + self.email_addresses = kwargs.get('email_addresses', None) + self.email_account_admins = kwargs.get('email_account_admins', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.creation_time = None + + +class MaxSizeCapability(Model): + """The maximum size capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The maximum size limit (see 'unit' for the units). + :vartype limit: int + :ivar unit: The units that the limit is expressed in. Possible values + include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' + :vartype unit: str or ~azure.mgmt.sql.models.MaxSizeUnit + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'int'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MaxSizeCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + + +class MaxSizeRangeCapability(Model): + """The maximum size range capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar min_value: Minimum value. + :vartype min_value: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar max_value: Maximum value. + :vartype max_value: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar scale_size: Scale/step size for discrete values between the minimum + value and the maximum value. + :vartype scale_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar log_size: Size of transaction log. + :vartype log_size: ~azure.mgmt.sql.models.LogSizeCapability + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'min_value': {'readonly': True}, + 'max_value': {'readonly': True}, + 'scale_size': {'readonly': True}, + 'log_size': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'min_value': {'key': 'minValue', 'type': 'MaxSizeCapability'}, + 'max_value': {'key': 'maxValue', 'type': 'MaxSizeCapability'}, + 'scale_size': {'key': 'scaleSize', 'type': 'MaxSizeCapability'}, + 'log_size': {'key': 'logSize', 'type': 'LogSizeCapability'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MaxSizeRangeCapability, self).__init__(**kwargs) + self.min_value = None + self.max_value = None + self.scale_size = None + self.log_size = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class Metric(Model): + """Database metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar start_time: The start time for the metric (ISO-8601 format). + :vartype start_time: datetime + :ivar end_time: The end time for the metric (ISO-8601 format). + :vartype end_time: datetime + :ivar time_grain: The time step to be used to summarize the metric values. + :vartype time_grain: str + :ivar unit: The unit of the metric. Possible values include: 'count', + 'bytes', 'seconds', 'percent', 'countPerSecond', 'bytesPerSecond' + :vartype unit: str or ~azure.mgmt.sql.models.UnitType + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.sql.models.MetricName + :ivar metric_values: The metric values for the specified time window and + timestep. + :vartype metric_values: list[~azure.mgmt.sql.models.MetricValue] + """ + + _validation = { + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'time_grain': {'readonly': True}, + 'unit': {'readonly': True}, + 'name': {'readonly': True}, + 'metric_values': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'MetricName'}, + 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, + } + + def __init__(self, **kwargs): + super(Metric, self).__init__(**kwargs) + self.start_time = None + self.end_time = None + self.time_grain = None + self.unit = None + self.name = None + self.metric_values = None + + +class MetricAvailability(Model): + """A metric availability value. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar retention: The length of retention for the database metric. + :vartype retention: str + :ivar time_grain: The granularity of the database metric. + :vartype time_grain: str + """ + + _validation = { + 'retention': {'readonly': True}, + 'time_grain': {'readonly': True}, + } + + _attribute_map = { + 'retention': {'key': 'retention', 'type': 'str'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetricAvailability, self).__init__(**kwargs) + self.retention = None + self.time_grain = None + + +class MetricDefinition(Model): + """A database metric definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.sql.models.MetricName + :ivar primary_aggregation_type: The primary aggregation type defining how + metric values are displayed. Possible values include: 'None', 'Average', + 'Count', 'Minimum', 'Maximum', 'Total' + :vartype primary_aggregation_type: str or + ~azure.mgmt.sql.models.PrimaryAggregationType + :ivar resource_uri: The resource uri of the database. + :vartype resource_uri: str + :ivar unit: The unit of the metric. Possible values include: 'Count', + 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' + :vartype unit: str or ~azure.mgmt.sql.models.UnitDefinitionType + :ivar metric_availabilities: The list of database metric availabilities + for the metric. + :vartype metric_availabilities: + list[~azure.mgmt.sql.models.MetricAvailability] + """ + + _validation = { + 'name': {'readonly': True}, + 'primary_aggregation_type': {'readonly': True}, + 'resource_uri': {'readonly': True}, + 'unit': {'readonly': True}, + 'metric_availabilities': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'MetricName'}, + 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, + } + + def __init__(self, **kwargs): + super(MetricDefinition, self).__init__(**kwargs) + self.name = None + self.primary_aggregation_type = None + self.resource_uri = None + self.unit = None + self.metric_availabilities = None + + +class MetricName(Model): + """A database metric name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The name of the database metric. + :vartype value: str + :ivar localized_value: The friendly name of the database metric. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetricName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class MetricValue(Model): + """Represents database metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar count: The number of values for the metric. + :vartype count: float + :ivar average: The average value of the metric. + :vartype average: float + :ivar maximum: The max value of the metric. + :vartype maximum: float + :ivar minimum: The min value of the metric. + :vartype minimum: float + :ivar timestamp: The metric timestamp (ISO-8601 format). + :vartype timestamp: datetime + :ivar total: The total value of the metric. + :vartype total: float + """ + + _validation = { + 'count': {'readonly': True}, + 'average': {'readonly': True}, + 'maximum': {'readonly': True}, + 'minimum': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'total': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'float'}, + 'average': {'key': 'average', 'type': 'float'}, + 'maximum': {'key': 'maximum', 'type': 'float'}, + 'minimum': {'key': 'minimum', 'type': 'float'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'total': {'key': 'total', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(MetricValue, self).__init__(**kwargs) + self.count = None + self.average = None + self.maximum = None + self.minimum = None + self.timestamp = None + self.total = None + + +class Name(Model): + """ARM Usage Name. + + :param value: Usage name value + :type value: str + :param localized_value: Usage name localized value. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Name, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) + + +class Operation(Model): + """SQL REST API operation definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the operation being performed on this particular + object. + :vartype name: str + :ivar display: The localized display information for this particular + operation / action. + :vartype display: ~azure.mgmt.sql.models.OperationDisplay + :ivar origin: The intended executor of the operation. Possible values + include: 'user', 'system' + :vartype origin: str or ~azure.mgmt.sql.models.OperationOrigin + :ivar properties: Additional descriptions for the operation. + :vartype properties: dict[str, object] + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + 'origin': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + self.origin = None + self.properties = None + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The localized friendly form of the resource provider name. + :vartype provider: str + :ivar resource: The localized friendly form of the resource type related + to this action/operation. + :vartype resource: str + :ivar operation: The localized friendly name for the operation. + :vartype operation: str + :ivar description: The localized friendly description for the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class OperationImpact(Model): + """The impact of an operation, both in absolute and relative terms. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the impact dimension. + :vartype name: str + :ivar unit: The unit in which estimated impact to dimension is measured. + :vartype unit: str + :ivar change_value_absolute: The absolute impact to dimension. + :vartype change_value_absolute: float + :ivar change_value_relative: The relative impact to dimension (null if not + applicable) + :vartype change_value_relative: float + """ + + _validation = { + 'name': {'readonly': True}, + 'unit': {'readonly': True}, + 'change_value_absolute': {'readonly': True}, + 'change_value_relative': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'change_value_absolute': {'key': 'changeValueAbsolute', 'type': 'float'}, + 'change_value_relative': {'key': 'changeValueRelative', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(OperationImpact, self).__init__(**kwargs) + self.name = None + self.unit = None + self.change_value_absolute = None + self.change_value_relative = None + + +class PartnerInfo(Model): + """Partner server information for the failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource identifier of the partner server. + :type id: str + :ivar location: Geo location of the partner server. + :vartype location: str + :ivar replication_role: Replication role of the partner server. Possible + values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.FailoverGroupReplicationRole + """ + + _validation = { + 'id': {'required': True}, + 'location': {'readonly': True}, + 'replication_role': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'replication_role': {'key': 'replicationRole', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PartnerInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.location = None + self.replication_role = None + + +class PartnerRegionInfo(Model): + """Partner region information for the failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param location: Geo location of the partner managed instances. + :type location: str + :ivar replication_role: Replication role of the partner managed instances. + Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole + """ + + _validation = { + 'replication_role': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'replication_role': {'key': 'replicationRole', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PartnerRegionInfo, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.replication_role = None + + +class PerformanceLevelCapability(Model): + """The performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: Performance level value. + :vartype value: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + """ + + _validation = { + 'value': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PerformanceLevelCapability, self).__init__(**kwargs) + self.value = None + self.unit = None + + +class RecommendedElasticPool(ProxyResource): + """Represents a recommended elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_edition: The edition of the recommended elastic pool. The + ElasticPoolEdition enumeration contains all the valid editions. Possible + values include: 'Basic', 'Standard', 'Premium', 'GeneralPurpose', + 'BusinessCritical' + :vartype database_edition: str or + ~azure.mgmt.sql.models.ElasticPoolEdition + :param dtu: The DTU for the recommended elastic pool. + :type dtu: float + :param database_dtu_min: The minimum DTU for the database. + :type database_dtu_min: float + :param database_dtu_max: The maximum DTU for the database. + :type database_dtu_max: float + :param storage_mb: Gets storage size in megabytes. + :type storage_mb: float + :ivar observation_period_start: The observation period start (ISO8601 + format). + :vartype observation_period_start: datetime + :ivar observation_period_end: The observation period start (ISO8601 + format). + :vartype observation_period_end: datetime + :ivar max_observed_dtu: Gets maximum observed DTU. + :vartype max_observed_dtu: float + :ivar max_observed_storage_mb: Gets maximum observed storage in megabytes. + :vartype max_observed_storage_mb: float + :ivar databases: The list of databases in this pool. Expanded property + :vartype databases: list[~azure.mgmt.sql.models.TrackedResource] + :ivar metrics: The list of databases housed in the server. Expanded + property + :vartype metrics: + list[~azure.mgmt.sql.models.RecommendedElasticPoolMetric] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_edition': {'readonly': True}, + 'observation_period_start': {'readonly': True}, + 'observation_period_end': {'readonly': True}, + 'max_observed_dtu': {'readonly': True}, + 'max_observed_storage_mb': {'readonly': True}, + 'databases': {'readonly': True}, + 'metrics': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'dtu': {'key': 'properties.dtu', 'type': 'float'}, + 'database_dtu_min': {'key': 'properties.databaseDtuMin', 'type': 'float'}, + 'database_dtu_max': {'key': 'properties.databaseDtuMax', 'type': 'float'}, + 'storage_mb': {'key': 'properties.storageMB', 'type': 'float'}, + 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, + 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, + 'max_observed_dtu': {'key': 'properties.maxObservedDtu', 'type': 'float'}, + 'max_observed_storage_mb': {'key': 'properties.maxObservedStorageMB', 'type': 'float'}, + 'databases': {'key': 'properties.databases', 'type': '[TrackedResource]'}, + 'metrics': {'key': 'properties.metrics', 'type': '[RecommendedElasticPoolMetric]'}, + } + + def __init__(self, **kwargs): + super(RecommendedElasticPool, self).__init__(**kwargs) + self.database_edition = None + self.dtu = kwargs.get('dtu', None) + self.database_dtu_min = kwargs.get('database_dtu_min', None) + self.database_dtu_max = kwargs.get('database_dtu_max', None) + self.storage_mb = kwargs.get('storage_mb', None) + self.observation_period_start = None + self.observation_period_end = None + self.max_observed_dtu = None + self.max_observed_storage_mb = None + self.databases = None + self.metrics = None + + +class RecommendedElasticPoolMetric(Model): + """Represents recommended elastic pool metric. + + :param date_time_property: The time of metric (ISO8601 format). + :type date_time_property: datetime + :param dtu: Gets or sets the DTUs (Database Transaction Units). See + https://azure.microsoft.com/documentation/articles/sql-database-what-is-a-dtu/ + :type dtu: float + :param size_gb: Gets or sets size in gigabytes. + :type size_gb: float + """ + + _attribute_map = { + 'date_time_property': {'key': 'dateTime', 'type': 'iso-8601'}, + 'dtu': {'key': 'dtu', 'type': 'float'}, + 'size_gb': {'key': 'sizeGB', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(RecommendedElasticPoolMetric, self).__init__(**kwargs) + self.date_time_property = kwargs.get('date_time_property', None) + self.dtu = kwargs.get('dtu', None) + self.size_gb = kwargs.get('size_gb', None) + + +class RecommendedIndex(ProxyResource): + """Represents a database recommended index. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar action: The proposed index action. You can create a missing index, + drop an unused index, or rebuild an existing index to improve its + performance. Possible values include: 'Create', 'Drop', 'Rebuild' + :vartype action: str or ~azure.mgmt.sql.models.RecommendedIndexAction + :ivar state: The current recommendation state. Possible values include: + 'Active', 'Pending', 'Executing', 'Verifying', 'Pending Revert', + 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success' + :vartype state: str or ~azure.mgmt.sql.models.RecommendedIndexState + :ivar created: The UTC datetime showing when this resource was created + (ISO8601 format). + :vartype created: datetime + :ivar last_modified: The UTC datetime of when was this resource last + changed (ISO8601 format). + :vartype last_modified: datetime + :ivar index_type: The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, + CLUSTERED COLUMNSTORE). Possible values include: 'CLUSTERED', + 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED COLUMNSTORE' + :vartype index_type: str or ~azure.mgmt.sql.models.RecommendedIndexType + :ivar schema: The schema where table to build index over resides + :vartype schema: str + :ivar table: The table on which to build index. + :vartype table: str + :ivar columns: Columns over which to build index + :vartype columns: list[str] + :ivar included_columns: The list of column names to be included in the + index + :vartype included_columns: list[str] + :ivar index_script: The full build index script + :vartype index_script: str + :ivar estimated_impact: The estimated impact of doing recommended index + action. + :vartype estimated_impact: list[~azure.mgmt.sql.models.OperationImpact] + :ivar reported_impact: The values reported after index action is complete. + :vartype reported_impact: list[~azure.mgmt.sql.models.OperationImpact] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'action': {'readonly': True}, + 'state': {'readonly': True}, + 'created': {'readonly': True}, + 'last_modified': {'readonly': True}, + 'index_type': {'readonly': True}, + 'schema': {'readonly': True}, + 'table': {'readonly': True}, + 'columns': {'readonly': True}, + 'included_columns': {'readonly': True}, + 'index_script': {'readonly': True}, + 'estimated_impact': {'readonly': True}, + 'reported_impact': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'action': {'key': 'properties.action', 'type': 'RecommendedIndexAction'}, + 'state': {'key': 'properties.state', 'type': 'RecommendedIndexState'}, + 'created': {'key': 'properties.created', 'type': 'iso-8601'}, + 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, + 'index_type': {'key': 'properties.indexType', 'type': 'RecommendedIndexType'}, + 'schema': {'key': 'properties.schema', 'type': 'str'}, + 'table': {'key': 'properties.table', 'type': 'str'}, + 'columns': {'key': 'properties.columns', 'type': '[str]'}, + 'included_columns': {'key': 'properties.includedColumns', 'type': '[str]'}, + 'index_script': {'key': 'properties.indexScript', 'type': 'str'}, + 'estimated_impact': {'key': 'properties.estimatedImpact', 'type': '[OperationImpact]'}, + 'reported_impact': {'key': 'properties.reportedImpact', 'type': '[OperationImpact]'}, + } + + def __init__(self, **kwargs): + super(RecommendedIndex, self).__init__(**kwargs) + self.action = None + self.state = None + self.created = None + self.last_modified = None + self.index_type = None + self.schema = None + self.table = None + self.columns = None + self.included_columns = None + self.index_script = None + self.estimated_impact = None + self.reported_impact = None + + +class RecoverableDatabase(ProxyResource): + """A recoverable database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar edition: The edition of the database + :vartype edition: str + :ivar service_level_objective: The service level objective name of the + database + :vartype service_level_objective: str + :ivar elastic_pool_name: The elastic pool name of the database + :vartype elastic_pool_name: str + :ivar last_available_backup_date: The last available backup date of the + database (ISO8601 format) + :vartype last_available_backup_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'edition': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'last_available_backup_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(RecoverableDatabase, self).__init__(**kwargs) + self.edition = None + self.service_level_objective = None + self.elastic_pool_name = None + self.last_available_backup_date = None + + +class RecoverableManagedDatabase(ProxyResource): + """A recoverable managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar last_available_backup_date: The last available backup date. + :vartype last_available_backup_date: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_available_backup_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RecoverableManagedDatabase, self).__init__(**kwargs) + self.last_available_backup_date = None + + +class ReplicationLink(ProxyResource): + """Represents a database replication link. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Location of the server that contains this firewall rule. + :vartype location: str + :ivar is_termination_allowed: Legacy value indicating whether termination + is allowed. Currently always returns true. + :vartype is_termination_allowed: bool + :ivar replication_mode: Replication mode of this replication link. + :vartype replication_mode: str + :ivar partner_server: The name of the server hosting the partner database. + :vartype partner_server: str + :ivar partner_database: The name of the partner database. + :vartype partner_database: str + :ivar partner_location: The Azure Region of the partner database. + :vartype partner_location: str + :ivar role: The role of the database in the replication link. Possible + values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', + 'Copy' + :vartype role: str or ~azure.mgmt.sql.models.ReplicationRole + :ivar partner_role: The role of the partner database in the replication + link. Possible values include: 'Primary', 'Secondary', + 'NonReadableSecondary', 'Source', 'Copy' + :vartype partner_role: str or ~azure.mgmt.sql.models.ReplicationRole + :ivar start_time: The start time for the replication link. + :vartype start_time: datetime + :ivar percent_complete: The percentage of seeding complete for the + replication link. + :vartype percent_complete: int + :ivar replication_state: The replication state for the replication link. + Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP', 'SUSPENDED' + :vartype replication_state: str or ~azure.mgmt.sql.models.ReplicationState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'is_termination_allowed': {'readonly': True}, + 'replication_mode': {'readonly': True}, + 'partner_server': {'readonly': True}, + 'partner_database': {'readonly': True}, + 'partner_location': {'readonly': True}, + 'role': {'readonly': True}, + 'partner_role': {'readonly': True}, + 'start_time': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'replication_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'is_termination_allowed': {'key': 'properties.isTerminationAllowed', 'type': 'bool'}, + 'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'}, + 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, + 'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'}, + 'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'}, + 'role': {'key': 'properties.role', 'type': 'ReplicationRole'}, + 'partner_role': {'key': 'properties.partnerRole', 'type': 'ReplicationRole'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ReplicationLink, self).__init__(**kwargs) + self.location = None + self.is_termination_allowed = None + self.replication_mode = None + self.partner_server = None + self.partner_database = None + self.partner_location = None + self.role = None + self.partner_role = None + self.start_time = None + self.percent_complete = None + self.replication_state = None + + +class ResourceIdentity(Model): + """Azure Active Directory identity configuration for a resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The Azure Active Directory principal id. + :vartype principal_id: str + :param type: The identity type. Set this to 'SystemAssigned' in order to + automatically create and assign an Azure Active Directory principal for + the resource. Possible values include: 'SystemAssigned' + :type type: str or ~azure.mgmt.sql.models.IdentityType + :ivar tenant_id: The Azure Active Directory tenant id. + :vartype tenant_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.type = kwargs.get('type', None) + self.tenant_id = None + + +class ResourceMoveDefinition(Model): + """Contains the information necessary to perform a resource move (rename). + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The target ID for the resource + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceMoveDefinition, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class RestorableDroppedDatabase(ProxyResource): + """A restorable dropped database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: The geo-location where the resource lives + :vartype location: str + :ivar database_name: The name of the database + :vartype database_name: str + :ivar edition: The edition of the database + :vartype edition: str + :ivar max_size_bytes: The max size in bytes of the database + :vartype max_size_bytes: str + :ivar service_level_objective: The service level objective name of the + database + :vartype service_level_objective: str + :ivar elastic_pool_name: The elastic pool name of the database + :vartype elastic_pool_name: str + :ivar creation_date: The creation date of the database (ISO8601 format) + :vartype creation_date: datetime + :ivar deletion_date: The deletion date of the database (ISO8601 format) + :vartype deletion_date: datetime + :ivar earliest_restore_date: The earliest restore date of the database + (ISO8601 format) + :vartype earliest_restore_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'database_name': {'readonly': True}, + 'edition': {'readonly': True}, + 'max_size_bytes': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(RestorableDroppedDatabase, self).__init__(**kwargs) + self.location = None + self.database_name = None + self.edition = None + self.max_size_bytes = None + self.service_level_objective = None + self.elastic_pool_name = None + self.creation_date = None + self.deletion_date = None + self.earliest_restore_date = None + + +class RestorableDroppedManagedDatabase(TrackedResource): + """A restorable dropped managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar database_name: The name of the database. + :vartype database_name: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar deletion_date: The deletion date of the database (ISO8601 format). + :vartype deletion_date: datetime + :ivar earliest_restore_date: The earliest restore date of the database + (ISO8601 format). + :vartype earliest_restore_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'database_name': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(RestorableDroppedManagedDatabase, self).__init__(**kwargs) + self.database_name = None + self.creation_date = None + self.deletion_date = None + self.earliest_restore_date = None + + +class RestorePoint(ProxyResource): + """Database restore points. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar restore_point_type: The type of restore point. Possible values + include: 'CONTINUOUS', 'DISCRETE' + :vartype restore_point_type: str or + ~azure.mgmt.sql.models.RestorePointType + :ivar earliest_restore_date: The earliest time to which this database can + be restored + :vartype earliest_restore_date: datetime + :ivar restore_point_creation_date: The time the backup was taken + :vartype restore_point_creation_date: datetime + :ivar restore_point_label: The label of restore point for backup request + by user + :vartype restore_point_label: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'restore_point_type': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'restore_point_creation_date': {'readonly': True}, + 'restore_point_label': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'restore_point_type': {'key': 'properties.restorePointType', 'type': 'RestorePointType'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, + 'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RestorePoint, self).__init__(**kwargs) + self.location = None + self.restore_point_type = None + self.earliest_restore_date = None + self.restore_point_creation_date = None + self.restore_point_label = None + + +class SensitivityLabel(ProxyResource): + """A sensitivity label. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param label_name: The label name. + :type label_name: str + :param label_id: The label ID. + :type label_id: str + :param information_type: The information type. + :type information_type: str + :param information_type_id: The information type ID. + :type information_type_id: str + :ivar is_disabled: Is sensitivity recommendation disabled. Applicable for + recommended sensitivity label only. Specifies whether the sensitivity + recommendation on this column is disabled (dismissed) or not. + :vartype is_disabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'is_disabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'label_name': {'key': 'properties.labelName', 'type': 'str'}, + 'label_id': {'key': 'properties.labelId', 'type': 'str'}, + 'information_type': {'key': 'properties.informationType', 'type': 'str'}, + 'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'}, + 'is_disabled': {'key': 'properties.isDisabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(SensitivityLabel, self).__init__(**kwargs) + self.label_name = kwargs.get('label_name', None) + self.label_id = kwargs.get('label_id', None) + self.information_type = kwargs.get('information_type', None) + self.information_type_id = kwargs.get('information_type_id', None) + self.is_disabled = None + + +class Server(TrackedResource): + """An Azure SQL Database server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param identity: The Azure Active Directory identity of the server. + :type identity: ~azure.mgmt.sql.models.ResourceIdentity + :ivar kind: Kind of sql server. This is metadata used for the Azure portal + experience. + :vartype kind: str + :param administrator_login: Administrator username for the server. Once + created it cannot be changed. + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for server creation). + :type administrator_login_password: str + :param version: The version of the server. + :type version: str + :ivar state: The state of the server. + :vartype state: str + :ivar fully_qualified_domain_name: The fully qualified domain name of the + server. + :vartype fully_qualified_domain_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'state': {'readonly': True}, + 'fully_qualified_domain_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Server, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.kind = None + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.version = kwargs.get('version', None) + self.state = None + self.fully_qualified_domain_name = None + + +class ServerAutomaticTuning(ProxyResource): + """Server-level Automatic Tuning. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param desired_state: Automatic tuning desired state. Possible values + include: 'Custom', 'Auto', 'Unspecified' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningServerMode + :ivar actual_state: Automatic tuning actual state. Possible values + include: 'Custom', 'Auto', 'Unspecified' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningServerMode + :param options: Automatic tuning options definition. + :type options: dict[str, + ~azure.mgmt.sql.models.AutomaticTuningServerOptions] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'actual_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningServerMode'}, + 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningServerMode'}, + 'options': {'key': 'properties.options', 'type': '{AutomaticTuningServerOptions}'}, + } + + def __init__(self, **kwargs): + super(ServerAutomaticTuning, self).__init__(**kwargs) + self.desired_state = kwargs.get('desired_state', None) + self.actual_state = None + self.options = kwargs.get('options', None) + + +class ServerAzureADAdministrator(ProxyResource): + """An server Active Directory Administrator. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar administrator_type: Required. The type of administrator. Default + value: "ActiveDirectory" . + :vartype administrator_type: str + :param login: Required. The server administrator login value. + :type login: str + :param sid: Required. The server administrator Sid (Secure ID). + :type sid: str + :param tenant_id: Required. The server Active Directory Administrator + tenant id. + :type tenant_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'administrator_type': {'required': True, 'constant': True}, + 'login': {'required': True}, + 'sid': {'required': True}, + 'tenant_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, + 'login': {'key': 'properties.login', 'type': 'str'}, + 'sid': {'key': 'properties.sid', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + } + + administrator_type = "ActiveDirectory" + + def __init__(self, **kwargs): + super(ServerAzureADAdministrator, self).__init__(**kwargs) + self.login = kwargs.get('login', None) + self.sid = kwargs.get('sid', None) + self.tenant_id = kwargs.get('tenant_id', None) + + +class ServerBlobAuditingPolicy(ProxyResource): + """A server blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ServerBlobAuditingPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) + self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) + self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) + self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) + + +class ServerCommunicationLink(ProxyResource): + """Server communication link. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar state: The state. + :vartype state: str + :param partner_server: Required. The name of the partner server. + :type partner_server: str + :ivar location: Communication link location. + :vartype location: str + :ivar kind: Communication link kind. This property is used for Azure + Portal metadata. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'partner_server': {'required': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerCommunicationLink, self).__init__(**kwargs) + self.state = None + self.partner_server = kwargs.get('partner_server', None) + self.location = None + self.kind = None + + +class ServerConnectionPolicy(ProxyResource): + """A server secure connection policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Metadata used for the Azure portal experience. + :vartype kind: str + :ivar location: Resource location. + :vartype location: str + :param connection_type: Required. The server connection type. Possible + values include: 'Default', 'Proxy', 'Redirect' + :type connection_type: str or ~azure.mgmt.sql.models.ServerConnectionType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + 'connection_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'connection_type': {'key': 'properties.connectionType', 'type': 'ServerConnectionType'}, + } + + def __init__(self, **kwargs): + super(ServerConnectionPolicy, self).__init__(**kwargs) + self.kind = None + self.location = None + self.connection_type = kwargs.get('connection_type', None) + + +class ServerDnsAlias(ProxyResource): + """A server DNS alias. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar azure_dns_record: The fully qualified DNS record for alias + :vartype azure_dns_record: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'azure_dns_record': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'azure_dns_record': {'key': 'properties.azureDnsRecord', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerDnsAlias, self).__init__(**kwargs) + self.azure_dns_record = None + + +class ServerDnsAliasAcquisition(Model): + """A server DNS alias acquisition request. + + :param old_server_dns_alias_id: The id of the server alias that will be + acquired to point to this server instead. + :type old_server_dns_alias_id: str + """ + + _attribute_map = { + 'old_server_dns_alias_id': {'key': 'oldServerDnsAliasId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerDnsAliasAcquisition, self).__init__(**kwargs) + self.old_server_dns_alias_id = kwargs.get('old_server_dns_alias_id', None) + + +class ServerKey(ProxyResource): + """A server key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :type kind: str + :ivar location: Resource location. + :vartype location: str + :ivar subregion: Subregion of the server key. + :vartype subregion: str + :param server_key_type: Required. The server key type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :param uri: The URI of the server key. + :type uri: str + :param thumbprint: Thumbprint of the server key. + :type thumbprint: str + :param creation_date: The server key creation date. + :type creation_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'subregion': {'readonly': True}, + 'server_key_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'subregion': {'key': 'properties.subregion', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ServerKey, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + self.location = None + self.subregion = None + self.server_key_type = kwargs.get('server_key_type', None) + self.uri = kwargs.get('uri', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.creation_date = kwargs.get('creation_date', None) + + +class ServerSecurityAlertPolicy(ProxyResource): + """A server security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ServerSecurityAlertPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.disabled_alerts = kwargs.get('disabled_alerts', None) + self.email_addresses = kwargs.get('email_addresses', None) + self.email_account_admins = kwargs.get('email_account_admins', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.creation_time = None + + +class ServerUpdate(Model): + """An update request for an Azure SQL Database server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param administrator_login: Administrator username for the server. Once + created it cannot be changed. + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for server creation). + :type administrator_login_password: str + :param version: The version of the server. + :type version: str + :ivar state: The state of the server. + :vartype state: str + :ivar fully_qualified_domain_name: The fully qualified domain name of the + server. + :vartype fully_qualified_domain_name: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'state': {'readonly': True}, + 'fully_qualified_domain_name': {'readonly': True}, + } + + _attribute_map = { + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ServerUpdate, self).__init__(**kwargs) + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.version = kwargs.get('version', None) + self.state = None + self.fully_qualified_domain_name = None + self.tags = kwargs.get('tags', None) + + +class ServerUsage(Model): + """Represents server metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the server usage metric. + :vartype name: str + :ivar resource_name: The name of the resource. + :vartype resource_name: str + :ivar display_name: The metric display name. + :vartype display_name: str + :ivar current_value: The current value of the metric. + :vartype current_value: float + :ivar limit: The current limit of the metric. + :vartype limit: float + :ivar unit: The units of the metric. + :vartype unit: str + :ivar next_reset_time: The next reset time for the metric (ISO8601 + format). + :vartype next_reset_time: datetime + """ + + _validation = { + 'name': {'readonly': True}, + 'resource_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'next_reset_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ServerUsage, self).__init__(**kwargs) + self.name = None + self.resource_name = None + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + self.next_reset_time = None + + +class ServerVersionCapability(Model): + """The server capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The server version name. + :vartype name: str + :ivar supported_editions: The list of supported database editions. + :vartype supported_editions: + list[~azure.mgmt.sql.models.EditionCapability] + :ivar supported_elastic_pool_editions: The list of supported elastic pool + editions. + :vartype supported_elastic_pool_editions: + list[~azure.mgmt.sql.models.ElasticPoolEditionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_editions': {'readonly': True}, + 'supported_elastic_pool_editions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_editions': {'key': 'supportedEditions', 'type': '[EditionCapability]'}, + 'supported_elastic_pool_editions': {'key': 'supportedElasticPoolEditions', 'type': '[ElasticPoolEditionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerVersionCapability, self).__init__(**kwargs) + self.name = None + self.supported_editions = None + self.supported_elastic_pool_editions = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ServerVulnerabilityAssessment(ProxyResource): + """A server vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: Required. A blob storage container path to + hold the scan results (e.g. + https://myStorage.blob.core.windows.net/VaScans/). + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_container_path': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, **kwargs): + super(ServerVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = kwargs.get('storage_container_path', None) + self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.recurring_scans = kwargs.get('recurring_scans', None) + + +class ServiceObjective(ProxyResource): + """Represents a database service objective. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar service_objective_name: The name for the service objective. + :vartype service_objective_name: str + :ivar is_default: Gets whether the service level objective is the default + service objective. + :vartype is_default: bool + :ivar is_system: Gets whether the service level objective is a system + service objective. + :vartype is_system: bool + :ivar description: The description for the service level objective. + :vartype description: str + :ivar enabled: Gets whether the service level objective is enabled. + :vartype enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'service_objective_name': {'readonly': True}, + 'is_default': {'readonly': True}, + 'is_system': {'readonly': True}, + 'description': {'readonly': True}, + 'enabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'service_objective_name': {'key': 'properties.serviceObjectiveName', 'type': 'str'}, + 'is_default': {'key': 'properties.isDefault', 'type': 'bool'}, + 'is_system': {'key': 'properties.isSystem', 'type': 'bool'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ServiceObjective, self).__init__(**kwargs) + self.service_objective_name = None + self.is_default = None + self.is_system = None + self.description = None + self.enabled = None + + +class ServiceObjectiveCapability(Model): + """The service objectives capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique ID of the service objective. + :vartype id: str + :ivar name: The service objective name. + :vartype name: str + :ivar supported_max_sizes: The list of supported maximum database sizes. + :vartype supported_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar performance_level: The performance level. + :vartype performance_level: + ~azure.mgmt.sql.models.PerformanceLevelCapability + :ivar sku: The sku. + :vartype sku: ~azure.mgmt.sql.models.Sku + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar included_max_size: The included (free) max size. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'supported_max_sizes': {'readonly': True}, + 'performance_level': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceObjectiveCapability, self).__init__(**kwargs) + self.id = None + self.name = None + self.supported_max_sizes = None + self.performance_level = None + self.sku = None + self.supported_license_types = None + self.included_max_size = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ServiceTierAdvisor(ProxyResource): + """Represents a Service Tier Advisor. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar observation_period_start: The observation period start (ISO8601 + format). + :vartype observation_period_start: datetime + :ivar observation_period_end: The observation period start (ISO8601 + format). + :vartype observation_period_end: datetime + :ivar active_time_ratio: The activeTimeRatio for service tier advisor. + :vartype active_time_ratio: float + :ivar min_dtu: Gets or sets minDtu for service tier advisor. + :vartype min_dtu: float + :ivar avg_dtu: Gets or sets avgDtu for service tier advisor. + :vartype avg_dtu: float + :ivar max_dtu: Gets or sets maxDtu for service tier advisor. + :vartype max_dtu: float + :ivar max_size_in_gb: Gets or sets maxSizeInGB for service tier advisor. + :vartype max_size_in_gb: float + :ivar service_level_objective_usage_metrics: Gets or sets + serviceLevelObjectiveUsageMetrics for the service tier advisor. + :vartype service_level_objective_usage_metrics: + list[~azure.mgmt.sql.models.SloUsageMetric] + :ivar current_service_level_objective: Gets or sets + currentServiceLevelObjective for service tier advisor. + :vartype current_service_level_objective: str + :ivar current_service_level_objective_id: Gets or sets + currentServiceLevelObjectiveId for service tier advisor. + :vartype current_service_level_objective_id: str + :ivar usage_based_recommendation_service_level_objective: Gets or sets + usageBasedRecommendationServiceLevelObjective for service tier advisor. + :vartype usage_based_recommendation_service_level_objective: str + :ivar usage_based_recommendation_service_level_objective_id: Gets or sets + usageBasedRecommendationServiceLevelObjectiveId for service tier advisor. + :vartype usage_based_recommendation_service_level_objective_id: str + :ivar database_size_based_recommendation_service_level_objective: Gets or + sets databaseSizeBasedRecommendationServiceLevelObjective for service tier + advisor. + :vartype database_size_based_recommendation_service_level_objective: str + :ivar database_size_based_recommendation_service_level_objective_id: Gets + or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service + tier advisor. + :vartype database_size_based_recommendation_service_level_objective_id: + str + :ivar disaster_plan_based_recommendation_service_level_objective: Gets or + sets disasterPlanBasedRecommendationServiceLevelObjective for service tier + advisor. + :vartype disaster_plan_based_recommendation_service_level_objective: str + :ivar disaster_plan_based_recommendation_service_level_objective_id: Gets + or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service + tier advisor. + :vartype disaster_plan_based_recommendation_service_level_objective_id: + str + :ivar overall_recommendation_service_level_objective: Gets or sets + overallRecommendationServiceLevelObjective for service tier advisor. + :vartype overall_recommendation_service_level_objective: str + :ivar overall_recommendation_service_level_objective_id: Gets or sets + overallRecommendationServiceLevelObjectiveId for service tier advisor. + :vartype overall_recommendation_service_level_objective_id: str + :ivar confidence: Gets or sets confidence for service tier advisor. + :vartype confidence: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'observation_period_start': {'readonly': True}, + 'observation_period_end': {'readonly': True}, + 'active_time_ratio': {'readonly': True}, + 'min_dtu': {'readonly': True}, + 'avg_dtu': {'readonly': True}, + 'max_dtu': {'readonly': True}, + 'max_size_in_gb': {'readonly': True}, + 'service_level_objective_usage_metrics': {'readonly': True}, + 'current_service_level_objective': {'readonly': True}, + 'current_service_level_objective_id': {'readonly': True}, + 'usage_based_recommendation_service_level_objective': {'readonly': True}, + 'usage_based_recommendation_service_level_objective_id': {'readonly': True}, + 'database_size_based_recommendation_service_level_objective': {'readonly': True}, + 'database_size_based_recommendation_service_level_objective_id': {'readonly': True}, + 'disaster_plan_based_recommendation_service_level_objective': {'readonly': True}, + 'disaster_plan_based_recommendation_service_level_objective_id': {'readonly': True}, + 'overall_recommendation_service_level_objective': {'readonly': True}, + 'overall_recommendation_service_level_objective_id': {'readonly': True}, + 'confidence': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, + 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, + 'active_time_ratio': {'key': 'properties.activeTimeRatio', 'type': 'float'}, + 'min_dtu': {'key': 'properties.minDtu', 'type': 'float'}, + 'avg_dtu': {'key': 'properties.avgDtu', 'type': 'float'}, + 'max_dtu': {'key': 'properties.maxDtu', 'type': 'float'}, + 'max_size_in_gb': {'key': 'properties.maxSizeInGB', 'type': 'float'}, + 'service_level_objective_usage_metrics': {'key': 'properties.serviceLevelObjectiveUsageMetrics', 'type': '[SloUsageMetric]'}, + 'current_service_level_objective': {'key': 'properties.currentServiceLevelObjective', 'type': 'str'}, + 'current_service_level_objective_id': {'key': 'properties.currentServiceLevelObjectiveId', 'type': 'str'}, + 'usage_based_recommendation_service_level_objective': {'key': 'properties.usageBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'usage_based_recommendation_service_level_objective_id': {'key': 'properties.usageBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'database_size_based_recommendation_service_level_objective': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'database_size_based_recommendation_service_level_objective_id': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'disaster_plan_based_recommendation_service_level_objective': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'disaster_plan_based_recommendation_service_level_objective_id': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'overall_recommendation_service_level_objective': {'key': 'properties.overallRecommendationServiceLevelObjective', 'type': 'str'}, + 'overall_recommendation_service_level_objective_id': {'key': 'properties.overallRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'confidence': {'key': 'properties.confidence', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ServiceTierAdvisor, self).__init__(**kwargs) + self.observation_period_start = None + self.observation_period_end = None + self.active_time_ratio = None + self.min_dtu = None + self.avg_dtu = None + self.max_dtu = None + self.max_size_in_gb = None + self.service_level_objective_usage_metrics = None + self.current_service_level_objective = None + self.current_service_level_objective_id = None + self.usage_based_recommendation_service_level_objective = None + self.usage_based_recommendation_service_level_objective_id = None + self.database_size_based_recommendation_service_level_objective = None + self.database_size_based_recommendation_service_level_objective_id = None + self.disaster_plan_based_recommendation_service_level_objective = None + self.disaster_plan_based_recommendation_service_level_objective_id = None + self.overall_recommendation_service_level_objective = None + self.overall_recommendation_service_level_objective_id = None + self.confidence = None + + +class Sku(Model): + """The resource model definition representing SKU. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Ex - P3. It is typically a + letter+number code + :type name: str + :param tier: This field is required to be implemented by the Resource + Provider if the service has more than one tier, but is not required on a + PUT. + :type tier: str + :param size: The SKU size. When the name field is the combination of tier + and some other value, this would be the standalone code. + :type size: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :param capacity: If the SKU supports scale out/in then the capacity + integer should be included. If scale out/in is not possible for the + resource this may be omitted. + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.size = kwargs.get('size', None) + self.family = kwargs.get('family', None) + self.capacity = kwargs.get('capacity', None) + + +class SloUsageMetric(Model): + """A Slo Usage Metric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar service_level_objective: The serviceLevelObjective for SLO usage + metric. Possible values include: 'System', 'System0', 'System1', + 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', + 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', + 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', + 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', + 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', + 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', + 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', + 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' + :vartype service_level_objective: str or + ~azure.mgmt.sql.models.ServiceObjectiveName + :ivar service_level_objective_id: The serviceLevelObjectiveId for SLO + usage metric. + :vartype service_level_objective_id: str + :ivar in_range_time_ratio: Gets or sets inRangeTimeRatio for SLO usage + metric. + :vartype in_range_time_ratio: float + """ + + _validation = { + 'service_level_objective': {'readonly': True}, + 'service_level_objective_id': {'readonly': True}, + 'in_range_time_ratio': {'readonly': True}, + } + + _attribute_map = { + 'service_level_objective': {'key': 'serviceLevelObjective', 'type': 'str'}, + 'service_level_objective_id': {'key': 'serviceLevelObjectiveId', 'type': 'str'}, + 'in_range_time_ratio': {'key': 'inRangeTimeRatio', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(SloUsageMetric, self).__init__(**kwargs) + self.service_level_objective = None + self.service_level_objective_id = None + self.in_range_time_ratio = None + + +class SubscriptionUsage(ProxyResource): + """Usage Metric of a Subscription in a Location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar display_name: User-readable name of the metric. + :vartype display_name: str + :ivar current_value: Current value of the metric. + :vartype current_value: float + :ivar limit: Boundary value of the metric. + :vartype limit: float + :ivar unit: Unit of the metric. + :vartype unit: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'current_value': {'key': 'properties.currentValue', 'type': 'float'}, + 'limit': {'key': 'properties.limit', 'type': 'float'}, + 'unit': {'key': 'properties.unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubscriptionUsage, self).__init__(**kwargs) + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + + +class SyncAgent(ProxyResource): + """An Azure SQL Database sync agent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar sync_agent_name: Name of the sync agent. + :vartype sync_agent_name: str + :param sync_database_id: ARM resource id of the sync database in the sync + agent. + :type sync_database_id: str + :ivar last_alive_time: Last alive time of the sync agent. + :vartype last_alive_time: datetime + :ivar state: State of the sync agent. Possible values include: 'Online', + 'Offline', 'NeverConnected' + :vartype state: str or ~azure.mgmt.sql.models.SyncAgentState + :ivar is_up_to_date: If the sync agent version is up to date. + :vartype is_up_to_date: bool + :ivar expiry_time: Expiration time of the sync agent version. + :vartype expiry_time: datetime + :ivar version: Version of the sync agent. + :vartype version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sync_agent_name': {'readonly': True}, + 'last_alive_time': {'readonly': True}, + 'state': {'readonly': True}, + 'is_up_to_date': {'readonly': True}, + 'expiry_time': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sync_agent_name': {'key': 'properties.name', 'type': 'str'}, + 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, + 'last_alive_time': {'key': 'properties.lastAliveTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'is_up_to_date': {'key': 'properties.isUpToDate', 'type': 'bool'}, + 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncAgent, self).__init__(**kwargs) + self.sync_agent_name = None + self.sync_database_id = kwargs.get('sync_database_id', None) + self.last_alive_time = None + self.state = None + self.is_up_to_date = None + self.expiry_time = None + self.version = None + + +class SyncAgentKeyProperties(Model): + """Properties of an Azure SQL Database sync agent key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar sync_agent_key: Key of sync agent. + :vartype sync_agent_key: str + """ + + _validation = { + 'sync_agent_key': {'readonly': True}, + } + + _attribute_map = { + 'sync_agent_key': {'key': 'syncAgentKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncAgentKeyProperties, self).__init__(**kwargs) + self.sync_agent_key = None + + +class SyncAgentLinkedDatabase(ProxyResource): + """An Azure SQL Database sync agent linked database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_type: Type of the sync agent linked database. Possible + values include: 'AzureSqlDatabase', 'SqlServerDatabase' + :vartype database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType + :ivar database_id: Id of the sync agent linked database. + :vartype database_id: str + :ivar description: Description of the sync agent linked database. + :vartype description: str + :ivar server_name: Server name of the sync agent linked database. + :vartype server_name: str + :ivar database_name: Database name of the sync agent linked database. + :vartype database_name: str + :ivar user_name: User name of the sync agent linked database. + :vartype user_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_type': {'readonly': True}, + 'database_id': {'readonly': True}, + 'description': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncAgentLinkedDatabase, self).__init__(**kwargs) + self.database_type = None + self.database_id = None + self.description = None + self.server_name = None + self.database_name = None + self.user_name = None + + +class SyncDatabaseIdProperties(Model): + """Properties of the sync database id. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: ARM resource id of sync database. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncDatabaseIdProperties, self).__init__(**kwargs) + self.id = None + + +class SyncFullSchemaProperties(Model): + """Properties of the database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar tables: List of tables in the database full schema. + :vartype tables: list[~azure.mgmt.sql.models.SyncFullSchemaTable] + :ivar last_update_time: Last update time of the database schema. + :vartype last_update_time: datetime + """ + + _validation = { + 'tables': {'readonly': True}, + 'last_update_time': {'readonly': True}, + } + + _attribute_map = { + 'tables': {'key': 'tables', 'type': '[SyncFullSchemaTable]'}, + 'last_update_time': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(SyncFullSchemaProperties, self).__init__(**kwargs) + self.tables = None + self.last_update_time = None + + +class SyncFullSchemaTable(Model): + """Properties of the table in the database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar columns: List of columns in the table of database full schema. + :vartype columns: list[~azure.mgmt.sql.models.SyncFullSchemaTableColumn] + :ivar error_id: Error id of the table. + :vartype error_id: str + :ivar has_error: If there is error in the table. + :vartype has_error: bool + :ivar name: Name of the table. + :vartype name: str + :ivar quoted_name: Quoted name of the table. + :vartype quoted_name: str + """ + + _validation = { + 'columns': {'readonly': True}, + 'error_id': {'readonly': True}, + 'has_error': {'readonly': True}, + 'name': {'readonly': True}, + 'quoted_name': {'readonly': True}, + } + + _attribute_map = { + 'columns': {'key': 'columns', 'type': '[SyncFullSchemaTableColumn]'}, + 'error_id': {'key': 'errorId', 'type': 'str'}, + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncFullSchemaTable, self).__init__(**kwargs) + self.columns = None + self.error_id = None + self.has_error = None + self.name = None + self.quoted_name = None + + +class SyncFullSchemaTableColumn(Model): + """Properties of the column in the table of database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar data_size: Data size of the column. + :vartype data_size: str + :ivar data_type: Data type of the column. + :vartype data_type: str + :ivar error_id: Error id of the column. + :vartype error_id: str + :ivar has_error: If there is error in the table. + :vartype has_error: bool + :ivar is_primary_key: If it is the primary key of the table. + :vartype is_primary_key: bool + :ivar name: Name of the column. + :vartype name: str + :ivar quoted_name: Quoted name of the column. + :vartype quoted_name: str + """ + + _validation = { + 'data_size': {'readonly': True}, + 'data_type': {'readonly': True}, + 'error_id': {'readonly': True}, + 'has_error': {'readonly': True}, + 'is_primary_key': {'readonly': True}, + 'name': {'readonly': True}, + 'quoted_name': {'readonly': True}, + } + + _attribute_map = { + 'data_size': {'key': 'dataSize', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + 'error_id': {'key': 'errorId', 'type': 'str'}, + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'is_primary_key': {'key': 'isPrimaryKey', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncFullSchemaTableColumn, self).__init__(**kwargs) + self.data_size = None + self.data_type = None + self.error_id = None + self.has_error = None + self.is_primary_key = None + self.name = None + self.quoted_name = None + + +class SyncGroup(ProxyResource): + """An Azure SQL Database sync group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param interval: Sync interval of the sync group. + :type interval: int + :ivar last_sync_time: Last sync time of the sync group. + :vartype last_sync_time: datetime + :param conflict_resolution_policy: Conflict resolution policy of the sync + group. Possible values include: 'HubWin', 'MemberWin' + :type conflict_resolution_policy: str or + ~azure.mgmt.sql.models.SyncConflictResolutionPolicy + :param sync_database_id: ARM resource id of the sync database in the sync + group. + :type sync_database_id: str + :param hub_database_user_name: User name for the sync group hub database + credential. + :type hub_database_user_name: str + :param hub_database_password: Password for the sync group hub database + credential. + :type hub_database_password: str + :ivar sync_state: Sync state of the sync group. Possible values include: + 'NotReady', 'Error', 'Warning', 'Progressing', 'Good' + :vartype sync_state: str or ~azure.mgmt.sql.models.SyncGroupState + :param schema: Sync schema of the sync group. + :type schema: ~azure.mgmt.sql.models.SyncGroupSchema + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_sync_time': {'readonly': True}, + 'sync_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'interval': {'key': 'properties.interval', 'type': 'int'}, + 'last_sync_time': {'key': 'properties.lastSyncTime', 'type': 'iso-8601'}, + 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'str'}, + 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, + 'hub_database_user_name': {'key': 'properties.hubDatabaseUserName', 'type': 'str'}, + 'hub_database_password': {'key': 'properties.hubDatabasePassword', 'type': 'str'}, + 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, + 'schema': {'key': 'properties.schema', 'type': 'SyncGroupSchema'}, + } + + def __init__(self, **kwargs): + super(SyncGroup, self).__init__(**kwargs) + self.interval = kwargs.get('interval', None) + self.last_sync_time = None + self.conflict_resolution_policy = kwargs.get('conflict_resolution_policy', None) + self.sync_database_id = kwargs.get('sync_database_id', None) + self.hub_database_user_name = kwargs.get('hub_database_user_name', None) + self.hub_database_password = kwargs.get('hub_database_password', None) + self.sync_state = None + self.schema = kwargs.get('schema', None) + + +class SyncGroupLogProperties(Model): + """Properties of an Azure SQL Database sync group log. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar timestamp: Timestamp of the sync group log. + :vartype timestamp: datetime + :ivar type: Type of the sync group log. Possible values include: 'All', + 'Error', 'Warning', 'Success' + :vartype type: str or ~azure.mgmt.sql.models.SyncGroupLogType + :ivar source: Source of the sync group log. + :vartype source: str + :ivar details: Details of the sync group log. + :vartype details: str + :ivar tracing_id: TracingId of the sync group log. + :vartype tracing_id: str + :ivar operation_status: OperationStatus of the sync group log. + :vartype operation_status: str + """ + + _validation = { + 'timestamp': {'readonly': True}, + 'type': {'readonly': True}, + 'source': {'readonly': True}, + 'details': {'readonly': True}, + 'tracing_id': {'readonly': True}, + 'operation_status': {'readonly': True}, + } + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, + 'tracing_id': {'key': 'tracingId', 'type': 'str'}, + 'operation_status': {'key': 'operationStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncGroupLogProperties, self).__init__(**kwargs) + self.timestamp = None + self.type = None + self.source = None + self.details = None + self.tracing_id = None + self.operation_status = None + + +class SyncGroupSchema(Model): + """Properties of sync group schema. + + :param tables: List of tables in sync group schema. + :type tables: list[~azure.mgmt.sql.models.SyncGroupSchemaTable] + :param master_sync_member_name: Name of master sync member where the + schema is from. + :type master_sync_member_name: str + """ + + _attribute_map = { + 'tables': {'key': 'tables', 'type': '[SyncGroupSchemaTable]'}, + 'master_sync_member_name': {'key': 'masterSyncMemberName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncGroupSchema, self).__init__(**kwargs) + self.tables = kwargs.get('tables', None) + self.master_sync_member_name = kwargs.get('master_sync_member_name', None) + + +class SyncGroupSchemaTable(Model): + """Properties of table in sync group schema. + + :param columns: List of columns in sync group schema. + :type columns: list[~azure.mgmt.sql.models.SyncGroupSchemaTableColumn] + :param quoted_name: Quoted name of sync group schema table. + :type quoted_name: str + """ + + _attribute_map = { + 'columns': {'key': 'columns', 'type': '[SyncGroupSchemaTableColumn]'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncGroupSchemaTable, self).__init__(**kwargs) + self.columns = kwargs.get('columns', None) + self.quoted_name = kwargs.get('quoted_name', None) + + +class SyncGroupSchemaTableColumn(Model): + """Properties of column in sync group table. + + :param quoted_name: Quoted name of sync group table column. + :type quoted_name: str + :param data_size: Data size of the column. + :type data_size: str + :param data_type: Data type of the column. + :type data_type: str + """ + + _attribute_map = { + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + 'data_size': {'key': 'dataSize', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncGroupSchemaTableColumn, self).__init__(**kwargs) + self.quoted_name = kwargs.get('quoted_name', None) + self.data_size = kwargs.get('data_size', None) + self.data_type = kwargs.get('data_type', None) + + +class SyncMember(ProxyResource): + """An Azure SQL Database sync member. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param database_type: Database type of the sync member. Possible values + include: 'AzureSqlDatabase', 'SqlServerDatabase' + :type database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType + :param sync_agent_id: ARM resource id of the sync agent in the sync + member. + :type sync_agent_id: str + :param sql_server_database_id: SQL Server database id of the sync member. + :type sql_server_database_id: str + :param server_name: Server name of the member database in the sync member + :type server_name: str + :param database_name: Database name of the member database in the sync + member. + :type database_name: str + :param user_name: User name of the member database in the sync member. + :type user_name: str + :param password: Password of the member database in the sync member. + :type password: str + :param sync_direction: Sync direction of the sync member. Possible values + include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember' + :type sync_direction: str or ~azure.mgmt.sql.models.SyncDirection + :ivar sync_state: Sync state of the sync member. Possible values include: + 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', + 'DisabledTombstoneCleanup', 'DisabledBackupRestore', + 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', + 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', + 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', + 'ReprovisionFailed', 'UnReprovisioned' + :vartype sync_state: str or ~azure.mgmt.sql.models.SyncMemberState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sync_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, + 'sync_agent_id': {'key': 'properties.syncAgentId', 'type': 'str'}, + 'sql_server_database_id': {'key': 'properties.sqlServerDatabaseId', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'sync_direction': {'key': 'properties.syncDirection', 'type': 'str'}, + 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncMember, self).__init__(**kwargs) + self.database_type = kwargs.get('database_type', None) + self.sync_agent_id = kwargs.get('sync_agent_id', None) + self.sql_server_database_id = kwargs.get('sql_server_database_id', None) + self.server_name = kwargs.get('server_name', None) + self.database_name = kwargs.get('database_name', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.sync_direction = kwargs.get('sync_direction', None) + self.sync_state = None + + +class TdeCertificate(ProxyResource): + """A TDE certificate that can be uploaded into a server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param private_blob: Required. The base64 encoded certificate private + blob. + :type private_blob: str + :param cert_password: The certificate password. + :type cert_password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'private_blob': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_blob': {'key': 'properties.privateBlob', 'type': 'str'}, + 'cert_password': {'key': 'properties.certPassword', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TdeCertificate, self).__init__(**kwargs) + self.private_blob = kwargs.get('private_blob', None) + self.cert_password = kwargs.get('cert_password', None) + + +class TransparentDataEncryption(ProxyResource): + """Represents a database transparent data encryption configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :param status: The status of the database transparent data encryption. + Possible values include: 'Enabled', 'Disabled' + :type status: str or + ~azure.mgmt.sql.models.TransparentDataEncryptionStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'TransparentDataEncryptionStatus'}, + } + + def __init__(self, **kwargs): + super(TransparentDataEncryption, self).__init__(**kwargs) + self.location = None + self.status = kwargs.get('status', None) + + +class TransparentDataEncryptionActivity(ProxyResource): + """Represents a database transparent data encryption Scan. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar status: The status of the database. Possible values include: + 'Encrypting', 'Decrypting' + :vartype status: str or + ~azure.mgmt.sql.models.TransparentDataEncryptionActivityStatus + :ivar percent_complete: The percent complete of the transparent data + encryption scan for a database. + :vartype percent_complete: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'status': {'readonly': True}, + 'percent_complete': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(TransparentDataEncryptionActivity, self).__init__(**kwargs) + self.location = None + self.status = None + self.percent_complete = None + + +class Usage(Model): + """ARM usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: ~azure.mgmt.sql.models.Name + :ivar type: Resource type. + :vartype type: str + :ivar unit: Usage unit. + :vartype unit: str + :ivar current_value: Usage current value. + :vartype current_value: int + :ivar limit: Usage limit. + :vartype limit: int + :ivar requested_limit: Usage requested limit. + :vartype requested_limit: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'unit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'requested_limit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'Name'}, + 'type': {'key': 'type', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'int'}, + 'requested_limit': {'key': 'requestedLimit', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(Usage, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.unit = None + self.current_value = None + self.limit = None + self.requested_limit = None + + +class VirtualCluster(TrackedResource): + """An Azure SQL virtual cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar subnet_id: Subnet resource ID for the virtual cluster. + :vartype subnet_id: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :ivar child_resources: List of resources in this virtual cluster. + :vartype child_resources: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'subnet_id': {'readonly': True}, + 'child_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'family': {'key': 'properties.family', 'type': 'str'}, + 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualCluster, self).__init__(**kwargs) + self.subnet_id = None + self.family = kwargs.get('family', None) + self.child_resources = None + + +class VirtualClusterUpdate(Model): + """An update request for an Azure SQL Database virtual cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar subnet_id: Subnet resource ID for the virtual cluster. + :vartype subnet_id: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :ivar child_resources: List of resources in this virtual cluster. + :vartype child_resources: list[str] + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'subnet_id': {'readonly': True}, + 'child_resources': {'readonly': True}, + } + + _attribute_map = { + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'family': {'key': 'properties.family', 'type': 'str'}, + 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(VirtualClusterUpdate, self).__init__(**kwargs) + self.subnet_id = None + self.family = kwargs.get('family', None) + self.child_resources = None + self.tags = kwargs.get('tags', None) + + +class VirtualNetworkRule(ProxyResource): + """A virtual network rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param virtual_network_subnet_id: Required. The ARM resource id of the + virtual network subnet. + :type virtual_network_subnet_id: str + :param ignore_missing_vnet_service_endpoint: Create firewall rule before + the virtual network has vnet service endpoint enabled. + :type ignore_missing_vnet_service_endpoint: bool + :ivar state: Virtual Network Rule State. Possible values include: + 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' + :vartype state: str or ~azure.mgmt.sql.models.VirtualNetworkRuleState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'virtual_network_subnet_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, + 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkRule, self).__init__(**kwargs) + self.virtual_network_subnet_id = kwargs.get('virtual_network_subnet_id', None) + self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) + self.state = None + + +class VulnerabilityAssessmentRecurringScansProperties(Model): + """Properties of a Vulnerability Assessment recurring scans. + + :param is_enabled: Recurring scans state. + :type is_enabled: bool + :param email_subscription_admins: Specifies that the schedule scan + notification will be is sent to the subscription administrators. Default + value: True . + :type email_subscription_admins: bool + :param emails: Specifies an array of e-mail addresses to which the scan + notification is sent. + :type emails: list[str] + """ + + _attribute_map = { + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'}, + 'emails': {'key': 'emails', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs) + self.is_enabled = kwargs.get('is_enabled', None) + self.email_subscription_admins = kwargs.get('email_subscription_admins', True) + self.emails = kwargs.get('emails', None) + + +class VulnerabilityAssessmentScanError(Model): + """Properties of a vulnerability assessment scan error. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VulnerabilityAssessmentScanError, self).__init__(**kwargs) + self.code = None + self.message = None + + +class VulnerabilityAssessmentScanRecord(ProxyResource): + """A vulnerability assessment scan record. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar scan_id: The scan ID. + :vartype scan_id: str + :ivar trigger_type: The scan trigger type. Possible values include: + 'OnDemand', 'Recurring' + :vartype trigger_type: str or + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanTriggerType + :ivar state: The scan status. Possible values include: 'Passed', 'Failed', + 'FailedToRun', 'InProgress' + :vartype state: str or + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanState + :ivar start_time: The scan start time (UTC). + :vartype start_time: datetime + :ivar end_time: The scan end time (UTC). + :vartype end_time: datetime + :ivar errors: The scan errors. + :vartype errors: + list[~azure.mgmt.sql.models.VulnerabilityAssessmentScanError] + :ivar storage_container_path: The scan results storage container path. + :vartype storage_container_path: str + :ivar number_of_failed_security_checks: The number of failed security + checks. + :vartype number_of_failed_security_checks: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'scan_id': {'readonly': True}, + 'trigger_type': {'readonly': True}, + 'state': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'errors': {'readonly': True}, + 'storage_container_path': {'readonly': True}, + 'number_of_failed_security_checks': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'scan_id': {'key': 'properties.scanId', 'type': 'str'}, + 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'errors': {'key': 'properties.errors', 'type': '[VulnerabilityAssessmentScanError]'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'number_of_failed_security_checks': {'key': 'properties.numberOfFailedSecurityChecks', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(VulnerabilityAssessmentScanRecord, self).__init__(**kwargs) + self.scan_id = None + self.trigger_type = None + self.state = None + self.start_time = None + self.end_time = None + self.errors = None + self.storage_container_path = None + self.number_of_failed_security_checks = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py new file mode 100644 index 000000000000..24ba7183e418 --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py @@ -0,0 +1,8891 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AutomaticTuningOptions(Model): + """Automatic tuning properties for individual advisors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param desired_state: Automatic tuning option desired state. Possible + values include: 'Off', 'On', 'Default' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired + :ivar actual_state: Automatic tuning option actual state. Possible values + include: 'Off', 'On' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual + :ivar reason_code: Reason code if desired and actual state are different. + :vartype reason_code: int + :ivar reason_desc: Reason description if desired and actual state are + different. Possible values include: 'Default', 'Disabled', + 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', + 'QueryStoreReadOnly', 'NotSupported' + :vartype reason_desc: str or + ~azure.mgmt.sql.models.AutomaticTuningDisabledReason + """ + + _validation = { + 'actual_state': {'readonly': True}, + 'reason_code': {'readonly': True}, + 'reason_desc': {'readonly': True}, + } + + _attribute_map = { + 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, + 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, + 'reason_code': {'key': 'reasonCode', 'type': 'int'}, + 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningDisabledReason'}, + } + + def __init__(self, *, desired_state=None, **kwargs) -> None: + super(AutomaticTuningOptions, self).__init__(**kwargs) + self.desired_state = desired_state + self.actual_state = None + self.reason_code = None + self.reason_desc = None + + +class AutomaticTuningServerOptions(Model): + """Automatic tuning properties for individual advisors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param desired_state: Automatic tuning option desired state. Possible + values include: 'Off', 'On', 'Default' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired + :ivar actual_state: Automatic tuning option actual state. Possible values + include: 'Off', 'On' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual + :ivar reason_code: Reason code if desired and actual state are different. + :vartype reason_code: int + :ivar reason_desc: Reason description if desired and actual state are + different. Possible values include: 'Default', 'Disabled', + 'AutoConfigured' + :vartype reason_desc: str or + ~azure.mgmt.sql.models.AutomaticTuningServerReason + """ + + _validation = { + 'actual_state': {'readonly': True}, + 'reason_code': {'readonly': True}, + 'reason_desc': {'readonly': True}, + } + + _attribute_map = { + 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, + 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, + 'reason_code': {'key': 'reasonCode', 'type': 'int'}, + 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningServerReason'}, + } + + def __init__(self, *, desired_state=None, **kwargs) -> None: + super(AutomaticTuningServerOptions, self).__init__(**kwargs) + self.desired_state = desired_state + self.actual_state = None + self.reason_code = None + self.reason_desc = None + + +class Resource(Model): + """ARM resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ProxyResource(Resource): + """ARM proxy resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) + + +class BackupLongTermRetentionPolicy(ProxyResource): + """A long term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param weekly_retention: The weekly retention policy for an LTR backup in + an ISO 8601 format. + :type weekly_retention: str + :param monthly_retention: The monthly retention policy for an LTR backup + in an ISO 8601 format. + :type monthly_retention: str + :param yearly_retention: The yearly retention policy for an LTR backup in + an ISO 8601 format. + :type yearly_retention: str + :param week_of_year: The week of year to take the yearly backup in an ISO + 8601 format. + :type week_of_year: int + """ + + _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'}, + 'weekly_retention': {'key': 'properties.weeklyRetention', 'type': 'str'}, + 'monthly_retention': {'key': 'properties.monthlyRetention', 'type': 'str'}, + 'yearly_retention': {'key': 'properties.yearlyRetention', 'type': 'str'}, + 'week_of_year': {'key': 'properties.weekOfYear', 'type': 'int'}, + } + + def __init__(self, *, weekly_retention: str=None, monthly_retention: str=None, yearly_retention: str=None, week_of_year: int=None, **kwargs) -> None: + super(BackupLongTermRetentionPolicy, self).__init__(**kwargs) + self.weekly_retention = weekly_retention + self.monthly_retention = monthly_retention + self.yearly_retention = yearly_retention + self.week_of_year = week_of_year + + +class BackupShortTermRetentionPolicy(ProxyResource): + """A short term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param retention_days: The backup retention period in days. This is how + many days Point-in-Time Restore will be supported. + :type retention_days: int + """ + + _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'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + } + + def __init__(self, *, retention_days: int=None, **kwargs) -> None: + super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) + self.retention_days = retention_days + + +class CheckNameAvailabilityRequest(Model): + """A request to check whether the specified name for a resource is available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name whose availability is to be checked. + :type name: str + :ivar type: Required. The type of resource that is used as the scope of + the availability check. Default value: "Microsoft.Sql/servers" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.Sql/servers" + + def __init__(self, *, name: str, **kwargs) -> None: + super(CheckNameAvailabilityRequest, self).__init__(**kwargs) + self.name = name + + +class CheckNameAvailabilityResponse(Model): + """A response indicating whether the specified name for a resource is + available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar available: True if the name is available, otherwise false. + :vartype available: bool + :ivar message: A message explaining why the name is unavailable. Will be + null if the name is available. + :vartype message: str + :ivar name: The name whose availability was checked. + :vartype name: str + :ivar reason: The reason code explaining why the name is unavailable. Will + be null if the name is available. Possible values include: 'Invalid', + 'AlreadyExists' + :vartype reason: str or ~azure.mgmt.sql.models.CheckNameAvailabilityReason + """ + + _validation = { + 'available': {'readonly': True}, + 'message': {'readonly': True}, + 'name': {'readonly': True}, + 'reason': {'readonly': True}, + } + + _attribute_map = { + 'available': {'key': 'available', 'type': 'bool'}, + 'message': {'key': 'message', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'CheckNameAvailabilityReason'}, + } + + def __init__(self, **kwargs) -> None: + super(CheckNameAvailabilityResponse, self).__init__(**kwargs) + self.available = None + self.message = None + self.name = None + self.reason = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class CompleteDatabaseRestoreDefinition(Model): + """Contains the information necessary to perform a complete database restore + operation. + + All required parameters must be populated in order to send to Azure. + + :param last_backup_name: Required. The last backup name to apply + :type last_backup_name: str + """ + + _validation = { + 'last_backup_name': {'required': True}, + } + + _attribute_map = { + 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, + } + + def __init__(self, *, last_backup_name: str, **kwargs) -> None: + super(CompleteDatabaseRestoreDefinition, self).__init__(**kwargs) + self.last_backup_name = last_backup_name + + +class CreateDatabaseRestorePointDefinition(Model): + """Contains the information necessary to perform a create database restore + point operation. + + All required parameters must be populated in order to send to Azure. + + :param restore_point_label: Required. The restore point label to apply + :type restore_point_label: str + """ + + _validation = { + 'restore_point_label': {'required': True}, + } + + _attribute_map = { + 'restore_point_label': {'key': 'restorePointLabel', 'type': 'str'}, + } + + def __init__(self, *, restore_point_label: str, **kwargs) -> None: + super(CreateDatabaseRestorePointDefinition, self).__init__(**kwargs) + self.restore_point_label = restore_point_label + + +class TrackedResource(Resource): + """ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.location = location + self.tags = tags + + +class Database(TrackedResource): + """A database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The database SKU. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location + ```` + :type sku: ~azure.mgmt.sql.models.Sku + :ivar kind: Kind of database. This is metadata used for the Azure portal + experience. + :vartype kind: str + :ivar managed_by: Resource that manages the database. + :vartype managed_by: str + :param create_mode: Specifies the mode of database creation. + Default: regular database creation. + Copy: creates a database as a copy of an existing database. + sourceDatabaseId must be specified as the resource ID of the source + database. + Secondary: creates a database as a secondary replica of an existing + database. sourceDatabaseId must be specified as the resource ID of the + existing primary database. + PointInTimeRestore: Creates a database by restoring a point in time backup + of an existing database. sourceDatabaseId must be specified as the + resource ID of the existing database, and restorePointInTime must be + specified. + Recovery: Creates a database by restoring a geo-replicated backup. + sourceDatabaseId must be specified as the recoverable database resource ID + to restore. + Restore: Creates a database by restoring a backup of a deleted database. + sourceDatabaseId must be specified. If sourceDatabaseId is the database's + original resource ID, then sourceDatabaseDeletionDate must be specified. + Otherwise sourceDatabaseId must be the restorable dropped database + resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime + may also be specified to restore from an earlier point in time. + RestoreLongTermRetentionBackup: Creates a database by restoring from a + long term retention vault. recoveryServicesRecoveryPointResourceId must be + specified as the recovery point resource ID. + Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for + DataWarehouse edition. Possible values include: 'Default', 'Copy', + 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', + 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', + 'RestoreLongTermRetentionBackup', 'OnlineSecondary' + :type create_mode: str or ~azure.mgmt.sql.models.CreateMode + :param collation: The collation of the database. + :type collation: str + :param max_size_bytes: The max size of the database expressed in bytes. + :type max_size_bytes: long + :param sample_name: The name of the sample schema to apply when creating + this database. Possible values include: 'AdventureWorksLT', + 'WideWorldImportersStd', 'WideWorldImportersFull' + :type sample_name: str or ~azure.mgmt.sql.models.SampleName + :param elastic_pool_id: The resource identifier of the elastic pool + containing this database. + :type elastic_pool_id: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :ivar status: The status of the database. Possible values include: + 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', + 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', + 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', + 'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers', + 'OnlineChangingDwPerformanceTiers' + :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus + :ivar database_id: The ID of the database. + :vartype database_id: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar current_service_objective_name: The current service level objective + name of the database. + :vartype current_service_objective_name: str + :ivar requested_service_objective_name: The requested service level + objective name of the database. + :vartype requested_service_objective_name: str + :ivar default_secondary_location: The default secondary region for this + database. + :vartype default_secondary_location: str + :ivar failover_group_id: Failover Group resource identifier that this + database belongs to. + :vartype failover_group_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param source_database_deletion_date: Specifies the time that the database + was deleted. + :type source_database_deletion_date: datetime + :param recovery_services_recovery_point_id: The resource identifier of the + recovery point associated with create operation of this database. + :type recovery_services_recovery_point_id: str + :param long_term_retention_backup_resource_id: The resource identifier of + the long term retention backup associated with create operation of this + database. + :type long_term_retention_backup_resource_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param restorable_dropped_database_id: The resource identifier of the + restorable dropped database associated with create operation of this + database. + :type restorable_dropped_database_id: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param zone_redundant: Whether or not this database is zone redundant, + which means the replicas of this database will be spread across multiple + availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this database. Possible + values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType + :ivar max_log_size_bytes: The max log size for this database. + :vartype max_log_size_bytes: long + :ivar earliest_restore_date: This records the earliest start date and time + that restore is available for this database (ISO8601 format). + :vartype earliest_restore_date: datetime + :param read_scale: The state of read-only routing. If enabled, connections + that have application intent set to readonly in their connection string + may be routed to a readonly secondary replica in the same region. Possible + values include: 'Enabled', 'Disabled' + :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale + :ivar current_sku: The name and tier of the SKU. + :vartype current_sku: ~azure.mgmt.sql.models.Sku + :param auto_pause_delay: Time in minutes after which database is + automatically paused. A value of -1 means that automatic pause is disabled + :type auto_pause_delay: int + :param min_capacity: Minimal capacity that database will always have + allocated, if not paused + :type min_capacity: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'managed_by': {'readonly': True}, + 'status': {'readonly': True}, + 'database_id': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'current_service_objective_name': {'readonly': True}, + 'requested_service_objective_name': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + 'max_log_size_bytes': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'current_sku': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, + 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, + 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, + 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, + 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, + 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, + 'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'}, + 'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'}, + } + + def __init__(self, *, location: str, tags=None, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, auto_pause_delay: int=None, min_capacity: float=None, **kwargs) -> None: + super(Database, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.kind = None + self.managed_by = None + self.create_mode = create_mode + self.collation = collation + self.max_size_bytes = max_size_bytes + self.sample_name = sample_name + self.elastic_pool_id = elastic_pool_id + self.source_database_id = source_database_id + self.status = None + self.database_id = None + self.creation_date = None + self.current_service_objective_name = None + self.requested_service_objective_name = None + self.default_secondary_location = None + self.failover_group_id = None + self.restore_point_in_time = restore_point_in_time + self.source_database_deletion_date = source_database_deletion_date + self.recovery_services_recovery_point_id = recovery_services_recovery_point_id + self.long_term_retention_backup_resource_id = long_term_retention_backup_resource_id + self.recoverable_database_id = recoverable_database_id + self.restorable_dropped_database_id = restorable_dropped_database_id + self.catalog_collation = catalog_collation + self.zone_redundant = zone_redundant + self.license_type = license_type + self.max_log_size_bytes = None + self.earliest_restore_date = None + self.read_scale = read_scale + self.current_sku = None + self.auto_pause_delay = auto_pause_delay + self.min_capacity = min_capacity + + +class DatabaseAutomaticTuning(ProxyResource): + """Database-level Automatic Tuning. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param desired_state: Automatic tuning desired state. Possible values + include: 'Inherit', 'Custom', 'Auto', 'Unspecified' + :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode + :ivar actual_state: Automatic tuning actual state. Possible values + include: 'Inherit', 'Custom', 'Auto', 'Unspecified' + :vartype actual_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode + :param options: Automatic tuning options definition. + :type options: dict[str, ~azure.mgmt.sql.models.AutomaticTuningOptions] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'actual_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningMode'}, + 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningMode'}, + 'options': {'key': 'properties.options', 'type': '{AutomaticTuningOptions}'}, + } + + def __init__(self, *, desired_state=None, options=None, **kwargs) -> None: + super(DatabaseAutomaticTuning, self).__init__(**kwargs) + self.desired_state = desired_state + self.actual_state = None + self.options = options + + +class DatabaseBlobAuditingPolicy(ProxyResource): + """A database blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Resource kind. + :vartype kind: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: + super(DatabaseBlobAuditingPolicy, self).__init__(**kwargs) + self.kind = None + self.state = state + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.audit_actions_and_groups = audit_actions_and_groups + self.storage_account_subscription_id = storage_account_subscription_id + self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use + self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + + +class DatabaseOperation(ProxyResource): + """A database operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_name: The name of the database the operation is being + performed on. + :vartype database_name: str + :ivar operation: The name of operation. + :vartype operation: str + :ivar operation_friendly_name: The friendly name of operation. + :vartype operation_friendly_name: str + :ivar percent_complete: The percentage of the operation completed. + :vartype percent_complete: int + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar start_time: The operation start time. + :vartype start_time: datetime + :ivar state: The operation state. Possible values include: 'Pending', + 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', 'Cancelled' + :vartype state: str or ~azure.mgmt.sql.models.ManagementOperationState + :ivar error_code: The operation error code. + :vartype error_code: int + :ivar error_description: The operation error description. + :vartype error_description: str + :ivar error_severity: The operation error severity. + :vartype error_severity: int + :ivar is_user_error: Whether or not the error is a user error. + :vartype is_user_error: bool + :ivar estimated_completion_time: The estimated completion time of the + operation. + :vartype estimated_completion_time: datetime + :ivar description: The operation description. + :vartype description: str + :ivar is_cancellable: Whether the operation can be cancelled. + :vartype is_cancellable: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_name': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_friendly_name': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_description': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'is_user_error': {'readonly': True}, + 'estimated_completion_time': {'readonly': True}, + 'description': {'readonly': True}, + 'is_cancellable': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, + 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(DatabaseOperation, self).__init__(**kwargs) + self.database_name = None + self.operation = None + self.operation_friendly_name = None + self.percent_complete = None + self.server_name = None + self.start_time = None + self.state = None + self.error_code = None + self.error_description = None + self.error_severity = None + self.is_user_error = None + self.estimated_completion_time = None + self.description = None + self.is_cancellable = None + + +class DatabaseSecurityAlertPolicy(ProxyResource): + """Contains information about a database Threat Detection policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar kind: Resource kind. + :vartype kind: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint and storageAccountAccessKey are required. + Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies the semicolon-separated list of alerts + that are disabled, or empty string to disable no alerts. Possible values: + Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; + Data_Exfiltration; Unsafe_Action. + :type disabled_alerts: str + :param email_addresses: Specifies the semicolon-separated list of e-mail + addresses to which the alert is sent. + :type email_addresses: str + :param email_account_admins: Specifies that the alert is sent to the + account administrators. Possible values include: 'Enabled', 'Disabled' + :type email_account_admins: str or + ~azure.mgmt.sql.models.SecurityAlertPolicyEmailAccountAdmins + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. If state is Enabled, storageEndpoint is + required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. If state is Enabled, + storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :param use_server_default: Specifies whether to use the default server + policy. Possible values include: 'Enabled', 'Disabled' + :type use_server_default: str or + ~azure.mgmt.sql.models.SecurityAlertPolicyUseServerDefault + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': 'str'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': 'str'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'SecurityAlertPolicyEmailAccountAdmins'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'use_server_default': {'key': 'properties.useServerDefault', 'type': 'SecurityAlertPolicyUseServerDefault'}, + } + + def __init__(self, *, state, location: str=None, disabled_alerts: str=None, email_addresses: str=None, email_account_admins=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, use_server_default=None, **kwargs) -> None: + super(DatabaseSecurityAlertPolicy, self).__init__(**kwargs) + self.location = location + self.kind = None + self.state = state + self.disabled_alerts = disabled_alerts + self.email_addresses = email_addresses + self.email_account_admins = email_account_admins + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.use_server_default = use_server_default + + +class DatabaseUpdate(Model): + """A database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param create_mode: Specifies the mode of database creation. + Default: regular database creation. + Copy: creates a database as a copy of an existing database. + sourceDatabaseId must be specified as the resource ID of the source + database. + Secondary: creates a database as a secondary replica of an existing + database. sourceDatabaseId must be specified as the resource ID of the + existing primary database. + PointInTimeRestore: Creates a database by restoring a point in time backup + of an existing database. sourceDatabaseId must be specified as the + resource ID of the existing database, and restorePointInTime must be + specified. + Recovery: Creates a database by restoring a geo-replicated backup. + sourceDatabaseId must be specified as the recoverable database resource ID + to restore. + Restore: Creates a database by restoring a backup of a deleted database. + sourceDatabaseId must be specified. If sourceDatabaseId is the database's + original resource ID, then sourceDatabaseDeletionDate must be specified. + Otherwise sourceDatabaseId must be the restorable dropped database + resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime + may also be specified to restore from an earlier point in time. + RestoreLongTermRetentionBackup: Creates a database by restoring from a + long term retention vault. recoveryServicesRecoveryPointResourceId must be + specified as the recovery point resource ID. + Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for + DataWarehouse edition. Possible values include: 'Default', 'Copy', + 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', + 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', + 'RestoreLongTermRetentionBackup', 'OnlineSecondary' + :type create_mode: str or ~azure.mgmt.sql.models.CreateMode + :param collation: The collation of the database. + :type collation: str + :param max_size_bytes: The max size of the database expressed in bytes. + :type max_size_bytes: long + :param sample_name: The name of the sample schema to apply when creating + this database. Possible values include: 'AdventureWorksLT', + 'WideWorldImportersStd', 'WideWorldImportersFull' + :type sample_name: str or ~azure.mgmt.sql.models.SampleName + :param elastic_pool_id: The resource identifier of the elastic pool + containing this database. + :type elastic_pool_id: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :ivar status: The status of the database. Possible values include: + 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', + 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', + 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', + 'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers', + 'OnlineChangingDwPerformanceTiers' + :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus + :ivar database_id: The ID of the database. + :vartype database_id: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar current_service_objective_name: The current service level objective + name of the database. + :vartype current_service_objective_name: str + :ivar requested_service_objective_name: The requested service level + objective name of the database. + :vartype requested_service_objective_name: str + :ivar default_secondary_location: The default secondary region for this + database. + :vartype default_secondary_location: str + :ivar failover_group_id: Failover Group resource identifier that this + database belongs to. + :vartype failover_group_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param source_database_deletion_date: Specifies the time that the database + was deleted. + :type source_database_deletion_date: datetime + :param recovery_services_recovery_point_id: The resource identifier of the + recovery point associated with create operation of this database. + :type recovery_services_recovery_point_id: str + :param long_term_retention_backup_resource_id: The resource identifier of + the long term retention backup associated with create operation of this + database. + :type long_term_retention_backup_resource_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param restorable_dropped_database_id: The resource identifier of the + restorable dropped database associated with create operation of this + database. + :type restorable_dropped_database_id: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param zone_redundant: Whether or not this database is zone redundant, + which means the replicas of this database will be spread across multiple + availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this database. Possible + values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType + :ivar max_log_size_bytes: The max log size for this database. + :vartype max_log_size_bytes: long + :ivar earliest_restore_date: This records the earliest start date and time + that restore is available for this database (ISO8601 format). + :vartype earliest_restore_date: datetime + :param read_scale: The state of read-only routing. If enabled, connections + that have application intent set to readonly in their connection string + may be routed to a readonly secondary replica in the same region. Possible + values include: 'Enabled', 'Disabled' + :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale + :ivar current_sku: The name and tier of the SKU. + :vartype current_sku: ~azure.mgmt.sql.models.Sku + :param auto_pause_delay: Time in minutes after which database is + automatically paused. A value of -1 means that automatic pause is disabled + :type auto_pause_delay: int + :param min_capacity: Minimal capacity that database will always have + allocated, if not paused + :type min_capacity: float + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'status': {'readonly': True}, + 'database_id': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'current_service_objective_name': {'readonly': True}, + 'requested_service_objective_name': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + 'max_log_size_bytes': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'current_sku': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, + 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, + 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, + 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, + 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, + 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, + 'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'}, + 'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, auto_pause_delay: int=None, min_capacity: float=None, tags=None, **kwargs) -> None: + super(DatabaseUpdate, self).__init__(**kwargs) + self.sku = sku + self.create_mode = create_mode + self.collation = collation + self.max_size_bytes = max_size_bytes + self.sample_name = sample_name + self.elastic_pool_id = elastic_pool_id + self.source_database_id = source_database_id + self.status = None + self.database_id = None + self.creation_date = None + self.current_service_objective_name = None + self.requested_service_objective_name = None + self.default_secondary_location = None + self.failover_group_id = None + self.restore_point_in_time = restore_point_in_time + self.source_database_deletion_date = source_database_deletion_date + self.recovery_services_recovery_point_id = recovery_services_recovery_point_id + self.long_term_retention_backup_resource_id = long_term_retention_backup_resource_id + self.recoverable_database_id = recoverable_database_id + self.restorable_dropped_database_id = restorable_dropped_database_id + self.catalog_collation = catalog_collation + self.zone_redundant = zone_redundant + self.license_type = license_type + self.max_log_size_bytes = None + self.earliest_restore_date = None + self.read_scale = read_scale + self.current_sku = None + self.auto_pause_delay = auto_pause_delay + self.min_capacity = min_capacity + self.tags = tags + + +class DatabaseUsage(Model): + """The database usages. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the usage metric. + :vartype name: str + :ivar resource_name: The name of the resource. + :vartype resource_name: str + :ivar display_name: The usage metric display name. + :vartype display_name: str + :ivar current_value: The current value of the usage metric. + :vartype current_value: float + :ivar limit: The current limit of the usage metric. + :vartype limit: float + :ivar unit: The units of the usage metric. + :vartype unit: str + :ivar next_reset_time: The next reset time for the usage metric (ISO8601 + format). + :vartype next_reset_time: datetime + """ + + _validation = { + 'name': {'readonly': True}, + 'resource_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'next_reset_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(DatabaseUsage, self).__init__(**kwargs) + self.name = None + self.resource_name = None + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + self.next_reset_time = None + + +class DatabaseVulnerabilityAssessment(ProxyResource): + """A database vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: A blob storage container path to hold the + scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It + is required if server level vulnerability assessment policy doesn't set + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _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'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, *, storage_container_path: str=None, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: + super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = storage_container_path + self.storage_container_sas_key = storage_container_sas_key + self.storage_account_access_key = storage_account_access_key + self.recurring_scans = recurring_scans + + +class DatabaseVulnerabilityAssessmentRuleBaseline(ProxyResource): + """A database vulnerability assessment rule baseline. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param baseline_results: Required. The rule baseline result + :type baseline_results: + list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'baseline_results': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'baseline_results': {'key': 'properties.baselineResults', 'type': '[DatabaseVulnerabilityAssessmentRuleBaselineItem]'}, + } + + def __init__(self, *, baseline_results, **kwargs) -> None: + super(DatabaseVulnerabilityAssessmentRuleBaseline, self).__init__(**kwargs) + self.baseline_results = baseline_results + + +class DatabaseVulnerabilityAssessmentRuleBaselineItem(Model): + """Properties for an Azure SQL Database Vulnerability Assessment rule + baseline's result. + + All required parameters must be populated in order to send to Azure. + + :param result: Required. The rule baseline result + :type result: list[str] + """ + + _validation = { + 'result': {'required': True}, + } + + _attribute_map = { + 'result': {'key': 'result', 'type': '[str]'}, + } + + def __init__(self, *, result, **kwargs) -> None: + super(DatabaseVulnerabilityAssessmentRuleBaselineItem, self).__init__(**kwargs) + self.result = result + + +class DatabaseVulnerabilityAssessmentScansExport(ProxyResource): + """A database Vulnerability Assessment scan export resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar exported_report_location: Location of the exported report (e.g. + https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). + :vartype exported_report_location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'exported_report_location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs) + self.exported_report_location = None + + +class DataMaskingPolicy(ProxyResource): + """Represents a database data masking policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param data_masking_state: Required. The state of the data masking policy. + Possible values include: 'Disabled', 'Enabled' + :type data_masking_state: str or ~azure.mgmt.sql.models.DataMaskingState + :param exempt_principals: The list of the exempt principals. Specifies the + semicolon-separated list of database users for which the data masking + policy does not apply. The specified users receive data results without + masking for all of the database queries. + :type exempt_principals: str + :ivar application_principals: The list of the application principals. This + is a legacy parameter and is no longer used. + :vartype application_principals: str + :ivar masking_level: The masking level. This is a legacy parameter and is + no longer used. + :vartype masking_level: str + :ivar location: The location of the data masking policy. + :vartype location: str + :ivar kind: The kind of data masking policy. Metadata, used for Azure + portal. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_masking_state': {'required': True}, + 'application_principals': {'readonly': True}, + 'masking_level': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_masking_state': {'key': 'properties.dataMaskingState', 'type': 'DataMaskingState'}, + 'exempt_principals': {'key': 'properties.exemptPrincipals', 'type': 'str'}, + 'application_principals': {'key': 'properties.applicationPrincipals', 'type': 'str'}, + 'masking_level': {'key': 'properties.maskingLevel', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, data_masking_state, exempt_principals: str=None, **kwargs) -> None: + super(DataMaskingPolicy, self).__init__(**kwargs) + self.data_masking_state = data_masking_state + self.exempt_principals = exempt_principals + self.application_principals = None + self.masking_level = None + self.location = None + self.kind = None + + +class DataMaskingRule(ProxyResource): + """Represents a database data masking rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar data_masking_rule_id: The rule Id. + :vartype data_masking_rule_id: str + :param alias_name: The alias name. This is a legacy parameter and is no + longer used. + :type alias_name: str + :param rule_state: The rule state. Used to delete a rule. To delete an + existing rule, specify the schemaName, tableName, columnName, + maskingFunction, and specify ruleState as disabled. However, if the rule + doesn't already exist, the rule will be created with ruleState set to + enabled, regardless of the provided value of ruleState. Possible values + include: 'Disabled', 'Enabled' + :type rule_state: str or ~azure.mgmt.sql.models.DataMaskingRuleState + :param schema_name: Required. The schema name on which the data masking + rule is applied. + :type schema_name: str + :param table_name: Required. The table name on which the data masking rule + is applied. + :type table_name: str + :param column_name: Required. The column name on which the data masking + rule is applied. + :type column_name: str + :param masking_function: Required. The masking function that is used for + the data masking rule. Possible values include: 'Default', 'CCN', 'Email', + 'Number', 'SSN', 'Text' + :type masking_function: str or ~azure.mgmt.sql.models.DataMaskingFunction + :param number_from: The numberFrom property of the masking rule. Required + if maskingFunction is set to Number, otherwise this parameter will be + ignored. + :type number_from: str + :param number_to: The numberTo property of the data masking rule. Required + if maskingFunction is set to Number, otherwise this parameter will be + ignored. + :type number_to: str + :param prefix_size: If maskingFunction is set to Text, the number of + characters to show unmasked in the beginning of the string. Otherwise, + this parameter will be ignored. + :type prefix_size: str + :param suffix_size: If maskingFunction is set to Text, the number of + characters to show unmasked at the end of the string. Otherwise, this + parameter will be ignored. + :type suffix_size: str + :param replacement_string: If maskingFunction is set to Text, the + character to use for masking the unexposed part of the string. Otherwise, + this parameter will be ignored. + :type replacement_string: str + :ivar location: The location of the data masking rule. + :vartype location: str + :ivar kind: The kind of Data Masking Rule. Metadata, used for Azure + portal. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_masking_rule_id': {'readonly': True}, + 'schema_name': {'required': True}, + 'table_name': {'required': True}, + 'column_name': {'required': True}, + 'masking_function': {'required': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_masking_rule_id': {'key': 'properties.id', 'type': 'str'}, + 'alias_name': {'key': 'properties.aliasName', 'type': 'str'}, + 'rule_state': {'key': 'properties.ruleState', 'type': 'DataMaskingRuleState'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, + 'table_name': {'key': 'properties.tableName', 'type': 'str'}, + 'column_name': {'key': 'properties.columnName', 'type': 'str'}, + 'masking_function': {'key': 'properties.maskingFunction', 'type': 'DataMaskingFunction'}, + 'number_from': {'key': 'properties.numberFrom', 'type': 'str'}, + 'number_to': {'key': 'properties.numberTo', 'type': 'str'}, + 'prefix_size': {'key': 'properties.prefixSize', 'type': 'str'}, + 'suffix_size': {'key': 'properties.suffixSize', 'type': 'str'}, + 'replacement_string': {'key': 'properties.replacementString', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, schema_name: str, table_name: str, column_name: str, masking_function, alias_name: str=None, rule_state=None, number_from: str=None, number_to: str=None, prefix_size: str=None, suffix_size: str=None, replacement_string: str=None, **kwargs) -> None: + super(DataMaskingRule, self).__init__(**kwargs) + self.data_masking_rule_id = None + self.alias_name = alias_name + self.rule_state = rule_state + self.schema_name = schema_name + self.table_name = table_name + self.column_name = column_name + self.masking_function = masking_function + self.number_from = number_from + self.number_to = number_to + self.prefix_size = prefix_size + self.suffix_size = suffix_size + self.replacement_string = replacement_string + self.location = None + self.kind = None + + +class EditionCapability(Model): + """The edition capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The database edition name. + :vartype name: str + :ivar supported_service_level_objectives: The list of supported service + objectives for the edition. + :vartype supported_service_level_objectives: + list[~azure.mgmt.sql.models.ServiceObjectiveCapability] + :ivar zone_redundant: Whether or not zone redundancy is supported for the + edition. + :vartype zone_redundant: bool + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_service_level_objectives': {'readonly': True}, + 'zone_redundant': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_service_level_objectives': {'key': 'supportedServiceLevelObjectives', 'type': '[ServiceObjectiveCapability]'}, + 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(EditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_service_level_objectives = None + self.zone_redundant = None + self.status = None + self.reason = reason + + +class ElasticPool(TrackedResource): + """An elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The elastic pool SKU. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or the following command: + ```azurecli + az sql elastic-pool list-editions -l -o table + ```` + :type sku: ~azure.mgmt.sql.models.Sku + :ivar kind: Kind of elastic pool. This is metadata used for the Azure + portal experience. + :vartype kind: str + :ivar state: The state of the elastic pool. Possible values include: + 'Creating', 'Ready', 'Disabled' + :vartype state: str or ~azure.mgmt.sql.models.ElasticPoolState + :ivar creation_date: The creation date of the elastic pool (ISO8601 + format). + :vartype creation_date: datetime + :param max_size_bytes: The storage limit for the database elastic pool in + bytes. + :type max_size_bytes: long + :param per_database_settings: The per database settings for the elastic + pool. + :type per_database_settings: + ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings + :param zone_redundant: Whether or not this elastic pool is zone redundant, + which means the replicas of this elastic pool will be spread across + multiple availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this elastic pool. + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'state': {'readonly': True}, + 'creation_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, sku=None, max_size_bytes: int=None, per_database_settings=None, zone_redundant: bool=None, license_type=None, **kwargs) -> None: + super(ElasticPool, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.kind = None + self.state = None + self.creation_date = None + self.max_size_bytes = max_size_bytes + self.per_database_settings = per_database_settings + self.zone_redundant = zone_redundant + self.license_type = license_type + + +class ElasticPoolActivity(ProxyResource): + """Represents the activity on an elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar end_time: The time the operation finished (ISO8601 format). + :vartype end_time: datetime + :ivar error_code: The error code if available. + :vartype error_code: int + :ivar error_message: The error message if available. + :vartype error_message: str + :ivar error_severity: The error severity if available. + :vartype error_severity: int + :ivar operation: The operation name. + :vartype operation: str + :ivar operation_id: The unique operation ID. + :vartype operation_id: str + :ivar percent_complete: The percentage complete if available. + :vartype percent_complete: int + :ivar requested_database_dtu_max: The requested max DTU per database if + available. + :vartype requested_database_dtu_max: int + :ivar requested_database_dtu_min: The requested min DTU per database if + available. + :vartype requested_database_dtu_min: int + :ivar requested_dtu: The requested DTU for the pool if available. + :vartype requested_dtu: int + :ivar requested_elastic_pool_name: The requested name for the elastic pool + if available. + :vartype requested_elastic_pool_name: str + :ivar requested_storage_limit_in_gb: The requested storage limit for the + pool in GB if available. + :vartype requested_storage_limit_in_gb: long + :ivar elastic_pool_name: The name of the elastic pool. + :vartype elastic_pool_name: str + :ivar server_name: The name of the server the elastic pool is in. + :vartype server_name: str + :ivar start_time: The time the operation started (ISO8601 format). + :vartype start_time: datetime + :ivar state: The current state of the operation. + :vartype state: str + :ivar requested_storage_limit_in_mb: The requested storage limit in MB. + :vartype requested_storage_limit_in_mb: int + :ivar requested_database_dtu_guarantee: The requested per database DTU + guarantee. + :vartype requested_database_dtu_guarantee: int + :ivar requested_database_dtu_cap: The requested per database DTU cap. + :vartype requested_database_dtu_cap: int + :ivar requested_dtu_guarantee: The requested DTU guarantee. + :vartype requested_dtu_guarantee: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_message': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_id': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'requested_database_dtu_max': {'readonly': True}, + 'requested_database_dtu_min': {'readonly': True}, + 'requested_dtu': {'readonly': True}, + 'requested_elastic_pool_name': {'readonly': True}, + 'requested_storage_limit_in_gb': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'requested_storage_limit_in_mb': {'readonly': True}, + 'requested_database_dtu_guarantee': {'readonly': True}, + 'requested_database_dtu_cap': {'readonly': True}, + 'requested_dtu_guarantee': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'requested_database_dtu_max': {'key': 'properties.requestedDatabaseDtuMax', 'type': 'int'}, + 'requested_database_dtu_min': {'key': 'properties.requestedDatabaseDtuMin', 'type': 'int'}, + 'requested_dtu': {'key': 'properties.requestedDtu', 'type': 'int'}, + 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, + 'requested_storage_limit_in_gb': {'key': 'properties.requestedStorageLimitInGB', 'type': 'long'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'requested_storage_limit_in_mb': {'key': 'properties.requestedStorageLimitInMB', 'type': 'int'}, + 'requested_database_dtu_guarantee': {'key': 'properties.requestedDatabaseDtuGuarantee', 'type': 'int'}, + 'requested_database_dtu_cap': {'key': 'properties.requestedDatabaseDtuCap', 'type': 'int'}, + 'requested_dtu_guarantee': {'key': 'properties.requestedDtuGuarantee', 'type': 'int'}, + } + + def __init__(self, *, location: str=None, **kwargs) -> None: + super(ElasticPoolActivity, self).__init__(**kwargs) + self.location = location + self.end_time = None + self.error_code = None + self.error_message = None + self.error_severity = None + self.operation = None + self.operation_id = None + self.percent_complete = None + self.requested_database_dtu_max = None + self.requested_database_dtu_min = None + self.requested_dtu = None + self.requested_elastic_pool_name = None + self.requested_storage_limit_in_gb = None + self.elastic_pool_name = None + self.server_name = None + self.start_time = None + self.state = None + self.requested_storage_limit_in_mb = None + self.requested_database_dtu_guarantee = None + self.requested_database_dtu_cap = None + self.requested_dtu_guarantee = None + + +class ElasticPoolDatabaseActivity(ProxyResource): + """Represents the activity on an elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar database_name: The database name. + :vartype database_name: str + :ivar end_time: The time the operation finished (ISO8601 format). + :vartype end_time: datetime + :ivar error_code: The error code if available. + :vartype error_code: int + :ivar error_message: The error message if available. + :vartype error_message: str + :ivar error_severity: The error severity if available. + :vartype error_severity: int + :ivar operation: The operation name. + :vartype operation: str + :ivar operation_id: The unique operation ID. + :vartype operation_id: str + :ivar percent_complete: The percentage complete if available. + :vartype percent_complete: int + :ivar requested_elastic_pool_name: The name for the elastic pool the + database is moving into if available. + :vartype requested_elastic_pool_name: str + :ivar current_elastic_pool_name: The name of the current elastic pool the + database is in if available. + :vartype current_elastic_pool_name: str + :ivar current_service_objective: The name of the current service objective + if available. + :vartype current_service_objective: str + :ivar requested_service_objective: The name of the requested service + objective if available. + :vartype requested_service_objective: str + :ivar server_name: The name of the server the elastic pool is in. + :vartype server_name: str + :ivar start_time: The time the operation started (ISO8601 format). + :vartype start_time: datetime + :ivar state: The current state of the operation. + :vartype state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_name': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_message': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_id': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'requested_elastic_pool_name': {'readonly': True}, + 'current_elastic_pool_name': {'readonly': True}, + 'current_service_objective': {'readonly': True}, + 'requested_service_objective': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, + 'current_elastic_pool_name': {'key': 'properties.currentElasticPoolName', 'type': 'str'}, + 'current_service_objective': {'key': 'properties.currentServiceObjective', 'type': 'str'}, + 'requested_service_objective': {'key': 'properties.requestedServiceObjective', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, **kwargs) -> None: + super(ElasticPoolDatabaseActivity, self).__init__(**kwargs) + self.location = location + self.database_name = None + self.end_time = None + self.error_code = None + self.error_message = None + self.error_severity = None + self.operation = None + self.operation_id = None + self.percent_complete = None + self.requested_elastic_pool_name = None + self.current_elastic_pool_name = None + self.current_service_objective = None + self.requested_service_objective = None + self.server_name = None + self.start_time = None + self.state = None + + +class ElasticPoolEditionCapability(Model): + """The elastic pool edition capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The elastic pool edition name. + :vartype name: str + :ivar supported_elastic_pool_performance_levels: The list of supported + elastic pool DTU levels for the edition. + :vartype supported_elastic_pool_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerformanceLevelCapability] + :ivar zone_redundant: Whether or not zone redundancy is supported for the + edition. + :vartype zone_redundant: bool + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_elastic_pool_performance_levels': {'readonly': True}, + 'zone_redundant': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_elastic_pool_performance_levels': {'key': 'supportedElasticPoolPerformanceLevels', 'type': '[ElasticPoolPerformanceLevelCapability]'}, + 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ElasticPoolEditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_elastic_pool_performance_levels = None + self.zone_redundant = None + self.status = None + self.reason = reason + + +class ElasticPoolOperation(ProxyResource): + """A elastic pool operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar elastic_pool_name: The name of the elastic pool the operation is + being performed on. + :vartype elastic_pool_name: str + :ivar operation: The name of operation. + :vartype operation: str + :ivar operation_friendly_name: The friendly name of operation. + :vartype operation_friendly_name: str + :ivar percent_complete: The percentage of the operation completed. + :vartype percent_complete: int + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar start_time: The operation start time. + :vartype start_time: datetime + :ivar state: The operation state. + :vartype state: str + :ivar error_code: The operation error code. + :vartype error_code: int + :ivar error_description: The operation error description. + :vartype error_description: str + :ivar error_severity: The operation error severity. + :vartype error_severity: int + :ivar is_user_error: Whether or not the error is a user error. + :vartype is_user_error: bool + :ivar estimated_completion_time: The estimated completion time of the + operation. + :vartype estimated_completion_time: datetime + :ivar description: The operation description. + :vartype description: str + :ivar is_cancellable: Whether the operation can be cancelled. + :vartype is_cancellable: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_friendly_name': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_description': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'is_user_error': {'readonly': True}, + 'estimated_completion_time': {'readonly': True}, + 'description': {'readonly': True}, + 'is_cancellable': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, + 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(ElasticPoolOperation, self).__init__(**kwargs) + self.elastic_pool_name = None + self.operation = None + self.operation_friendly_name = None + self.percent_complete = None + self.server_name = None + self.start_time = None + self.state = None + self.error_code = None + self.error_description = None + self.error_severity = None + self.is_user_error = None + self.estimated_completion_time = None + self.description = None + self.is_cancellable = None + + +class ElasticPoolPerDatabaseMaxPerformanceLevelCapability(Model): + """The max per-database performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The maximum performance level per database. + :vartype limit: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + :ivar supported_per_database_min_performance_levels: The list of supported + min database performance levels. + :vartype supported_per_database_min_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMinPerformanceLevelCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'supported_per_database_min_performance_levels': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'supported_per_database_min_performance_levels': {'key': 'supportedPerDatabaseMinPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMinPerformanceLevelCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ElasticPoolPerDatabaseMaxPerformanceLevelCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + self.supported_per_database_min_performance_levels = None + self.status = None + self.reason = reason + + +class ElasticPoolPerDatabaseMinPerformanceLevelCapability(Model): + """The minimum per-database performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The minimum performance level per database. + :vartype limit: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ElasticPoolPerDatabaseMinPerformanceLevelCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + self.status = None + self.reason = reason + + +class ElasticPoolPerDatabaseSettings(Model): + """Per database settings of an elastic pool. + + :param min_capacity: The minimum capacity all databases are guaranteed. + :type min_capacity: float + :param max_capacity: The maximum capacity any one database can consume. + :type max_capacity: float + """ + + _attribute_map = { + 'min_capacity': {'key': 'minCapacity', 'type': 'float'}, + 'max_capacity': {'key': 'maxCapacity', 'type': 'float'}, + } + + def __init__(self, *, min_capacity: float=None, max_capacity: float=None, **kwargs) -> None: + super(ElasticPoolPerDatabaseSettings, self).__init__(**kwargs) + self.min_capacity = min_capacity + self.max_capacity = max_capacity + + +class ElasticPoolPerformanceLevelCapability(Model): + """The Elastic Pool performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar performance_level: The performance level for the pool. + :vartype performance_level: + ~azure.mgmt.sql.models.PerformanceLevelCapability + :ivar sku: The sku. + :vartype sku: ~azure.mgmt.sql.models.Sku + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar max_database_count: The maximum number of databases supported. + :vartype max_database_count: int + :ivar included_max_size: The included (free) max size for this performance + level. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar supported_max_sizes: The list of supported max sizes. + :vartype supported_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar supported_per_database_max_sizes: The list of supported per database + max sizes. + :vartype supported_per_database_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar supported_per_database_max_performance_levels: The list of supported + per database max performance levels. + :vartype supported_per_database_max_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMaxPerformanceLevelCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'performance_level': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'max_database_count': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'supported_max_sizes': {'readonly': True}, + 'supported_per_database_max_sizes': {'readonly': True}, + 'supported_per_database_max_performance_levels': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'max_database_count': {'key': 'maxDatabaseCount', 'type': 'int'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'supported_per_database_max_sizes': {'key': 'supportedPerDatabaseMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'supported_per_database_max_performance_levels': {'key': 'supportedPerDatabaseMaxPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMaxPerformanceLevelCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ElasticPoolPerformanceLevelCapability, self).__init__(**kwargs) + self.performance_level = None + self.sku = None + self.supported_license_types = None + self.max_database_count = None + self.included_max_size = None + self.supported_max_sizes = None + self.supported_per_database_max_sizes = None + self.supported_per_database_max_performance_levels = None + self.status = None + self.reason = reason + + +class ElasticPoolUpdate(Model): + """An elastic pool update. + + :param sku: + :type sku: ~azure.mgmt.sql.models.Sku + :param max_size_bytes: The storage limit for the database elastic pool in + bytes. + :type max_size_bytes: long + :param per_database_settings: The per database settings for the elastic + pool. + :type per_database_settings: + ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings + :param zone_redundant: Whether or not this elastic pool is zone redundant, + which means the replicas of this elastic pool will be spread across + multiple availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this elastic pool. + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, sku=None, max_size_bytes: int=None, per_database_settings=None, zone_redundant: bool=None, license_type=None, tags=None, **kwargs) -> None: + super(ElasticPoolUpdate, self).__init__(**kwargs) + self.sku = sku + self.max_size_bytes = max_size_bytes + self.per_database_settings = per_database_settings + self.zone_redundant = zone_redundant + self.license_type = license_type + self.tags = tags + + +class EncryptionProtector(ProxyResource): + """The server encryption protector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :type kind: str + :ivar location: Resource location. + :vartype location: str + :ivar subregion: Subregion of the encryption protector. + :vartype subregion: str + :param server_key_name: The name of the server key. + :type server_key_name: str + :param server_key_type: Required. The encryption protector type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :ivar uri: The URI of the server key. + :vartype uri: str + :ivar thumbprint: Thumbprint of the server key. + :vartype thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'subregion': {'readonly': True}, + 'server_key_type': {'required': True}, + 'uri': {'readonly': True}, + 'thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'subregion': {'key': 'properties.subregion', 'type': 'str'}, + 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, *, server_key_type, kind: str=None, server_key_name: str=None, **kwargs) -> None: + super(EncryptionProtector, self).__init__(**kwargs) + self.kind = kind + self.location = None + self.subregion = None + self.server_key_name = server_key_name + self.server_key_type = server_key_type + self.uri = None + self.thumbprint = None + + +class ExportRequest(Model): + """Export database parameters. + + All required parameters must be populated in order to send to Azure. + + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + } + + _attribute_map = { + 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, + } + + def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, authentication_type="SQL", **kwargs) -> None: + super(ExportRequest, self).__init__(**kwargs) + self.storage_key_type = storage_key_type + self.storage_key = storage_key + self.storage_uri = storage_uri + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.authentication_type = authentication_type + + +class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): + """An extended database blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param predicate_expression: Specifies condition of where clause when + creating an audit. + :type predicate_expression: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: + super(ExtendedDatabaseBlobAuditingPolicy, self).__init__(**kwargs) + self.predicate_expression = predicate_expression + self.state = state + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.audit_actions_and_groups = audit_actions_and_groups + self.storage_account_subscription_id = storage_account_subscription_id + self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use + self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + + +class ExtendedServerBlobAuditingPolicy(ProxyResource): + """An extended server blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param predicate_expression: Specifies condition of where clause when + creating an audit. + :type predicate_expression: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: + super(ExtendedServerBlobAuditingPolicy, self).__init__(**kwargs) + self.predicate_expression = predicate_expression + self.state = state + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.audit_actions_and_groups = audit_actions_and_groups + self.storage_account_subscription_id = storage_account_subscription_id + self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use + self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + + +class FailoverGroup(ProxyResource): + """A failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param read_write_endpoint: Required. Read-write endpoint of the failover + group instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint + :ivar replication_role: Local replication role of the failover group + instance. Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.FailoverGroupReplicationRole + :ivar replication_state: Replication state of the failover group instance. + :vartype replication_state: str + :param partner_servers: Required. List of partner server information for + the failover group. + :type partner_servers: list[~azure.mgmt.sql.models.PartnerInfo] + :param databases: List of databases in the failover group. + :type databases: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'read_write_endpoint': {'required': True}, + 'replication_role': {'readonly': True}, + 'replication_state': {'readonly': True}, + 'partner_servers': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, + 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + 'partner_servers': {'key': 'properties.partnerServers', 'type': '[PartnerInfo]'}, + 'databases': {'key': 'properties.databases', 'type': '[str]'}, + } + + def __init__(self, *, read_write_endpoint, partner_servers, tags=None, read_only_endpoint=None, databases=None, **kwargs) -> None: + super(FailoverGroup, self).__init__(**kwargs) + self.location = None + self.tags = tags + self.read_write_endpoint = read_write_endpoint + self.read_only_endpoint = read_only_endpoint + self.replication_role = None + self.replication_state = None + self.partner_servers = partner_servers + self.databases = databases + + +class FailoverGroupReadOnlyEndpoint(Model): + """Read-only endpoint of the failover group instance. + + :param failover_policy: Failover policy of the read-only endpoint for the + failover group. Possible values include: 'Disabled', 'Enabled' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy + """ + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + } + + def __init__(self, *, failover_policy=None, **kwargs) -> None: + super(FailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) + self.failover_policy = failover_policy + + +class FailoverGroupReadWriteEndpoint(Model): + """Read-write endpoint of the failover group instance. + + All required parameters must be populated in order to send to Azure. + + :param failover_policy: Required. Failover policy of the read-write + endpoint for the failover group. If failoverPolicy is Automatic then + failoverWithDataLossGracePeriodMinutes is required. Possible values + include: 'Manual', 'Automatic' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy + :param failover_with_data_loss_grace_period_minutes: Grace period before + failover with data loss is attempted for the read-write endpoint. If + failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is + required. + :type failover_with_data_loss_grace_period_minutes: int + """ + + _validation = { + 'failover_policy': {'required': True}, + } + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, + } + + def __init__(self, *, failover_policy, failover_with_data_loss_grace_period_minutes: int=None, **kwargs) -> None: + super(FailoverGroupReadWriteEndpoint, self).__init__(**kwargs) + self.failover_policy = failover_policy + self.failover_with_data_loss_grace_period_minutes = failover_with_data_loss_grace_period_minutes + + +class FailoverGroupUpdate(Model): + """A failover group update request. + + :param read_write_endpoint: Read-write endpoint of the failover group + instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint + :param databases: List of databases in the failover group. + :type databases: list[str] + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, + 'databases': {'key': 'properties.databases', 'type': '[str]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, read_write_endpoint=None, read_only_endpoint=None, databases=None, tags=None, **kwargs) -> None: + super(FailoverGroupUpdate, self).__init__(**kwargs) + self.read_write_endpoint = read_write_endpoint + self.read_only_endpoint = read_only_endpoint + self.databases = databases + self.tags = tags + + +class FirewallRule(ProxyResource): + """Represents a server firewall rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of server that contains this firewall rule. + :vartype kind: str + :ivar location: Location of the server that contains this firewall rule. + :vartype location: str + :param start_ip_address: Required. The start IP address of the firewall + rule. Must be IPv4 format. Use value '0.0.0.0' to represent all + Azure-internal IP addresses. + :type start_ip_address: str + :param end_ip_address: Required. The end IP address of the firewall rule. + Must be IPv4 format. Must be greater than or equal to startIpAddress. Use + value '0.0.0.0' to represent all Azure-internal IP addresses. + :type end_ip_address: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + 'start_ip_address': {'required': True}, + 'end_ip_address': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + } + + def __init__(self, *, start_ip_address: str, end_ip_address: str, **kwargs) -> None: + super(FirewallRule, self).__init__(**kwargs) + self.kind = None + self.location = None + self.start_ip_address = start_ip_address + self.end_ip_address = end_ip_address + + +class GeoBackupPolicy(ProxyResource): + """A database geo backup policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. The state of the geo backup policy. Possible + values include: 'Disabled', 'Enabled' + :type state: str or ~azure.mgmt.sql.models.GeoBackupPolicyState + :ivar storage_type: The storage type of the geo backup policy. + :vartype storage_type: str + :ivar kind: Kind of geo backup policy. This is metadata used for the + Azure portal experience. + :vartype kind: str + :ivar location: Backup policy location. + :vartype location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'storage_type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'GeoBackupPolicyState'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, state, **kwargs) -> None: + super(GeoBackupPolicy, self).__init__(**kwargs) + self.state = state + self.storage_type = None + self.kind = None + self.location = None + + +class ImportExportResponse(ProxyResource): + """Response for Import/Export Get operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar request_type: The request type of the operation. + :vartype request_type: str + :ivar request_id: The request type of the operation. + :vartype request_id: str + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar database_name: The name of the database. + :vartype database_name: str + :ivar status: The status message returned from the server. + :vartype status: str + :ivar last_modified_time: The operation status last modified time. + :vartype last_modified_time: str + :ivar queued_time: The operation queued time. + :vartype queued_time: str + :ivar blob_uri: The blob uri. + :vartype blob_uri: str + :ivar error_message: The error message returned from the server. + :vartype error_message: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'request_type': {'readonly': True}, + 'request_id': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'status': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'queued_time': {'readonly': True}, + 'blob_uri': {'readonly': True}, + 'error_message': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'request_type': {'key': 'properties.requestType', 'type': 'str'}, + 'request_id': {'key': 'properties.requestId', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'str'}, + 'queued_time': {'key': 'properties.queuedTime', 'type': 'str'}, + 'blob_uri': {'key': 'properties.blobUri', 'type': 'str'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ImportExportResponse, self).__init__(**kwargs) + self.request_type = None + self.request_id = None + self.server_name = None + self.database_name = None + self.status = None + self.last_modified_time = None + self.queued_time = None + self.blob_uri = None + self.error_message = None + + +class ImportExtensionRequest(Model): + """Import database parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: The name of the extension. + :type name: str + :param type: The type of the extension. + :type type: str + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + :ivar operation_mode: Required. The type of import operation being + performed. This is always Import. Default value: "Import" . + :vartype operation_mode: str + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + 'operation_mode': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_key_type': {'key': 'properties.storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'properties.storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'properties.storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'properties.authenticationType', 'type': 'AuthenticationType'}, + 'operation_mode': {'key': 'properties.operationMode', 'type': 'str'}, + } + + operation_mode = "Import" + + def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, name: str=None, type: str=None, authentication_type="SQL", **kwargs) -> None: + super(ImportExtensionRequest, self).__init__(**kwargs) + self.name = name + self.type = type + self.storage_key_type = storage_key_type + self.storage_key = storage_key + self.storage_uri = storage_uri + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.authentication_type = authentication_type + + +class ImportRequest(ExportRequest): + """Import database parameters. + + All required parameters must be populated in order to send to Azure. + + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + :param database_name: Required. The name of the database to import. + :type database_name: str + :param edition: Required. The edition for the database being created. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location + ```` + . Possible values include: 'Web', 'Business', 'Basic', 'Standard', + 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', + 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale' + :type edition: str or ~azure.mgmt.sql.models.DatabaseEdition + :param service_objective_name: Required. The name of the service objective + to assign to the database. Possible values include: 'System', 'System0', + 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', + 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', + 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', + 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', + 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', + 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', + 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', + 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' + :type service_objective_name: str or + ~azure.mgmt.sql.models.ServiceObjectiveName + :param max_size_bytes: Required. The maximum size for the newly imported + database. + :type max_size_bytes: str + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + 'database_name': {'required': True}, + 'edition': {'required': True}, + 'service_objective_name': {'required': True}, + 'max_size_bytes': {'required': True}, + } + + _attribute_map = { + 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'edition': {'key': 'edition', 'type': 'str'}, + 'service_objective_name': {'key': 'serviceObjectiveName', 'type': 'str'}, + 'max_size_bytes': {'key': 'maxSizeBytes', 'type': 'str'}, + } + + def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, database_name: str, edition, service_objective_name, max_size_bytes: str, authentication_type="SQL", **kwargs) -> None: + super(ImportRequest, self).__init__(storage_key_type=storage_key_type, storage_key=storage_key, storage_uri=storage_uri, administrator_login=administrator_login, administrator_login_password=administrator_login_password, authentication_type=authentication_type, **kwargs) + self.database_name = database_name + self.edition = edition + self.service_objective_name = service_objective_name + self.max_size_bytes = max_size_bytes + + +class InstanceFailoverGroup(ProxyResource): + """An instance failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param read_write_endpoint: Required. Read-write endpoint of the failover + group instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.InstanceFailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.InstanceFailoverGroupReadOnlyEndpoint + :ivar replication_role: Local replication role of the failover group + instance. Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole + :ivar replication_state: Replication state of the failover group instance. + :vartype replication_state: str + :param partner_regions: Required. Partner region information for the + failover group. + :type partner_regions: list[~azure.mgmt.sql.models.PartnerRegionInfo] + :param managed_instance_pairs: Required. List of managed instance pairs in + the failover group. + :type managed_instance_pairs: + list[~azure.mgmt.sql.models.ManagedInstancePairInfo] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'read_write_endpoint': {'required': True}, + 'replication_role': {'readonly': True}, + 'replication_state': {'readonly': True}, + 'partner_regions': {'required': True}, + 'managed_instance_pairs': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'InstanceFailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'InstanceFailoverGroupReadOnlyEndpoint'}, + 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + 'partner_regions': {'key': 'properties.partnerRegions', 'type': '[PartnerRegionInfo]'}, + 'managed_instance_pairs': {'key': 'properties.managedInstancePairs', 'type': '[ManagedInstancePairInfo]'}, + } + + def __init__(self, *, read_write_endpoint, partner_regions, managed_instance_pairs, read_only_endpoint=None, **kwargs) -> None: + super(InstanceFailoverGroup, self).__init__(**kwargs) + self.read_write_endpoint = read_write_endpoint + self.read_only_endpoint = read_only_endpoint + self.replication_role = None + self.replication_state = None + self.partner_regions = partner_regions + self.managed_instance_pairs = managed_instance_pairs + + +class InstanceFailoverGroupReadOnlyEndpoint(Model): + """Read-only endpoint of the failover group instance. + + :param failover_policy: Failover policy of the read-only endpoint for the + failover group. Possible values include: 'Disabled', 'Enabled' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy + """ + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + } + + def __init__(self, *, failover_policy=None, **kwargs) -> None: + super(InstanceFailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) + self.failover_policy = failover_policy + + +class InstanceFailoverGroupReadWriteEndpoint(Model): + """Read-write endpoint of the failover group instance. + + All required parameters must be populated in order to send to Azure. + + :param failover_policy: Required. Failover policy of the read-write + endpoint for the failover group. If failoverPolicy is Automatic then + failoverWithDataLossGracePeriodMinutes is required. Possible values + include: 'Manual', 'Automatic' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy + :param failover_with_data_loss_grace_period_minutes: Grace period before + failover with data loss is attempted for the read-write endpoint. If + failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is + required. + :type failover_with_data_loss_grace_period_minutes: int + """ + + _validation = { + 'failover_policy': {'required': True}, + } + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, + } + + def __init__(self, *, failover_policy, failover_with_data_loss_grace_period_minutes: int=None, **kwargs) -> None: + super(InstanceFailoverGroupReadWriteEndpoint, self).__init__(**kwargs) + self.failover_policy = failover_policy + self.failover_with_data_loss_grace_period_minutes = failover_with_data_loss_grace_period_minutes + + +class InstancePool(TrackedResource): + """An Azure SQL instance pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param subnet_id: Required. Resource ID of the subnet to place this + instance pool in. + :type subnet_id: str + :param v_cores: Required. Count of vCores belonging to this instance pool. + :type v_cores: int + :param license_type: Required. The license type. Possible values are + 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' + (without SQL license price). Possible values include: 'LicenseIncluded', + 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.InstancePoolLicenseType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'subnet_id': {'required': True}, + 'v_cores': {'required': True}, + 'license_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + } + + def __init__(self, *, location: str, subnet_id: str, v_cores: int, license_type, tags=None, sku=None, **kwargs) -> None: + super(InstancePool, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.subnet_id = subnet_id + self.v_cores = v_cores + self.license_type = license_type + + +class InstancePoolUpdate(Model): + """An update to an Instance pool. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(InstancePoolUpdate, self).__init__(**kwargs) + self.tags = tags + + +class Job(ProxyResource): + """A job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param description: User-defined description of the job. Default value: "" + . + :type description: str + :ivar version: The job version number. + :vartype version: int + :param schedule: Schedule properties of the job. + :type schedule: ~azure.mgmt.sql.models.JobSchedule + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'int'}, + 'schedule': {'key': 'properties.schedule', 'type': 'JobSchedule'}, + } + + def __init__(self, *, description: str="", schedule=None, **kwargs) -> None: + super(Job, self).__init__(**kwargs) + self.description = description + self.version = None + self.schedule = schedule + + +class JobAgent(TrackedResource): + """An Azure SQL job agent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param database_id: Required. Resource ID of the database to store job + metadata in. + :type database_id: str + :ivar state: The state of the job agent. Possible values include: + 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' + :vartype state: str or ~azure.mgmt.sql.models.JobAgentState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'database_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, *, location: str, database_id: str, tags=None, sku=None, **kwargs) -> None: + super(JobAgent, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.database_id = database_id + self.state = None + + +class JobAgentUpdate(Model): + """An update to an Azure SQL job agent. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(JobAgentUpdate, self).__init__(**kwargs) + self.tags = tags + + +class JobCredential(ProxyResource): + """A stored credential that can be used by a job to connect to target + databases. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param username: Required. The credential user name. + :type username: str + :param password: Required. The credential password. + :type password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'username': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'username': {'key': 'properties.username', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + } + + def __init__(self, *, username: str, password: str, **kwargs) -> None: + super(JobCredential, self).__init__(**kwargs) + self.username = username + self.password = password + + +class JobExecution(ProxyResource): + """An execution of a job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar job_version: The job version number. + :vartype job_version: int + :ivar step_name: The job step name. + :vartype step_name: str + :ivar step_id: The job step id. + :vartype step_id: int + :ivar job_execution_id: The unique identifier of the job execution. + :vartype job_execution_id: str + :ivar lifecycle: The detailed state of the job execution. Possible values + include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', + 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', + 'TimedOut', 'Canceled', 'Skipped' + :vartype lifecycle: str or ~azure.mgmt.sql.models.JobExecutionLifecycle + :ivar provisioning_state: The ARM provisioning state of the job execution. + Possible values include: 'Created', 'InProgress', 'Succeeded', 'Failed', + 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.sql.models.ProvisioningState + :ivar create_time: The time that the job execution was created. + :vartype create_time: datetime + :ivar start_time: The time that the job execution started. + :vartype start_time: datetime + :ivar end_time: The time that the job execution completed. + :vartype end_time: datetime + :param current_attempts: Number of times the job execution has been + attempted. + :type current_attempts: int + :ivar current_attempt_start_time: Start time of the current attempt. + :vartype current_attempt_start_time: datetime + :ivar last_message: The last status or error message. + :vartype last_message: str + :ivar target: The target that this execution is executed on. + :vartype target: ~azure.mgmt.sql.models.JobExecutionTarget + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'job_version': {'readonly': True}, + 'step_name': {'readonly': True}, + 'step_id': {'readonly': True}, + 'job_execution_id': {'readonly': True}, + 'lifecycle': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'create_time': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'current_attempt_start_time': {'readonly': True}, + 'last_message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'job_version': {'key': 'properties.jobVersion', 'type': 'int'}, + 'step_name': {'key': 'properties.stepName', 'type': 'str'}, + 'step_id': {'key': 'properties.stepId', 'type': 'int'}, + 'job_execution_id': {'key': 'properties.jobExecutionId', 'type': 'str'}, + 'lifecycle': {'key': 'properties.lifecycle', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'current_attempts': {'key': 'properties.currentAttempts', 'type': 'int'}, + 'current_attempt_start_time': {'key': 'properties.currentAttemptStartTime', 'type': 'iso-8601'}, + 'last_message': {'key': 'properties.lastMessage', 'type': 'str'}, + 'target': {'key': 'properties.target', 'type': 'JobExecutionTarget'}, + } + + def __init__(self, *, current_attempts: int=None, **kwargs) -> None: + super(JobExecution, self).__init__(**kwargs) + self.job_version = None + self.step_name = None + self.step_id = None + self.job_execution_id = None + self.lifecycle = None + self.provisioning_state = None + self.create_time = None + self.start_time = None + self.end_time = None + self.current_attempts = current_attempts + self.current_attempt_start_time = None + self.last_message = None + self.target = None + + +class JobExecutionTarget(Model): + """The target that a job execution is executed on. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of the target. Possible values include: + 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + :vartype type: str or ~azure.mgmt.sql.models.JobTargetType + :ivar server_name: The server name. + :vartype server_name: str + :ivar database_name: The database name. + :vartype database_name: str + """ + + _validation = { + 'type': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(JobExecutionTarget, self).__init__(**kwargs) + self.type = None + self.server_name = None + self.database_name = None + + +class JobSchedule(Model): + """Scheduling properties of a job. + + :param start_time: Schedule start time. Default value: + "0001-01-01T00:00:00Z" . + :type start_time: datetime + :param end_time: Schedule end time. Default value: "9999-12-31T11:59:59Z" + . + :type end_time: datetime + :param type: Schedule interval type. Possible values include: 'Once', + 'Recurring'. Default value: "Once" . + :type type: str or ~azure.mgmt.sql.models.JobScheduleType + :param enabled: Whether or not the schedule is enabled. + :type enabled: bool + :param interval: Value of the schedule's recurring interval, if the + schedule type is recurring. ISO8601 duration format. + :type interval: str + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'JobScheduleType'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'interval': {'key': 'interval', 'type': 'str'}, + } + + def __init__(self, *, start_time="0001-01-01T00:00:00Z", end_time="9999-12-31T11:59:59Z", type="Once", enabled: bool=None, interval: str=None, **kwargs) -> None: + super(JobSchedule, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.type = type + self.enabled = enabled + self.interval = interval + + +class JobStep(ProxyResource): + """A job step. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param step_id: The job step's index within the job. If not specified when + creating the job step, it will be created as the last step. If not + specified when updating the job step, the step id is not modified. + :type step_id: int + :param target_group: Required. The resource ID of the target group that + the job step will be executed on. + :type target_group: str + :param credential: Required. The resource ID of the job credential that + will be used to connect to the targets. + :type credential: str + :param action: Required. The action payload of the job step. + :type action: ~azure.mgmt.sql.models.JobStepAction + :param output: Output destination properties of the job step. + :type output: ~azure.mgmt.sql.models.JobStepOutput + :param execution_options: Execution options for the job step. + :type execution_options: ~azure.mgmt.sql.models.JobStepExecutionOptions + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'target_group': {'required': True}, + 'credential': {'required': True}, + 'action': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'step_id': {'key': 'properties.stepId', 'type': 'int'}, + 'target_group': {'key': 'properties.targetGroup', 'type': 'str'}, + 'credential': {'key': 'properties.credential', 'type': 'str'}, + 'action': {'key': 'properties.action', 'type': 'JobStepAction'}, + 'output': {'key': 'properties.output', 'type': 'JobStepOutput'}, + 'execution_options': {'key': 'properties.executionOptions', 'type': 'JobStepExecutionOptions'}, + } + + def __init__(self, *, target_group: str, credential: str, action, step_id: int=None, output=None, execution_options=None, **kwargs) -> None: + super(JobStep, self).__init__(**kwargs) + self.step_id = step_id + self.target_group = target_group + self.credential = credential + self.action = action + self.output = output + self.execution_options = execution_options + + +class JobStepAction(Model): + """The action to be executed by a job step. + + All required parameters must be populated in order to send to Azure. + + :param type: Type of action being executed by the job step. Possible + values include: 'TSql'. Default value: "TSql" . + :type type: str or ~azure.mgmt.sql.models.JobStepActionType + :param source: The source of the action to execute. Possible values + include: 'Inline'. Default value: "Inline" . + :type source: str or ~azure.mgmt.sql.models.JobStepActionSource + :param value: Required. The action value, for example the text of the + T-SQL script to execute. + :type value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, value: str, type="TSql", source="Inline", **kwargs) -> None: + super(JobStepAction, self).__init__(**kwargs) + self.type = type + self.source = source + self.value = value + + +class JobStepExecutionOptions(Model): + """The execution options of a job step. + + :param timeout_seconds: Execution timeout for the job step. Default value: + 43200 . + :type timeout_seconds: int + :param retry_attempts: Maximum number of times the job step will be + reattempted if the first attempt fails. Default value: 10 . + :type retry_attempts: int + :param initial_retry_interval_seconds: Initial delay between retries for + job step execution. Default value: 1 . + :type initial_retry_interval_seconds: int + :param maximum_retry_interval_seconds: The maximum amount of time to wait + between retries for job step execution. Default value: 120 . + :type maximum_retry_interval_seconds: int + :param retry_interval_backoff_multiplier: The backoff multiplier for the + time between retries. Default value: 2 . + :type retry_interval_backoff_multiplier: float + """ + + _attribute_map = { + 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, + 'retry_attempts': {'key': 'retryAttempts', 'type': 'int'}, + 'initial_retry_interval_seconds': {'key': 'initialRetryIntervalSeconds', 'type': 'int'}, + 'maximum_retry_interval_seconds': {'key': 'maximumRetryIntervalSeconds', 'type': 'int'}, + 'retry_interval_backoff_multiplier': {'key': 'retryIntervalBackoffMultiplier', 'type': 'float'}, + } + + def __init__(self, *, timeout_seconds: int=43200, retry_attempts: int=10, initial_retry_interval_seconds: int=1, maximum_retry_interval_seconds: int=120, retry_interval_backoff_multiplier: float=2, **kwargs) -> None: + super(JobStepExecutionOptions, self).__init__(**kwargs) + self.timeout_seconds = timeout_seconds + self.retry_attempts = retry_attempts + self.initial_retry_interval_seconds = initial_retry_interval_seconds + self.maximum_retry_interval_seconds = maximum_retry_interval_seconds + self.retry_interval_backoff_multiplier = retry_interval_backoff_multiplier + + +class JobStepOutput(Model): + """The output configuration of a job step. + + All required parameters must be populated in order to send to Azure. + + :param type: The output destination type. Possible values include: + 'SqlDatabase'. Default value: "SqlDatabase" . + :type type: str or ~azure.mgmt.sql.models.JobStepOutputType + :param subscription_id: The output destination subscription id. + :type subscription_id: str + :param resource_group_name: The output destination resource group. + :type resource_group_name: str + :param server_name: Required. The output destination server name. + :type server_name: str + :param database_name: Required. The output destination database. + :type database_name: str + :param schema_name: The output destination schema. Default value: "dbo" . + :type schema_name: str + :param table_name: Required. The output destination table. + :type table_name: str + :param credential: Required. The resource ID of the credential to use to + connect to the output destination. + :type credential: str + """ + + _validation = { + 'server_name': {'required': True}, + 'database_name': {'required': True}, + 'table_name': {'required': True}, + 'credential': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'credential': {'key': 'credential', 'type': 'str'}, + } + + def __init__(self, *, server_name: str, database_name: str, table_name: str, credential: str, type="SqlDatabase", subscription_id: str=None, resource_group_name: str=None, schema_name: str="dbo", **kwargs) -> None: + super(JobStepOutput, self).__init__(**kwargs) + self.type = type + self.subscription_id = subscription_id + self.resource_group_name = resource_group_name + self.server_name = server_name + self.database_name = database_name + self.schema_name = schema_name + self.table_name = table_name + self.credential = credential + + +class JobTarget(Model): + """A job target, for example a specific database or a container of databases + that is evaluated during job execution. + + All required parameters must be populated in order to send to Azure. + + :param membership_type: Whether the target is included or excluded from + the group. Possible values include: 'Include', 'Exclude'. Default value: + "Include" . + :type membership_type: str or + ~azure.mgmt.sql.models.JobTargetGroupMembershipType + :param type: Required. The target type. Possible values include: + 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + :type type: str or ~azure.mgmt.sql.models.JobTargetType + :param server_name: The target server name. + :type server_name: str + :param database_name: The target database name. + :type database_name: str + :param elastic_pool_name: The target elastic pool name. + :type elastic_pool_name: str + :param shard_map_name: The target shard map. + :type shard_map_name: str + :param refresh_credential: The resource ID of the credential that is used + during job execution to connect to the target and determine the list of + databases inside the target. + :type refresh_credential: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'membership_type': {'key': 'membershipType', 'type': 'JobTargetGroupMembershipType'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'elastic_pool_name': {'key': 'elasticPoolName', 'type': 'str'}, + 'shard_map_name': {'key': 'shardMapName', 'type': 'str'}, + 'refresh_credential': {'key': 'refreshCredential', 'type': 'str'}, + } + + def __init__(self, *, type, membership_type="Include", server_name: str=None, database_name: str=None, elastic_pool_name: str=None, shard_map_name: str=None, refresh_credential: str=None, **kwargs) -> None: + super(JobTarget, self).__init__(**kwargs) + self.membership_type = membership_type + self.type = type + self.server_name = server_name + self.database_name = database_name + self.elastic_pool_name = elastic_pool_name + self.shard_map_name = shard_map_name + self.refresh_credential = refresh_credential + + +class JobTargetGroup(ProxyResource): + """A group of job targets. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param members: Required. Members of the target group. + :type members: list[~azure.mgmt.sql.models.JobTarget] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'members': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'members': {'key': 'properties.members', 'type': '[JobTarget]'}, + } + + def __init__(self, *, members, **kwargs) -> None: + super(JobTargetGroup, self).__init__(**kwargs) + self.members = members + + +class JobVersion(ProxyResource): + """A job version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(JobVersion, self).__init__(**kwargs) + + +class LicenseTypeCapability(Model): + """The license type capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: License type identifier. + :vartype name: str + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(LicenseTypeCapability, self).__init__(**kwargs) + self.name = None + self.status = None + self.reason = reason + + +class LocationCapabilities(Model): + """The location capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The location name. + :vartype name: str + :ivar supported_server_versions: The list of supported server versions. + :vartype supported_server_versions: + list[~azure.mgmt.sql.models.ServerVersionCapability] + :ivar supported_managed_instance_versions: The list of supported managed + instance versions. + :vartype supported_managed_instance_versions: + list[~azure.mgmt.sql.models.ManagedInstanceVersionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_server_versions': {'readonly': True}, + 'supported_managed_instance_versions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_server_versions': {'key': 'supportedServerVersions', 'type': '[ServerVersionCapability]'}, + 'supported_managed_instance_versions': {'key': 'supportedManagedInstanceVersions', 'type': '[ManagedInstanceVersionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(LocationCapabilities, self).__init__(**kwargs) + self.name = None + self.supported_server_versions = None + self.supported_managed_instance_versions = None + self.status = None + self.reason = reason + + +class LogSizeCapability(Model): + """The log size capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The log size limit (see 'unit' for the units). + :vartype limit: int + :ivar unit: The units that the limit is expressed in. Possible values + include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes', 'Percent' + :vartype unit: str or ~azure.mgmt.sql.models.LogSizeUnit + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'int'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(LogSizeCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + + +class LongTermRetentionBackup(ProxyResource): + """A long term retention backup. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar server_name: The server name that the backup database belong to. + :vartype server_name: str + :ivar server_create_time: The create time of the server. + :vartype server_create_time: datetime + :ivar database_name: The name of the database the backup belong to + :vartype database_name: str + :ivar database_deletion_time: The delete time of the database + :vartype database_deletion_time: datetime + :ivar backup_time: The time the backup was taken + :vartype backup_time: datetime + :ivar backup_expiration_time: The time the long term retention backup will + expire. + :vartype backup_expiration_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'server_name': {'readonly': True}, + 'server_create_time': {'readonly': True}, + 'database_name': {'readonly': True}, + 'database_deletion_time': {'readonly': True}, + 'backup_time': {'readonly': True}, + 'backup_expiration_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'server_create_time': {'key': 'properties.serverCreateTime', 'type': 'iso-8601'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'database_deletion_time': {'key': 'properties.databaseDeletionTime', 'type': 'iso-8601'}, + 'backup_time': {'key': 'properties.backupTime', 'type': 'iso-8601'}, + 'backup_expiration_time': {'key': 'properties.backupExpirationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(LongTermRetentionBackup, self).__init__(**kwargs) + self.server_name = None + self.server_create_time = None + self.database_name = None + self.database_deletion_time = None + self.backup_time = None + self.backup_expiration_time = None + + +class ManagedBackupShortTermRetentionPolicy(ProxyResource): + """A short term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param retention_days: The backup retention period in days. This is how + many days Point-in-Time Restore will be supported. + :type retention_days: int + """ + + _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'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + } + + def __init__(self, *, retention_days: int=None, **kwargs) -> None: + super(ManagedBackupShortTermRetentionPolicy, self).__init__(**kwargs) + self.retention_days = retention_days + + +class ManagedDatabase(TrackedResource): + """A managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param collation: Collation of the managed database. + :type collation: str + :ivar status: Status of the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' + :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus + :ivar creation_date: Creation date of the database. + :vartype creation_date: datetime + :ivar earliest_restore_point: Earliest restore point in time for point in + time restore. + :vartype earliest_restore_point: datetime + :param restore_point_in_time: Conditional. If createMode is + PointInTimeRestore, this value is required. Specifies the point in time + (ISO8601 format) of the source database that will be restored to create + the new database. + :type restore_point_in_time: datetime + :ivar default_secondary_location: Geo paired region. + :vartype default_secondary_location: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param create_mode: Managed database create mode. PointInTimeRestore: + Create a database by restoring a point in time backup of an existing + database. SourceDatabaseName, SourceManagedInstanceName and PointInTime + must be specified. RestoreExternalBackup: Create a database by restoring + from external backup files. Collation, StorageContainerUri and + StorageContainerSasToken must be specified. Recovery: Creates a database + by restoring a geo-replicated backup. RecoverableDatabaseId must be + specified as the recoverable database resource ID to restore. Possible + values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', + 'Recovery' + :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode + :param storage_container_uri: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the uri of the + storage container where backups for this restore are stored. + :type storage_container_uri: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :param restorable_dropped_database_id: The restorable dropped database + resource id to restore when creating this database. + :type restorable_dropped_database_id: str + :param storage_container_sas_token: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the storage + container sas token. + :type storage_container_sas_token: str + :ivar failover_group_id: Instance Failover Group resource identifier that + this managed database belongs to. + :vartype failover_group_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'status': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'earliest_restore_point': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, restorable_dropped_database_id: str=None, storage_container_sas_token: str=None, recoverable_database_id: str=None, **kwargs) -> None: + super(ManagedDatabase, self).__init__(location=location, tags=tags, **kwargs) + self.collation = collation + self.status = None + self.creation_date = None + self.earliest_restore_point = None + self.restore_point_in_time = restore_point_in_time + self.default_secondary_location = None + self.catalog_collation = catalog_collation + self.create_mode = create_mode + self.storage_container_uri = storage_container_uri + self.source_database_id = source_database_id + self.restorable_dropped_database_id = restorable_dropped_database_id + self.storage_container_sas_token = storage_container_sas_token + self.failover_group_id = None + self.recoverable_database_id = recoverable_database_id + + +class ManagedDatabaseSecurityAlertPolicy(ProxyResource): + """A managed database security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: + super(ManagedDatabaseSecurityAlertPolicy, self).__init__(**kwargs) + self.state = state + self.disabled_alerts = disabled_alerts + self.email_addresses = email_addresses + self.email_account_admins = email_account_admins + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.creation_time = None + + +class ManagedDatabaseUpdate(Model): + """An managed database update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param collation: Collation of the managed database. + :type collation: str + :ivar status: Status of the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' + :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus + :ivar creation_date: Creation date of the database. + :vartype creation_date: datetime + :ivar earliest_restore_point: Earliest restore point in time for point in + time restore. + :vartype earliest_restore_point: datetime + :param restore_point_in_time: Conditional. If createMode is + PointInTimeRestore, this value is required. Specifies the point in time + (ISO8601 format) of the source database that will be restored to create + the new database. + :type restore_point_in_time: datetime + :ivar default_secondary_location: Geo paired region. + :vartype default_secondary_location: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param create_mode: Managed database create mode. PointInTimeRestore: + Create a database by restoring a point in time backup of an existing + database. SourceDatabaseName, SourceManagedInstanceName and PointInTime + must be specified. RestoreExternalBackup: Create a database by restoring + from external backup files. Collation, StorageContainerUri and + StorageContainerSasToken must be specified. Recovery: Creates a database + by restoring a geo-replicated backup. RecoverableDatabaseId must be + specified as the recoverable database resource ID to restore. Possible + values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', + 'Recovery' + :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode + :param storage_container_uri: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the uri of the + storage container where backups for this restore are stored. + :type storage_container_uri: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :param restorable_dropped_database_id: The restorable dropped database + resource id to restore when creating this database. + :type restorable_dropped_database_id: str + :param storage_container_sas_token: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the storage + container sas token. + :type storage_container_sas_token: str + :ivar failover_group_id: Instance Failover Group resource identifier that + this managed database belongs to. + :vartype failover_group_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'status': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'earliest_restore_point': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + } + + _attribute_map = { + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, restorable_dropped_database_id: str=None, storage_container_sas_token: str=None, recoverable_database_id: str=None, tags=None, **kwargs) -> None: + super(ManagedDatabaseUpdate, self).__init__(**kwargs) + self.collation = collation + self.status = None + self.creation_date = None + self.earliest_restore_point = None + self.restore_point_in_time = restore_point_in_time + self.default_secondary_location = None + self.catalog_collation = catalog_collation + self.create_mode = create_mode + self.storage_container_uri = storage_container_uri + self.source_database_id = source_database_id + self.restorable_dropped_database_id = restorable_dropped_database_id + self.storage_container_sas_token = storage_container_sas_token + self.failover_group_id = None + self.recoverable_database_id = recoverable_database_id + self.tags = tags + + +class ManagedInstance(TrackedResource): + """An Azure SQL managed instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param identity: The Azure Active Directory identity of the managed + instance. + :type identity: ~azure.mgmt.sql.models.ResourceIdentity + :param sku: Managed instance SKU. Allowed values for sku.name: GP_Gen4, + GP_Gen5, BC_Gen4, BC_Gen5 + :type sku: ~azure.mgmt.sql.models.Sku + :param managed_instance_create_mode: Specifies the mode of database + creation. + Default: Regular instance creation. + Restore: Creates an instance by restoring a set of backups to specific + point in time. RestorePointInTime and SourceManagedInstanceId must be + specified. Possible values include: 'Default', 'PointInTimeRestore' + :type managed_instance_create_mode: str or + ~azure.mgmt.sql.models.ManagedServerCreateMode + :ivar fully_qualified_domain_name: The fully qualified domain name of the + managed instance. + :vartype fully_qualified_domain_name: str + :param administrator_login: Administrator username for the managed + instance. Can only be specified when the managed instance is being created + (and is required for creation). + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for managed instance creation). + :type administrator_login_password: str + :param subnet_id: Subnet resource ID for the managed instance. + :type subnet_id: str + :ivar state: The state of the managed instance. + :vartype state: str + :param license_type: The license type. Possible values are + 'LicenseIncluded' (regular price inclusive of a new SQL license) and + 'BasePrice' (discounted AHB price for bringing your own SQL licenses). + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or + ~azure.mgmt.sql.models.ManagedInstanceLicenseType + :param v_cores: The number of vCores. Allowed values: 8, 16, 24, 32, 40, + 64, 80. + :type v_cores: int + :param storage_size_in_gb: Storage size in GB. Minimum value: 32. Maximum + value: 8192. Increments of 32 GB allowed only. + :type storage_size_in_gb: int + :param collation: Collation of the managed instance. + :type collation: str + :ivar dns_zone: The Dns Zone that the managed instance is in. + :vartype dns_zone: str + :param dns_zone_partner: The resource id of another managed instance whose + DNS zone this managed instance will share after creation. + :type dns_zone_partner: str + :param public_data_endpoint_enabled: Whether or not the public data + endpoint is enabled. + :type public_data_endpoint_enabled: bool + :param source_managed_instance_id: The resource identifier of the source + managed instance associated with create operation of this instance. + :type source_managed_instance_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param proxy_override: Connection type used for connecting to the + instance. Possible values include: 'Proxy', 'Redirect', 'Default' + :type proxy_override: str or + ~azure.mgmt.sql.models.ManagedInstanceProxyOverride + :param timezone_id: Id of the timezone. Allowed values are timezones + supported by Windows. + Windows keeps details on supported timezones, including the id, in + registry under + KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time + Zones. + You can get those registry values via SQL Server by querying SELECT name + AS timezone_id FROM sys.time_zone_info. + List of Ids can also be obtained by executing + [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + An example of valid timezone id is "Pacific Standard Time" or "W. Europe + Standard Time". + :type timezone_id: str + :param instance_pool_id: The Id of the instance pool this managed server + belongs to. + :type instance_pool_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'fully_qualified_domain_name': {'readonly': True}, + 'state': {'readonly': True}, + 'dns_zone': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, + 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, + 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, + 'source_managed_instance_id': {'key': 'properties.sourceManagedInstanceId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, + 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, + 'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, identity=None, sku=None, managed_instance_create_mode=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type=None, v_cores: int=None, storage_size_in_gb: int=None, collation: str=None, dns_zone_partner: str=None, public_data_endpoint_enabled: bool=None, source_managed_instance_id: str=None, restore_point_in_time=None, proxy_override=None, timezone_id: str=None, instance_pool_id: str=None, **kwargs) -> None: + super(ManagedInstance, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity + self.sku = sku + self.managed_instance_create_mode = managed_instance_create_mode + self.fully_qualified_domain_name = None + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.subnet_id = subnet_id + self.state = None + self.license_type = license_type + self.v_cores = v_cores + self.storage_size_in_gb = storage_size_in_gb + self.collation = collation + self.dns_zone = None + self.dns_zone_partner = dns_zone_partner + self.public_data_endpoint_enabled = public_data_endpoint_enabled + self.source_managed_instance_id = source_managed_instance_id + self.restore_point_in_time = restore_point_in_time + self.proxy_override = proxy_override + self.timezone_id = timezone_id + self.instance_pool_id = instance_pool_id + + +class ManagedInstanceEditionCapability(Model): + """The managed server capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The managed server version name. + :vartype name: str + :ivar supported_families: The supported families. + :vartype supported_families: + list[~azure.mgmt.sql.models.ManagedInstanceFamilyCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_families': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_families': {'key': 'supportedFamilies', 'type': '[ManagedInstanceFamilyCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ManagedInstanceEditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_families = None + self.status = None + self.reason = reason + + +class ManagedInstanceEncryptionProtector(ProxyResource): + """The managed instance encryption protector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :vartype kind: str + :param server_key_name: The name of the managed instance key. + :type server_key_name: str + :param server_key_type: Required. The encryption protector type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :ivar uri: The URI of the server key. + :vartype uri: str + :ivar thumbprint: Thumbprint of the server key. + :vartype thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'server_key_type': {'required': True}, + 'uri': {'readonly': True}, + 'thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, *, server_key_type, server_key_name: str=None, **kwargs) -> None: + super(ManagedInstanceEncryptionProtector, self).__init__(**kwargs) + self.kind = None + self.server_key_name = server_key_name + self.server_key_type = server_key_type + self.uri = None + self.thumbprint = None + + +class ManagedInstanceFamilyCapability(Model): + """The managed server family capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Family name. + :vartype name: str + :ivar sku: SKU name. + :vartype sku: str + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar supported_vcores_values: List of supported virtual cores values. + :vartype supported_vcores_values: + list[~azure.mgmt.sql.models.ManagedInstanceVcoresCapability] + :ivar included_max_size: Included size. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar supported_storage_sizes: Storage size ranges. + :vartype supported_storage_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'supported_vcores_values': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'supported_storage_sizes': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'supported_vcores_values': {'key': 'supportedVcoresValues', 'type': '[ManagedInstanceVcoresCapability]'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'supported_storage_sizes': {'key': 'supportedStorageSizes', 'type': '[MaxSizeRangeCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ManagedInstanceFamilyCapability, self).__init__(**kwargs) + self.name = None + self.sku = None + self.supported_license_types = None + self.supported_vcores_values = None + self.included_max_size = None + self.supported_storage_sizes = None + self.status = None + self.reason = reason + + +class ManagedInstanceKey(ProxyResource): + """A managed instance key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :vartype kind: str + :param server_key_type: Required. The key type like 'ServiceManaged', + 'AzureKeyVault'. Possible values include: 'ServiceManaged', + 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :param uri: The URI of the key. If the ServerKeyType is AzureKeyVault, + then the URI is required. + :type uri: str + :ivar thumbprint: Thumbprint of the key. + :vartype thumbprint: str + :ivar creation_date: The key creation date. + :vartype creation_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'server_key_type': {'required': True}, + 'thumbprint': {'readonly': True}, + 'creation_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, server_key_type, uri: str=None, **kwargs) -> None: + super(ManagedInstanceKey, self).__init__(**kwargs) + self.kind = None + self.server_key_type = server_key_type + self.uri = uri + self.thumbprint = None + self.creation_date = None + + +class ManagedInstancePairInfo(Model): + """Pairs of Managed Instances in the failover group. + + :param primary_managed_instance_id: Id of Primary Managed Instance in + pair. + :type primary_managed_instance_id: str + :param partner_managed_instance_id: Id of Partner Managed Instance in + pair. + :type partner_managed_instance_id: str + """ + + _attribute_map = { + 'primary_managed_instance_id': {'key': 'primaryManagedInstanceId', 'type': 'str'}, + 'partner_managed_instance_id': {'key': 'partnerManagedInstanceId', 'type': 'str'}, + } + + def __init__(self, *, primary_managed_instance_id: str=None, partner_managed_instance_id: str=None, **kwargs) -> None: + super(ManagedInstancePairInfo, self).__init__(**kwargs) + self.primary_managed_instance_id = primary_managed_instance_id + self.partner_managed_instance_id = partner_managed_instance_id + + +class ManagedInstanceUpdate(Model): + """An update request for an Azure SQL Database managed instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param sku: Managed instance sku + :type sku: ~azure.mgmt.sql.models.Sku + :param managed_instance_create_mode: Specifies the mode of database + creation. + Default: Regular instance creation. + Restore: Creates an instance by restoring a set of backups to specific + point in time. RestorePointInTime and SourceManagedInstanceId must be + specified. Possible values include: 'Default', 'PointInTimeRestore' + :type managed_instance_create_mode: str or + ~azure.mgmt.sql.models.ManagedServerCreateMode + :ivar fully_qualified_domain_name: The fully qualified domain name of the + managed instance. + :vartype fully_qualified_domain_name: str + :param administrator_login: Administrator username for the managed + instance. Can only be specified when the managed instance is being created + (and is required for creation). + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for managed instance creation). + :type administrator_login_password: str + :param subnet_id: Subnet resource ID for the managed instance. + :type subnet_id: str + :ivar state: The state of the managed instance. + :vartype state: str + :param license_type: The license type. Possible values are + 'LicenseIncluded' (regular price inclusive of a new SQL license) and + 'BasePrice' (discounted AHB price for bringing your own SQL licenses). + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or + ~azure.mgmt.sql.models.ManagedInstanceLicenseType + :param v_cores: The number of vCores. Allowed values: 8, 16, 24, 32, 40, + 64, 80. + :type v_cores: int + :param storage_size_in_gb: Storage size in GB. Minimum value: 32. Maximum + value: 8192. Increments of 32 GB allowed only. + :type storage_size_in_gb: int + :param collation: Collation of the managed instance. + :type collation: str + :ivar dns_zone: The Dns Zone that the managed instance is in. + :vartype dns_zone: str + :param dns_zone_partner: The resource id of another managed instance whose + DNS zone this managed instance will share after creation. + :type dns_zone_partner: str + :param public_data_endpoint_enabled: Whether or not the public data + endpoint is enabled. + :type public_data_endpoint_enabled: bool + :param source_managed_instance_id: The resource identifier of the source + managed instance associated with create operation of this instance. + :type source_managed_instance_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param proxy_override: Connection type used for connecting to the + instance. Possible values include: 'Proxy', 'Redirect', 'Default' + :type proxy_override: str or + ~azure.mgmt.sql.models.ManagedInstanceProxyOverride + :param timezone_id: Id of the timezone. Allowed values are timezones + supported by Windows. + Windows keeps details on supported timezones, including the id, in + registry under + KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time + Zones. + You can get those registry values via SQL Server by querying SELECT name + AS timezone_id FROM sys.time_zone_info. + List of Ids can also be obtained by executing + [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + An example of valid timezone id is "Pacific Standard Time" or "W. Europe + Standard Time". + :type timezone_id: str + :param instance_pool_id: The Id of the instance pool this managed server + belongs to. + :type instance_pool_id: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'fully_qualified_domain_name': {'readonly': True}, + 'state': {'readonly': True}, + 'dns_zone': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, + 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, + 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, + 'source_managed_instance_id': {'key': 'properties.sourceManagedInstanceId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, + 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, + 'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, sku=None, managed_instance_create_mode=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type=None, v_cores: int=None, storage_size_in_gb: int=None, collation: str=None, dns_zone_partner: str=None, public_data_endpoint_enabled: bool=None, source_managed_instance_id: str=None, restore_point_in_time=None, proxy_override=None, timezone_id: str=None, instance_pool_id: str=None, tags=None, **kwargs) -> None: + super(ManagedInstanceUpdate, self).__init__(**kwargs) + self.sku = sku + self.managed_instance_create_mode = managed_instance_create_mode + self.fully_qualified_domain_name = None + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.subnet_id = subnet_id + self.state = None + self.license_type = license_type + self.v_cores = v_cores + self.storage_size_in_gb = storage_size_in_gb + self.collation = collation + self.dns_zone = None + self.dns_zone_partner = dns_zone_partner + self.public_data_endpoint_enabled = public_data_endpoint_enabled + self.source_managed_instance_id = source_managed_instance_id + self.restore_point_in_time = restore_point_in_time + self.proxy_override = proxy_override + self.timezone_id = timezone_id + self.instance_pool_id = instance_pool_id + self.tags = tags + + +class ManagedInstanceVcoresCapability(Model): + """The managed instance virtual cores capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The virtual cores identifier. + :vartype name: str + :ivar value: The virtual cores value. + :vartype value: int + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'int'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ManagedInstanceVcoresCapability, self).__init__(**kwargs) + self.name = None + self.value = None + self.status = None + self.reason = reason + + +class ManagedInstanceVersionCapability(Model): + """The managed instance capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The server version name. + :vartype name: str + :ivar supported_editions: The list of supported managed instance editions. + :vartype supported_editions: + list[~azure.mgmt.sql.models.ManagedInstanceEditionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_editions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_editions': {'key': 'supportedEditions', 'type': '[ManagedInstanceEditionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ManagedInstanceVersionCapability, self).__init__(**kwargs) + self.name = None + self.supported_editions = None + self.status = None + self.reason = reason + + +class ManagedInstanceVulnerabilityAssessment(ProxyResource): + """A managed instance vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: Required. A blob storage container path to + hold the scan results (e.g. + https://myStorage.blob.core.windows.net/VaScans/). + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_container_path': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, *, storage_container_path: str, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: + super(ManagedInstanceVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = storage_container_path + self.storage_container_sas_key = storage_container_sas_key + self.storage_account_access_key = storage_account_access_key + self.recurring_scans = recurring_scans + + +class ManagedServerSecurityAlertPolicy(ProxyResource): + """A managed server security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: + super(ManagedServerSecurityAlertPolicy, self).__init__(**kwargs) + self.state = state + self.disabled_alerts = disabled_alerts + self.email_addresses = email_addresses + self.email_account_admins = email_account_admins + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.creation_time = None + + +class MaxSizeCapability(Model): + """The maximum size capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The maximum size limit (see 'unit' for the units). + :vartype limit: int + :ivar unit: The units that the limit is expressed in. Possible values + include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' + :vartype unit: str or ~azure.mgmt.sql.models.MaxSizeUnit + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'int'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MaxSizeCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + + +class MaxSizeRangeCapability(Model): + """The maximum size range capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar min_value: Minimum value. + :vartype min_value: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar max_value: Maximum value. + :vartype max_value: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar scale_size: Scale/step size for discrete values between the minimum + value and the maximum value. + :vartype scale_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar log_size: Size of transaction log. + :vartype log_size: ~azure.mgmt.sql.models.LogSizeCapability + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'min_value': {'readonly': True}, + 'max_value': {'readonly': True}, + 'scale_size': {'readonly': True}, + 'log_size': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'min_value': {'key': 'minValue', 'type': 'MaxSizeCapability'}, + 'max_value': {'key': 'maxValue', 'type': 'MaxSizeCapability'}, + 'scale_size': {'key': 'scaleSize', 'type': 'MaxSizeCapability'}, + 'log_size': {'key': 'logSize', 'type': 'LogSizeCapability'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(MaxSizeRangeCapability, self).__init__(**kwargs) + self.min_value = None + self.max_value = None + self.scale_size = None + self.log_size = None + self.status = None + self.reason = reason + + +class Metric(Model): + """Database metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar start_time: The start time for the metric (ISO-8601 format). + :vartype start_time: datetime + :ivar end_time: The end time for the metric (ISO-8601 format). + :vartype end_time: datetime + :ivar time_grain: The time step to be used to summarize the metric values. + :vartype time_grain: str + :ivar unit: The unit of the metric. Possible values include: 'count', + 'bytes', 'seconds', 'percent', 'countPerSecond', 'bytesPerSecond' + :vartype unit: str or ~azure.mgmt.sql.models.UnitType + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.sql.models.MetricName + :ivar metric_values: The metric values for the specified time window and + timestep. + :vartype metric_values: list[~azure.mgmt.sql.models.MetricValue] + """ + + _validation = { + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'time_grain': {'readonly': True}, + 'unit': {'readonly': True}, + 'name': {'readonly': True}, + 'metric_values': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'MetricName'}, + 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, + } + + def __init__(self, **kwargs) -> None: + super(Metric, self).__init__(**kwargs) + self.start_time = None + self.end_time = None + self.time_grain = None + self.unit = None + self.name = None + self.metric_values = None + + +class MetricAvailability(Model): + """A metric availability value. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar retention: The length of retention for the database metric. + :vartype retention: str + :ivar time_grain: The granularity of the database metric. + :vartype time_grain: str + """ + + _validation = { + 'retention': {'readonly': True}, + 'time_grain': {'readonly': True}, + } + + _attribute_map = { + 'retention': {'key': 'retention', 'type': 'str'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MetricAvailability, self).__init__(**kwargs) + self.retention = None + self.time_grain = None + + +class MetricDefinition(Model): + """A database metric definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.sql.models.MetricName + :ivar primary_aggregation_type: The primary aggregation type defining how + metric values are displayed. Possible values include: 'None', 'Average', + 'Count', 'Minimum', 'Maximum', 'Total' + :vartype primary_aggregation_type: str or + ~azure.mgmt.sql.models.PrimaryAggregationType + :ivar resource_uri: The resource uri of the database. + :vartype resource_uri: str + :ivar unit: The unit of the metric. Possible values include: 'Count', + 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' + :vartype unit: str or ~azure.mgmt.sql.models.UnitDefinitionType + :ivar metric_availabilities: The list of database metric availabilities + for the metric. + :vartype metric_availabilities: + list[~azure.mgmt.sql.models.MetricAvailability] + """ + + _validation = { + 'name': {'readonly': True}, + 'primary_aggregation_type': {'readonly': True}, + 'resource_uri': {'readonly': True}, + 'unit': {'readonly': True}, + 'metric_availabilities': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'MetricName'}, + 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, + } + + def __init__(self, **kwargs) -> None: + super(MetricDefinition, self).__init__(**kwargs) + self.name = None + self.primary_aggregation_type = None + self.resource_uri = None + self.unit = None + self.metric_availabilities = None + + +class MetricName(Model): + """A database metric name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The name of the database metric. + :vartype value: str + :ivar localized_value: The friendly name of the database metric. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MetricName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class MetricValue(Model): + """Represents database metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar count: The number of values for the metric. + :vartype count: float + :ivar average: The average value of the metric. + :vartype average: float + :ivar maximum: The max value of the metric. + :vartype maximum: float + :ivar minimum: The min value of the metric. + :vartype minimum: float + :ivar timestamp: The metric timestamp (ISO-8601 format). + :vartype timestamp: datetime + :ivar total: The total value of the metric. + :vartype total: float + """ + + _validation = { + 'count': {'readonly': True}, + 'average': {'readonly': True}, + 'maximum': {'readonly': True}, + 'minimum': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'total': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'float'}, + 'average': {'key': 'average', 'type': 'float'}, + 'maximum': {'key': 'maximum', 'type': 'float'}, + 'minimum': {'key': 'minimum', 'type': 'float'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'total': {'key': 'total', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(MetricValue, self).__init__(**kwargs) + self.count = None + self.average = None + self.maximum = None + self.minimum = None + self.timestamp = None + self.total = None + + +class Name(Model): + """ARM Usage Name. + + :param value: Usage name value + :type value: str + :param localized_value: Usage name localized value. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: + super(Name, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class Operation(Model): + """SQL REST API operation definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the operation being performed on this particular + object. + :vartype name: str + :ivar display: The localized display information for this particular + operation / action. + :vartype display: ~azure.mgmt.sql.models.OperationDisplay + :ivar origin: The intended executor of the operation. Possible values + include: 'user', 'system' + :vartype origin: str or ~azure.mgmt.sql.models.OperationOrigin + :ivar properties: Additional descriptions for the operation. + :vartype properties: dict[str, object] + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + 'origin': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + } + + def __init__(self, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + self.origin = None + self.properties = None + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The localized friendly form of the resource provider name. + :vartype provider: str + :ivar resource: The localized friendly form of the resource type related + to this action/operation. + :vartype resource: str + :ivar operation: The localized friendly name for the operation. + :vartype operation: str + :ivar description: The localized friendly description for the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class OperationImpact(Model): + """The impact of an operation, both in absolute and relative terms. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the impact dimension. + :vartype name: str + :ivar unit: The unit in which estimated impact to dimension is measured. + :vartype unit: str + :ivar change_value_absolute: The absolute impact to dimension. + :vartype change_value_absolute: float + :ivar change_value_relative: The relative impact to dimension (null if not + applicable) + :vartype change_value_relative: float + """ + + _validation = { + 'name': {'readonly': True}, + 'unit': {'readonly': True}, + 'change_value_absolute': {'readonly': True}, + 'change_value_relative': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'change_value_absolute': {'key': 'changeValueAbsolute', 'type': 'float'}, + 'change_value_relative': {'key': 'changeValueRelative', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationImpact, self).__init__(**kwargs) + self.name = None + self.unit = None + self.change_value_absolute = None + self.change_value_relative = None + + +class PartnerInfo(Model): + """Partner server information for the failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource identifier of the partner server. + :type id: str + :ivar location: Geo location of the partner server. + :vartype location: str + :ivar replication_role: Replication role of the partner server. Possible + values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.FailoverGroupReplicationRole + """ + + _validation = { + 'id': {'required': True}, + 'location': {'readonly': True}, + 'replication_role': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'replication_role': {'key': 'replicationRole', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(PartnerInfo, self).__init__(**kwargs) + self.id = id + self.location = None + self.replication_role = None + + +class PartnerRegionInfo(Model): + """Partner region information for the failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param location: Geo location of the partner managed instances. + :type location: str + :ivar replication_role: Replication role of the partner managed instances. + Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole + """ + + _validation = { + 'replication_role': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'replication_role': {'key': 'replicationRole', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, **kwargs) -> None: + super(PartnerRegionInfo, self).__init__(**kwargs) + self.location = location + self.replication_role = None + + +class PerformanceLevelCapability(Model): + """The performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: Performance level value. + :vartype value: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + """ + + _validation = { + 'value': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(PerformanceLevelCapability, self).__init__(**kwargs) + self.value = None + self.unit = None + + +class RecommendedElasticPool(ProxyResource): + """Represents a recommended elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_edition: The edition of the recommended elastic pool. The + ElasticPoolEdition enumeration contains all the valid editions. Possible + values include: 'Basic', 'Standard', 'Premium', 'GeneralPurpose', + 'BusinessCritical' + :vartype database_edition: str or + ~azure.mgmt.sql.models.ElasticPoolEdition + :param dtu: The DTU for the recommended elastic pool. + :type dtu: float + :param database_dtu_min: The minimum DTU for the database. + :type database_dtu_min: float + :param database_dtu_max: The maximum DTU for the database. + :type database_dtu_max: float + :param storage_mb: Gets storage size in megabytes. + :type storage_mb: float + :ivar observation_period_start: The observation period start (ISO8601 + format). + :vartype observation_period_start: datetime + :ivar observation_period_end: The observation period start (ISO8601 + format). + :vartype observation_period_end: datetime + :ivar max_observed_dtu: Gets maximum observed DTU. + :vartype max_observed_dtu: float + :ivar max_observed_storage_mb: Gets maximum observed storage in megabytes. + :vartype max_observed_storage_mb: float + :ivar databases: The list of databases in this pool. Expanded property + :vartype databases: list[~azure.mgmt.sql.models.TrackedResource] + :ivar metrics: The list of databases housed in the server. Expanded + property + :vartype metrics: + list[~azure.mgmt.sql.models.RecommendedElasticPoolMetric] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_edition': {'readonly': True}, + 'observation_period_start': {'readonly': True}, + 'observation_period_end': {'readonly': True}, + 'max_observed_dtu': {'readonly': True}, + 'max_observed_storage_mb': {'readonly': True}, + 'databases': {'readonly': True}, + 'metrics': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'dtu': {'key': 'properties.dtu', 'type': 'float'}, + 'database_dtu_min': {'key': 'properties.databaseDtuMin', 'type': 'float'}, + 'database_dtu_max': {'key': 'properties.databaseDtuMax', 'type': 'float'}, + 'storage_mb': {'key': 'properties.storageMB', 'type': 'float'}, + 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, + 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, + 'max_observed_dtu': {'key': 'properties.maxObservedDtu', 'type': 'float'}, + 'max_observed_storage_mb': {'key': 'properties.maxObservedStorageMB', 'type': 'float'}, + 'databases': {'key': 'properties.databases', 'type': '[TrackedResource]'}, + 'metrics': {'key': 'properties.metrics', 'type': '[RecommendedElasticPoolMetric]'}, + } + + def __init__(self, *, dtu: float=None, database_dtu_min: float=None, database_dtu_max: float=None, storage_mb: float=None, **kwargs) -> None: + super(RecommendedElasticPool, self).__init__(**kwargs) + self.database_edition = None + self.dtu = dtu + self.database_dtu_min = database_dtu_min + self.database_dtu_max = database_dtu_max + self.storage_mb = storage_mb + self.observation_period_start = None + self.observation_period_end = None + self.max_observed_dtu = None + self.max_observed_storage_mb = None + self.databases = None + self.metrics = None + + +class RecommendedElasticPoolMetric(Model): + """Represents recommended elastic pool metric. + + :param date_time_property: The time of metric (ISO8601 format). + :type date_time_property: datetime + :param dtu: Gets or sets the DTUs (Database Transaction Units). See + https://azure.microsoft.com/documentation/articles/sql-database-what-is-a-dtu/ + :type dtu: float + :param size_gb: Gets or sets size in gigabytes. + :type size_gb: float + """ + + _attribute_map = { + 'date_time_property': {'key': 'dateTime', 'type': 'iso-8601'}, + 'dtu': {'key': 'dtu', 'type': 'float'}, + 'size_gb': {'key': 'sizeGB', 'type': 'float'}, + } + + def __init__(self, *, date_time_property=None, dtu: float=None, size_gb: float=None, **kwargs) -> None: + super(RecommendedElasticPoolMetric, self).__init__(**kwargs) + self.date_time_property = date_time_property + self.dtu = dtu + self.size_gb = size_gb + + +class RecommendedIndex(ProxyResource): + """Represents a database recommended index. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar action: The proposed index action. You can create a missing index, + drop an unused index, or rebuild an existing index to improve its + performance. Possible values include: 'Create', 'Drop', 'Rebuild' + :vartype action: str or ~azure.mgmt.sql.models.RecommendedIndexAction + :ivar state: The current recommendation state. Possible values include: + 'Active', 'Pending', 'Executing', 'Verifying', 'Pending Revert', + 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success' + :vartype state: str or ~azure.mgmt.sql.models.RecommendedIndexState + :ivar created: The UTC datetime showing when this resource was created + (ISO8601 format). + :vartype created: datetime + :ivar last_modified: The UTC datetime of when was this resource last + changed (ISO8601 format). + :vartype last_modified: datetime + :ivar index_type: The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, + CLUSTERED COLUMNSTORE). Possible values include: 'CLUSTERED', + 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED COLUMNSTORE' + :vartype index_type: str or ~azure.mgmt.sql.models.RecommendedIndexType + :ivar schema: The schema where table to build index over resides + :vartype schema: str + :ivar table: The table on which to build index. + :vartype table: str + :ivar columns: Columns over which to build index + :vartype columns: list[str] + :ivar included_columns: The list of column names to be included in the + index + :vartype included_columns: list[str] + :ivar index_script: The full build index script + :vartype index_script: str + :ivar estimated_impact: The estimated impact of doing recommended index + action. + :vartype estimated_impact: list[~azure.mgmt.sql.models.OperationImpact] + :ivar reported_impact: The values reported after index action is complete. + :vartype reported_impact: list[~azure.mgmt.sql.models.OperationImpact] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'action': {'readonly': True}, + 'state': {'readonly': True}, + 'created': {'readonly': True}, + 'last_modified': {'readonly': True}, + 'index_type': {'readonly': True}, + 'schema': {'readonly': True}, + 'table': {'readonly': True}, + 'columns': {'readonly': True}, + 'included_columns': {'readonly': True}, + 'index_script': {'readonly': True}, + 'estimated_impact': {'readonly': True}, + 'reported_impact': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'action': {'key': 'properties.action', 'type': 'RecommendedIndexAction'}, + 'state': {'key': 'properties.state', 'type': 'RecommendedIndexState'}, + 'created': {'key': 'properties.created', 'type': 'iso-8601'}, + 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, + 'index_type': {'key': 'properties.indexType', 'type': 'RecommendedIndexType'}, + 'schema': {'key': 'properties.schema', 'type': 'str'}, + 'table': {'key': 'properties.table', 'type': 'str'}, + 'columns': {'key': 'properties.columns', 'type': '[str]'}, + 'included_columns': {'key': 'properties.includedColumns', 'type': '[str]'}, + 'index_script': {'key': 'properties.indexScript', 'type': 'str'}, + 'estimated_impact': {'key': 'properties.estimatedImpact', 'type': '[OperationImpact]'}, + 'reported_impact': {'key': 'properties.reportedImpact', 'type': '[OperationImpact]'}, + } + + def __init__(self, **kwargs) -> None: + super(RecommendedIndex, self).__init__(**kwargs) + self.action = None + self.state = None + self.created = None + self.last_modified = None + self.index_type = None + self.schema = None + self.table = None + self.columns = None + self.included_columns = None + self.index_script = None + self.estimated_impact = None + self.reported_impact = None + + +class RecoverableDatabase(ProxyResource): + """A recoverable database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar edition: The edition of the database + :vartype edition: str + :ivar service_level_objective: The service level objective name of the + database + :vartype service_level_objective: str + :ivar elastic_pool_name: The elastic pool name of the database + :vartype elastic_pool_name: str + :ivar last_available_backup_date: The last available backup date of the + database (ISO8601 format) + :vartype last_available_backup_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'edition': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'last_available_backup_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(RecoverableDatabase, self).__init__(**kwargs) + self.edition = None + self.service_level_objective = None + self.elastic_pool_name = None + self.last_available_backup_date = None + + +class RecoverableManagedDatabase(ProxyResource): + """A recoverable managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar last_available_backup_date: The last available backup date. + :vartype last_available_backup_date: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_available_backup_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(RecoverableManagedDatabase, self).__init__(**kwargs) + self.last_available_backup_date = None + + +class ReplicationLink(ProxyResource): + """Represents a database replication link. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Location of the server that contains this firewall rule. + :vartype location: str + :ivar is_termination_allowed: Legacy value indicating whether termination + is allowed. Currently always returns true. + :vartype is_termination_allowed: bool + :ivar replication_mode: Replication mode of this replication link. + :vartype replication_mode: str + :ivar partner_server: The name of the server hosting the partner database. + :vartype partner_server: str + :ivar partner_database: The name of the partner database. + :vartype partner_database: str + :ivar partner_location: The Azure Region of the partner database. + :vartype partner_location: str + :ivar role: The role of the database in the replication link. Possible + values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', + 'Copy' + :vartype role: str or ~azure.mgmt.sql.models.ReplicationRole + :ivar partner_role: The role of the partner database in the replication + link. Possible values include: 'Primary', 'Secondary', + 'NonReadableSecondary', 'Source', 'Copy' + :vartype partner_role: str or ~azure.mgmt.sql.models.ReplicationRole + :ivar start_time: The start time for the replication link. + :vartype start_time: datetime + :ivar percent_complete: The percentage of seeding complete for the + replication link. + :vartype percent_complete: int + :ivar replication_state: The replication state for the replication link. + Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP', 'SUSPENDED' + :vartype replication_state: str or ~azure.mgmt.sql.models.ReplicationState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'is_termination_allowed': {'readonly': True}, + 'replication_mode': {'readonly': True}, + 'partner_server': {'readonly': True}, + 'partner_database': {'readonly': True}, + 'partner_location': {'readonly': True}, + 'role': {'readonly': True}, + 'partner_role': {'readonly': True}, + 'start_time': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'replication_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'is_termination_allowed': {'key': 'properties.isTerminationAllowed', 'type': 'bool'}, + 'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'}, + 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, + 'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'}, + 'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'}, + 'role': {'key': 'properties.role', 'type': 'ReplicationRole'}, + 'partner_role': {'key': 'properties.partnerRole', 'type': 'ReplicationRole'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ReplicationLink, self).__init__(**kwargs) + self.location = None + self.is_termination_allowed = None + self.replication_mode = None + self.partner_server = None + self.partner_database = None + self.partner_location = None + self.role = None + self.partner_role = None + self.start_time = None + self.percent_complete = None + self.replication_state = None + + +class ResourceIdentity(Model): + """Azure Active Directory identity configuration for a resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The Azure Active Directory principal id. + :vartype principal_id: str + :param type: The identity type. Set this to 'SystemAssigned' in order to + automatically create and assign an Azure Active Directory principal for + the resource. Possible values include: 'SystemAssigned' + :type type: str or ~azure.mgmt.sql.models.IdentityType + :ivar tenant_id: The Azure Active Directory tenant id. + :vartype tenant_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(ResourceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.type = type + self.tenant_id = None + + +class ResourceMoveDefinition(Model): + """Contains the information necessary to perform a resource move (rename). + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The target ID for the resource + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(ResourceMoveDefinition, self).__init__(**kwargs) + self.id = id + + +class RestorableDroppedDatabase(ProxyResource): + """A restorable dropped database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: The geo-location where the resource lives + :vartype location: str + :ivar database_name: The name of the database + :vartype database_name: str + :ivar edition: The edition of the database + :vartype edition: str + :ivar max_size_bytes: The max size in bytes of the database + :vartype max_size_bytes: str + :ivar service_level_objective: The service level objective name of the + database + :vartype service_level_objective: str + :ivar elastic_pool_name: The elastic pool name of the database + :vartype elastic_pool_name: str + :ivar creation_date: The creation date of the database (ISO8601 format) + :vartype creation_date: datetime + :ivar deletion_date: The deletion date of the database (ISO8601 format) + :vartype deletion_date: datetime + :ivar earliest_restore_date: The earliest restore date of the database + (ISO8601 format) + :vartype earliest_restore_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'database_name': {'readonly': True}, + 'edition': {'readonly': True}, + 'max_size_bytes': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(RestorableDroppedDatabase, self).__init__(**kwargs) + self.location = None + self.database_name = None + self.edition = None + self.max_size_bytes = None + self.service_level_objective = None + self.elastic_pool_name = None + self.creation_date = None + self.deletion_date = None + self.earliest_restore_date = None + + +class RestorableDroppedManagedDatabase(TrackedResource): + """A restorable dropped managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar database_name: The name of the database. + :vartype database_name: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar deletion_date: The deletion date of the database (ISO8601 format). + :vartype deletion_date: datetime + :ivar earliest_restore_date: The earliest restore date of the database + (ISO8601 format). + :vartype earliest_restore_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'database_name': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(RestorableDroppedManagedDatabase, self).__init__(location=location, tags=tags, **kwargs) + self.database_name = None + self.creation_date = None + self.deletion_date = None + self.earliest_restore_date = None + + +class RestorePoint(ProxyResource): + """Database restore points. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar restore_point_type: The type of restore point. Possible values + include: 'CONTINUOUS', 'DISCRETE' + :vartype restore_point_type: str or + ~azure.mgmt.sql.models.RestorePointType + :ivar earliest_restore_date: The earliest time to which this database can + be restored + :vartype earliest_restore_date: datetime + :ivar restore_point_creation_date: The time the backup was taken + :vartype restore_point_creation_date: datetime + :ivar restore_point_label: The label of restore point for backup request + by user + :vartype restore_point_label: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'restore_point_type': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'restore_point_creation_date': {'readonly': True}, + 'restore_point_label': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'restore_point_type': {'key': 'properties.restorePointType', 'type': 'RestorePointType'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, + 'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(RestorePoint, self).__init__(**kwargs) + self.location = None + self.restore_point_type = None + self.earliest_restore_date = None + self.restore_point_creation_date = None + self.restore_point_label = None + + +class SensitivityLabel(ProxyResource): + """A sensitivity label. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param label_name: The label name. + :type label_name: str + :param label_id: The label ID. + :type label_id: str + :param information_type: The information type. + :type information_type: str + :param information_type_id: The information type ID. + :type information_type_id: str + :ivar is_disabled: Is sensitivity recommendation disabled. Applicable for + recommended sensitivity label only. Specifies whether the sensitivity + recommendation on this column is disabled (dismissed) or not. + :vartype is_disabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'is_disabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'label_name': {'key': 'properties.labelName', 'type': 'str'}, + 'label_id': {'key': 'properties.labelId', 'type': 'str'}, + 'information_type': {'key': 'properties.informationType', 'type': 'str'}, + 'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'}, + 'is_disabled': {'key': 'properties.isDisabled', 'type': 'bool'}, + } + + def __init__(self, *, label_name: str=None, label_id: str=None, information_type: str=None, information_type_id: str=None, **kwargs) -> None: + super(SensitivityLabel, self).__init__(**kwargs) + self.label_name = label_name + self.label_id = label_id + self.information_type = information_type + self.information_type_id = information_type_id + self.is_disabled = None + + +class Server(TrackedResource): + """An Azure SQL Database server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param identity: The Azure Active Directory identity of the server. + :type identity: ~azure.mgmt.sql.models.ResourceIdentity + :ivar kind: Kind of sql server. This is metadata used for the Azure portal + experience. + :vartype kind: str + :param administrator_login: Administrator username for the server. Once + created it cannot be changed. + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for server creation). + :type administrator_login_password: str + :param version: The version of the server. + :type version: str + :ivar state: The state of the server. + :vartype state: str + :ivar fully_qualified_domain_name: The fully qualified domain name of the + server. + :vartype fully_qualified_domain_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'state': {'readonly': True}, + 'fully_qualified_domain_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, identity=None, administrator_login: str=None, administrator_login_password: str=None, version: str=None, **kwargs) -> None: + super(Server, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity + self.kind = None + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.version = version + self.state = None + self.fully_qualified_domain_name = None + + +class ServerAutomaticTuning(ProxyResource): + """Server-level Automatic Tuning. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param desired_state: Automatic tuning desired state. Possible values + include: 'Custom', 'Auto', 'Unspecified' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningServerMode + :ivar actual_state: Automatic tuning actual state. Possible values + include: 'Custom', 'Auto', 'Unspecified' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningServerMode + :param options: Automatic tuning options definition. + :type options: dict[str, + ~azure.mgmt.sql.models.AutomaticTuningServerOptions] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'actual_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningServerMode'}, + 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningServerMode'}, + 'options': {'key': 'properties.options', 'type': '{AutomaticTuningServerOptions}'}, + } + + def __init__(self, *, desired_state=None, options=None, **kwargs) -> None: + super(ServerAutomaticTuning, self).__init__(**kwargs) + self.desired_state = desired_state + self.actual_state = None + self.options = options + + +class ServerAzureADAdministrator(ProxyResource): + """An server Active Directory Administrator. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar administrator_type: Required. The type of administrator. Default + value: "ActiveDirectory" . + :vartype administrator_type: str + :param login: Required. The server administrator login value. + :type login: str + :param sid: Required. The server administrator Sid (Secure ID). + :type sid: str + :param tenant_id: Required. The server Active Directory Administrator + tenant id. + :type tenant_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'administrator_type': {'required': True, 'constant': True}, + 'login': {'required': True}, + 'sid': {'required': True}, + 'tenant_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, + 'login': {'key': 'properties.login', 'type': 'str'}, + 'sid': {'key': 'properties.sid', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + } + + administrator_type = "ActiveDirectory" + + def __init__(self, *, login: str, sid: str, tenant_id: str, **kwargs) -> None: + super(ServerAzureADAdministrator, self).__init__(**kwargs) + self.login = login + self.sid = sid + self.tenant_id = tenant_id + + +class ServerBlobAuditingPolicy(ProxyResource): + """A server blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: + super(ServerBlobAuditingPolicy, self).__init__(**kwargs) + self.state = state + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.audit_actions_and_groups = audit_actions_and_groups + self.storage_account_subscription_id = storage_account_subscription_id + self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use + self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + + +class ServerCommunicationLink(ProxyResource): + """Server communication link. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar state: The state. + :vartype state: str + :param partner_server: Required. The name of the partner server. + :type partner_server: str + :ivar location: Communication link location. + :vartype location: str + :ivar kind: Communication link kind. This property is used for Azure + Portal metadata. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'partner_server': {'required': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, partner_server: str, **kwargs) -> None: + super(ServerCommunicationLink, self).__init__(**kwargs) + self.state = None + self.partner_server = partner_server + self.location = None + self.kind = None + + +class ServerConnectionPolicy(ProxyResource): + """A server secure connection policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Metadata used for the Azure portal experience. + :vartype kind: str + :ivar location: Resource location. + :vartype location: str + :param connection_type: Required. The server connection type. Possible + values include: 'Default', 'Proxy', 'Redirect' + :type connection_type: str or ~azure.mgmt.sql.models.ServerConnectionType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + 'connection_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'connection_type': {'key': 'properties.connectionType', 'type': 'ServerConnectionType'}, + } + + def __init__(self, *, connection_type, **kwargs) -> None: + super(ServerConnectionPolicy, self).__init__(**kwargs) + self.kind = None + self.location = None + self.connection_type = connection_type + + +class ServerDnsAlias(ProxyResource): + """A server DNS alias. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar azure_dns_record: The fully qualified DNS record for alias + :vartype azure_dns_record: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'azure_dns_record': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'azure_dns_record': {'key': 'properties.azureDnsRecord', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ServerDnsAlias, self).__init__(**kwargs) + self.azure_dns_record = None + + +class ServerDnsAliasAcquisition(Model): + """A server DNS alias acquisition request. + + :param old_server_dns_alias_id: The id of the server alias that will be + acquired to point to this server instead. + :type old_server_dns_alias_id: str + """ + + _attribute_map = { + 'old_server_dns_alias_id': {'key': 'oldServerDnsAliasId', 'type': 'str'}, + } + + def __init__(self, *, old_server_dns_alias_id: str=None, **kwargs) -> None: + super(ServerDnsAliasAcquisition, self).__init__(**kwargs) + self.old_server_dns_alias_id = old_server_dns_alias_id + + +class ServerKey(ProxyResource): + """A server key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :type kind: str + :ivar location: Resource location. + :vartype location: str + :ivar subregion: Subregion of the server key. + :vartype subregion: str + :param server_key_type: Required. The server key type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :param uri: The URI of the server key. + :type uri: str + :param thumbprint: Thumbprint of the server key. + :type thumbprint: str + :param creation_date: The server key creation date. + :type creation_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'subregion': {'readonly': True}, + 'server_key_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'subregion': {'key': 'properties.subregion', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, server_key_type, kind: str=None, uri: str=None, thumbprint: str=None, creation_date=None, **kwargs) -> None: + super(ServerKey, self).__init__(**kwargs) + self.kind = kind + self.location = None + self.subregion = None + self.server_key_type = server_key_type + self.uri = uri + self.thumbprint = thumbprint + self.creation_date = creation_date + + +class ServerSecurityAlertPolicy(ProxyResource): + """A server security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: + super(ServerSecurityAlertPolicy, self).__init__(**kwargs) + self.state = state + self.disabled_alerts = disabled_alerts + self.email_addresses = email_addresses + self.email_account_admins = email_account_admins + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.creation_time = None + + +class ServerUpdate(Model): + """An update request for an Azure SQL Database server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param administrator_login: Administrator username for the server. Once + created it cannot be changed. + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for server creation). + :type administrator_login_password: str + :param version: The version of the server. + :type version: str + :ivar state: The state of the server. + :vartype state: str + :ivar fully_qualified_domain_name: The fully qualified domain name of the + server. + :vartype fully_qualified_domain_name: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'state': {'readonly': True}, + 'fully_qualified_domain_name': {'readonly': True}, + } + + _attribute_map = { + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, administrator_login: str=None, administrator_login_password: str=None, version: str=None, tags=None, **kwargs) -> None: + super(ServerUpdate, self).__init__(**kwargs) + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.version = version + self.state = None + self.fully_qualified_domain_name = None + self.tags = tags + + +class ServerUsage(Model): + """Represents server metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the server usage metric. + :vartype name: str + :ivar resource_name: The name of the resource. + :vartype resource_name: str + :ivar display_name: The metric display name. + :vartype display_name: str + :ivar current_value: The current value of the metric. + :vartype current_value: float + :ivar limit: The current limit of the metric. + :vartype limit: float + :ivar unit: The units of the metric. + :vartype unit: str + :ivar next_reset_time: The next reset time for the metric (ISO8601 + format). + :vartype next_reset_time: datetime + """ + + _validation = { + 'name': {'readonly': True}, + 'resource_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'next_reset_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(ServerUsage, self).__init__(**kwargs) + self.name = None + self.resource_name = None + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + self.next_reset_time = None + + +class ServerVersionCapability(Model): + """The server capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The server version name. + :vartype name: str + :ivar supported_editions: The list of supported database editions. + :vartype supported_editions: + list[~azure.mgmt.sql.models.EditionCapability] + :ivar supported_elastic_pool_editions: The list of supported elastic pool + editions. + :vartype supported_elastic_pool_editions: + list[~azure.mgmt.sql.models.ElasticPoolEditionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_editions': {'readonly': True}, + 'supported_elastic_pool_editions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_editions': {'key': 'supportedEditions', 'type': '[EditionCapability]'}, + 'supported_elastic_pool_editions': {'key': 'supportedElasticPoolEditions', 'type': '[ElasticPoolEditionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ServerVersionCapability, self).__init__(**kwargs) + self.name = None + self.supported_editions = None + self.supported_elastic_pool_editions = None + self.status = None + self.reason = reason + + +class ServerVulnerabilityAssessment(ProxyResource): + """A server vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: Required. A blob storage container path to + hold the scan results (e.g. + https://myStorage.blob.core.windows.net/VaScans/). + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_container_path': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, *, storage_container_path: str, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: + super(ServerVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = storage_container_path + self.storage_container_sas_key = storage_container_sas_key + self.storage_account_access_key = storage_account_access_key + self.recurring_scans = recurring_scans + + +class ServiceObjective(ProxyResource): + """Represents a database service objective. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar service_objective_name: The name for the service objective. + :vartype service_objective_name: str + :ivar is_default: Gets whether the service level objective is the default + service objective. + :vartype is_default: bool + :ivar is_system: Gets whether the service level objective is a system + service objective. + :vartype is_system: bool + :ivar description: The description for the service level objective. + :vartype description: str + :ivar enabled: Gets whether the service level objective is enabled. + :vartype enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'service_objective_name': {'readonly': True}, + 'is_default': {'readonly': True}, + 'is_system': {'readonly': True}, + 'description': {'readonly': True}, + 'enabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'service_objective_name': {'key': 'properties.serviceObjectiveName', 'type': 'str'}, + 'is_default': {'key': 'properties.isDefault', 'type': 'bool'}, + 'is_system': {'key': 'properties.isSystem', 'type': 'bool'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(ServiceObjective, self).__init__(**kwargs) + self.service_objective_name = None + self.is_default = None + self.is_system = None + self.description = None + self.enabled = None + + +class ServiceObjectiveCapability(Model): + """The service objectives capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique ID of the service objective. + :vartype id: str + :ivar name: The service objective name. + :vartype name: str + :ivar supported_max_sizes: The list of supported maximum database sizes. + :vartype supported_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar performance_level: The performance level. + :vartype performance_level: + ~azure.mgmt.sql.models.PerformanceLevelCapability + :ivar sku: The sku. + :vartype sku: ~azure.mgmt.sql.models.Sku + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar included_max_size: The included (free) max size. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'supported_max_sizes': {'readonly': True}, + 'performance_level': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ServiceObjectiveCapability, self).__init__(**kwargs) + self.id = None + self.name = None + self.supported_max_sizes = None + self.performance_level = None + self.sku = None + self.supported_license_types = None + self.included_max_size = None + self.status = None + self.reason = reason + + +class ServiceTierAdvisor(ProxyResource): + """Represents a Service Tier Advisor. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar observation_period_start: The observation period start (ISO8601 + format). + :vartype observation_period_start: datetime + :ivar observation_period_end: The observation period start (ISO8601 + format). + :vartype observation_period_end: datetime + :ivar active_time_ratio: The activeTimeRatio for service tier advisor. + :vartype active_time_ratio: float + :ivar min_dtu: Gets or sets minDtu for service tier advisor. + :vartype min_dtu: float + :ivar avg_dtu: Gets or sets avgDtu for service tier advisor. + :vartype avg_dtu: float + :ivar max_dtu: Gets or sets maxDtu for service tier advisor. + :vartype max_dtu: float + :ivar max_size_in_gb: Gets or sets maxSizeInGB for service tier advisor. + :vartype max_size_in_gb: float + :ivar service_level_objective_usage_metrics: Gets or sets + serviceLevelObjectiveUsageMetrics for the service tier advisor. + :vartype service_level_objective_usage_metrics: + list[~azure.mgmt.sql.models.SloUsageMetric] + :ivar current_service_level_objective: Gets or sets + currentServiceLevelObjective for service tier advisor. + :vartype current_service_level_objective: str + :ivar current_service_level_objective_id: Gets or sets + currentServiceLevelObjectiveId for service tier advisor. + :vartype current_service_level_objective_id: str + :ivar usage_based_recommendation_service_level_objective: Gets or sets + usageBasedRecommendationServiceLevelObjective for service tier advisor. + :vartype usage_based_recommendation_service_level_objective: str + :ivar usage_based_recommendation_service_level_objective_id: Gets or sets + usageBasedRecommendationServiceLevelObjectiveId for service tier advisor. + :vartype usage_based_recommendation_service_level_objective_id: str + :ivar database_size_based_recommendation_service_level_objective: Gets or + sets databaseSizeBasedRecommendationServiceLevelObjective for service tier + advisor. + :vartype database_size_based_recommendation_service_level_objective: str + :ivar database_size_based_recommendation_service_level_objective_id: Gets + or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service + tier advisor. + :vartype database_size_based_recommendation_service_level_objective_id: + str + :ivar disaster_plan_based_recommendation_service_level_objective: Gets or + sets disasterPlanBasedRecommendationServiceLevelObjective for service tier + advisor. + :vartype disaster_plan_based_recommendation_service_level_objective: str + :ivar disaster_plan_based_recommendation_service_level_objective_id: Gets + or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service + tier advisor. + :vartype disaster_plan_based_recommendation_service_level_objective_id: + str + :ivar overall_recommendation_service_level_objective: Gets or sets + overallRecommendationServiceLevelObjective for service tier advisor. + :vartype overall_recommendation_service_level_objective: str + :ivar overall_recommendation_service_level_objective_id: Gets or sets + overallRecommendationServiceLevelObjectiveId for service tier advisor. + :vartype overall_recommendation_service_level_objective_id: str + :ivar confidence: Gets or sets confidence for service tier advisor. + :vartype confidence: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'observation_period_start': {'readonly': True}, + 'observation_period_end': {'readonly': True}, + 'active_time_ratio': {'readonly': True}, + 'min_dtu': {'readonly': True}, + 'avg_dtu': {'readonly': True}, + 'max_dtu': {'readonly': True}, + 'max_size_in_gb': {'readonly': True}, + 'service_level_objective_usage_metrics': {'readonly': True}, + 'current_service_level_objective': {'readonly': True}, + 'current_service_level_objective_id': {'readonly': True}, + 'usage_based_recommendation_service_level_objective': {'readonly': True}, + 'usage_based_recommendation_service_level_objective_id': {'readonly': True}, + 'database_size_based_recommendation_service_level_objective': {'readonly': True}, + 'database_size_based_recommendation_service_level_objective_id': {'readonly': True}, + 'disaster_plan_based_recommendation_service_level_objective': {'readonly': True}, + 'disaster_plan_based_recommendation_service_level_objective_id': {'readonly': True}, + 'overall_recommendation_service_level_objective': {'readonly': True}, + 'overall_recommendation_service_level_objective_id': {'readonly': True}, + 'confidence': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, + 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, + 'active_time_ratio': {'key': 'properties.activeTimeRatio', 'type': 'float'}, + 'min_dtu': {'key': 'properties.minDtu', 'type': 'float'}, + 'avg_dtu': {'key': 'properties.avgDtu', 'type': 'float'}, + 'max_dtu': {'key': 'properties.maxDtu', 'type': 'float'}, + 'max_size_in_gb': {'key': 'properties.maxSizeInGB', 'type': 'float'}, + 'service_level_objective_usage_metrics': {'key': 'properties.serviceLevelObjectiveUsageMetrics', 'type': '[SloUsageMetric]'}, + 'current_service_level_objective': {'key': 'properties.currentServiceLevelObjective', 'type': 'str'}, + 'current_service_level_objective_id': {'key': 'properties.currentServiceLevelObjectiveId', 'type': 'str'}, + 'usage_based_recommendation_service_level_objective': {'key': 'properties.usageBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'usage_based_recommendation_service_level_objective_id': {'key': 'properties.usageBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'database_size_based_recommendation_service_level_objective': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'database_size_based_recommendation_service_level_objective_id': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'disaster_plan_based_recommendation_service_level_objective': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'disaster_plan_based_recommendation_service_level_objective_id': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'overall_recommendation_service_level_objective': {'key': 'properties.overallRecommendationServiceLevelObjective', 'type': 'str'}, + 'overall_recommendation_service_level_objective_id': {'key': 'properties.overallRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'confidence': {'key': 'properties.confidence', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(ServiceTierAdvisor, self).__init__(**kwargs) + self.observation_period_start = None + self.observation_period_end = None + self.active_time_ratio = None + self.min_dtu = None + self.avg_dtu = None + self.max_dtu = None + self.max_size_in_gb = None + self.service_level_objective_usage_metrics = None + self.current_service_level_objective = None + self.current_service_level_objective_id = None + self.usage_based_recommendation_service_level_objective = None + self.usage_based_recommendation_service_level_objective_id = None + self.database_size_based_recommendation_service_level_objective = None + self.database_size_based_recommendation_service_level_objective_id = None + self.disaster_plan_based_recommendation_service_level_objective = None + self.disaster_plan_based_recommendation_service_level_objective_id = None + self.overall_recommendation_service_level_objective = None + self.overall_recommendation_service_level_objective_id = None + self.confidence = None + + +class Sku(Model): + """The resource model definition representing SKU. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Ex - P3. It is typically a + letter+number code + :type name: str + :param tier: This field is required to be implemented by the Resource + Provider if the service has more than one tier, but is not required on a + PUT. + :type tier: str + :param size: The SKU size. When the name field is the combination of tier + and some other value, this would be the standalone code. + :type size: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :param capacity: If the SKU supports scale out/in then the capacity + integer should be included. If scale out/in is not possible for the + resource this may be omitted. + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, *, name: str, tier: str=None, size: str=None, family: str=None, capacity: int=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.size = size + self.family = family + self.capacity = capacity + + +class SloUsageMetric(Model): + """A Slo Usage Metric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar service_level_objective: The serviceLevelObjective for SLO usage + metric. Possible values include: 'System', 'System0', 'System1', + 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', + 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', + 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', + 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', + 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', + 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', + 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', + 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' + :vartype service_level_objective: str or + ~azure.mgmt.sql.models.ServiceObjectiveName + :ivar service_level_objective_id: The serviceLevelObjectiveId for SLO + usage metric. + :vartype service_level_objective_id: str + :ivar in_range_time_ratio: Gets or sets inRangeTimeRatio for SLO usage + metric. + :vartype in_range_time_ratio: float + """ + + _validation = { + 'service_level_objective': {'readonly': True}, + 'service_level_objective_id': {'readonly': True}, + 'in_range_time_ratio': {'readonly': True}, + } + + _attribute_map = { + 'service_level_objective': {'key': 'serviceLevelObjective', 'type': 'str'}, + 'service_level_objective_id': {'key': 'serviceLevelObjectiveId', 'type': 'str'}, + 'in_range_time_ratio': {'key': 'inRangeTimeRatio', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(SloUsageMetric, self).__init__(**kwargs) + self.service_level_objective = None + self.service_level_objective_id = None + self.in_range_time_ratio = None + + +class SubscriptionUsage(ProxyResource): + """Usage Metric of a Subscription in a Location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar display_name: User-readable name of the metric. + :vartype display_name: str + :ivar current_value: Current value of the metric. + :vartype current_value: float + :ivar limit: Boundary value of the metric. + :vartype limit: float + :ivar unit: Unit of the metric. + :vartype unit: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'current_value': {'key': 'properties.currentValue', 'type': 'float'}, + 'limit': {'key': 'properties.limit', 'type': 'float'}, + 'unit': {'key': 'properties.unit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubscriptionUsage, self).__init__(**kwargs) + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + + +class SyncAgent(ProxyResource): + """An Azure SQL Database sync agent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar sync_agent_name: Name of the sync agent. + :vartype sync_agent_name: str + :param sync_database_id: ARM resource id of the sync database in the sync + agent. + :type sync_database_id: str + :ivar last_alive_time: Last alive time of the sync agent. + :vartype last_alive_time: datetime + :ivar state: State of the sync agent. Possible values include: 'Online', + 'Offline', 'NeverConnected' + :vartype state: str or ~azure.mgmt.sql.models.SyncAgentState + :ivar is_up_to_date: If the sync agent version is up to date. + :vartype is_up_to_date: bool + :ivar expiry_time: Expiration time of the sync agent version. + :vartype expiry_time: datetime + :ivar version: Version of the sync agent. + :vartype version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sync_agent_name': {'readonly': True}, + 'last_alive_time': {'readonly': True}, + 'state': {'readonly': True}, + 'is_up_to_date': {'readonly': True}, + 'expiry_time': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sync_agent_name': {'key': 'properties.name', 'type': 'str'}, + 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, + 'last_alive_time': {'key': 'properties.lastAliveTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'is_up_to_date': {'key': 'properties.isUpToDate', 'type': 'bool'}, + 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + } + + def __init__(self, *, sync_database_id: str=None, **kwargs) -> None: + super(SyncAgent, self).__init__(**kwargs) + self.sync_agent_name = None + self.sync_database_id = sync_database_id + self.last_alive_time = None + self.state = None + self.is_up_to_date = None + self.expiry_time = None + self.version = None + + +class SyncAgentKeyProperties(Model): + """Properties of an Azure SQL Database sync agent key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar sync_agent_key: Key of sync agent. + :vartype sync_agent_key: str + """ + + _validation = { + 'sync_agent_key': {'readonly': True}, + } + + _attribute_map = { + 'sync_agent_key': {'key': 'syncAgentKey', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncAgentKeyProperties, self).__init__(**kwargs) + self.sync_agent_key = None + + +class SyncAgentLinkedDatabase(ProxyResource): + """An Azure SQL Database sync agent linked database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_type: Type of the sync agent linked database. Possible + values include: 'AzureSqlDatabase', 'SqlServerDatabase' + :vartype database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType + :ivar database_id: Id of the sync agent linked database. + :vartype database_id: str + :ivar description: Description of the sync agent linked database. + :vartype description: str + :ivar server_name: Server name of the sync agent linked database. + :vartype server_name: str + :ivar database_name: Database name of the sync agent linked database. + :vartype database_name: str + :ivar user_name: User name of the sync agent linked database. + :vartype user_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_type': {'readonly': True}, + 'database_id': {'readonly': True}, + 'description': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncAgentLinkedDatabase, self).__init__(**kwargs) + self.database_type = None + self.database_id = None + self.description = None + self.server_name = None + self.database_name = None + self.user_name = None + + +class SyncDatabaseIdProperties(Model): + """Properties of the sync database id. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: ARM resource id of sync database. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncDatabaseIdProperties, self).__init__(**kwargs) + self.id = None + + +class SyncFullSchemaProperties(Model): + """Properties of the database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar tables: List of tables in the database full schema. + :vartype tables: list[~azure.mgmt.sql.models.SyncFullSchemaTable] + :ivar last_update_time: Last update time of the database schema. + :vartype last_update_time: datetime + """ + + _validation = { + 'tables': {'readonly': True}, + 'last_update_time': {'readonly': True}, + } + + _attribute_map = { + 'tables': {'key': 'tables', 'type': '[SyncFullSchemaTable]'}, + 'last_update_time': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncFullSchemaProperties, self).__init__(**kwargs) + self.tables = None + self.last_update_time = None + + +class SyncFullSchemaTable(Model): + """Properties of the table in the database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar columns: List of columns in the table of database full schema. + :vartype columns: list[~azure.mgmt.sql.models.SyncFullSchemaTableColumn] + :ivar error_id: Error id of the table. + :vartype error_id: str + :ivar has_error: If there is error in the table. + :vartype has_error: bool + :ivar name: Name of the table. + :vartype name: str + :ivar quoted_name: Quoted name of the table. + :vartype quoted_name: str + """ + + _validation = { + 'columns': {'readonly': True}, + 'error_id': {'readonly': True}, + 'has_error': {'readonly': True}, + 'name': {'readonly': True}, + 'quoted_name': {'readonly': True}, + } + + _attribute_map = { + 'columns': {'key': 'columns', 'type': '[SyncFullSchemaTableColumn]'}, + 'error_id': {'key': 'errorId', 'type': 'str'}, + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncFullSchemaTable, self).__init__(**kwargs) + self.columns = None + self.error_id = None + self.has_error = None + self.name = None + self.quoted_name = None + + +class SyncFullSchemaTableColumn(Model): + """Properties of the column in the table of database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar data_size: Data size of the column. + :vartype data_size: str + :ivar data_type: Data type of the column. + :vartype data_type: str + :ivar error_id: Error id of the column. + :vartype error_id: str + :ivar has_error: If there is error in the table. + :vartype has_error: bool + :ivar is_primary_key: If it is the primary key of the table. + :vartype is_primary_key: bool + :ivar name: Name of the column. + :vartype name: str + :ivar quoted_name: Quoted name of the column. + :vartype quoted_name: str + """ + + _validation = { + 'data_size': {'readonly': True}, + 'data_type': {'readonly': True}, + 'error_id': {'readonly': True}, + 'has_error': {'readonly': True}, + 'is_primary_key': {'readonly': True}, + 'name': {'readonly': True}, + 'quoted_name': {'readonly': True}, + } + + _attribute_map = { + 'data_size': {'key': 'dataSize', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + 'error_id': {'key': 'errorId', 'type': 'str'}, + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'is_primary_key': {'key': 'isPrimaryKey', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncFullSchemaTableColumn, self).__init__(**kwargs) + self.data_size = None + self.data_type = None + self.error_id = None + self.has_error = None + self.is_primary_key = None + self.name = None + self.quoted_name = None + + +class SyncGroup(ProxyResource): + """An Azure SQL Database sync group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param interval: Sync interval of the sync group. + :type interval: int + :ivar last_sync_time: Last sync time of the sync group. + :vartype last_sync_time: datetime + :param conflict_resolution_policy: Conflict resolution policy of the sync + group. Possible values include: 'HubWin', 'MemberWin' + :type conflict_resolution_policy: str or + ~azure.mgmt.sql.models.SyncConflictResolutionPolicy + :param sync_database_id: ARM resource id of the sync database in the sync + group. + :type sync_database_id: str + :param hub_database_user_name: User name for the sync group hub database + credential. + :type hub_database_user_name: str + :param hub_database_password: Password for the sync group hub database + credential. + :type hub_database_password: str + :ivar sync_state: Sync state of the sync group. Possible values include: + 'NotReady', 'Error', 'Warning', 'Progressing', 'Good' + :vartype sync_state: str or ~azure.mgmt.sql.models.SyncGroupState + :param schema: Sync schema of the sync group. + :type schema: ~azure.mgmt.sql.models.SyncGroupSchema + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_sync_time': {'readonly': True}, + 'sync_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'interval': {'key': 'properties.interval', 'type': 'int'}, + 'last_sync_time': {'key': 'properties.lastSyncTime', 'type': 'iso-8601'}, + 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'str'}, + 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, + 'hub_database_user_name': {'key': 'properties.hubDatabaseUserName', 'type': 'str'}, + 'hub_database_password': {'key': 'properties.hubDatabasePassword', 'type': 'str'}, + 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, + 'schema': {'key': 'properties.schema', 'type': 'SyncGroupSchema'}, + } + + def __init__(self, *, interval: int=None, conflict_resolution_policy=None, sync_database_id: str=None, hub_database_user_name: str=None, hub_database_password: str=None, schema=None, **kwargs) -> None: + super(SyncGroup, self).__init__(**kwargs) + self.interval = interval + self.last_sync_time = None + self.conflict_resolution_policy = conflict_resolution_policy + self.sync_database_id = sync_database_id + self.hub_database_user_name = hub_database_user_name + self.hub_database_password = hub_database_password + self.sync_state = None + self.schema = schema + + +class SyncGroupLogProperties(Model): + """Properties of an Azure SQL Database sync group log. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar timestamp: Timestamp of the sync group log. + :vartype timestamp: datetime + :ivar type: Type of the sync group log. Possible values include: 'All', + 'Error', 'Warning', 'Success' + :vartype type: str or ~azure.mgmt.sql.models.SyncGroupLogType + :ivar source: Source of the sync group log. + :vartype source: str + :ivar details: Details of the sync group log. + :vartype details: str + :ivar tracing_id: TracingId of the sync group log. + :vartype tracing_id: str + :ivar operation_status: OperationStatus of the sync group log. + :vartype operation_status: str + """ + + _validation = { + 'timestamp': {'readonly': True}, + 'type': {'readonly': True}, + 'source': {'readonly': True}, + 'details': {'readonly': True}, + 'tracing_id': {'readonly': True}, + 'operation_status': {'readonly': True}, + } + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, + 'tracing_id': {'key': 'tracingId', 'type': 'str'}, + 'operation_status': {'key': 'operationStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncGroupLogProperties, self).__init__(**kwargs) + self.timestamp = None + self.type = None + self.source = None + self.details = None + self.tracing_id = None + self.operation_status = None + + +class SyncGroupSchema(Model): + """Properties of sync group schema. + + :param tables: List of tables in sync group schema. + :type tables: list[~azure.mgmt.sql.models.SyncGroupSchemaTable] + :param master_sync_member_name: Name of master sync member where the + schema is from. + :type master_sync_member_name: str + """ + + _attribute_map = { + 'tables': {'key': 'tables', 'type': '[SyncGroupSchemaTable]'}, + 'master_sync_member_name': {'key': 'masterSyncMemberName', 'type': 'str'}, + } + + def __init__(self, *, tables=None, master_sync_member_name: str=None, **kwargs) -> None: + super(SyncGroupSchema, self).__init__(**kwargs) + self.tables = tables + self.master_sync_member_name = master_sync_member_name + + +class SyncGroupSchemaTable(Model): + """Properties of table in sync group schema. + + :param columns: List of columns in sync group schema. + :type columns: list[~azure.mgmt.sql.models.SyncGroupSchemaTableColumn] + :param quoted_name: Quoted name of sync group schema table. + :type quoted_name: str + """ + + _attribute_map = { + 'columns': {'key': 'columns', 'type': '[SyncGroupSchemaTableColumn]'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, *, columns=None, quoted_name: str=None, **kwargs) -> None: + super(SyncGroupSchemaTable, self).__init__(**kwargs) + self.columns = columns + self.quoted_name = quoted_name + + +class SyncGroupSchemaTableColumn(Model): + """Properties of column in sync group table. + + :param quoted_name: Quoted name of sync group table column. + :type quoted_name: str + :param data_size: Data size of the column. + :type data_size: str + :param data_type: Data type of the column. + :type data_type: str + """ + + _attribute_map = { + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + 'data_size': {'key': 'dataSize', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + } + + def __init__(self, *, quoted_name: str=None, data_size: str=None, data_type: str=None, **kwargs) -> None: + super(SyncGroupSchemaTableColumn, self).__init__(**kwargs) + self.quoted_name = quoted_name + self.data_size = data_size + self.data_type = data_type + + +class SyncMember(ProxyResource): + """An Azure SQL Database sync member. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param database_type: Database type of the sync member. Possible values + include: 'AzureSqlDatabase', 'SqlServerDatabase' + :type database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType + :param sync_agent_id: ARM resource id of the sync agent in the sync + member. + :type sync_agent_id: str + :param sql_server_database_id: SQL Server database id of the sync member. + :type sql_server_database_id: str + :param server_name: Server name of the member database in the sync member + :type server_name: str + :param database_name: Database name of the member database in the sync + member. + :type database_name: str + :param user_name: User name of the member database in the sync member. + :type user_name: str + :param password: Password of the member database in the sync member. + :type password: str + :param sync_direction: Sync direction of the sync member. Possible values + include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember' + :type sync_direction: str or ~azure.mgmt.sql.models.SyncDirection + :ivar sync_state: Sync state of the sync member. Possible values include: + 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', + 'DisabledTombstoneCleanup', 'DisabledBackupRestore', + 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', + 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', + 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', + 'ReprovisionFailed', 'UnReprovisioned' + :vartype sync_state: str or ~azure.mgmt.sql.models.SyncMemberState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sync_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, + 'sync_agent_id': {'key': 'properties.syncAgentId', 'type': 'str'}, + 'sql_server_database_id': {'key': 'properties.sqlServerDatabaseId', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'sync_direction': {'key': 'properties.syncDirection', 'type': 'str'}, + 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, + } + + def __init__(self, *, database_type=None, sync_agent_id: str=None, sql_server_database_id: str=None, server_name: str=None, database_name: str=None, user_name: str=None, password: str=None, sync_direction=None, **kwargs) -> None: + super(SyncMember, self).__init__(**kwargs) + self.database_type = database_type + self.sync_agent_id = sync_agent_id + self.sql_server_database_id = sql_server_database_id + self.server_name = server_name + self.database_name = database_name + self.user_name = user_name + self.password = password + self.sync_direction = sync_direction + self.sync_state = None + + +class TdeCertificate(ProxyResource): + """A TDE certificate that can be uploaded into a server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param private_blob: Required. The base64 encoded certificate private + blob. + :type private_blob: str + :param cert_password: The certificate password. + :type cert_password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'private_blob': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_blob': {'key': 'properties.privateBlob', 'type': 'str'}, + 'cert_password': {'key': 'properties.certPassword', 'type': 'str'}, + } + + def __init__(self, *, private_blob: str, cert_password: str=None, **kwargs) -> None: + super(TdeCertificate, self).__init__(**kwargs) + self.private_blob = private_blob + self.cert_password = cert_password + + +class TransparentDataEncryption(ProxyResource): + """Represents a database transparent data encryption configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :param status: The status of the database transparent data encryption. + Possible values include: 'Enabled', 'Disabled' + :type status: str or + ~azure.mgmt.sql.models.TransparentDataEncryptionStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'TransparentDataEncryptionStatus'}, + } + + def __init__(self, *, status=None, **kwargs) -> None: + super(TransparentDataEncryption, self).__init__(**kwargs) + self.location = None + self.status = status + + +class TransparentDataEncryptionActivity(ProxyResource): + """Represents a database transparent data encryption Scan. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar status: The status of the database. Possible values include: + 'Encrypting', 'Decrypting' + :vartype status: str or + ~azure.mgmt.sql.models.TransparentDataEncryptionActivityStatus + :ivar percent_complete: The percent complete of the transparent data + encryption scan for a database. + :vartype percent_complete: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'status': {'readonly': True}, + 'percent_complete': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(TransparentDataEncryptionActivity, self).__init__(**kwargs) + self.location = None + self.status = None + self.percent_complete = None + + +class Usage(Model): + """ARM usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: ~azure.mgmt.sql.models.Name + :ivar type: Resource type. + :vartype type: str + :ivar unit: Usage unit. + :vartype unit: str + :ivar current_value: Usage current value. + :vartype current_value: int + :ivar limit: Usage limit. + :vartype limit: int + :ivar requested_limit: Usage requested limit. + :vartype requested_limit: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'unit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'requested_limit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'Name'}, + 'type': {'key': 'type', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'int'}, + 'requested_limit': {'key': 'requestedLimit', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(Usage, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.unit = None + self.current_value = None + self.limit = None + self.requested_limit = None + + +class VirtualCluster(TrackedResource): + """An Azure SQL virtual cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar subnet_id: Subnet resource ID for the virtual cluster. + :vartype subnet_id: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :ivar child_resources: List of resources in this virtual cluster. + :vartype child_resources: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'subnet_id': {'readonly': True}, + 'child_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'family': {'key': 'properties.family', 'type': 'str'}, + 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, + } + + def __init__(self, *, location: str, tags=None, family: str=None, **kwargs) -> None: + super(VirtualCluster, self).__init__(location=location, tags=tags, **kwargs) + self.subnet_id = None + self.family = family + self.child_resources = None + + +class VirtualClusterUpdate(Model): + """An update request for an Azure SQL Database virtual cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar subnet_id: Subnet resource ID for the virtual cluster. + :vartype subnet_id: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :ivar child_resources: List of resources in this virtual cluster. + :vartype child_resources: list[str] + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'subnet_id': {'readonly': True}, + 'child_resources': {'readonly': True}, + } + + _attribute_map = { + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'family': {'key': 'properties.family', 'type': 'str'}, + 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, family: str=None, tags=None, **kwargs) -> None: + super(VirtualClusterUpdate, self).__init__(**kwargs) + self.subnet_id = None + self.family = family + self.child_resources = None + self.tags = tags + + +class VirtualNetworkRule(ProxyResource): + """A virtual network rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param virtual_network_subnet_id: Required. The ARM resource id of the + virtual network subnet. + :type virtual_network_subnet_id: str + :param ignore_missing_vnet_service_endpoint: Create firewall rule before + the virtual network has vnet service endpoint enabled. + :type ignore_missing_vnet_service_endpoint: bool + :ivar state: Virtual Network Rule State. Possible values include: + 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' + :vartype state: str or ~azure.mgmt.sql.models.VirtualNetworkRuleState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'virtual_network_subnet_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, + 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, *, virtual_network_subnet_id: str, ignore_missing_vnet_service_endpoint: bool=None, **kwargs) -> None: + super(VirtualNetworkRule, self).__init__(**kwargs) + self.virtual_network_subnet_id = virtual_network_subnet_id + self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint + self.state = None + + +class VulnerabilityAssessmentRecurringScansProperties(Model): + """Properties of a Vulnerability Assessment recurring scans. + + :param is_enabled: Recurring scans state. + :type is_enabled: bool + :param email_subscription_admins: Specifies that the schedule scan + notification will be is sent to the subscription administrators. Default + value: True . + :type email_subscription_admins: bool + :param emails: Specifies an array of e-mail addresses to which the scan + notification is sent. + :type emails: list[str] + """ + + _attribute_map = { + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'}, + 'emails': {'key': 'emails', 'type': '[str]'}, + } + + def __init__(self, *, is_enabled: bool=None, email_subscription_admins: bool=True, emails=None, **kwargs) -> None: + super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs) + self.is_enabled = is_enabled + self.email_subscription_admins = email_subscription_admins + self.emails = emails + + +class VulnerabilityAssessmentScanError(Model): + """Properties of a vulnerability assessment scan error. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(VulnerabilityAssessmentScanError, self).__init__(**kwargs) + self.code = None + self.message = None + + +class VulnerabilityAssessmentScanRecord(ProxyResource): + """A vulnerability assessment scan record. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar scan_id: The scan ID. + :vartype scan_id: str + :ivar trigger_type: The scan trigger type. Possible values include: + 'OnDemand', 'Recurring' + :vartype trigger_type: str or + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanTriggerType + :ivar state: The scan status. Possible values include: 'Passed', 'Failed', + 'FailedToRun', 'InProgress' + :vartype state: str or + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanState + :ivar start_time: The scan start time (UTC). + :vartype start_time: datetime + :ivar end_time: The scan end time (UTC). + :vartype end_time: datetime + :ivar errors: The scan errors. + :vartype errors: + list[~azure.mgmt.sql.models.VulnerabilityAssessmentScanError] + :ivar storage_container_path: The scan results storage container path. + :vartype storage_container_path: str + :ivar number_of_failed_security_checks: The number of failed security + checks. + :vartype number_of_failed_security_checks: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'scan_id': {'readonly': True}, + 'trigger_type': {'readonly': True}, + 'state': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'errors': {'readonly': True}, + 'storage_container_path': {'readonly': True}, + 'number_of_failed_security_checks': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'scan_id': {'key': 'properties.scanId', 'type': 'str'}, + 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'errors': {'key': 'properties.errors', 'type': '[VulnerabilityAssessmentScanError]'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'number_of_failed_security_checks': {'key': 'properties.numberOfFailedSecurityChecks', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(VulnerabilityAssessmentScanRecord, self).__init__(**kwargs) + self.scan_id = None + self.trigger_type = None + self.state = None + self.start_time = None + self.end_time = None + self.errors = None + self.storage_container_path = None + self.number_of_failed_security_checks = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py new file mode 100644 index 000000000000..43eb7dc78de9 --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py @@ -0,0 +1,885 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class RecoverableDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`RecoverableDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RecoverableDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(RecoverableDatabasePaged, self).__init__(*args, **kwargs) +class RestorableDroppedDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`RestorableDroppedDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RestorableDroppedDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(RestorableDroppedDatabasePaged, self).__init__(*args, **kwargs) +class ServerPaged(Paged): + """ + A paging container for iterating over a list of :class:`Server ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Server]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerPaged, self).__init__(*args, **kwargs) +class DataMaskingRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`DataMaskingRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DataMaskingRule]'} + } + + def __init__(self, *args, **kwargs): + + super(DataMaskingRulePaged, self).__init__(*args, **kwargs) +class FirewallRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`FirewallRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[FirewallRule]'} + } + + def __init__(self, *args, **kwargs): + + super(FirewallRulePaged, self).__init__(*args, **kwargs) +class GeoBackupPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`GeoBackupPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GeoBackupPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(GeoBackupPolicyPaged, self).__init__(*args, **kwargs) +class MetricPaged(Paged): + """ + A paging container for iterating over a list of :class:`Metric ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Metric]'} + } + + def __init__(self, *args, **kwargs): + + super(MetricPaged, self).__init__(*args, **kwargs) +class MetricDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`MetricDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[MetricDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(MetricDefinitionPaged, self).__init__(*args, **kwargs) +class DatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`Database ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Database]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabasePaged, self).__init__(*args, **kwargs) +class ElasticPoolPaged(Paged): + """ + A paging container for iterating over a list of :class:`ElasticPool ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ElasticPool]'} + } + + def __init__(self, *args, **kwargs): + + super(ElasticPoolPaged, self).__init__(*args, **kwargs) +class RecommendedElasticPoolPaged(Paged): + """ + A paging container for iterating over a list of :class:`RecommendedElasticPool ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RecommendedElasticPool]'} + } + + def __init__(self, *args, **kwargs): + + super(RecommendedElasticPoolPaged, self).__init__(*args, **kwargs) +class RecommendedElasticPoolMetricPaged(Paged): + """ + A paging container for iterating over a list of :class:`RecommendedElasticPoolMetric ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RecommendedElasticPoolMetric]'} + } + + def __init__(self, *args, **kwargs): + + super(RecommendedElasticPoolMetricPaged, self).__init__(*args, **kwargs) +class ReplicationLinkPaged(Paged): + """ + A paging container for iterating over a list of :class:`ReplicationLink ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ReplicationLink]'} + } + + def __init__(self, *args, **kwargs): + + super(ReplicationLinkPaged, self).__init__(*args, **kwargs) +class ServerAzureADAdministratorPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerAzureADAdministrator ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerAzureADAdministrator]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerAzureADAdministratorPaged, self).__init__(*args, **kwargs) +class ServerCommunicationLinkPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerCommunicationLink ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerCommunicationLink]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerCommunicationLinkPaged, self).__init__(*args, **kwargs) +class ServiceObjectivePaged(Paged): + """ + A paging container for iterating over a list of :class:`ServiceObjective ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServiceObjective]'} + } + + def __init__(self, *args, **kwargs): + + super(ServiceObjectivePaged, self).__init__(*args, **kwargs) +class ElasticPoolActivityPaged(Paged): + """ + A paging container for iterating over a list of :class:`ElasticPoolActivity ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ElasticPoolActivity]'} + } + + def __init__(self, *args, **kwargs): + + super(ElasticPoolActivityPaged, self).__init__(*args, **kwargs) +class ElasticPoolDatabaseActivityPaged(Paged): + """ + A paging container for iterating over a list of :class:`ElasticPoolDatabaseActivity ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ElasticPoolDatabaseActivity]'} + } + + def __init__(self, *args, **kwargs): + + super(ElasticPoolDatabaseActivityPaged, self).__init__(*args, **kwargs) +class ServiceTierAdvisorPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServiceTierAdvisor ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServiceTierAdvisor]'} + } + + def __init__(self, *args, **kwargs): + + super(ServiceTierAdvisorPaged, self).__init__(*args, **kwargs) +class TransparentDataEncryptionActivityPaged(Paged): + """ + A paging container for iterating over a list of :class:`TransparentDataEncryptionActivity ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TransparentDataEncryptionActivity]'} + } + + def __init__(self, *args, **kwargs): + + super(TransparentDataEncryptionActivityPaged, self).__init__(*args, **kwargs) +class ServerUsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerUsage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerUsage]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerUsagePaged, self).__init__(*args, **kwargs) +class DatabaseUsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`DatabaseUsage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseUsage]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseUsagePaged, self).__init__(*args, **kwargs) +class EncryptionProtectorPaged(Paged): + """ + A paging container for iterating over a list of :class:`EncryptionProtector ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[EncryptionProtector]'} + } + + def __init__(self, *args, **kwargs): + + super(EncryptionProtectorPaged, self).__init__(*args, **kwargs) +class FailoverGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`FailoverGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[FailoverGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(FailoverGroupPaged, self).__init__(*args, **kwargs) +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class ServerKeyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerKey ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerKey]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerKeyPaged, self).__init__(*args, **kwargs) +class SyncAgentPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncAgent ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncAgent]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncAgentPaged, self).__init__(*args, **kwargs) +class SyncAgentLinkedDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncAgentLinkedDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncAgentLinkedDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncAgentLinkedDatabasePaged, self).__init__(*args, **kwargs) +class SyncDatabaseIdPropertiesPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncDatabaseIdProperties ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncDatabaseIdProperties]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncDatabaseIdPropertiesPaged, self).__init__(*args, **kwargs) +class SyncFullSchemaPropertiesPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncFullSchemaProperties ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncFullSchemaProperties]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncFullSchemaPropertiesPaged, self).__init__(*args, **kwargs) +class SyncGroupLogPropertiesPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncGroupLogProperties ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncGroupLogProperties]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncGroupLogPropertiesPaged, self).__init__(*args, **kwargs) +class SyncGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncGroupPaged, self).__init__(*args, **kwargs) +class SyncMemberPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncMember ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncMember]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncMemberPaged, self).__init__(*args, **kwargs) +class SubscriptionUsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`SubscriptionUsage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SubscriptionUsage]'} + } + + def __init__(self, *args, **kwargs): + + super(SubscriptionUsagePaged, self).__init__(*args, **kwargs) +class VirtualClusterPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualCluster ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualCluster]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualClusterPaged, self).__init__(*args, **kwargs) +class VirtualNetworkRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualNetworkRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualNetworkRule]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualNetworkRulePaged, self).__init__(*args, **kwargs) +class DatabaseVulnerabilityAssessmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`DatabaseVulnerabilityAssessment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseVulnerabilityAssessment]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) +class JobAgentPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobAgent ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobAgent]'} + } + + def __init__(self, *args, **kwargs): + + super(JobAgentPaged, self).__init__(*args, **kwargs) +class JobCredentialPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobCredential ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobCredential]'} + } + + def __init__(self, *args, **kwargs): + + super(JobCredentialPaged, self).__init__(*args, **kwargs) +class JobExecutionPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobExecution ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobExecution]'} + } + + def __init__(self, *args, **kwargs): + + super(JobExecutionPaged, self).__init__(*args, **kwargs) +class JobPaged(Paged): + """ + A paging container for iterating over a list of :class:`Job ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Job]'} + } + + def __init__(self, *args, **kwargs): + + super(JobPaged, self).__init__(*args, **kwargs) +class JobStepPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobStep ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobStep]'} + } + + def __init__(self, *args, **kwargs): + + super(JobStepPaged, self).__init__(*args, **kwargs) +class JobTargetGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobTargetGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobTargetGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(JobTargetGroupPaged, self).__init__(*args, **kwargs) +class JobVersionPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobVersion ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobVersion]'} + } + + def __init__(self, *args, **kwargs): + + super(JobVersionPaged, self).__init__(*args, **kwargs) +class LongTermRetentionBackupPaged(Paged): + """ + A paging container for iterating over a list of :class:`LongTermRetentionBackup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[LongTermRetentionBackup]'} + } + + def __init__(self, *args, **kwargs): + + super(LongTermRetentionBackupPaged, self).__init__(*args, **kwargs) +class ManagedBackupShortTermRetentionPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedBackupShortTermRetentionPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedBackupShortTermRetentionPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedBackupShortTermRetentionPolicyPaged, self).__init__(*args, **kwargs) +class ManagedDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedDatabasePaged, self).__init__(*args, **kwargs) +class ServerDnsAliasPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerDnsAlias ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerDnsAlias]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerDnsAliasPaged, self).__init__(*args, **kwargs) +class ServerSecurityAlertPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerSecurityAlertPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerSecurityAlertPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) +class RestorableDroppedManagedDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`RestorableDroppedManagedDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RestorableDroppedManagedDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(RestorableDroppedManagedDatabasePaged, self).__init__(*args, **kwargs) +class RestorePointPaged(Paged): + """ + A paging container for iterating over a list of :class:`RestorePoint ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RestorePoint]'} + } + + def __init__(self, *args, **kwargs): + + super(RestorePointPaged, self).__init__(*args, **kwargs) +class ManagedDatabaseSecurityAlertPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedDatabaseSecurityAlertPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedDatabaseSecurityAlertPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedDatabaseSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) +class ManagedServerSecurityAlertPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedServerSecurityAlertPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedServerSecurityAlertPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedServerSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) +class SensitivityLabelPaged(Paged): + """ + A paging container for iterating over a list of :class:`SensitivityLabel ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SensitivityLabel]'} + } + + def __init__(self, *args, **kwargs): + + super(SensitivityLabelPaged, self).__init__(*args, **kwargs) +class DatabaseOperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`DatabaseOperation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseOperation]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseOperationPaged, self).__init__(*args, **kwargs) +class ElasticPoolOperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`ElasticPoolOperation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ElasticPoolOperation]'} + } + + def __init__(self, *args, **kwargs): + + super(ElasticPoolOperationPaged, self).__init__(*args, **kwargs) +class VulnerabilityAssessmentScanRecordPaged(Paged): + """ + A paging container for iterating over a list of :class:`VulnerabilityAssessmentScanRecord ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VulnerabilityAssessmentScanRecord]'} + } + + def __init__(self, *args, **kwargs): + + super(VulnerabilityAssessmentScanRecordPaged, self).__init__(*args, **kwargs) +class InstanceFailoverGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`InstanceFailoverGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[InstanceFailoverGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(InstanceFailoverGroupPaged, self).__init__(*args, **kwargs) +class BackupShortTermRetentionPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`BackupShortTermRetentionPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BackupShortTermRetentionPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(BackupShortTermRetentionPolicyPaged, self).__init__(*args, **kwargs) +class ManagedInstanceKeyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedInstanceKey ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedInstanceKey]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedInstanceKeyPaged, self).__init__(*args, **kwargs) +class ManagedInstanceEncryptionProtectorPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedInstanceEncryptionProtector ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedInstanceEncryptionProtector]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedInstanceEncryptionProtectorPaged, self).__init__(*args, **kwargs) +class RecoverableManagedDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`RecoverableManagedDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RecoverableManagedDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(RecoverableManagedDatabasePaged, self).__init__(*args, **kwargs) +class ManagedInstanceVulnerabilityAssessmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedInstanceVulnerabilityAssessment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedInstanceVulnerabilityAssessment]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedInstanceVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) +class ServerVulnerabilityAssessmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerVulnerabilityAssessment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerVulnerabilityAssessment]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) +class InstancePoolPaged(Paged): + """ + A paging container for iterating over a list of :class:`InstancePool ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[InstancePool]'} + } + + def __init__(self, *args, **kwargs): + + super(InstancePoolPaged, self).__init__(*args, **kwargs) +class UsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Usage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Usage]'} + } + + def __init__(self, *args, **kwargs): + + super(UsagePaged, self).__init__(*args, **kwargs) +class ManagedInstancePaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedInstance ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedInstance]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedInstancePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py index de1d73caf27c..0ac10a4f69f8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py @@ -85,6 +85,9 @@ class DatabaseEdition(str, Enum): data_warehouse = "DataWarehouse" system = "System" system2 = "System2" + general_purpose = "GeneralPurpose" + business_critical = "BusinessCritical" + hyperscale = "Hyperscale" class ServiceObjectiveName(str, Enum): @@ -203,6 +206,8 @@ class ElasticPoolEdition(str, Enum): basic = "Basic" standard = "Standard" premium = "Premium" + general_purpose = "GeneralPurpose" + business_critical = "BusinessCritical" class ReplicationRole(str, Enum): @@ -320,24 +325,17 @@ class FailoverGroupReplicationRole(str, Enum): secondary = "Secondary" -class IdentityType(str, Enum): - - system_assigned = "SystemAssigned" - - -class ManagedInstanceProxyOverride(str, Enum): - - proxy = "Proxy" - redirect = "Redirect" - default = "Default" - - class OperationOrigin(str, Enum): user = "user" system = "system" +class IdentityType(str, Enum): + + system_assigned = "SystemAssigned" + + class SyncAgentState(str, Enum): online = "Online" @@ -612,6 +610,8 @@ class DatabaseStatus(str, Enum): paused = "Paused" resuming = "Resuming" scaling = "Scaling" + offline_changing_dw_performance_tiers = "OfflineChangingDwPerformanceTiers" + online_changing_dw_performance_tiers = "OnlineChangingDwPerformanceTiers" class DatabaseLicenseType(str, Enum): @@ -659,6 +659,31 @@ class InstanceFailoverGroupReplicationRole(str, Enum): secondary = "Secondary" +class InstancePoolLicenseType(str, Enum): + + license_included = "LicenseIncluded" + base_price = "BasePrice" + + +class ManagedServerCreateMode(str, Enum): + + default = "Default" + point_in_time_restore = "PointInTimeRestore" + + +class ManagedInstanceLicenseType(str, Enum): + + license_included = "LicenseIncluded" + base_price = "BasePrice" + + +class ManagedInstanceProxyOverride(str, Enum): + + proxy = "Proxy" + redirect = "Redirect" + default = "Default" + + class LongTermRetentionDatabaseState(str, Enum): all = "All" diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options.py deleted file mode 100644 index 42c5aa7ac8a1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutomaticTuningOptions(Model): - """Automatic tuning properties for individual advisors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param desired_state: Automatic tuning option desired state. Possible - values include: 'Off', 'On', 'Default' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired - :ivar actual_state: Automatic tuning option actual state. Possible values - include: 'Off', 'On' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual - :ivar reason_code: Reason code if desired and actual state are different. - :vartype reason_code: int - :ivar reason_desc: Reason description if desired and actual state are - different. Possible values include: 'Default', 'Disabled', - 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', - 'QueryStoreReadOnly', 'NotSupported' - :vartype reason_desc: str or - ~azure.mgmt.sql.models.AutomaticTuningDisabledReason - """ - - _validation = { - 'actual_state': {'readonly': True}, - 'reason_code': {'readonly': True}, - 'reason_desc': {'readonly': True}, - } - - _attribute_map = { - 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, - 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, - 'reason_code': {'key': 'reasonCode', 'type': 'int'}, - 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningDisabledReason'}, - } - - def __init__(self, **kwargs): - super(AutomaticTuningOptions, self).__init__(**kwargs) - self.desired_state = kwargs.get('desired_state', None) - self.actual_state = None - self.reason_code = None - self.reason_desc = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options_py3.py deleted file mode 100644 index b55fd35d8157..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutomaticTuningOptions(Model): - """Automatic tuning properties for individual advisors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param desired_state: Automatic tuning option desired state. Possible - values include: 'Off', 'On', 'Default' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired - :ivar actual_state: Automatic tuning option actual state. Possible values - include: 'Off', 'On' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual - :ivar reason_code: Reason code if desired and actual state are different. - :vartype reason_code: int - :ivar reason_desc: Reason description if desired and actual state are - different. Possible values include: 'Default', 'Disabled', - 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', - 'QueryStoreReadOnly', 'NotSupported' - :vartype reason_desc: str or - ~azure.mgmt.sql.models.AutomaticTuningDisabledReason - """ - - _validation = { - 'actual_state': {'readonly': True}, - 'reason_code': {'readonly': True}, - 'reason_desc': {'readonly': True}, - } - - _attribute_map = { - 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, - 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, - 'reason_code': {'key': 'reasonCode', 'type': 'int'}, - 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningDisabledReason'}, - } - - def __init__(self, *, desired_state=None, **kwargs) -> None: - super(AutomaticTuningOptions, self).__init__(**kwargs) - self.desired_state = desired_state - self.actual_state = None - self.reason_code = None - self.reason_desc = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options.py deleted file mode 100644 index ef7fbcc75e4b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutomaticTuningServerOptions(Model): - """Automatic tuning properties for individual advisors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param desired_state: Automatic tuning option desired state. Possible - values include: 'Off', 'On', 'Default' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired - :ivar actual_state: Automatic tuning option actual state. Possible values - include: 'Off', 'On' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual - :ivar reason_code: Reason code if desired and actual state are different. - :vartype reason_code: int - :ivar reason_desc: Reason description if desired and actual state are - different. Possible values include: 'Default', 'Disabled', - 'AutoConfigured' - :vartype reason_desc: str or - ~azure.mgmt.sql.models.AutomaticTuningServerReason - """ - - _validation = { - 'actual_state': {'readonly': True}, - 'reason_code': {'readonly': True}, - 'reason_desc': {'readonly': True}, - } - - _attribute_map = { - 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, - 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, - 'reason_code': {'key': 'reasonCode', 'type': 'int'}, - 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningServerReason'}, - } - - def __init__(self, **kwargs): - super(AutomaticTuningServerOptions, self).__init__(**kwargs) - self.desired_state = kwargs.get('desired_state', None) - self.actual_state = None - self.reason_code = None - self.reason_desc = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options_py3.py deleted file mode 100644 index 28e5fc0873ad..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutomaticTuningServerOptions(Model): - """Automatic tuning properties for individual advisors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param desired_state: Automatic tuning option desired state. Possible - values include: 'Off', 'On', 'Default' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired - :ivar actual_state: Automatic tuning option actual state. Possible values - include: 'Off', 'On' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual - :ivar reason_code: Reason code if desired and actual state are different. - :vartype reason_code: int - :ivar reason_desc: Reason description if desired and actual state are - different. Possible values include: 'Default', 'Disabled', - 'AutoConfigured' - :vartype reason_desc: str or - ~azure.mgmt.sql.models.AutomaticTuningServerReason - """ - - _validation = { - 'actual_state': {'readonly': True}, - 'reason_code': {'readonly': True}, - 'reason_desc': {'readonly': True}, - } - - _attribute_map = { - 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, - 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, - 'reason_code': {'key': 'reasonCode', 'type': 'int'}, - 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningServerReason'}, - } - - def __init__(self, *, desired_state=None, **kwargs) -> None: - super(AutomaticTuningServerOptions, self).__init__(**kwargs) - self.desired_state = desired_state - self.actual_state = None - self.reason_code = None - self.reason_desc = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy.py deleted file mode 100644 index 544110988a82..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class BackupLongTermRetentionPolicy(ProxyResource): - """A long term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param weekly_retention: The weekly retention policy for an LTR backup in - an ISO 8601 format. - :type weekly_retention: str - :param monthly_retention: The monthly retention policy for an LTR backup - in an ISO 8601 format. - :type monthly_retention: str - :param yearly_retention: The yearly retention policy for an LTR backup in - an ISO 8601 format. - :type yearly_retention: str - :param week_of_year: The week of year to take the yearly backup in an ISO - 8601 format. - :type week_of_year: int - """ - - _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'}, - 'weekly_retention': {'key': 'properties.weeklyRetention', 'type': 'str'}, - 'monthly_retention': {'key': 'properties.monthlyRetention', 'type': 'str'}, - 'yearly_retention': {'key': 'properties.yearlyRetention', 'type': 'str'}, - 'week_of_year': {'key': 'properties.weekOfYear', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(BackupLongTermRetentionPolicy, self).__init__(**kwargs) - self.weekly_retention = kwargs.get('weekly_retention', None) - self.monthly_retention = kwargs.get('monthly_retention', None) - self.yearly_retention = kwargs.get('yearly_retention', None) - self.week_of_year = kwargs.get('week_of_year', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_py3.py deleted file mode 100644 index 6e7cb8ace394..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class BackupLongTermRetentionPolicy(ProxyResource): - """A long term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param weekly_retention: The weekly retention policy for an LTR backup in - an ISO 8601 format. - :type weekly_retention: str - :param monthly_retention: The monthly retention policy for an LTR backup - in an ISO 8601 format. - :type monthly_retention: str - :param yearly_retention: The yearly retention policy for an LTR backup in - an ISO 8601 format. - :type yearly_retention: str - :param week_of_year: The week of year to take the yearly backup in an ISO - 8601 format. - :type week_of_year: int - """ - - _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'}, - 'weekly_retention': {'key': 'properties.weeklyRetention', 'type': 'str'}, - 'monthly_retention': {'key': 'properties.monthlyRetention', 'type': 'str'}, - 'yearly_retention': {'key': 'properties.yearlyRetention', 'type': 'str'}, - 'week_of_year': {'key': 'properties.weekOfYear', 'type': 'int'}, - } - - def __init__(self, *, weekly_retention: str=None, monthly_retention: str=None, yearly_retention: str=None, week_of_year: int=None, **kwargs) -> None: - super(BackupLongTermRetentionPolicy, self).__init__(**kwargs) - self.weekly_retention = weekly_retention - self.monthly_retention = monthly_retention - self.yearly_retention = yearly_retention - self.week_of_year = week_of_year diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy.py deleted file mode 100644 index 1d4fba2cfff4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class BackupShortTermRetentionPolicy(ProxyResource): - """A short term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param retention_days: The backup retention period in days. This is how - many days Point-in-Time Restore will be supported. - :type retention_days: int - """ - - _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'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) - self.retention_days = kwargs.get('retention_days', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_paged.py deleted file mode 100644 index 16d31e341795..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class BackupShortTermRetentionPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`BackupShortTermRetentionPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[BackupShortTermRetentionPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(BackupShortTermRetentionPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_py3.py deleted file mode 100644 index 9df25577baf3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class BackupShortTermRetentionPolicy(ProxyResource): - """A short term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param retention_days: The backup retention period in days. This is how - many days Point-in-Time Restore will be supported. - :type retention_days: int - """ - - _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'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, *, retention_days: int=None, **kwargs) -> None: - super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) - self.retention_days = retention_days diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request.py deleted file mode 100644 index 345059f6dd49..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailabilityRequest(Model): - """A request to check whether the specified name for a resource is available. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name whose availability is to be checked. - :type name: str - :ivar type: Required. The type of resource that is used as the scope of - the availability check. Default value: "Microsoft.Sql/servers" . - :vartype type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - type = "Microsoft.Sql/servers" - - def __init__(self, **kwargs): - super(CheckNameAvailabilityRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request_py3.py deleted file mode 100644 index 5399ec3a7ffb..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailabilityRequest(Model): - """A request to check whether the specified name for a resource is available. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name whose availability is to be checked. - :type name: str - :ivar type: Required. The type of resource that is used as the scope of - the availability check. Default value: "Microsoft.Sql/servers" . - :vartype type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - type = "Microsoft.Sql/servers" - - def __init__(self, *, name: str, **kwargs) -> None: - super(CheckNameAvailabilityRequest, self).__init__(**kwargs) - self.name = name diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response.py deleted file mode 100644 index 40f429db82da..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailabilityResponse(Model): - """A response indicating whether the specified name for a resource is - available. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar available: True if the name is available, otherwise false. - :vartype available: bool - :ivar message: A message explaining why the name is unavailable. Will be - null if the name is available. - :vartype message: str - :ivar name: The name whose availability was checked. - :vartype name: str - :ivar reason: The reason code explaining why the name is unavailable. Will - be null if the name is available. Possible values include: 'Invalid', - 'AlreadyExists' - :vartype reason: str or ~azure.mgmt.sql.models.CheckNameAvailabilityReason - """ - - _validation = { - 'available': {'readonly': True}, - 'message': {'readonly': True}, - 'name': {'readonly': True}, - 'reason': {'readonly': True}, - } - - _attribute_map = { - 'available': {'key': 'available', 'type': 'bool'}, - 'message': {'key': 'message', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'reason': {'key': 'reason', 'type': 'CheckNameAvailabilityReason'}, - } - - def __init__(self, **kwargs): - super(CheckNameAvailabilityResponse, self).__init__(**kwargs) - self.available = None - self.message = None - self.name = None - self.reason = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response_py3.py deleted file mode 100644 index 613c8fd41661..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailabilityResponse(Model): - """A response indicating whether the specified name for a resource is - available. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar available: True if the name is available, otherwise false. - :vartype available: bool - :ivar message: A message explaining why the name is unavailable. Will be - null if the name is available. - :vartype message: str - :ivar name: The name whose availability was checked. - :vartype name: str - :ivar reason: The reason code explaining why the name is unavailable. Will - be null if the name is available. Possible values include: 'Invalid', - 'AlreadyExists' - :vartype reason: str or ~azure.mgmt.sql.models.CheckNameAvailabilityReason - """ - - _validation = { - 'available': {'readonly': True}, - 'message': {'readonly': True}, - 'name': {'readonly': True}, - 'reason': {'readonly': True}, - } - - _attribute_map = { - 'available': {'key': 'available', 'type': 'bool'}, - 'message': {'key': 'message', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'reason': {'key': 'reason', 'type': 'CheckNameAvailabilityReason'}, - } - - def __init__(self, **kwargs) -> None: - super(CheckNameAvailabilityResponse, self).__init__(**kwargs) - self.available = None - self.message = None - self.name = None - self.reason = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition.py deleted file mode 100644 index 926012a21f09..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CompleteDatabaseRestoreDefinition(Model): - """Contains the information necessary to perform a complete database restore - operation. - - All required parameters must be populated in order to send to Azure. - - :param last_backup_name: Required. The last backup name to apply - :type last_backup_name: str - """ - - _validation = { - 'last_backup_name': {'required': True}, - } - - _attribute_map = { - 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CompleteDatabaseRestoreDefinition, self).__init__(**kwargs) - self.last_backup_name = kwargs.get('last_backup_name', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition_py3.py deleted file mode 100644 index 8b3c7f3da1f8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CompleteDatabaseRestoreDefinition(Model): - """Contains the information necessary to perform a complete database restore - operation. - - All required parameters must be populated in order to send to Azure. - - :param last_backup_name: Required. The last backup name to apply - :type last_backup_name: str - """ - - _validation = { - 'last_backup_name': {'required': True}, - } - - _attribute_map = { - 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, - } - - def __init__(self, *, last_backup_name: str, **kwargs) -> None: - super(CompleteDatabaseRestoreDefinition, self).__init__(**kwargs) - self.last_backup_name = last_backup_name diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition.py deleted file mode 100644 index 34ae6626306e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreateDatabaseRestorePointDefinition(Model): - """Contains the information necessary to perform a create database restore - point operation. - - All required parameters must be populated in order to send to Azure. - - :param restore_point_label: Required. The restore point label to apply - :type restore_point_label: str - """ - - _validation = { - 'restore_point_label': {'required': True}, - } - - _attribute_map = { - 'restore_point_label': {'key': 'restorePointLabel', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CreateDatabaseRestorePointDefinition, self).__init__(**kwargs) - self.restore_point_label = kwargs.get('restore_point_label', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition_py3.py deleted file mode 100644 index 7200fc8c236a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreateDatabaseRestorePointDefinition(Model): - """Contains the information necessary to perform a create database restore - point operation. - - All required parameters must be populated in order to send to Azure. - - :param restore_point_label: Required. The restore point label to apply - :type restore_point_label: str - """ - - _validation = { - 'restore_point_label': {'required': True}, - } - - _attribute_map = { - 'restore_point_label': {'key': 'restorePointLabel', 'type': 'str'}, - } - - def __init__(self, *, restore_point_label: str, **kwargs) -> None: - super(CreateDatabaseRestorePointDefinition, self).__init__(**kwargs) - self.restore_point_label = restore_point_label diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy.py deleted file mode 100644 index a872d3af9676..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DataMaskingPolicy(ProxyResource): - """Represents a database data masking policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param data_masking_state: Required. The state of the data masking policy. - Possible values include: 'Disabled', 'Enabled' - :type data_masking_state: str or ~azure.mgmt.sql.models.DataMaskingState - :param exempt_principals: The list of the exempt principals. Specifies the - semicolon-separated list of database users for which the data masking - policy does not apply. The specified users receive data results without - masking for all of the database queries. - :type exempt_principals: str - :ivar application_principals: The list of the application principals. This - is a legacy parameter and is no longer used. - :vartype application_principals: str - :ivar masking_level: The masking level. This is a legacy parameter and is - no longer used. - :vartype masking_level: str - :ivar location: The location of the data masking policy. - :vartype location: str - :ivar kind: The kind of data masking policy. Metadata, used for Azure - portal. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'data_masking_state': {'required': True}, - 'application_principals': {'readonly': True}, - 'masking_level': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data_masking_state': {'key': 'properties.dataMaskingState', 'type': 'DataMaskingState'}, - 'exempt_principals': {'key': 'properties.exemptPrincipals', 'type': 'str'}, - 'application_principals': {'key': 'properties.applicationPrincipals', 'type': 'str'}, - 'masking_level': {'key': 'properties.maskingLevel', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataMaskingPolicy, self).__init__(**kwargs) - self.data_masking_state = kwargs.get('data_masking_state', None) - self.exempt_principals = kwargs.get('exempt_principals', None) - self.application_principals = None - self.masking_level = None - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy_py3.py deleted file mode 100644 index c2227aeb60da..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DataMaskingPolicy(ProxyResource): - """Represents a database data masking policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param data_masking_state: Required. The state of the data masking policy. - Possible values include: 'Disabled', 'Enabled' - :type data_masking_state: str or ~azure.mgmt.sql.models.DataMaskingState - :param exempt_principals: The list of the exempt principals. Specifies the - semicolon-separated list of database users for which the data masking - policy does not apply. The specified users receive data results without - masking for all of the database queries. - :type exempt_principals: str - :ivar application_principals: The list of the application principals. This - is a legacy parameter and is no longer used. - :vartype application_principals: str - :ivar masking_level: The masking level. This is a legacy parameter and is - no longer used. - :vartype masking_level: str - :ivar location: The location of the data masking policy. - :vartype location: str - :ivar kind: The kind of data masking policy. Metadata, used for Azure - portal. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'data_masking_state': {'required': True}, - 'application_principals': {'readonly': True}, - 'masking_level': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data_masking_state': {'key': 'properties.dataMaskingState', 'type': 'DataMaskingState'}, - 'exempt_principals': {'key': 'properties.exemptPrincipals', 'type': 'str'}, - 'application_principals': {'key': 'properties.applicationPrincipals', 'type': 'str'}, - 'masking_level': {'key': 'properties.maskingLevel', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, data_masking_state, exempt_principals: str=None, **kwargs) -> None: - super(DataMaskingPolicy, self).__init__(**kwargs) - self.data_masking_state = data_masking_state - self.exempt_principals = exempt_principals - self.application_principals = None - self.masking_level = None - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule.py deleted file mode 100644 index 9c31fca591b6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DataMaskingRule(ProxyResource): - """Represents a database data masking rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar data_masking_rule_id: The rule Id. - :vartype data_masking_rule_id: str - :param alias_name: The alias name. This is a legacy parameter and is no - longer used. - :type alias_name: str - :param rule_state: The rule state. Used to delete a rule. To delete an - existing rule, specify the schemaName, tableName, columnName, - maskingFunction, and specify ruleState as disabled. However, if the rule - doesn't already exist, the rule will be created with ruleState set to - enabled, regardless of the provided value of ruleState. Possible values - include: 'Disabled', 'Enabled' - :type rule_state: str or ~azure.mgmt.sql.models.DataMaskingRuleState - :param schema_name: Required. The schema name on which the data masking - rule is applied. - :type schema_name: str - :param table_name: Required. The table name on which the data masking rule - is applied. - :type table_name: str - :param column_name: Required. The column name on which the data masking - rule is applied. - :type column_name: str - :param masking_function: Required. The masking function that is used for - the data masking rule. Possible values include: 'Default', 'CCN', 'Email', - 'Number', 'SSN', 'Text' - :type masking_function: str or ~azure.mgmt.sql.models.DataMaskingFunction - :param number_from: The numberFrom property of the masking rule. Required - if maskingFunction is set to Number, otherwise this parameter will be - ignored. - :type number_from: str - :param number_to: The numberTo property of the data masking rule. Required - if maskingFunction is set to Number, otherwise this parameter will be - ignored. - :type number_to: str - :param prefix_size: If maskingFunction is set to Text, the number of - characters to show unmasked in the beginning of the string. Otherwise, - this parameter will be ignored. - :type prefix_size: str - :param suffix_size: If maskingFunction is set to Text, the number of - characters to show unmasked at the end of the string. Otherwise, this - parameter will be ignored. - :type suffix_size: str - :param replacement_string: If maskingFunction is set to Text, the - character to use for masking the unexposed part of the string. Otherwise, - this parameter will be ignored. - :type replacement_string: str - :ivar location: The location of the data masking rule. - :vartype location: str - :ivar kind: The kind of Data Masking Rule. Metadata, used for Azure - portal. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'data_masking_rule_id': {'readonly': True}, - 'schema_name': {'required': True}, - 'table_name': {'required': True}, - 'column_name': {'required': True}, - 'masking_function': {'required': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data_masking_rule_id': {'key': 'properties.id', 'type': 'str'}, - 'alias_name': {'key': 'properties.aliasName', 'type': 'str'}, - 'rule_state': {'key': 'properties.ruleState', 'type': 'DataMaskingRuleState'}, - 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, - 'table_name': {'key': 'properties.tableName', 'type': 'str'}, - 'column_name': {'key': 'properties.columnName', 'type': 'str'}, - 'masking_function': {'key': 'properties.maskingFunction', 'type': 'DataMaskingFunction'}, - 'number_from': {'key': 'properties.numberFrom', 'type': 'str'}, - 'number_to': {'key': 'properties.numberTo', 'type': 'str'}, - 'prefix_size': {'key': 'properties.prefixSize', 'type': 'str'}, - 'suffix_size': {'key': 'properties.suffixSize', 'type': 'str'}, - 'replacement_string': {'key': 'properties.replacementString', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataMaskingRule, self).__init__(**kwargs) - self.data_masking_rule_id = None - self.alias_name = kwargs.get('alias_name', None) - self.rule_state = kwargs.get('rule_state', None) - self.schema_name = kwargs.get('schema_name', None) - self.table_name = kwargs.get('table_name', None) - self.column_name = kwargs.get('column_name', None) - self.masking_function = kwargs.get('masking_function', None) - self.number_from = kwargs.get('number_from', None) - self.number_to = kwargs.get('number_to', None) - self.prefix_size = kwargs.get('prefix_size', None) - self.suffix_size = kwargs.get('suffix_size', None) - self.replacement_string = kwargs.get('replacement_string', None) - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_paged.py deleted file mode 100644 index 4e1eed7b9f51..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DataMaskingRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`DataMaskingRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DataMaskingRule]'} - } - - def __init__(self, *args, **kwargs): - - super(DataMaskingRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_py3.py deleted file mode 100644 index 775fd78a2d6b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_py3.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DataMaskingRule(ProxyResource): - """Represents a database data masking rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar data_masking_rule_id: The rule Id. - :vartype data_masking_rule_id: str - :param alias_name: The alias name. This is a legacy parameter and is no - longer used. - :type alias_name: str - :param rule_state: The rule state. Used to delete a rule. To delete an - existing rule, specify the schemaName, tableName, columnName, - maskingFunction, and specify ruleState as disabled. However, if the rule - doesn't already exist, the rule will be created with ruleState set to - enabled, regardless of the provided value of ruleState. Possible values - include: 'Disabled', 'Enabled' - :type rule_state: str or ~azure.mgmt.sql.models.DataMaskingRuleState - :param schema_name: Required. The schema name on which the data masking - rule is applied. - :type schema_name: str - :param table_name: Required. The table name on which the data masking rule - is applied. - :type table_name: str - :param column_name: Required. The column name on which the data masking - rule is applied. - :type column_name: str - :param masking_function: Required. The masking function that is used for - the data masking rule. Possible values include: 'Default', 'CCN', 'Email', - 'Number', 'SSN', 'Text' - :type masking_function: str or ~azure.mgmt.sql.models.DataMaskingFunction - :param number_from: The numberFrom property of the masking rule. Required - if maskingFunction is set to Number, otherwise this parameter will be - ignored. - :type number_from: str - :param number_to: The numberTo property of the data masking rule. Required - if maskingFunction is set to Number, otherwise this parameter will be - ignored. - :type number_to: str - :param prefix_size: If maskingFunction is set to Text, the number of - characters to show unmasked in the beginning of the string. Otherwise, - this parameter will be ignored. - :type prefix_size: str - :param suffix_size: If maskingFunction is set to Text, the number of - characters to show unmasked at the end of the string. Otherwise, this - parameter will be ignored. - :type suffix_size: str - :param replacement_string: If maskingFunction is set to Text, the - character to use for masking the unexposed part of the string. Otherwise, - this parameter will be ignored. - :type replacement_string: str - :ivar location: The location of the data masking rule. - :vartype location: str - :ivar kind: The kind of Data Masking Rule. Metadata, used for Azure - portal. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'data_masking_rule_id': {'readonly': True}, - 'schema_name': {'required': True}, - 'table_name': {'required': True}, - 'column_name': {'required': True}, - 'masking_function': {'required': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data_masking_rule_id': {'key': 'properties.id', 'type': 'str'}, - 'alias_name': {'key': 'properties.aliasName', 'type': 'str'}, - 'rule_state': {'key': 'properties.ruleState', 'type': 'DataMaskingRuleState'}, - 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, - 'table_name': {'key': 'properties.tableName', 'type': 'str'}, - 'column_name': {'key': 'properties.columnName', 'type': 'str'}, - 'masking_function': {'key': 'properties.maskingFunction', 'type': 'DataMaskingFunction'}, - 'number_from': {'key': 'properties.numberFrom', 'type': 'str'}, - 'number_to': {'key': 'properties.numberTo', 'type': 'str'}, - 'prefix_size': {'key': 'properties.prefixSize', 'type': 'str'}, - 'suffix_size': {'key': 'properties.suffixSize', 'type': 'str'}, - 'replacement_string': {'key': 'properties.replacementString', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, schema_name: str, table_name: str, column_name: str, masking_function, alias_name: str=None, rule_state=None, number_from: str=None, number_to: str=None, prefix_size: str=None, suffix_size: str=None, replacement_string: str=None, **kwargs) -> None: - super(DataMaskingRule, self).__init__(**kwargs) - self.data_masking_rule_id = None - self.alias_name = alias_name - self.rule_state = rule_state - self.schema_name = schema_name - self.table_name = table_name - self.column_name = column_name - self.masking_function = masking_function - self.number_from = number_from - self.number_to = number_to - self.prefix_size = prefix_size - self.suffix_size = suffix_size - self.replacement_string = replacement_string - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database.py deleted file mode 100644 index f3f66d024a7a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database.py +++ /dev/null @@ -1,237 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class Database(TrackedResource): - """A database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :ivar kind: Kind of database. This is metadata used for the Azure portal - experience. - :vartype kind: str - :ivar managed_by: Resource that manages the database. - :vartype managed_by: str - :param create_mode: Specifies the mode of database creation. - Default: regular database creation. - Copy: creates a database as a copy of an existing database. - sourceDatabaseId must be specified as the resource ID of the source - database. - Secondary: creates a database as a secondary replica of an existing - database. sourceDatabaseId must be specified as the resource ID of the - existing primary database. - PointInTimeRestore: Creates a database by restoring a point in time backup - of an existing database. sourceDatabaseId must be specified as the - resource ID of the existing database, and restorePointInTime must be - specified. - Recovery: Creates a database by restoring a geo-replicated backup. - sourceDatabaseId must be specified as the recoverable database resource ID - to restore. - Restore: Creates a database by restoring a backup of a deleted database. - sourceDatabaseId must be specified. If sourceDatabaseId is the database's - original resource ID, then sourceDatabaseDeletionDate must be specified. - Otherwise sourceDatabaseId must be the restorable dropped database - resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime - may also be specified to restore from an earlier point in time. - RestoreLongTermRetentionBackup: Creates a database by restoring from a - long term retention vault. recoveryServicesRecoveryPointResourceId must be - specified as the recovery point resource ID. - Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for - DataWarehouse edition. Possible values include: 'Default', 'Copy', - 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', - 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', - 'RestoreLongTermRetentionBackup', 'OnlineSecondary' - :type create_mode: str or ~azure.mgmt.sql.models.CreateMode - :param collation: The collation of the database. - :type collation: str - :param max_size_bytes: The max size of the database expressed in bytes. - :type max_size_bytes: long - :param sample_name: The name of the sample schema to apply when creating - this database. Possible values include: 'AdventureWorksLT', - 'WideWorldImportersStd', 'WideWorldImportersFull' - :type sample_name: str or ~azure.mgmt.sql.models.SampleName - :param elastic_pool_id: The resource identifier of the elastic pool - containing this database. - :type elastic_pool_id: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :ivar status: The status of the database. Possible values include: - 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', - 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', - 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', - 'Paused', 'Resuming', 'Scaling' - :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus - :ivar database_id: The ID of the database. - :vartype database_id: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar current_service_objective_name: The current service level objective - name of the database. - :vartype current_service_objective_name: str - :ivar requested_service_objective_name: The requested service level - objective name of the database. - :vartype requested_service_objective_name: str - :ivar default_secondary_location: The default secondary region for this - database. - :vartype default_secondary_location: str - :ivar failover_group_id: Failover Group resource identifier that this - database belongs to. - :vartype failover_group_id: str - :param restore_point_in_time: Specifies the point in time (ISO8601 format) - of the source database that will be restored to create the new database. - :type restore_point_in_time: datetime - :param source_database_deletion_date: Specifies the time that the database - was deleted. - :type source_database_deletion_date: datetime - :param recovery_services_recovery_point_id: The resource identifier of the - recovery point associated with create operation of this database. - :type recovery_services_recovery_point_id: str - :param long_term_retention_backup_resource_id: The resource identifier of - the long term retention backup associated with create operation of this - database. - :type long_term_retention_backup_resource_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param restorable_dropped_database_id: The resource identifier of the - restorable dropped database associated with create operation of this - database. - :type restorable_dropped_database_id: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param zone_redundant: Whether or not this database is zone redundant, - which means the replicas of this database will be spread across multiple - availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this database. Possible - values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType - :ivar max_log_size_bytes: The max log size for this database. - :vartype max_log_size_bytes: long - :ivar earliest_restore_date: This records the earliest start date and time - that restore is available for this database (ISO8601 format). - :vartype earliest_restore_date: datetime - :param read_scale: The state of read-only routing. If enabled, connections - that have application intent set to readonly in their connection string - may be routed to a readonly secondary replica in the same region. Possible - values include: 'Enabled', 'Disabled' - :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale - :ivar current_sku: The name and tier of the SKU. - :vartype current_sku: ~azure.mgmt.sql.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'managed_by': {'readonly': True}, - 'status': {'readonly': True}, - 'database_id': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'current_service_objective_name': {'readonly': True}, - 'requested_service_objective_name': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - 'max_log_size_bytes': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'current_sku': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, - 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, - 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, - 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, - 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, - 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs): - super(Database, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.kind = None - self.managed_by = None - self.create_mode = kwargs.get('create_mode', None) - self.collation = kwargs.get('collation', None) - self.max_size_bytes = kwargs.get('max_size_bytes', None) - self.sample_name = kwargs.get('sample_name', None) - self.elastic_pool_id = kwargs.get('elastic_pool_id', None) - self.source_database_id = kwargs.get('source_database_id', None) - self.status = None - self.database_id = None - self.creation_date = None - self.current_service_objective_name = None - self.requested_service_objective_name = None - self.default_secondary_location = None - self.failover_group_id = None - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.source_database_deletion_date = kwargs.get('source_database_deletion_date', None) - self.recovery_services_recovery_point_id = kwargs.get('recovery_services_recovery_point_id', None) - self.long_term_retention_backup_resource_id = kwargs.get('long_term_retention_backup_resource_id', None) - self.recoverable_database_id = kwargs.get('recoverable_database_id', None) - self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) - self.catalog_collation = kwargs.get('catalog_collation', None) - self.zone_redundant = kwargs.get('zone_redundant', None) - self.license_type = kwargs.get('license_type', None) - self.max_log_size_bytes = None - self.earliest_restore_date = None - self.read_scale = kwargs.get('read_scale', None) - self.current_sku = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning.py deleted file mode 100644 index eca56cffda2c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseAutomaticTuning(ProxyResource): - """Database-level Automatic Tuning. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param desired_state: Automatic tuning desired state. Possible values - include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode - :ivar actual_state: Automatic tuning actual state. Possible values - include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - :vartype actual_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode - :param options: Automatic tuning options definition. - :type options: dict[str, ~azure.mgmt.sql.models.AutomaticTuningOptions] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'actual_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningMode'}, - 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningMode'}, - 'options': {'key': 'properties.options', 'type': '{AutomaticTuningOptions}'}, - } - - def __init__(self, **kwargs): - super(DatabaseAutomaticTuning, self).__init__(**kwargs) - self.desired_state = kwargs.get('desired_state', None) - self.actual_state = None - self.options = kwargs.get('options', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning_py3.py deleted file mode 100644 index 86bb068ce54f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseAutomaticTuning(ProxyResource): - """Database-level Automatic Tuning. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param desired_state: Automatic tuning desired state. Possible values - include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode - :ivar actual_state: Automatic tuning actual state. Possible values - include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - :vartype actual_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode - :param options: Automatic tuning options definition. - :type options: dict[str, ~azure.mgmt.sql.models.AutomaticTuningOptions] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'actual_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningMode'}, - 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningMode'}, - 'options': {'key': 'properties.options', 'type': '{AutomaticTuningOptions}'}, - } - - def __init__(self, *, desired_state=None, options=None, **kwargs) -> None: - super(DatabaseAutomaticTuning, self).__init__(**kwargs) - self.desired_state = desired_state - self.actual_state = None - self.options = options diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy.py deleted file mode 100644 index 6db06ede30ad..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseBlobAuditingPolicy(ProxyResource): - """A database blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Resource kind. - :vartype kind: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DatabaseBlobAuditingPolicy, self).__init__(**kwargs) - self.kind = None - self.state = kwargs.get('state', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) - self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) - self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) - self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy_py3.py deleted file mode 100644 index 2acc43dae952..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy_py3.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseBlobAuditingPolicy(ProxyResource): - """A database blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Resource kind. - :vartype kind: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: - super(DatabaseBlobAuditingPolicy, self).__init__(**kwargs) - self.kind = None - self.state = state - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.audit_actions_and_groups = audit_actions_and_groups - self.storage_account_subscription_id = storage_account_subscription_id - self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use - self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation.py deleted file mode 100644 index fec6e0e19b64..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseOperation(ProxyResource): - """A database operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_name: The name of the database the operation is being - performed on. - :vartype database_name: str - :ivar operation: The name of operation. - :vartype operation: str - :ivar operation_friendly_name: The friendly name of operation. - :vartype operation_friendly_name: str - :ivar percent_complete: The percentage of the operation completed. - :vartype percent_complete: int - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar start_time: The operation start time. - :vartype start_time: datetime - :ivar state: The operation state. Possible values include: 'Pending', - 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', 'Cancelled' - :vartype state: str or ~azure.mgmt.sql.models.ManagementOperationState - :ivar error_code: The operation error code. - :vartype error_code: int - :ivar error_description: The operation error description. - :vartype error_description: str - :ivar error_severity: The operation error severity. - :vartype error_severity: int - :ivar is_user_error: Whether or not the error is a user error. - :vartype is_user_error: bool - :ivar estimated_completion_time: The estimated completion time of the - operation. - :vartype estimated_completion_time: datetime - :ivar description: The operation description. - :vartype description: str - :ivar is_cancellable: Whether the operation can be cancelled. - :vartype is_cancellable: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_name': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_friendly_name': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_description': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'is_user_error': {'readonly': True}, - 'estimated_completion_time': {'readonly': True}, - 'description': {'readonly': True}, - 'is_cancellable': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, - 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DatabaseOperation, self).__init__(**kwargs) - self.database_name = None - self.operation = None - self.operation_friendly_name = None - self.percent_complete = None - self.server_name = None - self.start_time = None - self.state = None - self.error_code = None - self.error_description = None - self.error_severity = None - self.is_user_error = None - self.estimated_completion_time = None - self.description = None - self.is_cancellable = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_paged.py deleted file mode 100644 index 4c22372df877..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseOperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`DatabaseOperation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseOperation]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseOperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_py3.py deleted file mode 100644 index 66fb0bb0c602..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_py3.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseOperation(ProxyResource): - """A database operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_name: The name of the database the operation is being - performed on. - :vartype database_name: str - :ivar operation: The name of operation. - :vartype operation: str - :ivar operation_friendly_name: The friendly name of operation. - :vartype operation_friendly_name: str - :ivar percent_complete: The percentage of the operation completed. - :vartype percent_complete: int - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar start_time: The operation start time. - :vartype start_time: datetime - :ivar state: The operation state. Possible values include: 'Pending', - 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', 'Cancelled' - :vartype state: str or ~azure.mgmt.sql.models.ManagementOperationState - :ivar error_code: The operation error code. - :vartype error_code: int - :ivar error_description: The operation error description. - :vartype error_description: str - :ivar error_severity: The operation error severity. - :vartype error_severity: int - :ivar is_user_error: Whether or not the error is a user error. - :vartype is_user_error: bool - :ivar estimated_completion_time: The estimated completion time of the - operation. - :vartype estimated_completion_time: datetime - :ivar description: The operation description. - :vartype description: str - :ivar is_cancellable: Whether the operation can be cancelled. - :vartype is_cancellable: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_name': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_friendly_name': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_description': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'is_user_error': {'readonly': True}, - 'estimated_completion_time': {'readonly': True}, - 'description': {'readonly': True}, - 'is_cancellable': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, - 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, - } - - def __init__(self, **kwargs) -> None: - super(DatabaseOperation, self).__init__(**kwargs) - self.database_name = None - self.operation = None - self.operation_friendly_name = None - self.percent_complete = None - self.server_name = None - self.start_time = None - self.state = None - self.error_code = None - self.error_description = None - self.error_severity = None - self.is_user_error = None - self.estimated_completion_time = None - self.description = None - self.is_cancellable = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_paged.py deleted file mode 100644 index bc3842934a39..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`Database ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Database]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py deleted file mode 100644 index 9cfb4d07a7e6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py +++ /dev/null @@ -1,237 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class Database(TrackedResource): - """A database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :ivar kind: Kind of database. This is metadata used for the Azure portal - experience. - :vartype kind: str - :ivar managed_by: Resource that manages the database. - :vartype managed_by: str - :param create_mode: Specifies the mode of database creation. - Default: regular database creation. - Copy: creates a database as a copy of an existing database. - sourceDatabaseId must be specified as the resource ID of the source - database. - Secondary: creates a database as a secondary replica of an existing - database. sourceDatabaseId must be specified as the resource ID of the - existing primary database. - PointInTimeRestore: Creates a database by restoring a point in time backup - of an existing database. sourceDatabaseId must be specified as the - resource ID of the existing database, and restorePointInTime must be - specified. - Recovery: Creates a database by restoring a geo-replicated backup. - sourceDatabaseId must be specified as the recoverable database resource ID - to restore. - Restore: Creates a database by restoring a backup of a deleted database. - sourceDatabaseId must be specified. If sourceDatabaseId is the database's - original resource ID, then sourceDatabaseDeletionDate must be specified. - Otherwise sourceDatabaseId must be the restorable dropped database - resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime - may also be specified to restore from an earlier point in time. - RestoreLongTermRetentionBackup: Creates a database by restoring from a - long term retention vault. recoveryServicesRecoveryPointResourceId must be - specified as the recovery point resource ID. - Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for - DataWarehouse edition. Possible values include: 'Default', 'Copy', - 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', - 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', - 'RestoreLongTermRetentionBackup', 'OnlineSecondary' - :type create_mode: str or ~azure.mgmt.sql.models.CreateMode - :param collation: The collation of the database. - :type collation: str - :param max_size_bytes: The max size of the database expressed in bytes. - :type max_size_bytes: long - :param sample_name: The name of the sample schema to apply when creating - this database. Possible values include: 'AdventureWorksLT', - 'WideWorldImportersStd', 'WideWorldImportersFull' - :type sample_name: str or ~azure.mgmt.sql.models.SampleName - :param elastic_pool_id: The resource identifier of the elastic pool - containing this database. - :type elastic_pool_id: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :ivar status: The status of the database. Possible values include: - 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', - 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', - 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', - 'Paused', 'Resuming', 'Scaling' - :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus - :ivar database_id: The ID of the database. - :vartype database_id: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar current_service_objective_name: The current service level objective - name of the database. - :vartype current_service_objective_name: str - :ivar requested_service_objective_name: The requested service level - objective name of the database. - :vartype requested_service_objective_name: str - :ivar default_secondary_location: The default secondary region for this - database. - :vartype default_secondary_location: str - :ivar failover_group_id: Failover Group resource identifier that this - database belongs to. - :vartype failover_group_id: str - :param restore_point_in_time: Specifies the point in time (ISO8601 format) - of the source database that will be restored to create the new database. - :type restore_point_in_time: datetime - :param source_database_deletion_date: Specifies the time that the database - was deleted. - :type source_database_deletion_date: datetime - :param recovery_services_recovery_point_id: The resource identifier of the - recovery point associated with create operation of this database. - :type recovery_services_recovery_point_id: str - :param long_term_retention_backup_resource_id: The resource identifier of - the long term retention backup associated with create operation of this - database. - :type long_term_retention_backup_resource_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param restorable_dropped_database_id: The resource identifier of the - restorable dropped database associated with create operation of this - database. - :type restorable_dropped_database_id: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param zone_redundant: Whether or not this database is zone redundant, - which means the replicas of this database will be spread across multiple - availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this database. Possible - values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType - :ivar max_log_size_bytes: The max log size for this database. - :vartype max_log_size_bytes: long - :ivar earliest_restore_date: This records the earliest start date and time - that restore is available for this database (ISO8601 format). - :vartype earliest_restore_date: datetime - :param read_scale: The state of read-only routing. If enabled, connections - that have application intent set to readonly in their connection string - may be routed to a readonly secondary replica in the same region. Possible - values include: 'Enabled', 'Disabled' - :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale - :ivar current_sku: The name and tier of the SKU. - :vartype current_sku: ~azure.mgmt.sql.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'managed_by': {'readonly': True}, - 'status': {'readonly': True}, - 'database_id': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'current_service_objective_name': {'readonly': True}, - 'requested_service_objective_name': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - 'max_log_size_bytes': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'current_sku': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, - 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, - 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, - 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, - 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, - 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, - } - - def __init__(self, *, location: str, tags=None, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, **kwargs) -> None: - super(Database, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.kind = None - self.managed_by = None - self.create_mode = create_mode - self.collation = collation - self.max_size_bytes = max_size_bytes - self.sample_name = sample_name - self.elastic_pool_id = elastic_pool_id - self.source_database_id = source_database_id - self.status = None - self.database_id = None - self.creation_date = None - self.current_service_objective_name = None - self.requested_service_objective_name = None - self.default_secondary_location = None - self.failover_group_id = None - self.restore_point_in_time = restore_point_in_time - self.source_database_deletion_date = source_database_deletion_date - self.recovery_services_recovery_point_id = recovery_services_recovery_point_id - self.long_term_retention_backup_resource_id = long_term_retention_backup_resource_id - self.recoverable_database_id = recoverable_database_id - self.restorable_dropped_database_id = restorable_dropped_database_id - self.catalog_collation = catalog_collation - self.zone_redundant = zone_redundant - self.license_type = license_type - self.max_log_size_bytes = None - self.earliest_restore_date = None - self.read_scale = read_scale - self.current_sku = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy.py deleted file mode 100644 index c425573a5a91..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseSecurityAlertPolicy(ProxyResource): - """Contains information about a database Threat Detection policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar kind: Resource kind. - :vartype kind: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint and storageAccountAccessKey are required. - Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies the semicolon-separated list of alerts - that are disabled, or empty string to disable no alerts. Possible values: - Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; - Data_Exfiltration; Unsafe_Action. - :type disabled_alerts: str - :param email_addresses: Specifies the semicolon-separated list of e-mail - addresses to which the alert is sent. - :type email_addresses: str - :param email_account_admins: Specifies that the alert is sent to the - account administrators. Possible values include: 'Enabled', 'Disabled' - :type email_account_admins: str or - ~azure.mgmt.sql.models.SecurityAlertPolicyEmailAccountAdmins - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. If state is Enabled, storageEndpoint is - required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. If state is Enabled, - storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :param use_server_default: Specifies whether to use the default server - policy. Possible values include: 'Enabled', 'Disabled' - :type use_server_default: str or - ~azure.mgmt.sql.models.SecurityAlertPolicyUseServerDefault - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': 'str'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': 'str'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'SecurityAlertPolicyEmailAccountAdmins'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'use_server_default': {'key': 'properties.useServerDefault', 'type': 'SecurityAlertPolicyUseServerDefault'}, - } - - def __init__(self, **kwargs): - super(DatabaseSecurityAlertPolicy, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.kind = None - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.use_server_default = kwargs.get('use_server_default', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy_py3.py deleted file mode 100644 index 3d85e01a6635..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy_py3.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseSecurityAlertPolicy(ProxyResource): - """Contains information about a database Threat Detection policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar kind: Resource kind. - :vartype kind: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint and storageAccountAccessKey are required. - Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies the semicolon-separated list of alerts - that are disabled, or empty string to disable no alerts. Possible values: - Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; - Data_Exfiltration; Unsafe_Action. - :type disabled_alerts: str - :param email_addresses: Specifies the semicolon-separated list of e-mail - addresses to which the alert is sent. - :type email_addresses: str - :param email_account_admins: Specifies that the alert is sent to the - account administrators. Possible values include: 'Enabled', 'Disabled' - :type email_account_admins: str or - ~azure.mgmt.sql.models.SecurityAlertPolicyEmailAccountAdmins - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. If state is Enabled, storageEndpoint is - required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. If state is Enabled, - storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :param use_server_default: Specifies whether to use the default server - policy. Possible values include: 'Enabled', 'Disabled' - :type use_server_default: str or - ~azure.mgmt.sql.models.SecurityAlertPolicyUseServerDefault - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': 'str'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': 'str'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'SecurityAlertPolicyEmailAccountAdmins'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'use_server_default': {'key': 'properties.useServerDefault', 'type': 'SecurityAlertPolicyUseServerDefault'}, - } - - def __init__(self, *, state, location: str=None, disabled_alerts: str=None, email_addresses: str=None, email_account_admins=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, use_server_default=None, **kwargs) -> None: - super(DatabaseSecurityAlertPolicy, self).__init__(**kwargs) - self.location = location - self.kind = None - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.use_server_default = use_server_default diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update.py deleted file mode 100644 index d4d4cbdf4270..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update.py +++ /dev/null @@ -1,209 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseUpdate(Model): - """A database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :param create_mode: Specifies the mode of database creation. - Default: regular database creation. - Copy: creates a database as a copy of an existing database. - sourceDatabaseId must be specified as the resource ID of the source - database. - Secondary: creates a database as a secondary replica of an existing - database. sourceDatabaseId must be specified as the resource ID of the - existing primary database. - PointInTimeRestore: Creates a database by restoring a point in time backup - of an existing database. sourceDatabaseId must be specified as the - resource ID of the existing database, and restorePointInTime must be - specified. - Recovery: Creates a database by restoring a geo-replicated backup. - sourceDatabaseId must be specified as the recoverable database resource ID - to restore. - Restore: Creates a database by restoring a backup of a deleted database. - sourceDatabaseId must be specified. If sourceDatabaseId is the database's - original resource ID, then sourceDatabaseDeletionDate must be specified. - Otherwise sourceDatabaseId must be the restorable dropped database - resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime - may also be specified to restore from an earlier point in time. - RestoreLongTermRetentionBackup: Creates a database by restoring from a - long term retention vault. recoveryServicesRecoveryPointResourceId must be - specified as the recovery point resource ID. - Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for - DataWarehouse edition. Possible values include: 'Default', 'Copy', - 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', - 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', - 'RestoreLongTermRetentionBackup', 'OnlineSecondary' - :type create_mode: str or ~azure.mgmt.sql.models.CreateMode - :param collation: The collation of the database. - :type collation: str - :param max_size_bytes: The max size of the database expressed in bytes. - :type max_size_bytes: long - :param sample_name: The name of the sample schema to apply when creating - this database. Possible values include: 'AdventureWorksLT', - 'WideWorldImportersStd', 'WideWorldImportersFull' - :type sample_name: str or ~azure.mgmt.sql.models.SampleName - :param elastic_pool_id: The resource identifier of the elastic pool - containing this database. - :type elastic_pool_id: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :ivar status: The status of the database. Possible values include: - 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', - 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', - 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', - 'Paused', 'Resuming', 'Scaling' - :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus - :ivar database_id: The ID of the database. - :vartype database_id: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar current_service_objective_name: The current service level objective - name of the database. - :vartype current_service_objective_name: str - :ivar requested_service_objective_name: The requested service level - objective name of the database. - :vartype requested_service_objective_name: str - :ivar default_secondary_location: The default secondary region for this - database. - :vartype default_secondary_location: str - :ivar failover_group_id: Failover Group resource identifier that this - database belongs to. - :vartype failover_group_id: str - :param restore_point_in_time: Specifies the point in time (ISO8601 format) - of the source database that will be restored to create the new database. - :type restore_point_in_time: datetime - :param source_database_deletion_date: Specifies the time that the database - was deleted. - :type source_database_deletion_date: datetime - :param recovery_services_recovery_point_id: The resource identifier of the - recovery point associated with create operation of this database. - :type recovery_services_recovery_point_id: str - :param long_term_retention_backup_resource_id: The resource identifier of - the long term retention backup associated with create operation of this - database. - :type long_term_retention_backup_resource_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param restorable_dropped_database_id: The resource identifier of the - restorable dropped database associated with create operation of this - database. - :type restorable_dropped_database_id: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param zone_redundant: Whether or not this database is zone redundant, - which means the replicas of this database will be spread across multiple - availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this database. Possible - values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType - :ivar max_log_size_bytes: The max log size for this database. - :vartype max_log_size_bytes: long - :ivar earliest_restore_date: This records the earliest start date and time - that restore is available for this database (ISO8601 format). - :vartype earliest_restore_date: datetime - :param read_scale: The state of read-only routing. If enabled, connections - that have application intent set to readonly in their connection string - may be routed to a readonly secondary replica in the same region. Possible - values include: 'Enabled', 'Disabled' - :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale - :ivar current_sku: The name and tier of the SKU. - :vartype current_sku: ~azure.mgmt.sql.models.Sku - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'status': {'readonly': True}, - 'database_id': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'current_service_objective_name': {'readonly': True}, - 'requested_service_objective_name': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - 'max_log_size_bytes': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'current_sku': {'readonly': True}, - } - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, - 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, - 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, - 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, - 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, - 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(DatabaseUpdate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.create_mode = kwargs.get('create_mode', None) - self.collation = kwargs.get('collation', None) - self.max_size_bytes = kwargs.get('max_size_bytes', None) - self.sample_name = kwargs.get('sample_name', None) - self.elastic_pool_id = kwargs.get('elastic_pool_id', None) - self.source_database_id = kwargs.get('source_database_id', None) - self.status = None - self.database_id = None - self.creation_date = None - self.current_service_objective_name = None - self.requested_service_objective_name = None - self.default_secondary_location = None - self.failover_group_id = None - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.source_database_deletion_date = kwargs.get('source_database_deletion_date', None) - self.recovery_services_recovery_point_id = kwargs.get('recovery_services_recovery_point_id', None) - self.long_term_retention_backup_resource_id = kwargs.get('long_term_retention_backup_resource_id', None) - self.recoverable_database_id = kwargs.get('recoverable_database_id', None) - self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) - self.catalog_collation = kwargs.get('catalog_collation', None) - self.zone_redundant = kwargs.get('zone_redundant', None) - self.license_type = kwargs.get('license_type', None) - self.max_log_size_bytes = None - self.earliest_restore_date = None - self.read_scale = kwargs.get('read_scale', None) - self.current_sku = None - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update_py3.py deleted file mode 100644 index 5a9a6f3b742d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update_py3.py +++ /dev/null @@ -1,209 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseUpdate(Model): - """A database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :param create_mode: Specifies the mode of database creation. - Default: regular database creation. - Copy: creates a database as a copy of an existing database. - sourceDatabaseId must be specified as the resource ID of the source - database. - Secondary: creates a database as a secondary replica of an existing - database. sourceDatabaseId must be specified as the resource ID of the - existing primary database. - PointInTimeRestore: Creates a database by restoring a point in time backup - of an existing database. sourceDatabaseId must be specified as the - resource ID of the existing database, and restorePointInTime must be - specified. - Recovery: Creates a database by restoring a geo-replicated backup. - sourceDatabaseId must be specified as the recoverable database resource ID - to restore. - Restore: Creates a database by restoring a backup of a deleted database. - sourceDatabaseId must be specified. If sourceDatabaseId is the database's - original resource ID, then sourceDatabaseDeletionDate must be specified. - Otherwise sourceDatabaseId must be the restorable dropped database - resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime - may also be specified to restore from an earlier point in time. - RestoreLongTermRetentionBackup: Creates a database by restoring from a - long term retention vault. recoveryServicesRecoveryPointResourceId must be - specified as the recovery point resource ID. - Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for - DataWarehouse edition. Possible values include: 'Default', 'Copy', - 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', - 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', - 'RestoreLongTermRetentionBackup', 'OnlineSecondary' - :type create_mode: str or ~azure.mgmt.sql.models.CreateMode - :param collation: The collation of the database. - :type collation: str - :param max_size_bytes: The max size of the database expressed in bytes. - :type max_size_bytes: long - :param sample_name: The name of the sample schema to apply when creating - this database. Possible values include: 'AdventureWorksLT', - 'WideWorldImportersStd', 'WideWorldImportersFull' - :type sample_name: str or ~azure.mgmt.sql.models.SampleName - :param elastic_pool_id: The resource identifier of the elastic pool - containing this database. - :type elastic_pool_id: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :ivar status: The status of the database. Possible values include: - 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', - 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', - 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', - 'Paused', 'Resuming', 'Scaling' - :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus - :ivar database_id: The ID of the database. - :vartype database_id: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar current_service_objective_name: The current service level objective - name of the database. - :vartype current_service_objective_name: str - :ivar requested_service_objective_name: The requested service level - objective name of the database. - :vartype requested_service_objective_name: str - :ivar default_secondary_location: The default secondary region for this - database. - :vartype default_secondary_location: str - :ivar failover_group_id: Failover Group resource identifier that this - database belongs to. - :vartype failover_group_id: str - :param restore_point_in_time: Specifies the point in time (ISO8601 format) - of the source database that will be restored to create the new database. - :type restore_point_in_time: datetime - :param source_database_deletion_date: Specifies the time that the database - was deleted. - :type source_database_deletion_date: datetime - :param recovery_services_recovery_point_id: The resource identifier of the - recovery point associated with create operation of this database. - :type recovery_services_recovery_point_id: str - :param long_term_retention_backup_resource_id: The resource identifier of - the long term retention backup associated with create operation of this - database. - :type long_term_retention_backup_resource_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param restorable_dropped_database_id: The resource identifier of the - restorable dropped database associated with create operation of this - database. - :type restorable_dropped_database_id: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param zone_redundant: Whether or not this database is zone redundant, - which means the replicas of this database will be spread across multiple - availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this database. Possible - values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType - :ivar max_log_size_bytes: The max log size for this database. - :vartype max_log_size_bytes: long - :ivar earliest_restore_date: This records the earliest start date and time - that restore is available for this database (ISO8601 format). - :vartype earliest_restore_date: datetime - :param read_scale: The state of read-only routing. If enabled, connections - that have application intent set to readonly in their connection string - may be routed to a readonly secondary replica in the same region. Possible - values include: 'Enabled', 'Disabled' - :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale - :ivar current_sku: The name and tier of the SKU. - :vartype current_sku: ~azure.mgmt.sql.models.Sku - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'status': {'readonly': True}, - 'database_id': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'current_service_objective_name': {'readonly': True}, - 'requested_service_objective_name': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - 'max_log_size_bytes': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'current_sku': {'readonly': True}, - } - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, - 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, - 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, - 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, - 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, - 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, tags=None, **kwargs) -> None: - super(DatabaseUpdate, self).__init__(**kwargs) - self.sku = sku - self.create_mode = create_mode - self.collation = collation - self.max_size_bytes = max_size_bytes - self.sample_name = sample_name - self.elastic_pool_id = elastic_pool_id - self.source_database_id = source_database_id - self.status = None - self.database_id = None - self.creation_date = None - self.current_service_objective_name = None - self.requested_service_objective_name = None - self.default_secondary_location = None - self.failover_group_id = None - self.restore_point_in_time = restore_point_in_time - self.source_database_deletion_date = source_database_deletion_date - self.recovery_services_recovery_point_id = recovery_services_recovery_point_id - self.long_term_retention_backup_resource_id = long_term_retention_backup_resource_id - self.recoverable_database_id = recoverable_database_id - self.restorable_dropped_database_id = restorable_dropped_database_id - self.catalog_collation = catalog_collation - self.zone_redundant = zone_redundant - self.license_type = license_type - self.max_log_size_bytes = None - self.earliest_restore_date = None - self.read_scale = read_scale - self.current_sku = None - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage.py deleted file mode 100644 index 948942f56124..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseUsage(Model): - """The database usages. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the usage metric. - :vartype name: str - :ivar resource_name: The name of the resource. - :vartype resource_name: str - :ivar display_name: The usage metric display name. - :vartype display_name: str - :ivar current_value: The current value of the usage metric. - :vartype current_value: float - :ivar limit: The current limit of the usage metric. - :vartype limit: float - :ivar unit: The units of the usage metric. - :vartype unit: str - :ivar next_reset_time: The next reset time for the usage metric (ISO8601 - format). - :vartype next_reset_time: datetime - """ - - _validation = { - 'name': {'readonly': True}, - 'resource_name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'next_reset_time': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_name': {'key': 'resourceName', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(DatabaseUsage, self).__init__(**kwargs) - self.name = None - self.resource_name = None - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None - self.next_reset_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_paged.py deleted file mode 100644 index 9641161225df..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseUsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`DatabaseUsage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseUsage]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseUsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_py3.py deleted file mode 100644 index 46a0f5ca4ba9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseUsage(Model): - """The database usages. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the usage metric. - :vartype name: str - :ivar resource_name: The name of the resource. - :vartype resource_name: str - :ivar display_name: The usage metric display name. - :vartype display_name: str - :ivar current_value: The current value of the usage metric. - :vartype current_value: float - :ivar limit: The current limit of the usage metric. - :vartype limit: float - :ivar unit: The units of the usage metric. - :vartype unit: str - :ivar next_reset_time: The next reset time for the usage metric (ISO8601 - format). - :vartype next_reset_time: datetime - """ - - _validation = { - 'name': {'readonly': True}, - 'resource_name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'next_reset_time': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_name': {'key': 'resourceName', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(DatabaseUsage, self).__init__(**kwargs) - self.name = None - self.resource_name = None - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None - self.next_reset_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment.py deleted file mode 100644 index b4fbd42f864b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseVulnerabilityAssessment(ProxyResource): - """A database vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: A blob storage container path to hold the - scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It - is required if server level vulnerability assessment policy doesn't set - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _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'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, **kwargs): - super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = kwargs.get('storage_container_path', None) - self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.recurring_scans = kwargs.get('recurring_scans', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_paged.py deleted file mode 100644 index 8ec2fe4eae5f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseVulnerabilityAssessmentPaged(Paged): - """ - A paging container for iterating over a list of :class:`DatabaseVulnerabilityAssessment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseVulnerabilityAssessment]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_py3.py deleted file mode 100644 index e0d54f6105f1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseVulnerabilityAssessment(ProxyResource): - """A database vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: A blob storage container path to hold the - scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It - is required if server level vulnerability assessment policy doesn't set - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _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'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, *, storage_container_path: str=None, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: - super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = storage_container_path - self.storage_container_sas_key = storage_container_sas_key - self.storage_account_access_key = storage_account_access_key - self.recurring_scans = recurring_scans diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline.py deleted file mode 100644 index 66881dfb9b5c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseVulnerabilityAssessmentRuleBaseline(ProxyResource): - """A database vulnerability assessment rule baseline. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param baseline_results: Required. The rule baseline result - :type baseline_results: - list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'baseline_results': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'baseline_results': {'key': 'properties.baselineResults', 'type': '[DatabaseVulnerabilityAssessmentRuleBaselineItem]'}, - } - - def __init__(self, **kwargs): - super(DatabaseVulnerabilityAssessmentRuleBaseline, self).__init__(**kwargs) - self.baseline_results = kwargs.get('baseline_results', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item.py deleted file mode 100644 index 4bd7d0e16f52..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseVulnerabilityAssessmentRuleBaselineItem(Model): - """Properties for an Azure SQL Database Vulnerability Assessment rule - baseline's result. - - All required parameters must be populated in order to send to Azure. - - :param result: Required. The rule baseline result - :type result: list[str] - """ - - _validation = { - 'result': {'required': True}, - } - - _attribute_map = { - 'result': {'key': 'result', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(DatabaseVulnerabilityAssessmentRuleBaselineItem, self).__init__(**kwargs) - self.result = kwargs.get('result', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py deleted file mode 100644 index 9378a89cc0f0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseVulnerabilityAssessmentRuleBaselineItem(Model): - """Properties for an Azure SQL Database Vulnerability Assessment rule - baseline's result. - - All required parameters must be populated in order to send to Azure. - - :param result: Required. The rule baseline result - :type result: list[str] - """ - - _validation = { - 'result': {'required': True}, - } - - _attribute_map = { - 'result': {'key': 'result', 'type': '[str]'}, - } - - def __init__(self, *, result, **kwargs) -> None: - super(DatabaseVulnerabilityAssessmentRuleBaselineItem, self).__init__(**kwargs) - self.result = result diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_py3.py deleted file mode 100644 index 4997c258c475..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseVulnerabilityAssessmentRuleBaseline(ProxyResource): - """A database vulnerability assessment rule baseline. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param baseline_results: Required. The rule baseline result - :type baseline_results: - list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'baseline_results': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'baseline_results': {'key': 'properties.baselineResults', 'type': '[DatabaseVulnerabilityAssessmentRuleBaselineItem]'}, - } - - def __init__(self, *, baseline_results, **kwargs) -> None: - super(DatabaseVulnerabilityAssessmentRuleBaseline, self).__init__(**kwargs) - self.baseline_results = baseline_results diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export.py deleted file mode 100644 index 4d088fd265c0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseVulnerabilityAssessmentScansExport(ProxyResource): - """A database Vulnerability Assessment scan export resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar exported_report_location: Location of the exported report (e.g. - https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). - :vartype exported_report_location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'exported_report_location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs) - self.exported_report_location = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export_py3.py deleted file mode 100644 index 7e925fb428ce..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseVulnerabilityAssessmentScansExport(ProxyResource): - """A database Vulnerability Assessment scan export resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar exported_report_location: Location of the exported report (e.g. - https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). - :vartype exported_report_location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'exported_report_location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs) - self.exported_report_location = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability.py deleted file mode 100644 index e2b212e365b0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EditionCapability(Model): - """The edition capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The database edition name. - :vartype name: str - :ivar supported_service_level_objectives: The list of supported service - objectives for the edition. - :vartype supported_service_level_objectives: - list[~azure.mgmt.sql.models.ServiceObjectiveCapability] - :ivar zone_redundant: Whether or not zone redundancy is supported for the - edition. - :vartype zone_redundant: bool - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_service_level_objectives': {'readonly': True}, - 'zone_redundant': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_service_level_objectives': {'key': 'supportedServiceLevelObjectives', 'type': '[ServiceObjectiveCapability]'}, - 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_service_level_objectives = None - self.zone_redundant = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability_py3.py deleted file mode 100644 index e2eaad22c5d5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EditionCapability(Model): - """The edition capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The database edition name. - :vartype name: str - :ivar supported_service_level_objectives: The list of supported service - objectives for the edition. - :vartype supported_service_level_objectives: - list[~azure.mgmt.sql.models.ServiceObjectiveCapability] - :ivar zone_redundant: Whether or not zone redundancy is supported for the - edition. - :vartype zone_redundant: bool - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_service_level_objectives': {'readonly': True}, - 'zone_redundant': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_service_level_objectives': {'key': 'supportedServiceLevelObjectives', 'type': '[ServiceObjectiveCapability]'}, - 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(EditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_service_level_objectives = None - self.zone_redundant = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py deleted file mode 100644 index 10a28ea0f6e3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class ElasticPool(TrackedResource): - """An elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.sql.models.Sku - :ivar kind: Kind of elastic pool. This is metadata used for the Azure - portal experience. - :vartype kind: str - :ivar state: The state of the elastic pool. Possible values include: - 'Creating', 'Ready', 'Disabled' - :vartype state: str or ~azure.mgmt.sql.models.ElasticPoolState - :ivar creation_date: The creation date of the elastic pool (ISO8601 - format). - :vartype creation_date: datetime - :param max_size_bytes: The storage limit for the database elastic pool in - bytes. - :type max_size_bytes: long - :param per_database_settings: The per database settings for the elastic - pool. - :type per_database_settings: - ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings - :param zone_redundant: Whether or not this elastic pool is zone redundant, - which means the replicas of this elastic pool will be spread across - multiple availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this elastic pool. - Possible values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'state': {'readonly': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPool, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.kind = None - self.state = None - self.creation_date = None - self.max_size_bytes = kwargs.get('max_size_bytes', None) - self.per_database_settings = kwargs.get('per_database_settings', None) - self.zone_redundant = kwargs.get('zone_redundant', None) - self.license_type = kwargs.get('license_type', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity.py deleted file mode 100644 index 30c56a11077d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ElasticPoolActivity(ProxyResource): - """Represents the activity on an elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar end_time: The time the operation finished (ISO8601 format). - :vartype end_time: datetime - :ivar error_code: The error code if available. - :vartype error_code: int - :ivar error_message: The error message if available. - :vartype error_message: str - :ivar error_severity: The error severity if available. - :vartype error_severity: int - :ivar operation: The operation name. - :vartype operation: str - :ivar operation_id: The unique operation ID. - :vartype operation_id: str - :ivar percent_complete: The percentage complete if available. - :vartype percent_complete: int - :ivar requested_database_dtu_max: The requested max DTU per database if - available. - :vartype requested_database_dtu_max: int - :ivar requested_database_dtu_min: The requested min DTU per database if - available. - :vartype requested_database_dtu_min: int - :ivar requested_dtu: The requested DTU for the pool if available. - :vartype requested_dtu: int - :ivar requested_elastic_pool_name: The requested name for the elastic pool - if available. - :vartype requested_elastic_pool_name: str - :ivar requested_storage_limit_in_gb: The requested storage limit for the - pool in GB if available. - :vartype requested_storage_limit_in_gb: long - :ivar elastic_pool_name: The name of the elastic pool. - :vartype elastic_pool_name: str - :ivar server_name: The name of the server the elastic pool is in. - :vartype server_name: str - :ivar start_time: The time the operation started (ISO8601 format). - :vartype start_time: datetime - :ivar state: The current state of the operation. - :vartype state: str - :ivar requested_storage_limit_in_mb: The requested storage limit in MB. - :vartype requested_storage_limit_in_mb: int - :ivar requested_database_dtu_guarantee: The requested per database DTU - guarantee. - :vartype requested_database_dtu_guarantee: int - :ivar requested_database_dtu_cap: The requested per database DTU cap. - :vartype requested_database_dtu_cap: int - :ivar requested_dtu_guarantee: The requested DTU guarantee. - :vartype requested_dtu_guarantee: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_message': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_id': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'requested_database_dtu_max': {'readonly': True}, - 'requested_database_dtu_min': {'readonly': True}, - 'requested_dtu': {'readonly': True}, - 'requested_elastic_pool_name': {'readonly': True}, - 'requested_storage_limit_in_gb': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'requested_storage_limit_in_mb': {'readonly': True}, - 'requested_database_dtu_guarantee': {'readonly': True}, - 'requested_database_dtu_cap': {'readonly': True}, - 'requested_dtu_guarantee': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'requested_database_dtu_max': {'key': 'properties.requestedDatabaseDtuMax', 'type': 'int'}, - 'requested_database_dtu_min': {'key': 'properties.requestedDatabaseDtuMin', 'type': 'int'}, - 'requested_dtu': {'key': 'properties.requestedDtu', 'type': 'int'}, - 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, - 'requested_storage_limit_in_gb': {'key': 'properties.requestedStorageLimitInGB', 'type': 'long'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'requested_storage_limit_in_mb': {'key': 'properties.requestedStorageLimitInMB', 'type': 'int'}, - 'requested_database_dtu_guarantee': {'key': 'properties.requestedDatabaseDtuGuarantee', 'type': 'int'}, - 'requested_database_dtu_cap': {'key': 'properties.requestedDatabaseDtuCap', 'type': 'int'}, - 'requested_dtu_guarantee': {'key': 'properties.requestedDtuGuarantee', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolActivity, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.end_time = None - self.error_code = None - self.error_message = None - self.error_severity = None - self.operation = None - self.operation_id = None - self.percent_complete = None - self.requested_database_dtu_max = None - self.requested_database_dtu_min = None - self.requested_dtu = None - self.requested_elastic_pool_name = None - self.requested_storage_limit_in_gb = None - self.elastic_pool_name = None - self.server_name = None - self.start_time = None - self.state = None - self.requested_storage_limit_in_mb = None - self.requested_database_dtu_guarantee = None - self.requested_database_dtu_cap = None - self.requested_dtu_guarantee = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_paged.py deleted file mode 100644 index 729a44a94bb5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ElasticPoolActivityPaged(Paged): - """ - A paging container for iterating over a list of :class:`ElasticPoolActivity ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ElasticPoolActivity]'} - } - - def __init__(self, *args, **kwargs): - - super(ElasticPoolActivityPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_py3.py deleted file mode 100644 index 5d8d4f61727a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_py3.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ElasticPoolActivity(ProxyResource): - """Represents the activity on an elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar end_time: The time the operation finished (ISO8601 format). - :vartype end_time: datetime - :ivar error_code: The error code if available. - :vartype error_code: int - :ivar error_message: The error message if available. - :vartype error_message: str - :ivar error_severity: The error severity if available. - :vartype error_severity: int - :ivar operation: The operation name. - :vartype operation: str - :ivar operation_id: The unique operation ID. - :vartype operation_id: str - :ivar percent_complete: The percentage complete if available. - :vartype percent_complete: int - :ivar requested_database_dtu_max: The requested max DTU per database if - available. - :vartype requested_database_dtu_max: int - :ivar requested_database_dtu_min: The requested min DTU per database if - available. - :vartype requested_database_dtu_min: int - :ivar requested_dtu: The requested DTU for the pool if available. - :vartype requested_dtu: int - :ivar requested_elastic_pool_name: The requested name for the elastic pool - if available. - :vartype requested_elastic_pool_name: str - :ivar requested_storage_limit_in_gb: The requested storage limit for the - pool in GB if available. - :vartype requested_storage_limit_in_gb: long - :ivar elastic_pool_name: The name of the elastic pool. - :vartype elastic_pool_name: str - :ivar server_name: The name of the server the elastic pool is in. - :vartype server_name: str - :ivar start_time: The time the operation started (ISO8601 format). - :vartype start_time: datetime - :ivar state: The current state of the operation. - :vartype state: str - :ivar requested_storage_limit_in_mb: The requested storage limit in MB. - :vartype requested_storage_limit_in_mb: int - :ivar requested_database_dtu_guarantee: The requested per database DTU - guarantee. - :vartype requested_database_dtu_guarantee: int - :ivar requested_database_dtu_cap: The requested per database DTU cap. - :vartype requested_database_dtu_cap: int - :ivar requested_dtu_guarantee: The requested DTU guarantee. - :vartype requested_dtu_guarantee: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_message': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_id': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'requested_database_dtu_max': {'readonly': True}, - 'requested_database_dtu_min': {'readonly': True}, - 'requested_dtu': {'readonly': True}, - 'requested_elastic_pool_name': {'readonly': True}, - 'requested_storage_limit_in_gb': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'requested_storage_limit_in_mb': {'readonly': True}, - 'requested_database_dtu_guarantee': {'readonly': True}, - 'requested_database_dtu_cap': {'readonly': True}, - 'requested_dtu_guarantee': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'requested_database_dtu_max': {'key': 'properties.requestedDatabaseDtuMax', 'type': 'int'}, - 'requested_database_dtu_min': {'key': 'properties.requestedDatabaseDtuMin', 'type': 'int'}, - 'requested_dtu': {'key': 'properties.requestedDtu', 'type': 'int'}, - 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, - 'requested_storage_limit_in_gb': {'key': 'properties.requestedStorageLimitInGB', 'type': 'long'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'requested_storage_limit_in_mb': {'key': 'properties.requestedStorageLimitInMB', 'type': 'int'}, - 'requested_database_dtu_guarantee': {'key': 'properties.requestedDatabaseDtuGuarantee', 'type': 'int'}, - 'requested_database_dtu_cap': {'key': 'properties.requestedDatabaseDtuCap', 'type': 'int'}, - 'requested_dtu_guarantee': {'key': 'properties.requestedDtuGuarantee', 'type': 'int'}, - } - - def __init__(self, *, location: str=None, **kwargs) -> None: - super(ElasticPoolActivity, self).__init__(**kwargs) - self.location = location - self.end_time = None - self.error_code = None - self.error_message = None - self.error_severity = None - self.operation = None - self.operation_id = None - self.percent_complete = None - self.requested_database_dtu_max = None - self.requested_database_dtu_min = None - self.requested_dtu = None - self.requested_elastic_pool_name = None - self.requested_storage_limit_in_gb = None - self.elastic_pool_name = None - self.server_name = None - self.start_time = None - self.state = None - self.requested_storage_limit_in_mb = None - self.requested_database_dtu_guarantee = None - self.requested_database_dtu_cap = None - self.requested_dtu_guarantee = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity.py deleted file mode 100644 index 9427b6973ff9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity.py +++ /dev/null @@ -1,125 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ElasticPoolDatabaseActivity(ProxyResource): - """Represents the activity on an elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar database_name: The database name. - :vartype database_name: str - :ivar end_time: The time the operation finished (ISO8601 format). - :vartype end_time: datetime - :ivar error_code: The error code if available. - :vartype error_code: int - :ivar error_message: The error message if available. - :vartype error_message: str - :ivar error_severity: The error severity if available. - :vartype error_severity: int - :ivar operation: The operation name. - :vartype operation: str - :ivar operation_id: The unique operation ID. - :vartype operation_id: str - :ivar percent_complete: The percentage complete if available. - :vartype percent_complete: int - :ivar requested_elastic_pool_name: The name for the elastic pool the - database is moving into if available. - :vartype requested_elastic_pool_name: str - :ivar current_elastic_pool_name: The name of the current elastic pool the - database is in if available. - :vartype current_elastic_pool_name: str - :ivar current_service_objective: The name of the current service objective - if available. - :vartype current_service_objective: str - :ivar requested_service_objective: The name of the requested service - objective if available. - :vartype requested_service_objective: str - :ivar server_name: The name of the server the elastic pool is in. - :vartype server_name: str - :ivar start_time: The time the operation started (ISO8601 format). - :vartype start_time: datetime - :ivar state: The current state of the operation. - :vartype state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_name': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_message': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_id': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'requested_elastic_pool_name': {'readonly': True}, - 'current_elastic_pool_name': {'readonly': True}, - 'current_service_objective': {'readonly': True}, - 'requested_service_objective': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, - 'current_elastic_pool_name': {'key': 'properties.currentElasticPoolName', 'type': 'str'}, - 'current_service_objective': {'key': 'properties.currentServiceObjective', 'type': 'str'}, - 'requested_service_objective': {'key': 'properties.requestedServiceObjective', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolDatabaseActivity, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.database_name = None - self.end_time = None - self.error_code = None - self.error_message = None - self.error_severity = None - self.operation = None - self.operation_id = None - self.percent_complete = None - self.requested_elastic_pool_name = None - self.current_elastic_pool_name = None - self.current_service_objective = None - self.requested_service_objective = None - self.server_name = None - self.start_time = None - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_paged.py deleted file mode 100644 index e4d12fc20b4a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ElasticPoolDatabaseActivityPaged(Paged): - """ - A paging container for iterating over a list of :class:`ElasticPoolDatabaseActivity ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ElasticPoolDatabaseActivity]'} - } - - def __init__(self, *args, **kwargs): - - super(ElasticPoolDatabaseActivityPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_py3.py deleted file mode 100644 index 2e2818eee69a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_py3.py +++ /dev/null @@ -1,125 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ElasticPoolDatabaseActivity(ProxyResource): - """Represents the activity on an elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar database_name: The database name. - :vartype database_name: str - :ivar end_time: The time the operation finished (ISO8601 format). - :vartype end_time: datetime - :ivar error_code: The error code if available. - :vartype error_code: int - :ivar error_message: The error message if available. - :vartype error_message: str - :ivar error_severity: The error severity if available. - :vartype error_severity: int - :ivar operation: The operation name. - :vartype operation: str - :ivar operation_id: The unique operation ID. - :vartype operation_id: str - :ivar percent_complete: The percentage complete if available. - :vartype percent_complete: int - :ivar requested_elastic_pool_name: The name for the elastic pool the - database is moving into if available. - :vartype requested_elastic_pool_name: str - :ivar current_elastic_pool_name: The name of the current elastic pool the - database is in if available. - :vartype current_elastic_pool_name: str - :ivar current_service_objective: The name of the current service objective - if available. - :vartype current_service_objective: str - :ivar requested_service_objective: The name of the requested service - objective if available. - :vartype requested_service_objective: str - :ivar server_name: The name of the server the elastic pool is in. - :vartype server_name: str - :ivar start_time: The time the operation started (ISO8601 format). - :vartype start_time: datetime - :ivar state: The current state of the operation. - :vartype state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_name': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_message': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_id': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'requested_elastic_pool_name': {'readonly': True}, - 'current_elastic_pool_name': {'readonly': True}, - 'current_service_objective': {'readonly': True}, - 'requested_service_objective': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, - 'current_elastic_pool_name': {'key': 'properties.currentElasticPoolName', 'type': 'str'}, - 'current_service_objective': {'key': 'properties.currentServiceObjective', 'type': 'str'}, - 'requested_service_objective': {'key': 'properties.requestedServiceObjective', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, **kwargs) -> None: - super(ElasticPoolDatabaseActivity, self).__init__(**kwargs) - self.location = location - self.database_name = None - self.end_time = None - self.error_code = None - self.error_message = None - self.error_severity = None - self.operation = None - self.operation_id = None - self.percent_complete = None - self.requested_elastic_pool_name = None - self.current_elastic_pool_name = None - self.current_service_objective = None - self.requested_service_objective = None - self.server_name = None - self.start_time = None - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability.py deleted file mode 100644 index f870c33b6143..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolEditionCapability(Model): - """The elastic pool edition capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The elastic pool edition name. - :vartype name: str - :ivar supported_elastic_pool_performance_levels: The list of supported - elastic pool DTU levels for the edition. - :vartype supported_elastic_pool_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerformanceLevelCapability] - :ivar zone_redundant: Whether or not zone redundancy is supported for the - edition. - :vartype zone_redundant: bool - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_elastic_pool_performance_levels': {'readonly': True}, - 'zone_redundant': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_elastic_pool_performance_levels': {'key': 'supportedElasticPoolPerformanceLevels', 'type': '[ElasticPoolPerformanceLevelCapability]'}, - 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_elastic_pool_performance_levels = None - self.zone_redundant = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability_py3.py deleted file mode 100644 index 54af1f63906f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolEditionCapability(Model): - """The elastic pool edition capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The elastic pool edition name. - :vartype name: str - :ivar supported_elastic_pool_performance_levels: The list of supported - elastic pool DTU levels for the edition. - :vartype supported_elastic_pool_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerformanceLevelCapability] - :ivar zone_redundant: Whether or not zone redundancy is supported for the - edition. - :vartype zone_redundant: bool - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_elastic_pool_performance_levels': {'readonly': True}, - 'zone_redundant': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_elastic_pool_performance_levels': {'key': 'supportedElasticPoolPerformanceLevels', 'type': '[ElasticPoolPerformanceLevelCapability]'}, - 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ElasticPoolEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_elastic_pool_performance_levels = None - self.zone_redundant = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation.py deleted file mode 100644 index 7f01bbf3f1af..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ElasticPoolOperation(ProxyResource): - """A elastic pool operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar elastic_pool_name: The name of the elastic pool the operation is - being performed on. - :vartype elastic_pool_name: str - :ivar operation: The name of operation. - :vartype operation: str - :ivar operation_friendly_name: The friendly name of operation. - :vartype operation_friendly_name: str - :ivar percent_complete: The percentage of the operation completed. - :vartype percent_complete: int - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar start_time: The operation start time. - :vartype start_time: datetime - :ivar state: The operation state. - :vartype state: str - :ivar error_code: The operation error code. - :vartype error_code: int - :ivar error_description: The operation error description. - :vartype error_description: str - :ivar error_severity: The operation error severity. - :vartype error_severity: int - :ivar is_user_error: Whether or not the error is a user error. - :vartype is_user_error: bool - :ivar estimated_completion_time: The estimated completion time of the - operation. - :vartype estimated_completion_time: datetime - :ivar description: The operation description. - :vartype description: str - :ivar is_cancellable: Whether the operation can be cancelled. - :vartype is_cancellable: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_friendly_name': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_description': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'is_user_error': {'readonly': True}, - 'estimated_completion_time': {'readonly': True}, - 'description': {'readonly': True}, - 'is_cancellable': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, - 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolOperation, self).__init__(**kwargs) - self.elastic_pool_name = None - self.operation = None - self.operation_friendly_name = None - self.percent_complete = None - self.server_name = None - self.start_time = None - self.state = None - self.error_code = None - self.error_description = None - self.error_severity = None - self.is_user_error = None - self.estimated_completion_time = None - self.description = None - self.is_cancellable = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_paged.py deleted file mode 100644 index 530637e1479c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ElasticPoolOperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`ElasticPoolOperation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ElasticPoolOperation]'} - } - - def __init__(self, *args, **kwargs): - - super(ElasticPoolOperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_py3.py deleted file mode 100644 index c214b66532a5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_py3.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ElasticPoolOperation(ProxyResource): - """A elastic pool operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar elastic_pool_name: The name of the elastic pool the operation is - being performed on. - :vartype elastic_pool_name: str - :ivar operation: The name of operation. - :vartype operation: str - :ivar operation_friendly_name: The friendly name of operation. - :vartype operation_friendly_name: str - :ivar percent_complete: The percentage of the operation completed. - :vartype percent_complete: int - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar start_time: The operation start time. - :vartype start_time: datetime - :ivar state: The operation state. - :vartype state: str - :ivar error_code: The operation error code. - :vartype error_code: int - :ivar error_description: The operation error description. - :vartype error_description: str - :ivar error_severity: The operation error severity. - :vartype error_severity: int - :ivar is_user_error: Whether or not the error is a user error. - :vartype is_user_error: bool - :ivar estimated_completion_time: The estimated completion time of the - operation. - :vartype estimated_completion_time: datetime - :ivar description: The operation description. - :vartype description: str - :ivar is_cancellable: Whether the operation can be cancelled. - :vartype is_cancellable: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_friendly_name': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_description': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'is_user_error': {'readonly': True}, - 'estimated_completion_time': {'readonly': True}, - 'description': {'readonly': True}, - 'is_cancellable': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, - 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, - } - - def __init__(self, **kwargs) -> None: - super(ElasticPoolOperation, self).__init__(**kwargs) - self.elastic_pool_name = None - self.operation = None - self.operation_friendly_name = None - self.percent_complete = None - self.server_name = None - self.start_time = None - self.state = None - self.error_code = None - self.error_description = None - self.error_severity = None - self.is_user_error = None - self.estimated_completion_time = None - self.description = None - self.is_cancellable = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_paged.py deleted file mode 100644 index 4c391860ee2d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ElasticPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`ElasticPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ElasticPool]'} - } - - def __init__(self, *args, **kwargs): - - super(ElasticPoolPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability.py deleted file mode 100644 index 1f99b527f962..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseMaxPerformanceLevelCapability(Model): - """The max per-database performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The maximum performance level per database. - :vartype limit: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - :ivar supported_per_database_min_performance_levels: The list of supported - min database performance levels. - :vartype supported_per_database_min_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMinPerformanceLevelCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'supported_per_database_min_performance_levels': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'supported_per_database_min_performance_levels': {'key': 'supportedPerDatabaseMinPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMinPerformanceLevelCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolPerDatabaseMaxPerformanceLevelCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None - self.supported_per_database_min_performance_levels = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability_py3.py deleted file mode 100644 index 7e80c9d6cd5e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseMaxPerformanceLevelCapability(Model): - """The max per-database performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The maximum performance level per database. - :vartype limit: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - :ivar supported_per_database_min_performance_levels: The list of supported - min database performance levels. - :vartype supported_per_database_min_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMinPerformanceLevelCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'supported_per_database_min_performance_levels': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'supported_per_database_min_performance_levels': {'key': 'supportedPerDatabaseMinPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMinPerformanceLevelCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ElasticPoolPerDatabaseMaxPerformanceLevelCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None - self.supported_per_database_min_performance_levels = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability.py deleted file mode 100644 index 52306e685c47..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseMinPerformanceLevelCapability(Model): - """The minimum per-database performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The minimum performance level per database. - :vartype limit: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolPerDatabaseMinPerformanceLevelCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability_py3.py deleted file mode 100644 index d1dceda281f6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseMinPerformanceLevelCapability(Model): - """The minimum per-database performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The minimum performance level per database. - :vartype limit: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ElasticPoolPerDatabaseMinPerformanceLevelCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings.py deleted file mode 100644 index 5c7951cd9c4b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseSettings(Model): - """Per database settings of an elastic pool. - - :param min_capacity: The minimum capacity all databases are guaranteed. - :type min_capacity: float - :param max_capacity: The maximum capacity any one database can consume. - :type max_capacity: float - """ - - _attribute_map = { - 'min_capacity': {'key': 'minCapacity', 'type': 'float'}, - 'max_capacity': {'key': 'maxCapacity', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolPerDatabaseSettings, self).__init__(**kwargs) - self.min_capacity = kwargs.get('min_capacity', None) - self.max_capacity = kwargs.get('max_capacity', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings_py3.py deleted file mode 100644 index 64ab19c4217d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseSettings(Model): - """Per database settings of an elastic pool. - - :param min_capacity: The minimum capacity all databases are guaranteed. - :type min_capacity: float - :param max_capacity: The maximum capacity any one database can consume. - :type max_capacity: float - """ - - _attribute_map = { - 'min_capacity': {'key': 'minCapacity', 'type': 'float'}, - 'max_capacity': {'key': 'maxCapacity', 'type': 'float'}, - } - - def __init__(self, *, min_capacity: float=None, max_capacity: float=None, **kwargs) -> None: - super(ElasticPoolPerDatabaseSettings, self).__init__(**kwargs) - self.min_capacity = min_capacity - self.max_capacity = max_capacity diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability.py deleted file mode 100644 index 8d5de8c9e0db..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerformanceLevelCapability(Model): - """The Elastic Pool performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar performance_level: The performance level for the pool. - :vartype performance_level: - ~azure.mgmt.sql.models.PerformanceLevelCapability - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.sql.models.Sku - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar max_database_count: The maximum number of databases supported. - :vartype max_database_count: int - :ivar included_max_size: The included (free) max size for this performance - level. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar supported_max_sizes: The list of supported max sizes. - :vartype supported_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar supported_per_database_max_sizes: The list of supported per database - max sizes. - :vartype supported_per_database_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar supported_per_database_max_performance_levels: The list of supported - per database max performance levels. - :vartype supported_per_database_max_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMaxPerformanceLevelCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'performance_level': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'max_database_count': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'supported_max_sizes': {'readonly': True}, - 'supported_per_database_max_sizes': {'readonly': True}, - 'supported_per_database_max_performance_levels': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'max_database_count': {'key': 'maxDatabaseCount', 'type': 'int'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'supported_per_database_max_sizes': {'key': 'supportedPerDatabaseMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'supported_per_database_max_performance_levels': {'key': 'supportedPerDatabaseMaxPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMaxPerformanceLevelCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolPerformanceLevelCapability, self).__init__(**kwargs) - self.performance_level = None - self.sku = None - self.supported_license_types = None - self.max_database_count = None - self.included_max_size = None - self.supported_max_sizes = None - self.supported_per_database_max_sizes = None - self.supported_per_database_max_performance_levels = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability_py3.py deleted file mode 100644 index 6842c7fed8b8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerformanceLevelCapability(Model): - """The Elastic Pool performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar performance_level: The performance level for the pool. - :vartype performance_level: - ~azure.mgmt.sql.models.PerformanceLevelCapability - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.sql.models.Sku - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar max_database_count: The maximum number of databases supported. - :vartype max_database_count: int - :ivar included_max_size: The included (free) max size for this performance - level. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar supported_max_sizes: The list of supported max sizes. - :vartype supported_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar supported_per_database_max_sizes: The list of supported per database - max sizes. - :vartype supported_per_database_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar supported_per_database_max_performance_levels: The list of supported - per database max performance levels. - :vartype supported_per_database_max_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMaxPerformanceLevelCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'performance_level': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'max_database_count': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'supported_max_sizes': {'readonly': True}, - 'supported_per_database_max_sizes': {'readonly': True}, - 'supported_per_database_max_performance_levels': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'max_database_count': {'key': 'maxDatabaseCount', 'type': 'int'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'supported_per_database_max_sizes': {'key': 'supportedPerDatabaseMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'supported_per_database_max_performance_levels': {'key': 'supportedPerDatabaseMaxPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMaxPerformanceLevelCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ElasticPoolPerformanceLevelCapability, self).__init__(**kwargs) - self.performance_level = None - self.sku = None - self.supported_license_types = None - self.max_database_count = None - self.included_max_size = None - self.supported_max_sizes = None - self.supported_per_database_max_sizes = None - self.supported_per_database_max_performance_levels = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py deleted file mode 100644 index eb092529ac3b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class ElasticPool(TrackedResource): - """An elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.sql.models.Sku - :ivar kind: Kind of elastic pool. This is metadata used for the Azure - portal experience. - :vartype kind: str - :ivar state: The state of the elastic pool. Possible values include: - 'Creating', 'Ready', 'Disabled' - :vartype state: str or ~azure.mgmt.sql.models.ElasticPoolState - :ivar creation_date: The creation date of the elastic pool (ISO8601 - format). - :vartype creation_date: datetime - :param max_size_bytes: The storage limit for the database elastic pool in - bytes. - :type max_size_bytes: long - :param per_database_settings: The per database settings for the elastic - pool. - :type per_database_settings: - ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings - :param zone_redundant: Whether or not this elastic pool is zone redundant, - which means the replicas of this elastic pool will be spread across - multiple availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this elastic pool. - Possible values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'state': {'readonly': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, sku=None, max_size_bytes: int=None, per_database_settings=None, zone_redundant: bool=None, license_type=None, **kwargs) -> None: - super(ElasticPool, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.kind = None - self.state = None - self.creation_date = None - self.max_size_bytes = max_size_bytes - self.per_database_settings = per_database_settings - self.zone_redundant = zone_redundant - self.license_type = license_type diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update.py deleted file mode 100644 index ce71dfa7257e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolUpdate(Model): - """An elastic pool update. - - :param sku: - :type sku: ~azure.mgmt.sql.models.Sku - :param max_size_bytes: The storage limit for the database elastic pool in - bytes. - :type max_size_bytes: long - :param per_database_settings: The per database settings for the elastic - pool. - :type per_database_settings: - ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings - :param zone_redundant: Whether or not this elastic pool is zone redundant, - which means the replicas of this elastic pool will be spread across - multiple availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this elastic pool. - Possible values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolUpdate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.max_size_bytes = kwargs.get('max_size_bytes', None) - self.per_database_settings = kwargs.get('per_database_settings', None) - self.zone_redundant = kwargs.get('zone_redundant', None) - self.license_type = kwargs.get('license_type', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update_py3.py deleted file mode 100644 index d51753795c8a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolUpdate(Model): - """An elastic pool update. - - :param sku: - :type sku: ~azure.mgmt.sql.models.Sku - :param max_size_bytes: The storage limit for the database elastic pool in - bytes. - :type max_size_bytes: long - :param per_database_settings: The per database settings for the elastic - pool. - :type per_database_settings: - ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings - :param zone_redundant: Whether or not this elastic pool is zone redundant, - which means the replicas of this elastic pool will be spread across - multiple availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this elastic pool. - Possible values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, sku=None, max_size_bytes: int=None, per_database_settings=None, zone_redundant: bool=None, license_type=None, tags=None, **kwargs) -> None: - super(ElasticPoolUpdate, self).__init__(**kwargs) - self.sku = sku - self.max_size_bytes = max_size_bytes - self.per_database_settings = per_database_settings - self.zone_redundant = zone_redundant - self.license_type = license_type - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector.py deleted file mode 100644 index f6fe4ba3732d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class EncryptionProtector(ProxyResource): - """The server encryption protector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :type kind: str - :ivar location: Resource location. - :vartype location: str - :ivar subregion: Subregion of the encryption protector. - :vartype subregion: str - :param server_key_name: The name of the server key. - :type server_key_name: str - :param server_key_type: Required. The encryption protector type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :ivar uri: The URI of the server key. - :vartype uri: str - :ivar thumbprint: Thumbprint of the server key. - :vartype thumbprint: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'subregion': {'readonly': True}, - 'server_key_type': {'required': True}, - 'uri': {'readonly': True}, - 'thumbprint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'subregion': {'key': 'properties.subregion', 'type': 'str'}, - 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EncryptionProtector, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) - self.location = None - self.subregion = None - self.server_key_name = kwargs.get('server_key_name', None) - self.server_key_type = kwargs.get('server_key_type', None) - self.uri = None - self.thumbprint = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_paged.py deleted file mode 100644 index afb096561566..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class EncryptionProtectorPaged(Paged): - """ - A paging container for iterating over a list of :class:`EncryptionProtector ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[EncryptionProtector]'} - } - - def __init__(self, *args, **kwargs): - - super(EncryptionProtectorPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_py3.py deleted file mode 100644 index 6dd4bad3cfbe..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class EncryptionProtector(ProxyResource): - """The server encryption protector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :type kind: str - :ivar location: Resource location. - :vartype location: str - :ivar subregion: Subregion of the encryption protector. - :vartype subregion: str - :param server_key_name: The name of the server key. - :type server_key_name: str - :param server_key_type: Required. The encryption protector type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :ivar uri: The URI of the server key. - :vartype uri: str - :ivar thumbprint: Thumbprint of the server key. - :vartype thumbprint: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'subregion': {'readonly': True}, - 'server_key_type': {'required': True}, - 'uri': {'readonly': True}, - 'thumbprint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'subregion': {'key': 'properties.subregion', 'type': 'str'}, - 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, *, server_key_type, kind: str=None, server_key_name: str=None, **kwargs) -> None: - super(EncryptionProtector, self).__init__(**kwargs) - self.kind = kind - self.location = None - self.subregion = None - self.server_key_name = server_key_name - self.server_key_type = server_key_type - self.uri = None - self.thumbprint = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request.py deleted file mode 100644 index c0eb27d98299..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportRequest(Model): - """Export database parameters. - - All required parameters must be populated in order to send to Azure. - - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - } - - _attribute_map = { - 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, - } - - def __init__(self, **kwargs): - super(ExportRequest, self).__init__(**kwargs) - self.storage_key_type = kwargs.get('storage_key_type', None) - self.storage_key = kwargs.get('storage_key', None) - self.storage_uri = kwargs.get('storage_uri', None) - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.authentication_type = kwargs.get('authentication_type', "SQL") diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request_py3.py deleted file mode 100644 index 1cb99a5fe8fe..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportRequest(Model): - """Export database parameters. - - All required parameters must be populated in order to send to Azure. - - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - } - - _attribute_map = { - 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, - } - - def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, authentication_type="SQL", **kwargs) -> None: - super(ExportRequest, self).__init__(**kwargs) - self.storage_key_type = storage_key_type - self.storage_key = storage_key - self.storage_uri = storage_uri - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.authentication_type = authentication_type diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy.py deleted file mode 100644 index 48c324aa3153..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): - """An extended database blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param predicate_expression: Specifies condition of where clause when - creating an audit. - :type predicate_expression: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ExtendedDatabaseBlobAuditingPolicy, self).__init__(**kwargs) - self.predicate_expression = kwargs.get('predicate_expression', None) - self.state = kwargs.get('state', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) - self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) - self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) - self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy_py3.py deleted file mode 100644 index 9550f279968c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy_py3.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): - """An extended database blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param predicate_expression: Specifies condition of where clause when - creating an audit. - :type predicate_expression: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: - super(ExtendedDatabaseBlobAuditingPolicy, self).__init__(**kwargs) - self.predicate_expression = predicate_expression - self.state = state - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.audit_actions_and_groups = audit_actions_and_groups - self.storage_account_subscription_id = storage_account_subscription_id - self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use - self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy.py deleted file mode 100644 index ac110357f4b8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ExtendedServerBlobAuditingPolicy(ProxyResource): - """An extended server blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param predicate_expression: Specifies condition of where clause when - creating an audit. - :type predicate_expression: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ExtendedServerBlobAuditingPolicy, self).__init__(**kwargs) - self.predicate_expression = kwargs.get('predicate_expression', None) - self.state = kwargs.get('state', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) - self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) - self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) - self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy_py3.py deleted file mode 100644 index 89b96febe17d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy_py3.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ExtendedServerBlobAuditingPolicy(ProxyResource): - """An extended server blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param predicate_expression: Specifies condition of where clause when - creating an audit. - :type predicate_expression: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: - super(ExtendedServerBlobAuditingPolicy, self).__init__(**kwargs) - self.predicate_expression = predicate_expression - self.state = state - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.audit_actions_and_groups = audit_actions_and_groups - self.storage_account_subscription_id = storage_account_subscription_id - self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use - self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group.py deleted file mode 100644 index 1fd973aae6ff..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class FailoverGroup(ProxyResource): - """A failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param read_write_endpoint: Required. Read-write endpoint of the failover - group instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint - :ivar replication_role: Local replication role of the failover group - instance. Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.FailoverGroupReplicationRole - :ivar replication_state: Replication state of the failover group instance. - :vartype replication_state: str - :param partner_servers: Required. List of partner server information for - the failover group. - :type partner_servers: list[~azure.mgmt.sql.models.PartnerInfo] - :param databases: List of databases in the failover group. - :type databases: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'read_write_endpoint': {'required': True}, - 'replication_role': {'readonly': True}, - 'replication_state': {'readonly': True}, - 'partner_servers': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - 'partner_servers': {'key': 'properties.partnerServers', 'type': '[PartnerInfo]'}, - 'databases': {'key': 'properties.databases', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(FailoverGroup, self).__init__(**kwargs) - self.location = None - self.tags = kwargs.get('tags', None) - self.read_write_endpoint = kwargs.get('read_write_endpoint', None) - self.read_only_endpoint = kwargs.get('read_only_endpoint', None) - self.replication_role = None - self.replication_state = None - self.partner_servers = kwargs.get('partner_servers', None) - self.databases = kwargs.get('databases', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_paged.py deleted file mode 100644 index 5bdb8723cdc3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class FailoverGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`FailoverGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[FailoverGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(FailoverGroupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_py3.py deleted file mode 100644 index 4b179cf5b45f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class FailoverGroup(ProxyResource): - """A failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param read_write_endpoint: Required. Read-write endpoint of the failover - group instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint - :ivar replication_role: Local replication role of the failover group - instance. Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.FailoverGroupReplicationRole - :ivar replication_state: Replication state of the failover group instance. - :vartype replication_state: str - :param partner_servers: Required. List of partner server information for - the failover group. - :type partner_servers: list[~azure.mgmt.sql.models.PartnerInfo] - :param databases: List of databases in the failover group. - :type databases: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'read_write_endpoint': {'required': True}, - 'replication_role': {'readonly': True}, - 'replication_state': {'readonly': True}, - 'partner_servers': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - 'partner_servers': {'key': 'properties.partnerServers', 'type': '[PartnerInfo]'}, - 'databases': {'key': 'properties.databases', 'type': '[str]'}, - } - - def __init__(self, *, read_write_endpoint, partner_servers, tags=None, read_only_endpoint=None, databases=None, **kwargs) -> None: - super(FailoverGroup, self).__init__(**kwargs) - self.location = None - self.tags = tags - self.read_write_endpoint = read_write_endpoint - self.read_only_endpoint = read_only_endpoint - self.replication_role = None - self.replication_state = None - self.partner_servers = partner_servers - self.databases = databases diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint.py deleted file mode 100644 index c64da55dfec9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupReadOnlyEndpoint(Model): - """Read-only endpoint of the failover group instance. - - :param failover_policy: Failover policy of the read-only endpoint for the - failover group. Possible values include: 'Disabled', 'Enabled' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy - """ - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) - self.failover_policy = kwargs.get('failover_policy', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint_py3.py deleted file mode 100644 index aa923c8b0ce8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupReadOnlyEndpoint(Model): - """Read-only endpoint of the failover group instance. - - :param failover_policy: Failover policy of the read-only endpoint for the - failover group. Possible values include: 'Disabled', 'Enabled' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy - """ - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - } - - def __init__(self, *, failover_policy=None, **kwargs) -> None: - super(FailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) - self.failover_policy = failover_policy diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint.py deleted file mode 100644 index 8eb4368fe7be..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupReadWriteEndpoint(Model): - """Read-write endpoint of the failover group instance. - - All required parameters must be populated in order to send to Azure. - - :param failover_policy: Required. Failover policy of the read-write - endpoint for the failover group. If failoverPolicy is Automatic then - failoverWithDataLossGracePeriodMinutes is required. Possible values - include: 'Manual', 'Automatic' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy - :param failover_with_data_loss_grace_period_minutes: Grace period before - failover with data loss is attempted for the read-write endpoint. If - failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is - required. - :type failover_with_data_loss_grace_period_minutes: int - """ - - _validation = { - 'failover_policy': {'required': True}, - } - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(FailoverGroupReadWriteEndpoint, self).__init__(**kwargs) - self.failover_policy = kwargs.get('failover_policy', None) - self.failover_with_data_loss_grace_period_minutes = kwargs.get('failover_with_data_loss_grace_period_minutes', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint_py3.py deleted file mode 100644 index f9ffb4558ebc..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupReadWriteEndpoint(Model): - """Read-write endpoint of the failover group instance. - - All required parameters must be populated in order to send to Azure. - - :param failover_policy: Required. Failover policy of the read-write - endpoint for the failover group. If failoverPolicy is Automatic then - failoverWithDataLossGracePeriodMinutes is required. Possible values - include: 'Manual', 'Automatic' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy - :param failover_with_data_loss_grace_period_minutes: Grace period before - failover with data loss is attempted for the read-write endpoint. If - failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is - required. - :type failover_with_data_loss_grace_period_minutes: int - """ - - _validation = { - 'failover_policy': {'required': True}, - } - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, - } - - def __init__(self, *, failover_policy, failover_with_data_loss_grace_period_minutes: int=None, **kwargs) -> None: - super(FailoverGroupReadWriteEndpoint, self).__init__(**kwargs) - self.failover_policy = failover_policy - self.failover_with_data_loss_grace_period_minutes = failover_with_data_loss_grace_period_minutes diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update.py deleted file mode 100644 index e491b250f0da..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupUpdate(Model): - """A failover group update request. - - :param read_write_endpoint: Read-write endpoint of the failover group - instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint - :param databases: List of databases in the failover group. - :type databases: list[str] - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, - 'databases': {'key': 'properties.databases', 'type': '[str]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(FailoverGroupUpdate, self).__init__(**kwargs) - self.read_write_endpoint = kwargs.get('read_write_endpoint', None) - self.read_only_endpoint = kwargs.get('read_only_endpoint', None) - self.databases = kwargs.get('databases', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update_py3.py deleted file mode 100644 index 3aee1ee5c78c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupUpdate(Model): - """A failover group update request. - - :param read_write_endpoint: Read-write endpoint of the failover group - instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint - :param databases: List of databases in the failover group. - :type databases: list[str] - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, - 'databases': {'key': 'properties.databases', 'type': '[str]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, read_write_endpoint=None, read_only_endpoint=None, databases=None, tags=None, **kwargs) -> None: - super(FailoverGroupUpdate, self).__init__(**kwargs) - self.read_write_endpoint = read_write_endpoint - self.read_only_endpoint = read_only_endpoint - self.databases = databases - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule.py deleted file mode 100644 index 48004048c43a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class FirewallRule(ProxyResource): - """Represents a server firewall rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of server that contains this firewall rule. - :vartype kind: str - :ivar location: Location of the server that contains this firewall rule. - :vartype location: str - :param start_ip_address: Required. The start IP address of the firewall - rule. Must be IPv4 format. Use value '0.0.0.0' to represent all - Azure-internal IP addresses. - :type start_ip_address: str - :param end_ip_address: Required. The end IP address of the firewall rule. - Must be IPv4 format. Must be greater than or equal to startIpAddress. Use - value '0.0.0.0' to represent all Azure-internal IP addresses. - :type end_ip_address: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - 'start_ip_address': {'required': True}, - 'end_ip_address': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, - 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FirewallRule, self).__init__(**kwargs) - self.kind = None - self.location = None - self.start_ip_address = kwargs.get('start_ip_address', None) - self.end_ip_address = kwargs.get('end_ip_address', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_paged.py deleted file mode 100644 index 07586a09287a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class FirewallRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`FirewallRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[FirewallRule]'} - } - - def __init__(self, *args, **kwargs): - - super(FirewallRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_py3.py deleted file mode 100644 index c292730d9653..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_py3.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class FirewallRule(ProxyResource): - """Represents a server firewall rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of server that contains this firewall rule. - :vartype kind: str - :ivar location: Location of the server that contains this firewall rule. - :vartype location: str - :param start_ip_address: Required. The start IP address of the firewall - rule. Must be IPv4 format. Use value '0.0.0.0' to represent all - Azure-internal IP addresses. - :type start_ip_address: str - :param end_ip_address: Required. The end IP address of the firewall rule. - Must be IPv4 format. Must be greater than or equal to startIpAddress. Use - value '0.0.0.0' to represent all Azure-internal IP addresses. - :type end_ip_address: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - 'start_ip_address': {'required': True}, - 'end_ip_address': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, - 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, - } - - def __init__(self, *, start_ip_address: str, end_ip_address: str, **kwargs) -> None: - super(FirewallRule, self).__init__(**kwargs) - self.kind = None - self.location = None - self.start_ip_address = start_ip_address - self.end_ip_address = end_ip_address diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy.py deleted file mode 100644 index 3d8203075617..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class GeoBackupPolicy(ProxyResource): - """A database geo backup policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. The state of the geo backup policy. Possible - values include: 'Disabled', 'Enabled' - :type state: str or ~azure.mgmt.sql.models.GeoBackupPolicyState - :ivar storage_type: The storage type of the geo backup policy. - :vartype storage_type: str - :ivar kind: Kind of geo backup policy. This is metadata used for the - Azure portal experience. - :vartype kind: str - :ivar location: Backup policy location. - :vartype location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'storage_type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'GeoBackupPolicyState'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GeoBackupPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.storage_type = None - self.kind = None - self.location = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_paged.py deleted file mode 100644 index 7a207daa100e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class GeoBackupPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`GeoBackupPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GeoBackupPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(GeoBackupPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_py3.py deleted file mode 100644 index 23941df5ee47..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class GeoBackupPolicy(ProxyResource): - """A database geo backup policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. The state of the geo backup policy. Possible - values include: 'Disabled', 'Enabled' - :type state: str or ~azure.mgmt.sql.models.GeoBackupPolicyState - :ivar storage_type: The storage type of the geo backup policy. - :vartype storage_type: str - :ivar kind: Kind of geo backup policy. This is metadata used for the - Azure portal experience. - :vartype kind: str - :ivar location: Backup policy location. - :vartype location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'storage_type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'GeoBackupPolicyState'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, *, state, **kwargs) -> None: - super(GeoBackupPolicy, self).__init__(**kwargs) - self.state = state - self.storage_type = None - self.kind = None - self.location = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response.py deleted file mode 100644 index 5cfb638398f0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ImportExportResponse(ProxyResource): - """Response for Import/Export Get operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar request_type: The request type of the operation. - :vartype request_type: str - :ivar request_id: The request type of the operation. - :vartype request_id: str - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar database_name: The name of the database. - :vartype database_name: str - :ivar status: The status message returned from the server. - :vartype status: str - :ivar last_modified_time: The operation status last modified time. - :vartype last_modified_time: str - :ivar queued_time: The operation queued time. - :vartype queued_time: str - :ivar blob_uri: The blob uri. - :vartype blob_uri: str - :ivar error_message: The error message returned from the server. - :vartype error_message: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'request_type': {'readonly': True}, - 'request_id': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - 'status': {'readonly': True}, - 'last_modified_time': {'readonly': True}, - 'queued_time': {'readonly': True}, - 'blob_uri': {'readonly': True}, - 'error_message': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'request_type': {'key': 'properties.requestType', 'type': 'str'}, - 'request_id': {'key': 'properties.requestId', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'str'}, - 'queued_time': {'key': 'properties.queuedTime', 'type': 'str'}, - 'blob_uri': {'key': 'properties.blobUri', 'type': 'str'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImportExportResponse, self).__init__(**kwargs) - self.request_type = None - self.request_id = None - self.server_name = None - self.database_name = None - self.status = None - self.last_modified_time = None - self.queued_time = None - self.blob_uri = None - self.error_message = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response_py3.py deleted file mode 100644 index a344fc99266b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response_py3.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ImportExportResponse(ProxyResource): - """Response for Import/Export Get operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar request_type: The request type of the operation. - :vartype request_type: str - :ivar request_id: The request type of the operation. - :vartype request_id: str - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar database_name: The name of the database. - :vartype database_name: str - :ivar status: The status message returned from the server. - :vartype status: str - :ivar last_modified_time: The operation status last modified time. - :vartype last_modified_time: str - :ivar queued_time: The operation queued time. - :vartype queued_time: str - :ivar blob_uri: The blob uri. - :vartype blob_uri: str - :ivar error_message: The error message returned from the server. - :vartype error_message: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'request_type': {'readonly': True}, - 'request_id': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - 'status': {'readonly': True}, - 'last_modified_time': {'readonly': True}, - 'queued_time': {'readonly': True}, - 'blob_uri': {'readonly': True}, - 'error_message': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'request_type': {'key': 'properties.requestType', 'type': 'str'}, - 'request_id': {'key': 'properties.requestId', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'str'}, - 'queued_time': {'key': 'properties.queuedTime', 'type': 'str'}, - 'blob_uri': {'key': 'properties.blobUri', 'type': 'str'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ImportExportResponse, self).__init__(**kwargs) - self.request_type = None - self.request_id = None - self.server_name = None - self.database_name = None - self.status = None - self.last_modified_time = None - self.queued_time = None - self.blob_uri = None - self.error_message = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request.py deleted file mode 100644 index 3eba93dcec8e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImportExtensionRequest(Model): - """Import database parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: The name of the extension. - :type name: str - :param type: The type of the extension. - :type type: str - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - :ivar operation_mode: Required. The type of import operation being - performed. This is always Import. Default value: "Import" . - :vartype operation_mode: str - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - 'operation_mode': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_key_type': {'key': 'properties.storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'properties.storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'properties.storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'properties.authenticationType', 'type': 'AuthenticationType'}, - 'operation_mode': {'key': 'properties.operationMode', 'type': 'str'}, - } - - operation_mode = "Import" - - def __init__(self, **kwargs): - super(ImportExtensionRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.storage_key_type = kwargs.get('storage_key_type', None) - self.storage_key = kwargs.get('storage_key', None) - self.storage_uri = kwargs.get('storage_uri', None) - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.authentication_type = kwargs.get('authentication_type', "SQL") diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request_py3.py deleted file mode 100644 index 0486f0a68dbe..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImportExtensionRequest(Model): - """Import database parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: The name of the extension. - :type name: str - :param type: The type of the extension. - :type type: str - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - :ivar operation_mode: Required. The type of import operation being - performed. This is always Import. Default value: "Import" . - :vartype operation_mode: str - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - 'operation_mode': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_key_type': {'key': 'properties.storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'properties.storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'properties.storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'properties.authenticationType', 'type': 'AuthenticationType'}, - 'operation_mode': {'key': 'properties.operationMode', 'type': 'str'}, - } - - operation_mode = "Import" - - def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, name: str=None, type: str=None, authentication_type="SQL", **kwargs) -> None: - super(ImportExtensionRequest, self).__init__(**kwargs) - self.name = name - self.type = type - self.storage_key_type = storage_key_type - self.storage_key = storage_key - self.storage_uri = storage_uri - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.authentication_type = authentication_type diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request.py deleted file mode 100644 index a1683ffad9b4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .export_request import ExportRequest - - -class ImportRequest(ExportRequest): - """Import database parameters. - - All required parameters must be populated in order to send to Azure. - - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - :param database_name: Required. The name of the database to import. - :type database_name: str - :param edition: Required. The edition for the database being created. - Possible values include: 'Web', 'Business', 'Basic', 'Standard', - 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', - 'System2' - :type edition: str or ~azure.mgmt.sql.models.DatabaseEdition - :param service_objective_name: Required. The name of the service objective - to assign to the database. Possible values include: 'System', 'System0', - 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', - 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', - 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', - 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', - 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', - 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', - 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', - 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - :type service_objective_name: str or - ~azure.mgmt.sql.models.ServiceObjectiveName - :param max_size_bytes: Required. The maximum size for the newly imported - database. - :type max_size_bytes: str - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - 'database_name': {'required': True}, - 'edition': {'required': True}, - 'service_objective_name': {'required': True}, - 'max_size_bytes': {'required': True}, - } - - _attribute_map = { - 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'edition': {'key': 'edition', 'type': 'str'}, - 'service_objective_name': {'key': 'serviceObjectiveName', 'type': 'str'}, - 'max_size_bytes': {'key': 'maxSizeBytes', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImportRequest, self).__init__(**kwargs) - self.database_name = kwargs.get('database_name', None) - self.edition = kwargs.get('edition', None) - self.service_objective_name = kwargs.get('service_objective_name', None) - self.max_size_bytes = kwargs.get('max_size_bytes', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py deleted file mode 100644 index 68b97ae814a3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .export_request_py3 import ExportRequest - - -class ImportRequest(ExportRequest): - """Import database parameters. - - All required parameters must be populated in order to send to Azure. - - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - :param database_name: Required. The name of the database to import. - :type database_name: str - :param edition: Required. The edition for the database being created. - Possible values include: 'Web', 'Business', 'Basic', 'Standard', - 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', - 'System2' - :type edition: str or ~azure.mgmt.sql.models.DatabaseEdition - :param service_objective_name: Required. The name of the service objective - to assign to the database. Possible values include: 'System', 'System0', - 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', - 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', - 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', - 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', - 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', - 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', - 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', - 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - :type service_objective_name: str or - ~azure.mgmt.sql.models.ServiceObjectiveName - :param max_size_bytes: Required. The maximum size for the newly imported - database. - :type max_size_bytes: str - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - 'database_name': {'required': True}, - 'edition': {'required': True}, - 'service_objective_name': {'required': True}, - 'max_size_bytes': {'required': True}, - } - - _attribute_map = { - 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'edition': {'key': 'edition', 'type': 'str'}, - 'service_objective_name': {'key': 'serviceObjectiveName', 'type': 'str'}, - 'max_size_bytes': {'key': 'maxSizeBytes', 'type': 'str'}, - } - - def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, database_name: str, edition, service_objective_name, max_size_bytes: str, authentication_type="SQL", **kwargs) -> None: - super(ImportRequest, self).__init__(storage_key_type=storage_key_type, storage_key=storage_key, storage_uri=storage_uri, administrator_login=administrator_login, administrator_login_password=administrator_login_password, authentication_type=authentication_type, **kwargs) - self.database_name = database_name - self.edition = edition - self.service_objective_name = service_objective_name - self.max_size_bytes = max_size_bytes diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group.py deleted file mode 100644 index f360ffbfed57..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class InstanceFailoverGroup(ProxyResource): - """An instance failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param read_write_endpoint: Required. Read-write endpoint of the failover - group instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.InstanceFailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.InstanceFailoverGroupReadOnlyEndpoint - :ivar replication_role: Local replication role of the failover group - instance. Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole - :ivar replication_state: Replication state of the failover group instance. - :vartype replication_state: str - :param partner_regions: Required. Partner region information for the - failover group. - :type partner_regions: list[~azure.mgmt.sql.models.PartnerRegionInfo] - :param managed_instance_pairs: Required. List of managed instance pairs in - the failover group. - :type managed_instance_pairs: - list[~azure.mgmt.sql.models.ManagedInstancePairInfo] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'read_write_endpoint': {'required': True}, - 'replication_role': {'readonly': True}, - 'replication_state': {'readonly': True}, - 'partner_regions': {'required': True}, - 'managed_instance_pairs': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'InstanceFailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'InstanceFailoverGroupReadOnlyEndpoint'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - 'partner_regions': {'key': 'properties.partnerRegions', 'type': '[PartnerRegionInfo]'}, - 'managed_instance_pairs': {'key': 'properties.managedInstancePairs', 'type': '[ManagedInstancePairInfo]'}, - } - - def __init__(self, **kwargs): - super(InstanceFailoverGroup, self).__init__(**kwargs) - self.read_write_endpoint = kwargs.get('read_write_endpoint', None) - self.read_only_endpoint = kwargs.get('read_only_endpoint', None) - self.replication_role = None - self.replication_state = None - self.partner_regions = kwargs.get('partner_regions', None) - self.managed_instance_pairs = kwargs.get('managed_instance_pairs', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_paged.py deleted file mode 100644 index c67eaf2ef670..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class InstanceFailoverGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`InstanceFailoverGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[InstanceFailoverGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(InstanceFailoverGroupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_py3.py deleted file mode 100644 index 8959f26c9f69..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_py3.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class InstanceFailoverGroup(ProxyResource): - """An instance failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param read_write_endpoint: Required. Read-write endpoint of the failover - group instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.InstanceFailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.InstanceFailoverGroupReadOnlyEndpoint - :ivar replication_role: Local replication role of the failover group - instance. Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole - :ivar replication_state: Replication state of the failover group instance. - :vartype replication_state: str - :param partner_regions: Required. Partner region information for the - failover group. - :type partner_regions: list[~azure.mgmt.sql.models.PartnerRegionInfo] - :param managed_instance_pairs: Required. List of managed instance pairs in - the failover group. - :type managed_instance_pairs: - list[~azure.mgmt.sql.models.ManagedInstancePairInfo] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'read_write_endpoint': {'required': True}, - 'replication_role': {'readonly': True}, - 'replication_state': {'readonly': True}, - 'partner_regions': {'required': True}, - 'managed_instance_pairs': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'InstanceFailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'InstanceFailoverGroupReadOnlyEndpoint'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - 'partner_regions': {'key': 'properties.partnerRegions', 'type': '[PartnerRegionInfo]'}, - 'managed_instance_pairs': {'key': 'properties.managedInstancePairs', 'type': '[ManagedInstancePairInfo]'}, - } - - def __init__(self, *, read_write_endpoint, partner_regions, managed_instance_pairs, read_only_endpoint=None, **kwargs) -> None: - super(InstanceFailoverGroup, self).__init__(**kwargs) - self.read_write_endpoint = read_write_endpoint - self.read_only_endpoint = read_only_endpoint - self.replication_role = None - self.replication_state = None - self.partner_regions = partner_regions - self.managed_instance_pairs = managed_instance_pairs diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint.py deleted file mode 100644 index 2a9857817ae4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceFailoverGroupReadOnlyEndpoint(Model): - """Read-only endpoint of the failover group instance. - - :param failover_policy: Failover policy of the read-only endpoint for the - failover group. Possible values include: 'Disabled', 'Enabled' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy - """ - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(InstanceFailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) - self.failover_policy = kwargs.get('failover_policy', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint_py3.py deleted file mode 100644 index 71c9f180cdf7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceFailoverGroupReadOnlyEndpoint(Model): - """Read-only endpoint of the failover group instance. - - :param failover_policy: Failover policy of the read-only endpoint for the - failover group. Possible values include: 'Disabled', 'Enabled' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy - """ - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - } - - def __init__(self, *, failover_policy=None, **kwargs) -> None: - super(InstanceFailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) - self.failover_policy = failover_policy diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint.py deleted file mode 100644 index 89a86899e503..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceFailoverGroupReadWriteEndpoint(Model): - """Read-write endpoint of the failover group instance. - - All required parameters must be populated in order to send to Azure. - - :param failover_policy: Required. Failover policy of the read-write - endpoint for the failover group. If failoverPolicy is Automatic then - failoverWithDataLossGracePeriodMinutes is required. Possible values - include: 'Manual', 'Automatic' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy - :param failover_with_data_loss_grace_period_minutes: Grace period before - failover with data loss is attempted for the read-write endpoint. If - failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is - required. - :type failover_with_data_loss_grace_period_minutes: int - """ - - _validation = { - 'failover_policy': {'required': True}, - } - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(InstanceFailoverGroupReadWriteEndpoint, self).__init__(**kwargs) - self.failover_policy = kwargs.get('failover_policy', None) - self.failover_with_data_loss_grace_period_minutes = kwargs.get('failover_with_data_loss_grace_period_minutes', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint_py3.py deleted file mode 100644 index 7fdc047ba37c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceFailoverGroupReadWriteEndpoint(Model): - """Read-write endpoint of the failover group instance. - - All required parameters must be populated in order to send to Azure. - - :param failover_policy: Required. Failover policy of the read-write - endpoint for the failover group. If failoverPolicy is Automatic then - failoverWithDataLossGracePeriodMinutes is required. Possible values - include: 'Manual', 'Automatic' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy - :param failover_with_data_loss_grace_period_minutes: Grace period before - failover with data loss is attempted for the read-write endpoint. If - failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is - required. - :type failover_with_data_loss_grace_period_minutes: int - """ - - _validation = { - 'failover_policy': {'required': True}, - } - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, - } - - def __init__(self, *, failover_policy, failover_with_data_loss_grace_period_minutes: int=None, **kwargs) -> None: - super(InstanceFailoverGroupReadWriteEndpoint, self).__init__(**kwargs) - self.failover_policy = failover_policy - self.failover_with_data_loss_grace_period_minutes = failover_with_data_loss_grace_period_minutes diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job.py deleted file mode 100644 index 6b2c60fd1d4b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class Job(ProxyResource): - """A job. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param description: User-defined description of the job. Default value: "" - . - :type description: str - :ivar version: The job version number. - :vartype version: int - :param schedule: Schedule properties of the job. - :type schedule: ~azure.mgmt.sql.models.JobSchedule - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'version': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'int'}, - 'schedule': {'key': 'properties.schedule', 'type': 'JobSchedule'}, - } - - def __init__(self, **kwargs): - super(Job, self).__init__(**kwargs) - self.description = kwargs.get('description', "") - self.version = None - self.schedule = kwargs.get('schedule', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent.py deleted file mode 100644 index 48d42c28260c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class JobAgent(TrackedResource): - """An Azure SQL job agent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :param database_id: Required. Resource ID of the database to store job - metadata in. - :type database_id: str - :ivar state: The state of the job agent. Possible values include: - 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' - :vartype state: str or ~azure.mgmt.sql.models.JobAgentState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'database_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobAgent, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.database_id = kwargs.get('database_id', None) - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_paged.py deleted file mode 100644 index 25dd750b9d1f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobAgentPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobAgent ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobAgent]'} - } - - def __init__(self, *args, **kwargs): - - super(JobAgentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_py3.py deleted file mode 100644 index 936d87932ebc..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class JobAgent(TrackedResource): - """An Azure SQL job agent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :param database_id: Required. Resource ID of the database to store job - metadata in. - :type database_id: str - :ivar state: The state of the job agent. Possible values include: - 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' - :vartype state: str or ~azure.mgmt.sql.models.JobAgentState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'database_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, *, location: str, database_id: str, tags=None, sku=None, **kwargs) -> None: - super(JobAgent, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.database_id = database_id - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update.py deleted file mode 100644 index af781de91cbf..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobAgentUpdate(Model): - """An update to an Azure SQL job agent. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(JobAgentUpdate, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update_py3.py deleted file mode 100644 index ab5e71f7b1d1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobAgentUpdate(Model): - """An update to an Azure SQL job agent. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(JobAgentUpdate, self).__init__(**kwargs) - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential.py deleted file mode 100644 index 807d34975114..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class JobCredential(ProxyResource): - """A stored credential that can be used by a job to connect to target - databases. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param username: Required. The credential user name. - :type username: str - :param password: Required. The credential password. - :type password: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'username': {'required': True}, - 'password': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'username': {'key': 'properties.username', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobCredential, self).__init__(**kwargs) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_paged.py deleted file mode 100644 index 550108e41c93..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobCredentialPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobCredential ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobCredential]'} - } - - def __init__(self, *args, **kwargs): - - super(JobCredentialPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_py3.py deleted file mode 100644 index 5158010b9c74..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class JobCredential(ProxyResource): - """A stored credential that can be used by a job to connect to target - databases. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param username: Required. The credential user name. - :type username: str - :param password: Required. The credential password. - :type password: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'username': {'required': True}, - 'password': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'username': {'key': 'properties.username', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - } - - def __init__(self, *, username: str, password: str, **kwargs) -> None: - super(JobCredential, self).__init__(**kwargs) - self.username = username - self.password = password diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution.py deleted file mode 100644 index 92744fb7c75b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class JobExecution(ProxyResource): - """An execution of a job. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar job_version: The job version number. - :vartype job_version: int - :ivar step_name: The job step name. - :vartype step_name: str - :ivar step_id: The job step id. - :vartype step_id: int - :ivar job_execution_id: The unique identifier of the job execution. - :vartype job_execution_id: str - :ivar lifecycle: The detailed state of the job execution. Possible values - include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', - 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', - 'TimedOut', 'Canceled', 'Skipped' - :vartype lifecycle: str or ~azure.mgmt.sql.models.JobExecutionLifecycle - :ivar provisioning_state: The ARM provisioning state of the job execution. - Possible values include: 'Created', 'InProgress', 'Succeeded', 'Failed', - 'Canceled' - :vartype provisioning_state: str or - ~azure.mgmt.sql.models.ProvisioningState - :ivar create_time: The time that the job execution was created. - :vartype create_time: datetime - :ivar start_time: The time that the job execution started. - :vartype start_time: datetime - :ivar end_time: The time that the job execution completed. - :vartype end_time: datetime - :param current_attempts: Number of times the job execution has been - attempted. - :type current_attempts: int - :ivar current_attempt_start_time: Start time of the current attempt. - :vartype current_attempt_start_time: datetime - :ivar last_message: The last status or error message. - :vartype last_message: str - :ivar target: The target that this execution is executed on. - :vartype target: ~azure.mgmt.sql.models.JobExecutionTarget - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'job_version': {'readonly': True}, - 'step_name': {'readonly': True}, - 'step_id': {'readonly': True}, - 'job_execution_id': {'readonly': True}, - 'lifecycle': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'create_time': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'current_attempt_start_time': {'readonly': True}, - 'last_message': {'readonly': True}, - 'target': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'job_version': {'key': 'properties.jobVersion', 'type': 'int'}, - 'step_name': {'key': 'properties.stepName', 'type': 'str'}, - 'step_id': {'key': 'properties.stepId', 'type': 'int'}, - 'job_execution_id': {'key': 'properties.jobExecutionId', 'type': 'str'}, - 'lifecycle': {'key': 'properties.lifecycle', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'current_attempts': {'key': 'properties.currentAttempts', 'type': 'int'}, - 'current_attempt_start_time': {'key': 'properties.currentAttemptStartTime', 'type': 'iso-8601'}, - 'last_message': {'key': 'properties.lastMessage', 'type': 'str'}, - 'target': {'key': 'properties.target', 'type': 'JobExecutionTarget'}, - } - - def __init__(self, **kwargs): - super(JobExecution, self).__init__(**kwargs) - self.job_version = None - self.step_name = None - self.step_id = None - self.job_execution_id = None - self.lifecycle = None - self.provisioning_state = None - self.create_time = None - self.start_time = None - self.end_time = None - self.current_attempts = kwargs.get('current_attempts', None) - self.current_attempt_start_time = None - self.last_message = None - self.target = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_paged.py deleted file mode 100644 index bfcdb03ea9aa..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobExecutionPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobExecution ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobExecution]'} - } - - def __init__(self, *args, **kwargs): - - super(JobExecutionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_py3.py deleted file mode 100644 index b7fdaba7c147..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_py3.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class JobExecution(ProxyResource): - """An execution of a job. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar job_version: The job version number. - :vartype job_version: int - :ivar step_name: The job step name. - :vartype step_name: str - :ivar step_id: The job step id. - :vartype step_id: int - :ivar job_execution_id: The unique identifier of the job execution. - :vartype job_execution_id: str - :ivar lifecycle: The detailed state of the job execution. Possible values - include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', - 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', - 'TimedOut', 'Canceled', 'Skipped' - :vartype lifecycle: str or ~azure.mgmt.sql.models.JobExecutionLifecycle - :ivar provisioning_state: The ARM provisioning state of the job execution. - Possible values include: 'Created', 'InProgress', 'Succeeded', 'Failed', - 'Canceled' - :vartype provisioning_state: str or - ~azure.mgmt.sql.models.ProvisioningState - :ivar create_time: The time that the job execution was created. - :vartype create_time: datetime - :ivar start_time: The time that the job execution started. - :vartype start_time: datetime - :ivar end_time: The time that the job execution completed. - :vartype end_time: datetime - :param current_attempts: Number of times the job execution has been - attempted. - :type current_attempts: int - :ivar current_attempt_start_time: Start time of the current attempt. - :vartype current_attempt_start_time: datetime - :ivar last_message: The last status or error message. - :vartype last_message: str - :ivar target: The target that this execution is executed on. - :vartype target: ~azure.mgmt.sql.models.JobExecutionTarget - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'job_version': {'readonly': True}, - 'step_name': {'readonly': True}, - 'step_id': {'readonly': True}, - 'job_execution_id': {'readonly': True}, - 'lifecycle': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'create_time': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'current_attempt_start_time': {'readonly': True}, - 'last_message': {'readonly': True}, - 'target': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'job_version': {'key': 'properties.jobVersion', 'type': 'int'}, - 'step_name': {'key': 'properties.stepName', 'type': 'str'}, - 'step_id': {'key': 'properties.stepId', 'type': 'int'}, - 'job_execution_id': {'key': 'properties.jobExecutionId', 'type': 'str'}, - 'lifecycle': {'key': 'properties.lifecycle', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'current_attempts': {'key': 'properties.currentAttempts', 'type': 'int'}, - 'current_attempt_start_time': {'key': 'properties.currentAttemptStartTime', 'type': 'iso-8601'}, - 'last_message': {'key': 'properties.lastMessage', 'type': 'str'}, - 'target': {'key': 'properties.target', 'type': 'JobExecutionTarget'}, - } - - def __init__(self, *, current_attempts: int=None, **kwargs) -> None: - super(JobExecution, self).__init__(**kwargs) - self.job_version = None - self.step_name = None - self.step_id = None - self.job_execution_id = None - self.lifecycle = None - self.provisioning_state = None - self.create_time = None - self.start_time = None - self.end_time = None - self.current_attempts = current_attempts - self.current_attempt_start_time = None - self.last_message = None - self.target = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target.py deleted file mode 100644 index 50557aaf96d0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobExecutionTarget(Model): - """The target that a job execution is executed on. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The type of the target. Possible values include: - 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' - :vartype type: str or ~azure.mgmt.sql.models.JobTargetType - :ivar server_name: The server name. - :vartype server_name: str - :ivar database_name: The database name. - :vartype database_name: str - """ - - _validation = { - 'type': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobExecutionTarget, self).__init__(**kwargs) - self.type = None - self.server_name = None - self.database_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target_py3.py deleted file mode 100644 index 551716c3cd31..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobExecutionTarget(Model): - """The target that a job execution is executed on. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The type of the target. Possible values include: - 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' - :vartype type: str or ~azure.mgmt.sql.models.JobTargetType - :ivar server_name: The server name. - :vartype server_name: str - :ivar database_name: The database name. - :vartype database_name: str - """ - - _validation = { - 'type': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(JobExecutionTarget, self).__init__(**kwargs) - self.type = None - self.server_name = None - self.database_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_paged.py deleted file mode 100644 index 3b85770570f2..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobPaged(Paged): - """ - A paging container for iterating over a list of :class:`Job ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Job]'} - } - - def __init__(self, *args, **kwargs): - - super(JobPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_py3.py deleted file mode 100644 index 5bfb9b53f03f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class Job(ProxyResource): - """A job. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param description: User-defined description of the job. Default value: "" - . - :type description: str - :ivar version: The job version number. - :vartype version: int - :param schedule: Schedule properties of the job. - :type schedule: ~azure.mgmt.sql.models.JobSchedule - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'version': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'int'}, - 'schedule': {'key': 'properties.schedule', 'type': 'JobSchedule'}, - } - - def __init__(self, *, description: str="", schedule=None, **kwargs) -> None: - super(Job, self).__init__(**kwargs) - self.description = description - self.version = None - self.schedule = schedule diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule.py deleted file mode 100644 index 354e32c4f5b0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobSchedule(Model): - """Scheduling properties of a job. - - :param start_time: Schedule start time. Default value: - "0001-01-01T00:00:00Z" . - :type start_time: datetime - :param end_time: Schedule end time. Default value: "9999-12-31T11:59:59Z" - . - :type end_time: datetime - :param type: Schedule interval type. Possible values include: 'Once', - 'Recurring'. Default value: "Once" . - :type type: str or ~azure.mgmt.sql.models.JobScheduleType - :param enabled: Whether or not the schedule is enabled. - :type enabled: bool - :param interval: Value of the schedule's recurring interval, if the - schedule type is recurring. ISO8601 duration format. - :type interval: str - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'JobScheduleType'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'interval': {'key': 'interval', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobSchedule, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', "0001-01-01T00:00:00Z") - self.end_time = kwargs.get('end_time', "9999-12-31T11:59:59Z") - self.type = kwargs.get('type', "Once") - self.enabled = kwargs.get('enabled', None) - self.interval = kwargs.get('interval', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule_py3.py deleted file mode 100644 index 4b4a6a8f8971..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobSchedule(Model): - """Scheduling properties of a job. - - :param start_time: Schedule start time. Default value: - "0001-01-01T00:00:00Z" . - :type start_time: datetime - :param end_time: Schedule end time. Default value: "9999-12-31T11:59:59Z" - . - :type end_time: datetime - :param type: Schedule interval type. Possible values include: 'Once', - 'Recurring'. Default value: "Once" . - :type type: str or ~azure.mgmt.sql.models.JobScheduleType - :param enabled: Whether or not the schedule is enabled. - :type enabled: bool - :param interval: Value of the schedule's recurring interval, if the - schedule type is recurring. ISO8601 duration format. - :type interval: str - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'JobScheduleType'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'interval': {'key': 'interval', 'type': 'str'}, - } - - def __init__(self, *, start_time="0001-01-01T00:00:00Z", end_time="9999-12-31T11:59:59Z", type="Once", enabled: bool=None, interval: str=None, **kwargs) -> None: - super(JobSchedule, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time - self.type = type - self.enabled = enabled - self.interval = interval diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step.py deleted file mode 100644 index f032375dec32..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class JobStep(ProxyResource): - """A job step. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param step_id: The job step's index within the job. If not specified when - creating the job step, it will be created as the last step. If not - specified when updating the job step, the step id is not modified. - :type step_id: int - :param target_group: Required. The resource ID of the target group that - the job step will be executed on. - :type target_group: str - :param credential: Required. The resource ID of the job credential that - will be used to connect to the targets. - :type credential: str - :param action: Required. The action payload of the job step. - :type action: ~azure.mgmt.sql.models.JobStepAction - :param output: Output destination properties of the job step. - :type output: ~azure.mgmt.sql.models.JobStepOutput - :param execution_options: Execution options for the job step. - :type execution_options: ~azure.mgmt.sql.models.JobStepExecutionOptions - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'target_group': {'required': True}, - 'credential': {'required': True}, - 'action': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'step_id': {'key': 'properties.stepId', 'type': 'int'}, - 'target_group': {'key': 'properties.targetGroup', 'type': 'str'}, - 'credential': {'key': 'properties.credential', 'type': 'str'}, - 'action': {'key': 'properties.action', 'type': 'JobStepAction'}, - 'output': {'key': 'properties.output', 'type': 'JobStepOutput'}, - 'execution_options': {'key': 'properties.executionOptions', 'type': 'JobStepExecutionOptions'}, - } - - def __init__(self, **kwargs): - super(JobStep, self).__init__(**kwargs) - self.step_id = kwargs.get('step_id', None) - self.target_group = kwargs.get('target_group', None) - self.credential = kwargs.get('credential', None) - self.action = kwargs.get('action', None) - self.output = kwargs.get('output', None) - self.execution_options = kwargs.get('execution_options', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action.py deleted file mode 100644 index 68e55b1fa38f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepAction(Model): - """The action to be executed by a job step. - - All required parameters must be populated in order to send to Azure. - - :param type: Type of action being executed by the job step. Possible - values include: 'TSql'. Default value: "TSql" . - :type type: str or ~azure.mgmt.sql.models.JobStepActionType - :param source: The source of the action to execute. Possible values - include: 'Inline'. Default value: "Inline" . - :type source: str or ~azure.mgmt.sql.models.JobStepActionSource - :param value: Required. The action value, for example the text of the - T-SQL script to execute. - :type value: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobStepAction, self).__init__(**kwargs) - self.type = kwargs.get('type', "TSql") - self.source = kwargs.get('source', "Inline") - self.value = kwargs.get('value', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action_py3.py deleted file mode 100644 index 4d8848c8eaef..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepAction(Model): - """The action to be executed by a job step. - - All required parameters must be populated in order to send to Azure. - - :param type: Type of action being executed by the job step. Possible - values include: 'TSql'. Default value: "TSql" . - :type type: str or ~azure.mgmt.sql.models.JobStepActionType - :param source: The source of the action to execute. Possible values - include: 'Inline'. Default value: "Inline" . - :type source: str or ~azure.mgmt.sql.models.JobStepActionSource - :param value: Required. The action value, for example the text of the - T-SQL script to execute. - :type value: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, value: str, type="TSql", source="Inline", **kwargs) -> None: - super(JobStepAction, self).__init__(**kwargs) - self.type = type - self.source = source - self.value = value diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options.py deleted file mode 100644 index 6a49f1d10f25..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepExecutionOptions(Model): - """The execution options of a job step. - - :param timeout_seconds: Execution timeout for the job step. Default value: - 43200 . - :type timeout_seconds: int - :param retry_attempts: Maximum number of times the job step will be - reattempted if the first attempt fails. Default value: 10 . - :type retry_attempts: int - :param initial_retry_interval_seconds: Initial delay between retries for - job step execution. Default value: 1 . - :type initial_retry_interval_seconds: int - :param maximum_retry_interval_seconds: The maximum amount of time to wait - between retries for job step execution. Default value: 120 . - :type maximum_retry_interval_seconds: int - :param retry_interval_backoff_multiplier: The backoff multiplier for the - time between retries. Default value: 2 . - :type retry_interval_backoff_multiplier: float - """ - - _attribute_map = { - 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, - 'retry_attempts': {'key': 'retryAttempts', 'type': 'int'}, - 'initial_retry_interval_seconds': {'key': 'initialRetryIntervalSeconds', 'type': 'int'}, - 'maximum_retry_interval_seconds': {'key': 'maximumRetryIntervalSeconds', 'type': 'int'}, - 'retry_interval_backoff_multiplier': {'key': 'retryIntervalBackoffMultiplier', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(JobStepExecutionOptions, self).__init__(**kwargs) - self.timeout_seconds = kwargs.get('timeout_seconds', 43200) - self.retry_attempts = kwargs.get('retry_attempts', 10) - self.initial_retry_interval_seconds = kwargs.get('initial_retry_interval_seconds', 1) - self.maximum_retry_interval_seconds = kwargs.get('maximum_retry_interval_seconds', 120) - self.retry_interval_backoff_multiplier = kwargs.get('retry_interval_backoff_multiplier', 2) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options_py3.py deleted file mode 100644 index 712f0e947436..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepExecutionOptions(Model): - """The execution options of a job step. - - :param timeout_seconds: Execution timeout for the job step. Default value: - 43200 . - :type timeout_seconds: int - :param retry_attempts: Maximum number of times the job step will be - reattempted if the first attempt fails. Default value: 10 . - :type retry_attempts: int - :param initial_retry_interval_seconds: Initial delay between retries for - job step execution. Default value: 1 . - :type initial_retry_interval_seconds: int - :param maximum_retry_interval_seconds: The maximum amount of time to wait - between retries for job step execution. Default value: 120 . - :type maximum_retry_interval_seconds: int - :param retry_interval_backoff_multiplier: The backoff multiplier for the - time between retries. Default value: 2 . - :type retry_interval_backoff_multiplier: float - """ - - _attribute_map = { - 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, - 'retry_attempts': {'key': 'retryAttempts', 'type': 'int'}, - 'initial_retry_interval_seconds': {'key': 'initialRetryIntervalSeconds', 'type': 'int'}, - 'maximum_retry_interval_seconds': {'key': 'maximumRetryIntervalSeconds', 'type': 'int'}, - 'retry_interval_backoff_multiplier': {'key': 'retryIntervalBackoffMultiplier', 'type': 'float'}, - } - - def __init__(self, *, timeout_seconds: int=43200, retry_attempts: int=10, initial_retry_interval_seconds: int=1, maximum_retry_interval_seconds: int=120, retry_interval_backoff_multiplier: float=2, **kwargs) -> None: - super(JobStepExecutionOptions, self).__init__(**kwargs) - self.timeout_seconds = timeout_seconds - self.retry_attempts = retry_attempts - self.initial_retry_interval_seconds = initial_retry_interval_seconds - self.maximum_retry_interval_seconds = maximum_retry_interval_seconds - self.retry_interval_backoff_multiplier = retry_interval_backoff_multiplier diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output.py deleted file mode 100644 index 8a015a7505bd..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepOutput(Model): - """The output configuration of a job step. - - All required parameters must be populated in order to send to Azure. - - :param type: The output destination type. Possible values include: - 'SqlDatabase'. Default value: "SqlDatabase" . - :type type: str or ~azure.mgmt.sql.models.JobStepOutputType - :param subscription_id: The output destination subscription id. - :type subscription_id: str - :param resource_group_name: The output destination resource group. - :type resource_group_name: str - :param server_name: Required. The output destination server name. - :type server_name: str - :param database_name: Required. The output destination database. - :type database_name: str - :param schema_name: The output destination schema. Default value: "dbo" . - :type schema_name: str - :param table_name: Required. The output destination table. - :type table_name: str - :param credential: Required. The resource ID of the credential to use to - connect to the output destination. - :type credential: str - """ - - _validation = { - 'server_name': {'required': True}, - 'database_name': {'required': True}, - 'table_name': {'required': True}, - 'credential': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'schema_name': {'key': 'schemaName', 'type': 'str'}, - 'table_name': {'key': 'tableName', 'type': 'str'}, - 'credential': {'key': 'credential', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobStepOutput, self).__init__(**kwargs) - self.type = kwargs.get('type', "SqlDatabase") - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group_name = kwargs.get('resource_group_name', None) - self.server_name = kwargs.get('server_name', None) - self.database_name = kwargs.get('database_name', None) - self.schema_name = kwargs.get('schema_name', "dbo") - self.table_name = kwargs.get('table_name', None) - self.credential = kwargs.get('credential', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output_py3.py deleted file mode 100644 index d10ecbbd6f8c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepOutput(Model): - """The output configuration of a job step. - - All required parameters must be populated in order to send to Azure. - - :param type: The output destination type. Possible values include: - 'SqlDatabase'. Default value: "SqlDatabase" . - :type type: str or ~azure.mgmt.sql.models.JobStepOutputType - :param subscription_id: The output destination subscription id. - :type subscription_id: str - :param resource_group_name: The output destination resource group. - :type resource_group_name: str - :param server_name: Required. The output destination server name. - :type server_name: str - :param database_name: Required. The output destination database. - :type database_name: str - :param schema_name: The output destination schema. Default value: "dbo" . - :type schema_name: str - :param table_name: Required. The output destination table. - :type table_name: str - :param credential: Required. The resource ID of the credential to use to - connect to the output destination. - :type credential: str - """ - - _validation = { - 'server_name': {'required': True}, - 'database_name': {'required': True}, - 'table_name': {'required': True}, - 'credential': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'schema_name': {'key': 'schemaName', 'type': 'str'}, - 'table_name': {'key': 'tableName', 'type': 'str'}, - 'credential': {'key': 'credential', 'type': 'str'}, - } - - def __init__(self, *, server_name: str, database_name: str, table_name: str, credential: str, type="SqlDatabase", subscription_id: str=None, resource_group_name: str=None, schema_name: str="dbo", **kwargs) -> None: - super(JobStepOutput, self).__init__(**kwargs) - self.type = type - self.subscription_id = subscription_id - self.resource_group_name = resource_group_name - self.server_name = server_name - self.database_name = database_name - self.schema_name = schema_name - self.table_name = table_name - self.credential = credential diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_paged.py deleted file mode 100644 index 1bda4f5adf6e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobStepPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobStep ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobStep]'} - } - - def __init__(self, *args, **kwargs): - - super(JobStepPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_py3.py deleted file mode 100644 index bd267f9fd9a6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_py3.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class JobStep(ProxyResource): - """A job step. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param step_id: The job step's index within the job. If not specified when - creating the job step, it will be created as the last step. If not - specified when updating the job step, the step id is not modified. - :type step_id: int - :param target_group: Required. The resource ID of the target group that - the job step will be executed on. - :type target_group: str - :param credential: Required. The resource ID of the job credential that - will be used to connect to the targets. - :type credential: str - :param action: Required. The action payload of the job step. - :type action: ~azure.mgmt.sql.models.JobStepAction - :param output: Output destination properties of the job step. - :type output: ~azure.mgmt.sql.models.JobStepOutput - :param execution_options: Execution options for the job step. - :type execution_options: ~azure.mgmt.sql.models.JobStepExecutionOptions - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'target_group': {'required': True}, - 'credential': {'required': True}, - 'action': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'step_id': {'key': 'properties.stepId', 'type': 'int'}, - 'target_group': {'key': 'properties.targetGroup', 'type': 'str'}, - 'credential': {'key': 'properties.credential', 'type': 'str'}, - 'action': {'key': 'properties.action', 'type': 'JobStepAction'}, - 'output': {'key': 'properties.output', 'type': 'JobStepOutput'}, - 'execution_options': {'key': 'properties.executionOptions', 'type': 'JobStepExecutionOptions'}, - } - - def __init__(self, *, target_group: str, credential: str, action, step_id: int=None, output=None, execution_options=None, **kwargs) -> None: - super(JobStep, self).__init__(**kwargs) - self.step_id = step_id - self.target_group = target_group - self.credential = credential - self.action = action - self.output = output - self.execution_options = execution_options diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target.py deleted file mode 100644 index a608d87c1af1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobTarget(Model): - """A job target, for example a specific database or a container of databases - that is evaluated during job execution. - - All required parameters must be populated in order to send to Azure. - - :param membership_type: Whether the target is included or excluded from - the group. Possible values include: 'Include', 'Exclude'. Default value: - "Include" . - :type membership_type: str or - ~azure.mgmt.sql.models.JobTargetGroupMembershipType - :param type: Required. The target type. Possible values include: - 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' - :type type: str or ~azure.mgmt.sql.models.JobTargetType - :param server_name: The target server name. - :type server_name: str - :param database_name: The target database name. - :type database_name: str - :param elastic_pool_name: The target elastic pool name. - :type elastic_pool_name: str - :param shard_map_name: The target shard map. - :type shard_map_name: str - :param refresh_credential: The resource ID of the credential that is used - during job execution to connect to the target and determine the list of - databases inside the target. - :type refresh_credential: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'membership_type': {'key': 'membershipType', 'type': 'JobTargetGroupMembershipType'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'elastic_pool_name': {'key': 'elasticPoolName', 'type': 'str'}, - 'shard_map_name': {'key': 'shardMapName', 'type': 'str'}, - 'refresh_credential': {'key': 'refreshCredential', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobTarget, self).__init__(**kwargs) - self.membership_type = kwargs.get('membership_type', "Include") - self.type = kwargs.get('type', None) - self.server_name = kwargs.get('server_name', None) - self.database_name = kwargs.get('database_name', None) - self.elastic_pool_name = kwargs.get('elastic_pool_name', None) - self.shard_map_name = kwargs.get('shard_map_name', None) - self.refresh_credential = kwargs.get('refresh_credential', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group.py deleted file mode 100644 index 38148fb244c4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class JobTargetGroup(ProxyResource): - """A group of job targets. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param members: Required. Members of the target group. - :type members: list[~azure.mgmt.sql.models.JobTarget] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'members': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'members': {'key': 'properties.members', 'type': '[JobTarget]'}, - } - - def __init__(self, **kwargs): - super(JobTargetGroup, self).__init__(**kwargs) - self.members = kwargs.get('members', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_paged.py deleted file mode 100644 index cd466e5afa84..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobTargetGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobTargetGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobTargetGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(JobTargetGroupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_py3.py deleted file mode 100644 index a9582212ff82..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class JobTargetGroup(ProxyResource): - """A group of job targets. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param members: Required. Members of the target group. - :type members: list[~azure.mgmt.sql.models.JobTarget] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'members': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'members': {'key': 'properties.members', 'type': '[JobTarget]'}, - } - - def __init__(self, *, members, **kwargs) -> None: - super(JobTargetGroup, self).__init__(**kwargs) - self.members = members diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_py3.py deleted file mode 100644 index 281eb7598f18..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobTarget(Model): - """A job target, for example a specific database or a container of databases - that is evaluated during job execution. - - All required parameters must be populated in order to send to Azure. - - :param membership_type: Whether the target is included or excluded from - the group. Possible values include: 'Include', 'Exclude'. Default value: - "Include" . - :type membership_type: str or - ~azure.mgmt.sql.models.JobTargetGroupMembershipType - :param type: Required. The target type. Possible values include: - 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' - :type type: str or ~azure.mgmt.sql.models.JobTargetType - :param server_name: The target server name. - :type server_name: str - :param database_name: The target database name. - :type database_name: str - :param elastic_pool_name: The target elastic pool name. - :type elastic_pool_name: str - :param shard_map_name: The target shard map. - :type shard_map_name: str - :param refresh_credential: The resource ID of the credential that is used - during job execution to connect to the target and determine the list of - databases inside the target. - :type refresh_credential: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'membership_type': {'key': 'membershipType', 'type': 'JobTargetGroupMembershipType'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'elastic_pool_name': {'key': 'elasticPoolName', 'type': 'str'}, - 'shard_map_name': {'key': 'shardMapName', 'type': 'str'}, - 'refresh_credential': {'key': 'refreshCredential', 'type': 'str'}, - } - - def __init__(self, *, type, membership_type="Include", server_name: str=None, database_name: str=None, elastic_pool_name: str=None, shard_map_name: str=None, refresh_credential: str=None, **kwargs) -> None: - super(JobTarget, self).__init__(**kwargs) - self.membership_type = membership_type - self.type = type - self.server_name = server_name - self.database_name = database_name - self.elastic_pool_name = elastic_pool_name - self.shard_map_name = shard_map_name - self.refresh_credential = refresh_credential diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version.py deleted file mode 100644 index 3c480e739607..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class JobVersion(ProxyResource): - """A job version. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobVersion, self).__init__(**kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_paged.py deleted file mode 100644 index 162e4d8cfb5e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobVersionPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobVersion ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobVersion]'} - } - - def __init__(self, *args, **kwargs): - - super(JobVersionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_py3.py deleted file mode 100644 index 16a8798c5949..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class JobVersion(ProxyResource): - """A job version. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(JobVersion, self).__init__(**kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability.py deleted file mode 100644 index f40ad624e1c5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LicenseTypeCapability(Model): - """The license type capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: License type identifier. - :vartype name: str - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LicenseTypeCapability, self).__init__(**kwargs) - self.name = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability_py3.py deleted file mode 100644 index ecfa1918210a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LicenseTypeCapability(Model): - """The license type capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: License type identifier. - :vartype name: str - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(LicenseTypeCapability, self).__init__(**kwargs) - self.name = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities.py deleted file mode 100644 index b7e7f0980834..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LocationCapabilities(Model): - """The location capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The location name. - :vartype name: str - :ivar supported_server_versions: The list of supported server versions. - :vartype supported_server_versions: - list[~azure.mgmt.sql.models.ServerVersionCapability] - :ivar supported_managed_instance_versions: The list of supported managed - instance versions. - :vartype supported_managed_instance_versions: - list[~azure.mgmt.sql.models.ManagedInstanceVersionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_server_versions': {'readonly': True}, - 'supported_managed_instance_versions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_server_versions': {'key': 'supportedServerVersions', 'type': '[ServerVersionCapability]'}, - 'supported_managed_instance_versions': {'key': 'supportedManagedInstanceVersions', 'type': '[ManagedInstanceVersionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LocationCapabilities, self).__init__(**kwargs) - self.name = None - self.supported_server_versions = None - self.supported_managed_instance_versions = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities_py3.py deleted file mode 100644 index 69b257f605a9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LocationCapabilities(Model): - """The location capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The location name. - :vartype name: str - :ivar supported_server_versions: The list of supported server versions. - :vartype supported_server_versions: - list[~azure.mgmt.sql.models.ServerVersionCapability] - :ivar supported_managed_instance_versions: The list of supported managed - instance versions. - :vartype supported_managed_instance_versions: - list[~azure.mgmt.sql.models.ManagedInstanceVersionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_server_versions': {'readonly': True}, - 'supported_managed_instance_versions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_server_versions': {'key': 'supportedServerVersions', 'type': '[ServerVersionCapability]'}, - 'supported_managed_instance_versions': {'key': 'supportedManagedInstanceVersions', 'type': '[ManagedInstanceVersionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(LocationCapabilities, self).__init__(**kwargs) - self.name = None - self.supported_server_versions = None - self.supported_managed_instance_versions = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability.py deleted file mode 100644 index ad86f97123cf..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogSizeCapability(Model): - """The log size capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The log size limit (see 'unit' for the units). - :vartype limit: int - :ivar unit: The units that the limit is expressed in. Possible values - include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes', 'Percent' - :vartype unit: str or ~azure.mgmt.sql.models.LogSizeUnit - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'int'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LogSizeCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability_py3.py deleted file mode 100644 index 787e781b3025..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogSizeCapability(Model): - """The log size capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The log size limit (see 'unit' for the units). - :vartype limit: int - :ivar unit: The units that the limit is expressed in. Possible values - include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes', 'Percent' - :vartype unit: str or ~azure.mgmt.sql.models.LogSizeUnit - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'int'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(LogSizeCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup.py deleted file mode 100644 index 288ac55f501f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class LongTermRetentionBackup(ProxyResource): - """A long term retention backup. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar server_name: The server name that the backup database belong to. - :vartype server_name: str - :ivar server_create_time: The create time of the server. - :vartype server_create_time: datetime - :ivar database_name: The name of the database the backup belong to - :vartype database_name: str - :ivar database_deletion_time: The delete time of the database - :vartype database_deletion_time: datetime - :ivar backup_time: The time the backup was taken - :vartype backup_time: datetime - :ivar backup_expiration_time: The time the long term retention backup will - expire. - :vartype backup_expiration_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'server_name': {'readonly': True}, - 'server_create_time': {'readonly': True}, - 'database_name': {'readonly': True}, - 'database_deletion_time': {'readonly': True}, - 'backup_time': {'readonly': True}, - 'backup_expiration_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'server_create_time': {'key': 'properties.serverCreateTime', 'type': 'iso-8601'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'database_deletion_time': {'key': 'properties.databaseDeletionTime', 'type': 'iso-8601'}, - 'backup_time': {'key': 'properties.backupTime', 'type': 'iso-8601'}, - 'backup_expiration_time': {'key': 'properties.backupExpirationTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(LongTermRetentionBackup, self).__init__(**kwargs) - self.server_name = None - self.server_create_time = None - self.database_name = None - self.database_deletion_time = None - self.backup_time = None - self.backup_expiration_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_paged.py deleted file mode 100644 index 15e32283bbd7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class LongTermRetentionBackupPaged(Paged): - """ - A paging container for iterating over a list of :class:`LongTermRetentionBackup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[LongTermRetentionBackup]'} - } - - def __init__(self, *args, **kwargs): - - super(LongTermRetentionBackupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_py3.py deleted file mode 100644 index eb1372180fb0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class LongTermRetentionBackup(ProxyResource): - """A long term retention backup. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar server_name: The server name that the backup database belong to. - :vartype server_name: str - :ivar server_create_time: The create time of the server. - :vartype server_create_time: datetime - :ivar database_name: The name of the database the backup belong to - :vartype database_name: str - :ivar database_deletion_time: The delete time of the database - :vartype database_deletion_time: datetime - :ivar backup_time: The time the backup was taken - :vartype backup_time: datetime - :ivar backup_expiration_time: The time the long term retention backup will - expire. - :vartype backup_expiration_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'server_name': {'readonly': True}, - 'server_create_time': {'readonly': True}, - 'database_name': {'readonly': True}, - 'database_deletion_time': {'readonly': True}, - 'backup_time': {'readonly': True}, - 'backup_expiration_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'server_create_time': {'key': 'properties.serverCreateTime', 'type': 'iso-8601'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'database_deletion_time': {'key': 'properties.databaseDeletionTime', 'type': 'iso-8601'}, - 'backup_time': {'key': 'properties.backupTime', 'type': 'iso-8601'}, - 'backup_expiration_time': {'key': 'properties.backupExpirationTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(LongTermRetentionBackup, self).__init__(**kwargs) - self.server_name = None - self.server_create_time = None - self.database_name = None - self.database_deletion_time = None - self.backup_time = None - self.backup_expiration_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy.py deleted file mode 100644 index 4cab44ce75c7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedBackupShortTermRetentionPolicy(ProxyResource): - """A short term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param retention_days: The backup retention period in days. This is how - many days Point-in-Time Restore will be supported. - :type retention_days: int - """ - - _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'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedBackupShortTermRetentionPolicy, self).__init__(**kwargs) - self.retention_days = kwargs.get('retention_days', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_paged.py deleted file mode 100644 index 17bcf3e363fc..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedBackupShortTermRetentionPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedBackupShortTermRetentionPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedBackupShortTermRetentionPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedBackupShortTermRetentionPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_py3.py deleted file mode 100644 index 46a3fafddeee..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedBackupShortTermRetentionPolicy(ProxyResource): - """A short term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param retention_days: The backup retention period in days. This is how - many days Point-in-Time Restore will be supported. - :type retention_days: int - """ - - _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'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, *, retention_days: int=None, **kwargs) -> None: - super(ManagedBackupShortTermRetentionPolicy, self).__init__(**kwargs) - self.retention_days = retention_days diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py deleted file mode 100644 index 0c5141eaaef5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class ManagedDatabase(TrackedResource): - """A managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param collation: Collation of the managed database. - :type collation: str - :ivar status: Status of the database. Possible values include: 'Online', - 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' - :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus - :ivar creation_date: Creation date of the database. - :vartype creation_date: datetime - :ivar earliest_restore_point: Earliest restore point in time for point in - time restore. - :vartype earliest_restore_point: datetime - :param restore_point_in_time: Conditional. If createMode is - PointInTimeRestore, this value is required. Specifies the point in time - (ISO8601 format) of the source database that will be restored to create - the new database. - :type restore_point_in_time: datetime - :ivar default_secondary_location: Geo paired region. - :vartype default_secondary_location: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param create_mode: Managed database create mode. PointInTimeRestore: - Create a database by restoring a point in time backup of an existing - database. SourceDatabaseName, SourceManagedInstanceName and PointInTime - must be specified. RestoreExternalBackup: Create a database by restoring - from external backup files. Collation, StorageContainerUri and - StorageContainerSasToken must be specified. Recovery: Creates a database - by restoring a geo-replicated backup. RecoverableDatabaseId must be - specified as the recoverable database resource ID to restore. Possible - values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', - 'Recovery' - :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode - :param storage_container_uri: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the uri of the - storage container where backups for this restore are stored. - :type storage_container_uri: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :param restorable_dropped_database_id: The restorable dropped database - resource id to restore when creating this database. - :type restorable_dropped_database_id: str - :param storage_container_sas_token: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the storage - container sas token. - :type storage_container_sas_token: str - :ivar failover_group_id: Instance Failover Group resource identifier that - this managed database belongs to. - :vartype failover_group_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'status': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'earliest_restore_point': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedDatabase, self).__init__(**kwargs) - self.collation = kwargs.get('collation', None) - self.status = None - self.creation_date = None - self.earliest_restore_point = None - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.default_secondary_location = None - self.catalog_collation = kwargs.get('catalog_collation', None) - self.create_mode = kwargs.get('create_mode', None) - self.storage_container_uri = kwargs.get('storage_container_uri', None) - self.source_database_id = kwargs.get('source_database_id', None) - self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) - self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None) - self.failover_group_id = None - self.recoverable_database_id = kwargs.get('recoverable_database_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_paged.py deleted file mode 100644 index e15d9d532b5a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py deleted file mode 100644 index cc5b655604ad..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class ManagedDatabase(TrackedResource): - """A managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param collation: Collation of the managed database. - :type collation: str - :ivar status: Status of the database. Possible values include: 'Online', - 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' - :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus - :ivar creation_date: Creation date of the database. - :vartype creation_date: datetime - :ivar earliest_restore_point: Earliest restore point in time for point in - time restore. - :vartype earliest_restore_point: datetime - :param restore_point_in_time: Conditional. If createMode is - PointInTimeRestore, this value is required. Specifies the point in time - (ISO8601 format) of the source database that will be restored to create - the new database. - :type restore_point_in_time: datetime - :ivar default_secondary_location: Geo paired region. - :vartype default_secondary_location: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param create_mode: Managed database create mode. PointInTimeRestore: - Create a database by restoring a point in time backup of an existing - database. SourceDatabaseName, SourceManagedInstanceName and PointInTime - must be specified. RestoreExternalBackup: Create a database by restoring - from external backup files. Collation, StorageContainerUri and - StorageContainerSasToken must be specified. Recovery: Creates a database - by restoring a geo-replicated backup. RecoverableDatabaseId must be - specified as the recoverable database resource ID to restore. Possible - values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', - 'Recovery' - :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode - :param storage_container_uri: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the uri of the - storage container where backups for this restore are stored. - :type storage_container_uri: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :param restorable_dropped_database_id: The restorable dropped database - resource id to restore when creating this database. - :type restorable_dropped_database_id: str - :param storage_container_sas_token: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the storage - container sas token. - :type storage_container_sas_token: str - :ivar failover_group_id: Instance Failover Group resource identifier that - this managed database belongs to. - :vartype failover_group_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'status': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'earliest_restore_point': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, restorable_dropped_database_id: str=None, storage_container_sas_token: str=None, recoverable_database_id: str=None, **kwargs) -> None: - super(ManagedDatabase, self).__init__(location=location, tags=tags, **kwargs) - self.collation = collation - self.status = None - self.creation_date = None - self.earliest_restore_point = None - self.restore_point_in_time = restore_point_in_time - self.default_secondary_location = None - self.catalog_collation = catalog_collation - self.create_mode = create_mode - self.storage_container_uri = storage_container_uri - self.source_database_id = source_database_id - self.restorable_dropped_database_id = restorable_dropped_database_id - self.storage_container_sas_token = storage_container_sas_token - self.failover_group_id = None - self.recoverable_database_id = recoverable_database_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy.py deleted file mode 100644 index e3117c33610e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedDatabaseSecurityAlertPolicy(ProxyResource): - """A managed database security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ManagedDatabaseSecurityAlertPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_paged.py deleted file mode 100644 index e05f23ba364c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedDatabaseSecurityAlertPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedDatabaseSecurityAlertPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedDatabaseSecurityAlertPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedDatabaseSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_py3.py deleted file mode 100644 index 365f34280641..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedDatabaseSecurityAlertPolicy(ProxyResource): - """A managed database security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: - super(ManagedDatabaseSecurityAlertPolicy, self).__init__(**kwargs) - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py deleted file mode 100644 index 5ce3a036dcb9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedDatabaseUpdate(Model): - """An managed database update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param collation: Collation of the managed database. - :type collation: str - :ivar status: Status of the database. Possible values include: 'Online', - 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' - :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus - :ivar creation_date: Creation date of the database. - :vartype creation_date: datetime - :ivar earliest_restore_point: Earliest restore point in time for point in - time restore. - :vartype earliest_restore_point: datetime - :param restore_point_in_time: Conditional. If createMode is - PointInTimeRestore, this value is required. Specifies the point in time - (ISO8601 format) of the source database that will be restored to create - the new database. - :type restore_point_in_time: datetime - :ivar default_secondary_location: Geo paired region. - :vartype default_secondary_location: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param create_mode: Managed database create mode. PointInTimeRestore: - Create a database by restoring a point in time backup of an existing - database. SourceDatabaseName, SourceManagedInstanceName and PointInTime - must be specified. RestoreExternalBackup: Create a database by restoring - from external backup files. Collation, StorageContainerUri and - StorageContainerSasToken must be specified. Recovery: Creates a database - by restoring a geo-replicated backup. RecoverableDatabaseId must be - specified as the recoverable database resource ID to restore. Possible - values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', - 'Recovery' - :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode - :param storage_container_uri: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the uri of the - storage container where backups for this restore are stored. - :type storage_container_uri: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :param restorable_dropped_database_id: The restorable dropped database - resource id to restore when creating this database. - :type restorable_dropped_database_id: str - :param storage_container_sas_token: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the storage - container sas token. - :type storage_container_sas_token: str - :ivar failover_group_id: Instance Failover Group resource identifier that - this managed database belongs to. - :vartype failover_group_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'status': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'earliest_restore_point': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - } - - _attribute_map = { - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedDatabaseUpdate, self).__init__(**kwargs) - self.collation = kwargs.get('collation', None) - self.status = None - self.creation_date = None - self.earliest_restore_point = None - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.default_secondary_location = None - self.catalog_collation = kwargs.get('catalog_collation', None) - self.create_mode = kwargs.get('create_mode', None) - self.storage_container_uri = kwargs.get('storage_container_uri', None) - self.source_database_id = kwargs.get('source_database_id', None) - self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) - self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None) - self.failover_group_id = None - self.recoverable_database_id = kwargs.get('recoverable_database_id', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py deleted file mode 100644 index 34ae1be2b3fe..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedDatabaseUpdate(Model): - """An managed database update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param collation: Collation of the managed database. - :type collation: str - :ivar status: Status of the database. Possible values include: 'Online', - 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' - :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus - :ivar creation_date: Creation date of the database. - :vartype creation_date: datetime - :ivar earliest_restore_point: Earliest restore point in time for point in - time restore. - :vartype earliest_restore_point: datetime - :param restore_point_in_time: Conditional. If createMode is - PointInTimeRestore, this value is required. Specifies the point in time - (ISO8601 format) of the source database that will be restored to create - the new database. - :type restore_point_in_time: datetime - :ivar default_secondary_location: Geo paired region. - :vartype default_secondary_location: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param create_mode: Managed database create mode. PointInTimeRestore: - Create a database by restoring a point in time backup of an existing - database. SourceDatabaseName, SourceManagedInstanceName and PointInTime - must be specified. RestoreExternalBackup: Create a database by restoring - from external backup files. Collation, StorageContainerUri and - StorageContainerSasToken must be specified. Recovery: Creates a database - by restoring a geo-replicated backup. RecoverableDatabaseId must be - specified as the recoverable database resource ID to restore. Possible - values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', - 'Recovery' - :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode - :param storage_container_uri: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the uri of the - storage container where backups for this restore are stored. - :type storage_container_uri: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :param restorable_dropped_database_id: The restorable dropped database - resource id to restore when creating this database. - :type restorable_dropped_database_id: str - :param storage_container_sas_token: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the storage - container sas token. - :type storage_container_sas_token: str - :ivar failover_group_id: Instance Failover Group resource identifier that - this managed database belongs to. - :vartype failover_group_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'status': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'earliest_restore_point': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - } - - _attribute_map = { - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, restorable_dropped_database_id: str=None, storage_container_sas_token: str=None, recoverable_database_id: str=None, tags=None, **kwargs) -> None: - super(ManagedDatabaseUpdate, self).__init__(**kwargs) - self.collation = collation - self.status = None - self.creation_date = None - self.earliest_restore_point = None - self.restore_point_in_time = restore_point_in_time - self.default_secondary_location = None - self.catalog_collation = catalog_collation - self.create_mode = create_mode - self.storage_container_uri = storage_container_uri - self.source_database_id = source_database_id - self.restorable_dropped_database_id = restorable_dropped_database_id - self.storage_container_sas_token = storage_container_sas_token - self.failover_group_id = None - self.recoverable_database_id = recoverable_database_id - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance.py deleted file mode 100644 index cf680e0ddac0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class ManagedInstance(TrackedResource): - """An Azure SQL managed instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param identity: The Azure Active Directory identity of the managed - instance. - :type identity: ~azure.mgmt.sql.models.ResourceIdentity - :param sku: Managed instance sku - :type sku: ~azure.mgmt.sql.models.Sku - :ivar fully_qualified_domain_name: The fully qualified domain name of the - managed instance. - :vartype fully_qualified_domain_name: str - :param administrator_login: Administrator username for the managed - instance. Can only be specified when the managed instance is being created - (and is required for creation). - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for managed instance creation). - :type administrator_login_password: str - :param subnet_id: Subnet resource ID for the managed instance. - :type subnet_id: str - :ivar state: The state of the managed instance. - :vartype state: str - :param license_type: The license type. Possible values are - 'LicenseIncluded' and 'BasePrice'. - :type license_type: str - :param v_cores: The number of VCores. - :type v_cores: int - :param storage_size_in_gb: The maximum storage size in GB. - :type storage_size_in_gb: int - :param collation: Collation of the managed instance. - :type collation: str - :ivar dns_zone: The Dns Zone that the managed instance is in. - :vartype dns_zone: str - :param dns_zone_partner: The resource id of another managed instance whose - DNS zone this managed instance will share after creation. - :type dns_zone_partner: str - :param public_data_endpoint_enabled: Whether or not the public data - endpoint is enabled. - :type public_data_endpoint_enabled: bool - :param proxy_override: Connection type used for connecting to the - instance. Possible values include: 'Proxy', 'Redirect', 'Default' - :type proxy_override: str or - ~azure.mgmt.sql.models.ManagedInstanceProxyOverride - :param timezone_id: Id of the timezone. Allowed values are timezones - supported by Windows. - Windows keeps details on supported timezones, including the id, in - registry under - KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time - Zones. - You can get those registry values via SQL Server by querying SELECT name - AS timezone_id FROM sys.time_zone_info. - List of Ids can also be obtained by executing - [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. - An example of valid timezone id is "Pacific Standard Time" or "W. Europe - Standard Time". - :type timezone_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'fully_qualified_domain_name': {'readonly': True}, - 'state': {'readonly': True}, - 'dns_zone': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, - 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, - 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, - 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, - 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, - 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstance, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - self.fully_qualified_domain_name = None - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.subnet_id = kwargs.get('subnet_id', None) - self.state = None - self.license_type = kwargs.get('license_type', None) - self.v_cores = kwargs.get('v_cores', None) - self.storage_size_in_gb = kwargs.get('storage_size_in_gb', None) - self.collation = kwargs.get('collation', None) - self.dns_zone = None - self.dns_zone_partner = kwargs.get('dns_zone_partner', None) - self.public_data_endpoint_enabled = kwargs.get('public_data_endpoint_enabled', None) - self.proxy_override = kwargs.get('proxy_override', None) - self.timezone_id = kwargs.get('timezone_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability.py deleted file mode 100644 index adeab90a3543..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceEditionCapability(Model): - """The managed server capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The managed server version name. - :vartype name: str - :ivar supported_families: The supported families. - :vartype supported_families: - list[~azure.mgmt.sql.models.ManagedInstanceFamilyCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_families': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_families': {'key': 'supportedFamilies', 'type': '[ManagedInstanceFamilyCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_families = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability_py3.py deleted file mode 100644 index 1627f4652fec..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceEditionCapability(Model): - """The managed server capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The managed server version name. - :vartype name: str - :ivar supported_families: The supported families. - :vartype supported_families: - list[~azure.mgmt.sql.models.ManagedInstanceFamilyCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_families': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_families': {'key': 'supportedFamilies', 'type': '[ManagedInstanceFamilyCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ManagedInstanceEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_families = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector.py deleted file mode 100644 index 87ffcbf35af7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedInstanceEncryptionProtector(ProxyResource): - """The managed instance encryption protector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :vartype kind: str - :param server_key_name: The name of the managed instance key. - :type server_key_name: str - :param server_key_type: Required. The encryption protector type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :ivar uri: The URI of the server key. - :vartype uri: str - :ivar thumbprint: Thumbprint of the server key. - :vartype thumbprint: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True}, - 'uri': {'readonly': True}, - 'thumbprint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceEncryptionProtector, self).__init__(**kwargs) - self.kind = None - self.server_key_name = kwargs.get('server_key_name', None) - self.server_key_type = kwargs.get('server_key_type', None) - self.uri = None - self.thumbprint = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_paged.py deleted file mode 100644 index 39ba69c33e17..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedInstanceEncryptionProtectorPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedInstanceEncryptionProtector ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedInstanceEncryptionProtector]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedInstanceEncryptionProtectorPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_py3.py deleted file mode 100644 index 4d45efcf8c5d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedInstanceEncryptionProtector(ProxyResource): - """The managed instance encryption protector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :vartype kind: str - :param server_key_name: The name of the managed instance key. - :type server_key_name: str - :param server_key_type: Required. The encryption protector type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :ivar uri: The URI of the server key. - :vartype uri: str - :ivar thumbprint: Thumbprint of the server key. - :vartype thumbprint: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True}, - 'uri': {'readonly': True}, - 'thumbprint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, *, server_key_type, server_key_name: str=None, **kwargs) -> None: - super(ManagedInstanceEncryptionProtector, self).__init__(**kwargs) - self.kind = None - self.server_key_name = server_key_name - self.server_key_type = server_key_type - self.uri = None - self.thumbprint = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability.py deleted file mode 100644 index df08ea8764c9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceFamilyCapability(Model): - """The managed server family capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Family name. - :vartype name: str - :ivar sku: SKU name. - :vartype sku: str - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar supported_vcores_values: List of supported virtual cores values. - :vartype supported_vcores_values: - list[~azure.mgmt.sql.models.ManagedInstanceVcoresCapability] - :ivar included_max_size: Included size. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar supported_storage_sizes: Storage size ranges. - :vartype supported_storage_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'supported_vcores_values': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'supported_storage_sizes': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'supported_vcores_values': {'key': 'supportedVcoresValues', 'type': '[ManagedInstanceVcoresCapability]'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'supported_storage_sizes': {'key': 'supportedStorageSizes', 'type': '[MaxSizeRangeCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceFamilyCapability, self).__init__(**kwargs) - self.name = None - self.sku = None - self.supported_license_types = None - self.supported_vcores_values = None - self.included_max_size = None - self.supported_storage_sizes = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability_py3.py deleted file mode 100644 index 5ea36be729d5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceFamilyCapability(Model): - """The managed server family capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Family name. - :vartype name: str - :ivar sku: SKU name. - :vartype sku: str - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar supported_vcores_values: List of supported virtual cores values. - :vartype supported_vcores_values: - list[~azure.mgmt.sql.models.ManagedInstanceVcoresCapability] - :ivar included_max_size: Included size. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar supported_storage_sizes: Storage size ranges. - :vartype supported_storage_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'supported_vcores_values': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'supported_storage_sizes': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'supported_vcores_values': {'key': 'supportedVcoresValues', 'type': '[ManagedInstanceVcoresCapability]'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'supported_storage_sizes': {'key': 'supportedStorageSizes', 'type': '[MaxSizeRangeCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ManagedInstanceFamilyCapability, self).__init__(**kwargs) - self.name = None - self.sku = None - self.supported_license_types = None - self.supported_vcores_values = None - self.included_max_size = None - self.supported_storage_sizes = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key.py deleted file mode 100644 index 5a7ee9724f96..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedInstanceKey(ProxyResource): - """A managed instance key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :vartype kind: str - :param server_key_type: Required. The key type like 'ServiceManaged', - 'AzureKeyVault'. Possible values include: 'ServiceManaged', - 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :param uri: The URI of the key. If the ServerKeyType is AzureKeyVault, - then the URI is required. - :type uri: str - :ivar thumbprint: Thumbprint of the key. - :vartype thumbprint: str - :ivar creation_date: The key creation date. - :vartype creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True}, - 'thumbprint': {'readonly': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceKey, self).__init__(**kwargs) - self.kind = None - self.server_key_type = kwargs.get('server_key_type', None) - self.uri = kwargs.get('uri', None) - self.thumbprint = None - self.creation_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_paged.py deleted file mode 100644 index 8c730f73a383..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedInstanceKeyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedInstanceKey ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedInstanceKey]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedInstanceKeyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_py3.py deleted file mode 100644 index f00bafa838f2..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedInstanceKey(ProxyResource): - """A managed instance key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :vartype kind: str - :param server_key_type: Required. The key type like 'ServiceManaged', - 'AzureKeyVault'. Possible values include: 'ServiceManaged', - 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :param uri: The URI of the key. If the ServerKeyType is AzureKeyVault, - then the URI is required. - :type uri: str - :ivar thumbprint: Thumbprint of the key. - :vartype thumbprint: str - :ivar creation_date: The key creation date. - :vartype creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True}, - 'thumbprint': {'readonly': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, server_key_type, uri: str=None, **kwargs) -> None: - super(ManagedInstanceKey, self).__init__(**kwargs) - self.kind = None - self.server_key_type = server_key_type - self.uri = uri - self.thumbprint = None - self.creation_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_paged.py deleted file mode 100644 index c39881da9f3b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedInstancePaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedInstance ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedInstance]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedInstancePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info.py deleted file mode 100644 index ee49c1db0c62..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstancePairInfo(Model): - """Pairs of Managed Instances in the failover group. - - :param primary_managed_instance_id: Id of Primary Managed Instance in - pair. - :type primary_managed_instance_id: str - :param partner_managed_instance_id: Id of Partner Managed Instance in - pair. - :type partner_managed_instance_id: str - """ - - _attribute_map = { - 'primary_managed_instance_id': {'key': 'primaryManagedInstanceId', 'type': 'str'}, - 'partner_managed_instance_id': {'key': 'partnerManagedInstanceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstancePairInfo, self).__init__(**kwargs) - self.primary_managed_instance_id = kwargs.get('primary_managed_instance_id', None) - self.partner_managed_instance_id = kwargs.get('partner_managed_instance_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info_py3.py deleted file mode 100644 index 49f52752b439..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstancePairInfo(Model): - """Pairs of Managed Instances in the failover group. - - :param primary_managed_instance_id: Id of Primary Managed Instance in - pair. - :type primary_managed_instance_id: str - :param partner_managed_instance_id: Id of Partner Managed Instance in - pair. - :type partner_managed_instance_id: str - """ - - _attribute_map = { - 'primary_managed_instance_id': {'key': 'primaryManagedInstanceId', 'type': 'str'}, - 'partner_managed_instance_id': {'key': 'partnerManagedInstanceId', 'type': 'str'}, - } - - def __init__(self, *, primary_managed_instance_id: str=None, partner_managed_instance_id: str=None, **kwargs) -> None: - super(ManagedInstancePairInfo, self).__init__(**kwargs) - self.primary_managed_instance_id = primary_managed_instance_id - self.partner_managed_instance_id = partner_managed_instance_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_py3.py deleted file mode 100644 index 9233da80dae4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_py3.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class ManagedInstance(TrackedResource): - """An Azure SQL managed instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param identity: The Azure Active Directory identity of the managed - instance. - :type identity: ~azure.mgmt.sql.models.ResourceIdentity - :param sku: Managed instance sku - :type sku: ~azure.mgmt.sql.models.Sku - :ivar fully_qualified_domain_name: The fully qualified domain name of the - managed instance. - :vartype fully_qualified_domain_name: str - :param administrator_login: Administrator username for the managed - instance. Can only be specified when the managed instance is being created - (and is required for creation). - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for managed instance creation). - :type administrator_login_password: str - :param subnet_id: Subnet resource ID for the managed instance. - :type subnet_id: str - :ivar state: The state of the managed instance. - :vartype state: str - :param license_type: The license type. Possible values are - 'LicenseIncluded' and 'BasePrice'. - :type license_type: str - :param v_cores: The number of VCores. - :type v_cores: int - :param storage_size_in_gb: The maximum storage size in GB. - :type storage_size_in_gb: int - :param collation: Collation of the managed instance. - :type collation: str - :ivar dns_zone: The Dns Zone that the managed instance is in. - :vartype dns_zone: str - :param dns_zone_partner: The resource id of another managed instance whose - DNS zone this managed instance will share after creation. - :type dns_zone_partner: str - :param public_data_endpoint_enabled: Whether or not the public data - endpoint is enabled. - :type public_data_endpoint_enabled: bool - :param proxy_override: Connection type used for connecting to the - instance. Possible values include: 'Proxy', 'Redirect', 'Default' - :type proxy_override: str or - ~azure.mgmt.sql.models.ManagedInstanceProxyOverride - :param timezone_id: Id of the timezone. Allowed values are timezones - supported by Windows. - Windows keeps details on supported timezones, including the id, in - registry under - KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time - Zones. - You can get those registry values via SQL Server by querying SELECT name - AS timezone_id FROM sys.time_zone_info. - List of Ids can also be obtained by executing - [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. - An example of valid timezone id is "Pacific Standard Time" or "W. Europe - Standard Time". - :type timezone_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'fully_qualified_domain_name': {'readonly': True}, - 'state': {'readonly': True}, - 'dns_zone': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, - 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, - 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, - 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, - 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, - 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, identity=None, sku=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type: str=None, v_cores: int=None, storage_size_in_gb: int=None, collation: str=None, dns_zone_partner: str=None, public_data_endpoint_enabled: bool=None, proxy_override=None, timezone_id: str=None, **kwargs) -> None: - super(ManagedInstance, self).__init__(location=location, tags=tags, **kwargs) - self.identity = identity - self.sku = sku - self.fully_qualified_domain_name = None - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.subnet_id = subnet_id - self.state = None - self.license_type = license_type - self.v_cores = v_cores - self.storage_size_in_gb = storage_size_in_gb - self.collation = collation - self.dns_zone = None - self.dns_zone_partner = dns_zone_partner - self.public_data_endpoint_enabled = public_data_endpoint_enabled - self.proxy_override = proxy_override - self.timezone_id = timezone_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update.py deleted file mode 100644 index e3c543f0a6b1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceUpdate(Model): - """An update request for an Azure SQL Database managed instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param sku: Managed instance sku - :type sku: ~azure.mgmt.sql.models.Sku - :ivar fully_qualified_domain_name: The fully qualified domain name of the - managed instance. - :vartype fully_qualified_domain_name: str - :param administrator_login: Administrator username for the managed - instance. Can only be specified when the managed instance is being created - (and is required for creation). - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for managed instance creation). - :type administrator_login_password: str - :param subnet_id: Subnet resource ID for the managed instance. - :type subnet_id: str - :ivar state: The state of the managed instance. - :vartype state: str - :param license_type: The license type. Possible values are - 'LicenseIncluded' and 'BasePrice'. - :type license_type: str - :param v_cores: The number of VCores. - :type v_cores: int - :param storage_size_in_gb: The maximum storage size in GB. - :type storage_size_in_gb: int - :param collation: Collation of the managed instance. - :type collation: str - :ivar dns_zone: The Dns Zone that the managed instance is in. - :vartype dns_zone: str - :param dns_zone_partner: The resource id of another managed instance whose - DNS zone this managed instance will share after creation. - :type dns_zone_partner: str - :param public_data_endpoint_enabled: Whether or not the public data - endpoint is enabled. - :type public_data_endpoint_enabled: bool - :param proxy_override: Connection type used for connecting to the - instance. Possible values include: 'Proxy', 'Redirect', 'Default' - :type proxy_override: str or - ~azure.mgmt.sql.models.ManagedInstanceProxyOverride - :param timezone_id: Id of the timezone. Allowed values are timezones - supported by Windows. - Windows keeps details on supported timezones, including the id, in - registry under - KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time - Zones. - You can get those registry values via SQL Server by querying SELECT name - AS timezone_id FROM sys.time_zone_info. - List of Ids can also be obtained by executing - [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. - An example of valid timezone id is "Pacific Standard Time" or "W. Europe - Standard Time". - :type timezone_id: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'fully_qualified_domain_name': {'readonly': True}, - 'state': {'readonly': True}, - 'dns_zone': {'readonly': True}, - } - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, - 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, - 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, - 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, - 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, - 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceUpdate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.fully_qualified_domain_name = None - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.subnet_id = kwargs.get('subnet_id', None) - self.state = None - self.license_type = kwargs.get('license_type', None) - self.v_cores = kwargs.get('v_cores', None) - self.storage_size_in_gb = kwargs.get('storage_size_in_gb', None) - self.collation = kwargs.get('collation', None) - self.dns_zone = None - self.dns_zone_partner = kwargs.get('dns_zone_partner', None) - self.public_data_endpoint_enabled = kwargs.get('public_data_endpoint_enabled', None) - self.proxy_override = kwargs.get('proxy_override', None) - self.timezone_id = kwargs.get('timezone_id', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update_py3.py deleted file mode 100644 index 4a2e6aa0bd78..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update_py3.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceUpdate(Model): - """An update request for an Azure SQL Database managed instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param sku: Managed instance sku - :type sku: ~azure.mgmt.sql.models.Sku - :ivar fully_qualified_domain_name: The fully qualified domain name of the - managed instance. - :vartype fully_qualified_domain_name: str - :param administrator_login: Administrator username for the managed - instance. Can only be specified when the managed instance is being created - (and is required for creation). - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for managed instance creation). - :type administrator_login_password: str - :param subnet_id: Subnet resource ID for the managed instance. - :type subnet_id: str - :ivar state: The state of the managed instance. - :vartype state: str - :param license_type: The license type. Possible values are - 'LicenseIncluded' and 'BasePrice'. - :type license_type: str - :param v_cores: The number of VCores. - :type v_cores: int - :param storage_size_in_gb: The maximum storage size in GB. - :type storage_size_in_gb: int - :param collation: Collation of the managed instance. - :type collation: str - :ivar dns_zone: The Dns Zone that the managed instance is in. - :vartype dns_zone: str - :param dns_zone_partner: The resource id of another managed instance whose - DNS zone this managed instance will share after creation. - :type dns_zone_partner: str - :param public_data_endpoint_enabled: Whether or not the public data - endpoint is enabled. - :type public_data_endpoint_enabled: bool - :param proxy_override: Connection type used for connecting to the - instance. Possible values include: 'Proxy', 'Redirect', 'Default' - :type proxy_override: str or - ~azure.mgmt.sql.models.ManagedInstanceProxyOverride - :param timezone_id: Id of the timezone. Allowed values are timezones - supported by Windows. - Windows keeps details on supported timezones, including the id, in - registry under - KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time - Zones. - You can get those registry values via SQL Server by querying SELECT name - AS timezone_id FROM sys.time_zone_info. - List of Ids can also be obtained by executing - [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. - An example of valid timezone id is "Pacific Standard Time" or "W. Europe - Standard Time". - :type timezone_id: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'fully_qualified_domain_name': {'readonly': True}, - 'state': {'readonly': True}, - 'dns_zone': {'readonly': True}, - } - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, - 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, - 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, - 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, - 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, - 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, sku=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type: str=None, v_cores: int=None, storage_size_in_gb: int=None, collation: str=None, dns_zone_partner: str=None, public_data_endpoint_enabled: bool=None, proxy_override=None, timezone_id: str=None, tags=None, **kwargs) -> None: - super(ManagedInstanceUpdate, self).__init__(**kwargs) - self.sku = sku - self.fully_qualified_domain_name = None - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.subnet_id = subnet_id - self.state = None - self.license_type = license_type - self.v_cores = v_cores - self.storage_size_in_gb = storage_size_in_gb - self.collation = collation - self.dns_zone = None - self.dns_zone_partner = dns_zone_partner - self.public_data_endpoint_enabled = public_data_endpoint_enabled - self.proxy_override = proxy_override - self.timezone_id = timezone_id - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability.py deleted file mode 100644 index 29503dd20ae2..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceVcoresCapability(Model): - """The managed instance virtual cores capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The virtual cores identifier. - :vartype name: str - :ivar value: The virtual cores value. - :vartype value: int - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'int'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceVcoresCapability, self).__init__(**kwargs) - self.name = None - self.value = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability_py3.py deleted file mode 100644 index 23d3bb49d4e8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceVcoresCapability(Model): - """The managed instance virtual cores capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The virtual cores identifier. - :vartype name: str - :ivar value: The virtual cores value. - :vartype value: int - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'int'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ManagedInstanceVcoresCapability, self).__init__(**kwargs) - self.name = None - self.value = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability.py deleted file mode 100644 index 949b1fcf4ad5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceVersionCapability(Model): - """The managed instance capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The server version name. - :vartype name: str - :ivar supported_editions: The list of supported managed instance editions. - :vartype supported_editions: - list[~azure.mgmt.sql.models.ManagedInstanceEditionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_editions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_editions': {'key': 'supportedEditions', 'type': '[ManagedInstanceEditionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceVersionCapability, self).__init__(**kwargs) - self.name = None - self.supported_editions = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability_py3.py deleted file mode 100644 index 6d078061def9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceVersionCapability(Model): - """The managed instance capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The server version name. - :vartype name: str - :ivar supported_editions: The list of supported managed instance editions. - :vartype supported_editions: - list[~azure.mgmt.sql.models.ManagedInstanceEditionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_editions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_editions': {'key': 'supportedEditions', 'type': '[ManagedInstanceEditionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ManagedInstanceVersionCapability, self).__init__(**kwargs) - self.name = None - self.supported_editions = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment.py deleted file mode 100644 index 78d257382e26..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedInstanceVulnerabilityAssessment(ProxyResource): - """A managed instance vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: Required. A blob storage container path to - hold the scan results (e.g. - https://myStorage.blob.core.windows.net/VaScans/). - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_container_path': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = kwargs.get('storage_container_path', None) - self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.recurring_scans = kwargs.get('recurring_scans', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_paged.py deleted file mode 100644 index a7322fe506bf..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedInstanceVulnerabilityAssessmentPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedInstanceVulnerabilityAssessment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedInstanceVulnerabilityAssessment]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedInstanceVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_py3.py deleted file mode 100644 index 6f3da10fea84..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedInstanceVulnerabilityAssessment(ProxyResource): - """A managed instance vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: Required. A blob storage container path to - hold the scan results (e.g. - https://myStorage.blob.core.windows.net/VaScans/). - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_container_path': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, *, storage_container_path: str, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: - super(ManagedInstanceVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = storage_container_path - self.storage_container_sas_key = storage_container_sas_key - self.storage_account_access_key = storage_account_access_key - self.recurring_scans = recurring_scans diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy.py deleted file mode 100644 index e3a0a5062157..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedServerSecurityAlertPolicy(ProxyResource): - """A managed server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ManagedServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_paged.py deleted file mode 100644 index 2d99504f4744..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedServerSecurityAlertPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedServerSecurityAlertPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedServerSecurityAlertPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedServerSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_py3.py deleted file mode 100644 index b16c97c79bea..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedServerSecurityAlertPolicy(ProxyResource): - """A managed server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: - super(ManagedServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability.py deleted file mode 100644 index d103c6f969f7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaxSizeCapability(Model): - """The maximum size capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The maximum size limit (see 'unit' for the units). - :vartype limit: int - :ivar unit: The units that the limit is expressed in. Possible values - include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' - :vartype unit: str or ~azure.mgmt.sql.models.MaxSizeUnit - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'int'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MaxSizeCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability_py3.py deleted file mode 100644 index 54bd7cb00171..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaxSizeCapability(Model): - """The maximum size capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The maximum size limit (see 'unit' for the units). - :vartype limit: int - :ivar unit: The units that the limit is expressed in. Possible values - include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' - :vartype unit: str or ~azure.mgmt.sql.models.MaxSizeUnit - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'int'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MaxSizeCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability.py deleted file mode 100644 index 3ec6c663b559..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaxSizeRangeCapability(Model): - """The maximum size range capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar min_value: Minimum value. - :vartype min_value: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar max_value: Maximum value. - :vartype max_value: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar scale_size: Scale/step size for discrete values between the minimum - value and the maximum value. - :vartype scale_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar log_size: Size of transaction log. - :vartype log_size: ~azure.mgmt.sql.models.LogSizeCapability - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'min_value': {'readonly': True}, - 'max_value': {'readonly': True}, - 'scale_size': {'readonly': True}, - 'log_size': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'min_value': {'key': 'minValue', 'type': 'MaxSizeCapability'}, - 'max_value': {'key': 'maxValue', 'type': 'MaxSizeCapability'}, - 'scale_size': {'key': 'scaleSize', 'type': 'MaxSizeCapability'}, - 'log_size': {'key': 'logSize', 'type': 'LogSizeCapability'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MaxSizeRangeCapability, self).__init__(**kwargs) - self.min_value = None - self.max_value = None - self.scale_size = None - self.log_size = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability_py3.py deleted file mode 100644 index f0f95ebd7f36..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaxSizeRangeCapability(Model): - """The maximum size range capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar min_value: Minimum value. - :vartype min_value: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar max_value: Maximum value. - :vartype max_value: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar scale_size: Scale/step size for discrete values between the minimum - value and the maximum value. - :vartype scale_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar log_size: Size of transaction log. - :vartype log_size: ~azure.mgmt.sql.models.LogSizeCapability - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'min_value': {'readonly': True}, - 'max_value': {'readonly': True}, - 'scale_size': {'readonly': True}, - 'log_size': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'min_value': {'key': 'minValue', 'type': 'MaxSizeCapability'}, - 'max_value': {'key': 'maxValue', 'type': 'MaxSizeCapability'}, - 'scale_size': {'key': 'scaleSize', 'type': 'MaxSizeCapability'}, - 'log_size': {'key': 'logSize', 'type': 'LogSizeCapability'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(MaxSizeRangeCapability, self).__init__(**kwargs) - self.min_value = None - self.max_value = None - self.scale_size = None - self.log_size = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric.py deleted file mode 100644 index 3d3b4b8df154..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Metric(Model): - """Database metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar start_time: The start time for the metric (ISO-8601 format). - :vartype start_time: datetime - :ivar end_time: The end time for the metric (ISO-8601 format). - :vartype end_time: datetime - :ivar time_grain: The time step to be used to summarize the metric values. - :vartype time_grain: str - :ivar unit: The unit of the metric. Possible values include: 'count', - 'bytes', 'seconds', 'percent', 'countPerSecond', 'bytesPerSecond' - :vartype unit: str or ~azure.mgmt.sql.models.UnitType - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.sql.models.MetricName - :ivar metric_values: The metric values for the specified time window and - timestep. - :vartype metric_values: list[~azure.mgmt.sql.models.MetricValue] - """ - - _validation = { - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'unit': {'readonly': True}, - 'name': {'readonly': True}, - 'metric_values': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, - } - - def __init__(self, **kwargs): - super(Metric, self).__init__(**kwargs) - self.start_time = None - self.end_time = None - self.time_grain = None - self.unit = None - self.name = None - self.metric_values = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability.py deleted file mode 100644 index ef43027b61ba..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricAvailability(Model): - """A metric availability value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar retention: The length of retention for the database metric. - :vartype retention: str - :ivar time_grain: The granularity of the database metric. - :vartype time_grain: str - """ - - _validation = { - 'retention': {'readonly': True}, - 'time_grain': {'readonly': True}, - } - - _attribute_map = { - 'retention': {'key': 'retention', 'type': 'str'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MetricAvailability, self).__init__(**kwargs) - self.retention = None - self.time_grain = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability_py3.py deleted file mode 100644 index 6e47c8134a38..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricAvailability(Model): - """A metric availability value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar retention: The length of retention for the database metric. - :vartype retention: str - :ivar time_grain: The granularity of the database metric. - :vartype time_grain: str - """ - - _validation = { - 'retention': {'readonly': True}, - 'time_grain': {'readonly': True}, - } - - _attribute_map = { - 'retention': {'key': 'retention', 'type': 'str'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MetricAvailability, self).__init__(**kwargs) - self.retention = None - self.time_grain = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition.py deleted file mode 100644 index 0b760f50f3ba..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricDefinition(Model): - """A database metric definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.sql.models.MetricName - :ivar primary_aggregation_type: The primary aggregation type defining how - metric values are displayed. Possible values include: 'None', 'Average', - 'Count', 'Minimum', 'Maximum', 'Total' - :vartype primary_aggregation_type: str or - ~azure.mgmt.sql.models.PrimaryAggregationType - :ivar resource_uri: The resource uri of the database. - :vartype resource_uri: str - :ivar unit: The unit of the metric. Possible values include: 'Count', - 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' - :vartype unit: str or ~azure.mgmt.sql.models.UnitDefinitionType - :ivar metric_availabilities: The list of database metric availabilities - for the metric. - :vartype metric_availabilities: - list[~azure.mgmt.sql.models.MetricAvailability] - """ - - _validation = { - 'name': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'resource_uri': {'readonly': True}, - 'unit': {'readonly': True}, - 'metric_availabilities': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'MetricName'}, - 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, - } - - def __init__(self, **kwargs): - super(MetricDefinition, self).__init__(**kwargs) - self.name = None - self.primary_aggregation_type = None - self.resource_uri = None - self.unit = None - self.metric_availabilities = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_paged.py deleted file mode 100644 index 95a01ebf4e85..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class MetricDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`MetricDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[MetricDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(MetricDefinitionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_py3.py deleted file mode 100644 index 33d5fa9e1323..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricDefinition(Model): - """A database metric definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.sql.models.MetricName - :ivar primary_aggregation_type: The primary aggregation type defining how - metric values are displayed. Possible values include: 'None', 'Average', - 'Count', 'Minimum', 'Maximum', 'Total' - :vartype primary_aggregation_type: str or - ~azure.mgmt.sql.models.PrimaryAggregationType - :ivar resource_uri: The resource uri of the database. - :vartype resource_uri: str - :ivar unit: The unit of the metric. Possible values include: 'Count', - 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' - :vartype unit: str or ~azure.mgmt.sql.models.UnitDefinitionType - :ivar metric_availabilities: The list of database metric availabilities - for the metric. - :vartype metric_availabilities: - list[~azure.mgmt.sql.models.MetricAvailability] - """ - - _validation = { - 'name': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'resource_uri': {'readonly': True}, - 'unit': {'readonly': True}, - 'metric_availabilities': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'MetricName'}, - 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, - } - - def __init__(self, **kwargs) -> None: - super(MetricDefinition, self).__init__(**kwargs) - self.name = None - self.primary_aggregation_type = None - self.resource_uri = None - self.unit = None - self.metric_availabilities = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name.py deleted file mode 100644 index 10643031ce5a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricName(Model): - """A database metric name. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: The name of the database metric. - :vartype value: str - :ivar localized_value: The friendly name of the database metric. - :vartype localized_value: str - """ - - _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MetricName, self).__init__(**kwargs) - self.value = None - self.localized_value = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name_py3.py deleted file mode 100644 index 67551bc7aed9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricName(Model): - """A database metric name. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: The name of the database metric. - :vartype value: str - :ivar localized_value: The friendly name of the database metric. - :vartype localized_value: str - """ - - _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MetricName, self).__init__(**kwargs) - self.value = None - self.localized_value = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_paged.py deleted file mode 100644 index 61aa43a2fced..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class MetricPaged(Paged): - """ - A paging container for iterating over a list of :class:`Metric ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Metric]'} - } - - def __init__(self, *args, **kwargs): - - super(MetricPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_py3.py deleted file mode 100644 index 5eae901bca7e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Metric(Model): - """Database metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar start_time: The start time for the metric (ISO-8601 format). - :vartype start_time: datetime - :ivar end_time: The end time for the metric (ISO-8601 format). - :vartype end_time: datetime - :ivar time_grain: The time step to be used to summarize the metric values. - :vartype time_grain: str - :ivar unit: The unit of the metric. Possible values include: 'count', - 'bytes', 'seconds', 'percent', 'countPerSecond', 'bytesPerSecond' - :vartype unit: str or ~azure.mgmt.sql.models.UnitType - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.sql.models.MetricName - :ivar metric_values: The metric values for the specified time window and - timestep. - :vartype metric_values: list[~azure.mgmt.sql.models.MetricValue] - """ - - _validation = { - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'unit': {'readonly': True}, - 'name': {'readonly': True}, - 'metric_values': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, - } - - def __init__(self, **kwargs) -> None: - super(Metric, self).__init__(**kwargs) - self.start_time = None - self.end_time = None - self.time_grain = None - self.unit = None - self.name = None - self.metric_values = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value.py deleted file mode 100644 index a506295d5bfb..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricValue(Model): - """Represents database metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar count: The number of values for the metric. - :vartype count: float - :ivar average: The average value of the metric. - :vartype average: float - :ivar maximum: The max value of the metric. - :vartype maximum: float - :ivar minimum: The min value of the metric. - :vartype minimum: float - :ivar timestamp: The metric timestamp (ISO-8601 format). - :vartype timestamp: datetime - :ivar total: The total value of the metric. - :vartype total: float - """ - - _validation = { - 'count': {'readonly': True}, - 'average': {'readonly': True}, - 'maximum': {'readonly': True}, - 'minimum': {'readonly': True}, - 'timestamp': {'readonly': True}, - 'total': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'float'}, - 'average': {'key': 'average', 'type': 'float'}, - 'maximum': {'key': 'maximum', 'type': 'float'}, - 'minimum': {'key': 'minimum', 'type': 'float'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'total': {'key': 'total', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(MetricValue, self).__init__(**kwargs) - self.count = None - self.average = None - self.maximum = None - self.minimum = None - self.timestamp = None - self.total = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value_py3.py deleted file mode 100644 index a1b027d62864..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricValue(Model): - """Represents database metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar count: The number of values for the metric. - :vartype count: float - :ivar average: The average value of the metric. - :vartype average: float - :ivar maximum: The max value of the metric. - :vartype maximum: float - :ivar minimum: The min value of the metric. - :vartype minimum: float - :ivar timestamp: The metric timestamp (ISO-8601 format). - :vartype timestamp: datetime - :ivar total: The total value of the metric. - :vartype total: float - """ - - _validation = { - 'count': {'readonly': True}, - 'average': {'readonly': True}, - 'maximum': {'readonly': True}, - 'minimum': {'readonly': True}, - 'timestamp': {'readonly': True}, - 'total': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'float'}, - 'average': {'key': 'average', 'type': 'float'}, - 'maximum': {'key': 'maximum', 'type': 'float'}, - 'minimum': {'key': 'minimum', 'type': 'float'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'total': {'key': 'total', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(MetricValue, self).__init__(**kwargs) - self.count = None - self.average = None - self.maximum = None - self.minimum = None - self.timestamp = None - self.total = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation.py deleted file mode 100644 index 09138c4b9086..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """SQL REST API operation definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the operation being performed on this particular - object. - :vartype name: str - :ivar display: The localized display information for this particular - operation / action. - :vartype display: ~azure.mgmt.sql.models.OperationDisplay - :ivar origin: The intended executor of the operation. Possible values - include: 'user', 'system' - :vartype origin: str or ~azure.mgmt.sql.models.OperationOrigin - :ivar properties: Additional descriptions for the operation. - :vartype properties: dict[str, object] - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - 'origin': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{object}'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.origin = None - self.properties = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display.py deleted file mode 100644 index dfbc4a6fcff3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """Display metadata associated with the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: The localized friendly form of the resource provider name. - :vartype provider: str - :ivar resource: The localized friendly form of the resource type related - to this action/operation. - :vartype resource: str - :ivar operation: The localized friendly name for the operation. - :vartype operation: str - :ivar description: The localized friendly description for the operation. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display_py3.py deleted file mode 100644 index 0541321c178c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """Display metadata associated with the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: The localized friendly form of the resource provider name. - :vartype provider: str - :ivar resource: The localized friendly form of the resource type related - to this action/operation. - :vartype resource: str - :ivar operation: The localized friendly name for the operation. - :vartype operation: str - :ivar description: The localized friendly description for the operation. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact.py deleted file mode 100644 index 6b69a122de4c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationImpact(Model): - """The impact of an operation, both in absolute and relative terms. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the impact dimension. - :vartype name: str - :ivar unit: The unit in which estimated impact to dimension is measured. - :vartype unit: str - :ivar change_value_absolute: The absolute impact to dimension. - :vartype change_value_absolute: float - :ivar change_value_relative: The relative impact to dimension (null if not - applicable) - :vartype change_value_relative: float - """ - - _validation = { - 'name': {'readonly': True}, - 'unit': {'readonly': True}, - 'change_value_absolute': {'readonly': True}, - 'change_value_relative': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'change_value_absolute': {'key': 'changeValueAbsolute', 'type': 'float'}, - 'change_value_relative': {'key': 'changeValueRelative', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(OperationImpact, self).__init__(**kwargs) - self.name = None - self.unit = None - self.change_value_absolute = None - self.change_value_relative = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact_py3.py deleted file mode 100644 index f53b9445f998..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationImpact(Model): - """The impact of an operation, both in absolute and relative terms. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the impact dimension. - :vartype name: str - :ivar unit: The unit in which estimated impact to dimension is measured. - :vartype unit: str - :ivar change_value_absolute: The absolute impact to dimension. - :vartype change_value_absolute: float - :ivar change_value_relative: The relative impact to dimension (null if not - applicable) - :vartype change_value_relative: float - """ - - _validation = { - 'name': {'readonly': True}, - 'unit': {'readonly': True}, - 'change_value_absolute': {'readonly': True}, - 'change_value_relative': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'change_value_absolute': {'key': 'changeValueAbsolute', 'type': 'float'}, - 'change_value_relative': {'key': 'changeValueRelative', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationImpact, self).__init__(**kwargs) - self.name = None - self.unit = None - self.change_value_absolute = None - self.change_value_relative = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_paged.py deleted file mode 100644 index ec8c4dc4c1c7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_py3.py deleted file mode 100644 index 4968981d1858..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """SQL REST API operation definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the operation being performed on this particular - object. - :vartype name: str - :ivar display: The localized display information for this particular - operation / action. - :vartype display: ~azure.mgmt.sql.models.OperationDisplay - :ivar origin: The intended executor of the operation. Possible values - include: 'user', 'system' - :vartype origin: str or ~azure.mgmt.sql.models.OperationOrigin - :ivar properties: Additional descriptions for the operation. - :vartype properties: dict[str, object] - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - 'origin': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{object}'}, - } - - def __init__(self, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.origin = None - self.properties = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info.py deleted file mode 100644 index de30bd259f7a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartnerInfo(Model): - """Partner server information for the failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource identifier of the partner server. - :type id: str - :ivar location: Geo location of the partner server. - :vartype location: str - :ivar replication_role: Replication role of the partner server. Possible - values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.FailoverGroupReplicationRole - """ - - _validation = { - 'id': {'required': True}, - 'location': {'readonly': True}, - 'replication_role': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'replication_role': {'key': 'replicationRole', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PartnerInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.location = None - self.replication_role = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info_py3.py deleted file mode 100644 index 0edede88118a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartnerInfo(Model): - """Partner server information for the failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource identifier of the partner server. - :type id: str - :ivar location: Geo location of the partner server. - :vartype location: str - :ivar replication_role: Replication role of the partner server. Possible - values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.FailoverGroupReplicationRole - """ - - _validation = { - 'id': {'required': True}, - 'location': {'readonly': True}, - 'replication_role': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'replication_role': {'key': 'replicationRole', 'type': 'str'}, - } - - def __init__(self, *, id: str, **kwargs) -> None: - super(PartnerInfo, self).__init__(**kwargs) - self.id = id - self.location = None - self.replication_role = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info.py deleted file mode 100644 index 4d8e2688acb1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartnerRegionInfo(Model): - """Partner region information for the failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param location: Geo location of the partner managed instances. - :type location: str - :ivar replication_role: Replication role of the partner managed instances. - Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole - """ - - _validation = { - 'replication_role': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'replication_role': {'key': 'replicationRole', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PartnerRegionInfo, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.replication_role = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info_py3.py deleted file mode 100644 index 76c52b49c0ba..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartnerRegionInfo(Model): - """Partner region information for the failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param location: Geo location of the partner managed instances. - :type location: str - :ivar replication_role: Replication role of the partner managed instances. - Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole - """ - - _validation = { - 'replication_role': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'replication_role': {'key': 'replicationRole', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, **kwargs) -> None: - super(PartnerRegionInfo, self).__init__(**kwargs) - self.location = location - self.replication_role = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability.py deleted file mode 100644 index 2463e1818718..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PerformanceLevelCapability(Model): - """The performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: Performance level value. - :vartype value: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - """ - - _validation = { - 'value': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PerformanceLevelCapability, self).__init__(**kwargs) - self.value = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability_py3.py deleted file mode 100644 index 96119e14568d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PerformanceLevelCapability(Model): - """The performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: Performance level value. - :vartype value: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - """ - - _validation = { - 'value': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(PerformanceLevelCapability, self).__init__(**kwargs) - self.value = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource.py deleted file mode 100644 index 21fea4f24360..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ProxyResource(Resource): - """ARM proxy resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProxyResource, self).__init__(**kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource_py3.py deleted file mode 100644 index 707323dfc134..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ProxyResource(Resource): - """ARM proxy resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ProxyResource, self).__init__(**kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool.py deleted file mode 100644 index 0d80a9a31ac9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RecommendedElasticPool(ProxyResource): - """Represents a recommended elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_edition: The edition of the recommended elastic pool. The - ElasticPoolEdition enumeration contains all the valid editions. Possible - values include: 'Basic', 'Standard', 'Premium' - :vartype database_edition: str or - ~azure.mgmt.sql.models.ElasticPoolEdition - :param dtu: The DTU for the recommended elastic pool. - :type dtu: float - :param database_dtu_min: The minimum DTU for the database. - :type database_dtu_min: float - :param database_dtu_max: The maximum DTU for the database. - :type database_dtu_max: float - :param storage_mb: Gets storage size in megabytes. - :type storage_mb: float - :ivar observation_period_start: The observation period start (ISO8601 - format). - :vartype observation_period_start: datetime - :ivar observation_period_end: The observation period start (ISO8601 - format). - :vartype observation_period_end: datetime - :ivar max_observed_dtu: Gets maximum observed DTU. - :vartype max_observed_dtu: float - :ivar max_observed_storage_mb: Gets maximum observed storage in megabytes. - :vartype max_observed_storage_mb: float - :ivar databases: The list of databases in this pool. Expanded property - :vartype databases: list[~azure.mgmt.sql.models.TrackedResource] - :ivar metrics: The list of databases housed in the server. Expanded - property - :vartype metrics: - list[~azure.mgmt.sql.models.RecommendedElasticPoolMetric] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_edition': {'readonly': True}, - 'observation_period_start': {'readonly': True}, - 'observation_period_end': {'readonly': True}, - 'max_observed_dtu': {'readonly': True}, - 'max_observed_storage_mb': {'readonly': True}, - 'databases': {'readonly': True}, - 'metrics': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'dtu': {'key': 'properties.dtu', 'type': 'float'}, - 'database_dtu_min': {'key': 'properties.databaseDtuMin', 'type': 'float'}, - 'database_dtu_max': {'key': 'properties.databaseDtuMax', 'type': 'float'}, - 'storage_mb': {'key': 'properties.storageMB', 'type': 'float'}, - 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, - 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, - 'max_observed_dtu': {'key': 'properties.maxObservedDtu', 'type': 'float'}, - 'max_observed_storage_mb': {'key': 'properties.maxObservedStorageMB', 'type': 'float'}, - 'databases': {'key': 'properties.databases', 'type': '[TrackedResource]'}, - 'metrics': {'key': 'properties.metrics', 'type': '[RecommendedElasticPoolMetric]'}, - } - - def __init__(self, **kwargs): - super(RecommendedElasticPool, self).__init__(**kwargs) - self.database_edition = None - self.dtu = kwargs.get('dtu', None) - self.database_dtu_min = kwargs.get('database_dtu_min', None) - self.database_dtu_max = kwargs.get('database_dtu_max', None) - self.storage_mb = kwargs.get('storage_mb', None) - self.observation_period_start = None - self.observation_period_end = None - self.max_observed_dtu = None - self.max_observed_storage_mb = None - self.databases = None - self.metrics = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric.py deleted file mode 100644 index 9ed07ced53d7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecommendedElasticPoolMetric(Model): - """Represents recommended elastic pool metric. - - :param date_time_property: The time of metric (ISO8601 format). - :type date_time_property: datetime - :param dtu: Gets or sets the DTUs (Database Transaction Units). See - https://azure.microsoft.com/documentation/articles/sql-database-what-is-a-dtu/ - :type dtu: float - :param size_gb: Gets or sets size in gigabytes. - :type size_gb: float - """ - - _attribute_map = { - 'date_time_property': {'key': 'dateTime', 'type': 'iso-8601'}, - 'dtu': {'key': 'dtu', 'type': 'float'}, - 'size_gb': {'key': 'sizeGB', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(RecommendedElasticPoolMetric, self).__init__(**kwargs) - self.date_time_property = kwargs.get('date_time_property', None) - self.dtu = kwargs.get('dtu', None) - self.size_gb = kwargs.get('size_gb', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_paged.py deleted file mode 100644 index a5106f989535..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RecommendedElasticPoolMetricPaged(Paged): - """ - A paging container for iterating over a list of :class:`RecommendedElasticPoolMetric ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RecommendedElasticPoolMetric]'} - } - - def __init__(self, *args, **kwargs): - - super(RecommendedElasticPoolMetricPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_py3.py deleted file mode 100644 index d33210bf6e58..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecommendedElasticPoolMetric(Model): - """Represents recommended elastic pool metric. - - :param date_time_property: The time of metric (ISO8601 format). - :type date_time_property: datetime - :param dtu: Gets or sets the DTUs (Database Transaction Units). See - https://azure.microsoft.com/documentation/articles/sql-database-what-is-a-dtu/ - :type dtu: float - :param size_gb: Gets or sets size in gigabytes. - :type size_gb: float - """ - - _attribute_map = { - 'date_time_property': {'key': 'dateTime', 'type': 'iso-8601'}, - 'dtu': {'key': 'dtu', 'type': 'float'}, - 'size_gb': {'key': 'sizeGB', 'type': 'float'}, - } - - def __init__(self, *, date_time_property=None, dtu: float=None, size_gb: float=None, **kwargs) -> None: - super(RecommendedElasticPoolMetric, self).__init__(**kwargs) - self.date_time_property = date_time_property - self.dtu = dtu - self.size_gb = size_gb diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_paged.py deleted file mode 100644 index ceb235126fbe..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RecommendedElasticPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`RecommendedElasticPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RecommendedElasticPool]'} - } - - def __init__(self, *args, **kwargs): - - super(RecommendedElasticPoolPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_py3.py deleted file mode 100644 index 2f8a14d6abfa..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_py3.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RecommendedElasticPool(ProxyResource): - """Represents a recommended elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_edition: The edition of the recommended elastic pool. The - ElasticPoolEdition enumeration contains all the valid editions. Possible - values include: 'Basic', 'Standard', 'Premium' - :vartype database_edition: str or - ~azure.mgmt.sql.models.ElasticPoolEdition - :param dtu: The DTU for the recommended elastic pool. - :type dtu: float - :param database_dtu_min: The minimum DTU for the database. - :type database_dtu_min: float - :param database_dtu_max: The maximum DTU for the database. - :type database_dtu_max: float - :param storage_mb: Gets storage size in megabytes. - :type storage_mb: float - :ivar observation_period_start: The observation period start (ISO8601 - format). - :vartype observation_period_start: datetime - :ivar observation_period_end: The observation period start (ISO8601 - format). - :vartype observation_period_end: datetime - :ivar max_observed_dtu: Gets maximum observed DTU. - :vartype max_observed_dtu: float - :ivar max_observed_storage_mb: Gets maximum observed storage in megabytes. - :vartype max_observed_storage_mb: float - :ivar databases: The list of databases in this pool. Expanded property - :vartype databases: list[~azure.mgmt.sql.models.TrackedResource] - :ivar metrics: The list of databases housed in the server. Expanded - property - :vartype metrics: - list[~azure.mgmt.sql.models.RecommendedElasticPoolMetric] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_edition': {'readonly': True}, - 'observation_period_start': {'readonly': True}, - 'observation_period_end': {'readonly': True}, - 'max_observed_dtu': {'readonly': True}, - 'max_observed_storage_mb': {'readonly': True}, - 'databases': {'readonly': True}, - 'metrics': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'dtu': {'key': 'properties.dtu', 'type': 'float'}, - 'database_dtu_min': {'key': 'properties.databaseDtuMin', 'type': 'float'}, - 'database_dtu_max': {'key': 'properties.databaseDtuMax', 'type': 'float'}, - 'storage_mb': {'key': 'properties.storageMB', 'type': 'float'}, - 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, - 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, - 'max_observed_dtu': {'key': 'properties.maxObservedDtu', 'type': 'float'}, - 'max_observed_storage_mb': {'key': 'properties.maxObservedStorageMB', 'type': 'float'}, - 'databases': {'key': 'properties.databases', 'type': '[TrackedResource]'}, - 'metrics': {'key': 'properties.metrics', 'type': '[RecommendedElasticPoolMetric]'}, - } - - def __init__(self, *, dtu: float=None, database_dtu_min: float=None, database_dtu_max: float=None, storage_mb: float=None, **kwargs) -> None: - super(RecommendedElasticPool, self).__init__(**kwargs) - self.database_edition = None - self.dtu = dtu - self.database_dtu_min = database_dtu_min - self.database_dtu_max = database_dtu_max - self.storage_mb = storage_mb - self.observation_period_start = None - self.observation_period_end = None - self.max_observed_dtu = None - self.max_observed_storage_mb = None - self.databases = None - self.metrics = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index.py deleted file mode 100644 index df1eba91f84f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RecommendedIndex(ProxyResource): - """Represents a database recommended index. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar action: The proposed index action. You can create a missing index, - drop an unused index, or rebuild an existing index to improve its - performance. Possible values include: 'Create', 'Drop', 'Rebuild' - :vartype action: str or ~azure.mgmt.sql.models.RecommendedIndexAction - :ivar state: The current recommendation state. Possible values include: - 'Active', 'Pending', 'Executing', 'Verifying', 'Pending Revert', - 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success' - :vartype state: str or ~azure.mgmt.sql.models.RecommendedIndexState - :ivar created: The UTC datetime showing when this resource was created - (ISO8601 format). - :vartype created: datetime - :ivar last_modified: The UTC datetime of when was this resource last - changed (ISO8601 format). - :vartype last_modified: datetime - :ivar index_type: The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, - CLUSTERED COLUMNSTORE). Possible values include: 'CLUSTERED', - 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED COLUMNSTORE' - :vartype index_type: str or ~azure.mgmt.sql.models.RecommendedIndexType - :ivar schema: The schema where table to build index over resides - :vartype schema: str - :ivar table: The table on which to build index. - :vartype table: str - :ivar columns: Columns over which to build index - :vartype columns: list[str] - :ivar included_columns: The list of column names to be included in the - index - :vartype included_columns: list[str] - :ivar index_script: The full build index script - :vartype index_script: str - :ivar estimated_impact: The estimated impact of doing recommended index - action. - :vartype estimated_impact: list[~azure.mgmt.sql.models.OperationImpact] - :ivar reported_impact: The values reported after index action is complete. - :vartype reported_impact: list[~azure.mgmt.sql.models.OperationImpact] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'action': {'readonly': True}, - 'state': {'readonly': True}, - 'created': {'readonly': True}, - 'last_modified': {'readonly': True}, - 'index_type': {'readonly': True}, - 'schema': {'readonly': True}, - 'table': {'readonly': True}, - 'columns': {'readonly': True}, - 'included_columns': {'readonly': True}, - 'index_script': {'readonly': True}, - 'estimated_impact': {'readonly': True}, - 'reported_impact': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'action': {'key': 'properties.action', 'type': 'RecommendedIndexAction'}, - 'state': {'key': 'properties.state', 'type': 'RecommendedIndexState'}, - 'created': {'key': 'properties.created', 'type': 'iso-8601'}, - 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, - 'index_type': {'key': 'properties.indexType', 'type': 'RecommendedIndexType'}, - 'schema': {'key': 'properties.schema', 'type': 'str'}, - 'table': {'key': 'properties.table', 'type': 'str'}, - 'columns': {'key': 'properties.columns', 'type': '[str]'}, - 'included_columns': {'key': 'properties.includedColumns', 'type': '[str]'}, - 'index_script': {'key': 'properties.indexScript', 'type': 'str'}, - 'estimated_impact': {'key': 'properties.estimatedImpact', 'type': '[OperationImpact]'}, - 'reported_impact': {'key': 'properties.reportedImpact', 'type': '[OperationImpact]'}, - } - - def __init__(self, **kwargs): - super(RecommendedIndex, self).__init__(**kwargs) - self.action = None - self.state = None - self.created = None - self.last_modified = None - self.index_type = None - self.schema = None - self.table = None - self.columns = None - self.included_columns = None - self.index_script = None - self.estimated_impact = None - self.reported_impact = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index_py3.py deleted file mode 100644 index 5aea5620371e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index_py3.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RecommendedIndex(ProxyResource): - """Represents a database recommended index. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar action: The proposed index action. You can create a missing index, - drop an unused index, or rebuild an existing index to improve its - performance. Possible values include: 'Create', 'Drop', 'Rebuild' - :vartype action: str or ~azure.mgmt.sql.models.RecommendedIndexAction - :ivar state: The current recommendation state. Possible values include: - 'Active', 'Pending', 'Executing', 'Verifying', 'Pending Revert', - 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success' - :vartype state: str or ~azure.mgmt.sql.models.RecommendedIndexState - :ivar created: The UTC datetime showing when this resource was created - (ISO8601 format). - :vartype created: datetime - :ivar last_modified: The UTC datetime of when was this resource last - changed (ISO8601 format). - :vartype last_modified: datetime - :ivar index_type: The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, - CLUSTERED COLUMNSTORE). Possible values include: 'CLUSTERED', - 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED COLUMNSTORE' - :vartype index_type: str or ~azure.mgmt.sql.models.RecommendedIndexType - :ivar schema: The schema where table to build index over resides - :vartype schema: str - :ivar table: The table on which to build index. - :vartype table: str - :ivar columns: Columns over which to build index - :vartype columns: list[str] - :ivar included_columns: The list of column names to be included in the - index - :vartype included_columns: list[str] - :ivar index_script: The full build index script - :vartype index_script: str - :ivar estimated_impact: The estimated impact of doing recommended index - action. - :vartype estimated_impact: list[~azure.mgmt.sql.models.OperationImpact] - :ivar reported_impact: The values reported after index action is complete. - :vartype reported_impact: list[~azure.mgmt.sql.models.OperationImpact] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'action': {'readonly': True}, - 'state': {'readonly': True}, - 'created': {'readonly': True}, - 'last_modified': {'readonly': True}, - 'index_type': {'readonly': True}, - 'schema': {'readonly': True}, - 'table': {'readonly': True}, - 'columns': {'readonly': True}, - 'included_columns': {'readonly': True}, - 'index_script': {'readonly': True}, - 'estimated_impact': {'readonly': True}, - 'reported_impact': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'action': {'key': 'properties.action', 'type': 'RecommendedIndexAction'}, - 'state': {'key': 'properties.state', 'type': 'RecommendedIndexState'}, - 'created': {'key': 'properties.created', 'type': 'iso-8601'}, - 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, - 'index_type': {'key': 'properties.indexType', 'type': 'RecommendedIndexType'}, - 'schema': {'key': 'properties.schema', 'type': 'str'}, - 'table': {'key': 'properties.table', 'type': 'str'}, - 'columns': {'key': 'properties.columns', 'type': '[str]'}, - 'included_columns': {'key': 'properties.includedColumns', 'type': '[str]'}, - 'index_script': {'key': 'properties.indexScript', 'type': 'str'}, - 'estimated_impact': {'key': 'properties.estimatedImpact', 'type': '[OperationImpact]'}, - 'reported_impact': {'key': 'properties.reportedImpact', 'type': '[OperationImpact]'}, - } - - def __init__(self, **kwargs) -> None: - super(RecommendedIndex, self).__init__(**kwargs) - self.action = None - self.state = None - self.created = None - self.last_modified = None - self.index_type = None - self.schema = None - self.table = None - self.columns = None - self.included_columns = None - self.index_script = None - self.estimated_impact = None - self.reported_impact = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database.py deleted file mode 100644 index 0d3b630ce18d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RecoverableDatabase(ProxyResource): - """A recoverable database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar edition: The edition of the database - :vartype edition: str - :ivar service_level_objective: The service level objective name of the - database - :vartype service_level_objective: str - :ivar elastic_pool_name: The elastic pool name of the database - :vartype elastic_pool_name: str - :ivar last_available_backup_date: The last available backup date of the - database (ISO8601 format) - :vartype last_available_backup_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'edition': {'readonly': True}, - 'service_level_objective': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'last_available_backup_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'edition': {'key': 'properties.edition', 'type': 'str'}, - 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(RecoverableDatabase, self).__init__(**kwargs) - self.edition = None - self.service_level_objective = None - self.elastic_pool_name = None - self.last_available_backup_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_paged.py deleted file mode 100644 index cf4cde8ae7e0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RecoverableDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`RecoverableDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RecoverableDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(RecoverableDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_py3.py deleted file mode 100644 index 8eb9d5510689..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RecoverableDatabase(ProxyResource): - """A recoverable database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar edition: The edition of the database - :vartype edition: str - :ivar service_level_objective: The service level objective name of the - database - :vartype service_level_objective: str - :ivar elastic_pool_name: The elastic pool name of the database - :vartype elastic_pool_name: str - :ivar last_available_backup_date: The last available backup date of the - database (ISO8601 format) - :vartype last_available_backup_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'edition': {'readonly': True}, - 'service_level_objective': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'last_available_backup_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'edition': {'key': 'properties.edition', 'type': 'str'}, - 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(RecoverableDatabase, self).__init__(**kwargs) - self.edition = None - self.service_level_objective = None - self.elastic_pool_name = None - self.last_available_backup_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database.py deleted file mode 100644 index cd6adeaeac89..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RecoverableManagedDatabase(ProxyResource): - """A recoverable managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar last_available_backup_date: The last available backup date. - :vartype last_available_backup_date: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'last_available_backup_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RecoverableManagedDatabase, self).__init__(**kwargs) - self.last_available_backup_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_paged.py deleted file mode 100644 index 9c3a35713275..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RecoverableManagedDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`RecoverableManagedDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RecoverableManagedDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(RecoverableManagedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_py3.py deleted file mode 100644 index b6f295aceffb..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RecoverableManagedDatabase(ProxyResource): - """A recoverable managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar last_available_backup_date: The last available backup date. - :vartype last_available_backup_date: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'last_available_backup_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(RecoverableManagedDatabase, self).__init__(**kwargs) - self.last_available_backup_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link.py deleted file mode 100644 index 450161ab6c9b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ReplicationLink(ProxyResource): - """Represents a database replication link. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Location of the server that contains this firewall rule. - :vartype location: str - :ivar is_termination_allowed: Legacy value indicating whether termination - is allowed. Currently always returns true. - :vartype is_termination_allowed: bool - :ivar replication_mode: Replication mode of this replication link. - :vartype replication_mode: str - :ivar partner_server: The name of the server hosting the partner database. - :vartype partner_server: str - :ivar partner_database: The name of the partner database. - :vartype partner_database: str - :ivar partner_location: The Azure Region of the partner database. - :vartype partner_location: str - :ivar role: The role of the database in the replication link. Possible - values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', - 'Copy' - :vartype role: str or ~azure.mgmt.sql.models.ReplicationRole - :ivar partner_role: The role of the partner database in the replication - link. Possible values include: 'Primary', 'Secondary', - 'NonReadableSecondary', 'Source', 'Copy' - :vartype partner_role: str or ~azure.mgmt.sql.models.ReplicationRole - :ivar start_time: The start time for the replication link. - :vartype start_time: datetime - :ivar percent_complete: The percentage of seeding complete for the - replication link. - :vartype percent_complete: int - :ivar replication_state: The replication state for the replication link. - Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP', 'SUSPENDED' - :vartype replication_state: str or ~azure.mgmt.sql.models.ReplicationState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'is_termination_allowed': {'readonly': True}, - 'replication_mode': {'readonly': True}, - 'partner_server': {'readonly': True}, - 'partner_database': {'readonly': True}, - 'partner_location': {'readonly': True}, - 'role': {'readonly': True}, - 'partner_role': {'readonly': True}, - 'start_time': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'replication_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'is_termination_allowed': {'key': 'properties.isTerminationAllowed', 'type': 'bool'}, - 'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'}, - 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, - 'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'}, - 'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'}, - 'role': {'key': 'properties.role', 'type': 'ReplicationRole'}, - 'partner_role': {'key': 'properties.partnerRole', 'type': 'ReplicationRole'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ReplicationLink, self).__init__(**kwargs) - self.location = None - self.is_termination_allowed = None - self.replication_mode = None - self.partner_server = None - self.partner_database = None - self.partner_location = None - self.role = None - self.partner_role = None - self.start_time = None - self.percent_complete = None - self.replication_state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_paged.py deleted file mode 100644 index 18b96c9e0e3c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ReplicationLinkPaged(Paged): - """ - A paging container for iterating over a list of :class:`ReplicationLink ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ReplicationLink]'} - } - - def __init__(self, *args, **kwargs): - - super(ReplicationLinkPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_py3.py deleted file mode 100644 index 740748f154b2..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_py3.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ReplicationLink(ProxyResource): - """Represents a database replication link. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Location of the server that contains this firewall rule. - :vartype location: str - :ivar is_termination_allowed: Legacy value indicating whether termination - is allowed. Currently always returns true. - :vartype is_termination_allowed: bool - :ivar replication_mode: Replication mode of this replication link. - :vartype replication_mode: str - :ivar partner_server: The name of the server hosting the partner database. - :vartype partner_server: str - :ivar partner_database: The name of the partner database. - :vartype partner_database: str - :ivar partner_location: The Azure Region of the partner database. - :vartype partner_location: str - :ivar role: The role of the database in the replication link. Possible - values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', - 'Copy' - :vartype role: str or ~azure.mgmt.sql.models.ReplicationRole - :ivar partner_role: The role of the partner database in the replication - link. Possible values include: 'Primary', 'Secondary', - 'NonReadableSecondary', 'Source', 'Copy' - :vartype partner_role: str or ~azure.mgmt.sql.models.ReplicationRole - :ivar start_time: The start time for the replication link. - :vartype start_time: datetime - :ivar percent_complete: The percentage of seeding complete for the - replication link. - :vartype percent_complete: int - :ivar replication_state: The replication state for the replication link. - Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP', 'SUSPENDED' - :vartype replication_state: str or ~azure.mgmt.sql.models.ReplicationState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'is_termination_allowed': {'readonly': True}, - 'replication_mode': {'readonly': True}, - 'partner_server': {'readonly': True}, - 'partner_database': {'readonly': True}, - 'partner_location': {'readonly': True}, - 'role': {'readonly': True}, - 'partner_role': {'readonly': True}, - 'start_time': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'replication_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'is_termination_allowed': {'key': 'properties.isTerminationAllowed', 'type': 'bool'}, - 'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'}, - 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, - 'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'}, - 'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'}, - 'role': {'key': 'properties.role', 'type': 'ReplicationRole'}, - 'partner_role': {'key': 'properties.partnerRole', 'type': 'ReplicationRole'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ReplicationLink, self).__init__(**kwargs) - self.location = None - self.is_termination_allowed = None - self.replication_mode = None - self.partner_server = None - self.partner_database = None - self.partner_location = None - self.role = None - self.partner_role = None - self.start_time = None - self.percent_complete = None - self.replication_state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource.py deleted file mode 100644 index fc92549d32e9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """ARM resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity.py deleted file mode 100644 index 57a9e4b4a161..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceIdentity(Model): - """Azure Active Directory identity configuration for a resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The Azure Active Directory principal id. - :vartype principal_id: str - :param type: The identity type. Set this to 'SystemAssigned' in order to - automatically create and assign an Azure Active Directory principal for - the resource. Possible values include: 'SystemAssigned' - :type type: str or ~azure.mgmt.sql.models.IdentityType - :ivar tenant_id: The Azure Active Directory tenant id. - :vartype tenant_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceIdentity, self).__init__(**kwargs) - self.principal_id = None - self.type = kwargs.get('type', None) - self.tenant_id = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity_py3.py deleted file mode 100644 index 3b1d8d90f100..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceIdentity(Model): - """Azure Active Directory identity configuration for a resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The Azure Active Directory principal id. - :vartype principal_id: str - :param type: The identity type. Set this to 'SystemAssigned' in order to - automatically create and assign an Azure Active Directory principal for - the resource. Possible values include: 'SystemAssigned' - :type type: str or ~azure.mgmt.sql.models.IdentityType - :ivar tenant_id: The Azure Active Directory tenant id. - :vartype tenant_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ResourceIdentity, self).__init__(**kwargs) - self.principal_id = None - self.type = type - self.tenant_id = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition.py deleted file mode 100644 index 2c933120d7c8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceMoveDefinition(Model): - """Contains the information necessary to perform a resource move (rename). - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The target ID for the resource - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceMoveDefinition, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition_py3.py deleted file mode 100644 index f6ce2ac0f628..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceMoveDefinition(Model): - """Contains the information necessary to perform a resource move (rename). - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The target ID for the resource - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str, **kwargs) -> None: - super(ResourceMoveDefinition, self).__init__(**kwargs) - self.id = id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_py3.py deleted file mode 100644 index aedc5cfaf0b9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """ARM resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database.py deleted file mode 100644 index 8e419fb0b50b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RestorableDroppedDatabase(ProxyResource): - """A restorable dropped database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: The geo-location where the resource lives - :vartype location: str - :ivar database_name: The name of the database - :vartype database_name: str - :ivar edition: The edition of the database - :vartype edition: str - :ivar max_size_bytes: The max size in bytes of the database - :vartype max_size_bytes: str - :ivar service_level_objective: The service level objective name of the - database - :vartype service_level_objective: str - :ivar elastic_pool_name: The elastic pool name of the database - :vartype elastic_pool_name: str - :ivar creation_date: The creation date of the database (ISO8601 format) - :vartype creation_date: datetime - :ivar deletion_date: The deletion date of the database (ISO8601 format) - :vartype deletion_date: datetime - :ivar earliest_restore_date: The earliest restore date of the database - (ISO8601 format) - :vartype earliest_restore_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'database_name': {'readonly': True}, - 'edition': {'readonly': True}, - 'max_size_bytes': {'readonly': True}, - 'service_level_objective': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'edition': {'key': 'properties.edition', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'str'}, - 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(RestorableDroppedDatabase, self).__init__(**kwargs) - self.location = None - self.database_name = None - self.edition = None - self.max_size_bytes = None - self.service_level_objective = None - self.elastic_pool_name = None - self.creation_date = None - self.deletion_date = None - self.earliest_restore_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_paged.py deleted file mode 100644 index b0eb93010942..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RestorableDroppedDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`RestorableDroppedDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RestorableDroppedDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(RestorableDroppedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_py3.py deleted file mode 100644 index 0e4a5f45ec89..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_py3.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RestorableDroppedDatabase(ProxyResource): - """A restorable dropped database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: The geo-location where the resource lives - :vartype location: str - :ivar database_name: The name of the database - :vartype database_name: str - :ivar edition: The edition of the database - :vartype edition: str - :ivar max_size_bytes: The max size in bytes of the database - :vartype max_size_bytes: str - :ivar service_level_objective: The service level objective name of the - database - :vartype service_level_objective: str - :ivar elastic_pool_name: The elastic pool name of the database - :vartype elastic_pool_name: str - :ivar creation_date: The creation date of the database (ISO8601 format) - :vartype creation_date: datetime - :ivar deletion_date: The deletion date of the database (ISO8601 format) - :vartype deletion_date: datetime - :ivar earliest_restore_date: The earliest restore date of the database - (ISO8601 format) - :vartype earliest_restore_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'database_name': {'readonly': True}, - 'edition': {'readonly': True}, - 'max_size_bytes': {'readonly': True}, - 'service_level_objective': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'edition': {'key': 'properties.edition', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'str'}, - 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(RestorableDroppedDatabase, self).__init__(**kwargs) - self.location = None - self.database_name = None - self.edition = None - self.max_size_bytes = None - self.service_level_objective = None - self.elastic_pool_name = None - self.creation_date = None - self.deletion_date = None - self.earliest_restore_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database.py deleted file mode 100644 index e23713aa2a2d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class RestorableDroppedManagedDatabase(TrackedResource): - """A restorable dropped managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :ivar database_name: The name of the database. - :vartype database_name: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar deletion_date: The deletion date of the database (ISO8601 format). - :vartype deletion_date: datetime - :ivar earliest_restore_date: The earliest restore date of the database - (ISO8601 format). - :vartype earliest_restore_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'database_name': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(RestorableDroppedManagedDatabase, self).__init__(**kwargs) - self.database_name = None - self.creation_date = None - self.deletion_date = None - self.earliest_restore_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_paged.py deleted file mode 100644 index d6e432c2c351..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RestorableDroppedManagedDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`RestorableDroppedManagedDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RestorableDroppedManagedDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(RestorableDroppedManagedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_py3.py deleted file mode 100644 index 7997b13a21ce..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class RestorableDroppedManagedDatabase(TrackedResource): - """A restorable dropped managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :ivar database_name: The name of the database. - :vartype database_name: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar deletion_date: The deletion date of the database (ISO8601 format). - :vartype deletion_date: datetime - :ivar earliest_restore_date: The earliest restore date of the database - (ISO8601 format). - :vartype earliest_restore_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'database_name': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(RestorableDroppedManagedDatabase, self).__init__(location=location, tags=tags, **kwargs) - self.database_name = None - self.creation_date = None - self.deletion_date = None - self.earliest_restore_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point.py deleted file mode 100644 index 86cf0382ffc8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RestorePoint(ProxyResource): - """Database restore points. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar restore_point_type: The type of restore point. Possible values - include: 'CONTINUOUS', 'DISCRETE' - :vartype restore_point_type: str or - ~azure.mgmt.sql.models.RestorePointType - :ivar earliest_restore_date: The earliest time to which this database can - be restored - :vartype earliest_restore_date: datetime - :ivar restore_point_creation_date: The time the backup was taken - :vartype restore_point_creation_date: datetime - :ivar restore_point_label: The label of restore point for backup request - by user - :vartype restore_point_label: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'restore_point_type': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'restore_point_creation_date': {'readonly': True}, - 'restore_point_label': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'restore_point_type': {'key': 'properties.restorePointType', 'type': 'RestorePointType'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, - 'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RestorePoint, self).__init__(**kwargs) - self.location = None - self.restore_point_type = None - self.earliest_restore_date = None - self.restore_point_creation_date = None - self.restore_point_label = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_paged.py deleted file mode 100644 index b77cde666dd0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RestorePointPaged(Paged): - """ - A paging container for iterating over a list of :class:`RestorePoint ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RestorePoint]'} - } - - def __init__(self, *args, **kwargs): - - super(RestorePointPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_py3.py deleted file mode 100644 index 886f576a4575..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RestorePoint(ProxyResource): - """Database restore points. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar restore_point_type: The type of restore point. Possible values - include: 'CONTINUOUS', 'DISCRETE' - :vartype restore_point_type: str or - ~azure.mgmt.sql.models.RestorePointType - :ivar earliest_restore_date: The earliest time to which this database can - be restored - :vartype earliest_restore_date: datetime - :ivar restore_point_creation_date: The time the backup was taken - :vartype restore_point_creation_date: datetime - :ivar restore_point_label: The label of restore point for backup request - by user - :vartype restore_point_label: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'restore_point_type': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'restore_point_creation_date': {'readonly': True}, - 'restore_point_label': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'restore_point_type': {'key': 'properties.restorePointType', 'type': 'RestorePointType'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, - 'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(RestorePoint, self).__init__(**kwargs) - self.location = None - self.restore_point_type = None - self.earliest_restore_date = None - self.restore_point_creation_date = None - self.restore_point_label = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label.py deleted file mode 100644 index a076a11634e6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SensitivityLabel(ProxyResource): - """A sensitivity label. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param label_name: The label name. - :type label_name: str - :param label_id: The label ID. - :type label_id: str - :param information_type: The information type. - :type information_type: str - :param information_type_id: The information type ID. - :type information_type_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'label_name': {'key': 'properties.labelName', 'type': 'str'}, - 'label_id': {'key': 'properties.labelId', 'type': 'str'}, - 'information_type': {'key': 'properties.informationType', 'type': 'str'}, - 'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SensitivityLabel, self).__init__(**kwargs) - self.label_name = kwargs.get('label_name', None) - self.label_id = kwargs.get('label_id', None) - self.information_type = kwargs.get('information_type', None) - self.information_type_id = kwargs.get('information_type_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_paged.py deleted file mode 100644 index 438bfd86f9be..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SensitivityLabelPaged(Paged): - """ - A paging container for iterating over a list of :class:`SensitivityLabel ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SensitivityLabel]'} - } - - def __init__(self, *args, **kwargs): - - super(SensitivityLabelPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_py3.py deleted file mode 100644 index f304363d916b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SensitivityLabel(ProxyResource): - """A sensitivity label. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param label_name: The label name. - :type label_name: str - :param label_id: The label ID. - :type label_id: str - :param information_type: The information type. - :type information_type: str - :param information_type_id: The information type ID. - :type information_type_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'label_name': {'key': 'properties.labelName', 'type': 'str'}, - 'label_id': {'key': 'properties.labelId', 'type': 'str'}, - 'information_type': {'key': 'properties.informationType', 'type': 'str'}, - 'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'}, - } - - def __init__(self, *, label_name: str=None, label_id: str=None, information_type: str=None, information_type_id: str=None, **kwargs) -> None: - super(SensitivityLabel, self).__init__(**kwargs) - self.label_name = label_name - self.label_id = label_id - self.information_type = information_type - self.information_type_id = information_type_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server.py deleted file mode 100644 index 1c399fadb353..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class Server(TrackedResource): - """An Azure SQL Database server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.sql.models.ResourceIdentity - :ivar kind: Kind of sql server. This is metadata used for the Azure portal - experience. - :vartype kind: str - :param administrator_login: Administrator username for the server. Once - created it cannot be changed. - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for server creation). - :type administrator_login_password: str - :param version: The version of the server. - :type version: str - :ivar state: The state of the server. - :vartype state: str - :ivar fully_qualified_domain_name: The fully qualified domain name of the - server. - :vartype fully_qualified_domain_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'state': {'readonly': True}, - 'fully_qualified_domain_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Server, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.kind = None - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.version = kwargs.get('version', None) - self.state = None - self.fully_qualified_domain_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning.py deleted file mode 100644 index 583c0b843c1b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerAutomaticTuning(ProxyResource): - """Server-level Automatic Tuning. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param desired_state: Automatic tuning desired state. Possible values - include: 'Custom', 'Auto', 'Unspecified' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningServerMode - :ivar actual_state: Automatic tuning actual state. Possible values - include: 'Custom', 'Auto', 'Unspecified' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningServerMode - :param options: Automatic tuning options definition. - :type options: dict[str, - ~azure.mgmt.sql.models.AutomaticTuningServerOptions] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'actual_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningServerMode'}, - 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningServerMode'}, - 'options': {'key': 'properties.options', 'type': '{AutomaticTuningServerOptions}'}, - } - - def __init__(self, **kwargs): - super(ServerAutomaticTuning, self).__init__(**kwargs) - self.desired_state = kwargs.get('desired_state', None) - self.actual_state = None - self.options = kwargs.get('options', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning_py3.py deleted file mode 100644 index fb8fb4804610..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerAutomaticTuning(ProxyResource): - """Server-level Automatic Tuning. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param desired_state: Automatic tuning desired state. Possible values - include: 'Custom', 'Auto', 'Unspecified' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningServerMode - :ivar actual_state: Automatic tuning actual state. Possible values - include: 'Custom', 'Auto', 'Unspecified' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningServerMode - :param options: Automatic tuning options definition. - :type options: dict[str, - ~azure.mgmt.sql.models.AutomaticTuningServerOptions] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'actual_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningServerMode'}, - 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningServerMode'}, - 'options': {'key': 'properties.options', 'type': '{AutomaticTuningServerOptions}'}, - } - - def __init__(self, *, desired_state=None, options=None, **kwargs) -> None: - super(ServerAutomaticTuning, self).__init__(**kwargs) - self.desired_state = desired_state - self.actual_state = None - self.options = options diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator.py deleted file mode 100644 index ef037e8a9dc8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerAzureADAdministrator(ProxyResource): - """An server Active Directory Administrator. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar administrator_type: Required. The type of administrator. Default - value: "ActiveDirectory" . - :vartype administrator_type: str - :param login: Required. The server administrator login value. - :type login: str - :param sid: Required. The server administrator Sid (Secure ID). - :type sid: str - :param tenant_id: Required. The server Active Directory Administrator - tenant id. - :type tenant_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'administrator_type': {'required': True, 'constant': True}, - 'login': {'required': True}, - 'sid': {'required': True}, - 'tenant_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, - 'login': {'key': 'properties.login', 'type': 'str'}, - 'sid': {'key': 'properties.sid', 'type': 'str'}, - 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, - } - - administrator_type = "ActiveDirectory" - - def __init__(self, **kwargs): - super(ServerAzureADAdministrator, self).__init__(**kwargs) - self.login = kwargs.get('login', None) - self.sid = kwargs.get('sid', None) - self.tenant_id = kwargs.get('tenant_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_paged.py deleted file mode 100644 index 519adc226385..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerAzureADAdministratorPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerAzureADAdministrator ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerAzureADAdministrator]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerAzureADAdministratorPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_py3.py deleted file mode 100644 index 3dfeb71123c3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerAzureADAdministrator(ProxyResource): - """An server Active Directory Administrator. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar administrator_type: Required. The type of administrator. Default - value: "ActiveDirectory" . - :vartype administrator_type: str - :param login: Required. The server administrator login value. - :type login: str - :param sid: Required. The server administrator Sid (Secure ID). - :type sid: str - :param tenant_id: Required. The server Active Directory Administrator - tenant id. - :type tenant_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'administrator_type': {'required': True, 'constant': True}, - 'login': {'required': True}, - 'sid': {'required': True}, - 'tenant_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, - 'login': {'key': 'properties.login', 'type': 'str'}, - 'sid': {'key': 'properties.sid', 'type': 'str'}, - 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, - } - - administrator_type = "ActiveDirectory" - - def __init__(self, *, login: str, sid: str, tenant_id: str, **kwargs) -> None: - super(ServerAzureADAdministrator, self).__init__(**kwargs) - self.login = login - self.sid = sid - self.tenant_id = tenant_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy.py deleted file mode 100644 index 9a7bc69b8c5d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy.py +++ /dev/null @@ -1,160 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerBlobAuditingPolicy(ProxyResource): - """A server blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ServerBlobAuditingPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) - self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) - self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) - self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy_py3.py deleted file mode 100644 index 120d066e6427..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy_py3.py +++ /dev/null @@ -1,160 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerBlobAuditingPolicy(ProxyResource): - """A server blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: - super(ServerBlobAuditingPolicy, self).__init__(**kwargs) - self.state = state - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.audit_actions_and_groups = audit_actions_and_groups - self.storage_account_subscription_id = storage_account_subscription_id - self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use - self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link.py deleted file mode 100644 index 88fef4fa788f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerCommunicationLink(ProxyResource): - """Server communication link. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar state: The state. - :vartype state: str - :param partner_server: Required. The name of the partner server. - :type partner_server: str - :ivar location: Communication link location. - :vartype location: str - :ivar kind: Communication link kind. This property is used for Azure - Portal metadata. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'readonly': True}, - 'partner_server': {'required': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerCommunicationLink, self).__init__(**kwargs) - self.state = None - self.partner_server = kwargs.get('partner_server', None) - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_paged.py deleted file mode 100644 index 6e2fef5d7ce0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerCommunicationLinkPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerCommunicationLink ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerCommunicationLink]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerCommunicationLinkPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_py3.py deleted file mode 100644 index 6a32069ca067..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerCommunicationLink(ProxyResource): - """Server communication link. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar state: The state. - :vartype state: str - :param partner_server: Required. The name of the partner server. - :type partner_server: str - :ivar location: Communication link location. - :vartype location: str - :ivar kind: Communication link kind. This property is used for Azure - Portal metadata. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'readonly': True}, - 'partner_server': {'required': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, partner_server: str, **kwargs) -> None: - super(ServerCommunicationLink, self).__init__(**kwargs) - self.state = None - self.partner_server = partner_server - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy.py deleted file mode 100644 index dd0097235550..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerConnectionPolicy(ProxyResource): - """A server secure connection policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Metadata used for the Azure portal experience. - :vartype kind: str - :ivar location: Resource location. - :vartype location: str - :param connection_type: Required. The server connection type. Possible - values include: 'Default', 'Proxy', 'Redirect' - :type connection_type: str or ~azure.mgmt.sql.models.ServerConnectionType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - 'connection_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'connection_type': {'key': 'properties.connectionType', 'type': 'ServerConnectionType'}, - } - - def __init__(self, **kwargs): - super(ServerConnectionPolicy, self).__init__(**kwargs) - self.kind = None - self.location = None - self.connection_type = kwargs.get('connection_type', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy_py3.py deleted file mode 100644 index 10bd81052301..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerConnectionPolicy(ProxyResource): - """A server secure connection policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Metadata used for the Azure portal experience. - :vartype kind: str - :ivar location: Resource location. - :vartype location: str - :param connection_type: Required. The server connection type. Possible - values include: 'Default', 'Proxy', 'Redirect' - :type connection_type: str or ~azure.mgmt.sql.models.ServerConnectionType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - 'connection_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'connection_type': {'key': 'properties.connectionType', 'type': 'ServerConnectionType'}, - } - - def __init__(self, *, connection_type, **kwargs) -> None: - super(ServerConnectionPolicy, self).__init__(**kwargs) - self.kind = None - self.location = None - self.connection_type = connection_type diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias.py deleted file mode 100644 index 691db960c1a7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerDnsAlias(ProxyResource): - """A server DNS alias. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar azure_dns_record: The fully qualified DNS record for alias - :vartype azure_dns_record: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'azure_dns_record': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'azure_dns_record': {'key': 'properties.azureDnsRecord', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerDnsAlias, self).__init__(**kwargs) - self.azure_dns_record = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition.py deleted file mode 100644 index 2f7757f5daf2..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerDnsAliasAcquisition(Model): - """A server DNS alias acquisition request. - - :param old_server_dns_alias_id: The id of the server alias that will be - acquired to point to this server instead. - :type old_server_dns_alias_id: str - """ - - _attribute_map = { - 'old_server_dns_alias_id': {'key': 'oldServerDnsAliasId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerDnsAliasAcquisition, self).__init__(**kwargs) - self.old_server_dns_alias_id = kwargs.get('old_server_dns_alias_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition_py3.py deleted file mode 100644 index 93cf9e0027c9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerDnsAliasAcquisition(Model): - """A server DNS alias acquisition request. - - :param old_server_dns_alias_id: The id of the server alias that will be - acquired to point to this server instead. - :type old_server_dns_alias_id: str - """ - - _attribute_map = { - 'old_server_dns_alias_id': {'key': 'oldServerDnsAliasId', 'type': 'str'}, - } - - def __init__(self, *, old_server_dns_alias_id: str=None, **kwargs) -> None: - super(ServerDnsAliasAcquisition, self).__init__(**kwargs) - self.old_server_dns_alias_id = old_server_dns_alias_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_paged.py deleted file mode 100644 index 2fdd93879f3b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerDnsAliasPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerDnsAlias ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerDnsAlias]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerDnsAliasPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_py3.py deleted file mode 100644 index c57df1a85f06..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerDnsAlias(ProxyResource): - """A server DNS alias. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar azure_dns_record: The fully qualified DNS record for alias - :vartype azure_dns_record: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'azure_dns_record': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'azure_dns_record': {'key': 'properties.azureDnsRecord', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ServerDnsAlias, self).__init__(**kwargs) - self.azure_dns_record = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key.py deleted file mode 100644 index 1258d1e0da7f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerKey(ProxyResource): - """A server key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :type kind: str - :ivar location: Resource location. - :vartype location: str - :ivar subregion: Subregion of the server key. - :vartype subregion: str - :param server_key_type: Required. The server key type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :param uri: The URI of the server key. - :type uri: str - :param thumbprint: Thumbprint of the server key. - :type thumbprint: str - :param creation_date: The server key creation date. - :type creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'subregion': {'readonly': True}, - 'server_key_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'subregion': {'key': 'properties.subregion', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ServerKey, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) - self.location = None - self.subregion = None - self.server_key_type = kwargs.get('server_key_type', None) - self.uri = kwargs.get('uri', None) - self.thumbprint = kwargs.get('thumbprint', None) - self.creation_date = kwargs.get('creation_date', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_paged.py deleted file mode 100644 index 1d5e262c9c89..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerKeyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerKey ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerKey]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerKeyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_py3.py deleted file mode 100644 index 41ef40ab165a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerKey(ProxyResource): - """A server key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :type kind: str - :ivar location: Resource location. - :vartype location: str - :ivar subregion: Subregion of the server key. - :vartype subregion: str - :param server_key_type: Required. The server key type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :param uri: The URI of the server key. - :type uri: str - :param thumbprint: Thumbprint of the server key. - :type thumbprint: str - :param creation_date: The server key creation date. - :type creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'subregion': {'readonly': True}, - 'server_key_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'subregion': {'key': 'properties.subregion', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, server_key_type, kind: str=None, uri: str=None, thumbprint: str=None, creation_date=None, **kwargs) -> None: - super(ServerKey, self).__init__(**kwargs) - self.kind = kind - self.location = None - self.subregion = None - self.server_key_type = server_key_type - self.uri = uri - self.thumbprint = thumbprint - self.creation_date = creation_date diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_paged.py deleted file mode 100644 index 2d6e6fe0e114..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerPaged(Paged): - """ - A paging container for iterating over a list of :class:`Server ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Server]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_py3.py deleted file mode 100644 index 625c4d0aea4c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_py3.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class Server(TrackedResource): - """An Azure SQL Database server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.sql.models.ResourceIdentity - :ivar kind: Kind of sql server. This is metadata used for the Azure portal - experience. - :vartype kind: str - :param administrator_login: Administrator username for the server. Once - created it cannot be changed. - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for server creation). - :type administrator_login_password: str - :param version: The version of the server. - :type version: str - :ivar state: The state of the server. - :vartype state: str - :ivar fully_qualified_domain_name: The fully qualified domain name of the - server. - :vartype fully_qualified_domain_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'state': {'readonly': True}, - 'fully_qualified_domain_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, identity=None, administrator_login: str=None, administrator_login_password: str=None, version: str=None, **kwargs) -> None: - super(Server, self).__init__(location=location, tags=tags, **kwargs) - self.identity = identity - self.kind = None - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.version = version - self.state = None - self.fully_qualified_domain_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy.py deleted file mode 100644 index 06c40dd93125..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerSecurityAlertPolicy(ProxyResource): - """A server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_paged.py deleted file mode 100644 index 3a8836b45245..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerSecurityAlertPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerSecurityAlertPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerSecurityAlertPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_py3.py deleted file mode 100644 index 38c0c87b0372..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerSecurityAlertPolicy(ProxyResource): - """A server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: - super(ServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update.py deleted file mode 100644 index d39d49bea953..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerUpdate(Model): - """An update request for an Azure SQL Database server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param administrator_login: Administrator username for the server. Once - created it cannot be changed. - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for server creation). - :type administrator_login_password: str - :param version: The version of the server. - :type version: str - :ivar state: The state of the server. - :vartype state: str - :ivar fully_qualified_domain_name: The fully qualified domain name of the - server. - :vartype fully_qualified_domain_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'state': {'readonly': True}, - 'fully_qualified_domain_name': {'readonly': True}, - } - - _attribute_map = { - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ServerUpdate, self).__init__(**kwargs) - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.version = kwargs.get('version', None) - self.state = None - self.fully_qualified_domain_name = None - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update_py3.py deleted file mode 100644 index 863f2b52fa01..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerUpdate(Model): - """An update request for an Azure SQL Database server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param administrator_login: Administrator username for the server. Once - created it cannot be changed. - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for server creation). - :type administrator_login_password: str - :param version: The version of the server. - :type version: str - :ivar state: The state of the server. - :vartype state: str - :ivar fully_qualified_domain_name: The fully qualified domain name of the - server. - :vartype fully_qualified_domain_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'state': {'readonly': True}, - 'fully_qualified_domain_name': {'readonly': True}, - } - - _attribute_map = { - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, administrator_login: str=None, administrator_login_password: str=None, version: str=None, tags=None, **kwargs) -> None: - super(ServerUpdate, self).__init__(**kwargs) - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.version = version - self.state = None - self.fully_qualified_domain_name = None - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage.py deleted file mode 100644 index e04fb8c60a82..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerUsage(Model): - """Represents server metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of the server usage metric. - :vartype name: str - :ivar resource_name: The name of the resource. - :vartype resource_name: str - :ivar display_name: The metric display name. - :vartype display_name: str - :ivar current_value: The current value of the metric. - :vartype current_value: float - :ivar limit: The current limit of the metric. - :vartype limit: float - :ivar unit: The units of the metric. - :vartype unit: str - :ivar next_reset_time: The next reset time for the metric (ISO8601 - format). - :vartype next_reset_time: datetime - """ - - _validation = { - 'name': {'readonly': True}, - 'resource_name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'next_reset_time': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_name': {'key': 'resourceName', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ServerUsage, self).__init__(**kwargs) - self.name = None - self.resource_name = None - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None - self.next_reset_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_paged.py deleted file mode 100644 index 688d3b408383..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerUsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerUsage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerUsage]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerUsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_py3.py deleted file mode 100644 index 3a6feaecdc8d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerUsage(Model): - """Represents server metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of the server usage metric. - :vartype name: str - :ivar resource_name: The name of the resource. - :vartype resource_name: str - :ivar display_name: The metric display name. - :vartype display_name: str - :ivar current_value: The current value of the metric. - :vartype current_value: float - :ivar limit: The current limit of the metric. - :vartype limit: float - :ivar unit: The units of the metric. - :vartype unit: str - :ivar next_reset_time: The next reset time for the metric (ISO8601 - format). - :vartype next_reset_time: datetime - """ - - _validation = { - 'name': {'readonly': True}, - 'resource_name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'next_reset_time': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_name': {'key': 'resourceName', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(ServerUsage, self).__init__(**kwargs) - self.name = None - self.resource_name = None - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None - self.next_reset_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability.py deleted file mode 100644 index 811e93df8aa4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerVersionCapability(Model): - """The server capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The server version name. - :vartype name: str - :ivar supported_editions: The list of supported database editions. - :vartype supported_editions: - list[~azure.mgmt.sql.models.EditionCapability] - :ivar supported_elastic_pool_editions: The list of supported elastic pool - editions. - :vartype supported_elastic_pool_editions: - list[~azure.mgmt.sql.models.ElasticPoolEditionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_editions': {'readonly': True}, - 'supported_elastic_pool_editions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_editions': {'key': 'supportedEditions', 'type': '[EditionCapability]'}, - 'supported_elastic_pool_editions': {'key': 'supportedElasticPoolEditions', 'type': '[ElasticPoolEditionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerVersionCapability, self).__init__(**kwargs) - self.name = None - self.supported_editions = None - self.supported_elastic_pool_editions = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability_py3.py deleted file mode 100644 index 66a1a0251ede..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerVersionCapability(Model): - """The server capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The server version name. - :vartype name: str - :ivar supported_editions: The list of supported database editions. - :vartype supported_editions: - list[~azure.mgmt.sql.models.EditionCapability] - :ivar supported_elastic_pool_editions: The list of supported elastic pool - editions. - :vartype supported_elastic_pool_editions: - list[~azure.mgmt.sql.models.ElasticPoolEditionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_editions': {'readonly': True}, - 'supported_elastic_pool_editions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_editions': {'key': 'supportedEditions', 'type': '[EditionCapability]'}, - 'supported_elastic_pool_editions': {'key': 'supportedElasticPoolEditions', 'type': '[ElasticPoolEditionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ServerVersionCapability, self).__init__(**kwargs) - self.name = None - self.supported_editions = None - self.supported_elastic_pool_editions = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment.py deleted file mode 100644 index eecad7a9b04d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerVulnerabilityAssessment(ProxyResource): - """A server vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: Required. A blob storage container path to - hold the scan results (e.g. - https://myStorage.blob.core.windows.net/VaScans/). - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_container_path': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, **kwargs): - super(ServerVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = kwargs.get('storage_container_path', None) - self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.recurring_scans = kwargs.get('recurring_scans', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_paged.py deleted file mode 100644 index 43c1a3b65779..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerVulnerabilityAssessmentPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerVulnerabilityAssessment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerVulnerabilityAssessment]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_py3.py deleted file mode 100644 index bb42c3866a3f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerVulnerabilityAssessment(ProxyResource): - """A server vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: Required. A blob storage container path to - hold the scan results (e.g. - https://myStorage.blob.core.windows.net/VaScans/). - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_container_path': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, *, storage_container_path: str, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: - super(ServerVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = storage_container_path - self.storage_container_sas_key = storage_container_sas_key - self.storage_account_access_key = storage_account_access_key - self.recurring_scans = recurring_scans diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective.py deleted file mode 100644 index 71133da2f551..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServiceObjective(ProxyResource): - """Represents a database service objective. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar service_objective_name: The name for the service objective. - :vartype service_objective_name: str - :ivar is_default: Gets whether the service level objective is the default - service objective. - :vartype is_default: bool - :ivar is_system: Gets whether the service level objective is a system - service objective. - :vartype is_system: bool - :ivar description: The description for the service level objective. - :vartype description: str - :ivar enabled: Gets whether the service level objective is enabled. - :vartype enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'service_objective_name': {'readonly': True}, - 'is_default': {'readonly': True}, - 'is_system': {'readonly': True}, - 'description': {'readonly': True}, - 'enabled': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'service_objective_name': {'key': 'properties.serviceObjectiveName', 'type': 'str'}, - 'is_default': {'key': 'properties.isDefault', 'type': 'bool'}, - 'is_system': {'key': 'properties.isSystem', 'type': 'bool'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ServiceObjective, self).__init__(**kwargs) - self.service_objective_name = None - self.is_default = None - self.is_system = None - self.description = None - self.enabled = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability.py deleted file mode 100644 index 1e6c2158be9a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceObjectiveCapability(Model): - """The service objectives capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique ID of the service objective. - :vartype id: str - :ivar name: The service objective name. - :vartype name: str - :ivar supported_max_sizes: The list of supported maximum database sizes. - :vartype supported_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar performance_level: The performance level. - :vartype performance_level: - ~azure.mgmt.sql.models.PerformanceLevelCapability - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.sql.models.Sku - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar included_max_size: The included (free) max size. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'supported_max_sizes': {'readonly': True}, - 'performance_level': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceObjectiveCapability, self).__init__(**kwargs) - self.id = None - self.name = None - self.supported_max_sizes = None - self.performance_level = None - self.sku = None - self.supported_license_types = None - self.included_max_size = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability_py3.py deleted file mode 100644 index f777ffd74f97..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceObjectiveCapability(Model): - """The service objectives capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique ID of the service objective. - :vartype id: str - :ivar name: The service objective name. - :vartype name: str - :ivar supported_max_sizes: The list of supported maximum database sizes. - :vartype supported_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar performance_level: The performance level. - :vartype performance_level: - ~azure.mgmt.sql.models.PerformanceLevelCapability - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.sql.models.Sku - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar included_max_size: The included (free) max size. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'supported_max_sizes': {'readonly': True}, - 'performance_level': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ServiceObjectiveCapability, self).__init__(**kwargs) - self.id = None - self.name = None - self.supported_max_sizes = None - self.performance_level = None - self.sku = None - self.supported_license_types = None - self.included_max_size = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_paged.py deleted file mode 100644 index 7afe16629d1d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServiceObjectivePaged(Paged): - """ - A paging container for iterating over a list of :class:`ServiceObjective ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServiceObjective]'} - } - - def __init__(self, *args, **kwargs): - - super(ServiceObjectivePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_py3.py deleted file mode 100644 index 2fc00134e6ec..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServiceObjective(ProxyResource): - """Represents a database service objective. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar service_objective_name: The name for the service objective. - :vartype service_objective_name: str - :ivar is_default: Gets whether the service level objective is the default - service objective. - :vartype is_default: bool - :ivar is_system: Gets whether the service level objective is a system - service objective. - :vartype is_system: bool - :ivar description: The description for the service level objective. - :vartype description: str - :ivar enabled: Gets whether the service level objective is enabled. - :vartype enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'service_objective_name': {'readonly': True}, - 'is_default': {'readonly': True}, - 'is_system': {'readonly': True}, - 'description': {'readonly': True}, - 'enabled': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'service_objective_name': {'key': 'properties.serviceObjectiveName', 'type': 'str'}, - 'is_default': {'key': 'properties.isDefault', 'type': 'bool'}, - 'is_system': {'key': 'properties.isSystem', 'type': 'bool'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs) -> None: - super(ServiceObjective, self).__init__(**kwargs) - self.service_objective_name = None - self.is_default = None - self.is_system = None - self.description = None - self.enabled = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor.py deleted file mode 100644 index cb8974906ee6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServiceTierAdvisor(ProxyResource): - """Represents a Service Tier Advisor. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar observation_period_start: The observation period start (ISO8601 - format). - :vartype observation_period_start: datetime - :ivar observation_period_end: The observation period start (ISO8601 - format). - :vartype observation_period_end: datetime - :ivar active_time_ratio: The activeTimeRatio for service tier advisor. - :vartype active_time_ratio: float - :ivar min_dtu: Gets or sets minDtu for service tier advisor. - :vartype min_dtu: float - :ivar avg_dtu: Gets or sets avgDtu for service tier advisor. - :vartype avg_dtu: float - :ivar max_dtu: Gets or sets maxDtu for service tier advisor. - :vartype max_dtu: float - :ivar max_size_in_gb: Gets or sets maxSizeInGB for service tier advisor. - :vartype max_size_in_gb: float - :ivar service_level_objective_usage_metrics: Gets or sets - serviceLevelObjectiveUsageMetrics for the service tier advisor. - :vartype service_level_objective_usage_metrics: - list[~azure.mgmt.sql.models.SloUsageMetric] - :ivar current_service_level_objective: Gets or sets - currentServiceLevelObjective for service tier advisor. - :vartype current_service_level_objective: str - :ivar current_service_level_objective_id: Gets or sets - currentServiceLevelObjectiveId for service tier advisor. - :vartype current_service_level_objective_id: str - :ivar usage_based_recommendation_service_level_objective: Gets or sets - usageBasedRecommendationServiceLevelObjective for service tier advisor. - :vartype usage_based_recommendation_service_level_objective: str - :ivar usage_based_recommendation_service_level_objective_id: Gets or sets - usageBasedRecommendationServiceLevelObjectiveId for service tier advisor. - :vartype usage_based_recommendation_service_level_objective_id: str - :ivar database_size_based_recommendation_service_level_objective: Gets or - sets databaseSizeBasedRecommendationServiceLevelObjective for service tier - advisor. - :vartype database_size_based_recommendation_service_level_objective: str - :ivar database_size_based_recommendation_service_level_objective_id: Gets - or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service - tier advisor. - :vartype database_size_based_recommendation_service_level_objective_id: - str - :ivar disaster_plan_based_recommendation_service_level_objective: Gets or - sets disasterPlanBasedRecommendationServiceLevelObjective for service tier - advisor. - :vartype disaster_plan_based_recommendation_service_level_objective: str - :ivar disaster_plan_based_recommendation_service_level_objective_id: Gets - or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service - tier advisor. - :vartype disaster_plan_based_recommendation_service_level_objective_id: - str - :ivar overall_recommendation_service_level_objective: Gets or sets - overallRecommendationServiceLevelObjective for service tier advisor. - :vartype overall_recommendation_service_level_objective: str - :ivar overall_recommendation_service_level_objective_id: Gets or sets - overallRecommendationServiceLevelObjectiveId for service tier advisor. - :vartype overall_recommendation_service_level_objective_id: str - :ivar confidence: Gets or sets confidence for service tier advisor. - :vartype confidence: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'observation_period_start': {'readonly': True}, - 'observation_period_end': {'readonly': True}, - 'active_time_ratio': {'readonly': True}, - 'min_dtu': {'readonly': True}, - 'avg_dtu': {'readonly': True}, - 'max_dtu': {'readonly': True}, - 'max_size_in_gb': {'readonly': True}, - 'service_level_objective_usage_metrics': {'readonly': True}, - 'current_service_level_objective': {'readonly': True}, - 'current_service_level_objective_id': {'readonly': True}, - 'usage_based_recommendation_service_level_objective': {'readonly': True}, - 'usage_based_recommendation_service_level_objective_id': {'readonly': True}, - 'database_size_based_recommendation_service_level_objective': {'readonly': True}, - 'database_size_based_recommendation_service_level_objective_id': {'readonly': True}, - 'disaster_plan_based_recommendation_service_level_objective': {'readonly': True}, - 'disaster_plan_based_recommendation_service_level_objective_id': {'readonly': True}, - 'overall_recommendation_service_level_objective': {'readonly': True}, - 'overall_recommendation_service_level_objective_id': {'readonly': True}, - 'confidence': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, - 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, - 'active_time_ratio': {'key': 'properties.activeTimeRatio', 'type': 'float'}, - 'min_dtu': {'key': 'properties.minDtu', 'type': 'float'}, - 'avg_dtu': {'key': 'properties.avgDtu', 'type': 'float'}, - 'max_dtu': {'key': 'properties.maxDtu', 'type': 'float'}, - 'max_size_in_gb': {'key': 'properties.maxSizeInGB', 'type': 'float'}, - 'service_level_objective_usage_metrics': {'key': 'properties.serviceLevelObjectiveUsageMetrics', 'type': '[SloUsageMetric]'}, - 'current_service_level_objective': {'key': 'properties.currentServiceLevelObjective', 'type': 'str'}, - 'current_service_level_objective_id': {'key': 'properties.currentServiceLevelObjectiveId', 'type': 'str'}, - 'usage_based_recommendation_service_level_objective': {'key': 'properties.usageBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'usage_based_recommendation_service_level_objective_id': {'key': 'properties.usageBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'database_size_based_recommendation_service_level_objective': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'database_size_based_recommendation_service_level_objective_id': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'disaster_plan_based_recommendation_service_level_objective': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'disaster_plan_based_recommendation_service_level_objective_id': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'overall_recommendation_service_level_objective': {'key': 'properties.overallRecommendationServiceLevelObjective', 'type': 'str'}, - 'overall_recommendation_service_level_objective_id': {'key': 'properties.overallRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'confidence': {'key': 'properties.confidence', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ServiceTierAdvisor, self).__init__(**kwargs) - self.observation_period_start = None - self.observation_period_end = None - self.active_time_ratio = None - self.min_dtu = None - self.avg_dtu = None - self.max_dtu = None - self.max_size_in_gb = None - self.service_level_objective_usage_metrics = None - self.current_service_level_objective = None - self.current_service_level_objective_id = None - self.usage_based_recommendation_service_level_objective = None - self.usage_based_recommendation_service_level_objective_id = None - self.database_size_based_recommendation_service_level_objective = None - self.database_size_based_recommendation_service_level_objective_id = None - self.disaster_plan_based_recommendation_service_level_objective = None - self.disaster_plan_based_recommendation_service_level_objective_id = None - self.overall_recommendation_service_level_objective = None - self.overall_recommendation_service_level_objective_id = None - self.confidence = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_paged.py deleted file mode 100644 index 8275906eb639..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServiceTierAdvisorPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServiceTierAdvisor ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServiceTierAdvisor]'} - } - - def __init__(self, *args, **kwargs): - - super(ServiceTierAdvisorPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_py3.py deleted file mode 100644 index 04f5dceca1c0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_py3.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServiceTierAdvisor(ProxyResource): - """Represents a Service Tier Advisor. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar observation_period_start: The observation period start (ISO8601 - format). - :vartype observation_period_start: datetime - :ivar observation_period_end: The observation period start (ISO8601 - format). - :vartype observation_period_end: datetime - :ivar active_time_ratio: The activeTimeRatio for service tier advisor. - :vartype active_time_ratio: float - :ivar min_dtu: Gets or sets minDtu for service tier advisor. - :vartype min_dtu: float - :ivar avg_dtu: Gets or sets avgDtu for service tier advisor. - :vartype avg_dtu: float - :ivar max_dtu: Gets or sets maxDtu for service tier advisor. - :vartype max_dtu: float - :ivar max_size_in_gb: Gets or sets maxSizeInGB for service tier advisor. - :vartype max_size_in_gb: float - :ivar service_level_objective_usage_metrics: Gets or sets - serviceLevelObjectiveUsageMetrics for the service tier advisor. - :vartype service_level_objective_usage_metrics: - list[~azure.mgmt.sql.models.SloUsageMetric] - :ivar current_service_level_objective: Gets or sets - currentServiceLevelObjective for service tier advisor. - :vartype current_service_level_objective: str - :ivar current_service_level_objective_id: Gets or sets - currentServiceLevelObjectiveId for service tier advisor. - :vartype current_service_level_objective_id: str - :ivar usage_based_recommendation_service_level_objective: Gets or sets - usageBasedRecommendationServiceLevelObjective for service tier advisor. - :vartype usage_based_recommendation_service_level_objective: str - :ivar usage_based_recommendation_service_level_objective_id: Gets or sets - usageBasedRecommendationServiceLevelObjectiveId for service tier advisor. - :vartype usage_based_recommendation_service_level_objective_id: str - :ivar database_size_based_recommendation_service_level_objective: Gets or - sets databaseSizeBasedRecommendationServiceLevelObjective for service tier - advisor. - :vartype database_size_based_recommendation_service_level_objective: str - :ivar database_size_based_recommendation_service_level_objective_id: Gets - or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service - tier advisor. - :vartype database_size_based_recommendation_service_level_objective_id: - str - :ivar disaster_plan_based_recommendation_service_level_objective: Gets or - sets disasterPlanBasedRecommendationServiceLevelObjective for service tier - advisor. - :vartype disaster_plan_based_recommendation_service_level_objective: str - :ivar disaster_plan_based_recommendation_service_level_objective_id: Gets - or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service - tier advisor. - :vartype disaster_plan_based_recommendation_service_level_objective_id: - str - :ivar overall_recommendation_service_level_objective: Gets or sets - overallRecommendationServiceLevelObjective for service tier advisor. - :vartype overall_recommendation_service_level_objective: str - :ivar overall_recommendation_service_level_objective_id: Gets or sets - overallRecommendationServiceLevelObjectiveId for service tier advisor. - :vartype overall_recommendation_service_level_objective_id: str - :ivar confidence: Gets or sets confidence for service tier advisor. - :vartype confidence: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'observation_period_start': {'readonly': True}, - 'observation_period_end': {'readonly': True}, - 'active_time_ratio': {'readonly': True}, - 'min_dtu': {'readonly': True}, - 'avg_dtu': {'readonly': True}, - 'max_dtu': {'readonly': True}, - 'max_size_in_gb': {'readonly': True}, - 'service_level_objective_usage_metrics': {'readonly': True}, - 'current_service_level_objective': {'readonly': True}, - 'current_service_level_objective_id': {'readonly': True}, - 'usage_based_recommendation_service_level_objective': {'readonly': True}, - 'usage_based_recommendation_service_level_objective_id': {'readonly': True}, - 'database_size_based_recommendation_service_level_objective': {'readonly': True}, - 'database_size_based_recommendation_service_level_objective_id': {'readonly': True}, - 'disaster_plan_based_recommendation_service_level_objective': {'readonly': True}, - 'disaster_plan_based_recommendation_service_level_objective_id': {'readonly': True}, - 'overall_recommendation_service_level_objective': {'readonly': True}, - 'overall_recommendation_service_level_objective_id': {'readonly': True}, - 'confidence': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, - 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, - 'active_time_ratio': {'key': 'properties.activeTimeRatio', 'type': 'float'}, - 'min_dtu': {'key': 'properties.minDtu', 'type': 'float'}, - 'avg_dtu': {'key': 'properties.avgDtu', 'type': 'float'}, - 'max_dtu': {'key': 'properties.maxDtu', 'type': 'float'}, - 'max_size_in_gb': {'key': 'properties.maxSizeInGB', 'type': 'float'}, - 'service_level_objective_usage_metrics': {'key': 'properties.serviceLevelObjectiveUsageMetrics', 'type': '[SloUsageMetric]'}, - 'current_service_level_objective': {'key': 'properties.currentServiceLevelObjective', 'type': 'str'}, - 'current_service_level_objective_id': {'key': 'properties.currentServiceLevelObjectiveId', 'type': 'str'}, - 'usage_based_recommendation_service_level_objective': {'key': 'properties.usageBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'usage_based_recommendation_service_level_objective_id': {'key': 'properties.usageBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'database_size_based_recommendation_service_level_objective': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'database_size_based_recommendation_service_level_objective_id': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'disaster_plan_based_recommendation_service_level_objective': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'disaster_plan_based_recommendation_service_level_objective_id': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'overall_recommendation_service_level_objective': {'key': 'properties.overallRecommendationServiceLevelObjective', 'type': 'str'}, - 'overall_recommendation_service_level_objective_id': {'key': 'properties.overallRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'confidence': {'key': 'properties.confidence', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(ServiceTierAdvisor, self).__init__(**kwargs) - self.observation_period_start = None - self.observation_period_end = None - self.active_time_ratio = None - self.min_dtu = None - self.avg_dtu = None - self.max_dtu = None - self.max_size_in_gb = None - self.service_level_objective_usage_metrics = None - self.current_service_level_objective = None - self.current_service_level_objective_id = None - self.usage_based_recommendation_service_level_objective = None - self.usage_based_recommendation_service_level_objective_id = None - self.database_size_based_recommendation_service_level_objective = None - self.database_size_based_recommendation_service_level_objective_id = None - self.disaster_plan_based_recommendation_service_level_objective = None - self.disaster_plan_based_recommendation_service_level_objective_id = None - self.overall_recommendation_service_level_objective = None - self.overall_recommendation_service_level_objective_id = None - self.confidence = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku.py deleted file mode 100644 index e37091dc4e2f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """The resource model definition representing SKU. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU. Ex - P3. It is typically a - letter+number code - :type name: str - :param tier: This field is required to be implemented by the Resource - Provider if the service has more than one tier, but is not required on a - PUT. - :type tier: str - :param size: The SKU size. When the name field is the combination of tier - and some other value, this would be the standalone code. - :type size: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :param capacity: If the SKU supports scale out/in then the capacity - integer should be included. If scale out/in is not possible for the - resource this may be omitted. - :type capacity: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.size = kwargs.get('size', None) - self.family = kwargs.get('family', None) - self.capacity = kwargs.get('capacity', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku_py3.py deleted file mode 100644 index a6f04765e87c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """The resource model definition representing SKU. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU. Ex - P3. It is typically a - letter+number code - :type name: str - :param tier: This field is required to be implemented by the Resource - Provider if the service has more than one tier, but is not required on a - PUT. - :type tier: str - :param size: The SKU size. When the name field is the combination of tier - and some other value, this would be the standalone code. - :type size: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :param capacity: If the SKU supports scale out/in then the capacity - integer should be included. If scale out/in is not possible for the - resource this may be omitted. - :type capacity: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__(self, *, name: str, tier: str=None, size: str=None, family: str=None, capacity: int=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.size = size - self.family = family - self.capacity = capacity diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric.py deleted file mode 100644 index 262017a0b87c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SloUsageMetric(Model): - """A Slo Usage Metric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar service_level_objective: The serviceLevelObjective for SLO usage - metric. Possible values include: 'System', 'System0', 'System1', - 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', - 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', - 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', - 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', - 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', - 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', - 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', - 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - :vartype service_level_objective: str or - ~azure.mgmt.sql.models.ServiceObjectiveName - :ivar service_level_objective_id: The serviceLevelObjectiveId for SLO - usage metric. - :vartype service_level_objective_id: str - :ivar in_range_time_ratio: Gets or sets inRangeTimeRatio for SLO usage - metric. - :vartype in_range_time_ratio: float - """ - - _validation = { - 'service_level_objective': {'readonly': True}, - 'service_level_objective_id': {'readonly': True}, - 'in_range_time_ratio': {'readonly': True}, - } - - _attribute_map = { - 'service_level_objective': {'key': 'serviceLevelObjective', 'type': 'str'}, - 'service_level_objective_id': {'key': 'serviceLevelObjectiveId', 'type': 'str'}, - 'in_range_time_ratio': {'key': 'inRangeTimeRatio', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(SloUsageMetric, self).__init__(**kwargs) - self.service_level_objective = None - self.service_level_objective_id = None - self.in_range_time_ratio = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric_py3.py deleted file mode 100644 index 6b221a8eb36f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SloUsageMetric(Model): - """A Slo Usage Metric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar service_level_objective: The serviceLevelObjective for SLO usage - metric. Possible values include: 'System', 'System0', 'System1', - 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', - 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', - 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', - 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', - 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', - 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', - 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', - 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - :vartype service_level_objective: str or - ~azure.mgmt.sql.models.ServiceObjectiveName - :ivar service_level_objective_id: The serviceLevelObjectiveId for SLO - usage metric. - :vartype service_level_objective_id: str - :ivar in_range_time_ratio: Gets or sets inRangeTimeRatio for SLO usage - metric. - :vartype in_range_time_ratio: float - """ - - _validation = { - 'service_level_objective': {'readonly': True}, - 'service_level_objective_id': {'readonly': True}, - 'in_range_time_ratio': {'readonly': True}, - } - - _attribute_map = { - 'service_level_objective': {'key': 'serviceLevelObjective', 'type': 'str'}, - 'service_level_objective_id': {'key': 'serviceLevelObjectiveId', 'type': 'str'}, - 'in_range_time_ratio': {'key': 'inRangeTimeRatio', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(SloUsageMetric, self).__init__(**kwargs) - self.service_level_objective = None - self.service_level_objective_id = None - self.in_range_time_ratio = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage.py deleted file mode 100644 index 5fe0b0fe90a0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SubscriptionUsage(ProxyResource): - """Usage Metric of a Subscription in a Location. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar display_name: User-readable name of the metric. - :vartype display_name: str - :ivar current_value: Current value of the metric. - :vartype current_value: float - :ivar limit: Boundary value of the metric. - :vartype limit: float - :ivar unit: Unit of the metric. - :vartype unit: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'current_value': {'key': 'properties.currentValue', 'type': 'float'}, - 'limit': {'key': 'properties.limit', 'type': 'float'}, - 'unit': {'key': 'properties.unit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubscriptionUsage, self).__init__(**kwargs) - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_paged.py deleted file mode 100644 index 14875f12bfe6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SubscriptionUsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`SubscriptionUsage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SubscriptionUsage]'} - } - - def __init__(self, *args, **kwargs): - - super(SubscriptionUsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_py3.py deleted file mode 100644 index d55e3275a74b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SubscriptionUsage(ProxyResource): - """Usage Metric of a Subscription in a Location. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar display_name: User-readable name of the metric. - :vartype display_name: str - :ivar current_value: Current value of the metric. - :vartype current_value: float - :ivar limit: Boundary value of the metric. - :vartype limit: float - :ivar unit: Unit of the metric. - :vartype unit: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'current_value': {'key': 'properties.currentValue', 'type': 'float'}, - 'limit': {'key': 'properties.limit', 'type': 'float'}, - 'unit': {'key': 'properties.unit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubscriptionUsage, self).__init__(**kwargs) - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent.py deleted file mode 100644 index c617de5bdf26..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SyncAgent(ProxyResource): - """An Azure SQL Database sync agent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar sync_agent_name: Name of the sync agent. - :vartype sync_agent_name: str - :param sync_database_id: ARM resource id of the sync database in the sync - agent. - :type sync_database_id: str - :ivar last_alive_time: Last alive time of the sync agent. - :vartype last_alive_time: datetime - :ivar state: State of the sync agent. Possible values include: 'Online', - 'Offline', 'NeverConnected' - :vartype state: str or ~azure.mgmt.sql.models.SyncAgentState - :ivar is_up_to_date: If the sync agent version is up to date. - :vartype is_up_to_date: bool - :ivar expiry_time: Expiration time of the sync agent version. - :vartype expiry_time: datetime - :ivar version: Version of the sync agent. - :vartype version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sync_agent_name': {'readonly': True}, - 'last_alive_time': {'readonly': True}, - 'state': {'readonly': True}, - 'is_up_to_date': {'readonly': True}, - 'expiry_time': {'readonly': True}, - 'version': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'sync_agent_name': {'key': 'properties.name', 'type': 'str'}, - 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, - 'last_alive_time': {'key': 'properties.lastAliveTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'is_up_to_date': {'key': 'properties.isUpToDate', 'type': 'bool'}, - 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncAgent, self).__init__(**kwargs) - self.sync_agent_name = None - self.sync_database_id = kwargs.get('sync_database_id', None) - self.last_alive_time = None - self.state = None - self.is_up_to_date = None - self.expiry_time = None - self.version = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties.py deleted file mode 100644 index da65194bc61a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncAgentKeyProperties(Model): - """Properties of an Azure SQL Database sync agent key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar sync_agent_key: Key of sync agent. - :vartype sync_agent_key: str - """ - - _validation = { - 'sync_agent_key': {'readonly': True}, - } - - _attribute_map = { - 'sync_agent_key': {'key': 'syncAgentKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncAgentKeyProperties, self).__init__(**kwargs) - self.sync_agent_key = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties_py3.py deleted file mode 100644 index 4230f4d95712..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncAgentKeyProperties(Model): - """Properties of an Azure SQL Database sync agent key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar sync_agent_key: Key of sync agent. - :vartype sync_agent_key: str - """ - - _validation = { - 'sync_agent_key': {'readonly': True}, - } - - _attribute_map = { - 'sync_agent_key': {'key': 'syncAgentKey', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncAgentKeyProperties, self).__init__(**kwargs) - self.sync_agent_key = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database.py deleted file mode 100644 index 597c51388f47..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SyncAgentLinkedDatabase(ProxyResource): - """An Azure SQL Database sync agent linked database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_type: Type of the sync agent linked database. Possible - values include: 'AzureSqlDatabase', 'SqlServerDatabase' - :vartype database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType - :ivar database_id: Id of the sync agent linked database. - :vartype database_id: str - :ivar description: Description of the sync agent linked database. - :vartype description: str - :ivar server_name: Server name of the sync agent linked database. - :vartype server_name: str - :ivar database_name: Database name of the sync agent linked database. - :vartype database_name: str - :ivar user_name: User name of the sync agent linked database. - :vartype user_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_type': {'readonly': True}, - 'database_id': {'readonly': True}, - 'description': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - 'user_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncAgentLinkedDatabase, self).__init__(**kwargs) - self.database_type = None - self.database_id = None - self.description = None - self.server_name = None - self.database_name = None - self.user_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_paged.py deleted file mode 100644 index 6c0fad6ae749..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncAgentLinkedDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncAgentLinkedDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncAgentLinkedDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncAgentLinkedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_py3.py deleted file mode 100644 index 7d92287e1a37..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SyncAgentLinkedDatabase(ProxyResource): - """An Azure SQL Database sync agent linked database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_type: Type of the sync agent linked database. Possible - values include: 'AzureSqlDatabase', 'SqlServerDatabase' - :vartype database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType - :ivar database_id: Id of the sync agent linked database. - :vartype database_id: str - :ivar description: Description of the sync agent linked database. - :vartype description: str - :ivar server_name: Server name of the sync agent linked database. - :vartype server_name: str - :ivar database_name: Database name of the sync agent linked database. - :vartype database_name: str - :ivar user_name: User name of the sync agent linked database. - :vartype user_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_type': {'readonly': True}, - 'database_id': {'readonly': True}, - 'description': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - 'user_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncAgentLinkedDatabase, self).__init__(**kwargs) - self.database_type = None - self.database_id = None - self.description = None - self.server_name = None - self.database_name = None - self.user_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_paged.py deleted file mode 100644 index 116fc542dbbd..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncAgentPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncAgent ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncAgent]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncAgentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_py3.py deleted file mode 100644 index f07649750457..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SyncAgent(ProxyResource): - """An Azure SQL Database sync agent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar sync_agent_name: Name of the sync agent. - :vartype sync_agent_name: str - :param sync_database_id: ARM resource id of the sync database in the sync - agent. - :type sync_database_id: str - :ivar last_alive_time: Last alive time of the sync agent. - :vartype last_alive_time: datetime - :ivar state: State of the sync agent. Possible values include: 'Online', - 'Offline', 'NeverConnected' - :vartype state: str or ~azure.mgmt.sql.models.SyncAgentState - :ivar is_up_to_date: If the sync agent version is up to date. - :vartype is_up_to_date: bool - :ivar expiry_time: Expiration time of the sync agent version. - :vartype expiry_time: datetime - :ivar version: Version of the sync agent. - :vartype version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sync_agent_name': {'readonly': True}, - 'last_alive_time': {'readonly': True}, - 'state': {'readonly': True}, - 'is_up_to_date': {'readonly': True}, - 'expiry_time': {'readonly': True}, - 'version': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'sync_agent_name': {'key': 'properties.name', 'type': 'str'}, - 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, - 'last_alive_time': {'key': 'properties.lastAliveTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'is_up_to_date': {'key': 'properties.isUpToDate', 'type': 'bool'}, - 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - } - - def __init__(self, *, sync_database_id: str=None, **kwargs) -> None: - super(SyncAgent, self).__init__(**kwargs) - self.sync_agent_name = None - self.sync_database_id = sync_database_id - self.last_alive_time = None - self.state = None - self.is_up_to_date = None - self.expiry_time = None - self.version = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties.py deleted file mode 100644 index 6dd5a323fd61..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncDatabaseIdProperties(Model): - """Properties of the sync database id. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: ARM resource id of sync database. - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncDatabaseIdProperties, self).__init__(**kwargs) - self.id = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_paged.py deleted file mode 100644 index 2f70734f930a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncDatabaseIdPropertiesPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncDatabaseIdProperties ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncDatabaseIdProperties]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncDatabaseIdPropertiesPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_py3.py deleted file mode 100644 index cdb7ce89c435..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncDatabaseIdProperties(Model): - """Properties of the sync database id. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: ARM resource id of sync database. - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncDatabaseIdProperties, self).__init__(**kwargs) - self.id = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties.py deleted file mode 100644 index 984d4c7a5d56..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaProperties(Model): - """Properties of the database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar tables: List of tables in the database full schema. - :vartype tables: list[~azure.mgmt.sql.models.SyncFullSchemaTable] - :ivar last_update_time: Last update time of the database schema. - :vartype last_update_time: datetime - """ - - _validation = { - 'tables': {'readonly': True}, - 'last_update_time': {'readonly': True}, - } - - _attribute_map = { - 'tables': {'key': 'tables', 'type': '[SyncFullSchemaTable]'}, - 'last_update_time': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(SyncFullSchemaProperties, self).__init__(**kwargs) - self.tables = None - self.last_update_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_paged.py deleted file mode 100644 index 20c3b2df16d4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncFullSchemaPropertiesPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncFullSchemaProperties ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncFullSchemaProperties]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncFullSchemaPropertiesPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_py3.py deleted file mode 100644 index b3d4a75c65bf..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaProperties(Model): - """Properties of the database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar tables: List of tables in the database full schema. - :vartype tables: list[~azure.mgmt.sql.models.SyncFullSchemaTable] - :ivar last_update_time: Last update time of the database schema. - :vartype last_update_time: datetime - """ - - _validation = { - 'tables': {'readonly': True}, - 'last_update_time': {'readonly': True}, - } - - _attribute_map = { - 'tables': {'key': 'tables', 'type': '[SyncFullSchemaTable]'}, - 'last_update_time': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncFullSchemaProperties, self).__init__(**kwargs) - self.tables = None - self.last_update_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table.py deleted file mode 100644 index dcec31c48f1c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaTable(Model): - """Properties of the table in the database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar columns: List of columns in the table of database full schema. - :vartype columns: list[~azure.mgmt.sql.models.SyncFullSchemaTableColumn] - :ivar error_id: Error id of the table. - :vartype error_id: str - :ivar has_error: If there is error in the table. - :vartype has_error: bool - :ivar name: Name of the table. - :vartype name: str - :ivar quoted_name: Quoted name of the table. - :vartype quoted_name: str - """ - - _validation = { - 'columns': {'readonly': True}, - 'error_id': {'readonly': True}, - 'has_error': {'readonly': True}, - 'name': {'readonly': True}, - 'quoted_name': {'readonly': True}, - } - - _attribute_map = { - 'columns': {'key': 'columns', 'type': '[SyncFullSchemaTableColumn]'}, - 'error_id': {'key': 'errorId', 'type': 'str'}, - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncFullSchemaTable, self).__init__(**kwargs) - self.columns = None - self.error_id = None - self.has_error = None - self.name = None - self.quoted_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column.py deleted file mode 100644 index 8eaa3659873b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaTableColumn(Model): - """Properties of the column in the table of database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar data_size: Data size of the column. - :vartype data_size: str - :ivar data_type: Data type of the column. - :vartype data_type: str - :ivar error_id: Error id of the column. - :vartype error_id: str - :ivar has_error: If there is error in the table. - :vartype has_error: bool - :ivar is_primary_key: If it is the primary key of the table. - :vartype is_primary_key: bool - :ivar name: Name of the column. - :vartype name: str - :ivar quoted_name: Quoted name of the column. - :vartype quoted_name: str - """ - - _validation = { - 'data_size': {'readonly': True}, - 'data_type': {'readonly': True}, - 'error_id': {'readonly': True}, - 'has_error': {'readonly': True}, - 'is_primary_key': {'readonly': True}, - 'name': {'readonly': True}, - 'quoted_name': {'readonly': True}, - } - - _attribute_map = { - 'data_size': {'key': 'dataSize', 'type': 'str'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'error_id': {'key': 'errorId', 'type': 'str'}, - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'is_primary_key': {'key': 'isPrimaryKey', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncFullSchemaTableColumn, self).__init__(**kwargs) - self.data_size = None - self.data_type = None - self.error_id = None - self.has_error = None - self.is_primary_key = None - self.name = None - self.quoted_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column_py3.py deleted file mode 100644 index 33df54b37b59..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaTableColumn(Model): - """Properties of the column in the table of database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar data_size: Data size of the column. - :vartype data_size: str - :ivar data_type: Data type of the column. - :vartype data_type: str - :ivar error_id: Error id of the column. - :vartype error_id: str - :ivar has_error: If there is error in the table. - :vartype has_error: bool - :ivar is_primary_key: If it is the primary key of the table. - :vartype is_primary_key: bool - :ivar name: Name of the column. - :vartype name: str - :ivar quoted_name: Quoted name of the column. - :vartype quoted_name: str - """ - - _validation = { - 'data_size': {'readonly': True}, - 'data_type': {'readonly': True}, - 'error_id': {'readonly': True}, - 'has_error': {'readonly': True}, - 'is_primary_key': {'readonly': True}, - 'name': {'readonly': True}, - 'quoted_name': {'readonly': True}, - } - - _attribute_map = { - 'data_size': {'key': 'dataSize', 'type': 'str'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'error_id': {'key': 'errorId', 'type': 'str'}, - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'is_primary_key': {'key': 'isPrimaryKey', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncFullSchemaTableColumn, self).__init__(**kwargs) - self.data_size = None - self.data_type = None - self.error_id = None - self.has_error = None - self.is_primary_key = None - self.name = None - self.quoted_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_py3.py deleted file mode 100644 index 194f50826875..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaTable(Model): - """Properties of the table in the database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar columns: List of columns in the table of database full schema. - :vartype columns: list[~azure.mgmt.sql.models.SyncFullSchemaTableColumn] - :ivar error_id: Error id of the table. - :vartype error_id: str - :ivar has_error: If there is error in the table. - :vartype has_error: bool - :ivar name: Name of the table. - :vartype name: str - :ivar quoted_name: Quoted name of the table. - :vartype quoted_name: str - """ - - _validation = { - 'columns': {'readonly': True}, - 'error_id': {'readonly': True}, - 'has_error': {'readonly': True}, - 'name': {'readonly': True}, - 'quoted_name': {'readonly': True}, - } - - _attribute_map = { - 'columns': {'key': 'columns', 'type': '[SyncFullSchemaTableColumn]'}, - 'error_id': {'key': 'errorId', 'type': 'str'}, - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncFullSchemaTable, self).__init__(**kwargs) - self.columns = None - self.error_id = None - self.has_error = None - self.name = None - self.quoted_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group.py deleted file mode 100644 index 5a252358a340..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SyncGroup(ProxyResource): - """An Azure SQL Database sync group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param interval: Sync interval of the sync group. - :type interval: int - :ivar last_sync_time: Last sync time of the sync group. - :vartype last_sync_time: datetime - :param conflict_resolution_policy: Conflict resolution policy of the sync - group. Possible values include: 'HubWin', 'MemberWin' - :type conflict_resolution_policy: str or - ~azure.mgmt.sql.models.SyncConflictResolutionPolicy - :param sync_database_id: ARM resource id of the sync database in the sync - group. - :type sync_database_id: str - :param hub_database_user_name: User name for the sync group hub database - credential. - :type hub_database_user_name: str - :param hub_database_password: Password for the sync group hub database - credential. - :type hub_database_password: str - :ivar sync_state: Sync state of the sync group. Possible values include: - 'NotReady', 'Error', 'Warning', 'Progressing', 'Good' - :vartype sync_state: str or ~azure.mgmt.sql.models.SyncGroupState - :param schema: Sync schema of the sync group. - :type schema: ~azure.mgmt.sql.models.SyncGroupSchema - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'last_sync_time': {'readonly': True}, - 'sync_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'interval': {'key': 'properties.interval', 'type': 'int'}, - 'last_sync_time': {'key': 'properties.lastSyncTime', 'type': 'iso-8601'}, - 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'str'}, - 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, - 'hub_database_user_name': {'key': 'properties.hubDatabaseUserName', 'type': 'str'}, - 'hub_database_password': {'key': 'properties.hubDatabasePassword', 'type': 'str'}, - 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, - 'schema': {'key': 'properties.schema', 'type': 'SyncGroupSchema'}, - } - - def __init__(self, **kwargs): - super(SyncGroup, self).__init__(**kwargs) - self.interval = kwargs.get('interval', None) - self.last_sync_time = None - self.conflict_resolution_policy = kwargs.get('conflict_resolution_policy', None) - self.sync_database_id = kwargs.get('sync_database_id', None) - self.hub_database_user_name = kwargs.get('hub_database_user_name', None) - self.hub_database_password = kwargs.get('hub_database_password', None) - self.sync_state = None - self.schema = kwargs.get('schema', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties.py deleted file mode 100644 index 22cb584b67be..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupLogProperties(Model): - """Properties of an Azure SQL Database sync group log. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar timestamp: Timestamp of the sync group log. - :vartype timestamp: datetime - :ivar type: Type of the sync group log. Possible values include: 'All', - 'Error', 'Warning', 'Success' - :vartype type: str or ~azure.mgmt.sql.models.SyncGroupLogType - :ivar source: Source of the sync group log. - :vartype source: str - :ivar details: Details of the sync group log. - :vartype details: str - :ivar tracing_id: TracingId of the sync group log. - :vartype tracing_id: str - :ivar operation_status: OperationStatus of the sync group log. - :vartype operation_status: str - """ - - _validation = { - 'timestamp': {'readonly': True}, - 'type': {'readonly': True}, - 'source': {'readonly': True}, - 'details': {'readonly': True}, - 'tracing_id': {'readonly': True}, - 'operation_status': {'readonly': True}, - } - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'str'}, - 'tracing_id': {'key': 'tracingId', 'type': 'str'}, - 'operation_status': {'key': 'operationStatus', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncGroupLogProperties, self).__init__(**kwargs) - self.timestamp = None - self.type = None - self.source = None - self.details = None - self.tracing_id = None - self.operation_status = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_paged.py deleted file mode 100644 index bc7e0c3e7750..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncGroupLogPropertiesPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncGroupLogProperties ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncGroupLogProperties]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncGroupLogPropertiesPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_py3.py deleted file mode 100644 index 067424b40232..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupLogProperties(Model): - """Properties of an Azure SQL Database sync group log. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar timestamp: Timestamp of the sync group log. - :vartype timestamp: datetime - :ivar type: Type of the sync group log. Possible values include: 'All', - 'Error', 'Warning', 'Success' - :vartype type: str or ~azure.mgmt.sql.models.SyncGroupLogType - :ivar source: Source of the sync group log. - :vartype source: str - :ivar details: Details of the sync group log. - :vartype details: str - :ivar tracing_id: TracingId of the sync group log. - :vartype tracing_id: str - :ivar operation_status: OperationStatus of the sync group log. - :vartype operation_status: str - """ - - _validation = { - 'timestamp': {'readonly': True}, - 'type': {'readonly': True}, - 'source': {'readonly': True}, - 'details': {'readonly': True}, - 'tracing_id': {'readonly': True}, - 'operation_status': {'readonly': True}, - } - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'str'}, - 'tracing_id': {'key': 'tracingId', 'type': 'str'}, - 'operation_status': {'key': 'operationStatus', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncGroupLogProperties, self).__init__(**kwargs) - self.timestamp = None - self.type = None - self.source = None - self.details = None - self.tracing_id = None - self.operation_status = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_paged.py deleted file mode 100644 index b20ca4d8e098..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncGroupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_py3.py deleted file mode 100644 index 1654af79245f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_py3.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SyncGroup(ProxyResource): - """An Azure SQL Database sync group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param interval: Sync interval of the sync group. - :type interval: int - :ivar last_sync_time: Last sync time of the sync group. - :vartype last_sync_time: datetime - :param conflict_resolution_policy: Conflict resolution policy of the sync - group. Possible values include: 'HubWin', 'MemberWin' - :type conflict_resolution_policy: str or - ~azure.mgmt.sql.models.SyncConflictResolutionPolicy - :param sync_database_id: ARM resource id of the sync database in the sync - group. - :type sync_database_id: str - :param hub_database_user_name: User name for the sync group hub database - credential. - :type hub_database_user_name: str - :param hub_database_password: Password for the sync group hub database - credential. - :type hub_database_password: str - :ivar sync_state: Sync state of the sync group. Possible values include: - 'NotReady', 'Error', 'Warning', 'Progressing', 'Good' - :vartype sync_state: str or ~azure.mgmt.sql.models.SyncGroupState - :param schema: Sync schema of the sync group. - :type schema: ~azure.mgmt.sql.models.SyncGroupSchema - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'last_sync_time': {'readonly': True}, - 'sync_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'interval': {'key': 'properties.interval', 'type': 'int'}, - 'last_sync_time': {'key': 'properties.lastSyncTime', 'type': 'iso-8601'}, - 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'str'}, - 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, - 'hub_database_user_name': {'key': 'properties.hubDatabaseUserName', 'type': 'str'}, - 'hub_database_password': {'key': 'properties.hubDatabasePassword', 'type': 'str'}, - 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, - 'schema': {'key': 'properties.schema', 'type': 'SyncGroupSchema'}, - } - - def __init__(self, *, interval: int=None, conflict_resolution_policy=None, sync_database_id: str=None, hub_database_user_name: str=None, hub_database_password: str=None, schema=None, **kwargs) -> None: - super(SyncGroup, self).__init__(**kwargs) - self.interval = interval - self.last_sync_time = None - self.conflict_resolution_policy = conflict_resolution_policy - self.sync_database_id = sync_database_id - self.hub_database_user_name = hub_database_user_name - self.hub_database_password = hub_database_password - self.sync_state = None - self.schema = schema diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema.py deleted file mode 100644 index ece05d7301d0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchema(Model): - """Properties of sync group schema. - - :param tables: List of tables in sync group schema. - :type tables: list[~azure.mgmt.sql.models.SyncGroupSchemaTable] - :param master_sync_member_name: Name of master sync member where the - schema is from. - :type master_sync_member_name: str - """ - - _attribute_map = { - 'tables': {'key': 'tables', 'type': '[SyncGroupSchemaTable]'}, - 'master_sync_member_name': {'key': 'masterSyncMemberName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncGroupSchema, self).__init__(**kwargs) - self.tables = kwargs.get('tables', None) - self.master_sync_member_name = kwargs.get('master_sync_member_name', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_py3.py deleted file mode 100644 index b26d4b1b791c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchema(Model): - """Properties of sync group schema. - - :param tables: List of tables in sync group schema. - :type tables: list[~azure.mgmt.sql.models.SyncGroupSchemaTable] - :param master_sync_member_name: Name of master sync member where the - schema is from. - :type master_sync_member_name: str - """ - - _attribute_map = { - 'tables': {'key': 'tables', 'type': '[SyncGroupSchemaTable]'}, - 'master_sync_member_name': {'key': 'masterSyncMemberName', 'type': 'str'}, - } - - def __init__(self, *, tables=None, master_sync_member_name: str=None, **kwargs) -> None: - super(SyncGroupSchema, self).__init__(**kwargs) - self.tables = tables - self.master_sync_member_name = master_sync_member_name diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table.py deleted file mode 100644 index cf83bba5825d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchemaTable(Model): - """Properties of table in sync group schema. - - :param columns: List of columns in sync group schema. - :type columns: list[~azure.mgmt.sql.models.SyncGroupSchemaTableColumn] - :param quoted_name: Quoted name of sync group schema table. - :type quoted_name: str - """ - - _attribute_map = { - 'columns': {'key': 'columns', 'type': '[SyncGroupSchemaTableColumn]'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncGroupSchemaTable, self).__init__(**kwargs) - self.columns = kwargs.get('columns', None) - self.quoted_name = kwargs.get('quoted_name', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column.py deleted file mode 100644 index 705810d1d2a3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchemaTableColumn(Model): - """Properties of column in sync group table. - - :param quoted_name: Quoted name of sync group table column. - :type quoted_name: str - :param data_size: Data size of the column. - :type data_size: str - :param data_type: Data type of the column. - :type data_type: str - """ - - _attribute_map = { - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - 'data_size': {'key': 'dataSize', 'type': 'str'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncGroupSchemaTableColumn, self).__init__(**kwargs) - self.quoted_name = kwargs.get('quoted_name', None) - self.data_size = kwargs.get('data_size', None) - self.data_type = kwargs.get('data_type', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column_py3.py deleted file mode 100644 index bb8cce2d8c34..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchemaTableColumn(Model): - """Properties of column in sync group table. - - :param quoted_name: Quoted name of sync group table column. - :type quoted_name: str - :param data_size: Data size of the column. - :type data_size: str - :param data_type: Data type of the column. - :type data_type: str - """ - - _attribute_map = { - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - 'data_size': {'key': 'dataSize', 'type': 'str'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - } - - def __init__(self, *, quoted_name: str=None, data_size: str=None, data_type: str=None, **kwargs) -> None: - super(SyncGroupSchemaTableColumn, self).__init__(**kwargs) - self.quoted_name = quoted_name - self.data_size = data_size - self.data_type = data_type diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_py3.py deleted file mode 100644 index ecbbd26a576d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchemaTable(Model): - """Properties of table in sync group schema. - - :param columns: List of columns in sync group schema. - :type columns: list[~azure.mgmt.sql.models.SyncGroupSchemaTableColumn] - :param quoted_name: Quoted name of sync group schema table. - :type quoted_name: str - """ - - _attribute_map = { - 'columns': {'key': 'columns', 'type': '[SyncGroupSchemaTableColumn]'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, *, columns=None, quoted_name: str=None, **kwargs) -> None: - super(SyncGroupSchemaTable, self).__init__(**kwargs) - self.columns = columns - self.quoted_name = quoted_name diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member.py deleted file mode 100644 index 1474c6320dc1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SyncMember(ProxyResource): - """An Azure SQL Database sync member. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param database_type: Database type of the sync member. Possible values - include: 'AzureSqlDatabase', 'SqlServerDatabase' - :type database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType - :param sync_agent_id: ARM resource id of the sync agent in the sync - member. - :type sync_agent_id: str - :param sql_server_database_id: SQL Server database id of the sync member. - :type sql_server_database_id: str - :param server_name: Server name of the member database in the sync member - :type server_name: str - :param database_name: Database name of the member database in the sync - member. - :type database_name: str - :param user_name: User name of the member database in the sync member. - :type user_name: str - :param password: Password of the member database in the sync member. - :type password: str - :param sync_direction: Sync direction of the sync member. Possible values - include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember' - :type sync_direction: str or ~azure.mgmt.sql.models.SyncDirection - :ivar sync_state: Sync state of the sync member. Possible values include: - 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', - 'DisabledTombstoneCleanup', 'DisabledBackupRestore', - 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', - 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', - 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', - 'ReprovisionFailed', 'UnReprovisioned' - :vartype sync_state: str or ~azure.mgmt.sql.models.SyncMemberState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sync_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, - 'sync_agent_id': {'key': 'properties.syncAgentId', 'type': 'str'}, - 'sql_server_database_id': {'key': 'properties.sqlServerDatabaseId', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'sync_direction': {'key': 'properties.syncDirection', 'type': 'str'}, - 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncMember, self).__init__(**kwargs) - self.database_type = kwargs.get('database_type', None) - self.sync_agent_id = kwargs.get('sync_agent_id', None) - self.sql_server_database_id = kwargs.get('sql_server_database_id', None) - self.server_name = kwargs.get('server_name', None) - self.database_name = kwargs.get('database_name', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.sync_direction = kwargs.get('sync_direction', None) - self.sync_state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_paged.py deleted file mode 100644 index 68bddeeeec1b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncMemberPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncMember ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncMember]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncMemberPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_py3.py deleted file mode 100644 index 50cf8fe2d65c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_py3.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SyncMember(ProxyResource): - """An Azure SQL Database sync member. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param database_type: Database type of the sync member. Possible values - include: 'AzureSqlDatabase', 'SqlServerDatabase' - :type database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType - :param sync_agent_id: ARM resource id of the sync agent in the sync - member. - :type sync_agent_id: str - :param sql_server_database_id: SQL Server database id of the sync member. - :type sql_server_database_id: str - :param server_name: Server name of the member database in the sync member - :type server_name: str - :param database_name: Database name of the member database in the sync - member. - :type database_name: str - :param user_name: User name of the member database in the sync member. - :type user_name: str - :param password: Password of the member database in the sync member. - :type password: str - :param sync_direction: Sync direction of the sync member. Possible values - include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember' - :type sync_direction: str or ~azure.mgmt.sql.models.SyncDirection - :ivar sync_state: Sync state of the sync member. Possible values include: - 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', - 'DisabledTombstoneCleanup', 'DisabledBackupRestore', - 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', - 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', - 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', - 'ReprovisionFailed', 'UnReprovisioned' - :vartype sync_state: str or ~azure.mgmt.sql.models.SyncMemberState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sync_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, - 'sync_agent_id': {'key': 'properties.syncAgentId', 'type': 'str'}, - 'sql_server_database_id': {'key': 'properties.sqlServerDatabaseId', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'sync_direction': {'key': 'properties.syncDirection', 'type': 'str'}, - 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, - } - - def __init__(self, *, database_type=None, sync_agent_id: str=None, sql_server_database_id: str=None, server_name: str=None, database_name: str=None, user_name: str=None, password: str=None, sync_direction=None, **kwargs) -> None: - super(SyncMember, self).__init__(**kwargs) - self.database_type = database_type - self.sync_agent_id = sync_agent_id - self.sql_server_database_id = sql_server_database_id - self.server_name = server_name - self.database_name = database_name - self.user_name = user_name - self.password = password - self.sync_direction = sync_direction - self.sync_state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate.py deleted file mode 100644 index 1171ee8adf94..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class TdeCertificate(ProxyResource): - """A TDE certificate that can be uploaded into a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param private_blob: Required. The base64 encoded certificate private - blob. - :type private_blob: str - :param cert_password: The certificate password. - :type cert_password: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'private_blob': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'private_blob': {'key': 'properties.privateBlob', 'type': 'str'}, - 'cert_password': {'key': 'properties.certPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TdeCertificate, self).__init__(**kwargs) - self.private_blob = kwargs.get('private_blob', None) - self.cert_password = kwargs.get('cert_password', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate_py3.py deleted file mode 100644 index b4e54453cae1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class TdeCertificate(ProxyResource): - """A TDE certificate that can be uploaded into a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param private_blob: Required. The base64 encoded certificate private - blob. - :type private_blob: str - :param cert_password: The certificate password. - :type cert_password: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'private_blob': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'private_blob': {'key': 'properties.privateBlob', 'type': 'str'}, - 'cert_password': {'key': 'properties.certPassword', 'type': 'str'}, - } - - def __init__(self, *, private_blob: str, cert_password: str=None, **kwargs) -> None: - super(TdeCertificate, self).__init__(**kwargs) - self.private_blob = private_blob - self.cert_password = cert_password diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource.py deleted file mode 100644 index dc99e096cf18..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class TrackedResource(Resource): - """ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TrackedResource, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource_py3.py deleted file mode 100644 index 5edf04ac0a73..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class TrackedResource(Resource): - """ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(TrackedResource, self).__init__(**kwargs) - self.location = location - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption.py deleted file mode 100644 index 4270fa860c1d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class TransparentDataEncryption(ProxyResource): - """Represents a database transparent data encryption configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :param status: The status of the database transparent data encryption. - Possible values include: 'Enabled', 'Disabled' - :type status: str or - ~azure.mgmt.sql.models.TransparentDataEncryptionStatus - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'TransparentDataEncryptionStatus'}, - } - - def __init__(self, **kwargs): - super(TransparentDataEncryption, self).__init__(**kwargs) - self.location = None - self.status = kwargs.get('status', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity.py deleted file mode 100644 index 60e9505eba4c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class TransparentDataEncryptionActivity(ProxyResource): - """Represents a database transparent data encryption Scan. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar status: The status of the database. Possible values include: - 'Encrypting', 'Decrypting' - :vartype status: str or - ~azure.mgmt.sql.models.TransparentDataEncryptionActivityStatus - :ivar percent_complete: The percent complete of the transparent data - encryption scan for a database. - :vartype percent_complete: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, - 'percent_complete': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(TransparentDataEncryptionActivity, self).__init__(**kwargs) - self.location = None - self.status = None - self.percent_complete = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_paged.py deleted file mode 100644 index b86dce24923c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class TransparentDataEncryptionActivityPaged(Paged): - """ - A paging container for iterating over a list of :class:`TransparentDataEncryptionActivity ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TransparentDataEncryptionActivity]'} - } - - def __init__(self, *args, **kwargs): - - super(TransparentDataEncryptionActivityPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_py3.py deleted file mode 100644 index 9bf146137c20..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class TransparentDataEncryptionActivity(ProxyResource): - """Represents a database transparent data encryption Scan. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar status: The status of the database. Possible values include: - 'Encrypting', 'Decrypting' - :vartype status: str or - ~azure.mgmt.sql.models.TransparentDataEncryptionActivityStatus - :ivar percent_complete: The percent complete of the transparent data - encryption scan for a database. - :vartype percent_complete: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, - 'percent_complete': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(TransparentDataEncryptionActivity, self).__init__(**kwargs) - self.location = None - self.status = None - self.percent_complete = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_py3.py deleted file mode 100644 index db2b2096f798..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class TransparentDataEncryption(ProxyResource): - """Represents a database transparent data encryption configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :param status: The status of the database transparent data encryption. - Possible values include: 'Enabled', 'Disabled' - :type status: str or - ~azure.mgmt.sql.models.TransparentDataEncryptionStatus - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'TransparentDataEncryptionStatus'}, - } - - def __init__(self, *, status=None, **kwargs) -> None: - super(TransparentDataEncryption, self).__init__(**kwargs) - self.location = None - self.status = status diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster.py deleted file mode 100644 index a3c9dd04abca..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class VirtualCluster(TrackedResource): - """An Azure SQL virtual cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :ivar subnet_id: Subnet resource ID for the virtual cluster. - :vartype subnet_id: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :ivar child_resources: List of resources in this virtual cluster. - :vartype child_resources: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'subnet_id': {'readonly': True}, - 'child_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'family': {'key': 'properties.family', 'type': 'str'}, - 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualCluster, self).__init__(**kwargs) - self.subnet_id = None - self.family = kwargs.get('family', None) - self.child_resources = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_paged.py deleted file mode 100644 index 865bbd5e9f86..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualClusterPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_py3.py deleted file mode 100644 index e11fb730e2be..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class VirtualCluster(TrackedResource): - """An Azure SQL virtual cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :ivar subnet_id: Subnet resource ID for the virtual cluster. - :vartype subnet_id: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :ivar child_resources: List of resources in this virtual cluster. - :vartype child_resources: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'subnet_id': {'readonly': True}, - 'child_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'family': {'key': 'properties.family', 'type': 'str'}, - 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, - } - - def __init__(self, *, location: str, tags=None, family: str=None, **kwargs) -> None: - super(VirtualCluster, self).__init__(location=location, tags=tags, **kwargs) - self.subnet_id = None - self.family = family - self.child_resources = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update.py deleted file mode 100644 index c6604df3568a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualClusterUpdate(Model): - """An update request for an Azure SQL Database virtual cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar subnet_id: Subnet resource ID for the virtual cluster. - :vartype subnet_id: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :ivar child_resources: List of resources in this virtual cluster. - :vartype child_resources: list[str] - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'subnet_id': {'readonly': True}, - 'child_resources': {'readonly': True}, - } - - _attribute_map = { - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'family': {'key': 'properties.family', 'type': 'str'}, - 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(VirtualClusterUpdate, self).__init__(**kwargs) - self.subnet_id = None - self.family = kwargs.get('family', None) - self.child_resources = None - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update_py3.py deleted file mode 100644 index ec26101b089a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualClusterUpdate(Model): - """An update request for an Azure SQL Database virtual cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar subnet_id: Subnet resource ID for the virtual cluster. - :vartype subnet_id: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :ivar child_resources: List of resources in this virtual cluster. - :vartype child_resources: list[str] - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'subnet_id': {'readonly': True}, - 'child_resources': {'readonly': True}, - } - - _attribute_map = { - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'family': {'key': 'properties.family', 'type': 'str'}, - 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, family: str=None, tags=None, **kwargs) -> None: - super(VirtualClusterUpdate, self).__init__(**kwargs) - self.subnet_id = None - self.family = family - self.child_resources = None - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule.py deleted file mode 100644 index 0960e4289c66..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class VirtualNetworkRule(ProxyResource): - """A virtual network rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param virtual_network_subnet_id: Required. The ARM resource id of the - virtual network subnet. - :type virtual_network_subnet_id: str - :param ignore_missing_vnet_service_endpoint: Create firewall rule before - the virtual network has vnet service endpoint enabled. - :type ignore_missing_vnet_service_endpoint: bool - :ivar state: Virtual Network Rule State. Possible values include: - 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' - :vartype state: str or ~azure.mgmt.sql.models.VirtualNetworkRuleState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_subnet_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, - 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualNetworkRule, self).__init__(**kwargs) - self.virtual_network_subnet_id = kwargs.get('virtual_network_subnet_id', None) - self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_paged.py deleted file mode 100644 index 1cc23039a558..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualNetworkRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualNetworkRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualNetworkRule]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualNetworkRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_py3.py deleted file mode 100644 index 19e6bd30ff5e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class VirtualNetworkRule(ProxyResource): - """A virtual network rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param virtual_network_subnet_id: Required. The ARM resource id of the - virtual network subnet. - :type virtual_network_subnet_id: str - :param ignore_missing_vnet_service_endpoint: Create firewall rule before - the virtual network has vnet service endpoint enabled. - :type ignore_missing_vnet_service_endpoint: bool - :ivar state: Virtual Network Rule State. Possible values include: - 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' - :vartype state: str or ~azure.mgmt.sql.models.VirtualNetworkRuleState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_subnet_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, - 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, *, virtual_network_subnet_id: str, ignore_missing_vnet_service_endpoint: bool=None, **kwargs) -> None: - super(VirtualNetworkRule, self).__init__(**kwargs) - self.virtual_network_subnet_id = virtual_network_subnet_id - self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties.py deleted file mode 100644 index e7d424543f2b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VulnerabilityAssessmentRecurringScansProperties(Model): - """Properties of a Vulnerability Assessment recurring scans. - - :param is_enabled: Recurring scans state. - :type is_enabled: bool - :param email_subscription_admins: Specifies that the schedule scan - notification will be is sent to the subscription administrators. Default - value: True . - :type email_subscription_admins: bool - :param emails: Specifies an array of e-mail addresses to which the scan - notification is sent. - :type emails: list[str] - """ - - _attribute_map = { - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'}, - 'emails': {'key': 'emails', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs) - self.is_enabled = kwargs.get('is_enabled', None) - self.email_subscription_admins = kwargs.get('email_subscription_admins', True) - self.emails = kwargs.get('emails', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py deleted file mode 100644 index 3a55afaa0a5e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VulnerabilityAssessmentRecurringScansProperties(Model): - """Properties of a Vulnerability Assessment recurring scans. - - :param is_enabled: Recurring scans state. - :type is_enabled: bool - :param email_subscription_admins: Specifies that the schedule scan - notification will be is sent to the subscription administrators. Default - value: True . - :type email_subscription_admins: bool - :param emails: Specifies an array of e-mail addresses to which the scan - notification is sent. - :type emails: list[str] - """ - - _attribute_map = { - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'}, - 'emails': {'key': 'emails', 'type': '[str]'}, - } - - def __init__(self, *, is_enabled: bool=None, email_subscription_admins: bool=True, emails=None, **kwargs) -> None: - super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs) - self.is_enabled = is_enabled - self.email_subscription_admins = email_subscription_admins - self.emails = emails diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error.py deleted file mode 100644 index 1d465691ba60..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VulnerabilityAssessmentScanError(Model): - """Properties of a vulnerability assessment scan error. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VulnerabilityAssessmentScanError, self).__init__(**kwargs) - self.code = None - self.message = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error_py3.py deleted file mode 100644 index 93c13998eb25..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VulnerabilityAssessmentScanError(Model): - """Properties of a vulnerability assessment scan error. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(VulnerabilityAssessmentScanError, self).__init__(**kwargs) - self.code = None - self.message = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record.py deleted file mode 100644 index 67a6d163f90c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class VulnerabilityAssessmentScanRecord(ProxyResource): - """A vulnerability assessment scan record. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar scan_id: The scan ID. - :vartype scan_id: str - :ivar trigger_type: The scan trigger type. Possible values include: - 'OnDemand', 'Recurring' - :vartype trigger_type: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentScanTriggerType - :ivar state: The scan status. Possible values include: 'Passed', 'Failed', - 'FailedToRun', 'InProgress' - :vartype state: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentScanState - :ivar start_time: The scan start time (UTC). - :vartype start_time: datetime - :ivar end_time: The scan end time (UTC). - :vartype end_time: datetime - :ivar errors: The scan errors. - :vartype errors: - list[~azure.mgmt.sql.models.VulnerabilityAssessmentScanError] - :ivar storage_container_path: The scan results storage container path. - :vartype storage_container_path: str - :ivar number_of_failed_security_checks: The number of failed security - checks. - :vartype number_of_failed_security_checks: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'scan_id': {'readonly': True}, - 'trigger_type': {'readonly': True}, - 'state': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'errors': {'readonly': True}, - 'storage_container_path': {'readonly': True}, - 'number_of_failed_security_checks': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'scan_id': {'key': 'properties.scanId', 'type': 'str'}, - 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'errors': {'key': 'properties.errors', 'type': '[VulnerabilityAssessmentScanError]'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'number_of_failed_security_checks': {'key': 'properties.numberOfFailedSecurityChecks', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(VulnerabilityAssessmentScanRecord, self).__init__(**kwargs) - self.scan_id = None - self.trigger_type = None - self.state = None - self.start_time = None - self.end_time = None - self.errors = None - self.storage_container_path = None - self.number_of_failed_security_checks = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_paged.py deleted file mode 100644 index 7076acc9290f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VulnerabilityAssessmentScanRecordPaged(Paged): - """ - A paging container for iterating over a list of :class:`VulnerabilityAssessmentScanRecord ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VulnerabilityAssessmentScanRecord]'} - } - - def __init__(self, *args, **kwargs): - - super(VulnerabilityAssessmentScanRecordPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_py3.py deleted file mode 100644 index e31d141065af..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class VulnerabilityAssessmentScanRecord(ProxyResource): - """A vulnerability assessment scan record. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar scan_id: The scan ID. - :vartype scan_id: str - :ivar trigger_type: The scan trigger type. Possible values include: - 'OnDemand', 'Recurring' - :vartype trigger_type: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentScanTriggerType - :ivar state: The scan status. Possible values include: 'Passed', 'Failed', - 'FailedToRun', 'InProgress' - :vartype state: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentScanState - :ivar start_time: The scan start time (UTC). - :vartype start_time: datetime - :ivar end_time: The scan end time (UTC). - :vartype end_time: datetime - :ivar errors: The scan errors. - :vartype errors: - list[~azure.mgmt.sql.models.VulnerabilityAssessmentScanError] - :ivar storage_container_path: The scan results storage container path. - :vartype storage_container_path: str - :ivar number_of_failed_security_checks: The number of failed security - checks. - :vartype number_of_failed_security_checks: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'scan_id': {'readonly': True}, - 'trigger_type': {'readonly': True}, - 'state': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'errors': {'readonly': True}, - 'storage_container_path': {'readonly': True}, - 'number_of_failed_security_checks': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'scan_id': {'key': 'properties.scanId', 'type': 'str'}, - 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'errors': {'key': 'properties.errors', 'type': '[VulnerabilityAssessmentScanError]'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'number_of_failed_security_checks': {'key': 'properties.numberOfFailedSecurityChecks', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(VulnerabilityAssessmentScanRecord, self).__init__(**kwargs) - self.scan_id = None - self.trigger_type = None - self.state = None - self.start_time = None - self.end_time = None - self.errors = None - self.storage_container_path = None - self.number_of_failed_security_checks = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py index 3db410ac9cd7..57aa89c2fe9a 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py @@ -9,86 +9,88 @@ # regenerated. # -------------------------------------------------------------------------- -from .recoverable_databases_operations import RecoverableDatabasesOperations -from .restorable_dropped_databases_operations import RestorableDroppedDatabasesOperations -from .servers_operations import ServersOperations -from .server_connection_policies_operations import ServerConnectionPoliciesOperations -from .database_threat_detection_policies_operations import DatabaseThreatDetectionPoliciesOperations -from .data_masking_policies_operations import DataMaskingPoliciesOperations -from .data_masking_rules_operations import DataMaskingRulesOperations -from .firewall_rules_operations import FirewallRulesOperations -from .geo_backup_policies_operations import GeoBackupPoliciesOperations -from .databases_operations import DatabasesOperations -from .elastic_pools_operations import ElasticPoolsOperations -from .recommended_elastic_pools_operations import RecommendedElasticPoolsOperations -from .replication_links_operations import ReplicationLinksOperations -from .server_azure_ad_administrators_operations import ServerAzureADAdministratorsOperations -from .server_communication_links_operations import ServerCommunicationLinksOperations -from .service_objectives_operations import ServiceObjectivesOperations -from .elastic_pool_activities_operations import ElasticPoolActivitiesOperations -from .elastic_pool_database_activities_operations import ElasticPoolDatabaseActivitiesOperations -from .service_tier_advisors_operations import ServiceTierAdvisorsOperations -from .transparent_data_encryptions_operations import TransparentDataEncryptionsOperations -from .transparent_data_encryption_activities_operations import TransparentDataEncryptionActivitiesOperations -from .server_usages_operations import ServerUsagesOperations -from .database_usages_operations import DatabaseUsagesOperations -from .database_automatic_tuning_operations import DatabaseAutomaticTuningOperations -from .encryption_protectors_operations import EncryptionProtectorsOperations -from .failover_groups_operations import FailoverGroupsOperations -from .managed_instances_operations import ManagedInstancesOperations -from .operations import Operations -from .server_keys_operations import ServerKeysOperations -from .sync_agents_operations import SyncAgentsOperations -from .sync_groups_operations import SyncGroupsOperations -from .sync_members_operations import SyncMembersOperations -from .subscription_usages_operations import SubscriptionUsagesOperations -from .virtual_clusters_operations import VirtualClustersOperations -from .virtual_network_rules_operations import VirtualNetworkRulesOperations -from .extended_database_blob_auditing_policies_operations import ExtendedDatabaseBlobAuditingPoliciesOperations -from .extended_server_blob_auditing_policies_operations import ExtendedServerBlobAuditingPoliciesOperations -from .server_blob_auditing_policies_operations import ServerBlobAuditingPoliciesOperations -from .database_blob_auditing_policies_operations import DatabaseBlobAuditingPoliciesOperations -from .database_vulnerability_assessment_rule_baselines_operations import DatabaseVulnerabilityAssessmentRuleBaselinesOperations -from .database_vulnerability_assessments_operations import DatabaseVulnerabilityAssessmentsOperations -from .job_agents_operations import JobAgentsOperations -from .job_credentials_operations import JobCredentialsOperations -from .job_executions_operations import JobExecutionsOperations -from .jobs_operations import JobsOperations -from .job_step_executions_operations import JobStepExecutionsOperations -from .job_steps_operations import JobStepsOperations -from .job_target_executions_operations import JobTargetExecutionsOperations -from .job_target_groups_operations import JobTargetGroupsOperations -from .job_versions_operations import JobVersionsOperations -from .long_term_retention_backups_operations import LongTermRetentionBackupsOperations -from .backup_long_term_retention_policies_operations import BackupLongTermRetentionPoliciesOperations -from .managed_backup_short_term_retention_policies_operations import ManagedBackupShortTermRetentionPoliciesOperations -from .managed_databases_operations import ManagedDatabasesOperations -from .managed_restorable_dropped_database_backup_short_term_retention_policies_operations import ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations -from .server_automatic_tuning_operations import ServerAutomaticTuningOperations -from .server_dns_aliases_operations import ServerDnsAliasesOperations -from .server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations -from .restorable_dropped_managed_databases_operations import RestorableDroppedManagedDatabasesOperations -from .restore_points_operations import RestorePointsOperations -from .managed_database_security_alert_policies_operations import ManagedDatabaseSecurityAlertPoliciesOperations -from .managed_server_security_alert_policies_operations import ManagedServerSecurityAlertPoliciesOperations -from .sensitivity_labels_operations import SensitivityLabelsOperations -from .database_operations import DatabaseOperations -from .elastic_pool_operations import ElasticPoolOperations -from .capabilities_operations import CapabilitiesOperations -from .database_vulnerability_assessment_scans_operations import DatabaseVulnerabilityAssessmentScansOperations -from .managed_database_vulnerability_assessment_rule_baselines_operations import ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations -from .managed_database_vulnerability_assessment_scans_operations import ManagedDatabaseVulnerabilityAssessmentScansOperations -from .managed_database_vulnerability_assessments_operations import ManagedDatabaseVulnerabilityAssessmentsOperations -from .instance_failover_groups_operations import InstanceFailoverGroupsOperations -from .backup_short_term_retention_policies_operations import BackupShortTermRetentionPoliciesOperations -from .tde_certificates_operations import TdeCertificatesOperations -from .managed_instance_tde_certificates_operations import ManagedInstanceTdeCertificatesOperations -from .managed_instance_keys_operations import ManagedInstanceKeysOperations -from .managed_instance_encryption_protectors_operations import ManagedInstanceEncryptionProtectorsOperations -from .recoverable_managed_databases_operations import RecoverableManagedDatabasesOperations -from .managed_instance_vulnerability_assessments_operations import ManagedInstanceVulnerabilityAssessmentsOperations -from .server_vulnerability_assessments_operations import ServerVulnerabilityAssessmentsOperations -from .managed_database_sensitivity_labels_operations import ManagedDatabaseSensitivityLabelsOperations +from ._recoverable_databases_operations import RecoverableDatabasesOperations +from ._restorable_dropped_databases_operations import RestorableDroppedDatabasesOperations +from ._servers_operations import ServersOperations +from ._server_connection_policies_operations import ServerConnectionPoliciesOperations +from ._database_threat_detection_policies_operations import DatabaseThreatDetectionPoliciesOperations +from ._data_masking_policies_operations import DataMaskingPoliciesOperations +from ._data_masking_rules_operations import DataMaskingRulesOperations +from ._firewall_rules_operations import FirewallRulesOperations +from ._geo_backup_policies_operations import GeoBackupPoliciesOperations +from ._databases_operations import DatabasesOperations +from ._elastic_pools_operations import ElasticPoolsOperations +from ._recommended_elastic_pools_operations import RecommendedElasticPoolsOperations +from ._replication_links_operations import ReplicationLinksOperations +from ._server_azure_ad_administrators_operations import ServerAzureADAdministratorsOperations +from ._server_communication_links_operations import ServerCommunicationLinksOperations +from ._service_objectives_operations import ServiceObjectivesOperations +from ._elastic_pool_activities_operations import ElasticPoolActivitiesOperations +from ._elastic_pool_database_activities_operations import ElasticPoolDatabaseActivitiesOperations +from ._service_tier_advisors_operations import ServiceTierAdvisorsOperations +from ._transparent_data_encryptions_operations import TransparentDataEncryptionsOperations +from ._transparent_data_encryption_activities_operations import TransparentDataEncryptionActivitiesOperations +from ._server_usages_operations import ServerUsagesOperations +from ._database_usages_operations import DatabaseUsagesOperations +from ._database_automatic_tuning_operations import DatabaseAutomaticTuningOperations +from ._encryption_protectors_operations import EncryptionProtectorsOperations +from ._failover_groups_operations import FailoverGroupsOperations +from ._operations import Operations +from ._server_keys_operations import ServerKeysOperations +from ._sync_agents_operations import SyncAgentsOperations +from ._sync_groups_operations import SyncGroupsOperations +from ._sync_members_operations import SyncMembersOperations +from ._subscription_usages_operations import SubscriptionUsagesOperations +from ._virtual_clusters_operations import VirtualClustersOperations +from ._virtual_network_rules_operations import VirtualNetworkRulesOperations +from ._extended_database_blob_auditing_policies_operations import ExtendedDatabaseBlobAuditingPoliciesOperations +from ._extended_server_blob_auditing_policies_operations import ExtendedServerBlobAuditingPoliciesOperations +from ._server_blob_auditing_policies_operations import ServerBlobAuditingPoliciesOperations +from ._database_blob_auditing_policies_operations import DatabaseBlobAuditingPoliciesOperations +from ._database_vulnerability_assessment_rule_baselines_operations import DatabaseVulnerabilityAssessmentRuleBaselinesOperations +from ._database_vulnerability_assessments_operations import DatabaseVulnerabilityAssessmentsOperations +from ._job_agents_operations import JobAgentsOperations +from ._job_credentials_operations import JobCredentialsOperations +from ._job_executions_operations import JobExecutionsOperations +from ._jobs_operations import JobsOperations +from ._job_step_executions_operations import JobStepExecutionsOperations +from ._job_steps_operations import JobStepsOperations +from ._job_target_executions_operations import JobTargetExecutionsOperations +from ._job_target_groups_operations import JobTargetGroupsOperations +from ._job_versions_operations import JobVersionsOperations +from ._long_term_retention_backups_operations import LongTermRetentionBackupsOperations +from ._backup_long_term_retention_policies_operations import BackupLongTermRetentionPoliciesOperations +from ._managed_backup_short_term_retention_policies_operations import ManagedBackupShortTermRetentionPoliciesOperations +from ._managed_databases_operations import ManagedDatabasesOperations +from ._managed_restorable_dropped_database_backup_short_term_retention_policies_operations import ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations +from ._server_automatic_tuning_operations import ServerAutomaticTuningOperations +from ._server_dns_aliases_operations import ServerDnsAliasesOperations +from ._server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations +from ._restorable_dropped_managed_databases_operations import RestorableDroppedManagedDatabasesOperations +from ._restore_points_operations import RestorePointsOperations +from ._managed_database_security_alert_policies_operations import ManagedDatabaseSecurityAlertPoliciesOperations +from ._managed_server_security_alert_policies_operations import ManagedServerSecurityAlertPoliciesOperations +from ._sensitivity_labels_operations import SensitivityLabelsOperations +from ._database_operations import DatabaseOperations +from ._elastic_pool_operations import ElasticPoolOperations +from ._capabilities_operations import CapabilitiesOperations +from ._database_vulnerability_assessment_scans_operations import DatabaseVulnerabilityAssessmentScansOperations +from ._managed_database_vulnerability_assessment_rule_baselines_operations import ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations +from ._managed_database_vulnerability_assessment_scans_operations import ManagedDatabaseVulnerabilityAssessmentScansOperations +from ._managed_database_vulnerability_assessments_operations import ManagedDatabaseVulnerabilityAssessmentsOperations +from ._instance_failover_groups_operations import InstanceFailoverGroupsOperations +from ._backup_short_term_retention_policies_operations import BackupShortTermRetentionPoliciesOperations +from ._tde_certificates_operations import TdeCertificatesOperations +from ._managed_instance_tde_certificates_operations import ManagedInstanceTdeCertificatesOperations +from ._managed_instance_keys_operations import ManagedInstanceKeysOperations +from ._managed_instance_encryption_protectors_operations import ManagedInstanceEncryptionProtectorsOperations +from ._recoverable_managed_databases_operations import RecoverableManagedDatabasesOperations +from ._managed_instance_vulnerability_assessments_operations import ManagedInstanceVulnerabilityAssessmentsOperations +from ._server_vulnerability_assessments_operations import ServerVulnerabilityAssessmentsOperations +from ._managed_database_sensitivity_labels_operations import ManagedDatabaseSensitivityLabelsOperations +from ._instance_pools_operations import InstancePoolsOperations +from ._usages_operations import UsagesOperations +from ._managed_instances_operations import ManagedInstancesOperations __all__ = [ 'RecoverableDatabasesOperations', @@ -117,7 +119,6 @@ 'DatabaseAutomaticTuningOperations', 'EncryptionProtectorsOperations', 'FailoverGroupsOperations', - 'ManagedInstancesOperations', 'Operations', 'ServerKeysOperations', 'SyncAgentsOperations', @@ -171,4 +172,7 @@ 'ManagedInstanceVulnerabilityAssessmentsOperations', 'ServerVulnerabilityAssessmentsOperations', 'ManagedDatabaseSensitivityLabelsOperations', + 'InstancePoolsOperations', + 'UsagesOperations', + 'ManagedInstancesOperations', ] diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_long_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_long_term_retention_policies_operations.py similarity index 99% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_long_term_retention_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_long_term_retention_policies_operations.py index c42ba1ab812b..532ce23b9aef 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_long_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_long_term_retention_policies_operations.py @@ -21,6 +21,8 @@ class BackupLongTermRetentionPoliciesOperations(object): """BackupLongTermRetentionPoliciesOperations 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. @@ -99,7 +101,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BackupLongTermRetentionPolicy', response) @@ -275,7 +276,6 @@ def list_by_database( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BackupLongTermRetentionPolicy', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_short_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_short_term_retention_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_short_term_retention_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_short_term_retention_policies_operations.py index c7957810c281..1fab2366624f 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_short_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_short_term_retention_policies_operations.py @@ -21,6 +21,8 @@ class BackupShortTermRetentionPoliciesOperations(object): """BackupShortTermRetentionPoliciesOperations 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. @@ -99,7 +101,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BackupShortTermRetentionPolicy', response) @@ -354,8 +355,7 @@ def list_by_database( ~azure.mgmt.sql.models.BackupShortTermRetentionPolicyPaged[~azure.mgmt.sql.models.BackupShortTermRetentionPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -387,6 +387,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -397,12 +402,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.BackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.BackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.BackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/capabilities_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_capabilities_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/capabilities_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_capabilities_operations.py index a873a3a87f92..755f2dd6c70f 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/capabilities_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_capabilities_operations.py @@ -19,6 +19,8 @@ class CapabilitiesOperations(object): """CapabilitiesOperations 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. @@ -93,7 +95,6 @@ def list_by_location( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LocationCapabilities', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_policies_operations.py index 2d1099c8be0d..3d51678f036d 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_policies_operations.py @@ -19,6 +19,8 @@ class DataMaskingPoliciesOperations(object): """DataMaskingPoliciesOperations 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. @@ -111,7 +113,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DataMaskingPolicy', response) @@ -179,7 +180,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DataMaskingPolicy', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_rules_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_rules_operations.py similarity index 96% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_rules_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_rules_operations.py index c5fd4c63ab46..4430f4d7bc9c 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_rules_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_rules_operations.py @@ -19,6 +19,8 @@ class DataMaskingRulesOperations(object): """DataMaskingRulesOperations 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. @@ -106,7 +108,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DataMaskingRule', response) if response.status_code == 201: @@ -141,8 +142,7 @@ def list_by_database( ~azure.mgmt.sql.models.DataMaskingRulePaged[~azure.mgmt.sql.models.DataMaskingRule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -175,6 +175,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -185,12 +190,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DataMaskingRulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DataMaskingRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DataMaskingRulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_automatic_tuning_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_automatic_tuning_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_automatic_tuning_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_automatic_tuning_operations.py index 7a94b97b9546..30b493d10191 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_automatic_tuning_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_automatic_tuning_operations.py @@ -19,6 +19,8 @@ class DatabaseAutomaticTuningOperations(object): """DatabaseAutomaticTuningOperations 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. @@ -93,7 +95,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseAutomaticTuning', response) @@ -172,7 +173,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseAutomaticTuning', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_blob_auditing_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_blob_auditing_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_blob_auditing_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_blob_auditing_policies_operations.py index a0c09cfd8f09..873e1dc55d36 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_blob_auditing_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_blob_auditing_policies_operations.py @@ -19,6 +19,8 @@ class DatabaseBlobAuditingPoliciesOperations(object): """DatabaseBlobAuditingPoliciesOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseBlobAuditingPolicy', response) @@ -170,7 +171,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseBlobAuditingPolicy', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_operations.py index 8d482411f199..9fdb5969fcff 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_operations.py @@ -19,6 +19,8 @@ class DatabaseOperations(object): """DatabaseOperations 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. @@ -120,8 +122,7 @@ def list_by_database( ~azure.mgmt.sql.models.DatabaseOperationPaged[~azure.mgmt.sql.models.DatabaseOperation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -153,6 +154,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -163,12 +169,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabaseOperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabaseOperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabaseOperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_threat_detection_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_threat_detection_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_threat_detection_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_threat_detection_policies_operations.py index 38501854c428..888228ba55d3 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_threat_detection_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_threat_detection_policies_operations.py @@ -19,6 +19,8 @@ class DatabaseThreatDetectionPoliciesOperations(object): """DatabaseThreatDetectionPoliciesOperations 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. @@ -97,7 +99,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseSecurityAlertPolicy', response) @@ -172,7 +173,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseSecurityAlertPolicy', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_usages_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_usages_operations.py similarity index 92% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_usages_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_usages_operations.py index 543a8ba6f509..8cf8df83a5a8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_usages_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_usages_operations.py @@ -19,6 +19,8 @@ class DatabaseUsagesOperations(object): """DatabaseUsagesOperations 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. @@ -59,8 +61,7 @@ def list_by_database( ~azure.mgmt.sql.models.DatabaseUsagePaged[~azure.mgmt.sql.models.DatabaseUsage] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -92,6 +93,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -102,12 +108,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabaseUsagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabaseUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabaseUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/usages'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_rule_baselines_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_rule_baselines_operations.py similarity index 99% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_rule_baselines_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_rule_baselines_operations.py index 9dba003a5ff2..8e04b1fbc4a1 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_rule_baselines_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_rule_baselines_operations.py @@ -19,6 +19,8 @@ class DatabaseVulnerabilityAssessmentRuleBaselinesOperations(object): """DatabaseVulnerabilityAssessmentRuleBaselinesOperations 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. @@ -109,7 +111,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentRuleBaseline', response) @@ -199,7 +200,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentRuleBaseline', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_scans_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_scans_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_scans_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_scans_operations.py index 97725d782e9e..06efd2638038 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_scans_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_scans_operations.py @@ -21,6 +21,8 @@ class DatabaseVulnerabilityAssessmentScansOperations(object): """DatabaseVulnerabilityAssessmentScansOperations 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. @@ -64,8 +66,7 @@ def list_by_database( ~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecordPaged[~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecord] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -98,6 +99,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -108,12 +114,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans'} @@ -180,7 +184,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VulnerabilityAssessmentScanRecord', response) @@ -345,7 +348,6 @@ def export( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentScansExport', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessments_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessments_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessments_operations.py index 5fa6a1ef7ade..4fbf4f24a995 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessments_operations.py @@ -19,6 +19,8 @@ class DatabaseVulnerabilityAssessmentsOperations(object): """DatabaseVulnerabilityAssessmentsOperations 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. @@ -98,7 +100,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessment', response) @@ -175,7 +176,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessment', response) if response.status_code == 201: @@ -271,8 +271,7 @@ def list_by_database( ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentPaged[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessment] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -304,6 +303,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -314,12 +318,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_databases_operations.py similarity index 92% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_databases_operations.py index 3b4e01e8a397..e3b5174323da 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_databases_operations.py @@ -21,6 +21,8 @@ class DatabasesOperations(object): """DatabasesOperations 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. @@ -390,8 +392,7 @@ def list_metrics( """ api_version = "2014-04-01" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metrics.metadata['url'] @@ -424,6 +425,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -434,12 +440,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metrics'} @@ -468,8 +472,7 @@ def list_metric_definitions( """ api_version = "2014-04-01" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metric_definitions.metadata['url'] @@ -501,6 +504,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -511,12 +519,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metricDefinitions'} @@ -630,8 +636,7 @@ def list_by_server( """ api_version = "2017-10-01-preview" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -662,6 +667,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -672,12 +682,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases'} @@ -740,7 +748,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Database', response) @@ -1080,8 +1087,7 @@ def list_by_elastic_pool( """ api_version = "2017-10-01-preview" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_elastic_pool.metadata['url'] @@ -1113,6 +1119,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -1123,12 +1134,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_elastic_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases'} @@ -1402,3 +1411,90 @@ def rename( client_raw_response = ClientRawResponse(None, response) return client_raw_response rename.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/move'} + + + def _failover_initial( + self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): + api_version = "2018-06-01-preview" + + # Construct URL + url = self.failover.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def failover( + self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Failovers a database. + + :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 server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database to failover. + :type database_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._failover_initial( + resource_group_name=resource_group_name, + server_name=server_name, + database_name=database_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) + failover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/failover'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_activities_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_activities_operations.py similarity index 92% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_activities_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_activities_operations.py index a2d2dc49c203..3fb2cfc9bb14 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_activities_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_activities_operations.py @@ -19,6 +19,8 @@ class ElasticPoolActivitiesOperations(object): """ElasticPoolActivitiesOperations 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. @@ -60,8 +62,7 @@ def list_by_elastic_pool( ~azure.mgmt.sql.models.ElasticPoolActivityPaged[~azure.mgmt.sql.models.ElasticPoolActivity] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_elastic_pool.metadata['url'] @@ -93,6 +94,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -103,12 +109,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ElasticPoolActivityPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ElasticPoolActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ElasticPoolActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_elastic_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolActivity'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_database_activities_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_database_activities_operations.py similarity index 92% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_database_activities_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_database_activities_operations.py index 5ed1492b9615..6280285c5e59 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_database_activities_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_database_activities_operations.py @@ -19,6 +19,8 @@ class ElasticPoolDatabaseActivitiesOperations(object): """ElasticPoolDatabaseActivitiesOperations 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. @@ -59,8 +61,7 @@ def list_by_elastic_pool( ~azure.mgmt.sql.models.ElasticPoolDatabaseActivityPaged[~azure.mgmt.sql.models.ElasticPoolDatabaseActivity] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_elastic_pool.metadata['url'] @@ -92,6 +93,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -102,12 +108,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ElasticPoolDatabaseActivityPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ElasticPoolDatabaseActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ElasticPoolDatabaseActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_elastic_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolDatabaseActivity'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_operations.py index eb71face0db1..26dd59fe4abf 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_operations.py @@ -19,6 +19,8 @@ class ElasticPoolOperations(object): """ElasticPoolOperations 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. @@ -120,8 +122,7 @@ def list_by_elastic_pool( ~azure.mgmt.sql.models.ElasticPoolOperationPaged[~azure.mgmt.sql.models.ElasticPoolOperation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_elastic_pool.metadata['url'] @@ -153,6 +154,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -163,12 +169,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ElasticPoolOperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ElasticPoolOperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ElasticPoolOperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_elastic_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/operations'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pools_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pools_operations.py similarity index 85% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pools_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pools_operations.py index e7fba924b0c6..8f780c6995e1 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pools_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pools_operations.py @@ -21,6 +21,8 @@ class ElasticPoolsOperations(object): """ElasticPoolsOperations 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. @@ -64,8 +66,7 @@ def list_metrics( """ api_version = "2014-04-01" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metrics.metadata['url'] @@ -98,6 +99,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -108,12 +114,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metrics'} @@ -142,8 +146,7 @@ def list_metric_definitions( """ api_version = "2014-04-01" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metric_definitions.metadata['url'] @@ -175,6 +178,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -185,12 +193,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metricDefinitions'} @@ -219,8 +225,7 @@ def list_by_server( """ api_version = "2017-10-01-preview" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -253,6 +258,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -263,12 +273,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ElasticPoolPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ElasticPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ElasticPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools'} @@ -331,7 +339,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ElasticPool', response) @@ -646,3 +653,90 @@ def get_long_running_output(response): 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.Sql/servers/{serverName}/elasticPools/{elasticPoolName}'} + + + def _failover_initial( + self, resource_group_name, server_name, elastic_pool_name, custom_headers=None, raw=False, **operation_config): + api_version = "2018-06-01-preview" + + # Construct URL + url = self.failover.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'elasticPoolName': self._serialize.url("elastic_pool_name", elastic_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def failover( + self, resource_group_name, server_name, elastic_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Failovers an elastic pool. + + :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 server_name: The name of the server. + :type server_name: str + :param elastic_pool_name: The name of the elastic pool to failover. + :type elastic_pool_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._failover_initial( + resource_group_name=resource_group_name, + server_name=server_name, + elastic_pool_name=elastic_pool_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) + failover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/failover'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/encryption_protectors_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_encryption_protectors_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/encryption_protectors_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_encryption_protectors_operations.py index d19233971f4c..4ee94af811f2 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/encryption_protectors_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_encryption_protectors_operations.py @@ -21,6 +21,8 @@ class EncryptionProtectorsOperations(object): """EncryptionProtectorsOperations 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. @@ -61,8 +63,7 @@ def list_by_server( ~azure.mgmt.sql.models.EncryptionProtectorPaged[~azure.mgmt.sql.models.EncryptionProtector] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -93,6 +94,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -103,12 +109,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.EncryptionProtectorPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.EncryptionProtectorPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.EncryptionProtectorPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector'} @@ -167,7 +171,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('EncryptionProtector', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_database_blob_auditing_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_database_blob_auditing_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_database_blob_auditing_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_database_blob_auditing_policies_operations.py index 38bdfb2a0875..ea9c9d8d7aaf 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_database_blob_auditing_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_database_blob_auditing_policies_operations.py @@ -19,6 +19,8 @@ class ExtendedDatabaseBlobAuditingPoliciesOperations(object): """ExtendedDatabaseBlobAuditingPoliciesOperations 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. @@ -97,7 +99,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ExtendedDatabaseBlobAuditingPolicy', response) @@ -173,7 +174,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ExtendedDatabaseBlobAuditingPolicy', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_server_blob_auditing_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_server_blob_auditing_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_server_blob_auditing_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_server_blob_auditing_policies_operations.py index 64524eb42a17..dff8fac62031 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_server_blob_auditing_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_server_blob_auditing_policies_operations.py @@ -21,6 +21,8 @@ class ExtendedServerBlobAuditingPoliciesOperations(object): """ExtendedServerBlobAuditingPoliciesOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ExtendedServerBlobAuditingPolicy', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/failover_groups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_failover_groups_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/failover_groups_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_failover_groups_operations.py index fb779255c2a8..797c0d27ab17 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/failover_groups_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_failover_groups_operations.py @@ -21,6 +21,8 @@ class FailoverGroupsOperations(object): """FailoverGroupsOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('FailoverGroup', response) @@ -430,8 +431,7 @@ def list_by_server( ~azure.mgmt.sql.models.FailoverGroupPaged[~azure.mgmt.sql.models.FailoverGroup] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -462,6 +462,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -472,12 +477,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.FailoverGroupPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.FailoverGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.FailoverGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/firewall_rules_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_firewall_rules_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/firewall_rules_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_firewall_rules_operations.py index 7f62a3fa0811..e211cff58cbb 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/firewall_rules_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_firewall_rules_operations.py @@ -19,6 +19,8 @@ class FirewallRulesOperations(object): """FirewallRulesOperations 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. @@ -107,7 +109,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('FirewallRule', response) if response.status_code == 201: @@ -234,7 +235,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('FirewallRule', response) @@ -265,8 +265,7 @@ def list_by_server( ~azure.mgmt.sql.models.FirewallRulePaged[~azure.mgmt.sql.models.FirewallRule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -297,6 +296,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -307,12 +311,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.FirewallRulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.FirewallRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.FirewallRulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/geo_backup_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_geo_backup_policies_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/geo_backup_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_geo_backup_policies_operations.py index bd81aeca5fa6..e3b1cc9cd7ec 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/geo_backup_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_geo_backup_policies_operations.py @@ -19,6 +19,8 @@ class GeoBackupPoliciesOperations(object): """GeoBackupPoliciesOperations 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. @@ -105,7 +107,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('GeoBackupPolicy', response) if response.status_code == 201: @@ -175,7 +176,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('GeoBackupPolicy', response) @@ -208,8 +208,7 @@ def list_by_database( ~azure.mgmt.sql.models.GeoBackupPolicyPaged[~azure.mgmt.sql.models.GeoBackupPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -241,6 +240,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -251,12 +255,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.GeoBackupPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.GeoBackupPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.GeoBackupPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/instance_failover_groups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_failover_groups_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/instance_failover_groups_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_failover_groups_operations.py index 795d169692ab..33960af71031 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/instance_failover_groups_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_failover_groups_operations.py @@ -21,6 +21,8 @@ class InstanceFailoverGroupsOperations(object): """InstanceFailoverGroupsOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('InstanceFailoverGroup', response) @@ -323,8 +324,7 @@ def list_by_location( ~azure.mgmt.sql.models.InstanceFailoverGroupPaged[~azure.mgmt.sql.models.InstanceFailoverGroup] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_location.metadata['url'] @@ -355,6 +355,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -365,12 +370,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.InstanceFailoverGroupPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.InstanceFailoverGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.InstanceFailoverGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_pools_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_pools_operations.py new file mode 100644 index 000000000000..43721ed26b1b --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_pools_operations.py @@ -0,0 +1,534 @@ +# 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 InstancePoolsOperations(object): + """InstancePoolsOperations 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: The API version to use for the request. Constant value: "2018-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01-preview" + + self.config = config + + def get( + self, resource_group_name, instance_pool_name, custom_headers=None, raw=False, **operation_config): + """Gets an instance pool. + + :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 instance_pool_name: The name of the instance pool to be + retrieved. + :type instance_pool_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: InstancePool or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.InstancePool or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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('InstancePool', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}'} + + + def _create_or_update_initial( + self, resource_group_name, instance_pool_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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(parameters, 'InstancePool') + + # 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, 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('InstancePool', response) + if response.status_code == 201: + deserialized = self._deserialize('InstancePool', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, instance_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates an instance pool. + + :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 instance_pool_name: The name of the instance pool to be created + or updated. + :type instance_pool_name: str + :param parameters: The requested instance pool resource state. + :type parameters: ~azure.mgmt.sql.models.InstancePool + :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 InstancePool or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.InstancePool] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.InstancePool]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + instance_pool_name=instance_pool_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('InstancePool', 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.Sql/instancePools/{instancePoolName}'} + + + def _delete_initial( + self, resource_group_name, instance_pool_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, instance_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an instance pool. + + :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 instance_pool_name: The name of the instance pool to be deleted + :type instance_pool_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, + instance_pool_name=instance_pool_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.Sql/instancePools/{instancePoolName}'} + + + def _update_initial( + self, resource_group_name, instance_pool_name, tags=None, custom_headers=None, raw=False, **operation_config): + parameters = models.InstancePoolUpdate(tags=tags) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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(parameters, 'InstancePoolUpdate') + + # 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('InstancePool', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, instance_pool_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates an instance pool. + + :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 instance_pool_name: The name of the instance pool to be + updated. + :type instance_pool_name: str + :param tags: Resource tags. + :type tags: dict[str, 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 InstancePool or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.InstancePool] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.InstancePool]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + instance_pool_name=instance_pool_name, + tags=tags, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('InstancePool', 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.Sql/instancePools/{instancePoolName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of instance pools in the resource group. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :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: An iterator like instance of InstancePool + :rtype: + ~azure.mgmt.sql.models.InstancePoolPaged[~azure.mgmt.sql.models.InstancePool] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.InstancePoolPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of all instance pools in the subscription. + + :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: An iterator like instance of InstancePool + :rtype: + ~azure.mgmt.sql.models.InstancePoolPaged[~azure.mgmt.sql.models.InstancePool] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.InstancePoolPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/instancePools'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_agents_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_agents_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_agents_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_agents_operations.py index eaeb4480cab8..a6641946abaf 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_agents_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_agents_operations.py @@ -21,6 +21,8 @@ class JobAgentsOperations(object): """JobAgentsOperations 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. @@ -59,8 +61,7 @@ def list_by_server( ~azure.mgmt.sql.models.JobAgentPaged[~azure.mgmt.sql.models.JobAgent] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -91,6 +92,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -101,12 +107,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobAgentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobAgentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobAgentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents'} @@ -167,7 +171,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobAgent', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_credentials_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_credentials_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_credentials_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_credentials_operations.py index 309d5212b81e..9c469c605600 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_credentials_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_credentials_operations.py @@ -19,6 +19,8 @@ class JobCredentialsOperations(object): """JobCredentialsOperations 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. @@ -59,8 +61,7 @@ def list_by_agent( ~azure.mgmt.sql.models.JobCredentialPaged[~azure.mgmt.sql.models.JobCredential] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_agent.metadata['url'] @@ -92,6 +93,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -102,12 +108,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobCredentialPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobCredentialPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobCredentialPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials'} @@ -171,7 +175,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobCredential', response) @@ -251,7 +254,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobCredential', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_executions_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_executions_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_executions_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_executions_operations.py index f874991f8510..71885bdb661e 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_executions_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_executions_operations.py @@ -21,6 +21,8 @@ class JobExecutionsOperations(object): """JobExecutionsOperations 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. @@ -80,8 +82,7 @@ def list_by_agent( ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_agent.metadata['url'] @@ -127,6 +128,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -137,12 +143,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/executions'} @@ -357,8 +361,7 @@ def list_by_job( ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_job.metadata['url'] @@ -405,6 +408,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -415,12 +423,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions'} @@ -487,7 +493,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobExecution', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_step_executions_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_step_executions_operations.py similarity index 96% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_step_executions_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_step_executions_operations.py index 92c6442fc7e5..8410a94138e8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_step_executions_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_step_executions_operations.py @@ -19,6 +19,8 @@ class JobStepExecutionsOperations(object): """JobStepExecutionsOperations 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. @@ -82,8 +84,7 @@ def list_by_job_execution( ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_job_execution.metadata['url'] @@ -131,6 +132,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -141,12 +147,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_job_execution.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps'} @@ -216,7 +220,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobExecution', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_steps_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_steps_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_steps_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_steps_operations.py index a37bfc3f4474..e7383e961171 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_steps_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_steps_operations.py @@ -19,6 +19,8 @@ class JobStepsOperations(object): """JobStepsOperations 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. @@ -63,8 +65,7 @@ def list_by_version( ~azure.mgmt.sql.models.JobStepPaged[~azure.mgmt.sql.models.JobStep] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_version.metadata['url'] @@ -98,6 +99,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -108,12 +114,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobStepPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobStepPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobStepPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps'} @@ -183,7 +187,6 @@ def get_by_version( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobStep', response) @@ -218,8 +221,7 @@ def list_by_job( ~azure.mgmt.sql.models.JobStepPaged[~azure.mgmt.sql.models.JobStep] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_job.metadata['url'] @@ -252,6 +254,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -262,12 +269,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobStepPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobStepPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobStepPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps'} @@ -334,7 +339,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobStep', response) @@ -414,7 +418,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobStep', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_executions_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_executions_operations.py similarity index 96% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_executions_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_executions_operations.py index 6c664709c063..a6722c0278bc 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_executions_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_executions_operations.py @@ -19,6 +19,8 @@ class JobTargetExecutionsOperations(object): """JobTargetExecutionsOperations 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. @@ -82,8 +84,7 @@ def list_by_job_execution( ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_job_execution.metadata['url'] @@ -131,6 +132,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -141,12 +147,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_job_execution.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/targets'} @@ -198,8 +202,7 @@ def list_by_step( ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_step.metadata['url'] @@ -248,6 +251,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -258,12 +266,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_step.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets'} @@ -336,7 +342,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobExecution', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_groups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_groups_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_groups_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_groups_operations.py index 6a8bf6eed349..a3769c0e2bcb 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_groups_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_groups_operations.py @@ -19,6 +19,8 @@ class JobTargetGroupsOperations(object): """JobTargetGroupsOperations 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. @@ -59,8 +61,7 @@ def list_by_agent( ~azure.mgmt.sql.models.JobTargetGroupPaged[~azure.mgmt.sql.models.JobTargetGroup] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_agent.metadata['url'] @@ -92,6 +93,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -102,12 +108,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobTargetGroupPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobTargetGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobTargetGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups'} @@ -171,7 +175,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobTargetGroup', response) @@ -249,7 +252,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobTargetGroup', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_versions_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_versions_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_versions_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_versions_operations.py index d03635534ff4..da92973e0695 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_versions_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_versions_operations.py @@ -19,6 +19,8 @@ class JobVersionsOperations(object): """JobVersionsOperations 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. @@ -61,8 +63,7 @@ def list_by_job( ~azure.mgmt.sql.models.JobVersionPaged[~azure.mgmt.sql.models.JobVersion] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_job.metadata['url'] @@ -95,6 +96,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -105,12 +111,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobVersionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobVersionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobVersionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions'} @@ -177,7 +181,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobVersion', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/jobs_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_jobs_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/jobs_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_jobs_operations.py index 2545fc1514e5..f0830d089829 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/jobs_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_jobs_operations.py @@ -19,6 +19,8 @@ class JobsOperations(object): """JobsOperations 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. @@ -58,8 +60,7 @@ def list_by_agent( :rtype: ~azure.mgmt.sql.models.JobPaged[~azure.mgmt.sql.models.Job] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_agent.metadata['url'] @@ -91,6 +92,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -101,12 +107,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs'} @@ -170,7 +174,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Job', response) @@ -250,7 +253,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Job', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_backups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_backups_operations.py new file mode 100644 index 000000000000..55a0bbdd777a --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_backups_operations.py @@ -0,0 +1,880 @@ +# 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 LongTermRetentionBackupsOperations(object): + """LongTermRetentionBackupsOperations 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: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-01-preview" + + self.config = config + + def get_by_resource_group( + self, resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): + """Gets a long term retention backup. + + :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 location_name: The location of the database. + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param backup_name: The backup name. + :type backup_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: LongTermRetentionBackup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.LongTermRetentionBackup or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'backupName': self._serialize.url("backup_name", backup_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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('LongTermRetentionBackup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} + + + def _delete_by_resource_group_initial( + self, resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'backupName': self._serialize.url("backup_name", backup_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.delete(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete_by_resource_group( + self, resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a long term retention backup. + + :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 location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param backup_name: The backup name. + :type backup_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_by_resource_group_initial( + resource_group_name=resource_group_name, + location_name=location_name, + long_term_retention_server_name=long_term_retention_server_name, + long_term_retention_database_name=long_term_retention_database_name, + backup_name=backup_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_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} + + def list_by_resource_group_database( + self, resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists all long term retention backups for a database. + + :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 location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group_database.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups'} + + def list_by_resource_group_location( + self, resource_group_name, location_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists the long term retention backups for a given location. + + :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 location_name: The location of the database + :type location_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group_location.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group_location.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups'} + + def list_by_resource_group_server( + self, resource_group_name, location_name, long_term_retention_server_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists the long term retention backups for a given 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 location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group_server.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups'} + + def get( + self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): + """Gets a long term retention backup. + + :param location_name: The location of the database. + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param backup_name: The backup name. + :type backup_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: LongTermRetentionBackup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.LongTermRetentionBackup or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'backupName': self._serialize.url("backup_name", backup_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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('LongTermRetentionBackup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} + + + def _delete_initial( + self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'backupName': self._serialize.url("backup_name", backup_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.delete(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a long term retention backup. + + :param location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param backup_name: The backup name. + :type backup_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( + location_name=location_name, + long_term_retention_server_name=long_term_retention_server_name, + long_term_retention_database_name=long_term_retention_database_name, + backup_name=backup_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}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} + + def list_by_database( + self, location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists all long term retention backups for a database. + + :param location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_database.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups'} + + def list_by_location( + self, location_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists the long term retention backups for a given location. + + :param location_name: The location of the database + :type location_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_location.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups'} + + def list_by_server( + self, location_name, long_term_retention_server_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists the long term retention backups for a given server. + + :param location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_backup_short_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_backup_short_term_retention_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_backup_short_term_retention_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_backup_short_term_retention_policies_operations.py index 8f50f44b5354..475f8b2228e1 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_backup_short_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_backup_short_term_retention_policies_operations.py @@ -21,6 +21,8 @@ class ManagedBackupShortTermRetentionPoliciesOperations(object): """ManagedBackupShortTermRetentionPoliciesOperations 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. @@ -99,7 +101,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedBackupShortTermRetentionPolicy', response) @@ -355,8 +356,7 @@ def list_by_database( ~azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicyPaged[~azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -388,6 +388,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -398,12 +403,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_security_alert_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_security_alert_policies_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_security_alert_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_security_alert_policies_operations.py index 87ba42c8193a..c1f7467d795c 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_security_alert_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_security_alert_policies_operations.py @@ -19,6 +19,8 @@ class ManagedDatabaseSecurityAlertPoliciesOperations(object): """ManagedDatabaseSecurityAlertPoliciesOperations 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. @@ -98,7 +100,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedDatabaseSecurityAlertPolicy', response) @@ -175,7 +176,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedDatabaseSecurityAlertPolicy', response) if response.status_code == 201: @@ -212,8 +212,7 @@ def list_by_database( ~azure.mgmt.sql.models.ManagedDatabaseSecurityAlertPolicyPaged[~azure.mgmt.sql.models.ManagedDatabaseSecurityAlertPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -245,6 +244,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -255,12 +259,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedDatabaseSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedDatabaseSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedDatabaseSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_sensitivity_labels_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_sensitivity_labels_operations.py similarity index 70% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_sensitivity_labels_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_sensitivity_labels_operations.py index 1b03564854f8..5ff97dd77a49 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_sensitivity_labels_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_sensitivity_labels_operations.py @@ -19,12 +19,13 @@ class ManagedDatabaseSensitivityLabelsOperations(object): """ManagedDatabaseSensitivityLabelsOperations 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: The API version to use for the request. Constant value: "2018-06-01-preview". - :ivar sensitivity_label_source: The source of the sensitivity label. Constant value: "current". """ models = models @@ -35,7 +36,6 @@ def __init__(self, client, config, serializer, deserializer): self._serialize = serializer self._deserialize = deserializer self.api_version = "2018-06-01-preview" - self.sensitivity_label_source = "current" self.config = config @@ -109,7 +109,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SensitivityLabel', response) @@ -150,6 +149,8 @@ def create_or_update( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + sensitivity_label_source = "current" + # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { @@ -159,7 +160,7 @@ def create_or_update( 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), 'tableName': self._serialize.url("table_name", table_name, 'str'), 'columnName': self._serialize.url("column_name", column_name, 'str'), - 'sensitivityLabelSource': self._serialize.url("self.sensitivity_label_source", self.sensitivity_label_source, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -192,7 +193,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SensitivityLabel', response) if response.status_code == 201: @@ -232,6 +232,8 @@ def delete( :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + sensitivity_label_source = "current" + # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -241,7 +243,7 @@ def delete( 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), 'tableName': self._serialize.url("table_name", table_name, 'str'), 'columnName': self._serialize.url("column_name", column_name, 'str'), - 'sensitivityLabelSource': self._serialize.url("self.sensitivity_label_source", self.sensitivity_label_source, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -273,6 +275,147 @@ def delete( return client_raw_response delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}'} + def disable_recommendation( + self, resource_group_name, managed_instance_name, database_name, schema_name, table_name, column_name, custom_headers=None, raw=False, **operation_config): + """Disables sensitivity recommendations on a given column. + + :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 managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param database_name: The name of the database. + :type database_name: str + :param schema_name: The name of the schema. + :type schema_name: str + :param table_name: The name of the table. + :type table_name: str + :param column_name: The name of the column. + :type column_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` + """ + sensitivity_label_source = "recommended" + + # Construct URL + url = self.disable_recommendation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str'), + 'columnName': self._serialize.url("column_name", column_name, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_recommendation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable'} + + def enable_recommendation( + self, resource_group_name, managed_instance_name, database_name, schema_name, table_name, column_name, custom_headers=None, raw=False, **operation_config): + """Enables sensitivity recommendations on a given column (recommendations + are enabled by default on all columns). + + :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 managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param database_name: The name of the database. + :type database_name: str + :param schema_name: The name of the schema. + :type schema_name: str + :param table_name: The name of the table. + :type table_name: str + :param column_name: The name of the column. + :type column_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` + """ + sensitivity_label_source = "recommended" + + # Construct URL + url = self.enable_recommendation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str'), + 'columnName': self._serialize.url("column_name", column_name, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + enable_recommendation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable'} + def list_current_by_database( self, resource_group_name, managed_instance_name, database_name, filter=None, custom_headers=None, raw=False, **operation_config): """Gets the sensitivity labels of a given database. @@ -298,8 +441,7 @@ def list_current_by_database( ~azure.mgmt.sql.models.SensitivityLabelPaged[~azure.mgmt.sql.models.SensitivityLabel] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_current_by_database.metadata['url'] @@ -333,6 +475,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -343,18 +490,16 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_current_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels'} def list_recommended_by_database( - self, resource_group_name, managed_instance_name, database_name, skip_token=None, filter=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, managed_instance_name, database_name, include_disabled_recommendations=None, skip_token=None, filter=None, custom_headers=None, raw=False, **operation_config): """Gets the sensitivity labels of a given database. :param resource_group_name: The name of the resource group that @@ -365,6 +510,9 @@ def list_recommended_by_database( :type managed_instance_name: str :param database_name: The name of the database. :type database_name: str + :param include_disabled_recommendations: Specifies whether to include + disabled recommendations or not. + :type include_disabled_recommendations: bool :param skip_token: :type skip_token: str :param filter: An OData filter expression that filters elements in the @@ -380,8 +528,7 @@ def list_recommended_by_database( ~azure.mgmt.sql.models.SensitivityLabelPaged[~azure.mgmt.sql.models.SensitivityLabel] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_recommended_by_database.metadata['url'] @@ -395,6 +542,8 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} + if include_disabled_recommendations is not None: + query_parameters['includeDisabledRecommendations'] = self._serialize.query("include_disabled_recommendations", include_disabled_recommendations, 'bool') if skip_token is not None: query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') if filter is not None: @@ -417,6 +566,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -427,12 +581,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_recommended_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/recommendedSensitivityLabels'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_rule_baselines_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_rule_baselines_operations.py similarity index 99% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_rule_baselines_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_rule_baselines_operations.py index bf5121b3707b..2c4017b6193b 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_rule_baselines_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_rule_baselines_operations.py @@ -19,6 +19,8 @@ class ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations(object): """ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations 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. @@ -109,7 +111,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentRuleBaseline', response) @@ -199,7 +200,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentRuleBaseline', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_scans_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_scans_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_scans_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_scans_operations.py index d45dc1beb3b7..e3a2b20ffdc4 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_scans_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_scans_operations.py @@ -21,6 +21,8 @@ class ManagedDatabaseVulnerabilityAssessmentScansOperations(object): """ManagedDatabaseVulnerabilityAssessmentScansOperations 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. @@ -64,8 +66,7 @@ def list_by_database( ~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecordPaged[~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecord] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -98,6 +99,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -108,12 +114,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans'} @@ -180,7 +184,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VulnerabilityAssessmentScanRecord', response) @@ -345,7 +348,6 @@ def export( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentScansExport', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessments_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessments_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessments_operations.py index 6c224244c8fc..c5d8e57cb81f 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessments_operations.py @@ -19,6 +19,8 @@ class ManagedDatabaseVulnerabilityAssessmentsOperations(object): """ManagedDatabaseVulnerabilityAssessmentsOperations 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. @@ -98,7 +100,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessment', response) @@ -175,7 +176,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessment', response) if response.status_code == 201: @@ -271,8 +271,7 @@ def list_by_database( ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentPaged[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessment] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -304,6 +303,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -314,12 +318,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_databases_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_databases_operations.py index e2b8d02ae534..9825283b3ab6 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_databases_operations.py @@ -21,6 +21,8 @@ class ManagedDatabasesOperations(object): """ManagedDatabasesOperations 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. @@ -149,8 +151,7 @@ def list_by_instance( ~azure.mgmt.sql.models.ManagedDatabasePaged[~azure.mgmt.sql.models.ManagedDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -181,6 +182,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -191,12 +197,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases'} @@ -257,7 +261,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedDatabase', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_encryption_protectors_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_encryption_protectors_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_encryption_protectors_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_encryption_protectors_operations.py index 61ab8baa5d32..5c35d34aac66 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_encryption_protectors_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_encryption_protectors_operations.py @@ -21,6 +21,8 @@ class ManagedInstanceEncryptionProtectorsOperations(object): """ManagedInstanceEncryptionProtectorsOperations 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. @@ -62,8 +64,7 @@ def list_by_instance( ~azure.mgmt.sql.models.ManagedInstanceEncryptionProtectorPaged[~azure.mgmt.sql.models.ManagedInstanceEncryptionProtector] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -94,6 +95,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -104,12 +110,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedInstanceEncryptionProtectorPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedInstanceEncryptionProtectorPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedInstanceEncryptionProtectorPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector'} @@ -169,7 +173,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedInstanceEncryptionProtector', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_keys_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_keys_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_keys_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_keys_operations.py index adb5c4bfa0f0..7d7876efc7bd 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_keys_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_keys_operations.py @@ -21,6 +21,8 @@ class ManagedInstanceKeysOperations(object): """ManagedInstanceKeysOperations 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. @@ -62,8 +64,7 @@ def list_by_instance( ~azure.mgmt.sql.models.ManagedInstanceKeyPaged[~azure.mgmt.sql.models.ManagedInstanceKey] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -96,6 +97,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -106,12 +112,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedInstanceKeyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedInstanceKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedInstanceKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys'} @@ -172,7 +176,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedInstanceKey', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_tde_certificates_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_tde_certificates_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_tde_certificates_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_tde_certificates_operations.py index be4ee1969fdd..c3f3e3fdc8e5 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_tde_certificates_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_tde_certificates_operations.py @@ -21,6 +21,8 @@ class ManagedInstanceTdeCertificatesOperations(object): """ManagedInstanceTdeCertificatesOperations 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. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_vulnerability_assessments_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_vulnerability_assessments_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_vulnerability_assessments_operations.py index 601294eb6777..04c452d37993 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_vulnerability_assessments_operations.py @@ -19,6 +19,8 @@ class ManagedInstanceVulnerabilityAssessmentsOperations(object): """ManagedInstanceVulnerabilityAssessmentsOperations 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. @@ -95,7 +97,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedInstanceVulnerabilityAssessment', response) @@ -169,7 +170,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedInstanceVulnerabilityAssessment', response) if response.status_code == 201: @@ -261,8 +261,7 @@ def list_by_instance( ~azure.mgmt.sql.models.ManagedInstanceVulnerabilityAssessmentPaged[~azure.mgmt.sql.models.ManagedInstanceVulnerabilityAssessment] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -293,6 +292,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -303,12 +307,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedInstanceVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedInstanceVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedInstanceVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instances_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instances_operations.py similarity index 84% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instances_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instances_operations.py index 1fee247c7c96..c1cb3d973264 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instances_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instances_operations.py @@ -21,11 +21,13 @@ class ManagedInstancesOperations(object): """ManagedInstancesOperations 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: The API version to use for the request. Constant value: "2015-05-01-preview". + :ivar api_version: The API version to use for the request. Constant value: "2018-06-01-preview". """ models = models @@ -35,14 +37,20 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-05-01-preview" + self.api_version = "2018-06-01-preview" self.config = config - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of all managed instances in the subscription. + def list_by_instance_pool( + self, resource_group_name, instance_pool_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of all managed instances in an instance pool. + :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 instance_pool_name: The instance pool name. + :type instance_pool_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 @@ -53,12 +61,13 @@ def list( ~azure.mgmt.sql.models.ManagedInstancePaged[~azure.mgmt.sql.models.ManagedInstance] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list_by_instance_pool.metadata['url'] path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -83,6 +92,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -93,15 +107,13 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances'} + list_by_instance_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/managedInstances'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -121,8 +133,7 @@ def list_by_resource_group( ~azure.mgmt.sql.models.ManagedInstancePaged[~azure.mgmt.sql.models.ManagedInstance] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -152,6 +163,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -162,12 +178,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances'} @@ -225,7 +239,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedInstance', response) @@ -522,3 +535,69 @@ def get_long_running_output(response): 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.Sql/managedInstances/{managedInstanceName}'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of all managed instances in the subscription. + + :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: An iterator like instance of ManagedInstance + :rtype: + ~azure.mgmt.sql.models.ManagedInstancePaged[~azure.mgmt.sql.models.ManagedInstance] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py index df833033a1b9..882500ff53e5 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py @@ -21,6 +21,8 @@ class ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations(object): """ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations 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. @@ -99,7 +101,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedBackupShortTermRetentionPolicy', response) @@ -355,8 +356,7 @@ def list_by_restorable_dropped_database( ~azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicyPaged[~azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_restorable_dropped_database.metadata['url'] @@ -388,6 +388,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -398,12 +403,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_restorable_dropped_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_server_security_alert_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_server_security_alert_policies_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_server_security_alert_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_server_security_alert_policies_operations.py index 16ad81dac173..1f75bd170197 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_server_security_alert_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_server_security_alert_policies_operations.py @@ -21,6 +21,8 @@ class ManagedServerSecurityAlertPoliciesOperations(object): """ManagedServerSecurityAlertPoliciesOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedServerSecurityAlertPolicy', response) @@ -232,8 +233,7 @@ def list_by_instance( ~azure.mgmt.sql.models.ManagedServerSecurityAlertPolicyPaged[~azure.mgmt.sql.models.ManagedServerSecurityAlertPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -264,6 +264,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -274,12 +279,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/securityAlertPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_operations.py similarity index 90% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_operations.py index 5f8f397a39b9..7ccdf683aa8a 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_operations.py @@ -19,6 +19,8 @@ class Operations(object): """Operations 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. @@ -51,8 +53,7 @@ def list( ~azure.mgmt.sql.models.OperationPaged[~azure.mgmt.sql.models.Operation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -77,6 +78,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -87,12 +93,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.Sql/operations'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recommended_elastic_pools_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recommended_elastic_pools_operations.py similarity index 94% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recommended_elastic_pools_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recommended_elastic_pools_operations.py index 960bd52a034b..95c89bf1df1b 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recommended_elastic_pools_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recommended_elastic_pools_operations.py @@ -19,6 +19,8 @@ class RecommendedElasticPoolsOperations(object): """RecommendedElasticPoolsOperations 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. @@ -94,7 +96,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RecommendedElasticPool', response) @@ -125,8 +126,7 @@ def list_by_server( ~azure.mgmt.sql.models.RecommendedElasticPoolPaged[~azure.mgmt.sql.models.RecommendedElasticPool] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -157,6 +157,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -167,12 +172,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RecommendedElasticPoolPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RecommendedElasticPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RecommendedElasticPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools'} @@ -200,8 +203,7 @@ def list_metrics( ~azure.mgmt.sql.models.RecommendedElasticPoolMetricPaged[~azure.mgmt.sql.models.RecommendedElasticPoolMetric] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metrics.metadata['url'] @@ -233,6 +235,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -243,12 +250,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RecommendedElasticPoolMetricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RecommendedElasticPoolMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RecommendedElasticPoolMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}/metrics'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_databases_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_databases_operations.py index 87b5873c5619..178abf85f1b5 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_databases_operations.py @@ -19,6 +19,8 @@ class RecoverableDatabasesOperations(object): """RecoverableDatabasesOperations 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. @@ -94,7 +96,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RecoverableDatabase', response) @@ -125,8 +126,7 @@ def list_by_server( ~azure.mgmt.sql.models.RecoverableDatabasePaged[~azure.mgmt.sql.models.RecoverableDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -157,6 +157,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -167,12 +172,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RecoverableDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RecoverableDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RecoverableDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_managed_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_managed_databases_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_managed_databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_managed_databases_operations.py index d8bf8cbb6665..2595a4069152 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_managed_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_managed_databases_operations.py @@ -19,6 +19,8 @@ class RecoverableManagedDatabasesOperations(object): """RecoverableManagedDatabasesOperations 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. @@ -57,8 +59,7 @@ def list_by_instance( ~azure.mgmt.sql.models.RecoverableManagedDatabasePaged[~azure.mgmt.sql.models.RecoverableManagedDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -89,6 +90,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -99,12 +105,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RecoverableManagedDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RecoverableManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RecoverableManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/recoverableDatabases'} @@ -165,7 +169,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RecoverableManagedDatabase', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/replication_links_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_replication_links_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/replication_links_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_replication_links_operations.py index d3d3cee87622..bebd9d62e04d 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/replication_links_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_replication_links_operations.py @@ -21,6 +21,8 @@ class ReplicationLinksOperations(object): """ReplicationLinksOperations 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. @@ -160,7 +162,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ReplicationLink', response) @@ -375,8 +376,7 @@ def list_by_database( ~azure.mgmt.sql.models.ReplicationLinkPaged[~azure.mgmt.sql.models.ReplicationLink] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -408,6 +408,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -418,12 +423,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ReplicationLinkPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ReplicationLinkPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ReplicationLinkPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_databases_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_databases_operations.py index 0dfb4989691a..aa2480c63f73 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_databases_operations.py @@ -19,6 +19,8 @@ class RestorableDroppedDatabasesOperations(object): """RestorableDroppedDatabasesOperations 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. @@ -94,7 +96,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RestorableDroppedDatabase', response) @@ -125,8 +126,7 @@ def list_by_server( ~azure.mgmt.sql.models.RestorableDroppedDatabasePaged[~azure.mgmt.sql.models.RestorableDroppedDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -157,6 +157,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -167,12 +172,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RestorableDroppedDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RestorableDroppedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RestorableDroppedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_managed_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_managed_databases_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_managed_databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_managed_databases_operations.py index 58e81f79908a..0ef3d7b7c3c8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_managed_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_managed_databases_operations.py @@ -19,6 +19,8 @@ class RestorableDroppedManagedDatabasesOperations(object): """RestorableDroppedManagedDatabasesOperations 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. @@ -57,8 +59,7 @@ def list_by_instance( ~azure.mgmt.sql.models.RestorableDroppedManagedDatabasePaged[~azure.mgmt.sql.models.RestorableDroppedManagedDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -89,6 +90,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -99,12 +105,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RestorableDroppedManagedDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RestorableDroppedManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RestorableDroppedManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases'} @@ -166,7 +170,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RestorableDroppedManagedDatabase', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restore_points_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restore_points_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restore_points_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restore_points_operations.py index e5b49d9d1ed3..0a7f74a92b42 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restore_points_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restore_points_operations.py @@ -21,6 +21,8 @@ class RestorePointsOperations(object): """RestorePointsOperations 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. @@ -61,8 +63,7 @@ def list_by_database( ~azure.mgmt.sql.models.RestorePointPaged[~azure.mgmt.sql.models.RestorePoint] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -94,6 +95,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -104,12 +110,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RestorePointPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RestorePointPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RestorePointPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints'} @@ -283,7 +287,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RestorePoint', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sensitivity_labels_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sensitivity_labels_operations.py similarity index 70% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sensitivity_labels_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sensitivity_labels_operations.py index 5be551f7fd12..2cfb2974a8b8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sensitivity_labels_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sensitivity_labels_operations.py @@ -19,12 +19,13 @@ class SensitivityLabelsOperations(object): """SensitivityLabelsOperations 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: The API version to use for the request. Constant value: "2017-03-01-preview". - :ivar sensitivity_label_source: The source of the sensitivity label. Constant value: "current". """ models = models @@ -35,7 +36,6 @@ def __init__(self, client, config, serializer, deserializer): self._serialize = serializer self._deserialize = deserializer self.api_version = "2017-03-01-preview" - self.sensitivity_label_source = "current" self.config = config @@ -64,8 +64,7 @@ def list_current_by_database( ~azure.mgmt.sql.models.SensitivityLabelPaged[~azure.mgmt.sql.models.SensitivityLabel] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_current_by_database.metadata['url'] @@ -99,6 +98,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -109,18 +113,16 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_current_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/currentSensitivityLabels'} def list_recommended_by_database( - self, resource_group_name, server_name, database_name, skip_token=None, filter=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, server_name, database_name, include_disabled_recommendations=None, skip_token=None, filter=None, custom_headers=None, raw=False, **operation_config): """Gets the sensitivity labels of a given database. :param resource_group_name: The name of the resource group that @@ -131,6 +133,9 @@ def list_recommended_by_database( :type server_name: str :param database_name: The name of the database. :type database_name: str + :param include_disabled_recommendations: Specifies whether to include + disabled recommendations or not. + :type include_disabled_recommendations: bool :param skip_token: :type skip_token: str :param filter: An OData filter expression that filters elements in the @@ -146,8 +151,7 @@ def list_recommended_by_database( ~azure.mgmt.sql.models.SensitivityLabelPaged[~azure.mgmt.sql.models.SensitivityLabel] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_recommended_by_database.metadata['url'] @@ -161,6 +165,8 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} + if include_disabled_recommendations is not None: + query_parameters['includeDisabledRecommendations'] = self._serialize.query("include_disabled_recommendations", include_disabled_recommendations, 'bool') if skip_token is not None: query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') if filter is not None: @@ -183,6 +189,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -193,16 +204,155 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_recommended_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/recommendedSensitivityLabels'} + def enable_recommendation( + self, resource_group_name, server_name, database_name, schema_name, table_name, column_name, custom_headers=None, raw=False, **operation_config): + """Enables sensitivity recommendations on a given column (recommendations + are enabled by default on all columns). + + :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 server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param schema_name: The name of the schema. + :type schema_name: str + :param table_name: The name of the table. + :type table_name: str + :param column_name: The name of the column. + :type column_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` + """ + sensitivity_label_source = "recommended" + + # Construct URL + url = self.enable_recommendation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str'), + 'columnName': self._serialize.url("column_name", column_name, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + enable_recommendation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable'} + + def disable_recommendation( + self, resource_group_name, server_name, database_name, schema_name, table_name, column_name, custom_headers=None, raw=False, **operation_config): + """Disables sensitivity recommendations on a given column. + + :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 server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param schema_name: The name of the schema. + :type schema_name: str + :param table_name: The name of the table. + :type table_name: str + :param column_name: The name of the column. + :type column_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` + """ + sensitivity_label_source = "recommended" + + # Construct URL + url = self.disable_recommendation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str'), + 'columnName': self._serialize.url("column_name", column_name, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_recommendation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable'} + def get( self, resource_group_name, server_name, database_name, schema_name, table_name, column_name, sensitivity_label_source, custom_headers=None, raw=False, **operation_config): """Gets the sensitivity label of a given column. @@ -273,7 +423,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SensitivityLabel', response) @@ -314,6 +463,8 @@ def create_or_update( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + sensitivity_label_source = "current" + # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { @@ -323,7 +474,7 @@ def create_or_update( 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), 'tableName': self._serialize.url("table_name", table_name, 'str'), 'columnName': self._serialize.url("column_name", column_name, 'str'), - 'sensitivityLabelSource': self._serialize.url("self.sensitivity_label_source", self.sensitivity_label_source, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -356,7 +507,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SensitivityLabel', response) if response.status_code == 201: @@ -396,6 +546,8 @@ def delete( :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + sensitivity_label_source = "current" + # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -405,7 +557,7 @@ def delete( 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), 'tableName': self._serialize.url("table_name", table_name, 'str'), 'columnName': self._serialize.url("column_name", column_name, 'str'), - 'sensitivityLabelSource': self._serialize.url("self.sensitivity_label_source", self.sensitivity_label_source, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_automatic_tuning_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_automatic_tuning_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_automatic_tuning_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_automatic_tuning_operations.py index 675d886377c6..243174bc107d 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_automatic_tuning_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_automatic_tuning_operations.py @@ -19,6 +19,8 @@ class ServerAutomaticTuningOperations(object): """ServerAutomaticTuningOperations 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. @@ -90,7 +92,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerAutomaticTuning', response) @@ -167,7 +168,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerAutomaticTuning', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_azure_ad_administrators_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_administrators_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_azure_ad_administrators_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_administrators_operations.py index c7a66d57ea08..7fdf686673b7 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_azure_ad_administrators_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_administrators_operations.py @@ -21,6 +21,8 @@ class ServerAzureADAdministratorsOperations(object): """ServerAzureADAdministratorsOperations 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. @@ -306,7 +308,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerAzureADAdministrator', response) @@ -337,8 +338,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerAzureADAdministratorPaged[~azure.mgmt.sql.models.ServerAzureADAdministrator] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -369,6 +369,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -379,12 +384,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerAzureADAdministratorPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerAzureADAdministratorPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerAzureADAdministratorPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_blob_auditing_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_blob_auditing_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_blob_auditing_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_blob_auditing_policies_operations.py index ac7c8ef280ac..88cb823e64e9 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_blob_auditing_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_blob_auditing_policies_operations.py @@ -21,6 +21,8 @@ class ServerBlobAuditingPoliciesOperations(object): """ServerBlobAuditingPoliciesOperations 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. @@ -95,7 +97,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerBlobAuditingPolicy', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_communication_links_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_communication_links_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_communication_links_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_communication_links_operations.py index 2844c4068ea4..3a8782c7510f 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_communication_links_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_communication_links_operations.py @@ -21,6 +21,8 @@ class ServerCommunicationLinksOperations(object): """ServerCommunicationLinksOperations 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. @@ -155,7 +157,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerCommunicationLink', response) @@ -295,8 +296,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerCommunicationLinkPaged[~azure.mgmt.sql.models.ServerCommunicationLink] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -327,6 +327,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -337,12 +342,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerCommunicationLinkPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerCommunicationLinkPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerCommunicationLinkPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_connection_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_connection_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_connection_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_connection_policies_operations.py index c1d5c68e7f7f..4813f39f62ac 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_connection_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_connection_policies_operations.py @@ -19,6 +19,8 @@ class ServerConnectionPoliciesOperations(object): """ServerConnectionPoliciesOperations 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. @@ -103,7 +105,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerConnectionPolicy', response) if response.status_code == 201: @@ -170,7 +171,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerConnectionPolicy', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_dns_aliases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_dns_aliases_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_dns_aliases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_dns_aliases_operations.py index a4f79dfce854..d8ec5ec33941 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_dns_aliases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_dns_aliases_operations.py @@ -21,6 +21,8 @@ class ServerDnsAliasesOperations(object): """ServerDnsAliasesOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerDnsAlias', response) @@ -316,8 +317,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerDnsAliasPaged[~azure.mgmt.sql.models.ServerDnsAlias] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -348,6 +348,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -358,12 +363,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerDnsAliasPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerDnsAliasPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerDnsAliasPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_keys_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_keys_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_keys_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_keys_operations.py index e52b751d7eb8..ffbd75711807 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_keys_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_keys_operations.py @@ -21,6 +21,8 @@ class ServerKeysOperations(object): """ServerKeysOperations 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. @@ -59,8 +61,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerKeyPaged[~azure.mgmt.sql.models.ServerKey] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -91,6 +92,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -101,12 +107,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerKeyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys'} @@ -167,7 +171,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerKey', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_security_alert_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_security_alert_policies_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_security_alert_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_security_alert_policies_operations.py index 95e884990da2..b5b8e4d82427 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_security_alert_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_security_alert_policies_operations.py @@ -21,6 +21,8 @@ class ServerSecurityAlertPoliciesOperations(object): """ServerSecurityAlertPoliciesOperations 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. @@ -95,7 +97,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerSecurityAlertPolicy', response) @@ -230,8 +231,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerSecurityAlertPolicyPaged[~azure.mgmt.sql.models.ServerSecurityAlertPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -262,6 +262,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -272,12 +277,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_usages_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_usages_operations.py similarity index 92% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_usages_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_usages_operations.py index 4d60726ff42f..5ac207d27f69 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_usages_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_usages_operations.py @@ -19,6 +19,8 @@ class ServerUsagesOperations(object): """ServerUsagesOperations 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. @@ -57,8 +59,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerUsagePaged[~azure.mgmt.sql.models.ServerUsage] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -89,6 +90,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -99,12 +105,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerUsagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/usages'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_vulnerability_assessments_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_vulnerability_assessments_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_vulnerability_assessments_operations.py index ffe8dd567342..4caee1f1fb49 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_vulnerability_assessments_operations.py @@ -19,6 +19,8 @@ class ServerVulnerabilityAssessmentsOperations(object): """ServerVulnerabilityAssessmentsOperations 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. @@ -95,7 +97,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerVulnerabilityAssessment', response) @@ -168,7 +169,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerVulnerabilityAssessment', response) if response.status_code == 201: @@ -258,8 +258,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerVulnerabilityAssessmentPaged[~azure.mgmt.sql.models.ServerVulnerabilityAssessment] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -290,6 +289,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -300,12 +304,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/servers_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_servers_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/servers_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_servers_operations.py index 7abad6723542..16fd05d12be8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/servers_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_servers_operations.py @@ -21,6 +21,8 @@ class ServersOperations(object): """ServersOperations 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. @@ -93,7 +95,6 @@ def check_name_availability( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CheckNameAvailabilityResponse', response) @@ -120,8 +121,7 @@ def list( """ api_version = "2015-05-01-preview" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -150,6 +150,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -160,12 +165,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers'} @@ -190,8 +193,7 @@ def list_by_resource_group( """ api_version = "2015-05-01-preview" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -221,6 +223,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -231,12 +238,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers'} @@ -296,7 +301,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Server', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_objectives_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_objectives_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_objectives_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_objectives_operations.py index d4f53c7313af..f1ae98c7828e 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_objectives_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_objectives_operations.py @@ -19,6 +19,8 @@ class ServiceObjectivesOperations(object): """ServiceObjectivesOperations 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. @@ -94,7 +96,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceObjective', response) @@ -125,8 +126,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServiceObjectivePaged[~azure.mgmt.sql.models.ServiceObjective] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -157,6 +157,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -167,12 +172,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServiceObjectivePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServiceObjectivePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServiceObjectivePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/serviceObjectives'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_tier_advisors_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_tier_advisors_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_tier_advisors_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_tier_advisors_operations.py index cc9ba091db21..ff0328f21bd7 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_tier_advisors_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_tier_advisors_operations.py @@ -19,6 +19,8 @@ class ServiceTierAdvisorsOperations(object): """ServiceTierAdvisorsOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceTierAdvisor', response) @@ -129,8 +130,7 @@ def list_by_database( ~azure.mgmt.sql.models.ServiceTierAdvisorPaged[~azure.mgmt.sql.models.ServiceTierAdvisor] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -162,6 +162,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -172,12 +177,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServiceTierAdvisorPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServiceTierAdvisorPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServiceTierAdvisorPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/serviceTierAdvisors'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/subscription_usages_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_subscription_usages_operations.py similarity index 94% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/subscription_usages_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_subscription_usages_operations.py index b70973ca790e..355be5f6fd68 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/subscription_usages_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_subscription_usages_operations.py @@ -19,6 +19,8 @@ class SubscriptionUsagesOperations(object): """SubscriptionUsagesOperations 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. @@ -54,8 +56,7 @@ def list_by_location( ~azure.mgmt.sql.models.SubscriptionUsagePaged[~azure.mgmt.sql.models.SubscriptionUsage] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_location.metadata['url'] @@ -85,6 +86,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -95,12 +101,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SubscriptionUsagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SubscriptionUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SubscriptionUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages'} @@ -157,7 +161,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SubscriptionUsage', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_agents_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_agents_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_agents_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_agents_operations.py index 9ac0651a57d3..ec00730c027a 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_agents_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_agents_operations.py @@ -21,6 +21,8 @@ class SyncAgentsOperations(object): """SyncAgentsOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SyncAgent', response) @@ -326,8 +327,7 @@ def list_by_server( ~azure.mgmt.sql.models.SyncAgentPaged[~azure.mgmt.sql.models.SyncAgent] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -358,6 +358,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -368,12 +373,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncAgentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncAgentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncAgentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents'} @@ -435,7 +438,6 @@ def generate_key( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SyncAgentKeyProperties', response) @@ -469,8 +471,7 @@ def list_linked_databases( ~azure.mgmt.sql.models.SyncAgentLinkedDatabasePaged[~azure.mgmt.sql.models.SyncAgentLinkedDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_linked_databases.metadata['url'] @@ -502,6 +503,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -512,12 +518,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncAgentLinkedDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncAgentLinkedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncAgentLinkedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_linked_databases.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}/linkedDatabases'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_groups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_groups_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_groups_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_groups_operations.py index 484f24f33781..bf78088e717b 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_groups_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_groups_operations.py @@ -21,6 +21,8 @@ class SyncGroupsOperations(object): """SyncGroupsOperations 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. @@ -56,8 +58,7 @@ def list_sync_database_ids( ~azure.mgmt.sql.models.SyncDatabaseIdPropertiesPaged[~azure.mgmt.sql.models.SyncDatabaseIdProperties] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_sync_database_ids.metadata['url'] @@ -87,6 +88,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -97,12 +103,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncDatabaseIdPropertiesPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncDatabaseIdPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncDatabaseIdPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_sync_database_ids.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds'} @@ -222,8 +226,7 @@ def list_hub_schemas( ~azure.mgmt.sql.models.SyncFullSchemaPropertiesPaged[~azure.mgmt.sql.models.SyncFullSchemaProperties] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_hub_schemas.metadata['url'] @@ -256,6 +259,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -266,12 +274,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_hub_schemas.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/hubSchemas'} @@ -310,8 +316,7 @@ def list_logs( ~azure.mgmt.sql.models.SyncGroupLogPropertiesPaged[~azure.mgmt.sql.models.SyncGroupLogProperties] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_logs.metadata['url'] @@ -349,6 +354,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -359,12 +369,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncGroupLogPropertiesPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncGroupLogPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncGroupLogPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/logs'} @@ -553,7 +561,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SyncGroup', response) @@ -901,8 +908,7 @@ def list_by_database( ~azure.mgmt.sql.models.SyncGroupPaged[~azure.mgmt.sql.models.SyncGroup] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -934,6 +940,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -944,12 +955,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncGroupPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_members_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_members_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_members_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_members_operations.py index 4eab11133d05..23343d374072 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_members_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_members_operations.py @@ -21,6 +21,8 @@ class SyncMembersOperations(object): """SyncMembersOperations 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. @@ -103,7 +105,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SyncMember', response) @@ -468,8 +469,7 @@ def list_by_sync_group( ~azure.mgmt.sql.models.SyncMemberPaged[~azure.mgmt.sql.models.SyncMember] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_sync_group.metadata['url'] @@ -502,6 +502,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -512,12 +517,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncMemberPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncMemberPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncMemberPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_sync_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers'} @@ -550,8 +553,7 @@ def list_member_schemas( ~azure.mgmt.sql.models.SyncFullSchemaPropertiesPaged[~azure.mgmt.sql.models.SyncFullSchemaProperties] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_member_schemas.metadata['url'] @@ -585,6 +587,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -595,12 +602,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_member_schemas.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/schemas'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/tde_certificates_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_tde_certificates_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/tde_certificates_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_tde_certificates_operations.py index bc529a38043f..86037d49ca05 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/tde_certificates_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_tde_certificates_operations.py @@ -21,6 +21,8 @@ class TdeCertificatesOperations(object): """TdeCertificatesOperations 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. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryption_activities_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryption_activities_operations.py similarity index 93% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryption_activities_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryption_activities_operations.py index ae930a401246..6807645bd6c0 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryption_activities_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryption_activities_operations.py @@ -19,6 +19,8 @@ class TransparentDataEncryptionActivitiesOperations(object): """TransparentDataEncryptionActivitiesOperations 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. @@ -63,8 +65,7 @@ def list_by_configuration( ~azure.mgmt.sql.models.TransparentDataEncryptionActivityPaged[~azure.mgmt.sql.models.TransparentDataEncryptionActivity] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_configuration.metadata['url'] @@ -97,6 +98,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -107,12 +113,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.TransparentDataEncryptionActivityPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.TransparentDataEncryptionActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.TransparentDataEncryptionActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{transparentDataEncryptionName}/operationResults'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryptions_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryptions_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryptions_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryptions_operations.py index a0f3c8184f57..b497a7ee5656 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryptions_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryptions_operations.py @@ -19,6 +19,8 @@ class TransparentDataEncryptionsOperations(object): """TransparentDataEncryptionsOperations 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. @@ -108,7 +110,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('TransparentDataEncryption', response) if response.status_code == 201: @@ -179,7 +180,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('TransparentDataEncryption', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_usages_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_usages_operations.py new file mode 100644 index 000000000000..59164a38e347 --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_usages_operations.py @@ -0,0 +1,120 @@ +# 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 .. import models + + +class UsagesOperations(object): + """UsagesOperations 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: The API version to use for the request. Constant value: "2018-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01-preview" + + self.config = config + + def list_by_instance_pool( + self, resource_group_name, instance_pool_name, expand_children=None, custom_headers=None, raw=False, **operation_config): + """Gets all instance pool usage metrics. + + :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 instance_pool_name: The name of the instance pool to be + retrieved. + :type instance_pool_name: str + :param expand_children: Optional request parameter to include managed + instance usages within the instance pool. + :type expand_children: bool + :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: An iterator like instance of Usage + :rtype: + ~azure.mgmt.sql.models.UsagePaged[~azure.mgmt.sql.models.Usage] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_instance_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand_children is not None: + query_parameters['expandChildren'] = self._serialize.query("expand_children", expand_children, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_instance_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/usages'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_clusters_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_clusters_operations.py similarity index 96% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_clusters_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_clusters_operations.py index 90a685e001a5..b91ece534ef3 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_clusters_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_clusters_operations.py @@ -21,6 +21,8 @@ class VirtualClustersOperations(object): """VirtualClustersOperations 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. @@ -53,8 +55,7 @@ def list( ~azure.mgmt.sql.models.VirtualClusterPaged[~azure.mgmt.sql.models.VirtualCluster] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -83,6 +84,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -93,12 +99,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/virtualClusters'} @@ -121,8 +125,7 @@ def list_by_resource_group( ~azure.mgmt.sql.models.VirtualClusterPaged[~azure.mgmt.sql.models.VirtualCluster] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -152,6 +155,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -162,12 +170,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters'} @@ -225,7 +231,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VirtualCluster', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_network_rules_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_network_rules_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_network_rules_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_network_rules_operations.py index 01bc6f5bdf3e..3485f42e9f85 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_network_rules_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_network_rules_operations.py @@ -21,6 +21,8 @@ class VirtualNetworkRulesOperations(object): """VirtualNetworkRulesOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VirtualNetworkRule', response) @@ -329,8 +330,7 @@ def list_by_server( ~azure.mgmt.sql.models.VirtualNetworkRulePaged[~azure.mgmt.sql.models.VirtualNetworkRule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -361,6 +361,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -371,12 +376,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/long_term_retention_backups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/long_term_retention_backups_operations.py deleted file mode 100644 index c803786f5ff3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/long_term_retention_backups_operations.py +++ /dev/null @@ -1,441 +0,0 @@ -# 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 LongTermRetentionBackupsOperations(object): - """LongTermRetentionBackupsOperations operations. - - :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: The API version to use for the request. Constant value: "2017-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-01-preview" - - self.config = config - - def get( - self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): - """Gets a long term retention backup. - - :param location_name: The location of the database. - :type location_name: str - :param long_term_retention_server_name: The name of the server - :type long_term_retention_server_name: str - :param long_term_retention_database_name: The name of the database - :type long_term_retention_database_name: str - :param backup_name: The backup name. - :type backup_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: LongTermRetentionBackup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.LongTermRetentionBackup or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), - 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), - 'backupName': self._serialize.url("backup_name", backup_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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('LongTermRetentionBackup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} - - - def _delete_initial( - self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), - 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), - 'backupName': self._serialize.url("backup_name", backup_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - 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.delete(url, query_parameters, header_parameters) - 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a long term retention backup. - - :param location_name: The location of the database - :type location_name: str - :param long_term_retention_server_name: The name of the server - :type long_term_retention_server_name: str - :param long_term_retention_database_name: The name of the database - :type long_term_retention_database_name: str - :param backup_name: The backup name. - :type backup_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( - location_name=location_name, - long_term_retention_server_name=long_term_retention_server_name, - long_term_retention_database_name=long_term_retention_database_name, - backup_name=backup_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}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} - - def list_by_database( - self, location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): - """Lists all long term retention backups for a database. - - :param location_name: The location of the database - :type location_name: str - :param long_term_retention_server_name: The name of the server - :type long_term_retention_server_name: str - :param long_term_retention_database_name: The name of the database - :type long_term_retention_database_name: str - :param only_latest_per_database: Whether or not to only get the latest - backup for each database. - :type only_latest_per_database: bool - :param database_state: Whether to query against just live databases, - just deleted databases, or all databases. Possible values include: - 'All', 'Live', 'Deleted' - :type database_state: str or - ~azure.mgmt.sql.models.LongTermRetentionDatabaseState - :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: An iterator like instance of LongTermRetentionBackup - :rtype: - ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_database.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), - 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if only_latest_per_database is not None: - query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') - if database_state is not None: - query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # 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 - - return response - - # Deserialize response - deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups'} - - def list_by_location( - self, location_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): - """Lists the long term retention backups for a given location. - - :param location_name: The location of the database - :type location_name: str - :param only_latest_per_database: Whether or not to only get the latest - backup for each database. - :type only_latest_per_database: bool - :param database_state: Whether to query against just live databases, - just deleted databases, or all databases. Possible values include: - 'All', 'Live', 'Deleted' - :type database_state: str or - ~azure.mgmt.sql.models.LongTermRetentionDatabaseState - :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: An iterator like instance of LongTermRetentionBackup - :rtype: - ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_location.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if only_latest_per_database is not None: - query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') - if database_state is not None: - query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # 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 - - return response - - # Deserialize response - deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups'} - - def list_by_server( - self, location_name, long_term_retention_server_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): - """Lists the long term retention backups for a given server. - - :param location_name: The location of the database - :type location_name: str - :param long_term_retention_server_name: The name of the server - :type long_term_retention_server_name: str - :param only_latest_per_database: Whether or not to only get the latest - backup for each database. - :type only_latest_per_database: bool - :param database_state: Whether to query against just live databases, - just deleted databases, or all databases. Possible values include: - 'All', 'Live', 'Deleted' - :type database_state: str or - ~azure.mgmt.sql.models.LongTermRetentionDatabaseState - :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: An iterator like instance of LongTermRetentionBackup - :rtype: - ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if only_latest_per_database is not None: - query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') - if database_state is not None: - query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # 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 - - return response - - # Deserialize response - deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups'} From 6258db5275b815dfe54ca77fbce130308c764ebb Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Wed, 24 Jul 2019 17:41:59 -0700 Subject: [PATCH 031/244] Trace identity (#6455) * make sure its int. Need it to pass the test * added policy and decorator * dont decorate authn * loggin policy behind retry policy * managed should not be decoratored * dont need my workaround * dont trace get_token * dont need this extra indent --- .../azure-identity/azure/identity/_authn_client.py | 3 ++- .../azure-identity/azure/identity/aio/_authn_client.py | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/sdk/identity/azure-identity/azure/identity/_authn_client.py b/sdk/identity/azure-identity/azure/identity/_authn_client.py index 14d86ff8c9f7..09fc166d917e 100644 --- a/sdk/identity/azure-identity/azure/identity/_authn_client.py +++ b/sdk/identity/azure-identity/azure/identity/_authn_client.py @@ -10,6 +10,7 @@ from azure.core.exceptions import ClientAuthenticationError from azure.core.pipeline import Pipeline from azure.core.pipeline.policies import ContentDecodePolicy, NetworkTraceLoggingPolicy, RetryPolicy +from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy from azure.core.pipeline.transport import HttpTransport, RequestsTransport from msal import TokenCache @@ -119,7 +120,7 @@ class AuthnClient(AuthnClientBase): def __init__(self, auth_url, config=None, policies=None, transport=None, **kwargs): # type: (str, Optional[Configuration], Optional[Iterable[HTTPPolicy]], Optional[HttpTransport], Mapping[str, Any]) -> None config = config or self.create_config(**kwargs) - policies = policies or [ContentDecodePolicy(), config.logging_policy, config.retry_policy] + policies = policies or [ContentDecodePolicy(), config.retry_policy, config.logging_policy, DistributedTracingPolicy()] if not transport: transport = RequestsTransport(**kwargs) self._pipeline = Pipeline(transport=transport, policies=policies) diff --git a/sdk/identity/azure-identity/azure/identity/aio/_authn_client.py b/sdk/identity/azure-identity/azure/identity/aio/_authn_client.py index 6b57a9d02d2d..4d75cd07b1a3 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/_authn_client.py +++ b/sdk/identity/azure-identity/azure/identity/aio/_authn_client.py @@ -8,6 +8,7 @@ from azure.core import Configuration from azure.core.credentials import AccessToken from azure.core.pipeline import AsyncPipeline +from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy from azure.core.pipeline.policies import AsyncRetryPolicy, ContentDecodePolicy, HTTPPolicy, NetworkTraceLoggingPolicy from azure.core.pipeline.transport import AsyncHttpTransport from azure.core.pipeline.transport.requests_asyncio import AsyncioRequestsTransport @@ -27,7 +28,12 @@ def __init__( **kwargs: Mapping[str, Any] ) -> None: config = config or self.create_config(**kwargs) - policies = policies or [ContentDecodePolicy(), config.logging_policy, config.retry_policy] + policies = policies or [ + ContentDecodePolicy(), + config.retry_policy, + config.logging_policy, + DistributedTracingPolicy(), + ] if not transport: transport = AsyncioRequestsTransport(**kwargs) self._pipeline = AsyncPipeline(transport=transport, policies=policies) From fb4ac5913e2780f78357e3164d84b27729d4790b Mon Sep 17 00:00:00 2001 From: Kate Olszewska Date: Thu, 25 Jul 2019 09:52:14 -0700 Subject: [PATCH 032/244] Update root README.md Updating the Contributing section according to the guidelines --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index de33c04f8fa3..e11a735c6574 100644 --- a/README.md +++ b/README.md @@ -53,9 +53,14 @@ Libraries which enable you to provision specific resources. They are responsible ## Contributing For details on contributing to this repository, see the [contributing guide](CONTRIBUTING.md). -## Code of Conduct +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit +https://cla.microsoft.com. -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2FREADME.png) From cadac8f88d0c890a8dbb758499736a6735d4b06d Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 10:16:27 -0700 Subject: [PATCH 033/244] Update CODEOWNERS --- .github/CODEOWNERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e7da96b211dc..518b5aa20c8c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -37,6 +37,9 @@ /sql/sql/ @jaredmoo /sdk/servicebus/azure-servicebus/ @annatisch +# Management Plane +/**/*mgmt*/ @zikalino + ########### # Eng Sys ########### From 8ef52837148e93318e6857a8197310bfb1390fcf Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 11:03:35 -0700 Subject: [PATCH 034/244] more code owners --- .github/CODEOWNERS | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 518b5aa20c8c..07d57ac48320 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -6,20 +6,20 @@ ########### # Catch all -# /sdk/ @mayurid +/sdk/ @mayurid # Core -/sdk/core/ @lmazuel +/sdk/core/ @lmazuel @xiangyan99 @johanste /sdk/core/azure-core/ @xiangyan99 @bryevdv # Service team -# /sdk/identity/ -# /sdk/eventhub/ +/sdk/identity/ @chlowell @schaabs +/sdk/eventhub/ @annatisch @yunhaoling @YijunXieMS /sdk/storage/ @zezha-msft @annatisch @rakshith91 /sdk/applicationinsights/ @alexeldeib /sdk/batch/ @bgklein @matthchr @xingwu1 /sdk/cognitiveservices/azure-cognitiveservices-vision-customvision/ @areddish -/sdk/keyvault/ @schaabs @chlowell +/sdk/keyvault/ @schaabs @chlowell @iscai-msft /sdk/loganalytics/ @alexeldeib /sdk/consumption/ @sandeepnl /sdk/containerinstance/ @samkreter @xizhamsft @@ -35,7 +35,7 @@ /sdk/recoveryservices/ @DheerendraRathor /sdk/servicefabric/ @QingChenmsft @samedder /sql/sql/ @jaredmoo -/sdk/servicebus/azure-servicebus/ @annatisch +/sdk/servicebus/azure-servicebus/ @annatisch @yunhaoling @YijunXieMS # Management Plane /**/*mgmt*/ @zikalino From 16e77909a0a781d1b1d4a57a1109b6ed2777d218 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 11:58:35 -0700 Subject: [PATCH 035/244] add policy and decorators for secrets (#6453) --- .../azure/keyvault/secrets/_client.py | 13 +++++++++++++ .../keyvault/secrets/_shared/async_client_base.py | 2 ++ .../azure/keyvault/secrets/_shared/client_base.py | 2 ++ .../azure/keyvault/secrets/aio/_client.py | 14 ++++++++++++++ 4 files changed, 31 insertions(+) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py index f15b6779b9d3..1f0a670bf217 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py @@ -13,6 +13,7 @@ from typing import Any, Dict, Generator, Mapping, Optional from azure.core.exceptions import ResourceExistsError, ResourceNotFoundError +from azure.core.tracing.decorator import distributed_trace from ._shared import KeyVaultClientBase from ._models import Secret, DeletedSecret, SecretAttributes @@ -32,6 +33,7 @@ class SecretClient(KeyVaultClientBase): # pylint:disable=protected-access + @distributed_trace def get_secret(self, name, version=None, **kwargs): # type: (str, str, Mapping[str, Any]) -> Secret """Get a specified secret from the vault. @@ -59,6 +61,7 @@ def get_secret(self, name, version=None, **kwargs): ) return Secret._from_secret_bundle(bundle) + @distributed_trace def set_secret( self, name, value, content_type=None, enabled=None, not_before=None, expires=None, tags=None, **kwargs ): @@ -101,6 +104,7 @@ def set_secret( ) return Secret._from_secret_bundle(bundle) + @distributed_trace def update_secret( self, name, version=None, content_type=None, enabled=None, not_before=None, expires=None, tags=None, **kwargs ): @@ -151,6 +155,7 @@ def update_secret( ) return SecretAttributes._from_secret_bundle(bundle) # pylint: disable=protected-access + @distributed_trace def list_secrets(self, **kwargs): # type: (Mapping[str, Any]) -> Generator[SecretAttributes] """List secrets in the vault. @@ -177,6 +182,7 @@ def list_secrets(self, **kwargs): pages = self._client.get_secrets(self._vault_url, maxresults=max_page_size, **kwargs) return (SecretAttributes._from_secret_item(item) for item in pages) + @distributed_trace def list_secret_versions(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> Generator[SecretAttributes] """List all versions of the specified secret. @@ -203,6 +209,7 @@ def list_secret_versions(self, name, **kwargs): pages = self._client.get_secret_versions(self._vault_url, name, maxresults=max_page_size, **kwargs) return (SecretAttributes._from_secret_item(item) for item in pages) + @distributed_trace def backup_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> bytes """Backs up the specified secret. @@ -230,6 +237,7 @@ def backup_secret(self, name, **kwargs): ) return backup_result.value + @distributed_trace def restore_secret(self, backup, **kwargs): # type: (bytes, Mapping[str, Any]) -> SecretAttributes """Restore a backed up secret to the vault. @@ -254,6 +262,7 @@ def restore_secret(self, backup, **kwargs): bundle = self._client.restore_secret(self.vault_url, backup, error_map={409: ResourceExistsError}, **kwargs) return SecretAttributes._from_secret_bundle(bundle) + @distributed_trace def delete_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> DeletedSecret """Deletes a secret from the vault. @@ -279,6 +288,7 @@ def delete_secret(self, name, **kwargs): bundle = self._client.delete_secret(self.vault_url, name, error_map={404: ResourceNotFoundError}, **kwargs) return DeletedSecret._from_deleted_secret_bundle(bundle) + @distributed_trace def get_deleted_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> DeletedSecret """Gets the specified deleted secret. @@ -303,6 +313,7 @@ def get_deleted_secret(self, name, **kwargs): bundle = self._client.get_deleted_secret(self.vault_url, name, error_map={404: ResourceNotFoundError}, **kwargs) return DeletedSecret._from_deleted_secret_bundle(bundle) + @distributed_trace def list_deleted_secrets(self, **kwargs): # type: (Mapping[str, Any]) -> Generator[DeletedSecret] """Lists deleted secrets of the vault. @@ -328,6 +339,7 @@ def list_deleted_secrets(self, **kwargs): pages = self._client.get_deleted_secrets(self._vault_url, maxresults=max_page_size, **kwargs) return (DeletedSecret._from_deleted_secret_item(item) for item in pages) + @distributed_trace def purge_deleted_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> None """Permanently deletes the specified secret. @@ -350,6 +362,7 @@ def purge_deleted_secret(self, name, **kwargs): """ self._client.purge_deleted_secret(self.vault_url, name, **kwargs) + @distributed_trace def recover_deleted_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> SecretAttributes """Recovers the deleted secret to the latest version. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index a24761a6afe6..c40e314accc7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,6 +6,7 @@ from azure.core.async_paging import AsyncPagedMixin from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline +from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport from msrest.serialization import Model @@ -100,6 +101,7 @@ def _build_pipeline(config: Configuration, transport: HttpTransport, **kwargs: A config.retry_policy, config.authentication_policy, config.logging_policy, + DistributedTracingPolicy(), ] if transport is None: diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/client_base.py index 6a3253c77655..dbde6d74f640 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/client_base.py @@ -15,6 +15,7 @@ from azure.core.pipeline.transport import HttpTransport from .challenge_auth_policy import ChallengeAuthPolicy +from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy KEY_VAULT_SCOPE = "https://vault.azure.net/.default" @@ -73,6 +74,7 @@ def _build_pipeline(self, config, transport, **kwargs): config.retry_policy, config.authentication_policy, config.logging_policy, + DistributedTracingPolicy(), ] if transport is None: diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py index d7cf860c4309..89a0fa98836e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py @@ -6,6 +6,8 @@ from typing import Any, AsyncIterable, Mapping, Optional, Dict from azure.core.exceptions import ResourceExistsError, ResourceNotFoundError +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.keyvault.secrets._models import Secret, DeletedSecret, SecretAttributes from .._shared import AsyncKeyVaultClientBase, AsyncPagingAdapter @@ -25,6 +27,7 @@ class SecretClient(AsyncKeyVaultClientBase): # pylint:disable=protected-access + @distributed_trace_async async def get_secret(self, name: str, version: Optional[str] = None, **kwargs: Mapping[str, Any]) -> Secret: """Get a specified secret from the vault. @@ -51,6 +54,7 @@ async def get_secret(self, name: str, version: Optional[str] = None, **kwargs: M ) return Secret._from_secret_bundle(bundle) + @distributed_trace_async async def set_secret( self, name: str, @@ -99,6 +103,7 @@ async def set_secret( ) return Secret._from_secret_bundle(bundle) + @distributed_trace_async async def update_secret( self, name: str, @@ -155,6 +160,7 @@ async def update_secret( ) return SecretAttributes._from_secret_bundle(bundle) # pylint: disable=protected-access + @distributed_trace def list_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[SecretAttributes]: """List secrets in the vault. @@ -180,6 +186,7 @@ def list_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[SecretAttri iterable = AsyncPagingAdapter(pages, SecretAttributes._from_secret_item) return iterable + @distributed_trace def list_secret_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncIterable[SecretAttributes]: """List all versions of the specified secret. @@ -205,6 +212,7 @@ def list_secret_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncI iterable = AsyncPagingAdapter(pages, SecretAttributes._from_secret_item) return iterable + @distributed_trace_async async def backup_secret(self, name: str, **kwargs: Mapping[str, Any]) -> bytes: """Backs up the specified secret. @@ -230,6 +238,7 @@ async def backup_secret(self, name: str, **kwargs: Mapping[str, Any]) -> bytes: ) return backup_result.value + @distributed_trace_async async def restore_secret(self, backup: bytes, **kwargs: Mapping[str, Any]) -> SecretAttributes: """Restores a backed up secret to a vault. @@ -254,6 +263,7 @@ async def restore_secret(self, backup: bytes, **kwargs: Mapping[str, Any]) -> Se ) return SecretAttributes._from_secret_bundle(bundle) + @distributed_trace_async async def delete_secret(self, name: str, **kwargs: Mapping[str, Any]) -> DeletedSecret: """Deletes a secret from the vault. @@ -279,6 +289,7 @@ async def delete_secret(self, name: str, **kwargs: Mapping[str, Any]) -> Deleted ) return DeletedSecret._from_deleted_secret_bundle(bundle) + @distributed_trace_async async def get_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> DeletedSecret: """Gets the specified deleted secret. @@ -303,6 +314,7 @@ async def get_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> De ) return DeletedSecret._from_deleted_secret_bundle(bundle) + @distributed_trace def list_deleted_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[DeletedSecret]: """Lists deleted secrets of the vault. @@ -327,6 +339,7 @@ def list_deleted_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[Del iterable = AsyncPagingAdapter(pages, DeletedSecret._from_deleted_secret_item) return iterable + @distributed_trace_async async def purge_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> None: """Permanently deletes the specified secret. @@ -347,6 +360,7 @@ async def purge_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> """ await self._client.purge_deleted_secret(self.vault_url, name, **kwargs) + @distributed_trace_async async def recover_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> SecretAttributes: """Recovers the deleted secret to the latest version. From 23e57c8eb454d6c156b334800fce2f7216607c82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20C=C3=A1rdenas?= Date: Thu, 25 Jul 2019 12:01:53 -0700 Subject: [PATCH 036/244] Smoke test for Python (#6412) * Smoke Test Sample for Track 2 libraries Smoke Test for Indentity, Key Vault Secrets, Storage Blobs, Event Hubs and Cosmos DB * simpleQuery method added * Method's names updated * Create README.md * Update README.md * Commented lines deleted * README.md moved to correct folder * Create requirements.txt * Update README.md * Update README.md * Imports changed * Use of literals instead of append * Database Name variable to class level. * Use of Pythonic with statements * Update requirements.txt * Revert "Update requirements.txt" This reverts commit 4b79c6a84780f169e15c17d96e5728f32ed419f3. * Revert "Use of Pythonic with statements" This reverts commit 81adc4ca46f67d3a068aeee5e41c4514d63d8758. * Revert "Revert "Use of Pythonic with statements"" This reverts commit 27b2a2d635ff47880dee2c741bcb5c81c187df7d. * requiriments.txt encoded as a txt file * requirements.txt as text file * Misspelling in "Key concepts" * Update .docsettings.yml to match the tittle of Smoke Test * Went trought Suyog comments * Revert "Went trought Suyog comments" This reverts commit 35c62232f8e0562087b7f5eb3d4bdf57ea6e502f. * Gone trought Suyog comments * use of snake case in file names --- .docsettings.yml | 2 +- samples/smoketest/Program.py | 13 +++ samples/smoketest/README.md | 116 +++++++++++++++++++++++++ samples/smoketest/cosmos_db.py | 84 ++++++++++++++++++ samples/smoketest/event_hubs.py | 66 ++++++++++++++ samples/smoketest/key_vault_secrets.py | 46 ++++++++++ samples/smoketest/requirements.txt | 8 ++ samples/smoketest/storage_blob.py | 51 +++++++++++ 8 files changed, 385 insertions(+), 1 deletion(-) create mode 100644 samples/smoketest/Program.py create mode 100644 samples/smoketest/README.md create mode 100644 samples/smoketest/cosmos_db.py create mode 100644 samples/smoketest/event_hubs.py create mode 100644 samples/smoketest/key_vault_secrets.py create mode 100644 samples/smoketest/requirements.txt create mode 100644 samples/smoketest/storage_blob.py diff --git a/.docsettings.yml b/.docsettings.yml index 317e26b199cd..a8b9d07e4c40 100644 --- a/.docsettings.yml +++ b/.docsettings.yml @@ -9,7 +9,7 @@ omitted_paths: language: python root_check_enabled: True required_readme_sections: - - "Azure .+ client library for Python" + - ^Azure (.+ client library for Python|Smoke Test for Python) - ^Getting started$ - ^Key concepts$ - ^Examples$ diff --git a/samples/smoketest/Program.py b/samples/smoketest/Program.py new file mode 100644 index 000000000000..dd43a67f9287 --- /dev/null +++ b/samples/smoketest/Program.py @@ -0,0 +1,13 @@ +from key_vault_secrets import KeyVault +from storage_blob import StorageBlob +from event_hubs import EventHub +from cosmos_db import CosmosDB + +print("==========================================") +print(" AZURE TRACK 2 SDKs SMOKE TEST") +print("==========================================") + +KeyVault().Run() +StorageBlob().Run() +EventHub().Run() +CosmosDB().Run() diff --git a/samples/smoketest/README.md b/samples/smoketest/README.md new file mode 100644 index 000000000000..6e0a21c70235 --- /dev/null +++ b/samples/smoketest/README.md @@ -0,0 +1,116 @@ +# Azure Smoke Test for Python +This sample code is a smoke test to ensure that Azure Preview for Python work while loaded into the same process by performing 2 or more actions with them. + +Libraries tested: +* keyvault-secrets +* identity +* storage-blob +* event-hubs +* cosmos + +## Getting started +### Setup Azure resources +For this sample, it is necessary to create/have the following resources in the [Azure Portal](https://portal.azure.com/): +* **App registration**: Register a new app or use an existing one. + * Under _Certificates & secrets_ create a new **client secret** and store the value in a safe place. +* **Key Vaults**: Create a new Key Vault resource or use an existing one. + * Under _Access policies_, add the app registrated in the previous step. +* **Storage acounts**: Create a container in a new or existing storage account. The container in this sample is named "mycontainer", if you want to use other name you can change the value in `BlobStorage.ts` file: +`const containerName = "mycontainer";` +* **Event Hubs**: Create an event hub inside a new or existing Event Hubs Namespace. The container in this sample is named "myeventhub", if you want to use other name you can change the value in `EventHubsTest.ts` file: `let eventHubName = "myeventhub";` +* **Azure Cosmos DB**: Create a new account or use an existing one. + +### Azure credentials +The following environment variables are needed: +* From **App Registration**, in the _Overview_ section: + * AZURE_TENANT_ID: The directory tentant ID. + * AZURE_CLIENT_ID: The application ID. + * AZURE_CLIENT_SECRET: The client secret stored previusly when creating the _client secret_. + +* From **Key Vault**, in the _Overview_ section: + * AZURE_PROJECT_URL: The DNS Name + +* From **Event Hubs**, in _Shared access policies_ section: + * EVENT_HUBS_CONNECTION_STRING: Connection string from a policy + +* From **Storage Account**, in the _Access Keys_ section: + * STORAGE_CONNECTION_STRING : A connection strings. + +* From **Azure Cosmos DB**, in the _Keys_ section, select the _Read-Write Keys_ tab: + * COSMOS_ENDPOINT: URI. + * COSMOS_KEY: Primary or secondary key. + +``` +//Bash code to create the environment variables +export AZURE_CLIENT_ID="" +export AZURE_CLIENT_SECRET="" +export AZURE_TENANT_ID="" +export EVENT_HUBS_CONNECTION_STRING="" +export AZURE_PROJECT_URL="" +export STORAGE_CONNECTION_STRING="" +export COSMOS_ENDPOINT="" +export COSMOS_KEY="" +``` + +### Running the console app +[Python](https://www.python.org/downloads/) version 3.7.4 was used to run this sample. + +In the \SmokeTest\ directory, run Program.py +``` +python .\Program.py +``` + +## Key concepts + + +## Examples +All the classes in this sample has a `Run()` method as entry point, and do not depend on each other. + +It is possible to run them individually: +```python +from KeyVaultSecrets import KeyVault + +KeyVault().Run() +``` + +They can be included in other projects by moving the class in it: +```python +from KeyVaultSecrets import KeyVault + +... + +def myTests(): + console.log("Smoke Test imported from other project") + KeyVault().Run() + +myTests() +otherFunction() +... +``` + +The classes can be used as base code and be changed to satisfied specific needs. For example, the method `EventHub().SendAndReceiveEvents()` can be change to only send events from an array given from a parameter: +```python +def SendAndReceiveEvents(self, partitionID, events): + producer = self.client.create_producer(partition_id=partitionID) + producer.send(events) + producer.close() +``` + +**Note:** The methods in the classes are not necessary independent on each other, and the order matters. For example, in order to run `BlobStorage().DeleteBlob();`, the method `BlobStorage().UploadBLob();` must be run before, since in the other way it will fail because there is not going to be a blob to delete. + +## Troubleshooting + +### Authentication +Be sure to set the environment variables and credentials required before running the sample. + +## Next steps +Check the [Azure SDK for Python Repository](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk) for more samples inside the sdk folder. + +## Contributing +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. + +If you'd like to contribute to this library, please read the contributing guide to learn more about how to build and test the code. + +This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. \ No newline at end of file diff --git a/samples/smoketest/cosmos_db.py b/samples/smoketest/cosmos_db.py new file mode 100644 index 000000000000..b4e2a56aa025 --- /dev/null +++ b/samples/smoketest/cosmos_db.py @@ -0,0 +1,84 @@ +import os +from azure.cosmos import CosmosClient +from azure.cosmos.partition_key import PartitionKey + + +class CosmosDB: + def __init__(self): + URL = os.environ["COSMOS_ENDPOINT"] + KEY = os.environ["COSMOS_KEY"] + self.client = CosmosClient(URL, {"masterKey": KEY}) + self.dbName = "pySolarSystem" + + def CreateDatabase(self): + print("Creating '{0}' database...".format(self.dbName)) + return self.client.create_database(self.dbName) + + def CreateContainer(self, db): + collectionName = "Planets" + print("Creating '{0}' collection...".format(collectionName)) + partition_key = PartitionKey(path="/id", kind="Hash") + return db.create_container(id="Planets", partition_key=partition_key) + + def CreateDocuments(self, container): + # Cosmos will look for an 'id' field in the items, if the 'id' is not specify Cosmos is going to assing a random key. + planets = [ + { + "id": "Earth", + "HasRings": False, + "Radius": 3959, + "Moons": [{"Name": "Moon"}], + }, + { + "id": "Mars", + "HasRings": False, + "Radius": 2106, + "Moons": [{"Name": "Phobos"}, {"Name": "Deimos"}], + }, + ] + + print("Inserting items in the collection...") + for planet in planets: + container.create_item(planet) + print("\t'{0}' created".format(planet["id"])) + print("\tdone") + + def SimpleQuery(self, container): + print("Quering the container...") + items = list( + container.query_items( + query="SELECT c.id FROM c", enable_cross_partition_query=True + ) + ) + print("\tdone: {0}".format(items)) + + def DeleteDatabase(self): + print("Cleaning up the resource...") + self.client.delete_database(self.dbName) + print("\tdone") + + def Run(self): + print() + print("------------------------") + print("Cosmos DB") + print("------------------------") + print("1) Create a Database") + print("2) Create a Container in the database") + print("3) Insert Documents (items) into the Container") + print("4) Delete Database (Clean up the resource)") + print() + + # Ensure that the database does not exists + try: + self.DeleteDatabase() + except: + pass + + try: + db = self.CreateDatabase() + container = self.CreateContainer(db=db) + self.CreateDocuments(container=container) + self.SimpleQuery(container=container) + finally: + # if something goes wrong, the resource should be cleaned anyway + self.DeleteDatabase() diff --git a/samples/smoketest/event_hubs.py b/samples/smoketest/event_hubs.py new file mode 100644 index 000000000000..9a0ed400b5c5 --- /dev/null +++ b/samples/smoketest/event_hubs.py @@ -0,0 +1,66 @@ +import os +from datetime import datetime +from azure.eventhub import EventHubClient, EventData, EventPosition + + +class EventHub: + def __init__(self): + # This test requires a previusly created Event Hub. + # In this example the name is "myeventhub", but it could be change below + connectionString = os.environ["EVENT_HUBS_CONNECTION_STRING"] + eventHubName = "myeventhub" + self.client = EventHubClient.from_connection_string( + connectionString, eventHubName + ) + + def GetPartitionIds(self): + print("Getting partitions id...") + partition_ids = self.client.get_partition_ids() + print("\tdone") + return partition_ids + + def SendAndReceiveEvents(self, partitionID): + with self.client.create_consumer( + consumer_group="$default", + partition_id=partitionID, + event_position=EventPosition(datetime.utcnow()), + ) as consumer: + + print("Sending events...") + with self.client.create_producer(partition_id=partitionID) as producer: + event_list = [ + EventData(b"Test Event 1 in Python"), + EventData(b"Test Event 2 in Python"), + EventData(b"Test Event 3 in Python"), + ] + producer.send(event_list) + print("\tdone") + + print("Receiving events...") + received = consumer.receive(max_batch_size=len(event_list), timeout=2) + for event_data in received: + print("\tEvent Received: " + event_data.body_as_str()) + + print("\tdone") + + if len(received) != len(event_list): + raise Exception( + "Error, expecting {0} events, but {1} were received.".format( + str(len(event_list)), str(len(received)) + ) + ) + + def Run(self): + print() + print("------------------------") + print("Event Hubs") + print("------------------------") + print("1) Get partition ID") + print("2) Send Events") + print("3) Consume Events") + print() + + partitionID = self.GetPartitionIds() + # In this sample the same partition id is going to be used for the producer and consumer, + # It is the first one, but it could be any (is not relevant as long as it is the same in both producer and consumer) + self.SendAndReceiveEvents(partitionID[0]) diff --git a/samples/smoketest/key_vault_secrets.py b/samples/smoketest/key_vault_secrets.py new file mode 100644 index 000000000000..7f27b02460f1 --- /dev/null +++ b/samples/smoketest/key_vault_secrets.py @@ -0,0 +1,46 @@ +import os +from azure.identity import DefaultAzureCredential +from azure.keyvault.secrets import SecretClient + + +class KeyVault: + def __init__(self): + # DefaultAzureCredential() expects the following environment variables: + # * AZURE_CLIENT_ID + # * AZURE_CLIENT_SECRET + # * AZURE_TENANT_ID + credential = DefaultAzureCredential() + self.secret_client = SecretClient( + vault_url=os.environ["AZURE_PROJECT_URL"], credential=credential + ) + + def SetSecret(self): + print("Setting a secret...") + self.secret_client.set_secret("secret-name", "secret-value") + print("\tdone") + + def GetSecret(self): + print("Getting a secret...") + secret = self.secret_client.get_secret("secret-name") + print("\tdone: " + secret.name) + + def DeleteSecret(self): + print("Deleting a secret...") + deleted_secret = self.secret_client.delete_secret("secret-name") + print("\tdone: " + deleted_secret.name) + + def Run(self): + print() + print("------------------------") + print("Key Vault - Secrets\nIdentity - Credential") + print("------------------------") + print("1) Set a secret") + print("2) Get that secret") + print("3) Delete that secret (Clean up the resource)") + print() + + try: + self.SetSecret() + self.GetSecret() + finally: + self.DeleteSecret() diff --git a/samples/smoketest/requirements.txt b/samples/smoketest/requirements.txt new file mode 100644 index 000000000000..eaf49d15335d --- /dev/null +++ b/samples/smoketest/requirements.txt @@ -0,0 +1,8 @@ +azure-common==1.1.23 +azure-core==1.0.0b1 +azure-cosmos==4.0.0b1 +azure-eventhub==5.0.0b1 +azure-identity==1.0.0b1 +azure-keyvault-secrets==4.0.0b1 +azure-storage-blob==12.0.0b1 +azure-storage-common==2.0.0 \ No newline at end of file diff --git a/samples/smoketest/storage_blob.py b/samples/smoketest/storage_blob.py new file mode 100644 index 000000000000..7e0c394f9580 --- /dev/null +++ b/samples/smoketest/storage_blob.py @@ -0,0 +1,51 @@ +import os +from azure.storage.blob import BlobClient +from azure.core import exceptions + + +class StorageBlob: + def __init__(self): + connectionString = os.environ["STORAGE_CONNECTION_STRING"] + self.blob = BlobClient.from_connection_string( + connectionString, container="mycontainer", blob="pyTestBlob.txt" + ) + + def UploadBLob(self): + print("uploading blob...") + self.data = "This is a sample data for Python Test" + self.blob.upload_blob(self.data) + print("\tdone") + + def DownloadBlob(self): + print("downloading blob...") + with open("./downloadedBlob.txt", "wb+") as my_blob: + my_blob.writelines(self.blob.download_blob()) + + print("\tdone") + + def DeleteBlob(self): + print("Cleaning up the resource...") + self.blob.delete_blob() + print("\tdone") + + def Run(self): + print() + print("------------------------") + print("Storage - Blob") + print("------------------------") + print("1) Upload a Blob") + print("2) Download a Blob") + print("3) Delete that Blob (Clean up the resource)") + print() + + # Ensure that the blob does not exists before the tests + try: + self.DeleteBlob() + except exceptions.AzureError: + pass + + try: + self.UploadBLob() + self.DownloadBlob() + finally: + self.DeleteBlob() From a354b63ef893c5cddb2795a941b3e14e53cbe2a3 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Thu, 25 Jul 2019 12:41:38 -0700 Subject: [PATCH 037/244] Paging v2 (#6420) * First version of paging * Clean sync paging * Async paging * Name AsyncList without underscore * MyPy happyness * pylint * black * PageIterator as conf * Simplify ItemPaged * Use chain to link iterable * Make Paging more open * Docstring * pylint / mypy / black * Regenerate KV with latest Autorest + Paging branch (#6479) * Regenerate KV with latest Autorest + Paging branch * Remove unused import in tests * Make the async adapter more generic * Regeneration after operation mixin fix in Autorest * COmmit changes forgotten in #6418 * Fixing syntax for 2.7 * Move Storage Queue to new Paging (#6447) * Move Storage Queue to new Paging * Working Storage queue on new paging * Fix types * First shot of blob tests update * Fixing blob tests * File to new paging * Doc fix * Feedbacks from @annatisch * Fix last @annatisch comment * Simplify paging contract * Fix storage queue after new paging contract --- .../azure-core/azure/core/async_paging.py | 153 +- sdk/core/azure-core/azure/core/paging.py | 153 +- .../azure_core_asynctests/test_paging.py | 122 ++ sdk/core/azure-core/tests/test_paging.py | 99 +- .../_generated/v2016_10_01/__init__.py | 3 +- .../_generated/v2016_10_01/_configuration.py | 2 +- .../v2016_10_01/_key_vault_client.py | 4 +- .../_generated/v2016_10_01/aio/__init__.py | 3 +- .../v2016_10_01/aio/_configuration_async.py | 1 - .../aio/_key_vault_client_async.py | 4 +- .../_key_vault_client_operations_async.py | 543 ++---- .../_generated/v2016_10_01/models/__init__.py | 45 +- .../_generated/v2016_10_01/models/_models.py | 265 +++ .../v2016_10_01/models/_models_py3.py | 265 +++ .../v2016_10_01/models/_paged_models.py | 131 -- .../_key_vault_client_operations.py | 399 ++--- .../keys/_shared/_generated/v7_0/__init__.py | 3 +- .../_shared/_generated/v7_0/_configuration.py | 2 +- .../_generated/v7_0/_key_vault_client.py | 4 +- .../_shared/_generated/v7_0/aio/__init__.py | 3 +- .../v7_0/aio/_configuration_async.py | 1 - .../v7_0/aio/_key_vault_client_async.py | 4 +- .../_key_vault_client_operations_async.py | 633 ++----- .../_generated/v7_0/models/__init__.py | 55 +- .../_shared/_generated/v7_0/models/_models.py | 323 ++++ .../_generated/v7_0/models/_models_py3.py | 323 ++++ .../_generated/v7_0/models/_paged_models.py | 157 -- .../_key_vault_client_operations.py | 465 ++--- .../keys/_shared/async_client_base.py | 7 +- .../tests/keys_vault_client_async.py | 1 - .../_shared/_generated/key_vault_client.py | 8 +- .../_generated/v2016_10_01/__init__.py | 3 +- .../_generated/v2016_10_01/_configuration.py | 2 +- .../v2016_10_01/_key_vault_client.py | 4 +- .../_generated/v2016_10_01/aio/__init__.py | 3 +- .../v2016_10_01/aio/_configuration_async.py | 1 - .../aio/_key_vault_client_async.py | 4 +- .../_key_vault_client_operations_async.py | 543 ++---- .../_generated/v2016_10_01/models/__init__.py | 45 +- .../_generated/v2016_10_01/models/_models.py | 265 +++ .../v2016_10_01/models/_models_py3.py | 265 +++ .../v2016_10_01/models/_paged_models.py | 131 -- .../_key_vault_client_operations.py | 399 ++--- .../_shared/_generated/v7_0/__init__.py | 3 +- .../_shared/_generated/v7_0/_configuration.py | 2 +- .../_generated/v7_0/_key_vault_client.py | 4 +- .../_shared/_generated/v7_0/aio/__init__.py | 3 +- .../v7_0/aio/_configuration_async.py | 1 - .../v7_0/aio/_key_vault_client_async.py | 4 +- .../_key_vault_client_operations_async.py | 633 ++----- .../_generated/v7_0/models/__init__.py | 55 +- .../_shared/_generated/v7_0/models/_models.py | 323 ++++ .../_generated/v7_0/models/_models_py3.py | 323 ++++ .../_generated/v7_0/models/_paged_models.py | 157 -- .../_key_vault_client_operations.py | 465 ++--- .../secrets/_shared/async_client_base.py | 7 +- .../tests/secrets_vault_client_async.py | 1 - .../azure/storage/blob/blob_service_client.py | 15 +- .../azure/storage/blob/container_client.py | 28 +- .../azure/storage/blob/models.py | 171 +- .../tests/test_container.py | 22 +- .../azure/storage/file/directory_client.py | 29 +- .../azure/storage/file/file_client.py | 14 +- .../azure/storage/file/file_service_client.py | 18 +- .../azure/storage/file/models.py | 124 +- .../azure-storage-file/tests/test_handle.py | 13 +- .../azure-storage-file/tests/test_share.py | 37 +- .../azure/storage/queue/models.py | 83 +- .../azure/storage/queue/queue_client.py | 8 +- .../storage/queue/queue_service_client.py | 19 +- .../test_queue.test_delete_message.yaml | 1563 ++--------------- ..._queue.test_get_messages_with_options.yaml | 1209 ++----------- .../azure-storage-queue/tests/test_queue.py | 28 +- 73 files changed, 4595 insertions(+), 6613 deletions(-) create mode 100644 sdk/core/azure-core/tests/azure_core_asynctests/test_paging.py delete mode 100644 sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_paged_models.py delete mode 100644 sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_paged_models.py delete mode 100644 sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_paged_models.py delete mode 100644 sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_paged_models.py diff --git a/sdk/core/azure-core/azure/core/async_paging.py b/sdk/core/azure-core/azure/core/async_paging.py index 4a4af4d28cc5..8a61c5b00ddc 100644 --- a/sdk/core/azure-core/azure/core/async_paging.py +++ b/sdk/core/azure-core/azure/core/async_paging.py @@ -23,44 +23,127 @@ # IN THE SOFTWARE. # # -------------------------------------------------------------------------- -from collections.abc import AsyncIterator +import collections.abc import logging +from typing import ( + Iterable, + AsyncIterator, + TypeVar, + Callable, + Tuple, + Optional, + Awaitable, +) + _LOGGER = logging.getLogger(__name__) -class AsyncPagedMixin(AsyncIterator): - """Bring async to Paging. - - **Keyword argument:** - - *async_command* - Mandatory keyword argument for this mixin to work. - """ - def __init__(self, *args, **kwargs): # pylint: disable=unused-argument - self._async_get_next = kwargs.get("async_command") - if not self._async_get_next: - _LOGGER.debug("Paging async iterator protocol is not available for %s", - self.__class__.__name__) - - async def _async_advance_page(self): - if not self._async_get_next: - raise NotImplementedError( - "The class {} does not support async paging.".format(self.__class__.__name__) - ) - if self.next_link is None: - raise StopAsyncIteration("End of paging") - self._current_page_iter_index = 0 - self._response = await self._async_get_next(self.next_link) - self._deserializer(self, self._response) - return self.current_page +ReturnType = TypeVar("ReturnType") +ResponseType = TypeVar("ResponseType") + + +class AsyncList(AsyncIterator[ReturnType]): + def __init__(self, iterable: Iterable[ReturnType]) -> None: + """Change an iterable into a fake async iterator. + + Coul be useful to fill the async iterator contract when you get a list. + + :param iterable: A sync iterable of T + """ + # Technically, if it's a real iterator, I don't need "iter" + # but that will cover iterable and list as well with no troubles created. + self._iterator = iter(iterable) + + async def __anext__(self) -> ReturnType: + try: + return next(self._iterator) + except StopIteration as err: + raise StopAsyncIteration() from err + + +class AsyncPageIterator(AsyncIterator[AsyncIterator[ReturnType]]): + def __init__( + self, + get_next: Callable[[Optional[str]], Awaitable[ResponseType]], + extract_data: Callable[ + [ResponseType], Awaitable[Tuple[str, AsyncIterator[ReturnType]]] + ], + continuation_token: Optional[str] = None, + ) -> None: + """Return an async iterator of pages. + + :param get_next: Callable that take the continuation token and return a HTTP response + :param extract_data: Callable that take an HTTP response and return a tuple continuation token, + list of ReturnType + :param str continuation_token: The continuation token needed by get_next + """ + self._get_next = get_next + self._extract_data = extract_data + self.continuation_token = continuation_token + self._did_a_call_already = False + self._response = None + self._current_page = None async def __anext__(self): - """Iterate through responses.""" - # Storing the list iterator might work out better, but there's no - # guarantee that some code won't replace the list entirely with a copy, - # invalidating an list iterator that might be saved between iterations. - if self.current_page and self._current_page_iter_index < len(self.current_page): - response = self.current_page[self._current_page_iter_index] - self._current_page_iter_index += 1 - return response - await self._async_advance_page() - return await self.__anext__() + if self.continuation_token is None and self._did_a_call_already: + raise StopAsyncIteration("End of paging") + + self._response = await self._get_next(self.continuation_token) + self._did_a_call_already = True + + self.continuation_token, self._current_page = await self._extract_data( + self._response + ) + + # If current_page was a sync list, wrap it async-like + if isinstance(self._current_page, collections.abc.Iterable): + self._current_page = AsyncList(self._current_page) + + return self._current_page + + +class AsyncItemPaged(AsyncIterator[ReturnType]): + def __init__(self, *args, **kwargs) -> None: + """Return an async iterator of items. + + args and kwargs will be passed to the AsyncPageIterator constructor directly, + except page_iterator_class + """ + self._args = args + self._kwargs = kwargs + self._page_iterator = ( + None + ) # type: Optional[AsyncIterator[AsyncIterator[ReturnType]]] + self._page = None # type: Optional[AsyncIterator[ReturnType]] + self._page_iterator_class = self._kwargs.pop( + "page_iterator_class", AsyncPageIterator + ) + + def by_page( + self, continuation_token: Optional[str] = None + ) -> AsyncIterator[AsyncIterator[ReturnType]]: + """Get an async iterator of pages of objects, instead of an async iterator of objects. + + :param str continuation_token: + An opaque continuation token. This value can be retrieved from the + continuation_token field of a previous generator object. If specified, + this generator will begin returning results from this point. + :returns: An async iterator of pages (themselves async iterator of objects) + """ + return self._page_iterator_class( + *self._args, **self._kwargs, continuation_token=continuation_token + ) + + async def __anext__(self) -> ReturnType: + if self._page_iterator is None: + self._page_iterator = self.by_page() + return await self.__anext__() + if self._page is None: + # Let it raise StopAsyncIteration + self._page = await self._page_iterator.__anext__() + return await self.__anext__() + try: + return await self._page.__anext__() + except StopAsyncIteration: + self._page = None + return await self.__anext__() diff --git a/sdk/core/azure-core/azure/core/paging.py b/sdk/core/azure-core/azure/core/paging.py index 9a04250dc932..9f4089d02099 100644 --- a/sdk/core/azure-core/azure/core/paging.py +++ b/sdk/core/azure-core/azure/core/paging.py @@ -23,86 +23,99 @@ # IN THE SOFTWARE. # # -------------------------------------------------------------------------- -import sys -try: - from collections.abc import Iterator - xrange = range -except ImportError: - from collections import Iterator - -from typing import Dict, Any, List, Callable, Optional, TYPE_CHECKING # pylint: disable=unused-import - -if TYPE_CHECKING: - from .pipeline.transport.base import HttpResponse - from msrest.serialization import Deserializer, Model # type: ignore # pylint: disable=unused-import - -if sys.version_info >= (3, 5, 2): - # Not executed on old Python, no syntax error - from .async_paging import AsyncPagedMixin # type: ignore -else: - class AsyncPagedMixin(object): # type: ignore - pass - -class Paged(AsyncPagedMixin, Iterator): - """A container for paged REST responses. - - :param response: server response object. - :type response: ~azure.core.pipeline.transport.HttpResponse - :param callable command: Function to retrieve the next page of items. - :param Deserializer deserializer: a Deserializer instance to use - """ - _validation = {} # type: Dict[str, Dict[str, Any]] - _attribute_map = {} # type: Dict[str, Dict[str, Any]] - - def __init__(self, command, deserializer, **kwargs): - # type: (Callable[[str], HttpResponse], Deserializer, Any) -> None - super(Paged, self).__init__(**kwargs) # type: ignore - # Sets next_link, current_page, and _current_page_iter_index. - self.next_link = "" - self.current_page = [] # type: List[Model] - self._current_page_iter_index = 0 - self._deserializer = deserializer - self._get_next = command - self._response = None # type: Optional[HttpResponse] +import itertools +from typing import ( + Callable, + Optional, + TypeVar, + Iterator, + Iterable, + Tuple, +) # pylint: disable=unused-import +import logging + + +_LOGGER = logging.getLogger(__name__) + +ReturnType = TypeVar("ReturnType") +ResponseType = TypeVar("ResponseType") + + +class PageIterator(Iterator[Iterator[ReturnType]]): + def __init__( + self, + get_next, # type: Callable[[Optional[str]], ResponseType] + extract_data, # type: Callable[[ResponseType], Tuple[str, Iterable[ReturnType]]] + continuation_token=None, # type: Optional[str] + ): + """Return an iterator of pages. + + :param get_next: Callable that take the continuation token and return a HTTP response + :param extract_data: Callable that take an HTTP response and return a tuple continuation token, + list of ReturnType + :param str continuation_token: The continuation token needed by get_next + """ + self._get_next = get_next + self._extract_data = extract_data + self.continuation_token = continuation_token + self._did_a_call_already = False + self._response = None # type: Optional[ResponseType] + self._current_page = None # type: Optional[Iterable[ReturnType]] def __iter__(self): """Return 'self'.""" - # Since iteration mutates this object, consider it an iterator in-and-of - # itself. return self - @classmethod - def _get_subtype_map(cls): - """Required for parity to Model object for deserialization.""" - return {} + def __next__(self): + # type: () -> Iterator[ReturnType] + if self.continuation_token is None and self._did_a_call_already: + raise StopIteration("End of paging") + + self._response = self._get_next(self.continuation_token) + self._did_a_call_already = True + + self.continuation_token, self._current_page = self._extract_data(self._response) - def _advance_page(self): - # type: () -> List[Model] - """Force moving the cursor to the next azure call. + return iter(self._current_page) - This method is for advanced usage, iterator protocol is prefered. + next = __next__ # Python 2 compatibility. + + +class ItemPaged(Iterator[ReturnType]): + def __init__(self, *args, **kwargs): + """Return an iterator of items. - :raises: StopIteration if no further page - :return: The current page list - :rtype: list + args and kwargs will be passed to the PageIterator constructor directly, + except page_iterator_class """ - if self.next_link is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 - self._response = self._get_next(self.next_link) - self._deserializer(self, self._response) - return self.current_page + self._args = args + self._kwargs = kwargs + self._page_iterator = None + self._page_iterator_class = self._kwargs.pop( + "page_iterator_class", PageIterator + ) + + def by_page(self, continuation_token=None): + # type: (Optional[str]) -> Iterator[Iterator[ReturnType]] + """Get an iterator of pages of objects, instead of an iterator of objects. + + :param str continuation_token: + An opaque continuation token. This value can be retrieved from the + continuation_token field of a previous generator object. If specified, + this generator will begin returning results from this point. + :returns: An iterator of pages (themselves iterator of objects) + """ + return self._page_iterator_class( + continuation_token=continuation_token, *self._args, **self._kwargs + ) + + def __iter__(self): + """Return 'self'.""" + return self def __next__(self): - """Iterate through responses.""" - # Storing the list iterator might work out better, but there's no - # guarantee that some code won't replace the list entirely with a copy, - # invalidating an list iterator that might be saved between iterations. - if self.current_page and self._current_page_iter_index < len(self.current_page): - response = self.current_page[self._current_page_iter_index] - self._current_page_iter_index += 1 - return response - self._advance_page() - return self.__next__() + if self._page_iterator is None: + self._page_iterator = itertools.chain.from_iterable(self.by_page()) + return next(self._page_iterator) next = __next__ # Python 2 compatibility. diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_paging.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_paging.py new file mode 100644 index 000000000000..88d8cbe147d1 --- /dev/null +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_paging.py @@ -0,0 +1,122 @@ +#-------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# +#-------------------------------------------------------------------------- + +from typing import AsyncIterator, TypeVar, List + +from azure.core.async_paging import AsyncItemPaged, AsyncList + +import pytest + + +T = TypeVar("T") + + +async def _as_list(async_iter: AsyncIterator[T]) -> List[T]: + """Flatten an async iterator into a list. + + For testing purpose. + """ + # 3.6 only : result_iterated = [obj async for obj in deserialized] + result = [] + async for el in async_iter: + result.append(el) + return result + + +class TestPaging: + + @pytest.mark.asyncio + async def test_basic_paging(self): + + async def get_next(continuation_token=None): + """Simplify my life and return JSON and not response, but should be response. + """ + if not continuation_token: + return { + 'nextLink': 'page2', + 'value': ['value1.0', 'value1.1'] + } + else: + return { + 'nextLink': None, + 'value': ['value2.0', 'value2.1'] + } + + async def extract_data(response): + return response['nextLink'], AsyncList(response['value']) + + pager = AsyncItemPaged(get_next, extract_data) + result_iterated = await _as_list(pager) + + assert ['value1.0', 'value1.1', 'value2.0', 'value2.1'] == result_iterated + + @pytest.mark.asyncio + async def test_advance_paging(self): + + async def get_next(continuation_token=None): + """Simplify my life and return JSON and not response, but should be response. + """ + if not continuation_token: + return { + 'nextLink': 'page2', + 'value': ['value1.0', 'value1.1'] + } + else: + return { + 'nextLink': None, + 'value': ['value2.0', 'value2.1'] + } + + async def extract_data(response): + return response['nextLink'], AsyncList(response['value']) + + pager = AsyncItemPaged(get_next, extract_data).by_page() + + page1 = await pager.__anext__() + assert ['value1.0', 'value1.1'] == await _as_list(page1) + + page2 = await pager.__anext__() + assert ['value2.0', 'value2.1'] == await _as_list(page2) + + with pytest.raises(StopAsyncIteration): + await pager.__anext__() + + + @pytest.mark.asyncio + async def test_none_value(self): + async def get_next(continuation_token=None): + return { + 'nextLink': None, + 'value': None + } + + async def extract_data(response): + return response['nextLink'], AsyncList(response['value'] or []) + + pager = AsyncItemPaged(get_next, extract_data) + result_iterated = await _as_list(pager) + + assert len(result_iterated) == 0 diff --git a/sdk/core/azure-core/tests/test_paging.py b/sdk/core/azure-core/tests/test_paging.py index 41e00b0b86af..945f133cf7a9 100644 --- a/sdk/core/azure-core/tests/test_paging.py +++ b/sdk/core/azure-core/tests/test_paging.py @@ -1,6 +1,6 @@ #-------------------------------------------------------------------------- # -# Copyright (c) Microsoft Corporation. All rights reserved. +# Copyright (c) Microsoft Corporation. All rights reserved. # # The MIT License (MIT) # @@ -24,29 +24,43 @@ # #-------------------------------------------------------------------------- -import unittest +from azure.core.paging import ItemPaged -from azure.core.paging import Paged +import pytest -from msrest.serialization import Deserializer -class FakePaged(Paged): - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[str]'} - } +class TestPaging(object): - def __init__(self, *args, **kwargs): - super(FakePaged, self).__init__(*args, **kwargs) + def test_basic_paging(self): + + def get_next(continuation_token=None): + """Simplify my life and return JSON and not response, but should be response. + """ + if not continuation_token: + return { + 'nextLink': 'page2', + 'value': ['value1.0', 'value1.1'] + } + else: + return { + 'nextLink': None, + 'value': ['value2.0', 'value2.1'] + } -_test_deserializer = Deserializer({}) + def extract_data(response): + return response['nextLink'], iter(response['value']) -class TestPaging(unittest.TestCase): + pager = ItemPaged(get_next, extract_data) + result_iterated = list(pager) - def test_basic_paging(self): + assert ['value1.0', 'value1.1', 'value2.0', 'value2.1'] == result_iterated - def internal_paging(next_link=None, raw=False): - if not next_link: + def test_by_page_paging(self): + + def get_next(continuation_token=None): + """Simplify my life and return JSON and not response, but should be response. + """ + if not continuation_token: return { 'nextLink': 'page2', 'value': ['value1.0', 'value1.1'] @@ -57,17 +71,25 @@ def internal_paging(next_link=None, raw=False): 'value': ['value2.0', 'value2.1'] } - deserialized = FakePaged(internal_paging, _test_deserializer) - result_iterated = list(deserialized) - self.assertListEqual( - ['value1.0', 'value1.1', 'value2.0', 'value2.1'], - result_iterated - ) + def extract_data(response): + return response['nextLink'], iter(response['value']) + + pager = ItemPaged(get_next, extract_data).by_page() + page1 = next(pager) + assert list(page1) == ['value1.0', 'value1.1'] + + page2 = next(pager) + assert list(page2) == ['value2.0', 'value2.1'] + + with pytest.raises(StopIteration): + next(pager) def test_advance_paging(self): - def internal_paging(next_link=None, raw=False): - if not next_link: + def get_next(continuation_token=None): + """Simplify my life and return JSON and not response, but should be response. + """ + if not continuation_token: return { 'nextLink': 'page2', 'value': ['value1.0', 'value1.1'] @@ -78,27 +100,32 @@ def internal_paging(next_link=None, raw=False): 'value': ['value2.0', 'value2.1'] } - deserialized = FakePaged(internal_paging, _test_deserializer) - page1 = next(deserialized) + def extract_data(response): + return response['nextLink'], iter(response['value']) + + pager = ItemPaged(get_next, extract_data) + page1 = next(pager) assert page1 == 'value1.0' - page1 = next(deserialized) + page1 = next(pager) assert page1 == 'value1.1' - - page2 = next(deserialized) + + page2 = next(pager) assert page2 == 'value2.0' - page2 = next(deserialized) + page2 = next(pager) assert page2 == 'value2.1' - with self.assertRaises(StopIteration): - next(deserialized) + with pytest.raises(StopIteration): + next(pager) def test_none_value(self): - def internal_paging(next_link=None, raw=False): + def get_next(continuation_token=None): return { 'nextLink': None, 'value': None } + def extract_data(response): + return response['nextLink'], iter(response['value'] or []) - deserialized = FakePaged(internal_paging, _test_deserializer) - result_iterated = list(deserialized) - self.assertEqual(len(result_iterated), 0) + pager = ItemPaged(get_next, extract_data) + result_iterated = list(pager) + assert len(result_iterated) == 0 diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/__init__.py index d3fda25cc7ab..e913d4cf6c46 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/__init__.py @@ -9,9 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from ._configuration import KeyVaultClientConfiguration from ._key_vault_client import KeyVaultClient -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] from .version import VERSION diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_configuration.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_configuration.py index beb5eb930fa8..28cf75e3d2b4 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_configuration.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_configuration.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials @@ -45,4 +44,5 @@ def _configure(self, **kwargs): self.proxy_policy = policies.ProxyPolicy(**kwargs) self.logging_policy = policies.NetworkTraceLoggingPolicy(**kwargs) self.retry_policy = policies.RetryPolicy(**kwargs) + self.custom_hook_policy = policies.CustomHookPolicy(**kwargs) self.redirect_policy = policies.RedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_key_vault_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_key_vault_client.py index 0252b1e16a5e..e3ec609b6cd3 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_key_vault_client.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/__init__.py index ffece9055d9b..fb2e6c3866fd 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/__init__.py @@ -10,5 +10,4 @@ # -------------------------------------------------------------------------- from ._key_vault_client_async import KeyVaultClient -from ._configuration_async import KeyVaultClientConfiguration -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_configuration_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_configuration_async.py index 2144132ebe2d..a61d9eeff444 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_configuration_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_configuration_async.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py index 559d48da029a..ad4b8a97754f 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 28ea64adc6a6..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.async_paging import AsyncItemPaged, AsyncList from ... import models import uuid @@ -78,8 +79,6 @@ async def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops 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 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(parameters, 'KeyCreateParameters') @@ -154,8 +153,6 @@ async def import_key(self, vault_base_url, key_name, key, hsm=None, key_attribut 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 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(parameters, 'KeyImportParameters') @@ -218,8 +215,6 @@ async def delete_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -294,8 +289,6 @@ async def update_key(self, vault_base_url, key_name, key_version, key_ops=None, 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 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(parameters, 'KeyUpdateParameters') @@ -360,8 +353,6 @@ async def get_key(self, vault_base_url, key_name, key_version, *, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -399,11 +390,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -412,60 +404,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -487,11 +462,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -499,60 +475,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_keys.metadata = {'url': '/keys'} async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -604,8 +563,6 @@ async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -677,8 +634,6 @@ async def restore_key(self, vault_base_url, key_bundle_backup, *, cls=None, **kw 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 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(parameters, 'KeyRestoreParameters') @@ -759,8 +714,6 @@ async def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -838,8 +791,6 @@ async def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -915,8 +866,6 @@ async def sign(self, vault_base_url, key_name, key_version, algorithm, value, *, 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 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(parameters, 'KeySignParameters') @@ -998,8 +947,6 @@ async def verify(self, vault_base_url, key_name, key_version, algorithm, digest, 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 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(parameters, 'KeyVerifyParameters') @@ -1077,8 +1024,6 @@ async def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value 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 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(parameters, 'KeyOperationsParameters') @@ -1154,8 +1099,6 @@ async def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, val 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 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(parameters, 'KeyOperationsParameters') @@ -1199,11 +1142,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedKeyItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1211,60 +1155,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -1305,8 +1232,6 @@ async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs) header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1364,8 +1289,6 @@ async def purge_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwarg header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1421,8 +1344,6 @@ async def recover_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1493,8 +1414,6 @@ async def set_secret(self, vault_base_url, secret_name, value, tags=None, conten 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 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(parameters, 'SecretSetParameters') @@ -1555,8 +1474,6 @@ async def delete_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1630,8 +1547,6 @@ async def update_secret(self, vault_base_url, secret_name, secret_version, conte 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 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(parameters, 'SecretUpdateParameters') @@ -1694,8 +1609,6 @@ async def get_secret(self, vault_base_url, secret_name, secret_version, *, cls=N header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1733,11 +1646,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1745,60 +1659,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1819,11 +1716,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1832,60 +1730,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1904,11 +1785,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedSecretItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1916,60 +1798,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs): @@ -2009,8 +1874,6 @@ async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2068,8 +1931,6 @@ async def purge_deleted_secret(self, vault_base_url, secret_name, *, cls=None, * header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2122,8 +1983,6 @@ async def recover_deleted_secret(self, vault_base_url, secret_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2181,8 +2040,6 @@ async def backup_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2242,8 +2099,6 @@ async def restore_secret(self, vault_base_url, secret_bundle_backup, *, cls=None 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 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(parameters, 'SecretRestoreParameters') @@ -2283,11 +2138,12 @@ def get_certificates( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2295,60 +2151,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificates.metadata = {'url': '/certificates'} async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -2389,8 +2228,6 @@ async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2449,8 +2286,6 @@ async def set_certificate_contacts(self, vault_base_url, contact_list=None, *, c 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 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(contacts, 'Contacts') @@ -2508,8 +2343,6 @@ async def get_certificate_contacts(self, vault_base_url, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2563,8 +2396,6 @@ async def delete_certificate_contacts(self, vault_base_url, *, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2601,11 +2432,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateIssuerItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2613,60 +2445,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, *, cls=None, **kwargs): @@ -2720,8 +2535,6 @@ async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, cr 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2796,8 +2609,6 @@ async def update_certificate_issuer(self, vault_base_url, issuer_name, provider= 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2858,8 +2669,6 @@ async def get_certificate_issuer(self, vault_base_url, issuer_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2917,8 +2726,6 @@ async def delete_certificate_issuer(self, vault_base_url, issuer_name, *, cls=No header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2988,8 +2795,6 @@ async def create_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateCreateParameters') @@ -3072,8 +2877,6 @@ async def import_certificate(self, vault_base_url, certificate_name, base64_enco 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 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(parameters, 'CertificateImportParameters') @@ -3115,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3128,60 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3222,8 +3009,6 @@ async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3285,8 +3070,6 @@ async def update_certificate_policy(self, vault_base_url, certificate_name, cert 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 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(certificate_policy, 'CertificatePolicy') @@ -3364,8 +3147,6 @@ async def update_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateUpdateParameters') @@ -3429,8 +3210,6 @@ async def get_certificate(self, vault_base_url, certificate_name, certificate_ve header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3493,8 +3272,6 @@ async def update_certificate_operation(self, vault_base_url, certificate_name, c 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3554,8 +3331,6 @@ async def get_certificate_operation(self, vault_base_url, certificate_name, *, c header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3613,8 +3388,6 @@ async def delete_certificate_operation(self, vault_base_url, certificate_name, * header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3686,8 +3459,6 @@ async def merge_certificate(self, vault_base_url, certificate_name, x509_certifi 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 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(parameters, 'CertificateMergeParameters') @@ -3730,11 +3501,12 @@ def get_deleted_certificates( :type maxresults: int :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedCertificateItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3742,60 +3514,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3836,8 +3591,6 @@ async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3895,8 +3648,6 @@ async def purge_deleted_certificate(self, vault_base_url, certificate_name, *, c header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3952,8 +3703,6 @@ async def recover_deleted_certificate(self, vault_base_url, certificate_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3987,11 +3736,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v2016_10_01.models.StorageAccountItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3999,60 +3749,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_storage_accounts.metadata = {'url': '/storage'} async def delete_storage_account(self, vault_base_url, storage_account_name, *, cls=None, **kwargs): @@ -4089,8 +3822,6 @@ async def delete_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4145,8 +3876,6 @@ async def get_storage_account(self, vault_base_url, storage_account_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4221,8 +3950,6 @@ async def set_storage_account(self, vault_base_url, storage_account_name, resour 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 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(parameters, 'StorageAccountCreateParameters') @@ -4298,8 +4025,6 @@ async def update_storage_account(self, vault_base_url, storage_account_name, act 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4362,8 +4087,6 @@ async def regenerate_storage_account_key(self, vault_base_url, storage_account_n 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4402,11 +4125,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v2016_10_01.models.SasDefinitionItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4415,60 +4139,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, *, cls=None, **kwargs): @@ -4508,8 +4215,6 @@ async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4567,8 +4272,6 @@ async def get_sas_definition(self, vault_base_url, storage_account_name, sas_def header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4639,8 +4342,6 @@ async def set_sas_definition(self, vault_base_url, storage_account_name, sas_def 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 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(parameters1, 'SasDefinitionCreateParameters') @@ -4714,8 +4415,6 @@ async def update_sas_definition(self, vault_base_url, storage_account_name, sas_ 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 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(parameters1, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/__init__.py index 76f4bf1ab9bc..6f134becdbd3 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/__init__.py @@ -20,9 +20,11 @@ from ._models_py3 import CertificateCreateParameters from ._models_py3 import CertificateImportParameters from ._models_py3 import CertificateIssuerItem + from ._models_py3 import CertificateIssuerListResult from ._models_py3 import CertificateIssuerSetParameters from ._models_py3 import CertificateIssuerUpdateParameters from ._models_py3 import CertificateItem + from ._models_py3 import CertificateListResult from ._models_py3 import CertificateMergeParameters from ._models_py3 import CertificateOperation from ._models_py3 import CertificateOperationUpdateParameter @@ -32,10 +34,13 @@ from ._models_py3 import Contacts from ._models_py3 import DeletedCertificateBundle from ._models_py3 import DeletedCertificateItem + from ._models_py3 import DeletedCertificateListResult from ._models_py3 import DeletedKeyBundle from ._models_py3 import DeletedKeyItem + from ._models_py3 import DeletedKeyListResult from ._models_py3 import DeletedSecretBundle from ._models_py3 import DeletedSecretItem + from ._models_py3 import DeletedSecretListResult from ._models_py3 import Error from ._models_py3 import IssuerAttributes from ._models_py3 import IssuerBundle @@ -47,6 +52,7 @@ from ._models_py3 import KeyCreateParameters from ._models_py3 import KeyImportParameters from ._models_py3 import KeyItem + from ._models_py3 import KeyListResult from ._models_py3 import KeyOperationResult from ._models_py3 import KeyOperationsParameters from ._models_py3 import KeyProperties @@ -63,10 +69,12 @@ from ._models_py3 import SasDefinitionBundle from ._models_py3 import SasDefinitionCreateParameters from ._models_py3 import SasDefinitionItem + from ._models_py3 import SasDefinitionListResult from ._models_py3 import SasDefinitionUpdateParameters from ._models_py3 import SecretAttributes from ._models_py3 import SecretBundle from ._models_py3 import SecretItem + from ._models_py3 import SecretListResult from ._models_py3 import SecretProperties from ._models_py3 import SecretRestoreParameters from ._models_py3 import SecretSetParameters @@ -77,6 +85,7 @@ from ._models_py3 import StorageAccountRegenerteKeyParameters from ._models_py3 import StorageAccountUpdateParameters from ._models_py3 import StorageBundle + from ._models_py3 import StorageListResult from ._models_py3 import SubjectAlternativeNames from ._models_py3 import Trigger from ._models_py3 import X509CertificateProperties @@ -91,9 +100,11 @@ from ._models import CertificateCreateParameters from ._models import CertificateImportParameters from ._models import CertificateIssuerItem + from ._models import CertificateIssuerListResult from ._models import CertificateIssuerSetParameters from ._models import CertificateIssuerUpdateParameters from ._models import CertificateItem + from ._models import CertificateListResult from ._models import CertificateMergeParameters from ._models import CertificateOperation from ._models import CertificateOperationUpdateParameter @@ -103,10 +114,13 @@ from ._models import Contacts from ._models import DeletedCertificateBundle from ._models import DeletedCertificateItem + from ._models import DeletedCertificateListResult from ._models import DeletedKeyBundle from ._models import DeletedKeyItem + from ._models import DeletedKeyListResult from ._models import DeletedSecretBundle from ._models import DeletedSecretItem + from ._models import DeletedSecretListResult from ._models import Error from ._models import IssuerAttributes from ._models import IssuerBundle @@ -118,6 +132,7 @@ from ._models import KeyCreateParameters from ._models import KeyImportParameters from ._models import KeyItem + from ._models import KeyListResult from ._models import KeyOperationResult from ._models import KeyOperationsParameters from ._models import KeyProperties @@ -134,10 +149,12 @@ from ._models import SasDefinitionBundle from ._models import SasDefinitionCreateParameters from ._models import SasDefinitionItem + from ._models import SasDefinitionListResult from ._models import SasDefinitionUpdateParameters from ._models import SecretAttributes from ._models import SecretBundle from ._models import SecretItem + from ._models import SecretListResult from ._models import SecretProperties from ._models import SecretRestoreParameters from ._models import SecretSetParameters @@ -148,18 +165,10 @@ from ._models import StorageAccountRegenerteKeyParameters from ._models import StorageAccountUpdateParameters from ._models import StorageBundle + from ._models import StorageListResult from ._models import SubjectAlternativeNames from ._models import Trigger from ._models import X509CertificateProperties -from ._paged_models import CertificateIssuerItemPaged -from ._paged_models import CertificateItemPaged -from ._paged_models import DeletedCertificateItemPaged -from ._paged_models import DeletedKeyItemPaged -from ._paged_models import DeletedSecretItemPaged -from ._paged_models import KeyItemPaged -from ._paged_models import SasDefinitionItemPaged -from ._paged_models import SecretItemPaged -from ._paged_models import StorageAccountItemPaged from ._key_vault_client_enums import ( JsonWebKeyType, JsonWebKeyCurveName, @@ -182,9 +191,11 @@ 'CertificateCreateParameters', 'CertificateImportParameters', 'CertificateIssuerItem', + 'CertificateIssuerListResult', 'CertificateIssuerSetParameters', 'CertificateIssuerUpdateParameters', 'CertificateItem', + 'CertificateListResult', 'CertificateMergeParameters', 'CertificateOperation', 'CertificateOperationUpdateParameter', @@ -194,10 +205,13 @@ 'Contacts', 'DeletedCertificateBundle', 'DeletedCertificateItem', + 'DeletedCertificateListResult', 'DeletedKeyBundle', 'DeletedKeyItem', + 'DeletedKeyListResult', 'DeletedSecretBundle', 'DeletedSecretItem', + 'DeletedSecretListResult', 'Error', 'IssuerAttributes', 'IssuerBundle', @@ -209,6 +223,7 @@ 'KeyCreateParameters', 'KeyImportParameters', 'KeyItem', + 'KeyListResult', 'KeyOperationResult', 'KeyOperationsParameters', 'KeyProperties', @@ -225,10 +240,12 @@ 'SasDefinitionBundle', 'SasDefinitionCreateParameters', 'SasDefinitionItem', + 'SasDefinitionListResult', 'SasDefinitionUpdateParameters', 'SecretAttributes', 'SecretBundle', 'SecretItem', + 'SecretListResult', 'SecretProperties', 'SecretRestoreParameters', 'SecretSetParameters', @@ -239,18 +256,10 @@ 'StorageAccountRegenerteKeyParameters', 'StorageAccountUpdateParameters', 'StorageBundle', + 'StorageListResult', 'SubjectAlternativeNames', 'Trigger', 'X509CertificateProperties', - 'KeyItemPaged', - 'DeletedKeyItemPaged', - 'SecretItemPaged', - 'DeletedSecretItemPaged', - 'CertificateItemPaged', - 'CertificateIssuerItemPaged', - 'DeletedCertificateItemPaged', - 'StorageAccountItemPaged', - 'SasDefinitionItemPaged', 'JsonWebKeyType', 'JsonWebKeyCurveName', 'DeletionRecoveryLevel', diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py index f9caaf92c16e..e918a167f2dd 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py @@ -341,6 +341,37 @@ def __init__(self, **kwargs): self.provider = kwargs.get('provider', None) +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -435,6 +466,35 @@ def __init__(self, **kwargs): self.x509_thumbprint = kwargs.get('x509_thumbprint', None) +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v2016_10_01.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -805,6 +865,36 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: + list[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -975,6 +1065,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1176,6 +1295,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -1531,6 +1679,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v2016_10_01.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2012,6 +2189,35 @@ def __init__(self, **kwargs): self.tags = None +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2084,6 +2290,35 @@ def __init__(self, **kwargs): self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2415,6 +2650,36 @@ def __init__(self, **kwargs): self.tags = None +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SubjectAlternativeNames(Model): """The subject alternate names of a X509 object. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py index 4920c195ef89..07d530b486f6 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py @@ -341,6 +341,37 @@ def __init__(self, *, id: str=None, provider: str=None, **kwargs) -> None: self.provider = provider +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -435,6 +466,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.x509_thumbprint = x509_thumbprint +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v2016_10_01.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -805,6 +865,36 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: + list[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -975,6 +1065,35 @@ def __init__(self, *, kid: str=None, attributes=None, tags=None, recovery_id: st self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1176,6 +1295,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, content_type: st self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -1531,6 +1679,35 @@ def __init__(self, *, key, hsm: bool=None, key_attributes=None, tags=None, **kwa self.tags = tags +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v2016_10_01.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2012,6 +2189,35 @@ def __init__(self, **kwargs) -> None: self.tags = None +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2084,6 +2290,35 @@ def __init__(self, *, enabled: bool=None, not_before=None, expires=None, **kwarg self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2415,6 +2650,36 @@ def __init__(self, **kwargs) -> None: self.tags = None +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SubjectAlternativeNames(Model): """The subject alternate names of a X509 object. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_paged_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_paged_models.py deleted file mode 100644 index e5ddd1d7edc4..000000000000 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_paged_models.py +++ /dev/null @@ -1,131 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from azure.core.paging import Paged - - -class KeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`KeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[KeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(KeyItemPaged, self).__init__(*args, **kwargs) -class DeletedKeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedKeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedKeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedKeyItemPaged, self).__init__(*args, **kwargs) -class SecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SecretItemPaged, self).__init__(*args, **kwargs) -class DeletedSecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSecretItemPaged, self).__init__(*args, **kwargs) -class CertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateItemPaged, self).__init__(*args, **kwargs) -class CertificateIssuerItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateIssuerItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateIssuerItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateIssuerItemPaged, self).__init__(*args, **kwargs) -class DeletedCertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedCertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedCertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedCertificateItemPaged, self).__init__(*args, **kwargs) -class StorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`StorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(StorageAccountItemPaged, self).__init__(*args, **kwargs) -class SasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SasDefinitionItemPaged, self).__init__(*args, **kwargs) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 40ad1ab95087..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.paging import ItemPaged from .. import models import uuid @@ -78,8 +79,6 @@ def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops=None, 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 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(parameters, 'KeyCreateParameters') @@ -154,8 +153,6 @@ def import_key(self, vault_base_url, key_name, key, hsm=None, key_attributes=Non 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 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(parameters, 'KeyImportParameters') @@ -218,8 +215,6 @@ def delete_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -294,8 +289,6 @@ def update_key(self, vault_base_url, key_name, key_version, key_ops=None, key_at 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 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(parameters, 'KeyUpdateParameters') @@ -360,8 +353,6 @@ def get_key(self, vault_base_url, key_name, key_version, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -399,11 +390,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -412,46 +404,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -473,11 +462,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -485,46 +475,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_keys.metadata = {'url': '/keys'} def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -576,8 +563,6 @@ def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -649,8 +634,6 @@ def restore_key(self, vault_base_url, key_bundle_backup, cls=None, **kwargs): 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 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(parameters, 'KeyRestoreParameters') @@ -731,8 +714,6 @@ def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -810,8 +791,6 @@ def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -887,8 +866,6 @@ def sign(self, vault_base_url, key_name, key_version, algorithm, value, cls=None 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 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(parameters, 'KeySignParameters') @@ -970,8 +947,6 @@ def verify(self, vault_base_url, key_name, key_version, algorithm, digest, signa 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 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(parameters, 'KeyVerifyParameters') @@ -1049,8 +1024,6 @@ def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cls= 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 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(parameters, 'KeyOperationsParameters') @@ -1126,8 +1099,6 @@ def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cl 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 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(parameters, 'KeyOperationsParameters') @@ -1171,11 +1142,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedKeyItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1183,46 +1155,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -1263,8 +1232,6 @@ def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1322,8 +1289,6 @@ def purge_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1379,8 +1344,6 @@ def recover_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1451,8 +1414,6 @@ def set_secret(self, vault_base_url, secret_name, value, tags=None, content_type 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 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(parameters, 'SecretSetParameters') @@ -1513,8 +1474,6 @@ def delete_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1588,8 +1547,6 @@ def update_secret(self, vault_base_url, secret_name, secret_version, content_typ 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 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(parameters, 'SecretUpdateParameters') @@ -1652,8 +1609,6 @@ def get_secret(self, vault_base_url, secret_name, secret_version, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1691,11 +1646,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1703,46 +1659,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1763,11 +1716,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1776,46 +1730,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1834,11 +1785,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedSecretItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1846,46 +1798,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): @@ -1925,8 +1874,6 @@ def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1984,8 +1931,6 @@ def purge_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2038,8 +1983,6 @@ def recover_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2097,8 +2040,6 @@ def backup_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2158,8 +2099,6 @@ def restore_secret(self, vault_base_url, secret_bundle_backup, cls=None, **kwarg 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 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(parameters, 'SecretRestoreParameters') @@ -2199,11 +2138,12 @@ def get_certificates( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2211,46 +2151,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificates.metadata = {'url': '/certificates'} def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -2291,8 +2228,6 @@ def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2351,8 +2286,6 @@ def set_certificate_contacts(self, vault_base_url, contact_list=None, cls=None, 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 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(contacts, 'Contacts') @@ -2410,8 +2343,6 @@ def get_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2465,8 +2396,6 @@ def delete_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2503,11 +2432,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateIssuerItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2515,46 +2445,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, cls=None, **kwargs): @@ -2608,8 +2535,6 @@ def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credenti 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2684,8 +2609,6 @@ def update_certificate_issuer(self, vault_base_url, issuer_name, provider=None, 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2746,8 +2669,6 @@ def get_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2805,8 +2726,6 @@ def delete_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2876,8 +2795,6 @@ def create_certificate(self, vault_base_url, certificate_name, certificate_polic 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 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(parameters, 'CertificateCreateParameters') @@ -2960,8 +2877,6 @@ def import_certificate(self, vault_base_url, certificate_name, base64_encoded_ce 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 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(parameters, 'CertificateImportParameters') @@ -3003,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3016,46 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3096,8 +3009,6 @@ def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3159,8 +3070,6 @@ def update_certificate_policy(self, vault_base_url, certificate_name, certificat 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 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(certificate_policy, 'CertificatePolicy') @@ -3238,8 +3147,6 @@ def update_certificate(self, vault_base_url, certificate_name, certificate_versi 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 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(parameters, 'CertificateUpdateParameters') @@ -3303,8 +3210,6 @@ def get_certificate(self, vault_base_url, certificate_name, certificate_version, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3367,8 +3272,6 @@ def update_certificate_operation(self, vault_base_url, certificate_name, cancell 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3428,8 +3331,6 @@ def get_certificate_operation(self, vault_base_url, certificate_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3487,8 +3388,6 @@ def delete_certificate_operation(self, vault_base_url, certificate_name, cls=Non header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3560,8 +3459,6 @@ def merge_certificate(self, vault_base_url, certificate_name, x509_certificates, 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 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(parameters, 'CertificateMergeParameters') @@ -3604,11 +3501,12 @@ def get_deleted_certificates( :type maxresults: int :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedCertificateItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3616,46 +3514,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3696,8 +3591,6 @@ def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3755,8 +3648,6 @@ def purge_deleted_certificate(self, vault_base_url, certificate_name, cls=None, header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3812,8 +3703,6 @@ def recover_deleted_certificate(self, vault_base_url, certificate_name, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3847,11 +3736,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v2016_10_01.models.StorageAccountItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3859,46 +3749,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_storage_accounts.metadata = {'url': '/storage'} def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, **kwargs): @@ -3935,8 +3822,6 @@ def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3991,8 +3876,6 @@ def get_storage_account(self, vault_base_url, storage_account_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4067,8 +3950,6 @@ def set_storage_account(self, vault_base_url, storage_account_name, resource_id, 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 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(parameters, 'StorageAccountCreateParameters') @@ -4144,8 +4025,6 @@ def update_storage_account(self, vault_base_url, storage_account_name, active_ke 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4208,8 +4087,6 @@ def regenerate_storage_account_key(self, vault_base_url, storage_account_name, k 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4248,11 +4125,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v2016_10_01.models.SasDefinitionItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4261,46 +4139,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def delete_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, cls=None, **kwargs): @@ -4340,8 +4215,6 @@ def delete_sas_definition(self, vault_base_url, storage_account_name, sas_defini header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4399,8 +4272,6 @@ def get_sas_definition(self, vault_base_url, storage_account_name, sas_definitio header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4471,8 +4342,6 @@ def set_sas_definition(self, vault_base_url, storage_account_name, sas_definitio 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 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(parameters1, 'SasDefinitionCreateParameters') @@ -4546,8 +4415,6 @@ def update_sas_definition(self, vault_base_url, storage_account_name, sas_defini 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 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(parameters1, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/__init__.py index d3fda25cc7ab..e913d4cf6c46 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/__init__.py @@ -9,9 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from ._configuration import KeyVaultClientConfiguration from ._key_vault_client import KeyVaultClient -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] from .version import VERSION diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_configuration.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_configuration.py index beb5eb930fa8..28cf75e3d2b4 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_configuration.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_configuration.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials @@ -45,4 +44,5 @@ def _configure(self, **kwargs): self.proxy_policy = policies.ProxyPolicy(**kwargs) self.logging_policy = policies.NetworkTraceLoggingPolicy(**kwargs) self.retry_policy = policies.RetryPolicy(**kwargs) + self.custom_hook_policy = policies.CustomHookPolicy(**kwargs) self.redirect_policy = policies.RedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_key_vault_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_key_vault_client.py index 699433682e60..a1a1eb19328b 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_key_vault_client.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/__init__.py index ffece9055d9b..fb2e6c3866fd 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/__init__.py @@ -10,5 +10,4 @@ # -------------------------------------------------------------------------- from ._key_vault_client_async import KeyVaultClient -from ._configuration_async import KeyVaultClientConfiguration -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_configuration_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_configuration_async.py index 2144132ebe2d..a61d9eeff444 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_configuration_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_configuration_async.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_key_vault_client_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_key_vault_client_async.py index 739ab6ea407d..482d6336ab1a 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_key_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_key_vault_client_async.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index a97144221c6a..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.async_paging import AsyncItemPaged, AsyncList from ... import models import uuid @@ -77,8 +78,6 @@ async def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops 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 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(parameters, 'KeyCreateParameters') @@ -153,8 +152,6 @@ async def import_key(self, vault_base_url, key_name, key, hsm=None, key_attribut 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 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(parameters, 'KeyImportParameters') @@ -217,8 +214,6 @@ async def delete_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -293,8 +288,6 @@ async def update_key(self, vault_base_url, key_name, key_version, key_ops=None, 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 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(parameters, 'KeyUpdateParameters') @@ -359,8 +352,6 @@ async def get_key(self, vault_base_url, key_name, key_version, *, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -398,11 +389,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -411,60 +403,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -486,11 +461,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -498,60 +474,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_keys.metadata = {'url': '/keys'} async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -603,8 +562,6 @@ async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -676,8 +633,6 @@ async def restore_key(self, vault_base_url, key_bundle_backup, *, cls=None, **kw 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 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(parameters, 'KeyRestoreParameters') @@ -758,8 +713,6 @@ async def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -837,8 +790,6 @@ async def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -914,8 +865,6 @@ async def sign(self, vault_base_url, key_name, key_version, algorithm, value, *, 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 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(parameters, 'KeySignParameters') @@ -997,8 +946,6 @@ async def verify(self, vault_base_url, key_name, key_version, algorithm, digest, 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 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(parameters, 'KeyVerifyParameters') @@ -1076,8 +1023,6 @@ async def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value 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 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(parameters, 'KeyOperationsParameters') @@ -1153,8 +1098,6 @@ async def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, val 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 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(parameters, 'KeyOperationsParameters') @@ -1198,11 +1141,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v7_0.models.DeletedKeyItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1210,60 +1154,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -1304,8 +1231,6 @@ async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs) header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1363,8 +1288,6 @@ async def purge_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwarg header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1420,8 +1343,6 @@ async def recover_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1491,8 +1412,6 @@ async def set_secret(self, vault_base_url, secret_name, value, tags=None, conten 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 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(parameters, 'SecretSetParameters') @@ -1553,8 +1472,6 @@ async def delete_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1627,8 +1544,6 @@ async def update_secret(self, vault_base_url, secret_name, secret_version, conte 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 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(parameters, 'SecretUpdateParameters') @@ -1691,8 +1606,6 @@ async def get_secret(self, vault_base_url, secret_name, secret_version, *, cls=N header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1730,11 +1643,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1742,60 +1656,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1816,11 +1713,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1829,60 +1727,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1901,11 +1782,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSecretItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1913,60 +1795,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs): @@ -2006,8 +1871,6 @@ async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2065,8 +1928,6 @@ async def purge_deleted_secret(self, vault_base_url, secret_name, *, cls=None, * header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2119,8 +1980,6 @@ async def recover_deleted_secret(self, vault_base_url, secret_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2178,8 +2037,6 @@ async def backup_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2239,8 +2096,6 @@ async def restore_secret(self, vault_base_url, secret_bundle_backup, *, cls=None 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 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(parameters, 'SecretRestoreParameters') @@ -2283,11 +2138,12 @@ def get_certificates( :type include_pending: bool :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2295,9 +2151,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -2306,51 +2159,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificates.metadata = {'url': '/certificates'} async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -2391,8 +2230,6 @@ async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2451,8 +2288,6 @@ async def set_certificate_contacts(self, vault_base_url, contact_list=None, *, c 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 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(contacts, 'Contacts') @@ -2510,8 +2345,6 @@ async def get_certificate_contacts(self, vault_base_url, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2565,8 +2398,6 @@ async def delete_certificate_contacts(self, vault_base_url, *, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2603,11 +2434,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v7_0.models.CertificateIssuerItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2615,60 +2447,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, *, cls=None, **kwargs): @@ -2721,8 +2536,6 @@ async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, cr 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2796,8 +2609,6 @@ async def update_certificate_issuer(self, vault_base_url, issuer_name, provider= 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2858,8 +2669,6 @@ async def get_certificate_issuer(self, vault_base_url, issuer_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2917,8 +2726,6 @@ async def delete_certificate_issuer(self, vault_base_url, issuer_name, *, cls=No header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2988,8 +2795,6 @@ async def create_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateCreateParameters') @@ -3072,8 +2877,6 @@ async def import_certificate(self, vault_base_url, certificate_name, base64_enco 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 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(parameters, 'CertificateImportParameters') @@ -3115,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3128,60 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3222,8 +3009,6 @@ async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3285,8 +3070,6 @@ async def update_certificate_policy(self, vault_base_url, certificate_name, cert 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 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(certificate_policy, 'CertificatePolicy') @@ -3364,8 +3147,6 @@ async def update_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateUpdateParameters') @@ -3429,8 +3210,6 @@ async def get_certificate(self, vault_base_url, certificate_name, certificate_ve header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3493,8 +3272,6 @@ async def update_certificate_operation(self, vault_base_url, certificate_name, c 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3554,8 +3331,6 @@ async def get_certificate_operation(self, vault_base_url, certificate_name, *, c header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3613,8 +3388,6 @@ async def delete_certificate_operation(self, vault_base_url, certificate_name, * header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3686,8 +3459,6 @@ async def merge_certificate(self, vault_base_url, certificate_name, x509_certifi 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 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(parameters, 'CertificateMergeParameters') @@ -3748,8 +3519,6 @@ async def backup_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3809,8 +3578,6 @@ async def restore_certificate(self, vault_base_url, certificate_bundle_backup, * 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 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(parameters, 'CertificateRestoreParameters') @@ -3856,11 +3623,12 @@ def get_deleted_certificates( :type include_pending: bool :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v7_0.models.DeletedCertificateItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3868,9 +3636,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -3879,51 +3644,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3964,8 +3715,6 @@ async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4023,8 +3772,6 @@ async def purge_deleted_certificate(self, vault_base_url, certificate_name, *, c header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4080,8 +3827,6 @@ async def recover_deleted_certificate(self, vault_base_url, certificate_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4115,11 +3860,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.StorageAccountItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -4127,60 +3873,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_storage_accounts.metadata = {'url': '/storage'} def get_deleted_storage_accounts( @@ -4199,11 +3928,12 @@ def get_deleted_storage_accounts( :type maxresults: int :return: An iterator like instance of DeletedStorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.DeletedStorageAccountItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_storage_accounts.metadata['url'] @@ -4211,60 +3941,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('DeletedStorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedStorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_storage_accounts.metadata = {'url': '/deletedstorage'} async def get_deleted_storage_account(self, vault_base_url, storage_account_name, *, cls=None, **kwargs): @@ -4304,8 +4017,6 @@ async def get_deleted_storage_account(self, vault_base_url, storage_account_name header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4363,8 +4074,6 @@ async def purge_deleted_storage_account(self, vault_base_url, storage_account_na header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4417,8 +4126,6 @@ async def recover_deleted_storage_account(self, vault_base_url, storage_account_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4475,8 +4182,6 @@ async def backup_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4536,8 +4241,6 @@ async def restore_storage_account(self, vault_base_url, storage_bundle_backup, * 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 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(parameters, 'StorageRestoreParameters') @@ -4595,8 +4298,6 @@ async def delete_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4651,8 +4352,6 @@ async def get_storage_account(self, vault_base_url, storage_account_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4727,8 +4426,6 @@ async def set_storage_account(self, vault_base_url, storage_account_name, resour 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 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(parameters, 'StorageAccountCreateParameters') @@ -4804,8 +4501,6 @@ async def update_storage_account(self, vault_base_url, storage_account_name, act 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4868,8 +4563,6 @@ async def regenerate_storage_account_key(self, vault_base_url, storage_account_n 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4908,11 +4601,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.SasDefinitionItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4921,60 +4615,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def get_deleted_sas_definitions( @@ -4996,11 +4673,12 @@ def get_deleted_sas_definitions( :type maxresults: int :return: An iterator like instance of DeletedSasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSasDefinitionItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_sas_definitions.metadata['url'] @@ -5009,60 +4687,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_sas_definitions.metadata = {'url': '/deletedstorage/{storage-account-name}/sas'} async def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, *, cls=None, **kwargs): @@ -5105,8 +4766,6 @@ async def get_deleted_sas_definition(self, vault_base_url, storage_account_name, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5167,8 +4826,6 @@ async def recover_deleted_sas_definition(self, vault_base_url, storage_account_n header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -5226,8 +4883,6 @@ async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -5285,8 +4940,6 @@ async def get_sas_definition(self, vault_base_url, storage_account_name, sas_def header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5364,8 +5017,6 @@ async def set_sas_definition(self, vault_base_url, storage_account_name, sas_def 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 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(parameters, 'SasDefinitionCreateParameters') @@ -5446,8 +5097,6 @@ async def update_sas_definition(self, vault_base_url, storage_account_name, sas_ 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 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(parameters, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/__init__.py index 4debdd0f3d13..5e72f49a73f6 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/__init__.py @@ -22,9 +22,11 @@ from ._models_py3 import CertificateCreateParameters from ._models_py3 import CertificateImportParameters from ._models_py3 import CertificateIssuerItem + from ._models_py3 import CertificateIssuerListResult from ._models_py3 import CertificateIssuerSetParameters from ._models_py3 import CertificateIssuerUpdateParameters from ._models_py3 import CertificateItem + from ._models_py3 import CertificateListResult from ._models_py3 import CertificateMergeParameters from ._models_py3 import CertificateOperation from ._models_py3 import CertificateOperationUpdateParameter @@ -35,14 +37,19 @@ from ._models_py3 import Contacts from ._models_py3 import DeletedCertificateBundle from ._models_py3 import DeletedCertificateItem + from ._models_py3 import DeletedCertificateListResult from ._models_py3 import DeletedKeyBundle from ._models_py3 import DeletedKeyItem + from ._models_py3 import DeletedKeyListResult from ._models_py3 import DeletedSasDefinitionBundle from ._models_py3 import DeletedSasDefinitionItem + from ._models_py3 import DeletedSasDefinitionListResult from ._models_py3 import DeletedSecretBundle from ._models_py3 import DeletedSecretItem + from ._models_py3 import DeletedSecretListResult from ._models_py3 import DeletedStorageAccountItem from ._models_py3 import DeletedStorageBundle + from ._models_py3 import DeletedStorageListResult from ._models_py3 import Error from ._models_py3 import IssuerAttributes from ._models_py3 import IssuerBundle @@ -54,6 +61,7 @@ from ._models_py3 import KeyCreateParameters from ._models_py3 import KeyImportParameters from ._models_py3 import KeyItem + from ._models_py3 import KeyListResult from ._models_py3 import KeyOperationResult from ._models_py3 import KeyOperationsParameters from ._models_py3 import KeyProperties @@ -70,10 +78,12 @@ from ._models_py3 import SasDefinitionBundle from ._models_py3 import SasDefinitionCreateParameters from ._models_py3 import SasDefinitionItem + from ._models_py3 import SasDefinitionListResult from ._models_py3 import SasDefinitionUpdateParameters from ._models_py3 import SecretAttributes from ._models_py3 import SecretBundle from ._models_py3 import SecretItem + from ._models_py3 import SecretListResult from ._models_py3 import SecretProperties from ._models_py3 import SecretRestoreParameters from ._models_py3 import SecretSetParameters @@ -84,6 +94,7 @@ from ._models_py3 import StorageAccountRegenerteKeyParameters from ._models_py3 import StorageAccountUpdateParameters from ._models_py3 import StorageBundle + from ._models_py3 import StorageListResult from ._models_py3 import StorageRestoreParameters from ._models_py3 import SubjectAlternativeNames from ._models_py3 import Trigger @@ -101,9 +112,11 @@ from ._models import CertificateCreateParameters from ._models import CertificateImportParameters from ._models import CertificateIssuerItem + from ._models import CertificateIssuerListResult from ._models import CertificateIssuerSetParameters from ._models import CertificateIssuerUpdateParameters from ._models import CertificateItem + from ._models import CertificateListResult from ._models import CertificateMergeParameters from ._models import CertificateOperation from ._models import CertificateOperationUpdateParameter @@ -114,14 +127,19 @@ from ._models import Contacts from ._models import DeletedCertificateBundle from ._models import DeletedCertificateItem + from ._models import DeletedCertificateListResult from ._models import DeletedKeyBundle from ._models import DeletedKeyItem + from ._models import DeletedKeyListResult from ._models import DeletedSasDefinitionBundle from ._models import DeletedSasDefinitionItem + from ._models import DeletedSasDefinitionListResult from ._models import DeletedSecretBundle from ._models import DeletedSecretItem + from ._models import DeletedSecretListResult from ._models import DeletedStorageAccountItem from ._models import DeletedStorageBundle + from ._models import DeletedStorageListResult from ._models import Error from ._models import IssuerAttributes from ._models import IssuerBundle @@ -133,6 +151,7 @@ from ._models import KeyCreateParameters from ._models import KeyImportParameters from ._models import KeyItem + from ._models import KeyListResult from ._models import KeyOperationResult from ._models import KeyOperationsParameters from ._models import KeyProperties @@ -149,10 +168,12 @@ from ._models import SasDefinitionBundle from ._models import SasDefinitionCreateParameters from ._models import SasDefinitionItem + from ._models import SasDefinitionListResult from ._models import SasDefinitionUpdateParameters from ._models import SecretAttributes from ._models import SecretBundle from ._models import SecretItem + from ._models import SecretListResult from ._models import SecretProperties from ._models import SecretRestoreParameters from ._models import SecretSetParameters @@ -163,21 +184,11 @@ from ._models import StorageAccountRegenerteKeyParameters from ._models import StorageAccountUpdateParameters from ._models import StorageBundle + from ._models import StorageListResult from ._models import StorageRestoreParameters from ._models import SubjectAlternativeNames from ._models import Trigger from ._models import X509CertificateProperties -from ._paged_models import CertificateIssuerItemPaged -from ._paged_models import CertificateItemPaged -from ._paged_models import DeletedCertificateItemPaged -from ._paged_models import DeletedKeyItemPaged -from ._paged_models import DeletedSasDefinitionItemPaged -from ._paged_models import DeletedSecretItemPaged -from ._paged_models import DeletedStorageAccountItemPaged -from ._paged_models import KeyItemPaged -from ._paged_models import SasDefinitionItemPaged -from ._paged_models import SecretItemPaged -from ._paged_models import StorageAccountItemPaged from ._key_vault_client_enums import ( JsonWebKeyType, JsonWebKeyCurveName, @@ -203,9 +214,11 @@ 'CertificateCreateParameters', 'CertificateImportParameters', 'CertificateIssuerItem', + 'CertificateIssuerListResult', 'CertificateIssuerSetParameters', 'CertificateIssuerUpdateParameters', 'CertificateItem', + 'CertificateListResult', 'CertificateMergeParameters', 'CertificateOperation', 'CertificateOperationUpdateParameter', @@ -216,14 +229,19 @@ 'Contacts', 'DeletedCertificateBundle', 'DeletedCertificateItem', + 'DeletedCertificateListResult', 'DeletedKeyBundle', 'DeletedKeyItem', + 'DeletedKeyListResult', 'DeletedSasDefinitionBundle', 'DeletedSasDefinitionItem', + 'DeletedSasDefinitionListResult', 'DeletedSecretBundle', 'DeletedSecretItem', + 'DeletedSecretListResult', 'DeletedStorageAccountItem', 'DeletedStorageBundle', + 'DeletedStorageListResult', 'Error', 'IssuerAttributes', 'IssuerBundle', @@ -235,6 +253,7 @@ 'KeyCreateParameters', 'KeyImportParameters', 'KeyItem', + 'KeyListResult', 'KeyOperationResult', 'KeyOperationsParameters', 'KeyProperties', @@ -251,10 +270,12 @@ 'SasDefinitionBundle', 'SasDefinitionCreateParameters', 'SasDefinitionItem', + 'SasDefinitionListResult', 'SasDefinitionUpdateParameters', 'SecretAttributes', 'SecretBundle', 'SecretItem', + 'SecretListResult', 'SecretProperties', 'SecretRestoreParameters', 'SecretSetParameters', @@ -265,21 +286,11 @@ 'StorageAccountRegenerteKeyParameters', 'StorageAccountUpdateParameters', 'StorageBundle', + 'StorageListResult', 'StorageRestoreParameters', 'SubjectAlternativeNames', 'Trigger', 'X509CertificateProperties', - 'KeyItemPaged', - 'DeletedKeyItemPaged', - 'SecretItemPaged', - 'DeletedSecretItemPaged', - 'CertificateItemPaged', - 'CertificateIssuerItemPaged', - 'DeletedCertificateItemPaged', - 'StorageAccountItemPaged', - 'DeletedStorageAccountItemPaged', - 'SasDefinitionItemPaged', - 'DeletedSasDefinitionItemPaged', 'JsonWebKeyType', 'JsonWebKeyCurveName', 'DeletionRecoveryLevel', diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py index e02ddd417cdb..24dfe4beb6a9 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py @@ -385,6 +385,36 @@ def __init__(self, **kwargs): self.provider = kwargs.get('provider', None) +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -479,6 +509,35 @@ def __init__(self, **kwargs): self.x509_thumbprint = kwargs.get('x509_thumbprint', None) +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -867,6 +926,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: list[~azure.keyvault.v7_0.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -1037,6 +1125,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v7_0.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionBundle(Model): """A SAS definition bundle consists of key vault SAS definition details plus its attributes. @@ -1251,6 +1368,36 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSasDefinitionListResult(Model): + """The deleted SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted SAS + definitions in the vault along with a link to the next page of deleted sas + definitions + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + :ivar next_link: The URL to get the next set of deleted SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1452,6 +1599,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageAccountItem(Model): """The storage account item containing storage account metadata. @@ -1662,6 +1838,37 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedStorageListResult(Model): + """The deleted storage account list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted storage + accounts in the vault along with a link to the next page of deleted + storage accounts + :vartype value: + list[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + :ivar next_link: The URL to get the next set of deleted storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedStorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedStorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -2023,6 +2230,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v7_0.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2451,6 +2687,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v7_0.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2534,6 +2799,35 @@ def __init__(self, **kwargs): self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v7_0.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2779,6 +3073,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: list[~azure.keyvault.v7_0.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageRestoreParameters(Model): """The secret restore parameters. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py index 1f394c8f5f38..52f4aa981815 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py @@ -385,6 +385,36 @@ def __init__(self, *, id: str=None, provider: str=None, **kwargs) -> None: self.provider = provider +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -479,6 +509,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.x509_thumbprint = x509_thumbprint +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -867,6 +926,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: list[~azure.keyvault.v7_0.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -1037,6 +1125,35 @@ def __init__(self, *, kid: str=None, attributes=None, tags=None, recovery_id: st self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v7_0.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionBundle(Model): """A SAS definition bundle consists of key vault SAS definition details plus its attributes. @@ -1251,6 +1368,36 @@ def __init__(self, *, recovery_id: str=None, **kwargs) -> None: self.deleted_date = None +class DeletedSasDefinitionListResult(Model): + """The deleted SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted SAS + definitions in the vault along with a link to the next page of deleted sas + definitions + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + :ivar next_link: The URL to get the next set of deleted SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1452,6 +1599,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, content_type: st self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageAccountItem(Model): """The storage account item containing storage account metadata. @@ -1662,6 +1838,37 @@ def __init__(self, *, recovery_id: str=None, **kwargs) -> None: self.deleted_date = None +class DeletedStorageListResult(Model): + """The deleted storage account list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted storage + accounts in the vault along with a link to the next page of deleted + storage accounts + :vartype value: + list[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + :ivar next_link: The URL to get the next set of deleted storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedStorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedStorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -2023,6 +2230,35 @@ def __init__(self, *, key, hsm: bool=None, key_attributes=None, tags=None, **kwa self.tags = tags +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v7_0.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2451,6 +2687,35 @@ def __init__(self, *, template_uri: str, sas_type, validity_period: str, sas_def self.tags = tags +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v7_0.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2534,6 +2799,35 @@ def __init__(self, *, enabled: bool=None, not_before=None, expires=None, **kwarg self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v7_0.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2779,6 +3073,35 @@ def __init__(self, *, active_key_name: str=None, auto_regenerate_key: bool=None, self.tags = tags +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: list[~azure.keyvault.v7_0.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageRestoreParameters(Model): """The secret restore parameters. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_paged_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_paged_models.py deleted file mode 100644 index 0fbf874da2a7..000000000000 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_paged_models.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from azure.core.paging import Paged - - -class KeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`KeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[KeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(KeyItemPaged, self).__init__(*args, **kwargs) -class DeletedKeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedKeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedKeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedKeyItemPaged, self).__init__(*args, **kwargs) -class SecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SecretItemPaged, self).__init__(*args, **kwargs) -class DeletedSecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSecretItemPaged, self).__init__(*args, **kwargs) -class CertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateItemPaged, self).__init__(*args, **kwargs) -class CertificateIssuerItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateIssuerItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateIssuerItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateIssuerItemPaged, self).__init__(*args, **kwargs) -class DeletedCertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedCertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedCertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedCertificateItemPaged, self).__init__(*args, **kwargs) -class StorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`StorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(StorageAccountItemPaged, self).__init__(*args, **kwargs) -class DeletedStorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedStorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedStorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedStorageAccountItemPaged, self).__init__(*args, **kwargs) -class SasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SasDefinitionItemPaged, self).__init__(*args, **kwargs) -class DeletedSasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSasDefinitionItemPaged, self).__init__(*args, **kwargs) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index c0e15566f02e..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.paging import ItemPaged from .. import models import uuid @@ -77,8 +78,6 @@ def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops=None, 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 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(parameters, 'KeyCreateParameters') @@ -153,8 +152,6 @@ def import_key(self, vault_base_url, key_name, key, hsm=None, key_attributes=Non 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 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(parameters, 'KeyImportParameters') @@ -217,8 +214,6 @@ def delete_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -293,8 +288,6 @@ def update_key(self, vault_base_url, key_name, key_version, key_ops=None, key_at 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 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(parameters, 'KeyUpdateParameters') @@ -359,8 +352,6 @@ def get_key(self, vault_base_url, key_name, key_version, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -398,11 +389,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -411,46 +403,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -472,11 +461,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -484,46 +474,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_keys.metadata = {'url': '/keys'} def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -575,8 +562,6 @@ def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -648,8 +633,6 @@ def restore_key(self, vault_base_url, key_bundle_backup, cls=None, **kwargs): 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 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(parameters, 'KeyRestoreParameters') @@ -730,8 +713,6 @@ def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -809,8 +790,6 @@ def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -886,8 +865,6 @@ def sign(self, vault_base_url, key_name, key_version, algorithm, value, cls=None 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 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(parameters, 'KeySignParameters') @@ -969,8 +946,6 @@ def verify(self, vault_base_url, key_name, key_version, algorithm, digest, signa 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 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(parameters, 'KeyVerifyParameters') @@ -1048,8 +1023,6 @@ def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cls= 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 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(parameters, 'KeyOperationsParameters') @@ -1125,8 +1098,6 @@ def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cl 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 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(parameters, 'KeyOperationsParameters') @@ -1170,11 +1141,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v7_0.models.DeletedKeyItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1182,46 +1154,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -1262,8 +1231,6 @@ def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1321,8 +1288,6 @@ def purge_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1378,8 +1343,6 @@ def recover_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1449,8 +1412,6 @@ def set_secret(self, vault_base_url, secret_name, value, tags=None, content_type 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 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(parameters, 'SecretSetParameters') @@ -1511,8 +1472,6 @@ def delete_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1585,8 +1544,6 @@ def update_secret(self, vault_base_url, secret_name, secret_version, content_typ 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 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(parameters, 'SecretUpdateParameters') @@ -1649,8 +1606,6 @@ def get_secret(self, vault_base_url, secret_name, secret_version, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1688,11 +1643,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1700,46 +1656,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1760,11 +1713,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1773,46 +1727,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1831,11 +1782,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSecretItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1843,46 +1795,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): @@ -1922,8 +1871,6 @@ def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1981,8 +1928,6 @@ def purge_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2035,8 +1980,6 @@ def recover_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2094,8 +2037,6 @@ def backup_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2155,8 +2096,6 @@ def restore_secret(self, vault_base_url, secret_bundle_backup, cls=None, **kwarg 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 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(parameters, 'SecretRestoreParameters') @@ -2199,11 +2138,12 @@ def get_certificates( :type include_pending: bool :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2211,9 +2151,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -2222,37 +2159,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificates.metadata = {'url': '/certificates'} def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -2293,8 +2230,6 @@ def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2353,8 +2288,6 @@ def set_certificate_contacts(self, vault_base_url, contact_list=None, cls=None, 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 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(contacts, 'Contacts') @@ -2412,8 +2345,6 @@ def get_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2467,8 +2398,6 @@ def delete_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2505,11 +2434,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v7_0.models.CertificateIssuerItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2517,46 +2447,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, cls=None, **kwargs): @@ -2609,8 +2536,6 @@ def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credenti 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2684,8 +2609,6 @@ def update_certificate_issuer(self, vault_base_url, issuer_name, provider=None, 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2746,8 +2669,6 @@ def get_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2805,8 +2726,6 @@ def delete_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2876,8 +2795,6 @@ def create_certificate(self, vault_base_url, certificate_name, certificate_polic 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 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(parameters, 'CertificateCreateParameters') @@ -2960,8 +2877,6 @@ def import_certificate(self, vault_base_url, certificate_name, base64_encoded_ce 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 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(parameters, 'CertificateImportParameters') @@ -3003,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3016,46 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3096,8 +3009,6 @@ def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3159,8 +3070,6 @@ def update_certificate_policy(self, vault_base_url, certificate_name, certificat 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 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(certificate_policy, 'CertificatePolicy') @@ -3238,8 +3147,6 @@ def update_certificate(self, vault_base_url, certificate_name, certificate_versi 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 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(parameters, 'CertificateUpdateParameters') @@ -3303,8 +3210,6 @@ def get_certificate(self, vault_base_url, certificate_name, certificate_version, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3367,8 +3272,6 @@ def update_certificate_operation(self, vault_base_url, certificate_name, cancell 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3428,8 +3331,6 @@ def get_certificate_operation(self, vault_base_url, certificate_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3487,8 +3388,6 @@ def delete_certificate_operation(self, vault_base_url, certificate_name, cls=Non header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3560,8 +3459,6 @@ def merge_certificate(self, vault_base_url, certificate_name, x509_certificates, 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 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(parameters, 'CertificateMergeParameters') @@ -3622,8 +3519,6 @@ def backup_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3683,8 +3578,6 @@ def restore_certificate(self, vault_base_url, certificate_bundle_backup, cls=Non 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 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(parameters, 'CertificateRestoreParameters') @@ -3730,11 +3623,12 @@ def get_deleted_certificates( :type include_pending: bool :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v7_0.models.DeletedCertificateItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3742,9 +3636,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -3753,37 +3644,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3824,8 +3715,6 @@ def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3883,8 +3772,6 @@ def purge_deleted_certificate(self, vault_base_url, certificate_name, cls=None, header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3940,8 +3827,6 @@ def recover_deleted_certificate(self, vault_base_url, certificate_name, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3975,11 +3860,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.StorageAccountItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3987,46 +3873,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_storage_accounts.metadata = {'url': '/storage'} def get_deleted_storage_accounts( @@ -4045,11 +3928,12 @@ def get_deleted_storage_accounts( :type maxresults: int :return: An iterator like instance of DeletedStorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.DeletedStorageAccountItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_storage_accounts.metadata['url'] @@ -4057,46 +3941,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedStorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedStorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_storage_accounts.metadata = {'url': '/deletedstorage'} def get_deleted_storage_account(self, vault_base_url, storage_account_name, cls=None, **kwargs): @@ -4136,8 +4017,6 @@ def get_deleted_storage_account(self, vault_base_url, storage_account_name, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4195,8 +4074,6 @@ def purge_deleted_storage_account(self, vault_base_url, storage_account_name, cl header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4249,8 +4126,6 @@ def recover_deleted_storage_account(self, vault_base_url, storage_account_name, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4307,8 +4182,6 @@ def backup_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4368,8 +4241,6 @@ def restore_storage_account(self, vault_base_url, storage_bundle_backup, cls=Non 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 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(parameters, 'StorageRestoreParameters') @@ -4427,8 +4298,6 @@ def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4483,8 +4352,6 @@ def get_storage_account(self, vault_base_url, storage_account_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4559,8 +4426,6 @@ def set_storage_account(self, vault_base_url, storage_account_name, resource_id, 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 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(parameters, 'StorageAccountCreateParameters') @@ -4636,8 +4501,6 @@ def update_storage_account(self, vault_base_url, storage_account_name, active_ke 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4700,8 +4563,6 @@ def regenerate_storage_account_key(self, vault_base_url, storage_account_name, k 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4740,11 +4601,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.SasDefinitionItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4753,46 +4615,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def get_deleted_sas_definitions( @@ -4814,11 +4673,12 @@ def get_deleted_sas_definitions( :type maxresults: int :return: An iterator like instance of DeletedSasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSasDefinitionItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_sas_definitions.metadata['url'] @@ -4827,46 +4687,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_sas_definitions.metadata = {'url': '/deletedstorage/{storage-account-name}/sas'} def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, cls=None, **kwargs): @@ -4909,8 +4766,6 @@ def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_d header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4971,8 +4826,6 @@ def recover_deleted_sas_definition(self, vault_base_url, storage_account_name, s header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -5030,8 +4883,6 @@ def delete_sas_definition(self, vault_base_url, storage_account_name, sas_defini header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -5089,8 +4940,6 @@ def get_sas_definition(self, vault_base_url, storage_account_name, sas_definitio header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5168,8 +5017,6 @@ def set_sas_definition(self, vault_base_url, storage_account_name, sas_definitio 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 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(parameters, 'SasDefinitionCreateParameters') @@ -5250,8 +5097,6 @@ def update_sas_definition(self, vault_base_url, storage_account_name, sas_defini 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 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(parameters, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 56148a5820ef..0714edabf420 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -2,8 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from typing import Any, Callable, Mapping, TYPE_CHECKING -from azure.core.async_paging import AsyncPagedMixin +from typing import Any, Callable, Mapping, AsyncIterator, TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy @@ -23,10 +22,10 @@ class AsyncPagingAdapter: - """For each item in an AsyncPagedMixin, returns the result of applying fn to that item. + """For each item in an AsyncIterator, returns the result of applying fn to that item. Python 3.6 added syntax that could replace this (yield within async for).""" - def __init__(self, pages: AsyncPagedMixin, fn: Callable[[Model], Any]) -> None: + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: self._pages = pages self._fn = fn diff --git a/sdk/keyvault/azure-keyvault-keys/tests/keys_vault_client_async.py b/sdk/keyvault/azure-keyvault-keys/tests/keys_vault_client_async.py index b95fd1aa7ad4..a09d581eb39a 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/keys_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/keys_vault_client_async.py @@ -3,7 +3,6 @@ # Licensed under the MIT License. # ------------------------------------ from typing import Any, Callable, Mapping, TYPE_CHECKING -from azure.core.async_paging import AsyncPagedMixin from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies import AsyncBearerTokenCredentialPolicy diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/key_vault_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/key_vault_client.py index afec64f70804..6221dd5e7bec 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/key_vault_client.py @@ -50,14 +50,14 @@ def get_configuration_class(api_version, aio=False): """ if api_version == V7_0_VERSION: if aio: - from .v7_0.aio import KeyVaultClientConfiguration as ImplConfig + from .v7_0.aio._configuration_async import KeyVaultClientConfiguration as ImplConfig else: - from .v7_0 import KeyVaultClientConfiguration as ImplConfig + from .v7_0._configuration import KeyVaultClientConfiguration as ImplConfig elif api_version == V2016_10_01_VERSION: if aio: - from .v2016_10_01.aio import KeyVaultClientConfiguration as ImplConfig + from .v2016_10_01.aio._configuration_async import KeyVaultClientConfiguration as ImplConfig else: - from .v2016_10_01 import KeyVaultClientConfiguration as ImplConfig + from .v2016_10_01._configuration import KeyVaultClientConfiguration as ImplConfig else: raise NotImplementedError("API version {} is not available".format(api_version)) return ImplConfig diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/__init__.py index d3fda25cc7ab..e913d4cf6c46 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/__init__.py @@ -9,9 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from ._configuration import KeyVaultClientConfiguration from ._key_vault_client import KeyVaultClient -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] from .version import VERSION diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_configuration.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_configuration.py index beb5eb930fa8..28cf75e3d2b4 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_configuration.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_configuration.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials @@ -45,4 +44,5 @@ def _configure(self, **kwargs): self.proxy_policy = policies.ProxyPolicy(**kwargs) self.logging_policy = policies.NetworkTraceLoggingPolicy(**kwargs) self.retry_policy = policies.RetryPolicy(**kwargs) + self.custom_hook_policy = policies.CustomHookPolicy(**kwargs) self.redirect_policy = policies.RedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_key_vault_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_key_vault_client.py index 0252b1e16a5e..e3ec609b6cd3 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_key_vault_client.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/__init__.py index ffece9055d9b..fb2e6c3866fd 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/__init__.py @@ -10,5 +10,4 @@ # -------------------------------------------------------------------------- from ._key_vault_client_async import KeyVaultClient -from ._configuration_async import KeyVaultClientConfiguration -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_configuration_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_configuration_async.py index 2144132ebe2d..a61d9eeff444 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_configuration_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_configuration_async.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py index 559d48da029a..ad4b8a97754f 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 28ea64adc6a6..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.async_paging import AsyncItemPaged, AsyncList from ... import models import uuid @@ -78,8 +79,6 @@ async def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops 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 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(parameters, 'KeyCreateParameters') @@ -154,8 +153,6 @@ async def import_key(self, vault_base_url, key_name, key, hsm=None, key_attribut 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 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(parameters, 'KeyImportParameters') @@ -218,8 +215,6 @@ async def delete_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -294,8 +289,6 @@ async def update_key(self, vault_base_url, key_name, key_version, key_ops=None, 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 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(parameters, 'KeyUpdateParameters') @@ -360,8 +353,6 @@ async def get_key(self, vault_base_url, key_name, key_version, *, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -399,11 +390,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -412,60 +404,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -487,11 +462,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -499,60 +475,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_keys.metadata = {'url': '/keys'} async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -604,8 +563,6 @@ async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -677,8 +634,6 @@ async def restore_key(self, vault_base_url, key_bundle_backup, *, cls=None, **kw 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 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(parameters, 'KeyRestoreParameters') @@ -759,8 +714,6 @@ async def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -838,8 +791,6 @@ async def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -915,8 +866,6 @@ async def sign(self, vault_base_url, key_name, key_version, algorithm, value, *, 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 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(parameters, 'KeySignParameters') @@ -998,8 +947,6 @@ async def verify(self, vault_base_url, key_name, key_version, algorithm, digest, 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 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(parameters, 'KeyVerifyParameters') @@ -1077,8 +1024,6 @@ async def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value 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 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(parameters, 'KeyOperationsParameters') @@ -1154,8 +1099,6 @@ async def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, val 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 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(parameters, 'KeyOperationsParameters') @@ -1199,11 +1142,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedKeyItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1211,60 +1155,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -1305,8 +1232,6 @@ async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs) header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1364,8 +1289,6 @@ async def purge_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwarg header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1421,8 +1344,6 @@ async def recover_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1493,8 +1414,6 @@ async def set_secret(self, vault_base_url, secret_name, value, tags=None, conten 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 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(parameters, 'SecretSetParameters') @@ -1555,8 +1474,6 @@ async def delete_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1630,8 +1547,6 @@ async def update_secret(self, vault_base_url, secret_name, secret_version, conte 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 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(parameters, 'SecretUpdateParameters') @@ -1694,8 +1609,6 @@ async def get_secret(self, vault_base_url, secret_name, secret_version, *, cls=N header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1733,11 +1646,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1745,60 +1659,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1819,11 +1716,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1832,60 +1730,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1904,11 +1785,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedSecretItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1916,60 +1798,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs): @@ -2009,8 +1874,6 @@ async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2068,8 +1931,6 @@ async def purge_deleted_secret(self, vault_base_url, secret_name, *, cls=None, * header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2122,8 +1983,6 @@ async def recover_deleted_secret(self, vault_base_url, secret_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2181,8 +2040,6 @@ async def backup_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2242,8 +2099,6 @@ async def restore_secret(self, vault_base_url, secret_bundle_backup, *, cls=None 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 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(parameters, 'SecretRestoreParameters') @@ -2283,11 +2138,12 @@ def get_certificates( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2295,60 +2151,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificates.metadata = {'url': '/certificates'} async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -2389,8 +2228,6 @@ async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2449,8 +2286,6 @@ async def set_certificate_contacts(self, vault_base_url, contact_list=None, *, c 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 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(contacts, 'Contacts') @@ -2508,8 +2343,6 @@ async def get_certificate_contacts(self, vault_base_url, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2563,8 +2396,6 @@ async def delete_certificate_contacts(self, vault_base_url, *, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2601,11 +2432,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateIssuerItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2613,60 +2445,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, *, cls=None, **kwargs): @@ -2720,8 +2535,6 @@ async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, cr 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2796,8 +2609,6 @@ async def update_certificate_issuer(self, vault_base_url, issuer_name, provider= 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2858,8 +2669,6 @@ async def get_certificate_issuer(self, vault_base_url, issuer_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2917,8 +2726,6 @@ async def delete_certificate_issuer(self, vault_base_url, issuer_name, *, cls=No header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2988,8 +2795,6 @@ async def create_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateCreateParameters') @@ -3072,8 +2877,6 @@ async def import_certificate(self, vault_base_url, certificate_name, base64_enco 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 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(parameters, 'CertificateImportParameters') @@ -3115,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3128,60 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3222,8 +3009,6 @@ async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3285,8 +3070,6 @@ async def update_certificate_policy(self, vault_base_url, certificate_name, cert 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 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(certificate_policy, 'CertificatePolicy') @@ -3364,8 +3147,6 @@ async def update_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateUpdateParameters') @@ -3429,8 +3210,6 @@ async def get_certificate(self, vault_base_url, certificate_name, certificate_ve header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3493,8 +3272,6 @@ async def update_certificate_operation(self, vault_base_url, certificate_name, c 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3554,8 +3331,6 @@ async def get_certificate_operation(self, vault_base_url, certificate_name, *, c header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3613,8 +3388,6 @@ async def delete_certificate_operation(self, vault_base_url, certificate_name, * header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3686,8 +3459,6 @@ async def merge_certificate(self, vault_base_url, certificate_name, x509_certifi 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 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(parameters, 'CertificateMergeParameters') @@ -3730,11 +3501,12 @@ def get_deleted_certificates( :type maxresults: int :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedCertificateItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3742,60 +3514,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3836,8 +3591,6 @@ async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3895,8 +3648,6 @@ async def purge_deleted_certificate(self, vault_base_url, certificate_name, *, c header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3952,8 +3703,6 @@ async def recover_deleted_certificate(self, vault_base_url, certificate_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3987,11 +3736,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v2016_10_01.models.StorageAccountItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3999,60 +3749,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_storage_accounts.metadata = {'url': '/storage'} async def delete_storage_account(self, vault_base_url, storage_account_name, *, cls=None, **kwargs): @@ -4089,8 +3822,6 @@ async def delete_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4145,8 +3876,6 @@ async def get_storage_account(self, vault_base_url, storage_account_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4221,8 +3950,6 @@ async def set_storage_account(self, vault_base_url, storage_account_name, resour 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 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(parameters, 'StorageAccountCreateParameters') @@ -4298,8 +4025,6 @@ async def update_storage_account(self, vault_base_url, storage_account_name, act 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4362,8 +4087,6 @@ async def regenerate_storage_account_key(self, vault_base_url, storage_account_n 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4402,11 +4125,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v2016_10_01.models.SasDefinitionItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4415,60 +4139,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, *, cls=None, **kwargs): @@ -4508,8 +4215,6 @@ async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4567,8 +4272,6 @@ async def get_sas_definition(self, vault_base_url, storage_account_name, sas_def header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4639,8 +4342,6 @@ async def set_sas_definition(self, vault_base_url, storage_account_name, sas_def 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 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(parameters1, 'SasDefinitionCreateParameters') @@ -4714,8 +4415,6 @@ async def update_sas_definition(self, vault_base_url, storage_account_name, sas_ 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 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(parameters1, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/__init__.py index 76f4bf1ab9bc..6f134becdbd3 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/__init__.py @@ -20,9 +20,11 @@ from ._models_py3 import CertificateCreateParameters from ._models_py3 import CertificateImportParameters from ._models_py3 import CertificateIssuerItem + from ._models_py3 import CertificateIssuerListResult from ._models_py3 import CertificateIssuerSetParameters from ._models_py3 import CertificateIssuerUpdateParameters from ._models_py3 import CertificateItem + from ._models_py3 import CertificateListResult from ._models_py3 import CertificateMergeParameters from ._models_py3 import CertificateOperation from ._models_py3 import CertificateOperationUpdateParameter @@ -32,10 +34,13 @@ from ._models_py3 import Contacts from ._models_py3 import DeletedCertificateBundle from ._models_py3 import DeletedCertificateItem + from ._models_py3 import DeletedCertificateListResult from ._models_py3 import DeletedKeyBundle from ._models_py3 import DeletedKeyItem + from ._models_py3 import DeletedKeyListResult from ._models_py3 import DeletedSecretBundle from ._models_py3 import DeletedSecretItem + from ._models_py3 import DeletedSecretListResult from ._models_py3 import Error from ._models_py3 import IssuerAttributes from ._models_py3 import IssuerBundle @@ -47,6 +52,7 @@ from ._models_py3 import KeyCreateParameters from ._models_py3 import KeyImportParameters from ._models_py3 import KeyItem + from ._models_py3 import KeyListResult from ._models_py3 import KeyOperationResult from ._models_py3 import KeyOperationsParameters from ._models_py3 import KeyProperties @@ -63,10 +69,12 @@ from ._models_py3 import SasDefinitionBundle from ._models_py3 import SasDefinitionCreateParameters from ._models_py3 import SasDefinitionItem + from ._models_py3 import SasDefinitionListResult from ._models_py3 import SasDefinitionUpdateParameters from ._models_py3 import SecretAttributes from ._models_py3 import SecretBundle from ._models_py3 import SecretItem + from ._models_py3 import SecretListResult from ._models_py3 import SecretProperties from ._models_py3 import SecretRestoreParameters from ._models_py3 import SecretSetParameters @@ -77,6 +85,7 @@ from ._models_py3 import StorageAccountRegenerteKeyParameters from ._models_py3 import StorageAccountUpdateParameters from ._models_py3 import StorageBundle + from ._models_py3 import StorageListResult from ._models_py3 import SubjectAlternativeNames from ._models_py3 import Trigger from ._models_py3 import X509CertificateProperties @@ -91,9 +100,11 @@ from ._models import CertificateCreateParameters from ._models import CertificateImportParameters from ._models import CertificateIssuerItem + from ._models import CertificateIssuerListResult from ._models import CertificateIssuerSetParameters from ._models import CertificateIssuerUpdateParameters from ._models import CertificateItem + from ._models import CertificateListResult from ._models import CertificateMergeParameters from ._models import CertificateOperation from ._models import CertificateOperationUpdateParameter @@ -103,10 +114,13 @@ from ._models import Contacts from ._models import DeletedCertificateBundle from ._models import DeletedCertificateItem + from ._models import DeletedCertificateListResult from ._models import DeletedKeyBundle from ._models import DeletedKeyItem + from ._models import DeletedKeyListResult from ._models import DeletedSecretBundle from ._models import DeletedSecretItem + from ._models import DeletedSecretListResult from ._models import Error from ._models import IssuerAttributes from ._models import IssuerBundle @@ -118,6 +132,7 @@ from ._models import KeyCreateParameters from ._models import KeyImportParameters from ._models import KeyItem + from ._models import KeyListResult from ._models import KeyOperationResult from ._models import KeyOperationsParameters from ._models import KeyProperties @@ -134,10 +149,12 @@ from ._models import SasDefinitionBundle from ._models import SasDefinitionCreateParameters from ._models import SasDefinitionItem + from ._models import SasDefinitionListResult from ._models import SasDefinitionUpdateParameters from ._models import SecretAttributes from ._models import SecretBundle from ._models import SecretItem + from ._models import SecretListResult from ._models import SecretProperties from ._models import SecretRestoreParameters from ._models import SecretSetParameters @@ -148,18 +165,10 @@ from ._models import StorageAccountRegenerteKeyParameters from ._models import StorageAccountUpdateParameters from ._models import StorageBundle + from ._models import StorageListResult from ._models import SubjectAlternativeNames from ._models import Trigger from ._models import X509CertificateProperties -from ._paged_models import CertificateIssuerItemPaged -from ._paged_models import CertificateItemPaged -from ._paged_models import DeletedCertificateItemPaged -from ._paged_models import DeletedKeyItemPaged -from ._paged_models import DeletedSecretItemPaged -from ._paged_models import KeyItemPaged -from ._paged_models import SasDefinitionItemPaged -from ._paged_models import SecretItemPaged -from ._paged_models import StorageAccountItemPaged from ._key_vault_client_enums import ( JsonWebKeyType, JsonWebKeyCurveName, @@ -182,9 +191,11 @@ 'CertificateCreateParameters', 'CertificateImportParameters', 'CertificateIssuerItem', + 'CertificateIssuerListResult', 'CertificateIssuerSetParameters', 'CertificateIssuerUpdateParameters', 'CertificateItem', + 'CertificateListResult', 'CertificateMergeParameters', 'CertificateOperation', 'CertificateOperationUpdateParameter', @@ -194,10 +205,13 @@ 'Contacts', 'DeletedCertificateBundle', 'DeletedCertificateItem', + 'DeletedCertificateListResult', 'DeletedKeyBundle', 'DeletedKeyItem', + 'DeletedKeyListResult', 'DeletedSecretBundle', 'DeletedSecretItem', + 'DeletedSecretListResult', 'Error', 'IssuerAttributes', 'IssuerBundle', @@ -209,6 +223,7 @@ 'KeyCreateParameters', 'KeyImportParameters', 'KeyItem', + 'KeyListResult', 'KeyOperationResult', 'KeyOperationsParameters', 'KeyProperties', @@ -225,10 +240,12 @@ 'SasDefinitionBundle', 'SasDefinitionCreateParameters', 'SasDefinitionItem', + 'SasDefinitionListResult', 'SasDefinitionUpdateParameters', 'SecretAttributes', 'SecretBundle', 'SecretItem', + 'SecretListResult', 'SecretProperties', 'SecretRestoreParameters', 'SecretSetParameters', @@ -239,18 +256,10 @@ 'StorageAccountRegenerteKeyParameters', 'StorageAccountUpdateParameters', 'StorageBundle', + 'StorageListResult', 'SubjectAlternativeNames', 'Trigger', 'X509CertificateProperties', - 'KeyItemPaged', - 'DeletedKeyItemPaged', - 'SecretItemPaged', - 'DeletedSecretItemPaged', - 'CertificateItemPaged', - 'CertificateIssuerItemPaged', - 'DeletedCertificateItemPaged', - 'StorageAccountItemPaged', - 'SasDefinitionItemPaged', 'JsonWebKeyType', 'JsonWebKeyCurveName', 'DeletionRecoveryLevel', diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py index f9caaf92c16e..e918a167f2dd 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py @@ -341,6 +341,37 @@ def __init__(self, **kwargs): self.provider = kwargs.get('provider', None) +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -435,6 +466,35 @@ def __init__(self, **kwargs): self.x509_thumbprint = kwargs.get('x509_thumbprint', None) +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v2016_10_01.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -805,6 +865,36 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: + list[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -975,6 +1065,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1176,6 +1295,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -1531,6 +1679,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v2016_10_01.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2012,6 +2189,35 @@ def __init__(self, **kwargs): self.tags = None +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2084,6 +2290,35 @@ def __init__(self, **kwargs): self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2415,6 +2650,36 @@ def __init__(self, **kwargs): self.tags = None +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SubjectAlternativeNames(Model): """The subject alternate names of a X509 object. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py index 4920c195ef89..07d530b486f6 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py @@ -341,6 +341,37 @@ def __init__(self, *, id: str=None, provider: str=None, **kwargs) -> None: self.provider = provider +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -435,6 +466,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.x509_thumbprint = x509_thumbprint +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v2016_10_01.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -805,6 +865,36 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: + list[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -975,6 +1065,35 @@ def __init__(self, *, kid: str=None, attributes=None, tags=None, recovery_id: st self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1176,6 +1295,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, content_type: st self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -1531,6 +1679,35 @@ def __init__(self, *, key, hsm: bool=None, key_attributes=None, tags=None, **kwa self.tags = tags +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v2016_10_01.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2012,6 +2189,35 @@ def __init__(self, **kwargs) -> None: self.tags = None +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2084,6 +2290,35 @@ def __init__(self, *, enabled: bool=None, not_before=None, expires=None, **kwarg self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2415,6 +2650,36 @@ def __init__(self, **kwargs) -> None: self.tags = None +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SubjectAlternativeNames(Model): """The subject alternate names of a X509 object. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_paged_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_paged_models.py deleted file mode 100644 index e5ddd1d7edc4..000000000000 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_paged_models.py +++ /dev/null @@ -1,131 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from azure.core.paging import Paged - - -class KeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`KeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[KeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(KeyItemPaged, self).__init__(*args, **kwargs) -class DeletedKeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedKeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedKeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedKeyItemPaged, self).__init__(*args, **kwargs) -class SecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SecretItemPaged, self).__init__(*args, **kwargs) -class DeletedSecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSecretItemPaged, self).__init__(*args, **kwargs) -class CertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateItemPaged, self).__init__(*args, **kwargs) -class CertificateIssuerItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateIssuerItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateIssuerItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateIssuerItemPaged, self).__init__(*args, **kwargs) -class DeletedCertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedCertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedCertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedCertificateItemPaged, self).__init__(*args, **kwargs) -class StorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`StorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(StorageAccountItemPaged, self).__init__(*args, **kwargs) -class SasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SasDefinitionItemPaged, self).__init__(*args, **kwargs) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 40ad1ab95087..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.paging import ItemPaged from .. import models import uuid @@ -78,8 +79,6 @@ def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops=None, 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 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(parameters, 'KeyCreateParameters') @@ -154,8 +153,6 @@ def import_key(self, vault_base_url, key_name, key, hsm=None, key_attributes=Non 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 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(parameters, 'KeyImportParameters') @@ -218,8 +215,6 @@ def delete_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -294,8 +289,6 @@ def update_key(self, vault_base_url, key_name, key_version, key_ops=None, key_at 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 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(parameters, 'KeyUpdateParameters') @@ -360,8 +353,6 @@ def get_key(self, vault_base_url, key_name, key_version, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -399,11 +390,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -412,46 +404,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -473,11 +462,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -485,46 +475,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_keys.metadata = {'url': '/keys'} def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -576,8 +563,6 @@ def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -649,8 +634,6 @@ def restore_key(self, vault_base_url, key_bundle_backup, cls=None, **kwargs): 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 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(parameters, 'KeyRestoreParameters') @@ -731,8 +714,6 @@ def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -810,8 +791,6 @@ def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -887,8 +866,6 @@ def sign(self, vault_base_url, key_name, key_version, algorithm, value, cls=None 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 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(parameters, 'KeySignParameters') @@ -970,8 +947,6 @@ def verify(self, vault_base_url, key_name, key_version, algorithm, digest, signa 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 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(parameters, 'KeyVerifyParameters') @@ -1049,8 +1024,6 @@ def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cls= 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 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(parameters, 'KeyOperationsParameters') @@ -1126,8 +1099,6 @@ def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cl 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 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(parameters, 'KeyOperationsParameters') @@ -1171,11 +1142,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedKeyItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1183,46 +1155,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -1263,8 +1232,6 @@ def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1322,8 +1289,6 @@ def purge_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1379,8 +1344,6 @@ def recover_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1451,8 +1414,6 @@ def set_secret(self, vault_base_url, secret_name, value, tags=None, content_type 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 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(parameters, 'SecretSetParameters') @@ -1513,8 +1474,6 @@ def delete_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1588,8 +1547,6 @@ def update_secret(self, vault_base_url, secret_name, secret_version, content_typ 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 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(parameters, 'SecretUpdateParameters') @@ -1652,8 +1609,6 @@ def get_secret(self, vault_base_url, secret_name, secret_version, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1691,11 +1646,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1703,46 +1659,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1763,11 +1716,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1776,46 +1730,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1834,11 +1785,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedSecretItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1846,46 +1798,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): @@ -1925,8 +1874,6 @@ def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1984,8 +1931,6 @@ def purge_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2038,8 +1983,6 @@ def recover_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2097,8 +2040,6 @@ def backup_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2158,8 +2099,6 @@ def restore_secret(self, vault_base_url, secret_bundle_backup, cls=None, **kwarg 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 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(parameters, 'SecretRestoreParameters') @@ -2199,11 +2138,12 @@ def get_certificates( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2211,46 +2151,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificates.metadata = {'url': '/certificates'} def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -2291,8 +2228,6 @@ def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2351,8 +2286,6 @@ def set_certificate_contacts(self, vault_base_url, contact_list=None, cls=None, 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 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(contacts, 'Contacts') @@ -2410,8 +2343,6 @@ def get_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2465,8 +2396,6 @@ def delete_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2503,11 +2432,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateIssuerItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2515,46 +2445,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, cls=None, **kwargs): @@ -2608,8 +2535,6 @@ def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credenti 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2684,8 +2609,6 @@ def update_certificate_issuer(self, vault_base_url, issuer_name, provider=None, 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2746,8 +2669,6 @@ def get_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2805,8 +2726,6 @@ def delete_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2876,8 +2795,6 @@ def create_certificate(self, vault_base_url, certificate_name, certificate_polic 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 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(parameters, 'CertificateCreateParameters') @@ -2960,8 +2877,6 @@ def import_certificate(self, vault_base_url, certificate_name, base64_encoded_ce 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 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(parameters, 'CertificateImportParameters') @@ -3003,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3016,46 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3096,8 +3009,6 @@ def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3159,8 +3070,6 @@ def update_certificate_policy(self, vault_base_url, certificate_name, certificat 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 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(certificate_policy, 'CertificatePolicy') @@ -3238,8 +3147,6 @@ def update_certificate(self, vault_base_url, certificate_name, certificate_versi 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 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(parameters, 'CertificateUpdateParameters') @@ -3303,8 +3210,6 @@ def get_certificate(self, vault_base_url, certificate_name, certificate_version, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3367,8 +3272,6 @@ def update_certificate_operation(self, vault_base_url, certificate_name, cancell 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3428,8 +3331,6 @@ def get_certificate_operation(self, vault_base_url, certificate_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3487,8 +3388,6 @@ def delete_certificate_operation(self, vault_base_url, certificate_name, cls=Non header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3560,8 +3459,6 @@ def merge_certificate(self, vault_base_url, certificate_name, x509_certificates, 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 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(parameters, 'CertificateMergeParameters') @@ -3604,11 +3501,12 @@ def get_deleted_certificates( :type maxresults: int :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedCertificateItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3616,46 +3514,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3696,8 +3591,6 @@ def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3755,8 +3648,6 @@ def purge_deleted_certificate(self, vault_base_url, certificate_name, cls=None, header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3812,8 +3703,6 @@ def recover_deleted_certificate(self, vault_base_url, certificate_name, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3847,11 +3736,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v2016_10_01.models.StorageAccountItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3859,46 +3749,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_storage_accounts.metadata = {'url': '/storage'} def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, **kwargs): @@ -3935,8 +3822,6 @@ def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3991,8 +3876,6 @@ def get_storage_account(self, vault_base_url, storage_account_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4067,8 +3950,6 @@ def set_storage_account(self, vault_base_url, storage_account_name, resource_id, 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 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(parameters, 'StorageAccountCreateParameters') @@ -4144,8 +4025,6 @@ def update_storage_account(self, vault_base_url, storage_account_name, active_ke 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4208,8 +4087,6 @@ def regenerate_storage_account_key(self, vault_base_url, storage_account_name, k 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4248,11 +4125,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v2016_10_01.models.SasDefinitionItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4261,46 +4139,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def delete_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, cls=None, **kwargs): @@ -4340,8 +4215,6 @@ def delete_sas_definition(self, vault_base_url, storage_account_name, sas_defini header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4399,8 +4272,6 @@ def get_sas_definition(self, vault_base_url, storage_account_name, sas_definitio header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4471,8 +4342,6 @@ def set_sas_definition(self, vault_base_url, storage_account_name, sas_definitio 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 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(parameters1, 'SasDefinitionCreateParameters') @@ -4546,8 +4415,6 @@ def update_sas_definition(self, vault_base_url, storage_account_name, sas_defini 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 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(parameters1, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/__init__.py index d3fda25cc7ab..e913d4cf6c46 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/__init__.py @@ -9,9 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from ._configuration import KeyVaultClientConfiguration from ._key_vault_client import KeyVaultClient -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] from .version import VERSION diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_configuration.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_configuration.py index beb5eb930fa8..28cf75e3d2b4 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_configuration.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_configuration.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials @@ -45,4 +44,5 @@ def _configure(self, **kwargs): self.proxy_policy = policies.ProxyPolicy(**kwargs) self.logging_policy = policies.NetworkTraceLoggingPolicy(**kwargs) self.retry_policy = policies.RetryPolicy(**kwargs) + self.custom_hook_policy = policies.CustomHookPolicy(**kwargs) self.redirect_policy = policies.RedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_key_vault_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_key_vault_client.py index 699433682e60..a1a1eb19328b 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_key_vault_client.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/__init__.py index ffece9055d9b..fb2e6c3866fd 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/__init__.py @@ -10,5 +10,4 @@ # -------------------------------------------------------------------------- from ._key_vault_client_async import KeyVaultClient -from ._configuration_async import KeyVaultClientConfiguration -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_configuration_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_configuration_async.py index 2144132ebe2d..a61d9eeff444 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_configuration_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_configuration_async.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_key_vault_client_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_key_vault_client_async.py index 739ab6ea407d..482d6336ab1a 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_key_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_key_vault_client_async.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index a97144221c6a..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.async_paging import AsyncItemPaged, AsyncList from ... import models import uuid @@ -77,8 +78,6 @@ async def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops 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 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(parameters, 'KeyCreateParameters') @@ -153,8 +152,6 @@ async def import_key(self, vault_base_url, key_name, key, hsm=None, key_attribut 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 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(parameters, 'KeyImportParameters') @@ -217,8 +214,6 @@ async def delete_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -293,8 +288,6 @@ async def update_key(self, vault_base_url, key_name, key_version, key_ops=None, 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 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(parameters, 'KeyUpdateParameters') @@ -359,8 +352,6 @@ async def get_key(self, vault_base_url, key_name, key_version, *, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -398,11 +389,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -411,60 +403,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -486,11 +461,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -498,60 +474,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_keys.metadata = {'url': '/keys'} async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -603,8 +562,6 @@ async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -676,8 +633,6 @@ async def restore_key(self, vault_base_url, key_bundle_backup, *, cls=None, **kw 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 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(parameters, 'KeyRestoreParameters') @@ -758,8 +713,6 @@ async def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -837,8 +790,6 @@ async def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -914,8 +865,6 @@ async def sign(self, vault_base_url, key_name, key_version, algorithm, value, *, 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 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(parameters, 'KeySignParameters') @@ -997,8 +946,6 @@ async def verify(self, vault_base_url, key_name, key_version, algorithm, digest, 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 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(parameters, 'KeyVerifyParameters') @@ -1076,8 +1023,6 @@ async def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value 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 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(parameters, 'KeyOperationsParameters') @@ -1153,8 +1098,6 @@ async def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, val 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 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(parameters, 'KeyOperationsParameters') @@ -1198,11 +1141,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v7_0.models.DeletedKeyItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1210,60 +1154,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -1304,8 +1231,6 @@ async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs) header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1363,8 +1288,6 @@ async def purge_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwarg header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1420,8 +1343,6 @@ async def recover_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1491,8 +1412,6 @@ async def set_secret(self, vault_base_url, secret_name, value, tags=None, conten 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 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(parameters, 'SecretSetParameters') @@ -1553,8 +1472,6 @@ async def delete_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1627,8 +1544,6 @@ async def update_secret(self, vault_base_url, secret_name, secret_version, conte 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 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(parameters, 'SecretUpdateParameters') @@ -1691,8 +1606,6 @@ async def get_secret(self, vault_base_url, secret_name, secret_version, *, cls=N header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1730,11 +1643,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1742,60 +1656,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1816,11 +1713,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1829,60 +1727,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1901,11 +1782,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSecretItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1913,60 +1795,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs): @@ -2006,8 +1871,6 @@ async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2065,8 +1928,6 @@ async def purge_deleted_secret(self, vault_base_url, secret_name, *, cls=None, * header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2119,8 +1980,6 @@ async def recover_deleted_secret(self, vault_base_url, secret_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2178,8 +2037,6 @@ async def backup_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2239,8 +2096,6 @@ async def restore_secret(self, vault_base_url, secret_bundle_backup, *, cls=None 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 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(parameters, 'SecretRestoreParameters') @@ -2283,11 +2138,12 @@ def get_certificates( :type include_pending: bool :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2295,9 +2151,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -2306,51 +2159,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificates.metadata = {'url': '/certificates'} async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -2391,8 +2230,6 @@ async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2451,8 +2288,6 @@ async def set_certificate_contacts(self, vault_base_url, contact_list=None, *, c 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 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(contacts, 'Contacts') @@ -2510,8 +2345,6 @@ async def get_certificate_contacts(self, vault_base_url, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2565,8 +2398,6 @@ async def delete_certificate_contacts(self, vault_base_url, *, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2603,11 +2434,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v7_0.models.CertificateIssuerItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2615,60 +2447,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, *, cls=None, **kwargs): @@ -2721,8 +2536,6 @@ async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, cr 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2796,8 +2609,6 @@ async def update_certificate_issuer(self, vault_base_url, issuer_name, provider= 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2858,8 +2669,6 @@ async def get_certificate_issuer(self, vault_base_url, issuer_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2917,8 +2726,6 @@ async def delete_certificate_issuer(self, vault_base_url, issuer_name, *, cls=No header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2988,8 +2795,6 @@ async def create_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateCreateParameters') @@ -3072,8 +2877,6 @@ async def import_certificate(self, vault_base_url, certificate_name, base64_enco 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 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(parameters, 'CertificateImportParameters') @@ -3115,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3128,60 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3222,8 +3009,6 @@ async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3285,8 +3070,6 @@ async def update_certificate_policy(self, vault_base_url, certificate_name, cert 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 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(certificate_policy, 'CertificatePolicy') @@ -3364,8 +3147,6 @@ async def update_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateUpdateParameters') @@ -3429,8 +3210,6 @@ async def get_certificate(self, vault_base_url, certificate_name, certificate_ve header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3493,8 +3272,6 @@ async def update_certificate_operation(self, vault_base_url, certificate_name, c 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3554,8 +3331,6 @@ async def get_certificate_operation(self, vault_base_url, certificate_name, *, c header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3613,8 +3388,6 @@ async def delete_certificate_operation(self, vault_base_url, certificate_name, * header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3686,8 +3459,6 @@ async def merge_certificate(self, vault_base_url, certificate_name, x509_certifi 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 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(parameters, 'CertificateMergeParameters') @@ -3748,8 +3519,6 @@ async def backup_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3809,8 +3578,6 @@ async def restore_certificate(self, vault_base_url, certificate_bundle_backup, * 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 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(parameters, 'CertificateRestoreParameters') @@ -3856,11 +3623,12 @@ def get_deleted_certificates( :type include_pending: bool :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v7_0.models.DeletedCertificateItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3868,9 +3636,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -3879,51 +3644,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3964,8 +3715,6 @@ async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4023,8 +3772,6 @@ async def purge_deleted_certificate(self, vault_base_url, certificate_name, *, c header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4080,8 +3827,6 @@ async def recover_deleted_certificate(self, vault_base_url, certificate_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4115,11 +3860,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.StorageAccountItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -4127,60 +3873,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_storage_accounts.metadata = {'url': '/storage'} def get_deleted_storage_accounts( @@ -4199,11 +3928,12 @@ def get_deleted_storage_accounts( :type maxresults: int :return: An iterator like instance of DeletedStorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.DeletedStorageAccountItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_storage_accounts.metadata['url'] @@ -4211,60 +3941,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('DeletedStorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedStorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_storage_accounts.metadata = {'url': '/deletedstorage'} async def get_deleted_storage_account(self, vault_base_url, storage_account_name, *, cls=None, **kwargs): @@ -4304,8 +4017,6 @@ async def get_deleted_storage_account(self, vault_base_url, storage_account_name header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4363,8 +4074,6 @@ async def purge_deleted_storage_account(self, vault_base_url, storage_account_na header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4417,8 +4126,6 @@ async def recover_deleted_storage_account(self, vault_base_url, storage_account_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4475,8 +4182,6 @@ async def backup_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4536,8 +4241,6 @@ async def restore_storage_account(self, vault_base_url, storage_bundle_backup, * 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 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(parameters, 'StorageRestoreParameters') @@ -4595,8 +4298,6 @@ async def delete_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4651,8 +4352,6 @@ async def get_storage_account(self, vault_base_url, storage_account_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4727,8 +4426,6 @@ async def set_storage_account(self, vault_base_url, storage_account_name, resour 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 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(parameters, 'StorageAccountCreateParameters') @@ -4804,8 +4501,6 @@ async def update_storage_account(self, vault_base_url, storage_account_name, act 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4868,8 +4563,6 @@ async def regenerate_storage_account_key(self, vault_base_url, storage_account_n 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4908,11 +4601,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.SasDefinitionItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4921,60 +4615,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def get_deleted_sas_definitions( @@ -4996,11 +4673,12 @@ def get_deleted_sas_definitions( :type maxresults: int :return: An iterator like instance of DeletedSasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSasDefinitionItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_sas_definitions.metadata['url'] @@ -5009,60 +4687,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_sas_definitions.metadata = {'url': '/deletedstorage/{storage-account-name}/sas'} async def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, *, cls=None, **kwargs): @@ -5105,8 +4766,6 @@ async def get_deleted_sas_definition(self, vault_base_url, storage_account_name, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5167,8 +4826,6 @@ async def recover_deleted_sas_definition(self, vault_base_url, storage_account_n header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -5226,8 +4883,6 @@ async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -5285,8 +4940,6 @@ async def get_sas_definition(self, vault_base_url, storage_account_name, sas_def header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5364,8 +5017,6 @@ async def set_sas_definition(self, vault_base_url, storage_account_name, sas_def 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 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(parameters, 'SasDefinitionCreateParameters') @@ -5446,8 +5097,6 @@ async def update_sas_definition(self, vault_base_url, storage_account_name, sas_ 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 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(parameters, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/__init__.py index 4debdd0f3d13..5e72f49a73f6 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/__init__.py @@ -22,9 +22,11 @@ from ._models_py3 import CertificateCreateParameters from ._models_py3 import CertificateImportParameters from ._models_py3 import CertificateIssuerItem + from ._models_py3 import CertificateIssuerListResult from ._models_py3 import CertificateIssuerSetParameters from ._models_py3 import CertificateIssuerUpdateParameters from ._models_py3 import CertificateItem + from ._models_py3 import CertificateListResult from ._models_py3 import CertificateMergeParameters from ._models_py3 import CertificateOperation from ._models_py3 import CertificateOperationUpdateParameter @@ -35,14 +37,19 @@ from ._models_py3 import Contacts from ._models_py3 import DeletedCertificateBundle from ._models_py3 import DeletedCertificateItem + from ._models_py3 import DeletedCertificateListResult from ._models_py3 import DeletedKeyBundle from ._models_py3 import DeletedKeyItem + from ._models_py3 import DeletedKeyListResult from ._models_py3 import DeletedSasDefinitionBundle from ._models_py3 import DeletedSasDefinitionItem + from ._models_py3 import DeletedSasDefinitionListResult from ._models_py3 import DeletedSecretBundle from ._models_py3 import DeletedSecretItem + from ._models_py3 import DeletedSecretListResult from ._models_py3 import DeletedStorageAccountItem from ._models_py3 import DeletedStorageBundle + from ._models_py3 import DeletedStorageListResult from ._models_py3 import Error from ._models_py3 import IssuerAttributes from ._models_py3 import IssuerBundle @@ -54,6 +61,7 @@ from ._models_py3 import KeyCreateParameters from ._models_py3 import KeyImportParameters from ._models_py3 import KeyItem + from ._models_py3 import KeyListResult from ._models_py3 import KeyOperationResult from ._models_py3 import KeyOperationsParameters from ._models_py3 import KeyProperties @@ -70,10 +78,12 @@ from ._models_py3 import SasDefinitionBundle from ._models_py3 import SasDefinitionCreateParameters from ._models_py3 import SasDefinitionItem + from ._models_py3 import SasDefinitionListResult from ._models_py3 import SasDefinitionUpdateParameters from ._models_py3 import SecretAttributes from ._models_py3 import SecretBundle from ._models_py3 import SecretItem + from ._models_py3 import SecretListResult from ._models_py3 import SecretProperties from ._models_py3 import SecretRestoreParameters from ._models_py3 import SecretSetParameters @@ -84,6 +94,7 @@ from ._models_py3 import StorageAccountRegenerteKeyParameters from ._models_py3 import StorageAccountUpdateParameters from ._models_py3 import StorageBundle + from ._models_py3 import StorageListResult from ._models_py3 import StorageRestoreParameters from ._models_py3 import SubjectAlternativeNames from ._models_py3 import Trigger @@ -101,9 +112,11 @@ from ._models import CertificateCreateParameters from ._models import CertificateImportParameters from ._models import CertificateIssuerItem + from ._models import CertificateIssuerListResult from ._models import CertificateIssuerSetParameters from ._models import CertificateIssuerUpdateParameters from ._models import CertificateItem + from ._models import CertificateListResult from ._models import CertificateMergeParameters from ._models import CertificateOperation from ._models import CertificateOperationUpdateParameter @@ -114,14 +127,19 @@ from ._models import Contacts from ._models import DeletedCertificateBundle from ._models import DeletedCertificateItem + from ._models import DeletedCertificateListResult from ._models import DeletedKeyBundle from ._models import DeletedKeyItem + from ._models import DeletedKeyListResult from ._models import DeletedSasDefinitionBundle from ._models import DeletedSasDefinitionItem + from ._models import DeletedSasDefinitionListResult from ._models import DeletedSecretBundle from ._models import DeletedSecretItem + from ._models import DeletedSecretListResult from ._models import DeletedStorageAccountItem from ._models import DeletedStorageBundle + from ._models import DeletedStorageListResult from ._models import Error from ._models import IssuerAttributes from ._models import IssuerBundle @@ -133,6 +151,7 @@ from ._models import KeyCreateParameters from ._models import KeyImportParameters from ._models import KeyItem + from ._models import KeyListResult from ._models import KeyOperationResult from ._models import KeyOperationsParameters from ._models import KeyProperties @@ -149,10 +168,12 @@ from ._models import SasDefinitionBundle from ._models import SasDefinitionCreateParameters from ._models import SasDefinitionItem + from ._models import SasDefinitionListResult from ._models import SasDefinitionUpdateParameters from ._models import SecretAttributes from ._models import SecretBundle from ._models import SecretItem + from ._models import SecretListResult from ._models import SecretProperties from ._models import SecretRestoreParameters from ._models import SecretSetParameters @@ -163,21 +184,11 @@ from ._models import StorageAccountRegenerteKeyParameters from ._models import StorageAccountUpdateParameters from ._models import StorageBundle + from ._models import StorageListResult from ._models import StorageRestoreParameters from ._models import SubjectAlternativeNames from ._models import Trigger from ._models import X509CertificateProperties -from ._paged_models import CertificateIssuerItemPaged -from ._paged_models import CertificateItemPaged -from ._paged_models import DeletedCertificateItemPaged -from ._paged_models import DeletedKeyItemPaged -from ._paged_models import DeletedSasDefinitionItemPaged -from ._paged_models import DeletedSecretItemPaged -from ._paged_models import DeletedStorageAccountItemPaged -from ._paged_models import KeyItemPaged -from ._paged_models import SasDefinitionItemPaged -from ._paged_models import SecretItemPaged -from ._paged_models import StorageAccountItemPaged from ._key_vault_client_enums import ( JsonWebKeyType, JsonWebKeyCurveName, @@ -203,9 +214,11 @@ 'CertificateCreateParameters', 'CertificateImportParameters', 'CertificateIssuerItem', + 'CertificateIssuerListResult', 'CertificateIssuerSetParameters', 'CertificateIssuerUpdateParameters', 'CertificateItem', + 'CertificateListResult', 'CertificateMergeParameters', 'CertificateOperation', 'CertificateOperationUpdateParameter', @@ -216,14 +229,19 @@ 'Contacts', 'DeletedCertificateBundle', 'DeletedCertificateItem', + 'DeletedCertificateListResult', 'DeletedKeyBundle', 'DeletedKeyItem', + 'DeletedKeyListResult', 'DeletedSasDefinitionBundle', 'DeletedSasDefinitionItem', + 'DeletedSasDefinitionListResult', 'DeletedSecretBundle', 'DeletedSecretItem', + 'DeletedSecretListResult', 'DeletedStorageAccountItem', 'DeletedStorageBundle', + 'DeletedStorageListResult', 'Error', 'IssuerAttributes', 'IssuerBundle', @@ -235,6 +253,7 @@ 'KeyCreateParameters', 'KeyImportParameters', 'KeyItem', + 'KeyListResult', 'KeyOperationResult', 'KeyOperationsParameters', 'KeyProperties', @@ -251,10 +270,12 @@ 'SasDefinitionBundle', 'SasDefinitionCreateParameters', 'SasDefinitionItem', + 'SasDefinitionListResult', 'SasDefinitionUpdateParameters', 'SecretAttributes', 'SecretBundle', 'SecretItem', + 'SecretListResult', 'SecretProperties', 'SecretRestoreParameters', 'SecretSetParameters', @@ -265,21 +286,11 @@ 'StorageAccountRegenerteKeyParameters', 'StorageAccountUpdateParameters', 'StorageBundle', + 'StorageListResult', 'StorageRestoreParameters', 'SubjectAlternativeNames', 'Trigger', 'X509CertificateProperties', - 'KeyItemPaged', - 'DeletedKeyItemPaged', - 'SecretItemPaged', - 'DeletedSecretItemPaged', - 'CertificateItemPaged', - 'CertificateIssuerItemPaged', - 'DeletedCertificateItemPaged', - 'StorageAccountItemPaged', - 'DeletedStorageAccountItemPaged', - 'SasDefinitionItemPaged', - 'DeletedSasDefinitionItemPaged', 'JsonWebKeyType', 'JsonWebKeyCurveName', 'DeletionRecoveryLevel', diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py index e02ddd417cdb..24dfe4beb6a9 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py @@ -385,6 +385,36 @@ def __init__(self, **kwargs): self.provider = kwargs.get('provider', None) +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -479,6 +509,35 @@ def __init__(self, **kwargs): self.x509_thumbprint = kwargs.get('x509_thumbprint', None) +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -867,6 +926,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: list[~azure.keyvault.v7_0.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -1037,6 +1125,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v7_0.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionBundle(Model): """A SAS definition bundle consists of key vault SAS definition details plus its attributes. @@ -1251,6 +1368,36 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSasDefinitionListResult(Model): + """The deleted SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted SAS + definitions in the vault along with a link to the next page of deleted sas + definitions + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + :ivar next_link: The URL to get the next set of deleted SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1452,6 +1599,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageAccountItem(Model): """The storage account item containing storage account metadata. @@ -1662,6 +1838,37 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedStorageListResult(Model): + """The deleted storage account list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted storage + accounts in the vault along with a link to the next page of deleted + storage accounts + :vartype value: + list[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + :ivar next_link: The URL to get the next set of deleted storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedStorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedStorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -2023,6 +2230,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v7_0.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2451,6 +2687,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v7_0.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2534,6 +2799,35 @@ def __init__(self, **kwargs): self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v7_0.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2779,6 +3073,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: list[~azure.keyvault.v7_0.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageRestoreParameters(Model): """The secret restore parameters. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py index 1f394c8f5f38..52f4aa981815 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py @@ -385,6 +385,36 @@ def __init__(self, *, id: str=None, provider: str=None, **kwargs) -> None: self.provider = provider +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -479,6 +509,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.x509_thumbprint = x509_thumbprint +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -867,6 +926,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: list[~azure.keyvault.v7_0.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -1037,6 +1125,35 @@ def __init__(self, *, kid: str=None, attributes=None, tags=None, recovery_id: st self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v7_0.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionBundle(Model): """A SAS definition bundle consists of key vault SAS definition details plus its attributes. @@ -1251,6 +1368,36 @@ def __init__(self, *, recovery_id: str=None, **kwargs) -> None: self.deleted_date = None +class DeletedSasDefinitionListResult(Model): + """The deleted SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted SAS + definitions in the vault along with a link to the next page of deleted sas + definitions + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + :ivar next_link: The URL to get the next set of deleted SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1452,6 +1599,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, content_type: st self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageAccountItem(Model): """The storage account item containing storage account metadata. @@ -1662,6 +1838,37 @@ def __init__(self, *, recovery_id: str=None, **kwargs) -> None: self.deleted_date = None +class DeletedStorageListResult(Model): + """The deleted storage account list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted storage + accounts in the vault along with a link to the next page of deleted + storage accounts + :vartype value: + list[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + :ivar next_link: The URL to get the next set of deleted storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedStorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedStorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -2023,6 +2230,35 @@ def __init__(self, *, key, hsm: bool=None, key_attributes=None, tags=None, **kwa self.tags = tags +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v7_0.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2451,6 +2687,35 @@ def __init__(self, *, template_uri: str, sas_type, validity_period: str, sas_def self.tags = tags +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v7_0.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2534,6 +2799,35 @@ def __init__(self, *, enabled: bool=None, not_before=None, expires=None, **kwarg self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v7_0.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2779,6 +3073,35 @@ def __init__(self, *, active_key_name: str=None, auto_regenerate_key: bool=None, self.tags = tags +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: list[~azure.keyvault.v7_0.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageRestoreParameters(Model): """The secret restore parameters. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_paged_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_paged_models.py deleted file mode 100644 index 0fbf874da2a7..000000000000 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_paged_models.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from azure.core.paging import Paged - - -class KeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`KeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[KeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(KeyItemPaged, self).__init__(*args, **kwargs) -class DeletedKeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedKeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedKeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedKeyItemPaged, self).__init__(*args, **kwargs) -class SecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SecretItemPaged, self).__init__(*args, **kwargs) -class DeletedSecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSecretItemPaged, self).__init__(*args, **kwargs) -class CertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateItemPaged, self).__init__(*args, **kwargs) -class CertificateIssuerItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateIssuerItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateIssuerItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateIssuerItemPaged, self).__init__(*args, **kwargs) -class DeletedCertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedCertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedCertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedCertificateItemPaged, self).__init__(*args, **kwargs) -class StorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`StorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(StorageAccountItemPaged, self).__init__(*args, **kwargs) -class DeletedStorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedStorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedStorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedStorageAccountItemPaged, self).__init__(*args, **kwargs) -class SasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SasDefinitionItemPaged, self).__init__(*args, **kwargs) -class DeletedSasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSasDefinitionItemPaged, self).__init__(*args, **kwargs) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index c0e15566f02e..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.paging import ItemPaged from .. import models import uuid @@ -77,8 +78,6 @@ def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops=None, 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 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(parameters, 'KeyCreateParameters') @@ -153,8 +152,6 @@ def import_key(self, vault_base_url, key_name, key, hsm=None, key_attributes=Non 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 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(parameters, 'KeyImportParameters') @@ -217,8 +214,6 @@ def delete_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -293,8 +288,6 @@ def update_key(self, vault_base_url, key_name, key_version, key_ops=None, key_at 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 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(parameters, 'KeyUpdateParameters') @@ -359,8 +352,6 @@ def get_key(self, vault_base_url, key_name, key_version, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -398,11 +389,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -411,46 +403,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -472,11 +461,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -484,46 +474,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_keys.metadata = {'url': '/keys'} def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -575,8 +562,6 @@ def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -648,8 +633,6 @@ def restore_key(self, vault_base_url, key_bundle_backup, cls=None, **kwargs): 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 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(parameters, 'KeyRestoreParameters') @@ -730,8 +713,6 @@ def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -809,8 +790,6 @@ def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -886,8 +865,6 @@ def sign(self, vault_base_url, key_name, key_version, algorithm, value, cls=None 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 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(parameters, 'KeySignParameters') @@ -969,8 +946,6 @@ def verify(self, vault_base_url, key_name, key_version, algorithm, digest, signa 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 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(parameters, 'KeyVerifyParameters') @@ -1048,8 +1023,6 @@ def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cls= 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 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(parameters, 'KeyOperationsParameters') @@ -1125,8 +1098,6 @@ def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cl 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 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(parameters, 'KeyOperationsParameters') @@ -1170,11 +1141,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v7_0.models.DeletedKeyItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1182,46 +1154,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -1262,8 +1231,6 @@ def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1321,8 +1288,6 @@ def purge_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1378,8 +1343,6 @@ def recover_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1449,8 +1412,6 @@ def set_secret(self, vault_base_url, secret_name, value, tags=None, content_type 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 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(parameters, 'SecretSetParameters') @@ -1511,8 +1472,6 @@ def delete_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1585,8 +1544,6 @@ def update_secret(self, vault_base_url, secret_name, secret_version, content_typ 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 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(parameters, 'SecretUpdateParameters') @@ -1649,8 +1606,6 @@ def get_secret(self, vault_base_url, secret_name, secret_version, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1688,11 +1643,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1700,46 +1656,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1760,11 +1713,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1773,46 +1727,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1831,11 +1782,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSecretItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1843,46 +1795,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): @@ -1922,8 +1871,6 @@ def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1981,8 +1928,6 @@ def purge_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2035,8 +1980,6 @@ def recover_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2094,8 +2037,6 @@ def backup_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2155,8 +2096,6 @@ def restore_secret(self, vault_base_url, secret_bundle_backup, cls=None, **kwarg 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 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(parameters, 'SecretRestoreParameters') @@ -2199,11 +2138,12 @@ def get_certificates( :type include_pending: bool :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2211,9 +2151,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -2222,37 +2159,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificates.metadata = {'url': '/certificates'} def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -2293,8 +2230,6 @@ def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2353,8 +2288,6 @@ def set_certificate_contacts(self, vault_base_url, contact_list=None, cls=None, 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 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(contacts, 'Contacts') @@ -2412,8 +2345,6 @@ def get_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2467,8 +2398,6 @@ def delete_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2505,11 +2434,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v7_0.models.CertificateIssuerItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2517,46 +2447,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, cls=None, **kwargs): @@ -2609,8 +2536,6 @@ def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credenti 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2684,8 +2609,6 @@ def update_certificate_issuer(self, vault_base_url, issuer_name, provider=None, 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2746,8 +2669,6 @@ def get_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2805,8 +2726,6 @@ def delete_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2876,8 +2795,6 @@ def create_certificate(self, vault_base_url, certificate_name, certificate_polic 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 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(parameters, 'CertificateCreateParameters') @@ -2960,8 +2877,6 @@ def import_certificate(self, vault_base_url, certificate_name, base64_encoded_ce 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 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(parameters, 'CertificateImportParameters') @@ -3003,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3016,46 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3096,8 +3009,6 @@ def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3159,8 +3070,6 @@ def update_certificate_policy(self, vault_base_url, certificate_name, certificat 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 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(certificate_policy, 'CertificatePolicy') @@ -3238,8 +3147,6 @@ def update_certificate(self, vault_base_url, certificate_name, certificate_versi 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 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(parameters, 'CertificateUpdateParameters') @@ -3303,8 +3210,6 @@ def get_certificate(self, vault_base_url, certificate_name, certificate_version, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3367,8 +3272,6 @@ def update_certificate_operation(self, vault_base_url, certificate_name, cancell 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3428,8 +3331,6 @@ def get_certificate_operation(self, vault_base_url, certificate_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3487,8 +3388,6 @@ def delete_certificate_operation(self, vault_base_url, certificate_name, cls=Non header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3560,8 +3459,6 @@ def merge_certificate(self, vault_base_url, certificate_name, x509_certificates, 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 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(parameters, 'CertificateMergeParameters') @@ -3622,8 +3519,6 @@ def backup_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3683,8 +3578,6 @@ def restore_certificate(self, vault_base_url, certificate_bundle_backup, cls=Non 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 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(parameters, 'CertificateRestoreParameters') @@ -3730,11 +3623,12 @@ def get_deleted_certificates( :type include_pending: bool :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v7_0.models.DeletedCertificateItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3742,9 +3636,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -3753,37 +3644,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3824,8 +3715,6 @@ def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3883,8 +3772,6 @@ def purge_deleted_certificate(self, vault_base_url, certificate_name, cls=None, header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3940,8 +3827,6 @@ def recover_deleted_certificate(self, vault_base_url, certificate_name, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3975,11 +3860,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.StorageAccountItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3987,46 +3873,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_storage_accounts.metadata = {'url': '/storage'} def get_deleted_storage_accounts( @@ -4045,11 +3928,12 @@ def get_deleted_storage_accounts( :type maxresults: int :return: An iterator like instance of DeletedStorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.DeletedStorageAccountItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_storage_accounts.metadata['url'] @@ -4057,46 +3941,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedStorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedStorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_storage_accounts.metadata = {'url': '/deletedstorage'} def get_deleted_storage_account(self, vault_base_url, storage_account_name, cls=None, **kwargs): @@ -4136,8 +4017,6 @@ def get_deleted_storage_account(self, vault_base_url, storage_account_name, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4195,8 +4074,6 @@ def purge_deleted_storage_account(self, vault_base_url, storage_account_name, cl header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4249,8 +4126,6 @@ def recover_deleted_storage_account(self, vault_base_url, storage_account_name, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4307,8 +4182,6 @@ def backup_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4368,8 +4241,6 @@ def restore_storage_account(self, vault_base_url, storage_bundle_backup, cls=Non 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 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(parameters, 'StorageRestoreParameters') @@ -4427,8 +4298,6 @@ def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4483,8 +4352,6 @@ def get_storage_account(self, vault_base_url, storage_account_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4559,8 +4426,6 @@ def set_storage_account(self, vault_base_url, storage_account_name, resource_id, 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 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(parameters, 'StorageAccountCreateParameters') @@ -4636,8 +4501,6 @@ def update_storage_account(self, vault_base_url, storage_account_name, active_ke 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4700,8 +4563,6 @@ def regenerate_storage_account_key(self, vault_base_url, storage_account_name, k 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4740,11 +4601,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.SasDefinitionItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4753,46 +4615,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def get_deleted_sas_definitions( @@ -4814,11 +4673,12 @@ def get_deleted_sas_definitions( :type maxresults: int :return: An iterator like instance of DeletedSasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSasDefinitionItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_sas_definitions.metadata['url'] @@ -4827,46 +4687,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_sas_definitions.metadata = {'url': '/deletedstorage/{storage-account-name}/sas'} def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, cls=None, **kwargs): @@ -4909,8 +4766,6 @@ def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_d header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4971,8 +4826,6 @@ def recover_deleted_sas_definition(self, vault_base_url, storage_account_name, s header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -5030,8 +4883,6 @@ def delete_sas_definition(self, vault_base_url, storage_account_name, sas_defini header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -5089,8 +4940,6 @@ def get_sas_definition(self, vault_base_url, storage_account_name, sas_definitio header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5168,8 +5017,6 @@ def set_sas_definition(self, vault_base_url, storage_account_name, sas_definitio 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 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(parameters, 'SasDefinitionCreateParameters') @@ -5250,8 +5097,6 @@ def update_sas_definition(self, vault_base_url, storage_account_name, sas_defini 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 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(parameters, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index c40e314accc7..dd2c6f0a9b95 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -2,8 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from typing import Any, Callable, Mapping, TYPE_CHECKING -from azure.core.async_paging import AsyncPagedMixin +from typing import Any, Callable, Mapping, AsyncIterator, TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy @@ -23,10 +22,10 @@ class AsyncPagingAdapter: - """For each item in an AsyncPagedMixin, returns the result of applying fn to that item. + """For each item in an AsyncIterator, returns the result of applying fn to that item. Python 3.6 added syntax that could replace this (yield within async for).""" - def __init__(self, pages: AsyncPagedMixin, fn: Callable[[Model], Any]) -> None: + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: self._pages = pages self._fn = fn diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/secrets_vault_client_async.py b/sdk/keyvault/azure-keyvault-secrets/tests/secrets_vault_client_async.py index 73578320e809..a374f9a3782c 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/secrets_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/tests/secrets_vault_client_async.py @@ -3,7 +3,6 @@ # Licensed under the MIT License. # ------------------------------------ from typing import Any, Callable, Mapping, TYPE_CHECKING -from azure.core.async_paging import AsyncPagedMixin from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies import AsyncBearerTokenCredentialPolicy diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py index c2b7cce9f255..6484882d65bb 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py @@ -14,6 +14,8 @@ except ImportError: from urlparse import urlparse # type: ignore +from azure.core.paging import ItemPaged + from ._shared.shared_access_signature import SharedAccessSignature from ._shared.models import LocationMode, Services from ._shared.utils import ( @@ -380,12 +382,11 @@ def set_service_properties( def list_containers( self, name_starts_with=None, # type: Optional[str] include_metadata=False, # type: Optional[bool] - marker=None, # type: Optional[str] results_per_page=None, # type: Optional[int] timeout=None, # type: Optional[int] **kwargs ): - # type: (...) -> ContainerPropertiesPaged + # type: (...) -> ItemPaged[ContainerProperties] """Returns a generator to list the containers under the specified account. The generator will lazily follow the continuation tokens returned by @@ -397,17 +398,13 @@ def list_containers( :param bool include_metadata: Specifies that container metadata be returned in the response. The default value is `False`. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int results_per_page: The maximum number of container names to retrieve per API call. If the request does not specify the server will return up to 5,000 items. :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) of ContainerProperties. - :rtype: ~azure.core.blob.models.ContainerPropertiesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.core.blob.models.ContainerProperties] Example: .. literalinclude:: ../tests/test_blob_samples_service.py @@ -424,8 +421,8 @@ def list_containers( include=include, timeout=timeout, **kwargs) - return ContainerPropertiesPaged( - command, prefix=name_starts_with, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, prefix=name_starts_with, results_per_page=results_per_page, page_iterator_class=ContainerPropertiesPaged) def create_container( self, name, # type: str diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py index 28da09873c1e..2f43f56806e3 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py @@ -16,6 +16,8 @@ from urlparse import urlparse # type: ignore from urllib2 import quote, unquote # type: ignore +from azure.core.paging import ItemPaged + import six from ._shared.shared_access_signature import BlobSharedAccessSignature @@ -658,8 +660,8 @@ def set_container_access_policy( except StorageErrorException as error: process_storage_error(error) - def list_blobs(self, name_starts_with=None, include=None, marker=None, timeout=None, **kwargs): - # type: (Optional[str], Optional[Any], Optional[str], Optional[int], **Any) -> Iterable[BlobProperties] + def list_blobs(self, name_starts_with=None, include=None, timeout=None, **kwargs): + # type: (Optional[str], Optional[Any], Optional[int], **Any) -> ItemPaged[BlobProperties] """Returns a generator to list the blobs under the specified container. The generator will lazily follow the continuation tokens returned by the service. @@ -670,14 +672,10 @@ def list_blobs(self, name_starts_with=None, include=None, marker=None, timeout=N :param list[str] include: Specifies one or more additional datasets to include in the response. Options include: 'snapshots', 'metadata', 'uncommittedblobs', 'copy', 'deleted'. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) response of BlobProperties. - :rtype: ~azure.storage.blob.models.BlobPropertiesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.models.BlobProperties] Example: .. literalinclude:: ../tests/test_blob_samples_containers.py @@ -696,17 +694,19 @@ def list_blobs(self, name_starts_with=None, include=None, marker=None, timeout=N include=include, timeout=timeout, **kwargs) - return BlobPropertiesPaged(command, prefix=name_starts_with, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, prefix=name_starts_with, results_per_page=results_per_page, + page_iterator_class=BlobPropertiesPaged) + def walk_blobs( self, name_starts_with=None, # type: Optional[str] include=None, # type: Optional[Any] delimiter="/", # type: str - marker=None, # type: Optional[str] timeout=None, # type: Optional[int] **kwargs # type: Optional[Any] ): - # type: (...) -> Iterable[BlobProperties] + # type: (...) -> ItemPaged[BlobProperties] """Returns a generator to list the blobs under the specified container. The generator will lazily follow the continuation tokens returned by the service. This operation will list blobs in accordance with a hierarchy, @@ -723,20 +723,15 @@ def walk_blobs( element in the response body that acts as a placeholder for all blobs whose names begin with the same substring up to the appearance of the delimiter character. The delimiter may be a single character or a string. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) response of BlobProperties. - :rtype: ~azure.storage.blob.models.BlobPrefix + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.models.BlobProperties] """ if include and not isinstance(include, list): include = [include] results_per_page = kwargs.pop('results_per_page', None) - marker = kwargs.pop('marker', "") command = functools.partial( self._client.container.list_blob_hierarchy_segment, delimiter=delimiter, @@ -747,7 +742,6 @@ def walk_blobs( command, prefix=name_starts_with, results_per_page=results_per_page, - marker=marker, delimiter=delimiter) def upload_blob( diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/models.py b/sdk/storage/azure-storage-blob/azure/storage/blob/models.py index ab75e1d7722d..c5c90d21f15e 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/models.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/models.py @@ -9,7 +9,7 @@ from enum import Enum from typing import List, Any, TYPE_CHECKING # pylint: disable=unused-import -from azure.core.paging import Paged +from azure.core.paging import PageIterator, ItemPaged from ._shared.utils import ( decode_base64, @@ -287,14 +287,14 @@ def _from_generated(cls, generated): return props -class ContainerPropertiesPaged(Paged): +class ContainerPropertiesPaged(PageIterator): """An Iterable of Container properties. :ivar str service_endpoint: The service URL. :ivar str prefix: A container name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. - :ivar str next_marker: The continuation token to retrieve the next page of results. + :ivar str continuation_token: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available options include "primary" and "secondary". :ivar current_page: The current page of listed results. @@ -305,53 +305,45 @@ class ContainerPropertiesPaged(Paged): begin with the specified prefix. :param int results_per_page: The maximum number of container names to retrieve per call. - :param str marker: An opaque continuation token. - """ - def __init__(self, command, prefix=None, results_per_page=None, marker=None): - super(ContainerPropertiesPaged, self).__init__(command, None) + :param str continuation_token: An opaque continuation token. + """ + def __init__(self, command, prefix=None, results_per_page=None, continuation_token=None): + super(ContainerPropertiesPaged, self).__init__( + get_next=self._get_next_cb, + extract_data=self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command self.service_endpoint = None self.prefix = prefix - self.current_marker = None + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.location_mode = None + self.current_page = [] - def _advance_page(self): - """Force moving the cursor to the next azure call. - - This method is for advanced usage, iterator protocol is prefered. - - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( - marker=self.next_marker or None, + return self._command( + marker=continuation_token or None, maxresults=self.results_per_page, cls=return_context_and_deserialized, use_location=self.location_mode) except StorageErrorException as error: process_storage_error(error) + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.service_endpoint = self._response.service_endpoint self.prefix = self._response.prefix - self.current_marker = self._response.marker + self.marker = self._response.marker self.results_per_page = self._response.max_results - self.current_page = self._response.container_items - self.next_marker = self._response.next_marker or None - return self.current_page + self.current_page = [self._build_item(item) for item in self._response.container_items] - def __next__(self): # type: ignore - item = super(ContainerPropertiesPaged, self).__next__() - if isinstance(item, ContainerProperties): - return item - return ContainerProperties._from_generated(item) # pylint: disable=protected-access + return self._response.next_marker or None, self.current_page - next = __next__ + @staticmethod + def _build_item(item): + return ContainerProperties._from_generated(item) # pylint: disable=protected-access class BlobProperties(DictMixin): @@ -469,14 +461,14 @@ def _from_generated(cls, generated): return blob -class BlobPropertiesPaged(Paged): +class BlobPropertiesPaged(PageIterator): """An Iterable of Blob properties. :ivar str service_endpoint: The service URL. :ivar str prefix: A blob name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. - :ivar str next_marker: The continuation token to retrieve the next page of results. + :ivar str continuation_token: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available options include "primary" and "secondary". :ivar current_page: The current page of listed results. @@ -489,7 +481,7 @@ class BlobPropertiesPaged(Paged): begin with the specified prefix. :param int results_per_page: The maximum number of blobs to retrieve per call. - :param str marker: An opaque continuation token. + :param str continuation_token: An opaque continuation token. :param str delimiter: Used to capture blobs whose names begin with the same substring up to the appearance of the delimiter character. The delimiter may be a single @@ -503,55 +495,48 @@ def __init__( container=None, prefix=None, results_per_page=None, - marker=None, + continuation_token=None, delimiter=None, location_mode=None): - super(BlobPropertiesPaged, self).__init__(command, None) + super(BlobPropertiesPaged, self).__init__( + get_next=self._get_next_cb, + extract_data=self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command self.service_endpoint = None self.prefix = prefix - self.current_marker = None + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.container = container self.delimiter = delimiter self.current_page = None self.location_mode = location_mode - def _advance_page(self): - """Force moving the cursor to the next azure call. - - This method is for advanced usage, iterator protocol is prefered. - - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 - + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( + return self._command( prefix=self.prefix, - marker=self.next_marker or None, + marker=continuation_token or None, maxresults=self.results_per_page, cls=return_context_and_deserialized, use_location=self.location_mode) except StorageErrorException as error: process_storage_error(error) + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.service_endpoint = self._response.service_endpoint self.prefix = self._response.prefix - self.current_marker = self._response.marker + self.marker = self._response.marker self.results_per_page = self._response.max_results - self.current_page = self._response.segment.blob_items - self.next_marker = self._response.next_marker or None self.container = self._response.container_name + self.current_page = [self._build_item(item) for item in self._response.segment.blob_items] self.delimiter = self._response.delimiter - return self.current_page - def __next__(self): - item = super(BlobPropertiesPaged, self).__next__() + return self._response.next_marker or None, self.current_page + + def _build_item(self, item): if isinstance(item, BlobProperties): return item if isinstance(item, BlobItem): @@ -560,10 +545,8 @@ def __next__(self): return blob return item - next = __next__ - -class BlobPrefix(BlobPropertiesPaged, DictMixin): +class BlobPrefix(ItemPaged, DictMixin): """An Iterable of Blob properties. Returned from walk_blobs when a delimiter is used. @@ -572,7 +555,7 @@ class BlobPrefix(BlobPropertiesPaged, DictMixin): :ivar str name: The prefix, or "directory name" of the blob. :ivar str service_endpoint: The service URL. :ivar str prefix: A blob name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. :ivar str next_marker: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available @@ -597,51 +580,37 @@ class BlobPrefix(BlobPropertiesPaged, DictMixin): Options include 'primary' or 'secondary'. """ def __init__(self, *args, **kwargs): - super(BlobPrefix, self).__init__(*args, **kwargs) + super(BlobPrefix, self).__init__(*args, page_iterator_class=BlobPrefixPaged, **kwargs) + self.name = kwargs.get('prefix') + self.prefix = kwargs.get('prefix') + self.results_per_page = kwargs.get('results_per_page') + self.container = kwargs.get('container') + self.delimiter = kwargs.get('delimiter') + self.location_mode = kwargs.get('location_mode') + +class BlobPrefixPaged(BlobPropertiesPaged): + def __init__(self, *args, **kwargs): + super(BlobPrefixPaged, self).__init__(*args, **kwargs) self.name = self.prefix - def _advance_page(self): - """Force moving the cursor to the next azure call. - - This method is for advanced usage, iterator protocol is prefered. - - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 - self.location_mode, self._response = self._get_next( - prefix=self.prefix, - marker=self.next_marker or None, - maxresults=self.results_per_page, - cls=return_context_and_deserialized, - use_location=self.location_mode) - self.service_endpoint = self._response.service_endpoint - self.prefix = self._response.prefix - self.current_marker = self._response.marker - self.results_per_page = self._response.max_results - self.current_page = self._response.segment.blob_prefixes - self.current_page.extend(self._response.segment.blob_items) - self.next_marker = self._response.next_marker or None - self.container = self._response.container_name - self.delimiter = self._response.delimiter + def _extract_data_cb(self, get_next_return): + continuation_token, _ = super(BlobPrefixPaged, self)._extract_data_cb(get_next_return) + self.current_page = self._response.segment.blob_prefixes + self._response.segment.blob_items + self.current_page = [self._build_item(item) for item in self.current_page] - def __next__(self): - item = super(BlobPrefix, self).__next__() + return continuation_token, self.current_page + + def _build_item(self, item): + item = super(BlobPrefixPaged, self)._build_item(item) if isinstance(item, GenBlobPrefix): return BlobPrefix( - self._get_next, + self._command, container=self.container, prefix=item.name, results_per_page=self.results_per_page, location_mode=self.location_mode) return item - next = __next__ - - class LeaseProperties(DictMixin): """Blob Lease Properties. diff --git a/sdk/storage/azure-storage-blob/tests/test_container.py b/sdk/storage/azure-storage-blob/tests/test_container.py index 889e270dd662..a22b8e50f62a 100644 --- a/sdk/storage/azure-storage-blob/tests/test_container.py +++ b/sdk/storage/azure-storage-blob/tests/test_container.py @@ -120,7 +120,7 @@ def test_create_container_with_public_access_blob(self): blob = container.get_blob_client("blob1") blob.upload_blob(u'xyz') - + anonymous_service = BlobClient( self._get_account_url(), container=container_name, @@ -247,15 +247,12 @@ def test_list_containers_with_num_results_and_marker(self): container_names.sort() # Act - generator1 = self.bsc.list_containers(name_starts_with=prefix, results_per_page=2) - next(generator1) + generator1 = self.bsc.list_containers(name_starts_with=prefix, results_per_page=2).by_page() + containers1 = list(next(generator1)) generator2 = self.bsc.list_containers( - name_starts_with=prefix, marker=generator1.next_marker, results_per_page=2) - next(generator2) - - containers1 = list(generator1.current_page) - containers2 = list(generator2.current_page) + name_starts_with=prefix, results_per_page=2).by_page(generator1.continuation_token) + containers2 = list(next(generator2)) # Assert self.assertIsNotNone(containers1) @@ -817,14 +814,13 @@ def test_list_blobs_with_num_results(self): # Act - blobs = container.list_blobs(results_per_page=2) - next(blobs) + blobs = list(next(container.list_blobs(results_per_page=2).by_page())) # Assert self.assertIsNotNone(blobs) - self.assertEqual(len(blobs.current_page), 2) - self.assertNamedItemInContainer(blobs.current_page, 'blob_a1') - self.assertNamedItemInContainer(blobs.current_page, 'blob_a2') + self.assertEqual(len(blobs), 2) + self.assertNamedItemInContainer(blobs, 'blob_a1') + self.assertNamedItemInContainer(blobs, 'blob_a2') @record def test_list_blobs_with_include_snapshots(self): diff --git a/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py b/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py index 7e0bb4f4885c..50a1dacb7298 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py @@ -16,6 +16,7 @@ import six from azure.core.polling import LROPoller +from azure.core.paging import ItemPaged from .file_client import FileClient @@ -269,21 +270,17 @@ def delete_directory(self, timeout=None, **kwargs): except StorageErrorException as error: process_storage_error(error) - def list_directories_and_files(self, name_starts_with=None, marker=None, timeout=None, **kwargs): - # type: (Optional[str], Optional[str], Optional[int], **Any) -> DirectoryProperties + def list_directories_and_files(self, name_starts_with=None, timeout=None, **kwargs): + # type: (Optional[str], Optional[str], Optional[int], **Any) -> ItemPaged """Lists all the directories and files under the directory. :param str name_starts_with: Filters the results to return only entities whose names begin with the specified prefix. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int timeout: The timeout parameter is expressed in seconds. :returns: An auto-paging iterable of dict-like DirectoryProperties and FileProperties - :rtype: ~azure.storage.file.models.DirectoryPropertiesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.models.DirectoryProperties] Example: .. literalinclude:: ../tests/test_file_samples_directory.py @@ -299,23 +296,20 @@ def list_directories_and_files(self, name_starts_with=None, marker=None, timeout sharesnapshot=self.snapshot, timeout=timeout, **kwargs) - return DirectoryPropertiesPaged( - command, prefix=name_starts_with, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, prefix=name_starts_with, results_per_page=results_per_page, + page_iterator_class=DirectoryPropertiesPaged) - def list_handles(self, marker=None, recursive=False, timeout=None, **kwargs): + def list_handles(self, recursive=False, timeout=None, **kwargs): """Lists opened handles on a directory or a file under the directory. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param bool recursive: Boolean that specifies if operation should apply to the directory specified by the client, its files, its subdirectories and their files. Default value is False. :param int timeout: The timeout parameter is expressed in seconds. :returns: An auto-paging iterable of HandleItems - :rtype: ~azure.storage.file.models.HandlesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.models.Handles] """ results_per_page = kwargs.pop('results_per_page', None) command = functools.partial( @@ -324,8 +318,9 @@ def list_handles(self, marker=None, recursive=False, timeout=None, **kwargs): timeout=timeout, recursive=recursive, **kwargs) - return HandlesPaged( - command, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, results_per_page=results_per_page, + page_iterator_class=HandlesPaged) def close_handles( self, handle=None, # type: Union[str, HandleItem] diff --git a/sdk/storage/azure-storage-file/azure/storage/file/file_client.py b/sdk/storage/azure-storage-file/azure/storage/file/file_client.py index ec492fe25197..a67cc9736fad 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/file_client.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/file_client.py @@ -18,6 +18,7 @@ import six from azure.core.polling import LROPoller +from azure.core.paging import ItemPaged from .models import HandlesPaged from ._generated import AzureFileStorage @@ -781,16 +782,14 @@ def resize_file(self, size, timeout=None, **kwargs): # type: ignore except StorageErrorException as error: process_storage_error(error) - def list_handles(self, marker=None, timeout=None, **kwargs): + def list_handles(self, timeout=None, **kwargs): + # type: (int, Any) -> ItemPaged[Handle] """Lists handles for file. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int timeout: The timeout parameter is expressed in seconds. :returns: An auto-paging iterable of HandleItems + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.models.Handle] """ results_per_page = kwargs.pop('results_per_page', None) command = functools.partial( @@ -798,8 +797,9 @@ def list_handles(self, marker=None, timeout=None, **kwargs): sharesnapshot=self.snapshot, timeout=timeout, **kwargs) - return HandlesPaged( - command, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, results_per_page=results_per_page, + page_iterator_class=HandlesPaged) def close_handles( self, handle=None, # type: Union[str, HandleItem] diff --git a/sdk/storage/azure-storage-file/azure/storage/file/file_service_client.py b/sdk/storage/azure-storage-file/azure/storage/file/file_service_client.py index ffde63e24f69..160a73a7af6a 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/file_service_client.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/file_service_client.py @@ -6,7 +6,7 @@ import functools from typing import ( # pylint: disable=unused-import - Union, Optional, Any, Iterable, Dict, List, + Union, Optional, Any, Dict, List, TYPE_CHECKING ) try: @@ -14,6 +14,8 @@ except ImportError: from urlparse import urlparse # type: ignore +from azure.core.paging import ItemPaged + from .share_client import ShareClient from ._shared.shared_access_signature import SharedAccessSignature from ._shared.models import Services @@ -270,11 +272,10 @@ def list_shares( self, name_starts_with=None, # type: Optional[str] include_metadata=False, # type: Optional[bool] include_snapshots=False, # type: Optional[bool] - marker=None, timeout=None, # type: Optional[int] **kwargs ): - # type: (...) -> SharePropertiesPaged + # type: (...) -> ItemPaged[ShareProperties] """Returns auto-paging iterable of dict-like ShareProperties under the specified account. The generator will lazily follow the continuation tokens returned by the service and stop when all shares have been returned. @@ -286,14 +287,10 @@ def list_shares( Specifies that share metadata be returned in the response. :param bool include_snapshots: Specifies that share snapshot be returned in the response. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) of ShareProperties. - :rtype: ~azure.storage.file.models.SharePropertiesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.models.ShareProperties] Example: .. literalinclude:: ../tests/test_file_samples_service.py @@ -314,8 +311,9 @@ def list_shares( include=include, timeout=timeout, **kwargs) - return SharePropertiesPaged( - command, prefix=name_starts_with, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, prefix=name_starts_with, results_per_page=results_per_page, + page_iterator_class=SharePropertiesPaged) def create_share( self, share_name, # type: str diff --git a/sdk/storage/azure-storage-file/azure/storage/file/models.py b/sdk/storage/azure-storage-file/azure/storage/file/models.py index d77baed48d7d..8a393cc37417 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/models.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/models.py @@ -6,7 +6,7 @@ # pylint: disable=too-few-public-methods, too-many-instance-attributes # pylint: disable=super-init-not-called, too-many-lines -from azure.core.paging import Paged +from azure.core.paging import PageIterator from ._shared.utils import ( return_context_and_deserialized, process_storage_error) @@ -243,12 +243,12 @@ def _from_generated(cls, generated): return props -class SharePropertiesPaged(Paged): +class SharePropertiesPaged(PageIterator): """An iterable of Share properties. :ivar str service_endpoint: The service URL. :ivar str prefix: A file name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. :ivar str next_marker: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available @@ -261,43 +261,40 @@ class SharePropertiesPaged(Paged): begin with the specified prefix. :param int results_per_page: The maximum number of share names to retrieve per call. - :param str marker: An opaque continuation token. + :param str continuation_token: An opaque continuation token. """ - def __init__(self, command, prefix=None, results_per_page=None, marker=None, **kwargs): - super(SharePropertiesPaged, self).__init__(command, None) + def __init__(self, command, prefix=None, results_per_page=None, continuation_token=None): + super(SharePropertiesPaged, self).__init__( + get_next=self._get_next_cb, + extract_data=self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command self.service_endpoint = None self.prefix = prefix - self.current_marker = None + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.location_mode = None + self.current_page = [] - def _advance_page(self): - """Force moving the cursor to the next azure call. - This method is for advanced usage, iterator protocol is prefered. - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( - marker=self.next_marker or None, + return self._command( + marker=continuation_token or None, maxresults=self.results_per_page, cls=return_context_and_deserialized, use_location=self.location_mode) except StorageErrorException as error: process_storage_error(error) + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.service_endpoint = self._response.service_endpoint self.prefix = self._response.prefix - self.current_marker = self._response.marker + self.marker = self._response.marker self.results_per_page = self._response.max_results self.current_page = [ShareProperties._from_generated(i) for i in self._response.share_items] # pylint: disable=protected-access - self.next_marker = self._response.next_marker or None - return self.current_page + return self._response.next_marker or None, self.current_page class Handle(DictMixin): @@ -352,10 +349,10 @@ def _from_generated(cls, generated): return handle -class HandlesPaged(Paged): +class HandlesPaged(PageIterator): """An iterable of Handles. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. :ivar str next_marker: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available @@ -366,36 +363,34 @@ class HandlesPaged(Paged): :param callable command: Function to retrieve the next page of items. :param int results_per_page: The maximum number of share names to retrieve per call. - :param str marker: An opaque continuation token. + :param str continuation_token: An opaque continuation token. """ - def __init__(self, command, results_per_page=None, marker=None, **kwargs): - super(HandlesPaged, self).__init__(command, None) - self.current_marker = None + def __init__(self, command, results_per_page=None, continuation_token=None): + super(HandlesPaged, self).__init__( + get_next=self._get_next_cb, + extract_data=self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.location_mode = None + self.current_page = [] - def _advance_page(self): - """Force moving the cursor to the next azure call. - This method is for advanced usage, iterator protocol is prefered. - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( - marker=self.next_marker or None, + return self._command( + marker=continuation_token or None, maxresults=self.results_per_page, cls=return_context_and_deserialized, use_location=self.location_mode) except StorageErrorException as error: process_storage_error(error) + + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.current_page = [Handle._from_generated(h) for h in self._response.handle_list] # pylint: disable=protected-access - self.next_marker = self._response.next_marker or None - return self.current_page + return self._response.next_marker or None, self.current_page class DirectoryProperties(DictMixin): @@ -432,7 +427,7 @@ def _from_generated(cls, generated): return props -class DirectoryPropertiesPaged(Paged): +class DirectoryPropertiesPaged(PageIterator): """An iterable for the contents of a directory. This iterable will yield dicts for the contents of the directory. The dicts @@ -441,7 +436,7 @@ class DirectoryPropertiesPaged(Paged): :ivar str service_endpoint: The service URL. :ivar str prefix: A file name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. :ivar str next_marker: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available @@ -454,30 +449,26 @@ class DirectoryPropertiesPaged(Paged): begin with the specified prefix. :param int results_per_page: The maximum number of share names to retrieve per call. - :param str marker: An opaque continuation token. + :param str continuation_token: An opaque continuation token. """ - def __init__(self, command, prefix=None, results_per_page=None, marker=None, **kwargs): - super(DirectoryPropertiesPaged, self).__init__(command, None) + def __init__(self, command, prefix=None, results_per_page=None, continuation_token=None): + super(DirectoryPropertiesPaged, self).__init__( + get_next=self._get_next_cb, + extract_data=self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command self.service_endpoint = None self.prefix = prefix - self.current_marker = None + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.location_mode = None + self.current_page = [] - def _advance_page(self): - """Force moving the cursor to the next azure call. - This method is for advanced usage, iterator protocol is prefered. - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( - marker=self.next_marker or None, + return self._command( + marker=continuation_token or None, prefix=self.prefix, maxresults=self.results_per_page, cls=return_context_and_deserialized, @@ -485,14 +476,15 @@ def _advance_page(self): except StorageErrorException as error: process_storage_error(error) + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.service_endpoint = self._response.service_endpoint self.prefix = self._response.prefix - self.current_marker = self._response.marker + self.marker = self._response.marker self.results_per_page = self._response.max_results self.current_page = [_wrap_item(i) for i in self._response.segment.directory_items] self.current_page.extend([_wrap_item(i) for i in self._response.segment.file_items]) - self.next_marker = self._response.next_marker or None - return self.current_page + return self._response.next_marker or None, self.current_page class FileProperties(DictMixin): diff --git a/sdk/storage/azure-storage-file/tests/test_handle.py b/sdk/storage/azure-storage-file/tests/test_handle.py index 7fe3d3a5e3d4..220e71d679c2 100644 --- a/sdk/storage/azure-storage-file/tests/test_handle.py +++ b/sdk/storage/azure-storage-file/tests/test_handle.py @@ -114,20 +114,21 @@ def test_list_handles_with_marker(self): root = share.get_directory_client() # Act - handle_generator = root.list_handles(recursive=True, results_per_page=1) - next(handle_generator) + handle_generator = root.list_handles(recursive=True, results_per_page=1).by_page() + handles = list(next(handle_generator)) # Assert - self.assertIsNotNone(handle_generator.next_marker) - handles = handle_generator.current_page + self.assertIsNotNone(handle_generator.continuation_token) self._validate_handles(handles) # Note down a handle that we saw old_handle = handles[0] # Continue listing - remaining_handles = list( - root.list_handles(recursive=True, marker=handle_generator.next_marker)) + remaining_handles = list(next( + root.list_handles(recursive=True).by_page( + continuation_token=handle_generator.continuation_token) + )) self._validate_handles(handles) # Make sure the old handle did not appear diff --git a/sdk/storage/azure-storage-file/tests/test_share.py b/sdk/storage/azure-storage-file/tests/test_share.py index 4eabf312d3f4..cc134be6c710 100644 --- a/sdk/storage/azure-storage-file/tests/test_share.py +++ b/sdk/storage/azure-storage-file/tests/test_share.py @@ -341,14 +341,12 @@ def test_list_shares_with_num_results_and_marker(self): share_names.sort() # Act - generator1 = self.fsc.list_shares(prefix, results_per_page=2) - next(generator1) - generator2 = self.fsc.list_shares( - prefix, marker=generator1.next_marker, results_per_page=2) - next(generator2) + generator1 = self.fsc.list_shares(prefix, results_per_page=2).by_page() + shares1 = list(next(generator1)) - shares1 = generator1.current_page - shares2 = generator2.current_page + generator2 = self.fsc.list_shares( + prefix, results_per_page=2).by_page(continuation_token=generator1.continuation_token) + shares2 = list(next(generator2)) # Assert self.assertIsNotNone(shares1) @@ -606,14 +604,14 @@ def test_list_directories_and_files_with_num_results(self): root.upload_file('fileb1', '1024') # Act - result = share_name.list_directories_and_files(results_per_page=2) - next(result) + result = share_name.list_directories_and_files(results_per_page=2).by_page() + result = list(next(result)) # Assert self.assertIsNotNone(result) - self.assertEqual(len(result.current_page), 2) - self.assertNamedItemInContainer(result.current_page, 'dir1') - self.assertNamedItemInContainer(result.current_page, 'filea1') + self.assertEqual(len(result), 2) + self.assertNamedItemInContainer(result, 'dir1') + self.assertNamedItemInContainer(result, 'filea1') @record def test_list_directories_and_files_with_num_results_and_marker(self): @@ -627,14 +625,13 @@ def test_list_directories_and_files_with_num_results_and_marker(self): dir1.upload_file('fileb1', '1024') # Act - generator1 = share_name.list_directories_and_files('dir1', results_per_page=2) - next(generator1) - generator2 = share_name.list_directories_and_files( - 'dir1', marker=generator1.next_marker, results_per_page=2) - next(generator2) + generator1 = share_name.list_directories_and_files( + 'dir1', results_per_page=2).by_page() + result1 = list(next(generator1)) - result1 = generator1.current_page - result2 = generator2.current_page + generator2 = share_name.list_directories_and_files( + 'dir1', results_per_page=2).by_page(continuation_token=generator1.continuation_token) + result2 = list(next(generator2)) # Assert self.assertEqual(len(result1), 2) @@ -643,7 +640,7 @@ def test_list_directories_and_files_with_num_results_and_marker(self): self.assertNamedItemInContainer(result1, 'filea2') self.assertNamedItemInContainer(result2, 'filea3') self.assertNamedItemInContainer(result2, 'fileb1') - self.assertEqual(generator2.next_marker, None) + self.assertEqual(generator2.continuation_token, None) @record def test_list_directories_and_files_with_prefix(self): diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/models.py b/sdk/storage/azure-storage-queue/azure/storage/queue/models.py index 224508d959fc..eb8250e918f6 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/models.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/models.py @@ -7,7 +7,7 @@ # pylint: disable=super-init-not-called from typing import List # pylint: disable=unused-import -from azure.core.paging import Paged +from azure.core.paging import PageIterator from ._shared.utils import ( return_context_and_deserialized, process_storage_error) @@ -220,7 +220,7 @@ def _from_generated(cls, generated): return message -class MessagesPaged(Paged): +class MessagesPaged(PageIterator): """An iterable of Queue Messages. :ivar int results_per_page: The maximum number of results retrieved per API call. @@ -231,28 +231,28 @@ class MessagesPaged(Paged): :param int results_per_page: The maximum number of messages to retrieve per call. """ - def __init__(self, command, results_per_page=None): - super(MessagesPaged, self).__init__(command, None) + def __init__(self, command, results_per_page=None, continuation_token=None): + if continuation_token is not None: + raise ValueError("This operation does not support continuation token") + + super(MessagesPaged, self).__init__( + self._get_next_cb, + self._extract_data_cb, + ) + self._command = command self.results_per_page = results_per_page - def _advance_page(self): - """Force moving the cursor to the next azure call. - - This method is for advanced usage, iterator protocol is prefered. - - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - messages = self._get_next(number_of_messages=self.results_per_page) - if not messages: - raise StopIteration() + return self._command(number_of_messages=self.results_per_page) except StorageErrorException as error: process_storage_error(error) - self.current_page = [QueueMessage._from_generated(q) for q in messages] # pylint: disable=protected-access - return self.current_page + + def _extract_data_cb(self, messages): + # There is no concept of continuation token, so raising on my own condition + if not messages: + raise StopIteration("End of paging") + return "TOKEN_IGNORED", [QueueMessage._from_generated(q) for q in messages] # pylint: disable=protected-access class QueueProperties(DictMixin): @@ -280,12 +280,12 @@ def _from_generated(cls, generated): return props -class QueuePropertiesPaged(Paged): +class QueuePropertiesPaged(PageIterator): """An iterable of Queue properties. :ivar str service_endpoint: The service URL. :ivar str prefix: A queue name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. :ivar str next_marker: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available @@ -298,44 +298,39 @@ class QueuePropertiesPaged(Paged): begin with the specified prefix. :param int results_per_page: The maximum number of queue names to retrieve per call. - :param str marker: An opaque continuation token. + :param str continuation_token: An opaque continuation token. """ - def __init__(self, command, prefix=None, results_per_page=None, marker=None): - super(QueuePropertiesPaged, self).__init__(command, None) + def __init__(self, command, prefix=None, results_per_page=None, continuation_token=None): + super(QueuePropertiesPaged, self).__init__( + self._get_next_cb, + self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command self.service_endpoint = None self.prefix = prefix - self.current_marker = None + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.location_mode = None - def _advance_page(self): - """Force moving the cursor to the next azure call. - - This method is for advanced usage, iterator protocol is prefered. - - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( - marker=self.next_marker or None, + return self._command( + marker=continuation_token or None, maxresults=self.results_per_page, cls=return_context_and_deserialized, use_location=self.location_mode) except StorageErrorException as error: process_storage_error(error) + + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.service_endpoint = self._response.service_endpoint self.prefix = self._response.prefix - self.current_marker = self._response.marker + self.marker = self._response.marker self.results_per_page = self._response.max_results - self.current_page = [QueueProperties._from_generated(q) for q in self._response.queue_items] # pylint: disable=protected-access - self.next_marker = self._response.next_marker or None - return self.current_page + + return self._response.next_marker or None, [QueueProperties._from_generated(q) for q in self._response.queue_items] # pylint: disable=protected-access class QueuePermissions(object): diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py index a8d58b638f73..ff780029de0c 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py @@ -16,6 +16,8 @@ import six +from azure.core.paging import ItemPaged + from ._shared.shared_access_signature import QueueSharedAccessSignature from ._shared.utils import ( StorageAccountHostsMixin, @@ -512,7 +514,7 @@ def enqueue_message( # type: ignore process_storage_error(error) def receive_messages(self, messages_per_page=None, visibility_timeout=None, timeout=None, **kwargs): # type: ignore - # type: (Optional[int], Optional[int], Optional[int], Optional[Any]) -> QueueMessage + # type: (Optional[int], Optional[int], Optional[int], Optional[Any]) -> ItemPaged[Message] """Removes one or more messages from the front of the queue. When a message is retrieved from the queue, the response includes the message @@ -540,7 +542,7 @@ def receive_messages(self, messages_per_page=None, visibility_timeout=None, time The server timeout, expressed in seconds. :return: Returns a message iterator of dict-like Message objects. - :rtype: ~azure.storage.queue.models.MessagesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.queue.models.Message] Example: .. literalinclude:: ../tests/test_queue_samples_message.py @@ -562,7 +564,7 @@ def receive_messages(self, messages_per_page=None, visibility_timeout=None, time cls=self._config.message_decode_policy, **kwargs ) - return MessagesPaged(command, results_per_page=messages_per_page) + return ItemPaged(command, results_per_page=messages_per_page, page_iterator_class=MessagesPaged) except StorageErrorException as error: process_storage_error(error) diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py index 41be25c1d6bf..1e7fca250953 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py @@ -13,6 +13,8 @@ except ImportError: from urlparse import urlparse # type: ignore +from azure.core.paging import ItemPaged + from ._shared.shared_access_signature import SharedAccessSignature from ._shared.models import LocationMode, Services from ._shared.utils import ( @@ -302,12 +304,11 @@ def set_service_properties( # type: ignore def list_queues( self, name_starts_with=None, # type: Optional[str] include_metadata=False, # type: Optional[bool] - marker=None, # type: Optional[str] results_per_page=None, # type: Optional[int] timeout=None, # type: Optional[int] **kwargs ): - # type: (...) -> QueuePropertiesPaged + # type: (...) -> ItemPaged[QueueProperties] """Returns a generator to list the queues under the specified account. The generator will lazily follow the continuation tokens returned by @@ -318,10 +319,6 @@ def list_queues( begin with the specified prefix. :param bool include_metadata: Specifies that queue metadata be returned in the response. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int results_per_page: The maximum number of queue names to retrieve per API call. If the request does not specify the server will return up to 5,000 items. @@ -330,7 +327,7 @@ def list_queues( calls to the service in which case the timeout value specified will be applied to each individual call. :returns: An iterable (auto-paging) of QueueProperties. - :rtype: ~azure.core.queue.models.QueuePropertiesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.core.queue.models.QueueProperties] Example: .. literalinclude:: ../tests/test_queue_samples_service.py @@ -347,8 +344,10 @@ def list_queues( include=include, timeout=timeout, **kwargs) - return QueuePropertiesPaged( - command, prefix=name_starts_with, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, prefix=name_starts_with, results_per_page=results_per_page, + page_iterator_class=QueuePropertiesPaged + ) def create_queue( self, name, # type: str @@ -357,7 +356,7 @@ def create_queue( **kwargs ): # type: (...) -> QueueClient - """Creates a new queue under the specified account. + """Creates a new queue under the specified account. If a queue with the same name already exists, the operation fails. Returns a client with which to interact with the newly created queue. diff --git a/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_delete_message.yaml b/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_delete_message.yaml index 51d38817ff39..7b9a2fe78803 100644 --- a/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_delete_message.yaml +++ b/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_delete_message.yaml @@ -2,1441 +2,246 @@ interactions: - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1b7a7e3a-952a-11e9-bd27-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49 - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - fd4a8222-9003-00c8-3c36-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1b9a01c6-952a-11e9-8b0c-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF442e2d59-b9ee-4fc1-b57f-1eede999ed26Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAAZ71f3TYp1QE=Sat,\ - \ 22 Jun 2019 20:12:49 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - fd4a822e-9003-00c8-4436-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1ba2cc3e-952a-11e9-84a6-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF4b1f4b61-a5c0-48fa-8473-231196864687Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAAayNo3TYp1QE=Sat,\ - \ 22 Jun 2019 20:12:49 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - fd4a8238-9003-00c8-4e36-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1bab46ca-952a-11e9-8a40-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFFbc529b8c-9f40-41ef-96f3-354cb25025b7Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAAkNdw3TYp1QE=Sat,\ - \ 22 Jun 2019 20:12:49 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - fd4a8241-9003-00c8-5536-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1bb3e9c6-952a-11e9-b2c0-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF635425fc-8557-4a2c-81fb-14a27d8b1c50Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAApmR53TYp1QE=Sat,\ - \ 22 Jun 2019 20:12:49 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - fd4a8249-9003-00c8-5c36-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1bbc4aba-952a-11e9-9d3a-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF442e2d59-b9ee-4fc1-b57f-1eede999ed26Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAAhkZj7zYp1QE=Sat,\ - \ 22 Jun 2019 20:13:19 GMT1message1" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - fd4a8253-9003-00c8-6536-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1bc4c398-952a-11e9-9d06-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: DELETE - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages/442e2d59-b9ee-4fc1-b57f-1eede999ed26?popreceipt=AgAAAAMAAAAAAAAAhkZj7zYp1QE%3D - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - fd4a825b-9003-00c8-6c36-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1bcd588c-952a-11e9-895b-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages?numofmessages=32 - response: - body: - string: "\uFEFF4b1f4b61-a5c0-48fa-8473-231196864687Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAA16507zYp1QE=Sat,\ - \ 22 Jun 2019 20:13:19 GMT1message2bc529b8c-9f40-41ef-96f3-354cb25025b7Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAA16507zYp1QE=Sat,\ - \ 22 Jun 2019 20:13:19 GMT1message3635425fc-8557-4a2c-81fb-14a27d8b1c50Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAA16507zYp1QE=Sat,\ - \ 22 Jun 2019 20:13:19 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - fd4a8261-9003-00c8-7236-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dcd5898c-952a-11e9-806a-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:13 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49 - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 0b5f410d-2003-0070-7d37-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dcf60022-952a-11e9-954d-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:13 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF1208b99d-12bd-4073-a3c8-9b0ad6bfdf33Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAASC69njcp1QE=Sat,\ - \ 22 Jun 2019 20:18:14 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 0b5f411d-2003-0070-0a37-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dcff4f9c-952a-11e9-83d3-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF3de1106c-a4cf-4a5f-a7dc-d5f70ad5c8b0Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAAzn7Gnjcp1QE=Sat,\ - \ 22 Jun 2019 20:18:14 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 0b5f412a-2003-0070-1637-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dd08b014-952a-11e9-aee4-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF4ec3ee4b-b0f3-48e9-a5d1-8b7fc1e2180aSat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAA+DLPnjcp1QE=Sat,\ - \ 22 Jun 2019 20:18:14 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 0b5f4137-2003-0070-1f37-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dd11436e-952a-11e9-8240-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFFea4ee1a4-2c09-42d5-bad1-210be95e91c7Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAATzXYnjcp1QE=Sat,\ - \ 22 Jun 2019 20:18:14 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 0b5f4149-2003-0070-2e37-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dd1a7bd2-952a-11e9-95d1-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF1208b99d-12bd-4073-a3c8-9b0ad6bfdf33Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAAkLPCsDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:44 GMT1message1" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 0b5f4151-2003-0070-3637-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dd23aae8-952a-11e9-b0bf-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: DELETE - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages/1208b99d-12bd-4073-a3c8-9b0ad6bfdf33?popreceipt=AgAAAAMAAAAAAAAAkLPCsDcp1QE%3D - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:18:14 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 0b5f4164-2003-0070-4737-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dd2c7de6-952a-11e9-9262-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages?numofmessages=32 - response: - body: - string: "\uFEFF3de1106c-a4cf-4a5f-a7dc-d5f70ad5c8b0Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAAV9/UsDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:44 GMT1message24ec3ee4b-b0f3-48e9-a5d1-8b7fc1e2180aSat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAAV9/UsDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:44 GMT1message3ea4ee1a4-2c09-42d5-bad1-210be95e91c7Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAAV9/UsDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:44 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:14 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 0b5f4172-2003-0070-5337-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 740b52d2-952b-11e9-9d3a-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b7b05c9c-ad96-11e9-ab10-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:44 GMT'] + x-ms-version: ['2018-03-28'] method: PUT uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49 response: - body: - string: '' + body: {string: ''} headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:22:26 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - f5f43da9-6003-0099-3638-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Length: ['0'] + Date: ['Tue, 23 Jul 2019 22:10:44 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [b462afff-6003-00dd-0ba3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message1' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 742c9034-952b-11e9-95de-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b81371ae-ad96-11e9-923b-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages response: - body: - string: "\uFEFF193f415e-aabc-46e0-9209-48d6f7dad682Sat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAxCb0NTgp1QE=Sat,\ - \ 22 Jun 2019 20:22:27 GMT" + body: {string: "\uFEFF8c67a6da-dc58-453c-a32c-2357250782d6Tue, + 23 Jul 2019 22:10:45 GMTTue, 30 Jul 2019 22:10:45 + GMTAgAAAAMAAAAAAAAASa7peaNB1QE=Tue, + 23 Jul 2019 22:10:45 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:26 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - f5f43db1-6003-0099-3a38-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [b462b023-6003-00dd-25a3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message2' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 7435d566-952b-11e9-a739-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b82af13e-ad96-11e9-89e9-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages response: - body: - string: "\uFEFF5b8f5b8c-25ca-42c2-a759-8feeba150f7cSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAGyn9NTgp1QE=Sat,\ - \ 22 Jun 2019 20:22:27 GMT" + body: {string: "\uFEFF53352c13-0ace-4405-a299-848592033386Tue, + 23 Jul 2019 22:10:45 GMTTue, 30 Jul 2019 22:10:45 + GMTAgAAAAMAAAAAAAAA9DX/eaNB1QE=Tue, + 23 Jul 2019 22:10:45 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:26 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - f5f43db7-6003-0099-3f38-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [b462b041-6003-00dd-3fa3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message3' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 743eee58-952b-11e9-8745-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b84060c8-ad96-11e9-89c5-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages response: - body: - string: "\uFEFFd867e71b-a641-4b87-b534-4659d5016cfdSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAcysGNjgp1QE=Sat,\ - \ 22 Jun 2019 20:22:27 GMT" + body: {string: "\uFEFF831f51e4-bdae-46c9-8085-7eb7ddf44022Tue, + 23 Jul 2019 22:10:46 GMTTue, 30 Jul 2019 22:10:46 + GMTAgAAAAMAAAAAAAAAow8TeqNB1QE=Tue, + 23 Jul 2019 22:10:46 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:26 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - f5f43dba-6003-0099-4238-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [b462b055-6003-00dd-51a3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message4' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 74482aa4-952b-11e9-9902-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b85423be-ad96-11e9-ad5e-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:46 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages response: - body: - string: "\uFEFF1cafa96b-c8b4-41b7-8dcf-407fffd8661cSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAA+XsPNjgp1QE=Sat,\ - \ 22 Jun 2019 20:22:27 GMT" + body: {string: "\uFEFF415e7230-45f9-423d-9090-b53936c23314Tue, + 23 Jul 2019 22:10:46 GMTTue, 30 Jul 2019 22:10:46 + GMTAgAAAAMAAAAAAAAAfeUoeqNB1QE=Tue, + 23 Jul 2019 22:10:46 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:26 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - f5f43dbe-6003-0099-4538-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [b462b073-6003-00dd-67a3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: null headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 74515192-952b-11e9-be15-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b86961c6-ad96-11e9-9926-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:46 GMT'] + x-ms-version: ['2018-03-28'] method: GET uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages response: - body: - string: "\uFEFF193f415e-aabc-46e0-9209-48d6f7dad682Sat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAl5b6Rzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:57 GMT1message1" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:27 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - f5f43dbf-6003-0099-4638-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 745b1524-952b-11e9-b3c4-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + body: {string: "\uFEFF8c67a6da-dc58-453c-a32c-2357250782d6Tue, + 23 Jul 2019 22:10:45 GMTTue, 30 Jul 2019 22:10:45 + GMTAgAAAAMAAAAAAAAAA7gajKNB1QE=Tue, + 23 Jul 2019 22:11:16 GMT1message1"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + Vary: [Origin] + x-ms-request-id: [b462b090-6003-00dd-7ca3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b879b574-ad96-11e9-8ec6-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:46 GMT'] + x-ms-version: ['2018-03-28'] method: DELETE - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages/193f415e-aabc-46e0-9209-48d6f7dad682?popreceipt=AgAAAAMAAAAAAAAAl5b6Rzgp1QE%3D + uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages/8c67a6da-dc58-453c-a32c-2357250782d6?popreceipt=AgAAAAMAAAAAAAAAA7gajKNB1QE%3D response: - body: - string: '' + body: {string: ''} headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:22:27 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - f5f43dc3-6003-0099-4a38-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 204 - message: No Content + Content-Length: ['0'] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [b462b0b7-6003-00dd-1ba3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 204, message: No Content} - request: body: null headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 74643122-952b-11e9-b8fb-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:28 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b88a0908-ad96-11e9-9586-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:46 GMT'] + x-ms-version: ['2018-03-28'] method: GET uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages?numofmessages=32 response: - body: - string: "\uFEFF5b8f5b8c-25ca-42c2-a759-8feeba150f7cSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAul4NSDgp1QE=Sat,\ - \ 22 Jun 2019 20:22:58 GMT1message2d867e71b-a641-4b87-b534-4659d5016cfdSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAul4NSDgp1QE=Sat,\ - \ 22 Jun 2019 20:22:58 GMT1message31cafa96b-c8b4-41b7-8dcf-407fffd8661cSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAul4NSDgp1QE=Sat,\ - \ 22 Jun 2019 20:22:58 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:27 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - f5f43dc5-6003-0099-4c38-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - aee1db86-952d-11e9-9f94-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49 - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 24506b4c-4003-00ca-6e3a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af02a3ac-952d-11e9-bdc7-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF914e12cd-da29-4d7f-828a-393828adfbbeSat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAeuTKcDop1QE=Sat,\ - \ 22 Jun 2019 20:38:25 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 24506b5e-4003-00ca-7e3a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af0bd666-952d-11e9-a81d-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFFcd560872-1500-4081-9887-44a67792f515Sat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAzubTcDop1QE=Sat,\ - \ 22 Jun 2019 20:38:25 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 24506b71-4003-00ca-103a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af14a5f4-952d-11e9-bfa3-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFFa047b162-8bd6-4ca3-8393-245d7af6dd90Sat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAA3HPccDop1QE=Sat,\ - \ 22 Jun 2019 20:38:25 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 24506b7f-4003-00ca-1d3a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af1d518c-952d-11e9-bc94-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFFcb60022d-89e1-4c86-afdb-627d48e3250fSat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAAijlcDop1QE=Sat,\ - \ 22 Jun 2019 20:38:25 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 24506b9c-4003-00ca-363a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af261bca-952d-11e9-8a6d-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF914e12cd-da29-4d7f-828a-393828adfbbeSat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAVs3Pgjop1QE=Sat,\ - \ 22 Jun 2019 20:38:55 GMT1message1" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 24506baa-4003-00ca-443a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af2f5190-952d-11e9-a222-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: DELETE - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages/914e12cd-da29-4d7f-828a-393828adfbbe?popreceipt=AgAAAAMAAAAAAAAAVs3Pgjop1QE%3D - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 24506bc9-4003-00ca-5e3a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af389908-952d-11e9-9591-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' + body: {string: "\uFEFF53352c13-0ace-4405-a299-848592033386Tue, + 23 Jul 2019 22:10:45 GMTTue, 30 Jul 2019 22:10:45 + GMTAgAAAAMAAAAAAAAAl689jKNB1QE=Tue, + 23 Jul 2019 22:11:16 GMT1message2831f51e4-bdae-46c9-8085-7eb7ddf44022Tue, + 23 Jul 2019 22:10:46 GMTTue, 30 Jul 2019 22:10:46 + GMTAgAAAAMAAAAAAAAAl689jKNB1QE=Tue, + 23 Jul 2019 22:11:16 GMT1message3415e7230-45f9-423d-9090-b53936c23314Tue, + 23 Jul 2019 22:10:46 GMTTue, 30 Jul 2019 22:10:46 + GMTAgAAAAMAAAAAAAAAl689jKNB1QE=Tue, + 23 Jul 2019 22:11:16 GMT1message4"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + Vary: [Origin] + x-ms-request-id: [b462b0e0-6003-00dd-3da3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b89de61a-ad96-11e9-94f2-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:46 GMT'] + x-ms-version: ['2018-03-28'] method: GET uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages?numofmessages=32 response: - body: - string: "\uFEFFcd560872-1500-4081-9887-44a67792f515Sat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAX27igjop1QE=Sat,\ - \ 22 Jun 2019 20:38:55 GMT1message2a047b162-8bd6-4ca3-8393-245d7af6dd90Sat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAX27igjop1QE=Sat,\ - \ 22 Jun 2019 20:38:55 GMT1message3cb60022d-89e1-4c86-afdb-627d48e3250fSat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAX27igjop1QE=Sat,\ - \ 22 Jun 2019 20:38:55 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 24506bd7-4003-00ca-6b3a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK + body: {string: "\uFEFF"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + Vary: [Origin] + x-ms-request-id: [b462b112-6003-00dd-66a3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 200, message: OK} version: 1 diff --git a/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_get_messages_with_options.yaml b/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_get_messages_with_options.yaml index 4f79ec258033..cb18246850ef 100644 --- a/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_get_messages_with_options.yaml +++ b/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_get_messages_with_options.yaml @@ -2,1121 +2,200 @@ interactions: - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1cb5f240-952a-11e9-8690-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 4ce61f8f-6003-0033-1436-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1cdbdadc-952a-11e9-908b-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFc07a14fe-0248-49ac-84ef-9183eec8c1f9Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAyXih3jYp1QE=Sat,\ - \ 22 Jun 2019 20:12:51 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 4ce61f99-6003-0033-1b36-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1ce4762e-952a-11e9-9f63-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF8c47bcca-e16f-4b92-92b1-15e94379eb52Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAwd6p3jYp1QE=Sat,\ - \ 22 Jun 2019 20:12:51 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 4ce61f9a-6003-0033-1c36-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1cecec34-952a-11e9-a5e2-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFee5ab552-39a9-40a8-ad63-d94e3b486906Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAtESy3jYp1QE=Sat,\ - \ 22 Jun 2019 20:12:51 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 4ce61f9f-6003-0033-2136-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1cf568ee-952a-11e9-bb36-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFd1646c72-1aa6-423b-a070-0cfc5d649668Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAmYO63jYp1QE=Sat,\ - \ 22 Jun 2019 20:12:51 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 4ce61fab-6003-0033-2c36-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1cfd9dfa-952a-11e9-896e-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f/messages?numofmessages=4&visibilitytimeout=20 - response: - body: - string: "\uFEFFc07a14fe-0248-49ac-84ef-9183eec8c1f9Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAkquu6jYp1QE=Sat,\ - \ 22 Jun 2019 20:13:11 GMT1message18c47bcca-e16f-4b92-92b1-15e94379eb52Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAkquu6jYp1QE=Sat,\ - \ 22 Jun 2019 20:13:11 GMT1message2ee5ab552-39a9-40a8-ad63-d94e3b486906Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAkquu6jYp1QE=Sat,\ - \ 22 Jun 2019 20:13:11 GMT1message3d1646c72-1aa6-423b-a070-0cfc5d649668Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAkquu6jYp1QE=Sat,\ - \ 22 Jun 2019 20:13:11 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 4ce61fb4-6003-0033-3536-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de5c3670-952a-11e9-837b-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [eb8b0f92-ad90-11e9-ad43-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + x-ms-version: ['2018-03-28'] method: PUT uri: https://storagename.queue.core.windows.net/pythonqueue6405110f response: - body: - string: '' + body: {string: ''} headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:18:15 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - e1a897ac-1003-0073-2a37-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Length: ['0'] + Date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [ab763224-9003-000f-719d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message1' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de7c09d2-952a-11e9-a68c-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ebe04322-ad90-11e9-90d1-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages response: - body: - string: "\uFEFF4a3e7e24-0f9b-488d-a93e-8f6c52511bd4Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAG91CoDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:16 GMT" + body: {string: "\uFEFF1aea519c-55e7-4613-a635-11e894f3f1cdTue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAiP6wrZ1B1QE=Tue, + 23 Jul 2019 21:29:15 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:16 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - e1a897b4-1003-0073-2e37-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [ab763242-9003-000f-099d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message2' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de8504a6-952a-11e9-b42e-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ebf1ec6c-ad90-11e9-a1a9-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages response: - body: - string: "\uFEFF6382f360-4bb2-4635-bbb0-0a2bdb1bc21bSat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAhwZMoDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:16 GMT" + body: {string: "\uFEFFfcc1b957-6743-4cd8-9a37-561f4e76a694Tue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAtJHArZ1B1QE=Tue, + 23 Jul 2019 21:29:15 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:16 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - e1a897bc-1003-0073-3337-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [ab76324f-9003-000f-159d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message3' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de8e1458-952a-11e9-8ed7-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ec017d92-ad90-11e9-9118-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages response: - body: - string: "\uFEFF4aa83d39-8722-46ab-a654-897fc8ff05b4Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAxOFUoDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:16 GMT" + body: {string: "\uFEFFb6cf0c16-2d49-40fc-93bb-29e45e32ec5bTue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAbA/RrZ1B1QE=Tue, + 23 Jul 2019 21:29:15 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:16 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - e1a897c8-1003-0073-3a37-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [ab76325c-9003-000f-209d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message4' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de96f262-952a-11e9-b5f5-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ec129446-ad90-11e9-9a37-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages response: - body: - string: "\uFEFF5425bc84-4683-47e1-bfe0-f38ddb517178Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAA6ZVdoDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:16 GMT" + body: {string: "\uFEFFee1fb3f0-9d97-49bf-87d6-46e6403847cfTue, + 23 Jul 2019 21:29:16 GMTTue, 30 Jul 2019 21:29:16 + GMTAgAAAAMAAAAAAAAAwPDgrZ1B1QE=Tue, + 23 Jul 2019 21:29:16 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:16 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - e1a897cf-1003-0073-3f37-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [ab76326e-9003-000f-309d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: null headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de9f9886-952a-11e9-bd95-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ec21afd2-ad90-11e9-b00f-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:16 GMT'] + x-ms-version: ['2018-03-28'] method: GET uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages?numofmessages=4&visibilitytimeout=20 response: - body: - string: "\uFEFF4a3e7e24-0f9b-488d-a93e-8f6c52511bd4Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAVYFSrDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:36 GMT1message16382f360-4bb2-4635-bbb0-0a2bdb1bc21bSat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAVYFSrDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:36 GMT1message24aa83d39-8722-46ab-a654-897fc8ff05b4Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAVYFSrDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:36 GMT1message35425bc84-4683-47e1-bfe0-f38ddb517178Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAVYFSrDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:36 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:16 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - e1a897d5-1003-0073-4437-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK + body: {string: "\uFEFF1aea519c-55e7-4613-a635-11e894f3f1cdTue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAXQnduZ1B1QE=Tue, + 23 Jul 2019 21:29:36 GMT1message1fcc1b957-6743-4cd8-9a37-561f4e76a694Tue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAXQnduZ1B1QE=Tue, + 23 Jul 2019 21:29:36 GMT1message2b6cf0c16-2d49-40fc-93bb-29e45e32ec5bTue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAXQnduZ1B1QE=Tue, + 23 Jul 2019 21:29:36 GMT1message3ee1fb3f0-9d97-49bf-87d6-46e6403847cfTue, + 23 Jul 2019 21:29:16 GMTTue, 30 Jul 2019 21:29:16 + GMTAgAAAAMAAAAAAAAAXQnduZ1B1QE=Tue, + 23 Jul 2019 21:29:36 GMT1message4"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:16 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + Vary: [Origin] + x-ms-request-id: [ab763281-9003-000f-3f9d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 200, message: OK} - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 75ccf3fa-952b-11e9-aff5-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 7df02fa6-3003-00ec-1538-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 75ed5910-952b-11e9-be2b-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF75b37bc0-c7e6-48e8-9ce3-94d914932dabSat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAqu20Nzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:30 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 7df02faf-3003-00ec-1b38-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 75f69162-952b-11e9-bff9-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFf4e91262-01c6-48ae-bc09-7af40ee60c6bSat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAA58i9Nzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:30 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 7df02fb3-3003-00ec-1f38-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 75ff663a-952b-11e9-adab-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF7001b035-8d54-406a-82b5-69753b3448e6Sat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAADX3GNzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:30 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 7df02fba-3003-00ec-2638-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 76087c36-952b-11e9-9eae-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF1ab76e0f-1d96-42d7-999c-3accd5230ee2Sat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAYX/PNzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:30 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 7df02fbd-3003-00ec-2938-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 76115afe-952b-11e9-8512-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ec33efd0-ad90-11e9-a453-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:16 GMT'] + x-ms-version: ['2018-03-28'] method: GET uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages?numofmessages=4&visibilitytimeout=20 response: - body: - string: "\uFEFF75b37bc0-c7e6-48e8-9ce3-94d914932dabSat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAtUPEQzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:50 GMT1message1f4e91262-01c6-48ae-bc09-7af40ee60c6bSat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAtUPEQzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:50 GMT1message27001b035-8d54-406a-82b5-69753b3448e6Sat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAtUPEQzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:50 GMT1message31ab76e0f-1d96-42d7-999c-3accd5230ee2Sat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAtUPEQzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:50 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 7df02fc2-3003-00ec-2e38-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b0efd498-952d-11e9-a770-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:28 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - abd1b919-4003-0006-193a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b11061ac-952d-11e9-b8b8-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:28 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFe2a1644d-981b-4c48-8b4c-fc8b539037f3Sat,\ - \ 22 Jun 2019 20:38:28 GMTSat, 29 Jun 2019\ - \ 20:38:28 GMTAgAAAAMAAAAAAAAA2cfYcjop1QE=Sat,\ - \ 22 Jun 2019 20:38:28 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - abd1b924-4003-0006-213a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b1198976-952d-11e9-a7a0-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:28 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF26981b56-716f-4f72-af1e-301773a26c92Sat,\ - \ 22 Jun 2019 20:38:28 GMTSat, 29 Jun 2019\ - \ 20:38:28 GMTAgAAAAMAAAAAAAAAAnzhcjop1QE=Sat,\ - \ 22 Jun 2019 20:38:28 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - abd1b929-4003-0006-263a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b1222c70-952d-11e9-ab5a-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:28 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFdebf68ee-14a5-4669-a34b-3e8092fe04a1Sat,\ - \ 22 Jun 2019 20:38:29 GMTSat, 29 Jun 2019\ - \ 20:38:29 GMTAgAAAAMAAAAAAAAAQ1fqcjop1QE=Sat,\ - \ 22 Jun 2019 20:38:29 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - abd1b932-4003-0006-2d3a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b12b1240-952d-11e9-afa4-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:28 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF103e9ae6-f20c-4d69-aede-b0d740fba873Sat,\ - \ 22 Jun 2019 20:38:29 GMTSat, 29 Jun 2019\ - \ 20:38:29 GMTAgAAAAMAAAAAAAAA+PXzcjop1QE=Sat,\ - \ 22 Jun 2019 20:38:29 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - abd1b93b-4003-0006-343a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b134a7ec-952d-11e9-a776-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:29 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages?numofmessages=4&visibilitytimeout=20 - response: - body: - string: "\uFEFFe2a1644d-981b-4c48-8b4c-fc8b539037f3Sat,\ - \ 22 Jun 2019 20:38:28 GMTSat, 29 Jun 2019\ - \ 20:38:28 GMTAgAAAAMAAAAAAAAAIWzofjop1QE=Sat,\ - \ 22 Jun 2019 20:38:49 GMT1message126981b56-716f-4f72-af1e-301773a26c92Sat,\ - \ 22 Jun 2019 20:38:28 GMTSat, 29 Jun 2019\ - \ 20:38:28 GMTAgAAAAMAAAAAAAAAIWzofjop1QE=Sat,\ - \ 22 Jun 2019 20:38:49 GMT1message2debf68ee-14a5-4669-a34b-3e8092fe04a1Sat,\ - \ 22 Jun 2019 20:38:29 GMTSat, 29 Jun 2019\ - \ 20:38:29 GMTAgAAAAMAAAAAAAAAIWzofjop1QE=Sat,\ - \ 22 Jun 2019 20:38:49 GMT1message3103e9ae6-f20c-4d69-aede-b0d740fba873Sat,\ - \ 22 Jun 2019 20:38:29 GMTSat, 29 Jun 2019\ - \ 20:38:29 GMTAgAAAAMAAAAAAAAAIWzofjop1QE=Sat,\ - \ 22 Jun 2019 20:38:49 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - abd1b940-4003-0006-383a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK + body: {string: "\uFEFF"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:16 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + Vary: [Origin] + x-ms-request-id: [ab763289-9003-000f-479d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 200, message: OK} version: 1 diff --git a/sdk/storage/azure-storage-queue/tests/test_queue.py b/sdk/storage/azure-storage-queue/tests/test_queue.py index 8df7fc472476..1aa1e14536ba 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue.py @@ -158,16 +158,13 @@ def test_list_queues_with_options(self): # Action generator1 = self.qsc.list_queues( name_starts_with=prefix, - results_per_page=3) - next(generator1) - queues1 = generator1.current_page + results_per_page=3).by_page() + queues1 = list(next(generator1)) generator2 = self.qsc.list_queues( name_starts_with=prefix, - marker=generator1.next_marker, - include_metadata=True) - next(generator2) - queues2 = generator2.current_page + include_metadata=True).by_page(generator1.continuation_token) + queues2 = list(next(generator2)) # Asserts self.assertIsNotNone(queues1) @@ -175,6 +172,7 @@ def test_list_queues_with_options(self): self.assertIsNotNone(queues1[0]) self.assertIsNone(queues1[0].metadata) self.assertNotEqual('', queues1[0].name) + assert generator1.location_mode is not None # Asserts self.assertIsNotNone(queues2) self.assertTrue(len(self.test_queues) - 3 <= len(queues2)) @@ -317,14 +315,14 @@ def test_get_messages_with_options(self): queue_client.enqueue_message(u'message2') queue_client.enqueue_message(u'message3') queue_client.enqueue_message(u'message4') - result = queue_client.receive_messages(messages_per_page=4, visibility_timeout=20) - next(result) + pager = queue_client.receive_messages(messages_per_page=4, visibility_timeout=20) + result = list(pager) # Asserts self.assertIsNotNone(result) - self.assertEqual(4, len(result.current_page)) + self.assertEqual(4, len(result)) - for message in result.current_page: + for message in result: self.assertIsNotNone(message) self.assertNotEqual('', message.id) self.assertNotEqual('', message.content) @@ -406,12 +404,12 @@ def test_delete_message(self): message = next(queue_client.receive_messages()) queue_client.delete_message(message) - messages = queue_client.receive_messages(messages_per_page=32) - next(messages) + messages_pager = queue_client.receive_messages(messages_per_page=32) + messages = list(messages_pager) # Asserts - self.assertIsNotNone(messages) - self.assertEqual(3, len(messages.current_page)) + assert messages is not None + assert len(messages) == 3 @record def test_update_message(self): From 50c9a1a064a5a3a0a21fce2a4cf88a31ac3cfe2e Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 15:48:49 -0700 Subject: [PATCH 038/244] get rid of should only propagate (#6497) --- .../pipeline/policies/distributed_tracing.py | 8 +----- sdk/core/azure-core/azure/core/settings.py | 4 --- .../azure-core/azure/core/tracing/common.py | 7 ----- .../azure/core/tracing/decorator.py | 2 +- .../azure/core/tracing/decorator_async.py | 2 +- .../test_tracing_decorator_async.py | 20 -------------- sdk/core/azure-core/tests/test_settings.py | 6 ++--- .../tests/test_tracing_decorator.py | 27 ------------------- .../azure-core/tests/test_tracing_policy.py | 6 +++-- sdk/core/azure-core/tests/tracing_common.py | 6 +---- 10 files changed, 10 insertions(+), 78 deletions(-) diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/distributed_tracing.py b/sdk/core/azure-core/azure/core/pipeline/policies/distributed_tracing.py index 229b7d4380b5..ee6c1a36109f 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/distributed_tracing.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/distributed_tracing.py @@ -77,11 +77,6 @@ def on_request(self, request): if parent_span is None: return - only_propagate = settings.tracing_should_only_propagate() - if only_propagate: - self.set_header(request, parent_span) - return - path = urlparse(request.http_request.url).path if not path: path = "/" @@ -96,8 +91,7 @@ def end_span(self, request, response=None): # type: (HttpRequest, Optional[HttpResponse]) -> None """Ends the span that is tracing the network and updates its status.""" span = tracing_context.current_span.get() # type: AbstractSpan - only_propagate = settings.tracing_should_only_propagate() - if span and not only_propagate: + if span is not None: span.set_http_attributes(request, response=response) request_id = request.headers.get(self._request_id) if request_id is not None: diff --git a/sdk/core/azure-core/azure/core/settings.py b/sdk/core/azure-core/azure/core/settings.py index e1b4c738cdb8..6bc71c9e850c 100644 --- a/sdk/core/azure-core/azure/core/settings.py +++ b/sdk/core/azure-core/azure/core/settings.py @@ -410,9 +410,5 @@ def _config(self, props): # pylint: disable=no-self-use "tracing_implementation", env_var="AZURE_SDK_TRACING_IMPLEMENTATION", convert=convert_tracing_impl, default=None ) - tracing_should_only_propagate = PrioritizedSetting( - "tracing_should_only_propagate", env_var="AZURE_TRACING_ONLY_PROPAGATE", convert=convert_bool, default=False - ) - settings = Settings() diff --git a/sdk/core/azure-core/azure/core/tracing/common.py b/sdk/core/azure-core/azure/core/tracing/common.py index f6e4716a2eb8..b0e425a14d10 100644 --- a/sdk/core/azure-core/azure/core/tracing/common.py +++ b/sdk/core/azure-core/azure/core/tracing/common.py @@ -83,10 +83,3 @@ def get_parent_span(parent_span): ) return parent_span - - -def should_use_trace(parent_span): - # type: (AbstractSpan) -> bool - """Given Parent Span Returns whether the function should be traced""" - only_propagate = settings.tracing_should_only_propagate() - return bool(parent_span and not only_propagate) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 9f647f3333c4..7d5d7bfce407 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if common.should_use_trace(parent_span): + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 1440f86525e2..781e20a6bef2 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if common.should_use_trace(parent_span): + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index 7fb903037d80..8b43ddf71a62 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -149,23 +149,3 @@ async def test_span_with_opencensus_complicated(value): assert parent.children[3].children[1].span_data.name == "MockClient.make_request" children = parent.children[1].children assert len(children) == 2 - - -@pytest.mark.asyncio -async def test_should_only_propagate(): - with ContextHelper(should_only_propagate=True): - exporter = MockExporter() - trace = tracer_module.Tracer(sampler=AlwaysOnSampler(), exporter=exporter) - with trace.start_span(name="OverAll") as parent: - client = MockClient() - await client.make_request(2) - with trace.span("child") as child: - await client.make_request(2, parent_span=parent) - assert OpenCensusSpan.get_current_span() == child - await client.make_request(2) - trace.finish() - exporter.build_tree() - parent = exporter.root - assert len(parent.children) == 1 - assert parent.children[0].span_data.name == "child" - assert not parent.children[0].children diff --git a/sdk/core/azure-core/tests/test_settings.py b/sdk/core/azure-core/tests/test_settings.py index 11e9dc48d523..1975c1adc6f3 100644 --- a/sdk/core/azure-core/tests/test_settings.py +++ b/sdk/core/azure-core/tests/test_settings.py @@ -217,20 +217,18 @@ def test_defaults(self): val = m.settings.defaults # assert isinstance(val, tuple) defaults = m.settings.config( - log_level=20, tracing_enabled=False, tracing_implementation=None, tracing_should_only_propagate=False + log_level=20, tracing_enabled=False, tracing_implementation=None ) assert val.log_level == defaults.log_level assert val.tracing_enabled == defaults.tracing_enabled assert val.tracing_implementation == defaults.tracing_implementation - assert val.tracing_should_only_propagate == defaults.tracing_should_only_propagate os.environ["AZURE_LOG_LEVEL"] = "debug" defaults = m.settings.config( - log_level=20, tracing_enabled=False, tracing_implementation=None, tracing_should_only_propagate=False + log_level=20, tracing_enabled=False, tracing_implementation=None ) assert val.log_level == defaults.log_level assert val.tracing_enabled == defaults.tracing_enabled assert val.tracing_implementation == defaults.tracing_implementation - assert val.tracing_should_only_propagate == defaults.tracing_should_only_propagate del os.environ["AZURE_LOG_LEVEL"] def test_current(self): diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index 873871f5b222..473060f6097a 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -105,15 +105,6 @@ def test_get_parent_span(self): should_be_old_parent = common.get_parent_span(parent.span_instance) assert should_be_old_parent.span_instance == parent.span_instance - def test_should_use_trace(self): - with ContextHelper(environ={"AZURE_TRACING_ONLY_PROPAGATE": "yes"}): - parent_span = OpenCensusSpan() - assert not common.should_use_trace(parent_span) - assert not common.should_use_trace(None) - parent_span = OpenCensusSpan() - assert common.should_use_trace(parent_span) - assert not common.should_use_trace(None) - class TestDecorator(object): def test_decorator_has_different_name(self): @@ -190,21 +181,3 @@ def test_span_with_opencensus_complicated(self, value): assert parent.children[3].children[1].span_data.name == "MockClient.make_request" children = parent.children[1].children assert len(children) == 2 - - def test_should_only_propagate(self): - with ContextHelper(should_only_propagate=True): - exporter = MockExporter() - trace = tracer_module.Tracer(sampler=AlwaysOnSampler(), exporter=exporter) - with trace.start_span(name="OverAll") as parent: - client = MockClient() - client.make_request(2) - with trace.span("child") as child: - client.make_request(2, parent_span=parent) - assert OpenCensusSpan.get_current_span() == child - client.make_request(2) - trace.finish() - exporter.build_tree() - parent = exporter.root - assert len(parent.children) == 1 - assert parent.children[0].span_data.name == "child" - assert not parent.children[0].children diff --git a/sdk/core/azure-core/tests/test_tracing_policy.py b/sdk/core/azure-core/tests/test_tracing_policy.py index 450baa2f4f1e..be7e1adf98e9 100644 --- a/sdk/core/azure-core/tests/test_tracing_policy.py +++ b/sdk/core/azure-core/tests/test_tracing_policy.py @@ -72,13 +72,15 @@ def test_distributed_tracing_policy_solo(should_set_sdk_context): assert network_span.span_data.attributes.get("http.status_code") == 504 -def test_distributed_tracing_policy_with_user_agent(): +@pytest.mark.parametrize("should_set_sdk_context", [True, False]) +def test_distributed_tracing_policy_with_user_agent(should_set_sdk_context): """Test policy working with user agent.""" with ContextHelper(environ={"AZURE_HTTP_USER_AGENT": "mytools"}): exporter = MockExporter() trace = tracer_module.Tracer(sampler=AlwaysOnSampler(), exporter=exporter) with trace.span("parent"): - tracing_context.current_span.set(OpenCensusSpan(trace.current_span())) + if should_set_sdk_context: + tracing_context.current_span.set(OpenCensusSpan(trace.current_span())) policy = DistributedTracingPolicy() request = HttpRequest("GET", "http://127.0.0.1") diff --git a/sdk/core/azure-core/tests/tracing_common.py b/sdk/core/azure-core/tests/tracing_common.py index 18f9b4e9f839..7fecf1d746f8 100644 --- a/sdk/core/azure-core/tests/tracing_common.py +++ b/sdk/core/azure-core/tests/tracing_common.py @@ -22,13 +22,12 @@ class ContextHelper(object): - def __init__(self, environ={}, tracer_to_use=None, should_only_propagate=None): + def __init__(self, environ={}, tracer_to_use=None): self.orig_tracer = OpenCensusSpan.get_current_tracer() self.orig_current_span = OpenCensusSpan.get_current_span() self.orig_sdk_context_span = tracing_context.current_span.get() self.os_env = mock.patch.dict(os.environ, environ) self.tracer_to_use = tracer_to_use - self.should_only_propagate = should_only_propagate def __enter__(self): self.orig_tracer = OpenCensusSpan.get_current_tracer() @@ -38,8 +37,6 @@ def __enter__(self): tracing_context.current_span.clear() if self.tracer_to_use is not None: settings.tracing_implementation.set_value(self.tracer_to_use) - if self.should_only_propagate is not None: - settings.tracing_should_only_propagate.set_value(self.should_only_propagate) self.os_env.start() execution_context.clear() tracing_context.current_span.clear() @@ -50,7 +47,6 @@ def __exit__(self, exc_type, exc_val, exc_tb): OpenCensusSpan.set_current_span(self.orig_current_span) tracing_context.current_span.set(self.orig_sdk_context_span) settings.tracing_implementation.unset_value() - settings.tracing_should_only_propagate.unset_value() self.os_env.stop() From 971ccb53e4a3f1029ea41eeab4b8ed98a2b4b6ee Mon Sep 17 00:00:00 2001 From: Dan Schulte Date: Thu, 25 Jul 2019 18:49:01 -0700 Subject: [PATCH 039/244] Enable SDK Automation pull requests (#6498) --- swagger_to_sdk_config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swagger_to_sdk_config.json b/swagger_to_sdk_config.json index 4bad085c48f9..bae8c63cefa0 100644 --- a/swagger_to_sdk_config.json +++ b/swagger_to_sdk_config.json @@ -1,5 +1,5 @@ { - "$schema": "https://openapistoragetest.blob.core.windows.net/sdkautomation/test/schemas/swagger_to_sdk_config.schema.json", + "$schema": "https://openapistorageprod.blob.core.windows.net/sdkautomation/prod/schemas/swagger_to_sdk_config.schema.json", "meta": { "autorest_options": { "version": "preview", From ee6b512610a08ad40b7b589006340c5e051b9639 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 26 Jul 2019 02:57:37 -0700 Subject: [PATCH 040/244] [AutoPR] devtestlabs/resource-manager (#6414) * [AutoPR devtestlabs/resource-manager] [Hub Generated] Review request for Microsoft.DevTestLab to add version stable/2018-09-15 (#6359) * Generated from c64177b58d5905986be6a16e270986ccfad08d25 Modification of PATCH description, plus minor fixes * Packaging update of azure-mgmt-devtestlabs * Generated from c2786532a6bf80ceb9cddda5e2c8b8abc09d6b30 Update specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/DTL.json Co-Authored-By: Nick Schonning * modified history and version * Added general breaking changes note * fixed indentation --- .../azure-mgmt-devtestlabs/HISTORY.rst | 19 + .../azure-mgmt-devtestlabs/MANIFEST.in | 1 + .../azure-mgmt-devtestlabs/README.rst | 2 +- .../azure/mgmt/devtestlabs/__init__.py | 7 +- .../azure/mgmt/devtestlabs/_configuration.py | 48 + ...abs_client.py => _dev_test_labs_client.py} | 86 +- .../azure/mgmt/devtestlabs/models/__init__.py | 744 ++- ...nums.py => _dev_test_labs_client_enums.py} | 2 + .../azure/mgmt/devtestlabs/models/_models.py | 5702 +++++++++++++++++ .../mgmt/devtestlabs/models/_models_py3.py | 5702 +++++++++++++++++ .../mgmt/devtestlabs/models/_paged_models.py | 261 + .../devtestlabs/models/applicable_schedule.py | 59 - .../models/applicable_schedule_fragment.py | 38 - .../applicable_schedule_fragment_py3.py | 38 - .../models/applicable_schedule_py3.py | 59 - .../models/apply_artifacts_request.py | 29 - .../models/apply_artifacts_request_py3.py | 29 - .../mgmt/devtestlabs/models/arm_template.py | 90 - .../devtestlabs/models/arm_template_info.py | 32 - .../models/arm_template_info_py3.py | 32 - .../devtestlabs/models/arm_template_paged.py | 27 - .../arm_template_parameter_properties.py | 32 - ..._template_parameter_properties_fragment.py | 32 - ...plate_parameter_properties_fragment_py3.py | 32 - .../arm_template_parameter_properties_py3.py | 32 - .../devtestlabs/models/arm_template_py3.py | 90 - .../azure/mgmt/devtestlabs/models/artifact.py | 88 - .../artifact_deployment_status_properties.py | 38 - ...t_deployment_status_properties_fragment.py | 38 - ...ployment_status_properties_fragment_py3.py | 38 - ...tifact_deployment_status_properties_py3.py | 38 - .../models/artifact_install_properties.py | 55 - .../artifact_install_properties_fragment.py | 55 - ...rtifact_install_properties_fragment_py3.py | 55 - .../models/artifact_install_properties_py3.py | 55 - .../mgmt/devtestlabs/models/artifact_paged.py | 27 - .../models/artifact_parameter_properties.py | 32 - .../artifact_parameter_properties_fragment.py | 32 - ...ifact_parameter_properties_fragment_py3.py | 32 - .../artifact_parameter_properties_py3.py | 32 - .../mgmt/devtestlabs/models/artifact_py3.py | 88 - .../devtestlabs/models/artifact_source.py | 100 - .../models/artifact_source_fragment.py | 63 - .../models/artifact_source_fragment_py3.py | 63 - .../models/artifact_source_paged.py | 27 - .../devtestlabs/models/artifact_source_py3.py | 100 - .../models/attach_disk_properties.py | 29 - .../models/attach_disk_properties_py3.py | 29 - .../models/attach_new_data_disk_options.py | 37 - .../attach_new_data_disk_options_fragment.py | 37 - ...tach_new_data_disk_options_fragment_py3.py | 37 - .../attach_new_data_disk_options_py3.py | 37 - .../models/bulk_creation_parameters.py | 28 - .../bulk_creation_parameters_fragment.py | 28 - .../bulk_creation_parameters_fragment_py3.py | 28 - .../models/bulk_creation_parameters_py3.py | 28 - .../devtestlabs/models/compute_data_disk.py | 41 - .../models/compute_data_disk_fragment.py | 41 - .../models/compute_data_disk_fragment_py3.py | 41 - .../models/compute_data_disk_py3.py | 41 - .../models/compute_vm_instance_view_status.py | 36 - ...ompute_vm_instance_view_status_fragment.py | 36 - ...te_vm_instance_view_status_fragment_py3.py | 36 - .../compute_vm_instance_view_status_py3.py | 36 - .../models/compute_vm_properties.py | 54 - .../models/compute_vm_properties_fragment.py | 55 - .../compute_vm_properties_fragment_py3.py | 55 - .../models/compute_vm_properties_py3.py | 54 - .../models/cost_threshold_properties.py | 51 - .../models/cost_threshold_properties_py3.py | 51 - .../mgmt/devtestlabs/models/custom_image.py | 106 - .../models/custom_image_fragment.py | 71 - .../models/custom_image_fragment_py3.py | 71 - .../devtestlabs/models/custom_image_paged.py | 27 - .../models/custom_image_properties_custom.py | 43 - ...custom_image_properties_custom_fragment.py | 37 - ...om_image_properties_custom_fragment_py3.py | 37 - .../custom_image_properties_custom_py3.py | 43 - .../custom_image_properties_from_plan.py | 38 - ...tom_image_properties_from_plan_fragment.py | 38 - ...image_properties_from_plan_fragment_py3.py | 38 - .../custom_image_properties_from_plan_py3.py | 38 - .../models/custom_image_properties_from_vm.py | 36 - ...ustom_image_properties_from_vm_fragment.py | 37 - ...m_image_properties_from_vm_fragment_py3.py | 37 - .../custom_image_properties_from_vm_py3.py | 36 - .../devtestlabs/models/custom_image_py3.py | 106 - .../models/data_disk_properties.py | 41 - .../models/data_disk_properties_fragment.py | 41 - .../data_disk_properties_fragment_py3.py | 41 - .../models/data_disk_properties_py3.py | 41 - .../models/data_disk_storage_type_info.py | 33 - .../data_disk_storage_type_info_fragment.py | 33 - ...ata_disk_storage_type_info_fragment_py3.py | 33 - .../models/data_disk_storage_type_info_py3.py | 33 - .../mgmt/devtestlabs/models/day_details.py | 28 - .../models/day_details_fragment.py | 28 - .../models/day_details_fragment_py3.py | 28 - .../devtestlabs/models/day_details_py3.py | 28 - .../models/detach_data_disk_properties.py | 29 - .../models/detach_data_disk_properties_py3.py | 29 - .../models/detach_disk_properties.py | 29 - .../models/detach_disk_properties_py3.py | 29 - .../azure/mgmt/devtestlabs/models/disk.py | 97 - .../mgmt/devtestlabs/models/disk_fragment.py | 60 - .../devtestlabs/models/disk_fragment_py3.py | 60 - .../mgmt/devtestlabs/models/disk_paged.py | 27 - .../azure/mgmt/devtestlabs/models/disk_py3.py | 97 - .../devtestlabs/models/dtl_environment.py | 81 - .../models/dtl_environment_fragment.py | 38 - .../models/dtl_environment_fragment_py3.py | 38 - .../models/dtl_environment_paged.py | 27 - .../devtestlabs/models/dtl_environment_py3.py | 81 - .../environment_deployment_properties.py | 33 - ...ironment_deployment_properties_fragment.py | 33 - ...ment_deployment_properties_fragment_py3.py | 33 - .../environment_deployment_properties_py3.py | 33 - .../models/evaluate_policies_properties.py | 40 - .../evaluate_policies_properties_py3.py | 40 - .../models/evaluate_policies_request.py | 29 - .../models/evaluate_policies_request_py3.py | 29 - .../models/evaluate_policies_response.py | 28 - .../models/evaluate_policies_response_py3.py | 28 - .../azure/mgmt/devtestlabs/models/event.py | 30 - .../mgmt/devtestlabs/models/event_fragment.py | 30 - .../devtestlabs/models/event_fragment_py3.py | 30 - .../mgmt/devtestlabs/models/event_py3.py | 30 - .../export_resource_usage_parameters.py | 35 - .../export_resource_usage_parameters_py3.py | 35 - .../devtestlabs/models/external_subnet.py | 32 - .../models/external_subnet_fragment.py | 32 - .../models/external_subnet_fragment_py3.py | 32 - .../devtestlabs/models/external_subnet_py3.py | 32 - .../azure/mgmt/devtestlabs/models/formula.py | 85 - .../devtestlabs/models/formula_fragment.py | 48 - .../models/formula_fragment_py3.py | 48 - .../mgmt/devtestlabs/models/formula_paged.py | 27 - .../models/formula_properties_from_vm.py | 29 - .../formula_properties_from_vm_fragment.py | 29 - ...formula_properties_from_vm_fragment_py3.py | 29 - .../models/formula_properties_from_vm_py3.py | 29 - .../mgmt/devtestlabs/models/formula_py3.py | 85 - .../mgmt/devtestlabs/models/gallery_image.py | 83 - .../devtestlabs/models/gallery_image_paged.py | 27 - .../devtestlabs/models/gallery_image_py3.py | 83 - .../models/gallery_image_reference.py | 44 - .../gallery_image_reference_fragment.py | 44 - .../gallery_image_reference_fragment_py3.py | 44 - .../models/gallery_image_reference_py3.py | 44 - .../models/generate_arm_template_request.py | 43 - .../generate_arm_template_request_py3.py | 43 - .../models/generate_upload_uri_parameter.py | 28 - .../generate_upload_uri_parameter_py3.py | 28 - .../models/generate_upload_uri_response.py | 28 - .../generate_upload_uri_response_py3.py | 28 - .../mgmt/devtestlabs/models/hour_details.py | 28 - .../models/hour_details_fragment.py | 28 - .../models/hour_details_fragment_py3.py | 28 - .../devtestlabs/models/hour_details_py3.py | 28 - .../devtestlabs/models/identity_properties.py | 40 - .../models/identity_properties_py3.py | 40 - .../import_lab_virtual_machine_request.py | 35 - .../import_lab_virtual_machine_request_py3.py | 35 - .../devtestlabs/models/inbound_nat_rule.py | 42 - .../models/inbound_nat_rule_fragment.py | 42 - .../models/inbound_nat_rule_fragment_py3.py | 42 - .../models/inbound_nat_rule_py3.py | 42 - .../azure/mgmt/devtestlabs/models/lab.py | 165 - .../models/lab_announcement_properties.py | 64 - .../lab_announcement_properties_fragment.py | 47 - ...ab_announcement_properties_fragment_py3.py | 47 - .../models/lab_announcement_properties_py3.py | 64 - .../azure/mgmt/devtestlabs/models/lab_cost.py | 97 - .../models/lab_cost_details_properties.py | 37 - .../models/lab_cost_details_properties_py3.py | 37 - .../mgmt/devtestlabs/models/lab_cost_py3.py | 97 - .../models/lab_cost_summary_properties.py | 28 - .../models/lab_cost_summary_properties_py3.py | 28 - .../mgmt/devtestlabs/models/lab_fragment.py | 78 - .../devtestlabs/models/lab_fragment_py3.py | 78 - .../mgmt/devtestlabs/models/lab_paged.py | 27 - .../azure/mgmt/devtestlabs/models/lab_py3.py | 165 - .../models/lab_resource_cost_properties.py | 63 - .../lab_resource_cost_properties_py3.py | 63 - .../models/lab_support_properties.py | 34 - .../models/lab_support_properties_fragment.py | 34 - .../lab_support_properties_fragment_py3.py | 34 - .../models/lab_support_properties_py3.py | 34 - .../azure/mgmt/devtestlabs/models/lab_vhd.py | 28 - .../mgmt/devtestlabs/models/lab_vhd_paged.py | 27 - .../mgmt/devtestlabs/models/lab_vhd_py3.py | 28 - .../devtestlabs/models/lab_virtual_machine.py | 221 - .../lab_virtual_machine_creation_parameter.py | 192 - ...ual_machine_creation_parameter_fragment.py | 192 - ...machine_creation_parameter_fragment_py3.py | 192 - ..._virtual_machine_creation_parameter_py3.py | 192 - .../models/lab_virtual_machine_fragment.py | 177 - .../lab_virtual_machine_fragment_py3.py | 177 - .../models/lab_virtual_machine_paged.py | 27 - .../models/lab_virtual_machine_py3.py | 221 - .../mgmt/devtestlabs/models/linux_os_info.py | 30 - .../models/linux_os_info_fragment.py | 30 - .../models/linux_os_info_fragment_py3.py | 30 - .../devtestlabs/models/linux_os_info_py3.py | 30 - .../models/network_interface_properties.py | 65 - .../network_interface_properties_fragment.py | 65 - ...twork_interface_properties_fragment_py3.py | 65 - .../network_interface_properties_py3.py | 65 - .../models/notification_channel.py | 86 - .../models/notification_channel_fragment.py | 49 - .../notification_channel_fragment_py3.py | 49 - .../models/notification_channel_paged.py | 27 - .../models/notification_channel_py3.py | 86 - .../models/notification_settings.py | 49 - .../models/notification_settings_fragment.py | 49 - .../notification_settings_fragment_py3.py | 49 - .../models/notification_settings_py3.py | 49 - .../devtestlabs/models/notify_parameters.py | 34 - .../models/notify_parameters_py3.py | 34 - .../devtestlabs/models/operation_error.py | 32 - .../devtestlabs/models/operation_error_py3.py | 32 - .../devtestlabs/models/operation_metadata.py | 32 - .../models/operation_metadata_display.py | 41 - .../models/operation_metadata_display_py3.py | 41 - .../models/operation_metadata_paged.py | 27 - .../models/operation_metadata_py3.py | 32 - .../devtestlabs/models/operation_result.py | 48 - .../models/operation_result_py3.py | 48 - .../mgmt/devtestlabs/models/parameter_info.py | 32 - .../devtestlabs/models/parameter_info_py3.py | 32 - .../models/parameters_value_file_info.py | 32 - .../models/parameters_value_file_info_py3.py | 32 - .../percentage_cost_threshold_properties.py | 28 - ...ercentage_cost_threshold_properties_py3.py | 28 - .../azure/mgmt/devtestlabs/models/policy.py | 97 - .../devtestlabs/models/policy_fragment.py | 60 - .../devtestlabs/models/policy_fragment_py3.py | 60 - .../mgmt/devtestlabs/models/policy_paged.py | 27 - .../mgmt/devtestlabs/models/policy_py3.py | 97 - .../devtestlabs/models/policy_set_result.py | 34 - .../models/policy_set_result_py3.py | 34 - .../devtestlabs/models/policy_violation.py | 32 - .../models/policy_violation_py3.py | 32 - .../azure/mgmt/devtestlabs/models/port.py | 34 - .../mgmt/devtestlabs/models/port_fragment.py | 34 - .../devtestlabs/models/port_fragment_py3.py | 34 - .../azure/mgmt/devtestlabs/models/port_py3.py | 34 - .../mgmt/devtestlabs/models/rdp_connection.py | 28 - .../devtestlabs/models/rdp_connection_py3.py | 28 - .../resize_lab_virtual_machine_properties.py | 28 - ...size_lab_virtual_machine_properties_py3.py | 28 - .../azure/mgmt/devtestlabs/models/resource.py | 53 - .../mgmt/devtestlabs/models/resource_py3.py | 53 - .../models/retarget_schedule_properties.py | 34 - .../retarget_schedule_properties_py3.py | 34 - .../azure/mgmt/devtestlabs/models/schedule.py | 102 - .../models/schedule_creation_parameter.py | 74 - .../schedule_creation_parameter_fragment.py | 76 - ...chedule_creation_parameter_fragment_py3.py | 76 - .../models/schedule_creation_parameter_py3.py | 74 - .../devtestlabs/models/schedule_fragment.py | 67 - .../models/schedule_fragment_py3.py | 67 - .../mgmt/devtestlabs/models/schedule_paged.py | 27 - .../mgmt/devtestlabs/models/schedule_py3.py | 102 - .../azure/mgmt/devtestlabs/models/secret.py | 63 - .../devtestlabs/models/secret_fragment.py | 31 - .../devtestlabs/models/secret_fragment_py3.py | 31 - .../mgmt/devtestlabs/models/secret_paged.py | 27 - .../mgmt/devtestlabs/models/secret_py3.py | 63 - .../mgmt/devtestlabs/models/service_fabric.py | 76 - .../models/service_fabric_fragment.py | 37 - .../models/service_fabric_fragment_py3.py | 37 - .../models/service_fabric_paged.py | 27 - .../devtestlabs/models/service_fabric_py3.py | 76 - .../mgmt/devtestlabs/models/service_runner.py | 52 - .../models/service_runner_paged.py | 27 - .../devtestlabs/models/service_runner_py3.py | 52 - .../shared_public_ip_address_configuration.py | 30 - ...ublic_ip_address_configuration_fragment.py | 30 - ...c_ip_address_configuration_fragment_py3.py | 30 - ...red_public_ip_address_configuration_py3.py | 30 - .../models/shutdown_notification_content.py | 78 - .../shutdown_notification_content_py3.py | 78 - .../azure/mgmt/devtestlabs/models/subnet.py | 39 - .../devtestlabs/models/subnet_fragment.py | 39 - .../devtestlabs/models/subnet_fragment_py3.py | 39 - .../devtestlabs/models/subnet_override.py | 57 - .../models/subnet_override_fragment.py | 57 - .../models/subnet_override_fragment_py3.py | 57 - .../devtestlabs/models/subnet_override_py3.py | 57 - .../mgmt/devtestlabs/models/subnet_py3.py | 39 - ..._shared_public_ip_address_configuration.py | 29 - ...ublic_ip_address_configuration_fragment.py | 29 - ...c_ip_address_configuration_fragment_py3.py | 29 - ...red_public_ip_address_configuration_py3.py | 29 - .../models/target_cost_properties.py | 51 - .../models/target_cost_properties_py3.py | 51 - .../devtestlabs/models/update_resource.py | 28 - .../devtestlabs/models/update_resource_py3.py | 28 - .../azure/mgmt/devtestlabs/models/user.py | 72 - .../mgmt/devtestlabs/models/user_fragment.py | 35 - .../devtestlabs/models/user_fragment_py3.py | 35 - .../mgmt/devtestlabs/models/user_identity.py | 49 - .../models/user_identity_fragment.py | 49 - .../models/user_identity_fragment_py3.py | 49 - .../devtestlabs/models/user_identity_py3.py | 49 - .../mgmt/devtestlabs/models/user_paged.py | 27 - .../azure/mgmt/devtestlabs/models/user_py3.py | 72 - .../devtestlabs/models/user_secret_store.py | 32 - .../models/user_secret_store_fragment.py | 32 - .../models/user_secret_store_fragment_py3.py | 32 - .../models/user_secret_store_py3.py | 32 - .../devtestlabs/models/virtual_network.py | 88 - .../models/virtual_network_fragment.py | 45 - .../models/virtual_network_fragment_py3.py | 45 - .../models/virtual_network_paged.py | 27 - .../devtestlabs/models/virtual_network_py3.py | 88 - .../mgmt/devtestlabs/models/week_details.py | 33 - .../models/week_details_fragment.py | 33 - .../models/week_details_fragment_py3.py | 33 - .../devtestlabs/models/week_details_py3.py | 33 - .../devtestlabs/models/windows_os_info.py | 31 - .../models/windows_os_info_fragment.py | 31 - .../models/windows_os_info_fragment_py3.py | 31 - .../devtestlabs/models/windows_os_info_py3.py | 31 - .../mgmt/devtestlabs/operations/__init__.py | 50 +- ...ations.py => _arm_templates_operations.py} | 19 +- ...ons.py => _artifact_sources_operations.py} | 22 +- ...operations.py => _artifacts_operations.py} | 18 +- ...sts_operations.py => _costs_operations.py} | 4 +- ...ations.py => _custom_images_operations.py} | 21 +- ...sks_operations.py => _disks_operations.py} | 20 +- ...rations.py => _environments_operations.py} | 21 +- ..._operations.py => _formulas_operations.py} | 23 +- ...tions.py => _gallery_images_operations.py} | 16 +- ...ons.py => _global_schedules_operations.py} | 36 +- ...labs_operations.py => _labs_operations.py} | 49 +- ...y => _notification_channels_operations.py} | 34 +- .../{operations.py => _operations.py} | 3 +- ..._operations.py => _policies_operations.py} | 22 +- ...erations.py => _policy_sets_operations.py} | 3 +- ..._operations.py => _provider_operations.py} | 16 +- ...operations.py => _schedules_operations.py} | 36 +- ...s_operations.py => _secrets_operations.py} | 20 +- ...> _service_fabric_schedules_operations.py} | 34 +- ...ions.py => _service_fabrics_operations.py} | 38 +- ...ions.py => _service_runners_operations.py} | 91 +- ...ers_operations.py => _users_operations.py} | 21 +- ... _virtual_machine_schedules_operations.py} | 22 +- ...ons.py => _virtual_machines_operations.py} | 25 +- ...ons.py => _virtual_networks_operations.py} | 21 +- .../azure/mgmt/devtestlabs/version.py | 2 +- .../azure-mgmt-devtestlabs/setup.py | 2 +- 353 files changed, 12470 insertions(+), 16125 deletions(-) create mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_configuration.py rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/{dev_test_labs_client.py => _dev_test_labs_client.py} (72%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/{dev_test_labs_client_enums.py => _dev_test_labs_client_enums.py} (98%) create mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models.py create mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models_py3.py create mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_paged_models.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_py3.py rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{arm_templates_operations.py => _arm_templates_operations.py} (95%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{artifact_sources_operations.py => _artifact_sources_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{artifacts_operations.py => _artifacts_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{costs_operations.py => _costs_operations.py} (98%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{custom_images_operations.py => _custom_images_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{disks_operations.py => _disks_operations.py} (98%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{environments_operations.py => _environments_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{formulas_operations.py => _formulas_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{gallery_images_operations.py => _gallery_images_operations.py} (93%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{global_schedules_operations.py => _global_schedules_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{labs_operations.py => _labs_operations.py} (98%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{notification_channels_operations.py => _notification_channels_operations.py} (96%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{operations.py => _operations.py} (96%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{policies_operations.py => _policies_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{policy_sets_operations.py => _policy_sets_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{provider_operations.py => _provider_operations.py} (90%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{schedules_operations.py => _schedules_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{secrets_operations.py => _secrets_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{service_fabric_schedules_operations.py => _service_fabric_schedules_operations.py} (96%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{service_fabrics_operations.py => _service_fabrics_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{service_runners_operations.py => _service_runners_operations.py} (71%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{users_operations.py => _users_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{virtual_machine_schedules_operations.py => _virtual_machine_schedules_operations.py} (98%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{virtual_machines_operations.py => _virtual_machines_operations.py} (99%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{virtual_networks_operations.py => _virtual_networks_operations.py} (97%) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/HISTORY.rst b/sdk/devtestlabs/azure-mgmt-devtestlabs/HISTORY.rst index ca00766f84e0..bfb266aba9c4 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/HISTORY.rst +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/HISTORY.rst @@ -3,6 +3,25 @@ Release History =============== +4.0.0 (2019-07-26) +++++++++++++++++++ + +**Breaking changes** + +- Removed operation ServiceRunnersOperations.list + +**General breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes if from some import. +In summary, some modules were incorrectly visible/importable and have been renamed. This fixed several issues caused by usage of classes that were not supposed to be used in the first place. + +- DevTestLabsClient cannot be imported from `azure.mgmt.devtestlabs.dev_test_labs_management_client` anymore (import from `azure.mgmt.devtestlabs` works like before) +- DevTestLabsManagementClientConfiguration import has been moved from `azure.mgmt.devtestlabs.dev_test_labs_management_client` to `azure.mgmt.devtestlabs` +- A model `MyClass` from a "models" sub-module cannot be imported anymore using `azure.mgmt.devtestlabs.models.my_class` (import from `azure.mgmt.devtestlabs.models` works like before) +- An operation class `MyClassOperations` from an `operations` sub-module cannot be imported anymore using `azure.mgmt.devtestlabs.operations.my_class_operations` (import from `azure.mgmt.devtestlabs.operations` works like before) + +Last but not least, HTTP connection pooling is now enabled by default. You should always use a client as a context manager, or call close(), or use no more than one client per process. + 3.0.0 (2019-02-07) ++++++++++++++++++ diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/MANIFEST.in b/sdk/devtestlabs/azure-mgmt-devtestlabs/MANIFEST.in index 6ceb27f7a96e..e4884efef41b 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/MANIFEST.in +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/MANIFEST.in @@ -1,3 +1,4 @@ +recursive-include tests *.py *.yaml include *.rst include azure/__init__.py include azure/mgmt/__init__.py diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/README.rst b/sdk/devtestlabs/azure-mgmt-devtestlabs/README.rst index 3b266c6e0f32..7863788f2412 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/README.rst +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure DevTestLabs Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/__init__.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/__init__.py index 18ce91ae3337..a60396771701 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/__init__.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .dev_test_labs_client import DevTestLabsClient -from .version import VERSION +from ._configuration import DevTestLabsClientConfiguration +from ._dev_test_labs_client import DevTestLabsClient +__all__ = ['DevTestLabsClient', 'DevTestLabsClientConfiguration'] -__all__ = ['DevTestLabsClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_configuration.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_configuration.py new file mode 100644 index 000000000000..ad4e6c48fb8d --- /dev/null +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_configuration.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class DevTestLabsClientConfiguration(AzureConfiguration): + """Configuration for DevTestLabsClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(DevTestLabsClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-devtestlabs/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/dev_test_labs_client.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_dev_test_labs_client.py similarity index 72% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/dev_test_labs_client.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_dev_test_labs_client.py index 74bdf0ef0fdc..aa051d2d128d 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/dev_test_labs_client.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_dev_test_labs_client.py @@ -11,66 +11,34 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.provider_operations import ProviderOperations -from .operations.labs_operations import LabsOperations -from .operations.operations import Operations -from .operations.global_schedules_operations import GlobalSchedulesOperations -from .operations.artifact_sources_operations import ArtifactSourcesOperations -from .operations.arm_templates_operations import ArmTemplatesOperations -from .operations.artifacts_operations import ArtifactsOperations -from .operations.costs_operations import CostsOperations -from .operations.custom_images_operations import CustomImagesOperations -from .operations.formulas_operations import FormulasOperations -from .operations.gallery_images_operations import GalleryImagesOperations -from .operations.notification_channels_operations import NotificationChannelsOperations -from .operations.policy_sets_operations import PolicySetsOperations -from .operations.policies_operations import PoliciesOperations -from .operations.schedules_operations import SchedulesOperations -from .operations.service_runners_operations import ServiceRunnersOperations -from .operations.users_operations import UsersOperations -from .operations.disks_operations import DisksOperations -from .operations.environments_operations import EnvironmentsOperations -from .operations.secrets_operations import SecretsOperations -from .operations.service_fabrics_operations import ServiceFabricsOperations -from .operations.service_fabric_schedules_operations import ServiceFabricSchedulesOperations -from .operations.virtual_machines_operations import VirtualMachinesOperations -from .operations.virtual_machine_schedules_operations import VirtualMachineSchedulesOperations -from .operations.virtual_networks_operations import VirtualNetworksOperations -from . import models - - -class DevTestLabsClientConfiguration(AzureConfiguration): - """Configuration for DevTestLabsClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(DevTestLabsClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-devtestlabs/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import DevTestLabsClientConfiguration +from .operations import ProviderOperations +from .operations import LabsOperations +from .operations import Operations +from .operations import GlobalSchedulesOperations +from .operations import ArtifactSourcesOperations +from .operations import ArmTemplatesOperations +from .operations import ArtifactsOperations +from .operations import CostsOperations +from .operations import CustomImagesOperations +from .operations import FormulasOperations +from .operations import GalleryImagesOperations +from .operations import NotificationChannelsOperations +from .operations import PolicySetsOperations +from .operations import PoliciesOperations +from .operations import SchedulesOperations +from .operations import ServiceRunnersOperations +from .operations import UsersOperations +from .operations import DisksOperations +from .operations import EnvironmentsOperations +from .operations import SecretsOperations +from .operations import ServiceFabricsOperations +from .operations import ServiceFabricSchedulesOperations +from .operations import VirtualMachinesOperations +from .operations import VirtualMachineSchedulesOperations +from .operations import VirtualNetworksOperations +from . import models class DevTestLabsClient(SDKClient): diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py index 56d0fd0fe73f..1bb40772c367 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py @@ -10,322 +10,321 @@ # -------------------------------------------------------------------------- try: - from .week_details_py3 import WeekDetails - from .day_details_py3 import DayDetails - from .hour_details_py3 import HourDetails - from .notification_settings_py3 import NotificationSettings - from .schedule_py3 import Schedule - from .applicable_schedule_py3 import ApplicableSchedule - from .week_details_fragment_py3 import WeekDetailsFragment - from .day_details_fragment_py3 import DayDetailsFragment - from .hour_details_fragment_py3 import HourDetailsFragment - from .notification_settings_fragment_py3 import NotificationSettingsFragment - from .schedule_fragment_py3 import ScheduleFragment - from .applicable_schedule_fragment_py3 import ApplicableScheduleFragment - from .artifact_parameter_properties_py3 import ArtifactParameterProperties - from .artifact_install_properties_py3 import ArtifactInstallProperties - from .apply_artifacts_request_py3 import ApplyArtifactsRequest - from .parameters_value_file_info_py3 import ParametersValueFileInfo - from .arm_template_py3 import ArmTemplate - from .arm_template_info_py3 import ArmTemplateInfo - from .arm_template_parameter_properties_py3 import ArmTemplateParameterProperties - from .arm_template_parameter_properties_fragment_py3 import ArmTemplateParameterPropertiesFragment - from .artifact_py3 import Artifact - from .artifact_deployment_status_properties_py3 import ArtifactDeploymentStatusProperties - from .artifact_deployment_status_properties_fragment_py3 import ArtifactDeploymentStatusPropertiesFragment - from .artifact_parameter_properties_fragment_py3 import ArtifactParameterPropertiesFragment - from .artifact_install_properties_fragment_py3 import ArtifactInstallPropertiesFragment - from .artifact_source_py3 import ArtifactSource - from .artifact_source_fragment_py3 import ArtifactSourceFragment - from .attach_disk_properties_py3 import AttachDiskProperties - from .attach_new_data_disk_options_py3 import AttachNewDataDiskOptions - from .attach_new_data_disk_options_fragment_py3 import AttachNewDataDiskOptionsFragment - from .bulk_creation_parameters_py3 import BulkCreationParameters - from .bulk_creation_parameters_fragment_py3 import BulkCreationParametersFragment - from .compute_data_disk_py3 import ComputeDataDisk - from .compute_data_disk_fragment_py3 import ComputeDataDiskFragment - from .compute_vm_instance_view_status_py3 import ComputeVmInstanceViewStatus - from .compute_vm_instance_view_status_fragment_py3 import ComputeVmInstanceViewStatusFragment - from .compute_vm_properties_py3 import ComputeVmProperties - from .compute_vm_properties_fragment_py3 import ComputeVmPropertiesFragment - from .percentage_cost_threshold_properties_py3 import PercentageCostThresholdProperties - from .cost_threshold_properties_py3 import CostThresholdProperties - from .windows_os_info_py3 import WindowsOsInfo - from .linux_os_info_py3 import LinuxOsInfo - from .custom_image_properties_from_vm_py3 import CustomImagePropertiesFromVm - from .custom_image_properties_custom_py3 import CustomImagePropertiesCustom - from .data_disk_storage_type_info_py3 import DataDiskStorageTypeInfo - from .custom_image_properties_from_plan_py3 import CustomImagePropertiesFromPlan - from .custom_image_py3 import CustomImage - from .windows_os_info_fragment_py3 import WindowsOsInfoFragment - from .linux_os_info_fragment_py3 import LinuxOsInfoFragment - from .custom_image_properties_from_vm_fragment_py3 import CustomImagePropertiesFromVmFragment - from .custom_image_properties_custom_fragment_py3 import CustomImagePropertiesCustomFragment - from .data_disk_storage_type_info_fragment_py3 import DataDiskStorageTypeInfoFragment - from .custom_image_properties_from_plan_fragment_py3 import CustomImagePropertiesFromPlanFragment - from .custom_image_fragment_py3 import CustomImageFragment - from .data_disk_properties_py3 import DataDiskProperties - from .data_disk_properties_fragment_py3 import DataDiskPropertiesFragment - from .detach_data_disk_properties_py3 import DetachDataDiskProperties - from .detach_disk_properties_py3 import DetachDiskProperties - from .disk_py3 import Disk - from .disk_fragment_py3 import DiskFragment - from .environment_deployment_properties_py3 import EnvironmentDeploymentProperties - from .dtl_environment_py3 import DtlEnvironment - from .environment_deployment_properties_fragment_py3 import EnvironmentDeploymentPropertiesFragment - from .dtl_environment_fragment_py3 import DtlEnvironmentFragment - from .evaluate_policies_properties_py3 import EvaluatePoliciesProperties - from .evaluate_policies_request_py3 import EvaluatePoliciesRequest - from .policy_violation_py3 import PolicyViolation - from .policy_set_result_py3 import PolicySetResult - from .evaluate_policies_response_py3 import EvaluatePoliciesResponse - from .event_py3 import Event - from .event_fragment_py3 import EventFragment - from .export_resource_usage_parameters_py3 import ExportResourceUsageParameters - from .external_subnet_py3 import ExternalSubnet - from .external_subnet_fragment_py3 import ExternalSubnetFragment - from .gallery_image_reference_py3 import GalleryImageReference - from .inbound_nat_rule_py3 import InboundNatRule - from .shared_public_ip_address_configuration_py3 import SharedPublicIpAddressConfiguration - from .network_interface_properties_py3 import NetworkInterfaceProperties - from .schedule_creation_parameter_py3 import ScheduleCreationParameter - from .lab_virtual_machine_creation_parameter_py3 import LabVirtualMachineCreationParameter - from .formula_properties_from_vm_py3 import FormulaPropertiesFromVm - from .formula_py3 import Formula - from .gallery_image_reference_fragment_py3 import GalleryImageReferenceFragment - from .inbound_nat_rule_fragment_py3 import InboundNatRuleFragment - from .shared_public_ip_address_configuration_fragment_py3 import SharedPublicIpAddressConfigurationFragment - from .network_interface_properties_fragment_py3 import NetworkInterfacePropertiesFragment - from .schedule_creation_parameter_fragment_py3 import ScheduleCreationParameterFragment - from .lab_virtual_machine_creation_parameter_fragment_py3 import LabVirtualMachineCreationParameterFragment - from .formula_properties_from_vm_fragment_py3 import FormulaPropertiesFromVmFragment - from .formula_fragment_py3 import FormulaFragment - from .gallery_image_py3 import GalleryImage - from .parameter_info_py3 import ParameterInfo - from .generate_arm_template_request_py3 import GenerateArmTemplateRequest - from .generate_upload_uri_parameter_py3 import GenerateUploadUriParameter - from .generate_upload_uri_response_py3 import GenerateUploadUriResponse - from .identity_properties_py3 import IdentityProperties - from .import_lab_virtual_machine_request_py3 import ImportLabVirtualMachineRequest - from .lab_announcement_properties_py3 import LabAnnouncementProperties - from .lab_support_properties_py3 import LabSupportProperties - from .lab_py3 import Lab - from .lab_announcement_properties_fragment_py3 import LabAnnouncementPropertiesFragment - from .target_cost_properties_py3 import TargetCostProperties - from .lab_cost_summary_properties_py3 import LabCostSummaryProperties - from .lab_cost_details_properties_py3 import LabCostDetailsProperties - from .lab_resource_cost_properties_py3 import LabResourceCostProperties - from .lab_cost_py3 import LabCost - from .lab_support_properties_fragment_py3 import LabSupportPropertiesFragment - from .lab_fragment_py3 import LabFragment - from .lab_vhd_py3 import LabVhd - from .lab_virtual_machine_py3 import LabVirtualMachine - from .lab_virtual_machine_fragment_py3 import LabVirtualMachineFragment - from .notification_channel_py3 import NotificationChannel - from .notification_channel_fragment_py3 import NotificationChannelFragment - from .notify_parameters_py3 import NotifyParameters - from .operation_error_py3 import OperationError - from .operation_metadata_display_py3 import OperationMetadataDisplay - from .operation_metadata_py3 import OperationMetadata - from .operation_result_py3 import OperationResult - from .policy_py3 import Policy - from .policy_fragment_py3 import PolicyFragment - from .port_py3 import Port - from .port_fragment_py3 import PortFragment - from .rdp_connection_py3 import RdpConnection - from .resize_lab_virtual_machine_properties_py3 import ResizeLabVirtualMachineProperties - from .resource_py3 import Resource - from .retarget_schedule_properties_py3 import RetargetScheduleProperties - from .secret_py3 import Secret - from .secret_fragment_py3 import SecretFragment - from .service_fabric_py3 import ServiceFabric - from .service_fabric_fragment_py3 import ServiceFabricFragment - from .service_runner_py3 import ServiceRunner - from .shutdown_notification_content_py3 import ShutdownNotificationContent - from .subnet_py3 import Subnet - from .subnet_fragment_py3 import SubnetFragment - from .subnet_shared_public_ip_address_configuration_py3 import SubnetSharedPublicIpAddressConfiguration - from .subnet_override_py3 import SubnetOverride - from .subnet_shared_public_ip_address_configuration_fragment_py3 import SubnetSharedPublicIpAddressConfigurationFragment - from .subnet_override_fragment_py3 import SubnetOverrideFragment - from .update_resource_py3 import UpdateResource - from .user_identity_py3 import UserIdentity - from .user_secret_store_py3 import UserSecretStore - from .user_py3 import User - from .user_identity_fragment_py3 import UserIdentityFragment - from .user_secret_store_fragment_py3 import UserSecretStoreFragment - from .user_fragment_py3 import UserFragment - from .virtual_network_py3 import VirtualNetwork - from .virtual_network_fragment_py3 import VirtualNetworkFragment + from ._models_py3 import ApplicableSchedule + from ._models_py3 import ApplicableScheduleFragment + from ._models_py3 import ApplyArtifactsRequest + from ._models_py3 import ArmTemplate + from ._models_py3 import ArmTemplateInfo + from ._models_py3 import ArmTemplateParameterProperties + from ._models_py3 import ArmTemplateParameterPropertiesFragment + from ._models_py3 import Artifact + from ._models_py3 import ArtifactDeploymentStatusProperties + from ._models_py3 import ArtifactDeploymentStatusPropertiesFragment + from ._models_py3 import ArtifactInstallProperties + from ._models_py3 import ArtifactInstallPropertiesFragment + from ._models_py3 import ArtifactParameterProperties + from ._models_py3 import ArtifactParameterPropertiesFragment + from ._models_py3 import ArtifactSource + from ._models_py3 import ArtifactSourceFragment + from ._models_py3 import AttachDiskProperties + from ._models_py3 import AttachNewDataDiskOptions + from ._models_py3 import AttachNewDataDiskOptionsFragment + from ._models_py3 import BulkCreationParameters + from ._models_py3 import BulkCreationParametersFragment + from ._models_py3 import ComputeDataDisk + from ._models_py3 import ComputeDataDiskFragment + from ._models_py3 import ComputeVmInstanceViewStatus + from ._models_py3 import ComputeVmInstanceViewStatusFragment + from ._models_py3 import ComputeVmProperties + from ._models_py3 import ComputeVmPropertiesFragment + from ._models_py3 import CostThresholdProperties + from ._models_py3 import CustomImage + from ._models_py3 import CustomImageFragment + from ._models_py3 import CustomImagePropertiesCustom + from ._models_py3 import CustomImagePropertiesCustomFragment + from ._models_py3 import CustomImagePropertiesFromPlan + from ._models_py3 import CustomImagePropertiesFromPlanFragment + from ._models_py3 import CustomImagePropertiesFromVm + from ._models_py3 import CustomImagePropertiesFromVmFragment + from ._models_py3 import DataDiskProperties + from ._models_py3 import DataDiskPropertiesFragment + from ._models_py3 import DataDiskStorageTypeInfo + from ._models_py3 import DataDiskStorageTypeInfoFragment + from ._models_py3 import DayDetails + from ._models_py3 import DayDetailsFragment + from ._models_py3 import DetachDataDiskProperties + from ._models_py3 import DetachDiskProperties + from ._models_py3 import Disk + from ._models_py3 import DiskFragment + from ._models_py3 import DtlEnvironment + from ._models_py3 import DtlEnvironmentFragment + from ._models_py3 import EnvironmentDeploymentProperties + from ._models_py3 import EnvironmentDeploymentPropertiesFragment + from ._models_py3 import EvaluatePoliciesProperties + from ._models_py3 import EvaluatePoliciesRequest + from ._models_py3 import EvaluatePoliciesResponse + from ._models_py3 import Event + from ._models_py3 import EventFragment + from ._models_py3 import ExportResourceUsageParameters + from ._models_py3 import ExternalSubnet + from ._models_py3 import ExternalSubnetFragment + from ._models_py3 import Formula + from ._models_py3 import FormulaFragment + from ._models_py3 import FormulaPropertiesFromVm + from ._models_py3 import FormulaPropertiesFromVmFragment + from ._models_py3 import GalleryImage + from ._models_py3 import GalleryImageReference + from ._models_py3 import GalleryImageReferenceFragment + from ._models_py3 import GenerateArmTemplateRequest + from ._models_py3 import GenerateUploadUriParameter + from ._models_py3 import GenerateUploadUriResponse + from ._models_py3 import HourDetails + from ._models_py3 import HourDetailsFragment + from ._models_py3 import IdentityProperties + from ._models_py3 import ImportLabVirtualMachineRequest + from ._models_py3 import InboundNatRule + from ._models_py3 import InboundNatRuleFragment + from ._models_py3 import Lab + from ._models_py3 import LabAnnouncementProperties + from ._models_py3 import LabAnnouncementPropertiesFragment + from ._models_py3 import LabCost + from ._models_py3 import LabCostDetailsProperties + from ._models_py3 import LabCostSummaryProperties + from ._models_py3 import LabFragment + from ._models_py3 import LabResourceCostProperties + from ._models_py3 import LabSupportProperties + from ._models_py3 import LabSupportPropertiesFragment + from ._models_py3 import LabVhd + from ._models_py3 import LabVirtualMachine + from ._models_py3 import LabVirtualMachineCreationParameter + from ._models_py3 import LabVirtualMachineCreationParameterFragment + from ._models_py3 import LabVirtualMachineFragment + from ._models_py3 import LinuxOsInfo + from ._models_py3 import LinuxOsInfoFragment + from ._models_py3 import NetworkInterfaceProperties + from ._models_py3 import NetworkInterfacePropertiesFragment + from ._models_py3 import NotificationChannel + from ._models_py3 import NotificationChannelFragment + from ._models_py3 import NotificationSettings + from ._models_py3 import NotificationSettingsFragment + from ._models_py3 import NotifyParameters + from ._models_py3 import OperationError + from ._models_py3 import OperationMetadata + from ._models_py3 import OperationMetadataDisplay + from ._models_py3 import OperationResult + from ._models_py3 import ParameterInfo + from ._models_py3 import ParametersValueFileInfo + from ._models_py3 import PercentageCostThresholdProperties + from ._models_py3 import Policy + from ._models_py3 import PolicyFragment + from ._models_py3 import PolicySetResult + from ._models_py3 import PolicyViolation + from ._models_py3 import Port + from ._models_py3 import PortFragment + from ._models_py3 import RdpConnection + from ._models_py3 import ResizeLabVirtualMachineProperties + from ._models_py3 import Resource + from ._models_py3 import RetargetScheduleProperties + from ._models_py3 import Schedule + from ._models_py3 import ScheduleCreationParameter + from ._models_py3 import ScheduleCreationParameterFragment + from ._models_py3 import ScheduleFragment + from ._models_py3 import Secret + from ._models_py3 import SecretFragment + from ._models_py3 import ServiceFabric + from ._models_py3 import ServiceFabricFragment + from ._models_py3 import ServiceRunner + from ._models_py3 import SharedPublicIpAddressConfiguration + from ._models_py3 import SharedPublicIpAddressConfigurationFragment + from ._models_py3 import ShutdownNotificationContent + from ._models_py3 import Subnet + from ._models_py3 import SubnetFragment + from ._models_py3 import SubnetOverride + from ._models_py3 import SubnetOverrideFragment + from ._models_py3 import SubnetSharedPublicIpAddressConfiguration + from ._models_py3 import SubnetSharedPublicIpAddressConfigurationFragment + from ._models_py3 import TargetCostProperties + from ._models_py3 import UpdateResource + from ._models_py3 import User + from ._models_py3 import UserFragment + from ._models_py3 import UserIdentity + from ._models_py3 import UserIdentityFragment + from ._models_py3 import UserSecretStore + from ._models_py3 import UserSecretStoreFragment + from ._models_py3 import VirtualNetwork + from ._models_py3 import VirtualNetworkFragment + from ._models_py3 import WeekDetails + from ._models_py3 import WeekDetailsFragment + from ._models_py3 import WindowsOsInfo + from ._models_py3 import WindowsOsInfoFragment except (SyntaxError, ImportError): - from .week_details import WeekDetails - from .day_details import DayDetails - from .hour_details import HourDetails - from .notification_settings import NotificationSettings - from .schedule import Schedule - from .applicable_schedule import ApplicableSchedule - from .week_details_fragment import WeekDetailsFragment - from .day_details_fragment import DayDetailsFragment - from .hour_details_fragment import HourDetailsFragment - from .notification_settings_fragment import NotificationSettingsFragment - from .schedule_fragment import ScheduleFragment - from .applicable_schedule_fragment import ApplicableScheduleFragment - from .artifact_parameter_properties import ArtifactParameterProperties - from .artifact_install_properties import ArtifactInstallProperties - from .apply_artifacts_request import ApplyArtifactsRequest - from .parameters_value_file_info import ParametersValueFileInfo - from .arm_template import ArmTemplate - from .arm_template_info import ArmTemplateInfo - from .arm_template_parameter_properties import ArmTemplateParameterProperties - from .arm_template_parameter_properties_fragment import ArmTemplateParameterPropertiesFragment - from .artifact import Artifact - from .artifact_deployment_status_properties import ArtifactDeploymentStatusProperties - from .artifact_deployment_status_properties_fragment import ArtifactDeploymentStatusPropertiesFragment - from .artifact_parameter_properties_fragment import ArtifactParameterPropertiesFragment - from .artifact_install_properties_fragment import ArtifactInstallPropertiesFragment - from .artifact_source import ArtifactSource - from .artifact_source_fragment import ArtifactSourceFragment - from .attach_disk_properties import AttachDiskProperties - from .attach_new_data_disk_options import AttachNewDataDiskOptions - from .attach_new_data_disk_options_fragment import AttachNewDataDiskOptionsFragment - from .bulk_creation_parameters import BulkCreationParameters - from .bulk_creation_parameters_fragment import BulkCreationParametersFragment - from .compute_data_disk import ComputeDataDisk - from .compute_data_disk_fragment import ComputeDataDiskFragment - from .compute_vm_instance_view_status import ComputeVmInstanceViewStatus - from .compute_vm_instance_view_status_fragment import ComputeVmInstanceViewStatusFragment - from .compute_vm_properties import ComputeVmProperties - from .compute_vm_properties_fragment import ComputeVmPropertiesFragment - from .percentage_cost_threshold_properties import PercentageCostThresholdProperties - from .cost_threshold_properties import CostThresholdProperties - from .windows_os_info import WindowsOsInfo - from .linux_os_info import LinuxOsInfo - from .custom_image_properties_from_vm import CustomImagePropertiesFromVm - from .custom_image_properties_custom import CustomImagePropertiesCustom - from .data_disk_storage_type_info import DataDiskStorageTypeInfo - from .custom_image_properties_from_plan import CustomImagePropertiesFromPlan - from .custom_image import CustomImage - from .windows_os_info_fragment import WindowsOsInfoFragment - from .linux_os_info_fragment import LinuxOsInfoFragment - from .custom_image_properties_from_vm_fragment import CustomImagePropertiesFromVmFragment - from .custom_image_properties_custom_fragment import CustomImagePropertiesCustomFragment - from .data_disk_storage_type_info_fragment import DataDiskStorageTypeInfoFragment - from .custom_image_properties_from_plan_fragment import CustomImagePropertiesFromPlanFragment - from .custom_image_fragment import CustomImageFragment - from .data_disk_properties import DataDiskProperties - from .data_disk_properties_fragment import DataDiskPropertiesFragment - from .detach_data_disk_properties import DetachDataDiskProperties - from .detach_disk_properties import DetachDiskProperties - from .disk import Disk - from .disk_fragment import DiskFragment - from .environment_deployment_properties import EnvironmentDeploymentProperties - from .dtl_environment import DtlEnvironment - from .environment_deployment_properties_fragment import EnvironmentDeploymentPropertiesFragment - from .dtl_environment_fragment import DtlEnvironmentFragment - from .evaluate_policies_properties import EvaluatePoliciesProperties - from .evaluate_policies_request import EvaluatePoliciesRequest - from .policy_violation import PolicyViolation - from .policy_set_result import PolicySetResult - from .evaluate_policies_response import EvaluatePoliciesResponse - from .event import Event - from .event_fragment import EventFragment - from .export_resource_usage_parameters import ExportResourceUsageParameters - from .external_subnet import ExternalSubnet - from .external_subnet_fragment import ExternalSubnetFragment - from .gallery_image_reference import GalleryImageReference - from .inbound_nat_rule import InboundNatRule - from .shared_public_ip_address_configuration import SharedPublicIpAddressConfiguration - from .network_interface_properties import NetworkInterfaceProperties - from .schedule_creation_parameter import ScheduleCreationParameter - from .lab_virtual_machine_creation_parameter import LabVirtualMachineCreationParameter - from .formula_properties_from_vm import FormulaPropertiesFromVm - from .formula import Formula - from .gallery_image_reference_fragment import GalleryImageReferenceFragment - from .inbound_nat_rule_fragment import InboundNatRuleFragment - from .shared_public_ip_address_configuration_fragment import SharedPublicIpAddressConfigurationFragment - from .network_interface_properties_fragment import NetworkInterfacePropertiesFragment - from .schedule_creation_parameter_fragment import ScheduleCreationParameterFragment - from .lab_virtual_machine_creation_parameter_fragment import LabVirtualMachineCreationParameterFragment - from .formula_properties_from_vm_fragment import FormulaPropertiesFromVmFragment - from .formula_fragment import FormulaFragment - from .gallery_image import GalleryImage - from .parameter_info import ParameterInfo - from .generate_arm_template_request import GenerateArmTemplateRequest - from .generate_upload_uri_parameter import GenerateUploadUriParameter - from .generate_upload_uri_response import GenerateUploadUriResponse - from .identity_properties import IdentityProperties - from .import_lab_virtual_machine_request import ImportLabVirtualMachineRequest - from .lab_announcement_properties import LabAnnouncementProperties - from .lab_support_properties import LabSupportProperties - from .lab import Lab - from .lab_announcement_properties_fragment import LabAnnouncementPropertiesFragment - from .target_cost_properties import TargetCostProperties - from .lab_cost_summary_properties import LabCostSummaryProperties - from .lab_cost_details_properties import LabCostDetailsProperties - from .lab_resource_cost_properties import LabResourceCostProperties - from .lab_cost import LabCost - from .lab_support_properties_fragment import LabSupportPropertiesFragment - from .lab_fragment import LabFragment - from .lab_vhd import LabVhd - from .lab_virtual_machine import LabVirtualMachine - from .lab_virtual_machine_fragment import LabVirtualMachineFragment - from .notification_channel import NotificationChannel - from .notification_channel_fragment import NotificationChannelFragment - from .notify_parameters import NotifyParameters - from .operation_error import OperationError - from .operation_metadata_display import OperationMetadataDisplay - from .operation_metadata import OperationMetadata - from .operation_result import OperationResult - from .policy import Policy - from .policy_fragment import PolicyFragment - from .port import Port - from .port_fragment import PortFragment - from .rdp_connection import RdpConnection - from .resize_lab_virtual_machine_properties import ResizeLabVirtualMachineProperties - from .resource import Resource - from .retarget_schedule_properties import RetargetScheduleProperties - from .secret import Secret - from .secret_fragment import SecretFragment - from .service_fabric import ServiceFabric - from .service_fabric_fragment import ServiceFabricFragment - from .service_runner import ServiceRunner - from .shutdown_notification_content import ShutdownNotificationContent - from .subnet import Subnet - from .subnet_fragment import SubnetFragment - from .subnet_shared_public_ip_address_configuration import SubnetSharedPublicIpAddressConfiguration - from .subnet_override import SubnetOverride - from .subnet_shared_public_ip_address_configuration_fragment import SubnetSharedPublicIpAddressConfigurationFragment - from .subnet_override_fragment import SubnetOverrideFragment - from .update_resource import UpdateResource - from .user_identity import UserIdentity - from .user_secret_store import UserSecretStore - from .user import User - from .user_identity_fragment import UserIdentityFragment - from .user_secret_store_fragment import UserSecretStoreFragment - from .user_fragment import UserFragment - from .virtual_network import VirtualNetwork - from .virtual_network_fragment import VirtualNetworkFragment -from .operation_metadata_paged import OperationMetadataPaged -from .lab_paged import LabPaged -from .lab_vhd_paged import LabVhdPaged -from .schedule_paged import SchedulePaged -from .artifact_source_paged import ArtifactSourcePaged -from .arm_template_paged import ArmTemplatePaged -from .artifact_paged import ArtifactPaged -from .custom_image_paged import CustomImagePaged -from .formula_paged import FormulaPaged -from .gallery_image_paged import GalleryImagePaged -from .notification_channel_paged import NotificationChannelPaged -from .policy_paged import PolicyPaged -from .service_runner_paged import ServiceRunnerPaged -from .user_paged import UserPaged -from .disk_paged import DiskPaged -from .dtl_environment_paged import DtlEnvironmentPaged -from .secret_paged import SecretPaged -from .service_fabric_paged import ServiceFabricPaged -from .lab_virtual_machine_paged import LabVirtualMachinePaged -from .virtual_network_paged import VirtualNetworkPaged -from .dev_test_labs_client_enums import ( + from ._models import ApplicableSchedule + from ._models import ApplicableScheduleFragment + from ._models import ApplyArtifactsRequest + from ._models import ArmTemplate + from ._models import ArmTemplateInfo + from ._models import ArmTemplateParameterProperties + from ._models import ArmTemplateParameterPropertiesFragment + from ._models import Artifact + from ._models import ArtifactDeploymentStatusProperties + from ._models import ArtifactDeploymentStatusPropertiesFragment + from ._models import ArtifactInstallProperties + from ._models import ArtifactInstallPropertiesFragment + from ._models import ArtifactParameterProperties + from ._models import ArtifactParameterPropertiesFragment + from ._models import ArtifactSource + from ._models import ArtifactSourceFragment + from ._models import AttachDiskProperties + from ._models import AttachNewDataDiskOptions + from ._models import AttachNewDataDiskOptionsFragment + from ._models import BulkCreationParameters + from ._models import BulkCreationParametersFragment + from ._models import ComputeDataDisk + from ._models import ComputeDataDiskFragment + from ._models import ComputeVmInstanceViewStatus + from ._models import ComputeVmInstanceViewStatusFragment + from ._models import ComputeVmProperties + from ._models import ComputeVmPropertiesFragment + from ._models import CostThresholdProperties + from ._models import CustomImage + from ._models import CustomImageFragment + from ._models import CustomImagePropertiesCustom + from ._models import CustomImagePropertiesCustomFragment + from ._models import CustomImagePropertiesFromPlan + from ._models import CustomImagePropertiesFromPlanFragment + from ._models import CustomImagePropertiesFromVm + from ._models import CustomImagePropertiesFromVmFragment + from ._models import DataDiskProperties + from ._models import DataDiskPropertiesFragment + from ._models import DataDiskStorageTypeInfo + from ._models import DataDiskStorageTypeInfoFragment + from ._models import DayDetails + from ._models import DayDetailsFragment + from ._models import DetachDataDiskProperties + from ._models import DetachDiskProperties + from ._models import Disk + from ._models import DiskFragment + from ._models import DtlEnvironment + from ._models import DtlEnvironmentFragment + from ._models import EnvironmentDeploymentProperties + from ._models import EnvironmentDeploymentPropertiesFragment + from ._models import EvaluatePoliciesProperties + from ._models import EvaluatePoliciesRequest + from ._models import EvaluatePoliciesResponse + from ._models import Event + from ._models import EventFragment + from ._models import ExportResourceUsageParameters + from ._models import ExternalSubnet + from ._models import ExternalSubnetFragment + from ._models import Formula + from ._models import FormulaFragment + from ._models import FormulaPropertiesFromVm + from ._models import FormulaPropertiesFromVmFragment + from ._models import GalleryImage + from ._models import GalleryImageReference + from ._models import GalleryImageReferenceFragment + from ._models import GenerateArmTemplateRequest + from ._models import GenerateUploadUriParameter + from ._models import GenerateUploadUriResponse + from ._models import HourDetails + from ._models import HourDetailsFragment + from ._models import IdentityProperties + from ._models import ImportLabVirtualMachineRequest + from ._models import InboundNatRule + from ._models import InboundNatRuleFragment + from ._models import Lab + from ._models import LabAnnouncementProperties + from ._models import LabAnnouncementPropertiesFragment + from ._models import LabCost + from ._models import LabCostDetailsProperties + from ._models import LabCostSummaryProperties + from ._models import LabFragment + from ._models import LabResourceCostProperties + from ._models import LabSupportProperties + from ._models import LabSupportPropertiesFragment + from ._models import LabVhd + from ._models import LabVirtualMachine + from ._models import LabVirtualMachineCreationParameter + from ._models import LabVirtualMachineCreationParameterFragment + from ._models import LabVirtualMachineFragment + from ._models import LinuxOsInfo + from ._models import LinuxOsInfoFragment + from ._models import NetworkInterfaceProperties + from ._models import NetworkInterfacePropertiesFragment + from ._models import NotificationChannel + from ._models import NotificationChannelFragment + from ._models import NotificationSettings + from ._models import NotificationSettingsFragment + from ._models import NotifyParameters + from ._models import OperationError + from ._models import OperationMetadata + from ._models import OperationMetadataDisplay + from ._models import OperationResult + from ._models import ParameterInfo + from ._models import ParametersValueFileInfo + from ._models import PercentageCostThresholdProperties + from ._models import Policy + from ._models import PolicyFragment + from ._models import PolicySetResult + from ._models import PolicyViolation + from ._models import Port + from ._models import PortFragment + from ._models import RdpConnection + from ._models import ResizeLabVirtualMachineProperties + from ._models import Resource + from ._models import RetargetScheduleProperties + from ._models import Schedule + from ._models import ScheduleCreationParameter + from ._models import ScheduleCreationParameterFragment + from ._models import ScheduleFragment + from ._models import Secret + from ._models import SecretFragment + from ._models import ServiceFabric + from ._models import ServiceFabricFragment + from ._models import ServiceRunner + from ._models import SharedPublicIpAddressConfiguration + from ._models import SharedPublicIpAddressConfigurationFragment + from ._models import ShutdownNotificationContent + from ._models import Subnet + from ._models import SubnetFragment + from ._models import SubnetOverride + from ._models import SubnetOverrideFragment + from ._models import SubnetSharedPublicIpAddressConfiguration + from ._models import SubnetSharedPublicIpAddressConfigurationFragment + from ._models import TargetCostProperties + from ._models import UpdateResource + from ._models import User + from ._models import UserFragment + from ._models import UserIdentity + from ._models import UserIdentityFragment + from ._models import UserSecretStore + from ._models import UserSecretStoreFragment + from ._models import VirtualNetwork + from ._models import VirtualNetworkFragment + from ._models import WeekDetails + from ._models import WeekDetailsFragment + from ._models import WindowsOsInfo + from ._models import WindowsOsInfoFragment +from ._paged_models import ArmTemplatePaged +from ._paged_models import ArtifactPaged +from ._paged_models import ArtifactSourcePaged +from ._paged_models import CustomImagePaged +from ._paged_models import DiskPaged +from ._paged_models import DtlEnvironmentPaged +from ._paged_models import FormulaPaged +from ._paged_models import GalleryImagePaged +from ._paged_models import LabPaged +from ._paged_models import LabVhdPaged +from ._paged_models import LabVirtualMachinePaged +from ._paged_models import NotificationChannelPaged +from ._paged_models import OperationMetadataPaged +from ._paged_models import PolicyPaged +from ._paged_models import SchedulePaged +from ._paged_models import SecretPaged +from ._paged_models import ServiceFabricPaged +from ._paged_models import UserPaged +from ._paged_models import VirtualNetworkPaged +from ._dev_test_labs_client_enums import ( EnableStatus, SourceControlType, StorageType, @@ -351,22 +350,9 @@ ) __all__ = [ - 'WeekDetails', - 'DayDetails', - 'HourDetails', - 'NotificationSettings', - 'Schedule', 'ApplicableSchedule', - 'WeekDetailsFragment', - 'DayDetailsFragment', - 'HourDetailsFragment', - 'NotificationSettingsFragment', - 'ScheduleFragment', 'ApplicableScheduleFragment', - 'ArtifactParameterProperties', - 'ArtifactInstallProperties', 'ApplyArtifactsRequest', - 'ParametersValueFileInfo', 'ArmTemplate', 'ArmTemplateInfo', 'ArmTemplateParameterProperties', @@ -374,8 +360,10 @@ 'Artifact', 'ArtifactDeploymentStatusProperties', 'ArtifactDeploymentStatusPropertiesFragment', - 'ArtifactParameterPropertiesFragment', + 'ArtifactInstallProperties', 'ArtifactInstallPropertiesFragment', + 'ArtifactParameterProperties', + 'ArtifactParameterPropertiesFragment', 'ArtifactSource', 'ArtifactSourceFragment', 'AttachDiskProperties', @@ -389,115 +377,126 @@ 'ComputeVmInstanceViewStatusFragment', 'ComputeVmProperties', 'ComputeVmPropertiesFragment', - 'PercentageCostThresholdProperties', 'CostThresholdProperties', - 'WindowsOsInfo', - 'LinuxOsInfo', - 'CustomImagePropertiesFromVm', - 'CustomImagePropertiesCustom', - 'DataDiskStorageTypeInfo', - 'CustomImagePropertiesFromPlan', 'CustomImage', - 'WindowsOsInfoFragment', - 'LinuxOsInfoFragment', - 'CustomImagePropertiesFromVmFragment', + 'CustomImageFragment', + 'CustomImagePropertiesCustom', 'CustomImagePropertiesCustomFragment', - 'DataDiskStorageTypeInfoFragment', + 'CustomImagePropertiesFromPlan', 'CustomImagePropertiesFromPlanFragment', - 'CustomImageFragment', + 'CustomImagePropertiesFromVm', + 'CustomImagePropertiesFromVmFragment', 'DataDiskProperties', 'DataDiskPropertiesFragment', + 'DataDiskStorageTypeInfo', + 'DataDiskStorageTypeInfoFragment', + 'DayDetails', + 'DayDetailsFragment', 'DetachDataDiskProperties', 'DetachDiskProperties', 'Disk', 'DiskFragment', - 'EnvironmentDeploymentProperties', 'DtlEnvironment', - 'EnvironmentDeploymentPropertiesFragment', 'DtlEnvironmentFragment', + 'EnvironmentDeploymentProperties', + 'EnvironmentDeploymentPropertiesFragment', 'EvaluatePoliciesProperties', 'EvaluatePoliciesRequest', - 'PolicyViolation', - 'PolicySetResult', 'EvaluatePoliciesResponse', 'Event', 'EventFragment', 'ExportResourceUsageParameters', 'ExternalSubnet', 'ExternalSubnetFragment', - 'GalleryImageReference', - 'InboundNatRule', - 'SharedPublicIpAddressConfiguration', - 'NetworkInterfaceProperties', - 'ScheduleCreationParameter', - 'LabVirtualMachineCreationParameter', - 'FormulaPropertiesFromVm', 'Formula', - 'GalleryImageReferenceFragment', - 'InboundNatRuleFragment', - 'SharedPublicIpAddressConfigurationFragment', - 'NetworkInterfacePropertiesFragment', - 'ScheduleCreationParameterFragment', - 'LabVirtualMachineCreationParameterFragment', - 'FormulaPropertiesFromVmFragment', 'FormulaFragment', + 'FormulaPropertiesFromVm', + 'FormulaPropertiesFromVmFragment', 'GalleryImage', - 'ParameterInfo', + 'GalleryImageReference', + 'GalleryImageReferenceFragment', 'GenerateArmTemplateRequest', 'GenerateUploadUriParameter', 'GenerateUploadUriResponse', + 'HourDetails', + 'HourDetailsFragment', 'IdentityProperties', 'ImportLabVirtualMachineRequest', - 'LabAnnouncementProperties', - 'LabSupportProperties', + 'InboundNatRule', + 'InboundNatRuleFragment', 'Lab', + 'LabAnnouncementProperties', 'LabAnnouncementPropertiesFragment', - 'TargetCostProperties', - 'LabCostSummaryProperties', + 'LabCost', 'LabCostDetailsProperties', + 'LabCostSummaryProperties', + 'LabFragment', 'LabResourceCostProperties', - 'LabCost', + 'LabSupportProperties', 'LabSupportPropertiesFragment', - 'LabFragment', 'LabVhd', 'LabVirtualMachine', + 'LabVirtualMachineCreationParameter', + 'LabVirtualMachineCreationParameterFragment', 'LabVirtualMachineFragment', + 'LinuxOsInfo', + 'LinuxOsInfoFragment', + 'NetworkInterfaceProperties', + 'NetworkInterfacePropertiesFragment', 'NotificationChannel', 'NotificationChannelFragment', + 'NotificationSettings', + 'NotificationSettingsFragment', 'NotifyParameters', 'OperationError', - 'OperationMetadataDisplay', 'OperationMetadata', + 'OperationMetadataDisplay', 'OperationResult', + 'ParameterInfo', + 'ParametersValueFileInfo', + 'PercentageCostThresholdProperties', 'Policy', 'PolicyFragment', + 'PolicySetResult', + 'PolicyViolation', 'Port', 'PortFragment', 'RdpConnection', 'ResizeLabVirtualMachineProperties', 'Resource', 'RetargetScheduleProperties', + 'Schedule', + 'ScheduleCreationParameter', + 'ScheduleCreationParameterFragment', + 'ScheduleFragment', 'Secret', 'SecretFragment', 'ServiceFabric', 'ServiceFabricFragment', 'ServiceRunner', + 'SharedPublicIpAddressConfiguration', + 'SharedPublicIpAddressConfigurationFragment', 'ShutdownNotificationContent', 'Subnet', 'SubnetFragment', - 'SubnetSharedPublicIpAddressConfiguration', 'SubnetOverride', - 'SubnetSharedPublicIpAddressConfigurationFragment', 'SubnetOverrideFragment', + 'SubnetSharedPublicIpAddressConfiguration', + 'SubnetSharedPublicIpAddressConfigurationFragment', + 'TargetCostProperties', 'UpdateResource', - 'UserIdentity', - 'UserSecretStore', 'User', + 'UserFragment', + 'UserIdentity', 'UserIdentityFragment', + 'UserSecretStore', 'UserSecretStoreFragment', - 'UserFragment', 'VirtualNetwork', 'VirtualNetworkFragment', + 'WeekDetails', + 'WeekDetailsFragment', + 'WindowsOsInfo', + 'WindowsOsInfoFragment', 'OperationMetadataPaged', 'LabPaged', 'LabVhdPaged', @@ -510,7 +509,6 @@ 'GalleryImagePaged', 'NotificationChannelPaged', 'PolicyPaged', - 'ServiceRunnerPaged', 'UserPaged', 'DiskPaged', 'DtlEnvironmentPaged', diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dev_test_labs_client_enums.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_dev_test_labs_client_enums.py similarity index 98% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dev_test_labs_client_enums.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_dev_test_labs_client_enums.py index 035e4b81b91c..6a60d733ee01 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dev_test_labs_client_enums.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_dev_test_labs_client_enums.py @@ -28,6 +28,7 @@ class StorageType(str, Enum): standard = "Standard" premium = "Premium" + standard_ssd = "StandardSSD" class CostThresholdStatus(str, Enum): @@ -80,6 +81,7 @@ class VirtualMachineCreationSource(str, Enum): from_custom_image = "FromCustomImage" from_gallery_image = "FromGalleryImage" + from_shared_gallery_image = "FromSharedGalleryImage" class FileUploadOptions(str, Enum): diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models.py new file mode 100644 index 000000000000..cd489495c90c --- /dev/null +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models.py @@ -0,0 +1,5702 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Resource(Model): + """An Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ApplicableSchedule(Resource): + """Schedules applicable to a virtual machine. The schedules may have been + defined on a VM or on lab level. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set + at the lab or lab resource level. + :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.Schedule + :param lab_vms_startup: The auto-startup schedule, if one has been set at + the lab or lab resource level. + :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.Schedule + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'Schedule'}, + 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'Schedule'}, + } + + def __init__(self, **kwargs): + super(ApplicableSchedule, self).__init__(**kwargs) + self.lab_vms_shutdown = kwargs.get('lab_vms_shutdown', None) + self.lab_vms_startup = kwargs.get('lab_vms_startup', None) + + +class UpdateResource(Model): + """Represents an update resource. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(UpdateResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class ApplicableScheduleFragment(UpdateResource): + """Schedules applicable to a virtual machine. The schedules may have been + defined on a VM or on lab level. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set + at the lab or lab resource level. + :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.ScheduleFragment + :param lab_vms_startup: The auto-startup schedule, if one has been set at + the lab or lab resource level. + :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.ScheduleFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'ScheduleFragment'}, + 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'ScheduleFragment'}, + } + + def __init__(self, **kwargs): + super(ApplicableScheduleFragment, self).__init__(**kwargs) + self.lab_vms_shutdown = kwargs.get('lab_vms_shutdown', None) + self.lab_vms_startup = kwargs.get('lab_vms_startup', None) + + +class ApplyArtifactsRequest(Model): + """Request body for applying artifacts to a virtual machine. + + :param artifacts: The list of artifacts to apply. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + """ + + _attribute_map = { + 'artifacts': {'key': 'artifacts', 'type': '[ArtifactInstallProperties]'}, + } + + def __init__(self, **kwargs): + super(ApplyArtifactsRequest, self).__init__(**kwargs) + self.artifacts = kwargs.get('artifacts', None) + + +class ArmTemplate(Resource): + """An Azure Resource Manager template. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar display_name: The display name of the ARM template. + :vartype display_name: str + :ivar description: The description of the ARM template. + :vartype description: str + :ivar publisher: The publisher of the ARM template. + :vartype publisher: str + :ivar icon: The URI to the icon of the ARM template. + :vartype icon: str + :ivar contents: The contents of the ARM template. + :vartype contents: object + :ivar created_date: The creation date of the armTemplate. + :vartype created_date: datetime + :ivar parameters_value_files_info: File name and parameter values + information from all azuredeploy.*.parameters.json for the ARM template. + :vartype parameters_value_files_info: + list[~azure.mgmt.devtestlabs.models.ParametersValueFileInfo] + :ivar enabled: Whether or not ARM template is enabled for use by lab user. + :vartype enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'publisher': {'readonly': True}, + 'icon': {'readonly': True}, + 'contents': {'readonly': True}, + 'created_date': {'readonly': True}, + 'parameters_value_files_info': {'readonly': True}, + 'enabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'contents': {'key': 'properties.contents', 'type': 'object'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'parameters_value_files_info': {'key': 'properties.parametersValueFilesInfo', 'type': '[ParametersValueFileInfo]'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ArmTemplate, self).__init__(**kwargs) + self.display_name = None + self.description = None + self.publisher = None + self.icon = None + self.contents = None + self.created_date = None + self.parameters_value_files_info = None + self.enabled = None + + +class ArmTemplateInfo(Model): + """Information about a generated ARM template. + + :param template: The template's contents. + :type template: object + :param parameters: The parameters of the ARM template. + :type parameters: object + """ + + _attribute_map = { + 'template': {'key': 'template', 'type': 'object'}, + 'parameters': {'key': 'parameters', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ArmTemplateInfo, self).__init__(**kwargs) + self.template = kwargs.get('template', None) + self.parameters = kwargs.get('parameters', None) + + +class ArmTemplateParameterProperties(Model): + """Properties of an Azure Resource Manager template parameter. + + :param name: The name of the template parameter. + :type name: str + :param value: The value of the template parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArmTemplateParameterProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class ArmTemplateParameterPropertiesFragment(Model): + """Properties of an Azure Resource Manager template parameter. + + :param name: The name of the template parameter. + :type name: str + :param value: The value of the template parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArmTemplateParameterPropertiesFragment, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class Artifact(Resource): + """An artifact. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar title: The artifact's title. + :vartype title: str + :ivar description: The artifact's description. + :vartype description: str + :ivar publisher: The artifact's publisher. + :vartype publisher: str + :ivar file_path: The file path to the artifact. + :vartype file_path: str + :ivar icon: The URI to the artifact icon. + :vartype icon: str + :ivar target_os_type: The artifact's target OS. + :vartype target_os_type: str + :ivar parameters: The artifact's parameters. + :vartype parameters: object + :ivar created_date: The artifact's creation date. + :vartype created_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'title': {'readonly': True}, + 'description': {'readonly': True}, + 'publisher': {'readonly': True}, + 'file_path': {'readonly': True}, + 'icon': {'readonly': True}, + 'target_os_type': {'readonly': True}, + 'parameters': {'readonly': True}, + 'created_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'file_path': {'key': 'properties.filePath', 'type': 'str'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'target_os_type': {'key': 'properties.targetOsType', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': 'object'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(Artifact, self).__init__(**kwargs) + self.title = None + self.description = None + self.publisher = None + self.file_path = None + self.icon = None + self.target_os_type = None + self.parameters = None + self.created_date = None + + +class ArtifactDeploymentStatusProperties(Model): + """Properties of an artifact deployment. + + :param deployment_status: The deployment status of the artifact. + :type deployment_status: str + :param artifacts_applied: The total count of the artifacts that were + successfully applied. + :type artifacts_applied: int + :param total_artifacts: The total count of the artifacts that were + tentatively applied. + :type total_artifacts: int + """ + + _attribute_map = { + 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, + 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, + 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ArtifactDeploymentStatusProperties, self).__init__(**kwargs) + self.deployment_status = kwargs.get('deployment_status', None) + self.artifacts_applied = kwargs.get('artifacts_applied', None) + self.total_artifacts = kwargs.get('total_artifacts', None) + + +class ArtifactDeploymentStatusPropertiesFragment(Model): + """Properties of an artifact deployment. + + :param deployment_status: The deployment status of the artifact. + :type deployment_status: str + :param artifacts_applied: The total count of the artifacts that were + successfully applied. + :type artifacts_applied: int + :param total_artifacts: The total count of the artifacts that were + tentatively applied. + :type total_artifacts: int + """ + + _attribute_map = { + 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, + 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, + 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ArtifactDeploymentStatusPropertiesFragment, self).__init__(**kwargs) + self.deployment_status = kwargs.get('deployment_status', None) + self.artifacts_applied = kwargs.get('artifacts_applied', None) + self.total_artifacts = kwargs.get('total_artifacts', None) + + +class ArtifactInstallProperties(Model): + """Properties of an artifact. + + :param artifact_id: The artifact's identifier. + :type artifact_id: str + :param artifact_title: The artifact's title. + :type artifact_title: str + :param parameters: The parameters of the artifact. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArtifactParameterProperties] + :param status: The status of the artifact. + :type status: str + :param deployment_status_message: The status message from the deployment. + :type deployment_status_message: str + :param vm_extension_status_message: The status message from the virtual + machine extension. + :type vm_extension_status_message: str + :param install_time: The time that the artifact starts to install on the + virtual machine. + :type install_time: datetime + """ + + _attribute_map = { + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterProperties]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, + 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, + 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ArtifactInstallProperties, self).__init__(**kwargs) + self.artifact_id = kwargs.get('artifact_id', None) + self.artifact_title = kwargs.get('artifact_title', None) + self.parameters = kwargs.get('parameters', None) + self.status = kwargs.get('status', None) + self.deployment_status_message = kwargs.get('deployment_status_message', None) + self.vm_extension_status_message = kwargs.get('vm_extension_status_message', None) + self.install_time = kwargs.get('install_time', None) + + +class ArtifactInstallPropertiesFragment(Model): + """Properties of an artifact. + + :param artifact_id: The artifact's identifier. + :type artifact_id: str + :param artifact_title: The artifact's title. + :type artifact_title: str + :param parameters: The parameters of the artifact. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArtifactParameterPropertiesFragment] + :param status: The status of the artifact. + :type status: str + :param deployment_status_message: The status message from the deployment. + :type deployment_status_message: str + :param vm_extension_status_message: The status message from the virtual + machine extension. + :type vm_extension_status_message: str + :param install_time: The time that the artifact starts to install on the + virtual machine. + :type install_time: datetime + """ + + _attribute_map = { + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterPropertiesFragment]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, + 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, + 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ArtifactInstallPropertiesFragment, self).__init__(**kwargs) + self.artifact_id = kwargs.get('artifact_id', None) + self.artifact_title = kwargs.get('artifact_title', None) + self.parameters = kwargs.get('parameters', None) + self.status = kwargs.get('status', None) + self.deployment_status_message = kwargs.get('deployment_status_message', None) + self.vm_extension_status_message = kwargs.get('vm_extension_status_message', None) + self.install_time = kwargs.get('install_time', None) + + +class ArtifactParameterProperties(Model): + """Properties of an artifact parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArtifactParameterProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class ArtifactParameterPropertiesFragment(Model): + """Properties of an artifact parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArtifactParameterPropertiesFragment, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class ArtifactSource(Resource): + """Properties of an artifact source. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param display_name: The artifact source's display name. + :type display_name: str + :param uri: The artifact source's URI. + :type uri: str + :param source_type: The artifact source's type. Possible values include: + 'VsoGit', 'GitHub' + :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType + :param folder_path: The folder containing artifacts. + :type folder_path: str + :param arm_template_folder_path: The folder containing Azure Resource + Manager templates. + :type arm_template_folder_path: str + :param branch_ref: The artifact source's branch reference. + :type branch_ref: str + :param security_token: The security token to authenticate to the artifact + source. + :type security_token: str + :param status: Indicates if the artifact source is enabled (values: + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :ivar created_date: The artifact source's creation date. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, + 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, + 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArtifactSource, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.uri = kwargs.get('uri', None) + self.source_type = kwargs.get('source_type', None) + self.folder_path = kwargs.get('folder_path', None) + self.arm_template_folder_path = kwargs.get('arm_template_folder_path', None) + self.branch_ref = kwargs.get('branch_ref', None) + self.security_token = kwargs.get('security_token', None) + self.status = kwargs.get('status', None) + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class ArtifactSourceFragment(UpdateResource): + """Properties of an artifact source. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param display_name: The artifact source's display name. + :type display_name: str + :param uri: The artifact source's URI. + :type uri: str + :param source_type: The artifact source's type. Possible values include: + 'VsoGit', 'GitHub' + :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType + :param folder_path: The folder containing artifacts. + :type folder_path: str + :param arm_template_folder_path: The folder containing Azure Resource + Manager templates. + :type arm_template_folder_path: str + :param branch_ref: The artifact source's branch reference. + :type branch_ref: str + :param security_token: The security token to authenticate to the artifact + source. + :type security_token: str + :param status: Indicates if the artifact source is enabled (values: + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, + 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, + 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArtifactSourceFragment, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.uri = kwargs.get('uri', None) + self.source_type = kwargs.get('source_type', None) + self.folder_path = kwargs.get('folder_path', None) + self.arm_template_folder_path = kwargs.get('arm_template_folder_path', None) + self.branch_ref = kwargs.get('branch_ref', None) + self.security_token = kwargs.get('security_token', None) + self.status = kwargs.get('status', None) + + +class AttachDiskProperties(Model): + """Properties of the disk to attach. + + :param leased_by_lab_vm_id: The resource ID of the Lab virtual machine to + which the disk is attached. + :type leased_by_lab_vm_id: str + """ + + _attribute_map = { + 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AttachDiskProperties, self).__init__(**kwargs) + self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) + + +class AttachNewDataDiskOptions(Model): + """Properties to attach new disk to the Virtual Machine. + + :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :type disk_size_gi_b: int + :param disk_name: The name of the disk to be attached. + :type disk_name: str + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + 'disk_name': {'key': 'diskName', 'type': 'str'}, + 'disk_type': {'key': 'diskType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AttachNewDataDiskOptions, self).__init__(**kwargs) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + self.disk_name = kwargs.get('disk_name', None) + self.disk_type = kwargs.get('disk_type', None) + + +class AttachNewDataDiskOptionsFragment(Model): + """Properties to attach new disk to the Virtual Machine. + + :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :type disk_size_gi_b: int + :param disk_name: The name of the disk to be attached. + :type disk_name: str + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + 'disk_name': {'key': 'diskName', 'type': 'str'}, + 'disk_type': {'key': 'diskType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AttachNewDataDiskOptionsFragment, self).__init__(**kwargs) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + self.disk_name = kwargs.get('disk_name', None) + self.disk_type = kwargs.get('disk_type', None) + + +class BulkCreationParameters(Model): + """Parameters for creating multiple virtual machines as a single action. + + :param instance_count: The number of virtual machine instances to create. + :type instance_count: int + """ + + _attribute_map = { + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BulkCreationParameters, self).__init__(**kwargs) + self.instance_count = kwargs.get('instance_count', None) + + +class BulkCreationParametersFragment(Model): + """Parameters for creating multiple virtual machines as a single action. + + :param instance_count: The number of virtual machine instances to create. + :type instance_count: int + """ + + _attribute_map = { + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BulkCreationParametersFragment, self).__init__(**kwargs) + self.instance_count = kwargs.get('instance_count', None) + + +class CloudError(Model): + """Error from a REST request. + + :param error: The cloud error that occurred + :type error: ~azure.mgmt.devtestlabs.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, **kwargs): + super(CloudError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """Body of an error from a REST request. + + :param code: The error code. + :type code: str + :param message: The error message. + :type message: str + :param target: The error target. + :type target: str + :param details: Inner errors. + :type details: list[~azure.mgmt.devtestlabs.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, **kwargs): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class ComputeDataDisk(Model): + """A data disks attached to a virtual machine. + + :param name: Gets data disk name. + :type name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :param disk_size_gi_b: Gets data disk size in GiB. + :type disk_size_gi_b: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disk_uri': {'key': 'diskUri', 'type': 'str'}, + 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ComputeDataDisk, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.disk_uri = kwargs.get('disk_uri', None) + self.managed_disk_id = kwargs.get('managed_disk_id', None) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + + +class ComputeDataDiskFragment(Model): + """A data disks attached to a virtual machine. + + :param name: Gets data disk name. + :type name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :param disk_size_gi_b: Gets data disk size in GiB. + :type disk_size_gi_b: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disk_uri': {'key': 'diskUri', 'type': 'str'}, + 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ComputeDataDiskFragment, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.disk_uri = kwargs.get('disk_uri', None) + self.managed_disk_id = kwargs.get('managed_disk_id', None) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + + +class ComputeVmInstanceViewStatus(Model): + """Status information about a virtual machine. + + :param code: Gets the status Code. + :type code: str + :param display_status: Gets the short localizable label for the status. + :type display_status: str + :param message: Gets the message associated with the status. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComputeVmInstanceViewStatus, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.display_status = kwargs.get('display_status', None) + self.message = kwargs.get('message', None) + + +class ComputeVmInstanceViewStatusFragment(Model): + """Status information about a virtual machine. + + :param code: Gets the status Code. + :type code: str + :param display_status: Gets the short localizable label for the status. + :type display_status: str + :param message: Gets the message associated with the status. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComputeVmInstanceViewStatusFragment, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.display_status = kwargs.get('display_status', None) + self.message = kwargs.get('message', None) + + +class ComputeVmProperties(Model): + """Properties of a virtual machine returned by the Microsoft.Compute API. + + :param statuses: Gets the statuses of the virtual machine. + :type statuses: + list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatus] + :param os_type: Gets the OS type of the virtual machine. + :type os_type: str + :param vm_size: Gets the size of the virtual machine. + :type vm_size: str + :param network_interface_id: Gets the network interface ID of the virtual + machine. + :type network_interface_id: str + :param os_disk_id: Gets OS disk blob uri for the virtual machine. + :type os_disk_id: str + :param data_disk_ids: Gets data disks blob uri for the virtual machine. + :type data_disk_ids: list[str] + :param data_disks: Gets all data disks attached to the virtual machine. + :type data_disks: list[~azure.mgmt.devtestlabs.models.ComputeDataDisk] + """ + + _attribute_map = { + 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatus]'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, + 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, + 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDisk]'}, + } + + def __init__(self, **kwargs): + super(ComputeVmProperties, self).__init__(**kwargs) + self.statuses = kwargs.get('statuses', None) + self.os_type = kwargs.get('os_type', None) + self.vm_size = kwargs.get('vm_size', None) + self.network_interface_id = kwargs.get('network_interface_id', None) + self.os_disk_id = kwargs.get('os_disk_id', None) + self.data_disk_ids = kwargs.get('data_disk_ids', None) + self.data_disks = kwargs.get('data_disks', None) + + +class ComputeVmPropertiesFragment(Model): + """Properties of a virtual machine returned by the Microsoft.Compute API. + + :param statuses: Gets the statuses of the virtual machine. + :type statuses: + list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatusFragment] + :param os_type: Gets the OS type of the virtual machine. + :type os_type: str + :param vm_size: Gets the size of the virtual machine. + :type vm_size: str + :param network_interface_id: Gets the network interface ID of the virtual + machine. + :type network_interface_id: str + :param os_disk_id: Gets OS disk blob uri for the virtual machine. + :type os_disk_id: str + :param data_disk_ids: Gets data disks blob uri for the virtual machine. + :type data_disk_ids: list[str] + :param data_disks: Gets all data disks attached to the virtual machine. + :type data_disks: + list[~azure.mgmt.devtestlabs.models.ComputeDataDiskFragment] + """ + + _attribute_map = { + 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatusFragment]'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, + 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, + 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDiskFragment]'}, + } + + def __init__(self, **kwargs): + super(ComputeVmPropertiesFragment, self).__init__(**kwargs) + self.statuses = kwargs.get('statuses', None) + self.os_type = kwargs.get('os_type', None) + self.vm_size = kwargs.get('vm_size', None) + self.network_interface_id = kwargs.get('network_interface_id', None) + self.os_disk_id = kwargs.get('os_disk_id', None) + self.data_disk_ids = kwargs.get('data_disk_ids', None) + self.data_disks = kwargs.get('data_disks', None) + + +class CostThresholdProperties(Model): + """Properties of a cost threshold item. + + :param threshold_id: The ID of the cost threshold item. + :type threshold_id: str + :param percentage_threshold: The value of the percentage cost threshold. + :type percentage_threshold: + ~azure.mgmt.devtestlabs.models.PercentageCostThresholdProperties + :param display_on_chart: Indicates whether this threshold will be + displayed on cost charts. Possible values include: 'Enabled', 'Disabled' + :type display_on_chart: str or + ~azure.mgmt.devtestlabs.models.CostThresholdStatus + :param send_notification_when_exceeded: Indicates whether notifications + will be sent when this threshold is exceeded. Possible values include: + 'Enabled', 'Disabled' + :type send_notification_when_exceeded: str or + ~azure.mgmt.devtestlabs.models.CostThresholdStatus + :param notification_sent: Indicates the datetime when notifications were + last sent for this threshold. + :type notification_sent: str + """ + + _attribute_map = { + 'threshold_id': {'key': 'thresholdId', 'type': 'str'}, + 'percentage_threshold': {'key': 'percentageThreshold', 'type': 'PercentageCostThresholdProperties'}, + 'display_on_chart': {'key': 'displayOnChart', 'type': 'str'}, + 'send_notification_when_exceeded': {'key': 'sendNotificationWhenExceeded', 'type': 'str'}, + 'notification_sent': {'key': 'notificationSent', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CostThresholdProperties, self).__init__(**kwargs) + self.threshold_id = kwargs.get('threshold_id', None) + self.percentage_threshold = kwargs.get('percentage_threshold', None) + self.display_on_chart = kwargs.get('display_on_chart', None) + self.send_notification_when_exceeded = kwargs.get('send_notification_when_exceeded', None) + self.notification_sent = kwargs.get('notification_sent', None) + + +class CustomImage(Resource): + """A custom image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param vm: The virtual machine from which the image is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVm + :param vhd: The VHD from which the image is to be created. + :type vhd: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustom + :param description: The description of the custom image. + :type description: str + :param author: The author of the custom image. + :type author: str + :ivar creation_date: The creation date of the custom image. + :vartype creation_date: datetime + :param managed_image_id: The Managed Image Id backing the custom image. + :type managed_image_id: str + :param managed_snapshot_id: The Managed Snapshot Id backing the custom + image. + :type managed_snapshot_id: str + :param data_disk_storage_info: Storage information about the data disks + present in the custom image + :type data_disk_storage_info: + list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfo] + :param custom_image_plan: Storage information about the plan related to + this custom image + :type custom_image_plan: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlan + :param is_plan_authorized: Whether or not the custom images underlying + offer/plan has been enabled for programmatic deployment + :type is_plan_authorized: bool + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVm'}, + 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustom'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, + 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, + 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfo]'}, + 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlan'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomImage, self).__init__(**kwargs) + self.vm = kwargs.get('vm', None) + self.vhd = kwargs.get('vhd', None) + self.description = kwargs.get('description', None) + self.author = kwargs.get('author', None) + self.creation_date = None + self.managed_image_id = kwargs.get('managed_image_id', None) + self.managed_snapshot_id = kwargs.get('managed_snapshot_id', None) + self.data_disk_storage_info = kwargs.get('data_disk_storage_info', None) + self.custom_image_plan = kwargs.get('custom_image_plan', None) + self.is_plan_authorized = kwargs.get('is_plan_authorized', None) + self.provisioning_state = None + self.unique_identifier = None + + +class CustomImageFragment(UpdateResource): + """A custom image. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param vm: The virtual machine from which the image is to be created. + :type vm: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVmFragment + :param vhd: The VHD from which the image is to be created. + :type vhd: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustomFragment + :param description: The description of the custom image. + :type description: str + :param author: The author of the custom image. + :type author: str + :param managed_image_id: The Managed Image Id backing the custom image. + :type managed_image_id: str + :param managed_snapshot_id: The Managed Snapshot Id backing the custom + image. + :type managed_snapshot_id: str + :param data_disk_storage_info: Storage information about the data disks + present in the custom image + :type data_disk_storage_info: + list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfoFragment] + :param custom_image_plan: Storage information about the plan related to + this custom image + :type custom_image_plan: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlanFragment + :param is_plan_authorized: Whether or not the custom images underlying + offer/plan has been enabled for programmatic deployment + :type is_plan_authorized: bool + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVmFragment'}, + 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustomFragment'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, + 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, + 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfoFragment]'}, + 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlanFragment'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(CustomImageFragment, self).__init__(**kwargs) + self.vm = kwargs.get('vm', None) + self.vhd = kwargs.get('vhd', None) + self.description = kwargs.get('description', None) + self.author = kwargs.get('author', None) + self.managed_image_id = kwargs.get('managed_image_id', None) + self.managed_snapshot_id = kwargs.get('managed_snapshot_id', None) + self.data_disk_storage_info = kwargs.get('data_disk_storage_info', None) + self.custom_image_plan = kwargs.get('custom_image_plan', None) + self.is_plan_authorized = kwargs.get('is_plan_authorized', None) + + +class CustomImagePropertiesCustom(Model): + """Properties for creating a custom image from a VHD. + + All required parameters must be populated in order to send to Azure. + + :param image_name: The image name. + :type image_name: str + :param sys_prep: Indicates whether sysprep has been run on the VHD. + :type sys_prep: bool + :param os_type: Required. The OS type of the custom image (i.e. Windows, + Linux). Possible values include: 'Windows', 'Linux', 'None' + :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType + """ + + _validation = { + 'os_type': {'required': True}, + } + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesCustom, self).__init__(**kwargs) + self.image_name = kwargs.get('image_name', None) + self.sys_prep = kwargs.get('sys_prep', None) + self.os_type = kwargs.get('os_type', None) + + +class CustomImagePropertiesCustomFragment(Model): + """Properties for creating a custom image from a VHD. + + :param image_name: The image name. + :type image_name: str + :param sys_prep: Indicates whether sysprep has been run on the VHD. + :type sys_prep: bool + :param os_type: The OS type of the custom image (i.e. Windows, Linux). + Possible values include: 'Windows', 'Linux', 'None' + :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType + """ + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesCustomFragment, self).__init__(**kwargs) + self.image_name = kwargs.get('image_name', None) + self.sys_prep = kwargs.get('sys_prep', None) + self.os_type = kwargs.get('os_type', None) + + +class CustomImagePropertiesFromPlan(Model): + """Properties for plan on a custom image. + + :param id: The id of the plan, equivalent to name of the plan + :type id: str + :param publisher: The publisher for the plan from the marketplace image + the custom image is derived from + :type publisher: str + :param offer: The offer for the plan from the marketplace image the custom + image is derived from + :type offer: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesFromPlan, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) + + +class CustomImagePropertiesFromPlanFragment(Model): + """Properties for plan on a custom image. + + :param id: The id of the plan, equivalent to name of the plan + :type id: str + :param publisher: The publisher for the plan from the marketplace image + the custom image is derived from + :type publisher: str + :param offer: The offer for the plan from the marketplace image the custom + image is derived from + :type offer: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesFromPlanFragment, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) + + +class CustomImagePropertiesFromVm(Model): + """Properties for creating a custom image from a virtual machine. + + :param source_vm_id: The source vm identifier. + :type source_vm_id: str + :param windows_os_info: The Windows OS information of the VM. + :type windows_os_info: ~azure.mgmt.devtestlabs.models.WindowsOsInfo + :param linux_os_info: The Linux OS information of the VM. + :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfo + """ + + _attribute_map = { + 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, + 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfo'}, + 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfo'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesFromVm, self).__init__(**kwargs) + self.source_vm_id = kwargs.get('source_vm_id', None) + self.windows_os_info = kwargs.get('windows_os_info', None) + self.linux_os_info = kwargs.get('linux_os_info', None) + + +class CustomImagePropertiesFromVmFragment(Model): + """Properties for creating a custom image from a virtual machine. + + :param source_vm_id: The source vm identifier. + :type source_vm_id: str + :param windows_os_info: The Windows OS information of the VM. + :type windows_os_info: + ~azure.mgmt.devtestlabs.models.WindowsOsInfoFragment + :param linux_os_info: The Linux OS information of the VM. + :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfoFragment + """ + + _attribute_map = { + 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, + 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfoFragment'}, + 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfoFragment'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesFromVmFragment, self).__init__(**kwargs) + self.source_vm_id = kwargs.get('source_vm_id', None) + self.windows_os_info = kwargs.get('windows_os_info', None) + self.linux_os_info = kwargs.get('linux_os_info', None) + + +class DataDiskProperties(Model): + """Request body for adding a new or existing data disk to a virtual machine. + + :param attach_new_data_disk_options: Specifies options to attach a new + disk to the virtual machine. + :type attach_new_data_disk_options: + ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptions + :param existing_lab_disk_id: Specifies the existing lab disk id to attach + to virtual machine. + :type existing_lab_disk_id: str + :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, + ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type host_caching: str or + ~azure.mgmt.devtestlabs.models.HostCachingOptions + """ + + _attribute_map = { + 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptions'}, + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + 'host_caching': {'key': 'hostCaching', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataDiskProperties, self).__init__(**kwargs) + self.attach_new_data_disk_options = kwargs.get('attach_new_data_disk_options', None) + self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) + self.host_caching = kwargs.get('host_caching', None) + + +class DataDiskPropertiesFragment(Model): + """Request body for adding a new or existing data disk to a virtual machine. + + :param attach_new_data_disk_options: Specifies options to attach a new + disk to the virtual machine. + :type attach_new_data_disk_options: + ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptionsFragment + :param existing_lab_disk_id: Specifies the existing lab disk id to attach + to virtual machine. + :type existing_lab_disk_id: str + :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, + ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type host_caching: str or + ~azure.mgmt.devtestlabs.models.HostCachingOptions + """ + + _attribute_map = { + 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptionsFragment'}, + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + 'host_caching': {'key': 'hostCaching', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataDiskPropertiesFragment, self).__init__(**kwargs) + self.attach_new_data_disk_options = kwargs.get('attach_new_data_disk_options', None) + self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) + self.host_caching = kwargs.get('host_caching', None) + + +class DataDiskStorageTypeInfo(Model): + """Storage information about the data disks present in the custom image. + + :param lun: Disk Lun + :type lun: str + :param storage_type: Disk Storage Type. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataDiskStorageTypeInfo, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.storage_type = kwargs.get('storage_type', None) + + +class DataDiskStorageTypeInfoFragment(Model): + """Storage information about the data disks present in the custom image. + + :param lun: Disk Lun + :type lun: str + :param storage_type: Disk Storage Type. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataDiskStorageTypeInfoFragment, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.storage_type = kwargs.get('storage_type', None) + + +class DayDetails(Model): + """Properties of a daily schedule. + + :param time: The time of day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DayDetails, self).__init__(**kwargs) + self.time = kwargs.get('time', None) + + +class DayDetailsFragment(Model): + """Properties of a daily schedule. + + :param time: The time of day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DayDetailsFragment, self).__init__(**kwargs) + self.time = kwargs.get('time', None) + + +class DetachDataDiskProperties(Model): + """Request body for detaching data disk from a virtual machine. + + :param existing_lab_disk_id: Specifies the disk resource ID to detach from + virtual machine. + :type existing_lab_disk_id: str + """ + + _attribute_map = { + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DetachDataDiskProperties, self).__init__(**kwargs) + self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) + + +class DetachDiskProperties(Model): + """Properties of the disk to detach. + + :param leased_by_lab_vm_id: The resource ID of the Lab VM to which the + disk is attached. + :type leased_by_lab_vm_id: str + """ + + _attribute_map = { + 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DetachDiskProperties, self).__init__(**kwargs) + self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) + + +class Disk(Resource): + """A Disk. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param disk_size_gi_b: The size of the disk in GibiBytes. + :type disk_size_gi_b: int + :param leased_by_lab_vm_id: The resource ID of the VM to which this disk + is leased. + :type leased_by_lab_vm_id: str + :param disk_blob_name: When backed by a blob, the name of the VHD blob + without extension. + :type disk_blob_name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :ivar created_date: The creation date of the disk. + :vartype created_date: datetime + :param host_caching: The host caching policy of the disk (i.e. None, + ReadOnly, ReadWrite). + :type host_caching: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, + 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, + 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, + 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, + 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Disk, self).__init__(**kwargs) + self.disk_type = kwargs.get('disk_type', None) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) + self.disk_blob_name = kwargs.get('disk_blob_name', None) + self.disk_uri = kwargs.get('disk_uri', None) + self.created_date = None + self.host_caching = kwargs.get('host_caching', None) + self.managed_disk_id = kwargs.get('managed_disk_id', None) + self.provisioning_state = None + self.unique_identifier = None + + +class DiskFragment(UpdateResource): + """A Disk. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param disk_size_gi_b: The size of the disk in GibiBytes. + :type disk_size_gi_b: int + :param leased_by_lab_vm_id: The resource ID of the VM to which this disk + is leased. + :type leased_by_lab_vm_id: str + :param disk_blob_name: When backed by a blob, the name of the VHD blob + without extension. + :type disk_blob_name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param host_caching: The host caching policy of the disk (i.e. None, + ReadOnly, ReadWrite). + :type host_caching: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, + 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, + 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, + 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, + 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, + 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DiskFragment, self).__init__(**kwargs) + self.disk_type = kwargs.get('disk_type', None) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) + self.disk_blob_name = kwargs.get('disk_blob_name', None) + self.disk_uri = kwargs.get('disk_uri', None) + self.host_caching = kwargs.get('host_caching', None) + self.managed_disk_id = kwargs.get('managed_disk_id', None) + + +class DtlEnvironment(Resource): + """An environment, which is essentially an ARM template deployment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param deployment_properties: The deployment properties of the + environment. + :type deployment_properties: + ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentProperties + :param arm_template_display_name: The display name of the Azure Resource + Manager template that produced the environment. + :type arm_template_display_name: str + :ivar resource_group_id: The identifier of the resource group containing + the environment's resources. + :vartype resource_group_id: str + :ivar created_by_user: The creator of the environment. + :vartype created_by_user: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_group_id': {'readonly': True}, + 'created_by_user': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentProperties'}, + 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, + 'resource_group_id': {'key': 'properties.resourceGroupId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DtlEnvironment, self).__init__(**kwargs) + self.deployment_properties = kwargs.get('deployment_properties', None) + self.arm_template_display_name = kwargs.get('arm_template_display_name', None) + self.resource_group_id = None + self.created_by_user = None + self.provisioning_state = None + self.unique_identifier = None + + +class DtlEnvironmentFragment(UpdateResource): + """An environment, which is essentially an ARM template deployment. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param deployment_properties: The deployment properties of the + environment. + :type deployment_properties: + ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentPropertiesFragment + :param arm_template_display_name: The display name of the Azure Resource + Manager template that produced the environment. + :type arm_template_display_name: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentPropertiesFragment'}, + 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DtlEnvironmentFragment, self).__init__(**kwargs) + self.deployment_properties = kwargs.get('deployment_properties', None) + self.arm_template_display_name = kwargs.get('arm_template_display_name', None) + + +class EnvironmentDeploymentProperties(Model): + """Properties of an environment deployment. + + :param arm_template_id: The Azure Resource Manager template's identifier. + :type arm_template_id: str + :param parameters: The parameters of the Azure Resource Manager template. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterProperties] + """ + + _attribute_map = { + 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterProperties]'}, + } + + def __init__(self, **kwargs): + super(EnvironmentDeploymentProperties, self).__init__(**kwargs) + self.arm_template_id = kwargs.get('arm_template_id', None) + self.parameters = kwargs.get('parameters', None) + + +class EnvironmentDeploymentPropertiesFragment(Model): + """Properties of an environment deployment. + + :param arm_template_id: The Azure Resource Manager template's identifier. + :type arm_template_id: str + :param parameters: The parameters of the Azure Resource Manager template. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterPropertiesFragment] + """ + + _attribute_map = { + 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterPropertiesFragment]'}, + } + + def __init__(self, **kwargs): + super(EnvironmentDeploymentPropertiesFragment, self).__init__(**kwargs) + self.arm_template_id = kwargs.get('arm_template_id', None) + self.parameters = kwargs.get('parameters', None) + + +class EvaluatePoliciesProperties(Model): + """Properties for evaluating a policy set. + + :param fact_name: The fact name. + :type fact_name: str + :param fact_data: The fact data. + :type fact_data: str + :param value_offset: The value offset. + :type value_offset: str + :param user_object_id: The user for which policies will be evaluated + :type user_object_id: str + """ + + _attribute_map = { + 'fact_name': {'key': 'factName', 'type': 'str'}, + 'fact_data': {'key': 'factData', 'type': 'str'}, + 'value_offset': {'key': 'valueOffset', 'type': 'str'}, + 'user_object_id': {'key': 'userObjectId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EvaluatePoliciesProperties, self).__init__(**kwargs) + self.fact_name = kwargs.get('fact_name', None) + self.fact_data = kwargs.get('fact_data', None) + self.value_offset = kwargs.get('value_offset', None) + self.user_object_id = kwargs.get('user_object_id', None) + + +class EvaluatePoliciesRequest(Model): + """Request body for evaluating a policy set. + + :param policies: Policies to evaluate. + :type policies: + list[~azure.mgmt.devtestlabs.models.EvaluatePoliciesProperties] + """ + + _attribute_map = { + 'policies': {'key': 'policies', 'type': '[EvaluatePoliciesProperties]'}, + } + + def __init__(self, **kwargs): + super(EvaluatePoliciesRequest, self).__init__(**kwargs) + self.policies = kwargs.get('policies', None) + + +class EvaluatePoliciesResponse(Model): + """Response body for evaluating a policy set. + + :param results: Results of evaluating a policy set. + :type results: list[~azure.mgmt.devtestlabs.models.PolicySetResult] + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': '[PolicySetResult]'}, + } + + def __init__(self, **kwargs): + super(EvaluatePoliciesResponse, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + + +class Event(Model): + """An event to be notified for. + + :param event_name: The event type for which this notification is enabled + (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Event, self).__init__(**kwargs) + self.event_name = kwargs.get('event_name', None) + + +class EventFragment(Model): + """An event to be notified for. + + :param event_name: The event type for which this notification is enabled + (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EventFragment, self).__init__(**kwargs) + self.event_name = kwargs.get('event_name', None) + + +class ExportResourceUsageParameters(Model): + """The parameters of the export operation. + + :param blob_storage_absolute_sas_uri: The blob storage absolute sas uri + with write permission to the container which the usage data needs to be + uploaded to. + :type blob_storage_absolute_sas_uri: str + :param usage_start_date: The start time of the usage. If not provided, + usage will be reported since the beginning of data collection. + :type usage_start_date: datetime + """ + + _attribute_map = { + 'blob_storage_absolute_sas_uri': {'key': 'blobStorageAbsoluteSasUri', 'type': 'str'}, + 'usage_start_date': {'key': 'usageStartDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ExportResourceUsageParameters, self).__init__(**kwargs) + self.blob_storage_absolute_sas_uri = kwargs.get('blob_storage_absolute_sas_uri', None) + self.usage_start_date = kwargs.get('usage_start_date', None) + + +class ExternalSubnet(Model): + """Subnet information as returned by the Microsoft.Network API. + + :param id: Gets or sets the identifier. + :type id: str + :param name: Gets or sets the name. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExternalSubnet, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + + +class ExternalSubnetFragment(Model): + """Subnet information as returned by the Microsoft.Network API. + + :param id: Gets or sets the identifier. + :type id: str + :param name: Gets or sets the name. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExternalSubnetFragment, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + + +class Formula(Resource): + """A formula for creating a VM, specifying an image base and other parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the formula. + :type description: str + :param author: The author of the formula. + :type author: str + :param os_type: The OS type of the formula. + :type os_type: str + :ivar creation_date: The creation date of the formula. + :vartype creation_date: datetime + :param formula_content: The content of the formula. + :type formula_content: + ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameter + :param vm: Information about a VM from which a formula is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVm + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameter'}, + 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVm'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Formula, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.author = kwargs.get('author', None) + self.os_type = kwargs.get('os_type', None) + self.creation_date = None + self.formula_content = kwargs.get('formula_content', None) + self.vm = kwargs.get('vm', None) + self.provisioning_state = None + self.unique_identifier = None + + +class FormulaFragment(UpdateResource): + """A formula for creating a VM, specifying an image base and other parameters. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the formula. + :type description: str + :param author: The author of the formula. + :type author: str + :param os_type: The OS type of the formula. + :type os_type: str + :param formula_content: The content of the formula. + :type formula_content: + ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameterFragment + :param vm: Information about a VM from which a formula is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVmFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameterFragment'}, + 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVmFragment'}, + } + + def __init__(self, **kwargs): + super(FormulaFragment, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.author = kwargs.get('author', None) + self.os_type = kwargs.get('os_type', None) + self.formula_content = kwargs.get('formula_content', None) + self.vm = kwargs.get('vm', None) + + +class FormulaPropertiesFromVm(Model): + """Information about a VM from which a formula is to be created. + + :param lab_vm_id: The identifier of the VM from which a formula is to be + created. + :type lab_vm_id: str + """ + + _attribute_map = { + 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FormulaPropertiesFromVm, self).__init__(**kwargs) + self.lab_vm_id = kwargs.get('lab_vm_id', None) + + +class FormulaPropertiesFromVmFragment(Model): + """Information about a VM from which a formula is to be created. + + :param lab_vm_id: The identifier of the VM from which a formula is to be + created. + :type lab_vm_id: str + """ + + _attribute_map = { + 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FormulaPropertiesFromVmFragment, self).__init__(**kwargs) + self.lab_vm_id = kwargs.get('lab_vm_id', None) + + +class GalleryImage(Resource): + """A gallery image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param author: The author of the gallery image. + :type author: str + :ivar created_date: The creation date of the gallery image. + :vartype created_date: datetime + :param description: The description of the gallery image. + :type description: str + :param image_reference: The image reference of the gallery image. + :type image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param icon: The icon of the gallery image. + :type icon: str + :param enabled: Indicates whether this gallery image is enabled. + :type enabled: bool + :param plan_id: The third party plan that applies to this image + :type plan_id: str + :param is_plan_authorized: Indicates if the plan has been authorized for + programmatic deployment. + :type is_plan_authorized: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'image_reference': {'key': 'properties.imageReference', 'type': 'GalleryImageReference'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(GalleryImage, self).__init__(**kwargs) + self.author = kwargs.get('author', None) + self.created_date = None + self.description = kwargs.get('description', None) + self.image_reference = kwargs.get('image_reference', None) + self.icon = kwargs.get('icon', None) + self.enabled = kwargs.get('enabled', None) + self.plan_id = kwargs.get('plan_id', None) + self.is_plan_authorized = kwargs.get('is_plan_authorized', None) + + +class GalleryImageReference(Model): + """The reference information for an Azure Marketplace image. + + :param offer: The offer of the gallery image. + :type offer: str + :param publisher: The publisher of the gallery image. + :type publisher: str + :param sku: The SKU of the gallery image. + :type sku: str + :param os_type: The OS type of the gallery image. + :type os_type: str + :param version: The version of the gallery image. + :type version: str + """ + + _attribute_map = { + 'offer': {'key': 'offer', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GalleryImageReference, self).__init__(**kwargs) + self.offer = kwargs.get('offer', None) + self.publisher = kwargs.get('publisher', None) + self.sku = kwargs.get('sku', None) + self.os_type = kwargs.get('os_type', None) + self.version = kwargs.get('version', None) + + +class GalleryImageReferenceFragment(Model): + """The reference information for an Azure Marketplace image. + + :param offer: The offer of the gallery image. + :type offer: str + :param publisher: The publisher of the gallery image. + :type publisher: str + :param sku: The SKU of the gallery image. + :type sku: str + :param os_type: The OS type of the gallery image. + :type os_type: str + :param version: The version of the gallery image. + :type version: str + """ + + _attribute_map = { + 'offer': {'key': 'offer', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GalleryImageReferenceFragment, self).__init__(**kwargs) + self.offer = kwargs.get('offer', None) + self.publisher = kwargs.get('publisher', None) + self.sku = kwargs.get('sku', None) + self.os_type = kwargs.get('os_type', None) + self.version = kwargs.get('version', None) + + +class GenerateArmTemplateRequest(Model): + """Parameters for generating an ARM template for deploying artifacts. + + :param virtual_machine_name: The resource name of the virtual machine. + :type virtual_machine_name: str + :param parameters: The parameters of the ARM template. + :type parameters: list[~azure.mgmt.devtestlabs.models.ParameterInfo] + :param location: The location of the virtual machine. + :type location: str + :param file_upload_options: Options for uploading the files for the + artifact. UploadFilesAndGenerateSasTokens is the default value. Possible + values include: 'UploadFilesAndGenerateSasTokens', 'None' + :type file_upload_options: str or + ~azure.mgmt.devtestlabs.models.FileUploadOptions + """ + + _attribute_map = { + 'virtual_machine_name': {'key': 'virtualMachineName', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ParameterInfo]'}, + 'location': {'key': 'location', 'type': 'str'}, + 'file_upload_options': {'key': 'fileUploadOptions', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenerateArmTemplateRequest, self).__init__(**kwargs) + self.virtual_machine_name = kwargs.get('virtual_machine_name', None) + self.parameters = kwargs.get('parameters', None) + self.location = kwargs.get('location', None) + self.file_upload_options = kwargs.get('file_upload_options', None) + + +class GenerateUploadUriParameter(Model): + """Properties for generating an upload URI. + + :param blob_name: The blob name of the upload URI. + :type blob_name: str + """ + + _attribute_map = { + 'blob_name': {'key': 'blobName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenerateUploadUriParameter, self).__init__(**kwargs) + self.blob_name = kwargs.get('blob_name', None) + + +class GenerateUploadUriResponse(Model): + """Response body for generating an upload URI. + + :param upload_uri: The upload URI for the VHD. + :type upload_uri: str + """ + + _attribute_map = { + 'upload_uri': {'key': 'uploadUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenerateUploadUriResponse, self).__init__(**kwargs) + self.upload_uri = kwargs.get('upload_uri', None) + + +class HourDetails(Model): + """Properties of an hourly schedule. + + :param minute: Minutes of the hour the schedule will run. + :type minute: int + """ + + _attribute_map = { + 'minute': {'key': 'minute', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(HourDetails, self).__init__(**kwargs) + self.minute = kwargs.get('minute', None) + + +class HourDetailsFragment(Model): + """Properties of an hourly schedule. + + :param minute: Minutes of the hour the schedule will run. + :type minute: int + """ + + _attribute_map = { + 'minute': {'key': 'minute', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(HourDetailsFragment, self).__init__(**kwargs) + self.minute = kwargs.get('minute', None) + + +class IdentityProperties(Model): + """Properties of a managed identity. + + :param type: Managed identity. + :type type: str + :param principal_id: The principal id of resource identity. + :type principal_id: str + :param tenant_id: The tenant identifier of resource. + :type tenant_id: str + :param client_secret_url: The client secret URL of the identity. + :type client_secret_url: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'client_secret_url': {'key': 'clientSecretUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IdentityProperties, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.principal_id = kwargs.get('principal_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.client_secret_url = kwargs.get('client_secret_url', None) + + +class ImportLabVirtualMachineRequest(Model): + """This represents the payload required to import a virtual machine from a + different lab into the current one. + + :param source_virtual_machine_resource_id: The full resource ID of the + virtual machine to be imported. + :type source_virtual_machine_resource_id: str + :param destination_virtual_machine_name: The name of the virtual machine + in the destination lab + :type destination_virtual_machine_name: str + """ + + _attribute_map = { + 'source_virtual_machine_resource_id': {'key': 'sourceVirtualMachineResourceId', 'type': 'str'}, + 'destination_virtual_machine_name': {'key': 'destinationVirtualMachineName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImportLabVirtualMachineRequest, self).__init__(**kwargs) + self.source_virtual_machine_resource_id = kwargs.get('source_virtual_machine_resource_id', None) + self.destination_virtual_machine_name = kwargs.get('destination_virtual_machine_name', None) + + +class InboundNatRule(Model): + """A rule for NAT - exposing a VM's port (backendPort) on the public IP + address using a load balancer. + + :param transport_protocol: The transport protocol for the endpoint. + Possible values include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param frontend_port: The external endpoint port of the inbound + connection. Possible values range between 1 and 65535, inclusive. If + unspecified, a value will be allocated automatically. + :type frontend_port: int + :param backend_port: The port to which the external traffic will be + redirected. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(InboundNatRule, self).__init__(**kwargs) + self.transport_protocol = kwargs.get('transport_protocol', None) + self.frontend_port = kwargs.get('frontend_port', None) + self.backend_port = kwargs.get('backend_port', None) + + +class InboundNatRuleFragment(Model): + """A rule for NAT - exposing a VM's port (backendPort) on the public IP + address using a load balancer. + + :param transport_protocol: The transport protocol for the endpoint. + Possible values include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param frontend_port: The external endpoint port of the inbound + connection. Possible values range between 1 and 65535, inclusive. If + unspecified, a value will be allocated automatically. + :type frontend_port: int + :param backend_port: The port to which the external traffic will be + redirected. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(InboundNatRuleFragment, self).__init__(**kwargs) + self.transport_protocol = kwargs.get('transport_protocol', None) + self.frontend_port = kwargs.get('frontend_port', None) + self.backend_port = kwargs.get('backend_port', None) + + +class Lab(Resource): + """A lab. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar default_storage_account: The lab's default storage account. + :vartype default_storage_account: str + :ivar default_premium_storage_account: The lab's default premium storage + account. + :vartype default_premium_storage_account: str + :ivar artifacts_storage_account: The lab's artifact storage account. + :vartype artifacts_storage_account: str + :ivar premium_data_disk_storage_account: The lab's premium data disk + storage account. + :vartype premium_data_disk_storage_account: str + :ivar vault_name: The lab's Key vault. + :vartype vault_name: str + :param lab_storage_type: Type of storage used by the lab. It can be either + Premium or Standard. Default is Premium. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param mandatory_artifacts_resource_ids_linux: The ordered list of + artifact resource IDs that should be applied on all Linux VM creations by + default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_linux: list[str] + :param mandatory_artifacts_resource_ids_windows: The ordered list of + artifact resource IDs that should be applied on all Windows VM creations + by default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_windows: list[str] + :ivar created_date: The creation date of the lab. + :vartype created_date: datetime + :param premium_data_disks: The setting to enable usage of premium data + disks. + When its value is 'Enabled', creation of standard or premium data disks is + allowed. + When its value is 'Disabled', only creation of standard data disks is + allowed. Possible values include: 'Disabled', 'Enabled' + :type premium_data_disks: str or + ~azure.mgmt.devtestlabs.models.PremiumDataDisk + :param environment_permission: The access rights to be granted to the user + when provisioning an environment. Possible values include: 'Reader', + 'Contributor' + :type environment_permission: str or + ~azure.mgmt.devtestlabs.models.EnvironmentPermission + :param announcement: The properties of any lab announcement associated + with this lab + :type announcement: + ~azure.mgmt.devtestlabs.models.LabAnnouncementProperties + :param support: The properties of any lab support message associated with + this lab + :type support: ~azure.mgmt.devtestlabs.models.LabSupportProperties + :ivar vm_creation_resource_group: The resource group in which all new lab + virtual machines will be created. To let DevTest Labs manage resource + group creation, set this value to null. + :vartype vm_creation_resource_group: str + :ivar public_ip_id: The public IP address for the lab's load balancer. + :vartype public_ip_id: str + :ivar load_balancer_id: The load balancer used to for lab VMs that use + shared IP address. + :vartype load_balancer_id: str + :ivar network_security_group_id: The Network Security Group attached to + the lab VMs Network interfaces to restrict open ports. + :vartype network_security_group_id: str + :param extended_properties: Extended properties of the lab used for + experimental features + :type extended_properties: dict[str, str] + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'default_storage_account': {'readonly': True}, + 'default_premium_storage_account': {'readonly': True}, + 'artifacts_storage_account': {'readonly': True}, + 'premium_data_disk_storage_account': {'readonly': True}, + 'vault_name': {'readonly': True}, + 'created_date': {'readonly': True}, + 'vm_creation_resource_group': {'readonly': True}, + 'public_ip_id': {'readonly': True}, + 'load_balancer_id': {'readonly': True}, + 'network_security_group_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'default_storage_account': {'key': 'properties.defaultStorageAccount', 'type': 'str'}, + 'default_premium_storage_account': {'key': 'properties.defaultPremiumStorageAccount', 'type': 'str'}, + 'artifacts_storage_account': {'key': 'properties.artifactsStorageAccount', 'type': 'str'}, + 'premium_data_disk_storage_account': {'key': 'properties.premiumDataDiskStorageAccount', 'type': 'str'}, + 'vault_name': {'key': 'properties.vaultName', 'type': 'str'}, + 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, + 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, + 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, + 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, + 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementProperties'}, + 'support': {'key': 'properties.support', 'type': 'LabSupportProperties'}, + 'vm_creation_resource_group': {'key': 'properties.vmCreationResourceGroup', 'type': 'str'}, + 'public_ip_id': {'key': 'properties.publicIpId', 'type': 'str'}, + 'load_balancer_id': {'key': 'properties.loadBalancerId', 'type': 'str'}, + 'network_security_group_id': {'key': 'properties.networkSecurityGroupId', 'type': 'str'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Lab, self).__init__(**kwargs) + self.default_storage_account = None + self.default_premium_storage_account = None + self.artifacts_storage_account = None + self.premium_data_disk_storage_account = None + self.vault_name = None + self.lab_storage_type = kwargs.get('lab_storage_type', None) + self.mandatory_artifacts_resource_ids_linux = kwargs.get('mandatory_artifacts_resource_ids_linux', None) + self.mandatory_artifacts_resource_ids_windows = kwargs.get('mandatory_artifacts_resource_ids_windows', None) + self.created_date = None + self.premium_data_disks = kwargs.get('premium_data_disks', None) + self.environment_permission = kwargs.get('environment_permission', None) + self.announcement = kwargs.get('announcement', None) + self.support = kwargs.get('support', None) + self.vm_creation_resource_group = None + self.public_ip_id = None + self.load_balancer_id = None + self.network_security_group_id = None + self.extended_properties = kwargs.get('extended_properties', None) + self.provisioning_state = None + self.unique_identifier = None + + +class LabAnnouncementProperties(Model): + """Properties of a lab's announcement banner. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param title: The plain text title for the lab announcement + :type title: str + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + :param enabled: Is the lab announcement active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param expiration_date: The time at which the announcement expires (null + for never) + :type expiration_date: datetime + :param expired: Has this announcement expired? + :type expired: bool + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'expired': {'key': 'expired', 'type': 'bool'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabAnnouncementProperties, self).__init__(**kwargs) + self.title = kwargs.get('title', None) + self.markdown = kwargs.get('markdown', None) + self.enabled = kwargs.get('enabled', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.expired = kwargs.get('expired', None) + self.provisioning_state = None + self.unique_identifier = None + + +class LabAnnouncementPropertiesFragment(Model): + """Properties of a lab's announcement banner. + + :param title: The plain text title for the lab announcement + :type title: str + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + :param enabled: Is the lab announcement active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param expiration_date: The time at which the announcement expires (null + for never) + :type expiration_date: datetime + :param expired: Has this announcement expired? + :type expired: bool + """ + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'expired': {'key': 'expired', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(LabAnnouncementPropertiesFragment, self).__init__(**kwargs) + self.title = kwargs.get('title', None) + self.markdown = kwargs.get('markdown', None) + self.enabled = kwargs.get('enabled', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.expired = kwargs.get('expired', None) + + +class LabCost(Resource): + """A cost item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param target_cost: The target cost properties + :type target_cost: ~azure.mgmt.devtestlabs.models.TargetCostProperties + :ivar lab_cost_summary: The lab cost summary component of the cost data. + :vartype lab_cost_summary: + ~azure.mgmt.devtestlabs.models.LabCostSummaryProperties + :ivar lab_cost_details: The lab cost details component of the cost data. + :vartype lab_cost_details: + list[~azure.mgmt.devtestlabs.models.LabCostDetailsProperties] + :ivar resource_costs: The resource cost component of the cost data. + :vartype resource_costs: + list[~azure.mgmt.devtestlabs.models.LabResourceCostProperties] + :param currency_code: The currency code of the cost. + :type currency_code: str + :param start_date_time: The start time of the cost data. + :type start_date_time: datetime + :param end_date_time: The end time of the cost data. + :type end_date_time: datetime + :param created_date: The creation date of the cost. + :type created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'lab_cost_summary': {'readonly': True}, + 'lab_cost_details': {'readonly': True}, + 'resource_costs': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'target_cost': {'key': 'properties.targetCost', 'type': 'TargetCostProperties'}, + 'lab_cost_summary': {'key': 'properties.labCostSummary', 'type': 'LabCostSummaryProperties'}, + 'lab_cost_details': {'key': 'properties.labCostDetails', 'type': '[LabCostDetailsProperties]'}, + 'resource_costs': {'key': 'properties.resourceCosts', 'type': '[LabResourceCostProperties]'}, + 'currency_code': {'key': 'properties.currencyCode', 'type': 'str'}, + 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, + 'end_date_time': {'key': 'properties.endDateTime', 'type': 'iso-8601'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabCost, self).__init__(**kwargs) + self.target_cost = kwargs.get('target_cost', None) + self.lab_cost_summary = None + self.lab_cost_details = None + self.resource_costs = None + self.currency_code = kwargs.get('currency_code', None) + self.start_date_time = kwargs.get('start_date_time', None) + self.end_date_time = kwargs.get('end_date_time', None) + self.created_date = kwargs.get('created_date', None) + self.provisioning_state = None + self.unique_identifier = None + + +class LabCostDetailsProperties(Model): + """The properties of a lab cost item. + + :param date_property: The date of the cost item. + :type date_property: datetime + :param cost: The cost component of the cost item. + :type cost: float + :param cost_type: The type of the cost. Possible values include: + 'Unavailable', 'Reported', 'Projected' + :type cost_type: str or ~azure.mgmt.devtestlabs.models.CostType + """ + + _attribute_map = { + 'date_property': {'key': 'date', 'type': 'iso-8601'}, + 'cost': {'key': 'cost', 'type': 'float'}, + 'cost_type': {'key': 'costType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabCostDetailsProperties, self).__init__(**kwargs) + self.date_property = kwargs.get('date_property', None) + self.cost = kwargs.get('cost', None) + self.cost_type = kwargs.get('cost_type', None) + + +class LabCostSummaryProperties(Model): + """The properties of the cost summary. + + :param estimated_lab_cost: The cost component of the cost item. + :type estimated_lab_cost: float + """ + + _attribute_map = { + 'estimated_lab_cost': {'key': 'estimatedLabCost', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(LabCostSummaryProperties, self).__init__(**kwargs) + self.estimated_lab_cost = kwargs.get('estimated_lab_cost', None) + + +class LabFragment(UpdateResource): + """A lab. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_storage_type: Type of storage used by the lab. It can be either + Premium or Standard. Default is Premium. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param mandatory_artifacts_resource_ids_linux: The ordered list of + artifact resource IDs that should be applied on all Linux VM creations by + default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_linux: list[str] + :param mandatory_artifacts_resource_ids_windows: The ordered list of + artifact resource IDs that should be applied on all Windows VM creations + by default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_windows: list[str] + :param premium_data_disks: The setting to enable usage of premium data + disks. + When its value is 'Enabled', creation of standard or premium data disks is + allowed. + When its value is 'Disabled', only creation of standard data disks is + allowed. Possible values include: 'Disabled', 'Enabled' + :type premium_data_disks: str or + ~azure.mgmt.devtestlabs.models.PremiumDataDisk + :param environment_permission: The access rights to be granted to the user + when provisioning an environment. Possible values include: 'Reader', + 'Contributor' + :type environment_permission: str or + ~azure.mgmt.devtestlabs.models.EnvironmentPermission + :param announcement: The properties of any lab announcement associated + with this lab + :type announcement: + ~azure.mgmt.devtestlabs.models.LabAnnouncementPropertiesFragment + :param support: The properties of any lab support message associated with + this lab + :type support: ~azure.mgmt.devtestlabs.models.LabSupportPropertiesFragment + :param extended_properties: Extended properties of the lab used for + experimental features + :type extended_properties: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, + 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, + 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, + 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, + 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, + 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementPropertiesFragment'}, + 'support': {'key': 'properties.support', 'type': 'LabSupportPropertiesFragment'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(LabFragment, self).__init__(**kwargs) + self.lab_storage_type = kwargs.get('lab_storage_type', None) + self.mandatory_artifacts_resource_ids_linux = kwargs.get('mandatory_artifacts_resource_ids_linux', None) + self.mandatory_artifacts_resource_ids_windows = kwargs.get('mandatory_artifacts_resource_ids_windows', None) + self.premium_data_disks = kwargs.get('premium_data_disks', None) + self.environment_permission = kwargs.get('environment_permission', None) + self.announcement = kwargs.get('announcement', None) + self.support = kwargs.get('support', None) + self.extended_properties = kwargs.get('extended_properties', None) + + +class LabResourceCostProperties(Model): + """The properties of a resource cost item. + + :param resourcename: The name of the resource. + :type resourcename: str + :param resource_uid: The unique identifier of the resource. + :type resource_uid: str + :param resource_cost: The cost component of the resource cost item. + :type resource_cost: float + :param resource_type: The logical resource type (ex. virtualmachine, + storageaccount) + :type resource_type: str + :param resource_owner: The owner of the resource (ex. + janedoe@microsoft.com) + :type resource_owner: str + :param resource_pricing_tier: The category of the resource (ex. + Premium_LRS, Standard_DS1) + :type resource_pricing_tier: str + :param resource_status: The status of the resource (ex. Active) + :type resource_status: str + :param resource_id: The ID of the resource + :type resource_id: str + :param external_resource_id: The ID of the external resource + :type external_resource_id: str + """ + + _attribute_map = { + 'resourcename': {'key': 'resourcename', 'type': 'str'}, + 'resource_uid': {'key': 'resourceUId', 'type': 'str'}, + 'resource_cost': {'key': 'resourceCost', 'type': 'float'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_owner': {'key': 'resourceOwner', 'type': 'str'}, + 'resource_pricing_tier': {'key': 'resourcePricingTier', 'type': 'str'}, + 'resource_status': {'key': 'resourceStatus', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'external_resource_id': {'key': 'externalResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabResourceCostProperties, self).__init__(**kwargs) + self.resourcename = kwargs.get('resourcename', None) + self.resource_uid = kwargs.get('resource_uid', None) + self.resource_cost = kwargs.get('resource_cost', None) + self.resource_type = kwargs.get('resource_type', None) + self.resource_owner = kwargs.get('resource_owner', None) + self.resource_pricing_tier = kwargs.get('resource_pricing_tier', None) + self.resource_status = kwargs.get('resource_status', None) + self.resource_id = kwargs.get('resource_id', None) + self.external_resource_id = kwargs.get('external_resource_id', None) + + +class LabSupportProperties(Model): + """Properties of a lab's support banner. + + :param enabled: Is the lab support banner active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabSupportProperties, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.markdown = kwargs.get('markdown', None) + + +class LabSupportPropertiesFragment(Model): + """Properties of a lab's support banner. + + :param enabled: Is the lab support banner active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabSupportPropertiesFragment, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.markdown = kwargs.get('markdown', None) + + +class LabVhd(Model): + """Properties of a VHD in the lab. + + :param id: The URI to the VHD. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabVhd, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class LabVirtualMachine(Resource): + """A virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :ivar compute_vm: The compute virtual machine properties. + :vartype compute_vm: ~azure.mgmt.devtestlabs.models.ComputeVmProperties + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties + :ivar applicable_schedule: The applicable schedule for the virtual + machine. + :vartype applicable_schedule: + ~azure.mgmt.devtestlabs.models.ApplicableSchedule + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskProperties] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'compute_vm': {'readonly': True}, + 'applicable_schedule': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'compute_vm': {'key': 'properties.computeVm', 'type': 'ComputeVmProperties'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, + 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabVirtualMachine, self).__init__(**kwargs) + self.notes = kwargs.get('notes', None) + self.owner_object_id = kwargs.get('owner_object_id', None) + self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) + self.created_by_user_id = kwargs.get('created_by_user_id', None) + self.created_by_user = kwargs.get('created_by_user', None) + self.created_date = kwargs.get('created_date', None) + self.compute_id = kwargs.get('compute_id', None) + self.custom_image_id = kwargs.get('custom_image_id', None) + self.os_type = kwargs.get('os_type', None) + self.size = kwargs.get('size', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.ssh_key = kwargs.get('ssh_key', None) + self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) + self.fqdn = kwargs.get('fqdn', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) + self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) + self.artifacts = kwargs.get('artifacts', None) + self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) + self.gallery_image_reference = kwargs.get('gallery_image_reference', None) + self.plan_id = kwargs.get('plan_id', None) + self.compute_vm = None + self.network_interface = kwargs.get('network_interface', None) + self.applicable_schedule = None + self.expiration_date = kwargs.get('expiration_date', None) + self.allow_claim = kwargs.get('allow_claim', None) + self.storage_type = kwargs.get('storage_type', None) + self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) + self.environment_id = kwargs.get('environment_id', None) + self.data_disk_parameters = kwargs.get('data_disk_parameters', None) + self.schedule_parameters = kwargs.get('schedule_parameters', None) + self.last_known_power_state = kwargs.get('last_known_power_state', None) + self.provisioning_state = None + self.unique_identifier = None + + +class LabVirtualMachineCreationParameter(Model): + """Properties for creating a virtual machine. + + :param bulk_creation_parameters: The number of virtual machine instances + to create. + :type bulk_creation_parameters: + ~azure.mgmt.devtestlabs.models.BulkCreationParameters + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskProperties] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParameters'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(LabVirtualMachineCreationParameter, self).__init__(**kwargs) + self.bulk_creation_parameters = kwargs.get('bulk_creation_parameters', None) + self.notes = kwargs.get('notes', None) + self.owner_object_id = kwargs.get('owner_object_id', None) + self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) + self.created_by_user_id = kwargs.get('created_by_user_id', None) + self.created_by_user = kwargs.get('created_by_user', None) + self.created_date = kwargs.get('created_date', None) + self.compute_id = kwargs.get('compute_id', None) + self.custom_image_id = kwargs.get('custom_image_id', None) + self.os_type = kwargs.get('os_type', None) + self.size = kwargs.get('size', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.ssh_key = kwargs.get('ssh_key', None) + self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) + self.fqdn = kwargs.get('fqdn', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) + self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) + self.artifacts = kwargs.get('artifacts', None) + self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) + self.gallery_image_reference = kwargs.get('gallery_image_reference', None) + self.plan_id = kwargs.get('plan_id', None) + self.network_interface = kwargs.get('network_interface', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.allow_claim = kwargs.get('allow_claim', None) + self.storage_type = kwargs.get('storage_type', None) + self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) + self.environment_id = kwargs.get('environment_id', None) + self.data_disk_parameters = kwargs.get('data_disk_parameters', None) + self.schedule_parameters = kwargs.get('schedule_parameters', None) + self.last_known_power_state = kwargs.get('last_known_power_state', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class LabVirtualMachineCreationParameterFragment(Model): + """Properties for creating a virtual machine. + + :param bulk_creation_parameters: The number of virtual machine instances + to create. + :type bulk_creation_parameters: + ~azure.mgmt.devtestlabs.models.BulkCreationParametersFragment + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParametersFragment'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(LabVirtualMachineCreationParameterFragment, self).__init__(**kwargs) + self.bulk_creation_parameters = kwargs.get('bulk_creation_parameters', None) + self.notes = kwargs.get('notes', None) + self.owner_object_id = kwargs.get('owner_object_id', None) + self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) + self.created_by_user_id = kwargs.get('created_by_user_id', None) + self.created_by_user = kwargs.get('created_by_user', None) + self.created_date = kwargs.get('created_date', None) + self.compute_id = kwargs.get('compute_id', None) + self.custom_image_id = kwargs.get('custom_image_id', None) + self.os_type = kwargs.get('os_type', None) + self.size = kwargs.get('size', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.ssh_key = kwargs.get('ssh_key', None) + self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) + self.fqdn = kwargs.get('fqdn', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) + self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) + self.artifacts = kwargs.get('artifacts', None) + self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) + self.gallery_image_reference = kwargs.get('gallery_image_reference', None) + self.plan_id = kwargs.get('plan_id', None) + self.network_interface = kwargs.get('network_interface', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.allow_claim = kwargs.get('allow_claim', None) + self.storage_type = kwargs.get('storage_type', None) + self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) + self.environment_id = kwargs.get('environment_id', None) + self.data_disk_parameters = kwargs.get('data_disk_parameters', None) + self.schedule_parameters = kwargs.get('schedule_parameters', None) + self.last_known_power_state = kwargs.get('last_known_power_state', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class LabVirtualMachineFragment(UpdateResource): + """A virtual machine. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabVirtualMachineFragment, self).__init__(**kwargs) + self.notes = kwargs.get('notes', None) + self.owner_object_id = kwargs.get('owner_object_id', None) + self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) + self.created_by_user_id = kwargs.get('created_by_user_id', None) + self.created_by_user = kwargs.get('created_by_user', None) + self.created_date = kwargs.get('created_date', None) + self.compute_id = kwargs.get('compute_id', None) + self.custom_image_id = kwargs.get('custom_image_id', None) + self.os_type = kwargs.get('os_type', None) + self.size = kwargs.get('size', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.ssh_key = kwargs.get('ssh_key', None) + self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) + self.fqdn = kwargs.get('fqdn', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) + self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) + self.artifacts = kwargs.get('artifacts', None) + self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) + self.gallery_image_reference = kwargs.get('gallery_image_reference', None) + self.plan_id = kwargs.get('plan_id', None) + self.network_interface = kwargs.get('network_interface', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.allow_claim = kwargs.get('allow_claim', None) + self.storage_type = kwargs.get('storage_type', None) + self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) + self.environment_id = kwargs.get('environment_id', None) + self.data_disk_parameters = kwargs.get('data_disk_parameters', None) + self.schedule_parameters = kwargs.get('schedule_parameters', None) + self.last_known_power_state = kwargs.get('last_known_power_state', None) + + +class LinuxOsInfo(Model): + """Information about a Linux OS. + + :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, + DeprovisionRequested, DeprovisionApplied). Possible values include: + 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' + :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState + """ + + _attribute_map = { + 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LinuxOsInfo, self).__init__(**kwargs) + self.linux_os_state = kwargs.get('linux_os_state', None) + + +class LinuxOsInfoFragment(Model): + """Information about a Linux OS. + + :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, + DeprovisionRequested, DeprovisionApplied). Possible values include: + 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' + :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState + """ + + _attribute_map = { + 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LinuxOsInfoFragment, self).__init__(**kwargs) + self.linux_os_state = kwargs.get('linux_os_state', None) + + +class NetworkInterfaceProperties(Model): + """Properties of a network interface. + + :param virtual_network_id: The resource ID of the virtual network. + :type virtual_network_id: str + :param subnet_id: The resource ID of the sub net. + :type subnet_id: str + :param public_ip_address_id: The resource ID of the public IP address. + :type public_ip_address_id: str + :param public_ip_address: The public IP address. + :type public_ip_address: str + :param private_ip_address: The private IP address. + :type private_ip_address: str + :param dns_name: The DNS name. + :type dns_name: str + :param rdp_authority: The RdpAuthority property is a server DNS host name + or IP address followed by the service port number for RDP (Remote Desktop + Protocol). + :type rdp_authority: str + :param ssh_authority: The SshAuthority property is a server DNS host name + or IP address followed by the service port number for SSH. + :type ssh_authority: str + :param shared_public_ip_address_configuration: The configuration for + sharing a public IP address across multiple virtual machines. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfiguration + """ + + _attribute_map = { + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, + 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfiguration'}, + } + + def __init__(self, **kwargs): + super(NetworkInterfaceProperties, self).__init__(**kwargs) + self.virtual_network_id = kwargs.get('virtual_network_id', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.public_ip_address_id = kwargs.get('public_ip_address_id', None) + self.public_ip_address = kwargs.get('public_ip_address', None) + self.private_ip_address = kwargs.get('private_ip_address', None) + self.dns_name = kwargs.get('dns_name', None) + self.rdp_authority = kwargs.get('rdp_authority', None) + self.ssh_authority = kwargs.get('ssh_authority', None) + self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) + + +class NetworkInterfacePropertiesFragment(Model): + """Properties of a network interface. + + :param virtual_network_id: The resource ID of the virtual network. + :type virtual_network_id: str + :param subnet_id: The resource ID of the sub net. + :type subnet_id: str + :param public_ip_address_id: The resource ID of the public IP address. + :type public_ip_address_id: str + :param public_ip_address: The public IP address. + :type public_ip_address: str + :param private_ip_address: The private IP address. + :type private_ip_address: str + :param dns_name: The DNS name. + :type dns_name: str + :param rdp_authority: The RdpAuthority property is a server DNS host name + or IP address followed by the service port number for RDP (Remote Desktop + Protocol). + :type rdp_authority: str + :param ssh_authority: The SshAuthority property is a server DNS host name + or IP address followed by the service port number for SSH. + :type ssh_authority: str + :param shared_public_ip_address_configuration: The configuration for + sharing a public IP address across multiple virtual machines. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfigurationFragment + """ + + _attribute_map = { + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, + 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfigurationFragment'}, + } + + def __init__(self, **kwargs): + super(NetworkInterfacePropertiesFragment, self).__init__(**kwargs) + self.virtual_network_id = kwargs.get('virtual_network_id', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.public_ip_address_id = kwargs.get('public_ip_address_id', None) + self.public_ip_address = kwargs.get('public_ip_address', None) + self.private_ip_address = kwargs.get('private_ip_address', None) + self.dns_name = kwargs.get('dns_name', None) + self.rdp_authority = kwargs.get('rdp_authority', None) + self.ssh_authority = kwargs.get('ssh_authority', None) + self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) + + +class NotificationChannel(Resource): + """A notification. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param web_hook_url: The webhook URL to send notifications to. + :type web_hook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + :param description: Description of notification. + :type description: str + :param events: The list of event for which this notification is enabled. + :type events: list[~azure.mgmt.devtestlabs.models.Event] + :ivar created_date: The creation date of the notification channel. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'events': {'key': 'properties.events', 'type': '[Event]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NotificationChannel, self).__init__(**kwargs) + self.web_hook_url = kwargs.get('web_hook_url', None) + self.email_recipient = kwargs.get('email_recipient', None) + self.notification_locale = kwargs.get('notification_locale', None) + self.description = kwargs.get('description', None) + self.events = kwargs.get('events', None) + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class NotificationChannelFragment(UpdateResource): + """A notification. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param web_hook_url: The webhook URL to send notifications to. + :type web_hook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + :param description: Description of notification. + :type description: str + :param events: The list of event for which this notification is enabled. + :type events: list[~azure.mgmt.devtestlabs.models.EventFragment] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'events': {'key': 'properties.events', 'type': '[EventFragment]'}, + } + + def __init__(self, **kwargs): + super(NotificationChannelFragment, self).__init__(**kwargs) + self.web_hook_url = kwargs.get('web_hook_url', None) + self.email_recipient = kwargs.get('email_recipient', None) + self.notification_locale = kwargs.get('notification_locale', None) + self.description = kwargs.get('description', None) + self.events = kwargs.get('events', None) + + +class NotificationSettings(Model): + """Notification settings for a schedule. + + :param status: If notifications are enabled for this schedule (i.e. + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param time_in_minutes: Time in minutes before event at which notification + will be sent. + :type time_in_minutes: int + :param webhook_url: The webhook URL to which the notification will be + sent. + :type webhook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, + 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NotificationSettings, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.time_in_minutes = kwargs.get('time_in_minutes', None) + self.webhook_url = kwargs.get('webhook_url', None) + self.email_recipient = kwargs.get('email_recipient', None) + self.notification_locale = kwargs.get('notification_locale', None) + + +class NotificationSettingsFragment(Model): + """Notification settings for a schedule. + + :param status: If notifications are enabled for this schedule (i.e. + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param time_in_minutes: Time in minutes before event at which notification + will be sent. + :type time_in_minutes: int + :param webhook_url: The webhook URL to which the notification will be + sent. + :type webhook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, + 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NotificationSettingsFragment, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.time_in_minutes = kwargs.get('time_in_minutes', None) + self.webhook_url = kwargs.get('webhook_url', None) + self.email_recipient = kwargs.get('email_recipient', None) + self.notification_locale = kwargs.get('notification_locale', None) + + +class NotifyParameters(Model): + """Properties for generating a Notification. + + :param event_name: The type of event (i.e. AutoShutdown, Cost). Possible + values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + :param json_payload: Properties for the notification in json format. + :type json_payload: str + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + 'json_payload': {'key': 'jsonPayload', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NotifyParameters, self).__init__(**kwargs) + self.event_name = kwargs.get('event_name', None) + self.json_payload = kwargs.get('json_payload', None) + + +class OperationError(Model): + """Error details for the operation in case of a failure. + + :param code: The error code of the operation error. + :type code: str + :param message: The error message of the operation error. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class OperationMetadata(Model): + """The REST API operation supported by DevTestLab ResourceProvider. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that describes the operations + :type display: ~azure.mgmt.devtestlabs.models.OperationMetadataDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationMetadataDisplay'}, + } + + def __init__(self, **kwargs): + super(OperationMetadata, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + + +class OperationMetadataDisplay(Model): + """The object that describes the operations. + + :param provider: Friendly name of the resource provider + :type provider: str + :param resource: Resource type on which the operation is performed. + :type resource: str + :param operation: Operation type: read, write, delete, listKeys/action, + etc. + :type operation: str + :param description: Friendly name of the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationMetadataDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class OperationResult(Model): + """An Operation Result. + + :param status: The operation status. + :type status: str + :param status_code: The status code for the operation. Possible values + include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', + 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', + 'PartialContent', 'MultipleChoices', 'MovedPermanently', 'Redirect', + 'SeeOther', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', + 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', + 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', + 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', + 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', + 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', + 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', + 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', + 'HttpVersionNotSupported' + :type status_code: str or ~azure.mgmt.devtestlabs.models.HttpStatusCode + :param error: Error details for the operation in case of a failure. + :type error: ~azure.mgmt.devtestlabs.models.OperationError + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'OperationError'}, + } + + def __init__(self, **kwargs): + super(OperationResult, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.status_code = kwargs.get('status_code', None) + self.error = kwargs.get('error', None) + + +class ParameterInfo(Model): + """Information about an artifact's parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ParameterInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class ParametersValueFileInfo(Model): + """A file containing a set of parameter values for an ARM template. + + :param file_name: File name. + :type file_name: str + :param parameters_value_info: Contents of the file. + :type parameters_value_info: object + """ + + _attribute_map = { + 'file_name': {'key': 'fileName', 'type': 'str'}, + 'parameters_value_info': {'key': 'parametersValueInfo', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ParametersValueFileInfo, self).__init__(**kwargs) + self.file_name = kwargs.get('file_name', None) + self.parameters_value_info = kwargs.get('parameters_value_info', None) + + +class PercentageCostThresholdProperties(Model): + """Properties of a percentage cost threshold. + + :param threshold_value: The cost threshold value. + :type threshold_value: float + """ + + _attribute_map = { + 'threshold_value': {'key': 'thresholdValue', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(PercentageCostThresholdProperties, self).__init__(**kwargs) + self.threshold_value = kwargs.get('threshold_value', None) + + +class Policy(Resource): + """A Policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the policy. + :type description: str + :param status: The status of the policy. Possible values include: + 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus + :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, + MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', + 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', + 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', + 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' + :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName + :param fact_data: The fact data of the policy. + :type fact_data: str + :param threshold: The threshold of the policy (i.e. a number for + MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). + :type threshold: str + :param evaluator_type: The evaluator type of the policy (i.e. + AllowedValuesPolicy, MaxValuePolicy). Possible values include: + 'AllowedValuesPolicy', 'MaxValuePolicy' + :type evaluator_type: str or + ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType + :ivar created_date: The creation date of the policy. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'fact_name': {'key': 'properties.factName', 'type': 'str'}, + 'fact_data': {'key': 'properties.factData', 'type': 'str'}, + 'threshold': {'key': 'properties.threshold', 'type': 'str'}, + 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Policy, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.status = kwargs.get('status', None) + self.fact_name = kwargs.get('fact_name', None) + self.fact_data = kwargs.get('fact_data', None) + self.threshold = kwargs.get('threshold', None) + self.evaluator_type = kwargs.get('evaluator_type', None) + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class PolicyFragment(UpdateResource): + """A Policy. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the policy. + :type description: str + :param status: The status of the policy. Possible values include: + 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus + :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, + MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', + 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', + 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', + 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' + :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName + :param fact_data: The fact data of the policy. + :type fact_data: str + :param threshold: The threshold of the policy (i.e. a number for + MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). + :type threshold: str + :param evaluator_type: The evaluator type of the policy (i.e. + AllowedValuesPolicy, MaxValuePolicy). Possible values include: + 'AllowedValuesPolicy', 'MaxValuePolicy' + :type evaluator_type: str or + ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'fact_name': {'key': 'properties.factName', 'type': 'str'}, + 'fact_data': {'key': 'properties.factData', 'type': 'str'}, + 'threshold': {'key': 'properties.threshold', 'type': 'str'}, + 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PolicyFragment, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.status = kwargs.get('status', None) + self.fact_name = kwargs.get('fact_name', None) + self.fact_data = kwargs.get('fact_data', None) + self.threshold = kwargs.get('threshold', None) + self.evaluator_type = kwargs.get('evaluator_type', None) + + +class PolicySetResult(Model): + """Result of a policy set evaluation. + + :param has_error: A value indicating whether this policy set evaluation + has discovered violations. + :type has_error: bool + :param policy_violations: The list of policy violations. + :type policy_violations: + list[~azure.mgmt.devtestlabs.models.PolicyViolation] + """ + + _attribute_map = { + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'policy_violations': {'key': 'policyViolations', 'type': '[PolicyViolation]'}, + } + + def __init__(self, **kwargs): + super(PolicySetResult, self).__init__(**kwargs) + self.has_error = kwargs.get('has_error', None) + self.policy_violations = kwargs.get('policy_violations', None) + + +class PolicyViolation(Model): + """Policy violation. + + :param code: The code of the policy violation. + :type code: str + :param message: The message of the policy violation. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PolicyViolation, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class Port(Model): + """Properties of a network port. + + :param transport_protocol: Protocol type of the port. Possible values + include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param backend_port: Backend port of the target virtual machine. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(Port, self).__init__(**kwargs) + self.transport_protocol = kwargs.get('transport_protocol', None) + self.backend_port = kwargs.get('backend_port', None) + + +class PortFragment(Model): + """Properties of a network port. + + :param transport_protocol: Protocol type of the port. Possible values + include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param backend_port: Backend port of the target virtual machine. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(PortFragment, self).__init__(**kwargs) + self.transport_protocol = kwargs.get('transport_protocol', None) + self.backend_port = kwargs.get('backend_port', None) + + +class RdpConnection(Model): + """Represents a .rdp file. + + :param contents: The contents of the .rdp file + :type contents: str + """ + + _attribute_map = { + 'contents': {'key': 'contents', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RdpConnection, self).__init__(**kwargs) + self.contents = kwargs.get('contents', None) + + +class ResizeLabVirtualMachineProperties(Model): + """Request body for resizing a virtual machine. + + :param size: Specifies the size of the virtual machine. + :type size: str + """ + + _attribute_map = { + 'size': {'key': 'size', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResizeLabVirtualMachineProperties, self).__init__(**kwargs) + self.size = kwargs.get('size', None) + + +class RetargetScheduleProperties(Model): + """Properties for retargeting a virtual machine schedule. + + :param current_resource_id: The resource Id of the virtual machine on + which the schedule operates + :type current_resource_id: str + :param target_resource_id: The resource Id of the virtual machine that the + schedule should be retargeted to + :type target_resource_id: str + """ + + _attribute_map = { + 'current_resource_id': {'key': 'currentResourceId', 'type': 'str'}, + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RetargetScheduleProperties, self).__init__(**kwargs) + self.current_resource_id = kwargs.get('current_resource_id', None) + self.target_resource_id = kwargs.get('target_resource_id', None) + + +class Schedule(Resource): + """A schedule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettings + :ivar created_date: The creation date of the schedule. + :vartype created_date: datetime + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Schedule, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.task_type = kwargs.get('task_type', None) + self.weekly_recurrence = kwargs.get('weekly_recurrence', None) + self.daily_recurrence = kwargs.get('daily_recurrence', None) + self.hourly_recurrence = kwargs.get('hourly_recurrence', None) + self.time_zone_id = kwargs.get('time_zone_id', None) + self.notification_settings = kwargs.get('notification_settings', None) + self.created_date = None + self.target_resource_id = kwargs.get('target_resource_id', None) + self.provisioning_state = None + self.unique_identifier = None + + +class ScheduleCreationParameter(Model): + """Properties for creating a schedule. + + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettings + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ScheduleCreationParameter, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.task_type = kwargs.get('task_type', None) + self.weekly_recurrence = kwargs.get('weekly_recurrence', None) + self.daily_recurrence = kwargs.get('daily_recurrence', None) + self.hourly_recurrence = kwargs.get('hourly_recurrence', None) + self.time_zone_id = kwargs.get('time_zone_id', None) + self.notification_settings = kwargs.get('notification_settings', None) + self.target_resource_id = kwargs.get('target_resource_id', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ScheduleCreationParameterFragment(Model): + """Properties for creating a schedule. + + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: + ~azure.mgmt.devtestlabs.models.WeekDetailsFragment + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: + ~azure.mgmt.devtestlabs.models.HourDetailsFragment + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ScheduleCreationParameterFragment, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.task_type = kwargs.get('task_type', None) + self.weekly_recurrence = kwargs.get('weekly_recurrence', None) + self.daily_recurrence = kwargs.get('daily_recurrence', None) + self.hourly_recurrence = kwargs.get('hourly_recurrence', None) + self.time_zone_id = kwargs.get('time_zone_id', None) + self.notification_settings = kwargs.get('notification_settings', None) + self.target_resource_id = kwargs.get('target_resource_id', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ScheduleFragment(UpdateResource): + """A schedule. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: + ~azure.mgmt.devtestlabs.models.WeekDetailsFragment + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: + ~azure.mgmt.devtestlabs.models.HourDetailsFragment + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ScheduleFragment, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.task_type = kwargs.get('task_type', None) + self.weekly_recurrence = kwargs.get('weekly_recurrence', None) + self.daily_recurrence = kwargs.get('daily_recurrence', None) + self.hourly_recurrence = kwargs.get('hourly_recurrence', None) + self.time_zone_id = kwargs.get('time_zone_id', None) + self.notification_settings = kwargs.get('notification_settings', None) + self.target_resource_id = kwargs.get('target_resource_id', None) + + +class Secret(Resource): + """A secret. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param value: The value of the secret for secret creation. + :type value: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Secret, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.provisioning_state = None + self.unique_identifier = None + + +class SecretFragment(UpdateResource): + """A secret. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param value: The value of the secret for secret creation. + :type value: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretFragment, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class ServiceFabric(Resource): + """A Service Fabric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param external_service_fabric_id: The backing service fabric resource's + id + :type external_service_fabric_id: str + :param environment_id: The resource id of the environment under which the + service fabric resource is present + :type environment_id: str + :ivar applicable_schedule: The applicable schedule for the virtual + machine. + :vartype applicable_schedule: + ~azure.mgmt.devtestlabs.models.ApplicableSchedule + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'applicable_schedule': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceFabric, self).__init__(**kwargs) + self.external_service_fabric_id = kwargs.get('external_service_fabric_id', None) + self.environment_id = kwargs.get('environment_id', None) + self.applicable_schedule = None + self.provisioning_state = None + self.unique_identifier = None + + +class ServiceFabricFragment(UpdateResource): + """A Service Fabric. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param external_service_fabric_id: The backing service fabric resource's + id + :type external_service_fabric_id: str + :param environment_id: The resource id of the environment under which the + service fabric resource is present + :type environment_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceFabricFragment, self).__init__(**kwargs) + self.external_service_fabric_id = kwargs.get('external_service_fabric_id', None) + self.environment_id = kwargs.get('environment_id', None) + + +class ServiceRunner(Resource): + """A container for a managed identity to execute DevTest lab services. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.devtestlabs.models.IdentityProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, + } + + def __init__(self, **kwargs): + super(ServiceRunner, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + + +class SharedPublicIpAddressConfiguration(Model): + """Properties of a virtual machine that determine how it is connected to a + load balancer. + + :param inbound_nat_rules: The incoming NAT rules + :type inbound_nat_rules: + list[~azure.mgmt.devtestlabs.models.InboundNatRule] + """ + + _attribute_map = { + 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRule]'}, + } + + def __init__(self, **kwargs): + super(SharedPublicIpAddressConfiguration, self).__init__(**kwargs) + self.inbound_nat_rules = kwargs.get('inbound_nat_rules', None) + + +class SharedPublicIpAddressConfigurationFragment(Model): + """Properties of a virtual machine that determine how it is connected to a + load balancer. + + :param inbound_nat_rules: The incoming NAT rules + :type inbound_nat_rules: + list[~azure.mgmt.devtestlabs.models.InboundNatRuleFragment] + """ + + _attribute_map = { + 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRuleFragment]'}, + } + + def __init__(self, **kwargs): + super(SharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) + self.inbound_nat_rules = kwargs.get('inbound_nat_rules', None) + + +class ShutdownNotificationContent(Model): + """The contents of a shutdown notification. Webhooks can use this type to + deserialize the request body when they get notified of an imminent + shutdown. + + :param skip_url: The URL to skip auto-shutdown. + :type skip_url: str + :param delay_url60: The URL to delay shutdown by 60 minutes. + :type delay_url60: str + :param delay_url120: The URL to delay shutdown by 2 hours. + :type delay_url120: str + :param vm_name: The virtual machine to be shut down. + :type vm_name: str + :param guid: The GUID for the virtual machine to be shut down. + :type guid: str + :param owner: The owner of the virtual machine. + :type owner: str + :param vm_url: The URL of the virtual machine. + :type vm_url: str + :param minutes_until_shutdown: Minutes remaining until shutdown + :type minutes_until_shutdown: str + :param event_type: The event for which a notification will be sent. + :type event_type: str + :param text: The text for the notification. + :type text: str + :param subscription_id: The subscription ID for the schedule. + :type subscription_id: str + :param resource_group_name: The resource group name for the schedule. + :type resource_group_name: str + :param lab_name: The lab for the schedule. + :type lab_name: str + """ + + _attribute_map = { + 'skip_url': {'key': 'skipUrl', 'type': 'str'}, + 'delay_url60': {'key': 'delayUrl60', 'type': 'str'}, + 'delay_url120': {'key': 'delayUrl120', 'type': 'str'}, + 'vm_name': {'key': 'vmName', 'type': 'str'}, + 'guid': {'key': 'guid', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'str'}, + 'vm_url': {'key': 'vmUrl', 'type': 'str'}, + 'minutes_until_shutdown': {'key': 'minutesUntilShutdown', 'type': 'str'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'lab_name': {'key': 'labName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ShutdownNotificationContent, self).__init__(**kwargs) + self.skip_url = kwargs.get('skip_url', None) + self.delay_url60 = kwargs.get('delay_url60', None) + self.delay_url120 = kwargs.get('delay_url120', None) + self.vm_name = kwargs.get('vm_name', None) + self.guid = kwargs.get('guid', None) + self.owner = kwargs.get('owner', None) + self.vm_url = kwargs.get('vm_url', None) + self.minutes_until_shutdown = kwargs.get('minutes_until_shutdown', None) + self.event_type = kwargs.get('event_type', None) + self.text = kwargs.get('text', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group_name = kwargs.get('resource_group_name', None) + self.lab_name = kwargs.get('lab_name', None) + + +class Subnet(Model): + """Subnet information. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name of the subnet as seen in the lab. + :type lab_subnet_name: str + :param allow_public_ip: The permission policy of the subnet for allowing + public IP addresses (i.e. Allow, Deny)). Possible values include: + 'Default', 'Deny', 'Allow' + :type allow_public_ip: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Subnet, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.allow_public_ip = kwargs.get('allow_public_ip', None) + + +class SubnetFragment(Model): + """Subnet information. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name of the subnet as seen in the lab. + :type lab_subnet_name: str + :param allow_public_ip: The permission policy of the subnet for allowing + public IP addresses (i.e. Allow, Deny)). Possible values include: + 'Default', 'Deny', 'Allow' + :type allow_public_ip: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubnetFragment, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.allow_public_ip = kwargs.get('allow_public_ip', None) + + +class SubnetOverride(Model): + """Property overrides on a subnet of a virtual network. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name given to the subnet within the lab. + :type lab_subnet_name: str + :param use_in_vm_creation_permission: Indicates whether this subnet can be + used during virtual machine creation (i.e. Allow, Deny). Possible values + include: 'Default', 'Deny', 'Allow' + :type use_in_vm_creation_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param use_public_ip_address_permission: Indicates whether public IP + addresses can be assigned to virtual machines on this subnet (i.e. Allow, + Deny). Possible values include: 'Default', 'Deny', 'Allow' + :type use_public_ip_address_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param shared_public_ip_address_configuration: Properties that virtual + machines on this subnet will share. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfiguration + :param virtual_network_pool_name: The virtual network pool associated with + this subnet. + :type virtual_network_pool_name: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, + 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfiguration'}, + 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubnetOverride, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.use_in_vm_creation_permission = kwargs.get('use_in_vm_creation_permission', None) + self.use_public_ip_address_permission = kwargs.get('use_public_ip_address_permission', None) + self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) + self.virtual_network_pool_name = kwargs.get('virtual_network_pool_name', None) + + +class SubnetOverrideFragment(Model): + """Property overrides on a subnet of a virtual network. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name given to the subnet within the lab. + :type lab_subnet_name: str + :param use_in_vm_creation_permission: Indicates whether this subnet can be + used during virtual machine creation (i.e. Allow, Deny). Possible values + include: 'Default', 'Deny', 'Allow' + :type use_in_vm_creation_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param use_public_ip_address_permission: Indicates whether public IP + addresses can be assigned to virtual machines on this subnet (i.e. Allow, + Deny). Possible values include: 'Default', 'Deny', 'Allow' + :type use_public_ip_address_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param shared_public_ip_address_configuration: Properties that virtual + machines on this subnet will share. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfigurationFragment + :param virtual_network_pool_name: The virtual network pool associated with + this subnet. + :type virtual_network_pool_name: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, + 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfigurationFragment'}, + 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubnetOverrideFragment, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.use_in_vm_creation_permission = kwargs.get('use_in_vm_creation_permission', None) + self.use_public_ip_address_permission = kwargs.get('use_public_ip_address_permission', None) + self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) + self.virtual_network_pool_name = kwargs.get('virtual_network_pool_name', None) + + +class SubnetSharedPublicIpAddressConfiguration(Model): + """Configuration for public IP address sharing. + + :param allowed_ports: Backend ports that virtual machines on this subnet + are allowed to expose + :type allowed_ports: list[~azure.mgmt.devtestlabs.models.Port] + """ + + _attribute_map = { + 'allowed_ports': {'key': 'allowedPorts', 'type': '[Port]'}, + } + + def __init__(self, **kwargs): + super(SubnetSharedPublicIpAddressConfiguration, self).__init__(**kwargs) + self.allowed_ports = kwargs.get('allowed_ports', None) + + +class SubnetSharedPublicIpAddressConfigurationFragment(Model): + """Configuration for public IP address sharing. + + :param allowed_ports: Backend ports that virtual machines on this subnet + are allowed to expose + :type allowed_ports: list[~azure.mgmt.devtestlabs.models.PortFragment] + """ + + _attribute_map = { + 'allowed_ports': {'key': 'allowedPorts', 'type': '[PortFragment]'}, + } + + def __init__(self, **kwargs): + super(SubnetSharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) + self.allowed_ports = kwargs.get('allowed_ports', None) + + +class TargetCostProperties(Model): + """Properties of a cost target. + + :param status: Target cost status. Possible values include: 'Enabled', + 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.TargetCostStatus + :param target: Lab target cost + :type target: int + :param cost_thresholds: Cost thresholds. + :type cost_thresholds: + list[~azure.mgmt.devtestlabs.models.CostThresholdProperties] + :param cycle_start_date_time: Reporting cycle start date. + :type cycle_start_date_time: datetime + :param cycle_end_date_time: Reporting cycle end date. + :type cycle_end_date_time: datetime + :param cycle_type: Reporting cycle type. Possible values include: + 'CalendarMonth', 'Custom' + :type cycle_type: str or ~azure.mgmt.devtestlabs.models.ReportingCycleType + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'int'}, + 'cost_thresholds': {'key': 'costThresholds', 'type': '[CostThresholdProperties]'}, + 'cycle_start_date_time': {'key': 'cycleStartDateTime', 'type': 'iso-8601'}, + 'cycle_end_date_time': {'key': 'cycleEndDateTime', 'type': 'iso-8601'}, + 'cycle_type': {'key': 'cycleType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TargetCostProperties, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.target = kwargs.get('target', None) + self.cost_thresholds = kwargs.get('cost_thresholds', None) + self.cycle_start_date_time = kwargs.get('cycle_start_date_time', None) + self.cycle_end_date_time = kwargs.get('cycle_end_date_time', None) + self.cycle_type = kwargs.get('cycle_type', None) + + +class User(Resource): + """Profile of a lab user. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the user. + :type identity: ~azure.mgmt.devtestlabs.models.UserIdentity + :param secret_store: The secret store of the user. + :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStore + :ivar created_date: The creation date of the user profile. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'properties.identity', 'type': 'UserIdentity'}, + 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStore'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(User, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.secret_store = kwargs.get('secret_store', None) + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class UserFragment(UpdateResource): + """Profile of a lab user. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the user. + :type identity: ~azure.mgmt.devtestlabs.models.UserIdentityFragment + :param secret_store: The secret store of the user. + :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStoreFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'properties.identity', 'type': 'UserIdentityFragment'}, + 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStoreFragment'}, + } + + def __init__(self, **kwargs): + super(UserFragment, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.secret_store = kwargs.get('secret_store', None) + + +class UserIdentity(Model): + """Identity attributes of a lab user. + + :param principal_name: Set to the principal name / UPN of the client JWT + making the request. + :type principal_name: str + :param principal_id: Set to the principal Id of the client JWT making the + request. Service principal will not have the principal Id. + :type principal_id: str + :param tenant_id: Set to the tenant ID of the client JWT making the + request. + :type tenant_id: str + :param object_id: Set to the object Id of the client JWT making the + request. Not all users have object Id. For CSP (reseller) scenarios for + example, object Id is not available. + :type object_id: str + :param app_id: Set to the app Id of the client JWT making the request. + :type app_id: str + """ + + _attribute_map = { + 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'app_id': {'key': 'appId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserIdentity, self).__init__(**kwargs) + self.principal_name = kwargs.get('principal_name', None) + self.principal_id = kwargs.get('principal_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.object_id = kwargs.get('object_id', None) + self.app_id = kwargs.get('app_id', None) + + +class UserIdentityFragment(Model): + """Identity attributes of a lab user. + + :param principal_name: Set to the principal name / UPN of the client JWT + making the request. + :type principal_name: str + :param principal_id: Set to the principal Id of the client JWT making the + request. Service principal will not have the principal Id. + :type principal_id: str + :param tenant_id: Set to the tenant ID of the client JWT making the + request. + :type tenant_id: str + :param object_id: Set to the object Id of the client JWT making the + request. Not all users have object Id. For CSP (reseller) scenarios for + example, object Id is not available. + :type object_id: str + :param app_id: Set to the app Id of the client JWT making the request. + :type app_id: str + """ + + _attribute_map = { + 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'app_id': {'key': 'appId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserIdentityFragment, self).__init__(**kwargs) + self.principal_name = kwargs.get('principal_name', None) + self.principal_id = kwargs.get('principal_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.object_id = kwargs.get('object_id', None) + self.app_id = kwargs.get('app_id', None) + + +class UserSecretStore(Model): + """Properties of a user's secret store. + + :param key_vault_uri: The URI of the user's Key vault. + :type key_vault_uri: str + :param key_vault_id: The ID of the user's Key vault. + :type key_vault_id: str + """ + + _attribute_map = { + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserSecretStore, self).__init__(**kwargs) + self.key_vault_uri = kwargs.get('key_vault_uri', None) + self.key_vault_id = kwargs.get('key_vault_id', None) + + +class UserSecretStoreFragment(Model): + """Properties of a user's secret store. + + :param key_vault_uri: The URI of the user's Key vault. + :type key_vault_uri: str + :param key_vault_id: The ID of the user's Key vault. + :type key_vault_id: str + """ + + _attribute_map = { + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserSecretStoreFragment, self).__init__(**kwargs) + self.key_vault_uri = kwargs.get('key_vault_uri', None) + self.key_vault_id = kwargs.get('key_vault_id', None) + + +class VirtualNetwork(Resource): + """A virtual network. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param allowed_subnets: The allowed subnets of the virtual network. + :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.Subnet] + :param description: The description of the virtual network. + :type description: str + :param external_provider_resource_id: The Microsoft.Network resource + identifier of the virtual network. + :type external_provider_resource_id: str + :ivar external_subnets: The external subnet properties. + :vartype external_subnets: + list[~azure.mgmt.devtestlabs.models.ExternalSubnet] + :param subnet_overrides: The subnet overrides of the virtual network. + :type subnet_overrides: + list[~azure.mgmt.devtestlabs.models.SubnetOverride] + :ivar created_date: The creation date of the virtual network. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'external_subnets': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[Subnet]'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, + 'external_subnets': {'key': 'properties.externalSubnets', 'type': '[ExternalSubnet]'}, + 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverride]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualNetwork, self).__init__(**kwargs) + self.allowed_subnets = kwargs.get('allowed_subnets', None) + self.description = kwargs.get('description', None) + self.external_provider_resource_id = kwargs.get('external_provider_resource_id', None) + self.external_subnets = None + self.subnet_overrides = kwargs.get('subnet_overrides', None) + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class VirtualNetworkFragment(UpdateResource): + """A virtual network. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param allowed_subnets: The allowed subnets of the virtual network. + :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.SubnetFragment] + :param description: The description of the virtual network. + :type description: str + :param external_provider_resource_id: The Microsoft.Network resource + identifier of the virtual network. + :type external_provider_resource_id: str + :param subnet_overrides: The subnet overrides of the virtual network. + :type subnet_overrides: + list[~azure.mgmt.devtestlabs.models.SubnetOverrideFragment] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[SubnetFragment]'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, + 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverrideFragment]'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkFragment, self).__init__(**kwargs) + self.allowed_subnets = kwargs.get('allowed_subnets', None) + self.description = kwargs.get('description', None) + self.external_provider_resource_id = kwargs.get('external_provider_resource_id', None) + self.subnet_overrides = kwargs.get('subnet_overrides', None) + + +class WeekDetails(Model): + """Properties of a weekly schedule. + + :param weekdays: The days of the week for which the schedule is set (e.g. + Sunday, Monday, Tuesday, etc.). + :type weekdays: list[str] + :param time: The time of the day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'weekdays': {'key': 'weekdays', 'type': '[str]'}, + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WeekDetails, self).__init__(**kwargs) + self.weekdays = kwargs.get('weekdays', None) + self.time = kwargs.get('time', None) + + +class WeekDetailsFragment(Model): + """Properties of a weekly schedule. + + :param weekdays: The days of the week for which the schedule is set (e.g. + Sunday, Monday, Tuesday, etc.). + :type weekdays: list[str] + :param time: The time of the day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'weekdays': {'key': 'weekdays', 'type': '[str]'}, + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WeekDetailsFragment, self).__init__(**kwargs) + self.weekdays = kwargs.get('weekdays', None) + self.time = kwargs.get('time', None) + + +class WindowsOsInfo(Model): + """Information about a Windows OS. + + :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, + SysprepRequested, SysprepApplied). Possible values include: + 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' + :type windows_os_state: str or + ~azure.mgmt.devtestlabs.models.WindowsOsState + """ + + _attribute_map = { + 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WindowsOsInfo, self).__init__(**kwargs) + self.windows_os_state = kwargs.get('windows_os_state', None) + + +class WindowsOsInfoFragment(Model): + """Information about a Windows OS. + + :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, + SysprepRequested, SysprepApplied). Possible values include: + 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' + :type windows_os_state: str or + ~azure.mgmt.devtestlabs.models.WindowsOsState + """ + + _attribute_map = { + 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WindowsOsInfoFragment, self).__init__(**kwargs) + self.windows_os_state = kwargs.get('windows_os_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models_py3.py new file mode 100644 index 000000000000..17a0bd5726ce --- /dev/null +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models_py3.py @@ -0,0 +1,5702 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Resource(Model): + """An Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class ApplicableSchedule(Resource): + """Schedules applicable to a virtual machine. The schedules may have been + defined on a VM or on lab level. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set + at the lab or lab resource level. + :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.Schedule + :param lab_vms_startup: The auto-startup schedule, if one has been set at + the lab or lab resource level. + :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.Schedule + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'Schedule'}, + 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'Schedule'}, + } + + def __init__(self, *, location: str=None, tags=None, lab_vms_shutdown=None, lab_vms_startup=None, **kwargs) -> None: + super(ApplicableSchedule, self).__init__(location=location, tags=tags, **kwargs) + self.lab_vms_shutdown = lab_vms_shutdown + self.lab_vms_startup = lab_vms_startup + + +class UpdateResource(Model): + """Represents an update resource. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(UpdateResource, self).__init__(**kwargs) + self.tags = tags + + +class ApplicableScheduleFragment(UpdateResource): + """Schedules applicable to a virtual machine. The schedules may have been + defined on a VM or on lab level. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set + at the lab or lab resource level. + :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.ScheduleFragment + :param lab_vms_startup: The auto-startup schedule, if one has been set at + the lab or lab resource level. + :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.ScheduleFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'ScheduleFragment'}, + 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'ScheduleFragment'}, + } + + def __init__(self, *, tags=None, lab_vms_shutdown=None, lab_vms_startup=None, **kwargs) -> None: + super(ApplicableScheduleFragment, self).__init__(tags=tags, **kwargs) + self.lab_vms_shutdown = lab_vms_shutdown + self.lab_vms_startup = lab_vms_startup + + +class ApplyArtifactsRequest(Model): + """Request body for applying artifacts to a virtual machine. + + :param artifacts: The list of artifacts to apply. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + """ + + _attribute_map = { + 'artifacts': {'key': 'artifacts', 'type': '[ArtifactInstallProperties]'}, + } + + def __init__(self, *, artifacts=None, **kwargs) -> None: + super(ApplyArtifactsRequest, self).__init__(**kwargs) + self.artifacts = artifacts + + +class ArmTemplate(Resource): + """An Azure Resource Manager template. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar display_name: The display name of the ARM template. + :vartype display_name: str + :ivar description: The description of the ARM template. + :vartype description: str + :ivar publisher: The publisher of the ARM template. + :vartype publisher: str + :ivar icon: The URI to the icon of the ARM template. + :vartype icon: str + :ivar contents: The contents of the ARM template. + :vartype contents: object + :ivar created_date: The creation date of the armTemplate. + :vartype created_date: datetime + :ivar parameters_value_files_info: File name and parameter values + information from all azuredeploy.*.parameters.json for the ARM template. + :vartype parameters_value_files_info: + list[~azure.mgmt.devtestlabs.models.ParametersValueFileInfo] + :ivar enabled: Whether or not ARM template is enabled for use by lab user. + :vartype enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'publisher': {'readonly': True}, + 'icon': {'readonly': True}, + 'contents': {'readonly': True}, + 'created_date': {'readonly': True}, + 'parameters_value_files_info': {'readonly': True}, + 'enabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'contents': {'key': 'properties.contents', 'type': 'object'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'parameters_value_files_info': {'key': 'properties.parametersValueFilesInfo', 'type': '[ParametersValueFileInfo]'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(ArmTemplate, self).__init__(location=location, tags=tags, **kwargs) + self.display_name = None + self.description = None + self.publisher = None + self.icon = None + self.contents = None + self.created_date = None + self.parameters_value_files_info = None + self.enabled = None + + +class ArmTemplateInfo(Model): + """Information about a generated ARM template. + + :param template: The template's contents. + :type template: object + :param parameters: The parameters of the ARM template. + :type parameters: object + """ + + _attribute_map = { + 'template': {'key': 'template', 'type': 'object'}, + 'parameters': {'key': 'parameters', 'type': 'object'}, + } + + def __init__(self, *, template=None, parameters=None, **kwargs) -> None: + super(ArmTemplateInfo, self).__init__(**kwargs) + self.template = template + self.parameters = parameters + + +class ArmTemplateParameterProperties(Model): + """Properties of an Azure Resource Manager template parameter. + + :param name: The name of the template parameter. + :type name: str + :param value: The value of the template parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ArmTemplateParameterProperties, self).__init__(**kwargs) + self.name = name + self.value = value + + +class ArmTemplateParameterPropertiesFragment(Model): + """Properties of an Azure Resource Manager template parameter. + + :param name: The name of the template parameter. + :type name: str + :param value: The value of the template parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ArmTemplateParameterPropertiesFragment, self).__init__(**kwargs) + self.name = name + self.value = value + + +class Artifact(Resource): + """An artifact. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar title: The artifact's title. + :vartype title: str + :ivar description: The artifact's description. + :vartype description: str + :ivar publisher: The artifact's publisher. + :vartype publisher: str + :ivar file_path: The file path to the artifact. + :vartype file_path: str + :ivar icon: The URI to the artifact icon. + :vartype icon: str + :ivar target_os_type: The artifact's target OS. + :vartype target_os_type: str + :ivar parameters: The artifact's parameters. + :vartype parameters: object + :ivar created_date: The artifact's creation date. + :vartype created_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'title': {'readonly': True}, + 'description': {'readonly': True}, + 'publisher': {'readonly': True}, + 'file_path': {'readonly': True}, + 'icon': {'readonly': True}, + 'target_os_type': {'readonly': True}, + 'parameters': {'readonly': True}, + 'created_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'file_path': {'key': 'properties.filePath', 'type': 'str'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'target_os_type': {'key': 'properties.targetOsType', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': 'object'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(Artifact, self).__init__(location=location, tags=tags, **kwargs) + self.title = None + self.description = None + self.publisher = None + self.file_path = None + self.icon = None + self.target_os_type = None + self.parameters = None + self.created_date = None + + +class ArtifactDeploymentStatusProperties(Model): + """Properties of an artifact deployment. + + :param deployment_status: The deployment status of the artifact. + :type deployment_status: str + :param artifacts_applied: The total count of the artifacts that were + successfully applied. + :type artifacts_applied: int + :param total_artifacts: The total count of the artifacts that were + tentatively applied. + :type total_artifacts: int + """ + + _attribute_map = { + 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, + 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, + 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, + } + + def __init__(self, *, deployment_status: str=None, artifacts_applied: int=None, total_artifacts: int=None, **kwargs) -> None: + super(ArtifactDeploymentStatusProperties, self).__init__(**kwargs) + self.deployment_status = deployment_status + self.artifacts_applied = artifacts_applied + self.total_artifacts = total_artifacts + + +class ArtifactDeploymentStatusPropertiesFragment(Model): + """Properties of an artifact deployment. + + :param deployment_status: The deployment status of the artifact. + :type deployment_status: str + :param artifacts_applied: The total count of the artifacts that were + successfully applied. + :type artifacts_applied: int + :param total_artifacts: The total count of the artifacts that were + tentatively applied. + :type total_artifacts: int + """ + + _attribute_map = { + 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, + 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, + 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, + } + + def __init__(self, *, deployment_status: str=None, artifacts_applied: int=None, total_artifacts: int=None, **kwargs) -> None: + super(ArtifactDeploymentStatusPropertiesFragment, self).__init__(**kwargs) + self.deployment_status = deployment_status + self.artifacts_applied = artifacts_applied + self.total_artifacts = total_artifacts + + +class ArtifactInstallProperties(Model): + """Properties of an artifact. + + :param artifact_id: The artifact's identifier. + :type artifact_id: str + :param artifact_title: The artifact's title. + :type artifact_title: str + :param parameters: The parameters of the artifact. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArtifactParameterProperties] + :param status: The status of the artifact. + :type status: str + :param deployment_status_message: The status message from the deployment. + :type deployment_status_message: str + :param vm_extension_status_message: The status message from the virtual + machine extension. + :type vm_extension_status_message: str + :param install_time: The time that the artifact starts to install on the + virtual machine. + :type install_time: datetime + """ + + _attribute_map = { + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterProperties]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, + 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, + 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, artifact_id: str=None, artifact_title: str=None, parameters=None, status: str=None, deployment_status_message: str=None, vm_extension_status_message: str=None, install_time=None, **kwargs) -> None: + super(ArtifactInstallProperties, self).__init__(**kwargs) + self.artifact_id = artifact_id + self.artifact_title = artifact_title + self.parameters = parameters + self.status = status + self.deployment_status_message = deployment_status_message + self.vm_extension_status_message = vm_extension_status_message + self.install_time = install_time + + +class ArtifactInstallPropertiesFragment(Model): + """Properties of an artifact. + + :param artifact_id: The artifact's identifier. + :type artifact_id: str + :param artifact_title: The artifact's title. + :type artifact_title: str + :param parameters: The parameters of the artifact. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArtifactParameterPropertiesFragment] + :param status: The status of the artifact. + :type status: str + :param deployment_status_message: The status message from the deployment. + :type deployment_status_message: str + :param vm_extension_status_message: The status message from the virtual + machine extension. + :type vm_extension_status_message: str + :param install_time: The time that the artifact starts to install on the + virtual machine. + :type install_time: datetime + """ + + _attribute_map = { + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterPropertiesFragment]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, + 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, + 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, artifact_id: str=None, artifact_title: str=None, parameters=None, status: str=None, deployment_status_message: str=None, vm_extension_status_message: str=None, install_time=None, **kwargs) -> None: + super(ArtifactInstallPropertiesFragment, self).__init__(**kwargs) + self.artifact_id = artifact_id + self.artifact_title = artifact_title + self.parameters = parameters + self.status = status + self.deployment_status_message = deployment_status_message + self.vm_extension_status_message = vm_extension_status_message + self.install_time = install_time + + +class ArtifactParameterProperties(Model): + """Properties of an artifact parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ArtifactParameterProperties, self).__init__(**kwargs) + self.name = name + self.value = value + + +class ArtifactParameterPropertiesFragment(Model): + """Properties of an artifact parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ArtifactParameterPropertiesFragment, self).__init__(**kwargs) + self.name = name + self.value = value + + +class ArtifactSource(Resource): + """Properties of an artifact source. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param display_name: The artifact source's display name. + :type display_name: str + :param uri: The artifact source's URI. + :type uri: str + :param source_type: The artifact source's type. Possible values include: + 'VsoGit', 'GitHub' + :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType + :param folder_path: The folder containing artifacts. + :type folder_path: str + :param arm_template_folder_path: The folder containing Azure Resource + Manager templates. + :type arm_template_folder_path: str + :param branch_ref: The artifact source's branch reference. + :type branch_ref: str + :param security_token: The security token to authenticate to the artifact + source. + :type security_token: str + :param status: Indicates if the artifact source is enabled (values: + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :ivar created_date: The artifact source's creation date. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, + 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, + 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, display_name: str=None, uri: str=None, source_type=None, folder_path: str=None, arm_template_folder_path: str=None, branch_ref: str=None, security_token: str=None, status=None, **kwargs) -> None: + super(ArtifactSource, self).__init__(location=location, tags=tags, **kwargs) + self.display_name = display_name + self.uri = uri + self.source_type = source_type + self.folder_path = folder_path + self.arm_template_folder_path = arm_template_folder_path + self.branch_ref = branch_ref + self.security_token = security_token + self.status = status + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class ArtifactSourceFragment(UpdateResource): + """Properties of an artifact source. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param display_name: The artifact source's display name. + :type display_name: str + :param uri: The artifact source's URI. + :type uri: str + :param source_type: The artifact source's type. Possible values include: + 'VsoGit', 'GitHub' + :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType + :param folder_path: The folder containing artifacts. + :type folder_path: str + :param arm_template_folder_path: The folder containing Azure Resource + Manager templates. + :type arm_template_folder_path: str + :param branch_ref: The artifact source's branch reference. + :type branch_ref: str + :param security_token: The security token to authenticate to the artifact + source. + :type security_token: str + :param status: Indicates if the artifact source is enabled (values: + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, + 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, + 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + } + + def __init__(self, *, tags=None, display_name: str=None, uri: str=None, source_type=None, folder_path: str=None, arm_template_folder_path: str=None, branch_ref: str=None, security_token: str=None, status=None, **kwargs) -> None: + super(ArtifactSourceFragment, self).__init__(tags=tags, **kwargs) + self.display_name = display_name + self.uri = uri + self.source_type = source_type + self.folder_path = folder_path + self.arm_template_folder_path = arm_template_folder_path + self.branch_ref = branch_ref + self.security_token = security_token + self.status = status + + +class AttachDiskProperties(Model): + """Properties of the disk to attach. + + :param leased_by_lab_vm_id: The resource ID of the Lab virtual machine to + which the disk is attached. + :type leased_by_lab_vm_id: str + """ + + _attribute_map = { + 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, + } + + def __init__(self, *, leased_by_lab_vm_id: str=None, **kwargs) -> None: + super(AttachDiskProperties, self).__init__(**kwargs) + self.leased_by_lab_vm_id = leased_by_lab_vm_id + + +class AttachNewDataDiskOptions(Model): + """Properties to attach new disk to the Virtual Machine. + + :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :type disk_size_gi_b: int + :param disk_name: The name of the disk to be attached. + :type disk_name: str + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + 'disk_name': {'key': 'diskName', 'type': 'str'}, + 'disk_type': {'key': 'diskType', 'type': 'str'}, + } + + def __init__(self, *, disk_size_gi_b: int=None, disk_name: str=None, disk_type=None, **kwargs) -> None: + super(AttachNewDataDiskOptions, self).__init__(**kwargs) + self.disk_size_gi_b = disk_size_gi_b + self.disk_name = disk_name + self.disk_type = disk_type + + +class AttachNewDataDiskOptionsFragment(Model): + """Properties to attach new disk to the Virtual Machine. + + :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :type disk_size_gi_b: int + :param disk_name: The name of the disk to be attached. + :type disk_name: str + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + 'disk_name': {'key': 'diskName', 'type': 'str'}, + 'disk_type': {'key': 'diskType', 'type': 'str'}, + } + + def __init__(self, *, disk_size_gi_b: int=None, disk_name: str=None, disk_type=None, **kwargs) -> None: + super(AttachNewDataDiskOptionsFragment, self).__init__(**kwargs) + self.disk_size_gi_b = disk_size_gi_b + self.disk_name = disk_name + self.disk_type = disk_type + + +class BulkCreationParameters(Model): + """Parameters for creating multiple virtual machines as a single action. + + :param instance_count: The number of virtual machine instances to create. + :type instance_count: int + """ + + _attribute_map = { + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + } + + def __init__(self, *, instance_count: int=None, **kwargs) -> None: + super(BulkCreationParameters, self).__init__(**kwargs) + self.instance_count = instance_count + + +class BulkCreationParametersFragment(Model): + """Parameters for creating multiple virtual machines as a single action. + + :param instance_count: The number of virtual machine instances to create. + :type instance_count: int + """ + + _attribute_map = { + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + } + + def __init__(self, *, instance_count: int=None, **kwargs) -> None: + super(BulkCreationParametersFragment, self).__init__(**kwargs) + self.instance_count = instance_count + + +class CloudError(Model): + """Error from a REST request. + + :param error: The cloud error that occurred + :type error: ~azure.mgmt.devtestlabs.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.error = error + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """Body of an error from a REST request. + + :param code: The error code. + :type code: str + :param message: The error message. + :type message: str + :param target: The error target. + :type target: str + :param details: Inner errors. + :type details: list[~azure.mgmt.devtestlabs.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class ComputeDataDisk(Model): + """A data disks attached to a virtual machine. + + :param name: Gets data disk name. + :type name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :param disk_size_gi_b: Gets data disk size in GiB. + :type disk_size_gi_b: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disk_uri': {'key': 'diskUri', 'type': 'str'}, + 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, disk_uri: str=None, managed_disk_id: str=None, disk_size_gi_b: int=None, **kwargs) -> None: + super(ComputeDataDisk, self).__init__(**kwargs) + self.name = name + self.disk_uri = disk_uri + self.managed_disk_id = managed_disk_id + self.disk_size_gi_b = disk_size_gi_b + + +class ComputeDataDiskFragment(Model): + """A data disks attached to a virtual machine. + + :param name: Gets data disk name. + :type name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :param disk_size_gi_b: Gets data disk size in GiB. + :type disk_size_gi_b: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disk_uri': {'key': 'diskUri', 'type': 'str'}, + 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, disk_uri: str=None, managed_disk_id: str=None, disk_size_gi_b: int=None, **kwargs) -> None: + super(ComputeDataDiskFragment, self).__init__(**kwargs) + self.name = name + self.disk_uri = disk_uri + self.managed_disk_id = managed_disk_id + self.disk_size_gi_b = disk_size_gi_b + + +class ComputeVmInstanceViewStatus(Model): + """Status information about a virtual machine. + + :param code: Gets the status Code. + :type code: str + :param display_status: Gets the short localizable label for the status. + :type display_status: str + :param message: Gets the message associated with the status. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, display_status: str=None, message: str=None, **kwargs) -> None: + super(ComputeVmInstanceViewStatus, self).__init__(**kwargs) + self.code = code + self.display_status = display_status + self.message = message + + +class ComputeVmInstanceViewStatusFragment(Model): + """Status information about a virtual machine. + + :param code: Gets the status Code. + :type code: str + :param display_status: Gets the short localizable label for the status. + :type display_status: str + :param message: Gets the message associated with the status. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, display_status: str=None, message: str=None, **kwargs) -> None: + super(ComputeVmInstanceViewStatusFragment, self).__init__(**kwargs) + self.code = code + self.display_status = display_status + self.message = message + + +class ComputeVmProperties(Model): + """Properties of a virtual machine returned by the Microsoft.Compute API. + + :param statuses: Gets the statuses of the virtual machine. + :type statuses: + list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatus] + :param os_type: Gets the OS type of the virtual machine. + :type os_type: str + :param vm_size: Gets the size of the virtual machine. + :type vm_size: str + :param network_interface_id: Gets the network interface ID of the virtual + machine. + :type network_interface_id: str + :param os_disk_id: Gets OS disk blob uri for the virtual machine. + :type os_disk_id: str + :param data_disk_ids: Gets data disks blob uri for the virtual machine. + :type data_disk_ids: list[str] + :param data_disks: Gets all data disks attached to the virtual machine. + :type data_disks: list[~azure.mgmt.devtestlabs.models.ComputeDataDisk] + """ + + _attribute_map = { + 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatus]'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, + 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, + 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDisk]'}, + } + + def __init__(self, *, statuses=None, os_type: str=None, vm_size: str=None, network_interface_id: str=None, os_disk_id: str=None, data_disk_ids=None, data_disks=None, **kwargs) -> None: + super(ComputeVmProperties, self).__init__(**kwargs) + self.statuses = statuses + self.os_type = os_type + self.vm_size = vm_size + self.network_interface_id = network_interface_id + self.os_disk_id = os_disk_id + self.data_disk_ids = data_disk_ids + self.data_disks = data_disks + + +class ComputeVmPropertiesFragment(Model): + """Properties of a virtual machine returned by the Microsoft.Compute API. + + :param statuses: Gets the statuses of the virtual machine. + :type statuses: + list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatusFragment] + :param os_type: Gets the OS type of the virtual machine. + :type os_type: str + :param vm_size: Gets the size of the virtual machine. + :type vm_size: str + :param network_interface_id: Gets the network interface ID of the virtual + machine. + :type network_interface_id: str + :param os_disk_id: Gets OS disk blob uri for the virtual machine. + :type os_disk_id: str + :param data_disk_ids: Gets data disks blob uri for the virtual machine. + :type data_disk_ids: list[str] + :param data_disks: Gets all data disks attached to the virtual machine. + :type data_disks: + list[~azure.mgmt.devtestlabs.models.ComputeDataDiskFragment] + """ + + _attribute_map = { + 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatusFragment]'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, + 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, + 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDiskFragment]'}, + } + + def __init__(self, *, statuses=None, os_type: str=None, vm_size: str=None, network_interface_id: str=None, os_disk_id: str=None, data_disk_ids=None, data_disks=None, **kwargs) -> None: + super(ComputeVmPropertiesFragment, self).__init__(**kwargs) + self.statuses = statuses + self.os_type = os_type + self.vm_size = vm_size + self.network_interface_id = network_interface_id + self.os_disk_id = os_disk_id + self.data_disk_ids = data_disk_ids + self.data_disks = data_disks + + +class CostThresholdProperties(Model): + """Properties of a cost threshold item. + + :param threshold_id: The ID of the cost threshold item. + :type threshold_id: str + :param percentage_threshold: The value of the percentage cost threshold. + :type percentage_threshold: + ~azure.mgmt.devtestlabs.models.PercentageCostThresholdProperties + :param display_on_chart: Indicates whether this threshold will be + displayed on cost charts. Possible values include: 'Enabled', 'Disabled' + :type display_on_chart: str or + ~azure.mgmt.devtestlabs.models.CostThresholdStatus + :param send_notification_when_exceeded: Indicates whether notifications + will be sent when this threshold is exceeded. Possible values include: + 'Enabled', 'Disabled' + :type send_notification_when_exceeded: str or + ~azure.mgmt.devtestlabs.models.CostThresholdStatus + :param notification_sent: Indicates the datetime when notifications were + last sent for this threshold. + :type notification_sent: str + """ + + _attribute_map = { + 'threshold_id': {'key': 'thresholdId', 'type': 'str'}, + 'percentage_threshold': {'key': 'percentageThreshold', 'type': 'PercentageCostThresholdProperties'}, + 'display_on_chart': {'key': 'displayOnChart', 'type': 'str'}, + 'send_notification_when_exceeded': {'key': 'sendNotificationWhenExceeded', 'type': 'str'}, + 'notification_sent': {'key': 'notificationSent', 'type': 'str'}, + } + + def __init__(self, *, threshold_id: str=None, percentage_threshold=None, display_on_chart=None, send_notification_when_exceeded=None, notification_sent: str=None, **kwargs) -> None: + super(CostThresholdProperties, self).__init__(**kwargs) + self.threshold_id = threshold_id + self.percentage_threshold = percentage_threshold + self.display_on_chart = display_on_chart + self.send_notification_when_exceeded = send_notification_when_exceeded + self.notification_sent = notification_sent + + +class CustomImage(Resource): + """A custom image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param vm: The virtual machine from which the image is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVm + :param vhd: The VHD from which the image is to be created. + :type vhd: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustom + :param description: The description of the custom image. + :type description: str + :param author: The author of the custom image. + :type author: str + :ivar creation_date: The creation date of the custom image. + :vartype creation_date: datetime + :param managed_image_id: The Managed Image Id backing the custom image. + :type managed_image_id: str + :param managed_snapshot_id: The Managed Snapshot Id backing the custom + image. + :type managed_snapshot_id: str + :param data_disk_storage_info: Storage information about the data disks + present in the custom image + :type data_disk_storage_info: + list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfo] + :param custom_image_plan: Storage information about the plan related to + this custom image + :type custom_image_plan: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlan + :param is_plan_authorized: Whether or not the custom images underlying + offer/plan has been enabled for programmatic deployment + :type is_plan_authorized: bool + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVm'}, + 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustom'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, + 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, + 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfo]'}, + 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlan'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, vm=None, vhd=None, description: str=None, author: str=None, managed_image_id: str=None, managed_snapshot_id: str=None, data_disk_storage_info=None, custom_image_plan=None, is_plan_authorized: bool=None, **kwargs) -> None: + super(CustomImage, self).__init__(location=location, tags=tags, **kwargs) + self.vm = vm + self.vhd = vhd + self.description = description + self.author = author + self.creation_date = None + self.managed_image_id = managed_image_id + self.managed_snapshot_id = managed_snapshot_id + self.data_disk_storage_info = data_disk_storage_info + self.custom_image_plan = custom_image_plan + self.is_plan_authorized = is_plan_authorized + self.provisioning_state = None + self.unique_identifier = None + + +class CustomImageFragment(UpdateResource): + """A custom image. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param vm: The virtual machine from which the image is to be created. + :type vm: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVmFragment + :param vhd: The VHD from which the image is to be created. + :type vhd: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustomFragment + :param description: The description of the custom image. + :type description: str + :param author: The author of the custom image. + :type author: str + :param managed_image_id: The Managed Image Id backing the custom image. + :type managed_image_id: str + :param managed_snapshot_id: The Managed Snapshot Id backing the custom + image. + :type managed_snapshot_id: str + :param data_disk_storage_info: Storage information about the data disks + present in the custom image + :type data_disk_storage_info: + list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfoFragment] + :param custom_image_plan: Storage information about the plan related to + this custom image + :type custom_image_plan: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlanFragment + :param is_plan_authorized: Whether or not the custom images underlying + offer/plan has been enabled for programmatic deployment + :type is_plan_authorized: bool + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVmFragment'}, + 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustomFragment'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, + 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, + 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfoFragment]'}, + 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlanFragment'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + } + + def __init__(self, *, tags=None, vm=None, vhd=None, description: str=None, author: str=None, managed_image_id: str=None, managed_snapshot_id: str=None, data_disk_storage_info=None, custom_image_plan=None, is_plan_authorized: bool=None, **kwargs) -> None: + super(CustomImageFragment, self).__init__(tags=tags, **kwargs) + self.vm = vm + self.vhd = vhd + self.description = description + self.author = author + self.managed_image_id = managed_image_id + self.managed_snapshot_id = managed_snapshot_id + self.data_disk_storage_info = data_disk_storage_info + self.custom_image_plan = custom_image_plan + self.is_plan_authorized = is_plan_authorized + + +class CustomImagePropertiesCustom(Model): + """Properties for creating a custom image from a VHD. + + All required parameters must be populated in order to send to Azure. + + :param image_name: The image name. + :type image_name: str + :param sys_prep: Indicates whether sysprep has been run on the VHD. + :type sys_prep: bool + :param os_type: Required. The OS type of the custom image (i.e. Windows, + Linux). Possible values include: 'Windows', 'Linux', 'None' + :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType + """ + + _validation = { + 'os_type': {'required': True}, + } + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, *, os_type, image_name: str=None, sys_prep: bool=None, **kwargs) -> None: + super(CustomImagePropertiesCustom, self).__init__(**kwargs) + self.image_name = image_name + self.sys_prep = sys_prep + self.os_type = os_type + + +class CustomImagePropertiesCustomFragment(Model): + """Properties for creating a custom image from a VHD. + + :param image_name: The image name. + :type image_name: str + :param sys_prep: Indicates whether sysprep has been run on the VHD. + :type sys_prep: bool + :param os_type: The OS type of the custom image (i.e. Windows, Linux). + Possible values include: 'Windows', 'Linux', 'None' + :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType + """ + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, *, image_name: str=None, sys_prep: bool=None, os_type=None, **kwargs) -> None: + super(CustomImagePropertiesCustomFragment, self).__init__(**kwargs) + self.image_name = image_name + self.sys_prep = sys_prep + self.os_type = os_type + + +class CustomImagePropertiesFromPlan(Model): + """Properties for plan on a custom image. + + :param id: The id of the plan, equivalent to name of the plan + :type id: str + :param publisher: The publisher for the plan from the marketplace image + the custom image is derived from + :type publisher: str + :param offer: The offer for the plan from the marketplace image the custom + image is derived from + :type offer: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, **kwargs) -> None: + super(CustomImagePropertiesFromPlan, self).__init__(**kwargs) + self.id = id + self.publisher = publisher + self.offer = offer + + +class CustomImagePropertiesFromPlanFragment(Model): + """Properties for plan on a custom image. + + :param id: The id of the plan, equivalent to name of the plan + :type id: str + :param publisher: The publisher for the plan from the marketplace image + the custom image is derived from + :type publisher: str + :param offer: The offer for the plan from the marketplace image the custom + image is derived from + :type offer: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, **kwargs) -> None: + super(CustomImagePropertiesFromPlanFragment, self).__init__(**kwargs) + self.id = id + self.publisher = publisher + self.offer = offer + + +class CustomImagePropertiesFromVm(Model): + """Properties for creating a custom image from a virtual machine. + + :param source_vm_id: The source vm identifier. + :type source_vm_id: str + :param windows_os_info: The Windows OS information of the VM. + :type windows_os_info: ~azure.mgmt.devtestlabs.models.WindowsOsInfo + :param linux_os_info: The Linux OS information of the VM. + :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfo + """ + + _attribute_map = { + 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, + 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfo'}, + 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfo'}, + } + + def __init__(self, *, source_vm_id: str=None, windows_os_info=None, linux_os_info=None, **kwargs) -> None: + super(CustomImagePropertiesFromVm, self).__init__(**kwargs) + self.source_vm_id = source_vm_id + self.windows_os_info = windows_os_info + self.linux_os_info = linux_os_info + + +class CustomImagePropertiesFromVmFragment(Model): + """Properties for creating a custom image from a virtual machine. + + :param source_vm_id: The source vm identifier. + :type source_vm_id: str + :param windows_os_info: The Windows OS information of the VM. + :type windows_os_info: + ~azure.mgmt.devtestlabs.models.WindowsOsInfoFragment + :param linux_os_info: The Linux OS information of the VM. + :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfoFragment + """ + + _attribute_map = { + 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, + 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfoFragment'}, + 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfoFragment'}, + } + + def __init__(self, *, source_vm_id: str=None, windows_os_info=None, linux_os_info=None, **kwargs) -> None: + super(CustomImagePropertiesFromVmFragment, self).__init__(**kwargs) + self.source_vm_id = source_vm_id + self.windows_os_info = windows_os_info + self.linux_os_info = linux_os_info + + +class DataDiskProperties(Model): + """Request body for adding a new or existing data disk to a virtual machine. + + :param attach_new_data_disk_options: Specifies options to attach a new + disk to the virtual machine. + :type attach_new_data_disk_options: + ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptions + :param existing_lab_disk_id: Specifies the existing lab disk id to attach + to virtual machine. + :type existing_lab_disk_id: str + :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, + ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type host_caching: str or + ~azure.mgmt.devtestlabs.models.HostCachingOptions + """ + + _attribute_map = { + 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptions'}, + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + 'host_caching': {'key': 'hostCaching', 'type': 'str'}, + } + + def __init__(self, *, attach_new_data_disk_options=None, existing_lab_disk_id: str=None, host_caching=None, **kwargs) -> None: + super(DataDiskProperties, self).__init__(**kwargs) + self.attach_new_data_disk_options = attach_new_data_disk_options + self.existing_lab_disk_id = existing_lab_disk_id + self.host_caching = host_caching + + +class DataDiskPropertiesFragment(Model): + """Request body for adding a new or existing data disk to a virtual machine. + + :param attach_new_data_disk_options: Specifies options to attach a new + disk to the virtual machine. + :type attach_new_data_disk_options: + ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptionsFragment + :param existing_lab_disk_id: Specifies the existing lab disk id to attach + to virtual machine. + :type existing_lab_disk_id: str + :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, + ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type host_caching: str or + ~azure.mgmt.devtestlabs.models.HostCachingOptions + """ + + _attribute_map = { + 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptionsFragment'}, + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + 'host_caching': {'key': 'hostCaching', 'type': 'str'}, + } + + def __init__(self, *, attach_new_data_disk_options=None, existing_lab_disk_id: str=None, host_caching=None, **kwargs) -> None: + super(DataDiskPropertiesFragment, self).__init__(**kwargs) + self.attach_new_data_disk_options = attach_new_data_disk_options + self.existing_lab_disk_id = existing_lab_disk_id + self.host_caching = host_caching + + +class DataDiskStorageTypeInfo(Model): + """Storage information about the data disks present in the custom image. + + :param lun: Disk Lun + :type lun: str + :param storage_type: Disk Storage Type. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + } + + def __init__(self, *, lun: str=None, storage_type=None, **kwargs) -> None: + super(DataDiskStorageTypeInfo, self).__init__(**kwargs) + self.lun = lun + self.storage_type = storage_type + + +class DataDiskStorageTypeInfoFragment(Model): + """Storage information about the data disks present in the custom image. + + :param lun: Disk Lun + :type lun: str + :param storage_type: Disk Storage Type. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + } + + def __init__(self, *, lun: str=None, storage_type=None, **kwargs) -> None: + super(DataDiskStorageTypeInfoFragment, self).__init__(**kwargs) + self.lun = lun + self.storage_type = storage_type + + +class DayDetails(Model): + """Properties of a daily schedule. + + :param time: The time of day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, *, time: str=None, **kwargs) -> None: + super(DayDetails, self).__init__(**kwargs) + self.time = time + + +class DayDetailsFragment(Model): + """Properties of a daily schedule. + + :param time: The time of day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, *, time: str=None, **kwargs) -> None: + super(DayDetailsFragment, self).__init__(**kwargs) + self.time = time + + +class DetachDataDiskProperties(Model): + """Request body for detaching data disk from a virtual machine. + + :param existing_lab_disk_id: Specifies the disk resource ID to detach from + virtual machine. + :type existing_lab_disk_id: str + """ + + _attribute_map = { + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + } + + def __init__(self, *, existing_lab_disk_id: str=None, **kwargs) -> None: + super(DetachDataDiskProperties, self).__init__(**kwargs) + self.existing_lab_disk_id = existing_lab_disk_id + + +class DetachDiskProperties(Model): + """Properties of the disk to detach. + + :param leased_by_lab_vm_id: The resource ID of the Lab VM to which the + disk is attached. + :type leased_by_lab_vm_id: str + """ + + _attribute_map = { + 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, + } + + def __init__(self, *, leased_by_lab_vm_id: str=None, **kwargs) -> None: + super(DetachDiskProperties, self).__init__(**kwargs) + self.leased_by_lab_vm_id = leased_by_lab_vm_id + + +class Disk(Resource): + """A Disk. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param disk_size_gi_b: The size of the disk in GibiBytes. + :type disk_size_gi_b: int + :param leased_by_lab_vm_id: The resource ID of the VM to which this disk + is leased. + :type leased_by_lab_vm_id: str + :param disk_blob_name: When backed by a blob, the name of the VHD blob + without extension. + :type disk_blob_name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :ivar created_date: The creation date of the disk. + :vartype created_date: datetime + :param host_caching: The host caching policy of the disk (i.e. None, + ReadOnly, ReadWrite). + :type host_caching: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, + 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, + 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, + 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, + 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, disk_type=None, disk_size_gi_b: int=None, leased_by_lab_vm_id: str=None, disk_blob_name: str=None, disk_uri: str=None, host_caching: str=None, managed_disk_id: str=None, **kwargs) -> None: + super(Disk, self).__init__(location=location, tags=tags, **kwargs) + self.disk_type = disk_type + self.disk_size_gi_b = disk_size_gi_b + self.leased_by_lab_vm_id = leased_by_lab_vm_id + self.disk_blob_name = disk_blob_name + self.disk_uri = disk_uri + self.created_date = None + self.host_caching = host_caching + self.managed_disk_id = managed_disk_id + self.provisioning_state = None + self.unique_identifier = None + + +class DiskFragment(UpdateResource): + """A Disk. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param disk_size_gi_b: The size of the disk in GibiBytes. + :type disk_size_gi_b: int + :param leased_by_lab_vm_id: The resource ID of the VM to which this disk + is leased. + :type leased_by_lab_vm_id: str + :param disk_blob_name: When backed by a blob, the name of the VHD blob + without extension. + :type disk_blob_name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param host_caching: The host caching policy of the disk (i.e. None, + ReadOnly, ReadWrite). + :type host_caching: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, + 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, + 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, + 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, + 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, + 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, + } + + def __init__(self, *, tags=None, disk_type=None, disk_size_gi_b: int=None, leased_by_lab_vm_id: str=None, disk_blob_name: str=None, disk_uri: str=None, host_caching: str=None, managed_disk_id: str=None, **kwargs) -> None: + super(DiskFragment, self).__init__(tags=tags, **kwargs) + self.disk_type = disk_type + self.disk_size_gi_b = disk_size_gi_b + self.leased_by_lab_vm_id = leased_by_lab_vm_id + self.disk_blob_name = disk_blob_name + self.disk_uri = disk_uri + self.host_caching = host_caching + self.managed_disk_id = managed_disk_id + + +class DtlEnvironment(Resource): + """An environment, which is essentially an ARM template deployment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param deployment_properties: The deployment properties of the + environment. + :type deployment_properties: + ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentProperties + :param arm_template_display_name: The display name of the Azure Resource + Manager template that produced the environment. + :type arm_template_display_name: str + :ivar resource_group_id: The identifier of the resource group containing + the environment's resources. + :vartype resource_group_id: str + :ivar created_by_user: The creator of the environment. + :vartype created_by_user: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_group_id': {'readonly': True}, + 'created_by_user': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentProperties'}, + 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, + 'resource_group_id': {'key': 'properties.resourceGroupId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, deployment_properties=None, arm_template_display_name: str=None, **kwargs) -> None: + super(DtlEnvironment, self).__init__(location=location, tags=tags, **kwargs) + self.deployment_properties = deployment_properties + self.arm_template_display_name = arm_template_display_name + self.resource_group_id = None + self.created_by_user = None + self.provisioning_state = None + self.unique_identifier = None + + +class DtlEnvironmentFragment(UpdateResource): + """An environment, which is essentially an ARM template deployment. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param deployment_properties: The deployment properties of the + environment. + :type deployment_properties: + ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentPropertiesFragment + :param arm_template_display_name: The display name of the Azure Resource + Manager template that produced the environment. + :type arm_template_display_name: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentPropertiesFragment'}, + 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, + } + + def __init__(self, *, tags=None, deployment_properties=None, arm_template_display_name: str=None, **kwargs) -> None: + super(DtlEnvironmentFragment, self).__init__(tags=tags, **kwargs) + self.deployment_properties = deployment_properties + self.arm_template_display_name = arm_template_display_name + + +class EnvironmentDeploymentProperties(Model): + """Properties of an environment deployment. + + :param arm_template_id: The Azure Resource Manager template's identifier. + :type arm_template_id: str + :param parameters: The parameters of the Azure Resource Manager template. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterProperties] + """ + + _attribute_map = { + 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterProperties]'}, + } + + def __init__(self, *, arm_template_id: str=None, parameters=None, **kwargs) -> None: + super(EnvironmentDeploymentProperties, self).__init__(**kwargs) + self.arm_template_id = arm_template_id + self.parameters = parameters + + +class EnvironmentDeploymentPropertiesFragment(Model): + """Properties of an environment deployment. + + :param arm_template_id: The Azure Resource Manager template's identifier. + :type arm_template_id: str + :param parameters: The parameters of the Azure Resource Manager template. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterPropertiesFragment] + """ + + _attribute_map = { + 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterPropertiesFragment]'}, + } + + def __init__(self, *, arm_template_id: str=None, parameters=None, **kwargs) -> None: + super(EnvironmentDeploymentPropertiesFragment, self).__init__(**kwargs) + self.arm_template_id = arm_template_id + self.parameters = parameters + + +class EvaluatePoliciesProperties(Model): + """Properties for evaluating a policy set. + + :param fact_name: The fact name. + :type fact_name: str + :param fact_data: The fact data. + :type fact_data: str + :param value_offset: The value offset. + :type value_offset: str + :param user_object_id: The user for which policies will be evaluated + :type user_object_id: str + """ + + _attribute_map = { + 'fact_name': {'key': 'factName', 'type': 'str'}, + 'fact_data': {'key': 'factData', 'type': 'str'}, + 'value_offset': {'key': 'valueOffset', 'type': 'str'}, + 'user_object_id': {'key': 'userObjectId', 'type': 'str'}, + } + + def __init__(self, *, fact_name: str=None, fact_data: str=None, value_offset: str=None, user_object_id: str=None, **kwargs) -> None: + super(EvaluatePoliciesProperties, self).__init__(**kwargs) + self.fact_name = fact_name + self.fact_data = fact_data + self.value_offset = value_offset + self.user_object_id = user_object_id + + +class EvaluatePoliciesRequest(Model): + """Request body for evaluating a policy set. + + :param policies: Policies to evaluate. + :type policies: + list[~azure.mgmt.devtestlabs.models.EvaluatePoliciesProperties] + """ + + _attribute_map = { + 'policies': {'key': 'policies', 'type': '[EvaluatePoliciesProperties]'}, + } + + def __init__(self, *, policies=None, **kwargs) -> None: + super(EvaluatePoliciesRequest, self).__init__(**kwargs) + self.policies = policies + + +class EvaluatePoliciesResponse(Model): + """Response body for evaluating a policy set. + + :param results: Results of evaluating a policy set. + :type results: list[~azure.mgmt.devtestlabs.models.PolicySetResult] + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': '[PolicySetResult]'}, + } + + def __init__(self, *, results=None, **kwargs) -> None: + super(EvaluatePoliciesResponse, self).__init__(**kwargs) + self.results = results + + +class Event(Model): + """An event to be notified for. + + :param event_name: The event type for which this notification is enabled + (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + } + + def __init__(self, *, event_name=None, **kwargs) -> None: + super(Event, self).__init__(**kwargs) + self.event_name = event_name + + +class EventFragment(Model): + """An event to be notified for. + + :param event_name: The event type for which this notification is enabled + (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + } + + def __init__(self, *, event_name=None, **kwargs) -> None: + super(EventFragment, self).__init__(**kwargs) + self.event_name = event_name + + +class ExportResourceUsageParameters(Model): + """The parameters of the export operation. + + :param blob_storage_absolute_sas_uri: The blob storage absolute sas uri + with write permission to the container which the usage data needs to be + uploaded to. + :type blob_storage_absolute_sas_uri: str + :param usage_start_date: The start time of the usage. If not provided, + usage will be reported since the beginning of data collection. + :type usage_start_date: datetime + """ + + _attribute_map = { + 'blob_storage_absolute_sas_uri': {'key': 'blobStorageAbsoluteSasUri', 'type': 'str'}, + 'usage_start_date': {'key': 'usageStartDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, blob_storage_absolute_sas_uri: str=None, usage_start_date=None, **kwargs) -> None: + super(ExportResourceUsageParameters, self).__init__(**kwargs) + self.blob_storage_absolute_sas_uri = blob_storage_absolute_sas_uri + self.usage_start_date = usage_start_date + + +class ExternalSubnet(Model): + """Subnet information as returned by the Microsoft.Network API. + + :param id: Gets or sets the identifier. + :type id: str + :param name: Gets or sets the name. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: + super(ExternalSubnet, self).__init__(**kwargs) + self.id = id + self.name = name + + +class ExternalSubnetFragment(Model): + """Subnet information as returned by the Microsoft.Network API. + + :param id: Gets or sets the identifier. + :type id: str + :param name: Gets or sets the name. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: + super(ExternalSubnetFragment, self).__init__(**kwargs) + self.id = id + self.name = name + + +class Formula(Resource): + """A formula for creating a VM, specifying an image base and other parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the formula. + :type description: str + :param author: The author of the formula. + :type author: str + :param os_type: The OS type of the formula. + :type os_type: str + :ivar creation_date: The creation date of the formula. + :vartype creation_date: datetime + :param formula_content: The content of the formula. + :type formula_content: + ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameter + :param vm: Information about a VM from which a formula is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVm + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameter'}, + 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVm'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, description: str=None, author: str=None, os_type: str=None, formula_content=None, vm=None, **kwargs) -> None: + super(Formula, self).__init__(location=location, tags=tags, **kwargs) + self.description = description + self.author = author + self.os_type = os_type + self.creation_date = None + self.formula_content = formula_content + self.vm = vm + self.provisioning_state = None + self.unique_identifier = None + + +class FormulaFragment(UpdateResource): + """A formula for creating a VM, specifying an image base and other parameters. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the formula. + :type description: str + :param author: The author of the formula. + :type author: str + :param os_type: The OS type of the formula. + :type os_type: str + :param formula_content: The content of the formula. + :type formula_content: + ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameterFragment + :param vm: Information about a VM from which a formula is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVmFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameterFragment'}, + 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVmFragment'}, + } + + def __init__(self, *, tags=None, description: str=None, author: str=None, os_type: str=None, formula_content=None, vm=None, **kwargs) -> None: + super(FormulaFragment, self).__init__(tags=tags, **kwargs) + self.description = description + self.author = author + self.os_type = os_type + self.formula_content = formula_content + self.vm = vm + + +class FormulaPropertiesFromVm(Model): + """Information about a VM from which a formula is to be created. + + :param lab_vm_id: The identifier of the VM from which a formula is to be + created. + :type lab_vm_id: str + """ + + _attribute_map = { + 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, + } + + def __init__(self, *, lab_vm_id: str=None, **kwargs) -> None: + super(FormulaPropertiesFromVm, self).__init__(**kwargs) + self.lab_vm_id = lab_vm_id + + +class FormulaPropertiesFromVmFragment(Model): + """Information about a VM from which a formula is to be created. + + :param lab_vm_id: The identifier of the VM from which a formula is to be + created. + :type lab_vm_id: str + """ + + _attribute_map = { + 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, + } + + def __init__(self, *, lab_vm_id: str=None, **kwargs) -> None: + super(FormulaPropertiesFromVmFragment, self).__init__(**kwargs) + self.lab_vm_id = lab_vm_id + + +class GalleryImage(Resource): + """A gallery image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param author: The author of the gallery image. + :type author: str + :ivar created_date: The creation date of the gallery image. + :vartype created_date: datetime + :param description: The description of the gallery image. + :type description: str + :param image_reference: The image reference of the gallery image. + :type image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param icon: The icon of the gallery image. + :type icon: str + :param enabled: Indicates whether this gallery image is enabled. + :type enabled: bool + :param plan_id: The third party plan that applies to this image + :type plan_id: str + :param is_plan_authorized: Indicates if the plan has been authorized for + programmatic deployment. + :type is_plan_authorized: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'image_reference': {'key': 'properties.imageReference', 'type': 'GalleryImageReference'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + } + + def __init__(self, *, location: str=None, tags=None, author: str=None, description: str=None, image_reference=None, icon: str=None, enabled: bool=None, plan_id: str=None, is_plan_authorized: bool=None, **kwargs) -> None: + super(GalleryImage, self).__init__(location=location, tags=tags, **kwargs) + self.author = author + self.created_date = None + self.description = description + self.image_reference = image_reference + self.icon = icon + self.enabled = enabled + self.plan_id = plan_id + self.is_plan_authorized = is_plan_authorized + + +class GalleryImageReference(Model): + """The reference information for an Azure Marketplace image. + + :param offer: The offer of the gallery image. + :type offer: str + :param publisher: The publisher of the gallery image. + :type publisher: str + :param sku: The SKU of the gallery image. + :type sku: str + :param os_type: The OS type of the gallery image. + :type os_type: str + :param version: The version of the gallery image. + :type version: str + """ + + _attribute_map = { + 'offer': {'key': 'offer', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, offer: str=None, publisher: str=None, sku: str=None, os_type: str=None, version: str=None, **kwargs) -> None: + super(GalleryImageReference, self).__init__(**kwargs) + self.offer = offer + self.publisher = publisher + self.sku = sku + self.os_type = os_type + self.version = version + + +class GalleryImageReferenceFragment(Model): + """The reference information for an Azure Marketplace image. + + :param offer: The offer of the gallery image. + :type offer: str + :param publisher: The publisher of the gallery image. + :type publisher: str + :param sku: The SKU of the gallery image. + :type sku: str + :param os_type: The OS type of the gallery image. + :type os_type: str + :param version: The version of the gallery image. + :type version: str + """ + + _attribute_map = { + 'offer': {'key': 'offer', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, offer: str=None, publisher: str=None, sku: str=None, os_type: str=None, version: str=None, **kwargs) -> None: + super(GalleryImageReferenceFragment, self).__init__(**kwargs) + self.offer = offer + self.publisher = publisher + self.sku = sku + self.os_type = os_type + self.version = version + + +class GenerateArmTemplateRequest(Model): + """Parameters for generating an ARM template for deploying artifacts. + + :param virtual_machine_name: The resource name of the virtual machine. + :type virtual_machine_name: str + :param parameters: The parameters of the ARM template. + :type parameters: list[~azure.mgmt.devtestlabs.models.ParameterInfo] + :param location: The location of the virtual machine. + :type location: str + :param file_upload_options: Options for uploading the files for the + artifact. UploadFilesAndGenerateSasTokens is the default value. Possible + values include: 'UploadFilesAndGenerateSasTokens', 'None' + :type file_upload_options: str or + ~azure.mgmt.devtestlabs.models.FileUploadOptions + """ + + _attribute_map = { + 'virtual_machine_name': {'key': 'virtualMachineName', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ParameterInfo]'}, + 'location': {'key': 'location', 'type': 'str'}, + 'file_upload_options': {'key': 'fileUploadOptions', 'type': 'str'}, + } + + def __init__(self, *, virtual_machine_name: str=None, parameters=None, location: str=None, file_upload_options=None, **kwargs) -> None: + super(GenerateArmTemplateRequest, self).__init__(**kwargs) + self.virtual_machine_name = virtual_machine_name + self.parameters = parameters + self.location = location + self.file_upload_options = file_upload_options + + +class GenerateUploadUriParameter(Model): + """Properties for generating an upload URI. + + :param blob_name: The blob name of the upload URI. + :type blob_name: str + """ + + _attribute_map = { + 'blob_name': {'key': 'blobName', 'type': 'str'}, + } + + def __init__(self, *, blob_name: str=None, **kwargs) -> None: + super(GenerateUploadUriParameter, self).__init__(**kwargs) + self.blob_name = blob_name + + +class GenerateUploadUriResponse(Model): + """Response body for generating an upload URI. + + :param upload_uri: The upload URI for the VHD. + :type upload_uri: str + """ + + _attribute_map = { + 'upload_uri': {'key': 'uploadUri', 'type': 'str'}, + } + + def __init__(self, *, upload_uri: str=None, **kwargs) -> None: + super(GenerateUploadUriResponse, self).__init__(**kwargs) + self.upload_uri = upload_uri + + +class HourDetails(Model): + """Properties of an hourly schedule. + + :param minute: Minutes of the hour the schedule will run. + :type minute: int + """ + + _attribute_map = { + 'minute': {'key': 'minute', 'type': 'int'}, + } + + def __init__(self, *, minute: int=None, **kwargs) -> None: + super(HourDetails, self).__init__(**kwargs) + self.minute = minute + + +class HourDetailsFragment(Model): + """Properties of an hourly schedule. + + :param minute: Minutes of the hour the schedule will run. + :type minute: int + """ + + _attribute_map = { + 'minute': {'key': 'minute', 'type': 'int'}, + } + + def __init__(self, *, minute: int=None, **kwargs) -> None: + super(HourDetailsFragment, self).__init__(**kwargs) + self.minute = minute + + +class IdentityProperties(Model): + """Properties of a managed identity. + + :param type: Managed identity. + :type type: str + :param principal_id: The principal id of resource identity. + :type principal_id: str + :param tenant_id: The tenant identifier of resource. + :type tenant_id: str + :param client_secret_url: The client secret URL of the identity. + :type client_secret_url: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'client_secret_url': {'key': 'clientSecretUrl', 'type': 'str'}, + } + + def __init__(self, *, type: str=None, principal_id: str=None, tenant_id: str=None, client_secret_url: str=None, **kwargs) -> None: + super(IdentityProperties, self).__init__(**kwargs) + self.type = type + self.principal_id = principal_id + self.tenant_id = tenant_id + self.client_secret_url = client_secret_url + + +class ImportLabVirtualMachineRequest(Model): + """This represents the payload required to import a virtual machine from a + different lab into the current one. + + :param source_virtual_machine_resource_id: The full resource ID of the + virtual machine to be imported. + :type source_virtual_machine_resource_id: str + :param destination_virtual_machine_name: The name of the virtual machine + in the destination lab + :type destination_virtual_machine_name: str + """ + + _attribute_map = { + 'source_virtual_machine_resource_id': {'key': 'sourceVirtualMachineResourceId', 'type': 'str'}, + 'destination_virtual_machine_name': {'key': 'destinationVirtualMachineName', 'type': 'str'}, + } + + def __init__(self, *, source_virtual_machine_resource_id: str=None, destination_virtual_machine_name: str=None, **kwargs) -> None: + super(ImportLabVirtualMachineRequest, self).__init__(**kwargs) + self.source_virtual_machine_resource_id = source_virtual_machine_resource_id + self.destination_virtual_machine_name = destination_virtual_machine_name + + +class InboundNatRule(Model): + """A rule for NAT - exposing a VM's port (backendPort) on the public IP + address using a load balancer. + + :param transport_protocol: The transport protocol for the endpoint. + Possible values include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param frontend_port: The external endpoint port of the inbound + connection. Possible values range between 1 and 65535, inclusive. If + unspecified, a value will be allocated automatically. + :type frontend_port: int + :param backend_port: The port to which the external traffic will be + redirected. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, *, transport_protocol=None, frontend_port: int=None, backend_port: int=None, **kwargs) -> None: + super(InboundNatRule, self).__init__(**kwargs) + self.transport_protocol = transport_protocol + self.frontend_port = frontend_port + self.backend_port = backend_port + + +class InboundNatRuleFragment(Model): + """A rule for NAT - exposing a VM's port (backendPort) on the public IP + address using a load balancer. + + :param transport_protocol: The transport protocol for the endpoint. + Possible values include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param frontend_port: The external endpoint port of the inbound + connection. Possible values range between 1 and 65535, inclusive. If + unspecified, a value will be allocated automatically. + :type frontend_port: int + :param backend_port: The port to which the external traffic will be + redirected. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, *, transport_protocol=None, frontend_port: int=None, backend_port: int=None, **kwargs) -> None: + super(InboundNatRuleFragment, self).__init__(**kwargs) + self.transport_protocol = transport_protocol + self.frontend_port = frontend_port + self.backend_port = backend_port + + +class Lab(Resource): + """A lab. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar default_storage_account: The lab's default storage account. + :vartype default_storage_account: str + :ivar default_premium_storage_account: The lab's default premium storage + account. + :vartype default_premium_storage_account: str + :ivar artifacts_storage_account: The lab's artifact storage account. + :vartype artifacts_storage_account: str + :ivar premium_data_disk_storage_account: The lab's premium data disk + storage account. + :vartype premium_data_disk_storage_account: str + :ivar vault_name: The lab's Key vault. + :vartype vault_name: str + :param lab_storage_type: Type of storage used by the lab. It can be either + Premium or Standard. Default is Premium. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param mandatory_artifacts_resource_ids_linux: The ordered list of + artifact resource IDs that should be applied on all Linux VM creations by + default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_linux: list[str] + :param mandatory_artifacts_resource_ids_windows: The ordered list of + artifact resource IDs that should be applied on all Windows VM creations + by default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_windows: list[str] + :ivar created_date: The creation date of the lab. + :vartype created_date: datetime + :param premium_data_disks: The setting to enable usage of premium data + disks. + When its value is 'Enabled', creation of standard or premium data disks is + allowed. + When its value is 'Disabled', only creation of standard data disks is + allowed. Possible values include: 'Disabled', 'Enabled' + :type premium_data_disks: str or + ~azure.mgmt.devtestlabs.models.PremiumDataDisk + :param environment_permission: The access rights to be granted to the user + when provisioning an environment. Possible values include: 'Reader', + 'Contributor' + :type environment_permission: str or + ~azure.mgmt.devtestlabs.models.EnvironmentPermission + :param announcement: The properties of any lab announcement associated + with this lab + :type announcement: + ~azure.mgmt.devtestlabs.models.LabAnnouncementProperties + :param support: The properties of any lab support message associated with + this lab + :type support: ~azure.mgmt.devtestlabs.models.LabSupportProperties + :ivar vm_creation_resource_group: The resource group in which all new lab + virtual machines will be created. To let DevTest Labs manage resource + group creation, set this value to null. + :vartype vm_creation_resource_group: str + :ivar public_ip_id: The public IP address for the lab's load balancer. + :vartype public_ip_id: str + :ivar load_balancer_id: The load balancer used to for lab VMs that use + shared IP address. + :vartype load_balancer_id: str + :ivar network_security_group_id: The Network Security Group attached to + the lab VMs Network interfaces to restrict open ports. + :vartype network_security_group_id: str + :param extended_properties: Extended properties of the lab used for + experimental features + :type extended_properties: dict[str, str] + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'default_storage_account': {'readonly': True}, + 'default_premium_storage_account': {'readonly': True}, + 'artifacts_storage_account': {'readonly': True}, + 'premium_data_disk_storage_account': {'readonly': True}, + 'vault_name': {'readonly': True}, + 'created_date': {'readonly': True}, + 'vm_creation_resource_group': {'readonly': True}, + 'public_ip_id': {'readonly': True}, + 'load_balancer_id': {'readonly': True}, + 'network_security_group_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'default_storage_account': {'key': 'properties.defaultStorageAccount', 'type': 'str'}, + 'default_premium_storage_account': {'key': 'properties.defaultPremiumStorageAccount', 'type': 'str'}, + 'artifacts_storage_account': {'key': 'properties.artifactsStorageAccount', 'type': 'str'}, + 'premium_data_disk_storage_account': {'key': 'properties.premiumDataDiskStorageAccount', 'type': 'str'}, + 'vault_name': {'key': 'properties.vaultName', 'type': 'str'}, + 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, + 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, + 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, + 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, + 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementProperties'}, + 'support': {'key': 'properties.support', 'type': 'LabSupportProperties'}, + 'vm_creation_resource_group': {'key': 'properties.vmCreationResourceGroup', 'type': 'str'}, + 'public_ip_id': {'key': 'properties.publicIpId', 'type': 'str'}, + 'load_balancer_id': {'key': 'properties.loadBalancerId', 'type': 'str'}, + 'network_security_group_id': {'key': 'properties.networkSecurityGroupId', 'type': 'str'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, lab_storage_type=None, mandatory_artifacts_resource_ids_linux=None, mandatory_artifacts_resource_ids_windows=None, premium_data_disks=None, environment_permission=None, announcement=None, support=None, extended_properties=None, **kwargs) -> None: + super(Lab, self).__init__(location=location, tags=tags, **kwargs) + self.default_storage_account = None + self.default_premium_storage_account = None + self.artifacts_storage_account = None + self.premium_data_disk_storage_account = None + self.vault_name = None + self.lab_storage_type = lab_storage_type + self.mandatory_artifacts_resource_ids_linux = mandatory_artifacts_resource_ids_linux + self.mandatory_artifacts_resource_ids_windows = mandatory_artifacts_resource_ids_windows + self.created_date = None + self.premium_data_disks = premium_data_disks + self.environment_permission = environment_permission + self.announcement = announcement + self.support = support + self.vm_creation_resource_group = None + self.public_ip_id = None + self.load_balancer_id = None + self.network_security_group_id = None + self.extended_properties = extended_properties + self.provisioning_state = None + self.unique_identifier = None + + +class LabAnnouncementProperties(Model): + """Properties of a lab's announcement banner. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param title: The plain text title for the lab announcement + :type title: str + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + :param enabled: Is the lab announcement active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param expiration_date: The time at which the announcement expires (null + for never) + :type expiration_date: datetime + :param expired: Has this announcement expired? + :type expired: bool + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'expired': {'key': 'expired', 'type': 'bool'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, title: str=None, markdown: str=None, enabled=None, expiration_date=None, expired: bool=None, **kwargs) -> None: + super(LabAnnouncementProperties, self).__init__(**kwargs) + self.title = title + self.markdown = markdown + self.enabled = enabled + self.expiration_date = expiration_date + self.expired = expired + self.provisioning_state = None + self.unique_identifier = None + + +class LabAnnouncementPropertiesFragment(Model): + """Properties of a lab's announcement banner. + + :param title: The plain text title for the lab announcement + :type title: str + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + :param enabled: Is the lab announcement active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param expiration_date: The time at which the announcement expires (null + for never) + :type expiration_date: datetime + :param expired: Has this announcement expired? + :type expired: bool + """ + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'expired': {'key': 'expired', 'type': 'bool'}, + } + + def __init__(self, *, title: str=None, markdown: str=None, enabled=None, expiration_date=None, expired: bool=None, **kwargs) -> None: + super(LabAnnouncementPropertiesFragment, self).__init__(**kwargs) + self.title = title + self.markdown = markdown + self.enabled = enabled + self.expiration_date = expiration_date + self.expired = expired + + +class LabCost(Resource): + """A cost item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param target_cost: The target cost properties + :type target_cost: ~azure.mgmt.devtestlabs.models.TargetCostProperties + :ivar lab_cost_summary: The lab cost summary component of the cost data. + :vartype lab_cost_summary: + ~azure.mgmt.devtestlabs.models.LabCostSummaryProperties + :ivar lab_cost_details: The lab cost details component of the cost data. + :vartype lab_cost_details: + list[~azure.mgmt.devtestlabs.models.LabCostDetailsProperties] + :ivar resource_costs: The resource cost component of the cost data. + :vartype resource_costs: + list[~azure.mgmt.devtestlabs.models.LabResourceCostProperties] + :param currency_code: The currency code of the cost. + :type currency_code: str + :param start_date_time: The start time of the cost data. + :type start_date_time: datetime + :param end_date_time: The end time of the cost data. + :type end_date_time: datetime + :param created_date: The creation date of the cost. + :type created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'lab_cost_summary': {'readonly': True}, + 'lab_cost_details': {'readonly': True}, + 'resource_costs': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'target_cost': {'key': 'properties.targetCost', 'type': 'TargetCostProperties'}, + 'lab_cost_summary': {'key': 'properties.labCostSummary', 'type': 'LabCostSummaryProperties'}, + 'lab_cost_details': {'key': 'properties.labCostDetails', 'type': '[LabCostDetailsProperties]'}, + 'resource_costs': {'key': 'properties.resourceCosts', 'type': '[LabResourceCostProperties]'}, + 'currency_code': {'key': 'properties.currencyCode', 'type': 'str'}, + 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, + 'end_date_time': {'key': 'properties.endDateTime', 'type': 'iso-8601'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, target_cost=None, currency_code: str=None, start_date_time=None, end_date_time=None, created_date=None, **kwargs) -> None: + super(LabCost, self).__init__(location=location, tags=tags, **kwargs) + self.target_cost = target_cost + self.lab_cost_summary = None + self.lab_cost_details = None + self.resource_costs = None + self.currency_code = currency_code + self.start_date_time = start_date_time + self.end_date_time = end_date_time + self.created_date = created_date + self.provisioning_state = None + self.unique_identifier = None + + +class LabCostDetailsProperties(Model): + """The properties of a lab cost item. + + :param date_property: The date of the cost item. + :type date_property: datetime + :param cost: The cost component of the cost item. + :type cost: float + :param cost_type: The type of the cost. Possible values include: + 'Unavailable', 'Reported', 'Projected' + :type cost_type: str or ~azure.mgmt.devtestlabs.models.CostType + """ + + _attribute_map = { + 'date_property': {'key': 'date', 'type': 'iso-8601'}, + 'cost': {'key': 'cost', 'type': 'float'}, + 'cost_type': {'key': 'costType', 'type': 'str'}, + } + + def __init__(self, *, date_property=None, cost: float=None, cost_type=None, **kwargs) -> None: + super(LabCostDetailsProperties, self).__init__(**kwargs) + self.date_property = date_property + self.cost = cost + self.cost_type = cost_type + + +class LabCostSummaryProperties(Model): + """The properties of the cost summary. + + :param estimated_lab_cost: The cost component of the cost item. + :type estimated_lab_cost: float + """ + + _attribute_map = { + 'estimated_lab_cost': {'key': 'estimatedLabCost', 'type': 'float'}, + } + + def __init__(self, *, estimated_lab_cost: float=None, **kwargs) -> None: + super(LabCostSummaryProperties, self).__init__(**kwargs) + self.estimated_lab_cost = estimated_lab_cost + + +class LabFragment(UpdateResource): + """A lab. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_storage_type: Type of storage used by the lab. It can be either + Premium or Standard. Default is Premium. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param mandatory_artifacts_resource_ids_linux: The ordered list of + artifact resource IDs that should be applied on all Linux VM creations by + default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_linux: list[str] + :param mandatory_artifacts_resource_ids_windows: The ordered list of + artifact resource IDs that should be applied on all Windows VM creations + by default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_windows: list[str] + :param premium_data_disks: The setting to enable usage of premium data + disks. + When its value is 'Enabled', creation of standard or premium data disks is + allowed. + When its value is 'Disabled', only creation of standard data disks is + allowed. Possible values include: 'Disabled', 'Enabled' + :type premium_data_disks: str or + ~azure.mgmt.devtestlabs.models.PremiumDataDisk + :param environment_permission: The access rights to be granted to the user + when provisioning an environment. Possible values include: 'Reader', + 'Contributor' + :type environment_permission: str or + ~azure.mgmt.devtestlabs.models.EnvironmentPermission + :param announcement: The properties of any lab announcement associated + with this lab + :type announcement: + ~azure.mgmt.devtestlabs.models.LabAnnouncementPropertiesFragment + :param support: The properties of any lab support message associated with + this lab + :type support: ~azure.mgmt.devtestlabs.models.LabSupportPropertiesFragment + :param extended_properties: Extended properties of the lab used for + experimental features + :type extended_properties: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, + 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, + 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, + 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, + 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, + 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementPropertiesFragment'}, + 'support': {'key': 'properties.support', 'type': 'LabSupportPropertiesFragment'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, lab_storage_type=None, mandatory_artifacts_resource_ids_linux=None, mandatory_artifacts_resource_ids_windows=None, premium_data_disks=None, environment_permission=None, announcement=None, support=None, extended_properties=None, **kwargs) -> None: + super(LabFragment, self).__init__(tags=tags, **kwargs) + self.lab_storage_type = lab_storage_type + self.mandatory_artifacts_resource_ids_linux = mandatory_artifacts_resource_ids_linux + self.mandatory_artifacts_resource_ids_windows = mandatory_artifacts_resource_ids_windows + self.premium_data_disks = premium_data_disks + self.environment_permission = environment_permission + self.announcement = announcement + self.support = support + self.extended_properties = extended_properties + + +class LabResourceCostProperties(Model): + """The properties of a resource cost item. + + :param resourcename: The name of the resource. + :type resourcename: str + :param resource_uid: The unique identifier of the resource. + :type resource_uid: str + :param resource_cost: The cost component of the resource cost item. + :type resource_cost: float + :param resource_type: The logical resource type (ex. virtualmachine, + storageaccount) + :type resource_type: str + :param resource_owner: The owner of the resource (ex. + janedoe@microsoft.com) + :type resource_owner: str + :param resource_pricing_tier: The category of the resource (ex. + Premium_LRS, Standard_DS1) + :type resource_pricing_tier: str + :param resource_status: The status of the resource (ex. Active) + :type resource_status: str + :param resource_id: The ID of the resource + :type resource_id: str + :param external_resource_id: The ID of the external resource + :type external_resource_id: str + """ + + _attribute_map = { + 'resourcename': {'key': 'resourcename', 'type': 'str'}, + 'resource_uid': {'key': 'resourceUId', 'type': 'str'}, + 'resource_cost': {'key': 'resourceCost', 'type': 'float'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_owner': {'key': 'resourceOwner', 'type': 'str'}, + 'resource_pricing_tier': {'key': 'resourcePricingTier', 'type': 'str'}, + 'resource_status': {'key': 'resourceStatus', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'external_resource_id': {'key': 'externalResourceId', 'type': 'str'}, + } + + def __init__(self, *, resourcename: str=None, resource_uid: str=None, resource_cost: float=None, resource_type: str=None, resource_owner: str=None, resource_pricing_tier: str=None, resource_status: str=None, resource_id: str=None, external_resource_id: str=None, **kwargs) -> None: + super(LabResourceCostProperties, self).__init__(**kwargs) + self.resourcename = resourcename + self.resource_uid = resource_uid + self.resource_cost = resource_cost + self.resource_type = resource_type + self.resource_owner = resource_owner + self.resource_pricing_tier = resource_pricing_tier + self.resource_status = resource_status + self.resource_id = resource_id + self.external_resource_id = external_resource_id + + +class LabSupportProperties(Model): + """Properties of a lab's support banner. + + :param enabled: Is the lab support banner active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + } + + def __init__(self, *, enabled=None, markdown: str=None, **kwargs) -> None: + super(LabSupportProperties, self).__init__(**kwargs) + self.enabled = enabled + self.markdown = markdown + + +class LabSupportPropertiesFragment(Model): + """Properties of a lab's support banner. + + :param enabled: Is the lab support banner active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + } + + def __init__(self, *, enabled=None, markdown: str=None, **kwargs) -> None: + super(LabSupportPropertiesFragment, self).__init__(**kwargs) + self.enabled = enabled + self.markdown = markdown + + +class LabVhd(Model): + """Properties of a VHD in the lab. + + :param id: The URI to the VHD. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(LabVhd, self).__init__(**kwargs) + self.id = id + + +class LabVirtualMachine(Resource): + """A virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :ivar compute_vm: The compute virtual machine properties. + :vartype compute_vm: ~azure.mgmt.devtestlabs.models.ComputeVmProperties + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties + :ivar applicable_schedule: The applicable schedule for the virtual + machine. + :vartype applicable_schedule: + ~azure.mgmt.devtestlabs.models.ApplicableSchedule + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskProperties] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'compute_vm': {'readonly': True}, + 'applicable_schedule': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'compute_vm': {'key': 'properties.computeVm', 'type': 'ComputeVmProperties'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, + 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, **kwargs) -> None: + super(LabVirtualMachine, self).__init__(location=location, tags=tags, **kwargs) + self.notes = notes + self.owner_object_id = owner_object_id + self.owner_user_principal_name = owner_user_principal_name + self.created_by_user_id = created_by_user_id + self.created_by_user = created_by_user + self.created_date = created_date + self.compute_id = compute_id + self.custom_image_id = custom_image_id + self.os_type = os_type + self.size = size + self.user_name = user_name + self.password = password + self.ssh_key = ssh_key + self.is_authentication_with_ssh_key = is_authentication_with_ssh_key + self.fqdn = fqdn + self.lab_subnet_name = lab_subnet_name + self.lab_virtual_network_id = lab_virtual_network_id + self.disallow_public_ip_address = disallow_public_ip_address + self.artifacts = artifacts + self.artifact_deployment_status = artifact_deployment_status + self.gallery_image_reference = gallery_image_reference + self.plan_id = plan_id + self.compute_vm = None + self.network_interface = network_interface + self.applicable_schedule = None + self.expiration_date = expiration_date + self.allow_claim = allow_claim + self.storage_type = storage_type + self.virtual_machine_creation_source = virtual_machine_creation_source + self.environment_id = environment_id + self.data_disk_parameters = data_disk_parameters + self.schedule_parameters = schedule_parameters + self.last_known_power_state = last_known_power_state + self.provisioning_state = None + self.unique_identifier = None + + +class LabVirtualMachineCreationParameter(Model): + """Properties for creating a virtual machine. + + :param bulk_creation_parameters: The number of virtual machine instances + to create. + :type bulk_creation_parameters: + ~azure.mgmt.devtestlabs.models.BulkCreationParameters + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskProperties] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParameters'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, bulk_creation_parameters=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(LabVirtualMachineCreationParameter, self).__init__(**kwargs) + self.bulk_creation_parameters = bulk_creation_parameters + self.notes = notes + self.owner_object_id = owner_object_id + self.owner_user_principal_name = owner_user_principal_name + self.created_by_user_id = created_by_user_id + self.created_by_user = created_by_user + self.created_date = created_date + self.compute_id = compute_id + self.custom_image_id = custom_image_id + self.os_type = os_type + self.size = size + self.user_name = user_name + self.password = password + self.ssh_key = ssh_key + self.is_authentication_with_ssh_key = is_authentication_with_ssh_key + self.fqdn = fqdn + self.lab_subnet_name = lab_subnet_name + self.lab_virtual_network_id = lab_virtual_network_id + self.disallow_public_ip_address = disallow_public_ip_address + self.artifacts = artifacts + self.artifact_deployment_status = artifact_deployment_status + self.gallery_image_reference = gallery_image_reference + self.plan_id = plan_id + self.network_interface = network_interface + self.expiration_date = expiration_date + self.allow_claim = allow_claim + self.storage_type = storage_type + self.virtual_machine_creation_source = virtual_machine_creation_source + self.environment_id = environment_id + self.data_disk_parameters = data_disk_parameters + self.schedule_parameters = schedule_parameters + self.last_known_power_state = last_known_power_state + self.name = name + self.location = location + self.tags = tags + + +class LabVirtualMachineCreationParameterFragment(Model): + """Properties for creating a virtual machine. + + :param bulk_creation_parameters: The number of virtual machine instances + to create. + :type bulk_creation_parameters: + ~azure.mgmt.devtestlabs.models.BulkCreationParametersFragment + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParametersFragment'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, bulk_creation_parameters=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(LabVirtualMachineCreationParameterFragment, self).__init__(**kwargs) + self.bulk_creation_parameters = bulk_creation_parameters + self.notes = notes + self.owner_object_id = owner_object_id + self.owner_user_principal_name = owner_user_principal_name + self.created_by_user_id = created_by_user_id + self.created_by_user = created_by_user + self.created_date = created_date + self.compute_id = compute_id + self.custom_image_id = custom_image_id + self.os_type = os_type + self.size = size + self.user_name = user_name + self.password = password + self.ssh_key = ssh_key + self.is_authentication_with_ssh_key = is_authentication_with_ssh_key + self.fqdn = fqdn + self.lab_subnet_name = lab_subnet_name + self.lab_virtual_network_id = lab_virtual_network_id + self.disallow_public_ip_address = disallow_public_ip_address + self.artifacts = artifacts + self.artifact_deployment_status = artifact_deployment_status + self.gallery_image_reference = gallery_image_reference + self.plan_id = plan_id + self.network_interface = network_interface + self.expiration_date = expiration_date + self.allow_claim = allow_claim + self.storage_type = storage_type + self.virtual_machine_creation_source = virtual_machine_creation_source + self.environment_id = environment_id + self.data_disk_parameters = data_disk_parameters + self.schedule_parameters = schedule_parameters + self.last_known_power_state = last_known_power_state + self.name = name + self.location = location + self.tags = tags + + +class LabVirtualMachineFragment(UpdateResource): + """A virtual machine. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + } + + def __init__(self, *, tags=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, **kwargs) -> None: + super(LabVirtualMachineFragment, self).__init__(tags=tags, **kwargs) + self.notes = notes + self.owner_object_id = owner_object_id + self.owner_user_principal_name = owner_user_principal_name + self.created_by_user_id = created_by_user_id + self.created_by_user = created_by_user + self.created_date = created_date + self.compute_id = compute_id + self.custom_image_id = custom_image_id + self.os_type = os_type + self.size = size + self.user_name = user_name + self.password = password + self.ssh_key = ssh_key + self.is_authentication_with_ssh_key = is_authentication_with_ssh_key + self.fqdn = fqdn + self.lab_subnet_name = lab_subnet_name + self.lab_virtual_network_id = lab_virtual_network_id + self.disallow_public_ip_address = disallow_public_ip_address + self.artifacts = artifacts + self.artifact_deployment_status = artifact_deployment_status + self.gallery_image_reference = gallery_image_reference + self.plan_id = plan_id + self.network_interface = network_interface + self.expiration_date = expiration_date + self.allow_claim = allow_claim + self.storage_type = storage_type + self.virtual_machine_creation_source = virtual_machine_creation_source + self.environment_id = environment_id + self.data_disk_parameters = data_disk_parameters + self.schedule_parameters = schedule_parameters + self.last_known_power_state = last_known_power_state + + +class LinuxOsInfo(Model): + """Information about a Linux OS. + + :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, + DeprovisionRequested, DeprovisionApplied). Possible values include: + 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' + :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState + """ + + _attribute_map = { + 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, + } + + def __init__(self, *, linux_os_state=None, **kwargs) -> None: + super(LinuxOsInfo, self).__init__(**kwargs) + self.linux_os_state = linux_os_state + + +class LinuxOsInfoFragment(Model): + """Information about a Linux OS. + + :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, + DeprovisionRequested, DeprovisionApplied). Possible values include: + 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' + :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState + """ + + _attribute_map = { + 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, + } + + def __init__(self, *, linux_os_state=None, **kwargs) -> None: + super(LinuxOsInfoFragment, self).__init__(**kwargs) + self.linux_os_state = linux_os_state + + +class NetworkInterfaceProperties(Model): + """Properties of a network interface. + + :param virtual_network_id: The resource ID of the virtual network. + :type virtual_network_id: str + :param subnet_id: The resource ID of the sub net. + :type subnet_id: str + :param public_ip_address_id: The resource ID of the public IP address. + :type public_ip_address_id: str + :param public_ip_address: The public IP address. + :type public_ip_address: str + :param private_ip_address: The private IP address. + :type private_ip_address: str + :param dns_name: The DNS name. + :type dns_name: str + :param rdp_authority: The RdpAuthority property is a server DNS host name + or IP address followed by the service port number for RDP (Remote Desktop + Protocol). + :type rdp_authority: str + :param ssh_authority: The SshAuthority property is a server DNS host name + or IP address followed by the service port number for SSH. + :type ssh_authority: str + :param shared_public_ip_address_configuration: The configuration for + sharing a public IP address across multiple virtual machines. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfiguration + """ + + _attribute_map = { + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, + 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfiguration'}, + } + + def __init__(self, *, virtual_network_id: str=None, subnet_id: str=None, public_ip_address_id: str=None, public_ip_address: str=None, private_ip_address: str=None, dns_name: str=None, rdp_authority: str=None, ssh_authority: str=None, shared_public_ip_address_configuration=None, **kwargs) -> None: + super(NetworkInterfaceProperties, self).__init__(**kwargs) + self.virtual_network_id = virtual_network_id + self.subnet_id = subnet_id + self.public_ip_address_id = public_ip_address_id + self.public_ip_address = public_ip_address + self.private_ip_address = private_ip_address + self.dns_name = dns_name + self.rdp_authority = rdp_authority + self.ssh_authority = ssh_authority + self.shared_public_ip_address_configuration = shared_public_ip_address_configuration + + +class NetworkInterfacePropertiesFragment(Model): + """Properties of a network interface. + + :param virtual_network_id: The resource ID of the virtual network. + :type virtual_network_id: str + :param subnet_id: The resource ID of the sub net. + :type subnet_id: str + :param public_ip_address_id: The resource ID of the public IP address. + :type public_ip_address_id: str + :param public_ip_address: The public IP address. + :type public_ip_address: str + :param private_ip_address: The private IP address. + :type private_ip_address: str + :param dns_name: The DNS name. + :type dns_name: str + :param rdp_authority: The RdpAuthority property is a server DNS host name + or IP address followed by the service port number for RDP (Remote Desktop + Protocol). + :type rdp_authority: str + :param ssh_authority: The SshAuthority property is a server DNS host name + or IP address followed by the service port number for SSH. + :type ssh_authority: str + :param shared_public_ip_address_configuration: The configuration for + sharing a public IP address across multiple virtual machines. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfigurationFragment + """ + + _attribute_map = { + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, + 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfigurationFragment'}, + } + + def __init__(self, *, virtual_network_id: str=None, subnet_id: str=None, public_ip_address_id: str=None, public_ip_address: str=None, private_ip_address: str=None, dns_name: str=None, rdp_authority: str=None, ssh_authority: str=None, shared_public_ip_address_configuration=None, **kwargs) -> None: + super(NetworkInterfacePropertiesFragment, self).__init__(**kwargs) + self.virtual_network_id = virtual_network_id + self.subnet_id = subnet_id + self.public_ip_address_id = public_ip_address_id + self.public_ip_address = public_ip_address + self.private_ip_address = private_ip_address + self.dns_name = dns_name + self.rdp_authority = rdp_authority + self.ssh_authority = ssh_authority + self.shared_public_ip_address_configuration = shared_public_ip_address_configuration + + +class NotificationChannel(Resource): + """A notification. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param web_hook_url: The webhook URL to send notifications to. + :type web_hook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + :param description: Description of notification. + :type description: str + :param events: The list of event for which this notification is enabled. + :type events: list[~azure.mgmt.devtestlabs.models.Event] + :ivar created_date: The creation date of the notification channel. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'events': {'key': 'properties.events', 'type': '[Event]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, web_hook_url: str=None, email_recipient: str=None, notification_locale: str=None, description: str=None, events=None, **kwargs) -> None: + super(NotificationChannel, self).__init__(location=location, tags=tags, **kwargs) + self.web_hook_url = web_hook_url + self.email_recipient = email_recipient + self.notification_locale = notification_locale + self.description = description + self.events = events + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class NotificationChannelFragment(UpdateResource): + """A notification. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param web_hook_url: The webhook URL to send notifications to. + :type web_hook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + :param description: Description of notification. + :type description: str + :param events: The list of event for which this notification is enabled. + :type events: list[~azure.mgmt.devtestlabs.models.EventFragment] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'events': {'key': 'properties.events', 'type': '[EventFragment]'}, + } + + def __init__(self, *, tags=None, web_hook_url: str=None, email_recipient: str=None, notification_locale: str=None, description: str=None, events=None, **kwargs) -> None: + super(NotificationChannelFragment, self).__init__(tags=tags, **kwargs) + self.web_hook_url = web_hook_url + self.email_recipient = email_recipient + self.notification_locale = notification_locale + self.description = description + self.events = events + + +class NotificationSettings(Model): + """Notification settings for a schedule. + + :param status: If notifications are enabled for this schedule (i.e. + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param time_in_minutes: Time in minutes before event at which notification + will be sent. + :type time_in_minutes: int + :param webhook_url: The webhook URL to which the notification will be + sent. + :type webhook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, + 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, + } + + def __init__(self, *, status=None, time_in_minutes: int=None, webhook_url: str=None, email_recipient: str=None, notification_locale: str=None, **kwargs) -> None: + super(NotificationSettings, self).__init__(**kwargs) + self.status = status + self.time_in_minutes = time_in_minutes + self.webhook_url = webhook_url + self.email_recipient = email_recipient + self.notification_locale = notification_locale + + +class NotificationSettingsFragment(Model): + """Notification settings for a schedule. + + :param status: If notifications are enabled for this schedule (i.e. + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param time_in_minutes: Time in minutes before event at which notification + will be sent. + :type time_in_minutes: int + :param webhook_url: The webhook URL to which the notification will be + sent. + :type webhook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, + 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, + } + + def __init__(self, *, status=None, time_in_minutes: int=None, webhook_url: str=None, email_recipient: str=None, notification_locale: str=None, **kwargs) -> None: + super(NotificationSettingsFragment, self).__init__(**kwargs) + self.status = status + self.time_in_minutes = time_in_minutes + self.webhook_url = webhook_url + self.email_recipient = email_recipient + self.notification_locale = notification_locale + + +class NotifyParameters(Model): + """Properties for generating a Notification. + + :param event_name: The type of event (i.e. AutoShutdown, Cost). Possible + values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + :param json_payload: Properties for the notification in json format. + :type json_payload: str + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + 'json_payload': {'key': 'jsonPayload', 'type': 'str'}, + } + + def __init__(self, *, event_name=None, json_payload: str=None, **kwargs) -> None: + super(NotifyParameters, self).__init__(**kwargs) + self.event_name = event_name + self.json_payload = json_payload + + +class OperationError(Model): + """Error details for the operation in case of a failure. + + :param code: The error code of the operation error. + :type code: str + :param message: The error message of the operation error. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(OperationError, self).__init__(**kwargs) + self.code = code + self.message = message + + +class OperationMetadata(Model): + """The REST API operation supported by DevTestLab ResourceProvider. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that describes the operations + :type display: ~azure.mgmt.devtestlabs.models.OperationMetadataDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationMetadataDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(OperationMetadata, self).__init__(**kwargs) + self.name = name + self.display = display + + +class OperationMetadataDisplay(Model): + """The object that describes the operations. + + :param provider: Friendly name of the resource provider + :type provider: str + :param resource: Resource type on which the operation is performed. + :type resource: str + :param operation: Operation type: read, write, delete, listKeys/action, + etc. + :type operation: str + :param description: Friendly name of the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationMetadataDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class OperationResult(Model): + """An Operation Result. + + :param status: The operation status. + :type status: str + :param status_code: The status code for the operation. Possible values + include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', + 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', + 'PartialContent', 'MultipleChoices', 'MovedPermanently', 'Redirect', + 'SeeOther', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', + 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', + 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', + 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', + 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', + 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', + 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', + 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', + 'HttpVersionNotSupported' + :type status_code: str or ~azure.mgmt.devtestlabs.models.HttpStatusCode + :param error: Error details for the operation in case of a failure. + :type error: ~azure.mgmt.devtestlabs.models.OperationError + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'OperationError'}, + } + + def __init__(self, *, status: str=None, status_code=None, error=None, **kwargs) -> None: + super(OperationResult, self).__init__(**kwargs) + self.status = status + self.status_code = status_code + self.error = error + + +class ParameterInfo(Model): + """Information about an artifact's parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ParameterInfo, self).__init__(**kwargs) + self.name = name + self.value = value + + +class ParametersValueFileInfo(Model): + """A file containing a set of parameter values for an ARM template. + + :param file_name: File name. + :type file_name: str + :param parameters_value_info: Contents of the file. + :type parameters_value_info: object + """ + + _attribute_map = { + 'file_name': {'key': 'fileName', 'type': 'str'}, + 'parameters_value_info': {'key': 'parametersValueInfo', 'type': 'object'}, + } + + def __init__(self, *, file_name: str=None, parameters_value_info=None, **kwargs) -> None: + super(ParametersValueFileInfo, self).__init__(**kwargs) + self.file_name = file_name + self.parameters_value_info = parameters_value_info + + +class PercentageCostThresholdProperties(Model): + """Properties of a percentage cost threshold. + + :param threshold_value: The cost threshold value. + :type threshold_value: float + """ + + _attribute_map = { + 'threshold_value': {'key': 'thresholdValue', 'type': 'float'}, + } + + def __init__(self, *, threshold_value: float=None, **kwargs) -> None: + super(PercentageCostThresholdProperties, self).__init__(**kwargs) + self.threshold_value = threshold_value + + +class Policy(Resource): + """A Policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the policy. + :type description: str + :param status: The status of the policy. Possible values include: + 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus + :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, + MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', + 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', + 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', + 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' + :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName + :param fact_data: The fact data of the policy. + :type fact_data: str + :param threshold: The threshold of the policy (i.e. a number for + MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). + :type threshold: str + :param evaluator_type: The evaluator type of the policy (i.e. + AllowedValuesPolicy, MaxValuePolicy). Possible values include: + 'AllowedValuesPolicy', 'MaxValuePolicy' + :type evaluator_type: str or + ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType + :ivar created_date: The creation date of the policy. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'fact_name': {'key': 'properties.factName', 'type': 'str'}, + 'fact_data': {'key': 'properties.factData', 'type': 'str'}, + 'threshold': {'key': 'properties.threshold', 'type': 'str'}, + 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, description: str=None, status=None, fact_name=None, fact_data: str=None, threshold: str=None, evaluator_type=None, **kwargs) -> None: + super(Policy, self).__init__(location=location, tags=tags, **kwargs) + self.description = description + self.status = status + self.fact_name = fact_name + self.fact_data = fact_data + self.threshold = threshold + self.evaluator_type = evaluator_type + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class PolicyFragment(UpdateResource): + """A Policy. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the policy. + :type description: str + :param status: The status of the policy. Possible values include: + 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus + :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, + MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', + 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', + 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', + 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' + :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName + :param fact_data: The fact data of the policy. + :type fact_data: str + :param threshold: The threshold of the policy (i.e. a number for + MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). + :type threshold: str + :param evaluator_type: The evaluator type of the policy (i.e. + AllowedValuesPolicy, MaxValuePolicy). Possible values include: + 'AllowedValuesPolicy', 'MaxValuePolicy' + :type evaluator_type: str or + ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'fact_name': {'key': 'properties.factName', 'type': 'str'}, + 'fact_data': {'key': 'properties.factData', 'type': 'str'}, + 'threshold': {'key': 'properties.threshold', 'type': 'str'}, + 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, + } + + def __init__(self, *, tags=None, description: str=None, status=None, fact_name=None, fact_data: str=None, threshold: str=None, evaluator_type=None, **kwargs) -> None: + super(PolicyFragment, self).__init__(tags=tags, **kwargs) + self.description = description + self.status = status + self.fact_name = fact_name + self.fact_data = fact_data + self.threshold = threshold + self.evaluator_type = evaluator_type + + +class PolicySetResult(Model): + """Result of a policy set evaluation. + + :param has_error: A value indicating whether this policy set evaluation + has discovered violations. + :type has_error: bool + :param policy_violations: The list of policy violations. + :type policy_violations: + list[~azure.mgmt.devtestlabs.models.PolicyViolation] + """ + + _attribute_map = { + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'policy_violations': {'key': 'policyViolations', 'type': '[PolicyViolation]'}, + } + + def __init__(self, *, has_error: bool=None, policy_violations=None, **kwargs) -> None: + super(PolicySetResult, self).__init__(**kwargs) + self.has_error = has_error + self.policy_violations = policy_violations + + +class PolicyViolation(Model): + """Policy violation. + + :param code: The code of the policy violation. + :type code: str + :param message: The message of the policy violation. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(PolicyViolation, self).__init__(**kwargs) + self.code = code + self.message = message + + +class Port(Model): + """Properties of a network port. + + :param transport_protocol: Protocol type of the port. Possible values + include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param backend_port: Backend port of the target virtual machine. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, *, transport_protocol=None, backend_port: int=None, **kwargs) -> None: + super(Port, self).__init__(**kwargs) + self.transport_protocol = transport_protocol + self.backend_port = backend_port + + +class PortFragment(Model): + """Properties of a network port. + + :param transport_protocol: Protocol type of the port. Possible values + include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param backend_port: Backend port of the target virtual machine. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, *, transport_protocol=None, backend_port: int=None, **kwargs) -> None: + super(PortFragment, self).__init__(**kwargs) + self.transport_protocol = transport_protocol + self.backend_port = backend_port + + +class RdpConnection(Model): + """Represents a .rdp file. + + :param contents: The contents of the .rdp file + :type contents: str + """ + + _attribute_map = { + 'contents': {'key': 'contents', 'type': 'str'}, + } + + def __init__(self, *, contents: str=None, **kwargs) -> None: + super(RdpConnection, self).__init__(**kwargs) + self.contents = contents + + +class ResizeLabVirtualMachineProperties(Model): + """Request body for resizing a virtual machine. + + :param size: Specifies the size of the virtual machine. + :type size: str + """ + + _attribute_map = { + 'size': {'key': 'size', 'type': 'str'}, + } + + def __init__(self, *, size: str=None, **kwargs) -> None: + super(ResizeLabVirtualMachineProperties, self).__init__(**kwargs) + self.size = size + + +class RetargetScheduleProperties(Model): + """Properties for retargeting a virtual machine schedule. + + :param current_resource_id: The resource Id of the virtual machine on + which the schedule operates + :type current_resource_id: str + :param target_resource_id: The resource Id of the virtual machine that the + schedule should be retargeted to + :type target_resource_id: str + """ + + _attribute_map = { + 'current_resource_id': {'key': 'currentResourceId', 'type': 'str'}, + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + } + + def __init__(self, *, current_resource_id: str=None, target_resource_id: str=None, **kwargs) -> None: + super(RetargetScheduleProperties, self).__init__(**kwargs) + self.current_resource_id = current_resource_id + self.target_resource_id = target_resource_id + + +class Schedule(Resource): + """A schedule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettings + :ivar created_date: The creation date of the schedule. + :vartype created_date: datetime + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, **kwargs) -> None: + super(Schedule, self).__init__(location=location, tags=tags, **kwargs) + self.status = status + self.task_type = task_type + self.weekly_recurrence = weekly_recurrence + self.daily_recurrence = daily_recurrence + self.hourly_recurrence = hourly_recurrence + self.time_zone_id = time_zone_id + self.notification_settings = notification_settings + self.created_date = None + self.target_resource_id = target_resource_id + self.provisioning_state = None + self.unique_identifier = None + + +class ScheduleCreationParameter(Model): + """Properties for creating a schedule. + + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettings + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(ScheduleCreationParameter, self).__init__(**kwargs) + self.status = status + self.task_type = task_type + self.weekly_recurrence = weekly_recurrence + self.daily_recurrence = daily_recurrence + self.hourly_recurrence = hourly_recurrence + self.time_zone_id = time_zone_id + self.notification_settings = notification_settings + self.target_resource_id = target_resource_id + self.name = name + self.location = location + self.tags = tags + + +class ScheduleCreationParameterFragment(Model): + """Properties for creating a schedule. + + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: + ~azure.mgmt.devtestlabs.models.WeekDetailsFragment + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: + ~azure.mgmt.devtestlabs.models.HourDetailsFragment + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(ScheduleCreationParameterFragment, self).__init__(**kwargs) + self.status = status + self.task_type = task_type + self.weekly_recurrence = weekly_recurrence + self.daily_recurrence = daily_recurrence + self.hourly_recurrence = hourly_recurrence + self.time_zone_id = time_zone_id + self.notification_settings = notification_settings + self.target_resource_id = target_resource_id + self.name = name + self.location = location + self.tags = tags + + +class ScheduleFragment(UpdateResource): + """A schedule. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: + ~azure.mgmt.devtestlabs.models.WeekDetailsFragment + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: + ~azure.mgmt.devtestlabs.models.HourDetailsFragment + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + } + + def __init__(self, *, tags=None, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, **kwargs) -> None: + super(ScheduleFragment, self).__init__(tags=tags, **kwargs) + self.status = status + self.task_type = task_type + self.weekly_recurrence = weekly_recurrence + self.daily_recurrence = daily_recurrence + self.hourly_recurrence = hourly_recurrence + self.time_zone_id = time_zone_id + self.notification_settings = notification_settings + self.target_resource_id = target_resource_id + + +class Secret(Resource): + """A secret. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param value: The value of the secret for secret creation. + :type value: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, value: str=None, **kwargs) -> None: + super(Secret, self).__init__(location=location, tags=tags, **kwargs) + self.value = value + self.provisioning_state = None + self.unique_identifier = None + + +class SecretFragment(UpdateResource): + """A secret. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param value: The value of the secret for secret creation. + :type value: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + } + + def __init__(self, *, tags=None, value: str=None, **kwargs) -> None: + super(SecretFragment, self).__init__(tags=tags, **kwargs) + self.value = value + + +class ServiceFabric(Resource): + """A Service Fabric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param external_service_fabric_id: The backing service fabric resource's + id + :type external_service_fabric_id: str + :param environment_id: The resource id of the environment under which the + service fabric resource is present + :type environment_id: str + :ivar applicable_schedule: The applicable schedule for the virtual + machine. + :vartype applicable_schedule: + ~azure.mgmt.devtestlabs.models.ApplicableSchedule + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'applicable_schedule': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, external_service_fabric_id: str=None, environment_id: str=None, **kwargs) -> None: + super(ServiceFabric, self).__init__(location=location, tags=tags, **kwargs) + self.external_service_fabric_id = external_service_fabric_id + self.environment_id = environment_id + self.applicable_schedule = None + self.provisioning_state = None + self.unique_identifier = None + + +class ServiceFabricFragment(UpdateResource): + """A Service Fabric. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param external_service_fabric_id: The backing service fabric resource's + id + :type external_service_fabric_id: str + :param environment_id: The resource id of the environment under which the + service fabric resource is present + :type environment_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + } + + def __init__(self, *, tags=None, external_service_fabric_id: str=None, environment_id: str=None, **kwargs) -> None: + super(ServiceFabricFragment, self).__init__(tags=tags, **kwargs) + self.external_service_fabric_id = external_service_fabric_id + self.environment_id = environment_id + + +class ServiceRunner(Resource): + """A container for a managed identity to execute DevTest lab services. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.devtestlabs.models.IdentityProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, + } + + def __init__(self, *, location: str=None, tags=None, identity=None, **kwargs) -> None: + super(ServiceRunner, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity + + +class SharedPublicIpAddressConfiguration(Model): + """Properties of a virtual machine that determine how it is connected to a + load balancer. + + :param inbound_nat_rules: The incoming NAT rules + :type inbound_nat_rules: + list[~azure.mgmt.devtestlabs.models.InboundNatRule] + """ + + _attribute_map = { + 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRule]'}, + } + + def __init__(self, *, inbound_nat_rules=None, **kwargs) -> None: + super(SharedPublicIpAddressConfiguration, self).__init__(**kwargs) + self.inbound_nat_rules = inbound_nat_rules + + +class SharedPublicIpAddressConfigurationFragment(Model): + """Properties of a virtual machine that determine how it is connected to a + load balancer. + + :param inbound_nat_rules: The incoming NAT rules + :type inbound_nat_rules: + list[~azure.mgmt.devtestlabs.models.InboundNatRuleFragment] + """ + + _attribute_map = { + 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRuleFragment]'}, + } + + def __init__(self, *, inbound_nat_rules=None, **kwargs) -> None: + super(SharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) + self.inbound_nat_rules = inbound_nat_rules + + +class ShutdownNotificationContent(Model): + """The contents of a shutdown notification. Webhooks can use this type to + deserialize the request body when they get notified of an imminent + shutdown. + + :param skip_url: The URL to skip auto-shutdown. + :type skip_url: str + :param delay_url60: The URL to delay shutdown by 60 minutes. + :type delay_url60: str + :param delay_url120: The URL to delay shutdown by 2 hours. + :type delay_url120: str + :param vm_name: The virtual machine to be shut down. + :type vm_name: str + :param guid: The GUID for the virtual machine to be shut down. + :type guid: str + :param owner: The owner of the virtual machine. + :type owner: str + :param vm_url: The URL of the virtual machine. + :type vm_url: str + :param minutes_until_shutdown: Minutes remaining until shutdown + :type minutes_until_shutdown: str + :param event_type: The event for which a notification will be sent. + :type event_type: str + :param text: The text for the notification. + :type text: str + :param subscription_id: The subscription ID for the schedule. + :type subscription_id: str + :param resource_group_name: The resource group name for the schedule. + :type resource_group_name: str + :param lab_name: The lab for the schedule. + :type lab_name: str + """ + + _attribute_map = { + 'skip_url': {'key': 'skipUrl', 'type': 'str'}, + 'delay_url60': {'key': 'delayUrl60', 'type': 'str'}, + 'delay_url120': {'key': 'delayUrl120', 'type': 'str'}, + 'vm_name': {'key': 'vmName', 'type': 'str'}, + 'guid': {'key': 'guid', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'str'}, + 'vm_url': {'key': 'vmUrl', 'type': 'str'}, + 'minutes_until_shutdown': {'key': 'minutesUntilShutdown', 'type': 'str'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'lab_name': {'key': 'labName', 'type': 'str'}, + } + + def __init__(self, *, skip_url: str=None, delay_url60: str=None, delay_url120: str=None, vm_name: str=None, guid: str=None, owner: str=None, vm_url: str=None, minutes_until_shutdown: str=None, event_type: str=None, text: str=None, subscription_id: str=None, resource_group_name: str=None, lab_name: str=None, **kwargs) -> None: + super(ShutdownNotificationContent, self).__init__(**kwargs) + self.skip_url = skip_url + self.delay_url60 = delay_url60 + self.delay_url120 = delay_url120 + self.vm_name = vm_name + self.guid = guid + self.owner = owner + self.vm_url = vm_url + self.minutes_until_shutdown = minutes_until_shutdown + self.event_type = event_type + self.text = text + self.subscription_id = subscription_id + self.resource_group_name = resource_group_name + self.lab_name = lab_name + + +class Subnet(Model): + """Subnet information. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name of the subnet as seen in the lab. + :type lab_subnet_name: str + :param allow_public_ip: The permission policy of the subnet for allowing + public IP addresses (i.e. Allow, Deny)). Possible values include: + 'Default', 'Deny', 'Allow' + :type allow_public_ip: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, allow_public_ip=None, **kwargs) -> None: + super(Subnet, self).__init__(**kwargs) + self.resource_id = resource_id + self.lab_subnet_name = lab_subnet_name + self.allow_public_ip = allow_public_ip + + +class SubnetFragment(Model): + """Subnet information. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name of the subnet as seen in the lab. + :type lab_subnet_name: str + :param allow_public_ip: The permission policy of the subnet for allowing + public IP addresses (i.e. Allow, Deny)). Possible values include: + 'Default', 'Deny', 'Allow' + :type allow_public_ip: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, allow_public_ip=None, **kwargs) -> None: + super(SubnetFragment, self).__init__(**kwargs) + self.resource_id = resource_id + self.lab_subnet_name = lab_subnet_name + self.allow_public_ip = allow_public_ip + + +class SubnetOverride(Model): + """Property overrides on a subnet of a virtual network. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name given to the subnet within the lab. + :type lab_subnet_name: str + :param use_in_vm_creation_permission: Indicates whether this subnet can be + used during virtual machine creation (i.e. Allow, Deny). Possible values + include: 'Default', 'Deny', 'Allow' + :type use_in_vm_creation_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param use_public_ip_address_permission: Indicates whether public IP + addresses can be assigned to virtual machines on this subnet (i.e. Allow, + Deny). Possible values include: 'Default', 'Deny', 'Allow' + :type use_public_ip_address_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param shared_public_ip_address_configuration: Properties that virtual + machines on this subnet will share. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfiguration + :param virtual_network_pool_name: The virtual network pool associated with + this subnet. + :type virtual_network_pool_name: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, + 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfiguration'}, + 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, use_in_vm_creation_permission=None, use_public_ip_address_permission=None, shared_public_ip_address_configuration=None, virtual_network_pool_name: str=None, **kwargs) -> None: + super(SubnetOverride, self).__init__(**kwargs) + self.resource_id = resource_id + self.lab_subnet_name = lab_subnet_name + self.use_in_vm_creation_permission = use_in_vm_creation_permission + self.use_public_ip_address_permission = use_public_ip_address_permission + self.shared_public_ip_address_configuration = shared_public_ip_address_configuration + self.virtual_network_pool_name = virtual_network_pool_name + + +class SubnetOverrideFragment(Model): + """Property overrides on a subnet of a virtual network. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name given to the subnet within the lab. + :type lab_subnet_name: str + :param use_in_vm_creation_permission: Indicates whether this subnet can be + used during virtual machine creation (i.e. Allow, Deny). Possible values + include: 'Default', 'Deny', 'Allow' + :type use_in_vm_creation_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param use_public_ip_address_permission: Indicates whether public IP + addresses can be assigned to virtual machines on this subnet (i.e. Allow, + Deny). Possible values include: 'Default', 'Deny', 'Allow' + :type use_public_ip_address_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param shared_public_ip_address_configuration: Properties that virtual + machines on this subnet will share. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfigurationFragment + :param virtual_network_pool_name: The virtual network pool associated with + this subnet. + :type virtual_network_pool_name: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, + 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfigurationFragment'}, + 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, use_in_vm_creation_permission=None, use_public_ip_address_permission=None, shared_public_ip_address_configuration=None, virtual_network_pool_name: str=None, **kwargs) -> None: + super(SubnetOverrideFragment, self).__init__(**kwargs) + self.resource_id = resource_id + self.lab_subnet_name = lab_subnet_name + self.use_in_vm_creation_permission = use_in_vm_creation_permission + self.use_public_ip_address_permission = use_public_ip_address_permission + self.shared_public_ip_address_configuration = shared_public_ip_address_configuration + self.virtual_network_pool_name = virtual_network_pool_name + + +class SubnetSharedPublicIpAddressConfiguration(Model): + """Configuration for public IP address sharing. + + :param allowed_ports: Backend ports that virtual machines on this subnet + are allowed to expose + :type allowed_ports: list[~azure.mgmt.devtestlabs.models.Port] + """ + + _attribute_map = { + 'allowed_ports': {'key': 'allowedPorts', 'type': '[Port]'}, + } + + def __init__(self, *, allowed_ports=None, **kwargs) -> None: + super(SubnetSharedPublicIpAddressConfiguration, self).__init__(**kwargs) + self.allowed_ports = allowed_ports + + +class SubnetSharedPublicIpAddressConfigurationFragment(Model): + """Configuration for public IP address sharing. + + :param allowed_ports: Backend ports that virtual machines on this subnet + are allowed to expose + :type allowed_ports: list[~azure.mgmt.devtestlabs.models.PortFragment] + """ + + _attribute_map = { + 'allowed_ports': {'key': 'allowedPorts', 'type': '[PortFragment]'}, + } + + def __init__(self, *, allowed_ports=None, **kwargs) -> None: + super(SubnetSharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) + self.allowed_ports = allowed_ports + + +class TargetCostProperties(Model): + """Properties of a cost target. + + :param status: Target cost status. Possible values include: 'Enabled', + 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.TargetCostStatus + :param target: Lab target cost + :type target: int + :param cost_thresholds: Cost thresholds. + :type cost_thresholds: + list[~azure.mgmt.devtestlabs.models.CostThresholdProperties] + :param cycle_start_date_time: Reporting cycle start date. + :type cycle_start_date_time: datetime + :param cycle_end_date_time: Reporting cycle end date. + :type cycle_end_date_time: datetime + :param cycle_type: Reporting cycle type. Possible values include: + 'CalendarMonth', 'Custom' + :type cycle_type: str or ~azure.mgmt.devtestlabs.models.ReportingCycleType + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'int'}, + 'cost_thresholds': {'key': 'costThresholds', 'type': '[CostThresholdProperties]'}, + 'cycle_start_date_time': {'key': 'cycleStartDateTime', 'type': 'iso-8601'}, + 'cycle_end_date_time': {'key': 'cycleEndDateTime', 'type': 'iso-8601'}, + 'cycle_type': {'key': 'cycleType', 'type': 'str'}, + } + + def __init__(self, *, status=None, target: int=None, cost_thresholds=None, cycle_start_date_time=None, cycle_end_date_time=None, cycle_type=None, **kwargs) -> None: + super(TargetCostProperties, self).__init__(**kwargs) + self.status = status + self.target = target + self.cost_thresholds = cost_thresholds + self.cycle_start_date_time = cycle_start_date_time + self.cycle_end_date_time = cycle_end_date_time + self.cycle_type = cycle_type + + +class User(Resource): + """Profile of a lab user. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the user. + :type identity: ~azure.mgmt.devtestlabs.models.UserIdentity + :param secret_store: The secret store of the user. + :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStore + :ivar created_date: The creation date of the user profile. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'properties.identity', 'type': 'UserIdentity'}, + 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStore'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, identity=None, secret_store=None, **kwargs) -> None: + super(User, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity + self.secret_store = secret_store + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class UserFragment(UpdateResource): + """Profile of a lab user. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the user. + :type identity: ~azure.mgmt.devtestlabs.models.UserIdentityFragment + :param secret_store: The secret store of the user. + :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStoreFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'properties.identity', 'type': 'UserIdentityFragment'}, + 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStoreFragment'}, + } + + def __init__(self, *, tags=None, identity=None, secret_store=None, **kwargs) -> None: + super(UserFragment, self).__init__(tags=tags, **kwargs) + self.identity = identity + self.secret_store = secret_store + + +class UserIdentity(Model): + """Identity attributes of a lab user. + + :param principal_name: Set to the principal name / UPN of the client JWT + making the request. + :type principal_name: str + :param principal_id: Set to the principal Id of the client JWT making the + request. Service principal will not have the principal Id. + :type principal_id: str + :param tenant_id: Set to the tenant ID of the client JWT making the + request. + :type tenant_id: str + :param object_id: Set to the object Id of the client JWT making the + request. Not all users have object Id. For CSP (reseller) scenarios for + example, object Id is not available. + :type object_id: str + :param app_id: Set to the app Id of the client JWT making the request. + :type app_id: str + """ + + _attribute_map = { + 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'app_id': {'key': 'appId', 'type': 'str'}, + } + + def __init__(self, *, principal_name: str=None, principal_id: str=None, tenant_id: str=None, object_id: str=None, app_id: str=None, **kwargs) -> None: + super(UserIdentity, self).__init__(**kwargs) + self.principal_name = principal_name + self.principal_id = principal_id + self.tenant_id = tenant_id + self.object_id = object_id + self.app_id = app_id + + +class UserIdentityFragment(Model): + """Identity attributes of a lab user. + + :param principal_name: Set to the principal name / UPN of the client JWT + making the request. + :type principal_name: str + :param principal_id: Set to the principal Id of the client JWT making the + request. Service principal will not have the principal Id. + :type principal_id: str + :param tenant_id: Set to the tenant ID of the client JWT making the + request. + :type tenant_id: str + :param object_id: Set to the object Id of the client JWT making the + request. Not all users have object Id. For CSP (reseller) scenarios for + example, object Id is not available. + :type object_id: str + :param app_id: Set to the app Id of the client JWT making the request. + :type app_id: str + """ + + _attribute_map = { + 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'app_id': {'key': 'appId', 'type': 'str'}, + } + + def __init__(self, *, principal_name: str=None, principal_id: str=None, tenant_id: str=None, object_id: str=None, app_id: str=None, **kwargs) -> None: + super(UserIdentityFragment, self).__init__(**kwargs) + self.principal_name = principal_name + self.principal_id = principal_id + self.tenant_id = tenant_id + self.object_id = object_id + self.app_id = app_id + + +class UserSecretStore(Model): + """Properties of a user's secret store. + + :param key_vault_uri: The URI of the user's Key vault. + :type key_vault_uri: str + :param key_vault_id: The ID of the user's Key vault. + :type key_vault_id: str + """ + + _attribute_map = { + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + } + + def __init__(self, *, key_vault_uri: str=None, key_vault_id: str=None, **kwargs) -> None: + super(UserSecretStore, self).__init__(**kwargs) + self.key_vault_uri = key_vault_uri + self.key_vault_id = key_vault_id + + +class UserSecretStoreFragment(Model): + """Properties of a user's secret store. + + :param key_vault_uri: The URI of the user's Key vault. + :type key_vault_uri: str + :param key_vault_id: The ID of the user's Key vault. + :type key_vault_id: str + """ + + _attribute_map = { + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + } + + def __init__(self, *, key_vault_uri: str=None, key_vault_id: str=None, **kwargs) -> None: + super(UserSecretStoreFragment, self).__init__(**kwargs) + self.key_vault_uri = key_vault_uri + self.key_vault_id = key_vault_id + + +class VirtualNetwork(Resource): + """A virtual network. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param allowed_subnets: The allowed subnets of the virtual network. + :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.Subnet] + :param description: The description of the virtual network. + :type description: str + :param external_provider_resource_id: The Microsoft.Network resource + identifier of the virtual network. + :type external_provider_resource_id: str + :ivar external_subnets: The external subnet properties. + :vartype external_subnets: + list[~azure.mgmt.devtestlabs.models.ExternalSubnet] + :param subnet_overrides: The subnet overrides of the virtual network. + :type subnet_overrides: + list[~azure.mgmt.devtestlabs.models.SubnetOverride] + :ivar created_date: The creation date of the virtual network. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'external_subnets': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[Subnet]'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, + 'external_subnets': {'key': 'properties.externalSubnets', 'type': '[ExternalSubnet]'}, + 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverride]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, allowed_subnets=None, description: str=None, external_provider_resource_id: str=None, subnet_overrides=None, **kwargs) -> None: + super(VirtualNetwork, self).__init__(location=location, tags=tags, **kwargs) + self.allowed_subnets = allowed_subnets + self.description = description + self.external_provider_resource_id = external_provider_resource_id + self.external_subnets = None + self.subnet_overrides = subnet_overrides + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class VirtualNetworkFragment(UpdateResource): + """A virtual network. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param allowed_subnets: The allowed subnets of the virtual network. + :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.SubnetFragment] + :param description: The description of the virtual network. + :type description: str + :param external_provider_resource_id: The Microsoft.Network resource + identifier of the virtual network. + :type external_provider_resource_id: str + :param subnet_overrides: The subnet overrides of the virtual network. + :type subnet_overrides: + list[~azure.mgmt.devtestlabs.models.SubnetOverrideFragment] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[SubnetFragment]'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, + 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverrideFragment]'}, + } + + def __init__(self, *, tags=None, allowed_subnets=None, description: str=None, external_provider_resource_id: str=None, subnet_overrides=None, **kwargs) -> None: + super(VirtualNetworkFragment, self).__init__(tags=tags, **kwargs) + self.allowed_subnets = allowed_subnets + self.description = description + self.external_provider_resource_id = external_provider_resource_id + self.subnet_overrides = subnet_overrides + + +class WeekDetails(Model): + """Properties of a weekly schedule. + + :param weekdays: The days of the week for which the schedule is set (e.g. + Sunday, Monday, Tuesday, etc.). + :type weekdays: list[str] + :param time: The time of the day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'weekdays': {'key': 'weekdays', 'type': '[str]'}, + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, *, weekdays=None, time: str=None, **kwargs) -> None: + super(WeekDetails, self).__init__(**kwargs) + self.weekdays = weekdays + self.time = time + + +class WeekDetailsFragment(Model): + """Properties of a weekly schedule. + + :param weekdays: The days of the week for which the schedule is set (e.g. + Sunday, Monday, Tuesday, etc.). + :type weekdays: list[str] + :param time: The time of the day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'weekdays': {'key': 'weekdays', 'type': '[str]'}, + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, *, weekdays=None, time: str=None, **kwargs) -> None: + super(WeekDetailsFragment, self).__init__(**kwargs) + self.weekdays = weekdays + self.time = time + + +class WindowsOsInfo(Model): + """Information about a Windows OS. + + :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, + SysprepRequested, SysprepApplied). Possible values include: + 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' + :type windows_os_state: str or + ~azure.mgmt.devtestlabs.models.WindowsOsState + """ + + _attribute_map = { + 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, + } + + def __init__(self, *, windows_os_state=None, **kwargs) -> None: + super(WindowsOsInfo, self).__init__(**kwargs) + self.windows_os_state = windows_os_state + + +class WindowsOsInfoFragment(Model): + """Information about a Windows OS. + + :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, + SysprepRequested, SysprepApplied). Possible values include: + 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' + :type windows_os_state: str or + ~azure.mgmt.devtestlabs.models.WindowsOsState + """ + + _attribute_map = { + 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, + } + + def __init__(self, *, windows_os_state=None, **kwargs) -> None: + super(WindowsOsInfoFragment, self).__init__(**kwargs) + self.windows_os_state = windows_os_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_paged_models.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_paged_models.py new file mode 100644 index 000000000000..3e947c89d709 --- /dev/null +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_paged_models.py @@ -0,0 +1,261 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationMetadataPaged(Paged): + """ + A paging container for iterating over a list of :class:`OperationMetadata ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[OperationMetadata]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationMetadataPaged, self).__init__(*args, **kwargs) +class LabPaged(Paged): + """ + A paging container for iterating over a list of :class:`Lab ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Lab]'} + } + + def __init__(self, *args, **kwargs): + + super(LabPaged, self).__init__(*args, **kwargs) +class LabVhdPaged(Paged): + """ + A paging container for iterating over a list of :class:`LabVhd ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[LabVhd]'} + } + + def __init__(self, *args, **kwargs): + + super(LabVhdPaged, self).__init__(*args, **kwargs) +class SchedulePaged(Paged): + """ + A paging container for iterating over a list of :class:`Schedule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Schedule]'} + } + + def __init__(self, *args, **kwargs): + + super(SchedulePaged, self).__init__(*args, **kwargs) +class ArtifactSourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`ArtifactSource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ArtifactSource]'} + } + + def __init__(self, *args, **kwargs): + + super(ArtifactSourcePaged, self).__init__(*args, **kwargs) +class ArmTemplatePaged(Paged): + """ + A paging container for iterating over a list of :class:`ArmTemplate ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ArmTemplate]'} + } + + def __init__(self, *args, **kwargs): + + super(ArmTemplatePaged, self).__init__(*args, **kwargs) +class ArtifactPaged(Paged): + """ + A paging container for iterating over a list of :class:`Artifact ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Artifact]'} + } + + def __init__(self, *args, **kwargs): + + super(ArtifactPaged, self).__init__(*args, **kwargs) +class CustomImagePaged(Paged): + """ + A paging container for iterating over a list of :class:`CustomImage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CustomImage]'} + } + + def __init__(self, *args, **kwargs): + + super(CustomImagePaged, self).__init__(*args, **kwargs) +class FormulaPaged(Paged): + """ + A paging container for iterating over a list of :class:`Formula ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Formula]'} + } + + def __init__(self, *args, **kwargs): + + super(FormulaPaged, self).__init__(*args, **kwargs) +class GalleryImagePaged(Paged): + """ + A paging container for iterating over a list of :class:`GalleryImage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GalleryImage]'} + } + + def __init__(self, *args, **kwargs): + + super(GalleryImagePaged, self).__init__(*args, **kwargs) +class NotificationChannelPaged(Paged): + """ + A paging container for iterating over a list of :class:`NotificationChannel ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[NotificationChannel]'} + } + + def __init__(self, *args, **kwargs): + + super(NotificationChannelPaged, self).__init__(*args, **kwargs) +class PolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`Policy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Policy]'} + } + + def __init__(self, *args, **kwargs): + + super(PolicyPaged, self).__init__(*args, **kwargs) +class UserPaged(Paged): + """ + A paging container for iterating over a list of :class:`User ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[User]'} + } + + def __init__(self, *args, **kwargs): + + super(UserPaged, self).__init__(*args, **kwargs) +class DiskPaged(Paged): + """ + A paging container for iterating over a list of :class:`Disk ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Disk]'} + } + + def __init__(self, *args, **kwargs): + + super(DiskPaged, self).__init__(*args, **kwargs) +class DtlEnvironmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`DtlEnvironment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DtlEnvironment]'} + } + + def __init__(self, *args, **kwargs): + + super(DtlEnvironmentPaged, self).__init__(*args, **kwargs) +class SecretPaged(Paged): + """ + A paging container for iterating over a list of :class:`Secret ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Secret]'} + } + + def __init__(self, *args, **kwargs): + + super(SecretPaged, self).__init__(*args, **kwargs) +class ServiceFabricPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServiceFabric ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServiceFabric]'} + } + + def __init__(self, *args, **kwargs): + + super(ServiceFabricPaged, self).__init__(*args, **kwargs) +class LabVirtualMachinePaged(Paged): + """ + A paging container for iterating over a list of :class:`LabVirtualMachine ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[LabVirtualMachine]'} + } + + def __init__(self, *args, **kwargs): + + super(LabVirtualMachinePaged, self).__init__(*args, **kwargs) +class VirtualNetworkPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualNetwork ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualNetwork]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualNetworkPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule.py deleted file mode 100644 index bbdc049f2f3f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ApplicableSchedule(Resource): - """Schedules applicable to a virtual machine. The schedules may have been - defined on a VM or on lab level. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set - at the lab or lab resource level. - :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.Schedule - :param lab_vms_startup: The auto-startup schedule, if one has been set at - the lab or lab resource level. - :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.Schedule - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'Schedule'}, - 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'Schedule'}, - } - - def __init__(self, **kwargs): - super(ApplicableSchedule, self).__init__(**kwargs) - self.lab_vms_shutdown = kwargs.get('lab_vms_shutdown', None) - self.lab_vms_startup = kwargs.get('lab_vms_startup', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment.py deleted file mode 100644 index 8139b26bbb37..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class ApplicableScheduleFragment(UpdateResource): - """Schedules applicable to a virtual machine. The schedules may have been - defined on a VM or on lab level. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set - at the lab or lab resource level. - :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.ScheduleFragment - :param lab_vms_startup: The auto-startup schedule, if one has been set at - the lab or lab resource level. - :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.ScheduleFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'ScheduleFragment'}, - 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'ScheduleFragment'}, - } - - def __init__(self, **kwargs): - super(ApplicableScheduleFragment, self).__init__(**kwargs) - self.lab_vms_shutdown = kwargs.get('lab_vms_shutdown', None) - self.lab_vms_startup = kwargs.get('lab_vms_startup', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment_py3.py deleted file mode 100644 index d1ddb7b37caa..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class ApplicableScheduleFragment(UpdateResource): - """Schedules applicable to a virtual machine. The schedules may have been - defined on a VM or on lab level. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set - at the lab or lab resource level. - :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.ScheduleFragment - :param lab_vms_startup: The auto-startup schedule, if one has been set at - the lab or lab resource level. - :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.ScheduleFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'ScheduleFragment'}, - 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'ScheduleFragment'}, - } - - def __init__(self, *, tags=None, lab_vms_shutdown=None, lab_vms_startup=None, **kwargs) -> None: - super(ApplicableScheduleFragment, self).__init__(tags=tags, **kwargs) - self.lab_vms_shutdown = lab_vms_shutdown - self.lab_vms_startup = lab_vms_startup diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_py3.py deleted file mode 100644 index dabce38bbcae..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ApplicableSchedule(Resource): - """Schedules applicable to a virtual machine. The schedules may have been - defined on a VM or on lab level. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set - at the lab or lab resource level. - :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.Schedule - :param lab_vms_startup: The auto-startup schedule, if one has been set at - the lab or lab resource level. - :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.Schedule - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'Schedule'}, - 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'Schedule'}, - } - - def __init__(self, *, location: str=None, tags=None, lab_vms_shutdown=None, lab_vms_startup=None, **kwargs) -> None: - super(ApplicableSchedule, self).__init__(location=location, tags=tags, **kwargs) - self.lab_vms_shutdown = lab_vms_shutdown - self.lab_vms_startup = lab_vms_startup diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request.py deleted file mode 100644 index 5576e79bf0ad..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplyArtifactsRequest(Model): - """Request body for applying artifacts to a virtual machine. - - :param artifacts: The list of artifacts to apply. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - """ - - _attribute_map = { - 'artifacts': {'key': 'artifacts', 'type': '[ArtifactInstallProperties]'}, - } - - def __init__(self, **kwargs): - super(ApplyArtifactsRequest, self).__init__(**kwargs) - self.artifacts = kwargs.get('artifacts', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request_py3.py deleted file mode 100644 index 2e5de7eca69f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplyArtifactsRequest(Model): - """Request body for applying artifacts to a virtual machine. - - :param artifacts: The list of artifacts to apply. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - """ - - _attribute_map = { - 'artifacts': {'key': 'artifacts', 'type': '[ArtifactInstallProperties]'}, - } - - def __init__(self, *, artifacts=None, **kwargs) -> None: - super(ApplyArtifactsRequest, self).__init__(**kwargs) - self.artifacts = artifacts diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template.py deleted file mode 100644 index 9ff3ebed92de..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ArmTemplate(Resource): - """An Azure Resource Manager template. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar display_name: The display name of the ARM template. - :vartype display_name: str - :ivar description: The description of the ARM template. - :vartype description: str - :ivar publisher: The publisher of the ARM template. - :vartype publisher: str - :ivar icon: The URI to the icon of the ARM template. - :vartype icon: str - :ivar contents: The contents of the ARM template. - :vartype contents: object - :ivar created_date: The creation date of the armTemplate. - :vartype created_date: datetime - :ivar parameters_value_files_info: File name and parameter values - information from all azuredeploy.*.parameters.json for the ARM template. - :vartype parameters_value_files_info: - list[~azure.mgmt.devtestlabs.models.ParametersValueFileInfo] - :ivar enabled: Whether or not ARM template is enabled for use by lab user. - :vartype enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'publisher': {'readonly': True}, - 'icon': {'readonly': True}, - 'contents': {'readonly': True}, - 'created_date': {'readonly': True}, - 'parameters_value_files_info': {'readonly': True}, - 'enabled': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'contents': {'key': 'properties.contents', 'type': 'object'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'parameters_value_files_info': {'key': 'properties.parametersValueFilesInfo', 'type': '[ParametersValueFileInfo]'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ArmTemplate, self).__init__(**kwargs) - self.display_name = None - self.description = None - self.publisher = None - self.icon = None - self.contents = None - self.created_date = None - self.parameters_value_files_info = None - self.enabled = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info.py deleted file mode 100644 index 9706cf3d1122..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArmTemplateInfo(Model): - """Information about a generated ARM template. - - :param template: The template's contents. - :type template: object - :param parameters: The parameters of the ARM template. - :type parameters: object - """ - - _attribute_map = { - 'template': {'key': 'template', 'type': 'object'}, - 'parameters': {'key': 'parameters', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ArmTemplateInfo, self).__init__(**kwargs) - self.template = kwargs.get('template', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info_py3.py deleted file mode 100644 index 6194e4d20559..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArmTemplateInfo(Model): - """Information about a generated ARM template. - - :param template: The template's contents. - :type template: object - :param parameters: The parameters of the ARM template. - :type parameters: object - """ - - _attribute_map = { - 'template': {'key': 'template', 'type': 'object'}, - 'parameters': {'key': 'parameters', 'type': 'object'}, - } - - def __init__(self, *, template=None, parameters=None, **kwargs) -> None: - super(ArmTemplateInfo, self).__init__(**kwargs) - self.template = template - self.parameters = parameters diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_paged.py deleted file mode 100644 index e209fa704487..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ArmTemplatePaged(Paged): - """ - A paging container for iterating over a list of :class:`ArmTemplate ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ArmTemplate]'} - } - - def __init__(self, *args, **kwargs): - - super(ArmTemplatePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties.py deleted file mode 100644 index 9c939b46ff98..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArmTemplateParameterProperties(Model): - """Properties of an Azure Resource Manager template parameter. - - :param name: The name of the template parameter. - :type name: str - :param value: The value of the template parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArmTemplateParameterProperties, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment.py deleted file mode 100644 index c73b8c260aee..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArmTemplateParameterPropertiesFragment(Model): - """Properties of an Azure Resource Manager template parameter. - - :param name: The name of the template parameter. - :type name: str - :param value: The value of the template parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArmTemplateParameterPropertiesFragment, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment_py3.py deleted file mode 100644 index ca110d0ee441..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArmTemplateParameterPropertiesFragment(Model): - """Properties of an Azure Resource Manager template parameter. - - :param name: The name of the template parameter. - :type name: str - :param value: The value of the template parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: - super(ArmTemplateParameterPropertiesFragment, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_py3.py deleted file mode 100644 index 16ab6753be2e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArmTemplateParameterProperties(Model): - """Properties of an Azure Resource Manager template parameter. - - :param name: The name of the template parameter. - :type name: str - :param value: The value of the template parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: - super(ArmTemplateParameterProperties, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_py3.py deleted file mode 100644 index 64b55696e79c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_py3.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ArmTemplate(Resource): - """An Azure Resource Manager template. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar display_name: The display name of the ARM template. - :vartype display_name: str - :ivar description: The description of the ARM template. - :vartype description: str - :ivar publisher: The publisher of the ARM template. - :vartype publisher: str - :ivar icon: The URI to the icon of the ARM template. - :vartype icon: str - :ivar contents: The contents of the ARM template. - :vartype contents: object - :ivar created_date: The creation date of the armTemplate. - :vartype created_date: datetime - :ivar parameters_value_files_info: File name and parameter values - information from all azuredeploy.*.parameters.json for the ARM template. - :vartype parameters_value_files_info: - list[~azure.mgmt.devtestlabs.models.ParametersValueFileInfo] - :ivar enabled: Whether or not ARM template is enabled for use by lab user. - :vartype enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'publisher': {'readonly': True}, - 'icon': {'readonly': True}, - 'contents': {'readonly': True}, - 'created_date': {'readonly': True}, - 'parameters_value_files_info': {'readonly': True}, - 'enabled': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'contents': {'key': 'properties.contents', 'type': 'object'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'parameters_value_files_info': {'key': 'properties.parametersValueFilesInfo', 'type': '[ParametersValueFileInfo]'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(ArmTemplate, self).__init__(location=location, tags=tags, **kwargs) - self.display_name = None - self.description = None - self.publisher = None - self.icon = None - self.contents = None - self.created_date = None - self.parameters_value_files_info = None - self.enabled = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact.py deleted file mode 100644 index cf1884020662..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Artifact(Resource): - """An artifact. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar title: The artifact's title. - :vartype title: str - :ivar description: The artifact's description. - :vartype description: str - :ivar publisher: The artifact's publisher. - :vartype publisher: str - :ivar file_path: The file path to the artifact. - :vartype file_path: str - :ivar icon: The URI to the artifact icon. - :vartype icon: str - :ivar target_os_type: The artifact's target OS. - :vartype target_os_type: str - :ivar parameters: The artifact's parameters. - :vartype parameters: object - :ivar created_date: The artifact's creation date. - :vartype created_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'title': {'readonly': True}, - 'description': {'readonly': True}, - 'publisher': {'readonly': True}, - 'file_path': {'readonly': True}, - 'icon': {'readonly': True}, - 'target_os_type': {'readonly': True}, - 'parameters': {'readonly': True}, - 'created_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'file_path': {'key': 'properties.filePath', 'type': 'str'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'target_os_type': {'key': 'properties.targetOsType', 'type': 'str'}, - 'parameters': {'key': 'properties.parameters', 'type': 'object'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(Artifact, self).__init__(**kwargs) - self.title = None - self.description = None - self.publisher = None - self.file_path = None - self.icon = None - self.target_os_type = None - self.parameters = None - self.created_date = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties.py deleted file mode 100644 index 00e10ab200d7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactDeploymentStatusProperties(Model): - """Properties of an artifact deployment. - - :param deployment_status: The deployment status of the artifact. - :type deployment_status: str - :param artifacts_applied: The total count of the artifacts that were - successfully applied. - :type artifacts_applied: int - :param total_artifacts: The total count of the artifacts that were - tentatively applied. - :type total_artifacts: int - """ - - _attribute_map = { - 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, - 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, - 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ArtifactDeploymentStatusProperties, self).__init__(**kwargs) - self.deployment_status = kwargs.get('deployment_status', None) - self.artifacts_applied = kwargs.get('artifacts_applied', None) - self.total_artifacts = kwargs.get('total_artifacts', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment.py deleted file mode 100644 index b5231c92c635..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactDeploymentStatusPropertiesFragment(Model): - """Properties of an artifact deployment. - - :param deployment_status: The deployment status of the artifact. - :type deployment_status: str - :param artifacts_applied: The total count of the artifacts that were - successfully applied. - :type artifacts_applied: int - :param total_artifacts: The total count of the artifacts that were - tentatively applied. - :type total_artifacts: int - """ - - _attribute_map = { - 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, - 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, - 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ArtifactDeploymentStatusPropertiesFragment, self).__init__(**kwargs) - self.deployment_status = kwargs.get('deployment_status', None) - self.artifacts_applied = kwargs.get('artifacts_applied', None) - self.total_artifacts = kwargs.get('total_artifacts', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment_py3.py deleted file mode 100644 index d3dd5372ef6d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactDeploymentStatusPropertiesFragment(Model): - """Properties of an artifact deployment. - - :param deployment_status: The deployment status of the artifact. - :type deployment_status: str - :param artifacts_applied: The total count of the artifacts that were - successfully applied. - :type artifacts_applied: int - :param total_artifacts: The total count of the artifacts that were - tentatively applied. - :type total_artifacts: int - """ - - _attribute_map = { - 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, - 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, - 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, - } - - def __init__(self, *, deployment_status: str=None, artifacts_applied: int=None, total_artifacts: int=None, **kwargs) -> None: - super(ArtifactDeploymentStatusPropertiesFragment, self).__init__(**kwargs) - self.deployment_status = deployment_status - self.artifacts_applied = artifacts_applied - self.total_artifacts = total_artifacts diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_py3.py deleted file mode 100644 index 5b38610af59e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactDeploymentStatusProperties(Model): - """Properties of an artifact deployment. - - :param deployment_status: The deployment status of the artifact. - :type deployment_status: str - :param artifacts_applied: The total count of the artifacts that were - successfully applied. - :type artifacts_applied: int - :param total_artifacts: The total count of the artifacts that were - tentatively applied. - :type total_artifacts: int - """ - - _attribute_map = { - 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, - 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, - 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, - } - - def __init__(self, *, deployment_status: str=None, artifacts_applied: int=None, total_artifacts: int=None, **kwargs) -> None: - super(ArtifactDeploymentStatusProperties, self).__init__(**kwargs) - self.deployment_status = deployment_status - self.artifacts_applied = artifacts_applied - self.total_artifacts = total_artifacts diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties.py deleted file mode 100644 index 7a976ea8f7b1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactInstallProperties(Model): - """Properties of an artifact. - - :param artifact_id: The artifact's identifier. - :type artifact_id: str - :param artifact_title: The artifact's title. - :type artifact_title: str - :param parameters: The parameters of the artifact. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArtifactParameterProperties] - :param status: The status of the artifact. - :type status: str - :param deployment_status_message: The status message from the deployment. - :type deployment_status_message: str - :param vm_extension_status_message: The status message from the virtual - machine extension. - :type vm_extension_status_message: str - :param install_time: The time that the artifact starts to install on the - virtual machine. - :type install_time: datetime - """ - - _attribute_map = { - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterProperties]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, - 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, - 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ArtifactInstallProperties, self).__init__(**kwargs) - self.artifact_id = kwargs.get('artifact_id', None) - self.artifact_title = kwargs.get('artifact_title', None) - self.parameters = kwargs.get('parameters', None) - self.status = kwargs.get('status', None) - self.deployment_status_message = kwargs.get('deployment_status_message', None) - self.vm_extension_status_message = kwargs.get('vm_extension_status_message', None) - self.install_time = kwargs.get('install_time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment.py deleted file mode 100644 index 0149af16d549..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactInstallPropertiesFragment(Model): - """Properties of an artifact. - - :param artifact_id: The artifact's identifier. - :type artifact_id: str - :param artifact_title: The artifact's title. - :type artifact_title: str - :param parameters: The parameters of the artifact. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArtifactParameterPropertiesFragment] - :param status: The status of the artifact. - :type status: str - :param deployment_status_message: The status message from the deployment. - :type deployment_status_message: str - :param vm_extension_status_message: The status message from the virtual - machine extension. - :type vm_extension_status_message: str - :param install_time: The time that the artifact starts to install on the - virtual machine. - :type install_time: datetime - """ - - _attribute_map = { - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterPropertiesFragment]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, - 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, - 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ArtifactInstallPropertiesFragment, self).__init__(**kwargs) - self.artifact_id = kwargs.get('artifact_id', None) - self.artifact_title = kwargs.get('artifact_title', None) - self.parameters = kwargs.get('parameters', None) - self.status = kwargs.get('status', None) - self.deployment_status_message = kwargs.get('deployment_status_message', None) - self.vm_extension_status_message = kwargs.get('vm_extension_status_message', None) - self.install_time = kwargs.get('install_time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment_py3.py deleted file mode 100644 index 4aa552477186..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactInstallPropertiesFragment(Model): - """Properties of an artifact. - - :param artifact_id: The artifact's identifier. - :type artifact_id: str - :param artifact_title: The artifact's title. - :type artifact_title: str - :param parameters: The parameters of the artifact. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArtifactParameterPropertiesFragment] - :param status: The status of the artifact. - :type status: str - :param deployment_status_message: The status message from the deployment. - :type deployment_status_message: str - :param vm_extension_status_message: The status message from the virtual - machine extension. - :type vm_extension_status_message: str - :param install_time: The time that the artifact starts to install on the - virtual machine. - :type install_time: datetime - """ - - _attribute_map = { - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterPropertiesFragment]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, - 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, - 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, artifact_id: str=None, artifact_title: str=None, parameters=None, status: str=None, deployment_status_message: str=None, vm_extension_status_message: str=None, install_time=None, **kwargs) -> None: - super(ArtifactInstallPropertiesFragment, self).__init__(**kwargs) - self.artifact_id = artifact_id - self.artifact_title = artifact_title - self.parameters = parameters - self.status = status - self.deployment_status_message = deployment_status_message - self.vm_extension_status_message = vm_extension_status_message - self.install_time = install_time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_py3.py deleted file mode 100644 index 3df682e56bc6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactInstallProperties(Model): - """Properties of an artifact. - - :param artifact_id: The artifact's identifier. - :type artifact_id: str - :param artifact_title: The artifact's title. - :type artifact_title: str - :param parameters: The parameters of the artifact. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArtifactParameterProperties] - :param status: The status of the artifact. - :type status: str - :param deployment_status_message: The status message from the deployment. - :type deployment_status_message: str - :param vm_extension_status_message: The status message from the virtual - machine extension. - :type vm_extension_status_message: str - :param install_time: The time that the artifact starts to install on the - virtual machine. - :type install_time: datetime - """ - - _attribute_map = { - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterProperties]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, - 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, - 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, artifact_id: str=None, artifact_title: str=None, parameters=None, status: str=None, deployment_status_message: str=None, vm_extension_status_message: str=None, install_time=None, **kwargs) -> None: - super(ArtifactInstallProperties, self).__init__(**kwargs) - self.artifact_id = artifact_id - self.artifact_title = artifact_title - self.parameters = parameters - self.status = status - self.deployment_status_message = deployment_status_message - self.vm_extension_status_message = vm_extension_status_message - self.install_time = install_time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_paged.py deleted file mode 100644 index 67c8e3601237..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ArtifactPaged(Paged): - """ - A paging container for iterating over a list of :class:`Artifact ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Artifact]'} - } - - def __init__(self, *args, **kwargs): - - super(ArtifactPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties.py deleted file mode 100644 index 546480baabd2..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactParameterProperties(Model): - """Properties of an artifact parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArtifactParameterProperties, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment.py deleted file mode 100644 index 77be250d5e11..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactParameterPropertiesFragment(Model): - """Properties of an artifact parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArtifactParameterPropertiesFragment, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment_py3.py deleted file mode 100644 index 326ea3643623..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactParameterPropertiesFragment(Model): - """Properties of an artifact parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: - super(ArtifactParameterPropertiesFragment, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_py3.py deleted file mode 100644 index c3ef4207b385..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactParameterProperties(Model): - """Properties of an artifact parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: - super(ArtifactParameterProperties, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_py3.py deleted file mode 100644 index 9e36ad2abf3f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Artifact(Resource): - """An artifact. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar title: The artifact's title. - :vartype title: str - :ivar description: The artifact's description. - :vartype description: str - :ivar publisher: The artifact's publisher. - :vartype publisher: str - :ivar file_path: The file path to the artifact. - :vartype file_path: str - :ivar icon: The URI to the artifact icon. - :vartype icon: str - :ivar target_os_type: The artifact's target OS. - :vartype target_os_type: str - :ivar parameters: The artifact's parameters. - :vartype parameters: object - :ivar created_date: The artifact's creation date. - :vartype created_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'title': {'readonly': True}, - 'description': {'readonly': True}, - 'publisher': {'readonly': True}, - 'file_path': {'readonly': True}, - 'icon': {'readonly': True}, - 'target_os_type': {'readonly': True}, - 'parameters': {'readonly': True}, - 'created_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'file_path': {'key': 'properties.filePath', 'type': 'str'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'target_os_type': {'key': 'properties.targetOsType', 'type': 'str'}, - 'parameters': {'key': 'properties.parameters', 'type': 'object'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(Artifact, self).__init__(location=location, tags=tags, **kwargs) - self.title = None - self.description = None - self.publisher = None - self.file_path = None - self.icon = None - self.target_os_type = None - self.parameters = None - self.created_date = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source.py deleted file mode 100644 index ba6cbfc20988..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ArtifactSource(Resource): - """Properties of an artifact source. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param display_name: The artifact source's display name. - :type display_name: str - :param uri: The artifact source's URI. - :type uri: str - :param source_type: The artifact source's type. Possible values include: - 'VsoGit', 'GitHub' - :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType - :param folder_path: The folder containing artifacts. - :type folder_path: str - :param arm_template_folder_path: The folder containing Azure Resource - Manager templates. - :type arm_template_folder_path: str - :param branch_ref: The artifact source's branch reference. - :type branch_ref: str - :param security_token: The security token to authenticate to the artifact - source. - :type security_token: str - :param status: Indicates if the artifact source is enabled (values: - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :ivar created_date: The artifact source's creation date. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, - 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, - 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, - 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, - 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArtifactSource, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.uri = kwargs.get('uri', None) - self.source_type = kwargs.get('source_type', None) - self.folder_path = kwargs.get('folder_path', None) - self.arm_template_folder_path = kwargs.get('arm_template_folder_path', None) - self.branch_ref = kwargs.get('branch_ref', None) - self.security_token = kwargs.get('security_token', None) - self.status = kwargs.get('status', None) - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment.py deleted file mode 100644 index 3c07b25eeb13..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class ArtifactSourceFragment(UpdateResource): - """Properties of an artifact source. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param display_name: The artifact source's display name. - :type display_name: str - :param uri: The artifact source's URI. - :type uri: str - :param source_type: The artifact source's type. Possible values include: - 'VsoGit', 'GitHub' - :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType - :param folder_path: The folder containing artifacts. - :type folder_path: str - :param arm_template_folder_path: The folder containing Azure Resource - Manager templates. - :type arm_template_folder_path: str - :param branch_ref: The artifact source's branch reference. - :type branch_ref: str - :param security_token: The security token to authenticate to the artifact - source. - :type security_token: str - :param status: Indicates if the artifact source is enabled (values: - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, - 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, - 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, - 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, - 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArtifactSourceFragment, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.uri = kwargs.get('uri', None) - self.source_type = kwargs.get('source_type', None) - self.folder_path = kwargs.get('folder_path', None) - self.arm_template_folder_path = kwargs.get('arm_template_folder_path', None) - self.branch_ref = kwargs.get('branch_ref', None) - self.security_token = kwargs.get('security_token', None) - self.status = kwargs.get('status', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment_py3.py deleted file mode 100644 index a243837b76d0..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class ArtifactSourceFragment(UpdateResource): - """Properties of an artifact source. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param display_name: The artifact source's display name. - :type display_name: str - :param uri: The artifact source's URI. - :type uri: str - :param source_type: The artifact source's type. Possible values include: - 'VsoGit', 'GitHub' - :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType - :param folder_path: The folder containing artifacts. - :type folder_path: str - :param arm_template_folder_path: The folder containing Azure Resource - Manager templates. - :type arm_template_folder_path: str - :param branch_ref: The artifact source's branch reference. - :type branch_ref: str - :param security_token: The security token to authenticate to the artifact - source. - :type security_token: str - :param status: Indicates if the artifact source is enabled (values: - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, - 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, - 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, - 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, - 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - } - - def __init__(self, *, tags=None, display_name: str=None, uri: str=None, source_type=None, folder_path: str=None, arm_template_folder_path: str=None, branch_ref: str=None, security_token: str=None, status=None, **kwargs) -> None: - super(ArtifactSourceFragment, self).__init__(tags=tags, **kwargs) - self.display_name = display_name - self.uri = uri - self.source_type = source_type - self.folder_path = folder_path - self.arm_template_folder_path = arm_template_folder_path - self.branch_ref = branch_ref - self.security_token = security_token - self.status = status diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_paged.py deleted file mode 100644 index d5990ee0e94f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ArtifactSourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`ArtifactSource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ArtifactSource]'} - } - - def __init__(self, *args, **kwargs): - - super(ArtifactSourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_py3.py deleted file mode 100644 index 53eeac5462f6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_py3.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ArtifactSource(Resource): - """Properties of an artifact source. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param display_name: The artifact source's display name. - :type display_name: str - :param uri: The artifact source's URI. - :type uri: str - :param source_type: The artifact source's type. Possible values include: - 'VsoGit', 'GitHub' - :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType - :param folder_path: The folder containing artifacts. - :type folder_path: str - :param arm_template_folder_path: The folder containing Azure Resource - Manager templates. - :type arm_template_folder_path: str - :param branch_ref: The artifact source's branch reference. - :type branch_ref: str - :param security_token: The security token to authenticate to the artifact - source. - :type security_token: str - :param status: Indicates if the artifact source is enabled (values: - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :ivar created_date: The artifact source's creation date. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, - 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, - 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, - 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, - 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, display_name: str=None, uri: str=None, source_type=None, folder_path: str=None, arm_template_folder_path: str=None, branch_ref: str=None, security_token: str=None, status=None, **kwargs) -> None: - super(ArtifactSource, self).__init__(location=location, tags=tags, **kwargs) - self.display_name = display_name - self.uri = uri - self.source_type = source_type - self.folder_path = folder_path - self.arm_template_folder_path = arm_template_folder_path - self.branch_ref = branch_ref - self.security_token = security_token - self.status = status - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties.py deleted file mode 100644 index 1935925ef669..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachDiskProperties(Model): - """Properties of the disk to attach. - - :param leased_by_lab_vm_id: The resource ID of the Lab virtual machine to - which the disk is attached. - :type leased_by_lab_vm_id: str - """ - - _attribute_map = { - 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AttachDiskProperties, self).__init__(**kwargs) - self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties_py3.py deleted file mode 100644 index 6cf94213e53e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachDiskProperties(Model): - """Properties of the disk to attach. - - :param leased_by_lab_vm_id: The resource ID of the Lab virtual machine to - which the disk is attached. - :type leased_by_lab_vm_id: str - """ - - _attribute_map = { - 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, - } - - def __init__(self, *, leased_by_lab_vm_id: str=None, **kwargs) -> None: - super(AttachDiskProperties, self).__init__(**kwargs) - self.leased_by_lab_vm_id = leased_by_lab_vm_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options.py deleted file mode 100644 index c4c18be9b277..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachNewDataDiskOptions(Model): - """Properties to attach new disk to the Virtual Machine. - - :param disk_size_gi_b: Size of the disk to be attached in Gibibytes. - :type disk_size_gi_b: int - :param disk_name: The name of the disk to be attached. - :type disk_name: str - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - 'disk_name': {'key': 'diskName', 'type': 'str'}, - 'disk_type': {'key': 'diskType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AttachNewDataDiskOptions, self).__init__(**kwargs) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) - self.disk_name = kwargs.get('disk_name', None) - self.disk_type = kwargs.get('disk_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment.py deleted file mode 100644 index 4ab7695dd872..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachNewDataDiskOptionsFragment(Model): - """Properties to attach new disk to the Virtual Machine. - - :param disk_size_gi_b: Size of the disk to be attached in Gibibytes. - :type disk_size_gi_b: int - :param disk_name: The name of the disk to be attached. - :type disk_name: str - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - 'disk_name': {'key': 'diskName', 'type': 'str'}, - 'disk_type': {'key': 'diskType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AttachNewDataDiskOptionsFragment, self).__init__(**kwargs) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) - self.disk_name = kwargs.get('disk_name', None) - self.disk_type = kwargs.get('disk_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment_py3.py deleted file mode 100644 index ec8d6863f811..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachNewDataDiskOptionsFragment(Model): - """Properties to attach new disk to the Virtual Machine. - - :param disk_size_gi_b: Size of the disk to be attached in Gibibytes. - :type disk_size_gi_b: int - :param disk_name: The name of the disk to be attached. - :type disk_name: str - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - 'disk_name': {'key': 'diskName', 'type': 'str'}, - 'disk_type': {'key': 'diskType', 'type': 'str'}, - } - - def __init__(self, *, disk_size_gi_b: int=None, disk_name: str=None, disk_type=None, **kwargs) -> None: - super(AttachNewDataDiskOptionsFragment, self).__init__(**kwargs) - self.disk_size_gi_b = disk_size_gi_b - self.disk_name = disk_name - self.disk_type = disk_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_py3.py deleted file mode 100644 index a03bb685e96c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachNewDataDiskOptions(Model): - """Properties to attach new disk to the Virtual Machine. - - :param disk_size_gi_b: Size of the disk to be attached in Gibibytes. - :type disk_size_gi_b: int - :param disk_name: The name of the disk to be attached. - :type disk_name: str - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - 'disk_name': {'key': 'diskName', 'type': 'str'}, - 'disk_type': {'key': 'diskType', 'type': 'str'}, - } - - def __init__(self, *, disk_size_gi_b: int=None, disk_name: str=None, disk_type=None, **kwargs) -> None: - super(AttachNewDataDiskOptions, self).__init__(**kwargs) - self.disk_size_gi_b = disk_size_gi_b - self.disk_name = disk_name - self.disk_type = disk_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters.py deleted file mode 100644 index f54138ff7a98..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BulkCreationParameters(Model): - """Parameters for creating multiple virtual machines as a single action. - - :param instance_count: The number of virtual machine instances to create. - :type instance_count: int - """ - - _attribute_map = { - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(BulkCreationParameters, self).__init__(**kwargs) - self.instance_count = kwargs.get('instance_count', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment.py deleted file mode 100644 index 1f03bf7aeffd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BulkCreationParametersFragment(Model): - """Parameters for creating multiple virtual machines as a single action. - - :param instance_count: The number of virtual machine instances to create. - :type instance_count: int - """ - - _attribute_map = { - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(BulkCreationParametersFragment, self).__init__(**kwargs) - self.instance_count = kwargs.get('instance_count', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment_py3.py deleted file mode 100644 index 3d78014f88c5..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BulkCreationParametersFragment(Model): - """Parameters for creating multiple virtual machines as a single action. - - :param instance_count: The number of virtual machine instances to create. - :type instance_count: int - """ - - _attribute_map = { - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - } - - def __init__(self, *, instance_count: int=None, **kwargs) -> None: - super(BulkCreationParametersFragment, self).__init__(**kwargs) - self.instance_count = instance_count diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_py3.py deleted file mode 100644 index c17ac0c6da94..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BulkCreationParameters(Model): - """Parameters for creating multiple virtual machines as a single action. - - :param instance_count: The number of virtual machine instances to create. - :type instance_count: int - """ - - _attribute_map = { - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - } - - def __init__(self, *, instance_count: int=None, **kwargs) -> None: - super(BulkCreationParameters, self).__init__(**kwargs) - self.instance_count = instance_count diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk.py deleted file mode 100644 index 36637b964ecc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeDataDisk(Model): - """A data disks attached to a virtual machine. - - :param name: Gets data disk name. - :type name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :param disk_size_gi_b: Gets data disk size in GiB. - :type disk_size_gi_b: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'disk_uri': {'key': 'diskUri', 'type': 'str'}, - 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ComputeDataDisk, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.disk_uri = kwargs.get('disk_uri', None) - self.managed_disk_id = kwargs.get('managed_disk_id', None) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment.py deleted file mode 100644 index 5dc673a52f22..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeDataDiskFragment(Model): - """A data disks attached to a virtual machine. - - :param name: Gets data disk name. - :type name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :param disk_size_gi_b: Gets data disk size in GiB. - :type disk_size_gi_b: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'disk_uri': {'key': 'diskUri', 'type': 'str'}, - 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ComputeDataDiskFragment, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.disk_uri = kwargs.get('disk_uri', None) - self.managed_disk_id = kwargs.get('managed_disk_id', None) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment_py3.py deleted file mode 100644 index 22fcaa4b3ad8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeDataDiskFragment(Model): - """A data disks attached to a virtual machine. - - :param name: Gets data disk name. - :type name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :param disk_size_gi_b: Gets data disk size in GiB. - :type disk_size_gi_b: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'disk_uri': {'key': 'diskUri', 'type': 'str'}, - 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - } - - def __init__(self, *, name: str=None, disk_uri: str=None, managed_disk_id: str=None, disk_size_gi_b: int=None, **kwargs) -> None: - super(ComputeDataDiskFragment, self).__init__(**kwargs) - self.name = name - self.disk_uri = disk_uri - self.managed_disk_id = managed_disk_id - self.disk_size_gi_b = disk_size_gi_b diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_py3.py deleted file mode 100644 index c88f007a5c0d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeDataDisk(Model): - """A data disks attached to a virtual machine. - - :param name: Gets data disk name. - :type name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :param disk_size_gi_b: Gets data disk size in GiB. - :type disk_size_gi_b: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'disk_uri': {'key': 'diskUri', 'type': 'str'}, - 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - } - - def __init__(self, *, name: str=None, disk_uri: str=None, managed_disk_id: str=None, disk_size_gi_b: int=None, **kwargs) -> None: - super(ComputeDataDisk, self).__init__(**kwargs) - self.name = name - self.disk_uri = disk_uri - self.managed_disk_id = managed_disk_id - self.disk_size_gi_b = disk_size_gi_b diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status.py deleted file mode 100644 index 896d9562e61d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmInstanceViewStatus(Model): - """Status information about a virtual machine. - - :param code: Gets the status Code. - :type code: str - :param display_status: Gets the short localizable label for the status. - :type display_status: str - :param message: Gets the message associated with the status. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ComputeVmInstanceViewStatus, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.display_status = kwargs.get('display_status', None) - self.message = kwargs.get('message', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment.py deleted file mode 100644 index 2b403562e4df..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmInstanceViewStatusFragment(Model): - """Status information about a virtual machine. - - :param code: Gets the status Code. - :type code: str - :param display_status: Gets the short localizable label for the status. - :type display_status: str - :param message: Gets the message associated with the status. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ComputeVmInstanceViewStatusFragment, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.display_status = kwargs.get('display_status', None) - self.message = kwargs.get('message', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment_py3.py deleted file mode 100644 index 81b1bd388f89..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmInstanceViewStatusFragment(Model): - """Status information about a virtual machine. - - :param code: Gets the status Code. - :type code: str - :param display_status: Gets the short localizable label for the status. - :type display_status: str - :param message: Gets the message associated with the status. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, display_status: str=None, message: str=None, **kwargs) -> None: - super(ComputeVmInstanceViewStatusFragment, self).__init__(**kwargs) - self.code = code - self.display_status = display_status - self.message = message diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_py3.py deleted file mode 100644 index 75fca83157a1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmInstanceViewStatus(Model): - """Status information about a virtual machine. - - :param code: Gets the status Code. - :type code: str - :param display_status: Gets the short localizable label for the status. - :type display_status: str - :param message: Gets the message associated with the status. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, display_status: str=None, message: str=None, **kwargs) -> None: - super(ComputeVmInstanceViewStatus, self).__init__(**kwargs) - self.code = code - self.display_status = display_status - self.message = message diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties.py deleted file mode 100644 index e4b785b9c47a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmProperties(Model): - """Properties of a virtual machine returned by the Microsoft.Compute API. - - :param statuses: Gets the statuses of the virtual machine. - :type statuses: - list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatus] - :param os_type: Gets the OS type of the virtual machine. - :type os_type: str - :param vm_size: Gets the size of the virtual machine. - :type vm_size: str - :param network_interface_id: Gets the network interface ID of the virtual - machine. - :type network_interface_id: str - :param os_disk_id: Gets OS disk blob uri for the virtual machine. - :type os_disk_id: str - :param data_disk_ids: Gets data disks blob uri for the virtual machine. - :type data_disk_ids: list[str] - :param data_disks: Gets all data disks attached to the virtual machine. - :type data_disks: list[~azure.mgmt.devtestlabs.models.ComputeDataDisk] - """ - - _attribute_map = { - 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatus]'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, - 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, - 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDisk]'}, - } - - def __init__(self, **kwargs): - super(ComputeVmProperties, self).__init__(**kwargs) - self.statuses = kwargs.get('statuses', None) - self.os_type = kwargs.get('os_type', None) - self.vm_size = kwargs.get('vm_size', None) - self.network_interface_id = kwargs.get('network_interface_id', None) - self.os_disk_id = kwargs.get('os_disk_id', None) - self.data_disk_ids = kwargs.get('data_disk_ids', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment.py deleted file mode 100644 index c6295526ebd6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmPropertiesFragment(Model): - """Properties of a virtual machine returned by the Microsoft.Compute API. - - :param statuses: Gets the statuses of the virtual machine. - :type statuses: - list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatusFragment] - :param os_type: Gets the OS type of the virtual machine. - :type os_type: str - :param vm_size: Gets the size of the virtual machine. - :type vm_size: str - :param network_interface_id: Gets the network interface ID of the virtual - machine. - :type network_interface_id: str - :param os_disk_id: Gets OS disk blob uri for the virtual machine. - :type os_disk_id: str - :param data_disk_ids: Gets data disks blob uri for the virtual machine. - :type data_disk_ids: list[str] - :param data_disks: Gets all data disks attached to the virtual machine. - :type data_disks: - list[~azure.mgmt.devtestlabs.models.ComputeDataDiskFragment] - """ - - _attribute_map = { - 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatusFragment]'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, - 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, - 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDiskFragment]'}, - } - - def __init__(self, **kwargs): - super(ComputeVmPropertiesFragment, self).__init__(**kwargs) - self.statuses = kwargs.get('statuses', None) - self.os_type = kwargs.get('os_type', None) - self.vm_size = kwargs.get('vm_size', None) - self.network_interface_id = kwargs.get('network_interface_id', None) - self.os_disk_id = kwargs.get('os_disk_id', None) - self.data_disk_ids = kwargs.get('data_disk_ids', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment_py3.py deleted file mode 100644 index 7668ed7983c1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmPropertiesFragment(Model): - """Properties of a virtual machine returned by the Microsoft.Compute API. - - :param statuses: Gets the statuses of the virtual machine. - :type statuses: - list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatusFragment] - :param os_type: Gets the OS type of the virtual machine. - :type os_type: str - :param vm_size: Gets the size of the virtual machine. - :type vm_size: str - :param network_interface_id: Gets the network interface ID of the virtual - machine. - :type network_interface_id: str - :param os_disk_id: Gets OS disk blob uri for the virtual machine. - :type os_disk_id: str - :param data_disk_ids: Gets data disks blob uri for the virtual machine. - :type data_disk_ids: list[str] - :param data_disks: Gets all data disks attached to the virtual machine. - :type data_disks: - list[~azure.mgmt.devtestlabs.models.ComputeDataDiskFragment] - """ - - _attribute_map = { - 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatusFragment]'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, - 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, - 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDiskFragment]'}, - } - - def __init__(self, *, statuses=None, os_type: str=None, vm_size: str=None, network_interface_id: str=None, os_disk_id: str=None, data_disk_ids=None, data_disks=None, **kwargs) -> None: - super(ComputeVmPropertiesFragment, self).__init__(**kwargs) - self.statuses = statuses - self.os_type = os_type - self.vm_size = vm_size - self.network_interface_id = network_interface_id - self.os_disk_id = os_disk_id - self.data_disk_ids = data_disk_ids - self.data_disks = data_disks diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_py3.py deleted file mode 100644 index 90c4ae4e246a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmProperties(Model): - """Properties of a virtual machine returned by the Microsoft.Compute API. - - :param statuses: Gets the statuses of the virtual machine. - :type statuses: - list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatus] - :param os_type: Gets the OS type of the virtual machine. - :type os_type: str - :param vm_size: Gets the size of the virtual machine. - :type vm_size: str - :param network_interface_id: Gets the network interface ID of the virtual - machine. - :type network_interface_id: str - :param os_disk_id: Gets OS disk blob uri for the virtual machine. - :type os_disk_id: str - :param data_disk_ids: Gets data disks blob uri for the virtual machine. - :type data_disk_ids: list[str] - :param data_disks: Gets all data disks attached to the virtual machine. - :type data_disks: list[~azure.mgmt.devtestlabs.models.ComputeDataDisk] - """ - - _attribute_map = { - 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatus]'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, - 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, - 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDisk]'}, - } - - def __init__(self, *, statuses=None, os_type: str=None, vm_size: str=None, network_interface_id: str=None, os_disk_id: str=None, data_disk_ids=None, data_disks=None, **kwargs) -> None: - super(ComputeVmProperties, self).__init__(**kwargs) - self.statuses = statuses - self.os_type = os_type - self.vm_size = vm_size - self.network_interface_id = network_interface_id - self.os_disk_id = os_disk_id - self.data_disk_ids = data_disk_ids - self.data_disks = data_disks diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties.py deleted file mode 100644 index 73269a4dd25d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CostThresholdProperties(Model): - """Properties of a cost threshold item. - - :param threshold_id: The ID of the cost threshold item. - :type threshold_id: str - :param percentage_threshold: The value of the percentage cost threshold. - :type percentage_threshold: - ~azure.mgmt.devtestlabs.models.PercentageCostThresholdProperties - :param display_on_chart: Indicates whether this threshold will be - displayed on cost charts. Possible values include: 'Enabled', 'Disabled' - :type display_on_chart: str or - ~azure.mgmt.devtestlabs.models.CostThresholdStatus - :param send_notification_when_exceeded: Indicates whether notifications - will be sent when this threshold is exceeded. Possible values include: - 'Enabled', 'Disabled' - :type send_notification_when_exceeded: str or - ~azure.mgmt.devtestlabs.models.CostThresholdStatus - :param notification_sent: Indicates the datetime when notifications were - last sent for this threshold. - :type notification_sent: str - """ - - _attribute_map = { - 'threshold_id': {'key': 'thresholdId', 'type': 'str'}, - 'percentage_threshold': {'key': 'percentageThreshold', 'type': 'PercentageCostThresholdProperties'}, - 'display_on_chart': {'key': 'displayOnChart', 'type': 'str'}, - 'send_notification_when_exceeded': {'key': 'sendNotificationWhenExceeded', 'type': 'str'}, - 'notification_sent': {'key': 'notificationSent', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CostThresholdProperties, self).__init__(**kwargs) - self.threshold_id = kwargs.get('threshold_id', None) - self.percentage_threshold = kwargs.get('percentage_threshold', None) - self.display_on_chart = kwargs.get('display_on_chart', None) - self.send_notification_when_exceeded = kwargs.get('send_notification_when_exceeded', None) - self.notification_sent = kwargs.get('notification_sent', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties_py3.py deleted file mode 100644 index fba335d6c3e5..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CostThresholdProperties(Model): - """Properties of a cost threshold item. - - :param threshold_id: The ID of the cost threshold item. - :type threshold_id: str - :param percentage_threshold: The value of the percentage cost threshold. - :type percentage_threshold: - ~azure.mgmt.devtestlabs.models.PercentageCostThresholdProperties - :param display_on_chart: Indicates whether this threshold will be - displayed on cost charts. Possible values include: 'Enabled', 'Disabled' - :type display_on_chart: str or - ~azure.mgmt.devtestlabs.models.CostThresholdStatus - :param send_notification_when_exceeded: Indicates whether notifications - will be sent when this threshold is exceeded. Possible values include: - 'Enabled', 'Disabled' - :type send_notification_when_exceeded: str or - ~azure.mgmt.devtestlabs.models.CostThresholdStatus - :param notification_sent: Indicates the datetime when notifications were - last sent for this threshold. - :type notification_sent: str - """ - - _attribute_map = { - 'threshold_id': {'key': 'thresholdId', 'type': 'str'}, - 'percentage_threshold': {'key': 'percentageThreshold', 'type': 'PercentageCostThresholdProperties'}, - 'display_on_chart': {'key': 'displayOnChart', 'type': 'str'}, - 'send_notification_when_exceeded': {'key': 'sendNotificationWhenExceeded', 'type': 'str'}, - 'notification_sent': {'key': 'notificationSent', 'type': 'str'}, - } - - def __init__(self, *, threshold_id: str=None, percentage_threshold=None, display_on_chart=None, send_notification_when_exceeded=None, notification_sent: str=None, **kwargs) -> None: - super(CostThresholdProperties, self).__init__(**kwargs) - self.threshold_id = threshold_id - self.percentage_threshold = percentage_threshold - self.display_on_chart = display_on_chart - self.send_notification_when_exceeded = send_notification_when_exceeded - self.notification_sent = notification_sent diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image.py deleted file mode 100644 index 136ee0481ee1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class CustomImage(Resource): - """A custom image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param vm: The virtual machine from which the image is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVm - :param vhd: The VHD from which the image is to be created. - :type vhd: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustom - :param description: The description of the custom image. - :type description: str - :param author: The author of the custom image. - :type author: str - :ivar creation_date: The creation date of the custom image. - :vartype creation_date: datetime - :param managed_image_id: The Managed Image Id backing the custom image. - :type managed_image_id: str - :param managed_snapshot_id: The Managed Snapshot Id backing the custom - image. - :type managed_snapshot_id: str - :param data_disk_storage_info: Storage information about the data disks - present in the custom image - :type data_disk_storage_info: - list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfo] - :param custom_image_plan: Storage information about the plan related to - this custom image - :type custom_image_plan: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlan - :param is_plan_authorized: Whether or not the custom images underlying - offer/plan has been enabled for programmatic deployment - :type is_plan_authorized: bool - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVm'}, - 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustom'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, - 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, - 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfo]'}, - 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlan'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CustomImage, self).__init__(**kwargs) - self.vm = kwargs.get('vm', None) - self.vhd = kwargs.get('vhd', None) - self.description = kwargs.get('description', None) - self.author = kwargs.get('author', None) - self.creation_date = None - self.managed_image_id = kwargs.get('managed_image_id', None) - self.managed_snapshot_id = kwargs.get('managed_snapshot_id', None) - self.data_disk_storage_info = kwargs.get('data_disk_storage_info', None) - self.custom_image_plan = kwargs.get('custom_image_plan', None) - self.is_plan_authorized = kwargs.get('is_plan_authorized', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment.py deleted file mode 100644 index 5ac36c53a6cd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class CustomImageFragment(UpdateResource): - """A custom image. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param vm: The virtual machine from which the image is to be created. - :type vm: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVmFragment - :param vhd: The VHD from which the image is to be created. - :type vhd: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustomFragment - :param description: The description of the custom image. - :type description: str - :param author: The author of the custom image. - :type author: str - :param managed_image_id: The Managed Image Id backing the custom image. - :type managed_image_id: str - :param managed_snapshot_id: The Managed Snapshot Id backing the custom - image. - :type managed_snapshot_id: str - :param data_disk_storage_info: Storage information about the data disks - present in the custom image - :type data_disk_storage_info: - list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfoFragment] - :param custom_image_plan: Storage information about the plan related to - this custom image - :type custom_image_plan: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlanFragment - :param is_plan_authorized: Whether or not the custom images underlying - offer/plan has been enabled for programmatic deployment - :type is_plan_authorized: bool - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVmFragment'}, - 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustomFragment'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, - 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, - 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfoFragment]'}, - 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlanFragment'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(CustomImageFragment, self).__init__(**kwargs) - self.vm = kwargs.get('vm', None) - self.vhd = kwargs.get('vhd', None) - self.description = kwargs.get('description', None) - self.author = kwargs.get('author', None) - self.managed_image_id = kwargs.get('managed_image_id', None) - self.managed_snapshot_id = kwargs.get('managed_snapshot_id', None) - self.data_disk_storage_info = kwargs.get('data_disk_storage_info', None) - self.custom_image_plan = kwargs.get('custom_image_plan', None) - self.is_plan_authorized = kwargs.get('is_plan_authorized', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment_py3.py deleted file mode 100644 index a3ccac2274eb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class CustomImageFragment(UpdateResource): - """A custom image. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param vm: The virtual machine from which the image is to be created. - :type vm: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVmFragment - :param vhd: The VHD from which the image is to be created. - :type vhd: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustomFragment - :param description: The description of the custom image. - :type description: str - :param author: The author of the custom image. - :type author: str - :param managed_image_id: The Managed Image Id backing the custom image. - :type managed_image_id: str - :param managed_snapshot_id: The Managed Snapshot Id backing the custom - image. - :type managed_snapshot_id: str - :param data_disk_storage_info: Storage information about the data disks - present in the custom image - :type data_disk_storage_info: - list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfoFragment] - :param custom_image_plan: Storage information about the plan related to - this custom image - :type custom_image_plan: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlanFragment - :param is_plan_authorized: Whether or not the custom images underlying - offer/plan has been enabled for programmatic deployment - :type is_plan_authorized: bool - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVmFragment'}, - 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustomFragment'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, - 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, - 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfoFragment]'}, - 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlanFragment'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - } - - def __init__(self, *, tags=None, vm=None, vhd=None, description: str=None, author: str=None, managed_image_id: str=None, managed_snapshot_id: str=None, data_disk_storage_info=None, custom_image_plan=None, is_plan_authorized: bool=None, **kwargs) -> None: - super(CustomImageFragment, self).__init__(tags=tags, **kwargs) - self.vm = vm - self.vhd = vhd - self.description = description - self.author = author - self.managed_image_id = managed_image_id - self.managed_snapshot_id = managed_snapshot_id - self.data_disk_storage_info = data_disk_storage_info - self.custom_image_plan = custom_image_plan - self.is_plan_authorized = is_plan_authorized diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_paged.py deleted file mode 100644 index d0e4b61d4560..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class CustomImagePaged(Paged): - """ - A paging container for iterating over a list of :class:`CustomImage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CustomImage]'} - } - - def __init__(self, *args, **kwargs): - - super(CustomImagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom.py deleted file mode 100644 index a1bd5ab66712..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesCustom(Model): - """Properties for creating a custom image from a VHD. - - All required parameters must be populated in order to send to Azure. - - :param image_name: The image name. - :type image_name: str - :param sys_prep: Indicates whether sysprep has been run on the VHD. - :type sys_prep: bool - :param os_type: Required. The OS type of the custom image (i.e. Windows, - Linux). Possible values include: 'Windows', 'Linux', 'None' - :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType - """ - - _validation = { - 'os_type': {'required': True}, - } - - _attribute_map = { - 'image_name': {'key': 'imageName', 'type': 'str'}, - 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesCustom, self).__init__(**kwargs) - self.image_name = kwargs.get('image_name', None) - self.sys_prep = kwargs.get('sys_prep', None) - self.os_type = kwargs.get('os_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment.py deleted file mode 100644 index 4fc581738e57..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesCustomFragment(Model): - """Properties for creating a custom image from a VHD. - - :param image_name: The image name. - :type image_name: str - :param sys_prep: Indicates whether sysprep has been run on the VHD. - :type sys_prep: bool - :param os_type: The OS type of the custom image (i.e. Windows, Linux). - Possible values include: 'Windows', 'Linux', 'None' - :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType - """ - - _attribute_map = { - 'image_name': {'key': 'imageName', 'type': 'str'}, - 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesCustomFragment, self).__init__(**kwargs) - self.image_name = kwargs.get('image_name', None) - self.sys_prep = kwargs.get('sys_prep', None) - self.os_type = kwargs.get('os_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment_py3.py deleted file mode 100644 index 3869682ca53d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesCustomFragment(Model): - """Properties for creating a custom image from a VHD. - - :param image_name: The image name. - :type image_name: str - :param sys_prep: Indicates whether sysprep has been run on the VHD. - :type sys_prep: bool - :param os_type: The OS type of the custom image (i.e. Windows, Linux). - Possible values include: 'Windows', 'Linux', 'None' - :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType - """ - - _attribute_map = { - 'image_name': {'key': 'imageName', 'type': 'str'}, - 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, *, image_name: str=None, sys_prep: bool=None, os_type=None, **kwargs) -> None: - super(CustomImagePropertiesCustomFragment, self).__init__(**kwargs) - self.image_name = image_name - self.sys_prep = sys_prep - self.os_type = os_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_py3.py deleted file mode 100644 index 5aede6b5507c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesCustom(Model): - """Properties for creating a custom image from a VHD. - - All required parameters must be populated in order to send to Azure. - - :param image_name: The image name. - :type image_name: str - :param sys_prep: Indicates whether sysprep has been run on the VHD. - :type sys_prep: bool - :param os_type: Required. The OS type of the custom image (i.e. Windows, - Linux). Possible values include: 'Windows', 'Linux', 'None' - :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType - """ - - _validation = { - 'os_type': {'required': True}, - } - - _attribute_map = { - 'image_name': {'key': 'imageName', 'type': 'str'}, - 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, *, os_type, image_name: str=None, sys_prep: bool=None, **kwargs) -> None: - super(CustomImagePropertiesCustom, self).__init__(**kwargs) - self.image_name = image_name - self.sys_prep = sys_prep - self.os_type = os_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan.py deleted file mode 100644 index 37067a750936..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromPlan(Model): - """Properties for plan on a custom image. - - :param id: The id of the plan, equivalent to name of the plan - :type id: str - :param publisher: The publisher for the plan from the marketplace image - the custom image is derived from - :type publisher: str - :param offer: The offer for the plan from the marketplace image the custom - image is derived from - :type offer: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesFromPlan, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.publisher = kwargs.get('publisher', None) - self.offer = kwargs.get('offer', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment.py deleted file mode 100644 index b8db62a3738f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromPlanFragment(Model): - """Properties for plan on a custom image. - - :param id: The id of the plan, equivalent to name of the plan - :type id: str - :param publisher: The publisher for the plan from the marketplace image - the custom image is derived from - :type publisher: str - :param offer: The offer for the plan from the marketplace image the custom - image is derived from - :type offer: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesFromPlanFragment, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.publisher = kwargs.get('publisher', None) - self.offer = kwargs.get('offer', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment_py3.py deleted file mode 100644 index 159740e13c32..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromPlanFragment(Model): - """Properties for plan on a custom image. - - :param id: The id of the plan, equivalent to name of the plan - :type id: str - :param publisher: The publisher for the plan from the marketplace image - the custom image is derived from - :type publisher: str - :param offer: The offer for the plan from the marketplace image the custom - image is derived from - :type offer: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, **kwargs) -> None: - super(CustomImagePropertiesFromPlanFragment, self).__init__(**kwargs) - self.id = id - self.publisher = publisher - self.offer = offer diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_py3.py deleted file mode 100644 index fcbfeea22012..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromPlan(Model): - """Properties for plan on a custom image. - - :param id: The id of the plan, equivalent to name of the plan - :type id: str - :param publisher: The publisher for the plan from the marketplace image - the custom image is derived from - :type publisher: str - :param offer: The offer for the plan from the marketplace image the custom - image is derived from - :type offer: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, **kwargs) -> None: - super(CustomImagePropertiesFromPlan, self).__init__(**kwargs) - self.id = id - self.publisher = publisher - self.offer = offer diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm.py deleted file mode 100644 index d08828df0def..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromVm(Model): - """Properties for creating a custom image from a virtual machine. - - :param source_vm_id: The source vm identifier. - :type source_vm_id: str - :param windows_os_info: The Windows OS information of the VM. - :type windows_os_info: ~azure.mgmt.devtestlabs.models.WindowsOsInfo - :param linux_os_info: The Linux OS information of the VM. - :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfo - """ - - _attribute_map = { - 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, - 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfo'}, - 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfo'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesFromVm, self).__init__(**kwargs) - self.source_vm_id = kwargs.get('source_vm_id', None) - self.windows_os_info = kwargs.get('windows_os_info', None) - self.linux_os_info = kwargs.get('linux_os_info', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment.py deleted file mode 100644 index c0274dab51e7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromVmFragment(Model): - """Properties for creating a custom image from a virtual machine. - - :param source_vm_id: The source vm identifier. - :type source_vm_id: str - :param windows_os_info: The Windows OS information of the VM. - :type windows_os_info: - ~azure.mgmt.devtestlabs.models.WindowsOsInfoFragment - :param linux_os_info: The Linux OS information of the VM. - :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfoFragment - """ - - _attribute_map = { - 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, - 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfoFragment'}, - 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfoFragment'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesFromVmFragment, self).__init__(**kwargs) - self.source_vm_id = kwargs.get('source_vm_id', None) - self.windows_os_info = kwargs.get('windows_os_info', None) - self.linux_os_info = kwargs.get('linux_os_info', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment_py3.py deleted file mode 100644 index 437a4005cf1e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromVmFragment(Model): - """Properties for creating a custom image from a virtual machine. - - :param source_vm_id: The source vm identifier. - :type source_vm_id: str - :param windows_os_info: The Windows OS information of the VM. - :type windows_os_info: - ~azure.mgmt.devtestlabs.models.WindowsOsInfoFragment - :param linux_os_info: The Linux OS information of the VM. - :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfoFragment - """ - - _attribute_map = { - 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, - 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfoFragment'}, - 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfoFragment'}, - } - - def __init__(self, *, source_vm_id: str=None, windows_os_info=None, linux_os_info=None, **kwargs) -> None: - super(CustomImagePropertiesFromVmFragment, self).__init__(**kwargs) - self.source_vm_id = source_vm_id - self.windows_os_info = windows_os_info - self.linux_os_info = linux_os_info diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_py3.py deleted file mode 100644 index 02a54467b6a7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromVm(Model): - """Properties for creating a custom image from a virtual machine. - - :param source_vm_id: The source vm identifier. - :type source_vm_id: str - :param windows_os_info: The Windows OS information of the VM. - :type windows_os_info: ~azure.mgmt.devtestlabs.models.WindowsOsInfo - :param linux_os_info: The Linux OS information of the VM. - :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfo - """ - - _attribute_map = { - 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, - 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfo'}, - 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfo'}, - } - - def __init__(self, *, source_vm_id: str=None, windows_os_info=None, linux_os_info=None, **kwargs) -> None: - super(CustomImagePropertiesFromVm, self).__init__(**kwargs) - self.source_vm_id = source_vm_id - self.windows_os_info = windows_os_info - self.linux_os_info = linux_os_info diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_py3.py deleted file mode 100644 index fd4736a3744b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_py3.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class CustomImage(Resource): - """A custom image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param vm: The virtual machine from which the image is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVm - :param vhd: The VHD from which the image is to be created. - :type vhd: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustom - :param description: The description of the custom image. - :type description: str - :param author: The author of the custom image. - :type author: str - :ivar creation_date: The creation date of the custom image. - :vartype creation_date: datetime - :param managed_image_id: The Managed Image Id backing the custom image. - :type managed_image_id: str - :param managed_snapshot_id: The Managed Snapshot Id backing the custom - image. - :type managed_snapshot_id: str - :param data_disk_storage_info: Storage information about the data disks - present in the custom image - :type data_disk_storage_info: - list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfo] - :param custom_image_plan: Storage information about the plan related to - this custom image - :type custom_image_plan: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlan - :param is_plan_authorized: Whether or not the custom images underlying - offer/plan has been enabled for programmatic deployment - :type is_plan_authorized: bool - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVm'}, - 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustom'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, - 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, - 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfo]'}, - 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlan'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, vm=None, vhd=None, description: str=None, author: str=None, managed_image_id: str=None, managed_snapshot_id: str=None, data_disk_storage_info=None, custom_image_plan=None, is_plan_authorized: bool=None, **kwargs) -> None: - super(CustomImage, self).__init__(location=location, tags=tags, **kwargs) - self.vm = vm - self.vhd = vhd - self.description = description - self.author = author - self.creation_date = None - self.managed_image_id = managed_image_id - self.managed_snapshot_id = managed_snapshot_id - self.data_disk_storage_info = data_disk_storage_info - self.custom_image_plan = custom_image_plan - self.is_plan_authorized = is_plan_authorized - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties.py deleted file mode 100644 index 7bbfad08d256..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskProperties(Model): - """Request body for adding a new or existing data disk to a virtual machine. - - :param attach_new_data_disk_options: Specifies options to attach a new - disk to the virtual machine. - :type attach_new_data_disk_options: - ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptions - :param existing_lab_disk_id: Specifies the existing lab disk id to attach - to virtual machine. - :type existing_lab_disk_id: str - :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, - ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type host_caching: str or - ~azure.mgmt.devtestlabs.models.HostCachingOptions - """ - - _attribute_map = { - 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptions'}, - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - 'host_caching': {'key': 'hostCaching', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataDiskProperties, self).__init__(**kwargs) - self.attach_new_data_disk_options = kwargs.get('attach_new_data_disk_options', None) - self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) - self.host_caching = kwargs.get('host_caching', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment.py deleted file mode 100644 index 71e152680e3f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskPropertiesFragment(Model): - """Request body for adding a new or existing data disk to a virtual machine. - - :param attach_new_data_disk_options: Specifies options to attach a new - disk to the virtual machine. - :type attach_new_data_disk_options: - ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptionsFragment - :param existing_lab_disk_id: Specifies the existing lab disk id to attach - to virtual machine. - :type existing_lab_disk_id: str - :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, - ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type host_caching: str or - ~azure.mgmt.devtestlabs.models.HostCachingOptions - """ - - _attribute_map = { - 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptionsFragment'}, - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - 'host_caching': {'key': 'hostCaching', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataDiskPropertiesFragment, self).__init__(**kwargs) - self.attach_new_data_disk_options = kwargs.get('attach_new_data_disk_options', None) - self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) - self.host_caching = kwargs.get('host_caching', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment_py3.py deleted file mode 100644 index d709d92d7113..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskPropertiesFragment(Model): - """Request body for adding a new or existing data disk to a virtual machine. - - :param attach_new_data_disk_options: Specifies options to attach a new - disk to the virtual machine. - :type attach_new_data_disk_options: - ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptionsFragment - :param existing_lab_disk_id: Specifies the existing lab disk id to attach - to virtual machine. - :type existing_lab_disk_id: str - :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, - ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type host_caching: str or - ~azure.mgmt.devtestlabs.models.HostCachingOptions - """ - - _attribute_map = { - 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptionsFragment'}, - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - 'host_caching': {'key': 'hostCaching', 'type': 'str'}, - } - - def __init__(self, *, attach_new_data_disk_options=None, existing_lab_disk_id: str=None, host_caching=None, **kwargs) -> None: - super(DataDiskPropertiesFragment, self).__init__(**kwargs) - self.attach_new_data_disk_options = attach_new_data_disk_options - self.existing_lab_disk_id = existing_lab_disk_id - self.host_caching = host_caching diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_py3.py deleted file mode 100644 index 9e654d16cd45..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskProperties(Model): - """Request body for adding a new or existing data disk to a virtual machine. - - :param attach_new_data_disk_options: Specifies options to attach a new - disk to the virtual machine. - :type attach_new_data_disk_options: - ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptions - :param existing_lab_disk_id: Specifies the existing lab disk id to attach - to virtual machine. - :type existing_lab_disk_id: str - :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, - ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type host_caching: str or - ~azure.mgmt.devtestlabs.models.HostCachingOptions - """ - - _attribute_map = { - 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptions'}, - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - 'host_caching': {'key': 'hostCaching', 'type': 'str'}, - } - - def __init__(self, *, attach_new_data_disk_options=None, existing_lab_disk_id: str=None, host_caching=None, **kwargs) -> None: - super(DataDiskProperties, self).__init__(**kwargs) - self.attach_new_data_disk_options = attach_new_data_disk_options - self.existing_lab_disk_id = existing_lab_disk_id - self.host_caching = host_caching diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info.py deleted file mode 100644 index 68a97bf75845..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskStorageTypeInfo(Model): - """Storage information about the data disks present in the custom image. - - :param lun: Disk Lun - :type lun: str - :param storage_type: Disk Storage Type. Possible values include: - 'Standard', 'Premium' - :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'str'}, - 'storage_type': {'key': 'storageType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataDiskStorageTypeInfo, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) - self.storage_type = kwargs.get('storage_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment.py deleted file mode 100644 index 62b512b1f863..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskStorageTypeInfoFragment(Model): - """Storage information about the data disks present in the custom image. - - :param lun: Disk Lun - :type lun: str - :param storage_type: Disk Storage Type. Possible values include: - 'Standard', 'Premium' - :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'str'}, - 'storage_type': {'key': 'storageType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataDiskStorageTypeInfoFragment, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) - self.storage_type = kwargs.get('storage_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment_py3.py deleted file mode 100644 index 9a1c830a7dcb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskStorageTypeInfoFragment(Model): - """Storage information about the data disks present in the custom image. - - :param lun: Disk Lun - :type lun: str - :param storage_type: Disk Storage Type. Possible values include: - 'Standard', 'Premium' - :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'str'}, - 'storage_type': {'key': 'storageType', 'type': 'str'}, - } - - def __init__(self, *, lun: str=None, storage_type=None, **kwargs) -> None: - super(DataDiskStorageTypeInfoFragment, self).__init__(**kwargs) - self.lun = lun - self.storage_type = storage_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_py3.py deleted file mode 100644 index d817ca84fdd8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskStorageTypeInfo(Model): - """Storage information about the data disks present in the custom image. - - :param lun: Disk Lun - :type lun: str - :param storage_type: Disk Storage Type. Possible values include: - 'Standard', 'Premium' - :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'str'}, - 'storage_type': {'key': 'storageType', 'type': 'str'}, - } - - def __init__(self, *, lun: str=None, storage_type=None, **kwargs) -> None: - super(DataDiskStorageTypeInfo, self).__init__(**kwargs) - self.lun = lun - self.storage_type = storage_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details.py deleted file mode 100644 index 7391a793dc1b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DayDetails(Model): - """Properties of a daily schedule. - - :param time: The time of day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DayDetails, self).__init__(**kwargs) - self.time = kwargs.get('time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment.py deleted file mode 100644 index b4f977d74fdf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DayDetailsFragment(Model): - """Properties of a daily schedule. - - :param time: The time of day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DayDetailsFragment, self).__init__(**kwargs) - self.time = kwargs.get('time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment_py3.py deleted file mode 100644 index 38c15b48bc89..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DayDetailsFragment(Model): - """Properties of a daily schedule. - - :param time: The time of day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, *, time: str=None, **kwargs) -> None: - super(DayDetailsFragment, self).__init__(**kwargs) - self.time = time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_py3.py deleted file mode 100644 index 593e341169d8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DayDetails(Model): - """Properties of a daily schedule. - - :param time: The time of day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, *, time: str=None, **kwargs) -> None: - super(DayDetails, self).__init__(**kwargs) - self.time = time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties.py deleted file mode 100644 index 9e66b91c3832..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DetachDataDiskProperties(Model): - """Request body for detaching data disk from a virtual machine. - - :param existing_lab_disk_id: Specifies the disk resource ID to detach from - virtual machine. - :type existing_lab_disk_id: str - """ - - _attribute_map = { - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DetachDataDiskProperties, self).__init__(**kwargs) - self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties_py3.py deleted file mode 100644 index ece9ea7842fb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DetachDataDiskProperties(Model): - """Request body for detaching data disk from a virtual machine. - - :param existing_lab_disk_id: Specifies the disk resource ID to detach from - virtual machine. - :type existing_lab_disk_id: str - """ - - _attribute_map = { - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - } - - def __init__(self, *, existing_lab_disk_id: str=None, **kwargs) -> None: - super(DetachDataDiskProperties, self).__init__(**kwargs) - self.existing_lab_disk_id = existing_lab_disk_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties.py deleted file mode 100644 index 2b781ad4f7ec..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DetachDiskProperties(Model): - """Properties of the disk to detach. - - :param leased_by_lab_vm_id: The resource ID of the Lab VM to which the - disk is attached. - :type leased_by_lab_vm_id: str - """ - - _attribute_map = { - 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DetachDiskProperties, self).__init__(**kwargs) - self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties_py3.py deleted file mode 100644 index bc02a7d21dc2..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DetachDiskProperties(Model): - """Properties of the disk to detach. - - :param leased_by_lab_vm_id: The resource ID of the Lab VM to which the - disk is attached. - :type leased_by_lab_vm_id: str - """ - - _attribute_map = { - 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, - } - - def __init__(self, *, leased_by_lab_vm_id: str=None, **kwargs) -> None: - super(DetachDiskProperties, self).__init__(**kwargs) - self.leased_by_lab_vm_id = leased_by_lab_vm_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk.py deleted file mode 100644 index e61a526ec3f7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Disk(Resource): - """A Disk. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param disk_size_gi_b: The size of the disk in Gibibytes. - :type disk_size_gi_b: int - :param leased_by_lab_vm_id: The resource ID of the VM to which this disk - is leased. - :type leased_by_lab_vm_id: str - :param disk_blob_name: When backed by a blob, the name of the VHD blob - without extension. - :type disk_blob_name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :ivar created_date: The creation date of the disk. - :vartype created_date: datetime - :param host_caching: The host caching policy of the disk (i.e. None, - ReadOnly, ReadWrite). - :type host_caching: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, - 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, - 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, - 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, - 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Disk, self).__init__(**kwargs) - self.disk_type = kwargs.get('disk_type', None) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) - self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) - self.disk_blob_name = kwargs.get('disk_blob_name', None) - self.disk_uri = kwargs.get('disk_uri', None) - self.created_date = None - self.host_caching = kwargs.get('host_caching', None) - self.managed_disk_id = kwargs.get('managed_disk_id', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment.py deleted file mode 100644 index fd351baa9716..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class DiskFragment(UpdateResource): - """A Disk. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param disk_size_gi_b: The size of the disk in Gibibytes. - :type disk_size_gi_b: int - :param leased_by_lab_vm_id: The resource ID of the VM to which this disk - is leased. - :type leased_by_lab_vm_id: str - :param disk_blob_name: When backed by a blob, the name of the VHD blob - without extension. - :type disk_blob_name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param host_caching: The host caching policy of the disk (i.e. None, - ReadOnly, ReadWrite). - :type host_caching: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, - 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, - 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, - 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, - 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, - 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DiskFragment, self).__init__(**kwargs) - self.disk_type = kwargs.get('disk_type', None) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) - self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) - self.disk_blob_name = kwargs.get('disk_blob_name', None) - self.disk_uri = kwargs.get('disk_uri', None) - self.host_caching = kwargs.get('host_caching', None) - self.managed_disk_id = kwargs.get('managed_disk_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment_py3.py deleted file mode 100644 index 6becee37891a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class DiskFragment(UpdateResource): - """A Disk. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param disk_size_gi_b: The size of the disk in Gibibytes. - :type disk_size_gi_b: int - :param leased_by_lab_vm_id: The resource ID of the VM to which this disk - is leased. - :type leased_by_lab_vm_id: str - :param disk_blob_name: When backed by a blob, the name of the VHD blob - without extension. - :type disk_blob_name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param host_caching: The host caching policy of the disk (i.e. None, - ReadOnly, ReadWrite). - :type host_caching: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, - 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, - 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, - 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, - 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, - 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, - } - - def __init__(self, *, tags=None, disk_type=None, disk_size_gi_b: int=None, leased_by_lab_vm_id: str=None, disk_blob_name: str=None, disk_uri: str=None, host_caching: str=None, managed_disk_id: str=None, **kwargs) -> None: - super(DiskFragment, self).__init__(tags=tags, **kwargs) - self.disk_type = disk_type - self.disk_size_gi_b = disk_size_gi_b - self.leased_by_lab_vm_id = leased_by_lab_vm_id - self.disk_blob_name = disk_blob_name - self.disk_uri = disk_uri - self.host_caching = host_caching - self.managed_disk_id = managed_disk_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_paged.py deleted file mode 100644 index 18396d66590a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DiskPaged(Paged): - """ - A paging container for iterating over a list of :class:`Disk ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Disk]'} - } - - def __init__(self, *args, **kwargs): - - super(DiskPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_py3.py deleted file mode 100644 index 5263a0668bcf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Disk(Resource): - """A Disk. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param disk_size_gi_b: The size of the disk in Gibibytes. - :type disk_size_gi_b: int - :param leased_by_lab_vm_id: The resource ID of the VM to which this disk - is leased. - :type leased_by_lab_vm_id: str - :param disk_blob_name: When backed by a blob, the name of the VHD blob - without extension. - :type disk_blob_name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :ivar created_date: The creation date of the disk. - :vartype created_date: datetime - :param host_caching: The host caching policy of the disk (i.e. None, - ReadOnly, ReadWrite). - :type host_caching: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, - 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, - 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, - 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, - 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, disk_type=None, disk_size_gi_b: int=None, leased_by_lab_vm_id: str=None, disk_blob_name: str=None, disk_uri: str=None, host_caching: str=None, managed_disk_id: str=None, **kwargs) -> None: - super(Disk, self).__init__(location=location, tags=tags, **kwargs) - self.disk_type = disk_type - self.disk_size_gi_b = disk_size_gi_b - self.leased_by_lab_vm_id = leased_by_lab_vm_id - self.disk_blob_name = disk_blob_name - self.disk_uri = disk_uri - self.created_date = None - self.host_caching = host_caching - self.managed_disk_id = managed_disk_id - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment.py deleted file mode 100644 index 47f7a67992f7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DtlEnvironment(Resource): - """An environment, which is essentially an ARM template deployment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param deployment_properties: The deployment properties of the - environment. - :type deployment_properties: - ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentProperties - :param arm_template_display_name: The display name of the Azure Resource - Manager template that produced the environment. - :type arm_template_display_name: str - :ivar resource_group_id: The identifier of the resource group containing - the environment's resources. - :vartype resource_group_id: str - :ivar created_by_user: The creator of the environment. - :vartype created_by_user: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource_group_id': {'readonly': True}, - 'created_by_user': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentProperties'}, - 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, - 'resource_group_id': {'key': 'properties.resourceGroupId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DtlEnvironment, self).__init__(**kwargs) - self.deployment_properties = kwargs.get('deployment_properties', None) - self.arm_template_display_name = kwargs.get('arm_template_display_name', None) - self.resource_group_id = None - self.created_by_user = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment.py deleted file mode 100644 index 14103673db5f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class DtlEnvironmentFragment(UpdateResource): - """An environment, which is essentially an ARM template deployment. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param deployment_properties: The deployment properties of the - environment. - :type deployment_properties: - ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentPropertiesFragment - :param arm_template_display_name: The display name of the Azure Resource - Manager template that produced the environment. - :type arm_template_display_name: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentPropertiesFragment'}, - 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DtlEnvironmentFragment, self).__init__(**kwargs) - self.deployment_properties = kwargs.get('deployment_properties', None) - self.arm_template_display_name = kwargs.get('arm_template_display_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment_py3.py deleted file mode 100644 index 9cd4e5caa7bf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class DtlEnvironmentFragment(UpdateResource): - """An environment, which is essentially an ARM template deployment. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param deployment_properties: The deployment properties of the - environment. - :type deployment_properties: - ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentPropertiesFragment - :param arm_template_display_name: The display name of the Azure Resource - Manager template that produced the environment. - :type arm_template_display_name: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentPropertiesFragment'}, - 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, - } - - def __init__(self, *, tags=None, deployment_properties=None, arm_template_display_name: str=None, **kwargs) -> None: - super(DtlEnvironmentFragment, self).__init__(tags=tags, **kwargs) - self.deployment_properties = deployment_properties - self.arm_template_display_name = arm_template_display_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_paged.py deleted file mode 100644 index e7c297f07ffa..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DtlEnvironmentPaged(Paged): - """ - A paging container for iterating over a list of :class:`DtlEnvironment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DtlEnvironment]'} - } - - def __init__(self, *args, **kwargs): - - super(DtlEnvironmentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_py3.py deleted file mode 100644 index f2fbb899f8cf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class DtlEnvironment(Resource): - """An environment, which is essentially an ARM template deployment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param deployment_properties: The deployment properties of the - environment. - :type deployment_properties: - ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentProperties - :param arm_template_display_name: The display name of the Azure Resource - Manager template that produced the environment. - :type arm_template_display_name: str - :ivar resource_group_id: The identifier of the resource group containing - the environment's resources. - :vartype resource_group_id: str - :ivar created_by_user: The creator of the environment. - :vartype created_by_user: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource_group_id': {'readonly': True}, - 'created_by_user': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentProperties'}, - 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, - 'resource_group_id': {'key': 'properties.resourceGroupId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, deployment_properties=None, arm_template_display_name: str=None, **kwargs) -> None: - super(DtlEnvironment, self).__init__(location=location, tags=tags, **kwargs) - self.deployment_properties = deployment_properties - self.arm_template_display_name = arm_template_display_name - self.resource_group_id = None - self.created_by_user = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties.py deleted file mode 100644 index 31dc62dfc89e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnvironmentDeploymentProperties(Model): - """Properties of an environment deployment. - - :param arm_template_id: The Azure Resource Manager template's identifier. - :type arm_template_id: str - :param parameters: The parameters of the Azure Resource Manager template. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterProperties] - """ - - _attribute_map = { - 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterProperties]'}, - } - - def __init__(self, **kwargs): - super(EnvironmentDeploymentProperties, self).__init__(**kwargs) - self.arm_template_id = kwargs.get('arm_template_id', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment.py deleted file mode 100644 index e441cfd4a17d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnvironmentDeploymentPropertiesFragment(Model): - """Properties of an environment deployment. - - :param arm_template_id: The Azure Resource Manager template's identifier. - :type arm_template_id: str - :param parameters: The parameters of the Azure Resource Manager template. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterPropertiesFragment] - """ - - _attribute_map = { - 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterPropertiesFragment]'}, - } - - def __init__(self, **kwargs): - super(EnvironmentDeploymentPropertiesFragment, self).__init__(**kwargs) - self.arm_template_id = kwargs.get('arm_template_id', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment_py3.py deleted file mode 100644 index 1a30a6aef98e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnvironmentDeploymentPropertiesFragment(Model): - """Properties of an environment deployment. - - :param arm_template_id: The Azure Resource Manager template's identifier. - :type arm_template_id: str - :param parameters: The parameters of the Azure Resource Manager template. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterPropertiesFragment] - """ - - _attribute_map = { - 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterPropertiesFragment]'}, - } - - def __init__(self, *, arm_template_id: str=None, parameters=None, **kwargs) -> None: - super(EnvironmentDeploymentPropertiesFragment, self).__init__(**kwargs) - self.arm_template_id = arm_template_id - self.parameters = parameters diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_py3.py deleted file mode 100644 index 866bbe7d7ebf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnvironmentDeploymentProperties(Model): - """Properties of an environment deployment. - - :param arm_template_id: The Azure Resource Manager template's identifier. - :type arm_template_id: str - :param parameters: The parameters of the Azure Resource Manager template. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterProperties] - """ - - _attribute_map = { - 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterProperties]'}, - } - - def __init__(self, *, arm_template_id: str=None, parameters=None, **kwargs) -> None: - super(EnvironmentDeploymentProperties, self).__init__(**kwargs) - self.arm_template_id = arm_template_id - self.parameters = parameters diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties.py deleted file mode 100644 index ec21cf9c743e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EvaluatePoliciesProperties(Model): - """Properties for evaluating a policy set. - - :param fact_name: The fact name. - :type fact_name: str - :param fact_data: The fact data. - :type fact_data: str - :param value_offset: The value offset. - :type value_offset: str - :param user_object_id: The user for which policies will be evaluated - :type user_object_id: str - """ - - _attribute_map = { - 'fact_name': {'key': 'factName', 'type': 'str'}, - 'fact_data': {'key': 'factData', 'type': 'str'}, - 'value_offset': {'key': 'valueOffset', 'type': 'str'}, - 'user_object_id': {'key': 'userObjectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EvaluatePoliciesProperties, self).__init__(**kwargs) - self.fact_name = kwargs.get('fact_name', None) - self.fact_data = kwargs.get('fact_data', None) - self.value_offset = kwargs.get('value_offset', None) - self.user_object_id = kwargs.get('user_object_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties_py3.py deleted file mode 100644 index 5f45b40617a1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EvaluatePoliciesProperties(Model): - """Properties for evaluating a policy set. - - :param fact_name: The fact name. - :type fact_name: str - :param fact_data: The fact data. - :type fact_data: str - :param value_offset: The value offset. - :type value_offset: str - :param user_object_id: The user for which policies will be evaluated - :type user_object_id: str - """ - - _attribute_map = { - 'fact_name': {'key': 'factName', 'type': 'str'}, - 'fact_data': {'key': 'factData', 'type': 'str'}, - 'value_offset': {'key': 'valueOffset', 'type': 'str'}, - 'user_object_id': {'key': 'userObjectId', 'type': 'str'}, - } - - def __init__(self, *, fact_name: str=None, fact_data: str=None, value_offset: str=None, user_object_id: str=None, **kwargs) -> None: - super(EvaluatePoliciesProperties, self).__init__(**kwargs) - self.fact_name = fact_name - self.fact_data = fact_data - self.value_offset = value_offset - self.user_object_id = user_object_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request.py deleted file mode 100644 index 3476c2176cd0..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EvaluatePoliciesRequest(Model): - """Request body for evaluating a policy set. - - :param policies: Policies to evaluate. - :type policies: - list[~azure.mgmt.devtestlabs.models.EvaluatePoliciesProperties] - """ - - _attribute_map = { - 'policies': {'key': 'policies', 'type': '[EvaluatePoliciesProperties]'}, - } - - def __init__(self, **kwargs): - super(EvaluatePoliciesRequest, self).__init__(**kwargs) - self.policies = kwargs.get('policies', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request_py3.py deleted file mode 100644 index 657e3a980fbb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EvaluatePoliciesRequest(Model): - """Request body for evaluating a policy set. - - :param policies: Policies to evaluate. - :type policies: - list[~azure.mgmt.devtestlabs.models.EvaluatePoliciesProperties] - """ - - _attribute_map = { - 'policies': {'key': 'policies', 'type': '[EvaluatePoliciesProperties]'}, - } - - def __init__(self, *, policies=None, **kwargs) -> None: - super(EvaluatePoliciesRequest, self).__init__(**kwargs) - self.policies = policies diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response.py deleted file mode 100644 index be1baad1d5a8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EvaluatePoliciesResponse(Model): - """Response body for evaluating a policy set. - - :param results: Results of evaluating a policy set. - :type results: list[~azure.mgmt.devtestlabs.models.PolicySetResult] - """ - - _attribute_map = { - 'results': {'key': 'results', 'type': '[PolicySetResult]'}, - } - - def __init__(self, **kwargs): - super(EvaluatePoliciesResponse, self).__init__(**kwargs) - self.results = kwargs.get('results', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response_py3.py deleted file mode 100644 index 166eb2130754..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EvaluatePoliciesResponse(Model): - """Response body for evaluating a policy set. - - :param results: Results of evaluating a policy set. - :type results: list[~azure.mgmt.devtestlabs.models.PolicySetResult] - """ - - _attribute_map = { - 'results': {'key': 'results', 'type': '[PolicySetResult]'}, - } - - def __init__(self, *, results=None, **kwargs) -> None: - super(EvaluatePoliciesResponse, self).__init__(**kwargs) - self.results = results diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event.py deleted file mode 100644 index 98395545b13e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Event(Model): - """An event to be notified for. - - :param event_name: The event type for which this notification is enabled - (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Event, self).__init__(**kwargs) - self.event_name = kwargs.get('event_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment.py deleted file mode 100644 index f6d18b5ba3e9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventFragment(Model): - """An event to be notified for. - - :param event_name: The event type for which this notification is enabled - (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EventFragment, self).__init__(**kwargs) - self.event_name = kwargs.get('event_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment_py3.py deleted file mode 100644 index a785e4b7201a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventFragment(Model): - """An event to be notified for. - - :param event_name: The event type for which this notification is enabled - (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - } - - def __init__(self, *, event_name=None, **kwargs) -> None: - super(EventFragment, self).__init__(**kwargs) - self.event_name = event_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_py3.py deleted file mode 100644 index faa50f83daea..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Event(Model): - """An event to be notified for. - - :param event_name: The event type for which this notification is enabled - (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - } - - def __init__(self, *, event_name=None, **kwargs) -> None: - super(Event, self).__init__(**kwargs) - self.event_name = event_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters.py deleted file mode 100644 index 464db115a353..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportResourceUsageParameters(Model): - """The parameters of the export operation. - - :param blob_storage_absolute_sas_uri: The blob storage absolute sas uri - with write permission to the container which the usage data needs to be - uploaded to. - :type blob_storage_absolute_sas_uri: str - :param usage_start_date: The start time of the usage. If not provided, - usage will be reported since the beginning of data collection. - :type usage_start_date: datetime - """ - - _attribute_map = { - 'blob_storage_absolute_sas_uri': {'key': 'blobStorageAbsoluteSasUri', 'type': 'str'}, - 'usage_start_date': {'key': 'usageStartDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ExportResourceUsageParameters, self).__init__(**kwargs) - self.blob_storage_absolute_sas_uri = kwargs.get('blob_storage_absolute_sas_uri', None) - self.usage_start_date = kwargs.get('usage_start_date', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters_py3.py deleted file mode 100644 index f58597733273..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportResourceUsageParameters(Model): - """The parameters of the export operation. - - :param blob_storage_absolute_sas_uri: The blob storage absolute sas uri - with write permission to the container which the usage data needs to be - uploaded to. - :type blob_storage_absolute_sas_uri: str - :param usage_start_date: The start time of the usage. If not provided, - usage will be reported since the beginning of data collection. - :type usage_start_date: datetime - """ - - _attribute_map = { - 'blob_storage_absolute_sas_uri': {'key': 'blobStorageAbsoluteSasUri', 'type': 'str'}, - 'usage_start_date': {'key': 'usageStartDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, blob_storage_absolute_sas_uri: str=None, usage_start_date=None, **kwargs) -> None: - super(ExportResourceUsageParameters, self).__init__(**kwargs) - self.blob_storage_absolute_sas_uri = blob_storage_absolute_sas_uri - self.usage_start_date = usage_start_date diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet.py deleted file mode 100644 index 6f7f1ff89fca..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExternalSubnet(Model): - """Subnet information as returned by the Microsoft.Network API. - - :param id: Gets or sets the identifier. - :type id: str - :param name: Gets or sets the name. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExternalSubnet, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment.py deleted file mode 100644 index ab2d5769fdab..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExternalSubnetFragment(Model): - """Subnet information as returned by the Microsoft.Network API. - - :param id: Gets or sets the identifier. - :type id: str - :param name: Gets or sets the name. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExternalSubnetFragment, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment_py3.py deleted file mode 100644 index f5f57186e9e5..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExternalSubnetFragment(Model): - """Subnet information as returned by the Microsoft.Network API. - - :param id: Gets or sets the identifier. - :type id: str - :param name: Gets or sets the name. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: - super(ExternalSubnetFragment, self).__init__(**kwargs) - self.id = id - self.name = name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_py3.py deleted file mode 100644 index 8a780e424313..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExternalSubnet(Model): - """Subnet information as returned by the Microsoft.Network API. - - :param id: Gets or sets the identifier. - :type id: str - :param name: Gets or sets the name. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: - super(ExternalSubnet, self).__init__(**kwargs) - self.id = id - self.name = name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula.py deleted file mode 100644 index e4b18a64b9fa..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Formula(Resource): - """A formula for creating a VM, specifying an image base and other parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the formula. - :type description: str - :param author: The author of the formula. - :type author: str - :param os_type: The OS type of the formula. - :type os_type: str - :ivar creation_date: The creation date of the formula. - :vartype creation_date: datetime - :param formula_content: The content of the formula. - :type formula_content: - ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameter - :param vm: Information about a VM from which a formula is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVm - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameter'}, - 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVm'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Formula, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.author = kwargs.get('author', None) - self.os_type = kwargs.get('os_type', None) - self.creation_date = None - self.formula_content = kwargs.get('formula_content', None) - self.vm = kwargs.get('vm', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment.py deleted file mode 100644 index f072e37b3036..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class FormulaFragment(UpdateResource): - """A formula for creating a VM, specifying an image base and other parameters. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the formula. - :type description: str - :param author: The author of the formula. - :type author: str - :param os_type: The OS type of the formula. - :type os_type: str - :param formula_content: The content of the formula. - :type formula_content: - ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameterFragment - :param vm: Information about a VM from which a formula is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVmFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameterFragment'}, - 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVmFragment'}, - } - - def __init__(self, **kwargs): - super(FormulaFragment, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.author = kwargs.get('author', None) - self.os_type = kwargs.get('os_type', None) - self.formula_content = kwargs.get('formula_content', None) - self.vm = kwargs.get('vm', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment_py3.py deleted file mode 100644 index 0f212fb85237..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class FormulaFragment(UpdateResource): - """A formula for creating a VM, specifying an image base and other parameters. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the formula. - :type description: str - :param author: The author of the formula. - :type author: str - :param os_type: The OS type of the formula. - :type os_type: str - :param formula_content: The content of the formula. - :type formula_content: - ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameterFragment - :param vm: Information about a VM from which a formula is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVmFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameterFragment'}, - 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVmFragment'}, - } - - def __init__(self, *, tags=None, description: str=None, author: str=None, os_type: str=None, formula_content=None, vm=None, **kwargs) -> None: - super(FormulaFragment, self).__init__(tags=tags, **kwargs) - self.description = description - self.author = author - self.os_type = os_type - self.formula_content = formula_content - self.vm = vm diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_paged.py deleted file mode 100644 index b8ae79e7de9d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class FormulaPaged(Paged): - """ - A paging container for iterating over a list of :class:`Formula ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Formula]'} - } - - def __init__(self, *args, **kwargs): - - super(FormulaPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm.py deleted file mode 100644 index 0811ea901b40..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FormulaPropertiesFromVm(Model): - """Information about a VM from which a formula is to be created. - - :param lab_vm_id: The identifier of the VM from which a formula is to be - created. - :type lab_vm_id: str - """ - - _attribute_map = { - 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FormulaPropertiesFromVm, self).__init__(**kwargs) - self.lab_vm_id = kwargs.get('lab_vm_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment.py deleted file mode 100644 index 240d0674d57e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FormulaPropertiesFromVmFragment(Model): - """Information about a VM from which a formula is to be created. - - :param lab_vm_id: The identifier of the VM from which a formula is to be - created. - :type lab_vm_id: str - """ - - _attribute_map = { - 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FormulaPropertiesFromVmFragment, self).__init__(**kwargs) - self.lab_vm_id = kwargs.get('lab_vm_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment_py3.py deleted file mode 100644 index 1fff926ae626..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FormulaPropertiesFromVmFragment(Model): - """Information about a VM from which a formula is to be created. - - :param lab_vm_id: The identifier of the VM from which a formula is to be - created. - :type lab_vm_id: str - """ - - _attribute_map = { - 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, - } - - def __init__(self, *, lab_vm_id: str=None, **kwargs) -> None: - super(FormulaPropertiesFromVmFragment, self).__init__(**kwargs) - self.lab_vm_id = lab_vm_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_py3.py deleted file mode 100644 index 2d7ac51274fe..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FormulaPropertiesFromVm(Model): - """Information about a VM from which a formula is to be created. - - :param lab_vm_id: The identifier of the VM from which a formula is to be - created. - :type lab_vm_id: str - """ - - _attribute_map = { - 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, - } - - def __init__(self, *, lab_vm_id: str=None, **kwargs) -> None: - super(FormulaPropertiesFromVm, self).__init__(**kwargs) - self.lab_vm_id = lab_vm_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_py3.py deleted file mode 100644 index 907919f44485..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_py3.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Formula(Resource): - """A formula for creating a VM, specifying an image base and other parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the formula. - :type description: str - :param author: The author of the formula. - :type author: str - :param os_type: The OS type of the formula. - :type os_type: str - :ivar creation_date: The creation date of the formula. - :vartype creation_date: datetime - :param formula_content: The content of the formula. - :type formula_content: - ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameter - :param vm: Information about a VM from which a formula is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVm - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameter'}, - 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVm'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, description: str=None, author: str=None, os_type: str=None, formula_content=None, vm=None, **kwargs) -> None: - super(Formula, self).__init__(location=location, tags=tags, **kwargs) - self.description = description - self.author = author - self.os_type = os_type - self.creation_date = None - self.formula_content = formula_content - self.vm = vm - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image.py deleted file mode 100644 index c16dcfd6e97f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class GalleryImage(Resource): - """A gallery image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param author: The author of the gallery image. - :type author: str - :ivar created_date: The creation date of the gallery image. - :vartype created_date: datetime - :param description: The description of the gallery image. - :type description: str - :param image_reference: The image reference of the gallery image. - :type image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param icon: The icon of the gallery image. - :type icon: str - :param enabled: Indicates whether this gallery image is enabled. - :type enabled: bool - :param plan_id: The third party plan that applies to this image - :type plan_id: str - :param is_plan_authorized: Indicates if the plan has been authorized for - programmatic deployment. - :type is_plan_authorized: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'image_reference': {'key': 'properties.imageReference', 'type': 'GalleryImageReference'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(GalleryImage, self).__init__(**kwargs) - self.author = kwargs.get('author', None) - self.created_date = None - self.description = kwargs.get('description', None) - self.image_reference = kwargs.get('image_reference', None) - self.icon = kwargs.get('icon', None) - self.enabled = kwargs.get('enabled', None) - self.plan_id = kwargs.get('plan_id', None) - self.is_plan_authorized = kwargs.get('is_plan_authorized', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_paged.py deleted file mode 100644 index 2712de454c83..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class GalleryImagePaged(Paged): - """ - A paging container for iterating over a list of :class:`GalleryImage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GalleryImage]'} - } - - def __init__(self, *args, **kwargs): - - super(GalleryImagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_py3.py deleted file mode 100644 index 2097997302c9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_py3.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class GalleryImage(Resource): - """A gallery image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param author: The author of the gallery image. - :type author: str - :ivar created_date: The creation date of the gallery image. - :vartype created_date: datetime - :param description: The description of the gallery image. - :type description: str - :param image_reference: The image reference of the gallery image. - :type image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param icon: The icon of the gallery image. - :type icon: str - :param enabled: Indicates whether this gallery image is enabled. - :type enabled: bool - :param plan_id: The third party plan that applies to this image - :type plan_id: str - :param is_plan_authorized: Indicates if the plan has been authorized for - programmatic deployment. - :type is_plan_authorized: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'image_reference': {'key': 'properties.imageReference', 'type': 'GalleryImageReference'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - } - - def __init__(self, *, location: str=None, tags=None, author: str=None, description: str=None, image_reference=None, icon: str=None, enabled: bool=None, plan_id: str=None, is_plan_authorized: bool=None, **kwargs) -> None: - super(GalleryImage, self).__init__(location=location, tags=tags, **kwargs) - self.author = author - self.created_date = None - self.description = description - self.image_reference = image_reference - self.icon = icon - self.enabled = enabled - self.plan_id = plan_id - self.is_plan_authorized = is_plan_authorized diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference.py deleted file mode 100644 index c896911316fd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryImageReference(Model): - """The reference information for an Azure Marketplace image. - - :param offer: The offer of the gallery image. - :type offer: str - :param publisher: The publisher of the gallery image. - :type publisher: str - :param sku: The SKU of the gallery image. - :type sku: str - :param os_type: The OS type of the gallery image. - :type os_type: str - :param version: The version of the gallery image. - :type version: str - """ - - _attribute_map = { - 'offer': {'key': 'offer', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GalleryImageReference, self).__init__(**kwargs) - self.offer = kwargs.get('offer', None) - self.publisher = kwargs.get('publisher', None) - self.sku = kwargs.get('sku', None) - self.os_type = kwargs.get('os_type', None) - self.version = kwargs.get('version', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment.py deleted file mode 100644 index 6bd266dbfbd8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryImageReferenceFragment(Model): - """The reference information for an Azure Marketplace image. - - :param offer: The offer of the gallery image. - :type offer: str - :param publisher: The publisher of the gallery image. - :type publisher: str - :param sku: The SKU of the gallery image. - :type sku: str - :param os_type: The OS type of the gallery image. - :type os_type: str - :param version: The version of the gallery image. - :type version: str - """ - - _attribute_map = { - 'offer': {'key': 'offer', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GalleryImageReferenceFragment, self).__init__(**kwargs) - self.offer = kwargs.get('offer', None) - self.publisher = kwargs.get('publisher', None) - self.sku = kwargs.get('sku', None) - self.os_type = kwargs.get('os_type', None) - self.version = kwargs.get('version', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment_py3.py deleted file mode 100644 index 3ebbfa4662f7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryImageReferenceFragment(Model): - """The reference information for an Azure Marketplace image. - - :param offer: The offer of the gallery image. - :type offer: str - :param publisher: The publisher of the gallery image. - :type publisher: str - :param sku: The SKU of the gallery image. - :type sku: str - :param os_type: The OS type of the gallery image. - :type os_type: str - :param version: The version of the gallery image. - :type version: str - """ - - _attribute_map = { - 'offer': {'key': 'offer', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, offer: str=None, publisher: str=None, sku: str=None, os_type: str=None, version: str=None, **kwargs) -> None: - super(GalleryImageReferenceFragment, self).__init__(**kwargs) - self.offer = offer - self.publisher = publisher - self.sku = sku - self.os_type = os_type - self.version = version diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_py3.py deleted file mode 100644 index 2541dc5b63e9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryImageReference(Model): - """The reference information for an Azure Marketplace image. - - :param offer: The offer of the gallery image. - :type offer: str - :param publisher: The publisher of the gallery image. - :type publisher: str - :param sku: The SKU of the gallery image. - :type sku: str - :param os_type: The OS type of the gallery image. - :type os_type: str - :param version: The version of the gallery image. - :type version: str - """ - - _attribute_map = { - 'offer': {'key': 'offer', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, offer: str=None, publisher: str=None, sku: str=None, os_type: str=None, version: str=None, **kwargs) -> None: - super(GalleryImageReference, self).__init__(**kwargs) - self.offer = offer - self.publisher = publisher - self.sku = sku - self.os_type = os_type - self.version = version diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request.py deleted file mode 100644 index 3c5fb7b2fafd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GenerateArmTemplateRequest(Model): - """Parameters for generating an ARM template for deploying artifacts. - - :param virtual_machine_name: The resource name of the virtual machine. - :type virtual_machine_name: str - :param parameters: The parameters of the ARM template. - :type parameters: list[~azure.mgmt.devtestlabs.models.ParameterInfo] - :param location: The location of the virtual machine. - :type location: str - :param file_upload_options: Options for uploading the files for the - artifact. UploadFilesAndGenerateSasTokens is the default value. Possible - values include: 'UploadFilesAndGenerateSasTokens', 'None' - :type file_upload_options: str or - ~azure.mgmt.devtestlabs.models.FileUploadOptions - """ - - _attribute_map = { - 'virtual_machine_name': {'key': 'virtualMachineName', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ParameterInfo]'}, - 'location': {'key': 'location', 'type': 'str'}, - 'file_upload_options': {'key': 'fileUploadOptions', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GenerateArmTemplateRequest, self).__init__(**kwargs) - self.virtual_machine_name = kwargs.get('virtual_machine_name', None) - self.parameters = kwargs.get('parameters', None) - self.location = kwargs.get('location', None) - self.file_upload_options = kwargs.get('file_upload_options', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request_py3.py deleted file mode 100644 index 677085554d25..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GenerateArmTemplateRequest(Model): - """Parameters for generating an ARM template for deploying artifacts. - - :param virtual_machine_name: The resource name of the virtual machine. - :type virtual_machine_name: str - :param parameters: The parameters of the ARM template. - :type parameters: list[~azure.mgmt.devtestlabs.models.ParameterInfo] - :param location: The location of the virtual machine. - :type location: str - :param file_upload_options: Options for uploading the files for the - artifact. UploadFilesAndGenerateSasTokens is the default value. Possible - values include: 'UploadFilesAndGenerateSasTokens', 'None' - :type file_upload_options: str or - ~azure.mgmt.devtestlabs.models.FileUploadOptions - """ - - _attribute_map = { - 'virtual_machine_name': {'key': 'virtualMachineName', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ParameterInfo]'}, - 'location': {'key': 'location', 'type': 'str'}, - 'file_upload_options': {'key': 'fileUploadOptions', 'type': 'str'}, - } - - def __init__(self, *, virtual_machine_name: str=None, parameters=None, location: str=None, file_upload_options=None, **kwargs) -> None: - super(GenerateArmTemplateRequest, self).__init__(**kwargs) - self.virtual_machine_name = virtual_machine_name - self.parameters = parameters - self.location = location - self.file_upload_options = file_upload_options diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter.py deleted file mode 100644 index 801afae7e028..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GenerateUploadUriParameter(Model): - """Properties for generating an upload URI. - - :param blob_name: The blob name of the upload URI. - :type blob_name: str - """ - - _attribute_map = { - 'blob_name': {'key': 'blobName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GenerateUploadUriParameter, self).__init__(**kwargs) - self.blob_name = kwargs.get('blob_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter_py3.py deleted file mode 100644 index ebc5724f0614..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GenerateUploadUriParameter(Model): - """Properties for generating an upload URI. - - :param blob_name: The blob name of the upload URI. - :type blob_name: str - """ - - _attribute_map = { - 'blob_name': {'key': 'blobName', 'type': 'str'}, - } - - def __init__(self, *, blob_name: str=None, **kwargs) -> None: - super(GenerateUploadUriParameter, self).__init__(**kwargs) - self.blob_name = blob_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response.py deleted file mode 100644 index 6b89d3111051..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GenerateUploadUriResponse(Model): - """Response body for generating an upload URI. - - :param upload_uri: The upload URI for the VHD. - :type upload_uri: str - """ - - _attribute_map = { - 'upload_uri': {'key': 'uploadUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GenerateUploadUriResponse, self).__init__(**kwargs) - self.upload_uri = kwargs.get('upload_uri', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response_py3.py deleted file mode 100644 index 8807569409ac..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GenerateUploadUriResponse(Model): - """Response body for generating an upload URI. - - :param upload_uri: The upload URI for the VHD. - :type upload_uri: str - """ - - _attribute_map = { - 'upload_uri': {'key': 'uploadUri', 'type': 'str'}, - } - - def __init__(self, *, upload_uri: str=None, **kwargs) -> None: - super(GenerateUploadUriResponse, self).__init__(**kwargs) - self.upload_uri = upload_uri diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details.py deleted file mode 100644 index e310a1bbc923..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HourDetails(Model): - """Properties of an hourly schedule. - - :param minute: Minutes of the hour the schedule will run. - :type minute: int - """ - - _attribute_map = { - 'minute': {'key': 'minute', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(HourDetails, self).__init__(**kwargs) - self.minute = kwargs.get('minute', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment.py deleted file mode 100644 index 3a41af20481d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HourDetailsFragment(Model): - """Properties of an hourly schedule. - - :param minute: Minutes of the hour the schedule will run. - :type minute: int - """ - - _attribute_map = { - 'minute': {'key': 'minute', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(HourDetailsFragment, self).__init__(**kwargs) - self.minute = kwargs.get('minute', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment_py3.py deleted file mode 100644 index afa962a3c628..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HourDetailsFragment(Model): - """Properties of an hourly schedule. - - :param minute: Minutes of the hour the schedule will run. - :type minute: int - """ - - _attribute_map = { - 'minute': {'key': 'minute', 'type': 'int'}, - } - - def __init__(self, *, minute: int=None, **kwargs) -> None: - super(HourDetailsFragment, self).__init__(**kwargs) - self.minute = minute diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_py3.py deleted file mode 100644 index 52c323352b24..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HourDetails(Model): - """Properties of an hourly schedule. - - :param minute: Minutes of the hour the schedule will run. - :type minute: int - """ - - _attribute_map = { - 'minute': {'key': 'minute', 'type': 'int'}, - } - - def __init__(self, *, minute: int=None, **kwargs) -> None: - super(HourDetails, self).__init__(**kwargs) - self.minute = minute diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties.py deleted file mode 100644 index ed4b127fc39c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IdentityProperties(Model): - """Properties of a managed identity. - - :param type: Managed identity. - :type type: str - :param principal_id: The principal id of resource identity. - :type principal_id: str - :param tenant_id: The tenant identifier of resource. - :type tenant_id: str - :param client_secret_url: The client secret URL of the identity. - :type client_secret_url: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'client_secret_url': {'key': 'clientSecretUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IdentityProperties, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.principal_id = kwargs.get('principal_id', None) - self.tenant_id = kwargs.get('tenant_id', None) - self.client_secret_url = kwargs.get('client_secret_url', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties_py3.py deleted file mode 100644 index 63fb90a1b974..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IdentityProperties(Model): - """Properties of a managed identity. - - :param type: Managed identity. - :type type: str - :param principal_id: The principal id of resource identity. - :type principal_id: str - :param tenant_id: The tenant identifier of resource. - :type tenant_id: str - :param client_secret_url: The client secret URL of the identity. - :type client_secret_url: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'client_secret_url': {'key': 'clientSecretUrl', 'type': 'str'}, - } - - def __init__(self, *, type: str=None, principal_id: str=None, tenant_id: str=None, client_secret_url: str=None, **kwargs) -> None: - super(IdentityProperties, self).__init__(**kwargs) - self.type = type - self.principal_id = principal_id - self.tenant_id = tenant_id - self.client_secret_url = client_secret_url diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request.py deleted file mode 100644 index 0c910e9b203e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImportLabVirtualMachineRequest(Model): - """This represents the payload required to import a virtual machine from a - different lab into the current one. - - :param source_virtual_machine_resource_id: The full resource ID of the - virtual machine to be imported. - :type source_virtual_machine_resource_id: str - :param destination_virtual_machine_name: The name of the virtual machine - in the destination lab - :type destination_virtual_machine_name: str - """ - - _attribute_map = { - 'source_virtual_machine_resource_id': {'key': 'sourceVirtualMachineResourceId', 'type': 'str'}, - 'destination_virtual_machine_name': {'key': 'destinationVirtualMachineName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImportLabVirtualMachineRequest, self).__init__(**kwargs) - self.source_virtual_machine_resource_id = kwargs.get('source_virtual_machine_resource_id', None) - self.destination_virtual_machine_name = kwargs.get('destination_virtual_machine_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request_py3.py deleted file mode 100644 index 6ca10ecff7a6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImportLabVirtualMachineRequest(Model): - """This represents the payload required to import a virtual machine from a - different lab into the current one. - - :param source_virtual_machine_resource_id: The full resource ID of the - virtual machine to be imported. - :type source_virtual_machine_resource_id: str - :param destination_virtual_machine_name: The name of the virtual machine - in the destination lab - :type destination_virtual_machine_name: str - """ - - _attribute_map = { - 'source_virtual_machine_resource_id': {'key': 'sourceVirtualMachineResourceId', 'type': 'str'}, - 'destination_virtual_machine_name': {'key': 'destinationVirtualMachineName', 'type': 'str'}, - } - - def __init__(self, *, source_virtual_machine_resource_id: str=None, destination_virtual_machine_name: str=None, **kwargs) -> None: - super(ImportLabVirtualMachineRequest, self).__init__(**kwargs) - self.source_virtual_machine_resource_id = source_virtual_machine_resource_id - self.destination_virtual_machine_name = destination_virtual_machine_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule.py deleted file mode 100644 index 56d745d71893..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InboundNatRule(Model): - """A rule for NAT - exposing a VM's port (backendPort) on the public IP - address using a load balancer. - - :param transport_protocol: The transport protocol for the endpoint. - Possible values include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param frontend_port: The external endpoint port of the inbound - connection. Possible values range between 1 and 65535, inclusive. If - unspecified, a value will be allocated automatically. - :type frontend_port: int - :param backend_port: The port to which the external traffic will be - redirected. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(InboundNatRule, self).__init__(**kwargs) - self.transport_protocol = kwargs.get('transport_protocol', None) - self.frontend_port = kwargs.get('frontend_port', None) - self.backend_port = kwargs.get('backend_port', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment.py deleted file mode 100644 index 034404f9923f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InboundNatRuleFragment(Model): - """A rule for NAT - exposing a VM's port (backendPort) on the public IP - address using a load balancer. - - :param transport_protocol: The transport protocol for the endpoint. - Possible values include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param frontend_port: The external endpoint port of the inbound - connection. Possible values range between 1 and 65535, inclusive. If - unspecified, a value will be allocated automatically. - :type frontend_port: int - :param backend_port: The port to which the external traffic will be - redirected. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(InboundNatRuleFragment, self).__init__(**kwargs) - self.transport_protocol = kwargs.get('transport_protocol', None) - self.frontend_port = kwargs.get('frontend_port', None) - self.backend_port = kwargs.get('backend_port', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment_py3.py deleted file mode 100644 index 397d4c523e32..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InboundNatRuleFragment(Model): - """A rule for NAT - exposing a VM's port (backendPort) on the public IP - address using a load balancer. - - :param transport_protocol: The transport protocol for the endpoint. - Possible values include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param frontend_port: The external endpoint port of the inbound - connection. Possible values range between 1 and 65535, inclusive. If - unspecified, a value will be allocated automatically. - :type frontend_port: int - :param backend_port: The port to which the external traffic will be - redirected. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, *, transport_protocol=None, frontend_port: int=None, backend_port: int=None, **kwargs) -> None: - super(InboundNatRuleFragment, self).__init__(**kwargs) - self.transport_protocol = transport_protocol - self.frontend_port = frontend_port - self.backend_port = backend_port diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_py3.py deleted file mode 100644 index 9ec4bd8a3d52..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InboundNatRule(Model): - """A rule for NAT - exposing a VM's port (backendPort) on the public IP - address using a load balancer. - - :param transport_protocol: The transport protocol for the endpoint. - Possible values include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param frontend_port: The external endpoint port of the inbound - connection. Possible values range between 1 and 65535, inclusive. If - unspecified, a value will be allocated automatically. - :type frontend_port: int - :param backend_port: The port to which the external traffic will be - redirected. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, *, transport_protocol=None, frontend_port: int=None, backend_port: int=None, **kwargs) -> None: - super(InboundNatRule, self).__init__(**kwargs) - self.transport_protocol = transport_protocol - self.frontend_port = frontend_port - self.backend_port = backend_port diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab.py deleted file mode 100644 index e495c96e01fa..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Lab(Resource): - """A lab. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar default_storage_account: The lab's default storage account. - :vartype default_storage_account: str - :ivar default_premium_storage_account: The lab's default premium storage - account. - :vartype default_premium_storage_account: str - :ivar artifacts_storage_account: The lab's artifact storage account. - :vartype artifacts_storage_account: str - :ivar premium_data_disk_storage_account: The lab's premium data disk - storage account. - :vartype premium_data_disk_storage_account: str - :ivar vault_name: The lab's Key vault. - :vartype vault_name: str - :param lab_storage_type: Type of storage used by the lab. It can be either - Premium or Standard. Default is Premium. Possible values include: - 'Standard', 'Premium' - :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param mandatory_artifacts_resource_ids_linux: The ordered list of - artifact resource IDs that should be applied on all Linux VM creations by - default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_linux: list[str] - :param mandatory_artifacts_resource_ids_windows: The ordered list of - artifact resource IDs that should be applied on all Windows VM creations - by default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_windows: list[str] - :ivar created_date: The creation date of the lab. - :vartype created_date: datetime - :param premium_data_disks: The setting to enable usage of premium data - disks. - When its value is 'Enabled', creation of standard or premium data disks is - allowed. - When its value is 'Disabled', only creation of standard data disks is - allowed. Possible values include: 'Disabled', 'Enabled' - :type premium_data_disks: str or - ~azure.mgmt.devtestlabs.models.PremiumDataDisk - :param environment_permission: The access rights to be granted to the user - when provisioning an environment. Possible values include: 'Reader', - 'Contributor' - :type environment_permission: str or - ~azure.mgmt.devtestlabs.models.EnvironmentPermission - :param announcement: The properties of any lab announcement associated - with this lab - :type announcement: - ~azure.mgmt.devtestlabs.models.LabAnnouncementProperties - :param support: The properties of any lab support message associated with - this lab - :type support: ~azure.mgmt.devtestlabs.models.LabSupportProperties - :ivar vm_creation_resource_group: The resource group in which lab virtual - machines will be created in. - :vartype vm_creation_resource_group: str - :ivar public_ip_id: The public IP address for the lab's load balancer. - :vartype public_ip_id: str - :ivar load_balancer_id: The load balancer used to for lab VMs that use - shared IP address. - :vartype load_balancer_id: str - :ivar network_security_group_id: The Network Security Group attached to - the lab VMs Network interfaces to restrict open ports. - :vartype network_security_group_id: str - :param extended_properties: Extended properties of the lab used for - experimental features - :type extended_properties: dict[str, str] - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'default_storage_account': {'readonly': True}, - 'default_premium_storage_account': {'readonly': True}, - 'artifacts_storage_account': {'readonly': True}, - 'premium_data_disk_storage_account': {'readonly': True}, - 'vault_name': {'readonly': True}, - 'created_date': {'readonly': True}, - 'vm_creation_resource_group': {'readonly': True}, - 'public_ip_id': {'readonly': True}, - 'load_balancer_id': {'readonly': True}, - 'network_security_group_id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'default_storage_account': {'key': 'properties.defaultStorageAccount', 'type': 'str'}, - 'default_premium_storage_account': {'key': 'properties.defaultPremiumStorageAccount', 'type': 'str'}, - 'artifacts_storage_account': {'key': 'properties.artifactsStorageAccount', 'type': 'str'}, - 'premium_data_disk_storage_account': {'key': 'properties.premiumDataDiskStorageAccount', 'type': 'str'}, - 'vault_name': {'key': 'properties.vaultName', 'type': 'str'}, - 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, - 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, - 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, - 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, - 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementProperties'}, - 'support': {'key': 'properties.support', 'type': 'LabSupportProperties'}, - 'vm_creation_resource_group': {'key': 'properties.vmCreationResourceGroup', 'type': 'str'}, - 'public_ip_id': {'key': 'properties.publicIpId', 'type': 'str'}, - 'load_balancer_id': {'key': 'properties.loadBalancerId', 'type': 'str'}, - 'network_security_group_id': {'key': 'properties.networkSecurityGroupId', 'type': 'str'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Lab, self).__init__(**kwargs) - self.default_storage_account = None - self.default_premium_storage_account = None - self.artifacts_storage_account = None - self.premium_data_disk_storage_account = None - self.vault_name = None - self.lab_storage_type = kwargs.get('lab_storage_type', None) - self.mandatory_artifacts_resource_ids_linux = kwargs.get('mandatory_artifacts_resource_ids_linux', None) - self.mandatory_artifacts_resource_ids_windows = kwargs.get('mandatory_artifacts_resource_ids_windows', None) - self.created_date = None - self.premium_data_disks = kwargs.get('premium_data_disks', None) - self.environment_permission = kwargs.get('environment_permission', None) - self.announcement = kwargs.get('announcement', None) - self.support = kwargs.get('support', None) - self.vm_creation_resource_group = None - self.public_ip_id = None - self.load_balancer_id = None - self.network_security_group_id = None - self.extended_properties = kwargs.get('extended_properties', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties.py deleted file mode 100644 index aee243079a09..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabAnnouncementProperties(Model): - """Properties of a lab's announcement banner. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param title: The plain text title for the lab announcement - :type title: str - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - :param enabled: Is the lab announcement active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param expiration_date: The time at which the announcement expires (null - for never) - :type expiration_date: datetime - :param expired: Has this announcement expired? - :type expired: bool - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'expired': {'key': 'expired', 'type': 'bool'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabAnnouncementProperties, self).__init__(**kwargs) - self.title = kwargs.get('title', None) - self.markdown = kwargs.get('markdown', None) - self.enabled = kwargs.get('enabled', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.expired = kwargs.get('expired', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment.py deleted file mode 100644 index 9d82a4819afa..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabAnnouncementPropertiesFragment(Model): - """Properties of a lab's announcement banner. - - :param title: The plain text title for the lab announcement - :type title: str - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - :param enabled: Is the lab announcement active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param expiration_date: The time at which the announcement expires (null - for never) - :type expiration_date: datetime - :param expired: Has this announcement expired? - :type expired: bool - """ - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'expired': {'key': 'expired', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(LabAnnouncementPropertiesFragment, self).__init__(**kwargs) - self.title = kwargs.get('title', None) - self.markdown = kwargs.get('markdown', None) - self.enabled = kwargs.get('enabled', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.expired = kwargs.get('expired', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment_py3.py deleted file mode 100644 index 33eea147dcf1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabAnnouncementPropertiesFragment(Model): - """Properties of a lab's announcement banner. - - :param title: The plain text title for the lab announcement - :type title: str - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - :param enabled: Is the lab announcement active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param expiration_date: The time at which the announcement expires (null - for never) - :type expiration_date: datetime - :param expired: Has this announcement expired? - :type expired: bool - """ - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'expired': {'key': 'expired', 'type': 'bool'}, - } - - def __init__(self, *, title: str=None, markdown: str=None, enabled=None, expiration_date=None, expired: bool=None, **kwargs) -> None: - super(LabAnnouncementPropertiesFragment, self).__init__(**kwargs) - self.title = title - self.markdown = markdown - self.enabled = enabled - self.expiration_date = expiration_date - self.expired = expired diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_py3.py deleted file mode 100644 index 3d818d58a02f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabAnnouncementProperties(Model): - """Properties of a lab's announcement banner. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param title: The plain text title for the lab announcement - :type title: str - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - :param enabled: Is the lab announcement active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param expiration_date: The time at which the announcement expires (null - for never) - :type expiration_date: datetime - :param expired: Has this announcement expired? - :type expired: bool - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'expired': {'key': 'expired', 'type': 'bool'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, title: str=None, markdown: str=None, enabled=None, expiration_date=None, expired: bool=None, **kwargs) -> None: - super(LabAnnouncementProperties, self).__init__(**kwargs) - self.title = title - self.markdown = markdown - self.enabled = enabled - self.expiration_date = expiration_date - self.expired = expired - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost.py deleted file mode 100644 index 6825b1e82b74..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class LabCost(Resource): - """A cost item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param target_cost: The target cost properties - :type target_cost: ~azure.mgmt.devtestlabs.models.TargetCostProperties - :ivar lab_cost_summary: The lab cost summary component of the cost data. - :vartype lab_cost_summary: - ~azure.mgmt.devtestlabs.models.LabCostSummaryProperties - :ivar lab_cost_details: The lab cost details component of the cost data. - :vartype lab_cost_details: - list[~azure.mgmt.devtestlabs.models.LabCostDetailsProperties] - :ivar resource_costs: The resource cost component of the cost data. - :vartype resource_costs: - list[~azure.mgmt.devtestlabs.models.LabResourceCostProperties] - :param currency_code: The currency code of the cost. - :type currency_code: str - :param start_date_time: The start time of the cost data. - :type start_date_time: datetime - :param end_date_time: The end time of the cost data. - :type end_date_time: datetime - :param created_date: The creation date of the cost. - :type created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'lab_cost_summary': {'readonly': True}, - 'lab_cost_details': {'readonly': True}, - 'resource_costs': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'target_cost': {'key': 'properties.targetCost', 'type': 'TargetCostProperties'}, - 'lab_cost_summary': {'key': 'properties.labCostSummary', 'type': 'LabCostSummaryProperties'}, - 'lab_cost_details': {'key': 'properties.labCostDetails', 'type': '[LabCostDetailsProperties]'}, - 'resource_costs': {'key': 'properties.resourceCosts', 'type': '[LabResourceCostProperties]'}, - 'currency_code': {'key': 'properties.currencyCode', 'type': 'str'}, - 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, - 'end_date_time': {'key': 'properties.endDateTime', 'type': 'iso-8601'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabCost, self).__init__(**kwargs) - self.target_cost = kwargs.get('target_cost', None) - self.lab_cost_summary = None - self.lab_cost_details = None - self.resource_costs = None - self.currency_code = kwargs.get('currency_code', None) - self.start_date_time = kwargs.get('start_date_time', None) - self.end_date_time = kwargs.get('end_date_time', None) - self.created_date = kwargs.get('created_date', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties.py deleted file mode 100644 index ac7c70074036..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabCostDetailsProperties(Model): - """The properties of a lab cost item. - - :param date_property: The date of the cost item. - :type date_property: datetime - :param cost: The cost component of the cost item. - :type cost: float - :param cost_type: The type of the cost. Possible values include: - 'Unavailable', 'Reported', 'Projected' - :type cost_type: str or ~azure.mgmt.devtestlabs.models.CostType - """ - - _attribute_map = { - 'date_property': {'key': 'date', 'type': 'iso-8601'}, - 'cost': {'key': 'cost', 'type': 'float'}, - 'cost_type': {'key': 'costType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabCostDetailsProperties, self).__init__(**kwargs) - self.date_property = kwargs.get('date_property', None) - self.cost = kwargs.get('cost', None) - self.cost_type = kwargs.get('cost_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties_py3.py deleted file mode 100644 index f6690c8c2184..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabCostDetailsProperties(Model): - """The properties of a lab cost item. - - :param date_property: The date of the cost item. - :type date_property: datetime - :param cost: The cost component of the cost item. - :type cost: float - :param cost_type: The type of the cost. Possible values include: - 'Unavailable', 'Reported', 'Projected' - :type cost_type: str or ~azure.mgmt.devtestlabs.models.CostType - """ - - _attribute_map = { - 'date_property': {'key': 'date', 'type': 'iso-8601'}, - 'cost': {'key': 'cost', 'type': 'float'}, - 'cost_type': {'key': 'costType', 'type': 'str'}, - } - - def __init__(self, *, date_property=None, cost: float=None, cost_type=None, **kwargs) -> None: - super(LabCostDetailsProperties, self).__init__(**kwargs) - self.date_property = date_property - self.cost = cost - self.cost_type = cost_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_py3.py deleted file mode 100644 index cef3ac68fdf8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class LabCost(Resource): - """A cost item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param target_cost: The target cost properties - :type target_cost: ~azure.mgmt.devtestlabs.models.TargetCostProperties - :ivar lab_cost_summary: The lab cost summary component of the cost data. - :vartype lab_cost_summary: - ~azure.mgmt.devtestlabs.models.LabCostSummaryProperties - :ivar lab_cost_details: The lab cost details component of the cost data. - :vartype lab_cost_details: - list[~azure.mgmt.devtestlabs.models.LabCostDetailsProperties] - :ivar resource_costs: The resource cost component of the cost data. - :vartype resource_costs: - list[~azure.mgmt.devtestlabs.models.LabResourceCostProperties] - :param currency_code: The currency code of the cost. - :type currency_code: str - :param start_date_time: The start time of the cost data. - :type start_date_time: datetime - :param end_date_time: The end time of the cost data. - :type end_date_time: datetime - :param created_date: The creation date of the cost. - :type created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'lab_cost_summary': {'readonly': True}, - 'lab_cost_details': {'readonly': True}, - 'resource_costs': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'target_cost': {'key': 'properties.targetCost', 'type': 'TargetCostProperties'}, - 'lab_cost_summary': {'key': 'properties.labCostSummary', 'type': 'LabCostSummaryProperties'}, - 'lab_cost_details': {'key': 'properties.labCostDetails', 'type': '[LabCostDetailsProperties]'}, - 'resource_costs': {'key': 'properties.resourceCosts', 'type': '[LabResourceCostProperties]'}, - 'currency_code': {'key': 'properties.currencyCode', 'type': 'str'}, - 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, - 'end_date_time': {'key': 'properties.endDateTime', 'type': 'iso-8601'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, target_cost=None, currency_code: str=None, start_date_time=None, end_date_time=None, created_date=None, **kwargs) -> None: - super(LabCost, self).__init__(location=location, tags=tags, **kwargs) - self.target_cost = target_cost - self.lab_cost_summary = None - self.lab_cost_details = None - self.resource_costs = None - self.currency_code = currency_code - self.start_date_time = start_date_time - self.end_date_time = end_date_time - self.created_date = created_date - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties.py deleted file mode 100644 index edeb814ef472..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabCostSummaryProperties(Model): - """The properties of the cost summary. - - :param estimated_lab_cost: The cost component of the cost item. - :type estimated_lab_cost: float - """ - - _attribute_map = { - 'estimated_lab_cost': {'key': 'estimatedLabCost', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(LabCostSummaryProperties, self).__init__(**kwargs) - self.estimated_lab_cost = kwargs.get('estimated_lab_cost', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties_py3.py deleted file mode 100644 index df5a84f3e609..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabCostSummaryProperties(Model): - """The properties of the cost summary. - - :param estimated_lab_cost: The cost component of the cost item. - :type estimated_lab_cost: float - """ - - _attribute_map = { - 'estimated_lab_cost': {'key': 'estimatedLabCost', 'type': 'float'}, - } - - def __init__(self, *, estimated_lab_cost: float=None, **kwargs) -> None: - super(LabCostSummaryProperties, self).__init__(**kwargs) - self.estimated_lab_cost = estimated_lab_cost diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment.py deleted file mode 100644 index 2ad6dc84b4ae..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class LabFragment(UpdateResource): - """A lab. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_storage_type: Type of storage used by the lab. It can be either - Premium or Standard. Default is Premium. Possible values include: - 'Standard', 'Premium' - :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param mandatory_artifacts_resource_ids_linux: The ordered list of - artifact resource IDs that should be applied on all Linux VM creations by - default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_linux: list[str] - :param mandatory_artifacts_resource_ids_windows: The ordered list of - artifact resource IDs that should be applied on all Windows VM creations - by default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_windows: list[str] - :param premium_data_disks: The setting to enable usage of premium data - disks. - When its value is 'Enabled', creation of standard or premium data disks is - allowed. - When its value is 'Disabled', only creation of standard data disks is - allowed. Possible values include: 'Disabled', 'Enabled' - :type premium_data_disks: str or - ~azure.mgmt.devtestlabs.models.PremiumDataDisk - :param environment_permission: The access rights to be granted to the user - when provisioning an environment. Possible values include: 'Reader', - 'Contributor' - :type environment_permission: str or - ~azure.mgmt.devtestlabs.models.EnvironmentPermission - :param announcement: The properties of any lab announcement associated - with this lab - :type announcement: - ~azure.mgmt.devtestlabs.models.LabAnnouncementPropertiesFragment - :param support: The properties of any lab support message associated with - this lab - :type support: ~azure.mgmt.devtestlabs.models.LabSupportPropertiesFragment - :param extended_properties: Extended properties of the lab used for - experimental features - :type extended_properties: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, - 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, - 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, - 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, - 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, - 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementPropertiesFragment'}, - 'support': {'key': 'properties.support', 'type': 'LabSupportPropertiesFragment'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(LabFragment, self).__init__(**kwargs) - self.lab_storage_type = kwargs.get('lab_storage_type', None) - self.mandatory_artifacts_resource_ids_linux = kwargs.get('mandatory_artifacts_resource_ids_linux', None) - self.mandatory_artifacts_resource_ids_windows = kwargs.get('mandatory_artifacts_resource_ids_windows', None) - self.premium_data_disks = kwargs.get('premium_data_disks', None) - self.environment_permission = kwargs.get('environment_permission', None) - self.announcement = kwargs.get('announcement', None) - self.support = kwargs.get('support', None) - self.extended_properties = kwargs.get('extended_properties', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment_py3.py deleted file mode 100644 index c5aa5b816807..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class LabFragment(UpdateResource): - """A lab. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_storage_type: Type of storage used by the lab. It can be either - Premium or Standard. Default is Premium. Possible values include: - 'Standard', 'Premium' - :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param mandatory_artifacts_resource_ids_linux: The ordered list of - artifact resource IDs that should be applied on all Linux VM creations by - default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_linux: list[str] - :param mandatory_artifacts_resource_ids_windows: The ordered list of - artifact resource IDs that should be applied on all Windows VM creations - by default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_windows: list[str] - :param premium_data_disks: The setting to enable usage of premium data - disks. - When its value is 'Enabled', creation of standard or premium data disks is - allowed. - When its value is 'Disabled', only creation of standard data disks is - allowed. Possible values include: 'Disabled', 'Enabled' - :type premium_data_disks: str or - ~azure.mgmt.devtestlabs.models.PremiumDataDisk - :param environment_permission: The access rights to be granted to the user - when provisioning an environment. Possible values include: 'Reader', - 'Contributor' - :type environment_permission: str or - ~azure.mgmt.devtestlabs.models.EnvironmentPermission - :param announcement: The properties of any lab announcement associated - with this lab - :type announcement: - ~azure.mgmt.devtestlabs.models.LabAnnouncementPropertiesFragment - :param support: The properties of any lab support message associated with - this lab - :type support: ~azure.mgmt.devtestlabs.models.LabSupportPropertiesFragment - :param extended_properties: Extended properties of the lab used for - experimental features - :type extended_properties: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, - 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, - 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, - 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, - 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, - 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementPropertiesFragment'}, - 'support': {'key': 'properties.support', 'type': 'LabSupportPropertiesFragment'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, lab_storage_type=None, mandatory_artifacts_resource_ids_linux=None, mandatory_artifacts_resource_ids_windows=None, premium_data_disks=None, environment_permission=None, announcement=None, support=None, extended_properties=None, **kwargs) -> None: - super(LabFragment, self).__init__(tags=tags, **kwargs) - self.lab_storage_type = lab_storage_type - self.mandatory_artifacts_resource_ids_linux = mandatory_artifacts_resource_ids_linux - self.mandatory_artifacts_resource_ids_windows = mandatory_artifacts_resource_ids_windows - self.premium_data_disks = premium_data_disks - self.environment_permission = environment_permission - self.announcement = announcement - self.support = support - self.extended_properties = extended_properties diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_paged.py deleted file mode 100644 index 869d4b1dee38..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class LabPaged(Paged): - """ - A paging container for iterating over a list of :class:`Lab ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Lab]'} - } - - def __init__(self, *args, **kwargs): - - super(LabPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_py3.py deleted file mode 100644 index ec30462d9336..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_py3.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Lab(Resource): - """A lab. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar default_storage_account: The lab's default storage account. - :vartype default_storage_account: str - :ivar default_premium_storage_account: The lab's default premium storage - account. - :vartype default_premium_storage_account: str - :ivar artifacts_storage_account: The lab's artifact storage account. - :vartype artifacts_storage_account: str - :ivar premium_data_disk_storage_account: The lab's premium data disk - storage account. - :vartype premium_data_disk_storage_account: str - :ivar vault_name: The lab's Key vault. - :vartype vault_name: str - :param lab_storage_type: Type of storage used by the lab. It can be either - Premium or Standard. Default is Premium. Possible values include: - 'Standard', 'Premium' - :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param mandatory_artifacts_resource_ids_linux: The ordered list of - artifact resource IDs that should be applied on all Linux VM creations by - default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_linux: list[str] - :param mandatory_artifacts_resource_ids_windows: The ordered list of - artifact resource IDs that should be applied on all Windows VM creations - by default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_windows: list[str] - :ivar created_date: The creation date of the lab. - :vartype created_date: datetime - :param premium_data_disks: The setting to enable usage of premium data - disks. - When its value is 'Enabled', creation of standard or premium data disks is - allowed. - When its value is 'Disabled', only creation of standard data disks is - allowed. Possible values include: 'Disabled', 'Enabled' - :type premium_data_disks: str or - ~azure.mgmt.devtestlabs.models.PremiumDataDisk - :param environment_permission: The access rights to be granted to the user - when provisioning an environment. Possible values include: 'Reader', - 'Contributor' - :type environment_permission: str or - ~azure.mgmt.devtestlabs.models.EnvironmentPermission - :param announcement: The properties of any lab announcement associated - with this lab - :type announcement: - ~azure.mgmt.devtestlabs.models.LabAnnouncementProperties - :param support: The properties of any lab support message associated with - this lab - :type support: ~azure.mgmt.devtestlabs.models.LabSupportProperties - :ivar vm_creation_resource_group: The resource group in which lab virtual - machines will be created in. - :vartype vm_creation_resource_group: str - :ivar public_ip_id: The public IP address for the lab's load balancer. - :vartype public_ip_id: str - :ivar load_balancer_id: The load balancer used to for lab VMs that use - shared IP address. - :vartype load_balancer_id: str - :ivar network_security_group_id: The Network Security Group attached to - the lab VMs Network interfaces to restrict open ports. - :vartype network_security_group_id: str - :param extended_properties: Extended properties of the lab used for - experimental features - :type extended_properties: dict[str, str] - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'default_storage_account': {'readonly': True}, - 'default_premium_storage_account': {'readonly': True}, - 'artifacts_storage_account': {'readonly': True}, - 'premium_data_disk_storage_account': {'readonly': True}, - 'vault_name': {'readonly': True}, - 'created_date': {'readonly': True}, - 'vm_creation_resource_group': {'readonly': True}, - 'public_ip_id': {'readonly': True}, - 'load_balancer_id': {'readonly': True}, - 'network_security_group_id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'default_storage_account': {'key': 'properties.defaultStorageAccount', 'type': 'str'}, - 'default_premium_storage_account': {'key': 'properties.defaultPremiumStorageAccount', 'type': 'str'}, - 'artifacts_storage_account': {'key': 'properties.artifactsStorageAccount', 'type': 'str'}, - 'premium_data_disk_storage_account': {'key': 'properties.premiumDataDiskStorageAccount', 'type': 'str'}, - 'vault_name': {'key': 'properties.vaultName', 'type': 'str'}, - 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, - 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, - 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, - 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, - 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementProperties'}, - 'support': {'key': 'properties.support', 'type': 'LabSupportProperties'}, - 'vm_creation_resource_group': {'key': 'properties.vmCreationResourceGroup', 'type': 'str'}, - 'public_ip_id': {'key': 'properties.publicIpId', 'type': 'str'}, - 'load_balancer_id': {'key': 'properties.loadBalancerId', 'type': 'str'}, - 'network_security_group_id': {'key': 'properties.networkSecurityGroupId', 'type': 'str'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, lab_storage_type=None, mandatory_artifacts_resource_ids_linux=None, mandatory_artifacts_resource_ids_windows=None, premium_data_disks=None, environment_permission=None, announcement=None, support=None, extended_properties=None, **kwargs) -> None: - super(Lab, self).__init__(location=location, tags=tags, **kwargs) - self.default_storage_account = None - self.default_premium_storage_account = None - self.artifacts_storage_account = None - self.premium_data_disk_storage_account = None - self.vault_name = None - self.lab_storage_type = lab_storage_type - self.mandatory_artifacts_resource_ids_linux = mandatory_artifacts_resource_ids_linux - self.mandatory_artifacts_resource_ids_windows = mandatory_artifacts_resource_ids_windows - self.created_date = None - self.premium_data_disks = premium_data_disks - self.environment_permission = environment_permission - self.announcement = announcement - self.support = support - self.vm_creation_resource_group = None - self.public_ip_id = None - self.load_balancer_id = None - self.network_security_group_id = None - self.extended_properties = extended_properties - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties.py deleted file mode 100644 index 8883745b9735..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabResourceCostProperties(Model): - """The properties of a resource cost item. - - :param resourcename: The name of the resource. - :type resourcename: str - :param resource_uid: The unique identifier of the resource. - :type resource_uid: str - :param resource_cost: The cost component of the resource cost item. - :type resource_cost: float - :param resource_type: The logical resource type (ex. virtualmachine, - storageaccount) - :type resource_type: str - :param resource_owner: The owner of the resource (ex. - janedoe@microsoft.com) - :type resource_owner: str - :param resource_pricing_tier: The category of the resource (ex. - Premium_LRS, Standard_DS1) - :type resource_pricing_tier: str - :param resource_status: The status of the resource (ex. Active) - :type resource_status: str - :param resource_id: The ID of the resource - :type resource_id: str - :param external_resource_id: The ID of the external resource - :type external_resource_id: str - """ - - _attribute_map = { - 'resourcename': {'key': 'resourcename', 'type': 'str'}, - 'resource_uid': {'key': 'resourceUId', 'type': 'str'}, - 'resource_cost': {'key': 'resourceCost', 'type': 'float'}, - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'resource_owner': {'key': 'resourceOwner', 'type': 'str'}, - 'resource_pricing_tier': {'key': 'resourcePricingTier', 'type': 'str'}, - 'resource_status': {'key': 'resourceStatus', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'external_resource_id': {'key': 'externalResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabResourceCostProperties, self).__init__(**kwargs) - self.resourcename = kwargs.get('resourcename', None) - self.resource_uid = kwargs.get('resource_uid', None) - self.resource_cost = kwargs.get('resource_cost', None) - self.resource_type = kwargs.get('resource_type', None) - self.resource_owner = kwargs.get('resource_owner', None) - self.resource_pricing_tier = kwargs.get('resource_pricing_tier', None) - self.resource_status = kwargs.get('resource_status', None) - self.resource_id = kwargs.get('resource_id', None) - self.external_resource_id = kwargs.get('external_resource_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties_py3.py deleted file mode 100644 index 5b360dee84b9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabResourceCostProperties(Model): - """The properties of a resource cost item. - - :param resourcename: The name of the resource. - :type resourcename: str - :param resource_uid: The unique identifier of the resource. - :type resource_uid: str - :param resource_cost: The cost component of the resource cost item. - :type resource_cost: float - :param resource_type: The logical resource type (ex. virtualmachine, - storageaccount) - :type resource_type: str - :param resource_owner: The owner of the resource (ex. - janedoe@microsoft.com) - :type resource_owner: str - :param resource_pricing_tier: The category of the resource (ex. - Premium_LRS, Standard_DS1) - :type resource_pricing_tier: str - :param resource_status: The status of the resource (ex. Active) - :type resource_status: str - :param resource_id: The ID of the resource - :type resource_id: str - :param external_resource_id: The ID of the external resource - :type external_resource_id: str - """ - - _attribute_map = { - 'resourcename': {'key': 'resourcename', 'type': 'str'}, - 'resource_uid': {'key': 'resourceUId', 'type': 'str'}, - 'resource_cost': {'key': 'resourceCost', 'type': 'float'}, - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'resource_owner': {'key': 'resourceOwner', 'type': 'str'}, - 'resource_pricing_tier': {'key': 'resourcePricingTier', 'type': 'str'}, - 'resource_status': {'key': 'resourceStatus', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'external_resource_id': {'key': 'externalResourceId', 'type': 'str'}, - } - - def __init__(self, *, resourcename: str=None, resource_uid: str=None, resource_cost: float=None, resource_type: str=None, resource_owner: str=None, resource_pricing_tier: str=None, resource_status: str=None, resource_id: str=None, external_resource_id: str=None, **kwargs) -> None: - super(LabResourceCostProperties, self).__init__(**kwargs) - self.resourcename = resourcename - self.resource_uid = resource_uid - self.resource_cost = resource_cost - self.resource_type = resource_type - self.resource_owner = resource_owner - self.resource_pricing_tier = resource_pricing_tier - self.resource_status = resource_status - self.resource_id = resource_id - self.external_resource_id = external_resource_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties.py deleted file mode 100644 index e948a530fa44..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabSupportProperties(Model): - """Properties of a lab's support banner. - - :param enabled: Is the lab support banner active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabSupportProperties, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.markdown = kwargs.get('markdown', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment.py deleted file mode 100644 index 53bf876c5a2c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabSupportPropertiesFragment(Model): - """Properties of a lab's support banner. - - :param enabled: Is the lab support banner active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabSupportPropertiesFragment, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.markdown = kwargs.get('markdown', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment_py3.py deleted file mode 100644 index 0495bf2657d2..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabSupportPropertiesFragment(Model): - """Properties of a lab's support banner. - - :param enabled: Is the lab support banner active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - } - - def __init__(self, *, enabled=None, markdown: str=None, **kwargs) -> None: - super(LabSupportPropertiesFragment, self).__init__(**kwargs) - self.enabled = enabled - self.markdown = markdown diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_py3.py deleted file mode 100644 index 0eac2ef2c950..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabSupportProperties(Model): - """Properties of a lab's support banner. - - :param enabled: Is the lab support banner active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - } - - def __init__(self, *, enabled=None, markdown: str=None, **kwargs) -> None: - super(LabSupportProperties, self).__init__(**kwargs) - self.enabled = enabled - self.markdown = markdown diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd.py deleted file mode 100644 index acb777ea8f1b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabVhd(Model): - """Properties of a VHD in the lab. - - :param id: The URI to the VHD. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabVhd, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_paged.py deleted file mode 100644 index 34d5dda853fe..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class LabVhdPaged(Paged): - """ - A paging container for iterating over a list of :class:`LabVhd ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[LabVhd]'} - } - - def __init__(self, *args, **kwargs): - - super(LabVhdPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_py3.py deleted file mode 100644 index 7f0adddb42ae..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabVhd(Model): - """Properties of a VHD in the lab. - - :param id: The URI to the VHD. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(LabVhd, self).__init__(**kwargs) - self.id = id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine.py deleted file mode 100644 index 079a4c3bb59f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine.py +++ /dev/null @@ -1,221 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class LabVirtualMachine(Resource): - """A virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :ivar compute_vm: The compute virtual machine properties. - :vartype compute_vm: ~azure.mgmt.devtestlabs.models.ComputeVmProperties - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties - :ivar applicable_schedule: The applicable schedule for the virtual - machine. - :vartype applicable_schedule: - ~azure.mgmt.devtestlabs.models.ApplicableSchedule - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskProperties] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'compute_vm': {'readonly': True}, - 'applicable_schedule': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'compute_vm': {'key': 'properties.computeVm', 'type': 'ComputeVmProperties'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, - 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabVirtualMachine, self).__init__(**kwargs) - self.notes = kwargs.get('notes', None) - self.owner_object_id = kwargs.get('owner_object_id', None) - self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) - self.created_by_user_id = kwargs.get('created_by_user_id', None) - self.created_by_user = kwargs.get('created_by_user', None) - self.created_date = kwargs.get('created_date', None) - self.compute_id = kwargs.get('compute_id', None) - self.custom_image_id = kwargs.get('custom_image_id', None) - self.os_type = kwargs.get('os_type', None) - self.size = kwargs.get('size', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.ssh_key = kwargs.get('ssh_key', None) - self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) - self.fqdn = kwargs.get('fqdn', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) - self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) - self.artifacts = kwargs.get('artifacts', None) - self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) - self.gallery_image_reference = kwargs.get('gallery_image_reference', None) - self.plan_id = kwargs.get('plan_id', None) - self.compute_vm = None - self.network_interface = kwargs.get('network_interface', None) - self.applicable_schedule = None - self.expiration_date = kwargs.get('expiration_date', None) - self.allow_claim = kwargs.get('allow_claim', None) - self.storage_type = kwargs.get('storage_type', None) - self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) - self.environment_id = kwargs.get('environment_id', None) - self.data_disk_parameters = kwargs.get('data_disk_parameters', None) - self.schedule_parameters = kwargs.get('schedule_parameters', None) - self.last_known_power_state = kwargs.get('last_known_power_state', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter.py deleted file mode 100644 index db9aad603356..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabVirtualMachineCreationParameter(Model): - """Properties for creating a virtual machine. - - :param bulk_creation_parameters: The number of virtual machine instances - to create. - :type bulk_creation_parameters: - ~azure.mgmt.devtestlabs.models.BulkCreationParameters - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskProperties] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParameters'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(LabVirtualMachineCreationParameter, self).__init__(**kwargs) - self.bulk_creation_parameters = kwargs.get('bulk_creation_parameters', None) - self.notes = kwargs.get('notes', None) - self.owner_object_id = kwargs.get('owner_object_id', None) - self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) - self.created_by_user_id = kwargs.get('created_by_user_id', None) - self.created_by_user = kwargs.get('created_by_user', None) - self.created_date = kwargs.get('created_date', None) - self.compute_id = kwargs.get('compute_id', None) - self.custom_image_id = kwargs.get('custom_image_id', None) - self.os_type = kwargs.get('os_type', None) - self.size = kwargs.get('size', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.ssh_key = kwargs.get('ssh_key', None) - self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) - self.fqdn = kwargs.get('fqdn', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) - self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) - self.artifacts = kwargs.get('artifacts', None) - self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) - self.gallery_image_reference = kwargs.get('gallery_image_reference', None) - self.plan_id = kwargs.get('plan_id', None) - self.network_interface = kwargs.get('network_interface', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.allow_claim = kwargs.get('allow_claim', None) - self.storage_type = kwargs.get('storage_type', None) - self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) - self.environment_id = kwargs.get('environment_id', None) - self.data_disk_parameters = kwargs.get('data_disk_parameters', None) - self.schedule_parameters = kwargs.get('schedule_parameters', None) - self.last_known_power_state = kwargs.get('last_known_power_state', None) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment.py deleted file mode 100644 index 2a58002ea2bf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabVirtualMachineCreationParameterFragment(Model): - """Properties for creating a virtual machine. - - :param bulk_creation_parameters: The number of virtual machine instances - to create. - :type bulk_creation_parameters: - ~azure.mgmt.devtestlabs.models.BulkCreationParametersFragment - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParametersFragment'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(LabVirtualMachineCreationParameterFragment, self).__init__(**kwargs) - self.bulk_creation_parameters = kwargs.get('bulk_creation_parameters', None) - self.notes = kwargs.get('notes', None) - self.owner_object_id = kwargs.get('owner_object_id', None) - self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) - self.created_by_user_id = kwargs.get('created_by_user_id', None) - self.created_by_user = kwargs.get('created_by_user', None) - self.created_date = kwargs.get('created_date', None) - self.compute_id = kwargs.get('compute_id', None) - self.custom_image_id = kwargs.get('custom_image_id', None) - self.os_type = kwargs.get('os_type', None) - self.size = kwargs.get('size', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.ssh_key = kwargs.get('ssh_key', None) - self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) - self.fqdn = kwargs.get('fqdn', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) - self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) - self.artifacts = kwargs.get('artifacts', None) - self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) - self.gallery_image_reference = kwargs.get('gallery_image_reference', None) - self.plan_id = kwargs.get('plan_id', None) - self.network_interface = kwargs.get('network_interface', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.allow_claim = kwargs.get('allow_claim', None) - self.storage_type = kwargs.get('storage_type', None) - self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) - self.environment_id = kwargs.get('environment_id', None) - self.data_disk_parameters = kwargs.get('data_disk_parameters', None) - self.schedule_parameters = kwargs.get('schedule_parameters', None) - self.last_known_power_state = kwargs.get('last_known_power_state', None) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment_py3.py deleted file mode 100644 index d583a499210f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment_py3.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabVirtualMachineCreationParameterFragment(Model): - """Properties for creating a virtual machine. - - :param bulk_creation_parameters: The number of virtual machine instances - to create. - :type bulk_creation_parameters: - ~azure.mgmt.devtestlabs.models.BulkCreationParametersFragment - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParametersFragment'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, bulk_creation_parameters=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: - super(LabVirtualMachineCreationParameterFragment, self).__init__(**kwargs) - self.bulk_creation_parameters = bulk_creation_parameters - self.notes = notes - self.owner_object_id = owner_object_id - self.owner_user_principal_name = owner_user_principal_name - self.created_by_user_id = created_by_user_id - self.created_by_user = created_by_user - self.created_date = created_date - self.compute_id = compute_id - self.custom_image_id = custom_image_id - self.os_type = os_type - self.size = size - self.user_name = user_name - self.password = password - self.ssh_key = ssh_key - self.is_authentication_with_ssh_key = is_authentication_with_ssh_key - self.fqdn = fqdn - self.lab_subnet_name = lab_subnet_name - self.lab_virtual_network_id = lab_virtual_network_id - self.disallow_public_ip_address = disallow_public_ip_address - self.artifacts = artifacts - self.artifact_deployment_status = artifact_deployment_status - self.gallery_image_reference = gallery_image_reference - self.plan_id = plan_id - self.network_interface = network_interface - self.expiration_date = expiration_date - self.allow_claim = allow_claim - self.storage_type = storage_type - self.virtual_machine_creation_source = virtual_machine_creation_source - self.environment_id = environment_id - self.data_disk_parameters = data_disk_parameters - self.schedule_parameters = schedule_parameters - self.last_known_power_state = last_known_power_state - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_py3.py deleted file mode 100644 index f6df337a6179..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_py3.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabVirtualMachineCreationParameter(Model): - """Properties for creating a virtual machine. - - :param bulk_creation_parameters: The number of virtual machine instances - to create. - :type bulk_creation_parameters: - ~azure.mgmt.devtestlabs.models.BulkCreationParameters - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskProperties] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParameters'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, bulk_creation_parameters=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: - super(LabVirtualMachineCreationParameter, self).__init__(**kwargs) - self.bulk_creation_parameters = bulk_creation_parameters - self.notes = notes - self.owner_object_id = owner_object_id - self.owner_user_principal_name = owner_user_principal_name - self.created_by_user_id = created_by_user_id - self.created_by_user = created_by_user - self.created_date = created_date - self.compute_id = compute_id - self.custom_image_id = custom_image_id - self.os_type = os_type - self.size = size - self.user_name = user_name - self.password = password - self.ssh_key = ssh_key - self.is_authentication_with_ssh_key = is_authentication_with_ssh_key - self.fqdn = fqdn - self.lab_subnet_name = lab_subnet_name - self.lab_virtual_network_id = lab_virtual_network_id - self.disallow_public_ip_address = disallow_public_ip_address - self.artifacts = artifacts - self.artifact_deployment_status = artifact_deployment_status - self.gallery_image_reference = gallery_image_reference - self.plan_id = plan_id - self.network_interface = network_interface - self.expiration_date = expiration_date - self.allow_claim = allow_claim - self.storage_type = storage_type - self.virtual_machine_creation_source = virtual_machine_creation_source - self.environment_id = environment_id - self.data_disk_parameters = data_disk_parameters - self.schedule_parameters = schedule_parameters - self.last_known_power_state = last_known_power_state - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment.py deleted file mode 100644 index 132affe5f1ba..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment.py +++ /dev/null @@ -1,177 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class LabVirtualMachineFragment(UpdateResource): - """A virtual machine. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabVirtualMachineFragment, self).__init__(**kwargs) - self.notes = kwargs.get('notes', None) - self.owner_object_id = kwargs.get('owner_object_id', None) - self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) - self.created_by_user_id = kwargs.get('created_by_user_id', None) - self.created_by_user = kwargs.get('created_by_user', None) - self.created_date = kwargs.get('created_date', None) - self.compute_id = kwargs.get('compute_id', None) - self.custom_image_id = kwargs.get('custom_image_id', None) - self.os_type = kwargs.get('os_type', None) - self.size = kwargs.get('size', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.ssh_key = kwargs.get('ssh_key', None) - self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) - self.fqdn = kwargs.get('fqdn', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) - self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) - self.artifacts = kwargs.get('artifacts', None) - self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) - self.gallery_image_reference = kwargs.get('gallery_image_reference', None) - self.plan_id = kwargs.get('plan_id', None) - self.network_interface = kwargs.get('network_interface', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.allow_claim = kwargs.get('allow_claim', None) - self.storage_type = kwargs.get('storage_type', None) - self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) - self.environment_id = kwargs.get('environment_id', None) - self.data_disk_parameters = kwargs.get('data_disk_parameters', None) - self.schedule_parameters = kwargs.get('schedule_parameters', None) - self.last_known_power_state = kwargs.get('last_known_power_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment_py3.py deleted file mode 100644 index 11dca443d47b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment_py3.py +++ /dev/null @@ -1,177 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class LabVirtualMachineFragment(UpdateResource): - """A virtual machine. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - } - - def __init__(self, *, tags=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, **kwargs) -> None: - super(LabVirtualMachineFragment, self).__init__(tags=tags, **kwargs) - self.notes = notes - self.owner_object_id = owner_object_id - self.owner_user_principal_name = owner_user_principal_name - self.created_by_user_id = created_by_user_id - self.created_by_user = created_by_user - self.created_date = created_date - self.compute_id = compute_id - self.custom_image_id = custom_image_id - self.os_type = os_type - self.size = size - self.user_name = user_name - self.password = password - self.ssh_key = ssh_key - self.is_authentication_with_ssh_key = is_authentication_with_ssh_key - self.fqdn = fqdn - self.lab_subnet_name = lab_subnet_name - self.lab_virtual_network_id = lab_virtual_network_id - self.disallow_public_ip_address = disallow_public_ip_address - self.artifacts = artifacts - self.artifact_deployment_status = artifact_deployment_status - self.gallery_image_reference = gallery_image_reference - self.plan_id = plan_id - self.network_interface = network_interface - self.expiration_date = expiration_date - self.allow_claim = allow_claim - self.storage_type = storage_type - self.virtual_machine_creation_source = virtual_machine_creation_source - self.environment_id = environment_id - self.data_disk_parameters = data_disk_parameters - self.schedule_parameters = schedule_parameters - self.last_known_power_state = last_known_power_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_paged.py deleted file mode 100644 index 08e2d31e58dc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class LabVirtualMachinePaged(Paged): - """ - A paging container for iterating over a list of :class:`LabVirtualMachine ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[LabVirtualMachine]'} - } - - def __init__(self, *args, **kwargs): - - super(LabVirtualMachinePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_py3.py deleted file mode 100644 index 354acb458cc9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_py3.py +++ /dev/null @@ -1,221 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class LabVirtualMachine(Resource): - """A virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :ivar compute_vm: The compute virtual machine properties. - :vartype compute_vm: ~azure.mgmt.devtestlabs.models.ComputeVmProperties - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties - :ivar applicable_schedule: The applicable schedule for the virtual - machine. - :vartype applicable_schedule: - ~azure.mgmt.devtestlabs.models.ApplicableSchedule - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskProperties] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'compute_vm': {'readonly': True}, - 'applicable_schedule': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'compute_vm': {'key': 'properties.computeVm', 'type': 'ComputeVmProperties'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, - 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, **kwargs) -> None: - super(LabVirtualMachine, self).__init__(location=location, tags=tags, **kwargs) - self.notes = notes - self.owner_object_id = owner_object_id - self.owner_user_principal_name = owner_user_principal_name - self.created_by_user_id = created_by_user_id - self.created_by_user = created_by_user - self.created_date = created_date - self.compute_id = compute_id - self.custom_image_id = custom_image_id - self.os_type = os_type - self.size = size - self.user_name = user_name - self.password = password - self.ssh_key = ssh_key - self.is_authentication_with_ssh_key = is_authentication_with_ssh_key - self.fqdn = fqdn - self.lab_subnet_name = lab_subnet_name - self.lab_virtual_network_id = lab_virtual_network_id - self.disallow_public_ip_address = disallow_public_ip_address - self.artifacts = artifacts - self.artifact_deployment_status = artifact_deployment_status - self.gallery_image_reference = gallery_image_reference - self.plan_id = plan_id - self.compute_vm = None - self.network_interface = network_interface - self.applicable_schedule = None - self.expiration_date = expiration_date - self.allow_claim = allow_claim - self.storage_type = storage_type - self.virtual_machine_creation_source = virtual_machine_creation_source - self.environment_id = environment_id - self.data_disk_parameters = data_disk_parameters - self.schedule_parameters = schedule_parameters - self.last_known_power_state = last_known_power_state - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info.py deleted file mode 100644 index 70154219e989..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxOsInfo(Model): - """Information about a Linux OS. - - :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, - DeprovisionRequested, DeprovisionApplied). Possible values include: - 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' - :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState - """ - - _attribute_map = { - 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LinuxOsInfo, self).__init__(**kwargs) - self.linux_os_state = kwargs.get('linux_os_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment.py deleted file mode 100644 index a7b98b278ea7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxOsInfoFragment(Model): - """Information about a Linux OS. - - :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, - DeprovisionRequested, DeprovisionApplied). Possible values include: - 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' - :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState - """ - - _attribute_map = { - 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LinuxOsInfoFragment, self).__init__(**kwargs) - self.linux_os_state = kwargs.get('linux_os_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment_py3.py deleted file mode 100644 index b8b4919c8eab..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxOsInfoFragment(Model): - """Information about a Linux OS. - - :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, - DeprovisionRequested, DeprovisionApplied). Possible values include: - 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' - :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState - """ - - _attribute_map = { - 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, - } - - def __init__(self, *, linux_os_state=None, **kwargs) -> None: - super(LinuxOsInfoFragment, self).__init__(**kwargs) - self.linux_os_state = linux_os_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_py3.py deleted file mode 100644 index a8176b7be240..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxOsInfo(Model): - """Information about a Linux OS. - - :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, - DeprovisionRequested, DeprovisionApplied). Possible values include: - 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' - :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState - """ - - _attribute_map = { - 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, - } - - def __init__(self, *, linux_os_state=None, **kwargs) -> None: - super(LinuxOsInfo, self).__init__(**kwargs) - self.linux_os_state = linux_os_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties.py deleted file mode 100644 index 67bd4ee0a9fc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkInterfaceProperties(Model): - """Properties of a network interface. - - :param virtual_network_id: The resource ID of the virtual network. - :type virtual_network_id: str - :param subnet_id: The resource ID of the sub net. - :type subnet_id: str - :param public_ip_address_id: The resource ID of the public IP address. - :type public_ip_address_id: str - :param public_ip_address: The public IP address. - :type public_ip_address: str - :param private_ip_address: The private IP address. - :type private_ip_address: str - :param dns_name: The DNS name. - :type dns_name: str - :param rdp_authority: The RdpAuthority property is a server DNS host name - or IP address followed by the service port number for RDP (Remote Desktop - Protocol). - :type rdp_authority: str - :param ssh_authority: The SshAuthority property is a server DNS host name - or IP address followed by the service port number for SSH. - :type ssh_authority: str - :param shared_public_ip_address_configuration: The configuration for - sharing a public IP address across multiple virtual machines. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfiguration - """ - - _attribute_map = { - 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, - 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, - 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, - 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfiguration'}, - } - - def __init__(self, **kwargs): - super(NetworkInterfaceProperties, self).__init__(**kwargs) - self.virtual_network_id = kwargs.get('virtual_network_id', None) - self.subnet_id = kwargs.get('subnet_id', None) - self.public_ip_address_id = kwargs.get('public_ip_address_id', None) - self.public_ip_address = kwargs.get('public_ip_address', None) - self.private_ip_address = kwargs.get('private_ip_address', None) - self.dns_name = kwargs.get('dns_name', None) - self.rdp_authority = kwargs.get('rdp_authority', None) - self.ssh_authority = kwargs.get('ssh_authority', None) - self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment.py deleted file mode 100644 index e42965548e38..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkInterfacePropertiesFragment(Model): - """Properties of a network interface. - - :param virtual_network_id: The resource ID of the virtual network. - :type virtual_network_id: str - :param subnet_id: The resource ID of the sub net. - :type subnet_id: str - :param public_ip_address_id: The resource ID of the public IP address. - :type public_ip_address_id: str - :param public_ip_address: The public IP address. - :type public_ip_address: str - :param private_ip_address: The private IP address. - :type private_ip_address: str - :param dns_name: The DNS name. - :type dns_name: str - :param rdp_authority: The RdpAuthority property is a server DNS host name - or IP address followed by the service port number for RDP (Remote Desktop - Protocol). - :type rdp_authority: str - :param ssh_authority: The SshAuthority property is a server DNS host name - or IP address followed by the service port number for SSH. - :type ssh_authority: str - :param shared_public_ip_address_configuration: The configuration for - sharing a public IP address across multiple virtual machines. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfigurationFragment - """ - - _attribute_map = { - 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, - 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, - 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, - 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfigurationFragment'}, - } - - def __init__(self, **kwargs): - super(NetworkInterfacePropertiesFragment, self).__init__(**kwargs) - self.virtual_network_id = kwargs.get('virtual_network_id', None) - self.subnet_id = kwargs.get('subnet_id', None) - self.public_ip_address_id = kwargs.get('public_ip_address_id', None) - self.public_ip_address = kwargs.get('public_ip_address', None) - self.private_ip_address = kwargs.get('private_ip_address', None) - self.dns_name = kwargs.get('dns_name', None) - self.rdp_authority = kwargs.get('rdp_authority', None) - self.ssh_authority = kwargs.get('ssh_authority', None) - self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment_py3.py deleted file mode 100644 index 87854401d799..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkInterfacePropertiesFragment(Model): - """Properties of a network interface. - - :param virtual_network_id: The resource ID of the virtual network. - :type virtual_network_id: str - :param subnet_id: The resource ID of the sub net. - :type subnet_id: str - :param public_ip_address_id: The resource ID of the public IP address. - :type public_ip_address_id: str - :param public_ip_address: The public IP address. - :type public_ip_address: str - :param private_ip_address: The private IP address. - :type private_ip_address: str - :param dns_name: The DNS name. - :type dns_name: str - :param rdp_authority: The RdpAuthority property is a server DNS host name - or IP address followed by the service port number for RDP (Remote Desktop - Protocol). - :type rdp_authority: str - :param ssh_authority: The SshAuthority property is a server DNS host name - or IP address followed by the service port number for SSH. - :type ssh_authority: str - :param shared_public_ip_address_configuration: The configuration for - sharing a public IP address across multiple virtual machines. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfigurationFragment - """ - - _attribute_map = { - 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, - 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, - 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, - 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfigurationFragment'}, - } - - def __init__(self, *, virtual_network_id: str=None, subnet_id: str=None, public_ip_address_id: str=None, public_ip_address: str=None, private_ip_address: str=None, dns_name: str=None, rdp_authority: str=None, ssh_authority: str=None, shared_public_ip_address_configuration=None, **kwargs) -> None: - super(NetworkInterfacePropertiesFragment, self).__init__(**kwargs) - self.virtual_network_id = virtual_network_id - self.subnet_id = subnet_id - self.public_ip_address_id = public_ip_address_id - self.public_ip_address = public_ip_address - self.private_ip_address = private_ip_address - self.dns_name = dns_name - self.rdp_authority = rdp_authority - self.ssh_authority = ssh_authority - self.shared_public_ip_address_configuration = shared_public_ip_address_configuration diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_py3.py deleted file mode 100644 index c68daf4e897b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkInterfaceProperties(Model): - """Properties of a network interface. - - :param virtual_network_id: The resource ID of the virtual network. - :type virtual_network_id: str - :param subnet_id: The resource ID of the sub net. - :type subnet_id: str - :param public_ip_address_id: The resource ID of the public IP address. - :type public_ip_address_id: str - :param public_ip_address: The public IP address. - :type public_ip_address: str - :param private_ip_address: The private IP address. - :type private_ip_address: str - :param dns_name: The DNS name. - :type dns_name: str - :param rdp_authority: The RdpAuthority property is a server DNS host name - or IP address followed by the service port number for RDP (Remote Desktop - Protocol). - :type rdp_authority: str - :param ssh_authority: The SshAuthority property is a server DNS host name - or IP address followed by the service port number for SSH. - :type ssh_authority: str - :param shared_public_ip_address_configuration: The configuration for - sharing a public IP address across multiple virtual machines. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfiguration - """ - - _attribute_map = { - 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, - 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, - 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, - 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfiguration'}, - } - - def __init__(self, *, virtual_network_id: str=None, subnet_id: str=None, public_ip_address_id: str=None, public_ip_address: str=None, private_ip_address: str=None, dns_name: str=None, rdp_authority: str=None, ssh_authority: str=None, shared_public_ip_address_configuration=None, **kwargs) -> None: - super(NetworkInterfaceProperties, self).__init__(**kwargs) - self.virtual_network_id = virtual_network_id - self.subnet_id = subnet_id - self.public_ip_address_id = public_ip_address_id - self.public_ip_address = public_ip_address - self.private_ip_address = private_ip_address - self.dns_name = dns_name - self.rdp_authority = rdp_authority - self.ssh_authority = ssh_authority - self.shared_public_ip_address_configuration = shared_public_ip_address_configuration diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel.py deleted file mode 100644 index 7132c4436c6e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class NotificationChannel(Resource): - """A notification. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param web_hook_url: The webhook URL to send notifications to. - :type web_hook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - :param description: Description of notification. - :type description: str - :param events: The list of event for which this notification is enabled. - :type events: list[~azure.mgmt.devtestlabs.models.Event] - :ivar created_date: The creation date of the notification channel. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'events': {'key': 'properties.events', 'type': '[Event]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NotificationChannel, self).__init__(**kwargs) - self.web_hook_url = kwargs.get('web_hook_url', None) - self.email_recipient = kwargs.get('email_recipient', None) - self.notification_locale = kwargs.get('notification_locale', None) - self.description = kwargs.get('description', None) - self.events = kwargs.get('events', None) - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment.py deleted file mode 100644 index 588dee5b2395..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class NotificationChannelFragment(UpdateResource): - """A notification. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param web_hook_url: The webhook URL to send notifications to. - :type web_hook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - :param description: Description of notification. - :type description: str - :param events: The list of event for which this notification is enabled. - :type events: list[~azure.mgmt.devtestlabs.models.EventFragment] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'events': {'key': 'properties.events', 'type': '[EventFragment]'}, - } - - def __init__(self, **kwargs): - super(NotificationChannelFragment, self).__init__(**kwargs) - self.web_hook_url = kwargs.get('web_hook_url', None) - self.email_recipient = kwargs.get('email_recipient', None) - self.notification_locale = kwargs.get('notification_locale', None) - self.description = kwargs.get('description', None) - self.events = kwargs.get('events', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment_py3.py deleted file mode 100644 index a7179388c512..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class NotificationChannelFragment(UpdateResource): - """A notification. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param web_hook_url: The webhook URL to send notifications to. - :type web_hook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - :param description: Description of notification. - :type description: str - :param events: The list of event for which this notification is enabled. - :type events: list[~azure.mgmt.devtestlabs.models.EventFragment] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'events': {'key': 'properties.events', 'type': '[EventFragment]'}, - } - - def __init__(self, *, tags=None, web_hook_url: str=None, email_recipient: str=None, notification_locale: str=None, description: str=None, events=None, **kwargs) -> None: - super(NotificationChannelFragment, self).__init__(tags=tags, **kwargs) - self.web_hook_url = web_hook_url - self.email_recipient = email_recipient - self.notification_locale = notification_locale - self.description = description - self.events = events diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_paged.py deleted file mode 100644 index 9a74839b31a1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class NotificationChannelPaged(Paged): - """ - A paging container for iterating over a list of :class:`NotificationChannel ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[NotificationChannel]'} - } - - def __init__(self, *args, **kwargs): - - super(NotificationChannelPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_py3.py deleted file mode 100644 index 08a0f47db1da..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_py3.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class NotificationChannel(Resource): - """A notification. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param web_hook_url: The webhook URL to send notifications to. - :type web_hook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - :param description: Description of notification. - :type description: str - :param events: The list of event for which this notification is enabled. - :type events: list[~azure.mgmt.devtestlabs.models.Event] - :ivar created_date: The creation date of the notification channel. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'events': {'key': 'properties.events', 'type': '[Event]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, web_hook_url: str=None, email_recipient: str=None, notification_locale: str=None, description: str=None, events=None, **kwargs) -> None: - super(NotificationChannel, self).__init__(location=location, tags=tags, **kwargs) - self.web_hook_url = web_hook_url - self.email_recipient = email_recipient - self.notification_locale = notification_locale - self.description = description - self.events = events - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings.py deleted file mode 100644 index 656eae9f9cb4..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NotificationSettings(Model): - """Notification settings for a schedule. - - :param status: If notifications are enabled for this schedule (i.e. - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param time_in_minutes: Time in minutes before event at which notification - will be sent. - :type time_in_minutes: int - :param webhook_url: The webhook URL to which the notification will be - sent. - :type webhook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, - 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NotificationSettings, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.time_in_minutes = kwargs.get('time_in_minutes', None) - self.webhook_url = kwargs.get('webhook_url', None) - self.email_recipient = kwargs.get('email_recipient', None) - self.notification_locale = kwargs.get('notification_locale', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.py deleted file mode 100644 index bc707e6ecfe7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NotificationSettingsFragment(Model): - """Notification settings for a schedule. - - :param status: If notifications are enabled for this schedule (i.e. - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param time_in_minutes: Time in minutes before event at which notification - will be sent. - :type time_in_minutes: int - :param webhook_url: The webhook URL to which the notification will be - sent. - :type webhook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, - 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NotificationSettingsFragment, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.time_in_minutes = kwargs.get('time_in_minutes', None) - self.webhook_url = kwargs.get('webhook_url', None) - self.email_recipient = kwargs.get('email_recipient', None) - self.notification_locale = kwargs.get('notification_locale', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment_py3.py deleted file mode 100644 index 260ce034f89d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NotificationSettingsFragment(Model): - """Notification settings for a schedule. - - :param status: If notifications are enabled for this schedule (i.e. - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param time_in_minutes: Time in minutes before event at which notification - will be sent. - :type time_in_minutes: int - :param webhook_url: The webhook URL to which the notification will be - sent. - :type webhook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, - 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, - } - - def __init__(self, *, status=None, time_in_minutes: int=None, webhook_url: str=None, email_recipient: str=None, notification_locale: str=None, **kwargs) -> None: - super(NotificationSettingsFragment, self).__init__(**kwargs) - self.status = status - self.time_in_minutes = time_in_minutes - self.webhook_url = webhook_url - self.email_recipient = email_recipient - self.notification_locale = notification_locale diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_py3.py deleted file mode 100644 index 66c77b99768a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NotificationSettings(Model): - """Notification settings for a schedule. - - :param status: If notifications are enabled for this schedule (i.e. - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param time_in_minutes: Time in minutes before event at which notification - will be sent. - :type time_in_minutes: int - :param webhook_url: The webhook URL to which the notification will be - sent. - :type webhook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, - 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, - } - - def __init__(self, *, status=None, time_in_minutes: int=None, webhook_url: str=None, email_recipient: str=None, notification_locale: str=None, **kwargs) -> None: - super(NotificationSettings, self).__init__(**kwargs) - self.status = status - self.time_in_minutes = time_in_minutes - self.webhook_url = webhook_url - self.email_recipient = email_recipient - self.notification_locale = notification_locale diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters.py deleted file mode 100644 index 8adc994f1e40..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NotifyParameters(Model): - """Properties for generating a Notification. - - :param event_name: The type of event (i.e. AutoShutdown, Cost). Possible - values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - :param json_payload: Properties for the notification in json format. - :type json_payload: str - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - 'json_payload': {'key': 'jsonPayload', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NotifyParameters, self).__init__(**kwargs) - self.event_name = kwargs.get('event_name', None) - self.json_payload = kwargs.get('json_payload', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters_py3.py deleted file mode 100644 index 40b8e900f189..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NotifyParameters(Model): - """Properties for generating a Notification. - - :param event_name: The type of event (i.e. AutoShutdown, Cost). Possible - values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - :param json_payload: Properties for the notification in json format. - :type json_payload: str - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - 'json_payload': {'key': 'jsonPayload', 'type': 'str'}, - } - - def __init__(self, *, event_name=None, json_payload: str=None, **kwargs) -> None: - super(NotifyParameters, self).__init__(**kwargs) - self.event_name = event_name - self.json_payload = json_payload diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error.py deleted file mode 100644 index 5ee1f80b2712..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationError(Model): - """Error details for the operation in case of a failure. - - :param code: The error code of the operation error. - :type code: str - :param message: The error message of the operation error. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationError, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error_py3.py deleted file mode 100644 index 19c57b944297..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationError(Model): - """Error details for the operation in case of a failure. - - :param code: The error code of the operation error. - :type code: str - :param message: The error message of the operation error. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: - super(OperationError, self).__init__(**kwargs) - self.code = code - self.message = message diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata.py deleted file mode 100644 index 3551895bd8c6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationMetadata(Model): - """The REST API operation supported by DevTestLab ResourceProvider. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: The object that describes the operations - :type display: ~azure.mgmt.devtestlabs.models.OperationMetadataDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationMetadataDisplay'}, - } - - def __init__(self, **kwargs): - super(OperationMetadata, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display.py deleted file mode 100644 index c20b0b519d3e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationMetadataDisplay(Model): - """The object that describes the operations. - - :param provider: Friendly name of the resource provider - :type provider: str - :param resource: Resource type on which the operation is performed. - :type resource: str - :param operation: Operation type: read, write, delete, listKeys/action, - etc. - :type operation: str - :param description: Friendly name of the operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationMetadataDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display_py3.py deleted file mode 100644 index a566cc55bfe8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationMetadataDisplay(Model): - """The object that describes the operations. - - :param provider: Friendly name of the resource provider - :type provider: str - :param resource: Resource type on which the operation is performed. - :type resource: str - :param operation: Operation type: read, write, delete, listKeys/action, - etc. - :type operation: str - :param description: Friendly name of the operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - super(OperationMetadataDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_paged.py deleted file mode 100644 index f0fa25a37bed..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationMetadataPaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationMetadata ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationMetadata]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationMetadataPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_py3.py deleted file mode 100644 index c1f8e2997f51..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationMetadata(Model): - """The REST API operation supported by DevTestLab ResourceProvider. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: The object that describes the operations - :type display: ~azure.mgmt.devtestlabs.models.OperationMetadataDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationMetadataDisplay'}, - } - - def __init__(self, *, name: str=None, display=None, **kwargs) -> None: - super(OperationMetadata, self).__init__(**kwargs) - self.name = name - self.display = display diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result.py deleted file mode 100644 index 90f43aa80f9f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationResult(Model): - """An Operation Result. - - :param status: The operation status. - :type status: str - :param status_code: The status code for the operation. Possible values - include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', - 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', - 'PartialContent', 'MultipleChoices', 'MovedPermanently', 'Redirect', - 'SeeOther', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', - 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', - 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', - 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', - 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', - 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', - 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', - 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', - 'HttpVersionNotSupported' - :type status_code: str or ~azure.mgmt.devtestlabs.models.HttpStatusCode - :param error: Error details for the operation in case of a failure. - :type error: ~azure.mgmt.devtestlabs.models.OperationError - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'status_code': {'key': 'statusCode', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'OperationError'}, - } - - def __init__(self, **kwargs): - super(OperationResult, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.status_code = kwargs.get('status_code', None) - self.error = kwargs.get('error', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result_py3.py deleted file mode 100644 index cb371c521fb0..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationResult(Model): - """An Operation Result. - - :param status: The operation status. - :type status: str - :param status_code: The status code for the operation. Possible values - include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', - 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', - 'PartialContent', 'MultipleChoices', 'MovedPermanently', 'Redirect', - 'SeeOther', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', - 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', - 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', - 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', - 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', - 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', - 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', - 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', - 'HttpVersionNotSupported' - :type status_code: str or ~azure.mgmt.devtestlabs.models.HttpStatusCode - :param error: Error details for the operation in case of a failure. - :type error: ~azure.mgmt.devtestlabs.models.OperationError - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'status_code': {'key': 'statusCode', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'OperationError'}, - } - - def __init__(self, *, status: str=None, status_code=None, error=None, **kwargs) -> None: - super(OperationResult, self).__init__(**kwargs) - self.status = status - self.status_code = status_code - self.error = error diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info.py deleted file mode 100644 index 6e1972e6eace..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ParameterInfo(Model): - """Information about an artifact's parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ParameterInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info_py3.py deleted file mode 100644 index f35b39ef3fe4..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ParameterInfo(Model): - """Information about an artifact's parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: - super(ParameterInfo, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info.py deleted file mode 100644 index a671306eac1c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ParametersValueFileInfo(Model): - """A file containing a set of parameter values for an ARM template. - - :param file_name: File name. - :type file_name: str - :param parameters_value_info: Contents of the file. - :type parameters_value_info: object - """ - - _attribute_map = { - 'file_name': {'key': 'fileName', 'type': 'str'}, - 'parameters_value_info': {'key': 'parametersValueInfo', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ParametersValueFileInfo, self).__init__(**kwargs) - self.file_name = kwargs.get('file_name', None) - self.parameters_value_info = kwargs.get('parameters_value_info', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info_py3.py deleted file mode 100644 index fcbc00df3f23..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ParametersValueFileInfo(Model): - """A file containing a set of parameter values for an ARM template. - - :param file_name: File name. - :type file_name: str - :param parameters_value_info: Contents of the file. - :type parameters_value_info: object - """ - - _attribute_map = { - 'file_name': {'key': 'fileName', 'type': 'str'}, - 'parameters_value_info': {'key': 'parametersValueInfo', 'type': 'object'}, - } - - def __init__(self, *, file_name: str=None, parameters_value_info=None, **kwargs) -> None: - super(ParametersValueFileInfo, self).__init__(**kwargs) - self.file_name = file_name - self.parameters_value_info = parameters_value_info diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties.py deleted file mode 100644 index 73de17d9ee24..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PercentageCostThresholdProperties(Model): - """Properties of a percentage cost threshold. - - :param threshold_value: The cost threshold value. - :type threshold_value: float - """ - - _attribute_map = { - 'threshold_value': {'key': 'thresholdValue', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(PercentageCostThresholdProperties, self).__init__(**kwargs) - self.threshold_value = kwargs.get('threshold_value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties_py3.py deleted file mode 100644 index 22ae6e7d274c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PercentageCostThresholdProperties(Model): - """Properties of a percentage cost threshold. - - :param threshold_value: The cost threshold value. - :type threshold_value: float - """ - - _attribute_map = { - 'threshold_value': {'key': 'thresholdValue', 'type': 'float'}, - } - - def __init__(self, *, threshold_value: float=None, **kwargs) -> None: - super(PercentageCostThresholdProperties, self).__init__(**kwargs) - self.threshold_value = threshold_value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy.py deleted file mode 100644 index 96719fffb5d7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Policy(Resource): - """A Policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the policy. - :type description: str - :param status: The status of the policy. Possible values include: - 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus - :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, - MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', - 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', - 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', - 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' - :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName - :param fact_data: The fact data of the policy. - :type fact_data: str - :param threshold: The threshold of the policy (i.e. a number for - MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). - :type threshold: str - :param evaluator_type: The evaluator type of the policy (i.e. - AllowedValuesPolicy, MaxValuePolicy). Possible values include: - 'AllowedValuesPolicy', 'MaxValuePolicy' - :type evaluator_type: str or - ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType - :ivar created_date: The creation date of the policy. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'fact_name': {'key': 'properties.factName', 'type': 'str'}, - 'fact_data': {'key': 'properties.factData', 'type': 'str'}, - 'threshold': {'key': 'properties.threshold', 'type': 'str'}, - 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Policy, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.status = kwargs.get('status', None) - self.fact_name = kwargs.get('fact_name', None) - self.fact_data = kwargs.get('fact_data', None) - self.threshold = kwargs.get('threshold', None) - self.evaluator_type = kwargs.get('evaluator_type', None) - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment.py deleted file mode 100644 index 4d240945e5a7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class PolicyFragment(UpdateResource): - """A Policy. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the policy. - :type description: str - :param status: The status of the policy. Possible values include: - 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus - :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, - MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', - 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', - 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', - 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' - :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName - :param fact_data: The fact data of the policy. - :type fact_data: str - :param threshold: The threshold of the policy (i.e. a number for - MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). - :type threshold: str - :param evaluator_type: The evaluator type of the policy (i.e. - AllowedValuesPolicy, MaxValuePolicy). Possible values include: - 'AllowedValuesPolicy', 'MaxValuePolicy' - :type evaluator_type: str or - ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'fact_name': {'key': 'properties.factName', 'type': 'str'}, - 'fact_data': {'key': 'properties.factData', 'type': 'str'}, - 'threshold': {'key': 'properties.threshold', 'type': 'str'}, - 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PolicyFragment, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.status = kwargs.get('status', None) - self.fact_name = kwargs.get('fact_name', None) - self.fact_data = kwargs.get('fact_data', None) - self.threshold = kwargs.get('threshold', None) - self.evaluator_type = kwargs.get('evaluator_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment_py3.py deleted file mode 100644 index b10648b0cdc7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class PolicyFragment(UpdateResource): - """A Policy. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the policy. - :type description: str - :param status: The status of the policy. Possible values include: - 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus - :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, - MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', - 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', - 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', - 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' - :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName - :param fact_data: The fact data of the policy. - :type fact_data: str - :param threshold: The threshold of the policy (i.e. a number for - MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). - :type threshold: str - :param evaluator_type: The evaluator type of the policy (i.e. - AllowedValuesPolicy, MaxValuePolicy). Possible values include: - 'AllowedValuesPolicy', 'MaxValuePolicy' - :type evaluator_type: str or - ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'fact_name': {'key': 'properties.factName', 'type': 'str'}, - 'fact_data': {'key': 'properties.factData', 'type': 'str'}, - 'threshold': {'key': 'properties.threshold', 'type': 'str'}, - 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, - } - - def __init__(self, *, tags=None, description: str=None, status=None, fact_name=None, fact_data: str=None, threshold: str=None, evaluator_type=None, **kwargs) -> None: - super(PolicyFragment, self).__init__(tags=tags, **kwargs) - self.description = description - self.status = status - self.fact_name = fact_name - self.fact_data = fact_data - self.threshold = threshold - self.evaluator_type = evaluator_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_paged.py deleted file mode 100644 index 6ef7f073726e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class PolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`Policy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Policy]'} - } - - def __init__(self, *args, **kwargs): - - super(PolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_py3.py deleted file mode 100644 index 1bfd40ab2402..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Policy(Resource): - """A Policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the policy. - :type description: str - :param status: The status of the policy. Possible values include: - 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus - :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, - MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', - 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', - 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', - 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' - :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName - :param fact_data: The fact data of the policy. - :type fact_data: str - :param threshold: The threshold of the policy (i.e. a number for - MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). - :type threshold: str - :param evaluator_type: The evaluator type of the policy (i.e. - AllowedValuesPolicy, MaxValuePolicy). Possible values include: - 'AllowedValuesPolicy', 'MaxValuePolicy' - :type evaluator_type: str or - ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType - :ivar created_date: The creation date of the policy. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'fact_name': {'key': 'properties.factName', 'type': 'str'}, - 'fact_data': {'key': 'properties.factData', 'type': 'str'}, - 'threshold': {'key': 'properties.threshold', 'type': 'str'}, - 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, description: str=None, status=None, fact_name=None, fact_data: str=None, threshold: str=None, evaluator_type=None, **kwargs) -> None: - super(Policy, self).__init__(location=location, tags=tags, **kwargs) - self.description = description - self.status = status - self.fact_name = fact_name - self.fact_data = fact_data - self.threshold = threshold - self.evaluator_type = evaluator_type - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result.py deleted file mode 100644 index 3dc1698dc354..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicySetResult(Model): - """Result of a policy set evaluation. - - :param has_error: A value indicating whether this policy set evaluation - has discovered violations. - :type has_error: bool - :param policy_violations: The list of policy violations. - :type policy_violations: - list[~azure.mgmt.devtestlabs.models.PolicyViolation] - """ - - _attribute_map = { - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'policy_violations': {'key': 'policyViolations', 'type': '[PolicyViolation]'}, - } - - def __init__(self, **kwargs): - super(PolicySetResult, self).__init__(**kwargs) - self.has_error = kwargs.get('has_error', None) - self.policy_violations = kwargs.get('policy_violations', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result_py3.py deleted file mode 100644 index 5368647ec498..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicySetResult(Model): - """Result of a policy set evaluation. - - :param has_error: A value indicating whether this policy set evaluation - has discovered violations. - :type has_error: bool - :param policy_violations: The list of policy violations. - :type policy_violations: - list[~azure.mgmt.devtestlabs.models.PolicyViolation] - """ - - _attribute_map = { - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'policy_violations': {'key': 'policyViolations', 'type': '[PolicyViolation]'}, - } - - def __init__(self, *, has_error: bool=None, policy_violations=None, **kwargs) -> None: - super(PolicySetResult, self).__init__(**kwargs) - self.has_error = has_error - self.policy_violations = policy_violations diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation.py deleted file mode 100644 index b8404db70da6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicyViolation(Model): - """Policy violation. - - :param code: The code of the policy violation. - :type code: str - :param message: The message of the policy violation. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PolicyViolation, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation_py3.py deleted file mode 100644 index 8f33f97afeed..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicyViolation(Model): - """Policy violation. - - :param code: The code of the policy violation. - :type code: str - :param message: The message of the policy violation. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: - super(PolicyViolation, self).__init__(**kwargs) - self.code = code - self.message = message diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port.py deleted file mode 100644 index 794610b68871..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Port(Model): - """Properties of a network port. - - :param transport_protocol: Protocol type of the port. Possible values - include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param backend_port: Backend port of the target virtual machine. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(Port, self).__init__(**kwargs) - self.transport_protocol = kwargs.get('transport_protocol', None) - self.backend_port = kwargs.get('backend_port', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment.py deleted file mode 100644 index 60e28efa9dd8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PortFragment(Model): - """Properties of a network port. - - :param transport_protocol: Protocol type of the port. Possible values - include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param backend_port: Backend port of the target virtual machine. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(PortFragment, self).__init__(**kwargs) - self.transport_protocol = kwargs.get('transport_protocol', None) - self.backend_port = kwargs.get('backend_port', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment_py3.py deleted file mode 100644 index dd39e446c5ff..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PortFragment(Model): - """Properties of a network port. - - :param transport_protocol: Protocol type of the port. Possible values - include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param backend_port: Backend port of the target virtual machine. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, *, transport_protocol=None, backend_port: int=None, **kwargs) -> None: - super(PortFragment, self).__init__(**kwargs) - self.transport_protocol = transport_protocol - self.backend_port = backend_port diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_py3.py deleted file mode 100644 index c4b7645a0a18..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Port(Model): - """Properties of a network port. - - :param transport_protocol: Protocol type of the port. Possible values - include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param backend_port: Backend port of the target virtual machine. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, *, transport_protocol=None, backend_port: int=None, **kwargs) -> None: - super(Port, self).__init__(**kwargs) - self.transport_protocol = transport_protocol - self.backend_port = backend_port diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection.py deleted file mode 100644 index 71926d62a621..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RdpConnection(Model): - """Represents a .rdp file. - - :param contents: The contents of the .rdp file - :type contents: str - """ - - _attribute_map = { - 'contents': {'key': 'contents', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RdpConnection, self).__init__(**kwargs) - self.contents = kwargs.get('contents', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection_py3.py deleted file mode 100644 index 3f92de164fea..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RdpConnection(Model): - """Represents a .rdp file. - - :param contents: The contents of the .rdp file - :type contents: str - """ - - _attribute_map = { - 'contents': {'key': 'contents', 'type': 'str'}, - } - - def __init__(self, *, contents: str=None, **kwargs) -> None: - super(RdpConnection, self).__init__(**kwargs) - self.contents = contents diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties.py deleted file mode 100644 index 13725ea5e306..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResizeLabVirtualMachineProperties(Model): - """Request body for resizing a virtual machine. - - :param size: Specifies the size of the virtual machine. - :type size: str - """ - - _attribute_map = { - 'size': {'key': 'size', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResizeLabVirtualMachineProperties, self).__init__(**kwargs) - self.size = kwargs.get('size', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties_py3.py deleted file mode 100644 index 266b19149f7a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResizeLabVirtualMachineProperties(Model): - """Request body for resizing a virtual machine. - - :param size: Specifies the size of the virtual machine. - :type size: str - """ - - _attribute_map = { - 'size': {'key': 'size', 'type': 'str'}, - } - - def __init__(self, *, size: str=None, **kwargs) -> None: - super(ResizeLabVirtualMachineProperties, self).__init__(**kwargs) - self.size = size diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource.py deleted file mode 100644 index f25b57698413..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """An Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource_py3.py deleted file mode 100644 index e59df581aa79..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """An Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties.py deleted file mode 100644 index 210f4a7b2eca..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RetargetScheduleProperties(Model): - """Properties for retargeting a virtual machine schedule. - - :param current_resource_id: The resource Id of the virtual machine on - which the schedule operates - :type current_resource_id: str - :param target_resource_id: The resource Id of the virtual machine that the - schedule should be retargeted to - :type target_resource_id: str - """ - - _attribute_map = { - 'current_resource_id': {'key': 'currentResourceId', 'type': 'str'}, - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RetargetScheduleProperties, self).__init__(**kwargs) - self.current_resource_id = kwargs.get('current_resource_id', None) - self.target_resource_id = kwargs.get('target_resource_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties_py3.py deleted file mode 100644 index debd7258fb28..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RetargetScheduleProperties(Model): - """Properties for retargeting a virtual machine schedule. - - :param current_resource_id: The resource Id of the virtual machine on - which the schedule operates - :type current_resource_id: str - :param target_resource_id: The resource Id of the virtual machine that the - schedule should be retargeted to - :type target_resource_id: str - """ - - _attribute_map = { - 'current_resource_id': {'key': 'currentResourceId', 'type': 'str'}, - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__(self, *, current_resource_id: str=None, target_resource_id: str=None, **kwargs) -> None: - super(RetargetScheduleProperties, self).__init__(**kwargs) - self.current_resource_id = current_resource_id - self.target_resource_id = target_resource_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule.py deleted file mode 100644 index a0c09919fa48..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Schedule(Resource): - """A schedule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettings - :ivar created_date: The creation date of the schedule. - :vartype created_date: datetime - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Schedule, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.task_type = kwargs.get('task_type', None) - self.weekly_recurrence = kwargs.get('weekly_recurrence', None) - self.daily_recurrence = kwargs.get('daily_recurrence', None) - self.hourly_recurrence = kwargs.get('hourly_recurrence', None) - self.time_zone_id = kwargs.get('time_zone_id', None) - self.notification_settings = kwargs.get('notification_settings', None) - self.created_date = None - self.target_resource_id = kwargs.get('target_resource_id', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter.py deleted file mode 100644 index 1eced41c432d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ScheduleCreationParameter(Model): - """Properties for creating a schedule. - - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettings - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ScheduleCreationParameter, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.task_type = kwargs.get('task_type', None) - self.weekly_recurrence = kwargs.get('weekly_recurrence', None) - self.daily_recurrence = kwargs.get('daily_recurrence', None) - self.hourly_recurrence = kwargs.get('hourly_recurrence', None) - self.time_zone_id = kwargs.get('time_zone_id', None) - self.notification_settings = kwargs.get('notification_settings', None) - self.target_resource_id = kwargs.get('target_resource_id', None) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment.py deleted file mode 100644 index e3f67d9d59bf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ScheduleCreationParameterFragment(Model): - """Properties for creating a schedule. - - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: - ~azure.mgmt.devtestlabs.models.WeekDetailsFragment - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: - ~azure.mgmt.devtestlabs.models.HourDetailsFragment - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ScheduleCreationParameterFragment, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.task_type = kwargs.get('task_type', None) - self.weekly_recurrence = kwargs.get('weekly_recurrence', None) - self.daily_recurrence = kwargs.get('daily_recurrence', None) - self.hourly_recurrence = kwargs.get('hourly_recurrence', None) - self.time_zone_id = kwargs.get('time_zone_id', None) - self.notification_settings = kwargs.get('notification_settings', None) - self.target_resource_id = kwargs.get('target_resource_id', None) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment_py3.py deleted file mode 100644 index 47e9ece35bfb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ScheduleCreationParameterFragment(Model): - """Properties for creating a schedule. - - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: - ~azure.mgmt.devtestlabs.models.WeekDetailsFragment - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: - ~azure.mgmt.devtestlabs.models.HourDetailsFragment - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: - super(ScheduleCreationParameterFragment, self).__init__(**kwargs) - self.status = status - self.task_type = task_type - self.weekly_recurrence = weekly_recurrence - self.daily_recurrence = daily_recurrence - self.hourly_recurrence = hourly_recurrence - self.time_zone_id = time_zone_id - self.notification_settings = notification_settings - self.target_resource_id = target_resource_id - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_py3.py deleted file mode 100644 index 8254f67c85be..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_py3.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ScheduleCreationParameter(Model): - """Properties for creating a schedule. - - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettings - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: - super(ScheduleCreationParameter, self).__init__(**kwargs) - self.status = status - self.task_type = task_type - self.weekly_recurrence = weekly_recurrence - self.daily_recurrence = daily_recurrence - self.hourly_recurrence = hourly_recurrence - self.time_zone_id = time_zone_id - self.notification_settings = notification_settings - self.target_resource_id = target_resource_id - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment.py deleted file mode 100644 index 17cb84a52572..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class ScheduleFragment(UpdateResource): - """A schedule. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: - ~azure.mgmt.devtestlabs.models.WeekDetailsFragment - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: - ~azure.mgmt.devtestlabs.models.HourDetailsFragment - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ScheduleFragment, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.task_type = kwargs.get('task_type', None) - self.weekly_recurrence = kwargs.get('weekly_recurrence', None) - self.daily_recurrence = kwargs.get('daily_recurrence', None) - self.hourly_recurrence = kwargs.get('hourly_recurrence', None) - self.time_zone_id = kwargs.get('time_zone_id', None) - self.notification_settings = kwargs.get('notification_settings', None) - self.target_resource_id = kwargs.get('target_resource_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment_py3.py deleted file mode 100644 index a51222b2406e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class ScheduleFragment(UpdateResource): - """A schedule. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: - ~azure.mgmt.devtestlabs.models.WeekDetailsFragment - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: - ~azure.mgmt.devtestlabs.models.HourDetailsFragment - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - } - - def __init__(self, *, tags=None, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, **kwargs) -> None: - super(ScheduleFragment, self).__init__(tags=tags, **kwargs) - self.status = status - self.task_type = task_type - self.weekly_recurrence = weekly_recurrence - self.daily_recurrence = daily_recurrence - self.hourly_recurrence = hourly_recurrence - self.time_zone_id = time_zone_id - self.notification_settings = notification_settings - self.target_resource_id = target_resource_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_paged.py deleted file mode 100644 index 1aa4946ff51e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SchedulePaged(Paged): - """ - A paging container for iterating over a list of :class:`Schedule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Schedule]'} - } - - def __init__(self, *args, **kwargs): - - super(SchedulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_py3.py deleted file mode 100644 index efd16216ef6e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_py3.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Schedule(Resource): - """A schedule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettings - :ivar created_date: The creation date of the schedule. - :vartype created_date: datetime - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, **kwargs) -> None: - super(Schedule, self).__init__(location=location, tags=tags, **kwargs) - self.status = status - self.task_type = task_type - self.weekly_recurrence = weekly_recurrence - self.daily_recurrence = daily_recurrence - self.hourly_recurrence = hourly_recurrence - self.time_zone_id = time_zone_id - self.notification_settings = notification_settings - self.created_date = None - self.target_resource_id = target_resource_id - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret.py deleted file mode 100644 index ae1048a9e9ec..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Secret(Resource): - """A secret. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param value: The value of the secret for secret creation. - :type value: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Secret, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment.py deleted file mode 100644 index 06df551c944b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class SecretFragment(UpdateResource): - """A secret. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param value: The value of the secret for secret creation. - :type value: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SecretFragment, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment_py3.py deleted file mode 100644 index 64907637295e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class SecretFragment(UpdateResource): - """A secret. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param value: The value of the secret for secret creation. - :type value: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - } - - def __init__(self, *, tags=None, value: str=None, **kwargs) -> None: - super(SecretFragment, self).__init__(tags=tags, **kwargs) - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_paged.py deleted file mode 100644 index 1c6a8f295064..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SecretPaged(Paged): - """ - A paging container for iterating over a list of :class:`Secret ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Secret]'} - } - - def __init__(self, *args, **kwargs): - - super(SecretPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_py3.py deleted file mode 100644 index 16b45cb8ccde..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Secret(Resource): - """A secret. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param value: The value of the secret for secret creation. - :type value: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, value: str=None, **kwargs) -> None: - super(Secret, self).__init__(location=location, tags=tags, **kwargs) - self.value = value - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric.py deleted file mode 100644 index e8f46ff06337..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ServiceFabric(Resource): - """A Service Fabric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param external_service_fabric_id: The backing service fabric resource's - id - :type external_service_fabric_id: str - :param environment_id: The resource id of the environment under which the - service fabric resource is present - :type environment_id: str - :ivar applicable_schedule: The applicable schedule for the virtual - machine. - :vartype applicable_schedule: - ~azure.mgmt.devtestlabs.models.ApplicableSchedule - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'applicable_schedule': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceFabric, self).__init__(**kwargs) - self.external_service_fabric_id = kwargs.get('external_service_fabric_id', None) - self.environment_id = kwargs.get('environment_id', None) - self.applicable_schedule = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment.py deleted file mode 100644 index 8feb8f2b0dcd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class ServiceFabricFragment(UpdateResource): - """A Service Fabric. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param external_service_fabric_id: The backing service fabric resource's - id - :type external_service_fabric_id: str - :param environment_id: The resource id of the environment under which the - service fabric resource is present - :type environment_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceFabricFragment, self).__init__(**kwargs) - self.external_service_fabric_id = kwargs.get('external_service_fabric_id', None) - self.environment_id = kwargs.get('environment_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment_py3.py deleted file mode 100644 index a1471c5984ea..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class ServiceFabricFragment(UpdateResource): - """A Service Fabric. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param external_service_fabric_id: The backing service fabric resource's - id - :type external_service_fabric_id: str - :param environment_id: The resource id of the environment under which the - service fabric resource is present - :type environment_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - } - - def __init__(self, *, tags=None, external_service_fabric_id: str=None, environment_id: str=None, **kwargs) -> None: - super(ServiceFabricFragment, self).__init__(tags=tags, **kwargs) - self.external_service_fabric_id = external_service_fabric_id - self.environment_id = environment_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_paged.py deleted file mode 100644 index 7de95722931e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServiceFabricPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServiceFabric ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServiceFabric]'} - } - - def __init__(self, *args, **kwargs): - - super(ServiceFabricPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_py3.py deleted file mode 100644 index 50cf5f715bf4..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ServiceFabric(Resource): - """A Service Fabric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param external_service_fabric_id: The backing service fabric resource's - id - :type external_service_fabric_id: str - :param environment_id: The resource id of the environment under which the - service fabric resource is present - :type environment_id: str - :ivar applicable_schedule: The applicable schedule for the virtual - machine. - :vartype applicable_schedule: - ~azure.mgmt.devtestlabs.models.ApplicableSchedule - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'applicable_schedule': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, external_service_fabric_id: str=None, environment_id: str=None, **kwargs) -> None: - super(ServiceFabric, self).__init__(location=location, tags=tags, **kwargs) - self.external_service_fabric_id = external_service_fabric_id - self.environment_id = environment_id - self.applicable_schedule = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner.py deleted file mode 100644 index 38d8100572ac..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ServiceRunner(Resource): - """A container for a managed identity to execute DevTest lab services. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the resource. - :type identity: ~azure.mgmt.devtestlabs.models.IdentityProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, - } - - def __init__(self, **kwargs): - super(ServiceRunner, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_paged.py deleted file mode 100644 index c5f8658f70e1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServiceRunnerPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServiceRunner ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServiceRunner]'} - } - - def __init__(self, *args, **kwargs): - - super(ServiceRunnerPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_py3.py deleted file mode 100644 index 5afa18026e0c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ServiceRunner(Resource): - """A container for a managed identity to execute DevTest lab services. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the resource. - :type identity: ~azure.mgmt.devtestlabs.models.IdentityProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, - } - - def __init__(self, *, location: str=None, tags=None, identity=None, **kwargs) -> None: - super(ServiceRunner, self).__init__(location=location, tags=tags, **kwargs) - self.identity = identity diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration.py deleted file mode 100644 index c372a21093bd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SharedPublicIpAddressConfiguration(Model): - """Properties of a virtual machine that determine how it is connected to a - load balancer. - - :param inbound_nat_rules: The incoming NAT rules - :type inbound_nat_rules: - list[~azure.mgmt.devtestlabs.models.InboundNatRule] - """ - - _attribute_map = { - 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRule]'}, - } - - def __init__(self, **kwargs): - super(SharedPublicIpAddressConfiguration, self).__init__(**kwargs) - self.inbound_nat_rules = kwargs.get('inbound_nat_rules', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment.py deleted file mode 100644 index 48eef7b014cc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SharedPublicIpAddressConfigurationFragment(Model): - """Properties of a virtual machine that determine how it is connected to a - load balancer. - - :param inbound_nat_rules: The incoming NAT rules - :type inbound_nat_rules: - list[~azure.mgmt.devtestlabs.models.InboundNatRuleFragment] - """ - - _attribute_map = { - 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRuleFragment]'}, - } - - def __init__(self, **kwargs): - super(SharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) - self.inbound_nat_rules = kwargs.get('inbound_nat_rules', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment_py3.py deleted file mode 100644 index d2121254c806..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SharedPublicIpAddressConfigurationFragment(Model): - """Properties of a virtual machine that determine how it is connected to a - load balancer. - - :param inbound_nat_rules: The incoming NAT rules - :type inbound_nat_rules: - list[~azure.mgmt.devtestlabs.models.InboundNatRuleFragment] - """ - - _attribute_map = { - 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRuleFragment]'}, - } - - def __init__(self, *, inbound_nat_rules=None, **kwargs) -> None: - super(SharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) - self.inbound_nat_rules = inbound_nat_rules diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_py3.py deleted file mode 100644 index 13c9209e5140..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SharedPublicIpAddressConfiguration(Model): - """Properties of a virtual machine that determine how it is connected to a - load balancer. - - :param inbound_nat_rules: The incoming NAT rules - :type inbound_nat_rules: - list[~azure.mgmt.devtestlabs.models.InboundNatRule] - """ - - _attribute_map = { - 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRule]'}, - } - - def __init__(self, *, inbound_nat_rules=None, **kwargs) -> None: - super(SharedPublicIpAddressConfiguration, self).__init__(**kwargs) - self.inbound_nat_rules = inbound_nat_rules diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content.py deleted file mode 100644 index 00b760315ab8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ShutdownNotificationContent(Model): - """The contents of a shutdown notification. Webhooks can use this type to - deserialize the request body when they get notified of an imminent - shutdown. - - :param skip_url: The URL to skip auto-shutdown. - :type skip_url: str - :param delay_url60: The URL to delay shutdown by 60 minutes. - :type delay_url60: str - :param delay_url120: The URL to delay shutdown by 2 hours. - :type delay_url120: str - :param vm_name: The virtual machine to be shut down. - :type vm_name: str - :param guid: The GUID for the virtual machine to be shut down. - :type guid: str - :param owner: The owner of the virtual machine. - :type owner: str - :param vm_url: The URL of the virtual machine. - :type vm_url: str - :param minutes_until_shutdown: Minutes remaining until shutdown - :type minutes_until_shutdown: str - :param event_type: The event for which a notification will be sent. - :type event_type: str - :param text: The text for the notification. - :type text: str - :param subscription_id: The subscription ID for the schedule. - :type subscription_id: str - :param resource_group_name: The resource group name for the schedule. - :type resource_group_name: str - :param lab_name: The lab for the schedule. - :type lab_name: str - """ - - _attribute_map = { - 'skip_url': {'key': 'skipUrl', 'type': 'str'}, - 'delay_url60': {'key': 'delayUrl60', 'type': 'str'}, - 'delay_url120': {'key': 'delayUrl120', 'type': 'str'}, - 'vm_name': {'key': 'vmName', 'type': 'str'}, - 'guid': {'key': 'guid', 'type': 'str'}, - 'owner': {'key': 'owner', 'type': 'str'}, - 'vm_url': {'key': 'vmUrl', 'type': 'str'}, - 'minutes_until_shutdown': {'key': 'minutesUntilShutdown', 'type': 'str'}, - 'event_type': {'key': 'eventType', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, - 'lab_name': {'key': 'labName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ShutdownNotificationContent, self).__init__(**kwargs) - self.skip_url = kwargs.get('skip_url', None) - self.delay_url60 = kwargs.get('delay_url60', None) - self.delay_url120 = kwargs.get('delay_url120', None) - self.vm_name = kwargs.get('vm_name', None) - self.guid = kwargs.get('guid', None) - self.owner = kwargs.get('owner', None) - self.vm_url = kwargs.get('vm_url', None) - self.minutes_until_shutdown = kwargs.get('minutes_until_shutdown', None) - self.event_type = kwargs.get('event_type', None) - self.text = kwargs.get('text', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group_name = kwargs.get('resource_group_name', None) - self.lab_name = kwargs.get('lab_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content_py3.py deleted file mode 100644 index 47242c6a1816..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ShutdownNotificationContent(Model): - """The contents of a shutdown notification. Webhooks can use this type to - deserialize the request body when they get notified of an imminent - shutdown. - - :param skip_url: The URL to skip auto-shutdown. - :type skip_url: str - :param delay_url60: The URL to delay shutdown by 60 minutes. - :type delay_url60: str - :param delay_url120: The URL to delay shutdown by 2 hours. - :type delay_url120: str - :param vm_name: The virtual machine to be shut down. - :type vm_name: str - :param guid: The GUID for the virtual machine to be shut down. - :type guid: str - :param owner: The owner of the virtual machine. - :type owner: str - :param vm_url: The URL of the virtual machine. - :type vm_url: str - :param minutes_until_shutdown: Minutes remaining until shutdown - :type minutes_until_shutdown: str - :param event_type: The event for which a notification will be sent. - :type event_type: str - :param text: The text for the notification. - :type text: str - :param subscription_id: The subscription ID for the schedule. - :type subscription_id: str - :param resource_group_name: The resource group name for the schedule. - :type resource_group_name: str - :param lab_name: The lab for the schedule. - :type lab_name: str - """ - - _attribute_map = { - 'skip_url': {'key': 'skipUrl', 'type': 'str'}, - 'delay_url60': {'key': 'delayUrl60', 'type': 'str'}, - 'delay_url120': {'key': 'delayUrl120', 'type': 'str'}, - 'vm_name': {'key': 'vmName', 'type': 'str'}, - 'guid': {'key': 'guid', 'type': 'str'}, - 'owner': {'key': 'owner', 'type': 'str'}, - 'vm_url': {'key': 'vmUrl', 'type': 'str'}, - 'minutes_until_shutdown': {'key': 'minutesUntilShutdown', 'type': 'str'}, - 'event_type': {'key': 'eventType', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, - 'lab_name': {'key': 'labName', 'type': 'str'}, - } - - def __init__(self, *, skip_url: str=None, delay_url60: str=None, delay_url120: str=None, vm_name: str=None, guid: str=None, owner: str=None, vm_url: str=None, minutes_until_shutdown: str=None, event_type: str=None, text: str=None, subscription_id: str=None, resource_group_name: str=None, lab_name: str=None, **kwargs) -> None: - super(ShutdownNotificationContent, self).__init__(**kwargs) - self.skip_url = skip_url - self.delay_url60 = delay_url60 - self.delay_url120 = delay_url120 - self.vm_name = vm_name - self.guid = guid - self.owner = owner - self.vm_url = vm_url - self.minutes_until_shutdown = minutes_until_shutdown - self.event_type = event_type - self.text = text - self.subscription_id = subscription_id - self.resource_group_name = resource_group_name - self.lab_name = lab_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet.py deleted file mode 100644 index 520ea0b84c0b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Subnet(Model): - """Subnet information. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name of the subnet as seen in the lab. - :type lab_subnet_name: str - :param allow_public_ip: The permission policy of the subnet for allowing - public IP addresses (i.e. Allow, Deny)). Possible values include: - 'Default', 'Deny', 'Allow' - :type allow_public_ip: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Subnet, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.allow_public_ip = kwargs.get('allow_public_ip', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment.py deleted file mode 100644 index db484aef5efc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetFragment(Model): - """Subnet information. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name of the subnet as seen in the lab. - :type lab_subnet_name: str - :param allow_public_ip: The permission policy of the subnet for allowing - public IP addresses (i.e. Allow, Deny)). Possible values include: - 'Default', 'Deny', 'Allow' - :type allow_public_ip: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubnetFragment, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.allow_public_ip = kwargs.get('allow_public_ip', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment_py3.py deleted file mode 100644 index bdca8f51fc58..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetFragment(Model): - """Subnet information. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name of the subnet as seen in the lab. - :type lab_subnet_name: str - :param allow_public_ip: The permission policy of the subnet for allowing - public IP addresses (i.e. Allow, Deny)). Possible values include: - 'Default', 'Deny', 'Allow' - :type allow_public_ip: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, allow_public_ip=None, **kwargs) -> None: - super(SubnetFragment, self).__init__(**kwargs) - self.resource_id = resource_id - self.lab_subnet_name = lab_subnet_name - self.allow_public_ip = allow_public_ip diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override.py deleted file mode 100644 index c091e516241d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetOverride(Model): - """Property overrides on a subnet of a virtual network. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name given to the subnet within the lab. - :type lab_subnet_name: str - :param use_in_vm_creation_permission: Indicates whether this subnet can be - used during virtual machine creation (i.e. Allow, Deny). Possible values - include: 'Default', 'Deny', 'Allow' - :type use_in_vm_creation_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param use_public_ip_address_permission: Indicates whether public IP - addresses can be assigned to virtual machines on this subnet (i.e. Allow, - Deny). Possible values include: 'Default', 'Deny', 'Allow' - :type use_public_ip_address_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param shared_public_ip_address_configuration: Properties that virtual - machines on this subnet will share. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfiguration - :param virtual_network_pool_name: The virtual network pool associated with - this subnet. - :type virtual_network_pool_name: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, - 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfiguration'}, - 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubnetOverride, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.use_in_vm_creation_permission = kwargs.get('use_in_vm_creation_permission', None) - self.use_public_ip_address_permission = kwargs.get('use_public_ip_address_permission', None) - self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) - self.virtual_network_pool_name = kwargs.get('virtual_network_pool_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment.py deleted file mode 100644 index 839368724e6a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetOverrideFragment(Model): - """Property overrides on a subnet of a virtual network. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name given to the subnet within the lab. - :type lab_subnet_name: str - :param use_in_vm_creation_permission: Indicates whether this subnet can be - used during virtual machine creation (i.e. Allow, Deny). Possible values - include: 'Default', 'Deny', 'Allow' - :type use_in_vm_creation_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param use_public_ip_address_permission: Indicates whether public IP - addresses can be assigned to virtual machines on this subnet (i.e. Allow, - Deny). Possible values include: 'Default', 'Deny', 'Allow' - :type use_public_ip_address_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param shared_public_ip_address_configuration: Properties that virtual - machines on this subnet will share. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfigurationFragment - :param virtual_network_pool_name: The virtual network pool associated with - this subnet. - :type virtual_network_pool_name: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, - 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfigurationFragment'}, - 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubnetOverrideFragment, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.use_in_vm_creation_permission = kwargs.get('use_in_vm_creation_permission', None) - self.use_public_ip_address_permission = kwargs.get('use_public_ip_address_permission', None) - self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) - self.virtual_network_pool_name = kwargs.get('virtual_network_pool_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment_py3.py deleted file mode 100644 index a48b90a27c65..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetOverrideFragment(Model): - """Property overrides on a subnet of a virtual network. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name given to the subnet within the lab. - :type lab_subnet_name: str - :param use_in_vm_creation_permission: Indicates whether this subnet can be - used during virtual machine creation (i.e. Allow, Deny). Possible values - include: 'Default', 'Deny', 'Allow' - :type use_in_vm_creation_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param use_public_ip_address_permission: Indicates whether public IP - addresses can be assigned to virtual machines on this subnet (i.e. Allow, - Deny). Possible values include: 'Default', 'Deny', 'Allow' - :type use_public_ip_address_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param shared_public_ip_address_configuration: Properties that virtual - machines on this subnet will share. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfigurationFragment - :param virtual_network_pool_name: The virtual network pool associated with - this subnet. - :type virtual_network_pool_name: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, - 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfigurationFragment'}, - 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, use_in_vm_creation_permission=None, use_public_ip_address_permission=None, shared_public_ip_address_configuration=None, virtual_network_pool_name: str=None, **kwargs) -> None: - super(SubnetOverrideFragment, self).__init__(**kwargs) - self.resource_id = resource_id - self.lab_subnet_name = lab_subnet_name - self.use_in_vm_creation_permission = use_in_vm_creation_permission - self.use_public_ip_address_permission = use_public_ip_address_permission - self.shared_public_ip_address_configuration = shared_public_ip_address_configuration - self.virtual_network_pool_name = virtual_network_pool_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_py3.py deleted file mode 100644 index 30ddcbe9a971..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetOverride(Model): - """Property overrides on a subnet of a virtual network. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name given to the subnet within the lab. - :type lab_subnet_name: str - :param use_in_vm_creation_permission: Indicates whether this subnet can be - used during virtual machine creation (i.e. Allow, Deny). Possible values - include: 'Default', 'Deny', 'Allow' - :type use_in_vm_creation_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param use_public_ip_address_permission: Indicates whether public IP - addresses can be assigned to virtual machines on this subnet (i.e. Allow, - Deny). Possible values include: 'Default', 'Deny', 'Allow' - :type use_public_ip_address_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param shared_public_ip_address_configuration: Properties that virtual - machines on this subnet will share. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfiguration - :param virtual_network_pool_name: The virtual network pool associated with - this subnet. - :type virtual_network_pool_name: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, - 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfiguration'}, - 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, use_in_vm_creation_permission=None, use_public_ip_address_permission=None, shared_public_ip_address_configuration=None, virtual_network_pool_name: str=None, **kwargs) -> None: - super(SubnetOverride, self).__init__(**kwargs) - self.resource_id = resource_id - self.lab_subnet_name = lab_subnet_name - self.use_in_vm_creation_permission = use_in_vm_creation_permission - self.use_public_ip_address_permission = use_public_ip_address_permission - self.shared_public_ip_address_configuration = shared_public_ip_address_configuration - self.virtual_network_pool_name = virtual_network_pool_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_py3.py deleted file mode 100644 index 6faba11229c2..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Subnet(Model): - """Subnet information. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name of the subnet as seen in the lab. - :type lab_subnet_name: str - :param allow_public_ip: The permission policy of the subnet for allowing - public IP addresses (i.e. Allow, Deny)). Possible values include: - 'Default', 'Deny', 'Allow' - :type allow_public_ip: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, allow_public_ip=None, **kwargs) -> None: - super(Subnet, self).__init__(**kwargs) - self.resource_id = resource_id - self.lab_subnet_name = lab_subnet_name - self.allow_public_ip = allow_public_ip diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration.py deleted file mode 100644 index c300efe3e12a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetSharedPublicIpAddressConfiguration(Model): - """Configuration for public IP address sharing. - - :param allowed_ports: Backend ports that virtual machines on this subnet - are allowed to expose - :type allowed_ports: list[~azure.mgmt.devtestlabs.models.Port] - """ - - _attribute_map = { - 'allowed_ports': {'key': 'allowedPorts', 'type': '[Port]'}, - } - - def __init__(self, **kwargs): - super(SubnetSharedPublicIpAddressConfiguration, self).__init__(**kwargs) - self.allowed_ports = kwargs.get('allowed_ports', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.py deleted file mode 100644 index 737aba0c3385..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetSharedPublicIpAddressConfigurationFragment(Model): - """Configuration for public IP address sharing. - - :param allowed_ports: Backend ports that virtual machines on this subnet - are allowed to expose - :type allowed_ports: list[~azure.mgmt.devtestlabs.models.PortFragment] - """ - - _attribute_map = { - 'allowed_ports': {'key': 'allowedPorts', 'type': '[PortFragment]'}, - } - - def __init__(self, **kwargs): - super(SubnetSharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) - self.allowed_ports = kwargs.get('allowed_ports', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment_py3.py deleted file mode 100644 index b108414e8db0..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetSharedPublicIpAddressConfigurationFragment(Model): - """Configuration for public IP address sharing. - - :param allowed_ports: Backend ports that virtual machines on this subnet - are allowed to expose - :type allowed_ports: list[~azure.mgmt.devtestlabs.models.PortFragment] - """ - - _attribute_map = { - 'allowed_ports': {'key': 'allowedPorts', 'type': '[PortFragment]'}, - } - - def __init__(self, *, allowed_ports=None, **kwargs) -> None: - super(SubnetSharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) - self.allowed_ports = allowed_ports diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_py3.py deleted file mode 100644 index b0149a863f64..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetSharedPublicIpAddressConfiguration(Model): - """Configuration for public IP address sharing. - - :param allowed_ports: Backend ports that virtual machines on this subnet - are allowed to expose - :type allowed_ports: list[~azure.mgmt.devtestlabs.models.Port] - """ - - _attribute_map = { - 'allowed_ports': {'key': 'allowedPorts', 'type': '[Port]'}, - } - - def __init__(self, *, allowed_ports=None, **kwargs) -> None: - super(SubnetSharedPublicIpAddressConfiguration, self).__init__(**kwargs) - self.allowed_ports = allowed_ports diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties.py deleted file mode 100644 index d6eca3dfd40e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TargetCostProperties(Model): - """Properties of a cost target. - - :param status: Target cost status. Possible values include: 'Enabled', - 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.TargetCostStatus - :param target: Lab target cost - :type target: int - :param cost_thresholds: Cost thresholds. - :type cost_thresholds: - list[~azure.mgmt.devtestlabs.models.CostThresholdProperties] - :param cycle_start_date_time: Reporting cycle start date. - :type cycle_start_date_time: datetime - :param cycle_end_date_time: Reporting cycle end date. - :type cycle_end_date_time: datetime - :param cycle_type: Reporting cycle type. Possible values include: - 'CalendarMonth', 'Custom' - :type cycle_type: str or ~azure.mgmt.devtestlabs.models.ReportingCycleType - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'int'}, - 'cost_thresholds': {'key': 'costThresholds', 'type': '[CostThresholdProperties]'}, - 'cycle_start_date_time': {'key': 'cycleStartDateTime', 'type': 'iso-8601'}, - 'cycle_end_date_time': {'key': 'cycleEndDateTime', 'type': 'iso-8601'}, - 'cycle_type': {'key': 'cycleType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TargetCostProperties, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.target = kwargs.get('target', None) - self.cost_thresholds = kwargs.get('cost_thresholds', None) - self.cycle_start_date_time = kwargs.get('cycle_start_date_time', None) - self.cycle_end_date_time = kwargs.get('cycle_end_date_time', None) - self.cycle_type = kwargs.get('cycle_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties_py3.py deleted file mode 100644 index 8e79d34b0ed9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TargetCostProperties(Model): - """Properties of a cost target. - - :param status: Target cost status. Possible values include: 'Enabled', - 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.TargetCostStatus - :param target: Lab target cost - :type target: int - :param cost_thresholds: Cost thresholds. - :type cost_thresholds: - list[~azure.mgmt.devtestlabs.models.CostThresholdProperties] - :param cycle_start_date_time: Reporting cycle start date. - :type cycle_start_date_time: datetime - :param cycle_end_date_time: Reporting cycle end date. - :type cycle_end_date_time: datetime - :param cycle_type: Reporting cycle type. Possible values include: - 'CalendarMonth', 'Custom' - :type cycle_type: str or ~azure.mgmt.devtestlabs.models.ReportingCycleType - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'int'}, - 'cost_thresholds': {'key': 'costThresholds', 'type': '[CostThresholdProperties]'}, - 'cycle_start_date_time': {'key': 'cycleStartDateTime', 'type': 'iso-8601'}, - 'cycle_end_date_time': {'key': 'cycleEndDateTime', 'type': 'iso-8601'}, - 'cycle_type': {'key': 'cycleType', 'type': 'str'}, - } - - def __init__(self, *, status=None, target: int=None, cost_thresholds=None, cycle_start_date_time=None, cycle_end_date_time=None, cycle_type=None, **kwargs) -> None: - super(TargetCostProperties, self).__init__(**kwargs) - self.status = status - self.target = target - self.cost_thresholds = cost_thresholds - self.cycle_start_date_time = cycle_start_date_time - self.cycle_end_date_time = cycle_end_date_time - self.cycle_type = cycle_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource.py deleted file mode 100644 index 4849be7f6102..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateResource(Model): - """Represents an update resource. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(UpdateResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource_py3.py deleted file mode 100644 index 62a3c23c2164..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateResource(Model): - """Represents an update resource. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(UpdateResource, self).__init__(**kwargs) - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user.py deleted file mode 100644 index 28099b85f900..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class User(Resource): - """Profile of a lab user. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the user. - :type identity: ~azure.mgmt.devtestlabs.models.UserIdentity - :param secret_store: The secret store of the user. - :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStore - :ivar created_date: The creation date of the user profile. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'properties.identity', 'type': 'UserIdentity'}, - 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStore'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(User, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.secret_store = kwargs.get('secret_store', None) - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment.py deleted file mode 100644 index cd9a685bdbbe..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class UserFragment(UpdateResource): - """Profile of a lab user. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the user. - :type identity: ~azure.mgmt.devtestlabs.models.UserIdentityFragment - :param secret_store: The secret store of the user. - :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStoreFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'properties.identity', 'type': 'UserIdentityFragment'}, - 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStoreFragment'}, - } - - def __init__(self, **kwargs): - super(UserFragment, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.secret_store = kwargs.get('secret_store', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment_py3.py deleted file mode 100644 index 357a81712e45..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class UserFragment(UpdateResource): - """Profile of a lab user. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the user. - :type identity: ~azure.mgmt.devtestlabs.models.UserIdentityFragment - :param secret_store: The secret store of the user. - :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStoreFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'properties.identity', 'type': 'UserIdentityFragment'}, - 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStoreFragment'}, - } - - def __init__(self, *, tags=None, identity=None, secret_store=None, **kwargs) -> None: - super(UserFragment, self).__init__(tags=tags, **kwargs) - self.identity = identity - self.secret_store = secret_store diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity.py deleted file mode 100644 index 557f65e2b82f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserIdentity(Model): - """Identity attributes of a lab user. - - :param principal_name: Set to the principal name / UPN of the client JWT - making the request. - :type principal_name: str - :param principal_id: Set to the principal Id of the client JWT making the - request. Service principal will not have the principal Id. - :type principal_id: str - :param tenant_id: Set to the tenant ID of the client JWT making the - request. - :type tenant_id: str - :param object_id: Set to the object Id of the client JWT making the - request. Not all users have object Id. For CSP (reseller) scenarios for - example, object Id is not available. - :type object_id: str - :param app_id: Set to the app Id of the client JWT making the request. - :type app_id: str - """ - - _attribute_map = { - 'principal_name': {'key': 'principalName', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserIdentity, self).__init__(**kwargs) - self.principal_name = kwargs.get('principal_name', None) - self.principal_id = kwargs.get('principal_id', None) - self.tenant_id = kwargs.get('tenant_id', None) - self.object_id = kwargs.get('object_id', None) - self.app_id = kwargs.get('app_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment.py deleted file mode 100644 index 0783b56f47b3..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserIdentityFragment(Model): - """Identity attributes of a lab user. - - :param principal_name: Set to the principal name / UPN of the client JWT - making the request. - :type principal_name: str - :param principal_id: Set to the principal Id of the client JWT making the - request. Service principal will not have the principal Id. - :type principal_id: str - :param tenant_id: Set to the tenant ID of the client JWT making the - request. - :type tenant_id: str - :param object_id: Set to the object Id of the client JWT making the - request. Not all users have object Id. For CSP (reseller) scenarios for - example, object Id is not available. - :type object_id: str - :param app_id: Set to the app Id of the client JWT making the request. - :type app_id: str - """ - - _attribute_map = { - 'principal_name': {'key': 'principalName', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserIdentityFragment, self).__init__(**kwargs) - self.principal_name = kwargs.get('principal_name', None) - self.principal_id = kwargs.get('principal_id', None) - self.tenant_id = kwargs.get('tenant_id', None) - self.object_id = kwargs.get('object_id', None) - self.app_id = kwargs.get('app_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment_py3.py deleted file mode 100644 index 3c2fdb6e005b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserIdentityFragment(Model): - """Identity attributes of a lab user. - - :param principal_name: Set to the principal name / UPN of the client JWT - making the request. - :type principal_name: str - :param principal_id: Set to the principal Id of the client JWT making the - request. Service principal will not have the principal Id. - :type principal_id: str - :param tenant_id: Set to the tenant ID of the client JWT making the - request. - :type tenant_id: str - :param object_id: Set to the object Id of the client JWT making the - request. Not all users have object Id. For CSP (reseller) scenarios for - example, object Id is not available. - :type object_id: str - :param app_id: Set to the app Id of the client JWT making the request. - :type app_id: str - """ - - _attribute_map = { - 'principal_name': {'key': 'principalName', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - } - - def __init__(self, *, principal_name: str=None, principal_id: str=None, tenant_id: str=None, object_id: str=None, app_id: str=None, **kwargs) -> None: - super(UserIdentityFragment, self).__init__(**kwargs) - self.principal_name = principal_name - self.principal_id = principal_id - self.tenant_id = tenant_id - self.object_id = object_id - self.app_id = app_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_py3.py deleted file mode 100644 index 03615a6e15b7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserIdentity(Model): - """Identity attributes of a lab user. - - :param principal_name: Set to the principal name / UPN of the client JWT - making the request. - :type principal_name: str - :param principal_id: Set to the principal Id of the client JWT making the - request. Service principal will not have the principal Id. - :type principal_id: str - :param tenant_id: Set to the tenant ID of the client JWT making the - request. - :type tenant_id: str - :param object_id: Set to the object Id of the client JWT making the - request. Not all users have object Id. For CSP (reseller) scenarios for - example, object Id is not available. - :type object_id: str - :param app_id: Set to the app Id of the client JWT making the request. - :type app_id: str - """ - - _attribute_map = { - 'principal_name': {'key': 'principalName', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - } - - def __init__(self, *, principal_name: str=None, principal_id: str=None, tenant_id: str=None, object_id: str=None, app_id: str=None, **kwargs) -> None: - super(UserIdentity, self).__init__(**kwargs) - self.principal_name = principal_name - self.principal_id = principal_id - self.tenant_id = tenant_id - self.object_id = object_id - self.app_id = app_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_paged.py deleted file mode 100644 index b48ce5901d56..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class UserPaged(Paged): - """ - A paging container for iterating over a list of :class:`User ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[User]'} - } - - def __init__(self, *args, **kwargs): - - super(UserPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_py3.py deleted file mode 100644 index 96d981829827..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class User(Resource): - """Profile of a lab user. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the user. - :type identity: ~azure.mgmt.devtestlabs.models.UserIdentity - :param secret_store: The secret store of the user. - :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStore - :ivar created_date: The creation date of the user profile. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'properties.identity', 'type': 'UserIdentity'}, - 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStore'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, identity=None, secret_store=None, **kwargs) -> None: - super(User, self).__init__(location=location, tags=tags, **kwargs) - self.identity = identity - self.secret_store = secret_store - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store.py deleted file mode 100644 index de4ee5cb6447..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserSecretStore(Model): - """Properties of a user's secret store. - - :param key_vault_uri: The URI of the user's Key vault. - :type key_vault_uri: str - :param key_vault_id: The ID of the user's Key vault. - :type key_vault_id: str - """ - - _attribute_map = { - 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, - 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserSecretStore, self).__init__(**kwargs) - self.key_vault_uri = kwargs.get('key_vault_uri', None) - self.key_vault_id = kwargs.get('key_vault_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment.py deleted file mode 100644 index 7789bff72056..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserSecretStoreFragment(Model): - """Properties of a user's secret store. - - :param key_vault_uri: The URI of the user's Key vault. - :type key_vault_uri: str - :param key_vault_id: The ID of the user's Key vault. - :type key_vault_id: str - """ - - _attribute_map = { - 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, - 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserSecretStoreFragment, self).__init__(**kwargs) - self.key_vault_uri = kwargs.get('key_vault_uri', None) - self.key_vault_id = kwargs.get('key_vault_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment_py3.py deleted file mode 100644 index 241c44664e06..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserSecretStoreFragment(Model): - """Properties of a user's secret store. - - :param key_vault_uri: The URI of the user's Key vault. - :type key_vault_uri: str - :param key_vault_id: The ID of the user's Key vault. - :type key_vault_id: str - """ - - _attribute_map = { - 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, - 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, - } - - def __init__(self, *, key_vault_uri: str=None, key_vault_id: str=None, **kwargs) -> None: - super(UserSecretStoreFragment, self).__init__(**kwargs) - self.key_vault_uri = key_vault_uri - self.key_vault_id = key_vault_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_py3.py deleted file mode 100644 index ad56603f7926..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserSecretStore(Model): - """Properties of a user's secret store. - - :param key_vault_uri: The URI of the user's Key vault. - :type key_vault_uri: str - :param key_vault_id: The ID of the user's Key vault. - :type key_vault_id: str - """ - - _attribute_map = { - 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, - 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, - } - - def __init__(self, *, key_vault_uri: str=None, key_vault_id: str=None, **kwargs) -> None: - super(UserSecretStore, self).__init__(**kwargs) - self.key_vault_uri = key_vault_uri - self.key_vault_id = key_vault_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network.py deleted file mode 100644 index 460ae9a78af0..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualNetwork(Resource): - """A virtual network. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param allowed_subnets: The allowed subnets of the virtual network. - :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.Subnet] - :param description: The description of the virtual network. - :type description: str - :param external_provider_resource_id: The Microsoft.Network resource - identifier of the virtual network. - :type external_provider_resource_id: str - :ivar external_subnets: The external subnet properties. - :vartype external_subnets: - list[~azure.mgmt.devtestlabs.models.ExternalSubnet] - :param subnet_overrides: The subnet overrides of the virtual network. - :type subnet_overrides: - list[~azure.mgmt.devtestlabs.models.SubnetOverride] - :ivar created_date: The creation date of the virtual network. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'external_subnets': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[Subnet]'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, - 'external_subnets': {'key': 'properties.externalSubnets', 'type': '[ExternalSubnet]'}, - 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverride]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualNetwork, self).__init__(**kwargs) - self.allowed_subnets = kwargs.get('allowed_subnets', None) - self.description = kwargs.get('description', None) - self.external_provider_resource_id = kwargs.get('external_provider_resource_id', None) - self.external_subnets = None - self.subnet_overrides = kwargs.get('subnet_overrides', None) - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment.py deleted file mode 100644 index 4840d07f21bb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class VirtualNetworkFragment(UpdateResource): - """A virtual network. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param allowed_subnets: The allowed subnets of the virtual network. - :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.SubnetFragment] - :param description: The description of the virtual network. - :type description: str - :param external_provider_resource_id: The Microsoft.Network resource - identifier of the virtual network. - :type external_provider_resource_id: str - :param subnet_overrides: The subnet overrides of the virtual network. - :type subnet_overrides: - list[~azure.mgmt.devtestlabs.models.SubnetOverrideFragment] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[SubnetFragment]'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, - 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverrideFragment]'}, - } - - def __init__(self, **kwargs): - super(VirtualNetworkFragment, self).__init__(**kwargs) - self.allowed_subnets = kwargs.get('allowed_subnets', None) - self.description = kwargs.get('description', None) - self.external_provider_resource_id = kwargs.get('external_provider_resource_id', None) - self.subnet_overrides = kwargs.get('subnet_overrides', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment_py3.py deleted file mode 100644 index bdc572018008..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class VirtualNetworkFragment(UpdateResource): - """A virtual network. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param allowed_subnets: The allowed subnets of the virtual network. - :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.SubnetFragment] - :param description: The description of the virtual network. - :type description: str - :param external_provider_resource_id: The Microsoft.Network resource - identifier of the virtual network. - :type external_provider_resource_id: str - :param subnet_overrides: The subnet overrides of the virtual network. - :type subnet_overrides: - list[~azure.mgmt.devtestlabs.models.SubnetOverrideFragment] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[SubnetFragment]'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, - 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverrideFragment]'}, - } - - def __init__(self, *, tags=None, allowed_subnets=None, description: str=None, external_provider_resource_id: str=None, subnet_overrides=None, **kwargs) -> None: - super(VirtualNetworkFragment, self).__init__(tags=tags, **kwargs) - self.allowed_subnets = allowed_subnets - self.description = description - self.external_provider_resource_id = external_provider_resource_id - self.subnet_overrides = subnet_overrides diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_paged.py deleted file mode 100644 index c4a6bac12054..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualNetworkPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualNetwork ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualNetwork]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualNetworkPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_py3.py deleted file mode 100644 index 4af05c325513..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualNetwork(Resource): - """A virtual network. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param allowed_subnets: The allowed subnets of the virtual network. - :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.Subnet] - :param description: The description of the virtual network. - :type description: str - :param external_provider_resource_id: The Microsoft.Network resource - identifier of the virtual network. - :type external_provider_resource_id: str - :ivar external_subnets: The external subnet properties. - :vartype external_subnets: - list[~azure.mgmt.devtestlabs.models.ExternalSubnet] - :param subnet_overrides: The subnet overrides of the virtual network. - :type subnet_overrides: - list[~azure.mgmt.devtestlabs.models.SubnetOverride] - :ivar created_date: The creation date of the virtual network. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'external_subnets': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[Subnet]'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, - 'external_subnets': {'key': 'properties.externalSubnets', 'type': '[ExternalSubnet]'}, - 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverride]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, allowed_subnets=None, description: str=None, external_provider_resource_id: str=None, subnet_overrides=None, **kwargs) -> None: - super(VirtualNetwork, self).__init__(location=location, tags=tags, **kwargs) - self.allowed_subnets = allowed_subnets - self.description = description - self.external_provider_resource_id = external_provider_resource_id - self.external_subnets = None - self.subnet_overrides = subnet_overrides - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details.py deleted file mode 100644 index 92d7a61279c1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WeekDetails(Model): - """Properties of a weekly schedule. - - :param weekdays: The days of the week for which the schedule is set (e.g. - Sunday, Monday, Tuesday, etc.). - :type weekdays: list[str] - :param time: The time of the day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'weekdays': {'key': 'weekdays', 'type': '[str]'}, - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WeekDetails, self).__init__(**kwargs) - self.weekdays = kwargs.get('weekdays', None) - self.time = kwargs.get('time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment.py deleted file mode 100644 index f40c5e26d54a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WeekDetailsFragment(Model): - """Properties of a weekly schedule. - - :param weekdays: The days of the week for which the schedule is set (e.g. - Sunday, Monday, Tuesday, etc.). - :type weekdays: list[str] - :param time: The time of the day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'weekdays': {'key': 'weekdays', 'type': '[str]'}, - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WeekDetailsFragment, self).__init__(**kwargs) - self.weekdays = kwargs.get('weekdays', None) - self.time = kwargs.get('time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment_py3.py deleted file mode 100644 index 4521250deffc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WeekDetailsFragment(Model): - """Properties of a weekly schedule. - - :param weekdays: The days of the week for which the schedule is set (e.g. - Sunday, Monday, Tuesday, etc.). - :type weekdays: list[str] - :param time: The time of the day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'weekdays': {'key': 'weekdays', 'type': '[str]'}, - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, *, weekdays=None, time: str=None, **kwargs) -> None: - super(WeekDetailsFragment, self).__init__(**kwargs) - self.weekdays = weekdays - self.time = time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_py3.py deleted file mode 100644 index d3bdddf6f4e4..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WeekDetails(Model): - """Properties of a weekly schedule. - - :param weekdays: The days of the week for which the schedule is set (e.g. - Sunday, Monday, Tuesday, etc.). - :type weekdays: list[str] - :param time: The time of the day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'weekdays': {'key': 'weekdays', 'type': '[str]'}, - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, *, weekdays=None, time: str=None, **kwargs) -> None: - super(WeekDetails, self).__init__(**kwargs) - self.weekdays = weekdays - self.time = time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info.py deleted file mode 100644 index 377c585b9162..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsOsInfo(Model): - """Information about a Windows OS. - - :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, - SysprepRequested, SysprepApplied). Possible values include: - 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' - :type windows_os_state: str or - ~azure.mgmt.devtestlabs.models.WindowsOsState - """ - - _attribute_map = { - 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WindowsOsInfo, self).__init__(**kwargs) - self.windows_os_state = kwargs.get('windows_os_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment.py deleted file mode 100644 index c54bfea8922a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsOsInfoFragment(Model): - """Information about a Windows OS. - - :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, - SysprepRequested, SysprepApplied). Possible values include: - 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' - :type windows_os_state: str or - ~azure.mgmt.devtestlabs.models.WindowsOsState - """ - - _attribute_map = { - 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WindowsOsInfoFragment, self).__init__(**kwargs) - self.windows_os_state = kwargs.get('windows_os_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment_py3.py deleted file mode 100644 index e2009eab0094..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsOsInfoFragment(Model): - """Information about a Windows OS. - - :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, - SysprepRequested, SysprepApplied). Possible values include: - 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' - :type windows_os_state: str or - ~azure.mgmt.devtestlabs.models.WindowsOsState - """ - - _attribute_map = { - 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, - } - - def __init__(self, *, windows_os_state=None, **kwargs) -> None: - super(WindowsOsInfoFragment, self).__init__(**kwargs) - self.windows_os_state = windows_os_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_py3.py deleted file mode 100644 index 6c59c08b3f5a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsOsInfo(Model): - """Information about a Windows OS. - - :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, - SysprepRequested, SysprepApplied). Possible values include: - 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' - :type windows_os_state: str or - ~azure.mgmt.devtestlabs.models.WindowsOsState - """ - - _attribute_map = { - 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, - } - - def __init__(self, *, windows_os_state=None, **kwargs) -> None: - super(WindowsOsInfo, self).__init__(**kwargs) - self.windows_os_state = windows_os_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/__init__.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/__init__.py index 89d5496052a3..659acdca2a6c 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/__init__.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/__init__.py @@ -9,31 +9,31 @@ # regenerated. # -------------------------------------------------------------------------- -from .provider_operations import ProviderOperations -from .labs_operations import LabsOperations -from .operations import Operations -from .global_schedules_operations import GlobalSchedulesOperations -from .artifact_sources_operations import ArtifactSourcesOperations -from .arm_templates_operations import ArmTemplatesOperations -from .artifacts_operations import ArtifactsOperations -from .costs_operations import CostsOperations -from .custom_images_operations import CustomImagesOperations -from .formulas_operations import FormulasOperations -from .gallery_images_operations import GalleryImagesOperations -from .notification_channels_operations import NotificationChannelsOperations -from .policy_sets_operations import PolicySetsOperations -from .policies_operations import PoliciesOperations -from .schedules_operations import SchedulesOperations -from .service_runners_operations import ServiceRunnersOperations -from .users_operations import UsersOperations -from .disks_operations import DisksOperations -from .environments_operations import EnvironmentsOperations -from .secrets_operations import SecretsOperations -from .service_fabrics_operations import ServiceFabricsOperations -from .service_fabric_schedules_operations import ServiceFabricSchedulesOperations -from .virtual_machines_operations import VirtualMachinesOperations -from .virtual_machine_schedules_operations import VirtualMachineSchedulesOperations -from .virtual_networks_operations import VirtualNetworksOperations +from ._provider_operations import ProviderOperations +from ._labs_operations import LabsOperations +from ._operations import Operations +from ._global_schedules_operations import GlobalSchedulesOperations +from ._artifact_sources_operations import ArtifactSourcesOperations +from ._arm_templates_operations import ArmTemplatesOperations +from ._artifacts_operations import ArtifactsOperations +from ._costs_operations import CostsOperations +from ._custom_images_operations import CustomImagesOperations +from ._formulas_operations import FormulasOperations +from ._gallery_images_operations import GalleryImagesOperations +from ._notification_channels_operations import NotificationChannelsOperations +from ._policy_sets_operations import PolicySetsOperations +from ._policies_operations import PoliciesOperations +from ._schedules_operations import SchedulesOperations +from ._service_runners_operations import ServiceRunnersOperations +from ._users_operations import UsersOperations +from ._disks_operations import DisksOperations +from ._environments_operations import EnvironmentsOperations +from ._secrets_operations import SecretsOperations +from ._service_fabrics_operations import ServiceFabricsOperations +from ._service_fabric_schedules_operations import ServiceFabricSchedulesOperations +from ._virtual_machines_operations import VirtualMachinesOperations +from ._virtual_machine_schedules_operations import VirtualMachineSchedulesOperations +from ._virtual_networks_operations import VirtualNetworksOperations __all__ = [ 'ProviderOperations', diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/arm_templates_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_arm_templates_operations.py similarity index 95% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/arm_templates_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_arm_templates_operations.py index fd4567544366..245a750452de 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/arm_templates_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_arm_templates_operations.py @@ -19,6 +19,8 @@ class ArmTemplatesOperations(object): """ArmTemplatesOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.ArmTemplatePaged[~azure.mgmt.devtestlabs.models.ArmTemplate] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -110,6 +111,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -120,12 +126,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ArmTemplatePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ArmTemplatePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ArmTemplatePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/armtemplates'} @@ -140,7 +144,7 @@ def get( :type lab_name: str :param artifact_source_name: The name of the artifact source. :type artifact_source_name: str - :param name: The name of the azure Resource Manager template. + :param name: The name of the azure resource manager template. :type name: str :param expand: Specify the $expand query. Example: 'properties($select=displayName)' @@ -192,7 +196,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ArmTemplate', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifact_sources_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifact_sources_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifact_sources_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifact_sources_operations.py index 67f75d5d6079..6ec87de82fc0 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifact_sources_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifact_sources_operations.py @@ -19,6 +19,8 @@ class ArtifactSourcesOperations(object): """ArtifactSourcesOperations 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. @@ -67,8 +69,7 @@ def list( ~azure.mgmt.devtestlabs.models.ArtifactSourcePaged[~azure.mgmt.devtestlabs.models.ArtifactSource] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -107,6 +108,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -117,12 +123,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ArtifactSourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ArtifactSourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ArtifactSourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources'} @@ -186,7 +190,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ArtifactSource', response) @@ -257,7 +260,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ArtifactSource', response) if response.status_code == 201: @@ -328,7 +330,8 @@ def delete( def update( self, resource_group_name, lab_name, name, artifact_source, custom_headers=None, raw=False, **operation_config): - """Modify properties of artifact sources. + """Allows modifying tags of artifact sources. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -387,7 +390,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ArtifactSource', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifacts_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifacts_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifacts_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifacts_operations.py index d036a6026f51..e4a5d9693cd5 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifacts_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifacts_operations.py @@ -19,6 +19,8 @@ class ArtifactsOperations(object): """ArtifactsOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.ArtifactPaged[~azure.mgmt.devtestlabs.models.Artifact] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -110,6 +111,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -120,12 +126,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ArtifactPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ArtifactPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ArtifactPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/artifacts'} @@ -192,7 +196,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Artifact', response) @@ -269,7 +272,6 @@ def generate_arm_template( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ArmTemplateInfo', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/costs_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_costs_operations.py similarity index 98% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/costs_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_costs_operations.py index b63651cdcedc..b0f9ccc59db7 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/costs_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_costs_operations.py @@ -19,6 +19,8 @@ class CostsOperations(object): """CostsOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LabCost', response) @@ -167,7 +168,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LabCost', response) if response.status_code == 201: diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/custom_images_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_custom_images_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/custom_images_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_custom_images_operations.py index 4471269a40a5..06d30d912df6 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/custom_images_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_custom_images_operations.py @@ -21,6 +21,8 @@ class CustomImagesOperations(object): """CustomImagesOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.CustomImagePaged[~azure.mgmt.devtestlabs.models.CustomImage] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -109,6 +110,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.CustomImagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.CustomImagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.CustomImagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/customimages'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CustomImage', response) @@ -391,7 +394,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, name, custom_image, custom_headers=None, raw=False, **operation_config): - """Modify properties of custom images. + """Allows modifying tags of custom images. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -449,7 +453,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CustomImage', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/disks_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_disks_operations.py similarity index 98% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/disks_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_disks_operations.py index 3fbe8eac7cb0..5e5fea17acdd 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/disks_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_disks_operations.py @@ -21,6 +21,8 @@ class DisksOperations(object): """DisksOperations 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. @@ -71,8 +73,7 @@ def list( ~azure.mgmt.devtestlabs.models.DiskPaged[~azure.mgmt.devtestlabs.models.Disk] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -112,6 +113,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -122,12 +128,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks'} @@ -194,7 +198,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Disk', response) @@ -405,7 +408,7 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, user_name, name, disk, custom_headers=None, raw=False, **operation_config): - """Modify properties of disks. + """Allows modifying tags of disks. All other properties will be ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -466,7 +469,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Disk', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/environments_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_environments_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/environments_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_environments_operations.py index 61947381c66d..5805df9f86c1 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/environments_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_environments_operations.py @@ -21,6 +21,8 @@ class EnvironmentsOperations(object): """EnvironmentsOperations 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. @@ -71,8 +73,7 @@ def list( ~azure.mgmt.devtestlabs.models.DtlEnvironmentPaged[~azure.mgmt.devtestlabs.models.DtlEnvironment] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -112,6 +113,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -122,12 +128,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DtlEnvironmentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DtlEnvironmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DtlEnvironmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/environments'} @@ -194,7 +198,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DtlEnvironment', response) @@ -406,7 +409,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, user_name, name, dtl_environment, custom_headers=None, raw=False, **operation_config): - """Modify properties of environments. + """Allows modifying tags of environments. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -469,7 +473,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DtlEnvironment', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/formulas_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_formulas_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/formulas_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_formulas_operations.py index 366a1a2a129e..1c0665356f52 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/formulas_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_formulas_operations.py @@ -21,6 +21,8 @@ class FormulasOperations(object): """FormulasOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.FormulaPaged[~azure.mgmt.devtestlabs.models.Formula] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -109,6 +110,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.FormulaPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.FormulaPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.FormulaPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/formulas'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Formula', response) @@ -254,7 +257,7 @@ def _create_or_update_initial( def create_or_update( self, resource_group_name, lab_name, name, formula, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or replace an existing Formula. This operation can take a while + """Create or replace an existing formula. This operation can take a while to complete. :param resource_group_name: The name of the resource group. @@ -365,7 +368,8 @@ def delete( def update( self, resource_group_name, lab_name, name, formula, custom_headers=None, raw=False, **operation_config): - """Modify properties of formulas. + """Allows modifying tags of formulas. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -424,7 +428,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Formula', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/gallery_images_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_gallery_images_operations.py similarity index 93% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/gallery_images_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_gallery_images_operations.py index 849946066b15..97c3cf13e2c0 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/gallery_images_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_gallery_images_operations.py @@ -19,6 +19,8 @@ class GalleryImagesOperations(object): """GalleryImagesOperations 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. @@ -67,8 +69,7 @@ def list( ~azure.mgmt.devtestlabs.models.GalleryImagePaged[~azure.mgmt.devtestlabs.models.GalleryImage] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -107,6 +108,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -117,12 +123,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.GalleryImagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.GalleryImagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.GalleryImagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/galleryimages'} diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/global_schedules_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_global_schedules_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/global_schedules_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_global_schedules_operations.py index 736efa3c0cea..c05fe0f1308e 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/global_schedules_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_global_schedules_operations.py @@ -21,6 +21,8 @@ class GlobalSchedulesOperations(object): """GlobalSchedulesOperations 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. @@ -65,8 +67,7 @@ def list_by_subscription( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_subscription.metadata['url'] @@ -103,6 +104,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -113,12 +119,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DevTestLab/schedules'} @@ -151,8 +155,7 @@ def list_by_resource_group( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -190,6 +193,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -200,12 +208,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules'} @@ -266,7 +272,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -334,7 +339,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) if response.status_code == 201: @@ -402,7 +406,8 @@ def delete( def update( self, resource_group_name, name, schedule, custom_headers=None, raw=False, **operation_config): - """Modify properties of schedules. + """Allows modifying tags of schedules. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -457,7 +462,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/labs_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_labs_operations.py similarity index 98% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/labs_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_labs_operations.py index d6ce7c62635f..a0b03f5a0c53 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/labs_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_labs_operations.py @@ -21,6 +21,8 @@ class LabsOperations(object): """LabsOperations 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. @@ -65,8 +67,7 @@ def list_by_subscription( ~azure.mgmt.devtestlabs.models.LabPaged[~azure.mgmt.devtestlabs.models.Lab] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_subscription.metadata['url'] @@ -103,6 +104,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -113,12 +119,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.LabPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.LabPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.LabPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DevTestLab/labs'} @@ -151,8 +155,7 @@ def list_by_resource_group( ~azure.mgmt.devtestlabs.models.LabPaged[~azure.mgmt.devtestlabs.models.Lab] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -190,6 +193,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -200,12 +208,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.LabPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.LabPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.LabPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs'} @@ -266,7 +272,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Lab', response) @@ -461,7 +466,7 @@ def get_long_running_output(response): def update( self, resource_group_name, name, lab, custom_headers=None, raw=False, **operation_config): - """Modify properties of labs. + """Allows modifying tags of labs. All other properties will be ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -516,7 +521,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Lab', response) @@ -850,7 +854,6 @@ def generate_upload_uri( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('GenerateUploadUriResponse', response) @@ -973,8 +976,7 @@ def list_vhds( ~azure.mgmt.devtestlabs.models.LabVhdPaged[~azure.mgmt.devtestlabs.models.LabVhd] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_vhds.metadata['url'] @@ -1005,6 +1007,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -1015,12 +1022,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.LabVhdPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.LabVhdPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.LabVhdPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_vhds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/listVhds'} diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/notification_channels_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_notification_channels_operations.py similarity index 96% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/notification_channels_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_notification_channels_operations.py index 0c19dd07462e..d0f4de2d054b 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/notification_channels_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_notification_channels_operations.py @@ -19,6 +19,8 @@ class NotificationChannelsOperations(object): """NotificationChannelsOperations 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. @@ -67,8 +69,7 @@ def list( ~azure.mgmt.devtestlabs.models.NotificationChannelPaged[~azure.mgmt.devtestlabs.models.NotificationChannel] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -107,6 +108,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -117,12 +123,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.NotificationChannelPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.NotificationChannelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.NotificationChannelPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/notificationchannels'} @@ -135,7 +139,7 @@ def get( :type resource_group_name: str :param lab_name: The name of the lab. :type lab_name: str - :param name: The name of the notificationChannel. + :param name: The name of the notification channel. :type name: str :param expand: Specify the $expand query. Example: 'properties($select=webHookUrl)' @@ -186,7 +190,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('NotificationChannel', response) @@ -199,13 +202,13 @@ def get( def create_or_update( self, resource_group_name, lab_name, name, notification_channel, custom_headers=None, raw=False, **operation_config): - """Create or replace an existing notificationChannel. + """Create or replace an existing notification channel. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param lab_name: The name of the lab. :type lab_name: str - :param name: The name of the notificationChannel. + :param name: The name of the notification channel. :type name: str :param notification_channel: A notification. :type notification_channel: @@ -258,7 +261,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('NotificationChannel', response) if response.status_code == 201: @@ -279,7 +281,7 @@ def delete( :type resource_group_name: str :param lab_name: The name of the lab. :type lab_name: str - :param name: The name of the notificationChannel. + :param name: The name of the notification channel. :type name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -329,13 +331,14 @@ def delete( def update( self, resource_group_name, lab_name, name, notification_channel, custom_headers=None, raw=False, **operation_config): - """Modify properties of notification channels. + """Allows modifying tags of notification channels. All other properties + will be ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param lab_name: The name of the lab. :type lab_name: str - :param name: The name of the notificationChannel. + :param name: The name of the notification channel. :type name: str :param notification_channel: A notification. :type notification_channel: @@ -388,7 +391,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('NotificationChannel', response) @@ -407,7 +409,7 @@ def notify( :type resource_group_name: str :param lab_name: The name of the lab. :type lab_name: str - :param name: The name of the notificationChannel. + :param name: The name of the notification channel. :type name: str :param event_name: The type of event (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_operations.py similarity index 96% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_operations.py index 2f0636e39f26..5576b0e6fc0f 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_operations.py @@ -19,6 +19,8 @@ class Operations(object): """Operations 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. @@ -88,7 +90,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('OperationResult', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policies_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policies_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policies_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policies_operations.py index da02489f324b..90b956a0d88c 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policies_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policies_operations.py @@ -19,6 +19,8 @@ class PoliciesOperations(object): """PoliciesOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.PolicyPaged[~azure.mgmt.devtestlabs.models.Policy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -110,6 +111,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -120,12 +126,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.PolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.PolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.PolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies'} @@ -192,7 +196,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Policy', response) @@ -266,7 +269,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Policy', response) if response.status_code == 201: @@ -340,7 +342,8 @@ def delete( def update( self, resource_group_name, lab_name, policy_set_name, name, policy, custom_headers=None, raw=False, **operation_config): - """Modify properties of policies. + """Allows modifying tags of policies. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -401,7 +404,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Policy', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policy_sets_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policy_sets_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policy_sets_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policy_sets_operations.py index ed602a5ba340..66acd3ffb5e6 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policy_sets_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policy_sets_operations.py @@ -19,6 +19,8 @@ class PolicySetsOperations(object): """PolicySetsOperations 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. @@ -100,7 +102,6 @@ def evaluate_policies( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('EvaluatePoliciesResponse', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/provider_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_provider_operations.py similarity index 90% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/provider_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_provider_operations.py index 3597edb7fa87..5b12492d4b39 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/provider_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_provider_operations.py @@ -19,6 +19,8 @@ class ProviderOperations(object): """ProviderOperations 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. @@ -51,8 +53,7 @@ def list( ~azure.mgmt.devtestlabs.models.OperationMetadataPaged[~azure.mgmt.devtestlabs.models.OperationMetadata] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -77,6 +78,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -87,12 +93,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationMetadataPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.DevTestLab/operations'} diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/schedules_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_schedules_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/schedules_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_schedules_operations.py index 5f4e9429e3a1..996b11b9e6d4 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/schedules_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_schedules_operations.py @@ -21,6 +21,8 @@ class SchedulesOperations(object): """SchedulesOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -109,6 +110,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -259,7 +262,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) if response.status_code == 201: @@ -330,7 +332,8 @@ def delete( def update( self, resource_group_name, lab_name, name, schedule, custom_headers=None, raw=False, **operation_config): - """Modify properties of schedules. + """Allows modifying tags of schedules. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -388,7 +391,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -502,8 +504,7 @@ def list_applicable( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_applicable.metadata['url'] @@ -535,6 +536,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -545,12 +551,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_applicable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}/listApplicable'} diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/secrets_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_secrets_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/secrets_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_secrets_operations.py index 46e2a62a2b88..aa04f243c68c 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/secrets_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_secrets_operations.py @@ -21,6 +21,8 @@ class SecretsOperations(object): """SecretsOperations 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. @@ -71,8 +73,7 @@ def list( ~azure.mgmt.devtestlabs.models.SecretPaged[~azure.mgmt.devtestlabs.models.Secret] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -112,6 +113,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -122,12 +128,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SecretPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SecretPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SecretPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/secrets'} @@ -194,7 +198,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Secret', response) @@ -377,7 +380,7 @@ def delete( def update( self, resource_group_name, lab_name, user_name, name, tags=None, value=None, custom_headers=None, raw=False, **operation_config): - """Modify properties of secrets. + """Allows modifying tags of secrets. All other properties will be ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -442,7 +445,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Secret', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabric_schedules_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabric_schedules_operations.py similarity index 96% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabric_schedules_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabric_schedules_operations.py index 892b9b3fb50b..62ac4ca15eb1 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabric_schedules_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabric_schedules_operations.py @@ -21,6 +21,8 @@ class ServiceFabricSchedulesOperations(object): """ServiceFabricSchedulesOperations 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. @@ -49,7 +51,7 @@ def list( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param expand: Specify the $expand query. Example: 'properties($select=status)' @@ -73,8 +75,7 @@ def list( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -115,6 +116,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -125,12 +131,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{serviceFabricName}/schedules'} @@ -145,7 +149,7 @@ def get( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param name: The name of the schedule. :type name: str @@ -200,7 +204,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -221,7 +224,7 @@ def create_or_update( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param name: The name of the schedule. :type name: str @@ -277,7 +280,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) if response.status_code == 201: @@ -300,7 +302,7 @@ def delete( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param name: The name of the schedule. :type name: str @@ -354,7 +356,8 @@ def delete( def update( self, resource_group_name, lab_name, user_name, service_fabric_name, name, schedule, custom_headers=None, raw=False, **operation_config): - """Modify properties of schedules. + """Allows modifying tags of schedules. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -362,7 +365,7 @@ def update( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param name: The name of the schedule. :type name: str @@ -418,7 +421,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -480,7 +482,7 @@ def execute( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param name: The name of the schedule. :type name: str diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabrics_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabrics_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabrics_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabrics_operations.py index 076aa87a7963..f3ef18b8584e 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabrics_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabrics_operations.py @@ -21,6 +21,8 @@ class ServiceFabricsOperations(object): """ServiceFabricsOperations 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. @@ -71,8 +73,7 @@ def list( ~azure.mgmt.devtestlabs.models.ServiceFabricPaged[~azure.mgmt.devtestlabs.models.ServiceFabric] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -112,6 +113,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -122,12 +128,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServiceFabricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServiceFabricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServiceFabricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/servicefabrics'} @@ -142,7 +146,7 @@ def get( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param expand: Specify the $expand query. Example: 'properties($expand=applicableSchedule)' @@ -194,7 +198,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceFabric', response) @@ -261,7 +264,7 @@ def _create_or_update_initial( def create_or_update( self, resource_group_name, lab_name, user_name, name, service_fabric, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or replace an existing Service Fabric. This operation can take a + """Create or replace an existing service fabric. This operation can take a while to complete. :param resource_group_name: The name of the resource group. @@ -270,7 +273,7 @@ def create_or_update( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param service_fabric: A Service Fabric. :type service_fabric: ~azure.mgmt.devtestlabs.models.ServiceFabric @@ -366,7 +369,7 @@ def delete( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the @@ -405,7 +408,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, user_name, name, service_fabric, custom_headers=None, raw=False, **operation_config): - """Modify properties of service fabrics. + """Allows modifying tags of service fabrics. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -413,7 +417,7 @@ def update( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param service_fabric: A Service Fabric. :type service_fabric: @@ -467,7 +471,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceFabric', response) @@ -488,7 +491,7 @@ def list_applicable_schedules( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -535,7 +538,6 @@ def list_applicable_schedules( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ApplicableSchedule', response) @@ -596,7 +598,7 @@ def start( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the @@ -683,7 +685,7 @@ def stop( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_runners_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_runners_operations.py similarity index 71% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_runners_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_runners_operations.py index 83b4e9dae88c..aa464691b2fd 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_runners_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_runners_operations.py @@ -19,6 +19,8 @@ class ServiceRunnersOperations(object): """ServiceRunnersOperations 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. @@ -37,91 +39,6 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def list( - self, resource_group_name, lab_name, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """List service runners in a given lab. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param lab_name: The name of the lab. - :type lab_name: str - :param filter: The filter to apply to the operation. Example: - '$filter=contains(name,'myName') - :type filter: str - :param top: The maximum number of resources to return from the - operation. Example: '$top=10' - :type top: int - :param orderby: The ordering expression for the results, using OData - notation. Example: '$orderby=name desc' - :type orderby: 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: An iterator like instance of ServiceRunner - :rtype: - ~azure.mgmt.devtestlabs.models.ServiceRunnerPaged[~azure.mgmt.devtestlabs.models.ServiceRunner] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.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'), - 'labName': self._serialize.url("lab_name", lab_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # 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 - - return response - - # Deserialize response - deserialized = models.ServiceRunnerPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ServiceRunnerPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/servicerunners'} - def get( self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): """Get service runner. @@ -176,7 +93,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceRunner', response) @@ -189,7 +105,7 @@ def get( def create_or_update( self, resource_group_name, lab_name, name, service_runner, custom_headers=None, raw=False, **operation_config): - """Create or replace an existing Service runner. + """Create or replace an existing service runner. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -248,7 +164,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceRunner', response) if response.status_code == 201: diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/users_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_users_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/users_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_users_operations.py index 5f68155fece3..7e4d74c46fab 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/users_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_users_operations.py @@ -21,6 +21,8 @@ class UsersOperations(object): """UsersOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.UserPaged[~azure.mgmt.devtestlabs.models.User] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -109,6 +110,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.UserPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.UserPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.UserPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('User', response) @@ -391,7 +394,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, name, user, custom_headers=None, raw=False, **operation_config): - """Modify properties of user profiles. + """Allows modifying tags of user profiles. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -449,7 +453,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('User', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machine_schedules_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machine_schedules_operations.py similarity index 98% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machine_schedules_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machine_schedules_operations.py index dadb93a7e064..080a6514a343 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machine_schedules_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machine_schedules_operations.py @@ -21,6 +21,8 @@ class VirtualMachineSchedulesOperations(object): """VirtualMachineSchedulesOperations 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. @@ -71,8 +73,7 @@ def list( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -112,6 +113,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -122,12 +128,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{virtualMachineName}/schedules'} @@ -194,7 +198,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -268,7 +271,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) if response.status_code == 201: @@ -342,7 +344,8 @@ def delete( def update( self, resource_group_name, lab_name, virtual_machine_name, name, schedule, custom_headers=None, raw=False, **operation_config): - """Modify properties of schedules. + """Allows modifying tags of schedules. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -403,7 +406,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machines_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machines_operations.py similarity index 99% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machines_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machines_operations.py index 16c7762bfc04..32c51685fb71 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machines_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machines_operations.py @@ -21,6 +21,8 @@ class VirtualMachinesOperations(object): """VirtualMachinesOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.LabVirtualMachinePaged[~azure.mgmt.devtestlabs.models.LabVirtualMachine] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -109,6 +110,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.LabVirtualMachinePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.LabVirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.LabVirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LabVirtualMachine', response) @@ -254,7 +257,7 @@ def _create_or_update_initial( def create_or_update( self, resource_group_name, lab_name, name, lab_virtual_machine, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or replace an existing Virtual machine. This operation can take + """Create or replace an existing virtual machine. This operation can take a while to complete. :param resource_group_name: The name of the resource group. @@ -392,7 +395,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, name, lab_virtual_machine, custom_headers=None, raw=False, **operation_config): - """Modify properties of virtual machines. + """Allows modifying tags of virtual machines. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -451,7 +455,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LabVirtualMachine', response) @@ -882,7 +885,6 @@ def get_rdp_file_contents( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RdpConnection', response) @@ -947,7 +949,6 @@ def list_applicable_schedules( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ApplicableSchedule', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_networks_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_networks_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_networks_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_networks_operations.py index 12ee56cd36ad..659a7cc31b2f 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_networks_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_networks_operations.py @@ -21,6 +21,8 @@ class VirtualNetworksOperations(object): """VirtualNetworksOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.VirtualNetworkPaged[~azure.mgmt.devtestlabs.models.VirtualNetwork] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -109,6 +110,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VirtualNetworkPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VirtualNetworkPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VirtualNetworkPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VirtualNetwork', response) @@ -391,7 +394,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, name, virtual_network, custom_headers=None, raw=False, **operation_config): - """Modify properties of virtual networks. + """Allows modifying tags of virtual networks. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -450,7 +454,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VirtualNetwork', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py index 7f225c6aab41..20cee28211d4 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "3.0.0" +VERSION = "4.0.0" diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/setup.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/setup.py index c74bcc7d5281..b136f9c8d9bf 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/setup.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/setup.py @@ -53,6 +53,7 @@ version=version, description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), long_description=readme + '\n\n' + history, + long_description_content_type='text/x-rst', license='MIT License', author='Microsoft Corporation', author_email='azpysdkhelp@microsoft.com', @@ -63,7 +64,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', From 76b8713769d6f64f8904ce3383fd4a732d16908b Mon Sep 17 00:00:00 2001 From: annatisch Date: Fri, 26 Jul 2019 12:15:22 -0700 Subject: [PATCH 041/244] [azure-core] Small fixes for aiohttp (#6490) * Aiohttp read timeout * Aiohttp response status code * Aiohttp content type header * Review feedback * Fixed typo * Fixed async transport sleep coroutine * Fix for stream generators * Reverted attribute error handling * Fixed trio sleep test * Fixed identity test mocks * Fix identity mock to return content-type as string * Fix universal policy tests --- sdk/core/azure-core/azure/core/exceptions.py | 1 + .../azure/core/pipeline/policies/universal.py | 2 +- .../azure/core/pipeline/transport/aiohttp.py | 26 +++++++++---------- .../pipeline/transport/requests_asyncio.py | 20 +++++++------- .../core/pipeline/transport/requests_basic.py | 20 ++++++-------- .../core/pipeline/transport/requests_trio.py | 17 +++++------- .../azure_core_asynctests/test_pipeline.py | 17 ++++++++++++ .../tests/test_universal_pipeline.py | 4 +-- sdk/identity/azure-identity/tests/helpers.py | 2 +- .../azure-identity/tests/test_authn_client.py | 8 +++--- .../azure-identity/tests/test_identity.py | 4 +-- .../tests/test_identity_async.py | 4 +-- 12 files changed, 66 insertions(+), 59 deletions(-) diff --git a/sdk/core/azure-core/azure/core/exceptions.py b/sdk/core/azure-core/azure/core/exceptions.py index ae6ff7c53eb8..b69912108a40 100644 --- a/sdk/core/azure-core/azure/core/exceptions.py +++ b/sdk/core/azure-core/azure/core/exceptions.py @@ -114,6 +114,7 @@ def __init__(self, message=None, response=None, **kwargs): if response: self.reason = response.reason self.status_code = response.status_code + message = message or "Operation returned an invalid status '{}'".format(self.reason) try: try: diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/universal.py b/sdk/core/azure-core/azure/core/pipeline/policies/universal.py index 79b48bb162ce..b9338950ff38 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/universal.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/universal.py @@ -350,7 +350,7 @@ def deserialize_from_http_generics(cls, response): # Try to use content-type from headers if available content_type = None if response.content_type: # type: ignore - content_type = response.content_type[0].strip().lower() # type: ignore + content_type = response.content_type.split(";")[0].strip().lower() # type: ignore # Ouch, this server did not declare what it sent... # Let's guess it's JSON... diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/aiohttp.py b/sdk/core/azure-core/azure/core/pipeline/transport/aiohttp.py index f6ee555cea1c..9fb2eb125a5c 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/aiohttp.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/aiohttp.py @@ -31,7 +31,7 @@ import aiohttp from azure.core.configuration import ConnectionConfiguration -from azure.core.exceptions import ServiceRequestError +from azure.core.exceptions import ServiceRequestError, ServiceResponseError from azure.core.pipeline import Pipeline from requests.exceptions import ( @@ -181,7 +181,8 @@ async def send(self, request: HttpRequest, **config: Any) -> Optional[AsyncHttpR await response.load_body() except aiohttp.client_exceptions.ClientConnectorError as err: error = ServiceRequestError(err, error=err) - + except asyncio.TimeoutError as err: + error = ServiceResponseError(err, error=err) if error: raise error return response @@ -191,19 +192,16 @@ class AioHttpStreamDownloadGenerator(AsyncIterator): """Streams the response body data. :param pipeline: The pipeline object - :param request: The request object :param response: The client response object. - :type response: aiohttp.ClientResponse :param block_size: block size of data sent over connection. :type block_size: int """ - def __init__(self, pipeline: Pipeline, request: HttpRequest, - response: aiohttp.ClientResponse, block_size: int) -> None: + def __init__(self, pipeline: Pipeline, response: AsyncHttpResponse) -> None: self.pipeline = pipeline - self.request = request + self.request = response.request self.response = response - self.block_size = block_size - self.content_length = int(response.headers.get('Content-Length', 0)) + self.block_size = response.block_size + self.content_length = int(response.internal_response.headers.get('Content-Length', 0)) self.downloaded = 0 def __len__(self): @@ -215,13 +213,13 @@ async def __anext__(self): retry_interval = 1000 while retry_active: try: - chunk = await self.response.content.read(self.block_size) + chunk = await self.response.internal_response.content.read(self.block_size) if not chunk: raise _ResponseStopIteration() self.downloaded += self.block_size return chunk except _ResponseStopIteration: - self.response.close() + self.response.internal_response.close() raise StopAsyncIteration() except (ChunkedEncodingError, ConnectionError): retry_total -= 1 @@ -233,7 +231,7 @@ async def __anext__(self): resp = self.pipeline.run(self.request, stream=True, headers=headers) if resp.status_code == 416: raise - chunk = await self.response.content.read(self.block_size) + chunk = await self.response.internal_response.content.read(self.block_size) if not chunk: raise StopIteration() self.downloaded += chunk @@ -243,7 +241,7 @@ async def __anext__(self): raise except Exception as err: _LOGGER.warning("Unable to stream download: %s", err) - self.response.close() + self.response.internal_response.close() raise class AioHttpTransportResponse(AsyncHttpResponse): @@ -282,4 +280,4 @@ def stream_download(self, pipeline) -> AsyncIteratorType[bytes]: :param pipeline: The pipeline object :type pipeline: azure.core.pipeline """ - return AioHttpStreamDownloadGenerator(pipeline, self.request, self.internal_response, self.block_size) + return AioHttpStreamDownloadGenerator(pipeline, self) diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/requests_asyncio.py b/sdk/core/azure-core/azure/core/pipeline/transport/requests_asyncio.py index 1f302034a173..6093713c2928 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/requests_asyncio.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/requests_asyncio.py @@ -78,6 +78,9 @@ async def __aenter__(self): async def __aexit__(self, *exc_details): # pylint: disable=arguments-differ return super(AsyncioRequestsTransport, self).__exit__() + async def sleep(self, duration): + await asyncio.sleep(duration) + async def send(self, request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: # type: ignore """Send the request using this HTTP sender. @@ -135,18 +138,16 @@ class AsyncioStreamDownloadGenerator(AsyncIterator): """Streams the response body data. :param pipeline: The pipeline object - :param request: The request object :param response: The response object. - :param int block_size: block size of data sent over connection. :param generator iter_content_func: Iterator for response data. :param int content_length: size of body in bytes. """ - def __init__(self, pipeline: Pipeline, request: HttpRequest, response: requests.Response, block_size: int) -> None: + def __init__(self, pipeline: Pipeline, response: AsyncHttpResponse) -> None: self.pipeline = pipeline - self.request = request + self.request = response.request self.response = response - self.block_size = block_size - self.iter_content_func = self.response.iter_content(self.block_size) + self.block_size = response.block_size + self.iter_content_func = self.response.internal_response.iter_content(self.block_size) self.content_length = int(response.headers.get('Content-Length', 0)) self.downloaded = 0 @@ -170,7 +171,7 @@ async def __anext__(self): self.downloaded += self.block_size return chunk except _ResponseStopIteration: - self.response.close() + self.response.internal_response.close() raise StopAsyncIteration() except (requests.exceptions.ChunkedEncodingError, requests.exceptions.ConnectionError): @@ -197,7 +198,7 @@ async def __anext__(self): raise except Exception as err: _LOGGER.warning("Unable to stream download: %s", err) - self.response.close() + self.response.internal_response.close() raise @@ -206,5 +207,4 @@ class AsyncioRequestsTransportResponse(AsyncHttpResponse, RequestsTransportRespo """ def stream_download(self, pipeline) -> AsyncIteratorType[bytes]: # type: ignore """Generator for streaming request body data.""" - return AsyncioStreamDownloadGenerator(pipeline, self.request, - self.internal_response, self.block_size) # type: ignore + return AsyncioStreamDownloadGenerator(pipeline, self) # type: ignore diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/requests_basic.py b/sdk/core/azure-core/azure/core/pipeline/transport/requests_basic.py index 8907937c9a5a..95757edb63dd 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/requests_basic.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/requests_basic.py @@ -65,9 +65,7 @@ def __init__(self, request, requests_response, block_size=None): self.status_code = requests_response.status_code self.headers = requests_response.headers self.reason = requests_response.reason - content_type = requests_response.headers.get('content-type') - if content_type: - self.content_type = content_type.split(";") + self.content_type = requests_response.headers.get('content-type') def body(self): return self.internal_response.content @@ -82,18 +80,16 @@ class StreamDownloadGenerator(object): """Generator for streaming response data. :param pipeline: The pipeline object - :param request: The request object :param response: The response object. - :param int block_size: Number of bytes to read into memory. :param generator iter_content_func: Iterator for response data. :param int content_length: size of body in bytes. """ - def __init__(self, pipeline, request, response, block_size): + def __init__(self, pipeline, response): self.pipeline = pipeline - self.request = request + self.request = response.request self.response = response - self.block_size = block_size - self.iter_content_func = self.response.iter_content(self.block_size) + self.block_size = response.block_size + self.iter_content_func = self.response.internal_response.iter_content(self.block_size) self.content_length = int(response.headers.get('Content-Length', 0)) self.downloaded = 0 @@ -115,7 +111,7 @@ def __next__(self): self.downloaded += self.block_size return chunk except StopIteration: - self.response.close() + self.response.internal_response.close() raise StopIteration() except (requests.exceptions.ChunkedEncodingError, requests.exceptions.ConnectionError): @@ -138,7 +134,7 @@ def __next__(self): raise except Exception as err: _LOGGER.warning("Unable to stream download: %s", err) - self.response.close() + self.response.internal_response.close() raise next = __next__ # Python 2 compatibility. @@ -149,7 +145,7 @@ class RequestsTransportResponse(HttpResponse, _RequestsTransportResponseBase): def stream_download(self, pipeline): # type: (PipelineType) -> Iterator[bytes] """Generator for streaming request body data.""" - return StreamDownloadGenerator(pipeline, self.request, self.internal_response, self.block_size) + return StreamDownloadGenerator(pipeline, self) class RequestsTransport(HttpTransport): diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/requests_trio.py b/sdk/core/azure-core/azure/core/pipeline/transport/requests_trio.py index c3a1c591587b..f27f034033ea 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/requests_trio.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/requests_trio.py @@ -53,18 +53,16 @@ class TrioStreamDownloadGenerator(AsyncIterator): """Generator for streaming response data. :param pipeline: The pipeline object - :param request: The request object :param response: The response object. - :param int block_size: Number of bytes to read into memory. :param generator iter_content_func: Iterator for response data. :param int content_length: size of body in bytes. """ - def __init__(self, pipeline: Pipeline, request: HttpRequest, response: requests.Response, block_size: int) -> None: + def __init__(self, pipeline: Pipeline, response: AsyncHttpResponse) -> None: self.pipeline = pipeline - self.request = request + self.request = response.request self.response = response - self.block_size = block_size - self.iter_content_func = self.response.iter_content(self.block_size) + self.block_size = response.block_size + self.iter_content_func = self.response.internal_response.iter_content(self.block_size) self.content_length = int(response.headers.get('Content-Length', 0)) self.downloaded = 0 @@ -85,7 +83,7 @@ async def __anext__(self): self.downloaded += self.block_size return chunk except _ResponseStopIteration: - self.response.close() + self.response.internal_response.close() raise StopAsyncIteration() except (requests.exceptions.ChunkedEncodingError, requests.exceptions.ConnectionError): @@ -111,7 +109,7 @@ async def __anext__(self): raise except Exception as err: _LOGGER.warning("Unable to stream download: %s", err) - self.response.close() + self.response.internal_response.close() raise class TrioRequestsTransportResponse(AsyncHttpResponse, RequestsTransportResponse): # type: ignore @@ -120,8 +118,7 @@ class TrioRequestsTransportResponse(AsyncHttpResponse, RequestsTransportResponse def stream_download(self, pipeline) -> AsyncIteratorType[bytes]: # type: ignore """Generator for streaming response data. """ - return TrioStreamDownloadGenerator(pipeline, self.request, - self.internal_response, self.block_size) # type: ignore + return TrioStreamDownloadGenerator(pipeline, self) # type: ignore class TrioRequestsTransport(RequestsTransport, AsyncHttpTransport): # type: ignore diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_pipeline.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_pipeline.py index d344a9f90fff..bcefb9b4bb1a 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_pipeline.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_pipeline.py @@ -119,6 +119,23 @@ async def test_basic_async_requests(): assert response.http_response.status_code == 200 +@pytest.mark.asyncio +async def test_async_transport_sleep(): + + async with AsyncioRequestsTransport() as transport: + await transport.sleep(1) + + async with AioHttpTransport() as transport: + await transport.sleep(1) + +def test_async_trio_transport_sleep(): + + async def do(): + async with TrioRequestsTransport() as transport: + await transport.sleep(1) + + response = trio.run(do) + @pytest.mark.asyncio async def test_conf_async_requests(): diff --git a/sdk/core/azure-core/tests/test_universal_pipeline.py b/sdk/core/azure-core/tests/test_universal_pipeline.py index 0049e2277374..cc783b0d4c74 100644 --- a/sdk/core/azure-core/tests/test_universal_pipeline.py +++ b/sdk/core/azure-core/tests/test_universal_pipeline.py @@ -123,9 +123,7 @@ class MockResponse(HttpResponse): def __init__(self, body, content_type): super(MockResponse, self).__init__(None, None) self._body = body - self.content_type = None - if content_type: - self.content_type = [content_type] + self.content_type = content_type def body(self): return self._body diff --git a/sdk/identity/azure-identity/tests/helpers.py b/sdk/identity/azure-identity/tests/helpers.py index 8acb3d5f646b..694a92df922a 100644 --- a/sdk/identity/azure-identity/tests/helpers.py +++ b/sdk/identity/azure-identity/tests/helpers.py @@ -41,7 +41,7 @@ def mock_response(status_code=200, headers={}, json_payload=None): if json_payload is not None: response.text = lambda: json.dumps(json_payload) response.headers["content-type"] = "application/json" - response.content_type = ["application/json"] + response.content_type = "application/json" return response diff --git a/sdk/identity/azure-identity/tests/test_authn_client.py b/sdk/identity/azure-identity/tests/test_authn_client.py index 39889f003627..1aca947b3d89 100644 --- a/sdk/identity/azure-identity/tests/test_authn_client.py +++ b/sdk/identity/azure-identity/tests/test_authn_client.py @@ -28,7 +28,7 @@ def test_authn_client_deserialization(): scope = "scope" mock_response = Mock( - headers={"content-type": "application/json"}, status_code=200, content_type=["application/json"] + headers={"content-type": "application/json"}, status_code=200, content_type="application/json" ) mock_send = Mock(return_value=mock_response) @@ -87,7 +87,7 @@ def test_caching_when_only_expires_in_set(): text=lambda: json.dumps({"access_token": access_token, "expires_in": expires_in, "token_type": "Bearer"}), headers={"content-type": "application/json"}, status_code=200, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) @@ -106,7 +106,7 @@ def test_expires_in_strings(): expected_token = "token" mock_response = Mock( - headers={"content-type": "application/json"}, status_code=200, content_type=["application/json"] + headers={"content-type": "application/json"}, status_code=200, content_type="application/json" ) mock_send = Mock(return_value=mock_response) @@ -133,7 +133,7 @@ def test_cache_expiry(): text=lambda: json.dumps(token_payload), headers={"content-type": "application/json"}, status_code=200, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index c9756ad3b344..b017792595a8 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -191,7 +191,7 @@ def test_imds_credential_cache(): text=lambda: json.dumps(token_payload), headers={"content-type": "application/json"}, status_code=200, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) @@ -219,7 +219,7 @@ def test_imds_credential_retries(): mock_response = Mock( text=lambda: b"{}", headers={"content-type": "application/json", "Retry-After": "0"}, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) diff --git a/sdk/identity/azure-identity/tests/test_identity_async.py b/sdk/identity/azure-identity/tests/test_identity_async.py index ba203cd2eb59..03b53db9eccd 100644 --- a/sdk/identity/azure-identity/tests/test_identity_async.py +++ b/sdk/identity/azure-identity/tests/test_identity_async.py @@ -196,7 +196,7 @@ async def test_imds_credential_cache(): text=lambda: json.dumps(token_payload), headers={"content-type": "application/json"}, status_code=200, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) @@ -225,7 +225,7 @@ async def test_imds_credential_retries(): mock_response = Mock( text=lambda: b"{}", headers={"content-type": "application/json", "Retry-After": "0"}, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) From 359fb95e6cc5ca36f5d63350ee28f0b85bf63db1 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Mon, 29 Jul 2019 14:05:36 -0700 Subject: [PATCH 042/244] decorator only trace very top level function (#6530) --- sdk/core/azure-core/azure/core/tracing/decorator.py | 2 +- .../azure-core/azure/core/tracing/decorator_async.py | 2 +- .../test_tracing_decorator_async.py | 9 +++------ sdk/core/azure-core/tests/test_tracing_decorator.py | 9 +++------ 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 7d5d7bfce407..3986dcaf31ed 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 781e20a6bef2..4df65fee77ef 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index 8b43ddf71a62..82b4f97dc92f 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -139,13 +139,10 @@ async def test_span_with_opencensus_complicated(value): parent = exporter.root assert len(parent.children) == 4 assert parent.children[0].span_data.name == "MockClient.__init__" + assert not parent.children[0].children assert parent.children[1].span_data.name == "MockClient.make_request" - assert parent.children[1].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[1].children[1].span_data.name == "MockClient.make_request" + assert not parent.children[1].children assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index 473060f6097a..764c09396255 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -171,13 +171,10 @@ def test_span_with_opencensus_complicated(self, value): parent = exporter.root assert len(parent.children) == 4 assert parent.children[0].span_data.name == "MockClient.__init__" + assert not parent.children[0].children assert parent.children[1].span_data.name == "MockClient.make_request" - assert parent.children[1].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[1].children[1].span_data.name == "MockClient.make_request" + assert not parent.children[1].children assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children From 61f0fcdce34bb73ca4b1ac58d1c38208ee376314 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Mon, 29 Jul 2019 14:46:26 -0700 Subject: [PATCH 043/244] Import aiohttp only when necessary (#6496) --- sdk/core/azure-core/azure/core/pipeline_client_async.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/core/azure-core/azure/core/pipeline_client_async.py b/sdk/core/azure-core/azure/core/pipeline_client_async.py index 39b6c87c61fb..ad70f9ea7434 100644 --- a/sdk/core/azure-core/azure/core/pipeline_client_async.py +++ b/sdk/core/azure-core/azure/core/pipeline_client_async.py @@ -48,7 +48,6 @@ from .pipeline import AsyncPipeline from .pipeline.transport.base import PipelineClientBase from .pipeline.policies import ContentDecodePolicy -from .pipeline.transport import AioHttpTransport from .pipeline.policies.distributed_tracing import DistributedTracingPolicy @@ -121,6 +120,7 @@ def _build_pipeline(self, config, **kwargs): # pylint: disable=no-self-use ] if not transport: + from .pipeline.transport import AioHttpTransport transport = AioHttpTransport(**kwargs) return AsyncPipeline(transport, policies) From 7d7f828af90c6351057b9a2fa57c8305a37a7ff2 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Mon, 29 Jul 2019 19:03:11 -0700 Subject: [PATCH 044/244] document async transport requirement (#6541) --- sdk/identity/azure-identity/README.md | 6 ++++++ sdk/keyvault/azure-keyvault-keys/README.md | 10 +++++----- sdk/keyvault/azure-keyvault-secrets/README.md | 10 +++++----- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/sdk/identity/azure-identity/README.md b/sdk/identity/azure-identity/README.md index b80aa7cb539b..22b1bf6c2019 100644 --- a/sdk/identity/azure-identity/README.md +++ b/sdk/identity/azure-identity/README.md @@ -173,6 +173,12 @@ client = EventHubClient(host, event_hub_path, credential) ``` ## Async credentials: +This library includes a complete async API supported on Python 3.5+. To use the +async credentials in `azure.identity.aio`, you must first install an async +transport, such as [`aiohttp`](https://pypi.org/project/aiohttp/). See +[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/README.md#transport) +for more information. + This example demonstrates authenticating the asynchronous `SecretClient` from [`azure-keyvault-secrets`][azure_keyvault_secrets] with asynchronous credentials. ```py diff --git a/sdk/keyvault/azure-keyvault-keys/README.md b/sdk/keyvault/azure-keyvault-keys/README.md index 0690e0822427..44d5ee7e9179 100644 --- a/sdk/keyvault/azure-keyvault-keys/README.md +++ b/sdk/keyvault/azure-keyvault-keys/README.md @@ -153,10 +153,11 @@ for key in keys: ``` ### Async operations -Python’s [asyncio package][asyncio_package] and its two keywords `async` and `await` serves to declare, build, execute, and manage asynchronous code. -The package supports async API on Python 3.5+ and is identical to synchronous API. - -The following examples provide code snippets for performing async operations in the Key Client library: +This library includes a complete async API supported on Python 3.5+. To use it, you must +first install an async transport, such as [`aiohttp`](https://pypi.org/project/aiohttp/). +See +[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/README.md#transport) +for more information. ### Asynchronously create a Key `create_rsa_key` and `create_ec_key` create RSA and elliptic curve keys in the vault, respectively. @@ -257,7 +258,6 @@ When you submit a pull request, a CLA-bot will automatically determine whether y This project has adopted the [Microsoft Open Source Code of Conduct][code_of_conduct]. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. -[asyncio_package]: https://docs.python.org/3/library/asyncio.html [azure_cloud_shell]: https://shell.azure.com/bash [azure_core_exceptions]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/docs/exceptions.md [azure_identity]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/identity/azure-identity diff --git a/sdk/keyvault/azure-keyvault-secrets/README.md b/sdk/keyvault/azure-keyvault-secrets/README.md index ab50a297d194..a94af9ac724b 100644 --- a/sdk/keyvault/azure-keyvault-secrets/README.md +++ b/sdk/keyvault/azure-keyvault-secrets/README.md @@ -148,10 +148,11 @@ This example lists all the secrets in the specified Key Vault. ``` ### Async operations -Python’s [asyncio package][asyncio_package] and its two keywords `async` and `await` serves to declare, build, execute, and manage asynchronous code. -The package supports async API on Python 3.5+ and is identical to synchronous API. - -The following examples provide code snippets for performing async operations in the Secret Client library: +This library includes a complete async API supported on Python 3.5+. To use it, you must +first install an async transport, such as [`aiohttp`](https://pypi.org/project/aiohttp/). +See +[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/README.md#transport) +for more information. ### Async create a secret This example creates a secret in the Key Vault with the specified optional arguments. @@ -247,7 +248,6 @@ When you submit a pull request, a CLA-bot will automatically determine whether y This project has adopted the [Microsoft Open Source Code of Conduct][code_of_conduct]. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. -[asyncio_package]: https://docs.python.org/3/library/asyncio.html [azure_cloud_shell]: https://shell.azure.com/bash [azure_core_exceptions]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/docs/exceptions.md [azure_identity]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/identity/azure-identity From b133e8094d1a2f480a10c3ea7d96e535c0d15f33 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 29 Jul 2019 19:44:44 -0700 Subject: [PATCH 045/244] [AutoPR] alertsmanagement/resource-manager (#5697) * Generated from f4b30b3785ae1fa51f4333f2acd863137d9c84b2 (#5696) removed "required" field from ExpandDetectorParameter * Packaging update of azure-mgmt-alertsmanagement * Packaging update of azure-mgmt-alertsmanagement * regenerated package * recent version * update history and version... again... * added note about general breaking changes --- .../azure-mgmt-alertsmanagement/HISTORY.rst | 21 + .../azure-mgmt-alertsmanagement/MANIFEST.in | 4 + .../azure-mgmt-alertsmanagement/README.rst | 21 +- .../azure/mgmt/alertsmanagement/__init__.py | 7 +- ...client.py => _alerts_management_client.py} | 61 +- .../mgmt/alertsmanagement/_configuration.py | 55 + .../mgmt/alertsmanagement/models/__init__.py | 192 +- ....py => _alerts_management_client_enums.py} | 35 + .../mgmt/alertsmanagement/models/_models.py | 1704 +++++++++++++++++ .../alertsmanagement/models/_models_py3.py | 1704 +++++++++++++++++ .../alertsmanagement/models/_paged_models.py | 79 + .../mgmt/alertsmanagement/models/alert.py | 46 - .../models/alert_modification.py | 47 - .../models/alert_modification_item.py | 54 - .../models/alert_modification_item_py3.py | 54 - .../models/alert_modification_properties.py | 41 - .../alert_modification_properties_py3.py | 41 - .../models/alert_modification_py3.py | 47 - .../alertsmanagement/models/alert_paged.py | 27 - .../models/alert_properties.py | 36 - .../models/alert_properties_py3.py | 36 - .../mgmt/alertsmanagement/models/alert_py3.py | 46 - .../alertsmanagement/models/alerts_summary.py | 46 - .../models/alerts_summary_group.py | 41 - .../models/alerts_summary_group_item.py | 41 - .../models/alerts_summary_group_item_py3.py | 41 - .../models/alerts_summary_group_py3.py | 41 - .../models/alerts_summary_py3.py | 46 - .../alertsmanagement/models/essentials.py | 138 -- .../alertsmanagement/models/essentials_py3.py | 138 -- .../mgmt/alertsmanagement/models/operation.py | 32 - .../models/operation_display.py | 40 - .../models/operation_display_py3.py | 40 - .../models/operation_paged.py | 27 - .../alertsmanagement/models/operation_py3.py | 32 - .../mgmt/alertsmanagement/models/resource.py | 45 - .../alertsmanagement/models/resource_py3.py | 45 - .../alertsmanagement/models/smart_group.py | 118 -- .../models/smart_group_aggregated_property.py | 32 - .../smart_group_aggregated_property_py3.py | 32 - .../models/smart_group_modification.py | 47 - .../models/smart_group_modification_item.py | 54 - .../smart_group_modification_item_py3.py | 54 - .../smart_group_modification_properties.py | 45 - ...smart_group_modification_properties_py3.py | 45 - .../models/smart_group_modification_py3.py | 47 - .../models/smart_group_py3.py | 118 -- .../models/smart_groups_list.py | 32 - .../models/smart_groups_list_py3.py | 32 - .../alertsmanagement/operations/__init__.py | 10 +- .../operations/_action_rules_operations.py | 575 ++++++ ...ts_operations.py => _alerts_operations.py} | 162 +- .../{operations.py => _operations.py} | 20 +- .../_smart_detector_alert_rules_operations.py | 436 +++++ ...rations.py => _smart_groups_operations.py} | 180 +- .../azure/mgmt/alertsmanagement/version.py | 2 +- .../azure-mgmt-alertsmanagement/setup.py | 2 +- 57 files changed, 5003 insertions(+), 2191 deletions(-) rename sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/{alerts_management_client.py => _alerts_management_client.py} (57%) create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py rename sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/{alerts_management_client_enums.py => _alerts_management_client_enums.py} (84%) create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models.py create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models_py3.py create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_paged_models.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_paged.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_paged.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list_py3.py create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_action_rules_operations.py rename sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/{alerts_operations.py => _alerts_operations.py} (81%) rename sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/{operations.py => _operations.py} (87%) create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py rename sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/{smart_groups_operations.py => _smart_groups_operations.py} (70%) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/HISTORY.rst b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/HISTORY.rst index 2719b1b9c080..145999b84643 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/HISTORY.rst +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/HISTORY.rst @@ -3,6 +3,27 @@ Release History =============== +0.2.0rc1 (2019-07-29) ++++++++++++++++++++++ + +**Features** + +- Added operation AlertsOperations.meta_data +- Added operation group SmartDetectorAlertRulesOperations +- Added operation group ActionRulesOperations + +**General breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes if from some import. +In summary, some modules were incorrectly visible/importable and have been renamed. This fixed several issues caused by usage of classes that were not supposed to be used in the first place. + +- AlertsManagementClient cannot be imported from `azure.mgmt.alertsmanagement.alerts_management_client` anymore (import from `azure.mgmt.alertsmanagement` works like before) +- AlertsManagementClientConfiguration import has been moved from `azure.mgmt.alertsmanagement.alerts_management_client` to `azure.mgmt.alertsmanagement` +- A model `MyClass` from a "models" sub-module cannot be imported anymore using `azure.mgmt.alertsmanagement.models.my_class` (import from `azure.mgmt.alertsmanagement.models` works like before) +- An operation class `MyClassOperations` from an `operations` sub-module cannot be imported anymore using `azure.mgmt.alertsmanagement.operations.my_class_operations` (import from `azure.mgmt.alertsmanagement.operations` works like before) + +Last but not least, HTTP connection pooling is now enabled by default. You should always use a client as a context manager, or call close(), or use no more than one client per process. + 0.1.0 (2018-09-17) ++++++++++++++++++ diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/MANIFEST.in b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/MANIFEST.in index bb37a2723dae..e4884efef41b 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/MANIFEST.in +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/MANIFEST.in @@ -1 +1,5 @@ +recursive-include tests *.py *.yaml include *.rst +include azure/__init__.py +include azure/mgmt/__init__.py + diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/README.rst b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/README.rst index aa17aea1b51f..dad7b90d290e 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/README.rst +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Alerts Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see For a more complete set of Azure libraries, see the `azure `__ bundle package. -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - Usage ===== diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/__init__.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/__init__.py index 5512ab09648e..97a96941bfdd 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/__init__.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .alerts_management_client import AlertsManagementClient -from .version import VERSION +from ._configuration import AlertsManagementClientConfiguration +from ._alerts_management_client import AlertsManagementClient +__all__ = ['AlertsManagementClient', 'AlertsManagementClientConfiguration'] -__all__ = ['AlertsManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/alerts_management_client.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_alerts_management_client.py similarity index 57% rename from sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/alerts_management_client.py rename to sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_alerts_management_client.py index 735b0c12b85c..dea82c97209f 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/alerts_management_client.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_alerts_management_client.py @@ -11,46 +11,14 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.alerts_operations import AlertsOperations -from .operations.smart_groups_operations import SmartGroupsOperations -from . import models - - -class AlertsManagementClientConfiguration(AzureConfiguration): - """Configuration for AlertsManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'http://localhost' - - super(AlertsManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-alertsmanagement/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import AlertsManagementClientConfiguration +from .operations import Operations +from .operations import AlertsOperations +from .operations import SmartGroupsOperations +from .operations import ActionRulesOperations +from .operations import SmartDetectorAlertRulesOperations +from . import models class AlertsManagementClient(SDKClient): @@ -65,6 +33,10 @@ class AlertsManagementClient(SDKClient): :vartype alerts: azure.mgmt.alertsmanagement.operations.AlertsOperations :ivar smart_groups: SmartGroups operations :vartype smart_groups: azure.mgmt.alertsmanagement.operations.SmartGroupsOperations + :ivar action_rules: ActionRules operations + :vartype action_rules: azure.mgmt.alertsmanagement.operations.ActionRulesOperations + :ivar smart_detector_alert_rules: SmartDetectorAlertRules operations + :vartype smart_detector_alert_rules: azure.mgmt.alertsmanagement.operations.SmartDetectorAlertRulesOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -73,17 +45,18 @@ class AlertsManagementClient(SDKClient): Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. :type subscription_id: str + :param subscription_id1: The Azure subscription id. + :type subscription_id1: str :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, base_url=None): + self, credentials, subscription_id, subscription_id1, base_url=None): - self.config = AlertsManagementClientConfiguration(credentials, subscription_id, base_url) + self.config = AlertsManagementClientConfiguration(credentials, subscription_id, subscription_id1, base_url) super(AlertsManagementClient, 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 = '2018-05-05' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -93,3 +66,7 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.smart_groups = SmartGroupsOperations( self._client, self.config, self._serialize, self._deserialize) + self.action_rules = ActionRulesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.smart_detector_alert_rules = SmartDetectorAlertRulesOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py new file mode 100644 index 000000000000..cc778d8d1c6d --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class AlertsManagementClientConfiguration(AzureConfiguration): + """Configuration for AlertsManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param subscription_id1: The Azure subscription id. + :type subscription_id1: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, subscription_id1, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if subscription_id1 is None: + raise ValueError("Parameter 'subscription_id1' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(AlertsManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-alertsmanagement/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + self.subscription_id1 = subscription_id1 diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py index b5d44aef16b9..84870cf01aa0 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py @@ -10,46 +10,97 @@ # -------------------------------------------------------------------------- try: - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .resource_py3 import Resource - from .essentials_py3 import Essentials - from .alert_properties_py3 import AlertProperties - from .alert_py3 import Alert - from .alert_modification_item_py3 import AlertModificationItem - from .alert_modification_properties_py3 import AlertModificationProperties - from .alert_modification_py3 import AlertModification - from .smart_group_modification_item_py3 import SmartGroupModificationItem - from .smart_group_modification_properties_py3 import SmartGroupModificationProperties - from .smart_group_modification_py3 import SmartGroupModification - from .alerts_summary_group_item_py3 import AlertsSummaryGroupItem - from .alerts_summary_group_py3 import AlertsSummaryGroup - from .alerts_summary_py3 import AlertsSummary - from .smart_group_aggregated_property_py3 import SmartGroupAggregatedProperty - from .smart_group_py3 import SmartGroup - from .smart_groups_list_py3 import SmartGroupsList + from ._models_py3 import ActionGroup + from ._models_py3 import ActionGroupsInformation + from ._models_py3 import ActionRule + from ._models_py3 import ActionRuleProperties + from ._models_py3 import Alert + from ._models_py3 import AlertModification + from ._models_py3 import AlertModificationItem + from ._models_py3 import AlertModificationProperties + from ._models_py3 import AlertProperties + from ._models_py3 import AlertRule + from ._models_py3 import AlertRulePatchObject + from ._models_py3 import AlertsMetaData + from ._models_py3 import AlertsMetaDataProperties + from ._models_py3 import AlertsSummary + from ._models_py3 import AlertsSummaryGroup + from ._models_py3 import AlertsSummaryGroupItem + from ._models_py3 import AzureResource + from ._models_py3 import Condition + from ._models_py3 import Conditions + from ._models_py3 import Detector + from ._models_py3 import Diagnostics + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import ErrorResponse1, ErrorResponse1Exception + from ._models_py3 import ErrorResponseBody + from ._models_py3 import Essentials + from ._models_py3 import ManagedResource + from ._models_py3 import MonitorServiceDetails + from ._models_py3 import MonitorServiceList + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import PatchObject + from ._models_py3 import Resource + from ._models_py3 import Scope + from ._models_py3 import SmartGroup + from ._models_py3 import SmartGroupAggregatedProperty + from ._models_py3 import SmartGroupModification + from ._models_py3 import SmartGroupModificationItem + from ._models_py3 import SmartGroupModificationProperties + from ._models_py3 import Suppression + from ._models_py3 import SuppressionConfig + from ._models_py3 import SuppressionSchedule + from ._models_py3 import ThrottlingInformation except (SyntaxError, ImportError): - from .operation_display import OperationDisplay - from .operation import Operation - from .resource import Resource - from .essentials import Essentials - from .alert_properties import AlertProperties - from .alert import Alert - from .alert_modification_item import AlertModificationItem - from .alert_modification_properties import AlertModificationProperties - from .alert_modification import AlertModification - from .smart_group_modification_item import SmartGroupModificationItem - from .smart_group_modification_properties import SmartGroupModificationProperties - from .smart_group_modification import SmartGroupModification - from .alerts_summary_group_item import AlertsSummaryGroupItem - from .alerts_summary_group import AlertsSummaryGroup - from .alerts_summary import AlertsSummary - from .smart_group_aggregated_property import SmartGroupAggregatedProperty - from .smart_group import SmartGroup - from .smart_groups_list import SmartGroupsList -from .operation_paged import OperationPaged -from .alert_paged import AlertPaged -from .alerts_management_client_enums import ( + from ._models import ActionGroup + from ._models import ActionGroupsInformation + from ._models import ActionRule + from ._models import ActionRuleProperties + from ._models import Alert + from ._models import AlertModification + from ._models import AlertModificationItem + from ._models import AlertModificationProperties + from ._models import AlertProperties + from ._models import AlertRule + from ._models import AlertRulePatchObject + from ._models import AlertsMetaData + from ._models import AlertsMetaDataProperties + from ._models import AlertsSummary + from ._models import AlertsSummaryGroup + from ._models import AlertsSummaryGroupItem + from ._models import AzureResource + from ._models import Condition + from ._models import Conditions + from ._models import Detector + from ._models import Diagnostics + from ._models import ErrorResponse, ErrorResponseException + from ._models import ErrorResponse1, ErrorResponse1Exception + from ._models import ErrorResponseBody + from ._models import Essentials + from ._models import ManagedResource + from ._models import MonitorServiceDetails + from ._models import MonitorServiceList + from ._models import Operation + from ._models import OperationDisplay + from ._models import PatchObject + from ._models import Resource + from ._models import Scope + from ._models import SmartGroup + from ._models import SmartGroupAggregatedProperty + from ._models import SmartGroupModification + from ._models import SmartGroupModificationItem + from ._models import SmartGroupModificationProperties + from ._models import Suppression + from ._models import SuppressionConfig + from ._models import SuppressionSchedule + from ._models import ThrottlingInformation +from ._paged_models import ActionRulePaged +from ._paged_models import AlertPaged +from ._paged_models import AlertRulePaged +from ._paged_models import OperationPaged +from ._paged_models import SmartGroupPaged +from ._alerts_management_client_enums import ( Severity, SignalType, AlertState, @@ -58,6 +109,11 @@ AlertModificationEvent, SmartGroupModificationEvent, State, + ScopeType, + Operator, + SuppressionType, + ActionRuleStatus, + AlertRuleState, TimeRange, AlertsSortByFields, AlertsSummaryGroupByFields, @@ -65,26 +121,53 @@ ) __all__ = [ - 'OperationDisplay', - 'Operation', - 'Resource', - 'Essentials', - 'AlertProperties', + 'ActionGroup', + 'ActionGroupsInformation', + 'ActionRule', + 'ActionRuleProperties', 'Alert', + 'AlertModification', 'AlertModificationItem', 'AlertModificationProperties', - 'AlertModification', - 'SmartGroupModificationItem', - 'SmartGroupModificationProperties', - 'SmartGroupModification', - 'AlertsSummaryGroupItem', - 'AlertsSummaryGroup', + 'AlertProperties', + 'AlertRule', + 'AlertRulePatchObject', + 'AlertsMetaData', + 'AlertsMetaDataProperties', 'AlertsSummary', - 'SmartGroupAggregatedProperty', + 'AlertsSummaryGroup', + 'AlertsSummaryGroupItem', + 'AzureResource', + 'Condition', + 'Conditions', + 'Detector', + 'Diagnostics', + 'ErrorResponse', 'ErrorResponseException', + 'ErrorResponse1', 'ErrorResponse1Exception', + 'ErrorResponseBody', + 'Essentials', + 'ManagedResource', + 'MonitorServiceDetails', + 'MonitorServiceList', + 'Operation', + 'OperationDisplay', + 'PatchObject', + 'Resource', + 'Scope', 'SmartGroup', - 'SmartGroupsList', + 'SmartGroupAggregatedProperty', + 'SmartGroupModification', + 'SmartGroupModificationItem', + 'SmartGroupModificationProperties', + 'Suppression', + 'SuppressionConfig', + 'SuppressionSchedule', + 'ThrottlingInformation', 'OperationPaged', 'AlertPaged', + 'SmartGroupPaged', + 'ActionRulePaged', + 'AlertRulePaged', 'Severity', 'SignalType', 'AlertState', @@ -93,6 +176,11 @@ 'AlertModificationEvent', 'SmartGroupModificationEvent', 'State', + 'ScopeType', + 'Operator', + 'SuppressionType', + 'ActionRuleStatus', + 'AlertRuleState', 'TimeRange', 'AlertsSortByFields', 'AlertsSummaryGroupByFields', diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_management_client_enums.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_alerts_management_client_enums.py similarity index 84% rename from sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_management_client_enums.py rename to sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_alerts_management_client_enums.py index f3295fc6ef88..2d9334e583c7 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_management_client_enums.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_alerts_management_client_enums.py @@ -81,6 +81,41 @@ class State(str, Enum): closed = "Closed" +class ScopeType(str, Enum): + + resource_group = "ResourceGroup" + resource = "Resource" + + +class Operator(str, Enum): + + equals = "Equals" + not_equals = "NotEquals" + contains = "Contains" + does_not_contain = "DoesNotContain" + + +class SuppressionType(str, Enum): + + always = "Always" + once = "Once" + daily = "Daily" + weekly = "Weekly" + monthly = "Monthly" + + +class ActionRuleStatus(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class AlertRuleState(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + class TimeRange(str, Enum): oneh = "1h" diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models.py new file mode 100644 index 000000000000..a602fe2c9347 --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models.py @@ -0,0 +1,1704 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ActionRuleProperties(Model): + """Action rule properties defining scope, conditions, suppression logic for + action rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Suppression, ActionGroup, Diagnostics + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Suppression': 'Suppression', 'ActionGroup': 'ActionGroup', 'Diagnostics': 'Diagnostics'} + } + + def __init__(self, **kwargs): + super(ActionRuleProperties, self).__init__(**kwargs) + self.scope = kwargs.get('scope', None) + self.conditions = kwargs.get('conditions', None) + self.description = kwargs.get('description', None) + self.created_at = None + self.last_modified_at = None + self.created_by = None + self.last_modified_by = None + self.status = kwargs.get('status', None) + self.type = None + + +class ActionGroup(ActionRuleProperties): + """Action Group based Action Rule. + + Action rule with action group configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + :param action_group_id: Required. Action group to trigger if action rule + matches + :type action_group_id: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + 'action_group_id': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'action_group_id': {'key': 'actionGroupId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ActionGroup, self).__init__(**kwargs) + self.action_group_id = kwargs.get('action_group_id', None) + self.type = 'ActionGroup' + + +class ActionGroupsInformation(Model): + """The Action Groups information, used by the alert rule. + + All required parameters must be populated in order to send to Azure. + + :param custom_email_subject: An optional custom email subject to use in + email notifications. + :type custom_email_subject: str + :param custom_webhook_payload: An optional custom web-hook payload to use + in web-hook notifications. + :type custom_webhook_payload: str + :param group_ids: Required. The Action Group resource IDs. + :type group_ids: list[str] + """ + + _validation = { + 'group_ids': {'required': True}, + } + + _attribute_map = { + 'custom_email_subject': {'key': 'customEmailSubject', 'type': 'str'}, + 'custom_webhook_payload': {'key': 'customWebhookPayload', 'type': 'str'}, + 'group_ids': {'key': 'groupIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ActionGroupsInformation, self).__init__(**kwargs) + self.custom_email_subject = kwargs.get('custom_email_subject', None) + self.custom_webhook_payload = kwargs.get('custom_webhook_payload', None) + self.group_ids = kwargs.get('group_ids', None) + + +class Resource(Model): + """An azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + + +class ManagedResource(Resource): + """An azure managed resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ManagedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ActionRule(ManagedResource): + """Action rule object containing target scope, conditions and suppression + logic. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param properties: action rule properties + :type properties: ~azure.mgmt.alertsmanagement.models.ActionRuleProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'ActionRuleProperties'}, + } + + def __init__(self, **kwargs): + super(ActionRule, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class Alert(Resource): + """An alert created in alert management service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: ~azure.mgmt.alertsmanagement.models.AlertProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertProperties'}, + } + + def __init__(self, **kwargs): + super(Alert, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AlertModification(Resource): + """Alert Modification details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.AlertModificationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertModificationProperties'}, + } + + def __init__(self, **kwargs): + super(AlertModification, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AlertModificationItem(Model): + """Alert modification item. + + :param modification_event: Reason for the modification. Possible values + include: 'AlertCreated', 'StateChange', 'MonitorConditionChange' + :type modification_event: str or + ~azure.mgmt.alertsmanagement.models.AlertModificationEvent + :param old_value: Old value + :type old_value: str + :param new_value: New value + :type new_value: str + :param modified_at: Modified date and time + :type modified_at: str + :param modified_by: Modified user details (Principal client name) + :type modified_by: str + :param comments: Modification comments + :type comments: str + :param description: Description of the modification + :type description: str + """ + + _attribute_map = { + 'modification_event': {'key': 'modificationEvent', 'type': 'AlertModificationEvent'}, + 'old_value': {'key': 'oldValue', 'type': 'str'}, + 'new_value': {'key': 'newValue', 'type': 'str'}, + 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AlertModificationItem, self).__init__(**kwargs) + self.modification_event = kwargs.get('modification_event', None) + self.old_value = kwargs.get('old_value', None) + self.new_value = kwargs.get('new_value', None) + self.modified_at = kwargs.get('modified_at', None) + self.modified_by = kwargs.get('modified_by', None) + self.comments = kwargs.get('comments', None) + self.description = kwargs.get('description', None) + + +class AlertModificationProperties(Model): + """Properties of the alert modification item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar alert_id: Unique Id of the alert for which the history is being + retrieved + :vartype alert_id: str + :param modifications: Modification details + :type modifications: + list[~azure.mgmt.alertsmanagement.models.AlertModificationItem] + """ + + _validation = { + 'alert_id': {'readonly': True}, + } + + _attribute_map = { + 'alert_id': {'key': 'alertId', 'type': 'str'}, + 'modifications': {'key': 'modifications', 'type': '[AlertModificationItem]'}, + } + + def __init__(self, **kwargs): + super(AlertModificationProperties, self).__init__(**kwargs) + self.alert_id = None + self.modifications = kwargs.get('modifications', None) + + +class AlertProperties(Model): + """Alert property bag. + + :param essentials: + :type essentials: ~azure.mgmt.alertsmanagement.models.Essentials + :param context: + :type context: object + :param egress_config: + :type egress_config: object + """ + + _attribute_map = { + 'essentials': {'key': 'essentials', 'type': 'Essentials'}, + 'context': {'key': 'context', 'type': 'object'}, + 'egress_config': {'key': 'egressConfig', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AlertProperties, self).__init__(**kwargs) + self.essentials = kwargs.get('essentials', None) + self.context = kwargs.get('context', None) + self.egress_config = kwargs.get('egress_config', None) + + +class AzureResource(Model): + """An Azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param location: The resource location. Default value: "global" . + :type location: str + :param tags: The resource tags. + :type tags: object + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureResource, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.location = kwargs.get('location', "global") + self.tags = kwargs.get('tags', None) + + +class AlertRule(AzureResource): + """The alert rule information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param location: The resource location. Default value: "global" . + :type location: str + :param tags: The resource tags. + :type tags: object + :param description: The alert rule description. + :type description: str + :param state: Required. The alert rule state. Possible values include: + 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.alertsmanagement.models.AlertRuleState + :param severity: Required. The alert rule severity. Possible values + include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param frequency: Required. The alert rule frequency in ISO8601 format. + The time granularity must be in minutes and minimum value is 5 minutes. + :type frequency: timedelta + :param detector: Required. The alert rule's detector. + :type detector: ~azure.mgmt.alertsmanagement.models.Detector + :param scope: Required. The alert rule resources scope. + :type scope: list[str] + :param action_groups: Required. The alert rule actions. + :type action_groups: + ~azure.mgmt.alertsmanagement.models.ActionGroupsInformation + :param throttling: The alert rule throttling information. + :type throttling: + ~azure.mgmt.alertsmanagement.models.ThrottlingInformation + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'state': {'required': True}, + 'severity': {'required': True}, + 'frequency': {'required': True}, + 'detector': {'required': True}, + 'scope': {'required': True}, + 'action_groups': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'duration'}, + 'detector': {'key': 'properties.detector', 'type': 'Detector'}, + 'scope': {'key': 'properties.scope', 'type': '[str]'}, + 'action_groups': {'key': 'properties.actionGroups', 'type': 'ActionGroupsInformation'}, + 'throttling': {'key': 'properties.throttling', 'type': 'ThrottlingInformation'}, + } + + def __init__(self, **kwargs): + super(AlertRule, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.state = kwargs.get('state', None) + self.severity = kwargs.get('severity', None) + self.frequency = kwargs.get('frequency', None) + self.detector = kwargs.get('detector', None) + self.scope = kwargs.get('scope', None) + self.action_groups = kwargs.get('action_groups', None) + self.throttling = kwargs.get('throttling', None) + + +class AlertRulePatchObject(Model): + """The alert rule patch information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param tags: The resource tags. + :type tags: object + :param description: The alert rule description. + :type description: str + :param state: The alert rule state. Possible values include: 'Enabled', + 'Disabled' + :type state: str or ~azure.mgmt.alertsmanagement.models.AlertRuleState + :param severity: The alert rule severity. Possible values include: 'Sev0', + 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param frequency: The alert rule frequency in ISO8601 format. The time + granularity must be in minutes and minimum value is 5 minutes. + :type frequency: timedelta + :param action_groups: The alert rule actions. + :type action_groups: + ~azure.mgmt.alertsmanagement.models.ActionGroupsInformation + :param throttling: The alert rule throttling information. + :type throttling: + ~azure.mgmt.alertsmanagement.models.ThrottlingInformation + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'duration'}, + 'action_groups': {'key': 'properties.actionGroups', 'type': 'ActionGroupsInformation'}, + 'throttling': {'key': 'properties.throttling', 'type': 'ThrottlingInformation'}, + } + + def __init__(self, **kwargs): + super(AlertRulePatchObject, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.tags = kwargs.get('tags', None) + self.description = kwargs.get('description', None) + self.state = kwargs.get('state', None) + self.severity = kwargs.get('severity', None) + self.frequency = kwargs.get('frequency', None) + self.action_groups = kwargs.get('action_groups', None) + self.throttling = kwargs.get('throttling', None) + + +class AlertsMetaData(Model): + """alert meta data information. + + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.AlertsMetaDataProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'AlertsMetaDataProperties'}, + } + + def __init__(self, **kwargs): + super(AlertsMetaData, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AlertsMetaDataProperties(Model): + """alert meta data property bag. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MonitorServiceList + + All required parameters must be populated in order to send to Azure. + + :param metadata_identifier: Required. Constant filled by server. + :type metadata_identifier: str + """ + + _validation = { + 'metadata_identifier': {'required': True}, + } + + _attribute_map = { + 'metadata_identifier': {'key': 'metadataIdentifier', 'type': 'str'}, + } + + _subtype_map = { + 'metadata_identifier': {'MonitorServiceList': 'MonitorServiceList'} + } + + def __init__(self, **kwargs): + super(AlertsMetaDataProperties, self).__init__(**kwargs) + self.metadata_identifier = None + + +class AlertsSummary(Resource): + """Summary of alerts based on the input filters and 'groupby' parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroup + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertsSummaryGroup'}, + } + + def __init__(self, **kwargs): + super(AlertsSummary, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AlertsSummaryGroup(Model): + """Group the result set. + + :param total: Total count of the result set. + :type total: int + :param smart_groups_count: Total count of the smart groups. + :type smart_groups_count: int + :param groupedby: Name of the field aggregated + :type groupedby: str + :param values: List of the items + :type values: + list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] + """ + + _attribute_map = { + 'total': {'key': 'total', 'type': 'int'}, + 'smart_groups_count': {'key': 'smartGroupsCount', 'type': 'int'}, + 'groupedby': {'key': 'groupedby', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryGroup, self).__init__(**kwargs) + self.total = kwargs.get('total', None) + self.smart_groups_count = kwargs.get('smart_groups_count', None) + self.groupedby = kwargs.get('groupedby', None) + self.values = kwargs.get('values', None) + + +class AlertsSummaryGroupItem(Model): + """Alerts summary group item. + + :param name: Value of the aggregated field + :type name: str + :param count: Count of the aggregated field + :type count: int + :param groupedby: Name of the field aggregated + :type groupedby: str + :param values: List of the items + :type values: + list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'groupedby': {'key': 'groupedby', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryGroupItem, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.count = kwargs.get('count', None) + self.groupedby = kwargs.get('groupedby', None) + self.values = kwargs.get('values', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Condition(Model): + """condition to trigger an action rule. + + :param operator: operator for a given condition. Possible values include: + 'Equals', 'NotEquals', 'Contains', 'DoesNotContain' + :type operator: str or ~azure.mgmt.alertsmanagement.models.Operator + :param values: list of values to match for a given condition. + :type values: list[str] + """ + + _attribute_map = { + 'operator': {'key': 'operator', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Condition, self).__init__(**kwargs) + self.operator = kwargs.get('operator', None) + self.values = kwargs.get('values', None) + + +class Conditions(Model): + """Conditions in alert instance to be matched for a given action rule. Default + value is all. Multiple values could be provided with comma separation. + + :param severity: filter alerts by severity + :type severity: ~azure.mgmt.alertsmanagement.models.Condition + :param monitor_service: filter alerts by monitor service + :type monitor_service: ~azure.mgmt.alertsmanagement.models.Condition + :param monitor_condition: filter alerts by monitor condition + :type monitor_condition: ~azure.mgmt.alertsmanagement.models.Condition + :param target_resource_type: filter alerts by target resource type + :type target_resource_type: ~azure.mgmt.alertsmanagement.models.Condition + :param alert_rule_id: filter alerts by alert rule id + :type alert_rule_id: ~azure.mgmt.alertsmanagement.models.Condition + :param description: filter alerts by alert rule description + :type description: ~azure.mgmt.alertsmanagement.models.Condition + :param alert_context: filter alerts by alert context (payload) + :type alert_context: ~azure.mgmt.alertsmanagement.models.Condition + """ + + _attribute_map = { + 'severity': {'key': 'severity', 'type': 'Condition'}, + 'monitor_service': {'key': 'monitorService', 'type': 'Condition'}, + 'monitor_condition': {'key': 'monitorCondition', 'type': 'Condition'}, + 'target_resource_type': {'key': 'targetResourceType', 'type': 'Condition'}, + 'alert_rule_id': {'key': 'alertRuleId', 'type': 'Condition'}, + 'description': {'key': 'description', 'type': 'Condition'}, + 'alert_context': {'key': 'alertContext', 'type': 'Condition'}, + } + + def __init__(self, **kwargs): + super(Conditions, self).__init__(**kwargs) + self.severity = kwargs.get('severity', None) + self.monitor_service = kwargs.get('monitor_service', None) + self.monitor_condition = kwargs.get('monitor_condition', None) + self.target_resource_type = kwargs.get('target_resource_type', None) + self.alert_rule_id = kwargs.get('alert_rule_id', None) + self.description = kwargs.get('description', None) + self.alert_context = kwargs.get('alert_context', None) + + +class Detector(Model): + """The detector information. By default this is not populated, unless it's + specified in expandDetector. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The detector id. + :type id: str + :param parameters: The detector's parameters.' + :type parameters: dict[str, object] + :param name: The Smart Detector name. By default this is not populated, + unless it's specified in expandDetector + :type name: str + :param description: The Smart Detector description. By default this is not + populated, unless it's specified in expandDetector + :type description: str + :param supported_resource_types: The Smart Detector supported resource + types. By default this is not populated, unless it's specified in + expandDetector + :type supported_resource_types: list[str] + :param image_paths: The Smart Detector image path. By default this is not + populated, unless it's specified in expandDetector + :type image_paths: list[str] + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'supported_resource_types': {'key': 'supportedResourceTypes', 'type': '[str]'}, + 'image_paths': {'key': 'imagePaths', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Detector, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.parameters = kwargs.get('parameters', None) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.supported_resource_types = kwargs.get('supported_resource_types', None) + self.image_paths = kwargs.get('image_paths', None) + + +class Diagnostics(ActionRuleProperties): + """Diagnostics based Action Rule. + + Action rule with diagnostics configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Diagnostics, self).__init__(**kwargs) + self.type = 'Diagnostics' + + +class ErrorResponse(Model): + """An error response from the service. + + :param error: + :type error: ~azure.mgmt.alertsmanagement.models.ErrorResponseBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class ErrorResponse1(Model): + """Describe the format of an Error response. + + :param code: Error code + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse1, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class ErrorResponse1Exception(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse1'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponse1Exception, self).__init__(deserialize, response, 'ErrorResponse1', *args) + + +class ErrorResponseBody(Model): + """Details of error response. + + :param code: Error code, intended to be consumed programmatically. + :type code: str + :param message: Description of the error, intended for display in user + interface. + :type message: str + :param target: Target of the particular error, for example name of the + property. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.alertsmanagement.models.ErrorResponseBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorResponseBody]'}, + } + + def __init__(self, **kwargs): + super(ErrorResponseBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class Essentials(Model): + """This object contains consistent fields across different monitor services. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar severity: Severity of alert Sev0 being highest and Sev4 being + lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :ivar signal_type: The type of signal the alert is based on, which could + be metrics, logs or activity logs. Possible values include: 'Metric', + 'Log', 'Unknown' + :vartype signal_type: str or + ~azure.mgmt.alertsmanagement.models.SignalType + :ivar alert_state: Alert object state, which can be modified by the user. + Possible values include: 'New', 'Acknowledged', 'Closed' + :vartype alert_state: str or + ~azure.mgmt.alertsmanagement.models.AlertState + :ivar monitor_condition: Condition of the rule at the monitor service. It + represents whether the underlying conditions have crossed the defined + alert rule thresholds. Possible values include: 'Fired', 'Resolved' + :vartype monitor_condition: str or + ~azure.mgmt.alertsmanagement.models.MonitorCondition + :param target_resource: Target ARM resource, on which alert got created. + :type target_resource: str + :param target_resource_name: Name of the target ARM resource name, on + which alert got created. + :type target_resource_name: str + :param target_resource_group: Resource group of target ARM resource, on + which alert got created. + :type target_resource_group: str + :param target_resource_type: Resource type of target ARM resource, on + which alert got created. + :type target_resource_type: str + :ivar monitor_service: Monitor service on which the rule(monitor) is set. + Possible values include: 'Application Insights', 'ActivityLog + Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', + 'ActivityLog Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', + 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', + 'Zabbix' + :vartype monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :ivar alert_rule: Rule(monitor) which fired alert instance. Depending on + the monitor service, this would be ARM id or name of the rule. + :vartype alert_rule: str + :ivar source_created_id: Unique Id created by monitor service for each + alert instance. This could be used to track the issue at the monitor + service, in case of Nagios, Zabbix, SCOM etc. + :vartype source_created_id: str + :ivar smart_group_id: Unique Id of the smart group + :vartype smart_group_id: str + :ivar smart_grouping_reason: Verbose reason describing the reason why this + alert instance is added to a smart group + :vartype smart_grouping_reason: str + :ivar start_date_time: Creation time(ISO-8601 format) of alert instance. + :vartype start_date_time: datetime + :ivar last_modified_date_time: Last modification time(ISO-8601 format) of + alert instance. + :vartype last_modified_date_time: datetime + :ivar monitor_condition_resolved_date_time: Resolved time(ISO-8601 format) + of alert instance. This will be updated when monitor service resolves the + alert instance because the rule condition is no longer met. + :vartype monitor_condition_resolved_date_time: datetime + :ivar last_modified_user_name: User who last modified the alert, in case + of monitor service updates user would be 'system', otherwise name of the + user. + :vartype last_modified_user_name: str + """ + + _validation = { + 'severity': {'readonly': True}, + 'signal_type': {'readonly': True}, + 'alert_state': {'readonly': True}, + 'monitor_condition': {'readonly': True}, + 'monitor_service': {'readonly': True}, + 'alert_rule': {'readonly': True}, + 'source_created_id': {'readonly': True}, + 'smart_group_id': {'readonly': True}, + 'smart_grouping_reason': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'monitor_condition_resolved_date_time': {'readonly': True}, + 'last_modified_user_name': {'readonly': True}, + } + + _attribute_map = { + 'severity': {'key': 'severity', 'type': 'str'}, + 'signal_type': {'key': 'signalType', 'type': 'str'}, + 'alert_state': {'key': 'alertState', 'type': 'str'}, + 'monitor_condition': {'key': 'monitorCondition', 'type': 'str'}, + 'target_resource': {'key': 'targetResource', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'target_resource_type': {'key': 'targetResourceType', 'type': 'str'}, + 'monitor_service': {'key': 'monitorService', 'type': 'str'}, + 'alert_rule': {'key': 'alertRule', 'type': 'str'}, + 'source_created_id': {'key': 'sourceCreatedId', 'type': 'str'}, + 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, + 'smart_grouping_reason': {'key': 'smartGroupingReason', 'type': 'str'}, + 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, + 'monitor_condition_resolved_date_time': {'key': 'monitorConditionResolvedDateTime', 'type': 'iso-8601'}, + 'last_modified_user_name': {'key': 'lastModifiedUserName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Essentials, self).__init__(**kwargs) + self.severity = None + self.signal_type = None + self.alert_state = None + self.monitor_condition = None + self.target_resource = kwargs.get('target_resource', None) + self.target_resource_name = kwargs.get('target_resource_name', None) + self.target_resource_group = kwargs.get('target_resource_group', None) + self.target_resource_type = kwargs.get('target_resource_type', None) + self.monitor_service = None + self.alert_rule = None + self.source_created_id = None + self.smart_group_id = None + self.smart_grouping_reason = None + self.start_date_time = None + self.last_modified_date_time = None + self.monitor_condition_resolved_date_time = None + self.last_modified_user_name = None + + +class MonitorServiceDetails(Model): + """Details of a monitor service. + + :param name: Monitor service name + :type name: str + :param display_name: Monitor service display name + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MonitorServiceDetails, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + + +class MonitorServiceList(AlertsMetaDataProperties): + """Monitor service details. + + Monitor service details. + + All required parameters must be populated in order to send to Azure. + + :param metadata_identifier: Required. Constant filled by server. + :type metadata_identifier: str + :param data: Required. Array of operations + :type data: + list[~azure.mgmt.alertsmanagement.models.MonitorServiceDetails] + """ + + _validation = { + 'metadata_identifier': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'metadata_identifier': {'key': 'metadataIdentifier', 'type': 'str'}, + 'data': {'key': 'data', 'type': '[MonitorServiceDetails]'}, + } + + def __init__(self, **kwargs): + super(MonitorServiceList, self).__init__(**kwargs) + self.data = kwargs.get('data', None) + self.metadata_identifier = 'MonitorServiceList' + + +class Operation(Model): + """Operation provided by provider. + + :param name: Name of the operation + :type name: str + :param display: Properties of the operation + :type display: ~azure.mgmt.alertsmanagement.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """Properties of the operation. + + :param provider: Provider name + :type provider: str + :param resource: Resource name + :type resource: str + :param operation: Operation name + :type operation: str + :param description: Description of the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class PatchObject(Model): + """Data contract for patch. + + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param tags: tags to be updated + :type tags: object + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(PatchObject, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.tags = kwargs.get('tags', None) + + +class Scope(Model): + """Target scope for a given action rule. By default scope will be the + subscription. User can also provide list of resource groups or list of + resources from the scope subscription as well. + + :param scope_type: type of target scope. Possible values include: + 'ResourceGroup', 'Resource' + :type scope_type: str or ~azure.mgmt.alertsmanagement.models.ScopeType + :param values: list of ARM IDs of the given scope type which will be the + target of the given action rule. + :type values: list[str] + """ + + _attribute_map = { + 'scope_type': {'key': 'scopeType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Scope, self).__init__(**kwargs) + self.scope_type = kwargs.get('scope_type', None) + self.values = kwargs.get('values', None) + + +class SmartGroup(Resource): + """Set of related alerts grouped together smartly by AMS. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param alerts_count: Total number of alerts in smart group + :type alerts_count: int + :ivar smart_group_state: Smart group state. Possible values include: + 'New', 'Acknowledged', 'Closed' + :vartype smart_group_state: str or + ~azure.mgmt.alertsmanagement.models.State + :ivar severity: Severity of smart group is the highest(Sev0 >... > Sev4) + severity of all the alerts in the group. Possible values include: 'Sev0', + 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :ivar start_date_time: Creation time of smart group. Date-Time in ISO-8601 + format. + :vartype start_date_time: datetime + :ivar last_modified_date_time: Last updated time of smart group. Date-Time + in ISO-8601 format. + :vartype last_modified_date_time: datetime + :ivar last_modified_user_name: Last modified by user name. + :vartype last_modified_user_name: str + :param resources: Summary of target resources in the smart group + :type resources: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param resource_types: Summary of target resource types in the smart group + :type resource_types: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param resource_groups: Summary of target resource groups in the smart + group + :type resource_groups: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param monitor_services: Summary of monitorServices in the smart group + :type monitor_services: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param monitor_conditions: Summary of monitorConditions in the smart group + :type monitor_conditions: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param alert_states: Summary of alertStates in the smart group + :type alert_states: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param alert_severities: Summary of alertSeverities in the smart group + :type alert_severities: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param next_link: The URI to fetch the next page of alerts. Call + ListNext() with this URI to fetch the next page alerts. + :type next_link: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'smart_group_state': {'readonly': True}, + 'severity': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'last_modified_user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'alerts_count': {'key': 'properties.alertsCount', 'type': 'int'}, + 'smart_group_state': {'key': 'properties.smartGroupState', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'properties.lastModifiedDateTime', 'type': 'iso-8601'}, + 'last_modified_user_name': {'key': 'properties.lastModifiedUserName', 'type': 'str'}, + 'resources': {'key': 'properties.resources', 'type': '[SmartGroupAggregatedProperty]'}, + 'resource_types': {'key': 'properties.resourceTypes', 'type': '[SmartGroupAggregatedProperty]'}, + 'resource_groups': {'key': 'properties.resourceGroups', 'type': '[SmartGroupAggregatedProperty]'}, + 'monitor_services': {'key': 'properties.monitorServices', 'type': '[SmartGroupAggregatedProperty]'}, + 'monitor_conditions': {'key': 'properties.monitorConditions', 'type': '[SmartGroupAggregatedProperty]'}, + 'alert_states': {'key': 'properties.alertStates', 'type': '[SmartGroupAggregatedProperty]'}, + 'alert_severities': {'key': 'properties.alertSeverities', 'type': '[SmartGroupAggregatedProperty]'}, + 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SmartGroup, self).__init__(**kwargs) + self.alerts_count = kwargs.get('alerts_count', None) + self.smart_group_state = None + self.severity = None + self.start_date_time = None + self.last_modified_date_time = None + self.last_modified_user_name = None + self.resources = kwargs.get('resources', None) + self.resource_types = kwargs.get('resource_types', None) + self.resource_groups = kwargs.get('resource_groups', None) + self.monitor_services = kwargs.get('monitor_services', None) + self.monitor_conditions = kwargs.get('monitor_conditions', None) + self.alert_states = kwargs.get('alert_states', None) + self.alert_severities = kwargs.get('alert_severities', None) + self.next_link = kwargs.get('next_link', None) + + +class SmartGroupAggregatedProperty(Model): + """Aggregated property of each type. + + :param name: Name of the type. + :type name: str + :param count: Total number of items of type. + :type count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(SmartGroupAggregatedProperty, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.count = kwargs.get('count', None) + + +class SmartGroupModification(Resource): + """Alert Modification details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.SmartGroupModificationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'SmartGroupModificationProperties'}, + } + + def __init__(self, **kwargs): + super(SmartGroupModification, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class SmartGroupModificationItem(Model): + """smartGroup modification item. + + :param modification_event: Reason for the modification. Possible values + include: 'SmartGroupCreated', 'StateChange', 'AlertAdded', 'AlertRemoved' + :type modification_event: str or + ~azure.mgmt.alertsmanagement.models.SmartGroupModificationEvent + :param old_value: Old value + :type old_value: str + :param new_value: New value + :type new_value: str + :param modified_at: Modified date and time + :type modified_at: str + :param modified_by: Modified user details (Principal client name) + :type modified_by: str + :param comments: Modification comments + :type comments: str + :param description: Description of the modification + :type description: str + """ + + _attribute_map = { + 'modification_event': {'key': 'modificationEvent', 'type': 'SmartGroupModificationEvent'}, + 'old_value': {'key': 'oldValue', 'type': 'str'}, + 'new_value': {'key': 'newValue', 'type': 'str'}, + 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SmartGroupModificationItem, self).__init__(**kwargs) + self.modification_event = kwargs.get('modification_event', None) + self.old_value = kwargs.get('old_value', None) + self.new_value = kwargs.get('new_value', None) + self.modified_at = kwargs.get('modified_at', None) + self.modified_by = kwargs.get('modified_by', None) + self.comments = kwargs.get('comments', None) + self.description = kwargs.get('description', None) + + +class SmartGroupModificationProperties(Model): + """Properties of the smartGroup modification item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar smart_group_id: Unique Id of the smartGroup for which the history is + being retrieved + :vartype smart_group_id: str + :param modifications: Modification details + :type modifications: + list[~azure.mgmt.alertsmanagement.models.SmartGroupModificationItem] + :param next_link: URL to fetch the next set of results. + :type next_link: str + """ + + _validation = { + 'smart_group_id': {'readonly': True}, + } + + _attribute_map = { + 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, + 'modifications': {'key': 'modifications', 'type': '[SmartGroupModificationItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SmartGroupModificationProperties, self).__init__(**kwargs) + self.smart_group_id = None + self.modifications = kwargs.get('modifications', None) + self.next_link = kwargs.get('next_link', None) + + +class Suppression(ActionRuleProperties): + """Suppression based Action Rule. + + Action rule with suppression configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + :param suppression_config: Required. suppression configuration for the + action rule + :type suppression_config: + ~azure.mgmt.alertsmanagement.models.SuppressionConfig + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + 'suppression_config': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'suppression_config': {'key': 'suppressionConfig', 'type': 'SuppressionConfig'}, + } + + def __init__(self, **kwargs): + super(Suppression, self).__init__(**kwargs) + self.suppression_config = kwargs.get('suppression_config', None) + self.type = 'Suppression' + + +class SuppressionConfig(Model): + """Suppression logic for a given action rule. + + All required parameters must be populated in order to send to Azure. + + :param recurrence_type: Required. Specifies when the suppression should be + applied. Possible values include: 'Always', 'Once', 'Daily', 'Weekly', + 'Monthly' + :type recurrence_type: str or + ~azure.mgmt.alertsmanagement.models.SuppressionType + :param schedule: suppression schedule configuration + :type schedule: ~azure.mgmt.alertsmanagement.models.SuppressionSchedule + """ + + _validation = { + 'recurrence_type': {'required': True}, + } + + _attribute_map = { + 'recurrence_type': {'key': 'recurrenceType', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'SuppressionSchedule'}, + } + + def __init__(self, **kwargs): + super(SuppressionConfig, self).__init__(**kwargs) + self.recurrence_type = kwargs.get('recurrence_type', None) + self.schedule = kwargs.get('schedule', None) + + +class SuppressionSchedule(Model): + """Schedule for a given suppression configuration. + + :param start_date: Start date for suppression + :type start_date: str + :param end_date: End date for suppression + :type end_date: str + :param start_time: Start time for suppression + :type start_time: str + :param end_time: End date for suppression + :type end_time: str + :param recurrence_values: Specifies the values for recurrence pattern + :type recurrence_values: list[int] + """ + + _attribute_map = { + 'start_date': {'key': 'startDate', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'recurrence_values': {'key': 'recurrenceValues', 'type': '[int]'}, + } + + def __init__(self, **kwargs): + super(SuppressionSchedule, self).__init__(**kwargs) + self.start_date = kwargs.get('start_date', None) + self.end_date = kwargs.get('end_date', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.recurrence_values = kwargs.get('recurrence_values', None) + + +class ThrottlingInformation(Model): + """Optional throttling information for the alert rule. + + :param duration: The required duration (in ISO8601 format) to wait before + notifying on the alert rule again. The time granularity must be in minutes + and minimum value is 0 minutes + :type duration: timedelta + """ + + _attribute_map = { + 'duration': {'key': 'duration', 'type': 'duration'}, + } + + def __init__(self, **kwargs): + super(ThrottlingInformation, self).__init__(**kwargs) + self.duration = kwargs.get('duration', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models_py3.py new file mode 100644 index 000000000000..635be9d76f8e --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models_py3.py @@ -0,0 +1,1704 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ActionRuleProperties(Model): + """Action rule properties defining scope, conditions, suppression logic for + action rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Suppression, ActionGroup, Diagnostics + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Suppression': 'Suppression', 'ActionGroup': 'ActionGroup', 'Diagnostics': 'Diagnostics'} + } + + def __init__(self, *, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(ActionRuleProperties, self).__init__(**kwargs) + self.scope = scope + self.conditions = conditions + self.description = description + self.created_at = None + self.last_modified_at = None + self.created_by = None + self.last_modified_by = None + self.status = status + self.type = None + + +class ActionGroup(ActionRuleProperties): + """Action Group based Action Rule. + + Action rule with action group configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + :param action_group_id: Required. Action group to trigger if action rule + matches + :type action_group_id: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + 'action_group_id': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'action_group_id': {'key': 'actionGroupId', 'type': 'str'}, + } + + def __init__(self, *, action_group_id: str, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(ActionGroup, self).__init__(scope=scope, conditions=conditions, description=description, status=status, **kwargs) + self.action_group_id = action_group_id + self.type = 'ActionGroup' + + +class ActionGroupsInformation(Model): + """The Action Groups information, used by the alert rule. + + All required parameters must be populated in order to send to Azure. + + :param custom_email_subject: An optional custom email subject to use in + email notifications. + :type custom_email_subject: str + :param custom_webhook_payload: An optional custom web-hook payload to use + in web-hook notifications. + :type custom_webhook_payload: str + :param group_ids: Required. The Action Group resource IDs. + :type group_ids: list[str] + """ + + _validation = { + 'group_ids': {'required': True}, + } + + _attribute_map = { + 'custom_email_subject': {'key': 'customEmailSubject', 'type': 'str'}, + 'custom_webhook_payload': {'key': 'customWebhookPayload', 'type': 'str'}, + 'group_ids': {'key': 'groupIds', 'type': '[str]'}, + } + + def __init__(self, *, group_ids, custom_email_subject: str=None, custom_webhook_payload: str=None, **kwargs) -> None: + super(ActionGroupsInformation, self).__init__(**kwargs) + self.custom_email_subject = custom_email_subject + self.custom_webhook_payload = custom_webhook_payload + self.group_ids = group_ids + + +class Resource(Model): + """An azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + + +class ManagedResource(Resource): + """An azure managed resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(ManagedResource, self).__init__(**kwargs) + self.location = location + self.tags = tags + + +class ActionRule(ManagedResource): + """Action rule object containing target scope, conditions and suppression + logic. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param properties: action rule properties + :type properties: ~azure.mgmt.alertsmanagement.models.ActionRuleProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'ActionRuleProperties'}, + } + + def __init__(self, *, location: str, tags=None, properties=None, **kwargs) -> None: + super(ActionRule, self).__init__(location=location, tags=tags, **kwargs) + self.properties = properties + + +class Alert(Resource): + """An alert created in alert management service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: ~azure.mgmt.alertsmanagement.models.AlertProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(Alert, self).__init__(**kwargs) + self.properties = properties + + +class AlertModification(Resource): + """Alert Modification details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.AlertModificationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertModificationProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(AlertModification, self).__init__(**kwargs) + self.properties = properties + + +class AlertModificationItem(Model): + """Alert modification item. + + :param modification_event: Reason for the modification. Possible values + include: 'AlertCreated', 'StateChange', 'MonitorConditionChange' + :type modification_event: str or + ~azure.mgmt.alertsmanagement.models.AlertModificationEvent + :param old_value: Old value + :type old_value: str + :param new_value: New value + :type new_value: str + :param modified_at: Modified date and time + :type modified_at: str + :param modified_by: Modified user details (Principal client name) + :type modified_by: str + :param comments: Modification comments + :type comments: str + :param description: Description of the modification + :type description: str + """ + + _attribute_map = { + 'modification_event': {'key': 'modificationEvent', 'type': 'AlertModificationEvent'}, + 'old_value': {'key': 'oldValue', 'type': 'str'}, + 'new_value': {'key': 'newValue', 'type': 'str'}, + 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, modification_event=None, old_value: str=None, new_value: str=None, modified_at: str=None, modified_by: str=None, comments: str=None, description: str=None, **kwargs) -> None: + super(AlertModificationItem, self).__init__(**kwargs) + self.modification_event = modification_event + self.old_value = old_value + self.new_value = new_value + self.modified_at = modified_at + self.modified_by = modified_by + self.comments = comments + self.description = description + + +class AlertModificationProperties(Model): + """Properties of the alert modification item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar alert_id: Unique Id of the alert for which the history is being + retrieved + :vartype alert_id: str + :param modifications: Modification details + :type modifications: + list[~azure.mgmt.alertsmanagement.models.AlertModificationItem] + """ + + _validation = { + 'alert_id': {'readonly': True}, + } + + _attribute_map = { + 'alert_id': {'key': 'alertId', 'type': 'str'}, + 'modifications': {'key': 'modifications', 'type': '[AlertModificationItem]'}, + } + + def __init__(self, *, modifications=None, **kwargs) -> None: + super(AlertModificationProperties, self).__init__(**kwargs) + self.alert_id = None + self.modifications = modifications + + +class AlertProperties(Model): + """Alert property bag. + + :param essentials: + :type essentials: ~azure.mgmt.alertsmanagement.models.Essentials + :param context: + :type context: object + :param egress_config: + :type egress_config: object + """ + + _attribute_map = { + 'essentials': {'key': 'essentials', 'type': 'Essentials'}, + 'context': {'key': 'context', 'type': 'object'}, + 'egress_config': {'key': 'egressConfig', 'type': 'object'}, + } + + def __init__(self, *, essentials=None, context=None, egress_config=None, **kwargs) -> None: + super(AlertProperties, self).__init__(**kwargs) + self.essentials = essentials + self.context = context + self.egress_config = egress_config + + +class AzureResource(Model): + """An Azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param location: The resource location. Default value: "global" . + :type location: str + :param tags: The resource tags. + :type tags: object + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + } + + def __init__(self, *, location: str="global", tags=None, **kwargs) -> None: + super(AzureResource, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.location = location + self.tags = tags + + +class AlertRule(AzureResource): + """The alert rule information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param location: The resource location. Default value: "global" . + :type location: str + :param tags: The resource tags. + :type tags: object + :param description: The alert rule description. + :type description: str + :param state: Required. The alert rule state. Possible values include: + 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.alertsmanagement.models.AlertRuleState + :param severity: Required. The alert rule severity. Possible values + include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param frequency: Required. The alert rule frequency in ISO8601 format. + The time granularity must be in minutes and minimum value is 5 minutes. + :type frequency: timedelta + :param detector: Required. The alert rule's detector. + :type detector: ~azure.mgmt.alertsmanagement.models.Detector + :param scope: Required. The alert rule resources scope. + :type scope: list[str] + :param action_groups: Required. The alert rule actions. + :type action_groups: + ~azure.mgmt.alertsmanagement.models.ActionGroupsInformation + :param throttling: The alert rule throttling information. + :type throttling: + ~azure.mgmt.alertsmanagement.models.ThrottlingInformation + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'state': {'required': True}, + 'severity': {'required': True}, + 'frequency': {'required': True}, + 'detector': {'required': True}, + 'scope': {'required': True}, + 'action_groups': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'duration'}, + 'detector': {'key': 'properties.detector', 'type': 'Detector'}, + 'scope': {'key': 'properties.scope', 'type': '[str]'}, + 'action_groups': {'key': 'properties.actionGroups', 'type': 'ActionGroupsInformation'}, + 'throttling': {'key': 'properties.throttling', 'type': 'ThrottlingInformation'}, + } + + def __init__(self, *, state, severity, frequency, detector, scope, action_groups, location: str="global", tags=None, description: str=None, throttling=None, **kwargs) -> None: + super(AlertRule, self).__init__(location=location, tags=tags, **kwargs) + self.description = description + self.state = state + self.severity = severity + self.frequency = frequency + self.detector = detector + self.scope = scope + self.action_groups = action_groups + self.throttling = throttling + + +class AlertRulePatchObject(Model): + """The alert rule patch information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param tags: The resource tags. + :type tags: object + :param description: The alert rule description. + :type description: str + :param state: The alert rule state. Possible values include: 'Enabled', + 'Disabled' + :type state: str or ~azure.mgmt.alertsmanagement.models.AlertRuleState + :param severity: The alert rule severity. Possible values include: 'Sev0', + 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param frequency: The alert rule frequency in ISO8601 format. The time + granularity must be in minutes and minimum value is 5 minutes. + :type frequency: timedelta + :param action_groups: The alert rule actions. + :type action_groups: + ~azure.mgmt.alertsmanagement.models.ActionGroupsInformation + :param throttling: The alert rule throttling information. + :type throttling: + ~azure.mgmt.alertsmanagement.models.ThrottlingInformation + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'duration'}, + 'action_groups': {'key': 'properties.actionGroups', 'type': 'ActionGroupsInformation'}, + 'throttling': {'key': 'properties.throttling', 'type': 'ThrottlingInformation'}, + } + + def __init__(self, *, tags=None, description: str=None, state=None, severity=None, frequency=None, action_groups=None, throttling=None, **kwargs) -> None: + super(AlertRulePatchObject, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.tags = tags + self.description = description + self.state = state + self.severity = severity + self.frequency = frequency + self.action_groups = action_groups + self.throttling = throttling + + +class AlertsMetaData(Model): + """alert meta data information. + + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.AlertsMetaDataProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'AlertsMetaDataProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(AlertsMetaData, self).__init__(**kwargs) + self.properties = properties + + +class AlertsMetaDataProperties(Model): + """alert meta data property bag. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MonitorServiceList + + All required parameters must be populated in order to send to Azure. + + :param metadata_identifier: Required. Constant filled by server. + :type metadata_identifier: str + """ + + _validation = { + 'metadata_identifier': {'required': True}, + } + + _attribute_map = { + 'metadata_identifier': {'key': 'metadataIdentifier', 'type': 'str'}, + } + + _subtype_map = { + 'metadata_identifier': {'MonitorServiceList': 'MonitorServiceList'} + } + + def __init__(self, **kwargs) -> None: + super(AlertsMetaDataProperties, self).__init__(**kwargs) + self.metadata_identifier = None + + +class AlertsSummary(Resource): + """Summary of alerts based on the input filters and 'groupby' parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroup + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertsSummaryGroup'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(AlertsSummary, self).__init__(**kwargs) + self.properties = properties + + +class AlertsSummaryGroup(Model): + """Group the result set. + + :param total: Total count of the result set. + :type total: int + :param smart_groups_count: Total count of the smart groups. + :type smart_groups_count: int + :param groupedby: Name of the field aggregated + :type groupedby: str + :param values: List of the items + :type values: + list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] + """ + + _attribute_map = { + 'total': {'key': 'total', 'type': 'int'}, + 'smart_groups_count': {'key': 'smartGroupsCount', 'type': 'int'}, + 'groupedby': {'key': 'groupedby', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, + } + + def __init__(self, *, total: int=None, smart_groups_count: int=None, groupedby: str=None, values=None, **kwargs) -> None: + super(AlertsSummaryGroup, self).__init__(**kwargs) + self.total = total + self.smart_groups_count = smart_groups_count + self.groupedby = groupedby + self.values = values + + +class AlertsSummaryGroupItem(Model): + """Alerts summary group item. + + :param name: Value of the aggregated field + :type name: str + :param count: Count of the aggregated field + :type count: int + :param groupedby: Name of the field aggregated + :type groupedby: str + :param values: List of the items + :type values: + list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'groupedby': {'key': 'groupedby', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, + } + + def __init__(self, *, name: str=None, count: int=None, groupedby: str=None, values=None, **kwargs) -> None: + super(AlertsSummaryGroupItem, self).__init__(**kwargs) + self.name = name + self.count = count + self.groupedby = groupedby + self.values = values + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Condition(Model): + """condition to trigger an action rule. + + :param operator: operator for a given condition. Possible values include: + 'Equals', 'NotEquals', 'Contains', 'DoesNotContain' + :type operator: str or ~azure.mgmt.alertsmanagement.models.Operator + :param values: list of values to match for a given condition. + :type values: list[str] + """ + + _attribute_map = { + 'operator': {'key': 'operator', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, *, operator=None, values=None, **kwargs) -> None: + super(Condition, self).__init__(**kwargs) + self.operator = operator + self.values = values + + +class Conditions(Model): + """Conditions in alert instance to be matched for a given action rule. Default + value is all. Multiple values could be provided with comma separation. + + :param severity: filter alerts by severity + :type severity: ~azure.mgmt.alertsmanagement.models.Condition + :param monitor_service: filter alerts by monitor service + :type monitor_service: ~azure.mgmt.alertsmanagement.models.Condition + :param monitor_condition: filter alerts by monitor condition + :type monitor_condition: ~azure.mgmt.alertsmanagement.models.Condition + :param target_resource_type: filter alerts by target resource type + :type target_resource_type: ~azure.mgmt.alertsmanagement.models.Condition + :param alert_rule_id: filter alerts by alert rule id + :type alert_rule_id: ~azure.mgmt.alertsmanagement.models.Condition + :param description: filter alerts by alert rule description + :type description: ~azure.mgmt.alertsmanagement.models.Condition + :param alert_context: filter alerts by alert context (payload) + :type alert_context: ~azure.mgmt.alertsmanagement.models.Condition + """ + + _attribute_map = { + 'severity': {'key': 'severity', 'type': 'Condition'}, + 'monitor_service': {'key': 'monitorService', 'type': 'Condition'}, + 'monitor_condition': {'key': 'monitorCondition', 'type': 'Condition'}, + 'target_resource_type': {'key': 'targetResourceType', 'type': 'Condition'}, + 'alert_rule_id': {'key': 'alertRuleId', 'type': 'Condition'}, + 'description': {'key': 'description', 'type': 'Condition'}, + 'alert_context': {'key': 'alertContext', 'type': 'Condition'}, + } + + def __init__(self, *, severity=None, monitor_service=None, monitor_condition=None, target_resource_type=None, alert_rule_id=None, description=None, alert_context=None, **kwargs) -> None: + super(Conditions, self).__init__(**kwargs) + self.severity = severity + self.monitor_service = monitor_service + self.monitor_condition = monitor_condition + self.target_resource_type = target_resource_type + self.alert_rule_id = alert_rule_id + self.description = description + self.alert_context = alert_context + + +class Detector(Model): + """The detector information. By default this is not populated, unless it's + specified in expandDetector. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The detector id. + :type id: str + :param parameters: The detector's parameters.' + :type parameters: dict[str, object] + :param name: The Smart Detector name. By default this is not populated, + unless it's specified in expandDetector + :type name: str + :param description: The Smart Detector description. By default this is not + populated, unless it's specified in expandDetector + :type description: str + :param supported_resource_types: The Smart Detector supported resource + types. By default this is not populated, unless it's specified in + expandDetector + :type supported_resource_types: list[str] + :param image_paths: The Smart Detector image path. By default this is not + populated, unless it's specified in expandDetector + :type image_paths: list[str] + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'supported_resource_types': {'key': 'supportedResourceTypes', 'type': '[str]'}, + 'image_paths': {'key': 'imagePaths', 'type': '[str]'}, + } + + def __init__(self, *, id: str, parameters=None, name: str=None, description: str=None, supported_resource_types=None, image_paths=None, **kwargs) -> None: + super(Detector, self).__init__(**kwargs) + self.id = id + self.parameters = parameters + self.name = name + self.description = description + self.supported_resource_types = supported_resource_types + self.image_paths = image_paths + + +class Diagnostics(ActionRuleProperties): + """Diagnostics based Action Rule. + + Action rule with diagnostics configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(Diagnostics, self).__init__(scope=scope, conditions=conditions, description=description, status=status, **kwargs) + self.type = 'Diagnostics' + + +class ErrorResponse(Model): + """An error response from the service. + + :param error: + :type error: ~azure.mgmt.alertsmanagement.models.ErrorResponseBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class ErrorResponse1(Model): + """Describe the format of an Error response. + + :param code: Error code + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(ErrorResponse1, self).__init__(**kwargs) + self.code = code + self.message = message + + +class ErrorResponse1Exception(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse1'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponse1Exception, self).__init__(deserialize, response, 'ErrorResponse1', *args) + + +class ErrorResponseBody(Model): + """Details of error response. + + :param code: Error code, intended to be consumed programmatically. + :type code: str + :param message: Description of the error, intended for display in user + interface. + :type message: str + :param target: Target of the particular error, for example name of the + property. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.alertsmanagement.models.ErrorResponseBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorResponseBody]'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + super(ErrorResponseBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class Essentials(Model): + """This object contains consistent fields across different monitor services. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar severity: Severity of alert Sev0 being highest and Sev4 being + lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :ivar signal_type: The type of signal the alert is based on, which could + be metrics, logs or activity logs. Possible values include: 'Metric', + 'Log', 'Unknown' + :vartype signal_type: str or + ~azure.mgmt.alertsmanagement.models.SignalType + :ivar alert_state: Alert object state, which can be modified by the user. + Possible values include: 'New', 'Acknowledged', 'Closed' + :vartype alert_state: str or + ~azure.mgmt.alertsmanagement.models.AlertState + :ivar monitor_condition: Condition of the rule at the monitor service. It + represents whether the underlying conditions have crossed the defined + alert rule thresholds. Possible values include: 'Fired', 'Resolved' + :vartype monitor_condition: str or + ~azure.mgmt.alertsmanagement.models.MonitorCondition + :param target_resource: Target ARM resource, on which alert got created. + :type target_resource: str + :param target_resource_name: Name of the target ARM resource name, on + which alert got created. + :type target_resource_name: str + :param target_resource_group: Resource group of target ARM resource, on + which alert got created. + :type target_resource_group: str + :param target_resource_type: Resource type of target ARM resource, on + which alert got created. + :type target_resource_type: str + :ivar monitor_service: Monitor service on which the rule(monitor) is set. + Possible values include: 'Application Insights', 'ActivityLog + Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', + 'ActivityLog Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', + 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', + 'Zabbix' + :vartype monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :ivar alert_rule: Rule(monitor) which fired alert instance. Depending on + the monitor service, this would be ARM id or name of the rule. + :vartype alert_rule: str + :ivar source_created_id: Unique Id created by monitor service for each + alert instance. This could be used to track the issue at the monitor + service, in case of Nagios, Zabbix, SCOM etc. + :vartype source_created_id: str + :ivar smart_group_id: Unique Id of the smart group + :vartype smart_group_id: str + :ivar smart_grouping_reason: Verbose reason describing the reason why this + alert instance is added to a smart group + :vartype smart_grouping_reason: str + :ivar start_date_time: Creation time(ISO-8601 format) of alert instance. + :vartype start_date_time: datetime + :ivar last_modified_date_time: Last modification time(ISO-8601 format) of + alert instance. + :vartype last_modified_date_time: datetime + :ivar monitor_condition_resolved_date_time: Resolved time(ISO-8601 format) + of alert instance. This will be updated when monitor service resolves the + alert instance because the rule condition is no longer met. + :vartype monitor_condition_resolved_date_time: datetime + :ivar last_modified_user_name: User who last modified the alert, in case + of monitor service updates user would be 'system', otherwise name of the + user. + :vartype last_modified_user_name: str + """ + + _validation = { + 'severity': {'readonly': True}, + 'signal_type': {'readonly': True}, + 'alert_state': {'readonly': True}, + 'monitor_condition': {'readonly': True}, + 'monitor_service': {'readonly': True}, + 'alert_rule': {'readonly': True}, + 'source_created_id': {'readonly': True}, + 'smart_group_id': {'readonly': True}, + 'smart_grouping_reason': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'monitor_condition_resolved_date_time': {'readonly': True}, + 'last_modified_user_name': {'readonly': True}, + } + + _attribute_map = { + 'severity': {'key': 'severity', 'type': 'str'}, + 'signal_type': {'key': 'signalType', 'type': 'str'}, + 'alert_state': {'key': 'alertState', 'type': 'str'}, + 'monitor_condition': {'key': 'monitorCondition', 'type': 'str'}, + 'target_resource': {'key': 'targetResource', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'target_resource_type': {'key': 'targetResourceType', 'type': 'str'}, + 'monitor_service': {'key': 'monitorService', 'type': 'str'}, + 'alert_rule': {'key': 'alertRule', 'type': 'str'}, + 'source_created_id': {'key': 'sourceCreatedId', 'type': 'str'}, + 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, + 'smart_grouping_reason': {'key': 'smartGroupingReason', 'type': 'str'}, + 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, + 'monitor_condition_resolved_date_time': {'key': 'monitorConditionResolvedDateTime', 'type': 'iso-8601'}, + 'last_modified_user_name': {'key': 'lastModifiedUserName', 'type': 'str'}, + } + + def __init__(self, *, target_resource: str=None, target_resource_name: str=None, target_resource_group: str=None, target_resource_type: str=None, **kwargs) -> None: + super(Essentials, self).__init__(**kwargs) + self.severity = None + self.signal_type = None + self.alert_state = None + self.monitor_condition = None + self.target_resource = target_resource + self.target_resource_name = target_resource_name + self.target_resource_group = target_resource_group + self.target_resource_type = target_resource_type + self.monitor_service = None + self.alert_rule = None + self.source_created_id = None + self.smart_group_id = None + self.smart_grouping_reason = None + self.start_date_time = None + self.last_modified_date_time = None + self.monitor_condition_resolved_date_time = None + self.last_modified_user_name = None + + +class MonitorServiceDetails(Model): + """Details of a monitor service. + + :param name: Monitor service name + :type name: str + :param display_name: Monitor service display name + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, **kwargs) -> None: + super(MonitorServiceDetails, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + + +class MonitorServiceList(AlertsMetaDataProperties): + """Monitor service details. + + Monitor service details. + + All required parameters must be populated in order to send to Azure. + + :param metadata_identifier: Required. Constant filled by server. + :type metadata_identifier: str + :param data: Required. Array of operations + :type data: + list[~azure.mgmt.alertsmanagement.models.MonitorServiceDetails] + """ + + _validation = { + 'metadata_identifier': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'metadata_identifier': {'key': 'metadataIdentifier', 'type': 'str'}, + 'data': {'key': 'data', 'type': '[MonitorServiceDetails]'}, + } + + def __init__(self, *, data, **kwargs) -> None: + super(MonitorServiceList, self).__init__(**kwargs) + self.data = data + self.metadata_identifier = 'MonitorServiceList' + + +class Operation(Model): + """Operation provided by provider. + + :param name: Name of the operation + :type name: str + :param display: Properties of the operation + :type display: ~azure.mgmt.alertsmanagement.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + + +class OperationDisplay(Model): + """Properties of the operation. + + :param provider: Provider name + :type provider: str + :param resource: Resource name + :type resource: str + :param operation: Operation name + :type operation: str + :param description: Description of the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class PatchObject(Model): + """Data contract for patch. + + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param tags: tags to be updated + :type tags: object + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + } + + def __init__(self, *, status=None, tags=None, **kwargs) -> None: + super(PatchObject, self).__init__(**kwargs) + self.status = status + self.tags = tags + + +class Scope(Model): + """Target scope for a given action rule. By default scope will be the + subscription. User can also provide list of resource groups or list of + resources from the scope subscription as well. + + :param scope_type: type of target scope. Possible values include: + 'ResourceGroup', 'Resource' + :type scope_type: str or ~azure.mgmt.alertsmanagement.models.ScopeType + :param values: list of ARM IDs of the given scope type which will be the + target of the given action rule. + :type values: list[str] + """ + + _attribute_map = { + 'scope_type': {'key': 'scopeType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, *, scope_type=None, values=None, **kwargs) -> None: + super(Scope, self).__init__(**kwargs) + self.scope_type = scope_type + self.values = values + + +class SmartGroup(Resource): + """Set of related alerts grouped together smartly by AMS. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param alerts_count: Total number of alerts in smart group + :type alerts_count: int + :ivar smart_group_state: Smart group state. Possible values include: + 'New', 'Acknowledged', 'Closed' + :vartype smart_group_state: str or + ~azure.mgmt.alertsmanagement.models.State + :ivar severity: Severity of smart group is the highest(Sev0 >... > Sev4) + severity of all the alerts in the group. Possible values include: 'Sev0', + 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :ivar start_date_time: Creation time of smart group. Date-Time in ISO-8601 + format. + :vartype start_date_time: datetime + :ivar last_modified_date_time: Last updated time of smart group. Date-Time + in ISO-8601 format. + :vartype last_modified_date_time: datetime + :ivar last_modified_user_name: Last modified by user name. + :vartype last_modified_user_name: str + :param resources: Summary of target resources in the smart group + :type resources: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param resource_types: Summary of target resource types in the smart group + :type resource_types: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param resource_groups: Summary of target resource groups in the smart + group + :type resource_groups: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param monitor_services: Summary of monitorServices in the smart group + :type monitor_services: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param monitor_conditions: Summary of monitorConditions in the smart group + :type monitor_conditions: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param alert_states: Summary of alertStates in the smart group + :type alert_states: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param alert_severities: Summary of alertSeverities in the smart group + :type alert_severities: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param next_link: The URI to fetch the next page of alerts. Call + ListNext() with this URI to fetch the next page alerts. + :type next_link: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'smart_group_state': {'readonly': True}, + 'severity': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'last_modified_user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'alerts_count': {'key': 'properties.alertsCount', 'type': 'int'}, + 'smart_group_state': {'key': 'properties.smartGroupState', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'properties.lastModifiedDateTime', 'type': 'iso-8601'}, + 'last_modified_user_name': {'key': 'properties.lastModifiedUserName', 'type': 'str'}, + 'resources': {'key': 'properties.resources', 'type': '[SmartGroupAggregatedProperty]'}, + 'resource_types': {'key': 'properties.resourceTypes', 'type': '[SmartGroupAggregatedProperty]'}, + 'resource_groups': {'key': 'properties.resourceGroups', 'type': '[SmartGroupAggregatedProperty]'}, + 'monitor_services': {'key': 'properties.monitorServices', 'type': '[SmartGroupAggregatedProperty]'}, + 'monitor_conditions': {'key': 'properties.monitorConditions', 'type': '[SmartGroupAggregatedProperty]'}, + 'alert_states': {'key': 'properties.alertStates', 'type': '[SmartGroupAggregatedProperty]'}, + 'alert_severities': {'key': 'properties.alertSeverities', 'type': '[SmartGroupAggregatedProperty]'}, + 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, + } + + def __init__(self, *, alerts_count: int=None, resources=None, resource_types=None, resource_groups=None, monitor_services=None, monitor_conditions=None, alert_states=None, alert_severities=None, next_link: str=None, **kwargs) -> None: + super(SmartGroup, self).__init__(**kwargs) + self.alerts_count = alerts_count + self.smart_group_state = None + self.severity = None + self.start_date_time = None + self.last_modified_date_time = None + self.last_modified_user_name = None + self.resources = resources + self.resource_types = resource_types + self.resource_groups = resource_groups + self.monitor_services = monitor_services + self.monitor_conditions = monitor_conditions + self.alert_states = alert_states + self.alert_severities = alert_severities + self.next_link = next_link + + +class SmartGroupAggregatedProperty(Model): + """Aggregated property of each type. + + :param name: Name of the type. + :type name: str + :param count: Total number of items of type. + :type count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, count: int=None, **kwargs) -> None: + super(SmartGroupAggregatedProperty, self).__init__(**kwargs) + self.name = name + self.count = count + + +class SmartGroupModification(Resource): + """Alert Modification details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.SmartGroupModificationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'SmartGroupModificationProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(SmartGroupModification, self).__init__(**kwargs) + self.properties = properties + + +class SmartGroupModificationItem(Model): + """smartGroup modification item. + + :param modification_event: Reason for the modification. Possible values + include: 'SmartGroupCreated', 'StateChange', 'AlertAdded', 'AlertRemoved' + :type modification_event: str or + ~azure.mgmt.alertsmanagement.models.SmartGroupModificationEvent + :param old_value: Old value + :type old_value: str + :param new_value: New value + :type new_value: str + :param modified_at: Modified date and time + :type modified_at: str + :param modified_by: Modified user details (Principal client name) + :type modified_by: str + :param comments: Modification comments + :type comments: str + :param description: Description of the modification + :type description: str + """ + + _attribute_map = { + 'modification_event': {'key': 'modificationEvent', 'type': 'SmartGroupModificationEvent'}, + 'old_value': {'key': 'oldValue', 'type': 'str'}, + 'new_value': {'key': 'newValue', 'type': 'str'}, + 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, modification_event=None, old_value: str=None, new_value: str=None, modified_at: str=None, modified_by: str=None, comments: str=None, description: str=None, **kwargs) -> None: + super(SmartGroupModificationItem, self).__init__(**kwargs) + self.modification_event = modification_event + self.old_value = old_value + self.new_value = new_value + self.modified_at = modified_at + self.modified_by = modified_by + self.comments = comments + self.description = description + + +class SmartGroupModificationProperties(Model): + """Properties of the smartGroup modification item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar smart_group_id: Unique Id of the smartGroup for which the history is + being retrieved + :vartype smart_group_id: str + :param modifications: Modification details + :type modifications: + list[~azure.mgmt.alertsmanagement.models.SmartGroupModificationItem] + :param next_link: URL to fetch the next set of results. + :type next_link: str + """ + + _validation = { + 'smart_group_id': {'readonly': True}, + } + + _attribute_map = { + 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, + 'modifications': {'key': 'modifications', 'type': '[SmartGroupModificationItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, modifications=None, next_link: str=None, **kwargs) -> None: + super(SmartGroupModificationProperties, self).__init__(**kwargs) + self.smart_group_id = None + self.modifications = modifications + self.next_link = next_link + + +class Suppression(ActionRuleProperties): + """Suppression based Action Rule. + + Action rule with suppression configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + :param suppression_config: Required. suppression configuration for the + action rule + :type suppression_config: + ~azure.mgmt.alertsmanagement.models.SuppressionConfig + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + 'suppression_config': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'suppression_config': {'key': 'suppressionConfig', 'type': 'SuppressionConfig'}, + } + + def __init__(self, *, suppression_config, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(Suppression, self).__init__(scope=scope, conditions=conditions, description=description, status=status, **kwargs) + self.suppression_config = suppression_config + self.type = 'Suppression' + + +class SuppressionConfig(Model): + """Suppression logic for a given action rule. + + All required parameters must be populated in order to send to Azure. + + :param recurrence_type: Required. Specifies when the suppression should be + applied. Possible values include: 'Always', 'Once', 'Daily', 'Weekly', + 'Monthly' + :type recurrence_type: str or + ~azure.mgmt.alertsmanagement.models.SuppressionType + :param schedule: suppression schedule configuration + :type schedule: ~azure.mgmt.alertsmanagement.models.SuppressionSchedule + """ + + _validation = { + 'recurrence_type': {'required': True}, + } + + _attribute_map = { + 'recurrence_type': {'key': 'recurrenceType', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'SuppressionSchedule'}, + } + + def __init__(self, *, recurrence_type, schedule=None, **kwargs) -> None: + super(SuppressionConfig, self).__init__(**kwargs) + self.recurrence_type = recurrence_type + self.schedule = schedule + + +class SuppressionSchedule(Model): + """Schedule for a given suppression configuration. + + :param start_date: Start date for suppression + :type start_date: str + :param end_date: End date for suppression + :type end_date: str + :param start_time: Start time for suppression + :type start_time: str + :param end_time: End date for suppression + :type end_time: str + :param recurrence_values: Specifies the values for recurrence pattern + :type recurrence_values: list[int] + """ + + _attribute_map = { + 'start_date': {'key': 'startDate', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'recurrence_values': {'key': 'recurrenceValues', 'type': '[int]'}, + } + + def __init__(self, *, start_date: str=None, end_date: str=None, start_time: str=None, end_time: str=None, recurrence_values=None, **kwargs) -> None: + super(SuppressionSchedule, self).__init__(**kwargs) + self.start_date = start_date + self.end_date = end_date + self.start_time = start_time + self.end_time = end_time + self.recurrence_values = recurrence_values + + +class ThrottlingInformation(Model): + """Optional throttling information for the alert rule. + + :param duration: The required duration (in ISO8601 format) to wait before + notifying on the alert rule again. The time granularity must be in minutes + and minimum value is 0 minutes + :type duration: timedelta + """ + + _attribute_map = { + 'duration': {'key': 'duration', 'type': 'duration'}, + } + + def __init__(self, *, duration=None, **kwargs) -> None: + super(ThrottlingInformation, self).__init__(**kwargs) + self.duration = duration diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_paged_models.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_paged_models.py new file mode 100644 index 000000000000..aece7093df75 --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_paged_models.py @@ -0,0 +1,79 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class AlertPaged(Paged): + """ + A paging container for iterating over a list of :class:`Alert ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Alert]'} + } + + def __init__(self, *args, **kwargs): + + super(AlertPaged, self).__init__(*args, **kwargs) +class SmartGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`SmartGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SmartGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(SmartGroupPaged, self).__init__(*args, **kwargs) +class ActionRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`ActionRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ActionRule]'} + } + + def __init__(self, *args, **kwargs): + + super(ActionRulePaged, self).__init__(*args, **kwargs) +class AlertRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`AlertRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AlertRule]'} + } + + def __init__(self, *args, **kwargs): + + super(AlertRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert.py deleted file mode 100644 index 634c2c747b17..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Alert(Resource): - """An alert created in alert management service. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: ~azure.mgmt.alertsmanagement.models.AlertProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertProperties'}, - } - - def __init__(self, **kwargs): - super(Alert, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification.py deleted file mode 100644 index e2d77167596c..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AlertModification(Resource): - """Alert Modification details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: - ~azure.mgmt.alertsmanagement.models.AlertModificationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertModificationProperties'}, - } - - def __init__(self, **kwargs): - super(AlertModification, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item.py deleted file mode 100644 index 50915b06ce40..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertModificationItem(Model): - """Alert modification item. - - :param modification_event: Reason for the modification. Possible values - include: 'AlertCreated', 'StateChange', 'MonitorConditionChange' - :type modification_event: str or - ~azure.mgmt.alertsmanagement.models.AlertModificationEvent - :param old_value: Old value - :type old_value: str - :param new_value: New value - :type new_value: str - :param modified_at: Modified date and time - :type modified_at: str - :param modified_by: Modified user details (Principal client name) - :type modified_by: str - :param comments: Modification comments - :type comments: str - :param description: Description of the modification - :type description: str - """ - - _attribute_map = { - 'modification_event': {'key': 'modificationEvent', 'type': 'AlertModificationEvent'}, - 'old_value': {'key': 'oldValue', 'type': 'str'}, - 'new_value': {'key': 'newValue', 'type': 'str'}, - 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, - 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, - 'comments': {'key': 'comments', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AlertModificationItem, self).__init__(**kwargs) - self.modification_event = kwargs.get('modification_event', None) - self.old_value = kwargs.get('old_value', None) - self.new_value = kwargs.get('new_value', None) - self.modified_at = kwargs.get('modified_at', None) - self.modified_by = kwargs.get('modified_by', None) - self.comments = kwargs.get('comments', None) - self.description = kwargs.get('description', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item_py3.py deleted file mode 100644 index b051daad6d2a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertModificationItem(Model): - """Alert modification item. - - :param modification_event: Reason for the modification. Possible values - include: 'AlertCreated', 'StateChange', 'MonitorConditionChange' - :type modification_event: str or - ~azure.mgmt.alertsmanagement.models.AlertModificationEvent - :param old_value: Old value - :type old_value: str - :param new_value: New value - :type new_value: str - :param modified_at: Modified date and time - :type modified_at: str - :param modified_by: Modified user details (Principal client name) - :type modified_by: str - :param comments: Modification comments - :type comments: str - :param description: Description of the modification - :type description: str - """ - - _attribute_map = { - 'modification_event': {'key': 'modificationEvent', 'type': 'AlertModificationEvent'}, - 'old_value': {'key': 'oldValue', 'type': 'str'}, - 'new_value': {'key': 'newValue', 'type': 'str'}, - 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, - 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, - 'comments': {'key': 'comments', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, modification_event=None, old_value: str=None, new_value: str=None, modified_at: str=None, modified_by: str=None, comments: str=None, description: str=None, **kwargs) -> None: - super(AlertModificationItem, self).__init__(**kwargs) - self.modification_event = modification_event - self.old_value = old_value - self.new_value = new_value - self.modified_at = modified_at - self.modified_by = modified_by - self.comments = comments - self.description = description diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties.py deleted file mode 100644 index c1d1b8123ecd..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertModificationProperties(Model): - """Properties of the alert modification item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar alert_id: Unique Id of the alert for which the history is being - retrieved - :vartype alert_id: str - :param modifications: Modification details - :type modifications: - list[~azure.mgmt.alertsmanagement.models.AlertModificationItem] - """ - - _validation = { - 'alert_id': {'readonly': True}, - } - - _attribute_map = { - 'alert_id': {'key': 'alertId', 'type': 'str'}, - 'modifications': {'key': 'modifications', 'type': '[AlertModificationItem]'}, - } - - def __init__(self, **kwargs): - super(AlertModificationProperties, self).__init__(**kwargs) - self.alert_id = None - self.modifications = kwargs.get('modifications', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties_py3.py deleted file mode 100644 index 51e67637a07a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertModificationProperties(Model): - """Properties of the alert modification item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar alert_id: Unique Id of the alert for which the history is being - retrieved - :vartype alert_id: str - :param modifications: Modification details - :type modifications: - list[~azure.mgmt.alertsmanagement.models.AlertModificationItem] - """ - - _validation = { - 'alert_id': {'readonly': True}, - } - - _attribute_map = { - 'alert_id': {'key': 'alertId', 'type': 'str'}, - 'modifications': {'key': 'modifications', 'type': '[AlertModificationItem]'}, - } - - def __init__(self, *, modifications=None, **kwargs) -> None: - super(AlertModificationProperties, self).__init__(**kwargs) - self.alert_id = None - self.modifications = modifications diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_py3.py deleted file mode 100644 index b7cae8114091..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AlertModification(Resource): - """Alert Modification details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: - ~azure.mgmt.alertsmanagement.models.AlertModificationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertModificationProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(AlertModification, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_paged.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_paged.py deleted file mode 100644 index 2ae2c88ee2e1..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AlertPaged(Paged): - """ - A paging container for iterating over a list of :class:`Alert ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Alert]'} - } - - def __init__(self, *args, **kwargs): - - super(AlertPaged, self).__init__(*args, **kwargs) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties.py deleted file mode 100644 index a8c7b761aba5..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertProperties(Model): - """Alert property bag. - - :param essentials: - :type essentials: ~azure.mgmt.alertsmanagement.models.Essentials - :param context: - :type context: object - :param egress_config: - :type egress_config: object - """ - - _attribute_map = { - 'essentials': {'key': 'essentials', 'type': 'Essentials'}, - 'context': {'key': 'context', 'type': 'object'}, - 'egress_config': {'key': 'egressConfig', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AlertProperties, self).__init__(**kwargs) - self.essentials = kwargs.get('essentials', None) - self.context = kwargs.get('context', None) - self.egress_config = kwargs.get('egress_config', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties_py3.py deleted file mode 100644 index a6c9cf43db24..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertProperties(Model): - """Alert property bag. - - :param essentials: - :type essentials: ~azure.mgmt.alertsmanagement.models.Essentials - :param context: - :type context: object - :param egress_config: - :type egress_config: object - """ - - _attribute_map = { - 'essentials': {'key': 'essentials', 'type': 'Essentials'}, - 'context': {'key': 'context', 'type': 'object'}, - 'egress_config': {'key': 'egressConfig', 'type': 'object'}, - } - - def __init__(self, *, essentials=None, context=None, egress_config=None, **kwargs) -> None: - super(AlertProperties, self).__init__(**kwargs) - self.essentials = essentials - self.context = context - self.egress_config = egress_config diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_py3.py deleted file mode 100644 index 4068ed33b63a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Alert(Resource): - """An alert created in alert management service. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: ~azure.mgmt.alertsmanagement.models.AlertProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(Alert, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary.py deleted file mode 100644 index 9521d5cb5d32..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AlertsSummary(Resource): - """Summary of alerts based on the input filters and 'groupby' parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroup - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertsSummaryGroup'}, - } - - def __init__(self, **kwargs): - super(AlertsSummary, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group.py deleted file mode 100644 index 470f52f8efdf..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertsSummaryGroup(Model): - """Group the result set. - - :param total: Total count of the result set. - :type total: int - :param smart_groups_count: Total count of the smart groups. - :type smart_groups_count: int - :param groupedby: Name of the field aggregated - :type groupedby: str - :param values: List of the items - :type values: - list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] - """ - - _attribute_map = { - 'total': {'key': 'total', 'type': 'int'}, - 'smart_groups_count': {'key': 'smartGroupsCount', 'type': 'int'}, - 'groupedby': {'key': 'groupedby', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, - } - - def __init__(self, **kwargs): - super(AlertsSummaryGroup, self).__init__(**kwargs) - self.total = kwargs.get('total', None) - self.smart_groups_count = kwargs.get('smart_groups_count', None) - self.groupedby = kwargs.get('groupedby', None) - self.values = kwargs.get('values', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item.py deleted file mode 100644 index 232fd9f12e08..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertsSummaryGroupItem(Model): - """Alerts summary group item. - - :param name: Value of the aggregated field - :type name: str - :param count: Count of the aggregated field - :type count: int - :param groupedby: Name of the field aggregated - :type groupedby: str - :param values: List of the items - :type values: - list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'groupedby': {'key': 'groupedby', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, - } - - def __init__(self, **kwargs): - super(AlertsSummaryGroupItem, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.count = kwargs.get('count', None) - self.groupedby = kwargs.get('groupedby', None) - self.values = kwargs.get('values', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_py3.py deleted file mode 100644 index f802c4f1eaa3..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertsSummaryGroupItem(Model): - """Alerts summary group item. - - :param name: Value of the aggregated field - :type name: str - :param count: Count of the aggregated field - :type count: int - :param groupedby: Name of the field aggregated - :type groupedby: str - :param values: List of the items - :type values: - list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'groupedby': {'key': 'groupedby', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, - } - - def __init__(self, *, name: str=None, count: int=None, groupedby: str=None, values=None, **kwargs) -> None: - super(AlertsSummaryGroupItem, self).__init__(**kwargs) - self.name = name - self.count = count - self.groupedby = groupedby - self.values = values diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_py3.py deleted file mode 100644 index b9d4c71d3403..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertsSummaryGroup(Model): - """Group the result set. - - :param total: Total count of the result set. - :type total: int - :param smart_groups_count: Total count of the smart groups. - :type smart_groups_count: int - :param groupedby: Name of the field aggregated - :type groupedby: str - :param values: List of the items - :type values: - list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] - """ - - _attribute_map = { - 'total': {'key': 'total', 'type': 'int'}, - 'smart_groups_count': {'key': 'smartGroupsCount', 'type': 'int'}, - 'groupedby': {'key': 'groupedby', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, - } - - def __init__(self, *, total: int=None, smart_groups_count: int=None, groupedby: str=None, values=None, **kwargs) -> None: - super(AlertsSummaryGroup, self).__init__(**kwargs) - self.total = total - self.smart_groups_count = smart_groups_count - self.groupedby = groupedby - self.values = values diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_py3.py deleted file mode 100644 index ed41ea6d10de..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AlertsSummary(Resource): - """Summary of alerts based on the input filters and 'groupby' parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroup - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertsSummaryGroup'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(AlertsSummary, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials.py deleted file mode 100644 index a333d42f1b82..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Essentials(Model): - """This object contains normalized fields across different monitor service and - also contains state related fields. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar severity: Severity of alert Sev0 being highest and Sev3 being - lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :ivar signal_type: Log based alert or metric based alert. Possible values - include: 'Metric', 'Log', 'Unknown' - :vartype signal_type: str or - ~azure.mgmt.alertsmanagement.models.SignalType - :ivar alert_state: Alert object state, which is modified by the user. - Possible values include: 'New', 'Acknowledged', 'Closed' - :vartype alert_state: str or - ~azure.mgmt.alertsmanagement.models.AlertState - :ivar monitor_condition: Represents rule condition(Fired/Resolved) - maintained by monitor service depending on the state of the state. - Possible values include: 'Fired', 'Resolved' - :vartype monitor_condition: str or - ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param target_resource: Target ARM resource, on which alert got created. - :type target_resource: str - :param target_resource_name: Name of the target ARM resource name, on - which alert got created. - :type target_resource_name: str - :param target_resource_group: Resource group of target ARM resource, on - which alert got created. - :type target_resource_group: str - :param target_resource_type: Resource type of target ARM resource, on - which alert got created. - :type target_resource_type: str - :ivar monitor_service: Monitor service on which the rule(monitor) is set. - Possible values include: 'Application Insights', 'ActivityLog - Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', - 'ActivityLog Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' - :vartype monitor_service: str or - ~azure.mgmt.alertsmanagement.models.MonitorService - :ivar alert_rule: Rule(monitor) which fired alert instance. Depending on - the monitor service, this would be ARM id or name of the rule. - :vartype alert_rule: str - :ivar source_created_id: Unique Id created by monitor service for each - alert instance. This could be used to track the issue at the monitor - service, in case of Nagios, Zabbix, SCOM etc. - :vartype source_created_id: str - :ivar smart_group_id: Unique Id of the smart group - :vartype smart_group_id: str - :ivar smart_grouping_reason: Verbose reason describing the reason why this - alert instance is added to a smart group - :vartype smart_grouping_reason: str - :ivar start_date_time: Creation time(ISO-8601 format) of alert instance. - :vartype start_date_time: datetime - :ivar last_modified_date_time: Last modification time(ISO-8601 format) of - alert instance. - :vartype last_modified_date_time: datetime - :ivar monitor_condition_resolved_date_time: Resolved time(ISO-8601 format) - of alert instance. This will be updated when monitor service resolves the - alert instance because of the rule condition is not met. - :vartype monitor_condition_resolved_date_time: datetime - :ivar last_modified_user_name: User who last modified the alert, in case - of monitor service updates user would be 'system', otherwise name of the - user. - :vartype last_modified_user_name: str - """ - - _validation = { - 'severity': {'readonly': True}, - 'signal_type': {'readonly': True}, - 'alert_state': {'readonly': True}, - 'monitor_condition': {'readonly': True}, - 'monitor_service': {'readonly': True}, - 'alert_rule': {'readonly': True}, - 'source_created_id': {'readonly': True}, - 'smart_group_id': {'readonly': True}, - 'smart_grouping_reason': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'last_modified_date_time': {'readonly': True}, - 'monitor_condition_resolved_date_time': {'readonly': True}, - 'last_modified_user_name': {'readonly': True}, - } - - _attribute_map = { - 'severity': {'key': 'severity', 'type': 'str'}, - 'signal_type': {'key': 'signalType', 'type': 'str'}, - 'alert_state': {'key': 'alertState', 'type': 'str'}, - 'monitor_condition': {'key': 'monitorCondition', 'type': 'str'}, - 'target_resource': {'key': 'targetResource', 'type': 'str'}, - 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, - 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, - 'target_resource_type': {'key': 'targetResourceType', 'type': 'str'}, - 'monitor_service': {'key': 'monitorService', 'type': 'str'}, - 'alert_rule': {'key': 'alertRule', 'type': 'str'}, - 'source_created_id': {'key': 'sourceCreatedId', 'type': 'str'}, - 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, - 'smart_grouping_reason': {'key': 'smartGroupingReason', 'type': 'str'}, - 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, - 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, - 'monitor_condition_resolved_date_time': {'key': 'monitorConditionResolvedDateTime', 'type': 'iso-8601'}, - 'last_modified_user_name': {'key': 'lastModifiedUserName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Essentials, self).__init__(**kwargs) - self.severity = None - self.signal_type = None - self.alert_state = None - self.monitor_condition = None - self.target_resource = kwargs.get('target_resource', None) - self.target_resource_name = kwargs.get('target_resource_name', None) - self.target_resource_group = kwargs.get('target_resource_group', None) - self.target_resource_type = kwargs.get('target_resource_type', None) - self.monitor_service = None - self.alert_rule = None - self.source_created_id = None - self.smart_group_id = None - self.smart_grouping_reason = None - self.start_date_time = None - self.last_modified_date_time = None - self.monitor_condition_resolved_date_time = None - self.last_modified_user_name = None diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials_py3.py deleted file mode 100644 index 01052b35702e..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials_py3.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Essentials(Model): - """This object contains normalized fields across different monitor service and - also contains state related fields. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar severity: Severity of alert Sev0 being highest and Sev3 being - lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :ivar signal_type: Log based alert or metric based alert. Possible values - include: 'Metric', 'Log', 'Unknown' - :vartype signal_type: str or - ~azure.mgmt.alertsmanagement.models.SignalType - :ivar alert_state: Alert object state, which is modified by the user. - Possible values include: 'New', 'Acknowledged', 'Closed' - :vartype alert_state: str or - ~azure.mgmt.alertsmanagement.models.AlertState - :ivar monitor_condition: Represents rule condition(Fired/Resolved) - maintained by monitor service depending on the state of the state. - Possible values include: 'Fired', 'Resolved' - :vartype monitor_condition: str or - ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param target_resource: Target ARM resource, on which alert got created. - :type target_resource: str - :param target_resource_name: Name of the target ARM resource name, on - which alert got created. - :type target_resource_name: str - :param target_resource_group: Resource group of target ARM resource, on - which alert got created. - :type target_resource_group: str - :param target_resource_type: Resource type of target ARM resource, on - which alert got created. - :type target_resource_type: str - :ivar monitor_service: Monitor service on which the rule(monitor) is set. - Possible values include: 'Application Insights', 'ActivityLog - Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', - 'ActivityLog Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' - :vartype monitor_service: str or - ~azure.mgmt.alertsmanagement.models.MonitorService - :ivar alert_rule: Rule(monitor) which fired alert instance. Depending on - the monitor service, this would be ARM id or name of the rule. - :vartype alert_rule: str - :ivar source_created_id: Unique Id created by monitor service for each - alert instance. This could be used to track the issue at the monitor - service, in case of Nagios, Zabbix, SCOM etc. - :vartype source_created_id: str - :ivar smart_group_id: Unique Id of the smart group - :vartype smart_group_id: str - :ivar smart_grouping_reason: Verbose reason describing the reason why this - alert instance is added to a smart group - :vartype smart_grouping_reason: str - :ivar start_date_time: Creation time(ISO-8601 format) of alert instance. - :vartype start_date_time: datetime - :ivar last_modified_date_time: Last modification time(ISO-8601 format) of - alert instance. - :vartype last_modified_date_time: datetime - :ivar monitor_condition_resolved_date_time: Resolved time(ISO-8601 format) - of alert instance. This will be updated when monitor service resolves the - alert instance because of the rule condition is not met. - :vartype monitor_condition_resolved_date_time: datetime - :ivar last_modified_user_name: User who last modified the alert, in case - of monitor service updates user would be 'system', otherwise name of the - user. - :vartype last_modified_user_name: str - """ - - _validation = { - 'severity': {'readonly': True}, - 'signal_type': {'readonly': True}, - 'alert_state': {'readonly': True}, - 'monitor_condition': {'readonly': True}, - 'monitor_service': {'readonly': True}, - 'alert_rule': {'readonly': True}, - 'source_created_id': {'readonly': True}, - 'smart_group_id': {'readonly': True}, - 'smart_grouping_reason': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'last_modified_date_time': {'readonly': True}, - 'monitor_condition_resolved_date_time': {'readonly': True}, - 'last_modified_user_name': {'readonly': True}, - } - - _attribute_map = { - 'severity': {'key': 'severity', 'type': 'str'}, - 'signal_type': {'key': 'signalType', 'type': 'str'}, - 'alert_state': {'key': 'alertState', 'type': 'str'}, - 'monitor_condition': {'key': 'monitorCondition', 'type': 'str'}, - 'target_resource': {'key': 'targetResource', 'type': 'str'}, - 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, - 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, - 'target_resource_type': {'key': 'targetResourceType', 'type': 'str'}, - 'monitor_service': {'key': 'monitorService', 'type': 'str'}, - 'alert_rule': {'key': 'alertRule', 'type': 'str'}, - 'source_created_id': {'key': 'sourceCreatedId', 'type': 'str'}, - 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, - 'smart_grouping_reason': {'key': 'smartGroupingReason', 'type': 'str'}, - 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, - 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, - 'monitor_condition_resolved_date_time': {'key': 'monitorConditionResolvedDateTime', 'type': 'iso-8601'}, - 'last_modified_user_name': {'key': 'lastModifiedUserName', 'type': 'str'}, - } - - def __init__(self, *, target_resource: str=None, target_resource_name: str=None, target_resource_group: str=None, target_resource_type: str=None, **kwargs) -> None: - super(Essentials, self).__init__(**kwargs) - self.severity = None - self.signal_type = None - self.alert_state = None - self.monitor_condition = None - self.target_resource = target_resource - self.target_resource_name = target_resource_name - self.target_resource_group = target_resource_group - self.target_resource_type = target_resource_type - self.monitor_service = None - self.alert_rule = None - self.source_created_id = None - self.smart_group_id = None - self.smart_grouping_reason = None - self.start_date_time = None - self.last_modified_date_time = None - self.monitor_condition_resolved_date_time = None - self.last_modified_user_name = None diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation.py deleted file mode 100644 index 1b5fea4ff02a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """Operation provided by provider. - - :param name: Name of the operation - :type name: str - :param display: Properties of the operation - :type display: ~azure.mgmt.alertsmanagement.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display.py deleted file mode 100644 index 89c4bdd6ccb6..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """Properties of the operation. - - :param provider: Provider name - :type provider: str - :param resource: Resource name - :type resource: str - :param operation: Operation name - :type operation: str - :param description: Description of the operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display_py3.py deleted file mode 100644 index fa3740dfc655..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """Properties of the operation. - - :param provider: Provider name - :type provider: str - :param resource: Resource name - :type resource: str - :param operation: Operation name - :type operation: str - :param description: Description of the operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_paged.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_paged.py deleted file mode 100644 index 3794d02c84f1..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_py3.py deleted file mode 100644 index ee66b4cfa181..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """Operation provided by provider. - - :param name: Name of the operation - :type name: str - :param display: Properties of the operation - :type display: ~azure.mgmt.alertsmanagement.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, name: str=None, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource.py deleted file mode 100644 index 7454d56b9033..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """An azure resource object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.type = None - self.name = None diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource_py3.py deleted file mode 100644 index 83ff9951fb91..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """An azure resource object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.type = None - self.name = None diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group.py deleted file mode 100644 index b1754f67fb4c..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class SmartGroup(Resource): - """Set of related alerts grouped together smartly by AMS. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param alerts_count: Total number of alerts in smart group - :type alerts_count: int - :ivar smart_group_state: Smart group state. Possible values include: - 'New', 'Acknowledged', 'Closed' - :vartype smart_group_state: str or - ~azure.mgmt.alertsmanagement.models.State - :ivar severity: Severity of smart group is the highest(Sev0 >... > Sev4) - severity of all the alerts in the group. Possible values include: 'Sev0', - 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :ivar start_date_time: Creation time of smart group. Date-Time in ISO-8601 - format. - :vartype start_date_time: datetime - :ivar last_modified_date_time: Last updated time of smart group. Date-Time - in ISO-8601 format. - :vartype last_modified_date_time: datetime - :ivar last_modified_user_name: Last modified by user name. - :vartype last_modified_user_name: str - :param resources: Summary of target resources in the smart group - :type resources: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param resource_types: Summary of target resource types in the smart group - :type resource_types: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param resource_groups: Summary of target resource groups in the smart - group - :type resource_groups: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param monitor_services: Summary of monitorServices in the smart group - :type monitor_services: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param monitor_conditions: Summary of monitorConditions in the smart group - :type monitor_conditions: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param alert_states: Summary of alertStates in the smart group - :type alert_states: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param alert_severities: Summary of alertSeverities in the smart group - :type alert_severities: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param next_link: The URI to fetch the next page of alerts. Call - ListNext() with this URI to fetch the next page alerts. - :type next_link: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - 'smart_group_state': {'readonly': True}, - 'severity': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'last_modified_date_time': {'readonly': True}, - 'last_modified_user_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'alerts_count': {'key': 'properties.alertsCount', 'type': 'int'}, - 'smart_group_state': {'key': 'properties.smartGroupState', 'type': 'str'}, - 'severity': {'key': 'properties.severity', 'type': 'str'}, - 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, - 'last_modified_date_time': {'key': 'properties.lastModifiedDateTime', 'type': 'iso-8601'}, - 'last_modified_user_name': {'key': 'properties.lastModifiedUserName', 'type': 'str'}, - 'resources': {'key': 'properties.resources', 'type': '[SmartGroupAggregatedProperty]'}, - 'resource_types': {'key': 'properties.resourceTypes', 'type': '[SmartGroupAggregatedProperty]'}, - 'resource_groups': {'key': 'properties.resourceGroups', 'type': '[SmartGroupAggregatedProperty]'}, - 'monitor_services': {'key': 'properties.monitorServices', 'type': '[SmartGroupAggregatedProperty]'}, - 'monitor_conditions': {'key': 'properties.monitorConditions', 'type': '[SmartGroupAggregatedProperty]'}, - 'alert_states': {'key': 'properties.alertStates', 'type': '[SmartGroupAggregatedProperty]'}, - 'alert_severities': {'key': 'properties.alertSeverities', 'type': '[SmartGroupAggregatedProperty]'}, - 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SmartGroup, self).__init__(**kwargs) - self.alerts_count = kwargs.get('alerts_count', None) - self.smart_group_state = None - self.severity = None - self.start_date_time = None - self.last_modified_date_time = None - self.last_modified_user_name = None - self.resources = kwargs.get('resources', None) - self.resource_types = kwargs.get('resource_types', None) - self.resource_groups = kwargs.get('resource_groups', None) - self.monitor_services = kwargs.get('monitor_services', None) - self.monitor_conditions = kwargs.get('monitor_conditions', None) - self.alert_states = kwargs.get('alert_states', None) - self.alert_severities = kwargs.get('alert_severities', None) - self.next_link = kwargs.get('next_link', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property.py deleted file mode 100644 index 4681ff600eff..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupAggregatedProperty(Model): - """Aggregated property of each type. - - :param name: Name of the type. - :type name: str - :param count: Total number of items of type. - :type count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(SmartGroupAggregatedProperty, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.count = kwargs.get('count', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property_py3.py deleted file mode 100644 index 5a6bfb2d896e..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupAggregatedProperty(Model): - """Aggregated property of each type. - - :param name: Name of the type. - :type name: str - :param count: Total number of items of type. - :type count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, *, name: str=None, count: int=None, **kwargs) -> None: - super(SmartGroupAggregatedProperty, self).__init__(**kwargs) - self.name = name - self.count = count diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification.py deleted file mode 100644 index b0c27ebc02c4..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class SmartGroupModification(Resource): - """Alert Modification details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: - ~azure.mgmt.alertsmanagement.models.SmartGroupModificationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'SmartGroupModificationProperties'}, - } - - def __init__(self, **kwargs): - super(SmartGroupModification, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item.py deleted file mode 100644 index b87b7a06465d..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupModificationItem(Model): - """smartGroup modification item. - - :param modification_event: Reason for the modification. Possible values - include: 'SmartGroupCreated', 'StateChange', 'AlertAdded', 'AlertRemoved' - :type modification_event: str or - ~azure.mgmt.alertsmanagement.models.SmartGroupModificationEvent - :param old_value: Old value - :type old_value: str - :param new_value: New value - :type new_value: str - :param modified_at: Modified date and time - :type modified_at: str - :param modified_by: Modified user details (Principal client name) - :type modified_by: str - :param comments: Modification comments - :type comments: str - :param description: Description of the modification - :type description: str - """ - - _attribute_map = { - 'modification_event': {'key': 'modificationEvent', 'type': 'SmartGroupModificationEvent'}, - 'old_value': {'key': 'oldValue', 'type': 'str'}, - 'new_value': {'key': 'newValue', 'type': 'str'}, - 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, - 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, - 'comments': {'key': 'comments', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SmartGroupModificationItem, self).__init__(**kwargs) - self.modification_event = kwargs.get('modification_event', None) - self.old_value = kwargs.get('old_value', None) - self.new_value = kwargs.get('new_value', None) - self.modified_at = kwargs.get('modified_at', None) - self.modified_by = kwargs.get('modified_by', None) - self.comments = kwargs.get('comments', None) - self.description = kwargs.get('description', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item_py3.py deleted file mode 100644 index aa07075fb384..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupModificationItem(Model): - """smartGroup modification item. - - :param modification_event: Reason for the modification. Possible values - include: 'SmartGroupCreated', 'StateChange', 'AlertAdded', 'AlertRemoved' - :type modification_event: str or - ~azure.mgmt.alertsmanagement.models.SmartGroupModificationEvent - :param old_value: Old value - :type old_value: str - :param new_value: New value - :type new_value: str - :param modified_at: Modified date and time - :type modified_at: str - :param modified_by: Modified user details (Principal client name) - :type modified_by: str - :param comments: Modification comments - :type comments: str - :param description: Description of the modification - :type description: str - """ - - _attribute_map = { - 'modification_event': {'key': 'modificationEvent', 'type': 'SmartGroupModificationEvent'}, - 'old_value': {'key': 'oldValue', 'type': 'str'}, - 'new_value': {'key': 'newValue', 'type': 'str'}, - 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, - 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, - 'comments': {'key': 'comments', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, modification_event=None, old_value: str=None, new_value: str=None, modified_at: str=None, modified_by: str=None, comments: str=None, description: str=None, **kwargs) -> None: - super(SmartGroupModificationItem, self).__init__(**kwargs) - self.modification_event = modification_event - self.old_value = old_value - self.new_value = new_value - self.modified_at = modified_at - self.modified_by = modified_by - self.comments = comments - self.description = description diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties.py deleted file mode 100644 index 5535552813b3..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupModificationProperties(Model): - """Properties of the smartGroup modification item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar smart_group_id: Unique Id of the smartGroup for which the history is - being retrieved - :vartype smart_group_id: str - :param modifications: Modification details - :type modifications: - list[~azure.mgmt.alertsmanagement.models.SmartGroupModificationItem] - :param next_link: URL to fetch the next set of results. - :type next_link: str - """ - - _validation = { - 'smart_group_id': {'readonly': True}, - } - - _attribute_map = { - 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, - 'modifications': {'key': 'modifications', 'type': '[SmartGroupModificationItem]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SmartGroupModificationProperties, self).__init__(**kwargs) - self.smart_group_id = None - self.modifications = kwargs.get('modifications', None) - self.next_link = kwargs.get('next_link', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties_py3.py deleted file mode 100644 index 40d128112187..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupModificationProperties(Model): - """Properties of the smartGroup modification item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar smart_group_id: Unique Id of the smartGroup for which the history is - being retrieved - :vartype smart_group_id: str - :param modifications: Modification details - :type modifications: - list[~azure.mgmt.alertsmanagement.models.SmartGroupModificationItem] - :param next_link: URL to fetch the next set of results. - :type next_link: str - """ - - _validation = { - 'smart_group_id': {'readonly': True}, - } - - _attribute_map = { - 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, - 'modifications': {'key': 'modifications', 'type': '[SmartGroupModificationItem]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, modifications=None, next_link: str=None, **kwargs) -> None: - super(SmartGroupModificationProperties, self).__init__(**kwargs) - self.smart_group_id = None - self.modifications = modifications - self.next_link = next_link diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_py3.py deleted file mode 100644 index b8cb946b706a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class SmartGroupModification(Resource): - """Alert Modification details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: - ~azure.mgmt.alertsmanagement.models.SmartGroupModificationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'SmartGroupModificationProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(SmartGroupModification, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_py3.py deleted file mode 100644 index a0c00f029485..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_py3.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class SmartGroup(Resource): - """Set of related alerts grouped together smartly by AMS. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param alerts_count: Total number of alerts in smart group - :type alerts_count: int - :ivar smart_group_state: Smart group state. Possible values include: - 'New', 'Acknowledged', 'Closed' - :vartype smart_group_state: str or - ~azure.mgmt.alertsmanagement.models.State - :ivar severity: Severity of smart group is the highest(Sev0 >... > Sev4) - severity of all the alerts in the group. Possible values include: 'Sev0', - 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :ivar start_date_time: Creation time of smart group. Date-Time in ISO-8601 - format. - :vartype start_date_time: datetime - :ivar last_modified_date_time: Last updated time of smart group. Date-Time - in ISO-8601 format. - :vartype last_modified_date_time: datetime - :ivar last_modified_user_name: Last modified by user name. - :vartype last_modified_user_name: str - :param resources: Summary of target resources in the smart group - :type resources: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param resource_types: Summary of target resource types in the smart group - :type resource_types: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param resource_groups: Summary of target resource groups in the smart - group - :type resource_groups: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param monitor_services: Summary of monitorServices in the smart group - :type monitor_services: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param monitor_conditions: Summary of monitorConditions in the smart group - :type monitor_conditions: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param alert_states: Summary of alertStates in the smart group - :type alert_states: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param alert_severities: Summary of alertSeverities in the smart group - :type alert_severities: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param next_link: The URI to fetch the next page of alerts. Call - ListNext() with this URI to fetch the next page alerts. - :type next_link: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - 'smart_group_state': {'readonly': True}, - 'severity': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'last_modified_date_time': {'readonly': True}, - 'last_modified_user_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'alerts_count': {'key': 'properties.alertsCount', 'type': 'int'}, - 'smart_group_state': {'key': 'properties.smartGroupState', 'type': 'str'}, - 'severity': {'key': 'properties.severity', 'type': 'str'}, - 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, - 'last_modified_date_time': {'key': 'properties.lastModifiedDateTime', 'type': 'iso-8601'}, - 'last_modified_user_name': {'key': 'properties.lastModifiedUserName', 'type': 'str'}, - 'resources': {'key': 'properties.resources', 'type': '[SmartGroupAggregatedProperty]'}, - 'resource_types': {'key': 'properties.resourceTypes', 'type': '[SmartGroupAggregatedProperty]'}, - 'resource_groups': {'key': 'properties.resourceGroups', 'type': '[SmartGroupAggregatedProperty]'}, - 'monitor_services': {'key': 'properties.monitorServices', 'type': '[SmartGroupAggregatedProperty]'}, - 'monitor_conditions': {'key': 'properties.monitorConditions', 'type': '[SmartGroupAggregatedProperty]'}, - 'alert_states': {'key': 'properties.alertStates', 'type': '[SmartGroupAggregatedProperty]'}, - 'alert_severities': {'key': 'properties.alertSeverities', 'type': '[SmartGroupAggregatedProperty]'}, - 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, - } - - def __init__(self, *, alerts_count: int=None, resources=None, resource_types=None, resource_groups=None, monitor_services=None, monitor_conditions=None, alert_states=None, alert_severities=None, next_link: str=None, **kwargs) -> None: - super(SmartGroup, self).__init__(**kwargs) - self.alerts_count = alerts_count - self.smart_group_state = None - self.severity = None - self.start_date_time = None - self.last_modified_date_time = None - self.last_modified_user_name = None - self.resources = resources - self.resource_types = resource_types - self.resource_groups = resource_groups - self.monitor_services = monitor_services - self.monitor_conditions = monitor_conditions - self.alert_states = alert_states - self.alert_severities = alert_severities - self.next_link = next_link diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list.py deleted file mode 100644 index 17302096edc5..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupsList(Model): - """List the alerts. - - :param next_link: URL to fetch the next set of alerts. - :type next_link: str - :param value: List of alerts - :type value: list[~azure.mgmt.alertsmanagement.models.SmartGroup] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[SmartGroup]'}, - } - - def __init__(self, **kwargs): - super(SmartGroupsList, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list_py3.py deleted file mode 100644 index 538de5af7747..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupsList(Model): - """List the alerts. - - :param next_link: URL to fetch the next set of alerts. - :type next_link: str - :param value: List of alerts - :type value: list[~azure.mgmt.alertsmanagement.models.SmartGroup] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[SmartGroup]'}, - } - - def __init__(self, *, next_link: str=None, value=None, **kwargs) -> None: - super(SmartGroupsList, self).__init__(**kwargs) - self.next_link = next_link - self.value = value diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py index 9341f4bfee3b..946b389ce5fb 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py @@ -9,12 +9,16 @@ # regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .alerts_operations import AlertsOperations -from .smart_groups_operations import SmartGroupsOperations +from ._operations import Operations +from ._alerts_operations import AlertsOperations +from ._smart_groups_operations import SmartGroupsOperations +from ._action_rules_operations import ActionRulesOperations +from ._smart_detector_alert_rules_operations import SmartDetectorAlertRulesOperations __all__ = [ 'Operations', 'AlertsOperations', 'SmartGroupsOperations', + 'ActionRulesOperations', + 'SmartDetectorAlertRulesOperations', ] diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_action_rules_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_action_rules_operations.py new file mode 100644 index 000000000000..4b988fecc8a6 --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_action_rules_operations.py @@ -0,0 +1,575 @@ +# 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 .. import models + + +class ActionRulesOperations(object): + """ActionRulesOperations 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: "2019-05-05-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-05-05-preview" + + self.config = config + + def list_by_subscription( + self, target_resource_group=None, target_resource_type=None, target_resource=None, severity=None, monitor_service=None, impacted_scope=None, description=None, alert_rule_id=None, action_group=None, name=None, custom_headers=None, raw=False, **operation_config): + """Get all action rule in a given subscription. + + List all action rules of the subscription and given input filters. + + :param target_resource_group: Filter by target resource group name. + Default value is select all. + :type target_resource_group: str + :param target_resource_type: Filter by target resource type. Default + value is select all. + :type target_resource_type: str + :param target_resource: Filter by target resource( which is full ARM + ID) Default value is select all. + :type target_resource: str + :param severity: Filter by severity. Default value is select all. + Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' + :type monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :param impacted_scope: filter by impacted/target scope (provide comma + separated list for multiple scopes). The value should be an well + constructed ARM id of the scope. + :type impacted_scope: str + :param description: filter by alert rule description + :type description: str + :param alert_rule_id: filter by alert rule id + :type alert_rule_id: str + :param action_group: filter by action group configured as part of + action rule + :type action_group: str + :param name: filter by action rule name + :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: An iterator like instance of ActionRule + :rtype: + ~azure.mgmt.alertsmanagement.models.ActionRulePaged[~azure.mgmt.alertsmanagement.models.ActionRule] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if target_resource_group is not None: + query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') + if target_resource_type is not None: + query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') + if target_resource is not None: + query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') + if severity is not None: + query_parameters['severity'] = self._serialize.query("severity", severity, 'str') + if monitor_service is not None: + query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') + if impacted_scope is not None: + query_parameters['impactedScope'] = self._serialize.query("impacted_scope", impacted_scope, 'str') + if description is not None: + query_parameters['description'] = self._serialize.query("description", description, 'str') + if alert_rule_id is not None: + query_parameters['alertRuleId'] = self._serialize.query("alert_rule_id", alert_rule_id, 'str') + if action_group is not None: + query_parameters['actionGroup'] = self._serialize.query("action_group", action_group, 'str') + if name is not None: + query_parameters['name'] = self._serialize.query("name", name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ActionRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/actionRules'} + + def list_by_resource_group( + self, resource_group_name, target_resource_group=None, target_resource_type=None, target_resource=None, severity=None, monitor_service=None, impacted_scope=None, description=None, alert_rule_id=None, action_group=None, name=None, custom_headers=None, raw=False, **operation_config): + """Get all action rules created in a resource group. + + List all action rules of the subscription, created in given resource + group and given input filters. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param target_resource_group: Filter by target resource group name. + Default value is select all. + :type target_resource_group: str + :param target_resource_type: Filter by target resource type. Default + value is select all. + :type target_resource_type: str + :param target_resource: Filter by target resource( which is full ARM + ID) Default value is select all. + :type target_resource: str + :param severity: Filter by severity. Default value is select all. + Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' + :type monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :param impacted_scope: filter by impacted/target scope (provide comma + separated list for multiple scopes). The value should be an well + constructed ARM id of the scope. + :type impacted_scope: str + :param description: filter by alert rule description + :type description: str + :param alert_rule_id: filter by alert rule id + :type alert_rule_id: str + :param action_group: filter by action group configured as part of + action rule + :type action_group: str + :param name: filter by action rule name + :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: An iterator like instance of ActionRule + :rtype: + ~azure.mgmt.alertsmanagement.models.ActionRulePaged[~azure.mgmt.alertsmanagement.models.ActionRule] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if target_resource_group is not None: + query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') + if target_resource_type is not None: + query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') + if target_resource is not None: + query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') + if severity is not None: + query_parameters['severity'] = self._serialize.query("severity", severity, 'str') + if monitor_service is not None: + query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') + if impacted_scope is not None: + query_parameters['impactedScope'] = self._serialize.query("impacted_scope", impacted_scope, 'str') + if description is not None: + query_parameters['description'] = self._serialize.query("description", description, 'str') + if alert_rule_id is not None: + query_parameters['alertRuleId'] = self._serialize.query("alert_rule_id", alert_rule_id, 'str') + if action_group is not None: + query_parameters['actionGroup'] = self._serialize.query("action_group", action_group, 'str') + if name is not None: + query_parameters['name'] = self._serialize.query("name", name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ActionRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules'} + + def get_by_name( + self, resource_group_name, action_rule_name, custom_headers=None, raw=False, **operation_config): + """Get action rule by name. + + Get a specific action rule. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param action_rule_name: The name of action rule that needs to be + fetched + :type action_rule_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: ActionRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.ActionRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_by_name.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'), + 'actionRuleName': self._serialize.url("action_rule_name", action_rule_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]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ActionRule', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}'} + + def create_update( + self, resource_group_name, action_rule_name, action_rule, custom_headers=None, raw=False, **operation_config): + """Create/update an action rule. + + Creates/Updates a specific action rule. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param action_rule_name: The name of action rule that needs to be + created/updated + :type action_rule_name: str + :param action_rule: action rule to be created/updated + :type action_rule: ~azure.mgmt.alertsmanagement.models.ActionRule + :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: ActionRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.ActionRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_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'), + 'actionRuleName': self._serialize.url("action_rule_name", action_rule_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(action_rule, 'ActionRule') + + # 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]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ActionRule', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}'} + + def delete( + self, resource_group_name, action_rule_name, custom_headers=None, raw=False, **operation_config): + """Delete action rule. + + Deletes a given action rule. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param action_rule_name: The name that needs to be deleted + :type action_rule_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: bool or ClientRawResponse if raw=true + :rtype: bool or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.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'), + 'actionRuleName': self._serialize.url("action_rule_name", action_rule_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.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('bool', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}'} + + def update( + self, resource_group_name, action_rule_name, status=None, tags=None, custom_headers=None, raw=False, **operation_config): + """Patch action rule. + + Update enabled flag and/or tags for the given action rule. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param action_rule_name: The name that needs to be updated + :type action_rule_name: str + :param status: Indicates if the given action rule is enabled or + disabled. Possible values include: 'Enabled', 'Disabled' + :type status: str or + ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param tags: tags to be updated + :type tags: object + :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: ActionRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.ActionRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + action_rule_patch = models.PatchObject(status=status, tags=tags) + + # Construct 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'), + 'actionRuleName': self._serialize.url("action_rule_name", action_rule_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(action_rule_patch, 'PatchObject') + + # 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]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ActionRule', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}'} diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/alerts_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_alerts_operations.py similarity index 81% rename from sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/alerts_operations.py rename to sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_alerts_operations.py index fd15f46bc817..7d0a9fa6d063 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/alerts_operations.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_alerts_operations.py @@ -11,6 +11,7 @@ import uuid from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError from .. import models @@ -18,11 +19,14 @@ class AlertsOperations(object): """AlertsOperations 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: API version. Constant value: "2018-05-05". + :ivar api_version: client API version. Constant value: "2019-05-05-preview". + :ivar identifier: Identification of the information to be retrieved by API call. Constant value: "MonitorServiceList". """ models = models @@ -32,15 +36,70 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-05-05" + self.api_version = "2019-05-05-preview" + self.identifier = "MonitorServiceList" self.config = config + def meta_data( + self, custom_headers=None, raw=False, **operation_config): + """List alerts meta data information based on value of identifier + parameter. + + :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: AlertsMetaData or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.AlertsMetaData or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.meta_data.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['identifier'] = self._serialize.query("self.identifier", self.identifier, '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('AlertsMetaData', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + meta_data.metadata = {'url': '/providers/Microsoft.AlertsManagement/alertsMetaData'} + def get_all( self, target_resource=None, target_resource_type=None, target_resource_group=None, monitor_service=None, monitor_condition=None, severity=None, alert_state=None, alert_rule=None, smart_group_id=None, include_context=None, include_egress_config=None, page_count=None, sort_by=None, sort_order=None, select=None, time_range=None, custom_time_range=None, custom_headers=None, raw=False, **operation_config): - """List all the existing alerts, where the results can be selective by - passing multiple filter parameters including time range and sorted on - specific fields. . + """List all existing alerts, where the results can be filtered on the + basis of multiple parameters (e.g. time range). The results can then be + sorted on the basis specific fields, with the default being + lastModifiedDateTime. . :param target_resource: Filter by target resource( which is full ARM ID) Default value is select all. @@ -51,21 +110,20 @@ def get_all( :param target_resource_group: Filter by target resource group name. Default value is select all. :type target_resource_group: str - :param monitor_service: Filter by monitor service which is the source - of the alert instance. Default value is select all. Possible values - include: 'Application Insights', 'ActivityLog Administrative', - 'ActivityLog Security', 'ActivityLog Recommendation', 'ActivityLog - Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' :type monitor_service: str or ~azure.mgmt.alertsmanagement.models.MonitorService - :param monitor_condition: Filter by monitor condition which is the - state of the monitor(alertRule) at monitor service. Default value is - to select all. Possible values include: 'Fired', 'Resolved' + :param monitor_condition: Filter by monitor condition which is either + 'Fired' or 'Resolved'. Default value is to select all. Possible values + include: 'Fired', 'Resolved' :type monitor_condition: str or ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param severity: Filter by severity. Defaut value is select all. + :param severity: Filter by severity. Default value is select all. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity :param alert_state: Filter by state of the alert instance. Default @@ -73,14 +131,14 @@ def get_all( 'Acknowledged', 'Closed' :type alert_state: str or ~azure.mgmt.alertsmanagement.models.AlertState - :param alert_rule: Filter by alert rule(monitor) which fired alert - instance. Default value is to select all. + :param alert_rule: Filter by specific alert rule. Default value is to + select all. :type alert_rule: str :param smart_group_id: Filter the alerts list by the Smart Group Id. Default value is none. :type smart_group_id: str - :param include_context: Include context which has data contextual to - the monitor service. Default value is false' + :param include_context: Include context which has contextual data + specific to the monitor service. Default value is false' :type include_context: bool :param include_egress_config: Include egress config which would be used for displaying the content in portal. Default value is 'false'. @@ -102,9 +160,9 @@ def get_all( others. Possible values include: 'asc', 'desc' :type sort_order: str :param select: This filter allows to selection of the fields(comma - seperated) which would be part of the the essential section. This - would allow to project only the required fields rather than getting - entire content. Default is to fetch all the fields in the essentials + separated) which would be part of the essential section. This would + allow to project only the required fields rather than getting entire + content. Default is to fetch all the fields in the essentials section. :type select: str :param time_range: Filter by time range by below listed values. @@ -128,8 +186,7 @@ def get_all( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.get_all.metadata['url'] @@ -192,6 +249,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -200,12 +262,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized get_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts'} @@ -259,7 +319,6 @@ def get_by_id( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Alert', response) @@ -272,7 +331,7 @@ def get_by_id( def change_state( self, alert_id, new_state, custom_headers=None, raw=False, **operation_config): - """Change the state of the alert. + """Change the state of an alert. :param alert_id: Unique ID of an alert instance. :type alert_id: str @@ -321,7 +380,6 @@ def change_state( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Alert', response) @@ -334,7 +392,9 @@ def change_state( def get_history( self, alert_id, custom_headers=None, raw=False, **operation_config): - """Get the history of the changes of an alert. + """Get the history of an alert, which captures any monitor condition + changes (Fired/Resolved) and alert state changes + (New/Acknowledged/Closed). :param alert_id: Unique ID of an alert instance. :type alert_id: str @@ -379,7 +439,6 @@ def get_history( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AlertModification', response) @@ -392,10 +451,13 @@ def get_history( def get_summary( self, groupby, include_smart_groups_count=None, target_resource=None, target_resource_type=None, target_resource_group=None, monitor_service=None, monitor_condition=None, severity=None, alert_state=None, alert_rule=None, time_range=None, custom_time_range=None, custom_headers=None, raw=False, **operation_config): - """Summary of alerts with the count each severity. + """Get a summarized count of your alerts grouped by various parameters + (e.g. grouping by 'Severity' returns the count of alerts for each + severity). - :param groupby: This parameter allows the result set to be aggregated - by input fields. For example, groupby=severity,alertstate. Possible + :param groupby: This parameter allows the result set to be grouped by + input fields (Maximum 2 comma separated fields supported). For + example, groupby=severity or groupby=severity,alertstate. Possible values include: 'severity', 'alertState', 'monitorCondition', 'monitorService', 'signalType', 'alertRule' :type groupby: str or @@ -412,21 +474,20 @@ def get_summary( :param target_resource_group: Filter by target resource group name. Default value is select all. :type target_resource_group: str - :param monitor_service: Filter by monitor service which is the source - of the alert instance. Default value is select all. Possible values - include: 'Application Insights', 'ActivityLog Administrative', - 'ActivityLog Security', 'ActivityLog Recommendation', 'ActivityLog - Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' :type monitor_service: str or ~azure.mgmt.alertsmanagement.models.MonitorService - :param monitor_condition: Filter by monitor condition which is the - state of the monitor(alertRule) at monitor service. Default value is - to select all. Possible values include: 'Fired', 'Resolved' + :param monitor_condition: Filter by monitor condition which is either + 'Fired' or 'Resolved'. Default value is to select all. Possible values + include: 'Fired', 'Resolved' :type monitor_condition: str or ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param severity: Filter by severity. Defaut value is select all. + :param severity: Filter by severity. Default value is select all. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity :param alert_state: Filter by state of the alert instance. Default @@ -434,8 +495,8 @@ def get_summary( 'Acknowledged', 'Closed' :type alert_state: str or ~azure.mgmt.alertsmanagement.models.AlertState - :param alert_rule: Filter by alert rule(monitor) which fired alert - instance. Default value is to select all. + :param alert_rule: Filter by specific alert rule. Default value is to + select all. :type alert_rule: str :param time_range: Filter by time range by below listed values. Default value is 1 day. Possible values include: '1h', '1d', '7d', @@ -510,7 +571,6 @@ def get_summary( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AlertsSummary', response) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_operations.py similarity index 87% rename from sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/operations.py rename to sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_operations.py index 9718bb4566f6..057900f678f2 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/operations.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_operations.py @@ -19,11 +19,13 @@ class Operations(object): """Operations 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: API version. Constant value: "2018-05-05". + :ivar api_version: client API version. Constant value: "2019-05-05-preview". """ models = models @@ -33,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-05-05" + self.api_version = "2019-05-05-preview" self.config = config @@ -52,8 +54,7 @@ def list( ~azure.mgmt.alertsmanagement.models.OperationPaged[~azure.mgmt.alertsmanagement.models.Operation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -78,6 +79,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -88,12 +94,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.AlertsManagement/operations'} diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py new file mode 100644 index 000000000000..2cc0b1152ea4 --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py @@ -0,0 +1,436 @@ +# 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 .. import models + + +class SmartDetectorAlertRulesOperations(object): + """SmartDetectorAlertRulesOperations 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: "2019-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-06-01" + + self.config = config + + def list( + self, expand_detector=None, custom_headers=None, raw=False, **operation_config): + """List all the existing Smart Detector alert rules within the + subscription. + + :param expand_detector: Indicates if Smart Detector should be + expanded. + :type expand_detector: bool + :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: An iterator like instance of AlertRule + :rtype: + ~azure.mgmt.alertsmanagement.models.AlertRulePaged[~azure.mgmt.alertsmanagement.models.AlertRule] + :raises: + :class:`ErrorResponse1Exception` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if expand_detector is not None: + query_parameters['expandDetector'] = self._serialize.query("expand_detector", expand_detector, 'bool') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AlertRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.alertsManagement/smartDetectorAlertRules'} + + def list_by_resource_group( + self, resource_group_name, expand_detector=None, custom_headers=None, raw=False, **operation_config): + """List all the existing Smart Detector alert rules within the + subscription and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param expand_detector: Indicates if Smart Detector should be + expanded. + :type expand_detector: bool + :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: An iterator like instance of AlertRule + :rtype: + ~azure.mgmt.alertsmanagement.models.AlertRulePaged[~azure.mgmt.alertsmanagement.models.AlertRule] + :raises: + :class:`ErrorResponse1Exception` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.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') + } + 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') + if expand_detector is not None: + query_parameters['expandDetector'] = self._serialize.query("expand_detector", expand_detector, 'bool') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AlertRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules'} + + def get( + self, resource_group_name, alert_rule_name, expand_detector=None, custom_headers=None, raw=False, **operation_config): + """Get a specific Smart Detector alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param alert_rule_name: The name of the alert rule. + :type alert_rule_name: str + :param expand_detector: Indicates if Smart Detector should be + expanded. + :type expand_detector: bool + :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: AlertRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.AlertRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponse1Exception` + """ + # 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'), + 'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_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') + if expand_detector is not None: + query_parameters['expandDetector'] = self._serialize.query("expand_detector", expand_detector, 'bool') + + # 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]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AlertRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules/{alertRuleName}'} + + def create_or_update( + self, resource_group_name, alert_rule_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or update a Smart Detector alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param alert_rule_name: The name of the alert rule. + :type alert_rule_name: str + :param parameters: Parameters supplied to the operation. + :type parameters: ~azure.mgmt.alertsmanagement.models.AlertRule + :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: AlertRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.AlertRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponse1Exception` + """ + # Construct URL + url = self.create_or_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'), + 'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_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(parameters, 'AlertRule') + + # 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, 201]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AlertRule', response) + if response.status_code == 201: + deserialized = self._deserialize('AlertRule', 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.alertsManagement/smartDetectorAlertRules/{alertRuleName}'} + + def patch( + self, resource_group_name, alert_rule_name, parameters, custom_headers=None, raw=False, **operation_config): + """Patch a specific Smart Detector alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param alert_rule_name: The name of the alert rule. + :type alert_rule_name: str + :param parameters: Parameters supplied to the operation. + :type parameters: + ~azure.mgmt.alertsmanagement.models.AlertRulePatchObject + :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: AlertRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.AlertRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponse1Exception` + """ + # Construct URL + url = self.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'), + 'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_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(parameters, 'AlertRulePatchObject') + + # 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]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AlertRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules/{alertRuleName}'} + + def delete( + self, resource_group_name, alert_rule_name, custom_headers=None, raw=False, **operation_config): + """Delete an existing Smart Detector alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param alert_rule_name: The name of the alert rule. + :type alert_rule_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:`ErrorResponse1Exception` + """ + # Construct URL + url = self.delete.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'), + 'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_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 = {} + 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.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules/{alertRuleName}'} diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/smart_groups_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_groups_operations.py similarity index 70% rename from sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/smart_groups_operations.py rename to sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_groups_operations.py index 8ff2c33ae120..bd4c0cfce5c1 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/smart_groups_operations.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_groups_operations.py @@ -18,11 +18,13 @@ class SmartGroupsOperations(object): """SmartGroupsOperations 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: API version. Constant value: "2018-05-05". + :ivar api_version: client API version. Constant value: "2019-05-05-preview". """ models = models @@ -32,15 +34,15 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-05-05" + self.api_version = "2019-05-05-preview" self.config = config def get_all( self, target_resource=None, target_resource_group=None, target_resource_type=None, monitor_service=None, monitor_condition=None, severity=None, smart_group_state=None, time_range=None, page_count=None, sort_by=None, sort_order=None, custom_headers=None, raw=False, **operation_config): - """Get all smartGroups within the subscription. + """Get all Smart Groups within a specified subscription. - List all the smartGroups within the specified subscription. . + List all the Smart Groups within a specified subscription. . :param target_resource: Filter by target resource( which is full ARM ID) Default value is select all. @@ -51,21 +53,20 @@ def get_all( :param target_resource_type: Filter by target resource type. Default value is select all. :type target_resource_type: str - :param monitor_service: Filter by monitor service which is the source - of the alert instance. Default value is select all. Possible values - include: 'Application Insights', 'ActivityLog Administrative', - 'ActivityLog Security', 'ActivityLog Recommendation', 'ActivityLog - Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' :type monitor_service: str or ~azure.mgmt.alertsmanagement.models.MonitorService - :param monitor_condition: Filter by monitor condition which is the - state of the monitor(alertRule) at monitor service. Default value is - to select all. Possible values include: 'Fired', 'Resolved' + :param monitor_condition: Filter by monitor condition which is either + 'Fired' or 'Resolved'. Default value is to select all. Possible values + include: 'Fired', 'Resolved' :type monitor_condition: str or ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param severity: Filter by severity. Defaut value is select all. + :param severity: Filter by severity. Default value is select all. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity :param smart_group_state: Filter by state of the smart group. Default @@ -82,7 +83,7 @@ def get_all( "includeContent" filter is selected, maximum value allowed is 25. Default value is 25. :type page_count: int - :param sort_by: Sort the query results by input field Default value + :param sort_by: Sort the query results by input field. Default value is sort by 'lastModifiedDateTime'. Possible values include: 'alertsCount', 'state', 'severity', 'startDateTime', 'lastModifiedDateTime' @@ -97,79 +98,89 @@ def get_all( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: SmartGroupsList or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.alertsmanagement.models.SmartGroupsList or - ~msrest.pipeline.ClientRawResponse + :return: An iterator like instance of SmartGroup + :rtype: + ~azure.mgmt.alertsmanagement.models.SmartGroupPaged[~azure.mgmt.alertsmanagement.models.SmartGroup] :raises: :class:`ErrorResponseException` """ - # Construct URL - url = self.get_all.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if target_resource is not None: - query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') - if target_resource_group is not None: - query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') - if target_resource_type is not None: - query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') - if monitor_service is not None: - query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') - if monitor_condition is not None: - query_parameters['monitorCondition'] = self._serialize.query("monitor_condition", monitor_condition, 'str') - if severity is not None: - query_parameters['severity'] = self._serialize.query("severity", severity, 'str') - if smart_group_state is not None: - query_parameters['smartGroupState'] = self._serialize.query("smart_group_state", smart_group_state, 'str') - if time_range is not None: - query_parameters['timeRange'] = self._serialize.query("time_range", time_range, 'str') - if page_count is not None: - query_parameters['pageCount'] = self._serialize.query("page_count", page_count, 'int') - if sort_by is not None: - query_parameters['sortBy'] = self._serialize.query("sort_by", sort_by, 'str') - if sort_order is not None: - query_parameters['sortOrder'] = self._serialize.query("sort_order", sort_order, 'str') - 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]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SmartGroupsList', response) - + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_all.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if target_resource is not None: + query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') + if target_resource_group is not None: + query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') + if target_resource_type is not None: + query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') + if monitor_service is not None: + query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') + if monitor_condition is not None: + query_parameters['monitorCondition'] = self._serialize.query("monitor_condition", monitor_condition, 'str') + if severity is not None: + query_parameters['severity'] = self._serialize.query("severity", severity, 'str') + if smart_group_state is not None: + query_parameters['smartGroupState'] = self._serialize.query("smart_group_state", smart_group_state, 'str') + if time_range is not None: + query_parameters['timeRange'] = self._serialize.query("time_range", time_range, 'str') + if page_count is not None: + query_parameters['pageCount'] = self._serialize.query("page_count", page_count, 'int') + if sort_by is not None: + query_parameters['sortBy'] = self._serialize.query("sort_by", sort_by, 'str') + if sort_order is not None: + query_parameters['sortOrder'] = self._serialize.query("sort_order", sort_order, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + header_dict = {} + deserialized = models.SmartGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized get_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups'} def get_by_id( self, smart_group_id, custom_headers=None, raw=False, **operation_config): - """Get information of smart alerts group. + """Get information related to a specific Smart Group. - Get details of smart group. + Get information related to a specific Smart Group. :param smart_group_id: Smart group unique id. :type smart_group_id: str @@ -213,9 +224,8 @@ def get_by_id( if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) - deserialized = None header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('SmartGroup', response) header_dict = { @@ -232,8 +242,7 @@ def get_by_id( def change_state( self, smart_group_id, new_state, custom_headers=None, raw=False, **operation_config): - """Change the state from unresolved to resolved and all the alerts within - the smart group will also be resolved. + """Change the state of a Smart Group. :param smart_group_id: Smart group unique id. :type smart_group_id: str @@ -281,9 +290,8 @@ def change_state( if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) - deserialized = None header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('SmartGroup', response) header_dict = { @@ -300,7 +308,8 @@ def change_state( def get_history( self, smart_group_id, custom_headers=None, raw=False, **operation_config): - """Get the history of the changes of smart group. + """Get the history a smart group, which captures any Smart Group state + changes (New/Acknowledged/Closed) . :param smart_group_id: Smart group unique id. :type smart_group_id: str @@ -345,7 +354,6 @@ def get_history( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SmartGroupModification', response) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py index e0ec669828cb..fda99682a9d1 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.0" +VERSION = "0.2.0rc1" diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py index 129b94c14ea7..899d78df4c87 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py @@ -53,6 +53,7 @@ version=version, description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), long_description=readme + '\n\n' + history, + long_description_content_type='text/x-rst', license='MIT License', author='Microsoft Corporation', author_email='azpysdkhelp@microsoft.com', @@ -63,7 +64,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', From acbf669d0c0cfd1d288cea2eb88fb5e568b285e3 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 08:51:19 -0700 Subject: [PATCH 046/244] Synchronous username/password auth (#6416) --- .../azure-identity/azure/identity/__init__.py | 2 + .../azure/identity/_internal/__init__.py | 4 +- .../identity/_internal/msal_credentials.py | 98 +++++++++++------ .../azure/identity/constants.py | 4 + .../azure/identity/credentials.py | 100 +++++++++++++++--- .../azure-identity/tests/test_identity.py | 31 ++++++ .../tests/{helpers.py => keys_helpers.py} | 0 .../tests/test_challenge_auth.py | 2 +- .../tests/test_challenge_auth_async.py | 2 +- 9 files changed, 194 insertions(+), 49 deletions(-) rename sdk/keyvault/azure-keyvault-keys/tests/{helpers.py => keys_helpers.py} (100%) diff --git a/sdk/identity/azure-identity/azure/identity/__init__.py b/sdk/identity/azure-identity/azure/identity/__init__.py index 512b415a27ec..fd23d51c8e32 100644 --- a/sdk/identity/azure-identity/azure/identity/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/__init__.py @@ -8,6 +8,7 @@ ClientSecretCredential, EnvironmentCredential, ManagedIdentityCredential, + UsernamePasswordCredential, ) @@ -35,4 +36,5 @@ def __init__(self, **kwargs): "DefaultAzureCredential", "EnvironmentCredential", "ManagedIdentityCredential", + "UsernamePasswordCredential", ] diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index 9ea29a25784d..cfdf935b801c 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,5 +2,5 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from .msal_credentials import ConfidentialClientCredential -from .msal_transport_adapter import MsalTransportResponse, MsalTransportAdapter +from .msal_credentials import ConfidentialClientCredential, PublicClientCredential +from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/azure/identity/_internal/msal_credentials.py b/sdk/identity/azure-identity/azure/identity/_internal/msal_credentials.py index 9bf44cbb3219..83906bf71c2e 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/msal_credentials.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/msal_credentials.py @@ -5,35 +5,40 @@ """Credentials wrapping MSAL applications and delegating token acquisition and caching to them. This entails monkeypatching MSAL's OAuth client with an adapter substituting an azure-core pipeline for Requests. """ - +import abc import time +import msal +from azure.core.credentials import AccessToken +from azure.core.exceptions import ClientAuthenticationError + +from .msal_transport_adapter import MsalTransportAdapter + try: - from typing import TYPE_CHECKING -except ImportError: - TYPE_CHECKING = False + ABC = abc.ABC +except AttributeError: # Python 2.7, abc exists, but not ABC + ABC = abc.ABCMeta("ABC", (object,), {"__slots__": ()}) # type: ignore try: from unittest import mock except ImportError: # python < 3.3 import mock # type: ignore +try: + from typing import TYPE_CHECKING +except ImportError: + TYPE_CHECKING = False + if TYPE_CHECKING: # pylint:disable=unused-import - from typing import Any, Mapping, Optional, Union + from typing import Any, Mapping, Optional, Type, Union -from azure.core.credentials import AccessToken -from azure.core.exceptions import ClientAuthenticationError -import msal - -from .msal_transport_adapter import MsalTransportAdapter - -class MsalCredential(object): +class MsalCredential(ABC): """Base class for credentials wrapping MSAL applications""" - def __init__(self, client_id, authority, app_class, client_credential=None, **kwargs): - # type: (str, str, msal.ClientApplication, Optional[Union[str, Mapping[str, str]]], Any) -> None + def __init__(self, client_id, authority, client_credential=None, **kwargs): + # type: (str, str, Optional[Union[str, Mapping[str, str]]], Any) -> None self._authority = authority self._client_credential = client_credential self._client_id = client_id @@ -41,35 +46,35 @@ def __init__(self, client_id, authority, app_class, client_credential=None, **kw self._adapter = kwargs.pop("msal_adapter", None) or MsalTransportAdapter(**kwargs) # postpone creating the wrapped application because its initializer uses the network - self._app_class = app_class self._msal_app = None # type: Optional[msal.ClientApplication] - @property - def _app(self): + @abc.abstractmethod + def get_token(self, *scopes): + # type: (str) -> AccessToken + pass + + @abc.abstractmethod + def _get_app(self): # type: () -> msal.ClientApplication - """The wrapped MSAL application""" + pass - if not self._msal_app: - # MSAL application initializers use msal.authority to send AAD tenant discovery requests - with mock.patch("msal.authority.requests", self._adapter): - app = self._app_class( - client_id=self._client_id, client_credential=self._client_credential, authority=self._authority - ) + def _create_app(self, cls): + # type: (Type[msal.ClientApplication]) -> msal.ClientApplication + """Creates an MSAL application, patching msal.authority to use an azure-core pipeline during tenant discovery""" - # monkeypatch the app to replace requests.Session with MsalTransportAdapter - app.client.session = self._adapter - self._msal_app = app + # MSAL application initializers use msal.authority to send AAD tenant discovery requests + with mock.patch("msal.authority.requests", self._adapter): + app = cls(client_id=self._client_id, client_credential=self._client_credential, authority=self._authority) - return self._msal_app + # monkeypatch the app to replace requests.Session with MsalTransportAdapter + app.client.session = self._adapter + + return app class ConfidentialClientCredential(MsalCredential): """Wraps an MSAL ConfidentialClientApplication with the TokenCredential API""" - def __init__(self, **kwargs): - # type: (Any) -> None - super(ConfidentialClientCredential, self).__init__(app_class=msal.ConfidentialClientApplication, **kwargs) - def get_token(self, *scopes): # type: (str) -> AccessToken @@ -79,10 +84,37 @@ def get_token(self, *scopes): # First try to get a cached access token or if a refresh token is cached, redeem it for an access token. # Failing that, acquire a new token. - app = self._app # type: msal.ConfidentialClientApplication + app = self._get_app() result = app.acquire_token_silent(scopes, account=None) or app.acquire_token_for_client(scopes) if "access_token" not in result: raise ClientAuthenticationError(message="authentication failed: {}".format(result.get("error_description"))) return AccessToken(result["access_token"], now + int(result["expires_in"])) + + def _get_app(self): + # type: () -> msal.ConfidentialClientApplication + if not self._msal_app: + self._msal_app = self._create_app(msal.ConfidentialClientApplication) + return self._msal_app + + +class PublicClientCredential(MsalCredential): + """Wraps an MSAL PublicClientApplication with the TokenCredential API""" + + def __init__(self, **kwargs): + # type: (Any) -> None + super(PublicClientCredential, self).__init__( + authority="https://login.microsoftonline.com/" + kwargs.pop("tenant", "organizations"), **kwargs + ) + + @abc.abstractmethod + def get_token(self, *scopes): + # type: (str) -> AccessToken + pass + + def _get_app(self): + # type: () -> msal.PublicClientApplication + if not self._msal_app: + self._msal_app = self._create_app(msal.PublicClientApplication) + return self._msal_app diff --git a/sdk/identity/azure-identity/azure/identity/constants.py b/sdk/identity/azure-identity/azure/identity/constants.py index 5b50dd98625b..1c2608e5da8b 100644 --- a/sdk/identity/azure-identity/azure/identity/constants.py +++ b/sdk/identity/azure-identity/azure/identity/constants.py @@ -13,6 +13,10 @@ class EnvironmentVariables: AZURE_CLIENT_CERTIFICATE_PATH = "AZURE_CLIENT_CERTIFICATE_PATH" CERT_VARS = (AZURE_CLIENT_ID, AZURE_CLIENT_CERTIFICATE_PATH, AZURE_TENANT_ID) + AZURE_USERNAME = "AZURE_USERNAME" + AZURE_PASSWORD = "AZURE_PASSWORD" + USERNAME_PASSWORD_VARS = (AZURE_CLIENT_ID, AZURE_USERNAME, AZURE_PASSWORD) + MSI_ENDPOINT = "MSI_ENDPOINT" MSI_SECRET = "MSI_SECRET" diff --git a/sdk/identity/azure-identity/azure/identity/credentials.py b/sdk/identity/azure-identity/azure/identity/credentials.py index d53edf8e2c62..2e09a306aa71 100644 --- a/sdk/identity/azure-identity/azure/identity/credentials.py +++ b/sdk/identity/azure-identity/azure/identity/credentials.py @@ -6,6 +6,7 @@ Credentials for Azure SDK authentication. """ import os +import time from azure.core import Configuration from azure.core.credentials import AccessToken @@ -14,6 +15,7 @@ from ._authn_client import AuthnClient from ._base import ClientSecretCredentialBase, CertificateCredentialBase +from ._internal import PublicClientCredential from ._managed_identity import ImdsCredential, MsiCredential from .constants import Endpoints, EnvironmentVariables @@ -26,6 +28,7 @@ # pylint:disable=unused-import from typing import Any, Dict, Mapping, Optional, Union from azure.core.credentials import TokenCredential + EnvironmentCredentialTypes = Union["CertificateCredential", "ClientSecretCredential", "UsernamePasswordCredential"] # pylint:disable=too-few-public-methods @@ -96,23 +99,29 @@ def get_token(self, *scopes): class EnvironmentCredential: """ - Authenticates as a service principal using a client ID/secret pair or a certificate, - depending on environment variable settings. - - These environment variables are required: + Authenticates as a service principal using a client secret or a certificate, or as a user with a username and + password, depending on environment variable settings. Configuration is attempted in this order, using these + environment variables: + Service principal with secret: - **AZURE_CLIENT_ID**: the service principal's client ID + - **AZURE_CLIENT_SECRET**: one of the service principal's client secrets - **AZURE_TENANT_ID**: ID of the service principal's tenant. Also called its 'directory' ID. - Additionally, set **one** of these to configure client secret or certificate authentication: - - - **AZURE_CLIENT_SECRET**: one of the service principal's client secrets + Service principal with certificate: + - **AZURE_CLIENT_ID**: the service principal's client ID - **AZURE_CLIENT_CERTIFICATE_PATH**: path to a PEM-encoded certificate file including the private key + - **AZURE_TENANT_ID**: ID of the service principal's tenant. Also called its 'directory' ID. + + User with username and password: + - **AZURE_CLIENT_ID**: the application's client ID + - **AZURE_USERNAME**: a username (usually an email address) + - **AZURE_PASSWORD**: that user's password """ def __init__(self, **kwargs): # type: (Mapping[str, Any]) -> None - self._credential = None # type: Optional[Union[CertificateCredential, ClientSecretCredential]] + self._credential = None # type: Optional[EnvironmentCredentialTypes] if all(os.environ.get(v) is not None for v in EnvironmentVariables.CLIENT_SECRET_VARS): self._credential = ClientSecretCredential( @@ -128,6 +137,14 @@ def __init__(self, **kwargs): certificate_path=os.environ[EnvironmentVariables.AZURE_CLIENT_CERTIFICATE_PATH], **kwargs ) + elif all(os.environ.get(v) is not None for v in EnvironmentVariables.USERNAME_PASSWORD_VARS): + self._credential = UsernamePasswordCredential( + client_id=os.environ[EnvironmentVariables.AZURE_CLIENT_ID], + username=os.environ[EnvironmentVariables.AZURE_USERNAME], + password=os.environ[EnvironmentVariables.AZURE_PASSWORD], + tenant=os.environ.get(EnvironmentVariables.AZURE_TENANT_ID), # optional for username/password auth + **kwargs + ) def get_token(self, *scopes): # type (*str) -> AccessToken @@ -139,10 +156,7 @@ def get_token(self, *scopes): :raises: :class:`azure.core.exceptions.ClientAuthenticationError` """ if not self._credential: - message = "Missing environment settings. To authenticate with one of the service principal's client secrets, set {}. To authenticate with a certificate, set {}.".format( - ", ".join(EnvironmentVariables.CLIENT_SECRET_VARS), ", ".join(EnvironmentVariables.CERT_VARS) - ) - raise ClientAuthenticationError(message=message) + raise ClientAuthenticationError(message="Incomplete environment configuration.") return self._credential.get_token(*scopes) @@ -233,3 +247,65 @@ def _get_error_message(history): else: attempts.append(credential.__class__.__name__) return "No valid token received. {}".format(". ".join(attempts)) + + +class UsernamePasswordCredential(PublicClientCredential): + """ + Authenticates a user with a username and password. In general, Microsoft doesn't recommend this kind of + authentication, because it's less secure than other authentication flows. + + Authentication with this credential is not interactive, so it is **not compatible with any form of + multi-factor authentication or consent prompting**. The application must already have the user's consent. + + This credential can only authenticate work and school accounts; Microsoft accounts are not supported. + See this document for more information about account types: + https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/sign-up-organization + + :param str client_id: the application's client ID + :param str username: the user's username (usually an email address) + :param str password: the user's password + + **Keyword arguments:** + + *tenant (str)* - a tenant ID or a domain associated with a tenant. If not provided, the credential defaults to the + 'organizations' tenant. + """ + + def __init__(self, client_id, username, password, **kwargs): + # type: (str, str, str, Any) -> None + super(UsernamePasswordCredential, self).__init__(client_id=client_id, **kwargs) + self._username = username + self._password = password + + def get_token(self, *scopes): + # type (*str) -> AccessToken + """ + Request an access token for `scopes`. + + :param str scopes: desired scopes for the token + :rtype: :class:`azure.core.credentials.AccessToken` + :raises: :class:`azure.core.exceptions.ClientAuthenticationError` + """ + + # MSAL requires scopes be a list + scopes = list(scopes) # type: ignore + now = int(time.time()) + + app = self._get_app() + accounts = app.get_accounts(username=self._username) + result = None + for account in accounts: + result = app.acquire_token_silent(scopes, account=account) + if result: + break + + if not result: + # cache miss -> request a new token + result = app.acquire_token_by_username_password( + username=self._username, password=self._password, scopes=scopes + ) + + if "access_token" not in result: + raise ClientAuthenticationError(message="authentication failed: {}".format(result.get("error_description"))) + + return AccessToken(result["access_token"], now + int(result["expires_in"])) diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index b017792595a8..4e7fb13b4f6b 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -21,6 +21,7 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, + UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential from azure.identity.constants import EnvironmentVariables @@ -239,3 +240,33 @@ def test_imds_credential_retries(): def test_default_credential(): DefaultAzureCredential() + + +def test_username_password_credential(): + expected_token = "access-token" + transport = validating_transport( + requests=[Request()] * 2, # not validating requests because they're formed by MSAL + responses=[ + # expecting tenant discovery then a token request + mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), + mock_response( + json_payload={ + "access_token": expected_token, + "expires_in": 42, + "token_type": "Bearer", + "ext_expires_in": 42, + } + ), + ], + ) + + credential = UsernamePasswordCredential( + client_id="some-guid", + username="user@azure", + password="secret_password", + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + token = credential.get_token("scope") + assert token.token == expected_token diff --git a/sdk/keyvault/azure-keyvault-keys/tests/helpers.py b/sdk/keyvault/azure-keyvault-keys/tests/keys_helpers.py similarity index 100% rename from sdk/keyvault/azure-keyvault-keys/tests/helpers.py rename to sdk/keyvault/azure-keyvault-keys/tests/keys_helpers.py diff --git a/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth.py b/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth.py index 04ead0b933b1..13054cc0b1d2 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth.py @@ -18,7 +18,7 @@ from azure.keyvault.keys._shared import ChallengeAuthPolicy, HttpChallenge, HttpChallengeCache import pytest -from helpers import mock_response, Request, validating_transport +from keys_helpers import mock_response, Request, validating_transport def test_challenge_cache(): diff --git a/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py b/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py index c4d72b1c7550..27cda5f91d8e 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py @@ -19,7 +19,7 @@ from azure.keyvault.keys._shared import AsyncChallengeAuthPolicy, HttpChallenge, HttpChallengeCache import pytest -from helpers import async_validating_transport, mock_response, Request +from keys_helpers import async_validating_transport, mock_response, Request @pytest.mark.asyncio From c91215ff4df2cd6885abdb389e5c741795bd1d0f Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 14:04:30 -0700 Subject: [PATCH 047/244] Synchronous interactive browser authentication (#6466) --- .../azure-identity/azure/identity/__init__.py | 2 + .../azure/identity/_internal/__init__.py | 1 + .../_internal/auth_code_redirect_handler.py | 75 +++++++++++ .../azure/identity/browser_auth.py | 121 ++++++++++++++++++ .../azure-identity/tests/test_identity.py | 73 ++++++++++- 5 files changed, 270 insertions(+), 2 deletions(-) create mode 100644 sdk/identity/azure-identity/azure/identity/_internal/auth_code_redirect_handler.py create mode 100644 sdk/identity/azure-identity/azure/identity/browser_auth.py diff --git a/sdk/identity/azure-identity/azure/identity/__init__.py b/sdk/identity/azure-identity/azure/identity/__init__.py index fd23d51c8e32..1df14dd617f5 100644 --- a/sdk/identity/azure-identity/azure/identity/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/__init__.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +from .browser_auth import InteractiveBrowserCredential from .credentials import ( CertificateCredential, ChainedTokenCredential, @@ -35,6 +36,7 @@ def __init__(self, **kwargs): "ClientSecretCredential", "DefaultAzureCredential", "EnvironmentCredential", + "InteractiveBrowserCredential", "ManagedIdentityCredential", "UsernamePasswordCredential", ] diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index cfdf935b801c..e7583139395b 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,5 +2,6 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +from .auth_code_redirect_handler import AuthCodeRedirectServer from .msal_credentials import ConfidentialClientCredential, PublicClientCredential from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/azure/identity/_internal/auth_code_redirect_handler.py b/sdk/identity/azure-identity/azure/identity/_internal/auth_code_redirect_handler.py new file mode 100644 index 000000000000..caaa9519033c --- /dev/null +++ b/sdk/identity/azure-identity/azure/identity/_internal/auth_code_redirect_handler.py @@ -0,0 +1,75 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +try: + from typing import TYPE_CHECKING +except ImportError: + TYPE_CHECKING = False + +if TYPE_CHECKING: + from typing import Any, Mapping, Optional + +try: + from http.server import HTTPServer, BaseHTTPRequestHandler +except ImportError: + from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler # type: ignore + +try: + from urllib.parse import parse_qs +except ImportError: + from urlparse import parse_qs # type: ignore + + +class AuthCodeRedirectHandler(BaseHTTPRequestHandler): + """HTTP request handler to capture the authentication server's response. + Largely from the Azure CLI: https://github.com/Azure/azure-cli/blob/dev/src/azure-cli-core/azure/cli/core/_profile.py + """ + + def do_GET(self): + if self.path.endswith("/favicon.ico"): # deal with legacy IE + self.send_response(204) + return + + query = self.path.split("?", 1)[-1] + query = parse_qs(query, keep_blank_values=True) + self.server.query_params = query + + self.send_response(200) + self.send_header("Content-Type", "text/html") + self.end_headers() + + self.wfile.write(b"Authentication complete. You can close this window.") + + def log_message(self, format, *args): # pylint: disable=redefined-builtin,unused-argument,no-self-use + pass # this prevents server dumping messages to stdout + + +class AuthCodeRedirectServer(HTTPServer): + """HTTP server that listens on localhost for the redirect request following an authorization code authentication""" + + query_params = {} # type: Mapping[str, Any] + + def __init__(self, port, timeout): + # type: (int, int) -> None + super(AuthCodeRedirectServer, self).__init__(("localhost", port), AuthCodeRedirectHandler) + self.timeout = timeout + + def wait_for_redirect(self): + # type: () -> Mapping[str, Any] + while not self.query_params: + try: + self.handle_request() + except ValueError: + # socket has been closed, probably by handle_timeout + break + + # ensure the underlying socket is closed (a no-op when the socket is already closed) + self.server_close() + + # if we timed out, this returns an empty dict + return self.query_params + + def handle_timeout(self): + """Break the request-handling loop by tearing down the server""" + self.server_close() diff --git a/sdk/identity/azure-identity/azure/identity/browser_auth.py b/sdk/identity/azure-identity/azure/identity/browser_auth.py new file mode 100644 index 000000000000..82460513092d --- /dev/null +++ b/sdk/identity/azure-identity/azure/identity/browser_auth.py @@ -0,0 +1,121 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +import socket +import time +import uuid +import webbrowser + +try: + from typing import TYPE_CHECKING +except ImportError: + TYPE_CHECKING = False + +if TYPE_CHECKING: + from typing import Any, List, Mapping + +from azure.core.credentials import AccessToken +from azure.core.exceptions import ClientAuthenticationError + +from ._internal import AuthCodeRedirectServer, ConfidentialClientCredential + + +class InteractiveBrowserCredential(ConfidentialClientCredential): + """ + Authenticates a user through the authorization code flow. This is an interactive flow: ``get_token`` opens a + browser to a login URL provided by Azure Active Directory, and waits for the user to authenticate there. + + Azure Active Directory documentation describes the authorization code flow in more detail: + https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-protocols-oauth-code + + :param str client_id: the application's client ID + :param str secret: one of the application's client secrets + + **Keyword arguments:** + + *tenant (str)* - a tenant ID or a domain associated with a tenant. If not provided, the credential defaults to the + 'organizations' tenant, which can authenticate work or school accounts. + *timeout (str)* - seconds to wait for the user to complete authentication. Defaults to 300 (5 minutes). + """ + + def __init__(self, client_id, client_secret, **kwargs): + # type: (str, str, Any) -> None + self._timeout = kwargs.pop("timeout", 300) + self._server_class = kwargs.pop("server_class", AuthCodeRedirectServer) # facilitate mocking + authority = "https://login.microsoftonline.com/" + kwargs.pop("tenant", "organizations") + super(InteractiveBrowserCredential, self).__init__( + client_id=client_id, client_credential=client_secret, authority=authority, **kwargs + ) + + def get_token(self, *scopes): + # type: (str) -> AccessToken + """ + Request an access token for `scopes`. This will open a browser to a login page and listen on localhost for a + request indicating authentication has completed. + + :param str scopes: desired scopes for the token + :rtype: :class:`azure.core.credentials.AccessToken` + :raises: :class:`azure.core.exceptions.ClientAuthenticationError` + """ + + # start an HTTP server on localhost to receive the redirect + for port in range(8400, 9000): + try: + server = self._server_class(port, timeout=self._timeout) + redirect_uri = "http://localhost:{}".format(port) + break + except socket.error: + continue # keep looking for an open port + + if not redirect_uri: + raise ClientAuthenticationError(message="Couldn't start an HTTP server on localhost") + + # get the url the user must visit to authenticate + scopes = list(scopes) # type: ignore + request_state = str(uuid.uuid4()) + app = self._get_app() + auth_url = app.get_authorization_request_url(scopes, redirect_uri=redirect_uri, state=request_state) + + # open browser to that url + webbrowser.open(auth_url) + + # block until the server times out or receives the post-authentication redirect + response = server.wait_for_redirect() + if not response: + raise ClientAuthenticationError( + message="Timed out after waiting {} seconds for the user to authenticate".format(self._timeout) + ) + + # redeem the authorization code for a token + code = self._parse_response(request_state, response) + now = int(time.time()) + result = app.acquire_token_by_authorization_code(code, scopes=scopes, redirect_uri=redirect_uri) + + if "access_token" not in result: + raise ClientAuthenticationError(message="Authentication failed: {}".format(result.get("error_description"))) + + return AccessToken(result["access_token"], now + int(result["expires_in"])) + + def _parse_response(self, request_state, response): + # type: (str, Mapping[str, Any]) -> List[str] + """ + Validates ``response`` and returns the authorization code it contains, if authentication succeeded. Raises + :class:`azure.core.exceptions.ClientAuthenticationError`, if authentication failed or ``response`` is malformed. + """ + + if "error" in response: + message = "Authentication failed: {}".format(response.get("error_description") or response["error"]) + raise ClientAuthenticationError(message=message) + if "code" not in response: + # a response with no error or code is malformed; we don't know what to do with it + message = "Authentication server didn't send an authorization code" + raise ClientAuthenticationError(message=message) + + # response must include the state sent in the auth request + if "state" not in response: + raise ClientAuthenticationError(message="Authentication response doesn't include OAuth state") + if response["state"][0] != request_state: + raise ClientAuthenticationError(message="Authentication response's OAuth state doesn't match the request's") + + return response["code"] diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 4e7fb13b4f6b..3aaa54a1f28f 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -2,15 +2,16 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +import functools import json import os import time import uuid try: - from unittest.mock import Mock + from unittest.mock import Mock, patch except ImportError: # python < 3.3 - from mock import Mock + from mock import Mock, patch import pytest from azure.core.credentials import AccessToken @@ -21,6 +22,7 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, + InteractiveBrowserCredential, UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential @@ -242,6 +244,73 @@ def test_default_credential(): DefaultAzureCredential() +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential(): + oauth_state = "state" + expected_token = "access-token" + + transport = validating_transport( + requests=[Request()] * 2, # not validating requests because they're formed by MSAL + responses=[ + # expecting tenant discovery then a token request + mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), + mock_response( + json_payload={ + "access_token": expected_token, + "expires_in": 42, + "token_type": "Bearer", + "ext_expires_in": 42, + } + ), + ], + ) + + # mock local server fakes successful authentication by immediately returning a well-formed response + auth_code_response = {"code": "authorization-code", "state": [oauth_state]} + server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + # ensure the request beginning the flow has a known state value + with patch("azure.identity.browser_auth.uuid.uuid4", lambda: oauth_state): + token = credential.get_token("scope") + assert token.token == expected_token + + +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential_timeout(): + # mock transport handles MSAL's tenant discovery + transport = Mock( + send=lambda _, **__: mock_response( + json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"} + ) + ) + + # mock local server blocks long enough to exceed the timeout + timeout = 1 + server_instance = Mock(wait_for_redirect=functools.partial(time.sleep, timeout + 1)) + server_class = Mock(return_value=server_instance) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + timeout=timeout, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + with pytest.raises(ClientAuthenticationError) as ex: + credential.get_token("scope") + assert "timed out" in ex.value.message.lower() + + def test_username_password_credential(): expected_token = "access-token" transport = validating_transport( From 985bf36a10481a3feeb9a6488440ce1f0cc273cd Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Tue, 30 Jul 2019 16:27:05 -0700 Subject: [PATCH 048/244] we dont need thread locks (#6551) --- .../azure-core/azure/core/tracing/context.py | 38 +++++-------------- .../azure-core/tests/test_tracing_context.py | 11 ++---- 2 files changed, 13 insertions(+), 36 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/context.py b/sdk/core/azure-core/azure/core/tracing/context.py index a00f88f2d854..f8761cd71502 100644 --- a/sdk/core/azure-core/azure/core/tracing/context.py +++ b/sdk/core/azure-core/azure/core/tracing/context.py @@ -29,8 +29,8 @@ class ContextProtocol(Protocol): Implements set and get variables in a thread safe way. """ - def __init__(self, name, default, lock): - # type: (string, Any, threading.Lock) -> None + def __init__(self, name, default): + # type: (string, Any) -> None pass def clear(self): @@ -54,11 +54,10 @@ class _AsyncContext(object): Uses contextvars to set and get variables globally in a thread safe way. """ - def __init__(self, name, default, lock): + def __init__(self, name, default): self.name = name self.contextvar = contextvars.ContextVar(name) self.default = default if callable(default) else (lambda: default) - self.lock = lock def clear(self): # type: () -> None @@ -78,8 +77,7 @@ def get(self): def set(self, value): # type: (Any) -> None """Set the value in the context.""" - with self.lock: - self.contextvar.set(value) + self.contextvar.set(value) class _ThreadLocalContext(object): @@ -88,11 +86,10 @@ class _ThreadLocalContext(object): """ _thread_local = threading.local() - def __init__(self, name, default, lock): - # type: (str, Any, threading.Lock) -> None + def __init__(self, name, default): + # type: (str, Any) -> None self.name = name self.default = default if callable(default) else (lambda: default) - self.lock = lock def clear(self): # type: () -> None @@ -112,16 +109,14 @@ def get(self): def set(self, value): # type: (Any) -> None """Set the value in the context.""" - with self.lock: - setattr(self._thread_local, self.name, value) + setattr(self._thread_local, self.name, value) -class TracingContext: - _lock = threading.Lock() - +class TracingContext(object): def __init__(self): # type: () -> None - self.current_span = TracingContext._get_context_class("current_span", None) + context_class = _AsyncContext if contextvars else _ThreadLocalContext + self.current_span = context_class("current_span", None) def with_current_context(self, func): # type: (Callable[[Any], Any]) -> Any @@ -146,17 +141,4 @@ def call_with_current_context(*args, **kwargs): return call_with_current_context - @classmethod - def _get_context_class(cls, name, default_val): - # type: (str, Any) -> ContextProtocol - """ - Returns an instance of the the context class that stores the variable. - :param name: The key to store the variable in the context class - :param default_val: The default value of the variable if unset - :return: An instance that implements the context protocol class - """ - context_class = _AsyncContext if contextvars else _ThreadLocalContext - return context_class(name, default_val, cls._lock) - - tracing_context = TracingContext() diff --git a/sdk/core/azure-core/tests/test_tracing_context.py b/sdk/core/azure-core/tests/test_tracing_context.py index 59aa2c8a8b60..984d2ad480d3 100644 --- a/sdk/core/azure-core/tests/test_tracing_context.py +++ b/sdk/core/azure-core/tests/test_tracing_context.py @@ -34,19 +34,14 @@ def __exit__(self, exc_type, exc_val, exc_tb): class TestContext(unittest.TestCase): - def test_get_context_class(self): - with ContextHelper(): - slot = tracing_context._get_context_class("temp", 1) - assert slot.get() == 1 - slot.set(2) - assert slot.get() == 2 - def test_current_span(self): with ContextHelper(): - assert tracing_context.current_span.get() is None + assert not tracing_context.current_span.get() val = mock.Mock(spec=AbstractSpan) tracing_context.current_span.set(val) assert tracing_context.current_span.get() == val + tracing_context.current_span.clear() + assert not tracing_context.current_span.get() def test_with_current_context(self): with ContextHelper(tracer_to_use=mock.Mock(AbstractSpan)): From 660664865ec233d0d3eb4207776c697d567c58b4 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Tue, 30 Jul 2019 20:19:31 -0700 Subject: [PATCH 049/244] KV aiohttp by default (#6563) * Aiohttp default async transport * Record keys with aiohttp * Record secrets with aiohttp --- .../keys/_shared/async_client_base.py | 11 +- .../tests/keys_async_preparer.py | 16 +- .../test_keys_async.test_backup_restore.yaml | 294 +- ...t_keys_async.test_key_crud_operations.yaml | 886 ++--- .../test_keys_async.test_key_list.yaml | 522 ++- ...t_keys_async.test_key_wrap_and_unwrap.yaml | 354 +- ...est_keys_async.test_list_deleted_keys.yaml | 922 +++-- .../test_keys_async.test_list_versions.yaml | 520 ++- .../test_keys_async.test_purge.yaml | 1946 +++++----- .../test_keys_async.test_recover.yaml | 3248 +++++++---------- ...sync.test_example_key_crud_operations.yaml | 472 +-- ...sync.test_example_key_list_operations.yaml | 690 ++-- ...sync.test_example_keys_backup_restore.yaml | 294 +- ..._keys_async.test_example_keys_recover.yaml | 670 ++-- .../secrets/_shared/async_client_base.py | 9 +- ...c.test_example_secret_crud_operations.yaml | 340 +- ...c.test_example_secret_list_operations.yaml | 619 ++-- ...c.test_example_secrets_backup_restore.yaml | 337 +- ...ts_async.test_example_secrets_recover.yaml | 700 ++-- ...est_secrets_async.test_backup_restore.yaml | 281 +- ...crets_async.test_list_deleted_secrets.yaml | 945 ++--- ...test_secrets_async.test_list_versions.yaml | 507 ++- .../test_secrets_async.test_purge.yaml | 2032 +++++------ .../test_secrets_async.test_recover.yaml | 2956 +++++++-------- ...ets_async.test_secret_crud_operations.yaml | 459 ++- .../test_secrets_async.test_secret_list.yaml | 507 ++- .../tests/secrets_async_preparer.py | 16 +- 27 files changed, 9104 insertions(+), 11449 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 0714edabf420..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport +from azure.core.pipeline.transport import AsyncHttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient @@ -64,7 +64,7 @@ def __init__( self, vault_url: str, credential: "TokenCredential", - transport: HttpTransport = None, + transport: AsyncHttpTransport = None, api_version: str = None, **kwargs: Any ) -> None: @@ -91,7 +91,7 @@ def __init__( self._client = KeyVaultClient(credential, api_version=api_version, pipeline=pipeline, aio=True) @staticmethod - def _build_pipeline(config: Configuration, transport: HttpTransport, **kwargs: Any) -> AsyncPipeline: + def _build_pipeline(config: Configuration, transport: AsyncHttpTransport, **kwargs: Any) -> AsyncPipeline: policies = [ config.headers_policy, config.user_agent_policy, @@ -100,11 +100,12 @@ def _build_pipeline(config: Configuration, transport: HttpTransport, **kwargs: A config.retry_policy, config.authentication_policy, config.logging_policy, - DistributedTracingPolicy() + DistributedTracingPolicy(), ] if transport is None: - transport = AsyncioRequestsTransport(**kwargs) + from azure.core.pipeline.transport import AioHttpTransport + transport = AioHttpTransport(**kwargs) return AsyncPipeline(transport, policies=policies) diff --git a/sdk/keyvault/azure-keyvault-keys/tests/keys_async_preparer.py b/sdk/keyvault/azure-keyvault-keys/tests/keys_async_preparer.py index a232358ec959..4db357acc42b 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/keys_async_preparer.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/keys_async_preparer.py @@ -6,17 +6,31 @@ from unittest.mock import Mock from azure.core.credentials import AccessToken +from azure.core.pipeline.transport import AioHttpTransport from azure.identity.aio import EnvironmentCredential +from multidict import CIMultiDict, CIMultiDictProxy + from keys_preparer import VaultClientPreparer from keys_vault_client_async import VaultClient +class AiohttpTestTransport(AioHttpTransport): + """Workaround to vcrpy bug: https://github.com/kevin1024/vcrpy/pull/461 + """ + async def send(self, request, **config): + response = await super(AiohttpTestTransport, self).send(request, **config) + if not isinstance(response.headers, CIMultiDictProxy): + response.headers = CIMultiDictProxy(CIMultiDict(response.internal_response.headers)) + response.content_type = response.headers.get("content-type") + return response + + class AsyncVaultClientPreparer(VaultClientPreparer): def create_vault_client(self, vault_uri): if self.is_live: credential = EnvironmentCredential() else: credential = Mock(get_token=asyncio.coroutine(lambda _: AccessToken("fake-token", 0))) - return VaultClient(vault_uri, credential) + return VaultClient(vault_uri, credential, transport=AiohttpTestTransport()) diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_backup_restore.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_backup_restore.yaml index 1bdab8917b58..38a47ce653ba 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_backup_restore.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_backup_restore.yaml @@ -4,256 +4,202 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:51 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:49:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault4e00e7f.vault.azure.net + - /keys/keybak4e00e7f/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/54248fddc148400a9df744075bbfe2e8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lsgBFBFSUvohGWs21xzMCFc1IRDfnH0UlZ8aJnqVozFkc9rZgaBdr5IOVmt41hxbJY2MWuJxGpS4xAZ8AmrQZ1MOmS7nUiMmorcyqZZIcZYz3P7YXLjiv-ncb9rTty7IJ2R9v111Beiq3tNdHUrQYUt1wiysQPcPk69FGq7h4B5UqDM4SHQqXF-Rm3R2fU9wct7bx3F2XqYcaMmQWZBiYMH8vbooZWyh2QziCXVB2MhfBt0gTfoLUGT4hheDyLfIgbhhky6Hi0DC-3Ecll3tlK6JHAR6V1jLxJveWPgUy2WgRMSTATWdlcYL_i9Ji9OT4dSLkCFqXWhRN8krxXf9dw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/6335121a5c4e43919f25f6688e470924","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zPfZm_2ZxRIlx2K1MjSGUuBBpyaJjU_gk2yp9T9Ow8bvac_t6RgXTmsdK-4x27G4h1XjY0QVXkuJwnNxrUbSwrrNsxJtaz-KyCpetoPLcAEp4-EbEF2w-Q5fAPB76ngr-RKlHUv6fww8rfWWRxKb-GmtmYAq_BsUG7Ci1ALoF3dIxKyEpqueY0TeWofWxUKpftXLyjAIcuBVRO5UVSUv1bSfLl1mzm5Wxl6pk6G_BtAi9cn6TS7DERSSEilg_Raz53fCXt5MaoFnDpT5oRIl5E2ZaxaLJ2KwLxoZERB4oZ2vPGgjr8MocaOGY66xwVKZQJKttZmDy-7pUKWMxoBG4w","e":"AQAB"},"attributes":{"enabled":true,"created":1564526988,"updated":1564526988,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '648' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '648' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:49:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault4e00e7f.vault.azure.net + - /keys/keybak4e00e7f/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/backup?api-version=7.0 response: body: - string: '{"value":"JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmFvY0lxQ1Z1WFpwOTZLSTZQdmVlbENFZlMzeVl4ZC1yRm5rZkNTcmdXUVlwU2tzUGVpTmJENFZuVEdEbGR6dE1GRlZ5SGdMRHVwb2VJWDlIU3ExTEQ3MVFSNWpYQUE2aUZpendrLTYxbkJ5ZFY1SEVLcHFpdjJwckp0T0FRTlQwZmpsWlJadzBiSG9zSldIenF6SDZXZktQT25pOS1GTm1TV0xvZFF1cE84WGU2bC1PN1RoWVlhc3hoLXJNN3M4QUJrekZEUkVPUm5rTnczMVJ6SDAyQjJhOGk2R3VfcUVtbTdvUDdOTnJRaTJfRGJ6YnZBOFROdHBwU1gwbnc1c2ZnaWVFWmUxTmZwVXNSZDcxMmd4YWxWNUpuWklJaDAxcnF4ZUVZaVRRNlhxdXhPbkZJd1RaTTV6WTZSSVJ4QW5rTk8zb0pMUjlkSTU1cG02ZVlxMnFoZy5DUnVlaDRPYncwWGVkMXY3TU9GSVNnLlZRVXdIMno3UWV3SXJZN0kwSXhEU2h6Y0FLQmlKdThBVFVTQWZvUTBfd3J4WEZBNkxyOGlhM0k3clFMYm15X1hLbjNwa3FFR3VnVHZlTm9BenVmaDJNR1pHV1ZtOUJibGhCV0Z1OTZUS0s4cVRqOHJHUHpaZHB0MHpsSlloOTc1S3hZSnljNkdpNExzMVVqVDAzaExEcXVpYm9SMkZpNk9oZFRQQ2p5MXd3OXlNLUhKREswUHdzSUw1VW41YXFGaTMxUW52VlVja20tZUVNRFlJRWwyeTNtang0SmtVS2Rtc3FudzYtckRRcmd1OHFxV09NNXpDaFVKRW82dkQ1bnVCLWNLa2hJS0JPOEItM3RVbnQ0bjBQWldGSzhDaW0yb0dyV1JNZWtjSGxYdFp2Z2M0OHhVRVdQdjBhQ1l5QlhzOTlac29DN2ZRd3JIUllYdzZXNTFycUJqcTA4ckt2YWhTaVBxb2dkMmNfLTB0VVlOQ1BUWnBrcjVzanA2TTVvZUZlTG1KOURlUnVES3I3bWg0eTc5UndWam9xZ1JGdlptbmVBcmY3Wi1USmZydmlLZ3lLUjlUdjN5ZFVjNzI3aGJMTGQ5NC1LNFduMU41NE9paUtRNmJEbjRoWTd6a283aTdHV2s3NmdXWlRrRGFlVTFtaDgwQUE0UGEySXNsNXMtaXNuZkYwVTFXNXh6WUZaWWVYUnlNSDZkcUpHYm81RDBnNzZhdHdvTjg4eEZlNXNDVEpYQjBnQTBRUUNRNWRlX0E4WS1rcGFWakpKNDJPQ1NEX3RkWWR4a3JDOVZwZ1FlM0Q3ZzA3QmdqVlU4aHdFZTVkTzR2QmlRekdxcGtxX1lqWkRzSTcwWkFWYlk2UTE4QjRoWnJFd3VUZEs0QVdfS3Q4YmZiYVVuQlE3d2Z4cnJ0SldZeko4eUJaaFNOV201MThfekRoMmdYLTBuNjViMm5rUlVFckszWXBEVEpMZ0RZMnk5dGtETkdHX1dJUURIWkNiV3dDRDBTbDBheHdybWxHYmYxWS1heEhudHQtd214ODROZ09DcllEZU1SUnVkbjhScWlKSXF6d3I5N1JEU1pQMGx6dVZ5Y2xMX2RRSmdTYmtrRjVTdWdZbHotOFkyN2wybWV6VldrTDgxZ2w5enVMb0RiNmFMalA5WFBqdjV0WjZsOXF1azZCcjF0X3pBTVpadzNjUGZXOUVXa2hOdGNNbEZITXBYMlFkUTd5enVQSzJEb3V3bzVWV3gzQUFTelJCb3FJQmhIZEZLUWgzNUVFQlhHcEprcG9USzktTWhINkw4Tmd1dl9MVHJQNnBlOXBvS2otTjVha1VtUWtDY3ViTGRSUjQxcnFUeXNoYUl5WHBEYnVQZ19pbUF1eWpTLWR4VlZwb0Z1bXIyMk1aMFgyRTN5R0piZGg4cjVBTk1mM2lwZUNDdThOeF9VWUxubGFqczlMR3M2bVBneEktUFY4ZHBoUUxwa2dfM1FYR2xLOHcwcTVJMU1uMFNlc1R5NGJiMG12N0ZDdUYySzFKYXR4SGJqY0FFcmlpbm9QTk1yYUt4X29Kb1k0cVc0R09rYUFkQjA3MTBnZUJuYnBXcENuOGJNWkJ4RUZHNE1XU1lfbmV0cHFDVUhUZlQ2S2QwRzU4LUZQUHpxY05naXNGMUVuY1VhU0IxTVJ0YXVPMV9rSHgzT0RPNEhfSm5nYnd2bFRENWdXcjRpU1VYYldSdWQ0ak9YNXhJYkY0NzVyeGUxa2RNc1pORWhkZTVHbU1aQm9lSUd5VEM5bDJpTXNMQzFmdXp3YjU2SVczVlRmTzlTazVqOUN1RUdsMlVGcGd3N011U0laQ1VhSWZId3V2bEpXUXp4QlkwaG9xdEtSSjRQT1dWU2FhRWJ5OUdMa1VUSmFEV0p0YWFfc2x2UkVnb1E1WFFWeC1oUHZaWFczWDJlc1JsanJtQXZnVGJFWDQ5NUpJbUNsZTByaU1adjlETE9OS0k0a2NzUU12cGNsaUpQWHhsUE11X1dfZ2RBejExdHM2RUNGY2lVdHJOU1RMU19Qb0dqSlRSa2lEcERYSFBFSWpoaVp2X2xES0NUMjF4b0VsUE9kekk3OTYtNGpaYUUtbFBxOFpmTjdzQ19iRUxtdW92TjZIOS1yQ2oyc3BuczhLSDZzQXliZDBFNmxjTU42UHlCRWJWazU1R3V3UWNrLUNjaDA0M0l2OTJVVmZsNmJROUJsc1ZjenFoMlVGV3Y4SC1qaHVFeF9XNHZidFhHRVdsSDVSRDdEWlUwRmNCbkprQW5senF0d0tnMy00UGg1bHhTSWppWVJpdTRKZzg5clRuLXZIZUZnc0hBWF91TDFjM2xSZkd6MmVtQ202Z0RrNVVKdHZSWGtmUHREUGVHckp0SVlTRExqWjduaTlpRXl5X1JFVDR0T3NEX0R2N3hieXZ5SHFHUzZOa0JLRUkwY0g4OWpTVllVaGRxZk9hMUhqUU42OW8wRmt3OHE1TG51c2NXSW40UFVyajBYOGd5c3RIMWVha1ViSU9mRm05RWtzdzh0a1Z3S1g2LVlMbHktUS1mTlpwVXF1Mm9HbkxOcmV1dmhoWkJHdnJzQ0pzUVF0NHRjTWNwakc1dmVRd2RQT2l2R0tRUmVCOE9MazJCR2RlZGZXeVlyRGk2d2ZUclJ4VjZyb2tWUlpvVk85dTd6ZjkxWl9fMHZaRlFSN2ZubE5DVHpEM1dpOWdUUEZJaThFekdfS3BiRHNmRkRNN1lCeGx6SWNkeDdLZW9aZXhHRXpUdDR6T2JfTUllWTFGWkpFbDdJRUxxUWJydXhFMjBURVYyYi1VaWJvWWpvU3hRVUNZLTg4TmJ2czZCWWF4NGs2eU9yU3ByVVg1OXNNcVFPd25uMWRZUlFaeHZ3WGh0U3pWS2d2OGtzYkNvd0RHRW5pb0cxaUJKa2NDR2tlbUxPRzlMb2xpOWxRVDJVRlpBR0VzZXp1S0h3endPOGprRkEzODk5V1JXWHBqVFRuaEN6Wkdqd2JRN3BESUVBWFhyakIxZmJ1LUZhU2VYUGVhS2VkZDdMUy12LThJaTJFaXVLcUdIaWttV3MzaVJQNTNTN0VkNlhtMHJydHpSVE10RlJ5LUdQOXlWWlNiR3JyN2lFZ2YtMFhLT3ZPZ1FrQlo5enFua1FIM09rZVlfRHlNQVJqSEdkbTRIYnQ3d0VrZjM3MHJ5M2JVNTlud1ljWEI1b1l6YUQ5STVxM0Zmc09yTWhlN3hIVDZxZWRqbXlYRHNqdi1DQmJVYUVpc1lPTmFUUW5TbF8tRjhBZU4yajJrYmtCSl9tYzBSa1BncHA3cjZJQVRCRHg5dkd0ZjZkcTRpcndybWY4MV9SM1dfQ2ZhMmZlZWtzUDBFVjB0THVUVGloM0lEUlR0eU80MjVEQ0pCSm5BVGNkc0tPOVhuTDl2NGlMbG1Bd1E2S2U2Y1N0cTNTelNNUXhLUDI4TnlXS2lKV3NLemlMZ3ZGV21zQWQ3TG5Gd1dzWUFRa1ZidjR1WlZVYXhIaWJ4OUEzZGhsZFV5cHBEaUxlcWswck12U0JnTHNZVWk5SXJHbkdfSDdISzY5bU5CS2lNel9abDdBMjBLbFlJdlRVaUFBbnFLQi1kdnlCdmNVN3l6bzkxY2l4dUVidnNtYkNFUy16WVo0MUNLWGoyZ3BTZEdlUDRBVHhOYnV1eDdZWkFPUnlFamdHYmlJS3dUN1ViU0ROcEZEeml1eHBVby1jZmxabjlZZTNNcHFlLUI2NXF1RElxcDNvelJvdGt2SzVCcUpXMkRnTEVvUjBKZTNxb0gxVVJTT3Q5MlY3bmttSWRrUWloMURuUkttSEczQUUxS2YxUS1fRFJGSmJxTkozRklFYl9ONVlMT2hGaldmN2p5ZG92WEVqUnhvYWl3ODJOR0tHZTBOZDRhNW5JanhHbWhuRkpVVkxEajhnZHNyNG9ueTR3RWtsVnVqdG1DU1prb2VSRm9tQmtfNjlEY0pFbVl3U2hlY1JJdktxeWJ5MWx2VlNWTTZuSlpPam9FSEE1clNBVGxHQ2VxbEdWaVB1YVZGdXhmOGs3S0FwcGVFMzI1aVJXVzRhU1FHeE5NVjNWWHpIa2dZRjg3UldnLWNWNDI5M0ptSC1IOTlmT09Ic3JiVW9oaFRIS0E0MFMzV3kyTWc2anllQ1Jldko0SXhYVWVZclJVcVhBWnVOalgyM2pZcExKYTk2bkoyZEwzcHRiMW1WNF9vWnM1eG5pRjhmdEFEcTZfTDZFV3dRdHdfS0pDVkE3a3dGZHBOaFM4YU56V1g3d0ltNndRQ3lsTC1jTHQzSm9EX0ZtWmhfeEhmOFludFRUUFpwaVZyc0dpRlFKRE1YSk9OQ0FEekFlbk52cFVUMTIwaEtiX3BEUjdDa2RLbThQb0t6ZWU1UzhaN0h0NTZjYWltOF9ZSXZJLURZdWFuOTJ0ZXgySk9Ca0paV2p1Mk1LZHVOUDd3UzQ1dWZhTHZyT3dKSlRRQTk3eHNnVERXejN2WGJmSTVCX2VHMzVJVG9RX3EydXJOMlBfb2NlN2FRVU1mTkpzcHNQeTBkckVfekFoUW9QclVPNk1uU0dlS3NrRVAybHJzU2dhNUpsTUZyclVNNVdtMUREcW9oWnFqTDZPeXlPVFVvUXRrQ0dQUlVTM1lmbVFJcVpQV01NSG1wbXlwZUdiX0xSVDJXQm1hSFFOUVhfdVNWVG1LUWIxbDBJa1R0eEFNQmQ2NzNTQUJNVVllQ01zUWlXRWdxT1dBbVk3MjZWeWhneFg1bjMycEV5d2x0cXFGLUd2djlUMm82blFQRnVrWmNSc3c3TGROREx4V2hkMHVyTHFneDVyQkh4QXV4NlllaE9QYV9sYVR6WUVwUFhGSm5yR1c3LXpsYkU1UmtUUUFRNm8zbnh3TWkyLWFPREthSmxWS2EzNW5ZTHZPWUZtSUg1b3gwcHVBOFZGUXNmVGdGSjZQa2U5cWxic0JwcW82S3F3di16czIyWkxhWVkyNzlhRkUySXZ2RXhHakk2cW1HV2Y4RTVPbjFwOGZWSndqQXlqc0gzLXlwelFJOWFMYzF5WHVWcXFvNzVSbGlHZGE2Z21Ec2ZSRW5wVVNrdUgtYzVXTFBsX25jdFlmY1pKUU1IbWlLNUpPT3pnTk1IOC12ek1FY214NXJQeHpuTHI2cV9tWjhKb3MzSkFiMXliYm1PNmFoR0IwQ0hqZ0ppY0FOdXRQME1SMXd2eVd5Q3ZVUzFpclVnQ1RyLWNYOGFGblNKY2REdUxhMWY5TVV3ZmJzZTV6YkpTcFRpNUplckc5Sl8wLUwwajYzc0Q4ZkxyU2l2MGRiVnlhSl9SMTg3UWRWQzRMRERWMzhhRFZNM3FOdmNwYm5MdzBtYlZzZ2NFX1czTmtlWTRsbDBLa0I5T3BmRmdNX294d1p6T0R1S0lsdHZ2YVhkbGZha2E4a1BDdXJxS1BJZGxydC12bHNLdkdpQnBjNXVTUG12aGcyUEV4YThCQ1BBZHdocXo4aDl4Y2YwVko1MWtPRG44dWFWOVlzUlhtY0pOdzhZTXZXQXJnOXU2RnJzaWtsRXQ2NUdZbnZETTN5V3V3WlV1UUw5LUVvUUpCdTM2bUY3amwtQUFrYTRhUEZONWtlOVdlMEtObEtRZDFOVG9KR2w1dmZBUV9UQ0FXQUtQZjlGSjRyOEpzVFpWWW9lZE53OUJzQ2RLX3gyQ3pTdkZubzgxbE1JT2pyYWZLT0NpZ012QTBoTkM3NE00MXo5alZ5S1d0T0JXdVRWNEFFbGtDS1FDUXVBTnVmRFIxWUNoX0lsRzhVcklFR0VIdTdGMzhHUWVvWmtCd1NNMHoxZlEtZVVPUi1GX205ZHN4bHYzNGh6TFhUckx2ZGJ6YzJuYkV5R1pnSGhBWGVIZkx3eHFNWURwY0RmSW1XcEwwekJlT3JWWkNjZjdwcmNON2FRUGxSbTVYUUNnLWlVOUY1VXdkMUVQd1pFUGlNTGxGX1k5cGg2N0lzemNReG5VTmZZYzg1bnhIWVRBUzQxakFicmdJSjdfSy1KMDR5MVBib1lDb2dRcHN3cGlyNGZNdjR2c2RuMUtVbERxdkh4UjdZTkNXU1l4dlFmek4tNzUzazQwRERYd0xlXy1yS0tzSUo1LTY1RTJXYzZkNXZYLXpzdmJTbmhDRnlidE42X2FIZzZzeHlPc3lqTnh3N1pQVER4QXRXeHlZOWpZMzNnamI3eEw1WmdSMFlKRGVfaGpNS1FpUWk4LU02VHBlOS1YY3FuakVuWnBFdVJjUVBldnZKdjF6LVQ1YkpLMDZ0VnRLc01wSU9vR3FnbXBYNktzYWxNTXg4QVdCWUoxc2VfNmRZQ2o2TVVuckpIeEUwSXhzR3pOWkJlOXlVS1dzU2h5bUhZWGRTM1RDekxfNXhycjVuVy1nbUt3MkJTZUViNm52NGFoNTh6cjZ2MVBFZ2tMTGRuaFdPbjZZQWZCMzRzMDhWMDFiUnhUNEdSNEhSOWExSVJERVFVY3c2b21POWdoeDZCTkJKN29sNnVlZnBZbzYxNmdFMXgwWEFjQlBrVUJqTmw4eTVockJsOVlGMW1MWTJ1bEZUQkctaVlOdHhIdlZOZXllYzY2NTdxWlpYcUM5WlFfQ0txT09Qc1hrdWtEdndxMjhyNXdyWjAtbXhpOWZ2Z0J1NElsZ3FpbDIwQVZtSlZJRno4c0E3cFF1VThYeVlKTHdRbllTbG1mU1NqZEtoMUtrWnlsN2pwVjJ6ZlBBV2I1RWxsSkM5QmZUXzViQ2xfbTdpWUFlRGlnTkJXZXNwaVhuLXBUOWNnc1djdUZoYm5BTlB6SGtOYzZmOWVlb3p1OUk5N194SVpKSjF6eENtQUtZck0zTTFCNE1sb1lpcWJfblJDWGExbW4wdXFBVzBqSDZ4RFFLWW5tQVQyYnpRYXdYQVhxSmd0TXlza2xVaU04MkpOR01LWGFDLUZPTEhvYWt0NENBRm9CMzg1OTJHZ1NxODV2TXRqX0d1NHVYRmRtMGFTeUZjQThSTzlVTTZPelhncUNkaTVRWjZLMlVMc0FQTEdWdDFFUmZsWlFuX19SeUhfanFfbXZKTzhHcS0wWGd1RzZkN0pLQTluSE9QaVRnUW5yeWV0OTJqTEgtVTZuMjlIZkhrUnFNQWp6eGlCTk9WQk1namd4Y2VGeEVXRVFCYk9EQk5PcFJxM29oaXZ0WlFaMFN3ajI0eWloREQ3UzRTOVg4cXhhTVBGNFhOS0M5TW1YVzkzSGhLd01ZYXJfcTZ0UERxTlJJVGV1VGZCWnN1bWJITGR1YVZnWlVLczJTQ1dEQ1lrSXpHSHVyTmY5TFNtYWppOGJhZXVBal9PTTZ3TnIzUkFTdHhadlM0bGl3RmRreFBvNFB1NE9qbDFDTDFqY05BbTlsZXBLNlJxX1QtVkREeWdkWUxsSmM4U1UtZ3JCVUFiRzJtaGpPTXF4dUd5emdXNnExLTVjelBDeUZ3TGhkaVB2MHh2TGtyNm1Id3hMbWhldVBiUzNsNVlaMENQUl9qNTVNVnFwcGFzZW5Qc2JFYnpjbWlaQlhCNF9uV3Q3bWlSUFdnbWNCcFp6MUpMNFI0N3ZyX2pIanN6SkRfbmJhRHh3c2RPakFEV0lGSTlhTUhpM3lFdUpwMzgwRlFrWmptUndwaHoxSTJfNDhXaHhqLWlJcjc1WXFlUjVaRGRDNExNUTRDU2R1cVREV1Z3dm1wY21BWXRzalJaTlFESHZlTjdYbnJBU0s2b2pBN0dvOW4ydThoWGNyS1U0Sm5uc0dod1ZRSnJlN085SDJsWG5XaGZraF9IUnB3QUJQd2xZQmJRUUFzb19YUkFaV1AzOS1oODhNUlRiaE1jaXVHdl9Yb0c3LUpkSmpWYnAtT0c1cUo2dFAtM1Z6OEtSZFdJT2Z2enUyZ3YxSmJfeEp6LXBDY2xxWjlDT1ZNRlhCNXEwRHVTTGR5S1hpa0xVZll0M1hyM0Z1N1RyeVpzMDlrR3drV09NRmFCTnJXTHlKNkJIQW1TUURjZUc2cmNhTmtRZGlCOVItNVJKWXpEWWs3SFQzdDFvZHlEUDZBdDdfVzBxcXlsak80ZlFiRzJmM1RBMjQ4bHE0dE14c0R3Q240UmRtOGowU3Uwd2lQdzRJNnlvRkZaSUh3bjJhcVljSWJ1SllyZ2xJeXZ5a1cxSzBUdlg2ZVFId2k1YTZ3MTZZOFF3S085aEFJZlV6SWtxbl9ZRUo4dGp2ZW90UXMzWFZEaGtaMnI3UkZjdTBCc2xKVEo4TFVPLXhRNEdtSjZsVlN3OUw5TjRJNjhIMzRwUU9Ta1hValNaczFYRlhJbVlQZ3pRSEhwc0gyTTVOV3NsSmlucU1oLUxLd0xsQjBpaWF6b0lMRXVFWmJjNEpuakxCa2JoU2FuUEZZU0pNUXNRc21wYmxzUXVhZVFzQUNITUJIQ3pHQ3BicE83blBBbEFpU0xpc1hlOUs1TWZScHVLVDFDQTM2Q1Vpb0xEQ0haSW9ZMEVlVDJzQWthWW1tMjR2S183cjdWSHR3NklpTUxGdzlhMXJhdVdZSl8td0tjNERYM0pubXRWRDU2M2RwNm9ta1pMSm1Xd1hQOU9BaVFKd2g1bmFvMmFkX1JQbUdTbFZpa0x5OVk3U0NKbjlUTE9jV1k0R2hxVGZzTEE2RkN0RkxLNDl0dzZCT2hZSEF3ZkJlWnNnb3cwV0hYeldENzRiUHYxWkV0Q1o0VnFoTFdzRnRaWFF2V2FMNmhLUTZaS2llcktCdTcxbnVxSE9UT2JIVXhxOGJ3Y2lDVnhXaTNJalZUZlJ0cUltSXQ3Zi1yc3BncTFzbm5QRDJGUHEwRmNrdHMyUEJIWkJMOTEwTEtKVnlsRE5uR1J5cG9zWmliRlNkVlVqeU5HYUpyVTNEZGZFTmJ2R1A1TjZFbi0yTzNqckUyWWJPY0EyNXp0eTVvblhJQXRpM2hzZlAzWE5NREFpUXY3Rno5cjZNcGdxUnUwdndUelJtSDl2ZmNJaDhRX3VPV3c2cTkxbWNWTHBzcHhSNnE3a3hZbmYzTEhTYjE4YXd2bEsyMGg0TzVFVTJNWlVkWHJNaHRIZ3hXRmFtTTNLeVh1bHM3Ym13NFhVN3ctYWxiRC1oQ2dkWTNLUjU2U3MtM3hQdUwyNUpPS29ERHdldVVJWkx2WnJwNnI5bnN3VmZIZ3h1bU1GcTFQVG0zbzl2ZmZyc0xxcmQySm9VZU5zc1lVY1R5N1QtNkZpOXgwdFB2MDlzdGkxT2JCYVVvNGRiWHRRczRTSEwzTE5aZE5yNm9SdUpUa0hHYnJtc3ctUzZ3cmtBdDE3Z2c3TmpHOU5fX09GYS1VTVlyM0tJWXdudnBHQW03YVQ5QlBkODBjbFQ1UTVUWDJPYTRNbTEtSzh2VEoyN01CUjllMjZMMUNfcnNXTE5rZE91a0ZsUHNaNXdCTU5kVXNUajhVc21JQ080c1ZQWVpnbGhEMEtZSUNyeUpXdHR4Z25TNWFzQkZPdjJWOWszWktFOFZ0VE9GckhFb0I2QTNUQy1OdE1YNHluNk9KT3Z0OEcxdE96dkU2aHdPRHV2QllFZTFtb1pDblI2OC01WFctaGRVXzRwOFFzMmtTaGgtWFh6dUdaalVJb1Z1R0NsdWQwZzdIUTZtcC1wTDhhb1ZKbnRHWjVlVHRRSDBGNmk0Q3BQVl9hMkthT3NFbzRtMVd3VjhOSVdodW1XMGR2OHpfOERrcndPTlJwUVFKQWZsRkp1enFaanRYZExLdEN3d0ZoZ3ZnMWwtVWYzYmJjc2FjODNFc0l2R2pMcW9rZVdFdzBBSHkzZkdyTGd1UlVtZGZ3MEtjQjFuaFdnLlIwTk5LazVCRlFwSXJnRUJCc0I4emc"}' + string: '{"value":"JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLk9kems3TFFIaU9MbVZjcS1ubWZIWHZPTGlRMjEzeW5NOHlzU29JYkhyV2FoSlNsb2pQa2JjOWRfMG9JX0xBVnFFWjRUQWE5dDR3M1B5emRYRDloaTRPcWh5THRvbFRmajlxUndWcE1nZXVJaVp4WndpVnlFR29FOTN4dWNfOXp0Qy1aV3hmTTR2RHRPUG9KZUNDRnIxS1d2XzFNblV5ZGNjVzhvRWxXS0JscGlkRjZJQzI2V1BRMEQyWThscFNmMnZrN3FUejJzUjRkX01RSGwzSkZtdWtaU1hYTXJyNC1LcFBqaDNtNUhvWXM1bXFhNDZDNVFQUWVLRGNuR1lGTndhV1REQW5EcTZHaFZJNS1mU2ZEWUhqZVhJcUhtN3hmdllmVlBPTGdRdFJMbGt6VHNCUUgzZjlaYnlUczFWQ1JkeTN2MlNLNjhnbFFDOGFEcXBIU1FNdy5iby1PMVE1VG5HMGx4MGdpRjVSQVFBLm9lYUJUR043ZzNMNndRVS0wU0c3ZzRwXzdzU19KSVpJUmFqbktPZjdBNldnZ1AtbEZTTlVtV3RoQ0p1SjAyaFpyZW1mamRqcFBtLTJPRWZ3UFhzVjk1YnB2RGdMc1h3T28tRHZlTTdhNXRZVUxuYXJNXzhXVmp3emVpZ1BlUVpCV0c2UXAwbVZKX2J5RG4wUWJDb1FIRGdtTkVZWi04MGNXWVpJOEowNjBZVG1xTG0wM1RNN0h3ekpuN2ZjUnU5aXQ4WVVTZGl6Vk1nb3lNM1F3RWswRUlKWFJCZ19GVElEdWJIZ0Zub3NPaG81ZFRDSV9ZZXpTMVpkQndDOE5JZnBDalRSb2pEVFJpaUgwMmhXcTVacUEyNktIOXl1MGRZNTJ5TWYzWUlnSGZ4WjJrY3N6d0UwdlRBandyMGtSY0lnTXNSZV9MREROMWl4bjJQNlpzRkQzZVBLa3VNYmNmUi11RUxSV2VPRnpuWXVqeVRPVU40YkktZ3kxTVhpbm41aGJuZDYwb0tqZW5JYlVvT00yaFcyYURVRXlpWldXZ1hPNW5RWDVPSUcybEhEYmRUNTJzOGoyQVV2blJ3bTN1ZWF3dERjMFBveENCRzZMSE5CcUZJRkhqNkZfejl6S0FUUTlDaXBON1RRZE5yek1Pd3Q4NWVNTnN3bEZOOVdQd3pTSFJTb05maWxQN2EyaklQOW44SDN2NVloUlVQRFhaQ0VyYk44UDRLWEl3c0EydWY2czFia0J3UW1QRjk4UjdsLWZ1TDVRVnpWZGt4VzQyREdoMXJGcEwyQTFhQVpmU3lON3hNVEpzZ2lBNlRReTUwVENEc3lfcUIyMUh0ckRhMlhlT2JtNWI0QlBxelVjNXZYajU5LTBYeHZjX0ZoYUV4Nkx1Y1UtTmFVaWFfME41US1iZW9vMlh2SDZTNkhOSm94bFZ5RVVfUHF1a1E1bnZ0WW1JS0F3VVFXMng5WXhFa1gxTzVpd2N6Mzk0VlF1cjc0b3hkUnpzVHhKTGNIeDlpYnNBZkxtWjUwaUZFb3g2WnJJOWdVOGtTSmZ4ekhHOHRpSGNnYzhLTUpMaTdNZHhyZzEzSG12Y0hfMW5FemloMF9OUVJVY3c3X2xQSVBuZVJEX0hlUmRiU0ktOE9wN09hT2wwWGhMYWpKVUNrMXhzV0plNXVYLTh6SGxyT0ZTSWtlLXFIRkpjeDVlcFNyVWN0ME42bVo3akQ3bzJGb2h0cl9KNDA2Rk5hdXkxM2FEWTItTFRSSmhTSWNReUVzVGs3NXZBTHV3WElZYzJzMk16VXc1cEk1Qm9GaWhWOERqMExzNmVSNXAwbkpDeGFqXzFmWU5takFHSHhSZ2NGbzItQUg0RjF3ZXVhTEhDS0NNekc2bFBrQWZQb09kTHFWY2ZvRHozOGJlVl9ST0M0SFpmV0hySDAzVmxZaFFGdEVkRVI1XzMxQmdyQkpjV1JtQjJFTzFUTzJiYW42X056Z25wMU0zRTZkUExBaWZ4aUk3amxBWUlBUGU2UkVVc0lFaXdtd244MzQzRGdOR3FpeWk1S0YtSHZ4OXdCdmtoRFVDWmsyM0JzRWkydEs5ZkF6LTI4R3RHUW1TRi1Obmk5Q3NFQUlTRXlzcFBRSDFpV0ZXbU9WdGFJSk44QlowVXdXMjZRZ2I3NE9qTlZrem9KbTBibWtjSnVEb1pxMUZPX0RSd3VHYzdzd1JPTG9yTnNUSmFEdXB5d3ZlY1dLUi1rdlBIRnh1b1R0Rng3UjBVZ0FtQWhrZFZWMWlUd201LTJFYllJNm5iYXUwN0h3VXZHbzBfazU0dURoU05uMVVST0lHd1NqUWR1c1UzZThkTzNiVVhxdTVfVGFfYlB3QkI5TFQybkNPWlBSQ3A4TzlaZ1dKRWZxamZldl83NmJ6U05BZzJwOFh3UzBmbU5NdEphb0Nub0ZOWmhRSndtZ1g3cVlYX29oT0lEM01sUW5KQl95Wi1id1RFcjRKY21fdVkwRk5pVThSTjZvTjgwMjdfRWNybEI4ckw3d3RTRHhUUUxlVnl4UVFxaENFaXJNNWVHRGVNNldWc0lMR2tfNnRxSmM2bmNJdkxDc3hxZ2RNdlpYc2dqVTdHVkV5eVJNRnAwX2NQNVBndGYwdTJuclVJRmFUbWlUR2dhMXU1UWJUVk9hRDVSbTZvOHFmaTFzeGQtMlIzdEMtdkpIcU5rUTFLWGZNRDJ6d3U2LUJzTVRLUHk0bms0aEVxXzBIdU5DNFlyUk8ydmIzclNXZ3FHVEhmeGQ2bHdjMTJMazNDdDhIWW1vR0JzVS1vYldFejRYLWgzY1F1ZUdQcmNMaWNZZmsyTkVYV0Iwem5yV3BSaFd3enNTVEc2Nm9kSDRfeDRZei1HSVB1UXRNUjFNZ1BzSFVpOWFiam9rcmxRc3NqeU0wX21idGx3VkZob2paU3JzVW9LV0tBTXV0bVlkRFZKcmNmRGxCX1dXVF9PX0xxeHEzYVl2ejF6RmJadWVBcTBBMXlCSjFjdkJvZTVQS1JZcDRkS0c1NVpfVFp3NzlvYjVkaS11SWxoUzd5Z09XRi14bnFDdmg0TlpPME45SUkyWUduVW5wcU43TlNtbXJ3LWx6QzhnS0JfUmp0T1RqVWdSWjZtakFHZ0toYmViVTBGNWdYRENNeXRLM2NtNkpiRGs0SjZMaGI2bVJLTEhmVjN4SkNwMEdQOHN2UUdyOWx3d3NyNmJNMHNUQm51NllkYTRPeE9SNDg3aG5QVFowWU01RjFoc2pFM0p5cTV6MklWQXQycGNsTHhET3I2REMzUU9oN3NhTHNVWGRkbzVlejQ5V1E5dm9qU2RqU3YtMzEtZ0hncTVUaVFYY0xwcDVaeUZCcFNzMnVaVWdCb0lKLWpmRjY0ek1kU1lzZTRzbXgydjNESWlCNFNsRi1Kb05uejRLaUxkdEdTUVlMNW41VU9iX1pQa0Fwa2FQRnYza1dNM3Y5cjUxQ2dTS21ZWXNMMmJFUHBlV045aEFkUXJtYlJ3ako1aFZXT3RZT2dWcXM1dHBYSU1reDFvSnVuanF3dlJfS291MGw4cm5rSHhHVE00V1FGb0hqWGNFS1ozNHk1QnFmSGhiUUUydGUtRXNjek1QOFFaN0l2NzFEX3JwYm1IdDg5WTRGb1Bfb1ZkYW5YSUdJT3RDdmVsWVdsdGZ3blgwYTZTeWtRc2JDcXowb1A5RmFueDhibUlyeVNSSXdZVjVKaENQR1ZlMVluaXhqVmEtcVlVT0tXWG5tZU42M29RS0gtd0FyVTgzR2lhbFlCT1pNWVBCQTB6TzlyYkVYaHNLajFXQ2VnQk1iaHRvemhuY3VmZWpQX0JlUUdBOXBIRndsNnFJU3pPUGt6UC1ucEFCbjRxWVhXWk5JbWxNb1pyNzRmNnhVSXduVThyQU5EZGgxb250ZmlSbmxFdjJucFFiRFF6ZklvemFraTlsUXkzVWZCV0ZvMWR1emUyMVRWb1lqc2E2a2RSZzVJSUNyVDlnNVY3NGptdnc2SmVROUdQRkdHTXlablN5bG5yNEN0ZC1TY2xmZnRXamxkUW92cGhzaU1sc09YQVZEaVFsNktSazFkTEpTSVVwME93MXhOMG1FNUY3UF9OLWVTWWJ6azVGcFZTaUFjNWMtNklha0toUk5wd3NyX1ZPem41amt0UFBWWTFpcFZXNUhuVUpDaElhSFRXMDB1NmU1TVd3NVMyQzJsWTdIVXNESXF4Zks4bXJJXzZlcTV6LVNlaC1jMVJfLWw0aVdlemJULWEwUWxBNGtYdWpZNzRvNVduTDNwMDNDT0l2UzZUYjhMN2VXNndyYzRab29XRHFrUTlhQjNscXdwT0tBMEFCV2tSSUprV2dsZlZMUlQxUVM3Q29abmxFeUVlbTBhRnNKdGtTZWNnX1RkUFBUNndfT0I0Y0xXY0NJZGV1ZFd3THlieGgwNkhBQVR5dGYtMHZreTJxT0hkd0dJbFoxQlhTdmlSX3Y1LV9SY0JUcEZEcjVMcnR1U1JWQmVsRmlMWjJoaUUwQi1VUGwzQ0Z5OWtHdy01TTlVNmNKNE9CZnNMemF1Q3N2eDRYeVl3VnA3N3BzR3M3M2h1T0t0T05td1BHWVlPOUFuUm5ENFRmeV92ZVdZdXpRclZHV0Y1bms1WnFJUVZ3SVBaUHhLaUpIZXdFcVRiMXN3Z2RKSnV3ZC1PV29HMnZLZ3hWdVk0UXlzVjQzSUtjYURERzNROXZEWXNTNWU4enp4NVlFQVBXaGNhZ3M5UUh2NkJFVDU0LUpCTEUxc3F4Wm9jOXRVVmQtVWV2NC0wSHU5TEN2LXNnSWROVVlHT21ZRTB4NDlsc3NwQmVod0JBaUQ2OUh3V3Nud0NpNTBFSDdQcVVoOTZSYW1VU1IwVGxSWmx4REZoSlNsMTNWWExtLWZiX2VjV0I0NHl3NWt2WDhCTFJ6c1JDLTlfV2tyOWNRUGNLMWVxWWRDeVdxUEpBMG1NUWFqRlh5QTlwQ2JwZ1hGZWloLWgxaExLdHE3anJydnh1RWVxa09BM3QxdjB0cThCRUxTTUlxTGd4R3BwU21QeEtZeUgtVXdPS1A4ck05NmFacTY5STNpVlFuV2J4OFVnMEpNQ1liNmRVWHVOdGplSlk5TEFoXzl2QWRZSGtQYUVVZzRwV1h6X0JWMjA5SVFxVk5ZNHpmX1dVU3dQNHlYUUFqdElUbUR6b1REVUEyamk0R1dPOUNxN3pRNzVUcmVoZFlNNWVhLVpwY3RKQjlCX0xOdEhVclpNdHY4SlNZMUVscWxRdGc1dXladFBid3pWOF9jUkdEZnY4M08zR3hvYzF4bld1aHQ2UDRuQi10UGVyZC1taWN1U3g1VFRjMGU2Zl94TmJUc3dpRUE0QmhRS3dZVDBKY2xvS0c0UkQtUE5UOExlZk52UFBWZnVQSEdfSm1aQUdDOVJEcWFra0tXSF9EU0Y1Y0RfdW9BTndBYkhNUFlpY2ZDOHZETXZUcGNEdUs4NlZyTVRSNjFMdXpQWWxMdENxNWdiQlhZaWZFdlFJVm11TXVHZHF0SFpiUHZFSUo4eUEwMHFxdVd5cFFVRTZ0RWhibzRNZWt4R0NqTzJDaEoydjBobnh0MFYwenFBcm1xaXFYOVJHdUVQSmstOXkwY3lfWVNPX01jRmpMWGZhYTdHQjl4aDlTSVA3UGlSUmE0MzBEaXBaSnktejJxbTNXbE1KNW42Z3g4OFE5U3FqSU9mODZHQUJLRG1XZzhFbnJZa3lxNDhReWFwdUhOUlVHMFQwTFFGYjc0U0wzMUhPbWhQV0F1WjJrRl9XTDYzZW9JTlZTeFBoU3ZSMEVWYmFpdWtvcHhVYW5pRTlCdWYta1JHTnVlX0pBdTJZYzBKcjJ3UDd6YllIZTJ2QTdGMFBvWmt0cWp4LVZTTlN4QmE3cFYxZ2hpV3ZfZlhILVQ1MF9XQXFNSUZjWWhkeFdNNXJTZnFPaWxrVmNCbkJ5TUhQLUJwTEo3RTJLVmNoRzBGemxvQkZvazBEYzdtYkJBTEM2NEQwMVA1U01zZGY3bGpaOThUdFAwc0dDcUJuOTVsTUwtSWpnOUhDblZNZ0ViODFma3hLaFBXWTUzNDNDVjhiWnNyUDhtamZZUzNqUThoSmlocjdCb0c3amZPOUI5aDJkamFScnp3OHFKeEJDRHZRZ0M4VGZjOTBMY0pxS2YxVEc5UE9GQ1dLV2tRWXNSck1JdHhDWF9kTi1jekNNV0FSSUNhYUYycFdvTXNEY2tZdTRWV241UzFpNjF1NTdvdG02NUxPV3RoSlBDc3ZKaXFGaUtoajhHYWk4OUYzcE5xTU1YN2c0V1JmUXZIVmxucmJUeTdSVmZPaE1HYnlLX0VKWXVVTnU4dzFVVWFSS0JoMW9VcWNVMnBpNG9JV1k4LTFWb2NYMkpfTW9KTFRsTWlNSFZ2V2k3bDdLMDByNE1WbFhHWWhJSXBLdEJnN3BZRVQ1YlRqeTZfWVFqZjFKbVF6TnNJT1U4aGdtc1lCcTI0eFRoSmRONmdsNlhTRzI2YmgzMkNYZnBvS0U0M0tuY2tDUm1MeTdCbzQyV0t5SFhFUk9qYzJHdHh3TmJ3ak4wWnVkX2JJSkNtOW44d1hMOEpqencxeDZRQ1RKY1hSTGdLb1J2RWRvNmlaOUMyR0F2UWw0T1B1dkxobWpEV3p4LW9Ec3NnRXZmdEFYd0dWSlZvYVJhVWJET1EwM2FBdGh1ek9LRXhaTzNZamxHTzZrWjFHRnhGbWVneXlNQ3JoOTJiVm9tYUdSaDkwX2s4ZjVIbmlHT2dGdGlRMzFaUmtCc1JyTnJoZUlLb2Q3dTZRX2xSUEhMWk5pRk9UZTU4cjUwdkdKMVdRMzhYbFBHclhoekNWYTdFVGdRUURDNGRlTDhuM3FoN1lJbHlpcnBmakxyTVBUaURYMWNQSEppR3pjMmVQbVBiUkk3VFpnRE1HR1BTdUwyRUltWXNINzhvZi1HdDVya0t0eHZidW5jblJuZVMwUm53UFRYQmdFT1FKSExoWW5PbXRmcmIxTjkzVDI5U19udnZjRUZFOEpGZWtadXhxaEZJRUlKZ0lmbHQxSURxNEZSRFJVaXh6N3R6eVlIcGFtM1gzbmxUMzA0UWthR1hLb0N6YndUVVFsdldGR3BCVHZQcnB1dmp0VllNNzc4cGUtZHZxQjM4Snl3VkNoQVhnbDV5d3dpRHlCOFlTWUs0V21BNzQ4a1A0T0k1N25oc2hwSWNVX2pfS1NQclFQd1BXN2pxbzY4TjNiYXNYTW5ORHNUcjQ5QjF2cE40NGQwWWIyRzdTZXRzaU5SV1lhdmhZa0d5YjJPZ1dqTG5LMExZbGI1Uzc3SzdXN3J6S21uUUNfb0VnX0I3aERFY2NKUlJQd2dvazJiR2dYN1R0Y3pydkNtOElMTEpnUXVvVmFoREx1OGxGT3o0aEtYUlV3dlRwdEYxV2Z2WG9QOFlDc3VLYkRTUW4tVGxOc25DQzhmX214M0Vob01vUU9YS3pRRTN2NzhLb1NSRTZXWUJmVjlCNjlzY21pdWpSOHFyYTR4dVZfbDBnWVNLNDJaQU03enFKN1NqQmt1eGd2Vm5wSmVTbTc1c2NSZFdaSFVJam8wNDB6bTFlbmlLZlBGSWFZNmQxLWt2Y1BkRFFVLXhabmgzZWRQRlNTM0NDTUI2Rk92OG9CTWZ6Y2RmZllqM3JHRHVfSFJLbF8xaElwa01xdTNfckpNVjBhcVdsZm9aSVRhZnhYZ2tPZlhaemNiQnNCOGdXLXgxZ3FMT3pqUllVRGowVTk3N1NxX2x3c0ItQ053eVFoczBNNXI4bWRPeS1hQVBOUW9xb2VlN2I2MGR2RklUZUxMUE54TnB3LWVnbDNlRThucnhNN2FrRVB6enZLZlJOMHNPOE5QZHE2SUdKM1lDZzJQNnZPeVI0aDZPcjZiQlF1cXYwVkJ6cWo5bUJuZ0pyT3p2YnI1dTZFMUhORGZObk9NbFpzeGRnQnQwOENHUXdJUTdPbXM5blYycjRrYmQyNVk2OEZLbE1DMFhGLTZHdHVFY18ycFhQR1pldXlVUGNVVDNVUnlWVUp3UFJfSy1YaEdQZnJiN1d1TERTcms2LTV2Zk1OOC1ZanUwSzk3dEx3b0lkOHVVTVg4VHZvUWF0LTJCemc4cWVzSml5ZzdiWFl3anNiQW04dm9GcDQxSTdmWWVpYzNoQnZ5OVBuYVFsZUZ1a2JZY2N3bF91YzdzRl9Ea2NiZFpuYU1SNTRvOHkwZm5tT19sbl9PYTdNTmRMcGhWWmY1LWkwTXprdjJ3U3J0REVGYmo0ZFc5UWNHWlNpY2YyaGZiUEQ2NkFKVlRKVnBxbnAwd1Bia3hGajg2TUZxWllIYmFkajNaY0tmWDh1S0dXdlhZdE9QWFAxT1kxby0xWVNVSDA0ZV9oSWhud09acTZYNVJVajNoZnExQ0RyVmxTU0lzc3NhWHRkNHR0Tm1SUjYwaUlxOXBOR2gxZzJKMEdNWHFZUnQ0cHpVNTRlMjJXUjhnWjlPTV9XNkMyV2t0N29uWWZFcU1FNjR5cTZKamF3TDRzcHN4WFVBSTZ0LV9IY3JNZGd0Nm43Sl9ZVkgtWnJRZTEtN0NYUkJYcnF1cVF3VVctMkRmOUozaWcwcXR4VlFaRG1sZXdCbUZnZ3FXS1Z0OHgzQnl3d3RLWnRaai1saGJHTlNYTEpkSlIyTW1wSEY0YnhIWUxaanlITjlRb3JZOUxaNzBabFFBX2xSQ1BSTDdIYXZWZER6YVMyNXVhOW9iNWtNb2ZfcF9SZmpYNm8waVk0dUVUMTUxRGoySzBZMHlRb1J4UWs5dDhiNTJBdUNzUTA5NDVlU1pDY3lDNG9SN09uZHJiclJuWWtDTnVMdm5ZOUJYSHZjbkwweUJRQTZIUHRRM05qNllCUzktSHV5Y0dQNDJTY3pZNUJDQ1NnYTlxaFVtTDh3UUNhbEc1akZuZ3VDbU5mMmRCaTJWUnFucmNlWUVyaHJkWmxrMWF5UjZ0X2ZJOGc0emdzQ3NkTUswN3lJck9kbWZhZXBERzZ5ZTM5YWJyN21PdmJ4eEZBNjlINTFSUENfUDhOQ2pBRmpYVVp5UHdLOVNmQ1hLb0VwZVZVWlpRWWgwVFQxR0hJTy1WZGJoR0x1T2dDNGh4RS1jc3FHQ1hGS2xFMjV4dU5maS1uZFpaZzRNc0F4cVp5VTJpbm1sN19RdkhpaUkwVFB4eXZfdUtlSFItbGJ1eEw1RlAzY1Rpc182X2pteTE4T0pIT0hXaF92WExKdk1JT3BlU3o4Y0ZWeWRwMGpUbEVfMVRyR2xmQklIQmFKRnJJQkxfc1BXZEtJSUFDUUxUemZpUHdTSGZDR183V2c2U2I2MG1yTFhSc24zUDlLTGNkYVVoanVsOTZKbWJrTnZxM3JwUDJlUjJkWW9TYXhsTTZUNGVDRzVEREtlVFZFQXYtQ3J6SzZxWElzQmxEdDFGUnpEQ3lGLW9tSFRIMTRWZUJUcWxsNWl3dFpwSTkxMkIxUDNiYXNwLVVlSFdTSy1ZVmhBSVZXN0VBSE45UVhGMm1OVFhWYnozLWd2SlgtM29wMkhXWEtBMlctQ19PMWZTZWpyY3NhTjNGNThFd2h1UEpncVd4NFdsQkY1SDdjYk9JTzkxUkZ4OW1qcTB0SjFYaDF2UEo0OUJiTjhJeFRKOEZPSG9sRXFnclhiQ3FpZnF0X19kRUlON0JhS2Y0SE93a191T3lybWs0XzBkU1FCZ0ROWFdNNkQwQVVXbHJKdkxhaVhjVlhXOFRNX0ZwRVhEUVc0MzRvNGhmdi1zTkctWUE3Y2gtUFVET0pOR0JROFhjOHRvWmtfb19mdG9sUm9rS0Y0LTlOZHp6RVdDRjNnRzVBaEJzN3lsbUtldDhxNWJoZkgySWR6Ulphaml3eHFCV3IxdXloZDFXRG9sbXd3dFc4dU8yWlAyMkRsbFhPRXB0bERfUmF5bVpDQ291Vy1CbUprVFpJaGlOeDh4aTBubGhzNTQyZUt5eXAtQk1RdXl6YzB6c0pZVEJzN3I4QXVpeTlJM0hma1dnYVNoZ3huM0Jwdjh3NUJiTjZGSWozTVRvZDljaVVFVU9GckRlTThMVFBTa2ZOcm5hUEpSTS1sWEt1Mk1ER0w1VVV1VHdqOHYxc1AwaUFMSWpOYjFraXFvWGRyXzA4YzB6OEp5QS0yQ1U4LS02YndGNEZfZFdpbmd4elBoOGt1cVFhdlk4Zi1hWVFLWm1JYW9nUjFLT1dhR2M5V3Y4N0xPXzN5SkFqVUNGVFF0amhFdm9TbjViS2xRLWpwQjlFVzh6djJwUUFwSFJyV2ZCNFJlMTlTR1BNLkR1QmVad2xRamtvb0lfNXRvRFJQVVE"}' headers: - cache-control: - - no-cache - content-length: - - '10607' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '10607' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:49:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault4e00e7f.vault.azure.net + - /keys/keybak4e00e7f/backup + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/54248fddc148400a9df744075bbfe2e8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lsgBFBFSUvohGWs21xzMCFc1IRDfnH0UlZ8aJnqVozFkc9rZgaBdr5IOVmt41hxbJY2MWuJxGpS4xAZ8AmrQZ1MOmS7nUiMmorcyqZZIcZYz3P7YXLjiv-ncb9rTty7IJ2R9v111Beiq3tNdHUrQYUt1wiysQPcPk69FGq7h4B5UqDM4SHQqXF-Rm3R2fU9wct7bx3F2XqYcaMmQWZBiYMH8vbooZWyh2QziCXVB2MhfBt0gTfoLUGT4hheDyLfIgbhhky6Hi0DC-3Ecll3tlK6JHAR6V1jLxJveWPgUy2WgRMSTATWdlcYL_i9Ji9OT4dSLkCFqXWhRN8krxXf9dw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/6335121a5c4e43919f25f6688e470924","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zPfZm_2ZxRIlx2K1MjSGUuBBpyaJjU_gk2yp9T9Ow8bvac_t6RgXTmsdK-4x27G4h1XjY0QVXkuJwnNxrUbSwrrNsxJtaz-KyCpetoPLcAEp4-EbEF2w-Q5fAPB76ngr-RKlHUv6fww8rfWWRxKb-GmtmYAq_BsUG7Ci1ALoF3dIxKyEpqueY0TeWofWxUKpftXLyjAIcuBVRO5UVSUv1bSfLl1mzm5Wxl6pk6G_BtAi9cn6TS7DERSSEilg_Raz53fCXt5MaoFnDpT5oRIl5E2ZaxaLJ2KwLxoZERB4oZ2vPGgjr8MocaOGY66xwVKZQJKttZmDy-7pUKWMxoBG4w","e":"AQAB"},"attributes":{"enabled":true,"created":1564526988,"updated":1564526988,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '648' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '648' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:49:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault4e00e7f.vault.azure.net + - /keys/keybak4e00e7f + - api-version=7.0 + - '' - request: - body: '{"value": "JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmFvY0lxQ1Z1WFpwOTZLSTZQdmVlbENFZlMzeVl4ZC1yRm5rZkNTcmdXUVlwU2tzUGVpTmJENFZuVEdEbGR6dE1GRlZ5SGdMRHVwb2VJWDlIU3ExTEQ3MVFSNWpYQUE2aUZpendrLTYxbkJ5ZFY1SEVLcHFpdjJwckp0T0FRTlQwZmpsWlJadzBiSG9zSldIenF6SDZXZktQT25pOS1GTm1TV0xvZFF1cE84WGU2bC1PN1RoWVlhc3hoLXJNN3M4QUJrekZEUkVPUm5rTnczMVJ6SDAyQjJhOGk2R3VfcUVtbTdvUDdOTnJRaTJfRGJ6YnZBOFROdHBwU1gwbnc1c2ZnaWVFWmUxTmZwVXNSZDcxMmd4YWxWNUpuWklJaDAxcnF4ZUVZaVRRNlhxdXhPbkZJd1RaTTV6WTZSSVJ4QW5rTk8zb0pMUjlkSTU1cG02ZVlxMnFoZy5DUnVlaDRPYncwWGVkMXY3TU9GSVNnLlZRVXdIMno3UWV3SXJZN0kwSXhEU2h6Y0FLQmlKdThBVFVTQWZvUTBfd3J4WEZBNkxyOGlhM0k3clFMYm15X1hLbjNwa3FFR3VnVHZlTm9BenVmaDJNR1pHV1ZtOUJibGhCV0Z1OTZUS0s4cVRqOHJHUHpaZHB0MHpsSlloOTc1S3hZSnljNkdpNExzMVVqVDAzaExEcXVpYm9SMkZpNk9oZFRQQ2p5MXd3OXlNLUhKREswUHdzSUw1VW41YXFGaTMxUW52VlVja20tZUVNRFlJRWwyeTNtang0SmtVS2Rtc3FudzYtckRRcmd1OHFxV09NNXpDaFVKRW82dkQ1bnVCLWNLa2hJS0JPOEItM3RVbnQ0bjBQWldGSzhDaW0yb0dyV1JNZWtjSGxYdFp2Z2M0OHhVRVdQdjBhQ1l5QlhzOTlac29DN2ZRd3JIUllYdzZXNTFycUJqcTA4ckt2YWhTaVBxb2dkMmNfLTB0VVlOQ1BUWnBrcjVzanA2TTVvZUZlTG1KOURlUnVES3I3bWg0eTc5UndWam9xZ1JGdlptbmVBcmY3Wi1USmZydmlLZ3lLUjlUdjN5ZFVjNzI3aGJMTGQ5NC1LNFduMU41NE9paUtRNmJEbjRoWTd6a283aTdHV2s3NmdXWlRrRGFlVTFtaDgwQUE0UGEySXNsNXMtaXNuZkYwVTFXNXh6WUZaWWVYUnlNSDZkcUpHYm81RDBnNzZhdHdvTjg4eEZlNXNDVEpYQjBnQTBRUUNRNWRlX0E4WS1rcGFWakpKNDJPQ1NEX3RkWWR4a3JDOVZwZ1FlM0Q3ZzA3QmdqVlU4aHdFZTVkTzR2QmlRekdxcGtxX1lqWkRzSTcwWkFWYlk2UTE4QjRoWnJFd3VUZEs0QVdfS3Q4YmZiYVVuQlE3d2Z4cnJ0SldZeko4eUJaaFNOV201MThfekRoMmdYLTBuNjViMm5rUlVFckszWXBEVEpMZ0RZMnk5dGtETkdHX1dJUURIWkNiV3dDRDBTbDBheHdybWxHYmYxWS1heEhudHQtd214ODROZ09DcllEZU1SUnVkbjhScWlKSXF6d3I5N1JEU1pQMGx6dVZ5Y2xMX2RRSmdTYmtrRjVTdWdZbHotOFkyN2wybWV6VldrTDgxZ2w5enVMb0RiNmFMalA5WFBqdjV0WjZsOXF1azZCcjF0X3pBTVpadzNjUGZXOUVXa2hOdGNNbEZITXBYMlFkUTd5enVQSzJEb3V3bzVWV3gzQUFTelJCb3FJQmhIZEZLUWgzNUVFQlhHcEprcG9USzktTWhINkw4Tmd1dl9MVHJQNnBlOXBvS2otTjVha1VtUWtDY3ViTGRSUjQxcnFUeXNoYUl5WHBEYnVQZ19pbUF1eWpTLWR4VlZwb0Z1bXIyMk1aMFgyRTN5R0piZGg4cjVBTk1mM2lwZUNDdThOeF9VWUxubGFqczlMR3M2bVBneEktUFY4ZHBoUUxwa2dfM1FYR2xLOHcwcTVJMU1uMFNlc1R5NGJiMG12N0ZDdUYySzFKYXR4SGJqY0FFcmlpbm9QTk1yYUt4X29Kb1k0cVc0R09rYUFkQjA3MTBnZUJuYnBXcENuOGJNWkJ4RUZHNE1XU1lfbmV0cHFDVUhUZlQ2S2QwRzU4LUZQUHpxY05naXNGMUVuY1VhU0IxTVJ0YXVPMV9rSHgzT0RPNEhfSm5nYnd2bFRENWdXcjRpU1VYYldSdWQ0ak9YNXhJYkY0NzVyeGUxa2RNc1pORWhkZTVHbU1aQm9lSUd5VEM5bDJpTXNMQzFmdXp3YjU2SVczVlRmTzlTazVqOUN1RUdsMlVGcGd3N011U0laQ1VhSWZId3V2bEpXUXp4QlkwaG9xdEtSSjRQT1dWU2FhRWJ5OUdMa1VUSmFEV0p0YWFfc2x2UkVnb1E1WFFWeC1oUHZaWFczWDJlc1JsanJtQXZnVGJFWDQ5NUpJbUNsZTByaU1adjlETE9OS0k0a2NzUU12cGNsaUpQWHhsUE11X1dfZ2RBejExdHM2RUNGY2lVdHJOU1RMU19Qb0dqSlRSa2lEcERYSFBFSWpoaVp2X2xES0NUMjF4b0VsUE9kekk3OTYtNGpaYUUtbFBxOFpmTjdzQ19iRUxtdW92TjZIOS1yQ2oyc3BuczhLSDZzQXliZDBFNmxjTU42UHlCRWJWazU1R3V3UWNrLUNjaDA0M0l2OTJVVmZsNmJROUJsc1ZjenFoMlVGV3Y4SC1qaHVFeF9XNHZidFhHRVdsSDVSRDdEWlUwRmNCbkprQW5senF0d0tnMy00UGg1bHhTSWppWVJpdTRKZzg5clRuLXZIZUZnc0hBWF91TDFjM2xSZkd6MmVtQ202Z0RrNVVKdHZSWGtmUHREUGVHckp0SVlTRExqWjduaTlpRXl5X1JFVDR0T3NEX0R2N3hieXZ5SHFHUzZOa0JLRUkwY0g4OWpTVllVaGRxZk9hMUhqUU42OW8wRmt3OHE1TG51c2NXSW40UFVyajBYOGd5c3RIMWVha1ViSU9mRm05RWtzdzh0a1Z3S1g2LVlMbHktUS1mTlpwVXF1Mm9HbkxOcmV1dmhoWkJHdnJzQ0pzUVF0NHRjTWNwakc1dmVRd2RQT2l2R0tRUmVCOE9MazJCR2RlZGZXeVlyRGk2d2ZUclJ4VjZyb2tWUlpvVk85dTd6ZjkxWl9fMHZaRlFSN2ZubE5DVHpEM1dpOWdUUEZJaThFekdfS3BiRHNmRkRNN1lCeGx6SWNkeDdLZW9aZXhHRXpUdDR6T2JfTUllWTFGWkpFbDdJRUxxUWJydXhFMjBURVYyYi1VaWJvWWpvU3hRVUNZLTg4TmJ2czZCWWF4NGs2eU9yU3ByVVg1OXNNcVFPd25uMWRZUlFaeHZ3WGh0U3pWS2d2OGtzYkNvd0RHRW5pb0cxaUJKa2NDR2tlbUxPRzlMb2xpOWxRVDJVRlpBR0VzZXp1S0h3endPOGprRkEzODk5V1JXWHBqVFRuaEN6Wkdqd2JRN3BESUVBWFhyakIxZmJ1LUZhU2VYUGVhS2VkZDdMUy12LThJaTJFaXVLcUdIaWttV3MzaVJQNTNTN0VkNlhtMHJydHpSVE10RlJ5LUdQOXlWWlNiR3JyN2lFZ2YtMFhLT3ZPZ1FrQlo5enFua1FIM09rZVlfRHlNQVJqSEdkbTRIYnQ3d0VrZjM3MHJ5M2JVNTlud1ljWEI1b1l6YUQ5STVxM0Zmc09yTWhlN3hIVDZxZWRqbXlYRHNqdi1DQmJVYUVpc1lPTmFUUW5TbF8tRjhBZU4yajJrYmtCSl9tYzBSa1BncHA3cjZJQVRCRHg5dkd0ZjZkcTRpcndybWY4MV9SM1dfQ2ZhMmZlZWtzUDBFVjB0THVUVGloM0lEUlR0eU80MjVEQ0pCSm5BVGNkc0tPOVhuTDl2NGlMbG1Bd1E2S2U2Y1N0cTNTelNNUXhLUDI4TnlXS2lKV3NLemlMZ3ZGV21zQWQ3TG5Gd1dzWUFRa1ZidjR1WlZVYXhIaWJ4OUEzZGhsZFV5cHBEaUxlcWswck12U0JnTHNZVWk5SXJHbkdfSDdISzY5bU5CS2lNel9abDdBMjBLbFlJdlRVaUFBbnFLQi1kdnlCdmNVN3l6bzkxY2l4dUVidnNtYkNFUy16WVo0MUNLWGoyZ3BTZEdlUDRBVHhOYnV1eDdZWkFPUnlFamdHYmlJS3dUN1ViU0ROcEZEeml1eHBVby1jZmxabjlZZTNNcHFlLUI2NXF1RElxcDNvelJvdGt2SzVCcUpXMkRnTEVvUjBKZTNxb0gxVVJTT3Q5MlY3bmttSWRrUWloMURuUkttSEczQUUxS2YxUS1fRFJGSmJxTkozRklFYl9ONVlMT2hGaldmN2p5ZG92WEVqUnhvYWl3ODJOR0tHZTBOZDRhNW5JanhHbWhuRkpVVkxEajhnZHNyNG9ueTR3RWtsVnVqdG1DU1prb2VSRm9tQmtfNjlEY0pFbVl3U2hlY1JJdktxeWJ5MWx2VlNWTTZuSlpPam9FSEE1clNBVGxHQ2VxbEdWaVB1YVZGdXhmOGs3S0FwcGVFMzI1aVJXVzRhU1FHeE5NVjNWWHpIa2dZRjg3UldnLWNWNDI5M0ptSC1IOTlmT09Ic3JiVW9oaFRIS0E0MFMzV3kyTWc2anllQ1Jldko0SXhYVWVZclJVcVhBWnVOalgyM2pZcExKYTk2bkoyZEwzcHRiMW1WNF9vWnM1eG5pRjhmdEFEcTZfTDZFV3dRdHdfS0pDVkE3a3dGZHBOaFM4YU56V1g3d0ltNndRQ3lsTC1jTHQzSm9EX0ZtWmhfeEhmOFludFRUUFpwaVZyc0dpRlFKRE1YSk9OQ0FEekFlbk52cFVUMTIwaEtiX3BEUjdDa2RLbThQb0t6ZWU1UzhaN0h0NTZjYWltOF9ZSXZJLURZdWFuOTJ0ZXgySk9Ca0paV2p1Mk1LZHVOUDd3UzQ1dWZhTHZyT3dKSlRRQTk3eHNnVERXejN2WGJmSTVCX2VHMzVJVG9RX3EydXJOMlBfb2NlN2FRVU1mTkpzcHNQeTBkckVfekFoUW9QclVPNk1uU0dlS3NrRVAybHJzU2dhNUpsTUZyclVNNVdtMUREcW9oWnFqTDZPeXlPVFVvUXRrQ0dQUlVTM1lmbVFJcVpQV01NSG1wbXlwZUdiX0xSVDJXQm1hSFFOUVhfdVNWVG1LUWIxbDBJa1R0eEFNQmQ2NzNTQUJNVVllQ01zUWlXRWdxT1dBbVk3MjZWeWhneFg1bjMycEV5d2x0cXFGLUd2djlUMm82blFQRnVrWmNSc3c3TGROREx4V2hkMHVyTHFneDVyQkh4QXV4NlllaE9QYV9sYVR6WUVwUFhGSm5yR1c3LXpsYkU1UmtUUUFRNm8zbnh3TWkyLWFPREthSmxWS2EzNW5ZTHZPWUZtSUg1b3gwcHVBOFZGUXNmVGdGSjZQa2U5cWxic0JwcW82S3F3di16czIyWkxhWVkyNzlhRkUySXZ2RXhHakk2cW1HV2Y4RTVPbjFwOGZWSndqQXlqc0gzLXlwelFJOWFMYzF5WHVWcXFvNzVSbGlHZGE2Z21Ec2ZSRW5wVVNrdUgtYzVXTFBsX25jdFlmY1pKUU1IbWlLNUpPT3pnTk1IOC12ek1FY214NXJQeHpuTHI2cV9tWjhKb3MzSkFiMXliYm1PNmFoR0IwQ0hqZ0ppY0FOdXRQME1SMXd2eVd5Q3ZVUzFpclVnQ1RyLWNYOGFGblNKY2REdUxhMWY5TVV3ZmJzZTV6YkpTcFRpNUplckc5Sl8wLUwwajYzc0Q4ZkxyU2l2MGRiVnlhSl9SMTg3UWRWQzRMRERWMzhhRFZNM3FOdmNwYm5MdzBtYlZzZ2NFX1czTmtlWTRsbDBLa0I5T3BmRmdNX294d1p6T0R1S0lsdHZ2YVhkbGZha2E4a1BDdXJxS1BJZGxydC12bHNLdkdpQnBjNXVTUG12aGcyUEV4YThCQ1BBZHdocXo4aDl4Y2YwVko1MWtPRG44dWFWOVlzUlhtY0pOdzhZTXZXQXJnOXU2RnJzaWtsRXQ2NUdZbnZETTN5V3V3WlV1UUw5LUVvUUpCdTM2bUY3amwtQUFrYTRhUEZONWtlOVdlMEtObEtRZDFOVG9KR2w1dmZBUV9UQ0FXQUtQZjlGSjRyOEpzVFpWWW9lZE53OUJzQ2RLX3gyQ3pTdkZubzgxbE1JT2pyYWZLT0NpZ012QTBoTkM3NE00MXo5alZ5S1d0T0JXdVRWNEFFbGtDS1FDUXVBTnVmRFIxWUNoX0lsRzhVcklFR0VIdTdGMzhHUWVvWmtCd1NNMHoxZlEtZVVPUi1GX205ZHN4bHYzNGh6TFhUckx2ZGJ6YzJuYkV5R1pnSGhBWGVIZkx3eHFNWURwY0RmSW1XcEwwekJlT3JWWkNjZjdwcmNON2FRUGxSbTVYUUNnLWlVOUY1VXdkMUVQd1pFUGlNTGxGX1k5cGg2N0lzemNReG5VTmZZYzg1bnhIWVRBUzQxakFicmdJSjdfSy1KMDR5MVBib1lDb2dRcHN3cGlyNGZNdjR2c2RuMUtVbERxdkh4UjdZTkNXU1l4dlFmek4tNzUzazQwRERYd0xlXy1yS0tzSUo1LTY1RTJXYzZkNXZYLXpzdmJTbmhDRnlidE42X2FIZzZzeHlPc3lqTnh3N1pQVER4QXRXeHlZOWpZMzNnamI3eEw1WmdSMFlKRGVfaGpNS1FpUWk4LU02VHBlOS1YY3FuakVuWnBFdVJjUVBldnZKdjF6LVQ1YkpLMDZ0VnRLc01wSU9vR3FnbXBYNktzYWxNTXg4QVdCWUoxc2VfNmRZQ2o2TVVuckpIeEUwSXhzR3pOWkJlOXlVS1dzU2h5bUhZWGRTM1RDekxfNXhycjVuVy1nbUt3MkJTZUViNm52NGFoNTh6cjZ2MVBFZ2tMTGRuaFdPbjZZQWZCMzRzMDhWMDFiUnhUNEdSNEhSOWExSVJERVFVY3c2b21POWdoeDZCTkJKN29sNnVlZnBZbzYxNmdFMXgwWEFjQlBrVUJqTmw4eTVockJsOVlGMW1MWTJ1bEZUQkctaVlOdHhIdlZOZXllYzY2NTdxWlpYcUM5WlFfQ0txT09Qc1hrdWtEdndxMjhyNXdyWjAtbXhpOWZ2Z0J1NElsZ3FpbDIwQVZtSlZJRno4c0E3cFF1VThYeVlKTHdRbllTbG1mU1NqZEtoMUtrWnlsN2pwVjJ6ZlBBV2I1RWxsSkM5QmZUXzViQ2xfbTdpWUFlRGlnTkJXZXNwaVhuLXBUOWNnc1djdUZoYm5BTlB6SGtOYzZmOWVlb3p1OUk5N194SVpKSjF6eENtQUtZck0zTTFCNE1sb1lpcWJfblJDWGExbW4wdXFBVzBqSDZ4RFFLWW5tQVQyYnpRYXdYQVhxSmd0TXlza2xVaU04MkpOR01LWGFDLUZPTEhvYWt0NENBRm9CMzg1OTJHZ1NxODV2TXRqX0d1NHVYRmRtMGFTeUZjQThSTzlVTTZPelhncUNkaTVRWjZLMlVMc0FQTEdWdDFFUmZsWlFuX19SeUhfanFfbXZKTzhHcS0wWGd1RzZkN0pLQTluSE9QaVRnUW5yeWV0OTJqTEgtVTZuMjlIZkhrUnFNQWp6eGlCTk9WQk1namd4Y2VGeEVXRVFCYk9EQk5PcFJxM29oaXZ0WlFaMFN3ajI0eWloREQ3UzRTOVg4cXhhTVBGNFhOS0M5TW1YVzkzSGhLd01ZYXJfcTZ0UERxTlJJVGV1VGZCWnN1bWJITGR1YVZnWlVLczJTQ1dEQ1lrSXpHSHVyTmY5TFNtYWppOGJhZXVBal9PTTZ3TnIzUkFTdHhadlM0bGl3RmRreFBvNFB1NE9qbDFDTDFqY05BbTlsZXBLNlJxX1QtVkREeWdkWUxsSmM4U1UtZ3JCVUFiRzJtaGpPTXF4dUd5emdXNnExLTVjelBDeUZ3TGhkaVB2MHh2TGtyNm1Id3hMbWhldVBiUzNsNVlaMENQUl9qNTVNVnFwcGFzZW5Qc2JFYnpjbWlaQlhCNF9uV3Q3bWlSUFdnbWNCcFp6MUpMNFI0N3ZyX2pIanN6SkRfbmJhRHh3c2RPakFEV0lGSTlhTUhpM3lFdUpwMzgwRlFrWmptUndwaHoxSTJfNDhXaHhqLWlJcjc1WXFlUjVaRGRDNExNUTRDU2R1cVREV1Z3dm1wY21BWXRzalJaTlFESHZlTjdYbnJBU0s2b2pBN0dvOW4ydThoWGNyS1U0Sm5uc0dod1ZRSnJlN085SDJsWG5XaGZraF9IUnB3QUJQd2xZQmJRUUFzb19YUkFaV1AzOS1oODhNUlRiaE1jaXVHdl9Yb0c3LUpkSmpWYnAtT0c1cUo2dFAtM1Z6OEtSZFdJT2Z2enUyZ3YxSmJfeEp6LXBDY2xxWjlDT1ZNRlhCNXEwRHVTTGR5S1hpa0xVZll0M1hyM0Z1N1RyeVpzMDlrR3drV09NRmFCTnJXTHlKNkJIQW1TUURjZUc2cmNhTmtRZGlCOVItNVJKWXpEWWs3SFQzdDFvZHlEUDZBdDdfVzBxcXlsak80ZlFiRzJmM1RBMjQ4bHE0dE14c0R3Q240UmRtOGowU3Uwd2lQdzRJNnlvRkZaSUh3bjJhcVljSWJ1SllyZ2xJeXZ5a1cxSzBUdlg2ZVFId2k1YTZ3MTZZOFF3S085aEFJZlV6SWtxbl9ZRUo4dGp2ZW90UXMzWFZEaGtaMnI3UkZjdTBCc2xKVEo4TFVPLXhRNEdtSjZsVlN3OUw5TjRJNjhIMzRwUU9Ta1hValNaczFYRlhJbVlQZ3pRSEhwc0gyTTVOV3NsSmlucU1oLUxLd0xsQjBpaWF6b0lMRXVFWmJjNEpuakxCa2JoU2FuUEZZU0pNUXNRc21wYmxzUXVhZVFzQUNITUJIQ3pHQ3BicE83blBBbEFpU0xpc1hlOUs1TWZScHVLVDFDQTM2Q1Vpb0xEQ0haSW9ZMEVlVDJzQWthWW1tMjR2S183cjdWSHR3NklpTUxGdzlhMXJhdVdZSl8td0tjNERYM0pubXRWRDU2M2RwNm9ta1pMSm1Xd1hQOU9BaVFKd2g1bmFvMmFkX1JQbUdTbFZpa0x5OVk3U0NKbjlUTE9jV1k0R2hxVGZzTEE2RkN0RkxLNDl0dzZCT2hZSEF3ZkJlWnNnb3cwV0hYeldENzRiUHYxWkV0Q1o0VnFoTFdzRnRaWFF2V2FMNmhLUTZaS2llcktCdTcxbnVxSE9UT2JIVXhxOGJ3Y2lDVnhXaTNJalZUZlJ0cUltSXQ3Zi1yc3BncTFzbm5QRDJGUHEwRmNrdHMyUEJIWkJMOTEwTEtKVnlsRE5uR1J5cG9zWmliRlNkVlVqeU5HYUpyVTNEZGZFTmJ2R1A1TjZFbi0yTzNqckUyWWJPY0EyNXp0eTVvblhJQXRpM2hzZlAzWE5NREFpUXY3Rno5cjZNcGdxUnUwdndUelJtSDl2ZmNJaDhRX3VPV3c2cTkxbWNWTHBzcHhSNnE3a3hZbmYzTEhTYjE4YXd2bEsyMGg0TzVFVTJNWlVkWHJNaHRIZ3hXRmFtTTNLeVh1bHM3Ym13NFhVN3ctYWxiRC1oQ2dkWTNLUjU2U3MtM3hQdUwyNUpPS29ERHdldVVJWkx2WnJwNnI5bnN3VmZIZ3h1bU1GcTFQVG0zbzl2ZmZyc0xxcmQySm9VZU5zc1lVY1R5N1QtNkZpOXgwdFB2MDlzdGkxT2JCYVVvNGRiWHRRczRTSEwzTE5aZE5yNm9SdUpUa0hHYnJtc3ctUzZ3cmtBdDE3Z2c3TmpHOU5fX09GYS1VTVlyM0tJWXdudnBHQW03YVQ5QlBkODBjbFQ1UTVUWDJPYTRNbTEtSzh2VEoyN01CUjllMjZMMUNfcnNXTE5rZE91a0ZsUHNaNXdCTU5kVXNUajhVc21JQ080c1ZQWVpnbGhEMEtZSUNyeUpXdHR4Z25TNWFzQkZPdjJWOWszWktFOFZ0VE9GckhFb0I2QTNUQy1OdE1YNHluNk9KT3Z0OEcxdE96dkU2aHdPRHV2QllFZTFtb1pDblI2OC01WFctaGRVXzRwOFFzMmtTaGgtWFh6dUdaalVJb1Z1R0NsdWQwZzdIUTZtcC1wTDhhb1ZKbnRHWjVlVHRRSDBGNmk0Q3BQVl9hMkthT3NFbzRtMVd3VjhOSVdodW1XMGR2OHpfOERrcndPTlJwUVFKQWZsRkp1enFaanRYZExLdEN3d0ZoZ3ZnMWwtVWYzYmJjc2FjODNFc0l2R2pMcW9rZVdFdzBBSHkzZkdyTGd1UlVtZGZ3MEtjQjFuaFdnLlIwTk5LazVCRlFwSXJnRUJCc0I4emc"}' + body: '{"value": "JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLk9kems3TFFIaU9MbVZjcS1ubWZIWHZPTGlRMjEzeW5NOHlzU29JYkhyV2FoSlNsb2pQa2JjOWRfMG9JX0xBVnFFWjRUQWE5dDR3M1B5emRYRDloaTRPcWh5THRvbFRmajlxUndWcE1nZXVJaVp4WndpVnlFR29FOTN4dWNfOXp0Qy1aV3hmTTR2RHRPUG9KZUNDRnIxS1d2XzFNblV5ZGNjVzhvRWxXS0JscGlkRjZJQzI2V1BRMEQyWThscFNmMnZrN3FUejJzUjRkX01RSGwzSkZtdWtaU1hYTXJyNC1LcFBqaDNtNUhvWXM1bXFhNDZDNVFQUWVLRGNuR1lGTndhV1REQW5EcTZHaFZJNS1mU2ZEWUhqZVhJcUhtN3hmdllmVlBPTGdRdFJMbGt6VHNCUUgzZjlaYnlUczFWQ1JkeTN2MlNLNjhnbFFDOGFEcXBIU1FNdy5iby1PMVE1VG5HMGx4MGdpRjVSQVFBLm9lYUJUR043ZzNMNndRVS0wU0c3ZzRwXzdzU19KSVpJUmFqbktPZjdBNldnZ1AtbEZTTlVtV3RoQ0p1SjAyaFpyZW1mamRqcFBtLTJPRWZ3UFhzVjk1YnB2RGdMc1h3T28tRHZlTTdhNXRZVUxuYXJNXzhXVmp3emVpZ1BlUVpCV0c2UXAwbVZKX2J5RG4wUWJDb1FIRGdtTkVZWi04MGNXWVpJOEowNjBZVG1xTG0wM1RNN0h3ekpuN2ZjUnU5aXQ4WVVTZGl6Vk1nb3lNM1F3RWswRUlKWFJCZ19GVElEdWJIZ0Zub3NPaG81ZFRDSV9ZZXpTMVpkQndDOE5JZnBDalRSb2pEVFJpaUgwMmhXcTVacUEyNktIOXl1MGRZNTJ5TWYzWUlnSGZ4WjJrY3N6d0UwdlRBandyMGtSY0lnTXNSZV9MREROMWl4bjJQNlpzRkQzZVBLa3VNYmNmUi11RUxSV2VPRnpuWXVqeVRPVU40YkktZ3kxTVhpbm41aGJuZDYwb0tqZW5JYlVvT00yaFcyYURVRXlpWldXZ1hPNW5RWDVPSUcybEhEYmRUNTJzOGoyQVV2blJ3bTN1ZWF3dERjMFBveENCRzZMSE5CcUZJRkhqNkZfejl6S0FUUTlDaXBON1RRZE5yek1Pd3Q4NWVNTnN3bEZOOVdQd3pTSFJTb05maWxQN2EyaklQOW44SDN2NVloUlVQRFhaQ0VyYk44UDRLWEl3c0EydWY2czFia0J3UW1QRjk4UjdsLWZ1TDVRVnpWZGt4VzQyREdoMXJGcEwyQTFhQVpmU3lON3hNVEpzZ2lBNlRReTUwVENEc3lfcUIyMUh0ckRhMlhlT2JtNWI0QlBxelVjNXZYajU5LTBYeHZjX0ZoYUV4Nkx1Y1UtTmFVaWFfME41US1iZW9vMlh2SDZTNkhOSm94bFZ5RVVfUHF1a1E1bnZ0WW1JS0F3VVFXMng5WXhFa1gxTzVpd2N6Mzk0VlF1cjc0b3hkUnpzVHhKTGNIeDlpYnNBZkxtWjUwaUZFb3g2WnJJOWdVOGtTSmZ4ekhHOHRpSGNnYzhLTUpMaTdNZHhyZzEzSG12Y0hfMW5FemloMF9OUVJVY3c3X2xQSVBuZVJEX0hlUmRiU0ktOE9wN09hT2wwWGhMYWpKVUNrMXhzV0plNXVYLTh6SGxyT0ZTSWtlLXFIRkpjeDVlcFNyVWN0ME42bVo3akQ3bzJGb2h0cl9KNDA2Rk5hdXkxM2FEWTItTFRSSmhTSWNReUVzVGs3NXZBTHV3WElZYzJzMk16VXc1cEk1Qm9GaWhWOERqMExzNmVSNXAwbkpDeGFqXzFmWU5takFHSHhSZ2NGbzItQUg0RjF3ZXVhTEhDS0NNekc2bFBrQWZQb09kTHFWY2ZvRHozOGJlVl9ST0M0SFpmV0hySDAzVmxZaFFGdEVkRVI1XzMxQmdyQkpjV1JtQjJFTzFUTzJiYW42X056Z25wMU0zRTZkUExBaWZ4aUk3amxBWUlBUGU2UkVVc0lFaXdtd244MzQzRGdOR3FpeWk1S0YtSHZ4OXdCdmtoRFVDWmsyM0JzRWkydEs5ZkF6LTI4R3RHUW1TRi1Obmk5Q3NFQUlTRXlzcFBRSDFpV0ZXbU9WdGFJSk44QlowVXdXMjZRZ2I3NE9qTlZrem9KbTBibWtjSnVEb1pxMUZPX0RSd3VHYzdzd1JPTG9yTnNUSmFEdXB5d3ZlY1dLUi1rdlBIRnh1b1R0Rng3UjBVZ0FtQWhrZFZWMWlUd201LTJFYllJNm5iYXUwN0h3VXZHbzBfazU0dURoU05uMVVST0lHd1NqUWR1c1UzZThkTzNiVVhxdTVfVGFfYlB3QkI5TFQybkNPWlBSQ3A4TzlaZ1dKRWZxamZldl83NmJ6U05BZzJwOFh3UzBmbU5NdEphb0Nub0ZOWmhRSndtZ1g3cVlYX29oT0lEM01sUW5KQl95Wi1id1RFcjRKY21fdVkwRk5pVThSTjZvTjgwMjdfRWNybEI4ckw3d3RTRHhUUUxlVnl4UVFxaENFaXJNNWVHRGVNNldWc0lMR2tfNnRxSmM2bmNJdkxDc3hxZ2RNdlpYc2dqVTdHVkV5eVJNRnAwX2NQNVBndGYwdTJuclVJRmFUbWlUR2dhMXU1UWJUVk9hRDVSbTZvOHFmaTFzeGQtMlIzdEMtdkpIcU5rUTFLWGZNRDJ6d3U2LUJzTVRLUHk0bms0aEVxXzBIdU5DNFlyUk8ydmIzclNXZ3FHVEhmeGQ2bHdjMTJMazNDdDhIWW1vR0JzVS1vYldFejRYLWgzY1F1ZUdQcmNMaWNZZmsyTkVYV0Iwem5yV3BSaFd3enNTVEc2Nm9kSDRfeDRZei1HSVB1UXRNUjFNZ1BzSFVpOWFiam9rcmxRc3NqeU0wX21idGx3VkZob2paU3JzVW9LV0tBTXV0bVlkRFZKcmNmRGxCX1dXVF9PX0xxeHEzYVl2ejF6RmJadWVBcTBBMXlCSjFjdkJvZTVQS1JZcDRkS0c1NVpfVFp3NzlvYjVkaS11SWxoUzd5Z09XRi14bnFDdmg0TlpPME45SUkyWUduVW5wcU43TlNtbXJ3LWx6QzhnS0JfUmp0T1RqVWdSWjZtakFHZ0toYmViVTBGNWdYRENNeXRLM2NtNkpiRGs0SjZMaGI2bVJLTEhmVjN4SkNwMEdQOHN2UUdyOWx3d3NyNmJNMHNUQm51NllkYTRPeE9SNDg3aG5QVFowWU01RjFoc2pFM0p5cTV6MklWQXQycGNsTHhET3I2REMzUU9oN3NhTHNVWGRkbzVlejQ5V1E5dm9qU2RqU3YtMzEtZ0hncTVUaVFYY0xwcDVaeUZCcFNzMnVaVWdCb0lKLWpmRjY0ek1kU1lzZTRzbXgydjNESWlCNFNsRi1Kb05uejRLaUxkdEdTUVlMNW41VU9iX1pQa0Fwa2FQRnYza1dNM3Y5cjUxQ2dTS21ZWXNMMmJFUHBlV045aEFkUXJtYlJ3ako1aFZXT3RZT2dWcXM1dHBYSU1reDFvSnVuanF3dlJfS291MGw4cm5rSHhHVE00V1FGb0hqWGNFS1ozNHk1QnFmSGhiUUUydGUtRXNjek1QOFFaN0l2NzFEX3JwYm1IdDg5WTRGb1Bfb1ZkYW5YSUdJT3RDdmVsWVdsdGZ3blgwYTZTeWtRc2JDcXowb1A5RmFueDhibUlyeVNSSXdZVjVKaENQR1ZlMVluaXhqVmEtcVlVT0tXWG5tZU42M29RS0gtd0FyVTgzR2lhbFlCT1pNWVBCQTB6TzlyYkVYaHNLajFXQ2VnQk1iaHRvemhuY3VmZWpQX0JlUUdBOXBIRndsNnFJU3pPUGt6UC1ucEFCbjRxWVhXWk5JbWxNb1pyNzRmNnhVSXduVThyQU5EZGgxb250ZmlSbmxFdjJucFFiRFF6ZklvemFraTlsUXkzVWZCV0ZvMWR1emUyMVRWb1lqc2E2a2RSZzVJSUNyVDlnNVY3NGptdnc2SmVROUdQRkdHTXlablN5bG5yNEN0ZC1TY2xmZnRXamxkUW92cGhzaU1sc09YQVZEaVFsNktSazFkTEpTSVVwME93MXhOMG1FNUY3UF9OLWVTWWJ6azVGcFZTaUFjNWMtNklha0toUk5wd3NyX1ZPem41amt0UFBWWTFpcFZXNUhuVUpDaElhSFRXMDB1NmU1TVd3NVMyQzJsWTdIVXNESXF4Zks4bXJJXzZlcTV6LVNlaC1jMVJfLWw0aVdlemJULWEwUWxBNGtYdWpZNzRvNVduTDNwMDNDT0l2UzZUYjhMN2VXNndyYzRab29XRHFrUTlhQjNscXdwT0tBMEFCV2tSSUprV2dsZlZMUlQxUVM3Q29abmxFeUVlbTBhRnNKdGtTZWNnX1RkUFBUNndfT0I0Y0xXY0NJZGV1ZFd3THlieGgwNkhBQVR5dGYtMHZreTJxT0hkd0dJbFoxQlhTdmlSX3Y1LV9SY0JUcEZEcjVMcnR1U1JWQmVsRmlMWjJoaUUwQi1VUGwzQ0Z5OWtHdy01TTlVNmNKNE9CZnNMemF1Q3N2eDRYeVl3VnA3N3BzR3M3M2h1T0t0T05td1BHWVlPOUFuUm5ENFRmeV92ZVdZdXpRclZHV0Y1bms1WnFJUVZ3SVBaUHhLaUpIZXdFcVRiMXN3Z2RKSnV3ZC1PV29HMnZLZ3hWdVk0UXlzVjQzSUtjYURERzNROXZEWXNTNWU4enp4NVlFQVBXaGNhZ3M5UUh2NkJFVDU0LUpCTEUxc3F4Wm9jOXRVVmQtVWV2NC0wSHU5TEN2LXNnSWROVVlHT21ZRTB4NDlsc3NwQmVod0JBaUQ2OUh3V3Nud0NpNTBFSDdQcVVoOTZSYW1VU1IwVGxSWmx4REZoSlNsMTNWWExtLWZiX2VjV0I0NHl3NWt2WDhCTFJ6c1JDLTlfV2tyOWNRUGNLMWVxWWRDeVdxUEpBMG1NUWFqRlh5QTlwQ2JwZ1hGZWloLWgxaExLdHE3anJydnh1RWVxa09BM3QxdjB0cThCRUxTTUlxTGd4R3BwU21QeEtZeUgtVXdPS1A4ck05NmFacTY5STNpVlFuV2J4OFVnMEpNQ1liNmRVWHVOdGplSlk5TEFoXzl2QWRZSGtQYUVVZzRwV1h6X0JWMjA5SVFxVk5ZNHpmX1dVU3dQNHlYUUFqdElUbUR6b1REVUEyamk0R1dPOUNxN3pRNzVUcmVoZFlNNWVhLVpwY3RKQjlCX0xOdEhVclpNdHY4SlNZMUVscWxRdGc1dXladFBid3pWOF9jUkdEZnY4M08zR3hvYzF4bld1aHQ2UDRuQi10UGVyZC1taWN1U3g1VFRjMGU2Zl94TmJUc3dpRUE0QmhRS3dZVDBKY2xvS0c0UkQtUE5UOExlZk52UFBWZnVQSEdfSm1aQUdDOVJEcWFra0tXSF9EU0Y1Y0RfdW9BTndBYkhNUFlpY2ZDOHZETXZUcGNEdUs4NlZyTVRSNjFMdXpQWWxMdENxNWdiQlhZaWZFdlFJVm11TXVHZHF0SFpiUHZFSUo4eUEwMHFxdVd5cFFVRTZ0RWhibzRNZWt4R0NqTzJDaEoydjBobnh0MFYwenFBcm1xaXFYOVJHdUVQSmstOXkwY3lfWVNPX01jRmpMWGZhYTdHQjl4aDlTSVA3UGlSUmE0MzBEaXBaSnktejJxbTNXbE1KNW42Z3g4OFE5U3FqSU9mODZHQUJLRG1XZzhFbnJZa3lxNDhReWFwdUhOUlVHMFQwTFFGYjc0U0wzMUhPbWhQV0F1WjJrRl9XTDYzZW9JTlZTeFBoU3ZSMEVWYmFpdWtvcHhVYW5pRTlCdWYta1JHTnVlX0pBdTJZYzBKcjJ3UDd6YllIZTJ2QTdGMFBvWmt0cWp4LVZTTlN4QmE3cFYxZ2hpV3ZfZlhILVQ1MF9XQXFNSUZjWWhkeFdNNXJTZnFPaWxrVmNCbkJ5TUhQLUJwTEo3RTJLVmNoRzBGemxvQkZvazBEYzdtYkJBTEM2NEQwMVA1U01zZGY3bGpaOThUdFAwc0dDcUJuOTVsTUwtSWpnOUhDblZNZ0ViODFma3hLaFBXWTUzNDNDVjhiWnNyUDhtamZZUzNqUThoSmlocjdCb0c3amZPOUI5aDJkamFScnp3OHFKeEJDRHZRZ0M4VGZjOTBMY0pxS2YxVEc5UE9GQ1dLV2tRWXNSck1JdHhDWF9kTi1jekNNV0FSSUNhYUYycFdvTXNEY2tZdTRWV241UzFpNjF1NTdvdG02NUxPV3RoSlBDc3ZKaXFGaUtoajhHYWk4OUYzcE5xTU1YN2c0V1JmUXZIVmxucmJUeTdSVmZPaE1HYnlLX0VKWXVVTnU4dzFVVWFSS0JoMW9VcWNVMnBpNG9JV1k4LTFWb2NYMkpfTW9KTFRsTWlNSFZ2V2k3bDdLMDByNE1WbFhHWWhJSXBLdEJnN3BZRVQ1YlRqeTZfWVFqZjFKbVF6TnNJT1U4aGdtc1lCcTI0eFRoSmRONmdsNlhTRzI2YmgzMkNYZnBvS0U0M0tuY2tDUm1MeTdCbzQyV0t5SFhFUk9qYzJHdHh3TmJ3ak4wWnVkX2JJSkNtOW44d1hMOEpqencxeDZRQ1RKY1hSTGdLb1J2RWRvNmlaOUMyR0F2UWw0T1B1dkxobWpEV3p4LW9Ec3NnRXZmdEFYd0dWSlZvYVJhVWJET1EwM2FBdGh1ek9LRXhaTzNZamxHTzZrWjFHRnhGbWVneXlNQ3JoOTJiVm9tYUdSaDkwX2s4ZjVIbmlHT2dGdGlRMzFaUmtCc1JyTnJoZUlLb2Q3dTZRX2xSUEhMWk5pRk9UZTU4cjUwdkdKMVdRMzhYbFBHclhoekNWYTdFVGdRUURDNGRlTDhuM3FoN1lJbHlpcnBmakxyTVBUaURYMWNQSEppR3pjMmVQbVBiUkk3VFpnRE1HR1BTdUwyRUltWXNINzhvZi1HdDVya0t0eHZidW5jblJuZVMwUm53UFRYQmdFT1FKSExoWW5PbXRmcmIxTjkzVDI5U19udnZjRUZFOEpGZWtadXhxaEZJRUlKZ0lmbHQxSURxNEZSRFJVaXh6N3R6eVlIcGFtM1gzbmxUMzA0UWthR1hLb0N6YndUVVFsdldGR3BCVHZQcnB1dmp0VllNNzc4cGUtZHZxQjM4Snl3VkNoQVhnbDV5d3dpRHlCOFlTWUs0V21BNzQ4a1A0T0k1N25oc2hwSWNVX2pfS1NQclFQd1BXN2pxbzY4TjNiYXNYTW5ORHNUcjQ5QjF2cE40NGQwWWIyRzdTZXRzaU5SV1lhdmhZa0d5YjJPZ1dqTG5LMExZbGI1Uzc3SzdXN3J6S21uUUNfb0VnX0I3aERFY2NKUlJQd2dvazJiR2dYN1R0Y3pydkNtOElMTEpnUXVvVmFoREx1OGxGT3o0aEtYUlV3dlRwdEYxV2Z2WG9QOFlDc3VLYkRTUW4tVGxOc25DQzhmX214M0Vob01vUU9YS3pRRTN2NzhLb1NSRTZXWUJmVjlCNjlzY21pdWpSOHFyYTR4dVZfbDBnWVNLNDJaQU03enFKN1NqQmt1eGd2Vm5wSmVTbTc1c2NSZFdaSFVJam8wNDB6bTFlbmlLZlBGSWFZNmQxLWt2Y1BkRFFVLXhabmgzZWRQRlNTM0NDTUI2Rk92OG9CTWZ6Y2RmZllqM3JHRHVfSFJLbF8xaElwa01xdTNfckpNVjBhcVdsZm9aSVRhZnhYZ2tPZlhaemNiQnNCOGdXLXgxZ3FMT3pqUllVRGowVTk3N1NxX2x3c0ItQ053eVFoczBNNXI4bWRPeS1hQVBOUW9xb2VlN2I2MGR2RklUZUxMUE54TnB3LWVnbDNlRThucnhNN2FrRVB6enZLZlJOMHNPOE5QZHE2SUdKM1lDZzJQNnZPeVI0aDZPcjZiQlF1cXYwVkJ6cWo5bUJuZ0pyT3p2YnI1dTZFMUhORGZObk9NbFpzeGRnQnQwOENHUXdJUTdPbXM5blYycjRrYmQyNVk2OEZLbE1DMFhGLTZHdHVFY18ycFhQR1pldXlVUGNVVDNVUnlWVUp3UFJfSy1YaEdQZnJiN1d1TERTcms2LTV2Zk1OOC1ZanUwSzk3dEx3b0lkOHVVTVg4VHZvUWF0LTJCemc4cWVzSml5ZzdiWFl3anNiQW04dm9GcDQxSTdmWWVpYzNoQnZ5OVBuYVFsZUZ1a2JZY2N3bF91YzdzRl9Ea2NiZFpuYU1SNTRvOHkwZm5tT19sbl9PYTdNTmRMcGhWWmY1LWkwTXprdjJ3U3J0REVGYmo0ZFc5UWNHWlNpY2YyaGZiUEQ2NkFKVlRKVnBxbnAwd1Bia3hGajg2TUZxWllIYmFkajNaY0tmWDh1S0dXdlhZdE9QWFAxT1kxby0xWVNVSDA0ZV9oSWhud09acTZYNVJVajNoZnExQ0RyVmxTU0lzc3NhWHRkNHR0Tm1SUjYwaUlxOXBOR2gxZzJKMEdNWHFZUnQ0cHpVNTRlMjJXUjhnWjlPTV9XNkMyV2t0N29uWWZFcU1FNjR5cTZKamF3TDRzcHN4WFVBSTZ0LV9IY3JNZGd0Nm43Sl9ZVkgtWnJRZTEtN0NYUkJYcnF1cVF3VVctMkRmOUozaWcwcXR4VlFaRG1sZXdCbUZnZ3FXS1Z0OHgzQnl3d3RLWnRaai1saGJHTlNYTEpkSlIyTW1wSEY0YnhIWUxaanlITjlRb3JZOUxaNzBabFFBX2xSQ1BSTDdIYXZWZER6YVMyNXVhOW9iNWtNb2ZfcF9SZmpYNm8waVk0dUVUMTUxRGoySzBZMHlRb1J4UWs5dDhiNTJBdUNzUTA5NDVlU1pDY3lDNG9SN09uZHJiclJuWWtDTnVMdm5ZOUJYSHZjbkwweUJRQTZIUHRRM05qNllCUzktSHV5Y0dQNDJTY3pZNUJDQ1NnYTlxaFVtTDh3UUNhbEc1akZuZ3VDbU5mMmRCaTJWUnFucmNlWUVyaHJkWmxrMWF5UjZ0X2ZJOGc0emdzQ3NkTUswN3lJck9kbWZhZXBERzZ5ZTM5YWJyN21PdmJ4eEZBNjlINTFSUENfUDhOQ2pBRmpYVVp5UHdLOVNmQ1hLb0VwZVZVWlpRWWgwVFQxR0hJTy1WZGJoR0x1T2dDNGh4RS1jc3FHQ1hGS2xFMjV4dU5maS1uZFpaZzRNc0F4cVp5VTJpbm1sN19RdkhpaUkwVFB4eXZfdUtlSFItbGJ1eEw1RlAzY1Rpc182X2pteTE4T0pIT0hXaF92WExKdk1JT3BlU3o4Y0ZWeWRwMGpUbEVfMVRyR2xmQklIQmFKRnJJQkxfc1BXZEtJSUFDUUxUemZpUHdTSGZDR183V2c2U2I2MG1yTFhSc24zUDlLTGNkYVVoanVsOTZKbWJrTnZxM3JwUDJlUjJkWW9TYXhsTTZUNGVDRzVEREtlVFZFQXYtQ3J6SzZxWElzQmxEdDFGUnpEQ3lGLW9tSFRIMTRWZUJUcWxsNWl3dFpwSTkxMkIxUDNiYXNwLVVlSFdTSy1ZVmhBSVZXN0VBSE45UVhGMm1OVFhWYnozLWd2SlgtM29wMkhXWEtBMlctQ19PMWZTZWpyY3NhTjNGNThFd2h1UEpncVd4NFdsQkY1SDdjYk9JTzkxUkZ4OW1qcTB0SjFYaDF2UEo0OUJiTjhJeFRKOEZPSG9sRXFnclhiQ3FpZnF0X19kRUlON0JhS2Y0SE93a191T3lybWs0XzBkU1FCZ0ROWFdNNkQwQVVXbHJKdkxhaVhjVlhXOFRNX0ZwRVhEUVc0MzRvNGhmdi1zTkctWUE3Y2gtUFVET0pOR0JROFhjOHRvWmtfb19mdG9sUm9rS0Y0LTlOZHp6RVdDRjNnRzVBaEJzN3lsbUtldDhxNWJoZkgySWR6Ulphaml3eHFCV3IxdXloZDFXRG9sbXd3dFc4dU8yWlAyMkRsbFhPRXB0bERfUmF5bVpDQ291Vy1CbUprVFpJaGlOeDh4aTBubGhzNTQyZUt5eXAtQk1RdXl6YzB6c0pZVEJzN3I4QXVpeTlJM0hma1dnYVNoZ3huM0Jwdjh3NUJiTjZGSWozTVRvZDljaVVFVU9GckRlTThMVFBTa2ZOcm5hUEpSTS1sWEt1Mk1ER0w1VVV1VHdqOHYxc1AwaUFMSWpOYjFraXFvWGRyXzA4YzB6OEp5QS0yQ1U4LS02YndGNEZfZFdpbmd4elBoOGt1cVFhdlk4Zi1hWVFLWm1JYW9nUjFLT1dhR2M5V3Y4N0xPXzN5SkFqVUNGVFF0amhFdm9TbjViS2xRLWpwQjlFVzh6djJwUUFwSFJyV2ZCNFJlMTlTR1BNLkR1QmVad2xRamtvb0lfNXRvRFJQVVE"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '10608' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault4e00e7f.vault.azure.net/keys/restore?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/54248fddc148400a9df744075bbfe2e8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lsgBFBFSUvohGWs21xzMCFc1IRDfnH0UlZ8aJnqVozFkc9rZgaBdr5IOVmt41hxbJY2MWuJxGpS4xAZ8AmrQZ1MOmS7nUiMmorcyqZZIcZYz3P7YXLjiv-ncb9rTty7IJ2R9v111Beiq3tNdHUrQYUt1wiysQPcPk69FGq7h4B5UqDM4SHQqXF-Rm3R2fU9wct7bx3F2XqYcaMmQWZBiYMH8vbooZWyh2QziCXVB2MhfBt0gTfoLUGT4hheDyLfIgbhhky6Hi0DC-3Ecll3tlK6JHAR6V1jLxJveWPgUy2WgRMSTATWdlcYL_i9Ji9OT4dSLkCFqXWhRN8krxXf9dw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/6335121a5c4e43919f25f6688e470924","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zPfZm_2ZxRIlx2K1MjSGUuBBpyaJjU_gk2yp9T9Ow8bvac_t6RgXTmsdK-4x27G4h1XjY0QVXkuJwnNxrUbSwrrNsxJtaz-KyCpetoPLcAEp4-EbEF2w-Q5fAPB76ngr-RKlHUv6fww8rfWWRxKb-GmtmYAq_BsUG7Ci1ALoF3dIxKyEpqueY0TeWofWxUKpftXLyjAIcuBVRO5UVSUv1bSfLl1mzm5Wxl6pk6G_BtAi9cn6TS7DERSSEilg_Raz53fCXt5MaoFnDpT5oRIl5E2ZaxaLJ2KwLxoZERB4oZ2vPGgjr8MocaOGY66xwVKZQJKttZmDy-7pUKWMxoBG4w","e":"AQAB"},"attributes":{"enabled":true,"created":1564526988,"updated":1564526988,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '648' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '648' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:49:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault4e00e7f.vault.azure.net + - /keys/restore + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_crud_operations.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_crud_operations.yaml index 15050919b2c8..bd62679835e0 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_crud_operations.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_crud_operations.yaml @@ -4,620 +4,650 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault5416109f.vault.azure.net/keys/crud-ec-key/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:51 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:50:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-ec-key/create + - api-version=7.0 + - '' - request: - body: '{"attributes": {"enabled": true}, "tags": {"purpose": "unit test", "test - name": "CreateECKeyTest"}, "kty": "EC-HSM"}' + body: '{"kty": "EC-HSM", "attributes": {"enabled": true}, "tags": {"purpose": + "unit test", "test name": "CreateECKeyTest"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '116' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault5416109f.vault.azure.net/keys/crud-ec-key/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-ec-key/7e76b0fc24ca49de8d22b283874b4aa8","kty":"EC-HSM","key_ops":["sign","verify"],"crv":"P-256","x":"FDZyxw3F8gSsjKrFwIAxsZ7UFqXykyn9dhPZqUCZ2uw","y":"uwkjuEzOUxSMEh1gm35SysHWS9wrpCUObRu3bzy5eoE"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"purpose":"unit + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-ec-key/3f38336e9de04e7ea3a3ba86094fe0c0","kty":"EC-HSM","key_ops":["sign","verify"],"crv":"P-256","x":"KPH8P9UF3zj4Mb-E16WdJk2yE1v4RYMbbI3eraGUS0Y","y":"wXamLF3U4ekD8lKEixbJ1JNaveo_aWkvD6fllRvCAz8"},"attributes":{"enabled":true,"created":1564527027,"updated":1564527027,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"purpose":"unit test","test name":"CreateECKeyTest"}}' headers: - cache-control: - - no-cache - content-length: - - '435' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '435' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-ec-key/create + - api-version=7.0 + - '' - request: - body: '{"crv": "P-256", "kty": "EC"}' + body: '{"kty": "EC", "crv": "P-256"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '29' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault5416109f.vault.azure.net/keys/crud-P-256-ec-key/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-P-256-ec-key/ccf44a9e1f0a4f65b16196c5115e7580","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"Xp3Dh254KJvTKQEI-SEno4nr47Ste9Q0OozXC1mB3os","y":"jJ2D4Cm41HnPPyqeAtcPGUAOLX7e8B2dzBLz4-HpEiw"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-P-256-ec-key/1085fdf8d174406bb92d1c4dc73559f0","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"29pQuyVmhkbuizq-9M-ngz-H59dPnQ07GpzXpWolEVE","y":"b3owWVWqXekjdSKuf5RnuJqyGAtUQr8J5DxP1CQhG4o"},"attributes":{"enabled":true,"created":1564527027,"updated":1564527027,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '376' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '376' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-P-256-ec-key/create + - api-version=7.0 + - '' - request: - body: '{"key": {"n": "AKCRTQAjSsaDshtMFdW-2Ie9yVnC5Xr1Suc06PAHINd10nXkVSB-N4TO62ClCkZV3XKnqU0nHo7o95WaZpym53W_DiO62umRtFKdl4UotL2QUh0y3SZWeWuoK2u_x2aMj17rUFN0f9GZMZ0pqEQNCPRBLVJ_-TEe2nGCWSC0exxGsRqz6R1zFkB-icfzQPe4WjQELOUXQ7J9RxhAPTTHtDivYYG-BeTRHrmF04JT1_6b9T_C8bAC0i0teT-nmlBLarQtBJKATXBx1yegbPOoiTqlQrFQP4MrKWNxtnB9Tcbjcvj-Z9je0ckI_eRc4DvAhqcUh_p15Dqg4GeaoNIO_jU", - "q": "AMPcZrZBqbc82DO8Q5zTT8ZXRGWrW36KktMllaIk1W2RHnRiQiW0jBWmcCgqUcQNHa1LwumjyNqwx28QBS37BTvG7ULGUoio6LrOeoiBGEMj-U19sX6m37plEhj5Mak7j3OPPY_T9rohjTW5aGGg9YSwq4jdz0RrmBX00ofYOjI3", - "p": "ANHerI1o3dLB_VLVmZZVss8VZSYN5SaeQ_0qhfOSgOFwj__waCFmy2EG7l6l6f_Z-Y0L7Mn_LNov68lyWSFa2EuQUeVj4UoFHc5Di8ZUGiSsTwFM-XMtNuv8HmGgDYLL5BIJD3eTz71LdgW-Ez38OZH34b7VeG8zfeUDb8Hi30zz", - "key_ops": ["encrypt", "decrypt", "sign", "verify", "wrapKey", "unwrapKey"], - "kty": "RSA", "dq": "AKC9TAo9n2RDaggjdLXK8kiLrBVoaWFTpqXkzYXRhtsx4vWPAkxhfSnze05rVMl6HiXv7FnE0f0wYawzUJzoyuXBH0zS6D9BqCZPeF543AmWB27iPf38Q9Z8Rjr6oBgMSnGDV_mm8nDVQkeaDyE4cOZh-5UKvKShTKKQVwunmDNH", - "e": "AQAB", "dp": "AMmhWb5yZcu6vJr8xJZ-t0_likxJRUMZAtEULaWZt2DgODj4y9JrZDJP6mvckzhQP0WXk2NuWbU2HR5pUeCN2wieG1B76VKoH76vfnaJDqT1NuJVBcP2SLHog3ffwZtMME5zjfygchG3kihqOSpwTQ9ETAqAJTkRC38fEhwAz_Cp", + body: '{"key": {"kty": "RSA", "key_ops": ["encrypt", "decrypt", "sign", "verify", + "wrapKey", "unwrapKey"], "n": "AKCRTQAjSsaDshtMFdW-2Ie9yVnC5Xr1Suc06PAHINd10nXkVSB-N4TO62ClCkZV3XKnqU0nHo7o95WaZpym53W_DiO62umRtFKdl4UotL2QUh0y3SZWeWuoK2u_x2aMj17rUFN0f9GZMZ0pqEQNCPRBLVJ_-TEe2nGCWSC0exxGsRqz6R1zFkB-icfzQPe4WjQELOUXQ7J9RxhAPTTHtDivYYG-BeTRHrmF04JT1_6b9T_C8bAC0i0teT-nmlBLarQtBJKATXBx1yegbPOoiTqlQrFQP4MrKWNxtnB9Tcbjcvj-Z9je0ckI_eRc4DvAhqcUh_p15Dqg4GeaoNIO_jU", + "e": "AQAB", "d": "Ynx9JGaBSP4iUsf6ZJ6opantRNdcdmzaQrKbZg6ZQE8Ohi1FYabJWvaoPSE-CiJEsDzShXZHMhUHN4X7Bn8BXaGQhK3p9HXgiwQKmix7oAJTu4ElUIyd8UC3UWHSZr40el4PaQD-HYu_eMzCXus34MnRiNbh_BUWm6T-Eidhk9d3kNIyaSi9YNDQHW6tjWrEhhq63O7JU1j9ZonFChZxpKk20jdkQKQURVAdpOdL-5j4I70ZxFuU6wHZj8DS8oRQfwGOvZKbgYDb5jgf3UNL_7eACqq92XPVX56vm7iKbqeyjCqAIx5y3hrSRIJtZlWCwjYnYQGd4unxDLi8wmJWSQ", + "dp": "AMmhWb5yZcu6vJr8xJZ-t0_likxJRUMZAtEULaWZt2DgODj4y9JrZDJP6mvckzhQP0WXk2NuWbU2HR5pUeCN2wieG1B76VKoH76vfnaJDqT1NuJVBcP2SLHog3ffwZtMME5zjfygchG3kihqOSpwTQ9ETAqAJTkRC38fEhwAz_Cp", + "dq": "AKC9TAo9n2RDaggjdLXK8kiLrBVoaWFTpqXkzYXRhtsx4vWPAkxhfSnze05rVMl6HiXv7FnE0f0wYawzUJzoyuXBH0zS6D9BqCZPeF543AmWB27iPf38Q9Z8Rjr6oBgMSnGDV_mm8nDVQkeaDyE4cOZh-5UKvKShTKKQVwunmDNH", "qi": "AJ_nrkLpK8BPzVeARkvSHQyKwMWZ-a8CD95qsKfn0dOZAvXY-2xhQYTEwbED-0bpTNEKbIpA-ZkaHygmnzJkNbbFAnb9pkkzU8ZQqDP3JNgMfVIroWx58Oth9nJza2j7i-MkPRCUPEq3Ao0J52z7WJIiLji8TTVYW_NaiM1oxzsH", - "d": "Ynx9JGaBSP4iUsf6ZJ6opantRNdcdmzaQrKbZg6ZQE8Ohi1FYabJWvaoPSE-CiJEsDzShXZHMhUHN4X7Bn8BXaGQhK3p9HXgiwQKmix7oAJTu4ElUIyd8UC3UWHSZr40el4PaQD-HYu_eMzCXus34MnRiNbh_BUWm6T-Eidhk9d3kNIyaSi9YNDQHW6tjWrEhhq63O7JU1j9ZonFChZxpKk20jdkQKQURVAdpOdL-5j4I70ZxFuU6wHZj8DS8oRQfwGOvZKbgYDb5jgf3UNL_7eACqq92XPVX56vm7iKbqeyjCqAIx5y3hrSRIJtZlWCwjYnYQGd4unxDLi8wmJWSQ"}}' + "p": "ANHerI1o3dLB_VLVmZZVss8VZSYN5SaeQ_0qhfOSgOFwj__waCFmy2EG7l6l6f_Z-Y0L7Mn_LNov68lyWSFa2EuQUeVj4UoFHc5Di8ZUGiSsTwFM-XMtNuv8HmGgDYLL5BIJD3eTz71LdgW-Ez38OZH34b7VeG8zfeUDb8Hi30zz", + "q": "AMPcZrZBqbc82DO8Q5zTT8ZXRGWrW36KktMllaIk1W2RHnRiQiW0jBWmcCgqUcQNHa1LwumjyNqwx28QBS37BTvG7ULGUoio6LrOeoiBGEMj-U19sX6m37plEhj5Mak7j3OPPY_T9rohjTW5aGGg9YSwq4jdz0RrmBX00ofYOjI3"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '1724' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5416109f.vault.azure.net/keys/import-test-key?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/import-test-key/7123c497acc9445cb23e076358438cbe","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"AKCRTQAjSsaDshtMFdW-2Ie9yVnC5Xr1Suc06PAHINd10nXkVSB-N4TO62ClCkZV3XKnqU0nHo7o95WaZpym53W_DiO62umRtFKdl4UotL2QUh0y3SZWeWuoK2u_x2aMj17rUFN0f9GZMZ0pqEQNCPRBLVJ_-TEe2nGCWSC0exxGsRqz6R1zFkB-icfzQPe4WjQELOUXQ7J9RxhAPTTHtDivYYG-BeTRHrmF04JT1_6b9T_C8bAC0i0teT-nmlBLarQtBJKATXBx1yegbPOoiTqlQrFQP4MrKWNxtnB9Tcbjcvj-Z9je0ckI_eRc4DvAhqcUh_p15Dqg4GeaoNIO_jU","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/import-test-key/42143a5692c24ebb9e9b3a5e951aead6","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"AKCRTQAjSsaDshtMFdW-2Ie9yVnC5Xr1Suc06PAHINd10nXkVSB-N4TO62ClCkZV3XKnqU0nHo7o95WaZpym53W_DiO62umRtFKdl4UotL2QUh0y3SZWeWuoK2u_x2aMj17rUFN0f9GZMZ0pqEQNCPRBLVJ_-TEe2nGCWSC0exxGsRqz6R1zFkB-icfzQPe4WjQELOUXQ7J9RxhAPTTHtDivYYG-BeTRHrmF04JT1_6b9T_C8bAC0i0teT-nmlBLarQtBJKATXBx1yegbPOoiTqlQrFQP4MrKWNxtnB9Tcbjcvj-Z9je0ckI_eRc4DvAhqcUh_p15Dqg4GeaoNIO_jU","e":"AQAB"},"attributes":{"enabled":true,"created":1564527027,"updated":1564527027,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '664' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '664' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/import-test-key + - api-version=7.0 + - '' - request: - body: '{"tags": {"test name ": "CreateRSAKeyTest", "purpose": "unit test"}, "key_ops": - ["encrypt", "decrypt", "sign", "verify", "wrapKey", "unwrapKey"], "kty": "RSA", - "key_size": 2048}' + body: '{"kty": "RSA", "key_size": 2048, "key_ops": ["encrypt", "decrypt", "sign", + "verify", "wrapKey", "unwrapKey"], "tags": {"purpose": "unit test", "test name + ": "CreateRSAKeyTest"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '177' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"test - name ":"CreateRSAKeyTest","purpose":"unit test"}}' - headers: - cache-control: - - no-cache - content-length: - - '723' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527028,"updated":1564527028,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"purpose":"unit + test","test name ":"CreateRSAKeyTest"}}' + headers: + cache-control: no-cache + content-length: '723' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-rsa-key/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123?api-version=7.0 + uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"test - name ":"CreateRSAKeyTest","purpose":"unit test"}}' - headers: - cache-control: - - no-cache - content-length: - - '723' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527028,"updated":1564527028,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"purpose":"unit + test","test name ":"CreateRSAKeyTest"}}' + headers: + cache-control: no-cache + content-length: '723' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"test - name ":"CreateRSAKeyTest","purpose":"unit test"}}' - headers: - cache-control: - - no-cache - content-length: - - '723' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527028,"updated":1564527028,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"purpose":"unit + test","test name ":"CreateRSAKeyTest"}}' + headers: + cache-control: no-cache + content-length: '723' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-rsa-key/ + - api-version=7.0 + - '' - request: body: '{"attributes": {"exp": 2524723200}, "tags": {"foo": "updated tag"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '67' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PATCH uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703473,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527028,"updated":1564527029,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '706' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '706' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-rsa-key/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703473,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1564527029,"scheduledPurgeDate":1572303029,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527028,"updated":1564527029,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '841' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '841' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-rsa-key + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: crud-rsa-key"}}' headers: - cache-control: - - no-cache - content-length: - - '80' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '80' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: crud-rsa-key"}}' + headers: + cache-control: no-cache + content-length: '80' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:32 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703473,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: crud-rsa-key"}}' + headers: + cache-control: no-cache + content-length: '80' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:35 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: crud-rsa-key"}}' + headers: + cache-control: no-cache + content-length: '80' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:38 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: crud-rsa-key"}}' + headers: + cache-control: no-cache + content-length: '80' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 + response: + body: + string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1564527029,"scheduledPurgeDate":1572303029,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527028,"updated":1564527029,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '841' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:57 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '841' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703473,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1564527029,"scheduledPurgeDate":1572303029,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527028,"updated":1564527029,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '841' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:57 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '841' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_list.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_list.yaml index 51c87bd8cbb5..b32c1b43787b 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_list.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_list.yaml @@ -4,464 +4,374 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key0/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:51:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key0/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key0/c3878937d48c43329f222ec5d2b76c1e","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lJIfl9xtZMQVY21_qGFK5QXeCbwhavw_7CUAht9SAK_gIEG4AI4NIOeOi3dS0QdJTYfPUrcpySR7Bk3T87AqqBh-CKkWKIZ3nhYL6PAyycCddK4M4NWaQcwrjhi14AXZJi1qmokZIs92yvrXWy9oUh2QjatpCkL1EWtZph7UGHhWda4qU48-rL-e8BwN1LglFlR-fFTc6N_tfQHgdN0hQaM4YELOx9le2unTtPuR5acj_JTGBZwvttERTF5PBupYd3h3VbfTTecXG1EPsUelLHMRc1EaAw0q5vjwdbaLwDXfyvFEypkn8iEH_5CdYSFV0oPtwEpGi7yF4WThT6U4DQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703472,"updated":1562703472,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key0/f69e28d9f4324473b5bd0975bef0b17f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r5KgC3SObkSXF1aWoNtdHkM9ht3YC6Hte6-DtL8A7B0XnOJWBt6GThkjd9rmrYcLE0MXjs-oskYY0Iir6cyQapZ3HEOi_zlOU09e7dk1piADk838EImb46UZxbnDtoCRlMX87JMRWFmEqKvUvkLjEf64IvN7QAleRJdwFx79CJ_qRhZbvVTd7ZD8vt5PFTccwDb_wM4TQdPnanEGHQZFFmB75faNZefnNRbROMwgUkFHSJu4Ono8nW-LsmLZlQKEZO5JiI69wA8VjgsLQXi1ION_ujDuFp5ojMG7YlD8G_njTGjHvdmhIqZmJSumNlGEPB1k4B2O281-l-hBK6A3wQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527109,"updated":1564527109,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key1/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key1/b023d80926a5491abbdd63338ffc168b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tXG3Izs9RyCg-553a9N_Yz4N3H0AQEftAK4HNfmAM1JeEEci-F2ByaSeTs4R3jQYuQpJE1iY2YcQUop_ojFfy11CwUZnBR-wWYLj634VxuARoTDEFJTsWBACToK_D9IAsyphscqcmz3vBAnCkpnqd-Yc0UxBpLOBbv-RZfH-uuSm5xX33bU68h5ry1YDoxDK_3GEZg39SxjQu7j6T9nZmnfT1do_Ccny8TBAsViJJZga5SsjPAOwjSSw2-4ZIz2bvu65gWdck17IBulXTdatjpvdOOYoXudAHR3ZduDDkns6Id2gXuy4CHqwGCgKXpVaWd6C50w01JjGAFXuAS-TWw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key1/7abf970d281f4eb98e3f870688da9f89","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tkecVG8HJoW1QSh1DkZPm2op8q6Cvc6-0CpQjaobDBeJNSwbj_c-9Z8mEmIrGH-Inq89iSKvVXcvCOP7uiIkjOKFFzFpHc9ItdQqImNmDyLFlp8UBRyR8VTMxYiCq04i80www8Js1ALsp9Nup-2uVCrq-9z2pWUV8-QQO-1bgQJeUYkWHOsdv1uMkPBfLNNkFTSlSiAtHipNh2NtYi_OnkOofvrDFF4gX5ULllA4v17mZQspfeDU4llIJmEZNvTQXPLwQixX4hjBwXdH-7yGrEGPA_ZXPBl9ljkz0VjwJLZ294HEcLFfBcB66ePZ6rtRiMFZ345dGZKs4W38IMap8w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527109,"updated":1564527109,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key1/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key2/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key2/37574dac891145798031bdc16ae59c2c","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sG0yoon1QqM_RKNd0MAN2qmvjwSXCQ581sbogwBCNGcxX6CH2oRubUqVeQr4Nm__NGmjD4mikbKkkpxzaf9rd0-YCRpKRUL0ATCuhfIj8u0acP7uUPBrJXyqSsOUze0jvRCCCV9s3_QtqsLIxbID9uZuIu8xcJ5zkdYhtVWd2U9_601XWlboeWhWiTIMggsf5wj9PnTVYgM1tN4TY0AuFYjgb6FJD9MbJ92Y5bCDRH4Lpxze3bgskArHjOfZTVUjPd5_sCyi2a48Ky8u5N2uqEgv8OaNLML3JAeoSz07k7mg3hLnlDdldIgR0vdJPeW8MiwN1WkC2w35eRu4JGHXsQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key2/dcab406fd2b14132b97afa7241f0cdcd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"pnYNev0ZqxpCrih-DOzgA0RRXfCPF4fS2DmFWitUvpYR8PmqEzg23NSkh5lsFtQDj0zIcE_hrbrf91ZXbXTi10bBjO7SystNXHplIiQOXKYPx5J7od8ADLLZwJMGCY-FLc2zGUHAWHRJlB0oYSKOxXREwziT0qOyIhubwUXR2hDOxE4GuAeQCMgaU_HyHG42RVWoWis2Wgg26miJTzdfs9LLzrqbsvUfFSG5skFq5SltyHyzeLVzBjIvxKoMt-R_8RacsbUXc85sJfMBym4V4FRH7xkgQMc_3_TmRvBbO7fS-QzD6V7Mfdv8bv1y4398LYVHQMtdomjJrylohwUlpw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key2/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key3/90b5aac48baa474f9c13e295e3d593fe","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"y2AJUotY9EXCjtEq815wHGDerpkwIFgMRW-5vpt8RIhScsPc7-GK4Cog62_JwtRSduqJtEw3NWL6icZ8i-5HmRTfN-uDr7xt0iVs3sDVArc-osPBan07LTgiMPMyw_qlmwvzrdkl2LmSvipNZymHGcg-kUh7_7ZQS_ZxCAUNu9eA1zmjENAux3svJLl1ISXoVk9OwRXYeU7WdN82s8_GbkeAG6js-mazlO99z7iAM2eLKWV6rGqZgouBMfr3POBPhg895vgHDpCIX_1QQzGVwJld2mzuC81_dSDc6eTbQKEgf0Sr1-P8ywXo23DR76fYC7pzILh-LuFLnf-NbnmBpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key3/ff3f5ac04b114bcb8d398abd238d900d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"uefbUngKT-RjMND2guq1DLRxUHBjJYNnWdYWd58Y6xodyu2aup8wQysPurgdYMQiNQI58JPo-7dlVgAi__63cZ357df1SzQOGx2erne-RJ5MzmxnB3W-Dg5d_w8Fv7wwbnkoZx8QUi54geI1Gp0o9qratTjNLjnbEFBNZ74E9NiMT63Ps_KU4-2l5HAQPXoXpehFfY4buvsVLNBIno_kBqrqAh1tSPTE7OT-uidwtxdFZAxtL_abz5XSR0sLwRmdrmDvqlaGWTniAWUD_l3imisOYj1I3bhshCwKlge3BJ6m706fgP7LGrTmtIZBJYBBNBsG9BrAskWyBYFDwCLzCw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key4/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key4/897d30c8c9a64c5baf42ddc28cc323a2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"nBnwU-Tc_DQd5xt8pxaNa1jJytxCM6nXf0TLMG-K7fURjW8FuYpaUdLEkK8PXGzxrUdJVgR-9tRLjbDgYdqxa0RG4-jHy6Rwbm3XO7gUUoQrQzlDot7HBEvrjldOKfu-evN510V-ZrH1ABJ717cm2CPtmhyW7WQ_jGxmvFq-sWwhWOUfC6UpV7AnYyBkq_fAn9vnbPRH7dXoMf1G5lCtJ5uoAlt8ys9Vr6Bq1tkf3U2JW9-SnWwfb51dZjbRkKCVuqIVm90Ik7qnUoV-r32Ehdo1t-VbKpiTfyOdhxclV8fbgCQ2NO0P1oWoC6wDEs8ut_JaX-1V6NuiocpvmSt4Tw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key4/1783678540a949af87bb325dc25ca8a7","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"td-f0a_KPz3Koohs9dhl2kZuH9ZJa9xXhZrugBZBsOrTb6TbJuP1YcPSaKpseA_edeR-jT0gdm503PcKMskF5KQCtr5v90zOnpYWafJ_8Q16m7h9DjfChFkDxxIVvi68YMYwT-R0eL2Cr-9j5rotjqPp2wPBRFQ8hcH2FY4aJMvZ5CqTCI9Ci_S0DB26G2IbianCAYhn7_KHvZCnOFaP42UpqS5DDMnq1KJtIjImuAhOsmHtm6RvjUR9MPD4B9LxydnP0lzBhkzPXo9vnR8NeJjhGgALFyDB-09w7XzcroPDtq1--SmUpF9GqiXBoJnOa7TlQnCc7dphqGCTnPJtqQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key4/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key5/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key5/689d4f8f09004d8aab516b94aca67d00","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"67VK0tZg5Ui7KAtcdVy4I4Y-IHca4jl966D8DWcj8ZEovCAGIWlQvFSlVRvFeEqrmoVD3zSeO5yXOQwKRzDI3rrKmc2a4b_so2cuCqxtP6OuMbiCzTS5vV57UpkqIDuN1IuyKjFnS9T_ZLAQE9y_4SLRXM9vUzzC0tCaOR924WJ-mEIfKtUlab6IytrcUHLdJi5kkO-882I-HptJfjzoyGAvHTmJIDuQWgMuMAkQP1-5ZG8V3pEinuj8FtLKcfmI8RGixEEAvTxO5FAre1aEeta2EdbsdIVTi85xXOcPu5LrWdo0URY400ytWN5yQvSDsCOEqO5Apdhk5elgl6trTw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key5/4ff953ee148d4cd8816f3dfbcade0691","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1ApBVUvnMDvdH_yGJfdTzMZmtwLm2k7tg_2IVywj5ZvxxTiZ5aTTCiwuVXjXzqMdGAcj3hmrAC7m0kr8gLSAXye5Tq-5oofu-48jZ91SzY9bWfi5Ss1NpaWTJ0RIe7bEvcjdYQprz1A5FIr_B7IaHYdhbkXz3qzf96gLq8elRBeSDev1NC4bFz0CkWKOeXZF3vTOsHo38q9Ne9XZMW_hEb0ln4ZCADsVV20pLZ4IZmsRIUuwwEaSAkaPzpJYOsGc3Oh_qRXr-hMRkdZv7dPYsZ1LfdeuIb9slHgBEza5OBb9NGOhNFMfk3Kyiez4rHdlk3JF7fPIvkt9St-7lnHJbQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527111,"updated":1564527111,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key5/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key6/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key6/a1f7acfaafc34a6495a429c6aed2eadf","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"l0gxdJyCn-voQuNg_2bqrlOXgnQStVxXHDYdvBdOlZpoq2BzzvvC73MoPcldBuI5ySRiF8B1nx82yXQKnEabXpXWvvl70Ye36l7YrDrg_Dhq38MU4Uv7i_rdqdBQPG4tr6cBz0BWR5yHqGy4LL7dcWhLtyUH3-wbC74zj2KqjCGIx3AfadEwkR8HIjCGmLhbtaUbCEU5PoHrIfLOFt1u4Ah2NripLqv54n75PeJSXaRffSzQJOU6qC4eOnHcEbP85w9SsnSlOZp4gvjqN9JvwWaoy7E20anft6zt7tjFLG_inkASqUU8QcrN9SwBkV_saE4WAWcd31-6dBpeGY9Jww","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key6/3863898fb4ea4c8ca57c47785d614ba5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"x3Hyl5Sqttjt1gg_OK1g1ghjqGiDUrUpKkq5k7hiBs9KkYK5sSvKQCalGHWStOE2YUB5tt056_PYbXIG3KO_z58BNXy3yneEiqZxAWyPKDyvQcuyPj_zqXdDDMVuBe1mrIXTU5kgyQ3JgWB69PE6ALtAY6BnFz5vx97yLdgnebHzv486Ti23VdusiDagnLkY8_chGtcZZ-9VE8OSOrNH1zk46wxDP7gERk2O64nT_EKViMBn9vWTJs093v7SIrWrJKUXL8RGMPW5jJ1uCgdBDOPz5pWz1Wl6VLcqHfUsVjgKrU9QffxugIMeFpx9vSFUOVeKiI__iRHUTE0Y_T35Ow","e":"AQAB"},"attributes":{"enabled":true,"created":1564527111,"updated":1564527111,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key6/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb4dd0c0a.vault.azure.net/keys?api-version=7.0&maxresults=7 + uri: https://vaultb4dd0c0a.vault.azure.net/keys?maxresults=7&api-version=7.0 response: body: - string: '{"value":[{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key0","attributes":{"enabled":true,"created":1562703472,"updated":1562703472,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key1","attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key2","attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key3","attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key4","attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key5","attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key6","attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}],"nextLink":null}' + string: '{"value":[{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key0","attributes":{"enabled":true,"created":1564527109,"updated":1564527109,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key1","attributes":{"enabled":true,"created":1564527109,"updated":1564527109,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key2","attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key3","attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key4","attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key5","attributes":{"enabled":true,"created":1564527111,"updated":1564527111,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key6","attributes":{"enabled":true,"created":1564527111,"updated":1564527111,"recoveryLevel":"Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '1133' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '1133' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:51 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys + - maxresults=7&api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_wrap_and_unwrap.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_wrap_and_unwrap.yaml index f4b7259e3499..d8b5e54d09b3 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_wrap_and_unwrap.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_wrap_and_unwrap.yaml @@ -4,312 +4,252 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"ny6wNPsxof_QVouEvyn1dKEiKG8hArgSRJzUhtQKuA9A5Nij2CxUdqgezqmm4CAqyj9sBuQqIHI_BO1RKq7Jea1BzfbWmce40hhPqa1RLDG8Kb_LrYRz3GavBXCl9QR_lzn5DQYawzLCQFKvt4lXOJVhSOAiGmAayV2axTNxCM---8pwfztqf6g4dc7cUEIiLc0ZtnzcqwmgBuLu2ysrEkVRvhRY517fp5M17OLQDmIx75f9y2Nc8t_w4ZsWhIZKiUJBDfNKcBxN08Nljnowhc2CwemQ5aZLQCPZiibsOMVIi9FufjBOTBxnD2MSoaGrIuEDrLv1Y1UEK1wHE_MFuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"kUy_5eJ-0LXYETECBi2NIkf184IoLXhY30v3XFmJYSyy4roFaUr-0CQNtZ-Rztee5M1LNJpROZ4uSZjSZgabLj-IGpO27NLc8_jw1tR956bLlphc2D4jPPq9AXEDotXGAjAop8FXUCyDYmAStaEu0VZWK66S9N1mFTRG46aiy4F4sj_68ZeMQDlbzrR6aH7zq-1FEuSiQGAVMkMGS4CCoXAWm68WexBui0_CgJbcd5z-050qEBkGVvWXYkAA_uko9hsQNNCCh7-pGW4hwavS-T8s2g95UOiYlDSJwzLUqSfw_mNWjr490gtP76OaHyT3DB5JGGeHFWLsGdJhW10rvQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527149,"updated":1564527149,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096/create + - api-version=7.0 + - '' - request: body: '{"alg": "RSA-OAEP", "value": "NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '299' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/wrapkey?api-version=7.0 response: body: - string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db","value":"IQvJgnnmWgtVoYpCoo_iIDfVfgYpJSe6IA-XUdpXgkQYwjzvvtQANNJtDQY3jhbWiMV71oy6uVFmDD9ey5erJrEJHpKMEivQ0FZ6H566SFd8srhiV_x3trpoFxvXgOe6osF7YCzS-DMP7GHYVRRIDf-VldIbldpS-OL7jn6ZW3SSdmKrTfHEpOyXK_78c91VVpDbf0j8QCaj_bzNWs1Xtpgxut1f0V-Yof2fX2nh7DGauR0Vk1ryopjyciU3YAozxT7CSTPalCr-EPqY48RvCCEIMf1htLaTq20mCUHVinVOSpE-cEzF2WUdmMzZXa6zvb1Ls59lO8ZhKHUSFSuVjg"}' + string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b","value":"RC2-jG4FsccE0rV8izEDzvoxLovaDxdMek6YJHMW3MOvTy3LSm9FihBTo-XLZz4pdS7XZ7VvHVNpEbcKXRuSeCyViVt6Umv_7XOx9TkMUmmhFxgsBcPY52K4r_4W6LyYWpG6y3yN07Mj9u8HHWuf-2H-SOPykAEFd6xWteMFtGSU-RKLXHI0Xb-YdixlxUU4twfcp3uDuRMgs0NT3d4VZVi8o44YCPtMiVG1NplWKepWkTb4l_rphclayQ062Ln5o-1fWAIUhnyfYY4HzHdFh75ELkkQGi8ZeI6-rL6o-WtQrsSAyBLpS3ioytuaPazyTHeAMN69YVUJz01cc9IETg"}' headers: - cache-control: - - no-cache - content-length: - - '454' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '454' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096//wrapkey + - api-version=7.0 + - '' - request: - body: '{"alg": "RSA-OAEP", "value": "IQvJgnnmWgtVoYpCoo_iIDfVfgYpJSe6IA-XUdpXgkQYwjzvvtQANNJtDQY3jhbWiMV71oy6uVFmDD9ey5erJrEJHpKMEivQ0FZ6H566SFd8srhiV_x3trpoFxvXgOe6osF7YCzS-DMP7GHYVRRIDf-VldIbldpS-OL7jn6ZW3SSdmKrTfHEpOyXK_78c91VVpDbf0j8QCaj_bzNWs1Xtpgxut1f0V-Yof2fX2nh7DGauR0Vk1ryopjyciU3YAozxT7CSTPalCr-EPqY48RvCCEIMf1htLaTq20mCUHVinVOSpE-cEzF2WUdmMzZXa6zvb1Ls59lO8ZhKHUSFSuVjg"}' + body: '{"alg": "RSA-OAEP", "value": "RC2-jG4FsccE0rV8izEDzvoxLovaDxdMek6YJHMW3MOvTy3LSm9FihBTo-XLZz4pdS7XZ7VvHVNpEbcKXRuSeCyViVt6Umv_7XOx9TkMUmmhFxgsBcPY52K4r_4W6LyYWpG6y3yN07Mj9u8HHWuf-2H-SOPykAEFd6xWteMFtGSU-RKLXHI0Xb-YdixlxUU4twfcp3uDuRMgs0NT3d4VZVi8o44YCPtMiVG1NplWKepWkTb4l_rphclayQ062Ln5o-1fWAIUhnyfYY4HzHdFh75ELkkQGi8ZeI6-rL6o-WtQrsSAyBLpS3ioytuaPazyTHeAMN69YVUJz01cc9IETg"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '374' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/unwrapkey?api-version=7.0 response: body: - string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db","value":"NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' + string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b","value":"NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' headers: - cache-control: - - no-cache - content-length: - - '379' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '379' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096//unwrapkey + - api-version=7.0 + - '' - request: body: '{"alg": "RSA-OAEP", "value": "NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '299' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db/wrapkey?api-version=7.0 + uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b/wrapkey?api-version=7.0 response: body: - string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db","value":"Vxzu0xm5GG276Yj9qMpc_EBbTPPlv0wuH43zSp75370UohLnX-QimTYjncIpJtcFaXDmJb2_USJUbt5GBHaBpy8MAdQWwskj4eUWLtK3b53CO3lg8aoFETRbNQqAoTp3tqihmMFhNTxTXcm5bU7e3s0VdzQ8U8_J6vAmipB6IGe-T7xDWO288DoZbubPlSylnuUu5rdfZSpzoQ-UxD77uyqpS7ll0_SpOJ8DrcrsesaCDkVDuzcCDQ5lfvh7ptdJf68faiSGIJQ_0LW7jUwv4aJzN5xf9TD27WEg9XCe6grH5x6GA38E8Yc5CsCbMlAjD_dTUyjOAFqaYUV5QdMJvw"}' + string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b","value":"X768DS_JoGXi8mHl_PTmWnjSOkA5qvrlDQzvebrWTCBgHQiMuRXsyFqpS3urvodJcpatIjfqbGPaG-50d5J-BlUtvevA8a5vFVNjrmjqN1jR4PHvIEnA3Y4m940Mq0Z4-ESgCIMw12trkZfN3U0j3X9HggJNJkolepRCcF7wnn0CoK7Yqt3rMSR6aMg-gMJINApJ22jhlRz8omsI--bJEXjObz-cR041NMY8bxIm_R5s6Hxi9XId-jAMpedmuQchhliOSlIqbs0jidn-5wUCpCTKOao5lVXVN2kqmsvICWxLj15HwcRuCoi_2ciMRjcCnhrqHcQEUH-L-jKrkoI79w"}' headers: - cache-control: - - no-cache - content-length: - - '454' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '454' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b/wrapkey + - api-version=7.0 + - '' - request: - body: '{"alg": "RSA-OAEP", "value": "Vxzu0xm5GG276Yj9qMpc_EBbTPPlv0wuH43zSp75370UohLnX-QimTYjncIpJtcFaXDmJb2_USJUbt5GBHaBpy8MAdQWwskj4eUWLtK3b53CO3lg8aoFETRbNQqAoTp3tqihmMFhNTxTXcm5bU7e3s0VdzQ8U8_J6vAmipB6IGe-T7xDWO288DoZbubPlSylnuUu5rdfZSpzoQ-UxD77uyqpS7ll0_SpOJ8DrcrsesaCDkVDuzcCDQ5lfvh7ptdJf68faiSGIJQ_0LW7jUwv4aJzN5xf9TD27WEg9XCe6grH5x6GA38E8Yc5CsCbMlAjD_dTUyjOAFqaYUV5QdMJvw"}' + body: '{"alg": "RSA-OAEP", "value": "X768DS_JoGXi8mHl_PTmWnjSOkA5qvrlDQzvebrWTCBgHQiMuRXsyFqpS3urvodJcpatIjfqbGPaG-50d5J-BlUtvevA8a5vFVNjrmjqN1jR4PHvIEnA3Y4m940Mq0Z4-ESgCIMw12trkZfN3U0j3X9HggJNJkolepRCcF7wnn0CoK7Yqt3rMSR6aMg-gMJINApJ22jhlRz8omsI--bJEXjObz-cR041NMY8bxIm_R5s6Hxi9XId-jAMpedmuQchhliOSlIqbs0jidn-5wUCpCTKOao5lVXVN2kqmsvICWxLj15HwcRuCoi_2ciMRjcCnhrqHcQEUH-L-jKrkoI79w"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '374' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db/unwrapkey?api-version=7.0 + uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b/unwrapkey?api-version=7.0 response: body: - string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db","value":"NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' + string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b","value":"NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' headers: - cache-control: - - no-cache - content-length: - - '379' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '379' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b/unwrapkey + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_deleted_keys.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_deleted_keys.yaml index 235cb77d07bd..c59b3ce7c6e0 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_deleted_keys.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_deleted_keys.yaml @@ -4,706 +4,678 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:53:13 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/a724cd7584454a3cbe29f3a05d7eef10","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"nC7idSUXK32dkqtn8M-4UB3JoMvCGygFa1TlYH0nQQUvYGn7aNp5t1vtJFqq2Jlafl5pZhdHTumt-R-Plewno2zO3iyjza1MOTdeK8FJEHPpK7I7FNH01KdYnU5Q0xY95L8tbXUcQAYW7ankxMIeKxqrokt7flCGUQeXDwOalJIyQyFvdUe4buytdGHTMFV7lgHIQx4mvekZi3yzuWgyDiuohRd8Krb0lo6suUYOIetzbcXMWqrSRmQdEO_vvptApgSOwxPrqx7OkcNsrcgJkrXQzd6xjgho57GQ6u_TxmGB7uW3LBTKnwqgWOfmELKVCH5laRfjmZk2S-Fwc1tXyQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/f96ace71d4b941eca3ae0490e503d288","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"28DloB07w40yR2-_MHpdg-prfQ_xseRn-d10ZMoZg5jZaU1prixa2ZCWOtLXPVMsFU-fNOb4QtZJ3fJbJTVU-h-tPzKsixRwVljpiAwLw2wlRExZWUbQETs6Rd8B4q_GKJZpiHzO2-NLk61PJJyLoQ1iKA0SOIAtZMROAHx5CHuEc6wsuIsGEDpwdjncXH6-REvllgkOQ_SpfeiERvMlaAoFPceg4bi6SVE47xDGl0J1yEAaXiCba49o_jhO4SQ2fh2nYR-2sN5ZlgYFFVyPfp1PyvzL-NQLNp5KXwuQQY0-GNsXz-PWZMGstAqSRWjR76vWx5-lB0ohA7JwM_VCuw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527194,"updated":1564527194,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:14 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/4c4f6f8faf7b48a7bef7972fb705379d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"k8Ow-6LTG9ELTNRnQC3MqQncYGqmUY-6EgNnX1Ed5Q_SM8hJUl7dBtb8gVn0qc3KFy6Q32gBgveziuCaEaMK_wN48RCLmRLCuFsXmnHsHDdxMzEv2YL_dV0RrpcW0O0m-bgAt6z5aOOY4Pwa5EOBTyqNS5H56Rp9mm7MQijt1mcWRwOUHIRteZWpjQ2DPoSu20bufIldM97wdC7dZd38q5NFDY9W7TCNLTD__MEl-ySmkVRIEPaMpcObNtRPiB6kadylcgBsoAAR871Wzb1tdRiQkpyEko5of_9iAdZEbUY0XiG_zJpdFxfvy9rds3fXfXhSppolt-CC20IHfyjEqQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/dca838942cc249aba2f9d052ee4d9bd0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2azn8ADVPwbppZCfxsCvr_XKqCeA49ZRxxyuIUC-_Cue-13fIKGkHqFqbJVdJuPftJxsh1MmrUVcfUGMPsTFdUBCVfpuiFXEXSe9exEudUAZNmBYb3HiCbbu3ThWw2Z5-OioKDwf-qKA_H_vooI9YP-yYEDhJcfvjsiyxzBNGoLBld6yiPi3PhCw9kqvEHUYnS-XPgTqhJChf7g4oYRT-XMVPhR8nkbQ-NQ_IQjjZzxkhkpltWfEYX_KL0-Uy4x3kz2ykPtQXRpeZuaD2PpuRXIt5ssqTC4segtWiyzCKhp4H9A8pVbJKd_9fnSArsfNQXY0e5bJac6ZhJJd_ES2XQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:14 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/5c71fbc7997e4fe2b2aff141a6886d11","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"nPBVYE_5WfYi6r0Z_rnhhYuBQe_qy67NeGm6dAJCSFT_4Mc2iitb5cJmEJO_0cUxMaiSWatpHzGYTzQ_c51yKjpW0CNX08FZi4ZO0JsZVUnUUL8gYjEK9VNNaeSJPvrNMHPsp-ee1TieBpdB-emZanoRtKVlotJ35-B5KYcs2BIv6KG81LI_F-ZFleqBAlR0u6ty1cggkEgz7OsKjIePcfG0wIdttqyzlKoYOVPTx6wWfHHZDcseTPWpikGUaSTi8GWL9HJ_BugI16JEW9WIALoWOlflQ7884UoH2S7WZ0wQ97MT0NbwdkwgcowiKzD6li0euweojvu2D8WYk1M-VQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/f50f900706a24363be08c408cd3d8908","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"oMEeM4hmofM8AW7C67c_Jubcu1t9yh3uDLGSQP8cowwyKh3IVtLgyruzGwLoXF8B9gJZaj39iaKhMdPzc8metT1746Ub3vFiIGGXDBJ_R8EXPxSjSFvOn43QwRBQhEmfsqqnjIqHvj-e_IXyLtUMFj8HteNPbfpzAdlKsXAZhNd1l9INIekQZKfuOLRdB2SIMC6saG_gkQcL5y80lDozJCOQEhHfRdvVg5H1HDa994SPwGZqygKS-JTwYvNDyjFR2HMpAYK1d-2PHCLAMD-n-b_FRcg8EPU6g8DtEBqWpXSlFmTmBDA9hs9bVUZgbPMOIg0edSHPj4n4oxcupmsw9Q","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:14 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/ae0bb0500b5a4899873962cedbd62ef3","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1XLrHrA2xR35sNHz7Bl23TuCTwcdOO8aY891NJLUnxQUvPxj90vLf9iQA7Kd_J9-XxU3ImXY-qp0kOb7qJPeRI2MydpRxbpipmmU1aMjDhHReaY-4eiEt1Wq4H1i73qE62VnQMY04pSkweNqcG5GANlpuBKqmaFvi6uLeK0b38ioK5leJsZ-bQyVveNa23hxZ7bAt3WlMe1-eoh0S5yITRFIlq3GDieFC546e2oL0H-TJOPsdZ6aUiF9Ff2D9mMtw1V44ulaZHs9wyQXPPcukY495_yBPq7W6NvEq4C7FJgYroBRNw1wg7y_iFQ8cvf3vTfK2m8ofwtoaeePWC75lw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/7b75b1c578a94a1a814f889d2edfa79e","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vm4vIl0Qd7O-kBaGB5xZUi-1s6PjVoiOOrA1vJC3jCYDb2YB-xO5Okibq_rrmeqKCGqA1BvjAYU5koHNuI81HwYLVnSuaH05xxX4h2_tDpupmHNMyvaixEAFldoS_rY6LXu0sjU-NiTxug8qesZSk2D6Y8dtblv87MxPbz11Asc-IjhseHzkn6U8HfPx4Z0IVRtKtC83Qa_fE5PvFXE-vgzDCKbJcpQKvk_ykByxZGyYn9etCJntKuPCob1w5MnFoWbIAvLmkd_xXr1c75jhRT1Wio6eKPUYk3oj13kn0Wci5t_MYz7PeAUVlLXgx38hxU6rlkAKI5_c_mEaLF4mpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/22e7a0ac26f541309d942aae55f56069","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"i3dwC_iG7Pnosa0C-7DGNoZ1mnH-wWPwXdYDPUr0Tl4ZQna3klAnLRO-yVO4zeB3t3kgVmQ3nYSw-M4HYM4FA-_BcbddPqcelUSWgD5LMH4SKW0sQyKPfeUWqgQQq1Q2K4LO55nLjPzu87FOdGT-fJ1hNCqCOWb6WMio6fIAA7Aw91ZfgDt1_icif_c7OzIyskD657ryxPn45P2t3z-XRUmYVg2Xt4WLSlqc-jScZtGYGNwq82E-t2IviQplaBvLB4sNtCRYzqu5NChFYUXEhZal87Q0kWTq6xZa9D-82OmwCk9WnHCia_XDf8zPNcQQsvMisoD-bDbipGZIHjLrPw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/57fccb90503944cf8c8cb4f5ff94cf96","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1FfP070rHhDf3XumOs1t9fiXrXnYxt4mj1JQaz73YveKVuUGZ8MhY05So7SZlTnCaYGjY0p_pyMJK5hMRQX_gSUXFdKsB3HJZdxcEEnsgkXoLHI4tpGfGjznjj-Ky0G4rV6hQjlsIf6n4nxRCiPG4CjJw7nWlBJn4eDw1HSwEFtKcMHIW0p79rrHhuHGMYRbGWAMYgVTkGypsH45e6PyVXE5ueEERzJKA0f4S9LioIsp5LEleThm_E4CE9azlnYvl2WbKeensPKnYVlw_30gIDGsd719UJizsYxyn0Z6q-6ki7Ws4RWrWmZRaZii1c3CdhIpT8h504_DB-4DECqKSw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/39f5c626c2234116b55e89a302e37cd0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tIN4UcaySsLj1sY6wvLbFT2WCKGqf-VtnzBfNcnTNqGe0dZbX8fE4LJmPF7--uy3zN3zucHJS9TptQJuyHUI8Opb9dTnA_O7BpECmCLxdpEucmhdpX_Jn4rSZ_B2Gd6ssBO03QjwqUEiNWiIdeASyx7sCy1AazekV6jPIyiAiZH9aW9KtPp0x-hHCEnoiCTo_vsX7L0q6ZIxA1ro6pLEt6HhTFRQN3MpFU-rMMHgyqDhbgquOUzTmWaUMtMJhRvH2Fyfyd07Q3BnguhZMulT7uOWGbF3uorMcVq-TMxi3XA97ri3BQzAgDwfXxLpWxWu3cstSJwsdjs6hp-QkIFAMQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/e8ff437f48034bc08401754943403333","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"iW4vfWb9owDVk2P5GGu4qfMbIrRhcQUenHS6BRkAQPhqrDQ-8FuHO27r-fliHlm7bGNRlBgD7dMtPBrsAPdGHS21MX4T5Yo8YjQvYwGkqiMHlDeGiWqrEKZhj7yOWvqJXtCJkgCYLoswMgy6nIz3Ptj3yKhQ6nzb4djeVgNnaatxgas-QUbhLobplHq94AoxlJDqIBvBqLv2C4AR9XqtxS0mOFu_BM4eCNq_-ALK3hMpdYGfxpoDCRiWAsC8s1iHsv5DjeKF44Gmoexw7A081shyar5HW067ttOyMz_iI3lj9Dxo8n2g5o8HSQgz7ysPDR_QcxEY-rxsUhDdxwFUqw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/38ddd3f6f70d422a8aad4175d9d01acd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"rPb0on1WhFWeJd5-woJsOTbLA9Y_lFO9Mw0NtXGQ0gzwkpcvm8pSNDrudla-Dw_jKu_Yh35fL3AnsVzvttcsyNu4BrJ5lG_Nd2ApgAOtT2NqRgScCkCXheeKPtxeht7ambqKcbk7C6NBDa81zd1jqVnVojucsVAY1jkYKjw8r3WQQ53zAt2oMO4XCkEi-jQgIL4QwfY_eBfWiMZDzcYz8u8BlC07QLBHkT200YfIVDSjoKLf4pOx1hCWvzA27ndkemgt0thlL84EjLp5PE0chNtZCuLK2ojKkcSU21kZ3GV7NptS_IwyjkEvO3j9YKshOXzwFzIeMsyHMnQ5BsyRCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/2fa84ef9423a4cb5b286ca7bf77cfd02","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qInaUwEM6ZQAcb_Hk5d5rUP-DannLP_iAToOZeoUFgDi_dQBjwL5z0KMO2OBXUPgTh1ms_ePW0fvjRD7xyS-ZQ1aftrIX3pK_1OdnOpO5dDgFDOAEW9LCTz31RCCyMS9FMkjjbQ1iwX1ydEpM8eCw5_MrXhGL5FrPuorIq_GHpTbyV-ars_u1oJfdsUHOaD7riBizEk4sGld58EBoOHiH3HRojQ86E7WoXMUnX5KBX6CLggP9_SlVg2nnLPjDKWPddTPPpBmelCy9VF5g7T7UV3BtMymC-2XFZuPHOq8VjAjzZOn2Ant3IWotwRnokM1axlRqKa9rNGdEJvit6JB2w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1562703474,"scheduledPurgeDate":1570479474,"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/38ddd3f6f70d422a8aad4175d9d01acd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"rPb0on1WhFWeJd5-woJsOTbLA9Y_lFO9Mw0NtXGQ0gzwkpcvm8pSNDrudla-Dw_jKu_Yh35fL3AnsVzvttcsyNu4BrJ5lG_Nd2ApgAOtT2NqRgScCkCXheeKPtxeht7ambqKcbk7C6NBDa81zd1jqVnVojucsVAY1jkYKjw8r3WQQ53zAt2oMO4XCkEi-jQgIL4QwfY_eBfWiMZDzcYz8u8BlC07QLBHkT200YfIVDSjoKLf4pOx1hCWvzA27ndkemgt0thlL84EjLp5PE0chNtZCuLK2ojKkcSU21kZ3GV7NptS_IwyjkEvO3j9YKshOXzwFzIeMsyHMnQ5BsyRCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1564527196,"scheduledPurgeDate":1572303196,"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/2fa84ef9423a4cb5b286ca7bf77cfd02","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qInaUwEM6ZQAcb_Hk5d5rUP-DannLP_iAToOZeoUFgDi_dQBjwL5z0KMO2OBXUPgTh1ms_ePW0fvjRD7xyS-ZQ1aftrIX3pK_1OdnOpO5dDgFDOAEW9LCTz31RCCyMS9FMkjjbQ1iwX1ydEpM8eCw5_MrXhGL5FrPuorIq_GHpTbyV-ars_u1oJfdsUHOaD7riBizEk4sGld58EBoOHiH3HRojQ86E7WoXMUnX5KBX6CLggP9_SlVg2nnLPjDKWPddTPPpBmelCy9VF5g7T7UV3BtMymC-2XFZuPHOq8VjAjzZOn2Ant3IWotwRnokM1axlRqKa9rNGdEJvit6JB2w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '793' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '793' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: sec32f70fb3"}}' headers: - cache-control: - - no-cache - content-length: - - '79' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '79' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: sec32f70fb3"}}' headers: - cache-control: - - no-cache - content-length: - - '79' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:57 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '79' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1562703474,"scheduledPurgeDate":1570479474,"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/38ddd3f6f70d422a8aad4175d9d01acd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"rPb0on1WhFWeJd5-woJsOTbLA9Y_lFO9Mw0NtXGQ0gzwkpcvm8pSNDrudla-Dw_jKu_Yh35fL3AnsVzvttcsyNu4BrJ5lG_Nd2ApgAOtT2NqRgScCkCXheeKPtxeht7ambqKcbk7C6NBDa81zd1jqVnVojucsVAY1jkYKjw8r3WQQ53zAt2oMO4XCkEi-jQgIL4QwfY_eBfWiMZDzcYz8u8BlC07QLBHkT200YfIVDSjoKLf4pOx1hCWvzA27ndkemgt0thlL84EjLp5PE0chNtZCuLK2ojKkcSU21kZ3GV7NptS_IwyjkEvO3j9YKshOXzwFzIeMsyHMnQ5BsyRCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: sec32f70fb3"}}' headers: - cache-control: - - no-cache - content-length: - - '793' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '79' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:21 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: sec32f70fb3"}}' + headers: + cache-control: no-cache + content-length: '79' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: sec32f70fb3"}}' + headers: + cache-control: no-cache + content-length: '79' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 + response: + body: + string: '{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1564527196,"scheduledPurgeDate":1572303196,"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/2fa84ef9423a4cb5b286ca7bf77cfd02","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qInaUwEM6ZQAcb_Hk5d5rUP-DannLP_iAToOZeoUFgDi_dQBjwL5z0KMO2OBXUPgTh1ms_ePW0fvjRD7xyS-ZQ1aftrIX3pK_1OdnOpO5dDgFDOAEW9LCTz31RCCyMS9FMkjjbQ1iwX1ydEpM8eCw5_MrXhGL5FrPuorIq_GHpTbyV-ars_u1oJfdsUHOaD7riBizEk4sGld58EBoOHiH3HRojQ86E7WoXMUnX5KBX6CLggP9_SlVg2nnLPjDKWPddTPPpBmelCy9VF5g7T7UV3BtMymC-2XFZuPHOq8VjAjzZOn2Ant3IWotwRnokM1axlRqKa9rNGdEJvit6JB2w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '793' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault32f70fb3.vault.azure.net/deletedkeys?api-version=7.0 response: body: - string: '{"value":[{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1562703474,"scheduledPurgeDate":1570479474,"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3","attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + string: '{"value":[{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1564527196,"scheduledPurgeDate":1572303196,"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3","attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '338' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '338' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault32f70fb3.vault.azure.net/deletedkeys?api-version=7.0 response: body: - string: '{"value":[{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1562703474,"scheduledPurgeDate":1570479474,"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3","attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + string: '{"value":[{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1564527196,"scheduledPurgeDate":1572303196,"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3","attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '338' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '338' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_versions.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_versions.yaml index 506c1eec8c5b..8fc2e743bbf5 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_versions.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_versions.yaml @@ -4,464 +4,374 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:54:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/786f33cf86024134b1795f24b3f0f955","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"7koFGg8HikMmRoD_jMkk75c8jcJPc16nIpU3e3HxM8svQlFT3nM3gV2WCmkuydO98UYQIeHvm7mPNAAIpIZtnYHnDdT-YNZt4o4VEsUQvd-caLXLWaNaUkZDycCC3NLnOltKVoKNIcZz1AstY5I4o-4OYvYkTp1YeXBsHAzafCClwGbUF9bXx0N8InLGsUzNnU38Pi-RiBZQDyloHJ6x6_n5vhu2gBQUgfyCCwnknQDJD6Gw0DG0JM0lNKN3NhtMRgsuJSd0BXvty6pVN1TFvS320eNSlHIBX--hdN5U1ByKuy8MWIzSNyeF18nyW_ThlJCb-M3W4NgQN3B9hWm76w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/6c0645bada774c53829be1e9d92b8033","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1Cae7MgCaUb8l3cPvfpb97X4idEo2n6G3duPbBtVrarFg_hxNMrcRCeRhURHqZSc8vMnXnAoGWI43WWOJxm9ZCsTJ4h3KOHKv3t6BSB-cI28UNvTolGeVcs6SPfaj6ZinqkS9FNIvUQd7hanoXDq3l8qurjD1HKP8nYvnny0g8V3v_lcuIrexQbp1E3o0V3XX9eaFTD_NMNN28bELyRSM9dqnFTnelqrw4PBkaPfZ7hcUyCVHki6DCIAceuaneCwwZnOQyDYNsFdaEK8ahdorMrSQ5Z00ZYT3gWMgFjEP5mRzTOya6uMw-8Tqy5DDRf-ajTydYamzXjYzSoY00uapw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527265,"updated":1564527265,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/c2b39ea5f3ee4c1181284d3109f4f66e","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"96s63BcHVYpDmfb9hVIqsWAovKP2CaBMRrOSzB4LNxD7iVCEBubsoFoc37_CqK5dhcNIRV8Z6GQoP2gDjP317V_ToJxPk6dqhSymhQGvIT6PvTaIovmzQUgl9CCn8rRC366kcZofyB4FOZVjs2UJe30EjqdyZOBraXsWWa6DCBM7uuRTXHorOcA464mz4RFSHgyoaEhQrtTwGUBUEK_4zXSnrUO7_k4tLjCgZhvNIRaC2pBQ5XY4n-jCSRw2R-5BbjSvqoVYzQ_P-6iZs2Krj9VWNzAdWTHXDr-vS5isShwo2FODdiygabZMnwtJRUv-N_QicsXe4QRii0DHPFFtLw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/f68bb459f88048a28511a6bc9546c4f4","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"pv95cZnMAvrZ6RYvddRwe9Mh46LsolgFNHT0S_NFIL-Lk_HQkpR90iRR3hMhv8zucL8bFDo-JFVktFG1mf4kYXIwSNELfHQW5STjRzZePeE9waRtXRtvm9pwifGCS5lD8xq3zm5BMtRYJlNlrymLVbCK9U9bzB7aSi-ByTUd7SaFCFV7mHNrSaNjonLZWtWMcEh76P8DZC0GBO4cxG0XyLXd51fDNnwBd0DlXFPXUHlQ3d2TGHtd7aQCCsO3iOfdmoOJNv6RjsHR67ZUsHHE1sBm1rOoMHNUUTWSoEhYi9WeAWcahijZfcABjoXmNHyPmByDVNmxrNwgSbMlKOjzww","e":"AQAB"},"attributes":{"enabled":true,"created":1564527265,"updated":1564527265,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/8bf922cf4b0640ad8fbe53288acbcbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vkJZ9m9QRSVxUOx1X1Ag2MVp3Hnl9Fs3tQ5VXXMm7d-KxntbQH2xr5KHZe3YmUK1ZHHOH_TWjneoQS0fGwkarA0GAzhGr8O_SpDDQ8l5KttNe4niAYuxRT9_5-DTOzkMAuTKyJPJS0RblaPWxo9lQLpvQLdLPD5HyQBRlz0N4g2wi5Rcdu5rqKPBFBWnNRz-CfpEPA7ov_vec5bEATmqIphxAPasKuxGGyJ4ceLWM4dnQlxsgLjI_QE4r1UoLucZPkK8_lV9W76uh28SLY4Ve-wwyq8anPYT5oOLXWrWhqrxxCHeKpFhXgpLYd3_Mong9A6OSvGmL2nG-G7LBXxfpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/0889019e6e1146a5b4b9e2cee6f21c72","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"xk9Ix3IM9NfXTXbn7KV3Fe34jpKghO0M7X1ZwFTDa2bcWvxBewgsI5L2m017H9EoCqRpbu2-HkHGztKZfwSfpEKYA4OvdObgwBXA_IVHDUiExsjrtkcQJR_LtPrsIrZpIZt5_g_RMOhjpWG40iOHtzo7XiYjg26-MV1LNWGiooPRECJNaXZaS1fy2FCNXxHff6kR7kpKBSZQSx4qNUwnfmLmIvGSyOdLnCOvdrQtESGaSc7LMWCLJs1HlyN1wlaXmZnIIAs7Vo15ABCK3FCP5zZ0DpppAZUdMay4tWyevvlMG5CK6NpQTLkc49U884XqXILVfkEAzkwZekdr6gu_Cw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/a0d22140c0ed4278870724e54d99b938","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"n9pVD9XL43BykxzcY1c6XKmGMuN20UbSM6uaku1GdCzvuPCWO54fdRqs8JduEvUOgRTuYV52QMGLvyb2_AXrzvedEZI6o2PE2FO5kJH8qfFyCjqiqY6H-MeFfMfa2UoVSG-ykYIxqayh_HpwSwndVMPnoc0p5_lmecZqsFCJrT5OZZTmHat9iyNXEp9G-nY4EVOPnxb_HsqxWoIivjqO_OeVUXneLYzU9iCEpihr3eXYrE8nIeiGMimehDC0EF3RlJ9BvsC2Aj6EddajS9xh8mrTXMms4k-2X_8IJwQcarPpAqiz9K7GWbCcTPdQEbddQSX5FkZ_FeeLC013JEap9Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/c4cf39ef0106455198808a4ba6619fb3","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"h-72gARqMwXp7XtwAwPww4PVBoPuK5UA6mXubetsECLjnjrAU5W90bGcj9hM6qqLxZzUHWXB17SNObjBK39Up9DSaq7nX9N8MDslgW0NgQ5Sm2fRc2t7Rr87qrk8HqRQrqqo3MwArB5C-K7AYQrfihBMG8C21XTrv_NFS7VSWc1dzA9nWm7ch96I5pK7b-VCJ1M5UMuMBpu4JAOrebwiIbyt51CWkq2Qn0FBwg433ygFJFJCTjDV9biGFWePS1TknaJGFGwh6oMqokpItcWBIlD5qWbq-DaCjKD2HLnt7pWWjee6Qcjwoib4MrqBoJCZ8hK4J0oWZiYS93gfuGpDHw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/b329bb00403f4aaebbd90983b562d23d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wOKd__6i8rgLj8FY36VE4_r912xmbafiiaruIKRg0YH88kkDeFyrtuma13WFYco4C_Mpd9_VmTOBYydkLUJG3skk0pYj_lpaXgickbrUfYUO518-3rMXR6ZEfP_UAZonk6rc6rMAl1mBHPxJSI_61TKFRyDPFIVN3cfn3Rlu32MTTk4yFlGKzkx03z1DHjxNvAoDWOq4Rx7M2y-SFb3hS-Cbo9S3k3EObwpyqyLab9NuHjK8_TlaTChVSyaKegaxDKPdZSOwLpaugzKGiuYDc2Pv7FBvBysrZwWo9y8g-djQTCW7de4Sg4d1e_OgXkVd9jKM-iDmZP-0FG1KNrODUw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/4dede8ef1f0c4896876f41d26e623eda","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"pj2NZDpblOdcn9WnMuduYVQH6L4sQaHLnENAgOpBVJrmPGFaTC06UizxlnFQQgXFrWFIDV3fMRYZjvKj0CDTZw3ArUDI1AC3rAMez07CNJrxBc-pyRJo2qm7yET4JjUcoNUzPe49Jg0sTm_GjYCU5oO8hNPjmkvFBqk_tK21wn-GUezhNSw5Xt5wrNut5D9bx9Ec6SNw1jhtC58jyB4BAfyprpbPEBf7jbQ4rmEbPmFNWYtRp2wu-dd2AJ8rUzkyrtDsMIrZeki4J9VmrOd3sfxb2mrTh52u8MMUr4LpVC57YsExMluLEAgKS7BORvwL0zUhbsLE0gbYJ29ovETHbw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/b948df1fd198403b9d957fe3c2b304c8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"ywQxBhO2g4PKjb28A6xkhoNpIJpbEB7CR9XnCQYugrMCTBbgn1Wu5WUIL4nFbOHQqfZFgVm3Iz3GxQx9qbEuKZAZLrQemQvPKfJxShysmvaUvfOFkWAHreHROokOOhpz6RONaOKCExDLebh6xrwY_QX4Mu3CQRLrxXAXCpNCpLkLxSGcwf2QsxyfDgDk5_do5CHWUdDIrfYeBwphry-amLVnevfaMiy-cfuEA7uNXT-g6E0G0IKpK7d4BC_-D_Ik-H1Za5lbMDYCzIDaTyILuoQ3o6AyP2sSQFu287_RMlwny17Z1z_uUSp4t33mLBmKfqnofOpj3DTFV1cSVi_58Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/6e6d01abed4a44119e2a6f7fb100301a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"xny3krbx8hK8KQxeapgTJ062YqcjL40lwn3SaYZF6jvd_NdgExGmHBwqzZhaK0PGciDWQjUSDffKWuOAMJpZRskJ-HkHqB5s2kDQxqNcgHC0M20HA-JjiPRWHqAOpd7-CwaP4Dh0WkuCUZZ2cFHn13AzPifHE9W3uaRVm4UqsSJ9DhVYMxmtdykXkxPbamuv7C7-Cc7OJepctGFRI-z2_locTjZCjLAioOLkR-TiO8HC-dwhdVHGVLb6ndKfnK1oONyKMYmdamciR_xoswsR64k9L8zRH4mQXs1JLcK5bdZGSI9TC8HLsJ1pbISmbvcB8UBWr-vKBvLyyQxCh-oVxQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/90e449bfebae4beabf380cb73f8f9db9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"u1FSeDgoMKXed5j9AedatfVS7qA5zOZuIV5Si5_8A9H5AbJnR6SixEbxH-en_MEeFGIegUfuV_KGnGI7prxZtNH8Wcb5j3FPRsHo4icHMGXfXIJBKsGzP6pt6SzCF3PyGW9IjLFfIf1HD3LLzd5OiaYSHxtpOuHYNPzyo26O0ElTtHBwhUnp0YLSN6_gfCXLEMwjsXMk3EJ-XCDBuPXmRz4CqWgBtA8sABeU9Sy4Ptv_MsdDjLz5wRnvE-_WPHmux2-7BjMvgxln5c_vMEhkmU3L3Jaz5vEK_JO41Q3TVT09mVqudpGCu0qGzd3U4dGn_T-lEW89bR-K9Oqt52ZChQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/e0acb596946145368fd13c8b4e0c2c31","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p6oM5Rje-NLaSvWUXblUxWhXXQ57Uu-4TshEi02pY8Prj9j77Noem7d8RjwPVhTFWEcVoBsivfU8QOHb4yv9v2vWNxCXf6pcqCQU6edvRaxT8C71FlKcMcaRCOqJJRT0lCyf6lbGKsAhpMAfztyV9HBcLUnLtQPtQtqif4tBfCkiDGSI0606lZHmP3bUd5EurPOXGpcLq9gV2m_L5_EjDa5ZgTl_weMHOrzxsIyKjDG3z0Mf66SSLkpt2e6qvsa2bvsV10m0mqAo1jHkJPa2XXdrE4EAe5X2EWoesw_voom0zsrfemdFD1poDPwWsbZvkRBR1T-GmN7cj6xjucJspQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/versions?api-version=7.0 response: body: - string: '{"value":[{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/786f33cf86024134b1795f24b3f0f955","attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/8bf922cf4b0640ad8fbe53288acbcbbb","attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/90e449bfebae4beabf380cb73f8f9db9","attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/a0d22140c0ed4278870724e54d99b938","attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/b329bb00403f4aaebbd90983b562d23d","attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/b948df1fd198403b9d957fe3c2b304c8","attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/c2b39ea5f3ee4c1181284d3109f4f66e","attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}],"nextLink":null}' + string: '{"value":[{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/0889019e6e1146a5b4b9e2cee6f21c72","attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/4dede8ef1f0c4896876f41d26e623eda","attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/6c0645bada774c53829be1e9d92b8033","attributes":{"enabled":true,"created":1564527265,"updated":1564527265,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/6e6d01abed4a44119e2a6f7fb100301a","attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/c4cf39ef0106455198808a4ba6619fb3","attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/e0acb596946145368fd13c8b4e0c2c31","attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/f68bb459f88048a28511a6bc9546c4f4","attributes":{"enabled":true,"created":1564527265,"updated":1564527265,"recoveryLevel":"Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '1441' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '1441' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/versions + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_purge.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_purge.yaml index 8986e7164929..2d209bec87d0 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_purge.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_purge.yaml @@ -4,1472 +4,1334 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key0/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:55:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key0/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/b7b15c069a764103aca616941247c05b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2yh-wv0OiJllHsJD2ksiZ2az_143p22PHO_3mqj_W76twCIcehvLnGrVvqBKphuOV81ZHAe0_T491wBWyagcbda_pYlYKMbhnh_U9Xm-UvQB3u6z1S7D4SotH03DCdAUFIjOad6ghlfBUJ-A-hOCOIh3QTv2vqtg7WrdUbuV_4zy1BuW0QfoBZ13apKtU-8HyalVMqkenk3__Rpqub8yifPod3Mx81JqMWGeVqKA2wwAsC8PNbu6mbjC1mGpeI1HwEZRjObRXllYLZoyN2lTOsrxZdzTQQ0biU5RL320u98tg-3a58qclvXJA8TfjEcMQyfi90fVnUBCz58A28jBUQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/a4543a8280204c68978f6f2caae4cbec","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"7wL18EOC3opS5mWL6zSV_0crQP8HuBTVxmpcE1EfePfWRFVc242HNftjbwh-D-3ypnfx0pngk5dM2Wys6K7uC8UDX7xvEIz8Q4yov6EJHFERbUH4QHy5RrywBSry31vmIHdCyLikwyekjeuYDg7jHViKLGU-aRkdSYPhXBZnGjDqzbYwH8_fh9SQnsBDVtJ5dUF0ua2xstnqjZfoTdzvMGMTqrO4rivXc34kdhMAAcbAlg7yvfN8dr9legQfIQq-vSaBuhiLpQXJ7yrCIjWtFyz52F6sVYWFRZDhAEsVfFg0KwMROwPhLDZuolRnc5113C8rZTjSrPGTvzKloqgybQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key1/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/e2105e596e1244a496166f11ef3fcc83","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"q_cGt1m0sRbgdPQvIy5YpXC4LQ49mOhVO1IH4XoTMiGgSAF5RtJzSPBWPx93I1Lmuvlml15EroYaudSZRivYgOM9BmVet_ZEAl0yL7FySYG1aepyalxZ1HU00b6Thn0MCYZawsK_HR6_VQsK4uVf0uBiwjSXgAT39yK9M6YC09ny5Tokdxi0CtlI88TBzhGVcsU4GBLB7zziUMsIdMNvU_08XXMdyFO0MZCCtZ4FKQ-LWrMXTd9TonbeyxHjKK55RYk73vOrurPdtncmL-7Tal-ReUfWNa8IBTbv2-5HF9pKeWiugPsYx5LZDkeMPShLLXLhUl9IrAWNJ75TbJnqCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/594bd6b877b549e78c65e8e6065f9b61","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vL6fWpzKR-eh3DEeb8meE7BVQhQ3EslTQ2YFnfI7z1PSJbTYL9GzOEYDOCEw3HK1-kDQlQNuG9cS9w8a-XyXN2GaIN1d3wCsvkiF8IxSgZvyzah76cnJlY9k8s2_-xpH9-eDn2V_O_oT5S05ZDGE8S3yQXX40b12GbCzox2ydAmbiG26o75ee9Ep-VcA65Sn8gSGR8GyBeu_pfuEZR2ExG6ykluUJWV5S-aHNQP1QwC5J5lN6BA6IQw_CNiu5IIen69RATOv9OUlEcb8qUzAa6w77y2BfIPW-721Al6AVsQc5qfs-fPGvlAMMTgRpUULbZtJf_Ua_x4SJLEg5gqEEQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key1/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key2/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/1d4636bd96ce41dbbca191bf2d58f491","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vUAwWk483zwp364hcyCNX8EzclzX-56CvL-UAmRkaI3rDttCvgo9lDk6unH7S1E6lB1J9ZfF5LebqqfNR7MheTPuvlq034V-eQHiMFmYgbpHkyM3YYElSQulBk7dlJ5JmVW9LgdDkVeRdKU0NXzFSbScn2gynewJx5uJDREcKRKLKbD4WXMtpUep_YgJG3tT3Moy0OrgB8GD1EeGU5xGb9HKLU6B4YxT7vOTd9oP_vrUGzWLzv2gUVcat3ey0KLymyS2UEQcXazrJ8I48plMYRFuo7rVDolp2KmqrQLYutqn5c-bW_mq0kytdH-9-NxDW_zrsVSMSjuXfa3rPXQQ1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/4cf7e15813524ce8a0cbbff407e4320f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lCN9N51jfLTckgcgoUDBIa8fKsi-BBeyz6RtKo0rxdiU8HiI8bPwjWomaGom950KKIvxVZO81xh7R7wOsVMoo4pmfM6IoSX9xRJKDG0Z3-rjkXi8wswKbcVP2EgPZ0ZZfMi1MgPHarfMXPMCtA1fOndYM_FGWijYbf6ngXvgvRsMkg-d5AOU0vP9A_Cw4f5CvdeVKGsbaHkXy8udls-Ir5we-S749TcCzpje2UJ7UftWOMynXPl5bagZ1jZBXqPI0Yn4lLUXmI2xLw-QkZPEBgMGyMwcjI3bGZUKHVQdnFymdXIN8xZyiTnWvjaYHGQK7w-c_bjBxs4WA5EgiIUAGw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key2/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/bf97328c64bc4190b7c0b5025152e0ef","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"iC40PZjyzCPorzlWM7YTGIcZp4zP9YeUzig51DOE5iAHLXaIDbjZs2H-TO0l3q205oCX3R3dBBoJvxlEDbLjSLI4NdLym0EqIWTd4B6JelFBq-3zEeJJt4SHkMRQdkWPA7dwIEi4JgfyazFN8JkL3x-S2zSqqyzmoG4U4gpxKN3NPAyk1qmszmpKjnGzNJg7ywY9tewDlqx6MiMQkODxr27rOjXHx_hbp7iKhD3ZwTKAvX7g14JzpYIkXmKsyUtCU_pLx6HEqNUVLNyV0xfAtXctSSuudeE5LDItakUEY5oFe7iT1DlqPDOGoVmtfg3wf5OocdtajvdfZGfMRUpi4w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/00e02fa485e44c17afda5770e8153dcb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1p-HLSbIn1lvsmxtwTf9Gmsd7r--sUU9C0CSjMQzz_yXSt4nnKzNbtbPfpkG1UPSyysrnNKfz9YWIaJWrYUZbdDRF_xNMV_QHiXHrsW851fZqZZYYz_KICrD9PZoBgE9SMIZznXBnx1AXEhDtZeMsHixlIWCmW1zrnwtaa1a9jjbNCArj3bF9WK7Fz4lm4sov5J98XaOHFvaFmDIVSW1mPlU7IFY7qzvim_ADeWFFZ2ibgb2fZbdo4EK1sL8HpkrVaryidFBRYVfQjIAusI8bNTcrEp2RLvaiPTh9Kqcwqz1GIJ8rWMCjflxOHsXiwpucyekYpEMX0PJD9RKYeBSZQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key4/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/df257ae8ce7445499e565c897a68dfbd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"3nDxOtRk2XEekU3CDix3JvDSL_ovOzFqQOiGcm4gAsnxKBF7KAOINLVdOU-jgDU1tW0lDU9EB7tgt09O3ZRn6wHfX11FbsWX_UQVVZZ1-9TN8qNm05VCT41hXVJXp0orAnc8oMj3zBgWuHRzNOO3H6HECD0O1rTtgpSzBVlkRjvJFoNZ_VeM4ALRdghGM5pZwDhZmXjPwWMNBhrxsehGcIwWwapylZUSjDTkv6RcVs7nROpDZiEyXxGkLMDZgQKcbZPUP8pUmWaWS9639d3NL-y8wvBrxkz2YLcLU4rVMZBKwQD-QA6kfRBZ-tSdm2Wjosn9tY_4ZaF5BT2bSZ4jWQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/7744766f37c84db6b97adf44cfdf3c01","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"5ffGsn2LropTgRfM75DCYE5k_rlbSIgAVqf4IFIHhIVwHdbco3qg8ROnX36f6jsH_x8JMvGfACIuFTwGLhw8VCK4NZOHIHFeq2kSSOHrqBLhIw7WZKCWrKfPBDtdKAvVmhMzLIn31FFAbNpbgDNVYa681ajXk7kBMdJaCX9ymT8a-DvNLDh3K33ImrqXZLNLX6KOh8-sAECfOVZcoRDfvzi6I5edrzxG-jMZnyYXMvdOWWO4SfmmD_-L6_kCksibxIbL-7LFqfO4rtcbv2ew87GA-V4Drm3OwQrX0h13xIuGZ5J6GVOQ8uhXwrHdz_UCL38_A5wLlWzMnDe7iMDMmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key4/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key5/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/1977c712eff64ef9a3384f93eec3920d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"0V3D3E6vH_DcYMtkqMZjr6Cw1M6sYzYjUlu3eyNrh2h8qq2oIWFgDRzm_wvfG0k1JOuS28L_ZkYaAsIeW3mQx0liwfi0Qw3nMWFjzcLpLw9GBM6WZBr1C8uh0DbSvoWGo82FIIWONKWYZtimkep2UtBpEkbWXtBK7HMwWr1YhQxLwya-eq7R7L_F-d5CmAJCWZAfIU7shSesGIFZLYV8UzM2rfWueyEVQw0jrC5SC7eVoiIQ9t7bkGw_mooqod7KdIDIIyeaOpe-7xd8EqntmOeOl2EYehTeH2oaUwm-SWSfE53-Jf8GzqHMYLsXO0FcYTkZO2RCl630YSJWOQ0J_Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/0b821b69a2a3451793d33595b4b52674","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2i-Yevb0gLnOGSWkCrRSfbsui3vbi5PcXH8mYAA-O5DF64zVu3tgj7MD1bHG9Xnw9KX75MRwPFZoZnXByNEWEPyndhbOsNTypLxcFYagDEB9tMH9oO_M6SO7pOotlnqKT_Zhf4w3hWK-Gsrmovl6T2729nyAOmbVjNosC-u5JCU128WXpnel8HbJXKMjtmGDVKCOBErTm1ZYTeGjr8nMnlhnOFbaRkGST3c3YcaabJ0ZZQ7BVhna_ddt4de5yGxfNUi4-E2KwwcC8EWBWAL4idDfeaRGf-J954hMdtQXvIFjM4ovpZtajP5OjjcGsp9spfChZ4UMsmk8LMWptzjukQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key5/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key6/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/a46d41e3df94485998d628effc1cc9fa","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2pOHXzB_Ek3t-w1EPmq6Wv9tDkaP1tekAEn1FDJNKSMPRwsoQ77_2VE3aggrKhRAEhxxXJqCpsnSK3aOxeiO3PAnPkXBg9FqQ2GcFykqXwQaKEeJi3oFo_Ik4O3VgaGca4g3LyAIjhcU5RglkrdP6gxBPd38ykGmi5kmxBViQc2LVCSwWSK34a_QoYi_mTEu4ai3yyfn4c2DvvJA4Nc-jUoQi4XydgzaDwFIHwBpJ5VZvHbfj88iEQ5r-Ym4xsDZhPv2ywyKokNSocbNDgpk5mpzOGW4v_ZkAuS1DsMd7ZdVYtuVzg1y_jNtaK985OWrJhTz0_VWXKLoR_sBGkNN1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/06c3cfdcaa30440e80108348d890bfe0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"70-948DTxaM8NbPNVnBTYQQ9bBjrA1jLjmDHW8RHZA_DvPxLHiTOLIcXX_YoZNVpjqzvBMhtoyHawmD8b6dKeyeefqkjXryxFBo2L89IDp2MKsg8iG75eeAP0p6FFWBljpfwyduuUCsOZ_x5M6_K5M3aaC2R6oTedX5Gp90dZKUQ97W4S1Im8hW0qrg_HM09vQ7RZ5w_reDC2hk18c6CnERE_W7Z8Q3AEoi17t3cRez616DvLWZxkj2YMyP5mTnYaniSIbpgBU-Eqb4UVKBAAScLHpslfS-cdQr3vyYeIOI-EO1I2K5gLq_2UVn3-VL1fySHw7zvkS9bX_TkdzZnyQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key6/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/keys/key3?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/keys/key0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key3","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/bf97328c64bc4190b7c0b5025152e0ef","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"iC40PZjyzCPorzlWM7YTGIcZp4zP9YeUzig51DOE5iAHLXaIDbjZs2H-TO0l3q205oCX3R3dBBoJvxlEDbLjSLI4NdLym0EqIWTd4B6JelFBq-3zEeJJt4SHkMRQdkWPA7dwIEi4JgfyazFN8JkL3x-S2zSqqyzmoG4U4gpxKN3NPAyk1qmszmpKjnGzNJg7ywY9tewDlqx6MiMQkODxr27rOjXHx_hbp7iKhD3ZwTKAvX7g14JzpYIkXmKsyUtCU_pLx6HEqNUVLNyV0xfAtXctSSuudeE5LDItakUEY5oFe7iT1DlqPDOGoVmtfg3wf5OocdtajvdfZGfMRUpi4w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key0","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/a4543a8280204c68978f6f2caae4cbec","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"7wL18EOC3opS5mWL6zSV_0crQP8HuBTVxmpcE1EfePfWRFVc242HNftjbwh-D-3ypnfx0pngk5dM2Wys6K7uC8UDX7xvEIz8Q4yov6EJHFERbUH4QHy5RrywBSry31vmIHdCyLikwyekjeuYDg7jHViKLGU-aRkdSYPhXBZnGjDqzbYwH8_fh9SQnsBDVtJ5dUF0ua2xstnqjZfoTdzvMGMTqrO4rivXc34kdhMAAcbAlg7yvfN8dr9legQfIQq-vSaBuhiLpQXJ7yrCIjWtFyz52F6sVYWFRZDhAEsVfFg0KwMROwPhLDZuolRnc5113C8rZTjSrPGTvzKloqgybQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/keys/key2?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/keys/key1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key2","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/1d4636bd96ce41dbbca191bf2d58f491","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vUAwWk483zwp364hcyCNX8EzclzX-56CvL-UAmRkaI3rDttCvgo9lDk6unH7S1E6lB1J9ZfF5LebqqfNR7MheTPuvlq034V-eQHiMFmYgbpHkyM3YYElSQulBk7dlJ5JmVW9LgdDkVeRdKU0NXzFSbScn2gynewJx5uJDREcKRKLKbD4WXMtpUep_YgJG3tT3Moy0OrgB8GD1EeGU5xGb9HKLU6B4YxT7vOTd9oP_vrUGzWLzv2gUVcat3ey0KLymyS2UEQcXazrJ8I48plMYRFuo7rVDolp2KmqrQLYutqn5c-bW_mq0kytdH-9-NxDW_zrsVSMSjuXfa3rPXQQ1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key1","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/594bd6b877b549e78c65e8e6065f9b61","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vL6fWpzKR-eh3DEeb8meE7BVQhQ3EslTQ2YFnfI7z1PSJbTYL9GzOEYDOCEw3HK1-kDQlQNuG9cS9w8a-XyXN2GaIN1d3wCsvkiF8IxSgZvyzah76cnJlY9k8s2_-xpH9-eDn2V_O_oT5S05ZDGE8S3yQXX40b12GbCzox2ydAmbiG26o75ee9Ep-VcA65Sn8gSGR8GyBeu_pfuEZR2ExG6ykluUJWV5S-aHNQP1QwC5J5lN6BA6IQw_CNiu5IIen69RATOv9OUlEcb8qUzAa6w77y2BfIPW-721Al6AVsQc5qfs-fPGvlAMMTgRpUULbZtJf_Ua_x4SJLEg5gqEEQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/keys/key6?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/keys/key2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key6","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/a46d41e3df94485998d628effc1cc9fa","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2pOHXzB_Ek3t-w1EPmq6Wv9tDkaP1tekAEn1FDJNKSMPRwsoQ77_2VE3aggrKhRAEhxxXJqCpsnSK3aOxeiO3PAnPkXBg9FqQ2GcFykqXwQaKEeJi3oFo_Ik4O3VgaGca4g3LyAIjhcU5RglkrdP6gxBPd38ykGmi5kmxBViQc2LVCSwWSK34a_QoYi_mTEu4ai3yyfn4c2DvvJA4Nc-jUoQi4XydgzaDwFIHwBpJ5VZvHbfj88iEQ5r-Ym4xsDZhPv2ywyKokNSocbNDgpk5mpzOGW4v_ZkAuS1DsMd7ZdVYtuVzg1y_jNtaK985OWrJhTz0_VWXKLoR_sBGkNN1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key2","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/4cf7e15813524ce8a0cbbff407e4320f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lCN9N51jfLTckgcgoUDBIa8fKsi-BBeyz6RtKo0rxdiU8HiI8bPwjWomaGom950KKIvxVZO81xh7R7wOsVMoo4pmfM6IoSX9xRJKDG0Z3-rjkXi8wswKbcVP2EgPZ0ZZfMi1MgPHarfMXPMCtA1fOndYM_FGWijYbf6ngXvgvRsMkg-d5AOU0vP9A_Cw4f5CvdeVKGsbaHkXy8udls-Ir5we-S749TcCzpje2UJ7UftWOMynXPl5bagZ1jZBXqPI0Yn4lLUXmI2xLw-QkZPEBgMGyMwcjI3bGZUKHVQdnFymdXIN8xZyiTnWvjaYHGQK7w-c_bjBxs4WA5EgiIUAGw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/keys/key0?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/keys/key3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key0","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/b7b15c069a764103aca616941247c05b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2yh-wv0OiJllHsJD2ksiZ2az_143p22PHO_3mqj_W76twCIcehvLnGrVvqBKphuOV81ZHAe0_T491wBWyagcbda_pYlYKMbhnh_U9Xm-UvQB3u6z1S7D4SotH03DCdAUFIjOad6ghlfBUJ-A-hOCOIh3QTv2vqtg7WrdUbuV_4zy1BuW0QfoBZ13apKtU-8HyalVMqkenk3__Rpqub8yifPod3Mx81JqMWGeVqKA2wwAsC8PNbu6mbjC1mGpeI1HwEZRjObRXllYLZoyN2lTOsrxZdzTQQ0biU5RL320u98tg-3a58qclvXJA8TfjEcMQyfi90fVnUBCz58A28jBUQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key3","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/00e02fa485e44c17afda5770e8153dcb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1p-HLSbIn1lvsmxtwTf9Gmsd7r--sUU9C0CSjMQzz_yXSt4nnKzNbtbPfpkG1UPSyysrnNKfz9YWIaJWrYUZbdDRF_xNMV_QHiXHrsW851fZqZZYYz_KICrD9PZoBgE9SMIZznXBnx1AXEhDtZeMsHixlIWCmW1zrnwtaa1a9jjbNCArj3bF9WK7Fz4lm4sov5J98XaOHFvaFmDIVSW1mPlU7IFY7qzvim_ADeWFFZ2ibgb2fZbdo4EK1sL8HpkrVaryidFBRYVfQjIAusI8bNTcrEp2RLvaiPTh9Kqcwqz1GIJ8rWMCjflxOHsXiwpucyekYpEMX0PJD9RKYeBSZQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault92670ac9.vault.azure.net/keys/key4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key4","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/df257ae8ce7445499e565c897a68dfbd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"3nDxOtRk2XEekU3CDix3JvDSL_ovOzFqQOiGcm4gAsnxKBF7KAOINLVdOU-jgDU1tW0lDU9EB7tgt09O3ZRn6wHfX11FbsWX_UQVVZZ1-9TN8qNm05VCT41hXVJXp0orAnc8oMj3zBgWuHRzNOO3H6HECD0O1rTtgpSzBVlkRjvJFoNZ_VeM4ALRdghGM5pZwDhZmXjPwWMNBhrxsehGcIwWwapylZUSjDTkv6RcVs7nROpDZiEyXxGkLMDZgQKcbZPUP8pUmWaWS9639d3NL-y8wvBrxkz2YLcLU4rVMZBKwQD-QA6kfRBZ-tSdm2Wjosn9tY_4ZaF5BT2bSZ4jWQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key4","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/7744766f37c84db6b97adf44cfdf3c01","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"5ffGsn2LropTgRfM75DCYE5k_rlbSIgAVqf4IFIHhIVwHdbco3qg8ROnX36f6jsH_x8JMvGfACIuFTwGLhw8VCK4NZOHIHFeq2kSSOHrqBLhIw7WZKCWrKfPBDtdKAvVmhMzLIn31FFAbNpbgDNVYa681ajXk7kBMdJaCX9ymT8a-DvNLDh3K33ImrqXZLNLX6KOh8-sAECfOVZcoRDfvzi6I5edrzxG-jMZnyYXMvdOWWO4SfmmD_-L6_kCksibxIbL-7LFqfO4rtcbv2ew87GA-V4Drm3OwQrX0h13xIuGZ5J6GVOQ8uhXwrHdz_UCL38_A5wLlWzMnDe7iMDMmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault92670ac9.vault.azure.net/keys/key5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key5","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/1977c712eff64ef9a3384f93eec3920d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"0V3D3E6vH_DcYMtkqMZjr6Cw1M6sYzYjUlu3eyNrh2h8qq2oIWFgDRzm_wvfG0k1JOuS28L_ZkYaAsIeW3mQx0liwfi0Qw3nMWFjzcLpLw9GBM6WZBr1C8uh0DbSvoWGo82FIIWONKWYZtimkep2UtBpEkbWXtBK7HMwWr1YhQxLwya-eq7R7L_F-d5CmAJCWZAfIU7shSesGIFZLYV8UzM2rfWueyEVQw0jrC5SC7eVoiIQ9t7bkGw_mooqod7KdIDIIyeaOpe-7xd8EqntmOeOl2EYehTeH2oaUwm-SWSfE53-Jf8GzqHMYLsXO0FcYTkZO2RCl630YSJWOQ0J_Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key5","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/0b821b69a2a3451793d33595b4b52674","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2i-Yevb0gLnOGSWkCrRSfbsui3vbi5PcXH8mYAA-O5DF64zVu3tgj7MD1bHG9Xnw9KX75MRwPFZoZnXByNEWEPyndhbOsNTypLxcFYagDEB9tMH9oO_M6SO7pOotlnqKT_Zhf4w3hWK-Gsrmovl6T2729nyAOmbVjNosC-u5JCU128WXpnel8HbJXKMjtmGDVKCOBErTm1ZYTeGjr8nMnlhnOFbaRkGST3c3YcaabJ0ZZQ7BVhna_ddt4de5yGxfNUi4-E2KwwcC8EWBWAL4idDfeaRGf-J954hMdtQXvIFjM4ovpZtajP5OjjcGsp9spfChZ4UMsmk8LMWptzjukQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/keys/key1?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/keys/key6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key1","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/e2105e596e1244a496166f11ef3fcc83","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"q_cGt1m0sRbgdPQvIy5YpXC4LQ49mOhVO1IH4XoTMiGgSAF5RtJzSPBWPx93I1Lmuvlml15EroYaudSZRivYgOM9BmVet_ZEAl0yL7FySYG1aepyalxZ1HU00b6Thn0MCYZawsK_HR6_VQsK4uVf0uBiwjSXgAT39yK9M6YC09ny5Tokdxi0CtlI88TBzhGVcsU4GBLB7zziUMsIdMNvU_08XXMdyFO0MZCCtZ4FKQ-LWrMXTd9TonbeyxHjKK55RYk73vOrurPdtncmL-7Tal-ReUfWNa8IBTbv2-5HF9pKeWiugPsYx5LZDkeMPShLLXLhUl9IrAWNJ75TbJnqCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key6","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/06c3cfdcaa30440e80108348d890bfe0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"70-948DTxaM8NbPNVnBTYQQ9bBjrA1jLjmDHW8RHZA_DvPxLHiTOLIcXX_YoZNVpjqzvBMhtoyHawmD8b6dKeyeefqkjXryxFBo2L89IDp2MKsg8iG75eeAP0p6FFWBljpfwyduuUCsOZ_x5M6_K5M3aaC2R6oTedX5Gp90dZKUQ97W4S1Im8hW0qrg_HM09vQ7RZ5w_reDC2hk18c6CnERE_W7Z8Q3AEoi17t3cRez616DvLWZxkj2YMyP5mTnYaniSIbpgBU-Eqb4UVKBAAScLHpslfS-cdQr3vyYeIOI-EO1I2K5gLq_2UVn3-VL1fySHw7zvkS9bX_TkdzZnyQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key3?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key3"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key3?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key3","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/bf97328c64bc4190b7c0b5025152e0ef","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"iC40PZjyzCPorzlWM7YTGIcZp4zP9YeUzig51DOE5iAHLXaIDbjZs2H-TO0l3q205oCX3R3dBBoJvxlEDbLjSLI4NdLym0EqIWTd4B6JelFBq-3zEeJJt4SHkMRQdkWPA7dwIEi4JgfyazFN8JkL3x-S2zSqqyzmoG4U4gpxKN3NPAyk1qmszmpKjnGzNJg7ywY9tewDlqx6MiMQkODxr27rOjXHx_hbp7iKhD3ZwTKAvX7g14JzpYIkXmKsyUtCU_pLx6HEqNUVLNyV0xfAtXctSSuudeE5LDItakUEY5oFe7iT1DlqPDOGoVmtfg3wf5OocdtajvdfZGfMRUpi4w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' + headers: + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:33 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' + headers: + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:36 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' + headers: + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:39 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' + headers: + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + response: + body: + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key0","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/a4543a8280204c68978f6f2caae4cbec","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"7wL18EOC3opS5mWL6zSV_0crQP8HuBTVxmpcE1EfePfWRFVc242HNftjbwh-D-3ypnfx0pngk5dM2Wys6K7uC8UDX7xvEIz8Q4yov6EJHFERbUH4QHy5RrywBSry31vmIHdCyLikwyekjeuYDg7jHViKLGU-aRkdSYPhXBZnGjDqzbYwH8_fh9SQnsBDVtJ5dUF0ua2xstnqjZfoTdzvMGMTqrO4rivXc34kdhMAAcbAlg7yvfN8dr9legQfIQq-vSaBuhiLpQXJ7yrCIjWtFyz52F6sVYWFRZDhAEsVfFg0KwMROwPhLDZuolRnc5113C8rZTjSrPGTvzKloqgybQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key2?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key2","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/1d4636bd96ce41dbbca191bf2d58f491","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vUAwWk483zwp364hcyCNX8EzclzX-56CvL-UAmRkaI3rDttCvgo9lDk6unH7S1E6lB1J9ZfF5LebqqfNR7MheTPuvlq034V-eQHiMFmYgbpHkyM3YYElSQulBk7dlJ5JmVW9LgdDkVeRdKU0NXzFSbScn2gynewJx5uJDREcKRKLKbD4WXMtpUep_YgJG3tT3Moy0OrgB8GD1EeGU5xGb9HKLU6B4YxT7vOTd9oP_vrUGzWLzv2gUVcat3ey0KLymyS2UEQcXazrJ8I48plMYRFuo7rVDolp2KmqrQLYutqn5c-bW_mq0kytdH-9-NxDW_zrsVSMSjuXfa3rPXQQ1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key1","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/594bd6b877b549e78c65e8e6065f9b61","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vL6fWpzKR-eh3DEeb8meE7BVQhQ3EslTQ2YFnfI7z1PSJbTYL9GzOEYDOCEw3HK1-kDQlQNuG9cS9w8a-XyXN2GaIN1d3wCsvkiF8IxSgZvyzah76cnJlY9k8s2_-xpH9-eDn2V_O_oT5S05ZDGE8S3yQXX40b12GbCzox2ydAmbiG26o75ee9Ep-VcA65Sn8gSGR8GyBeu_pfuEZR2ExG6ykluUJWV5S-aHNQP1QwC5J5lN6BA6IQw_CNiu5IIen69RATOv9OUlEcb8qUzAa6w77y2BfIPW-721Al6AVsQc5qfs-fPGvlAMMTgRpUULbZtJf_Ua_x4SJLEg5gqEEQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key6?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key6","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/a46d41e3df94485998d628effc1cc9fa","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2pOHXzB_Ek3t-w1EPmq6Wv9tDkaP1tekAEn1FDJNKSMPRwsoQ77_2VE3aggrKhRAEhxxXJqCpsnSK3aOxeiO3PAnPkXBg9FqQ2GcFykqXwQaKEeJi3oFo_Ik4O3VgaGca4g3LyAIjhcU5RglkrdP6gxBPd38ykGmi5kmxBViQc2LVCSwWSK34a_QoYi_mTEu4ai3yyfn4c2DvvJA4Nc-jUoQi4XydgzaDwFIHwBpJ5VZvHbfj88iEQ5r-Ym4xsDZhPv2ywyKokNSocbNDgpk5mpzOGW4v_ZkAuS1DsMd7ZdVYtuVzg1y_jNtaK985OWrJhTz0_VWXKLoR_sBGkNN1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key2","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/4cf7e15813524ce8a0cbbff407e4320f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lCN9N51jfLTckgcgoUDBIa8fKsi-BBeyz6RtKo0rxdiU8HiI8bPwjWomaGom950KKIvxVZO81xh7R7wOsVMoo4pmfM6IoSX9xRJKDG0Z3-rjkXi8wswKbcVP2EgPZ0ZZfMi1MgPHarfMXPMCtA1fOndYM_FGWijYbf6ngXvgvRsMkg-d5AOU0vP9A_Cw4f5CvdeVKGsbaHkXy8udls-Ir5we-S749TcCzpje2UJ7UftWOMynXPl5bagZ1jZBXqPI0Yn4lLUXmI2xLw-QkZPEBgMGyMwcjI3bGZUKHVQdnFymdXIN8xZyiTnWvjaYHGQK7w-c_bjBxs4WA5EgiIUAGw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key0","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/b7b15c069a764103aca616941247c05b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2yh-wv0OiJllHsJD2ksiZ2az_143p22PHO_3mqj_W76twCIcehvLnGrVvqBKphuOV81ZHAe0_T491wBWyagcbda_pYlYKMbhnh_U9Xm-UvQB3u6z1S7D4SotH03DCdAUFIjOad6ghlfBUJ-A-hOCOIh3QTv2vqtg7WrdUbuV_4zy1BuW0QfoBZ13apKtU-8HyalVMqkenk3__Rpqub8yifPod3Mx81JqMWGeVqKA2wwAsC8PNbu6mbjC1mGpeI1HwEZRjObRXllYLZoyN2lTOsrxZdzTQQ0biU5RL320u98tg-3a58qclvXJA8TfjEcMQyfi90fVnUBCz58A28jBUQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key3","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/00e02fa485e44c17afda5770e8153dcb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1p-HLSbIn1lvsmxtwTf9Gmsd7r--sUU9C0CSjMQzz_yXSt4nnKzNbtbPfpkG1UPSyysrnNKfz9YWIaJWrYUZbdDRF_xNMV_QHiXHrsW851fZqZZYYz_KICrD9PZoBgE9SMIZznXBnx1AXEhDtZeMsHixlIWCmW1zrnwtaa1a9jjbNCArj3bF9WK7Fz4lm4sov5J98XaOHFvaFmDIVSW1mPlU7IFY7qzvim_ADeWFFZ2ibgb2fZbdo4EK1sL8HpkrVaryidFBRYVfQjIAusI8bNTcrEp2RLvaiPTh9Kqcwqz1GIJ8rWMCjflxOHsXiwpucyekYpEMX0PJD9RKYeBSZQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault92670ac9.vault.azure.net/deletedkeys/key4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key4","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/df257ae8ce7445499e565c897a68dfbd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"3nDxOtRk2XEekU3CDix3JvDSL_ovOzFqQOiGcm4gAsnxKBF7KAOINLVdOU-jgDU1tW0lDU9EB7tgt09O3ZRn6wHfX11FbsWX_UQVVZZ1-9TN8qNm05VCT41hXVJXp0orAnc8oMj3zBgWuHRzNOO3H6HECD0O1rTtgpSzBVlkRjvJFoNZ_VeM4ALRdghGM5pZwDhZmXjPwWMNBhrxsehGcIwWwapylZUSjDTkv6RcVs7nROpDZiEyXxGkLMDZgQKcbZPUP8pUmWaWS9639d3NL-y8wvBrxkz2YLcLU4rVMZBKwQD-QA6kfRBZ-tSdm2Wjosn9tY_4ZaF5BT2bSZ4jWQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key4","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/7744766f37c84db6b97adf44cfdf3c01","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"5ffGsn2LropTgRfM75DCYE5k_rlbSIgAVqf4IFIHhIVwHdbco3qg8ROnX36f6jsH_x8JMvGfACIuFTwGLhw8VCK4NZOHIHFeq2kSSOHrqBLhIw7WZKCWrKfPBDtdKAvVmhMzLIn31FFAbNpbgDNVYa681ajXk7kBMdJaCX9ymT8a-DvNLDh3K33ImrqXZLNLX6KOh8-sAECfOVZcoRDfvzi6I5edrzxG-jMZnyYXMvdOWWO4SfmmD_-L6_kCksibxIbL-7LFqfO4rtcbv2ew87GA-V4Drm3OwQrX0h13xIuGZ5J6GVOQ8uhXwrHdz_UCL38_A5wLlWzMnDe7iMDMmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault92670ac9.vault.azure.net/deletedkeys/key5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key5","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/1977c712eff64ef9a3384f93eec3920d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"0V3D3E6vH_DcYMtkqMZjr6Cw1M6sYzYjUlu3eyNrh2h8qq2oIWFgDRzm_wvfG0k1JOuS28L_ZkYaAsIeW3mQx0liwfi0Qw3nMWFjzcLpLw9GBM6WZBr1C8uh0DbSvoWGo82FIIWONKWYZtimkep2UtBpEkbWXtBK7HMwWr1YhQxLwya-eq7R7L_F-d5CmAJCWZAfIU7shSesGIFZLYV8UzM2rfWueyEVQw0jrC5SC7eVoiIQ9t7bkGw_mooqod7KdIDIIyeaOpe-7xd8EqntmOeOl2EYehTeH2oaUwm-SWSfE53-Jf8GzqHMYLsXO0FcYTkZO2RCl630YSJWOQ0J_Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key5","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/0b821b69a2a3451793d33595b4b52674","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2i-Yevb0gLnOGSWkCrRSfbsui3vbi5PcXH8mYAA-O5DF64zVu3tgj7MD1bHG9Xnw9KX75MRwPFZoZnXByNEWEPyndhbOsNTypLxcFYagDEB9tMH9oO_M6SO7pOotlnqKT_Zhf4w3hWK-Gsrmovl6T2729nyAOmbVjNosC-u5JCU128WXpnel8HbJXKMjtmGDVKCOBErTm1ZYTeGjr8nMnlhnOFbaRkGST3c3YcaabJ0ZZQ7BVhna_ddt4de5yGxfNUi4-E2KwwcC8EWBWAL4idDfeaRGf-J954hMdtQXvIFjM4ovpZtajP5OjjcGsp9spfChZ4UMsmk8LMWptzjukQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key1","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/e2105e596e1244a496166f11ef3fcc83","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"q_cGt1m0sRbgdPQvIy5YpXC4LQ49mOhVO1IH4XoTMiGgSAF5RtJzSPBWPx93I1Lmuvlml15EroYaudSZRivYgOM9BmVet_ZEAl0yL7FySYG1aepyalxZ1HU00b6Thn0MCYZawsK_HR6_VQsK4uVf0uBiwjSXgAT39yK9M6YC09ny5Tokdxi0CtlI88TBzhGVcsU4GBLB7zziUMsIdMNvU_08XXMdyFO0MZCCtZ4FKQ-LWrMXTd9TonbeyxHjKK55RYk73vOrurPdtncmL-7Tal-ReUfWNa8IBTbv2-5HF9pKeWiugPsYx5LZDkeMPShLLXLhUl9IrAWNJ75TbJnqCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key6","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/06c3cfdcaa30440e80108348d890bfe0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"70-948DTxaM8NbPNVnBTYQQ9bBjrA1jLjmDHW8RHZA_DvPxLHiTOLIcXX_YoZNVpjqzvBMhtoyHawmD8b6dKeyeefqkjXryxFBo2L89IDp2MKsg8iG75eeAP0p6FFWBljpfwyduuUCsOZ_x5M6_K5M3aaC2R6oTedX5Gp90dZKUQ97W4S1Im8hW0qrg_HM09vQ7RZ5w_reDC2hk18c6CnERE_W7Z8Q3AEoi17t3cRez616DvLWZxkj2YMyP5mTnYaniSIbpgBU-Eqb4UVKBAAScLHpslfS-cdQr3vyYeIOI-EO1I2K5gLq_2UVn3-VL1fySHw7zvkS9bX_TkdzZnyQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key6 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key3?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key2?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key1?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key1 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key6?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key2?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key2 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key3?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:47 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key3 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault92670ac9.vault.azure.net/deletedkeys/key4?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:47 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key4 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault92670ac9.vault.azure.net/deletedkeys/key5?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:59 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:47 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key5 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key6?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:59 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:47 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key6 + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_recover.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_recover.yaml index 4ee4fb170618..e24f206c563f 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_recover.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_recover.yaml @@ -4,2604 +4,2008 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:57:22 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:22 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key1/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key1/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key2/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key4/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key5/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key6/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0","deletedDate":1564527444,"scheduledPurgeDate":1572303444,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key1?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5","deletedDate":1562703477,"scheduledPurgeDate":1570479477,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:59 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4?api-version=7.0 - response: - body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:59 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 200 - message: OK + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 200 - message: OK + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key1"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:35 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key1"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:04 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:37 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key1"}}' - headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:07 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0","deletedDate":1564527444,"scheduledPurgeDate":1572303444,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 404 - message: Not Found + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key1"}}' - headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:10 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 404 - message: Not Found + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5","deletedDate":1562703477,"scheduledPurgeDate":1570479477,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 - method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0/recover?api-version=7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4/recover?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3/recover?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key1/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1/recover?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key2/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6/recover?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key3/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2/recover?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key4/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key5/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: POST + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6/recover?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Key not found: key0"}}' - headers: - cache-control: - - no-cache - content-length: - - '64' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 404 - message: Not Found + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key6/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '64' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:17 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '64' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '64' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:20 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '64' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '64' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '64' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '64' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:26 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '64' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:51 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key1/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key1/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key2/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key3/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key4/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key5/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key6/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key1/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key1/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key2/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key3/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:55 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key4/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:55 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key5/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:55 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key6/ + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_crud_operations.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_crud_operations.yaml index c4fcbb136ec5..311c72bb7799 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_crud_operations.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_crud_operations.yaml @@ -4,409 +4,327 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault9627173e.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:18:51 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:58:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: - body: '{"attributes": {"exp": 2527401600}, "key_ops": ["encrypt", "decrypt", "sign", - "verify", "wrapKey", "unwrapKey"], "kty": "RSA", "key_size": 2048}' + body: '{"kty": "RSA", "key_size": 2048, "key_ops": ["encrypt", "decrypt", "sign", + "verify", "wrapKey", "unwrapKey"], "attributes": {"exp": 2527401600}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '144' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault9627173e.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/1bb7bf47dd094b40aa9c050474731167","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-JtT7b6aQoFd3zphPJ6UkTUHc3j0wzUXYodlpplJVWbNc0wOkaeA41omIFcMIVekvTmFJrFPMw3NFTwGeO0TrbQvQJtmksfIx3dTPWOG4zlWcnWrHMhSS2m5HZwYQPWFhSHB9VtgBE6fCzosaInazhiI61f1eGULobYGiRWv3fZ8Ez4iF531AC1RbgYT9uHoOCZ6a2LvwBOOEC3vGLJGRy0A9Ez-s2Yek_fy95ZVySOD7J6OSh4h_GC9roVICi0v9fHwGd8MXCRnKzq-lUxrylIsyfXU78PbG4rojGMQswD8oPfkONH45jWSBe2e2SXkx-HiRQ4VzbMKOxm9bpSYQ","e":"AQAB"},"attributes":{"enabled":true,"exp":2527401600,"created":1562703532,"updated":1562703532,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/5bb4d99959504269a7f5e4bf00ae97a6","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"pmTUlox1v_IPM5MvQyBqp98q8Xhf9Jl_sLc_Z-GN-MSIEXJUuy9otFpP7AxaiF_EpmRWHfhvnnYvjHMEiye29zhavf_nreGFJFoTtWi0ONPF9CCEjG1xyxwnp6wA6EuvhdVzY7NZAlgqQOGULH4QSFsiQw4WZrEJBdV3nsV8aBAhe7uDhHEuy9GZR92l1p1QUrMwOfW1-ELKV0B0naLY5bScduOJADZAe_C6ChHye_e4Ha4L9xH0arfgf5A42t7UCYF7N0DAKK94EDRHTJlFXWt--MzFatkLQtaAYrR8PhBIRB3lwmPmE0LS73KHxOMqBJRlilUMCUxTUXkGYIuxsQ","e":"AQAB"},"attributes":{"enabled":true,"exp":2527401600,"created":1564527529,"updated":1564527529,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '673' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '673' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA-HSM", "key_size": 2048}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '36' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault9627173e.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/ab5beb5937e94d788ebb0ccbdc4859aa","kty":"RSA-HSM","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"pebUyWT5U8L33ZSuWtyPAcoHvB8gOQySsc1PJVzt03rA5UJrfwtJ4Qr5sHS4phxkUmG3gb4FzUHwztAPRaTdwquqM7b9Qk8OPP1BRZeZrrM78iATXd0gM_xzcFs6GE58WFc-ZFVTC9PDVb9ktwDwwf5nSLGsPlqW0dPZEaOkFwv6w9RBqyJtdvGw7zQGeKm9oRG1eQXNSenhJfiYLyDM1Ve6eiSYEBwiG3KAr7QxBIoRxIqecutM2e7MwLWedoPr0BwMUnI6x9k78ytHv9YaHkRU0cLN34o4t4sghoRGape1sg-SR8NW298U5LyukSRX68zAn89d1LU2X-gBSUA9Yw","e":"AAEAAQ"},"attributes":{"enabled":true,"created":1562703532,"updated":1562703532,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/eb05248e5ec54109bf3b4cc3d9880773","kty":"RSA-HSM","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"rlLVJ4CJfxs5CnDFBNqjxlE7c5pcfDFU7PR3v47sL0r0-pPHBya1yUY7Q5FaqCqOIaYAZ9y48MLmcBWHrY5A1xj70DnLXc4ss5KazZopPjCGDLjNzzsfd8YSb0BGm3CrmaYgTXWy3KUbBNR8GX1KaSZkL_OtlPh0jHluHukTZDCsNZWXFqC2ffms31dh-IG9JL-zwtb1zDHJ2oBI43Che5nJVY1_y4ebFDXanwyHzbww2KkbXupR2mK0GqbI3uvjD4v5BEJCX6mCtY2gEW35B1K6lsFgqEFwybD8zbjGKPmrLE0WwFZoXXtQtqch0dica4G4lZm2oX9LnHq_3tPYUQ","e":"AAEAAQ"},"attributes":{"enabled":true,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '662' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '662' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: - body: '{"crv": "P-256", "kty": "EC"}' + body: '{"kty": "EC", "crv": "P-256"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '29' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault9627173e.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"uiR3274tb0zkEvMPr_sxHsmHhutBdxftwkqFiamW1-w","y":"7xk9VqY3UcNGM3V5gnmtHb3vq_q1Q36Sp4s1zA7lDKM"},"attributes":{"enabled":true,"created":1562703532,"updated":1562703532,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"CYFBDHsovMeX0Skq-Jz-spYFLV1KvE4hOEOizQIQHz4","y":"J2E_YSzULuCNo4LZDDRn8IP7inCBoCS-85vkGd8pGf8"},"attributes":{"enabled":true,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '367' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '367' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault9627173e.vault.azure.net/keys/key-name/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"uiR3274tb0zkEvMPr_sxHsmHhutBdxftwkqFiamW1-w","y":"7xk9VqY3UcNGM3V5gnmtHb3vq_q1Q36Sp4s1zA7lDKM"},"attributes":{"enabled":true,"created":1562703532,"updated":1562703532,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"CYFBDHsovMeX0Skq-Jz-spYFLV1KvE4hOEOizQIQHz4","y":"J2E_YSzULuCNo4LZDDRn8IP7inCBoCS-85vkGd8pGf8"},"attributes":{"enabled":true,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '367' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '367' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2?api-version=7.0 + uri: https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"uiR3274tb0zkEvMPr_sxHsmHhutBdxftwkqFiamW1-w","y":"7xk9VqY3UcNGM3V5gnmtHb3vq_q1Q36Sp4s1zA7lDKM"},"attributes":{"enabled":true,"created":1562703532,"updated":1562703532,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"CYFBDHsovMeX0Skq-Jz-spYFLV1KvE4hOEOizQIQHz4","y":"J2E_YSzULuCNo4LZDDRn8IP7inCBoCS-85vkGd8pGf8"},"attributes":{"enabled":true,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '367' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '367' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f + - api-version=7.0 + - '' - request: body: '{"attributes": {"exp": 2524723200}, "tags": {"foo": "updated tag"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '67' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PATCH uri: https://vault9627173e.vault.azure.net/keys/key-name/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"uiR3274tb0zkEvMPr_sxHsmHhutBdxftwkqFiamW1-w","y":"7xk9VqY3UcNGM3V5gnmtHb3vq_q1Q36Sp4s1zA7lDKM"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703532,"updated":1562703533,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"CYFBDHsovMeX0Skq-Jz-spYFLV1KvE4hOEOizQIQHz4","y":"J2E_YSzULuCNo4LZDDRn8IP7inCBoCS-85vkGd8pGf8"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '413' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '413' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault9627173e.vault.azure.net/keys/key-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault9627173e.vault.azure.net/deletedkeys/key-name","deletedDate":1562703533,"scheduledPurgeDate":1570479533,"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"uiR3274tb0zkEvMPr_sxHsmHhutBdxftwkqFiamW1-w","y":"7xk9VqY3UcNGM3V5gnmtHb3vq_q1Q36Sp4s1zA7lDKM"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703532,"updated":1562703533,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"recoveryId":"https://vault9627173e.vault.azure.net/deletedkeys/key-name","deletedDate":1564527530,"scheduledPurgeDate":1572303530,"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"CYFBDHsovMeX0Skq-Jz-spYFLV1KvE4hOEOizQIQHz4","y":"J2E_YSzULuCNo4LZDDRn8IP7inCBoCS-85vkGd8pGf8"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '544' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '544' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_list_operations.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_list_operations.yaml index 6c925adfa57b..d69c5663290a 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_list_operations.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_list_operations.yaml @@ -4,612 +4,492 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key0/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:59:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "EC"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '13' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key0/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key0/8bd25d6c7e4d4c95b249df2ad1a06f03","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"kt3oH8H10CKe2_VPcIxBJ4PQt6O1eCkmCrtyHmdmF6Y","y":"Oje7K1kKsEoeFQn7WZgJ0pZ5n325HykdIeOXoOgVes8"},"attributes":{"enabled":true,"created":1562703511,"updated":1562703511,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key0/99a194f5b97f44ae9125c47157810df2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"b-JfAkvIfu_ILrlz684i-pj0cpd55tzyHDWcW8T0OaA","y":"w1TcOgtEU3ehfOd5jRiZl9PNRHieGIDDwUcWCGuNeQM"},"attributes":{"enabled":true,"created":1564527584,"updated":1564527584,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '363' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '363' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "EC"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '13' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key1/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key1/986a1037ce7845eb9b3927fc07576f12","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"Ulzv_dmHaTAW68YM9dNRAAtYHSxfIWG1pJsl_ZVknvo","y":"ywMBREwV1gC0OBCHul6Mm-sbwku3DjQA1yK7CpQyFBk"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key1/fbc0bda5d70640fe85e5fb435aa55d93","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"7q_mEVJXTIDf7a0CVque6SFN5tXoJyzlZENayGeWsSI","y":"rL-ILnqU7evEpes10rf3xzsnlEbg6gdsDfc08s8LN4k"},"attributes":{"enabled":true,"created":1564527584,"updated":1564527584,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '363' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '363' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key1/create + - api-version=7.0 + - '' - request: body: '{"kty": "EC"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '13' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key2/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key2/a0501fcbc568481b829637c6a92e4abb","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"--BpzoUqMk2FLfcY1VnrLKSzW4GtjfBu_cVUFATu7mY","y":"BU_Q-pS8w3hH9elSSPe0jKzKj4Ey03I3GdgGy_tS7mo"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key2/21946cb8e9d14344a7c9ba8d3db75227","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"Qw1ppcyCUcBHgQ2UEyuTdPYTwOGn7OHLxsT8lXeKdRY","y":"gTWfs8Cjd6QWnWeaAR9lzVePttSlFLzoX1c80aNAkyI"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '363' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '363' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key2/create + - api-version=7.0 + - '' - request: body: '{"kty": "EC"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '13' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key3/b62f8f82b76b47549153d116b383815f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"VQqpb7RotE1iQu9i-7iRZGg8GOpxVQQB6tx_7tMPMZU","y":"SRqLIoGAGpKgrXYP8JwBPSEdW50xNPXpMOeh4YkpvgI"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key3/8bb57a6e699544c6b71d279fd8df32e9","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"xs5QeiF_UBlgmjt9gcJPoI_d71xgE8RqUl_q3Gna760","y":"rfbSl_9PK-Pq704mE6SQIyrhDRK66QIme0DEZHi2rPQ"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '363' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '363' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key0/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key0/6b36301002db4081bfc37dc15a3cf31b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"9rz853RQmmMerwKCfQpSONzDOwC9mniosBB0IWOQldmNJL53cj-yYVaXIaXyblWBA3uDkwWFLFvtz8_mxDowBxMamsJ46_njsKswVOHCgvxwilwc22EwEPyxaQimvRipMtU7mHMEyETOhvMKNhifTa3kv7YKKNGrIO2Psa2MvH7mxdYmjFhbPgdXwF_b7cINa2UGrf0fI_aXryJjY7E1L6J2GDAXiBGaVh59FMRU1DQQkRBBDVIzuGep6QLhpi9Jk4fUKYpFwL6ees5KRmg_Ztgz8E15yWkSRmsoEcNvrL6Enb05blHGNc6uCUYrRcwki1VV_mGW-DWEOE0zHaQysw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key0/0be8a06e74a14348be5604f2d9b2f3ce","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tBGkSMbkIgrbJ61a9DarlO_4f08KDkv8II8OHveKO7JCC2oWX6tOuXdn_zK00wY_Z7QkpBcsdStiPVjdyh9EsyqpaMoheM-HYFPNIMFOa8olntSvHs1D3pAoaHlJOh4-w9QF7CQALLHb6AM5t6molo8Upui1Z7XdHGKXX7RO4IYA752AzaLIakjLO3TCAMinZmnDDGAhunUB94_WpsWv1AAJSFSPjDHCz2dakZnLvreR-EVZz9nk-l3R8aQcr9y9p__ksIshnGKwJJ9l2vMO6p7MiK2RJLd-HFzEWDFKkWfYm9iRfp5vcoNxujLbXP2Rde4qvVlW5PmjLiBSLBxEhQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key1/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key1/a298f2b63271489f807d41d71a2e10c4","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wWuHzO89M8QbAl7BsuKWydhq_xj0RkrAsUjJTtRiLJs6CGl4jkvI9jBJb25Wis0anulK7cQKLv9K7MwtZtpLhnbUya-Qj_D9d9BSOCyjm_DFH9v6tNqKuexqKDu2aUrulDxXqUng4jW_4Is7P2g1uhkdoMJ0pzkToEIi0TUETmfUT7SBOgwr3zwPKcLGeO8H5jwT7AS7lVaz6MKFn07vVnE6sVq6Jxi9jyB6IHO7iwRB6w3cGVPexJGft5m3bt9Kuf47WHyOzVHqmwMMv5W2r8Wb5zVv6cVnb08o44OqGKOGXk0vqqiM2QAB__vM5MbVQMK2TcuJiotjiSHrNJZ8pw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key1/6bd05085b2d54b9093127c75e5109209","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sUhJXxGr6fnKoM9o2q_-XBTFhglYPxfx3XpPPRaTCQlS12cWlu9mKBY1RyuJafMWsUP73N8iNJKa4qFF1C_F6PGBMPJ8lANW98WmJwaF764ZpkEkndGC7wCmqeWQkx0s3PH7mG8jj5uZdCVRAkWqGtmPfxBmV9dYRyDWVgr1r26XnqYzHhXclfIlOdg7VLg5xbtJ_rzrGP5PeETOeBDLJy_4iANPL8YVaJg8r75W_g9JjvLm2ieg66uqwvIm5RlZ8RtqcNgUXLlaCmYXL1jFbTP5lRXFPkXFl1DmXT9pXKS43Wo34MFOuU1tCJsHvtXgyeUHUKHpBdbhxSRc-UZmow","e":"AQAB"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key1/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key2/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key2/022d0289f15b460c830fcd30ddfdafca","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"z56wacSTQoxXCtyq_6uTAUvh-UESgYVJy2RbWQ5DMl1ZJDeIHTublcGy8e_kBOUgkiCFhObP29e8DaTEhuc-vJ62XX2EuDzvmMp2tUido83IIeXatP1gb4TQpXAVBviFXdPQNbce1sDZ5XpA4Zi8HCV1QqVyAJLKTJB6hOpwTW_HXG2qpYQVqOhMXv-39ZkWnVWSWLfz9kKDvfbXCeBDiLz7iVDVdB8ELExAi6vz4xjCRZPExQCCvXXu22OsbehfoW4FLb_NhcTjmTQQfCQ-3G_eskXYl8envgVsi5dxMqklnb0aHM3PTadXrY1wcnjLhYL1vgC7LKS7dc8c5rX29Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703513,"updated":1562703513,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key2/a7fd89dcc95045e9adac42c03dcc7c42","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"n1XbURcEge3wXm6Nk0F10k896dMK7xHaM4pJM6en8WHWuP0OJbTM9NzSmtyhZKh0akiphWCgfaycX4aChrB-7tYGxGcNS3iACwuciBbYeE39tzhJ5eD8byzCWUQVJkx4vsMOhICsaZcrc1Rei5b_LHu-U-T0CTdRDGM-Xvc7-5zP0fLWhhgxahTnTzEne_j4LGIp62H8ijge-btNpU4yK_lWMl0JNgtSSmkY9GTfU0hOqBvCQqWeZ2rfOczeROyzk1XEaLIsjBeSK4us8qjg74OpRGyl4khN__eYIjNPf3gO0qTQMljWtGc4iwG5n72tlx9yg8uIQP9fR38O5xXBVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key2/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key3/f9aabe1e98594882908b42b110e3bc82","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tazNLMksNQi1DwDd3CF2qpnUteGfDXKoraalUO1qmpnVVta8m0z3Ekl9QQocQNFoJlIAnG0PHRrnKRdLt5QMiacE4VO61G-KqP7l-2L6CbC1fEywIqE_FNC7U1neWDuSpel5s1v9HSQp616yUz4zGaBMdwzPykyp4bo2MPcRXkrpZjOBUaX2Z9MGW58Q5ic3Aj3l3MrNY_uOj8JdisNSShn0tnzez5QOV1rdEOcYzmzrNCr00xqjY1qE70uhKSFfdIuxKEsRU05dCuJTbAyLKj_vhsnnnyKQEN1pXcQCO2XaH_ZlCsXdvwWbH5Ptldyn2AHJQ2FT9iLGNOmgr820jw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703513,"updated":1562703513,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key3/14a31e671a3542528b59e4dc06e16bc2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vJCL4Hqk2sGCa8jhMLNRXkUW5fxYdXReSH8K7p7ntVCWnTQGxQVo4gWDHT21Jl8hPCsowiPcddNMLBPV0PTH7J4hTtH-Qsf0nTxduGXvsUCPZIE8noWq4ExTUhoiBysZ6ginKjc_YHH8Dvd3Ei9CK7GP5JF2sfswra1MzU9M2sOQrcFy9-vr6HzThDyhSZpfcy3wN4RvQPLKGxS7tv9bpNrUWoP-1anA6rlj3I1qgbbKS6JFr8X8bxfbql77qOAl07j7zpdaPLGONa2WW8V7XOgR9x_2DLwLJxccBXHURPa3YvMm0av_xSuLZIEIk1cQ11WLSRUZemY-PXtXb_kXww","e":"AQAB"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key3/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault96d6174c.vault.azure.net/keys?api-version=7.0 response: body: - string: '{"value":[{"kid":"https://vault96d6174c.vault.azure.net/keys/key0","attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key1","attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key2","attributes":{"enabled":true,"created":1562703513,"updated":1562703513,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key3","attributes":{"enabled":true,"created":1562703513,"updated":1562703513,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + string: '{"value":[{"kid":"https://vault96d6174c.vault.azure.net/keys/key0","attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key1","attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key2","attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key3","attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '707' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '707' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault96d6174c.vault.azure.net/keys/key-name/versions?api-version=7.0 response: body: string: '{"value":[],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '28' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '28' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key-name/versions + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault96d6174c.vault.azure.net/deletedkeys?api-version=7.0 response: body: string: '{"value":[],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '28' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '28' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /deletedkeys + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_backup_restore.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_backup_restore.yaml index 16f0745fa807..84db990cff27 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_backup_restore.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_backup_restore.yaml @@ -4,256 +4,202 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96041739.vault.azure.net/keys/test-key/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:00:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96041739.vault.azure.net + - /keys/test-key/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96041739.vault.azure.net/keys/test-key/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/7089b08b10a64ec68db241e20e2109d0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qbGcivUVxthKiCxcjxOGdsiItrjjTm0_-o0gkZmRSDlEY4ixbjJYBZMwZLxLm7_ZzoGTVTdON-_6bLu-ZwFqAAe2Nc_HDLkL3FTn1YkjTSA5I6FTXI-CC79m3mPLbrVNkHRUkN7QPpl9Qak8RyRl4TA5XtOp_ztKm5Lfuc1eJsosaRdqaMe2UlEbu0XCdYDoP1UoNRAhrUZwli-GHH6yWQxq0SBtnfUsXH0CkgprrnpDYM3dxUkjJJ6IRpW4acRXrFDg-ccCBQDRLty6eSRehugfZyTGciaT4fBcj245OjytQZHxz2ZGixRxN0YsvjoZXqquXKqfkKEcknMDNapyFw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/d2c863b455c9439b87fc78c6ac184217","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"uWCbdAq6V_Z3_JRNeKK4o27y-v8lL_IUNGXQHywjTU4aoVK8iDvM0ChRMhlChsMcI-SyGaAk7kiS2ywdNx5JI3rcaZiiasFZ-4CUnUQbOB_p5L_r2dDXvfdQzGaigM6cttEW5Iwze5dEd3BOcDQumxRrtSJNld4AlxEK-Kp7xaOUFc_2yAV1QPvELtjJLN1zMNw12FXNqocpZwZ8t1BGvvXKYfz3yrS6rq0nG36n3S1yA9Cb0NnrTjp84na3diRQXpuaUg65QXrbhcBW6o1aKTsuEAVH5FAqDliBa4v5lqTNsWxOGS996rMfjsJHJQ_fymvIy69zHrMe2UPupwz_OQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527628,"updated":1564527628,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '644' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '644' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:00:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96041739.vault.azure.net + - /keys/test-key/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96041739.vault.azure.net/keys/test-key/backup?api-version=7.0 response: body: - string: '{"value":"JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLk4zTkxnQUltVllzMTBLb0R6T2ZkcGI2aHRhMFBQNGxQOXh2VWQ5dEJEaUE4X2dPa1hQcnFza1dMTDd6d1psd2FOYlZNbFZpbnVzbmVwZndNUnlQdENmaHZUSjBMWG5PdUh0TmJfcTNpY1F1LUt2UnhfTHZpaGp4bnVCMUtKNW5ac08xR19RbTVPLXEwdkZySGZJNE9ZQjhIY01fR1VaOGx1dlFYWW5aSl9mY3ZaREZmazlWdVRzaW5fQmxCbXN6Q0JrdnA1LUFrMkwzQXFDUml5TUNjNTMwTVFPbjI4eElXTEhUcUdBTHpLM1pRRTNFMTdqVk9iT1ZtN2ZoWWh5Y3JHYjJWZFpQdmkzR2Vmd2xQZlFNal9VUlM3SzNUc1FkSnRUazREdVdsWkZJTThHY1R1NjZ0dDhIblA5LUE0Vjd5RTliQWJnWXlCZG9QUnhzem01TVg3US54dXBZUjhXMGdvNTI1eUlCSVdsUzF3LnJ0MHZkWFFDUlAyYjJ5b2htdk8wdlRjY1pKLWVlQWNlVHF2WVpEd0tqX1R5SE5iV0RQcFQ4ckN1Z3JpcVJ6ekFvY1hNNDZWME1Fc1JFbGNKTnBKNVNPR0pzeEQ0dVM2c194aDlCQjgwUkRxZTRHcllGckpsSlc4Wl9GLTljMGI2dm54aEhvck9vQ0VxS19VU0xTcU1wNE5pS05CMlZ4aGV4My1NSldJS0Q3M1BxaTZQdnU0MVZnUlR1NGlqTmhMeDJYQ3NtRFpxZkVuUGZHeHFQcWdVYTVvRm9uYUh1enNyRV93LVNORlhlWFQ0Skp2SWkwTFNMRDF0d25CTkVpNUo0Qk16TzJzZExJODhWX001SlpBLXp3RmtGRGNHUnJGeXJkOHVwaDhMVmFrMUpKZExvWkxocERmRjRpQWVLWW0wT0ZtdV9zNEFzbWJCR3ZuTnpUS3IxNlpNZlNrcUtuMm5uUHc2aV9JN3FzR1lEX2xEdm5KaGx2cmQweW0zb1RlSEFRR010OFRZRFhqNXZTejUyNExyNC14M0JMaWx3QlI3UF9SQVhfa2d3LTFYbjdGa3pGM0lscm8wMmNsSUxPWDcySjJUT0JRT2ZZVjRyOGxscE5Bakt0SEJ2cFFRMXV2MTRZbkhhN2VKTVlWWkEwV0VnSlg4elhJb1Nwemd4VnNLSTlRU2ZQLWZQVGdMQ3VUNm1iZVBHWWdSczE4dDdjbGhJaTJwQXRtaVYtam5GVXZJMXZwbWJzekg4SDAzYmZxZF85QmpHbzlzRklNVTBwZjR1Rk1aSmpfUnBldU00MjBmak91clpNY0xFV3lYQm0tU0E0ZUdjb0ViRTlqaVA3RUlveHVOSE5STVpWYjJtdTVzTHplZTNlNXJENzhMazV6bHpld1hPRHdyOHBiY2t5N25hTmRhMi1zOWF0WThwejBQZkhqUGpkdEh6NDEtZkhObl8tb0t4RWU4RDE5LWhRY3pGZkZkaGUyVloxYkRQRV9FckdJSGg0dndSaGNudXllS3p5bFMyQm1WSUdMZ2xzN2lRc2Zta1NpUUl0ZnoyVjZFMGh4aGFWd09PS21tNkpDbWRLR2s3aGE0a3h4aHRxNHZoQi0tclpFTlRTamc3MHdOOVVacFVlUnFQanYyQ1RVcUQxdXZPMHRRTW5zQjRVSWxwa3lqTlpaaVJqVFNaY2FhRzZGRXpDUVczV3c3T0l0S0FBc1AxNnJDYklZVUdRTkZKcUpYSnMybDEzR2JkTTU2OUx2Nnh4V2dSUm1UQ1dKMnJSTEtvY0ptOTh6S0gtV0dKQjA1cVlaT0JZYTdQOVlrdExNZTYzUkRuc0RoZzM5N054UEJFT1pvenh4Rzk0U0tLSUNyUXJYMEJvYmcxRUFlcWFfY1lvMWpIcjUzTFhBV3J2Nno3UHFCYmRVSXM1cEI2cGo0M091MDhzV0c3UTVyREZkd3JHZEpmallLR1hQZnpJcUVJWi02a2xZeE94cC1kazlKT1dpZFdQd2hmblhyWFBsa1ZnOUhDMkdrYzVwM0ptMlVCWE9MQzRZM04tYTBYT1UwSHhjbDhjbHlwVEVpNExCNV9VU25sSFVDVERuS2h0TjE1WEZieG9obnpySDJRYkFKeWM0eUJKeHNZUDRJcVV6QTdBdklfYmpxQTQwX2UxNk5yMHB6YktIU1czZWlLTzBPSmJqa0JONnBlSjdveU9vX0FUU3Q1RGsyWW5DRnBHMDFnY3V4aFdpaE1NWVVzdm1Td2RQb05FX2xnazcwS3FwbG0zbVlTM2UzSXhCNnA4NFBFT3pnMUpwRUt4U25EcHZ4SGxUTmJzSXprUTlIN2Zmb2dLcUx0T2VySkg5NGZ0d3hVNGwwRXFTUHRfMHVFTjlBLTd3WkY4REhhOHlReW9wSUxkS0JOZ0hsN3p0dzJVOVN1TEVGeTM4Wlc5THllVWRqM0dDNjN6SURXM1pHM3B3MDVHSVlMVHQzdHI0NS1LdnZlaHpLYmhfQWxGcTFnaGV5bS11R3ZyME54cUVuTDJzdUFyUy1oS2ljenZiaFNuUFRuQTNHdkVaRWZkVDcyTW4xT2JTVnBVNzZSZlUxand2MXpVOUZ0V1l3dk5YVHU5bF94cmIzSGJVeE1vQ1l2cjJnQUZ2RXVHaTJwS0NEb1J4LWlRcmZlS1Q5Rm5xZmpic1RxQ0pseHViNDA1MjRuVFhTWVJQTnJscEhJaVhBMkRyUGtBUUdGakcwTG43S2VrY3V5ajF0LVU0T0dNM2JaYnY5ZGJPV1hIcVFQUGhrcmNvTTd0SFVyT1lPUmM0ZFdsX1JyNHlqYnRmQl9Zb3BtOHl4ay1uZUJ5VzJqUldaSHhMWC1vZUlQZWFBVFBvTE4wZURsX2F2bTNiY2hfb2xNOEFfNExTdjlDMzRwN3BkcnVtd3ZaWTYyNWpqTFBxVFBOMTFzQXRDVDdma3FUODZxUU0ydGkzS2JBRmVSY0ZtTzRvQjA4YzZRWDRCWTJVQ21xT0Q1OWV2RDBhanFBdnhOSEZ4eWVnS21MZERoREN6MmJIbmJUMlhqQU53aUhIQUV4SnRINmtSMGZiRGF5QzRZZjZsZUFva2xVeF9LaGNwUjY3Y29VZWN2MTJPa0NhZXhCZFJKTmI0aGUzTEVhQ3pOUGZ3YXc5MGVMRnE4RjlKSEFLdzgwNW9URlFyMkZBcWl6OEppMnRsR1RsTW80YndNM0FJZUhpTFZzU0xheWRJMzJRbWVzeE9ScG1ZNVRPSHZLMW5QaUduZGZnWkpNajlpMTdOVUlKcTRaeDhHN1BYWERJcWlseU95UWdvN3UtcTlhd1VmcHh3Z0tMb0pQNXVqVXZucWxBV2VPZ05KbXZNcTIxRU9RTUdZdWlROU9CUTJROXpyQVNXWC1BQW1qemZEUENXcW5BOHNUQnRTZ21FY3l5eDkzek5wdjBnZDdhd2l0LVBlVlZBWXpfRGxickk4dkNOVHZxU181ZWJwZmhPZmlkbDBJV1lBZEZQOXJVLVI0M1JOZWZ3bWM5V1pLek1RZm1HR0lsN01RSjZBQ1FORVNsYUIzdXl6RmVKeVdfQWFTMWh1RS1PVGVoVGpaWEtKY2VPSEo5MXotSFFQNEk5bVhrTXllRDh6UFZUVnVNN1BUNnRYcWNoR1FSdktIckVudmFUZ2tsRGt3bXZHOXI5N3FGQ1htRDB0Um9pSXFKN3lSNFlNN0ZLVWdaRnRpVEVvWEgwb0tKc3ZQQzZBcU9ZcXNlTVBWN0t3VGdZbUdjTWRFVlBCT3BBSkF6MWtyVTN3UVRtb1pDNlhhSlZ0VHptVGo1QzhFekdEMkFsT0VFSjNrcnJyTGVRR25hTFdhOHlPUzVWa3VpNjNvQ2RhZHdqLTZ5ejVtYTQzLXQ4Slp1a1UyWC1HYTAwZ0J2aVhWcnVuNW5BczFRMmwyUTlMWlVESG45UGdCd05SNWM0WUN4d1l0a3FmR1Yxb3FLSV9rQ3lSbWYtSVdTM1BLbFpNQnZYaHFzakIySFd4aHR3RlhJWkpPZ09YUkcxdDBaNGVERWo1b0tlMGFzdHNvNnpySWZ5dEZMMHZhT2oxZ1VjR2R2ZHc2UXRNLXJ2el9tNmRUWktLb293YmJpTmt6SGRuMEQ4Q25MU3JKUW44YmstWDJyTm42VmgzRUhZZWNBSE9BNWRyUHVBdy1WNnJXQl9FblV5ckJwYVVUVTV3MWhNYnMtcnY0OUc2bk1WYjZtTFVkU2ZCZURfdE9XQXptZXhVdXB1eGxkWTdOVGRfTGxKRVFxNUVQQWt2SXM5N3Q3WnlVMVZuYzJ5N2ZXZ1N2NkVLQmNmanZDWno2V0FjaVpPRkhWcm9hQ2dsM0NFQzFkNW1wcHluWUxyS3FRRDQ3OGRoRmNuQXp3WmgxNVl2NldzR2lkRGRiOEVDQmdOZ0tZakJ4YnpmZWZJNTRtaERrRWl2Yi1nYnhfZlJJTWV3MWdBb3ZKTWQ4ZnJRaTNhRExBNVFySl9ZNkpMWGtKdzNUdVNpV3dOX0pvNmRJT1lTTEZhdk9aMXZjaDNWaTJKcWVJXzAwbEs1TGo2MmZYNzhHTDBsd2RGRk00azVBUjZMVEl6bFlNRVJuM0dHbXN0cUh2bWxpVFkzaGNnNXlpTEx5dmRsWVB0WURQTjVRRE1NaGdWdFctUm9QMVNHbk16cVVrU0pfcUxYZ3BzQjNoanFkbUFZSEk1cXJDWkdyR1pieV9Ock9zVGMxczV5QlhGOVhkWkFDZkthWFcxdmpaTjJFSWEwMzRNOEw3ak5DdFdCRmhzM1VRMm9aZmJHQ2ZqbFdqdWJsV3VON2pBWDJTVnQwREppb2ZBZFJUZXhwY2hrU0dNRGJNR2daT29Yc0dJM3I4NUttV2RQOTN1WVJ5a0dxVVBnRlJxMjVDaVh0eF9BbWdVOGRmb0F3M29takNMcTZUVUVkZVoxaWZJZDFIeWRWdDFFZFlCU1Y4cGU0dzQyVnpxY2FONkNiYVh5T2NqX0ZicUJsV1owM0FES0oxaFM4Zy1wVDF0aG9SRWQ3U2RhYlFfUFhJVlYwMFRKR3AwdS1VYW5kZ21zU1BCYTU0QVVIQjBrbzNWV2ctdmdhSmU0WC1DY054SjREbmZzVTVzNWlSVm15aEZmajNBUzVTREdPNjlMQ1RoZUlhd3d4M2NwZDZHa19nTjdwel9IbFhCNTkycFA0TXcwTk9IUG5lQ1F4SlljVkpvTC14ZVJBWHMxT1VJMDItcy1tWWE4bTRGTzU5OVZwbnBWQzd2eEZybmluUm0tU09KSktSSDJYSGRBbjlTVTZlMUlVMnZJaE14djBjdHh3NHVWa0d1cUhnRW9xWWYtQW01dkpLNWs2dE1BSVI1RDAzdlBpLWtGY2w1YlZUNnVEOWJSQmVDVnZXdzZac2lydjdmMEdPcXpiTFljWDZVSEtOYXhPV3AzMWxnRndEbjFQSG1zWmZJaHB2VWJCd2tocl9VZFNFdDdRRjAzNFdsRkV6TVRTU0dpZ2tCTlltNTZ6QVpfY2VSaS05TG91ZUUtaS1aLTNBTC1vSzVfbXNmOTl3UkdsZ2pWb2kxYy1PUTZQY1hPOEZERHNTVEw0V25vdzdJUlByRnRhTnRBcDBEX1RQNmgwSGpqYnFjdU44eU40MEhvU1NXbl9HOXJTLVozRzM3cURsZkdEcXZyOWROaFB3d0twN1BHNDZNZWF4bkI5dGYxSEZ1S2h3dkk2MEZLMC1kVFU4b2pqRDQ3SS1teXZMaDJITy1hTU9PMS1iQTA3dkltT2pobWh4RS1uSXdzQVk5TURvQ1hFQTZYeE10ckdFQkNOVFVaQ1hTSW4wYmpUYTVKNlhXLUl6XzdLU2dhclRla045N1RMVzdFdEpUNXFwekhYajViZld6c2JKMWF5bWVDczFybFkyZjBLSnpLXzk3QmlCazlMVjdwU0VfX2JOcTFpa1hvZlVRZkFKekhaWDF0M0xRUzhTUVRhRzBsX192em9pb05NeWhTZ0tUR0dGenpabE5jdmRCRTJEeURLZ2VkZ09lZDJsd0MxTjg3bFY5U1pSNUdPbTV3ZjY5MmVMYWN6cEZFMGUzUHg4T002TlM0UkQ5QXgzNDhZcU9RS2tlTElFRjR1UnVzdTlGUjhDZ1Z4dXBlckxabFdaaWZIVkdudDBrdWdqSy0zU3FwZVg0ZlVlbS04LVZBY2V6LVNpbVc4Q3JybnlCSDdWNUlqamk1MEZUNjFFVUh4aE5JeFQtendlLTRlUkRvWUVhN3hwdUs2MDNZTlFUSU84a25QeHZaUE4ybjJoZkp3ckRhbkxkaVhLSUxWUjdONE9RcGYxd0RUbFplNXJuTzJQbVBNSk1zZHZvUDZ6ellYakN6SmtqQ3kyVTBnb0pYQ0hrWi00Rm9FZkpnQWJLNGlEY0lLWGIzTGZRSE9SQUFfTmx4THU0bmFpdElaUVdfNktqR0g1eXV6ZXFKdnVqTHVqam4tUXU5MGthOU5JaS11QUxxcU1QYTJ6S0padnJlNkJBTU5QTU1PODFFckRNc3lNTDZ6cl8zSWl1ZDE1dWtaRjVDQkpmSXZWeklxSldwanJiYTRldGF5S0dLUGZSc1k4dUpNU0daUTZSa0dra1RrWU1scnhlaG9tM2JzcG5QSkJqMVUtaU1paDlKVEE3d1JMa0RsVHEta2lKbDZQYkVielVsQ2RvRFNLUkxiR0RlLXEtM0xWeV9Wa1E0OXlrUy05Tm5GRF9PTDVFNlYxSG9JMW10dVI4SmprOWlsbWxmR25NVHp3emY1UGI0Wkp2Tjc2WWRZZTE0dnoxbWtPZFZnVTVicm9PNl9aY0NWQ3E0MUxVZVhmZTJDZlN3SGJfM0x2aW5ZMWZMMVJ4UFhIZzlwendIX0lINXFjRWFybUdQcFpVNUFKenN6dVNXQ0k2QlNEdmNpbnptN3pNNjNoUlFxNG42Z1U4NERJWjRhMW1pQXJyN05rbjlDVnVRdDJEWHVUcWV1N1l2UkNtUk1qNVFYenVEeHJzdGpfaHlIdHJmUDFNdmlxWnFMckUzbzZCRm1vZlVLNGpWUEJzZC1YaHMyU0J5dlFjVjlCQ0RjRGU5X0c3bWpobTVRelprMEZxM0l2d3BpWWI2bkc5Uk9vZzZRQnJQVjFwUExjc09TMm42WWoyX0RNLXFBSzNLdVVMamdXRlNMNUVyRzhwUldHT3ZWU0p2X1c3VXBLVHI5WXZGUVEzbWZyN0REYTVER0tRbzlfblRyVDUySkh0bTNSVUE2bzlqNy1hUUVidnBNUEx6eDRGSThGWWRtejQzMXlpMDhEbVMwVkU5SVYtRzhoOXpJY19yZjZsWmU1dS15bnVZNnJQUV95bGFYSGIydHpLb0Fjdkxpckw1RVJBZFNBNk96bEU1SVdZcTNhU2JPTUdxN0dCc3d2LUR2UUxlRGtBSWhQbHFyTGpfX1pxTHkxRTVrOEt6cllnZXBjdUc4M0I0SEFfWGp5RXRPMDQ3cEZma0ptektBckdOU2V6NFN4cENIaWdyNkZIMHpaVWYxdVNFNVFPeGliUVVJa0ZQV2FQcUUyOVV4STEyQ1JETUtQLVlpZjlWQTd0NjB2XzNPS05XUVlHZl9UcGRKM3pEaC1xR0NOZFlxa3d0eTU0TUtvU3BLNzZ0X1lEZ2NCcm9SNm15NmZtbVRUei1lSDVpS0ZvSnFxYWtoX0o5dGhrU1l1alNzYm1zckcwMmZidmNMMW5uOURRSUdVMlJLRGcwWWI1cVVoek1nTHBraWNjbXZ0SGlrQVFmSW9nZWVmNTMwTnhpb3VBOTNYSEd0dTVfcHVYVGp3REJzZjhPdGQ0eE1LMWZoYnFvZXpGYzVJRklxWWt5WXlBMXFCN1E3VmVwc1djSHF1cEVtOHhjendOYnhyeXh4dmpHaUJwbjllbW9HejdQc1RuWmpGRnVRNzZxcEhqblRqUENWRnFHdEp0N3pEZnBkcGZ0cVBYVk1sQldzT3NOY2pYVFQ4eUJWa0ZSbVN2akNzeE55OHZuZGFEZWh5dno2Z3ZRbXBzNWRGekhNNmNHOWw4M2ZSNWxwTEc1a0JQbXlkQkNiRno2NHhsX2VGVW0yUFVtTWI2Q1ZSaHBmNXJjZmxHWGRRWDlDLVBGSjFVSG1pc1JWMG1VM2xnekJuTWpDSzg4MFctNGZodldLTFZ4OW5KbEJObTdtWF9ZeGVMQUg2Vjh6VFA0YTVRaEVIUGVvVFJ4WlEyQTM4emEzcG5iSS1YaXZsOTE4eHBGVUN3UExpbGRjU2ZGQU5xNDk5OU43X1lUVmd4bXRPTi00YXJkWWZwbE9yRnMwbzRzbEhYVVNOUUtNQUFLNXQzbGFtcDVNaFZRUWExWFAwVk5SdV9KS0lZYUJCV1V5T01hd25vZDA2MEY5T2N2Qkw3ZVUtQlJkak5NeVgyMFRMT3NkWUQ5SXR6STd6RVFIX3l5R1FEdVFfall0X2ttTURTMl9FTFd6TVhDSUs4Ni10bGFCT293dnZGNlVpWlRDM2N5WG9Ic0ZoNzFjRC1MWks1VXg3ZFhRNmR4bUtGRDE5SG9uNlQtV0FySk5lOEk1NGpUaHU2SWZqX3M4VDhMQVY3QU5jMl9INGZzeHFuLXg5MjJ3T21BamQzNmYzMF9wMmc2VWdlQWZNVkFFc3czWG1uUjhhbGFLOTVkMnJKSF9fNzVOSDNIUjl1RXBaNV9sLWRhNmVDOGdvUDBLbTk1UU4zeEtVSWxjb0Z2d3AwTTh4QUZMelN0RUVSN0l5dDNGRnNBalVuNzFIWlVIM3dEVHpNUW5Bdnp5RWdsNmtkRnp0dG1PQ1NOclBGTXJpQ3FCejEtRXpYT2YxR0d2NXJ0N05aUW9VX0hjM2xUN2N5eWNUSV9JNDJQUjdmRG5RUHAyLXZJRXNOQXoxNF9zXzZxUktVVldoTEJWWUVnOU1NMXR3bkNkM0d5MjBKMmdvZ2xxbzdRa3JXYXp5MzNBdVdXMV82RWxOZHQ0OS0xYWNpTHNCQUZxaDdxcUM4eDM3bGR1MFhRTzczU0pYMDV1dzRSTk5fUHFXOGY1cnJFblhuWTV4cl84d1gwOF9EOHlXNjc1NkxFT2Q3Qk9XYmRCbHl2a2lhTG5naDN5UDlPQVQ1ZjV5cHlhc0l1S3lPckFnX1JqQUtPZzNUQm1UZjJZTGs1OUNxWFpnbWhKNHJrS1M5X2p3UXI1c2lXZnNFclVXbVFRaExueGZZNGVXMVR6NDdRNnEtSThJdmJHdm9NZEc4aGRESXhzczJTQmZLZ0lpZlB6NGpuLXp2TVVzOEZnTDA4UWpDVEFheHFHOFJYbVNqSW5aRERESHlzY3owSmRabHpITDJsZkNMMVk1eE9Ha2JrTV9YZjBreER4ODF3bVFjWTNXbjl0eFlFLXhFVDloNndOTGN6UVh6TzlONXFpSDZpNGJadlR0MkxqdmJrV1M5MEw0TFVFZ2puSE9PTVQtWmtYbWI2d3FoVzlfbjNvWkRZcjlNQ0xPWU5FQ3BUVzF0aGZtTVRDTkk5dW95V1hHZDdDVXAxaUo2UGRDT3lXb19vblpnaGVQY0JNUkhmdU9NN3pfRnJIdTlqNEN2Yk5nd1A2cnFvQnNWcFJMRUp6bHhZbU0xZFF1WnFheVlYbXBiOS1XTnhtZ01tWVd3TVhaZFZWWXJhOTJmSXJUVzdkU0lkeVpZQWI0YUtIZVlMdExJTEtkRjZHLWZiNmVVZTU1Vm9sMEl5S2I1X0xqTFhRLUtBUW92OC1RaXhUODN4N3k3cFZDeEZ4R3R3ZnBOLTFVaklfTDVEZHQ3N1dxMi1wN3JaNDFoOE9ER18yUmlOVVFucUFEeDc0WVlFX2I1SlA4MjY2SDhCSEQxVjFWUFR0aVFvUFNETF9kZTBFVnZ3dUt4Y1pRYnV1UnpzRUpXZHZfWkVJRks0dXdfaHdQOEV4ZGFpb2M5a1FzMmdJem9DVW1yaGFjSkZUU2J6YXI5elBteld2Vmc0a3ZjVUMwSVkzTTMxS1JhT0plWkkxQ2FWWmlfblZHLUYtbmFJQ3hIcm9tQUVBZDBEVFJJOTNBU1E3QUlIVE10bDlfQkxOaEo0UU1RQ0dSblFXdkF0SzhvbnA2NGVzcXBubzFfODktWDFzTVBaejlOMWVOOWR5UHBfZlVfOEpUdmwtVF9lRGwtOXJaS3duUnFOdHhHeEZuVXBNdXE0MEg5dThlMHhYbXJlOGdTTzhxZEtKeFpvMkNEUE9Ca2RGcF94Rk9GNFNCUjdQWGx4aHl3SWJ4dVYyRlYtd2FERzR6UDZCa1ZKdlZHejJSNkpzTXVELUoxdWJtc2hhQTJsR19fbXItLXVUbFlybGxLanFVUHBQS1BGUDZVZU9weFVWdV9CWlZBYnBJRmV4VVdxc3hrZXdxaGlFS0lSckF5Lk9YUTNscWkxdk4wNG1sb1Mxa2xPdVE"}' + string: '{"value":"JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmR5bWh1WnJvMmhHTEdNakFVNEMzbXlJU1JPUFNDRmpvckxUcU81TkZCU25RT19LOW5BSGxoeUFHSXJnSDhmZ21CY3QxZndxdTI2TEVPVmJZT29Cbk5xMWg3U3c2S2tVTkVhY1ptcVJFYzRmb0hZVzJDYW55ZHJEb1JZY2VUME1aSEt0MTFIZF9KUndTZWNnS2ZyTVMxTFhjdlZab2MzY3hiT2wxRG1rOENsZElZZ2dROGwwcXZTclpsWV9qTHRtaTc4SHBjSTZoczE3aFRoYTkzYXIyVGszMUg4UjhFR042Y09JcW55YldCSFFRQlpOSU12RnRnY3hZRWIzWDBmMzlmdk1sajVTajFtZG00TDN3VUYzZWNHUWVIODdLQWtIemJiWWV2QTZmcU9vaHVuWUY0aE9XSzVsaS11R0pGOUprdFBDQmkydF9jSlJ2eGdBQlJpRlZLUS5EUEtzYVRwaEVKb1ZJdEpXcC1MR3pnLjRjMnlBMzFLcHdSQkNDb0pkTzdqdFk0NmxBZUlJOHhORUp6TU9xd3JwWjNQREtVa1JhOXhKdWVIVG5SU1F5bk5YSmY1LURZVjNqRGZlVjhKamIzRTZaeTQ5VTdqZ0pvV2lkZUthTHRXQjVTcWtEd0pSY1FuLW5aTVdJajgwcTM5RXV4eC0yeGdNdDlGOFhObmlWNHN3R2xOZnJYeUkzNV9OMktGNTh3RmtTcVEybmZRN2owLS0zeXBGZjZrN05TNlFJYXNWUEIxMkxXRGFQSzBVcm5NV2xyQ0hGbkp0WmZ2Zm11TnRMVnRQYUVIdDFzZFVad3lsOVhQSTk3ZzNpbXFPM3N5UjJ3ZmtTUGtXdE9kR0VQaGZKWElvN0F6NGcxckpucTN5OEd4d0hQbklHVlZTODl1aTJRdFVpMXM1VHVNZWxtTUJmczl1ZDVpQ29lSS1vNmtJQ3FqN3Rjdy1rTkN4SGQ3NWE0cXdDTnU2ZlNjM2VyY29BU2RUMEdZYVdXU1ZBWmg5cC1QZzZlVXlSUF8xbjFPcUlLWDJPR2NIelNvRWZkQmZMSVZxQUZJaDB4X0tqckcxOE5ZXzY1V1kzNkRJVjR4X2ZHcEQ5QXdzdVN2a19PSVZ3VDB4NkhtRTRhMU1pTzl4TlY1R3Q0N2dIY1NrdldpM2JteTE5VHF4X05fdm5PZnE2Q216WVhDb1JtdVZnaU53WS1fNXNoSVpHUlk5YUF3cUVxRUNkOWJLbUgzeDZlWGdUR04tWWRrSkVHdkt6RTZ5UExHdGdMX0RqQmNMcW5JNHMxOXhDRFFLTnJIZEx4WEpQcVpHYmRqTHVfbGFWcXdBUnI3S0lZUG5FNTBOalZyUEpZU2ZaRjRCMWVPTUJvang1cFJFbERDODRqSTRvTENJdTBhbTlnNVBudlhUQ2FHSUJPaTBCX0J1ZkZZajBndWp1dTdHZl8zdDhrQ1UxQklEYXQwX2JlUmx2MmJrR2RNQnBNRFlRaTZ0NmV5U2drYkZZM2dseVo2U1ZWNE1HNER0cUJCWnVISmRCZTZzSFFNRnliNHFQTkpfN1pGVEJHLWRfc2gxYWJhWEM5Wk9qV3FwZGx5RXBKaE9kd2dXZWRXcDFOQy1sSWE0eWZoLUVjVTl5VDZxU2FXcGd4SUNEdjJZekc1QjE0aGlUU2ZKb2txVG9PeEtWV1gwTjJGc2VBNHduYjBZWGdXSW5aYVk1WThsUkQydzVrNEpTaGYtUm1GejRvU0JLWEQ3UEp2dTNCTEg1RF9GVlM3SEZHajdMRG55MkF2RnY0ZVdLT1ZCWWphb2hndVhFOGc0eXFsUVZERGM5NzJVWVVsTS1SSjdqUjlGYUJGM1htdlViUjZSSjd0WTlDeURuQ0xJUWI3YUFJM01iRi1uTkI1aTZaY2RyaWNXWWo1UHM2NUpBZzFGZlRrUmRINXRkRXVlbDhqandXNDFoRWlfSl95QWVCX3BTNF9MYno3RS1qWTFOTmEtX2loYUtqVDZEM3JpQWc5WU5Ud0hndHRzTGZReTJWM25admlEUEZSRkJUVGIyNW5qeXQ2VGwxanNmMVNibkhnaXp1NDUzQXVWNXJjNzlHYlBsZ01pd0Q0TDR2Y0JLSzdVMVNNNXVXN2pPc3czeVUzMFQtSXlDUUJ5aUlpbnU0R1Z3LUhuLTZKeUFYZjExQWpsSG8tcW03dDltZmJxOUNYaU9Td2Y3N2FsNXQyMER4T2tfUkU1cW04ZEk0NWozMjBia284SkxjV3VVODdNNThYTXNVaEVycGM4OU0xeXpBMUM3TUg3VnhSZnlQNUFBdzdBVTVBUkx1VVhleXd1Zk91aEtqVjEzZ1ExNUYxS3FNVkdxWFY1U1g3Sy1waWdrN21HUFVQVW4tTXlQYXQ5OTVDZ1BGMTl4NnFmd2M3RGxZSDBLbklQd056bHVfTHA0ZXQ4T0NST0sxOFd4ZzZmNUdJdmQzOF9TWEZWMjJyOEp2enNzZDFrX3htbTdWOTVGbTE4QW5WZWRVanhueDQ3aGFyS3JQdGFsOHo0TDM1azZCSDVFQlQ3SXFxUWhodFQtenUzTUsyMzZISWdsd3hGci1kM19IRnlCMjd4M3U3ODFpQmlBTVZ2R2tERW1uVGhOQ1c5Qm1JcEJ1bnE5eS0yNE1HRUlSY0FoWFN6R3VzQUtwcUJObElTWl9ZQWVxOXJRVXowYnZfSUxsNkRJdTdGYmlGLVVuTFdOMWdRUWlkU1dHVVh3Q2YzN2JMeFpIUGFCOVFnYnp5R3ozUDNxMHNiWk1Ra1BWTVZPSWF3S29FeEdvX2lPd2pSMDJiaGh5aWI3em10NmJKZ3Z6R2xZbC1uM3lYYVZWeEx6M0pQVWVPVU40Uk1hT2F6SHYtWE5wYlFWQndUQ2MzdHlwSlJpanpHVzUxOFVNeFFMRmZYajV6eHZrb3NxSGl1c3llR0NoVWFSWm00Si1CQkRuYWxCLUlaX1NoMXR1dnRXT0dJSHRCV01qY1lmckxrSUNJUDktOGQxc3AtZVV2Um1nRzNseFFWQVNuRnJyYk9NNnVzUEc2bEtiZHVhdnU4VDFLUWlNSHdhMVdYNGJYYUp4LUxqcE5rbW0wbFltT1RwUjV4bEE4RkdwY2lvM1licGxZVnVzNHhWV0NmS1lEZTJ4elhwMGJvSWU1Nm8zYThwOERrbDhWR0Fwd2JRdDI5TXZGdnRhSWpDRnJyYUdRZjV4ZG1sa01PSFNLaDhQb3R5TG5talFSTlZva3pEYUl1dUtMSjNRaGdrNlRhejc5b0pLZGlMVkNPdXNwMERSS1I0SFlBV2pURHVCLVhITmd2YnNzWFNFTkQwMHoteDVfcjZfTnNzaVhFU0hodENTMHNjT09DZEdVNTA3MTZpZ0szYlVSU2RzZ1BzOXBnd29vZG9Cc0VQdXpFN2ItZFhVbWdxNUVFNlgzY1Itcm4wblRFczNac1dOdjhuanFfSVYxMjlNMVpNenJnT002THhmVGl5WjBScl9BOF9UQUFXRWpkODV1VUI3NnBiMUZXdXFOTHVwLW1fNUt0elc5MTJEZmVndVNoSEljS1lsT1M2U3YzZUVhWlZlTnJSWUJsUzZYLWlINVl2cVJYX19yOGYydTNYb2JpTWxNbk42TC1jN3VqVHlCa09wQ1lVU3hoNFptWHZfSHhJZ0t6OVlLMXVzNEV2Z1h2bWFoN0NXSy1NRmItSzRMLUUydWV3eGc5WlpMRm1iTE4zcXRhMm5FRGF3ckFIN0E1QTNBU0dDenFmR3c3VzlwQzA0SnpSS3FYMnZ5U2lzaVlJUWpCNUVSQzdYTlNYN2xWQ3ZpYnpsRXJlNzFSaHh5bUlLekEzQ2VTTFlIX2pMTEE4cEh5Qlo0Q2kzWlNOcVBrZXhOWlZRdkxKZWY0TV9JanV3UkxmY0pQSUxiOFM1Ymt6ZmpaSDZKdWp4Ry1ycl9LcTE3STQ4N3ZuWVVGSGM2UVQ3XzZzR0lCUzZncjRPSkFLSUdMNjQ2SXhJRTExdWw3YTZJYkZHeGl3X0c1QU9kd1Nvd0tmckVVVzFMOEE2ZWF5VjVjSFRIT0ZHUHYzM1R1U1VpN2pFMTJXdm40eThNTWJKYVhTNkFJVS0zN2Q0WjRmbFpjNU1ZbUxIVktoQ1pMYjh1Rnc2REZCamdyY0Y3MVhUVG52dVp0cEgwZ09EM3ZqV1dvZEZwNzlqdzNfNHkxbVJvbG1semhDaDBZd1IwYkJ5R21qS2dDVEQtNjdidEdZb1FHLUY4SWprUzJxcXhWWGpvWkdyOXVJZkNuQUpTUmRlYWNLaWpkc3FKYUtHSk85dEF2YXhXWXc4MUFMQUVqdElySk1fcTJ3c3liV0tSWkJmX3JUQVNfTFJUSGVpd2prRVVtZ2lWelQwUEdfSjRDWGM0YnFhcERhQURGTGlScFNwYUlKS3JhdVc4UDFsNzROeHRVbXB5SDBRZ2U4SnJ4b3lYTDQzdFI0T0dOLWg0aUUwRzNoa0MzSzFRQ0Z5NXN2VmtBdGxha2l0aXc3ZVFGN1pjcEtSeE5hREZEYllUb3pFTVJWQUtWa0RYbWEycjRxVXJPc2ROSlROQnFlWWdhbnh5Q1RpR2FNRVZEZjdEanJTWjktTVJ3a3R5UVF2d1NYa0k0VmR5SlViX2xJdEF4UERkMUNpV1BYRkgtdWdEa1RrQmRCdEpYMEN5N3Jaby1kSUJ6VHU3cDItNTJvOUotVUhfbDV3LU9FZ0dZaENnQUtGTkpaSWh0Z21nY3ljUVdHcm1RT0plN3QzNUlIeExwZ1Z6aTJGVWp0QWNGR0dPeDVuQW1DTVZOdzhxQnZQbnV4bzJSV3NZa0VJcGRRU2MwS3Z4MHBvWmEzeDhObW1BYnYxa0VzdzhZNjhFNG5wSTB6bnFLYmV4NFU2OFh3ZTBlSGVpV2lwemthREpUUnRqVWg1eE5Wak5RMktPYTEteHJjSjJ6MXdJc1JqdXp4VklNaGdpSXVleGp0aWNleU81WnBjUWVDZ3J4UWx5bFdTdnNOd21nOUJIWmNwVnZaNWN0LWVvZ1pQSUN4S1pZSmNpTXd1ZHlZdUtXdEdiTVRMWF9jYzd2NXdTa0o5VnZFQXdfUi1QeW5VY1hZY2RNcUw3WldxY2E4czVIRG1lWlNZb1RWTnBSUzdJRFZBMnh5Q3JZWjZkanppYUZHT0NSS196d0pPWVEyeE4zWGpMYXAxSWNFOV9qUkhJM3loYUQwUlVyVkppNVdGdC12VnlsYldVeVNZa3JzZElzUGVzQ2U2S3NpXy0zdHNzNDNGU0NCVkZ3azhhbkdxcGVwWmdneFkzX3JtSERiSjBaZmV5SUlkb1RKYzF4Q3dGZ0kxZ3o1X08yS1BXWWF1ZGdiMVpjRmstS1cxSG1ISmx1cU9Qa0NzZUFGYmc0M2NZTUtsNjJKY0VsVjhQdlB2Xy1pMFU4ZDJ6bEpfUm4zakpvb2NnV2o4RXR4ZEh6UGozdnMzRU13ZlpVQjIyVnZGM243N3g3STZxTkhVZlNObGo0TWxnc2ctVFJfVW9Nc0M0dUlQYnp6XzBUdlJfMXQ5LWVYaWZWcF9zYXhEWEJuS1R2LUxSaEIxRjA0d0R3SzZpX2h2cmdwd0ZVbldSME9ObURSNVp3TmVaMGZ5U1V5M3lFNnFZLXZSbXB5RjVqdE80V1dSQW9mb3R2OXJNd3FvNTlvNUNmY0kycVVockJvOERSd3JzOHFMczR6Q2Fxa190RlZ6dzVrdkoxSWs4U29EQ01COFYwWFJnblVLS2FndFJ0UFVfUGh3c1BpMlU4NGJpeU1WMmJBQlZsVEx1QmF6ekg1UE9Jc1o3bDlyLXV6ZW5XR1ZwbEpFUHB2c0ZEMy16OHJ0VXN6SjVNU0NJcERRc0xMUTB6WmZCY212ZURJMnZ0c2JvVEgwSVo2QWl6VnlTVUtaMnZDNFNCRml4Sm9GT25YT3ZUZGVfeFQwRGJLcUlac3llX1lLbG1Kd21LNHlRT3JwckY2NkRjZmV1d05YWkJ3a09RMktJVVJOenFQX01ERmtIRWIwamtlektrTjJ2amtHcXgzQ2VjZHY1SkZCWC1lSDlVeWIyajd0VGphSkVYbUtvZ3VDY1hJNjBOX3RyZGhRQUpjeExnQkloekJjQ0s0RmRkZ24zMDh6b1VHMU5pc29pWnBKekIySkZuZzFDeUpJMXlSTWhSUEdJNFRlMmJxV04weUdXS2NJTmI5NUIxcXE4Vmg3Si1IM1RZeEtydTVKTjBDNmdoVDJKXzRDdzZMNWdMd2dwWXA3VkM2WDJmY2ROcWRIUW1tRy1uLVFYc2Vfa29MNWF5U0tidkowYVN3UF84OFlYYmNBU0dhZW4zSVpwMUNhaVRfTXNMaXBXX05rOUZYcmlXcHhNZVYyQU9sZFE3MmhjYWVhNlBTS0g0blZwalhwMTk2X3lMT0JOTV9Vbl9Wc3FZZzl3NlVZSlZHYloxS0dUd1RVMGIzb2Y3b0ZnLVJNTUV0bGtBYlNUTk53ajRQSDM3a0JGVmhra0VkYmxQdlFDRk9zYzFRM1BDcVpqS2dsZHg4Q21xaHNHVDN4QlEtczd0bEdUMlJLaVdnbWZORDA4dHdOYlptZnV2QnEwYnpmandnQVhsYVZwUVp3d19sV3JoNmJUamVVREtfQmc1bHljSl9JeFhQOXl3X1pDZ28tN1dYaDlONm9fRDEwM2ZVUjBhLWRuaGs4UXhCbGc2bm1QVWVLekt3cGRrWmxYRGNMazBmMW9DNURoaGR5SEY4SkM5czRBY01LVzUxZ0pBSHRFczYwZzQwcko0eTJKWG5sbnoyenJHNG5zMkNRc3lfblNWUXlWOG8xaXdxYm1pZUN1dXBSTFNZcnF6M0xsX18yYUp2UTB1cmdqVkI1bkhhMkpkVmZvTXh5WDVwMm9KaHYxZE8tMlFuZmJoaHpZNExVNG9qNmhMMG04MXhfQXJWRjBUaVNNX2dLWlM5bHlPR0FCSHRPZi1GYmZzNVpOMmJKR0d0ek82QVRGaWFiQ3VTX0RzbHA0YUg4M0xaNGZ3WXphZFZPeG1UaHFIUXJyaGl2TDAxTzVlYk5aa2Rnc2NmblowLTNTNjA4QXNYRkFYM0lhRFR1ZVhDa3VQc1BtcWxLeXRLVmtjOU9BVktIb0I2YkR1cDVIQzZZQVY0dkt3VXAyUlN3dDIyNE52eTJ4RHRfd194c3VieGdSbnhPMEFGaFdUQ0dqMWhKeExZaXJLQVlKNTlVY3hoV195RURlcjhhTWdrWUNkWHVMNTNxQ2dLbFlVNHNmN1hGYktFWHdXUUE1RWd3cTVsRHlVbksyT2kwMlIwVFpBbWRfZFh1ZG0wMWFnZ1FiNlVwYU54VDU3MDM0Wng5U0Q2T0IxRzFlbGtITEFHcThaT2d3Qm84c2YyOWhaLVBBZDhpa3QwQkhSOHhBODA4SXJlNmtzSkJDbVk0WTB0OGo2Q1NvNVF0UWtSdzZmVmE0ZHctVWNSc2s3NkxZSGZWTVRXQnZMRlVNdEVSRUpoSGVLdlRjVHcwdXpTRHJPcFFMRXlISkRrZV9hVjRpenRYVy1nTHNDd3l3czNCLUtoQ3JJOTktZ214QTVVOVczMEdHRWY3NVFWU1FiallhU2JxVmFQMHRuWVc1R09meGFtYVdNMnRUcC1VRVRyRHhFMGMwY1pCbEdEUFpjT180Zm5nOXVvSG0zVG5EYk51Z1ZIdGI3N0F0RzJ2ZU0zc1o1WldpTWFmRXRTYUNHb242OG5kWDRFR1V3STdEMzQ0YVhFeGR0UDRaSWFnQ1d2Ukd1NHk0Ym1RbURqaHhFbnVMOFdLS2JXTDFYQ0NyNVFyU3liT3VIUl94d1RnRFFRY0k3YnVxTGhMME1jbHBTR2VTZ25VaHRkekI2ZTJiT1E0QnVyRExjbHpCVFVwMzhtWm95TVRfN05PWTYtNHktTjE2SDdiZTRQVFozTGh5eUg3dUNYYUtsbFF3VExERGIyZ3ZUdmU1N1hfNzRkbHBlNFFxVVZ6cWIxcnViVXk0Q0c3MHdsTUFGMlphdEh5WmlhVHVVR1lSbWFUQmhJamNSZFJzZUVMdmV1U3pMMVEyZGdmbGNsTGdQVU4yMFdHSURKOGxHdklqU2NzbVNjZjFNSnNRSjVPRzVzcmpMdVYxZXFHUkVBR084bmlXd1MtN3p6QlZxbGptUW56MGhmS2tVbXRMMEJuYktXYURLeUtsa192TnNBSkFqVEJRSlpTdkxaUG1xbmJ6b0p2N1dNN3Q1dngycEJsbDJ0dTBRM1R1aDdSWTFOZUROWDZta3B5bmtrR2N6V2E2TU1KWkdLYU1iSDIzVkF5V1JScC1BRkx0b3hWYXFqOUpkei1lNmUtaVNwQlFpRWFxcGpvdFpBT2twVGM5VXNsT0szQWdrZ2FMX0RBU1FDOEc3VVM0VDJlLUxrci1Dd2QxeUswdVdmVmU5LVpBYW04R2ZzclpWTHJGMEJIXzVkWlZoNlB3N3FEZS14ZVRfenljenlqOXFFYkhTTjlqd3VRMmNmWTJSZkUzZEpoTlJaYzBlZXpyVWZxa1JuRXFvX2xTMVBYampXV0VoUE1PcENYbURqMV8zWllaLUVpSlItWVZBUEJSNXQ0eE9hdFhULXVyT2N5NlByQ2s2QjNLNTNQOTdSU05WLUZ2MDE5NzJlTVdZVllOMVdjaDRfbmJGcjVhYkpQV0I2UzFuUEprU0hyU2Z4WVptRmNHaG1jc1BSMFI2V19hMm5DQmhPTFBOUVdQc184Tk1JN1ZPS1VEU0lLMVZRWmJpLW5kcElfRGxKZ0pGcnYwU3Q1NTlINThjXzZrNFBENWZsQWdkWFBKbmlRX2FYckRpTFFaSlhRM243ZUt0Z2J2VzFGek1sSHAwOG4wd3g2b29xcU1aenE4eVY3RDkzSE9wUVNLQ2hBVTNNNDVEZnZzdktFTVo0ZFRlaFJIYWo3SlZGc2pWRFVFS0JrckYwSDZsMl9zMjZmNjJGbEhSY0ppeVd3eW80Tmt2YkFCdG9LSEpSUzBLVGZUS3BRYmE3OEVqZGZoX19SOURQUFlkWnNDQzlOQnVyV1VlWm0zbTRsSFd1emNJMkpLZ1RxN3VlaUFkWVdFQkljMkNld1d1S0tGUnI0Vm5QODNNdm83NXZwd0JRT29DdWhvZkJNSGFzbThhNWEtWW05VlRLNGRSQnZ3TDI2b01hQU1PWVQ0VVhUd1plVW9UVUlQZURvZGRNbk9PSGVEelZuVGF5ajN4a2d6dDQwWUdqazZwcTlnejZoSnN5eXhSc2w1RU90NUNxZXZzY2NtZHVrQUVvQ0dhb2pTeVJ1ZUlLWUtLR2M0YktNR3RnSC1nR0FYck1GT1BZNHo5NDV5MXZfVktGZ254blBITnM1VFRxS1NFY0tLc2EwNWZIM3htSktrTnlUTy1MeXA1ZzlxMS1CeDZIUzZxVmVKLWFtaTgyUHRzcFFOZUc3cVFIbDF4LWxPWjlla29ZclVteXV4bnBJeDNnRlc0eGkyUWlHNWV4TWxxRFRWM19JTTBCSEdZbUNMTFUzTzhjTWEyUTBucFd1THJYZ1U0LXE2c1YzVlFYM1pydG9NdzVRXzRtd24xYV9PbklpNHdYSTJrVWVYSWVVOVFINzFVYWZJcHVWWUhqRDhTOTdYVVVOQnJ6YVN6d0VJcVhvc0FZazJsaG9FSy01Y3d1ekdEaUU5Z0JSMjJ2em85T0xhYy1ERGpSN3pDM2ptX2lSRlVqbFNJTE9fYXNRYm9VSnctVnlWRy1kOWFKZGV3aVV5bmEydXcyTkhsYVhFUUk0Ri1wS3hMNk04bFhMVDhDdnFVVVA3ZnFWVFZCUnRmZlRkSEtGZ3BZUFZRbk5ka202SmtVZEp1Z05NSG8xRnMtbDdBZmxnVHRKeEZ1Um5ZcVZkVVlWdkJBamVqdXZoQ1FtaGFlcDdwSEUwQVhPSGp5dC1jWjFpN2RqQTNrTTNONDJSVC1ucFNfQnExYkJoUUFLRFl5NnhzOTJTMWdHZVpMcmhYRnBMMkt0b0E0Y2g5YVNESEVhRUVoM3BTSDJydnhfRGhLYkxhazJXZWVpMXZHVWpMZDBiZjRYcm5NcExhSlV5M1htbjZVdXBsZHA3UFIyRGpZVVV3dTJHS3FONUhKLUlWVlNvNlMtaWhuLXhFZUNSVmo3QVdQM1FPLUw5OHVUQy1NR0laOW5pU0ZuUGJOZnlHMUp3ei1FbEhYOVZXdloxS0pKMVpXSU9PZ3ZtZWppY04xTUcxZ0F6V0NkRFhIaUpkU3c2RDJPMnNiUGdFWFlLZFJNWG5CYjVJQlRzZkNIc1RmNHlGZGxOaVNqNm5DdlU3VlVoeVdudmZhd1hiaTBwbkoxejV3WDRBQURRODdPdmdQRzd5dkxBM0sweXpXeXhOajhuLkxkd0syeDBvSUxocXZtMnZpSzhseXc"}' headers: - cache-control: - - no-cache - content-length: - - '10635' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '10635' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:00:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96041739.vault.azure.net + - /keys/test-key/backup + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault96041739.vault.azure.net/keys/test-key?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/7089b08b10a64ec68db241e20e2109d0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qbGcivUVxthKiCxcjxOGdsiItrjjTm0_-o0gkZmRSDlEY4ixbjJYBZMwZLxLm7_ZzoGTVTdON-_6bLu-ZwFqAAe2Nc_HDLkL3FTn1YkjTSA5I6FTXI-CC79m3mPLbrVNkHRUkN7QPpl9Qak8RyRl4TA5XtOp_ztKm5Lfuc1eJsosaRdqaMe2UlEbu0XCdYDoP1UoNRAhrUZwli-GHH6yWQxq0SBtnfUsXH0CkgprrnpDYM3dxUkjJJ6IRpW4acRXrFDg-ccCBQDRLty6eSRehugfZyTGciaT4fBcj245OjytQZHxz2ZGixRxN0YsvjoZXqquXKqfkKEcknMDNapyFw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/d2c863b455c9439b87fc78c6ac184217","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"uWCbdAq6V_Z3_JRNeKK4o27y-v8lL_IUNGXQHywjTU4aoVK8iDvM0ChRMhlChsMcI-SyGaAk7kiS2ywdNx5JI3rcaZiiasFZ-4CUnUQbOB_p5L_r2dDXvfdQzGaigM6cttEW5Iwze5dEd3BOcDQumxRrtSJNld4AlxEK-Kp7xaOUFc_2yAV1QPvELtjJLN1zMNw12FXNqocpZwZ8t1BGvvXKYfz3yrS6rq0nG36n3S1yA9Cb0NnrTjp84na3diRQXpuaUg65QXrbhcBW6o1aKTsuEAVH5FAqDliBa4v5lqTNsWxOGS996rMfjsJHJQ_fymvIy69zHrMe2UPupwz_OQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527628,"updated":1564527628,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '644' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '644' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:00:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96041739.vault.azure.net + - /keys/test-key + - api-version=7.0 + - '' - request: - body: '{"value": "JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLk4zTkxnQUltVllzMTBLb0R6T2ZkcGI2aHRhMFBQNGxQOXh2VWQ5dEJEaUE4X2dPa1hQcnFza1dMTDd6d1psd2FOYlZNbFZpbnVzbmVwZndNUnlQdENmaHZUSjBMWG5PdUh0TmJfcTNpY1F1LUt2UnhfTHZpaGp4bnVCMUtKNW5ac08xR19RbTVPLXEwdkZySGZJNE9ZQjhIY01fR1VaOGx1dlFYWW5aSl9mY3ZaREZmazlWdVRzaW5fQmxCbXN6Q0JrdnA1LUFrMkwzQXFDUml5TUNjNTMwTVFPbjI4eElXTEhUcUdBTHpLM1pRRTNFMTdqVk9iT1ZtN2ZoWWh5Y3JHYjJWZFpQdmkzR2Vmd2xQZlFNal9VUlM3SzNUc1FkSnRUazREdVdsWkZJTThHY1R1NjZ0dDhIblA5LUE0Vjd5RTliQWJnWXlCZG9QUnhzem01TVg3US54dXBZUjhXMGdvNTI1eUlCSVdsUzF3LnJ0MHZkWFFDUlAyYjJ5b2htdk8wdlRjY1pKLWVlQWNlVHF2WVpEd0tqX1R5SE5iV0RQcFQ4ckN1Z3JpcVJ6ekFvY1hNNDZWME1Fc1JFbGNKTnBKNVNPR0pzeEQ0dVM2c194aDlCQjgwUkRxZTRHcllGckpsSlc4Wl9GLTljMGI2dm54aEhvck9vQ0VxS19VU0xTcU1wNE5pS05CMlZ4aGV4My1NSldJS0Q3M1BxaTZQdnU0MVZnUlR1NGlqTmhMeDJYQ3NtRFpxZkVuUGZHeHFQcWdVYTVvRm9uYUh1enNyRV93LVNORlhlWFQ0Skp2SWkwTFNMRDF0d25CTkVpNUo0Qk16TzJzZExJODhWX001SlpBLXp3RmtGRGNHUnJGeXJkOHVwaDhMVmFrMUpKZExvWkxocERmRjRpQWVLWW0wT0ZtdV9zNEFzbWJCR3ZuTnpUS3IxNlpNZlNrcUtuMm5uUHc2aV9JN3FzR1lEX2xEdm5KaGx2cmQweW0zb1RlSEFRR010OFRZRFhqNXZTejUyNExyNC14M0JMaWx3QlI3UF9SQVhfa2d3LTFYbjdGa3pGM0lscm8wMmNsSUxPWDcySjJUT0JRT2ZZVjRyOGxscE5Bakt0SEJ2cFFRMXV2MTRZbkhhN2VKTVlWWkEwV0VnSlg4elhJb1Nwemd4VnNLSTlRU2ZQLWZQVGdMQ3VUNm1iZVBHWWdSczE4dDdjbGhJaTJwQXRtaVYtam5GVXZJMXZwbWJzekg4SDAzYmZxZF85QmpHbzlzRklNVTBwZjR1Rk1aSmpfUnBldU00MjBmak91clpNY0xFV3lYQm0tU0E0ZUdjb0ViRTlqaVA3RUlveHVOSE5STVpWYjJtdTVzTHplZTNlNXJENzhMazV6bHpld1hPRHdyOHBiY2t5N25hTmRhMi1zOWF0WThwejBQZkhqUGpkdEh6NDEtZkhObl8tb0t4RWU4RDE5LWhRY3pGZkZkaGUyVloxYkRQRV9FckdJSGg0dndSaGNudXllS3p5bFMyQm1WSUdMZ2xzN2lRc2Zta1NpUUl0ZnoyVjZFMGh4aGFWd09PS21tNkpDbWRLR2s3aGE0a3h4aHRxNHZoQi0tclpFTlRTamc3MHdOOVVacFVlUnFQanYyQ1RVcUQxdXZPMHRRTW5zQjRVSWxwa3lqTlpaaVJqVFNaY2FhRzZGRXpDUVczV3c3T0l0S0FBc1AxNnJDYklZVUdRTkZKcUpYSnMybDEzR2JkTTU2OUx2Nnh4V2dSUm1UQ1dKMnJSTEtvY0ptOTh6S0gtV0dKQjA1cVlaT0JZYTdQOVlrdExNZTYzUkRuc0RoZzM5N054UEJFT1pvenh4Rzk0U0tLSUNyUXJYMEJvYmcxRUFlcWFfY1lvMWpIcjUzTFhBV3J2Nno3UHFCYmRVSXM1cEI2cGo0M091MDhzV0c3UTVyREZkd3JHZEpmallLR1hQZnpJcUVJWi02a2xZeE94cC1kazlKT1dpZFdQd2hmblhyWFBsa1ZnOUhDMkdrYzVwM0ptMlVCWE9MQzRZM04tYTBYT1UwSHhjbDhjbHlwVEVpNExCNV9VU25sSFVDVERuS2h0TjE1WEZieG9obnpySDJRYkFKeWM0eUJKeHNZUDRJcVV6QTdBdklfYmpxQTQwX2UxNk5yMHB6YktIU1czZWlLTzBPSmJqa0JONnBlSjdveU9vX0FUU3Q1RGsyWW5DRnBHMDFnY3V4aFdpaE1NWVVzdm1Td2RQb05FX2xnazcwS3FwbG0zbVlTM2UzSXhCNnA4NFBFT3pnMUpwRUt4U25EcHZ4SGxUTmJzSXprUTlIN2Zmb2dLcUx0T2VySkg5NGZ0d3hVNGwwRXFTUHRfMHVFTjlBLTd3WkY4REhhOHlReW9wSUxkS0JOZ0hsN3p0dzJVOVN1TEVGeTM4Wlc5THllVWRqM0dDNjN6SURXM1pHM3B3MDVHSVlMVHQzdHI0NS1LdnZlaHpLYmhfQWxGcTFnaGV5bS11R3ZyME54cUVuTDJzdUFyUy1oS2ljenZiaFNuUFRuQTNHdkVaRWZkVDcyTW4xT2JTVnBVNzZSZlUxand2MXpVOUZ0V1l3dk5YVHU5bF94cmIzSGJVeE1vQ1l2cjJnQUZ2RXVHaTJwS0NEb1J4LWlRcmZlS1Q5Rm5xZmpic1RxQ0pseHViNDA1MjRuVFhTWVJQTnJscEhJaVhBMkRyUGtBUUdGakcwTG43S2VrY3V5ajF0LVU0T0dNM2JaYnY5ZGJPV1hIcVFQUGhrcmNvTTd0SFVyT1lPUmM0ZFdsX1JyNHlqYnRmQl9Zb3BtOHl4ay1uZUJ5VzJqUldaSHhMWC1vZUlQZWFBVFBvTE4wZURsX2F2bTNiY2hfb2xNOEFfNExTdjlDMzRwN3BkcnVtd3ZaWTYyNWpqTFBxVFBOMTFzQXRDVDdma3FUODZxUU0ydGkzS2JBRmVSY0ZtTzRvQjA4YzZRWDRCWTJVQ21xT0Q1OWV2RDBhanFBdnhOSEZ4eWVnS21MZERoREN6MmJIbmJUMlhqQU53aUhIQUV4SnRINmtSMGZiRGF5QzRZZjZsZUFva2xVeF9LaGNwUjY3Y29VZWN2MTJPa0NhZXhCZFJKTmI0aGUzTEVhQ3pOUGZ3YXc5MGVMRnE4RjlKSEFLdzgwNW9URlFyMkZBcWl6OEppMnRsR1RsTW80YndNM0FJZUhpTFZzU0xheWRJMzJRbWVzeE9ScG1ZNVRPSHZLMW5QaUduZGZnWkpNajlpMTdOVUlKcTRaeDhHN1BYWERJcWlseU95UWdvN3UtcTlhd1VmcHh3Z0tMb0pQNXVqVXZucWxBV2VPZ05KbXZNcTIxRU9RTUdZdWlROU9CUTJROXpyQVNXWC1BQW1qemZEUENXcW5BOHNUQnRTZ21FY3l5eDkzek5wdjBnZDdhd2l0LVBlVlZBWXpfRGxickk4dkNOVHZxU181ZWJwZmhPZmlkbDBJV1lBZEZQOXJVLVI0M1JOZWZ3bWM5V1pLek1RZm1HR0lsN01RSjZBQ1FORVNsYUIzdXl6RmVKeVdfQWFTMWh1RS1PVGVoVGpaWEtKY2VPSEo5MXotSFFQNEk5bVhrTXllRDh6UFZUVnVNN1BUNnRYcWNoR1FSdktIckVudmFUZ2tsRGt3bXZHOXI5N3FGQ1htRDB0Um9pSXFKN3lSNFlNN0ZLVWdaRnRpVEVvWEgwb0tKc3ZQQzZBcU9ZcXNlTVBWN0t3VGdZbUdjTWRFVlBCT3BBSkF6MWtyVTN3UVRtb1pDNlhhSlZ0VHptVGo1QzhFekdEMkFsT0VFSjNrcnJyTGVRR25hTFdhOHlPUzVWa3VpNjNvQ2RhZHdqLTZ5ejVtYTQzLXQ4Slp1a1UyWC1HYTAwZ0J2aVhWcnVuNW5BczFRMmwyUTlMWlVESG45UGdCd05SNWM0WUN4d1l0a3FmR1Yxb3FLSV9rQ3lSbWYtSVdTM1BLbFpNQnZYaHFzakIySFd4aHR3RlhJWkpPZ09YUkcxdDBaNGVERWo1b0tlMGFzdHNvNnpySWZ5dEZMMHZhT2oxZ1VjR2R2ZHc2UXRNLXJ2el9tNmRUWktLb293YmJpTmt6SGRuMEQ4Q25MU3JKUW44YmstWDJyTm42VmgzRUhZZWNBSE9BNWRyUHVBdy1WNnJXQl9FblV5ckJwYVVUVTV3MWhNYnMtcnY0OUc2bk1WYjZtTFVkU2ZCZURfdE9XQXptZXhVdXB1eGxkWTdOVGRfTGxKRVFxNUVQQWt2SXM5N3Q3WnlVMVZuYzJ5N2ZXZ1N2NkVLQmNmanZDWno2V0FjaVpPRkhWcm9hQ2dsM0NFQzFkNW1wcHluWUxyS3FRRDQ3OGRoRmNuQXp3WmgxNVl2NldzR2lkRGRiOEVDQmdOZ0tZakJ4YnpmZWZJNTRtaERrRWl2Yi1nYnhfZlJJTWV3MWdBb3ZKTWQ4ZnJRaTNhRExBNVFySl9ZNkpMWGtKdzNUdVNpV3dOX0pvNmRJT1lTTEZhdk9aMXZjaDNWaTJKcWVJXzAwbEs1TGo2MmZYNzhHTDBsd2RGRk00azVBUjZMVEl6bFlNRVJuM0dHbXN0cUh2bWxpVFkzaGNnNXlpTEx5dmRsWVB0WURQTjVRRE1NaGdWdFctUm9QMVNHbk16cVVrU0pfcUxYZ3BzQjNoanFkbUFZSEk1cXJDWkdyR1pieV9Ock9zVGMxczV5QlhGOVhkWkFDZkthWFcxdmpaTjJFSWEwMzRNOEw3ak5DdFdCRmhzM1VRMm9aZmJHQ2ZqbFdqdWJsV3VON2pBWDJTVnQwREppb2ZBZFJUZXhwY2hrU0dNRGJNR2daT29Yc0dJM3I4NUttV2RQOTN1WVJ5a0dxVVBnRlJxMjVDaVh0eF9BbWdVOGRmb0F3M29takNMcTZUVUVkZVoxaWZJZDFIeWRWdDFFZFlCU1Y4cGU0dzQyVnpxY2FONkNiYVh5T2NqX0ZicUJsV1owM0FES0oxaFM4Zy1wVDF0aG9SRWQ3U2RhYlFfUFhJVlYwMFRKR3AwdS1VYW5kZ21zU1BCYTU0QVVIQjBrbzNWV2ctdmdhSmU0WC1DY054SjREbmZzVTVzNWlSVm15aEZmajNBUzVTREdPNjlMQ1RoZUlhd3d4M2NwZDZHa19nTjdwel9IbFhCNTkycFA0TXcwTk9IUG5lQ1F4SlljVkpvTC14ZVJBWHMxT1VJMDItcy1tWWE4bTRGTzU5OVZwbnBWQzd2eEZybmluUm0tU09KSktSSDJYSGRBbjlTVTZlMUlVMnZJaE14djBjdHh3NHVWa0d1cUhnRW9xWWYtQW01dkpLNWs2dE1BSVI1RDAzdlBpLWtGY2w1YlZUNnVEOWJSQmVDVnZXdzZac2lydjdmMEdPcXpiTFljWDZVSEtOYXhPV3AzMWxnRndEbjFQSG1zWmZJaHB2VWJCd2tocl9VZFNFdDdRRjAzNFdsRkV6TVRTU0dpZ2tCTlltNTZ6QVpfY2VSaS05TG91ZUUtaS1aLTNBTC1vSzVfbXNmOTl3UkdsZ2pWb2kxYy1PUTZQY1hPOEZERHNTVEw0V25vdzdJUlByRnRhTnRBcDBEX1RQNmgwSGpqYnFjdU44eU40MEhvU1NXbl9HOXJTLVozRzM3cURsZkdEcXZyOWROaFB3d0twN1BHNDZNZWF4bkI5dGYxSEZ1S2h3dkk2MEZLMC1kVFU4b2pqRDQ3SS1teXZMaDJITy1hTU9PMS1iQTA3dkltT2pobWh4RS1uSXdzQVk5TURvQ1hFQTZYeE10ckdFQkNOVFVaQ1hTSW4wYmpUYTVKNlhXLUl6XzdLU2dhclRla045N1RMVzdFdEpUNXFwekhYajViZld6c2JKMWF5bWVDczFybFkyZjBLSnpLXzk3QmlCazlMVjdwU0VfX2JOcTFpa1hvZlVRZkFKekhaWDF0M0xRUzhTUVRhRzBsX192em9pb05NeWhTZ0tUR0dGenpabE5jdmRCRTJEeURLZ2VkZ09lZDJsd0MxTjg3bFY5U1pSNUdPbTV3ZjY5MmVMYWN6cEZFMGUzUHg4T002TlM0UkQ5QXgzNDhZcU9RS2tlTElFRjR1UnVzdTlGUjhDZ1Z4dXBlckxabFdaaWZIVkdudDBrdWdqSy0zU3FwZVg0ZlVlbS04LVZBY2V6LVNpbVc4Q3JybnlCSDdWNUlqamk1MEZUNjFFVUh4aE5JeFQtendlLTRlUkRvWUVhN3hwdUs2MDNZTlFUSU84a25QeHZaUE4ybjJoZkp3ckRhbkxkaVhLSUxWUjdONE9RcGYxd0RUbFplNXJuTzJQbVBNSk1zZHZvUDZ6ellYakN6SmtqQ3kyVTBnb0pYQ0hrWi00Rm9FZkpnQWJLNGlEY0lLWGIzTGZRSE9SQUFfTmx4THU0bmFpdElaUVdfNktqR0g1eXV6ZXFKdnVqTHVqam4tUXU5MGthOU5JaS11QUxxcU1QYTJ6S0padnJlNkJBTU5QTU1PODFFckRNc3lNTDZ6cl8zSWl1ZDE1dWtaRjVDQkpmSXZWeklxSldwanJiYTRldGF5S0dLUGZSc1k4dUpNU0daUTZSa0dra1RrWU1scnhlaG9tM2JzcG5QSkJqMVUtaU1paDlKVEE3d1JMa0RsVHEta2lKbDZQYkVielVsQ2RvRFNLUkxiR0RlLXEtM0xWeV9Wa1E0OXlrUy05Tm5GRF9PTDVFNlYxSG9JMW10dVI4SmprOWlsbWxmR25NVHp3emY1UGI0Wkp2Tjc2WWRZZTE0dnoxbWtPZFZnVTVicm9PNl9aY0NWQ3E0MUxVZVhmZTJDZlN3SGJfM0x2aW5ZMWZMMVJ4UFhIZzlwendIX0lINXFjRWFybUdQcFpVNUFKenN6dVNXQ0k2QlNEdmNpbnptN3pNNjNoUlFxNG42Z1U4NERJWjRhMW1pQXJyN05rbjlDVnVRdDJEWHVUcWV1N1l2UkNtUk1qNVFYenVEeHJzdGpfaHlIdHJmUDFNdmlxWnFMckUzbzZCRm1vZlVLNGpWUEJzZC1YaHMyU0J5dlFjVjlCQ0RjRGU5X0c3bWpobTVRelprMEZxM0l2d3BpWWI2bkc5Uk9vZzZRQnJQVjFwUExjc09TMm42WWoyX0RNLXFBSzNLdVVMamdXRlNMNUVyRzhwUldHT3ZWU0p2X1c3VXBLVHI5WXZGUVEzbWZyN0REYTVER0tRbzlfblRyVDUySkh0bTNSVUE2bzlqNy1hUUVidnBNUEx6eDRGSThGWWRtejQzMXlpMDhEbVMwVkU5SVYtRzhoOXpJY19yZjZsWmU1dS15bnVZNnJQUV95bGFYSGIydHpLb0Fjdkxpckw1RVJBZFNBNk96bEU1SVdZcTNhU2JPTUdxN0dCc3d2LUR2UUxlRGtBSWhQbHFyTGpfX1pxTHkxRTVrOEt6cllnZXBjdUc4M0I0SEFfWGp5RXRPMDQ3cEZma0ptektBckdOU2V6NFN4cENIaWdyNkZIMHpaVWYxdVNFNVFPeGliUVVJa0ZQV2FQcUUyOVV4STEyQ1JETUtQLVlpZjlWQTd0NjB2XzNPS05XUVlHZl9UcGRKM3pEaC1xR0NOZFlxa3d0eTU0TUtvU3BLNzZ0X1lEZ2NCcm9SNm15NmZtbVRUei1lSDVpS0ZvSnFxYWtoX0o5dGhrU1l1alNzYm1zckcwMmZidmNMMW5uOURRSUdVMlJLRGcwWWI1cVVoek1nTHBraWNjbXZ0SGlrQVFmSW9nZWVmNTMwTnhpb3VBOTNYSEd0dTVfcHVYVGp3REJzZjhPdGQ0eE1LMWZoYnFvZXpGYzVJRklxWWt5WXlBMXFCN1E3VmVwc1djSHF1cEVtOHhjendOYnhyeXh4dmpHaUJwbjllbW9HejdQc1RuWmpGRnVRNzZxcEhqblRqUENWRnFHdEp0N3pEZnBkcGZ0cVBYVk1sQldzT3NOY2pYVFQ4eUJWa0ZSbVN2akNzeE55OHZuZGFEZWh5dno2Z3ZRbXBzNWRGekhNNmNHOWw4M2ZSNWxwTEc1a0JQbXlkQkNiRno2NHhsX2VGVW0yUFVtTWI2Q1ZSaHBmNXJjZmxHWGRRWDlDLVBGSjFVSG1pc1JWMG1VM2xnekJuTWpDSzg4MFctNGZodldLTFZ4OW5KbEJObTdtWF9ZeGVMQUg2Vjh6VFA0YTVRaEVIUGVvVFJ4WlEyQTM4emEzcG5iSS1YaXZsOTE4eHBGVUN3UExpbGRjU2ZGQU5xNDk5OU43X1lUVmd4bXRPTi00YXJkWWZwbE9yRnMwbzRzbEhYVVNOUUtNQUFLNXQzbGFtcDVNaFZRUWExWFAwVk5SdV9KS0lZYUJCV1V5T01hd25vZDA2MEY5T2N2Qkw3ZVUtQlJkak5NeVgyMFRMT3NkWUQ5SXR6STd6RVFIX3l5R1FEdVFfall0X2ttTURTMl9FTFd6TVhDSUs4Ni10bGFCT293dnZGNlVpWlRDM2N5WG9Ic0ZoNzFjRC1MWks1VXg3ZFhRNmR4bUtGRDE5SG9uNlQtV0FySk5lOEk1NGpUaHU2SWZqX3M4VDhMQVY3QU5jMl9INGZzeHFuLXg5MjJ3T21BamQzNmYzMF9wMmc2VWdlQWZNVkFFc3czWG1uUjhhbGFLOTVkMnJKSF9fNzVOSDNIUjl1RXBaNV9sLWRhNmVDOGdvUDBLbTk1UU4zeEtVSWxjb0Z2d3AwTTh4QUZMelN0RUVSN0l5dDNGRnNBalVuNzFIWlVIM3dEVHpNUW5Bdnp5RWdsNmtkRnp0dG1PQ1NOclBGTXJpQ3FCejEtRXpYT2YxR0d2NXJ0N05aUW9VX0hjM2xUN2N5eWNUSV9JNDJQUjdmRG5RUHAyLXZJRXNOQXoxNF9zXzZxUktVVldoTEJWWUVnOU1NMXR3bkNkM0d5MjBKMmdvZ2xxbzdRa3JXYXp5MzNBdVdXMV82RWxOZHQ0OS0xYWNpTHNCQUZxaDdxcUM4eDM3bGR1MFhRTzczU0pYMDV1dzRSTk5fUHFXOGY1cnJFblhuWTV4cl84d1gwOF9EOHlXNjc1NkxFT2Q3Qk9XYmRCbHl2a2lhTG5naDN5UDlPQVQ1ZjV5cHlhc0l1S3lPckFnX1JqQUtPZzNUQm1UZjJZTGs1OUNxWFpnbWhKNHJrS1M5X2p3UXI1c2lXZnNFclVXbVFRaExueGZZNGVXMVR6NDdRNnEtSThJdmJHdm9NZEc4aGRESXhzczJTQmZLZ0lpZlB6NGpuLXp2TVVzOEZnTDA4UWpDVEFheHFHOFJYbVNqSW5aRERESHlzY3owSmRabHpITDJsZkNMMVk1eE9Ha2JrTV9YZjBreER4ODF3bVFjWTNXbjl0eFlFLXhFVDloNndOTGN6UVh6TzlONXFpSDZpNGJadlR0MkxqdmJrV1M5MEw0TFVFZ2puSE9PTVQtWmtYbWI2d3FoVzlfbjNvWkRZcjlNQ0xPWU5FQ3BUVzF0aGZtTVRDTkk5dW95V1hHZDdDVXAxaUo2UGRDT3lXb19vblpnaGVQY0JNUkhmdU9NN3pfRnJIdTlqNEN2Yk5nd1A2cnFvQnNWcFJMRUp6bHhZbU0xZFF1WnFheVlYbXBiOS1XTnhtZ01tWVd3TVhaZFZWWXJhOTJmSXJUVzdkU0lkeVpZQWI0YUtIZVlMdExJTEtkRjZHLWZiNmVVZTU1Vm9sMEl5S2I1X0xqTFhRLUtBUW92OC1RaXhUODN4N3k3cFZDeEZ4R3R3ZnBOLTFVaklfTDVEZHQ3N1dxMi1wN3JaNDFoOE9ER18yUmlOVVFucUFEeDc0WVlFX2I1SlA4MjY2SDhCSEQxVjFWUFR0aVFvUFNETF9kZTBFVnZ3dUt4Y1pRYnV1UnpzRUpXZHZfWkVJRks0dXdfaHdQOEV4ZGFpb2M5a1FzMmdJem9DVW1yaGFjSkZUU2J6YXI5elBteld2Vmc0a3ZjVUMwSVkzTTMxS1JhT0plWkkxQ2FWWmlfblZHLUYtbmFJQ3hIcm9tQUVBZDBEVFJJOTNBU1E3QUlIVE10bDlfQkxOaEo0UU1RQ0dSblFXdkF0SzhvbnA2NGVzcXBubzFfODktWDFzTVBaejlOMWVOOWR5UHBfZlVfOEpUdmwtVF9lRGwtOXJaS3duUnFOdHhHeEZuVXBNdXE0MEg5dThlMHhYbXJlOGdTTzhxZEtKeFpvMkNEUE9Ca2RGcF94Rk9GNFNCUjdQWGx4aHl3SWJ4dVYyRlYtd2FERzR6UDZCa1ZKdlZHejJSNkpzTXVELUoxdWJtc2hhQTJsR19fbXItLXVUbFlybGxLanFVUHBQS1BGUDZVZU9weFVWdV9CWlZBYnBJRmV4VVdxc3hrZXdxaGlFS0lSckF5Lk9YUTNscWkxdk4wNG1sb1Mxa2xPdVE"}' + body: '{"value": "JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmR5bWh1WnJvMmhHTEdNakFVNEMzbXlJU1JPUFNDRmpvckxUcU81TkZCU25RT19LOW5BSGxoeUFHSXJnSDhmZ21CY3QxZndxdTI2TEVPVmJZT29Cbk5xMWg3U3c2S2tVTkVhY1ptcVJFYzRmb0hZVzJDYW55ZHJEb1JZY2VUME1aSEt0MTFIZF9KUndTZWNnS2ZyTVMxTFhjdlZab2MzY3hiT2wxRG1rOENsZElZZ2dROGwwcXZTclpsWV9qTHRtaTc4SHBjSTZoczE3aFRoYTkzYXIyVGszMUg4UjhFR042Y09JcW55YldCSFFRQlpOSU12RnRnY3hZRWIzWDBmMzlmdk1sajVTajFtZG00TDN3VUYzZWNHUWVIODdLQWtIemJiWWV2QTZmcU9vaHVuWUY0aE9XSzVsaS11R0pGOUprdFBDQmkydF9jSlJ2eGdBQlJpRlZLUS5EUEtzYVRwaEVKb1ZJdEpXcC1MR3pnLjRjMnlBMzFLcHdSQkNDb0pkTzdqdFk0NmxBZUlJOHhORUp6TU9xd3JwWjNQREtVa1JhOXhKdWVIVG5SU1F5bk5YSmY1LURZVjNqRGZlVjhKamIzRTZaeTQ5VTdqZ0pvV2lkZUthTHRXQjVTcWtEd0pSY1FuLW5aTVdJajgwcTM5RXV4eC0yeGdNdDlGOFhObmlWNHN3R2xOZnJYeUkzNV9OMktGNTh3RmtTcVEybmZRN2owLS0zeXBGZjZrN05TNlFJYXNWUEIxMkxXRGFQSzBVcm5NV2xyQ0hGbkp0WmZ2Zm11TnRMVnRQYUVIdDFzZFVad3lsOVhQSTk3ZzNpbXFPM3N5UjJ3ZmtTUGtXdE9kR0VQaGZKWElvN0F6NGcxckpucTN5OEd4d0hQbklHVlZTODl1aTJRdFVpMXM1VHVNZWxtTUJmczl1ZDVpQ29lSS1vNmtJQ3FqN3Rjdy1rTkN4SGQ3NWE0cXdDTnU2ZlNjM2VyY29BU2RUMEdZYVdXU1ZBWmg5cC1QZzZlVXlSUF8xbjFPcUlLWDJPR2NIelNvRWZkQmZMSVZxQUZJaDB4X0tqckcxOE5ZXzY1V1kzNkRJVjR4X2ZHcEQ5QXdzdVN2a19PSVZ3VDB4NkhtRTRhMU1pTzl4TlY1R3Q0N2dIY1NrdldpM2JteTE5VHF4X05fdm5PZnE2Q216WVhDb1JtdVZnaU53WS1fNXNoSVpHUlk5YUF3cUVxRUNkOWJLbUgzeDZlWGdUR04tWWRrSkVHdkt6RTZ5UExHdGdMX0RqQmNMcW5JNHMxOXhDRFFLTnJIZEx4WEpQcVpHYmRqTHVfbGFWcXdBUnI3S0lZUG5FNTBOalZyUEpZU2ZaRjRCMWVPTUJvang1cFJFbERDODRqSTRvTENJdTBhbTlnNVBudlhUQ2FHSUJPaTBCX0J1ZkZZajBndWp1dTdHZl8zdDhrQ1UxQklEYXQwX2JlUmx2MmJrR2RNQnBNRFlRaTZ0NmV5U2drYkZZM2dseVo2U1ZWNE1HNER0cUJCWnVISmRCZTZzSFFNRnliNHFQTkpfN1pGVEJHLWRfc2gxYWJhWEM5Wk9qV3FwZGx5RXBKaE9kd2dXZWRXcDFOQy1sSWE0eWZoLUVjVTl5VDZxU2FXcGd4SUNEdjJZekc1QjE0aGlUU2ZKb2txVG9PeEtWV1gwTjJGc2VBNHduYjBZWGdXSW5aYVk1WThsUkQydzVrNEpTaGYtUm1GejRvU0JLWEQ3UEp2dTNCTEg1RF9GVlM3SEZHajdMRG55MkF2RnY0ZVdLT1ZCWWphb2hndVhFOGc0eXFsUVZERGM5NzJVWVVsTS1SSjdqUjlGYUJGM1htdlViUjZSSjd0WTlDeURuQ0xJUWI3YUFJM01iRi1uTkI1aTZaY2RyaWNXWWo1UHM2NUpBZzFGZlRrUmRINXRkRXVlbDhqandXNDFoRWlfSl95QWVCX3BTNF9MYno3RS1qWTFOTmEtX2loYUtqVDZEM3JpQWc5WU5Ud0hndHRzTGZReTJWM25admlEUEZSRkJUVGIyNW5qeXQ2VGwxanNmMVNibkhnaXp1NDUzQXVWNXJjNzlHYlBsZ01pd0Q0TDR2Y0JLSzdVMVNNNXVXN2pPc3czeVUzMFQtSXlDUUJ5aUlpbnU0R1Z3LUhuLTZKeUFYZjExQWpsSG8tcW03dDltZmJxOUNYaU9Td2Y3N2FsNXQyMER4T2tfUkU1cW04ZEk0NWozMjBia284SkxjV3VVODdNNThYTXNVaEVycGM4OU0xeXpBMUM3TUg3VnhSZnlQNUFBdzdBVTVBUkx1VVhleXd1Zk91aEtqVjEzZ1ExNUYxS3FNVkdxWFY1U1g3Sy1waWdrN21HUFVQVW4tTXlQYXQ5OTVDZ1BGMTl4NnFmd2M3RGxZSDBLbklQd056bHVfTHA0ZXQ4T0NST0sxOFd4ZzZmNUdJdmQzOF9TWEZWMjJyOEp2enNzZDFrX3htbTdWOTVGbTE4QW5WZWRVanhueDQ3aGFyS3JQdGFsOHo0TDM1azZCSDVFQlQ3SXFxUWhodFQtenUzTUsyMzZISWdsd3hGci1kM19IRnlCMjd4M3U3ODFpQmlBTVZ2R2tERW1uVGhOQ1c5Qm1JcEJ1bnE5eS0yNE1HRUlSY0FoWFN6R3VzQUtwcUJObElTWl9ZQWVxOXJRVXowYnZfSUxsNkRJdTdGYmlGLVVuTFdOMWdRUWlkU1dHVVh3Q2YzN2JMeFpIUGFCOVFnYnp5R3ozUDNxMHNiWk1Ra1BWTVZPSWF3S29FeEdvX2lPd2pSMDJiaGh5aWI3em10NmJKZ3Z6R2xZbC1uM3lYYVZWeEx6M0pQVWVPVU40Uk1hT2F6SHYtWE5wYlFWQndUQ2MzdHlwSlJpanpHVzUxOFVNeFFMRmZYajV6eHZrb3NxSGl1c3llR0NoVWFSWm00Si1CQkRuYWxCLUlaX1NoMXR1dnRXT0dJSHRCV01qY1lmckxrSUNJUDktOGQxc3AtZVV2Um1nRzNseFFWQVNuRnJyYk9NNnVzUEc2bEtiZHVhdnU4VDFLUWlNSHdhMVdYNGJYYUp4LUxqcE5rbW0wbFltT1RwUjV4bEE4RkdwY2lvM1licGxZVnVzNHhWV0NmS1lEZTJ4elhwMGJvSWU1Nm8zYThwOERrbDhWR0Fwd2JRdDI5TXZGdnRhSWpDRnJyYUdRZjV4ZG1sa01PSFNLaDhQb3R5TG5talFSTlZva3pEYUl1dUtMSjNRaGdrNlRhejc5b0pLZGlMVkNPdXNwMERSS1I0SFlBV2pURHVCLVhITmd2YnNzWFNFTkQwMHoteDVfcjZfTnNzaVhFU0hodENTMHNjT09DZEdVNTA3MTZpZ0szYlVSU2RzZ1BzOXBnd29vZG9Cc0VQdXpFN2ItZFhVbWdxNUVFNlgzY1Itcm4wblRFczNac1dOdjhuanFfSVYxMjlNMVpNenJnT002THhmVGl5WjBScl9BOF9UQUFXRWpkODV1VUI3NnBiMUZXdXFOTHVwLW1fNUt0elc5MTJEZmVndVNoSEljS1lsT1M2U3YzZUVhWlZlTnJSWUJsUzZYLWlINVl2cVJYX19yOGYydTNYb2JpTWxNbk42TC1jN3VqVHlCa09wQ1lVU3hoNFptWHZfSHhJZ0t6OVlLMXVzNEV2Z1h2bWFoN0NXSy1NRmItSzRMLUUydWV3eGc5WlpMRm1iTE4zcXRhMm5FRGF3ckFIN0E1QTNBU0dDenFmR3c3VzlwQzA0SnpSS3FYMnZ5U2lzaVlJUWpCNUVSQzdYTlNYN2xWQ3ZpYnpsRXJlNzFSaHh5bUlLekEzQ2VTTFlIX2pMTEE4cEh5Qlo0Q2kzWlNOcVBrZXhOWlZRdkxKZWY0TV9JanV3UkxmY0pQSUxiOFM1Ymt6ZmpaSDZKdWp4Ry1ycl9LcTE3STQ4N3ZuWVVGSGM2UVQ3XzZzR0lCUzZncjRPSkFLSUdMNjQ2SXhJRTExdWw3YTZJYkZHeGl3X0c1QU9kd1Nvd0tmckVVVzFMOEE2ZWF5VjVjSFRIT0ZHUHYzM1R1U1VpN2pFMTJXdm40eThNTWJKYVhTNkFJVS0zN2Q0WjRmbFpjNU1ZbUxIVktoQ1pMYjh1Rnc2REZCamdyY0Y3MVhUVG52dVp0cEgwZ09EM3ZqV1dvZEZwNzlqdzNfNHkxbVJvbG1semhDaDBZd1IwYkJ5R21qS2dDVEQtNjdidEdZb1FHLUY4SWprUzJxcXhWWGpvWkdyOXVJZkNuQUpTUmRlYWNLaWpkc3FKYUtHSk85dEF2YXhXWXc4MUFMQUVqdElySk1fcTJ3c3liV0tSWkJmX3JUQVNfTFJUSGVpd2prRVVtZ2lWelQwUEdfSjRDWGM0YnFhcERhQURGTGlScFNwYUlKS3JhdVc4UDFsNzROeHRVbXB5SDBRZ2U4SnJ4b3lYTDQzdFI0T0dOLWg0aUUwRzNoa0MzSzFRQ0Z5NXN2VmtBdGxha2l0aXc3ZVFGN1pjcEtSeE5hREZEYllUb3pFTVJWQUtWa0RYbWEycjRxVXJPc2ROSlROQnFlWWdhbnh5Q1RpR2FNRVZEZjdEanJTWjktTVJ3a3R5UVF2d1NYa0k0VmR5SlViX2xJdEF4UERkMUNpV1BYRkgtdWdEa1RrQmRCdEpYMEN5N3Jaby1kSUJ6VHU3cDItNTJvOUotVUhfbDV3LU9FZ0dZaENnQUtGTkpaSWh0Z21nY3ljUVdHcm1RT0plN3QzNUlIeExwZ1Z6aTJGVWp0QWNGR0dPeDVuQW1DTVZOdzhxQnZQbnV4bzJSV3NZa0VJcGRRU2MwS3Z4MHBvWmEzeDhObW1BYnYxa0VzdzhZNjhFNG5wSTB6bnFLYmV4NFU2OFh3ZTBlSGVpV2lwemthREpUUnRqVWg1eE5Wak5RMktPYTEteHJjSjJ6MXdJc1JqdXp4VklNaGdpSXVleGp0aWNleU81WnBjUWVDZ3J4UWx5bFdTdnNOd21nOUJIWmNwVnZaNWN0LWVvZ1pQSUN4S1pZSmNpTXd1ZHlZdUtXdEdiTVRMWF9jYzd2NXdTa0o5VnZFQXdfUi1QeW5VY1hZY2RNcUw3WldxY2E4czVIRG1lWlNZb1RWTnBSUzdJRFZBMnh5Q3JZWjZkanppYUZHT0NSS196d0pPWVEyeE4zWGpMYXAxSWNFOV9qUkhJM3loYUQwUlVyVkppNVdGdC12VnlsYldVeVNZa3JzZElzUGVzQ2U2S3NpXy0zdHNzNDNGU0NCVkZ3azhhbkdxcGVwWmdneFkzX3JtSERiSjBaZmV5SUlkb1RKYzF4Q3dGZ0kxZ3o1X08yS1BXWWF1ZGdiMVpjRmstS1cxSG1ISmx1cU9Qa0NzZUFGYmc0M2NZTUtsNjJKY0VsVjhQdlB2Xy1pMFU4ZDJ6bEpfUm4zakpvb2NnV2o4RXR4ZEh6UGozdnMzRU13ZlpVQjIyVnZGM243N3g3STZxTkhVZlNObGo0TWxnc2ctVFJfVW9Nc0M0dUlQYnp6XzBUdlJfMXQ5LWVYaWZWcF9zYXhEWEJuS1R2LUxSaEIxRjA0d0R3SzZpX2h2cmdwd0ZVbldSME9ObURSNVp3TmVaMGZ5U1V5M3lFNnFZLXZSbXB5RjVqdE80V1dSQW9mb3R2OXJNd3FvNTlvNUNmY0kycVVockJvOERSd3JzOHFMczR6Q2Fxa190RlZ6dzVrdkoxSWs4U29EQ01COFYwWFJnblVLS2FndFJ0UFVfUGh3c1BpMlU4NGJpeU1WMmJBQlZsVEx1QmF6ekg1UE9Jc1o3bDlyLXV6ZW5XR1ZwbEpFUHB2c0ZEMy16OHJ0VXN6SjVNU0NJcERRc0xMUTB6WmZCY212ZURJMnZ0c2JvVEgwSVo2QWl6VnlTVUtaMnZDNFNCRml4Sm9GT25YT3ZUZGVfeFQwRGJLcUlac3llX1lLbG1Kd21LNHlRT3JwckY2NkRjZmV1d05YWkJ3a09RMktJVVJOenFQX01ERmtIRWIwamtlektrTjJ2amtHcXgzQ2VjZHY1SkZCWC1lSDlVeWIyajd0VGphSkVYbUtvZ3VDY1hJNjBOX3RyZGhRQUpjeExnQkloekJjQ0s0RmRkZ24zMDh6b1VHMU5pc29pWnBKekIySkZuZzFDeUpJMXlSTWhSUEdJNFRlMmJxV04weUdXS2NJTmI5NUIxcXE4Vmg3Si1IM1RZeEtydTVKTjBDNmdoVDJKXzRDdzZMNWdMd2dwWXA3VkM2WDJmY2ROcWRIUW1tRy1uLVFYc2Vfa29MNWF5U0tidkowYVN3UF84OFlYYmNBU0dhZW4zSVpwMUNhaVRfTXNMaXBXX05rOUZYcmlXcHhNZVYyQU9sZFE3MmhjYWVhNlBTS0g0blZwalhwMTk2X3lMT0JOTV9Vbl9Wc3FZZzl3NlVZSlZHYloxS0dUd1RVMGIzb2Y3b0ZnLVJNTUV0bGtBYlNUTk53ajRQSDM3a0JGVmhra0VkYmxQdlFDRk9zYzFRM1BDcVpqS2dsZHg4Q21xaHNHVDN4QlEtczd0bEdUMlJLaVdnbWZORDA4dHdOYlptZnV2QnEwYnpmandnQVhsYVZwUVp3d19sV3JoNmJUamVVREtfQmc1bHljSl9JeFhQOXl3X1pDZ28tN1dYaDlONm9fRDEwM2ZVUjBhLWRuaGs4UXhCbGc2bm1QVWVLekt3cGRrWmxYRGNMazBmMW9DNURoaGR5SEY4SkM5czRBY01LVzUxZ0pBSHRFczYwZzQwcko0eTJKWG5sbnoyenJHNG5zMkNRc3lfblNWUXlWOG8xaXdxYm1pZUN1dXBSTFNZcnF6M0xsX18yYUp2UTB1cmdqVkI1bkhhMkpkVmZvTXh5WDVwMm9KaHYxZE8tMlFuZmJoaHpZNExVNG9qNmhMMG04MXhfQXJWRjBUaVNNX2dLWlM5bHlPR0FCSHRPZi1GYmZzNVpOMmJKR0d0ek82QVRGaWFiQ3VTX0RzbHA0YUg4M0xaNGZ3WXphZFZPeG1UaHFIUXJyaGl2TDAxTzVlYk5aa2Rnc2NmblowLTNTNjA4QXNYRkFYM0lhRFR1ZVhDa3VQc1BtcWxLeXRLVmtjOU9BVktIb0I2YkR1cDVIQzZZQVY0dkt3VXAyUlN3dDIyNE52eTJ4RHRfd194c3VieGdSbnhPMEFGaFdUQ0dqMWhKeExZaXJLQVlKNTlVY3hoV195RURlcjhhTWdrWUNkWHVMNTNxQ2dLbFlVNHNmN1hGYktFWHdXUUE1RWd3cTVsRHlVbksyT2kwMlIwVFpBbWRfZFh1ZG0wMWFnZ1FiNlVwYU54VDU3MDM0Wng5U0Q2T0IxRzFlbGtITEFHcThaT2d3Qm84c2YyOWhaLVBBZDhpa3QwQkhSOHhBODA4SXJlNmtzSkJDbVk0WTB0OGo2Q1NvNVF0UWtSdzZmVmE0ZHctVWNSc2s3NkxZSGZWTVRXQnZMRlVNdEVSRUpoSGVLdlRjVHcwdXpTRHJPcFFMRXlISkRrZV9hVjRpenRYVy1nTHNDd3l3czNCLUtoQ3JJOTktZ214QTVVOVczMEdHRWY3NVFWU1FiallhU2JxVmFQMHRuWVc1R09meGFtYVdNMnRUcC1VRVRyRHhFMGMwY1pCbEdEUFpjT180Zm5nOXVvSG0zVG5EYk51Z1ZIdGI3N0F0RzJ2ZU0zc1o1WldpTWFmRXRTYUNHb242OG5kWDRFR1V3STdEMzQ0YVhFeGR0UDRaSWFnQ1d2Ukd1NHk0Ym1RbURqaHhFbnVMOFdLS2JXTDFYQ0NyNVFyU3liT3VIUl94d1RnRFFRY0k3YnVxTGhMME1jbHBTR2VTZ25VaHRkekI2ZTJiT1E0QnVyRExjbHpCVFVwMzhtWm95TVRfN05PWTYtNHktTjE2SDdiZTRQVFozTGh5eUg3dUNYYUtsbFF3VExERGIyZ3ZUdmU1N1hfNzRkbHBlNFFxVVZ6cWIxcnViVXk0Q0c3MHdsTUFGMlphdEh5WmlhVHVVR1lSbWFUQmhJamNSZFJzZUVMdmV1U3pMMVEyZGdmbGNsTGdQVU4yMFdHSURKOGxHdklqU2NzbVNjZjFNSnNRSjVPRzVzcmpMdVYxZXFHUkVBR084bmlXd1MtN3p6QlZxbGptUW56MGhmS2tVbXRMMEJuYktXYURLeUtsa192TnNBSkFqVEJRSlpTdkxaUG1xbmJ6b0p2N1dNN3Q1dngycEJsbDJ0dTBRM1R1aDdSWTFOZUROWDZta3B5bmtrR2N6V2E2TU1KWkdLYU1iSDIzVkF5V1JScC1BRkx0b3hWYXFqOUpkei1lNmUtaVNwQlFpRWFxcGpvdFpBT2twVGM5VXNsT0szQWdrZ2FMX0RBU1FDOEc3VVM0VDJlLUxrci1Dd2QxeUswdVdmVmU5LVpBYW04R2ZzclpWTHJGMEJIXzVkWlZoNlB3N3FEZS14ZVRfenljenlqOXFFYkhTTjlqd3VRMmNmWTJSZkUzZEpoTlJaYzBlZXpyVWZxa1JuRXFvX2xTMVBYampXV0VoUE1PcENYbURqMV8zWllaLUVpSlItWVZBUEJSNXQ0eE9hdFhULXVyT2N5NlByQ2s2QjNLNTNQOTdSU05WLUZ2MDE5NzJlTVdZVllOMVdjaDRfbmJGcjVhYkpQV0I2UzFuUEprU0hyU2Z4WVptRmNHaG1jc1BSMFI2V19hMm5DQmhPTFBOUVdQc184Tk1JN1ZPS1VEU0lLMVZRWmJpLW5kcElfRGxKZ0pGcnYwU3Q1NTlINThjXzZrNFBENWZsQWdkWFBKbmlRX2FYckRpTFFaSlhRM243ZUt0Z2J2VzFGek1sSHAwOG4wd3g2b29xcU1aenE4eVY3RDkzSE9wUVNLQ2hBVTNNNDVEZnZzdktFTVo0ZFRlaFJIYWo3SlZGc2pWRFVFS0JrckYwSDZsMl9zMjZmNjJGbEhSY0ppeVd3eW80Tmt2YkFCdG9LSEpSUzBLVGZUS3BRYmE3OEVqZGZoX19SOURQUFlkWnNDQzlOQnVyV1VlWm0zbTRsSFd1emNJMkpLZ1RxN3VlaUFkWVdFQkljMkNld1d1S0tGUnI0Vm5QODNNdm83NXZwd0JRT29DdWhvZkJNSGFzbThhNWEtWW05VlRLNGRSQnZ3TDI2b01hQU1PWVQ0VVhUd1plVW9UVUlQZURvZGRNbk9PSGVEelZuVGF5ajN4a2d6dDQwWUdqazZwcTlnejZoSnN5eXhSc2w1RU90NUNxZXZzY2NtZHVrQUVvQ0dhb2pTeVJ1ZUlLWUtLR2M0YktNR3RnSC1nR0FYck1GT1BZNHo5NDV5MXZfVktGZ254blBITnM1VFRxS1NFY0tLc2EwNWZIM3htSktrTnlUTy1MeXA1ZzlxMS1CeDZIUzZxVmVKLWFtaTgyUHRzcFFOZUc3cVFIbDF4LWxPWjlla29ZclVteXV4bnBJeDNnRlc0eGkyUWlHNWV4TWxxRFRWM19JTTBCSEdZbUNMTFUzTzhjTWEyUTBucFd1THJYZ1U0LXE2c1YzVlFYM1pydG9NdzVRXzRtd24xYV9PbklpNHdYSTJrVWVYSWVVOVFINzFVYWZJcHVWWUhqRDhTOTdYVVVOQnJ6YVN6d0VJcVhvc0FZazJsaG9FSy01Y3d1ekdEaUU5Z0JSMjJ2em85T0xhYy1ERGpSN3pDM2ptX2lSRlVqbFNJTE9fYXNRYm9VSnctVnlWRy1kOWFKZGV3aVV5bmEydXcyTkhsYVhFUUk0Ri1wS3hMNk04bFhMVDhDdnFVVVA3ZnFWVFZCUnRmZlRkSEtGZ3BZUFZRbk5ka202SmtVZEp1Z05NSG8xRnMtbDdBZmxnVHRKeEZ1Um5ZcVZkVVlWdkJBamVqdXZoQ1FtaGFlcDdwSEUwQVhPSGp5dC1jWjFpN2RqQTNrTTNONDJSVC1ucFNfQnExYkJoUUFLRFl5NnhzOTJTMWdHZVpMcmhYRnBMMkt0b0E0Y2g5YVNESEVhRUVoM3BTSDJydnhfRGhLYkxhazJXZWVpMXZHVWpMZDBiZjRYcm5NcExhSlV5M1htbjZVdXBsZHA3UFIyRGpZVVV3dTJHS3FONUhKLUlWVlNvNlMtaWhuLXhFZUNSVmo3QVdQM1FPLUw5OHVUQy1NR0laOW5pU0ZuUGJOZnlHMUp3ei1FbEhYOVZXdloxS0pKMVpXSU9PZ3ZtZWppY04xTUcxZ0F6V0NkRFhIaUpkU3c2RDJPMnNiUGdFWFlLZFJNWG5CYjVJQlRzZkNIc1RmNHlGZGxOaVNqNm5DdlU3VlVoeVdudmZhd1hiaTBwbkoxejV3WDRBQURRODdPdmdQRzd5dkxBM0sweXpXeXhOajhuLkxkd0syeDBvSUxocXZtMnZpSzhseXc"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '10636' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96041739.vault.azure.net/keys/restore?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/7089b08b10a64ec68db241e20e2109d0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qbGcivUVxthKiCxcjxOGdsiItrjjTm0_-o0gkZmRSDlEY4ixbjJYBZMwZLxLm7_ZzoGTVTdON-_6bLu-ZwFqAAe2Nc_HDLkL3FTn1YkjTSA5I6FTXI-CC79m3mPLbrVNkHRUkN7QPpl9Qak8RyRl4TA5XtOp_ztKm5Lfuc1eJsosaRdqaMe2UlEbu0XCdYDoP1UoNRAhrUZwli-GHH6yWQxq0SBtnfUsXH0CkgprrnpDYM3dxUkjJJ6IRpW4acRXrFDg-ccCBQDRLty6eSRehugfZyTGciaT4fBcj245OjytQZHxz2ZGixRxN0YsvjoZXqquXKqfkKEcknMDNapyFw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/d2c863b455c9439b87fc78c6ac184217","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"uWCbdAq6V_Z3_JRNeKK4o27y-v8lL_IUNGXQHywjTU4aoVK8iDvM0ChRMhlChsMcI-SyGaAk7kiS2ywdNx5JI3rcaZiiasFZ-4CUnUQbOB_p5L_r2dDXvfdQzGaigM6cttEW5Iwze5dEd3BOcDQumxRrtSJNld4AlxEK-Kp7xaOUFc_2yAV1QPvELtjJLN1zMNw12FXNqocpZwZ8t1BGvvXKYfz3yrS6rq0nG36n3S1yA9Cb0NnrTjp84na3diRQXpuaUg65QXrbhcBW6o1aKTsuEAVH5FAqDliBa4v5lqTNsWxOGS996rMfjsJHJQ_fymvIy69zHrMe2UPupwz_OQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527628,"updated":1564527628,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '644' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '644' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:00:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96041739.vault.azure.net + - /keys/restore + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_recover.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_recover.yaml index d1318da0dda6..f2bac86a4b60 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_recover.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_recover.yaml @@ -4,444 +4,502 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultfcf91456.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:18:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:01:06 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultfcf91456.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/c062f7d6222743fc8ce103b1d9850298","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wTcadP8ONiTwlvzh9KqAqaScUg1734Ux7ykEs-X3wyoi7MjSFaGb-ZAhDrH7iKSbArQeT_Pp4EvCl2axAvOJvT_P2Kw9CE9rtOaD2p6lMZjqY2R0jiMQVyYHpvOICi-87uhEe_N3pdoWxS93WXjo8NblF2dmvwbwCmuAD4IPWD5Ve0VGf2kKh9QtGmJHrQ2C1tdkPP1VHQmfgLNjBQmvPPxK1aAUgTf1jw1NxNErOyHOyiKuYe_phcO8qg0st7Q3wRuDfRYs2_J_1veYQGytghxlAlZ8DjiyUyKNK2fTDUKU5-zDCFWnn9mI1eiTVKXo_4FgEWLfno9vhZEvsO4EOw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703534,"updated":1562703534,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/896fd129ece84f1781b0fbc146a5ecf5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tC-zwt_MYEF4cZ4DDFjtfMUrlie9a0s5ZdkhA2p-BpOGpfcR1jkXQtOirLaC-c7vCyHTj7FauK-j-sZp6tLLQVTrjxuF4yr23qnJPaOsmmMT5um36xNg8eNaMF7p7z9VYEAwXOAWx1ei77MdfgBRV_YMzdxRLYvyzvorUDWhHg58Ple1ZM37VStOpU8layK0T12wJOsqJnPvOvz_m24WlbaP94UJcjs79GZPCXdrK-XRmmaw0ibKbE2mtAltfJHOMdQ7etmlUUW4eY838dTGudYi3vdvJI77h6700K7QH8xRm9jlUlp9AH8PIcBqfW-QI1a45N4GvsGYfHFYCz4piw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527667,"updated":1564527667,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '656' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '656' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vaultfcf91456.vault.azure.net/keys/key-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1562703534,"scheduledPurgeDate":1570479534,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/c062f7d6222743fc8ce103b1d9850298","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wTcadP8ONiTwlvzh9KqAqaScUg1734Ux7ykEs-X3wyoi7MjSFaGb-ZAhDrH7iKSbArQeT_Pp4EvCl2axAvOJvT_P2Kw9CE9rtOaD2p6lMZjqY2R0jiMQVyYHpvOICi-87uhEe_N3pdoWxS93WXjo8NblF2dmvwbwCmuAD4IPWD5Ve0VGf2kKh9QtGmJHrQ2C1tdkPP1VHQmfgLNjBQmvPPxK1aAUgTf1jw1NxNErOyHOyiKuYe_phcO8qg0st7Q3wRuDfRYs2_J_1veYQGytghxlAlZ8DjiyUyKNK2fTDUKU5-zDCFWnn9mI1eiTVKXo_4FgEWLfno9vhZEvsO4EOw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703534,"updated":1562703534,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1564527667,"scheduledPurgeDate":1572303667,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/896fd129ece84f1781b0fbc146a5ecf5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tC-zwt_MYEF4cZ4DDFjtfMUrlie9a0s5ZdkhA2p-BpOGpfcR1jkXQtOirLaC-c7vCyHTj7FauK-j-sZp6tLLQVTrjxuF4yr23qnJPaOsmmMT5um36xNg8eNaMF7p7z9VYEAwXOAWx1ei77MdfgBRV_YMzdxRLYvyzvorUDWhHg58Ple1ZM37VStOpU8layK0T12wJOsqJnPvOvz_m24WlbaP94UJcjs79GZPCXdrK-XRmmaw0ibKbE2mtAltfJHOMdQ7etmlUUW4eY838dTGudYi3vdvJI77h6700K7QH8xRm9jlUlp9AH8PIcBqfW-QI1a45N4GvsGYfHFYCz4piw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527667,"updated":1564527667,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '787' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '787' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /keys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' headers: - cache-control: - - no-cache - content-length: - - '76' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' headers: - cache-control: - - no-cache - content-length: - - '76' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:10 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' headers: - cache-control: - - no-cache - content-length: - - '76' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:19:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:13 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1562703534,"scheduledPurgeDate":1570479534,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/c062f7d6222743fc8ce103b1d9850298","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wTcadP8ONiTwlvzh9KqAqaScUg1734Ux7ykEs-X3wyoi7MjSFaGb-ZAhDrH7iKSbArQeT_Pp4EvCl2axAvOJvT_P2Kw9CE9rtOaD2p6lMZjqY2R0jiMQVyYHpvOICi-87uhEe_N3pdoWxS93WXjo8NblF2dmvwbwCmuAD4IPWD5Ve0VGf2kKh9QtGmJHrQ2C1tdkPP1VHQmfgLNjBQmvPPxK1aAUgTf1jw1NxNErOyHOyiKuYe_phcO8qg0st7Q3wRuDfRYs2_J_1veYQGytghxlAlZ8DjiyUyKNK2fTDUKU5-zDCFWnn9mI1eiTVKXo_4FgEWLfno9vhZEvsO4EOw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703534,"updated":1562703534,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' headers: - cache-control: - - no-cache - content-length: - - '787' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:19:03 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:16 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' + headers: + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' + headers: + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:22 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' + headers: + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 + response: + body: + string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1564527667,"scheduledPurgeDate":1572303667,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/896fd129ece84f1781b0fbc146a5ecf5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tC-zwt_MYEF4cZ4DDFjtfMUrlie9a0s5ZdkhA2p-BpOGpfcR1jkXQtOirLaC-c7vCyHTj7FauK-j-sZp6tLLQVTrjxuF4yr23qnJPaOsmmMT5um36xNg8eNaMF7p7z9VYEAwXOAWx1ei77MdfgBRV_YMzdxRLYvyzvorUDWhHg58Ple1ZM37VStOpU8layK0T12wJOsqJnPvOvz_m24WlbaP94UJcjs79GZPCXdrK-XRmmaw0ibKbE2mtAltfJHOMdQ7etmlUUW4eY838dTGudYi3vdvJI77h6700K7QH8xRm9jlUlp9AH8PIcBqfW-QI1a45N4GvsGYfHFYCz4piw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527667,"updated":1564527667,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '787' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1562703534,"scheduledPurgeDate":1570479534,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/c062f7d6222743fc8ce103b1d9850298","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wTcadP8ONiTwlvzh9KqAqaScUg1734Ux7ykEs-X3wyoi7MjSFaGb-ZAhDrH7iKSbArQeT_Pp4EvCl2axAvOJvT_P2Kw9CE9rtOaD2p6lMZjqY2R0jiMQVyYHpvOICi-87uhEe_N3pdoWxS93WXjo8NblF2dmvwbwCmuAD4IPWD5Ve0VGf2kKh9QtGmJHrQ2C1tdkPP1VHQmfgLNjBQmvPPxK1aAUgTf1jw1NxNErOyHOyiKuYe_phcO8qg0st7Q3wRuDfRYs2_J_1veYQGytghxlAlZ8DjiyUyKNK2fTDUKU5-zDCFWnn9mI1eiTVKXo_4FgEWLfno9vhZEvsO4EOw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703534,"updated":1562703534,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1564527667,"scheduledPurgeDate":1572303667,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/896fd129ece84f1781b0fbc146a5ecf5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tC-zwt_MYEF4cZ4DDFjtfMUrlie9a0s5ZdkhA2p-BpOGpfcR1jkXQtOirLaC-c7vCyHTj7FauK-j-sZp6tLLQVTrjxuF4yr23qnJPaOsmmMT5um36xNg8eNaMF7p7z9VYEAwXOAWx1ei77MdfgBRV_YMzdxRLYvyzvorUDWhHg58Ple1ZM37VStOpU8layK0T12wJOsqJnPvOvz_m24WlbaP94UJcjs79GZPCXdrK-XRmmaw0ibKbE2mtAltfJHOMdQ7etmlUUW4eY838dTGudYi3vdvJI77h6700K7QH8xRm9jlUlp9AH8PIcBqfW-QI1a45N4GvsGYfHFYCz4piw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527667,"updated":1564527667,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '787' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:19:03 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '787' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/c062f7d6222743fc8ce103b1d9850298","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wTcadP8ONiTwlvzh9KqAqaScUg1734Ux7ykEs-X3wyoi7MjSFaGb-ZAhDrH7iKSbArQeT_Pp4EvCl2axAvOJvT_P2Kw9CE9rtOaD2p6lMZjqY2R0jiMQVyYHpvOICi-87uhEe_N3pdoWxS93WXjo8NblF2dmvwbwCmuAD4IPWD5Ve0VGf2kKh9QtGmJHrQ2C1tdkPP1VHQmfgLNjBQmvPPxK1aAUgTf1jw1NxNErOyHOyiKuYe_phcO8qg0st7Q3wRuDfRYs2_J_1veYQGytghxlAlZ8DjiyUyKNK2fTDUKU5-zDCFWnn9mI1eiTVKXo_4FgEWLfno9vhZEvsO4EOw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703534,"updated":1562703534,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/896fd129ece84f1781b0fbc146a5ecf5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tC-zwt_MYEF4cZ4DDFjtfMUrlie9a0s5ZdkhA2p-BpOGpfcR1jkXQtOirLaC-c7vCyHTj7FauK-j-sZp6tLLQVTrjxuF4yr23qnJPaOsmmMT5um36xNg8eNaMF7p7z9VYEAwXOAWx1ei77MdfgBRV_YMzdxRLYvyzvorUDWhHg58Ple1ZM37VStOpU8layK0T12wJOsqJnPvOvz_m24WlbaP94UJcjs79GZPCXdrK-XRmmaw0ibKbE2mtAltfJHOMdQ7etmlUUW4eY838dTGudYi3vdvJI77h6700K7QH8xRm9jlUlp9AH8PIcBqfW-QI1a45N4GvsGYfHFYCz4piw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527667,"updated":1564527667,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '656' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:19:03 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '656' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name/recover + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index dd2c6f0a9b95..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport +from azure.core.pipeline.transport import AsyncHttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient @@ -64,7 +64,7 @@ def __init__( self, vault_url: str, credential: "TokenCredential", - transport: HttpTransport = None, + transport: AsyncHttpTransport = None, api_version: str = None, **kwargs: Any ) -> None: @@ -91,7 +91,7 @@ def __init__( self._client = KeyVaultClient(credential, api_version=api_version, pipeline=pipeline, aio=True) @staticmethod - def _build_pipeline(config: Configuration, transport: HttpTransport, **kwargs: Any) -> AsyncPipeline: + def _build_pipeline(config: Configuration, transport: AsyncHttpTransport, **kwargs: Any) -> AsyncPipeline: policies = [ config.headers_policy, config.user_agent_policy, @@ -104,7 +104,8 @@ def _build_pipeline(config: Configuration, transport: HttpTransport, **kwargs: A ] if transport is None: - transport = AsyncioRequestsTransport(**kwargs) + from azure.core.pipeline.transport import AioHttpTransport + transport = AioHttpTransport(**kwargs) return AsyncPipeline(transport, policies=policies) diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_crud_operations.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_crud_operations.yaml index aa5bf8efab58..cc15961c68b4 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_crud_operations.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_crud_operations.yaml @@ -1,255 +1,245 @@ interactions: - request: - body: '{"value": "secret-value", "attributes": {"exp": 2527401600, "enabled": - true}}' + body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - - '77' + - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43","attributes":{"enabled":true,"exp":2527401600,"created":1562687784,"updated":1562687784,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' +- request: + body: '{"value": "secret-value", "attributes": {"enabled": true, "exp": 2527401600}}' headers: - cache-control: - - no-cache - content-length: - - '251' - content-type: + Accept: + - application/json + Content-Length: + - '77' + Content-Type: - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name?api-version=7.0 + response: + body: + string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d","attributes":{"enabled":true,"exp":2527401600,"created":1564528272,"updated":1564528272,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '251' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name/?api-version=7.0 response: body: - string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43","attributes":{"enabled":true,"exp":2527401600,"created":1562687784,"updated":1562687784,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d","attributes":{"enabled":true,"exp":2527401600,"created":1564528272,"updated":1564528272,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '251' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '251' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43?api-version=7.0 + uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d?api-version=7.0 response: body: - string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43","attributes":{"enabled":true,"exp":2527401600,"created":1562687784,"updated":1562687784,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d","attributes":{"enabled":true,"exp":2527401600,"created":1564528272,"updated":1564528272,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '251' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '251' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name/20166f0199b14d72b73abfd7de4a766d + - api-version=7.0 + - '' - request: body: '{"contentType": "text/plain", "tags": {"foo": "updated tag"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '61' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PATCH uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name/?api-version=7.0 response: body: - string: '{"contentType":"text/plain","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43","attributes":{"enabled":true,"exp":2527401600,"created":1562687784,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"contentType":"text/plain","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d","attributes":{"enabled":true,"exp":2527401600,"created":1564528272,"updated":1564528273,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '284' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '284' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault29fe19b8.vault.azure.net/deletedsecrets/secret-name","deletedDate":1562687785,"scheduledPurgeDate":1570463785,"contentType":"text/plain","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43","attributes":{"enabled":true,"exp":2527401600,"created":1562687784,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"recoveryId":"https://vault29fe19b8.vault.azure.net/deletedsecrets/secret-name","deletedDate":1564528273,"scheduledPurgeDate":1572304273,"contentType":"text/plain","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d","attributes":{"enabled":true,"exp":2527401600,"created":1564528272,"updated":1564528273,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '421' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '421' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_list_operations.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_list_operations.yaml index a8f8117e3c14..d51d5f132c6f 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_list_operations.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_list_operations.yaml @@ -1,510 +1,453 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault2aad19c6.vault.azure.net/secrets/key0?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:12:01 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key0 + - api-version=7.0 + - '' - request: body: '{"value": "value0"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key0?api-version=7.0 response: body: - string: '{"value":"value0","id":"https://vault2aad19c6.vault.azure.net/secrets/key0/7b96a58d018e4599ab88e88b9572c2bf","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value0","id":"https://vault2aad19c6.vault.azure.net/secrets/key0/36914dd1657f4c27a5b0b018511debd4","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:01 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key0 + - api-version=7.0 + - '' - request: body: '{"value": "value1"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key1?api-version=7.0 response: body: - string: '{"value":"value1","id":"https://vault2aad19c6.vault.azure.net/secrets/key1/c83f87d170cb4436b96399150e087f63","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value1","id":"https://vault2aad19c6.vault.azure.net/secrets/key1/4ba6609ebc11430eb24e151319af2559","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key1 + - api-version=7.0 + - '' - request: body: '{"value": "value2"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key2?api-version=7.0 response: body: - string: '{"value":"value2","id":"https://vault2aad19c6.vault.azure.net/secrets/key2/5f6ee6ed44b044edb5a6f00fe7f9061d","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value2","id":"https://vault2aad19c6.vault.azure.net/secrets/key2/407135ffe3844dfda97b308d219da2bc","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key2 + - api-version=7.0 + - '' - request: body: '{"value": "value3"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key3?api-version=7.0 response: body: - string: '{"value":"value3","id":"https://vault2aad19c6.vault.azure.net/secrets/key3/39faf9645abe43a7afa4833e92ca1fff","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value3","id":"https://vault2aad19c6.vault.azure.net/secrets/key3/64057abdfdb845e49ba1693718fde7ae","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key3 + - api-version=7.0 + - '' - request: body: '{"value": "value4"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key4?api-version=7.0 response: body: - string: '{"value":"value4","id":"https://vault2aad19c6.vault.azure.net/secrets/key4/15315d867b184d72968338963ef8306c","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value4","id":"https://vault2aad19c6.vault.azure.net/secrets/key4/ec5f2a5b6971486e87bbb9a0c9c6ed5a","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key4 + - api-version=7.0 + - '' - request: body: '{"value": "value5"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key5?api-version=7.0 response: body: - string: '{"value":"value5","id":"https://vault2aad19c6.vault.azure.net/secrets/key5/e5301eed3f1d4dec927bf145794b0465","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value5","id":"https://vault2aad19c6.vault.azure.net/secrets/key5/22314f577cda4d898c295eaf427c83e6","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key5 + - api-version=7.0 + - '' - request: body: '{"value": "value6"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key6?api-version=7.0 response: body: - string: '{"value":"value6","id":"https://vault2aad19c6.vault.azure.net/secrets/key6/82158634aff74f8881ccef96e604a47b","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value6","id":"https://vault2aad19c6.vault.azure.net/secrets/key6/f78f624a3cb046c4927a84f599e6eeb1","attributes":{"enabled":true,"created":1564528323,"updated":1564528323,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault2aad19c6.vault.azure.net/secrets?api-version=7.0 response: body: - string: '{"value":[{"id":"https://vault2aad19c6.vault.azure.net/secrets/key0","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key1","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key2","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key3","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key4","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key5","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key6","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + string: '{"value":[{"id":"https://vault2aad19c6.vault.azure.net/secrets/key0","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key1","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key2","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key3","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key4","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key5","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key6","attributes":{"enabled":true,"created":1564528323,"updated":1564528323,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '1231' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '1231' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault2aad19c6.vault.azure.net/secrets/secret-name/versions?api-version=7.0 response: body: string: '{"value":[],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '28' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '28' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/secret-name/versions + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault2aad19c6.vault.azure.net/deletedsecrets?api-version=7.0 response: body: string: '{"value":[],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '28' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '28' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /deletedsecrets + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_backup_restore.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_backup_restore.yaml index 9f94d903ad43..28cbfb841c0e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_backup_restore.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_backup_restore.yaml @@ -1,254 +1,243 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault29db19b3.vault.azure.net/secrets/secret-name?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:12:51 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: '{"value": "secret-value"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '25' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault29db19b3.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"value":"secret-value","id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/16a8591563fc434f8ea6e2ed9a17d76b","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secret-value","id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/53a7c0e391b243b98ff0838306e5f101","attributes":{"enabled":true,"created":1564528371,"updated":1564528371,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '222' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '222' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:51 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault29db19b3.vault.azure.net/secrets/secret-name/backup?api-version=7.0 response: body: - string: '{"value":"KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLlJWZjNKWlg0WEpua3QyOGF5VUplTTdDNFBvMV9kYWRVZHVYbjlqUUF0MGFkdUJOeTcxTm5ZSEtXbmpOWW1kTWU2WXZMR2pUMGFFeXcwaWVSNWczMEZsNXI0MVFhaWFnZUNYbGxkNER2VGd2cmFxZ3BCY21WYVlXQkRhQm4wRm51SzV6Z2QweG1IUmhOamh1bks4aVZ6ZzRFN0RETHBNMlZiaVBkb09ZOEhSNVNlMUNHZUloRWpQMms0VkVtVzlPOWxKM2lHdTNLRk45SVVKVjE5TmVOOVo2bnJmOHhlOVhtdHRoZnlaUWhMdzdWQjM1WnlTd01pR2dsN2o2XzlTWnl4azkwbVFCUDhMLUVNbHVFZjhXNUlQckFIdXAyRHZydDZrSEo5RGdhX2RrVzExVy1UeVhzZW8xSGhHRWFrUkVBVExGckFuU2VFeTVRTjFFRzhHYk1Kdy40WmNsbDNmcHo4Tkw4SkhTUnRGRnFRLlhnUm9mbXBEX2YtVFpJRkxFWnJpQ2w2ZTA0OFN6THc5VGE0TkVCTDFGcW81ZjdYLU9uQjE3cURWOExabW5WRWhLNXZVVzktNHlPNS1CdGprR0xFV3c2QnZMZjlhd2NCcVhLUlYxeHI5RXBqWTN6UWpVTV9aQVI2YzdCbzVOMC1oQnNEbERiUU1iYVlSX2JxTTQ2LWtOMHdKX1FpbkRHSllzLWFZSC1BR2liOUlhdE9IbzlPdk1vVUtUckxkMGwtWDJrSlFTVUhvb1d5QmNKeExlZlBiMGNOamRtVk5uTlhFS1VCRy1nLU9IWDNPTUdSVmQ0amZiZFBIMGI3MGxvbWlLOEZRcFhpcUw2dXJxOG1zTGJrQlhSMnpjYVlNMmJWUU9DS1l3U0FLb0t0MWU0d0JXNUdvdnJHZnl3YVB1YzFyaUoxWmMwZFpyZk5WVGZaQVJ3bk1IMldsZkMxVm5GUm1hUThGQTZ2VnJrb3FVRVVYQzN3M011UVktaWk4UFVYMTAtWVV6RTdHN1RWWHFuN1l6a2s4NmdRdzdub1pDNGtNS1J6WS11OUQxYlVlYzEzdjg2SXJXZldVZWN2NldtLTlCWC1YenliS2djdVRTQ3ZUY1ZWdF9wSVdMZkpoMkZZb040ZWV5YThLRmZUV3BqZnc2ZmlpSUgzN0ZtVHJUYUt0X3dFdTV4MDd1WkUzdkJHV3BPWktrYmlsX1pGQUhJYWtMaS1yR0ZuTEp3cGJKV0pLSDZGM1VBYVE5anpBOVB1UnpxaVp2VWNHcUJDam9HUGphaF8zcWxsazZCLWZaQ0c2aERYRlpTei1WX1NGWkViNU0ydlA5Z3Y4OU03QjJOeXRpd1hZRzhhMFBlc2VSdXFGNkRNTXQ1SXJyY1g4TjZ5QlVDMF9Ya1hZT2Yxb2phM0xMeFZKUVEzdVdhRTJLbW0waEZla25hc0lLNzA2MjFRSUFncTNyel9YS3RNakU2MGpZT21UUWpNY3BNbFRBMzNTWjlwTTlRX3dEdFVXLTZualZOMXJla1huZEFFZzRJMTFsZkQzck42b1k1WTdHb0dBYW8tRWE2dkVkS0dfMlk5eGNUbEtiMHpyRWxtNk83TDd5ZGFVcGJBblNaRDVPdm84UHFFQUVzeWJwb1lCVnQ3dTFXRXFUQVBJa0ZrRC1sZWFaWHlnalViZFZPV1BaNEtnUlBrU0ZSakNxblhTTVpWcDQzaUh6ODVjTnRJSVVzMXVnNXVpU2dNS3ZpYW4zVTZjWkVEd1NkaTE1bFpDVGZ5ZmZmbUxyLURabFpTdWxEYjN5dk9DZmE1ajB5emRNOC1Jd0pWZUJJM2pZNXZJVWlYRnRuM2pTRC1CMERLaHliS2FsMGZ3NTV0T25zZzIyRFM1TnJ0TTgyWGw0SGF0ZG92Sm5OSGp0bVVYNFpxYTI2RmRzdmVraUdLQ2ZxWWdtbUZpX1dXaXphZU5rM3dzNTFOZmpCQTBKQnhORVBKeUFsZlcwN3NtbVhDdHZ5dDZ4Y3FtRVc0NXpQeWxNX21yazhoQ09HcnVlR3RENExGcURqTW1mT0Z5Mjc1eXlRTDNCU3lJOExfNktzblBaTGJtc0M1LU50ZzE4VjVRVmNkOVZQY0UzMlI5dTRUOHYxS1pqbXQ3S19tYmJGS2x2NkZEQ0lvRDJ4S015UzhFSURSd3VqbUotRTRiQWEzVlhtSmZ5MlpPaUVYNTJnZVlFVGswTUhqaWxlVzhsOWNaNHZJTzZnYVp1UW1kMEM3Zi02Umx3WG9jaWtYeWtCeWYxbU1Qakt4blYtWTRRenZObENmaU1fczNJdnUxUWRUUTRValh1OERDOTcxTk92VWJuNGJCVVN6NW1KY0FQRkQ4dGhVVXE2UFJnVW1WcVB2dlEtcFZiNmxNeUFxSDF1RWlpd240eFBwRWp2V2tmX2ltVGtBb2ZhTmNhdnYxcmpHS1ZrX0J1MmZINVlxWUZqSXFIQzJ3TE0tZzhhY3ZjMHk1MmM2MVpwcjc0aGxmSTc5WV9Oc1BwUng2RmI1XzUtbzVQZWw3Y0VOd05mZ0pPdTk4d3d3RGFSOUktLVJrUDJnTDloVVRsY0JYcUJRalpWZTR3aGVxT00yTW0ybmpIWEFIU0ZRSDZ1bHFvb0V3YXl1LXZ3d25ZU1lzX3Roa2RTQjJUZG5rY3VHbTRtQWxJSGM4YW5vU2prTnI5cklsSDc1M0dNNXJiM2ZHb3IzWm1kOGJ1RUExcmN2YlpmWFlkWjF1MmdlT0VZN2FwZWtUMFFIeHJtU1M4NFZnOXhMM2VHSl81cmVzcW5XYmJhVTdqZU44RTRlWGx6OUhiTzM5aGpuNVhsMkpsTWVLV0JnWTRvOG1lYmJNNG94QndRWkUxVGJPcThXSGRzSE9TQ2VHNmF6U2ZHSTAySUEzYmtEcUNSNjluVG1RbTY2NWM4LUxKc2NFT1dQSWoxX1c3bnUzY18ya1J4RDFHbDBtWFNIM1BRMl9qdE03bVpNSm9tdkdGemRlRUNZdWFVRlVPWjJ4Rnk4ZlU3Ulk2V2ZHUGFBeVF6Z0V3ajdnV3I0RUd4cFJ6d0tzUnI3NXJWd3ZtbE5XR1VtM1VLc01DTmwxckluc0lfd0I3Y184STU4S1hCbUk0dGNUdEF6MGNsd25RMDFIY2dod3BrbkhiRWZ3VVZybkhnNGRZdG1OeDE0T0J0QXFRTG5lMHVoSndyWTlrblN1Tlh1eWNENmt6d3JCQVVKSXgySXpvcXVENVhJRVV1UG55UFVlWDZiLU9BTmR4dTR1WGZBWFc0TWd2dHVDcnQ4VS13TlpMTkNBQjQ5eWRKSGItWUhVSlRWLXVKaTBQb0NzOWhCTzJWZkZDSUh6VERicGVXdk40bGFYRFNCc3dsdGdURXdIai1kcVBLUVl3aUpCcjk5akI2ekZZWVp1MkRtMXNuRjUtR0t1VUZyU2M5UTU4Mnk2a3ZLLS0zYXRwNUN5SlJRQkRqMnY1VnBmdWJCNmc4R3FpdGV4ZzAwaXJwc0c4TW11clNwTTRhQUF4SHMwV2xFQWtCZ18tTEZ2ODIzNGg0aFBzY1FVdnNaeTcySlJXTzVsdC1Ka0lQandZNC1pOV9CMXRzZmRlVlI5eGdzM2RHU1ZHSkpfQlcxQWhmUGppSndhWGFwOEFNRzFzYzJQQnBwQ0wxdk5admNDTzRHOWhkTEFsenNUaGtUaFE5M2YwWVhjTzRhNThNSGNpVjZaUlZOOTNXWVpsbzZxOFZBdWZuZ0t3b2sxd1d0ZVhLVk5DVk8tWjVBV05LMkp6Nmg0eW9FSmU0SGUweFQ5VlJISWU4V0MwSlpMVFZaaXZUY1ZyOXR1cFk1YVNBUFUzRi1hV3B1SzVfRFg4ZkdHX1kybnp2MmsycmtmcFNRMTdRR1lRQ2RMTUxDN3hRNHFEbUMzVGlKTVBGNDB1bGZBQ0hiZDh4RkdBV050LTl1MU5obE9aNGNPM1VhRlVOT0h2dEVFbHRRMUpkQzF6RVpSUGx3VFMxYTVJdkVWV2pockNoZnEwTG43Uk1XaktNOERQNjdfbDJ3MU9rd3VUM3VOejFpTnBZeUZSdEpORjh3NUxjYV9LTkdSVU50V3ZyZUVwU0k0UXlPY1V1REpLc0p1YjY4M2pmaVlHaUJXX0FyblRkS0x1cks3Nlc4UUQ5VFM1aTdWeHhockxwaGFvbkluMjVMMGxpeXJSRmt0UnNGT0JvSXY3LVoxd19tTmpRdXlrQU1DSTBZTG0tandkb3M2TllncXFUQktWS01YRGwzZTFhRUlOa2NEZ0gzcEg2MUNMZTR3c2hRSGl4X3FDQ21lbVBSN0l6T28wY1hzeHdKb21jS1J4bk56QTFKakZUenFJQUhTNm9GbHQ5LXJObU1Sb0ZpNTRlRkJDOFctLUw4QjFIVWVTYkF6WnU1MzFfbUJadWdRVUllV0NLQzJta1B5cjFhZFVYa1QwUTRQVjVlSVhmTWVWcHBPSnJGQ1dXSGJkelB5WkVtZ0psTFlsSGZBMXJ2Z2cyRTJMVDFfd1NzSEtMb2t2UWFNaTNSRUFmSEpINGRoUlZjOGlHM1RyUkFsZ0ZUSnZ4NVY3aXJzcW92RkVsQVhRY0w2UHB6OUJrVFhCcFlxRGhRNXhvS01vcDdrSkRmSXFscXZxWVo3NG15X0FNNDhMZ1AzQzhKMEFjMTJzNzFjR2gzel9QTWpnN282WE0ya21VX2dzT0llY2FTM0czMEtPdjNxSmFHVmk1QzVqTVpfQjUtMTJtZll2R2h0aGYzUVBqUl9PUmpWY3pxT2wxUUpqSEFqN29FU1R6dDQ2SEd6MFJnbG1mVFNVdFl1ODdNNmpfaFpwWktIUXB1RVpkaDViWXFpYjhJQWY1d3pvYl83RGNoRHU2WU5CbW1raHIweThEMlBuZmMyazlrRjhDbVVBaFZQX19YSng1eV9lbGJpTGhhWmh4N0V0UHVHaEdwX3FjNlI3c1laZmNwdGt1RUVxM043aWRDd24tYnpabDFObndMRGQ2MjhyLTNDdGlwVGJsMVNsRVdYX0h1Nk5oMTh1V0l0bmdXanNJcUt2RUlZV1hsSHlEN29meEhKaHAyWms2V2JRRTdfcWFDM3F1TnZmR2hjZHVmb1VkemxPMFdVanRVbm93TnRjamVsV1BMUVBTVE5yN1kuRmg3TzJVbHIyTzdzVVhJZ2FiY0dNdw"}' + string: '{"value":"KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLkhpSUhtRzluUXFhVUZXcnRlQ0Z1TEEwVV90YnlPczJ4TnN5YnBEUUR5SkltNWlKWVJmeUZhVFVlLXZsVFI1VDFxMm5SU3NFaHBnWkk4Z1ZBZ3ZmN3Q3Z0VDZVQ1RUVzRXZzTjFKS0lPc1JzeVlXRGVwWnU0U2pOQWtScHkxT0RfbnFmeWpCLXpqNUswaW9KVVJTS09Md0d2Tm1MUXlJZjZObUZFSE1CUEpVaXQ0OWpOYXNHYlphalhsYUk5Qjk0SERsVlI1bEFzYVNKMnlMM2JlRTBncGYyNUFLX3NDa1hFc1RFbFU2bmVnUjdjQjllUS1IWXNqY3dTaGVNWmM4cFdibE50cXFJZGhOMkpBYW1wR3J2dHc0VDRpd0UtTEVCUDJCaWt4TmctNWN6ajN5azdHSHpaSDJlOWhpak0tRDVGZ2VaMGhiZ19paHV5R0FlWDFmbHBCUS5SQ2Q5RUhTZ28yenlNbTJQZ04yUExBLlJLRkVyZnl1ck1MNGFHOUhKQ3pfc1U3ZUFOMnBTV1AwdWU2YzRGYU9XY2VGaDJDNUppVlBqOGFFRFVxaWFzNEJWVGd4Q2htbHNpMmpQd0V1SENGY3RqRHNSVzZtSGhINUJSZFFKUG94a0V3eEpGZi1PQ0poN3RPR21CczdIbWFOTGo2aGd3Skl3TnZPX0VsSGdhZTEwd2VqTWxTQ19WZDIzYWRiSGRuUXRCQWlVYTVydi0wOTdWRUdwWnpvMHN0a2w2QUFvcjYweXo3WWpWcWdKRm85X2t3TTFIcVY3bWtNSWJKUVhTSTI3YWpHYVBUdTcyZFpkUGdvX21la2FJaDRlSmVRZWlfMDZZeEtwSUZDTS1QaUxNSUpzWU12X2c5ZDJjbEQwQU8wWmNhaEhaeXZfOEZJS3g0RHpYV1E0bkNRS1dDeDh0Nlh6TmlBYnNsMk1OM2lFb3l3VUhma0w5WFNQYVJXZExJamo0SzY4eUpJU2R6aVhudDlaNS02VE9qYUdXdUtSQ0lvSlZOM2FHVUt3aXVBcEtDdkVSbXlNLXctaWNHZmNfZVFHUHNlNTZHQVR5dG02SFZ4OTlUYnpYUHJaeWtqY0tfT2ZlRVRHc0tzSkZZQmtWVE9UTXdJdDFid0JDT1ZuNEdkSndsWDd2eUx2RVRTOHIzM1lqNXo1OUZ5TnJ6QjBqamRaLXBPeFc3ZU9zRUl6MTFVcnMxYkJzcWpXcXV5bTdGdk42dktNdFp3cGgwYUoxMXNULVJkcHgtX3E2a1lsTWc1MHpVWlRYUnpPY0VzQktselNkRjROdUx4ZlFUUVd5UmtWdEQ4UlEyV2czV0JhaTZrZUFpOWpjdVNTN2F2VUw0ODZJMmlpTFJtOEItVG9vQnl2XzJOd0s4OTRlNjc4bTdna0ZtS0pwUUJhMVdOclU3cDV3SUJ0eUQ4RlYyRURYMjc5QThISzNCZnNNZ0NTUWxLdmUtRURzTzdOaTBTclRHN29RLVRVVWpIdmM0RHY4RkUxOW9Yc3VYMHd4dm9CczdRZ2k1eTV2Q2FYSmtMbGVHc3hSeGV1cUhaUE1STHZ0eVBvMEVoTUhSblMtbXp6WWVhcHh4V05VSUhRWFB6MDdLSDZiY1JOMkptbndnb2ZhcDdxYUNyV1l1OGNjLU0zM2N1UnlOc05pRDhWWV94WlhTdXZNT0RmWXo1VkpMX29JZlRjMEVCWDlOQm5ISlZ2Qk5KZ2lUemZXYWlRdE4wdlZ5elg4TjBoOXY3UXMzTENJbmp1aXczbzJSdThISEY1cDNubVhQbFFaOFVOUWdENlZTaXBQUzNwS1RGRF9fTjNDWUYxNzNobHo1ei1MRVFSX25LYTZjREQ5QXAxRkExZDRNX29JWFJvSktkV1JUV0pHdThXaG5OSWFDN0ZlNzlhWk9XYnJwTWlad1hfSUdUWHU5Y0dzYTljbHN4Q05yN2dmUnN4c3VJOGlNMDBTVHZHUkUya0t1RGRRT3JyOXRkMDFoQXhIZmh2cFYyc3lHRnVSTjA5aUc1YVc5Rlo1UnNoMGVybWl1c29WRUlwREMtYWZFbWNLa0l6WmJWb3NSZnktSF9BV3d4VWVMb3hnN3NuUFBmaE5SYTM4TU43bGdhOW43Mk1ZZzN4Zl91VWl2aEw5SWF6OFdRdHlTZzhMMnh1VmwxazZDTjZ3SF9JV09vVGljNzh2bk5qLXBoTU84cFFqYklaMnhueWRzdi1ZRTlFR1RjOHFFc2ozdEpXUVhOOFc1MC1CREtlLTZTMGxjRXdQQkM4cnVuQ19VVHJxc3MwSTd1Mmk0V3k5azBWSzdZb090UWhuTGc0MHJOZERubTdHUDg4R0JTamdvU2JTeURmQUNhRDREMXlJWFVqWG1vQ2pGZ1o3bUQxWTludk1YUFZjSWp2V3F2Ml9kUU15eXlkeDgxRnNEVVNyTE1sODZQYmlnSVlJV2NPY0FLSGdsWnRKTVZHNXZ6ZWNhUU93ek9iMEQyVGdKSmladndOa3MwWWpIQ0ZXa0xXTDZEcnB4b1lEVGRwUzNoWFhYSDRRN2VaOFV5M3U5MjFmWjQ4Z0JodEpDSVVtY2U5Q05EemttUHlKS0kyVkJiWDgxQUxkVzNyTVZlY0lheG1hOEdLNS1DbGFDcUVUWGpheU9yNFNxUW1ZWEI5YnFQeXlQZDVwSTZUVkJ3M2lYdWVSV2VxcDdjVnZ6UmE2YjhvTE1aSlFoR3JxX2VGOElMLVlnRE52NmRXLTlPRk5ad29TOGtRM3RUbGNLUXlIT05WUmVMWXhZNjRPM1ZVYm9iSXY0RzVaZUljV2VaS2NjN3I5ZVBMdTJrcllRbXIwRzd6Y2M4cUdfOWo2eHhDU2NIVlk1Zm1OcWxBRlMtcEcyM01mRW41aUNxdzA5R0c3bWY4a01qMThTZF9kbGw5RC1MbW1UWFZzYi1QMDVZSHBqTHB2TFFQYlZVSTQxRU5VVENnUFFpd2I3US15ODNJdm1IZ3IyVkdTRllrZm9wam5yVWMzM1VXTERnc1pDQzgwTGF3ZGxtZWxFYThDZ1FnVm5EeFJBZ0NMN1BmQWhyV0h1YkduZlQwbndyc1h1ZkRWa0llTkJfVjhrZTlPMXY5WVRlYkZiaFJvR0JBbC1ndHdCNlcyaXY1emxVR2dfcGdQUUlqdXgyMHRtNVZCVGlYbzBLV3ZidGdLVm51V2c5U1dUSnEzOWs1WnRieFpGX0M2NGNvSnlBOUE2TTlHRjlPMkd2WHVPd0lpU1JZazBySGNDMmpudkJwVzMxVjF4TDE3RE84NGpreVNUaF95WW1sSnBkd3VrSlJaNUJsOWpWTnI3bGFrNW15R3ZuTU5PS1NvejF3dXVBY1IyRFBSdEJXVFgzZUVraG9DaFR1V3ZwSmF0Ung2a1ZFTUY1eDcxLTBJMUlkZEJFYlhLM0pxSnJFVTVmTmZBdU9TMU0wSE5mLXNQZjFfZHpVY05vVkN1cUMza1pSSVViY3RwT1pORFBxd282amdyak92MWlOeGFtemZJWHVyZXJuSW5fcDV3OFRmSmUwZHIxTXVycTAwdHhEamxJR0lIMjJoQm9TYW1adkNYUktJYk00LUhiYzlmTlhudnZSRVROWjV6MlFqS2lieDBJd2tDWjZxVS1OTnBnZGN4SHZ4SGhJTWlieVBRWkxkS0t2ZHo4S01ucjNaUGVnWTAwTWx5VkpKY1BGRm1MMloyeVBzb25uT0tjd05lNUFpVkt1S0gwbTJyQmRZMXVzbGljaF9MZEdmbHdrMHA0TTBSaUZBaXluRWlqMl8tZTVjcWJoWFdXdGYyWUZGNmNZSF9OeVhYallIWGZQTllkNzlOV0d5dVk1N051WXk5ZllfY21WVVdPTVFnd1NWcW9qeC00NHEwRWlkTE1RLUVEcFduTlpPX0xaOWNSeTl6anhOSjR1cXRnY2Z4STNXX0ltTTRKbGNuOWJDMzA4WGJSM2dHVkl1OUdkeS13NERVcTFwVWVITGdQbFRfVFg0eVYtbHFRWHNTc0ZkSkZLbzlic3NUS0V1dGNBQTZKRzcwOUJCSkdoMDFIT3BpUFFPWTYzSmNoMFBiSXZubmxmeXc3M2tCWU40MWJMTGxRUnV5dXA4emtzOFVvVW5uT3ZIb2xveE0wQ3VlX0owTmZBdExtU0xEWHozVHUxeDV0RGVJdjlHcDBheUlJZy1wcHZ6RzNMb3pnQUowUjVrMzNkeG9udjVxVFI2MXhnc2JaNUZZT0ljMXBqTVgwQUU4WVZLMGpVcTZ3QzlnTnRDN0M5LXg1cW56Z0pjdHQwbkRHV3NFdElnX3J6SFJhdlFpNlF1SGJIS3doOTBBekVVems5VXFPWjdnTjVoa2FvVkprVFdYZlhTc3B0Zml6WGU2MDFfMlFKNkhtUG1FbGJSeFRCbU1janhiSDE1SDJCcHR6bHdxVWJhSlB3MWd4Q2h1LTNGWC04S3RaY25DaGNrOXBya3VCaEl4czdVaDdDYjE0T1VjVExlcjZGVHZaa3FLczBhcXJPZGpZaDBVeFE1amRIQTc5TDJrMFF1enNYWkNfZXA4YkJQa094RzRCUGpaN2ZSVkRPcjdaaFlRenRQbnpHZXo1eFJoVGhEWWU5eEZTTkRsM1pqXzYyNzduMXllNFAwLU54V3ZTWExFc1ZJUzVabVNYd25KOUpjX3YwTWRkMjliZno4aXFBSVpXX2QzakNsWVBzWG0tMlNzTjBkYnJ0TG5NUzNkOXV0cC13blRfRDN4Qmc2R000MGZSZzFnaG5uM3dhWnB6YzU0T2xORDNZR2RnclQtc3dNY1NwcExiM0FRZEVSQVFycjFSUXJNUHczaUpEdlVKdFFyVElTMHJpRE5rb2kyMFJHQjMzYUtRR2VSZkt0ZldOUFJmSGh5Z0lTdUpWLVZqdHZHT2dWTFAyZ0RUZGNMZ1VQX19kNUxlUzllWEFiaUZWVUJyOWhhdTNzVnFYazR1QWE1QkZRaFlTQWVyN3RxclZGbGRhM1N5UURSU0dETWtyaksyZHFlVlVpTHRYTnJ3VHRfQ01iLXd3LWhhTDcyTmZSaEQtYkpoS2s3X1JIM09GQV9DaDZnaUZQUDBzTzF3a0t6NHNJelhQQ0pUY0pTMTZFNV9sSkkxTGtHOGVfMFItMEk1ejk2blVKRS1RTDQuMktGazBXd2JUdVBadHJMMnFRSXF4QQ"}' headers: - cache-control: - - no-cache - content-length: - - '5406' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '5406' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:51 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/secret-name/backup + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault29db19b3.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/16a8591563fc434f8ea6e2ed9a17d76b","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Purgeable"}}' + string: '{"id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/53a7c0e391b243b98ff0838306e5f101","attributes":{"enabled":true,"created":1564528371,"updated":1564528371,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '199' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '199' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:52 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault29db19b3.vault.azure.net/secrets/secret-name/?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret-name"}}' headers: - cache-control: - - no-cache - content-length: - - '77' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '77' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:52 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/secret-name/ + - api-version=7.0 + - '' - request: - body: '{"value": "KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLlJWZjNKWlg0WEpua3QyOGF5VUplTTdDNFBvMV9kYWRVZHVYbjlqUUF0MGFkdUJOeTcxTm5ZSEtXbmpOWW1kTWU2WXZMR2pUMGFFeXcwaWVSNWczMEZsNXI0MVFhaWFnZUNYbGxkNER2VGd2cmFxZ3BCY21WYVlXQkRhQm4wRm51SzV6Z2QweG1IUmhOamh1bks4aVZ6ZzRFN0RETHBNMlZiaVBkb09ZOEhSNVNlMUNHZUloRWpQMms0VkVtVzlPOWxKM2lHdTNLRk45SVVKVjE5TmVOOVo2bnJmOHhlOVhtdHRoZnlaUWhMdzdWQjM1WnlTd01pR2dsN2o2XzlTWnl4azkwbVFCUDhMLUVNbHVFZjhXNUlQckFIdXAyRHZydDZrSEo5RGdhX2RrVzExVy1UeVhzZW8xSGhHRWFrUkVBVExGckFuU2VFeTVRTjFFRzhHYk1Kdy40WmNsbDNmcHo4Tkw4SkhTUnRGRnFRLlhnUm9mbXBEX2YtVFpJRkxFWnJpQ2w2ZTA0OFN6THc5VGE0TkVCTDFGcW81ZjdYLU9uQjE3cURWOExabW5WRWhLNXZVVzktNHlPNS1CdGprR0xFV3c2QnZMZjlhd2NCcVhLUlYxeHI5RXBqWTN6UWpVTV9aQVI2YzdCbzVOMC1oQnNEbERiUU1iYVlSX2JxTTQ2LWtOMHdKX1FpbkRHSllzLWFZSC1BR2liOUlhdE9IbzlPdk1vVUtUckxkMGwtWDJrSlFTVUhvb1d5QmNKeExlZlBiMGNOamRtVk5uTlhFS1VCRy1nLU9IWDNPTUdSVmQ0amZiZFBIMGI3MGxvbWlLOEZRcFhpcUw2dXJxOG1zTGJrQlhSMnpjYVlNMmJWUU9DS1l3U0FLb0t0MWU0d0JXNUdvdnJHZnl3YVB1YzFyaUoxWmMwZFpyZk5WVGZaQVJ3bk1IMldsZkMxVm5GUm1hUThGQTZ2VnJrb3FVRVVYQzN3M011UVktaWk4UFVYMTAtWVV6RTdHN1RWWHFuN1l6a2s4NmdRdzdub1pDNGtNS1J6WS11OUQxYlVlYzEzdjg2SXJXZldVZWN2NldtLTlCWC1YenliS2djdVRTQ3ZUY1ZWdF9wSVdMZkpoMkZZb040ZWV5YThLRmZUV3BqZnc2ZmlpSUgzN0ZtVHJUYUt0X3dFdTV4MDd1WkUzdkJHV3BPWktrYmlsX1pGQUhJYWtMaS1yR0ZuTEp3cGJKV0pLSDZGM1VBYVE5anpBOVB1UnpxaVp2VWNHcUJDam9HUGphaF8zcWxsazZCLWZaQ0c2aERYRlpTei1WX1NGWkViNU0ydlA5Z3Y4OU03QjJOeXRpd1hZRzhhMFBlc2VSdXFGNkRNTXQ1SXJyY1g4TjZ5QlVDMF9Ya1hZT2Yxb2phM0xMeFZKUVEzdVdhRTJLbW0waEZla25hc0lLNzA2MjFRSUFncTNyel9YS3RNakU2MGpZT21UUWpNY3BNbFRBMzNTWjlwTTlRX3dEdFVXLTZualZOMXJla1huZEFFZzRJMTFsZkQzck42b1k1WTdHb0dBYW8tRWE2dkVkS0dfMlk5eGNUbEtiMHpyRWxtNk83TDd5ZGFVcGJBblNaRDVPdm84UHFFQUVzeWJwb1lCVnQ3dTFXRXFUQVBJa0ZrRC1sZWFaWHlnalViZFZPV1BaNEtnUlBrU0ZSakNxblhTTVpWcDQzaUh6ODVjTnRJSVVzMXVnNXVpU2dNS3ZpYW4zVTZjWkVEd1NkaTE1bFpDVGZ5ZmZmbUxyLURabFpTdWxEYjN5dk9DZmE1ajB5emRNOC1Jd0pWZUJJM2pZNXZJVWlYRnRuM2pTRC1CMERLaHliS2FsMGZ3NTV0T25zZzIyRFM1TnJ0TTgyWGw0SGF0ZG92Sm5OSGp0bVVYNFpxYTI2RmRzdmVraUdLQ2ZxWWdtbUZpX1dXaXphZU5rM3dzNTFOZmpCQTBKQnhORVBKeUFsZlcwN3NtbVhDdHZ5dDZ4Y3FtRVc0NXpQeWxNX21yazhoQ09HcnVlR3RENExGcURqTW1mT0Z5Mjc1eXlRTDNCU3lJOExfNktzblBaTGJtc0M1LU50ZzE4VjVRVmNkOVZQY0UzMlI5dTRUOHYxS1pqbXQ3S19tYmJGS2x2NkZEQ0lvRDJ4S015UzhFSURSd3VqbUotRTRiQWEzVlhtSmZ5MlpPaUVYNTJnZVlFVGswTUhqaWxlVzhsOWNaNHZJTzZnYVp1UW1kMEM3Zi02Umx3WG9jaWtYeWtCeWYxbU1Qakt4blYtWTRRenZObENmaU1fczNJdnUxUWRUUTRValh1OERDOTcxTk92VWJuNGJCVVN6NW1KY0FQRkQ4dGhVVXE2UFJnVW1WcVB2dlEtcFZiNmxNeUFxSDF1RWlpd240eFBwRWp2V2tmX2ltVGtBb2ZhTmNhdnYxcmpHS1ZrX0J1MmZINVlxWUZqSXFIQzJ3TE0tZzhhY3ZjMHk1MmM2MVpwcjc0aGxmSTc5WV9Oc1BwUng2RmI1XzUtbzVQZWw3Y0VOd05mZ0pPdTk4d3d3RGFSOUktLVJrUDJnTDloVVRsY0JYcUJRalpWZTR3aGVxT00yTW0ybmpIWEFIU0ZRSDZ1bHFvb0V3YXl1LXZ3d25ZU1lzX3Roa2RTQjJUZG5rY3VHbTRtQWxJSGM4YW5vU2prTnI5cklsSDc1M0dNNXJiM2ZHb3IzWm1kOGJ1RUExcmN2YlpmWFlkWjF1MmdlT0VZN2FwZWtUMFFIeHJtU1M4NFZnOXhMM2VHSl81cmVzcW5XYmJhVTdqZU44RTRlWGx6OUhiTzM5aGpuNVhsMkpsTWVLV0JnWTRvOG1lYmJNNG94QndRWkUxVGJPcThXSGRzSE9TQ2VHNmF6U2ZHSTAySUEzYmtEcUNSNjluVG1RbTY2NWM4LUxKc2NFT1dQSWoxX1c3bnUzY18ya1J4RDFHbDBtWFNIM1BRMl9qdE03bVpNSm9tdkdGemRlRUNZdWFVRlVPWjJ4Rnk4ZlU3Ulk2V2ZHUGFBeVF6Z0V3ajdnV3I0RUd4cFJ6d0tzUnI3NXJWd3ZtbE5XR1VtM1VLc01DTmwxckluc0lfd0I3Y184STU4S1hCbUk0dGNUdEF6MGNsd25RMDFIY2dod3BrbkhiRWZ3VVZybkhnNGRZdG1OeDE0T0J0QXFRTG5lMHVoSndyWTlrblN1Tlh1eWNENmt6d3JCQVVKSXgySXpvcXVENVhJRVV1UG55UFVlWDZiLU9BTmR4dTR1WGZBWFc0TWd2dHVDcnQ4VS13TlpMTkNBQjQ5eWRKSGItWUhVSlRWLXVKaTBQb0NzOWhCTzJWZkZDSUh6VERicGVXdk40bGFYRFNCc3dsdGdURXdIai1kcVBLUVl3aUpCcjk5akI2ekZZWVp1MkRtMXNuRjUtR0t1VUZyU2M5UTU4Mnk2a3ZLLS0zYXRwNUN5SlJRQkRqMnY1VnBmdWJCNmc4R3FpdGV4ZzAwaXJwc0c4TW11clNwTTRhQUF4SHMwV2xFQWtCZ18tTEZ2ODIzNGg0aFBzY1FVdnNaeTcySlJXTzVsdC1Ka0lQandZNC1pOV9CMXRzZmRlVlI5eGdzM2RHU1ZHSkpfQlcxQWhmUGppSndhWGFwOEFNRzFzYzJQQnBwQ0wxdk5admNDTzRHOWhkTEFsenNUaGtUaFE5M2YwWVhjTzRhNThNSGNpVjZaUlZOOTNXWVpsbzZxOFZBdWZuZ0t3b2sxd1d0ZVhLVk5DVk8tWjVBV05LMkp6Nmg0eW9FSmU0SGUweFQ5VlJISWU4V0MwSlpMVFZaaXZUY1ZyOXR1cFk1YVNBUFUzRi1hV3B1SzVfRFg4ZkdHX1kybnp2MmsycmtmcFNRMTdRR1lRQ2RMTUxDN3hRNHFEbUMzVGlKTVBGNDB1bGZBQ0hiZDh4RkdBV050LTl1MU5obE9aNGNPM1VhRlVOT0h2dEVFbHRRMUpkQzF6RVpSUGx3VFMxYTVJdkVWV2pockNoZnEwTG43Uk1XaktNOERQNjdfbDJ3MU9rd3VUM3VOejFpTnBZeUZSdEpORjh3NUxjYV9LTkdSVU50V3ZyZUVwU0k0UXlPY1V1REpLc0p1YjY4M2pmaVlHaUJXX0FyblRkS0x1cks3Nlc4UUQ5VFM1aTdWeHhockxwaGFvbkluMjVMMGxpeXJSRmt0UnNGT0JvSXY3LVoxd19tTmpRdXlrQU1DSTBZTG0tandkb3M2TllncXFUQktWS01YRGwzZTFhRUlOa2NEZ0gzcEg2MUNMZTR3c2hRSGl4X3FDQ21lbVBSN0l6T28wY1hzeHdKb21jS1J4bk56QTFKakZUenFJQUhTNm9GbHQ5LXJObU1Sb0ZpNTRlRkJDOFctLUw4QjFIVWVTYkF6WnU1MzFfbUJadWdRVUllV0NLQzJta1B5cjFhZFVYa1QwUTRQVjVlSVhmTWVWcHBPSnJGQ1dXSGJkelB5WkVtZ0psTFlsSGZBMXJ2Z2cyRTJMVDFfd1NzSEtMb2t2UWFNaTNSRUFmSEpINGRoUlZjOGlHM1RyUkFsZ0ZUSnZ4NVY3aXJzcW92RkVsQVhRY0w2UHB6OUJrVFhCcFlxRGhRNXhvS01vcDdrSkRmSXFscXZxWVo3NG15X0FNNDhMZ1AzQzhKMEFjMTJzNzFjR2gzel9QTWpnN282WE0ya21VX2dzT0llY2FTM0czMEtPdjNxSmFHVmk1QzVqTVpfQjUtMTJtZll2R2h0aGYzUVBqUl9PUmpWY3pxT2wxUUpqSEFqN29FU1R6dDQ2SEd6MFJnbG1mVFNVdFl1ODdNNmpfaFpwWktIUXB1RVpkaDViWXFpYjhJQWY1d3pvYl83RGNoRHU2WU5CbW1raHIweThEMlBuZmMyazlrRjhDbVVBaFZQX19YSng1eV9lbGJpTGhhWmh4N0V0UHVHaEdwX3FjNlI3c1laZmNwdGt1RUVxM043aWRDd24tYnpabDFObndMRGQ2MjhyLTNDdGlwVGJsMVNsRVdYX0h1Nk5oMTh1V0l0bmdXanNJcUt2RUlZV1hsSHlEN29meEhKaHAyWms2V2JRRTdfcWFDM3F1TnZmR2hjZHVmb1VkemxPMFdVanRVbm93TnRjamVsV1BMUVBTVE5yN1kuRmg3TzJVbHIyTzdzVVhJZ2FiY0dNdw"}' + body: '{"value": "KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLkhpSUhtRzluUXFhVUZXcnRlQ0Z1TEEwVV90YnlPczJ4TnN5YnBEUUR5SkltNWlKWVJmeUZhVFVlLXZsVFI1VDFxMm5SU3NFaHBnWkk4Z1ZBZ3ZmN3Q3Z0VDZVQ1RUVzRXZzTjFKS0lPc1JzeVlXRGVwWnU0U2pOQWtScHkxT0RfbnFmeWpCLXpqNUswaW9KVVJTS09Md0d2Tm1MUXlJZjZObUZFSE1CUEpVaXQ0OWpOYXNHYlphalhsYUk5Qjk0SERsVlI1bEFzYVNKMnlMM2JlRTBncGYyNUFLX3NDa1hFc1RFbFU2bmVnUjdjQjllUS1IWXNqY3dTaGVNWmM4cFdibE50cXFJZGhOMkpBYW1wR3J2dHc0VDRpd0UtTEVCUDJCaWt4TmctNWN6ajN5azdHSHpaSDJlOWhpak0tRDVGZ2VaMGhiZ19paHV5R0FlWDFmbHBCUS5SQ2Q5RUhTZ28yenlNbTJQZ04yUExBLlJLRkVyZnl1ck1MNGFHOUhKQ3pfc1U3ZUFOMnBTV1AwdWU2YzRGYU9XY2VGaDJDNUppVlBqOGFFRFVxaWFzNEJWVGd4Q2htbHNpMmpQd0V1SENGY3RqRHNSVzZtSGhINUJSZFFKUG94a0V3eEpGZi1PQ0poN3RPR21CczdIbWFOTGo2aGd3Skl3TnZPX0VsSGdhZTEwd2VqTWxTQ19WZDIzYWRiSGRuUXRCQWlVYTVydi0wOTdWRUdwWnpvMHN0a2w2QUFvcjYweXo3WWpWcWdKRm85X2t3TTFIcVY3bWtNSWJKUVhTSTI3YWpHYVBUdTcyZFpkUGdvX21la2FJaDRlSmVRZWlfMDZZeEtwSUZDTS1QaUxNSUpzWU12X2c5ZDJjbEQwQU8wWmNhaEhaeXZfOEZJS3g0RHpYV1E0bkNRS1dDeDh0Nlh6TmlBYnNsMk1OM2lFb3l3VUhma0w5WFNQYVJXZExJamo0SzY4eUpJU2R6aVhudDlaNS02VE9qYUdXdUtSQ0lvSlZOM2FHVUt3aXVBcEtDdkVSbXlNLXctaWNHZmNfZVFHUHNlNTZHQVR5dG02SFZ4OTlUYnpYUHJaeWtqY0tfT2ZlRVRHc0tzSkZZQmtWVE9UTXdJdDFid0JDT1ZuNEdkSndsWDd2eUx2RVRTOHIzM1lqNXo1OUZ5TnJ6QjBqamRaLXBPeFc3ZU9zRUl6MTFVcnMxYkJzcWpXcXV5bTdGdk42dktNdFp3cGgwYUoxMXNULVJkcHgtX3E2a1lsTWc1MHpVWlRYUnpPY0VzQktselNkRjROdUx4ZlFUUVd5UmtWdEQ4UlEyV2czV0JhaTZrZUFpOWpjdVNTN2F2VUw0ODZJMmlpTFJtOEItVG9vQnl2XzJOd0s4OTRlNjc4bTdna0ZtS0pwUUJhMVdOclU3cDV3SUJ0eUQ4RlYyRURYMjc5QThISzNCZnNNZ0NTUWxLdmUtRURzTzdOaTBTclRHN29RLVRVVWpIdmM0RHY4RkUxOW9Yc3VYMHd4dm9CczdRZ2k1eTV2Q2FYSmtMbGVHc3hSeGV1cUhaUE1STHZ0eVBvMEVoTUhSblMtbXp6WWVhcHh4V05VSUhRWFB6MDdLSDZiY1JOMkptbndnb2ZhcDdxYUNyV1l1OGNjLU0zM2N1UnlOc05pRDhWWV94WlhTdXZNT0RmWXo1VkpMX29JZlRjMEVCWDlOQm5ISlZ2Qk5KZ2lUemZXYWlRdE4wdlZ5elg4TjBoOXY3UXMzTENJbmp1aXczbzJSdThISEY1cDNubVhQbFFaOFVOUWdENlZTaXBQUzNwS1RGRF9fTjNDWUYxNzNobHo1ei1MRVFSX25LYTZjREQ5QXAxRkExZDRNX29JWFJvSktkV1JUV0pHdThXaG5OSWFDN0ZlNzlhWk9XYnJwTWlad1hfSUdUWHU5Y0dzYTljbHN4Q05yN2dmUnN4c3VJOGlNMDBTVHZHUkUya0t1RGRRT3JyOXRkMDFoQXhIZmh2cFYyc3lHRnVSTjA5aUc1YVc5Rlo1UnNoMGVybWl1c29WRUlwREMtYWZFbWNLa0l6WmJWb3NSZnktSF9BV3d4VWVMb3hnN3NuUFBmaE5SYTM4TU43bGdhOW43Mk1ZZzN4Zl91VWl2aEw5SWF6OFdRdHlTZzhMMnh1VmwxazZDTjZ3SF9JV09vVGljNzh2bk5qLXBoTU84cFFqYklaMnhueWRzdi1ZRTlFR1RjOHFFc2ozdEpXUVhOOFc1MC1CREtlLTZTMGxjRXdQQkM4cnVuQ19VVHJxc3MwSTd1Mmk0V3k5azBWSzdZb090UWhuTGc0MHJOZERubTdHUDg4R0JTamdvU2JTeURmQUNhRDREMXlJWFVqWG1vQ2pGZ1o3bUQxWTludk1YUFZjSWp2V3F2Ml9kUU15eXlkeDgxRnNEVVNyTE1sODZQYmlnSVlJV2NPY0FLSGdsWnRKTVZHNXZ6ZWNhUU93ek9iMEQyVGdKSmladndOa3MwWWpIQ0ZXa0xXTDZEcnB4b1lEVGRwUzNoWFhYSDRRN2VaOFV5M3U5MjFmWjQ4Z0JodEpDSVVtY2U5Q05EemttUHlKS0kyVkJiWDgxQUxkVzNyTVZlY0lheG1hOEdLNS1DbGFDcUVUWGpheU9yNFNxUW1ZWEI5YnFQeXlQZDVwSTZUVkJ3M2lYdWVSV2VxcDdjVnZ6UmE2YjhvTE1aSlFoR3JxX2VGOElMLVlnRE52NmRXLTlPRk5ad29TOGtRM3RUbGNLUXlIT05WUmVMWXhZNjRPM1ZVYm9iSXY0RzVaZUljV2VaS2NjN3I5ZVBMdTJrcllRbXIwRzd6Y2M4cUdfOWo2eHhDU2NIVlk1Zm1OcWxBRlMtcEcyM01mRW41aUNxdzA5R0c3bWY4a01qMThTZF9kbGw5RC1MbW1UWFZzYi1QMDVZSHBqTHB2TFFQYlZVSTQxRU5VVENnUFFpd2I3US15ODNJdm1IZ3IyVkdTRllrZm9wam5yVWMzM1VXTERnc1pDQzgwTGF3ZGxtZWxFYThDZ1FnVm5EeFJBZ0NMN1BmQWhyV0h1YkduZlQwbndyc1h1ZkRWa0llTkJfVjhrZTlPMXY5WVRlYkZiaFJvR0JBbC1ndHdCNlcyaXY1emxVR2dfcGdQUUlqdXgyMHRtNVZCVGlYbzBLV3ZidGdLVm51V2c5U1dUSnEzOWs1WnRieFpGX0M2NGNvSnlBOUE2TTlHRjlPMkd2WHVPd0lpU1JZazBySGNDMmpudkJwVzMxVjF4TDE3RE84NGpreVNUaF95WW1sSnBkd3VrSlJaNUJsOWpWTnI3bGFrNW15R3ZuTU5PS1NvejF3dXVBY1IyRFBSdEJXVFgzZUVraG9DaFR1V3ZwSmF0Ung2a1ZFTUY1eDcxLTBJMUlkZEJFYlhLM0pxSnJFVTVmTmZBdU9TMU0wSE5mLXNQZjFfZHpVY05vVkN1cUMza1pSSVViY3RwT1pORFBxd282amdyak92MWlOeGFtemZJWHVyZXJuSW5fcDV3OFRmSmUwZHIxTXVycTAwdHhEamxJR0lIMjJoQm9TYW1adkNYUktJYk00LUhiYzlmTlhudnZSRVROWjV6MlFqS2lieDBJd2tDWjZxVS1OTnBnZGN4SHZ4SGhJTWlieVBRWkxkS0t2ZHo4S01ucjNaUGVnWTAwTWx5VkpKY1BGRm1MMloyeVBzb25uT0tjd05lNUFpVkt1S0gwbTJyQmRZMXVzbGljaF9MZEdmbHdrMHA0TTBSaUZBaXluRWlqMl8tZTVjcWJoWFdXdGYyWUZGNmNZSF9OeVhYallIWGZQTllkNzlOV0d5dVk1N051WXk5ZllfY21WVVdPTVFnd1NWcW9qeC00NHEwRWlkTE1RLUVEcFduTlpPX0xaOWNSeTl6anhOSjR1cXRnY2Z4STNXX0ltTTRKbGNuOWJDMzA4WGJSM2dHVkl1OUdkeS13NERVcTFwVWVITGdQbFRfVFg0eVYtbHFRWHNTc0ZkSkZLbzlic3NUS0V1dGNBQTZKRzcwOUJCSkdoMDFIT3BpUFFPWTYzSmNoMFBiSXZubmxmeXc3M2tCWU40MWJMTGxRUnV5dXA4emtzOFVvVW5uT3ZIb2xveE0wQ3VlX0owTmZBdExtU0xEWHozVHUxeDV0RGVJdjlHcDBheUlJZy1wcHZ6RzNMb3pnQUowUjVrMzNkeG9udjVxVFI2MXhnc2JaNUZZT0ljMXBqTVgwQUU4WVZLMGpVcTZ3QzlnTnRDN0M5LXg1cW56Z0pjdHQwbkRHV3NFdElnX3J6SFJhdlFpNlF1SGJIS3doOTBBekVVems5VXFPWjdnTjVoa2FvVkprVFdYZlhTc3B0Zml6WGU2MDFfMlFKNkhtUG1FbGJSeFRCbU1janhiSDE1SDJCcHR6bHdxVWJhSlB3MWd4Q2h1LTNGWC04S3RaY25DaGNrOXBya3VCaEl4czdVaDdDYjE0T1VjVExlcjZGVHZaa3FLczBhcXJPZGpZaDBVeFE1amRIQTc5TDJrMFF1enNYWkNfZXA4YkJQa094RzRCUGpaN2ZSVkRPcjdaaFlRenRQbnpHZXo1eFJoVGhEWWU5eEZTTkRsM1pqXzYyNzduMXllNFAwLU54V3ZTWExFc1ZJUzVabVNYd25KOUpjX3YwTWRkMjliZno4aXFBSVpXX2QzakNsWVBzWG0tMlNzTjBkYnJ0TG5NUzNkOXV0cC13blRfRDN4Qmc2R000MGZSZzFnaG5uM3dhWnB6YzU0T2xORDNZR2RnclQtc3dNY1NwcExiM0FRZEVSQVFycjFSUXJNUHczaUpEdlVKdFFyVElTMHJpRE5rb2kyMFJHQjMzYUtRR2VSZkt0ZldOUFJmSGh5Z0lTdUpWLVZqdHZHT2dWTFAyZ0RUZGNMZ1VQX19kNUxlUzllWEFiaUZWVUJyOWhhdTNzVnFYazR1QWE1QkZRaFlTQWVyN3RxclZGbGRhM1N5UURSU0dETWtyaksyZHFlVlVpTHRYTnJ3VHRfQ01iLXd3LWhhTDcyTmZSaEQtYkpoS2s3X1JIM09GQV9DaDZnaUZQUDBzTzF3a0t6NHNJelhQQ0pUY0pTMTZFNV9sSkkxTGtHOGVfMFItMEk1ejk2blVKRS1RTDQuMktGazBXd2JUdVBadHJMMnFRSXF4QQ"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '5407' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault29db19b3.vault.azure.net/secrets/restore?api-version=7.0 response: body: - string: '{"id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/16a8591563fc434f8ea6e2ed9a17d76b","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Purgeable"}}' + string: '{"id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/53a7c0e391b243b98ff0838306e5f101","attributes":{"enabled":true,"created":1564528371,"updated":1564528371,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '199' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '199' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:52 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/restore + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_recover.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_recover.yaml index c42445d00a55..8936cbf3e59b 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_recover.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_recover.yaml @@ -1,117 +1,134 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault7f7a16d0.vault.azure.net/secrets/secret-name?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:13:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: '{"value": "secret-value"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '25' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault7f7a16d0.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"value":"secret-value","id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/387abddfcc2c4b7eb4a4604d274a39cb","attributes":{"enabled":true,"created":1562687832,"updated":1562687832,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"secret-value","id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/731695cfdc604c60809900f0dded0c26","attributes":{"enabled":true,"created":1564528411,"updated":1564528411,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '234' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:12 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '234' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault7f7a16d0.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1562687832,"scheduledPurgeDate":1570463832,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/387abddfcc2c4b7eb4a4604d274a39cb","attributes":{"enabled":true,"created":1562687832,"updated":1562687832,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1564528411,"scheduledPurgeDate":1572304411,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/731695cfdc604c60809900f0dded0c26","attributes":{"enabled":true,"created":1564528411,"updated":1564528411,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '348' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:12 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '348' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 response: @@ -119,48 +136,38 @@ interactions: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: secret-name"}}' headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:12 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 response: @@ -168,48 +175,38 @@ interactions: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: secret-name"}}' headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:15 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:34 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 response: @@ -217,181 +214,338 @@ interactions: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: secret-name"}}' headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:37 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1562687832,"scheduledPurgeDate":1570463832,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/387abddfcc2c4b7eb4a4604d274a39cb","attributes":{"enabled":true,"created":1562687832,"updated":1562687832,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: + secret-name"}}' headers: - cache-control: - - no-cache - content-length: - - '348' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:40 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: + secret-name"}}' + headers: + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:43 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: + secret-name"}}' + headers: + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: + secret-name"}}' + headers: + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: + secret-name"}}' + headers: + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:52 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 + response: + body: + string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1564528411,"scheduledPurgeDate":1572304411,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/731695cfdc604c60809900f0dded0c26","attributes":{"enabled":true,"created":1564528411,"updated":1564528411,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '348' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:55 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1562687832,"scheduledPurgeDate":1570463832,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/387abddfcc2c4b7eb4a4604d274a39cb","attributes":{"enabled":true,"created":1562687832,"updated":1562687832,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1564528411,"scheduledPurgeDate":1572304411,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/731695cfdc604c60809900f0dded0c26","attributes":{"enabled":true,"created":1564528411,"updated":1564528411,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '348' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '348' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:55 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name/recover?api-version=7.0 response: body: - string: '{"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/387abddfcc2c4b7eb4a4604d274a39cb","attributes":{"enabled":true,"created":1562687832,"updated":1562687832,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/731695cfdc604c60809900f0dded0c26","attributes":{"enabled":true,"created":1564528411,"updated":1564528411,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '211' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '211' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:56 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name/recover + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_backup_restore.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_backup_restore.yaml index b6c8060bf441..90c8d9b81ab1 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_backup_restore.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_backup_restore.yaml @@ -1,206 +1,205 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:14:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f60fbc.vault.azure.net + - /secrets/secbak32f60fbc + - api-version=7.0 + - '' - request: body: '{"value": "secVal32f60fbc"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc?api-version=7.0 response: body: - string: '{"value":"secVal32f60fbc","id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/8968fbea165844c6ba86c8774431bfd2","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal32f60fbc","id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/778d727d3bae4014a6285fdaad85736f","attributes":{"enabled":true,"created":1564528490,"updated":1564528490,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '227' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '227' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:14:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f60fbc.vault.azure.net + - /secrets/secbak32f60fbc + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/backup?api-version=7.0 response: body: - string: '{"value":"KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmZENXM5Qkl4M3FfWWd4OHAteWRFVXF1SDRqRWUxalhCZUczbkh2WFZtaHQtaXZXWnZaLUpGV2hKTGg3SmJkOGhMTlJzSnJ0OGtJeEVENW1rNnc3blpkVDRiRUIzRWlVdkx0eE9UakpsX1JwdWxhTDhabmY4a1B4RHdsSzh3VWpTX3hSTjI0Y2M3WU1KR2o1aHUxT29oZXJHT2FzRmthM2w3ek1ZMlVWVFFFck5GLXlyOHkyYnd1WW9HNGpUSGtNZkN5OWZ1OEMwdHcyRWVwWlNGdl9aMk94bjY3aVZLTDU2LTZybVhRZnBMYmhic2t3QTRUaGJiRl8yRlhXZTg2a2s3NEp2cjJzazczMVFkTGdWNGc2TFlpV2lISmR4aXdKOEsyZ01BX2RXLVBMZHA3N2d4endzTk1Tb2hHeVFLbU15M3ltVFRkMHRjS0g2VVp6d1Rnb1AwQS5oR2F2aHlIMzRPRnBVTmVJUVNrbWdRLjl0alJIYkpDUjgtbkFzLUh6VHM1RDl6ZzV6dlR2ZC1YbDFfREpZbzBJYnRBanNBWVBFWGdUQUFDUTlMTDFJdTA4OUhpblN3MWUwUDRyd3poNHpTdG5saHlDNGlPdDQ4SzVoMGZUR2dPa1ZsOE1PdGl1bFhwTHJtZUdzeHJaVjFoaE0tUW8yb2g2VGJwUmM3bnphcTBpcnBNeUxiRTU0S2EwRTNCNlpEb3ExQkpzRmNMZ2RTeTRMLXhyRk9ZclEzc0xYUU1FTFRIRkNMVHV4dFlianBtdUlrTHo0UHFjV0p5TFFSQ1EwV2ZObHVFel9razY3N0VpS0V3UDcyb095RElnZ0ZjT0k1VEh0VVFGeXRRX3BpMEtvajJkRExRM3J2WXhYVVRqUm9uN3BnVmxnZVltZGM4aTR5QmFYUm10TW5VYWV3WC1fblNQWkhTNUJ1MlV2VEMxVEJGQk8wWUhpamlVWnd2WTNrLXVtY0xlT0lGeWxzNnBMLTdELXJRZk5SWnowVkh4dF91aThSMUZaSFZHeGlyMmI1N0xJU3hBUDBHejJPQ3NDQWVGMy1Gb2NaSVM2UkRsbE1WdHlCNE9kUFUxTktOdUwwdlY4bVdyRzVlSU5ncVFWZFRUN0EwRjBOd2dSd2l5dTFHcXo1NVhXVVVxMjN3cDhMdDR2R2wwelNzblJsNldrRWtrRDZUcFFrTm1xdU4zM1p0UjZHejJ3NmpBRGJHMzFreHhkVEMyN095QUJiWjdUUWF6ZzZKcUlaZllpdkFJOVpuNXIxV05RWDQxV2s4aEo4bXdWc1ZXbkRFeURLRFhGUF8yYWNSX3hDSjlpU2gycnlQeEFtaUFySi1vSHFoSWI0TFlJZTIxbmNGMFRoYzNoNnZrMVNPS1JTSl9zemFnazRySEVfZm04WWkzNi1RU2pMdlJ6SFJtTEpPNWVvQzNNMF9Vb2FQdHpEUE1FUGpXVk1GY2FNbmZ0QmxjY3AwSUo4Rk5nR0YzTmttcFpEcmFPcWRtYWc5TnViaXpQM0V3YjBuR0lwUWc4QzNHOHdtWmdwV3ItV3BQQUszRXo4SVVXc2xOVmZKMjBQSEg5SVIyS2UxMmVsM3ZlbkdsYWtXbW1ZR1NMLUFOTHI5TXQtUWdLeGtGdW1leVFRdTJZaEZxMDlHU2tBcFk5WkVENDFDa2JocVlOTUcwbzVGR1BmSWFGM3FYcGNPdEdhd0k1RkI0Zzh6LXktUXd4UDhnUzI5X3hSWEZLd3BJYU5sRDVHWi1rYVJVSU5kTXY0SC1LcUZ4VlFKYUxiOHRCbTNsdWp4dHYyelJ0cXRlRkVoRnBhLW5MRmhlR0ktdjJJSF9idUJDNHVSajJyRDZNYjVYZjBGSGo3bnNtdl9GX1h0VDlsNXFwbmV6U294MWdhUExKY1pzSlZVbzNCR2hiQ1VMTkt6ZnFNWm1jNml6QW1hcGpCUGtRRDNtejVoT1l4RUxOWUhiUHJjZlFuaGR4Z3ZHVjFJa1lSbVFZb2ltUkx2ay0wWVpMMzVIT2xEYWxNTmNnUkNZdXRTSmJpZ3B3MjBHVG9tdkVQUV94TTRQUXh2MFU1bl9hMzIza3ZNY25nbGFyQldMb0NBMjJtbXZlYm5GbXAyUGwtY1BOYS1zd0FHYnRHVlhQMV9jd25hUzlwbWRlZTJ2MlBmVlhWa1Boa3l6TVB1bEpKNUp0bkt1SWhyTk1SWEFwT3FoTzlFVG1WOXRYTTNhT19aY2wxWDBaSlRQMS1EZXdQTVNpUGdzMjJuM2sxWmVOUEFMYjM2MmxsZzk0RFBuTkxLeTVTaUkwWkdpWjd1U0psdTNFSWFUQW9NbVRseDZBSmI5T3R4aUtCMjNTODhJYV9SNmR5Z0ZmTHd2SzBZSjN2WjdEakctWDBLRU5QbTRqTl9kamwxOEJ3eUJuZXZoRG1DbTZjLWpndFJWcHo0bTUxcGFjMHVKaFBJLWt4cElCSmlaZC1HUW1wc01hOGs1MFdHdHctU0E1c0JxeUVuRkNXdi12QWZEUzl2VHRoOFhGUE5hM05JUWdZaUYzUE5mMk0xZzlEZ0poQ053OW5yRTcwVkVIeHNRRFdNR1pib1NoSEhLWW5UbUVfOGVRbXY1c3BEbDcxaVR6OHdCT2MyeE1seTNkY1pUT2pzMFFQUTY3N2xNd2VoWVh4NFFSMG5MT2psd3h5WGs4VG42LWpFdWlaS1pFaGJVclA2OExKSHc4YnVJOWFoeXRuWFRKVWZfWlB3a1NBU0VBRjV1V2JEeG1ISTdFUE9SejgyN2t4anBZcnAtSmJ5NHFzRW5MUFlqS3Z5OEY1Yk1POGc4djRralB3YXhYRHgzSHI4VlJoUlRiN2dpcjhIb3A4UkNtYkM1c3lwZy16MmNaVmk4dmh1NWxjN3l6elg2Qmp4Vy1zUzlDV2YtM0FWX0NlQ1JJUmJjV0dSR21PeVZ1czBpTGlmVVhEdEdhazVBdkhtLUNxZDNkdDFrRlBmbk5TbmZvMHZYWUhTTmljaGVQVm9xNGkzZm1FYlJmazFqQlNXT0FDT3NyS3pIQU1BWEVZNGxCWXUxWDRQVExOYTlFS1BCd1h1RmdveURKSkdHSWp4RmN3Z1JBeXp0TEZBV0o2MFJ4YnpUd3VhdENqREUyM1BEZlZNMm9nYkxKNVZ3NDlLWUR3UmRMN0EtbGQ0V0daSHVVYTE1djA1ZlF4d3ZsYTQ5Mngyek9OdG1NajZtbGZYUTJhMlVGTTVWeTVnQUJEMmFjbVZZSzV0dTR2SDFTT19kckxIZmdJR2lEcUluemNyQmtSZ3ZvQjd6Rng3OVBkdllXVllxODFWQmxfWkZHRk9lZ2dxSXNFdkhZZjRHdVdwTXo1T21WVERCWTh5Yzh6RExxTUhGa1M5bEQtbXFxTTdrUmFxdHlOMkdvenp0M1ZVNjFRbjBFQ1FXNG8zYmcwS0NsWUxWVXpPNjVrRnl0VVQ5bGt6Zm9HYkdJMWphS0ZwVFMxSk01RUFwVm1fSkJJOTRRdk5vSjUzWmg3T0xPWTQ5UUpUTTZvY1U5MmhHUmtyeThyRVpsc2VPN2lZenVhX0sxZTUwS01INzlrM09DdDlkMXpBZVdTakVyWHpHMW5zemFXRE1XSk5BVXlFTVpGZVRDX3FraGJhZzd2a0ROS1hvQVB4R2oyQWNMWXNaRXhUa3IzUFBTYThjSVphWmk3T09xOEpjb0JSMG5BQXJXSTR0YlRQRHJ6NHBNaXRjQ1lVVG5RYUpFV2N3WWpqQWp3eTZzLVhqNHZDSXBmQTNEei1mSS1MSHdHeTZMcExuZ0pnLTVHVVFiS0dEbW5OSGdmXzd1YXo3YUp5OGhaV0VTd2cxQ2poMGJkNXIxS24tOW1WZ21ZcVpHckQ4YUZCNVA0ZGxYWVotNXpqMThkU2VlNE5sbjZGRTllbUdWVnN3SnFSblo2V1ZJaVZJUDNKN19iVmdGSW5INklQSWFNY1dLU2tZbmVZUFRjODFFZ2ZndDBEWjFTaklYRWI0eWxmV0tjenJyODR1WGJYLThUaGJCRklMSk5oazhWTDJKOVVkSS1hcTFES1lUbmc4TzlyMS1qa0NnRjNYNmd0MHpnWW1qcmxZR2NNVm1ENTR6WHRkbENGWDBPN0RpMHJmemZ0WEhXV25IaHFjNzQzR3YwUjVtbnVndEJkQXN1SzJFS1p3bUFOc2hnRV9EbmVZOW1sckZYc3g2NVZlOE44SGlMdlFBb1ZkR0lsXzdSMG15b21IOWowam1idnhGeDJCUEZ6RHQwREJyZFdVRWdXOU9pRTUtNFRWOWEwWEs3UHY1UVJ0SFRIMHhfSEw5bndFeTN4VlE1eHQ5WGs0NWM1djhTRXBCd0czamJDM1A5UkZZWnp3YWo0SjBnazlPbloxSXRvaDQwZmJfLVNjZ0k0WE9pUnBkaGM2bnJIWkhjckg3dHFqeFVVNTlUaDJjSURLQnJEcVJIX1E5emVmODlMNUZDakxsUTJIVXlmT0tZOHh2LWpqS0hldkt2OUFuZ0JTd2FrcklCU0tLV2JvZks3bXJHamJzcWp5SC1TX2RLT3ZkRmFxVlM4c2xyeWwtUnNwWFJscENpem16R19OWm40ZjBhN1JGVmZPSGxMVUV4Q1BWVDllMVFIVmhmUk9Ld2FpNGRLcDVtNGZTZ1FubGkzbEs3QW90OXFVTkZhX1F4aWxya01jM19OOGFlRklmZjN5ZVlGWUluOHpqd1RrZVJURmtEeGFKOGlJa09HVHhYNEhtWXhpSmkxZ2ZiTXpiYWlBeHBtdU9QOXI2dEZvTTQtVmpaUnFFTkJqUnNKSGQtZnpLVE5OV3VrVlNfYkN1dkhzZEZkSkxmZm80NXBWMmVUS1dZVUNibHhEU2hTZ1JqUXo5Z2tJTXd1RW5iNTZ2amcxUzNkMDhGNDBTU3hKYXhPcTRqUW85ZEpPaFR5NXRaaWc1djluaDFhVU8wSUtFZ2tsVERJR2hyVjZkWUFiSW5FbWhZWi1LejJEdjlRNzZ3MXQ3Y0trQ28tb3I0UU1XM3dVUm5NdkRCYjZubVNkOS12M0xKZWN2dDF1dS1RMzNCb2kyYk9fdTNtSk5nRVBBalhMQ3MtQ3RCNnhBNnVxbU1HSTU2R1pYdHVwTXloVXcuOGc3M3ZHQVdDam1YYW0xeVYzbXhnUQ"}' + string: '{"value":"KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLkFMc0piLWlWcUk5Y01EcVRhS2w1d3g0UTd4dGtzZ3FTWjFfdVEtRGxuR19yaXZ4bGlWakFfbGlxQ3dhZ2lNaTQydkRGa29Jd2U3UnYwYmwzMXlzY1NpQmdkSmxvSzl4SjBJVWJQdjI0Y182amd4TmVVNWx0M2hKRTZ1R1JFQTZYSWpOeEJkazQ1a18yMTZ2a2hRbEt0X3g4dC1oZzk3ems2bkNpT0RTLWtWQmhIS2RST1RmRFZXUmJhVlcyQm9wTHBKM0E2cEpadEtPMjF1dHgwQWRkTVVSMXQyamdkZEs0eTJxWDJTX2hrY3ZUdnR5VGxiUXkxTmF2WnFodlptc0ZIY3ZZT0ZWdW83VTEtWWR1TUI4SmtuaFljanZkSU5lNmJSdzg0UWxQQzQwNzZXTk5TSlh0V2NNbkVMaWF0ZnFLT0RGQzY3TUVTVlA4TVNMWHZQOGIxZy5TTXhZMkRyaDlzckJCQldYNDJMVDBBLjY3S0pxd3FQekFPMVR6ZGNOTHpOY2ROQmNsVWc1SE5CSFRRYWNqNFJHN0RlWGRZMWJ1c05UMUdYUXFqTDNURzVqM0Y2TVVGYXh2R2drcjQ3czJ3cW1KVmRON2JEYlhyR2dobU9ENThmanBXbzA4ZHQ2ZHJWTC1yX0FDeV9CRGFERFFrb3Q5VHU2RW9FSjB0WjVsNFpPWUxaSmVFS0JfaUlCVWRfaW02MzkyeWtrZDIzT0dlNFRuZ2xNSzlJc25sMWMyN2JySl82aUR5R2hheEpiQTBHc0ZDM1I2Q3dlenRjdV9COUY2WE9WNlJTLWoyOW9vd29URUxpM3pwZXJaN0h0OGFlSnFzRHFkMzFLT2tlUDNEcEpVdnpEczJKNDRTNC1Qanl5dDV6UTk2LVFrLVhaZ3FSVndETWQ1VFAweHFQZXdTX3Y0dmlDRUxfbTBvTW5jY3lYTEhvMmVvMzdRUDUzU2Nodm1ocFVCTEpmYUl1dG11TC1XN0Fla0xJbjU0R0NfMzVWV2VHR1lQWnJtNERYbHp3d3huY1E5U3h0OVAtQXctTHJleHVFUWlOWGlrVXh6R2djYm9HVWJ2VFlzdnBGR2JWN21oN3B6SHQtc21Td0hoRkczczd2Z0xvc2tPbUNuQVJ6REwxcXR4dzRERmNONERQRk93YzMzUUdTb3Z6ZVByblVnTU1NRHlvT1NwS1ZwdlA2Wm9zdTdTTy1LUUV2MlJ4TE5ZaHJVZWtKdnlXMkRGbFhkV3VwaXZnbU1fcWFYM09ZVHZtbnlwNDNtcDFyNHFqSzNOTkZKNEJ3M0VCT2xHSV9UdHo5cjF6ancxenJXcTNWVTlkdzQyeXJQSk5na3REY1dzWGdoN1NNRWV5X213R21sNEJLRmtnTWpCVWYtV0kwWkdhVDVrT1QwZGVjRGxaUXpHcG1KTVI3N0p3ZUZsaDhTZDd1ZXVEU285ZkhCODFfeGIzUVhWb29iUXJfcUtMRmpMbFZSLThjd1BLeURCUEhtLTBrd1JyN3FGb3BmQjNfOG81UHFhSENvbHBRQ00wTlhhaXhaN2xBV1daRUxyTXI1RGxzMlE4cUh1UWo0dE91VzRFbW9xb3Vpb1ZYclZwMlBOMGV1ZmkzU1YtRUJhdXZfZ0Jzcy13YzZQSEZ4TFRaRGJyTDBpSDlsSE5YOTZLS1dQQjV5YktNM0x2cWdQMk0wOTlESS02TnN4V1B3U2tTdGFjQzJlUk04MmZQNENyS1Z2c1BqTkFTd256M3NqbXUzR0xBWDlKem56d1Vrem1mVC13SDVqM1FIMUs3T0lzeEdnWXQ0THlWSnZQQWFJenU5Mzd6bmpyQ2JNUmloM1ctMzNGZG5QdFdJa1FrN254VmtITHlfaTU2NS1FZHBZNW1sVTBIMnJCTjE4cEoyZUJscmpWcXFMT0VPMzFxQy12M0dJS1lTbkVhdTZGNjY4ZVE0dU91R1AwZUhqLWFzNm1pLUVZSXk4WVhKTlBxanB1OHEtZG5BdkdSRFFUaWs1bHZHQW9JMXBzcU94aENNdVp4amhNbHA2aXY5aTctMWxNUkpKVnpoY3BwRmdXLVpvX3I1Y1NDbmFsZkN2UzhvQklOdVdJdzNWMERIREw1ZGhUTTBfZ3JEazdheEpjVlZISFZMR0tMSi1hbTJBLUc1MjlxMGJ4UzJJUVVWV1lhcGNHZjdvVHc5TXluOFdJOTVhRVN1a0Y4XzluVFdqVmI2d1VQeXpIRWpUOHhGVTVuTW1HSDdLSnpIT2cxNDM4eV9lVjJPZTNqX3kxclN2Sm1FUFM4OWpHa3dNOXZGSWxGcDY2Xzc3Y2FUR201MmRoemo2d1dkbi1rVVBWS1dwZW00VHcxSTZ0eTdkWUYweUtRQTFRWmppMm00dlUyS1JSeXV4NFF6alVVUWtPQzJ2dW9ZMXdzbGFkNVdycjI1VDMtMkIyODdtaUVOSGdGNEt5eFhiLUFmZ0hiWU5SbWVwR2c4UktRX2dnbEQ5Qllib1ZfMWM2RkpjaUszemZDQzB4QVBMSU9ZYzZZQTE2QV9XWGJ1RWZVM3Vwclh1TjhWckFTeTlPV3Q2UnhDVjB4Wmc0R28xeFhxRDROaC1KZ1NibExCOEVkNG9MZ3hDRUtwWVdUbU91alFlQ2R3STVZZUxBTS1Sdm5zN09HN0JRN0JaTlpEOXBoeHZmcjZLM1oyVGRNMVBSRTI2YjEwSUZTMmJiY05tVERxcjRfOTd4RzF0cURqQWFTX1loMWgxczM3QWxpQ01RRS16TDY4MHA5ai1XeURnTW1IVWs3ZEpFcGo5RlBPdEthcXdmLTZlc0ZmazdCQkxvSGl3YUx1SDZqTmVRNXdpMjRNeUZ3NlJqTTlzTlpHQm9HRTk3RmFwdXg3T3ZYWHRQWjhxYkpmSUtJYzR6Q2NHdDRDakhQMWdqX2tERkJLeGZuNlItekRlS3hGX1NuSlJpWUNnRGJnVjlUMU9OcXhqLXA4LXNFdTRleWdIcVhHaDVGcXZ1dld4OTd2X0lkVF9HYUtTWUN5bGxDaFVwS1hWbWZnVUtnQVNZWkx1RnJrd3V5VGFmODloQVY4YmVXVkNZaUxORDd1bDRwZHlMajlnZ0ZFSTdaYVNXSFRsX29uZndDNUZmRGs5VGI4aHp3NVBWanNWNU9pU2QweENpSlotbGdvTnQwaFRsYUZ5UUYyWnBxU0FrRm9SSWVnYlNxTVlpSDRGcE1IZWY2eEZFblpxSUpxeG0yc2VycWhRTWZfVURBYVotZ05Ra09qalptcHg1Y0NRTXpvdUpKcnNrVzBDNHFpZ25CQTdlWmZCQ01TYkIzREtPbjJQNEQxTDdIUnZ3TnZUVXpDS3RYWGlnUWk4dWpvWUc1SUdQMVNVS2dRMTZqMEgtc1hTZGFBR0RiRDFvNk1ocjNZNzhQV0NEd0toWkpmNkpxaXNZYWNEUXZuYWg0LWdhbGd6dDY4dzBoWncybDNKRmFUNnJNMjBsdWR5eHluZW1ldXJISUE1c0Rfb1d3YmZmemcxaHlKbDRQVjVORmNLZlZ3THBJNU9PbEFXRW00VTRDbl9sR3lZak15cDFRSTVieEVwRjR4NUg2dXI2WW1vQks0Uk1kMDBHdUowMUZ0cEVENFJ1akFiNUhIVVhseEp3TkMwanNrYVpMVW5kcGdIYnZqMVV5YnhZc055VnFRUjVvWjFqSHFkT0ZLckc5dmxnN25EZHpFekJoeTdndWtuV0xmb3duRnhlZVZyaGVSOEhzZDE5SW1lTHI3a0FOWkhEVjh1czdsZHV2bkNjWlFYaGZxSnBtcUozZEgwblhuWWZCalpEZV92eHpoUkYwbGc1SFhZanhybVNpYXI5dHBWV1hVWmJnRVE0Zkp5bllES0JLOVdWZjBxMnBveVpGRzA0Q3ZYeUpIeTZCaktzNXRIRTRZLV9EbE12OUI4NXN5OXFBb2N2d2N1d0UzbGRXbzdoZnBCN2lkekthaTlqN0lNV1E4YWE4RURFclNnUXpnVFdDZW12VGZPUlVPVXRtWnJZZGt0TWNpYXZibVFvd0Uwb3RxZ3ZQM211NHJkMUFjdHA4eWFGNDVTUlhtQkZuS1pWTkdMM2Z0dFZuR25QbXdLNU1qOFB6NWs4c2RqZ1I4akhLSjUydEdkQzV1TWE2RjVLb3FROUVGNEJKMWNLemhkSE1kRkRieVhLazJyaDN2UVY3a1FiRHZmMjh2ZnNWUFNqWHJXWUpXZ0hIUXlFdVItUzJIRExuVUtPa3BGbkwtUWhjcW5iWE51VHZtOUxRbEFJeEdoRUo1M0gzUW44S1RjODViUWxLeU5aa2RtOWxhRTAyemExRXJzYnQwU1E2ZGhIR1hRblFHUS1HSzFJcE0wT3loLVdWYmZidzNwN19GeTVlRnZ3S3duNzhxQWZtM2N6alQ4NUlacWJxb3dmb1VvS25rUVVlNEdJWmQtZ29LS0d0WTlFZDRxb3BqV1hOM1dYVHlYRWdmOGVuUXhqblhLeEM4MDdqWWhaeE0zWmVDNE01d1hyMzJZRmRPc3Z5SmtLb2FTampER3liblNaOFdHVHR4Mk1HM0hHR0NHdW5xWG9vOFZHRjQzemVteVU5RGtZQ3pmZm9qU09tc2pERkUyTW1LWTNYd04wdmdGSkExY0pjWjVySE8taVROZ1Bsa2h3eXNkek1GdDFoVEdFaEY2aERWQ2taQ2NpSEktNEdfVEJFZmJ3eTZJV0tPeHpETTlRejlRNV9lWGlVbUR0M2hBdXZyMkdHZDJNWEI4R29PWGhJekNKbl9IalA1QzlMclh5VFQ0TEQxSVh1UWRpSXJqNWJUTVFKX0oxeFlRQW1EaG9QVXhCdGlGSVRxaWJOcGk2V0lzMWF3VlhWUWRwcWlaMjVfRG8yRjQ5QnU5UHRuX3Z3SHR4REdGUlMzQTF6QUtYUlBjTlpCWHl1a1JjWGVCb2lHR2I0OHNVOXhBMUtnZlNSTDRUS1NOV0JjTTJtLUNPN0VnMDM1QldQUGU3ZGhEWE5CWl82VzJRMzVKcWlYd3FqZTBPUmNUY0FmR0NSTC1NZHFvWVYtaHd3UnQtdEtwbEdDMElXS1d1Yk5ldm43NzRQbGpqV2ZJMFR4ZEkzNkFKa1YzdzN2WlVfUDAwQlEuY0Y5bXk4cXZWMjRVV2JKcGZJRDVCQQ"}' headers: - cache-control: - - no-cache - content-length: - - '5378' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '5378' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:14:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f60fbc.vault.azure.net + - /secrets/secbak32f60fbc/backup + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc?api-version=7.0 response: body: - string: '{"id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/8968fbea165844c6ba86c8774431bfd2","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/778d727d3bae4014a6285fdaad85736f","attributes":{"enabled":true,"created":1564528490,"updated":1564528490,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '202' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '202' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:14:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f60fbc.vault.azure.net + - /secrets/secbak32f60fbc + - api-version=7.0 + - '' - request: - body: '{"value": "KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmZENXM5Qkl4M3FfWWd4OHAteWRFVXF1SDRqRWUxalhCZUczbkh2WFZtaHQtaXZXWnZaLUpGV2hKTGg3SmJkOGhMTlJzSnJ0OGtJeEVENW1rNnc3blpkVDRiRUIzRWlVdkx0eE9UakpsX1JwdWxhTDhabmY4a1B4RHdsSzh3VWpTX3hSTjI0Y2M3WU1KR2o1aHUxT29oZXJHT2FzRmthM2w3ek1ZMlVWVFFFck5GLXlyOHkyYnd1WW9HNGpUSGtNZkN5OWZ1OEMwdHcyRWVwWlNGdl9aMk94bjY3aVZLTDU2LTZybVhRZnBMYmhic2t3QTRUaGJiRl8yRlhXZTg2a2s3NEp2cjJzazczMVFkTGdWNGc2TFlpV2lISmR4aXdKOEsyZ01BX2RXLVBMZHA3N2d4endzTk1Tb2hHeVFLbU15M3ltVFRkMHRjS0g2VVp6d1Rnb1AwQS5oR2F2aHlIMzRPRnBVTmVJUVNrbWdRLjl0alJIYkpDUjgtbkFzLUh6VHM1RDl6ZzV6dlR2ZC1YbDFfREpZbzBJYnRBanNBWVBFWGdUQUFDUTlMTDFJdTA4OUhpblN3MWUwUDRyd3poNHpTdG5saHlDNGlPdDQ4SzVoMGZUR2dPa1ZsOE1PdGl1bFhwTHJtZUdzeHJaVjFoaE0tUW8yb2g2VGJwUmM3bnphcTBpcnBNeUxiRTU0S2EwRTNCNlpEb3ExQkpzRmNMZ2RTeTRMLXhyRk9ZclEzc0xYUU1FTFRIRkNMVHV4dFlianBtdUlrTHo0UHFjV0p5TFFSQ1EwV2ZObHVFel9razY3N0VpS0V3UDcyb095RElnZ0ZjT0k1VEh0VVFGeXRRX3BpMEtvajJkRExRM3J2WXhYVVRqUm9uN3BnVmxnZVltZGM4aTR5QmFYUm10TW5VYWV3WC1fblNQWkhTNUJ1MlV2VEMxVEJGQk8wWUhpamlVWnd2WTNrLXVtY0xlT0lGeWxzNnBMLTdELXJRZk5SWnowVkh4dF91aThSMUZaSFZHeGlyMmI1N0xJU3hBUDBHejJPQ3NDQWVGMy1Gb2NaSVM2UkRsbE1WdHlCNE9kUFUxTktOdUwwdlY4bVdyRzVlSU5ncVFWZFRUN0EwRjBOd2dSd2l5dTFHcXo1NVhXVVVxMjN3cDhMdDR2R2wwelNzblJsNldrRWtrRDZUcFFrTm1xdU4zM1p0UjZHejJ3NmpBRGJHMzFreHhkVEMyN095QUJiWjdUUWF6ZzZKcUlaZllpdkFJOVpuNXIxV05RWDQxV2s4aEo4bXdWc1ZXbkRFeURLRFhGUF8yYWNSX3hDSjlpU2gycnlQeEFtaUFySi1vSHFoSWI0TFlJZTIxbmNGMFRoYzNoNnZrMVNPS1JTSl9zemFnazRySEVfZm04WWkzNi1RU2pMdlJ6SFJtTEpPNWVvQzNNMF9Vb2FQdHpEUE1FUGpXVk1GY2FNbmZ0QmxjY3AwSUo4Rk5nR0YzTmttcFpEcmFPcWRtYWc5TnViaXpQM0V3YjBuR0lwUWc4QzNHOHdtWmdwV3ItV3BQQUszRXo4SVVXc2xOVmZKMjBQSEg5SVIyS2UxMmVsM3ZlbkdsYWtXbW1ZR1NMLUFOTHI5TXQtUWdLeGtGdW1leVFRdTJZaEZxMDlHU2tBcFk5WkVENDFDa2JocVlOTUcwbzVGR1BmSWFGM3FYcGNPdEdhd0k1RkI0Zzh6LXktUXd4UDhnUzI5X3hSWEZLd3BJYU5sRDVHWi1rYVJVSU5kTXY0SC1LcUZ4VlFKYUxiOHRCbTNsdWp4dHYyelJ0cXRlRkVoRnBhLW5MRmhlR0ktdjJJSF9idUJDNHVSajJyRDZNYjVYZjBGSGo3bnNtdl9GX1h0VDlsNXFwbmV6U294MWdhUExKY1pzSlZVbzNCR2hiQ1VMTkt6ZnFNWm1jNml6QW1hcGpCUGtRRDNtejVoT1l4RUxOWUhiUHJjZlFuaGR4Z3ZHVjFJa1lSbVFZb2ltUkx2ay0wWVpMMzVIT2xEYWxNTmNnUkNZdXRTSmJpZ3B3MjBHVG9tdkVQUV94TTRQUXh2MFU1bl9hMzIza3ZNY25nbGFyQldMb0NBMjJtbXZlYm5GbXAyUGwtY1BOYS1zd0FHYnRHVlhQMV9jd25hUzlwbWRlZTJ2MlBmVlhWa1Boa3l6TVB1bEpKNUp0bkt1SWhyTk1SWEFwT3FoTzlFVG1WOXRYTTNhT19aY2wxWDBaSlRQMS1EZXdQTVNpUGdzMjJuM2sxWmVOUEFMYjM2MmxsZzk0RFBuTkxLeTVTaUkwWkdpWjd1U0psdTNFSWFUQW9NbVRseDZBSmI5T3R4aUtCMjNTODhJYV9SNmR5Z0ZmTHd2SzBZSjN2WjdEakctWDBLRU5QbTRqTl9kamwxOEJ3eUJuZXZoRG1DbTZjLWpndFJWcHo0bTUxcGFjMHVKaFBJLWt4cElCSmlaZC1HUW1wc01hOGs1MFdHdHctU0E1c0JxeUVuRkNXdi12QWZEUzl2VHRoOFhGUE5hM05JUWdZaUYzUE5mMk0xZzlEZ0poQ053OW5yRTcwVkVIeHNRRFdNR1pib1NoSEhLWW5UbUVfOGVRbXY1c3BEbDcxaVR6OHdCT2MyeE1seTNkY1pUT2pzMFFQUTY3N2xNd2VoWVh4NFFSMG5MT2psd3h5WGs4VG42LWpFdWlaS1pFaGJVclA2OExKSHc4YnVJOWFoeXRuWFRKVWZfWlB3a1NBU0VBRjV1V2JEeG1ISTdFUE9SejgyN2t4anBZcnAtSmJ5NHFzRW5MUFlqS3Z5OEY1Yk1POGc4djRralB3YXhYRHgzSHI4VlJoUlRiN2dpcjhIb3A4UkNtYkM1c3lwZy16MmNaVmk4dmh1NWxjN3l6elg2Qmp4Vy1zUzlDV2YtM0FWX0NlQ1JJUmJjV0dSR21PeVZ1czBpTGlmVVhEdEdhazVBdkhtLUNxZDNkdDFrRlBmbk5TbmZvMHZYWUhTTmljaGVQVm9xNGkzZm1FYlJmazFqQlNXT0FDT3NyS3pIQU1BWEVZNGxCWXUxWDRQVExOYTlFS1BCd1h1RmdveURKSkdHSWp4RmN3Z1JBeXp0TEZBV0o2MFJ4YnpUd3VhdENqREUyM1BEZlZNMm9nYkxKNVZ3NDlLWUR3UmRMN0EtbGQ0V0daSHVVYTE1djA1ZlF4d3ZsYTQ5Mngyek9OdG1NajZtbGZYUTJhMlVGTTVWeTVnQUJEMmFjbVZZSzV0dTR2SDFTT19kckxIZmdJR2lEcUluemNyQmtSZ3ZvQjd6Rng3OVBkdllXVllxODFWQmxfWkZHRk9lZ2dxSXNFdkhZZjRHdVdwTXo1T21WVERCWTh5Yzh6RExxTUhGa1M5bEQtbXFxTTdrUmFxdHlOMkdvenp0M1ZVNjFRbjBFQ1FXNG8zYmcwS0NsWUxWVXpPNjVrRnl0VVQ5bGt6Zm9HYkdJMWphS0ZwVFMxSk01RUFwVm1fSkJJOTRRdk5vSjUzWmg3T0xPWTQ5UUpUTTZvY1U5MmhHUmtyeThyRVpsc2VPN2lZenVhX0sxZTUwS01INzlrM09DdDlkMXpBZVdTakVyWHpHMW5zemFXRE1XSk5BVXlFTVpGZVRDX3FraGJhZzd2a0ROS1hvQVB4R2oyQWNMWXNaRXhUa3IzUFBTYThjSVphWmk3T09xOEpjb0JSMG5BQXJXSTR0YlRQRHJ6NHBNaXRjQ1lVVG5RYUpFV2N3WWpqQWp3eTZzLVhqNHZDSXBmQTNEei1mSS1MSHdHeTZMcExuZ0pnLTVHVVFiS0dEbW5OSGdmXzd1YXo3YUp5OGhaV0VTd2cxQ2poMGJkNXIxS24tOW1WZ21ZcVpHckQ4YUZCNVA0ZGxYWVotNXpqMThkU2VlNE5sbjZGRTllbUdWVnN3SnFSblo2V1ZJaVZJUDNKN19iVmdGSW5INklQSWFNY1dLU2tZbmVZUFRjODFFZ2ZndDBEWjFTaklYRWI0eWxmV0tjenJyODR1WGJYLThUaGJCRklMSk5oazhWTDJKOVVkSS1hcTFES1lUbmc4TzlyMS1qa0NnRjNYNmd0MHpnWW1qcmxZR2NNVm1ENTR6WHRkbENGWDBPN0RpMHJmemZ0WEhXV25IaHFjNzQzR3YwUjVtbnVndEJkQXN1SzJFS1p3bUFOc2hnRV9EbmVZOW1sckZYc3g2NVZlOE44SGlMdlFBb1ZkR0lsXzdSMG15b21IOWowam1idnhGeDJCUEZ6RHQwREJyZFdVRWdXOU9pRTUtNFRWOWEwWEs3UHY1UVJ0SFRIMHhfSEw5bndFeTN4VlE1eHQ5WGs0NWM1djhTRXBCd0czamJDM1A5UkZZWnp3YWo0SjBnazlPbloxSXRvaDQwZmJfLVNjZ0k0WE9pUnBkaGM2bnJIWkhjckg3dHFqeFVVNTlUaDJjSURLQnJEcVJIX1E5emVmODlMNUZDakxsUTJIVXlmT0tZOHh2LWpqS0hldkt2OUFuZ0JTd2FrcklCU0tLV2JvZks3bXJHamJzcWp5SC1TX2RLT3ZkRmFxVlM4c2xyeWwtUnNwWFJscENpem16R19OWm40ZjBhN1JGVmZPSGxMVUV4Q1BWVDllMVFIVmhmUk9Ld2FpNGRLcDVtNGZTZ1FubGkzbEs3QW90OXFVTkZhX1F4aWxya01jM19OOGFlRklmZjN5ZVlGWUluOHpqd1RrZVJURmtEeGFKOGlJa09HVHhYNEhtWXhpSmkxZ2ZiTXpiYWlBeHBtdU9QOXI2dEZvTTQtVmpaUnFFTkJqUnNKSGQtZnpLVE5OV3VrVlNfYkN1dkhzZEZkSkxmZm80NXBWMmVUS1dZVUNibHhEU2hTZ1JqUXo5Z2tJTXd1RW5iNTZ2amcxUzNkMDhGNDBTU3hKYXhPcTRqUW85ZEpPaFR5NXRaaWc1djluaDFhVU8wSUtFZ2tsVERJR2hyVjZkWUFiSW5FbWhZWi1LejJEdjlRNzZ3MXQ3Y0trQ28tb3I0UU1XM3dVUm5NdkRCYjZubVNkOS12M0xKZWN2dDF1dS1RMzNCb2kyYk9fdTNtSk5nRVBBalhMQ3MtQ3RCNnhBNnVxbU1HSTU2R1pYdHVwTXloVXcuOGc3M3ZHQVdDam1YYW0xeVYzbXhnUQ"}' + body: '{"value": "KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLkFMc0piLWlWcUk5Y01EcVRhS2w1d3g0UTd4dGtzZ3FTWjFfdVEtRGxuR19yaXZ4bGlWakFfbGlxQ3dhZ2lNaTQydkRGa29Jd2U3UnYwYmwzMXlzY1NpQmdkSmxvSzl4SjBJVWJQdjI0Y182amd4TmVVNWx0M2hKRTZ1R1JFQTZYSWpOeEJkazQ1a18yMTZ2a2hRbEt0X3g4dC1oZzk3ems2bkNpT0RTLWtWQmhIS2RST1RmRFZXUmJhVlcyQm9wTHBKM0E2cEpadEtPMjF1dHgwQWRkTVVSMXQyamdkZEs0eTJxWDJTX2hrY3ZUdnR5VGxiUXkxTmF2WnFodlptc0ZIY3ZZT0ZWdW83VTEtWWR1TUI4SmtuaFljanZkSU5lNmJSdzg0UWxQQzQwNzZXTk5TSlh0V2NNbkVMaWF0ZnFLT0RGQzY3TUVTVlA4TVNMWHZQOGIxZy5TTXhZMkRyaDlzckJCQldYNDJMVDBBLjY3S0pxd3FQekFPMVR6ZGNOTHpOY2ROQmNsVWc1SE5CSFRRYWNqNFJHN0RlWGRZMWJ1c05UMUdYUXFqTDNURzVqM0Y2TVVGYXh2R2drcjQ3czJ3cW1KVmRON2JEYlhyR2dobU9ENThmanBXbzA4ZHQ2ZHJWTC1yX0FDeV9CRGFERFFrb3Q5VHU2RW9FSjB0WjVsNFpPWUxaSmVFS0JfaUlCVWRfaW02MzkyeWtrZDIzT0dlNFRuZ2xNSzlJc25sMWMyN2JySl82aUR5R2hheEpiQTBHc0ZDM1I2Q3dlenRjdV9COUY2WE9WNlJTLWoyOW9vd29URUxpM3pwZXJaN0h0OGFlSnFzRHFkMzFLT2tlUDNEcEpVdnpEczJKNDRTNC1Qanl5dDV6UTk2LVFrLVhaZ3FSVndETWQ1VFAweHFQZXdTX3Y0dmlDRUxfbTBvTW5jY3lYTEhvMmVvMzdRUDUzU2Nodm1ocFVCTEpmYUl1dG11TC1XN0Fla0xJbjU0R0NfMzVWV2VHR1lQWnJtNERYbHp3d3huY1E5U3h0OVAtQXctTHJleHVFUWlOWGlrVXh6R2djYm9HVWJ2VFlzdnBGR2JWN21oN3B6SHQtc21Td0hoRkczczd2Z0xvc2tPbUNuQVJ6REwxcXR4dzRERmNONERQRk93YzMzUUdTb3Z6ZVByblVnTU1NRHlvT1NwS1ZwdlA2Wm9zdTdTTy1LUUV2MlJ4TE5ZaHJVZWtKdnlXMkRGbFhkV3VwaXZnbU1fcWFYM09ZVHZtbnlwNDNtcDFyNHFqSzNOTkZKNEJ3M0VCT2xHSV9UdHo5cjF6ancxenJXcTNWVTlkdzQyeXJQSk5na3REY1dzWGdoN1NNRWV5X213R21sNEJLRmtnTWpCVWYtV0kwWkdhVDVrT1QwZGVjRGxaUXpHcG1KTVI3N0p3ZUZsaDhTZDd1ZXVEU285ZkhCODFfeGIzUVhWb29iUXJfcUtMRmpMbFZSLThjd1BLeURCUEhtLTBrd1JyN3FGb3BmQjNfOG81UHFhSENvbHBRQ00wTlhhaXhaN2xBV1daRUxyTXI1RGxzMlE4cUh1UWo0dE91VzRFbW9xb3Vpb1ZYclZwMlBOMGV1ZmkzU1YtRUJhdXZfZ0Jzcy13YzZQSEZ4TFRaRGJyTDBpSDlsSE5YOTZLS1dQQjV5YktNM0x2cWdQMk0wOTlESS02TnN4V1B3U2tTdGFjQzJlUk04MmZQNENyS1Z2c1BqTkFTd256M3NqbXUzR0xBWDlKem56d1Vrem1mVC13SDVqM1FIMUs3T0lzeEdnWXQ0THlWSnZQQWFJenU5Mzd6bmpyQ2JNUmloM1ctMzNGZG5QdFdJa1FrN254VmtITHlfaTU2NS1FZHBZNW1sVTBIMnJCTjE4cEoyZUJscmpWcXFMT0VPMzFxQy12M0dJS1lTbkVhdTZGNjY4ZVE0dU91R1AwZUhqLWFzNm1pLUVZSXk4WVhKTlBxanB1OHEtZG5BdkdSRFFUaWs1bHZHQW9JMXBzcU94aENNdVp4amhNbHA2aXY5aTctMWxNUkpKVnpoY3BwRmdXLVpvX3I1Y1NDbmFsZkN2UzhvQklOdVdJdzNWMERIREw1ZGhUTTBfZ3JEazdheEpjVlZISFZMR0tMSi1hbTJBLUc1MjlxMGJ4UzJJUVVWV1lhcGNHZjdvVHc5TXluOFdJOTVhRVN1a0Y4XzluVFdqVmI2d1VQeXpIRWpUOHhGVTVuTW1HSDdLSnpIT2cxNDM4eV9lVjJPZTNqX3kxclN2Sm1FUFM4OWpHa3dNOXZGSWxGcDY2Xzc3Y2FUR201MmRoemo2d1dkbi1rVVBWS1dwZW00VHcxSTZ0eTdkWUYweUtRQTFRWmppMm00dlUyS1JSeXV4NFF6alVVUWtPQzJ2dW9ZMXdzbGFkNVdycjI1VDMtMkIyODdtaUVOSGdGNEt5eFhiLUFmZ0hiWU5SbWVwR2c4UktRX2dnbEQ5Qllib1ZfMWM2RkpjaUszemZDQzB4QVBMSU9ZYzZZQTE2QV9XWGJ1RWZVM3Vwclh1TjhWckFTeTlPV3Q2UnhDVjB4Wmc0R28xeFhxRDROaC1KZ1NibExCOEVkNG9MZ3hDRUtwWVdUbU91alFlQ2R3STVZZUxBTS1Sdm5zN09HN0JRN0JaTlpEOXBoeHZmcjZLM1oyVGRNMVBSRTI2YjEwSUZTMmJiY05tVERxcjRfOTd4RzF0cURqQWFTX1loMWgxczM3QWxpQ01RRS16TDY4MHA5ai1XeURnTW1IVWs3ZEpFcGo5RlBPdEthcXdmLTZlc0ZmazdCQkxvSGl3YUx1SDZqTmVRNXdpMjRNeUZ3NlJqTTlzTlpHQm9HRTk3RmFwdXg3T3ZYWHRQWjhxYkpmSUtJYzR6Q2NHdDRDakhQMWdqX2tERkJLeGZuNlItekRlS3hGX1NuSlJpWUNnRGJnVjlUMU9OcXhqLXA4LXNFdTRleWdIcVhHaDVGcXZ1dld4OTd2X0lkVF9HYUtTWUN5bGxDaFVwS1hWbWZnVUtnQVNZWkx1RnJrd3V5VGFmODloQVY4YmVXVkNZaUxORDd1bDRwZHlMajlnZ0ZFSTdaYVNXSFRsX29uZndDNUZmRGs5VGI4aHp3NVBWanNWNU9pU2QweENpSlotbGdvTnQwaFRsYUZ5UUYyWnBxU0FrRm9SSWVnYlNxTVlpSDRGcE1IZWY2eEZFblpxSUpxeG0yc2VycWhRTWZfVURBYVotZ05Ra09qalptcHg1Y0NRTXpvdUpKcnNrVzBDNHFpZ25CQTdlWmZCQ01TYkIzREtPbjJQNEQxTDdIUnZ3TnZUVXpDS3RYWGlnUWk4dWpvWUc1SUdQMVNVS2dRMTZqMEgtc1hTZGFBR0RiRDFvNk1ocjNZNzhQV0NEd0toWkpmNkpxaXNZYWNEUXZuYWg0LWdhbGd6dDY4dzBoWncybDNKRmFUNnJNMjBsdWR5eHluZW1ldXJISUE1c0Rfb1d3YmZmemcxaHlKbDRQVjVORmNLZlZ3THBJNU9PbEFXRW00VTRDbl9sR3lZak15cDFRSTVieEVwRjR4NUg2dXI2WW1vQks0Uk1kMDBHdUowMUZ0cEVENFJ1akFiNUhIVVhseEp3TkMwanNrYVpMVW5kcGdIYnZqMVV5YnhZc055VnFRUjVvWjFqSHFkT0ZLckc5dmxnN25EZHpFekJoeTdndWtuV0xmb3duRnhlZVZyaGVSOEhzZDE5SW1lTHI3a0FOWkhEVjh1czdsZHV2bkNjWlFYaGZxSnBtcUozZEgwblhuWWZCalpEZV92eHpoUkYwbGc1SFhZanhybVNpYXI5dHBWV1hVWmJnRVE0Zkp5bllES0JLOVdWZjBxMnBveVpGRzA0Q3ZYeUpIeTZCaktzNXRIRTRZLV9EbE12OUI4NXN5OXFBb2N2d2N1d0UzbGRXbzdoZnBCN2lkekthaTlqN0lNV1E4YWE4RURFclNnUXpnVFdDZW12VGZPUlVPVXRtWnJZZGt0TWNpYXZibVFvd0Uwb3RxZ3ZQM211NHJkMUFjdHA4eWFGNDVTUlhtQkZuS1pWTkdMM2Z0dFZuR25QbXdLNU1qOFB6NWs4c2RqZ1I4akhLSjUydEdkQzV1TWE2RjVLb3FROUVGNEJKMWNLemhkSE1kRkRieVhLazJyaDN2UVY3a1FiRHZmMjh2ZnNWUFNqWHJXWUpXZ0hIUXlFdVItUzJIRExuVUtPa3BGbkwtUWhjcW5iWE51VHZtOUxRbEFJeEdoRUo1M0gzUW44S1RjODViUWxLeU5aa2RtOWxhRTAyemExRXJzYnQwU1E2ZGhIR1hRblFHUS1HSzFJcE0wT3loLVdWYmZidzNwN19GeTVlRnZ3S3duNzhxQWZtM2N6alQ4NUlacWJxb3dmb1VvS25rUVVlNEdJWmQtZ29LS0d0WTlFZDRxb3BqV1hOM1dYVHlYRWdmOGVuUXhqblhLeEM4MDdqWWhaeE0zWmVDNE01d1hyMzJZRmRPc3Z5SmtLb2FTampER3liblNaOFdHVHR4Mk1HM0hHR0NHdW5xWG9vOFZHRjQzemVteVU5RGtZQ3pmZm9qU09tc2pERkUyTW1LWTNYd04wdmdGSkExY0pjWjVySE8taVROZ1Bsa2h3eXNkek1GdDFoVEdFaEY2aERWQ2taQ2NpSEktNEdfVEJFZmJ3eTZJV0tPeHpETTlRejlRNV9lWGlVbUR0M2hBdXZyMkdHZDJNWEI4R29PWGhJekNKbl9IalA1QzlMclh5VFQ0TEQxSVh1UWRpSXJqNWJUTVFKX0oxeFlRQW1EaG9QVXhCdGlGSVRxaWJOcGk2V0lzMWF3VlhWUWRwcWlaMjVfRG8yRjQ5QnU5UHRuX3Z3SHR4REdGUlMzQTF6QUtYUlBjTlpCWHl1a1JjWGVCb2lHR2I0OHNVOXhBMUtnZlNSTDRUS1NOV0JjTTJtLUNPN0VnMDM1QldQUGU3ZGhEWE5CWl82VzJRMzVKcWlYd3FqZTBPUmNUY0FmR0NSTC1NZHFvWVYtaHd3UnQtdEtwbEdDMElXS1d1Yk5ldm43NzRQbGpqV2ZJMFR4ZEkzNkFKa1YzdzN2WlVfUDAwQlEuY0Y5bXk4cXZWMjRVV2JKcGZJRDVCQQ"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '5379' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f60fbc.vault.azure.net/secrets/restore?api-version=7.0 response: body: - string: '{"id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/8968fbea165844c6ba86c8774431bfd2","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/778d727d3bae4014a6285fdaad85736f","attributes":{"enabled":true,"created":1564528490,"updated":1564528490,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '202' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '202' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:14:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f60fbc.vault.azure.net + - /secrets/restore + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_deleted_secrets.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_deleted_secrets.yaml index e8638c8abf32..dba0b9685274 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_deleted_secrets.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_deleted_secrets.yaml @@ -1,625 +1,386 @@ interactions: - request: - body: '{"value": "secval99e4122d"}' + body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - - '27' + - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/4176712f5ccc49e69605dba983a4f344","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:17 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:15:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 200 - message: OK + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/bebb1fbf2bf34988b8e02c8ee5f925ad","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/093a7c0702ba41e2920961edf29252e1","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/2c24f5bc003541cca1fea12d2bd5f82b","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/1b12330c84764ba9a010e7cc65d06ea3","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/398ba2a5091d435ca4b7ac05058b509b","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/1c47984da2fd45ca960731c2d62031ab","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/b76683bd312a4f129eb83d59901cae55","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/354aa036d79d4ec9aacc5a0c762e8e88","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/ac1f506c933b41c3a5732247e2334429","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/c591ae13276d4e84848e59c8bda9db05","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/e99017ab4bc14aa6a8aabd4482f4b784","attributes":{"enabled":true,"created":1560538519,"updated":1560538519,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/6eec08471fbc443daa555c8b44a4ed6f","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: - body: null + body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - - '0' + - '27' + Content-Type: + - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: DELETE + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1560538519,"scheduledPurgeDate":1568314519,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/e99017ab4bc14aa6a8aabd4482f4b784","attributes":{"enabled":true,"created":1560538519,"updated":1560538519,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '348' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:19 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/fa8f25489fac47afa288a741ab227858","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 - response: - body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - sec99e4122d"}}' - headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:19 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 - response: - body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - sec99e4122d"}}' - headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 - response: - body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - sec99e4122d"}}' - headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: DELETE + uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - sec99e4122d"}}' - headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:28 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1564528528,"scheduledPurgeDate":1572304528,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/fa8f25489fac47afa288a741ab227858","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '348' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 404 - message: Not Found + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 response: @@ -627,48 +388,38 @@ interactions: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: sec99e4122d"}}' headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /deletedsecrets/sec99e4122d + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 response: @@ -676,131 +427,105 @@ interactions: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: sec99e4122d"}}' headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /deletedsecrets/sec99e4122d + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1560538519,"scheduledPurgeDate":1568314519,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/e99017ab4bc14aa6a8aabd4482f4b784","attributes":{"enabled":true,"created":1560538519,"updated":1560538519,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '348' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:38 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1564528528,"scheduledPurgeDate":1572304528,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/fa8f25489fac47afa288a741ab227858","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '348' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:34 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /deletedsecrets/sec99e4122d + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault99e4122d.vault.azure.net/deletedsecrets?api-version=7.0 response: body: - string: '{"value":[{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1560538519,"scheduledPurgeDate":1568314519,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d","attributes":{"enabled":true,"created":1560538519,"updated":1560538519,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' - headers: - cache-control: - - no-cache - content-length: - - '343' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:38 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":[{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1564528528,"scheduledPurgeDate":1572304528,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + headers: + cache-control: no-cache + content-length: '343' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:34 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /deletedsecrets + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_versions.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_versions.yaml index 0891a7d98254..f21aa267f8e2 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_versions.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_versions.yaml @@ -1,414 +1,377 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:16:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/01a1c421f99d4e11bd1faf3385a638ca","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/d14f229e00a0466588945a17f72f9ef4","attributes":{"enabled":true,"created":1564528588,"updated":1564528588,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/6df9785175c94931bb8f9f7bf54a43bf","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/62bd3e1ae4c943b0834475dcf0593813","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/5aaaf0401ced49dbb6b5376220eb6bd4","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/548690f3d6e448a4afa1946ddd2ad9a3","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/bdf0770f231b4f13bc5f6dabfb907e9c","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/6e93babb4bf34f64a3096fe587c1a874","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/194031008cdc435abc85946271e16fb9","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/8ef101e684de4189ae32349d68c7563c","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/416f926b2a2c415da3756c2cf9110302","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/877971b0463b4d4f8f0b3dd1c8ee74ab","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/ab4bd70148bf4d1984aa143b95d7f738","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/581cbd091a3646daa866c6c54732fed3","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/versions?api-version=7.0 response: body: - string: '{"value":[{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/01a1c421f99d4e11bd1faf3385a638ca","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/194031008cdc435abc85946271e16fb9","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/416f926b2a2c415da3756c2cf9110302","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/5aaaf0401ced49dbb6b5376220eb6bd4","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/6df9785175c94931bb8f9f7bf54a43bf","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/ab4bd70148bf4d1984aa143b95d7f738","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/bdf0770f231b4f13bc5f6dabfb907e9c","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}],"nextLink":null}' + string: '{"value":[{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/548690f3d6e448a4afa1946ddd2ad9a3","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/581cbd091a3646daa866c6c54732fed3","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/62bd3e1ae4c943b0834475dcf0593813","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/6e93babb4bf34f64a3096fe587c1a874","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/877971b0463b4d4f8f0b3dd1c8ee74ab","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/8ef101e684de4189ae32349d68c7563c","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/d14f229e00a0466588945a17f72f9ef4","attributes":{"enabled":true,"created":1564528588,"updated":1564528588,"recoveryLevel":"Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '1427' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:45 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '1427' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77/versions + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_purge.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_purge.yaml index c68d8212f97b..2a5134de0b12 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_purge.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_purge.yaml @@ -1,1618 +1,1264 @@ interactions: - request: - body: '{"value": "value0"}' + body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - - '19' + - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret0?api-version=7.0 response: body: - string: '{"value":"value0","id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/c31d65f64d5b40fa805f9e3eb67bde05","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:17:06 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' +- request: + body: '{"value": "value0"}' + headers: + Accept: + - application/json + Content-Length: + - '19' + Content-Type: - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vaultb5580c06.vault.azure.net/secrets/secret0?api-version=7.0 + response: + body: + string: '{"value":"value0","id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/8966cffcb88e467687e8634e8837df4e","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:06 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' - request: body: '{"value": "value1"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret1?api-version=7.0 response: body: - string: '{"value":"value1","id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/0cc8e9fc0e1642f6a1041ff4ad2c013e","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value1","id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/01a16d10e4834f40a9f50ee36ec02781","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret1 + - api-version=7.0 + - '' - request: body: '{"value": "value2"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret2?api-version=7.0 response: body: - string: '{"value":"value2","id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/de7fc9fd9f4448f081cb23de8ed7da0d","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value2","id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/3fff9d5c111a42b1bd1815f56ed4c797","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret2 + - api-version=7.0 + - '' - request: body: '{"value": "value3"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret3?api-version=7.0 response: body: - string: '{"value":"value3","id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/47e941e1cdbd4a558231536fff8e05ab","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value3","id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/b4be0b4560154409a4ac6f740b272133","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret3 + - api-version=7.0 + - '' - request: body: '{"value": "value4"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret4?api-version=7.0 response: body: - string: '{"value":"value4","id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/333b17ecad69484f84a8dfd4b8d6b5f7","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value4","id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/eb62dde290ba42da9735cf34b575fcfd","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret4 + - api-version=7.0 + - '' - request: body: '{"value": "value5"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret5?api-version=7.0 response: body: - string: '{"value":"value5","id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/571e47d981d64ad0b5b35d692dd1fd29","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value5","id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/13d1a85f33f94d95afadf8cef91c3d17","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret5 + - api-version=7.0 + - '' - request: body: '{"value": "value6"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret6?api-version=7.0 response: body: - string: '{"value":"value6","id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/d2ff1a7f7fd14e989fdb7ebbac87d7ff","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value6","id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/b7804c43991a414ba965299128f66458","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/333b17ecad69484f84a8dfd4b8d6b5f7","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/8966cffcb88e467687e8634e8837df4e","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret3?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/47e941e1cdbd4a558231536fff8e05ab","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/01a16d10e4834f40a9f50ee36ec02781","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret5?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/571e47d981d64ad0b5b35d692dd1fd29","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/3fff9d5c111a42b1bd1815f56ed4c797","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret0?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/c31d65f64d5b40fa805f9e3eb67bde05","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/b4be0b4560154409a4ac6f740b272133","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:08 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret6?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/d2ff1a7f7fd14e989fdb7ebbac87d7ff","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/eb62dde290ba42da9735cf34b575fcfd","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:08 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret1?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/0cc8e9fc0e1642f6a1041ff4ad2c013e","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/13d1a85f33f94d95afadf8cef91c3d17","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:08 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret2?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/de7fc9fd9f4448f081cb23de8ed7da0d","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528629,"scheduledPurgeDate":1572304629,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/b7804c43991a414ba965299128f66458","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:08 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 - response: - body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret4"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret4"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:08 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret4"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret4"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/333b17ecad69484f84a8dfd4b8d6b5f7","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/8966cffcb88e467687e8634e8837df4e","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/47e941e1cdbd4a558231536fff8e05ab","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/01a16d10e4834f40a9f50ee36ec02781","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/571e47d981d64ad0b5b35d692dd1fd29","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/3fff9d5c111a42b1bd1815f56ed4c797","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/c31d65f64d5b40fa805f9e3eb67bde05","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/b4be0b4560154409a4ac6f740b272133","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/d2ff1a7f7fd14e989fdb7ebbac87d7ff","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/eb62dde290ba42da9735cf34b575fcfd","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/0cc8e9fc0e1642f6a1041ff4ad2c013e","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/13d1a85f33f94d95afadf8cef91c3d17","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/de7fc9fd9f4448f081cb23de8ed7da0d","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528629,"scheduledPurgeDate":1572304629,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/b7804c43991a414ba965299128f66458","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultb5580c06.vault.azure.net/deletedsecrets?api-version=7.0 response: body: - string: '{"value":[{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' - headers: - cache-control: - - no-cache - content-length: - - '2183' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":[{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528629,"scheduledPurgeDate":1572304629,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + headers: + cache-control: no-cache + content-length: '2183' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret1 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret2 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret3 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret4 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret5 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:38 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret6 + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_recover.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_recover.yaml index 57e1f8288b5f..aee5c8738d11 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_recover.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_recover.yaml @@ -1,2320 +1,1826 @@ interactions: - request: - body: '{"value": "value0"}' + body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - - '19' + - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret0?api-version=7.0 response: body: - string: '{"value":"value0","id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/fa36e67096af4f899772f9950aaa0f72","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' +- request: + body: '{"value": "value0"}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: + Accept: + - application/json + Content-Length: + - '19' + Content-Type: - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0?api-version=7.0 + response: + body: + string: '{"value":"value0","id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/d1f164c23b8d4dd99f17bb50e84c5d1f","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' - request: body: '{"value": "value1"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret1?api-version=7.0 response: body: - string: '{"value":"value1","id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/fbb5f0622390490dbb7848336086f4cc","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value1","id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/07653aa977ab498f8cae0d495ecda5f3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret1 + - api-version=7.0 + - '' - request: body: '{"value": "value2"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret2?api-version=7.0 response: body: - string: '{"value":"value2","id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/f3332fded0d54da6b5a61a96aab2a3d7","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value2","id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/9a46000095e543a6b265060a97979e76","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret2 + - api-version=7.0 + - '' - request: body: '{"value": "value3"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret3?api-version=7.0 response: body: - string: '{"value":"value3","id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/23599f329eb74f91b52de1268affa7a2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value3","id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/a9a6431ed3af4764a21358fe1670f659","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret3 + - api-version=7.0 + - '' - request: body: '{"value": "value4"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret4?api-version=7.0 response: body: - string: '{"value":"value4","id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/41dcbf735cd546e98fd732857184ee41","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value4","id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/5519e4d02b96446c920e66b494eef218","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret4 + - api-version=7.0 + - '' - request: body: '{"value": "value5"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret5?api-version=7.0 response: body: - string: '{"value":"value5","id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/aa198d7afe694c34acc709384cbe2d77","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value5","id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/1d21e63d093447d48133cf4350e1b5bc","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret5 + - api-version=7.0 + - '' - request: body: '{"value": "value6"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret6?api-version=7.0 response: body: - string: '{"value":"value6","id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/a8b0b304c73441f4a9c609f10edaf8c9","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value6","id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/04d8d9d3f519485683412facb79f3240","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/f3332fded0d54da6b5a61a96aab2a3d7","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/d1f164c23b8d4dd99f17bb50e84c5d1f","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret3?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/23599f329eb74f91b52de1268affa7a2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/07653aa977ab498f8cae0d495ecda5f3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret1?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/fbb5f0622390490dbb7848336086f4cc","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/9a46000095e543a6b265060a97979e76","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret0?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/fa36e67096af4f899772f9950aaa0f72","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/a9a6431ed3af4764a21358fe1670f659","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret5?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/aa198d7afe694c34acc709384cbe2d77","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/5519e4d02b96446c920e66b494eef218","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret6?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/a8b0b304c73441f4a9c609f10edaf8c9","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/1d21e63d093447d48133cf4350e1b5bc","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret4?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/41dcbf735cd546e98fd732857184ee41","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/04d8d9d3f519485683412facb79f3240","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:13 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 - response: - body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:05 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:13 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:09 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:16 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:12 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:20 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:15 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/f3332fded0d54da6b5a61a96aab2a3d7","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/d1f164c23b8d4dd99f17bb50e84c5d1f","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/23599f329eb74f91b52de1268affa7a2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/07653aa977ab498f8cae0d495ecda5f3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/fbb5f0622390490dbb7848336086f4cc","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/9a46000095e543a6b265060a97979e76","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/fa36e67096af4f899772f9950aaa0f72","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/a9a6431ed3af4764a21358fe1670f659","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/aa198d7afe694c34acc709384cbe2d77","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/5519e4d02b96446c920e66b494eef218","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/a8b0b304c73441f4a9c609f10edaf8c9","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/1d21e63d093447d48133cf4350e1b5bc","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/41dcbf735cd546e98fd732857184ee41","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/04d8d9d3f519485683412facb79f3240","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultce560cd9.vault.azure.net/deletedsecrets?api-version=7.0 response: body: - string: '{"value":[{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' - headers: - cache-control: - - no-cache - content-length: - - '2183' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":[{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + headers: + cache-control: no-cache + content-length: '2183' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/f3332fded0d54da6b5a61a96aab2a3d7","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/d1f164c23b8d4dd99f17bb50e84c5d1f","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/23599f329eb74f91b52de1268affa7a2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/07653aa977ab498f8cae0d495ecda5f3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret1/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/fbb5f0622390490dbb7848336086f4cc","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/9a46000095e543a6b265060a97979e76","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret2/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/fa36e67096af4f899772f9950aaa0f72","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/a9a6431ed3af4764a21358fe1670f659","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret3/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/aa198d7afe694c34acc709384cbe2d77","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/5519e4d02b96446c920e66b494eef218","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret4/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/a8b0b304c73441f4a9c609f10edaf8c9","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/1d21e63d093447d48133cf4350e1b5bc","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret5/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/41dcbf735cd546e98fd732857184ee41","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/04d8d9d3f519485683412facb79f3240","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret6/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '73' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret0"}}' + headers: + cache-control: no-cache + content-length: '73' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '73' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:26 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret0"}}' + headers: + cache-control: no-cache + content-length: '73' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:33 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '73' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret0"}}' + headers: + cache-control: no-cache + content-length: '73' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:36 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '73' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret0"}}' + headers: + cache-control: no-cache + content-length: '73' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:39 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '73' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret0"}}' + headers: + cache-control: no-cache + content-length: '73' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"value":"value2","id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/f3332fded0d54da6b5a61a96aab2a3d7","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value0","id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/d1f164c23b8d4dd99f17bb50e84c5d1f","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret3/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret1/?api-version=7.0 response: body: - string: '{"value":"value3","id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/23599f329eb74f91b52de1268affa7a2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value1","id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/07653aa977ab498f8cae0d495ecda5f3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret1/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret1/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 response: body: - string: '{"value":"value1","id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/fbb5f0622390490dbb7848336086f4cc","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value2","id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/9a46000095e543a6b265060a97979e76","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret2/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret3/?api-version=7.0 response: body: - string: '{"value":"value0","id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/fa36e67096af4f899772f9950aaa0f72","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value3","id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/a9a6431ed3af4764a21358fe1670f659","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret3/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret5/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret4/?api-version=7.0 response: body: - string: '{"value":"value5","id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/aa198d7afe694c34acc709384cbe2d77","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value4","id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/5519e4d02b96446c920e66b494eef218","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret4/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret6/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret5/?api-version=7.0 response: body: - string: '{"value":"value6","id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/a8b0b304c73441f4a9c609f10edaf8c9","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value5","id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/1d21e63d093447d48133cf4350e1b5bc","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret5/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret4/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret6/?api-version=7.0 response: body: - string: '{"value":"value4","id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/41dcbf735cd546e98fd732857184ee41","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value6","id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/04d8d9d3f519485683412facb79f3240","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret6/ + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_crud_operations.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_crud_operations.yaml index 5267d8020874..5d9a0991c11a 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_crud_operations.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_crud_operations.yaml @@ -1,359 +1,330 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:19:38 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret + - api-version=7.0 + - '' - request: body: '{"value": "crud_secret_valuec01d1319"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '38' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret?api-version=7.0 response: body: - string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/177427fb4ac34d35be6430082742ca9d","attributes":{"enabled":true,"created":1560296924,"updated":1560296924,"recoveryLevel":"Purgeable"}}' + string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/eeecb8113ad344299d57e9d44eb3694c","attributes":{"enabled":true,"created":1564528779,"updated":1564528779,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '235' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:44 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '235' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:38 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret + - api-version=7.0 + - '' - request: - body: '{"value": "crud_secret_valuec01d1319", "attributes": {"enabled": true, - "nbf": 1422864000}, "tags": {"foo": "created tag"}}' + body: '{"value": "crud_secret_valuec01d1319", "tags": {"foo": "created tag"}, + "attributes": {"enabled": true, "nbf": 1422864000}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '122' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret?api-version=7.0 response: body: - string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd","attributes":{"enabled":true,"nbf":1422864000,"created":1560296924,"updated":1560296924,"recoveryLevel":"Purgeable"},"tags":{"foo":"created + string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27","attributes":{"enabled":true,"nbf":1422864000,"created":1564528779,"updated":1564528779,"recoveryLevel":"Purgeable"},"tags":{"foo":"created tag"}}' headers: - cache-control: - - no-cache - content-length: - - '281' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:44 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '281' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:38 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/?api-version=7.0 response: body: - string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd","attributes":{"enabled":true,"nbf":1422864000,"created":1560296924,"updated":1560296924,"recoveryLevel":"Purgeable"},"tags":{"foo":"created + string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27","attributes":{"enabled":true,"nbf":1422864000,"created":1564528779,"updated":1564528779,"recoveryLevel":"Purgeable"},"tags":{"foo":"created tag"}}' headers: - cache-control: - - no-cache - content-length: - - '281' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:44 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '281' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:38 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd?api-version=7.0 + uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27?api-version=7.0 response: body: - string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd","attributes":{"enabled":true,"nbf":1422864000,"created":1560296924,"updated":1560296924,"recoveryLevel":"Purgeable"},"tags":{"foo":"created + string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27","attributes":{"enabled":true,"nbf":1422864000,"created":1564528779,"updated":1564528779,"recoveryLevel":"Purgeable"},"tags":{"foo":"created tag"}}' headers: - cache-control: - - no-cache - content-length: - - '281' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:44 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '281' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:39 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret/f75b715b3c51403198b5cbd26287da27 + - api-version=7.0 + - '' - request: - body: '{"attributes": {"exp": 2527401600, "enabled": false}, "contentType": "text/plain", + body: '{"contentType": "text/plain", "attributes": {"enabled": false, "exp": 2527401600}, "tags": {"foo": "updated tag"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '114' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PATCH - uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd?api-version=7.0 + uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27?api-version=7.0 response: body: - string: '{"contentType":"text/plain","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd","attributes":{"enabled":false,"nbf":1422864000,"exp":2527401600,"created":1560296924,"updated":1560296926,"recoveryLevel":"Purgeable"},"tags":{"foo":"updated + string: '{"contentType":"text/plain","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27","attributes":{"enabled":false,"nbf":1422864000,"exp":2527401600,"created":1564528779,"updated":1564528780,"recoveryLevel":"Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '290' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:45 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '290' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:40 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret/f75b715b3c51403198b5cbd26287da27 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret?api-version=7.0 response: body: - string: '{"contentType":"text/plain","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd","attributes":{"enabled":false,"nbf":1422864000,"exp":2527401600,"created":1560296924,"updated":1560296926,"recoveryLevel":"Purgeable"},"tags":{"foo":"updated + string: '{"contentType":"text/plain","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27","attributes":{"enabled":false,"nbf":1422864000,"exp":2527401600,"created":1564528779,"updated":1564528780,"recoveryLevel":"Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '290' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:45 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '290' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:40 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Secret not found: crud-secret"}}' headers: - cache-control: - - no-cache - content-length: - - '77' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:46 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '77' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:40 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret/ + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_list.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_list.yaml index 35c4ed11f967..96d5382039a5 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_list.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_list.yaml @@ -1,414 +1,377 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault5b50e84.vault.azure.net/secrets/sec0?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec0 + - api-version=7.0 + - '' - request: body: '{"value": "secVal05b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec0?api-version=7.0 response: body: - string: '{"value":"secVal05b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec0/bfaad709fbaa4d57ae07facbff500795","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal05b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec0/7f3cb1f832414f19a13156842b138e4f","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec0 + - api-version=7.0 + - '' - request: body: '{"value": "secVal15b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec1?api-version=7.0 response: body: - string: '{"value":"secVal15b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec1/392da3f3b4b44b71aefb2e9ffdba9321","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal15b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec1/b11f6d6c11ec4c84b08b9b759540bf96","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec1 + - api-version=7.0 + - '' - request: body: '{"value": "secVal25b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec2?api-version=7.0 response: body: - string: '{"value":"secVal25b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec2/59fa973224914f6fb53d37c20f2e87e6","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal25b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec2/f50f507c68ff48e593f32de9f03de503","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec2 + - api-version=7.0 + - '' - request: body: '{"value": "secVal35b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec3?api-version=7.0 response: body: - string: '{"value":"secVal35b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec3/050564bf189641819bc88c0d70d31ee6","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal35b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec3/699ddadf328143de8c19b32677a5b3ac","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec3 + - api-version=7.0 + - '' - request: body: '{"value": "secVal45b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec4?api-version=7.0 response: body: - string: '{"value":"secVal45b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec4/aae71679bf754b668f14bcd9bd9fe2f9","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal45b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec4/b57c587071b4448a89ecac767c62435f","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec4 + - api-version=7.0 + - '' - request: body: '{"value": "secVal55b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec5?api-version=7.0 response: body: - string: '{"value":"secVal55b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec5/48cf92ab65f340f6a98002ebf0ca4dcd","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal55b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec5/ea4090f7b0294803b170516bc009cc16","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec5 + - api-version=7.0 + - '' - request: body: '{"value": "secVal65b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec6?api-version=7.0 response: body: - string: '{"value":"secVal65b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec6/53fcee1dc3ac4805940914670cc50199","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal65b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec6/2eb7ddee8282440fb1cf9d0b37517c41","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault5b50e84.vault.azure.net/secrets?api-version=7.0 response: body: - string: '{"value":[{"id":"https://vault5b50e84.vault.azure.net/secrets/sec0","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec1","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec2","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec3","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec4","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec5","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec6","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}}],"nextLink":null}' + string: '{"value":[{"id":"https://vault5b50e84.vault.azure.net/secrets/sec0","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec1","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec2","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec3","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec4","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec5","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec6","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '1140' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '1140' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/secrets_async_preparer.py b/sdk/keyvault/azure-keyvault-secrets/tests/secrets_async_preparer.py index 6472b3d3308d..da13fcdc54c8 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/secrets_async_preparer.py +++ b/sdk/keyvault/azure-keyvault-secrets/tests/secrets_async_preparer.py @@ -6,17 +6,31 @@ from unittest.mock import Mock from azure.core.credentials import AccessToken +from azure.core.pipeline.transport import AioHttpTransport from azure.identity.aio import EnvironmentCredential +from multidict import CIMultiDict, CIMultiDictProxy + from secrets_preparer import VaultClientPreparer from secrets_vault_client_async import VaultClient +class AiohttpTestTransport(AioHttpTransport): + """Workaround to vcrpy bug: https://github.com/kevin1024/vcrpy/pull/461 + """ + async def send(self, request, **config): + response = await super(AiohttpTestTransport, self).send(request, **config) + if not isinstance(response.headers, CIMultiDictProxy): + response.headers = CIMultiDictProxy(CIMultiDict(response.internal_response.headers)) + response.content_type = response.headers.get("content-type") + return response + + class AsyncVaultClientPreparer(VaultClientPreparer): def create_vault_client(self, vault_uri): if self.is_live: credential = EnvironmentCredential() else: credential = Mock(get_token=asyncio.coroutine(lambda _: AccessToken("fake-token", 0))) - return VaultClient(vault_uri, credential) + return VaultClient(vault_uri, credential, transport=AiohttpTestTransport()) From 019a82e92e3a689aec4f10a6b2ba1555943c61cd Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 31 Jul 2019 01:19:55 -0700 Subject: [PATCH 050/244] [AutoPR hanaonazure/resource-manager] Removing monitoring hana instance API (#6535) * Generated from 70b51057c4cca0cdb6a743b4e02f39c132121570 Removing monitoring hana instance API * Generated from a6757c439ed37f69147b6a7b50a20f1ca69789be Removing monitoring hana instance API * Packaging update of azure-mgmt-hanaonazure * Updated Release History --- .../azure-mgmt-hanaonazure/HISTORY.rst | 12 +++ .../azure-mgmt-hanaonazure/README.rst | 2 +- .../azure/mgmt/hanaonazure/models/_models.py | 10 +++ .../mgmt/hanaonazure/models/_models_py3.py | 12 ++- .../operations/_hana_instances_operations.py | 89 ------------------- .../azure/mgmt/hanaonazure/version.py | 2 +- .../azure-mgmt-hanaonazure/setup.py | 1 - 7 files changed, 35 insertions(+), 93 deletions(-) diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/HISTORY.rst b/sdk/hanaonazure/azure-mgmt-hanaonazure/HISTORY.rst index b99767ae2a90..cdda9582b52b 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/HISTORY.rst +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/HISTORY.rst @@ -3,6 +3,18 @@ Release History =============== +0.9.0 (2019-07-31) +++++++++++++++++++ + +**Features** + +- Model SapMonitor has a new parameter hana_db_credentials_msi_id +- Model SapMonitor has a new parameter hana_db_password_key_vault_url + +**Breaking changes** + +- Removed operation HanaInstancesOperations.enable_monitoring + 0.8.0 (2019-06-26) ++++++++++++++++++ diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/README.rst b/sdk/hanaonazure/azure-mgmt-hanaonazure/README.rst index 3751f89d5670..1c9ad134cc31 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/README.rst +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure SAP Hana on Azure Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models.py index d9c93b5d62d8..2643e4c67737 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models.py @@ -489,6 +489,12 @@ class SapMonitor(Resource): :type hana_db_username: str :param hana_db_password: Database password of the HANA instance. :type hana_db_password: str + :param hana_db_password_key_vault_url: KeyVault URL link to the password + for the HANA database. + :type hana_db_password_key_vault_url: str + :param hana_db_credentials_msi_id: MSI ID passed by customer which has + access to customer's KeyVault and to be assigned to the Collector VM. + :type hana_db_credentials_msi_id: str :ivar provisioning_state: State of provisioning of the HanaInstance. Possible values include: 'Accepted', 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', 'Migrating' @@ -516,6 +522,8 @@ class SapMonitor(Resource): 'hana_db_sql_port': {'key': 'properties.hanaDbSqlPort', 'type': 'int'}, 'hana_db_username': {'key': 'properties.hanaDbUsername', 'type': 'str'}, 'hana_db_password': {'key': 'properties.hanaDbPassword', 'type': 'str'}, + 'hana_db_password_key_vault_url': {'key': 'properties.hanaDbPasswordKeyVaultUrl', 'type': 'str'}, + 'hana_db_credentials_msi_id': {'key': 'properties.hanaDbCredentialsMsiId', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } @@ -527,6 +535,8 @@ def __init__(self, **kwargs): self.hana_db_sql_port = kwargs.get('hana_db_sql_port', None) self.hana_db_username = kwargs.get('hana_db_username', None) self.hana_db_password = kwargs.get('hana_db_password', None) + self.hana_db_password_key_vault_url = kwargs.get('hana_db_password_key_vault_url', None) + self.hana_db_credentials_msi_id = kwargs.get('hana_db_credentials_msi_id', None) self.provisioning_state = None diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models_py3.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models_py3.py index dece72c8661c..9f6950525157 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models_py3.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models_py3.py @@ -489,6 +489,12 @@ class SapMonitor(Resource): :type hana_db_username: str :param hana_db_password: Database password of the HANA instance. :type hana_db_password: str + :param hana_db_password_key_vault_url: KeyVault URL link to the password + for the HANA database. + :type hana_db_password_key_vault_url: str + :param hana_db_credentials_msi_id: MSI ID passed by customer which has + access to customer's KeyVault and to be assigned to the Collector VM. + :type hana_db_credentials_msi_id: str :ivar provisioning_state: State of provisioning of the HanaInstance. Possible values include: 'Accepted', 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', 'Migrating' @@ -516,10 +522,12 @@ class SapMonitor(Resource): 'hana_db_sql_port': {'key': 'properties.hanaDbSqlPort', 'type': 'int'}, 'hana_db_username': {'key': 'properties.hanaDbUsername', 'type': 'str'}, 'hana_db_password': {'key': 'properties.hanaDbPassword', 'type': 'str'}, + 'hana_db_password_key_vault_url': {'key': 'properties.hanaDbPasswordKeyVaultUrl', 'type': 'str'}, + 'hana_db_credentials_msi_id': {'key': 'properties.hanaDbCredentialsMsiId', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, *, location: str=None, hana_subnet: str=None, hana_hostname: str=None, hana_db_name: str=None, hana_db_sql_port: int=None, hana_db_username: str=None, hana_db_password: str=None, **kwargs) -> None: + def __init__(self, *, location: str=None, hana_subnet: str=None, hana_hostname: str=None, hana_db_name: str=None, hana_db_sql_port: int=None, hana_db_username: str=None, hana_db_password: str=None, hana_db_password_key_vault_url: str=None, hana_db_credentials_msi_id: str=None, **kwargs) -> None: super(SapMonitor, self).__init__(location=location, **kwargs) self.hana_subnet = hana_subnet self.hana_hostname = hana_hostname @@ -527,6 +535,8 @@ def __init__(self, *, location: str=None, hana_subnet: str=None, hana_hostname: self.hana_db_sql_port = hana_db_sql_port self.hana_db_username = hana_db_username self.hana_db_password = hana_db_password + self.hana_db_password_key_vault_url = hana_db_password_key_vault_url + self.hana_db_credentials_msi_id = hana_db_credentials_msi_id self.provisioning_state = None diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_hana_instances_operations.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_hana_instances_operations.py index b4932fa45b64..2165693784cd 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_hana_instances_operations.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_hana_instances_operations.py @@ -11,7 +11,6 @@ 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 @@ -737,91 +736,3 @@ def get_long_running_output(response): else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) shutdown.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}/shutdown'} - - - def _enable_monitoring_initial( - self, resource_group_name, hana_instance_name, monitoring_parameter, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.enable_monitoring.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'), - 'hanaInstanceName': self._serialize.url("hana_instance_name", hana_instance_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['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_parameter, 'MonitoringDetails') - - # 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def enable_monitoring( - self, resource_group_name, hana_instance_name, monitoring_parameter, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to add a monitor to an SAP HANA instance. - - :param resource_group_name: Name of the resource group. - :type resource_group_name: str - :param hana_instance_name: Name of the SAP HANA on Azure instance. - :type hana_instance_name: str - :param monitoring_parameter: Request body that only contains - monitoring attributes - :type monitoring_parameter: - ~azure.mgmt.hanaonazure.models.MonitoringDetails - :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._enable_monitoring_initial( - resource_group_name=resource_group_name, - hana_instance_name=hana_instance_name, - monitoring_parameter=monitoring_parameter, - 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) - enable_monitoring.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}/monitoring'} diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py index e4f3d5055303..3697d9b71739 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.8.0" +VERSION = "0.9.0" diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/setup.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/setup.py index d88dbac05eaf..57c68ff652aa 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/setup.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/setup.py @@ -64,7 +64,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', From 00faa90e3fdb75e30d65700c5952f5b158aa9030 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 10:27:22 -0700 Subject: [PATCH 051/244] KV moved paging return type to ItemPaged (#6558) * KV with latest autorest * Make KV return ItemPaged from azure-core --- .../azure/keyvault/keys/_client.py | 25 +++++-- .../azure/keyvault/keys/_shared/__init__.py | 4 +- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_generated/v2016_10_01/models/_models.py | 8 --- .../v2016_10_01/models/_models_py3.py | 8 --- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_shared/_generated/v7_0/models/_models.py | 8 --- .../_generated/v7_0/models/_models_py3.py | 8 --- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../keys/_shared/async_client_base.py | 19 ----- .../azure/keyvault/keys/aio/_client.py | 30 +++++--- .../azure/keyvault/secrets/_client.py | 25 +++++-- .../keyvault/secrets/_shared/__init__.py | 4 +- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_generated/v2016_10_01/models/_models.py | 8 --- .../v2016_10_01/models/_models_py3.py | 8 --- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_shared/_generated/v7_0/models/_models.py | 8 --- .../_generated/v7_0/models/_models_py3.py | 8 --- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../secrets/_shared/async_client_base.py | 19 ----- .../azure/keyvault/secrets/aio/_client.py | 30 +++++--- 24 files changed, 498 insertions(+), 242 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py index ee0e81d07f73..b591ffdcaf0f 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py @@ -353,8 +353,12 @@ def list_deleted_keys(self, **kwargs): :dedent: 8 """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_deleted_keys(self._vault_url, maxresults=max_page_size, **kwargs) - return (DeletedKey._from_deleted_key_item(item) for item in pages) + return self._client.get_deleted_keys( + self._vault_url, + maxresults=max_page_size, + cls=lambda objs: [DeletedKey._from_deleted_key_item(x) for x in objs], + **kwargs + ) @distributed_trace def list_keys(self, **kwargs): @@ -381,8 +385,12 @@ def list_keys(self, **kwargs): :dedent: 8 """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_keys(self._vault_url, maxresults=max_page_size, **kwargs) - return (KeyBase._from_key_item(item) for item in pages) + return self._client.get_keys( + self._vault_url, + maxresults=max_page_size, + cls=lambda objs: [KeyBase._from_key_item(x) for x in objs], + **kwargs + ) @distributed_trace def list_key_versions(self, name, **kwargs): @@ -407,8 +415,13 @@ def list_key_versions(self, name, **kwargs): :dedent: 8 """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_key_versions(self._vault_url, name, maxresults=max_page_size, **kwargs) - return (KeyBase._from_key_item(item) for item in pages) + return self._client.get_key_versions( + self._vault_url, + name, + maxresults=max_page_size, + cls=lambda objs: [KeyBase._from_key_item(x) for x in objs], + **kwargs + ) @distributed_trace def purge_deleted_key(self, name, **kwargs): diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py index beb24c202495..72fb27441900 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py @@ -49,8 +49,8 @@ def parse_vault_id(url): try: from .async_challenge_auth_policy import AsyncChallengeAuthPolicy - from .async_client_base import AsyncKeyVaultClientBase, AsyncPagingAdapter + from .async_client_base import AsyncKeyVaultClientBase - __all__.extend(["AsyncChallengeAuthPolicy", "AsyncKeyVaultClientBase", "AsyncPagingAdapter"]) + __all__.extend(["AsyncChallengeAuthPolicy", "AsyncKeyVaultClientBase"]) except (SyntaxError, ImportError): pass diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py index e918a167f2dd..d1b025916b46 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py @@ -692,14 +692,6 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py index 07d530b486f6..94ec3b96083e 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py @@ -692,14 +692,6 @@ def __init__(self, *, certificate_policy=None, certificate_attributes=None, tags self.tags = tags -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py index 24dfe4beb6a9..8b8ed5a83d62 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py @@ -753,14 +753,6 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py index 52f4aa981815..59e6f039d4b6 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py @@ -753,14 +753,6 @@ def __init__(self, *, certificate_policy=None, certificate_attributes=None, tags self.tags = tags -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py index 51f916d2938f..28bccc61f053 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py @@ -9,7 +9,7 @@ from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.keyvault.keys._models import Key, DeletedKey, KeyBase, KeyOperationResult -from azure.keyvault.keys._shared import AsyncKeyVaultClientBase, AsyncPagingAdapter +from azure.keyvault.keys._shared import AsyncKeyVaultClientBase class KeyClient(AsyncKeyVaultClientBase): @@ -354,9 +354,12 @@ def list_keys(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[KeyBase]: :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_keys(self.vault_url, maxresults=max_results, **kwargs) - iterable = AsyncPagingAdapter(pages, KeyBase._from_key_item) - return iterable + return self._client.get_keys( + self.vault_url, + maxresults=max_results, + cls=lambda objs: [KeyBase._from_key_item(x) for x in objs], + **kwargs + ) @distributed_trace def list_key_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncIterable[KeyBase]: @@ -380,9 +383,13 @@ def list_key_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncIter :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_key_versions(self.vault_url, name, maxresults=max_results, **kwargs) - iterable = AsyncPagingAdapter(pages, KeyBase._from_key_item) - return iterable + return self._client.get_key_versions( + self.vault_url, + name, + maxresults=max_results, + cls=lambda objs: [KeyBase._from_key_item(x) for x in objs], + **kwargs + ) @distributed_trace_async async def backup_key(self, name: str, **kwargs: Mapping[str, Any]) -> bytes: @@ -538,9 +545,12 @@ def list_deleted_keys(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[Delete :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_deleted_keys(self.vault_url, maxresults=max_results, **kwargs) - iterable = AsyncPagingAdapter(pages, DeletedKey._from_deleted_key_item) - return iterable + return self._client.get_deleted_keys( + self.vault_url, + maxresults=max_results, + cls=lambda objs: [DeletedKey._from_deleted_key_item(x) for x in objs], + **kwargs + ) @distributed_trace_async async def purge_deleted_key(self, name: str, **kwargs: Mapping[str, Any]) -> None: diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py index 1f0a670bf217..40678aabf7d4 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py @@ -179,8 +179,12 @@ def list_secrets(self, **kwargs): """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_secrets(self._vault_url, maxresults=max_page_size, **kwargs) - return (SecretAttributes._from_secret_item(item) for item in pages) + return self._client.get_secrets( + self._vault_url, + maxresults=max_page_size, + cls=lambda objs: [DeletedSecret._from_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace def list_secret_versions(self, name, **kwargs): @@ -206,8 +210,13 @@ def list_secret_versions(self, name, **kwargs): """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_secret_versions(self._vault_url, name, maxresults=max_page_size, **kwargs) - return (SecretAttributes._from_secret_item(item) for item in pages) + return self._client.get_secret_versions( + self._vault_url, + name, + maxresults=max_page_size, + cls=lambda objs: [DeletedSecret._from_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace def backup_secret(self, name, **kwargs): @@ -336,8 +345,12 @@ def list_deleted_secrets(self, **kwargs): """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_deleted_secrets(self._vault_url, maxresults=max_page_size, **kwargs) - return (DeletedSecret._from_deleted_secret_item(item) for item in pages) + return self._client.get_deleted_secrets( + self._vault_url, + maxresults=max_page_size, + cls=lambda objs: [DeletedSecret._from_deleted_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace def purge_deleted_secret(self, name, **kwargs): diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/__init__.py index beb24c202495..72fb27441900 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/__init__.py @@ -49,8 +49,8 @@ def parse_vault_id(url): try: from .async_challenge_auth_policy import AsyncChallengeAuthPolicy - from .async_client_base import AsyncKeyVaultClientBase, AsyncPagingAdapter + from .async_client_base import AsyncKeyVaultClientBase - __all__.extend(["AsyncChallengeAuthPolicy", "AsyncKeyVaultClientBase", "AsyncPagingAdapter"]) + __all__.extend(["AsyncChallengeAuthPolicy", "AsyncKeyVaultClientBase"]) except (SyntaxError, ImportError): pass diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py index e918a167f2dd..d1b025916b46 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py @@ -692,14 +692,6 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py index 07d530b486f6..94ec3b96083e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py @@ -692,14 +692,6 @@ def __init__(self, *, certificate_policy=None, certificate_attributes=None, tags self.tags = tags -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py index 24dfe4beb6a9..8b8ed5a83d62 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py @@ -753,14 +753,6 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py index 52f4aa981815..59e6f039d4b6 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py @@ -753,14 +753,6 @@ def __init__(self, *, certificate_policy=None, certificate_attributes=None, tags self.tags = tags -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py index 89a0fa98836e..9a4a92375ad9 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py @@ -10,7 +10,7 @@ from azure.core.tracing.decorator_async import distributed_trace_async from azure.keyvault.secrets._models import Secret, DeletedSecret, SecretAttributes -from .._shared import AsyncKeyVaultClientBase, AsyncPagingAdapter +from .._shared import AsyncKeyVaultClientBase class SecretClient(AsyncKeyVaultClientBase): @@ -182,9 +182,12 @@ def list_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[SecretAttri :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_secrets(self.vault_url, maxresults=max_results) - iterable = AsyncPagingAdapter(pages, SecretAttributes._from_secret_item) - return iterable + return self._client.get_secrets( + self.vault_url, + maxresults=max_results, + cls=lambda objs: [SecretAttributes._from_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace def list_secret_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncIterable[SecretAttributes]: @@ -208,9 +211,13 @@ def list_secret_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncI :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_secret_versions(self.vault_url, name, maxresults=max_results) - iterable = AsyncPagingAdapter(pages, SecretAttributes._from_secret_item) - return iterable + return self._client.get_secret_versions( + self.vault_url, + name, + maxresults=max_results, + cls=lambda objs: [SecretAttributes._from_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace_async async def backup_secret(self, name: str, **kwargs: Mapping[str, Any]) -> bytes: @@ -335,9 +342,12 @@ def list_deleted_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[Del :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_deleted_secrets(self.vault_url, maxresults=max_results, **kwargs) - iterable = AsyncPagingAdapter(pages, DeletedSecret._from_deleted_secret_item) - return iterable + return self._client.get_deleted_secrets( + self.vault_url, + maxresults=max_results, + cls=lambda objs: [DeletedSecret._from_deleted_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace_async async def purge_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> None: From f796dde00d4f855109f8ca46931dd4a57d507147 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 10:33:30 -0700 Subject: [PATCH 052/244] azure-core history 1.0.0b2 (#6562) * azure-core history * Update HISTORY.md --- sdk/core/azure-core/HISTORY.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/sdk/core/azure-core/HISTORY.md b/sdk/core/azure-core/HISTORY.md index b54129f9c2e0..2123f6308b80 100644 --- a/sdk/core/azure-core/HISTORY.md +++ b/sdk/core/azure-core/HISTORY.md @@ -3,6 +3,27 @@ ------------------- +2019-08-XX Version 1.0.0b2 + +## Breaking changes + +- Transport classes don't take `config` parameter anymore (use kwargs instead) #6372 +- `azure.core.paging` has been completely refactored #6420 +- HttpResponse.content_type attribute is now a string (was a list) #6490 +- For `StreamDownloadGenerator` subclasses, `response` is now an `HttpResponse`, and not a transport response like `aiohttp.ClientResponse` or `requests.Response`. The transport response is available in `internal_response` attribute #6490 + +## Bug fixes + +- aiohttp is not required to import async pipelines classes #6496 +- `AsyncioRequestsTransport.sleep` is now a coroutine as expected #6490 +- `RequestsTransport` is not tight to `ProxyPolicy` implementation details anymore #6372 +- `AiohttpTransport` does not raise on unexpected kwargs #6355 + +## Features + +- New paging base classes that support `continuation_token` and `by_page()` #6420 +- Proxy support for `AiohttpTransport` #6372 + 2019-06-26 Version 1.0.0b1 - Preview 1 release From 2223d4545b54671b7f7eb022cbc0dfff9ece29cb Mon Sep 17 00:00:00 2001 From: Bryan Van de Ven Date: Wed, 31 Jul 2019 11:28:59 -0700 Subject: [PATCH 053/244] Make private Cosmos modules private [WIP] (#6329) * make consistent_hash_ring private * make default_retry_policy private * make endpoint_discovery_retry_policy private * make hash_partition_resolver private * make location_cache private * make murmur_hash private * make range private * make range_partition_resolver private * make vector_session_token private * make resource_throttle_retry_policy private * make retry_utility private * make utils private * make routing private * make execution_context private * make cosmos_client_connection private * make retry_options private * make query_iterable private * make constants private * make synchronized_request private * make session_retry_policy private * make partition private * make global_endpoint_manager private * make runtime_constants private * make session private * make request_object private * make base private --- .../azure/cosmos/{base.py => _base.py} | 8 +- ..._hash_ring.py => _consistent_hash_ring.py} | 8 +- .../cosmos/{constants.py => _constants.py} | 0 ...ection.py => _cosmos_client_connection.py} | 48 ++++++------ ...try_policy.py => _default_retry_policy.py} | 4 +- ...py => _endpoint_discovery_retry_policy.py} | 6 +- .../__init__.py | 0 .../aggregators.py | 2 +- .../base_execution_context.py | 14 ++-- .../document_producer.py | 8 +- .../endpoint_component.py | 2 +- .../execution_dispatcher.py | 10 +-- .../multi_execution_aggregator.py | 8 +- .../query_execution_info.py | 0 ...manager.py => _global_endpoint_manager.py} | 4 +- ...esolver.py => _hash_partition_resolver.py} | 8 +- .../{location_cache.py => _location_cache.py} | 1 - .../{murmur_hash.py => _murmur_hash.py} | 2 +- .../cosmos/{partition.py => _partition.py} | 2 +- .../{query_iterable.py => _query_iterable.py} | 4 +- .../azure/cosmos/{range.py => _range.py} | 0 ...solver.py => _range_partition_resolver.py} | 0 .../{request_object.py => _request_object.py} | 2 +- ....py => _resource_throttle_retry_policy.py} | 2 +- .../{retry_options.py => _retry_options.py} | 0 .../{retry_utility.py => _retry_utility.py} | 24 +++--- .../cosmos/{routing => _routing}/__init__.py | 0 .../collection_routing_map.py | 34 ++++---- .../routing_map_provider.py | 42 +++++----- .../{routing => _routing}/routing_range.py | 12 +-- ...ime_constants.py => _runtime_constants.py} | 0 .../azure/cosmos/{session.py => _session.py} | 12 +-- ...try_policy.py => _session_retry_policy.py} | 0 ...ed_request.py => _synchronized_request.py} | 4 +- .../azure/cosmos/{utils.py => _utils.py} | 10 +-- ...sion_token.py => _vector_session_token.py} | 1 - .../azure-cosmos/azure/cosmos/container.py | 14 ++-- .../azure/cosmos/cosmos_client.py | 8 +- .../azure-cosmos/azure/cosmos/database.py | 12 +-- .../azure-cosmos/azure/cosmos/documents.py | 4 +- .../azure-cosmos/azure/cosmos/scripts.py | 16 ++-- sdk/cosmos/azure-cosmos/azure/cosmos/user.py | 6 +- .../MultiMasterOperations/ConflictWorker.py | 1 - .../MultiMasterScenario.py | 2 +- .../azure-cosmos/test/base_unit_tests.py | 2 +- sdk/cosmos/azure-cosmos/test/crud_tests.py | 52 ++++++------- .../azure-cosmos/test/globaldb_mock_tests.py | 18 ++--- .../azure-cosmos/test/globaldb_tests.py | 18 ++--- .../azure-cosmos/test/location_cache_tests.py | 24 +++--- .../azure-cosmos/test/multimaster_tests.py | 10 +-- sdk/cosmos/azure-cosmos/test/orderby_tests.py | 4 +- sdk/cosmos/azure-cosmos/test/proxy_tests.py | 2 +- .../test/query_execution_context_tests.py | 4 +- .../azure-cosmos/test/retry_policy_tests.py | 46 +++++------ .../routing/collection_routing_map_test.py | 34 ++++---- .../routing/routing_map_provider_tests.py | 78 +++++++++---------- .../azure-cosmos/test/routing_map_tests.py | 8 +- sdk/cosmos/azure-cosmos/test/session_tests.py | 16 ++-- .../test/session_token_unit_tests.py | 2 +- .../test/streaming_failover_test.py | 24 +++--- sdk/cosmos/azure-cosmos/test/utils_tests.py | 4 +- 61 files changed, 344 insertions(+), 347 deletions(-) rename sdk/cosmos/azure-cosmos/azure/cosmos/{base.py => _base.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{consistent_hash_ring.py => _consistent_hash_ring.py} (96%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{constants.py => _constants.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{cosmos_client_connection.py => _cosmos_client_connection.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{default_retry_policy.py => _default_retry_policy.py} (96%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{endpoint_discovery_retry_policy.py => _endpoint_discovery_retry_policy.py} (94%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/__init__.py (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/aggregators.py (97%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/base_execution_context.py (94%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/document_producer.py (97%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/endpoint_component.py (97%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/execution_dispatcher.py (94%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/multi_execution_aggregator.py (95%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/query_execution_info.py (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{global_endpoint_manager.py => _global_endpoint_manager.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{hash_partition_resolver.py => _hash_partition_resolver.py} (95%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{location_cache.py => _location_cache.py} (99%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{murmur_hash.py => _murmur_hash.py} (99%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{partition.py => _partition.py} (99%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{query_iterable.py => _query_iterable.py} (97%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{range.py => _range.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{range_partition_resolver.py => _range_partition_resolver.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{request_object.py => _request_object.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{resource_throttle_retry_policy.py => _resource_throttle_retry_policy.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{retry_options.py => _retry_options.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{retry_utility.py => _retry_utility.py} (83%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{routing => _routing}/__init__.py (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{routing => _routing}/collection_routing_map.py (79%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{routing => _routing}/routing_map_provider.py (80%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{routing => _routing}/routing_range.py (89%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{runtime_constants.py => _runtime_constants.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{session.py => _session.py} (95%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{session_retry_policy.py => _session_retry_policy.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{synchronized_request.py => _synchronized_request.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{utils.py => _utils.py} (86%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{vector_session_token.py => _vector_session_token.py} (99%) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/base.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_base.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/base.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_base.py index 5fa2839f0b0d..6e4bf3e10888 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/base.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_base.py @@ -33,8 +33,8 @@ from . import documents from . import partition_key from . import http_constants -from . import constants -from . import runtime_constants +from . import _constants as constants +from . import _runtime_constants import six from six.moves.urllib.parse import quote as urllib_quote @@ -178,10 +178,10 @@ def GetHeaders(cosmos_client_connection, if verb == 'post' or verb == 'put': if not headers.get(http_constants.HttpHeaders.ContentType): - headers[http_constants.HttpHeaders.ContentType] = runtime_constants.MediaTypes.Json + headers[http_constants.HttpHeaders.ContentType] = _runtime_constants.MediaTypes.Json if not headers.get(http_constants.HttpHeaders.Accept): - headers[http_constants.HttpHeaders.Accept] = runtime_constants.MediaTypes.Json + headers[http_constants.HttpHeaders.Accept] = _runtime_constants.MediaTypes.Json if partition_key_range_id is not None: headers[http_constants.HttpHeaders.PartitionKeyRangeID] = partition_key_range_id diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/consistent_hash_ring.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_consistent_hash_ring.py similarity index 96% rename from sdk/cosmos/azure-cosmos/azure/cosmos/consistent_hash_ring.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_consistent_hash_ring.py index 6b6bdd086b62..93198b3f1d72 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/consistent_hash_ring.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_consistent_hash_ring.py @@ -26,10 +26,10 @@ import six from six.moves import xrange -from . import partition +from . import _partition -class _ConsistentHashRing(object): +class ConsistentHashRing(object): """The ConsistentHashRing class implements a consistent hash ring using the hash generator specified. """ @@ -79,13 +79,13 @@ def _ConstructPartitions(self, collection_links, partitions_per_node): using the hashing algorithm and then finally sorting the partitions based on the hash value. """ collections_node_count = len(collection_links) - partitions = [partition._Partition() for _ in xrange(0, partitions_per_node * collections_node_count)] + partitions = [_partition.Partition() for _ in xrange(0, partitions_per_node * collections_node_count)] index = 0 for collection_node in collection_links: hash_value = self.hash_generator.ComputeHash(self._GetBytes(collection_node)) for _ in xrange(0, partitions_per_node): - partitions[index] = partition._Partition(hash_value, collection_node) + partitions[index] = _partition.Partition(hash_value, collection_node) index += 1 hash_value = self.hash_generator.ComputeHash(hash_value) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/constants.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_constants.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/constants.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_constants.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client_connection.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_client_connection.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client_connection.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_client_connection.py index f7b2fe1cca57..6f9fe50a1c86 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client_connection.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_client_connection.py @@ -25,18 +25,18 @@ import six from typing import cast -from . import base +from . import _base as base from . import documents -from . import constants +from . import _constants as constants from . import http_constants -from . import query_iterable -from . import runtime_constants -from . import request_object -from . import synchronized_request -from . import global_endpoint_manager -from .routing import routing_map_provider as routing_map_provider -from . import session -from . import utils +from . import _query_iterable as query_iterable +from . import _runtime_constants as runtime_constants +from . import _request_object +from . import _synchronized_request as synchronized_request +from . import _global_endpoint_manager as global_endpoint_manager +from ._routing import routing_map_provider as routing_map_provider +from . import _session +from . import _utils from .partition_key import _Undefined, _Empty @@ -110,7 +110,7 @@ def __init__(self, http_constants.HttpHeaders.Version: http_constants.Versions.CurrentVersion, http_constants.HttpHeaders.UserAgent: - utils._get_user_agent(), + _utils.get_user_agent(), # For single partition query with aggregate functions we would try to accumulate the results on the SDK. # We need to set continuation as not expected. http_constants.HttpHeaders.IsContinuationExpected: False @@ -127,7 +127,7 @@ def __init__(self, '''create a session - this is maintained only if the default consistency level on the client is set to session, or if the user explicitly sets it as a property via setter''' - self.session = session.Session(self.url_connection) + self.session = _session.Session(self.url_connection) else: self.session = None @@ -150,7 +150,7 @@ def __init__(self, self._query_compatibility_mode = CosmosClientConnection._QueryCompatibilityMode.Default # Routing map provider - self._routing_map_provider = routing_map_provider._SmartRoutingMapProvider(self) + self._routing_map_provider = routing_map_provider.SmartRoutingMapProvider(self) database_account = self._global_endpoint_manager._GetDatabaseAccount() self._global_endpoint_manager.force_refresh(database_account) @@ -1932,7 +1932,7 @@ def ReadMedia(self, media_link): {}) # ReadMedia will always use WriteEndpoint since it's not replicated in readable Geo regions - request = request_object._RequestObject('media', documents._OperationType.Read) + request = _request_object.RequestObject('media', documents._OperationType.Read) result, self.last_response_headers = self.__Get(path, request, headers) @@ -1981,7 +1981,7 @@ def UpdateMedia(self, media_link, readable_stream, options=None): options) # UpdateMedia will use WriteEndpoint since it uses PUT operation - request = request_object._RequestObject('media', documents._OperationType.Update) + request = _request_object.RequestObject('media', documents._OperationType.Update) result, self.last_response_headers = self.__Put(path, request, readable_stream, @@ -2200,7 +2200,7 @@ def ExecuteStoredProcedure(self, sproc_link, params, options=None): options) # ExecuteStoredProcedure will use WriteEndpoint since it uses POST operation - request = request_object._RequestObject('sprocs', documents._OperationType.ExecuteJavaScript) + request = _request_object.RequestObject('sprocs', documents._OperationType.ExecuteJavaScript) result, self.last_response_headers = self.__Post(path, request, params, @@ -2389,7 +2389,7 @@ def GetDatabaseAccount(self, url_connection=None): '', # type {}) - request = request_object._RequestObject('databaseaccount', documents._OperationType.Read, url_connection) + request = _request_object.RequestObject('databaseaccount', documents._OperationType.Read, url_connection) result, self.last_response_headers = self.__Get('', request, headers) @@ -2449,7 +2449,7 @@ def Create(self, body, path, type, id, initial_headers, options=None): options) # Create will use WriteEndpoint since it uses POST operation - request = request_object._RequestObject(type, documents._OperationType.Create) + request = _request_object.RequestObject(type, documents._OperationType.Create) result, self.last_response_headers = self.__Post(path, request, body, @@ -2491,7 +2491,7 @@ def Upsert(self, body, path, type, id, initial_headers, options=None): headers[http_constants.HttpHeaders.IsUpsert] = True # Upsert will use WriteEndpoint since it uses POST operation - request = request_object._RequestObject(type, documents._OperationType.Upsert) + request = _request_object.RequestObject(type, documents._OperationType.Upsert) result, self.last_response_headers = self.__Post(path, request, body, @@ -2529,7 +2529,7 @@ def Replace(self, resource, path, type, id, initial_headers, options=None): type, options) # Replace will use WriteEndpoint since it uses PUT operation - request = request_object._RequestObject(type, documents._OperationType.Replace) + request = _request_object.RequestObject(type, documents._OperationType.Replace) result, self.last_response_headers = self.__Put(path, request, resource, @@ -2567,7 +2567,7 @@ def Read(self, path, type, id, initial_headers, options=None): type, options) # Read will use ReadEndpoint since it uses GET operation - request = request_object._RequestObject(type, documents._OperationType.Read) + request = _request_object.RequestObject(type, documents._OperationType.Read) result, self.last_response_headers = self.__Get(path, request, headers) @@ -2601,7 +2601,7 @@ def DeleteResource(self, path, type, id, initial_headers, options=None): type, options) # Delete will use WriteEndpoint since it uses DELETE operation - request = request_object._RequestObject(type, documents._OperationType.Delete) + request = _request_object.RequestObject(type, documents._OperationType.Delete) result, self.last_response_headers = self.__Delete(path, request, headers) @@ -2783,7 +2783,7 @@ def __GetBodiesFromQueryResult(result): # Copy to make sure that default_headers won't be changed. if query is None: # Query operations will use ReadEndpoint even though it uses GET(for feed requests) - request = request_object._RequestObject(type, documents._OperationType.ReadFeed) + request = _request_object.RequestObject(type, documents._OperationType.ReadFeed) headers = base.GetHeaders(self, initial_headers, 'get', @@ -2811,7 +2811,7 @@ def __GetBodiesFromQueryResult(result): raise SystemError('Unexpected query compatibility mode.') # Query operations will use ReadEndpoint even though it uses POST(for regular query operations) - request = request_object._RequestObject(type, documents._OperationType.SqlQuery) + request = _request_object.RequestObject(type, documents._OperationType.SqlQuery) headers = base.GetHeaders(self, initial_headers, 'post', diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/default_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_default_retry_policy.py similarity index 96% rename from sdk/cosmos/azure-cosmos/azure/cosmos/default_retry_policy.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_default_retry_policy.py index 1fc309c98302..8cb094c1552a 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/default_retry_policy.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_default_retry_policy.py @@ -23,7 +23,7 @@ """ from . import http_constants -class _DefaultRetryPolicy(object): +class DefaultRetryPolicy(object): error_codes = http_constants._ErrorCodes CONNECTION_ERROR_CODES = [ @@ -52,7 +52,7 @@ def __init__(self, *args): self.args = args def needsRetry(self, error_code): - if error_code in _DefaultRetryPolicy.CONNECTION_ERROR_CODES: + if error_code in DefaultRetryPolicy.CONNECTION_ERROR_CODES: if (len(self.args) > 0): if (self.args[4]['method'] == 'GET') or (http_constants.HttpHeaders.IsQuery in self.args[4]['headers']): return True diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/endpoint_discovery_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_endpoint_discovery_retry_policy.py similarity index 94% rename from sdk/cosmos/azure-cosmos/azure/cosmos/endpoint_discovery_retry_policy.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_endpoint_discovery_retry_policy.py index dbc1e41f845f..d3158cd20035 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/endpoint_discovery_retry_policy.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_endpoint_discovery_retry_policy.py @@ -33,7 +33,7 @@ logger.addHandler(log_handler) -class _EndpointDiscoveryRetryPolicy(object): +class EndpointDiscoveryRetryPolicy(object): """The endpoint discovery retry policy class used for geo-replicated database accounts to handle the write forbidden exceptions due to writable/readable location changes (say, after a failover). @@ -44,9 +44,9 @@ class _EndpointDiscoveryRetryPolicy(object): def __init__(self, connection_policy, global_endpoint_manager, *args): self.global_endpoint_manager = global_endpoint_manager - self._max_retry_attempt_count = _EndpointDiscoveryRetryPolicy.Max_retry_attempt_count + self._max_retry_attempt_count = EndpointDiscoveryRetryPolicy.Max_retry_attempt_count self.failover_retry_count = 0 - self.retry_after_in_milliseconds = _EndpointDiscoveryRetryPolicy.Retry_after_in_milliseconds + self.retry_after_in_milliseconds = EndpointDiscoveryRetryPolicy.Retry_after_in_milliseconds self.connection_policy = connection_policy self.request = args[0] if args else None #clear previous location-based routing directive diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/__init__.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/__init__.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/__init__.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/__init__.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/aggregators.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aggregators.py similarity index 97% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/aggregators.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aggregators.py index 402acb514fbc..2a3ed76bce64 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/aggregators.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aggregators.py @@ -22,7 +22,7 @@ """Internal class for aggregation queries implementation in the Azure Cosmos database service. """ from abc import abstractmethod, ABCMeta -from azure.cosmos.execution_context.document_producer import _OrderByHelper +from azure.cosmos._execution_context.document_producer import _OrderByHelper class _Aggregator(object): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/base_execution_context.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/base_execution_context.py similarity index 94% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/base_execution_context.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/base_execution_context.py index 42bd23269da2..e32fb2e95b28 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/base_execution_context.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/base_execution_context.py @@ -23,9 +23,9 @@ """ from collections import deque -from .. import retry_utility +from .. import _retry_utility from .. import http_constants -from .. import base +from .. import _base class _QueryExecutionContextBase(object): """ @@ -140,7 +140,7 @@ def _fetch_items_helper_with_retries(self, fetch_function): def callback(): return self._fetch_items_helper_no_retries(fetch_function) - return retry_utility._Execute(self._client, self._client._global_endpoint_manager, callback) + return _retry_utility.Execute(self._client, self._client._global_endpoint_manager, callback) class _DefaultQueryExecutionContext(_QueryExecutionContextBase): @@ -208,8 +208,8 @@ def __init__(self, client, options, database_link, query, partition_key): raise ValueError("_collection_links_length is not greater than 0.") # Creating the QueryFeed for the first collection - path = base.GetPathFromLink(self._collection_links[self._current_collection_index], 'docs') - collection_id = base.GetResourceIdOrFullNameFromLink(self._collection_links[self._current_collection_index]) + path = _base.GetPathFromLink(self._collection_links[self._current_collection_index], 'docs') + collection_id = _base.GetResourceIdOrFullNameFromLink(self._collection_links[self._current_collection_index]) self._current_collection_index += 1 @@ -241,8 +241,8 @@ def _fetch_next_block(self): # creating separate feed queries for each collection and fetching the items while not fetched_items: if self._collection_links and self._current_collection_index < self._collection_links_length: - path = base.GetPathFromLink(self._collection_links[self._current_collection_index], 'docs') - collection_id = base.GetResourceIdOrFullNameFromLink(self._collection_links[self._current_collection_index]) + path = _base.GetPathFromLink(self._collection_links[self._current_collection_index], 'docs') + collection_id = _base.GetResourceIdOrFullNameFromLink(self._collection_links[self._current_collection_index]) self._continuation = None self._has_started = False diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/document_producer.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/document_producer.py similarity index 97% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/document_producer.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/document_producer.py index c74a60e3bade..f6f7db7e911e 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/document_producer.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/document_producer.py @@ -25,8 +25,8 @@ import six import numbers from collections import deque -from azure.cosmos import base -from azure.cosmos.execution_context.base_execution_context import _DefaultQueryExecutionContext +from azure.cosmos import _base +from azure.cosmos._execution_context.base_execution_context import _DefaultQueryExecutionContext from six.moves import xrange class _DocumentProducer(object): @@ -51,8 +51,8 @@ def __init__(self, partition_key_target_range, client, collection_link, query, d self._cur_item = None # initiate execution context - path = base.GetPathFromLink(collection_link, 'docs') - collection_id = base.GetResourceIdOrFullNameFromLink(collection_link) + path = _base.GetPathFromLink(collection_link, 'docs') + collection_id = _base.GetResourceIdOrFullNameFromLink(collection_link) def fetch_fn(options): return self._client.QueryFeed(path, collection_id, diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/endpoint_component.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/endpoint_component.py similarity index 97% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/endpoint_component.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/endpoint_component.py index 868a55464639..77dda8512b00 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/endpoint_component.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/endpoint_component.py @@ -23,7 +23,7 @@ """ import numbers -from azure.cosmos.execution_context.aggregators import _AverageAggregator, _CountAggregator, _MaxAggregator, \ +from azure.cosmos._execution_context.aggregators import _AverageAggregator, _CountAggregator, _MaxAggregator, \ _MinAggregator, _SumAggregator diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/execution_dispatcher.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/execution_dispatcher.py similarity index 94% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/execution_dispatcher.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/execution_dispatcher.py index 6f7740af4f43..acc7452da9ab 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/execution_dispatcher.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/execution_dispatcher.py @@ -25,11 +25,11 @@ import json from six.moves import xrange from azure.cosmos.errors import HTTPFailure -from azure.cosmos.execution_context.base_execution_context import _QueryExecutionContextBase -from azure.cosmos.execution_context.base_execution_context import _DefaultQueryExecutionContext -from azure.cosmos.execution_context.query_execution_info import _PartitionedQueryExecutionInfo -from azure.cosmos.execution_context import endpoint_component -from azure.cosmos.execution_context import multi_execution_aggregator +from azure.cosmos._execution_context.base_execution_context import _QueryExecutionContextBase +from azure.cosmos._execution_context.base_execution_context import _DefaultQueryExecutionContext +from azure.cosmos._execution_context.query_execution_info import _PartitionedQueryExecutionInfo +from azure.cosmos._execution_context import endpoint_component +from azure.cosmos._execution_context import multi_execution_aggregator from azure.cosmos.http_constants import StatusCodes, SubStatusCodes class _ProxyQueryExecutionContext(_QueryExecutionContextBase): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/multi_execution_aggregator.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/multi_execution_aggregator.py similarity index 95% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/multi_execution_aggregator.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/multi_execution_aggregator.py index 63a2dfb3b706..f0bfb8887fd1 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/multi_execution_aggregator.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/multi_execution_aggregator.py @@ -23,9 +23,9 @@ """ import heapq -from azure.cosmos.execution_context.base_execution_context import _QueryExecutionContextBase -from azure.cosmos.execution_context import document_producer -from azure.cosmos.routing import routing_range +from azure.cosmos._execution_context.base_execution_context import _QueryExecutionContextBase +from azure.cosmos._execution_context import document_producer +from azure.cosmos._routing import routing_range class _MultiExecutionContextAggregator(_QueryExecutionContextBase): """This class is capable of queries which requires rewriting based on @@ -147,4 +147,4 @@ def _createTargetPartitionQueryExecutionContext(self, partition_key_target_range def _get_target_parition_key_range(self): query_ranges = self._partitioned_query_ex_info.get_query_ranges() - return self._routing_provider.get_overlapping_ranges(self._resource_link, [routing_range._Range.ParseFromDict(range_as_dict) for range_as_dict in query_ranges]) + return self._routing_provider.get_overlapping_ranges(self._resource_link, [routing_range.Range.ParseFromDict(range_as_dict) for range_as_dict in query_ranges]) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/query_execution_info.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/query_execution_info.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/query_execution_info.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/query_execution_info.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/global_endpoint_manager.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_global_endpoint_manager.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/global_endpoint_manager.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_global_endpoint_manager.py index 0d7ff3936b76..0c44a81a138a 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/global_endpoint_manager.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_global_endpoint_manager.py @@ -24,9 +24,9 @@ from six.moves.urllib.parse import urlparse import threading -from . import constants +from . import _constants as constants from . import errors -from .location_cache import LocationCache +from ._location_cache import LocationCache class _GlobalEndpointManager(object): """ diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/hash_partition_resolver.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_hash_partition_resolver.py similarity index 95% rename from sdk/cosmos/azure-cosmos/azure/cosmos/hash_partition_resolver.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_hash_partition_resolver.py index 8b15926ec680..fca0cfe85d6f 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/hash_partition_resolver.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_hash_partition_resolver.py @@ -22,8 +22,8 @@ """Hash partition resolver implementation in the Azure Cosmos database service. """ -from . import murmur_hash -from . import consistent_hash_ring +from . import _murmur_hash +from . import _consistent_hash_ring class HashPartitionResolver(object): """HashPartitionResolver implements partitioning based on the value of a hash function, allowing you to evenly @@ -51,9 +51,9 @@ def __init__(self, partition_key_extractor, collection_links, default_number_of_ self.collection_links = collection_links if hash_generator is None: - hash_generator = murmur_hash._MurmurHash() + hash_generator = _murmur_hash.MurmurHash() - self.consistent_hash_ring = consistent_hash_ring._ConsistentHashRing(self.collection_links, default_number_of_virtual_nodes_per_collection, hash_generator) + self.consistent_hash_ring = _consistent_hash_ring.ConsistentHashRing(self.collection_links, default_number_of_virtual_nodes_per_collection, hash_generator) def ResolveForCreate(self, document): """Resolves the collection for creating the document based on the partition key. diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/location_cache.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_location_cache.py similarity index 99% rename from sdk/cosmos/azure-cosmos/azure/cosmos/location_cache.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_location_cache.py index 1534cef4f9ea..68f7cdb23a24 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/location_cache.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_location_cache.py @@ -25,7 +25,6 @@ import collections import time -from . import base from . import documents from . import http_constants diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/murmur_hash.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_murmur_hash.py similarity index 99% rename from sdk/cosmos/azure-cosmos/azure/cosmos/murmur_hash.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_murmur_hash.py index d94b5f39044b..0785b75096e6 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/murmur_hash.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_murmur_hash.py @@ -43,7 +43,7 @@ https://pypi.python.org/pypi/mmh3/2.0 ''' -class _MurmurHash(object): +class MurmurHash(object): """ The 32 bit x86 version of MurmurHash3 implementation. """ def ComputeHash(self, key): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/partition.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_partition.py similarity index 99% rename from sdk/cosmos/azure-cosmos/azure/cosmos/partition.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_partition.py index ffd931965bca..35f1611a21bc 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/partition.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_partition.py @@ -24,7 +24,7 @@ from six.moves import xrange -class _Partition(object): +class Partition(object): """Represents a class that holds the hash value and node name for each partition. """ def __init__(self, hash_value = None, node = None): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/query_iterable.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_query_iterable.py similarity index 97% rename from sdk/cosmos/azure-cosmos/azure/cosmos/query_iterable.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_query_iterable.py index ad2e8cd98d96..8abd73b4f8c1 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/query_iterable.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_query_iterable.py @@ -21,8 +21,8 @@ """Iterable query results in the Azure Cosmos database service. """ -from azure.cosmos.execution_context import execution_dispatcher -from azure.cosmos.execution_context import base_execution_context +from azure.cosmos._execution_context import execution_dispatcher +from azure.cosmos._execution_context import base_execution_context class QueryIterable(object): """Represents an iterable object of the query results. diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/range.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_range.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/range.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_range.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/range_partition_resolver.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_range_partition_resolver.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/range_partition_resolver.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_range_partition_resolver.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/request_object.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_request_object.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/request_object.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_request_object.py index db9ef786765f..fa882a0a0c54 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/request_object.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_request_object.py @@ -21,7 +21,7 @@ """Represents a request object. """ -class _RequestObject(object): +class RequestObject(object): def __init__(self, resource_type, operation_type, endpoint_override = None): self.resource_type = resource_type self.operation_type = operation_type diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/resource_throttle_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_resource_throttle_retry_policy.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/resource_throttle_retry_policy.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_resource_throttle_retry_policy.py index f3179a1902ef..57d32fd2b8e7 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/resource_throttle_retry_policy.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_resource_throttle_retry_policy.py @@ -24,7 +24,7 @@ from . import http_constants -class _ResourceThrottleRetryPolicy(object): +class ResourceThrottleRetryPolicy(object): def __init__(self, max_retry_attempt_count, fixed_retry_interval_in_milliseconds, max_wait_time_in_seconds): self._max_retry_attempt_count = max_retry_attempt_count diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/retry_options.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_retry_options.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/retry_options.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_retry_options.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/retry_utility.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_retry_utility.py similarity index 83% rename from sdk/cosmos/azure-cosmos/azure/cosmos/retry_utility.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_retry_utility.py index 1daa9a1f8c26..95f611fe4f2d 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/retry_utility.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_retry_utility.py @@ -25,13 +25,13 @@ import time from . import errors -from . import endpoint_discovery_retry_policy -from . import resource_throttle_retry_policy -from . import default_retry_policy -from . import session_retry_policy +from . import _endpoint_discovery_retry_policy +from . import _resource_throttle_retry_policy +from . import _default_retry_policy +from . import _session_retry_policy from .http_constants import HttpHeaders, StatusCodes, SubStatusCodes -def _Execute(client, global_endpoint_manager, function, *args, **kwargs): +def Execute(client, global_endpoint_manager, function, *args, **kwargs): """Exectutes the function with passed parameters applying all retry policies :param object client: @@ -45,20 +45,20 @@ def _Execute(client, global_endpoint_manager, function, *args, **kwargs): """ # instantiate all retry policies here to be applied for each request execution - endpointDiscovery_retry_policy = endpoint_discovery_retry_policy._EndpointDiscoveryRetryPolicy(client.connection_policy, global_endpoint_manager, *args) + endpointDiscovery_retry_policy = _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy(client.connection_policy, global_endpoint_manager, *args) - resourceThrottle_retry_policy = resource_throttle_retry_policy._ResourceThrottleRetryPolicy(client.connection_policy.RetryOptions.MaxRetryAttemptCount, + resourceThrottle_retry_policy = _resource_throttle_retry_policy.ResourceThrottleRetryPolicy(client.connection_policy.RetryOptions.MaxRetryAttemptCount, client.connection_policy.RetryOptions.FixedRetryIntervalInMilliseconds, client.connection_policy.RetryOptions.MaxWaitTimeInSeconds) - defaultRetry_policy = default_retry_policy._DefaultRetryPolicy(*args) + defaultRetry_policy = _default_retry_policy.DefaultRetryPolicy(*args) - sessionRetry_policy = session_retry_policy._SessionRetryPolicy(client.connection_policy.EnableEndpointDiscovery, global_endpoint_manager, *args) + sessionRetry_policy = _session_retry_policy._SessionRetryPolicy(client.connection_policy.EnableEndpointDiscovery, global_endpoint_manager, *args) while True: try: if args: - result = _ExecuteFunction(function, global_endpoint_manager, *args, **kwargs) + result = ExecuteFunction(function, global_endpoint_manager, *args, **kwargs) else: - result = _ExecuteFunction(function, *args, **kwargs) + result = ExecuteFunction(function, *args, **kwargs) if not client.last_response_headers: client.last_response_headers = {} @@ -94,7 +94,7 @@ def _Execute(client, global_endpoint_manager, function, *args, **kwargs): # Wait for retry_after_in_milliseconds time before the next retry time.sleep(retry_policy.retry_after_in_milliseconds / 1000.0) -def _ExecuteFunction(function, *args, **kwargs): +def ExecuteFunction(function, *args, **kwargs): """ Stub method so that it can be used for mocking purposes as well. """ return function(*args, **kwargs) \ No newline at end of file diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/__init__.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/__init__.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/routing/__init__.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_routing/__init__.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/collection_routing_map.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/collection_routing_map.py similarity index 79% rename from sdk/cosmos/azure-cosmos/azure/cosmos/routing/collection_routing_map.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_routing/collection_routing_map.py index bb030c3fc223..d1f86eb05b89 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/collection_routing_map.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/collection_routing_map.py @@ -23,11 +23,11 @@ """ import bisect -from azure.cosmos.routing import routing_range -from azure.cosmos.routing.routing_range import _PartitionKeyRange +from azure.cosmos._routing import routing_range +from azure.cosmos._routing.routing_range import PartitionKeyRange from six.moves import xrange -class _CollectionRoutingMap(object): +class CollectionRoutingMap(object): """Stores partition key ranges in an efficient way with some additional information and provides convenience methods for working with set of ranges. """ @@ -40,7 +40,7 @@ def __init__(self, range_by_id, range_by_info, ordered_partition_key_ranges, ord self._rangeByInfo = range_by_info self._orderedPartitionKeyRanges = ordered_partition_key_ranges - self._orderedRanges = [routing_range._Range(pkr[_PartitionKeyRange.MinInclusive], pkr[_PartitionKeyRange.MaxExclusive], True, False) for pkr in ordered_partition_key_ranges] + self._orderedRanges = [routing_range.Range(pkr[PartitionKeyRange.MinInclusive], pkr[PartitionKeyRange.MaxExclusive], True, False) for pkr in ordered_partition_key_ranges] self._orderedPartitionInfo = ordered_partition_info self._collectionUniqueId = collection_unique_id @@ -51,15 +51,15 @@ def CompleteRoutingMap(cls, partition_key_range_info_tupple_list, collection_uni sortedRanges = [] for r in partition_key_range_info_tupple_list: - rangeById[r[0][_PartitionKeyRange.Id]] = r + rangeById[r[0][PartitionKeyRange.Id]] = r rangeByInfo[r[1]] = r[0] sortedRanges.append(r) - sortedRanges.sort(key = lambda r: r[0][_PartitionKeyRange.MinInclusive]) + sortedRanges.sort(key = lambda r: r[0][PartitionKeyRange.MinInclusive]) partitionKeyOrderedRange = [r[0] for r in sortedRanges] orderedPartitionInfo = [r[1] for r in sortedRanges] - if not _CollectionRoutingMap.is_complete_set_of_range(partitionKeyOrderedRange): return None + if not CollectionRoutingMap.is_complete_set_of_range(partitionKeyOrderedRange): return None return cls(rangeById, rangeByInfo, partitionKeyOrderedRange, orderedPartitionInfo, collection_unique_id) def get_ordered_partition_key_ranges(self): @@ -80,10 +80,10 @@ def get_range_by_effective_partition_key(self, effective_partition_key_value): The partition key range. :rtype: dict """ - if _CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey == effective_partition_key_value: + if CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey == effective_partition_key_value: return self._orderedPartitionKeyRanges[0] - if _CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey == effective_partition_key_value: + if CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey == effective_partition_key_value: return None sortedLow = [(r.min, not r.isMinInclusive) for r in self._orderedRanges] @@ -118,7 +118,7 @@ def get_overlapping_ranges(self, provided_partition_key_ranges): :rtype: list """ - if isinstance(provided_partition_key_ranges, routing_range._Range): + if isinstance(provided_partition_key_ranges, routing_range.Range): return self.get_overlapping_ranges([provided_partition_key_ranges]) minToPartitionRange = {} @@ -135,14 +135,14 @@ def get_overlapping_ranges(self, provided_partition_key_ranges): maxIndex = maxIndex - 1 for i in xrange(minIndex, maxIndex + 1): - if routing_range._Range.overlaps(self._orderedRanges[i], providedRange): - minToPartitionRange[self._orderedPartitionKeyRanges[i][_PartitionKeyRange.MinInclusive]] = self._orderedPartitionKeyRanges[i] + if routing_range.Range.overlaps(self._orderedRanges[i], providedRange): + minToPartitionRange[self._orderedPartitionKeyRanges[i][PartitionKeyRange.MinInclusive]] = self._orderedPartitionKeyRanges[i] overlapping_partition_key_ranges = list(minToPartitionRange.values()) def getKey(r): - return r[_PartitionKeyRange.MinInclusive] + return r[PartitionKeyRange.MinInclusive] overlapping_partition_key_ranges.sort(key = getKey) return overlapping_partition_key_ranges @@ -153,16 +153,16 @@ def is_complete_set_of_range(ordered_partition_key_range_list): firstRange = ordered_partition_key_range_list[0] lastRange = ordered_partition_key_range_list[-1] - isComplete = (firstRange[_PartitionKeyRange.MinInclusive] == _CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey) - isComplete &= (lastRange[_PartitionKeyRange.MaxExclusive] == _CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey) + isComplete = (firstRange[PartitionKeyRange.MinInclusive] == CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey) + isComplete &= (lastRange[PartitionKeyRange.MaxExclusive] == CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey) for i in range(1, len(ordered_partition_key_range_list)): previousRange = ordered_partition_key_range_list[i - 1] currentRange = ordered_partition_key_range_list[i] - isComplete &= previousRange[_PartitionKeyRange.MaxExclusive] == currentRange[_PartitionKeyRange.MinInclusive] + isComplete &= previousRange[PartitionKeyRange.MaxExclusive] == currentRange[PartitionKeyRange.MinInclusive] if not isComplete: - if previousRange[_PartitionKeyRange.MaxExclusive] > currentRange[_PartitionKeyRange.MinInclusive]: + if previousRange[PartitionKeyRange.MaxExclusive] > currentRange[PartitionKeyRange.MinInclusive]: raise ValueError("Ranges overlap") break diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_map_provider.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_map_provider.py similarity index 80% rename from sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_map_provider.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_map_provider.py index 73c9ed56529d..7b371e97e2d3 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_map_provider.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_map_provider.py @@ -22,14 +22,14 @@ """Internal class for partition key range cache implementation in the Azure Cosmos database service. """ -from .. import base -from .collection_routing_map import _CollectionRoutingMap +from .. import _base +from .collection_routing_map import CollectionRoutingMap from . import routing_range -from .routing_range import _PartitionKeyRange +from .routing_range import PartitionKeyRange -class _PartitionKeyRangeCache(object): +class PartitionKeyRangeCache(object): ''' - _PartitionKeyRangeCache provides list of effective partition key ranges for a collection. + PartitionKeyRangeCache provides list of effective partition key ranges for a collection. This implementation loads and caches the collection routing map per collection on demand. ''' @@ -59,7 +59,7 @@ def get_overlapping_ranges(self, collection_link, partition_key_ranges): ''' cl = self._documentClient - collection_id = base.GetResourceIdOrFullNameFromLink(collection_link) + collection_id = _base.GetResourceIdOrFullNameFromLink(collection_link) collection_routing_map = self._collection_routing_map_by_item.get(collection_id) if collection_routing_map is None: @@ -67,8 +67,8 @@ def get_overlapping_ranges(self, collection_link, partition_key_ranges): # for large collections, a split may complete between the read partition key ranges query page responses, # causing the partitionKeyRanges to have both the children ranges and their parents. Therefore, we need # to discard the parent ranges to have a valid routing map. - collection_pk_ranges = _PartitionKeyRangeCache._discard_parent_ranges(collection_pk_ranges) - collection_routing_map = _CollectionRoutingMap.CompleteRoutingMap([(r, True) for r in collection_pk_ranges], collection_id) + collection_pk_ranges = PartitionKeyRangeCache._discard_parent_ranges(collection_pk_ranges) + collection_routing_map = CollectionRoutingMap.CompleteRoutingMap([(r, True) for r in collection_pk_ranges], collection_id) self._collection_routing_map_by_item[collection_id] = collection_routing_map return collection_routing_map.get_overlapping_ranges(partition_key_ranges) @@ -76,17 +76,17 @@ def get_overlapping_ranges(self, collection_link, partition_key_ranges): def _discard_parent_ranges(partitionKeyRanges): parentIds = set() for r in partitionKeyRanges: - if isinstance(r, dict) and _PartitionKeyRange.Parents in r: - for parentId in r[_PartitionKeyRange.Parents]: + if isinstance(r, dict) and PartitionKeyRange.Parents in r: + for parentId in r[PartitionKeyRange.Parents]: parentIds.add(parentId) - return (r for r in partitionKeyRanges if r[_PartitionKeyRange.Id] not in parentIds) + return (r for r in partitionKeyRanges if r[PartitionKeyRange.Id] not in parentIds) -class _SmartRoutingMapProvider(_PartitionKeyRangeCache): +class SmartRoutingMapProvider(PartitionKeyRangeCache): """ - Efficiently uses PartitionKeyRangeCach and minimizes the unnecessary invocation of _CollectionRoutingMap.get_overlapping_ranges() + Efficiently uses PartitionKeyRangeCach and minimizes the unnecessary invocation of CollectionRoutingMap.get_overlapping_ranges() """ def __init__(self, client): - super(_SmartRoutingMapProvider, self).__init__(client) + super(SmartRoutingMapProvider, self).__init__(client) def _second_range_is_after_first_range(self, range1, range2): @@ -112,20 +112,20 @@ def _subtract_range(self, r, partition_key_range): Evaluates and returns r - partition_key_range :param dict partition_key_range: Partition key range. - :param routing_range._Range r: query range. + :param routing_range.Range r: query range. :return: The subtract r - partition_key_range. - :rtype: routing_range._Range + :rtype: routing_range.Range """ - left = max(partition_key_range[routing_range._PartitionKeyRange.MaxExclusive], r.min) + left = max(partition_key_range[routing_range.PartitionKeyRange.MaxExclusive], r.min) if left == r.min: leftInclusive = r.isMinInclusive else: leftInclusive = False - queryRange = routing_range._Range(left, r.max, leftInclusive, + queryRange = routing_range.Range(left, r.max, leftInclusive, r.isMaxInclusive) return queryRange @@ -136,7 +136,7 @@ def get_overlapping_ranges(self, collection_link, sorted_ranges): :param str collection_link: The collection link. - :param (list of routing_range._Range) sorted_ranges: The sorted list of non-overlapping ranges. + :param (list of routing_range.Range) sorted_ranges: The sorted list of non-overlapping ranges. :return: List of partition key ranges. :rtype: list of dict @@ -163,11 +163,11 @@ def get_overlapping_ranges(self, collection_link, sorted_ranges): else: queryRange = currentProvidedRange - overlappingRanges = _PartitionKeyRangeCache.get_overlapping_ranges(self, collection_link, queryRange) + overlappingRanges = PartitionKeyRangeCache.get_overlapping_ranges(self, collection_link, queryRange) assert len(overlappingRanges), ("code bug: returned overlapping ranges for queryRange {} is empty".format(queryRange)) target_partition_key_ranges.extend(overlappingRanges) - lastKnownTargetRange = routing_range._Range.PartitionKeyRangeToRange(target_partition_key_ranges[-1]) + lastKnownTargetRange = routing_range.Range.PartitionKeyRangeToRange(target_partition_key_ranges[-1]) # the overlapping ranges must contain the requested range assert currentProvidedRange.max <= lastKnownTargetRange.max, "code bug: returned overlapping ranges {} does not contain the requested range {}".format(overlappingRanges, queryRange) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_range.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_range.py similarity index 89% rename from sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_range.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_range.py index f2ca0d76e148..fa0678f5b57c 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_range.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_range.py @@ -22,14 +22,14 @@ """Internal class for partition key range implementation in the Azure Cosmos database service. """ -class _PartitionKeyRange(object): +class PartitionKeyRange(object): """Partition Key Range Constants""" MinInclusive = 'minInclusive' MaxExclusive = 'maxExclusive' Id = 'id' Parents = 'parents' -class _Range(object): +class Range(object): """description of class""" MinPath = 'min' @@ -58,13 +58,13 @@ def contains(self, value): @classmethod def PartitionKeyRangeToRange(cls, partition_key_range): - self = cls(partition_key_range[_PartitionKeyRange.MinInclusive], partition_key_range[_PartitionKeyRange.MaxExclusive], + self = cls(partition_key_range[PartitionKeyRange.MinInclusive], partition_key_range[PartitionKeyRange.MaxExclusive], True, False) return self @classmethod def ParseFromDict(cls, range_as_dict): - self = cls(range_as_dict[_Range.MinPath], range_as_dict[_Range.MaxPath], range_as_dict[_Range.IsMinInclusivePath], range_as_dict[_Range.IsMaxInclusivePath]) + self = cls(range_as_dict[Range.MinPath], range_as_dict[Range.MaxPath], range_as_dict[Range.IsMinInclusivePath], range_as_dict[Range.IsMaxInclusivePath]) return self def isSingleValue(self): @@ -97,8 +97,8 @@ def overlaps(range1, range2): if range1 is None or range2 is None: return False if range1.isEmpty() or range2.isEmpty(): return False - cmp1 = _Range._compare_helper(range1.min, range2.max) - cmp2 = _Range._compare_helper(range2.min, range1.max) + cmp1 = Range._compare_helper(range1.min, range2.max) + cmp2 = Range._compare_helper(range2.min, range1.max) if (cmp1 <= 0 or cmp2 <= 0): if ((cmp1 == 0 and not(range1.isMinInclusive and range2.isMaxInclusive)) or (cmp2 == 0 and not(range2.isMinInclusive and range1.isMaxInclusive))): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/runtime_constants.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_runtime_constants.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/runtime_constants.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_runtime_constants.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/session.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_session.py similarity index 95% rename from sdk/cosmos/azure-cosmos/azure/cosmos/session.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_session.py index 38eece56dec2..fe7c35cdf9d6 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/session.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_session.py @@ -25,9 +25,9 @@ import sys, traceback import threading -from . import base +from . import _base from . import http_constants -from .vector_session_token import VectorSessionToken +from ._vector_session_token import VectorSessionToken from .errors import HTTPFailure class SessionContainer(object): @@ -51,17 +51,17 @@ def get_session_token(self, resource_path): """ with self.session_lock: - is_name_based = base.IsNameBased(resource_path) + is_name_based = _base.IsNameBased(resource_path) collection_rid = '' session_token = '' try: if is_name_based: # get the collection name - collection_name = base.GetItemContainerLink(resource_path) + collection_name = _base.GetItemContainerLink(resource_path) collection_rid = self.collection_name_to_rid[collection_name] else: - collection_rid = base.GetItemContainerLink(resource_path) + collection_rid = _base.GetItemContainerLink(resource_path) if collection_rid in self.rid_to_session_token: token_dict = self.rid_to_session_token[collection_rid] @@ -112,7 +112,7 @@ def set_session_token(self, response_result, response_headers): response_result_id = response_result[response_result_id_key] else: return - collection_rid, collection_name = base.GetItemContainerInfo(self_link, alt_content_path, response_result_id) + collection_rid, collection_name = _base.GetItemContainerInfo(self_link, alt_content_path, response_result_id) except ValueError: return diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/session_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_session_retry_policy.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/session_retry_policy.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_session_retry_policy.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/synchronized_request.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_synchronized_request.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/synchronized_request.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_synchronized_request.py index 9538a993580c..2ba8c1b2cdd8 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/synchronized_request.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_synchronized_request.py @@ -30,7 +30,7 @@ from . import documents from . import errors from . import http_constants -from . import retry_utility +from . import _retry_utility def _IsReadableStream(obj): """Checks whether obj is a file-like readable stream. @@ -224,5 +224,5 @@ def SynchronizedRequest(client, request_options['headers'][http_constants.HttpHeaders.ContentLength] = 0 # Pass _Request function with it's parameters to retry_utility's Execute method that wraps the call with retries - return retry_utility._Execute(client, global_endpoint_manager, _Request, request, connection_policy, requests_session, path, request_options, request_body) + return _retry_utility.Execute(client, global_endpoint_manager, _Request, request, connection_policy, requests_session, path, request_options, request_body) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/utils.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_utils.py similarity index 86% rename from sdk/cosmos/azure-cosmos/azure/cosmos/utils.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_utils.py index e20216199ef5..8178ef426084 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/utils.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_utils.py @@ -26,17 +26,17 @@ import re as re from . import http_constants -def _get_user_agent(): - os_name = _safe_user_agent_header(platform.system()) - os_version = _safe_user_agent_header(platform.release()) - python_version = _safe_user_agent_header(platform.python_version()) +def get_user_agent(): + os_name = safe_user_agent_header(platform.system()) + os_version = safe_user_agent_header(platform.release()) + python_version = safe_user_agent_header(platform.python_version()) user_agent = "{}/{} Python/{} {}/{}".format(os_name, os_version, python_version, http_constants.Versions.SDKName, http_constants.Versions.SDKVersion) return user_agent -def _safe_user_agent_header(s): +def safe_user_agent_header(s): if s is None: s = "unknown" # remove all white spaces diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/vector_session_token.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_vector_session_token.py similarity index 99% rename from sdk/cosmos/azure-cosmos/azure/cosmos/vector_session_token.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_vector_session_token.py index 1dfee1974e6b..d2cd6920fc1c 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/vector_session_token.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_vector_session_token.py @@ -23,7 +23,6 @@ """ from . import errors -from . import base from .http_constants import StatusCodes class VectorSessionToken(object): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/container.py b/sdk/cosmos/azure-cosmos/azure/cosmos/container.py index 8326d5224260..7d2b9fd35795 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/container.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/container.py @@ -23,12 +23,12 @@ """ import six -from .cosmos_client_connection import CosmosClientConnection +from ._cosmos_client_connection import CosmosClientConnection from .errors import HTTPFailure from .http_constants import StatusCodes from .offer import Offer from .scripts import Scripts -from .query_iterable import QueryIterable +from ._query_iterable import QueryIterable from .partition_key import NonePartitionKeyValue from typing import ( Any, @@ -222,7 +222,7 @@ def read_all_items( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of items (dicts). + :returns: An Iterable of items (dicts). """ if not feed_options: feed_options = {} # type: Dict[str, Any] @@ -264,7 +264,7 @@ def query_items_change_feed( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of items (dicts). + :returns: An Iterable of items (dicts). """ if not feed_options: @@ -317,7 +317,7 @@ def query_items( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of items (dicts). + :returns: An Iterable of items (dicts). You can use any value for the container name in the FROM clause, but typically the container name is used. In the examples below, the container name is "products," and is aliased as "p" for easier referencing @@ -675,7 +675,7 @@ def read_all_conflicts( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of conflicts (dicts). + :returns: An Iterable of conflicts (dicts). """ if not feed_options: @@ -712,7 +712,7 @@ def query_conflicts( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of conflicts (dicts). + :returns: An Iterable of conflicts (dicts). """ if not feed_options: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client.py b/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client.py index f1de1976f98a..a4d5ff828734 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client.py @@ -23,10 +23,10 @@ """ import six -from .cosmos_client_connection import CosmosClientConnection +from ._cosmos_client_connection import CosmosClientConnection from .database import Database from .documents import ConnectionPolicy, DatabaseAccount -from .query_iterable import QueryIterable +from ._query_iterable import QueryIterable from typing import ( Any, Callable, @@ -184,7 +184,7 @@ def read_all_databases( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of database properties (dicts). + :returns: An Iterable of database properties (dicts). """ if not feed_options: @@ -231,7 +231,7 @@ def query_databases( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of database properties (dicts). + :returns: An Iterable of database properties (dicts). """ if not feed_options: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/database.py b/sdk/cosmos/azure-cosmos/azure/cosmos/database.py index 68ef288106e5..21df096ca050 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/database.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/database.py @@ -23,13 +23,13 @@ """ import six -from .cosmos_client_connection import CosmosClientConnection +from ._cosmos_client_connection import CosmosClientConnection from .container import Container from .offer import Offer from .http_constants import StatusCodes from .errors import HTTPFailure from .user import User -from .query_iterable import QueryIterable +from ._query_iterable import QueryIterable from .partition_key import PartitionKey from typing import ( @@ -332,7 +332,7 @@ def read_all_containers( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of container properties (dicts). + :returns: An Iterable of container properties (dicts). .. literalinclude:: ../../examples/examples.py :start-after: [START list_containers] @@ -385,7 +385,7 @@ def query_containers( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of container properties (dicts). + :returns: An Iterable of container properties (dicts). """ if not feed_options: @@ -503,7 +503,7 @@ def read_all_users( :param max_item_count: Max number of users to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of user properties (dicts). + :returns: An Iterable of user properties (dicts). """ if not feed_options: @@ -536,7 +536,7 @@ def query_users( :param max_item_count: Max number of users to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of user properties (dicts). + :returns: An Iterable of user properties (dicts). """ if not feed_options: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/documents.py b/sdk/cosmos/azure-cosmos/azure/cosmos/documents.py index fc45f5157dfc..33be86d9004f 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/documents.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/documents.py @@ -22,7 +22,7 @@ """AzureDocument classes and enums for the Azure Cosmos database service. """ -from . import retry_options +from . import _retry_options class DatabaseAccount(object): """Database account. A DatabaseAccount is the container for databases. @@ -368,7 +368,7 @@ def __init__(self): self.ProxyConfiguration = None self.EnableEndpointDiscovery = True self.PreferredLocations = [] - self.RetryOptions = retry_options.RetryOptions() + self.RetryOptions = _retry_options.RetryOptions() self.DisableSSLVerification = False self.UseMultipleWriteLocations = False diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/scripts.py b/sdk/cosmos/azure-cosmos/azure/cosmos/scripts.py index 7487c36a4d3b..52f9ccfdd6e3 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/scripts.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/scripts.py @@ -23,9 +23,9 @@ """ import six -from azure.cosmos.cosmos_client_connection import CosmosClientConnection +from azure.cosmos._cosmos_client_connection import CosmosClientConnection from .partition_key import NonePartitionKeyValue -from.query_iterable import QueryIterable +from ._query_iterable import QueryIterable from typing import ( Any, List, @@ -64,7 +64,7 @@ def list_stored_procedures( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of stored procedures (dicts). + :returns: An Iterable of stored procedures (dicts). """ if not feed_options: @@ -91,7 +91,7 @@ def query_stored_procedures( :param parameters: Optional array of parameters to the query. Ignored if no query is provided. :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of stored procedures (dicts). + :returns: An Iterable of stored procedures (dicts). """ if not feed_options: @@ -246,7 +246,7 @@ def list_triggers( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of triggers (dicts). + :returns: An Iterable of triggers (dicts). """ if not feed_options: @@ -273,7 +273,7 @@ def query_triggers( :param parameters: Optional array of parameters to the query. Ignored if no query is provided. :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of triggers (dicts). + :returns: An Iterable of triggers (dicts). """ if not feed_options: @@ -394,7 +394,7 @@ def list_user_defined_functions( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of user defined functions (dicts). + :returns: An Iterable of user defined functions (dicts). """ if not feed_options: @@ -421,7 +421,7 @@ def query_user_defined_functions( :param parameters: Optional array of parameters to the query. Ignored if no query is provided. :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of user defined functions (dicts). + :returns: An Iterable of user defined functions (dicts). """ if not feed_options: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/user.py b/sdk/cosmos/azure-cosmos/azure/cosmos/user.py index f7c212c56c27..9b1eaf39236b 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/user.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/user.py @@ -23,7 +23,7 @@ """ import six -from .cosmos_client_connection import CosmosClientConnection +from ._cosmos_client_connection import CosmosClientConnection from typing import ( Any, List, @@ -99,7 +99,7 @@ def read_all_permissions( :param max_item_count: Max number of permissions to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of permissions (dicts). + :returns: An Iterable of permissions (dicts). """ if not feed_options: @@ -133,7 +133,7 @@ def query_permissions( :param max_item_count: Max number of permissions to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of permissions (dicts). + :returns: An Iterable of permissions (dicts). """ if not feed_options: diff --git a/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/ConflictWorker.py b/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/ConflictWorker.py index 52f31029be52..a714278dc71d 100644 --- a/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/ConflictWorker.py +++ b/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/ConflictWorker.py @@ -4,7 +4,6 @@ import json import azure.cosmos.errors as errors from azure.cosmos.http_constants import StatusCodes -import azure.cosmos.base as base class ConflictWorker(object): def __init__(self, database_name, basic_collection_name, manual_collection_name, lww_collection_name, udp_collection_name): diff --git a/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/MultiMasterScenario.py b/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/MultiMasterScenario.py index 8b36c27ba0fe..8b97f0899838 100644 --- a/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/MultiMasterScenario.py +++ b/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/MultiMasterScenario.py @@ -3,7 +3,7 @@ from Worker import Worker from multiprocessing.pool import ThreadPool import azure.cosmos.documents as documents -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection class MultiMasterScenario(object): def __init__(self): diff --git a/sdk/cosmos/azure-cosmos/test/base_unit_tests.py b/sdk/cosmos/azure-cosmos/test/base_unit_tests.py index 2dd41a646231..cd0082c5582e 100644 --- a/sdk/cosmos/azure-cosmos/test/base_unit_tests.py +++ b/sdk/cosmos/azure-cosmos/test/base_unit_tests.py @@ -1,6 +1,6 @@ import unittest import pytest -import azure.cosmos.base as base +import azure.cosmos._base as base pytestmark = pytest.mark.cosmosEmulator diff --git a/sdk/cosmos/azure-cosmos/test/crud_tests.py b/sdk/cosmos/azure-cosmos/test/crud_tests.py index 12f1d53df464..77a20f52709c 100644 --- a/sdk/cosmos/azure-cosmos/test/crud_tests.py +++ b/sdk/cosmos/azure-cosmos/test/crud_tests.py @@ -41,18 +41,18 @@ import urllib.parse as urllib import uuid import pytest -import azure.cosmos.consistent_hash_ring as consistent_hash_ring +from azure.cosmos import _consistent_hash_ring import azure.cosmos.documents as documents import azure.cosmos.errors as errors from azure.cosmos.http_constants import HttpHeaders, StatusCodes, SubStatusCodes -import azure.cosmos.murmur_hash as murmur_hash +import azure.cosmos._murmur_hash as _murmur_hash import test_config -import azure.cosmos.base as base +import azure.cosmos._base as base import azure.cosmos.cosmos_client as cosmos_client from azure.cosmos.diagnostics import RecordDiagnostics from azure.cosmos.partition_key import PartitionKey import conftest -import azure.cosmos.retry_utility as retry_utility +from azure.cosmos import _retry_utility pytestmark = pytest.mark.cosmosEmulator @@ -298,11 +298,11 @@ def test_partitioned_collection_partition_key_extraction(self): } } - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction # create document without partition key being specified created_document = created_collection.create_item(body=document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction self.assertEquals(self.last_headers[1], '["WA"]') del self.last_headers[:] @@ -315,11 +315,11 @@ def test_partitioned_collection_partition_key_extraction(self): partition_key=PartitionKey(path='/address', kind=documents.PartitionKind.Hash) ) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction # Create document with partitionkey not present as a leaf level property but a dict created_document = created_collection1.create_item(document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction self.assertEquals(self.last_headers[1], [{}]) del self.last_headers[:] @@ -331,11 +331,11 @@ def test_partitioned_collection_partition_key_extraction(self): partition_key=PartitionKey(path='/address/state/city', kind=documents.PartitionKind.Hash) ) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction # Create document with partitionkey not present in the document created_document = created_collection2.create_item(document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction self.assertEquals(self.last_headers[1], [{}]) del self.last_headers[:] @@ -358,10 +358,10 @@ def test_partitioned_collection_partition_key_extraction_special_chars(self): "level' 1*()": {"le/vel2": 'val1'} } - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction created_document = created_collection1.create_item(body=document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction self.assertEquals(self.last_headers[1], '["val1"]') del self.last_headers[:] @@ -385,11 +385,11 @@ def test_partitioned_collection_partition_key_extraction_special_chars(self): 'level\" 1*()': {'le/vel2': 'val2'} } - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction # create document without partition key being specified created_document = created_collection2.create_item(body=document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction self.assertEquals(self.last_headers[1], '["val2"]') del self.last_headers[:] @@ -851,13 +851,13 @@ def test_murmur_hash(self): str = 'afdgdd' bytes = bytearray(str, encoding='utf-8') - hash_value = murmur_hash._MurmurHash._ComputeHash(bytes) + hash_value = _murmur_hash.MurmurHash._ComputeHash(bytes) self.assertEqual(1099701186, hash_value) num = 374.0 bytes = bytearray(pack('d', num)) - hash_value = murmur_hash._MurmurHash._ComputeHash(bytes) + hash_value = _murmur_hash.MurmurHash._ComputeHash(bytes) self.assertEqual(3717946798, hash_value) self._validate_bytes("", 0x1B873593, bytearray(b'\xEE\xA8\xA2\x67'), 1738713326) @@ -878,25 +878,25 @@ def test_murmur_hash(self): 3381504877) def _validate_bytes(self, str, seed, expected_hash_bytes, expected_value): - hash_value = murmur_hash._MurmurHash._ComputeHash(bytearray(str, encoding='utf-8'), seed) + hash_value = _murmur_hash.MurmurHash._ComputeHash(bytearray(str, encoding='utf-8'), seed) bytes = bytearray(pack('I', hash_value)) self.assertEqual(expected_value, hash_value) self.assertEqual(expected_hash_bytes, bytes) def test_get_bytes(self): - actual_bytes = consistent_hash_ring._ConsistentHashRing._GetBytes("documentdb") + actual_bytes = _consistent_hash_ring.ConsistentHashRing._GetBytes("documentdb") expected_bytes = bytearray(b'\x64\x6F\x63\x75\x6D\x65\x6E\x74\x64\x62') self.assertEqual(expected_bytes, actual_bytes) - actual_bytes = consistent_hash_ring._ConsistentHashRing._GetBytes("azure") + actual_bytes = _consistent_hash_ring.ConsistentHashRing._GetBytes("azure") expected_bytes = bytearray(b'\x61\x7A\x75\x72\x65') self.assertEqual(expected_bytes, actual_bytes) - actual_bytes = consistent_hash_ring._ConsistentHashRing._GetBytes("json") + actual_bytes = _consistent_hash_ring.ConsistentHashRing._GetBytes("json") expected_bytes = bytearray(b'\x6A\x73\x6F\x6E') self.assertEqual(expected_bytes, actual_bytes) - actual_bytes = consistent_hash_ring._ConsistentHashRing._GetBytes("nosql") + actual_bytes = _consistent_hash_ring.ConsistentHashRing._GetBytes("nosql") expected_bytes = bytearray(b'\x6E\x6F\x73\x71\x6C') self.assertEqual(expected_bytes, actual_bytes) diff --git a/sdk/cosmos/azure-cosmos/test/globaldb_mock_tests.py b/sdk/cosmos/azure-cosmos/test/globaldb_mock_tests.py index c387000390d9..5c07812625bf 100644 --- a/sdk/cosmos/azure-cosmos/test/globaldb_mock_tests.py +++ b/sdk/cosmos/azure-cosmos/test/globaldb_mock_tests.py @@ -23,13 +23,13 @@ import json import pytest -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection import azure.cosmos.documents as documents import azure.cosmos.errors as errors -import azure.cosmos.constants as constants +import azure.cosmos._constants as constants from azure.cosmos.http_constants import StatusCodes -import azure.cosmos.global_endpoint_manager as global_endpoint_manager -import azure.cosmos.retry_utility as retry_utility +import azure.cosmos._global_endpoint_manager as global_endpoint_manager +from azure.cosmos import _retry_utility import test_config pytestmark = pytest.mark.cosmosEmulator @@ -132,7 +132,7 @@ def setUp(self): # Copying the original objects and functions before assigning the mock versions of them self.OriginalGetDatabaseAccountStub = global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub self.OriginalGlobalEndpointManager = global_endpoint_manager._GlobalEndpointManager - self.OriginalExecuteFunction = retry_utility._ExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction # Make azure-cosmos use the MockGlobalEndpointManager global_endpoint_manager._GlobalEndpointManager = MockGlobalEndpointManager @@ -141,13 +141,13 @@ def tearDown(self): # Restoring the original objects and functions global_endpoint_manager._GlobalEndpointManager = self.OriginalGlobalEndpointManager global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = self.OriginalGetDatabaseAccountStub - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def MockExecuteFunction(self, function, *args, **kwargs): global location_changed if self.endpoint_discovery_retry_count == 2: - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction return (json.dumps([{ 'id': 'mock database' }]), None) else: self.endpoint_discovery_retry_count += 1 @@ -158,8 +158,8 @@ def MockGetDatabaseAccountStub(self, endpoint): raise errors.HTTPFailure(StatusCodes.SERVICE_UNAVAILABLE, "Service unavailable") def MockCreateDatabase(self, client, database): - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self.MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self.MockExecuteFunction client.CreateDatabase(database) def test_globaldb_endpoint_discovery_retry_policy(self): diff --git a/sdk/cosmos/azure-cosmos/test/globaldb_tests.py b/sdk/cosmos/azure-cosmos/test/globaldb_tests.py index 5241118dbfa7..e0e8eb41db7e 100644 --- a/sdk/cosmos/azure-cosmos/test/globaldb_tests.py +++ b/sdk/cosmos/azure-cosmos/test/globaldb_tests.py @@ -26,12 +26,12 @@ import time import pytest -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection import azure.cosmos.documents as documents import azure.cosmos.errors as errors -import azure.cosmos.global_endpoint_manager as global_endpoint_manager -import azure.cosmos.endpoint_discovery_retry_policy as endpoint_discovery_retry_policy -import azure.cosmos.retry_utility as retry_utility +import azure.cosmos._global_endpoint_manager as global_endpoint_manager +from azure.cosmos import _endpoint_discovery_retry_policy +from azure.cosmos import _retry_utility from azure.cosmos.http_constants import HttpHeaders, StatusCodes, SubStatusCodes import test_config @@ -359,8 +359,8 @@ def test_globaldb_locational_endpoint_parser(self): def test_globaldb_endpoint_discovery_retry_policy_mock(self): client = cosmos_client_connection.CosmosClientConnection(Test_globaldb_tests.host, {'masterKey': Test_globaldb_tests.masterKey}) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction self.OriginalGetDatabaseAccount = client.GetDatabaseAccount client.GetDatabaseAccount = self._MockGetDatabaseAccount @@ -368,8 +368,8 @@ def test_globaldb_endpoint_discovery_retry_policy_mock(self): max_retry_attempt_count = 10 retry_after_in_milliseconds = 500 - endpoint_discovery_retry_policy._EndpointDiscoveryRetryPolicy.Max_retry_attempt_count = max_retry_attempt_count - endpoint_discovery_retry_policy._EndpointDiscoveryRetryPolicy.Retry_after_in_milliseconds = retry_after_in_milliseconds + _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy.Max_retry_attempt_count = max_retry_attempt_count + _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy.Retry_after_in_milliseconds = retry_after_in_milliseconds document_definition = { 'id': 'doc', 'name': 'sample document', @@ -382,7 +382,7 @@ def test_globaldb_endpoint_discovery_retry_policy_mock(self): self.test_coll['_self'], document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def _MockExecuteFunction(self, function, *args, **kwargs): raise errors.HTTPFailure(StatusCodes.FORBIDDEN, "Write Forbidden", {'x-ms-substatus' : SubStatusCodes.WRITE_FORBIDDEN}) diff --git a/sdk/cosmos/azure-cosmos/test/location_cache_tests.py b/sdk/cosmos/azure-cosmos/test/location_cache_tests.py index 22e2689cded4..a2772ce270e8 100644 --- a/sdk/cosmos/azure-cosmos/test/location_cache_tests.py +++ b/sdk/cosmos/azure-cosmos/test/location_cache_tests.py @@ -4,13 +4,13 @@ from time import sleep from azure.cosmos.http_constants import ResourceType -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection import azure.cosmos.documents as documents -from azure.cosmos.request_object import _RequestObject -from azure.cosmos.location_cache import LocationCache +from azure.cosmos._request_object import RequestObject +from azure.cosmos._location_cache import LocationCache import azure.cosmos.errors as errors from azure.cosmos.http_constants import StatusCodes, SubStatusCodes, HttpHeaders -import azure.cosmos.retry_utility as retry_utility +from azure.cosmos import _retry_utility import six pytestmark = pytest.mark.cosmosEmulator @@ -74,8 +74,8 @@ def test_validate_retry_on_session_not_availabe_with_disable_multiple_write_loca def validate_retry_on_session_not_availabe_with_endpoint_discovery_disabled(self, is_preferred_locations_list_empty, use_multiple_write_locations, is_read_request): self.counter = 0 - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunctionSessionReadFailureOnce + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunctionSessionReadFailureOnce self.original_get_database_account = cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount = self.mock_create_db_with_flag_enabled if use_multiple_write_locations else self.mock_create_db_with_flag_disabled enable_endpoint_discovery = False @@ -95,7 +95,7 @@ def validate_retry_on_session_not_availabe_with_endpoint_discovery_disabled(self self.assertEqual(e.sub_status, SubStatusCodes.READ_SESSION_NOTAVAILABLE) cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount = self.original_get_database_account - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def _MockExecuteFunctionSessionReadFailureOnce(self, function, *args, **kwargs): self.counter += 1 @@ -116,8 +116,8 @@ def test_validate_retry_on_session_not_availabe_with_endpoint_discovery_enabled( def validate_retry_on_session_not_availabe(self, is_preferred_locations_list_empty, use_multiple_write_locations): self.counter = 0 - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunctionSessionReadFailureTwice + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunctionSessionReadFailureTwice self.original_get_database_account = cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount = self.mock_create_db_with_flag_enabled if use_multiple_write_locations else self.mock_create_db_with_flag_disabled @@ -136,7 +136,7 @@ def validate_retry_on_session_not_availabe(self, is_preferred_locations_list_emp self.assertEqual(e.sub_status, SubStatusCodes.READ_SESSION_NOTAVAILABLE) cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount = self.original_get_database_account - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def _MockExecuteFunctionSessionReadFailureTwice(self, function, *args, **kwargs): request = args[1] @@ -376,11 +376,11 @@ def validate_request_endpoint_resolution(self, use_multiple_write_locations, end def resolve_endpoint_for_read_request(self, master_resource_type): operation_type = documents._OperationType.Read resource_type = ResourceType.Database if master_resource_type else ResourceType.Document - request = _RequestObject(resource_type, operation_type) + request = RequestObject(resource_type, operation_type) return self.location_cache.resolve_service_endpoint(request) def resolve_endpoint_for_write_request(self, resource_type, use_alternate_write_endpoint): operation_type = documents._OperationType.Create - request = _RequestObject(resource_type, operation_type) + request = RequestObject(resource_type, operation_type) request.route_to_location_with_preferred_location_flag(1 if use_alternate_write_endpoint else 0, ResourceType.IsCollectionChild(resource_type)) return self.location_cache.resolve_service_endpoint(request) diff --git a/sdk/cosmos/azure-cosmos/test/multimaster_tests.py b/sdk/cosmos/azure-cosmos/test/multimaster_tests.py index 8c0b5b24fa1a..11c740244dcc 100644 --- a/sdk/cosmos/azure-cosmos/test/multimaster_tests.py +++ b/sdk/cosmos/azure-cosmos/test/multimaster_tests.py @@ -2,9 +2,9 @@ import uuid import azure.cosmos.cosmos_client as cosmos_client import pytest -import azure.cosmos.constants as constants +import azure.cosmos._constants as constants from azure.cosmos.http_constants import HttpHeaders -import azure.cosmos.retry_utility as retry_utility +from azure.cosmos import _retry_utility import test_config from azure.cosmos.partition_key import PartitionKey @@ -31,8 +31,8 @@ def test_tentative_writes_header_not_present(self): def _validate_tentative_write_headers(self): - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction connectionPolicy = MultiMasterTests.connectionPolicy connectionPolicy.UseMultipleWriteLocations = True @@ -115,7 +115,7 @@ def _validate_tentative_write_headers(self): # Delete Database self.assertEqual(self.last_headers[10], is_allow_tentative_writes_set) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def _MockExecuteFunction(self, function, *args, **kwargs): self.counter += 1 diff --git a/sdk/cosmos/azure-cosmos/test/orderby_tests.py b/sdk/cosmos/azure-cosmos/test/orderby_tests.py index d8f85a49eb03..7b84ed856aaa 100644 --- a/sdk/cosmos/azure-cosmos/test/orderby_tests.py +++ b/sdk/cosmos/azure-cosmos/test/orderby_tests.py @@ -25,8 +25,8 @@ import azure.cosmos.documents as documents from azure.cosmos.partition_key import PartitionKey import azure.cosmos.cosmos_client as cosmos_client -from azure.cosmos import query_iterable -import azure.cosmos.base as base +from azure.cosmos import _query_iterable as query_iterable +import azure.cosmos._base as base from six.moves import xrange import test_config diff --git a/sdk/cosmos/azure-cosmos/test/proxy_tests.py b/sdk/cosmos/azure-cosmos/test/proxy_tests.py index c9144b8bec9e..552f76ee301c 100644 --- a/sdk/cosmos/azure-cosmos/test/proxy_tests.py +++ b/sdk/cosmos/azure-cosmos/test/proxy_tests.py @@ -22,7 +22,7 @@ import unittest import pytest import azure.cosmos.documents as documents -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection import test_config import six if six.PY2: diff --git a/sdk/cosmos/azure-cosmos/test/query_execution_context_tests.py b/sdk/cosmos/azure-cosmos/test/query_execution_context_tests.py index 4a0ac5692459..f8138b6d5a8a 100644 --- a/sdk/cosmos/azure-cosmos/test/query_execution_context_tests.py +++ b/sdk/cosmos/azure-cosmos/test/query_execution_context_tests.py @@ -24,8 +24,8 @@ import pytest from six.moves import xrange import azure.cosmos.cosmos_client as cosmos_client -from azure.cosmos.execution_context import base_execution_context as base_execution_context -import azure.cosmos.base as base +from azure.cosmos._execution_context import base_execution_context as base_execution_context +import azure.cosmos._base as base import test_config from azure.cosmos.partition_key import PartitionKey diff --git a/sdk/cosmos/azure-cosmos/test/retry_policy_tests.py b/sdk/cosmos/azure-cosmos/test/retry_policy_tests.py index bffe7a194d0e..f25dfce77e78 100644 --- a/sdk/cosmos/azure-cosmos/test/retry_policy_tests.py +++ b/sdk/cosmos/azure-cosmos/test/retry_policy_tests.py @@ -25,9 +25,9 @@ import pytest import azure.cosmos.documents as documents import azure.cosmos.errors as errors -import azure.cosmos.retry_options as retry_options +import azure.cosmos._retry_options as retry_options from azure.cosmos.http_constants import HttpHeaders, StatusCodes, SubStatusCodes -import azure.cosmos.retry_utility as retry_utility +from azure.cosmos import _retry_utility import test_config pytestmark = pytest.mark.cosmosEmulator @@ -78,9 +78,9 @@ def test_resource_throttle_retry_policy_default_retry_after(self): connection_policy = Test_retry_policy_tests.connectionPolicy connection_policy.RetryOptions = retry_options.RetryOptions(5) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction try: - retry_utility._ExecuteFunction = self._MockExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction document_definition = { 'id': 'doc', 'name': 'sample document', @@ -94,15 +94,15 @@ def test_resource_throttle_retry_policy_default_retry_after(self): self.assertGreaterEqual( self.created_collection.client_connection.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs], connection_policy.RetryOptions.MaxRetryAttemptCount * self.retry_after_in_milliseconds) finally: - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def test_resource_throttle_retry_policy_fixed_retry_after(self): connection_policy = Test_retry_policy_tests.connectionPolicy connection_policy.RetryOptions = retry_options.RetryOptions(5, 2000) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction try: - retry_utility._ExecuteFunction = self._MockExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction document_definition = { 'id': 'doc', 'name': 'sample document', @@ -117,15 +117,15 @@ def test_resource_throttle_retry_policy_fixed_retry_after(self): connection_policy.RetryOptions.MaxRetryAttemptCount * connection_policy.RetryOptions.FixedRetryIntervalInMilliseconds) finally: - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def test_resource_throttle_retry_policy_max_wait_time(self): connection_policy = Test_retry_policy_tests.connectionPolicy connection_policy.RetryOptions = retry_options.RetryOptions(5, 2000, 3) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction try: - retry_utility._ExecuteFunction = self._MockExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction document_definition = { 'id': 'doc', 'name': 'sample document', @@ -138,7 +138,7 @@ def test_resource_throttle_retry_policy_max_wait_time(self): self.assertGreaterEqual(self.created_collection.client_connection.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs], connection_policy.RetryOptions.MaxWaitTimeInSeconds * 1000) finally: - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def test_resource_throttle_retry_policy_query(self): connection_policy = Test_retry_policy_tests.connectionPolicy @@ -150,9 +150,9 @@ def test_resource_throttle_retry_policy_query(self): self.created_collection.create_item(body=document_definition) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction try: - retry_utility._ExecuteFunction = self._MockExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction try: list(self.created_collection.query_items( @@ -169,7 +169,7 @@ def test_resource_throttle_retry_policy_query(self): self.assertGreaterEqual(self.created_collection.client_connection.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs], connection_policy.RetryOptions.MaxRetryAttemptCount * self.retry_after_in_milliseconds) finally: - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def test_default_retry_policy_for_query(self): document_definition_1 = { 'id': 'doc1', @@ -183,9 +183,9 @@ def test_default_retry_policy_for_query(self): self.created_collection.create_item(body=document_definition_2) try: - original_execute_function = retry_utility._ExecuteFunction + original_execute_function = _retry_utility.ExecuteFunction mf = self.MockExecuteFunctionConnectionReset(original_execute_function) - retry_utility._ExecuteFunction = mf + _retry_utility.ExecuteFunction = mf docs = self.created_collection.query_items(query="Select * from c", max_item_count=1, enable_cross_partition_query=True) @@ -194,7 +194,7 @@ def test_default_retry_policy_for_query(self): self.assertEqual(result_docs[1]['id'], 'doc2') self.assertEqual(mf.counter, 12) finally: - retry_utility._ExecuteFunction = original_execute_function + _retry_utility.ExecuteFunction = original_execute_function self.created_collection.delete_item(item=result_docs[0], partition_key=result_docs[0]['id']) self.created_collection.delete_item(item=result_docs[1], partition_key=result_docs[1]['id']) @@ -207,16 +207,16 @@ def test_default_retry_policy_for_read(self): created_document = self.created_collection.create_item(body=document_definition) try: - original_execute_function = retry_utility._ExecuteFunction + original_execute_function = _retry_utility.ExecuteFunction mf = self.MockExecuteFunctionConnectionReset(original_execute_function) - retry_utility._ExecuteFunction = mf + _retry_utility.ExecuteFunction = mf doc = self.created_collection.read_item(item=created_document['id'], partition_key=created_document['id']) self.assertEqual(doc['id'], 'doc') self.assertEqual(mf.counter, 3) finally: - retry_utility._ExecuteFunction = original_execute_function + _retry_utility.ExecuteFunction = original_execute_function self.created_collection.delete_item(item=created_document, partition_key=created_document['id']) @@ -226,9 +226,9 @@ def test_default_retry_policy_for_create(self): 'key': 'value'} try: - original_execute_function = retry_utility._ExecuteFunction + original_execute_function = _retry_utility.ExecuteFunction mf = self.MockExecuteFunctionConnectionReset(original_execute_function) - retry_utility._ExecuteFunction = mf + _retry_utility.ExecuteFunction = mf created_document = {} try : @@ -241,7 +241,7 @@ def test_default_retry_policy_for_create(self): # 3 retries for readCollection. No retry for createDocument. self.assertEqual(mf.counter, 1) # TODO: The comment above implies that there should be a read in the test. But there isn't... finally: - retry_utility._ExecuteFunction = original_execute_function + _retry_utility.ExecuteFunction = original_execute_function def _MockExecuteFunction(self, function, *args, **kwargs): raise errors.HTTPFailure(StatusCodes.TOO_MANY_REQUESTS, "Request rate is too large", {HttpHeaders.RetryAfterInMilliseconds: self.retry_after_in_milliseconds}) diff --git a/sdk/cosmos/azure-cosmos/test/routing/collection_routing_map_test.py b/sdk/cosmos/azure-cosmos/test/routing/collection_routing_map_test.py index ae5fa2c011af..c6cae9afd4ce 100644 --- a/sdk/cosmos/azure-cosmos/test/routing/collection_routing_map_test.py +++ b/sdk/cosmos/azure-cosmos/test/routing/collection_routing_map_test.py @@ -21,9 +21,9 @@ import unittest import pytest -from azure.cosmos.routing.collection_routing_map import _CollectionRoutingMap -import azure.cosmos.routing.routing_range as routing_range -from azure.cosmos.routing.routing_map_provider import _PartitionKeyRangeCache +from azure.cosmos._routing.collection_routing_map import CollectionRoutingMap +import azure.cosmos._routing.routing_range as routing_range +from azure.cosmos._routing.routing_map_provider import PartitionKeyRangeCache pytestmark = pytest.mark.cosmosEmulator @@ -34,8 +34,8 @@ def test_advanced(self): partition_key_ranges = [{u'id': u'0', u'minInclusive': u'', u'maxExclusive': u'05C1C9CD673398'}, {u'id': u'1', u'minInclusive': u'05C1C9CD673398', u'maxExclusive': u'05C1D9CD673398'}, {u'id': u'2', u'minInclusive': u'05C1D9CD673398', u'maxExclusive': u'05C1E399CD6732'}, {u'id': u'3', u'minInclusive': u'05C1E399CD6732', u'maxExclusive': u'05C1E9CD673398'}, {u'id': u'4', u'minInclusive': u'05C1E9CD673398', u'maxExclusive': u'FF'}] partitionRangeWithInfo = [(r, True) for r in partition_key_ranges] - pkRange = routing_range._Range("", "FF", True, False) - collection_routing_map = _CollectionRoutingMap.CompleteRoutingMap(partitionRangeWithInfo, 'sample collection id') + pkRange = routing_range.Range("", "FF", True, False) + collection_routing_map = CollectionRoutingMap.CompleteRoutingMap(partitionRangeWithInfo, 'sample collection id') overlapping_partition_key_ranges = collection_routing_map.get_overlapping_ranges(pkRange) self.assertEqual(len(overlapping_partition_key_ranges), len(partition_key_ranges)) @@ -74,7 +74,7 @@ def get_range_id(r): return r[Id] # verify no thing is filtered out since there is no children ranges - filteredRanges = _PartitionKeyRangeCache._discard_parent_ranges(partitionKeyRanges) + filteredRanges = PartitionKeyRangeCache._discard_parent_ranges(partitionKeyRanges) self.assertEqual(['2', '0', '1', '3'], list(map(get_range_id, filteredRanges))) # add some children partition key ranges with parents Ids @@ -93,7 +93,7 @@ def get_range_id(r): Parents : ["0"]}) # verify the filtered range list has children ranges and the parent Ids are discarded - filteredRanges = _PartitionKeyRangeCache._discard_parent_ranges(partitionKeyRanges) + filteredRanges = PartitionKeyRangeCache._discard_parent_ranges(partitionKeyRanges) expectedRanges = ['2', '1', '3', '6', '7', '5'] self.assertEqual(expectedRanges, list(map(get_range_id, filteredRanges))) @@ -123,7 +123,7 @@ def test_collection_routing_map(self): 3) ] - crm = _CollectionRoutingMap.CompleteRoutingMap(partitionKeyRanges, "") + crm = CollectionRoutingMap.CompleteRoutingMap(partitionKeyRanges, "") self.assertEqual("0", crm._orderedPartitionKeyRanges[0][Id]) self.assertEqual("1", crm._orderedPartitionKeyRanges[1][Id]) @@ -144,7 +144,7 @@ def test_collection_routing_map(self): self.assertEqual("0", crm.get_range_by_partition_key_range_id("0")[Id]) self.assertEqual("1", crm.get_range_by_partition_key_range_id("1")[Id]) - fullRangeMinToMaxRange = routing_range._Range(_CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, _CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey, True, False) + fullRangeMinToMaxRange = routing_range.Range(CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey, True, False) overlappingRanges = crm.get_overlapping_ranges([fullRangeMinToMaxRange]) self.assertEqual(4, len(overlappingRanges)) @@ -154,18 +154,18 @@ def getKey(r): onlyParitionRanges.sort(key = getKey) self.assertEqual(overlappingRanges, onlyParitionRanges) - noPoint = routing_range._Range(_CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, _CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, False, False) + noPoint = routing_range.Range(CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, False, False) self.assertEqual(0, len(crm.get_overlapping_ranges([noPoint]))) - onePoint = routing_range._Range("0000000040", "0000000040", True, True) + onePoint = routing_range.Range("0000000040", "0000000040", True, True) overlappingPartitionKeyRanges = crm.get_overlapping_ranges([onePoint]) self.assertEqual(1, len(overlappingPartitionKeyRanges)) self.assertEqual("1", overlappingPartitionKeyRanges[0][Id]) ranges = [ - routing_range._Range("0000000040", "0000000045", True, True), - routing_range._Range("0000000045", "0000000046", True, True), - routing_range._Range("0000000046", "0000000050", True, True) + routing_range.Range("0000000040", "0000000045", True, True), + routing_range.Range("0000000045", "0000000046", True, True), + routing_range.Range("0000000046", "0000000050", True, True) ] overlappingPartitionKeyRanges = crm.get_overlapping_ranges(ranges) @@ -182,12 +182,12 @@ def test_invalid_routing_map(self): collectionUniqueId = "" def createRoutingMap(): - _CollectionRoutingMap.CompleteRoutingMap(partitionKeyRanges, collectionUniqueId) + CollectionRoutingMap.CompleteRoutingMap(partitionKeyRanges, collectionUniqueId) self.assertRaises(ValueError, createRoutingMap) def test_incomplete_routing_map(self): - crm = _CollectionRoutingMap.CompleteRoutingMap( + crm = CollectionRoutingMap.CompleteRoutingMap( [ ({ 'id' : "2", 'minInclusive' : "", 'maxExclusive' : "0000000030"}, 2), ({ 'id' : "3", 'minInclusive' : "0000000031", 'maxExclusive' : "FF"}, 2), @@ -195,7 +195,7 @@ def test_incomplete_routing_map(self): , "") self.assertIsNone(crm) - crm = _CollectionRoutingMap.CompleteRoutingMap( + crm = CollectionRoutingMap.CompleteRoutingMap( [ ({ 'id' : "2", 'minInclusive' : "", 'maxExclusive' : "0000000030"}, 2), ({ 'id' : "2", 'minInclusive' : "0000000030", 'maxExclusive' : "FF"}, 2), diff --git a/sdk/cosmos/azure-cosmos/test/routing/routing_map_provider_tests.py b/sdk/cosmos/azure-cosmos/test/routing/routing_map_provider_tests.py index 252c79e418d3..2601084c6fa4 100644 --- a/sdk/cosmos/azure-cosmos/test/routing/routing_map_provider_tests.py +++ b/sdk/cosmos/azure-cosmos/test/routing/routing_map_provider_tests.py @@ -21,9 +21,9 @@ import unittest import pytest -from azure.cosmos.routing.routing_map_provider import _SmartRoutingMapProvider -from azure.cosmos.routing.routing_map_provider import _CollectionRoutingMap -from azure.cosmos.routing import routing_range as routing_range +from azure.cosmos._routing.routing_map_provider import SmartRoutingMapProvider +from azure.cosmos._routing.routing_map_provider import CollectionRoutingMap +from azure.cosmos._routing import routing_range as routing_range pytestmark = pytest.mark.cosmosEmulator @@ -43,27 +43,27 @@ def setUp(self): self.smart_routing_map_provider = self.instantiate_smart_routing_map_provider(self.partition_key_ranges) partitionRangeWithInfo = map(lambda r: (r, True), self.partition_key_ranges) - self.cached_collection_routing_map = _CollectionRoutingMap.CompleteRoutingMap(partitionRangeWithInfo, 'sample collection id') + self.cached_collection_routing_map = CollectionRoutingMap.CompleteRoutingMap(partitionRangeWithInfo, 'sample collection id') def instantiate_smart_routing_map_provider(self, partition_key_ranges): client = RoutingMapProviderTests.MockedCosmosClientConnection(partition_key_ranges) - return _SmartRoutingMapProvider(client) + return SmartRoutingMapProvider(client) def test_full_range(self): # query range is the whole partition key range - pkRange = routing_range._Range("", "FF", True, False) + pkRange = routing_range.Range("", "FF", True, False) overlapping_partition_key_ranges = self.get_overlapping_ranges([pkRange]) self.assertEqual(len(overlapping_partition_key_ranges), len(self.partition_key_ranges)) self.assertEqual(overlapping_partition_key_ranges, self.partition_key_ranges) - pkRange = routing_range._Range("", "FF", False, False) + pkRange = routing_range.Range("", "FF", False, False) overlapping_partition_key_ranges = self.get_overlapping_ranges([pkRange]) self.assertEqual(overlapping_partition_key_ranges, self.partition_key_ranges) self.assertEqual(self.cached_collection_routing_map.get_overlapping_ranges([pkRange]), self.partition_key_ranges) def test_empty_ranges(self): # query range is the whole partition key range - pkRange = routing_range._Range("", "FF", True, False) + pkRange = routing_range.Range("", "FF", True, False) overlapping_partition_key_ranges = self.get_overlapping_ranges([pkRange]) self.assertEqual(len(overlapping_partition_key_ranges), len(self.partition_key_ranges)) self.assertEqual(overlapping_partition_key_ranges, self.partition_key_ranges) @@ -73,17 +73,17 @@ def test_empty_ranges(self): self.assertEqual(len(overlapping_partition_key_ranges), 0) # validate the overlaping partition key ranges results for empty ranges is empty - empty_start_range = routing_range._Range("", "", False, True) - empty_end_range = routing_range._Range("FF", "FF", False, True) - empty_range = routing_range._Range("AA", "AA", False, True) + empty_start_range = routing_range.Range("", "", False, True) + empty_end_range = routing_range.Range("FF", "FF", False, True) + empty_range = routing_range.Range("AA", "AA", False, True) self.validate_empty_query_ranges([empty_range], [empty_start_range], [empty_end_range], [empty_start_range, empty_range], [empty_start_range, empty_end_range], [empty_range, empty_end_range], [empty_range, empty_range, empty_end_range]) def test_bad_overlapping_query_ranges(self): # they share AA point - r1 = routing_range._Range("", "AA", True, True) - r2 = routing_range._Range("AA", "FF", True, False) + r1 = routing_range.Range("", "AA", True, True) + r2 = routing_range.Range("AA", "FF", True, False) def func_one_point_overlap(): self.smart_routing_map_provider.get_overlapping_ranges("sample collection id", [r1, r2]) @@ -91,16 +91,16 @@ def func_one_point_overlap(): self.assertRaises(ValueError, func_one_point_overlap) # overlapping range - r1 = routing_range._Range("", "AB", True, False) - r2 = routing_range._Range("AA", "FA", True, False) + r1 = routing_range.Range("", "AB", True, False) + r2 = routing_range.Range("AA", "FA", True, False) def func_overlap(): self.smart_routing_map_provider.get_overlapping_ranges("sample collection id", [r1, r2]) self.assertRaises(ValueError, func_overlap) - r1 = routing_range._Range("AB", "AC", True, False) - r1 = routing_range._Range("AA", "AB", True, False) + r1 = routing_range.Range("AB", "AC", True, False) + r1 = routing_range.Range("AA", "AB", True, False) def func_non_sorted(): self.smart_routing_map_provider.get_overlapping_ranges("sample collection id", [r1, r2]) @@ -108,31 +108,31 @@ def func_non_sorted(): self.assertRaises(ValueError, func_overlap) def test_empty_ranges_are_thrown_away(self): - e1 = routing_range._Range("", "", True, False) - r1 = routing_range._Range("", "AB", True, False) - e2 = routing_range._Range("AB", "AB", True, False) - r2 = routing_range._Range("AB", "AC", True, False) - e3 = routing_range._Range("AC", "AC", True, False) - e4 = routing_range._Range("AD", "AD", True, False) + e1 = routing_range.Range("", "", True, False) + r1 = routing_range.Range("", "AB", True, False) + e2 = routing_range.Range("AB", "AB", True, False) + r2 = routing_range.Range("AB", "AC", True, False) + e3 = routing_range.Range("AC", "AC", True, False) + e4 = routing_range.Range("AD", "AD", True, False) self.validate_overlapping_ranges_results([e1, r1, e2, r2, e3, e4], self.get_overlapping_ranges([r1, r2])) self.validate_against_cached_collection_results([e1, r1, e2, r2, e3, e4]) def test_simple(self): - r = routing_range._Range("AB", "AC", True, False) + r = routing_range.Range("AB", "AC", True, False) self.validate_against_cached_collection_results([r]) ranges = [ - routing_range._Range("0000000040", "0000000045", True, False), - routing_range._Range("0000000045", "0000000046", True, False), - routing_range._Range("0000000046", "0000000050", True, False) + routing_range.Range("0000000040", "0000000045", True, False), + routing_range.Range("0000000045", "0000000046", True, False), + routing_range.Range("0000000046", "0000000050", True, False) ] self.validate_against_cached_collection_results(ranges) def test_simple_boundary(self): ranges = [ - routing_range._Range("05C1C9CD673398", "05C1D9CD673398", True, False), + routing_range.Range("05C1C9CD673398", "05C1D9CD673398", True, False), ] self.validate_against_cached_collection_results(ranges) self.validate_overlapping_ranges_results(ranges, self.partition_key_ranges[1:2]) @@ -140,10 +140,10 @@ def test_simple_boundary(self): def test_two_adjacent_boundary(self): ranges = [ # self.partition_key_ranges[1] - routing_range._Range("05C1C9CD673398", "05C1D9CD673398", True, False), + routing_range.Range("05C1C9CD673398", "05C1D9CD673398", True, False), # self.partition_key_ranges[2] - routing_range._Range("05C1D9CD673398", "05C1D9CD673399", True, False), + routing_range.Range("05C1D9CD673398", "05C1D9CD673399", True, False), ] self.validate_against_cached_collection_results(ranges) self.validate_overlapping_ranges_results(ranges, self.partition_key_ranges[1:3]) @@ -151,8 +151,8 @@ def test_two_adjacent_boundary(self): def test_two_ranges_in_one_partition_key_range(self): # two ranges fall in the same partition key range ranges = [ - routing_range._Range("05C1C9CD673400", "05C1C9CD673401", True, False), - routing_range._Range("05C1C9CD673402", "05C1C9CD673403", True, False), + routing_range.Range("05C1C9CD673400", "05C1C9CD673401", True, False), + routing_range.Range("05C1C9CD673402", "05C1C9CD673403", True, False), ] self.validate_against_cached_collection_results(ranges) @@ -161,15 +161,15 @@ def test_two_ranges_in_one_partition_key_range(self): def test_complex(self): ranges = [ # all are covered by self.partition_key_ranges[1] - routing_range._Range("05C1C9CD673398", "05C1D9CD673391", True, False), - routing_range._Range("05C1D9CD673391", "05C1D9CD673392", True, False), - routing_range._Range("05C1D9CD673393", "05C1D9CD673395", True, False), - routing_range._Range("05C1D9CD673395", "05C1D9CD673395", True, False), + routing_range.Range("05C1C9CD673398", "05C1D9CD673391", True, False), + routing_range.Range("05C1D9CD673391", "05C1D9CD673392", True, False), + routing_range.Range("05C1D9CD673393", "05C1D9CD673395", True, False), + routing_range.Range("05C1D9CD673395", "05C1D9CD673395", True, False), # all are covered by self.partition_key_ranges[4]] - routing_range._Range("05C1E9CD673398", "05C1E9CD673401", True, False), - routing_range._Range("05C1E9CD673402", "05C1E9CD673403", True, False), + routing_range.Range("05C1E9CD673398", "05C1E9CD673401", True, False), + routing_range.Range("05C1E9CD673402", "05C1E9CD673403", True, False), # empty range - routing_range._Range("FF", "FF", True, False), + routing_range.Range("FF", "FF", True, False), ] self.validate_against_cached_collection_results(ranges) self.validate_overlapping_ranges_results(ranges, [self.partition_key_ranges[1], self.partition_key_ranges[4]]) diff --git a/sdk/cosmos/azure-cosmos/test/routing_map_tests.py b/sdk/cosmos/azure-cosmos/test/routing_map_tests.py index 48bbae7b173c..f2f396700be2 100644 --- a/sdk/cosmos/azure-cosmos/test/routing_map_tests.py +++ b/sdk/cosmos/azure-cosmos/test/routing_map_tests.py @@ -23,8 +23,8 @@ import pytest import azure.cosmos.documents as documents import azure.cosmos.cosmos_client as cosmos_client -from azure.cosmos.routing.routing_map_provider import _PartitionKeyRangeCache -from azure.cosmos.routing import routing_range as routing_range +from azure.cosmos._routing.routing_map_provider import PartitionKeyRangeCache +from azure.cosmos._routing import routing_range as routing_range import test_config pytestmark = pytest.mark.cosmosEmulator @@ -66,8 +66,8 @@ def test_read_partition_key_ranges(self): def test_routing_map_provider(self): partition_key_ranges = list(self.client.client_connection._ReadPartitionKeyRanges(self.collection_link)) - routing_mp = _PartitionKeyRangeCache(self.client.client_connection) - overlapping_partition_key_ranges = routing_mp.get_overlapping_ranges(self.collection_link, routing_range._Range("", "FF", True, False)) + routing_mp = PartitionKeyRangeCache(self.client.client_connection) + overlapping_partition_key_ranges = routing_mp.get_overlapping_ranges(self.collection_link, routing_range.Range("", "FF", True, False)) self.assertEqual(len(overlapping_partition_key_ranges), len(partition_key_ranges)) self.assertEqual(overlapping_partition_key_ranges, partition_key_ranges) diff --git a/sdk/cosmos/azure-cosmos/test/session_tests.py b/sdk/cosmos/azure-cosmos/test/session_tests.py index 03c28703615b..cdd0799dafd5 100644 --- a/sdk/cosmos/azure-cosmos/test/session_tests.py +++ b/sdk/cosmos/azure-cosmos/test/session_tests.py @@ -9,8 +9,8 @@ import test_config import azure.cosmos.errors as errors from azure.cosmos.http_constants import StatusCodes, SubStatusCodes, HttpHeaders -import azure.cosmos.synchronized_request as synchronized_request -import azure.cosmos.retry_utility as retry_utility +import azure.cosmos._synchronized_request as synchronized_request +from azure.cosmos import _retry_utility pytestmark = pytest.mark.cosmosEmulator @@ -62,8 +62,8 @@ def _MockExecuteFunctionSessionReadFailureOnce(self, function, *args, **kwargs): def test_clear_session_token(self): created_document = self.created_collection.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunctionSessionReadFailureOnce + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunctionSessionReadFailureOnce try: self.created_collection.read_item(item=created_document['id'], partition_key='mypk') except errors.HTTPFailure as e: @@ -71,7 +71,7 @@ def test_clear_session_token(self): 'dbs/' + self.created_db.id + '/colls/' + self.created_collection.id), "") self.assertEqual(e.status_code, StatusCodes.NOT_FOUND) self.assertEqual(e.sub_status, SubStatusCodes.READ_SESSION_NOTAVAILABLE) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def _MockExecuteFunctionInvalidSessionToken(self, function, *args, **kwargs): response = {'_self':'dbs/90U1AA==/colls/90U1AJ4o6iA=/docs/90U1AJ4o6iABCT0AAAAABA==/', 'id':'1'} @@ -79,12 +79,12 @@ def _MockExecuteFunctionInvalidSessionToken(self, function, *args, **kwargs): return (response, headers) def test_internal_server_error_raised_for_invalid_session_token_received_from_server(self): - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunctionInvalidSessionToken + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunctionInvalidSessionToken try: self.created_collection.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}) self.fail() except errors.HTTPFailure as e: self.assertEqual(e._http_error_message, "Could not parse the received session token: 2") self.assertEqual(e.status_code, StatusCodes.INTERNAL_SERVER_ERROR) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction diff --git a/sdk/cosmos/azure-cosmos/test/session_token_unit_tests.py b/sdk/cosmos/azure-cosmos/test/session_token_unit_tests.py index ecdc2b1de238..76e9482ade4f 100644 --- a/sdk/cosmos/azure-cosmos/test/session_token_unit_tests.py +++ b/sdk/cosmos/azure-cosmos/test/session_token_unit_tests.py @@ -1,6 +1,6 @@ import unittest import pytest -from azure.cosmos.vector_session_token import VectorSessionToken +from azure.cosmos._vector_session_token import VectorSessionToken from azure.cosmos.errors import CosmosError pytestmark = pytest.mark.cosmosEmulator diff --git a/sdk/cosmos/azure-cosmos/test/streaming_failover_test.py b/sdk/cosmos/azure-cosmos/test/streaming_failover_test.py index 4a594fed9e96..73ab656627b2 100644 --- a/sdk/cosmos/azure-cosmos/test/streaming_failover_test.py +++ b/sdk/cosmos/azure-cosmos/test/streaming_failover_test.py @@ -1,13 +1,13 @@ import unittest -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection import pytest import azure.cosmos.documents as documents import azure.cosmos.errors as errors from azure.cosmos.http_constants import HttpHeaders, StatusCodes, SubStatusCodes -import azure.cosmos.retry_utility as retry_utility -import azure.cosmos.endpoint_discovery_retry_policy as endpoint_discovery_retry_policy -from azure.cosmos.request_object import _RequestObject -import azure.cosmos.global_endpoint_manager as global_endpoint_manager +from azure.cosmos import _retry_utility +from azure.cosmos import _endpoint_discovery_retry_policy +from azure.cosmos._request_object import RequestObject +import azure.cosmos._global_endpoint_manager as global_endpoint_manager import azure.cosmos.http_constants as http_constants pytestmark = pytest.mark.cosmosEmulator @@ -30,8 +30,8 @@ class TestStreamingFailover(unittest.TestCase): endpoint_sequence = [] def test_streaming_failover(self): - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunctionEndpointDiscover + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunctionEndpointDiscover connection_policy = documents.ConnectionPolicy() connection_policy.PreferredLocations = self.preferred_regional_endpoints connection_policy.DisableSSLVerification = True @@ -62,7 +62,7 @@ def test_streaming_failover(self): self.assertEqual(self.endpoint_sequence[i], self.WRITE_ENDPOINT2) cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount = self.original_get_database_account - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def mock_get_database_account(self, url_connection = None): database_account = documents.DatabaseAccount() @@ -105,16 +105,16 @@ def test_retry_policy_does_not_mark_null_locations_unavailable(self): # these functions should not be called self._read_counter = 0 self._write_counter = 0 - request = _RequestObject(http_constants.ResourceType.Document, documents._OperationType.Read) - endpointDiscovery_retry_policy = endpoint_discovery_retry_policy._EndpointDiscoveryRetryPolicy(documents.ConnectionPolicy(), endpoint_manager, request) + request = RequestObject(http_constants.ResourceType.Document, documents._OperationType.Read) + endpointDiscovery_retry_policy = _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy(documents.ConnectionPolicy(), endpoint_manager, request) endpointDiscovery_retry_policy.ShouldRetry(errors.HTTPFailure(http_constants.StatusCodes.FORBIDDEN)) self.assertEqual(self._read_counter, 0) self.assertEqual(self._write_counter, 0) self._read_counter = 0 self._write_counter = 0 - request = _RequestObject(http_constants.ResourceType.Document, documents._OperationType.Create) - endpointDiscovery_retry_policy = endpoint_discovery_retry_policy._EndpointDiscoveryRetryPolicy(documents.ConnectionPolicy(), endpoint_manager, request) + request = RequestObject(http_constants.ResourceType.Document, documents._OperationType.Create) + endpointDiscovery_retry_policy = _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy(documents.ConnectionPolicy(), endpoint_manager, request) endpointDiscovery_retry_policy.ShouldRetry(errors.HTTPFailure(http_constants.StatusCodes.FORBIDDEN)) self.assertEqual(self._read_counter, 0) self.assertEqual(self._write_counter, 0) diff --git a/sdk/cosmos/azure-cosmos/test/utils_tests.py b/sdk/cosmos/azure-cosmos/test/utils_tests.py index 0dc7d7b8315a..4349502fe854 100644 --- a/sdk/cosmos/azure-cosmos/test/utils_tests.py +++ b/sdk/cosmos/azure-cosmos/test/utils_tests.py @@ -21,7 +21,7 @@ import unittest import pytest -import azure.cosmos.utils as utils +import azure.cosmos._utils as _utils import platform import azure.cosmos.http_constants as http_constants @@ -33,7 +33,7 @@ class UtilsTests(unittest.TestCase): """ def test_user_agent(self): - user_agent = utils._get_user_agent() + user_agent = _utils.get_user_agent() expected_user_agent = "{}/{} Python/{} azure-cosmos/{}".format( platform.system(), platform.release(), platform.python_version(), From b1953adc2c97dd1e039408dcb5f56f73563f7dbc Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:17:51 -0700 Subject: [PATCH 054/244] Accept extension of JSON content-type (#6583) * Accept extension of JSON content-type * Adding text/something+json test * Support digit --- .../azure/core/pipeline/policies/universal.py | 9 ++++----- sdk/core/azure-core/tests/test_universal_pipeline.py | 12 ++++++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/universal.py b/sdk/core/azure-core/azure/core/pipeline/policies/universal.py index b9338950ff38..77ffd69c6a39 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/universal.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/universal.py @@ -266,10 +266,9 @@ def on_response(self, request, response): class ContentDecodePolicy(SansIOHTTPPolicy): """Policy for decoding unstreamed response content. """ - JSON_MIMETYPES = [ - 'application/json', - 'text/json' # Because we're open minded people... - ] + # Accept "text" because we're open minded people... + JSON_REGEXP = re.compile(r'^(application|text)/([0-9a-z+.]+\+)?json$') + # Name used in context CONTEXT_NAME = "deserialized_data" @@ -301,7 +300,7 @@ def deserialize_from_text(cls, response, content_type=None): if content_type is None: return data - if content_type in cls.JSON_MIMETYPES: + if cls.JSON_REGEXP.match(content_type): try: return json.loads(data_as_str) except ValueError as err: diff --git a/sdk/core/azure-core/tests/test_universal_pipeline.py b/sdk/core/azure-core/tests/test_universal_pipeline.py index cc783b0d4c74..035a462d388a 100644 --- a/sdk/core/azure-core/tests/test_universal_pipeline.py +++ b/sdk/core/azure-core/tests/test_universal_pipeline.py @@ -160,6 +160,18 @@ def body(self): result = response.context["deserialized_data"] assert result["success"] is True + # Simple JSON with complex content_type + response = build_response(b'{"success": true}', content_type="application/vnd.microsoft.appconfig.kv.v1+json") + raw_deserializer.on_response(None, response) + result = response.context["deserialized_data"] + assert result["success"] is True + + # Simple JSON with complex content_type, v2 + response = build_response(b'{"success": true}', content_type="text/vnd.microsoft.appconfig.kv.v1+json") + raw_deserializer.on_response(None, response) + result = response.context["deserialized_data"] + assert result["success"] is True + # For compat, if no content-type, decode JSON response = build_response(b'"data"') raw_deserializer.on_response(None, response) From e21940b2063ee8e4ac0b781ccf1a0831cd9a1c4d Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:40:30 -0700 Subject: [PATCH 055/244] Remove docdb mgmt package from master (#6585) --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 - sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 - sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 - .../azure-mgmt-documentdb/azure/__init__.py | 1 - .../azure/mgmt/__init__.py | 1 - .../azure/mgmt/documentdb/__init__.py | 18 - .../azure/mgmt/documentdb/document_db.py | 83 -- .../azure/mgmt/documentdb/models/__init__.py | 52 - .../documentdb/models/consistency_policy.py | 50 - .../documentdb/models/database_account.py | 117 --- .../database_account_connection_string.py | 39 - ...tabase_account_create_update_parameters.py | 90 -- ..._account_list_connection_strings_result.py | 29 - .../database_account_list_keys_result.py | 53 - ...base_account_list_read_only_keys_result.py | 41 - .../models/database_account_paged.py | 27 - .../database_account_patch_parameters.py | 31 - ...abase_account_regenerate_key_parameters.py | 33 - .../documentdb/models/document_db_enums.py | 41 - .../documentdb/models/failover_policies.py | 28 - .../mgmt/documentdb/models/failover_policy.py | 48 - .../azure/mgmt/documentdb/models/location.py | 58 -- .../azure/mgmt/documentdb/models/resource.py | 54 -- .../mgmt/documentdb/operations/__init__.py | 16 - .../database_accounts_operations.py | 918 ------------------ .../azure/mgmt/documentdb/version.py | 13 - .../azure_bdist_wheel.py | 54 -- sdk/cosmos/azure-mgmt-documentdb/build.json | 5 - .../dev_requirements.txt | 1 - .../azure-mgmt-documentdb/sdk_packaging.toml | 2 - sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 - sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 -- ..._mgmt_documentdb.test_accounts_create.yaml | 193 ---- ..._mgmt_documentdb.test_accounts_delete.yaml | 467 --------- ...gmt_documentdb.test_accounts_features.yaml | 272 ------ .../tests/test_mgmt_documentdb.py | 146 --- 36 files changed, 3147 deletions(-) delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst deleted file mode 100644 index eb7345b4071e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. :changelog: - -Release History -=============== - -0.1.3 (2017-05-02) -++++++++++++++++++ - -* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix - -0.1.2 (2017-04-20) -++++++++++++++++++ - -This wheel package is now built with the azure wheel extension - -0.1.1 (2017-03-21) -++++++++++++++++++ - -* Added support for listing database account connection strings - -0.1.0 (2017-01-31) -++++++++++++++++++ - -* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in deleted file mode 100644 index 9ecaeb15de50..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst deleted file mode 100644 index a5204ea75358..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/README.rst +++ /dev/null @@ -1,52 +0,0 @@ -Microsoft Azure SDK for Python -============================== - -This is the Microsoft Azure DocumentDB Management Client Library. - -Azure Resource Manager (ARM) is the next generation of management APIs that -replace the old Azure Service Management (ASM). - -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. - -For the older Azure Service Management (ASM) libraries, see -`azure-servicemanagement-legacy `__ library. - -For a more complete set of Azure libraries, see the `azure `__ bundle package. - - -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - -Usage -===== - -For code examples, see `DocumentDB Management -`__ -on readthedocs.org. - - -Provide Feedback -================ - -If you encounter any bugs or have suggestions, please file an issue in the -`Issues `__ -section of the project. - - -.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py deleted file mode 100755 index 3ec900145f1e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .document_db import DocumentDB -from .version import VERSION - -__all__ = ['DocumentDB'] - -__version__ = VERSION - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py deleted file mode 100755 index 5eda44ab3e32..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import ServiceClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.database_accounts_operations import DatabaseAccountsOperations -from . import models - - -class DocumentDBConfiguration(AzureConfiguration): - """Configuration for DocumentDB - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") - if not base_url: - base_url = 'https://management.azure.com' - - super(DocumentDBConfiguration, self).__init__(base_url) - - self.add_user_agent('documentdb/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class DocumentDB(object): - """Azure DocumentDB Database Service Resource Provider REST API - - :ivar config: Configuration for client. - :vartype config: DocumentDBConfiguration - - :ivar database_accounts: DatabaseAccounts operations - :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2015-04-08' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.database_accounts = DatabaseAccountsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py deleted file mode 100755 index 2ed68c568a84..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .consistency_policy import ConsistencyPolicy -from .location import Location -from .failover_policy import FailoverPolicy -from .database_account import DatabaseAccount -from .failover_policies import FailoverPolicies -from .resource import Resource -from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters -from .database_account_patch_parameters import DatabaseAccountPatchParameters -from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult -from .database_account_list_keys_result import DatabaseAccountListKeysResult -from .database_account_connection_string import DatabaseAccountConnectionString -from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult -from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters -from .database_account_paged import DatabaseAccountPaged -from .document_db_enums import ( - DatabaseAccountKind, - DatabaseAccountOfferType, - DefaultConsistencyLevel, - KeyKind, -) - -__all__ = [ - 'ConsistencyPolicy', - 'Location', - 'FailoverPolicy', - 'DatabaseAccount', - 'FailoverPolicies', - 'Resource', - 'DatabaseAccountCreateUpdateParameters', - 'DatabaseAccountPatchParameters', - 'DatabaseAccountListReadOnlyKeysResult', - 'DatabaseAccountListKeysResult', - 'DatabaseAccountConnectionString', - 'DatabaseAccountListConnectionStringsResult', - 'DatabaseAccountRegenerateKeyParameters', - 'DatabaseAccountPaged', - 'DatabaseAccountKind', - 'DatabaseAccountOfferType', - 'DefaultConsistencyLevel', - 'KeyKind', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py deleted file mode 100755 index d8cefd4c0b59..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConsistencyPolicy(Model): - """The consistency policy for the DocumentDB database account. - - :param default_consistency_level: The default consistency level and - configuration settings of the DocumentDB account. Possible values include: - 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' - :type default_consistency_level: str or :class:`DefaultConsistencyLevel - ` - :param max_staleness_prefix: When used with the Bounded Staleness - consistency level, this value represents the number of stale requests - tolerated. Accepted range for this value is 1 – 2,147,483,647. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_staleness_prefix: long - :param max_interval_in_seconds: When used with the Bounded Staleness - consistency level, this value represents the time amount of staleness (in - seconds) tolerated. Accepted range for this value is 1 - 100. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_interval_in_seconds: int - """ - - _validation = { - 'default_consistency_level': {'required': True}, - 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, - 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, - 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, - 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, - } - - def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): - self.default_consistency_level = default_consistency_level - self.max_staleness_prefix = max_staleness_prefix - self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py deleted file mode 100755 index 89031adc35cb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccount(Resource): - """A DocumentDB database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param provisioning_state: - :type provisioning_state: str - :ivar document_endpoint: The connection endpoint for the DocumentDB - database account. - :vartype document_endpoint: str - :ivar database_account_offer_type: The offer type for the DocumentDB - database account. Default value: Standard. Possible values include: - 'Standard' - :vartype database_account_offer_type: str or - :class:`DatabaseAccountOfferType - ` - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - :param consistency_policy: The consistency policy for the DocumentDB - database account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :ivar write_locations: An array that contains the write location for the - DocumentDB account. - :vartype write_locations: list of :class:`Location - ` - :ivar read_locations: An array that contains of the read locations enabled - for the DocumentDB account. - :vartype read_locations: list of :class:`Location - ` - :ivar failover_policies: An array that contains the regions ordered by - their failover priorities. - :vartype failover_policies: list of :class:`FailoverPolicy - ` - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'document_endpoint': {'readonly': True}, - 'database_account_offer_type': {'readonly': True}, - 'write_locations': {'readonly': True}, - 'read_locations': {'readonly': True}, - 'failover_policies': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, - 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, - 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): - super(DatabaseAccount, self).__init__(location=location, tags=tags) - self.kind = kind - self.provisioning_state = provisioning_state - self.document_endpoint = None - self.database_account_offer_type = None - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover - self.consistency_policy = consistency_policy - self.write_locations = None - self.read_locations = None - self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py deleted file mode 100755 index db1828208069..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountConnectionString(Model): - """Connection string for the DocumentDB account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar connection_string: Value of the connection string - :vartype connection_string: str - :ivar description: Description of the connection string - :vartype description: str - """ - - _validation = { - 'connection_string': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self): - self.connection_string = None - self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py deleted file mode 100755 index 30978f482f0b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccountCreateUpdateParameters(Resource): - """Parameters to create and update DocumentDB database accounts. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param consistency_policy: The consistency policy for the DocumentDB - account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :param locations: An array that contains the georeplication locations - enabled for the DocumentDB account. - :type locations: list of :class:`Location - ` - :ivar database_account_offer_type: Default value: "Standard" . - :vartype database_account_offer_type: str - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - } - - database_account_offer_type = "Standard" - - def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): - super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) - self.kind = kind - self.consistency_policy = consistency_policy - self.locations = locations - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py deleted file mode 100755 index 7cddc00a3de1..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListConnectionStringsResult(Model): - """The connection strings for the given database account. - - :param connection_strings: An array that contains the connection strings - for the DocumentDB account. - :type connection_strings: list of :class:`DatabaseAccountConnectionString - ` - """ - - _attribute_map = { - 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, - } - - def __init__(self, connection_strings=None): - self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py deleted file mode 100755 index 4d775054ac14..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListKeysResult(Model): - """The access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_master_key: Base 64 encoded value of the primary read-write - key. - :vartype primary_master_key: str - :ivar secondary_master_key: Base 64 encoded value of the secondary - read-write key. - :vartype secondary_master_key: str - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_master_key': {'readonly': True}, - 'secondary_master_key': {'readonly': True}, - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, - 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, - 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_master_key = None - self.secondary_master_key = None - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py deleted file mode 100755 index 3330353950c6..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListReadOnlyKeysResult(Model): - """The read-only access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py deleted file mode 100755 index 4cb94909c515..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseAccountPaged(Paged): - """ - A paging container for iterating over a list of DatabaseAccount object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py deleted file mode 100755 index be78a4fd6817..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountPatchParameters(Model): - """Parameters for patching Azure DocumentDB database account properties. - - :param tags: - :type tags: dict - """ - - _validation = { - 'tags': {'required': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, tags): - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py deleted file mode 100755 index 3bff90d33db3..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountRegenerateKeyParameters(Model): - """Parameters to regenerate the keys within the database account. - - :param key_kind: The access key to regenerate. Possible values include: - 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - """ - - _validation = { - 'key_kind': {'required': True}, - } - - _attribute_map = { - 'key_kind': {'key': 'keyKind', 'type': 'str'}, - } - - def __init__(self, key_kind): - self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py deleted file mode 100755 index 1e87cecaeb2a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class DatabaseAccountKind(Enum): - - global_document_db = "GlobalDocumentDB" - mongo_db = "MongoDB" - parse = "Parse" - - -class DatabaseAccountOfferType(Enum): - - standard = "Standard" - - -class DefaultConsistencyLevel(Enum): - - eventual = "Eventual" - session = "Session" - bounded_staleness = "BoundedStaleness" - strong = "Strong" - consistent_prefix = "ConsistentPrefix" - - -class KeyKind(Enum): - - primary = "primary" - secondary = "secondary" - primary_readonly = "primaryReadonly" - secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py deleted file mode 100755 index 4c3ebff5e3b5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicies(Model): - """The list of new failover policies for the failover priority change. - - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - """ - - _attribute_map = { - 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, failover_policies=None): - self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py deleted file mode 100755 index 99cc2769403b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicy(Model): - """The failover policy for a given region of a database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region in which the database - account replicates to. Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region in which the database account - exists. - :type location_name: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py deleted file mode 100755 index 8bc82bde2c3f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Location(Model): - """A region in which the Azure DocumentDB database account is deployed. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region within the database account. - Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region. - :type location_name: str - :ivar document_endpoint: The connection endpoint for the specific region. - Example: - https://<accountName>-<locationName>.documents.azure.com:443/ - :vartype document_endpoint: str - :param provisioning_state: - :type provisioning_state: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.document_endpoint = None - self.provisioning_state = provisioning_state - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py deleted file mode 100755 index d5e887d0b78a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """A database account resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, location, tags=None): - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py deleted file mode 100755 index 27ed7c069537..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .database_accounts_operations import DatabaseAccountsOperations - -__all__ = [ - 'DatabaseAccountsOperations', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py deleted file mode 100755 index 2bb39b1f6839..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py +++ /dev/null @@ -1,918 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrestazure.azure_operation import AzureOperationPoller -import uuid - -from .. import models - - -class DatabaseAccountsOperations(object): - """DatabaseAccountsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". - """ - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-04-08" - - self.config = config - - def get( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Retrieves the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def patch( - self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): - """Patches the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param tags: - :type tags: dict - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - update_parameters = models.DatabaseAccountPatchParameters(tags=tags) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(update_parameters, 'DatabaseAccountPatchParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.patch(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def create_or_update( - self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): - """Creates or updates an Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param create_update_parameters: The parameters to provide for the - current database account. - :type create_update_parameters: - :class:`DatabaseAccountCreateUpdateParameters - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def delete( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Deletes an existing Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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 - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - def long_running_send(): - - request = self._client.delete(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def failover_priority_change( - self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): - """Changes the failover priority for the Azure DocumentDB database - account. A failover priority of 0 indicates a write region. The maximum - value for a failover priority = (total number of regions - 1). Failover - priority values must be unique for each of the regions in which the - database account exists. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(failover_parameters, 'FailoverPolicies') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - subscription. - - :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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - given resource group. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the access keys for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_connection_strings( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the connection strings for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListConnectionStringsResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_read_only_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the read-only access keys for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListReadOnlyKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def regenerate_key( - self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): - """Regenerates an access key for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param key_kind: The access key to regenerate. Possible values - include: 'primary', 'secondary', 'primaryReadonly', - 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def check_name_exists( - self, account_name, custom_headers=None, raw=False, **operation_config): - """Checks that the Azure DocumentDB account name already exists. A valid - account name may contain only lowercase letters, numbers, and the '-' - character, and must be between 3 and 50 characters. - - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: bool - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' - path_format_arguments = { - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.head(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = (response.status_code == 200) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py deleted file mode 100755 index 95ed79d29108..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.3" - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -from distutils import log as logger -import os.path - -from wheel.bdist_wheel import bdist_wheel -class azure_bdist_wheel(bdist_wheel): - """The purpose of this class is to build wheel a little differently than the sdist, - without requiring to build the wheel from the sdist (i.e. you can build the wheel - directly from source). - """ - - description = "Create an Azure wheel distribution" - - user_options = bdist_wheel.user_options + \ - [('azure-namespace-package=', None, - "Name of the deepest nspkg used")] - - def initialize_options(self): - bdist_wheel.initialize_options(self) - self.azure_namespace_package = None - - def finalize_options(self): - bdist_wheel.finalize_options(self) - if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): - raise ValueError("azure_namespace_package must finish by -nspkg") - - def run(self): - if not self.distribution.install_requires: - self.distribution.install_requires = [] - self.distribution.install_requires.append( - "{}>=2.0.0".format(self.azure_namespace_package)) - bdist_wheel.run(self) - - def write_record(self, bdist_dir, distinfo_dir): - if self.azure_namespace_package: - # Split and remove last part, assuming it's "nspkg" - subparts = self.azure_namespace_package.split('-')[0:-1] - folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] - for azure_sub_package in folder_with_init: - init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') - if os.path.isfile(init_file): - logger.info("manually remove {} while building the wheel".format(init_file)) - os.remove(init_file) - else: - raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) - bdist_wheel.write_record(self, bdist_dir, distinfo_dir) -cmdclass = { - 'bdist_wheel': azure_bdist_wheel, -} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json deleted file mode 100644 index 4d98fc12a39e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/build.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "autorest": "1.0.1-20170501-2300-nightly", - "date": "2017-05-01T20:13:42Z", - "version": "0.1.3" -} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt deleted file mode 100644 index 6ccb7f031ddd..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt +++ /dev/null @@ -1 +0,0 @@ --e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml deleted file mode 100644 index e7687fdae93b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml +++ /dev/null @@ -1,2 +0,0 @@ -[packaging] -auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg deleted file mode 100644 index 856f4164982c..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[bdist_wheel] -universal=1 -azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py deleted file mode 100644 index ddef54e31bb5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.py +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env python - -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup -try: - from azure_bdist_wheel import cmdclass -except ImportError: - from distutils import log as logger - logger.warn("Wheel is not available, disabling bdist_wheel hook") - cmdclass = {} - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-documentdb" -PACKAGE_PPRINT_NAME = "DocumentDB Management" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') - -# azure v0.x is not compatible with this package -# azure v0.x used to have a __version__ attribute (newer versions don't) -try: - import azure - try: - ver = azure.__version__ - raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' - ) - except AttributeError: - pass -except ImportError: - pass - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError('Cannot find version information') - -with open('README.rst', encoding='utf-8') as f: - readme = f.read() -with open('HISTORY.rst', encoding='utf-8') as f: - history = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + history, - license='MIT License', - author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', - classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'License :: OSI Approved :: MIT License', - ], - zip_safe=False, - packages=find_packages(), - install_requires=[ - 'msrestazure~=0.4.7', - 'azure-common~=1.1.5', - ], - cmdclass=cmdclass -) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml deleted file mode 100644 index d470d7f8673d..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml +++ /dev/null @@ -1,193 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] - method: HEAD - uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: ''} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['142'] - Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-ratelimit-remaining-tenant-reads: ['14999'] - x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] - status: {code: 404, message: NotFound} -- request: - body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], - "databaseAccountOfferType": "Standard"}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['121'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['910'] - x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Completed","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['33'] - x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml deleted file mode 100644 index e6f4e2348f8f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml +++ /dev/null @@ -1,467 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' - under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' - was not found."}}'} - headers: - Cache-Control: [no-cache] - Content-Length: ['214'] - Content-Type: [application/json; charset=utf-8] - Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-failure-cause: [gateway] - x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] - status: {code: 404, message: Not Found} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml deleted file mode 100644 index b2e4b82a9d9e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml +++ /dev/null @@ -1,272 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1144'] - x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1156'] - x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['2225'] - x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] - status: {code: 200, message: Ok} -- request: - body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['73'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 - response: - body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique - and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['170'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] - status: {code: 400, message: BadRequest} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 - response: - body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['239'] - x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] - status: {code: 200, message: Ok} -- request: - body: '{"keyKind": "primary"}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['22'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] - x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py deleted file mode 100644 index 902666a22cf0..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py +++ /dev/null @@ -1,146 +0,0 @@ -# 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. -#-------------------------------------------------------------------------- -import unittest - -import azure.mgmt.documentdb -from msrestazure.azure_exceptions import CloudError -from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer - - -class MgmtDocDBTest(AzureMgmtTestCase): - - def setUp(self): - super(MgmtDocDBTest, self).setUp() - self.client = self.create_mgmt_client( - azure.mgmt.documentdb.DocumentDB - ) - - @ResourceGroupPreparer() - def test_accounts_create(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtst') - - self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) - - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - account = async_docdb_create.result() - self.assertIsNotNone(account) - # Rest API issue - # self.assertEqual(account.name, account_name) - - @ResourceGroupPreparer() - def test_accounts_features(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtest') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - account = self.client.database_accounts.get( - resource_group.name, - account_name - ) - self.assertEqual(account.name, account_name) - - my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) - self.assertEqual(len(my_accounts), 1) - self.assertEqual(my_accounts[0].name, account_name) - - my_accounts = list(self.client.database_accounts.list()) - self.assertTrue(len(my_accounts) >= 1) - self.assertTrue(any(db.name == account_name for db in my_accounts)) - - # I guess we can make this test with no error, need to check with DocDB team - # This is an interesting test anyway, this implies that the serialization works - # and error message is available. Since this method does not return an object - # (i.e. no deserialization to test), this is a complete test. - # We are NOT here to test the RestAPI, but the Swagger file and Python code. - with self.assertRaises(CloudError) as cm: - async_change = self.client.database_accounts.failover_priority_change( - resource_group.name, - account_name, - [{ - 'location_name': self.region, - 'failover_priority': 0 - }] - ) - async_change.wait() - self.assertIn('Failover priorities must be unique', cm.exception.message) - - my_keys = self.client.database_accounts.list_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_master_key) - self.assertIsNotNone(my_keys.secondary_master_key) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - my_keys = self.client.database_accounts.list_read_only_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - async_regenerate = self.client.database_accounts.regenerate_key( - resource_group.name, - account_name, - "primary" - ) - async_regenerate.wait() - - @ResourceGroupPreparer() - def test_accounts_delete(self, resource_group, location): - account_name = self.get_resource_name('pydocumentdbtst') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - # Current implementation of msrestazure does not support 404 as a end of LRO delete - # https://github.com/Azure/msrestazure-for-python/issues/7 - async_delete = self.client.database_accounts.delete(resource_group.name, account_name) - try: - async_delete.wait() - except CloudError as err: - if err.response.status_code != 404: - raise - - -#------------------------------------------------------------------------------ -if __name__ == '__main__': - unittest.main() From 7a55156d0b9ddd10e0a53ff25a78da71ff837dff Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:42:03 -0700 Subject: [PATCH 056/244] Revert "Remove docdb mgmt package from master (#6585)" (#6593) This reverts commit d2ed7d87997eac9b715ee9802c15349a12446b84. --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 + sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 + sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 + .../azure-mgmt-documentdb/azure/__init__.py | 1 + .../azure/mgmt/__init__.py | 1 + .../azure/mgmt/documentdb/__init__.py | 18 + .../azure/mgmt/documentdb/document_db.py | 83 ++ .../azure/mgmt/documentdb/models/__init__.py | 52 + .../documentdb/models/consistency_policy.py | 50 + .../documentdb/models/database_account.py | 117 +++ .../database_account_connection_string.py | 39 + ...tabase_account_create_update_parameters.py | 90 ++ ..._account_list_connection_strings_result.py | 29 + .../database_account_list_keys_result.py | 53 + ...base_account_list_read_only_keys_result.py | 41 + .../models/database_account_paged.py | 27 + .../database_account_patch_parameters.py | 31 + ...abase_account_regenerate_key_parameters.py | 33 + .../documentdb/models/document_db_enums.py | 41 + .../documentdb/models/failover_policies.py | 28 + .../mgmt/documentdb/models/failover_policy.py | 48 + .../azure/mgmt/documentdb/models/location.py | 58 ++ .../azure/mgmt/documentdb/models/resource.py | 54 ++ .../mgmt/documentdb/operations/__init__.py | 16 + .../database_accounts_operations.py | 918 ++++++++++++++++++ .../azure/mgmt/documentdb/version.py | 13 + .../azure_bdist_wheel.py | 54 ++ sdk/cosmos/azure-mgmt-documentdb/build.json | 5 + .../dev_requirements.txt | 1 + .../azure-mgmt-documentdb/sdk_packaging.toml | 2 + sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 + sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 ++ ..._mgmt_documentdb.test_accounts_create.yaml | 193 ++++ ..._mgmt_documentdb.test_accounts_delete.yaml | 467 +++++++++ ...gmt_documentdb.test_accounts_features.yaml | 272 ++++++ .../tests/test_mgmt_documentdb.py | 146 +++ 36 files changed, 3147 insertions(+) create mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in create mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json create mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt create mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst new file mode 100644 index 000000000000..eb7345b4071e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst @@ -0,0 +1,24 @@ +.. :changelog: + +Release History +=============== + +0.1.3 (2017-05-02) +++++++++++++++++++ + +* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix + +0.1.2 (2017-04-20) +++++++++++++++++++ + +This wheel package is now built with the azure wheel extension + +0.1.1 (2017-03-21) +++++++++++++++++++ + +* Added support for listing database account connection strings + +0.1.0 (2017-01-31) +++++++++++++++++++ + +* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in new file mode 100644 index 000000000000..9ecaeb15de50 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in @@ -0,0 +1,2 @@ +include *.rst +include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst new file mode 100644 index 000000000000..a5204ea75358 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/README.rst @@ -0,0 +1,52 @@ +Microsoft Azure SDK for Python +============================== + +This is the Microsoft Azure DocumentDB Management Client Library. + +Azure Resource Manager (ARM) is the next generation of management APIs that +replace the old Azure Service Management (ASM). + +This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. + +For the older Azure Service Management (ASM) libraries, see +`azure-servicemanagement-legacy `__ library. + +For a more complete set of Azure libraries, see the `azure `__ bundle package. + + +Compatibility +============= + +**IMPORTANT**: If you have an earlier version of the azure package +(version < 1.0), you should uninstall it before installing this package. + +You can check the version using pip: + +.. code:: shell + + pip freeze + +If you see azure==0.11.0 (or any version below 1.0), uninstall it first: + +.. code:: shell + + pip uninstall azure + + +Usage +===== + +For code examples, see `DocumentDB Management +`__ +on readthedocs.org. + + +Provide Feedback +================ + +If you encounter any bugs or have suggestions, please file an issue in the +`Issues `__ +section of the project. + + +.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py new file mode 100755 index 000000000000..3ec900145f1e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .document_db import DocumentDB +from .version import VERSION + +__all__ = ['DocumentDB'] + +__version__ = VERSION + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py new file mode 100755 index 000000000000..5eda44ab3e32 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import ServiceClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.database_accounts_operations import DatabaseAccountsOperations +from . import models + + +class DocumentDBConfiguration(AzureConfiguration): + """Configuration for DocumentDB + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not isinstance(subscription_id, str): + raise TypeError("Parameter 'subscription_id' must be str.") + if not base_url: + base_url = 'https://management.azure.com' + + super(DocumentDBConfiguration, self).__init__(base_url) + + self.add_user_agent('documentdb/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class DocumentDB(object): + """Azure DocumentDB Database Service Resource Provider REST API + + :ivar config: Configuration for client. + :vartype config: DocumentDBConfiguration + + :ivar database_accounts: DatabaseAccounts operations + :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) + self._client = ServiceClient(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2015-04-08' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.database_accounts = DatabaseAccountsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py new file mode 100755 index 000000000000..2ed68c568a84 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .consistency_policy import ConsistencyPolicy +from .location import Location +from .failover_policy import FailoverPolicy +from .database_account import DatabaseAccount +from .failover_policies import FailoverPolicies +from .resource import Resource +from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters +from .database_account_patch_parameters import DatabaseAccountPatchParameters +from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult +from .database_account_list_keys_result import DatabaseAccountListKeysResult +from .database_account_connection_string import DatabaseAccountConnectionString +from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult +from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters +from .database_account_paged import DatabaseAccountPaged +from .document_db_enums import ( + DatabaseAccountKind, + DatabaseAccountOfferType, + DefaultConsistencyLevel, + KeyKind, +) + +__all__ = [ + 'ConsistencyPolicy', + 'Location', + 'FailoverPolicy', + 'DatabaseAccount', + 'FailoverPolicies', + 'Resource', + 'DatabaseAccountCreateUpdateParameters', + 'DatabaseAccountPatchParameters', + 'DatabaseAccountListReadOnlyKeysResult', + 'DatabaseAccountListKeysResult', + 'DatabaseAccountConnectionString', + 'DatabaseAccountListConnectionStringsResult', + 'DatabaseAccountRegenerateKeyParameters', + 'DatabaseAccountPaged', + 'DatabaseAccountKind', + 'DatabaseAccountOfferType', + 'DefaultConsistencyLevel', + 'KeyKind', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py new file mode 100755 index 000000000000..d8cefd4c0b59 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConsistencyPolicy(Model): + """The consistency policy for the DocumentDB database account. + + :param default_consistency_level: The default consistency level and + configuration settings of the DocumentDB account. Possible values include: + 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' + :type default_consistency_level: str or :class:`DefaultConsistencyLevel + ` + :param max_staleness_prefix: When used with the Bounded Staleness + consistency level, this value represents the number of stale requests + tolerated. Accepted range for this value is 1 – 2,147,483,647. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_staleness_prefix: long + :param max_interval_in_seconds: When used with the Bounded Staleness + consistency level, this value represents the time amount of staleness (in + seconds) tolerated. Accepted range for this value is 1 - 100. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_interval_in_seconds: int + """ + + _validation = { + 'default_consistency_level': {'required': True}, + 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, + 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, + 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, + 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, + } + + def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): + self.default_consistency_level = default_consistency_level + self.max_staleness_prefix = max_staleness_prefix + self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py new file mode 100755 index 000000000000..89031adc35cb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py @@ -0,0 +1,117 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccount(Resource): + """A DocumentDB database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param provisioning_state: + :type provisioning_state: str + :ivar document_endpoint: The connection endpoint for the DocumentDB + database account. + :vartype document_endpoint: str + :ivar database_account_offer_type: The offer type for the DocumentDB + database account. Default value: Standard. Possible values include: + 'Standard' + :vartype database_account_offer_type: str or + :class:`DatabaseAccountOfferType + ` + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + :param consistency_policy: The consistency policy for the DocumentDB + database account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :ivar write_locations: An array that contains the write location for the + DocumentDB account. + :vartype write_locations: list of :class:`Location + ` + :ivar read_locations: An array that contains of the read locations enabled + for the DocumentDB account. + :vartype read_locations: list of :class:`Location + ` + :ivar failover_policies: An array that contains the regions ordered by + their failover priorities. + :vartype failover_policies: list of :class:`FailoverPolicy + ` + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'document_endpoint': {'readonly': True}, + 'database_account_offer_type': {'readonly': True}, + 'write_locations': {'readonly': True}, + 'read_locations': {'readonly': True}, + 'failover_policies': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, + 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, + 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): + super(DatabaseAccount, self).__init__(location=location, tags=tags) + self.kind = kind + self.provisioning_state = provisioning_state + self.document_endpoint = None + self.database_account_offer_type = None + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover + self.consistency_policy = consistency_policy + self.write_locations = None + self.read_locations = None + self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py new file mode 100755 index 000000000000..db1828208069 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountConnectionString(Model): + """Connection string for the DocumentDB account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar connection_string: Value of the connection string + :vartype connection_string: str + :ivar description: Description of the connection string + :vartype description: str + """ + + _validation = { + 'connection_string': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self): + self.connection_string = None + self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py new file mode 100755 index 000000000000..30978f482f0b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccountCreateUpdateParameters(Resource): + """Parameters to create and update DocumentDB database accounts. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param consistency_policy: The consistency policy for the DocumentDB + account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :param locations: An array that contains the georeplication locations + enabled for the DocumentDB account. + :type locations: list of :class:`Location + ` + :ivar database_account_offer_type: Default value: "Standard" . + :vartype database_account_offer_type: str + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'locations': {'required': True}, + 'database_account_offer_type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + } + + database_account_offer_type = "Standard" + + def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): + super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) + self.kind = kind + self.consistency_policy = consistency_policy + self.locations = locations + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py new file mode 100755 index 000000000000..7cddc00a3de1 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListConnectionStringsResult(Model): + """The connection strings for the given database account. + + :param connection_strings: An array that contains the connection strings + for the DocumentDB account. + :type connection_strings: list of :class:`DatabaseAccountConnectionString + ` + """ + + _attribute_map = { + 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, + } + + def __init__(self, connection_strings=None): + self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py new file mode 100755 index 000000000000..4d775054ac14 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListKeysResult(Model): + """The access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_master_key: Base 64 encoded value of the primary read-write + key. + :vartype primary_master_key: str + :ivar secondary_master_key: Base 64 encoded value of the secondary + read-write key. + :vartype secondary_master_key: str + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_master_key': {'readonly': True}, + 'secondary_master_key': {'readonly': True}, + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, + 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, + 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_master_key = None + self.secondary_master_key = None + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py new file mode 100755 index 000000000000..3330353950c6 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListReadOnlyKeysResult(Model): + """The read-only access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py new file mode 100755 index 000000000000..4cb94909c515 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class DatabaseAccountPaged(Paged): + """ + A paging container for iterating over a list of DatabaseAccount object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py new file mode 100755 index 000000000000..be78a4fd6817 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountPatchParameters(Model): + """Parameters for patching Azure DocumentDB database account properties. + + :param tags: + :type tags: dict + """ + + _validation = { + 'tags': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, tags): + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py new file mode 100755 index 000000000000..3bff90d33db3 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountRegenerateKeyParameters(Model): + """Parameters to regenerate the keys within the database account. + + :param key_kind: The access key to regenerate. Possible values include: + 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + """ + + _validation = { + 'key_kind': {'required': True}, + } + + _attribute_map = { + 'key_kind': {'key': 'keyKind', 'type': 'str'}, + } + + def __init__(self, key_kind): + self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py new file mode 100755 index 000000000000..1e87cecaeb2a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class DatabaseAccountKind(Enum): + + global_document_db = "GlobalDocumentDB" + mongo_db = "MongoDB" + parse = "Parse" + + +class DatabaseAccountOfferType(Enum): + + standard = "Standard" + + +class DefaultConsistencyLevel(Enum): + + eventual = "Eventual" + session = "Session" + bounded_staleness = "BoundedStaleness" + strong = "Strong" + consistent_prefix = "ConsistentPrefix" + + +class KeyKind(Enum): + + primary = "primary" + secondary = "secondary" + primary_readonly = "primaryReadonly" + secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py new file mode 100755 index 000000000000..4c3ebff5e3b5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicies(Model): + """The list of new failover policies for the failover priority change. + + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + """ + + _attribute_map = { + 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, failover_policies=None): + self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py new file mode 100755 index 000000000000..99cc2769403b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicy(Model): + """The failover policy for a given region of a database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region in which the database + account replicates to. Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region in which the database account + exists. + :type location_name: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py new file mode 100755 index 000000000000..8bc82bde2c3f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Location(Model): + """A region in which the Azure DocumentDB database account is deployed. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region within the database account. + Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region. + :type location_name: str + :ivar document_endpoint: The connection endpoint for the specific region. + Example: + https://<accountName>-<locationName>.documents.azure.com:443/ + :vartype document_endpoint: str + :param provisioning_state: + :type provisioning_state: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'document_endpoint': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.document_endpoint = None + self.provisioning_state = provisioning_state + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py new file mode 100755 index 000000000000..d5e887d0b78a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """A database account resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, location, tags=None): + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py new file mode 100755 index 000000000000..27ed7c069537 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py @@ -0,0 +1,16 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .database_accounts_operations import DatabaseAccountsOperations + +__all__ = [ + 'DatabaseAccountsOperations', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py new file mode 100755 index 000000000000..2bb39b1f6839 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py @@ -0,0 +1,918 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrestazure.azure_operation import AzureOperationPoller +import uuid + +from .. import models + + +class DatabaseAccountsOperations(object): + """DatabaseAccountsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". + """ + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-04-08" + + self.config = config + + def get( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Retrieves the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def patch( + self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): + """Patches the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param tags: + :type tags: dict + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + update_parameters = models.DatabaseAccountPatchParameters(tags=tags) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(update_parameters, 'DatabaseAccountPatchParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.patch(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def create_or_update( + self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates an Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param create_update_parameters: The parameters to provide for the + current database account. + :type create_update_parameters: + :class:`DatabaseAccountCreateUpdateParameters + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.put(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def delete( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Deletes an existing Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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 + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + def long_running_send(): + + request = self._client.delete(url, query_parameters) + return self._client.send(request, header_parameters, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def failover_priority_change( + self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): + """Changes the failover priority for the Azure DocumentDB database + account. A failover priority of 0 indicates a write region. The maximum + value for a failover priority = (total number of regions - 1). Failover + priority values must be unique for each of the regions in which the + database account exists. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(failover_parameters, 'FailoverPolicies') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + subscription. + + :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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + given resource group. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the access keys for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_connection_strings( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the connection strings for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListConnectionStringsResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_read_only_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the read-only access keys for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListReadOnlyKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def regenerate_key( + self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): + """Regenerates an access key for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param key_kind: The access key to regenerate. Possible values + include: 'primary', 'secondary', 'primaryReadonly', + 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def check_name_exists( + self, account_name, custom_headers=None, raw=False, **operation_config): + """Checks that the Azure DocumentDB account name already exists. A valid + account name may contain only lowercase letters, numbers, and the '-' + character, and must be between 3 and 50 characters. + + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: bool + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' + path_format_arguments = { + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.head(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = (response.status_code == 200) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py new file mode 100755 index 000000000000..95ed79d29108 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.3" + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py new file mode 100644 index 000000000000..8a81d1b61775 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py @@ -0,0 +1,54 @@ +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +from distutils import log as logger +import os.path + +from wheel.bdist_wheel import bdist_wheel +class azure_bdist_wheel(bdist_wheel): + """The purpose of this class is to build wheel a little differently than the sdist, + without requiring to build the wheel from the sdist (i.e. you can build the wheel + directly from source). + """ + + description = "Create an Azure wheel distribution" + + user_options = bdist_wheel.user_options + \ + [('azure-namespace-package=', None, + "Name of the deepest nspkg used")] + + def initialize_options(self): + bdist_wheel.initialize_options(self) + self.azure_namespace_package = None + + def finalize_options(self): + bdist_wheel.finalize_options(self) + if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): + raise ValueError("azure_namespace_package must finish by -nspkg") + + def run(self): + if not self.distribution.install_requires: + self.distribution.install_requires = [] + self.distribution.install_requires.append( + "{}>=2.0.0".format(self.azure_namespace_package)) + bdist_wheel.run(self) + + def write_record(self, bdist_dir, distinfo_dir): + if self.azure_namespace_package: + # Split and remove last part, assuming it's "nspkg" + subparts = self.azure_namespace_package.split('-')[0:-1] + folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] + for azure_sub_package in folder_with_init: + init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') + if os.path.isfile(init_file): + logger.info("manually remove {} while building the wheel".format(init_file)) + os.remove(init_file) + else: + raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) + bdist_wheel.write_record(self, bdist_dir, distinfo_dir) +cmdclass = { + 'bdist_wheel': azure_bdist_wheel, +} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json new file mode 100644 index 000000000000..4d98fc12a39e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/build.json @@ -0,0 +1,5 @@ +{ + "autorest": "1.0.1-20170501-2300-nightly", + "date": "2017-05-01T20:13:42Z", + "version": "0.1.3" +} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt new file mode 100644 index 000000000000..6ccb7f031ddd --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt @@ -0,0 +1 @@ +-e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml new file mode 100644 index 000000000000..e7687fdae93b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg new file mode 100644 index 000000000000..856f4164982c --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg @@ -0,0 +1,3 @@ +[bdist_wheel] +universal=1 +azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py new file mode 100644 index 000000000000..ddef54e31bb5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup +try: + from azure_bdist_wheel import cmdclass +except ImportError: + from distutils import log as logger + logger.warn("Wheel is not available, disabling bdist_wheel hook") + cmdclass = {} + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-documentdb" +PACKAGE_PPRINT_NAME = "DocumentDB Management" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.rst', encoding='utf-8') as f: + readme = f.read() +with open('HISTORY.rst', encoding='utf-8') as f: + history = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + history, + license='MIT License', + author='Microsoft Corporation', + author_email='ptvshelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(), + install_requires=[ + 'msrestazure~=0.4.7', + 'azure-common~=1.1.5', + ], + cmdclass=cmdclass +) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml new file mode 100644 index 000000000000..d470d7f8673d --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml @@ -0,0 +1,193 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] + method: HEAD + uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: ''} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['142'] + Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-ratelimit-remaining-tenant-reads: ['14999'] + x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] + status: {code: 404, message: NotFound} +- request: + body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], + "databaseAccountOfferType": "Standard"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['121'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['910'] + x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Completed","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['33'] + x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml new file mode 100644 index 000000000000..e6f4e2348f8f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml @@ -0,0 +1,467 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' + under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' + was not found."}}'} + headers: + Cache-Control: [no-cache] + Content-Length: ['214'] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-failure-cause: [gateway] + x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] + status: {code: 404, message: Not Found} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml new file mode 100644 index 000000000000..b2e4b82a9d9e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml @@ -0,0 +1,272 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1144'] + x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1156'] + x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2225'] + x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] + status: {code: 200, message: Ok} +- request: + body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['73'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 + response: + body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique + and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['170'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] + status: {code: 400, message: BadRequest} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 + response: + body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['239'] + x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] + status: {code: 200, message: Ok} +- request: + body: '{"keyKind": "primary"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['22'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] + x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py new file mode 100644 index 000000000000..902666a22cf0 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py @@ -0,0 +1,146 @@ +# 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. +#-------------------------------------------------------------------------- +import unittest + +import azure.mgmt.documentdb +from msrestazure.azure_exceptions import CloudError +from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer + + +class MgmtDocDBTest(AzureMgmtTestCase): + + def setUp(self): + super(MgmtDocDBTest, self).setUp() + self.client = self.create_mgmt_client( + azure.mgmt.documentdb.DocumentDB + ) + + @ResourceGroupPreparer() + def test_accounts_create(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtst') + + self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) + + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + account = async_docdb_create.result() + self.assertIsNotNone(account) + # Rest API issue + # self.assertEqual(account.name, account_name) + + @ResourceGroupPreparer() + def test_accounts_features(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtest') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + account = self.client.database_accounts.get( + resource_group.name, + account_name + ) + self.assertEqual(account.name, account_name) + + my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) + self.assertEqual(len(my_accounts), 1) + self.assertEqual(my_accounts[0].name, account_name) + + my_accounts = list(self.client.database_accounts.list()) + self.assertTrue(len(my_accounts) >= 1) + self.assertTrue(any(db.name == account_name for db in my_accounts)) + + # I guess we can make this test with no error, need to check with DocDB team + # This is an interesting test anyway, this implies that the serialization works + # and error message is available. Since this method does not return an object + # (i.e. no deserialization to test), this is a complete test. + # We are NOT here to test the RestAPI, but the Swagger file and Python code. + with self.assertRaises(CloudError) as cm: + async_change = self.client.database_accounts.failover_priority_change( + resource_group.name, + account_name, + [{ + 'location_name': self.region, + 'failover_priority': 0 + }] + ) + async_change.wait() + self.assertIn('Failover priorities must be unique', cm.exception.message) + + my_keys = self.client.database_accounts.list_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_master_key) + self.assertIsNotNone(my_keys.secondary_master_key) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + my_keys = self.client.database_accounts.list_read_only_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + async_regenerate = self.client.database_accounts.regenerate_key( + resource_group.name, + account_name, + "primary" + ) + async_regenerate.wait() + + @ResourceGroupPreparer() + def test_accounts_delete(self, resource_group, location): + account_name = self.get_resource_name('pydocumentdbtst') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + # Current implementation of msrestazure does not support 404 as a end of LRO delete + # https://github.com/Azure/msrestazure-for-python/issues/7 + async_delete = self.client.database_accounts.delete(resource_group.name, account_name) + try: + async_delete.wait() + except CloudError as err: + if err.response.status_code != 404: + raise + + +#------------------------------------------------------------------------------ +if __name__ == '__main__': + unittest.main() From 15b8cdb128ef632f1bcdc03e4f3c0dcb9964952e Mon Sep 17 00:00:00 2001 From: "openapi-bot[bot]" <37845953+openapi-bot[bot]@users.noreply.github.com> Date: Thu, 1 Aug 2019 05:35:08 +0000 Subject: [PATCH 057/244] Generated from 368b5914a375e09ef413285c932b72038a8af7e4 (#48) fix: sql preview model validation errors - Remove empty "body" for RESPONSE_SCHEMA_NOT_IN_SPEC errors - IsAzureMonitorTargetEnabled -> isAzureMonitorTargetEnabled - "State" -> "state" - emailAccountAdmins "true" -> true - Add 202 response for RestorePoints_Create - password -> certPassword for ManagedInstanceTdeCertificates_Create and TdeCertificates_Create --- .../azure-mgmt-sql/azure/mgmt/sql/__init__.py | 7 +- .../azure/mgmt/sql/_configuration.py | 49 + ...nt_client.py => _sql_management_client.py} | 215 +- .../azure/mgmt/sql/models/__init__.py | 1004 +- .../azure/mgmt/sql/models/_models.py | 8891 +++++++++++++++++ .../azure/mgmt/sql/models/_models_py3.py | 8891 +++++++++++++++++ .../azure/mgmt/sql/models/_paged_models.py | 885 ++ ...ums.py => _sql_management_client_enums.py} | 49 +- .../sql/models/automatic_tuning_options.py | 57 - .../models/automatic_tuning_options_py3.py | 57 - .../models/automatic_tuning_server_options.py | 56 - .../automatic_tuning_server_options_py3.py | 56 - .../backup_long_term_retention_policy.py | 62 - .../backup_long_term_retention_policy_py3.py | 62 - .../backup_short_term_retention_policy.py | 47 - ...ackup_short_term_retention_policy_paged.py | 27 - .../backup_short_term_retention_policy_py3.py | 47 - .../models/check_name_availability_request.py | 44 - .../check_name_availability_request_py3.py | 44 - .../check_name_availability_response.py | 54 - .../check_name_availability_response_py3.py | 54 - .../complete_database_restore_definition.py | 35 - ...omplete_database_restore_definition_py3.py | 35 - ...reate_database_restore_point_definition.py | 35 - ...e_database_restore_point_definition_py3.py | 35 - .../mgmt/sql/models/data_masking_policy.py | 80 - .../sql/models/data_masking_policy_py3.py | 80 - .../mgmt/sql/models/data_masking_rule.py | 129 - .../sql/models/data_masking_rule_paged.py | 27 - .../mgmt/sql/models/data_masking_rule_py3.py | 129 - .../azure/mgmt/sql/models/database.py | 237 - .../sql/models/database_automatic_tuning.py | 57 - .../models/database_automatic_tuning_py3.py | 57 - .../models/database_blob_auditing_policy.py | 165 - .../database_blob_auditing_policy_py3.py | 165 - .../mgmt/sql/models/database_operation.py | 115 - .../sql/models/database_operation_paged.py | 27 - .../mgmt/sql/models/database_operation_py3.py | 115 - .../azure/mgmt/sql/models/database_paged.py | 27 - .../azure/mgmt/sql/models/database_py3.py | 237 - .../models/database_security_alert_policy.py | 102 - .../database_security_alert_policy_py3.py | 102 - .../azure/mgmt/sql/models/database_update.py | 209 - .../mgmt/sql/models/database_update_py3.py | 209 - .../azure/mgmt/sql/models/database_usage.py | 66 - .../mgmt/sql/models/database_usage_paged.py | 27 - .../mgmt/sql/models/database_usage_py3.py | 66 - .../database_vulnerability_assessment.py | 67 - ...database_vulnerability_assessment_paged.py | 27 - .../database_vulnerability_assessment_py3.py | 67 - ..._vulnerability_assessment_rule_baseline.py | 50 - ...erability_assessment_rule_baseline_item.py | 35 - ...ility_assessment_rule_baseline_item_py3.py | 35 - ...nerability_assessment_rule_baseline_py3.py | 50 - ...e_vulnerability_assessment_scans_export.py | 48 - ...lnerability_assessment_scans_export_py3.py | 48 - .../mgmt/sql/models/edition_capability.py | 58 - .../mgmt/sql/models/edition_capability_py3.py | 58 - .../azure/mgmt/sql/models/elastic_pool.py | 95 - .../mgmt/sql/models/elastic_pool_activity.py | 151 - .../sql/models/elastic_pool_activity_paged.py | 27 - .../sql/models/elastic_pool_activity_py3.py | 151 - .../models/elastic_pool_database_activity.py | 125 - .../elastic_pool_database_activity_paged.py | 27 - .../elastic_pool_database_activity_py3.py | 125 - .../models/elastic_pool_edition_capability.py | 58 - .../elastic_pool_edition_capability_py3.py | 58 - .../mgmt/sql/models/elastic_pool_operation.py | 114 - .../models/elastic_pool_operation_paged.py | 27 - .../sql/models/elastic_pool_operation_py3.py | 114 - .../mgmt/sql/models/elastic_pool_paged.py | 27 - ...tabase_max_performance_level_capability.py | 58 - ...se_max_performance_level_capability_py3.py | 58 - ...tabase_min_performance_level_capability.py | 51 - ...se_min_performance_level_capability_py3.py | 51 - .../elastic_pool_per_database_settings.py | 32 - .../elastic_pool_per_database_settings_py3.py | 32 - ...astic_pool_performance_level_capability.py | 88 - ...c_pool_performance_level_capability_py3.py | 88 - .../azure/mgmt/sql/models/elastic_pool_py3.py | 95 - .../mgmt/sql/models/elastic_pool_update.py | 54 - .../sql/models/elastic_pool_update_py3.py | 54 - .../mgmt/sql/models/encryption_protector.py | 80 - .../sql/models/encryption_protector_paged.py | 27 - .../sql/models/encryption_protector_py3.py | 80 - .../azure/mgmt/sql/models/export_request.py | 63 - .../mgmt/sql/models/export_request_py3.py | 63 - .../extended_database_blob_auditing_policy.py | 165 - ...ended_database_blob_auditing_policy_py3.py | 165 - .../extended_server_blob_auditing_policy.py | 165 - ...xtended_server_blob_auditing_policy_py3.py | 165 - .../azure/mgmt/sql/models/failover_group.py | 88 - .../mgmt/sql/models/failover_group_paged.py | 27 - .../mgmt/sql/models/failover_group_py3.py | 88 - .../failover_group_read_only_endpoint.py | 30 - .../failover_group_read_only_endpoint_py3.py | 30 - .../failover_group_read_write_endpoint.py | 45 - .../failover_group_read_write_endpoint_py3.py | 45 - .../mgmt/sql/models/failover_group_update.py | 44 - .../sql/models/failover_group_update_py3.py | 44 - .../azure/mgmt/sql/models/firewall_rule.py | 68 - .../mgmt/sql/models/firewall_rule_paged.py | 27 - .../mgmt/sql/models/firewall_rule_py3.py | 68 - .../mgmt/sql/models/geo_backup_policy.py | 66 - .../sql/models/geo_backup_policy_paged.py | 27 - .../mgmt/sql/models/geo_backup_policy_py3.py | 66 - .../mgmt/sql/models/import_export_response.py | 87 - .../sql/models/import_export_response_py3.py | 87 - .../sql/models/import_extension_request.py | 81 - .../models/import_extension_request_py3.py | 81 - .../azure/mgmt/sql/models/import_request.py | 91 - .../mgmt/sql/models/import_request_py3.py | 91 - .../sql/models/instance_failover_group.py | 82 - .../models/instance_failover_group_paged.py | 27 - .../sql/models/instance_failover_group_py3.py | 82 - ...tance_failover_group_read_only_endpoint.py | 30 - ...e_failover_group_read_only_endpoint_py3.py | 30 - ...ance_failover_group_read_write_endpoint.py | 45 - ..._failover_group_read_write_endpoint_py3.py | 45 - .../azure/mgmt/sql/models/job.py | 56 - .../azure/mgmt/sql/models/job_agent.py | 67 - .../azure/mgmt/sql/models/job_agent_paged.py | 27 - .../azure/mgmt/sql/models/job_agent_py3.py | 67 - .../azure/mgmt/sql/models/job_agent_update.py | 28 - .../mgmt/sql/models/job_agent_update_py3.py | 28 - .../azure/mgmt/sql/models/job_credential.py | 55 - .../mgmt/sql/models/job_credential_paged.py | 27 - .../mgmt/sql/models/job_credential_py3.py | 55 - .../azure/mgmt/sql/models/job_execution.py | 113 - .../mgmt/sql/models/job_execution_paged.py | 27 - .../mgmt/sql/models/job_execution_py3.py | 113 - .../mgmt/sql/models/job_execution_target.py | 46 - .../sql/models/job_execution_target_py3.py | 46 - .../azure/mgmt/sql/models/job_paged.py | 27 - .../azure/mgmt/sql/models/job_py3.py | 56 - .../azure/mgmt/sql/models/job_schedule.py | 48 - .../azure/mgmt/sql/models/job_schedule_py3.py | 48 - .../azure/mgmt/sql/models/job_step.py | 75 - .../azure/mgmt/sql/models/job_step_action.py | 45 - .../mgmt/sql/models/job_step_action_py3.py | 45 - .../sql/models/job_step_execution_options.py | 49 - .../models/job_step_execution_options_py3.py | 49 - .../azure/mgmt/sql/models/job_step_output.py | 67 - .../mgmt/sql/models/job_step_output_py3.py | 67 - .../azure/mgmt/sql/models/job_step_paged.py | 27 - .../azure/mgmt/sql/models/job_step_py3.py | 75 - .../azure/mgmt/sql/models/job_target.py | 65 - .../azure/mgmt/sql/models/job_target_group.py | 49 - .../mgmt/sql/models/job_target_group_paged.py | 27 - .../mgmt/sql/models/job_target_group_py3.py | 49 - .../azure/mgmt/sql/models/job_target_py3.py | 65 - .../azure/mgmt/sql/models/job_version.py | 42 - .../mgmt/sql/models/job_version_paged.py | 27 - .../azure/mgmt/sql/models/job_version_py3.py | 42 - .../sql/models/license_type_capability.py | 45 - .../sql/models/license_type_capability_py3.py | 45 - .../mgmt/sql/models/location_capabilities.py | 58 - .../sql/models/location_capabilities_py3.py | 58 - .../mgmt/sql/models/log_size_capability.py | 41 - .../sql/models/log_size_capability_py3.py | 41 - .../sql/models/long_term_retention_backup.py | 73 - .../long_term_retention_backup_paged.py | 27 - .../models/long_term_retention_backup_py3.py | 73 - ...aged_backup_short_term_retention_policy.py | 47 - ...ackup_short_term_retention_policy_paged.py | 27 - ..._backup_short_term_retention_policy_py3.py | 47 - .../azure/mgmt/sql/models/managed_database.py | 136 - .../mgmt/sql/models/managed_database_paged.py | 27 - .../mgmt/sql/models/managed_database_py3.py | 136 - .../managed_database_security_alert_policy.py | 88 - ...ed_database_security_alert_policy_paged.py | 27 - ...aged_database_security_alert_policy_py3.py | 88 - .../sql/models/managed_database_update.py | 119 - .../sql/models/managed_database_update_py3.py | 119 - .../azure/mgmt/sql/models/managed_instance.py | 139 - .../managed_instance_edition_capability.py | 51 - ...managed_instance_edition_capability_py3.py | 51 - .../managed_instance_encryption_protector.py | 71 - ...ged_instance_encryption_protector_paged.py | 27 - ...naged_instance_encryption_protector_py3.py | 71 - .../managed_instance_family_capability.py | 73 - .../managed_instance_family_capability_py3.py | 73 - .../mgmt/sql/models/managed_instance_key.py | 72 - .../sql/models/managed_instance_key_paged.py | 27 - .../sql/models/managed_instance_key_py3.py | 72 - .../mgmt/sql/models/managed_instance_paged.py | 27 - .../sql/models/managed_instance_pair_info.py | 34 - .../models/managed_instance_pair_info_py3.py | 34 - .../mgmt/sql/models/managed_instance_py3.py | 139 - .../sql/models/managed_instance_update.py | 117 - .../sql/models/managed_instance_update_py3.py | 117 - .../managed_instance_vcores_capability.py | 50 - .../managed_instance_vcores_capability_py3.py | 50 - .../managed_instance_version_capability.py | 51 - ...managed_instance_version_capability_py3.py | 51 - ...naged_instance_vulnerability_assessment.py | 70 - ...instance_vulnerability_assessment_paged.py | 27 - ...d_instance_vulnerability_assessment_py3.py | 70 - .../managed_server_security_alert_policy.py | 88 - ...aged_server_security_alert_policy_paged.py | 27 - ...anaged_server_security_alert_policy_py3.py | 88 - .../mgmt/sql/models/max_size_capability.py | 41 - .../sql/models/max_size_capability_py3.py | 41 - .../sql/models/max_size_range_capability.py | 61 - .../models/max_size_range_capability_py3.py | 61 - .../azure/mgmt/sql/models/metric.py | 62 - .../mgmt/sql/models/metric_availability.py | 40 - .../sql/models/metric_availability_py3.py | 40 - .../mgmt/sql/models/metric_definition.py | 61 - .../sql/models/metric_definition_paged.py | 27 - .../mgmt/sql/models/metric_definition_py3.py | 61 - .../azure/mgmt/sql/models/metric_name.py | 40 - .../azure/mgmt/sql/models/metric_name_py3.py | 40 - .../azure/mgmt/sql/models/metric_paged.py | 27 - .../azure/mgmt/sql/models/metric_py3.py | 62 - .../azure/mgmt/sql/models/metric_value.py | 60 - .../azure/mgmt/sql/models/metric_value_py3.py | 60 - .../azure/mgmt/sql/models/operation.py | 53 - .../mgmt/sql/models/operation_display.py | 51 - .../mgmt/sql/models/operation_display_py3.py | 51 - .../azure/mgmt/sql/models/operation_impact.py | 51 - .../mgmt/sql/models/operation_impact_py3.py | 51 - .../azure/mgmt/sql/models/operation_paged.py | 27 - .../azure/mgmt/sql/models/operation_py3.py | 53 - .../azure/mgmt/sql/models/partner_info.py | 49 - .../azure/mgmt/sql/models/partner_info_py3.py | 49 - .../mgmt/sql/models/partner_region_info.py | 41 - .../sql/models/partner_region_info_py3.py | 41 - .../models/performance_level_capability.py | 41 - .../performance_level_capability_py3.py | 41 - .../azure/mgmt/sql/models/proxy_resource.py | 42 - .../mgmt/sql/models/proxy_resource_py3.py | 42 - .../sql/models/recommended_elastic_pool.py | 100 - .../models/recommended_elastic_pool_metric.py | 37 - .../recommended_elastic_pool_metric_paged.py | 27 - .../recommended_elastic_pool_metric_py3.py | 37 - .../models/recommended_elastic_pool_paged.py | 27 - .../models/recommended_elastic_pool_py3.py | 100 - .../mgmt/sql/models/recommended_index.py | 112 - .../mgmt/sql/models/recommended_index_py3.py | 112 - .../mgmt/sql/models/recoverable_database.py | 64 - .../sql/models/recoverable_database_paged.py | 27 - .../sql/models/recoverable_database_py3.py | 64 - .../models/recoverable_managed_database.py | 47 - .../recoverable_managed_database_paged.py | 27 - .../recoverable_managed_database_py3.py | 47 - .../azure/mgmt/sql/models/replication_link.py | 104 - .../mgmt/sql/models/replication_link_paged.py | 27 - .../mgmt/sql/models/replication_link_py3.py | 104 - .../azure/mgmt/sql/models/resource.py | 45 - .../mgmt/sql/models/resource_identity.py | 46 - .../mgmt/sql/models/resource_identity_py3.py | 46 - .../sql/models/resource_move_definition.py | 34 - .../models/resource_move_definition_py3.py | 34 - .../azure/mgmt/sql/models/resource_py3.py | 45 - .../sql/models/restorable_dropped_database.py | 89 - .../restorable_dropped_database_paged.py | 27 - .../models/restorable_dropped_database_py3.py | 89 - .../restorable_dropped_managed_database.py | 72 - ...storable_dropped_managed_database_paged.py | 27 - ...restorable_dropped_managed_database_py3.py | 72 - .../azure/mgmt/sql/models/restore_point.py | 71 - .../mgmt/sql/models/restore_point_paged.py | 27 - .../mgmt/sql/models/restore_point_py3.py | 71 - .../mgmt/sql/models/sensitivity_label.py | 58 - .../sql/models/sensitivity_label_paged.py | 27 - .../mgmt/sql/models/sensitivity_label_py3.py | 58 - .../azure/mgmt/sql/models/server.py | 86 - .../sql/models/server_automatic_tuning.py | 60 - .../sql/models/server_automatic_tuning_py3.py | 60 - .../models/server_azure_ad_administrator.py | 67 - .../server_azure_ad_administrator_paged.py | 27 - .../server_azure_ad_administrator_py3.py | 67 - .../sql/models/server_blob_auditing_policy.py | 160 - .../models/server_blob_auditing_policy_py3.py | 160 - .../sql/models/server_communication_link.py | 65 - .../models/server_communication_link_paged.py | 27 - .../models/server_communication_link_py3.py | 65 - .../sql/models/server_connection_policy.py | 60 - .../models/server_connection_policy_py3.py | 60 - .../azure/mgmt/sql/models/server_dns_alias.py | 47 - .../models/server_dns_alias_acquisition.py | 29 - .../server_dns_alias_acquisition_py3.py | 29 - .../mgmt/sql/models/server_dns_alias_paged.py | 27 - .../mgmt/sql/models/server_dns_alias_py3.py | 47 - .../azure/mgmt/sql/models/server_key.py | 78 - .../azure/mgmt/sql/models/server_key_paged.py | 27 - .../azure/mgmt/sql/models/server_key_py3.py | 78 - .../azure/mgmt/sql/models/server_paged.py | 27 - .../azure/mgmt/sql/models/server_py3.py | 86 - .../models/server_security_alert_policy.py | 88 - .../server_security_alert_policy_paged.py | 27 - .../server_security_alert_policy_py3.py | 88 - .../azure/mgmt/sql/models/server_update.py | 59 - .../mgmt/sql/models/server_update_py3.py | 59 - .../azure/mgmt/sql/models/server_usage.py | 66 - .../mgmt/sql/models/server_usage_paged.py | 27 - .../azure/mgmt/sql/models/server_usage_py3.py | 66 - .../sql/models/server_version_capability.py | 58 - .../models/server_version_capability_py3.py | 58 - .../models/server_vulnerability_assessment.py | 70 - .../server_vulnerability_assessment_paged.py | 27 - .../server_vulnerability_assessment_py3.py | 70 - .../mgmt/sql/models/service_objective.py | 69 - .../models/service_objective_capability.py | 78 - .../service_objective_capability_py3.py | 78 - .../sql/models/service_objective_paged.py | 27 - .../mgmt/sql/models/service_objective_py3.py | 69 - .../mgmt/sql/models/service_tier_advisor.py | 157 - .../sql/models/service_tier_advisor_paged.py | 27 - .../sql/models/service_tier_advisor_py3.py | 157 - .../azure/mgmt/sql/models/sku.py | 57 - .../azure/mgmt/sql/models/sku_py3.py | 57 - .../azure/mgmt/sql/models/slo_usage_metric.py | 57 - .../mgmt/sql/models/slo_usage_metric_py3.py | 57 - .../mgmt/sql/models/subscription_usage.py | 62 - .../sql/models/subscription_usage_paged.py | 27 - .../mgmt/sql/models/subscription_usage_py3.py | 62 - .../azure/mgmt/sql/models/sync_agent.py | 78 - .../sql/models/sync_agent_key_properties.py | 35 - .../models/sync_agent_key_properties_py3.py | 35 - .../sql/models/sync_agent_linked_database.py | 73 - .../sync_agent_linked_database_paged.py | 27 - .../models/sync_agent_linked_database_py3.py | 73 - .../azure/mgmt/sql/models/sync_agent_paged.py | 27 - .../azure/mgmt/sql/models/sync_agent_py3.py | 78 - .../sql/models/sync_database_id_properties.py | 35 - .../sync_database_id_properties_paged.py | 27 - .../models/sync_database_id_properties_py3.py | 35 - .../sql/models/sync_full_schema_properties.py | 40 - .../sync_full_schema_properties_paged.py | 27 - .../models/sync_full_schema_properties_py3.py | 40 - .../mgmt/sql/models/sync_full_schema_table.py | 55 - .../models/sync_full_schema_table_column.py | 65 - .../sync_full_schema_table_column_py3.py | 65 - .../sql/models/sync_full_schema_table_py3.py | 55 - .../azure/mgmt/sql/models/sync_group.py | 82 - .../sql/models/sync_group_log_properties.py | 61 - .../models/sync_group_log_properties_paged.py | 27 - .../models/sync_group_log_properties_py3.py | 61 - .../azure/mgmt/sql/models/sync_group_paged.py | 27 - .../azure/mgmt/sql/models/sync_group_py3.py | 82 - .../mgmt/sql/models/sync_group_schema.py | 33 - .../mgmt/sql/models/sync_group_schema_py3.py | 33 - .../sql/models/sync_group_schema_table.py | 32 - .../models/sync_group_schema_table_column.py | 36 - .../sync_group_schema_table_column_py3.py | 36 - .../sql/models/sync_group_schema_table_py3.py | 32 - .../azure/mgmt/sql/models/sync_member.py | 89 - .../mgmt/sql/models/sync_member_paged.py | 27 - .../azure/mgmt/sql/models/sync_member_py3.py | 89 - .../azure/mgmt/sql/models/tde_certificate.py | 54 - .../mgmt/sql/models/tde_certificate_py3.py | 54 - .../azure/mgmt/sql/models/tracked_resource.py | 53 - .../mgmt/sql/models/tracked_resource_py3.py | 53 - .../sql/models/transparent_data_encryption.py | 53 - .../transparent_data_encryption_activity.py | 60 - ...nsparent_data_encryption_activity_paged.py | 27 - ...ransparent_data_encryption_activity_py3.py | 60 - .../models/transparent_data_encryption_py3.py | 53 - .../azure/mgmt/sql/models/virtual_cluster.py | 66 - .../mgmt/sql/models/virtual_cluster_paged.py | 27 - .../mgmt/sql/models/virtual_cluster_py3.py | 66 - .../mgmt/sql/models/virtual_cluster_update.py | 49 - .../sql/models/virtual_cluster_update_py3.py | 49 - .../mgmt/sql/models/virtual_network_rule.py | 61 - .../sql/models/virtual_network_rule_paged.py | 27 - .../sql/models/virtual_network_rule_py3.py | 61 - ...y_assessment_recurring_scans_properties.py | 39 - ...sessment_recurring_scans_properties_py3.py | 39 - .../vulnerability_assessment_scan_error.py | 40 - ...vulnerability_assessment_scan_error_py3.py | 40 - .../vulnerability_assessment_scan_record.py | 88 - ...nerability_assessment_scan_record_paged.py | 27 - ...ulnerability_assessment_scan_record_py3.py | 88 - .../azure/mgmt/sql/operations/__init__.py | 166 +- ...ong_term_retention_policies_operations.py} | 4 +- ...ort_term_retention_policies_operations.py} | 17 +- ...rations.py => _capabilities_operations.py} | 3 +- ...y => _data_masking_policies_operations.py} | 4 +- ...s.py => _data_masking_rules_operations.py} | 17 +- ... _database_automatic_tuning_operations.py} | 4 +- ...base_blob_auditing_policies_operations.py} | 4 +- ..._operations.py => _database_operations.py} | 16 +- ...e_threat_detection_policies_operations.py} | 4 +- ...ions.py => _database_usages_operations.py} | 16 +- ...y_assessment_rule_baselines_operations.py} | 4 +- ...nerability_assessment_scans_operations.py} | 18 +- ...e_vulnerability_assessments_operations.py} | 18 +- ...operations.py => _databases_operations.py} | 146 +- ...=> _elastic_pool_activities_operations.py} | 16 +- ...ic_pool_database_activities_operations.py} | 16 +- ...rations.py => _elastic_pool_operations.py} | 16 +- ...ations.py => _elastic_pools_operations.py} | 132 +- ...y => _encryption_protectors_operations.py} | 17 +- ...base_blob_auditing_policies_operations.py} | 4 +- ...rver_blob_auditing_policies_operations.py} | 3 +- ...ions.py => _failover_groups_operations.py} | 17 +- ...tions.py => _firewall_rules_operations.py} | 18 +- ....py => _geo_backup_policies_operations.py} | 18 +- ...> _instance_failover_groups_operations.py} | 17 +- .../operations/_instance_pools_operations.py | 534 + ...perations.py => _job_agents_operations.py} | 17 +- ...ions.py => _job_credentials_operations.py} | 18 +- ...tions.py => _job_executions_operations.py} | 31 +- ....py => _job_step_executions_operations.py} | 17 +- ...operations.py => _job_steps_operations.py} | 33 +- ...y => _job_target_executions_operations.py} | 31 +- ...ns.py => _job_target_groups_operations.py} | 18 +- ...rations.py => _job_versions_operations.py} | 17 +- ...jobs_operations.py => _jobs_operations.py} | 18 +- ..._long_term_retention_backups_operations.py | 880 ++ ...ort_term_retention_policies_operations.py} | 17 +- ...ase_security_alert_policies_operations.py} | 18 +- ...database_sensitivity_labels_operations.py} | 190 +- ...y_assessment_rule_baselines_operations.py} | 4 +- ...nerability_assessment_scans_operations.py} | 18 +- ...e_vulnerability_assessments_operations.py} | 18 +- ...ns.py => _managed_databases_operations.py} | 17 +- ...tance_encryption_protectors_operations.py} | 17 +- ...y => _managed_instance_keys_operations.py} | 17 +- ...d_instance_tde_certificates_operations.py} | 2 + ...e_vulnerability_assessments_operations.py} | 18 +- ...ns.py => _managed_instances_operations.py} | 119 +- ...ort_term_retention_policies_operations.py} | 17 +- ...ver_security_alert_policies_operations.py} | 17 +- .../{operations.py => _operations.py} | 16 +- ... _recommended_elastic_pools_operations.py} | 31 +- ...y => _recoverable_databases_operations.py} | 17 +- ...coverable_managed_databases_operations.py} | 17 +- ...ns.py => _replication_links_operations.py} | 17 +- ...estorable_dropped_databases_operations.py} | 17 +- ...e_dropped_managed_databases_operations.py} | 17 +- ...tions.py => _restore_points_operations.py} | 17 +- ...s.py => _sensitivity_labels_operations.py} | 190 +- ...=> _server_automatic_tuning_operations.py} | 4 +- ...ver_azure_ad_administrators_operations.py} | 17 +- ...rver_blob_auditing_policies_operations.py} | 3 +- ..._server_communication_links_operations.py} | 17 +- ..._server_connection_policies_operations.py} | 4 +- ...s.py => _server_dns_aliases_operations.py} | 17 +- ...erations.py => _server_keys_operations.py} | 17 +- ...ver_security_alert_policies_operations.py} | 17 +- ...ations.py => _server_usages_operations.py} | 16 +- ...r_vulnerability_assessments_operations.py} | 18 +- ...s_operations.py => _servers_operations.py} | 32 +- ...s.py => _service_objectives_operations.py} | 17 +- ...y => _service_tier_advisors_operations.py} | 17 +- ....py => _subscription_usages_operations.py} | 17 +- ...erations.py => _sync_agents_operations.py} | 32 +- ...erations.py => _sync_groups_operations.py} | 59 +- ...rations.py => _sync_members_operations.py} | 31 +- ...ons.py => _tde_certificates_operations.py} | 2 + ..._data_encryption_activities_operations.py} | 16 +- ...ransparent_data_encryptions_operations.py} | 4 +- .../mgmt/sql/operations/_usages_operations.py | 120 + ...ons.py => _virtual_clusters_operations.py} | 31 +- ...y => _virtual_network_rules_operations.py} | 17 +- .../long_term_retention_backups_operations.py | 441 - 459 files changed, 22360 insertions(+), 24337 deletions(-) create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_configuration.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/{sql_management_client.py => _sql_management_client.py} (75%) create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/{sql_management_client_enums.py => _sql_management_client_enums.py} (95%) delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_py3.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{backup_long_term_retention_policies_operations.py => _backup_long_term_retention_policies_operations.py} (99%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{backup_short_term_retention_policies_operations.py => _backup_short_term_retention_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{capabilities_operations.py => _capabilities_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{data_masking_policies_operations.py => _data_masking_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{data_masking_rules_operations.py => _data_masking_rules_operations.py} (96%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_automatic_tuning_operations.py => _database_automatic_tuning_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_blob_auditing_policies_operations.py => _database_blob_auditing_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_operations.py => _database_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_threat_detection_policies_operations.py => _database_threat_detection_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_usages_operations.py => _database_usages_operations.py} (92%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_vulnerability_assessment_rule_baselines_operations.py => _database_vulnerability_assessment_rule_baselines_operations.py} (99%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_vulnerability_assessment_scans_operations.py => _database_vulnerability_assessment_scans_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_vulnerability_assessments_operations.py => _database_vulnerability_assessments_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{databases_operations.py => _databases_operations.py} (92%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{elastic_pool_activities_operations.py => _elastic_pool_activities_operations.py} (92%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{elastic_pool_database_activities_operations.py => _elastic_pool_database_activities_operations.py} (92%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{elastic_pool_operations.py => _elastic_pool_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{elastic_pools_operations.py => _elastic_pools_operations.py} (85%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{encryption_protectors_operations.py => _encryption_protectors_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{extended_database_blob_auditing_policies_operations.py => _extended_database_blob_auditing_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{extended_server_blob_auditing_policies_operations.py => _extended_server_blob_auditing_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{failover_groups_operations.py => _failover_groups_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{firewall_rules_operations.py => _firewall_rules_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{geo_backup_policies_operations.py => _geo_backup_policies_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{instance_failover_groups_operations.py => _instance_failover_groups_operations.py} (98%) create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_pools_operations.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_agents_operations.py => _job_agents_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_credentials_operations.py => _job_credentials_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_executions_operations.py => _job_executions_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_step_executions_operations.py => _job_step_executions_operations.py} (96%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_steps_operations.py => _job_steps_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_target_executions_operations.py => _job_target_executions_operations.py} (96%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_target_groups_operations.py => _job_target_groups_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_versions_operations.py => _job_versions_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{jobs_operations.py => _jobs_operations.py} (97%) create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_backups_operations.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_backup_short_term_retention_policies_operations.py => _managed_backup_short_term_retention_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_database_security_alert_policies_operations.py => _managed_database_security_alert_policies_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_database_sensitivity_labels_operations.py => _managed_database_sensitivity_labels_operations.py} (70%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_database_vulnerability_assessment_rule_baselines_operations.py => _managed_database_vulnerability_assessment_rule_baselines_operations.py} (99%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_database_vulnerability_assessment_scans_operations.py => _managed_database_vulnerability_assessment_scans_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_database_vulnerability_assessments_operations.py => _managed_database_vulnerability_assessments_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_databases_operations.py => _managed_databases_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_instance_encryption_protectors_operations.py => _managed_instance_encryption_protectors_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_instance_keys_operations.py => _managed_instance_keys_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_instance_tde_certificates_operations.py => _managed_instance_tde_certificates_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_instance_vulnerability_assessments_operations.py => _managed_instance_vulnerability_assessments_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_instances_operations.py => _managed_instances_operations.py} (84%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py => _managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_server_security_alert_policies_operations.py => _managed_server_security_alert_policies_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{operations.py => _operations.py} (90%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{recommended_elastic_pools_operations.py => _recommended_elastic_pools_operations.py} (94%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{recoverable_databases_operations.py => _recoverable_databases_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{recoverable_managed_databases_operations.py => _recoverable_managed_databases_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{replication_links_operations.py => _replication_links_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{restorable_dropped_databases_operations.py => _restorable_dropped_databases_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{restorable_dropped_managed_databases_operations.py => _restorable_dropped_managed_databases_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{restore_points_operations.py => _restore_points_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{sensitivity_labels_operations.py => _sensitivity_labels_operations.py} (70%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_automatic_tuning_operations.py => _server_automatic_tuning_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_azure_ad_administrators_operations.py => _server_azure_ad_administrators_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_blob_auditing_policies_operations.py => _server_blob_auditing_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_communication_links_operations.py => _server_communication_links_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_connection_policies_operations.py => _server_connection_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_dns_aliases_operations.py => _server_dns_aliases_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_keys_operations.py => _server_keys_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_security_alert_policies_operations.py => _server_security_alert_policies_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_usages_operations.py => _server_usages_operations.py} (92%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_vulnerability_assessments_operations.py => _server_vulnerability_assessments_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{servers_operations.py => _servers_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{service_objectives_operations.py => _service_objectives_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{service_tier_advisors_operations.py => _service_tier_advisors_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{subscription_usages_operations.py => _subscription_usages_operations.py} (94%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{sync_agents_operations.py => _sync_agents_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{sync_groups_operations.py => _sync_groups_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{sync_members_operations.py => _sync_members_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{tde_certificates_operations.py => _tde_certificates_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{transparent_data_encryption_activities_operations.py => _transparent_data_encryption_activities_operations.py} (93%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{transparent_data_encryptions_operations.py => _transparent_data_encryptions_operations.py} (98%) create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_usages_operations.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{virtual_clusters_operations.py => _virtual_clusters_operations.py} (96%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{virtual_network_rules_operations.py => _virtual_network_rules_operations.py} (97%) delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/long_term_retention_backups_operations.py diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/__init__.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/__init__.py index 33b83233be3c..48b056c94dfa 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/__init__.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .sql_management_client import SqlManagementClient -from .version import VERSION +from ._configuration import SqlManagementClientConfiguration +from ._sql_management_client import SqlManagementClient +__all__ = ['SqlManagementClient', 'SqlManagementClientConfiguration'] -__all__ = ['SqlManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_configuration.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_configuration.py new file mode 100644 index 000000000000..ca7086f8dadf --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_configuration.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class SqlManagementClientConfiguration(AzureConfiguration): + """Configuration for SqlManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription ID that identifies an Azure + subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(SqlManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-sql/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py similarity index 75% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py index aae1ce917e14..1bedc764b599 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py @@ -11,122 +11,91 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.recoverable_databases_operations import RecoverableDatabasesOperations -from .operations.restorable_dropped_databases_operations import RestorableDroppedDatabasesOperations -from .operations.servers_operations import ServersOperations -from .operations.server_connection_policies_operations import ServerConnectionPoliciesOperations -from .operations.database_threat_detection_policies_operations import DatabaseThreatDetectionPoliciesOperations -from .operations.data_masking_policies_operations import DataMaskingPoliciesOperations -from .operations.data_masking_rules_operations import DataMaskingRulesOperations -from .operations.firewall_rules_operations import FirewallRulesOperations -from .operations.geo_backup_policies_operations import GeoBackupPoliciesOperations -from .operations.databases_operations import DatabasesOperations -from .operations.elastic_pools_operations import ElasticPoolsOperations -from .operations.recommended_elastic_pools_operations import RecommendedElasticPoolsOperations -from .operations.replication_links_operations import ReplicationLinksOperations -from .operations.server_azure_ad_administrators_operations import ServerAzureADAdministratorsOperations -from .operations.server_communication_links_operations import ServerCommunicationLinksOperations -from .operations.service_objectives_operations import ServiceObjectivesOperations -from .operations.elastic_pool_activities_operations import ElasticPoolActivitiesOperations -from .operations.elastic_pool_database_activities_operations import ElasticPoolDatabaseActivitiesOperations -from .operations.service_tier_advisors_operations import ServiceTierAdvisorsOperations -from .operations.transparent_data_encryptions_operations import TransparentDataEncryptionsOperations -from .operations.transparent_data_encryption_activities_operations import TransparentDataEncryptionActivitiesOperations -from .operations.server_usages_operations import ServerUsagesOperations -from .operations.database_usages_operations import DatabaseUsagesOperations -from .operations.database_automatic_tuning_operations import DatabaseAutomaticTuningOperations -from .operations.encryption_protectors_operations import EncryptionProtectorsOperations -from .operations.failover_groups_operations import FailoverGroupsOperations -from .operations.managed_instances_operations import ManagedInstancesOperations -from .operations.operations import Operations -from .operations.server_keys_operations import ServerKeysOperations -from .operations.sync_agents_operations import SyncAgentsOperations -from .operations.sync_groups_operations import SyncGroupsOperations -from .operations.sync_members_operations import SyncMembersOperations -from .operations.subscription_usages_operations import SubscriptionUsagesOperations -from .operations.virtual_clusters_operations import VirtualClustersOperations -from .operations.virtual_network_rules_operations import VirtualNetworkRulesOperations -from .operations.extended_database_blob_auditing_policies_operations import ExtendedDatabaseBlobAuditingPoliciesOperations -from .operations.extended_server_blob_auditing_policies_operations import ExtendedServerBlobAuditingPoliciesOperations -from .operations.server_blob_auditing_policies_operations import ServerBlobAuditingPoliciesOperations -from .operations.database_blob_auditing_policies_operations import DatabaseBlobAuditingPoliciesOperations -from .operations.database_vulnerability_assessment_rule_baselines_operations import DatabaseVulnerabilityAssessmentRuleBaselinesOperations -from .operations.database_vulnerability_assessments_operations import DatabaseVulnerabilityAssessmentsOperations -from .operations.job_agents_operations import JobAgentsOperations -from .operations.job_credentials_operations import JobCredentialsOperations -from .operations.job_executions_operations import JobExecutionsOperations -from .operations.jobs_operations import JobsOperations -from .operations.job_step_executions_operations import JobStepExecutionsOperations -from .operations.job_steps_operations import JobStepsOperations -from .operations.job_target_executions_operations import JobTargetExecutionsOperations -from .operations.job_target_groups_operations import JobTargetGroupsOperations -from .operations.job_versions_operations import JobVersionsOperations -from .operations.long_term_retention_backups_operations import LongTermRetentionBackupsOperations -from .operations.backup_long_term_retention_policies_operations import BackupLongTermRetentionPoliciesOperations -from .operations.managed_backup_short_term_retention_policies_operations import ManagedBackupShortTermRetentionPoliciesOperations -from .operations.managed_databases_operations import ManagedDatabasesOperations -from .operations.managed_restorable_dropped_database_backup_short_term_retention_policies_operations import ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations -from .operations.server_automatic_tuning_operations import ServerAutomaticTuningOperations -from .operations.server_dns_aliases_operations import ServerDnsAliasesOperations -from .operations.server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations -from .operations.restorable_dropped_managed_databases_operations import RestorableDroppedManagedDatabasesOperations -from .operations.restore_points_operations import RestorePointsOperations -from .operations.managed_database_security_alert_policies_operations import ManagedDatabaseSecurityAlertPoliciesOperations -from .operations.managed_server_security_alert_policies_operations import ManagedServerSecurityAlertPoliciesOperations -from .operations.sensitivity_labels_operations import SensitivityLabelsOperations -from .operations.database_operations import DatabaseOperations -from .operations.elastic_pool_operations import ElasticPoolOperations -from .operations.capabilities_operations import CapabilitiesOperations -from .operations.database_vulnerability_assessment_scans_operations import DatabaseVulnerabilityAssessmentScansOperations -from .operations.managed_database_vulnerability_assessment_rule_baselines_operations import ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations -from .operations.managed_database_vulnerability_assessment_scans_operations import ManagedDatabaseVulnerabilityAssessmentScansOperations -from .operations.managed_database_vulnerability_assessments_operations import ManagedDatabaseVulnerabilityAssessmentsOperations -from .operations.instance_failover_groups_operations import InstanceFailoverGroupsOperations -from .operations.backup_short_term_retention_policies_operations import BackupShortTermRetentionPoliciesOperations -from .operations.tde_certificates_operations import TdeCertificatesOperations -from .operations.managed_instance_tde_certificates_operations import ManagedInstanceTdeCertificatesOperations -from .operations.managed_instance_keys_operations import ManagedInstanceKeysOperations -from .operations.managed_instance_encryption_protectors_operations import ManagedInstanceEncryptionProtectorsOperations -from .operations.recoverable_managed_databases_operations import RecoverableManagedDatabasesOperations -from .operations.managed_instance_vulnerability_assessments_operations import ManagedInstanceVulnerabilityAssessmentsOperations -from .operations.server_vulnerability_assessments_operations import ServerVulnerabilityAssessmentsOperations -from .operations.managed_database_sensitivity_labels_operations import ManagedDatabaseSensitivityLabelsOperations -from . import models - - -class SqlManagementClientConfiguration(AzureConfiguration): - """Configuration for SqlManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The subscription ID that identifies an Azure - subscription. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(SqlManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-sql/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import SqlManagementClientConfiguration +from .operations import RecoverableDatabasesOperations +from .operations import RestorableDroppedDatabasesOperations +from .operations import ServersOperations +from .operations import ServerConnectionPoliciesOperations +from .operations import DatabaseThreatDetectionPoliciesOperations +from .operations import DataMaskingPoliciesOperations +from .operations import DataMaskingRulesOperations +from .operations import FirewallRulesOperations +from .operations import GeoBackupPoliciesOperations +from .operations import DatabasesOperations +from .operations import ElasticPoolsOperations +from .operations import RecommendedElasticPoolsOperations +from .operations import ReplicationLinksOperations +from .operations import ServerAzureADAdministratorsOperations +from .operations import ServerCommunicationLinksOperations +from .operations import ServiceObjectivesOperations +from .operations import ElasticPoolActivitiesOperations +from .operations import ElasticPoolDatabaseActivitiesOperations +from .operations import ServiceTierAdvisorsOperations +from .operations import TransparentDataEncryptionsOperations +from .operations import TransparentDataEncryptionActivitiesOperations +from .operations import ServerUsagesOperations +from .operations import DatabaseUsagesOperations +from .operations import DatabaseAutomaticTuningOperations +from .operations import EncryptionProtectorsOperations +from .operations import FailoverGroupsOperations +from .operations import Operations +from .operations import ServerKeysOperations +from .operations import SyncAgentsOperations +from .operations import SyncGroupsOperations +from .operations import SyncMembersOperations +from .operations import SubscriptionUsagesOperations +from .operations import VirtualClustersOperations +from .operations import VirtualNetworkRulesOperations +from .operations import ExtendedDatabaseBlobAuditingPoliciesOperations +from .operations import ExtendedServerBlobAuditingPoliciesOperations +from .operations import ServerBlobAuditingPoliciesOperations +from .operations import DatabaseBlobAuditingPoliciesOperations +from .operations import DatabaseVulnerabilityAssessmentRuleBaselinesOperations +from .operations import DatabaseVulnerabilityAssessmentsOperations +from .operations import JobAgentsOperations +from .operations import JobCredentialsOperations +from .operations import JobExecutionsOperations +from .operations import JobsOperations +from .operations import JobStepExecutionsOperations +from .operations import JobStepsOperations +from .operations import JobTargetExecutionsOperations +from .operations import JobTargetGroupsOperations +from .operations import JobVersionsOperations +from .operations import LongTermRetentionBackupsOperations +from .operations import BackupLongTermRetentionPoliciesOperations +from .operations import ManagedBackupShortTermRetentionPoliciesOperations +from .operations import ManagedDatabasesOperations +from .operations import ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations +from .operations import ServerAutomaticTuningOperations +from .operations import ServerDnsAliasesOperations +from .operations import ServerSecurityAlertPoliciesOperations +from .operations import RestorableDroppedManagedDatabasesOperations +from .operations import RestorePointsOperations +from .operations import ManagedDatabaseSecurityAlertPoliciesOperations +from .operations import ManagedServerSecurityAlertPoliciesOperations +from .operations import SensitivityLabelsOperations +from .operations import DatabaseOperations +from .operations import ElasticPoolOperations +from .operations import CapabilitiesOperations +from .operations import DatabaseVulnerabilityAssessmentScansOperations +from .operations import ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations +from .operations import ManagedDatabaseVulnerabilityAssessmentScansOperations +from .operations import ManagedDatabaseVulnerabilityAssessmentsOperations +from .operations import InstanceFailoverGroupsOperations +from .operations import BackupShortTermRetentionPoliciesOperations +from .operations import TdeCertificatesOperations +from .operations import ManagedInstanceTdeCertificatesOperations +from .operations import ManagedInstanceKeysOperations +from .operations import ManagedInstanceEncryptionProtectorsOperations +from .operations import RecoverableManagedDatabasesOperations +from .operations import ManagedInstanceVulnerabilityAssessmentsOperations +from .operations import ServerVulnerabilityAssessmentsOperations +from .operations import ManagedDatabaseSensitivityLabelsOperations +from .operations import InstancePoolsOperations +from .operations import UsagesOperations +from .operations import ManagedInstancesOperations +from . import models class SqlManagementClient(SDKClient): @@ -187,8 +156,6 @@ class SqlManagementClient(SDKClient): :vartype encryption_protectors: azure.mgmt.sql.operations.EncryptionProtectorsOperations :ivar failover_groups: FailoverGroups operations :vartype failover_groups: azure.mgmt.sql.operations.FailoverGroupsOperations - :ivar managed_instances: ManagedInstances operations - :vartype managed_instances: azure.mgmt.sql.operations.ManagedInstancesOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.sql.operations.Operations :ivar server_keys: ServerKeys operations @@ -295,6 +262,12 @@ class SqlManagementClient(SDKClient): :vartype server_vulnerability_assessments: azure.mgmt.sql.operations.ServerVulnerabilityAssessmentsOperations :ivar managed_database_sensitivity_labels: ManagedDatabaseSensitivityLabels operations :vartype managed_database_sensitivity_labels: azure.mgmt.sql.operations.ManagedDatabaseSensitivityLabelsOperations + :ivar instance_pools: InstancePools operations + :vartype instance_pools: azure.mgmt.sql.operations.InstancePoolsOperations + :ivar usages: Usages operations + :vartype usages: azure.mgmt.sql.operations.UsagesOperations + :ivar managed_instances: ManagedInstances operations + :vartype managed_instances: azure.mgmt.sql.operations.ManagedInstancesOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -367,8 +340,6 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.failover_groups = FailoverGroupsOperations( self._client, self.config, self._serialize, self._deserialize) - self.managed_instances = ManagedInstancesOperations( - self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) self.server_keys = ServerKeysOperations( @@ -475,3 +446,9 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.managed_database_sensitivity_labels = ManagedDatabaseSensitivityLabelsOperations( self._client, self.config, self._serialize, self._deserialize) + self.instance_pools = InstancePoolsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.usages = UsagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.managed_instances = ManagedInstancesOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py index 0a543180d7e4..57ac98e75568 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py @@ -10,375 +10,385 @@ # -------------------------------------------------------------------------- try: - from .recoverable_database_py3 import RecoverableDatabase - from .restorable_dropped_database_py3 import RestorableDroppedDatabase - from .tracked_resource_py3 import TrackedResource - from .resource_py3 import Resource - from .proxy_resource_py3 import ProxyResource - from .check_name_availability_request_py3 import CheckNameAvailabilityRequest - from .check_name_availability_response_py3 import CheckNameAvailabilityResponse - from .server_connection_policy_py3 import ServerConnectionPolicy - from .database_security_alert_policy_py3 import DatabaseSecurityAlertPolicy - from .data_masking_policy_py3 import DataMaskingPolicy - from .data_masking_rule_py3 import DataMaskingRule - from .firewall_rule_py3 import FirewallRule - from .geo_backup_policy_py3 import GeoBackupPolicy - from .import_extension_request_py3 import ImportExtensionRequest - from .import_export_response_py3 import ImportExportResponse - from .import_request_py3 import ImportRequest - from .export_request_py3 import ExportRequest - from .metric_value_py3 import MetricValue - from .metric_name_py3 import MetricName - from .metric_py3 import Metric - from .metric_availability_py3 import MetricAvailability - from .metric_definition_py3 import MetricDefinition - from .recommended_elastic_pool_metric_py3 import RecommendedElasticPoolMetric - from .recommended_elastic_pool_py3 import RecommendedElasticPool - from .replication_link_py3 import ReplicationLink - from .server_azure_ad_administrator_py3 import ServerAzureADAdministrator - from .server_communication_link_py3 import ServerCommunicationLink - from .service_objective_py3 import ServiceObjective - from .elastic_pool_activity_py3 import ElasticPoolActivity - from .elastic_pool_database_activity_py3 import ElasticPoolDatabaseActivity - from .operation_impact_py3 import OperationImpact - from .recommended_index_py3 import RecommendedIndex - from .transparent_data_encryption_py3 import TransparentDataEncryption - from .slo_usage_metric_py3 import SloUsageMetric - from .service_tier_advisor_py3 import ServiceTierAdvisor - from .transparent_data_encryption_activity_py3 import TransparentDataEncryptionActivity - from .server_usage_py3 import ServerUsage - from .database_usage_py3 import DatabaseUsage - from .automatic_tuning_options_py3 import AutomaticTuningOptions - from .database_automatic_tuning_py3 import DatabaseAutomaticTuning - from .encryption_protector_py3 import EncryptionProtector - from .failover_group_read_write_endpoint_py3 import FailoverGroupReadWriteEndpoint - from .failover_group_read_only_endpoint_py3 import FailoverGroupReadOnlyEndpoint - from .partner_info_py3 import PartnerInfo - from .failover_group_py3 import FailoverGroup - from .failover_group_update_py3 import FailoverGroupUpdate - from .resource_identity_py3 import ResourceIdentity - from .sku_py3 import Sku - from .managed_instance_py3 import ManagedInstance - from .managed_instance_update_py3 import ManagedInstanceUpdate - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .server_key_py3 import ServerKey - from .server_py3 import Server - from .server_update_py3 import ServerUpdate - from .sync_agent_py3 import SyncAgent - from .sync_agent_key_properties_py3 import SyncAgentKeyProperties - from .sync_agent_linked_database_py3 import SyncAgentLinkedDatabase - from .sync_database_id_properties_py3 import SyncDatabaseIdProperties - from .sync_full_schema_table_column_py3 import SyncFullSchemaTableColumn - from .sync_full_schema_table_py3 import SyncFullSchemaTable - from .sync_full_schema_properties_py3 import SyncFullSchemaProperties - from .sync_group_log_properties_py3 import SyncGroupLogProperties - from .sync_group_schema_table_column_py3 import SyncGroupSchemaTableColumn - from .sync_group_schema_table_py3 import SyncGroupSchemaTable - from .sync_group_schema_py3 import SyncGroupSchema - from .sync_group_py3 import SyncGroup - from .sync_member_py3 import SyncMember - from .subscription_usage_py3 import SubscriptionUsage - from .virtual_cluster_py3 import VirtualCluster - from .virtual_cluster_update_py3 import VirtualClusterUpdate - from .virtual_network_rule_py3 import VirtualNetworkRule - from .extended_database_blob_auditing_policy_py3 import ExtendedDatabaseBlobAuditingPolicy - from .extended_server_blob_auditing_policy_py3 import ExtendedServerBlobAuditingPolicy - from .server_blob_auditing_policy_py3 import ServerBlobAuditingPolicy - from .database_blob_auditing_policy_py3 import DatabaseBlobAuditingPolicy - from .database_vulnerability_assessment_rule_baseline_item_py3 import DatabaseVulnerabilityAssessmentRuleBaselineItem - from .database_vulnerability_assessment_rule_baseline_py3 import DatabaseVulnerabilityAssessmentRuleBaseline - from .vulnerability_assessment_recurring_scans_properties_py3 import VulnerabilityAssessmentRecurringScansProperties - from .database_vulnerability_assessment_py3 import DatabaseVulnerabilityAssessment - from .job_agent_py3 import JobAgent - from .job_agent_update_py3 import JobAgentUpdate - from .job_credential_py3 import JobCredential - from .job_execution_target_py3 import JobExecutionTarget - from .job_execution_py3 import JobExecution - from .job_schedule_py3 import JobSchedule - from .job_py3 import Job - from .job_step_action_py3 import JobStepAction - from .job_step_output_py3 import JobStepOutput - from .job_step_execution_options_py3 import JobStepExecutionOptions - from .job_step_py3 import JobStep - from .job_target_py3 import JobTarget - from .job_target_group_py3 import JobTargetGroup - from .job_version_py3 import JobVersion - from .long_term_retention_backup_py3 import LongTermRetentionBackup - from .backup_long_term_retention_policy_py3 import BackupLongTermRetentionPolicy - from .managed_backup_short_term_retention_policy_py3 import ManagedBackupShortTermRetentionPolicy - from .complete_database_restore_definition_py3 import CompleteDatabaseRestoreDefinition - from .managed_database_py3 import ManagedDatabase - from .managed_database_update_py3 import ManagedDatabaseUpdate - from .automatic_tuning_server_options_py3 import AutomaticTuningServerOptions - from .server_automatic_tuning_py3 import ServerAutomaticTuning - from .server_dns_alias_py3 import ServerDnsAlias - from .server_dns_alias_acquisition_py3 import ServerDnsAliasAcquisition - from .server_security_alert_policy_py3 import ServerSecurityAlertPolicy - from .restorable_dropped_managed_database_py3 import RestorableDroppedManagedDatabase - from .restore_point_py3 import RestorePoint - from .create_database_restore_point_definition_py3 import CreateDatabaseRestorePointDefinition - from .managed_database_security_alert_policy_py3 import ManagedDatabaseSecurityAlertPolicy - from .managed_server_security_alert_policy_py3 import ManagedServerSecurityAlertPolicy - from .sensitivity_label_py3 import SensitivityLabel - from .database_operation_py3 import DatabaseOperation - from .elastic_pool_operation_py3 import ElasticPoolOperation - from .max_size_capability_py3 import MaxSizeCapability - from .log_size_capability_py3 import LogSizeCapability - from .max_size_range_capability_py3 import MaxSizeRangeCapability - from .performance_level_capability_py3 import PerformanceLevelCapability - from .license_type_capability_py3 import LicenseTypeCapability - from .service_objective_capability_py3 import ServiceObjectiveCapability - from .edition_capability_py3 import EditionCapability - from .elastic_pool_per_database_min_performance_level_capability_py3 import ElasticPoolPerDatabaseMinPerformanceLevelCapability - from .elastic_pool_per_database_max_performance_level_capability_py3 import ElasticPoolPerDatabaseMaxPerformanceLevelCapability - from .elastic_pool_performance_level_capability_py3 import ElasticPoolPerformanceLevelCapability - from .elastic_pool_edition_capability_py3 import ElasticPoolEditionCapability - from .server_version_capability_py3 import ServerVersionCapability - from .managed_instance_vcores_capability_py3 import ManagedInstanceVcoresCapability - from .managed_instance_family_capability_py3 import ManagedInstanceFamilyCapability - from .managed_instance_edition_capability_py3 import ManagedInstanceEditionCapability - from .managed_instance_version_capability_py3 import ManagedInstanceVersionCapability - from .location_capabilities_py3 import LocationCapabilities - from .database_py3 import Database - from .database_update_py3 import DatabaseUpdate - from .resource_move_definition_py3 import ResourceMoveDefinition - from .elastic_pool_per_database_settings_py3 import ElasticPoolPerDatabaseSettings - from .elastic_pool_py3 import ElasticPool - from .elastic_pool_update_py3 import ElasticPoolUpdate - from .vulnerability_assessment_scan_error_py3 import VulnerabilityAssessmentScanError - from .vulnerability_assessment_scan_record_py3 import VulnerabilityAssessmentScanRecord - from .database_vulnerability_assessment_scans_export_py3 import DatabaseVulnerabilityAssessmentScansExport - from .instance_failover_group_read_write_endpoint_py3 import InstanceFailoverGroupReadWriteEndpoint - from .instance_failover_group_read_only_endpoint_py3 import InstanceFailoverGroupReadOnlyEndpoint - from .partner_region_info_py3 import PartnerRegionInfo - from .managed_instance_pair_info_py3 import ManagedInstancePairInfo - from .instance_failover_group_py3 import InstanceFailoverGroup - from .backup_short_term_retention_policy_py3 import BackupShortTermRetentionPolicy - from .tde_certificate_py3 import TdeCertificate - from .managed_instance_key_py3 import ManagedInstanceKey - from .managed_instance_encryption_protector_py3 import ManagedInstanceEncryptionProtector - from .recoverable_managed_database_py3 import RecoverableManagedDatabase - from .managed_instance_vulnerability_assessment_py3 import ManagedInstanceVulnerabilityAssessment - from .server_vulnerability_assessment_py3 import ServerVulnerabilityAssessment + from ._models_py3 import AutomaticTuningOptions + from ._models_py3 import AutomaticTuningServerOptions + from ._models_py3 import BackupLongTermRetentionPolicy + from ._models_py3 import BackupShortTermRetentionPolicy + from ._models_py3 import CheckNameAvailabilityRequest + from ._models_py3 import CheckNameAvailabilityResponse + from ._models_py3 import CompleteDatabaseRestoreDefinition + from ._models_py3 import CreateDatabaseRestorePointDefinition + from ._models_py3 import Database + from ._models_py3 import DatabaseAutomaticTuning + from ._models_py3 import DatabaseBlobAuditingPolicy + from ._models_py3 import DatabaseOperation + from ._models_py3 import DatabaseSecurityAlertPolicy + from ._models_py3 import DatabaseUpdate + from ._models_py3 import DatabaseUsage + from ._models_py3 import DatabaseVulnerabilityAssessment + from ._models_py3 import DatabaseVulnerabilityAssessmentRuleBaseline + from ._models_py3 import DatabaseVulnerabilityAssessmentRuleBaselineItem + from ._models_py3 import DatabaseVulnerabilityAssessmentScansExport + from ._models_py3 import DataMaskingPolicy + from ._models_py3 import DataMaskingRule + from ._models_py3 import EditionCapability + from ._models_py3 import ElasticPool + from ._models_py3 import ElasticPoolActivity + from ._models_py3 import ElasticPoolDatabaseActivity + from ._models_py3 import ElasticPoolEditionCapability + from ._models_py3 import ElasticPoolOperation + from ._models_py3 import ElasticPoolPerDatabaseMaxPerformanceLevelCapability + from ._models_py3 import ElasticPoolPerDatabaseMinPerformanceLevelCapability + from ._models_py3 import ElasticPoolPerDatabaseSettings + from ._models_py3 import ElasticPoolPerformanceLevelCapability + from ._models_py3 import ElasticPoolUpdate + from ._models_py3 import EncryptionProtector + from ._models_py3 import ExportRequest + from ._models_py3 import ExtendedDatabaseBlobAuditingPolicy + from ._models_py3 import ExtendedServerBlobAuditingPolicy + from ._models_py3 import FailoverGroup + from ._models_py3 import FailoverGroupReadOnlyEndpoint + from ._models_py3 import FailoverGroupReadWriteEndpoint + from ._models_py3 import FailoverGroupUpdate + from ._models_py3 import FirewallRule + from ._models_py3 import GeoBackupPolicy + from ._models_py3 import ImportExportResponse + from ._models_py3 import ImportExtensionRequest + from ._models_py3 import ImportRequest + from ._models_py3 import InstanceFailoverGroup + from ._models_py3 import InstanceFailoverGroupReadOnlyEndpoint + from ._models_py3 import InstanceFailoverGroupReadWriteEndpoint + from ._models_py3 import InstancePool + from ._models_py3 import InstancePoolUpdate + from ._models_py3 import Job + from ._models_py3 import JobAgent + from ._models_py3 import JobAgentUpdate + from ._models_py3 import JobCredential + from ._models_py3 import JobExecution + from ._models_py3 import JobExecutionTarget + from ._models_py3 import JobSchedule + from ._models_py3 import JobStep + from ._models_py3 import JobStepAction + from ._models_py3 import JobStepExecutionOptions + from ._models_py3 import JobStepOutput + from ._models_py3 import JobTarget + from ._models_py3 import JobTargetGroup + from ._models_py3 import JobVersion + from ._models_py3 import LicenseTypeCapability + from ._models_py3 import LocationCapabilities + from ._models_py3 import LogSizeCapability + from ._models_py3 import LongTermRetentionBackup + from ._models_py3 import ManagedBackupShortTermRetentionPolicy + from ._models_py3 import ManagedDatabase + from ._models_py3 import ManagedDatabaseSecurityAlertPolicy + from ._models_py3 import ManagedDatabaseUpdate + from ._models_py3 import ManagedInstance + from ._models_py3 import ManagedInstanceEditionCapability + from ._models_py3 import ManagedInstanceEncryptionProtector + from ._models_py3 import ManagedInstanceFamilyCapability + from ._models_py3 import ManagedInstanceKey + from ._models_py3 import ManagedInstancePairInfo + from ._models_py3 import ManagedInstanceUpdate + from ._models_py3 import ManagedInstanceVcoresCapability + from ._models_py3 import ManagedInstanceVersionCapability + from ._models_py3 import ManagedInstanceVulnerabilityAssessment + from ._models_py3 import ManagedServerSecurityAlertPolicy + from ._models_py3 import MaxSizeCapability + from ._models_py3 import MaxSizeRangeCapability + from ._models_py3 import Metric + from ._models_py3 import MetricAvailability + from ._models_py3 import MetricDefinition + from ._models_py3 import MetricName + from ._models_py3 import MetricValue + from ._models_py3 import Name + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationImpact + from ._models_py3 import PartnerInfo + from ._models_py3 import PartnerRegionInfo + from ._models_py3 import PerformanceLevelCapability + from ._models_py3 import ProxyResource + from ._models_py3 import RecommendedElasticPool + from ._models_py3 import RecommendedElasticPoolMetric + from ._models_py3 import RecommendedIndex + from ._models_py3 import RecoverableDatabase + from ._models_py3 import RecoverableManagedDatabase + from ._models_py3 import ReplicationLink + from ._models_py3 import Resource + from ._models_py3 import ResourceIdentity + from ._models_py3 import ResourceMoveDefinition + from ._models_py3 import RestorableDroppedDatabase + from ._models_py3 import RestorableDroppedManagedDatabase + from ._models_py3 import RestorePoint + from ._models_py3 import SensitivityLabel + from ._models_py3 import Server + from ._models_py3 import ServerAutomaticTuning + from ._models_py3 import ServerAzureADAdministrator + from ._models_py3 import ServerBlobAuditingPolicy + from ._models_py3 import ServerCommunicationLink + from ._models_py3 import ServerConnectionPolicy + from ._models_py3 import ServerDnsAlias + from ._models_py3 import ServerDnsAliasAcquisition + from ._models_py3 import ServerKey + from ._models_py3 import ServerSecurityAlertPolicy + from ._models_py3 import ServerUpdate + from ._models_py3 import ServerUsage + from ._models_py3 import ServerVersionCapability + from ._models_py3 import ServerVulnerabilityAssessment + from ._models_py3 import ServiceObjective + from ._models_py3 import ServiceObjectiveCapability + from ._models_py3 import ServiceTierAdvisor + from ._models_py3 import Sku + from ._models_py3 import SloUsageMetric + from ._models_py3 import SubscriptionUsage + from ._models_py3 import SyncAgent + from ._models_py3 import SyncAgentKeyProperties + from ._models_py3 import SyncAgentLinkedDatabase + from ._models_py3 import SyncDatabaseIdProperties + from ._models_py3 import SyncFullSchemaProperties + from ._models_py3 import SyncFullSchemaTable + from ._models_py3 import SyncFullSchemaTableColumn + from ._models_py3 import SyncGroup + from ._models_py3 import SyncGroupLogProperties + from ._models_py3 import SyncGroupSchema + from ._models_py3 import SyncGroupSchemaTable + from ._models_py3 import SyncGroupSchemaTableColumn + from ._models_py3 import SyncMember + from ._models_py3 import TdeCertificate + from ._models_py3 import TrackedResource + from ._models_py3 import TransparentDataEncryption + from ._models_py3 import TransparentDataEncryptionActivity + from ._models_py3 import Usage + from ._models_py3 import VirtualCluster + from ._models_py3 import VirtualClusterUpdate + from ._models_py3 import VirtualNetworkRule + from ._models_py3 import VulnerabilityAssessmentRecurringScansProperties + from ._models_py3 import VulnerabilityAssessmentScanError + from ._models_py3 import VulnerabilityAssessmentScanRecord except (SyntaxError, ImportError): - from .recoverable_database import RecoverableDatabase - from .restorable_dropped_database import RestorableDroppedDatabase - from .tracked_resource import TrackedResource - from .resource import Resource - from .proxy_resource import ProxyResource - from .check_name_availability_request import CheckNameAvailabilityRequest - from .check_name_availability_response import CheckNameAvailabilityResponse - from .server_connection_policy import ServerConnectionPolicy - from .database_security_alert_policy import DatabaseSecurityAlertPolicy - from .data_masking_policy import DataMaskingPolicy - from .data_masking_rule import DataMaskingRule - from .firewall_rule import FirewallRule - from .geo_backup_policy import GeoBackupPolicy - from .import_extension_request import ImportExtensionRequest - from .import_export_response import ImportExportResponse - from .import_request import ImportRequest - from .export_request import ExportRequest - from .metric_value import MetricValue - from .metric_name import MetricName - from .metric import Metric - from .metric_availability import MetricAvailability - from .metric_definition import MetricDefinition - from .recommended_elastic_pool_metric import RecommendedElasticPoolMetric - from .recommended_elastic_pool import RecommendedElasticPool - from .replication_link import ReplicationLink - from .server_azure_ad_administrator import ServerAzureADAdministrator - from .server_communication_link import ServerCommunicationLink - from .service_objective import ServiceObjective - from .elastic_pool_activity import ElasticPoolActivity - from .elastic_pool_database_activity import ElasticPoolDatabaseActivity - from .operation_impact import OperationImpact - from .recommended_index import RecommendedIndex - from .transparent_data_encryption import TransparentDataEncryption - from .slo_usage_metric import SloUsageMetric - from .service_tier_advisor import ServiceTierAdvisor - from .transparent_data_encryption_activity import TransparentDataEncryptionActivity - from .server_usage import ServerUsage - from .database_usage import DatabaseUsage - from .automatic_tuning_options import AutomaticTuningOptions - from .database_automatic_tuning import DatabaseAutomaticTuning - from .encryption_protector import EncryptionProtector - from .failover_group_read_write_endpoint import FailoverGroupReadWriteEndpoint - from .failover_group_read_only_endpoint import FailoverGroupReadOnlyEndpoint - from .partner_info import PartnerInfo - from .failover_group import FailoverGroup - from .failover_group_update import FailoverGroupUpdate - from .resource_identity import ResourceIdentity - from .sku import Sku - from .managed_instance import ManagedInstance - from .managed_instance_update import ManagedInstanceUpdate - from .operation_display import OperationDisplay - from .operation import Operation - from .server_key import ServerKey - from .server import Server - from .server_update import ServerUpdate - from .sync_agent import SyncAgent - from .sync_agent_key_properties import SyncAgentKeyProperties - from .sync_agent_linked_database import SyncAgentLinkedDatabase - from .sync_database_id_properties import SyncDatabaseIdProperties - from .sync_full_schema_table_column import SyncFullSchemaTableColumn - from .sync_full_schema_table import SyncFullSchemaTable - from .sync_full_schema_properties import SyncFullSchemaProperties - from .sync_group_log_properties import SyncGroupLogProperties - from .sync_group_schema_table_column import SyncGroupSchemaTableColumn - from .sync_group_schema_table import SyncGroupSchemaTable - from .sync_group_schema import SyncGroupSchema - from .sync_group import SyncGroup - from .sync_member import SyncMember - from .subscription_usage import SubscriptionUsage - from .virtual_cluster import VirtualCluster - from .virtual_cluster_update import VirtualClusterUpdate - from .virtual_network_rule import VirtualNetworkRule - from .extended_database_blob_auditing_policy import ExtendedDatabaseBlobAuditingPolicy - from .extended_server_blob_auditing_policy import ExtendedServerBlobAuditingPolicy - from .server_blob_auditing_policy import ServerBlobAuditingPolicy - from .database_blob_auditing_policy import DatabaseBlobAuditingPolicy - from .database_vulnerability_assessment_rule_baseline_item import DatabaseVulnerabilityAssessmentRuleBaselineItem - from .database_vulnerability_assessment_rule_baseline import DatabaseVulnerabilityAssessmentRuleBaseline - from .vulnerability_assessment_recurring_scans_properties import VulnerabilityAssessmentRecurringScansProperties - from .database_vulnerability_assessment import DatabaseVulnerabilityAssessment - from .job_agent import JobAgent - from .job_agent_update import JobAgentUpdate - from .job_credential import JobCredential - from .job_execution_target import JobExecutionTarget - from .job_execution import JobExecution - from .job_schedule import JobSchedule - from .job import Job - from .job_step_action import JobStepAction - from .job_step_output import JobStepOutput - from .job_step_execution_options import JobStepExecutionOptions - from .job_step import JobStep - from .job_target import JobTarget - from .job_target_group import JobTargetGroup - from .job_version import JobVersion - from .long_term_retention_backup import LongTermRetentionBackup - from .backup_long_term_retention_policy import BackupLongTermRetentionPolicy - from .managed_backup_short_term_retention_policy import ManagedBackupShortTermRetentionPolicy - from .complete_database_restore_definition import CompleteDatabaseRestoreDefinition - from .managed_database import ManagedDatabase - from .managed_database_update import ManagedDatabaseUpdate - from .automatic_tuning_server_options import AutomaticTuningServerOptions - from .server_automatic_tuning import ServerAutomaticTuning - from .server_dns_alias import ServerDnsAlias - from .server_dns_alias_acquisition import ServerDnsAliasAcquisition - from .server_security_alert_policy import ServerSecurityAlertPolicy - from .restorable_dropped_managed_database import RestorableDroppedManagedDatabase - from .restore_point import RestorePoint - from .create_database_restore_point_definition import CreateDatabaseRestorePointDefinition - from .managed_database_security_alert_policy import ManagedDatabaseSecurityAlertPolicy - from .managed_server_security_alert_policy import ManagedServerSecurityAlertPolicy - from .sensitivity_label import SensitivityLabel - from .database_operation import DatabaseOperation - from .elastic_pool_operation import ElasticPoolOperation - from .max_size_capability import MaxSizeCapability - from .log_size_capability import LogSizeCapability - from .max_size_range_capability import MaxSizeRangeCapability - from .performance_level_capability import PerformanceLevelCapability - from .license_type_capability import LicenseTypeCapability - from .service_objective_capability import ServiceObjectiveCapability - from .edition_capability import EditionCapability - from .elastic_pool_per_database_min_performance_level_capability import ElasticPoolPerDatabaseMinPerformanceLevelCapability - from .elastic_pool_per_database_max_performance_level_capability import ElasticPoolPerDatabaseMaxPerformanceLevelCapability - from .elastic_pool_performance_level_capability import ElasticPoolPerformanceLevelCapability - from .elastic_pool_edition_capability import ElasticPoolEditionCapability - from .server_version_capability import ServerVersionCapability - from .managed_instance_vcores_capability import ManagedInstanceVcoresCapability - from .managed_instance_family_capability import ManagedInstanceFamilyCapability - from .managed_instance_edition_capability import ManagedInstanceEditionCapability - from .managed_instance_version_capability import ManagedInstanceVersionCapability - from .location_capabilities import LocationCapabilities - from .database import Database - from .database_update import DatabaseUpdate - from .resource_move_definition import ResourceMoveDefinition - from .elastic_pool_per_database_settings import ElasticPoolPerDatabaseSettings - from .elastic_pool import ElasticPool - from .elastic_pool_update import ElasticPoolUpdate - from .vulnerability_assessment_scan_error import VulnerabilityAssessmentScanError - from .vulnerability_assessment_scan_record import VulnerabilityAssessmentScanRecord - from .database_vulnerability_assessment_scans_export import DatabaseVulnerabilityAssessmentScansExport - from .instance_failover_group_read_write_endpoint import InstanceFailoverGroupReadWriteEndpoint - from .instance_failover_group_read_only_endpoint import InstanceFailoverGroupReadOnlyEndpoint - from .partner_region_info import PartnerRegionInfo - from .managed_instance_pair_info import ManagedInstancePairInfo - from .instance_failover_group import InstanceFailoverGroup - from .backup_short_term_retention_policy import BackupShortTermRetentionPolicy - from .tde_certificate import TdeCertificate - from .managed_instance_key import ManagedInstanceKey - from .managed_instance_encryption_protector import ManagedInstanceEncryptionProtector - from .recoverable_managed_database import RecoverableManagedDatabase - from .managed_instance_vulnerability_assessment import ManagedInstanceVulnerabilityAssessment - from .server_vulnerability_assessment import ServerVulnerabilityAssessment -from .recoverable_database_paged import RecoverableDatabasePaged -from .restorable_dropped_database_paged import RestorableDroppedDatabasePaged -from .server_paged import ServerPaged -from .data_masking_rule_paged import DataMaskingRulePaged -from .firewall_rule_paged import FirewallRulePaged -from .geo_backup_policy_paged import GeoBackupPolicyPaged -from .metric_paged import MetricPaged -from .metric_definition_paged import MetricDefinitionPaged -from .database_paged import DatabasePaged -from .elastic_pool_paged import ElasticPoolPaged -from .recommended_elastic_pool_paged import RecommendedElasticPoolPaged -from .recommended_elastic_pool_metric_paged import RecommendedElasticPoolMetricPaged -from .replication_link_paged import ReplicationLinkPaged -from .server_azure_ad_administrator_paged import ServerAzureADAdministratorPaged -from .server_communication_link_paged import ServerCommunicationLinkPaged -from .service_objective_paged import ServiceObjectivePaged -from .elastic_pool_activity_paged import ElasticPoolActivityPaged -from .elastic_pool_database_activity_paged import ElasticPoolDatabaseActivityPaged -from .service_tier_advisor_paged import ServiceTierAdvisorPaged -from .transparent_data_encryption_activity_paged import TransparentDataEncryptionActivityPaged -from .server_usage_paged import ServerUsagePaged -from .database_usage_paged import DatabaseUsagePaged -from .encryption_protector_paged import EncryptionProtectorPaged -from .failover_group_paged import FailoverGroupPaged -from .managed_instance_paged import ManagedInstancePaged -from .operation_paged import OperationPaged -from .server_key_paged import ServerKeyPaged -from .sync_agent_paged import SyncAgentPaged -from .sync_agent_linked_database_paged import SyncAgentLinkedDatabasePaged -from .sync_database_id_properties_paged import SyncDatabaseIdPropertiesPaged -from .sync_full_schema_properties_paged import SyncFullSchemaPropertiesPaged -from .sync_group_log_properties_paged import SyncGroupLogPropertiesPaged -from .sync_group_paged import SyncGroupPaged -from .sync_member_paged import SyncMemberPaged -from .subscription_usage_paged import SubscriptionUsagePaged -from .virtual_cluster_paged import VirtualClusterPaged -from .virtual_network_rule_paged import VirtualNetworkRulePaged -from .database_vulnerability_assessment_paged import DatabaseVulnerabilityAssessmentPaged -from .job_agent_paged import JobAgentPaged -from .job_credential_paged import JobCredentialPaged -from .job_execution_paged import JobExecutionPaged -from .job_paged import JobPaged -from .job_step_paged import JobStepPaged -from .job_target_group_paged import JobTargetGroupPaged -from .job_version_paged import JobVersionPaged -from .long_term_retention_backup_paged import LongTermRetentionBackupPaged -from .managed_backup_short_term_retention_policy_paged import ManagedBackupShortTermRetentionPolicyPaged -from .managed_database_paged import ManagedDatabasePaged -from .server_dns_alias_paged import ServerDnsAliasPaged -from .server_security_alert_policy_paged import ServerSecurityAlertPolicyPaged -from .restorable_dropped_managed_database_paged import RestorableDroppedManagedDatabasePaged -from .restore_point_paged import RestorePointPaged -from .managed_database_security_alert_policy_paged import ManagedDatabaseSecurityAlertPolicyPaged -from .managed_server_security_alert_policy_paged import ManagedServerSecurityAlertPolicyPaged -from .sensitivity_label_paged import SensitivityLabelPaged -from .database_operation_paged import DatabaseOperationPaged -from .elastic_pool_operation_paged import ElasticPoolOperationPaged -from .vulnerability_assessment_scan_record_paged import VulnerabilityAssessmentScanRecordPaged -from .instance_failover_group_paged import InstanceFailoverGroupPaged -from .backup_short_term_retention_policy_paged import BackupShortTermRetentionPolicyPaged -from .managed_instance_key_paged import ManagedInstanceKeyPaged -from .managed_instance_encryption_protector_paged import ManagedInstanceEncryptionProtectorPaged -from .recoverable_managed_database_paged import RecoverableManagedDatabasePaged -from .managed_instance_vulnerability_assessment_paged import ManagedInstanceVulnerabilityAssessmentPaged -from .server_vulnerability_assessment_paged import ServerVulnerabilityAssessmentPaged -from .sql_management_client_enums import ( + from ._models import AutomaticTuningOptions + from ._models import AutomaticTuningServerOptions + from ._models import BackupLongTermRetentionPolicy + from ._models import BackupShortTermRetentionPolicy + from ._models import CheckNameAvailabilityRequest + from ._models import CheckNameAvailabilityResponse + from ._models import CompleteDatabaseRestoreDefinition + from ._models import CreateDatabaseRestorePointDefinition + from ._models import Database + from ._models import DatabaseAutomaticTuning + from ._models import DatabaseBlobAuditingPolicy + from ._models import DatabaseOperation + from ._models import DatabaseSecurityAlertPolicy + from ._models import DatabaseUpdate + from ._models import DatabaseUsage + from ._models import DatabaseVulnerabilityAssessment + from ._models import DatabaseVulnerabilityAssessmentRuleBaseline + from ._models import DatabaseVulnerabilityAssessmentRuleBaselineItem + from ._models import DatabaseVulnerabilityAssessmentScansExport + from ._models import DataMaskingPolicy + from ._models import DataMaskingRule + from ._models import EditionCapability + from ._models import ElasticPool + from ._models import ElasticPoolActivity + from ._models import ElasticPoolDatabaseActivity + from ._models import ElasticPoolEditionCapability + from ._models import ElasticPoolOperation + from ._models import ElasticPoolPerDatabaseMaxPerformanceLevelCapability + from ._models import ElasticPoolPerDatabaseMinPerformanceLevelCapability + from ._models import ElasticPoolPerDatabaseSettings + from ._models import ElasticPoolPerformanceLevelCapability + from ._models import ElasticPoolUpdate + from ._models import EncryptionProtector + from ._models import ExportRequest + from ._models import ExtendedDatabaseBlobAuditingPolicy + from ._models import ExtendedServerBlobAuditingPolicy + from ._models import FailoverGroup + from ._models import FailoverGroupReadOnlyEndpoint + from ._models import FailoverGroupReadWriteEndpoint + from ._models import FailoverGroupUpdate + from ._models import FirewallRule + from ._models import GeoBackupPolicy + from ._models import ImportExportResponse + from ._models import ImportExtensionRequest + from ._models import ImportRequest + from ._models import InstanceFailoverGroup + from ._models import InstanceFailoverGroupReadOnlyEndpoint + from ._models import InstanceFailoverGroupReadWriteEndpoint + from ._models import InstancePool + from ._models import InstancePoolUpdate + from ._models import Job + from ._models import JobAgent + from ._models import JobAgentUpdate + from ._models import JobCredential + from ._models import JobExecution + from ._models import JobExecutionTarget + from ._models import JobSchedule + from ._models import JobStep + from ._models import JobStepAction + from ._models import JobStepExecutionOptions + from ._models import JobStepOutput + from ._models import JobTarget + from ._models import JobTargetGroup + from ._models import JobVersion + from ._models import LicenseTypeCapability + from ._models import LocationCapabilities + from ._models import LogSizeCapability + from ._models import LongTermRetentionBackup + from ._models import ManagedBackupShortTermRetentionPolicy + from ._models import ManagedDatabase + from ._models import ManagedDatabaseSecurityAlertPolicy + from ._models import ManagedDatabaseUpdate + from ._models import ManagedInstance + from ._models import ManagedInstanceEditionCapability + from ._models import ManagedInstanceEncryptionProtector + from ._models import ManagedInstanceFamilyCapability + from ._models import ManagedInstanceKey + from ._models import ManagedInstancePairInfo + from ._models import ManagedInstanceUpdate + from ._models import ManagedInstanceVcoresCapability + from ._models import ManagedInstanceVersionCapability + from ._models import ManagedInstanceVulnerabilityAssessment + from ._models import ManagedServerSecurityAlertPolicy + from ._models import MaxSizeCapability + from ._models import MaxSizeRangeCapability + from ._models import Metric + from ._models import MetricAvailability + from ._models import MetricDefinition + from ._models import MetricName + from ._models import MetricValue + from ._models import Name + from ._models import Operation + from ._models import OperationDisplay + from ._models import OperationImpact + from ._models import PartnerInfo + from ._models import PartnerRegionInfo + from ._models import PerformanceLevelCapability + from ._models import ProxyResource + from ._models import RecommendedElasticPool + from ._models import RecommendedElasticPoolMetric + from ._models import RecommendedIndex + from ._models import RecoverableDatabase + from ._models import RecoverableManagedDatabase + from ._models import ReplicationLink + from ._models import Resource + from ._models import ResourceIdentity + from ._models import ResourceMoveDefinition + from ._models import RestorableDroppedDatabase + from ._models import RestorableDroppedManagedDatabase + from ._models import RestorePoint + from ._models import SensitivityLabel + from ._models import Server + from ._models import ServerAutomaticTuning + from ._models import ServerAzureADAdministrator + from ._models import ServerBlobAuditingPolicy + from ._models import ServerCommunicationLink + from ._models import ServerConnectionPolicy + from ._models import ServerDnsAlias + from ._models import ServerDnsAliasAcquisition + from ._models import ServerKey + from ._models import ServerSecurityAlertPolicy + from ._models import ServerUpdate + from ._models import ServerUsage + from ._models import ServerVersionCapability + from ._models import ServerVulnerabilityAssessment + from ._models import ServiceObjective + from ._models import ServiceObjectiveCapability + from ._models import ServiceTierAdvisor + from ._models import Sku + from ._models import SloUsageMetric + from ._models import SubscriptionUsage + from ._models import SyncAgent + from ._models import SyncAgentKeyProperties + from ._models import SyncAgentLinkedDatabase + from ._models import SyncDatabaseIdProperties + from ._models import SyncFullSchemaProperties + from ._models import SyncFullSchemaTable + from ._models import SyncFullSchemaTableColumn + from ._models import SyncGroup + from ._models import SyncGroupLogProperties + from ._models import SyncGroupSchema + from ._models import SyncGroupSchemaTable + from ._models import SyncGroupSchemaTableColumn + from ._models import SyncMember + from ._models import TdeCertificate + from ._models import TrackedResource + from ._models import TransparentDataEncryption + from ._models import TransparentDataEncryptionActivity + from ._models import Usage + from ._models import VirtualCluster + from ._models import VirtualClusterUpdate + from ._models import VirtualNetworkRule + from ._models import VulnerabilityAssessmentRecurringScansProperties + from ._models import VulnerabilityAssessmentScanError + from ._models import VulnerabilityAssessmentScanRecord +from ._paged_models import BackupShortTermRetentionPolicyPaged +from ._paged_models import DatabaseOperationPaged +from ._paged_models import DatabasePaged +from ._paged_models import DatabaseUsagePaged +from ._paged_models import DatabaseVulnerabilityAssessmentPaged +from ._paged_models import DataMaskingRulePaged +from ._paged_models import ElasticPoolActivityPaged +from ._paged_models import ElasticPoolDatabaseActivityPaged +from ._paged_models import ElasticPoolOperationPaged +from ._paged_models import ElasticPoolPaged +from ._paged_models import EncryptionProtectorPaged +from ._paged_models import FailoverGroupPaged +from ._paged_models import FirewallRulePaged +from ._paged_models import GeoBackupPolicyPaged +from ._paged_models import InstanceFailoverGroupPaged +from ._paged_models import InstancePoolPaged +from ._paged_models import JobAgentPaged +from ._paged_models import JobCredentialPaged +from ._paged_models import JobExecutionPaged +from ._paged_models import JobPaged +from ._paged_models import JobStepPaged +from ._paged_models import JobTargetGroupPaged +from ._paged_models import JobVersionPaged +from ._paged_models import LongTermRetentionBackupPaged +from ._paged_models import ManagedBackupShortTermRetentionPolicyPaged +from ._paged_models import ManagedDatabasePaged +from ._paged_models import ManagedDatabaseSecurityAlertPolicyPaged +from ._paged_models import ManagedInstanceEncryptionProtectorPaged +from ._paged_models import ManagedInstanceKeyPaged +from ._paged_models import ManagedInstancePaged +from ._paged_models import ManagedInstanceVulnerabilityAssessmentPaged +from ._paged_models import ManagedServerSecurityAlertPolicyPaged +from ._paged_models import MetricDefinitionPaged +from ._paged_models import MetricPaged +from ._paged_models import OperationPaged +from ._paged_models import RecommendedElasticPoolMetricPaged +from ._paged_models import RecommendedElasticPoolPaged +from ._paged_models import RecoverableDatabasePaged +from ._paged_models import RecoverableManagedDatabasePaged +from ._paged_models import ReplicationLinkPaged +from ._paged_models import RestorableDroppedDatabasePaged +from ._paged_models import RestorableDroppedManagedDatabasePaged +from ._paged_models import RestorePointPaged +from ._paged_models import SensitivityLabelPaged +from ._paged_models import ServerAzureADAdministratorPaged +from ._paged_models import ServerCommunicationLinkPaged +from ._paged_models import ServerDnsAliasPaged +from ._paged_models import ServerKeyPaged +from ._paged_models import ServerPaged +from ._paged_models import ServerSecurityAlertPolicyPaged +from ._paged_models import ServerUsagePaged +from ._paged_models import ServerVulnerabilityAssessmentPaged +from ._paged_models import ServiceObjectivePaged +from ._paged_models import ServiceTierAdvisorPaged +from ._paged_models import SubscriptionUsagePaged +from ._paged_models import SyncAgentLinkedDatabasePaged +from ._paged_models import SyncAgentPaged +from ._paged_models import SyncDatabaseIdPropertiesPaged +from ._paged_models import SyncFullSchemaPropertiesPaged +from ._paged_models import SyncGroupLogPropertiesPaged +from ._paged_models import SyncGroupPaged +from ._paged_models import SyncMemberPaged +from ._paged_models import TransparentDataEncryptionActivityPaged +from ._paged_models import UsagePaged +from ._paged_models import VirtualClusterPaged +from ._paged_models import VirtualNetworkRulePaged +from ._paged_models import VulnerabilityAssessmentScanRecordPaged +from ._sql_management_client_enums import ( CheckNameAvailabilityReason, ServerConnectionType, SecurityAlertPolicyState, @@ -411,9 +421,8 @@ ReadWriteEndpointFailoverPolicy, ReadOnlyEndpointFailoverPolicy, FailoverGroupReplicationRole, - IdentityType, - ManagedInstanceProxyOverride, OperationOrigin, + IdentityType, SyncAgentState, SyncMemberDbType, SyncGroupLogType, @@ -453,6 +462,10 @@ VulnerabilityAssessmentScanTriggerType, VulnerabilityAssessmentScanState, InstanceFailoverGroupReplicationRole, + InstancePoolLicenseType, + ManagedServerCreateMode, + ManagedInstanceLicenseType, + ManagedInstanceProxyOverride, LongTermRetentionDatabaseState, VulnerabilityAssessmentPolicyBaselineName, SensitivityLabelSource, @@ -460,157 +473,161 @@ ) __all__ = [ - 'RecoverableDatabase', - 'RestorableDroppedDatabase', - 'TrackedResource', - 'Resource', - 'ProxyResource', + 'AutomaticTuningOptions', + 'AutomaticTuningServerOptions', + 'BackupLongTermRetentionPolicy', + 'BackupShortTermRetentionPolicy', 'CheckNameAvailabilityRequest', 'CheckNameAvailabilityResponse', - 'ServerConnectionPolicy', + 'CompleteDatabaseRestoreDefinition', + 'CreateDatabaseRestorePointDefinition', + 'Database', + 'DatabaseAutomaticTuning', + 'DatabaseBlobAuditingPolicy', + 'DatabaseOperation', 'DatabaseSecurityAlertPolicy', + 'DatabaseUpdate', + 'DatabaseUsage', + 'DatabaseVulnerabilityAssessment', + 'DatabaseVulnerabilityAssessmentRuleBaseline', + 'DatabaseVulnerabilityAssessmentRuleBaselineItem', + 'DatabaseVulnerabilityAssessmentScansExport', 'DataMaskingPolicy', 'DataMaskingRule', + 'EditionCapability', + 'ElasticPool', + 'ElasticPoolActivity', + 'ElasticPoolDatabaseActivity', + 'ElasticPoolEditionCapability', + 'ElasticPoolOperation', + 'ElasticPoolPerDatabaseMaxPerformanceLevelCapability', + 'ElasticPoolPerDatabaseMinPerformanceLevelCapability', + 'ElasticPoolPerDatabaseSettings', + 'ElasticPoolPerformanceLevelCapability', + 'ElasticPoolUpdate', + 'EncryptionProtector', + 'ExportRequest', + 'ExtendedDatabaseBlobAuditingPolicy', + 'ExtendedServerBlobAuditingPolicy', + 'FailoverGroup', + 'FailoverGroupReadOnlyEndpoint', + 'FailoverGroupReadWriteEndpoint', + 'FailoverGroupUpdate', 'FirewallRule', 'GeoBackupPolicy', - 'ImportExtensionRequest', 'ImportExportResponse', + 'ImportExtensionRequest', 'ImportRequest', - 'ExportRequest', - 'MetricValue', - 'MetricName', + 'InstanceFailoverGroup', + 'InstanceFailoverGroupReadOnlyEndpoint', + 'InstanceFailoverGroupReadWriteEndpoint', + 'InstancePool', + 'InstancePoolUpdate', + 'Job', + 'JobAgent', + 'JobAgentUpdate', + 'JobCredential', + 'JobExecution', + 'JobExecutionTarget', + 'JobSchedule', + 'JobStep', + 'JobStepAction', + 'JobStepExecutionOptions', + 'JobStepOutput', + 'JobTarget', + 'JobTargetGroup', + 'JobVersion', + 'LicenseTypeCapability', + 'LocationCapabilities', + 'LogSizeCapability', + 'LongTermRetentionBackup', + 'ManagedBackupShortTermRetentionPolicy', + 'ManagedDatabase', + 'ManagedDatabaseSecurityAlertPolicy', + 'ManagedDatabaseUpdate', + 'ManagedInstance', + 'ManagedInstanceEditionCapability', + 'ManagedInstanceEncryptionProtector', + 'ManagedInstanceFamilyCapability', + 'ManagedInstanceKey', + 'ManagedInstancePairInfo', + 'ManagedInstanceUpdate', + 'ManagedInstanceVcoresCapability', + 'ManagedInstanceVersionCapability', + 'ManagedInstanceVulnerabilityAssessment', + 'ManagedServerSecurityAlertPolicy', + 'MaxSizeCapability', + 'MaxSizeRangeCapability', 'Metric', 'MetricAvailability', 'MetricDefinition', - 'RecommendedElasticPoolMetric', + 'MetricName', + 'MetricValue', + 'Name', + 'Operation', + 'OperationDisplay', + 'OperationImpact', + 'PartnerInfo', + 'PartnerRegionInfo', + 'PerformanceLevelCapability', + 'ProxyResource', 'RecommendedElasticPool', + 'RecommendedElasticPoolMetric', + 'RecommendedIndex', + 'RecoverableDatabase', + 'RecoverableManagedDatabase', 'ReplicationLink', + 'Resource', + 'ResourceIdentity', + 'ResourceMoveDefinition', + 'RestorableDroppedDatabase', + 'RestorableDroppedManagedDatabase', + 'RestorePoint', + 'SensitivityLabel', + 'Server', + 'ServerAutomaticTuning', 'ServerAzureADAdministrator', + 'ServerBlobAuditingPolicy', 'ServerCommunicationLink', + 'ServerConnectionPolicy', + 'ServerDnsAlias', + 'ServerDnsAliasAcquisition', + 'ServerKey', + 'ServerSecurityAlertPolicy', + 'ServerUpdate', + 'ServerUsage', + 'ServerVersionCapability', + 'ServerVulnerabilityAssessment', 'ServiceObjective', - 'ElasticPoolActivity', - 'ElasticPoolDatabaseActivity', - 'OperationImpact', - 'RecommendedIndex', - 'TransparentDataEncryption', - 'SloUsageMetric', + 'ServiceObjectiveCapability', 'ServiceTierAdvisor', - 'TransparentDataEncryptionActivity', - 'ServerUsage', - 'DatabaseUsage', - 'AutomaticTuningOptions', - 'DatabaseAutomaticTuning', - 'EncryptionProtector', - 'FailoverGroupReadWriteEndpoint', - 'FailoverGroupReadOnlyEndpoint', - 'PartnerInfo', - 'FailoverGroup', - 'FailoverGroupUpdate', - 'ResourceIdentity', 'Sku', - 'ManagedInstance', - 'ManagedInstanceUpdate', - 'OperationDisplay', - 'Operation', - 'ServerKey', - 'Server', - 'ServerUpdate', + 'SloUsageMetric', + 'SubscriptionUsage', 'SyncAgent', 'SyncAgentKeyProperties', 'SyncAgentLinkedDatabase', 'SyncDatabaseIdProperties', - 'SyncFullSchemaTableColumn', - 'SyncFullSchemaTable', 'SyncFullSchemaProperties', + 'SyncFullSchemaTable', + 'SyncFullSchemaTableColumn', + 'SyncGroup', 'SyncGroupLogProperties', - 'SyncGroupSchemaTableColumn', - 'SyncGroupSchemaTable', 'SyncGroupSchema', - 'SyncGroup', + 'SyncGroupSchemaTable', + 'SyncGroupSchemaTableColumn', 'SyncMember', - 'SubscriptionUsage', + 'TdeCertificate', + 'TrackedResource', + 'TransparentDataEncryption', + 'TransparentDataEncryptionActivity', + 'Usage', 'VirtualCluster', 'VirtualClusterUpdate', 'VirtualNetworkRule', - 'ExtendedDatabaseBlobAuditingPolicy', - 'ExtendedServerBlobAuditingPolicy', - 'ServerBlobAuditingPolicy', - 'DatabaseBlobAuditingPolicy', - 'DatabaseVulnerabilityAssessmentRuleBaselineItem', - 'DatabaseVulnerabilityAssessmentRuleBaseline', 'VulnerabilityAssessmentRecurringScansProperties', - 'DatabaseVulnerabilityAssessment', - 'JobAgent', - 'JobAgentUpdate', - 'JobCredential', - 'JobExecutionTarget', - 'JobExecution', - 'JobSchedule', - 'Job', - 'JobStepAction', - 'JobStepOutput', - 'JobStepExecutionOptions', - 'JobStep', - 'JobTarget', - 'JobTargetGroup', - 'JobVersion', - 'LongTermRetentionBackup', - 'BackupLongTermRetentionPolicy', - 'ManagedBackupShortTermRetentionPolicy', - 'CompleteDatabaseRestoreDefinition', - 'ManagedDatabase', - 'ManagedDatabaseUpdate', - 'AutomaticTuningServerOptions', - 'ServerAutomaticTuning', - 'ServerDnsAlias', - 'ServerDnsAliasAcquisition', - 'ServerSecurityAlertPolicy', - 'RestorableDroppedManagedDatabase', - 'RestorePoint', - 'CreateDatabaseRestorePointDefinition', - 'ManagedDatabaseSecurityAlertPolicy', - 'ManagedServerSecurityAlertPolicy', - 'SensitivityLabel', - 'DatabaseOperation', - 'ElasticPoolOperation', - 'MaxSizeCapability', - 'LogSizeCapability', - 'MaxSizeRangeCapability', - 'PerformanceLevelCapability', - 'LicenseTypeCapability', - 'ServiceObjectiveCapability', - 'EditionCapability', - 'ElasticPoolPerDatabaseMinPerformanceLevelCapability', - 'ElasticPoolPerDatabaseMaxPerformanceLevelCapability', - 'ElasticPoolPerformanceLevelCapability', - 'ElasticPoolEditionCapability', - 'ServerVersionCapability', - 'ManagedInstanceVcoresCapability', - 'ManagedInstanceFamilyCapability', - 'ManagedInstanceEditionCapability', - 'ManagedInstanceVersionCapability', - 'LocationCapabilities', - 'Database', - 'DatabaseUpdate', - 'ResourceMoveDefinition', - 'ElasticPoolPerDatabaseSettings', - 'ElasticPool', - 'ElasticPoolUpdate', 'VulnerabilityAssessmentScanError', 'VulnerabilityAssessmentScanRecord', - 'DatabaseVulnerabilityAssessmentScansExport', - 'InstanceFailoverGroupReadWriteEndpoint', - 'InstanceFailoverGroupReadOnlyEndpoint', - 'PartnerRegionInfo', - 'ManagedInstancePairInfo', - 'InstanceFailoverGroup', - 'BackupShortTermRetentionPolicy', - 'TdeCertificate', - 'ManagedInstanceKey', - 'ManagedInstanceEncryptionProtector', - 'RecoverableManagedDatabase', - 'ManagedInstanceVulnerabilityAssessment', - 'ServerVulnerabilityAssessment', 'RecoverableDatabasePaged', 'RestorableDroppedDatabasePaged', 'ServerPaged', @@ -635,7 +652,6 @@ 'DatabaseUsagePaged', 'EncryptionProtectorPaged', 'FailoverGroupPaged', - 'ManagedInstancePaged', 'OperationPaged', 'ServerKeyPaged', 'SyncAgentPaged', @@ -676,6 +692,9 @@ 'RecoverableManagedDatabasePaged', 'ManagedInstanceVulnerabilityAssessmentPaged', 'ServerVulnerabilityAssessmentPaged', + 'InstancePoolPaged', + 'UsagePaged', + 'ManagedInstancePaged', 'CheckNameAvailabilityReason', 'ServerConnectionType', 'SecurityAlertPolicyState', @@ -708,9 +727,8 @@ 'ReadWriteEndpointFailoverPolicy', 'ReadOnlyEndpointFailoverPolicy', 'FailoverGroupReplicationRole', - 'IdentityType', - 'ManagedInstanceProxyOverride', 'OperationOrigin', + 'IdentityType', 'SyncAgentState', 'SyncMemberDbType', 'SyncGroupLogType', @@ -750,6 +768,10 @@ 'VulnerabilityAssessmentScanTriggerType', 'VulnerabilityAssessmentScanState', 'InstanceFailoverGroupReplicationRole', + 'InstancePoolLicenseType', + 'ManagedServerCreateMode', + 'ManagedInstanceLicenseType', + 'ManagedInstanceProxyOverride', 'LongTermRetentionDatabaseState', 'VulnerabilityAssessmentPolicyBaselineName', 'SensitivityLabelSource', diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py new file mode 100644 index 000000000000..afc88d2be7ad --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py @@ -0,0 +1,8891 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AutomaticTuningOptions(Model): + """Automatic tuning properties for individual advisors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param desired_state: Automatic tuning option desired state. Possible + values include: 'Off', 'On', 'Default' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired + :ivar actual_state: Automatic tuning option actual state. Possible values + include: 'Off', 'On' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual + :ivar reason_code: Reason code if desired and actual state are different. + :vartype reason_code: int + :ivar reason_desc: Reason description if desired and actual state are + different. Possible values include: 'Default', 'Disabled', + 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', + 'QueryStoreReadOnly', 'NotSupported' + :vartype reason_desc: str or + ~azure.mgmt.sql.models.AutomaticTuningDisabledReason + """ + + _validation = { + 'actual_state': {'readonly': True}, + 'reason_code': {'readonly': True}, + 'reason_desc': {'readonly': True}, + } + + _attribute_map = { + 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, + 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, + 'reason_code': {'key': 'reasonCode', 'type': 'int'}, + 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningDisabledReason'}, + } + + def __init__(self, **kwargs): + super(AutomaticTuningOptions, self).__init__(**kwargs) + self.desired_state = kwargs.get('desired_state', None) + self.actual_state = None + self.reason_code = None + self.reason_desc = None + + +class AutomaticTuningServerOptions(Model): + """Automatic tuning properties for individual advisors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param desired_state: Automatic tuning option desired state. Possible + values include: 'Off', 'On', 'Default' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired + :ivar actual_state: Automatic tuning option actual state. Possible values + include: 'Off', 'On' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual + :ivar reason_code: Reason code if desired and actual state are different. + :vartype reason_code: int + :ivar reason_desc: Reason description if desired and actual state are + different. Possible values include: 'Default', 'Disabled', + 'AutoConfigured' + :vartype reason_desc: str or + ~azure.mgmt.sql.models.AutomaticTuningServerReason + """ + + _validation = { + 'actual_state': {'readonly': True}, + 'reason_code': {'readonly': True}, + 'reason_desc': {'readonly': True}, + } + + _attribute_map = { + 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, + 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, + 'reason_code': {'key': 'reasonCode', 'type': 'int'}, + 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningServerReason'}, + } + + def __init__(self, **kwargs): + super(AutomaticTuningServerOptions, self).__init__(**kwargs) + self.desired_state = kwargs.get('desired_state', None) + self.actual_state = None + self.reason_code = None + self.reason_desc = None + + +class Resource(Model): + """ARM resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ProxyResource(Resource): + """ARM proxy resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) + + +class BackupLongTermRetentionPolicy(ProxyResource): + """A long term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param weekly_retention: The weekly retention policy for an LTR backup in + an ISO 8601 format. + :type weekly_retention: str + :param monthly_retention: The monthly retention policy for an LTR backup + in an ISO 8601 format. + :type monthly_retention: str + :param yearly_retention: The yearly retention policy for an LTR backup in + an ISO 8601 format. + :type yearly_retention: str + :param week_of_year: The week of year to take the yearly backup in an ISO + 8601 format. + :type week_of_year: int + """ + + _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'}, + 'weekly_retention': {'key': 'properties.weeklyRetention', 'type': 'str'}, + 'monthly_retention': {'key': 'properties.monthlyRetention', 'type': 'str'}, + 'yearly_retention': {'key': 'properties.yearlyRetention', 'type': 'str'}, + 'week_of_year': {'key': 'properties.weekOfYear', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BackupLongTermRetentionPolicy, self).__init__(**kwargs) + self.weekly_retention = kwargs.get('weekly_retention', None) + self.monthly_retention = kwargs.get('monthly_retention', None) + self.yearly_retention = kwargs.get('yearly_retention', None) + self.week_of_year = kwargs.get('week_of_year', None) + + +class BackupShortTermRetentionPolicy(ProxyResource): + """A short term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param retention_days: The backup retention period in days. This is how + many days Point-in-Time Restore will be supported. + :type retention_days: int + """ + + _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'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) + self.retention_days = kwargs.get('retention_days', None) + + +class CheckNameAvailabilityRequest(Model): + """A request to check whether the specified name for a resource is available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name whose availability is to be checked. + :type name: str + :ivar type: Required. The type of resource that is used as the scope of + the availability check. Default value: "Microsoft.Sql/servers" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.Sql/servers" + + def __init__(self, **kwargs): + super(CheckNameAvailabilityRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class CheckNameAvailabilityResponse(Model): + """A response indicating whether the specified name for a resource is + available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar available: True if the name is available, otherwise false. + :vartype available: bool + :ivar message: A message explaining why the name is unavailable. Will be + null if the name is available. + :vartype message: str + :ivar name: The name whose availability was checked. + :vartype name: str + :ivar reason: The reason code explaining why the name is unavailable. Will + be null if the name is available. Possible values include: 'Invalid', + 'AlreadyExists' + :vartype reason: str or ~azure.mgmt.sql.models.CheckNameAvailabilityReason + """ + + _validation = { + 'available': {'readonly': True}, + 'message': {'readonly': True}, + 'name': {'readonly': True}, + 'reason': {'readonly': True}, + } + + _attribute_map = { + 'available': {'key': 'available', 'type': 'bool'}, + 'message': {'key': 'message', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'CheckNameAvailabilityReason'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailabilityResponse, self).__init__(**kwargs) + self.available = None + self.message = None + self.name = None + self.reason = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class CompleteDatabaseRestoreDefinition(Model): + """Contains the information necessary to perform a complete database restore + operation. + + All required parameters must be populated in order to send to Azure. + + :param last_backup_name: Required. The last backup name to apply + :type last_backup_name: str + """ + + _validation = { + 'last_backup_name': {'required': True}, + } + + _attribute_map = { + 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CompleteDatabaseRestoreDefinition, self).__init__(**kwargs) + self.last_backup_name = kwargs.get('last_backup_name', None) + + +class CreateDatabaseRestorePointDefinition(Model): + """Contains the information necessary to perform a create database restore + point operation. + + All required parameters must be populated in order to send to Azure. + + :param restore_point_label: Required. The restore point label to apply + :type restore_point_label: str + """ + + _validation = { + 'restore_point_label': {'required': True}, + } + + _attribute_map = { + 'restore_point_label': {'key': 'restorePointLabel', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CreateDatabaseRestorePointDefinition, self).__init__(**kwargs) + self.restore_point_label = kwargs.get('restore_point_label', None) + + +class TrackedResource(Resource): + """ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class Database(TrackedResource): + """A database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The database SKU. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location + ```` + :type sku: ~azure.mgmt.sql.models.Sku + :ivar kind: Kind of database. This is metadata used for the Azure portal + experience. + :vartype kind: str + :ivar managed_by: Resource that manages the database. + :vartype managed_by: str + :param create_mode: Specifies the mode of database creation. + Default: regular database creation. + Copy: creates a database as a copy of an existing database. + sourceDatabaseId must be specified as the resource ID of the source + database. + Secondary: creates a database as a secondary replica of an existing + database. sourceDatabaseId must be specified as the resource ID of the + existing primary database. + PointInTimeRestore: Creates a database by restoring a point in time backup + of an existing database. sourceDatabaseId must be specified as the + resource ID of the existing database, and restorePointInTime must be + specified. + Recovery: Creates a database by restoring a geo-replicated backup. + sourceDatabaseId must be specified as the recoverable database resource ID + to restore. + Restore: Creates a database by restoring a backup of a deleted database. + sourceDatabaseId must be specified. If sourceDatabaseId is the database's + original resource ID, then sourceDatabaseDeletionDate must be specified. + Otherwise sourceDatabaseId must be the restorable dropped database + resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime + may also be specified to restore from an earlier point in time. + RestoreLongTermRetentionBackup: Creates a database by restoring from a + long term retention vault. recoveryServicesRecoveryPointResourceId must be + specified as the recovery point resource ID. + Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for + DataWarehouse edition. Possible values include: 'Default', 'Copy', + 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', + 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', + 'RestoreLongTermRetentionBackup', 'OnlineSecondary' + :type create_mode: str or ~azure.mgmt.sql.models.CreateMode + :param collation: The collation of the database. + :type collation: str + :param max_size_bytes: The max size of the database expressed in bytes. + :type max_size_bytes: long + :param sample_name: The name of the sample schema to apply when creating + this database. Possible values include: 'AdventureWorksLT', + 'WideWorldImportersStd', 'WideWorldImportersFull' + :type sample_name: str or ~azure.mgmt.sql.models.SampleName + :param elastic_pool_id: The resource identifier of the elastic pool + containing this database. + :type elastic_pool_id: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :ivar status: The status of the database. Possible values include: + 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', + 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', + 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', + 'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers', + 'OnlineChangingDwPerformanceTiers' + :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus + :ivar database_id: The ID of the database. + :vartype database_id: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar current_service_objective_name: The current service level objective + name of the database. + :vartype current_service_objective_name: str + :ivar requested_service_objective_name: The requested service level + objective name of the database. + :vartype requested_service_objective_name: str + :ivar default_secondary_location: The default secondary region for this + database. + :vartype default_secondary_location: str + :ivar failover_group_id: Failover Group resource identifier that this + database belongs to. + :vartype failover_group_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param source_database_deletion_date: Specifies the time that the database + was deleted. + :type source_database_deletion_date: datetime + :param recovery_services_recovery_point_id: The resource identifier of the + recovery point associated with create operation of this database. + :type recovery_services_recovery_point_id: str + :param long_term_retention_backup_resource_id: The resource identifier of + the long term retention backup associated with create operation of this + database. + :type long_term_retention_backup_resource_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param restorable_dropped_database_id: The resource identifier of the + restorable dropped database associated with create operation of this + database. + :type restorable_dropped_database_id: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param zone_redundant: Whether or not this database is zone redundant, + which means the replicas of this database will be spread across multiple + availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this database. Possible + values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType + :ivar max_log_size_bytes: The max log size for this database. + :vartype max_log_size_bytes: long + :ivar earliest_restore_date: This records the earliest start date and time + that restore is available for this database (ISO8601 format). + :vartype earliest_restore_date: datetime + :param read_scale: The state of read-only routing. If enabled, connections + that have application intent set to readonly in their connection string + may be routed to a readonly secondary replica in the same region. Possible + values include: 'Enabled', 'Disabled' + :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale + :ivar current_sku: The name and tier of the SKU. + :vartype current_sku: ~azure.mgmt.sql.models.Sku + :param auto_pause_delay: Time in minutes after which database is + automatically paused. A value of -1 means that automatic pause is disabled + :type auto_pause_delay: int + :param min_capacity: Minimal capacity that database will always have + allocated, if not paused + :type min_capacity: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'managed_by': {'readonly': True}, + 'status': {'readonly': True}, + 'database_id': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'current_service_objective_name': {'readonly': True}, + 'requested_service_objective_name': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + 'max_log_size_bytes': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'current_sku': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, + 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, + 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, + 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, + 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, + 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, + 'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'}, + 'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(Database, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.kind = None + self.managed_by = None + self.create_mode = kwargs.get('create_mode', None) + self.collation = kwargs.get('collation', None) + self.max_size_bytes = kwargs.get('max_size_bytes', None) + self.sample_name = kwargs.get('sample_name', None) + self.elastic_pool_id = kwargs.get('elastic_pool_id', None) + self.source_database_id = kwargs.get('source_database_id', None) + self.status = None + self.database_id = None + self.creation_date = None + self.current_service_objective_name = None + self.requested_service_objective_name = None + self.default_secondary_location = None + self.failover_group_id = None + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.source_database_deletion_date = kwargs.get('source_database_deletion_date', None) + self.recovery_services_recovery_point_id = kwargs.get('recovery_services_recovery_point_id', None) + self.long_term_retention_backup_resource_id = kwargs.get('long_term_retention_backup_resource_id', None) + self.recoverable_database_id = kwargs.get('recoverable_database_id', None) + self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) + self.catalog_collation = kwargs.get('catalog_collation', None) + self.zone_redundant = kwargs.get('zone_redundant', None) + self.license_type = kwargs.get('license_type', None) + self.max_log_size_bytes = None + self.earliest_restore_date = None + self.read_scale = kwargs.get('read_scale', None) + self.current_sku = None + self.auto_pause_delay = kwargs.get('auto_pause_delay', None) + self.min_capacity = kwargs.get('min_capacity', None) + + +class DatabaseAutomaticTuning(ProxyResource): + """Database-level Automatic Tuning. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param desired_state: Automatic tuning desired state. Possible values + include: 'Inherit', 'Custom', 'Auto', 'Unspecified' + :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode + :ivar actual_state: Automatic tuning actual state. Possible values + include: 'Inherit', 'Custom', 'Auto', 'Unspecified' + :vartype actual_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode + :param options: Automatic tuning options definition. + :type options: dict[str, ~azure.mgmt.sql.models.AutomaticTuningOptions] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'actual_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningMode'}, + 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningMode'}, + 'options': {'key': 'properties.options', 'type': '{AutomaticTuningOptions}'}, + } + + def __init__(self, **kwargs): + super(DatabaseAutomaticTuning, self).__init__(**kwargs) + self.desired_state = kwargs.get('desired_state', None) + self.actual_state = None + self.options = kwargs.get('options', None) + + +class DatabaseBlobAuditingPolicy(ProxyResource): + """A database blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Resource kind. + :vartype kind: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DatabaseBlobAuditingPolicy, self).__init__(**kwargs) + self.kind = None + self.state = kwargs.get('state', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) + self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) + self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) + self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) + + +class DatabaseOperation(ProxyResource): + """A database operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_name: The name of the database the operation is being + performed on. + :vartype database_name: str + :ivar operation: The name of operation. + :vartype operation: str + :ivar operation_friendly_name: The friendly name of operation. + :vartype operation_friendly_name: str + :ivar percent_complete: The percentage of the operation completed. + :vartype percent_complete: int + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar start_time: The operation start time. + :vartype start_time: datetime + :ivar state: The operation state. Possible values include: 'Pending', + 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', 'Cancelled' + :vartype state: str or ~azure.mgmt.sql.models.ManagementOperationState + :ivar error_code: The operation error code. + :vartype error_code: int + :ivar error_description: The operation error description. + :vartype error_description: str + :ivar error_severity: The operation error severity. + :vartype error_severity: int + :ivar is_user_error: Whether or not the error is a user error. + :vartype is_user_error: bool + :ivar estimated_completion_time: The estimated completion time of the + operation. + :vartype estimated_completion_time: datetime + :ivar description: The operation description. + :vartype description: str + :ivar is_cancellable: Whether the operation can be cancelled. + :vartype is_cancellable: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_name': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_friendly_name': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_description': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'is_user_error': {'readonly': True}, + 'estimated_completion_time': {'readonly': True}, + 'description': {'readonly': True}, + 'is_cancellable': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, + 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DatabaseOperation, self).__init__(**kwargs) + self.database_name = None + self.operation = None + self.operation_friendly_name = None + self.percent_complete = None + self.server_name = None + self.start_time = None + self.state = None + self.error_code = None + self.error_description = None + self.error_severity = None + self.is_user_error = None + self.estimated_completion_time = None + self.description = None + self.is_cancellable = None + + +class DatabaseSecurityAlertPolicy(ProxyResource): + """Contains information about a database Threat Detection policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar kind: Resource kind. + :vartype kind: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint and storageAccountAccessKey are required. + Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies the semicolon-separated list of alerts + that are disabled, or empty string to disable no alerts. Possible values: + Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; + Data_Exfiltration; Unsafe_Action. + :type disabled_alerts: str + :param email_addresses: Specifies the semicolon-separated list of e-mail + addresses to which the alert is sent. + :type email_addresses: str + :param email_account_admins: Specifies that the alert is sent to the + account administrators. Possible values include: 'Enabled', 'Disabled' + :type email_account_admins: str or + ~azure.mgmt.sql.models.SecurityAlertPolicyEmailAccountAdmins + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. If state is Enabled, storageEndpoint is + required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. If state is Enabled, + storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :param use_server_default: Specifies whether to use the default server + policy. Possible values include: 'Enabled', 'Disabled' + :type use_server_default: str or + ~azure.mgmt.sql.models.SecurityAlertPolicyUseServerDefault + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': 'str'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': 'str'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'SecurityAlertPolicyEmailAccountAdmins'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'use_server_default': {'key': 'properties.useServerDefault', 'type': 'SecurityAlertPolicyUseServerDefault'}, + } + + def __init__(self, **kwargs): + super(DatabaseSecurityAlertPolicy, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.kind = None + self.state = kwargs.get('state', None) + self.disabled_alerts = kwargs.get('disabled_alerts', None) + self.email_addresses = kwargs.get('email_addresses', None) + self.email_account_admins = kwargs.get('email_account_admins', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.use_server_default = kwargs.get('use_server_default', None) + + +class DatabaseUpdate(Model): + """A database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param create_mode: Specifies the mode of database creation. + Default: regular database creation. + Copy: creates a database as a copy of an existing database. + sourceDatabaseId must be specified as the resource ID of the source + database. + Secondary: creates a database as a secondary replica of an existing + database. sourceDatabaseId must be specified as the resource ID of the + existing primary database. + PointInTimeRestore: Creates a database by restoring a point in time backup + of an existing database. sourceDatabaseId must be specified as the + resource ID of the existing database, and restorePointInTime must be + specified. + Recovery: Creates a database by restoring a geo-replicated backup. + sourceDatabaseId must be specified as the recoverable database resource ID + to restore. + Restore: Creates a database by restoring a backup of a deleted database. + sourceDatabaseId must be specified. If sourceDatabaseId is the database's + original resource ID, then sourceDatabaseDeletionDate must be specified. + Otherwise sourceDatabaseId must be the restorable dropped database + resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime + may also be specified to restore from an earlier point in time. + RestoreLongTermRetentionBackup: Creates a database by restoring from a + long term retention vault. recoveryServicesRecoveryPointResourceId must be + specified as the recovery point resource ID. + Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for + DataWarehouse edition. Possible values include: 'Default', 'Copy', + 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', + 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', + 'RestoreLongTermRetentionBackup', 'OnlineSecondary' + :type create_mode: str or ~azure.mgmt.sql.models.CreateMode + :param collation: The collation of the database. + :type collation: str + :param max_size_bytes: The max size of the database expressed in bytes. + :type max_size_bytes: long + :param sample_name: The name of the sample schema to apply when creating + this database. Possible values include: 'AdventureWorksLT', + 'WideWorldImportersStd', 'WideWorldImportersFull' + :type sample_name: str or ~azure.mgmt.sql.models.SampleName + :param elastic_pool_id: The resource identifier of the elastic pool + containing this database. + :type elastic_pool_id: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :ivar status: The status of the database. Possible values include: + 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', + 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', + 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', + 'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers', + 'OnlineChangingDwPerformanceTiers' + :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus + :ivar database_id: The ID of the database. + :vartype database_id: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar current_service_objective_name: The current service level objective + name of the database. + :vartype current_service_objective_name: str + :ivar requested_service_objective_name: The requested service level + objective name of the database. + :vartype requested_service_objective_name: str + :ivar default_secondary_location: The default secondary region for this + database. + :vartype default_secondary_location: str + :ivar failover_group_id: Failover Group resource identifier that this + database belongs to. + :vartype failover_group_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param source_database_deletion_date: Specifies the time that the database + was deleted. + :type source_database_deletion_date: datetime + :param recovery_services_recovery_point_id: The resource identifier of the + recovery point associated with create operation of this database. + :type recovery_services_recovery_point_id: str + :param long_term_retention_backup_resource_id: The resource identifier of + the long term retention backup associated with create operation of this + database. + :type long_term_retention_backup_resource_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param restorable_dropped_database_id: The resource identifier of the + restorable dropped database associated with create operation of this + database. + :type restorable_dropped_database_id: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param zone_redundant: Whether or not this database is zone redundant, + which means the replicas of this database will be spread across multiple + availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this database. Possible + values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType + :ivar max_log_size_bytes: The max log size for this database. + :vartype max_log_size_bytes: long + :ivar earliest_restore_date: This records the earliest start date and time + that restore is available for this database (ISO8601 format). + :vartype earliest_restore_date: datetime + :param read_scale: The state of read-only routing. If enabled, connections + that have application intent set to readonly in their connection string + may be routed to a readonly secondary replica in the same region. Possible + values include: 'Enabled', 'Disabled' + :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale + :ivar current_sku: The name and tier of the SKU. + :vartype current_sku: ~azure.mgmt.sql.models.Sku + :param auto_pause_delay: Time in minutes after which database is + automatically paused. A value of -1 means that automatic pause is disabled + :type auto_pause_delay: int + :param min_capacity: Minimal capacity that database will always have + allocated, if not paused + :type min_capacity: float + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'status': {'readonly': True}, + 'database_id': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'current_service_objective_name': {'readonly': True}, + 'requested_service_objective_name': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + 'max_log_size_bytes': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'current_sku': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, + 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, + 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, + 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, + 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, + 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, + 'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'}, + 'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(DatabaseUpdate, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.create_mode = kwargs.get('create_mode', None) + self.collation = kwargs.get('collation', None) + self.max_size_bytes = kwargs.get('max_size_bytes', None) + self.sample_name = kwargs.get('sample_name', None) + self.elastic_pool_id = kwargs.get('elastic_pool_id', None) + self.source_database_id = kwargs.get('source_database_id', None) + self.status = None + self.database_id = None + self.creation_date = None + self.current_service_objective_name = None + self.requested_service_objective_name = None + self.default_secondary_location = None + self.failover_group_id = None + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.source_database_deletion_date = kwargs.get('source_database_deletion_date', None) + self.recovery_services_recovery_point_id = kwargs.get('recovery_services_recovery_point_id', None) + self.long_term_retention_backup_resource_id = kwargs.get('long_term_retention_backup_resource_id', None) + self.recoverable_database_id = kwargs.get('recoverable_database_id', None) + self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) + self.catalog_collation = kwargs.get('catalog_collation', None) + self.zone_redundant = kwargs.get('zone_redundant', None) + self.license_type = kwargs.get('license_type', None) + self.max_log_size_bytes = None + self.earliest_restore_date = None + self.read_scale = kwargs.get('read_scale', None) + self.current_sku = None + self.auto_pause_delay = kwargs.get('auto_pause_delay', None) + self.min_capacity = kwargs.get('min_capacity', None) + self.tags = kwargs.get('tags', None) + + +class DatabaseUsage(Model): + """The database usages. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the usage metric. + :vartype name: str + :ivar resource_name: The name of the resource. + :vartype resource_name: str + :ivar display_name: The usage metric display name. + :vartype display_name: str + :ivar current_value: The current value of the usage metric. + :vartype current_value: float + :ivar limit: The current limit of the usage metric. + :vartype limit: float + :ivar unit: The units of the usage metric. + :vartype unit: str + :ivar next_reset_time: The next reset time for the usage metric (ISO8601 + format). + :vartype next_reset_time: datetime + """ + + _validation = { + 'name': {'readonly': True}, + 'resource_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'next_reset_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(DatabaseUsage, self).__init__(**kwargs) + self.name = None + self.resource_name = None + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + self.next_reset_time = None + + +class DatabaseVulnerabilityAssessment(ProxyResource): + """A database vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: A blob storage container path to hold the + scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It + is required if server level vulnerability assessment policy doesn't set + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _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'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, **kwargs): + super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = kwargs.get('storage_container_path', None) + self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.recurring_scans = kwargs.get('recurring_scans', None) + + +class DatabaseVulnerabilityAssessmentRuleBaseline(ProxyResource): + """A database vulnerability assessment rule baseline. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param baseline_results: Required. The rule baseline result + :type baseline_results: + list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'baseline_results': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'baseline_results': {'key': 'properties.baselineResults', 'type': '[DatabaseVulnerabilityAssessmentRuleBaselineItem]'}, + } + + def __init__(self, **kwargs): + super(DatabaseVulnerabilityAssessmentRuleBaseline, self).__init__(**kwargs) + self.baseline_results = kwargs.get('baseline_results', None) + + +class DatabaseVulnerabilityAssessmentRuleBaselineItem(Model): + """Properties for an Azure SQL Database Vulnerability Assessment rule + baseline's result. + + All required parameters must be populated in order to send to Azure. + + :param result: Required. The rule baseline result + :type result: list[str] + """ + + _validation = { + 'result': {'required': True}, + } + + _attribute_map = { + 'result': {'key': 'result', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(DatabaseVulnerabilityAssessmentRuleBaselineItem, self).__init__(**kwargs) + self.result = kwargs.get('result', None) + + +class DatabaseVulnerabilityAssessmentScansExport(ProxyResource): + """A database Vulnerability Assessment scan export resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar exported_report_location: Location of the exported report (e.g. + https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). + :vartype exported_report_location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'exported_report_location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs) + self.exported_report_location = None + + +class DataMaskingPolicy(ProxyResource): + """Represents a database data masking policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param data_masking_state: Required. The state of the data masking policy. + Possible values include: 'Disabled', 'Enabled' + :type data_masking_state: str or ~azure.mgmt.sql.models.DataMaskingState + :param exempt_principals: The list of the exempt principals. Specifies the + semicolon-separated list of database users for which the data masking + policy does not apply. The specified users receive data results without + masking for all of the database queries. + :type exempt_principals: str + :ivar application_principals: The list of the application principals. This + is a legacy parameter and is no longer used. + :vartype application_principals: str + :ivar masking_level: The masking level. This is a legacy parameter and is + no longer used. + :vartype masking_level: str + :ivar location: The location of the data masking policy. + :vartype location: str + :ivar kind: The kind of data masking policy. Metadata, used for Azure + portal. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_masking_state': {'required': True}, + 'application_principals': {'readonly': True}, + 'masking_level': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_masking_state': {'key': 'properties.dataMaskingState', 'type': 'DataMaskingState'}, + 'exempt_principals': {'key': 'properties.exemptPrincipals', 'type': 'str'}, + 'application_principals': {'key': 'properties.applicationPrincipals', 'type': 'str'}, + 'masking_level': {'key': 'properties.maskingLevel', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataMaskingPolicy, self).__init__(**kwargs) + self.data_masking_state = kwargs.get('data_masking_state', None) + self.exempt_principals = kwargs.get('exempt_principals', None) + self.application_principals = None + self.masking_level = None + self.location = None + self.kind = None + + +class DataMaskingRule(ProxyResource): + """Represents a database data masking rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar data_masking_rule_id: The rule Id. + :vartype data_masking_rule_id: str + :param alias_name: The alias name. This is a legacy parameter and is no + longer used. + :type alias_name: str + :param rule_state: The rule state. Used to delete a rule. To delete an + existing rule, specify the schemaName, tableName, columnName, + maskingFunction, and specify ruleState as disabled. However, if the rule + doesn't already exist, the rule will be created with ruleState set to + enabled, regardless of the provided value of ruleState. Possible values + include: 'Disabled', 'Enabled' + :type rule_state: str or ~azure.mgmt.sql.models.DataMaskingRuleState + :param schema_name: Required. The schema name on which the data masking + rule is applied. + :type schema_name: str + :param table_name: Required. The table name on which the data masking rule + is applied. + :type table_name: str + :param column_name: Required. The column name on which the data masking + rule is applied. + :type column_name: str + :param masking_function: Required. The masking function that is used for + the data masking rule. Possible values include: 'Default', 'CCN', 'Email', + 'Number', 'SSN', 'Text' + :type masking_function: str or ~azure.mgmt.sql.models.DataMaskingFunction + :param number_from: The numberFrom property of the masking rule. Required + if maskingFunction is set to Number, otherwise this parameter will be + ignored. + :type number_from: str + :param number_to: The numberTo property of the data masking rule. Required + if maskingFunction is set to Number, otherwise this parameter will be + ignored. + :type number_to: str + :param prefix_size: If maskingFunction is set to Text, the number of + characters to show unmasked in the beginning of the string. Otherwise, + this parameter will be ignored. + :type prefix_size: str + :param suffix_size: If maskingFunction is set to Text, the number of + characters to show unmasked at the end of the string. Otherwise, this + parameter will be ignored. + :type suffix_size: str + :param replacement_string: If maskingFunction is set to Text, the + character to use for masking the unexposed part of the string. Otherwise, + this parameter will be ignored. + :type replacement_string: str + :ivar location: The location of the data masking rule. + :vartype location: str + :ivar kind: The kind of Data Masking Rule. Metadata, used for Azure + portal. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_masking_rule_id': {'readonly': True}, + 'schema_name': {'required': True}, + 'table_name': {'required': True}, + 'column_name': {'required': True}, + 'masking_function': {'required': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_masking_rule_id': {'key': 'properties.id', 'type': 'str'}, + 'alias_name': {'key': 'properties.aliasName', 'type': 'str'}, + 'rule_state': {'key': 'properties.ruleState', 'type': 'DataMaskingRuleState'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, + 'table_name': {'key': 'properties.tableName', 'type': 'str'}, + 'column_name': {'key': 'properties.columnName', 'type': 'str'}, + 'masking_function': {'key': 'properties.maskingFunction', 'type': 'DataMaskingFunction'}, + 'number_from': {'key': 'properties.numberFrom', 'type': 'str'}, + 'number_to': {'key': 'properties.numberTo', 'type': 'str'}, + 'prefix_size': {'key': 'properties.prefixSize', 'type': 'str'}, + 'suffix_size': {'key': 'properties.suffixSize', 'type': 'str'}, + 'replacement_string': {'key': 'properties.replacementString', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataMaskingRule, self).__init__(**kwargs) + self.data_masking_rule_id = None + self.alias_name = kwargs.get('alias_name', None) + self.rule_state = kwargs.get('rule_state', None) + self.schema_name = kwargs.get('schema_name', None) + self.table_name = kwargs.get('table_name', None) + self.column_name = kwargs.get('column_name', None) + self.masking_function = kwargs.get('masking_function', None) + self.number_from = kwargs.get('number_from', None) + self.number_to = kwargs.get('number_to', None) + self.prefix_size = kwargs.get('prefix_size', None) + self.suffix_size = kwargs.get('suffix_size', None) + self.replacement_string = kwargs.get('replacement_string', None) + self.location = None + self.kind = None + + +class EditionCapability(Model): + """The edition capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The database edition name. + :vartype name: str + :ivar supported_service_level_objectives: The list of supported service + objectives for the edition. + :vartype supported_service_level_objectives: + list[~azure.mgmt.sql.models.ServiceObjectiveCapability] + :ivar zone_redundant: Whether or not zone redundancy is supported for the + edition. + :vartype zone_redundant: bool + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_service_level_objectives': {'readonly': True}, + 'zone_redundant': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_service_level_objectives': {'key': 'supportedServiceLevelObjectives', 'type': '[ServiceObjectiveCapability]'}, + 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_service_level_objectives = None + self.zone_redundant = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ElasticPool(TrackedResource): + """An elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The elastic pool SKU. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or the following command: + ```azurecli + az sql elastic-pool list-editions -l -o table + ```` + :type sku: ~azure.mgmt.sql.models.Sku + :ivar kind: Kind of elastic pool. This is metadata used for the Azure + portal experience. + :vartype kind: str + :ivar state: The state of the elastic pool. Possible values include: + 'Creating', 'Ready', 'Disabled' + :vartype state: str or ~azure.mgmt.sql.models.ElasticPoolState + :ivar creation_date: The creation date of the elastic pool (ISO8601 + format). + :vartype creation_date: datetime + :param max_size_bytes: The storage limit for the database elastic pool in + bytes. + :type max_size_bytes: long + :param per_database_settings: The per database settings for the elastic + pool. + :type per_database_settings: + ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings + :param zone_redundant: Whether or not this elastic pool is zone redundant, + which means the replicas of this elastic pool will be spread across + multiple availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this elastic pool. + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'state': {'readonly': True}, + 'creation_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPool, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.kind = None + self.state = None + self.creation_date = None + self.max_size_bytes = kwargs.get('max_size_bytes', None) + self.per_database_settings = kwargs.get('per_database_settings', None) + self.zone_redundant = kwargs.get('zone_redundant', None) + self.license_type = kwargs.get('license_type', None) + + +class ElasticPoolActivity(ProxyResource): + """Represents the activity on an elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar end_time: The time the operation finished (ISO8601 format). + :vartype end_time: datetime + :ivar error_code: The error code if available. + :vartype error_code: int + :ivar error_message: The error message if available. + :vartype error_message: str + :ivar error_severity: The error severity if available. + :vartype error_severity: int + :ivar operation: The operation name. + :vartype operation: str + :ivar operation_id: The unique operation ID. + :vartype operation_id: str + :ivar percent_complete: The percentage complete if available. + :vartype percent_complete: int + :ivar requested_database_dtu_max: The requested max DTU per database if + available. + :vartype requested_database_dtu_max: int + :ivar requested_database_dtu_min: The requested min DTU per database if + available. + :vartype requested_database_dtu_min: int + :ivar requested_dtu: The requested DTU for the pool if available. + :vartype requested_dtu: int + :ivar requested_elastic_pool_name: The requested name for the elastic pool + if available. + :vartype requested_elastic_pool_name: str + :ivar requested_storage_limit_in_gb: The requested storage limit for the + pool in GB if available. + :vartype requested_storage_limit_in_gb: long + :ivar elastic_pool_name: The name of the elastic pool. + :vartype elastic_pool_name: str + :ivar server_name: The name of the server the elastic pool is in. + :vartype server_name: str + :ivar start_time: The time the operation started (ISO8601 format). + :vartype start_time: datetime + :ivar state: The current state of the operation. + :vartype state: str + :ivar requested_storage_limit_in_mb: The requested storage limit in MB. + :vartype requested_storage_limit_in_mb: int + :ivar requested_database_dtu_guarantee: The requested per database DTU + guarantee. + :vartype requested_database_dtu_guarantee: int + :ivar requested_database_dtu_cap: The requested per database DTU cap. + :vartype requested_database_dtu_cap: int + :ivar requested_dtu_guarantee: The requested DTU guarantee. + :vartype requested_dtu_guarantee: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_message': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_id': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'requested_database_dtu_max': {'readonly': True}, + 'requested_database_dtu_min': {'readonly': True}, + 'requested_dtu': {'readonly': True}, + 'requested_elastic_pool_name': {'readonly': True}, + 'requested_storage_limit_in_gb': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'requested_storage_limit_in_mb': {'readonly': True}, + 'requested_database_dtu_guarantee': {'readonly': True}, + 'requested_database_dtu_cap': {'readonly': True}, + 'requested_dtu_guarantee': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'requested_database_dtu_max': {'key': 'properties.requestedDatabaseDtuMax', 'type': 'int'}, + 'requested_database_dtu_min': {'key': 'properties.requestedDatabaseDtuMin', 'type': 'int'}, + 'requested_dtu': {'key': 'properties.requestedDtu', 'type': 'int'}, + 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, + 'requested_storage_limit_in_gb': {'key': 'properties.requestedStorageLimitInGB', 'type': 'long'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'requested_storage_limit_in_mb': {'key': 'properties.requestedStorageLimitInMB', 'type': 'int'}, + 'requested_database_dtu_guarantee': {'key': 'properties.requestedDatabaseDtuGuarantee', 'type': 'int'}, + 'requested_database_dtu_cap': {'key': 'properties.requestedDatabaseDtuCap', 'type': 'int'}, + 'requested_dtu_guarantee': {'key': 'properties.requestedDtuGuarantee', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolActivity, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.end_time = None + self.error_code = None + self.error_message = None + self.error_severity = None + self.operation = None + self.operation_id = None + self.percent_complete = None + self.requested_database_dtu_max = None + self.requested_database_dtu_min = None + self.requested_dtu = None + self.requested_elastic_pool_name = None + self.requested_storage_limit_in_gb = None + self.elastic_pool_name = None + self.server_name = None + self.start_time = None + self.state = None + self.requested_storage_limit_in_mb = None + self.requested_database_dtu_guarantee = None + self.requested_database_dtu_cap = None + self.requested_dtu_guarantee = None + + +class ElasticPoolDatabaseActivity(ProxyResource): + """Represents the activity on an elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar database_name: The database name. + :vartype database_name: str + :ivar end_time: The time the operation finished (ISO8601 format). + :vartype end_time: datetime + :ivar error_code: The error code if available. + :vartype error_code: int + :ivar error_message: The error message if available. + :vartype error_message: str + :ivar error_severity: The error severity if available. + :vartype error_severity: int + :ivar operation: The operation name. + :vartype operation: str + :ivar operation_id: The unique operation ID. + :vartype operation_id: str + :ivar percent_complete: The percentage complete if available. + :vartype percent_complete: int + :ivar requested_elastic_pool_name: The name for the elastic pool the + database is moving into if available. + :vartype requested_elastic_pool_name: str + :ivar current_elastic_pool_name: The name of the current elastic pool the + database is in if available. + :vartype current_elastic_pool_name: str + :ivar current_service_objective: The name of the current service objective + if available. + :vartype current_service_objective: str + :ivar requested_service_objective: The name of the requested service + objective if available. + :vartype requested_service_objective: str + :ivar server_name: The name of the server the elastic pool is in. + :vartype server_name: str + :ivar start_time: The time the operation started (ISO8601 format). + :vartype start_time: datetime + :ivar state: The current state of the operation. + :vartype state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_name': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_message': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_id': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'requested_elastic_pool_name': {'readonly': True}, + 'current_elastic_pool_name': {'readonly': True}, + 'current_service_objective': {'readonly': True}, + 'requested_service_objective': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, + 'current_elastic_pool_name': {'key': 'properties.currentElasticPoolName', 'type': 'str'}, + 'current_service_objective': {'key': 'properties.currentServiceObjective', 'type': 'str'}, + 'requested_service_objective': {'key': 'properties.requestedServiceObjective', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolDatabaseActivity, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.database_name = None + self.end_time = None + self.error_code = None + self.error_message = None + self.error_severity = None + self.operation = None + self.operation_id = None + self.percent_complete = None + self.requested_elastic_pool_name = None + self.current_elastic_pool_name = None + self.current_service_objective = None + self.requested_service_objective = None + self.server_name = None + self.start_time = None + self.state = None + + +class ElasticPoolEditionCapability(Model): + """The elastic pool edition capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The elastic pool edition name. + :vartype name: str + :ivar supported_elastic_pool_performance_levels: The list of supported + elastic pool DTU levels for the edition. + :vartype supported_elastic_pool_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerformanceLevelCapability] + :ivar zone_redundant: Whether or not zone redundancy is supported for the + edition. + :vartype zone_redundant: bool + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_elastic_pool_performance_levels': {'readonly': True}, + 'zone_redundant': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_elastic_pool_performance_levels': {'key': 'supportedElasticPoolPerformanceLevels', 'type': '[ElasticPoolPerformanceLevelCapability]'}, + 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolEditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_elastic_pool_performance_levels = None + self.zone_redundant = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ElasticPoolOperation(ProxyResource): + """A elastic pool operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar elastic_pool_name: The name of the elastic pool the operation is + being performed on. + :vartype elastic_pool_name: str + :ivar operation: The name of operation. + :vartype operation: str + :ivar operation_friendly_name: The friendly name of operation. + :vartype operation_friendly_name: str + :ivar percent_complete: The percentage of the operation completed. + :vartype percent_complete: int + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar start_time: The operation start time. + :vartype start_time: datetime + :ivar state: The operation state. + :vartype state: str + :ivar error_code: The operation error code. + :vartype error_code: int + :ivar error_description: The operation error description. + :vartype error_description: str + :ivar error_severity: The operation error severity. + :vartype error_severity: int + :ivar is_user_error: Whether or not the error is a user error. + :vartype is_user_error: bool + :ivar estimated_completion_time: The estimated completion time of the + operation. + :vartype estimated_completion_time: datetime + :ivar description: The operation description. + :vartype description: str + :ivar is_cancellable: Whether the operation can be cancelled. + :vartype is_cancellable: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_friendly_name': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_description': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'is_user_error': {'readonly': True}, + 'estimated_completion_time': {'readonly': True}, + 'description': {'readonly': True}, + 'is_cancellable': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, + 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolOperation, self).__init__(**kwargs) + self.elastic_pool_name = None + self.operation = None + self.operation_friendly_name = None + self.percent_complete = None + self.server_name = None + self.start_time = None + self.state = None + self.error_code = None + self.error_description = None + self.error_severity = None + self.is_user_error = None + self.estimated_completion_time = None + self.description = None + self.is_cancellable = None + + +class ElasticPoolPerDatabaseMaxPerformanceLevelCapability(Model): + """The max per-database performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The maximum performance level per database. + :vartype limit: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + :ivar supported_per_database_min_performance_levels: The list of supported + min database performance levels. + :vartype supported_per_database_min_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMinPerformanceLevelCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'supported_per_database_min_performance_levels': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'supported_per_database_min_performance_levels': {'key': 'supportedPerDatabaseMinPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMinPerformanceLevelCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolPerDatabaseMaxPerformanceLevelCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + self.supported_per_database_min_performance_levels = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ElasticPoolPerDatabaseMinPerformanceLevelCapability(Model): + """The minimum per-database performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The minimum performance level per database. + :vartype limit: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolPerDatabaseMinPerformanceLevelCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ElasticPoolPerDatabaseSettings(Model): + """Per database settings of an elastic pool. + + :param min_capacity: The minimum capacity all databases are guaranteed. + :type min_capacity: float + :param max_capacity: The maximum capacity any one database can consume. + :type max_capacity: float + """ + + _attribute_map = { + 'min_capacity': {'key': 'minCapacity', 'type': 'float'}, + 'max_capacity': {'key': 'maxCapacity', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolPerDatabaseSettings, self).__init__(**kwargs) + self.min_capacity = kwargs.get('min_capacity', None) + self.max_capacity = kwargs.get('max_capacity', None) + + +class ElasticPoolPerformanceLevelCapability(Model): + """The Elastic Pool performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar performance_level: The performance level for the pool. + :vartype performance_level: + ~azure.mgmt.sql.models.PerformanceLevelCapability + :ivar sku: The sku. + :vartype sku: ~azure.mgmt.sql.models.Sku + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar max_database_count: The maximum number of databases supported. + :vartype max_database_count: int + :ivar included_max_size: The included (free) max size for this performance + level. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar supported_max_sizes: The list of supported max sizes. + :vartype supported_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar supported_per_database_max_sizes: The list of supported per database + max sizes. + :vartype supported_per_database_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar supported_per_database_max_performance_levels: The list of supported + per database max performance levels. + :vartype supported_per_database_max_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMaxPerformanceLevelCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'performance_level': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'max_database_count': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'supported_max_sizes': {'readonly': True}, + 'supported_per_database_max_sizes': {'readonly': True}, + 'supported_per_database_max_performance_levels': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'max_database_count': {'key': 'maxDatabaseCount', 'type': 'int'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'supported_per_database_max_sizes': {'key': 'supportedPerDatabaseMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'supported_per_database_max_performance_levels': {'key': 'supportedPerDatabaseMaxPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMaxPerformanceLevelCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolPerformanceLevelCapability, self).__init__(**kwargs) + self.performance_level = None + self.sku = None + self.supported_license_types = None + self.max_database_count = None + self.included_max_size = None + self.supported_max_sizes = None + self.supported_per_database_max_sizes = None + self.supported_per_database_max_performance_levels = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ElasticPoolUpdate(Model): + """An elastic pool update. + + :param sku: + :type sku: ~azure.mgmt.sql.models.Sku + :param max_size_bytes: The storage limit for the database elastic pool in + bytes. + :type max_size_bytes: long + :param per_database_settings: The per database settings for the elastic + pool. + :type per_database_settings: + ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings + :param zone_redundant: Whether or not this elastic pool is zone redundant, + which means the replicas of this elastic pool will be spread across + multiple availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this elastic pool. + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolUpdate, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.max_size_bytes = kwargs.get('max_size_bytes', None) + self.per_database_settings = kwargs.get('per_database_settings', None) + self.zone_redundant = kwargs.get('zone_redundant', None) + self.license_type = kwargs.get('license_type', None) + self.tags = kwargs.get('tags', None) + + +class EncryptionProtector(ProxyResource): + """The server encryption protector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :type kind: str + :ivar location: Resource location. + :vartype location: str + :ivar subregion: Subregion of the encryption protector. + :vartype subregion: str + :param server_key_name: The name of the server key. + :type server_key_name: str + :param server_key_type: Required. The encryption protector type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :ivar uri: The URI of the server key. + :vartype uri: str + :ivar thumbprint: Thumbprint of the server key. + :vartype thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'subregion': {'readonly': True}, + 'server_key_type': {'required': True}, + 'uri': {'readonly': True}, + 'thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'subregion': {'key': 'properties.subregion', 'type': 'str'}, + 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EncryptionProtector, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + self.location = None + self.subregion = None + self.server_key_name = kwargs.get('server_key_name', None) + self.server_key_type = kwargs.get('server_key_type', None) + self.uri = None + self.thumbprint = None + + +class ExportRequest(Model): + """Export database parameters. + + All required parameters must be populated in order to send to Azure. + + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + } + + _attribute_map = { + 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, + } + + def __init__(self, **kwargs): + super(ExportRequest, self).__init__(**kwargs) + self.storage_key_type = kwargs.get('storage_key_type', None) + self.storage_key = kwargs.get('storage_key', None) + self.storage_uri = kwargs.get('storage_uri', None) + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.authentication_type = kwargs.get('authentication_type', "SQL") + + +class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): + """An extended database blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param predicate_expression: Specifies condition of where clause when + creating an audit. + :type predicate_expression: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ExtendedDatabaseBlobAuditingPolicy, self).__init__(**kwargs) + self.predicate_expression = kwargs.get('predicate_expression', None) + self.state = kwargs.get('state', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) + self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) + self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) + self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) + + +class ExtendedServerBlobAuditingPolicy(ProxyResource): + """An extended server blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param predicate_expression: Specifies condition of where clause when + creating an audit. + :type predicate_expression: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ExtendedServerBlobAuditingPolicy, self).__init__(**kwargs) + self.predicate_expression = kwargs.get('predicate_expression', None) + self.state = kwargs.get('state', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) + self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) + self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) + self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) + + +class FailoverGroup(ProxyResource): + """A failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param read_write_endpoint: Required. Read-write endpoint of the failover + group instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint + :ivar replication_role: Local replication role of the failover group + instance. Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.FailoverGroupReplicationRole + :ivar replication_state: Replication state of the failover group instance. + :vartype replication_state: str + :param partner_servers: Required. List of partner server information for + the failover group. + :type partner_servers: list[~azure.mgmt.sql.models.PartnerInfo] + :param databases: List of databases in the failover group. + :type databases: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'read_write_endpoint': {'required': True}, + 'replication_role': {'readonly': True}, + 'replication_state': {'readonly': True}, + 'partner_servers': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, + 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + 'partner_servers': {'key': 'properties.partnerServers', 'type': '[PartnerInfo]'}, + 'databases': {'key': 'properties.databases', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(FailoverGroup, self).__init__(**kwargs) + self.location = None + self.tags = kwargs.get('tags', None) + self.read_write_endpoint = kwargs.get('read_write_endpoint', None) + self.read_only_endpoint = kwargs.get('read_only_endpoint', None) + self.replication_role = None + self.replication_state = None + self.partner_servers = kwargs.get('partner_servers', None) + self.databases = kwargs.get('databases', None) + + +class FailoverGroupReadOnlyEndpoint(Model): + """Read-only endpoint of the failover group instance. + + :param failover_policy: Failover policy of the read-only endpoint for the + failover group. Possible values include: 'Disabled', 'Enabled' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy + """ + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) + self.failover_policy = kwargs.get('failover_policy', None) + + +class FailoverGroupReadWriteEndpoint(Model): + """Read-write endpoint of the failover group instance. + + All required parameters must be populated in order to send to Azure. + + :param failover_policy: Required. Failover policy of the read-write + endpoint for the failover group. If failoverPolicy is Automatic then + failoverWithDataLossGracePeriodMinutes is required. Possible values + include: 'Manual', 'Automatic' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy + :param failover_with_data_loss_grace_period_minutes: Grace period before + failover with data loss is attempted for the read-write endpoint. If + failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is + required. + :type failover_with_data_loss_grace_period_minutes: int + """ + + _validation = { + 'failover_policy': {'required': True}, + } + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(FailoverGroupReadWriteEndpoint, self).__init__(**kwargs) + self.failover_policy = kwargs.get('failover_policy', None) + self.failover_with_data_loss_grace_period_minutes = kwargs.get('failover_with_data_loss_grace_period_minutes', None) + + +class FailoverGroupUpdate(Model): + """A failover group update request. + + :param read_write_endpoint: Read-write endpoint of the failover group + instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint + :param databases: List of databases in the failover group. + :type databases: list[str] + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, + 'databases': {'key': 'properties.databases', 'type': '[str]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(FailoverGroupUpdate, self).__init__(**kwargs) + self.read_write_endpoint = kwargs.get('read_write_endpoint', None) + self.read_only_endpoint = kwargs.get('read_only_endpoint', None) + self.databases = kwargs.get('databases', None) + self.tags = kwargs.get('tags', None) + + +class FirewallRule(ProxyResource): + """Represents a server firewall rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of server that contains this firewall rule. + :vartype kind: str + :ivar location: Location of the server that contains this firewall rule. + :vartype location: str + :param start_ip_address: Required. The start IP address of the firewall + rule. Must be IPv4 format. Use value '0.0.0.0' to represent all + Azure-internal IP addresses. + :type start_ip_address: str + :param end_ip_address: Required. The end IP address of the firewall rule. + Must be IPv4 format. Must be greater than or equal to startIpAddress. Use + value '0.0.0.0' to represent all Azure-internal IP addresses. + :type end_ip_address: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + 'start_ip_address': {'required': True}, + 'end_ip_address': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FirewallRule, self).__init__(**kwargs) + self.kind = None + self.location = None + self.start_ip_address = kwargs.get('start_ip_address', None) + self.end_ip_address = kwargs.get('end_ip_address', None) + + +class GeoBackupPolicy(ProxyResource): + """A database geo backup policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. The state of the geo backup policy. Possible + values include: 'Disabled', 'Enabled' + :type state: str or ~azure.mgmt.sql.models.GeoBackupPolicyState + :ivar storage_type: The storage type of the geo backup policy. + :vartype storage_type: str + :ivar kind: Kind of geo backup policy. This is metadata used for the + Azure portal experience. + :vartype kind: str + :ivar location: Backup policy location. + :vartype location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'storage_type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'GeoBackupPolicyState'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GeoBackupPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.storage_type = None + self.kind = None + self.location = None + + +class ImportExportResponse(ProxyResource): + """Response for Import/Export Get operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar request_type: The request type of the operation. + :vartype request_type: str + :ivar request_id: The request type of the operation. + :vartype request_id: str + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar database_name: The name of the database. + :vartype database_name: str + :ivar status: The status message returned from the server. + :vartype status: str + :ivar last_modified_time: The operation status last modified time. + :vartype last_modified_time: str + :ivar queued_time: The operation queued time. + :vartype queued_time: str + :ivar blob_uri: The blob uri. + :vartype blob_uri: str + :ivar error_message: The error message returned from the server. + :vartype error_message: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'request_type': {'readonly': True}, + 'request_id': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'status': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'queued_time': {'readonly': True}, + 'blob_uri': {'readonly': True}, + 'error_message': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'request_type': {'key': 'properties.requestType', 'type': 'str'}, + 'request_id': {'key': 'properties.requestId', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'str'}, + 'queued_time': {'key': 'properties.queuedTime', 'type': 'str'}, + 'blob_uri': {'key': 'properties.blobUri', 'type': 'str'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImportExportResponse, self).__init__(**kwargs) + self.request_type = None + self.request_id = None + self.server_name = None + self.database_name = None + self.status = None + self.last_modified_time = None + self.queued_time = None + self.blob_uri = None + self.error_message = None + + +class ImportExtensionRequest(Model): + """Import database parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: The name of the extension. + :type name: str + :param type: The type of the extension. + :type type: str + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + :ivar operation_mode: Required. The type of import operation being + performed. This is always Import. Default value: "Import" . + :vartype operation_mode: str + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + 'operation_mode': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_key_type': {'key': 'properties.storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'properties.storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'properties.storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'properties.authenticationType', 'type': 'AuthenticationType'}, + 'operation_mode': {'key': 'properties.operationMode', 'type': 'str'}, + } + + operation_mode = "Import" + + def __init__(self, **kwargs): + super(ImportExtensionRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.storage_key_type = kwargs.get('storage_key_type', None) + self.storage_key = kwargs.get('storage_key', None) + self.storage_uri = kwargs.get('storage_uri', None) + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.authentication_type = kwargs.get('authentication_type', "SQL") + + +class ImportRequest(ExportRequest): + """Import database parameters. + + All required parameters must be populated in order to send to Azure. + + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + :param database_name: Required. The name of the database to import. + :type database_name: str + :param edition: Required. The edition for the database being created. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location + ```` + . Possible values include: 'Web', 'Business', 'Basic', 'Standard', + 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', + 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale' + :type edition: str or ~azure.mgmt.sql.models.DatabaseEdition + :param service_objective_name: Required. The name of the service objective + to assign to the database. Possible values include: 'System', 'System0', + 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', + 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', + 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', + 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', + 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', + 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', + 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', + 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' + :type service_objective_name: str or + ~azure.mgmt.sql.models.ServiceObjectiveName + :param max_size_bytes: Required. The maximum size for the newly imported + database. + :type max_size_bytes: str + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + 'database_name': {'required': True}, + 'edition': {'required': True}, + 'service_objective_name': {'required': True}, + 'max_size_bytes': {'required': True}, + } + + _attribute_map = { + 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'edition': {'key': 'edition', 'type': 'str'}, + 'service_objective_name': {'key': 'serviceObjectiveName', 'type': 'str'}, + 'max_size_bytes': {'key': 'maxSizeBytes', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImportRequest, self).__init__(**kwargs) + self.database_name = kwargs.get('database_name', None) + self.edition = kwargs.get('edition', None) + self.service_objective_name = kwargs.get('service_objective_name', None) + self.max_size_bytes = kwargs.get('max_size_bytes', None) + + +class InstanceFailoverGroup(ProxyResource): + """An instance failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param read_write_endpoint: Required. Read-write endpoint of the failover + group instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.InstanceFailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.InstanceFailoverGroupReadOnlyEndpoint + :ivar replication_role: Local replication role of the failover group + instance. Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole + :ivar replication_state: Replication state of the failover group instance. + :vartype replication_state: str + :param partner_regions: Required. Partner region information for the + failover group. + :type partner_regions: list[~azure.mgmt.sql.models.PartnerRegionInfo] + :param managed_instance_pairs: Required. List of managed instance pairs in + the failover group. + :type managed_instance_pairs: + list[~azure.mgmt.sql.models.ManagedInstancePairInfo] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'read_write_endpoint': {'required': True}, + 'replication_role': {'readonly': True}, + 'replication_state': {'readonly': True}, + 'partner_regions': {'required': True}, + 'managed_instance_pairs': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'InstanceFailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'InstanceFailoverGroupReadOnlyEndpoint'}, + 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + 'partner_regions': {'key': 'properties.partnerRegions', 'type': '[PartnerRegionInfo]'}, + 'managed_instance_pairs': {'key': 'properties.managedInstancePairs', 'type': '[ManagedInstancePairInfo]'}, + } + + def __init__(self, **kwargs): + super(InstanceFailoverGroup, self).__init__(**kwargs) + self.read_write_endpoint = kwargs.get('read_write_endpoint', None) + self.read_only_endpoint = kwargs.get('read_only_endpoint', None) + self.replication_role = None + self.replication_state = None + self.partner_regions = kwargs.get('partner_regions', None) + self.managed_instance_pairs = kwargs.get('managed_instance_pairs', None) + + +class InstanceFailoverGroupReadOnlyEndpoint(Model): + """Read-only endpoint of the failover group instance. + + :param failover_policy: Failover policy of the read-only endpoint for the + failover group. Possible values include: 'Disabled', 'Enabled' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy + """ + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InstanceFailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) + self.failover_policy = kwargs.get('failover_policy', None) + + +class InstanceFailoverGroupReadWriteEndpoint(Model): + """Read-write endpoint of the failover group instance. + + All required parameters must be populated in order to send to Azure. + + :param failover_policy: Required. Failover policy of the read-write + endpoint for the failover group. If failoverPolicy is Automatic then + failoverWithDataLossGracePeriodMinutes is required. Possible values + include: 'Manual', 'Automatic' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy + :param failover_with_data_loss_grace_period_minutes: Grace period before + failover with data loss is attempted for the read-write endpoint. If + failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is + required. + :type failover_with_data_loss_grace_period_minutes: int + """ + + _validation = { + 'failover_policy': {'required': True}, + } + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(InstanceFailoverGroupReadWriteEndpoint, self).__init__(**kwargs) + self.failover_policy = kwargs.get('failover_policy', None) + self.failover_with_data_loss_grace_period_minutes = kwargs.get('failover_with_data_loss_grace_period_minutes', None) + + +class InstancePool(TrackedResource): + """An Azure SQL instance pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param subnet_id: Required. Resource ID of the subnet to place this + instance pool in. + :type subnet_id: str + :param v_cores: Required. Count of vCores belonging to this instance pool. + :type v_cores: int + :param license_type: Required. The license type. Possible values are + 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' + (without SQL license price). Possible values include: 'LicenseIncluded', + 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.InstancePoolLicenseType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'subnet_id': {'required': True}, + 'v_cores': {'required': True}, + 'license_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InstancePool, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.v_cores = kwargs.get('v_cores', None) + self.license_type = kwargs.get('license_type', None) + + +class InstancePoolUpdate(Model): + """An update to an Instance pool. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(InstancePoolUpdate, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class Job(ProxyResource): + """A job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param description: User-defined description of the job. Default value: "" + . + :type description: str + :ivar version: The job version number. + :vartype version: int + :param schedule: Schedule properties of the job. + :type schedule: ~azure.mgmt.sql.models.JobSchedule + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'int'}, + 'schedule': {'key': 'properties.schedule', 'type': 'JobSchedule'}, + } + + def __init__(self, **kwargs): + super(Job, self).__init__(**kwargs) + self.description = kwargs.get('description', "") + self.version = None + self.schedule = kwargs.get('schedule', None) + + +class JobAgent(TrackedResource): + """An Azure SQL job agent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param database_id: Required. Resource ID of the database to store job + metadata in. + :type database_id: str + :ivar state: The state of the job agent. Possible values include: + 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' + :vartype state: str or ~azure.mgmt.sql.models.JobAgentState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'database_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobAgent, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.database_id = kwargs.get('database_id', None) + self.state = None + + +class JobAgentUpdate(Model): + """An update to an Azure SQL job agent. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(JobAgentUpdate, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class JobCredential(ProxyResource): + """A stored credential that can be used by a job to connect to target + databases. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param username: Required. The credential user name. + :type username: str + :param password: Required. The credential password. + :type password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'username': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'username': {'key': 'properties.username', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobCredential, self).__init__(**kwargs) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + + +class JobExecution(ProxyResource): + """An execution of a job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar job_version: The job version number. + :vartype job_version: int + :ivar step_name: The job step name. + :vartype step_name: str + :ivar step_id: The job step id. + :vartype step_id: int + :ivar job_execution_id: The unique identifier of the job execution. + :vartype job_execution_id: str + :ivar lifecycle: The detailed state of the job execution. Possible values + include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', + 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', + 'TimedOut', 'Canceled', 'Skipped' + :vartype lifecycle: str or ~azure.mgmt.sql.models.JobExecutionLifecycle + :ivar provisioning_state: The ARM provisioning state of the job execution. + Possible values include: 'Created', 'InProgress', 'Succeeded', 'Failed', + 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.sql.models.ProvisioningState + :ivar create_time: The time that the job execution was created. + :vartype create_time: datetime + :ivar start_time: The time that the job execution started. + :vartype start_time: datetime + :ivar end_time: The time that the job execution completed. + :vartype end_time: datetime + :param current_attempts: Number of times the job execution has been + attempted. + :type current_attempts: int + :ivar current_attempt_start_time: Start time of the current attempt. + :vartype current_attempt_start_time: datetime + :ivar last_message: The last status or error message. + :vartype last_message: str + :ivar target: The target that this execution is executed on. + :vartype target: ~azure.mgmt.sql.models.JobExecutionTarget + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'job_version': {'readonly': True}, + 'step_name': {'readonly': True}, + 'step_id': {'readonly': True}, + 'job_execution_id': {'readonly': True}, + 'lifecycle': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'create_time': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'current_attempt_start_time': {'readonly': True}, + 'last_message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'job_version': {'key': 'properties.jobVersion', 'type': 'int'}, + 'step_name': {'key': 'properties.stepName', 'type': 'str'}, + 'step_id': {'key': 'properties.stepId', 'type': 'int'}, + 'job_execution_id': {'key': 'properties.jobExecutionId', 'type': 'str'}, + 'lifecycle': {'key': 'properties.lifecycle', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'current_attempts': {'key': 'properties.currentAttempts', 'type': 'int'}, + 'current_attempt_start_time': {'key': 'properties.currentAttemptStartTime', 'type': 'iso-8601'}, + 'last_message': {'key': 'properties.lastMessage', 'type': 'str'}, + 'target': {'key': 'properties.target', 'type': 'JobExecutionTarget'}, + } + + def __init__(self, **kwargs): + super(JobExecution, self).__init__(**kwargs) + self.job_version = None + self.step_name = None + self.step_id = None + self.job_execution_id = None + self.lifecycle = None + self.provisioning_state = None + self.create_time = None + self.start_time = None + self.end_time = None + self.current_attempts = kwargs.get('current_attempts', None) + self.current_attempt_start_time = None + self.last_message = None + self.target = None + + +class JobExecutionTarget(Model): + """The target that a job execution is executed on. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of the target. Possible values include: + 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + :vartype type: str or ~azure.mgmt.sql.models.JobTargetType + :ivar server_name: The server name. + :vartype server_name: str + :ivar database_name: The database name. + :vartype database_name: str + """ + + _validation = { + 'type': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobExecutionTarget, self).__init__(**kwargs) + self.type = None + self.server_name = None + self.database_name = None + + +class JobSchedule(Model): + """Scheduling properties of a job. + + :param start_time: Schedule start time. Default value: + "0001-01-01T00:00:00Z" . + :type start_time: datetime + :param end_time: Schedule end time. Default value: "9999-12-31T11:59:59Z" + . + :type end_time: datetime + :param type: Schedule interval type. Possible values include: 'Once', + 'Recurring'. Default value: "Once" . + :type type: str or ~azure.mgmt.sql.models.JobScheduleType + :param enabled: Whether or not the schedule is enabled. + :type enabled: bool + :param interval: Value of the schedule's recurring interval, if the + schedule type is recurring. ISO8601 duration format. + :type interval: str + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'JobScheduleType'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'interval': {'key': 'interval', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobSchedule, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', "0001-01-01T00:00:00Z") + self.end_time = kwargs.get('end_time', "9999-12-31T11:59:59Z") + self.type = kwargs.get('type', "Once") + self.enabled = kwargs.get('enabled', None) + self.interval = kwargs.get('interval', None) + + +class JobStep(ProxyResource): + """A job step. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param step_id: The job step's index within the job. If not specified when + creating the job step, it will be created as the last step. If not + specified when updating the job step, the step id is not modified. + :type step_id: int + :param target_group: Required. The resource ID of the target group that + the job step will be executed on. + :type target_group: str + :param credential: Required. The resource ID of the job credential that + will be used to connect to the targets. + :type credential: str + :param action: Required. The action payload of the job step. + :type action: ~azure.mgmt.sql.models.JobStepAction + :param output: Output destination properties of the job step. + :type output: ~azure.mgmt.sql.models.JobStepOutput + :param execution_options: Execution options for the job step. + :type execution_options: ~azure.mgmt.sql.models.JobStepExecutionOptions + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'target_group': {'required': True}, + 'credential': {'required': True}, + 'action': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'step_id': {'key': 'properties.stepId', 'type': 'int'}, + 'target_group': {'key': 'properties.targetGroup', 'type': 'str'}, + 'credential': {'key': 'properties.credential', 'type': 'str'}, + 'action': {'key': 'properties.action', 'type': 'JobStepAction'}, + 'output': {'key': 'properties.output', 'type': 'JobStepOutput'}, + 'execution_options': {'key': 'properties.executionOptions', 'type': 'JobStepExecutionOptions'}, + } + + def __init__(self, **kwargs): + super(JobStep, self).__init__(**kwargs) + self.step_id = kwargs.get('step_id', None) + self.target_group = kwargs.get('target_group', None) + self.credential = kwargs.get('credential', None) + self.action = kwargs.get('action', None) + self.output = kwargs.get('output', None) + self.execution_options = kwargs.get('execution_options', None) + + +class JobStepAction(Model): + """The action to be executed by a job step. + + All required parameters must be populated in order to send to Azure. + + :param type: Type of action being executed by the job step. Possible + values include: 'TSql'. Default value: "TSql" . + :type type: str or ~azure.mgmt.sql.models.JobStepActionType + :param source: The source of the action to execute. Possible values + include: 'Inline'. Default value: "Inline" . + :type source: str or ~azure.mgmt.sql.models.JobStepActionSource + :param value: Required. The action value, for example the text of the + T-SQL script to execute. + :type value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobStepAction, self).__init__(**kwargs) + self.type = kwargs.get('type', "TSql") + self.source = kwargs.get('source', "Inline") + self.value = kwargs.get('value', None) + + +class JobStepExecutionOptions(Model): + """The execution options of a job step. + + :param timeout_seconds: Execution timeout for the job step. Default value: + 43200 . + :type timeout_seconds: int + :param retry_attempts: Maximum number of times the job step will be + reattempted if the first attempt fails. Default value: 10 . + :type retry_attempts: int + :param initial_retry_interval_seconds: Initial delay between retries for + job step execution. Default value: 1 . + :type initial_retry_interval_seconds: int + :param maximum_retry_interval_seconds: The maximum amount of time to wait + between retries for job step execution. Default value: 120 . + :type maximum_retry_interval_seconds: int + :param retry_interval_backoff_multiplier: The backoff multiplier for the + time between retries. Default value: 2 . + :type retry_interval_backoff_multiplier: float + """ + + _attribute_map = { + 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, + 'retry_attempts': {'key': 'retryAttempts', 'type': 'int'}, + 'initial_retry_interval_seconds': {'key': 'initialRetryIntervalSeconds', 'type': 'int'}, + 'maximum_retry_interval_seconds': {'key': 'maximumRetryIntervalSeconds', 'type': 'int'}, + 'retry_interval_backoff_multiplier': {'key': 'retryIntervalBackoffMultiplier', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(JobStepExecutionOptions, self).__init__(**kwargs) + self.timeout_seconds = kwargs.get('timeout_seconds', 43200) + self.retry_attempts = kwargs.get('retry_attempts', 10) + self.initial_retry_interval_seconds = kwargs.get('initial_retry_interval_seconds', 1) + self.maximum_retry_interval_seconds = kwargs.get('maximum_retry_interval_seconds', 120) + self.retry_interval_backoff_multiplier = kwargs.get('retry_interval_backoff_multiplier', 2) + + +class JobStepOutput(Model): + """The output configuration of a job step. + + All required parameters must be populated in order to send to Azure. + + :param type: The output destination type. Possible values include: + 'SqlDatabase'. Default value: "SqlDatabase" . + :type type: str or ~azure.mgmt.sql.models.JobStepOutputType + :param subscription_id: The output destination subscription id. + :type subscription_id: str + :param resource_group_name: The output destination resource group. + :type resource_group_name: str + :param server_name: Required. The output destination server name. + :type server_name: str + :param database_name: Required. The output destination database. + :type database_name: str + :param schema_name: The output destination schema. Default value: "dbo" . + :type schema_name: str + :param table_name: Required. The output destination table. + :type table_name: str + :param credential: Required. The resource ID of the credential to use to + connect to the output destination. + :type credential: str + """ + + _validation = { + 'server_name': {'required': True}, + 'database_name': {'required': True}, + 'table_name': {'required': True}, + 'credential': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'credential': {'key': 'credential', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobStepOutput, self).__init__(**kwargs) + self.type = kwargs.get('type', "SqlDatabase") + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group_name = kwargs.get('resource_group_name', None) + self.server_name = kwargs.get('server_name', None) + self.database_name = kwargs.get('database_name', None) + self.schema_name = kwargs.get('schema_name', "dbo") + self.table_name = kwargs.get('table_name', None) + self.credential = kwargs.get('credential', None) + + +class JobTarget(Model): + """A job target, for example a specific database or a container of databases + that is evaluated during job execution. + + All required parameters must be populated in order to send to Azure. + + :param membership_type: Whether the target is included or excluded from + the group. Possible values include: 'Include', 'Exclude'. Default value: + "Include" . + :type membership_type: str or + ~azure.mgmt.sql.models.JobTargetGroupMembershipType + :param type: Required. The target type. Possible values include: + 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + :type type: str or ~azure.mgmt.sql.models.JobTargetType + :param server_name: The target server name. + :type server_name: str + :param database_name: The target database name. + :type database_name: str + :param elastic_pool_name: The target elastic pool name. + :type elastic_pool_name: str + :param shard_map_name: The target shard map. + :type shard_map_name: str + :param refresh_credential: The resource ID of the credential that is used + during job execution to connect to the target and determine the list of + databases inside the target. + :type refresh_credential: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'membership_type': {'key': 'membershipType', 'type': 'JobTargetGroupMembershipType'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'elastic_pool_name': {'key': 'elasticPoolName', 'type': 'str'}, + 'shard_map_name': {'key': 'shardMapName', 'type': 'str'}, + 'refresh_credential': {'key': 'refreshCredential', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobTarget, self).__init__(**kwargs) + self.membership_type = kwargs.get('membership_type', "Include") + self.type = kwargs.get('type', None) + self.server_name = kwargs.get('server_name', None) + self.database_name = kwargs.get('database_name', None) + self.elastic_pool_name = kwargs.get('elastic_pool_name', None) + self.shard_map_name = kwargs.get('shard_map_name', None) + self.refresh_credential = kwargs.get('refresh_credential', None) + + +class JobTargetGroup(ProxyResource): + """A group of job targets. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param members: Required. Members of the target group. + :type members: list[~azure.mgmt.sql.models.JobTarget] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'members': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'members': {'key': 'properties.members', 'type': '[JobTarget]'}, + } + + def __init__(self, **kwargs): + super(JobTargetGroup, self).__init__(**kwargs) + self.members = kwargs.get('members', None) + + +class JobVersion(ProxyResource): + """A job version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobVersion, self).__init__(**kwargs) + + +class LicenseTypeCapability(Model): + """The license type capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: License type identifier. + :vartype name: str + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LicenseTypeCapability, self).__init__(**kwargs) + self.name = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class LocationCapabilities(Model): + """The location capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The location name. + :vartype name: str + :ivar supported_server_versions: The list of supported server versions. + :vartype supported_server_versions: + list[~azure.mgmt.sql.models.ServerVersionCapability] + :ivar supported_managed_instance_versions: The list of supported managed + instance versions. + :vartype supported_managed_instance_versions: + list[~azure.mgmt.sql.models.ManagedInstanceVersionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_server_versions': {'readonly': True}, + 'supported_managed_instance_versions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_server_versions': {'key': 'supportedServerVersions', 'type': '[ServerVersionCapability]'}, + 'supported_managed_instance_versions': {'key': 'supportedManagedInstanceVersions', 'type': '[ManagedInstanceVersionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LocationCapabilities, self).__init__(**kwargs) + self.name = None + self.supported_server_versions = None + self.supported_managed_instance_versions = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class LogSizeCapability(Model): + """The log size capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The log size limit (see 'unit' for the units). + :vartype limit: int + :ivar unit: The units that the limit is expressed in. Possible values + include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes', 'Percent' + :vartype unit: str or ~azure.mgmt.sql.models.LogSizeUnit + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'int'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LogSizeCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + + +class LongTermRetentionBackup(ProxyResource): + """A long term retention backup. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar server_name: The server name that the backup database belong to. + :vartype server_name: str + :ivar server_create_time: The create time of the server. + :vartype server_create_time: datetime + :ivar database_name: The name of the database the backup belong to + :vartype database_name: str + :ivar database_deletion_time: The delete time of the database + :vartype database_deletion_time: datetime + :ivar backup_time: The time the backup was taken + :vartype backup_time: datetime + :ivar backup_expiration_time: The time the long term retention backup will + expire. + :vartype backup_expiration_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'server_name': {'readonly': True}, + 'server_create_time': {'readonly': True}, + 'database_name': {'readonly': True}, + 'database_deletion_time': {'readonly': True}, + 'backup_time': {'readonly': True}, + 'backup_expiration_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'server_create_time': {'key': 'properties.serverCreateTime', 'type': 'iso-8601'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'database_deletion_time': {'key': 'properties.databaseDeletionTime', 'type': 'iso-8601'}, + 'backup_time': {'key': 'properties.backupTime', 'type': 'iso-8601'}, + 'backup_expiration_time': {'key': 'properties.backupExpirationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(LongTermRetentionBackup, self).__init__(**kwargs) + self.server_name = None + self.server_create_time = None + self.database_name = None + self.database_deletion_time = None + self.backup_time = None + self.backup_expiration_time = None + + +class ManagedBackupShortTermRetentionPolicy(ProxyResource): + """A short term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param retention_days: The backup retention period in days. This is how + many days Point-in-Time Restore will be supported. + :type retention_days: int + """ + + _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'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ManagedBackupShortTermRetentionPolicy, self).__init__(**kwargs) + self.retention_days = kwargs.get('retention_days', None) + + +class ManagedDatabase(TrackedResource): + """A managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param collation: Collation of the managed database. + :type collation: str + :ivar status: Status of the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' + :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus + :ivar creation_date: Creation date of the database. + :vartype creation_date: datetime + :ivar earliest_restore_point: Earliest restore point in time for point in + time restore. + :vartype earliest_restore_point: datetime + :param restore_point_in_time: Conditional. If createMode is + PointInTimeRestore, this value is required. Specifies the point in time + (ISO8601 format) of the source database that will be restored to create + the new database. + :type restore_point_in_time: datetime + :ivar default_secondary_location: Geo paired region. + :vartype default_secondary_location: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param create_mode: Managed database create mode. PointInTimeRestore: + Create a database by restoring a point in time backup of an existing + database. SourceDatabaseName, SourceManagedInstanceName and PointInTime + must be specified. RestoreExternalBackup: Create a database by restoring + from external backup files. Collation, StorageContainerUri and + StorageContainerSasToken must be specified. Recovery: Creates a database + by restoring a geo-replicated backup. RecoverableDatabaseId must be + specified as the recoverable database resource ID to restore. Possible + values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', + 'Recovery' + :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode + :param storage_container_uri: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the uri of the + storage container where backups for this restore are stored. + :type storage_container_uri: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :param restorable_dropped_database_id: The restorable dropped database + resource id to restore when creating this database. + :type restorable_dropped_database_id: str + :param storage_container_sas_token: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the storage + container sas token. + :type storage_container_sas_token: str + :ivar failover_group_id: Instance Failover Group resource identifier that + this managed database belongs to. + :vartype failover_group_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'status': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'earliest_restore_point': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedDatabase, self).__init__(**kwargs) + self.collation = kwargs.get('collation', None) + self.status = None + self.creation_date = None + self.earliest_restore_point = None + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.default_secondary_location = None + self.catalog_collation = kwargs.get('catalog_collation', None) + self.create_mode = kwargs.get('create_mode', None) + self.storage_container_uri = kwargs.get('storage_container_uri', None) + self.source_database_id = kwargs.get('source_database_id', None) + self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) + self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None) + self.failover_group_id = None + self.recoverable_database_id = kwargs.get('recoverable_database_id', None) + + +class ManagedDatabaseSecurityAlertPolicy(ProxyResource): + """A managed database security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ManagedDatabaseSecurityAlertPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.disabled_alerts = kwargs.get('disabled_alerts', None) + self.email_addresses = kwargs.get('email_addresses', None) + self.email_account_admins = kwargs.get('email_account_admins', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.creation_time = None + + +class ManagedDatabaseUpdate(Model): + """An managed database update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param collation: Collation of the managed database. + :type collation: str + :ivar status: Status of the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' + :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus + :ivar creation_date: Creation date of the database. + :vartype creation_date: datetime + :ivar earliest_restore_point: Earliest restore point in time for point in + time restore. + :vartype earliest_restore_point: datetime + :param restore_point_in_time: Conditional. If createMode is + PointInTimeRestore, this value is required. Specifies the point in time + (ISO8601 format) of the source database that will be restored to create + the new database. + :type restore_point_in_time: datetime + :ivar default_secondary_location: Geo paired region. + :vartype default_secondary_location: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param create_mode: Managed database create mode. PointInTimeRestore: + Create a database by restoring a point in time backup of an existing + database. SourceDatabaseName, SourceManagedInstanceName and PointInTime + must be specified. RestoreExternalBackup: Create a database by restoring + from external backup files. Collation, StorageContainerUri and + StorageContainerSasToken must be specified. Recovery: Creates a database + by restoring a geo-replicated backup. RecoverableDatabaseId must be + specified as the recoverable database resource ID to restore. Possible + values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', + 'Recovery' + :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode + :param storage_container_uri: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the uri of the + storage container where backups for this restore are stored. + :type storage_container_uri: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :param restorable_dropped_database_id: The restorable dropped database + resource id to restore when creating this database. + :type restorable_dropped_database_id: str + :param storage_container_sas_token: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the storage + container sas token. + :type storage_container_sas_token: str + :ivar failover_group_id: Instance Failover Group resource identifier that + this managed database belongs to. + :vartype failover_group_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'status': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'earliest_restore_point': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + } + + _attribute_map = { + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ManagedDatabaseUpdate, self).__init__(**kwargs) + self.collation = kwargs.get('collation', None) + self.status = None + self.creation_date = None + self.earliest_restore_point = None + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.default_secondary_location = None + self.catalog_collation = kwargs.get('catalog_collation', None) + self.create_mode = kwargs.get('create_mode', None) + self.storage_container_uri = kwargs.get('storage_container_uri', None) + self.source_database_id = kwargs.get('source_database_id', None) + self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) + self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None) + self.failover_group_id = None + self.recoverable_database_id = kwargs.get('recoverable_database_id', None) + self.tags = kwargs.get('tags', None) + + +class ManagedInstance(TrackedResource): + """An Azure SQL managed instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param identity: The Azure Active Directory identity of the managed + instance. + :type identity: ~azure.mgmt.sql.models.ResourceIdentity + :param sku: Managed instance SKU. Allowed values for sku.name: GP_Gen4, + GP_Gen5, BC_Gen4, BC_Gen5 + :type sku: ~azure.mgmt.sql.models.Sku + :param managed_instance_create_mode: Specifies the mode of database + creation. + Default: Regular instance creation. + Restore: Creates an instance by restoring a set of backups to specific + point in time. RestorePointInTime and SourceManagedInstanceId must be + specified. Possible values include: 'Default', 'PointInTimeRestore' + :type managed_instance_create_mode: str or + ~azure.mgmt.sql.models.ManagedServerCreateMode + :ivar fully_qualified_domain_name: The fully qualified domain name of the + managed instance. + :vartype fully_qualified_domain_name: str + :param administrator_login: Administrator username for the managed + instance. Can only be specified when the managed instance is being created + (and is required for creation). + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for managed instance creation). + :type administrator_login_password: str + :param subnet_id: Subnet resource ID for the managed instance. + :type subnet_id: str + :ivar state: The state of the managed instance. + :vartype state: str + :param license_type: The license type. Possible values are + 'LicenseIncluded' (regular price inclusive of a new SQL license) and + 'BasePrice' (discounted AHB price for bringing your own SQL licenses). + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or + ~azure.mgmt.sql.models.ManagedInstanceLicenseType + :param v_cores: The number of vCores. Allowed values: 8, 16, 24, 32, 40, + 64, 80. + :type v_cores: int + :param storage_size_in_gb: Storage size in GB. Minimum value: 32. Maximum + value: 8192. Increments of 32 GB allowed only. + :type storage_size_in_gb: int + :param collation: Collation of the managed instance. + :type collation: str + :ivar dns_zone: The Dns Zone that the managed instance is in. + :vartype dns_zone: str + :param dns_zone_partner: The resource id of another managed instance whose + DNS zone this managed instance will share after creation. + :type dns_zone_partner: str + :param public_data_endpoint_enabled: Whether or not the public data + endpoint is enabled. + :type public_data_endpoint_enabled: bool + :param source_managed_instance_id: The resource identifier of the source + managed instance associated with create operation of this instance. + :type source_managed_instance_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param proxy_override: Connection type used for connecting to the + instance. Possible values include: 'Proxy', 'Redirect', 'Default' + :type proxy_override: str or + ~azure.mgmt.sql.models.ManagedInstanceProxyOverride + :param timezone_id: Id of the timezone. Allowed values are timezones + supported by Windows. + Windows keeps details on supported timezones, including the id, in + registry under + KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time + Zones. + You can get those registry values via SQL Server by querying SELECT name + AS timezone_id FROM sys.time_zone_info. + List of Ids can also be obtained by executing + [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + An example of valid timezone id is "Pacific Standard Time" or "W. Europe + Standard Time". + :type timezone_id: str + :param instance_pool_id: The Id of the instance pool this managed server + belongs to. + :type instance_pool_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'fully_qualified_domain_name': {'readonly': True}, + 'state': {'readonly': True}, + 'dns_zone': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, + 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, + 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, + 'source_managed_instance_id': {'key': 'properties.sourceManagedInstanceId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, + 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, + 'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstance, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.sku = kwargs.get('sku', None) + self.managed_instance_create_mode = kwargs.get('managed_instance_create_mode', None) + self.fully_qualified_domain_name = None + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.state = None + self.license_type = kwargs.get('license_type', None) + self.v_cores = kwargs.get('v_cores', None) + self.storage_size_in_gb = kwargs.get('storage_size_in_gb', None) + self.collation = kwargs.get('collation', None) + self.dns_zone = None + self.dns_zone_partner = kwargs.get('dns_zone_partner', None) + self.public_data_endpoint_enabled = kwargs.get('public_data_endpoint_enabled', None) + self.source_managed_instance_id = kwargs.get('source_managed_instance_id', None) + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.proxy_override = kwargs.get('proxy_override', None) + self.timezone_id = kwargs.get('timezone_id', None) + self.instance_pool_id = kwargs.get('instance_pool_id', None) + + +class ManagedInstanceEditionCapability(Model): + """The managed server capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The managed server version name. + :vartype name: str + :ivar supported_families: The supported families. + :vartype supported_families: + list[~azure.mgmt.sql.models.ManagedInstanceFamilyCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_families': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_families': {'key': 'supportedFamilies', 'type': '[ManagedInstanceFamilyCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceEditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_families = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ManagedInstanceEncryptionProtector(ProxyResource): + """The managed instance encryption protector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :vartype kind: str + :param server_key_name: The name of the managed instance key. + :type server_key_name: str + :param server_key_type: Required. The encryption protector type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :ivar uri: The URI of the server key. + :vartype uri: str + :ivar thumbprint: Thumbprint of the server key. + :vartype thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'server_key_type': {'required': True}, + 'uri': {'readonly': True}, + 'thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceEncryptionProtector, self).__init__(**kwargs) + self.kind = None + self.server_key_name = kwargs.get('server_key_name', None) + self.server_key_type = kwargs.get('server_key_type', None) + self.uri = None + self.thumbprint = None + + +class ManagedInstanceFamilyCapability(Model): + """The managed server family capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Family name. + :vartype name: str + :ivar sku: SKU name. + :vartype sku: str + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar supported_vcores_values: List of supported virtual cores values. + :vartype supported_vcores_values: + list[~azure.mgmt.sql.models.ManagedInstanceVcoresCapability] + :ivar included_max_size: Included size. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar supported_storage_sizes: Storage size ranges. + :vartype supported_storage_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'supported_vcores_values': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'supported_storage_sizes': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'supported_vcores_values': {'key': 'supportedVcoresValues', 'type': '[ManagedInstanceVcoresCapability]'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'supported_storage_sizes': {'key': 'supportedStorageSizes', 'type': '[MaxSizeRangeCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceFamilyCapability, self).__init__(**kwargs) + self.name = None + self.sku = None + self.supported_license_types = None + self.supported_vcores_values = None + self.included_max_size = None + self.supported_storage_sizes = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ManagedInstanceKey(ProxyResource): + """A managed instance key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :vartype kind: str + :param server_key_type: Required. The key type like 'ServiceManaged', + 'AzureKeyVault'. Possible values include: 'ServiceManaged', + 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :param uri: The URI of the key. If the ServerKeyType is AzureKeyVault, + then the URI is required. + :type uri: str + :ivar thumbprint: Thumbprint of the key. + :vartype thumbprint: str + :ivar creation_date: The key creation date. + :vartype creation_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'server_key_type': {'required': True}, + 'thumbprint': {'readonly': True}, + 'creation_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceKey, self).__init__(**kwargs) + self.kind = None + self.server_key_type = kwargs.get('server_key_type', None) + self.uri = kwargs.get('uri', None) + self.thumbprint = None + self.creation_date = None + + +class ManagedInstancePairInfo(Model): + """Pairs of Managed Instances in the failover group. + + :param primary_managed_instance_id: Id of Primary Managed Instance in + pair. + :type primary_managed_instance_id: str + :param partner_managed_instance_id: Id of Partner Managed Instance in + pair. + :type partner_managed_instance_id: str + """ + + _attribute_map = { + 'primary_managed_instance_id': {'key': 'primaryManagedInstanceId', 'type': 'str'}, + 'partner_managed_instance_id': {'key': 'partnerManagedInstanceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstancePairInfo, self).__init__(**kwargs) + self.primary_managed_instance_id = kwargs.get('primary_managed_instance_id', None) + self.partner_managed_instance_id = kwargs.get('partner_managed_instance_id', None) + + +class ManagedInstanceUpdate(Model): + """An update request for an Azure SQL Database managed instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param sku: Managed instance sku + :type sku: ~azure.mgmt.sql.models.Sku + :param managed_instance_create_mode: Specifies the mode of database + creation. + Default: Regular instance creation. + Restore: Creates an instance by restoring a set of backups to specific + point in time. RestorePointInTime and SourceManagedInstanceId must be + specified. Possible values include: 'Default', 'PointInTimeRestore' + :type managed_instance_create_mode: str or + ~azure.mgmt.sql.models.ManagedServerCreateMode + :ivar fully_qualified_domain_name: The fully qualified domain name of the + managed instance. + :vartype fully_qualified_domain_name: str + :param administrator_login: Administrator username for the managed + instance. Can only be specified when the managed instance is being created + (and is required for creation). + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for managed instance creation). + :type administrator_login_password: str + :param subnet_id: Subnet resource ID for the managed instance. + :type subnet_id: str + :ivar state: The state of the managed instance. + :vartype state: str + :param license_type: The license type. Possible values are + 'LicenseIncluded' (regular price inclusive of a new SQL license) and + 'BasePrice' (discounted AHB price for bringing your own SQL licenses). + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or + ~azure.mgmt.sql.models.ManagedInstanceLicenseType + :param v_cores: The number of vCores. Allowed values: 8, 16, 24, 32, 40, + 64, 80. + :type v_cores: int + :param storage_size_in_gb: Storage size in GB. Minimum value: 32. Maximum + value: 8192. Increments of 32 GB allowed only. + :type storage_size_in_gb: int + :param collation: Collation of the managed instance. + :type collation: str + :ivar dns_zone: The Dns Zone that the managed instance is in. + :vartype dns_zone: str + :param dns_zone_partner: The resource id of another managed instance whose + DNS zone this managed instance will share after creation. + :type dns_zone_partner: str + :param public_data_endpoint_enabled: Whether or not the public data + endpoint is enabled. + :type public_data_endpoint_enabled: bool + :param source_managed_instance_id: The resource identifier of the source + managed instance associated with create operation of this instance. + :type source_managed_instance_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param proxy_override: Connection type used for connecting to the + instance. Possible values include: 'Proxy', 'Redirect', 'Default' + :type proxy_override: str or + ~azure.mgmt.sql.models.ManagedInstanceProxyOverride + :param timezone_id: Id of the timezone. Allowed values are timezones + supported by Windows. + Windows keeps details on supported timezones, including the id, in + registry under + KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time + Zones. + You can get those registry values via SQL Server by querying SELECT name + AS timezone_id FROM sys.time_zone_info. + List of Ids can also be obtained by executing + [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + An example of valid timezone id is "Pacific Standard Time" or "W. Europe + Standard Time". + :type timezone_id: str + :param instance_pool_id: The Id of the instance pool this managed server + belongs to. + :type instance_pool_id: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'fully_qualified_domain_name': {'readonly': True}, + 'state': {'readonly': True}, + 'dns_zone': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, + 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, + 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, + 'source_managed_instance_id': {'key': 'properties.sourceManagedInstanceId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, + 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, + 'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceUpdate, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.managed_instance_create_mode = kwargs.get('managed_instance_create_mode', None) + self.fully_qualified_domain_name = None + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.state = None + self.license_type = kwargs.get('license_type', None) + self.v_cores = kwargs.get('v_cores', None) + self.storage_size_in_gb = kwargs.get('storage_size_in_gb', None) + self.collation = kwargs.get('collation', None) + self.dns_zone = None + self.dns_zone_partner = kwargs.get('dns_zone_partner', None) + self.public_data_endpoint_enabled = kwargs.get('public_data_endpoint_enabled', None) + self.source_managed_instance_id = kwargs.get('source_managed_instance_id', None) + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.proxy_override = kwargs.get('proxy_override', None) + self.timezone_id = kwargs.get('timezone_id', None) + self.instance_pool_id = kwargs.get('instance_pool_id', None) + self.tags = kwargs.get('tags', None) + + +class ManagedInstanceVcoresCapability(Model): + """The managed instance virtual cores capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The virtual cores identifier. + :vartype name: str + :ivar value: The virtual cores value. + :vartype value: int + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'int'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceVcoresCapability, self).__init__(**kwargs) + self.name = None + self.value = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ManagedInstanceVersionCapability(Model): + """The managed instance capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The server version name. + :vartype name: str + :ivar supported_editions: The list of supported managed instance editions. + :vartype supported_editions: + list[~azure.mgmt.sql.models.ManagedInstanceEditionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_editions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_editions': {'key': 'supportedEditions', 'type': '[ManagedInstanceEditionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceVersionCapability, self).__init__(**kwargs) + self.name = None + self.supported_editions = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ManagedInstanceVulnerabilityAssessment(ProxyResource): + """A managed instance vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: Required. A blob storage container path to + hold the scan results (e.g. + https://myStorage.blob.core.windows.net/VaScans/). + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_container_path': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = kwargs.get('storage_container_path', None) + self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.recurring_scans = kwargs.get('recurring_scans', None) + + +class ManagedServerSecurityAlertPolicy(ProxyResource): + """A managed server security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ManagedServerSecurityAlertPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.disabled_alerts = kwargs.get('disabled_alerts', None) + self.email_addresses = kwargs.get('email_addresses', None) + self.email_account_admins = kwargs.get('email_account_admins', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.creation_time = None + + +class MaxSizeCapability(Model): + """The maximum size capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The maximum size limit (see 'unit' for the units). + :vartype limit: int + :ivar unit: The units that the limit is expressed in. Possible values + include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' + :vartype unit: str or ~azure.mgmt.sql.models.MaxSizeUnit + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'int'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MaxSizeCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + + +class MaxSizeRangeCapability(Model): + """The maximum size range capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar min_value: Minimum value. + :vartype min_value: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar max_value: Maximum value. + :vartype max_value: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar scale_size: Scale/step size for discrete values between the minimum + value and the maximum value. + :vartype scale_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar log_size: Size of transaction log. + :vartype log_size: ~azure.mgmt.sql.models.LogSizeCapability + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'min_value': {'readonly': True}, + 'max_value': {'readonly': True}, + 'scale_size': {'readonly': True}, + 'log_size': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'min_value': {'key': 'minValue', 'type': 'MaxSizeCapability'}, + 'max_value': {'key': 'maxValue', 'type': 'MaxSizeCapability'}, + 'scale_size': {'key': 'scaleSize', 'type': 'MaxSizeCapability'}, + 'log_size': {'key': 'logSize', 'type': 'LogSizeCapability'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MaxSizeRangeCapability, self).__init__(**kwargs) + self.min_value = None + self.max_value = None + self.scale_size = None + self.log_size = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class Metric(Model): + """Database metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar start_time: The start time for the metric (ISO-8601 format). + :vartype start_time: datetime + :ivar end_time: The end time for the metric (ISO-8601 format). + :vartype end_time: datetime + :ivar time_grain: The time step to be used to summarize the metric values. + :vartype time_grain: str + :ivar unit: The unit of the metric. Possible values include: 'count', + 'bytes', 'seconds', 'percent', 'countPerSecond', 'bytesPerSecond' + :vartype unit: str or ~azure.mgmt.sql.models.UnitType + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.sql.models.MetricName + :ivar metric_values: The metric values for the specified time window and + timestep. + :vartype metric_values: list[~azure.mgmt.sql.models.MetricValue] + """ + + _validation = { + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'time_grain': {'readonly': True}, + 'unit': {'readonly': True}, + 'name': {'readonly': True}, + 'metric_values': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'MetricName'}, + 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, + } + + def __init__(self, **kwargs): + super(Metric, self).__init__(**kwargs) + self.start_time = None + self.end_time = None + self.time_grain = None + self.unit = None + self.name = None + self.metric_values = None + + +class MetricAvailability(Model): + """A metric availability value. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar retention: The length of retention for the database metric. + :vartype retention: str + :ivar time_grain: The granularity of the database metric. + :vartype time_grain: str + """ + + _validation = { + 'retention': {'readonly': True}, + 'time_grain': {'readonly': True}, + } + + _attribute_map = { + 'retention': {'key': 'retention', 'type': 'str'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetricAvailability, self).__init__(**kwargs) + self.retention = None + self.time_grain = None + + +class MetricDefinition(Model): + """A database metric definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.sql.models.MetricName + :ivar primary_aggregation_type: The primary aggregation type defining how + metric values are displayed. Possible values include: 'None', 'Average', + 'Count', 'Minimum', 'Maximum', 'Total' + :vartype primary_aggregation_type: str or + ~azure.mgmt.sql.models.PrimaryAggregationType + :ivar resource_uri: The resource uri of the database. + :vartype resource_uri: str + :ivar unit: The unit of the metric. Possible values include: 'Count', + 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' + :vartype unit: str or ~azure.mgmt.sql.models.UnitDefinitionType + :ivar metric_availabilities: The list of database metric availabilities + for the metric. + :vartype metric_availabilities: + list[~azure.mgmt.sql.models.MetricAvailability] + """ + + _validation = { + 'name': {'readonly': True}, + 'primary_aggregation_type': {'readonly': True}, + 'resource_uri': {'readonly': True}, + 'unit': {'readonly': True}, + 'metric_availabilities': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'MetricName'}, + 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, + } + + def __init__(self, **kwargs): + super(MetricDefinition, self).__init__(**kwargs) + self.name = None + self.primary_aggregation_type = None + self.resource_uri = None + self.unit = None + self.metric_availabilities = None + + +class MetricName(Model): + """A database metric name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The name of the database metric. + :vartype value: str + :ivar localized_value: The friendly name of the database metric. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetricName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class MetricValue(Model): + """Represents database metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar count: The number of values for the metric. + :vartype count: float + :ivar average: The average value of the metric. + :vartype average: float + :ivar maximum: The max value of the metric. + :vartype maximum: float + :ivar minimum: The min value of the metric. + :vartype minimum: float + :ivar timestamp: The metric timestamp (ISO-8601 format). + :vartype timestamp: datetime + :ivar total: The total value of the metric. + :vartype total: float + """ + + _validation = { + 'count': {'readonly': True}, + 'average': {'readonly': True}, + 'maximum': {'readonly': True}, + 'minimum': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'total': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'float'}, + 'average': {'key': 'average', 'type': 'float'}, + 'maximum': {'key': 'maximum', 'type': 'float'}, + 'minimum': {'key': 'minimum', 'type': 'float'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'total': {'key': 'total', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(MetricValue, self).__init__(**kwargs) + self.count = None + self.average = None + self.maximum = None + self.minimum = None + self.timestamp = None + self.total = None + + +class Name(Model): + """ARM Usage Name. + + :param value: Usage name value + :type value: str + :param localized_value: Usage name localized value. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Name, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) + + +class Operation(Model): + """SQL REST API operation definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the operation being performed on this particular + object. + :vartype name: str + :ivar display: The localized display information for this particular + operation / action. + :vartype display: ~azure.mgmt.sql.models.OperationDisplay + :ivar origin: The intended executor of the operation. Possible values + include: 'user', 'system' + :vartype origin: str or ~azure.mgmt.sql.models.OperationOrigin + :ivar properties: Additional descriptions for the operation. + :vartype properties: dict[str, object] + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + 'origin': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + self.origin = None + self.properties = None + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The localized friendly form of the resource provider name. + :vartype provider: str + :ivar resource: The localized friendly form of the resource type related + to this action/operation. + :vartype resource: str + :ivar operation: The localized friendly name for the operation. + :vartype operation: str + :ivar description: The localized friendly description for the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class OperationImpact(Model): + """The impact of an operation, both in absolute and relative terms. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the impact dimension. + :vartype name: str + :ivar unit: The unit in which estimated impact to dimension is measured. + :vartype unit: str + :ivar change_value_absolute: The absolute impact to dimension. + :vartype change_value_absolute: float + :ivar change_value_relative: The relative impact to dimension (null if not + applicable) + :vartype change_value_relative: float + """ + + _validation = { + 'name': {'readonly': True}, + 'unit': {'readonly': True}, + 'change_value_absolute': {'readonly': True}, + 'change_value_relative': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'change_value_absolute': {'key': 'changeValueAbsolute', 'type': 'float'}, + 'change_value_relative': {'key': 'changeValueRelative', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(OperationImpact, self).__init__(**kwargs) + self.name = None + self.unit = None + self.change_value_absolute = None + self.change_value_relative = None + + +class PartnerInfo(Model): + """Partner server information for the failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource identifier of the partner server. + :type id: str + :ivar location: Geo location of the partner server. + :vartype location: str + :ivar replication_role: Replication role of the partner server. Possible + values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.FailoverGroupReplicationRole + """ + + _validation = { + 'id': {'required': True}, + 'location': {'readonly': True}, + 'replication_role': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'replication_role': {'key': 'replicationRole', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PartnerInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.location = None + self.replication_role = None + + +class PartnerRegionInfo(Model): + """Partner region information for the failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param location: Geo location of the partner managed instances. + :type location: str + :ivar replication_role: Replication role of the partner managed instances. + Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole + """ + + _validation = { + 'replication_role': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'replication_role': {'key': 'replicationRole', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PartnerRegionInfo, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.replication_role = None + + +class PerformanceLevelCapability(Model): + """The performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: Performance level value. + :vartype value: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + """ + + _validation = { + 'value': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PerformanceLevelCapability, self).__init__(**kwargs) + self.value = None + self.unit = None + + +class RecommendedElasticPool(ProxyResource): + """Represents a recommended elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_edition: The edition of the recommended elastic pool. The + ElasticPoolEdition enumeration contains all the valid editions. Possible + values include: 'Basic', 'Standard', 'Premium', 'GeneralPurpose', + 'BusinessCritical' + :vartype database_edition: str or + ~azure.mgmt.sql.models.ElasticPoolEdition + :param dtu: The DTU for the recommended elastic pool. + :type dtu: float + :param database_dtu_min: The minimum DTU for the database. + :type database_dtu_min: float + :param database_dtu_max: The maximum DTU for the database. + :type database_dtu_max: float + :param storage_mb: Gets storage size in megabytes. + :type storage_mb: float + :ivar observation_period_start: The observation period start (ISO8601 + format). + :vartype observation_period_start: datetime + :ivar observation_period_end: The observation period start (ISO8601 + format). + :vartype observation_period_end: datetime + :ivar max_observed_dtu: Gets maximum observed DTU. + :vartype max_observed_dtu: float + :ivar max_observed_storage_mb: Gets maximum observed storage in megabytes. + :vartype max_observed_storage_mb: float + :ivar databases: The list of databases in this pool. Expanded property + :vartype databases: list[~azure.mgmt.sql.models.TrackedResource] + :ivar metrics: The list of databases housed in the server. Expanded + property + :vartype metrics: + list[~azure.mgmt.sql.models.RecommendedElasticPoolMetric] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_edition': {'readonly': True}, + 'observation_period_start': {'readonly': True}, + 'observation_period_end': {'readonly': True}, + 'max_observed_dtu': {'readonly': True}, + 'max_observed_storage_mb': {'readonly': True}, + 'databases': {'readonly': True}, + 'metrics': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'dtu': {'key': 'properties.dtu', 'type': 'float'}, + 'database_dtu_min': {'key': 'properties.databaseDtuMin', 'type': 'float'}, + 'database_dtu_max': {'key': 'properties.databaseDtuMax', 'type': 'float'}, + 'storage_mb': {'key': 'properties.storageMB', 'type': 'float'}, + 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, + 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, + 'max_observed_dtu': {'key': 'properties.maxObservedDtu', 'type': 'float'}, + 'max_observed_storage_mb': {'key': 'properties.maxObservedStorageMB', 'type': 'float'}, + 'databases': {'key': 'properties.databases', 'type': '[TrackedResource]'}, + 'metrics': {'key': 'properties.metrics', 'type': '[RecommendedElasticPoolMetric]'}, + } + + def __init__(self, **kwargs): + super(RecommendedElasticPool, self).__init__(**kwargs) + self.database_edition = None + self.dtu = kwargs.get('dtu', None) + self.database_dtu_min = kwargs.get('database_dtu_min', None) + self.database_dtu_max = kwargs.get('database_dtu_max', None) + self.storage_mb = kwargs.get('storage_mb', None) + self.observation_period_start = None + self.observation_period_end = None + self.max_observed_dtu = None + self.max_observed_storage_mb = None + self.databases = None + self.metrics = None + + +class RecommendedElasticPoolMetric(Model): + """Represents recommended elastic pool metric. + + :param date_time_property: The time of metric (ISO8601 format). + :type date_time_property: datetime + :param dtu: Gets or sets the DTUs (Database Transaction Units). See + https://azure.microsoft.com/documentation/articles/sql-database-what-is-a-dtu/ + :type dtu: float + :param size_gb: Gets or sets size in gigabytes. + :type size_gb: float + """ + + _attribute_map = { + 'date_time_property': {'key': 'dateTime', 'type': 'iso-8601'}, + 'dtu': {'key': 'dtu', 'type': 'float'}, + 'size_gb': {'key': 'sizeGB', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(RecommendedElasticPoolMetric, self).__init__(**kwargs) + self.date_time_property = kwargs.get('date_time_property', None) + self.dtu = kwargs.get('dtu', None) + self.size_gb = kwargs.get('size_gb', None) + + +class RecommendedIndex(ProxyResource): + """Represents a database recommended index. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar action: The proposed index action. You can create a missing index, + drop an unused index, or rebuild an existing index to improve its + performance. Possible values include: 'Create', 'Drop', 'Rebuild' + :vartype action: str or ~azure.mgmt.sql.models.RecommendedIndexAction + :ivar state: The current recommendation state. Possible values include: + 'Active', 'Pending', 'Executing', 'Verifying', 'Pending Revert', + 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success' + :vartype state: str or ~azure.mgmt.sql.models.RecommendedIndexState + :ivar created: The UTC datetime showing when this resource was created + (ISO8601 format). + :vartype created: datetime + :ivar last_modified: The UTC datetime of when was this resource last + changed (ISO8601 format). + :vartype last_modified: datetime + :ivar index_type: The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, + CLUSTERED COLUMNSTORE). Possible values include: 'CLUSTERED', + 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED COLUMNSTORE' + :vartype index_type: str or ~azure.mgmt.sql.models.RecommendedIndexType + :ivar schema: The schema where table to build index over resides + :vartype schema: str + :ivar table: The table on which to build index. + :vartype table: str + :ivar columns: Columns over which to build index + :vartype columns: list[str] + :ivar included_columns: The list of column names to be included in the + index + :vartype included_columns: list[str] + :ivar index_script: The full build index script + :vartype index_script: str + :ivar estimated_impact: The estimated impact of doing recommended index + action. + :vartype estimated_impact: list[~azure.mgmt.sql.models.OperationImpact] + :ivar reported_impact: The values reported after index action is complete. + :vartype reported_impact: list[~azure.mgmt.sql.models.OperationImpact] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'action': {'readonly': True}, + 'state': {'readonly': True}, + 'created': {'readonly': True}, + 'last_modified': {'readonly': True}, + 'index_type': {'readonly': True}, + 'schema': {'readonly': True}, + 'table': {'readonly': True}, + 'columns': {'readonly': True}, + 'included_columns': {'readonly': True}, + 'index_script': {'readonly': True}, + 'estimated_impact': {'readonly': True}, + 'reported_impact': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'action': {'key': 'properties.action', 'type': 'RecommendedIndexAction'}, + 'state': {'key': 'properties.state', 'type': 'RecommendedIndexState'}, + 'created': {'key': 'properties.created', 'type': 'iso-8601'}, + 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, + 'index_type': {'key': 'properties.indexType', 'type': 'RecommendedIndexType'}, + 'schema': {'key': 'properties.schema', 'type': 'str'}, + 'table': {'key': 'properties.table', 'type': 'str'}, + 'columns': {'key': 'properties.columns', 'type': '[str]'}, + 'included_columns': {'key': 'properties.includedColumns', 'type': '[str]'}, + 'index_script': {'key': 'properties.indexScript', 'type': 'str'}, + 'estimated_impact': {'key': 'properties.estimatedImpact', 'type': '[OperationImpact]'}, + 'reported_impact': {'key': 'properties.reportedImpact', 'type': '[OperationImpact]'}, + } + + def __init__(self, **kwargs): + super(RecommendedIndex, self).__init__(**kwargs) + self.action = None + self.state = None + self.created = None + self.last_modified = None + self.index_type = None + self.schema = None + self.table = None + self.columns = None + self.included_columns = None + self.index_script = None + self.estimated_impact = None + self.reported_impact = None + + +class RecoverableDatabase(ProxyResource): + """A recoverable database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar edition: The edition of the database + :vartype edition: str + :ivar service_level_objective: The service level objective name of the + database + :vartype service_level_objective: str + :ivar elastic_pool_name: The elastic pool name of the database + :vartype elastic_pool_name: str + :ivar last_available_backup_date: The last available backup date of the + database (ISO8601 format) + :vartype last_available_backup_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'edition': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'last_available_backup_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(RecoverableDatabase, self).__init__(**kwargs) + self.edition = None + self.service_level_objective = None + self.elastic_pool_name = None + self.last_available_backup_date = None + + +class RecoverableManagedDatabase(ProxyResource): + """A recoverable managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar last_available_backup_date: The last available backup date. + :vartype last_available_backup_date: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_available_backup_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RecoverableManagedDatabase, self).__init__(**kwargs) + self.last_available_backup_date = None + + +class ReplicationLink(ProxyResource): + """Represents a database replication link. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Location of the server that contains this firewall rule. + :vartype location: str + :ivar is_termination_allowed: Legacy value indicating whether termination + is allowed. Currently always returns true. + :vartype is_termination_allowed: bool + :ivar replication_mode: Replication mode of this replication link. + :vartype replication_mode: str + :ivar partner_server: The name of the server hosting the partner database. + :vartype partner_server: str + :ivar partner_database: The name of the partner database. + :vartype partner_database: str + :ivar partner_location: The Azure Region of the partner database. + :vartype partner_location: str + :ivar role: The role of the database in the replication link. Possible + values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', + 'Copy' + :vartype role: str or ~azure.mgmt.sql.models.ReplicationRole + :ivar partner_role: The role of the partner database in the replication + link. Possible values include: 'Primary', 'Secondary', + 'NonReadableSecondary', 'Source', 'Copy' + :vartype partner_role: str or ~azure.mgmt.sql.models.ReplicationRole + :ivar start_time: The start time for the replication link. + :vartype start_time: datetime + :ivar percent_complete: The percentage of seeding complete for the + replication link. + :vartype percent_complete: int + :ivar replication_state: The replication state for the replication link. + Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP', 'SUSPENDED' + :vartype replication_state: str or ~azure.mgmt.sql.models.ReplicationState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'is_termination_allowed': {'readonly': True}, + 'replication_mode': {'readonly': True}, + 'partner_server': {'readonly': True}, + 'partner_database': {'readonly': True}, + 'partner_location': {'readonly': True}, + 'role': {'readonly': True}, + 'partner_role': {'readonly': True}, + 'start_time': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'replication_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'is_termination_allowed': {'key': 'properties.isTerminationAllowed', 'type': 'bool'}, + 'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'}, + 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, + 'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'}, + 'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'}, + 'role': {'key': 'properties.role', 'type': 'ReplicationRole'}, + 'partner_role': {'key': 'properties.partnerRole', 'type': 'ReplicationRole'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ReplicationLink, self).__init__(**kwargs) + self.location = None + self.is_termination_allowed = None + self.replication_mode = None + self.partner_server = None + self.partner_database = None + self.partner_location = None + self.role = None + self.partner_role = None + self.start_time = None + self.percent_complete = None + self.replication_state = None + + +class ResourceIdentity(Model): + """Azure Active Directory identity configuration for a resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The Azure Active Directory principal id. + :vartype principal_id: str + :param type: The identity type. Set this to 'SystemAssigned' in order to + automatically create and assign an Azure Active Directory principal for + the resource. Possible values include: 'SystemAssigned' + :type type: str or ~azure.mgmt.sql.models.IdentityType + :ivar tenant_id: The Azure Active Directory tenant id. + :vartype tenant_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.type = kwargs.get('type', None) + self.tenant_id = None + + +class ResourceMoveDefinition(Model): + """Contains the information necessary to perform a resource move (rename). + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The target ID for the resource + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceMoveDefinition, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class RestorableDroppedDatabase(ProxyResource): + """A restorable dropped database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: The geo-location where the resource lives + :vartype location: str + :ivar database_name: The name of the database + :vartype database_name: str + :ivar edition: The edition of the database + :vartype edition: str + :ivar max_size_bytes: The max size in bytes of the database + :vartype max_size_bytes: str + :ivar service_level_objective: The service level objective name of the + database + :vartype service_level_objective: str + :ivar elastic_pool_name: The elastic pool name of the database + :vartype elastic_pool_name: str + :ivar creation_date: The creation date of the database (ISO8601 format) + :vartype creation_date: datetime + :ivar deletion_date: The deletion date of the database (ISO8601 format) + :vartype deletion_date: datetime + :ivar earliest_restore_date: The earliest restore date of the database + (ISO8601 format) + :vartype earliest_restore_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'database_name': {'readonly': True}, + 'edition': {'readonly': True}, + 'max_size_bytes': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(RestorableDroppedDatabase, self).__init__(**kwargs) + self.location = None + self.database_name = None + self.edition = None + self.max_size_bytes = None + self.service_level_objective = None + self.elastic_pool_name = None + self.creation_date = None + self.deletion_date = None + self.earliest_restore_date = None + + +class RestorableDroppedManagedDatabase(TrackedResource): + """A restorable dropped managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar database_name: The name of the database. + :vartype database_name: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar deletion_date: The deletion date of the database (ISO8601 format). + :vartype deletion_date: datetime + :ivar earliest_restore_date: The earliest restore date of the database + (ISO8601 format). + :vartype earliest_restore_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'database_name': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(RestorableDroppedManagedDatabase, self).__init__(**kwargs) + self.database_name = None + self.creation_date = None + self.deletion_date = None + self.earliest_restore_date = None + + +class RestorePoint(ProxyResource): + """Database restore points. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar restore_point_type: The type of restore point. Possible values + include: 'CONTINUOUS', 'DISCRETE' + :vartype restore_point_type: str or + ~azure.mgmt.sql.models.RestorePointType + :ivar earliest_restore_date: The earliest time to which this database can + be restored + :vartype earliest_restore_date: datetime + :ivar restore_point_creation_date: The time the backup was taken + :vartype restore_point_creation_date: datetime + :ivar restore_point_label: The label of restore point for backup request + by user + :vartype restore_point_label: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'restore_point_type': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'restore_point_creation_date': {'readonly': True}, + 'restore_point_label': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'restore_point_type': {'key': 'properties.restorePointType', 'type': 'RestorePointType'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, + 'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RestorePoint, self).__init__(**kwargs) + self.location = None + self.restore_point_type = None + self.earliest_restore_date = None + self.restore_point_creation_date = None + self.restore_point_label = None + + +class SensitivityLabel(ProxyResource): + """A sensitivity label. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param label_name: The label name. + :type label_name: str + :param label_id: The label ID. + :type label_id: str + :param information_type: The information type. + :type information_type: str + :param information_type_id: The information type ID. + :type information_type_id: str + :ivar is_disabled: Is sensitivity recommendation disabled. Applicable for + recommended sensitivity label only. Specifies whether the sensitivity + recommendation on this column is disabled (dismissed) or not. + :vartype is_disabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'is_disabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'label_name': {'key': 'properties.labelName', 'type': 'str'}, + 'label_id': {'key': 'properties.labelId', 'type': 'str'}, + 'information_type': {'key': 'properties.informationType', 'type': 'str'}, + 'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'}, + 'is_disabled': {'key': 'properties.isDisabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(SensitivityLabel, self).__init__(**kwargs) + self.label_name = kwargs.get('label_name', None) + self.label_id = kwargs.get('label_id', None) + self.information_type = kwargs.get('information_type', None) + self.information_type_id = kwargs.get('information_type_id', None) + self.is_disabled = None + + +class Server(TrackedResource): + """An Azure SQL Database server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param identity: The Azure Active Directory identity of the server. + :type identity: ~azure.mgmt.sql.models.ResourceIdentity + :ivar kind: Kind of sql server. This is metadata used for the Azure portal + experience. + :vartype kind: str + :param administrator_login: Administrator username for the server. Once + created it cannot be changed. + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for server creation). + :type administrator_login_password: str + :param version: The version of the server. + :type version: str + :ivar state: The state of the server. + :vartype state: str + :ivar fully_qualified_domain_name: The fully qualified domain name of the + server. + :vartype fully_qualified_domain_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'state': {'readonly': True}, + 'fully_qualified_domain_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Server, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.kind = None + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.version = kwargs.get('version', None) + self.state = None + self.fully_qualified_domain_name = None + + +class ServerAutomaticTuning(ProxyResource): + """Server-level Automatic Tuning. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param desired_state: Automatic tuning desired state. Possible values + include: 'Custom', 'Auto', 'Unspecified' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningServerMode + :ivar actual_state: Automatic tuning actual state. Possible values + include: 'Custom', 'Auto', 'Unspecified' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningServerMode + :param options: Automatic tuning options definition. + :type options: dict[str, + ~azure.mgmt.sql.models.AutomaticTuningServerOptions] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'actual_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningServerMode'}, + 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningServerMode'}, + 'options': {'key': 'properties.options', 'type': '{AutomaticTuningServerOptions}'}, + } + + def __init__(self, **kwargs): + super(ServerAutomaticTuning, self).__init__(**kwargs) + self.desired_state = kwargs.get('desired_state', None) + self.actual_state = None + self.options = kwargs.get('options', None) + + +class ServerAzureADAdministrator(ProxyResource): + """An server Active Directory Administrator. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar administrator_type: Required. The type of administrator. Default + value: "ActiveDirectory" . + :vartype administrator_type: str + :param login: Required. The server administrator login value. + :type login: str + :param sid: Required. The server administrator Sid (Secure ID). + :type sid: str + :param tenant_id: Required. The server Active Directory Administrator + tenant id. + :type tenant_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'administrator_type': {'required': True, 'constant': True}, + 'login': {'required': True}, + 'sid': {'required': True}, + 'tenant_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, + 'login': {'key': 'properties.login', 'type': 'str'}, + 'sid': {'key': 'properties.sid', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + } + + administrator_type = "ActiveDirectory" + + def __init__(self, **kwargs): + super(ServerAzureADAdministrator, self).__init__(**kwargs) + self.login = kwargs.get('login', None) + self.sid = kwargs.get('sid', None) + self.tenant_id = kwargs.get('tenant_id', None) + + +class ServerBlobAuditingPolicy(ProxyResource): + """A server blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ServerBlobAuditingPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) + self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) + self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) + self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) + + +class ServerCommunicationLink(ProxyResource): + """Server communication link. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar state: The state. + :vartype state: str + :param partner_server: Required. The name of the partner server. + :type partner_server: str + :ivar location: Communication link location. + :vartype location: str + :ivar kind: Communication link kind. This property is used for Azure + Portal metadata. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'partner_server': {'required': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerCommunicationLink, self).__init__(**kwargs) + self.state = None + self.partner_server = kwargs.get('partner_server', None) + self.location = None + self.kind = None + + +class ServerConnectionPolicy(ProxyResource): + """A server secure connection policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Metadata used for the Azure portal experience. + :vartype kind: str + :ivar location: Resource location. + :vartype location: str + :param connection_type: Required. The server connection type. Possible + values include: 'Default', 'Proxy', 'Redirect' + :type connection_type: str or ~azure.mgmt.sql.models.ServerConnectionType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + 'connection_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'connection_type': {'key': 'properties.connectionType', 'type': 'ServerConnectionType'}, + } + + def __init__(self, **kwargs): + super(ServerConnectionPolicy, self).__init__(**kwargs) + self.kind = None + self.location = None + self.connection_type = kwargs.get('connection_type', None) + + +class ServerDnsAlias(ProxyResource): + """A server DNS alias. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar azure_dns_record: The fully qualified DNS record for alias + :vartype azure_dns_record: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'azure_dns_record': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'azure_dns_record': {'key': 'properties.azureDnsRecord', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerDnsAlias, self).__init__(**kwargs) + self.azure_dns_record = None + + +class ServerDnsAliasAcquisition(Model): + """A server DNS alias acquisition request. + + :param old_server_dns_alias_id: The id of the server alias that will be + acquired to point to this server instead. + :type old_server_dns_alias_id: str + """ + + _attribute_map = { + 'old_server_dns_alias_id': {'key': 'oldServerDnsAliasId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerDnsAliasAcquisition, self).__init__(**kwargs) + self.old_server_dns_alias_id = kwargs.get('old_server_dns_alias_id', None) + + +class ServerKey(ProxyResource): + """A server key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :type kind: str + :ivar location: Resource location. + :vartype location: str + :ivar subregion: Subregion of the server key. + :vartype subregion: str + :param server_key_type: Required. The server key type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :param uri: The URI of the server key. + :type uri: str + :param thumbprint: Thumbprint of the server key. + :type thumbprint: str + :param creation_date: The server key creation date. + :type creation_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'subregion': {'readonly': True}, + 'server_key_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'subregion': {'key': 'properties.subregion', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ServerKey, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + self.location = None + self.subregion = None + self.server_key_type = kwargs.get('server_key_type', None) + self.uri = kwargs.get('uri', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.creation_date = kwargs.get('creation_date', None) + + +class ServerSecurityAlertPolicy(ProxyResource): + """A server security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ServerSecurityAlertPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.disabled_alerts = kwargs.get('disabled_alerts', None) + self.email_addresses = kwargs.get('email_addresses', None) + self.email_account_admins = kwargs.get('email_account_admins', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.creation_time = None + + +class ServerUpdate(Model): + """An update request for an Azure SQL Database server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param administrator_login: Administrator username for the server. Once + created it cannot be changed. + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for server creation). + :type administrator_login_password: str + :param version: The version of the server. + :type version: str + :ivar state: The state of the server. + :vartype state: str + :ivar fully_qualified_domain_name: The fully qualified domain name of the + server. + :vartype fully_qualified_domain_name: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'state': {'readonly': True}, + 'fully_qualified_domain_name': {'readonly': True}, + } + + _attribute_map = { + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ServerUpdate, self).__init__(**kwargs) + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.version = kwargs.get('version', None) + self.state = None + self.fully_qualified_domain_name = None + self.tags = kwargs.get('tags', None) + + +class ServerUsage(Model): + """Represents server metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the server usage metric. + :vartype name: str + :ivar resource_name: The name of the resource. + :vartype resource_name: str + :ivar display_name: The metric display name. + :vartype display_name: str + :ivar current_value: The current value of the metric. + :vartype current_value: float + :ivar limit: The current limit of the metric. + :vartype limit: float + :ivar unit: The units of the metric. + :vartype unit: str + :ivar next_reset_time: The next reset time for the metric (ISO8601 + format). + :vartype next_reset_time: datetime + """ + + _validation = { + 'name': {'readonly': True}, + 'resource_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'next_reset_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ServerUsage, self).__init__(**kwargs) + self.name = None + self.resource_name = None + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + self.next_reset_time = None + + +class ServerVersionCapability(Model): + """The server capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The server version name. + :vartype name: str + :ivar supported_editions: The list of supported database editions. + :vartype supported_editions: + list[~azure.mgmt.sql.models.EditionCapability] + :ivar supported_elastic_pool_editions: The list of supported elastic pool + editions. + :vartype supported_elastic_pool_editions: + list[~azure.mgmt.sql.models.ElasticPoolEditionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_editions': {'readonly': True}, + 'supported_elastic_pool_editions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_editions': {'key': 'supportedEditions', 'type': '[EditionCapability]'}, + 'supported_elastic_pool_editions': {'key': 'supportedElasticPoolEditions', 'type': '[ElasticPoolEditionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerVersionCapability, self).__init__(**kwargs) + self.name = None + self.supported_editions = None + self.supported_elastic_pool_editions = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ServerVulnerabilityAssessment(ProxyResource): + """A server vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: Required. A blob storage container path to + hold the scan results (e.g. + https://myStorage.blob.core.windows.net/VaScans/). + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_container_path': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, **kwargs): + super(ServerVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = kwargs.get('storage_container_path', None) + self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.recurring_scans = kwargs.get('recurring_scans', None) + + +class ServiceObjective(ProxyResource): + """Represents a database service objective. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar service_objective_name: The name for the service objective. + :vartype service_objective_name: str + :ivar is_default: Gets whether the service level objective is the default + service objective. + :vartype is_default: bool + :ivar is_system: Gets whether the service level objective is a system + service objective. + :vartype is_system: bool + :ivar description: The description for the service level objective. + :vartype description: str + :ivar enabled: Gets whether the service level objective is enabled. + :vartype enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'service_objective_name': {'readonly': True}, + 'is_default': {'readonly': True}, + 'is_system': {'readonly': True}, + 'description': {'readonly': True}, + 'enabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'service_objective_name': {'key': 'properties.serviceObjectiveName', 'type': 'str'}, + 'is_default': {'key': 'properties.isDefault', 'type': 'bool'}, + 'is_system': {'key': 'properties.isSystem', 'type': 'bool'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ServiceObjective, self).__init__(**kwargs) + self.service_objective_name = None + self.is_default = None + self.is_system = None + self.description = None + self.enabled = None + + +class ServiceObjectiveCapability(Model): + """The service objectives capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique ID of the service objective. + :vartype id: str + :ivar name: The service objective name. + :vartype name: str + :ivar supported_max_sizes: The list of supported maximum database sizes. + :vartype supported_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar performance_level: The performance level. + :vartype performance_level: + ~azure.mgmt.sql.models.PerformanceLevelCapability + :ivar sku: The sku. + :vartype sku: ~azure.mgmt.sql.models.Sku + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar included_max_size: The included (free) max size. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'supported_max_sizes': {'readonly': True}, + 'performance_level': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceObjectiveCapability, self).__init__(**kwargs) + self.id = None + self.name = None + self.supported_max_sizes = None + self.performance_level = None + self.sku = None + self.supported_license_types = None + self.included_max_size = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ServiceTierAdvisor(ProxyResource): + """Represents a Service Tier Advisor. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar observation_period_start: The observation period start (ISO8601 + format). + :vartype observation_period_start: datetime + :ivar observation_period_end: The observation period start (ISO8601 + format). + :vartype observation_period_end: datetime + :ivar active_time_ratio: The activeTimeRatio for service tier advisor. + :vartype active_time_ratio: float + :ivar min_dtu: Gets or sets minDtu for service tier advisor. + :vartype min_dtu: float + :ivar avg_dtu: Gets or sets avgDtu for service tier advisor. + :vartype avg_dtu: float + :ivar max_dtu: Gets or sets maxDtu for service tier advisor. + :vartype max_dtu: float + :ivar max_size_in_gb: Gets or sets maxSizeInGB for service tier advisor. + :vartype max_size_in_gb: float + :ivar service_level_objective_usage_metrics: Gets or sets + serviceLevelObjectiveUsageMetrics for the service tier advisor. + :vartype service_level_objective_usage_metrics: + list[~azure.mgmt.sql.models.SloUsageMetric] + :ivar current_service_level_objective: Gets or sets + currentServiceLevelObjective for service tier advisor. + :vartype current_service_level_objective: str + :ivar current_service_level_objective_id: Gets or sets + currentServiceLevelObjectiveId for service tier advisor. + :vartype current_service_level_objective_id: str + :ivar usage_based_recommendation_service_level_objective: Gets or sets + usageBasedRecommendationServiceLevelObjective for service tier advisor. + :vartype usage_based_recommendation_service_level_objective: str + :ivar usage_based_recommendation_service_level_objective_id: Gets or sets + usageBasedRecommendationServiceLevelObjectiveId for service tier advisor. + :vartype usage_based_recommendation_service_level_objective_id: str + :ivar database_size_based_recommendation_service_level_objective: Gets or + sets databaseSizeBasedRecommendationServiceLevelObjective for service tier + advisor. + :vartype database_size_based_recommendation_service_level_objective: str + :ivar database_size_based_recommendation_service_level_objective_id: Gets + or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service + tier advisor. + :vartype database_size_based_recommendation_service_level_objective_id: + str + :ivar disaster_plan_based_recommendation_service_level_objective: Gets or + sets disasterPlanBasedRecommendationServiceLevelObjective for service tier + advisor. + :vartype disaster_plan_based_recommendation_service_level_objective: str + :ivar disaster_plan_based_recommendation_service_level_objective_id: Gets + or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service + tier advisor. + :vartype disaster_plan_based_recommendation_service_level_objective_id: + str + :ivar overall_recommendation_service_level_objective: Gets or sets + overallRecommendationServiceLevelObjective for service tier advisor. + :vartype overall_recommendation_service_level_objective: str + :ivar overall_recommendation_service_level_objective_id: Gets or sets + overallRecommendationServiceLevelObjectiveId for service tier advisor. + :vartype overall_recommendation_service_level_objective_id: str + :ivar confidence: Gets or sets confidence for service tier advisor. + :vartype confidence: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'observation_period_start': {'readonly': True}, + 'observation_period_end': {'readonly': True}, + 'active_time_ratio': {'readonly': True}, + 'min_dtu': {'readonly': True}, + 'avg_dtu': {'readonly': True}, + 'max_dtu': {'readonly': True}, + 'max_size_in_gb': {'readonly': True}, + 'service_level_objective_usage_metrics': {'readonly': True}, + 'current_service_level_objective': {'readonly': True}, + 'current_service_level_objective_id': {'readonly': True}, + 'usage_based_recommendation_service_level_objective': {'readonly': True}, + 'usage_based_recommendation_service_level_objective_id': {'readonly': True}, + 'database_size_based_recommendation_service_level_objective': {'readonly': True}, + 'database_size_based_recommendation_service_level_objective_id': {'readonly': True}, + 'disaster_plan_based_recommendation_service_level_objective': {'readonly': True}, + 'disaster_plan_based_recommendation_service_level_objective_id': {'readonly': True}, + 'overall_recommendation_service_level_objective': {'readonly': True}, + 'overall_recommendation_service_level_objective_id': {'readonly': True}, + 'confidence': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, + 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, + 'active_time_ratio': {'key': 'properties.activeTimeRatio', 'type': 'float'}, + 'min_dtu': {'key': 'properties.minDtu', 'type': 'float'}, + 'avg_dtu': {'key': 'properties.avgDtu', 'type': 'float'}, + 'max_dtu': {'key': 'properties.maxDtu', 'type': 'float'}, + 'max_size_in_gb': {'key': 'properties.maxSizeInGB', 'type': 'float'}, + 'service_level_objective_usage_metrics': {'key': 'properties.serviceLevelObjectiveUsageMetrics', 'type': '[SloUsageMetric]'}, + 'current_service_level_objective': {'key': 'properties.currentServiceLevelObjective', 'type': 'str'}, + 'current_service_level_objective_id': {'key': 'properties.currentServiceLevelObjectiveId', 'type': 'str'}, + 'usage_based_recommendation_service_level_objective': {'key': 'properties.usageBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'usage_based_recommendation_service_level_objective_id': {'key': 'properties.usageBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'database_size_based_recommendation_service_level_objective': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'database_size_based_recommendation_service_level_objective_id': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'disaster_plan_based_recommendation_service_level_objective': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'disaster_plan_based_recommendation_service_level_objective_id': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'overall_recommendation_service_level_objective': {'key': 'properties.overallRecommendationServiceLevelObjective', 'type': 'str'}, + 'overall_recommendation_service_level_objective_id': {'key': 'properties.overallRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'confidence': {'key': 'properties.confidence', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ServiceTierAdvisor, self).__init__(**kwargs) + self.observation_period_start = None + self.observation_period_end = None + self.active_time_ratio = None + self.min_dtu = None + self.avg_dtu = None + self.max_dtu = None + self.max_size_in_gb = None + self.service_level_objective_usage_metrics = None + self.current_service_level_objective = None + self.current_service_level_objective_id = None + self.usage_based_recommendation_service_level_objective = None + self.usage_based_recommendation_service_level_objective_id = None + self.database_size_based_recommendation_service_level_objective = None + self.database_size_based_recommendation_service_level_objective_id = None + self.disaster_plan_based_recommendation_service_level_objective = None + self.disaster_plan_based_recommendation_service_level_objective_id = None + self.overall_recommendation_service_level_objective = None + self.overall_recommendation_service_level_objective_id = None + self.confidence = None + + +class Sku(Model): + """The resource model definition representing SKU. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Ex - P3. It is typically a + letter+number code + :type name: str + :param tier: This field is required to be implemented by the Resource + Provider if the service has more than one tier, but is not required on a + PUT. + :type tier: str + :param size: The SKU size. When the name field is the combination of tier + and some other value, this would be the standalone code. + :type size: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :param capacity: If the SKU supports scale out/in then the capacity + integer should be included. If scale out/in is not possible for the + resource this may be omitted. + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.size = kwargs.get('size', None) + self.family = kwargs.get('family', None) + self.capacity = kwargs.get('capacity', None) + + +class SloUsageMetric(Model): + """A Slo Usage Metric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar service_level_objective: The serviceLevelObjective for SLO usage + metric. Possible values include: 'System', 'System0', 'System1', + 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', + 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', + 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', + 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', + 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', + 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', + 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', + 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' + :vartype service_level_objective: str or + ~azure.mgmt.sql.models.ServiceObjectiveName + :ivar service_level_objective_id: The serviceLevelObjectiveId for SLO + usage metric. + :vartype service_level_objective_id: str + :ivar in_range_time_ratio: Gets or sets inRangeTimeRatio for SLO usage + metric. + :vartype in_range_time_ratio: float + """ + + _validation = { + 'service_level_objective': {'readonly': True}, + 'service_level_objective_id': {'readonly': True}, + 'in_range_time_ratio': {'readonly': True}, + } + + _attribute_map = { + 'service_level_objective': {'key': 'serviceLevelObjective', 'type': 'str'}, + 'service_level_objective_id': {'key': 'serviceLevelObjectiveId', 'type': 'str'}, + 'in_range_time_ratio': {'key': 'inRangeTimeRatio', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(SloUsageMetric, self).__init__(**kwargs) + self.service_level_objective = None + self.service_level_objective_id = None + self.in_range_time_ratio = None + + +class SubscriptionUsage(ProxyResource): + """Usage Metric of a Subscription in a Location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar display_name: User-readable name of the metric. + :vartype display_name: str + :ivar current_value: Current value of the metric. + :vartype current_value: float + :ivar limit: Boundary value of the metric. + :vartype limit: float + :ivar unit: Unit of the metric. + :vartype unit: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'current_value': {'key': 'properties.currentValue', 'type': 'float'}, + 'limit': {'key': 'properties.limit', 'type': 'float'}, + 'unit': {'key': 'properties.unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubscriptionUsage, self).__init__(**kwargs) + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + + +class SyncAgent(ProxyResource): + """An Azure SQL Database sync agent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar sync_agent_name: Name of the sync agent. + :vartype sync_agent_name: str + :param sync_database_id: ARM resource id of the sync database in the sync + agent. + :type sync_database_id: str + :ivar last_alive_time: Last alive time of the sync agent. + :vartype last_alive_time: datetime + :ivar state: State of the sync agent. Possible values include: 'Online', + 'Offline', 'NeverConnected' + :vartype state: str or ~azure.mgmt.sql.models.SyncAgentState + :ivar is_up_to_date: If the sync agent version is up to date. + :vartype is_up_to_date: bool + :ivar expiry_time: Expiration time of the sync agent version. + :vartype expiry_time: datetime + :ivar version: Version of the sync agent. + :vartype version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sync_agent_name': {'readonly': True}, + 'last_alive_time': {'readonly': True}, + 'state': {'readonly': True}, + 'is_up_to_date': {'readonly': True}, + 'expiry_time': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sync_agent_name': {'key': 'properties.name', 'type': 'str'}, + 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, + 'last_alive_time': {'key': 'properties.lastAliveTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'is_up_to_date': {'key': 'properties.isUpToDate', 'type': 'bool'}, + 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncAgent, self).__init__(**kwargs) + self.sync_agent_name = None + self.sync_database_id = kwargs.get('sync_database_id', None) + self.last_alive_time = None + self.state = None + self.is_up_to_date = None + self.expiry_time = None + self.version = None + + +class SyncAgentKeyProperties(Model): + """Properties of an Azure SQL Database sync agent key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar sync_agent_key: Key of sync agent. + :vartype sync_agent_key: str + """ + + _validation = { + 'sync_agent_key': {'readonly': True}, + } + + _attribute_map = { + 'sync_agent_key': {'key': 'syncAgentKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncAgentKeyProperties, self).__init__(**kwargs) + self.sync_agent_key = None + + +class SyncAgentLinkedDatabase(ProxyResource): + """An Azure SQL Database sync agent linked database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_type: Type of the sync agent linked database. Possible + values include: 'AzureSqlDatabase', 'SqlServerDatabase' + :vartype database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType + :ivar database_id: Id of the sync agent linked database. + :vartype database_id: str + :ivar description: Description of the sync agent linked database. + :vartype description: str + :ivar server_name: Server name of the sync agent linked database. + :vartype server_name: str + :ivar database_name: Database name of the sync agent linked database. + :vartype database_name: str + :ivar user_name: User name of the sync agent linked database. + :vartype user_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_type': {'readonly': True}, + 'database_id': {'readonly': True}, + 'description': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncAgentLinkedDatabase, self).__init__(**kwargs) + self.database_type = None + self.database_id = None + self.description = None + self.server_name = None + self.database_name = None + self.user_name = None + + +class SyncDatabaseIdProperties(Model): + """Properties of the sync database id. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: ARM resource id of sync database. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncDatabaseIdProperties, self).__init__(**kwargs) + self.id = None + + +class SyncFullSchemaProperties(Model): + """Properties of the database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar tables: List of tables in the database full schema. + :vartype tables: list[~azure.mgmt.sql.models.SyncFullSchemaTable] + :ivar last_update_time: Last update time of the database schema. + :vartype last_update_time: datetime + """ + + _validation = { + 'tables': {'readonly': True}, + 'last_update_time': {'readonly': True}, + } + + _attribute_map = { + 'tables': {'key': 'tables', 'type': '[SyncFullSchemaTable]'}, + 'last_update_time': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(SyncFullSchemaProperties, self).__init__(**kwargs) + self.tables = None + self.last_update_time = None + + +class SyncFullSchemaTable(Model): + """Properties of the table in the database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar columns: List of columns in the table of database full schema. + :vartype columns: list[~azure.mgmt.sql.models.SyncFullSchemaTableColumn] + :ivar error_id: Error id of the table. + :vartype error_id: str + :ivar has_error: If there is error in the table. + :vartype has_error: bool + :ivar name: Name of the table. + :vartype name: str + :ivar quoted_name: Quoted name of the table. + :vartype quoted_name: str + """ + + _validation = { + 'columns': {'readonly': True}, + 'error_id': {'readonly': True}, + 'has_error': {'readonly': True}, + 'name': {'readonly': True}, + 'quoted_name': {'readonly': True}, + } + + _attribute_map = { + 'columns': {'key': 'columns', 'type': '[SyncFullSchemaTableColumn]'}, + 'error_id': {'key': 'errorId', 'type': 'str'}, + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncFullSchemaTable, self).__init__(**kwargs) + self.columns = None + self.error_id = None + self.has_error = None + self.name = None + self.quoted_name = None + + +class SyncFullSchemaTableColumn(Model): + """Properties of the column in the table of database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar data_size: Data size of the column. + :vartype data_size: str + :ivar data_type: Data type of the column. + :vartype data_type: str + :ivar error_id: Error id of the column. + :vartype error_id: str + :ivar has_error: If there is error in the table. + :vartype has_error: bool + :ivar is_primary_key: If it is the primary key of the table. + :vartype is_primary_key: bool + :ivar name: Name of the column. + :vartype name: str + :ivar quoted_name: Quoted name of the column. + :vartype quoted_name: str + """ + + _validation = { + 'data_size': {'readonly': True}, + 'data_type': {'readonly': True}, + 'error_id': {'readonly': True}, + 'has_error': {'readonly': True}, + 'is_primary_key': {'readonly': True}, + 'name': {'readonly': True}, + 'quoted_name': {'readonly': True}, + } + + _attribute_map = { + 'data_size': {'key': 'dataSize', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + 'error_id': {'key': 'errorId', 'type': 'str'}, + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'is_primary_key': {'key': 'isPrimaryKey', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncFullSchemaTableColumn, self).__init__(**kwargs) + self.data_size = None + self.data_type = None + self.error_id = None + self.has_error = None + self.is_primary_key = None + self.name = None + self.quoted_name = None + + +class SyncGroup(ProxyResource): + """An Azure SQL Database sync group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param interval: Sync interval of the sync group. + :type interval: int + :ivar last_sync_time: Last sync time of the sync group. + :vartype last_sync_time: datetime + :param conflict_resolution_policy: Conflict resolution policy of the sync + group. Possible values include: 'HubWin', 'MemberWin' + :type conflict_resolution_policy: str or + ~azure.mgmt.sql.models.SyncConflictResolutionPolicy + :param sync_database_id: ARM resource id of the sync database in the sync + group. + :type sync_database_id: str + :param hub_database_user_name: User name for the sync group hub database + credential. + :type hub_database_user_name: str + :param hub_database_password: Password for the sync group hub database + credential. + :type hub_database_password: str + :ivar sync_state: Sync state of the sync group. Possible values include: + 'NotReady', 'Error', 'Warning', 'Progressing', 'Good' + :vartype sync_state: str or ~azure.mgmt.sql.models.SyncGroupState + :param schema: Sync schema of the sync group. + :type schema: ~azure.mgmt.sql.models.SyncGroupSchema + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_sync_time': {'readonly': True}, + 'sync_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'interval': {'key': 'properties.interval', 'type': 'int'}, + 'last_sync_time': {'key': 'properties.lastSyncTime', 'type': 'iso-8601'}, + 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'str'}, + 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, + 'hub_database_user_name': {'key': 'properties.hubDatabaseUserName', 'type': 'str'}, + 'hub_database_password': {'key': 'properties.hubDatabasePassword', 'type': 'str'}, + 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, + 'schema': {'key': 'properties.schema', 'type': 'SyncGroupSchema'}, + } + + def __init__(self, **kwargs): + super(SyncGroup, self).__init__(**kwargs) + self.interval = kwargs.get('interval', None) + self.last_sync_time = None + self.conflict_resolution_policy = kwargs.get('conflict_resolution_policy', None) + self.sync_database_id = kwargs.get('sync_database_id', None) + self.hub_database_user_name = kwargs.get('hub_database_user_name', None) + self.hub_database_password = kwargs.get('hub_database_password', None) + self.sync_state = None + self.schema = kwargs.get('schema', None) + + +class SyncGroupLogProperties(Model): + """Properties of an Azure SQL Database sync group log. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar timestamp: Timestamp of the sync group log. + :vartype timestamp: datetime + :ivar type: Type of the sync group log. Possible values include: 'All', + 'Error', 'Warning', 'Success' + :vartype type: str or ~azure.mgmt.sql.models.SyncGroupLogType + :ivar source: Source of the sync group log. + :vartype source: str + :ivar details: Details of the sync group log. + :vartype details: str + :ivar tracing_id: TracingId of the sync group log. + :vartype tracing_id: str + :ivar operation_status: OperationStatus of the sync group log. + :vartype operation_status: str + """ + + _validation = { + 'timestamp': {'readonly': True}, + 'type': {'readonly': True}, + 'source': {'readonly': True}, + 'details': {'readonly': True}, + 'tracing_id': {'readonly': True}, + 'operation_status': {'readonly': True}, + } + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, + 'tracing_id': {'key': 'tracingId', 'type': 'str'}, + 'operation_status': {'key': 'operationStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncGroupLogProperties, self).__init__(**kwargs) + self.timestamp = None + self.type = None + self.source = None + self.details = None + self.tracing_id = None + self.operation_status = None + + +class SyncGroupSchema(Model): + """Properties of sync group schema. + + :param tables: List of tables in sync group schema. + :type tables: list[~azure.mgmt.sql.models.SyncGroupSchemaTable] + :param master_sync_member_name: Name of master sync member where the + schema is from. + :type master_sync_member_name: str + """ + + _attribute_map = { + 'tables': {'key': 'tables', 'type': '[SyncGroupSchemaTable]'}, + 'master_sync_member_name': {'key': 'masterSyncMemberName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncGroupSchema, self).__init__(**kwargs) + self.tables = kwargs.get('tables', None) + self.master_sync_member_name = kwargs.get('master_sync_member_name', None) + + +class SyncGroupSchemaTable(Model): + """Properties of table in sync group schema. + + :param columns: List of columns in sync group schema. + :type columns: list[~azure.mgmt.sql.models.SyncGroupSchemaTableColumn] + :param quoted_name: Quoted name of sync group schema table. + :type quoted_name: str + """ + + _attribute_map = { + 'columns': {'key': 'columns', 'type': '[SyncGroupSchemaTableColumn]'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncGroupSchemaTable, self).__init__(**kwargs) + self.columns = kwargs.get('columns', None) + self.quoted_name = kwargs.get('quoted_name', None) + + +class SyncGroupSchemaTableColumn(Model): + """Properties of column in sync group table. + + :param quoted_name: Quoted name of sync group table column. + :type quoted_name: str + :param data_size: Data size of the column. + :type data_size: str + :param data_type: Data type of the column. + :type data_type: str + """ + + _attribute_map = { + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + 'data_size': {'key': 'dataSize', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncGroupSchemaTableColumn, self).__init__(**kwargs) + self.quoted_name = kwargs.get('quoted_name', None) + self.data_size = kwargs.get('data_size', None) + self.data_type = kwargs.get('data_type', None) + + +class SyncMember(ProxyResource): + """An Azure SQL Database sync member. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param database_type: Database type of the sync member. Possible values + include: 'AzureSqlDatabase', 'SqlServerDatabase' + :type database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType + :param sync_agent_id: ARM resource id of the sync agent in the sync + member. + :type sync_agent_id: str + :param sql_server_database_id: SQL Server database id of the sync member. + :type sql_server_database_id: str + :param server_name: Server name of the member database in the sync member + :type server_name: str + :param database_name: Database name of the member database in the sync + member. + :type database_name: str + :param user_name: User name of the member database in the sync member. + :type user_name: str + :param password: Password of the member database in the sync member. + :type password: str + :param sync_direction: Sync direction of the sync member. Possible values + include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember' + :type sync_direction: str or ~azure.mgmt.sql.models.SyncDirection + :ivar sync_state: Sync state of the sync member. Possible values include: + 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', + 'DisabledTombstoneCleanup', 'DisabledBackupRestore', + 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', + 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', + 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', + 'ReprovisionFailed', 'UnReprovisioned' + :vartype sync_state: str or ~azure.mgmt.sql.models.SyncMemberState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sync_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, + 'sync_agent_id': {'key': 'properties.syncAgentId', 'type': 'str'}, + 'sql_server_database_id': {'key': 'properties.sqlServerDatabaseId', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'sync_direction': {'key': 'properties.syncDirection', 'type': 'str'}, + 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncMember, self).__init__(**kwargs) + self.database_type = kwargs.get('database_type', None) + self.sync_agent_id = kwargs.get('sync_agent_id', None) + self.sql_server_database_id = kwargs.get('sql_server_database_id', None) + self.server_name = kwargs.get('server_name', None) + self.database_name = kwargs.get('database_name', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.sync_direction = kwargs.get('sync_direction', None) + self.sync_state = None + + +class TdeCertificate(ProxyResource): + """A TDE certificate that can be uploaded into a server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param private_blob: Required. The base64 encoded certificate private + blob. + :type private_blob: str + :param cert_password: The certificate password. + :type cert_password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'private_blob': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_blob': {'key': 'properties.privateBlob', 'type': 'str'}, + 'cert_password': {'key': 'properties.certPassword', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TdeCertificate, self).__init__(**kwargs) + self.private_blob = kwargs.get('private_blob', None) + self.cert_password = kwargs.get('cert_password', None) + + +class TransparentDataEncryption(ProxyResource): + """Represents a database transparent data encryption configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :param status: The status of the database transparent data encryption. + Possible values include: 'Enabled', 'Disabled' + :type status: str or + ~azure.mgmt.sql.models.TransparentDataEncryptionStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'TransparentDataEncryptionStatus'}, + } + + def __init__(self, **kwargs): + super(TransparentDataEncryption, self).__init__(**kwargs) + self.location = None + self.status = kwargs.get('status', None) + + +class TransparentDataEncryptionActivity(ProxyResource): + """Represents a database transparent data encryption Scan. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar status: The status of the database. Possible values include: + 'Encrypting', 'Decrypting' + :vartype status: str or + ~azure.mgmt.sql.models.TransparentDataEncryptionActivityStatus + :ivar percent_complete: The percent complete of the transparent data + encryption scan for a database. + :vartype percent_complete: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'status': {'readonly': True}, + 'percent_complete': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(TransparentDataEncryptionActivity, self).__init__(**kwargs) + self.location = None + self.status = None + self.percent_complete = None + + +class Usage(Model): + """ARM usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: ~azure.mgmt.sql.models.Name + :ivar type: Resource type. + :vartype type: str + :ivar unit: Usage unit. + :vartype unit: str + :ivar current_value: Usage current value. + :vartype current_value: int + :ivar limit: Usage limit. + :vartype limit: int + :ivar requested_limit: Usage requested limit. + :vartype requested_limit: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'unit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'requested_limit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'Name'}, + 'type': {'key': 'type', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'int'}, + 'requested_limit': {'key': 'requestedLimit', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(Usage, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.unit = None + self.current_value = None + self.limit = None + self.requested_limit = None + + +class VirtualCluster(TrackedResource): + """An Azure SQL virtual cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar subnet_id: Subnet resource ID for the virtual cluster. + :vartype subnet_id: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :ivar child_resources: List of resources in this virtual cluster. + :vartype child_resources: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'subnet_id': {'readonly': True}, + 'child_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'family': {'key': 'properties.family', 'type': 'str'}, + 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualCluster, self).__init__(**kwargs) + self.subnet_id = None + self.family = kwargs.get('family', None) + self.child_resources = None + + +class VirtualClusterUpdate(Model): + """An update request for an Azure SQL Database virtual cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar subnet_id: Subnet resource ID for the virtual cluster. + :vartype subnet_id: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :ivar child_resources: List of resources in this virtual cluster. + :vartype child_resources: list[str] + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'subnet_id': {'readonly': True}, + 'child_resources': {'readonly': True}, + } + + _attribute_map = { + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'family': {'key': 'properties.family', 'type': 'str'}, + 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(VirtualClusterUpdate, self).__init__(**kwargs) + self.subnet_id = None + self.family = kwargs.get('family', None) + self.child_resources = None + self.tags = kwargs.get('tags', None) + + +class VirtualNetworkRule(ProxyResource): + """A virtual network rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param virtual_network_subnet_id: Required. The ARM resource id of the + virtual network subnet. + :type virtual_network_subnet_id: str + :param ignore_missing_vnet_service_endpoint: Create firewall rule before + the virtual network has vnet service endpoint enabled. + :type ignore_missing_vnet_service_endpoint: bool + :ivar state: Virtual Network Rule State. Possible values include: + 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' + :vartype state: str or ~azure.mgmt.sql.models.VirtualNetworkRuleState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'virtual_network_subnet_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, + 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkRule, self).__init__(**kwargs) + self.virtual_network_subnet_id = kwargs.get('virtual_network_subnet_id', None) + self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) + self.state = None + + +class VulnerabilityAssessmentRecurringScansProperties(Model): + """Properties of a Vulnerability Assessment recurring scans. + + :param is_enabled: Recurring scans state. + :type is_enabled: bool + :param email_subscription_admins: Specifies that the schedule scan + notification will be is sent to the subscription administrators. Default + value: True . + :type email_subscription_admins: bool + :param emails: Specifies an array of e-mail addresses to which the scan + notification is sent. + :type emails: list[str] + """ + + _attribute_map = { + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'}, + 'emails': {'key': 'emails', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs) + self.is_enabled = kwargs.get('is_enabled', None) + self.email_subscription_admins = kwargs.get('email_subscription_admins', True) + self.emails = kwargs.get('emails', None) + + +class VulnerabilityAssessmentScanError(Model): + """Properties of a vulnerability assessment scan error. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VulnerabilityAssessmentScanError, self).__init__(**kwargs) + self.code = None + self.message = None + + +class VulnerabilityAssessmentScanRecord(ProxyResource): + """A vulnerability assessment scan record. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar scan_id: The scan ID. + :vartype scan_id: str + :ivar trigger_type: The scan trigger type. Possible values include: + 'OnDemand', 'Recurring' + :vartype trigger_type: str or + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanTriggerType + :ivar state: The scan status. Possible values include: 'Passed', 'Failed', + 'FailedToRun', 'InProgress' + :vartype state: str or + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanState + :ivar start_time: The scan start time (UTC). + :vartype start_time: datetime + :ivar end_time: The scan end time (UTC). + :vartype end_time: datetime + :ivar errors: The scan errors. + :vartype errors: + list[~azure.mgmt.sql.models.VulnerabilityAssessmentScanError] + :ivar storage_container_path: The scan results storage container path. + :vartype storage_container_path: str + :ivar number_of_failed_security_checks: The number of failed security + checks. + :vartype number_of_failed_security_checks: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'scan_id': {'readonly': True}, + 'trigger_type': {'readonly': True}, + 'state': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'errors': {'readonly': True}, + 'storage_container_path': {'readonly': True}, + 'number_of_failed_security_checks': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'scan_id': {'key': 'properties.scanId', 'type': 'str'}, + 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'errors': {'key': 'properties.errors', 'type': '[VulnerabilityAssessmentScanError]'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'number_of_failed_security_checks': {'key': 'properties.numberOfFailedSecurityChecks', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(VulnerabilityAssessmentScanRecord, self).__init__(**kwargs) + self.scan_id = None + self.trigger_type = None + self.state = None + self.start_time = None + self.end_time = None + self.errors = None + self.storage_container_path = None + self.number_of_failed_security_checks = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py new file mode 100644 index 000000000000..24ba7183e418 --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py @@ -0,0 +1,8891 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AutomaticTuningOptions(Model): + """Automatic tuning properties for individual advisors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param desired_state: Automatic tuning option desired state. Possible + values include: 'Off', 'On', 'Default' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired + :ivar actual_state: Automatic tuning option actual state. Possible values + include: 'Off', 'On' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual + :ivar reason_code: Reason code if desired and actual state are different. + :vartype reason_code: int + :ivar reason_desc: Reason description if desired and actual state are + different. Possible values include: 'Default', 'Disabled', + 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', + 'QueryStoreReadOnly', 'NotSupported' + :vartype reason_desc: str or + ~azure.mgmt.sql.models.AutomaticTuningDisabledReason + """ + + _validation = { + 'actual_state': {'readonly': True}, + 'reason_code': {'readonly': True}, + 'reason_desc': {'readonly': True}, + } + + _attribute_map = { + 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, + 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, + 'reason_code': {'key': 'reasonCode', 'type': 'int'}, + 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningDisabledReason'}, + } + + def __init__(self, *, desired_state=None, **kwargs) -> None: + super(AutomaticTuningOptions, self).__init__(**kwargs) + self.desired_state = desired_state + self.actual_state = None + self.reason_code = None + self.reason_desc = None + + +class AutomaticTuningServerOptions(Model): + """Automatic tuning properties for individual advisors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param desired_state: Automatic tuning option desired state. Possible + values include: 'Off', 'On', 'Default' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired + :ivar actual_state: Automatic tuning option actual state. Possible values + include: 'Off', 'On' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual + :ivar reason_code: Reason code if desired and actual state are different. + :vartype reason_code: int + :ivar reason_desc: Reason description if desired and actual state are + different. Possible values include: 'Default', 'Disabled', + 'AutoConfigured' + :vartype reason_desc: str or + ~azure.mgmt.sql.models.AutomaticTuningServerReason + """ + + _validation = { + 'actual_state': {'readonly': True}, + 'reason_code': {'readonly': True}, + 'reason_desc': {'readonly': True}, + } + + _attribute_map = { + 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, + 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, + 'reason_code': {'key': 'reasonCode', 'type': 'int'}, + 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningServerReason'}, + } + + def __init__(self, *, desired_state=None, **kwargs) -> None: + super(AutomaticTuningServerOptions, self).__init__(**kwargs) + self.desired_state = desired_state + self.actual_state = None + self.reason_code = None + self.reason_desc = None + + +class Resource(Model): + """ARM resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ProxyResource(Resource): + """ARM proxy resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) + + +class BackupLongTermRetentionPolicy(ProxyResource): + """A long term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param weekly_retention: The weekly retention policy for an LTR backup in + an ISO 8601 format. + :type weekly_retention: str + :param monthly_retention: The monthly retention policy for an LTR backup + in an ISO 8601 format. + :type monthly_retention: str + :param yearly_retention: The yearly retention policy for an LTR backup in + an ISO 8601 format. + :type yearly_retention: str + :param week_of_year: The week of year to take the yearly backup in an ISO + 8601 format. + :type week_of_year: int + """ + + _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'}, + 'weekly_retention': {'key': 'properties.weeklyRetention', 'type': 'str'}, + 'monthly_retention': {'key': 'properties.monthlyRetention', 'type': 'str'}, + 'yearly_retention': {'key': 'properties.yearlyRetention', 'type': 'str'}, + 'week_of_year': {'key': 'properties.weekOfYear', 'type': 'int'}, + } + + def __init__(self, *, weekly_retention: str=None, monthly_retention: str=None, yearly_retention: str=None, week_of_year: int=None, **kwargs) -> None: + super(BackupLongTermRetentionPolicy, self).__init__(**kwargs) + self.weekly_retention = weekly_retention + self.monthly_retention = monthly_retention + self.yearly_retention = yearly_retention + self.week_of_year = week_of_year + + +class BackupShortTermRetentionPolicy(ProxyResource): + """A short term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param retention_days: The backup retention period in days. This is how + many days Point-in-Time Restore will be supported. + :type retention_days: int + """ + + _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'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + } + + def __init__(self, *, retention_days: int=None, **kwargs) -> None: + super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) + self.retention_days = retention_days + + +class CheckNameAvailabilityRequest(Model): + """A request to check whether the specified name for a resource is available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name whose availability is to be checked. + :type name: str + :ivar type: Required. The type of resource that is used as the scope of + the availability check. Default value: "Microsoft.Sql/servers" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.Sql/servers" + + def __init__(self, *, name: str, **kwargs) -> None: + super(CheckNameAvailabilityRequest, self).__init__(**kwargs) + self.name = name + + +class CheckNameAvailabilityResponse(Model): + """A response indicating whether the specified name for a resource is + available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar available: True if the name is available, otherwise false. + :vartype available: bool + :ivar message: A message explaining why the name is unavailable. Will be + null if the name is available. + :vartype message: str + :ivar name: The name whose availability was checked. + :vartype name: str + :ivar reason: The reason code explaining why the name is unavailable. Will + be null if the name is available. Possible values include: 'Invalid', + 'AlreadyExists' + :vartype reason: str or ~azure.mgmt.sql.models.CheckNameAvailabilityReason + """ + + _validation = { + 'available': {'readonly': True}, + 'message': {'readonly': True}, + 'name': {'readonly': True}, + 'reason': {'readonly': True}, + } + + _attribute_map = { + 'available': {'key': 'available', 'type': 'bool'}, + 'message': {'key': 'message', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'CheckNameAvailabilityReason'}, + } + + def __init__(self, **kwargs) -> None: + super(CheckNameAvailabilityResponse, self).__init__(**kwargs) + self.available = None + self.message = None + self.name = None + self.reason = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class CompleteDatabaseRestoreDefinition(Model): + """Contains the information necessary to perform a complete database restore + operation. + + All required parameters must be populated in order to send to Azure. + + :param last_backup_name: Required. The last backup name to apply + :type last_backup_name: str + """ + + _validation = { + 'last_backup_name': {'required': True}, + } + + _attribute_map = { + 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, + } + + def __init__(self, *, last_backup_name: str, **kwargs) -> None: + super(CompleteDatabaseRestoreDefinition, self).__init__(**kwargs) + self.last_backup_name = last_backup_name + + +class CreateDatabaseRestorePointDefinition(Model): + """Contains the information necessary to perform a create database restore + point operation. + + All required parameters must be populated in order to send to Azure. + + :param restore_point_label: Required. The restore point label to apply + :type restore_point_label: str + """ + + _validation = { + 'restore_point_label': {'required': True}, + } + + _attribute_map = { + 'restore_point_label': {'key': 'restorePointLabel', 'type': 'str'}, + } + + def __init__(self, *, restore_point_label: str, **kwargs) -> None: + super(CreateDatabaseRestorePointDefinition, self).__init__(**kwargs) + self.restore_point_label = restore_point_label + + +class TrackedResource(Resource): + """ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.location = location + self.tags = tags + + +class Database(TrackedResource): + """A database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The database SKU. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location + ```` + :type sku: ~azure.mgmt.sql.models.Sku + :ivar kind: Kind of database. This is metadata used for the Azure portal + experience. + :vartype kind: str + :ivar managed_by: Resource that manages the database. + :vartype managed_by: str + :param create_mode: Specifies the mode of database creation. + Default: regular database creation. + Copy: creates a database as a copy of an existing database. + sourceDatabaseId must be specified as the resource ID of the source + database. + Secondary: creates a database as a secondary replica of an existing + database. sourceDatabaseId must be specified as the resource ID of the + existing primary database. + PointInTimeRestore: Creates a database by restoring a point in time backup + of an existing database. sourceDatabaseId must be specified as the + resource ID of the existing database, and restorePointInTime must be + specified. + Recovery: Creates a database by restoring a geo-replicated backup. + sourceDatabaseId must be specified as the recoverable database resource ID + to restore. + Restore: Creates a database by restoring a backup of a deleted database. + sourceDatabaseId must be specified. If sourceDatabaseId is the database's + original resource ID, then sourceDatabaseDeletionDate must be specified. + Otherwise sourceDatabaseId must be the restorable dropped database + resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime + may also be specified to restore from an earlier point in time. + RestoreLongTermRetentionBackup: Creates a database by restoring from a + long term retention vault. recoveryServicesRecoveryPointResourceId must be + specified as the recovery point resource ID. + Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for + DataWarehouse edition. Possible values include: 'Default', 'Copy', + 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', + 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', + 'RestoreLongTermRetentionBackup', 'OnlineSecondary' + :type create_mode: str or ~azure.mgmt.sql.models.CreateMode + :param collation: The collation of the database. + :type collation: str + :param max_size_bytes: The max size of the database expressed in bytes. + :type max_size_bytes: long + :param sample_name: The name of the sample schema to apply when creating + this database. Possible values include: 'AdventureWorksLT', + 'WideWorldImportersStd', 'WideWorldImportersFull' + :type sample_name: str or ~azure.mgmt.sql.models.SampleName + :param elastic_pool_id: The resource identifier of the elastic pool + containing this database. + :type elastic_pool_id: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :ivar status: The status of the database. Possible values include: + 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', + 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', + 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', + 'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers', + 'OnlineChangingDwPerformanceTiers' + :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus + :ivar database_id: The ID of the database. + :vartype database_id: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar current_service_objective_name: The current service level objective + name of the database. + :vartype current_service_objective_name: str + :ivar requested_service_objective_name: The requested service level + objective name of the database. + :vartype requested_service_objective_name: str + :ivar default_secondary_location: The default secondary region for this + database. + :vartype default_secondary_location: str + :ivar failover_group_id: Failover Group resource identifier that this + database belongs to. + :vartype failover_group_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param source_database_deletion_date: Specifies the time that the database + was deleted. + :type source_database_deletion_date: datetime + :param recovery_services_recovery_point_id: The resource identifier of the + recovery point associated with create operation of this database. + :type recovery_services_recovery_point_id: str + :param long_term_retention_backup_resource_id: The resource identifier of + the long term retention backup associated with create operation of this + database. + :type long_term_retention_backup_resource_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param restorable_dropped_database_id: The resource identifier of the + restorable dropped database associated with create operation of this + database. + :type restorable_dropped_database_id: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param zone_redundant: Whether or not this database is zone redundant, + which means the replicas of this database will be spread across multiple + availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this database. Possible + values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType + :ivar max_log_size_bytes: The max log size for this database. + :vartype max_log_size_bytes: long + :ivar earliest_restore_date: This records the earliest start date and time + that restore is available for this database (ISO8601 format). + :vartype earliest_restore_date: datetime + :param read_scale: The state of read-only routing. If enabled, connections + that have application intent set to readonly in their connection string + may be routed to a readonly secondary replica in the same region. Possible + values include: 'Enabled', 'Disabled' + :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale + :ivar current_sku: The name and tier of the SKU. + :vartype current_sku: ~azure.mgmt.sql.models.Sku + :param auto_pause_delay: Time in minutes after which database is + automatically paused. A value of -1 means that automatic pause is disabled + :type auto_pause_delay: int + :param min_capacity: Minimal capacity that database will always have + allocated, if not paused + :type min_capacity: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'managed_by': {'readonly': True}, + 'status': {'readonly': True}, + 'database_id': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'current_service_objective_name': {'readonly': True}, + 'requested_service_objective_name': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + 'max_log_size_bytes': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'current_sku': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, + 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, + 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, + 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, + 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, + 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, + 'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'}, + 'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'}, + } + + def __init__(self, *, location: str, tags=None, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, auto_pause_delay: int=None, min_capacity: float=None, **kwargs) -> None: + super(Database, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.kind = None + self.managed_by = None + self.create_mode = create_mode + self.collation = collation + self.max_size_bytes = max_size_bytes + self.sample_name = sample_name + self.elastic_pool_id = elastic_pool_id + self.source_database_id = source_database_id + self.status = None + self.database_id = None + self.creation_date = None + self.current_service_objective_name = None + self.requested_service_objective_name = None + self.default_secondary_location = None + self.failover_group_id = None + self.restore_point_in_time = restore_point_in_time + self.source_database_deletion_date = source_database_deletion_date + self.recovery_services_recovery_point_id = recovery_services_recovery_point_id + self.long_term_retention_backup_resource_id = long_term_retention_backup_resource_id + self.recoverable_database_id = recoverable_database_id + self.restorable_dropped_database_id = restorable_dropped_database_id + self.catalog_collation = catalog_collation + self.zone_redundant = zone_redundant + self.license_type = license_type + self.max_log_size_bytes = None + self.earliest_restore_date = None + self.read_scale = read_scale + self.current_sku = None + self.auto_pause_delay = auto_pause_delay + self.min_capacity = min_capacity + + +class DatabaseAutomaticTuning(ProxyResource): + """Database-level Automatic Tuning. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param desired_state: Automatic tuning desired state. Possible values + include: 'Inherit', 'Custom', 'Auto', 'Unspecified' + :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode + :ivar actual_state: Automatic tuning actual state. Possible values + include: 'Inherit', 'Custom', 'Auto', 'Unspecified' + :vartype actual_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode + :param options: Automatic tuning options definition. + :type options: dict[str, ~azure.mgmt.sql.models.AutomaticTuningOptions] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'actual_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningMode'}, + 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningMode'}, + 'options': {'key': 'properties.options', 'type': '{AutomaticTuningOptions}'}, + } + + def __init__(self, *, desired_state=None, options=None, **kwargs) -> None: + super(DatabaseAutomaticTuning, self).__init__(**kwargs) + self.desired_state = desired_state + self.actual_state = None + self.options = options + + +class DatabaseBlobAuditingPolicy(ProxyResource): + """A database blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Resource kind. + :vartype kind: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: + super(DatabaseBlobAuditingPolicy, self).__init__(**kwargs) + self.kind = None + self.state = state + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.audit_actions_and_groups = audit_actions_and_groups + self.storage_account_subscription_id = storage_account_subscription_id + self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use + self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + + +class DatabaseOperation(ProxyResource): + """A database operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_name: The name of the database the operation is being + performed on. + :vartype database_name: str + :ivar operation: The name of operation. + :vartype operation: str + :ivar operation_friendly_name: The friendly name of operation. + :vartype operation_friendly_name: str + :ivar percent_complete: The percentage of the operation completed. + :vartype percent_complete: int + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar start_time: The operation start time. + :vartype start_time: datetime + :ivar state: The operation state. Possible values include: 'Pending', + 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', 'Cancelled' + :vartype state: str or ~azure.mgmt.sql.models.ManagementOperationState + :ivar error_code: The operation error code. + :vartype error_code: int + :ivar error_description: The operation error description. + :vartype error_description: str + :ivar error_severity: The operation error severity. + :vartype error_severity: int + :ivar is_user_error: Whether or not the error is a user error. + :vartype is_user_error: bool + :ivar estimated_completion_time: The estimated completion time of the + operation. + :vartype estimated_completion_time: datetime + :ivar description: The operation description. + :vartype description: str + :ivar is_cancellable: Whether the operation can be cancelled. + :vartype is_cancellable: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_name': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_friendly_name': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_description': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'is_user_error': {'readonly': True}, + 'estimated_completion_time': {'readonly': True}, + 'description': {'readonly': True}, + 'is_cancellable': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, + 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(DatabaseOperation, self).__init__(**kwargs) + self.database_name = None + self.operation = None + self.operation_friendly_name = None + self.percent_complete = None + self.server_name = None + self.start_time = None + self.state = None + self.error_code = None + self.error_description = None + self.error_severity = None + self.is_user_error = None + self.estimated_completion_time = None + self.description = None + self.is_cancellable = None + + +class DatabaseSecurityAlertPolicy(ProxyResource): + """Contains information about a database Threat Detection policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar kind: Resource kind. + :vartype kind: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint and storageAccountAccessKey are required. + Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies the semicolon-separated list of alerts + that are disabled, or empty string to disable no alerts. Possible values: + Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; + Data_Exfiltration; Unsafe_Action. + :type disabled_alerts: str + :param email_addresses: Specifies the semicolon-separated list of e-mail + addresses to which the alert is sent. + :type email_addresses: str + :param email_account_admins: Specifies that the alert is sent to the + account administrators. Possible values include: 'Enabled', 'Disabled' + :type email_account_admins: str or + ~azure.mgmt.sql.models.SecurityAlertPolicyEmailAccountAdmins + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. If state is Enabled, storageEndpoint is + required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. If state is Enabled, + storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :param use_server_default: Specifies whether to use the default server + policy. Possible values include: 'Enabled', 'Disabled' + :type use_server_default: str or + ~azure.mgmt.sql.models.SecurityAlertPolicyUseServerDefault + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': 'str'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': 'str'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'SecurityAlertPolicyEmailAccountAdmins'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'use_server_default': {'key': 'properties.useServerDefault', 'type': 'SecurityAlertPolicyUseServerDefault'}, + } + + def __init__(self, *, state, location: str=None, disabled_alerts: str=None, email_addresses: str=None, email_account_admins=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, use_server_default=None, **kwargs) -> None: + super(DatabaseSecurityAlertPolicy, self).__init__(**kwargs) + self.location = location + self.kind = None + self.state = state + self.disabled_alerts = disabled_alerts + self.email_addresses = email_addresses + self.email_account_admins = email_account_admins + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.use_server_default = use_server_default + + +class DatabaseUpdate(Model): + """A database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param create_mode: Specifies the mode of database creation. + Default: regular database creation. + Copy: creates a database as a copy of an existing database. + sourceDatabaseId must be specified as the resource ID of the source + database. + Secondary: creates a database as a secondary replica of an existing + database. sourceDatabaseId must be specified as the resource ID of the + existing primary database. + PointInTimeRestore: Creates a database by restoring a point in time backup + of an existing database. sourceDatabaseId must be specified as the + resource ID of the existing database, and restorePointInTime must be + specified. + Recovery: Creates a database by restoring a geo-replicated backup. + sourceDatabaseId must be specified as the recoverable database resource ID + to restore. + Restore: Creates a database by restoring a backup of a deleted database. + sourceDatabaseId must be specified. If sourceDatabaseId is the database's + original resource ID, then sourceDatabaseDeletionDate must be specified. + Otherwise sourceDatabaseId must be the restorable dropped database + resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime + may also be specified to restore from an earlier point in time. + RestoreLongTermRetentionBackup: Creates a database by restoring from a + long term retention vault. recoveryServicesRecoveryPointResourceId must be + specified as the recovery point resource ID. + Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for + DataWarehouse edition. Possible values include: 'Default', 'Copy', + 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', + 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', + 'RestoreLongTermRetentionBackup', 'OnlineSecondary' + :type create_mode: str or ~azure.mgmt.sql.models.CreateMode + :param collation: The collation of the database. + :type collation: str + :param max_size_bytes: The max size of the database expressed in bytes. + :type max_size_bytes: long + :param sample_name: The name of the sample schema to apply when creating + this database. Possible values include: 'AdventureWorksLT', + 'WideWorldImportersStd', 'WideWorldImportersFull' + :type sample_name: str or ~azure.mgmt.sql.models.SampleName + :param elastic_pool_id: The resource identifier of the elastic pool + containing this database. + :type elastic_pool_id: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :ivar status: The status of the database. Possible values include: + 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', + 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', + 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', + 'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers', + 'OnlineChangingDwPerformanceTiers' + :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus + :ivar database_id: The ID of the database. + :vartype database_id: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar current_service_objective_name: The current service level objective + name of the database. + :vartype current_service_objective_name: str + :ivar requested_service_objective_name: The requested service level + objective name of the database. + :vartype requested_service_objective_name: str + :ivar default_secondary_location: The default secondary region for this + database. + :vartype default_secondary_location: str + :ivar failover_group_id: Failover Group resource identifier that this + database belongs to. + :vartype failover_group_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param source_database_deletion_date: Specifies the time that the database + was deleted. + :type source_database_deletion_date: datetime + :param recovery_services_recovery_point_id: The resource identifier of the + recovery point associated with create operation of this database. + :type recovery_services_recovery_point_id: str + :param long_term_retention_backup_resource_id: The resource identifier of + the long term retention backup associated with create operation of this + database. + :type long_term_retention_backup_resource_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param restorable_dropped_database_id: The resource identifier of the + restorable dropped database associated with create operation of this + database. + :type restorable_dropped_database_id: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param zone_redundant: Whether or not this database is zone redundant, + which means the replicas of this database will be spread across multiple + availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this database. Possible + values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType + :ivar max_log_size_bytes: The max log size for this database. + :vartype max_log_size_bytes: long + :ivar earliest_restore_date: This records the earliest start date and time + that restore is available for this database (ISO8601 format). + :vartype earliest_restore_date: datetime + :param read_scale: The state of read-only routing. If enabled, connections + that have application intent set to readonly in their connection string + may be routed to a readonly secondary replica in the same region. Possible + values include: 'Enabled', 'Disabled' + :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale + :ivar current_sku: The name and tier of the SKU. + :vartype current_sku: ~azure.mgmt.sql.models.Sku + :param auto_pause_delay: Time in minutes after which database is + automatically paused. A value of -1 means that automatic pause is disabled + :type auto_pause_delay: int + :param min_capacity: Minimal capacity that database will always have + allocated, if not paused + :type min_capacity: float + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'status': {'readonly': True}, + 'database_id': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'current_service_objective_name': {'readonly': True}, + 'requested_service_objective_name': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + 'max_log_size_bytes': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'current_sku': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, + 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, + 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, + 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, + 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, + 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, + 'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'}, + 'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, auto_pause_delay: int=None, min_capacity: float=None, tags=None, **kwargs) -> None: + super(DatabaseUpdate, self).__init__(**kwargs) + self.sku = sku + self.create_mode = create_mode + self.collation = collation + self.max_size_bytes = max_size_bytes + self.sample_name = sample_name + self.elastic_pool_id = elastic_pool_id + self.source_database_id = source_database_id + self.status = None + self.database_id = None + self.creation_date = None + self.current_service_objective_name = None + self.requested_service_objective_name = None + self.default_secondary_location = None + self.failover_group_id = None + self.restore_point_in_time = restore_point_in_time + self.source_database_deletion_date = source_database_deletion_date + self.recovery_services_recovery_point_id = recovery_services_recovery_point_id + self.long_term_retention_backup_resource_id = long_term_retention_backup_resource_id + self.recoverable_database_id = recoverable_database_id + self.restorable_dropped_database_id = restorable_dropped_database_id + self.catalog_collation = catalog_collation + self.zone_redundant = zone_redundant + self.license_type = license_type + self.max_log_size_bytes = None + self.earliest_restore_date = None + self.read_scale = read_scale + self.current_sku = None + self.auto_pause_delay = auto_pause_delay + self.min_capacity = min_capacity + self.tags = tags + + +class DatabaseUsage(Model): + """The database usages. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the usage metric. + :vartype name: str + :ivar resource_name: The name of the resource. + :vartype resource_name: str + :ivar display_name: The usage metric display name. + :vartype display_name: str + :ivar current_value: The current value of the usage metric. + :vartype current_value: float + :ivar limit: The current limit of the usage metric. + :vartype limit: float + :ivar unit: The units of the usage metric. + :vartype unit: str + :ivar next_reset_time: The next reset time for the usage metric (ISO8601 + format). + :vartype next_reset_time: datetime + """ + + _validation = { + 'name': {'readonly': True}, + 'resource_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'next_reset_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(DatabaseUsage, self).__init__(**kwargs) + self.name = None + self.resource_name = None + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + self.next_reset_time = None + + +class DatabaseVulnerabilityAssessment(ProxyResource): + """A database vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: A blob storage container path to hold the + scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It + is required if server level vulnerability assessment policy doesn't set + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _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'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, *, storage_container_path: str=None, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: + super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = storage_container_path + self.storage_container_sas_key = storage_container_sas_key + self.storage_account_access_key = storage_account_access_key + self.recurring_scans = recurring_scans + + +class DatabaseVulnerabilityAssessmentRuleBaseline(ProxyResource): + """A database vulnerability assessment rule baseline. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param baseline_results: Required. The rule baseline result + :type baseline_results: + list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'baseline_results': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'baseline_results': {'key': 'properties.baselineResults', 'type': '[DatabaseVulnerabilityAssessmentRuleBaselineItem]'}, + } + + def __init__(self, *, baseline_results, **kwargs) -> None: + super(DatabaseVulnerabilityAssessmentRuleBaseline, self).__init__(**kwargs) + self.baseline_results = baseline_results + + +class DatabaseVulnerabilityAssessmentRuleBaselineItem(Model): + """Properties for an Azure SQL Database Vulnerability Assessment rule + baseline's result. + + All required parameters must be populated in order to send to Azure. + + :param result: Required. The rule baseline result + :type result: list[str] + """ + + _validation = { + 'result': {'required': True}, + } + + _attribute_map = { + 'result': {'key': 'result', 'type': '[str]'}, + } + + def __init__(self, *, result, **kwargs) -> None: + super(DatabaseVulnerabilityAssessmentRuleBaselineItem, self).__init__(**kwargs) + self.result = result + + +class DatabaseVulnerabilityAssessmentScansExport(ProxyResource): + """A database Vulnerability Assessment scan export resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar exported_report_location: Location of the exported report (e.g. + https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). + :vartype exported_report_location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'exported_report_location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs) + self.exported_report_location = None + + +class DataMaskingPolicy(ProxyResource): + """Represents a database data masking policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param data_masking_state: Required. The state of the data masking policy. + Possible values include: 'Disabled', 'Enabled' + :type data_masking_state: str or ~azure.mgmt.sql.models.DataMaskingState + :param exempt_principals: The list of the exempt principals. Specifies the + semicolon-separated list of database users for which the data masking + policy does not apply. The specified users receive data results without + masking for all of the database queries. + :type exempt_principals: str + :ivar application_principals: The list of the application principals. This + is a legacy parameter and is no longer used. + :vartype application_principals: str + :ivar masking_level: The masking level. This is a legacy parameter and is + no longer used. + :vartype masking_level: str + :ivar location: The location of the data masking policy. + :vartype location: str + :ivar kind: The kind of data masking policy. Metadata, used for Azure + portal. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_masking_state': {'required': True}, + 'application_principals': {'readonly': True}, + 'masking_level': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_masking_state': {'key': 'properties.dataMaskingState', 'type': 'DataMaskingState'}, + 'exempt_principals': {'key': 'properties.exemptPrincipals', 'type': 'str'}, + 'application_principals': {'key': 'properties.applicationPrincipals', 'type': 'str'}, + 'masking_level': {'key': 'properties.maskingLevel', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, data_masking_state, exempt_principals: str=None, **kwargs) -> None: + super(DataMaskingPolicy, self).__init__(**kwargs) + self.data_masking_state = data_masking_state + self.exempt_principals = exempt_principals + self.application_principals = None + self.masking_level = None + self.location = None + self.kind = None + + +class DataMaskingRule(ProxyResource): + """Represents a database data masking rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar data_masking_rule_id: The rule Id. + :vartype data_masking_rule_id: str + :param alias_name: The alias name. This is a legacy parameter and is no + longer used. + :type alias_name: str + :param rule_state: The rule state. Used to delete a rule. To delete an + existing rule, specify the schemaName, tableName, columnName, + maskingFunction, and specify ruleState as disabled. However, if the rule + doesn't already exist, the rule will be created with ruleState set to + enabled, regardless of the provided value of ruleState. Possible values + include: 'Disabled', 'Enabled' + :type rule_state: str or ~azure.mgmt.sql.models.DataMaskingRuleState + :param schema_name: Required. The schema name on which the data masking + rule is applied. + :type schema_name: str + :param table_name: Required. The table name on which the data masking rule + is applied. + :type table_name: str + :param column_name: Required. The column name on which the data masking + rule is applied. + :type column_name: str + :param masking_function: Required. The masking function that is used for + the data masking rule. Possible values include: 'Default', 'CCN', 'Email', + 'Number', 'SSN', 'Text' + :type masking_function: str or ~azure.mgmt.sql.models.DataMaskingFunction + :param number_from: The numberFrom property of the masking rule. Required + if maskingFunction is set to Number, otherwise this parameter will be + ignored. + :type number_from: str + :param number_to: The numberTo property of the data masking rule. Required + if maskingFunction is set to Number, otherwise this parameter will be + ignored. + :type number_to: str + :param prefix_size: If maskingFunction is set to Text, the number of + characters to show unmasked in the beginning of the string. Otherwise, + this parameter will be ignored. + :type prefix_size: str + :param suffix_size: If maskingFunction is set to Text, the number of + characters to show unmasked at the end of the string. Otherwise, this + parameter will be ignored. + :type suffix_size: str + :param replacement_string: If maskingFunction is set to Text, the + character to use for masking the unexposed part of the string. Otherwise, + this parameter will be ignored. + :type replacement_string: str + :ivar location: The location of the data masking rule. + :vartype location: str + :ivar kind: The kind of Data Masking Rule. Metadata, used for Azure + portal. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_masking_rule_id': {'readonly': True}, + 'schema_name': {'required': True}, + 'table_name': {'required': True}, + 'column_name': {'required': True}, + 'masking_function': {'required': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_masking_rule_id': {'key': 'properties.id', 'type': 'str'}, + 'alias_name': {'key': 'properties.aliasName', 'type': 'str'}, + 'rule_state': {'key': 'properties.ruleState', 'type': 'DataMaskingRuleState'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, + 'table_name': {'key': 'properties.tableName', 'type': 'str'}, + 'column_name': {'key': 'properties.columnName', 'type': 'str'}, + 'masking_function': {'key': 'properties.maskingFunction', 'type': 'DataMaskingFunction'}, + 'number_from': {'key': 'properties.numberFrom', 'type': 'str'}, + 'number_to': {'key': 'properties.numberTo', 'type': 'str'}, + 'prefix_size': {'key': 'properties.prefixSize', 'type': 'str'}, + 'suffix_size': {'key': 'properties.suffixSize', 'type': 'str'}, + 'replacement_string': {'key': 'properties.replacementString', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, schema_name: str, table_name: str, column_name: str, masking_function, alias_name: str=None, rule_state=None, number_from: str=None, number_to: str=None, prefix_size: str=None, suffix_size: str=None, replacement_string: str=None, **kwargs) -> None: + super(DataMaskingRule, self).__init__(**kwargs) + self.data_masking_rule_id = None + self.alias_name = alias_name + self.rule_state = rule_state + self.schema_name = schema_name + self.table_name = table_name + self.column_name = column_name + self.masking_function = masking_function + self.number_from = number_from + self.number_to = number_to + self.prefix_size = prefix_size + self.suffix_size = suffix_size + self.replacement_string = replacement_string + self.location = None + self.kind = None + + +class EditionCapability(Model): + """The edition capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The database edition name. + :vartype name: str + :ivar supported_service_level_objectives: The list of supported service + objectives for the edition. + :vartype supported_service_level_objectives: + list[~azure.mgmt.sql.models.ServiceObjectiveCapability] + :ivar zone_redundant: Whether or not zone redundancy is supported for the + edition. + :vartype zone_redundant: bool + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_service_level_objectives': {'readonly': True}, + 'zone_redundant': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_service_level_objectives': {'key': 'supportedServiceLevelObjectives', 'type': '[ServiceObjectiveCapability]'}, + 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(EditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_service_level_objectives = None + self.zone_redundant = None + self.status = None + self.reason = reason + + +class ElasticPool(TrackedResource): + """An elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The elastic pool SKU. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or the following command: + ```azurecli + az sql elastic-pool list-editions -l -o table + ```` + :type sku: ~azure.mgmt.sql.models.Sku + :ivar kind: Kind of elastic pool. This is metadata used for the Azure + portal experience. + :vartype kind: str + :ivar state: The state of the elastic pool. Possible values include: + 'Creating', 'Ready', 'Disabled' + :vartype state: str or ~azure.mgmt.sql.models.ElasticPoolState + :ivar creation_date: The creation date of the elastic pool (ISO8601 + format). + :vartype creation_date: datetime + :param max_size_bytes: The storage limit for the database elastic pool in + bytes. + :type max_size_bytes: long + :param per_database_settings: The per database settings for the elastic + pool. + :type per_database_settings: + ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings + :param zone_redundant: Whether or not this elastic pool is zone redundant, + which means the replicas of this elastic pool will be spread across + multiple availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this elastic pool. + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'state': {'readonly': True}, + 'creation_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, sku=None, max_size_bytes: int=None, per_database_settings=None, zone_redundant: bool=None, license_type=None, **kwargs) -> None: + super(ElasticPool, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.kind = None + self.state = None + self.creation_date = None + self.max_size_bytes = max_size_bytes + self.per_database_settings = per_database_settings + self.zone_redundant = zone_redundant + self.license_type = license_type + + +class ElasticPoolActivity(ProxyResource): + """Represents the activity on an elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar end_time: The time the operation finished (ISO8601 format). + :vartype end_time: datetime + :ivar error_code: The error code if available. + :vartype error_code: int + :ivar error_message: The error message if available. + :vartype error_message: str + :ivar error_severity: The error severity if available. + :vartype error_severity: int + :ivar operation: The operation name. + :vartype operation: str + :ivar operation_id: The unique operation ID. + :vartype operation_id: str + :ivar percent_complete: The percentage complete if available. + :vartype percent_complete: int + :ivar requested_database_dtu_max: The requested max DTU per database if + available. + :vartype requested_database_dtu_max: int + :ivar requested_database_dtu_min: The requested min DTU per database if + available. + :vartype requested_database_dtu_min: int + :ivar requested_dtu: The requested DTU for the pool if available. + :vartype requested_dtu: int + :ivar requested_elastic_pool_name: The requested name for the elastic pool + if available. + :vartype requested_elastic_pool_name: str + :ivar requested_storage_limit_in_gb: The requested storage limit for the + pool in GB if available. + :vartype requested_storage_limit_in_gb: long + :ivar elastic_pool_name: The name of the elastic pool. + :vartype elastic_pool_name: str + :ivar server_name: The name of the server the elastic pool is in. + :vartype server_name: str + :ivar start_time: The time the operation started (ISO8601 format). + :vartype start_time: datetime + :ivar state: The current state of the operation. + :vartype state: str + :ivar requested_storage_limit_in_mb: The requested storage limit in MB. + :vartype requested_storage_limit_in_mb: int + :ivar requested_database_dtu_guarantee: The requested per database DTU + guarantee. + :vartype requested_database_dtu_guarantee: int + :ivar requested_database_dtu_cap: The requested per database DTU cap. + :vartype requested_database_dtu_cap: int + :ivar requested_dtu_guarantee: The requested DTU guarantee. + :vartype requested_dtu_guarantee: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_message': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_id': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'requested_database_dtu_max': {'readonly': True}, + 'requested_database_dtu_min': {'readonly': True}, + 'requested_dtu': {'readonly': True}, + 'requested_elastic_pool_name': {'readonly': True}, + 'requested_storage_limit_in_gb': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'requested_storage_limit_in_mb': {'readonly': True}, + 'requested_database_dtu_guarantee': {'readonly': True}, + 'requested_database_dtu_cap': {'readonly': True}, + 'requested_dtu_guarantee': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'requested_database_dtu_max': {'key': 'properties.requestedDatabaseDtuMax', 'type': 'int'}, + 'requested_database_dtu_min': {'key': 'properties.requestedDatabaseDtuMin', 'type': 'int'}, + 'requested_dtu': {'key': 'properties.requestedDtu', 'type': 'int'}, + 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, + 'requested_storage_limit_in_gb': {'key': 'properties.requestedStorageLimitInGB', 'type': 'long'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'requested_storage_limit_in_mb': {'key': 'properties.requestedStorageLimitInMB', 'type': 'int'}, + 'requested_database_dtu_guarantee': {'key': 'properties.requestedDatabaseDtuGuarantee', 'type': 'int'}, + 'requested_database_dtu_cap': {'key': 'properties.requestedDatabaseDtuCap', 'type': 'int'}, + 'requested_dtu_guarantee': {'key': 'properties.requestedDtuGuarantee', 'type': 'int'}, + } + + def __init__(self, *, location: str=None, **kwargs) -> None: + super(ElasticPoolActivity, self).__init__(**kwargs) + self.location = location + self.end_time = None + self.error_code = None + self.error_message = None + self.error_severity = None + self.operation = None + self.operation_id = None + self.percent_complete = None + self.requested_database_dtu_max = None + self.requested_database_dtu_min = None + self.requested_dtu = None + self.requested_elastic_pool_name = None + self.requested_storage_limit_in_gb = None + self.elastic_pool_name = None + self.server_name = None + self.start_time = None + self.state = None + self.requested_storage_limit_in_mb = None + self.requested_database_dtu_guarantee = None + self.requested_database_dtu_cap = None + self.requested_dtu_guarantee = None + + +class ElasticPoolDatabaseActivity(ProxyResource): + """Represents the activity on an elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar database_name: The database name. + :vartype database_name: str + :ivar end_time: The time the operation finished (ISO8601 format). + :vartype end_time: datetime + :ivar error_code: The error code if available. + :vartype error_code: int + :ivar error_message: The error message if available. + :vartype error_message: str + :ivar error_severity: The error severity if available. + :vartype error_severity: int + :ivar operation: The operation name. + :vartype operation: str + :ivar operation_id: The unique operation ID. + :vartype operation_id: str + :ivar percent_complete: The percentage complete if available. + :vartype percent_complete: int + :ivar requested_elastic_pool_name: The name for the elastic pool the + database is moving into if available. + :vartype requested_elastic_pool_name: str + :ivar current_elastic_pool_name: The name of the current elastic pool the + database is in if available. + :vartype current_elastic_pool_name: str + :ivar current_service_objective: The name of the current service objective + if available. + :vartype current_service_objective: str + :ivar requested_service_objective: The name of the requested service + objective if available. + :vartype requested_service_objective: str + :ivar server_name: The name of the server the elastic pool is in. + :vartype server_name: str + :ivar start_time: The time the operation started (ISO8601 format). + :vartype start_time: datetime + :ivar state: The current state of the operation. + :vartype state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_name': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_message': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_id': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'requested_elastic_pool_name': {'readonly': True}, + 'current_elastic_pool_name': {'readonly': True}, + 'current_service_objective': {'readonly': True}, + 'requested_service_objective': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, + 'current_elastic_pool_name': {'key': 'properties.currentElasticPoolName', 'type': 'str'}, + 'current_service_objective': {'key': 'properties.currentServiceObjective', 'type': 'str'}, + 'requested_service_objective': {'key': 'properties.requestedServiceObjective', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, **kwargs) -> None: + super(ElasticPoolDatabaseActivity, self).__init__(**kwargs) + self.location = location + self.database_name = None + self.end_time = None + self.error_code = None + self.error_message = None + self.error_severity = None + self.operation = None + self.operation_id = None + self.percent_complete = None + self.requested_elastic_pool_name = None + self.current_elastic_pool_name = None + self.current_service_objective = None + self.requested_service_objective = None + self.server_name = None + self.start_time = None + self.state = None + + +class ElasticPoolEditionCapability(Model): + """The elastic pool edition capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The elastic pool edition name. + :vartype name: str + :ivar supported_elastic_pool_performance_levels: The list of supported + elastic pool DTU levels for the edition. + :vartype supported_elastic_pool_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerformanceLevelCapability] + :ivar zone_redundant: Whether or not zone redundancy is supported for the + edition. + :vartype zone_redundant: bool + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_elastic_pool_performance_levels': {'readonly': True}, + 'zone_redundant': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_elastic_pool_performance_levels': {'key': 'supportedElasticPoolPerformanceLevels', 'type': '[ElasticPoolPerformanceLevelCapability]'}, + 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ElasticPoolEditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_elastic_pool_performance_levels = None + self.zone_redundant = None + self.status = None + self.reason = reason + + +class ElasticPoolOperation(ProxyResource): + """A elastic pool operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar elastic_pool_name: The name of the elastic pool the operation is + being performed on. + :vartype elastic_pool_name: str + :ivar operation: The name of operation. + :vartype operation: str + :ivar operation_friendly_name: The friendly name of operation. + :vartype operation_friendly_name: str + :ivar percent_complete: The percentage of the operation completed. + :vartype percent_complete: int + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar start_time: The operation start time. + :vartype start_time: datetime + :ivar state: The operation state. + :vartype state: str + :ivar error_code: The operation error code. + :vartype error_code: int + :ivar error_description: The operation error description. + :vartype error_description: str + :ivar error_severity: The operation error severity. + :vartype error_severity: int + :ivar is_user_error: Whether or not the error is a user error. + :vartype is_user_error: bool + :ivar estimated_completion_time: The estimated completion time of the + operation. + :vartype estimated_completion_time: datetime + :ivar description: The operation description. + :vartype description: str + :ivar is_cancellable: Whether the operation can be cancelled. + :vartype is_cancellable: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_friendly_name': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_description': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'is_user_error': {'readonly': True}, + 'estimated_completion_time': {'readonly': True}, + 'description': {'readonly': True}, + 'is_cancellable': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, + 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(ElasticPoolOperation, self).__init__(**kwargs) + self.elastic_pool_name = None + self.operation = None + self.operation_friendly_name = None + self.percent_complete = None + self.server_name = None + self.start_time = None + self.state = None + self.error_code = None + self.error_description = None + self.error_severity = None + self.is_user_error = None + self.estimated_completion_time = None + self.description = None + self.is_cancellable = None + + +class ElasticPoolPerDatabaseMaxPerformanceLevelCapability(Model): + """The max per-database performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The maximum performance level per database. + :vartype limit: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + :ivar supported_per_database_min_performance_levels: The list of supported + min database performance levels. + :vartype supported_per_database_min_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMinPerformanceLevelCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'supported_per_database_min_performance_levels': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'supported_per_database_min_performance_levels': {'key': 'supportedPerDatabaseMinPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMinPerformanceLevelCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ElasticPoolPerDatabaseMaxPerformanceLevelCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + self.supported_per_database_min_performance_levels = None + self.status = None + self.reason = reason + + +class ElasticPoolPerDatabaseMinPerformanceLevelCapability(Model): + """The minimum per-database performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The minimum performance level per database. + :vartype limit: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ElasticPoolPerDatabaseMinPerformanceLevelCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + self.status = None + self.reason = reason + + +class ElasticPoolPerDatabaseSettings(Model): + """Per database settings of an elastic pool. + + :param min_capacity: The minimum capacity all databases are guaranteed. + :type min_capacity: float + :param max_capacity: The maximum capacity any one database can consume. + :type max_capacity: float + """ + + _attribute_map = { + 'min_capacity': {'key': 'minCapacity', 'type': 'float'}, + 'max_capacity': {'key': 'maxCapacity', 'type': 'float'}, + } + + def __init__(self, *, min_capacity: float=None, max_capacity: float=None, **kwargs) -> None: + super(ElasticPoolPerDatabaseSettings, self).__init__(**kwargs) + self.min_capacity = min_capacity + self.max_capacity = max_capacity + + +class ElasticPoolPerformanceLevelCapability(Model): + """The Elastic Pool performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar performance_level: The performance level for the pool. + :vartype performance_level: + ~azure.mgmt.sql.models.PerformanceLevelCapability + :ivar sku: The sku. + :vartype sku: ~azure.mgmt.sql.models.Sku + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar max_database_count: The maximum number of databases supported. + :vartype max_database_count: int + :ivar included_max_size: The included (free) max size for this performance + level. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar supported_max_sizes: The list of supported max sizes. + :vartype supported_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar supported_per_database_max_sizes: The list of supported per database + max sizes. + :vartype supported_per_database_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar supported_per_database_max_performance_levels: The list of supported + per database max performance levels. + :vartype supported_per_database_max_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMaxPerformanceLevelCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'performance_level': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'max_database_count': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'supported_max_sizes': {'readonly': True}, + 'supported_per_database_max_sizes': {'readonly': True}, + 'supported_per_database_max_performance_levels': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'max_database_count': {'key': 'maxDatabaseCount', 'type': 'int'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'supported_per_database_max_sizes': {'key': 'supportedPerDatabaseMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'supported_per_database_max_performance_levels': {'key': 'supportedPerDatabaseMaxPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMaxPerformanceLevelCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ElasticPoolPerformanceLevelCapability, self).__init__(**kwargs) + self.performance_level = None + self.sku = None + self.supported_license_types = None + self.max_database_count = None + self.included_max_size = None + self.supported_max_sizes = None + self.supported_per_database_max_sizes = None + self.supported_per_database_max_performance_levels = None + self.status = None + self.reason = reason + + +class ElasticPoolUpdate(Model): + """An elastic pool update. + + :param sku: + :type sku: ~azure.mgmt.sql.models.Sku + :param max_size_bytes: The storage limit for the database elastic pool in + bytes. + :type max_size_bytes: long + :param per_database_settings: The per database settings for the elastic + pool. + :type per_database_settings: + ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings + :param zone_redundant: Whether or not this elastic pool is zone redundant, + which means the replicas of this elastic pool will be spread across + multiple availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this elastic pool. + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, sku=None, max_size_bytes: int=None, per_database_settings=None, zone_redundant: bool=None, license_type=None, tags=None, **kwargs) -> None: + super(ElasticPoolUpdate, self).__init__(**kwargs) + self.sku = sku + self.max_size_bytes = max_size_bytes + self.per_database_settings = per_database_settings + self.zone_redundant = zone_redundant + self.license_type = license_type + self.tags = tags + + +class EncryptionProtector(ProxyResource): + """The server encryption protector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :type kind: str + :ivar location: Resource location. + :vartype location: str + :ivar subregion: Subregion of the encryption protector. + :vartype subregion: str + :param server_key_name: The name of the server key. + :type server_key_name: str + :param server_key_type: Required. The encryption protector type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :ivar uri: The URI of the server key. + :vartype uri: str + :ivar thumbprint: Thumbprint of the server key. + :vartype thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'subregion': {'readonly': True}, + 'server_key_type': {'required': True}, + 'uri': {'readonly': True}, + 'thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'subregion': {'key': 'properties.subregion', 'type': 'str'}, + 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, *, server_key_type, kind: str=None, server_key_name: str=None, **kwargs) -> None: + super(EncryptionProtector, self).__init__(**kwargs) + self.kind = kind + self.location = None + self.subregion = None + self.server_key_name = server_key_name + self.server_key_type = server_key_type + self.uri = None + self.thumbprint = None + + +class ExportRequest(Model): + """Export database parameters. + + All required parameters must be populated in order to send to Azure. + + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + } + + _attribute_map = { + 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, + } + + def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, authentication_type="SQL", **kwargs) -> None: + super(ExportRequest, self).__init__(**kwargs) + self.storage_key_type = storage_key_type + self.storage_key = storage_key + self.storage_uri = storage_uri + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.authentication_type = authentication_type + + +class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): + """An extended database blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param predicate_expression: Specifies condition of where clause when + creating an audit. + :type predicate_expression: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: + super(ExtendedDatabaseBlobAuditingPolicy, self).__init__(**kwargs) + self.predicate_expression = predicate_expression + self.state = state + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.audit_actions_and_groups = audit_actions_and_groups + self.storage_account_subscription_id = storage_account_subscription_id + self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use + self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + + +class ExtendedServerBlobAuditingPolicy(ProxyResource): + """An extended server blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param predicate_expression: Specifies condition of where clause when + creating an audit. + :type predicate_expression: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: + super(ExtendedServerBlobAuditingPolicy, self).__init__(**kwargs) + self.predicate_expression = predicate_expression + self.state = state + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.audit_actions_and_groups = audit_actions_and_groups + self.storage_account_subscription_id = storage_account_subscription_id + self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use + self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + + +class FailoverGroup(ProxyResource): + """A failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param read_write_endpoint: Required. Read-write endpoint of the failover + group instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint + :ivar replication_role: Local replication role of the failover group + instance. Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.FailoverGroupReplicationRole + :ivar replication_state: Replication state of the failover group instance. + :vartype replication_state: str + :param partner_servers: Required. List of partner server information for + the failover group. + :type partner_servers: list[~azure.mgmt.sql.models.PartnerInfo] + :param databases: List of databases in the failover group. + :type databases: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'read_write_endpoint': {'required': True}, + 'replication_role': {'readonly': True}, + 'replication_state': {'readonly': True}, + 'partner_servers': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, + 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + 'partner_servers': {'key': 'properties.partnerServers', 'type': '[PartnerInfo]'}, + 'databases': {'key': 'properties.databases', 'type': '[str]'}, + } + + def __init__(self, *, read_write_endpoint, partner_servers, tags=None, read_only_endpoint=None, databases=None, **kwargs) -> None: + super(FailoverGroup, self).__init__(**kwargs) + self.location = None + self.tags = tags + self.read_write_endpoint = read_write_endpoint + self.read_only_endpoint = read_only_endpoint + self.replication_role = None + self.replication_state = None + self.partner_servers = partner_servers + self.databases = databases + + +class FailoverGroupReadOnlyEndpoint(Model): + """Read-only endpoint of the failover group instance. + + :param failover_policy: Failover policy of the read-only endpoint for the + failover group. Possible values include: 'Disabled', 'Enabled' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy + """ + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + } + + def __init__(self, *, failover_policy=None, **kwargs) -> None: + super(FailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) + self.failover_policy = failover_policy + + +class FailoverGroupReadWriteEndpoint(Model): + """Read-write endpoint of the failover group instance. + + All required parameters must be populated in order to send to Azure. + + :param failover_policy: Required. Failover policy of the read-write + endpoint for the failover group. If failoverPolicy is Automatic then + failoverWithDataLossGracePeriodMinutes is required. Possible values + include: 'Manual', 'Automatic' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy + :param failover_with_data_loss_grace_period_minutes: Grace period before + failover with data loss is attempted for the read-write endpoint. If + failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is + required. + :type failover_with_data_loss_grace_period_minutes: int + """ + + _validation = { + 'failover_policy': {'required': True}, + } + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, + } + + def __init__(self, *, failover_policy, failover_with_data_loss_grace_period_minutes: int=None, **kwargs) -> None: + super(FailoverGroupReadWriteEndpoint, self).__init__(**kwargs) + self.failover_policy = failover_policy + self.failover_with_data_loss_grace_period_minutes = failover_with_data_loss_grace_period_minutes + + +class FailoverGroupUpdate(Model): + """A failover group update request. + + :param read_write_endpoint: Read-write endpoint of the failover group + instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint + :param databases: List of databases in the failover group. + :type databases: list[str] + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, + 'databases': {'key': 'properties.databases', 'type': '[str]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, read_write_endpoint=None, read_only_endpoint=None, databases=None, tags=None, **kwargs) -> None: + super(FailoverGroupUpdate, self).__init__(**kwargs) + self.read_write_endpoint = read_write_endpoint + self.read_only_endpoint = read_only_endpoint + self.databases = databases + self.tags = tags + + +class FirewallRule(ProxyResource): + """Represents a server firewall rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of server that contains this firewall rule. + :vartype kind: str + :ivar location: Location of the server that contains this firewall rule. + :vartype location: str + :param start_ip_address: Required. The start IP address of the firewall + rule. Must be IPv4 format. Use value '0.0.0.0' to represent all + Azure-internal IP addresses. + :type start_ip_address: str + :param end_ip_address: Required. The end IP address of the firewall rule. + Must be IPv4 format. Must be greater than or equal to startIpAddress. Use + value '0.0.0.0' to represent all Azure-internal IP addresses. + :type end_ip_address: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + 'start_ip_address': {'required': True}, + 'end_ip_address': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + } + + def __init__(self, *, start_ip_address: str, end_ip_address: str, **kwargs) -> None: + super(FirewallRule, self).__init__(**kwargs) + self.kind = None + self.location = None + self.start_ip_address = start_ip_address + self.end_ip_address = end_ip_address + + +class GeoBackupPolicy(ProxyResource): + """A database geo backup policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. The state of the geo backup policy. Possible + values include: 'Disabled', 'Enabled' + :type state: str or ~azure.mgmt.sql.models.GeoBackupPolicyState + :ivar storage_type: The storage type of the geo backup policy. + :vartype storage_type: str + :ivar kind: Kind of geo backup policy. This is metadata used for the + Azure portal experience. + :vartype kind: str + :ivar location: Backup policy location. + :vartype location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'storage_type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'GeoBackupPolicyState'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, state, **kwargs) -> None: + super(GeoBackupPolicy, self).__init__(**kwargs) + self.state = state + self.storage_type = None + self.kind = None + self.location = None + + +class ImportExportResponse(ProxyResource): + """Response for Import/Export Get operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar request_type: The request type of the operation. + :vartype request_type: str + :ivar request_id: The request type of the operation. + :vartype request_id: str + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar database_name: The name of the database. + :vartype database_name: str + :ivar status: The status message returned from the server. + :vartype status: str + :ivar last_modified_time: The operation status last modified time. + :vartype last_modified_time: str + :ivar queued_time: The operation queued time. + :vartype queued_time: str + :ivar blob_uri: The blob uri. + :vartype blob_uri: str + :ivar error_message: The error message returned from the server. + :vartype error_message: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'request_type': {'readonly': True}, + 'request_id': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'status': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'queued_time': {'readonly': True}, + 'blob_uri': {'readonly': True}, + 'error_message': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'request_type': {'key': 'properties.requestType', 'type': 'str'}, + 'request_id': {'key': 'properties.requestId', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'str'}, + 'queued_time': {'key': 'properties.queuedTime', 'type': 'str'}, + 'blob_uri': {'key': 'properties.blobUri', 'type': 'str'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ImportExportResponse, self).__init__(**kwargs) + self.request_type = None + self.request_id = None + self.server_name = None + self.database_name = None + self.status = None + self.last_modified_time = None + self.queued_time = None + self.blob_uri = None + self.error_message = None + + +class ImportExtensionRequest(Model): + """Import database parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: The name of the extension. + :type name: str + :param type: The type of the extension. + :type type: str + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + :ivar operation_mode: Required. The type of import operation being + performed. This is always Import. Default value: "Import" . + :vartype operation_mode: str + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + 'operation_mode': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_key_type': {'key': 'properties.storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'properties.storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'properties.storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'properties.authenticationType', 'type': 'AuthenticationType'}, + 'operation_mode': {'key': 'properties.operationMode', 'type': 'str'}, + } + + operation_mode = "Import" + + def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, name: str=None, type: str=None, authentication_type="SQL", **kwargs) -> None: + super(ImportExtensionRequest, self).__init__(**kwargs) + self.name = name + self.type = type + self.storage_key_type = storage_key_type + self.storage_key = storage_key + self.storage_uri = storage_uri + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.authentication_type = authentication_type + + +class ImportRequest(ExportRequest): + """Import database parameters. + + All required parameters must be populated in order to send to Azure. + + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + :param database_name: Required. The name of the database to import. + :type database_name: str + :param edition: Required. The edition for the database being created. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location + ```` + . Possible values include: 'Web', 'Business', 'Basic', 'Standard', + 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', + 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale' + :type edition: str or ~azure.mgmt.sql.models.DatabaseEdition + :param service_objective_name: Required. The name of the service objective + to assign to the database. Possible values include: 'System', 'System0', + 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', + 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', + 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', + 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', + 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', + 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', + 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', + 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' + :type service_objective_name: str or + ~azure.mgmt.sql.models.ServiceObjectiveName + :param max_size_bytes: Required. The maximum size for the newly imported + database. + :type max_size_bytes: str + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + 'database_name': {'required': True}, + 'edition': {'required': True}, + 'service_objective_name': {'required': True}, + 'max_size_bytes': {'required': True}, + } + + _attribute_map = { + 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'edition': {'key': 'edition', 'type': 'str'}, + 'service_objective_name': {'key': 'serviceObjectiveName', 'type': 'str'}, + 'max_size_bytes': {'key': 'maxSizeBytes', 'type': 'str'}, + } + + def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, database_name: str, edition, service_objective_name, max_size_bytes: str, authentication_type="SQL", **kwargs) -> None: + super(ImportRequest, self).__init__(storage_key_type=storage_key_type, storage_key=storage_key, storage_uri=storage_uri, administrator_login=administrator_login, administrator_login_password=administrator_login_password, authentication_type=authentication_type, **kwargs) + self.database_name = database_name + self.edition = edition + self.service_objective_name = service_objective_name + self.max_size_bytes = max_size_bytes + + +class InstanceFailoverGroup(ProxyResource): + """An instance failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param read_write_endpoint: Required. Read-write endpoint of the failover + group instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.InstanceFailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.InstanceFailoverGroupReadOnlyEndpoint + :ivar replication_role: Local replication role of the failover group + instance. Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole + :ivar replication_state: Replication state of the failover group instance. + :vartype replication_state: str + :param partner_regions: Required. Partner region information for the + failover group. + :type partner_regions: list[~azure.mgmt.sql.models.PartnerRegionInfo] + :param managed_instance_pairs: Required. List of managed instance pairs in + the failover group. + :type managed_instance_pairs: + list[~azure.mgmt.sql.models.ManagedInstancePairInfo] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'read_write_endpoint': {'required': True}, + 'replication_role': {'readonly': True}, + 'replication_state': {'readonly': True}, + 'partner_regions': {'required': True}, + 'managed_instance_pairs': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'InstanceFailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'InstanceFailoverGroupReadOnlyEndpoint'}, + 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + 'partner_regions': {'key': 'properties.partnerRegions', 'type': '[PartnerRegionInfo]'}, + 'managed_instance_pairs': {'key': 'properties.managedInstancePairs', 'type': '[ManagedInstancePairInfo]'}, + } + + def __init__(self, *, read_write_endpoint, partner_regions, managed_instance_pairs, read_only_endpoint=None, **kwargs) -> None: + super(InstanceFailoverGroup, self).__init__(**kwargs) + self.read_write_endpoint = read_write_endpoint + self.read_only_endpoint = read_only_endpoint + self.replication_role = None + self.replication_state = None + self.partner_regions = partner_regions + self.managed_instance_pairs = managed_instance_pairs + + +class InstanceFailoverGroupReadOnlyEndpoint(Model): + """Read-only endpoint of the failover group instance. + + :param failover_policy: Failover policy of the read-only endpoint for the + failover group. Possible values include: 'Disabled', 'Enabled' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy + """ + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + } + + def __init__(self, *, failover_policy=None, **kwargs) -> None: + super(InstanceFailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) + self.failover_policy = failover_policy + + +class InstanceFailoverGroupReadWriteEndpoint(Model): + """Read-write endpoint of the failover group instance. + + All required parameters must be populated in order to send to Azure. + + :param failover_policy: Required. Failover policy of the read-write + endpoint for the failover group. If failoverPolicy is Automatic then + failoverWithDataLossGracePeriodMinutes is required. Possible values + include: 'Manual', 'Automatic' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy + :param failover_with_data_loss_grace_period_minutes: Grace period before + failover with data loss is attempted for the read-write endpoint. If + failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is + required. + :type failover_with_data_loss_grace_period_minutes: int + """ + + _validation = { + 'failover_policy': {'required': True}, + } + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, + } + + def __init__(self, *, failover_policy, failover_with_data_loss_grace_period_minutes: int=None, **kwargs) -> None: + super(InstanceFailoverGroupReadWriteEndpoint, self).__init__(**kwargs) + self.failover_policy = failover_policy + self.failover_with_data_loss_grace_period_minutes = failover_with_data_loss_grace_period_minutes + + +class InstancePool(TrackedResource): + """An Azure SQL instance pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param subnet_id: Required. Resource ID of the subnet to place this + instance pool in. + :type subnet_id: str + :param v_cores: Required. Count of vCores belonging to this instance pool. + :type v_cores: int + :param license_type: Required. The license type. Possible values are + 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' + (without SQL license price). Possible values include: 'LicenseIncluded', + 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.InstancePoolLicenseType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'subnet_id': {'required': True}, + 'v_cores': {'required': True}, + 'license_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + } + + def __init__(self, *, location: str, subnet_id: str, v_cores: int, license_type, tags=None, sku=None, **kwargs) -> None: + super(InstancePool, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.subnet_id = subnet_id + self.v_cores = v_cores + self.license_type = license_type + + +class InstancePoolUpdate(Model): + """An update to an Instance pool. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(InstancePoolUpdate, self).__init__(**kwargs) + self.tags = tags + + +class Job(ProxyResource): + """A job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param description: User-defined description of the job. Default value: "" + . + :type description: str + :ivar version: The job version number. + :vartype version: int + :param schedule: Schedule properties of the job. + :type schedule: ~azure.mgmt.sql.models.JobSchedule + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'int'}, + 'schedule': {'key': 'properties.schedule', 'type': 'JobSchedule'}, + } + + def __init__(self, *, description: str="", schedule=None, **kwargs) -> None: + super(Job, self).__init__(**kwargs) + self.description = description + self.version = None + self.schedule = schedule + + +class JobAgent(TrackedResource): + """An Azure SQL job agent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param database_id: Required. Resource ID of the database to store job + metadata in. + :type database_id: str + :ivar state: The state of the job agent. Possible values include: + 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' + :vartype state: str or ~azure.mgmt.sql.models.JobAgentState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'database_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, *, location: str, database_id: str, tags=None, sku=None, **kwargs) -> None: + super(JobAgent, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.database_id = database_id + self.state = None + + +class JobAgentUpdate(Model): + """An update to an Azure SQL job agent. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(JobAgentUpdate, self).__init__(**kwargs) + self.tags = tags + + +class JobCredential(ProxyResource): + """A stored credential that can be used by a job to connect to target + databases. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param username: Required. The credential user name. + :type username: str + :param password: Required. The credential password. + :type password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'username': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'username': {'key': 'properties.username', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + } + + def __init__(self, *, username: str, password: str, **kwargs) -> None: + super(JobCredential, self).__init__(**kwargs) + self.username = username + self.password = password + + +class JobExecution(ProxyResource): + """An execution of a job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar job_version: The job version number. + :vartype job_version: int + :ivar step_name: The job step name. + :vartype step_name: str + :ivar step_id: The job step id. + :vartype step_id: int + :ivar job_execution_id: The unique identifier of the job execution. + :vartype job_execution_id: str + :ivar lifecycle: The detailed state of the job execution. Possible values + include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', + 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', + 'TimedOut', 'Canceled', 'Skipped' + :vartype lifecycle: str or ~azure.mgmt.sql.models.JobExecutionLifecycle + :ivar provisioning_state: The ARM provisioning state of the job execution. + Possible values include: 'Created', 'InProgress', 'Succeeded', 'Failed', + 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.sql.models.ProvisioningState + :ivar create_time: The time that the job execution was created. + :vartype create_time: datetime + :ivar start_time: The time that the job execution started. + :vartype start_time: datetime + :ivar end_time: The time that the job execution completed. + :vartype end_time: datetime + :param current_attempts: Number of times the job execution has been + attempted. + :type current_attempts: int + :ivar current_attempt_start_time: Start time of the current attempt. + :vartype current_attempt_start_time: datetime + :ivar last_message: The last status or error message. + :vartype last_message: str + :ivar target: The target that this execution is executed on. + :vartype target: ~azure.mgmt.sql.models.JobExecutionTarget + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'job_version': {'readonly': True}, + 'step_name': {'readonly': True}, + 'step_id': {'readonly': True}, + 'job_execution_id': {'readonly': True}, + 'lifecycle': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'create_time': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'current_attempt_start_time': {'readonly': True}, + 'last_message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'job_version': {'key': 'properties.jobVersion', 'type': 'int'}, + 'step_name': {'key': 'properties.stepName', 'type': 'str'}, + 'step_id': {'key': 'properties.stepId', 'type': 'int'}, + 'job_execution_id': {'key': 'properties.jobExecutionId', 'type': 'str'}, + 'lifecycle': {'key': 'properties.lifecycle', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'current_attempts': {'key': 'properties.currentAttempts', 'type': 'int'}, + 'current_attempt_start_time': {'key': 'properties.currentAttemptStartTime', 'type': 'iso-8601'}, + 'last_message': {'key': 'properties.lastMessage', 'type': 'str'}, + 'target': {'key': 'properties.target', 'type': 'JobExecutionTarget'}, + } + + def __init__(self, *, current_attempts: int=None, **kwargs) -> None: + super(JobExecution, self).__init__(**kwargs) + self.job_version = None + self.step_name = None + self.step_id = None + self.job_execution_id = None + self.lifecycle = None + self.provisioning_state = None + self.create_time = None + self.start_time = None + self.end_time = None + self.current_attempts = current_attempts + self.current_attempt_start_time = None + self.last_message = None + self.target = None + + +class JobExecutionTarget(Model): + """The target that a job execution is executed on. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of the target. Possible values include: + 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + :vartype type: str or ~azure.mgmt.sql.models.JobTargetType + :ivar server_name: The server name. + :vartype server_name: str + :ivar database_name: The database name. + :vartype database_name: str + """ + + _validation = { + 'type': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(JobExecutionTarget, self).__init__(**kwargs) + self.type = None + self.server_name = None + self.database_name = None + + +class JobSchedule(Model): + """Scheduling properties of a job. + + :param start_time: Schedule start time. Default value: + "0001-01-01T00:00:00Z" . + :type start_time: datetime + :param end_time: Schedule end time. Default value: "9999-12-31T11:59:59Z" + . + :type end_time: datetime + :param type: Schedule interval type. Possible values include: 'Once', + 'Recurring'. Default value: "Once" . + :type type: str or ~azure.mgmt.sql.models.JobScheduleType + :param enabled: Whether or not the schedule is enabled. + :type enabled: bool + :param interval: Value of the schedule's recurring interval, if the + schedule type is recurring. ISO8601 duration format. + :type interval: str + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'JobScheduleType'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'interval': {'key': 'interval', 'type': 'str'}, + } + + def __init__(self, *, start_time="0001-01-01T00:00:00Z", end_time="9999-12-31T11:59:59Z", type="Once", enabled: bool=None, interval: str=None, **kwargs) -> None: + super(JobSchedule, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.type = type + self.enabled = enabled + self.interval = interval + + +class JobStep(ProxyResource): + """A job step. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param step_id: The job step's index within the job. If not specified when + creating the job step, it will be created as the last step. If not + specified when updating the job step, the step id is not modified. + :type step_id: int + :param target_group: Required. The resource ID of the target group that + the job step will be executed on. + :type target_group: str + :param credential: Required. The resource ID of the job credential that + will be used to connect to the targets. + :type credential: str + :param action: Required. The action payload of the job step. + :type action: ~azure.mgmt.sql.models.JobStepAction + :param output: Output destination properties of the job step. + :type output: ~azure.mgmt.sql.models.JobStepOutput + :param execution_options: Execution options for the job step. + :type execution_options: ~azure.mgmt.sql.models.JobStepExecutionOptions + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'target_group': {'required': True}, + 'credential': {'required': True}, + 'action': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'step_id': {'key': 'properties.stepId', 'type': 'int'}, + 'target_group': {'key': 'properties.targetGroup', 'type': 'str'}, + 'credential': {'key': 'properties.credential', 'type': 'str'}, + 'action': {'key': 'properties.action', 'type': 'JobStepAction'}, + 'output': {'key': 'properties.output', 'type': 'JobStepOutput'}, + 'execution_options': {'key': 'properties.executionOptions', 'type': 'JobStepExecutionOptions'}, + } + + def __init__(self, *, target_group: str, credential: str, action, step_id: int=None, output=None, execution_options=None, **kwargs) -> None: + super(JobStep, self).__init__(**kwargs) + self.step_id = step_id + self.target_group = target_group + self.credential = credential + self.action = action + self.output = output + self.execution_options = execution_options + + +class JobStepAction(Model): + """The action to be executed by a job step. + + All required parameters must be populated in order to send to Azure. + + :param type: Type of action being executed by the job step. Possible + values include: 'TSql'. Default value: "TSql" . + :type type: str or ~azure.mgmt.sql.models.JobStepActionType + :param source: The source of the action to execute. Possible values + include: 'Inline'. Default value: "Inline" . + :type source: str or ~azure.mgmt.sql.models.JobStepActionSource + :param value: Required. The action value, for example the text of the + T-SQL script to execute. + :type value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, value: str, type="TSql", source="Inline", **kwargs) -> None: + super(JobStepAction, self).__init__(**kwargs) + self.type = type + self.source = source + self.value = value + + +class JobStepExecutionOptions(Model): + """The execution options of a job step. + + :param timeout_seconds: Execution timeout for the job step. Default value: + 43200 . + :type timeout_seconds: int + :param retry_attempts: Maximum number of times the job step will be + reattempted if the first attempt fails. Default value: 10 . + :type retry_attempts: int + :param initial_retry_interval_seconds: Initial delay between retries for + job step execution. Default value: 1 . + :type initial_retry_interval_seconds: int + :param maximum_retry_interval_seconds: The maximum amount of time to wait + between retries for job step execution. Default value: 120 . + :type maximum_retry_interval_seconds: int + :param retry_interval_backoff_multiplier: The backoff multiplier for the + time between retries. Default value: 2 . + :type retry_interval_backoff_multiplier: float + """ + + _attribute_map = { + 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, + 'retry_attempts': {'key': 'retryAttempts', 'type': 'int'}, + 'initial_retry_interval_seconds': {'key': 'initialRetryIntervalSeconds', 'type': 'int'}, + 'maximum_retry_interval_seconds': {'key': 'maximumRetryIntervalSeconds', 'type': 'int'}, + 'retry_interval_backoff_multiplier': {'key': 'retryIntervalBackoffMultiplier', 'type': 'float'}, + } + + def __init__(self, *, timeout_seconds: int=43200, retry_attempts: int=10, initial_retry_interval_seconds: int=1, maximum_retry_interval_seconds: int=120, retry_interval_backoff_multiplier: float=2, **kwargs) -> None: + super(JobStepExecutionOptions, self).__init__(**kwargs) + self.timeout_seconds = timeout_seconds + self.retry_attempts = retry_attempts + self.initial_retry_interval_seconds = initial_retry_interval_seconds + self.maximum_retry_interval_seconds = maximum_retry_interval_seconds + self.retry_interval_backoff_multiplier = retry_interval_backoff_multiplier + + +class JobStepOutput(Model): + """The output configuration of a job step. + + All required parameters must be populated in order to send to Azure. + + :param type: The output destination type. Possible values include: + 'SqlDatabase'. Default value: "SqlDatabase" . + :type type: str or ~azure.mgmt.sql.models.JobStepOutputType + :param subscription_id: The output destination subscription id. + :type subscription_id: str + :param resource_group_name: The output destination resource group. + :type resource_group_name: str + :param server_name: Required. The output destination server name. + :type server_name: str + :param database_name: Required. The output destination database. + :type database_name: str + :param schema_name: The output destination schema. Default value: "dbo" . + :type schema_name: str + :param table_name: Required. The output destination table. + :type table_name: str + :param credential: Required. The resource ID of the credential to use to + connect to the output destination. + :type credential: str + """ + + _validation = { + 'server_name': {'required': True}, + 'database_name': {'required': True}, + 'table_name': {'required': True}, + 'credential': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'credential': {'key': 'credential', 'type': 'str'}, + } + + def __init__(self, *, server_name: str, database_name: str, table_name: str, credential: str, type="SqlDatabase", subscription_id: str=None, resource_group_name: str=None, schema_name: str="dbo", **kwargs) -> None: + super(JobStepOutput, self).__init__(**kwargs) + self.type = type + self.subscription_id = subscription_id + self.resource_group_name = resource_group_name + self.server_name = server_name + self.database_name = database_name + self.schema_name = schema_name + self.table_name = table_name + self.credential = credential + + +class JobTarget(Model): + """A job target, for example a specific database or a container of databases + that is evaluated during job execution. + + All required parameters must be populated in order to send to Azure. + + :param membership_type: Whether the target is included or excluded from + the group. Possible values include: 'Include', 'Exclude'. Default value: + "Include" . + :type membership_type: str or + ~azure.mgmt.sql.models.JobTargetGroupMembershipType + :param type: Required. The target type. Possible values include: + 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + :type type: str or ~azure.mgmt.sql.models.JobTargetType + :param server_name: The target server name. + :type server_name: str + :param database_name: The target database name. + :type database_name: str + :param elastic_pool_name: The target elastic pool name. + :type elastic_pool_name: str + :param shard_map_name: The target shard map. + :type shard_map_name: str + :param refresh_credential: The resource ID of the credential that is used + during job execution to connect to the target and determine the list of + databases inside the target. + :type refresh_credential: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'membership_type': {'key': 'membershipType', 'type': 'JobTargetGroupMembershipType'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'elastic_pool_name': {'key': 'elasticPoolName', 'type': 'str'}, + 'shard_map_name': {'key': 'shardMapName', 'type': 'str'}, + 'refresh_credential': {'key': 'refreshCredential', 'type': 'str'}, + } + + def __init__(self, *, type, membership_type="Include", server_name: str=None, database_name: str=None, elastic_pool_name: str=None, shard_map_name: str=None, refresh_credential: str=None, **kwargs) -> None: + super(JobTarget, self).__init__(**kwargs) + self.membership_type = membership_type + self.type = type + self.server_name = server_name + self.database_name = database_name + self.elastic_pool_name = elastic_pool_name + self.shard_map_name = shard_map_name + self.refresh_credential = refresh_credential + + +class JobTargetGroup(ProxyResource): + """A group of job targets. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param members: Required. Members of the target group. + :type members: list[~azure.mgmt.sql.models.JobTarget] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'members': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'members': {'key': 'properties.members', 'type': '[JobTarget]'}, + } + + def __init__(self, *, members, **kwargs) -> None: + super(JobTargetGroup, self).__init__(**kwargs) + self.members = members + + +class JobVersion(ProxyResource): + """A job version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(JobVersion, self).__init__(**kwargs) + + +class LicenseTypeCapability(Model): + """The license type capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: License type identifier. + :vartype name: str + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(LicenseTypeCapability, self).__init__(**kwargs) + self.name = None + self.status = None + self.reason = reason + + +class LocationCapabilities(Model): + """The location capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The location name. + :vartype name: str + :ivar supported_server_versions: The list of supported server versions. + :vartype supported_server_versions: + list[~azure.mgmt.sql.models.ServerVersionCapability] + :ivar supported_managed_instance_versions: The list of supported managed + instance versions. + :vartype supported_managed_instance_versions: + list[~azure.mgmt.sql.models.ManagedInstanceVersionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_server_versions': {'readonly': True}, + 'supported_managed_instance_versions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_server_versions': {'key': 'supportedServerVersions', 'type': '[ServerVersionCapability]'}, + 'supported_managed_instance_versions': {'key': 'supportedManagedInstanceVersions', 'type': '[ManagedInstanceVersionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(LocationCapabilities, self).__init__(**kwargs) + self.name = None + self.supported_server_versions = None + self.supported_managed_instance_versions = None + self.status = None + self.reason = reason + + +class LogSizeCapability(Model): + """The log size capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The log size limit (see 'unit' for the units). + :vartype limit: int + :ivar unit: The units that the limit is expressed in. Possible values + include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes', 'Percent' + :vartype unit: str or ~azure.mgmt.sql.models.LogSizeUnit + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'int'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(LogSizeCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + + +class LongTermRetentionBackup(ProxyResource): + """A long term retention backup. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar server_name: The server name that the backup database belong to. + :vartype server_name: str + :ivar server_create_time: The create time of the server. + :vartype server_create_time: datetime + :ivar database_name: The name of the database the backup belong to + :vartype database_name: str + :ivar database_deletion_time: The delete time of the database + :vartype database_deletion_time: datetime + :ivar backup_time: The time the backup was taken + :vartype backup_time: datetime + :ivar backup_expiration_time: The time the long term retention backup will + expire. + :vartype backup_expiration_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'server_name': {'readonly': True}, + 'server_create_time': {'readonly': True}, + 'database_name': {'readonly': True}, + 'database_deletion_time': {'readonly': True}, + 'backup_time': {'readonly': True}, + 'backup_expiration_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'server_create_time': {'key': 'properties.serverCreateTime', 'type': 'iso-8601'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'database_deletion_time': {'key': 'properties.databaseDeletionTime', 'type': 'iso-8601'}, + 'backup_time': {'key': 'properties.backupTime', 'type': 'iso-8601'}, + 'backup_expiration_time': {'key': 'properties.backupExpirationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(LongTermRetentionBackup, self).__init__(**kwargs) + self.server_name = None + self.server_create_time = None + self.database_name = None + self.database_deletion_time = None + self.backup_time = None + self.backup_expiration_time = None + + +class ManagedBackupShortTermRetentionPolicy(ProxyResource): + """A short term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param retention_days: The backup retention period in days. This is how + many days Point-in-Time Restore will be supported. + :type retention_days: int + """ + + _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'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + } + + def __init__(self, *, retention_days: int=None, **kwargs) -> None: + super(ManagedBackupShortTermRetentionPolicy, self).__init__(**kwargs) + self.retention_days = retention_days + + +class ManagedDatabase(TrackedResource): + """A managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param collation: Collation of the managed database. + :type collation: str + :ivar status: Status of the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' + :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus + :ivar creation_date: Creation date of the database. + :vartype creation_date: datetime + :ivar earliest_restore_point: Earliest restore point in time for point in + time restore. + :vartype earliest_restore_point: datetime + :param restore_point_in_time: Conditional. If createMode is + PointInTimeRestore, this value is required. Specifies the point in time + (ISO8601 format) of the source database that will be restored to create + the new database. + :type restore_point_in_time: datetime + :ivar default_secondary_location: Geo paired region. + :vartype default_secondary_location: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param create_mode: Managed database create mode. PointInTimeRestore: + Create a database by restoring a point in time backup of an existing + database. SourceDatabaseName, SourceManagedInstanceName and PointInTime + must be specified. RestoreExternalBackup: Create a database by restoring + from external backup files. Collation, StorageContainerUri and + StorageContainerSasToken must be specified. Recovery: Creates a database + by restoring a geo-replicated backup. RecoverableDatabaseId must be + specified as the recoverable database resource ID to restore. Possible + values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', + 'Recovery' + :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode + :param storage_container_uri: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the uri of the + storage container where backups for this restore are stored. + :type storage_container_uri: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :param restorable_dropped_database_id: The restorable dropped database + resource id to restore when creating this database. + :type restorable_dropped_database_id: str + :param storage_container_sas_token: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the storage + container sas token. + :type storage_container_sas_token: str + :ivar failover_group_id: Instance Failover Group resource identifier that + this managed database belongs to. + :vartype failover_group_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'status': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'earliest_restore_point': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, restorable_dropped_database_id: str=None, storage_container_sas_token: str=None, recoverable_database_id: str=None, **kwargs) -> None: + super(ManagedDatabase, self).__init__(location=location, tags=tags, **kwargs) + self.collation = collation + self.status = None + self.creation_date = None + self.earliest_restore_point = None + self.restore_point_in_time = restore_point_in_time + self.default_secondary_location = None + self.catalog_collation = catalog_collation + self.create_mode = create_mode + self.storage_container_uri = storage_container_uri + self.source_database_id = source_database_id + self.restorable_dropped_database_id = restorable_dropped_database_id + self.storage_container_sas_token = storage_container_sas_token + self.failover_group_id = None + self.recoverable_database_id = recoverable_database_id + + +class ManagedDatabaseSecurityAlertPolicy(ProxyResource): + """A managed database security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: + super(ManagedDatabaseSecurityAlertPolicy, self).__init__(**kwargs) + self.state = state + self.disabled_alerts = disabled_alerts + self.email_addresses = email_addresses + self.email_account_admins = email_account_admins + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.creation_time = None + + +class ManagedDatabaseUpdate(Model): + """An managed database update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param collation: Collation of the managed database. + :type collation: str + :ivar status: Status of the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' + :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus + :ivar creation_date: Creation date of the database. + :vartype creation_date: datetime + :ivar earliest_restore_point: Earliest restore point in time for point in + time restore. + :vartype earliest_restore_point: datetime + :param restore_point_in_time: Conditional. If createMode is + PointInTimeRestore, this value is required. Specifies the point in time + (ISO8601 format) of the source database that will be restored to create + the new database. + :type restore_point_in_time: datetime + :ivar default_secondary_location: Geo paired region. + :vartype default_secondary_location: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param create_mode: Managed database create mode. PointInTimeRestore: + Create a database by restoring a point in time backup of an existing + database. SourceDatabaseName, SourceManagedInstanceName and PointInTime + must be specified. RestoreExternalBackup: Create a database by restoring + from external backup files. Collation, StorageContainerUri and + StorageContainerSasToken must be specified. Recovery: Creates a database + by restoring a geo-replicated backup. RecoverableDatabaseId must be + specified as the recoverable database resource ID to restore. Possible + values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', + 'Recovery' + :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode + :param storage_container_uri: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the uri of the + storage container where backups for this restore are stored. + :type storage_container_uri: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :param restorable_dropped_database_id: The restorable dropped database + resource id to restore when creating this database. + :type restorable_dropped_database_id: str + :param storage_container_sas_token: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the storage + container sas token. + :type storage_container_sas_token: str + :ivar failover_group_id: Instance Failover Group resource identifier that + this managed database belongs to. + :vartype failover_group_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'status': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'earliest_restore_point': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + } + + _attribute_map = { + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, restorable_dropped_database_id: str=None, storage_container_sas_token: str=None, recoverable_database_id: str=None, tags=None, **kwargs) -> None: + super(ManagedDatabaseUpdate, self).__init__(**kwargs) + self.collation = collation + self.status = None + self.creation_date = None + self.earliest_restore_point = None + self.restore_point_in_time = restore_point_in_time + self.default_secondary_location = None + self.catalog_collation = catalog_collation + self.create_mode = create_mode + self.storage_container_uri = storage_container_uri + self.source_database_id = source_database_id + self.restorable_dropped_database_id = restorable_dropped_database_id + self.storage_container_sas_token = storage_container_sas_token + self.failover_group_id = None + self.recoverable_database_id = recoverable_database_id + self.tags = tags + + +class ManagedInstance(TrackedResource): + """An Azure SQL managed instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param identity: The Azure Active Directory identity of the managed + instance. + :type identity: ~azure.mgmt.sql.models.ResourceIdentity + :param sku: Managed instance SKU. Allowed values for sku.name: GP_Gen4, + GP_Gen5, BC_Gen4, BC_Gen5 + :type sku: ~azure.mgmt.sql.models.Sku + :param managed_instance_create_mode: Specifies the mode of database + creation. + Default: Regular instance creation. + Restore: Creates an instance by restoring a set of backups to specific + point in time. RestorePointInTime and SourceManagedInstanceId must be + specified. Possible values include: 'Default', 'PointInTimeRestore' + :type managed_instance_create_mode: str or + ~azure.mgmt.sql.models.ManagedServerCreateMode + :ivar fully_qualified_domain_name: The fully qualified domain name of the + managed instance. + :vartype fully_qualified_domain_name: str + :param administrator_login: Administrator username for the managed + instance. Can only be specified when the managed instance is being created + (and is required for creation). + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for managed instance creation). + :type administrator_login_password: str + :param subnet_id: Subnet resource ID for the managed instance. + :type subnet_id: str + :ivar state: The state of the managed instance. + :vartype state: str + :param license_type: The license type. Possible values are + 'LicenseIncluded' (regular price inclusive of a new SQL license) and + 'BasePrice' (discounted AHB price for bringing your own SQL licenses). + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or + ~azure.mgmt.sql.models.ManagedInstanceLicenseType + :param v_cores: The number of vCores. Allowed values: 8, 16, 24, 32, 40, + 64, 80. + :type v_cores: int + :param storage_size_in_gb: Storage size in GB. Minimum value: 32. Maximum + value: 8192. Increments of 32 GB allowed only. + :type storage_size_in_gb: int + :param collation: Collation of the managed instance. + :type collation: str + :ivar dns_zone: The Dns Zone that the managed instance is in. + :vartype dns_zone: str + :param dns_zone_partner: The resource id of another managed instance whose + DNS zone this managed instance will share after creation. + :type dns_zone_partner: str + :param public_data_endpoint_enabled: Whether or not the public data + endpoint is enabled. + :type public_data_endpoint_enabled: bool + :param source_managed_instance_id: The resource identifier of the source + managed instance associated with create operation of this instance. + :type source_managed_instance_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param proxy_override: Connection type used for connecting to the + instance. Possible values include: 'Proxy', 'Redirect', 'Default' + :type proxy_override: str or + ~azure.mgmt.sql.models.ManagedInstanceProxyOverride + :param timezone_id: Id of the timezone. Allowed values are timezones + supported by Windows. + Windows keeps details on supported timezones, including the id, in + registry under + KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time + Zones. + You can get those registry values via SQL Server by querying SELECT name + AS timezone_id FROM sys.time_zone_info. + List of Ids can also be obtained by executing + [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + An example of valid timezone id is "Pacific Standard Time" or "W. Europe + Standard Time". + :type timezone_id: str + :param instance_pool_id: The Id of the instance pool this managed server + belongs to. + :type instance_pool_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'fully_qualified_domain_name': {'readonly': True}, + 'state': {'readonly': True}, + 'dns_zone': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, + 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, + 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, + 'source_managed_instance_id': {'key': 'properties.sourceManagedInstanceId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, + 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, + 'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, identity=None, sku=None, managed_instance_create_mode=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type=None, v_cores: int=None, storage_size_in_gb: int=None, collation: str=None, dns_zone_partner: str=None, public_data_endpoint_enabled: bool=None, source_managed_instance_id: str=None, restore_point_in_time=None, proxy_override=None, timezone_id: str=None, instance_pool_id: str=None, **kwargs) -> None: + super(ManagedInstance, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity + self.sku = sku + self.managed_instance_create_mode = managed_instance_create_mode + self.fully_qualified_domain_name = None + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.subnet_id = subnet_id + self.state = None + self.license_type = license_type + self.v_cores = v_cores + self.storage_size_in_gb = storage_size_in_gb + self.collation = collation + self.dns_zone = None + self.dns_zone_partner = dns_zone_partner + self.public_data_endpoint_enabled = public_data_endpoint_enabled + self.source_managed_instance_id = source_managed_instance_id + self.restore_point_in_time = restore_point_in_time + self.proxy_override = proxy_override + self.timezone_id = timezone_id + self.instance_pool_id = instance_pool_id + + +class ManagedInstanceEditionCapability(Model): + """The managed server capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The managed server version name. + :vartype name: str + :ivar supported_families: The supported families. + :vartype supported_families: + list[~azure.mgmt.sql.models.ManagedInstanceFamilyCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_families': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_families': {'key': 'supportedFamilies', 'type': '[ManagedInstanceFamilyCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ManagedInstanceEditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_families = None + self.status = None + self.reason = reason + + +class ManagedInstanceEncryptionProtector(ProxyResource): + """The managed instance encryption protector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :vartype kind: str + :param server_key_name: The name of the managed instance key. + :type server_key_name: str + :param server_key_type: Required. The encryption protector type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :ivar uri: The URI of the server key. + :vartype uri: str + :ivar thumbprint: Thumbprint of the server key. + :vartype thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'server_key_type': {'required': True}, + 'uri': {'readonly': True}, + 'thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, *, server_key_type, server_key_name: str=None, **kwargs) -> None: + super(ManagedInstanceEncryptionProtector, self).__init__(**kwargs) + self.kind = None + self.server_key_name = server_key_name + self.server_key_type = server_key_type + self.uri = None + self.thumbprint = None + + +class ManagedInstanceFamilyCapability(Model): + """The managed server family capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Family name. + :vartype name: str + :ivar sku: SKU name. + :vartype sku: str + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar supported_vcores_values: List of supported virtual cores values. + :vartype supported_vcores_values: + list[~azure.mgmt.sql.models.ManagedInstanceVcoresCapability] + :ivar included_max_size: Included size. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar supported_storage_sizes: Storage size ranges. + :vartype supported_storage_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'supported_vcores_values': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'supported_storage_sizes': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'supported_vcores_values': {'key': 'supportedVcoresValues', 'type': '[ManagedInstanceVcoresCapability]'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'supported_storage_sizes': {'key': 'supportedStorageSizes', 'type': '[MaxSizeRangeCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ManagedInstanceFamilyCapability, self).__init__(**kwargs) + self.name = None + self.sku = None + self.supported_license_types = None + self.supported_vcores_values = None + self.included_max_size = None + self.supported_storage_sizes = None + self.status = None + self.reason = reason + + +class ManagedInstanceKey(ProxyResource): + """A managed instance key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :vartype kind: str + :param server_key_type: Required. The key type like 'ServiceManaged', + 'AzureKeyVault'. Possible values include: 'ServiceManaged', + 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :param uri: The URI of the key. If the ServerKeyType is AzureKeyVault, + then the URI is required. + :type uri: str + :ivar thumbprint: Thumbprint of the key. + :vartype thumbprint: str + :ivar creation_date: The key creation date. + :vartype creation_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'server_key_type': {'required': True}, + 'thumbprint': {'readonly': True}, + 'creation_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, server_key_type, uri: str=None, **kwargs) -> None: + super(ManagedInstanceKey, self).__init__(**kwargs) + self.kind = None + self.server_key_type = server_key_type + self.uri = uri + self.thumbprint = None + self.creation_date = None + + +class ManagedInstancePairInfo(Model): + """Pairs of Managed Instances in the failover group. + + :param primary_managed_instance_id: Id of Primary Managed Instance in + pair. + :type primary_managed_instance_id: str + :param partner_managed_instance_id: Id of Partner Managed Instance in + pair. + :type partner_managed_instance_id: str + """ + + _attribute_map = { + 'primary_managed_instance_id': {'key': 'primaryManagedInstanceId', 'type': 'str'}, + 'partner_managed_instance_id': {'key': 'partnerManagedInstanceId', 'type': 'str'}, + } + + def __init__(self, *, primary_managed_instance_id: str=None, partner_managed_instance_id: str=None, **kwargs) -> None: + super(ManagedInstancePairInfo, self).__init__(**kwargs) + self.primary_managed_instance_id = primary_managed_instance_id + self.partner_managed_instance_id = partner_managed_instance_id + + +class ManagedInstanceUpdate(Model): + """An update request for an Azure SQL Database managed instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param sku: Managed instance sku + :type sku: ~azure.mgmt.sql.models.Sku + :param managed_instance_create_mode: Specifies the mode of database + creation. + Default: Regular instance creation. + Restore: Creates an instance by restoring a set of backups to specific + point in time. RestorePointInTime and SourceManagedInstanceId must be + specified. Possible values include: 'Default', 'PointInTimeRestore' + :type managed_instance_create_mode: str or + ~azure.mgmt.sql.models.ManagedServerCreateMode + :ivar fully_qualified_domain_name: The fully qualified domain name of the + managed instance. + :vartype fully_qualified_domain_name: str + :param administrator_login: Administrator username for the managed + instance. Can only be specified when the managed instance is being created + (and is required for creation). + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for managed instance creation). + :type administrator_login_password: str + :param subnet_id: Subnet resource ID for the managed instance. + :type subnet_id: str + :ivar state: The state of the managed instance. + :vartype state: str + :param license_type: The license type. Possible values are + 'LicenseIncluded' (regular price inclusive of a new SQL license) and + 'BasePrice' (discounted AHB price for bringing your own SQL licenses). + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or + ~azure.mgmt.sql.models.ManagedInstanceLicenseType + :param v_cores: The number of vCores. Allowed values: 8, 16, 24, 32, 40, + 64, 80. + :type v_cores: int + :param storage_size_in_gb: Storage size in GB. Minimum value: 32. Maximum + value: 8192. Increments of 32 GB allowed only. + :type storage_size_in_gb: int + :param collation: Collation of the managed instance. + :type collation: str + :ivar dns_zone: The Dns Zone that the managed instance is in. + :vartype dns_zone: str + :param dns_zone_partner: The resource id of another managed instance whose + DNS zone this managed instance will share after creation. + :type dns_zone_partner: str + :param public_data_endpoint_enabled: Whether or not the public data + endpoint is enabled. + :type public_data_endpoint_enabled: bool + :param source_managed_instance_id: The resource identifier of the source + managed instance associated with create operation of this instance. + :type source_managed_instance_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param proxy_override: Connection type used for connecting to the + instance. Possible values include: 'Proxy', 'Redirect', 'Default' + :type proxy_override: str or + ~azure.mgmt.sql.models.ManagedInstanceProxyOverride + :param timezone_id: Id of the timezone. Allowed values are timezones + supported by Windows. + Windows keeps details on supported timezones, including the id, in + registry under + KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time + Zones. + You can get those registry values via SQL Server by querying SELECT name + AS timezone_id FROM sys.time_zone_info. + List of Ids can also be obtained by executing + [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + An example of valid timezone id is "Pacific Standard Time" or "W. Europe + Standard Time". + :type timezone_id: str + :param instance_pool_id: The Id of the instance pool this managed server + belongs to. + :type instance_pool_id: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'fully_qualified_domain_name': {'readonly': True}, + 'state': {'readonly': True}, + 'dns_zone': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, + 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, + 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, + 'source_managed_instance_id': {'key': 'properties.sourceManagedInstanceId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, + 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, + 'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, sku=None, managed_instance_create_mode=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type=None, v_cores: int=None, storage_size_in_gb: int=None, collation: str=None, dns_zone_partner: str=None, public_data_endpoint_enabled: bool=None, source_managed_instance_id: str=None, restore_point_in_time=None, proxy_override=None, timezone_id: str=None, instance_pool_id: str=None, tags=None, **kwargs) -> None: + super(ManagedInstanceUpdate, self).__init__(**kwargs) + self.sku = sku + self.managed_instance_create_mode = managed_instance_create_mode + self.fully_qualified_domain_name = None + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.subnet_id = subnet_id + self.state = None + self.license_type = license_type + self.v_cores = v_cores + self.storage_size_in_gb = storage_size_in_gb + self.collation = collation + self.dns_zone = None + self.dns_zone_partner = dns_zone_partner + self.public_data_endpoint_enabled = public_data_endpoint_enabled + self.source_managed_instance_id = source_managed_instance_id + self.restore_point_in_time = restore_point_in_time + self.proxy_override = proxy_override + self.timezone_id = timezone_id + self.instance_pool_id = instance_pool_id + self.tags = tags + + +class ManagedInstanceVcoresCapability(Model): + """The managed instance virtual cores capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The virtual cores identifier. + :vartype name: str + :ivar value: The virtual cores value. + :vartype value: int + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'int'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ManagedInstanceVcoresCapability, self).__init__(**kwargs) + self.name = None + self.value = None + self.status = None + self.reason = reason + + +class ManagedInstanceVersionCapability(Model): + """The managed instance capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The server version name. + :vartype name: str + :ivar supported_editions: The list of supported managed instance editions. + :vartype supported_editions: + list[~azure.mgmt.sql.models.ManagedInstanceEditionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_editions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_editions': {'key': 'supportedEditions', 'type': '[ManagedInstanceEditionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ManagedInstanceVersionCapability, self).__init__(**kwargs) + self.name = None + self.supported_editions = None + self.status = None + self.reason = reason + + +class ManagedInstanceVulnerabilityAssessment(ProxyResource): + """A managed instance vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: Required. A blob storage container path to + hold the scan results (e.g. + https://myStorage.blob.core.windows.net/VaScans/). + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_container_path': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, *, storage_container_path: str, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: + super(ManagedInstanceVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = storage_container_path + self.storage_container_sas_key = storage_container_sas_key + self.storage_account_access_key = storage_account_access_key + self.recurring_scans = recurring_scans + + +class ManagedServerSecurityAlertPolicy(ProxyResource): + """A managed server security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: + super(ManagedServerSecurityAlertPolicy, self).__init__(**kwargs) + self.state = state + self.disabled_alerts = disabled_alerts + self.email_addresses = email_addresses + self.email_account_admins = email_account_admins + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.creation_time = None + + +class MaxSizeCapability(Model): + """The maximum size capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The maximum size limit (see 'unit' for the units). + :vartype limit: int + :ivar unit: The units that the limit is expressed in. Possible values + include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' + :vartype unit: str or ~azure.mgmt.sql.models.MaxSizeUnit + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'int'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MaxSizeCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + + +class MaxSizeRangeCapability(Model): + """The maximum size range capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar min_value: Minimum value. + :vartype min_value: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar max_value: Maximum value. + :vartype max_value: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar scale_size: Scale/step size for discrete values between the minimum + value and the maximum value. + :vartype scale_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar log_size: Size of transaction log. + :vartype log_size: ~azure.mgmt.sql.models.LogSizeCapability + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'min_value': {'readonly': True}, + 'max_value': {'readonly': True}, + 'scale_size': {'readonly': True}, + 'log_size': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'min_value': {'key': 'minValue', 'type': 'MaxSizeCapability'}, + 'max_value': {'key': 'maxValue', 'type': 'MaxSizeCapability'}, + 'scale_size': {'key': 'scaleSize', 'type': 'MaxSizeCapability'}, + 'log_size': {'key': 'logSize', 'type': 'LogSizeCapability'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(MaxSizeRangeCapability, self).__init__(**kwargs) + self.min_value = None + self.max_value = None + self.scale_size = None + self.log_size = None + self.status = None + self.reason = reason + + +class Metric(Model): + """Database metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar start_time: The start time for the metric (ISO-8601 format). + :vartype start_time: datetime + :ivar end_time: The end time for the metric (ISO-8601 format). + :vartype end_time: datetime + :ivar time_grain: The time step to be used to summarize the metric values. + :vartype time_grain: str + :ivar unit: The unit of the metric. Possible values include: 'count', + 'bytes', 'seconds', 'percent', 'countPerSecond', 'bytesPerSecond' + :vartype unit: str or ~azure.mgmt.sql.models.UnitType + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.sql.models.MetricName + :ivar metric_values: The metric values for the specified time window and + timestep. + :vartype metric_values: list[~azure.mgmt.sql.models.MetricValue] + """ + + _validation = { + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'time_grain': {'readonly': True}, + 'unit': {'readonly': True}, + 'name': {'readonly': True}, + 'metric_values': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'MetricName'}, + 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, + } + + def __init__(self, **kwargs) -> None: + super(Metric, self).__init__(**kwargs) + self.start_time = None + self.end_time = None + self.time_grain = None + self.unit = None + self.name = None + self.metric_values = None + + +class MetricAvailability(Model): + """A metric availability value. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar retention: The length of retention for the database metric. + :vartype retention: str + :ivar time_grain: The granularity of the database metric. + :vartype time_grain: str + """ + + _validation = { + 'retention': {'readonly': True}, + 'time_grain': {'readonly': True}, + } + + _attribute_map = { + 'retention': {'key': 'retention', 'type': 'str'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MetricAvailability, self).__init__(**kwargs) + self.retention = None + self.time_grain = None + + +class MetricDefinition(Model): + """A database metric definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.sql.models.MetricName + :ivar primary_aggregation_type: The primary aggregation type defining how + metric values are displayed. Possible values include: 'None', 'Average', + 'Count', 'Minimum', 'Maximum', 'Total' + :vartype primary_aggregation_type: str or + ~azure.mgmt.sql.models.PrimaryAggregationType + :ivar resource_uri: The resource uri of the database. + :vartype resource_uri: str + :ivar unit: The unit of the metric. Possible values include: 'Count', + 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' + :vartype unit: str or ~azure.mgmt.sql.models.UnitDefinitionType + :ivar metric_availabilities: The list of database metric availabilities + for the metric. + :vartype metric_availabilities: + list[~azure.mgmt.sql.models.MetricAvailability] + """ + + _validation = { + 'name': {'readonly': True}, + 'primary_aggregation_type': {'readonly': True}, + 'resource_uri': {'readonly': True}, + 'unit': {'readonly': True}, + 'metric_availabilities': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'MetricName'}, + 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, + } + + def __init__(self, **kwargs) -> None: + super(MetricDefinition, self).__init__(**kwargs) + self.name = None + self.primary_aggregation_type = None + self.resource_uri = None + self.unit = None + self.metric_availabilities = None + + +class MetricName(Model): + """A database metric name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The name of the database metric. + :vartype value: str + :ivar localized_value: The friendly name of the database metric. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MetricName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class MetricValue(Model): + """Represents database metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar count: The number of values for the metric. + :vartype count: float + :ivar average: The average value of the metric. + :vartype average: float + :ivar maximum: The max value of the metric. + :vartype maximum: float + :ivar minimum: The min value of the metric. + :vartype minimum: float + :ivar timestamp: The metric timestamp (ISO-8601 format). + :vartype timestamp: datetime + :ivar total: The total value of the metric. + :vartype total: float + """ + + _validation = { + 'count': {'readonly': True}, + 'average': {'readonly': True}, + 'maximum': {'readonly': True}, + 'minimum': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'total': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'float'}, + 'average': {'key': 'average', 'type': 'float'}, + 'maximum': {'key': 'maximum', 'type': 'float'}, + 'minimum': {'key': 'minimum', 'type': 'float'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'total': {'key': 'total', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(MetricValue, self).__init__(**kwargs) + self.count = None + self.average = None + self.maximum = None + self.minimum = None + self.timestamp = None + self.total = None + + +class Name(Model): + """ARM Usage Name. + + :param value: Usage name value + :type value: str + :param localized_value: Usage name localized value. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: + super(Name, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class Operation(Model): + """SQL REST API operation definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the operation being performed on this particular + object. + :vartype name: str + :ivar display: The localized display information for this particular + operation / action. + :vartype display: ~azure.mgmt.sql.models.OperationDisplay + :ivar origin: The intended executor of the operation. Possible values + include: 'user', 'system' + :vartype origin: str or ~azure.mgmt.sql.models.OperationOrigin + :ivar properties: Additional descriptions for the operation. + :vartype properties: dict[str, object] + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + 'origin': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + } + + def __init__(self, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + self.origin = None + self.properties = None + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The localized friendly form of the resource provider name. + :vartype provider: str + :ivar resource: The localized friendly form of the resource type related + to this action/operation. + :vartype resource: str + :ivar operation: The localized friendly name for the operation. + :vartype operation: str + :ivar description: The localized friendly description for the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class OperationImpact(Model): + """The impact of an operation, both in absolute and relative terms. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the impact dimension. + :vartype name: str + :ivar unit: The unit in which estimated impact to dimension is measured. + :vartype unit: str + :ivar change_value_absolute: The absolute impact to dimension. + :vartype change_value_absolute: float + :ivar change_value_relative: The relative impact to dimension (null if not + applicable) + :vartype change_value_relative: float + """ + + _validation = { + 'name': {'readonly': True}, + 'unit': {'readonly': True}, + 'change_value_absolute': {'readonly': True}, + 'change_value_relative': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'change_value_absolute': {'key': 'changeValueAbsolute', 'type': 'float'}, + 'change_value_relative': {'key': 'changeValueRelative', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationImpact, self).__init__(**kwargs) + self.name = None + self.unit = None + self.change_value_absolute = None + self.change_value_relative = None + + +class PartnerInfo(Model): + """Partner server information for the failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource identifier of the partner server. + :type id: str + :ivar location: Geo location of the partner server. + :vartype location: str + :ivar replication_role: Replication role of the partner server. Possible + values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.FailoverGroupReplicationRole + """ + + _validation = { + 'id': {'required': True}, + 'location': {'readonly': True}, + 'replication_role': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'replication_role': {'key': 'replicationRole', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(PartnerInfo, self).__init__(**kwargs) + self.id = id + self.location = None + self.replication_role = None + + +class PartnerRegionInfo(Model): + """Partner region information for the failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param location: Geo location of the partner managed instances. + :type location: str + :ivar replication_role: Replication role of the partner managed instances. + Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole + """ + + _validation = { + 'replication_role': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'replication_role': {'key': 'replicationRole', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, **kwargs) -> None: + super(PartnerRegionInfo, self).__init__(**kwargs) + self.location = location + self.replication_role = None + + +class PerformanceLevelCapability(Model): + """The performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: Performance level value. + :vartype value: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + """ + + _validation = { + 'value': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(PerformanceLevelCapability, self).__init__(**kwargs) + self.value = None + self.unit = None + + +class RecommendedElasticPool(ProxyResource): + """Represents a recommended elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_edition: The edition of the recommended elastic pool. The + ElasticPoolEdition enumeration contains all the valid editions. Possible + values include: 'Basic', 'Standard', 'Premium', 'GeneralPurpose', + 'BusinessCritical' + :vartype database_edition: str or + ~azure.mgmt.sql.models.ElasticPoolEdition + :param dtu: The DTU for the recommended elastic pool. + :type dtu: float + :param database_dtu_min: The minimum DTU for the database. + :type database_dtu_min: float + :param database_dtu_max: The maximum DTU for the database. + :type database_dtu_max: float + :param storage_mb: Gets storage size in megabytes. + :type storage_mb: float + :ivar observation_period_start: The observation period start (ISO8601 + format). + :vartype observation_period_start: datetime + :ivar observation_period_end: The observation period start (ISO8601 + format). + :vartype observation_period_end: datetime + :ivar max_observed_dtu: Gets maximum observed DTU. + :vartype max_observed_dtu: float + :ivar max_observed_storage_mb: Gets maximum observed storage in megabytes. + :vartype max_observed_storage_mb: float + :ivar databases: The list of databases in this pool. Expanded property + :vartype databases: list[~azure.mgmt.sql.models.TrackedResource] + :ivar metrics: The list of databases housed in the server. Expanded + property + :vartype metrics: + list[~azure.mgmt.sql.models.RecommendedElasticPoolMetric] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_edition': {'readonly': True}, + 'observation_period_start': {'readonly': True}, + 'observation_period_end': {'readonly': True}, + 'max_observed_dtu': {'readonly': True}, + 'max_observed_storage_mb': {'readonly': True}, + 'databases': {'readonly': True}, + 'metrics': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'dtu': {'key': 'properties.dtu', 'type': 'float'}, + 'database_dtu_min': {'key': 'properties.databaseDtuMin', 'type': 'float'}, + 'database_dtu_max': {'key': 'properties.databaseDtuMax', 'type': 'float'}, + 'storage_mb': {'key': 'properties.storageMB', 'type': 'float'}, + 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, + 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, + 'max_observed_dtu': {'key': 'properties.maxObservedDtu', 'type': 'float'}, + 'max_observed_storage_mb': {'key': 'properties.maxObservedStorageMB', 'type': 'float'}, + 'databases': {'key': 'properties.databases', 'type': '[TrackedResource]'}, + 'metrics': {'key': 'properties.metrics', 'type': '[RecommendedElasticPoolMetric]'}, + } + + def __init__(self, *, dtu: float=None, database_dtu_min: float=None, database_dtu_max: float=None, storage_mb: float=None, **kwargs) -> None: + super(RecommendedElasticPool, self).__init__(**kwargs) + self.database_edition = None + self.dtu = dtu + self.database_dtu_min = database_dtu_min + self.database_dtu_max = database_dtu_max + self.storage_mb = storage_mb + self.observation_period_start = None + self.observation_period_end = None + self.max_observed_dtu = None + self.max_observed_storage_mb = None + self.databases = None + self.metrics = None + + +class RecommendedElasticPoolMetric(Model): + """Represents recommended elastic pool metric. + + :param date_time_property: The time of metric (ISO8601 format). + :type date_time_property: datetime + :param dtu: Gets or sets the DTUs (Database Transaction Units). See + https://azure.microsoft.com/documentation/articles/sql-database-what-is-a-dtu/ + :type dtu: float + :param size_gb: Gets or sets size in gigabytes. + :type size_gb: float + """ + + _attribute_map = { + 'date_time_property': {'key': 'dateTime', 'type': 'iso-8601'}, + 'dtu': {'key': 'dtu', 'type': 'float'}, + 'size_gb': {'key': 'sizeGB', 'type': 'float'}, + } + + def __init__(self, *, date_time_property=None, dtu: float=None, size_gb: float=None, **kwargs) -> None: + super(RecommendedElasticPoolMetric, self).__init__(**kwargs) + self.date_time_property = date_time_property + self.dtu = dtu + self.size_gb = size_gb + + +class RecommendedIndex(ProxyResource): + """Represents a database recommended index. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar action: The proposed index action. You can create a missing index, + drop an unused index, or rebuild an existing index to improve its + performance. Possible values include: 'Create', 'Drop', 'Rebuild' + :vartype action: str or ~azure.mgmt.sql.models.RecommendedIndexAction + :ivar state: The current recommendation state. Possible values include: + 'Active', 'Pending', 'Executing', 'Verifying', 'Pending Revert', + 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success' + :vartype state: str or ~azure.mgmt.sql.models.RecommendedIndexState + :ivar created: The UTC datetime showing when this resource was created + (ISO8601 format). + :vartype created: datetime + :ivar last_modified: The UTC datetime of when was this resource last + changed (ISO8601 format). + :vartype last_modified: datetime + :ivar index_type: The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, + CLUSTERED COLUMNSTORE). Possible values include: 'CLUSTERED', + 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED COLUMNSTORE' + :vartype index_type: str or ~azure.mgmt.sql.models.RecommendedIndexType + :ivar schema: The schema where table to build index over resides + :vartype schema: str + :ivar table: The table on which to build index. + :vartype table: str + :ivar columns: Columns over which to build index + :vartype columns: list[str] + :ivar included_columns: The list of column names to be included in the + index + :vartype included_columns: list[str] + :ivar index_script: The full build index script + :vartype index_script: str + :ivar estimated_impact: The estimated impact of doing recommended index + action. + :vartype estimated_impact: list[~azure.mgmt.sql.models.OperationImpact] + :ivar reported_impact: The values reported after index action is complete. + :vartype reported_impact: list[~azure.mgmt.sql.models.OperationImpact] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'action': {'readonly': True}, + 'state': {'readonly': True}, + 'created': {'readonly': True}, + 'last_modified': {'readonly': True}, + 'index_type': {'readonly': True}, + 'schema': {'readonly': True}, + 'table': {'readonly': True}, + 'columns': {'readonly': True}, + 'included_columns': {'readonly': True}, + 'index_script': {'readonly': True}, + 'estimated_impact': {'readonly': True}, + 'reported_impact': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'action': {'key': 'properties.action', 'type': 'RecommendedIndexAction'}, + 'state': {'key': 'properties.state', 'type': 'RecommendedIndexState'}, + 'created': {'key': 'properties.created', 'type': 'iso-8601'}, + 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, + 'index_type': {'key': 'properties.indexType', 'type': 'RecommendedIndexType'}, + 'schema': {'key': 'properties.schema', 'type': 'str'}, + 'table': {'key': 'properties.table', 'type': 'str'}, + 'columns': {'key': 'properties.columns', 'type': '[str]'}, + 'included_columns': {'key': 'properties.includedColumns', 'type': '[str]'}, + 'index_script': {'key': 'properties.indexScript', 'type': 'str'}, + 'estimated_impact': {'key': 'properties.estimatedImpact', 'type': '[OperationImpact]'}, + 'reported_impact': {'key': 'properties.reportedImpact', 'type': '[OperationImpact]'}, + } + + def __init__(self, **kwargs) -> None: + super(RecommendedIndex, self).__init__(**kwargs) + self.action = None + self.state = None + self.created = None + self.last_modified = None + self.index_type = None + self.schema = None + self.table = None + self.columns = None + self.included_columns = None + self.index_script = None + self.estimated_impact = None + self.reported_impact = None + + +class RecoverableDatabase(ProxyResource): + """A recoverable database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar edition: The edition of the database + :vartype edition: str + :ivar service_level_objective: The service level objective name of the + database + :vartype service_level_objective: str + :ivar elastic_pool_name: The elastic pool name of the database + :vartype elastic_pool_name: str + :ivar last_available_backup_date: The last available backup date of the + database (ISO8601 format) + :vartype last_available_backup_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'edition': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'last_available_backup_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(RecoverableDatabase, self).__init__(**kwargs) + self.edition = None + self.service_level_objective = None + self.elastic_pool_name = None + self.last_available_backup_date = None + + +class RecoverableManagedDatabase(ProxyResource): + """A recoverable managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar last_available_backup_date: The last available backup date. + :vartype last_available_backup_date: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_available_backup_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(RecoverableManagedDatabase, self).__init__(**kwargs) + self.last_available_backup_date = None + + +class ReplicationLink(ProxyResource): + """Represents a database replication link. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Location of the server that contains this firewall rule. + :vartype location: str + :ivar is_termination_allowed: Legacy value indicating whether termination + is allowed. Currently always returns true. + :vartype is_termination_allowed: bool + :ivar replication_mode: Replication mode of this replication link. + :vartype replication_mode: str + :ivar partner_server: The name of the server hosting the partner database. + :vartype partner_server: str + :ivar partner_database: The name of the partner database. + :vartype partner_database: str + :ivar partner_location: The Azure Region of the partner database. + :vartype partner_location: str + :ivar role: The role of the database in the replication link. Possible + values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', + 'Copy' + :vartype role: str or ~azure.mgmt.sql.models.ReplicationRole + :ivar partner_role: The role of the partner database in the replication + link. Possible values include: 'Primary', 'Secondary', + 'NonReadableSecondary', 'Source', 'Copy' + :vartype partner_role: str or ~azure.mgmt.sql.models.ReplicationRole + :ivar start_time: The start time for the replication link. + :vartype start_time: datetime + :ivar percent_complete: The percentage of seeding complete for the + replication link. + :vartype percent_complete: int + :ivar replication_state: The replication state for the replication link. + Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP', 'SUSPENDED' + :vartype replication_state: str or ~azure.mgmt.sql.models.ReplicationState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'is_termination_allowed': {'readonly': True}, + 'replication_mode': {'readonly': True}, + 'partner_server': {'readonly': True}, + 'partner_database': {'readonly': True}, + 'partner_location': {'readonly': True}, + 'role': {'readonly': True}, + 'partner_role': {'readonly': True}, + 'start_time': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'replication_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'is_termination_allowed': {'key': 'properties.isTerminationAllowed', 'type': 'bool'}, + 'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'}, + 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, + 'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'}, + 'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'}, + 'role': {'key': 'properties.role', 'type': 'ReplicationRole'}, + 'partner_role': {'key': 'properties.partnerRole', 'type': 'ReplicationRole'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ReplicationLink, self).__init__(**kwargs) + self.location = None + self.is_termination_allowed = None + self.replication_mode = None + self.partner_server = None + self.partner_database = None + self.partner_location = None + self.role = None + self.partner_role = None + self.start_time = None + self.percent_complete = None + self.replication_state = None + + +class ResourceIdentity(Model): + """Azure Active Directory identity configuration for a resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The Azure Active Directory principal id. + :vartype principal_id: str + :param type: The identity type. Set this to 'SystemAssigned' in order to + automatically create and assign an Azure Active Directory principal for + the resource. Possible values include: 'SystemAssigned' + :type type: str or ~azure.mgmt.sql.models.IdentityType + :ivar tenant_id: The Azure Active Directory tenant id. + :vartype tenant_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(ResourceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.type = type + self.tenant_id = None + + +class ResourceMoveDefinition(Model): + """Contains the information necessary to perform a resource move (rename). + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The target ID for the resource + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(ResourceMoveDefinition, self).__init__(**kwargs) + self.id = id + + +class RestorableDroppedDatabase(ProxyResource): + """A restorable dropped database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: The geo-location where the resource lives + :vartype location: str + :ivar database_name: The name of the database + :vartype database_name: str + :ivar edition: The edition of the database + :vartype edition: str + :ivar max_size_bytes: The max size in bytes of the database + :vartype max_size_bytes: str + :ivar service_level_objective: The service level objective name of the + database + :vartype service_level_objective: str + :ivar elastic_pool_name: The elastic pool name of the database + :vartype elastic_pool_name: str + :ivar creation_date: The creation date of the database (ISO8601 format) + :vartype creation_date: datetime + :ivar deletion_date: The deletion date of the database (ISO8601 format) + :vartype deletion_date: datetime + :ivar earliest_restore_date: The earliest restore date of the database + (ISO8601 format) + :vartype earliest_restore_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'database_name': {'readonly': True}, + 'edition': {'readonly': True}, + 'max_size_bytes': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(RestorableDroppedDatabase, self).__init__(**kwargs) + self.location = None + self.database_name = None + self.edition = None + self.max_size_bytes = None + self.service_level_objective = None + self.elastic_pool_name = None + self.creation_date = None + self.deletion_date = None + self.earliest_restore_date = None + + +class RestorableDroppedManagedDatabase(TrackedResource): + """A restorable dropped managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar database_name: The name of the database. + :vartype database_name: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar deletion_date: The deletion date of the database (ISO8601 format). + :vartype deletion_date: datetime + :ivar earliest_restore_date: The earliest restore date of the database + (ISO8601 format). + :vartype earliest_restore_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'database_name': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(RestorableDroppedManagedDatabase, self).__init__(location=location, tags=tags, **kwargs) + self.database_name = None + self.creation_date = None + self.deletion_date = None + self.earliest_restore_date = None + + +class RestorePoint(ProxyResource): + """Database restore points. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar restore_point_type: The type of restore point. Possible values + include: 'CONTINUOUS', 'DISCRETE' + :vartype restore_point_type: str or + ~azure.mgmt.sql.models.RestorePointType + :ivar earliest_restore_date: The earliest time to which this database can + be restored + :vartype earliest_restore_date: datetime + :ivar restore_point_creation_date: The time the backup was taken + :vartype restore_point_creation_date: datetime + :ivar restore_point_label: The label of restore point for backup request + by user + :vartype restore_point_label: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'restore_point_type': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'restore_point_creation_date': {'readonly': True}, + 'restore_point_label': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'restore_point_type': {'key': 'properties.restorePointType', 'type': 'RestorePointType'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, + 'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(RestorePoint, self).__init__(**kwargs) + self.location = None + self.restore_point_type = None + self.earliest_restore_date = None + self.restore_point_creation_date = None + self.restore_point_label = None + + +class SensitivityLabel(ProxyResource): + """A sensitivity label. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param label_name: The label name. + :type label_name: str + :param label_id: The label ID. + :type label_id: str + :param information_type: The information type. + :type information_type: str + :param information_type_id: The information type ID. + :type information_type_id: str + :ivar is_disabled: Is sensitivity recommendation disabled. Applicable for + recommended sensitivity label only. Specifies whether the sensitivity + recommendation on this column is disabled (dismissed) or not. + :vartype is_disabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'is_disabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'label_name': {'key': 'properties.labelName', 'type': 'str'}, + 'label_id': {'key': 'properties.labelId', 'type': 'str'}, + 'information_type': {'key': 'properties.informationType', 'type': 'str'}, + 'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'}, + 'is_disabled': {'key': 'properties.isDisabled', 'type': 'bool'}, + } + + def __init__(self, *, label_name: str=None, label_id: str=None, information_type: str=None, information_type_id: str=None, **kwargs) -> None: + super(SensitivityLabel, self).__init__(**kwargs) + self.label_name = label_name + self.label_id = label_id + self.information_type = information_type + self.information_type_id = information_type_id + self.is_disabled = None + + +class Server(TrackedResource): + """An Azure SQL Database server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param identity: The Azure Active Directory identity of the server. + :type identity: ~azure.mgmt.sql.models.ResourceIdentity + :ivar kind: Kind of sql server. This is metadata used for the Azure portal + experience. + :vartype kind: str + :param administrator_login: Administrator username for the server. Once + created it cannot be changed. + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for server creation). + :type administrator_login_password: str + :param version: The version of the server. + :type version: str + :ivar state: The state of the server. + :vartype state: str + :ivar fully_qualified_domain_name: The fully qualified domain name of the + server. + :vartype fully_qualified_domain_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'state': {'readonly': True}, + 'fully_qualified_domain_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, identity=None, administrator_login: str=None, administrator_login_password: str=None, version: str=None, **kwargs) -> None: + super(Server, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity + self.kind = None + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.version = version + self.state = None + self.fully_qualified_domain_name = None + + +class ServerAutomaticTuning(ProxyResource): + """Server-level Automatic Tuning. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param desired_state: Automatic tuning desired state. Possible values + include: 'Custom', 'Auto', 'Unspecified' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningServerMode + :ivar actual_state: Automatic tuning actual state. Possible values + include: 'Custom', 'Auto', 'Unspecified' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningServerMode + :param options: Automatic tuning options definition. + :type options: dict[str, + ~azure.mgmt.sql.models.AutomaticTuningServerOptions] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'actual_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningServerMode'}, + 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningServerMode'}, + 'options': {'key': 'properties.options', 'type': '{AutomaticTuningServerOptions}'}, + } + + def __init__(self, *, desired_state=None, options=None, **kwargs) -> None: + super(ServerAutomaticTuning, self).__init__(**kwargs) + self.desired_state = desired_state + self.actual_state = None + self.options = options + + +class ServerAzureADAdministrator(ProxyResource): + """An server Active Directory Administrator. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar administrator_type: Required. The type of administrator. Default + value: "ActiveDirectory" . + :vartype administrator_type: str + :param login: Required. The server administrator login value. + :type login: str + :param sid: Required. The server administrator Sid (Secure ID). + :type sid: str + :param tenant_id: Required. The server Active Directory Administrator + tenant id. + :type tenant_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'administrator_type': {'required': True, 'constant': True}, + 'login': {'required': True}, + 'sid': {'required': True}, + 'tenant_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, + 'login': {'key': 'properties.login', 'type': 'str'}, + 'sid': {'key': 'properties.sid', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + } + + administrator_type = "ActiveDirectory" + + def __init__(self, *, login: str, sid: str, tenant_id: str, **kwargs) -> None: + super(ServerAzureADAdministrator, self).__init__(**kwargs) + self.login = login + self.sid = sid + self.tenant_id = tenant_id + + +class ServerBlobAuditingPolicy(ProxyResource): + """A server blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: + super(ServerBlobAuditingPolicy, self).__init__(**kwargs) + self.state = state + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.audit_actions_and_groups = audit_actions_and_groups + self.storage_account_subscription_id = storage_account_subscription_id + self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use + self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + + +class ServerCommunicationLink(ProxyResource): + """Server communication link. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar state: The state. + :vartype state: str + :param partner_server: Required. The name of the partner server. + :type partner_server: str + :ivar location: Communication link location. + :vartype location: str + :ivar kind: Communication link kind. This property is used for Azure + Portal metadata. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'partner_server': {'required': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, partner_server: str, **kwargs) -> None: + super(ServerCommunicationLink, self).__init__(**kwargs) + self.state = None + self.partner_server = partner_server + self.location = None + self.kind = None + + +class ServerConnectionPolicy(ProxyResource): + """A server secure connection policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Metadata used for the Azure portal experience. + :vartype kind: str + :ivar location: Resource location. + :vartype location: str + :param connection_type: Required. The server connection type. Possible + values include: 'Default', 'Proxy', 'Redirect' + :type connection_type: str or ~azure.mgmt.sql.models.ServerConnectionType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + 'connection_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'connection_type': {'key': 'properties.connectionType', 'type': 'ServerConnectionType'}, + } + + def __init__(self, *, connection_type, **kwargs) -> None: + super(ServerConnectionPolicy, self).__init__(**kwargs) + self.kind = None + self.location = None + self.connection_type = connection_type + + +class ServerDnsAlias(ProxyResource): + """A server DNS alias. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar azure_dns_record: The fully qualified DNS record for alias + :vartype azure_dns_record: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'azure_dns_record': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'azure_dns_record': {'key': 'properties.azureDnsRecord', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ServerDnsAlias, self).__init__(**kwargs) + self.azure_dns_record = None + + +class ServerDnsAliasAcquisition(Model): + """A server DNS alias acquisition request. + + :param old_server_dns_alias_id: The id of the server alias that will be + acquired to point to this server instead. + :type old_server_dns_alias_id: str + """ + + _attribute_map = { + 'old_server_dns_alias_id': {'key': 'oldServerDnsAliasId', 'type': 'str'}, + } + + def __init__(self, *, old_server_dns_alias_id: str=None, **kwargs) -> None: + super(ServerDnsAliasAcquisition, self).__init__(**kwargs) + self.old_server_dns_alias_id = old_server_dns_alias_id + + +class ServerKey(ProxyResource): + """A server key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :type kind: str + :ivar location: Resource location. + :vartype location: str + :ivar subregion: Subregion of the server key. + :vartype subregion: str + :param server_key_type: Required. The server key type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :param uri: The URI of the server key. + :type uri: str + :param thumbprint: Thumbprint of the server key. + :type thumbprint: str + :param creation_date: The server key creation date. + :type creation_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'subregion': {'readonly': True}, + 'server_key_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'subregion': {'key': 'properties.subregion', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, server_key_type, kind: str=None, uri: str=None, thumbprint: str=None, creation_date=None, **kwargs) -> None: + super(ServerKey, self).__init__(**kwargs) + self.kind = kind + self.location = None + self.subregion = None + self.server_key_type = server_key_type + self.uri = uri + self.thumbprint = thumbprint + self.creation_date = creation_date + + +class ServerSecurityAlertPolicy(ProxyResource): + """A server security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: + super(ServerSecurityAlertPolicy, self).__init__(**kwargs) + self.state = state + self.disabled_alerts = disabled_alerts + self.email_addresses = email_addresses + self.email_account_admins = email_account_admins + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.creation_time = None + + +class ServerUpdate(Model): + """An update request for an Azure SQL Database server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param administrator_login: Administrator username for the server. Once + created it cannot be changed. + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for server creation). + :type administrator_login_password: str + :param version: The version of the server. + :type version: str + :ivar state: The state of the server. + :vartype state: str + :ivar fully_qualified_domain_name: The fully qualified domain name of the + server. + :vartype fully_qualified_domain_name: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'state': {'readonly': True}, + 'fully_qualified_domain_name': {'readonly': True}, + } + + _attribute_map = { + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, administrator_login: str=None, administrator_login_password: str=None, version: str=None, tags=None, **kwargs) -> None: + super(ServerUpdate, self).__init__(**kwargs) + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.version = version + self.state = None + self.fully_qualified_domain_name = None + self.tags = tags + + +class ServerUsage(Model): + """Represents server metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the server usage metric. + :vartype name: str + :ivar resource_name: The name of the resource. + :vartype resource_name: str + :ivar display_name: The metric display name. + :vartype display_name: str + :ivar current_value: The current value of the metric. + :vartype current_value: float + :ivar limit: The current limit of the metric. + :vartype limit: float + :ivar unit: The units of the metric. + :vartype unit: str + :ivar next_reset_time: The next reset time for the metric (ISO8601 + format). + :vartype next_reset_time: datetime + """ + + _validation = { + 'name': {'readonly': True}, + 'resource_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'next_reset_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(ServerUsage, self).__init__(**kwargs) + self.name = None + self.resource_name = None + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + self.next_reset_time = None + + +class ServerVersionCapability(Model): + """The server capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The server version name. + :vartype name: str + :ivar supported_editions: The list of supported database editions. + :vartype supported_editions: + list[~azure.mgmt.sql.models.EditionCapability] + :ivar supported_elastic_pool_editions: The list of supported elastic pool + editions. + :vartype supported_elastic_pool_editions: + list[~azure.mgmt.sql.models.ElasticPoolEditionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_editions': {'readonly': True}, + 'supported_elastic_pool_editions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_editions': {'key': 'supportedEditions', 'type': '[EditionCapability]'}, + 'supported_elastic_pool_editions': {'key': 'supportedElasticPoolEditions', 'type': '[ElasticPoolEditionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ServerVersionCapability, self).__init__(**kwargs) + self.name = None + self.supported_editions = None + self.supported_elastic_pool_editions = None + self.status = None + self.reason = reason + + +class ServerVulnerabilityAssessment(ProxyResource): + """A server vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: Required. A blob storage container path to + hold the scan results (e.g. + https://myStorage.blob.core.windows.net/VaScans/). + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_container_path': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, *, storage_container_path: str, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: + super(ServerVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = storage_container_path + self.storage_container_sas_key = storage_container_sas_key + self.storage_account_access_key = storage_account_access_key + self.recurring_scans = recurring_scans + + +class ServiceObjective(ProxyResource): + """Represents a database service objective. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar service_objective_name: The name for the service objective. + :vartype service_objective_name: str + :ivar is_default: Gets whether the service level objective is the default + service objective. + :vartype is_default: bool + :ivar is_system: Gets whether the service level objective is a system + service objective. + :vartype is_system: bool + :ivar description: The description for the service level objective. + :vartype description: str + :ivar enabled: Gets whether the service level objective is enabled. + :vartype enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'service_objective_name': {'readonly': True}, + 'is_default': {'readonly': True}, + 'is_system': {'readonly': True}, + 'description': {'readonly': True}, + 'enabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'service_objective_name': {'key': 'properties.serviceObjectiveName', 'type': 'str'}, + 'is_default': {'key': 'properties.isDefault', 'type': 'bool'}, + 'is_system': {'key': 'properties.isSystem', 'type': 'bool'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(ServiceObjective, self).__init__(**kwargs) + self.service_objective_name = None + self.is_default = None + self.is_system = None + self.description = None + self.enabled = None + + +class ServiceObjectiveCapability(Model): + """The service objectives capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique ID of the service objective. + :vartype id: str + :ivar name: The service objective name. + :vartype name: str + :ivar supported_max_sizes: The list of supported maximum database sizes. + :vartype supported_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar performance_level: The performance level. + :vartype performance_level: + ~azure.mgmt.sql.models.PerformanceLevelCapability + :ivar sku: The sku. + :vartype sku: ~azure.mgmt.sql.models.Sku + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar included_max_size: The included (free) max size. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'supported_max_sizes': {'readonly': True}, + 'performance_level': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ServiceObjectiveCapability, self).__init__(**kwargs) + self.id = None + self.name = None + self.supported_max_sizes = None + self.performance_level = None + self.sku = None + self.supported_license_types = None + self.included_max_size = None + self.status = None + self.reason = reason + + +class ServiceTierAdvisor(ProxyResource): + """Represents a Service Tier Advisor. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar observation_period_start: The observation period start (ISO8601 + format). + :vartype observation_period_start: datetime + :ivar observation_period_end: The observation period start (ISO8601 + format). + :vartype observation_period_end: datetime + :ivar active_time_ratio: The activeTimeRatio for service tier advisor. + :vartype active_time_ratio: float + :ivar min_dtu: Gets or sets minDtu for service tier advisor. + :vartype min_dtu: float + :ivar avg_dtu: Gets or sets avgDtu for service tier advisor. + :vartype avg_dtu: float + :ivar max_dtu: Gets or sets maxDtu for service tier advisor. + :vartype max_dtu: float + :ivar max_size_in_gb: Gets or sets maxSizeInGB for service tier advisor. + :vartype max_size_in_gb: float + :ivar service_level_objective_usage_metrics: Gets or sets + serviceLevelObjectiveUsageMetrics for the service tier advisor. + :vartype service_level_objective_usage_metrics: + list[~azure.mgmt.sql.models.SloUsageMetric] + :ivar current_service_level_objective: Gets or sets + currentServiceLevelObjective for service tier advisor. + :vartype current_service_level_objective: str + :ivar current_service_level_objective_id: Gets or sets + currentServiceLevelObjectiveId for service tier advisor. + :vartype current_service_level_objective_id: str + :ivar usage_based_recommendation_service_level_objective: Gets or sets + usageBasedRecommendationServiceLevelObjective for service tier advisor. + :vartype usage_based_recommendation_service_level_objective: str + :ivar usage_based_recommendation_service_level_objective_id: Gets or sets + usageBasedRecommendationServiceLevelObjectiveId for service tier advisor. + :vartype usage_based_recommendation_service_level_objective_id: str + :ivar database_size_based_recommendation_service_level_objective: Gets or + sets databaseSizeBasedRecommendationServiceLevelObjective for service tier + advisor. + :vartype database_size_based_recommendation_service_level_objective: str + :ivar database_size_based_recommendation_service_level_objective_id: Gets + or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service + tier advisor. + :vartype database_size_based_recommendation_service_level_objective_id: + str + :ivar disaster_plan_based_recommendation_service_level_objective: Gets or + sets disasterPlanBasedRecommendationServiceLevelObjective for service tier + advisor. + :vartype disaster_plan_based_recommendation_service_level_objective: str + :ivar disaster_plan_based_recommendation_service_level_objective_id: Gets + or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service + tier advisor. + :vartype disaster_plan_based_recommendation_service_level_objective_id: + str + :ivar overall_recommendation_service_level_objective: Gets or sets + overallRecommendationServiceLevelObjective for service tier advisor. + :vartype overall_recommendation_service_level_objective: str + :ivar overall_recommendation_service_level_objective_id: Gets or sets + overallRecommendationServiceLevelObjectiveId for service tier advisor. + :vartype overall_recommendation_service_level_objective_id: str + :ivar confidence: Gets or sets confidence for service tier advisor. + :vartype confidence: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'observation_period_start': {'readonly': True}, + 'observation_period_end': {'readonly': True}, + 'active_time_ratio': {'readonly': True}, + 'min_dtu': {'readonly': True}, + 'avg_dtu': {'readonly': True}, + 'max_dtu': {'readonly': True}, + 'max_size_in_gb': {'readonly': True}, + 'service_level_objective_usage_metrics': {'readonly': True}, + 'current_service_level_objective': {'readonly': True}, + 'current_service_level_objective_id': {'readonly': True}, + 'usage_based_recommendation_service_level_objective': {'readonly': True}, + 'usage_based_recommendation_service_level_objective_id': {'readonly': True}, + 'database_size_based_recommendation_service_level_objective': {'readonly': True}, + 'database_size_based_recommendation_service_level_objective_id': {'readonly': True}, + 'disaster_plan_based_recommendation_service_level_objective': {'readonly': True}, + 'disaster_plan_based_recommendation_service_level_objective_id': {'readonly': True}, + 'overall_recommendation_service_level_objective': {'readonly': True}, + 'overall_recommendation_service_level_objective_id': {'readonly': True}, + 'confidence': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, + 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, + 'active_time_ratio': {'key': 'properties.activeTimeRatio', 'type': 'float'}, + 'min_dtu': {'key': 'properties.minDtu', 'type': 'float'}, + 'avg_dtu': {'key': 'properties.avgDtu', 'type': 'float'}, + 'max_dtu': {'key': 'properties.maxDtu', 'type': 'float'}, + 'max_size_in_gb': {'key': 'properties.maxSizeInGB', 'type': 'float'}, + 'service_level_objective_usage_metrics': {'key': 'properties.serviceLevelObjectiveUsageMetrics', 'type': '[SloUsageMetric]'}, + 'current_service_level_objective': {'key': 'properties.currentServiceLevelObjective', 'type': 'str'}, + 'current_service_level_objective_id': {'key': 'properties.currentServiceLevelObjectiveId', 'type': 'str'}, + 'usage_based_recommendation_service_level_objective': {'key': 'properties.usageBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'usage_based_recommendation_service_level_objective_id': {'key': 'properties.usageBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'database_size_based_recommendation_service_level_objective': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'database_size_based_recommendation_service_level_objective_id': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'disaster_plan_based_recommendation_service_level_objective': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'disaster_plan_based_recommendation_service_level_objective_id': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'overall_recommendation_service_level_objective': {'key': 'properties.overallRecommendationServiceLevelObjective', 'type': 'str'}, + 'overall_recommendation_service_level_objective_id': {'key': 'properties.overallRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'confidence': {'key': 'properties.confidence', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(ServiceTierAdvisor, self).__init__(**kwargs) + self.observation_period_start = None + self.observation_period_end = None + self.active_time_ratio = None + self.min_dtu = None + self.avg_dtu = None + self.max_dtu = None + self.max_size_in_gb = None + self.service_level_objective_usage_metrics = None + self.current_service_level_objective = None + self.current_service_level_objective_id = None + self.usage_based_recommendation_service_level_objective = None + self.usage_based_recommendation_service_level_objective_id = None + self.database_size_based_recommendation_service_level_objective = None + self.database_size_based_recommendation_service_level_objective_id = None + self.disaster_plan_based_recommendation_service_level_objective = None + self.disaster_plan_based_recommendation_service_level_objective_id = None + self.overall_recommendation_service_level_objective = None + self.overall_recommendation_service_level_objective_id = None + self.confidence = None + + +class Sku(Model): + """The resource model definition representing SKU. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Ex - P3. It is typically a + letter+number code + :type name: str + :param tier: This field is required to be implemented by the Resource + Provider if the service has more than one tier, but is not required on a + PUT. + :type tier: str + :param size: The SKU size. When the name field is the combination of tier + and some other value, this would be the standalone code. + :type size: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :param capacity: If the SKU supports scale out/in then the capacity + integer should be included. If scale out/in is not possible for the + resource this may be omitted. + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, *, name: str, tier: str=None, size: str=None, family: str=None, capacity: int=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.size = size + self.family = family + self.capacity = capacity + + +class SloUsageMetric(Model): + """A Slo Usage Metric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar service_level_objective: The serviceLevelObjective for SLO usage + metric. Possible values include: 'System', 'System0', 'System1', + 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', + 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', + 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', + 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', + 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', + 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', + 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', + 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' + :vartype service_level_objective: str or + ~azure.mgmt.sql.models.ServiceObjectiveName + :ivar service_level_objective_id: The serviceLevelObjectiveId for SLO + usage metric. + :vartype service_level_objective_id: str + :ivar in_range_time_ratio: Gets or sets inRangeTimeRatio for SLO usage + metric. + :vartype in_range_time_ratio: float + """ + + _validation = { + 'service_level_objective': {'readonly': True}, + 'service_level_objective_id': {'readonly': True}, + 'in_range_time_ratio': {'readonly': True}, + } + + _attribute_map = { + 'service_level_objective': {'key': 'serviceLevelObjective', 'type': 'str'}, + 'service_level_objective_id': {'key': 'serviceLevelObjectiveId', 'type': 'str'}, + 'in_range_time_ratio': {'key': 'inRangeTimeRatio', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(SloUsageMetric, self).__init__(**kwargs) + self.service_level_objective = None + self.service_level_objective_id = None + self.in_range_time_ratio = None + + +class SubscriptionUsage(ProxyResource): + """Usage Metric of a Subscription in a Location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar display_name: User-readable name of the metric. + :vartype display_name: str + :ivar current_value: Current value of the metric. + :vartype current_value: float + :ivar limit: Boundary value of the metric. + :vartype limit: float + :ivar unit: Unit of the metric. + :vartype unit: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'current_value': {'key': 'properties.currentValue', 'type': 'float'}, + 'limit': {'key': 'properties.limit', 'type': 'float'}, + 'unit': {'key': 'properties.unit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubscriptionUsage, self).__init__(**kwargs) + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + + +class SyncAgent(ProxyResource): + """An Azure SQL Database sync agent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar sync_agent_name: Name of the sync agent. + :vartype sync_agent_name: str + :param sync_database_id: ARM resource id of the sync database in the sync + agent. + :type sync_database_id: str + :ivar last_alive_time: Last alive time of the sync agent. + :vartype last_alive_time: datetime + :ivar state: State of the sync agent. Possible values include: 'Online', + 'Offline', 'NeverConnected' + :vartype state: str or ~azure.mgmt.sql.models.SyncAgentState + :ivar is_up_to_date: If the sync agent version is up to date. + :vartype is_up_to_date: bool + :ivar expiry_time: Expiration time of the sync agent version. + :vartype expiry_time: datetime + :ivar version: Version of the sync agent. + :vartype version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sync_agent_name': {'readonly': True}, + 'last_alive_time': {'readonly': True}, + 'state': {'readonly': True}, + 'is_up_to_date': {'readonly': True}, + 'expiry_time': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sync_agent_name': {'key': 'properties.name', 'type': 'str'}, + 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, + 'last_alive_time': {'key': 'properties.lastAliveTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'is_up_to_date': {'key': 'properties.isUpToDate', 'type': 'bool'}, + 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + } + + def __init__(self, *, sync_database_id: str=None, **kwargs) -> None: + super(SyncAgent, self).__init__(**kwargs) + self.sync_agent_name = None + self.sync_database_id = sync_database_id + self.last_alive_time = None + self.state = None + self.is_up_to_date = None + self.expiry_time = None + self.version = None + + +class SyncAgentKeyProperties(Model): + """Properties of an Azure SQL Database sync agent key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar sync_agent_key: Key of sync agent. + :vartype sync_agent_key: str + """ + + _validation = { + 'sync_agent_key': {'readonly': True}, + } + + _attribute_map = { + 'sync_agent_key': {'key': 'syncAgentKey', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncAgentKeyProperties, self).__init__(**kwargs) + self.sync_agent_key = None + + +class SyncAgentLinkedDatabase(ProxyResource): + """An Azure SQL Database sync agent linked database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_type: Type of the sync agent linked database. Possible + values include: 'AzureSqlDatabase', 'SqlServerDatabase' + :vartype database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType + :ivar database_id: Id of the sync agent linked database. + :vartype database_id: str + :ivar description: Description of the sync agent linked database. + :vartype description: str + :ivar server_name: Server name of the sync agent linked database. + :vartype server_name: str + :ivar database_name: Database name of the sync agent linked database. + :vartype database_name: str + :ivar user_name: User name of the sync agent linked database. + :vartype user_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_type': {'readonly': True}, + 'database_id': {'readonly': True}, + 'description': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncAgentLinkedDatabase, self).__init__(**kwargs) + self.database_type = None + self.database_id = None + self.description = None + self.server_name = None + self.database_name = None + self.user_name = None + + +class SyncDatabaseIdProperties(Model): + """Properties of the sync database id. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: ARM resource id of sync database. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncDatabaseIdProperties, self).__init__(**kwargs) + self.id = None + + +class SyncFullSchemaProperties(Model): + """Properties of the database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar tables: List of tables in the database full schema. + :vartype tables: list[~azure.mgmt.sql.models.SyncFullSchemaTable] + :ivar last_update_time: Last update time of the database schema. + :vartype last_update_time: datetime + """ + + _validation = { + 'tables': {'readonly': True}, + 'last_update_time': {'readonly': True}, + } + + _attribute_map = { + 'tables': {'key': 'tables', 'type': '[SyncFullSchemaTable]'}, + 'last_update_time': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncFullSchemaProperties, self).__init__(**kwargs) + self.tables = None + self.last_update_time = None + + +class SyncFullSchemaTable(Model): + """Properties of the table in the database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar columns: List of columns in the table of database full schema. + :vartype columns: list[~azure.mgmt.sql.models.SyncFullSchemaTableColumn] + :ivar error_id: Error id of the table. + :vartype error_id: str + :ivar has_error: If there is error in the table. + :vartype has_error: bool + :ivar name: Name of the table. + :vartype name: str + :ivar quoted_name: Quoted name of the table. + :vartype quoted_name: str + """ + + _validation = { + 'columns': {'readonly': True}, + 'error_id': {'readonly': True}, + 'has_error': {'readonly': True}, + 'name': {'readonly': True}, + 'quoted_name': {'readonly': True}, + } + + _attribute_map = { + 'columns': {'key': 'columns', 'type': '[SyncFullSchemaTableColumn]'}, + 'error_id': {'key': 'errorId', 'type': 'str'}, + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncFullSchemaTable, self).__init__(**kwargs) + self.columns = None + self.error_id = None + self.has_error = None + self.name = None + self.quoted_name = None + + +class SyncFullSchemaTableColumn(Model): + """Properties of the column in the table of database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar data_size: Data size of the column. + :vartype data_size: str + :ivar data_type: Data type of the column. + :vartype data_type: str + :ivar error_id: Error id of the column. + :vartype error_id: str + :ivar has_error: If there is error in the table. + :vartype has_error: bool + :ivar is_primary_key: If it is the primary key of the table. + :vartype is_primary_key: bool + :ivar name: Name of the column. + :vartype name: str + :ivar quoted_name: Quoted name of the column. + :vartype quoted_name: str + """ + + _validation = { + 'data_size': {'readonly': True}, + 'data_type': {'readonly': True}, + 'error_id': {'readonly': True}, + 'has_error': {'readonly': True}, + 'is_primary_key': {'readonly': True}, + 'name': {'readonly': True}, + 'quoted_name': {'readonly': True}, + } + + _attribute_map = { + 'data_size': {'key': 'dataSize', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + 'error_id': {'key': 'errorId', 'type': 'str'}, + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'is_primary_key': {'key': 'isPrimaryKey', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncFullSchemaTableColumn, self).__init__(**kwargs) + self.data_size = None + self.data_type = None + self.error_id = None + self.has_error = None + self.is_primary_key = None + self.name = None + self.quoted_name = None + + +class SyncGroup(ProxyResource): + """An Azure SQL Database sync group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param interval: Sync interval of the sync group. + :type interval: int + :ivar last_sync_time: Last sync time of the sync group. + :vartype last_sync_time: datetime + :param conflict_resolution_policy: Conflict resolution policy of the sync + group. Possible values include: 'HubWin', 'MemberWin' + :type conflict_resolution_policy: str or + ~azure.mgmt.sql.models.SyncConflictResolutionPolicy + :param sync_database_id: ARM resource id of the sync database in the sync + group. + :type sync_database_id: str + :param hub_database_user_name: User name for the sync group hub database + credential. + :type hub_database_user_name: str + :param hub_database_password: Password for the sync group hub database + credential. + :type hub_database_password: str + :ivar sync_state: Sync state of the sync group. Possible values include: + 'NotReady', 'Error', 'Warning', 'Progressing', 'Good' + :vartype sync_state: str or ~azure.mgmt.sql.models.SyncGroupState + :param schema: Sync schema of the sync group. + :type schema: ~azure.mgmt.sql.models.SyncGroupSchema + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_sync_time': {'readonly': True}, + 'sync_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'interval': {'key': 'properties.interval', 'type': 'int'}, + 'last_sync_time': {'key': 'properties.lastSyncTime', 'type': 'iso-8601'}, + 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'str'}, + 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, + 'hub_database_user_name': {'key': 'properties.hubDatabaseUserName', 'type': 'str'}, + 'hub_database_password': {'key': 'properties.hubDatabasePassword', 'type': 'str'}, + 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, + 'schema': {'key': 'properties.schema', 'type': 'SyncGroupSchema'}, + } + + def __init__(self, *, interval: int=None, conflict_resolution_policy=None, sync_database_id: str=None, hub_database_user_name: str=None, hub_database_password: str=None, schema=None, **kwargs) -> None: + super(SyncGroup, self).__init__(**kwargs) + self.interval = interval + self.last_sync_time = None + self.conflict_resolution_policy = conflict_resolution_policy + self.sync_database_id = sync_database_id + self.hub_database_user_name = hub_database_user_name + self.hub_database_password = hub_database_password + self.sync_state = None + self.schema = schema + + +class SyncGroupLogProperties(Model): + """Properties of an Azure SQL Database sync group log. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar timestamp: Timestamp of the sync group log. + :vartype timestamp: datetime + :ivar type: Type of the sync group log. Possible values include: 'All', + 'Error', 'Warning', 'Success' + :vartype type: str or ~azure.mgmt.sql.models.SyncGroupLogType + :ivar source: Source of the sync group log. + :vartype source: str + :ivar details: Details of the sync group log. + :vartype details: str + :ivar tracing_id: TracingId of the sync group log. + :vartype tracing_id: str + :ivar operation_status: OperationStatus of the sync group log. + :vartype operation_status: str + """ + + _validation = { + 'timestamp': {'readonly': True}, + 'type': {'readonly': True}, + 'source': {'readonly': True}, + 'details': {'readonly': True}, + 'tracing_id': {'readonly': True}, + 'operation_status': {'readonly': True}, + } + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, + 'tracing_id': {'key': 'tracingId', 'type': 'str'}, + 'operation_status': {'key': 'operationStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncGroupLogProperties, self).__init__(**kwargs) + self.timestamp = None + self.type = None + self.source = None + self.details = None + self.tracing_id = None + self.operation_status = None + + +class SyncGroupSchema(Model): + """Properties of sync group schema. + + :param tables: List of tables in sync group schema. + :type tables: list[~azure.mgmt.sql.models.SyncGroupSchemaTable] + :param master_sync_member_name: Name of master sync member where the + schema is from. + :type master_sync_member_name: str + """ + + _attribute_map = { + 'tables': {'key': 'tables', 'type': '[SyncGroupSchemaTable]'}, + 'master_sync_member_name': {'key': 'masterSyncMemberName', 'type': 'str'}, + } + + def __init__(self, *, tables=None, master_sync_member_name: str=None, **kwargs) -> None: + super(SyncGroupSchema, self).__init__(**kwargs) + self.tables = tables + self.master_sync_member_name = master_sync_member_name + + +class SyncGroupSchemaTable(Model): + """Properties of table in sync group schema. + + :param columns: List of columns in sync group schema. + :type columns: list[~azure.mgmt.sql.models.SyncGroupSchemaTableColumn] + :param quoted_name: Quoted name of sync group schema table. + :type quoted_name: str + """ + + _attribute_map = { + 'columns': {'key': 'columns', 'type': '[SyncGroupSchemaTableColumn]'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, *, columns=None, quoted_name: str=None, **kwargs) -> None: + super(SyncGroupSchemaTable, self).__init__(**kwargs) + self.columns = columns + self.quoted_name = quoted_name + + +class SyncGroupSchemaTableColumn(Model): + """Properties of column in sync group table. + + :param quoted_name: Quoted name of sync group table column. + :type quoted_name: str + :param data_size: Data size of the column. + :type data_size: str + :param data_type: Data type of the column. + :type data_type: str + """ + + _attribute_map = { + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + 'data_size': {'key': 'dataSize', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + } + + def __init__(self, *, quoted_name: str=None, data_size: str=None, data_type: str=None, **kwargs) -> None: + super(SyncGroupSchemaTableColumn, self).__init__(**kwargs) + self.quoted_name = quoted_name + self.data_size = data_size + self.data_type = data_type + + +class SyncMember(ProxyResource): + """An Azure SQL Database sync member. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param database_type: Database type of the sync member. Possible values + include: 'AzureSqlDatabase', 'SqlServerDatabase' + :type database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType + :param sync_agent_id: ARM resource id of the sync agent in the sync + member. + :type sync_agent_id: str + :param sql_server_database_id: SQL Server database id of the sync member. + :type sql_server_database_id: str + :param server_name: Server name of the member database in the sync member + :type server_name: str + :param database_name: Database name of the member database in the sync + member. + :type database_name: str + :param user_name: User name of the member database in the sync member. + :type user_name: str + :param password: Password of the member database in the sync member. + :type password: str + :param sync_direction: Sync direction of the sync member. Possible values + include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember' + :type sync_direction: str or ~azure.mgmt.sql.models.SyncDirection + :ivar sync_state: Sync state of the sync member. Possible values include: + 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', + 'DisabledTombstoneCleanup', 'DisabledBackupRestore', + 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', + 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', + 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', + 'ReprovisionFailed', 'UnReprovisioned' + :vartype sync_state: str or ~azure.mgmt.sql.models.SyncMemberState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sync_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, + 'sync_agent_id': {'key': 'properties.syncAgentId', 'type': 'str'}, + 'sql_server_database_id': {'key': 'properties.sqlServerDatabaseId', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'sync_direction': {'key': 'properties.syncDirection', 'type': 'str'}, + 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, + } + + def __init__(self, *, database_type=None, sync_agent_id: str=None, sql_server_database_id: str=None, server_name: str=None, database_name: str=None, user_name: str=None, password: str=None, sync_direction=None, **kwargs) -> None: + super(SyncMember, self).__init__(**kwargs) + self.database_type = database_type + self.sync_agent_id = sync_agent_id + self.sql_server_database_id = sql_server_database_id + self.server_name = server_name + self.database_name = database_name + self.user_name = user_name + self.password = password + self.sync_direction = sync_direction + self.sync_state = None + + +class TdeCertificate(ProxyResource): + """A TDE certificate that can be uploaded into a server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param private_blob: Required. The base64 encoded certificate private + blob. + :type private_blob: str + :param cert_password: The certificate password. + :type cert_password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'private_blob': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_blob': {'key': 'properties.privateBlob', 'type': 'str'}, + 'cert_password': {'key': 'properties.certPassword', 'type': 'str'}, + } + + def __init__(self, *, private_blob: str, cert_password: str=None, **kwargs) -> None: + super(TdeCertificate, self).__init__(**kwargs) + self.private_blob = private_blob + self.cert_password = cert_password + + +class TransparentDataEncryption(ProxyResource): + """Represents a database transparent data encryption configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :param status: The status of the database transparent data encryption. + Possible values include: 'Enabled', 'Disabled' + :type status: str or + ~azure.mgmt.sql.models.TransparentDataEncryptionStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'TransparentDataEncryptionStatus'}, + } + + def __init__(self, *, status=None, **kwargs) -> None: + super(TransparentDataEncryption, self).__init__(**kwargs) + self.location = None + self.status = status + + +class TransparentDataEncryptionActivity(ProxyResource): + """Represents a database transparent data encryption Scan. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar status: The status of the database. Possible values include: + 'Encrypting', 'Decrypting' + :vartype status: str or + ~azure.mgmt.sql.models.TransparentDataEncryptionActivityStatus + :ivar percent_complete: The percent complete of the transparent data + encryption scan for a database. + :vartype percent_complete: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'status': {'readonly': True}, + 'percent_complete': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(TransparentDataEncryptionActivity, self).__init__(**kwargs) + self.location = None + self.status = None + self.percent_complete = None + + +class Usage(Model): + """ARM usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: ~azure.mgmt.sql.models.Name + :ivar type: Resource type. + :vartype type: str + :ivar unit: Usage unit. + :vartype unit: str + :ivar current_value: Usage current value. + :vartype current_value: int + :ivar limit: Usage limit. + :vartype limit: int + :ivar requested_limit: Usage requested limit. + :vartype requested_limit: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'unit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'requested_limit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'Name'}, + 'type': {'key': 'type', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'int'}, + 'requested_limit': {'key': 'requestedLimit', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(Usage, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.unit = None + self.current_value = None + self.limit = None + self.requested_limit = None + + +class VirtualCluster(TrackedResource): + """An Azure SQL virtual cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar subnet_id: Subnet resource ID for the virtual cluster. + :vartype subnet_id: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :ivar child_resources: List of resources in this virtual cluster. + :vartype child_resources: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'subnet_id': {'readonly': True}, + 'child_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'family': {'key': 'properties.family', 'type': 'str'}, + 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, + } + + def __init__(self, *, location: str, tags=None, family: str=None, **kwargs) -> None: + super(VirtualCluster, self).__init__(location=location, tags=tags, **kwargs) + self.subnet_id = None + self.family = family + self.child_resources = None + + +class VirtualClusterUpdate(Model): + """An update request for an Azure SQL Database virtual cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar subnet_id: Subnet resource ID for the virtual cluster. + :vartype subnet_id: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :ivar child_resources: List of resources in this virtual cluster. + :vartype child_resources: list[str] + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'subnet_id': {'readonly': True}, + 'child_resources': {'readonly': True}, + } + + _attribute_map = { + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'family': {'key': 'properties.family', 'type': 'str'}, + 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, family: str=None, tags=None, **kwargs) -> None: + super(VirtualClusterUpdate, self).__init__(**kwargs) + self.subnet_id = None + self.family = family + self.child_resources = None + self.tags = tags + + +class VirtualNetworkRule(ProxyResource): + """A virtual network rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param virtual_network_subnet_id: Required. The ARM resource id of the + virtual network subnet. + :type virtual_network_subnet_id: str + :param ignore_missing_vnet_service_endpoint: Create firewall rule before + the virtual network has vnet service endpoint enabled. + :type ignore_missing_vnet_service_endpoint: bool + :ivar state: Virtual Network Rule State. Possible values include: + 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' + :vartype state: str or ~azure.mgmt.sql.models.VirtualNetworkRuleState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'virtual_network_subnet_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, + 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, *, virtual_network_subnet_id: str, ignore_missing_vnet_service_endpoint: bool=None, **kwargs) -> None: + super(VirtualNetworkRule, self).__init__(**kwargs) + self.virtual_network_subnet_id = virtual_network_subnet_id + self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint + self.state = None + + +class VulnerabilityAssessmentRecurringScansProperties(Model): + """Properties of a Vulnerability Assessment recurring scans. + + :param is_enabled: Recurring scans state. + :type is_enabled: bool + :param email_subscription_admins: Specifies that the schedule scan + notification will be is sent to the subscription administrators. Default + value: True . + :type email_subscription_admins: bool + :param emails: Specifies an array of e-mail addresses to which the scan + notification is sent. + :type emails: list[str] + """ + + _attribute_map = { + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'}, + 'emails': {'key': 'emails', 'type': '[str]'}, + } + + def __init__(self, *, is_enabled: bool=None, email_subscription_admins: bool=True, emails=None, **kwargs) -> None: + super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs) + self.is_enabled = is_enabled + self.email_subscription_admins = email_subscription_admins + self.emails = emails + + +class VulnerabilityAssessmentScanError(Model): + """Properties of a vulnerability assessment scan error. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(VulnerabilityAssessmentScanError, self).__init__(**kwargs) + self.code = None + self.message = None + + +class VulnerabilityAssessmentScanRecord(ProxyResource): + """A vulnerability assessment scan record. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar scan_id: The scan ID. + :vartype scan_id: str + :ivar trigger_type: The scan trigger type. Possible values include: + 'OnDemand', 'Recurring' + :vartype trigger_type: str or + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanTriggerType + :ivar state: The scan status. Possible values include: 'Passed', 'Failed', + 'FailedToRun', 'InProgress' + :vartype state: str or + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanState + :ivar start_time: The scan start time (UTC). + :vartype start_time: datetime + :ivar end_time: The scan end time (UTC). + :vartype end_time: datetime + :ivar errors: The scan errors. + :vartype errors: + list[~azure.mgmt.sql.models.VulnerabilityAssessmentScanError] + :ivar storage_container_path: The scan results storage container path. + :vartype storage_container_path: str + :ivar number_of_failed_security_checks: The number of failed security + checks. + :vartype number_of_failed_security_checks: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'scan_id': {'readonly': True}, + 'trigger_type': {'readonly': True}, + 'state': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'errors': {'readonly': True}, + 'storage_container_path': {'readonly': True}, + 'number_of_failed_security_checks': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'scan_id': {'key': 'properties.scanId', 'type': 'str'}, + 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'errors': {'key': 'properties.errors', 'type': '[VulnerabilityAssessmentScanError]'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'number_of_failed_security_checks': {'key': 'properties.numberOfFailedSecurityChecks', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(VulnerabilityAssessmentScanRecord, self).__init__(**kwargs) + self.scan_id = None + self.trigger_type = None + self.state = None + self.start_time = None + self.end_time = None + self.errors = None + self.storage_container_path = None + self.number_of_failed_security_checks = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py new file mode 100644 index 000000000000..43eb7dc78de9 --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py @@ -0,0 +1,885 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class RecoverableDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`RecoverableDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RecoverableDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(RecoverableDatabasePaged, self).__init__(*args, **kwargs) +class RestorableDroppedDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`RestorableDroppedDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RestorableDroppedDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(RestorableDroppedDatabasePaged, self).__init__(*args, **kwargs) +class ServerPaged(Paged): + """ + A paging container for iterating over a list of :class:`Server ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Server]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerPaged, self).__init__(*args, **kwargs) +class DataMaskingRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`DataMaskingRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DataMaskingRule]'} + } + + def __init__(self, *args, **kwargs): + + super(DataMaskingRulePaged, self).__init__(*args, **kwargs) +class FirewallRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`FirewallRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[FirewallRule]'} + } + + def __init__(self, *args, **kwargs): + + super(FirewallRulePaged, self).__init__(*args, **kwargs) +class GeoBackupPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`GeoBackupPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GeoBackupPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(GeoBackupPolicyPaged, self).__init__(*args, **kwargs) +class MetricPaged(Paged): + """ + A paging container for iterating over a list of :class:`Metric ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Metric]'} + } + + def __init__(self, *args, **kwargs): + + super(MetricPaged, self).__init__(*args, **kwargs) +class MetricDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`MetricDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[MetricDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(MetricDefinitionPaged, self).__init__(*args, **kwargs) +class DatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`Database ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Database]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabasePaged, self).__init__(*args, **kwargs) +class ElasticPoolPaged(Paged): + """ + A paging container for iterating over a list of :class:`ElasticPool ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ElasticPool]'} + } + + def __init__(self, *args, **kwargs): + + super(ElasticPoolPaged, self).__init__(*args, **kwargs) +class RecommendedElasticPoolPaged(Paged): + """ + A paging container for iterating over a list of :class:`RecommendedElasticPool ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RecommendedElasticPool]'} + } + + def __init__(self, *args, **kwargs): + + super(RecommendedElasticPoolPaged, self).__init__(*args, **kwargs) +class RecommendedElasticPoolMetricPaged(Paged): + """ + A paging container for iterating over a list of :class:`RecommendedElasticPoolMetric ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RecommendedElasticPoolMetric]'} + } + + def __init__(self, *args, **kwargs): + + super(RecommendedElasticPoolMetricPaged, self).__init__(*args, **kwargs) +class ReplicationLinkPaged(Paged): + """ + A paging container for iterating over a list of :class:`ReplicationLink ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ReplicationLink]'} + } + + def __init__(self, *args, **kwargs): + + super(ReplicationLinkPaged, self).__init__(*args, **kwargs) +class ServerAzureADAdministratorPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerAzureADAdministrator ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerAzureADAdministrator]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerAzureADAdministratorPaged, self).__init__(*args, **kwargs) +class ServerCommunicationLinkPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerCommunicationLink ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerCommunicationLink]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerCommunicationLinkPaged, self).__init__(*args, **kwargs) +class ServiceObjectivePaged(Paged): + """ + A paging container for iterating over a list of :class:`ServiceObjective ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServiceObjective]'} + } + + def __init__(self, *args, **kwargs): + + super(ServiceObjectivePaged, self).__init__(*args, **kwargs) +class ElasticPoolActivityPaged(Paged): + """ + A paging container for iterating over a list of :class:`ElasticPoolActivity ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ElasticPoolActivity]'} + } + + def __init__(self, *args, **kwargs): + + super(ElasticPoolActivityPaged, self).__init__(*args, **kwargs) +class ElasticPoolDatabaseActivityPaged(Paged): + """ + A paging container for iterating over a list of :class:`ElasticPoolDatabaseActivity ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ElasticPoolDatabaseActivity]'} + } + + def __init__(self, *args, **kwargs): + + super(ElasticPoolDatabaseActivityPaged, self).__init__(*args, **kwargs) +class ServiceTierAdvisorPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServiceTierAdvisor ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServiceTierAdvisor]'} + } + + def __init__(self, *args, **kwargs): + + super(ServiceTierAdvisorPaged, self).__init__(*args, **kwargs) +class TransparentDataEncryptionActivityPaged(Paged): + """ + A paging container for iterating over a list of :class:`TransparentDataEncryptionActivity ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TransparentDataEncryptionActivity]'} + } + + def __init__(self, *args, **kwargs): + + super(TransparentDataEncryptionActivityPaged, self).__init__(*args, **kwargs) +class ServerUsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerUsage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerUsage]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerUsagePaged, self).__init__(*args, **kwargs) +class DatabaseUsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`DatabaseUsage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseUsage]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseUsagePaged, self).__init__(*args, **kwargs) +class EncryptionProtectorPaged(Paged): + """ + A paging container for iterating over a list of :class:`EncryptionProtector ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[EncryptionProtector]'} + } + + def __init__(self, *args, **kwargs): + + super(EncryptionProtectorPaged, self).__init__(*args, **kwargs) +class FailoverGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`FailoverGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[FailoverGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(FailoverGroupPaged, self).__init__(*args, **kwargs) +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class ServerKeyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerKey ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerKey]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerKeyPaged, self).__init__(*args, **kwargs) +class SyncAgentPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncAgent ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncAgent]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncAgentPaged, self).__init__(*args, **kwargs) +class SyncAgentLinkedDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncAgentLinkedDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncAgentLinkedDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncAgentLinkedDatabasePaged, self).__init__(*args, **kwargs) +class SyncDatabaseIdPropertiesPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncDatabaseIdProperties ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncDatabaseIdProperties]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncDatabaseIdPropertiesPaged, self).__init__(*args, **kwargs) +class SyncFullSchemaPropertiesPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncFullSchemaProperties ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncFullSchemaProperties]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncFullSchemaPropertiesPaged, self).__init__(*args, **kwargs) +class SyncGroupLogPropertiesPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncGroupLogProperties ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncGroupLogProperties]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncGroupLogPropertiesPaged, self).__init__(*args, **kwargs) +class SyncGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncGroupPaged, self).__init__(*args, **kwargs) +class SyncMemberPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncMember ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncMember]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncMemberPaged, self).__init__(*args, **kwargs) +class SubscriptionUsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`SubscriptionUsage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SubscriptionUsage]'} + } + + def __init__(self, *args, **kwargs): + + super(SubscriptionUsagePaged, self).__init__(*args, **kwargs) +class VirtualClusterPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualCluster ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualCluster]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualClusterPaged, self).__init__(*args, **kwargs) +class VirtualNetworkRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualNetworkRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualNetworkRule]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualNetworkRulePaged, self).__init__(*args, **kwargs) +class DatabaseVulnerabilityAssessmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`DatabaseVulnerabilityAssessment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseVulnerabilityAssessment]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) +class JobAgentPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobAgent ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobAgent]'} + } + + def __init__(self, *args, **kwargs): + + super(JobAgentPaged, self).__init__(*args, **kwargs) +class JobCredentialPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobCredential ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobCredential]'} + } + + def __init__(self, *args, **kwargs): + + super(JobCredentialPaged, self).__init__(*args, **kwargs) +class JobExecutionPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobExecution ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobExecution]'} + } + + def __init__(self, *args, **kwargs): + + super(JobExecutionPaged, self).__init__(*args, **kwargs) +class JobPaged(Paged): + """ + A paging container for iterating over a list of :class:`Job ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Job]'} + } + + def __init__(self, *args, **kwargs): + + super(JobPaged, self).__init__(*args, **kwargs) +class JobStepPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobStep ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobStep]'} + } + + def __init__(self, *args, **kwargs): + + super(JobStepPaged, self).__init__(*args, **kwargs) +class JobTargetGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobTargetGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobTargetGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(JobTargetGroupPaged, self).__init__(*args, **kwargs) +class JobVersionPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobVersion ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobVersion]'} + } + + def __init__(self, *args, **kwargs): + + super(JobVersionPaged, self).__init__(*args, **kwargs) +class LongTermRetentionBackupPaged(Paged): + """ + A paging container for iterating over a list of :class:`LongTermRetentionBackup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[LongTermRetentionBackup]'} + } + + def __init__(self, *args, **kwargs): + + super(LongTermRetentionBackupPaged, self).__init__(*args, **kwargs) +class ManagedBackupShortTermRetentionPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedBackupShortTermRetentionPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedBackupShortTermRetentionPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedBackupShortTermRetentionPolicyPaged, self).__init__(*args, **kwargs) +class ManagedDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedDatabasePaged, self).__init__(*args, **kwargs) +class ServerDnsAliasPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerDnsAlias ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerDnsAlias]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerDnsAliasPaged, self).__init__(*args, **kwargs) +class ServerSecurityAlertPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerSecurityAlertPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerSecurityAlertPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) +class RestorableDroppedManagedDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`RestorableDroppedManagedDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RestorableDroppedManagedDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(RestorableDroppedManagedDatabasePaged, self).__init__(*args, **kwargs) +class RestorePointPaged(Paged): + """ + A paging container for iterating over a list of :class:`RestorePoint ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RestorePoint]'} + } + + def __init__(self, *args, **kwargs): + + super(RestorePointPaged, self).__init__(*args, **kwargs) +class ManagedDatabaseSecurityAlertPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedDatabaseSecurityAlertPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedDatabaseSecurityAlertPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedDatabaseSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) +class ManagedServerSecurityAlertPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedServerSecurityAlertPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedServerSecurityAlertPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedServerSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) +class SensitivityLabelPaged(Paged): + """ + A paging container for iterating over a list of :class:`SensitivityLabel ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SensitivityLabel]'} + } + + def __init__(self, *args, **kwargs): + + super(SensitivityLabelPaged, self).__init__(*args, **kwargs) +class DatabaseOperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`DatabaseOperation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseOperation]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseOperationPaged, self).__init__(*args, **kwargs) +class ElasticPoolOperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`ElasticPoolOperation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ElasticPoolOperation]'} + } + + def __init__(self, *args, **kwargs): + + super(ElasticPoolOperationPaged, self).__init__(*args, **kwargs) +class VulnerabilityAssessmentScanRecordPaged(Paged): + """ + A paging container for iterating over a list of :class:`VulnerabilityAssessmentScanRecord ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VulnerabilityAssessmentScanRecord]'} + } + + def __init__(self, *args, **kwargs): + + super(VulnerabilityAssessmentScanRecordPaged, self).__init__(*args, **kwargs) +class InstanceFailoverGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`InstanceFailoverGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[InstanceFailoverGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(InstanceFailoverGroupPaged, self).__init__(*args, **kwargs) +class BackupShortTermRetentionPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`BackupShortTermRetentionPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BackupShortTermRetentionPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(BackupShortTermRetentionPolicyPaged, self).__init__(*args, **kwargs) +class ManagedInstanceKeyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedInstanceKey ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedInstanceKey]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedInstanceKeyPaged, self).__init__(*args, **kwargs) +class ManagedInstanceEncryptionProtectorPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedInstanceEncryptionProtector ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedInstanceEncryptionProtector]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedInstanceEncryptionProtectorPaged, self).__init__(*args, **kwargs) +class RecoverableManagedDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`RecoverableManagedDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RecoverableManagedDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(RecoverableManagedDatabasePaged, self).__init__(*args, **kwargs) +class ManagedInstanceVulnerabilityAssessmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedInstanceVulnerabilityAssessment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedInstanceVulnerabilityAssessment]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedInstanceVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) +class ServerVulnerabilityAssessmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerVulnerabilityAssessment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerVulnerabilityAssessment]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) +class InstancePoolPaged(Paged): + """ + A paging container for iterating over a list of :class:`InstancePool ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[InstancePool]'} + } + + def __init__(self, *args, **kwargs): + + super(InstancePoolPaged, self).__init__(*args, **kwargs) +class UsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Usage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Usage]'} + } + + def __init__(self, *args, **kwargs): + + super(UsagePaged, self).__init__(*args, **kwargs) +class ManagedInstancePaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedInstance ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedInstance]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedInstancePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py index de1d73caf27c..0ac10a4f69f8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py @@ -85,6 +85,9 @@ class DatabaseEdition(str, Enum): data_warehouse = "DataWarehouse" system = "System" system2 = "System2" + general_purpose = "GeneralPurpose" + business_critical = "BusinessCritical" + hyperscale = "Hyperscale" class ServiceObjectiveName(str, Enum): @@ -203,6 +206,8 @@ class ElasticPoolEdition(str, Enum): basic = "Basic" standard = "Standard" premium = "Premium" + general_purpose = "GeneralPurpose" + business_critical = "BusinessCritical" class ReplicationRole(str, Enum): @@ -320,24 +325,17 @@ class FailoverGroupReplicationRole(str, Enum): secondary = "Secondary" -class IdentityType(str, Enum): - - system_assigned = "SystemAssigned" - - -class ManagedInstanceProxyOverride(str, Enum): - - proxy = "Proxy" - redirect = "Redirect" - default = "Default" - - class OperationOrigin(str, Enum): user = "user" system = "system" +class IdentityType(str, Enum): + + system_assigned = "SystemAssigned" + + class SyncAgentState(str, Enum): online = "Online" @@ -612,6 +610,8 @@ class DatabaseStatus(str, Enum): paused = "Paused" resuming = "Resuming" scaling = "Scaling" + offline_changing_dw_performance_tiers = "OfflineChangingDwPerformanceTiers" + online_changing_dw_performance_tiers = "OnlineChangingDwPerformanceTiers" class DatabaseLicenseType(str, Enum): @@ -659,6 +659,31 @@ class InstanceFailoverGroupReplicationRole(str, Enum): secondary = "Secondary" +class InstancePoolLicenseType(str, Enum): + + license_included = "LicenseIncluded" + base_price = "BasePrice" + + +class ManagedServerCreateMode(str, Enum): + + default = "Default" + point_in_time_restore = "PointInTimeRestore" + + +class ManagedInstanceLicenseType(str, Enum): + + license_included = "LicenseIncluded" + base_price = "BasePrice" + + +class ManagedInstanceProxyOverride(str, Enum): + + proxy = "Proxy" + redirect = "Redirect" + default = "Default" + + class LongTermRetentionDatabaseState(str, Enum): all = "All" diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options.py deleted file mode 100644 index 42c5aa7ac8a1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutomaticTuningOptions(Model): - """Automatic tuning properties for individual advisors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param desired_state: Automatic tuning option desired state. Possible - values include: 'Off', 'On', 'Default' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired - :ivar actual_state: Automatic tuning option actual state. Possible values - include: 'Off', 'On' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual - :ivar reason_code: Reason code if desired and actual state are different. - :vartype reason_code: int - :ivar reason_desc: Reason description if desired and actual state are - different. Possible values include: 'Default', 'Disabled', - 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', - 'QueryStoreReadOnly', 'NotSupported' - :vartype reason_desc: str or - ~azure.mgmt.sql.models.AutomaticTuningDisabledReason - """ - - _validation = { - 'actual_state': {'readonly': True}, - 'reason_code': {'readonly': True}, - 'reason_desc': {'readonly': True}, - } - - _attribute_map = { - 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, - 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, - 'reason_code': {'key': 'reasonCode', 'type': 'int'}, - 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningDisabledReason'}, - } - - def __init__(self, **kwargs): - super(AutomaticTuningOptions, self).__init__(**kwargs) - self.desired_state = kwargs.get('desired_state', None) - self.actual_state = None - self.reason_code = None - self.reason_desc = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options_py3.py deleted file mode 100644 index b55fd35d8157..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutomaticTuningOptions(Model): - """Automatic tuning properties for individual advisors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param desired_state: Automatic tuning option desired state. Possible - values include: 'Off', 'On', 'Default' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired - :ivar actual_state: Automatic tuning option actual state. Possible values - include: 'Off', 'On' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual - :ivar reason_code: Reason code if desired and actual state are different. - :vartype reason_code: int - :ivar reason_desc: Reason description if desired and actual state are - different. Possible values include: 'Default', 'Disabled', - 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', - 'QueryStoreReadOnly', 'NotSupported' - :vartype reason_desc: str or - ~azure.mgmt.sql.models.AutomaticTuningDisabledReason - """ - - _validation = { - 'actual_state': {'readonly': True}, - 'reason_code': {'readonly': True}, - 'reason_desc': {'readonly': True}, - } - - _attribute_map = { - 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, - 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, - 'reason_code': {'key': 'reasonCode', 'type': 'int'}, - 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningDisabledReason'}, - } - - def __init__(self, *, desired_state=None, **kwargs) -> None: - super(AutomaticTuningOptions, self).__init__(**kwargs) - self.desired_state = desired_state - self.actual_state = None - self.reason_code = None - self.reason_desc = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options.py deleted file mode 100644 index ef7fbcc75e4b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutomaticTuningServerOptions(Model): - """Automatic tuning properties for individual advisors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param desired_state: Automatic tuning option desired state. Possible - values include: 'Off', 'On', 'Default' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired - :ivar actual_state: Automatic tuning option actual state. Possible values - include: 'Off', 'On' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual - :ivar reason_code: Reason code if desired and actual state are different. - :vartype reason_code: int - :ivar reason_desc: Reason description if desired and actual state are - different. Possible values include: 'Default', 'Disabled', - 'AutoConfigured' - :vartype reason_desc: str or - ~azure.mgmt.sql.models.AutomaticTuningServerReason - """ - - _validation = { - 'actual_state': {'readonly': True}, - 'reason_code': {'readonly': True}, - 'reason_desc': {'readonly': True}, - } - - _attribute_map = { - 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, - 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, - 'reason_code': {'key': 'reasonCode', 'type': 'int'}, - 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningServerReason'}, - } - - def __init__(self, **kwargs): - super(AutomaticTuningServerOptions, self).__init__(**kwargs) - self.desired_state = kwargs.get('desired_state', None) - self.actual_state = None - self.reason_code = None - self.reason_desc = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options_py3.py deleted file mode 100644 index 28e5fc0873ad..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutomaticTuningServerOptions(Model): - """Automatic tuning properties for individual advisors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param desired_state: Automatic tuning option desired state. Possible - values include: 'Off', 'On', 'Default' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired - :ivar actual_state: Automatic tuning option actual state. Possible values - include: 'Off', 'On' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual - :ivar reason_code: Reason code if desired and actual state are different. - :vartype reason_code: int - :ivar reason_desc: Reason description if desired and actual state are - different. Possible values include: 'Default', 'Disabled', - 'AutoConfigured' - :vartype reason_desc: str or - ~azure.mgmt.sql.models.AutomaticTuningServerReason - """ - - _validation = { - 'actual_state': {'readonly': True}, - 'reason_code': {'readonly': True}, - 'reason_desc': {'readonly': True}, - } - - _attribute_map = { - 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, - 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, - 'reason_code': {'key': 'reasonCode', 'type': 'int'}, - 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningServerReason'}, - } - - def __init__(self, *, desired_state=None, **kwargs) -> None: - super(AutomaticTuningServerOptions, self).__init__(**kwargs) - self.desired_state = desired_state - self.actual_state = None - self.reason_code = None - self.reason_desc = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy.py deleted file mode 100644 index 544110988a82..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class BackupLongTermRetentionPolicy(ProxyResource): - """A long term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param weekly_retention: The weekly retention policy for an LTR backup in - an ISO 8601 format. - :type weekly_retention: str - :param monthly_retention: The monthly retention policy for an LTR backup - in an ISO 8601 format. - :type monthly_retention: str - :param yearly_retention: The yearly retention policy for an LTR backup in - an ISO 8601 format. - :type yearly_retention: str - :param week_of_year: The week of year to take the yearly backup in an ISO - 8601 format. - :type week_of_year: int - """ - - _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'}, - 'weekly_retention': {'key': 'properties.weeklyRetention', 'type': 'str'}, - 'monthly_retention': {'key': 'properties.monthlyRetention', 'type': 'str'}, - 'yearly_retention': {'key': 'properties.yearlyRetention', 'type': 'str'}, - 'week_of_year': {'key': 'properties.weekOfYear', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(BackupLongTermRetentionPolicy, self).__init__(**kwargs) - self.weekly_retention = kwargs.get('weekly_retention', None) - self.monthly_retention = kwargs.get('monthly_retention', None) - self.yearly_retention = kwargs.get('yearly_retention', None) - self.week_of_year = kwargs.get('week_of_year', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_py3.py deleted file mode 100644 index 6e7cb8ace394..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class BackupLongTermRetentionPolicy(ProxyResource): - """A long term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param weekly_retention: The weekly retention policy for an LTR backup in - an ISO 8601 format. - :type weekly_retention: str - :param monthly_retention: The monthly retention policy for an LTR backup - in an ISO 8601 format. - :type monthly_retention: str - :param yearly_retention: The yearly retention policy for an LTR backup in - an ISO 8601 format. - :type yearly_retention: str - :param week_of_year: The week of year to take the yearly backup in an ISO - 8601 format. - :type week_of_year: int - """ - - _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'}, - 'weekly_retention': {'key': 'properties.weeklyRetention', 'type': 'str'}, - 'monthly_retention': {'key': 'properties.monthlyRetention', 'type': 'str'}, - 'yearly_retention': {'key': 'properties.yearlyRetention', 'type': 'str'}, - 'week_of_year': {'key': 'properties.weekOfYear', 'type': 'int'}, - } - - def __init__(self, *, weekly_retention: str=None, monthly_retention: str=None, yearly_retention: str=None, week_of_year: int=None, **kwargs) -> None: - super(BackupLongTermRetentionPolicy, self).__init__(**kwargs) - self.weekly_retention = weekly_retention - self.monthly_retention = monthly_retention - self.yearly_retention = yearly_retention - self.week_of_year = week_of_year diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy.py deleted file mode 100644 index 1d4fba2cfff4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class BackupShortTermRetentionPolicy(ProxyResource): - """A short term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param retention_days: The backup retention period in days. This is how - many days Point-in-Time Restore will be supported. - :type retention_days: int - """ - - _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'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) - self.retention_days = kwargs.get('retention_days', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_paged.py deleted file mode 100644 index 16d31e341795..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class BackupShortTermRetentionPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`BackupShortTermRetentionPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[BackupShortTermRetentionPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(BackupShortTermRetentionPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_py3.py deleted file mode 100644 index 9df25577baf3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class BackupShortTermRetentionPolicy(ProxyResource): - """A short term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param retention_days: The backup retention period in days. This is how - many days Point-in-Time Restore will be supported. - :type retention_days: int - """ - - _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'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, *, retention_days: int=None, **kwargs) -> None: - super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) - self.retention_days = retention_days diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request.py deleted file mode 100644 index 345059f6dd49..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailabilityRequest(Model): - """A request to check whether the specified name for a resource is available. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name whose availability is to be checked. - :type name: str - :ivar type: Required. The type of resource that is used as the scope of - the availability check. Default value: "Microsoft.Sql/servers" . - :vartype type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - type = "Microsoft.Sql/servers" - - def __init__(self, **kwargs): - super(CheckNameAvailabilityRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request_py3.py deleted file mode 100644 index 5399ec3a7ffb..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailabilityRequest(Model): - """A request to check whether the specified name for a resource is available. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name whose availability is to be checked. - :type name: str - :ivar type: Required. The type of resource that is used as the scope of - the availability check. Default value: "Microsoft.Sql/servers" . - :vartype type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - type = "Microsoft.Sql/servers" - - def __init__(self, *, name: str, **kwargs) -> None: - super(CheckNameAvailabilityRequest, self).__init__(**kwargs) - self.name = name diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response.py deleted file mode 100644 index 40f429db82da..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailabilityResponse(Model): - """A response indicating whether the specified name for a resource is - available. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar available: True if the name is available, otherwise false. - :vartype available: bool - :ivar message: A message explaining why the name is unavailable. Will be - null if the name is available. - :vartype message: str - :ivar name: The name whose availability was checked. - :vartype name: str - :ivar reason: The reason code explaining why the name is unavailable. Will - be null if the name is available. Possible values include: 'Invalid', - 'AlreadyExists' - :vartype reason: str or ~azure.mgmt.sql.models.CheckNameAvailabilityReason - """ - - _validation = { - 'available': {'readonly': True}, - 'message': {'readonly': True}, - 'name': {'readonly': True}, - 'reason': {'readonly': True}, - } - - _attribute_map = { - 'available': {'key': 'available', 'type': 'bool'}, - 'message': {'key': 'message', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'reason': {'key': 'reason', 'type': 'CheckNameAvailabilityReason'}, - } - - def __init__(self, **kwargs): - super(CheckNameAvailabilityResponse, self).__init__(**kwargs) - self.available = None - self.message = None - self.name = None - self.reason = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response_py3.py deleted file mode 100644 index 613c8fd41661..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailabilityResponse(Model): - """A response indicating whether the specified name for a resource is - available. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar available: True if the name is available, otherwise false. - :vartype available: bool - :ivar message: A message explaining why the name is unavailable. Will be - null if the name is available. - :vartype message: str - :ivar name: The name whose availability was checked. - :vartype name: str - :ivar reason: The reason code explaining why the name is unavailable. Will - be null if the name is available. Possible values include: 'Invalid', - 'AlreadyExists' - :vartype reason: str or ~azure.mgmt.sql.models.CheckNameAvailabilityReason - """ - - _validation = { - 'available': {'readonly': True}, - 'message': {'readonly': True}, - 'name': {'readonly': True}, - 'reason': {'readonly': True}, - } - - _attribute_map = { - 'available': {'key': 'available', 'type': 'bool'}, - 'message': {'key': 'message', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'reason': {'key': 'reason', 'type': 'CheckNameAvailabilityReason'}, - } - - def __init__(self, **kwargs) -> None: - super(CheckNameAvailabilityResponse, self).__init__(**kwargs) - self.available = None - self.message = None - self.name = None - self.reason = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition.py deleted file mode 100644 index 926012a21f09..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CompleteDatabaseRestoreDefinition(Model): - """Contains the information necessary to perform a complete database restore - operation. - - All required parameters must be populated in order to send to Azure. - - :param last_backup_name: Required. The last backup name to apply - :type last_backup_name: str - """ - - _validation = { - 'last_backup_name': {'required': True}, - } - - _attribute_map = { - 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CompleteDatabaseRestoreDefinition, self).__init__(**kwargs) - self.last_backup_name = kwargs.get('last_backup_name', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition_py3.py deleted file mode 100644 index 8b3c7f3da1f8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CompleteDatabaseRestoreDefinition(Model): - """Contains the information necessary to perform a complete database restore - operation. - - All required parameters must be populated in order to send to Azure. - - :param last_backup_name: Required. The last backup name to apply - :type last_backup_name: str - """ - - _validation = { - 'last_backup_name': {'required': True}, - } - - _attribute_map = { - 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, - } - - def __init__(self, *, last_backup_name: str, **kwargs) -> None: - super(CompleteDatabaseRestoreDefinition, self).__init__(**kwargs) - self.last_backup_name = last_backup_name diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition.py deleted file mode 100644 index 34ae6626306e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreateDatabaseRestorePointDefinition(Model): - """Contains the information necessary to perform a create database restore - point operation. - - All required parameters must be populated in order to send to Azure. - - :param restore_point_label: Required. The restore point label to apply - :type restore_point_label: str - """ - - _validation = { - 'restore_point_label': {'required': True}, - } - - _attribute_map = { - 'restore_point_label': {'key': 'restorePointLabel', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CreateDatabaseRestorePointDefinition, self).__init__(**kwargs) - self.restore_point_label = kwargs.get('restore_point_label', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition_py3.py deleted file mode 100644 index 7200fc8c236a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreateDatabaseRestorePointDefinition(Model): - """Contains the information necessary to perform a create database restore - point operation. - - All required parameters must be populated in order to send to Azure. - - :param restore_point_label: Required. The restore point label to apply - :type restore_point_label: str - """ - - _validation = { - 'restore_point_label': {'required': True}, - } - - _attribute_map = { - 'restore_point_label': {'key': 'restorePointLabel', 'type': 'str'}, - } - - def __init__(self, *, restore_point_label: str, **kwargs) -> None: - super(CreateDatabaseRestorePointDefinition, self).__init__(**kwargs) - self.restore_point_label = restore_point_label diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy.py deleted file mode 100644 index a872d3af9676..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DataMaskingPolicy(ProxyResource): - """Represents a database data masking policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param data_masking_state: Required. The state of the data masking policy. - Possible values include: 'Disabled', 'Enabled' - :type data_masking_state: str or ~azure.mgmt.sql.models.DataMaskingState - :param exempt_principals: The list of the exempt principals. Specifies the - semicolon-separated list of database users for which the data masking - policy does not apply. The specified users receive data results without - masking for all of the database queries. - :type exempt_principals: str - :ivar application_principals: The list of the application principals. This - is a legacy parameter and is no longer used. - :vartype application_principals: str - :ivar masking_level: The masking level. This is a legacy parameter and is - no longer used. - :vartype masking_level: str - :ivar location: The location of the data masking policy. - :vartype location: str - :ivar kind: The kind of data masking policy. Metadata, used for Azure - portal. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'data_masking_state': {'required': True}, - 'application_principals': {'readonly': True}, - 'masking_level': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data_masking_state': {'key': 'properties.dataMaskingState', 'type': 'DataMaskingState'}, - 'exempt_principals': {'key': 'properties.exemptPrincipals', 'type': 'str'}, - 'application_principals': {'key': 'properties.applicationPrincipals', 'type': 'str'}, - 'masking_level': {'key': 'properties.maskingLevel', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataMaskingPolicy, self).__init__(**kwargs) - self.data_masking_state = kwargs.get('data_masking_state', None) - self.exempt_principals = kwargs.get('exempt_principals', None) - self.application_principals = None - self.masking_level = None - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy_py3.py deleted file mode 100644 index c2227aeb60da..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DataMaskingPolicy(ProxyResource): - """Represents a database data masking policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param data_masking_state: Required. The state of the data masking policy. - Possible values include: 'Disabled', 'Enabled' - :type data_masking_state: str or ~azure.mgmt.sql.models.DataMaskingState - :param exempt_principals: The list of the exempt principals. Specifies the - semicolon-separated list of database users for which the data masking - policy does not apply. The specified users receive data results without - masking for all of the database queries. - :type exempt_principals: str - :ivar application_principals: The list of the application principals. This - is a legacy parameter and is no longer used. - :vartype application_principals: str - :ivar masking_level: The masking level. This is a legacy parameter and is - no longer used. - :vartype masking_level: str - :ivar location: The location of the data masking policy. - :vartype location: str - :ivar kind: The kind of data masking policy. Metadata, used for Azure - portal. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'data_masking_state': {'required': True}, - 'application_principals': {'readonly': True}, - 'masking_level': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data_masking_state': {'key': 'properties.dataMaskingState', 'type': 'DataMaskingState'}, - 'exempt_principals': {'key': 'properties.exemptPrincipals', 'type': 'str'}, - 'application_principals': {'key': 'properties.applicationPrincipals', 'type': 'str'}, - 'masking_level': {'key': 'properties.maskingLevel', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, data_masking_state, exempt_principals: str=None, **kwargs) -> None: - super(DataMaskingPolicy, self).__init__(**kwargs) - self.data_masking_state = data_masking_state - self.exempt_principals = exempt_principals - self.application_principals = None - self.masking_level = None - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule.py deleted file mode 100644 index 9c31fca591b6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DataMaskingRule(ProxyResource): - """Represents a database data masking rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar data_masking_rule_id: The rule Id. - :vartype data_masking_rule_id: str - :param alias_name: The alias name. This is a legacy parameter and is no - longer used. - :type alias_name: str - :param rule_state: The rule state. Used to delete a rule. To delete an - existing rule, specify the schemaName, tableName, columnName, - maskingFunction, and specify ruleState as disabled. However, if the rule - doesn't already exist, the rule will be created with ruleState set to - enabled, regardless of the provided value of ruleState. Possible values - include: 'Disabled', 'Enabled' - :type rule_state: str or ~azure.mgmt.sql.models.DataMaskingRuleState - :param schema_name: Required. The schema name on which the data masking - rule is applied. - :type schema_name: str - :param table_name: Required. The table name on which the data masking rule - is applied. - :type table_name: str - :param column_name: Required. The column name on which the data masking - rule is applied. - :type column_name: str - :param masking_function: Required. The masking function that is used for - the data masking rule. Possible values include: 'Default', 'CCN', 'Email', - 'Number', 'SSN', 'Text' - :type masking_function: str or ~azure.mgmt.sql.models.DataMaskingFunction - :param number_from: The numberFrom property of the masking rule. Required - if maskingFunction is set to Number, otherwise this parameter will be - ignored. - :type number_from: str - :param number_to: The numberTo property of the data masking rule. Required - if maskingFunction is set to Number, otherwise this parameter will be - ignored. - :type number_to: str - :param prefix_size: If maskingFunction is set to Text, the number of - characters to show unmasked in the beginning of the string. Otherwise, - this parameter will be ignored. - :type prefix_size: str - :param suffix_size: If maskingFunction is set to Text, the number of - characters to show unmasked at the end of the string. Otherwise, this - parameter will be ignored. - :type suffix_size: str - :param replacement_string: If maskingFunction is set to Text, the - character to use for masking the unexposed part of the string. Otherwise, - this parameter will be ignored. - :type replacement_string: str - :ivar location: The location of the data masking rule. - :vartype location: str - :ivar kind: The kind of Data Masking Rule. Metadata, used for Azure - portal. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'data_masking_rule_id': {'readonly': True}, - 'schema_name': {'required': True}, - 'table_name': {'required': True}, - 'column_name': {'required': True}, - 'masking_function': {'required': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data_masking_rule_id': {'key': 'properties.id', 'type': 'str'}, - 'alias_name': {'key': 'properties.aliasName', 'type': 'str'}, - 'rule_state': {'key': 'properties.ruleState', 'type': 'DataMaskingRuleState'}, - 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, - 'table_name': {'key': 'properties.tableName', 'type': 'str'}, - 'column_name': {'key': 'properties.columnName', 'type': 'str'}, - 'masking_function': {'key': 'properties.maskingFunction', 'type': 'DataMaskingFunction'}, - 'number_from': {'key': 'properties.numberFrom', 'type': 'str'}, - 'number_to': {'key': 'properties.numberTo', 'type': 'str'}, - 'prefix_size': {'key': 'properties.prefixSize', 'type': 'str'}, - 'suffix_size': {'key': 'properties.suffixSize', 'type': 'str'}, - 'replacement_string': {'key': 'properties.replacementString', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataMaskingRule, self).__init__(**kwargs) - self.data_masking_rule_id = None - self.alias_name = kwargs.get('alias_name', None) - self.rule_state = kwargs.get('rule_state', None) - self.schema_name = kwargs.get('schema_name', None) - self.table_name = kwargs.get('table_name', None) - self.column_name = kwargs.get('column_name', None) - self.masking_function = kwargs.get('masking_function', None) - self.number_from = kwargs.get('number_from', None) - self.number_to = kwargs.get('number_to', None) - self.prefix_size = kwargs.get('prefix_size', None) - self.suffix_size = kwargs.get('suffix_size', None) - self.replacement_string = kwargs.get('replacement_string', None) - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_paged.py deleted file mode 100644 index 4e1eed7b9f51..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DataMaskingRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`DataMaskingRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DataMaskingRule]'} - } - - def __init__(self, *args, **kwargs): - - super(DataMaskingRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_py3.py deleted file mode 100644 index 775fd78a2d6b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_py3.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DataMaskingRule(ProxyResource): - """Represents a database data masking rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar data_masking_rule_id: The rule Id. - :vartype data_masking_rule_id: str - :param alias_name: The alias name. This is a legacy parameter and is no - longer used. - :type alias_name: str - :param rule_state: The rule state. Used to delete a rule. To delete an - existing rule, specify the schemaName, tableName, columnName, - maskingFunction, and specify ruleState as disabled. However, if the rule - doesn't already exist, the rule will be created with ruleState set to - enabled, regardless of the provided value of ruleState. Possible values - include: 'Disabled', 'Enabled' - :type rule_state: str or ~azure.mgmt.sql.models.DataMaskingRuleState - :param schema_name: Required. The schema name on which the data masking - rule is applied. - :type schema_name: str - :param table_name: Required. The table name on which the data masking rule - is applied. - :type table_name: str - :param column_name: Required. The column name on which the data masking - rule is applied. - :type column_name: str - :param masking_function: Required. The masking function that is used for - the data masking rule. Possible values include: 'Default', 'CCN', 'Email', - 'Number', 'SSN', 'Text' - :type masking_function: str or ~azure.mgmt.sql.models.DataMaskingFunction - :param number_from: The numberFrom property of the masking rule. Required - if maskingFunction is set to Number, otherwise this parameter will be - ignored. - :type number_from: str - :param number_to: The numberTo property of the data masking rule. Required - if maskingFunction is set to Number, otherwise this parameter will be - ignored. - :type number_to: str - :param prefix_size: If maskingFunction is set to Text, the number of - characters to show unmasked in the beginning of the string. Otherwise, - this parameter will be ignored. - :type prefix_size: str - :param suffix_size: If maskingFunction is set to Text, the number of - characters to show unmasked at the end of the string. Otherwise, this - parameter will be ignored. - :type suffix_size: str - :param replacement_string: If maskingFunction is set to Text, the - character to use for masking the unexposed part of the string. Otherwise, - this parameter will be ignored. - :type replacement_string: str - :ivar location: The location of the data masking rule. - :vartype location: str - :ivar kind: The kind of Data Masking Rule. Metadata, used for Azure - portal. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'data_masking_rule_id': {'readonly': True}, - 'schema_name': {'required': True}, - 'table_name': {'required': True}, - 'column_name': {'required': True}, - 'masking_function': {'required': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data_masking_rule_id': {'key': 'properties.id', 'type': 'str'}, - 'alias_name': {'key': 'properties.aliasName', 'type': 'str'}, - 'rule_state': {'key': 'properties.ruleState', 'type': 'DataMaskingRuleState'}, - 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, - 'table_name': {'key': 'properties.tableName', 'type': 'str'}, - 'column_name': {'key': 'properties.columnName', 'type': 'str'}, - 'masking_function': {'key': 'properties.maskingFunction', 'type': 'DataMaskingFunction'}, - 'number_from': {'key': 'properties.numberFrom', 'type': 'str'}, - 'number_to': {'key': 'properties.numberTo', 'type': 'str'}, - 'prefix_size': {'key': 'properties.prefixSize', 'type': 'str'}, - 'suffix_size': {'key': 'properties.suffixSize', 'type': 'str'}, - 'replacement_string': {'key': 'properties.replacementString', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, schema_name: str, table_name: str, column_name: str, masking_function, alias_name: str=None, rule_state=None, number_from: str=None, number_to: str=None, prefix_size: str=None, suffix_size: str=None, replacement_string: str=None, **kwargs) -> None: - super(DataMaskingRule, self).__init__(**kwargs) - self.data_masking_rule_id = None - self.alias_name = alias_name - self.rule_state = rule_state - self.schema_name = schema_name - self.table_name = table_name - self.column_name = column_name - self.masking_function = masking_function - self.number_from = number_from - self.number_to = number_to - self.prefix_size = prefix_size - self.suffix_size = suffix_size - self.replacement_string = replacement_string - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database.py deleted file mode 100644 index f3f66d024a7a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database.py +++ /dev/null @@ -1,237 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class Database(TrackedResource): - """A database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :ivar kind: Kind of database. This is metadata used for the Azure portal - experience. - :vartype kind: str - :ivar managed_by: Resource that manages the database. - :vartype managed_by: str - :param create_mode: Specifies the mode of database creation. - Default: regular database creation. - Copy: creates a database as a copy of an existing database. - sourceDatabaseId must be specified as the resource ID of the source - database. - Secondary: creates a database as a secondary replica of an existing - database. sourceDatabaseId must be specified as the resource ID of the - existing primary database. - PointInTimeRestore: Creates a database by restoring a point in time backup - of an existing database. sourceDatabaseId must be specified as the - resource ID of the existing database, and restorePointInTime must be - specified. - Recovery: Creates a database by restoring a geo-replicated backup. - sourceDatabaseId must be specified as the recoverable database resource ID - to restore. - Restore: Creates a database by restoring a backup of a deleted database. - sourceDatabaseId must be specified. If sourceDatabaseId is the database's - original resource ID, then sourceDatabaseDeletionDate must be specified. - Otherwise sourceDatabaseId must be the restorable dropped database - resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime - may also be specified to restore from an earlier point in time. - RestoreLongTermRetentionBackup: Creates a database by restoring from a - long term retention vault. recoveryServicesRecoveryPointResourceId must be - specified as the recovery point resource ID. - Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for - DataWarehouse edition. Possible values include: 'Default', 'Copy', - 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', - 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', - 'RestoreLongTermRetentionBackup', 'OnlineSecondary' - :type create_mode: str or ~azure.mgmt.sql.models.CreateMode - :param collation: The collation of the database. - :type collation: str - :param max_size_bytes: The max size of the database expressed in bytes. - :type max_size_bytes: long - :param sample_name: The name of the sample schema to apply when creating - this database. Possible values include: 'AdventureWorksLT', - 'WideWorldImportersStd', 'WideWorldImportersFull' - :type sample_name: str or ~azure.mgmt.sql.models.SampleName - :param elastic_pool_id: The resource identifier of the elastic pool - containing this database. - :type elastic_pool_id: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :ivar status: The status of the database. Possible values include: - 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', - 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', - 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', - 'Paused', 'Resuming', 'Scaling' - :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus - :ivar database_id: The ID of the database. - :vartype database_id: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar current_service_objective_name: The current service level objective - name of the database. - :vartype current_service_objective_name: str - :ivar requested_service_objective_name: The requested service level - objective name of the database. - :vartype requested_service_objective_name: str - :ivar default_secondary_location: The default secondary region for this - database. - :vartype default_secondary_location: str - :ivar failover_group_id: Failover Group resource identifier that this - database belongs to. - :vartype failover_group_id: str - :param restore_point_in_time: Specifies the point in time (ISO8601 format) - of the source database that will be restored to create the new database. - :type restore_point_in_time: datetime - :param source_database_deletion_date: Specifies the time that the database - was deleted. - :type source_database_deletion_date: datetime - :param recovery_services_recovery_point_id: The resource identifier of the - recovery point associated with create operation of this database. - :type recovery_services_recovery_point_id: str - :param long_term_retention_backup_resource_id: The resource identifier of - the long term retention backup associated with create operation of this - database. - :type long_term_retention_backup_resource_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param restorable_dropped_database_id: The resource identifier of the - restorable dropped database associated with create operation of this - database. - :type restorable_dropped_database_id: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param zone_redundant: Whether or not this database is zone redundant, - which means the replicas of this database will be spread across multiple - availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this database. Possible - values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType - :ivar max_log_size_bytes: The max log size for this database. - :vartype max_log_size_bytes: long - :ivar earliest_restore_date: This records the earliest start date and time - that restore is available for this database (ISO8601 format). - :vartype earliest_restore_date: datetime - :param read_scale: The state of read-only routing. If enabled, connections - that have application intent set to readonly in their connection string - may be routed to a readonly secondary replica in the same region. Possible - values include: 'Enabled', 'Disabled' - :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale - :ivar current_sku: The name and tier of the SKU. - :vartype current_sku: ~azure.mgmt.sql.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'managed_by': {'readonly': True}, - 'status': {'readonly': True}, - 'database_id': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'current_service_objective_name': {'readonly': True}, - 'requested_service_objective_name': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - 'max_log_size_bytes': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'current_sku': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, - 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, - 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, - 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, - 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, - 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs): - super(Database, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.kind = None - self.managed_by = None - self.create_mode = kwargs.get('create_mode', None) - self.collation = kwargs.get('collation', None) - self.max_size_bytes = kwargs.get('max_size_bytes', None) - self.sample_name = kwargs.get('sample_name', None) - self.elastic_pool_id = kwargs.get('elastic_pool_id', None) - self.source_database_id = kwargs.get('source_database_id', None) - self.status = None - self.database_id = None - self.creation_date = None - self.current_service_objective_name = None - self.requested_service_objective_name = None - self.default_secondary_location = None - self.failover_group_id = None - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.source_database_deletion_date = kwargs.get('source_database_deletion_date', None) - self.recovery_services_recovery_point_id = kwargs.get('recovery_services_recovery_point_id', None) - self.long_term_retention_backup_resource_id = kwargs.get('long_term_retention_backup_resource_id', None) - self.recoverable_database_id = kwargs.get('recoverable_database_id', None) - self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) - self.catalog_collation = kwargs.get('catalog_collation', None) - self.zone_redundant = kwargs.get('zone_redundant', None) - self.license_type = kwargs.get('license_type', None) - self.max_log_size_bytes = None - self.earliest_restore_date = None - self.read_scale = kwargs.get('read_scale', None) - self.current_sku = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning.py deleted file mode 100644 index eca56cffda2c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseAutomaticTuning(ProxyResource): - """Database-level Automatic Tuning. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param desired_state: Automatic tuning desired state. Possible values - include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode - :ivar actual_state: Automatic tuning actual state. Possible values - include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - :vartype actual_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode - :param options: Automatic tuning options definition. - :type options: dict[str, ~azure.mgmt.sql.models.AutomaticTuningOptions] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'actual_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningMode'}, - 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningMode'}, - 'options': {'key': 'properties.options', 'type': '{AutomaticTuningOptions}'}, - } - - def __init__(self, **kwargs): - super(DatabaseAutomaticTuning, self).__init__(**kwargs) - self.desired_state = kwargs.get('desired_state', None) - self.actual_state = None - self.options = kwargs.get('options', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning_py3.py deleted file mode 100644 index 86bb068ce54f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseAutomaticTuning(ProxyResource): - """Database-level Automatic Tuning. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param desired_state: Automatic tuning desired state. Possible values - include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode - :ivar actual_state: Automatic tuning actual state. Possible values - include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - :vartype actual_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode - :param options: Automatic tuning options definition. - :type options: dict[str, ~azure.mgmt.sql.models.AutomaticTuningOptions] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'actual_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningMode'}, - 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningMode'}, - 'options': {'key': 'properties.options', 'type': '{AutomaticTuningOptions}'}, - } - - def __init__(self, *, desired_state=None, options=None, **kwargs) -> None: - super(DatabaseAutomaticTuning, self).__init__(**kwargs) - self.desired_state = desired_state - self.actual_state = None - self.options = options diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy.py deleted file mode 100644 index 6db06ede30ad..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseBlobAuditingPolicy(ProxyResource): - """A database blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Resource kind. - :vartype kind: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DatabaseBlobAuditingPolicy, self).__init__(**kwargs) - self.kind = None - self.state = kwargs.get('state', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) - self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) - self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) - self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy_py3.py deleted file mode 100644 index 2acc43dae952..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy_py3.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseBlobAuditingPolicy(ProxyResource): - """A database blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Resource kind. - :vartype kind: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: - super(DatabaseBlobAuditingPolicy, self).__init__(**kwargs) - self.kind = None - self.state = state - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.audit_actions_and_groups = audit_actions_and_groups - self.storage_account_subscription_id = storage_account_subscription_id - self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use - self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation.py deleted file mode 100644 index fec6e0e19b64..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseOperation(ProxyResource): - """A database operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_name: The name of the database the operation is being - performed on. - :vartype database_name: str - :ivar operation: The name of operation. - :vartype operation: str - :ivar operation_friendly_name: The friendly name of operation. - :vartype operation_friendly_name: str - :ivar percent_complete: The percentage of the operation completed. - :vartype percent_complete: int - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar start_time: The operation start time. - :vartype start_time: datetime - :ivar state: The operation state. Possible values include: 'Pending', - 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', 'Cancelled' - :vartype state: str or ~azure.mgmt.sql.models.ManagementOperationState - :ivar error_code: The operation error code. - :vartype error_code: int - :ivar error_description: The operation error description. - :vartype error_description: str - :ivar error_severity: The operation error severity. - :vartype error_severity: int - :ivar is_user_error: Whether or not the error is a user error. - :vartype is_user_error: bool - :ivar estimated_completion_time: The estimated completion time of the - operation. - :vartype estimated_completion_time: datetime - :ivar description: The operation description. - :vartype description: str - :ivar is_cancellable: Whether the operation can be cancelled. - :vartype is_cancellable: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_name': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_friendly_name': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_description': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'is_user_error': {'readonly': True}, - 'estimated_completion_time': {'readonly': True}, - 'description': {'readonly': True}, - 'is_cancellable': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, - 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DatabaseOperation, self).__init__(**kwargs) - self.database_name = None - self.operation = None - self.operation_friendly_name = None - self.percent_complete = None - self.server_name = None - self.start_time = None - self.state = None - self.error_code = None - self.error_description = None - self.error_severity = None - self.is_user_error = None - self.estimated_completion_time = None - self.description = None - self.is_cancellable = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_paged.py deleted file mode 100644 index 4c22372df877..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseOperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`DatabaseOperation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseOperation]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseOperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_py3.py deleted file mode 100644 index 66fb0bb0c602..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_py3.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseOperation(ProxyResource): - """A database operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_name: The name of the database the operation is being - performed on. - :vartype database_name: str - :ivar operation: The name of operation. - :vartype operation: str - :ivar operation_friendly_name: The friendly name of operation. - :vartype operation_friendly_name: str - :ivar percent_complete: The percentage of the operation completed. - :vartype percent_complete: int - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar start_time: The operation start time. - :vartype start_time: datetime - :ivar state: The operation state. Possible values include: 'Pending', - 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', 'Cancelled' - :vartype state: str or ~azure.mgmt.sql.models.ManagementOperationState - :ivar error_code: The operation error code. - :vartype error_code: int - :ivar error_description: The operation error description. - :vartype error_description: str - :ivar error_severity: The operation error severity. - :vartype error_severity: int - :ivar is_user_error: Whether or not the error is a user error. - :vartype is_user_error: bool - :ivar estimated_completion_time: The estimated completion time of the - operation. - :vartype estimated_completion_time: datetime - :ivar description: The operation description. - :vartype description: str - :ivar is_cancellable: Whether the operation can be cancelled. - :vartype is_cancellable: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_name': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_friendly_name': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_description': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'is_user_error': {'readonly': True}, - 'estimated_completion_time': {'readonly': True}, - 'description': {'readonly': True}, - 'is_cancellable': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, - 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, - } - - def __init__(self, **kwargs) -> None: - super(DatabaseOperation, self).__init__(**kwargs) - self.database_name = None - self.operation = None - self.operation_friendly_name = None - self.percent_complete = None - self.server_name = None - self.start_time = None - self.state = None - self.error_code = None - self.error_description = None - self.error_severity = None - self.is_user_error = None - self.estimated_completion_time = None - self.description = None - self.is_cancellable = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_paged.py deleted file mode 100644 index bc3842934a39..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`Database ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Database]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py deleted file mode 100644 index 9cfb4d07a7e6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py +++ /dev/null @@ -1,237 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class Database(TrackedResource): - """A database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :ivar kind: Kind of database. This is metadata used for the Azure portal - experience. - :vartype kind: str - :ivar managed_by: Resource that manages the database. - :vartype managed_by: str - :param create_mode: Specifies the mode of database creation. - Default: regular database creation. - Copy: creates a database as a copy of an existing database. - sourceDatabaseId must be specified as the resource ID of the source - database. - Secondary: creates a database as a secondary replica of an existing - database. sourceDatabaseId must be specified as the resource ID of the - existing primary database. - PointInTimeRestore: Creates a database by restoring a point in time backup - of an existing database. sourceDatabaseId must be specified as the - resource ID of the existing database, and restorePointInTime must be - specified. - Recovery: Creates a database by restoring a geo-replicated backup. - sourceDatabaseId must be specified as the recoverable database resource ID - to restore. - Restore: Creates a database by restoring a backup of a deleted database. - sourceDatabaseId must be specified. If sourceDatabaseId is the database's - original resource ID, then sourceDatabaseDeletionDate must be specified. - Otherwise sourceDatabaseId must be the restorable dropped database - resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime - may also be specified to restore from an earlier point in time. - RestoreLongTermRetentionBackup: Creates a database by restoring from a - long term retention vault. recoveryServicesRecoveryPointResourceId must be - specified as the recovery point resource ID. - Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for - DataWarehouse edition. Possible values include: 'Default', 'Copy', - 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', - 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', - 'RestoreLongTermRetentionBackup', 'OnlineSecondary' - :type create_mode: str or ~azure.mgmt.sql.models.CreateMode - :param collation: The collation of the database. - :type collation: str - :param max_size_bytes: The max size of the database expressed in bytes. - :type max_size_bytes: long - :param sample_name: The name of the sample schema to apply when creating - this database. Possible values include: 'AdventureWorksLT', - 'WideWorldImportersStd', 'WideWorldImportersFull' - :type sample_name: str or ~azure.mgmt.sql.models.SampleName - :param elastic_pool_id: The resource identifier of the elastic pool - containing this database. - :type elastic_pool_id: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :ivar status: The status of the database. Possible values include: - 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', - 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', - 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', - 'Paused', 'Resuming', 'Scaling' - :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus - :ivar database_id: The ID of the database. - :vartype database_id: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar current_service_objective_name: The current service level objective - name of the database. - :vartype current_service_objective_name: str - :ivar requested_service_objective_name: The requested service level - objective name of the database. - :vartype requested_service_objective_name: str - :ivar default_secondary_location: The default secondary region for this - database. - :vartype default_secondary_location: str - :ivar failover_group_id: Failover Group resource identifier that this - database belongs to. - :vartype failover_group_id: str - :param restore_point_in_time: Specifies the point in time (ISO8601 format) - of the source database that will be restored to create the new database. - :type restore_point_in_time: datetime - :param source_database_deletion_date: Specifies the time that the database - was deleted. - :type source_database_deletion_date: datetime - :param recovery_services_recovery_point_id: The resource identifier of the - recovery point associated with create operation of this database. - :type recovery_services_recovery_point_id: str - :param long_term_retention_backup_resource_id: The resource identifier of - the long term retention backup associated with create operation of this - database. - :type long_term_retention_backup_resource_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param restorable_dropped_database_id: The resource identifier of the - restorable dropped database associated with create operation of this - database. - :type restorable_dropped_database_id: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param zone_redundant: Whether or not this database is zone redundant, - which means the replicas of this database will be spread across multiple - availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this database. Possible - values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType - :ivar max_log_size_bytes: The max log size for this database. - :vartype max_log_size_bytes: long - :ivar earliest_restore_date: This records the earliest start date and time - that restore is available for this database (ISO8601 format). - :vartype earliest_restore_date: datetime - :param read_scale: The state of read-only routing. If enabled, connections - that have application intent set to readonly in their connection string - may be routed to a readonly secondary replica in the same region. Possible - values include: 'Enabled', 'Disabled' - :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale - :ivar current_sku: The name and tier of the SKU. - :vartype current_sku: ~azure.mgmt.sql.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'managed_by': {'readonly': True}, - 'status': {'readonly': True}, - 'database_id': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'current_service_objective_name': {'readonly': True}, - 'requested_service_objective_name': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - 'max_log_size_bytes': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'current_sku': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, - 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, - 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, - 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, - 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, - 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, - } - - def __init__(self, *, location: str, tags=None, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, **kwargs) -> None: - super(Database, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.kind = None - self.managed_by = None - self.create_mode = create_mode - self.collation = collation - self.max_size_bytes = max_size_bytes - self.sample_name = sample_name - self.elastic_pool_id = elastic_pool_id - self.source_database_id = source_database_id - self.status = None - self.database_id = None - self.creation_date = None - self.current_service_objective_name = None - self.requested_service_objective_name = None - self.default_secondary_location = None - self.failover_group_id = None - self.restore_point_in_time = restore_point_in_time - self.source_database_deletion_date = source_database_deletion_date - self.recovery_services_recovery_point_id = recovery_services_recovery_point_id - self.long_term_retention_backup_resource_id = long_term_retention_backup_resource_id - self.recoverable_database_id = recoverable_database_id - self.restorable_dropped_database_id = restorable_dropped_database_id - self.catalog_collation = catalog_collation - self.zone_redundant = zone_redundant - self.license_type = license_type - self.max_log_size_bytes = None - self.earliest_restore_date = None - self.read_scale = read_scale - self.current_sku = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy.py deleted file mode 100644 index c425573a5a91..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseSecurityAlertPolicy(ProxyResource): - """Contains information about a database Threat Detection policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar kind: Resource kind. - :vartype kind: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint and storageAccountAccessKey are required. - Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies the semicolon-separated list of alerts - that are disabled, or empty string to disable no alerts. Possible values: - Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; - Data_Exfiltration; Unsafe_Action. - :type disabled_alerts: str - :param email_addresses: Specifies the semicolon-separated list of e-mail - addresses to which the alert is sent. - :type email_addresses: str - :param email_account_admins: Specifies that the alert is sent to the - account administrators. Possible values include: 'Enabled', 'Disabled' - :type email_account_admins: str or - ~azure.mgmt.sql.models.SecurityAlertPolicyEmailAccountAdmins - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. If state is Enabled, storageEndpoint is - required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. If state is Enabled, - storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :param use_server_default: Specifies whether to use the default server - policy. Possible values include: 'Enabled', 'Disabled' - :type use_server_default: str or - ~azure.mgmt.sql.models.SecurityAlertPolicyUseServerDefault - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': 'str'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': 'str'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'SecurityAlertPolicyEmailAccountAdmins'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'use_server_default': {'key': 'properties.useServerDefault', 'type': 'SecurityAlertPolicyUseServerDefault'}, - } - - def __init__(self, **kwargs): - super(DatabaseSecurityAlertPolicy, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.kind = None - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.use_server_default = kwargs.get('use_server_default', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy_py3.py deleted file mode 100644 index 3d85e01a6635..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy_py3.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseSecurityAlertPolicy(ProxyResource): - """Contains information about a database Threat Detection policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar kind: Resource kind. - :vartype kind: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint and storageAccountAccessKey are required. - Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies the semicolon-separated list of alerts - that are disabled, or empty string to disable no alerts. Possible values: - Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; - Data_Exfiltration; Unsafe_Action. - :type disabled_alerts: str - :param email_addresses: Specifies the semicolon-separated list of e-mail - addresses to which the alert is sent. - :type email_addresses: str - :param email_account_admins: Specifies that the alert is sent to the - account administrators. Possible values include: 'Enabled', 'Disabled' - :type email_account_admins: str or - ~azure.mgmt.sql.models.SecurityAlertPolicyEmailAccountAdmins - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. If state is Enabled, storageEndpoint is - required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. If state is Enabled, - storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :param use_server_default: Specifies whether to use the default server - policy. Possible values include: 'Enabled', 'Disabled' - :type use_server_default: str or - ~azure.mgmt.sql.models.SecurityAlertPolicyUseServerDefault - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': 'str'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': 'str'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'SecurityAlertPolicyEmailAccountAdmins'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'use_server_default': {'key': 'properties.useServerDefault', 'type': 'SecurityAlertPolicyUseServerDefault'}, - } - - def __init__(self, *, state, location: str=None, disabled_alerts: str=None, email_addresses: str=None, email_account_admins=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, use_server_default=None, **kwargs) -> None: - super(DatabaseSecurityAlertPolicy, self).__init__(**kwargs) - self.location = location - self.kind = None - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.use_server_default = use_server_default diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update.py deleted file mode 100644 index d4d4cbdf4270..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update.py +++ /dev/null @@ -1,209 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseUpdate(Model): - """A database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :param create_mode: Specifies the mode of database creation. - Default: regular database creation. - Copy: creates a database as a copy of an existing database. - sourceDatabaseId must be specified as the resource ID of the source - database. - Secondary: creates a database as a secondary replica of an existing - database. sourceDatabaseId must be specified as the resource ID of the - existing primary database. - PointInTimeRestore: Creates a database by restoring a point in time backup - of an existing database. sourceDatabaseId must be specified as the - resource ID of the existing database, and restorePointInTime must be - specified. - Recovery: Creates a database by restoring a geo-replicated backup. - sourceDatabaseId must be specified as the recoverable database resource ID - to restore. - Restore: Creates a database by restoring a backup of a deleted database. - sourceDatabaseId must be specified. If sourceDatabaseId is the database's - original resource ID, then sourceDatabaseDeletionDate must be specified. - Otherwise sourceDatabaseId must be the restorable dropped database - resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime - may also be specified to restore from an earlier point in time. - RestoreLongTermRetentionBackup: Creates a database by restoring from a - long term retention vault. recoveryServicesRecoveryPointResourceId must be - specified as the recovery point resource ID. - Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for - DataWarehouse edition. Possible values include: 'Default', 'Copy', - 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', - 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', - 'RestoreLongTermRetentionBackup', 'OnlineSecondary' - :type create_mode: str or ~azure.mgmt.sql.models.CreateMode - :param collation: The collation of the database. - :type collation: str - :param max_size_bytes: The max size of the database expressed in bytes. - :type max_size_bytes: long - :param sample_name: The name of the sample schema to apply when creating - this database. Possible values include: 'AdventureWorksLT', - 'WideWorldImportersStd', 'WideWorldImportersFull' - :type sample_name: str or ~azure.mgmt.sql.models.SampleName - :param elastic_pool_id: The resource identifier of the elastic pool - containing this database. - :type elastic_pool_id: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :ivar status: The status of the database. Possible values include: - 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', - 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', - 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', - 'Paused', 'Resuming', 'Scaling' - :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus - :ivar database_id: The ID of the database. - :vartype database_id: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar current_service_objective_name: The current service level objective - name of the database. - :vartype current_service_objective_name: str - :ivar requested_service_objective_name: The requested service level - objective name of the database. - :vartype requested_service_objective_name: str - :ivar default_secondary_location: The default secondary region for this - database. - :vartype default_secondary_location: str - :ivar failover_group_id: Failover Group resource identifier that this - database belongs to. - :vartype failover_group_id: str - :param restore_point_in_time: Specifies the point in time (ISO8601 format) - of the source database that will be restored to create the new database. - :type restore_point_in_time: datetime - :param source_database_deletion_date: Specifies the time that the database - was deleted. - :type source_database_deletion_date: datetime - :param recovery_services_recovery_point_id: The resource identifier of the - recovery point associated with create operation of this database. - :type recovery_services_recovery_point_id: str - :param long_term_retention_backup_resource_id: The resource identifier of - the long term retention backup associated with create operation of this - database. - :type long_term_retention_backup_resource_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param restorable_dropped_database_id: The resource identifier of the - restorable dropped database associated with create operation of this - database. - :type restorable_dropped_database_id: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param zone_redundant: Whether or not this database is zone redundant, - which means the replicas of this database will be spread across multiple - availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this database. Possible - values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType - :ivar max_log_size_bytes: The max log size for this database. - :vartype max_log_size_bytes: long - :ivar earliest_restore_date: This records the earliest start date and time - that restore is available for this database (ISO8601 format). - :vartype earliest_restore_date: datetime - :param read_scale: The state of read-only routing. If enabled, connections - that have application intent set to readonly in their connection string - may be routed to a readonly secondary replica in the same region. Possible - values include: 'Enabled', 'Disabled' - :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale - :ivar current_sku: The name and tier of the SKU. - :vartype current_sku: ~azure.mgmt.sql.models.Sku - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'status': {'readonly': True}, - 'database_id': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'current_service_objective_name': {'readonly': True}, - 'requested_service_objective_name': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - 'max_log_size_bytes': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'current_sku': {'readonly': True}, - } - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, - 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, - 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, - 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, - 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, - 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(DatabaseUpdate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.create_mode = kwargs.get('create_mode', None) - self.collation = kwargs.get('collation', None) - self.max_size_bytes = kwargs.get('max_size_bytes', None) - self.sample_name = kwargs.get('sample_name', None) - self.elastic_pool_id = kwargs.get('elastic_pool_id', None) - self.source_database_id = kwargs.get('source_database_id', None) - self.status = None - self.database_id = None - self.creation_date = None - self.current_service_objective_name = None - self.requested_service_objective_name = None - self.default_secondary_location = None - self.failover_group_id = None - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.source_database_deletion_date = kwargs.get('source_database_deletion_date', None) - self.recovery_services_recovery_point_id = kwargs.get('recovery_services_recovery_point_id', None) - self.long_term_retention_backup_resource_id = kwargs.get('long_term_retention_backup_resource_id', None) - self.recoverable_database_id = kwargs.get('recoverable_database_id', None) - self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) - self.catalog_collation = kwargs.get('catalog_collation', None) - self.zone_redundant = kwargs.get('zone_redundant', None) - self.license_type = kwargs.get('license_type', None) - self.max_log_size_bytes = None - self.earliest_restore_date = None - self.read_scale = kwargs.get('read_scale', None) - self.current_sku = None - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update_py3.py deleted file mode 100644 index 5a9a6f3b742d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update_py3.py +++ /dev/null @@ -1,209 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseUpdate(Model): - """A database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :param create_mode: Specifies the mode of database creation. - Default: regular database creation. - Copy: creates a database as a copy of an existing database. - sourceDatabaseId must be specified as the resource ID of the source - database. - Secondary: creates a database as a secondary replica of an existing - database. sourceDatabaseId must be specified as the resource ID of the - existing primary database. - PointInTimeRestore: Creates a database by restoring a point in time backup - of an existing database. sourceDatabaseId must be specified as the - resource ID of the existing database, and restorePointInTime must be - specified. - Recovery: Creates a database by restoring a geo-replicated backup. - sourceDatabaseId must be specified as the recoverable database resource ID - to restore. - Restore: Creates a database by restoring a backup of a deleted database. - sourceDatabaseId must be specified. If sourceDatabaseId is the database's - original resource ID, then sourceDatabaseDeletionDate must be specified. - Otherwise sourceDatabaseId must be the restorable dropped database - resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime - may also be specified to restore from an earlier point in time. - RestoreLongTermRetentionBackup: Creates a database by restoring from a - long term retention vault. recoveryServicesRecoveryPointResourceId must be - specified as the recovery point resource ID. - Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for - DataWarehouse edition. Possible values include: 'Default', 'Copy', - 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', - 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', - 'RestoreLongTermRetentionBackup', 'OnlineSecondary' - :type create_mode: str or ~azure.mgmt.sql.models.CreateMode - :param collation: The collation of the database. - :type collation: str - :param max_size_bytes: The max size of the database expressed in bytes. - :type max_size_bytes: long - :param sample_name: The name of the sample schema to apply when creating - this database. Possible values include: 'AdventureWorksLT', - 'WideWorldImportersStd', 'WideWorldImportersFull' - :type sample_name: str or ~azure.mgmt.sql.models.SampleName - :param elastic_pool_id: The resource identifier of the elastic pool - containing this database. - :type elastic_pool_id: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :ivar status: The status of the database. Possible values include: - 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', - 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', - 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', - 'Paused', 'Resuming', 'Scaling' - :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus - :ivar database_id: The ID of the database. - :vartype database_id: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar current_service_objective_name: The current service level objective - name of the database. - :vartype current_service_objective_name: str - :ivar requested_service_objective_name: The requested service level - objective name of the database. - :vartype requested_service_objective_name: str - :ivar default_secondary_location: The default secondary region for this - database. - :vartype default_secondary_location: str - :ivar failover_group_id: Failover Group resource identifier that this - database belongs to. - :vartype failover_group_id: str - :param restore_point_in_time: Specifies the point in time (ISO8601 format) - of the source database that will be restored to create the new database. - :type restore_point_in_time: datetime - :param source_database_deletion_date: Specifies the time that the database - was deleted. - :type source_database_deletion_date: datetime - :param recovery_services_recovery_point_id: The resource identifier of the - recovery point associated with create operation of this database. - :type recovery_services_recovery_point_id: str - :param long_term_retention_backup_resource_id: The resource identifier of - the long term retention backup associated with create operation of this - database. - :type long_term_retention_backup_resource_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param restorable_dropped_database_id: The resource identifier of the - restorable dropped database associated with create operation of this - database. - :type restorable_dropped_database_id: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param zone_redundant: Whether or not this database is zone redundant, - which means the replicas of this database will be spread across multiple - availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this database. Possible - values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType - :ivar max_log_size_bytes: The max log size for this database. - :vartype max_log_size_bytes: long - :ivar earliest_restore_date: This records the earliest start date and time - that restore is available for this database (ISO8601 format). - :vartype earliest_restore_date: datetime - :param read_scale: The state of read-only routing. If enabled, connections - that have application intent set to readonly in their connection string - may be routed to a readonly secondary replica in the same region. Possible - values include: 'Enabled', 'Disabled' - :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale - :ivar current_sku: The name and tier of the SKU. - :vartype current_sku: ~azure.mgmt.sql.models.Sku - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'status': {'readonly': True}, - 'database_id': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'current_service_objective_name': {'readonly': True}, - 'requested_service_objective_name': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - 'max_log_size_bytes': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'current_sku': {'readonly': True}, - } - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, - 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, - 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, - 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, - 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, - 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, tags=None, **kwargs) -> None: - super(DatabaseUpdate, self).__init__(**kwargs) - self.sku = sku - self.create_mode = create_mode - self.collation = collation - self.max_size_bytes = max_size_bytes - self.sample_name = sample_name - self.elastic_pool_id = elastic_pool_id - self.source_database_id = source_database_id - self.status = None - self.database_id = None - self.creation_date = None - self.current_service_objective_name = None - self.requested_service_objective_name = None - self.default_secondary_location = None - self.failover_group_id = None - self.restore_point_in_time = restore_point_in_time - self.source_database_deletion_date = source_database_deletion_date - self.recovery_services_recovery_point_id = recovery_services_recovery_point_id - self.long_term_retention_backup_resource_id = long_term_retention_backup_resource_id - self.recoverable_database_id = recoverable_database_id - self.restorable_dropped_database_id = restorable_dropped_database_id - self.catalog_collation = catalog_collation - self.zone_redundant = zone_redundant - self.license_type = license_type - self.max_log_size_bytes = None - self.earliest_restore_date = None - self.read_scale = read_scale - self.current_sku = None - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage.py deleted file mode 100644 index 948942f56124..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseUsage(Model): - """The database usages. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the usage metric. - :vartype name: str - :ivar resource_name: The name of the resource. - :vartype resource_name: str - :ivar display_name: The usage metric display name. - :vartype display_name: str - :ivar current_value: The current value of the usage metric. - :vartype current_value: float - :ivar limit: The current limit of the usage metric. - :vartype limit: float - :ivar unit: The units of the usage metric. - :vartype unit: str - :ivar next_reset_time: The next reset time for the usage metric (ISO8601 - format). - :vartype next_reset_time: datetime - """ - - _validation = { - 'name': {'readonly': True}, - 'resource_name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'next_reset_time': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_name': {'key': 'resourceName', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(DatabaseUsage, self).__init__(**kwargs) - self.name = None - self.resource_name = None - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None - self.next_reset_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_paged.py deleted file mode 100644 index 9641161225df..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseUsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`DatabaseUsage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseUsage]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseUsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_py3.py deleted file mode 100644 index 46a0f5ca4ba9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseUsage(Model): - """The database usages. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the usage metric. - :vartype name: str - :ivar resource_name: The name of the resource. - :vartype resource_name: str - :ivar display_name: The usage metric display name. - :vartype display_name: str - :ivar current_value: The current value of the usage metric. - :vartype current_value: float - :ivar limit: The current limit of the usage metric. - :vartype limit: float - :ivar unit: The units of the usage metric. - :vartype unit: str - :ivar next_reset_time: The next reset time for the usage metric (ISO8601 - format). - :vartype next_reset_time: datetime - """ - - _validation = { - 'name': {'readonly': True}, - 'resource_name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'next_reset_time': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_name': {'key': 'resourceName', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(DatabaseUsage, self).__init__(**kwargs) - self.name = None - self.resource_name = None - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None - self.next_reset_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment.py deleted file mode 100644 index b4fbd42f864b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseVulnerabilityAssessment(ProxyResource): - """A database vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: A blob storage container path to hold the - scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It - is required if server level vulnerability assessment policy doesn't set - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _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'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, **kwargs): - super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = kwargs.get('storage_container_path', None) - self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.recurring_scans = kwargs.get('recurring_scans', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_paged.py deleted file mode 100644 index 8ec2fe4eae5f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseVulnerabilityAssessmentPaged(Paged): - """ - A paging container for iterating over a list of :class:`DatabaseVulnerabilityAssessment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseVulnerabilityAssessment]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_py3.py deleted file mode 100644 index e0d54f6105f1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseVulnerabilityAssessment(ProxyResource): - """A database vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: A blob storage container path to hold the - scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It - is required if server level vulnerability assessment policy doesn't set - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _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'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, *, storage_container_path: str=None, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: - super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = storage_container_path - self.storage_container_sas_key = storage_container_sas_key - self.storage_account_access_key = storage_account_access_key - self.recurring_scans = recurring_scans diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline.py deleted file mode 100644 index 66881dfb9b5c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseVulnerabilityAssessmentRuleBaseline(ProxyResource): - """A database vulnerability assessment rule baseline. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param baseline_results: Required. The rule baseline result - :type baseline_results: - list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'baseline_results': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'baseline_results': {'key': 'properties.baselineResults', 'type': '[DatabaseVulnerabilityAssessmentRuleBaselineItem]'}, - } - - def __init__(self, **kwargs): - super(DatabaseVulnerabilityAssessmentRuleBaseline, self).__init__(**kwargs) - self.baseline_results = kwargs.get('baseline_results', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item.py deleted file mode 100644 index 4bd7d0e16f52..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseVulnerabilityAssessmentRuleBaselineItem(Model): - """Properties for an Azure SQL Database Vulnerability Assessment rule - baseline's result. - - All required parameters must be populated in order to send to Azure. - - :param result: Required. The rule baseline result - :type result: list[str] - """ - - _validation = { - 'result': {'required': True}, - } - - _attribute_map = { - 'result': {'key': 'result', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(DatabaseVulnerabilityAssessmentRuleBaselineItem, self).__init__(**kwargs) - self.result = kwargs.get('result', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py deleted file mode 100644 index 9378a89cc0f0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseVulnerabilityAssessmentRuleBaselineItem(Model): - """Properties for an Azure SQL Database Vulnerability Assessment rule - baseline's result. - - All required parameters must be populated in order to send to Azure. - - :param result: Required. The rule baseline result - :type result: list[str] - """ - - _validation = { - 'result': {'required': True}, - } - - _attribute_map = { - 'result': {'key': 'result', 'type': '[str]'}, - } - - def __init__(self, *, result, **kwargs) -> None: - super(DatabaseVulnerabilityAssessmentRuleBaselineItem, self).__init__(**kwargs) - self.result = result diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_py3.py deleted file mode 100644 index 4997c258c475..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseVulnerabilityAssessmentRuleBaseline(ProxyResource): - """A database vulnerability assessment rule baseline. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param baseline_results: Required. The rule baseline result - :type baseline_results: - list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'baseline_results': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'baseline_results': {'key': 'properties.baselineResults', 'type': '[DatabaseVulnerabilityAssessmentRuleBaselineItem]'}, - } - - def __init__(self, *, baseline_results, **kwargs) -> None: - super(DatabaseVulnerabilityAssessmentRuleBaseline, self).__init__(**kwargs) - self.baseline_results = baseline_results diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export.py deleted file mode 100644 index 4d088fd265c0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseVulnerabilityAssessmentScansExport(ProxyResource): - """A database Vulnerability Assessment scan export resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar exported_report_location: Location of the exported report (e.g. - https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). - :vartype exported_report_location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'exported_report_location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs) - self.exported_report_location = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export_py3.py deleted file mode 100644 index 7e925fb428ce..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseVulnerabilityAssessmentScansExport(ProxyResource): - """A database Vulnerability Assessment scan export resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar exported_report_location: Location of the exported report (e.g. - https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). - :vartype exported_report_location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'exported_report_location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs) - self.exported_report_location = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability.py deleted file mode 100644 index e2b212e365b0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EditionCapability(Model): - """The edition capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The database edition name. - :vartype name: str - :ivar supported_service_level_objectives: The list of supported service - objectives for the edition. - :vartype supported_service_level_objectives: - list[~azure.mgmt.sql.models.ServiceObjectiveCapability] - :ivar zone_redundant: Whether or not zone redundancy is supported for the - edition. - :vartype zone_redundant: bool - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_service_level_objectives': {'readonly': True}, - 'zone_redundant': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_service_level_objectives': {'key': 'supportedServiceLevelObjectives', 'type': '[ServiceObjectiveCapability]'}, - 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_service_level_objectives = None - self.zone_redundant = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability_py3.py deleted file mode 100644 index e2eaad22c5d5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EditionCapability(Model): - """The edition capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The database edition name. - :vartype name: str - :ivar supported_service_level_objectives: The list of supported service - objectives for the edition. - :vartype supported_service_level_objectives: - list[~azure.mgmt.sql.models.ServiceObjectiveCapability] - :ivar zone_redundant: Whether or not zone redundancy is supported for the - edition. - :vartype zone_redundant: bool - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_service_level_objectives': {'readonly': True}, - 'zone_redundant': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_service_level_objectives': {'key': 'supportedServiceLevelObjectives', 'type': '[ServiceObjectiveCapability]'}, - 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(EditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_service_level_objectives = None - self.zone_redundant = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py deleted file mode 100644 index 10a28ea0f6e3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class ElasticPool(TrackedResource): - """An elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.sql.models.Sku - :ivar kind: Kind of elastic pool. This is metadata used for the Azure - portal experience. - :vartype kind: str - :ivar state: The state of the elastic pool. Possible values include: - 'Creating', 'Ready', 'Disabled' - :vartype state: str or ~azure.mgmt.sql.models.ElasticPoolState - :ivar creation_date: The creation date of the elastic pool (ISO8601 - format). - :vartype creation_date: datetime - :param max_size_bytes: The storage limit for the database elastic pool in - bytes. - :type max_size_bytes: long - :param per_database_settings: The per database settings for the elastic - pool. - :type per_database_settings: - ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings - :param zone_redundant: Whether or not this elastic pool is zone redundant, - which means the replicas of this elastic pool will be spread across - multiple availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this elastic pool. - Possible values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'state': {'readonly': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPool, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.kind = None - self.state = None - self.creation_date = None - self.max_size_bytes = kwargs.get('max_size_bytes', None) - self.per_database_settings = kwargs.get('per_database_settings', None) - self.zone_redundant = kwargs.get('zone_redundant', None) - self.license_type = kwargs.get('license_type', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity.py deleted file mode 100644 index 30c56a11077d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ElasticPoolActivity(ProxyResource): - """Represents the activity on an elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar end_time: The time the operation finished (ISO8601 format). - :vartype end_time: datetime - :ivar error_code: The error code if available. - :vartype error_code: int - :ivar error_message: The error message if available. - :vartype error_message: str - :ivar error_severity: The error severity if available. - :vartype error_severity: int - :ivar operation: The operation name. - :vartype operation: str - :ivar operation_id: The unique operation ID. - :vartype operation_id: str - :ivar percent_complete: The percentage complete if available. - :vartype percent_complete: int - :ivar requested_database_dtu_max: The requested max DTU per database if - available. - :vartype requested_database_dtu_max: int - :ivar requested_database_dtu_min: The requested min DTU per database if - available. - :vartype requested_database_dtu_min: int - :ivar requested_dtu: The requested DTU for the pool if available. - :vartype requested_dtu: int - :ivar requested_elastic_pool_name: The requested name for the elastic pool - if available. - :vartype requested_elastic_pool_name: str - :ivar requested_storage_limit_in_gb: The requested storage limit for the - pool in GB if available. - :vartype requested_storage_limit_in_gb: long - :ivar elastic_pool_name: The name of the elastic pool. - :vartype elastic_pool_name: str - :ivar server_name: The name of the server the elastic pool is in. - :vartype server_name: str - :ivar start_time: The time the operation started (ISO8601 format). - :vartype start_time: datetime - :ivar state: The current state of the operation. - :vartype state: str - :ivar requested_storage_limit_in_mb: The requested storage limit in MB. - :vartype requested_storage_limit_in_mb: int - :ivar requested_database_dtu_guarantee: The requested per database DTU - guarantee. - :vartype requested_database_dtu_guarantee: int - :ivar requested_database_dtu_cap: The requested per database DTU cap. - :vartype requested_database_dtu_cap: int - :ivar requested_dtu_guarantee: The requested DTU guarantee. - :vartype requested_dtu_guarantee: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_message': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_id': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'requested_database_dtu_max': {'readonly': True}, - 'requested_database_dtu_min': {'readonly': True}, - 'requested_dtu': {'readonly': True}, - 'requested_elastic_pool_name': {'readonly': True}, - 'requested_storage_limit_in_gb': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'requested_storage_limit_in_mb': {'readonly': True}, - 'requested_database_dtu_guarantee': {'readonly': True}, - 'requested_database_dtu_cap': {'readonly': True}, - 'requested_dtu_guarantee': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'requested_database_dtu_max': {'key': 'properties.requestedDatabaseDtuMax', 'type': 'int'}, - 'requested_database_dtu_min': {'key': 'properties.requestedDatabaseDtuMin', 'type': 'int'}, - 'requested_dtu': {'key': 'properties.requestedDtu', 'type': 'int'}, - 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, - 'requested_storage_limit_in_gb': {'key': 'properties.requestedStorageLimitInGB', 'type': 'long'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'requested_storage_limit_in_mb': {'key': 'properties.requestedStorageLimitInMB', 'type': 'int'}, - 'requested_database_dtu_guarantee': {'key': 'properties.requestedDatabaseDtuGuarantee', 'type': 'int'}, - 'requested_database_dtu_cap': {'key': 'properties.requestedDatabaseDtuCap', 'type': 'int'}, - 'requested_dtu_guarantee': {'key': 'properties.requestedDtuGuarantee', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolActivity, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.end_time = None - self.error_code = None - self.error_message = None - self.error_severity = None - self.operation = None - self.operation_id = None - self.percent_complete = None - self.requested_database_dtu_max = None - self.requested_database_dtu_min = None - self.requested_dtu = None - self.requested_elastic_pool_name = None - self.requested_storage_limit_in_gb = None - self.elastic_pool_name = None - self.server_name = None - self.start_time = None - self.state = None - self.requested_storage_limit_in_mb = None - self.requested_database_dtu_guarantee = None - self.requested_database_dtu_cap = None - self.requested_dtu_guarantee = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_paged.py deleted file mode 100644 index 729a44a94bb5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ElasticPoolActivityPaged(Paged): - """ - A paging container for iterating over a list of :class:`ElasticPoolActivity ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ElasticPoolActivity]'} - } - - def __init__(self, *args, **kwargs): - - super(ElasticPoolActivityPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_py3.py deleted file mode 100644 index 5d8d4f61727a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_py3.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ElasticPoolActivity(ProxyResource): - """Represents the activity on an elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar end_time: The time the operation finished (ISO8601 format). - :vartype end_time: datetime - :ivar error_code: The error code if available. - :vartype error_code: int - :ivar error_message: The error message if available. - :vartype error_message: str - :ivar error_severity: The error severity if available. - :vartype error_severity: int - :ivar operation: The operation name. - :vartype operation: str - :ivar operation_id: The unique operation ID. - :vartype operation_id: str - :ivar percent_complete: The percentage complete if available. - :vartype percent_complete: int - :ivar requested_database_dtu_max: The requested max DTU per database if - available. - :vartype requested_database_dtu_max: int - :ivar requested_database_dtu_min: The requested min DTU per database if - available. - :vartype requested_database_dtu_min: int - :ivar requested_dtu: The requested DTU for the pool if available. - :vartype requested_dtu: int - :ivar requested_elastic_pool_name: The requested name for the elastic pool - if available. - :vartype requested_elastic_pool_name: str - :ivar requested_storage_limit_in_gb: The requested storage limit for the - pool in GB if available. - :vartype requested_storage_limit_in_gb: long - :ivar elastic_pool_name: The name of the elastic pool. - :vartype elastic_pool_name: str - :ivar server_name: The name of the server the elastic pool is in. - :vartype server_name: str - :ivar start_time: The time the operation started (ISO8601 format). - :vartype start_time: datetime - :ivar state: The current state of the operation. - :vartype state: str - :ivar requested_storage_limit_in_mb: The requested storage limit in MB. - :vartype requested_storage_limit_in_mb: int - :ivar requested_database_dtu_guarantee: The requested per database DTU - guarantee. - :vartype requested_database_dtu_guarantee: int - :ivar requested_database_dtu_cap: The requested per database DTU cap. - :vartype requested_database_dtu_cap: int - :ivar requested_dtu_guarantee: The requested DTU guarantee. - :vartype requested_dtu_guarantee: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_message': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_id': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'requested_database_dtu_max': {'readonly': True}, - 'requested_database_dtu_min': {'readonly': True}, - 'requested_dtu': {'readonly': True}, - 'requested_elastic_pool_name': {'readonly': True}, - 'requested_storage_limit_in_gb': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'requested_storage_limit_in_mb': {'readonly': True}, - 'requested_database_dtu_guarantee': {'readonly': True}, - 'requested_database_dtu_cap': {'readonly': True}, - 'requested_dtu_guarantee': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'requested_database_dtu_max': {'key': 'properties.requestedDatabaseDtuMax', 'type': 'int'}, - 'requested_database_dtu_min': {'key': 'properties.requestedDatabaseDtuMin', 'type': 'int'}, - 'requested_dtu': {'key': 'properties.requestedDtu', 'type': 'int'}, - 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, - 'requested_storage_limit_in_gb': {'key': 'properties.requestedStorageLimitInGB', 'type': 'long'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'requested_storage_limit_in_mb': {'key': 'properties.requestedStorageLimitInMB', 'type': 'int'}, - 'requested_database_dtu_guarantee': {'key': 'properties.requestedDatabaseDtuGuarantee', 'type': 'int'}, - 'requested_database_dtu_cap': {'key': 'properties.requestedDatabaseDtuCap', 'type': 'int'}, - 'requested_dtu_guarantee': {'key': 'properties.requestedDtuGuarantee', 'type': 'int'}, - } - - def __init__(self, *, location: str=None, **kwargs) -> None: - super(ElasticPoolActivity, self).__init__(**kwargs) - self.location = location - self.end_time = None - self.error_code = None - self.error_message = None - self.error_severity = None - self.operation = None - self.operation_id = None - self.percent_complete = None - self.requested_database_dtu_max = None - self.requested_database_dtu_min = None - self.requested_dtu = None - self.requested_elastic_pool_name = None - self.requested_storage_limit_in_gb = None - self.elastic_pool_name = None - self.server_name = None - self.start_time = None - self.state = None - self.requested_storage_limit_in_mb = None - self.requested_database_dtu_guarantee = None - self.requested_database_dtu_cap = None - self.requested_dtu_guarantee = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity.py deleted file mode 100644 index 9427b6973ff9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity.py +++ /dev/null @@ -1,125 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ElasticPoolDatabaseActivity(ProxyResource): - """Represents the activity on an elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar database_name: The database name. - :vartype database_name: str - :ivar end_time: The time the operation finished (ISO8601 format). - :vartype end_time: datetime - :ivar error_code: The error code if available. - :vartype error_code: int - :ivar error_message: The error message if available. - :vartype error_message: str - :ivar error_severity: The error severity if available. - :vartype error_severity: int - :ivar operation: The operation name. - :vartype operation: str - :ivar operation_id: The unique operation ID. - :vartype operation_id: str - :ivar percent_complete: The percentage complete if available. - :vartype percent_complete: int - :ivar requested_elastic_pool_name: The name for the elastic pool the - database is moving into if available. - :vartype requested_elastic_pool_name: str - :ivar current_elastic_pool_name: The name of the current elastic pool the - database is in if available. - :vartype current_elastic_pool_name: str - :ivar current_service_objective: The name of the current service objective - if available. - :vartype current_service_objective: str - :ivar requested_service_objective: The name of the requested service - objective if available. - :vartype requested_service_objective: str - :ivar server_name: The name of the server the elastic pool is in. - :vartype server_name: str - :ivar start_time: The time the operation started (ISO8601 format). - :vartype start_time: datetime - :ivar state: The current state of the operation. - :vartype state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_name': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_message': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_id': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'requested_elastic_pool_name': {'readonly': True}, - 'current_elastic_pool_name': {'readonly': True}, - 'current_service_objective': {'readonly': True}, - 'requested_service_objective': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, - 'current_elastic_pool_name': {'key': 'properties.currentElasticPoolName', 'type': 'str'}, - 'current_service_objective': {'key': 'properties.currentServiceObjective', 'type': 'str'}, - 'requested_service_objective': {'key': 'properties.requestedServiceObjective', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolDatabaseActivity, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.database_name = None - self.end_time = None - self.error_code = None - self.error_message = None - self.error_severity = None - self.operation = None - self.operation_id = None - self.percent_complete = None - self.requested_elastic_pool_name = None - self.current_elastic_pool_name = None - self.current_service_objective = None - self.requested_service_objective = None - self.server_name = None - self.start_time = None - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_paged.py deleted file mode 100644 index e4d12fc20b4a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ElasticPoolDatabaseActivityPaged(Paged): - """ - A paging container for iterating over a list of :class:`ElasticPoolDatabaseActivity ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ElasticPoolDatabaseActivity]'} - } - - def __init__(self, *args, **kwargs): - - super(ElasticPoolDatabaseActivityPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_py3.py deleted file mode 100644 index 2e2818eee69a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_py3.py +++ /dev/null @@ -1,125 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ElasticPoolDatabaseActivity(ProxyResource): - """Represents the activity on an elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar database_name: The database name. - :vartype database_name: str - :ivar end_time: The time the operation finished (ISO8601 format). - :vartype end_time: datetime - :ivar error_code: The error code if available. - :vartype error_code: int - :ivar error_message: The error message if available. - :vartype error_message: str - :ivar error_severity: The error severity if available. - :vartype error_severity: int - :ivar operation: The operation name. - :vartype operation: str - :ivar operation_id: The unique operation ID. - :vartype operation_id: str - :ivar percent_complete: The percentage complete if available. - :vartype percent_complete: int - :ivar requested_elastic_pool_name: The name for the elastic pool the - database is moving into if available. - :vartype requested_elastic_pool_name: str - :ivar current_elastic_pool_name: The name of the current elastic pool the - database is in if available. - :vartype current_elastic_pool_name: str - :ivar current_service_objective: The name of the current service objective - if available. - :vartype current_service_objective: str - :ivar requested_service_objective: The name of the requested service - objective if available. - :vartype requested_service_objective: str - :ivar server_name: The name of the server the elastic pool is in. - :vartype server_name: str - :ivar start_time: The time the operation started (ISO8601 format). - :vartype start_time: datetime - :ivar state: The current state of the operation. - :vartype state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_name': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_message': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_id': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'requested_elastic_pool_name': {'readonly': True}, - 'current_elastic_pool_name': {'readonly': True}, - 'current_service_objective': {'readonly': True}, - 'requested_service_objective': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, - 'current_elastic_pool_name': {'key': 'properties.currentElasticPoolName', 'type': 'str'}, - 'current_service_objective': {'key': 'properties.currentServiceObjective', 'type': 'str'}, - 'requested_service_objective': {'key': 'properties.requestedServiceObjective', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, **kwargs) -> None: - super(ElasticPoolDatabaseActivity, self).__init__(**kwargs) - self.location = location - self.database_name = None - self.end_time = None - self.error_code = None - self.error_message = None - self.error_severity = None - self.operation = None - self.operation_id = None - self.percent_complete = None - self.requested_elastic_pool_name = None - self.current_elastic_pool_name = None - self.current_service_objective = None - self.requested_service_objective = None - self.server_name = None - self.start_time = None - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability.py deleted file mode 100644 index f870c33b6143..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolEditionCapability(Model): - """The elastic pool edition capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The elastic pool edition name. - :vartype name: str - :ivar supported_elastic_pool_performance_levels: The list of supported - elastic pool DTU levels for the edition. - :vartype supported_elastic_pool_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerformanceLevelCapability] - :ivar zone_redundant: Whether or not zone redundancy is supported for the - edition. - :vartype zone_redundant: bool - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_elastic_pool_performance_levels': {'readonly': True}, - 'zone_redundant': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_elastic_pool_performance_levels': {'key': 'supportedElasticPoolPerformanceLevels', 'type': '[ElasticPoolPerformanceLevelCapability]'}, - 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_elastic_pool_performance_levels = None - self.zone_redundant = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability_py3.py deleted file mode 100644 index 54af1f63906f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolEditionCapability(Model): - """The elastic pool edition capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The elastic pool edition name. - :vartype name: str - :ivar supported_elastic_pool_performance_levels: The list of supported - elastic pool DTU levels for the edition. - :vartype supported_elastic_pool_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerformanceLevelCapability] - :ivar zone_redundant: Whether or not zone redundancy is supported for the - edition. - :vartype zone_redundant: bool - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_elastic_pool_performance_levels': {'readonly': True}, - 'zone_redundant': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_elastic_pool_performance_levels': {'key': 'supportedElasticPoolPerformanceLevels', 'type': '[ElasticPoolPerformanceLevelCapability]'}, - 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ElasticPoolEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_elastic_pool_performance_levels = None - self.zone_redundant = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation.py deleted file mode 100644 index 7f01bbf3f1af..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ElasticPoolOperation(ProxyResource): - """A elastic pool operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar elastic_pool_name: The name of the elastic pool the operation is - being performed on. - :vartype elastic_pool_name: str - :ivar operation: The name of operation. - :vartype operation: str - :ivar operation_friendly_name: The friendly name of operation. - :vartype operation_friendly_name: str - :ivar percent_complete: The percentage of the operation completed. - :vartype percent_complete: int - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar start_time: The operation start time. - :vartype start_time: datetime - :ivar state: The operation state. - :vartype state: str - :ivar error_code: The operation error code. - :vartype error_code: int - :ivar error_description: The operation error description. - :vartype error_description: str - :ivar error_severity: The operation error severity. - :vartype error_severity: int - :ivar is_user_error: Whether or not the error is a user error. - :vartype is_user_error: bool - :ivar estimated_completion_time: The estimated completion time of the - operation. - :vartype estimated_completion_time: datetime - :ivar description: The operation description. - :vartype description: str - :ivar is_cancellable: Whether the operation can be cancelled. - :vartype is_cancellable: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_friendly_name': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_description': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'is_user_error': {'readonly': True}, - 'estimated_completion_time': {'readonly': True}, - 'description': {'readonly': True}, - 'is_cancellable': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, - 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolOperation, self).__init__(**kwargs) - self.elastic_pool_name = None - self.operation = None - self.operation_friendly_name = None - self.percent_complete = None - self.server_name = None - self.start_time = None - self.state = None - self.error_code = None - self.error_description = None - self.error_severity = None - self.is_user_error = None - self.estimated_completion_time = None - self.description = None - self.is_cancellable = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_paged.py deleted file mode 100644 index 530637e1479c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ElasticPoolOperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`ElasticPoolOperation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ElasticPoolOperation]'} - } - - def __init__(self, *args, **kwargs): - - super(ElasticPoolOperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_py3.py deleted file mode 100644 index c214b66532a5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_py3.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ElasticPoolOperation(ProxyResource): - """A elastic pool operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar elastic_pool_name: The name of the elastic pool the operation is - being performed on. - :vartype elastic_pool_name: str - :ivar operation: The name of operation. - :vartype operation: str - :ivar operation_friendly_name: The friendly name of operation. - :vartype operation_friendly_name: str - :ivar percent_complete: The percentage of the operation completed. - :vartype percent_complete: int - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar start_time: The operation start time. - :vartype start_time: datetime - :ivar state: The operation state. - :vartype state: str - :ivar error_code: The operation error code. - :vartype error_code: int - :ivar error_description: The operation error description. - :vartype error_description: str - :ivar error_severity: The operation error severity. - :vartype error_severity: int - :ivar is_user_error: Whether or not the error is a user error. - :vartype is_user_error: bool - :ivar estimated_completion_time: The estimated completion time of the - operation. - :vartype estimated_completion_time: datetime - :ivar description: The operation description. - :vartype description: str - :ivar is_cancellable: Whether the operation can be cancelled. - :vartype is_cancellable: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_friendly_name': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_description': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'is_user_error': {'readonly': True}, - 'estimated_completion_time': {'readonly': True}, - 'description': {'readonly': True}, - 'is_cancellable': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, - 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, - } - - def __init__(self, **kwargs) -> None: - super(ElasticPoolOperation, self).__init__(**kwargs) - self.elastic_pool_name = None - self.operation = None - self.operation_friendly_name = None - self.percent_complete = None - self.server_name = None - self.start_time = None - self.state = None - self.error_code = None - self.error_description = None - self.error_severity = None - self.is_user_error = None - self.estimated_completion_time = None - self.description = None - self.is_cancellable = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_paged.py deleted file mode 100644 index 4c391860ee2d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ElasticPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`ElasticPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ElasticPool]'} - } - - def __init__(self, *args, **kwargs): - - super(ElasticPoolPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability.py deleted file mode 100644 index 1f99b527f962..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseMaxPerformanceLevelCapability(Model): - """The max per-database performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The maximum performance level per database. - :vartype limit: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - :ivar supported_per_database_min_performance_levels: The list of supported - min database performance levels. - :vartype supported_per_database_min_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMinPerformanceLevelCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'supported_per_database_min_performance_levels': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'supported_per_database_min_performance_levels': {'key': 'supportedPerDatabaseMinPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMinPerformanceLevelCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolPerDatabaseMaxPerformanceLevelCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None - self.supported_per_database_min_performance_levels = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability_py3.py deleted file mode 100644 index 7e80c9d6cd5e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseMaxPerformanceLevelCapability(Model): - """The max per-database performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The maximum performance level per database. - :vartype limit: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - :ivar supported_per_database_min_performance_levels: The list of supported - min database performance levels. - :vartype supported_per_database_min_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMinPerformanceLevelCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'supported_per_database_min_performance_levels': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'supported_per_database_min_performance_levels': {'key': 'supportedPerDatabaseMinPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMinPerformanceLevelCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ElasticPoolPerDatabaseMaxPerformanceLevelCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None - self.supported_per_database_min_performance_levels = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability.py deleted file mode 100644 index 52306e685c47..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseMinPerformanceLevelCapability(Model): - """The minimum per-database performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The minimum performance level per database. - :vartype limit: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolPerDatabaseMinPerformanceLevelCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability_py3.py deleted file mode 100644 index d1dceda281f6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseMinPerformanceLevelCapability(Model): - """The minimum per-database performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The minimum performance level per database. - :vartype limit: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ElasticPoolPerDatabaseMinPerformanceLevelCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings.py deleted file mode 100644 index 5c7951cd9c4b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseSettings(Model): - """Per database settings of an elastic pool. - - :param min_capacity: The minimum capacity all databases are guaranteed. - :type min_capacity: float - :param max_capacity: The maximum capacity any one database can consume. - :type max_capacity: float - """ - - _attribute_map = { - 'min_capacity': {'key': 'minCapacity', 'type': 'float'}, - 'max_capacity': {'key': 'maxCapacity', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolPerDatabaseSettings, self).__init__(**kwargs) - self.min_capacity = kwargs.get('min_capacity', None) - self.max_capacity = kwargs.get('max_capacity', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings_py3.py deleted file mode 100644 index 64ab19c4217d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseSettings(Model): - """Per database settings of an elastic pool. - - :param min_capacity: The minimum capacity all databases are guaranteed. - :type min_capacity: float - :param max_capacity: The maximum capacity any one database can consume. - :type max_capacity: float - """ - - _attribute_map = { - 'min_capacity': {'key': 'minCapacity', 'type': 'float'}, - 'max_capacity': {'key': 'maxCapacity', 'type': 'float'}, - } - - def __init__(self, *, min_capacity: float=None, max_capacity: float=None, **kwargs) -> None: - super(ElasticPoolPerDatabaseSettings, self).__init__(**kwargs) - self.min_capacity = min_capacity - self.max_capacity = max_capacity diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability.py deleted file mode 100644 index 8d5de8c9e0db..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerformanceLevelCapability(Model): - """The Elastic Pool performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar performance_level: The performance level for the pool. - :vartype performance_level: - ~azure.mgmt.sql.models.PerformanceLevelCapability - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.sql.models.Sku - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar max_database_count: The maximum number of databases supported. - :vartype max_database_count: int - :ivar included_max_size: The included (free) max size for this performance - level. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar supported_max_sizes: The list of supported max sizes. - :vartype supported_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar supported_per_database_max_sizes: The list of supported per database - max sizes. - :vartype supported_per_database_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar supported_per_database_max_performance_levels: The list of supported - per database max performance levels. - :vartype supported_per_database_max_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMaxPerformanceLevelCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'performance_level': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'max_database_count': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'supported_max_sizes': {'readonly': True}, - 'supported_per_database_max_sizes': {'readonly': True}, - 'supported_per_database_max_performance_levels': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'max_database_count': {'key': 'maxDatabaseCount', 'type': 'int'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'supported_per_database_max_sizes': {'key': 'supportedPerDatabaseMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'supported_per_database_max_performance_levels': {'key': 'supportedPerDatabaseMaxPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMaxPerformanceLevelCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolPerformanceLevelCapability, self).__init__(**kwargs) - self.performance_level = None - self.sku = None - self.supported_license_types = None - self.max_database_count = None - self.included_max_size = None - self.supported_max_sizes = None - self.supported_per_database_max_sizes = None - self.supported_per_database_max_performance_levels = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability_py3.py deleted file mode 100644 index 6842c7fed8b8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerformanceLevelCapability(Model): - """The Elastic Pool performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar performance_level: The performance level for the pool. - :vartype performance_level: - ~azure.mgmt.sql.models.PerformanceLevelCapability - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.sql.models.Sku - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar max_database_count: The maximum number of databases supported. - :vartype max_database_count: int - :ivar included_max_size: The included (free) max size for this performance - level. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar supported_max_sizes: The list of supported max sizes. - :vartype supported_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar supported_per_database_max_sizes: The list of supported per database - max sizes. - :vartype supported_per_database_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar supported_per_database_max_performance_levels: The list of supported - per database max performance levels. - :vartype supported_per_database_max_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMaxPerformanceLevelCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'performance_level': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'max_database_count': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'supported_max_sizes': {'readonly': True}, - 'supported_per_database_max_sizes': {'readonly': True}, - 'supported_per_database_max_performance_levels': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'max_database_count': {'key': 'maxDatabaseCount', 'type': 'int'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'supported_per_database_max_sizes': {'key': 'supportedPerDatabaseMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'supported_per_database_max_performance_levels': {'key': 'supportedPerDatabaseMaxPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMaxPerformanceLevelCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ElasticPoolPerformanceLevelCapability, self).__init__(**kwargs) - self.performance_level = None - self.sku = None - self.supported_license_types = None - self.max_database_count = None - self.included_max_size = None - self.supported_max_sizes = None - self.supported_per_database_max_sizes = None - self.supported_per_database_max_performance_levels = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py deleted file mode 100644 index eb092529ac3b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class ElasticPool(TrackedResource): - """An elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.sql.models.Sku - :ivar kind: Kind of elastic pool. This is metadata used for the Azure - portal experience. - :vartype kind: str - :ivar state: The state of the elastic pool. Possible values include: - 'Creating', 'Ready', 'Disabled' - :vartype state: str or ~azure.mgmt.sql.models.ElasticPoolState - :ivar creation_date: The creation date of the elastic pool (ISO8601 - format). - :vartype creation_date: datetime - :param max_size_bytes: The storage limit for the database elastic pool in - bytes. - :type max_size_bytes: long - :param per_database_settings: The per database settings for the elastic - pool. - :type per_database_settings: - ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings - :param zone_redundant: Whether or not this elastic pool is zone redundant, - which means the replicas of this elastic pool will be spread across - multiple availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this elastic pool. - Possible values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'state': {'readonly': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, sku=None, max_size_bytes: int=None, per_database_settings=None, zone_redundant: bool=None, license_type=None, **kwargs) -> None: - super(ElasticPool, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.kind = None - self.state = None - self.creation_date = None - self.max_size_bytes = max_size_bytes - self.per_database_settings = per_database_settings - self.zone_redundant = zone_redundant - self.license_type = license_type diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update.py deleted file mode 100644 index ce71dfa7257e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolUpdate(Model): - """An elastic pool update. - - :param sku: - :type sku: ~azure.mgmt.sql.models.Sku - :param max_size_bytes: The storage limit for the database elastic pool in - bytes. - :type max_size_bytes: long - :param per_database_settings: The per database settings for the elastic - pool. - :type per_database_settings: - ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings - :param zone_redundant: Whether or not this elastic pool is zone redundant, - which means the replicas of this elastic pool will be spread across - multiple availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this elastic pool. - Possible values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolUpdate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.max_size_bytes = kwargs.get('max_size_bytes', None) - self.per_database_settings = kwargs.get('per_database_settings', None) - self.zone_redundant = kwargs.get('zone_redundant', None) - self.license_type = kwargs.get('license_type', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update_py3.py deleted file mode 100644 index d51753795c8a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolUpdate(Model): - """An elastic pool update. - - :param sku: - :type sku: ~azure.mgmt.sql.models.Sku - :param max_size_bytes: The storage limit for the database elastic pool in - bytes. - :type max_size_bytes: long - :param per_database_settings: The per database settings for the elastic - pool. - :type per_database_settings: - ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings - :param zone_redundant: Whether or not this elastic pool is zone redundant, - which means the replicas of this elastic pool will be spread across - multiple availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this elastic pool. - Possible values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, sku=None, max_size_bytes: int=None, per_database_settings=None, zone_redundant: bool=None, license_type=None, tags=None, **kwargs) -> None: - super(ElasticPoolUpdate, self).__init__(**kwargs) - self.sku = sku - self.max_size_bytes = max_size_bytes - self.per_database_settings = per_database_settings - self.zone_redundant = zone_redundant - self.license_type = license_type - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector.py deleted file mode 100644 index f6fe4ba3732d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class EncryptionProtector(ProxyResource): - """The server encryption protector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :type kind: str - :ivar location: Resource location. - :vartype location: str - :ivar subregion: Subregion of the encryption protector. - :vartype subregion: str - :param server_key_name: The name of the server key. - :type server_key_name: str - :param server_key_type: Required. The encryption protector type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :ivar uri: The URI of the server key. - :vartype uri: str - :ivar thumbprint: Thumbprint of the server key. - :vartype thumbprint: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'subregion': {'readonly': True}, - 'server_key_type': {'required': True}, - 'uri': {'readonly': True}, - 'thumbprint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'subregion': {'key': 'properties.subregion', 'type': 'str'}, - 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EncryptionProtector, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) - self.location = None - self.subregion = None - self.server_key_name = kwargs.get('server_key_name', None) - self.server_key_type = kwargs.get('server_key_type', None) - self.uri = None - self.thumbprint = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_paged.py deleted file mode 100644 index afb096561566..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class EncryptionProtectorPaged(Paged): - """ - A paging container for iterating over a list of :class:`EncryptionProtector ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[EncryptionProtector]'} - } - - def __init__(self, *args, **kwargs): - - super(EncryptionProtectorPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_py3.py deleted file mode 100644 index 6dd4bad3cfbe..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class EncryptionProtector(ProxyResource): - """The server encryption protector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :type kind: str - :ivar location: Resource location. - :vartype location: str - :ivar subregion: Subregion of the encryption protector. - :vartype subregion: str - :param server_key_name: The name of the server key. - :type server_key_name: str - :param server_key_type: Required. The encryption protector type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :ivar uri: The URI of the server key. - :vartype uri: str - :ivar thumbprint: Thumbprint of the server key. - :vartype thumbprint: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'subregion': {'readonly': True}, - 'server_key_type': {'required': True}, - 'uri': {'readonly': True}, - 'thumbprint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'subregion': {'key': 'properties.subregion', 'type': 'str'}, - 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, *, server_key_type, kind: str=None, server_key_name: str=None, **kwargs) -> None: - super(EncryptionProtector, self).__init__(**kwargs) - self.kind = kind - self.location = None - self.subregion = None - self.server_key_name = server_key_name - self.server_key_type = server_key_type - self.uri = None - self.thumbprint = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request.py deleted file mode 100644 index c0eb27d98299..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportRequest(Model): - """Export database parameters. - - All required parameters must be populated in order to send to Azure. - - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - } - - _attribute_map = { - 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, - } - - def __init__(self, **kwargs): - super(ExportRequest, self).__init__(**kwargs) - self.storage_key_type = kwargs.get('storage_key_type', None) - self.storage_key = kwargs.get('storage_key', None) - self.storage_uri = kwargs.get('storage_uri', None) - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.authentication_type = kwargs.get('authentication_type', "SQL") diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request_py3.py deleted file mode 100644 index 1cb99a5fe8fe..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportRequest(Model): - """Export database parameters. - - All required parameters must be populated in order to send to Azure. - - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - } - - _attribute_map = { - 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, - } - - def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, authentication_type="SQL", **kwargs) -> None: - super(ExportRequest, self).__init__(**kwargs) - self.storage_key_type = storage_key_type - self.storage_key = storage_key - self.storage_uri = storage_uri - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.authentication_type = authentication_type diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy.py deleted file mode 100644 index 48c324aa3153..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): - """An extended database blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param predicate_expression: Specifies condition of where clause when - creating an audit. - :type predicate_expression: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ExtendedDatabaseBlobAuditingPolicy, self).__init__(**kwargs) - self.predicate_expression = kwargs.get('predicate_expression', None) - self.state = kwargs.get('state', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) - self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) - self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) - self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy_py3.py deleted file mode 100644 index 9550f279968c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy_py3.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): - """An extended database blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param predicate_expression: Specifies condition of where clause when - creating an audit. - :type predicate_expression: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: - super(ExtendedDatabaseBlobAuditingPolicy, self).__init__(**kwargs) - self.predicate_expression = predicate_expression - self.state = state - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.audit_actions_and_groups = audit_actions_and_groups - self.storage_account_subscription_id = storage_account_subscription_id - self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use - self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy.py deleted file mode 100644 index ac110357f4b8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ExtendedServerBlobAuditingPolicy(ProxyResource): - """An extended server blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param predicate_expression: Specifies condition of where clause when - creating an audit. - :type predicate_expression: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ExtendedServerBlobAuditingPolicy, self).__init__(**kwargs) - self.predicate_expression = kwargs.get('predicate_expression', None) - self.state = kwargs.get('state', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) - self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) - self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) - self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy_py3.py deleted file mode 100644 index 89b96febe17d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy_py3.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ExtendedServerBlobAuditingPolicy(ProxyResource): - """An extended server blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param predicate_expression: Specifies condition of where clause when - creating an audit. - :type predicate_expression: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: - super(ExtendedServerBlobAuditingPolicy, self).__init__(**kwargs) - self.predicate_expression = predicate_expression - self.state = state - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.audit_actions_and_groups = audit_actions_and_groups - self.storage_account_subscription_id = storage_account_subscription_id - self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use - self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group.py deleted file mode 100644 index 1fd973aae6ff..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class FailoverGroup(ProxyResource): - """A failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param read_write_endpoint: Required. Read-write endpoint of the failover - group instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint - :ivar replication_role: Local replication role of the failover group - instance. Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.FailoverGroupReplicationRole - :ivar replication_state: Replication state of the failover group instance. - :vartype replication_state: str - :param partner_servers: Required. List of partner server information for - the failover group. - :type partner_servers: list[~azure.mgmt.sql.models.PartnerInfo] - :param databases: List of databases in the failover group. - :type databases: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'read_write_endpoint': {'required': True}, - 'replication_role': {'readonly': True}, - 'replication_state': {'readonly': True}, - 'partner_servers': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - 'partner_servers': {'key': 'properties.partnerServers', 'type': '[PartnerInfo]'}, - 'databases': {'key': 'properties.databases', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(FailoverGroup, self).__init__(**kwargs) - self.location = None - self.tags = kwargs.get('tags', None) - self.read_write_endpoint = kwargs.get('read_write_endpoint', None) - self.read_only_endpoint = kwargs.get('read_only_endpoint', None) - self.replication_role = None - self.replication_state = None - self.partner_servers = kwargs.get('partner_servers', None) - self.databases = kwargs.get('databases', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_paged.py deleted file mode 100644 index 5bdb8723cdc3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class FailoverGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`FailoverGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[FailoverGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(FailoverGroupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_py3.py deleted file mode 100644 index 4b179cf5b45f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class FailoverGroup(ProxyResource): - """A failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param read_write_endpoint: Required. Read-write endpoint of the failover - group instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint - :ivar replication_role: Local replication role of the failover group - instance. Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.FailoverGroupReplicationRole - :ivar replication_state: Replication state of the failover group instance. - :vartype replication_state: str - :param partner_servers: Required. List of partner server information for - the failover group. - :type partner_servers: list[~azure.mgmt.sql.models.PartnerInfo] - :param databases: List of databases in the failover group. - :type databases: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'read_write_endpoint': {'required': True}, - 'replication_role': {'readonly': True}, - 'replication_state': {'readonly': True}, - 'partner_servers': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - 'partner_servers': {'key': 'properties.partnerServers', 'type': '[PartnerInfo]'}, - 'databases': {'key': 'properties.databases', 'type': '[str]'}, - } - - def __init__(self, *, read_write_endpoint, partner_servers, tags=None, read_only_endpoint=None, databases=None, **kwargs) -> None: - super(FailoverGroup, self).__init__(**kwargs) - self.location = None - self.tags = tags - self.read_write_endpoint = read_write_endpoint - self.read_only_endpoint = read_only_endpoint - self.replication_role = None - self.replication_state = None - self.partner_servers = partner_servers - self.databases = databases diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint.py deleted file mode 100644 index c64da55dfec9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupReadOnlyEndpoint(Model): - """Read-only endpoint of the failover group instance. - - :param failover_policy: Failover policy of the read-only endpoint for the - failover group. Possible values include: 'Disabled', 'Enabled' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy - """ - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) - self.failover_policy = kwargs.get('failover_policy', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint_py3.py deleted file mode 100644 index aa923c8b0ce8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupReadOnlyEndpoint(Model): - """Read-only endpoint of the failover group instance. - - :param failover_policy: Failover policy of the read-only endpoint for the - failover group. Possible values include: 'Disabled', 'Enabled' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy - """ - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - } - - def __init__(self, *, failover_policy=None, **kwargs) -> None: - super(FailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) - self.failover_policy = failover_policy diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint.py deleted file mode 100644 index 8eb4368fe7be..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupReadWriteEndpoint(Model): - """Read-write endpoint of the failover group instance. - - All required parameters must be populated in order to send to Azure. - - :param failover_policy: Required. Failover policy of the read-write - endpoint for the failover group. If failoverPolicy is Automatic then - failoverWithDataLossGracePeriodMinutes is required. Possible values - include: 'Manual', 'Automatic' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy - :param failover_with_data_loss_grace_period_minutes: Grace period before - failover with data loss is attempted for the read-write endpoint. If - failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is - required. - :type failover_with_data_loss_grace_period_minutes: int - """ - - _validation = { - 'failover_policy': {'required': True}, - } - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(FailoverGroupReadWriteEndpoint, self).__init__(**kwargs) - self.failover_policy = kwargs.get('failover_policy', None) - self.failover_with_data_loss_grace_period_minutes = kwargs.get('failover_with_data_loss_grace_period_minutes', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint_py3.py deleted file mode 100644 index f9ffb4558ebc..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupReadWriteEndpoint(Model): - """Read-write endpoint of the failover group instance. - - All required parameters must be populated in order to send to Azure. - - :param failover_policy: Required. Failover policy of the read-write - endpoint for the failover group. If failoverPolicy is Automatic then - failoverWithDataLossGracePeriodMinutes is required. Possible values - include: 'Manual', 'Automatic' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy - :param failover_with_data_loss_grace_period_minutes: Grace period before - failover with data loss is attempted for the read-write endpoint. If - failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is - required. - :type failover_with_data_loss_grace_period_minutes: int - """ - - _validation = { - 'failover_policy': {'required': True}, - } - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, - } - - def __init__(self, *, failover_policy, failover_with_data_loss_grace_period_minutes: int=None, **kwargs) -> None: - super(FailoverGroupReadWriteEndpoint, self).__init__(**kwargs) - self.failover_policy = failover_policy - self.failover_with_data_loss_grace_period_minutes = failover_with_data_loss_grace_period_minutes diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update.py deleted file mode 100644 index e491b250f0da..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupUpdate(Model): - """A failover group update request. - - :param read_write_endpoint: Read-write endpoint of the failover group - instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint - :param databases: List of databases in the failover group. - :type databases: list[str] - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, - 'databases': {'key': 'properties.databases', 'type': '[str]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(FailoverGroupUpdate, self).__init__(**kwargs) - self.read_write_endpoint = kwargs.get('read_write_endpoint', None) - self.read_only_endpoint = kwargs.get('read_only_endpoint', None) - self.databases = kwargs.get('databases', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update_py3.py deleted file mode 100644 index 3aee1ee5c78c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupUpdate(Model): - """A failover group update request. - - :param read_write_endpoint: Read-write endpoint of the failover group - instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint - :param databases: List of databases in the failover group. - :type databases: list[str] - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, - 'databases': {'key': 'properties.databases', 'type': '[str]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, read_write_endpoint=None, read_only_endpoint=None, databases=None, tags=None, **kwargs) -> None: - super(FailoverGroupUpdate, self).__init__(**kwargs) - self.read_write_endpoint = read_write_endpoint - self.read_only_endpoint = read_only_endpoint - self.databases = databases - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule.py deleted file mode 100644 index 48004048c43a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class FirewallRule(ProxyResource): - """Represents a server firewall rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of server that contains this firewall rule. - :vartype kind: str - :ivar location: Location of the server that contains this firewall rule. - :vartype location: str - :param start_ip_address: Required. The start IP address of the firewall - rule. Must be IPv4 format. Use value '0.0.0.0' to represent all - Azure-internal IP addresses. - :type start_ip_address: str - :param end_ip_address: Required. The end IP address of the firewall rule. - Must be IPv4 format. Must be greater than or equal to startIpAddress. Use - value '0.0.0.0' to represent all Azure-internal IP addresses. - :type end_ip_address: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - 'start_ip_address': {'required': True}, - 'end_ip_address': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, - 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FirewallRule, self).__init__(**kwargs) - self.kind = None - self.location = None - self.start_ip_address = kwargs.get('start_ip_address', None) - self.end_ip_address = kwargs.get('end_ip_address', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_paged.py deleted file mode 100644 index 07586a09287a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class FirewallRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`FirewallRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[FirewallRule]'} - } - - def __init__(self, *args, **kwargs): - - super(FirewallRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_py3.py deleted file mode 100644 index c292730d9653..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_py3.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class FirewallRule(ProxyResource): - """Represents a server firewall rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of server that contains this firewall rule. - :vartype kind: str - :ivar location: Location of the server that contains this firewall rule. - :vartype location: str - :param start_ip_address: Required. The start IP address of the firewall - rule. Must be IPv4 format. Use value '0.0.0.0' to represent all - Azure-internal IP addresses. - :type start_ip_address: str - :param end_ip_address: Required. The end IP address of the firewall rule. - Must be IPv4 format. Must be greater than or equal to startIpAddress. Use - value '0.0.0.0' to represent all Azure-internal IP addresses. - :type end_ip_address: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - 'start_ip_address': {'required': True}, - 'end_ip_address': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, - 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, - } - - def __init__(self, *, start_ip_address: str, end_ip_address: str, **kwargs) -> None: - super(FirewallRule, self).__init__(**kwargs) - self.kind = None - self.location = None - self.start_ip_address = start_ip_address - self.end_ip_address = end_ip_address diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy.py deleted file mode 100644 index 3d8203075617..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class GeoBackupPolicy(ProxyResource): - """A database geo backup policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. The state of the geo backup policy. Possible - values include: 'Disabled', 'Enabled' - :type state: str or ~azure.mgmt.sql.models.GeoBackupPolicyState - :ivar storage_type: The storage type of the geo backup policy. - :vartype storage_type: str - :ivar kind: Kind of geo backup policy. This is metadata used for the - Azure portal experience. - :vartype kind: str - :ivar location: Backup policy location. - :vartype location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'storage_type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'GeoBackupPolicyState'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GeoBackupPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.storage_type = None - self.kind = None - self.location = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_paged.py deleted file mode 100644 index 7a207daa100e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class GeoBackupPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`GeoBackupPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GeoBackupPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(GeoBackupPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_py3.py deleted file mode 100644 index 23941df5ee47..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class GeoBackupPolicy(ProxyResource): - """A database geo backup policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. The state of the geo backup policy. Possible - values include: 'Disabled', 'Enabled' - :type state: str or ~azure.mgmt.sql.models.GeoBackupPolicyState - :ivar storage_type: The storage type of the geo backup policy. - :vartype storage_type: str - :ivar kind: Kind of geo backup policy. This is metadata used for the - Azure portal experience. - :vartype kind: str - :ivar location: Backup policy location. - :vartype location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'storage_type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'GeoBackupPolicyState'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, *, state, **kwargs) -> None: - super(GeoBackupPolicy, self).__init__(**kwargs) - self.state = state - self.storage_type = None - self.kind = None - self.location = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response.py deleted file mode 100644 index 5cfb638398f0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ImportExportResponse(ProxyResource): - """Response for Import/Export Get operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar request_type: The request type of the operation. - :vartype request_type: str - :ivar request_id: The request type of the operation. - :vartype request_id: str - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar database_name: The name of the database. - :vartype database_name: str - :ivar status: The status message returned from the server. - :vartype status: str - :ivar last_modified_time: The operation status last modified time. - :vartype last_modified_time: str - :ivar queued_time: The operation queued time. - :vartype queued_time: str - :ivar blob_uri: The blob uri. - :vartype blob_uri: str - :ivar error_message: The error message returned from the server. - :vartype error_message: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'request_type': {'readonly': True}, - 'request_id': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - 'status': {'readonly': True}, - 'last_modified_time': {'readonly': True}, - 'queued_time': {'readonly': True}, - 'blob_uri': {'readonly': True}, - 'error_message': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'request_type': {'key': 'properties.requestType', 'type': 'str'}, - 'request_id': {'key': 'properties.requestId', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'str'}, - 'queued_time': {'key': 'properties.queuedTime', 'type': 'str'}, - 'blob_uri': {'key': 'properties.blobUri', 'type': 'str'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImportExportResponse, self).__init__(**kwargs) - self.request_type = None - self.request_id = None - self.server_name = None - self.database_name = None - self.status = None - self.last_modified_time = None - self.queued_time = None - self.blob_uri = None - self.error_message = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response_py3.py deleted file mode 100644 index a344fc99266b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response_py3.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ImportExportResponse(ProxyResource): - """Response for Import/Export Get operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar request_type: The request type of the operation. - :vartype request_type: str - :ivar request_id: The request type of the operation. - :vartype request_id: str - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar database_name: The name of the database. - :vartype database_name: str - :ivar status: The status message returned from the server. - :vartype status: str - :ivar last_modified_time: The operation status last modified time. - :vartype last_modified_time: str - :ivar queued_time: The operation queued time. - :vartype queued_time: str - :ivar blob_uri: The blob uri. - :vartype blob_uri: str - :ivar error_message: The error message returned from the server. - :vartype error_message: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'request_type': {'readonly': True}, - 'request_id': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - 'status': {'readonly': True}, - 'last_modified_time': {'readonly': True}, - 'queued_time': {'readonly': True}, - 'blob_uri': {'readonly': True}, - 'error_message': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'request_type': {'key': 'properties.requestType', 'type': 'str'}, - 'request_id': {'key': 'properties.requestId', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'str'}, - 'queued_time': {'key': 'properties.queuedTime', 'type': 'str'}, - 'blob_uri': {'key': 'properties.blobUri', 'type': 'str'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ImportExportResponse, self).__init__(**kwargs) - self.request_type = None - self.request_id = None - self.server_name = None - self.database_name = None - self.status = None - self.last_modified_time = None - self.queued_time = None - self.blob_uri = None - self.error_message = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request.py deleted file mode 100644 index 3eba93dcec8e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImportExtensionRequest(Model): - """Import database parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: The name of the extension. - :type name: str - :param type: The type of the extension. - :type type: str - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - :ivar operation_mode: Required. The type of import operation being - performed. This is always Import. Default value: "Import" . - :vartype operation_mode: str - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - 'operation_mode': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_key_type': {'key': 'properties.storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'properties.storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'properties.storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'properties.authenticationType', 'type': 'AuthenticationType'}, - 'operation_mode': {'key': 'properties.operationMode', 'type': 'str'}, - } - - operation_mode = "Import" - - def __init__(self, **kwargs): - super(ImportExtensionRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.storage_key_type = kwargs.get('storage_key_type', None) - self.storage_key = kwargs.get('storage_key', None) - self.storage_uri = kwargs.get('storage_uri', None) - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.authentication_type = kwargs.get('authentication_type', "SQL") diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request_py3.py deleted file mode 100644 index 0486f0a68dbe..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImportExtensionRequest(Model): - """Import database parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: The name of the extension. - :type name: str - :param type: The type of the extension. - :type type: str - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - :ivar operation_mode: Required. The type of import operation being - performed. This is always Import. Default value: "Import" . - :vartype operation_mode: str - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - 'operation_mode': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_key_type': {'key': 'properties.storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'properties.storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'properties.storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'properties.authenticationType', 'type': 'AuthenticationType'}, - 'operation_mode': {'key': 'properties.operationMode', 'type': 'str'}, - } - - operation_mode = "Import" - - def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, name: str=None, type: str=None, authentication_type="SQL", **kwargs) -> None: - super(ImportExtensionRequest, self).__init__(**kwargs) - self.name = name - self.type = type - self.storage_key_type = storage_key_type - self.storage_key = storage_key - self.storage_uri = storage_uri - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.authentication_type = authentication_type diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request.py deleted file mode 100644 index a1683ffad9b4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .export_request import ExportRequest - - -class ImportRequest(ExportRequest): - """Import database parameters. - - All required parameters must be populated in order to send to Azure. - - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - :param database_name: Required. The name of the database to import. - :type database_name: str - :param edition: Required. The edition for the database being created. - Possible values include: 'Web', 'Business', 'Basic', 'Standard', - 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', - 'System2' - :type edition: str or ~azure.mgmt.sql.models.DatabaseEdition - :param service_objective_name: Required. The name of the service objective - to assign to the database. Possible values include: 'System', 'System0', - 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', - 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', - 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', - 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', - 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', - 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', - 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', - 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - :type service_objective_name: str or - ~azure.mgmt.sql.models.ServiceObjectiveName - :param max_size_bytes: Required. The maximum size for the newly imported - database. - :type max_size_bytes: str - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - 'database_name': {'required': True}, - 'edition': {'required': True}, - 'service_objective_name': {'required': True}, - 'max_size_bytes': {'required': True}, - } - - _attribute_map = { - 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'edition': {'key': 'edition', 'type': 'str'}, - 'service_objective_name': {'key': 'serviceObjectiveName', 'type': 'str'}, - 'max_size_bytes': {'key': 'maxSizeBytes', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImportRequest, self).__init__(**kwargs) - self.database_name = kwargs.get('database_name', None) - self.edition = kwargs.get('edition', None) - self.service_objective_name = kwargs.get('service_objective_name', None) - self.max_size_bytes = kwargs.get('max_size_bytes', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py deleted file mode 100644 index 68b97ae814a3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .export_request_py3 import ExportRequest - - -class ImportRequest(ExportRequest): - """Import database parameters. - - All required parameters must be populated in order to send to Azure. - - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - :param database_name: Required. The name of the database to import. - :type database_name: str - :param edition: Required. The edition for the database being created. - Possible values include: 'Web', 'Business', 'Basic', 'Standard', - 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', - 'System2' - :type edition: str or ~azure.mgmt.sql.models.DatabaseEdition - :param service_objective_name: Required. The name of the service objective - to assign to the database. Possible values include: 'System', 'System0', - 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', - 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', - 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', - 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', - 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', - 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', - 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', - 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - :type service_objective_name: str or - ~azure.mgmt.sql.models.ServiceObjectiveName - :param max_size_bytes: Required. The maximum size for the newly imported - database. - :type max_size_bytes: str - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - 'database_name': {'required': True}, - 'edition': {'required': True}, - 'service_objective_name': {'required': True}, - 'max_size_bytes': {'required': True}, - } - - _attribute_map = { - 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'edition': {'key': 'edition', 'type': 'str'}, - 'service_objective_name': {'key': 'serviceObjectiveName', 'type': 'str'}, - 'max_size_bytes': {'key': 'maxSizeBytes', 'type': 'str'}, - } - - def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, database_name: str, edition, service_objective_name, max_size_bytes: str, authentication_type="SQL", **kwargs) -> None: - super(ImportRequest, self).__init__(storage_key_type=storage_key_type, storage_key=storage_key, storage_uri=storage_uri, administrator_login=administrator_login, administrator_login_password=administrator_login_password, authentication_type=authentication_type, **kwargs) - self.database_name = database_name - self.edition = edition - self.service_objective_name = service_objective_name - self.max_size_bytes = max_size_bytes diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group.py deleted file mode 100644 index f360ffbfed57..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class InstanceFailoverGroup(ProxyResource): - """An instance failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param read_write_endpoint: Required. Read-write endpoint of the failover - group instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.InstanceFailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.InstanceFailoverGroupReadOnlyEndpoint - :ivar replication_role: Local replication role of the failover group - instance. Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole - :ivar replication_state: Replication state of the failover group instance. - :vartype replication_state: str - :param partner_regions: Required. Partner region information for the - failover group. - :type partner_regions: list[~azure.mgmt.sql.models.PartnerRegionInfo] - :param managed_instance_pairs: Required. List of managed instance pairs in - the failover group. - :type managed_instance_pairs: - list[~azure.mgmt.sql.models.ManagedInstancePairInfo] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'read_write_endpoint': {'required': True}, - 'replication_role': {'readonly': True}, - 'replication_state': {'readonly': True}, - 'partner_regions': {'required': True}, - 'managed_instance_pairs': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'InstanceFailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'InstanceFailoverGroupReadOnlyEndpoint'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - 'partner_regions': {'key': 'properties.partnerRegions', 'type': '[PartnerRegionInfo]'}, - 'managed_instance_pairs': {'key': 'properties.managedInstancePairs', 'type': '[ManagedInstancePairInfo]'}, - } - - def __init__(self, **kwargs): - super(InstanceFailoverGroup, self).__init__(**kwargs) - self.read_write_endpoint = kwargs.get('read_write_endpoint', None) - self.read_only_endpoint = kwargs.get('read_only_endpoint', None) - self.replication_role = None - self.replication_state = None - self.partner_regions = kwargs.get('partner_regions', None) - self.managed_instance_pairs = kwargs.get('managed_instance_pairs', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_paged.py deleted file mode 100644 index c67eaf2ef670..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class InstanceFailoverGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`InstanceFailoverGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[InstanceFailoverGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(InstanceFailoverGroupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_py3.py deleted file mode 100644 index 8959f26c9f69..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_py3.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class InstanceFailoverGroup(ProxyResource): - """An instance failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param read_write_endpoint: Required. Read-write endpoint of the failover - group instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.InstanceFailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.InstanceFailoverGroupReadOnlyEndpoint - :ivar replication_role: Local replication role of the failover group - instance. Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole - :ivar replication_state: Replication state of the failover group instance. - :vartype replication_state: str - :param partner_regions: Required. Partner region information for the - failover group. - :type partner_regions: list[~azure.mgmt.sql.models.PartnerRegionInfo] - :param managed_instance_pairs: Required. List of managed instance pairs in - the failover group. - :type managed_instance_pairs: - list[~azure.mgmt.sql.models.ManagedInstancePairInfo] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'read_write_endpoint': {'required': True}, - 'replication_role': {'readonly': True}, - 'replication_state': {'readonly': True}, - 'partner_regions': {'required': True}, - 'managed_instance_pairs': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'InstanceFailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'InstanceFailoverGroupReadOnlyEndpoint'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - 'partner_regions': {'key': 'properties.partnerRegions', 'type': '[PartnerRegionInfo]'}, - 'managed_instance_pairs': {'key': 'properties.managedInstancePairs', 'type': '[ManagedInstancePairInfo]'}, - } - - def __init__(self, *, read_write_endpoint, partner_regions, managed_instance_pairs, read_only_endpoint=None, **kwargs) -> None: - super(InstanceFailoverGroup, self).__init__(**kwargs) - self.read_write_endpoint = read_write_endpoint - self.read_only_endpoint = read_only_endpoint - self.replication_role = None - self.replication_state = None - self.partner_regions = partner_regions - self.managed_instance_pairs = managed_instance_pairs diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint.py deleted file mode 100644 index 2a9857817ae4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceFailoverGroupReadOnlyEndpoint(Model): - """Read-only endpoint of the failover group instance. - - :param failover_policy: Failover policy of the read-only endpoint for the - failover group. Possible values include: 'Disabled', 'Enabled' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy - """ - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(InstanceFailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) - self.failover_policy = kwargs.get('failover_policy', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint_py3.py deleted file mode 100644 index 71c9f180cdf7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceFailoverGroupReadOnlyEndpoint(Model): - """Read-only endpoint of the failover group instance. - - :param failover_policy: Failover policy of the read-only endpoint for the - failover group. Possible values include: 'Disabled', 'Enabled' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy - """ - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - } - - def __init__(self, *, failover_policy=None, **kwargs) -> None: - super(InstanceFailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) - self.failover_policy = failover_policy diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint.py deleted file mode 100644 index 89a86899e503..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceFailoverGroupReadWriteEndpoint(Model): - """Read-write endpoint of the failover group instance. - - All required parameters must be populated in order to send to Azure. - - :param failover_policy: Required. Failover policy of the read-write - endpoint for the failover group. If failoverPolicy is Automatic then - failoverWithDataLossGracePeriodMinutes is required. Possible values - include: 'Manual', 'Automatic' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy - :param failover_with_data_loss_grace_period_minutes: Grace period before - failover with data loss is attempted for the read-write endpoint. If - failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is - required. - :type failover_with_data_loss_grace_period_minutes: int - """ - - _validation = { - 'failover_policy': {'required': True}, - } - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(InstanceFailoverGroupReadWriteEndpoint, self).__init__(**kwargs) - self.failover_policy = kwargs.get('failover_policy', None) - self.failover_with_data_loss_grace_period_minutes = kwargs.get('failover_with_data_loss_grace_period_minutes', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint_py3.py deleted file mode 100644 index 7fdc047ba37c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceFailoverGroupReadWriteEndpoint(Model): - """Read-write endpoint of the failover group instance. - - All required parameters must be populated in order to send to Azure. - - :param failover_policy: Required. Failover policy of the read-write - endpoint for the failover group. If failoverPolicy is Automatic then - failoverWithDataLossGracePeriodMinutes is required. Possible values - include: 'Manual', 'Automatic' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy - :param failover_with_data_loss_grace_period_minutes: Grace period before - failover with data loss is attempted for the read-write endpoint. If - failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is - required. - :type failover_with_data_loss_grace_period_minutes: int - """ - - _validation = { - 'failover_policy': {'required': True}, - } - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, - } - - def __init__(self, *, failover_policy, failover_with_data_loss_grace_period_minutes: int=None, **kwargs) -> None: - super(InstanceFailoverGroupReadWriteEndpoint, self).__init__(**kwargs) - self.failover_policy = failover_policy - self.failover_with_data_loss_grace_period_minutes = failover_with_data_loss_grace_period_minutes diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job.py deleted file mode 100644 index 6b2c60fd1d4b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class Job(ProxyResource): - """A job. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param description: User-defined description of the job. Default value: "" - . - :type description: str - :ivar version: The job version number. - :vartype version: int - :param schedule: Schedule properties of the job. - :type schedule: ~azure.mgmt.sql.models.JobSchedule - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'version': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'int'}, - 'schedule': {'key': 'properties.schedule', 'type': 'JobSchedule'}, - } - - def __init__(self, **kwargs): - super(Job, self).__init__(**kwargs) - self.description = kwargs.get('description', "") - self.version = None - self.schedule = kwargs.get('schedule', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent.py deleted file mode 100644 index 48d42c28260c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class JobAgent(TrackedResource): - """An Azure SQL job agent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :param database_id: Required. Resource ID of the database to store job - metadata in. - :type database_id: str - :ivar state: The state of the job agent. Possible values include: - 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' - :vartype state: str or ~azure.mgmt.sql.models.JobAgentState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'database_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobAgent, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.database_id = kwargs.get('database_id', None) - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_paged.py deleted file mode 100644 index 25dd750b9d1f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobAgentPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobAgent ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobAgent]'} - } - - def __init__(self, *args, **kwargs): - - super(JobAgentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_py3.py deleted file mode 100644 index 936d87932ebc..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class JobAgent(TrackedResource): - """An Azure SQL job agent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :param database_id: Required. Resource ID of the database to store job - metadata in. - :type database_id: str - :ivar state: The state of the job agent. Possible values include: - 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' - :vartype state: str or ~azure.mgmt.sql.models.JobAgentState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'database_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, *, location: str, database_id: str, tags=None, sku=None, **kwargs) -> None: - super(JobAgent, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.database_id = database_id - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update.py deleted file mode 100644 index af781de91cbf..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobAgentUpdate(Model): - """An update to an Azure SQL job agent. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(JobAgentUpdate, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update_py3.py deleted file mode 100644 index ab5e71f7b1d1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobAgentUpdate(Model): - """An update to an Azure SQL job agent. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(JobAgentUpdate, self).__init__(**kwargs) - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential.py deleted file mode 100644 index 807d34975114..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class JobCredential(ProxyResource): - """A stored credential that can be used by a job to connect to target - databases. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param username: Required. The credential user name. - :type username: str - :param password: Required. The credential password. - :type password: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'username': {'required': True}, - 'password': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'username': {'key': 'properties.username', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobCredential, self).__init__(**kwargs) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_paged.py deleted file mode 100644 index 550108e41c93..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobCredentialPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobCredential ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobCredential]'} - } - - def __init__(self, *args, **kwargs): - - super(JobCredentialPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_py3.py deleted file mode 100644 index 5158010b9c74..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class JobCredential(ProxyResource): - """A stored credential that can be used by a job to connect to target - databases. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param username: Required. The credential user name. - :type username: str - :param password: Required. The credential password. - :type password: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'username': {'required': True}, - 'password': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'username': {'key': 'properties.username', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - } - - def __init__(self, *, username: str, password: str, **kwargs) -> None: - super(JobCredential, self).__init__(**kwargs) - self.username = username - self.password = password diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution.py deleted file mode 100644 index 92744fb7c75b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class JobExecution(ProxyResource): - """An execution of a job. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar job_version: The job version number. - :vartype job_version: int - :ivar step_name: The job step name. - :vartype step_name: str - :ivar step_id: The job step id. - :vartype step_id: int - :ivar job_execution_id: The unique identifier of the job execution. - :vartype job_execution_id: str - :ivar lifecycle: The detailed state of the job execution. Possible values - include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', - 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', - 'TimedOut', 'Canceled', 'Skipped' - :vartype lifecycle: str or ~azure.mgmt.sql.models.JobExecutionLifecycle - :ivar provisioning_state: The ARM provisioning state of the job execution. - Possible values include: 'Created', 'InProgress', 'Succeeded', 'Failed', - 'Canceled' - :vartype provisioning_state: str or - ~azure.mgmt.sql.models.ProvisioningState - :ivar create_time: The time that the job execution was created. - :vartype create_time: datetime - :ivar start_time: The time that the job execution started. - :vartype start_time: datetime - :ivar end_time: The time that the job execution completed. - :vartype end_time: datetime - :param current_attempts: Number of times the job execution has been - attempted. - :type current_attempts: int - :ivar current_attempt_start_time: Start time of the current attempt. - :vartype current_attempt_start_time: datetime - :ivar last_message: The last status or error message. - :vartype last_message: str - :ivar target: The target that this execution is executed on. - :vartype target: ~azure.mgmt.sql.models.JobExecutionTarget - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'job_version': {'readonly': True}, - 'step_name': {'readonly': True}, - 'step_id': {'readonly': True}, - 'job_execution_id': {'readonly': True}, - 'lifecycle': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'create_time': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'current_attempt_start_time': {'readonly': True}, - 'last_message': {'readonly': True}, - 'target': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'job_version': {'key': 'properties.jobVersion', 'type': 'int'}, - 'step_name': {'key': 'properties.stepName', 'type': 'str'}, - 'step_id': {'key': 'properties.stepId', 'type': 'int'}, - 'job_execution_id': {'key': 'properties.jobExecutionId', 'type': 'str'}, - 'lifecycle': {'key': 'properties.lifecycle', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'current_attempts': {'key': 'properties.currentAttempts', 'type': 'int'}, - 'current_attempt_start_time': {'key': 'properties.currentAttemptStartTime', 'type': 'iso-8601'}, - 'last_message': {'key': 'properties.lastMessage', 'type': 'str'}, - 'target': {'key': 'properties.target', 'type': 'JobExecutionTarget'}, - } - - def __init__(self, **kwargs): - super(JobExecution, self).__init__(**kwargs) - self.job_version = None - self.step_name = None - self.step_id = None - self.job_execution_id = None - self.lifecycle = None - self.provisioning_state = None - self.create_time = None - self.start_time = None - self.end_time = None - self.current_attempts = kwargs.get('current_attempts', None) - self.current_attempt_start_time = None - self.last_message = None - self.target = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_paged.py deleted file mode 100644 index bfcdb03ea9aa..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobExecutionPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobExecution ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobExecution]'} - } - - def __init__(self, *args, **kwargs): - - super(JobExecutionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_py3.py deleted file mode 100644 index b7fdaba7c147..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_py3.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class JobExecution(ProxyResource): - """An execution of a job. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar job_version: The job version number. - :vartype job_version: int - :ivar step_name: The job step name. - :vartype step_name: str - :ivar step_id: The job step id. - :vartype step_id: int - :ivar job_execution_id: The unique identifier of the job execution. - :vartype job_execution_id: str - :ivar lifecycle: The detailed state of the job execution. Possible values - include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', - 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', - 'TimedOut', 'Canceled', 'Skipped' - :vartype lifecycle: str or ~azure.mgmt.sql.models.JobExecutionLifecycle - :ivar provisioning_state: The ARM provisioning state of the job execution. - Possible values include: 'Created', 'InProgress', 'Succeeded', 'Failed', - 'Canceled' - :vartype provisioning_state: str or - ~azure.mgmt.sql.models.ProvisioningState - :ivar create_time: The time that the job execution was created. - :vartype create_time: datetime - :ivar start_time: The time that the job execution started. - :vartype start_time: datetime - :ivar end_time: The time that the job execution completed. - :vartype end_time: datetime - :param current_attempts: Number of times the job execution has been - attempted. - :type current_attempts: int - :ivar current_attempt_start_time: Start time of the current attempt. - :vartype current_attempt_start_time: datetime - :ivar last_message: The last status or error message. - :vartype last_message: str - :ivar target: The target that this execution is executed on. - :vartype target: ~azure.mgmt.sql.models.JobExecutionTarget - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'job_version': {'readonly': True}, - 'step_name': {'readonly': True}, - 'step_id': {'readonly': True}, - 'job_execution_id': {'readonly': True}, - 'lifecycle': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'create_time': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'current_attempt_start_time': {'readonly': True}, - 'last_message': {'readonly': True}, - 'target': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'job_version': {'key': 'properties.jobVersion', 'type': 'int'}, - 'step_name': {'key': 'properties.stepName', 'type': 'str'}, - 'step_id': {'key': 'properties.stepId', 'type': 'int'}, - 'job_execution_id': {'key': 'properties.jobExecutionId', 'type': 'str'}, - 'lifecycle': {'key': 'properties.lifecycle', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'current_attempts': {'key': 'properties.currentAttempts', 'type': 'int'}, - 'current_attempt_start_time': {'key': 'properties.currentAttemptStartTime', 'type': 'iso-8601'}, - 'last_message': {'key': 'properties.lastMessage', 'type': 'str'}, - 'target': {'key': 'properties.target', 'type': 'JobExecutionTarget'}, - } - - def __init__(self, *, current_attempts: int=None, **kwargs) -> None: - super(JobExecution, self).__init__(**kwargs) - self.job_version = None - self.step_name = None - self.step_id = None - self.job_execution_id = None - self.lifecycle = None - self.provisioning_state = None - self.create_time = None - self.start_time = None - self.end_time = None - self.current_attempts = current_attempts - self.current_attempt_start_time = None - self.last_message = None - self.target = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target.py deleted file mode 100644 index 50557aaf96d0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobExecutionTarget(Model): - """The target that a job execution is executed on. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The type of the target. Possible values include: - 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' - :vartype type: str or ~azure.mgmt.sql.models.JobTargetType - :ivar server_name: The server name. - :vartype server_name: str - :ivar database_name: The database name. - :vartype database_name: str - """ - - _validation = { - 'type': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobExecutionTarget, self).__init__(**kwargs) - self.type = None - self.server_name = None - self.database_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target_py3.py deleted file mode 100644 index 551716c3cd31..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobExecutionTarget(Model): - """The target that a job execution is executed on. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The type of the target. Possible values include: - 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' - :vartype type: str or ~azure.mgmt.sql.models.JobTargetType - :ivar server_name: The server name. - :vartype server_name: str - :ivar database_name: The database name. - :vartype database_name: str - """ - - _validation = { - 'type': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(JobExecutionTarget, self).__init__(**kwargs) - self.type = None - self.server_name = None - self.database_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_paged.py deleted file mode 100644 index 3b85770570f2..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobPaged(Paged): - """ - A paging container for iterating over a list of :class:`Job ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Job]'} - } - - def __init__(self, *args, **kwargs): - - super(JobPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_py3.py deleted file mode 100644 index 5bfb9b53f03f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class Job(ProxyResource): - """A job. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param description: User-defined description of the job. Default value: "" - . - :type description: str - :ivar version: The job version number. - :vartype version: int - :param schedule: Schedule properties of the job. - :type schedule: ~azure.mgmt.sql.models.JobSchedule - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'version': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'int'}, - 'schedule': {'key': 'properties.schedule', 'type': 'JobSchedule'}, - } - - def __init__(self, *, description: str="", schedule=None, **kwargs) -> None: - super(Job, self).__init__(**kwargs) - self.description = description - self.version = None - self.schedule = schedule diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule.py deleted file mode 100644 index 354e32c4f5b0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobSchedule(Model): - """Scheduling properties of a job. - - :param start_time: Schedule start time. Default value: - "0001-01-01T00:00:00Z" . - :type start_time: datetime - :param end_time: Schedule end time. Default value: "9999-12-31T11:59:59Z" - . - :type end_time: datetime - :param type: Schedule interval type. Possible values include: 'Once', - 'Recurring'. Default value: "Once" . - :type type: str or ~azure.mgmt.sql.models.JobScheduleType - :param enabled: Whether or not the schedule is enabled. - :type enabled: bool - :param interval: Value of the schedule's recurring interval, if the - schedule type is recurring. ISO8601 duration format. - :type interval: str - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'JobScheduleType'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'interval': {'key': 'interval', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobSchedule, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', "0001-01-01T00:00:00Z") - self.end_time = kwargs.get('end_time', "9999-12-31T11:59:59Z") - self.type = kwargs.get('type', "Once") - self.enabled = kwargs.get('enabled', None) - self.interval = kwargs.get('interval', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule_py3.py deleted file mode 100644 index 4b4a6a8f8971..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobSchedule(Model): - """Scheduling properties of a job. - - :param start_time: Schedule start time. Default value: - "0001-01-01T00:00:00Z" . - :type start_time: datetime - :param end_time: Schedule end time. Default value: "9999-12-31T11:59:59Z" - . - :type end_time: datetime - :param type: Schedule interval type. Possible values include: 'Once', - 'Recurring'. Default value: "Once" . - :type type: str or ~azure.mgmt.sql.models.JobScheduleType - :param enabled: Whether or not the schedule is enabled. - :type enabled: bool - :param interval: Value of the schedule's recurring interval, if the - schedule type is recurring. ISO8601 duration format. - :type interval: str - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'JobScheduleType'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'interval': {'key': 'interval', 'type': 'str'}, - } - - def __init__(self, *, start_time="0001-01-01T00:00:00Z", end_time="9999-12-31T11:59:59Z", type="Once", enabled: bool=None, interval: str=None, **kwargs) -> None: - super(JobSchedule, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time - self.type = type - self.enabled = enabled - self.interval = interval diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step.py deleted file mode 100644 index f032375dec32..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class JobStep(ProxyResource): - """A job step. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param step_id: The job step's index within the job. If not specified when - creating the job step, it will be created as the last step. If not - specified when updating the job step, the step id is not modified. - :type step_id: int - :param target_group: Required. The resource ID of the target group that - the job step will be executed on. - :type target_group: str - :param credential: Required. The resource ID of the job credential that - will be used to connect to the targets. - :type credential: str - :param action: Required. The action payload of the job step. - :type action: ~azure.mgmt.sql.models.JobStepAction - :param output: Output destination properties of the job step. - :type output: ~azure.mgmt.sql.models.JobStepOutput - :param execution_options: Execution options for the job step. - :type execution_options: ~azure.mgmt.sql.models.JobStepExecutionOptions - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'target_group': {'required': True}, - 'credential': {'required': True}, - 'action': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'step_id': {'key': 'properties.stepId', 'type': 'int'}, - 'target_group': {'key': 'properties.targetGroup', 'type': 'str'}, - 'credential': {'key': 'properties.credential', 'type': 'str'}, - 'action': {'key': 'properties.action', 'type': 'JobStepAction'}, - 'output': {'key': 'properties.output', 'type': 'JobStepOutput'}, - 'execution_options': {'key': 'properties.executionOptions', 'type': 'JobStepExecutionOptions'}, - } - - def __init__(self, **kwargs): - super(JobStep, self).__init__(**kwargs) - self.step_id = kwargs.get('step_id', None) - self.target_group = kwargs.get('target_group', None) - self.credential = kwargs.get('credential', None) - self.action = kwargs.get('action', None) - self.output = kwargs.get('output', None) - self.execution_options = kwargs.get('execution_options', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action.py deleted file mode 100644 index 68e55b1fa38f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepAction(Model): - """The action to be executed by a job step. - - All required parameters must be populated in order to send to Azure. - - :param type: Type of action being executed by the job step. Possible - values include: 'TSql'. Default value: "TSql" . - :type type: str or ~azure.mgmt.sql.models.JobStepActionType - :param source: The source of the action to execute. Possible values - include: 'Inline'. Default value: "Inline" . - :type source: str or ~azure.mgmt.sql.models.JobStepActionSource - :param value: Required. The action value, for example the text of the - T-SQL script to execute. - :type value: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobStepAction, self).__init__(**kwargs) - self.type = kwargs.get('type', "TSql") - self.source = kwargs.get('source', "Inline") - self.value = kwargs.get('value', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action_py3.py deleted file mode 100644 index 4d8848c8eaef..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepAction(Model): - """The action to be executed by a job step. - - All required parameters must be populated in order to send to Azure. - - :param type: Type of action being executed by the job step. Possible - values include: 'TSql'. Default value: "TSql" . - :type type: str or ~azure.mgmt.sql.models.JobStepActionType - :param source: The source of the action to execute. Possible values - include: 'Inline'. Default value: "Inline" . - :type source: str or ~azure.mgmt.sql.models.JobStepActionSource - :param value: Required. The action value, for example the text of the - T-SQL script to execute. - :type value: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, value: str, type="TSql", source="Inline", **kwargs) -> None: - super(JobStepAction, self).__init__(**kwargs) - self.type = type - self.source = source - self.value = value diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options.py deleted file mode 100644 index 6a49f1d10f25..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepExecutionOptions(Model): - """The execution options of a job step. - - :param timeout_seconds: Execution timeout for the job step. Default value: - 43200 . - :type timeout_seconds: int - :param retry_attempts: Maximum number of times the job step will be - reattempted if the first attempt fails. Default value: 10 . - :type retry_attempts: int - :param initial_retry_interval_seconds: Initial delay between retries for - job step execution. Default value: 1 . - :type initial_retry_interval_seconds: int - :param maximum_retry_interval_seconds: The maximum amount of time to wait - between retries for job step execution. Default value: 120 . - :type maximum_retry_interval_seconds: int - :param retry_interval_backoff_multiplier: The backoff multiplier for the - time between retries. Default value: 2 . - :type retry_interval_backoff_multiplier: float - """ - - _attribute_map = { - 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, - 'retry_attempts': {'key': 'retryAttempts', 'type': 'int'}, - 'initial_retry_interval_seconds': {'key': 'initialRetryIntervalSeconds', 'type': 'int'}, - 'maximum_retry_interval_seconds': {'key': 'maximumRetryIntervalSeconds', 'type': 'int'}, - 'retry_interval_backoff_multiplier': {'key': 'retryIntervalBackoffMultiplier', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(JobStepExecutionOptions, self).__init__(**kwargs) - self.timeout_seconds = kwargs.get('timeout_seconds', 43200) - self.retry_attempts = kwargs.get('retry_attempts', 10) - self.initial_retry_interval_seconds = kwargs.get('initial_retry_interval_seconds', 1) - self.maximum_retry_interval_seconds = kwargs.get('maximum_retry_interval_seconds', 120) - self.retry_interval_backoff_multiplier = kwargs.get('retry_interval_backoff_multiplier', 2) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options_py3.py deleted file mode 100644 index 712f0e947436..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepExecutionOptions(Model): - """The execution options of a job step. - - :param timeout_seconds: Execution timeout for the job step. Default value: - 43200 . - :type timeout_seconds: int - :param retry_attempts: Maximum number of times the job step will be - reattempted if the first attempt fails. Default value: 10 . - :type retry_attempts: int - :param initial_retry_interval_seconds: Initial delay between retries for - job step execution. Default value: 1 . - :type initial_retry_interval_seconds: int - :param maximum_retry_interval_seconds: The maximum amount of time to wait - between retries for job step execution. Default value: 120 . - :type maximum_retry_interval_seconds: int - :param retry_interval_backoff_multiplier: The backoff multiplier for the - time between retries. Default value: 2 . - :type retry_interval_backoff_multiplier: float - """ - - _attribute_map = { - 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, - 'retry_attempts': {'key': 'retryAttempts', 'type': 'int'}, - 'initial_retry_interval_seconds': {'key': 'initialRetryIntervalSeconds', 'type': 'int'}, - 'maximum_retry_interval_seconds': {'key': 'maximumRetryIntervalSeconds', 'type': 'int'}, - 'retry_interval_backoff_multiplier': {'key': 'retryIntervalBackoffMultiplier', 'type': 'float'}, - } - - def __init__(self, *, timeout_seconds: int=43200, retry_attempts: int=10, initial_retry_interval_seconds: int=1, maximum_retry_interval_seconds: int=120, retry_interval_backoff_multiplier: float=2, **kwargs) -> None: - super(JobStepExecutionOptions, self).__init__(**kwargs) - self.timeout_seconds = timeout_seconds - self.retry_attempts = retry_attempts - self.initial_retry_interval_seconds = initial_retry_interval_seconds - self.maximum_retry_interval_seconds = maximum_retry_interval_seconds - self.retry_interval_backoff_multiplier = retry_interval_backoff_multiplier diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output.py deleted file mode 100644 index 8a015a7505bd..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepOutput(Model): - """The output configuration of a job step. - - All required parameters must be populated in order to send to Azure. - - :param type: The output destination type. Possible values include: - 'SqlDatabase'. Default value: "SqlDatabase" . - :type type: str or ~azure.mgmt.sql.models.JobStepOutputType - :param subscription_id: The output destination subscription id. - :type subscription_id: str - :param resource_group_name: The output destination resource group. - :type resource_group_name: str - :param server_name: Required. The output destination server name. - :type server_name: str - :param database_name: Required. The output destination database. - :type database_name: str - :param schema_name: The output destination schema. Default value: "dbo" . - :type schema_name: str - :param table_name: Required. The output destination table. - :type table_name: str - :param credential: Required. The resource ID of the credential to use to - connect to the output destination. - :type credential: str - """ - - _validation = { - 'server_name': {'required': True}, - 'database_name': {'required': True}, - 'table_name': {'required': True}, - 'credential': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'schema_name': {'key': 'schemaName', 'type': 'str'}, - 'table_name': {'key': 'tableName', 'type': 'str'}, - 'credential': {'key': 'credential', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobStepOutput, self).__init__(**kwargs) - self.type = kwargs.get('type', "SqlDatabase") - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group_name = kwargs.get('resource_group_name', None) - self.server_name = kwargs.get('server_name', None) - self.database_name = kwargs.get('database_name', None) - self.schema_name = kwargs.get('schema_name', "dbo") - self.table_name = kwargs.get('table_name', None) - self.credential = kwargs.get('credential', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output_py3.py deleted file mode 100644 index d10ecbbd6f8c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepOutput(Model): - """The output configuration of a job step. - - All required parameters must be populated in order to send to Azure. - - :param type: The output destination type. Possible values include: - 'SqlDatabase'. Default value: "SqlDatabase" . - :type type: str or ~azure.mgmt.sql.models.JobStepOutputType - :param subscription_id: The output destination subscription id. - :type subscription_id: str - :param resource_group_name: The output destination resource group. - :type resource_group_name: str - :param server_name: Required. The output destination server name. - :type server_name: str - :param database_name: Required. The output destination database. - :type database_name: str - :param schema_name: The output destination schema. Default value: "dbo" . - :type schema_name: str - :param table_name: Required. The output destination table. - :type table_name: str - :param credential: Required. The resource ID of the credential to use to - connect to the output destination. - :type credential: str - """ - - _validation = { - 'server_name': {'required': True}, - 'database_name': {'required': True}, - 'table_name': {'required': True}, - 'credential': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'schema_name': {'key': 'schemaName', 'type': 'str'}, - 'table_name': {'key': 'tableName', 'type': 'str'}, - 'credential': {'key': 'credential', 'type': 'str'}, - } - - def __init__(self, *, server_name: str, database_name: str, table_name: str, credential: str, type="SqlDatabase", subscription_id: str=None, resource_group_name: str=None, schema_name: str="dbo", **kwargs) -> None: - super(JobStepOutput, self).__init__(**kwargs) - self.type = type - self.subscription_id = subscription_id - self.resource_group_name = resource_group_name - self.server_name = server_name - self.database_name = database_name - self.schema_name = schema_name - self.table_name = table_name - self.credential = credential diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_paged.py deleted file mode 100644 index 1bda4f5adf6e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobStepPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobStep ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobStep]'} - } - - def __init__(self, *args, **kwargs): - - super(JobStepPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_py3.py deleted file mode 100644 index bd267f9fd9a6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_py3.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class JobStep(ProxyResource): - """A job step. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param step_id: The job step's index within the job. If not specified when - creating the job step, it will be created as the last step. If not - specified when updating the job step, the step id is not modified. - :type step_id: int - :param target_group: Required. The resource ID of the target group that - the job step will be executed on. - :type target_group: str - :param credential: Required. The resource ID of the job credential that - will be used to connect to the targets. - :type credential: str - :param action: Required. The action payload of the job step. - :type action: ~azure.mgmt.sql.models.JobStepAction - :param output: Output destination properties of the job step. - :type output: ~azure.mgmt.sql.models.JobStepOutput - :param execution_options: Execution options for the job step. - :type execution_options: ~azure.mgmt.sql.models.JobStepExecutionOptions - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'target_group': {'required': True}, - 'credential': {'required': True}, - 'action': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'step_id': {'key': 'properties.stepId', 'type': 'int'}, - 'target_group': {'key': 'properties.targetGroup', 'type': 'str'}, - 'credential': {'key': 'properties.credential', 'type': 'str'}, - 'action': {'key': 'properties.action', 'type': 'JobStepAction'}, - 'output': {'key': 'properties.output', 'type': 'JobStepOutput'}, - 'execution_options': {'key': 'properties.executionOptions', 'type': 'JobStepExecutionOptions'}, - } - - def __init__(self, *, target_group: str, credential: str, action, step_id: int=None, output=None, execution_options=None, **kwargs) -> None: - super(JobStep, self).__init__(**kwargs) - self.step_id = step_id - self.target_group = target_group - self.credential = credential - self.action = action - self.output = output - self.execution_options = execution_options diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target.py deleted file mode 100644 index a608d87c1af1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobTarget(Model): - """A job target, for example a specific database or a container of databases - that is evaluated during job execution. - - All required parameters must be populated in order to send to Azure. - - :param membership_type: Whether the target is included or excluded from - the group. Possible values include: 'Include', 'Exclude'. Default value: - "Include" . - :type membership_type: str or - ~azure.mgmt.sql.models.JobTargetGroupMembershipType - :param type: Required. The target type. Possible values include: - 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' - :type type: str or ~azure.mgmt.sql.models.JobTargetType - :param server_name: The target server name. - :type server_name: str - :param database_name: The target database name. - :type database_name: str - :param elastic_pool_name: The target elastic pool name. - :type elastic_pool_name: str - :param shard_map_name: The target shard map. - :type shard_map_name: str - :param refresh_credential: The resource ID of the credential that is used - during job execution to connect to the target and determine the list of - databases inside the target. - :type refresh_credential: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'membership_type': {'key': 'membershipType', 'type': 'JobTargetGroupMembershipType'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'elastic_pool_name': {'key': 'elasticPoolName', 'type': 'str'}, - 'shard_map_name': {'key': 'shardMapName', 'type': 'str'}, - 'refresh_credential': {'key': 'refreshCredential', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobTarget, self).__init__(**kwargs) - self.membership_type = kwargs.get('membership_type', "Include") - self.type = kwargs.get('type', None) - self.server_name = kwargs.get('server_name', None) - self.database_name = kwargs.get('database_name', None) - self.elastic_pool_name = kwargs.get('elastic_pool_name', None) - self.shard_map_name = kwargs.get('shard_map_name', None) - self.refresh_credential = kwargs.get('refresh_credential', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group.py deleted file mode 100644 index 38148fb244c4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class JobTargetGroup(ProxyResource): - """A group of job targets. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param members: Required. Members of the target group. - :type members: list[~azure.mgmt.sql.models.JobTarget] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'members': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'members': {'key': 'properties.members', 'type': '[JobTarget]'}, - } - - def __init__(self, **kwargs): - super(JobTargetGroup, self).__init__(**kwargs) - self.members = kwargs.get('members', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_paged.py deleted file mode 100644 index cd466e5afa84..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobTargetGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobTargetGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobTargetGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(JobTargetGroupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_py3.py deleted file mode 100644 index a9582212ff82..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class JobTargetGroup(ProxyResource): - """A group of job targets. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param members: Required. Members of the target group. - :type members: list[~azure.mgmt.sql.models.JobTarget] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'members': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'members': {'key': 'properties.members', 'type': '[JobTarget]'}, - } - - def __init__(self, *, members, **kwargs) -> None: - super(JobTargetGroup, self).__init__(**kwargs) - self.members = members diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_py3.py deleted file mode 100644 index 281eb7598f18..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobTarget(Model): - """A job target, for example a specific database or a container of databases - that is evaluated during job execution. - - All required parameters must be populated in order to send to Azure. - - :param membership_type: Whether the target is included or excluded from - the group. Possible values include: 'Include', 'Exclude'. Default value: - "Include" . - :type membership_type: str or - ~azure.mgmt.sql.models.JobTargetGroupMembershipType - :param type: Required. The target type. Possible values include: - 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' - :type type: str or ~azure.mgmt.sql.models.JobTargetType - :param server_name: The target server name. - :type server_name: str - :param database_name: The target database name. - :type database_name: str - :param elastic_pool_name: The target elastic pool name. - :type elastic_pool_name: str - :param shard_map_name: The target shard map. - :type shard_map_name: str - :param refresh_credential: The resource ID of the credential that is used - during job execution to connect to the target and determine the list of - databases inside the target. - :type refresh_credential: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'membership_type': {'key': 'membershipType', 'type': 'JobTargetGroupMembershipType'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'elastic_pool_name': {'key': 'elasticPoolName', 'type': 'str'}, - 'shard_map_name': {'key': 'shardMapName', 'type': 'str'}, - 'refresh_credential': {'key': 'refreshCredential', 'type': 'str'}, - } - - def __init__(self, *, type, membership_type="Include", server_name: str=None, database_name: str=None, elastic_pool_name: str=None, shard_map_name: str=None, refresh_credential: str=None, **kwargs) -> None: - super(JobTarget, self).__init__(**kwargs) - self.membership_type = membership_type - self.type = type - self.server_name = server_name - self.database_name = database_name - self.elastic_pool_name = elastic_pool_name - self.shard_map_name = shard_map_name - self.refresh_credential = refresh_credential diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version.py deleted file mode 100644 index 3c480e739607..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class JobVersion(ProxyResource): - """A job version. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobVersion, self).__init__(**kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_paged.py deleted file mode 100644 index 162e4d8cfb5e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobVersionPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobVersion ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobVersion]'} - } - - def __init__(self, *args, **kwargs): - - super(JobVersionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_py3.py deleted file mode 100644 index 16a8798c5949..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class JobVersion(ProxyResource): - """A job version. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(JobVersion, self).__init__(**kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability.py deleted file mode 100644 index f40ad624e1c5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LicenseTypeCapability(Model): - """The license type capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: License type identifier. - :vartype name: str - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LicenseTypeCapability, self).__init__(**kwargs) - self.name = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability_py3.py deleted file mode 100644 index ecfa1918210a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LicenseTypeCapability(Model): - """The license type capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: License type identifier. - :vartype name: str - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(LicenseTypeCapability, self).__init__(**kwargs) - self.name = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities.py deleted file mode 100644 index b7e7f0980834..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LocationCapabilities(Model): - """The location capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The location name. - :vartype name: str - :ivar supported_server_versions: The list of supported server versions. - :vartype supported_server_versions: - list[~azure.mgmt.sql.models.ServerVersionCapability] - :ivar supported_managed_instance_versions: The list of supported managed - instance versions. - :vartype supported_managed_instance_versions: - list[~azure.mgmt.sql.models.ManagedInstanceVersionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_server_versions': {'readonly': True}, - 'supported_managed_instance_versions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_server_versions': {'key': 'supportedServerVersions', 'type': '[ServerVersionCapability]'}, - 'supported_managed_instance_versions': {'key': 'supportedManagedInstanceVersions', 'type': '[ManagedInstanceVersionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LocationCapabilities, self).__init__(**kwargs) - self.name = None - self.supported_server_versions = None - self.supported_managed_instance_versions = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities_py3.py deleted file mode 100644 index 69b257f605a9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LocationCapabilities(Model): - """The location capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The location name. - :vartype name: str - :ivar supported_server_versions: The list of supported server versions. - :vartype supported_server_versions: - list[~azure.mgmt.sql.models.ServerVersionCapability] - :ivar supported_managed_instance_versions: The list of supported managed - instance versions. - :vartype supported_managed_instance_versions: - list[~azure.mgmt.sql.models.ManagedInstanceVersionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_server_versions': {'readonly': True}, - 'supported_managed_instance_versions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_server_versions': {'key': 'supportedServerVersions', 'type': '[ServerVersionCapability]'}, - 'supported_managed_instance_versions': {'key': 'supportedManagedInstanceVersions', 'type': '[ManagedInstanceVersionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(LocationCapabilities, self).__init__(**kwargs) - self.name = None - self.supported_server_versions = None - self.supported_managed_instance_versions = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability.py deleted file mode 100644 index ad86f97123cf..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogSizeCapability(Model): - """The log size capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The log size limit (see 'unit' for the units). - :vartype limit: int - :ivar unit: The units that the limit is expressed in. Possible values - include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes', 'Percent' - :vartype unit: str or ~azure.mgmt.sql.models.LogSizeUnit - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'int'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LogSizeCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability_py3.py deleted file mode 100644 index 787e781b3025..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogSizeCapability(Model): - """The log size capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The log size limit (see 'unit' for the units). - :vartype limit: int - :ivar unit: The units that the limit is expressed in. Possible values - include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes', 'Percent' - :vartype unit: str or ~azure.mgmt.sql.models.LogSizeUnit - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'int'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(LogSizeCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup.py deleted file mode 100644 index 288ac55f501f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class LongTermRetentionBackup(ProxyResource): - """A long term retention backup. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar server_name: The server name that the backup database belong to. - :vartype server_name: str - :ivar server_create_time: The create time of the server. - :vartype server_create_time: datetime - :ivar database_name: The name of the database the backup belong to - :vartype database_name: str - :ivar database_deletion_time: The delete time of the database - :vartype database_deletion_time: datetime - :ivar backup_time: The time the backup was taken - :vartype backup_time: datetime - :ivar backup_expiration_time: The time the long term retention backup will - expire. - :vartype backup_expiration_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'server_name': {'readonly': True}, - 'server_create_time': {'readonly': True}, - 'database_name': {'readonly': True}, - 'database_deletion_time': {'readonly': True}, - 'backup_time': {'readonly': True}, - 'backup_expiration_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'server_create_time': {'key': 'properties.serverCreateTime', 'type': 'iso-8601'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'database_deletion_time': {'key': 'properties.databaseDeletionTime', 'type': 'iso-8601'}, - 'backup_time': {'key': 'properties.backupTime', 'type': 'iso-8601'}, - 'backup_expiration_time': {'key': 'properties.backupExpirationTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(LongTermRetentionBackup, self).__init__(**kwargs) - self.server_name = None - self.server_create_time = None - self.database_name = None - self.database_deletion_time = None - self.backup_time = None - self.backup_expiration_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_paged.py deleted file mode 100644 index 15e32283bbd7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class LongTermRetentionBackupPaged(Paged): - """ - A paging container for iterating over a list of :class:`LongTermRetentionBackup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[LongTermRetentionBackup]'} - } - - def __init__(self, *args, **kwargs): - - super(LongTermRetentionBackupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_py3.py deleted file mode 100644 index eb1372180fb0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class LongTermRetentionBackup(ProxyResource): - """A long term retention backup. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar server_name: The server name that the backup database belong to. - :vartype server_name: str - :ivar server_create_time: The create time of the server. - :vartype server_create_time: datetime - :ivar database_name: The name of the database the backup belong to - :vartype database_name: str - :ivar database_deletion_time: The delete time of the database - :vartype database_deletion_time: datetime - :ivar backup_time: The time the backup was taken - :vartype backup_time: datetime - :ivar backup_expiration_time: The time the long term retention backup will - expire. - :vartype backup_expiration_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'server_name': {'readonly': True}, - 'server_create_time': {'readonly': True}, - 'database_name': {'readonly': True}, - 'database_deletion_time': {'readonly': True}, - 'backup_time': {'readonly': True}, - 'backup_expiration_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'server_create_time': {'key': 'properties.serverCreateTime', 'type': 'iso-8601'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'database_deletion_time': {'key': 'properties.databaseDeletionTime', 'type': 'iso-8601'}, - 'backup_time': {'key': 'properties.backupTime', 'type': 'iso-8601'}, - 'backup_expiration_time': {'key': 'properties.backupExpirationTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(LongTermRetentionBackup, self).__init__(**kwargs) - self.server_name = None - self.server_create_time = None - self.database_name = None - self.database_deletion_time = None - self.backup_time = None - self.backup_expiration_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy.py deleted file mode 100644 index 4cab44ce75c7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedBackupShortTermRetentionPolicy(ProxyResource): - """A short term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param retention_days: The backup retention period in days. This is how - many days Point-in-Time Restore will be supported. - :type retention_days: int - """ - - _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'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedBackupShortTermRetentionPolicy, self).__init__(**kwargs) - self.retention_days = kwargs.get('retention_days', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_paged.py deleted file mode 100644 index 17bcf3e363fc..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedBackupShortTermRetentionPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedBackupShortTermRetentionPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedBackupShortTermRetentionPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedBackupShortTermRetentionPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_py3.py deleted file mode 100644 index 46a3fafddeee..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedBackupShortTermRetentionPolicy(ProxyResource): - """A short term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param retention_days: The backup retention period in days. This is how - many days Point-in-Time Restore will be supported. - :type retention_days: int - """ - - _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'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, *, retention_days: int=None, **kwargs) -> None: - super(ManagedBackupShortTermRetentionPolicy, self).__init__(**kwargs) - self.retention_days = retention_days diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py deleted file mode 100644 index 0c5141eaaef5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class ManagedDatabase(TrackedResource): - """A managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param collation: Collation of the managed database. - :type collation: str - :ivar status: Status of the database. Possible values include: 'Online', - 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' - :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus - :ivar creation_date: Creation date of the database. - :vartype creation_date: datetime - :ivar earliest_restore_point: Earliest restore point in time for point in - time restore. - :vartype earliest_restore_point: datetime - :param restore_point_in_time: Conditional. If createMode is - PointInTimeRestore, this value is required. Specifies the point in time - (ISO8601 format) of the source database that will be restored to create - the new database. - :type restore_point_in_time: datetime - :ivar default_secondary_location: Geo paired region. - :vartype default_secondary_location: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param create_mode: Managed database create mode. PointInTimeRestore: - Create a database by restoring a point in time backup of an existing - database. SourceDatabaseName, SourceManagedInstanceName and PointInTime - must be specified. RestoreExternalBackup: Create a database by restoring - from external backup files. Collation, StorageContainerUri and - StorageContainerSasToken must be specified. Recovery: Creates a database - by restoring a geo-replicated backup. RecoverableDatabaseId must be - specified as the recoverable database resource ID to restore. Possible - values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', - 'Recovery' - :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode - :param storage_container_uri: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the uri of the - storage container where backups for this restore are stored. - :type storage_container_uri: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :param restorable_dropped_database_id: The restorable dropped database - resource id to restore when creating this database. - :type restorable_dropped_database_id: str - :param storage_container_sas_token: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the storage - container sas token. - :type storage_container_sas_token: str - :ivar failover_group_id: Instance Failover Group resource identifier that - this managed database belongs to. - :vartype failover_group_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'status': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'earliest_restore_point': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedDatabase, self).__init__(**kwargs) - self.collation = kwargs.get('collation', None) - self.status = None - self.creation_date = None - self.earliest_restore_point = None - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.default_secondary_location = None - self.catalog_collation = kwargs.get('catalog_collation', None) - self.create_mode = kwargs.get('create_mode', None) - self.storage_container_uri = kwargs.get('storage_container_uri', None) - self.source_database_id = kwargs.get('source_database_id', None) - self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) - self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None) - self.failover_group_id = None - self.recoverable_database_id = kwargs.get('recoverable_database_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_paged.py deleted file mode 100644 index e15d9d532b5a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py deleted file mode 100644 index cc5b655604ad..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class ManagedDatabase(TrackedResource): - """A managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param collation: Collation of the managed database. - :type collation: str - :ivar status: Status of the database. Possible values include: 'Online', - 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' - :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus - :ivar creation_date: Creation date of the database. - :vartype creation_date: datetime - :ivar earliest_restore_point: Earliest restore point in time for point in - time restore. - :vartype earliest_restore_point: datetime - :param restore_point_in_time: Conditional. If createMode is - PointInTimeRestore, this value is required. Specifies the point in time - (ISO8601 format) of the source database that will be restored to create - the new database. - :type restore_point_in_time: datetime - :ivar default_secondary_location: Geo paired region. - :vartype default_secondary_location: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param create_mode: Managed database create mode. PointInTimeRestore: - Create a database by restoring a point in time backup of an existing - database. SourceDatabaseName, SourceManagedInstanceName and PointInTime - must be specified. RestoreExternalBackup: Create a database by restoring - from external backup files. Collation, StorageContainerUri and - StorageContainerSasToken must be specified. Recovery: Creates a database - by restoring a geo-replicated backup. RecoverableDatabaseId must be - specified as the recoverable database resource ID to restore. Possible - values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', - 'Recovery' - :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode - :param storage_container_uri: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the uri of the - storage container where backups for this restore are stored. - :type storage_container_uri: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :param restorable_dropped_database_id: The restorable dropped database - resource id to restore when creating this database. - :type restorable_dropped_database_id: str - :param storage_container_sas_token: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the storage - container sas token. - :type storage_container_sas_token: str - :ivar failover_group_id: Instance Failover Group resource identifier that - this managed database belongs to. - :vartype failover_group_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'status': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'earliest_restore_point': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, restorable_dropped_database_id: str=None, storage_container_sas_token: str=None, recoverable_database_id: str=None, **kwargs) -> None: - super(ManagedDatabase, self).__init__(location=location, tags=tags, **kwargs) - self.collation = collation - self.status = None - self.creation_date = None - self.earliest_restore_point = None - self.restore_point_in_time = restore_point_in_time - self.default_secondary_location = None - self.catalog_collation = catalog_collation - self.create_mode = create_mode - self.storage_container_uri = storage_container_uri - self.source_database_id = source_database_id - self.restorable_dropped_database_id = restorable_dropped_database_id - self.storage_container_sas_token = storage_container_sas_token - self.failover_group_id = None - self.recoverable_database_id = recoverable_database_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy.py deleted file mode 100644 index e3117c33610e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedDatabaseSecurityAlertPolicy(ProxyResource): - """A managed database security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ManagedDatabaseSecurityAlertPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_paged.py deleted file mode 100644 index e05f23ba364c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedDatabaseSecurityAlertPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedDatabaseSecurityAlertPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedDatabaseSecurityAlertPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedDatabaseSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_py3.py deleted file mode 100644 index 365f34280641..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedDatabaseSecurityAlertPolicy(ProxyResource): - """A managed database security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: - super(ManagedDatabaseSecurityAlertPolicy, self).__init__(**kwargs) - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py deleted file mode 100644 index 5ce3a036dcb9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedDatabaseUpdate(Model): - """An managed database update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param collation: Collation of the managed database. - :type collation: str - :ivar status: Status of the database. Possible values include: 'Online', - 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' - :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus - :ivar creation_date: Creation date of the database. - :vartype creation_date: datetime - :ivar earliest_restore_point: Earliest restore point in time for point in - time restore. - :vartype earliest_restore_point: datetime - :param restore_point_in_time: Conditional. If createMode is - PointInTimeRestore, this value is required. Specifies the point in time - (ISO8601 format) of the source database that will be restored to create - the new database. - :type restore_point_in_time: datetime - :ivar default_secondary_location: Geo paired region. - :vartype default_secondary_location: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param create_mode: Managed database create mode. PointInTimeRestore: - Create a database by restoring a point in time backup of an existing - database. SourceDatabaseName, SourceManagedInstanceName and PointInTime - must be specified. RestoreExternalBackup: Create a database by restoring - from external backup files. Collation, StorageContainerUri and - StorageContainerSasToken must be specified. Recovery: Creates a database - by restoring a geo-replicated backup. RecoverableDatabaseId must be - specified as the recoverable database resource ID to restore. Possible - values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', - 'Recovery' - :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode - :param storage_container_uri: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the uri of the - storage container where backups for this restore are stored. - :type storage_container_uri: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :param restorable_dropped_database_id: The restorable dropped database - resource id to restore when creating this database. - :type restorable_dropped_database_id: str - :param storage_container_sas_token: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the storage - container sas token. - :type storage_container_sas_token: str - :ivar failover_group_id: Instance Failover Group resource identifier that - this managed database belongs to. - :vartype failover_group_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'status': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'earliest_restore_point': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - } - - _attribute_map = { - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedDatabaseUpdate, self).__init__(**kwargs) - self.collation = kwargs.get('collation', None) - self.status = None - self.creation_date = None - self.earliest_restore_point = None - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.default_secondary_location = None - self.catalog_collation = kwargs.get('catalog_collation', None) - self.create_mode = kwargs.get('create_mode', None) - self.storage_container_uri = kwargs.get('storage_container_uri', None) - self.source_database_id = kwargs.get('source_database_id', None) - self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) - self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None) - self.failover_group_id = None - self.recoverable_database_id = kwargs.get('recoverable_database_id', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py deleted file mode 100644 index 34ae1be2b3fe..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedDatabaseUpdate(Model): - """An managed database update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param collation: Collation of the managed database. - :type collation: str - :ivar status: Status of the database. Possible values include: 'Online', - 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' - :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus - :ivar creation_date: Creation date of the database. - :vartype creation_date: datetime - :ivar earliest_restore_point: Earliest restore point in time for point in - time restore. - :vartype earliest_restore_point: datetime - :param restore_point_in_time: Conditional. If createMode is - PointInTimeRestore, this value is required. Specifies the point in time - (ISO8601 format) of the source database that will be restored to create - the new database. - :type restore_point_in_time: datetime - :ivar default_secondary_location: Geo paired region. - :vartype default_secondary_location: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param create_mode: Managed database create mode. PointInTimeRestore: - Create a database by restoring a point in time backup of an existing - database. SourceDatabaseName, SourceManagedInstanceName and PointInTime - must be specified. RestoreExternalBackup: Create a database by restoring - from external backup files. Collation, StorageContainerUri and - StorageContainerSasToken must be specified. Recovery: Creates a database - by restoring a geo-replicated backup. RecoverableDatabaseId must be - specified as the recoverable database resource ID to restore. Possible - values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', - 'Recovery' - :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode - :param storage_container_uri: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the uri of the - storage container where backups for this restore are stored. - :type storage_container_uri: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :param restorable_dropped_database_id: The restorable dropped database - resource id to restore when creating this database. - :type restorable_dropped_database_id: str - :param storage_container_sas_token: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the storage - container sas token. - :type storage_container_sas_token: str - :ivar failover_group_id: Instance Failover Group resource identifier that - this managed database belongs to. - :vartype failover_group_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'status': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'earliest_restore_point': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - } - - _attribute_map = { - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, restorable_dropped_database_id: str=None, storage_container_sas_token: str=None, recoverable_database_id: str=None, tags=None, **kwargs) -> None: - super(ManagedDatabaseUpdate, self).__init__(**kwargs) - self.collation = collation - self.status = None - self.creation_date = None - self.earliest_restore_point = None - self.restore_point_in_time = restore_point_in_time - self.default_secondary_location = None - self.catalog_collation = catalog_collation - self.create_mode = create_mode - self.storage_container_uri = storage_container_uri - self.source_database_id = source_database_id - self.restorable_dropped_database_id = restorable_dropped_database_id - self.storage_container_sas_token = storage_container_sas_token - self.failover_group_id = None - self.recoverable_database_id = recoverable_database_id - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance.py deleted file mode 100644 index cf680e0ddac0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class ManagedInstance(TrackedResource): - """An Azure SQL managed instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param identity: The Azure Active Directory identity of the managed - instance. - :type identity: ~azure.mgmt.sql.models.ResourceIdentity - :param sku: Managed instance sku - :type sku: ~azure.mgmt.sql.models.Sku - :ivar fully_qualified_domain_name: The fully qualified domain name of the - managed instance. - :vartype fully_qualified_domain_name: str - :param administrator_login: Administrator username for the managed - instance. Can only be specified when the managed instance is being created - (and is required for creation). - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for managed instance creation). - :type administrator_login_password: str - :param subnet_id: Subnet resource ID for the managed instance. - :type subnet_id: str - :ivar state: The state of the managed instance. - :vartype state: str - :param license_type: The license type. Possible values are - 'LicenseIncluded' and 'BasePrice'. - :type license_type: str - :param v_cores: The number of VCores. - :type v_cores: int - :param storage_size_in_gb: The maximum storage size in GB. - :type storage_size_in_gb: int - :param collation: Collation of the managed instance. - :type collation: str - :ivar dns_zone: The Dns Zone that the managed instance is in. - :vartype dns_zone: str - :param dns_zone_partner: The resource id of another managed instance whose - DNS zone this managed instance will share after creation. - :type dns_zone_partner: str - :param public_data_endpoint_enabled: Whether or not the public data - endpoint is enabled. - :type public_data_endpoint_enabled: bool - :param proxy_override: Connection type used for connecting to the - instance. Possible values include: 'Proxy', 'Redirect', 'Default' - :type proxy_override: str or - ~azure.mgmt.sql.models.ManagedInstanceProxyOverride - :param timezone_id: Id of the timezone. Allowed values are timezones - supported by Windows. - Windows keeps details on supported timezones, including the id, in - registry under - KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time - Zones. - You can get those registry values via SQL Server by querying SELECT name - AS timezone_id FROM sys.time_zone_info. - List of Ids can also be obtained by executing - [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. - An example of valid timezone id is "Pacific Standard Time" or "W. Europe - Standard Time". - :type timezone_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'fully_qualified_domain_name': {'readonly': True}, - 'state': {'readonly': True}, - 'dns_zone': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, - 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, - 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, - 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, - 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, - 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstance, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - self.fully_qualified_domain_name = None - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.subnet_id = kwargs.get('subnet_id', None) - self.state = None - self.license_type = kwargs.get('license_type', None) - self.v_cores = kwargs.get('v_cores', None) - self.storage_size_in_gb = kwargs.get('storage_size_in_gb', None) - self.collation = kwargs.get('collation', None) - self.dns_zone = None - self.dns_zone_partner = kwargs.get('dns_zone_partner', None) - self.public_data_endpoint_enabled = kwargs.get('public_data_endpoint_enabled', None) - self.proxy_override = kwargs.get('proxy_override', None) - self.timezone_id = kwargs.get('timezone_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability.py deleted file mode 100644 index adeab90a3543..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceEditionCapability(Model): - """The managed server capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The managed server version name. - :vartype name: str - :ivar supported_families: The supported families. - :vartype supported_families: - list[~azure.mgmt.sql.models.ManagedInstanceFamilyCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_families': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_families': {'key': 'supportedFamilies', 'type': '[ManagedInstanceFamilyCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_families = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability_py3.py deleted file mode 100644 index 1627f4652fec..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceEditionCapability(Model): - """The managed server capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The managed server version name. - :vartype name: str - :ivar supported_families: The supported families. - :vartype supported_families: - list[~azure.mgmt.sql.models.ManagedInstanceFamilyCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_families': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_families': {'key': 'supportedFamilies', 'type': '[ManagedInstanceFamilyCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ManagedInstanceEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_families = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector.py deleted file mode 100644 index 87ffcbf35af7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedInstanceEncryptionProtector(ProxyResource): - """The managed instance encryption protector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :vartype kind: str - :param server_key_name: The name of the managed instance key. - :type server_key_name: str - :param server_key_type: Required. The encryption protector type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :ivar uri: The URI of the server key. - :vartype uri: str - :ivar thumbprint: Thumbprint of the server key. - :vartype thumbprint: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True}, - 'uri': {'readonly': True}, - 'thumbprint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceEncryptionProtector, self).__init__(**kwargs) - self.kind = None - self.server_key_name = kwargs.get('server_key_name', None) - self.server_key_type = kwargs.get('server_key_type', None) - self.uri = None - self.thumbprint = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_paged.py deleted file mode 100644 index 39ba69c33e17..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedInstanceEncryptionProtectorPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedInstanceEncryptionProtector ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedInstanceEncryptionProtector]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedInstanceEncryptionProtectorPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_py3.py deleted file mode 100644 index 4d45efcf8c5d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedInstanceEncryptionProtector(ProxyResource): - """The managed instance encryption protector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :vartype kind: str - :param server_key_name: The name of the managed instance key. - :type server_key_name: str - :param server_key_type: Required. The encryption protector type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :ivar uri: The URI of the server key. - :vartype uri: str - :ivar thumbprint: Thumbprint of the server key. - :vartype thumbprint: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True}, - 'uri': {'readonly': True}, - 'thumbprint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, *, server_key_type, server_key_name: str=None, **kwargs) -> None: - super(ManagedInstanceEncryptionProtector, self).__init__(**kwargs) - self.kind = None - self.server_key_name = server_key_name - self.server_key_type = server_key_type - self.uri = None - self.thumbprint = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability.py deleted file mode 100644 index df08ea8764c9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceFamilyCapability(Model): - """The managed server family capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Family name. - :vartype name: str - :ivar sku: SKU name. - :vartype sku: str - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar supported_vcores_values: List of supported virtual cores values. - :vartype supported_vcores_values: - list[~azure.mgmt.sql.models.ManagedInstanceVcoresCapability] - :ivar included_max_size: Included size. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar supported_storage_sizes: Storage size ranges. - :vartype supported_storage_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'supported_vcores_values': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'supported_storage_sizes': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'supported_vcores_values': {'key': 'supportedVcoresValues', 'type': '[ManagedInstanceVcoresCapability]'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'supported_storage_sizes': {'key': 'supportedStorageSizes', 'type': '[MaxSizeRangeCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceFamilyCapability, self).__init__(**kwargs) - self.name = None - self.sku = None - self.supported_license_types = None - self.supported_vcores_values = None - self.included_max_size = None - self.supported_storage_sizes = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability_py3.py deleted file mode 100644 index 5ea36be729d5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceFamilyCapability(Model): - """The managed server family capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Family name. - :vartype name: str - :ivar sku: SKU name. - :vartype sku: str - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar supported_vcores_values: List of supported virtual cores values. - :vartype supported_vcores_values: - list[~azure.mgmt.sql.models.ManagedInstanceVcoresCapability] - :ivar included_max_size: Included size. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar supported_storage_sizes: Storage size ranges. - :vartype supported_storage_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'supported_vcores_values': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'supported_storage_sizes': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'supported_vcores_values': {'key': 'supportedVcoresValues', 'type': '[ManagedInstanceVcoresCapability]'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'supported_storage_sizes': {'key': 'supportedStorageSizes', 'type': '[MaxSizeRangeCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ManagedInstanceFamilyCapability, self).__init__(**kwargs) - self.name = None - self.sku = None - self.supported_license_types = None - self.supported_vcores_values = None - self.included_max_size = None - self.supported_storage_sizes = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key.py deleted file mode 100644 index 5a7ee9724f96..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedInstanceKey(ProxyResource): - """A managed instance key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :vartype kind: str - :param server_key_type: Required. The key type like 'ServiceManaged', - 'AzureKeyVault'. Possible values include: 'ServiceManaged', - 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :param uri: The URI of the key. If the ServerKeyType is AzureKeyVault, - then the URI is required. - :type uri: str - :ivar thumbprint: Thumbprint of the key. - :vartype thumbprint: str - :ivar creation_date: The key creation date. - :vartype creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True}, - 'thumbprint': {'readonly': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceKey, self).__init__(**kwargs) - self.kind = None - self.server_key_type = kwargs.get('server_key_type', None) - self.uri = kwargs.get('uri', None) - self.thumbprint = None - self.creation_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_paged.py deleted file mode 100644 index 8c730f73a383..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedInstanceKeyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedInstanceKey ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedInstanceKey]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedInstanceKeyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_py3.py deleted file mode 100644 index f00bafa838f2..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedInstanceKey(ProxyResource): - """A managed instance key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :vartype kind: str - :param server_key_type: Required. The key type like 'ServiceManaged', - 'AzureKeyVault'. Possible values include: 'ServiceManaged', - 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :param uri: The URI of the key. If the ServerKeyType is AzureKeyVault, - then the URI is required. - :type uri: str - :ivar thumbprint: Thumbprint of the key. - :vartype thumbprint: str - :ivar creation_date: The key creation date. - :vartype creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True}, - 'thumbprint': {'readonly': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, server_key_type, uri: str=None, **kwargs) -> None: - super(ManagedInstanceKey, self).__init__(**kwargs) - self.kind = None - self.server_key_type = server_key_type - self.uri = uri - self.thumbprint = None - self.creation_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_paged.py deleted file mode 100644 index c39881da9f3b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedInstancePaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedInstance ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedInstance]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedInstancePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info.py deleted file mode 100644 index ee49c1db0c62..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstancePairInfo(Model): - """Pairs of Managed Instances in the failover group. - - :param primary_managed_instance_id: Id of Primary Managed Instance in - pair. - :type primary_managed_instance_id: str - :param partner_managed_instance_id: Id of Partner Managed Instance in - pair. - :type partner_managed_instance_id: str - """ - - _attribute_map = { - 'primary_managed_instance_id': {'key': 'primaryManagedInstanceId', 'type': 'str'}, - 'partner_managed_instance_id': {'key': 'partnerManagedInstanceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstancePairInfo, self).__init__(**kwargs) - self.primary_managed_instance_id = kwargs.get('primary_managed_instance_id', None) - self.partner_managed_instance_id = kwargs.get('partner_managed_instance_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info_py3.py deleted file mode 100644 index 49f52752b439..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstancePairInfo(Model): - """Pairs of Managed Instances in the failover group. - - :param primary_managed_instance_id: Id of Primary Managed Instance in - pair. - :type primary_managed_instance_id: str - :param partner_managed_instance_id: Id of Partner Managed Instance in - pair. - :type partner_managed_instance_id: str - """ - - _attribute_map = { - 'primary_managed_instance_id': {'key': 'primaryManagedInstanceId', 'type': 'str'}, - 'partner_managed_instance_id': {'key': 'partnerManagedInstanceId', 'type': 'str'}, - } - - def __init__(self, *, primary_managed_instance_id: str=None, partner_managed_instance_id: str=None, **kwargs) -> None: - super(ManagedInstancePairInfo, self).__init__(**kwargs) - self.primary_managed_instance_id = primary_managed_instance_id - self.partner_managed_instance_id = partner_managed_instance_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_py3.py deleted file mode 100644 index 9233da80dae4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_py3.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class ManagedInstance(TrackedResource): - """An Azure SQL managed instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param identity: The Azure Active Directory identity of the managed - instance. - :type identity: ~azure.mgmt.sql.models.ResourceIdentity - :param sku: Managed instance sku - :type sku: ~azure.mgmt.sql.models.Sku - :ivar fully_qualified_domain_name: The fully qualified domain name of the - managed instance. - :vartype fully_qualified_domain_name: str - :param administrator_login: Administrator username for the managed - instance. Can only be specified when the managed instance is being created - (and is required for creation). - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for managed instance creation). - :type administrator_login_password: str - :param subnet_id: Subnet resource ID for the managed instance. - :type subnet_id: str - :ivar state: The state of the managed instance. - :vartype state: str - :param license_type: The license type. Possible values are - 'LicenseIncluded' and 'BasePrice'. - :type license_type: str - :param v_cores: The number of VCores. - :type v_cores: int - :param storage_size_in_gb: The maximum storage size in GB. - :type storage_size_in_gb: int - :param collation: Collation of the managed instance. - :type collation: str - :ivar dns_zone: The Dns Zone that the managed instance is in. - :vartype dns_zone: str - :param dns_zone_partner: The resource id of another managed instance whose - DNS zone this managed instance will share after creation. - :type dns_zone_partner: str - :param public_data_endpoint_enabled: Whether or not the public data - endpoint is enabled. - :type public_data_endpoint_enabled: bool - :param proxy_override: Connection type used for connecting to the - instance. Possible values include: 'Proxy', 'Redirect', 'Default' - :type proxy_override: str or - ~azure.mgmt.sql.models.ManagedInstanceProxyOverride - :param timezone_id: Id of the timezone. Allowed values are timezones - supported by Windows. - Windows keeps details on supported timezones, including the id, in - registry under - KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time - Zones. - You can get those registry values via SQL Server by querying SELECT name - AS timezone_id FROM sys.time_zone_info. - List of Ids can also be obtained by executing - [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. - An example of valid timezone id is "Pacific Standard Time" or "W. Europe - Standard Time". - :type timezone_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'fully_qualified_domain_name': {'readonly': True}, - 'state': {'readonly': True}, - 'dns_zone': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, - 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, - 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, - 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, - 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, - 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, identity=None, sku=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type: str=None, v_cores: int=None, storage_size_in_gb: int=None, collation: str=None, dns_zone_partner: str=None, public_data_endpoint_enabled: bool=None, proxy_override=None, timezone_id: str=None, **kwargs) -> None: - super(ManagedInstance, self).__init__(location=location, tags=tags, **kwargs) - self.identity = identity - self.sku = sku - self.fully_qualified_domain_name = None - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.subnet_id = subnet_id - self.state = None - self.license_type = license_type - self.v_cores = v_cores - self.storage_size_in_gb = storage_size_in_gb - self.collation = collation - self.dns_zone = None - self.dns_zone_partner = dns_zone_partner - self.public_data_endpoint_enabled = public_data_endpoint_enabled - self.proxy_override = proxy_override - self.timezone_id = timezone_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update.py deleted file mode 100644 index e3c543f0a6b1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceUpdate(Model): - """An update request for an Azure SQL Database managed instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param sku: Managed instance sku - :type sku: ~azure.mgmt.sql.models.Sku - :ivar fully_qualified_domain_name: The fully qualified domain name of the - managed instance. - :vartype fully_qualified_domain_name: str - :param administrator_login: Administrator username for the managed - instance. Can only be specified when the managed instance is being created - (and is required for creation). - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for managed instance creation). - :type administrator_login_password: str - :param subnet_id: Subnet resource ID for the managed instance. - :type subnet_id: str - :ivar state: The state of the managed instance. - :vartype state: str - :param license_type: The license type. Possible values are - 'LicenseIncluded' and 'BasePrice'. - :type license_type: str - :param v_cores: The number of VCores. - :type v_cores: int - :param storage_size_in_gb: The maximum storage size in GB. - :type storage_size_in_gb: int - :param collation: Collation of the managed instance. - :type collation: str - :ivar dns_zone: The Dns Zone that the managed instance is in. - :vartype dns_zone: str - :param dns_zone_partner: The resource id of another managed instance whose - DNS zone this managed instance will share after creation. - :type dns_zone_partner: str - :param public_data_endpoint_enabled: Whether or not the public data - endpoint is enabled. - :type public_data_endpoint_enabled: bool - :param proxy_override: Connection type used for connecting to the - instance. Possible values include: 'Proxy', 'Redirect', 'Default' - :type proxy_override: str or - ~azure.mgmt.sql.models.ManagedInstanceProxyOverride - :param timezone_id: Id of the timezone. Allowed values are timezones - supported by Windows. - Windows keeps details on supported timezones, including the id, in - registry under - KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time - Zones. - You can get those registry values via SQL Server by querying SELECT name - AS timezone_id FROM sys.time_zone_info. - List of Ids can also be obtained by executing - [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. - An example of valid timezone id is "Pacific Standard Time" or "W. Europe - Standard Time". - :type timezone_id: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'fully_qualified_domain_name': {'readonly': True}, - 'state': {'readonly': True}, - 'dns_zone': {'readonly': True}, - } - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, - 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, - 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, - 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, - 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, - 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceUpdate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.fully_qualified_domain_name = None - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.subnet_id = kwargs.get('subnet_id', None) - self.state = None - self.license_type = kwargs.get('license_type', None) - self.v_cores = kwargs.get('v_cores', None) - self.storage_size_in_gb = kwargs.get('storage_size_in_gb', None) - self.collation = kwargs.get('collation', None) - self.dns_zone = None - self.dns_zone_partner = kwargs.get('dns_zone_partner', None) - self.public_data_endpoint_enabled = kwargs.get('public_data_endpoint_enabled', None) - self.proxy_override = kwargs.get('proxy_override', None) - self.timezone_id = kwargs.get('timezone_id', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update_py3.py deleted file mode 100644 index 4a2e6aa0bd78..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update_py3.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceUpdate(Model): - """An update request for an Azure SQL Database managed instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param sku: Managed instance sku - :type sku: ~azure.mgmt.sql.models.Sku - :ivar fully_qualified_domain_name: The fully qualified domain name of the - managed instance. - :vartype fully_qualified_domain_name: str - :param administrator_login: Administrator username for the managed - instance. Can only be specified when the managed instance is being created - (and is required for creation). - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for managed instance creation). - :type administrator_login_password: str - :param subnet_id: Subnet resource ID for the managed instance. - :type subnet_id: str - :ivar state: The state of the managed instance. - :vartype state: str - :param license_type: The license type. Possible values are - 'LicenseIncluded' and 'BasePrice'. - :type license_type: str - :param v_cores: The number of VCores. - :type v_cores: int - :param storage_size_in_gb: The maximum storage size in GB. - :type storage_size_in_gb: int - :param collation: Collation of the managed instance. - :type collation: str - :ivar dns_zone: The Dns Zone that the managed instance is in. - :vartype dns_zone: str - :param dns_zone_partner: The resource id of another managed instance whose - DNS zone this managed instance will share after creation. - :type dns_zone_partner: str - :param public_data_endpoint_enabled: Whether or not the public data - endpoint is enabled. - :type public_data_endpoint_enabled: bool - :param proxy_override: Connection type used for connecting to the - instance. Possible values include: 'Proxy', 'Redirect', 'Default' - :type proxy_override: str or - ~azure.mgmt.sql.models.ManagedInstanceProxyOverride - :param timezone_id: Id of the timezone. Allowed values are timezones - supported by Windows. - Windows keeps details on supported timezones, including the id, in - registry under - KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time - Zones. - You can get those registry values via SQL Server by querying SELECT name - AS timezone_id FROM sys.time_zone_info. - List of Ids can also be obtained by executing - [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. - An example of valid timezone id is "Pacific Standard Time" or "W. Europe - Standard Time". - :type timezone_id: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'fully_qualified_domain_name': {'readonly': True}, - 'state': {'readonly': True}, - 'dns_zone': {'readonly': True}, - } - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, - 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, - 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, - 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, - 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, - 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, sku=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type: str=None, v_cores: int=None, storage_size_in_gb: int=None, collation: str=None, dns_zone_partner: str=None, public_data_endpoint_enabled: bool=None, proxy_override=None, timezone_id: str=None, tags=None, **kwargs) -> None: - super(ManagedInstanceUpdate, self).__init__(**kwargs) - self.sku = sku - self.fully_qualified_domain_name = None - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.subnet_id = subnet_id - self.state = None - self.license_type = license_type - self.v_cores = v_cores - self.storage_size_in_gb = storage_size_in_gb - self.collation = collation - self.dns_zone = None - self.dns_zone_partner = dns_zone_partner - self.public_data_endpoint_enabled = public_data_endpoint_enabled - self.proxy_override = proxy_override - self.timezone_id = timezone_id - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability.py deleted file mode 100644 index 29503dd20ae2..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceVcoresCapability(Model): - """The managed instance virtual cores capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The virtual cores identifier. - :vartype name: str - :ivar value: The virtual cores value. - :vartype value: int - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'int'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceVcoresCapability, self).__init__(**kwargs) - self.name = None - self.value = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability_py3.py deleted file mode 100644 index 23d3bb49d4e8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceVcoresCapability(Model): - """The managed instance virtual cores capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The virtual cores identifier. - :vartype name: str - :ivar value: The virtual cores value. - :vartype value: int - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'int'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ManagedInstanceVcoresCapability, self).__init__(**kwargs) - self.name = None - self.value = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability.py deleted file mode 100644 index 949b1fcf4ad5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceVersionCapability(Model): - """The managed instance capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The server version name. - :vartype name: str - :ivar supported_editions: The list of supported managed instance editions. - :vartype supported_editions: - list[~azure.mgmt.sql.models.ManagedInstanceEditionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_editions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_editions': {'key': 'supportedEditions', 'type': '[ManagedInstanceEditionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceVersionCapability, self).__init__(**kwargs) - self.name = None - self.supported_editions = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability_py3.py deleted file mode 100644 index 6d078061def9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceVersionCapability(Model): - """The managed instance capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The server version name. - :vartype name: str - :ivar supported_editions: The list of supported managed instance editions. - :vartype supported_editions: - list[~azure.mgmt.sql.models.ManagedInstanceEditionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_editions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_editions': {'key': 'supportedEditions', 'type': '[ManagedInstanceEditionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ManagedInstanceVersionCapability, self).__init__(**kwargs) - self.name = None - self.supported_editions = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment.py deleted file mode 100644 index 78d257382e26..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedInstanceVulnerabilityAssessment(ProxyResource): - """A managed instance vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: Required. A blob storage container path to - hold the scan results (e.g. - https://myStorage.blob.core.windows.net/VaScans/). - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_container_path': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = kwargs.get('storage_container_path', None) - self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.recurring_scans = kwargs.get('recurring_scans', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_paged.py deleted file mode 100644 index a7322fe506bf..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedInstanceVulnerabilityAssessmentPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedInstanceVulnerabilityAssessment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedInstanceVulnerabilityAssessment]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedInstanceVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_py3.py deleted file mode 100644 index 6f3da10fea84..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedInstanceVulnerabilityAssessment(ProxyResource): - """A managed instance vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: Required. A blob storage container path to - hold the scan results (e.g. - https://myStorage.blob.core.windows.net/VaScans/). - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_container_path': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, *, storage_container_path: str, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: - super(ManagedInstanceVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = storage_container_path - self.storage_container_sas_key = storage_container_sas_key - self.storage_account_access_key = storage_account_access_key - self.recurring_scans = recurring_scans diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy.py deleted file mode 100644 index e3a0a5062157..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedServerSecurityAlertPolicy(ProxyResource): - """A managed server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ManagedServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_paged.py deleted file mode 100644 index 2d99504f4744..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedServerSecurityAlertPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedServerSecurityAlertPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedServerSecurityAlertPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedServerSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_py3.py deleted file mode 100644 index b16c97c79bea..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedServerSecurityAlertPolicy(ProxyResource): - """A managed server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: - super(ManagedServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability.py deleted file mode 100644 index d103c6f969f7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaxSizeCapability(Model): - """The maximum size capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The maximum size limit (see 'unit' for the units). - :vartype limit: int - :ivar unit: The units that the limit is expressed in. Possible values - include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' - :vartype unit: str or ~azure.mgmt.sql.models.MaxSizeUnit - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'int'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MaxSizeCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability_py3.py deleted file mode 100644 index 54bd7cb00171..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaxSizeCapability(Model): - """The maximum size capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The maximum size limit (see 'unit' for the units). - :vartype limit: int - :ivar unit: The units that the limit is expressed in. Possible values - include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' - :vartype unit: str or ~azure.mgmt.sql.models.MaxSizeUnit - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'int'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MaxSizeCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability.py deleted file mode 100644 index 3ec6c663b559..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaxSizeRangeCapability(Model): - """The maximum size range capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar min_value: Minimum value. - :vartype min_value: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar max_value: Maximum value. - :vartype max_value: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar scale_size: Scale/step size for discrete values between the minimum - value and the maximum value. - :vartype scale_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar log_size: Size of transaction log. - :vartype log_size: ~azure.mgmt.sql.models.LogSizeCapability - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'min_value': {'readonly': True}, - 'max_value': {'readonly': True}, - 'scale_size': {'readonly': True}, - 'log_size': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'min_value': {'key': 'minValue', 'type': 'MaxSizeCapability'}, - 'max_value': {'key': 'maxValue', 'type': 'MaxSizeCapability'}, - 'scale_size': {'key': 'scaleSize', 'type': 'MaxSizeCapability'}, - 'log_size': {'key': 'logSize', 'type': 'LogSizeCapability'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MaxSizeRangeCapability, self).__init__(**kwargs) - self.min_value = None - self.max_value = None - self.scale_size = None - self.log_size = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability_py3.py deleted file mode 100644 index f0f95ebd7f36..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaxSizeRangeCapability(Model): - """The maximum size range capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar min_value: Minimum value. - :vartype min_value: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar max_value: Maximum value. - :vartype max_value: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar scale_size: Scale/step size for discrete values between the minimum - value and the maximum value. - :vartype scale_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar log_size: Size of transaction log. - :vartype log_size: ~azure.mgmt.sql.models.LogSizeCapability - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'min_value': {'readonly': True}, - 'max_value': {'readonly': True}, - 'scale_size': {'readonly': True}, - 'log_size': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'min_value': {'key': 'minValue', 'type': 'MaxSizeCapability'}, - 'max_value': {'key': 'maxValue', 'type': 'MaxSizeCapability'}, - 'scale_size': {'key': 'scaleSize', 'type': 'MaxSizeCapability'}, - 'log_size': {'key': 'logSize', 'type': 'LogSizeCapability'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(MaxSizeRangeCapability, self).__init__(**kwargs) - self.min_value = None - self.max_value = None - self.scale_size = None - self.log_size = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric.py deleted file mode 100644 index 3d3b4b8df154..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Metric(Model): - """Database metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar start_time: The start time for the metric (ISO-8601 format). - :vartype start_time: datetime - :ivar end_time: The end time for the metric (ISO-8601 format). - :vartype end_time: datetime - :ivar time_grain: The time step to be used to summarize the metric values. - :vartype time_grain: str - :ivar unit: The unit of the metric. Possible values include: 'count', - 'bytes', 'seconds', 'percent', 'countPerSecond', 'bytesPerSecond' - :vartype unit: str or ~azure.mgmt.sql.models.UnitType - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.sql.models.MetricName - :ivar metric_values: The metric values for the specified time window and - timestep. - :vartype metric_values: list[~azure.mgmt.sql.models.MetricValue] - """ - - _validation = { - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'unit': {'readonly': True}, - 'name': {'readonly': True}, - 'metric_values': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, - } - - def __init__(self, **kwargs): - super(Metric, self).__init__(**kwargs) - self.start_time = None - self.end_time = None - self.time_grain = None - self.unit = None - self.name = None - self.metric_values = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability.py deleted file mode 100644 index ef43027b61ba..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricAvailability(Model): - """A metric availability value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar retention: The length of retention for the database metric. - :vartype retention: str - :ivar time_grain: The granularity of the database metric. - :vartype time_grain: str - """ - - _validation = { - 'retention': {'readonly': True}, - 'time_grain': {'readonly': True}, - } - - _attribute_map = { - 'retention': {'key': 'retention', 'type': 'str'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MetricAvailability, self).__init__(**kwargs) - self.retention = None - self.time_grain = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability_py3.py deleted file mode 100644 index 6e47c8134a38..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricAvailability(Model): - """A metric availability value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar retention: The length of retention for the database metric. - :vartype retention: str - :ivar time_grain: The granularity of the database metric. - :vartype time_grain: str - """ - - _validation = { - 'retention': {'readonly': True}, - 'time_grain': {'readonly': True}, - } - - _attribute_map = { - 'retention': {'key': 'retention', 'type': 'str'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MetricAvailability, self).__init__(**kwargs) - self.retention = None - self.time_grain = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition.py deleted file mode 100644 index 0b760f50f3ba..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricDefinition(Model): - """A database metric definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.sql.models.MetricName - :ivar primary_aggregation_type: The primary aggregation type defining how - metric values are displayed. Possible values include: 'None', 'Average', - 'Count', 'Minimum', 'Maximum', 'Total' - :vartype primary_aggregation_type: str or - ~azure.mgmt.sql.models.PrimaryAggregationType - :ivar resource_uri: The resource uri of the database. - :vartype resource_uri: str - :ivar unit: The unit of the metric. Possible values include: 'Count', - 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' - :vartype unit: str or ~azure.mgmt.sql.models.UnitDefinitionType - :ivar metric_availabilities: The list of database metric availabilities - for the metric. - :vartype metric_availabilities: - list[~azure.mgmt.sql.models.MetricAvailability] - """ - - _validation = { - 'name': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'resource_uri': {'readonly': True}, - 'unit': {'readonly': True}, - 'metric_availabilities': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'MetricName'}, - 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, - } - - def __init__(self, **kwargs): - super(MetricDefinition, self).__init__(**kwargs) - self.name = None - self.primary_aggregation_type = None - self.resource_uri = None - self.unit = None - self.metric_availabilities = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_paged.py deleted file mode 100644 index 95a01ebf4e85..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class MetricDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`MetricDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[MetricDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(MetricDefinitionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_py3.py deleted file mode 100644 index 33d5fa9e1323..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricDefinition(Model): - """A database metric definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.sql.models.MetricName - :ivar primary_aggregation_type: The primary aggregation type defining how - metric values are displayed. Possible values include: 'None', 'Average', - 'Count', 'Minimum', 'Maximum', 'Total' - :vartype primary_aggregation_type: str or - ~azure.mgmt.sql.models.PrimaryAggregationType - :ivar resource_uri: The resource uri of the database. - :vartype resource_uri: str - :ivar unit: The unit of the metric. Possible values include: 'Count', - 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' - :vartype unit: str or ~azure.mgmt.sql.models.UnitDefinitionType - :ivar metric_availabilities: The list of database metric availabilities - for the metric. - :vartype metric_availabilities: - list[~azure.mgmt.sql.models.MetricAvailability] - """ - - _validation = { - 'name': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'resource_uri': {'readonly': True}, - 'unit': {'readonly': True}, - 'metric_availabilities': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'MetricName'}, - 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, - } - - def __init__(self, **kwargs) -> None: - super(MetricDefinition, self).__init__(**kwargs) - self.name = None - self.primary_aggregation_type = None - self.resource_uri = None - self.unit = None - self.metric_availabilities = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name.py deleted file mode 100644 index 10643031ce5a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricName(Model): - """A database metric name. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: The name of the database metric. - :vartype value: str - :ivar localized_value: The friendly name of the database metric. - :vartype localized_value: str - """ - - _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MetricName, self).__init__(**kwargs) - self.value = None - self.localized_value = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name_py3.py deleted file mode 100644 index 67551bc7aed9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricName(Model): - """A database metric name. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: The name of the database metric. - :vartype value: str - :ivar localized_value: The friendly name of the database metric. - :vartype localized_value: str - """ - - _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MetricName, self).__init__(**kwargs) - self.value = None - self.localized_value = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_paged.py deleted file mode 100644 index 61aa43a2fced..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class MetricPaged(Paged): - """ - A paging container for iterating over a list of :class:`Metric ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Metric]'} - } - - def __init__(self, *args, **kwargs): - - super(MetricPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_py3.py deleted file mode 100644 index 5eae901bca7e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Metric(Model): - """Database metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar start_time: The start time for the metric (ISO-8601 format). - :vartype start_time: datetime - :ivar end_time: The end time for the metric (ISO-8601 format). - :vartype end_time: datetime - :ivar time_grain: The time step to be used to summarize the metric values. - :vartype time_grain: str - :ivar unit: The unit of the metric. Possible values include: 'count', - 'bytes', 'seconds', 'percent', 'countPerSecond', 'bytesPerSecond' - :vartype unit: str or ~azure.mgmt.sql.models.UnitType - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.sql.models.MetricName - :ivar metric_values: The metric values for the specified time window and - timestep. - :vartype metric_values: list[~azure.mgmt.sql.models.MetricValue] - """ - - _validation = { - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'unit': {'readonly': True}, - 'name': {'readonly': True}, - 'metric_values': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, - } - - def __init__(self, **kwargs) -> None: - super(Metric, self).__init__(**kwargs) - self.start_time = None - self.end_time = None - self.time_grain = None - self.unit = None - self.name = None - self.metric_values = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value.py deleted file mode 100644 index a506295d5bfb..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricValue(Model): - """Represents database metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar count: The number of values for the metric. - :vartype count: float - :ivar average: The average value of the metric. - :vartype average: float - :ivar maximum: The max value of the metric. - :vartype maximum: float - :ivar minimum: The min value of the metric. - :vartype minimum: float - :ivar timestamp: The metric timestamp (ISO-8601 format). - :vartype timestamp: datetime - :ivar total: The total value of the metric. - :vartype total: float - """ - - _validation = { - 'count': {'readonly': True}, - 'average': {'readonly': True}, - 'maximum': {'readonly': True}, - 'minimum': {'readonly': True}, - 'timestamp': {'readonly': True}, - 'total': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'float'}, - 'average': {'key': 'average', 'type': 'float'}, - 'maximum': {'key': 'maximum', 'type': 'float'}, - 'minimum': {'key': 'minimum', 'type': 'float'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'total': {'key': 'total', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(MetricValue, self).__init__(**kwargs) - self.count = None - self.average = None - self.maximum = None - self.minimum = None - self.timestamp = None - self.total = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value_py3.py deleted file mode 100644 index a1b027d62864..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricValue(Model): - """Represents database metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar count: The number of values for the metric. - :vartype count: float - :ivar average: The average value of the metric. - :vartype average: float - :ivar maximum: The max value of the metric. - :vartype maximum: float - :ivar minimum: The min value of the metric. - :vartype minimum: float - :ivar timestamp: The metric timestamp (ISO-8601 format). - :vartype timestamp: datetime - :ivar total: The total value of the metric. - :vartype total: float - """ - - _validation = { - 'count': {'readonly': True}, - 'average': {'readonly': True}, - 'maximum': {'readonly': True}, - 'minimum': {'readonly': True}, - 'timestamp': {'readonly': True}, - 'total': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'float'}, - 'average': {'key': 'average', 'type': 'float'}, - 'maximum': {'key': 'maximum', 'type': 'float'}, - 'minimum': {'key': 'minimum', 'type': 'float'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'total': {'key': 'total', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(MetricValue, self).__init__(**kwargs) - self.count = None - self.average = None - self.maximum = None - self.minimum = None - self.timestamp = None - self.total = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation.py deleted file mode 100644 index 09138c4b9086..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """SQL REST API operation definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the operation being performed on this particular - object. - :vartype name: str - :ivar display: The localized display information for this particular - operation / action. - :vartype display: ~azure.mgmt.sql.models.OperationDisplay - :ivar origin: The intended executor of the operation. Possible values - include: 'user', 'system' - :vartype origin: str or ~azure.mgmt.sql.models.OperationOrigin - :ivar properties: Additional descriptions for the operation. - :vartype properties: dict[str, object] - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - 'origin': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{object}'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.origin = None - self.properties = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display.py deleted file mode 100644 index dfbc4a6fcff3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """Display metadata associated with the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: The localized friendly form of the resource provider name. - :vartype provider: str - :ivar resource: The localized friendly form of the resource type related - to this action/operation. - :vartype resource: str - :ivar operation: The localized friendly name for the operation. - :vartype operation: str - :ivar description: The localized friendly description for the operation. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display_py3.py deleted file mode 100644 index 0541321c178c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """Display metadata associated with the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: The localized friendly form of the resource provider name. - :vartype provider: str - :ivar resource: The localized friendly form of the resource type related - to this action/operation. - :vartype resource: str - :ivar operation: The localized friendly name for the operation. - :vartype operation: str - :ivar description: The localized friendly description for the operation. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact.py deleted file mode 100644 index 6b69a122de4c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationImpact(Model): - """The impact of an operation, both in absolute and relative terms. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the impact dimension. - :vartype name: str - :ivar unit: The unit in which estimated impact to dimension is measured. - :vartype unit: str - :ivar change_value_absolute: The absolute impact to dimension. - :vartype change_value_absolute: float - :ivar change_value_relative: The relative impact to dimension (null if not - applicable) - :vartype change_value_relative: float - """ - - _validation = { - 'name': {'readonly': True}, - 'unit': {'readonly': True}, - 'change_value_absolute': {'readonly': True}, - 'change_value_relative': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'change_value_absolute': {'key': 'changeValueAbsolute', 'type': 'float'}, - 'change_value_relative': {'key': 'changeValueRelative', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(OperationImpact, self).__init__(**kwargs) - self.name = None - self.unit = None - self.change_value_absolute = None - self.change_value_relative = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact_py3.py deleted file mode 100644 index f53b9445f998..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationImpact(Model): - """The impact of an operation, both in absolute and relative terms. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the impact dimension. - :vartype name: str - :ivar unit: The unit in which estimated impact to dimension is measured. - :vartype unit: str - :ivar change_value_absolute: The absolute impact to dimension. - :vartype change_value_absolute: float - :ivar change_value_relative: The relative impact to dimension (null if not - applicable) - :vartype change_value_relative: float - """ - - _validation = { - 'name': {'readonly': True}, - 'unit': {'readonly': True}, - 'change_value_absolute': {'readonly': True}, - 'change_value_relative': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'change_value_absolute': {'key': 'changeValueAbsolute', 'type': 'float'}, - 'change_value_relative': {'key': 'changeValueRelative', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationImpact, self).__init__(**kwargs) - self.name = None - self.unit = None - self.change_value_absolute = None - self.change_value_relative = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_paged.py deleted file mode 100644 index ec8c4dc4c1c7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_py3.py deleted file mode 100644 index 4968981d1858..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """SQL REST API operation definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the operation being performed on this particular - object. - :vartype name: str - :ivar display: The localized display information for this particular - operation / action. - :vartype display: ~azure.mgmt.sql.models.OperationDisplay - :ivar origin: The intended executor of the operation. Possible values - include: 'user', 'system' - :vartype origin: str or ~azure.mgmt.sql.models.OperationOrigin - :ivar properties: Additional descriptions for the operation. - :vartype properties: dict[str, object] - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - 'origin': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{object}'}, - } - - def __init__(self, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.origin = None - self.properties = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info.py deleted file mode 100644 index de30bd259f7a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartnerInfo(Model): - """Partner server information for the failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource identifier of the partner server. - :type id: str - :ivar location: Geo location of the partner server. - :vartype location: str - :ivar replication_role: Replication role of the partner server. Possible - values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.FailoverGroupReplicationRole - """ - - _validation = { - 'id': {'required': True}, - 'location': {'readonly': True}, - 'replication_role': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'replication_role': {'key': 'replicationRole', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PartnerInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.location = None - self.replication_role = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info_py3.py deleted file mode 100644 index 0edede88118a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartnerInfo(Model): - """Partner server information for the failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource identifier of the partner server. - :type id: str - :ivar location: Geo location of the partner server. - :vartype location: str - :ivar replication_role: Replication role of the partner server. Possible - values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.FailoverGroupReplicationRole - """ - - _validation = { - 'id': {'required': True}, - 'location': {'readonly': True}, - 'replication_role': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'replication_role': {'key': 'replicationRole', 'type': 'str'}, - } - - def __init__(self, *, id: str, **kwargs) -> None: - super(PartnerInfo, self).__init__(**kwargs) - self.id = id - self.location = None - self.replication_role = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info.py deleted file mode 100644 index 4d8e2688acb1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartnerRegionInfo(Model): - """Partner region information for the failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param location: Geo location of the partner managed instances. - :type location: str - :ivar replication_role: Replication role of the partner managed instances. - Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole - """ - - _validation = { - 'replication_role': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'replication_role': {'key': 'replicationRole', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PartnerRegionInfo, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.replication_role = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info_py3.py deleted file mode 100644 index 76c52b49c0ba..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartnerRegionInfo(Model): - """Partner region information for the failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param location: Geo location of the partner managed instances. - :type location: str - :ivar replication_role: Replication role of the partner managed instances. - Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole - """ - - _validation = { - 'replication_role': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'replication_role': {'key': 'replicationRole', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, **kwargs) -> None: - super(PartnerRegionInfo, self).__init__(**kwargs) - self.location = location - self.replication_role = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability.py deleted file mode 100644 index 2463e1818718..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PerformanceLevelCapability(Model): - """The performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: Performance level value. - :vartype value: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - """ - - _validation = { - 'value': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PerformanceLevelCapability, self).__init__(**kwargs) - self.value = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability_py3.py deleted file mode 100644 index 96119e14568d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PerformanceLevelCapability(Model): - """The performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: Performance level value. - :vartype value: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - """ - - _validation = { - 'value': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(PerformanceLevelCapability, self).__init__(**kwargs) - self.value = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource.py deleted file mode 100644 index 21fea4f24360..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ProxyResource(Resource): - """ARM proxy resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProxyResource, self).__init__(**kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource_py3.py deleted file mode 100644 index 707323dfc134..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ProxyResource(Resource): - """ARM proxy resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ProxyResource, self).__init__(**kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool.py deleted file mode 100644 index 0d80a9a31ac9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RecommendedElasticPool(ProxyResource): - """Represents a recommended elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_edition: The edition of the recommended elastic pool. The - ElasticPoolEdition enumeration contains all the valid editions. Possible - values include: 'Basic', 'Standard', 'Premium' - :vartype database_edition: str or - ~azure.mgmt.sql.models.ElasticPoolEdition - :param dtu: The DTU for the recommended elastic pool. - :type dtu: float - :param database_dtu_min: The minimum DTU for the database. - :type database_dtu_min: float - :param database_dtu_max: The maximum DTU for the database. - :type database_dtu_max: float - :param storage_mb: Gets storage size in megabytes. - :type storage_mb: float - :ivar observation_period_start: The observation period start (ISO8601 - format). - :vartype observation_period_start: datetime - :ivar observation_period_end: The observation period start (ISO8601 - format). - :vartype observation_period_end: datetime - :ivar max_observed_dtu: Gets maximum observed DTU. - :vartype max_observed_dtu: float - :ivar max_observed_storage_mb: Gets maximum observed storage in megabytes. - :vartype max_observed_storage_mb: float - :ivar databases: The list of databases in this pool. Expanded property - :vartype databases: list[~azure.mgmt.sql.models.TrackedResource] - :ivar metrics: The list of databases housed in the server. Expanded - property - :vartype metrics: - list[~azure.mgmt.sql.models.RecommendedElasticPoolMetric] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_edition': {'readonly': True}, - 'observation_period_start': {'readonly': True}, - 'observation_period_end': {'readonly': True}, - 'max_observed_dtu': {'readonly': True}, - 'max_observed_storage_mb': {'readonly': True}, - 'databases': {'readonly': True}, - 'metrics': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'dtu': {'key': 'properties.dtu', 'type': 'float'}, - 'database_dtu_min': {'key': 'properties.databaseDtuMin', 'type': 'float'}, - 'database_dtu_max': {'key': 'properties.databaseDtuMax', 'type': 'float'}, - 'storage_mb': {'key': 'properties.storageMB', 'type': 'float'}, - 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, - 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, - 'max_observed_dtu': {'key': 'properties.maxObservedDtu', 'type': 'float'}, - 'max_observed_storage_mb': {'key': 'properties.maxObservedStorageMB', 'type': 'float'}, - 'databases': {'key': 'properties.databases', 'type': '[TrackedResource]'}, - 'metrics': {'key': 'properties.metrics', 'type': '[RecommendedElasticPoolMetric]'}, - } - - def __init__(self, **kwargs): - super(RecommendedElasticPool, self).__init__(**kwargs) - self.database_edition = None - self.dtu = kwargs.get('dtu', None) - self.database_dtu_min = kwargs.get('database_dtu_min', None) - self.database_dtu_max = kwargs.get('database_dtu_max', None) - self.storage_mb = kwargs.get('storage_mb', None) - self.observation_period_start = None - self.observation_period_end = None - self.max_observed_dtu = None - self.max_observed_storage_mb = None - self.databases = None - self.metrics = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric.py deleted file mode 100644 index 9ed07ced53d7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecommendedElasticPoolMetric(Model): - """Represents recommended elastic pool metric. - - :param date_time_property: The time of metric (ISO8601 format). - :type date_time_property: datetime - :param dtu: Gets or sets the DTUs (Database Transaction Units). See - https://azure.microsoft.com/documentation/articles/sql-database-what-is-a-dtu/ - :type dtu: float - :param size_gb: Gets or sets size in gigabytes. - :type size_gb: float - """ - - _attribute_map = { - 'date_time_property': {'key': 'dateTime', 'type': 'iso-8601'}, - 'dtu': {'key': 'dtu', 'type': 'float'}, - 'size_gb': {'key': 'sizeGB', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(RecommendedElasticPoolMetric, self).__init__(**kwargs) - self.date_time_property = kwargs.get('date_time_property', None) - self.dtu = kwargs.get('dtu', None) - self.size_gb = kwargs.get('size_gb', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_paged.py deleted file mode 100644 index a5106f989535..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RecommendedElasticPoolMetricPaged(Paged): - """ - A paging container for iterating over a list of :class:`RecommendedElasticPoolMetric ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RecommendedElasticPoolMetric]'} - } - - def __init__(self, *args, **kwargs): - - super(RecommendedElasticPoolMetricPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_py3.py deleted file mode 100644 index d33210bf6e58..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecommendedElasticPoolMetric(Model): - """Represents recommended elastic pool metric. - - :param date_time_property: The time of metric (ISO8601 format). - :type date_time_property: datetime - :param dtu: Gets or sets the DTUs (Database Transaction Units). See - https://azure.microsoft.com/documentation/articles/sql-database-what-is-a-dtu/ - :type dtu: float - :param size_gb: Gets or sets size in gigabytes. - :type size_gb: float - """ - - _attribute_map = { - 'date_time_property': {'key': 'dateTime', 'type': 'iso-8601'}, - 'dtu': {'key': 'dtu', 'type': 'float'}, - 'size_gb': {'key': 'sizeGB', 'type': 'float'}, - } - - def __init__(self, *, date_time_property=None, dtu: float=None, size_gb: float=None, **kwargs) -> None: - super(RecommendedElasticPoolMetric, self).__init__(**kwargs) - self.date_time_property = date_time_property - self.dtu = dtu - self.size_gb = size_gb diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_paged.py deleted file mode 100644 index ceb235126fbe..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RecommendedElasticPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`RecommendedElasticPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RecommendedElasticPool]'} - } - - def __init__(self, *args, **kwargs): - - super(RecommendedElasticPoolPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_py3.py deleted file mode 100644 index 2f8a14d6abfa..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_py3.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RecommendedElasticPool(ProxyResource): - """Represents a recommended elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_edition: The edition of the recommended elastic pool. The - ElasticPoolEdition enumeration contains all the valid editions. Possible - values include: 'Basic', 'Standard', 'Premium' - :vartype database_edition: str or - ~azure.mgmt.sql.models.ElasticPoolEdition - :param dtu: The DTU for the recommended elastic pool. - :type dtu: float - :param database_dtu_min: The minimum DTU for the database. - :type database_dtu_min: float - :param database_dtu_max: The maximum DTU for the database. - :type database_dtu_max: float - :param storage_mb: Gets storage size in megabytes. - :type storage_mb: float - :ivar observation_period_start: The observation period start (ISO8601 - format). - :vartype observation_period_start: datetime - :ivar observation_period_end: The observation period start (ISO8601 - format). - :vartype observation_period_end: datetime - :ivar max_observed_dtu: Gets maximum observed DTU. - :vartype max_observed_dtu: float - :ivar max_observed_storage_mb: Gets maximum observed storage in megabytes. - :vartype max_observed_storage_mb: float - :ivar databases: The list of databases in this pool. Expanded property - :vartype databases: list[~azure.mgmt.sql.models.TrackedResource] - :ivar metrics: The list of databases housed in the server. Expanded - property - :vartype metrics: - list[~azure.mgmt.sql.models.RecommendedElasticPoolMetric] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_edition': {'readonly': True}, - 'observation_period_start': {'readonly': True}, - 'observation_period_end': {'readonly': True}, - 'max_observed_dtu': {'readonly': True}, - 'max_observed_storage_mb': {'readonly': True}, - 'databases': {'readonly': True}, - 'metrics': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'dtu': {'key': 'properties.dtu', 'type': 'float'}, - 'database_dtu_min': {'key': 'properties.databaseDtuMin', 'type': 'float'}, - 'database_dtu_max': {'key': 'properties.databaseDtuMax', 'type': 'float'}, - 'storage_mb': {'key': 'properties.storageMB', 'type': 'float'}, - 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, - 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, - 'max_observed_dtu': {'key': 'properties.maxObservedDtu', 'type': 'float'}, - 'max_observed_storage_mb': {'key': 'properties.maxObservedStorageMB', 'type': 'float'}, - 'databases': {'key': 'properties.databases', 'type': '[TrackedResource]'}, - 'metrics': {'key': 'properties.metrics', 'type': '[RecommendedElasticPoolMetric]'}, - } - - def __init__(self, *, dtu: float=None, database_dtu_min: float=None, database_dtu_max: float=None, storage_mb: float=None, **kwargs) -> None: - super(RecommendedElasticPool, self).__init__(**kwargs) - self.database_edition = None - self.dtu = dtu - self.database_dtu_min = database_dtu_min - self.database_dtu_max = database_dtu_max - self.storage_mb = storage_mb - self.observation_period_start = None - self.observation_period_end = None - self.max_observed_dtu = None - self.max_observed_storage_mb = None - self.databases = None - self.metrics = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index.py deleted file mode 100644 index df1eba91f84f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RecommendedIndex(ProxyResource): - """Represents a database recommended index. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar action: The proposed index action. You can create a missing index, - drop an unused index, or rebuild an existing index to improve its - performance. Possible values include: 'Create', 'Drop', 'Rebuild' - :vartype action: str or ~azure.mgmt.sql.models.RecommendedIndexAction - :ivar state: The current recommendation state. Possible values include: - 'Active', 'Pending', 'Executing', 'Verifying', 'Pending Revert', - 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success' - :vartype state: str or ~azure.mgmt.sql.models.RecommendedIndexState - :ivar created: The UTC datetime showing when this resource was created - (ISO8601 format). - :vartype created: datetime - :ivar last_modified: The UTC datetime of when was this resource last - changed (ISO8601 format). - :vartype last_modified: datetime - :ivar index_type: The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, - CLUSTERED COLUMNSTORE). Possible values include: 'CLUSTERED', - 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED COLUMNSTORE' - :vartype index_type: str or ~azure.mgmt.sql.models.RecommendedIndexType - :ivar schema: The schema where table to build index over resides - :vartype schema: str - :ivar table: The table on which to build index. - :vartype table: str - :ivar columns: Columns over which to build index - :vartype columns: list[str] - :ivar included_columns: The list of column names to be included in the - index - :vartype included_columns: list[str] - :ivar index_script: The full build index script - :vartype index_script: str - :ivar estimated_impact: The estimated impact of doing recommended index - action. - :vartype estimated_impact: list[~azure.mgmt.sql.models.OperationImpact] - :ivar reported_impact: The values reported after index action is complete. - :vartype reported_impact: list[~azure.mgmt.sql.models.OperationImpact] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'action': {'readonly': True}, - 'state': {'readonly': True}, - 'created': {'readonly': True}, - 'last_modified': {'readonly': True}, - 'index_type': {'readonly': True}, - 'schema': {'readonly': True}, - 'table': {'readonly': True}, - 'columns': {'readonly': True}, - 'included_columns': {'readonly': True}, - 'index_script': {'readonly': True}, - 'estimated_impact': {'readonly': True}, - 'reported_impact': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'action': {'key': 'properties.action', 'type': 'RecommendedIndexAction'}, - 'state': {'key': 'properties.state', 'type': 'RecommendedIndexState'}, - 'created': {'key': 'properties.created', 'type': 'iso-8601'}, - 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, - 'index_type': {'key': 'properties.indexType', 'type': 'RecommendedIndexType'}, - 'schema': {'key': 'properties.schema', 'type': 'str'}, - 'table': {'key': 'properties.table', 'type': 'str'}, - 'columns': {'key': 'properties.columns', 'type': '[str]'}, - 'included_columns': {'key': 'properties.includedColumns', 'type': '[str]'}, - 'index_script': {'key': 'properties.indexScript', 'type': 'str'}, - 'estimated_impact': {'key': 'properties.estimatedImpact', 'type': '[OperationImpact]'}, - 'reported_impact': {'key': 'properties.reportedImpact', 'type': '[OperationImpact]'}, - } - - def __init__(self, **kwargs): - super(RecommendedIndex, self).__init__(**kwargs) - self.action = None - self.state = None - self.created = None - self.last_modified = None - self.index_type = None - self.schema = None - self.table = None - self.columns = None - self.included_columns = None - self.index_script = None - self.estimated_impact = None - self.reported_impact = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index_py3.py deleted file mode 100644 index 5aea5620371e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index_py3.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RecommendedIndex(ProxyResource): - """Represents a database recommended index. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar action: The proposed index action. You can create a missing index, - drop an unused index, or rebuild an existing index to improve its - performance. Possible values include: 'Create', 'Drop', 'Rebuild' - :vartype action: str or ~azure.mgmt.sql.models.RecommendedIndexAction - :ivar state: The current recommendation state. Possible values include: - 'Active', 'Pending', 'Executing', 'Verifying', 'Pending Revert', - 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success' - :vartype state: str or ~azure.mgmt.sql.models.RecommendedIndexState - :ivar created: The UTC datetime showing when this resource was created - (ISO8601 format). - :vartype created: datetime - :ivar last_modified: The UTC datetime of when was this resource last - changed (ISO8601 format). - :vartype last_modified: datetime - :ivar index_type: The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, - CLUSTERED COLUMNSTORE). Possible values include: 'CLUSTERED', - 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED COLUMNSTORE' - :vartype index_type: str or ~azure.mgmt.sql.models.RecommendedIndexType - :ivar schema: The schema where table to build index over resides - :vartype schema: str - :ivar table: The table on which to build index. - :vartype table: str - :ivar columns: Columns over which to build index - :vartype columns: list[str] - :ivar included_columns: The list of column names to be included in the - index - :vartype included_columns: list[str] - :ivar index_script: The full build index script - :vartype index_script: str - :ivar estimated_impact: The estimated impact of doing recommended index - action. - :vartype estimated_impact: list[~azure.mgmt.sql.models.OperationImpact] - :ivar reported_impact: The values reported after index action is complete. - :vartype reported_impact: list[~azure.mgmt.sql.models.OperationImpact] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'action': {'readonly': True}, - 'state': {'readonly': True}, - 'created': {'readonly': True}, - 'last_modified': {'readonly': True}, - 'index_type': {'readonly': True}, - 'schema': {'readonly': True}, - 'table': {'readonly': True}, - 'columns': {'readonly': True}, - 'included_columns': {'readonly': True}, - 'index_script': {'readonly': True}, - 'estimated_impact': {'readonly': True}, - 'reported_impact': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'action': {'key': 'properties.action', 'type': 'RecommendedIndexAction'}, - 'state': {'key': 'properties.state', 'type': 'RecommendedIndexState'}, - 'created': {'key': 'properties.created', 'type': 'iso-8601'}, - 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, - 'index_type': {'key': 'properties.indexType', 'type': 'RecommendedIndexType'}, - 'schema': {'key': 'properties.schema', 'type': 'str'}, - 'table': {'key': 'properties.table', 'type': 'str'}, - 'columns': {'key': 'properties.columns', 'type': '[str]'}, - 'included_columns': {'key': 'properties.includedColumns', 'type': '[str]'}, - 'index_script': {'key': 'properties.indexScript', 'type': 'str'}, - 'estimated_impact': {'key': 'properties.estimatedImpact', 'type': '[OperationImpact]'}, - 'reported_impact': {'key': 'properties.reportedImpact', 'type': '[OperationImpact]'}, - } - - def __init__(self, **kwargs) -> None: - super(RecommendedIndex, self).__init__(**kwargs) - self.action = None - self.state = None - self.created = None - self.last_modified = None - self.index_type = None - self.schema = None - self.table = None - self.columns = None - self.included_columns = None - self.index_script = None - self.estimated_impact = None - self.reported_impact = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database.py deleted file mode 100644 index 0d3b630ce18d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RecoverableDatabase(ProxyResource): - """A recoverable database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar edition: The edition of the database - :vartype edition: str - :ivar service_level_objective: The service level objective name of the - database - :vartype service_level_objective: str - :ivar elastic_pool_name: The elastic pool name of the database - :vartype elastic_pool_name: str - :ivar last_available_backup_date: The last available backup date of the - database (ISO8601 format) - :vartype last_available_backup_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'edition': {'readonly': True}, - 'service_level_objective': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'last_available_backup_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'edition': {'key': 'properties.edition', 'type': 'str'}, - 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(RecoverableDatabase, self).__init__(**kwargs) - self.edition = None - self.service_level_objective = None - self.elastic_pool_name = None - self.last_available_backup_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_paged.py deleted file mode 100644 index cf4cde8ae7e0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RecoverableDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`RecoverableDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RecoverableDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(RecoverableDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_py3.py deleted file mode 100644 index 8eb9d5510689..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RecoverableDatabase(ProxyResource): - """A recoverable database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar edition: The edition of the database - :vartype edition: str - :ivar service_level_objective: The service level objective name of the - database - :vartype service_level_objective: str - :ivar elastic_pool_name: The elastic pool name of the database - :vartype elastic_pool_name: str - :ivar last_available_backup_date: The last available backup date of the - database (ISO8601 format) - :vartype last_available_backup_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'edition': {'readonly': True}, - 'service_level_objective': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'last_available_backup_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'edition': {'key': 'properties.edition', 'type': 'str'}, - 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(RecoverableDatabase, self).__init__(**kwargs) - self.edition = None - self.service_level_objective = None - self.elastic_pool_name = None - self.last_available_backup_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database.py deleted file mode 100644 index cd6adeaeac89..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RecoverableManagedDatabase(ProxyResource): - """A recoverable managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar last_available_backup_date: The last available backup date. - :vartype last_available_backup_date: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'last_available_backup_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RecoverableManagedDatabase, self).__init__(**kwargs) - self.last_available_backup_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_paged.py deleted file mode 100644 index 9c3a35713275..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RecoverableManagedDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`RecoverableManagedDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RecoverableManagedDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(RecoverableManagedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_py3.py deleted file mode 100644 index b6f295aceffb..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RecoverableManagedDatabase(ProxyResource): - """A recoverable managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar last_available_backup_date: The last available backup date. - :vartype last_available_backup_date: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'last_available_backup_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(RecoverableManagedDatabase, self).__init__(**kwargs) - self.last_available_backup_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link.py deleted file mode 100644 index 450161ab6c9b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ReplicationLink(ProxyResource): - """Represents a database replication link. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Location of the server that contains this firewall rule. - :vartype location: str - :ivar is_termination_allowed: Legacy value indicating whether termination - is allowed. Currently always returns true. - :vartype is_termination_allowed: bool - :ivar replication_mode: Replication mode of this replication link. - :vartype replication_mode: str - :ivar partner_server: The name of the server hosting the partner database. - :vartype partner_server: str - :ivar partner_database: The name of the partner database. - :vartype partner_database: str - :ivar partner_location: The Azure Region of the partner database. - :vartype partner_location: str - :ivar role: The role of the database in the replication link. Possible - values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', - 'Copy' - :vartype role: str or ~azure.mgmt.sql.models.ReplicationRole - :ivar partner_role: The role of the partner database in the replication - link. Possible values include: 'Primary', 'Secondary', - 'NonReadableSecondary', 'Source', 'Copy' - :vartype partner_role: str or ~azure.mgmt.sql.models.ReplicationRole - :ivar start_time: The start time for the replication link. - :vartype start_time: datetime - :ivar percent_complete: The percentage of seeding complete for the - replication link. - :vartype percent_complete: int - :ivar replication_state: The replication state for the replication link. - Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP', 'SUSPENDED' - :vartype replication_state: str or ~azure.mgmt.sql.models.ReplicationState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'is_termination_allowed': {'readonly': True}, - 'replication_mode': {'readonly': True}, - 'partner_server': {'readonly': True}, - 'partner_database': {'readonly': True}, - 'partner_location': {'readonly': True}, - 'role': {'readonly': True}, - 'partner_role': {'readonly': True}, - 'start_time': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'replication_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'is_termination_allowed': {'key': 'properties.isTerminationAllowed', 'type': 'bool'}, - 'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'}, - 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, - 'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'}, - 'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'}, - 'role': {'key': 'properties.role', 'type': 'ReplicationRole'}, - 'partner_role': {'key': 'properties.partnerRole', 'type': 'ReplicationRole'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ReplicationLink, self).__init__(**kwargs) - self.location = None - self.is_termination_allowed = None - self.replication_mode = None - self.partner_server = None - self.partner_database = None - self.partner_location = None - self.role = None - self.partner_role = None - self.start_time = None - self.percent_complete = None - self.replication_state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_paged.py deleted file mode 100644 index 18b96c9e0e3c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ReplicationLinkPaged(Paged): - """ - A paging container for iterating over a list of :class:`ReplicationLink ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ReplicationLink]'} - } - - def __init__(self, *args, **kwargs): - - super(ReplicationLinkPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_py3.py deleted file mode 100644 index 740748f154b2..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_py3.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ReplicationLink(ProxyResource): - """Represents a database replication link. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Location of the server that contains this firewall rule. - :vartype location: str - :ivar is_termination_allowed: Legacy value indicating whether termination - is allowed. Currently always returns true. - :vartype is_termination_allowed: bool - :ivar replication_mode: Replication mode of this replication link. - :vartype replication_mode: str - :ivar partner_server: The name of the server hosting the partner database. - :vartype partner_server: str - :ivar partner_database: The name of the partner database. - :vartype partner_database: str - :ivar partner_location: The Azure Region of the partner database. - :vartype partner_location: str - :ivar role: The role of the database in the replication link. Possible - values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', - 'Copy' - :vartype role: str or ~azure.mgmt.sql.models.ReplicationRole - :ivar partner_role: The role of the partner database in the replication - link. Possible values include: 'Primary', 'Secondary', - 'NonReadableSecondary', 'Source', 'Copy' - :vartype partner_role: str or ~azure.mgmt.sql.models.ReplicationRole - :ivar start_time: The start time for the replication link. - :vartype start_time: datetime - :ivar percent_complete: The percentage of seeding complete for the - replication link. - :vartype percent_complete: int - :ivar replication_state: The replication state for the replication link. - Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP', 'SUSPENDED' - :vartype replication_state: str or ~azure.mgmt.sql.models.ReplicationState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'is_termination_allowed': {'readonly': True}, - 'replication_mode': {'readonly': True}, - 'partner_server': {'readonly': True}, - 'partner_database': {'readonly': True}, - 'partner_location': {'readonly': True}, - 'role': {'readonly': True}, - 'partner_role': {'readonly': True}, - 'start_time': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'replication_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'is_termination_allowed': {'key': 'properties.isTerminationAllowed', 'type': 'bool'}, - 'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'}, - 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, - 'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'}, - 'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'}, - 'role': {'key': 'properties.role', 'type': 'ReplicationRole'}, - 'partner_role': {'key': 'properties.partnerRole', 'type': 'ReplicationRole'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ReplicationLink, self).__init__(**kwargs) - self.location = None - self.is_termination_allowed = None - self.replication_mode = None - self.partner_server = None - self.partner_database = None - self.partner_location = None - self.role = None - self.partner_role = None - self.start_time = None - self.percent_complete = None - self.replication_state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource.py deleted file mode 100644 index fc92549d32e9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """ARM resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity.py deleted file mode 100644 index 57a9e4b4a161..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceIdentity(Model): - """Azure Active Directory identity configuration for a resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The Azure Active Directory principal id. - :vartype principal_id: str - :param type: The identity type. Set this to 'SystemAssigned' in order to - automatically create and assign an Azure Active Directory principal for - the resource. Possible values include: 'SystemAssigned' - :type type: str or ~azure.mgmt.sql.models.IdentityType - :ivar tenant_id: The Azure Active Directory tenant id. - :vartype tenant_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceIdentity, self).__init__(**kwargs) - self.principal_id = None - self.type = kwargs.get('type', None) - self.tenant_id = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity_py3.py deleted file mode 100644 index 3b1d8d90f100..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceIdentity(Model): - """Azure Active Directory identity configuration for a resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The Azure Active Directory principal id. - :vartype principal_id: str - :param type: The identity type. Set this to 'SystemAssigned' in order to - automatically create and assign an Azure Active Directory principal for - the resource. Possible values include: 'SystemAssigned' - :type type: str or ~azure.mgmt.sql.models.IdentityType - :ivar tenant_id: The Azure Active Directory tenant id. - :vartype tenant_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ResourceIdentity, self).__init__(**kwargs) - self.principal_id = None - self.type = type - self.tenant_id = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition.py deleted file mode 100644 index 2c933120d7c8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceMoveDefinition(Model): - """Contains the information necessary to perform a resource move (rename). - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The target ID for the resource - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceMoveDefinition, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition_py3.py deleted file mode 100644 index f6ce2ac0f628..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceMoveDefinition(Model): - """Contains the information necessary to perform a resource move (rename). - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The target ID for the resource - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str, **kwargs) -> None: - super(ResourceMoveDefinition, self).__init__(**kwargs) - self.id = id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_py3.py deleted file mode 100644 index aedc5cfaf0b9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """ARM resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database.py deleted file mode 100644 index 8e419fb0b50b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RestorableDroppedDatabase(ProxyResource): - """A restorable dropped database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: The geo-location where the resource lives - :vartype location: str - :ivar database_name: The name of the database - :vartype database_name: str - :ivar edition: The edition of the database - :vartype edition: str - :ivar max_size_bytes: The max size in bytes of the database - :vartype max_size_bytes: str - :ivar service_level_objective: The service level objective name of the - database - :vartype service_level_objective: str - :ivar elastic_pool_name: The elastic pool name of the database - :vartype elastic_pool_name: str - :ivar creation_date: The creation date of the database (ISO8601 format) - :vartype creation_date: datetime - :ivar deletion_date: The deletion date of the database (ISO8601 format) - :vartype deletion_date: datetime - :ivar earliest_restore_date: The earliest restore date of the database - (ISO8601 format) - :vartype earliest_restore_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'database_name': {'readonly': True}, - 'edition': {'readonly': True}, - 'max_size_bytes': {'readonly': True}, - 'service_level_objective': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'edition': {'key': 'properties.edition', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'str'}, - 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(RestorableDroppedDatabase, self).__init__(**kwargs) - self.location = None - self.database_name = None - self.edition = None - self.max_size_bytes = None - self.service_level_objective = None - self.elastic_pool_name = None - self.creation_date = None - self.deletion_date = None - self.earliest_restore_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_paged.py deleted file mode 100644 index b0eb93010942..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RestorableDroppedDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`RestorableDroppedDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RestorableDroppedDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(RestorableDroppedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_py3.py deleted file mode 100644 index 0e4a5f45ec89..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_py3.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RestorableDroppedDatabase(ProxyResource): - """A restorable dropped database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: The geo-location where the resource lives - :vartype location: str - :ivar database_name: The name of the database - :vartype database_name: str - :ivar edition: The edition of the database - :vartype edition: str - :ivar max_size_bytes: The max size in bytes of the database - :vartype max_size_bytes: str - :ivar service_level_objective: The service level objective name of the - database - :vartype service_level_objective: str - :ivar elastic_pool_name: The elastic pool name of the database - :vartype elastic_pool_name: str - :ivar creation_date: The creation date of the database (ISO8601 format) - :vartype creation_date: datetime - :ivar deletion_date: The deletion date of the database (ISO8601 format) - :vartype deletion_date: datetime - :ivar earliest_restore_date: The earliest restore date of the database - (ISO8601 format) - :vartype earliest_restore_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'database_name': {'readonly': True}, - 'edition': {'readonly': True}, - 'max_size_bytes': {'readonly': True}, - 'service_level_objective': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'edition': {'key': 'properties.edition', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'str'}, - 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(RestorableDroppedDatabase, self).__init__(**kwargs) - self.location = None - self.database_name = None - self.edition = None - self.max_size_bytes = None - self.service_level_objective = None - self.elastic_pool_name = None - self.creation_date = None - self.deletion_date = None - self.earliest_restore_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database.py deleted file mode 100644 index e23713aa2a2d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class RestorableDroppedManagedDatabase(TrackedResource): - """A restorable dropped managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :ivar database_name: The name of the database. - :vartype database_name: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar deletion_date: The deletion date of the database (ISO8601 format). - :vartype deletion_date: datetime - :ivar earliest_restore_date: The earliest restore date of the database - (ISO8601 format). - :vartype earliest_restore_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'database_name': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(RestorableDroppedManagedDatabase, self).__init__(**kwargs) - self.database_name = None - self.creation_date = None - self.deletion_date = None - self.earliest_restore_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_paged.py deleted file mode 100644 index d6e432c2c351..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RestorableDroppedManagedDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`RestorableDroppedManagedDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RestorableDroppedManagedDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(RestorableDroppedManagedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_py3.py deleted file mode 100644 index 7997b13a21ce..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class RestorableDroppedManagedDatabase(TrackedResource): - """A restorable dropped managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :ivar database_name: The name of the database. - :vartype database_name: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar deletion_date: The deletion date of the database (ISO8601 format). - :vartype deletion_date: datetime - :ivar earliest_restore_date: The earliest restore date of the database - (ISO8601 format). - :vartype earliest_restore_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'database_name': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(RestorableDroppedManagedDatabase, self).__init__(location=location, tags=tags, **kwargs) - self.database_name = None - self.creation_date = None - self.deletion_date = None - self.earliest_restore_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point.py deleted file mode 100644 index 86cf0382ffc8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RestorePoint(ProxyResource): - """Database restore points. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar restore_point_type: The type of restore point. Possible values - include: 'CONTINUOUS', 'DISCRETE' - :vartype restore_point_type: str or - ~azure.mgmt.sql.models.RestorePointType - :ivar earliest_restore_date: The earliest time to which this database can - be restored - :vartype earliest_restore_date: datetime - :ivar restore_point_creation_date: The time the backup was taken - :vartype restore_point_creation_date: datetime - :ivar restore_point_label: The label of restore point for backup request - by user - :vartype restore_point_label: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'restore_point_type': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'restore_point_creation_date': {'readonly': True}, - 'restore_point_label': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'restore_point_type': {'key': 'properties.restorePointType', 'type': 'RestorePointType'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, - 'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RestorePoint, self).__init__(**kwargs) - self.location = None - self.restore_point_type = None - self.earliest_restore_date = None - self.restore_point_creation_date = None - self.restore_point_label = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_paged.py deleted file mode 100644 index b77cde666dd0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RestorePointPaged(Paged): - """ - A paging container for iterating over a list of :class:`RestorePoint ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RestorePoint]'} - } - - def __init__(self, *args, **kwargs): - - super(RestorePointPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_py3.py deleted file mode 100644 index 886f576a4575..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RestorePoint(ProxyResource): - """Database restore points. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar restore_point_type: The type of restore point. Possible values - include: 'CONTINUOUS', 'DISCRETE' - :vartype restore_point_type: str or - ~azure.mgmt.sql.models.RestorePointType - :ivar earliest_restore_date: The earliest time to which this database can - be restored - :vartype earliest_restore_date: datetime - :ivar restore_point_creation_date: The time the backup was taken - :vartype restore_point_creation_date: datetime - :ivar restore_point_label: The label of restore point for backup request - by user - :vartype restore_point_label: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'restore_point_type': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'restore_point_creation_date': {'readonly': True}, - 'restore_point_label': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'restore_point_type': {'key': 'properties.restorePointType', 'type': 'RestorePointType'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, - 'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(RestorePoint, self).__init__(**kwargs) - self.location = None - self.restore_point_type = None - self.earliest_restore_date = None - self.restore_point_creation_date = None - self.restore_point_label = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label.py deleted file mode 100644 index a076a11634e6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SensitivityLabel(ProxyResource): - """A sensitivity label. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param label_name: The label name. - :type label_name: str - :param label_id: The label ID. - :type label_id: str - :param information_type: The information type. - :type information_type: str - :param information_type_id: The information type ID. - :type information_type_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'label_name': {'key': 'properties.labelName', 'type': 'str'}, - 'label_id': {'key': 'properties.labelId', 'type': 'str'}, - 'information_type': {'key': 'properties.informationType', 'type': 'str'}, - 'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SensitivityLabel, self).__init__(**kwargs) - self.label_name = kwargs.get('label_name', None) - self.label_id = kwargs.get('label_id', None) - self.information_type = kwargs.get('information_type', None) - self.information_type_id = kwargs.get('information_type_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_paged.py deleted file mode 100644 index 438bfd86f9be..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SensitivityLabelPaged(Paged): - """ - A paging container for iterating over a list of :class:`SensitivityLabel ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SensitivityLabel]'} - } - - def __init__(self, *args, **kwargs): - - super(SensitivityLabelPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_py3.py deleted file mode 100644 index f304363d916b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SensitivityLabel(ProxyResource): - """A sensitivity label. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param label_name: The label name. - :type label_name: str - :param label_id: The label ID. - :type label_id: str - :param information_type: The information type. - :type information_type: str - :param information_type_id: The information type ID. - :type information_type_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'label_name': {'key': 'properties.labelName', 'type': 'str'}, - 'label_id': {'key': 'properties.labelId', 'type': 'str'}, - 'information_type': {'key': 'properties.informationType', 'type': 'str'}, - 'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'}, - } - - def __init__(self, *, label_name: str=None, label_id: str=None, information_type: str=None, information_type_id: str=None, **kwargs) -> None: - super(SensitivityLabel, self).__init__(**kwargs) - self.label_name = label_name - self.label_id = label_id - self.information_type = information_type - self.information_type_id = information_type_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server.py deleted file mode 100644 index 1c399fadb353..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class Server(TrackedResource): - """An Azure SQL Database server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.sql.models.ResourceIdentity - :ivar kind: Kind of sql server. This is metadata used for the Azure portal - experience. - :vartype kind: str - :param administrator_login: Administrator username for the server. Once - created it cannot be changed. - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for server creation). - :type administrator_login_password: str - :param version: The version of the server. - :type version: str - :ivar state: The state of the server. - :vartype state: str - :ivar fully_qualified_domain_name: The fully qualified domain name of the - server. - :vartype fully_qualified_domain_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'state': {'readonly': True}, - 'fully_qualified_domain_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Server, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.kind = None - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.version = kwargs.get('version', None) - self.state = None - self.fully_qualified_domain_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning.py deleted file mode 100644 index 583c0b843c1b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerAutomaticTuning(ProxyResource): - """Server-level Automatic Tuning. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param desired_state: Automatic tuning desired state. Possible values - include: 'Custom', 'Auto', 'Unspecified' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningServerMode - :ivar actual_state: Automatic tuning actual state. Possible values - include: 'Custom', 'Auto', 'Unspecified' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningServerMode - :param options: Automatic tuning options definition. - :type options: dict[str, - ~azure.mgmt.sql.models.AutomaticTuningServerOptions] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'actual_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningServerMode'}, - 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningServerMode'}, - 'options': {'key': 'properties.options', 'type': '{AutomaticTuningServerOptions}'}, - } - - def __init__(self, **kwargs): - super(ServerAutomaticTuning, self).__init__(**kwargs) - self.desired_state = kwargs.get('desired_state', None) - self.actual_state = None - self.options = kwargs.get('options', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning_py3.py deleted file mode 100644 index fb8fb4804610..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerAutomaticTuning(ProxyResource): - """Server-level Automatic Tuning. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param desired_state: Automatic tuning desired state. Possible values - include: 'Custom', 'Auto', 'Unspecified' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningServerMode - :ivar actual_state: Automatic tuning actual state. Possible values - include: 'Custom', 'Auto', 'Unspecified' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningServerMode - :param options: Automatic tuning options definition. - :type options: dict[str, - ~azure.mgmt.sql.models.AutomaticTuningServerOptions] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'actual_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningServerMode'}, - 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningServerMode'}, - 'options': {'key': 'properties.options', 'type': '{AutomaticTuningServerOptions}'}, - } - - def __init__(self, *, desired_state=None, options=None, **kwargs) -> None: - super(ServerAutomaticTuning, self).__init__(**kwargs) - self.desired_state = desired_state - self.actual_state = None - self.options = options diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator.py deleted file mode 100644 index ef037e8a9dc8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerAzureADAdministrator(ProxyResource): - """An server Active Directory Administrator. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar administrator_type: Required. The type of administrator. Default - value: "ActiveDirectory" . - :vartype administrator_type: str - :param login: Required. The server administrator login value. - :type login: str - :param sid: Required. The server administrator Sid (Secure ID). - :type sid: str - :param tenant_id: Required. The server Active Directory Administrator - tenant id. - :type tenant_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'administrator_type': {'required': True, 'constant': True}, - 'login': {'required': True}, - 'sid': {'required': True}, - 'tenant_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, - 'login': {'key': 'properties.login', 'type': 'str'}, - 'sid': {'key': 'properties.sid', 'type': 'str'}, - 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, - } - - administrator_type = "ActiveDirectory" - - def __init__(self, **kwargs): - super(ServerAzureADAdministrator, self).__init__(**kwargs) - self.login = kwargs.get('login', None) - self.sid = kwargs.get('sid', None) - self.tenant_id = kwargs.get('tenant_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_paged.py deleted file mode 100644 index 519adc226385..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerAzureADAdministratorPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerAzureADAdministrator ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerAzureADAdministrator]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerAzureADAdministratorPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_py3.py deleted file mode 100644 index 3dfeb71123c3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerAzureADAdministrator(ProxyResource): - """An server Active Directory Administrator. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar administrator_type: Required. The type of administrator. Default - value: "ActiveDirectory" . - :vartype administrator_type: str - :param login: Required. The server administrator login value. - :type login: str - :param sid: Required. The server administrator Sid (Secure ID). - :type sid: str - :param tenant_id: Required. The server Active Directory Administrator - tenant id. - :type tenant_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'administrator_type': {'required': True, 'constant': True}, - 'login': {'required': True}, - 'sid': {'required': True}, - 'tenant_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, - 'login': {'key': 'properties.login', 'type': 'str'}, - 'sid': {'key': 'properties.sid', 'type': 'str'}, - 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, - } - - administrator_type = "ActiveDirectory" - - def __init__(self, *, login: str, sid: str, tenant_id: str, **kwargs) -> None: - super(ServerAzureADAdministrator, self).__init__(**kwargs) - self.login = login - self.sid = sid - self.tenant_id = tenant_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy.py deleted file mode 100644 index 9a7bc69b8c5d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy.py +++ /dev/null @@ -1,160 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerBlobAuditingPolicy(ProxyResource): - """A server blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ServerBlobAuditingPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) - self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) - self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) - self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy_py3.py deleted file mode 100644 index 120d066e6427..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy_py3.py +++ /dev/null @@ -1,160 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerBlobAuditingPolicy(ProxyResource): - """A server blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: - super(ServerBlobAuditingPolicy, self).__init__(**kwargs) - self.state = state - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.audit_actions_and_groups = audit_actions_and_groups - self.storage_account_subscription_id = storage_account_subscription_id - self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use - self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link.py deleted file mode 100644 index 88fef4fa788f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerCommunicationLink(ProxyResource): - """Server communication link. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar state: The state. - :vartype state: str - :param partner_server: Required. The name of the partner server. - :type partner_server: str - :ivar location: Communication link location. - :vartype location: str - :ivar kind: Communication link kind. This property is used for Azure - Portal metadata. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'readonly': True}, - 'partner_server': {'required': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerCommunicationLink, self).__init__(**kwargs) - self.state = None - self.partner_server = kwargs.get('partner_server', None) - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_paged.py deleted file mode 100644 index 6e2fef5d7ce0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerCommunicationLinkPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerCommunicationLink ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerCommunicationLink]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerCommunicationLinkPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_py3.py deleted file mode 100644 index 6a32069ca067..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerCommunicationLink(ProxyResource): - """Server communication link. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar state: The state. - :vartype state: str - :param partner_server: Required. The name of the partner server. - :type partner_server: str - :ivar location: Communication link location. - :vartype location: str - :ivar kind: Communication link kind. This property is used for Azure - Portal metadata. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'readonly': True}, - 'partner_server': {'required': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, partner_server: str, **kwargs) -> None: - super(ServerCommunicationLink, self).__init__(**kwargs) - self.state = None - self.partner_server = partner_server - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy.py deleted file mode 100644 index dd0097235550..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerConnectionPolicy(ProxyResource): - """A server secure connection policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Metadata used for the Azure portal experience. - :vartype kind: str - :ivar location: Resource location. - :vartype location: str - :param connection_type: Required. The server connection type. Possible - values include: 'Default', 'Proxy', 'Redirect' - :type connection_type: str or ~azure.mgmt.sql.models.ServerConnectionType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - 'connection_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'connection_type': {'key': 'properties.connectionType', 'type': 'ServerConnectionType'}, - } - - def __init__(self, **kwargs): - super(ServerConnectionPolicy, self).__init__(**kwargs) - self.kind = None - self.location = None - self.connection_type = kwargs.get('connection_type', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy_py3.py deleted file mode 100644 index 10bd81052301..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerConnectionPolicy(ProxyResource): - """A server secure connection policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Metadata used for the Azure portal experience. - :vartype kind: str - :ivar location: Resource location. - :vartype location: str - :param connection_type: Required. The server connection type. Possible - values include: 'Default', 'Proxy', 'Redirect' - :type connection_type: str or ~azure.mgmt.sql.models.ServerConnectionType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - 'connection_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'connection_type': {'key': 'properties.connectionType', 'type': 'ServerConnectionType'}, - } - - def __init__(self, *, connection_type, **kwargs) -> None: - super(ServerConnectionPolicy, self).__init__(**kwargs) - self.kind = None - self.location = None - self.connection_type = connection_type diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias.py deleted file mode 100644 index 691db960c1a7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerDnsAlias(ProxyResource): - """A server DNS alias. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar azure_dns_record: The fully qualified DNS record for alias - :vartype azure_dns_record: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'azure_dns_record': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'azure_dns_record': {'key': 'properties.azureDnsRecord', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerDnsAlias, self).__init__(**kwargs) - self.azure_dns_record = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition.py deleted file mode 100644 index 2f7757f5daf2..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerDnsAliasAcquisition(Model): - """A server DNS alias acquisition request. - - :param old_server_dns_alias_id: The id of the server alias that will be - acquired to point to this server instead. - :type old_server_dns_alias_id: str - """ - - _attribute_map = { - 'old_server_dns_alias_id': {'key': 'oldServerDnsAliasId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerDnsAliasAcquisition, self).__init__(**kwargs) - self.old_server_dns_alias_id = kwargs.get('old_server_dns_alias_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition_py3.py deleted file mode 100644 index 93cf9e0027c9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerDnsAliasAcquisition(Model): - """A server DNS alias acquisition request. - - :param old_server_dns_alias_id: The id of the server alias that will be - acquired to point to this server instead. - :type old_server_dns_alias_id: str - """ - - _attribute_map = { - 'old_server_dns_alias_id': {'key': 'oldServerDnsAliasId', 'type': 'str'}, - } - - def __init__(self, *, old_server_dns_alias_id: str=None, **kwargs) -> None: - super(ServerDnsAliasAcquisition, self).__init__(**kwargs) - self.old_server_dns_alias_id = old_server_dns_alias_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_paged.py deleted file mode 100644 index 2fdd93879f3b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerDnsAliasPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerDnsAlias ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerDnsAlias]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerDnsAliasPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_py3.py deleted file mode 100644 index c57df1a85f06..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerDnsAlias(ProxyResource): - """A server DNS alias. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar azure_dns_record: The fully qualified DNS record for alias - :vartype azure_dns_record: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'azure_dns_record': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'azure_dns_record': {'key': 'properties.azureDnsRecord', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ServerDnsAlias, self).__init__(**kwargs) - self.azure_dns_record = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key.py deleted file mode 100644 index 1258d1e0da7f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerKey(ProxyResource): - """A server key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :type kind: str - :ivar location: Resource location. - :vartype location: str - :ivar subregion: Subregion of the server key. - :vartype subregion: str - :param server_key_type: Required. The server key type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :param uri: The URI of the server key. - :type uri: str - :param thumbprint: Thumbprint of the server key. - :type thumbprint: str - :param creation_date: The server key creation date. - :type creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'subregion': {'readonly': True}, - 'server_key_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'subregion': {'key': 'properties.subregion', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ServerKey, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) - self.location = None - self.subregion = None - self.server_key_type = kwargs.get('server_key_type', None) - self.uri = kwargs.get('uri', None) - self.thumbprint = kwargs.get('thumbprint', None) - self.creation_date = kwargs.get('creation_date', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_paged.py deleted file mode 100644 index 1d5e262c9c89..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerKeyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerKey ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerKey]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerKeyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_py3.py deleted file mode 100644 index 41ef40ab165a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerKey(ProxyResource): - """A server key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :type kind: str - :ivar location: Resource location. - :vartype location: str - :ivar subregion: Subregion of the server key. - :vartype subregion: str - :param server_key_type: Required. The server key type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :param uri: The URI of the server key. - :type uri: str - :param thumbprint: Thumbprint of the server key. - :type thumbprint: str - :param creation_date: The server key creation date. - :type creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'subregion': {'readonly': True}, - 'server_key_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'subregion': {'key': 'properties.subregion', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, server_key_type, kind: str=None, uri: str=None, thumbprint: str=None, creation_date=None, **kwargs) -> None: - super(ServerKey, self).__init__(**kwargs) - self.kind = kind - self.location = None - self.subregion = None - self.server_key_type = server_key_type - self.uri = uri - self.thumbprint = thumbprint - self.creation_date = creation_date diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_paged.py deleted file mode 100644 index 2d6e6fe0e114..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerPaged(Paged): - """ - A paging container for iterating over a list of :class:`Server ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Server]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_py3.py deleted file mode 100644 index 625c4d0aea4c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_py3.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class Server(TrackedResource): - """An Azure SQL Database server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.sql.models.ResourceIdentity - :ivar kind: Kind of sql server. This is metadata used for the Azure portal - experience. - :vartype kind: str - :param administrator_login: Administrator username for the server. Once - created it cannot be changed. - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for server creation). - :type administrator_login_password: str - :param version: The version of the server. - :type version: str - :ivar state: The state of the server. - :vartype state: str - :ivar fully_qualified_domain_name: The fully qualified domain name of the - server. - :vartype fully_qualified_domain_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'state': {'readonly': True}, - 'fully_qualified_domain_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, identity=None, administrator_login: str=None, administrator_login_password: str=None, version: str=None, **kwargs) -> None: - super(Server, self).__init__(location=location, tags=tags, **kwargs) - self.identity = identity - self.kind = None - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.version = version - self.state = None - self.fully_qualified_domain_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy.py deleted file mode 100644 index 06c40dd93125..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerSecurityAlertPolicy(ProxyResource): - """A server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_paged.py deleted file mode 100644 index 3a8836b45245..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerSecurityAlertPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerSecurityAlertPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerSecurityAlertPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_py3.py deleted file mode 100644 index 38c0c87b0372..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerSecurityAlertPolicy(ProxyResource): - """A server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: - super(ServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update.py deleted file mode 100644 index d39d49bea953..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerUpdate(Model): - """An update request for an Azure SQL Database server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param administrator_login: Administrator username for the server. Once - created it cannot be changed. - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for server creation). - :type administrator_login_password: str - :param version: The version of the server. - :type version: str - :ivar state: The state of the server. - :vartype state: str - :ivar fully_qualified_domain_name: The fully qualified domain name of the - server. - :vartype fully_qualified_domain_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'state': {'readonly': True}, - 'fully_qualified_domain_name': {'readonly': True}, - } - - _attribute_map = { - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ServerUpdate, self).__init__(**kwargs) - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.version = kwargs.get('version', None) - self.state = None - self.fully_qualified_domain_name = None - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update_py3.py deleted file mode 100644 index 863f2b52fa01..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerUpdate(Model): - """An update request for an Azure SQL Database server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param administrator_login: Administrator username for the server. Once - created it cannot be changed. - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for server creation). - :type administrator_login_password: str - :param version: The version of the server. - :type version: str - :ivar state: The state of the server. - :vartype state: str - :ivar fully_qualified_domain_name: The fully qualified domain name of the - server. - :vartype fully_qualified_domain_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'state': {'readonly': True}, - 'fully_qualified_domain_name': {'readonly': True}, - } - - _attribute_map = { - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, administrator_login: str=None, administrator_login_password: str=None, version: str=None, tags=None, **kwargs) -> None: - super(ServerUpdate, self).__init__(**kwargs) - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.version = version - self.state = None - self.fully_qualified_domain_name = None - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage.py deleted file mode 100644 index e04fb8c60a82..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerUsage(Model): - """Represents server metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of the server usage metric. - :vartype name: str - :ivar resource_name: The name of the resource. - :vartype resource_name: str - :ivar display_name: The metric display name. - :vartype display_name: str - :ivar current_value: The current value of the metric. - :vartype current_value: float - :ivar limit: The current limit of the metric. - :vartype limit: float - :ivar unit: The units of the metric. - :vartype unit: str - :ivar next_reset_time: The next reset time for the metric (ISO8601 - format). - :vartype next_reset_time: datetime - """ - - _validation = { - 'name': {'readonly': True}, - 'resource_name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'next_reset_time': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_name': {'key': 'resourceName', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ServerUsage, self).__init__(**kwargs) - self.name = None - self.resource_name = None - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None - self.next_reset_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_paged.py deleted file mode 100644 index 688d3b408383..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerUsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerUsage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerUsage]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerUsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_py3.py deleted file mode 100644 index 3a6feaecdc8d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerUsage(Model): - """Represents server metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of the server usage metric. - :vartype name: str - :ivar resource_name: The name of the resource. - :vartype resource_name: str - :ivar display_name: The metric display name. - :vartype display_name: str - :ivar current_value: The current value of the metric. - :vartype current_value: float - :ivar limit: The current limit of the metric. - :vartype limit: float - :ivar unit: The units of the metric. - :vartype unit: str - :ivar next_reset_time: The next reset time for the metric (ISO8601 - format). - :vartype next_reset_time: datetime - """ - - _validation = { - 'name': {'readonly': True}, - 'resource_name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'next_reset_time': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_name': {'key': 'resourceName', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(ServerUsage, self).__init__(**kwargs) - self.name = None - self.resource_name = None - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None - self.next_reset_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability.py deleted file mode 100644 index 811e93df8aa4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerVersionCapability(Model): - """The server capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The server version name. - :vartype name: str - :ivar supported_editions: The list of supported database editions. - :vartype supported_editions: - list[~azure.mgmt.sql.models.EditionCapability] - :ivar supported_elastic_pool_editions: The list of supported elastic pool - editions. - :vartype supported_elastic_pool_editions: - list[~azure.mgmt.sql.models.ElasticPoolEditionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_editions': {'readonly': True}, - 'supported_elastic_pool_editions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_editions': {'key': 'supportedEditions', 'type': '[EditionCapability]'}, - 'supported_elastic_pool_editions': {'key': 'supportedElasticPoolEditions', 'type': '[ElasticPoolEditionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerVersionCapability, self).__init__(**kwargs) - self.name = None - self.supported_editions = None - self.supported_elastic_pool_editions = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability_py3.py deleted file mode 100644 index 66a1a0251ede..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerVersionCapability(Model): - """The server capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The server version name. - :vartype name: str - :ivar supported_editions: The list of supported database editions. - :vartype supported_editions: - list[~azure.mgmt.sql.models.EditionCapability] - :ivar supported_elastic_pool_editions: The list of supported elastic pool - editions. - :vartype supported_elastic_pool_editions: - list[~azure.mgmt.sql.models.ElasticPoolEditionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_editions': {'readonly': True}, - 'supported_elastic_pool_editions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_editions': {'key': 'supportedEditions', 'type': '[EditionCapability]'}, - 'supported_elastic_pool_editions': {'key': 'supportedElasticPoolEditions', 'type': '[ElasticPoolEditionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ServerVersionCapability, self).__init__(**kwargs) - self.name = None - self.supported_editions = None - self.supported_elastic_pool_editions = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment.py deleted file mode 100644 index eecad7a9b04d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerVulnerabilityAssessment(ProxyResource): - """A server vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: Required. A blob storage container path to - hold the scan results (e.g. - https://myStorage.blob.core.windows.net/VaScans/). - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_container_path': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, **kwargs): - super(ServerVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = kwargs.get('storage_container_path', None) - self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.recurring_scans = kwargs.get('recurring_scans', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_paged.py deleted file mode 100644 index 43c1a3b65779..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerVulnerabilityAssessmentPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerVulnerabilityAssessment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerVulnerabilityAssessment]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_py3.py deleted file mode 100644 index bb42c3866a3f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerVulnerabilityAssessment(ProxyResource): - """A server vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: Required. A blob storage container path to - hold the scan results (e.g. - https://myStorage.blob.core.windows.net/VaScans/). - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_container_path': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, *, storage_container_path: str, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: - super(ServerVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = storage_container_path - self.storage_container_sas_key = storage_container_sas_key - self.storage_account_access_key = storage_account_access_key - self.recurring_scans = recurring_scans diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective.py deleted file mode 100644 index 71133da2f551..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServiceObjective(ProxyResource): - """Represents a database service objective. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar service_objective_name: The name for the service objective. - :vartype service_objective_name: str - :ivar is_default: Gets whether the service level objective is the default - service objective. - :vartype is_default: bool - :ivar is_system: Gets whether the service level objective is a system - service objective. - :vartype is_system: bool - :ivar description: The description for the service level objective. - :vartype description: str - :ivar enabled: Gets whether the service level objective is enabled. - :vartype enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'service_objective_name': {'readonly': True}, - 'is_default': {'readonly': True}, - 'is_system': {'readonly': True}, - 'description': {'readonly': True}, - 'enabled': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'service_objective_name': {'key': 'properties.serviceObjectiveName', 'type': 'str'}, - 'is_default': {'key': 'properties.isDefault', 'type': 'bool'}, - 'is_system': {'key': 'properties.isSystem', 'type': 'bool'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ServiceObjective, self).__init__(**kwargs) - self.service_objective_name = None - self.is_default = None - self.is_system = None - self.description = None - self.enabled = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability.py deleted file mode 100644 index 1e6c2158be9a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceObjectiveCapability(Model): - """The service objectives capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique ID of the service objective. - :vartype id: str - :ivar name: The service objective name. - :vartype name: str - :ivar supported_max_sizes: The list of supported maximum database sizes. - :vartype supported_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar performance_level: The performance level. - :vartype performance_level: - ~azure.mgmt.sql.models.PerformanceLevelCapability - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.sql.models.Sku - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar included_max_size: The included (free) max size. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'supported_max_sizes': {'readonly': True}, - 'performance_level': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceObjectiveCapability, self).__init__(**kwargs) - self.id = None - self.name = None - self.supported_max_sizes = None - self.performance_level = None - self.sku = None - self.supported_license_types = None - self.included_max_size = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability_py3.py deleted file mode 100644 index f777ffd74f97..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceObjectiveCapability(Model): - """The service objectives capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique ID of the service objective. - :vartype id: str - :ivar name: The service objective name. - :vartype name: str - :ivar supported_max_sizes: The list of supported maximum database sizes. - :vartype supported_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar performance_level: The performance level. - :vartype performance_level: - ~azure.mgmt.sql.models.PerformanceLevelCapability - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.sql.models.Sku - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar included_max_size: The included (free) max size. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'supported_max_sizes': {'readonly': True}, - 'performance_level': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ServiceObjectiveCapability, self).__init__(**kwargs) - self.id = None - self.name = None - self.supported_max_sizes = None - self.performance_level = None - self.sku = None - self.supported_license_types = None - self.included_max_size = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_paged.py deleted file mode 100644 index 7afe16629d1d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServiceObjectivePaged(Paged): - """ - A paging container for iterating over a list of :class:`ServiceObjective ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServiceObjective]'} - } - - def __init__(self, *args, **kwargs): - - super(ServiceObjectivePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_py3.py deleted file mode 100644 index 2fc00134e6ec..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServiceObjective(ProxyResource): - """Represents a database service objective. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar service_objective_name: The name for the service objective. - :vartype service_objective_name: str - :ivar is_default: Gets whether the service level objective is the default - service objective. - :vartype is_default: bool - :ivar is_system: Gets whether the service level objective is a system - service objective. - :vartype is_system: bool - :ivar description: The description for the service level objective. - :vartype description: str - :ivar enabled: Gets whether the service level objective is enabled. - :vartype enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'service_objective_name': {'readonly': True}, - 'is_default': {'readonly': True}, - 'is_system': {'readonly': True}, - 'description': {'readonly': True}, - 'enabled': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'service_objective_name': {'key': 'properties.serviceObjectiveName', 'type': 'str'}, - 'is_default': {'key': 'properties.isDefault', 'type': 'bool'}, - 'is_system': {'key': 'properties.isSystem', 'type': 'bool'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs) -> None: - super(ServiceObjective, self).__init__(**kwargs) - self.service_objective_name = None - self.is_default = None - self.is_system = None - self.description = None - self.enabled = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor.py deleted file mode 100644 index cb8974906ee6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServiceTierAdvisor(ProxyResource): - """Represents a Service Tier Advisor. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar observation_period_start: The observation period start (ISO8601 - format). - :vartype observation_period_start: datetime - :ivar observation_period_end: The observation period start (ISO8601 - format). - :vartype observation_period_end: datetime - :ivar active_time_ratio: The activeTimeRatio for service tier advisor. - :vartype active_time_ratio: float - :ivar min_dtu: Gets or sets minDtu for service tier advisor. - :vartype min_dtu: float - :ivar avg_dtu: Gets or sets avgDtu for service tier advisor. - :vartype avg_dtu: float - :ivar max_dtu: Gets or sets maxDtu for service tier advisor. - :vartype max_dtu: float - :ivar max_size_in_gb: Gets or sets maxSizeInGB for service tier advisor. - :vartype max_size_in_gb: float - :ivar service_level_objective_usage_metrics: Gets or sets - serviceLevelObjectiveUsageMetrics for the service tier advisor. - :vartype service_level_objective_usage_metrics: - list[~azure.mgmt.sql.models.SloUsageMetric] - :ivar current_service_level_objective: Gets or sets - currentServiceLevelObjective for service tier advisor. - :vartype current_service_level_objective: str - :ivar current_service_level_objective_id: Gets or sets - currentServiceLevelObjectiveId for service tier advisor. - :vartype current_service_level_objective_id: str - :ivar usage_based_recommendation_service_level_objective: Gets or sets - usageBasedRecommendationServiceLevelObjective for service tier advisor. - :vartype usage_based_recommendation_service_level_objective: str - :ivar usage_based_recommendation_service_level_objective_id: Gets or sets - usageBasedRecommendationServiceLevelObjectiveId for service tier advisor. - :vartype usage_based_recommendation_service_level_objective_id: str - :ivar database_size_based_recommendation_service_level_objective: Gets or - sets databaseSizeBasedRecommendationServiceLevelObjective for service tier - advisor. - :vartype database_size_based_recommendation_service_level_objective: str - :ivar database_size_based_recommendation_service_level_objective_id: Gets - or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service - tier advisor. - :vartype database_size_based_recommendation_service_level_objective_id: - str - :ivar disaster_plan_based_recommendation_service_level_objective: Gets or - sets disasterPlanBasedRecommendationServiceLevelObjective for service tier - advisor. - :vartype disaster_plan_based_recommendation_service_level_objective: str - :ivar disaster_plan_based_recommendation_service_level_objective_id: Gets - or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service - tier advisor. - :vartype disaster_plan_based_recommendation_service_level_objective_id: - str - :ivar overall_recommendation_service_level_objective: Gets or sets - overallRecommendationServiceLevelObjective for service tier advisor. - :vartype overall_recommendation_service_level_objective: str - :ivar overall_recommendation_service_level_objective_id: Gets or sets - overallRecommendationServiceLevelObjectiveId for service tier advisor. - :vartype overall_recommendation_service_level_objective_id: str - :ivar confidence: Gets or sets confidence for service tier advisor. - :vartype confidence: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'observation_period_start': {'readonly': True}, - 'observation_period_end': {'readonly': True}, - 'active_time_ratio': {'readonly': True}, - 'min_dtu': {'readonly': True}, - 'avg_dtu': {'readonly': True}, - 'max_dtu': {'readonly': True}, - 'max_size_in_gb': {'readonly': True}, - 'service_level_objective_usage_metrics': {'readonly': True}, - 'current_service_level_objective': {'readonly': True}, - 'current_service_level_objective_id': {'readonly': True}, - 'usage_based_recommendation_service_level_objective': {'readonly': True}, - 'usage_based_recommendation_service_level_objective_id': {'readonly': True}, - 'database_size_based_recommendation_service_level_objective': {'readonly': True}, - 'database_size_based_recommendation_service_level_objective_id': {'readonly': True}, - 'disaster_plan_based_recommendation_service_level_objective': {'readonly': True}, - 'disaster_plan_based_recommendation_service_level_objective_id': {'readonly': True}, - 'overall_recommendation_service_level_objective': {'readonly': True}, - 'overall_recommendation_service_level_objective_id': {'readonly': True}, - 'confidence': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, - 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, - 'active_time_ratio': {'key': 'properties.activeTimeRatio', 'type': 'float'}, - 'min_dtu': {'key': 'properties.minDtu', 'type': 'float'}, - 'avg_dtu': {'key': 'properties.avgDtu', 'type': 'float'}, - 'max_dtu': {'key': 'properties.maxDtu', 'type': 'float'}, - 'max_size_in_gb': {'key': 'properties.maxSizeInGB', 'type': 'float'}, - 'service_level_objective_usage_metrics': {'key': 'properties.serviceLevelObjectiveUsageMetrics', 'type': '[SloUsageMetric]'}, - 'current_service_level_objective': {'key': 'properties.currentServiceLevelObjective', 'type': 'str'}, - 'current_service_level_objective_id': {'key': 'properties.currentServiceLevelObjectiveId', 'type': 'str'}, - 'usage_based_recommendation_service_level_objective': {'key': 'properties.usageBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'usage_based_recommendation_service_level_objective_id': {'key': 'properties.usageBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'database_size_based_recommendation_service_level_objective': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'database_size_based_recommendation_service_level_objective_id': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'disaster_plan_based_recommendation_service_level_objective': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'disaster_plan_based_recommendation_service_level_objective_id': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'overall_recommendation_service_level_objective': {'key': 'properties.overallRecommendationServiceLevelObjective', 'type': 'str'}, - 'overall_recommendation_service_level_objective_id': {'key': 'properties.overallRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'confidence': {'key': 'properties.confidence', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ServiceTierAdvisor, self).__init__(**kwargs) - self.observation_period_start = None - self.observation_period_end = None - self.active_time_ratio = None - self.min_dtu = None - self.avg_dtu = None - self.max_dtu = None - self.max_size_in_gb = None - self.service_level_objective_usage_metrics = None - self.current_service_level_objective = None - self.current_service_level_objective_id = None - self.usage_based_recommendation_service_level_objective = None - self.usage_based_recommendation_service_level_objective_id = None - self.database_size_based_recommendation_service_level_objective = None - self.database_size_based_recommendation_service_level_objective_id = None - self.disaster_plan_based_recommendation_service_level_objective = None - self.disaster_plan_based_recommendation_service_level_objective_id = None - self.overall_recommendation_service_level_objective = None - self.overall_recommendation_service_level_objective_id = None - self.confidence = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_paged.py deleted file mode 100644 index 8275906eb639..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServiceTierAdvisorPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServiceTierAdvisor ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServiceTierAdvisor]'} - } - - def __init__(self, *args, **kwargs): - - super(ServiceTierAdvisorPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_py3.py deleted file mode 100644 index 04f5dceca1c0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_py3.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServiceTierAdvisor(ProxyResource): - """Represents a Service Tier Advisor. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar observation_period_start: The observation period start (ISO8601 - format). - :vartype observation_period_start: datetime - :ivar observation_period_end: The observation period start (ISO8601 - format). - :vartype observation_period_end: datetime - :ivar active_time_ratio: The activeTimeRatio for service tier advisor. - :vartype active_time_ratio: float - :ivar min_dtu: Gets or sets minDtu for service tier advisor. - :vartype min_dtu: float - :ivar avg_dtu: Gets or sets avgDtu for service tier advisor. - :vartype avg_dtu: float - :ivar max_dtu: Gets or sets maxDtu for service tier advisor. - :vartype max_dtu: float - :ivar max_size_in_gb: Gets or sets maxSizeInGB for service tier advisor. - :vartype max_size_in_gb: float - :ivar service_level_objective_usage_metrics: Gets or sets - serviceLevelObjectiveUsageMetrics for the service tier advisor. - :vartype service_level_objective_usage_metrics: - list[~azure.mgmt.sql.models.SloUsageMetric] - :ivar current_service_level_objective: Gets or sets - currentServiceLevelObjective for service tier advisor. - :vartype current_service_level_objective: str - :ivar current_service_level_objective_id: Gets or sets - currentServiceLevelObjectiveId for service tier advisor. - :vartype current_service_level_objective_id: str - :ivar usage_based_recommendation_service_level_objective: Gets or sets - usageBasedRecommendationServiceLevelObjective for service tier advisor. - :vartype usage_based_recommendation_service_level_objective: str - :ivar usage_based_recommendation_service_level_objective_id: Gets or sets - usageBasedRecommendationServiceLevelObjectiveId for service tier advisor. - :vartype usage_based_recommendation_service_level_objective_id: str - :ivar database_size_based_recommendation_service_level_objective: Gets or - sets databaseSizeBasedRecommendationServiceLevelObjective for service tier - advisor. - :vartype database_size_based_recommendation_service_level_objective: str - :ivar database_size_based_recommendation_service_level_objective_id: Gets - or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service - tier advisor. - :vartype database_size_based_recommendation_service_level_objective_id: - str - :ivar disaster_plan_based_recommendation_service_level_objective: Gets or - sets disasterPlanBasedRecommendationServiceLevelObjective for service tier - advisor. - :vartype disaster_plan_based_recommendation_service_level_objective: str - :ivar disaster_plan_based_recommendation_service_level_objective_id: Gets - or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service - tier advisor. - :vartype disaster_plan_based_recommendation_service_level_objective_id: - str - :ivar overall_recommendation_service_level_objective: Gets or sets - overallRecommendationServiceLevelObjective for service tier advisor. - :vartype overall_recommendation_service_level_objective: str - :ivar overall_recommendation_service_level_objective_id: Gets or sets - overallRecommendationServiceLevelObjectiveId for service tier advisor. - :vartype overall_recommendation_service_level_objective_id: str - :ivar confidence: Gets or sets confidence for service tier advisor. - :vartype confidence: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'observation_period_start': {'readonly': True}, - 'observation_period_end': {'readonly': True}, - 'active_time_ratio': {'readonly': True}, - 'min_dtu': {'readonly': True}, - 'avg_dtu': {'readonly': True}, - 'max_dtu': {'readonly': True}, - 'max_size_in_gb': {'readonly': True}, - 'service_level_objective_usage_metrics': {'readonly': True}, - 'current_service_level_objective': {'readonly': True}, - 'current_service_level_objective_id': {'readonly': True}, - 'usage_based_recommendation_service_level_objective': {'readonly': True}, - 'usage_based_recommendation_service_level_objective_id': {'readonly': True}, - 'database_size_based_recommendation_service_level_objective': {'readonly': True}, - 'database_size_based_recommendation_service_level_objective_id': {'readonly': True}, - 'disaster_plan_based_recommendation_service_level_objective': {'readonly': True}, - 'disaster_plan_based_recommendation_service_level_objective_id': {'readonly': True}, - 'overall_recommendation_service_level_objective': {'readonly': True}, - 'overall_recommendation_service_level_objective_id': {'readonly': True}, - 'confidence': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, - 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, - 'active_time_ratio': {'key': 'properties.activeTimeRatio', 'type': 'float'}, - 'min_dtu': {'key': 'properties.minDtu', 'type': 'float'}, - 'avg_dtu': {'key': 'properties.avgDtu', 'type': 'float'}, - 'max_dtu': {'key': 'properties.maxDtu', 'type': 'float'}, - 'max_size_in_gb': {'key': 'properties.maxSizeInGB', 'type': 'float'}, - 'service_level_objective_usage_metrics': {'key': 'properties.serviceLevelObjectiveUsageMetrics', 'type': '[SloUsageMetric]'}, - 'current_service_level_objective': {'key': 'properties.currentServiceLevelObjective', 'type': 'str'}, - 'current_service_level_objective_id': {'key': 'properties.currentServiceLevelObjectiveId', 'type': 'str'}, - 'usage_based_recommendation_service_level_objective': {'key': 'properties.usageBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'usage_based_recommendation_service_level_objective_id': {'key': 'properties.usageBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'database_size_based_recommendation_service_level_objective': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'database_size_based_recommendation_service_level_objective_id': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'disaster_plan_based_recommendation_service_level_objective': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'disaster_plan_based_recommendation_service_level_objective_id': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'overall_recommendation_service_level_objective': {'key': 'properties.overallRecommendationServiceLevelObjective', 'type': 'str'}, - 'overall_recommendation_service_level_objective_id': {'key': 'properties.overallRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'confidence': {'key': 'properties.confidence', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(ServiceTierAdvisor, self).__init__(**kwargs) - self.observation_period_start = None - self.observation_period_end = None - self.active_time_ratio = None - self.min_dtu = None - self.avg_dtu = None - self.max_dtu = None - self.max_size_in_gb = None - self.service_level_objective_usage_metrics = None - self.current_service_level_objective = None - self.current_service_level_objective_id = None - self.usage_based_recommendation_service_level_objective = None - self.usage_based_recommendation_service_level_objective_id = None - self.database_size_based_recommendation_service_level_objective = None - self.database_size_based_recommendation_service_level_objective_id = None - self.disaster_plan_based_recommendation_service_level_objective = None - self.disaster_plan_based_recommendation_service_level_objective_id = None - self.overall_recommendation_service_level_objective = None - self.overall_recommendation_service_level_objective_id = None - self.confidence = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku.py deleted file mode 100644 index e37091dc4e2f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """The resource model definition representing SKU. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU. Ex - P3. It is typically a - letter+number code - :type name: str - :param tier: This field is required to be implemented by the Resource - Provider if the service has more than one tier, but is not required on a - PUT. - :type tier: str - :param size: The SKU size. When the name field is the combination of tier - and some other value, this would be the standalone code. - :type size: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :param capacity: If the SKU supports scale out/in then the capacity - integer should be included. If scale out/in is not possible for the - resource this may be omitted. - :type capacity: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.size = kwargs.get('size', None) - self.family = kwargs.get('family', None) - self.capacity = kwargs.get('capacity', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku_py3.py deleted file mode 100644 index a6f04765e87c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """The resource model definition representing SKU. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU. Ex - P3. It is typically a - letter+number code - :type name: str - :param tier: This field is required to be implemented by the Resource - Provider if the service has more than one tier, but is not required on a - PUT. - :type tier: str - :param size: The SKU size. When the name field is the combination of tier - and some other value, this would be the standalone code. - :type size: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :param capacity: If the SKU supports scale out/in then the capacity - integer should be included. If scale out/in is not possible for the - resource this may be omitted. - :type capacity: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__(self, *, name: str, tier: str=None, size: str=None, family: str=None, capacity: int=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.size = size - self.family = family - self.capacity = capacity diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric.py deleted file mode 100644 index 262017a0b87c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SloUsageMetric(Model): - """A Slo Usage Metric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar service_level_objective: The serviceLevelObjective for SLO usage - metric. Possible values include: 'System', 'System0', 'System1', - 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', - 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', - 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', - 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', - 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', - 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', - 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', - 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - :vartype service_level_objective: str or - ~azure.mgmt.sql.models.ServiceObjectiveName - :ivar service_level_objective_id: The serviceLevelObjectiveId for SLO - usage metric. - :vartype service_level_objective_id: str - :ivar in_range_time_ratio: Gets or sets inRangeTimeRatio for SLO usage - metric. - :vartype in_range_time_ratio: float - """ - - _validation = { - 'service_level_objective': {'readonly': True}, - 'service_level_objective_id': {'readonly': True}, - 'in_range_time_ratio': {'readonly': True}, - } - - _attribute_map = { - 'service_level_objective': {'key': 'serviceLevelObjective', 'type': 'str'}, - 'service_level_objective_id': {'key': 'serviceLevelObjectiveId', 'type': 'str'}, - 'in_range_time_ratio': {'key': 'inRangeTimeRatio', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(SloUsageMetric, self).__init__(**kwargs) - self.service_level_objective = None - self.service_level_objective_id = None - self.in_range_time_ratio = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric_py3.py deleted file mode 100644 index 6b221a8eb36f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SloUsageMetric(Model): - """A Slo Usage Metric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar service_level_objective: The serviceLevelObjective for SLO usage - metric. Possible values include: 'System', 'System0', 'System1', - 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', - 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', - 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', - 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', - 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', - 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', - 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', - 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - :vartype service_level_objective: str or - ~azure.mgmt.sql.models.ServiceObjectiveName - :ivar service_level_objective_id: The serviceLevelObjectiveId for SLO - usage metric. - :vartype service_level_objective_id: str - :ivar in_range_time_ratio: Gets or sets inRangeTimeRatio for SLO usage - metric. - :vartype in_range_time_ratio: float - """ - - _validation = { - 'service_level_objective': {'readonly': True}, - 'service_level_objective_id': {'readonly': True}, - 'in_range_time_ratio': {'readonly': True}, - } - - _attribute_map = { - 'service_level_objective': {'key': 'serviceLevelObjective', 'type': 'str'}, - 'service_level_objective_id': {'key': 'serviceLevelObjectiveId', 'type': 'str'}, - 'in_range_time_ratio': {'key': 'inRangeTimeRatio', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(SloUsageMetric, self).__init__(**kwargs) - self.service_level_objective = None - self.service_level_objective_id = None - self.in_range_time_ratio = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage.py deleted file mode 100644 index 5fe0b0fe90a0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SubscriptionUsage(ProxyResource): - """Usage Metric of a Subscription in a Location. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar display_name: User-readable name of the metric. - :vartype display_name: str - :ivar current_value: Current value of the metric. - :vartype current_value: float - :ivar limit: Boundary value of the metric. - :vartype limit: float - :ivar unit: Unit of the metric. - :vartype unit: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'current_value': {'key': 'properties.currentValue', 'type': 'float'}, - 'limit': {'key': 'properties.limit', 'type': 'float'}, - 'unit': {'key': 'properties.unit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubscriptionUsage, self).__init__(**kwargs) - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_paged.py deleted file mode 100644 index 14875f12bfe6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SubscriptionUsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`SubscriptionUsage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SubscriptionUsage]'} - } - - def __init__(self, *args, **kwargs): - - super(SubscriptionUsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_py3.py deleted file mode 100644 index d55e3275a74b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SubscriptionUsage(ProxyResource): - """Usage Metric of a Subscription in a Location. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar display_name: User-readable name of the metric. - :vartype display_name: str - :ivar current_value: Current value of the metric. - :vartype current_value: float - :ivar limit: Boundary value of the metric. - :vartype limit: float - :ivar unit: Unit of the metric. - :vartype unit: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'current_value': {'key': 'properties.currentValue', 'type': 'float'}, - 'limit': {'key': 'properties.limit', 'type': 'float'}, - 'unit': {'key': 'properties.unit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubscriptionUsage, self).__init__(**kwargs) - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent.py deleted file mode 100644 index c617de5bdf26..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SyncAgent(ProxyResource): - """An Azure SQL Database sync agent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar sync_agent_name: Name of the sync agent. - :vartype sync_agent_name: str - :param sync_database_id: ARM resource id of the sync database in the sync - agent. - :type sync_database_id: str - :ivar last_alive_time: Last alive time of the sync agent. - :vartype last_alive_time: datetime - :ivar state: State of the sync agent. Possible values include: 'Online', - 'Offline', 'NeverConnected' - :vartype state: str or ~azure.mgmt.sql.models.SyncAgentState - :ivar is_up_to_date: If the sync agent version is up to date. - :vartype is_up_to_date: bool - :ivar expiry_time: Expiration time of the sync agent version. - :vartype expiry_time: datetime - :ivar version: Version of the sync agent. - :vartype version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sync_agent_name': {'readonly': True}, - 'last_alive_time': {'readonly': True}, - 'state': {'readonly': True}, - 'is_up_to_date': {'readonly': True}, - 'expiry_time': {'readonly': True}, - 'version': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'sync_agent_name': {'key': 'properties.name', 'type': 'str'}, - 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, - 'last_alive_time': {'key': 'properties.lastAliveTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'is_up_to_date': {'key': 'properties.isUpToDate', 'type': 'bool'}, - 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncAgent, self).__init__(**kwargs) - self.sync_agent_name = None - self.sync_database_id = kwargs.get('sync_database_id', None) - self.last_alive_time = None - self.state = None - self.is_up_to_date = None - self.expiry_time = None - self.version = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties.py deleted file mode 100644 index da65194bc61a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncAgentKeyProperties(Model): - """Properties of an Azure SQL Database sync agent key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar sync_agent_key: Key of sync agent. - :vartype sync_agent_key: str - """ - - _validation = { - 'sync_agent_key': {'readonly': True}, - } - - _attribute_map = { - 'sync_agent_key': {'key': 'syncAgentKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncAgentKeyProperties, self).__init__(**kwargs) - self.sync_agent_key = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties_py3.py deleted file mode 100644 index 4230f4d95712..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncAgentKeyProperties(Model): - """Properties of an Azure SQL Database sync agent key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar sync_agent_key: Key of sync agent. - :vartype sync_agent_key: str - """ - - _validation = { - 'sync_agent_key': {'readonly': True}, - } - - _attribute_map = { - 'sync_agent_key': {'key': 'syncAgentKey', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncAgentKeyProperties, self).__init__(**kwargs) - self.sync_agent_key = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database.py deleted file mode 100644 index 597c51388f47..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SyncAgentLinkedDatabase(ProxyResource): - """An Azure SQL Database sync agent linked database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_type: Type of the sync agent linked database. Possible - values include: 'AzureSqlDatabase', 'SqlServerDatabase' - :vartype database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType - :ivar database_id: Id of the sync agent linked database. - :vartype database_id: str - :ivar description: Description of the sync agent linked database. - :vartype description: str - :ivar server_name: Server name of the sync agent linked database. - :vartype server_name: str - :ivar database_name: Database name of the sync agent linked database. - :vartype database_name: str - :ivar user_name: User name of the sync agent linked database. - :vartype user_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_type': {'readonly': True}, - 'database_id': {'readonly': True}, - 'description': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - 'user_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncAgentLinkedDatabase, self).__init__(**kwargs) - self.database_type = None - self.database_id = None - self.description = None - self.server_name = None - self.database_name = None - self.user_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_paged.py deleted file mode 100644 index 6c0fad6ae749..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncAgentLinkedDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncAgentLinkedDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncAgentLinkedDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncAgentLinkedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_py3.py deleted file mode 100644 index 7d92287e1a37..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SyncAgentLinkedDatabase(ProxyResource): - """An Azure SQL Database sync agent linked database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_type: Type of the sync agent linked database. Possible - values include: 'AzureSqlDatabase', 'SqlServerDatabase' - :vartype database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType - :ivar database_id: Id of the sync agent linked database. - :vartype database_id: str - :ivar description: Description of the sync agent linked database. - :vartype description: str - :ivar server_name: Server name of the sync agent linked database. - :vartype server_name: str - :ivar database_name: Database name of the sync agent linked database. - :vartype database_name: str - :ivar user_name: User name of the sync agent linked database. - :vartype user_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_type': {'readonly': True}, - 'database_id': {'readonly': True}, - 'description': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - 'user_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncAgentLinkedDatabase, self).__init__(**kwargs) - self.database_type = None - self.database_id = None - self.description = None - self.server_name = None - self.database_name = None - self.user_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_paged.py deleted file mode 100644 index 116fc542dbbd..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncAgentPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncAgent ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncAgent]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncAgentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_py3.py deleted file mode 100644 index f07649750457..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SyncAgent(ProxyResource): - """An Azure SQL Database sync agent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar sync_agent_name: Name of the sync agent. - :vartype sync_agent_name: str - :param sync_database_id: ARM resource id of the sync database in the sync - agent. - :type sync_database_id: str - :ivar last_alive_time: Last alive time of the sync agent. - :vartype last_alive_time: datetime - :ivar state: State of the sync agent. Possible values include: 'Online', - 'Offline', 'NeverConnected' - :vartype state: str or ~azure.mgmt.sql.models.SyncAgentState - :ivar is_up_to_date: If the sync agent version is up to date. - :vartype is_up_to_date: bool - :ivar expiry_time: Expiration time of the sync agent version. - :vartype expiry_time: datetime - :ivar version: Version of the sync agent. - :vartype version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sync_agent_name': {'readonly': True}, - 'last_alive_time': {'readonly': True}, - 'state': {'readonly': True}, - 'is_up_to_date': {'readonly': True}, - 'expiry_time': {'readonly': True}, - 'version': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'sync_agent_name': {'key': 'properties.name', 'type': 'str'}, - 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, - 'last_alive_time': {'key': 'properties.lastAliveTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'is_up_to_date': {'key': 'properties.isUpToDate', 'type': 'bool'}, - 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - } - - def __init__(self, *, sync_database_id: str=None, **kwargs) -> None: - super(SyncAgent, self).__init__(**kwargs) - self.sync_agent_name = None - self.sync_database_id = sync_database_id - self.last_alive_time = None - self.state = None - self.is_up_to_date = None - self.expiry_time = None - self.version = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties.py deleted file mode 100644 index 6dd5a323fd61..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncDatabaseIdProperties(Model): - """Properties of the sync database id. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: ARM resource id of sync database. - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncDatabaseIdProperties, self).__init__(**kwargs) - self.id = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_paged.py deleted file mode 100644 index 2f70734f930a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncDatabaseIdPropertiesPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncDatabaseIdProperties ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncDatabaseIdProperties]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncDatabaseIdPropertiesPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_py3.py deleted file mode 100644 index cdb7ce89c435..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncDatabaseIdProperties(Model): - """Properties of the sync database id. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: ARM resource id of sync database. - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncDatabaseIdProperties, self).__init__(**kwargs) - self.id = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties.py deleted file mode 100644 index 984d4c7a5d56..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaProperties(Model): - """Properties of the database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar tables: List of tables in the database full schema. - :vartype tables: list[~azure.mgmt.sql.models.SyncFullSchemaTable] - :ivar last_update_time: Last update time of the database schema. - :vartype last_update_time: datetime - """ - - _validation = { - 'tables': {'readonly': True}, - 'last_update_time': {'readonly': True}, - } - - _attribute_map = { - 'tables': {'key': 'tables', 'type': '[SyncFullSchemaTable]'}, - 'last_update_time': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(SyncFullSchemaProperties, self).__init__(**kwargs) - self.tables = None - self.last_update_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_paged.py deleted file mode 100644 index 20c3b2df16d4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncFullSchemaPropertiesPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncFullSchemaProperties ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncFullSchemaProperties]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncFullSchemaPropertiesPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_py3.py deleted file mode 100644 index b3d4a75c65bf..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaProperties(Model): - """Properties of the database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar tables: List of tables in the database full schema. - :vartype tables: list[~azure.mgmt.sql.models.SyncFullSchemaTable] - :ivar last_update_time: Last update time of the database schema. - :vartype last_update_time: datetime - """ - - _validation = { - 'tables': {'readonly': True}, - 'last_update_time': {'readonly': True}, - } - - _attribute_map = { - 'tables': {'key': 'tables', 'type': '[SyncFullSchemaTable]'}, - 'last_update_time': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncFullSchemaProperties, self).__init__(**kwargs) - self.tables = None - self.last_update_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table.py deleted file mode 100644 index dcec31c48f1c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaTable(Model): - """Properties of the table in the database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar columns: List of columns in the table of database full schema. - :vartype columns: list[~azure.mgmt.sql.models.SyncFullSchemaTableColumn] - :ivar error_id: Error id of the table. - :vartype error_id: str - :ivar has_error: If there is error in the table. - :vartype has_error: bool - :ivar name: Name of the table. - :vartype name: str - :ivar quoted_name: Quoted name of the table. - :vartype quoted_name: str - """ - - _validation = { - 'columns': {'readonly': True}, - 'error_id': {'readonly': True}, - 'has_error': {'readonly': True}, - 'name': {'readonly': True}, - 'quoted_name': {'readonly': True}, - } - - _attribute_map = { - 'columns': {'key': 'columns', 'type': '[SyncFullSchemaTableColumn]'}, - 'error_id': {'key': 'errorId', 'type': 'str'}, - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncFullSchemaTable, self).__init__(**kwargs) - self.columns = None - self.error_id = None - self.has_error = None - self.name = None - self.quoted_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column.py deleted file mode 100644 index 8eaa3659873b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaTableColumn(Model): - """Properties of the column in the table of database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar data_size: Data size of the column. - :vartype data_size: str - :ivar data_type: Data type of the column. - :vartype data_type: str - :ivar error_id: Error id of the column. - :vartype error_id: str - :ivar has_error: If there is error in the table. - :vartype has_error: bool - :ivar is_primary_key: If it is the primary key of the table. - :vartype is_primary_key: bool - :ivar name: Name of the column. - :vartype name: str - :ivar quoted_name: Quoted name of the column. - :vartype quoted_name: str - """ - - _validation = { - 'data_size': {'readonly': True}, - 'data_type': {'readonly': True}, - 'error_id': {'readonly': True}, - 'has_error': {'readonly': True}, - 'is_primary_key': {'readonly': True}, - 'name': {'readonly': True}, - 'quoted_name': {'readonly': True}, - } - - _attribute_map = { - 'data_size': {'key': 'dataSize', 'type': 'str'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'error_id': {'key': 'errorId', 'type': 'str'}, - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'is_primary_key': {'key': 'isPrimaryKey', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncFullSchemaTableColumn, self).__init__(**kwargs) - self.data_size = None - self.data_type = None - self.error_id = None - self.has_error = None - self.is_primary_key = None - self.name = None - self.quoted_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column_py3.py deleted file mode 100644 index 33df54b37b59..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaTableColumn(Model): - """Properties of the column in the table of database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar data_size: Data size of the column. - :vartype data_size: str - :ivar data_type: Data type of the column. - :vartype data_type: str - :ivar error_id: Error id of the column. - :vartype error_id: str - :ivar has_error: If there is error in the table. - :vartype has_error: bool - :ivar is_primary_key: If it is the primary key of the table. - :vartype is_primary_key: bool - :ivar name: Name of the column. - :vartype name: str - :ivar quoted_name: Quoted name of the column. - :vartype quoted_name: str - """ - - _validation = { - 'data_size': {'readonly': True}, - 'data_type': {'readonly': True}, - 'error_id': {'readonly': True}, - 'has_error': {'readonly': True}, - 'is_primary_key': {'readonly': True}, - 'name': {'readonly': True}, - 'quoted_name': {'readonly': True}, - } - - _attribute_map = { - 'data_size': {'key': 'dataSize', 'type': 'str'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'error_id': {'key': 'errorId', 'type': 'str'}, - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'is_primary_key': {'key': 'isPrimaryKey', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncFullSchemaTableColumn, self).__init__(**kwargs) - self.data_size = None - self.data_type = None - self.error_id = None - self.has_error = None - self.is_primary_key = None - self.name = None - self.quoted_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_py3.py deleted file mode 100644 index 194f50826875..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaTable(Model): - """Properties of the table in the database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar columns: List of columns in the table of database full schema. - :vartype columns: list[~azure.mgmt.sql.models.SyncFullSchemaTableColumn] - :ivar error_id: Error id of the table. - :vartype error_id: str - :ivar has_error: If there is error in the table. - :vartype has_error: bool - :ivar name: Name of the table. - :vartype name: str - :ivar quoted_name: Quoted name of the table. - :vartype quoted_name: str - """ - - _validation = { - 'columns': {'readonly': True}, - 'error_id': {'readonly': True}, - 'has_error': {'readonly': True}, - 'name': {'readonly': True}, - 'quoted_name': {'readonly': True}, - } - - _attribute_map = { - 'columns': {'key': 'columns', 'type': '[SyncFullSchemaTableColumn]'}, - 'error_id': {'key': 'errorId', 'type': 'str'}, - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncFullSchemaTable, self).__init__(**kwargs) - self.columns = None - self.error_id = None - self.has_error = None - self.name = None - self.quoted_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group.py deleted file mode 100644 index 5a252358a340..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SyncGroup(ProxyResource): - """An Azure SQL Database sync group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param interval: Sync interval of the sync group. - :type interval: int - :ivar last_sync_time: Last sync time of the sync group. - :vartype last_sync_time: datetime - :param conflict_resolution_policy: Conflict resolution policy of the sync - group. Possible values include: 'HubWin', 'MemberWin' - :type conflict_resolution_policy: str or - ~azure.mgmt.sql.models.SyncConflictResolutionPolicy - :param sync_database_id: ARM resource id of the sync database in the sync - group. - :type sync_database_id: str - :param hub_database_user_name: User name for the sync group hub database - credential. - :type hub_database_user_name: str - :param hub_database_password: Password for the sync group hub database - credential. - :type hub_database_password: str - :ivar sync_state: Sync state of the sync group. Possible values include: - 'NotReady', 'Error', 'Warning', 'Progressing', 'Good' - :vartype sync_state: str or ~azure.mgmt.sql.models.SyncGroupState - :param schema: Sync schema of the sync group. - :type schema: ~azure.mgmt.sql.models.SyncGroupSchema - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'last_sync_time': {'readonly': True}, - 'sync_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'interval': {'key': 'properties.interval', 'type': 'int'}, - 'last_sync_time': {'key': 'properties.lastSyncTime', 'type': 'iso-8601'}, - 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'str'}, - 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, - 'hub_database_user_name': {'key': 'properties.hubDatabaseUserName', 'type': 'str'}, - 'hub_database_password': {'key': 'properties.hubDatabasePassword', 'type': 'str'}, - 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, - 'schema': {'key': 'properties.schema', 'type': 'SyncGroupSchema'}, - } - - def __init__(self, **kwargs): - super(SyncGroup, self).__init__(**kwargs) - self.interval = kwargs.get('interval', None) - self.last_sync_time = None - self.conflict_resolution_policy = kwargs.get('conflict_resolution_policy', None) - self.sync_database_id = kwargs.get('sync_database_id', None) - self.hub_database_user_name = kwargs.get('hub_database_user_name', None) - self.hub_database_password = kwargs.get('hub_database_password', None) - self.sync_state = None - self.schema = kwargs.get('schema', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties.py deleted file mode 100644 index 22cb584b67be..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupLogProperties(Model): - """Properties of an Azure SQL Database sync group log. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar timestamp: Timestamp of the sync group log. - :vartype timestamp: datetime - :ivar type: Type of the sync group log. Possible values include: 'All', - 'Error', 'Warning', 'Success' - :vartype type: str or ~azure.mgmt.sql.models.SyncGroupLogType - :ivar source: Source of the sync group log. - :vartype source: str - :ivar details: Details of the sync group log. - :vartype details: str - :ivar tracing_id: TracingId of the sync group log. - :vartype tracing_id: str - :ivar operation_status: OperationStatus of the sync group log. - :vartype operation_status: str - """ - - _validation = { - 'timestamp': {'readonly': True}, - 'type': {'readonly': True}, - 'source': {'readonly': True}, - 'details': {'readonly': True}, - 'tracing_id': {'readonly': True}, - 'operation_status': {'readonly': True}, - } - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'str'}, - 'tracing_id': {'key': 'tracingId', 'type': 'str'}, - 'operation_status': {'key': 'operationStatus', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncGroupLogProperties, self).__init__(**kwargs) - self.timestamp = None - self.type = None - self.source = None - self.details = None - self.tracing_id = None - self.operation_status = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_paged.py deleted file mode 100644 index bc7e0c3e7750..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncGroupLogPropertiesPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncGroupLogProperties ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncGroupLogProperties]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncGroupLogPropertiesPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_py3.py deleted file mode 100644 index 067424b40232..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupLogProperties(Model): - """Properties of an Azure SQL Database sync group log. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar timestamp: Timestamp of the sync group log. - :vartype timestamp: datetime - :ivar type: Type of the sync group log. Possible values include: 'All', - 'Error', 'Warning', 'Success' - :vartype type: str or ~azure.mgmt.sql.models.SyncGroupLogType - :ivar source: Source of the sync group log. - :vartype source: str - :ivar details: Details of the sync group log. - :vartype details: str - :ivar tracing_id: TracingId of the sync group log. - :vartype tracing_id: str - :ivar operation_status: OperationStatus of the sync group log. - :vartype operation_status: str - """ - - _validation = { - 'timestamp': {'readonly': True}, - 'type': {'readonly': True}, - 'source': {'readonly': True}, - 'details': {'readonly': True}, - 'tracing_id': {'readonly': True}, - 'operation_status': {'readonly': True}, - } - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'str'}, - 'tracing_id': {'key': 'tracingId', 'type': 'str'}, - 'operation_status': {'key': 'operationStatus', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncGroupLogProperties, self).__init__(**kwargs) - self.timestamp = None - self.type = None - self.source = None - self.details = None - self.tracing_id = None - self.operation_status = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_paged.py deleted file mode 100644 index b20ca4d8e098..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncGroupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_py3.py deleted file mode 100644 index 1654af79245f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_py3.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SyncGroup(ProxyResource): - """An Azure SQL Database sync group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param interval: Sync interval of the sync group. - :type interval: int - :ivar last_sync_time: Last sync time of the sync group. - :vartype last_sync_time: datetime - :param conflict_resolution_policy: Conflict resolution policy of the sync - group. Possible values include: 'HubWin', 'MemberWin' - :type conflict_resolution_policy: str or - ~azure.mgmt.sql.models.SyncConflictResolutionPolicy - :param sync_database_id: ARM resource id of the sync database in the sync - group. - :type sync_database_id: str - :param hub_database_user_name: User name for the sync group hub database - credential. - :type hub_database_user_name: str - :param hub_database_password: Password for the sync group hub database - credential. - :type hub_database_password: str - :ivar sync_state: Sync state of the sync group. Possible values include: - 'NotReady', 'Error', 'Warning', 'Progressing', 'Good' - :vartype sync_state: str or ~azure.mgmt.sql.models.SyncGroupState - :param schema: Sync schema of the sync group. - :type schema: ~azure.mgmt.sql.models.SyncGroupSchema - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'last_sync_time': {'readonly': True}, - 'sync_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'interval': {'key': 'properties.interval', 'type': 'int'}, - 'last_sync_time': {'key': 'properties.lastSyncTime', 'type': 'iso-8601'}, - 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'str'}, - 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, - 'hub_database_user_name': {'key': 'properties.hubDatabaseUserName', 'type': 'str'}, - 'hub_database_password': {'key': 'properties.hubDatabasePassword', 'type': 'str'}, - 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, - 'schema': {'key': 'properties.schema', 'type': 'SyncGroupSchema'}, - } - - def __init__(self, *, interval: int=None, conflict_resolution_policy=None, sync_database_id: str=None, hub_database_user_name: str=None, hub_database_password: str=None, schema=None, **kwargs) -> None: - super(SyncGroup, self).__init__(**kwargs) - self.interval = interval - self.last_sync_time = None - self.conflict_resolution_policy = conflict_resolution_policy - self.sync_database_id = sync_database_id - self.hub_database_user_name = hub_database_user_name - self.hub_database_password = hub_database_password - self.sync_state = None - self.schema = schema diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema.py deleted file mode 100644 index ece05d7301d0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchema(Model): - """Properties of sync group schema. - - :param tables: List of tables in sync group schema. - :type tables: list[~azure.mgmt.sql.models.SyncGroupSchemaTable] - :param master_sync_member_name: Name of master sync member where the - schema is from. - :type master_sync_member_name: str - """ - - _attribute_map = { - 'tables': {'key': 'tables', 'type': '[SyncGroupSchemaTable]'}, - 'master_sync_member_name': {'key': 'masterSyncMemberName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncGroupSchema, self).__init__(**kwargs) - self.tables = kwargs.get('tables', None) - self.master_sync_member_name = kwargs.get('master_sync_member_name', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_py3.py deleted file mode 100644 index b26d4b1b791c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchema(Model): - """Properties of sync group schema. - - :param tables: List of tables in sync group schema. - :type tables: list[~azure.mgmt.sql.models.SyncGroupSchemaTable] - :param master_sync_member_name: Name of master sync member where the - schema is from. - :type master_sync_member_name: str - """ - - _attribute_map = { - 'tables': {'key': 'tables', 'type': '[SyncGroupSchemaTable]'}, - 'master_sync_member_name': {'key': 'masterSyncMemberName', 'type': 'str'}, - } - - def __init__(self, *, tables=None, master_sync_member_name: str=None, **kwargs) -> None: - super(SyncGroupSchema, self).__init__(**kwargs) - self.tables = tables - self.master_sync_member_name = master_sync_member_name diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table.py deleted file mode 100644 index cf83bba5825d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchemaTable(Model): - """Properties of table in sync group schema. - - :param columns: List of columns in sync group schema. - :type columns: list[~azure.mgmt.sql.models.SyncGroupSchemaTableColumn] - :param quoted_name: Quoted name of sync group schema table. - :type quoted_name: str - """ - - _attribute_map = { - 'columns': {'key': 'columns', 'type': '[SyncGroupSchemaTableColumn]'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncGroupSchemaTable, self).__init__(**kwargs) - self.columns = kwargs.get('columns', None) - self.quoted_name = kwargs.get('quoted_name', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column.py deleted file mode 100644 index 705810d1d2a3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchemaTableColumn(Model): - """Properties of column in sync group table. - - :param quoted_name: Quoted name of sync group table column. - :type quoted_name: str - :param data_size: Data size of the column. - :type data_size: str - :param data_type: Data type of the column. - :type data_type: str - """ - - _attribute_map = { - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - 'data_size': {'key': 'dataSize', 'type': 'str'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncGroupSchemaTableColumn, self).__init__(**kwargs) - self.quoted_name = kwargs.get('quoted_name', None) - self.data_size = kwargs.get('data_size', None) - self.data_type = kwargs.get('data_type', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column_py3.py deleted file mode 100644 index bb8cce2d8c34..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchemaTableColumn(Model): - """Properties of column in sync group table. - - :param quoted_name: Quoted name of sync group table column. - :type quoted_name: str - :param data_size: Data size of the column. - :type data_size: str - :param data_type: Data type of the column. - :type data_type: str - """ - - _attribute_map = { - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - 'data_size': {'key': 'dataSize', 'type': 'str'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - } - - def __init__(self, *, quoted_name: str=None, data_size: str=None, data_type: str=None, **kwargs) -> None: - super(SyncGroupSchemaTableColumn, self).__init__(**kwargs) - self.quoted_name = quoted_name - self.data_size = data_size - self.data_type = data_type diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_py3.py deleted file mode 100644 index ecbbd26a576d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchemaTable(Model): - """Properties of table in sync group schema. - - :param columns: List of columns in sync group schema. - :type columns: list[~azure.mgmt.sql.models.SyncGroupSchemaTableColumn] - :param quoted_name: Quoted name of sync group schema table. - :type quoted_name: str - """ - - _attribute_map = { - 'columns': {'key': 'columns', 'type': '[SyncGroupSchemaTableColumn]'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, *, columns=None, quoted_name: str=None, **kwargs) -> None: - super(SyncGroupSchemaTable, self).__init__(**kwargs) - self.columns = columns - self.quoted_name = quoted_name diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member.py deleted file mode 100644 index 1474c6320dc1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SyncMember(ProxyResource): - """An Azure SQL Database sync member. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param database_type: Database type of the sync member. Possible values - include: 'AzureSqlDatabase', 'SqlServerDatabase' - :type database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType - :param sync_agent_id: ARM resource id of the sync agent in the sync - member. - :type sync_agent_id: str - :param sql_server_database_id: SQL Server database id of the sync member. - :type sql_server_database_id: str - :param server_name: Server name of the member database in the sync member - :type server_name: str - :param database_name: Database name of the member database in the sync - member. - :type database_name: str - :param user_name: User name of the member database in the sync member. - :type user_name: str - :param password: Password of the member database in the sync member. - :type password: str - :param sync_direction: Sync direction of the sync member. Possible values - include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember' - :type sync_direction: str or ~azure.mgmt.sql.models.SyncDirection - :ivar sync_state: Sync state of the sync member. Possible values include: - 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', - 'DisabledTombstoneCleanup', 'DisabledBackupRestore', - 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', - 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', - 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', - 'ReprovisionFailed', 'UnReprovisioned' - :vartype sync_state: str or ~azure.mgmt.sql.models.SyncMemberState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sync_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, - 'sync_agent_id': {'key': 'properties.syncAgentId', 'type': 'str'}, - 'sql_server_database_id': {'key': 'properties.sqlServerDatabaseId', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'sync_direction': {'key': 'properties.syncDirection', 'type': 'str'}, - 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncMember, self).__init__(**kwargs) - self.database_type = kwargs.get('database_type', None) - self.sync_agent_id = kwargs.get('sync_agent_id', None) - self.sql_server_database_id = kwargs.get('sql_server_database_id', None) - self.server_name = kwargs.get('server_name', None) - self.database_name = kwargs.get('database_name', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.sync_direction = kwargs.get('sync_direction', None) - self.sync_state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_paged.py deleted file mode 100644 index 68bddeeeec1b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncMemberPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncMember ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncMember]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncMemberPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_py3.py deleted file mode 100644 index 50cf8fe2d65c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_py3.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SyncMember(ProxyResource): - """An Azure SQL Database sync member. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param database_type: Database type of the sync member. Possible values - include: 'AzureSqlDatabase', 'SqlServerDatabase' - :type database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType - :param sync_agent_id: ARM resource id of the sync agent in the sync - member. - :type sync_agent_id: str - :param sql_server_database_id: SQL Server database id of the sync member. - :type sql_server_database_id: str - :param server_name: Server name of the member database in the sync member - :type server_name: str - :param database_name: Database name of the member database in the sync - member. - :type database_name: str - :param user_name: User name of the member database in the sync member. - :type user_name: str - :param password: Password of the member database in the sync member. - :type password: str - :param sync_direction: Sync direction of the sync member. Possible values - include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember' - :type sync_direction: str or ~azure.mgmt.sql.models.SyncDirection - :ivar sync_state: Sync state of the sync member. Possible values include: - 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', - 'DisabledTombstoneCleanup', 'DisabledBackupRestore', - 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', - 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', - 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', - 'ReprovisionFailed', 'UnReprovisioned' - :vartype sync_state: str or ~azure.mgmt.sql.models.SyncMemberState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sync_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, - 'sync_agent_id': {'key': 'properties.syncAgentId', 'type': 'str'}, - 'sql_server_database_id': {'key': 'properties.sqlServerDatabaseId', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'sync_direction': {'key': 'properties.syncDirection', 'type': 'str'}, - 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, - } - - def __init__(self, *, database_type=None, sync_agent_id: str=None, sql_server_database_id: str=None, server_name: str=None, database_name: str=None, user_name: str=None, password: str=None, sync_direction=None, **kwargs) -> None: - super(SyncMember, self).__init__(**kwargs) - self.database_type = database_type - self.sync_agent_id = sync_agent_id - self.sql_server_database_id = sql_server_database_id - self.server_name = server_name - self.database_name = database_name - self.user_name = user_name - self.password = password - self.sync_direction = sync_direction - self.sync_state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate.py deleted file mode 100644 index 1171ee8adf94..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class TdeCertificate(ProxyResource): - """A TDE certificate that can be uploaded into a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param private_blob: Required. The base64 encoded certificate private - blob. - :type private_blob: str - :param cert_password: The certificate password. - :type cert_password: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'private_blob': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'private_blob': {'key': 'properties.privateBlob', 'type': 'str'}, - 'cert_password': {'key': 'properties.certPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TdeCertificate, self).__init__(**kwargs) - self.private_blob = kwargs.get('private_blob', None) - self.cert_password = kwargs.get('cert_password', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate_py3.py deleted file mode 100644 index b4e54453cae1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class TdeCertificate(ProxyResource): - """A TDE certificate that can be uploaded into a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param private_blob: Required. The base64 encoded certificate private - blob. - :type private_blob: str - :param cert_password: The certificate password. - :type cert_password: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'private_blob': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'private_blob': {'key': 'properties.privateBlob', 'type': 'str'}, - 'cert_password': {'key': 'properties.certPassword', 'type': 'str'}, - } - - def __init__(self, *, private_blob: str, cert_password: str=None, **kwargs) -> None: - super(TdeCertificate, self).__init__(**kwargs) - self.private_blob = private_blob - self.cert_password = cert_password diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource.py deleted file mode 100644 index dc99e096cf18..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class TrackedResource(Resource): - """ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TrackedResource, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource_py3.py deleted file mode 100644 index 5edf04ac0a73..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class TrackedResource(Resource): - """ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(TrackedResource, self).__init__(**kwargs) - self.location = location - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption.py deleted file mode 100644 index 4270fa860c1d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class TransparentDataEncryption(ProxyResource): - """Represents a database transparent data encryption configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :param status: The status of the database transparent data encryption. - Possible values include: 'Enabled', 'Disabled' - :type status: str or - ~azure.mgmt.sql.models.TransparentDataEncryptionStatus - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'TransparentDataEncryptionStatus'}, - } - - def __init__(self, **kwargs): - super(TransparentDataEncryption, self).__init__(**kwargs) - self.location = None - self.status = kwargs.get('status', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity.py deleted file mode 100644 index 60e9505eba4c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class TransparentDataEncryptionActivity(ProxyResource): - """Represents a database transparent data encryption Scan. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar status: The status of the database. Possible values include: - 'Encrypting', 'Decrypting' - :vartype status: str or - ~azure.mgmt.sql.models.TransparentDataEncryptionActivityStatus - :ivar percent_complete: The percent complete of the transparent data - encryption scan for a database. - :vartype percent_complete: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, - 'percent_complete': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(TransparentDataEncryptionActivity, self).__init__(**kwargs) - self.location = None - self.status = None - self.percent_complete = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_paged.py deleted file mode 100644 index b86dce24923c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class TransparentDataEncryptionActivityPaged(Paged): - """ - A paging container for iterating over a list of :class:`TransparentDataEncryptionActivity ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TransparentDataEncryptionActivity]'} - } - - def __init__(self, *args, **kwargs): - - super(TransparentDataEncryptionActivityPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_py3.py deleted file mode 100644 index 9bf146137c20..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class TransparentDataEncryptionActivity(ProxyResource): - """Represents a database transparent data encryption Scan. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar status: The status of the database. Possible values include: - 'Encrypting', 'Decrypting' - :vartype status: str or - ~azure.mgmt.sql.models.TransparentDataEncryptionActivityStatus - :ivar percent_complete: The percent complete of the transparent data - encryption scan for a database. - :vartype percent_complete: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, - 'percent_complete': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(TransparentDataEncryptionActivity, self).__init__(**kwargs) - self.location = None - self.status = None - self.percent_complete = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_py3.py deleted file mode 100644 index db2b2096f798..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class TransparentDataEncryption(ProxyResource): - """Represents a database transparent data encryption configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :param status: The status of the database transparent data encryption. - Possible values include: 'Enabled', 'Disabled' - :type status: str or - ~azure.mgmt.sql.models.TransparentDataEncryptionStatus - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'TransparentDataEncryptionStatus'}, - } - - def __init__(self, *, status=None, **kwargs) -> None: - super(TransparentDataEncryption, self).__init__(**kwargs) - self.location = None - self.status = status diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster.py deleted file mode 100644 index a3c9dd04abca..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class VirtualCluster(TrackedResource): - """An Azure SQL virtual cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :ivar subnet_id: Subnet resource ID for the virtual cluster. - :vartype subnet_id: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :ivar child_resources: List of resources in this virtual cluster. - :vartype child_resources: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'subnet_id': {'readonly': True}, - 'child_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'family': {'key': 'properties.family', 'type': 'str'}, - 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualCluster, self).__init__(**kwargs) - self.subnet_id = None - self.family = kwargs.get('family', None) - self.child_resources = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_paged.py deleted file mode 100644 index 865bbd5e9f86..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualClusterPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_py3.py deleted file mode 100644 index e11fb730e2be..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class VirtualCluster(TrackedResource): - """An Azure SQL virtual cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :ivar subnet_id: Subnet resource ID for the virtual cluster. - :vartype subnet_id: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :ivar child_resources: List of resources in this virtual cluster. - :vartype child_resources: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'subnet_id': {'readonly': True}, - 'child_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'family': {'key': 'properties.family', 'type': 'str'}, - 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, - } - - def __init__(self, *, location: str, tags=None, family: str=None, **kwargs) -> None: - super(VirtualCluster, self).__init__(location=location, tags=tags, **kwargs) - self.subnet_id = None - self.family = family - self.child_resources = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update.py deleted file mode 100644 index c6604df3568a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualClusterUpdate(Model): - """An update request for an Azure SQL Database virtual cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar subnet_id: Subnet resource ID for the virtual cluster. - :vartype subnet_id: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :ivar child_resources: List of resources in this virtual cluster. - :vartype child_resources: list[str] - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'subnet_id': {'readonly': True}, - 'child_resources': {'readonly': True}, - } - - _attribute_map = { - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'family': {'key': 'properties.family', 'type': 'str'}, - 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(VirtualClusterUpdate, self).__init__(**kwargs) - self.subnet_id = None - self.family = kwargs.get('family', None) - self.child_resources = None - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update_py3.py deleted file mode 100644 index ec26101b089a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualClusterUpdate(Model): - """An update request for an Azure SQL Database virtual cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar subnet_id: Subnet resource ID for the virtual cluster. - :vartype subnet_id: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :ivar child_resources: List of resources in this virtual cluster. - :vartype child_resources: list[str] - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'subnet_id': {'readonly': True}, - 'child_resources': {'readonly': True}, - } - - _attribute_map = { - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'family': {'key': 'properties.family', 'type': 'str'}, - 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, family: str=None, tags=None, **kwargs) -> None: - super(VirtualClusterUpdate, self).__init__(**kwargs) - self.subnet_id = None - self.family = family - self.child_resources = None - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule.py deleted file mode 100644 index 0960e4289c66..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class VirtualNetworkRule(ProxyResource): - """A virtual network rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param virtual_network_subnet_id: Required. The ARM resource id of the - virtual network subnet. - :type virtual_network_subnet_id: str - :param ignore_missing_vnet_service_endpoint: Create firewall rule before - the virtual network has vnet service endpoint enabled. - :type ignore_missing_vnet_service_endpoint: bool - :ivar state: Virtual Network Rule State. Possible values include: - 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' - :vartype state: str or ~azure.mgmt.sql.models.VirtualNetworkRuleState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_subnet_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, - 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualNetworkRule, self).__init__(**kwargs) - self.virtual_network_subnet_id = kwargs.get('virtual_network_subnet_id', None) - self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_paged.py deleted file mode 100644 index 1cc23039a558..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualNetworkRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualNetworkRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualNetworkRule]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualNetworkRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_py3.py deleted file mode 100644 index 19e6bd30ff5e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class VirtualNetworkRule(ProxyResource): - """A virtual network rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param virtual_network_subnet_id: Required. The ARM resource id of the - virtual network subnet. - :type virtual_network_subnet_id: str - :param ignore_missing_vnet_service_endpoint: Create firewall rule before - the virtual network has vnet service endpoint enabled. - :type ignore_missing_vnet_service_endpoint: bool - :ivar state: Virtual Network Rule State. Possible values include: - 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' - :vartype state: str or ~azure.mgmt.sql.models.VirtualNetworkRuleState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_subnet_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, - 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, *, virtual_network_subnet_id: str, ignore_missing_vnet_service_endpoint: bool=None, **kwargs) -> None: - super(VirtualNetworkRule, self).__init__(**kwargs) - self.virtual_network_subnet_id = virtual_network_subnet_id - self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties.py deleted file mode 100644 index e7d424543f2b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VulnerabilityAssessmentRecurringScansProperties(Model): - """Properties of a Vulnerability Assessment recurring scans. - - :param is_enabled: Recurring scans state. - :type is_enabled: bool - :param email_subscription_admins: Specifies that the schedule scan - notification will be is sent to the subscription administrators. Default - value: True . - :type email_subscription_admins: bool - :param emails: Specifies an array of e-mail addresses to which the scan - notification is sent. - :type emails: list[str] - """ - - _attribute_map = { - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'}, - 'emails': {'key': 'emails', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs) - self.is_enabled = kwargs.get('is_enabled', None) - self.email_subscription_admins = kwargs.get('email_subscription_admins', True) - self.emails = kwargs.get('emails', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py deleted file mode 100644 index 3a55afaa0a5e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VulnerabilityAssessmentRecurringScansProperties(Model): - """Properties of a Vulnerability Assessment recurring scans. - - :param is_enabled: Recurring scans state. - :type is_enabled: bool - :param email_subscription_admins: Specifies that the schedule scan - notification will be is sent to the subscription administrators. Default - value: True . - :type email_subscription_admins: bool - :param emails: Specifies an array of e-mail addresses to which the scan - notification is sent. - :type emails: list[str] - """ - - _attribute_map = { - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'}, - 'emails': {'key': 'emails', 'type': '[str]'}, - } - - def __init__(self, *, is_enabled: bool=None, email_subscription_admins: bool=True, emails=None, **kwargs) -> None: - super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs) - self.is_enabled = is_enabled - self.email_subscription_admins = email_subscription_admins - self.emails = emails diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error.py deleted file mode 100644 index 1d465691ba60..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VulnerabilityAssessmentScanError(Model): - """Properties of a vulnerability assessment scan error. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VulnerabilityAssessmentScanError, self).__init__(**kwargs) - self.code = None - self.message = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error_py3.py deleted file mode 100644 index 93c13998eb25..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VulnerabilityAssessmentScanError(Model): - """Properties of a vulnerability assessment scan error. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(VulnerabilityAssessmentScanError, self).__init__(**kwargs) - self.code = None - self.message = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record.py deleted file mode 100644 index 67a6d163f90c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class VulnerabilityAssessmentScanRecord(ProxyResource): - """A vulnerability assessment scan record. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar scan_id: The scan ID. - :vartype scan_id: str - :ivar trigger_type: The scan trigger type. Possible values include: - 'OnDemand', 'Recurring' - :vartype trigger_type: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentScanTriggerType - :ivar state: The scan status. Possible values include: 'Passed', 'Failed', - 'FailedToRun', 'InProgress' - :vartype state: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentScanState - :ivar start_time: The scan start time (UTC). - :vartype start_time: datetime - :ivar end_time: The scan end time (UTC). - :vartype end_time: datetime - :ivar errors: The scan errors. - :vartype errors: - list[~azure.mgmt.sql.models.VulnerabilityAssessmentScanError] - :ivar storage_container_path: The scan results storage container path. - :vartype storage_container_path: str - :ivar number_of_failed_security_checks: The number of failed security - checks. - :vartype number_of_failed_security_checks: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'scan_id': {'readonly': True}, - 'trigger_type': {'readonly': True}, - 'state': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'errors': {'readonly': True}, - 'storage_container_path': {'readonly': True}, - 'number_of_failed_security_checks': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'scan_id': {'key': 'properties.scanId', 'type': 'str'}, - 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'errors': {'key': 'properties.errors', 'type': '[VulnerabilityAssessmentScanError]'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'number_of_failed_security_checks': {'key': 'properties.numberOfFailedSecurityChecks', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(VulnerabilityAssessmentScanRecord, self).__init__(**kwargs) - self.scan_id = None - self.trigger_type = None - self.state = None - self.start_time = None - self.end_time = None - self.errors = None - self.storage_container_path = None - self.number_of_failed_security_checks = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_paged.py deleted file mode 100644 index 7076acc9290f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VulnerabilityAssessmentScanRecordPaged(Paged): - """ - A paging container for iterating over a list of :class:`VulnerabilityAssessmentScanRecord ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VulnerabilityAssessmentScanRecord]'} - } - - def __init__(self, *args, **kwargs): - - super(VulnerabilityAssessmentScanRecordPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_py3.py deleted file mode 100644 index e31d141065af..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class VulnerabilityAssessmentScanRecord(ProxyResource): - """A vulnerability assessment scan record. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar scan_id: The scan ID. - :vartype scan_id: str - :ivar trigger_type: The scan trigger type. Possible values include: - 'OnDemand', 'Recurring' - :vartype trigger_type: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentScanTriggerType - :ivar state: The scan status. Possible values include: 'Passed', 'Failed', - 'FailedToRun', 'InProgress' - :vartype state: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentScanState - :ivar start_time: The scan start time (UTC). - :vartype start_time: datetime - :ivar end_time: The scan end time (UTC). - :vartype end_time: datetime - :ivar errors: The scan errors. - :vartype errors: - list[~azure.mgmt.sql.models.VulnerabilityAssessmentScanError] - :ivar storage_container_path: The scan results storage container path. - :vartype storage_container_path: str - :ivar number_of_failed_security_checks: The number of failed security - checks. - :vartype number_of_failed_security_checks: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'scan_id': {'readonly': True}, - 'trigger_type': {'readonly': True}, - 'state': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'errors': {'readonly': True}, - 'storage_container_path': {'readonly': True}, - 'number_of_failed_security_checks': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'scan_id': {'key': 'properties.scanId', 'type': 'str'}, - 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'errors': {'key': 'properties.errors', 'type': '[VulnerabilityAssessmentScanError]'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'number_of_failed_security_checks': {'key': 'properties.numberOfFailedSecurityChecks', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(VulnerabilityAssessmentScanRecord, self).__init__(**kwargs) - self.scan_id = None - self.trigger_type = None - self.state = None - self.start_time = None - self.end_time = None - self.errors = None - self.storage_container_path = None - self.number_of_failed_security_checks = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py index 3db410ac9cd7..57aa89c2fe9a 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py @@ -9,86 +9,88 @@ # regenerated. # -------------------------------------------------------------------------- -from .recoverable_databases_operations import RecoverableDatabasesOperations -from .restorable_dropped_databases_operations import RestorableDroppedDatabasesOperations -from .servers_operations import ServersOperations -from .server_connection_policies_operations import ServerConnectionPoliciesOperations -from .database_threat_detection_policies_operations import DatabaseThreatDetectionPoliciesOperations -from .data_masking_policies_operations import DataMaskingPoliciesOperations -from .data_masking_rules_operations import DataMaskingRulesOperations -from .firewall_rules_operations import FirewallRulesOperations -from .geo_backup_policies_operations import GeoBackupPoliciesOperations -from .databases_operations import DatabasesOperations -from .elastic_pools_operations import ElasticPoolsOperations -from .recommended_elastic_pools_operations import RecommendedElasticPoolsOperations -from .replication_links_operations import ReplicationLinksOperations -from .server_azure_ad_administrators_operations import ServerAzureADAdministratorsOperations -from .server_communication_links_operations import ServerCommunicationLinksOperations -from .service_objectives_operations import ServiceObjectivesOperations -from .elastic_pool_activities_operations import ElasticPoolActivitiesOperations -from .elastic_pool_database_activities_operations import ElasticPoolDatabaseActivitiesOperations -from .service_tier_advisors_operations import ServiceTierAdvisorsOperations -from .transparent_data_encryptions_operations import TransparentDataEncryptionsOperations -from .transparent_data_encryption_activities_operations import TransparentDataEncryptionActivitiesOperations -from .server_usages_operations import ServerUsagesOperations -from .database_usages_operations import DatabaseUsagesOperations -from .database_automatic_tuning_operations import DatabaseAutomaticTuningOperations -from .encryption_protectors_operations import EncryptionProtectorsOperations -from .failover_groups_operations import FailoverGroupsOperations -from .managed_instances_operations import ManagedInstancesOperations -from .operations import Operations -from .server_keys_operations import ServerKeysOperations -from .sync_agents_operations import SyncAgentsOperations -from .sync_groups_operations import SyncGroupsOperations -from .sync_members_operations import SyncMembersOperations -from .subscription_usages_operations import SubscriptionUsagesOperations -from .virtual_clusters_operations import VirtualClustersOperations -from .virtual_network_rules_operations import VirtualNetworkRulesOperations -from .extended_database_blob_auditing_policies_operations import ExtendedDatabaseBlobAuditingPoliciesOperations -from .extended_server_blob_auditing_policies_operations import ExtendedServerBlobAuditingPoliciesOperations -from .server_blob_auditing_policies_operations import ServerBlobAuditingPoliciesOperations -from .database_blob_auditing_policies_operations import DatabaseBlobAuditingPoliciesOperations -from .database_vulnerability_assessment_rule_baselines_operations import DatabaseVulnerabilityAssessmentRuleBaselinesOperations -from .database_vulnerability_assessments_operations import DatabaseVulnerabilityAssessmentsOperations -from .job_agents_operations import JobAgentsOperations -from .job_credentials_operations import JobCredentialsOperations -from .job_executions_operations import JobExecutionsOperations -from .jobs_operations import JobsOperations -from .job_step_executions_operations import JobStepExecutionsOperations -from .job_steps_operations import JobStepsOperations -from .job_target_executions_operations import JobTargetExecutionsOperations -from .job_target_groups_operations import JobTargetGroupsOperations -from .job_versions_operations import JobVersionsOperations -from .long_term_retention_backups_operations import LongTermRetentionBackupsOperations -from .backup_long_term_retention_policies_operations import BackupLongTermRetentionPoliciesOperations -from .managed_backup_short_term_retention_policies_operations import ManagedBackupShortTermRetentionPoliciesOperations -from .managed_databases_operations import ManagedDatabasesOperations -from .managed_restorable_dropped_database_backup_short_term_retention_policies_operations import ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations -from .server_automatic_tuning_operations import ServerAutomaticTuningOperations -from .server_dns_aliases_operations import ServerDnsAliasesOperations -from .server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations -from .restorable_dropped_managed_databases_operations import RestorableDroppedManagedDatabasesOperations -from .restore_points_operations import RestorePointsOperations -from .managed_database_security_alert_policies_operations import ManagedDatabaseSecurityAlertPoliciesOperations -from .managed_server_security_alert_policies_operations import ManagedServerSecurityAlertPoliciesOperations -from .sensitivity_labels_operations import SensitivityLabelsOperations -from .database_operations import DatabaseOperations -from .elastic_pool_operations import ElasticPoolOperations -from .capabilities_operations import CapabilitiesOperations -from .database_vulnerability_assessment_scans_operations import DatabaseVulnerabilityAssessmentScansOperations -from .managed_database_vulnerability_assessment_rule_baselines_operations import ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations -from .managed_database_vulnerability_assessment_scans_operations import ManagedDatabaseVulnerabilityAssessmentScansOperations -from .managed_database_vulnerability_assessments_operations import ManagedDatabaseVulnerabilityAssessmentsOperations -from .instance_failover_groups_operations import InstanceFailoverGroupsOperations -from .backup_short_term_retention_policies_operations import BackupShortTermRetentionPoliciesOperations -from .tde_certificates_operations import TdeCertificatesOperations -from .managed_instance_tde_certificates_operations import ManagedInstanceTdeCertificatesOperations -from .managed_instance_keys_operations import ManagedInstanceKeysOperations -from .managed_instance_encryption_protectors_operations import ManagedInstanceEncryptionProtectorsOperations -from .recoverable_managed_databases_operations import RecoverableManagedDatabasesOperations -from .managed_instance_vulnerability_assessments_operations import ManagedInstanceVulnerabilityAssessmentsOperations -from .server_vulnerability_assessments_operations import ServerVulnerabilityAssessmentsOperations -from .managed_database_sensitivity_labels_operations import ManagedDatabaseSensitivityLabelsOperations +from ._recoverable_databases_operations import RecoverableDatabasesOperations +from ._restorable_dropped_databases_operations import RestorableDroppedDatabasesOperations +from ._servers_operations import ServersOperations +from ._server_connection_policies_operations import ServerConnectionPoliciesOperations +from ._database_threat_detection_policies_operations import DatabaseThreatDetectionPoliciesOperations +from ._data_masking_policies_operations import DataMaskingPoliciesOperations +from ._data_masking_rules_operations import DataMaskingRulesOperations +from ._firewall_rules_operations import FirewallRulesOperations +from ._geo_backup_policies_operations import GeoBackupPoliciesOperations +from ._databases_operations import DatabasesOperations +from ._elastic_pools_operations import ElasticPoolsOperations +from ._recommended_elastic_pools_operations import RecommendedElasticPoolsOperations +from ._replication_links_operations import ReplicationLinksOperations +from ._server_azure_ad_administrators_operations import ServerAzureADAdministratorsOperations +from ._server_communication_links_operations import ServerCommunicationLinksOperations +from ._service_objectives_operations import ServiceObjectivesOperations +from ._elastic_pool_activities_operations import ElasticPoolActivitiesOperations +from ._elastic_pool_database_activities_operations import ElasticPoolDatabaseActivitiesOperations +from ._service_tier_advisors_operations import ServiceTierAdvisorsOperations +from ._transparent_data_encryptions_operations import TransparentDataEncryptionsOperations +from ._transparent_data_encryption_activities_operations import TransparentDataEncryptionActivitiesOperations +from ._server_usages_operations import ServerUsagesOperations +from ._database_usages_operations import DatabaseUsagesOperations +from ._database_automatic_tuning_operations import DatabaseAutomaticTuningOperations +from ._encryption_protectors_operations import EncryptionProtectorsOperations +from ._failover_groups_operations import FailoverGroupsOperations +from ._operations import Operations +from ._server_keys_operations import ServerKeysOperations +from ._sync_agents_operations import SyncAgentsOperations +from ._sync_groups_operations import SyncGroupsOperations +from ._sync_members_operations import SyncMembersOperations +from ._subscription_usages_operations import SubscriptionUsagesOperations +from ._virtual_clusters_operations import VirtualClustersOperations +from ._virtual_network_rules_operations import VirtualNetworkRulesOperations +from ._extended_database_blob_auditing_policies_operations import ExtendedDatabaseBlobAuditingPoliciesOperations +from ._extended_server_blob_auditing_policies_operations import ExtendedServerBlobAuditingPoliciesOperations +from ._server_blob_auditing_policies_operations import ServerBlobAuditingPoliciesOperations +from ._database_blob_auditing_policies_operations import DatabaseBlobAuditingPoliciesOperations +from ._database_vulnerability_assessment_rule_baselines_operations import DatabaseVulnerabilityAssessmentRuleBaselinesOperations +from ._database_vulnerability_assessments_operations import DatabaseVulnerabilityAssessmentsOperations +from ._job_agents_operations import JobAgentsOperations +from ._job_credentials_operations import JobCredentialsOperations +from ._job_executions_operations import JobExecutionsOperations +from ._jobs_operations import JobsOperations +from ._job_step_executions_operations import JobStepExecutionsOperations +from ._job_steps_operations import JobStepsOperations +from ._job_target_executions_operations import JobTargetExecutionsOperations +from ._job_target_groups_operations import JobTargetGroupsOperations +from ._job_versions_operations import JobVersionsOperations +from ._long_term_retention_backups_operations import LongTermRetentionBackupsOperations +from ._backup_long_term_retention_policies_operations import BackupLongTermRetentionPoliciesOperations +from ._managed_backup_short_term_retention_policies_operations import ManagedBackupShortTermRetentionPoliciesOperations +from ._managed_databases_operations import ManagedDatabasesOperations +from ._managed_restorable_dropped_database_backup_short_term_retention_policies_operations import ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations +from ._server_automatic_tuning_operations import ServerAutomaticTuningOperations +from ._server_dns_aliases_operations import ServerDnsAliasesOperations +from ._server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations +from ._restorable_dropped_managed_databases_operations import RestorableDroppedManagedDatabasesOperations +from ._restore_points_operations import RestorePointsOperations +from ._managed_database_security_alert_policies_operations import ManagedDatabaseSecurityAlertPoliciesOperations +from ._managed_server_security_alert_policies_operations import ManagedServerSecurityAlertPoliciesOperations +from ._sensitivity_labels_operations import SensitivityLabelsOperations +from ._database_operations import DatabaseOperations +from ._elastic_pool_operations import ElasticPoolOperations +from ._capabilities_operations import CapabilitiesOperations +from ._database_vulnerability_assessment_scans_operations import DatabaseVulnerabilityAssessmentScansOperations +from ._managed_database_vulnerability_assessment_rule_baselines_operations import ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations +from ._managed_database_vulnerability_assessment_scans_operations import ManagedDatabaseVulnerabilityAssessmentScansOperations +from ._managed_database_vulnerability_assessments_operations import ManagedDatabaseVulnerabilityAssessmentsOperations +from ._instance_failover_groups_operations import InstanceFailoverGroupsOperations +from ._backup_short_term_retention_policies_operations import BackupShortTermRetentionPoliciesOperations +from ._tde_certificates_operations import TdeCertificatesOperations +from ._managed_instance_tde_certificates_operations import ManagedInstanceTdeCertificatesOperations +from ._managed_instance_keys_operations import ManagedInstanceKeysOperations +from ._managed_instance_encryption_protectors_operations import ManagedInstanceEncryptionProtectorsOperations +from ._recoverable_managed_databases_operations import RecoverableManagedDatabasesOperations +from ._managed_instance_vulnerability_assessments_operations import ManagedInstanceVulnerabilityAssessmentsOperations +from ._server_vulnerability_assessments_operations import ServerVulnerabilityAssessmentsOperations +from ._managed_database_sensitivity_labels_operations import ManagedDatabaseSensitivityLabelsOperations +from ._instance_pools_operations import InstancePoolsOperations +from ._usages_operations import UsagesOperations +from ._managed_instances_operations import ManagedInstancesOperations __all__ = [ 'RecoverableDatabasesOperations', @@ -117,7 +119,6 @@ 'DatabaseAutomaticTuningOperations', 'EncryptionProtectorsOperations', 'FailoverGroupsOperations', - 'ManagedInstancesOperations', 'Operations', 'ServerKeysOperations', 'SyncAgentsOperations', @@ -171,4 +172,7 @@ 'ManagedInstanceVulnerabilityAssessmentsOperations', 'ServerVulnerabilityAssessmentsOperations', 'ManagedDatabaseSensitivityLabelsOperations', + 'InstancePoolsOperations', + 'UsagesOperations', + 'ManagedInstancesOperations', ] diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_long_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_long_term_retention_policies_operations.py similarity index 99% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_long_term_retention_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_long_term_retention_policies_operations.py index c42ba1ab812b..532ce23b9aef 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_long_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_long_term_retention_policies_operations.py @@ -21,6 +21,8 @@ class BackupLongTermRetentionPoliciesOperations(object): """BackupLongTermRetentionPoliciesOperations 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. @@ -99,7 +101,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BackupLongTermRetentionPolicy', response) @@ -275,7 +276,6 @@ def list_by_database( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BackupLongTermRetentionPolicy', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_short_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_short_term_retention_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_short_term_retention_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_short_term_retention_policies_operations.py index c7957810c281..1fab2366624f 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_short_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_short_term_retention_policies_operations.py @@ -21,6 +21,8 @@ class BackupShortTermRetentionPoliciesOperations(object): """BackupShortTermRetentionPoliciesOperations 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. @@ -99,7 +101,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BackupShortTermRetentionPolicy', response) @@ -354,8 +355,7 @@ def list_by_database( ~azure.mgmt.sql.models.BackupShortTermRetentionPolicyPaged[~azure.mgmt.sql.models.BackupShortTermRetentionPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -387,6 +387,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -397,12 +402,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.BackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.BackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.BackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/capabilities_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_capabilities_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/capabilities_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_capabilities_operations.py index a873a3a87f92..755f2dd6c70f 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/capabilities_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_capabilities_operations.py @@ -19,6 +19,8 @@ class CapabilitiesOperations(object): """CapabilitiesOperations 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. @@ -93,7 +95,6 @@ def list_by_location( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LocationCapabilities', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_policies_operations.py index 2d1099c8be0d..3d51678f036d 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_policies_operations.py @@ -19,6 +19,8 @@ class DataMaskingPoliciesOperations(object): """DataMaskingPoliciesOperations 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. @@ -111,7 +113,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DataMaskingPolicy', response) @@ -179,7 +180,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DataMaskingPolicy', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_rules_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_rules_operations.py similarity index 96% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_rules_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_rules_operations.py index c5fd4c63ab46..4430f4d7bc9c 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_rules_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_rules_operations.py @@ -19,6 +19,8 @@ class DataMaskingRulesOperations(object): """DataMaskingRulesOperations 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. @@ -106,7 +108,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DataMaskingRule', response) if response.status_code == 201: @@ -141,8 +142,7 @@ def list_by_database( ~azure.mgmt.sql.models.DataMaskingRulePaged[~azure.mgmt.sql.models.DataMaskingRule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -175,6 +175,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -185,12 +190,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DataMaskingRulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DataMaskingRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DataMaskingRulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_automatic_tuning_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_automatic_tuning_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_automatic_tuning_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_automatic_tuning_operations.py index 7a94b97b9546..30b493d10191 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_automatic_tuning_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_automatic_tuning_operations.py @@ -19,6 +19,8 @@ class DatabaseAutomaticTuningOperations(object): """DatabaseAutomaticTuningOperations 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. @@ -93,7 +95,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseAutomaticTuning', response) @@ -172,7 +173,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseAutomaticTuning', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_blob_auditing_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_blob_auditing_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_blob_auditing_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_blob_auditing_policies_operations.py index a0c09cfd8f09..873e1dc55d36 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_blob_auditing_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_blob_auditing_policies_operations.py @@ -19,6 +19,8 @@ class DatabaseBlobAuditingPoliciesOperations(object): """DatabaseBlobAuditingPoliciesOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseBlobAuditingPolicy', response) @@ -170,7 +171,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseBlobAuditingPolicy', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_operations.py index 8d482411f199..9fdb5969fcff 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_operations.py @@ -19,6 +19,8 @@ class DatabaseOperations(object): """DatabaseOperations 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. @@ -120,8 +122,7 @@ def list_by_database( ~azure.mgmt.sql.models.DatabaseOperationPaged[~azure.mgmt.sql.models.DatabaseOperation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -153,6 +154,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -163,12 +169,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabaseOperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabaseOperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabaseOperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_threat_detection_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_threat_detection_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_threat_detection_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_threat_detection_policies_operations.py index 38501854c428..888228ba55d3 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_threat_detection_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_threat_detection_policies_operations.py @@ -19,6 +19,8 @@ class DatabaseThreatDetectionPoliciesOperations(object): """DatabaseThreatDetectionPoliciesOperations 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. @@ -97,7 +99,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseSecurityAlertPolicy', response) @@ -172,7 +173,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseSecurityAlertPolicy', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_usages_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_usages_operations.py similarity index 92% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_usages_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_usages_operations.py index 543a8ba6f509..8cf8df83a5a8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_usages_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_usages_operations.py @@ -19,6 +19,8 @@ class DatabaseUsagesOperations(object): """DatabaseUsagesOperations 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. @@ -59,8 +61,7 @@ def list_by_database( ~azure.mgmt.sql.models.DatabaseUsagePaged[~azure.mgmt.sql.models.DatabaseUsage] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -92,6 +93,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -102,12 +108,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabaseUsagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabaseUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabaseUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/usages'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_rule_baselines_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_rule_baselines_operations.py similarity index 99% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_rule_baselines_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_rule_baselines_operations.py index 9dba003a5ff2..8e04b1fbc4a1 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_rule_baselines_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_rule_baselines_operations.py @@ -19,6 +19,8 @@ class DatabaseVulnerabilityAssessmentRuleBaselinesOperations(object): """DatabaseVulnerabilityAssessmentRuleBaselinesOperations 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. @@ -109,7 +111,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentRuleBaseline', response) @@ -199,7 +200,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentRuleBaseline', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_scans_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_scans_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_scans_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_scans_operations.py index 97725d782e9e..06efd2638038 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_scans_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_scans_operations.py @@ -21,6 +21,8 @@ class DatabaseVulnerabilityAssessmentScansOperations(object): """DatabaseVulnerabilityAssessmentScansOperations 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. @@ -64,8 +66,7 @@ def list_by_database( ~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecordPaged[~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecord] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -98,6 +99,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -108,12 +114,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans'} @@ -180,7 +184,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VulnerabilityAssessmentScanRecord', response) @@ -345,7 +348,6 @@ def export( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentScansExport', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessments_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessments_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessments_operations.py index 5fa6a1ef7ade..4fbf4f24a995 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessments_operations.py @@ -19,6 +19,8 @@ class DatabaseVulnerabilityAssessmentsOperations(object): """DatabaseVulnerabilityAssessmentsOperations 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. @@ -98,7 +100,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessment', response) @@ -175,7 +176,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessment', response) if response.status_code == 201: @@ -271,8 +271,7 @@ def list_by_database( ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentPaged[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessment] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -304,6 +303,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -314,12 +318,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_databases_operations.py similarity index 92% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_databases_operations.py index 3b4e01e8a397..e3b5174323da 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_databases_operations.py @@ -21,6 +21,8 @@ class DatabasesOperations(object): """DatabasesOperations 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. @@ -390,8 +392,7 @@ def list_metrics( """ api_version = "2014-04-01" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metrics.metadata['url'] @@ -424,6 +425,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -434,12 +440,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metrics'} @@ -468,8 +472,7 @@ def list_metric_definitions( """ api_version = "2014-04-01" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metric_definitions.metadata['url'] @@ -501,6 +504,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -511,12 +519,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metricDefinitions'} @@ -630,8 +636,7 @@ def list_by_server( """ api_version = "2017-10-01-preview" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -662,6 +667,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -672,12 +682,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases'} @@ -740,7 +748,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Database', response) @@ -1080,8 +1087,7 @@ def list_by_elastic_pool( """ api_version = "2017-10-01-preview" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_elastic_pool.metadata['url'] @@ -1113,6 +1119,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -1123,12 +1134,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_elastic_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases'} @@ -1402,3 +1411,90 @@ def rename( client_raw_response = ClientRawResponse(None, response) return client_raw_response rename.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/move'} + + + def _failover_initial( + self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): + api_version = "2018-06-01-preview" + + # Construct URL + url = self.failover.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def failover( + self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Failovers a database. + + :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 server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database to failover. + :type database_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._failover_initial( + resource_group_name=resource_group_name, + server_name=server_name, + database_name=database_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) + failover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/failover'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_activities_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_activities_operations.py similarity index 92% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_activities_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_activities_operations.py index a2d2dc49c203..3fb2cfc9bb14 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_activities_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_activities_operations.py @@ -19,6 +19,8 @@ class ElasticPoolActivitiesOperations(object): """ElasticPoolActivitiesOperations 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. @@ -60,8 +62,7 @@ def list_by_elastic_pool( ~azure.mgmt.sql.models.ElasticPoolActivityPaged[~azure.mgmt.sql.models.ElasticPoolActivity] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_elastic_pool.metadata['url'] @@ -93,6 +94,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -103,12 +109,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ElasticPoolActivityPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ElasticPoolActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ElasticPoolActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_elastic_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolActivity'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_database_activities_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_database_activities_operations.py similarity index 92% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_database_activities_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_database_activities_operations.py index 5ed1492b9615..6280285c5e59 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_database_activities_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_database_activities_operations.py @@ -19,6 +19,8 @@ class ElasticPoolDatabaseActivitiesOperations(object): """ElasticPoolDatabaseActivitiesOperations 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. @@ -59,8 +61,7 @@ def list_by_elastic_pool( ~azure.mgmt.sql.models.ElasticPoolDatabaseActivityPaged[~azure.mgmt.sql.models.ElasticPoolDatabaseActivity] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_elastic_pool.metadata['url'] @@ -92,6 +93,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -102,12 +108,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ElasticPoolDatabaseActivityPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ElasticPoolDatabaseActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ElasticPoolDatabaseActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_elastic_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolDatabaseActivity'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_operations.py index eb71face0db1..26dd59fe4abf 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_operations.py @@ -19,6 +19,8 @@ class ElasticPoolOperations(object): """ElasticPoolOperations 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. @@ -120,8 +122,7 @@ def list_by_elastic_pool( ~azure.mgmt.sql.models.ElasticPoolOperationPaged[~azure.mgmt.sql.models.ElasticPoolOperation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_elastic_pool.metadata['url'] @@ -153,6 +154,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -163,12 +169,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ElasticPoolOperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ElasticPoolOperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ElasticPoolOperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_elastic_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/operations'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pools_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pools_operations.py similarity index 85% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pools_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pools_operations.py index e7fba924b0c6..8f780c6995e1 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pools_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pools_operations.py @@ -21,6 +21,8 @@ class ElasticPoolsOperations(object): """ElasticPoolsOperations 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. @@ -64,8 +66,7 @@ def list_metrics( """ api_version = "2014-04-01" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metrics.metadata['url'] @@ -98,6 +99,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -108,12 +114,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metrics'} @@ -142,8 +146,7 @@ def list_metric_definitions( """ api_version = "2014-04-01" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metric_definitions.metadata['url'] @@ -175,6 +178,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -185,12 +193,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metricDefinitions'} @@ -219,8 +225,7 @@ def list_by_server( """ api_version = "2017-10-01-preview" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -253,6 +258,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -263,12 +273,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ElasticPoolPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ElasticPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ElasticPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools'} @@ -331,7 +339,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ElasticPool', response) @@ -646,3 +653,90 @@ def get_long_running_output(response): 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.Sql/servers/{serverName}/elasticPools/{elasticPoolName}'} + + + def _failover_initial( + self, resource_group_name, server_name, elastic_pool_name, custom_headers=None, raw=False, **operation_config): + api_version = "2018-06-01-preview" + + # Construct URL + url = self.failover.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'elasticPoolName': self._serialize.url("elastic_pool_name", elastic_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def failover( + self, resource_group_name, server_name, elastic_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Failovers an elastic pool. + + :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 server_name: The name of the server. + :type server_name: str + :param elastic_pool_name: The name of the elastic pool to failover. + :type elastic_pool_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._failover_initial( + resource_group_name=resource_group_name, + server_name=server_name, + elastic_pool_name=elastic_pool_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) + failover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/failover'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/encryption_protectors_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_encryption_protectors_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/encryption_protectors_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_encryption_protectors_operations.py index d19233971f4c..4ee94af811f2 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/encryption_protectors_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_encryption_protectors_operations.py @@ -21,6 +21,8 @@ class EncryptionProtectorsOperations(object): """EncryptionProtectorsOperations 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. @@ -61,8 +63,7 @@ def list_by_server( ~azure.mgmt.sql.models.EncryptionProtectorPaged[~azure.mgmt.sql.models.EncryptionProtector] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -93,6 +94,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -103,12 +109,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.EncryptionProtectorPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.EncryptionProtectorPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.EncryptionProtectorPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector'} @@ -167,7 +171,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('EncryptionProtector', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_database_blob_auditing_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_database_blob_auditing_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_database_blob_auditing_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_database_blob_auditing_policies_operations.py index 38bdfb2a0875..ea9c9d8d7aaf 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_database_blob_auditing_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_database_blob_auditing_policies_operations.py @@ -19,6 +19,8 @@ class ExtendedDatabaseBlobAuditingPoliciesOperations(object): """ExtendedDatabaseBlobAuditingPoliciesOperations 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. @@ -97,7 +99,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ExtendedDatabaseBlobAuditingPolicy', response) @@ -173,7 +174,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ExtendedDatabaseBlobAuditingPolicy', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_server_blob_auditing_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_server_blob_auditing_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_server_blob_auditing_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_server_blob_auditing_policies_operations.py index 64524eb42a17..dff8fac62031 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_server_blob_auditing_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_server_blob_auditing_policies_operations.py @@ -21,6 +21,8 @@ class ExtendedServerBlobAuditingPoliciesOperations(object): """ExtendedServerBlobAuditingPoliciesOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ExtendedServerBlobAuditingPolicy', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/failover_groups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_failover_groups_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/failover_groups_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_failover_groups_operations.py index fb779255c2a8..797c0d27ab17 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/failover_groups_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_failover_groups_operations.py @@ -21,6 +21,8 @@ class FailoverGroupsOperations(object): """FailoverGroupsOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('FailoverGroup', response) @@ -430,8 +431,7 @@ def list_by_server( ~azure.mgmt.sql.models.FailoverGroupPaged[~azure.mgmt.sql.models.FailoverGroup] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -462,6 +462,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -472,12 +477,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.FailoverGroupPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.FailoverGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.FailoverGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/firewall_rules_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_firewall_rules_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/firewall_rules_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_firewall_rules_operations.py index 7f62a3fa0811..e211cff58cbb 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/firewall_rules_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_firewall_rules_operations.py @@ -19,6 +19,8 @@ class FirewallRulesOperations(object): """FirewallRulesOperations 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. @@ -107,7 +109,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('FirewallRule', response) if response.status_code == 201: @@ -234,7 +235,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('FirewallRule', response) @@ -265,8 +265,7 @@ def list_by_server( ~azure.mgmt.sql.models.FirewallRulePaged[~azure.mgmt.sql.models.FirewallRule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -297,6 +296,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -307,12 +311,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.FirewallRulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.FirewallRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.FirewallRulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/geo_backup_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_geo_backup_policies_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/geo_backup_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_geo_backup_policies_operations.py index bd81aeca5fa6..e3b1cc9cd7ec 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/geo_backup_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_geo_backup_policies_operations.py @@ -19,6 +19,8 @@ class GeoBackupPoliciesOperations(object): """GeoBackupPoliciesOperations 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. @@ -105,7 +107,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('GeoBackupPolicy', response) if response.status_code == 201: @@ -175,7 +176,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('GeoBackupPolicy', response) @@ -208,8 +208,7 @@ def list_by_database( ~azure.mgmt.sql.models.GeoBackupPolicyPaged[~azure.mgmt.sql.models.GeoBackupPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -241,6 +240,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -251,12 +255,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.GeoBackupPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.GeoBackupPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.GeoBackupPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/instance_failover_groups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_failover_groups_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/instance_failover_groups_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_failover_groups_operations.py index 795d169692ab..33960af71031 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/instance_failover_groups_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_failover_groups_operations.py @@ -21,6 +21,8 @@ class InstanceFailoverGroupsOperations(object): """InstanceFailoverGroupsOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('InstanceFailoverGroup', response) @@ -323,8 +324,7 @@ def list_by_location( ~azure.mgmt.sql.models.InstanceFailoverGroupPaged[~azure.mgmt.sql.models.InstanceFailoverGroup] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_location.metadata['url'] @@ -355,6 +355,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -365,12 +370,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.InstanceFailoverGroupPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.InstanceFailoverGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.InstanceFailoverGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_pools_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_pools_operations.py new file mode 100644 index 000000000000..43721ed26b1b --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_pools_operations.py @@ -0,0 +1,534 @@ +# 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 InstancePoolsOperations(object): + """InstancePoolsOperations 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: The API version to use for the request. Constant value: "2018-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01-preview" + + self.config = config + + def get( + self, resource_group_name, instance_pool_name, custom_headers=None, raw=False, **operation_config): + """Gets an instance pool. + + :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 instance_pool_name: The name of the instance pool to be + retrieved. + :type instance_pool_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: InstancePool or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.InstancePool or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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('InstancePool', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}'} + + + def _create_or_update_initial( + self, resource_group_name, instance_pool_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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(parameters, 'InstancePool') + + # 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, 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('InstancePool', response) + if response.status_code == 201: + deserialized = self._deserialize('InstancePool', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, instance_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates an instance pool. + + :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 instance_pool_name: The name of the instance pool to be created + or updated. + :type instance_pool_name: str + :param parameters: The requested instance pool resource state. + :type parameters: ~azure.mgmt.sql.models.InstancePool + :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 InstancePool or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.InstancePool] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.InstancePool]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + instance_pool_name=instance_pool_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('InstancePool', 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.Sql/instancePools/{instancePoolName}'} + + + def _delete_initial( + self, resource_group_name, instance_pool_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, instance_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an instance pool. + + :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 instance_pool_name: The name of the instance pool to be deleted + :type instance_pool_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, + instance_pool_name=instance_pool_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.Sql/instancePools/{instancePoolName}'} + + + def _update_initial( + self, resource_group_name, instance_pool_name, tags=None, custom_headers=None, raw=False, **operation_config): + parameters = models.InstancePoolUpdate(tags=tags) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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(parameters, 'InstancePoolUpdate') + + # 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('InstancePool', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, instance_pool_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates an instance pool. + + :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 instance_pool_name: The name of the instance pool to be + updated. + :type instance_pool_name: str + :param tags: Resource tags. + :type tags: dict[str, 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 InstancePool or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.InstancePool] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.InstancePool]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + instance_pool_name=instance_pool_name, + tags=tags, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('InstancePool', 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.Sql/instancePools/{instancePoolName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of instance pools in the resource group. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :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: An iterator like instance of InstancePool + :rtype: + ~azure.mgmt.sql.models.InstancePoolPaged[~azure.mgmt.sql.models.InstancePool] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.InstancePoolPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of all instance pools in the subscription. + + :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: An iterator like instance of InstancePool + :rtype: + ~azure.mgmt.sql.models.InstancePoolPaged[~azure.mgmt.sql.models.InstancePool] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.InstancePoolPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/instancePools'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_agents_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_agents_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_agents_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_agents_operations.py index eaeb4480cab8..a6641946abaf 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_agents_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_agents_operations.py @@ -21,6 +21,8 @@ class JobAgentsOperations(object): """JobAgentsOperations 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. @@ -59,8 +61,7 @@ def list_by_server( ~azure.mgmt.sql.models.JobAgentPaged[~azure.mgmt.sql.models.JobAgent] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -91,6 +92,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -101,12 +107,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobAgentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobAgentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobAgentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents'} @@ -167,7 +171,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobAgent', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_credentials_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_credentials_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_credentials_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_credentials_operations.py index 309d5212b81e..9c469c605600 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_credentials_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_credentials_operations.py @@ -19,6 +19,8 @@ class JobCredentialsOperations(object): """JobCredentialsOperations 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. @@ -59,8 +61,7 @@ def list_by_agent( ~azure.mgmt.sql.models.JobCredentialPaged[~azure.mgmt.sql.models.JobCredential] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_agent.metadata['url'] @@ -92,6 +93,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -102,12 +108,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobCredentialPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobCredentialPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobCredentialPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials'} @@ -171,7 +175,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobCredential', response) @@ -251,7 +254,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobCredential', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_executions_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_executions_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_executions_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_executions_operations.py index f874991f8510..71885bdb661e 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_executions_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_executions_operations.py @@ -21,6 +21,8 @@ class JobExecutionsOperations(object): """JobExecutionsOperations 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. @@ -80,8 +82,7 @@ def list_by_agent( ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_agent.metadata['url'] @@ -127,6 +128,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -137,12 +143,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/executions'} @@ -357,8 +361,7 @@ def list_by_job( ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_job.metadata['url'] @@ -405,6 +408,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -415,12 +423,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions'} @@ -487,7 +493,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobExecution', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_step_executions_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_step_executions_operations.py similarity index 96% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_step_executions_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_step_executions_operations.py index 92c6442fc7e5..8410a94138e8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_step_executions_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_step_executions_operations.py @@ -19,6 +19,8 @@ class JobStepExecutionsOperations(object): """JobStepExecutionsOperations 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. @@ -82,8 +84,7 @@ def list_by_job_execution( ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_job_execution.metadata['url'] @@ -131,6 +132,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -141,12 +147,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_job_execution.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps'} @@ -216,7 +220,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobExecution', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_steps_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_steps_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_steps_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_steps_operations.py index a37bfc3f4474..e7383e961171 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_steps_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_steps_operations.py @@ -19,6 +19,8 @@ class JobStepsOperations(object): """JobStepsOperations 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. @@ -63,8 +65,7 @@ def list_by_version( ~azure.mgmt.sql.models.JobStepPaged[~azure.mgmt.sql.models.JobStep] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_version.metadata['url'] @@ -98,6 +99,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -108,12 +114,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobStepPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobStepPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobStepPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps'} @@ -183,7 +187,6 @@ def get_by_version( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobStep', response) @@ -218,8 +221,7 @@ def list_by_job( ~azure.mgmt.sql.models.JobStepPaged[~azure.mgmt.sql.models.JobStep] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_job.metadata['url'] @@ -252,6 +254,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -262,12 +269,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobStepPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobStepPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobStepPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps'} @@ -334,7 +339,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobStep', response) @@ -414,7 +418,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobStep', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_executions_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_executions_operations.py similarity index 96% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_executions_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_executions_operations.py index 6c664709c063..a6722c0278bc 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_executions_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_executions_operations.py @@ -19,6 +19,8 @@ class JobTargetExecutionsOperations(object): """JobTargetExecutionsOperations 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. @@ -82,8 +84,7 @@ def list_by_job_execution( ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_job_execution.metadata['url'] @@ -131,6 +132,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -141,12 +147,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_job_execution.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/targets'} @@ -198,8 +202,7 @@ def list_by_step( ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_step.metadata['url'] @@ -248,6 +251,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -258,12 +266,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_step.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets'} @@ -336,7 +342,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobExecution', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_groups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_groups_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_groups_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_groups_operations.py index 6a8bf6eed349..a3769c0e2bcb 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_groups_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_groups_operations.py @@ -19,6 +19,8 @@ class JobTargetGroupsOperations(object): """JobTargetGroupsOperations 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. @@ -59,8 +61,7 @@ def list_by_agent( ~azure.mgmt.sql.models.JobTargetGroupPaged[~azure.mgmt.sql.models.JobTargetGroup] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_agent.metadata['url'] @@ -92,6 +93,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -102,12 +108,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobTargetGroupPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobTargetGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobTargetGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups'} @@ -171,7 +175,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobTargetGroup', response) @@ -249,7 +252,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobTargetGroup', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_versions_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_versions_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_versions_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_versions_operations.py index d03635534ff4..da92973e0695 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_versions_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_versions_operations.py @@ -19,6 +19,8 @@ class JobVersionsOperations(object): """JobVersionsOperations 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. @@ -61,8 +63,7 @@ def list_by_job( ~azure.mgmt.sql.models.JobVersionPaged[~azure.mgmt.sql.models.JobVersion] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_job.metadata['url'] @@ -95,6 +96,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -105,12 +111,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobVersionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobVersionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobVersionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions'} @@ -177,7 +181,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobVersion', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/jobs_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_jobs_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/jobs_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_jobs_operations.py index 2545fc1514e5..f0830d089829 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/jobs_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_jobs_operations.py @@ -19,6 +19,8 @@ class JobsOperations(object): """JobsOperations 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. @@ -58,8 +60,7 @@ def list_by_agent( :rtype: ~azure.mgmt.sql.models.JobPaged[~azure.mgmt.sql.models.Job] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_agent.metadata['url'] @@ -91,6 +92,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -101,12 +107,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs'} @@ -170,7 +174,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Job', response) @@ -250,7 +253,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Job', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_backups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_backups_operations.py new file mode 100644 index 000000000000..55a0bbdd777a --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_backups_operations.py @@ -0,0 +1,880 @@ +# 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 LongTermRetentionBackupsOperations(object): + """LongTermRetentionBackupsOperations 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: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-01-preview" + + self.config = config + + def get_by_resource_group( + self, resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): + """Gets a long term retention backup. + + :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 location_name: The location of the database. + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param backup_name: The backup name. + :type backup_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: LongTermRetentionBackup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.LongTermRetentionBackup or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'backupName': self._serialize.url("backup_name", backup_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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('LongTermRetentionBackup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} + + + def _delete_by_resource_group_initial( + self, resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'backupName': self._serialize.url("backup_name", backup_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.delete(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete_by_resource_group( + self, resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a long term retention backup. + + :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 location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param backup_name: The backup name. + :type backup_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_by_resource_group_initial( + resource_group_name=resource_group_name, + location_name=location_name, + long_term_retention_server_name=long_term_retention_server_name, + long_term_retention_database_name=long_term_retention_database_name, + backup_name=backup_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_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} + + def list_by_resource_group_database( + self, resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists all long term retention backups for a database. + + :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 location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group_database.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups'} + + def list_by_resource_group_location( + self, resource_group_name, location_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists the long term retention backups for a given location. + + :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 location_name: The location of the database + :type location_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group_location.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group_location.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups'} + + def list_by_resource_group_server( + self, resource_group_name, location_name, long_term_retention_server_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists the long term retention backups for a given 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 location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group_server.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups'} + + def get( + self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): + """Gets a long term retention backup. + + :param location_name: The location of the database. + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param backup_name: The backup name. + :type backup_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: LongTermRetentionBackup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.LongTermRetentionBackup or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'backupName': self._serialize.url("backup_name", backup_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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('LongTermRetentionBackup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} + + + def _delete_initial( + self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'backupName': self._serialize.url("backup_name", backup_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.delete(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a long term retention backup. + + :param location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param backup_name: The backup name. + :type backup_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( + location_name=location_name, + long_term_retention_server_name=long_term_retention_server_name, + long_term_retention_database_name=long_term_retention_database_name, + backup_name=backup_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}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} + + def list_by_database( + self, location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists all long term retention backups for a database. + + :param location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_database.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups'} + + def list_by_location( + self, location_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists the long term retention backups for a given location. + + :param location_name: The location of the database + :type location_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_location.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups'} + + def list_by_server( + self, location_name, long_term_retention_server_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists the long term retention backups for a given server. + + :param location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_backup_short_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_backup_short_term_retention_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_backup_short_term_retention_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_backup_short_term_retention_policies_operations.py index 8f50f44b5354..475f8b2228e1 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_backup_short_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_backup_short_term_retention_policies_operations.py @@ -21,6 +21,8 @@ class ManagedBackupShortTermRetentionPoliciesOperations(object): """ManagedBackupShortTermRetentionPoliciesOperations 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. @@ -99,7 +101,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedBackupShortTermRetentionPolicy', response) @@ -355,8 +356,7 @@ def list_by_database( ~azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicyPaged[~azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -388,6 +388,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -398,12 +403,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_security_alert_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_security_alert_policies_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_security_alert_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_security_alert_policies_operations.py index 87ba42c8193a..c1f7467d795c 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_security_alert_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_security_alert_policies_operations.py @@ -19,6 +19,8 @@ class ManagedDatabaseSecurityAlertPoliciesOperations(object): """ManagedDatabaseSecurityAlertPoliciesOperations 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. @@ -98,7 +100,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedDatabaseSecurityAlertPolicy', response) @@ -175,7 +176,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedDatabaseSecurityAlertPolicy', response) if response.status_code == 201: @@ -212,8 +212,7 @@ def list_by_database( ~azure.mgmt.sql.models.ManagedDatabaseSecurityAlertPolicyPaged[~azure.mgmt.sql.models.ManagedDatabaseSecurityAlertPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -245,6 +244,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -255,12 +259,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedDatabaseSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedDatabaseSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedDatabaseSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_sensitivity_labels_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_sensitivity_labels_operations.py similarity index 70% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_sensitivity_labels_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_sensitivity_labels_operations.py index 1b03564854f8..5ff97dd77a49 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_sensitivity_labels_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_sensitivity_labels_operations.py @@ -19,12 +19,13 @@ class ManagedDatabaseSensitivityLabelsOperations(object): """ManagedDatabaseSensitivityLabelsOperations 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: The API version to use for the request. Constant value: "2018-06-01-preview". - :ivar sensitivity_label_source: The source of the sensitivity label. Constant value: "current". """ models = models @@ -35,7 +36,6 @@ def __init__(self, client, config, serializer, deserializer): self._serialize = serializer self._deserialize = deserializer self.api_version = "2018-06-01-preview" - self.sensitivity_label_source = "current" self.config = config @@ -109,7 +109,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SensitivityLabel', response) @@ -150,6 +149,8 @@ def create_or_update( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + sensitivity_label_source = "current" + # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { @@ -159,7 +160,7 @@ def create_or_update( 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), 'tableName': self._serialize.url("table_name", table_name, 'str'), 'columnName': self._serialize.url("column_name", column_name, 'str'), - 'sensitivityLabelSource': self._serialize.url("self.sensitivity_label_source", self.sensitivity_label_source, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -192,7 +193,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SensitivityLabel', response) if response.status_code == 201: @@ -232,6 +232,8 @@ def delete( :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + sensitivity_label_source = "current" + # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -241,7 +243,7 @@ def delete( 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), 'tableName': self._serialize.url("table_name", table_name, 'str'), 'columnName': self._serialize.url("column_name", column_name, 'str'), - 'sensitivityLabelSource': self._serialize.url("self.sensitivity_label_source", self.sensitivity_label_source, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -273,6 +275,147 @@ def delete( return client_raw_response delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}'} + def disable_recommendation( + self, resource_group_name, managed_instance_name, database_name, schema_name, table_name, column_name, custom_headers=None, raw=False, **operation_config): + """Disables sensitivity recommendations on a given column. + + :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 managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param database_name: The name of the database. + :type database_name: str + :param schema_name: The name of the schema. + :type schema_name: str + :param table_name: The name of the table. + :type table_name: str + :param column_name: The name of the column. + :type column_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` + """ + sensitivity_label_source = "recommended" + + # Construct URL + url = self.disable_recommendation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str'), + 'columnName': self._serialize.url("column_name", column_name, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_recommendation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable'} + + def enable_recommendation( + self, resource_group_name, managed_instance_name, database_name, schema_name, table_name, column_name, custom_headers=None, raw=False, **operation_config): + """Enables sensitivity recommendations on a given column (recommendations + are enabled by default on all columns). + + :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 managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param database_name: The name of the database. + :type database_name: str + :param schema_name: The name of the schema. + :type schema_name: str + :param table_name: The name of the table. + :type table_name: str + :param column_name: The name of the column. + :type column_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` + """ + sensitivity_label_source = "recommended" + + # Construct URL + url = self.enable_recommendation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str'), + 'columnName': self._serialize.url("column_name", column_name, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + enable_recommendation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable'} + def list_current_by_database( self, resource_group_name, managed_instance_name, database_name, filter=None, custom_headers=None, raw=False, **operation_config): """Gets the sensitivity labels of a given database. @@ -298,8 +441,7 @@ def list_current_by_database( ~azure.mgmt.sql.models.SensitivityLabelPaged[~azure.mgmt.sql.models.SensitivityLabel] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_current_by_database.metadata['url'] @@ -333,6 +475,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -343,18 +490,16 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_current_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels'} def list_recommended_by_database( - self, resource_group_name, managed_instance_name, database_name, skip_token=None, filter=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, managed_instance_name, database_name, include_disabled_recommendations=None, skip_token=None, filter=None, custom_headers=None, raw=False, **operation_config): """Gets the sensitivity labels of a given database. :param resource_group_name: The name of the resource group that @@ -365,6 +510,9 @@ def list_recommended_by_database( :type managed_instance_name: str :param database_name: The name of the database. :type database_name: str + :param include_disabled_recommendations: Specifies whether to include + disabled recommendations or not. + :type include_disabled_recommendations: bool :param skip_token: :type skip_token: str :param filter: An OData filter expression that filters elements in the @@ -380,8 +528,7 @@ def list_recommended_by_database( ~azure.mgmt.sql.models.SensitivityLabelPaged[~azure.mgmt.sql.models.SensitivityLabel] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_recommended_by_database.metadata['url'] @@ -395,6 +542,8 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} + if include_disabled_recommendations is not None: + query_parameters['includeDisabledRecommendations'] = self._serialize.query("include_disabled_recommendations", include_disabled_recommendations, 'bool') if skip_token is not None: query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') if filter is not None: @@ -417,6 +566,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -427,12 +581,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_recommended_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/recommendedSensitivityLabels'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_rule_baselines_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_rule_baselines_operations.py similarity index 99% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_rule_baselines_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_rule_baselines_operations.py index bf5121b3707b..2c4017b6193b 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_rule_baselines_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_rule_baselines_operations.py @@ -19,6 +19,8 @@ class ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations(object): """ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations 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. @@ -109,7 +111,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentRuleBaseline', response) @@ -199,7 +200,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentRuleBaseline', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_scans_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_scans_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_scans_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_scans_operations.py index d45dc1beb3b7..e3a2b20ffdc4 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_scans_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_scans_operations.py @@ -21,6 +21,8 @@ class ManagedDatabaseVulnerabilityAssessmentScansOperations(object): """ManagedDatabaseVulnerabilityAssessmentScansOperations 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. @@ -64,8 +66,7 @@ def list_by_database( ~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecordPaged[~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecord] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -98,6 +99,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -108,12 +114,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans'} @@ -180,7 +184,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VulnerabilityAssessmentScanRecord', response) @@ -345,7 +348,6 @@ def export( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentScansExport', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessments_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessments_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessments_operations.py index 6c224244c8fc..c5d8e57cb81f 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessments_operations.py @@ -19,6 +19,8 @@ class ManagedDatabaseVulnerabilityAssessmentsOperations(object): """ManagedDatabaseVulnerabilityAssessmentsOperations 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. @@ -98,7 +100,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessment', response) @@ -175,7 +176,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessment', response) if response.status_code == 201: @@ -271,8 +271,7 @@ def list_by_database( ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentPaged[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessment] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -304,6 +303,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -314,12 +318,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_databases_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_databases_operations.py index e2b8d02ae534..9825283b3ab6 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_databases_operations.py @@ -21,6 +21,8 @@ class ManagedDatabasesOperations(object): """ManagedDatabasesOperations 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. @@ -149,8 +151,7 @@ def list_by_instance( ~azure.mgmt.sql.models.ManagedDatabasePaged[~azure.mgmt.sql.models.ManagedDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -181,6 +182,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -191,12 +197,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases'} @@ -257,7 +261,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedDatabase', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_encryption_protectors_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_encryption_protectors_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_encryption_protectors_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_encryption_protectors_operations.py index 61ab8baa5d32..5c35d34aac66 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_encryption_protectors_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_encryption_protectors_operations.py @@ -21,6 +21,8 @@ class ManagedInstanceEncryptionProtectorsOperations(object): """ManagedInstanceEncryptionProtectorsOperations 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. @@ -62,8 +64,7 @@ def list_by_instance( ~azure.mgmt.sql.models.ManagedInstanceEncryptionProtectorPaged[~azure.mgmt.sql.models.ManagedInstanceEncryptionProtector] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -94,6 +95,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -104,12 +110,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedInstanceEncryptionProtectorPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedInstanceEncryptionProtectorPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedInstanceEncryptionProtectorPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector'} @@ -169,7 +173,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedInstanceEncryptionProtector', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_keys_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_keys_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_keys_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_keys_operations.py index adb5c4bfa0f0..7d7876efc7bd 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_keys_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_keys_operations.py @@ -21,6 +21,8 @@ class ManagedInstanceKeysOperations(object): """ManagedInstanceKeysOperations 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. @@ -62,8 +64,7 @@ def list_by_instance( ~azure.mgmt.sql.models.ManagedInstanceKeyPaged[~azure.mgmt.sql.models.ManagedInstanceKey] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -96,6 +97,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -106,12 +112,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedInstanceKeyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedInstanceKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedInstanceKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys'} @@ -172,7 +176,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedInstanceKey', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_tde_certificates_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_tde_certificates_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_tde_certificates_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_tde_certificates_operations.py index be4ee1969fdd..c3f3e3fdc8e5 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_tde_certificates_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_tde_certificates_operations.py @@ -21,6 +21,8 @@ class ManagedInstanceTdeCertificatesOperations(object): """ManagedInstanceTdeCertificatesOperations 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. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_vulnerability_assessments_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_vulnerability_assessments_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_vulnerability_assessments_operations.py index 601294eb6777..04c452d37993 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_vulnerability_assessments_operations.py @@ -19,6 +19,8 @@ class ManagedInstanceVulnerabilityAssessmentsOperations(object): """ManagedInstanceVulnerabilityAssessmentsOperations 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. @@ -95,7 +97,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedInstanceVulnerabilityAssessment', response) @@ -169,7 +170,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedInstanceVulnerabilityAssessment', response) if response.status_code == 201: @@ -261,8 +261,7 @@ def list_by_instance( ~azure.mgmt.sql.models.ManagedInstanceVulnerabilityAssessmentPaged[~azure.mgmt.sql.models.ManagedInstanceVulnerabilityAssessment] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -293,6 +292,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -303,12 +307,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedInstanceVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedInstanceVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedInstanceVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instances_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instances_operations.py similarity index 84% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instances_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instances_operations.py index 1fee247c7c96..c1cb3d973264 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instances_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instances_operations.py @@ -21,11 +21,13 @@ class ManagedInstancesOperations(object): """ManagedInstancesOperations 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: The API version to use for the request. Constant value: "2015-05-01-preview". + :ivar api_version: The API version to use for the request. Constant value: "2018-06-01-preview". """ models = models @@ -35,14 +37,20 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-05-01-preview" + self.api_version = "2018-06-01-preview" self.config = config - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of all managed instances in the subscription. + def list_by_instance_pool( + self, resource_group_name, instance_pool_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of all managed instances in an instance pool. + :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 instance_pool_name: The instance pool name. + :type instance_pool_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 @@ -53,12 +61,13 @@ def list( ~azure.mgmt.sql.models.ManagedInstancePaged[~azure.mgmt.sql.models.ManagedInstance] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list_by_instance_pool.metadata['url'] path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -83,6 +92,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -93,15 +107,13 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances'} + list_by_instance_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/managedInstances'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -121,8 +133,7 @@ def list_by_resource_group( ~azure.mgmt.sql.models.ManagedInstancePaged[~azure.mgmt.sql.models.ManagedInstance] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -152,6 +163,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -162,12 +178,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances'} @@ -225,7 +239,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedInstance', response) @@ -522,3 +535,69 @@ def get_long_running_output(response): 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.Sql/managedInstances/{managedInstanceName}'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of all managed instances in the subscription. + + :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: An iterator like instance of ManagedInstance + :rtype: + ~azure.mgmt.sql.models.ManagedInstancePaged[~azure.mgmt.sql.models.ManagedInstance] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py index df833033a1b9..882500ff53e5 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py @@ -21,6 +21,8 @@ class ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations(object): """ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations 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. @@ -99,7 +101,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedBackupShortTermRetentionPolicy', response) @@ -355,8 +356,7 @@ def list_by_restorable_dropped_database( ~azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicyPaged[~azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_restorable_dropped_database.metadata['url'] @@ -388,6 +388,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -398,12 +403,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_restorable_dropped_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_server_security_alert_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_server_security_alert_policies_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_server_security_alert_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_server_security_alert_policies_operations.py index 16ad81dac173..1f75bd170197 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_server_security_alert_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_server_security_alert_policies_operations.py @@ -21,6 +21,8 @@ class ManagedServerSecurityAlertPoliciesOperations(object): """ManagedServerSecurityAlertPoliciesOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedServerSecurityAlertPolicy', response) @@ -232,8 +233,7 @@ def list_by_instance( ~azure.mgmt.sql.models.ManagedServerSecurityAlertPolicyPaged[~azure.mgmt.sql.models.ManagedServerSecurityAlertPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -264,6 +264,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -274,12 +279,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/securityAlertPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_operations.py similarity index 90% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_operations.py index 5f8f397a39b9..7ccdf683aa8a 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_operations.py @@ -19,6 +19,8 @@ class Operations(object): """Operations 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. @@ -51,8 +53,7 @@ def list( ~azure.mgmt.sql.models.OperationPaged[~azure.mgmt.sql.models.Operation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -77,6 +78,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -87,12 +93,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.Sql/operations'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recommended_elastic_pools_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recommended_elastic_pools_operations.py similarity index 94% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recommended_elastic_pools_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recommended_elastic_pools_operations.py index 960bd52a034b..95c89bf1df1b 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recommended_elastic_pools_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recommended_elastic_pools_operations.py @@ -19,6 +19,8 @@ class RecommendedElasticPoolsOperations(object): """RecommendedElasticPoolsOperations 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. @@ -94,7 +96,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RecommendedElasticPool', response) @@ -125,8 +126,7 @@ def list_by_server( ~azure.mgmt.sql.models.RecommendedElasticPoolPaged[~azure.mgmt.sql.models.RecommendedElasticPool] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -157,6 +157,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -167,12 +172,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RecommendedElasticPoolPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RecommendedElasticPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RecommendedElasticPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools'} @@ -200,8 +203,7 @@ def list_metrics( ~azure.mgmt.sql.models.RecommendedElasticPoolMetricPaged[~azure.mgmt.sql.models.RecommendedElasticPoolMetric] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metrics.metadata['url'] @@ -233,6 +235,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -243,12 +250,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RecommendedElasticPoolMetricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RecommendedElasticPoolMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RecommendedElasticPoolMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}/metrics'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_databases_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_databases_operations.py index 87b5873c5619..178abf85f1b5 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_databases_operations.py @@ -19,6 +19,8 @@ class RecoverableDatabasesOperations(object): """RecoverableDatabasesOperations 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. @@ -94,7 +96,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RecoverableDatabase', response) @@ -125,8 +126,7 @@ def list_by_server( ~azure.mgmt.sql.models.RecoverableDatabasePaged[~azure.mgmt.sql.models.RecoverableDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -157,6 +157,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -167,12 +172,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RecoverableDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RecoverableDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RecoverableDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_managed_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_managed_databases_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_managed_databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_managed_databases_operations.py index d8bf8cbb6665..2595a4069152 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_managed_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_managed_databases_operations.py @@ -19,6 +19,8 @@ class RecoverableManagedDatabasesOperations(object): """RecoverableManagedDatabasesOperations 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. @@ -57,8 +59,7 @@ def list_by_instance( ~azure.mgmt.sql.models.RecoverableManagedDatabasePaged[~azure.mgmt.sql.models.RecoverableManagedDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -89,6 +90,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -99,12 +105,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RecoverableManagedDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RecoverableManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RecoverableManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/recoverableDatabases'} @@ -165,7 +169,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RecoverableManagedDatabase', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/replication_links_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_replication_links_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/replication_links_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_replication_links_operations.py index d3d3cee87622..bebd9d62e04d 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/replication_links_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_replication_links_operations.py @@ -21,6 +21,8 @@ class ReplicationLinksOperations(object): """ReplicationLinksOperations 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. @@ -160,7 +162,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ReplicationLink', response) @@ -375,8 +376,7 @@ def list_by_database( ~azure.mgmt.sql.models.ReplicationLinkPaged[~azure.mgmt.sql.models.ReplicationLink] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -408,6 +408,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -418,12 +423,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ReplicationLinkPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ReplicationLinkPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ReplicationLinkPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_databases_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_databases_operations.py index 0dfb4989691a..aa2480c63f73 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_databases_operations.py @@ -19,6 +19,8 @@ class RestorableDroppedDatabasesOperations(object): """RestorableDroppedDatabasesOperations 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. @@ -94,7 +96,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RestorableDroppedDatabase', response) @@ -125,8 +126,7 @@ def list_by_server( ~azure.mgmt.sql.models.RestorableDroppedDatabasePaged[~azure.mgmt.sql.models.RestorableDroppedDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -157,6 +157,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -167,12 +172,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RestorableDroppedDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RestorableDroppedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RestorableDroppedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_managed_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_managed_databases_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_managed_databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_managed_databases_operations.py index 58e81f79908a..0ef3d7b7c3c8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_managed_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_managed_databases_operations.py @@ -19,6 +19,8 @@ class RestorableDroppedManagedDatabasesOperations(object): """RestorableDroppedManagedDatabasesOperations 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. @@ -57,8 +59,7 @@ def list_by_instance( ~azure.mgmt.sql.models.RestorableDroppedManagedDatabasePaged[~azure.mgmt.sql.models.RestorableDroppedManagedDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -89,6 +90,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -99,12 +105,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RestorableDroppedManagedDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RestorableDroppedManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RestorableDroppedManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases'} @@ -166,7 +170,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RestorableDroppedManagedDatabase', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restore_points_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restore_points_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restore_points_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restore_points_operations.py index e5b49d9d1ed3..0a7f74a92b42 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restore_points_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restore_points_operations.py @@ -21,6 +21,8 @@ class RestorePointsOperations(object): """RestorePointsOperations 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. @@ -61,8 +63,7 @@ def list_by_database( ~azure.mgmt.sql.models.RestorePointPaged[~azure.mgmt.sql.models.RestorePoint] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -94,6 +95,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -104,12 +110,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RestorePointPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RestorePointPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RestorePointPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints'} @@ -283,7 +287,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RestorePoint', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sensitivity_labels_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sensitivity_labels_operations.py similarity index 70% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sensitivity_labels_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sensitivity_labels_operations.py index 5be551f7fd12..2cfb2974a8b8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sensitivity_labels_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sensitivity_labels_operations.py @@ -19,12 +19,13 @@ class SensitivityLabelsOperations(object): """SensitivityLabelsOperations 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: The API version to use for the request. Constant value: "2017-03-01-preview". - :ivar sensitivity_label_source: The source of the sensitivity label. Constant value: "current". """ models = models @@ -35,7 +36,6 @@ def __init__(self, client, config, serializer, deserializer): self._serialize = serializer self._deserialize = deserializer self.api_version = "2017-03-01-preview" - self.sensitivity_label_source = "current" self.config = config @@ -64,8 +64,7 @@ def list_current_by_database( ~azure.mgmt.sql.models.SensitivityLabelPaged[~azure.mgmt.sql.models.SensitivityLabel] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_current_by_database.metadata['url'] @@ -99,6 +98,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -109,18 +113,16 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_current_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/currentSensitivityLabels'} def list_recommended_by_database( - self, resource_group_name, server_name, database_name, skip_token=None, filter=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, server_name, database_name, include_disabled_recommendations=None, skip_token=None, filter=None, custom_headers=None, raw=False, **operation_config): """Gets the sensitivity labels of a given database. :param resource_group_name: The name of the resource group that @@ -131,6 +133,9 @@ def list_recommended_by_database( :type server_name: str :param database_name: The name of the database. :type database_name: str + :param include_disabled_recommendations: Specifies whether to include + disabled recommendations or not. + :type include_disabled_recommendations: bool :param skip_token: :type skip_token: str :param filter: An OData filter expression that filters elements in the @@ -146,8 +151,7 @@ def list_recommended_by_database( ~azure.mgmt.sql.models.SensitivityLabelPaged[~azure.mgmt.sql.models.SensitivityLabel] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_recommended_by_database.metadata['url'] @@ -161,6 +165,8 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} + if include_disabled_recommendations is not None: + query_parameters['includeDisabledRecommendations'] = self._serialize.query("include_disabled_recommendations", include_disabled_recommendations, 'bool') if skip_token is not None: query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') if filter is not None: @@ -183,6 +189,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -193,16 +204,155 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_recommended_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/recommendedSensitivityLabels'} + def enable_recommendation( + self, resource_group_name, server_name, database_name, schema_name, table_name, column_name, custom_headers=None, raw=False, **operation_config): + """Enables sensitivity recommendations on a given column (recommendations + are enabled by default on all columns). + + :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 server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param schema_name: The name of the schema. + :type schema_name: str + :param table_name: The name of the table. + :type table_name: str + :param column_name: The name of the column. + :type column_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` + """ + sensitivity_label_source = "recommended" + + # Construct URL + url = self.enable_recommendation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str'), + 'columnName': self._serialize.url("column_name", column_name, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + enable_recommendation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable'} + + def disable_recommendation( + self, resource_group_name, server_name, database_name, schema_name, table_name, column_name, custom_headers=None, raw=False, **operation_config): + """Disables sensitivity recommendations on a given column. + + :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 server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param schema_name: The name of the schema. + :type schema_name: str + :param table_name: The name of the table. + :type table_name: str + :param column_name: The name of the column. + :type column_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` + """ + sensitivity_label_source = "recommended" + + # Construct URL + url = self.disable_recommendation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str'), + 'columnName': self._serialize.url("column_name", column_name, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_recommendation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable'} + def get( self, resource_group_name, server_name, database_name, schema_name, table_name, column_name, sensitivity_label_source, custom_headers=None, raw=False, **operation_config): """Gets the sensitivity label of a given column. @@ -273,7 +423,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SensitivityLabel', response) @@ -314,6 +463,8 @@ def create_or_update( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + sensitivity_label_source = "current" + # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { @@ -323,7 +474,7 @@ def create_or_update( 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), 'tableName': self._serialize.url("table_name", table_name, 'str'), 'columnName': self._serialize.url("column_name", column_name, 'str'), - 'sensitivityLabelSource': self._serialize.url("self.sensitivity_label_source", self.sensitivity_label_source, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -356,7 +507,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SensitivityLabel', response) if response.status_code == 201: @@ -396,6 +546,8 @@ def delete( :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + sensitivity_label_source = "current" + # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -405,7 +557,7 @@ def delete( 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), 'tableName': self._serialize.url("table_name", table_name, 'str'), 'columnName': self._serialize.url("column_name", column_name, 'str'), - 'sensitivityLabelSource': self._serialize.url("self.sensitivity_label_source", self.sensitivity_label_source, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_automatic_tuning_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_automatic_tuning_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_automatic_tuning_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_automatic_tuning_operations.py index 675d886377c6..243174bc107d 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_automatic_tuning_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_automatic_tuning_operations.py @@ -19,6 +19,8 @@ class ServerAutomaticTuningOperations(object): """ServerAutomaticTuningOperations 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. @@ -90,7 +92,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerAutomaticTuning', response) @@ -167,7 +168,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerAutomaticTuning', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_azure_ad_administrators_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_administrators_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_azure_ad_administrators_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_administrators_operations.py index c7a66d57ea08..7fdf686673b7 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_azure_ad_administrators_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_administrators_operations.py @@ -21,6 +21,8 @@ class ServerAzureADAdministratorsOperations(object): """ServerAzureADAdministratorsOperations 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. @@ -306,7 +308,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerAzureADAdministrator', response) @@ -337,8 +338,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerAzureADAdministratorPaged[~azure.mgmt.sql.models.ServerAzureADAdministrator] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -369,6 +369,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -379,12 +384,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerAzureADAdministratorPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerAzureADAdministratorPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerAzureADAdministratorPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_blob_auditing_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_blob_auditing_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_blob_auditing_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_blob_auditing_policies_operations.py index ac7c8ef280ac..88cb823e64e9 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_blob_auditing_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_blob_auditing_policies_operations.py @@ -21,6 +21,8 @@ class ServerBlobAuditingPoliciesOperations(object): """ServerBlobAuditingPoliciesOperations 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. @@ -95,7 +97,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerBlobAuditingPolicy', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_communication_links_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_communication_links_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_communication_links_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_communication_links_operations.py index 2844c4068ea4..3a8782c7510f 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_communication_links_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_communication_links_operations.py @@ -21,6 +21,8 @@ class ServerCommunicationLinksOperations(object): """ServerCommunicationLinksOperations 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. @@ -155,7 +157,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerCommunicationLink', response) @@ -295,8 +296,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerCommunicationLinkPaged[~azure.mgmt.sql.models.ServerCommunicationLink] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -327,6 +327,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -337,12 +342,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerCommunicationLinkPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerCommunicationLinkPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerCommunicationLinkPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_connection_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_connection_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_connection_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_connection_policies_operations.py index c1d5c68e7f7f..4813f39f62ac 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_connection_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_connection_policies_operations.py @@ -19,6 +19,8 @@ class ServerConnectionPoliciesOperations(object): """ServerConnectionPoliciesOperations 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. @@ -103,7 +105,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerConnectionPolicy', response) if response.status_code == 201: @@ -170,7 +171,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerConnectionPolicy', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_dns_aliases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_dns_aliases_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_dns_aliases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_dns_aliases_operations.py index a4f79dfce854..d8ec5ec33941 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_dns_aliases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_dns_aliases_operations.py @@ -21,6 +21,8 @@ class ServerDnsAliasesOperations(object): """ServerDnsAliasesOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerDnsAlias', response) @@ -316,8 +317,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerDnsAliasPaged[~azure.mgmt.sql.models.ServerDnsAlias] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -348,6 +348,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -358,12 +363,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerDnsAliasPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerDnsAliasPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerDnsAliasPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_keys_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_keys_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_keys_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_keys_operations.py index e52b751d7eb8..ffbd75711807 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_keys_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_keys_operations.py @@ -21,6 +21,8 @@ class ServerKeysOperations(object): """ServerKeysOperations 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. @@ -59,8 +61,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerKeyPaged[~azure.mgmt.sql.models.ServerKey] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -91,6 +92,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -101,12 +107,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerKeyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys'} @@ -167,7 +171,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerKey', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_security_alert_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_security_alert_policies_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_security_alert_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_security_alert_policies_operations.py index 95e884990da2..b5b8e4d82427 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_security_alert_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_security_alert_policies_operations.py @@ -21,6 +21,8 @@ class ServerSecurityAlertPoliciesOperations(object): """ServerSecurityAlertPoliciesOperations 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. @@ -95,7 +97,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerSecurityAlertPolicy', response) @@ -230,8 +231,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerSecurityAlertPolicyPaged[~azure.mgmt.sql.models.ServerSecurityAlertPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -262,6 +262,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -272,12 +277,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_usages_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_usages_operations.py similarity index 92% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_usages_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_usages_operations.py index 4d60726ff42f..5ac207d27f69 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_usages_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_usages_operations.py @@ -19,6 +19,8 @@ class ServerUsagesOperations(object): """ServerUsagesOperations 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. @@ -57,8 +59,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerUsagePaged[~azure.mgmt.sql.models.ServerUsage] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -89,6 +90,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -99,12 +105,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerUsagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/usages'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_vulnerability_assessments_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_vulnerability_assessments_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_vulnerability_assessments_operations.py index ffe8dd567342..4caee1f1fb49 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_vulnerability_assessments_operations.py @@ -19,6 +19,8 @@ class ServerVulnerabilityAssessmentsOperations(object): """ServerVulnerabilityAssessmentsOperations 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. @@ -95,7 +97,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerVulnerabilityAssessment', response) @@ -168,7 +169,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerVulnerabilityAssessment', response) if response.status_code == 201: @@ -258,8 +258,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerVulnerabilityAssessmentPaged[~azure.mgmt.sql.models.ServerVulnerabilityAssessment] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -290,6 +289,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -300,12 +304,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/servers_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_servers_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/servers_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_servers_operations.py index 7abad6723542..16fd05d12be8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/servers_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_servers_operations.py @@ -21,6 +21,8 @@ class ServersOperations(object): """ServersOperations 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. @@ -93,7 +95,6 @@ def check_name_availability( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CheckNameAvailabilityResponse', response) @@ -120,8 +121,7 @@ def list( """ api_version = "2015-05-01-preview" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -150,6 +150,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -160,12 +165,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers'} @@ -190,8 +193,7 @@ def list_by_resource_group( """ api_version = "2015-05-01-preview" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -221,6 +223,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -231,12 +238,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers'} @@ -296,7 +301,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Server', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_objectives_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_objectives_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_objectives_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_objectives_operations.py index d4f53c7313af..f1ae98c7828e 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_objectives_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_objectives_operations.py @@ -19,6 +19,8 @@ class ServiceObjectivesOperations(object): """ServiceObjectivesOperations 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. @@ -94,7 +96,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceObjective', response) @@ -125,8 +126,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServiceObjectivePaged[~azure.mgmt.sql.models.ServiceObjective] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -157,6 +157,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -167,12 +172,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServiceObjectivePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServiceObjectivePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServiceObjectivePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/serviceObjectives'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_tier_advisors_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_tier_advisors_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_tier_advisors_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_tier_advisors_operations.py index cc9ba091db21..ff0328f21bd7 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_tier_advisors_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_tier_advisors_operations.py @@ -19,6 +19,8 @@ class ServiceTierAdvisorsOperations(object): """ServiceTierAdvisorsOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceTierAdvisor', response) @@ -129,8 +130,7 @@ def list_by_database( ~azure.mgmt.sql.models.ServiceTierAdvisorPaged[~azure.mgmt.sql.models.ServiceTierAdvisor] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -162,6 +162,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -172,12 +177,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServiceTierAdvisorPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServiceTierAdvisorPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServiceTierAdvisorPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/serviceTierAdvisors'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/subscription_usages_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_subscription_usages_operations.py similarity index 94% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/subscription_usages_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_subscription_usages_operations.py index b70973ca790e..355be5f6fd68 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/subscription_usages_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_subscription_usages_operations.py @@ -19,6 +19,8 @@ class SubscriptionUsagesOperations(object): """SubscriptionUsagesOperations 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. @@ -54,8 +56,7 @@ def list_by_location( ~azure.mgmt.sql.models.SubscriptionUsagePaged[~azure.mgmt.sql.models.SubscriptionUsage] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_location.metadata['url'] @@ -85,6 +86,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -95,12 +101,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SubscriptionUsagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SubscriptionUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SubscriptionUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages'} @@ -157,7 +161,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SubscriptionUsage', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_agents_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_agents_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_agents_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_agents_operations.py index 9ac0651a57d3..ec00730c027a 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_agents_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_agents_operations.py @@ -21,6 +21,8 @@ class SyncAgentsOperations(object): """SyncAgentsOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SyncAgent', response) @@ -326,8 +327,7 @@ def list_by_server( ~azure.mgmt.sql.models.SyncAgentPaged[~azure.mgmt.sql.models.SyncAgent] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -358,6 +358,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -368,12 +373,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncAgentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncAgentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncAgentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents'} @@ -435,7 +438,6 @@ def generate_key( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SyncAgentKeyProperties', response) @@ -469,8 +471,7 @@ def list_linked_databases( ~azure.mgmt.sql.models.SyncAgentLinkedDatabasePaged[~azure.mgmt.sql.models.SyncAgentLinkedDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_linked_databases.metadata['url'] @@ -502,6 +503,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -512,12 +518,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncAgentLinkedDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncAgentLinkedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncAgentLinkedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_linked_databases.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}/linkedDatabases'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_groups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_groups_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_groups_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_groups_operations.py index 484f24f33781..bf78088e717b 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_groups_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_groups_operations.py @@ -21,6 +21,8 @@ class SyncGroupsOperations(object): """SyncGroupsOperations 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. @@ -56,8 +58,7 @@ def list_sync_database_ids( ~azure.mgmt.sql.models.SyncDatabaseIdPropertiesPaged[~azure.mgmt.sql.models.SyncDatabaseIdProperties] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_sync_database_ids.metadata['url'] @@ -87,6 +88,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -97,12 +103,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncDatabaseIdPropertiesPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncDatabaseIdPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncDatabaseIdPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_sync_database_ids.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds'} @@ -222,8 +226,7 @@ def list_hub_schemas( ~azure.mgmt.sql.models.SyncFullSchemaPropertiesPaged[~azure.mgmt.sql.models.SyncFullSchemaProperties] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_hub_schemas.metadata['url'] @@ -256,6 +259,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -266,12 +274,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_hub_schemas.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/hubSchemas'} @@ -310,8 +316,7 @@ def list_logs( ~azure.mgmt.sql.models.SyncGroupLogPropertiesPaged[~azure.mgmt.sql.models.SyncGroupLogProperties] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_logs.metadata['url'] @@ -349,6 +354,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -359,12 +369,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncGroupLogPropertiesPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncGroupLogPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncGroupLogPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/logs'} @@ -553,7 +561,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SyncGroup', response) @@ -901,8 +908,7 @@ def list_by_database( ~azure.mgmt.sql.models.SyncGroupPaged[~azure.mgmt.sql.models.SyncGroup] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -934,6 +940,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -944,12 +955,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncGroupPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_members_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_members_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_members_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_members_operations.py index 4eab11133d05..23343d374072 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_members_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_members_operations.py @@ -21,6 +21,8 @@ class SyncMembersOperations(object): """SyncMembersOperations 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. @@ -103,7 +105,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SyncMember', response) @@ -468,8 +469,7 @@ def list_by_sync_group( ~azure.mgmt.sql.models.SyncMemberPaged[~azure.mgmt.sql.models.SyncMember] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_sync_group.metadata['url'] @@ -502,6 +502,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -512,12 +517,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncMemberPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncMemberPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncMemberPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_sync_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers'} @@ -550,8 +553,7 @@ def list_member_schemas( ~azure.mgmt.sql.models.SyncFullSchemaPropertiesPaged[~azure.mgmt.sql.models.SyncFullSchemaProperties] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_member_schemas.metadata['url'] @@ -585,6 +587,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -595,12 +602,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_member_schemas.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/schemas'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/tde_certificates_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_tde_certificates_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/tde_certificates_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_tde_certificates_operations.py index bc529a38043f..86037d49ca05 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/tde_certificates_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_tde_certificates_operations.py @@ -21,6 +21,8 @@ class TdeCertificatesOperations(object): """TdeCertificatesOperations 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. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryption_activities_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryption_activities_operations.py similarity index 93% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryption_activities_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryption_activities_operations.py index ae930a401246..6807645bd6c0 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryption_activities_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryption_activities_operations.py @@ -19,6 +19,8 @@ class TransparentDataEncryptionActivitiesOperations(object): """TransparentDataEncryptionActivitiesOperations 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. @@ -63,8 +65,7 @@ def list_by_configuration( ~azure.mgmt.sql.models.TransparentDataEncryptionActivityPaged[~azure.mgmt.sql.models.TransparentDataEncryptionActivity] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_configuration.metadata['url'] @@ -97,6 +98,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -107,12 +113,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.TransparentDataEncryptionActivityPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.TransparentDataEncryptionActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.TransparentDataEncryptionActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{transparentDataEncryptionName}/operationResults'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryptions_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryptions_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryptions_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryptions_operations.py index a0f3c8184f57..b497a7ee5656 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryptions_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryptions_operations.py @@ -19,6 +19,8 @@ class TransparentDataEncryptionsOperations(object): """TransparentDataEncryptionsOperations 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. @@ -108,7 +110,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('TransparentDataEncryption', response) if response.status_code == 201: @@ -179,7 +180,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('TransparentDataEncryption', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_usages_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_usages_operations.py new file mode 100644 index 000000000000..59164a38e347 --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_usages_operations.py @@ -0,0 +1,120 @@ +# 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 .. import models + + +class UsagesOperations(object): + """UsagesOperations 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: The API version to use for the request. Constant value: "2018-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01-preview" + + self.config = config + + def list_by_instance_pool( + self, resource_group_name, instance_pool_name, expand_children=None, custom_headers=None, raw=False, **operation_config): + """Gets all instance pool usage metrics. + + :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 instance_pool_name: The name of the instance pool to be + retrieved. + :type instance_pool_name: str + :param expand_children: Optional request parameter to include managed + instance usages within the instance pool. + :type expand_children: bool + :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: An iterator like instance of Usage + :rtype: + ~azure.mgmt.sql.models.UsagePaged[~azure.mgmt.sql.models.Usage] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_instance_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand_children is not None: + query_parameters['expandChildren'] = self._serialize.query("expand_children", expand_children, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_instance_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/usages'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_clusters_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_clusters_operations.py similarity index 96% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_clusters_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_clusters_operations.py index 90a685e001a5..b91ece534ef3 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_clusters_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_clusters_operations.py @@ -21,6 +21,8 @@ class VirtualClustersOperations(object): """VirtualClustersOperations 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. @@ -53,8 +55,7 @@ def list( ~azure.mgmt.sql.models.VirtualClusterPaged[~azure.mgmt.sql.models.VirtualCluster] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -83,6 +84,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -93,12 +99,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/virtualClusters'} @@ -121,8 +125,7 @@ def list_by_resource_group( ~azure.mgmt.sql.models.VirtualClusterPaged[~azure.mgmt.sql.models.VirtualCluster] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -152,6 +155,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -162,12 +170,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters'} @@ -225,7 +231,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VirtualCluster', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_network_rules_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_network_rules_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_network_rules_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_network_rules_operations.py index 01bc6f5bdf3e..3485f42e9f85 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_network_rules_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_network_rules_operations.py @@ -21,6 +21,8 @@ class VirtualNetworkRulesOperations(object): """VirtualNetworkRulesOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VirtualNetworkRule', response) @@ -329,8 +330,7 @@ def list_by_server( ~azure.mgmt.sql.models.VirtualNetworkRulePaged[~azure.mgmt.sql.models.VirtualNetworkRule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -361,6 +361,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -371,12 +376,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/long_term_retention_backups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/long_term_retention_backups_operations.py deleted file mode 100644 index c803786f5ff3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/long_term_retention_backups_operations.py +++ /dev/null @@ -1,441 +0,0 @@ -# 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 LongTermRetentionBackupsOperations(object): - """LongTermRetentionBackupsOperations operations. - - :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: The API version to use for the request. Constant value: "2017-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-01-preview" - - self.config = config - - def get( - self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): - """Gets a long term retention backup. - - :param location_name: The location of the database. - :type location_name: str - :param long_term_retention_server_name: The name of the server - :type long_term_retention_server_name: str - :param long_term_retention_database_name: The name of the database - :type long_term_retention_database_name: str - :param backup_name: The backup name. - :type backup_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: LongTermRetentionBackup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.LongTermRetentionBackup or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), - 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), - 'backupName': self._serialize.url("backup_name", backup_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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('LongTermRetentionBackup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} - - - def _delete_initial( - self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), - 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), - 'backupName': self._serialize.url("backup_name", backup_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - 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.delete(url, query_parameters, header_parameters) - 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a long term retention backup. - - :param location_name: The location of the database - :type location_name: str - :param long_term_retention_server_name: The name of the server - :type long_term_retention_server_name: str - :param long_term_retention_database_name: The name of the database - :type long_term_retention_database_name: str - :param backup_name: The backup name. - :type backup_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( - location_name=location_name, - long_term_retention_server_name=long_term_retention_server_name, - long_term_retention_database_name=long_term_retention_database_name, - backup_name=backup_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}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} - - def list_by_database( - self, location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): - """Lists all long term retention backups for a database. - - :param location_name: The location of the database - :type location_name: str - :param long_term_retention_server_name: The name of the server - :type long_term_retention_server_name: str - :param long_term_retention_database_name: The name of the database - :type long_term_retention_database_name: str - :param only_latest_per_database: Whether or not to only get the latest - backup for each database. - :type only_latest_per_database: bool - :param database_state: Whether to query against just live databases, - just deleted databases, or all databases. Possible values include: - 'All', 'Live', 'Deleted' - :type database_state: str or - ~azure.mgmt.sql.models.LongTermRetentionDatabaseState - :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: An iterator like instance of LongTermRetentionBackup - :rtype: - ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_database.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), - 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if only_latest_per_database is not None: - query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') - if database_state is not None: - query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # 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 - - return response - - # Deserialize response - deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups'} - - def list_by_location( - self, location_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): - """Lists the long term retention backups for a given location. - - :param location_name: The location of the database - :type location_name: str - :param only_latest_per_database: Whether or not to only get the latest - backup for each database. - :type only_latest_per_database: bool - :param database_state: Whether to query against just live databases, - just deleted databases, or all databases. Possible values include: - 'All', 'Live', 'Deleted' - :type database_state: str or - ~azure.mgmt.sql.models.LongTermRetentionDatabaseState - :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: An iterator like instance of LongTermRetentionBackup - :rtype: - ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_location.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if only_latest_per_database is not None: - query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') - if database_state is not None: - query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # 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 - - return response - - # Deserialize response - deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups'} - - def list_by_server( - self, location_name, long_term_retention_server_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): - """Lists the long term retention backups for a given server. - - :param location_name: The location of the database - :type location_name: str - :param long_term_retention_server_name: The name of the server - :type long_term_retention_server_name: str - :param only_latest_per_database: Whether or not to only get the latest - backup for each database. - :type only_latest_per_database: bool - :param database_state: Whether to query against just live databases, - just deleted databases, or all databases. Possible values include: - 'All', 'Live', 'Deleted' - :type database_state: str or - ~azure.mgmt.sql.models.LongTermRetentionDatabaseState - :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: An iterator like instance of LongTermRetentionBackup - :rtype: - ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if only_latest_per_database is not None: - query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') - if database_state is not None: - query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # 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 - - return response - - # Deserialize response - deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups'} From 3e7e7c50878719d1992f560bf8ba4a22bdab0702 Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 10:16:27 -0700 Subject: [PATCH 058/244] Update CODEOWNERS --- .github/CODEOWNERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 07d57ac48320..0172563e9a84 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -40,6 +40,9 @@ # Management Plane /**/*mgmt*/ @zikalino +# Management Plane +/**/*mgmt*/ @zikalino + ########### # Eng Sys ########### From d26a1ba4644609122bc559210950b89f554a5a14 Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 11:03:35 -0700 Subject: [PATCH 059/244] more code owners --- .github/CODEOWNERS | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0172563e9a84..07d57ac48320 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -40,9 +40,6 @@ # Management Plane /**/*mgmt*/ @zikalino -# Management Plane -/**/*mgmt*/ @zikalino - ########### # Eng Sys ########### From f2841dd80e889ff08ba164b816332c674d6a2a4a Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 11:58:35 -0700 Subject: [PATCH 060/244] add policy and decorators for secrets (#6453) --- .../azure/keyvault/secrets/_shared/async_client_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 193e6e324c7e..c451ffb1e766 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncHttpTransport +from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient From 88c1b32e3f67cddaa17a1e280b883808413fe5e2 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Thu, 25 Jul 2019 12:41:38 -0700 Subject: [PATCH 061/244] Paging v2 (#6420) * First version of paging * Clean sync paging * Async paging * Name AsyncList without underscore * MyPy happyness * pylint * black * PageIterator as conf * Simplify ItemPaged * Use chain to link iterable * Make Paging more open * Docstring * pylint / mypy / black * Regenerate KV with latest Autorest + Paging branch (#6479) * Regenerate KV with latest Autorest + Paging branch * Remove unused import in tests * Make the async adapter more generic * Regeneration after operation mixin fix in Autorest * COmmit changes forgotten in #6418 * Fixing syntax for 2.7 * Move Storage Queue to new Paging (#6447) * Move Storage Queue to new Paging * Working Storage queue on new paging * Fix types * First shot of blob tests update * Fixing blob tests * File to new paging * Doc fix * Feedbacks from @annatisch * Fix last @annatisch comment * Simplify paging contract * Fix storage queue after new paging contract --- .../_key_vault_client_operations_async.py | 60 ++++------------ .../_key_vault_client_operations.py | 60 ++++------------ .../_key_vault_client_operations_async.py | 70 ++++--------------- .../_key_vault_client_operations.py | 70 ++++--------------- .../keys/_shared/async_client_base.py | 19 +++++ .../_key_vault_client_operations_async.py | 60 ++++------------ .../_key_vault_client_operations.py | 60 ++++------------ .../_key_vault_client_operations_async.py | 70 ++++--------------- .../_key_vault_client_operations.py | 70 ++++--------------- .../secrets/_shared/async_client_base.py | 19 +++++ 10 files changed, 142 insertions(+), 416 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index b5cc965119ed..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 0ae7fd5fb025..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index 08e45c2b44a7..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index b9ed6e10ea21..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 193e6e324c7e..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -21,6 +21,25 @@ pass +class AsyncPagingAdapter: + """For each item in an AsyncIterator, returns the result of applying fn to that item. + Python 3.6 added syntax that could replace this (yield within async for).""" + + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: + self._pages = pages + self._fn = fn + + def __aiter__(self): + return self + + async def __anext__(self) -> Any: + item = await self._pages.__anext__() + if not item: + raise StopAsyncIteration + return self._fn(item) + # TODO: expected type Model got Coroutine instead? + + class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index b5cc965119ed..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 0ae7fd5fb025..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index 08e45c2b44a7..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index b9ed6e10ea21..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index c451ffb1e766..0119ef5a6e44 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -21,6 +21,25 @@ pass +class AsyncPagingAdapter: + """For each item in an AsyncIterator, returns the result of applying fn to that item. + Python 3.6 added syntax that could replace this (yield within async for).""" + + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: + self._pages = pages + self._fn = fn + + def __aiter__(self): + return self + + async def __anext__(self) -> Any: + item = await self._pages.__anext__() + if not item: + raise StopAsyncIteration + return self._fn(item) + # TODO: expected type Model got Coroutine instead? + + class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, From abc81888b544e3b688ce98ae019c326dd403ec81 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 15:48:49 -0700 Subject: [PATCH 062/244] get rid of should only propagate (#6497) --- sdk/core/azure-core/azure/core/tracing/decorator.py | 2 +- sdk/core/azure-core/azure/core/tracing/decorator_async.py | 2 +- .../azure_core_asynctests/test_tracing_decorator_async.py | 5 ++++- sdk/core/azure-core/tests/test_tracing_decorator.py | 5 ++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 3986dcaf31ed..7d5d7bfce407 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None and orig_wrapped_span is None: + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 4df65fee77ef..781e20a6bef2 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None and orig_wrapped_span is None: + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index 82b4f97dc92f..e2a5c92e60b9 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -145,4 +145,7 @@ async def test_span_with_opencensus_complicated(value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert not parent.children[3].children + assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" + assert parent.children[3].children[1].span_data.name == "MockClient.make_request" + children = parent.children[1].children + assert len(children) == 2 diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index 764c09396255..eedd34c0afdd 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -177,4 +177,7 @@ def test_span_with_opencensus_complicated(self, value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert not parent.children[3].children + assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" + assert parent.children[3].children[1].span_data.name == "MockClient.make_request" + children = parent.children[1].children + assert len(children) == 2 From a4a31e4eabbe3f2ae456640addc0a99d53c1c11b Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Mon, 29 Jul 2019 14:05:36 -0700 Subject: [PATCH 063/244] decorator only trace very top level function (#6530) --- sdk/core/azure-core/azure/core/tracing/decorator.py | 2 +- sdk/core/azure-core/azure/core/tracing/decorator_async.py | 2 +- .../azure_core_asynctests/test_tracing_decorator_async.py | 5 +---- sdk/core/azure-core/tests/test_tracing_decorator.py | 5 +---- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 7d5d7bfce407..3986dcaf31ed 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 781e20a6bef2..4df65fee77ef 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index e2a5c92e60b9..82b4f97dc92f 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -145,7 +145,4 @@ async def test_span_with_opencensus_complicated(value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index eedd34c0afdd..764c09396255 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -177,7 +177,4 @@ def test_span_with_opencensus_complicated(self, value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children From 5d3eb4e7e5e9f390f6b46c623efb2112427b7fa0 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 08:51:19 -0700 Subject: [PATCH 064/244] Synchronous username/password auth (#6416) --- .../azure/identity/_internal/__init__.py | 1 - .../azure-identity/tests/test_identity.py | 68 ------------------- 2 files changed, 69 deletions(-) diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index e7583139395b..cfdf935b801c 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,6 +2,5 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from .auth_code_redirect_handler import AuthCodeRedirectServer from .msal_credentials import ConfidentialClientCredential, PublicClientCredential from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 3aaa54a1f28f..8e7245522519 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -22,7 +22,6 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, - InteractiveBrowserCredential, UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential @@ -244,73 +243,6 @@ def test_default_credential(): DefaultAzureCredential() -@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser -def test_interactive_credential(): - oauth_state = "state" - expected_token = "access-token" - - transport = validating_transport( - requests=[Request()] * 2, # not validating requests because they're formed by MSAL - responses=[ - # expecting tenant discovery then a token request - mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), - mock_response( - json_payload={ - "access_token": expected_token, - "expires_in": 42, - "token_type": "Bearer", - "ext_expires_in": 42, - } - ), - ], - ) - - # mock local server fakes successful authentication by immediately returning a well-formed response - auth_code_response = {"code": "authorization-code", "state": [oauth_state]} - server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) - - credential = InteractiveBrowserCredential( - client_id="guid", - client_secret="secret", - server_class=server_class, - transport=transport, - instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request - ) - - # ensure the request beginning the flow has a known state value - with patch("azure.identity.browser_auth.uuid.uuid4", lambda: oauth_state): - token = credential.get_token("scope") - assert token.token == expected_token - - -@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser -def test_interactive_credential_timeout(): - # mock transport handles MSAL's tenant discovery - transport = Mock( - send=lambda _, **__: mock_response( - json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"} - ) - ) - - # mock local server blocks long enough to exceed the timeout - timeout = 1 - server_instance = Mock(wait_for_redirect=functools.partial(time.sleep, timeout + 1)) - server_class = Mock(return_value=server_instance) - - credential = InteractiveBrowserCredential( - client_id="guid", - client_secret="secret", - server_class=server_class, - timeout=timeout, - transport=transport, - instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request - ) - - with pytest.raises(ClientAuthenticationError) as ex: - credential.get_token("scope") - assert "timed out" in ex.value.message.lower() - - def test_username_password_credential(): expected_token = "access-token" transport = validating_transport( From c3156d931af7a0e588a9fc557d010cc7154e6278 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 14:04:30 -0700 Subject: [PATCH 065/244] Synchronous interactive browser authentication (#6466) --- .../azure/identity/_internal/__init__.py | 1 + .../azure-identity/tests/test_identity.py | 68 +++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index cfdf935b801c..e7583139395b 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,5 +2,6 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +from .auth_code_redirect_handler import AuthCodeRedirectServer from .msal_credentials import ConfidentialClientCredential, PublicClientCredential from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 8e7245522519..3aaa54a1f28f 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -22,6 +22,7 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, + InteractiveBrowserCredential, UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential @@ -243,6 +244,73 @@ def test_default_credential(): DefaultAzureCredential() +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential(): + oauth_state = "state" + expected_token = "access-token" + + transport = validating_transport( + requests=[Request()] * 2, # not validating requests because they're formed by MSAL + responses=[ + # expecting tenant discovery then a token request + mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), + mock_response( + json_payload={ + "access_token": expected_token, + "expires_in": 42, + "token_type": "Bearer", + "ext_expires_in": 42, + } + ), + ], + ) + + # mock local server fakes successful authentication by immediately returning a well-formed response + auth_code_response = {"code": "authorization-code", "state": [oauth_state]} + server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + # ensure the request beginning the flow has a known state value + with patch("azure.identity.browser_auth.uuid.uuid4", lambda: oauth_state): + token = credential.get_token("scope") + assert token.token == expected_token + + +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential_timeout(): + # mock transport handles MSAL's tenant discovery + transport = Mock( + send=lambda _, **__: mock_response( + json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"} + ) + ) + + # mock local server blocks long enough to exceed the timeout + timeout = 1 + server_instance = Mock(wait_for_redirect=functools.partial(time.sleep, timeout + 1)) + server_class = Mock(return_value=server_instance) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + timeout=timeout, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + with pytest.raises(ClientAuthenticationError) as ex: + credential.get_token("scope") + assert "timed out" in ex.value.message.lower() + + def test_username_password_credential(): expected_token = "access-token" transport = validating_transport( From c1f3297660511b400e02ed8f9ec53abee5bf3d3a Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Tue, 30 Jul 2019 20:19:31 -0700 Subject: [PATCH 066/244] KV aiohttp by default (#6563) * Aiohttp default async transport * Record keys with aiohttp * Record secrets with aiohttp --- .../azure/keyvault/secrets/_shared/async_client_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 0119ef5a6e44..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport +from azure.core.pipeline.transport import AsyncHttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient From 259ace3eb8fc0dc97b1392100a9f46f42c058d15 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 10:27:22 -0700 Subject: [PATCH 067/244] KV moved paging return type to ItemPaged (#6558) * KV with latest autorest * Make KV return ItemPaged from azure-core --- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../keys/_shared/async_client_base.py | 19 ----- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../secrets/_shared/async_client_base.py | 19 ----- 10 files changed, 416 insertions(+), 142 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, From 4dc1d262c4498b64adb40eb1a5feddad8e8935c3 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:40:30 -0700 Subject: [PATCH 068/244] Remove docdb mgmt package from master (#6585) --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 - sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 - sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 - .../azure-mgmt-documentdb/azure/__init__.py | 1 - .../azure/mgmt/__init__.py | 1 - .../azure/mgmt/documentdb/__init__.py | 18 - .../azure/mgmt/documentdb/document_db.py | 83 -- .../azure/mgmt/documentdb/models/__init__.py | 52 - .../documentdb/models/consistency_policy.py | 50 - .../documentdb/models/database_account.py | 117 --- .../database_account_connection_string.py | 39 - ...tabase_account_create_update_parameters.py | 90 -- ..._account_list_connection_strings_result.py | 29 - .../database_account_list_keys_result.py | 53 - ...base_account_list_read_only_keys_result.py | 41 - .../models/database_account_paged.py | 27 - .../database_account_patch_parameters.py | 31 - ...abase_account_regenerate_key_parameters.py | 33 - .../documentdb/models/document_db_enums.py | 41 - .../documentdb/models/failover_policies.py | 28 - .../mgmt/documentdb/models/failover_policy.py | 48 - .../azure/mgmt/documentdb/models/location.py | 58 -- .../azure/mgmt/documentdb/models/resource.py | 54 -- .../mgmt/documentdb/operations/__init__.py | 16 - .../database_accounts_operations.py | 918 ------------------ .../azure/mgmt/documentdb/version.py | 13 - .../azure_bdist_wheel.py | 54 -- sdk/cosmos/azure-mgmt-documentdb/build.json | 5 - .../dev_requirements.txt | 1 - .../azure-mgmt-documentdb/sdk_packaging.toml | 2 - sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 - sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 -- ..._mgmt_documentdb.test_accounts_create.yaml | 193 ---- ..._mgmt_documentdb.test_accounts_delete.yaml | 467 --------- ...gmt_documentdb.test_accounts_features.yaml | 272 ------ .../tests/test_mgmt_documentdb.py | 146 --- 36 files changed, 3147 deletions(-) delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst deleted file mode 100644 index eb7345b4071e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. :changelog: - -Release History -=============== - -0.1.3 (2017-05-02) -++++++++++++++++++ - -* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix - -0.1.2 (2017-04-20) -++++++++++++++++++ - -This wheel package is now built with the azure wheel extension - -0.1.1 (2017-03-21) -++++++++++++++++++ - -* Added support for listing database account connection strings - -0.1.0 (2017-01-31) -++++++++++++++++++ - -* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in deleted file mode 100644 index 9ecaeb15de50..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst deleted file mode 100644 index a5204ea75358..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/README.rst +++ /dev/null @@ -1,52 +0,0 @@ -Microsoft Azure SDK for Python -============================== - -This is the Microsoft Azure DocumentDB Management Client Library. - -Azure Resource Manager (ARM) is the next generation of management APIs that -replace the old Azure Service Management (ASM). - -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. - -For the older Azure Service Management (ASM) libraries, see -`azure-servicemanagement-legacy `__ library. - -For a more complete set of Azure libraries, see the `azure `__ bundle package. - - -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - -Usage -===== - -For code examples, see `DocumentDB Management -`__ -on readthedocs.org. - - -Provide Feedback -================ - -If you encounter any bugs or have suggestions, please file an issue in the -`Issues `__ -section of the project. - - -.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py deleted file mode 100755 index 3ec900145f1e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .document_db import DocumentDB -from .version import VERSION - -__all__ = ['DocumentDB'] - -__version__ = VERSION - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py deleted file mode 100755 index 5eda44ab3e32..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import ServiceClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.database_accounts_operations import DatabaseAccountsOperations -from . import models - - -class DocumentDBConfiguration(AzureConfiguration): - """Configuration for DocumentDB - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") - if not base_url: - base_url = 'https://management.azure.com' - - super(DocumentDBConfiguration, self).__init__(base_url) - - self.add_user_agent('documentdb/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class DocumentDB(object): - """Azure DocumentDB Database Service Resource Provider REST API - - :ivar config: Configuration for client. - :vartype config: DocumentDBConfiguration - - :ivar database_accounts: DatabaseAccounts operations - :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2015-04-08' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.database_accounts = DatabaseAccountsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py deleted file mode 100755 index 2ed68c568a84..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .consistency_policy import ConsistencyPolicy -from .location import Location -from .failover_policy import FailoverPolicy -from .database_account import DatabaseAccount -from .failover_policies import FailoverPolicies -from .resource import Resource -from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters -from .database_account_patch_parameters import DatabaseAccountPatchParameters -from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult -from .database_account_list_keys_result import DatabaseAccountListKeysResult -from .database_account_connection_string import DatabaseAccountConnectionString -from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult -from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters -from .database_account_paged import DatabaseAccountPaged -from .document_db_enums import ( - DatabaseAccountKind, - DatabaseAccountOfferType, - DefaultConsistencyLevel, - KeyKind, -) - -__all__ = [ - 'ConsistencyPolicy', - 'Location', - 'FailoverPolicy', - 'DatabaseAccount', - 'FailoverPolicies', - 'Resource', - 'DatabaseAccountCreateUpdateParameters', - 'DatabaseAccountPatchParameters', - 'DatabaseAccountListReadOnlyKeysResult', - 'DatabaseAccountListKeysResult', - 'DatabaseAccountConnectionString', - 'DatabaseAccountListConnectionStringsResult', - 'DatabaseAccountRegenerateKeyParameters', - 'DatabaseAccountPaged', - 'DatabaseAccountKind', - 'DatabaseAccountOfferType', - 'DefaultConsistencyLevel', - 'KeyKind', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py deleted file mode 100755 index d8cefd4c0b59..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConsistencyPolicy(Model): - """The consistency policy for the DocumentDB database account. - - :param default_consistency_level: The default consistency level and - configuration settings of the DocumentDB account. Possible values include: - 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' - :type default_consistency_level: str or :class:`DefaultConsistencyLevel - ` - :param max_staleness_prefix: When used with the Bounded Staleness - consistency level, this value represents the number of stale requests - tolerated. Accepted range for this value is 1 – 2,147,483,647. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_staleness_prefix: long - :param max_interval_in_seconds: When used with the Bounded Staleness - consistency level, this value represents the time amount of staleness (in - seconds) tolerated. Accepted range for this value is 1 - 100. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_interval_in_seconds: int - """ - - _validation = { - 'default_consistency_level': {'required': True}, - 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, - 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, - 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, - 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, - } - - def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): - self.default_consistency_level = default_consistency_level - self.max_staleness_prefix = max_staleness_prefix - self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py deleted file mode 100755 index 89031adc35cb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccount(Resource): - """A DocumentDB database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param provisioning_state: - :type provisioning_state: str - :ivar document_endpoint: The connection endpoint for the DocumentDB - database account. - :vartype document_endpoint: str - :ivar database_account_offer_type: The offer type for the DocumentDB - database account. Default value: Standard. Possible values include: - 'Standard' - :vartype database_account_offer_type: str or - :class:`DatabaseAccountOfferType - ` - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - :param consistency_policy: The consistency policy for the DocumentDB - database account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :ivar write_locations: An array that contains the write location for the - DocumentDB account. - :vartype write_locations: list of :class:`Location - ` - :ivar read_locations: An array that contains of the read locations enabled - for the DocumentDB account. - :vartype read_locations: list of :class:`Location - ` - :ivar failover_policies: An array that contains the regions ordered by - their failover priorities. - :vartype failover_policies: list of :class:`FailoverPolicy - ` - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'document_endpoint': {'readonly': True}, - 'database_account_offer_type': {'readonly': True}, - 'write_locations': {'readonly': True}, - 'read_locations': {'readonly': True}, - 'failover_policies': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, - 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, - 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): - super(DatabaseAccount, self).__init__(location=location, tags=tags) - self.kind = kind - self.provisioning_state = provisioning_state - self.document_endpoint = None - self.database_account_offer_type = None - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover - self.consistency_policy = consistency_policy - self.write_locations = None - self.read_locations = None - self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py deleted file mode 100755 index db1828208069..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountConnectionString(Model): - """Connection string for the DocumentDB account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar connection_string: Value of the connection string - :vartype connection_string: str - :ivar description: Description of the connection string - :vartype description: str - """ - - _validation = { - 'connection_string': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self): - self.connection_string = None - self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py deleted file mode 100755 index 30978f482f0b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccountCreateUpdateParameters(Resource): - """Parameters to create and update DocumentDB database accounts. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param consistency_policy: The consistency policy for the DocumentDB - account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :param locations: An array that contains the georeplication locations - enabled for the DocumentDB account. - :type locations: list of :class:`Location - ` - :ivar database_account_offer_type: Default value: "Standard" . - :vartype database_account_offer_type: str - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - } - - database_account_offer_type = "Standard" - - def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): - super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) - self.kind = kind - self.consistency_policy = consistency_policy - self.locations = locations - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py deleted file mode 100755 index 7cddc00a3de1..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListConnectionStringsResult(Model): - """The connection strings for the given database account. - - :param connection_strings: An array that contains the connection strings - for the DocumentDB account. - :type connection_strings: list of :class:`DatabaseAccountConnectionString - ` - """ - - _attribute_map = { - 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, - } - - def __init__(self, connection_strings=None): - self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py deleted file mode 100755 index 4d775054ac14..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListKeysResult(Model): - """The access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_master_key: Base 64 encoded value of the primary read-write - key. - :vartype primary_master_key: str - :ivar secondary_master_key: Base 64 encoded value of the secondary - read-write key. - :vartype secondary_master_key: str - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_master_key': {'readonly': True}, - 'secondary_master_key': {'readonly': True}, - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, - 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, - 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_master_key = None - self.secondary_master_key = None - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py deleted file mode 100755 index 3330353950c6..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListReadOnlyKeysResult(Model): - """The read-only access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py deleted file mode 100755 index 4cb94909c515..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseAccountPaged(Paged): - """ - A paging container for iterating over a list of DatabaseAccount object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py deleted file mode 100755 index be78a4fd6817..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountPatchParameters(Model): - """Parameters for patching Azure DocumentDB database account properties. - - :param tags: - :type tags: dict - """ - - _validation = { - 'tags': {'required': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, tags): - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py deleted file mode 100755 index 3bff90d33db3..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountRegenerateKeyParameters(Model): - """Parameters to regenerate the keys within the database account. - - :param key_kind: The access key to regenerate. Possible values include: - 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - """ - - _validation = { - 'key_kind': {'required': True}, - } - - _attribute_map = { - 'key_kind': {'key': 'keyKind', 'type': 'str'}, - } - - def __init__(self, key_kind): - self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py deleted file mode 100755 index 1e87cecaeb2a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class DatabaseAccountKind(Enum): - - global_document_db = "GlobalDocumentDB" - mongo_db = "MongoDB" - parse = "Parse" - - -class DatabaseAccountOfferType(Enum): - - standard = "Standard" - - -class DefaultConsistencyLevel(Enum): - - eventual = "Eventual" - session = "Session" - bounded_staleness = "BoundedStaleness" - strong = "Strong" - consistent_prefix = "ConsistentPrefix" - - -class KeyKind(Enum): - - primary = "primary" - secondary = "secondary" - primary_readonly = "primaryReadonly" - secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py deleted file mode 100755 index 4c3ebff5e3b5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicies(Model): - """The list of new failover policies for the failover priority change. - - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - """ - - _attribute_map = { - 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, failover_policies=None): - self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py deleted file mode 100755 index 99cc2769403b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicy(Model): - """The failover policy for a given region of a database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region in which the database - account replicates to. Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region in which the database account - exists. - :type location_name: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py deleted file mode 100755 index 8bc82bde2c3f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Location(Model): - """A region in which the Azure DocumentDB database account is deployed. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region within the database account. - Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region. - :type location_name: str - :ivar document_endpoint: The connection endpoint for the specific region. - Example: - https://<accountName>-<locationName>.documents.azure.com:443/ - :vartype document_endpoint: str - :param provisioning_state: - :type provisioning_state: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.document_endpoint = None - self.provisioning_state = provisioning_state - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py deleted file mode 100755 index d5e887d0b78a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """A database account resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, location, tags=None): - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py deleted file mode 100755 index 27ed7c069537..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .database_accounts_operations import DatabaseAccountsOperations - -__all__ = [ - 'DatabaseAccountsOperations', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py deleted file mode 100755 index 2bb39b1f6839..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py +++ /dev/null @@ -1,918 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrestazure.azure_operation import AzureOperationPoller -import uuid - -from .. import models - - -class DatabaseAccountsOperations(object): - """DatabaseAccountsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". - """ - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-04-08" - - self.config = config - - def get( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Retrieves the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def patch( - self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): - """Patches the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param tags: - :type tags: dict - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - update_parameters = models.DatabaseAccountPatchParameters(tags=tags) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(update_parameters, 'DatabaseAccountPatchParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.patch(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def create_or_update( - self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): - """Creates or updates an Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param create_update_parameters: The parameters to provide for the - current database account. - :type create_update_parameters: - :class:`DatabaseAccountCreateUpdateParameters - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def delete( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Deletes an existing Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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 - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - def long_running_send(): - - request = self._client.delete(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def failover_priority_change( - self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): - """Changes the failover priority for the Azure DocumentDB database - account. A failover priority of 0 indicates a write region. The maximum - value for a failover priority = (total number of regions - 1). Failover - priority values must be unique for each of the regions in which the - database account exists. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(failover_parameters, 'FailoverPolicies') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - subscription. - - :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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - given resource group. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the access keys for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_connection_strings( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the connection strings for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListConnectionStringsResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_read_only_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the read-only access keys for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListReadOnlyKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def regenerate_key( - self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): - """Regenerates an access key for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param key_kind: The access key to regenerate. Possible values - include: 'primary', 'secondary', 'primaryReadonly', - 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def check_name_exists( - self, account_name, custom_headers=None, raw=False, **operation_config): - """Checks that the Azure DocumentDB account name already exists. A valid - account name may contain only lowercase letters, numbers, and the '-' - character, and must be between 3 and 50 characters. - - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: bool - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' - path_format_arguments = { - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.head(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = (response.status_code == 200) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py deleted file mode 100755 index 95ed79d29108..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.3" - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -from distutils import log as logger -import os.path - -from wheel.bdist_wheel import bdist_wheel -class azure_bdist_wheel(bdist_wheel): - """The purpose of this class is to build wheel a little differently than the sdist, - without requiring to build the wheel from the sdist (i.e. you can build the wheel - directly from source). - """ - - description = "Create an Azure wheel distribution" - - user_options = bdist_wheel.user_options + \ - [('azure-namespace-package=', None, - "Name of the deepest nspkg used")] - - def initialize_options(self): - bdist_wheel.initialize_options(self) - self.azure_namespace_package = None - - def finalize_options(self): - bdist_wheel.finalize_options(self) - if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): - raise ValueError("azure_namespace_package must finish by -nspkg") - - def run(self): - if not self.distribution.install_requires: - self.distribution.install_requires = [] - self.distribution.install_requires.append( - "{}>=2.0.0".format(self.azure_namespace_package)) - bdist_wheel.run(self) - - def write_record(self, bdist_dir, distinfo_dir): - if self.azure_namespace_package: - # Split and remove last part, assuming it's "nspkg" - subparts = self.azure_namespace_package.split('-')[0:-1] - folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] - for azure_sub_package in folder_with_init: - init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') - if os.path.isfile(init_file): - logger.info("manually remove {} while building the wheel".format(init_file)) - os.remove(init_file) - else: - raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) - bdist_wheel.write_record(self, bdist_dir, distinfo_dir) -cmdclass = { - 'bdist_wheel': azure_bdist_wheel, -} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json deleted file mode 100644 index 4d98fc12a39e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/build.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "autorest": "1.0.1-20170501-2300-nightly", - "date": "2017-05-01T20:13:42Z", - "version": "0.1.3" -} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt deleted file mode 100644 index 6ccb7f031ddd..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt +++ /dev/null @@ -1 +0,0 @@ --e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml deleted file mode 100644 index e7687fdae93b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml +++ /dev/null @@ -1,2 +0,0 @@ -[packaging] -auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg deleted file mode 100644 index 856f4164982c..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[bdist_wheel] -universal=1 -azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py deleted file mode 100644 index ddef54e31bb5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.py +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env python - -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup -try: - from azure_bdist_wheel import cmdclass -except ImportError: - from distutils import log as logger - logger.warn("Wheel is not available, disabling bdist_wheel hook") - cmdclass = {} - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-documentdb" -PACKAGE_PPRINT_NAME = "DocumentDB Management" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') - -# azure v0.x is not compatible with this package -# azure v0.x used to have a __version__ attribute (newer versions don't) -try: - import azure - try: - ver = azure.__version__ - raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' - ) - except AttributeError: - pass -except ImportError: - pass - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError('Cannot find version information') - -with open('README.rst', encoding='utf-8') as f: - readme = f.read() -with open('HISTORY.rst', encoding='utf-8') as f: - history = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + history, - license='MIT License', - author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', - classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'License :: OSI Approved :: MIT License', - ], - zip_safe=False, - packages=find_packages(), - install_requires=[ - 'msrestazure~=0.4.7', - 'azure-common~=1.1.5', - ], - cmdclass=cmdclass -) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml deleted file mode 100644 index d470d7f8673d..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml +++ /dev/null @@ -1,193 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] - method: HEAD - uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: ''} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['142'] - Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-ratelimit-remaining-tenant-reads: ['14999'] - x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] - status: {code: 404, message: NotFound} -- request: - body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], - "databaseAccountOfferType": "Standard"}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['121'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['910'] - x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Completed","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['33'] - x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml deleted file mode 100644 index e6f4e2348f8f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml +++ /dev/null @@ -1,467 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' - under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' - was not found."}}'} - headers: - Cache-Control: [no-cache] - Content-Length: ['214'] - Content-Type: [application/json; charset=utf-8] - Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-failure-cause: [gateway] - x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] - status: {code: 404, message: Not Found} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml deleted file mode 100644 index b2e4b82a9d9e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml +++ /dev/null @@ -1,272 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1144'] - x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1156'] - x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['2225'] - x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] - status: {code: 200, message: Ok} -- request: - body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['73'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 - response: - body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique - and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['170'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] - status: {code: 400, message: BadRequest} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 - response: - body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['239'] - x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] - status: {code: 200, message: Ok} -- request: - body: '{"keyKind": "primary"}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['22'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] - x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py deleted file mode 100644 index 902666a22cf0..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py +++ /dev/null @@ -1,146 +0,0 @@ -# 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. -#-------------------------------------------------------------------------- -import unittest - -import azure.mgmt.documentdb -from msrestazure.azure_exceptions import CloudError -from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer - - -class MgmtDocDBTest(AzureMgmtTestCase): - - def setUp(self): - super(MgmtDocDBTest, self).setUp() - self.client = self.create_mgmt_client( - azure.mgmt.documentdb.DocumentDB - ) - - @ResourceGroupPreparer() - def test_accounts_create(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtst') - - self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) - - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - account = async_docdb_create.result() - self.assertIsNotNone(account) - # Rest API issue - # self.assertEqual(account.name, account_name) - - @ResourceGroupPreparer() - def test_accounts_features(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtest') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - account = self.client.database_accounts.get( - resource_group.name, - account_name - ) - self.assertEqual(account.name, account_name) - - my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) - self.assertEqual(len(my_accounts), 1) - self.assertEqual(my_accounts[0].name, account_name) - - my_accounts = list(self.client.database_accounts.list()) - self.assertTrue(len(my_accounts) >= 1) - self.assertTrue(any(db.name == account_name for db in my_accounts)) - - # I guess we can make this test with no error, need to check with DocDB team - # This is an interesting test anyway, this implies that the serialization works - # and error message is available. Since this method does not return an object - # (i.e. no deserialization to test), this is a complete test. - # We are NOT here to test the RestAPI, but the Swagger file and Python code. - with self.assertRaises(CloudError) as cm: - async_change = self.client.database_accounts.failover_priority_change( - resource_group.name, - account_name, - [{ - 'location_name': self.region, - 'failover_priority': 0 - }] - ) - async_change.wait() - self.assertIn('Failover priorities must be unique', cm.exception.message) - - my_keys = self.client.database_accounts.list_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_master_key) - self.assertIsNotNone(my_keys.secondary_master_key) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - my_keys = self.client.database_accounts.list_read_only_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - async_regenerate = self.client.database_accounts.regenerate_key( - resource_group.name, - account_name, - "primary" - ) - async_regenerate.wait() - - @ResourceGroupPreparer() - def test_accounts_delete(self, resource_group, location): - account_name = self.get_resource_name('pydocumentdbtst') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - # Current implementation of msrestazure does not support 404 as a end of LRO delete - # https://github.com/Azure/msrestazure-for-python/issues/7 - async_delete = self.client.database_accounts.delete(resource_group.name, account_name) - try: - async_delete.wait() - except CloudError as err: - if err.response.status_code != 404: - raise - - -#------------------------------------------------------------------------------ -if __name__ == '__main__': - unittest.main() From fac5cc37b86dd5b04e1a78242ac63a310cd7ef9c Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:42:03 -0700 Subject: [PATCH 069/244] Revert "Remove docdb mgmt package from master (#6585)" (#6593) This reverts commit d2ed7d87997eac9b715ee9802c15349a12446b84. --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 + sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 + sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 + .../azure-mgmt-documentdb/azure/__init__.py | 1 + .../azure/mgmt/__init__.py | 1 + .../azure/mgmt/documentdb/__init__.py | 18 + .../azure/mgmt/documentdb/document_db.py | 83 ++ .../azure/mgmt/documentdb/models/__init__.py | 52 + .../documentdb/models/consistency_policy.py | 50 + .../documentdb/models/database_account.py | 117 +++ .../database_account_connection_string.py | 39 + ...tabase_account_create_update_parameters.py | 90 ++ ..._account_list_connection_strings_result.py | 29 + .../database_account_list_keys_result.py | 53 + ...base_account_list_read_only_keys_result.py | 41 + .../models/database_account_paged.py | 27 + .../database_account_patch_parameters.py | 31 + ...abase_account_regenerate_key_parameters.py | 33 + .../documentdb/models/document_db_enums.py | 41 + .../documentdb/models/failover_policies.py | 28 + .../mgmt/documentdb/models/failover_policy.py | 48 + .../azure/mgmt/documentdb/models/location.py | 58 ++ .../azure/mgmt/documentdb/models/resource.py | 54 ++ .../mgmt/documentdb/operations/__init__.py | 16 + .../database_accounts_operations.py | 918 ++++++++++++++++++ .../azure/mgmt/documentdb/version.py | 13 + .../azure_bdist_wheel.py | 54 ++ sdk/cosmos/azure-mgmt-documentdb/build.json | 5 + .../dev_requirements.txt | 1 + .../azure-mgmt-documentdb/sdk_packaging.toml | 2 + sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 + sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 ++ ..._mgmt_documentdb.test_accounts_create.yaml | 193 ++++ ..._mgmt_documentdb.test_accounts_delete.yaml | 467 +++++++++ ...gmt_documentdb.test_accounts_features.yaml | 272 ++++++ .../tests/test_mgmt_documentdb.py | 146 +++ 36 files changed, 3147 insertions(+) create mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in create mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json create mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt create mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst new file mode 100644 index 000000000000..eb7345b4071e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst @@ -0,0 +1,24 @@ +.. :changelog: + +Release History +=============== + +0.1.3 (2017-05-02) +++++++++++++++++++ + +* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix + +0.1.2 (2017-04-20) +++++++++++++++++++ + +This wheel package is now built with the azure wheel extension + +0.1.1 (2017-03-21) +++++++++++++++++++ + +* Added support for listing database account connection strings + +0.1.0 (2017-01-31) +++++++++++++++++++ + +* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in new file mode 100644 index 000000000000..9ecaeb15de50 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in @@ -0,0 +1,2 @@ +include *.rst +include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst new file mode 100644 index 000000000000..a5204ea75358 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/README.rst @@ -0,0 +1,52 @@ +Microsoft Azure SDK for Python +============================== + +This is the Microsoft Azure DocumentDB Management Client Library. + +Azure Resource Manager (ARM) is the next generation of management APIs that +replace the old Azure Service Management (ASM). + +This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. + +For the older Azure Service Management (ASM) libraries, see +`azure-servicemanagement-legacy `__ library. + +For a more complete set of Azure libraries, see the `azure `__ bundle package. + + +Compatibility +============= + +**IMPORTANT**: If you have an earlier version of the azure package +(version < 1.0), you should uninstall it before installing this package. + +You can check the version using pip: + +.. code:: shell + + pip freeze + +If you see azure==0.11.0 (or any version below 1.0), uninstall it first: + +.. code:: shell + + pip uninstall azure + + +Usage +===== + +For code examples, see `DocumentDB Management +`__ +on readthedocs.org. + + +Provide Feedback +================ + +If you encounter any bugs or have suggestions, please file an issue in the +`Issues `__ +section of the project. + + +.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py new file mode 100755 index 000000000000..3ec900145f1e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .document_db import DocumentDB +from .version import VERSION + +__all__ = ['DocumentDB'] + +__version__ = VERSION + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py new file mode 100755 index 000000000000..5eda44ab3e32 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import ServiceClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.database_accounts_operations import DatabaseAccountsOperations +from . import models + + +class DocumentDBConfiguration(AzureConfiguration): + """Configuration for DocumentDB + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not isinstance(subscription_id, str): + raise TypeError("Parameter 'subscription_id' must be str.") + if not base_url: + base_url = 'https://management.azure.com' + + super(DocumentDBConfiguration, self).__init__(base_url) + + self.add_user_agent('documentdb/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class DocumentDB(object): + """Azure DocumentDB Database Service Resource Provider REST API + + :ivar config: Configuration for client. + :vartype config: DocumentDBConfiguration + + :ivar database_accounts: DatabaseAccounts operations + :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) + self._client = ServiceClient(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2015-04-08' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.database_accounts = DatabaseAccountsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py new file mode 100755 index 000000000000..2ed68c568a84 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .consistency_policy import ConsistencyPolicy +from .location import Location +from .failover_policy import FailoverPolicy +from .database_account import DatabaseAccount +from .failover_policies import FailoverPolicies +from .resource import Resource +from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters +from .database_account_patch_parameters import DatabaseAccountPatchParameters +from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult +from .database_account_list_keys_result import DatabaseAccountListKeysResult +from .database_account_connection_string import DatabaseAccountConnectionString +from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult +from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters +from .database_account_paged import DatabaseAccountPaged +from .document_db_enums import ( + DatabaseAccountKind, + DatabaseAccountOfferType, + DefaultConsistencyLevel, + KeyKind, +) + +__all__ = [ + 'ConsistencyPolicy', + 'Location', + 'FailoverPolicy', + 'DatabaseAccount', + 'FailoverPolicies', + 'Resource', + 'DatabaseAccountCreateUpdateParameters', + 'DatabaseAccountPatchParameters', + 'DatabaseAccountListReadOnlyKeysResult', + 'DatabaseAccountListKeysResult', + 'DatabaseAccountConnectionString', + 'DatabaseAccountListConnectionStringsResult', + 'DatabaseAccountRegenerateKeyParameters', + 'DatabaseAccountPaged', + 'DatabaseAccountKind', + 'DatabaseAccountOfferType', + 'DefaultConsistencyLevel', + 'KeyKind', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py new file mode 100755 index 000000000000..d8cefd4c0b59 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConsistencyPolicy(Model): + """The consistency policy for the DocumentDB database account. + + :param default_consistency_level: The default consistency level and + configuration settings of the DocumentDB account. Possible values include: + 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' + :type default_consistency_level: str or :class:`DefaultConsistencyLevel + ` + :param max_staleness_prefix: When used with the Bounded Staleness + consistency level, this value represents the number of stale requests + tolerated. Accepted range for this value is 1 – 2,147,483,647. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_staleness_prefix: long + :param max_interval_in_seconds: When used with the Bounded Staleness + consistency level, this value represents the time amount of staleness (in + seconds) tolerated. Accepted range for this value is 1 - 100. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_interval_in_seconds: int + """ + + _validation = { + 'default_consistency_level': {'required': True}, + 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, + 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, + 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, + 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, + } + + def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): + self.default_consistency_level = default_consistency_level + self.max_staleness_prefix = max_staleness_prefix + self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py new file mode 100755 index 000000000000..89031adc35cb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py @@ -0,0 +1,117 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccount(Resource): + """A DocumentDB database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param provisioning_state: + :type provisioning_state: str + :ivar document_endpoint: The connection endpoint for the DocumentDB + database account. + :vartype document_endpoint: str + :ivar database_account_offer_type: The offer type for the DocumentDB + database account. Default value: Standard. Possible values include: + 'Standard' + :vartype database_account_offer_type: str or + :class:`DatabaseAccountOfferType + ` + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + :param consistency_policy: The consistency policy for the DocumentDB + database account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :ivar write_locations: An array that contains the write location for the + DocumentDB account. + :vartype write_locations: list of :class:`Location + ` + :ivar read_locations: An array that contains of the read locations enabled + for the DocumentDB account. + :vartype read_locations: list of :class:`Location + ` + :ivar failover_policies: An array that contains the regions ordered by + their failover priorities. + :vartype failover_policies: list of :class:`FailoverPolicy + ` + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'document_endpoint': {'readonly': True}, + 'database_account_offer_type': {'readonly': True}, + 'write_locations': {'readonly': True}, + 'read_locations': {'readonly': True}, + 'failover_policies': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, + 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, + 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): + super(DatabaseAccount, self).__init__(location=location, tags=tags) + self.kind = kind + self.provisioning_state = provisioning_state + self.document_endpoint = None + self.database_account_offer_type = None + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover + self.consistency_policy = consistency_policy + self.write_locations = None + self.read_locations = None + self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py new file mode 100755 index 000000000000..db1828208069 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountConnectionString(Model): + """Connection string for the DocumentDB account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar connection_string: Value of the connection string + :vartype connection_string: str + :ivar description: Description of the connection string + :vartype description: str + """ + + _validation = { + 'connection_string': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self): + self.connection_string = None + self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py new file mode 100755 index 000000000000..30978f482f0b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccountCreateUpdateParameters(Resource): + """Parameters to create and update DocumentDB database accounts. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param consistency_policy: The consistency policy for the DocumentDB + account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :param locations: An array that contains the georeplication locations + enabled for the DocumentDB account. + :type locations: list of :class:`Location + ` + :ivar database_account_offer_type: Default value: "Standard" . + :vartype database_account_offer_type: str + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'locations': {'required': True}, + 'database_account_offer_type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + } + + database_account_offer_type = "Standard" + + def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): + super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) + self.kind = kind + self.consistency_policy = consistency_policy + self.locations = locations + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py new file mode 100755 index 000000000000..7cddc00a3de1 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListConnectionStringsResult(Model): + """The connection strings for the given database account. + + :param connection_strings: An array that contains the connection strings + for the DocumentDB account. + :type connection_strings: list of :class:`DatabaseAccountConnectionString + ` + """ + + _attribute_map = { + 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, + } + + def __init__(self, connection_strings=None): + self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py new file mode 100755 index 000000000000..4d775054ac14 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListKeysResult(Model): + """The access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_master_key: Base 64 encoded value of the primary read-write + key. + :vartype primary_master_key: str + :ivar secondary_master_key: Base 64 encoded value of the secondary + read-write key. + :vartype secondary_master_key: str + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_master_key': {'readonly': True}, + 'secondary_master_key': {'readonly': True}, + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, + 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, + 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_master_key = None + self.secondary_master_key = None + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py new file mode 100755 index 000000000000..3330353950c6 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListReadOnlyKeysResult(Model): + """The read-only access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py new file mode 100755 index 000000000000..4cb94909c515 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class DatabaseAccountPaged(Paged): + """ + A paging container for iterating over a list of DatabaseAccount object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py new file mode 100755 index 000000000000..be78a4fd6817 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountPatchParameters(Model): + """Parameters for patching Azure DocumentDB database account properties. + + :param tags: + :type tags: dict + """ + + _validation = { + 'tags': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, tags): + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py new file mode 100755 index 000000000000..3bff90d33db3 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountRegenerateKeyParameters(Model): + """Parameters to regenerate the keys within the database account. + + :param key_kind: The access key to regenerate. Possible values include: + 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + """ + + _validation = { + 'key_kind': {'required': True}, + } + + _attribute_map = { + 'key_kind': {'key': 'keyKind', 'type': 'str'}, + } + + def __init__(self, key_kind): + self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py new file mode 100755 index 000000000000..1e87cecaeb2a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class DatabaseAccountKind(Enum): + + global_document_db = "GlobalDocumentDB" + mongo_db = "MongoDB" + parse = "Parse" + + +class DatabaseAccountOfferType(Enum): + + standard = "Standard" + + +class DefaultConsistencyLevel(Enum): + + eventual = "Eventual" + session = "Session" + bounded_staleness = "BoundedStaleness" + strong = "Strong" + consistent_prefix = "ConsistentPrefix" + + +class KeyKind(Enum): + + primary = "primary" + secondary = "secondary" + primary_readonly = "primaryReadonly" + secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py new file mode 100755 index 000000000000..4c3ebff5e3b5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicies(Model): + """The list of new failover policies for the failover priority change. + + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + """ + + _attribute_map = { + 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, failover_policies=None): + self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py new file mode 100755 index 000000000000..99cc2769403b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicy(Model): + """The failover policy for a given region of a database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region in which the database + account replicates to. Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region in which the database account + exists. + :type location_name: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py new file mode 100755 index 000000000000..8bc82bde2c3f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Location(Model): + """A region in which the Azure DocumentDB database account is deployed. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region within the database account. + Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region. + :type location_name: str + :ivar document_endpoint: The connection endpoint for the specific region. + Example: + https://<accountName>-<locationName>.documents.azure.com:443/ + :vartype document_endpoint: str + :param provisioning_state: + :type provisioning_state: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'document_endpoint': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.document_endpoint = None + self.provisioning_state = provisioning_state + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py new file mode 100755 index 000000000000..d5e887d0b78a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """A database account resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, location, tags=None): + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py new file mode 100755 index 000000000000..27ed7c069537 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py @@ -0,0 +1,16 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .database_accounts_operations import DatabaseAccountsOperations + +__all__ = [ + 'DatabaseAccountsOperations', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py new file mode 100755 index 000000000000..2bb39b1f6839 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py @@ -0,0 +1,918 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrestazure.azure_operation import AzureOperationPoller +import uuid + +from .. import models + + +class DatabaseAccountsOperations(object): + """DatabaseAccountsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". + """ + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-04-08" + + self.config = config + + def get( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Retrieves the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def patch( + self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): + """Patches the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param tags: + :type tags: dict + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + update_parameters = models.DatabaseAccountPatchParameters(tags=tags) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(update_parameters, 'DatabaseAccountPatchParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.patch(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def create_or_update( + self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates an Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param create_update_parameters: The parameters to provide for the + current database account. + :type create_update_parameters: + :class:`DatabaseAccountCreateUpdateParameters + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.put(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def delete( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Deletes an existing Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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 + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + def long_running_send(): + + request = self._client.delete(url, query_parameters) + return self._client.send(request, header_parameters, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def failover_priority_change( + self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): + """Changes the failover priority for the Azure DocumentDB database + account. A failover priority of 0 indicates a write region. The maximum + value for a failover priority = (total number of regions - 1). Failover + priority values must be unique for each of the regions in which the + database account exists. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(failover_parameters, 'FailoverPolicies') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + subscription. + + :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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + given resource group. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the access keys for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_connection_strings( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the connection strings for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListConnectionStringsResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_read_only_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the read-only access keys for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListReadOnlyKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def regenerate_key( + self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): + """Regenerates an access key for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param key_kind: The access key to regenerate. Possible values + include: 'primary', 'secondary', 'primaryReadonly', + 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def check_name_exists( + self, account_name, custom_headers=None, raw=False, **operation_config): + """Checks that the Azure DocumentDB account name already exists. A valid + account name may contain only lowercase letters, numbers, and the '-' + character, and must be between 3 and 50 characters. + + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: bool + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' + path_format_arguments = { + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.head(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = (response.status_code == 200) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py new file mode 100755 index 000000000000..95ed79d29108 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.3" + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py new file mode 100644 index 000000000000..8a81d1b61775 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py @@ -0,0 +1,54 @@ +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +from distutils import log as logger +import os.path + +from wheel.bdist_wheel import bdist_wheel +class azure_bdist_wheel(bdist_wheel): + """The purpose of this class is to build wheel a little differently than the sdist, + without requiring to build the wheel from the sdist (i.e. you can build the wheel + directly from source). + """ + + description = "Create an Azure wheel distribution" + + user_options = bdist_wheel.user_options + \ + [('azure-namespace-package=', None, + "Name of the deepest nspkg used")] + + def initialize_options(self): + bdist_wheel.initialize_options(self) + self.azure_namespace_package = None + + def finalize_options(self): + bdist_wheel.finalize_options(self) + if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): + raise ValueError("azure_namespace_package must finish by -nspkg") + + def run(self): + if not self.distribution.install_requires: + self.distribution.install_requires = [] + self.distribution.install_requires.append( + "{}>=2.0.0".format(self.azure_namespace_package)) + bdist_wheel.run(self) + + def write_record(self, bdist_dir, distinfo_dir): + if self.azure_namespace_package: + # Split and remove last part, assuming it's "nspkg" + subparts = self.azure_namespace_package.split('-')[0:-1] + folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] + for azure_sub_package in folder_with_init: + init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') + if os.path.isfile(init_file): + logger.info("manually remove {} while building the wheel".format(init_file)) + os.remove(init_file) + else: + raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) + bdist_wheel.write_record(self, bdist_dir, distinfo_dir) +cmdclass = { + 'bdist_wheel': azure_bdist_wheel, +} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json new file mode 100644 index 000000000000..4d98fc12a39e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/build.json @@ -0,0 +1,5 @@ +{ + "autorest": "1.0.1-20170501-2300-nightly", + "date": "2017-05-01T20:13:42Z", + "version": "0.1.3" +} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt new file mode 100644 index 000000000000..6ccb7f031ddd --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt @@ -0,0 +1 @@ +-e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml new file mode 100644 index 000000000000..e7687fdae93b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg new file mode 100644 index 000000000000..856f4164982c --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg @@ -0,0 +1,3 @@ +[bdist_wheel] +universal=1 +azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py new file mode 100644 index 000000000000..ddef54e31bb5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup +try: + from azure_bdist_wheel import cmdclass +except ImportError: + from distutils import log as logger + logger.warn("Wheel is not available, disabling bdist_wheel hook") + cmdclass = {} + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-documentdb" +PACKAGE_PPRINT_NAME = "DocumentDB Management" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.rst', encoding='utf-8') as f: + readme = f.read() +with open('HISTORY.rst', encoding='utf-8') as f: + history = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + history, + license='MIT License', + author='Microsoft Corporation', + author_email='ptvshelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(), + install_requires=[ + 'msrestazure~=0.4.7', + 'azure-common~=1.1.5', + ], + cmdclass=cmdclass +) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml new file mode 100644 index 000000000000..d470d7f8673d --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml @@ -0,0 +1,193 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] + method: HEAD + uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: ''} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['142'] + Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-ratelimit-remaining-tenant-reads: ['14999'] + x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] + status: {code: 404, message: NotFound} +- request: + body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], + "databaseAccountOfferType": "Standard"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['121'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['910'] + x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Completed","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['33'] + x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml new file mode 100644 index 000000000000..e6f4e2348f8f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml @@ -0,0 +1,467 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' + under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' + was not found."}}'} + headers: + Cache-Control: [no-cache] + Content-Length: ['214'] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-failure-cause: [gateway] + x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] + status: {code: 404, message: Not Found} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml new file mode 100644 index 000000000000..b2e4b82a9d9e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml @@ -0,0 +1,272 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1144'] + x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1156'] + x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2225'] + x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] + status: {code: 200, message: Ok} +- request: + body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['73'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 + response: + body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique + and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['170'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] + status: {code: 400, message: BadRequest} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 + response: + body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['239'] + x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] + status: {code: 200, message: Ok} +- request: + body: '{"keyKind": "primary"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['22'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] + x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py new file mode 100644 index 000000000000..902666a22cf0 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py @@ -0,0 +1,146 @@ +# 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. +#-------------------------------------------------------------------------- +import unittest + +import azure.mgmt.documentdb +from msrestazure.azure_exceptions import CloudError +from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer + + +class MgmtDocDBTest(AzureMgmtTestCase): + + def setUp(self): + super(MgmtDocDBTest, self).setUp() + self.client = self.create_mgmt_client( + azure.mgmt.documentdb.DocumentDB + ) + + @ResourceGroupPreparer() + def test_accounts_create(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtst') + + self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) + + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + account = async_docdb_create.result() + self.assertIsNotNone(account) + # Rest API issue + # self.assertEqual(account.name, account_name) + + @ResourceGroupPreparer() + def test_accounts_features(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtest') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + account = self.client.database_accounts.get( + resource_group.name, + account_name + ) + self.assertEqual(account.name, account_name) + + my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) + self.assertEqual(len(my_accounts), 1) + self.assertEqual(my_accounts[0].name, account_name) + + my_accounts = list(self.client.database_accounts.list()) + self.assertTrue(len(my_accounts) >= 1) + self.assertTrue(any(db.name == account_name for db in my_accounts)) + + # I guess we can make this test with no error, need to check with DocDB team + # This is an interesting test anyway, this implies that the serialization works + # and error message is available. Since this method does not return an object + # (i.e. no deserialization to test), this is a complete test. + # We are NOT here to test the RestAPI, but the Swagger file and Python code. + with self.assertRaises(CloudError) as cm: + async_change = self.client.database_accounts.failover_priority_change( + resource_group.name, + account_name, + [{ + 'location_name': self.region, + 'failover_priority': 0 + }] + ) + async_change.wait() + self.assertIn('Failover priorities must be unique', cm.exception.message) + + my_keys = self.client.database_accounts.list_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_master_key) + self.assertIsNotNone(my_keys.secondary_master_key) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + my_keys = self.client.database_accounts.list_read_only_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + async_regenerate = self.client.database_accounts.regenerate_key( + resource_group.name, + account_name, + "primary" + ) + async_regenerate.wait() + + @ResourceGroupPreparer() + def test_accounts_delete(self, resource_group, location): + account_name = self.get_resource_name('pydocumentdbtst') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + # Current implementation of msrestazure does not support 404 as a end of LRO delete + # https://github.com/Azure/msrestazure-for-python/issues/7 + async_delete = self.client.database_accounts.delete(resource_group.name, account_name) + try: + async_delete.wait() + except CloudError as err: + if err.response.status_code != 404: + raise + + +#------------------------------------------------------------------------------ +if __name__ == '__main__': + unittest.main() From ed10b3d15822bd4ae7dabb7e0ff9e693b3f92ab1 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Wed, 24 Jul 2019 17:41:59 -0700 Subject: [PATCH 070/244] Trace identity (#6455) * make sure its int. Need it to pass the test * added policy and decorator * dont decorate authn * loggin policy behind retry policy * managed should not be decoratored * dont need my workaround * dont trace get_token * dont need this extra indent --- .../azure-identity/azure/identity/_authn_client.py | 3 ++- .../azure-identity/azure/identity/aio/_authn_client.py | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/sdk/identity/azure-identity/azure/identity/_authn_client.py b/sdk/identity/azure-identity/azure/identity/_authn_client.py index 14d86ff8c9f7..09fc166d917e 100644 --- a/sdk/identity/azure-identity/azure/identity/_authn_client.py +++ b/sdk/identity/azure-identity/azure/identity/_authn_client.py @@ -10,6 +10,7 @@ from azure.core.exceptions import ClientAuthenticationError from azure.core.pipeline import Pipeline from azure.core.pipeline.policies import ContentDecodePolicy, NetworkTraceLoggingPolicy, RetryPolicy +from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy from azure.core.pipeline.transport import HttpTransport, RequestsTransport from msal import TokenCache @@ -119,7 +120,7 @@ class AuthnClient(AuthnClientBase): def __init__(self, auth_url, config=None, policies=None, transport=None, **kwargs): # type: (str, Optional[Configuration], Optional[Iterable[HTTPPolicy]], Optional[HttpTransport], Mapping[str, Any]) -> None config = config or self.create_config(**kwargs) - policies = policies or [ContentDecodePolicy(), config.logging_policy, config.retry_policy] + policies = policies or [ContentDecodePolicy(), config.retry_policy, config.logging_policy, DistributedTracingPolicy()] if not transport: transport = RequestsTransport(**kwargs) self._pipeline = Pipeline(transport=transport, policies=policies) diff --git a/sdk/identity/azure-identity/azure/identity/aio/_authn_client.py b/sdk/identity/azure-identity/azure/identity/aio/_authn_client.py index 6b57a9d02d2d..4d75cd07b1a3 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/_authn_client.py +++ b/sdk/identity/azure-identity/azure/identity/aio/_authn_client.py @@ -8,6 +8,7 @@ from azure.core import Configuration from azure.core.credentials import AccessToken from azure.core.pipeline import AsyncPipeline +from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy from azure.core.pipeline.policies import AsyncRetryPolicy, ContentDecodePolicy, HTTPPolicy, NetworkTraceLoggingPolicy from azure.core.pipeline.transport import AsyncHttpTransport from azure.core.pipeline.transport.requests_asyncio import AsyncioRequestsTransport @@ -27,7 +28,12 @@ def __init__( **kwargs: Mapping[str, Any] ) -> None: config = config or self.create_config(**kwargs) - policies = policies or [ContentDecodePolicy(), config.logging_policy, config.retry_policy] + policies = policies or [ + ContentDecodePolicy(), + config.retry_policy, + config.logging_policy, + DistributedTracingPolicy(), + ] if not transport: transport = AsyncioRequestsTransport(**kwargs) self._pipeline = AsyncPipeline(transport=transport, policies=policies) From 2726996ffab88358b7661c9f3d7c37546d3737a8 Mon Sep 17 00:00:00 2001 From: Kate Olszewska Date: Thu, 25 Jul 2019 09:52:14 -0700 Subject: [PATCH 071/244] Update root README.md Updating the Contributing section according to the guidelines --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index de33c04f8fa3..e11a735c6574 100644 --- a/README.md +++ b/README.md @@ -53,9 +53,14 @@ Libraries which enable you to provision specific resources. They are responsible ## Contributing For details on contributing to this repository, see the [contributing guide](CONTRIBUTING.md). -## Code of Conduct +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit +https://cla.microsoft.com. -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2FREADME.png) From 9117be13d6dfbf091b155fc34b6fdaf946e29f61 Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 10:16:27 -0700 Subject: [PATCH 072/244] Update CODEOWNERS --- .github/CODEOWNERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e7da96b211dc..518b5aa20c8c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -37,6 +37,9 @@ /sql/sql/ @jaredmoo /sdk/servicebus/azure-servicebus/ @annatisch +# Management Plane +/**/*mgmt*/ @zikalino + ########### # Eng Sys ########### From 4dec5e7f45ae3fda13f9c4f5ce41a98788ee6372 Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 11:03:35 -0700 Subject: [PATCH 073/244] more code owners --- .github/CODEOWNERS | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 518b5aa20c8c..07d57ac48320 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -6,20 +6,20 @@ ########### # Catch all -# /sdk/ @mayurid +/sdk/ @mayurid # Core -/sdk/core/ @lmazuel +/sdk/core/ @lmazuel @xiangyan99 @johanste /sdk/core/azure-core/ @xiangyan99 @bryevdv # Service team -# /sdk/identity/ -# /sdk/eventhub/ +/sdk/identity/ @chlowell @schaabs +/sdk/eventhub/ @annatisch @yunhaoling @YijunXieMS /sdk/storage/ @zezha-msft @annatisch @rakshith91 /sdk/applicationinsights/ @alexeldeib /sdk/batch/ @bgklein @matthchr @xingwu1 /sdk/cognitiveservices/azure-cognitiveservices-vision-customvision/ @areddish -/sdk/keyvault/ @schaabs @chlowell +/sdk/keyvault/ @schaabs @chlowell @iscai-msft /sdk/loganalytics/ @alexeldeib /sdk/consumption/ @sandeepnl /sdk/containerinstance/ @samkreter @xizhamsft @@ -35,7 +35,7 @@ /sdk/recoveryservices/ @DheerendraRathor /sdk/servicefabric/ @QingChenmsft @samedder /sql/sql/ @jaredmoo -/sdk/servicebus/azure-servicebus/ @annatisch +/sdk/servicebus/azure-servicebus/ @annatisch @yunhaoling @YijunXieMS # Management Plane /**/*mgmt*/ @zikalino From 9267c7098f917f4c825ccc2c3e0075ae6c438bb4 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 11:58:35 -0700 Subject: [PATCH 074/244] add policy and decorators for secrets (#6453) --- .../azure/keyvault/secrets/_client.py | 13 +++++++++++++ .../keyvault/secrets/_shared/async_client_base.py | 2 ++ .../azure/keyvault/secrets/_shared/client_base.py | 2 ++ .../azure/keyvault/secrets/aio/_client.py | 14 ++++++++++++++ 4 files changed, 31 insertions(+) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py index f15b6779b9d3..1f0a670bf217 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py @@ -13,6 +13,7 @@ from typing import Any, Dict, Generator, Mapping, Optional from azure.core.exceptions import ResourceExistsError, ResourceNotFoundError +from azure.core.tracing.decorator import distributed_trace from ._shared import KeyVaultClientBase from ._models import Secret, DeletedSecret, SecretAttributes @@ -32,6 +33,7 @@ class SecretClient(KeyVaultClientBase): # pylint:disable=protected-access + @distributed_trace def get_secret(self, name, version=None, **kwargs): # type: (str, str, Mapping[str, Any]) -> Secret """Get a specified secret from the vault. @@ -59,6 +61,7 @@ def get_secret(self, name, version=None, **kwargs): ) return Secret._from_secret_bundle(bundle) + @distributed_trace def set_secret( self, name, value, content_type=None, enabled=None, not_before=None, expires=None, tags=None, **kwargs ): @@ -101,6 +104,7 @@ def set_secret( ) return Secret._from_secret_bundle(bundle) + @distributed_trace def update_secret( self, name, version=None, content_type=None, enabled=None, not_before=None, expires=None, tags=None, **kwargs ): @@ -151,6 +155,7 @@ def update_secret( ) return SecretAttributes._from_secret_bundle(bundle) # pylint: disable=protected-access + @distributed_trace def list_secrets(self, **kwargs): # type: (Mapping[str, Any]) -> Generator[SecretAttributes] """List secrets in the vault. @@ -177,6 +182,7 @@ def list_secrets(self, **kwargs): pages = self._client.get_secrets(self._vault_url, maxresults=max_page_size, **kwargs) return (SecretAttributes._from_secret_item(item) for item in pages) + @distributed_trace def list_secret_versions(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> Generator[SecretAttributes] """List all versions of the specified secret. @@ -203,6 +209,7 @@ def list_secret_versions(self, name, **kwargs): pages = self._client.get_secret_versions(self._vault_url, name, maxresults=max_page_size, **kwargs) return (SecretAttributes._from_secret_item(item) for item in pages) + @distributed_trace def backup_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> bytes """Backs up the specified secret. @@ -230,6 +237,7 @@ def backup_secret(self, name, **kwargs): ) return backup_result.value + @distributed_trace def restore_secret(self, backup, **kwargs): # type: (bytes, Mapping[str, Any]) -> SecretAttributes """Restore a backed up secret to the vault. @@ -254,6 +262,7 @@ def restore_secret(self, backup, **kwargs): bundle = self._client.restore_secret(self.vault_url, backup, error_map={409: ResourceExistsError}, **kwargs) return SecretAttributes._from_secret_bundle(bundle) + @distributed_trace def delete_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> DeletedSecret """Deletes a secret from the vault. @@ -279,6 +288,7 @@ def delete_secret(self, name, **kwargs): bundle = self._client.delete_secret(self.vault_url, name, error_map={404: ResourceNotFoundError}, **kwargs) return DeletedSecret._from_deleted_secret_bundle(bundle) + @distributed_trace def get_deleted_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> DeletedSecret """Gets the specified deleted secret. @@ -303,6 +313,7 @@ def get_deleted_secret(self, name, **kwargs): bundle = self._client.get_deleted_secret(self.vault_url, name, error_map={404: ResourceNotFoundError}, **kwargs) return DeletedSecret._from_deleted_secret_bundle(bundle) + @distributed_trace def list_deleted_secrets(self, **kwargs): # type: (Mapping[str, Any]) -> Generator[DeletedSecret] """Lists deleted secrets of the vault. @@ -328,6 +339,7 @@ def list_deleted_secrets(self, **kwargs): pages = self._client.get_deleted_secrets(self._vault_url, maxresults=max_page_size, **kwargs) return (DeletedSecret._from_deleted_secret_item(item) for item in pages) + @distributed_trace def purge_deleted_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> None """Permanently deletes the specified secret. @@ -350,6 +362,7 @@ def purge_deleted_secret(self, name, **kwargs): """ self._client.purge_deleted_secret(self.vault_url, name, **kwargs) + @distributed_trace def recover_deleted_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> SecretAttributes """Recovers the deleted secret to the latest version. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index a24761a6afe6..c40e314accc7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,6 +6,7 @@ from azure.core.async_paging import AsyncPagedMixin from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline +from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport from msrest.serialization import Model @@ -100,6 +101,7 @@ def _build_pipeline(config: Configuration, transport: HttpTransport, **kwargs: A config.retry_policy, config.authentication_policy, config.logging_policy, + DistributedTracingPolicy(), ] if transport is None: diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/client_base.py index 6a3253c77655..dbde6d74f640 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/client_base.py @@ -15,6 +15,7 @@ from azure.core.pipeline.transport import HttpTransport from .challenge_auth_policy import ChallengeAuthPolicy +from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy KEY_VAULT_SCOPE = "https://vault.azure.net/.default" @@ -73,6 +74,7 @@ def _build_pipeline(self, config, transport, **kwargs): config.retry_policy, config.authentication_policy, config.logging_policy, + DistributedTracingPolicy(), ] if transport is None: diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py index d7cf860c4309..89a0fa98836e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py @@ -6,6 +6,8 @@ from typing import Any, AsyncIterable, Mapping, Optional, Dict from azure.core.exceptions import ResourceExistsError, ResourceNotFoundError +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.keyvault.secrets._models import Secret, DeletedSecret, SecretAttributes from .._shared import AsyncKeyVaultClientBase, AsyncPagingAdapter @@ -25,6 +27,7 @@ class SecretClient(AsyncKeyVaultClientBase): # pylint:disable=protected-access + @distributed_trace_async async def get_secret(self, name: str, version: Optional[str] = None, **kwargs: Mapping[str, Any]) -> Secret: """Get a specified secret from the vault. @@ -51,6 +54,7 @@ async def get_secret(self, name: str, version: Optional[str] = None, **kwargs: M ) return Secret._from_secret_bundle(bundle) + @distributed_trace_async async def set_secret( self, name: str, @@ -99,6 +103,7 @@ async def set_secret( ) return Secret._from_secret_bundle(bundle) + @distributed_trace_async async def update_secret( self, name: str, @@ -155,6 +160,7 @@ async def update_secret( ) return SecretAttributes._from_secret_bundle(bundle) # pylint: disable=protected-access + @distributed_trace def list_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[SecretAttributes]: """List secrets in the vault. @@ -180,6 +186,7 @@ def list_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[SecretAttri iterable = AsyncPagingAdapter(pages, SecretAttributes._from_secret_item) return iterable + @distributed_trace def list_secret_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncIterable[SecretAttributes]: """List all versions of the specified secret. @@ -205,6 +212,7 @@ def list_secret_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncI iterable = AsyncPagingAdapter(pages, SecretAttributes._from_secret_item) return iterable + @distributed_trace_async async def backup_secret(self, name: str, **kwargs: Mapping[str, Any]) -> bytes: """Backs up the specified secret. @@ -230,6 +238,7 @@ async def backup_secret(self, name: str, **kwargs: Mapping[str, Any]) -> bytes: ) return backup_result.value + @distributed_trace_async async def restore_secret(self, backup: bytes, **kwargs: Mapping[str, Any]) -> SecretAttributes: """Restores a backed up secret to a vault. @@ -254,6 +263,7 @@ async def restore_secret(self, backup: bytes, **kwargs: Mapping[str, Any]) -> Se ) return SecretAttributes._from_secret_bundle(bundle) + @distributed_trace_async async def delete_secret(self, name: str, **kwargs: Mapping[str, Any]) -> DeletedSecret: """Deletes a secret from the vault. @@ -279,6 +289,7 @@ async def delete_secret(self, name: str, **kwargs: Mapping[str, Any]) -> Deleted ) return DeletedSecret._from_deleted_secret_bundle(bundle) + @distributed_trace_async async def get_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> DeletedSecret: """Gets the specified deleted secret. @@ -303,6 +314,7 @@ async def get_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> De ) return DeletedSecret._from_deleted_secret_bundle(bundle) + @distributed_trace def list_deleted_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[DeletedSecret]: """Lists deleted secrets of the vault. @@ -327,6 +339,7 @@ def list_deleted_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[Del iterable = AsyncPagingAdapter(pages, DeletedSecret._from_deleted_secret_item) return iterable + @distributed_trace_async async def purge_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> None: """Permanently deletes the specified secret. @@ -347,6 +360,7 @@ async def purge_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> """ await self._client.purge_deleted_secret(self.vault_url, name, **kwargs) + @distributed_trace_async async def recover_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> SecretAttributes: """Recovers the deleted secret to the latest version. From dbccc2e26149734ecadfcee1d2eb702e0a7cf93a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20C=C3=A1rdenas?= Date: Thu, 25 Jul 2019 12:01:53 -0700 Subject: [PATCH 075/244] Smoke test for Python (#6412) * Smoke Test Sample for Track 2 libraries Smoke Test for Indentity, Key Vault Secrets, Storage Blobs, Event Hubs and Cosmos DB * simpleQuery method added * Method's names updated * Create README.md * Update README.md * Commented lines deleted * README.md moved to correct folder * Create requirements.txt * Update README.md * Update README.md * Imports changed * Use of literals instead of append * Database Name variable to class level. * Use of Pythonic with statements * Update requirements.txt * Revert "Update requirements.txt" This reverts commit 4b79c6a84780f169e15c17d96e5728f32ed419f3. * Revert "Use of Pythonic with statements" This reverts commit 81adc4ca46f67d3a068aeee5e41c4514d63d8758. * Revert "Revert "Use of Pythonic with statements"" This reverts commit 27b2a2d635ff47880dee2c741bcb5c81c187df7d. * requiriments.txt encoded as a txt file * requirements.txt as text file * Misspelling in "Key concepts" * Update .docsettings.yml to match the tittle of Smoke Test * Went trought Suyog comments * Revert "Went trought Suyog comments" This reverts commit 35c62232f8e0562087b7f5eb3d4bdf57ea6e502f. * Gone trought Suyog comments * use of snake case in file names --- .docsettings.yml | 2 +- samples/smoketest/Program.py | 13 +++ samples/smoketest/README.md | 116 +++++++++++++++++++++++++ samples/smoketest/cosmos_db.py | 84 ++++++++++++++++++ samples/smoketest/event_hubs.py | 66 ++++++++++++++ samples/smoketest/key_vault_secrets.py | 46 ++++++++++ samples/smoketest/requirements.txt | 8 ++ samples/smoketest/storage_blob.py | 51 +++++++++++ 8 files changed, 385 insertions(+), 1 deletion(-) create mode 100644 samples/smoketest/Program.py create mode 100644 samples/smoketest/README.md create mode 100644 samples/smoketest/cosmos_db.py create mode 100644 samples/smoketest/event_hubs.py create mode 100644 samples/smoketest/key_vault_secrets.py create mode 100644 samples/smoketest/requirements.txt create mode 100644 samples/smoketest/storage_blob.py diff --git a/.docsettings.yml b/.docsettings.yml index 317e26b199cd..a8b9d07e4c40 100644 --- a/.docsettings.yml +++ b/.docsettings.yml @@ -9,7 +9,7 @@ omitted_paths: language: python root_check_enabled: True required_readme_sections: - - "Azure .+ client library for Python" + - ^Azure (.+ client library for Python|Smoke Test for Python) - ^Getting started$ - ^Key concepts$ - ^Examples$ diff --git a/samples/smoketest/Program.py b/samples/smoketest/Program.py new file mode 100644 index 000000000000..dd43a67f9287 --- /dev/null +++ b/samples/smoketest/Program.py @@ -0,0 +1,13 @@ +from key_vault_secrets import KeyVault +from storage_blob import StorageBlob +from event_hubs import EventHub +from cosmos_db import CosmosDB + +print("==========================================") +print(" AZURE TRACK 2 SDKs SMOKE TEST") +print("==========================================") + +KeyVault().Run() +StorageBlob().Run() +EventHub().Run() +CosmosDB().Run() diff --git a/samples/smoketest/README.md b/samples/smoketest/README.md new file mode 100644 index 000000000000..6e0a21c70235 --- /dev/null +++ b/samples/smoketest/README.md @@ -0,0 +1,116 @@ +# Azure Smoke Test for Python +This sample code is a smoke test to ensure that Azure Preview for Python work while loaded into the same process by performing 2 or more actions with them. + +Libraries tested: +* keyvault-secrets +* identity +* storage-blob +* event-hubs +* cosmos + +## Getting started +### Setup Azure resources +For this sample, it is necessary to create/have the following resources in the [Azure Portal](https://portal.azure.com/): +* **App registration**: Register a new app or use an existing one. + * Under _Certificates & secrets_ create a new **client secret** and store the value in a safe place. +* **Key Vaults**: Create a new Key Vault resource or use an existing one. + * Under _Access policies_, add the app registrated in the previous step. +* **Storage acounts**: Create a container in a new or existing storage account. The container in this sample is named "mycontainer", if you want to use other name you can change the value in `BlobStorage.ts` file: +`const containerName = "mycontainer";` +* **Event Hubs**: Create an event hub inside a new or existing Event Hubs Namespace. The container in this sample is named "myeventhub", if you want to use other name you can change the value in `EventHubsTest.ts` file: `let eventHubName = "myeventhub";` +* **Azure Cosmos DB**: Create a new account or use an existing one. + +### Azure credentials +The following environment variables are needed: +* From **App Registration**, in the _Overview_ section: + * AZURE_TENANT_ID: The directory tentant ID. + * AZURE_CLIENT_ID: The application ID. + * AZURE_CLIENT_SECRET: The client secret stored previusly when creating the _client secret_. + +* From **Key Vault**, in the _Overview_ section: + * AZURE_PROJECT_URL: The DNS Name + +* From **Event Hubs**, in _Shared access policies_ section: + * EVENT_HUBS_CONNECTION_STRING: Connection string from a policy + +* From **Storage Account**, in the _Access Keys_ section: + * STORAGE_CONNECTION_STRING : A connection strings. + +* From **Azure Cosmos DB**, in the _Keys_ section, select the _Read-Write Keys_ tab: + * COSMOS_ENDPOINT: URI. + * COSMOS_KEY: Primary or secondary key. + +``` +//Bash code to create the environment variables +export AZURE_CLIENT_ID="" +export AZURE_CLIENT_SECRET="" +export AZURE_TENANT_ID="" +export EVENT_HUBS_CONNECTION_STRING="" +export AZURE_PROJECT_URL="" +export STORAGE_CONNECTION_STRING="" +export COSMOS_ENDPOINT="" +export COSMOS_KEY="" +``` + +### Running the console app +[Python](https://www.python.org/downloads/) version 3.7.4 was used to run this sample. + +In the \SmokeTest\ directory, run Program.py +``` +python .\Program.py +``` + +## Key concepts + + +## Examples +All the classes in this sample has a `Run()` method as entry point, and do not depend on each other. + +It is possible to run them individually: +```python +from KeyVaultSecrets import KeyVault + +KeyVault().Run() +``` + +They can be included in other projects by moving the class in it: +```python +from KeyVaultSecrets import KeyVault + +... + +def myTests(): + console.log("Smoke Test imported from other project") + KeyVault().Run() + +myTests() +otherFunction() +... +``` + +The classes can be used as base code and be changed to satisfied specific needs. For example, the method `EventHub().SendAndReceiveEvents()` can be change to only send events from an array given from a parameter: +```python +def SendAndReceiveEvents(self, partitionID, events): + producer = self.client.create_producer(partition_id=partitionID) + producer.send(events) + producer.close() +``` + +**Note:** The methods in the classes are not necessary independent on each other, and the order matters. For example, in order to run `BlobStorage().DeleteBlob();`, the method `BlobStorage().UploadBLob();` must be run before, since in the other way it will fail because there is not going to be a blob to delete. + +## Troubleshooting + +### Authentication +Be sure to set the environment variables and credentials required before running the sample. + +## Next steps +Check the [Azure SDK for Python Repository](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk) for more samples inside the sdk folder. + +## Contributing +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. + +If you'd like to contribute to this library, please read the contributing guide to learn more about how to build and test the code. + +This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. \ No newline at end of file diff --git a/samples/smoketest/cosmos_db.py b/samples/smoketest/cosmos_db.py new file mode 100644 index 000000000000..b4e2a56aa025 --- /dev/null +++ b/samples/smoketest/cosmos_db.py @@ -0,0 +1,84 @@ +import os +from azure.cosmos import CosmosClient +from azure.cosmos.partition_key import PartitionKey + + +class CosmosDB: + def __init__(self): + URL = os.environ["COSMOS_ENDPOINT"] + KEY = os.environ["COSMOS_KEY"] + self.client = CosmosClient(URL, {"masterKey": KEY}) + self.dbName = "pySolarSystem" + + def CreateDatabase(self): + print("Creating '{0}' database...".format(self.dbName)) + return self.client.create_database(self.dbName) + + def CreateContainer(self, db): + collectionName = "Planets" + print("Creating '{0}' collection...".format(collectionName)) + partition_key = PartitionKey(path="/id", kind="Hash") + return db.create_container(id="Planets", partition_key=partition_key) + + def CreateDocuments(self, container): + # Cosmos will look for an 'id' field in the items, if the 'id' is not specify Cosmos is going to assing a random key. + planets = [ + { + "id": "Earth", + "HasRings": False, + "Radius": 3959, + "Moons": [{"Name": "Moon"}], + }, + { + "id": "Mars", + "HasRings": False, + "Radius": 2106, + "Moons": [{"Name": "Phobos"}, {"Name": "Deimos"}], + }, + ] + + print("Inserting items in the collection...") + for planet in planets: + container.create_item(planet) + print("\t'{0}' created".format(planet["id"])) + print("\tdone") + + def SimpleQuery(self, container): + print("Quering the container...") + items = list( + container.query_items( + query="SELECT c.id FROM c", enable_cross_partition_query=True + ) + ) + print("\tdone: {0}".format(items)) + + def DeleteDatabase(self): + print("Cleaning up the resource...") + self.client.delete_database(self.dbName) + print("\tdone") + + def Run(self): + print() + print("------------------------") + print("Cosmos DB") + print("------------------------") + print("1) Create a Database") + print("2) Create a Container in the database") + print("3) Insert Documents (items) into the Container") + print("4) Delete Database (Clean up the resource)") + print() + + # Ensure that the database does not exists + try: + self.DeleteDatabase() + except: + pass + + try: + db = self.CreateDatabase() + container = self.CreateContainer(db=db) + self.CreateDocuments(container=container) + self.SimpleQuery(container=container) + finally: + # if something goes wrong, the resource should be cleaned anyway + self.DeleteDatabase() diff --git a/samples/smoketest/event_hubs.py b/samples/smoketest/event_hubs.py new file mode 100644 index 000000000000..9a0ed400b5c5 --- /dev/null +++ b/samples/smoketest/event_hubs.py @@ -0,0 +1,66 @@ +import os +from datetime import datetime +from azure.eventhub import EventHubClient, EventData, EventPosition + + +class EventHub: + def __init__(self): + # This test requires a previusly created Event Hub. + # In this example the name is "myeventhub", but it could be change below + connectionString = os.environ["EVENT_HUBS_CONNECTION_STRING"] + eventHubName = "myeventhub" + self.client = EventHubClient.from_connection_string( + connectionString, eventHubName + ) + + def GetPartitionIds(self): + print("Getting partitions id...") + partition_ids = self.client.get_partition_ids() + print("\tdone") + return partition_ids + + def SendAndReceiveEvents(self, partitionID): + with self.client.create_consumer( + consumer_group="$default", + partition_id=partitionID, + event_position=EventPosition(datetime.utcnow()), + ) as consumer: + + print("Sending events...") + with self.client.create_producer(partition_id=partitionID) as producer: + event_list = [ + EventData(b"Test Event 1 in Python"), + EventData(b"Test Event 2 in Python"), + EventData(b"Test Event 3 in Python"), + ] + producer.send(event_list) + print("\tdone") + + print("Receiving events...") + received = consumer.receive(max_batch_size=len(event_list), timeout=2) + for event_data in received: + print("\tEvent Received: " + event_data.body_as_str()) + + print("\tdone") + + if len(received) != len(event_list): + raise Exception( + "Error, expecting {0} events, but {1} were received.".format( + str(len(event_list)), str(len(received)) + ) + ) + + def Run(self): + print() + print("------------------------") + print("Event Hubs") + print("------------------------") + print("1) Get partition ID") + print("2) Send Events") + print("3) Consume Events") + print() + + partitionID = self.GetPartitionIds() + # In this sample the same partition id is going to be used for the producer and consumer, + # It is the first one, but it could be any (is not relevant as long as it is the same in both producer and consumer) + self.SendAndReceiveEvents(partitionID[0]) diff --git a/samples/smoketest/key_vault_secrets.py b/samples/smoketest/key_vault_secrets.py new file mode 100644 index 000000000000..7f27b02460f1 --- /dev/null +++ b/samples/smoketest/key_vault_secrets.py @@ -0,0 +1,46 @@ +import os +from azure.identity import DefaultAzureCredential +from azure.keyvault.secrets import SecretClient + + +class KeyVault: + def __init__(self): + # DefaultAzureCredential() expects the following environment variables: + # * AZURE_CLIENT_ID + # * AZURE_CLIENT_SECRET + # * AZURE_TENANT_ID + credential = DefaultAzureCredential() + self.secret_client = SecretClient( + vault_url=os.environ["AZURE_PROJECT_URL"], credential=credential + ) + + def SetSecret(self): + print("Setting a secret...") + self.secret_client.set_secret("secret-name", "secret-value") + print("\tdone") + + def GetSecret(self): + print("Getting a secret...") + secret = self.secret_client.get_secret("secret-name") + print("\tdone: " + secret.name) + + def DeleteSecret(self): + print("Deleting a secret...") + deleted_secret = self.secret_client.delete_secret("secret-name") + print("\tdone: " + deleted_secret.name) + + def Run(self): + print() + print("------------------------") + print("Key Vault - Secrets\nIdentity - Credential") + print("------------------------") + print("1) Set a secret") + print("2) Get that secret") + print("3) Delete that secret (Clean up the resource)") + print() + + try: + self.SetSecret() + self.GetSecret() + finally: + self.DeleteSecret() diff --git a/samples/smoketest/requirements.txt b/samples/smoketest/requirements.txt new file mode 100644 index 000000000000..eaf49d15335d --- /dev/null +++ b/samples/smoketest/requirements.txt @@ -0,0 +1,8 @@ +azure-common==1.1.23 +azure-core==1.0.0b1 +azure-cosmos==4.0.0b1 +azure-eventhub==5.0.0b1 +azure-identity==1.0.0b1 +azure-keyvault-secrets==4.0.0b1 +azure-storage-blob==12.0.0b1 +azure-storage-common==2.0.0 \ No newline at end of file diff --git a/samples/smoketest/storage_blob.py b/samples/smoketest/storage_blob.py new file mode 100644 index 000000000000..7e0c394f9580 --- /dev/null +++ b/samples/smoketest/storage_blob.py @@ -0,0 +1,51 @@ +import os +from azure.storage.blob import BlobClient +from azure.core import exceptions + + +class StorageBlob: + def __init__(self): + connectionString = os.environ["STORAGE_CONNECTION_STRING"] + self.blob = BlobClient.from_connection_string( + connectionString, container="mycontainer", blob="pyTestBlob.txt" + ) + + def UploadBLob(self): + print("uploading blob...") + self.data = "This is a sample data for Python Test" + self.blob.upload_blob(self.data) + print("\tdone") + + def DownloadBlob(self): + print("downloading blob...") + with open("./downloadedBlob.txt", "wb+") as my_blob: + my_blob.writelines(self.blob.download_blob()) + + print("\tdone") + + def DeleteBlob(self): + print("Cleaning up the resource...") + self.blob.delete_blob() + print("\tdone") + + def Run(self): + print() + print("------------------------") + print("Storage - Blob") + print("------------------------") + print("1) Upload a Blob") + print("2) Download a Blob") + print("3) Delete that Blob (Clean up the resource)") + print() + + # Ensure that the blob does not exists before the tests + try: + self.DeleteBlob() + except exceptions.AzureError: + pass + + try: + self.UploadBLob() + self.DownloadBlob() + finally: + self.DeleteBlob() From 5dfbea85bbe8d5251424c5ad7f47c564d6b847e0 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Thu, 25 Jul 2019 12:41:38 -0700 Subject: [PATCH 076/244] Paging v2 (#6420) * First version of paging * Clean sync paging * Async paging * Name AsyncList without underscore * MyPy happyness * pylint * black * PageIterator as conf * Simplify ItemPaged * Use chain to link iterable * Make Paging more open * Docstring * pylint / mypy / black * Regenerate KV with latest Autorest + Paging branch (#6479) * Regenerate KV with latest Autorest + Paging branch * Remove unused import in tests * Make the async adapter more generic * Regeneration after operation mixin fix in Autorest * COmmit changes forgotten in #6418 * Fixing syntax for 2.7 * Move Storage Queue to new Paging (#6447) * Move Storage Queue to new Paging * Working Storage queue on new paging * Fix types * First shot of blob tests update * Fixing blob tests * File to new paging * Doc fix * Feedbacks from @annatisch * Fix last @annatisch comment * Simplify paging contract * Fix storage queue after new paging contract --- .../azure-core/azure/core/async_paging.py | 153 +- sdk/core/azure-core/azure/core/paging.py | 153 +- .../azure_core_asynctests/test_paging.py | 122 ++ sdk/core/azure-core/tests/test_paging.py | 99 +- .../_generated/v2016_10_01/__init__.py | 3 +- .../_generated/v2016_10_01/_configuration.py | 2 +- .../v2016_10_01/_key_vault_client.py | 4 +- .../_generated/v2016_10_01/aio/__init__.py | 3 +- .../v2016_10_01/aio/_configuration_async.py | 1 - .../aio/_key_vault_client_async.py | 4 +- .../_key_vault_client_operations_async.py | 543 ++---- .../_generated/v2016_10_01/models/__init__.py | 45 +- .../_generated/v2016_10_01/models/_models.py | 265 +++ .../v2016_10_01/models/_models_py3.py | 265 +++ .../v2016_10_01/models/_paged_models.py | 131 -- .../_key_vault_client_operations.py | 399 ++--- .../keys/_shared/_generated/v7_0/__init__.py | 3 +- .../_shared/_generated/v7_0/_configuration.py | 2 +- .../_generated/v7_0/_key_vault_client.py | 4 +- .../_shared/_generated/v7_0/aio/__init__.py | 3 +- .../v7_0/aio/_configuration_async.py | 1 - .../v7_0/aio/_key_vault_client_async.py | 4 +- .../_key_vault_client_operations_async.py | 633 ++----- .../_generated/v7_0/models/__init__.py | 55 +- .../_shared/_generated/v7_0/models/_models.py | 323 ++++ .../_generated/v7_0/models/_models_py3.py | 323 ++++ .../_generated/v7_0/models/_paged_models.py | 157 -- .../_key_vault_client_operations.py | 465 ++--- .../keys/_shared/async_client_base.py | 7 +- .../tests/keys_vault_client_async.py | 1 - .../_shared/_generated/key_vault_client.py | 8 +- .../_generated/v2016_10_01/__init__.py | 3 +- .../_generated/v2016_10_01/_configuration.py | 2 +- .../v2016_10_01/_key_vault_client.py | 4 +- .../_generated/v2016_10_01/aio/__init__.py | 3 +- .../v2016_10_01/aio/_configuration_async.py | 1 - .../aio/_key_vault_client_async.py | 4 +- .../_key_vault_client_operations_async.py | 543 ++---- .../_generated/v2016_10_01/models/__init__.py | 45 +- .../_generated/v2016_10_01/models/_models.py | 265 +++ .../v2016_10_01/models/_models_py3.py | 265 +++ .../v2016_10_01/models/_paged_models.py | 131 -- .../_key_vault_client_operations.py | 399 ++--- .../_shared/_generated/v7_0/__init__.py | 3 +- .../_shared/_generated/v7_0/_configuration.py | 2 +- .../_generated/v7_0/_key_vault_client.py | 4 +- .../_shared/_generated/v7_0/aio/__init__.py | 3 +- .../v7_0/aio/_configuration_async.py | 1 - .../v7_0/aio/_key_vault_client_async.py | 4 +- .../_key_vault_client_operations_async.py | 633 ++----- .../_generated/v7_0/models/__init__.py | 55 +- .../_shared/_generated/v7_0/models/_models.py | 323 ++++ .../_generated/v7_0/models/_models_py3.py | 323 ++++ .../_generated/v7_0/models/_paged_models.py | 157 -- .../_key_vault_client_operations.py | 465 ++--- .../secrets/_shared/async_client_base.py | 7 +- .../tests/secrets_vault_client_async.py | 1 - .../azure/storage/blob/blob_service_client.py | 15 +- .../azure/storage/blob/container_client.py | 28 +- .../azure/storage/blob/models.py | 171 +- .../tests/test_container.py | 22 +- .../azure/storage/file/directory_client.py | 29 +- .../azure/storage/file/file_client.py | 14 +- .../azure/storage/file/file_service_client.py | 18 +- .../azure/storage/file/models.py | 124 +- .../azure-storage-file/tests/test_handle.py | 13 +- .../azure-storage-file/tests/test_share.py | 37 +- .../azure/storage/queue/models.py | 83 +- .../azure/storage/queue/queue_client.py | 8 +- .../storage/queue/queue_service_client.py | 19 +- .../test_queue.test_delete_message.yaml | 1563 ++--------------- ..._queue.test_get_messages_with_options.yaml | 1209 ++----------- .../azure-storage-queue/tests/test_queue.py | 28 +- 73 files changed, 4595 insertions(+), 6613 deletions(-) create mode 100644 sdk/core/azure-core/tests/azure_core_asynctests/test_paging.py delete mode 100644 sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_paged_models.py delete mode 100644 sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_paged_models.py delete mode 100644 sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_paged_models.py delete mode 100644 sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_paged_models.py diff --git a/sdk/core/azure-core/azure/core/async_paging.py b/sdk/core/azure-core/azure/core/async_paging.py index 4a4af4d28cc5..8a61c5b00ddc 100644 --- a/sdk/core/azure-core/azure/core/async_paging.py +++ b/sdk/core/azure-core/azure/core/async_paging.py @@ -23,44 +23,127 @@ # IN THE SOFTWARE. # # -------------------------------------------------------------------------- -from collections.abc import AsyncIterator +import collections.abc import logging +from typing import ( + Iterable, + AsyncIterator, + TypeVar, + Callable, + Tuple, + Optional, + Awaitable, +) + _LOGGER = logging.getLogger(__name__) -class AsyncPagedMixin(AsyncIterator): - """Bring async to Paging. - - **Keyword argument:** - - *async_command* - Mandatory keyword argument for this mixin to work. - """ - def __init__(self, *args, **kwargs): # pylint: disable=unused-argument - self._async_get_next = kwargs.get("async_command") - if not self._async_get_next: - _LOGGER.debug("Paging async iterator protocol is not available for %s", - self.__class__.__name__) - - async def _async_advance_page(self): - if not self._async_get_next: - raise NotImplementedError( - "The class {} does not support async paging.".format(self.__class__.__name__) - ) - if self.next_link is None: - raise StopAsyncIteration("End of paging") - self._current_page_iter_index = 0 - self._response = await self._async_get_next(self.next_link) - self._deserializer(self, self._response) - return self.current_page +ReturnType = TypeVar("ReturnType") +ResponseType = TypeVar("ResponseType") + + +class AsyncList(AsyncIterator[ReturnType]): + def __init__(self, iterable: Iterable[ReturnType]) -> None: + """Change an iterable into a fake async iterator. + + Coul be useful to fill the async iterator contract when you get a list. + + :param iterable: A sync iterable of T + """ + # Technically, if it's a real iterator, I don't need "iter" + # but that will cover iterable and list as well with no troubles created. + self._iterator = iter(iterable) + + async def __anext__(self) -> ReturnType: + try: + return next(self._iterator) + except StopIteration as err: + raise StopAsyncIteration() from err + + +class AsyncPageIterator(AsyncIterator[AsyncIterator[ReturnType]]): + def __init__( + self, + get_next: Callable[[Optional[str]], Awaitable[ResponseType]], + extract_data: Callable[ + [ResponseType], Awaitable[Tuple[str, AsyncIterator[ReturnType]]] + ], + continuation_token: Optional[str] = None, + ) -> None: + """Return an async iterator of pages. + + :param get_next: Callable that take the continuation token and return a HTTP response + :param extract_data: Callable that take an HTTP response and return a tuple continuation token, + list of ReturnType + :param str continuation_token: The continuation token needed by get_next + """ + self._get_next = get_next + self._extract_data = extract_data + self.continuation_token = continuation_token + self._did_a_call_already = False + self._response = None + self._current_page = None async def __anext__(self): - """Iterate through responses.""" - # Storing the list iterator might work out better, but there's no - # guarantee that some code won't replace the list entirely with a copy, - # invalidating an list iterator that might be saved between iterations. - if self.current_page and self._current_page_iter_index < len(self.current_page): - response = self.current_page[self._current_page_iter_index] - self._current_page_iter_index += 1 - return response - await self._async_advance_page() - return await self.__anext__() + if self.continuation_token is None and self._did_a_call_already: + raise StopAsyncIteration("End of paging") + + self._response = await self._get_next(self.continuation_token) + self._did_a_call_already = True + + self.continuation_token, self._current_page = await self._extract_data( + self._response + ) + + # If current_page was a sync list, wrap it async-like + if isinstance(self._current_page, collections.abc.Iterable): + self._current_page = AsyncList(self._current_page) + + return self._current_page + + +class AsyncItemPaged(AsyncIterator[ReturnType]): + def __init__(self, *args, **kwargs) -> None: + """Return an async iterator of items. + + args and kwargs will be passed to the AsyncPageIterator constructor directly, + except page_iterator_class + """ + self._args = args + self._kwargs = kwargs + self._page_iterator = ( + None + ) # type: Optional[AsyncIterator[AsyncIterator[ReturnType]]] + self._page = None # type: Optional[AsyncIterator[ReturnType]] + self._page_iterator_class = self._kwargs.pop( + "page_iterator_class", AsyncPageIterator + ) + + def by_page( + self, continuation_token: Optional[str] = None + ) -> AsyncIterator[AsyncIterator[ReturnType]]: + """Get an async iterator of pages of objects, instead of an async iterator of objects. + + :param str continuation_token: + An opaque continuation token. This value can be retrieved from the + continuation_token field of a previous generator object. If specified, + this generator will begin returning results from this point. + :returns: An async iterator of pages (themselves async iterator of objects) + """ + return self._page_iterator_class( + *self._args, **self._kwargs, continuation_token=continuation_token + ) + + async def __anext__(self) -> ReturnType: + if self._page_iterator is None: + self._page_iterator = self.by_page() + return await self.__anext__() + if self._page is None: + # Let it raise StopAsyncIteration + self._page = await self._page_iterator.__anext__() + return await self.__anext__() + try: + return await self._page.__anext__() + except StopAsyncIteration: + self._page = None + return await self.__anext__() diff --git a/sdk/core/azure-core/azure/core/paging.py b/sdk/core/azure-core/azure/core/paging.py index 9a04250dc932..9f4089d02099 100644 --- a/sdk/core/azure-core/azure/core/paging.py +++ b/sdk/core/azure-core/azure/core/paging.py @@ -23,86 +23,99 @@ # IN THE SOFTWARE. # # -------------------------------------------------------------------------- -import sys -try: - from collections.abc import Iterator - xrange = range -except ImportError: - from collections import Iterator - -from typing import Dict, Any, List, Callable, Optional, TYPE_CHECKING # pylint: disable=unused-import - -if TYPE_CHECKING: - from .pipeline.transport.base import HttpResponse - from msrest.serialization import Deserializer, Model # type: ignore # pylint: disable=unused-import - -if sys.version_info >= (3, 5, 2): - # Not executed on old Python, no syntax error - from .async_paging import AsyncPagedMixin # type: ignore -else: - class AsyncPagedMixin(object): # type: ignore - pass - -class Paged(AsyncPagedMixin, Iterator): - """A container for paged REST responses. - - :param response: server response object. - :type response: ~azure.core.pipeline.transport.HttpResponse - :param callable command: Function to retrieve the next page of items. - :param Deserializer deserializer: a Deserializer instance to use - """ - _validation = {} # type: Dict[str, Dict[str, Any]] - _attribute_map = {} # type: Dict[str, Dict[str, Any]] - - def __init__(self, command, deserializer, **kwargs): - # type: (Callable[[str], HttpResponse], Deserializer, Any) -> None - super(Paged, self).__init__(**kwargs) # type: ignore - # Sets next_link, current_page, and _current_page_iter_index. - self.next_link = "" - self.current_page = [] # type: List[Model] - self._current_page_iter_index = 0 - self._deserializer = deserializer - self._get_next = command - self._response = None # type: Optional[HttpResponse] +import itertools +from typing import ( + Callable, + Optional, + TypeVar, + Iterator, + Iterable, + Tuple, +) # pylint: disable=unused-import +import logging + + +_LOGGER = logging.getLogger(__name__) + +ReturnType = TypeVar("ReturnType") +ResponseType = TypeVar("ResponseType") + + +class PageIterator(Iterator[Iterator[ReturnType]]): + def __init__( + self, + get_next, # type: Callable[[Optional[str]], ResponseType] + extract_data, # type: Callable[[ResponseType], Tuple[str, Iterable[ReturnType]]] + continuation_token=None, # type: Optional[str] + ): + """Return an iterator of pages. + + :param get_next: Callable that take the continuation token and return a HTTP response + :param extract_data: Callable that take an HTTP response and return a tuple continuation token, + list of ReturnType + :param str continuation_token: The continuation token needed by get_next + """ + self._get_next = get_next + self._extract_data = extract_data + self.continuation_token = continuation_token + self._did_a_call_already = False + self._response = None # type: Optional[ResponseType] + self._current_page = None # type: Optional[Iterable[ReturnType]] def __iter__(self): """Return 'self'.""" - # Since iteration mutates this object, consider it an iterator in-and-of - # itself. return self - @classmethod - def _get_subtype_map(cls): - """Required for parity to Model object for deserialization.""" - return {} + def __next__(self): + # type: () -> Iterator[ReturnType] + if self.continuation_token is None and self._did_a_call_already: + raise StopIteration("End of paging") + + self._response = self._get_next(self.continuation_token) + self._did_a_call_already = True + + self.continuation_token, self._current_page = self._extract_data(self._response) - def _advance_page(self): - # type: () -> List[Model] - """Force moving the cursor to the next azure call. + return iter(self._current_page) - This method is for advanced usage, iterator protocol is prefered. + next = __next__ # Python 2 compatibility. + + +class ItemPaged(Iterator[ReturnType]): + def __init__(self, *args, **kwargs): + """Return an iterator of items. - :raises: StopIteration if no further page - :return: The current page list - :rtype: list + args and kwargs will be passed to the PageIterator constructor directly, + except page_iterator_class """ - if self.next_link is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 - self._response = self._get_next(self.next_link) - self._deserializer(self, self._response) - return self.current_page + self._args = args + self._kwargs = kwargs + self._page_iterator = None + self._page_iterator_class = self._kwargs.pop( + "page_iterator_class", PageIterator + ) + + def by_page(self, continuation_token=None): + # type: (Optional[str]) -> Iterator[Iterator[ReturnType]] + """Get an iterator of pages of objects, instead of an iterator of objects. + + :param str continuation_token: + An opaque continuation token. This value can be retrieved from the + continuation_token field of a previous generator object. If specified, + this generator will begin returning results from this point. + :returns: An iterator of pages (themselves iterator of objects) + """ + return self._page_iterator_class( + continuation_token=continuation_token, *self._args, **self._kwargs + ) + + def __iter__(self): + """Return 'self'.""" + return self def __next__(self): - """Iterate through responses.""" - # Storing the list iterator might work out better, but there's no - # guarantee that some code won't replace the list entirely with a copy, - # invalidating an list iterator that might be saved between iterations. - if self.current_page and self._current_page_iter_index < len(self.current_page): - response = self.current_page[self._current_page_iter_index] - self._current_page_iter_index += 1 - return response - self._advance_page() - return self.__next__() + if self._page_iterator is None: + self._page_iterator = itertools.chain.from_iterable(self.by_page()) + return next(self._page_iterator) next = __next__ # Python 2 compatibility. diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_paging.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_paging.py new file mode 100644 index 000000000000..88d8cbe147d1 --- /dev/null +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_paging.py @@ -0,0 +1,122 @@ +#-------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# +#-------------------------------------------------------------------------- + +from typing import AsyncIterator, TypeVar, List + +from azure.core.async_paging import AsyncItemPaged, AsyncList + +import pytest + + +T = TypeVar("T") + + +async def _as_list(async_iter: AsyncIterator[T]) -> List[T]: + """Flatten an async iterator into a list. + + For testing purpose. + """ + # 3.6 only : result_iterated = [obj async for obj in deserialized] + result = [] + async for el in async_iter: + result.append(el) + return result + + +class TestPaging: + + @pytest.mark.asyncio + async def test_basic_paging(self): + + async def get_next(continuation_token=None): + """Simplify my life and return JSON and not response, but should be response. + """ + if not continuation_token: + return { + 'nextLink': 'page2', + 'value': ['value1.0', 'value1.1'] + } + else: + return { + 'nextLink': None, + 'value': ['value2.0', 'value2.1'] + } + + async def extract_data(response): + return response['nextLink'], AsyncList(response['value']) + + pager = AsyncItemPaged(get_next, extract_data) + result_iterated = await _as_list(pager) + + assert ['value1.0', 'value1.1', 'value2.0', 'value2.1'] == result_iterated + + @pytest.mark.asyncio + async def test_advance_paging(self): + + async def get_next(continuation_token=None): + """Simplify my life and return JSON and not response, but should be response. + """ + if not continuation_token: + return { + 'nextLink': 'page2', + 'value': ['value1.0', 'value1.1'] + } + else: + return { + 'nextLink': None, + 'value': ['value2.0', 'value2.1'] + } + + async def extract_data(response): + return response['nextLink'], AsyncList(response['value']) + + pager = AsyncItemPaged(get_next, extract_data).by_page() + + page1 = await pager.__anext__() + assert ['value1.0', 'value1.1'] == await _as_list(page1) + + page2 = await pager.__anext__() + assert ['value2.0', 'value2.1'] == await _as_list(page2) + + with pytest.raises(StopAsyncIteration): + await pager.__anext__() + + + @pytest.mark.asyncio + async def test_none_value(self): + async def get_next(continuation_token=None): + return { + 'nextLink': None, + 'value': None + } + + async def extract_data(response): + return response['nextLink'], AsyncList(response['value'] or []) + + pager = AsyncItemPaged(get_next, extract_data) + result_iterated = await _as_list(pager) + + assert len(result_iterated) == 0 diff --git a/sdk/core/azure-core/tests/test_paging.py b/sdk/core/azure-core/tests/test_paging.py index 41e00b0b86af..945f133cf7a9 100644 --- a/sdk/core/azure-core/tests/test_paging.py +++ b/sdk/core/azure-core/tests/test_paging.py @@ -1,6 +1,6 @@ #-------------------------------------------------------------------------- # -# Copyright (c) Microsoft Corporation. All rights reserved. +# Copyright (c) Microsoft Corporation. All rights reserved. # # The MIT License (MIT) # @@ -24,29 +24,43 @@ # #-------------------------------------------------------------------------- -import unittest +from azure.core.paging import ItemPaged -from azure.core.paging import Paged +import pytest -from msrest.serialization import Deserializer -class FakePaged(Paged): - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[str]'} - } +class TestPaging(object): - def __init__(self, *args, **kwargs): - super(FakePaged, self).__init__(*args, **kwargs) + def test_basic_paging(self): + + def get_next(continuation_token=None): + """Simplify my life and return JSON and not response, but should be response. + """ + if not continuation_token: + return { + 'nextLink': 'page2', + 'value': ['value1.0', 'value1.1'] + } + else: + return { + 'nextLink': None, + 'value': ['value2.0', 'value2.1'] + } -_test_deserializer = Deserializer({}) + def extract_data(response): + return response['nextLink'], iter(response['value']) -class TestPaging(unittest.TestCase): + pager = ItemPaged(get_next, extract_data) + result_iterated = list(pager) - def test_basic_paging(self): + assert ['value1.0', 'value1.1', 'value2.0', 'value2.1'] == result_iterated - def internal_paging(next_link=None, raw=False): - if not next_link: + def test_by_page_paging(self): + + def get_next(continuation_token=None): + """Simplify my life and return JSON and not response, but should be response. + """ + if not continuation_token: return { 'nextLink': 'page2', 'value': ['value1.0', 'value1.1'] @@ -57,17 +71,25 @@ def internal_paging(next_link=None, raw=False): 'value': ['value2.0', 'value2.1'] } - deserialized = FakePaged(internal_paging, _test_deserializer) - result_iterated = list(deserialized) - self.assertListEqual( - ['value1.0', 'value1.1', 'value2.0', 'value2.1'], - result_iterated - ) + def extract_data(response): + return response['nextLink'], iter(response['value']) + + pager = ItemPaged(get_next, extract_data).by_page() + page1 = next(pager) + assert list(page1) == ['value1.0', 'value1.1'] + + page2 = next(pager) + assert list(page2) == ['value2.0', 'value2.1'] + + with pytest.raises(StopIteration): + next(pager) def test_advance_paging(self): - def internal_paging(next_link=None, raw=False): - if not next_link: + def get_next(continuation_token=None): + """Simplify my life and return JSON and not response, but should be response. + """ + if not continuation_token: return { 'nextLink': 'page2', 'value': ['value1.0', 'value1.1'] @@ -78,27 +100,32 @@ def internal_paging(next_link=None, raw=False): 'value': ['value2.0', 'value2.1'] } - deserialized = FakePaged(internal_paging, _test_deserializer) - page1 = next(deserialized) + def extract_data(response): + return response['nextLink'], iter(response['value']) + + pager = ItemPaged(get_next, extract_data) + page1 = next(pager) assert page1 == 'value1.0' - page1 = next(deserialized) + page1 = next(pager) assert page1 == 'value1.1' - - page2 = next(deserialized) + + page2 = next(pager) assert page2 == 'value2.0' - page2 = next(deserialized) + page2 = next(pager) assert page2 == 'value2.1' - with self.assertRaises(StopIteration): - next(deserialized) + with pytest.raises(StopIteration): + next(pager) def test_none_value(self): - def internal_paging(next_link=None, raw=False): + def get_next(continuation_token=None): return { 'nextLink': None, 'value': None } + def extract_data(response): + return response['nextLink'], iter(response['value'] or []) - deserialized = FakePaged(internal_paging, _test_deserializer) - result_iterated = list(deserialized) - self.assertEqual(len(result_iterated), 0) + pager = ItemPaged(get_next, extract_data) + result_iterated = list(pager) + assert len(result_iterated) == 0 diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/__init__.py index d3fda25cc7ab..e913d4cf6c46 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/__init__.py @@ -9,9 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from ._configuration import KeyVaultClientConfiguration from ._key_vault_client import KeyVaultClient -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] from .version import VERSION diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_configuration.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_configuration.py index beb5eb930fa8..28cf75e3d2b4 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_configuration.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_configuration.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials @@ -45,4 +44,5 @@ def _configure(self, **kwargs): self.proxy_policy = policies.ProxyPolicy(**kwargs) self.logging_policy = policies.NetworkTraceLoggingPolicy(**kwargs) self.retry_policy = policies.RetryPolicy(**kwargs) + self.custom_hook_policy = policies.CustomHookPolicy(**kwargs) self.redirect_policy = policies.RedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_key_vault_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_key_vault_client.py index 0252b1e16a5e..e3ec609b6cd3 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_key_vault_client.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/__init__.py index ffece9055d9b..fb2e6c3866fd 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/__init__.py @@ -10,5 +10,4 @@ # -------------------------------------------------------------------------- from ._key_vault_client_async import KeyVaultClient -from ._configuration_async import KeyVaultClientConfiguration -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_configuration_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_configuration_async.py index 2144132ebe2d..a61d9eeff444 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_configuration_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_configuration_async.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py index 559d48da029a..ad4b8a97754f 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 28ea64adc6a6..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.async_paging import AsyncItemPaged, AsyncList from ... import models import uuid @@ -78,8 +79,6 @@ async def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops 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 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(parameters, 'KeyCreateParameters') @@ -154,8 +153,6 @@ async def import_key(self, vault_base_url, key_name, key, hsm=None, key_attribut 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 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(parameters, 'KeyImportParameters') @@ -218,8 +215,6 @@ async def delete_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -294,8 +289,6 @@ async def update_key(self, vault_base_url, key_name, key_version, key_ops=None, 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 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(parameters, 'KeyUpdateParameters') @@ -360,8 +353,6 @@ async def get_key(self, vault_base_url, key_name, key_version, *, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -399,11 +390,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -412,60 +404,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -487,11 +462,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -499,60 +475,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_keys.metadata = {'url': '/keys'} async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -604,8 +563,6 @@ async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -677,8 +634,6 @@ async def restore_key(self, vault_base_url, key_bundle_backup, *, cls=None, **kw 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 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(parameters, 'KeyRestoreParameters') @@ -759,8 +714,6 @@ async def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -838,8 +791,6 @@ async def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -915,8 +866,6 @@ async def sign(self, vault_base_url, key_name, key_version, algorithm, value, *, 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 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(parameters, 'KeySignParameters') @@ -998,8 +947,6 @@ async def verify(self, vault_base_url, key_name, key_version, algorithm, digest, 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 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(parameters, 'KeyVerifyParameters') @@ -1077,8 +1024,6 @@ async def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value 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 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(parameters, 'KeyOperationsParameters') @@ -1154,8 +1099,6 @@ async def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, val 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 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(parameters, 'KeyOperationsParameters') @@ -1199,11 +1142,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedKeyItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1211,60 +1155,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -1305,8 +1232,6 @@ async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs) header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1364,8 +1289,6 @@ async def purge_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwarg header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1421,8 +1344,6 @@ async def recover_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1493,8 +1414,6 @@ async def set_secret(self, vault_base_url, secret_name, value, tags=None, conten 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 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(parameters, 'SecretSetParameters') @@ -1555,8 +1474,6 @@ async def delete_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1630,8 +1547,6 @@ async def update_secret(self, vault_base_url, secret_name, secret_version, conte 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 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(parameters, 'SecretUpdateParameters') @@ -1694,8 +1609,6 @@ async def get_secret(self, vault_base_url, secret_name, secret_version, *, cls=N header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1733,11 +1646,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1745,60 +1659,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1819,11 +1716,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1832,60 +1730,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1904,11 +1785,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedSecretItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1916,60 +1798,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs): @@ -2009,8 +1874,6 @@ async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2068,8 +1931,6 @@ async def purge_deleted_secret(self, vault_base_url, secret_name, *, cls=None, * header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2122,8 +1983,6 @@ async def recover_deleted_secret(self, vault_base_url, secret_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2181,8 +2040,6 @@ async def backup_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2242,8 +2099,6 @@ async def restore_secret(self, vault_base_url, secret_bundle_backup, *, cls=None 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 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(parameters, 'SecretRestoreParameters') @@ -2283,11 +2138,12 @@ def get_certificates( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2295,60 +2151,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificates.metadata = {'url': '/certificates'} async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -2389,8 +2228,6 @@ async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2449,8 +2286,6 @@ async def set_certificate_contacts(self, vault_base_url, contact_list=None, *, c 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 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(contacts, 'Contacts') @@ -2508,8 +2343,6 @@ async def get_certificate_contacts(self, vault_base_url, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2563,8 +2396,6 @@ async def delete_certificate_contacts(self, vault_base_url, *, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2601,11 +2432,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateIssuerItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2613,60 +2445,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, *, cls=None, **kwargs): @@ -2720,8 +2535,6 @@ async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, cr 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2796,8 +2609,6 @@ async def update_certificate_issuer(self, vault_base_url, issuer_name, provider= 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2858,8 +2669,6 @@ async def get_certificate_issuer(self, vault_base_url, issuer_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2917,8 +2726,6 @@ async def delete_certificate_issuer(self, vault_base_url, issuer_name, *, cls=No header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2988,8 +2795,6 @@ async def create_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateCreateParameters') @@ -3072,8 +2877,6 @@ async def import_certificate(self, vault_base_url, certificate_name, base64_enco 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 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(parameters, 'CertificateImportParameters') @@ -3115,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3128,60 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3222,8 +3009,6 @@ async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3285,8 +3070,6 @@ async def update_certificate_policy(self, vault_base_url, certificate_name, cert 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 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(certificate_policy, 'CertificatePolicy') @@ -3364,8 +3147,6 @@ async def update_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateUpdateParameters') @@ -3429,8 +3210,6 @@ async def get_certificate(self, vault_base_url, certificate_name, certificate_ve header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3493,8 +3272,6 @@ async def update_certificate_operation(self, vault_base_url, certificate_name, c 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3554,8 +3331,6 @@ async def get_certificate_operation(self, vault_base_url, certificate_name, *, c header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3613,8 +3388,6 @@ async def delete_certificate_operation(self, vault_base_url, certificate_name, * header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3686,8 +3459,6 @@ async def merge_certificate(self, vault_base_url, certificate_name, x509_certifi 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 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(parameters, 'CertificateMergeParameters') @@ -3730,11 +3501,12 @@ def get_deleted_certificates( :type maxresults: int :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedCertificateItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3742,60 +3514,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3836,8 +3591,6 @@ async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3895,8 +3648,6 @@ async def purge_deleted_certificate(self, vault_base_url, certificate_name, *, c header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3952,8 +3703,6 @@ async def recover_deleted_certificate(self, vault_base_url, certificate_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3987,11 +3736,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v2016_10_01.models.StorageAccountItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3999,60 +3749,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_storage_accounts.metadata = {'url': '/storage'} async def delete_storage_account(self, vault_base_url, storage_account_name, *, cls=None, **kwargs): @@ -4089,8 +3822,6 @@ async def delete_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4145,8 +3876,6 @@ async def get_storage_account(self, vault_base_url, storage_account_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4221,8 +3950,6 @@ async def set_storage_account(self, vault_base_url, storage_account_name, resour 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 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(parameters, 'StorageAccountCreateParameters') @@ -4298,8 +4025,6 @@ async def update_storage_account(self, vault_base_url, storage_account_name, act 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4362,8 +4087,6 @@ async def regenerate_storage_account_key(self, vault_base_url, storage_account_n 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4402,11 +4125,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v2016_10_01.models.SasDefinitionItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4415,60 +4139,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, *, cls=None, **kwargs): @@ -4508,8 +4215,6 @@ async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4567,8 +4272,6 @@ async def get_sas_definition(self, vault_base_url, storage_account_name, sas_def header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4639,8 +4342,6 @@ async def set_sas_definition(self, vault_base_url, storage_account_name, sas_def 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 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(parameters1, 'SasDefinitionCreateParameters') @@ -4714,8 +4415,6 @@ async def update_sas_definition(self, vault_base_url, storage_account_name, sas_ 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 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(parameters1, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/__init__.py index 76f4bf1ab9bc..6f134becdbd3 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/__init__.py @@ -20,9 +20,11 @@ from ._models_py3 import CertificateCreateParameters from ._models_py3 import CertificateImportParameters from ._models_py3 import CertificateIssuerItem + from ._models_py3 import CertificateIssuerListResult from ._models_py3 import CertificateIssuerSetParameters from ._models_py3 import CertificateIssuerUpdateParameters from ._models_py3 import CertificateItem + from ._models_py3 import CertificateListResult from ._models_py3 import CertificateMergeParameters from ._models_py3 import CertificateOperation from ._models_py3 import CertificateOperationUpdateParameter @@ -32,10 +34,13 @@ from ._models_py3 import Contacts from ._models_py3 import DeletedCertificateBundle from ._models_py3 import DeletedCertificateItem + from ._models_py3 import DeletedCertificateListResult from ._models_py3 import DeletedKeyBundle from ._models_py3 import DeletedKeyItem + from ._models_py3 import DeletedKeyListResult from ._models_py3 import DeletedSecretBundle from ._models_py3 import DeletedSecretItem + from ._models_py3 import DeletedSecretListResult from ._models_py3 import Error from ._models_py3 import IssuerAttributes from ._models_py3 import IssuerBundle @@ -47,6 +52,7 @@ from ._models_py3 import KeyCreateParameters from ._models_py3 import KeyImportParameters from ._models_py3 import KeyItem + from ._models_py3 import KeyListResult from ._models_py3 import KeyOperationResult from ._models_py3 import KeyOperationsParameters from ._models_py3 import KeyProperties @@ -63,10 +69,12 @@ from ._models_py3 import SasDefinitionBundle from ._models_py3 import SasDefinitionCreateParameters from ._models_py3 import SasDefinitionItem + from ._models_py3 import SasDefinitionListResult from ._models_py3 import SasDefinitionUpdateParameters from ._models_py3 import SecretAttributes from ._models_py3 import SecretBundle from ._models_py3 import SecretItem + from ._models_py3 import SecretListResult from ._models_py3 import SecretProperties from ._models_py3 import SecretRestoreParameters from ._models_py3 import SecretSetParameters @@ -77,6 +85,7 @@ from ._models_py3 import StorageAccountRegenerteKeyParameters from ._models_py3 import StorageAccountUpdateParameters from ._models_py3 import StorageBundle + from ._models_py3 import StorageListResult from ._models_py3 import SubjectAlternativeNames from ._models_py3 import Trigger from ._models_py3 import X509CertificateProperties @@ -91,9 +100,11 @@ from ._models import CertificateCreateParameters from ._models import CertificateImportParameters from ._models import CertificateIssuerItem + from ._models import CertificateIssuerListResult from ._models import CertificateIssuerSetParameters from ._models import CertificateIssuerUpdateParameters from ._models import CertificateItem + from ._models import CertificateListResult from ._models import CertificateMergeParameters from ._models import CertificateOperation from ._models import CertificateOperationUpdateParameter @@ -103,10 +114,13 @@ from ._models import Contacts from ._models import DeletedCertificateBundle from ._models import DeletedCertificateItem + from ._models import DeletedCertificateListResult from ._models import DeletedKeyBundle from ._models import DeletedKeyItem + from ._models import DeletedKeyListResult from ._models import DeletedSecretBundle from ._models import DeletedSecretItem + from ._models import DeletedSecretListResult from ._models import Error from ._models import IssuerAttributes from ._models import IssuerBundle @@ -118,6 +132,7 @@ from ._models import KeyCreateParameters from ._models import KeyImportParameters from ._models import KeyItem + from ._models import KeyListResult from ._models import KeyOperationResult from ._models import KeyOperationsParameters from ._models import KeyProperties @@ -134,10 +149,12 @@ from ._models import SasDefinitionBundle from ._models import SasDefinitionCreateParameters from ._models import SasDefinitionItem + from ._models import SasDefinitionListResult from ._models import SasDefinitionUpdateParameters from ._models import SecretAttributes from ._models import SecretBundle from ._models import SecretItem + from ._models import SecretListResult from ._models import SecretProperties from ._models import SecretRestoreParameters from ._models import SecretSetParameters @@ -148,18 +165,10 @@ from ._models import StorageAccountRegenerteKeyParameters from ._models import StorageAccountUpdateParameters from ._models import StorageBundle + from ._models import StorageListResult from ._models import SubjectAlternativeNames from ._models import Trigger from ._models import X509CertificateProperties -from ._paged_models import CertificateIssuerItemPaged -from ._paged_models import CertificateItemPaged -from ._paged_models import DeletedCertificateItemPaged -from ._paged_models import DeletedKeyItemPaged -from ._paged_models import DeletedSecretItemPaged -from ._paged_models import KeyItemPaged -from ._paged_models import SasDefinitionItemPaged -from ._paged_models import SecretItemPaged -from ._paged_models import StorageAccountItemPaged from ._key_vault_client_enums import ( JsonWebKeyType, JsonWebKeyCurveName, @@ -182,9 +191,11 @@ 'CertificateCreateParameters', 'CertificateImportParameters', 'CertificateIssuerItem', + 'CertificateIssuerListResult', 'CertificateIssuerSetParameters', 'CertificateIssuerUpdateParameters', 'CertificateItem', + 'CertificateListResult', 'CertificateMergeParameters', 'CertificateOperation', 'CertificateOperationUpdateParameter', @@ -194,10 +205,13 @@ 'Contacts', 'DeletedCertificateBundle', 'DeletedCertificateItem', + 'DeletedCertificateListResult', 'DeletedKeyBundle', 'DeletedKeyItem', + 'DeletedKeyListResult', 'DeletedSecretBundle', 'DeletedSecretItem', + 'DeletedSecretListResult', 'Error', 'IssuerAttributes', 'IssuerBundle', @@ -209,6 +223,7 @@ 'KeyCreateParameters', 'KeyImportParameters', 'KeyItem', + 'KeyListResult', 'KeyOperationResult', 'KeyOperationsParameters', 'KeyProperties', @@ -225,10 +240,12 @@ 'SasDefinitionBundle', 'SasDefinitionCreateParameters', 'SasDefinitionItem', + 'SasDefinitionListResult', 'SasDefinitionUpdateParameters', 'SecretAttributes', 'SecretBundle', 'SecretItem', + 'SecretListResult', 'SecretProperties', 'SecretRestoreParameters', 'SecretSetParameters', @@ -239,18 +256,10 @@ 'StorageAccountRegenerteKeyParameters', 'StorageAccountUpdateParameters', 'StorageBundle', + 'StorageListResult', 'SubjectAlternativeNames', 'Trigger', 'X509CertificateProperties', - 'KeyItemPaged', - 'DeletedKeyItemPaged', - 'SecretItemPaged', - 'DeletedSecretItemPaged', - 'CertificateItemPaged', - 'CertificateIssuerItemPaged', - 'DeletedCertificateItemPaged', - 'StorageAccountItemPaged', - 'SasDefinitionItemPaged', 'JsonWebKeyType', 'JsonWebKeyCurveName', 'DeletionRecoveryLevel', diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py index f9caaf92c16e..e918a167f2dd 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py @@ -341,6 +341,37 @@ def __init__(self, **kwargs): self.provider = kwargs.get('provider', None) +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -435,6 +466,35 @@ def __init__(self, **kwargs): self.x509_thumbprint = kwargs.get('x509_thumbprint', None) +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v2016_10_01.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -805,6 +865,36 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: + list[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -975,6 +1065,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1176,6 +1295,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -1531,6 +1679,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v2016_10_01.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2012,6 +2189,35 @@ def __init__(self, **kwargs): self.tags = None +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2084,6 +2290,35 @@ def __init__(self, **kwargs): self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2415,6 +2650,36 @@ def __init__(self, **kwargs): self.tags = None +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SubjectAlternativeNames(Model): """The subject alternate names of a X509 object. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py index 4920c195ef89..07d530b486f6 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py @@ -341,6 +341,37 @@ def __init__(self, *, id: str=None, provider: str=None, **kwargs) -> None: self.provider = provider +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -435,6 +466,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.x509_thumbprint = x509_thumbprint +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v2016_10_01.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -805,6 +865,36 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: + list[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -975,6 +1065,35 @@ def __init__(self, *, kid: str=None, attributes=None, tags=None, recovery_id: st self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1176,6 +1295,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, content_type: st self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -1531,6 +1679,35 @@ def __init__(self, *, key, hsm: bool=None, key_attributes=None, tags=None, **kwa self.tags = tags +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v2016_10_01.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2012,6 +2189,35 @@ def __init__(self, **kwargs) -> None: self.tags = None +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2084,6 +2290,35 @@ def __init__(self, *, enabled: bool=None, not_before=None, expires=None, **kwarg self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2415,6 +2650,36 @@ def __init__(self, **kwargs) -> None: self.tags = None +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SubjectAlternativeNames(Model): """The subject alternate names of a X509 object. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_paged_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_paged_models.py deleted file mode 100644 index e5ddd1d7edc4..000000000000 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_paged_models.py +++ /dev/null @@ -1,131 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from azure.core.paging import Paged - - -class KeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`KeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[KeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(KeyItemPaged, self).__init__(*args, **kwargs) -class DeletedKeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedKeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedKeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedKeyItemPaged, self).__init__(*args, **kwargs) -class SecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SecretItemPaged, self).__init__(*args, **kwargs) -class DeletedSecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSecretItemPaged, self).__init__(*args, **kwargs) -class CertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateItemPaged, self).__init__(*args, **kwargs) -class CertificateIssuerItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateIssuerItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateIssuerItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateIssuerItemPaged, self).__init__(*args, **kwargs) -class DeletedCertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedCertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedCertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedCertificateItemPaged, self).__init__(*args, **kwargs) -class StorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`StorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(StorageAccountItemPaged, self).__init__(*args, **kwargs) -class SasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SasDefinitionItemPaged, self).__init__(*args, **kwargs) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 40ad1ab95087..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.paging import ItemPaged from .. import models import uuid @@ -78,8 +79,6 @@ def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops=None, 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 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(parameters, 'KeyCreateParameters') @@ -154,8 +153,6 @@ def import_key(self, vault_base_url, key_name, key, hsm=None, key_attributes=Non 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 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(parameters, 'KeyImportParameters') @@ -218,8 +215,6 @@ def delete_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -294,8 +289,6 @@ def update_key(self, vault_base_url, key_name, key_version, key_ops=None, key_at 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 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(parameters, 'KeyUpdateParameters') @@ -360,8 +353,6 @@ def get_key(self, vault_base_url, key_name, key_version, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -399,11 +390,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -412,46 +404,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -473,11 +462,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -485,46 +475,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_keys.metadata = {'url': '/keys'} def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -576,8 +563,6 @@ def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -649,8 +634,6 @@ def restore_key(self, vault_base_url, key_bundle_backup, cls=None, **kwargs): 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 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(parameters, 'KeyRestoreParameters') @@ -731,8 +714,6 @@ def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -810,8 +791,6 @@ def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -887,8 +866,6 @@ def sign(self, vault_base_url, key_name, key_version, algorithm, value, cls=None 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 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(parameters, 'KeySignParameters') @@ -970,8 +947,6 @@ def verify(self, vault_base_url, key_name, key_version, algorithm, digest, signa 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 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(parameters, 'KeyVerifyParameters') @@ -1049,8 +1024,6 @@ def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cls= 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 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(parameters, 'KeyOperationsParameters') @@ -1126,8 +1099,6 @@ def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cl 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 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(parameters, 'KeyOperationsParameters') @@ -1171,11 +1142,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedKeyItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1183,46 +1155,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -1263,8 +1232,6 @@ def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1322,8 +1289,6 @@ def purge_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1379,8 +1344,6 @@ def recover_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1451,8 +1414,6 @@ def set_secret(self, vault_base_url, secret_name, value, tags=None, content_type 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 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(parameters, 'SecretSetParameters') @@ -1513,8 +1474,6 @@ def delete_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1588,8 +1547,6 @@ def update_secret(self, vault_base_url, secret_name, secret_version, content_typ 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 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(parameters, 'SecretUpdateParameters') @@ -1652,8 +1609,6 @@ def get_secret(self, vault_base_url, secret_name, secret_version, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1691,11 +1646,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1703,46 +1659,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1763,11 +1716,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1776,46 +1730,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1834,11 +1785,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedSecretItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1846,46 +1798,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): @@ -1925,8 +1874,6 @@ def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1984,8 +1931,6 @@ def purge_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2038,8 +1983,6 @@ def recover_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2097,8 +2040,6 @@ def backup_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2158,8 +2099,6 @@ def restore_secret(self, vault_base_url, secret_bundle_backup, cls=None, **kwarg 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 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(parameters, 'SecretRestoreParameters') @@ -2199,11 +2138,12 @@ def get_certificates( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2211,46 +2151,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificates.metadata = {'url': '/certificates'} def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -2291,8 +2228,6 @@ def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2351,8 +2286,6 @@ def set_certificate_contacts(self, vault_base_url, contact_list=None, cls=None, 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 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(contacts, 'Contacts') @@ -2410,8 +2343,6 @@ def get_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2465,8 +2396,6 @@ def delete_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2503,11 +2432,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateIssuerItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2515,46 +2445,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, cls=None, **kwargs): @@ -2608,8 +2535,6 @@ def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credenti 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2684,8 +2609,6 @@ def update_certificate_issuer(self, vault_base_url, issuer_name, provider=None, 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2746,8 +2669,6 @@ def get_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2805,8 +2726,6 @@ def delete_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2876,8 +2795,6 @@ def create_certificate(self, vault_base_url, certificate_name, certificate_polic 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 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(parameters, 'CertificateCreateParameters') @@ -2960,8 +2877,6 @@ def import_certificate(self, vault_base_url, certificate_name, base64_encoded_ce 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 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(parameters, 'CertificateImportParameters') @@ -3003,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3016,46 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3096,8 +3009,6 @@ def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3159,8 +3070,6 @@ def update_certificate_policy(self, vault_base_url, certificate_name, certificat 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 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(certificate_policy, 'CertificatePolicy') @@ -3238,8 +3147,6 @@ def update_certificate(self, vault_base_url, certificate_name, certificate_versi 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 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(parameters, 'CertificateUpdateParameters') @@ -3303,8 +3210,6 @@ def get_certificate(self, vault_base_url, certificate_name, certificate_version, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3367,8 +3272,6 @@ def update_certificate_operation(self, vault_base_url, certificate_name, cancell 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3428,8 +3331,6 @@ def get_certificate_operation(self, vault_base_url, certificate_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3487,8 +3388,6 @@ def delete_certificate_operation(self, vault_base_url, certificate_name, cls=Non header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3560,8 +3459,6 @@ def merge_certificate(self, vault_base_url, certificate_name, x509_certificates, 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 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(parameters, 'CertificateMergeParameters') @@ -3604,11 +3501,12 @@ def get_deleted_certificates( :type maxresults: int :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedCertificateItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3616,46 +3514,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3696,8 +3591,6 @@ def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3755,8 +3648,6 @@ def purge_deleted_certificate(self, vault_base_url, certificate_name, cls=None, header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3812,8 +3703,6 @@ def recover_deleted_certificate(self, vault_base_url, certificate_name, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3847,11 +3736,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v2016_10_01.models.StorageAccountItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3859,46 +3749,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_storage_accounts.metadata = {'url': '/storage'} def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, **kwargs): @@ -3935,8 +3822,6 @@ def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3991,8 +3876,6 @@ def get_storage_account(self, vault_base_url, storage_account_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4067,8 +3950,6 @@ def set_storage_account(self, vault_base_url, storage_account_name, resource_id, 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 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(parameters, 'StorageAccountCreateParameters') @@ -4144,8 +4025,6 @@ def update_storage_account(self, vault_base_url, storage_account_name, active_ke 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4208,8 +4087,6 @@ def regenerate_storage_account_key(self, vault_base_url, storage_account_name, k 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4248,11 +4125,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v2016_10_01.models.SasDefinitionItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4261,46 +4139,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def delete_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, cls=None, **kwargs): @@ -4340,8 +4215,6 @@ def delete_sas_definition(self, vault_base_url, storage_account_name, sas_defini header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4399,8 +4272,6 @@ def get_sas_definition(self, vault_base_url, storage_account_name, sas_definitio header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4471,8 +4342,6 @@ def set_sas_definition(self, vault_base_url, storage_account_name, sas_definitio 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 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(parameters1, 'SasDefinitionCreateParameters') @@ -4546,8 +4415,6 @@ def update_sas_definition(self, vault_base_url, storage_account_name, sas_defini 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 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(parameters1, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/__init__.py index d3fda25cc7ab..e913d4cf6c46 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/__init__.py @@ -9,9 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from ._configuration import KeyVaultClientConfiguration from ._key_vault_client import KeyVaultClient -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] from .version import VERSION diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_configuration.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_configuration.py index beb5eb930fa8..28cf75e3d2b4 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_configuration.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_configuration.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials @@ -45,4 +44,5 @@ def _configure(self, **kwargs): self.proxy_policy = policies.ProxyPolicy(**kwargs) self.logging_policy = policies.NetworkTraceLoggingPolicy(**kwargs) self.retry_policy = policies.RetryPolicy(**kwargs) + self.custom_hook_policy = policies.CustomHookPolicy(**kwargs) self.redirect_policy = policies.RedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_key_vault_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_key_vault_client.py index 699433682e60..a1a1eb19328b 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_key_vault_client.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/__init__.py index ffece9055d9b..fb2e6c3866fd 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/__init__.py @@ -10,5 +10,4 @@ # -------------------------------------------------------------------------- from ._key_vault_client_async import KeyVaultClient -from ._configuration_async import KeyVaultClientConfiguration -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_configuration_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_configuration_async.py index 2144132ebe2d..a61d9eeff444 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_configuration_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_configuration_async.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_key_vault_client_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_key_vault_client_async.py index 739ab6ea407d..482d6336ab1a 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_key_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_key_vault_client_async.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index a97144221c6a..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.async_paging import AsyncItemPaged, AsyncList from ... import models import uuid @@ -77,8 +78,6 @@ async def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops 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 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(parameters, 'KeyCreateParameters') @@ -153,8 +152,6 @@ async def import_key(self, vault_base_url, key_name, key, hsm=None, key_attribut 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 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(parameters, 'KeyImportParameters') @@ -217,8 +214,6 @@ async def delete_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -293,8 +288,6 @@ async def update_key(self, vault_base_url, key_name, key_version, key_ops=None, 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 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(parameters, 'KeyUpdateParameters') @@ -359,8 +352,6 @@ async def get_key(self, vault_base_url, key_name, key_version, *, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -398,11 +389,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -411,60 +403,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -486,11 +461,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -498,60 +474,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_keys.metadata = {'url': '/keys'} async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -603,8 +562,6 @@ async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -676,8 +633,6 @@ async def restore_key(self, vault_base_url, key_bundle_backup, *, cls=None, **kw 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 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(parameters, 'KeyRestoreParameters') @@ -758,8 +713,6 @@ async def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -837,8 +790,6 @@ async def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -914,8 +865,6 @@ async def sign(self, vault_base_url, key_name, key_version, algorithm, value, *, 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 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(parameters, 'KeySignParameters') @@ -997,8 +946,6 @@ async def verify(self, vault_base_url, key_name, key_version, algorithm, digest, 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 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(parameters, 'KeyVerifyParameters') @@ -1076,8 +1023,6 @@ async def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value 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 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(parameters, 'KeyOperationsParameters') @@ -1153,8 +1098,6 @@ async def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, val 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 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(parameters, 'KeyOperationsParameters') @@ -1198,11 +1141,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v7_0.models.DeletedKeyItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1210,60 +1154,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -1304,8 +1231,6 @@ async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs) header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1363,8 +1288,6 @@ async def purge_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwarg header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1420,8 +1343,6 @@ async def recover_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1491,8 +1412,6 @@ async def set_secret(self, vault_base_url, secret_name, value, tags=None, conten 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 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(parameters, 'SecretSetParameters') @@ -1553,8 +1472,6 @@ async def delete_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1627,8 +1544,6 @@ async def update_secret(self, vault_base_url, secret_name, secret_version, conte 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 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(parameters, 'SecretUpdateParameters') @@ -1691,8 +1606,6 @@ async def get_secret(self, vault_base_url, secret_name, secret_version, *, cls=N header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1730,11 +1643,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1742,60 +1656,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1816,11 +1713,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1829,60 +1727,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1901,11 +1782,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSecretItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1913,60 +1795,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs): @@ -2006,8 +1871,6 @@ async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2065,8 +1928,6 @@ async def purge_deleted_secret(self, vault_base_url, secret_name, *, cls=None, * header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2119,8 +1980,6 @@ async def recover_deleted_secret(self, vault_base_url, secret_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2178,8 +2037,6 @@ async def backup_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2239,8 +2096,6 @@ async def restore_secret(self, vault_base_url, secret_bundle_backup, *, cls=None 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 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(parameters, 'SecretRestoreParameters') @@ -2283,11 +2138,12 @@ def get_certificates( :type include_pending: bool :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2295,9 +2151,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -2306,51 +2159,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificates.metadata = {'url': '/certificates'} async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -2391,8 +2230,6 @@ async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2451,8 +2288,6 @@ async def set_certificate_contacts(self, vault_base_url, contact_list=None, *, c 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 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(contacts, 'Contacts') @@ -2510,8 +2345,6 @@ async def get_certificate_contacts(self, vault_base_url, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2565,8 +2398,6 @@ async def delete_certificate_contacts(self, vault_base_url, *, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2603,11 +2434,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v7_0.models.CertificateIssuerItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2615,60 +2447,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, *, cls=None, **kwargs): @@ -2721,8 +2536,6 @@ async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, cr 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2796,8 +2609,6 @@ async def update_certificate_issuer(self, vault_base_url, issuer_name, provider= 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2858,8 +2669,6 @@ async def get_certificate_issuer(self, vault_base_url, issuer_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2917,8 +2726,6 @@ async def delete_certificate_issuer(self, vault_base_url, issuer_name, *, cls=No header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2988,8 +2795,6 @@ async def create_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateCreateParameters') @@ -3072,8 +2877,6 @@ async def import_certificate(self, vault_base_url, certificate_name, base64_enco 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 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(parameters, 'CertificateImportParameters') @@ -3115,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3128,60 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3222,8 +3009,6 @@ async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3285,8 +3070,6 @@ async def update_certificate_policy(self, vault_base_url, certificate_name, cert 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 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(certificate_policy, 'CertificatePolicy') @@ -3364,8 +3147,6 @@ async def update_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateUpdateParameters') @@ -3429,8 +3210,6 @@ async def get_certificate(self, vault_base_url, certificate_name, certificate_ve header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3493,8 +3272,6 @@ async def update_certificate_operation(self, vault_base_url, certificate_name, c 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3554,8 +3331,6 @@ async def get_certificate_operation(self, vault_base_url, certificate_name, *, c header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3613,8 +3388,6 @@ async def delete_certificate_operation(self, vault_base_url, certificate_name, * header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3686,8 +3459,6 @@ async def merge_certificate(self, vault_base_url, certificate_name, x509_certifi 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 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(parameters, 'CertificateMergeParameters') @@ -3748,8 +3519,6 @@ async def backup_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3809,8 +3578,6 @@ async def restore_certificate(self, vault_base_url, certificate_bundle_backup, * 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 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(parameters, 'CertificateRestoreParameters') @@ -3856,11 +3623,12 @@ def get_deleted_certificates( :type include_pending: bool :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v7_0.models.DeletedCertificateItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3868,9 +3636,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -3879,51 +3644,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3964,8 +3715,6 @@ async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4023,8 +3772,6 @@ async def purge_deleted_certificate(self, vault_base_url, certificate_name, *, c header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4080,8 +3827,6 @@ async def recover_deleted_certificate(self, vault_base_url, certificate_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4115,11 +3860,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.StorageAccountItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -4127,60 +3873,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_storage_accounts.metadata = {'url': '/storage'} def get_deleted_storage_accounts( @@ -4199,11 +3928,12 @@ def get_deleted_storage_accounts( :type maxresults: int :return: An iterator like instance of DeletedStorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.DeletedStorageAccountItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_storage_accounts.metadata['url'] @@ -4211,60 +3941,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('DeletedStorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedStorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_storage_accounts.metadata = {'url': '/deletedstorage'} async def get_deleted_storage_account(self, vault_base_url, storage_account_name, *, cls=None, **kwargs): @@ -4304,8 +4017,6 @@ async def get_deleted_storage_account(self, vault_base_url, storage_account_name header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4363,8 +4074,6 @@ async def purge_deleted_storage_account(self, vault_base_url, storage_account_na header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4417,8 +4126,6 @@ async def recover_deleted_storage_account(self, vault_base_url, storage_account_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4475,8 +4182,6 @@ async def backup_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4536,8 +4241,6 @@ async def restore_storage_account(self, vault_base_url, storage_bundle_backup, * 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 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(parameters, 'StorageRestoreParameters') @@ -4595,8 +4298,6 @@ async def delete_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4651,8 +4352,6 @@ async def get_storage_account(self, vault_base_url, storage_account_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4727,8 +4426,6 @@ async def set_storage_account(self, vault_base_url, storage_account_name, resour 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 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(parameters, 'StorageAccountCreateParameters') @@ -4804,8 +4501,6 @@ async def update_storage_account(self, vault_base_url, storage_account_name, act 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4868,8 +4563,6 @@ async def regenerate_storage_account_key(self, vault_base_url, storage_account_n 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4908,11 +4601,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.SasDefinitionItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4921,60 +4615,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def get_deleted_sas_definitions( @@ -4996,11 +4673,12 @@ def get_deleted_sas_definitions( :type maxresults: int :return: An iterator like instance of DeletedSasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSasDefinitionItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_sas_definitions.metadata['url'] @@ -5009,60 +4687,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_sas_definitions.metadata = {'url': '/deletedstorage/{storage-account-name}/sas'} async def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, *, cls=None, **kwargs): @@ -5105,8 +4766,6 @@ async def get_deleted_sas_definition(self, vault_base_url, storage_account_name, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5167,8 +4826,6 @@ async def recover_deleted_sas_definition(self, vault_base_url, storage_account_n header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -5226,8 +4883,6 @@ async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -5285,8 +4940,6 @@ async def get_sas_definition(self, vault_base_url, storage_account_name, sas_def header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5364,8 +5017,6 @@ async def set_sas_definition(self, vault_base_url, storage_account_name, sas_def 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 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(parameters, 'SasDefinitionCreateParameters') @@ -5446,8 +5097,6 @@ async def update_sas_definition(self, vault_base_url, storage_account_name, sas_ 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 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(parameters, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/__init__.py index 4debdd0f3d13..5e72f49a73f6 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/__init__.py @@ -22,9 +22,11 @@ from ._models_py3 import CertificateCreateParameters from ._models_py3 import CertificateImportParameters from ._models_py3 import CertificateIssuerItem + from ._models_py3 import CertificateIssuerListResult from ._models_py3 import CertificateIssuerSetParameters from ._models_py3 import CertificateIssuerUpdateParameters from ._models_py3 import CertificateItem + from ._models_py3 import CertificateListResult from ._models_py3 import CertificateMergeParameters from ._models_py3 import CertificateOperation from ._models_py3 import CertificateOperationUpdateParameter @@ -35,14 +37,19 @@ from ._models_py3 import Contacts from ._models_py3 import DeletedCertificateBundle from ._models_py3 import DeletedCertificateItem + from ._models_py3 import DeletedCertificateListResult from ._models_py3 import DeletedKeyBundle from ._models_py3 import DeletedKeyItem + from ._models_py3 import DeletedKeyListResult from ._models_py3 import DeletedSasDefinitionBundle from ._models_py3 import DeletedSasDefinitionItem + from ._models_py3 import DeletedSasDefinitionListResult from ._models_py3 import DeletedSecretBundle from ._models_py3 import DeletedSecretItem + from ._models_py3 import DeletedSecretListResult from ._models_py3 import DeletedStorageAccountItem from ._models_py3 import DeletedStorageBundle + from ._models_py3 import DeletedStorageListResult from ._models_py3 import Error from ._models_py3 import IssuerAttributes from ._models_py3 import IssuerBundle @@ -54,6 +61,7 @@ from ._models_py3 import KeyCreateParameters from ._models_py3 import KeyImportParameters from ._models_py3 import KeyItem + from ._models_py3 import KeyListResult from ._models_py3 import KeyOperationResult from ._models_py3 import KeyOperationsParameters from ._models_py3 import KeyProperties @@ -70,10 +78,12 @@ from ._models_py3 import SasDefinitionBundle from ._models_py3 import SasDefinitionCreateParameters from ._models_py3 import SasDefinitionItem + from ._models_py3 import SasDefinitionListResult from ._models_py3 import SasDefinitionUpdateParameters from ._models_py3 import SecretAttributes from ._models_py3 import SecretBundle from ._models_py3 import SecretItem + from ._models_py3 import SecretListResult from ._models_py3 import SecretProperties from ._models_py3 import SecretRestoreParameters from ._models_py3 import SecretSetParameters @@ -84,6 +94,7 @@ from ._models_py3 import StorageAccountRegenerteKeyParameters from ._models_py3 import StorageAccountUpdateParameters from ._models_py3 import StorageBundle + from ._models_py3 import StorageListResult from ._models_py3 import StorageRestoreParameters from ._models_py3 import SubjectAlternativeNames from ._models_py3 import Trigger @@ -101,9 +112,11 @@ from ._models import CertificateCreateParameters from ._models import CertificateImportParameters from ._models import CertificateIssuerItem + from ._models import CertificateIssuerListResult from ._models import CertificateIssuerSetParameters from ._models import CertificateIssuerUpdateParameters from ._models import CertificateItem + from ._models import CertificateListResult from ._models import CertificateMergeParameters from ._models import CertificateOperation from ._models import CertificateOperationUpdateParameter @@ -114,14 +127,19 @@ from ._models import Contacts from ._models import DeletedCertificateBundle from ._models import DeletedCertificateItem + from ._models import DeletedCertificateListResult from ._models import DeletedKeyBundle from ._models import DeletedKeyItem + from ._models import DeletedKeyListResult from ._models import DeletedSasDefinitionBundle from ._models import DeletedSasDefinitionItem + from ._models import DeletedSasDefinitionListResult from ._models import DeletedSecretBundle from ._models import DeletedSecretItem + from ._models import DeletedSecretListResult from ._models import DeletedStorageAccountItem from ._models import DeletedStorageBundle + from ._models import DeletedStorageListResult from ._models import Error from ._models import IssuerAttributes from ._models import IssuerBundle @@ -133,6 +151,7 @@ from ._models import KeyCreateParameters from ._models import KeyImportParameters from ._models import KeyItem + from ._models import KeyListResult from ._models import KeyOperationResult from ._models import KeyOperationsParameters from ._models import KeyProperties @@ -149,10 +168,12 @@ from ._models import SasDefinitionBundle from ._models import SasDefinitionCreateParameters from ._models import SasDefinitionItem + from ._models import SasDefinitionListResult from ._models import SasDefinitionUpdateParameters from ._models import SecretAttributes from ._models import SecretBundle from ._models import SecretItem + from ._models import SecretListResult from ._models import SecretProperties from ._models import SecretRestoreParameters from ._models import SecretSetParameters @@ -163,21 +184,11 @@ from ._models import StorageAccountRegenerteKeyParameters from ._models import StorageAccountUpdateParameters from ._models import StorageBundle + from ._models import StorageListResult from ._models import StorageRestoreParameters from ._models import SubjectAlternativeNames from ._models import Trigger from ._models import X509CertificateProperties -from ._paged_models import CertificateIssuerItemPaged -from ._paged_models import CertificateItemPaged -from ._paged_models import DeletedCertificateItemPaged -from ._paged_models import DeletedKeyItemPaged -from ._paged_models import DeletedSasDefinitionItemPaged -from ._paged_models import DeletedSecretItemPaged -from ._paged_models import DeletedStorageAccountItemPaged -from ._paged_models import KeyItemPaged -from ._paged_models import SasDefinitionItemPaged -from ._paged_models import SecretItemPaged -from ._paged_models import StorageAccountItemPaged from ._key_vault_client_enums import ( JsonWebKeyType, JsonWebKeyCurveName, @@ -203,9 +214,11 @@ 'CertificateCreateParameters', 'CertificateImportParameters', 'CertificateIssuerItem', + 'CertificateIssuerListResult', 'CertificateIssuerSetParameters', 'CertificateIssuerUpdateParameters', 'CertificateItem', + 'CertificateListResult', 'CertificateMergeParameters', 'CertificateOperation', 'CertificateOperationUpdateParameter', @@ -216,14 +229,19 @@ 'Contacts', 'DeletedCertificateBundle', 'DeletedCertificateItem', + 'DeletedCertificateListResult', 'DeletedKeyBundle', 'DeletedKeyItem', + 'DeletedKeyListResult', 'DeletedSasDefinitionBundle', 'DeletedSasDefinitionItem', + 'DeletedSasDefinitionListResult', 'DeletedSecretBundle', 'DeletedSecretItem', + 'DeletedSecretListResult', 'DeletedStorageAccountItem', 'DeletedStorageBundle', + 'DeletedStorageListResult', 'Error', 'IssuerAttributes', 'IssuerBundle', @@ -235,6 +253,7 @@ 'KeyCreateParameters', 'KeyImportParameters', 'KeyItem', + 'KeyListResult', 'KeyOperationResult', 'KeyOperationsParameters', 'KeyProperties', @@ -251,10 +270,12 @@ 'SasDefinitionBundle', 'SasDefinitionCreateParameters', 'SasDefinitionItem', + 'SasDefinitionListResult', 'SasDefinitionUpdateParameters', 'SecretAttributes', 'SecretBundle', 'SecretItem', + 'SecretListResult', 'SecretProperties', 'SecretRestoreParameters', 'SecretSetParameters', @@ -265,21 +286,11 @@ 'StorageAccountRegenerteKeyParameters', 'StorageAccountUpdateParameters', 'StorageBundle', + 'StorageListResult', 'StorageRestoreParameters', 'SubjectAlternativeNames', 'Trigger', 'X509CertificateProperties', - 'KeyItemPaged', - 'DeletedKeyItemPaged', - 'SecretItemPaged', - 'DeletedSecretItemPaged', - 'CertificateItemPaged', - 'CertificateIssuerItemPaged', - 'DeletedCertificateItemPaged', - 'StorageAccountItemPaged', - 'DeletedStorageAccountItemPaged', - 'SasDefinitionItemPaged', - 'DeletedSasDefinitionItemPaged', 'JsonWebKeyType', 'JsonWebKeyCurveName', 'DeletionRecoveryLevel', diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py index e02ddd417cdb..24dfe4beb6a9 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py @@ -385,6 +385,36 @@ def __init__(self, **kwargs): self.provider = kwargs.get('provider', None) +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -479,6 +509,35 @@ def __init__(self, **kwargs): self.x509_thumbprint = kwargs.get('x509_thumbprint', None) +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -867,6 +926,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: list[~azure.keyvault.v7_0.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -1037,6 +1125,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v7_0.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionBundle(Model): """A SAS definition bundle consists of key vault SAS definition details plus its attributes. @@ -1251,6 +1368,36 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSasDefinitionListResult(Model): + """The deleted SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted SAS + definitions in the vault along with a link to the next page of deleted sas + definitions + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + :ivar next_link: The URL to get the next set of deleted SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1452,6 +1599,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageAccountItem(Model): """The storage account item containing storage account metadata. @@ -1662,6 +1838,37 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedStorageListResult(Model): + """The deleted storage account list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted storage + accounts in the vault along with a link to the next page of deleted + storage accounts + :vartype value: + list[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + :ivar next_link: The URL to get the next set of deleted storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedStorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedStorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -2023,6 +2230,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v7_0.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2451,6 +2687,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v7_0.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2534,6 +2799,35 @@ def __init__(self, **kwargs): self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v7_0.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2779,6 +3073,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: list[~azure.keyvault.v7_0.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageRestoreParameters(Model): """The secret restore parameters. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py index 1f394c8f5f38..52f4aa981815 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py @@ -385,6 +385,36 @@ def __init__(self, *, id: str=None, provider: str=None, **kwargs) -> None: self.provider = provider +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -479,6 +509,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.x509_thumbprint = x509_thumbprint +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -867,6 +926,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: list[~azure.keyvault.v7_0.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -1037,6 +1125,35 @@ def __init__(self, *, kid: str=None, attributes=None, tags=None, recovery_id: st self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v7_0.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionBundle(Model): """A SAS definition bundle consists of key vault SAS definition details plus its attributes. @@ -1251,6 +1368,36 @@ def __init__(self, *, recovery_id: str=None, **kwargs) -> None: self.deleted_date = None +class DeletedSasDefinitionListResult(Model): + """The deleted SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted SAS + definitions in the vault along with a link to the next page of deleted sas + definitions + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + :ivar next_link: The URL to get the next set of deleted SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1452,6 +1599,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, content_type: st self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageAccountItem(Model): """The storage account item containing storage account metadata. @@ -1662,6 +1838,37 @@ def __init__(self, *, recovery_id: str=None, **kwargs) -> None: self.deleted_date = None +class DeletedStorageListResult(Model): + """The deleted storage account list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted storage + accounts in the vault along with a link to the next page of deleted + storage accounts + :vartype value: + list[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + :ivar next_link: The URL to get the next set of deleted storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedStorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedStorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -2023,6 +2230,35 @@ def __init__(self, *, key, hsm: bool=None, key_attributes=None, tags=None, **kwa self.tags = tags +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v7_0.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2451,6 +2687,35 @@ def __init__(self, *, template_uri: str, sas_type, validity_period: str, sas_def self.tags = tags +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v7_0.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2534,6 +2799,35 @@ def __init__(self, *, enabled: bool=None, not_before=None, expires=None, **kwarg self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v7_0.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2779,6 +3073,35 @@ def __init__(self, *, active_key_name: str=None, auto_regenerate_key: bool=None, self.tags = tags +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: list[~azure.keyvault.v7_0.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageRestoreParameters(Model): """The secret restore parameters. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_paged_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_paged_models.py deleted file mode 100644 index 0fbf874da2a7..000000000000 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_paged_models.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from azure.core.paging import Paged - - -class KeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`KeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[KeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(KeyItemPaged, self).__init__(*args, **kwargs) -class DeletedKeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedKeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedKeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedKeyItemPaged, self).__init__(*args, **kwargs) -class SecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SecretItemPaged, self).__init__(*args, **kwargs) -class DeletedSecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSecretItemPaged, self).__init__(*args, **kwargs) -class CertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateItemPaged, self).__init__(*args, **kwargs) -class CertificateIssuerItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateIssuerItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateIssuerItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateIssuerItemPaged, self).__init__(*args, **kwargs) -class DeletedCertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedCertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedCertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedCertificateItemPaged, self).__init__(*args, **kwargs) -class StorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`StorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(StorageAccountItemPaged, self).__init__(*args, **kwargs) -class DeletedStorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedStorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedStorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedStorageAccountItemPaged, self).__init__(*args, **kwargs) -class SasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SasDefinitionItemPaged, self).__init__(*args, **kwargs) -class DeletedSasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSasDefinitionItemPaged, self).__init__(*args, **kwargs) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index c0e15566f02e..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.paging import ItemPaged from .. import models import uuid @@ -77,8 +78,6 @@ def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops=None, 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 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(parameters, 'KeyCreateParameters') @@ -153,8 +152,6 @@ def import_key(self, vault_base_url, key_name, key, hsm=None, key_attributes=Non 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 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(parameters, 'KeyImportParameters') @@ -217,8 +214,6 @@ def delete_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -293,8 +288,6 @@ def update_key(self, vault_base_url, key_name, key_version, key_ops=None, key_at 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 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(parameters, 'KeyUpdateParameters') @@ -359,8 +352,6 @@ def get_key(self, vault_base_url, key_name, key_version, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -398,11 +389,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -411,46 +403,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -472,11 +461,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -484,46 +474,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_keys.metadata = {'url': '/keys'} def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -575,8 +562,6 @@ def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -648,8 +633,6 @@ def restore_key(self, vault_base_url, key_bundle_backup, cls=None, **kwargs): 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 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(parameters, 'KeyRestoreParameters') @@ -730,8 +713,6 @@ def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -809,8 +790,6 @@ def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -886,8 +865,6 @@ def sign(self, vault_base_url, key_name, key_version, algorithm, value, cls=None 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 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(parameters, 'KeySignParameters') @@ -969,8 +946,6 @@ def verify(self, vault_base_url, key_name, key_version, algorithm, digest, signa 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 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(parameters, 'KeyVerifyParameters') @@ -1048,8 +1023,6 @@ def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cls= 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 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(parameters, 'KeyOperationsParameters') @@ -1125,8 +1098,6 @@ def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cl 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 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(parameters, 'KeyOperationsParameters') @@ -1170,11 +1141,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v7_0.models.DeletedKeyItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1182,46 +1154,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -1262,8 +1231,6 @@ def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1321,8 +1288,6 @@ def purge_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1378,8 +1343,6 @@ def recover_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1449,8 +1412,6 @@ def set_secret(self, vault_base_url, secret_name, value, tags=None, content_type 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 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(parameters, 'SecretSetParameters') @@ -1511,8 +1472,6 @@ def delete_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1585,8 +1544,6 @@ def update_secret(self, vault_base_url, secret_name, secret_version, content_typ 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 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(parameters, 'SecretUpdateParameters') @@ -1649,8 +1606,6 @@ def get_secret(self, vault_base_url, secret_name, secret_version, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1688,11 +1643,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1700,46 +1656,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1760,11 +1713,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1773,46 +1727,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1831,11 +1782,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSecretItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1843,46 +1795,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): @@ -1922,8 +1871,6 @@ def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1981,8 +1928,6 @@ def purge_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2035,8 +1980,6 @@ def recover_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2094,8 +2037,6 @@ def backup_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2155,8 +2096,6 @@ def restore_secret(self, vault_base_url, secret_bundle_backup, cls=None, **kwarg 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 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(parameters, 'SecretRestoreParameters') @@ -2199,11 +2138,12 @@ def get_certificates( :type include_pending: bool :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2211,9 +2151,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -2222,37 +2159,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificates.metadata = {'url': '/certificates'} def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -2293,8 +2230,6 @@ def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2353,8 +2288,6 @@ def set_certificate_contacts(self, vault_base_url, contact_list=None, cls=None, 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 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(contacts, 'Contacts') @@ -2412,8 +2345,6 @@ def get_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2467,8 +2398,6 @@ def delete_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2505,11 +2434,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v7_0.models.CertificateIssuerItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2517,46 +2447,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, cls=None, **kwargs): @@ -2609,8 +2536,6 @@ def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credenti 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2684,8 +2609,6 @@ def update_certificate_issuer(self, vault_base_url, issuer_name, provider=None, 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2746,8 +2669,6 @@ def get_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2805,8 +2726,6 @@ def delete_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2876,8 +2795,6 @@ def create_certificate(self, vault_base_url, certificate_name, certificate_polic 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 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(parameters, 'CertificateCreateParameters') @@ -2960,8 +2877,6 @@ def import_certificate(self, vault_base_url, certificate_name, base64_encoded_ce 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 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(parameters, 'CertificateImportParameters') @@ -3003,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3016,46 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3096,8 +3009,6 @@ def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3159,8 +3070,6 @@ def update_certificate_policy(self, vault_base_url, certificate_name, certificat 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 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(certificate_policy, 'CertificatePolicy') @@ -3238,8 +3147,6 @@ def update_certificate(self, vault_base_url, certificate_name, certificate_versi 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 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(parameters, 'CertificateUpdateParameters') @@ -3303,8 +3210,6 @@ def get_certificate(self, vault_base_url, certificate_name, certificate_version, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3367,8 +3272,6 @@ def update_certificate_operation(self, vault_base_url, certificate_name, cancell 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3428,8 +3331,6 @@ def get_certificate_operation(self, vault_base_url, certificate_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3487,8 +3388,6 @@ def delete_certificate_operation(self, vault_base_url, certificate_name, cls=Non header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3560,8 +3459,6 @@ def merge_certificate(self, vault_base_url, certificate_name, x509_certificates, 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 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(parameters, 'CertificateMergeParameters') @@ -3622,8 +3519,6 @@ def backup_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3683,8 +3578,6 @@ def restore_certificate(self, vault_base_url, certificate_bundle_backup, cls=Non 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 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(parameters, 'CertificateRestoreParameters') @@ -3730,11 +3623,12 @@ def get_deleted_certificates( :type include_pending: bool :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v7_0.models.DeletedCertificateItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3742,9 +3636,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -3753,37 +3644,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3824,8 +3715,6 @@ def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3883,8 +3772,6 @@ def purge_deleted_certificate(self, vault_base_url, certificate_name, cls=None, header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3940,8 +3827,6 @@ def recover_deleted_certificate(self, vault_base_url, certificate_name, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3975,11 +3860,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.StorageAccountItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3987,46 +3873,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_storage_accounts.metadata = {'url': '/storage'} def get_deleted_storage_accounts( @@ -4045,11 +3928,12 @@ def get_deleted_storage_accounts( :type maxresults: int :return: An iterator like instance of DeletedStorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.DeletedStorageAccountItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_storage_accounts.metadata['url'] @@ -4057,46 +3941,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedStorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedStorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_storage_accounts.metadata = {'url': '/deletedstorage'} def get_deleted_storage_account(self, vault_base_url, storage_account_name, cls=None, **kwargs): @@ -4136,8 +4017,6 @@ def get_deleted_storage_account(self, vault_base_url, storage_account_name, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4195,8 +4074,6 @@ def purge_deleted_storage_account(self, vault_base_url, storage_account_name, cl header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4249,8 +4126,6 @@ def recover_deleted_storage_account(self, vault_base_url, storage_account_name, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4307,8 +4182,6 @@ def backup_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4368,8 +4241,6 @@ def restore_storage_account(self, vault_base_url, storage_bundle_backup, cls=Non 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 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(parameters, 'StorageRestoreParameters') @@ -4427,8 +4298,6 @@ def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4483,8 +4352,6 @@ def get_storage_account(self, vault_base_url, storage_account_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4559,8 +4426,6 @@ def set_storage_account(self, vault_base_url, storage_account_name, resource_id, 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 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(parameters, 'StorageAccountCreateParameters') @@ -4636,8 +4501,6 @@ def update_storage_account(self, vault_base_url, storage_account_name, active_ke 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4700,8 +4563,6 @@ def regenerate_storage_account_key(self, vault_base_url, storage_account_name, k 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4740,11 +4601,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.SasDefinitionItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4753,46 +4615,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def get_deleted_sas_definitions( @@ -4814,11 +4673,12 @@ def get_deleted_sas_definitions( :type maxresults: int :return: An iterator like instance of DeletedSasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSasDefinitionItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_sas_definitions.metadata['url'] @@ -4827,46 +4687,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_sas_definitions.metadata = {'url': '/deletedstorage/{storage-account-name}/sas'} def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, cls=None, **kwargs): @@ -4909,8 +4766,6 @@ def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_d header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4971,8 +4826,6 @@ def recover_deleted_sas_definition(self, vault_base_url, storage_account_name, s header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -5030,8 +4883,6 @@ def delete_sas_definition(self, vault_base_url, storage_account_name, sas_defini header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -5089,8 +4940,6 @@ def get_sas_definition(self, vault_base_url, storage_account_name, sas_definitio header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5168,8 +5017,6 @@ def set_sas_definition(self, vault_base_url, storage_account_name, sas_definitio 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 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(parameters, 'SasDefinitionCreateParameters') @@ -5250,8 +5097,6 @@ def update_sas_definition(self, vault_base_url, storage_account_name, sas_defini 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 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(parameters, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 56148a5820ef..0714edabf420 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -2,8 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from typing import Any, Callable, Mapping, TYPE_CHECKING -from azure.core.async_paging import AsyncPagedMixin +from typing import Any, Callable, Mapping, AsyncIterator, TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy @@ -23,10 +22,10 @@ class AsyncPagingAdapter: - """For each item in an AsyncPagedMixin, returns the result of applying fn to that item. + """For each item in an AsyncIterator, returns the result of applying fn to that item. Python 3.6 added syntax that could replace this (yield within async for).""" - def __init__(self, pages: AsyncPagedMixin, fn: Callable[[Model], Any]) -> None: + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: self._pages = pages self._fn = fn diff --git a/sdk/keyvault/azure-keyvault-keys/tests/keys_vault_client_async.py b/sdk/keyvault/azure-keyvault-keys/tests/keys_vault_client_async.py index b95fd1aa7ad4..a09d581eb39a 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/keys_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/keys_vault_client_async.py @@ -3,7 +3,6 @@ # Licensed under the MIT License. # ------------------------------------ from typing import Any, Callable, Mapping, TYPE_CHECKING -from azure.core.async_paging import AsyncPagedMixin from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies import AsyncBearerTokenCredentialPolicy diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/key_vault_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/key_vault_client.py index afec64f70804..6221dd5e7bec 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/key_vault_client.py @@ -50,14 +50,14 @@ def get_configuration_class(api_version, aio=False): """ if api_version == V7_0_VERSION: if aio: - from .v7_0.aio import KeyVaultClientConfiguration as ImplConfig + from .v7_0.aio._configuration_async import KeyVaultClientConfiguration as ImplConfig else: - from .v7_0 import KeyVaultClientConfiguration as ImplConfig + from .v7_0._configuration import KeyVaultClientConfiguration as ImplConfig elif api_version == V2016_10_01_VERSION: if aio: - from .v2016_10_01.aio import KeyVaultClientConfiguration as ImplConfig + from .v2016_10_01.aio._configuration_async import KeyVaultClientConfiguration as ImplConfig else: - from .v2016_10_01 import KeyVaultClientConfiguration as ImplConfig + from .v2016_10_01._configuration import KeyVaultClientConfiguration as ImplConfig else: raise NotImplementedError("API version {} is not available".format(api_version)) return ImplConfig diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/__init__.py index d3fda25cc7ab..e913d4cf6c46 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/__init__.py @@ -9,9 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from ._configuration import KeyVaultClientConfiguration from ._key_vault_client import KeyVaultClient -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] from .version import VERSION diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_configuration.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_configuration.py index beb5eb930fa8..28cf75e3d2b4 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_configuration.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_configuration.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials @@ -45,4 +44,5 @@ def _configure(self, **kwargs): self.proxy_policy = policies.ProxyPolicy(**kwargs) self.logging_policy = policies.NetworkTraceLoggingPolicy(**kwargs) self.retry_policy = policies.RetryPolicy(**kwargs) + self.custom_hook_policy = policies.CustomHookPolicy(**kwargs) self.redirect_policy = policies.RedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_key_vault_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_key_vault_client.py index 0252b1e16a5e..e3ec609b6cd3 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_key_vault_client.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/__init__.py index ffece9055d9b..fb2e6c3866fd 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/__init__.py @@ -10,5 +10,4 @@ # -------------------------------------------------------------------------- from ._key_vault_client_async import KeyVaultClient -from ._configuration_async import KeyVaultClientConfiguration -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_configuration_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_configuration_async.py index 2144132ebe2d..a61d9eeff444 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_configuration_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_configuration_async.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py index 559d48da029a..ad4b8a97754f 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 28ea64adc6a6..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.async_paging import AsyncItemPaged, AsyncList from ... import models import uuid @@ -78,8 +79,6 @@ async def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops 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 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(parameters, 'KeyCreateParameters') @@ -154,8 +153,6 @@ async def import_key(self, vault_base_url, key_name, key, hsm=None, key_attribut 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 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(parameters, 'KeyImportParameters') @@ -218,8 +215,6 @@ async def delete_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -294,8 +289,6 @@ async def update_key(self, vault_base_url, key_name, key_version, key_ops=None, 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 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(parameters, 'KeyUpdateParameters') @@ -360,8 +353,6 @@ async def get_key(self, vault_base_url, key_name, key_version, *, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -399,11 +390,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -412,60 +404,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -487,11 +462,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -499,60 +475,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_keys.metadata = {'url': '/keys'} async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -604,8 +563,6 @@ async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -677,8 +634,6 @@ async def restore_key(self, vault_base_url, key_bundle_backup, *, cls=None, **kw 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 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(parameters, 'KeyRestoreParameters') @@ -759,8 +714,6 @@ async def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -838,8 +791,6 @@ async def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -915,8 +866,6 @@ async def sign(self, vault_base_url, key_name, key_version, algorithm, value, *, 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 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(parameters, 'KeySignParameters') @@ -998,8 +947,6 @@ async def verify(self, vault_base_url, key_name, key_version, algorithm, digest, 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 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(parameters, 'KeyVerifyParameters') @@ -1077,8 +1024,6 @@ async def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value 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 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(parameters, 'KeyOperationsParameters') @@ -1154,8 +1099,6 @@ async def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, val 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 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(parameters, 'KeyOperationsParameters') @@ -1199,11 +1142,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedKeyItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1211,60 +1155,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -1305,8 +1232,6 @@ async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs) header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1364,8 +1289,6 @@ async def purge_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwarg header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1421,8 +1344,6 @@ async def recover_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1493,8 +1414,6 @@ async def set_secret(self, vault_base_url, secret_name, value, tags=None, conten 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 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(parameters, 'SecretSetParameters') @@ -1555,8 +1474,6 @@ async def delete_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1630,8 +1547,6 @@ async def update_secret(self, vault_base_url, secret_name, secret_version, conte 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 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(parameters, 'SecretUpdateParameters') @@ -1694,8 +1609,6 @@ async def get_secret(self, vault_base_url, secret_name, secret_version, *, cls=N header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1733,11 +1646,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1745,60 +1659,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1819,11 +1716,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1832,60 +1730,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1904,11 +1785,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedSecretItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1916,60 +1798,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs): @@ -2009,8 +1874,6 @@ async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2068,8 +1931,6 @@ async def purge_deleted_secret(self, vault_base_url, secret_name, *, cls=None, * header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2122,8 +1983,6 @@ async def recover_deleted_secret(self, vault_base_url, secret_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2181,8 +2040,6 @@ async def backup_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2242,8 +2099,6 @@ async def restore_secret(self, vault_base_url, secret_bundle_backup, *, cls=None 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 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(parameters, 'SecretRestoreParameters') @@ -2283,11 +2138,12 @@ def get_certificates( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2295,60 +2151,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificates.metadata = {'url': '/certificates'} async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -2389,8 +2228,6 @@ async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2449,8 +2286,6 @@ async def set_certificate_contacts(self, vault_base_url, contact_list=None, *, c 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 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(contacts, 'Contacts') @@ -2508,8 +2343,6 @@ async def get_certificate_contacts(self, vault_base_url, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2563,8 +2396,6 @@ async def delete_certificate_contacts(self, vault_base_url, *, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2601,11 +2432,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateIssuerItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2613,60 +2445,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, *, cls=None, **kwargs): @@ -2720,8 +2535,6 @@ async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, cr 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2796,8 +2609,6 @@ async def update_certificate_issuer(self, vault_base_url, issuer_name, provider= 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2858,8 +2669,6 @@ async def get_certificate_issuer(self, vault_base_url, issuer_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2917,8 +2726,6 @@ async def delete_certificate_issuer(self, vault_base_url, issuer_name, *, cls=No header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2988,8 +2795,6 @@ async def create_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateCreateParameters') @@ -3072,8 +2877,6 @@ async def import_certificate(self, vault_base_url, certificate_name, base64_enco 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 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(parameters, 'CertificateImportParameters') @@ -3115,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3128,60 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3222,8 +3009,6 @@ async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3285,8 +3070,6 @@ async def update_certificate_policy(self, vault_base_url, certificate_name, cert 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 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(certificate_policy, 'CertificatePolicy') @@ -3364,8 +3147,6 @@ async def update_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateUpdateParameters') @@ -3429,8 +3210,6 @@ async def get_certificate(self, vault_base_url, certificate_name, certificate_ve header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3493,8 +3272,6 @@ async def update_certificate_operation(self, vault_base_url, certificate_name, c 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3554,8 +3331,6 @@ async def get_certificate_operation(self, vault_base_url, certificate_name, *, c header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3613,8 +3388,6 @@ async def delete_certificate_operation(self, vault_base_url, certificate_name, * header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3686,8 +3459,6 @@ async def merge_certificate(self, vault_base_url, certificate_name, x509_certifi 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 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(parameters, 'CertificateMergeParameters') @@ -3730,11 +3501,12 @@ def get_deleted_certificates( :type maxresults: int :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedCertificateItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3742,60 +3514,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3836,8 +3591,6 @@ async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3895,8 +3648,6 @@ async def purge_deleted_certificate(self, vault_base_url, certificate_name, *, c header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3952,8 +3703,6 @@ async def recover_deleted_certificate(self, vault_base_url, certificate_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3987,11 +3736,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v2016_10_01.models.StorageAccountItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3999,60 +3749,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_storage_accounts.metadata = {'url': '/storage'} async def delete_storage_account(self, vault_base_url, storage_account_name, *, cls=None, **kwargs): @@ -4089,8 +3822,6 @@ async def delete_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4145,8 +3876,6 @@ async def get_storage_account(self, vault_base_url, storage_account_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4221,8 +3950,6 @@ async def set_storage_account(self, vault_base_url, storage_account_name, resour 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 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(parameters, 'StorageAccountCreateParameters') @@ -4298,8 +4025,6 @@ async def update_storage_account(self, vault_base_url, storage_account_name, act 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4362,8 +4087,6 @@ async def regenerate_storage_account_key(self, vault_base_url, storage_account_n 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4402,11 +4125,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v2016_10_01.models.SasDefinitionItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4415,60 +4139,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, *, cls=None, **kwargs): @@ -4508,8 +4215,6 @@ async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4567,8 +4272,6 @@ async def get_sas_definition(self, vault_base_url, storage_account_name, sas_def header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4639,8 +4342,6 @@ async def set_sas_definition(self, vault_base_url, storage_account_name, sas_def 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 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(parameters1, 'SasDefinitionCreateParameters') @@ -4714,8 +4415,6 @@ async def update_sas_definition(self, vault_base_url, storage_account_name, sas_ 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 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(parameters1, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/__init__.py index 76f4bf1ab9bc..6f134becdbd3 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/__init__.py @@ -20,9 +20,11 @@ from ._models_py3 import CertificateCreateParameters from ._models_py3 import CertificateImportParameters from ._models_py3 import CertificateIssuerItem + from ._models_py3 import CertificateIssuerListResult from ._models_py3 import CertificateIssuerSetParameters from ._models_py3 import CertificateIssuerUpdateParameters from ._models_py3 import CertificateItem + from ._models_py3 import CertificateListResult from ._models_py3 import CertificateMergeParameters from ._models_py3 import CertificateOperation from ._models_py3 import CertificateOperationUpdateParameter @@ -32,10 +34,13 @@ from ._models_py3 import Contacts from ._models_py3 import DeletedCertificateBundle from ._models_py3 import DeletedCertificateItem + from ._models_py3 import DeletedCertificateListResult from ._models_py3 import DeletedKeyBundle from ._models_py3 import DeletedKeyItem + from ._models_py3 import DeletedKeyListResult from ._models_py3 import DeletedSecretBundle from ._models_py3 import DeletedSecretItem + from ._models_py3 import DeletedSecretListResult from ._models_py3 import Error from ._models_py3 import IssuerAttributes from ._models_py3 import IssuerBundle @@ -47,6 +52,7 @@ from ._models_py3 import KeyCreateParameters from ._models_py3 import KeyImportParameters from ._models_py3 import KeyItem + from ._models_py3 import KeyListResult from ._models_py3 import KeyOperationResult from ._models_py3 import KeyOperationsParameters from ._models_py3 import KeyProperties @@ -63,10 +69,12 @@ from ._models_py3 import SasDefinitionBundle from ._models_py3 import SasDefinitionCreateParameters from ._models_py3 import SasDefinitionItem + from ._models_py3 import SasDefinitionListResult from ._models_py3 import SasDefinitionUpdateParameters from ._models_py3 import SecretAttributes from ._models_py3 import SecretBundle from ._models_py3 import SecretItem + from ._models_py3 import SecretListResult from ._models_py3 import SecretProperties from ._models_py3 import SecretRestoreParameters from ._models_py3 import SecretSetParameters @@ -77,6 +85,7 @@ from ._models_py3 import StorageAccountRegenerteKeyParameters from ._models_py3 import StorageAccountUpdateParameters from ._models_py3 import StorageBundle + from ._models_py3 import StorageListResult from ._models_py3 import SubjectAlternativeNames from ._models_py3 import Trigger from ._models_py3 import X509CertificateProperties @@ -91,9 +100,11 @@ from ._models import CertificateCreateParameters from ._models import CertificateImportParameters from ._models import CertificateIssuerItem + from ._models import CertificateIssuerListResult from ._models import CertificateIssuerSetParameters from ._models import CertificateIssuerUpdateParameters from ._models import CertificateItem + from ._models import CertificateListResult from ._models import CertificateMergeParameters from ._models import CertificateOperation from ._models import CertificateOperationUpdateParameter @@ -103,10 +114,13 @@ from ._models import Contacts from ._models import DeletedCertificateBundle from ._models import DeletedCertificateItem + from ._models import DeletedCertificateListResult from ._models import DeletedKeyBundle from ._models import DeletedKeyItem + from ._models import DeletedKeyListResult from ._models import DeletedSecretBundle from ._models import DeletedSecretItem + from ._models import DeletedSecretListResult from ._models import Error from ._models import IssuerAttributes from ._models import IssuerBundle @@ -118,6 +132,7 @@ from ._models import KeyCreateParameters from ._models import KeyImportParameters from ._models import KeyItem + from ._models import KeyListResult from ._models import KeyOperationResult from ._models import KeyOperationsParameters from ._models import KeyProperties @@ -134,10 +149,12 @@ from ._models import SasDefinitionBundle from ._models import SasDefinitionCreateParameters from ._models import SasDefinitionItem + from ._models import SasDefinitionListResult from ._models import SasDefinitionUpdateParameters from ._models import SecretAttributes from ._models import SecretBundle from ._models import SecretItem + from ._models import SecretListResult from ._models import SecretProperties from ._models import SecretRestoreParameters from ._models import SecretSetParameters @@ -148,18 +165,10 @@ from ._models import StorageAccountRegenerteKeyParameters from ._models import StorageAccountUpdateParameters from ._models import StorageBundle + from ._models import StorageListResult from ._models import SubjectAlternativeNames from ._models import Trigger from ._models import X509CertificateProperties -from ._paged_models import CertificateIssuerItemPaged -from ._paged_models import CertificateItemPaged -from ._paged_models import DeletedCertificateItemPaged -from ._paged_models import DeletedKeyItemPaged -from ._paged_models import DeletedSecretItemPaged -from ._paged_models import KeyItemPaged -from ._paged_models import SasDefinitionItemPaged -from ._paged_models import SecretItemPaged -from ._paged_models import StorageAccountItemPaged from ._key_vault_client_enums import ( JsonWebKeyType, JsonWebKeyCurveName, @@ -182,9 +191,11 @@ 'CertificateCreateParameters', 'CertificateImportParameters', 'CertificateIssuerItem', + 'CertificateIssuerListResult', 'CertificateIssuerSetParameters', 'CertificateIssuerUpdateParameters', 'CertificateItem', + 'CertificateListResult', 'CertificateMergeParameters', 'CertificateOperation', 'CertificateOperationUpdateParameter', @@ -194,10 +205,13 @@ 'Contacts', 'DeletedCertificateBundle', 'DeletedCertificateItem', + 'DeletedCertificateListResult', 'DeletedKeyBundle', 'DeletedKeyItem', + 'DeletedKeyListResult', 'DeletedSecretBundle', 'DeletedSecretItem', + 'DeletedSecretListResult', 'Error', 'IssuerAttributes', 'IssuerBundle', @@ -209,6 +223,7 @@ 'KeyCreateParameters', 'KeyImportParameters', 'KeyItem', + 'KeyListResult', 'KeyOperationResult', 'KeyOperationsParameters', 'KeyProperties', @@ -225,10 +240,12 @@ 'SasDefinitionBundle', 'SasDefinitionCreateParameters', 'SasDefinitionItem', + 'SasDefinitionListResult', 'SasDefinitionUpdateParameters', 'SecretAttributes', 'SecretBundle', 'SecretItem', + 'SecretListResult', 'SecretProperties', 'SecretRestoreParameters', 'SecretSetParameters', @@ -239,18 +256,10 @@ 'StorageAccountRegenerteKeyParameters', 'StorageAccountUpdateParameters', 'StorageBundle', + 'StorageListResult', 'SubjectAlternativeNames', 'Trigger', 'X509CertificateProperties', - 'KeyItemPaged', - 'DeletedKeyItemPaged', - 'SecretItemPaged', - 'DeletedSecretItemPaged', - 'CertificateItemPaged', - 'CertificateIssuerItemPaged', - 'DeletedCertificateItemPaged', - 'StorageAccountItemPaged', - 'SasDefinitionItemPaged', 'JsonWebKeyType', 'JsonWebKeyCurveName', 'DeletionRecoveryLevel', diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py index f9caaf92c16e..e918a167f2dd 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py @@ -341,6 +341,37 @@ def __init__(self, **kwargs): self.provider = kwargs.get('provider', None) +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -435,6 +466,35 @@ def __init__(self, **kwargs): self.x509_thumbprint = kwargs.get('x509_thumbprint', None) +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v2016_10_01.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -805,6 +865,36 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: + list[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -975,6 +1065,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1176,6 +1295,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -1531,6 +1679,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v2016_10_01.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2012,6 +2189,35 @@ def __init__(self, **kwargs): self.tags = None +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2084,6 +2290,35 @@ def __init__(self, **kwargs): self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2415,6 +2650,36 @@ def __init__(self, **kwargs): self.tags = None +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SubjectAlternativeNames(Model): """The subject alternate names of a X509 object. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py index 4920c195ef89..07d530b486f6 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py @@ -341,6 +341,37 @@ def __init__(self, *, id: str=None, provider: str=None, **kwargs) -> None: self.provider = provider +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -435,6 +466,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.x509_thumbprint = x509_thumbprint +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v2016_10_01.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -805,6 +865,36 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: + list[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -975,6 +1065,35 @@ def __init__(self, *, kid: str=None, attributes=None, tags=None, recovery_id: st self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1176,6 +1295,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, content_type: st self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -1531,6 +1679,35 @@ def __init__(self, *, key, hsm: bool=None, key_attributes=None, tags=None, **kwa self.tags = tags +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v2016_10_01.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2012,6 +2189,35 @@ def __init__(self, **kwargs) -> None: self.tags = None +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2084,6 +2290,35 @@ def __init__(self, *, enabled: bool=None, not_before=None, expires=None, **kwarg self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2415,6 +2650,36 @@ def __init__(self, **kwargs) -> None: self.tags = None +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SubjectAlternativeNames(Model): """The subject alternate names of a X509 object. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_paged_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_paged_models.py deleted file mode 100644 index e5ddd1d7edc4..000000000000 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_paged_models.py +++ /dev/null @@ -1,131 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from azure.core.paging import Paged - - -class KeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`KeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[KeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(KeyItemPaged, self).__init__(*args, **kwargs) -class DeletedKeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedKeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedKeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedKeyItemPaged, self).__init__(*args, **kwargs) -class SecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SecretItemPaged, self).__init__(*args, **kwargs) -class DeletedSecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSecretItemPaged, self).__init__(*args, **kwargs) -class CertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateItemPaged, self).__init__(*args, **kwargs) -class CertificateIssuerItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateIssuerItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateIssuerItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateIssuerItemPaged, self).__init__(*args, **kwargs) -class DeletedCertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedCertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedCertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedCertificateItemPaged, self).__init__(*args, **kwargs) -class StorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`StorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(StorageAccountItemPaged, self).__init__(*args, **kwargs) -class SasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SasDefinitionItemPaged, self).__init__(*args, **kwargs) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 40ad1ab95087..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.paging import ItemPaged from .. import models import uuid @@ -78,8 +79,6 @@ def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops=None, 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 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(parameters, 'KeyCreateParameters') @@ -154,8 +153,6 @@ def import_key(self, vault_base_url, key_name, key, hsm=None, key_attributes=Non 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 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(parameters, 'KeyImportParameters') @@ -218,8 +215,6 @@ def delete_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -294,8 +289,6 @@ def update_key(self, vault_base_url, key_name, key_version, key_ops=None, key_at 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 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(parameters, 'KeyUpdateParameters') @@ -360,8 +353,6 @@ def get_key(self, vault_base_url, key_name, key_version, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -399,11 +390,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -412,46 +404,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -473,11 +462,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -485,46 +475,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_keys.metadata = {'url': '/keys'} def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -576,8 +563,6 @@ def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -649,8 +634,6 @@ def restore_key(self, vault_base_url, key_bundle_backup, cls=None, **kwargs): 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 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(parameters, 'KeyRestoreParameters') @@ -731,8 +714,6 @@ def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -810,8 +791,6 @@ def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -887,8 +866,6 @@ def sign(self, vault_base_url, key_name, key_version, algorithm, value, cls=None 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 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(parameters, 'KeySignParameters') @@ -970,8 +947,6 @@ def verify(self, vault_base_url, key_name, key_version, algorithm, digest, signa 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 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(parameters, 'KeyVerifyParameters') @@ -1049,8 +1024,6 @@ def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cls= 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 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(parameters, 'KeyOperationsParameters') @@ -1126,8 +1099,6 @@ def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cl 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 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(parameters, 'KeyOperationsParameters') @@ -1171,11 +1142,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedKeyItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1183,46 +1155,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -1263,8 +1232,6 @@ def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1322,8 +1289,6 @@ def purge_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1379,8 +1344,6 @@ def recover_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1451,8 +1414,6 @@ def set_secret(self, vault_base_url, secret_name, value, tags=None, content_type 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 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(parameters, 'SecretSetParameters') @@ -1513,8 +1474,6 @@ def delete_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1588,8 +1547,6 @@ def update_secret(self, vault_base_url, secret_name, secret_version, content_typ 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 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(parameters, 'SecretUpdateParameters') @@ -1652,8 +1609,6 @@ def get_secret(self, vault_base_url, secret_name, secret_version, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1691,11 +1646,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1703,46 +1659,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1763,11 +1716,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1776,46 +1730,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1834,11 +1785,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedSecretItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1846,46 +1798,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): @@ -1925,8 +1874,6 @@ def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1984,8 +1931,6 @@ def purge_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2038,8 +1983,6 @@ def recover_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2097,8 +2040,6 @@ def backup_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2158,8 +2099,6 @@ def restore_secret(self, vault_base_url, secret_bundle_backup, cls=None, **kwarg 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 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(parameters, 'SecretRestoreParameters') @@ -2199,11 +2138,12 @@ def get_certificates( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2211,46 +2151,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificates.metadata = {'url': '/certificates'} def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -2291,8 +2228,6 @@ def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2351,8 +2286,6 @@ def set_certificate_contacts(self, vault_base_url, contact_list=None, cls=None, 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 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(contacts, 'Contacts') @@ -2410,8 +2343,6 @@ def get_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2465,8 +2396,6 @@ def delete_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2503,11 +2432,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateIssuerItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2515,46 +2445,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, cls=None, **kwargs): @@ -2608,8 +2535,6 @@ def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credenti 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2684,8 +2609,6 @@ def update_certificate_issuer(self, vault_base_url, issuer_name, provider=None, 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2746,8 +2669,6 @@ def get_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2805,8 +2726,6 @@ def delete_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2876,8 +2795,6 @@ def create_certificate(self, vault_base_url, certificate_name, certificate_polic 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 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(parameters, 'CertificateCreateParameters') @@ -2960,8 +2877,6 @@ def import_certificate(self, vault_base_url, certificate_name, base64_encoded_ce 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 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(parameters, 'CertificateImportParameters') @@ -3003,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3016,46 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3096,8 +3009,6 @@ def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3159,8 +3070,6 @@ def update_certificate_policy(self, vault_base_url, certificate_name, certificat 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 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(certificate_policy, 'CertificatePolicy') @@ -3238,8 +3147,6 @@ def update_certificate(self, vault_base_url, certificate_name, certificate_versi 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 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(parameters, 'CertificateUpdateParameters') @@ -3303,8 +3210,6 @@ def get_certificate(self, vault_base_url, certificate_name, certificate_version, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3367,8 +3272,6 @@ def update_certificate_operation(self, vault_base_url, certificate_name, cancell 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3428,8 +3331,6 @@ def get_certificate_operation(self, vault_base_url, certificate_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3487,8 +3388,6 @@ def delete_certificate_operation(self, vault_base_url, certificate_name, cls=Non header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3560,8 +3459,6 @@ def merge_certificate(self, vault_base_url, certificate_name, x509_certificates, 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 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(parameters, 'CertificateMergeParameters') @@ -3604,11 +3501,12 @@ def get_deleted_certificates( :type maxresults: int :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedCertificateItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3616,46 +3514,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3696,8 +3591,6 @@ def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3755,8 +3648,6 @@ def purge_deleted_certificate(self, vault_base_url, certificate_name, cls=None, header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3812,8 +3703,6 @@ def recover_deleted_certificate(self, vault_base_url, certificate_name, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3847,11 +3736,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v2016_10_01.models.StorageAccountItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3859,46 +3749,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_storage_accounts.metadata = {'url': '/storage'} def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, **kwargs): @@ -3935,8 +3822,6 @@ def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3991,8 +3876,6 @@ def get_storage_account(self, vault_base_url, storage_account_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4067,8 +3950,6 @@ def set_storage_account(self, vault_base_url, storage_account_name, resource_id, 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 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(parameters, 'StorageAccountCreateParameters') @@ -4144,8 +4025,6 @@ def update_storage_account(self, vault_base_url, storage_account_name, active_ke 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4208,8 +4087,6 @@ def regenerate_storage_account_key(self, vault_base_url, storage_account_name, k 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4248,11 +4125,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v2016_10_01.models.SasDefinitionItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4261,46 +4139,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def delete_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, cls=None, **kwargs): @@ -4340,8 +4215,6 @@ def delete_sas_definition(self, vault_base_url, storage_account_name, sas_defini header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4399,8 +4272,6 @@ def get_sas_definition(self, vault_base_url, storage_account_name, sas_definitio header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4471,8 +4342,6 @@ def set_sas_definition(self, vault_base_url, storage_account_name, sas_definitio 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 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(parameters1, 'SasDefinitionCreateParameters') @@ -4546,8 +4415,6 @@ def update_sas_definition(self, vault_base_url, storage_account_name, sas_defini 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 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(parameters1, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/__init__.py index d3fda25cc7ab..e913d4cf6c46 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/__init__.py @@ -9,9 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from ._configuration import KeyVaultClientConfiguration from ._key_vault_client import KeyVaultClient -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] from .version import VERSION diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_configuration.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_configuration.py index beb5eb930fa8..28cf75e3d2b4 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_configuration.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_configuration.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials @@ -45,4 +44,5 @@ def _configure(self, **kwargs): self.proxy_policy = policies.ProxyPolicy(**kwargs) self.logging_policy = policies.NetworkTraceLoggingPolicy(**kwargs) self.retry_policy = policies.RetryPolicy(**kwargs) + self.custom_hook_policy = policies.CustomHookPolicy(**kwargs) self.redirect_policy = policies.RedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_key_vault_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_key_vault_client.py index 699433682e60..a1a1eb19328b 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_key_vault_client.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/__init__.py index ffece9055d9b..fb2e6c3866fd 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/__init__.py @@ -10,5 +10,4 @@ # -------------------------------------------------------------------------- from ._key_vault_client_async import KeyVaultClient -from ._configuration_async import KeyVaultClientConfiguration -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_configuration_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_configuration_async.py index 2144132ebe2d..a61d9eeff444 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_configuration_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_configuration_async.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_key_vault_client_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_key_vault_client_async.py index 739ab6ea407d..482d6336ab1a 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_key_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_key_vault_client_async.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index a97144221c6a..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.async_paging import AsyncItemPaged, AsyncList from ... import models import uuid @@ -77,8 +78,6 @@ async def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops 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 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(parameters, 'KeyCreateParameters') @@ -153,8 +152,6 @@ async def import_key(self, vault_base_url, key_name, key, hsm=None, key_attribut 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 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(parameters, 'KeyImportParameters') @@ -217,8 +214,6 @@ async def delete_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -293,8 +288,6 @@ async def update_key(self, vault_base_url, key_name, key_version, key_ops=None, 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 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(parameters, 'KeyUpdateParameters') @@ -359,8 +352,6 @@ async def get_key(self, vault_base_url, key_name, key_version, *, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -398,11 +389,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -411,60 +403,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -486,11 +461,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -498,60 +474,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_keys.metadata = {'url': '/keys'} async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -603,8 +562,6 @@ async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -676,8 +633,6 @@ async def restore_key(self, vault_base_url, key_bundle_backup, *, cls=None, **kw 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 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(parameters, 'KeyRestoreParameters') @@ -758,8 +713,6 @@ async def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -837,8 +790,6 @@ async def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -914,8 +865,6 @@ async def sign(self, vault_base_url, key_name, key_version, algorithm, value, *, 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 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(parameters, 'KeySignParameters') @@ -997,8 +946,6 @@ async def verify(self, vault_base_url, key_name, key_version, algorithm, digest, 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 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(parameters, 'KeyVerifyParameters') @@ -1076,8 +1023,6 @@ async def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value 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 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(parameters, 'KeyOperationsParameters') @@ -1153,8 +1098,6 @@ async def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, val 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 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(parameters, 'KeyOperationsParameters') @@ -1198,11 +1141,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v7_0.models.DeletedKeyItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1210,60 +1154,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -1304,8 +1231,6 @@ async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs) header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1363,8 +1288,6 @@ async def purge_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwarg header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1420,8 +1343,6 @@ async def recover_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1491,8 +1412,6 @@ async def set_secret(self, vault_base_url, secret_name, value, tags=None, conten 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 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(parameters, 'SecretSetParameters') @@ -1553,8 +1472,6 @@ async def delete_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1627,8 +1544,6 @@ async def update_secret(self, vault_base_url, secret_name, secret_version, conte 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 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(parameters, 'SecretUpdateParameters') @@ -1691,8 +1606,6 @@ async def get_secret(self, vault_base_url, secret_name, secret_version, *, cls=N header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1730,11 +1643,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1742,60 +1656,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1816,11 +1713,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1829,60 +1727,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1901,11 +1782,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSecretItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1913,60 +1795,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs): @@ -2006,8 +1871,6 @@ async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2065,8 +1928,6 @@ async def purge_deleted_secret(self, vault_base_url, secret_name, *, cls=None, * header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2119,8 +1980,6 @@ async def recover_deleted_secret(self, vault_base_url, secret_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2178,8 +2037,6 @@ async def backup_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2239,8 +2096,6 @@ async def restore_secret(self, vault_base_url, secret_bundle_backup, *, cls=None 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 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(parameters, 'SecretRestoreParameters') @@ -2283,11 +2138,12 @@ def get_certificates( :type include_pending: bool :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2295,9 +2151,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -2306,51 +2159,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificates.metadata = {'url': '/certificates'} async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -2391,8 +2230,6 @@ async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2451,8 +2288,6 @@ async def set_certificate_contacts(self, vault_base_url, contact_list=None, *, c 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 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(contacts, 'Contacts') @@ -2510,8 +2345,6 @@ async def get_certificate_contacts(self, vault_base_url, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2565,8 +2398,6 @@ async def delete_certificate_contacts(self, vault_base_url, *, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2603,11 +2434,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v7_0.models.CertificateIssuerItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2615,60 +2447,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, *, cls=None, **kwargs): @@ -2721,8 +2536,6 @@ async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, cr 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2796,8 +2609,6 @@ async def update_certificate_issuer(self, vault_base_url, issuer_name, provider= 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2858,8 +2669,6 @@ async def get_certificate_issuer(self, vault_base_url, issuer_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2917,8 +2726,6 @@ async def delete_certificate_issuer(self, vault_base_url, issuer_name, *, cls=No header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2988,8 +2795,6 @@ async def create_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateCreateParameters') @@ -3072,8 +2877,6 @@ async def import_certificate(self, vault_base_url, certificate_name, base64_enco 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 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(parameters, 'CertificateImportParameters') @@ -3115,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3128,60 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3222,8 +3009,6 @@ async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3285,8 +3070,6 @@ async def update_certificate_policy(self, vault_base_url, certificate_name, cert 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 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(certificate_policy, 'CertificatePolicy') @@ -3364,8 +3147,6 @@ async def update_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateUpdateParameters') @@ -3429,8 +3210,6 @@ async def get_certificate(self, vault_base_url, certificate_name, certificate_ve header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3493,8 +3272,6 @@ async def update_certificate_operation(self, vault_base_url, certificate_name, c 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3554,8 +3331,6 @@ async def get_certificate_operation(self, vault_base_url, certificate_name, *, c header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3613,8 +3388,6 @@ async def delete_certificate_operation(self, vault_base_url, certificate_name, * header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3686,8 +3459,6 @@ async def merge_certificate(self, vault_base_url, certificate_name, x509_certifi 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 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(parameters, 'CertificateMergeParameters') @@ -3748,8 +3519,6 @@ async def backup_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3809,8 +3578,6 @@ async def restore_certificate(self, vault_base_url, certificate_bundle_backup, * 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 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(parameters, 'CertificateRestoreParameters') @@ -3856,11 +3623,12 @@ def get_deleted_certificates( :type include_pending: bool :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v7_0.models.DeletedCertificateItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3868,9 +3636,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -3879,51 +3644,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3964,8 +3715,6 @@ async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4023,8 +3772,6 @@ async def purge_deleted_certificate(self, vault_base_url, certificate_name, *, c header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4080,8 +3827,6 @@ async def recover_deleted_certificate(self, vault_base_url, certificate_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4115,11 +3860,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.StorageAccountItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -4127,60 +3873,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_storage_accounts.metadata = {'url': '/storage'} def get_deleted_storage_accounts( @@ -4199,11 +3928,12 @@ def get_deleted_storage_accounts( :type maxresults: int :return: An iterator like instance of DeletedStorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.DeletedStorageAccountItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_storage_accounts.metadata['url'] @@ -4211,60 +3941,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('DeletedStorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedStorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_storage_accounts.metadata = {'url': '/deletedstorage'} async def get_deleted_storage_account(self, vault_base_url, storage_account_name, *, cls=None, **kwargs): @@ -4304,8 +4017,6 @@ async def get_deleted_storage_account(self, vault_base_url, storage_account_name header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4363,8 +4074,6 @@ async def purge_deleted_storage_account(self, vault_base_url, storage_account_na header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4417,8 +4126,6 @@ async def recover_deleted_storage_account(self, vault_base_url, storage_account_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4475,8 +4182,6 @@ async def backup_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4536,8 +4241,6 @@ async def restore_storage_account(self, vault_base_url, storage_bundle_backup, * 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 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(parameters, 'StorageRestoreParameters') @@ -4595,8 +4298,6 @@ async def delete_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4651,8 +4352,6 @@ async def get_storage_account(self, vault_base_url, storage_account_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4727,8 +4426,6 @@ async def set_storage_account(self, vault_base_url, storage_account_name, resour 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 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(parameters, 'StorageAccountCreateParameters') @@ -4804,8 +4501,6 @@ async def update_storage_account(self, vault_base_url, storage_account_name, act 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4868,8 +4563,6 @@ async def regenerate_storage_account_key(self, vault_base_url, storage_account_n 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4908,11 +4601,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.SasDefinitionItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4921,60 +4615,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def get_deleted_sas_definitions( @@ -4996,11 +4673,12 @@ def get_deleted_sas_definitions( :type maxresults: int :return: An iterator like instance of DeletedSasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSasDefinitionItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_sas_definitions.metadata['url'] @@ -5009,60 +4687,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_sas_definitions.metadata = {'url': '/deletedstorage/{storage-account-name}/sas'} async def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, *, cls=None, **kwargs): @@ -5105,8 +4766,6 @@ async def get_deleted_sas_definition(self, vault_base_url, storage_account_name, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5167,8 +4826,6 @@ async def recover_deleted_sas_definition(self, vault_base_url, storage_account_n header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -5226,8 +4883,6 @@ async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -5285,8 +4940,6 @@ async def get_sas_definition(self, vault_base_url, storage_account_name, sas_def header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5364,8 +5017,6 @@ async def set_sas_definition(self, vault_base_url, storage_account_name, sas_def 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 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(parameters, 'SasDefinitionCreateParameters') @@ -5446,8 +5097,6 @@ async def update_sas_definition(self, vault_base_url, storage_account_name, sas_ 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 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(parameters, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/__init__.py index 4debdd0f3d13..5e72f49a73f6 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/__init__.py @@ -22,9 +22,11 @@ from ._models_py3 import CertificateCreateParameters from ._models_py3 import CertificateImportParameters from ._models_py3 import CertificateIssuerItem + from ._models_py3 import CertificateIssuerListResult from ._models_py3 import CertificateIssuerSetParameters from ._models_py3 import CertificateIssuerUpdateParameters from ._models_py3 import CertificateItem + from ._models_py3 import CertificateListResult from ._models_py3 import CertificateMergeParameters from ._models_py3 import CertificateOperation from ._models_py3 import CertificateOperationUpdateParameter @@ -35,14 +37,19 @@ from ._models_py3 import Contacts from ._models_py3 import DeletedCertificateBundle from ._models_py3 import DeletedCertificateItem + from ._models_py3 import DeletedCertificateListResult from ._models_py3 import DeletedKeyBundle from ._models_py3 import DeletedKeyItem + from ._models_py3 import DeletedKeyListResult from ._models_py3 import DeletedSasDefinitionBundle from ._models_py3 import DeletedSasDefinitionItem + from ._models_py3 import DeletedSasDefinitionListResult from ._models_py3 import DeletedSecretBundle from ._models_py3 import DeletedSecretItem + from ._models_py3 import DeletedSecretListResult from ._models_py3 import DeletedStorageAccountItem from ._models_py3 import DeletedStorageBundle + from ._models_py3 import DeletedStorageListResult from ._models_py3 import Error from ._models_py3 import IssuerAttributes from ._models_py3 import IssuerBundle @@ -54,6 +61,7 @@ from ._models_py3 import KeyCreateParameters from ._models_py3 import KeyImportParameters from ._models_py3 import KeyItem + from ._models_py3 import KeyListResult from ._models_py3 import KeyOperationResult from ._models_py3 import KeyOperationsParameters from ._models_py3 import KeyProperties @@ -70,10 +78,12 @@ from ._models_py3 import SasDefinitionBundle from ._models_py3 import SasDefinitionCreateParameters from ._models_py3 import SasDefinitionItem + from ._models_py3 import SasDefinitionListResult from ._models_py3 import SasDefinitionUpdateParameters from ._models_py3 import SecretAttributes from ._models_py3 import SecretBundle from ._models_py3 import SecretItem + from ._models_py3 import SecretListResult from ._models_py3 import SecretProperties from ._models_py3 import SecretRestoreParameters from ._models_py3 import SecretSetParameters @@ -84,6 +94,7 @@ from ._models_py3 import StorageAccountRegenerteKeyParameters from ._models_py3 import StorageAccountUpdateParameters from ._models_py3 import StorageBundle + from ._models_py3 import StorageListResult from ._models_py3 import StorageRestoreParameters from ._models_py3 import SubjectAlternativeNames from ._models_py3 import Trigger @@ -101,9 +112,11 @@ from ._models import CertificateCreateParameters from ._models import CertificateImportParameters from ._models import CertificateIssuerItem + from ._models import CertificateIssuerListResult from ._models import CertificateIssuerSetParameters from ._models import CertificateIssuerUpdateParameters from ._models import CertificateItem + from ._models import CertificateListResult from ._models import CertificateMergeParameters from ._models import CertificateOperation from ._models import CertificateOperationUpdateParameter @@ -114,14 +127,19 @@ from ._models import Contacts from ._models import DeletedCertificateBundle from ._models import DeletedCertificateItem + from ._models import DeletedCertificateListResult from ._models import DeletedKeyBundle from ._models import DeletedKeyItem + from ._models import DeletedKeyListResult from ._models import DeletedSasDefinitionBundle from ._models import DeletedSasDefinitionItem + from ._models import DeletedSasDefinitionListResult from ._models import DeletedSecretBundle from ._models import DeletedSecretItem + from ._models import DeletedSecretListResult from ._models import DeletedStorageAccountItem from ._models import DeletedStorageBundle + from ._models import DeletedStorageListResult from ._models import Error from ._models import IssuerAttributes from ._models import IssuerBundle @@ -133,6 +151,7 @@ from ._models import KeyCreateParameters from ._models import KeyImportParameters from ._models import KeyItem + from ._models import KeyListResult from ._models import KeyOperationResult from ._models import KeyOperationsParameters from ._models import KeyProperties @@ -149,10 +168,12 @@ from ._models import SasDefinitionBundle from ._models import SasDefinitionCreateParameters from ._models import SasDefinitionItem + from ._models import SasDefinitionListResult from ._models import SasDefinitionUpdateParameters from ._models import SecretAttributes from ._models import SecretBundle from ._models import SecretItem + from ._models import SecretListResult from ._models import SecretProperties from ._models import SecretRestoreParameters from ._models import SecretSetParameters @@ -163,21 +184,11 @@ from ._models import StorageAccountRegenerteKeyParameters from ._models import StorageAccountUpdateParameters from ._models import StorageBundle + from ._models import StorageListResult from ._models import StorageRestoreParameters from ._models import SubjectAlternativeNames from ._models import Trigger from ._models import X509CertificateProperties -from ._paged_models import CertificateIssuerItemPaged -from ._paged_models import CertificateItemPaged -from ._paged_models import DeletedCertificateItemPaged -from ._paged_models import DeletedKeyItemPaged -from ._paged_models import DeletedSasDefinitionItemPaged -from ._paged_models import DeletedSecretItemPaged -from ._paged_models import DeletedStorageAccountItemPaged -from ._paged_models import KeyItemPaged -from ._paged_models import SasDefinitionItemPaged -from ._paged_models import SecretItemPaged -from ._paged_models import StorageAccountItemPaged from ._key_vault_client_enums import ( JsonWebKeyType, JsonWebKeyCurveName, @@ -203,9 +214,11 @@ 'CertificateCreateParameters', 'CertificateImportParameters', 'CertificateIssuerItem', + 'CertificateIssuerListResult', 'CertificateIssuerSetParameters', 'CertificateIssuerUpdateParameters', 'CertificateItem', + 'CertificateListResult', 'CertificateMergeParameters', 'CertificateOperation', 'CertificateOperationUpdateParameter', @@ -216,14 +229,19 @@ 'Contacts', 'DeletedCertificateBundle', 'DeletedCertificateItem', + 'DeletedCertificateListResult', 'DeletedKeyBundle', 'DeletedKeyItem', + 'DeletedKeyListResult', 'DeletedSasDefinitionBundle', 'DeletedSasDefinitionItem', + 'DeletedSasDefinitionListResult', 'DeletedSecretBundle', 'DeletedSecretItem', + 'DeletedSecretListResult', 'DeletedStorageAccountItem', 'DeletedStorageBundle', + 'DeletedStorageListResult', 'Error', 'IssuerAttributes', 'IssuerBundle', @@ -235,6 +253,7 @@ 'KeyCreateParameters', 'KeyImportParameters', 'KeyItem', + 'KeyListResult', 'KeyOperationResult', 'KeyOperationsParameters', 'KeyProperties', @@ -251,10 +270,12 @@ 'SasDefinitionBundle', 'SasDefinitionCreateParameters', 'SasDefinitionItem', + 'SasDefinitionListResult', 'SasDefinitionUpdateParameters', 'SecretAttributes', 'SecretBundle', 'SecretItem', + 'SecretListResult', 'SecretProperties', 'SecretRestoreParameters', 'SecretSetParameters', @@ -265,21 +286,11 @@ 'StorageAccountRegenerteKeyParameters', 'StorageAccountUpdateParameters', 'StorageBundle', + 'StorageListResult', 'StorageRestoreParameters', 'SubjectAlternativeNames', 'Trigger', 'X509CertificateProperties', - 'KeyItemPaged', - 'DeletedKeyItemPaged', - 'SecretItemPaged', - 'DeletedSecretItemPaged', - 'CertificateItemPaged', - 'CertificateIssuerItemPaged', - 'DeletedCertificateItemPaged', - 'StorageAccountItemPaged', - 'DeletedStorageAccountItemPaged', - 'SasDefinitionItemPaged', - 'DeletedSasDefinitionItemPaged', 'JsonWebKeyType', 'JsonWebKeyCurveName', 'DeletionRecoveryLevel', diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py index e02ddd417cdb..24dfe4beb6a9 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py @@ -385,6 +385,36 @@ def __init__(self, **kwargs): self.provider = kwargs.get('provider', None) +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -479,6 +509,35 @@ def __init__(self, **kwargs): self.x509_thumbprint = kwargs.get('x509_thumbprint', None) +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -867,6 +926,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: list[~azure.keyvault.v7_0.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -1037,6 +1125,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v7_0.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionBundle(Model): """A SAS definition bundle consists of key vault SAS definition details plus its attributes. @@ -1251,6 +1368,36 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSasDefinitionListResult(Model): + """The deleted SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted SAS + definitions in the vault along with a link to the next page of deleted sas + definitions + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + :ivar next_link: The URL to get the next set of deleted SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1452,6 +1599,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageAccountItem(Model): """The storage account item containing storage account metadata. @@ -1662,6 +1838,37 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedStorageListResult(Model): + """The deleted storage account list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted storage + accounts in the vault along with a link to the next page of deleted + storage accounts + :vartype value: + list[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + :ivar next_link: The URL to get the next set of deleted storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedStorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedStorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -2023,6 +2230,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v7_0.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2451,6 +2687,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v7_0.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2534,6 +2799,35 @@ def __init__(self, **kwargs): self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v7_0.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2779,6 +3073,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: list[~azure.keyvault.v7_0.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageRestoreParameters(Model): """The secret restore parameters. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py index 1f394c8f5f38..52f4aa981815 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py @@ -385,6 +385,36 @@ def __init__(self, *, id: str=None, provider: str=None, **kwargs) -> None: self.provider = provider +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -479,6 +509,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.x509_thumbprint = x509_thumbprint +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -867,6 +926,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: list[~azure.keyvault.v7_0.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -1037,6 +1125,35 @@ def __init__(self, *, kid: str=None, attributes=None, tags=None, recovery_id: st self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v7_0.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionBundle(Model): """A SAS definition bundle consists of key vault SAS definition details plus its attributes. @@ -1251,6 +1368,36 @@ def __init__(self, *, recovery_id: str=None, **kwargs) -> None: self.deleted_date = None +class DeletedSasDefinitionListResult(Model): + """The deleted SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted SAS + definitions in the vault along with a link to the next page of deleted sas + definitions + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + :ivar next_link: The URL to get the next set of deleted SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1452,6 +1599,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, content_type: st self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageAccountItem(Model): """The storage account item containing storage account metadata. @@ -1662,6 +1838,37 @@ def __init__(self, *, recovery_id: str=None, **kwargs) -> None: self.deleted_date = None +class DeletedStorageListResult(Model): + """The deleted storage account list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted storage + accounts in the vault along with a link to the next page of deleted + storage accounts + :vartype value: + list[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + :ivar next_link: The URL to get the next set of deleted storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedStorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedStorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -2023,6 +2230,35 @@ def __init__(self, *, key, hsm: bool=None, key_attributes=None, tags=None, **kwa self.tags = tags +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v7_0.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2451,6 +2687,35 @@ def __init__(self, *, template_uri: str, sas_type, validity_period: str, sas_def self.tags = tags +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v7_0.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2534,6 +2799,35 @@ def __init__(self, *, enabled: bool=None, not_before=None, expires=None, **kwarg self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v7_0.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2779,6 +3073,35 @@ def __init__(self, *, active_key_name: str=None, auto_regenerate_key: bool=None, self.tags = tags +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: list[~azure.keyvault.v7_0.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageRestoreParameters(Model): """The secret restore parameters. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_paged_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_paged_models.py deleted file mode 100644 index 0fbf874da2a7..000000000000 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_paged_models.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from azure.core.paging import Paged - - -class KeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`KeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[KeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(KeyItemPaged, self).__init__(*args, **kwargs) -class DeletedKeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedKeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedKeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedKeyItemPaged, self).__init__(*args, **kwargs) -class SecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SecretItemPaged, self).__init__(*args, **kwargs) -class DeletedSecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSecretItemPaged, self).__init__(*args, **kwargs) -class CertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateItemPaged, self).__init__(*args, **kwargs) -class CertificateIssuerItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateIssuerItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateIssuerItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateIssuerItemPaged, self).__init__(*args, **kwargs) -class DeletedCertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedCertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedCertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedCertificateItemPaged, self).__init__(*args, **kwargs) -class StorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`StorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(StorageAccountItemPaged, self).__init__(*args, **kwargs) -class DeletedStorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedStorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedStorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedStorageAccountItemPaged, self).__init__(*args, **kwargs) -class SasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SasDefinitionItemPaged, self).__init__(*args, **kwargs) -class DeletedSasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSasDefinitionItemPaged, self).__init__(*args, **kwargs) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index c0e15566f02e..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.paging import ItemPaged from .. import models import uuid @@ -77,8 +78,6 @@ def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops=None, 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 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(parameters, 'KeyCreateParameters') @@ -153,8 +152,6 @@ def import_key(self, vault_base_url, key_name, key, hsm=None, key_attributes=Non 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 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(parameters, 'KeyImportParameters') @@ -217,8 +214,6 @@ def delete_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -293,8 +288,6 @@ def update_key(self, vault_base_url, key_name, key_version, key_ops=None, key_at 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 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(parameters, 'KeyUpdateParameters') @@ -359,8 +352,6 @@ def get_key(self, vault_base_url, key_name, key_version, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -398,11 +389,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -411,46 +403,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -472,11 +461,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -484,46 +474,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_keys.metadata = {'url': '/keys'} def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -575,8 +562,6 @@ def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -648,8 +633,6 @@ def restore_key(self, vault_base_url, key_bundle_backup, cls=None, **kwargs): 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 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(parameters, 'KeyRestoreParameters') @@ -730,8 +713,6 @@ def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -809,8 +790,6 @@ def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -886,8 +865,6 @@ def sign(self, vault_base_url, key_name, key_version, algorithm, value, cls=None 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 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(parameters, 'KeySignParameters') @@ -969,8 +946,6 @@ def verify(self, vault_base_url, key_name, key_version, algorithm, digest, signa 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 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(parameters, 'KeyVerifyParameters') @@ -1048,8 +1023,6 @@ def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cls= 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 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(parameters, 'KeyOperationsParameters') @@ -1125,8 +1098,6 @@ def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cl 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 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(parameters, 'KeyOperationsParameters') @@ -1170,11 +1141,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v7_0.models.DeletedKeyItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1182,46 +1154,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -1262,8 +1231,6 @@ def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1321,8 +1288,6 @@ def purge_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1378,8 +1343,6 @@ def recover_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1449,8 +1412,6 @@ def set_secret(self, vault_base_url, secret_name, value, tags=None, content_type 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 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(parameters, 'SecretSetParameters') @@ -1511,8 +1472,6 @@ def delete_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1585,8 +1544,6 @@ def update_secret(self, vault_base_url, secret_name, secret_version, content_typ 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 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(parameters, 'SecretUpdateParameters') @@ -1649,8 +1606,6 @@ def get_secret(self, vault_base_url, secret_name, secret_version, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1688,11 +1643,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1700,46 +1656,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1760,11 +1713,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1773,46 +1727,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1831,11 +1782,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSecretItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1843,46 +1795,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): @@ -1922,8 +1871,6 @@ def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1981,8 +1928,6 @@ def purge_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2035,8 +1980,6 @@ def recover_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2094,8 +2037,6 @@ def backup_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2155,8 +2096,6 @@ def restore_secret(self, vault_base_url, secret_bundle_backup, cls=None, **kwarg 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 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(parameters, 'SecretRestoreParameters') @@ -2199,11 +2138,12 @@ def get_certificates( :type include_pending: bool :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2211,9 +2151,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -2222,37 +2159,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificates.metadata = {'url': '/certificates'} def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -2293,8 +2230,6 @@ def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2353,8 +2288,6 @@ def set_certificate_contacts(self, vault_base_url, contact_list=None, cls=None, 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 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(contacts, 'Contacts') @@ -2412,8 +2345,6 @@ def get_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2467,8 +2398,6 @@ def delete_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2505,11 +2434,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v7_0.models.CertificateIssuerItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2517,46 +2447,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, cls=None, **kwargs): @@ -2609,8 +2536,6 @@ def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credenti 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2684,8 +2609,6 @@ def update_certificate_issuer(self, vault_base_url, issuer_name, provider=None, 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2746,8 +2669,6 @@ def get_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2805,8 +2726,6 @@ def delete_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2876,8 +2795,6 @@ def create_certificate(self, vault_base_url, certificate_name, certificate_polic 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 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(parameters, 'CertificateCreateParameters') @@ -2960,8 +2877,6 @@ def import_certificate(self, vault_base_url, certificate_name, base64_encoded_ce 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 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(parameters, 'CertificateImportParameters') @@ -3003,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3016,46 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3096,8 +3009,6 @@ def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3159,8 +3070,6 @@ def update_certificate_policy(self, vault_base_url, certificate_name, certificat 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 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(certificate_policy, 'CertificatePolicy') @@ -3238,8 +3147,6 @@ def update_certificate(self, vault_base_url, certificate_name, certificate_versi 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 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(parameters, 'CertificateUpdateParameters') @@ -3303,8 +3210,6 @@ def get_certificate(self, vault_base_url, certificate_name, certificate_version, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3367,8 +3272,6 @@ def update_certificate_operation(self, vault_base_url, certificate_name, cancell 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3428,8 +3331,6 @@ def get_certificate_operation(self, vault_base_url, certificate_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3487,8 +3388,6 @@ def delete_certificate_operation(self, vault_base_url, certificate_name, cls=Non header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3560,8 +3459,6 @@ def merge_certificate(self, vault_base_url, certificate_name, x509_certificates, 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 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(parameters, 'CertificateMergeParameters') @@ -3622,8 +3519,6 @@ def backup_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3683,8 +3578,6 @@ def restore_certificate(self, vault_base_url, certificate_bundle_backup, cls=Non 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 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(parameters, 'CertificateRestoreParameters') @@ -3730,11 +3623,12 @@ def get_deleted_certificates( :type include_pending: bool :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v7_0.models.DeletedCertificateItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3742,9 +3636,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -3753,37 +3644,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3824,8 +3715,6 @@ def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3883,8 +3772,6 @@ def purge_deleted_certificate(self, vault_base_url, certificate_name, cls=None, header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3940,8 +3827,6 @@ def recover_deleted_certificate(self, vault_base_url, certificate_name, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3975,11 +3860,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.StorageAccountItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3987,46 +3873,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_storage_accounts.metadata = {'url': '/storage'} def get_deleted_storage_accounts( @@ -4045,11 +3928,12 @@ def get_deleted_storage_accounts( :type maxresults: int :return: An iterator like instance of DeletedStorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.DeletedStorageAccountItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_storage_accounts.metadata['url'] @@ -4057,46 +3941,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedStorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedStorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_storage_accounts.metadata = {'url': '/deletedstorage'} def get_deleted_storage_account(self, vault_base_url, storage_account_name, cls=None, **kwargs): @@ -4136,8 +4017,6 @@ def get_deleted_storage_account(self, vault_base_url, storage_account_name, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4195,8 +4074,6 @@ def purge_deleted_storage_account(self, vault_base_url, storage_account_name, cl header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4249,8 +4126,6 @@ def recover_deleted_storage_account(self, vault_base_url, storage_account_name, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4307,8 +4182,6 @@ def backup_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4368,8 +4241,6 @@ def restore_storage_account(self, vault_base_url, storage_bundle_backup, cls=Non 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 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(parameters, 'StorageRestoreParameters') @@ -4427,8 +4298,6 @@ def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4483,8 +4352,6 @@ def get_storage_account(self, vault_base_url, storage_account_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4559,8 +4426,6 @@ def set_storage_account(self, vault_base_url, storage_account_name, resource_id, 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 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(parameters, 'StorageAccountCreateParameters') @@ -4636,8 +4501,6 @@ def update_storage_account(self, vault_base_url, storage_account_name, active_ke 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4700,8 +4563,6 @@ def regenerate_storage_account_key(self, vault_base_url, storage_account_name, k 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4740,11 +4601,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.SasDefinitionItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4753,46 +4615,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def get_deleted_sas_definitions( @@ -4814,11 +4673,12 @@ def get_deleted_sas_definitions( :type maxresults: int :return: An iterator like instance of DeletedSasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSasDefinitionItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_sas_definitions.metadata['url'] @@ -4827,46 +4687,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_sas_definitions.metadata = {'url': '/deletedstorage/{storage-account-name}/sas'} def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, cls=None, **kwargs): @@ -4909,8 +4766,6 @@ def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_d header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4971,8 +4826,6 @@ def recover_deleted_sas_definition(self, vault_base_url, storage_account_name, s header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -5030,8 +4883,6 @@ def delete_sas_definition(self, vault_base_url, storage_account_name, sas_defini header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -5089,8 +4940,6 @@ def get_sas_definition(self, vault_base_url, storage_account_name, sas_definitio header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5168,8 +5017,6 @@ def set_sas_definition(self, vault_base_url, storage_account_name, sas_definitio 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 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(parameters, 'SasDefinitionCreateParameters') @@ -5250,8 +5097,6 @@ def update_sas_definition(self, vault_base_url, storage_account_name, sas_defini 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 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(parameters, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index c40e314accc7..dd2c6f0a9b95 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -2,8 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from typing import Any, Callable, Mapping, TYPE_CHECKING -from azure.core.async_paging import AsyncPagedMixin +from typing import Any, Callable, Mapping, AsyncIterator, TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy @@ -23,10 +22,10 @@ class AsyncPagingAdapter: - """For each item in an AsyncPagedMixin, returns the result of applying fn to that item. + """For each item in an AsyncIterator, returns the result of applying fn to that item. Python 3.6 added syntax that could replace this (yield within async for).""" - def __init__(self, pages: AsyncPagedMixin, fn: Callable[[Model], Any]) -> None: + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: self._pages = pages self._fn = fn diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/secrets_vault_client_async.py b/sdk/keyvault/azure-keyvault-secrets/tests/secrets_vault_client_async.py index 73578320e809..a374f9a3782c 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/secrets_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/tests/secrets_vault_client_async.py @@ -3,7 +3,6 @@ # Licensed under the MIT License. # ------------------------------------ from typing import Any, Callable, Mapping, TYPE_CHECKING -from azure.core.async_paging import AsyncPagedMixin from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies import AsyncBearerTokenCredentialPolicy diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py index c2b7cce9f255..6484882d65bb 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py @@ -14,6 +14,8 @@ except ImportError: from urlparse import urlparse # type: ignore +from azure.core.paging import ItemPaged + from ._shared.shared_access_signature import SharedAccessSignature from ._shared.models import LocationMode, Services from ._shared.utils import ( @@ -380,12 +382,11 @@ def set_service_properties( def list_containers( self, name_starts_with=None, # type: Optional[str] include_metadata=False, # type: Optional[bool] - marker=None, # type: Optional[str] results_per_page=None, # type: Optional[int] timeout=None, # type: Optional[int] **kwargs ): - # type: (...) -> ContainerPropertiesPaged + # type: (...) -> ItemPaged[ContainerProperties] """Returns a generator to list the containers under the specified account. The generator will lazily follow the continuation tokens returned by @@ -397,17 +398,13 @@ def list_containers( :param bool include_metadata: Specifies that container metadata be returned in the response. The default value is `False`. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int results_per_page: The maximum number of container names to retrieve per API call. If the request does not specify the server will return up to 5,000 items. :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) of ContainerProperties. - :rtype: ~azure.core.blob.models.ContainerPropertiesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.core.blob.models.ContainerProperties] Example: .. literalinclude:: ../tests/test_blob_samples_service.py @@ -424,8 +421,8 @@ def list_containers( include=include, timeout=timeout, **kwargs) - return ContainerPropertiesPaged( - command, prefix=name_starts_with, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, prefix=name_starts_with, results_per_page=results_per_page, page_iterator_class=ContainerPropertiesPaged) def create_container( self, name, # type: str diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py index 28da09873c1e..2f43f56806e3 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py @@ -16,6 +16,8 @@ from urlparse import urlparse # type: ignore from urllib2 import quote, unquote # type: ignore +from azure.core.paging import ItemPaged + import six from ._shared.shared_access_signature import BlobSharedAccessSignature @@ -658,8 +660,8 @@ def set_container_access_policy( except StorageErrorException as error: process_storage_error(error) - def list_blobs(self, name_starts_with=None, include=None, marker=None, timeout=None, **kwargs): - # type: (Optional[str], Optional[Any], Optional[str], Optional[int], **Any) -> Iterable[BlobProperties] + def list_blobs(self, name_starts_with=None, include=None, timeout=None, **kwargs): + # type: (Optional[str], Optional[Any], Optional[int], **Any) -> ItemPaged[BlobProperties] """Returns a generator to list the blobs under the specified container. The generator will lazily follow the continuation tokens returned by the service. @@ -670,14 +672,10 @@ def list_blobs(self, name_starts_with=None, include=None, marker=None, timeout=N :param list[str] include: Specifies one or more additional datasets to include in the response. Options include: 'snapshots', 'metadata', 'uncommittedblobs', 'copy', 'deleted'. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) response of BlobProperties. - :rtype: ~azure.storage.blob.models.BlobPropertiesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.models.BlobProperties] Example: .. literalinclude:: ../tests/test_blob_samples_containers.py @@ -696,17 +694,19 @@ def list_blobs(self, name_starts_with=None, include=None, marker=None, timeout=N include=include, timeout=timeout, **kwargs) - return BlobPropertiesPaged(command, prefix=name_starts_with, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, prefix=name_starts_with, results_per_page=results_per_page, + page_iterator_class=BlobPropertiesPaged) + def walk_blobs( self, name_starts_with=None, # type: Optional[str] include=None, # type: Optional[Any] delimiter="/", # type: str - marker=None, # type: Optional[str] timeout=None, # type: Optional[int] **kwargs # type: Optional[Any] ): - # type: (...) -> Iterable[BlobProperties] + # type: (...) -> ItemPaged[BlobProperties] """Returns a generator to list the blobs under the specified container. The generator will lazily follow the continuation tokens returned by the service. This operation will list blobs in accordance with a hierarchy, @@ -723,20 +723,15 @@ def walk_blobs( element in the response body that acts as a placeholder for all blobs whose names begin with the same substring up to the appearance of the delimiter character. The delimiter may be a single character or a string. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) response of BlobProperties. - :rtype: ~azure.storage.blob.models.BlobPrefix + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.models.BlobProperties] """ if include and not isinstance(include, list): include = [include] results_per_page = kwargs.pop('results_per_page', None) - marker = kwargs.pop('marker', "") command = functools.partial( self._client.container.list_blob_hierarchy_segment, delimiter=delimiter, @@ -747,7 +742,6 @@ def walk_blobs( command, prefix=name_starts_with, results_per_page=results_per_page, - marker=marker, delimiter=delimiter) def upload_blob( diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/models.py b/sdk/storage/azure-storage-blob/azure/storage/blob/models.py index ab75e1d7722d..c5c90d21f15e 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/models.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/models.py @@ -9,7 +9,7 @@ from enum import Enum from typing import List, Any, TYPE_CHECKING # pylint: disable=unused-import -from azure.core.paging import Paged +from azure.core.paging import PageIterator, ItemPaged from ._shared.utils import ( decode_base64, @@ -287,14 +287,14 @@ def _from_generated(cls, generated): return props -class ContainerPropertiesPaged(Paged): +class ContainerPropertiesPaged(PageIterator): """An Iterable of Container properties. :ivar str service_endpoint: The service URL. :ivar str prefix: A container name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. - :ivar str next_marker: The continuation token to retrieve the next page of results. + :ivar str continuation_token: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available options include "primary" and "secondary". :ivar current_page: The current page of listed results. @@ -305,53 +305,45 @@ class ContainerPropertiesPaged(Paged): begin with the specified prefix. :param int results_per_page: The maximum number of container names to retrieve per call. - :param str marker: An opaque continuation token. - """ - def __init__(self, command, prefix=None, results_per_page=None, marker=None): - super(ContainerPropertiesPaged, self).__init__(command, None) + :param str continuation_token: An opaque continuation token. + """ + def __init__(self, command, prefix=None, results_per_page=None, continuation_token=None): + super(ContainerPropertiesPaged, self).__init__( + get_next=self._get_next_cb, + extract_data=self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command self.service_endpoint = None self.prefix = prefix - self.current_marker = None + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.location_mode = None + self.current_page = [] - def _advance_page(self): - """Force moving the cursor to the next azure call. - - This method is for advanced usage, iterator protocol is prefered. - - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( - marker=self.next_marker or None, + return self._command( + marker=continuation_token or None, maxresults=self.results_per_page, cls=return_context_and_deserialized, use_location=self.location_mode) except StorageErrorException as error: process_storage_error(error) + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.service_endpoint = self._response.service_endpoint self.prefix = self._response.prefix - self.current_marker = self._response.marker + self.marker = self._response.marker self.results_per_page = self._response.max_results - self.current_page = self._response.container_items - self.next_marker = self._response.next_marker or None - return self.current_page + self.current_page = [self._build_item(item) for item in self._response.container_items] - def __next__(self): # type: ignore - item = super(ContainerPropertiesPaged, self).__next__() - if isinstance(item, ContainerProperties): - return item - return ContainerProperties._from_generated(item) # pylint: disable=protected-access + return self._response.next_marker or None, self.current_page - next = __next__ + @staticmethod + def _build_item(item): + return ContainerProperties._from_generated(item) # pylint: disable=protected-access class BlobProperties(DictMixin): @@ -469,14 +461,14 @@ def _from_generated(cls, generated): return blob -class BlobPropertiesPaged(Paged): +class BlobPropertiesPaged(PageIterator): """An Iterable of Blob properties. :ivar str service_endpoint: The service URL. :ivar str prefix: A blob name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. - :ivar str next_marker: The continuation token to retrieve the next page of results. + :ivar str continuation_token: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available options include "primary" and "secondary". :ivar current_page: The current page of listed results. @@ -489,7 +481,7 @@ class BlobPropertiesPaged(Paged): begin with the specified prefix. :param int results_per_page: The maximum number of blobs to retrieve per call. - :param str marker: An opaque continuation token. + :param str continuation_token: An opaque continuation token. :param str delimiter: Used to capture blobs whose names begin with the same substring up to the appearance of the delimiter character. The delimiter may be a single @@ -503,55 +495,48 @@ def __init__( container=None, prefix=None, results_per_page=None, - marker=None, + continuation_token=None, delimiter=None, location_mode=None): - super(BlobPropertiesPaged, self).__init__(command, None) + super(BlobPropertiesPaged, self).__init__( + get_next=self._get_next_cb, + extract_data=self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command self.service_endpoint = None self.prefix = prefix - self.current_marker = None + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.container = container self.delimiter = delimiter self.current_page = None self.location_mode = location_mode - def _advance_page(self): - """Force moving the cursor to the next azure call. - - This method is for advanced usage, iterator protocol is prefered. - - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 - + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( + return self._command( prefix=self.prefix, - marker=self.next_marker or None, + marker=continuation_token or None, maxresults=self.results_per_page, cls=return_context_and_deserialized, use_location=self.location_mode) except StorageErrorException as error: process_storage_error(error) + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.service_endpoint = self._response.service_endpoint self.prefix = self._response.prefix - self.current_marker = self._response.marker + self.marker = self._response.marker self.results_per_page = self._response.max_results - self.current_page = self._response.segment.blob_items - self.next_marker = self._response.next_marker or None self.container = self._response.container_name + self.current_page = [self._build_item(item) for item in self._response.segment.blob_items] self.delimiter = self._response.delimiter - return self.current_page - def __next__(self): - item = super(BlobPropertiesPaged, self).__next__() + return self._response.next_marker or None, self.current_page + + def _build_item(self, item): if isinstance(item, BlobProperties): return item if isinstance(item, BlobItem): @@ -560,10 +545,8 @@ def __next__(self): return blob return item - next = __next__ - -class BlobPrefix(BlobPropertiesPaged, DictMixin): +class BlobPrefix(ItemPaged, DictMixin): """An Iterable of Blob properties. Returned from walk_blobs when a delimiter is used. @@ -572,7 +555,7 @@ class BlobPrefix(BlobPropertiesPaged, DictMixin): :ivar str name: The prefix, or "directory name" of the blob. :ivar str service_endpoint: The service URL. :ivar str prefix: A blob name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. :ivar str next_marker: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available @@ -597,51 +580,37 @@ class BlobPrefix(BlobPropertiesPaged, DictMixin): Options include 'primary' or 'secondary'. """ def __init__(self, *args, **kwargs): - super(BlobPrefix, self).__init__(*args, **kwargs) + super(BlobPrefix, self).__init__(*args, page_iterator_class=BlobPrefixPaged, **kwargs) + self.name = kwargs.get('prefix') + self.prefix = kwargs.get('prefix') + self.results_per_page = kwargs.get('results_per_page') + self.container = kwargs.get('container') + self.delimiter = kwargs.get('delimiter') + self.location_mode = kwargs.get('location_mode') + +class BlobPrefixPaged(BlobPropertiesPaged): + def __init__(self, *args, **kwargs): + super(BlobPrefixPaged, self).__init__(*args, **kwargs) self.name = self.prefix - def _advance_page(self): - """Force moving the cursor to the next azure call. - - This method is for advanced usage, iterator protocol is prefered. - - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 - self.location_mode, self._response = self._get_next( - prefix=self.prefix, - marker=self.next_marker or None, - maxresults=self.results_per_page, - cls=return_context_and_deserialized, - use_location=self.location_mode) - self.service_endpoint = self._response.service_endpoint - self.prefix = self._response.prefix - self.current_marker = self._response.marker - self.results_per_page = self._response.max_results - self.current_page = self._response.segment.blob_prefixes - self.current_page.extend(self._response.segment.blob_items) - self.next_marker = self._response.next_marker or None - self.container = self._response.container_name - self.delimiter = self._response.delimiter + def _extract_data_cb(self, get_next_return): + continuation_token, _ = super(BlobPrefixPaged, self)._extract_data_cb(get_next_return) + self.current_page = self._response.segment.blob_prefixes + self._response.segment.blob_items + self.current_page = [self._build_item(item) for item in self.current_page] - def __next__(self): - item = super(BlobPrefix, self).__next__() + return continuation_token, self.current_page + + def _build_item(self, item): + item = super(BlobPrefixPaged, self)._build_item(item) if isinstance(item, GenBlobPrefix): return BlobPrefix( - self._get_next, + self._command, container=self.container, prefix=item.name, results_per_page=self.results_per_page, location_mode=self.location_mode) return item - next = __next__ - - class LeaseProperties(DictMixin): """Blob Lease Properties. diff --git a/sdk/storage/azure-storage-blob/tests/test_container.py b/sdk/storage/azure-storage-blob/tests/test_container.py index 889e270dd662..a22b8e50f62a 100644 --- a/sdk/storage/azure-storage-blob/tests/test_container.py +++ b/sdk/storage/azure-storage-blob/tests/test_container.py @@ -120,7 +120,7 @@ def test_create_container_with_public_access_blob(self): blob = container.get_blob_client("blob1") blob.upload_blob(u'xyz') - + anonymous_service = BlobClient( self._get_account_url(), container=container_name, @@ -247,15 +247,12 @@ def test_list_containers_with_num_results_and_marker(self): container_names.sort() # Act - generator1 = self.bsc.list_containers(name_starts_with=prefix, results_per_page=2) - next(generator1) + generator1 = self.bsc.list_containers(name_starts_with=prefix, results_per_page=2).by_page() + containers1 = list(next(generator1)) generator2 = self.bsc.list_containers( - name_starts_with=prefix, marker=generator1.next_marker, results_per_page=2) - next(generator2) - - containers1 = list(generator1.current_page) - containers2 = list(generator2.current_page) + name_starts_with=prefix, results_per_page=2).by_page(generator1.continuation_token) + containers2 = list(next(generator2)) # Assert self.assertIsNotNone(containers1) @@ -817,14 +814,13 @@ def test_list_blobs_with_num_results(self): # Act - blobs = container.list_blobs(results_per_page=2) - next(blobs) + blobs = list(next(container.list_blobs(results_per_page=2).by_page())) # Assert self.assertIsNotNone(blobs) - self.assertEqual(len(blobs.current_page), 2) - self.assertNamedItemInContainer(blobs.current_page, 'blob_a1') - self.assertNamedItemInContainer(blobs.current_page, 'blob_a2') + self.assertEqual(len(blobs), 2) + self.assertNamedItemInContainer(blobs, 'blob_a1') + self.assertNamedItemInContainer(blobs, 'blob_a2') @record def test_list_blobs_with_include_snapshots(self): diff --git a/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py b/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py index 7e0bb4f4885c..50a1dacb7298 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py @@ -16,6 +16,7 @@ import six from azure.core.polling import LROPoller +from azure.core.paging import ItemPaged from .file_client import FileClient @@ -269,21 +270,17 @@ def delete_directory(self, timeout=None, **kwargs): except StorageErrorException as error: process_storage_error(error) - def list_directories_and_files(self, name_starts_with=None, marker=None, timeout=None, **kwargs): - # type: (Optional[str], Optional[str], Optional[int], **Any) -> DirectoryProperties + def list_directories_and_files(self, name_starts_with=None, timeout=None, **kwargs): + # type: (Optional[str], Optional[str], Optional[int], **Any) -> ItemPaged """Lists all the directories and files under the directory. :param str name_starts_with: Filters the results to return only entities whose names begin with the specified prefix. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int timeout: The timeout parameter is expressed in seconds. :returns: An auto-paging iterable of dict-like DirectoryProperties and FileProperties - :rtype: ~azure.storage.file.models.DirectoryPropertiesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.models.DirectoryProperties] Example: .. literalinclude:: ../tests/test_file_samples_directory.py @@ -299,23 +296,20 @@ def list_directories_and_files(self, name_starts_with=None, marker=None, timeout sharesnapshot=self.snapshot, timeout=timeout, **kwargs) - return DirectoryPropertiesPaged( - command, prefix=name_starts_with, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, prefix=name_starts_with, results_per_page=results_per_page, + page_iterator_class=DirectoryPropertiesPaged) - def list_handles(self, marker=None, recursive=False, timeout=None, **kwargs): + def list_handles(self, recursive=False, timeout=None, **kwargs): """Lists opened handles on a directory or a file under the directory. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param bool recursive: Boolean that specifies if operation should apply to the directory specified by the client, its files, its subdirectories and their files. Default value is False. :param int timeout: The timeout parameter is expressed in seconds. :returns: An auto-paging iterable of HandleItems - :rtype: ~azure.storage.file.models.HandlesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.models.Handles] """ results_per_page = kwargs.pop('results_per_page', None) command = functools.partial( @@ -324,8 +318,9 @@ def list_handles(self, marker=None, recursive=False, timeout=None, **kwargs): timeout=timeout, recursive=recursive, **kwargs) - return HandlesPaged( - command, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, results_per_page=results_per_page, + page_iterator_class=HandlesPaged) def close_handles( self, handle=None, # type: Union[str, HandleItem] diff --git a/sdk/storage/azure-storage-file/azure/storage/file/file_client.py b/sdk/storage/azure-storage-file/azure/storage/file/file_client.py index ec492fe25197..a67cc9736fad 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/file_client.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/file_client.py @@ -18,6 +18,7 @@ import six from azure.core.polling import LROPoller +from azure.core.paging import ItemPaged from .models import HandlesPaged from ._generated import AzureFileStorage @@ -781,16 +782,14 @@ def resize_file(self, size, timeout=None, **kwargs): # type: ignore except StorageErrorException as error: process_storage_error(error) - def list_handles(self, marker=None, timeout=None, **kwargs): + def list_handles(self, timeout=None, **kwargs): + # type: (int, Any) -> ItemPaged[Handle] """Lists handles for file. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int timeout: The timeout parameter is expressed in seconds. :returns: An auto-paging iterable of HandleItems + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.models.Handle] """ results_per_page = kwargs.pop('results_per_page', None) command = functools.partial( @@ -798,8 +797,9 @@ def list_handles(self, marker=None, timeout=None, **kwargs): sharesnapshot=self.snapshot, timeout=timeout, **kwargs) - return HandlesPaged( - command, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, results_per_page=results_per_page, + page_iterator_class=HandlesPaged) def close_handles( self, handle=None, # type: Union[str, HandleItem] diff --git a/sdk/storage/azure-storage-file/azure/storage/file/file_service_client.py b/sdk/storage/azure-storage-file/azure/storage/file/file_service_client.py index ffde63e24f69..160a73a7af6a 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/file_service_client.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/file_service_client.py @@ -6,7 +6,7 @@ import functools from typing import ( # pylint: disable=unused-import - Union, Optional, Any, Iterable, Dict, List, + Union, Optional, Any, Dict, List, TYPE_CHECKING ) try: @@ -14,6 +14,8 @@ except ImportError: from urlparse import urlparse # type: ignore +from azure.core.paging import ItemPaged + from .share_client import ShareClient from ._shared.shared_access_signature import SharedAccessSignature from ._shared.models import Services @@ -270,11 +272,10 @@ def list_shares( self, name_starts_with=None, # type: Optional[str] include_metadata=False, # type: Optional[bool] include_snapshots=False, # type: Optional[bool] - marker=None, timeout=None, # type: Optional[int] **kwargs ): - # type: (...) -> SharePropertiesPaged + # type: (...) -> ItemPaged[ShareProperties] """Returns auto-paging iterable of dict-like ShareProperties under the specified account. The generator will lazily follow the continuation tokens returned by the service and stop when all shares have been returned. @@ -286,14 +287,10 @@ def list_shares( Specifies that share metadata be returned in the response. :param bool include_snapshots: Specifies that share snapshot be returned in the response. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) of ShareProperties. - :rtype: ~azure.storage.file.models.SharePropertiesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.models.ShareProperties] Example: .. literalinclude:: ../tests/test_file_samples_service.py @@ -314,8 +311,9 @@ def list_shares( include=include, timeout=timeout, **kwargs) - return SharePropertiesPaged( - command, prefix=name_starts_with, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, prefix=name_starts_with, results_per_page=results_per_page, + page_iterator_class=SharePropertiesPaged) def create_share( self, share_name, # type: str diff --git a/sdk/storage/azure-storage-file/azure/storage/file/models.py b/sdk/storage/azure-storage-file/azure/storage/file/models.py index d77baed48d7d..8a393cc37417 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/models.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/models.py @@ -6,7 +6,7 @@ # pylint: disable=too-few-public-methods, too-many-instance-attributes # pylint: disable=super-init-not-called, too-many-lines -from azure.core.paging import Paged +from azure.core.paging import PageIterator from ._shared.utils import ( return_context_and_deserialized, process_storage_error) @@ -243,12 +243,12 @@ def _from_generated(cls, generated): return props -class SharePropertiesPaged(Paged): +class SharePropertiesPaged(PageIterator): """An iterable of Share properties. :ivar str service_endpoint: The service URL. :ivar str prefix: A file name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. :ivar str next_marker: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available @@ -261,43 +261,40 @@ class SharePropertiesPaged(Paged): begin with the specified prefix. :param int results_per_page: The maximum number of share names to retrieve per call. - :param str marker: An opaque continuation token. + :param str continuation_token: An opaque continuation token. """ - def __init__(self, command, prefix=None, results_per_page=None, marker=None, **kwargs): - super(SharePropertiesPaged, self).__init__(command, None) + def __init__(self, command, prefix=None, results_per_page=None, continuation_token=None): + super(SharePropertiesPaged, self).__init__( + get_next=self._get_next_cb, + extract_data=self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command self.service_endpoint = None self.prefix = prefix - self.current_marker = None + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.location_mode = None + self.current_page = [] - def _advance_page(self): - """Force moving the cursor to the next azure call. - This method is for advanced usage, iterator protocol is prefered. - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( - marker=self.next_marker or None, + return self._command( + marker=continuation_token or None, maxresults=self.results_per_page, cls=return_context_and_deserialized, use_location=self.location_mode) except StorageErrorException as error: process_storage_error(error) + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.service_endpoint = self._response.service_endpoint self.prefix = self._response.prefix - self.current_marker = self._response.marker + self.marker = self._response.marker self.results_per_page = self._response.max_results self.current_page = [ShareProperties._from_generated(i) for i in self._response.share_items] # pylint: disable=protected-access - self.next_marker = self._response.next_marker or None - return self.current_page + return self._response.next_marker or None, self.current_page class Handle(DictMixin): @@ -352,10 +349,10 @@ def _from_generated(cls, generated): return handle -class HandlesPaged(Paged): +class HandlesPaged(PageIterator): """An iterable of Handles. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. :ivar str next_marker: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available @@ -366,36 +363,34 @@ class HandlesPaged(Paged): :param callable command: Function to retrieve the next page of items. :param int results_per_page: The maximum number of share names to retrieve per call. - :param str marker: An opaque continuation token. + :param str continuation_token: An opaque continuation token. """ - def __init__(self, command, results_per_page=None, marker=None, **kwargs): - super(HandlesPaged, self).__init__(command, None) - self.current_marker = None + def __init__(self, command, results_per_page=None, continuation_token=None): + super(HandlesPaged, self).__init__( + get_next=self._get_next_cb, + extract_data=self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.location_mode = None + self.current_page = [] - def _advance_page(self): - """Force moving the cursor to the next azure call. - This method is for advanced usage, iterator protocol is prefered. - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( - marker=self.next_marker or None, + return self._command( + marker=continuation_token or None, maxresults=self.results_per_page, cls=return_context_and_deserialized, use_location=self.location_mode) except StorageErrorException as error: process_storage_error(error) + + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.current_page = [Handle._from_generated(h) for h in self._response.handle_list] # pylint: disable=protected-access - self.next_marker = self._response.next_marker or None - return self.current_page + return self._response.next_marker or None, self.current_page class DirectoryProperties(DictMixin): @@ -432,7 +427,7 @@ def _from_generated(cls, generated): return props -class DirectoryPropertiesPaged(Paged): +class DirectoryPropertiesPaged(PageIterator): """An iterable for the contents of a directory. This iterable will yield dicts for the contents of the directory. The dicts @@ -441,7 +436,7 @@ class DirectoryPropertiesPaged(Paged): :ivar str service_endpoint: The service URL. :ivar str prefix: A file name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. :ivar str next_marker: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available @@ -454,30 +449,26 @@ class DirectoryPropertiesPaged(Paged): begin with the specified prefix. :param int results_per_page: The maximum number of share names to retrieve per call. - :param str marker: An opaque continuation token. + :param str continuation_token: An opaque continuation token. """ - def __init__(self, command, prefix=None, results_per_page=None, marker=None, **kwargs): - super(DirectoryPropertiesPaged, self).__init__(command, None) + def __init__(self, command, prefix=None, results_per_page=None, continuation_token=None): + super(DirectoryPropertiesPaged, self).__init__( + get_next=self._get_next_cb, + extract_data=self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command self.service_endpoint = None self.prefix = prefix - self.current_marker = None + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.location_mode = None + self.current_page = [] - def _advance_page(self): - """Force moving the cursor to the next azure call. - This method is for advanced usage, iterator protocol is prefered. - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( - marker=self.next_marker or None, + return self._command( + marker=continuation_token or None, prefix=self.prefix, maxresults=self.results_per_page, cls=return_context_and_deserialized, @@ -485,14 +476,15 @@ def _advance_page(self): except StorageErrorException as error: process_storage_error(error) + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.service_endpoint = self._response.service_endpoint self.prefix = self._response.prefix - self.current_marker = self._response.marker + self.marker = self._response.marker self.results_per_page = self._response.max_results self.current_page = [_wrap_item(i) for i in self._response.segment.directory_items] self.current_page.extend([_wrap_item(i) for i in self._response.segment.file_items]) - self.next_marker = self._response.next_marker or None - return self.current_page + return self._response.next_marker or None, self.current_page class FileProperties(DictMixin): diff --git a/sdk/storage/azure-storage-file/tests/test_handle.py b/sdk/storage/azure-storage-file/tests/test_handle.py index 7fe3d3a5e3d4..220e71d679c2 100644 --- a/sdk/storage/azure-storage-file/tests/test_handle.py +++ b/sdk/storage/azure-storage-file/tests/test_handle.py @@ -114,20 +114,21 @@ def test_list_handles_with_marker(self): root = share.get_directory_client() # Act - handle_generator = root.list_handles(recursive=True, results_per_page=1) - next(handle_generator) + handle_generator = root.list_handles(recursive=True, results_per_page=1).by_page() + handles = list(next(handle_generator)) # Assert - self.assertIsNotNone(handle_generator.next_marker) - handles = handle_generator.current_page + self.assertIsNotNone(handle_generator.continuation_token) self._validate_handles(handles) # Note down a handle that we saw old_handle = handles[0] # Continue listing - remaining_handles = list( - root.list_handles(recursive=True, marker=handle_generator.next_marker)) + remaining_handles = list(next( + root.list_handles(recursive=True).by_page( + continuation_token=handle_generator.continuation_token) + )) self._validate_handles(handles) # Make sure the old handle did not appear diff --git a/sdk/storage/azure-storage-file/tests/test_share.py b/sdk/storage/azure-storage-file/tests/test_share.py index 4eabf312d3f4..cc134be6c710 100644 --- a/sdk/storage/azure-storage-file/tests/test_share.py +++ b/sdk/storage/azure-storage-file/tests/test_share.py @@ -341,14 +341,12 @@ def test_list_shares_with_num_results_and_marker(self): share_names.sort() # Act - generator1 = self.fsc.list_shares(prefix, results_per_page=2) - next(generator1) - generator2 = self.fsc.list_shares( - prefix, marker=generator1.next_marker, results_per_page=2) - next(generator2) + generator1 = self.fsc.list_shares(prefix, results_per_page=2).by_page() + shares1 = list(next(generator1)) - shares1 = generator1.current_page - shares2 = generator2.current_page + generator2 = self.fsc.list_shares( + prefix, results_per_page=2).by_page(continuation_token=generator1.continuation_token) + shares2 = list(next(generator2)) # Assert self.assertIsNotNone(shares1) @@ -606,14 +604,14 @@ def test_list_directories_and_files_with_num_results(self): root.upload_file('fileb1', '1024') # Act - result = share_name.list_directories_and_files(results_per_page=2) - next(result) + result = share_name.list_directories_and_files(results_per_page=2).by_page() + result = list(next(result)) # Assert self.assertIsNotNone(result) - self.assertEqual(len(result.current_page), 2) - self.assertNamedItemInContainer(result.current_page, 'dir1') - self.assertNamedItemInContainer(result.current_page, 'filea1') + self.assertEqual(len(result), 2) + self.assertNamedItemInContainer(result, 'dir1') + self.assertNamedItemInContainer(result, 'filea1') @record def test_list_directories_and_files_with_num_results_and_marker(self): @@ -627,14 +625,13 @@ def test_list_directories_and_files_with_num_results_and_marker(self): dir1.upload_file('fileb1', '1024') # Act - generator1 = share_name.list_directories_and_files('dir1', results_per_page=2) - next(generator1) - generator2 = share_name.list_directories_and_files( - 'dir1', marker=generator1.next_marker, results_per_page=2) - next(generator2) + generator1 = share_name.list_directories_and_files( + 'dir1', results_per_page=2).by_page() + result1 = list(next(generator1)) - result1 = generator1.current_page - result2 = generator2.current_page + generator2 = share_name.list_directories_and_files( + 'dir1', results_per_page=2).by_page(continuation_token=generator1.continuation_token) + result2 = list(next(generator2)) # Assert self.assertEqual(len(result1), 2) @@ -643,7 +640,7 @@ def test_list_directories_and_files_with_num_results_and_marker(self): self.assertNamedItemInContainer(result1, 'filea2') self.assertNamedItemInContainer(result2, 'filea3') self.assertNamedItemInContainer(result2, 'fileb1') - self.assertEqual(generator2.next_marker, None) + self.assertEqual(generator2.continuation_token, None) @record def test_list_directories_and_files_with_prefix(self): diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/models.py b/sdk/storage/azure-storage-queue/azure/storage/queue/models.py index 224508d959fc..eb8250e918f6 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/models.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/models.py @@ -7,7 +7,7 @@ # pylint: disable=super-init-not-called from typing import List # pylint: disable=unused-import -from azure.core.paging import Paged +from azure.core.paging import PageIterator from ._shared.utils import ( return_context_and_deserialized, process_storage_error) @@ -220,7 +220,7 @@ def _from_generated(cls, generated): return message -class MessagesPaged(Paged): +class MessagesPaged(PageIterator): """An iterable of Queue Messages. :ivar int results_per_page: The maximum number of results retrieved per API call. @@ -231,28 +231,28 @@ class MessagesPaged(Paged): :param int results_per_page: The maximum number of messages to retrieve per call. """ - def __init__(self, command, results_per_page=None): - super(MessagesPaged, self).__init__(command, None) + def __init__(self, command, results_per_page=None, continuation_token=None): + if continuation_token is not None: + raise ValueError("This operation does not support continuation token") + + super(MessagesPaged, self).__init__( + self._get_next_cb, + self._extract_data_cb, + ) + self._command = command self.results_per_page = results_per_page - def _advance_page(self): - """Force moving the cursor to the next azure call. - - This method is for advanced usage, iterator protocol is prefered. - - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - messages = self._get_next(number_of_messages=self.results_per_page) - if not messages: - raise StopIteration() + return self._command(number_of_messages=self.results_per_page) except StorageErrorException as error: process_storage_error(error) - self.current_page = [QueueMessage._from_generated(q) for q in messages] # pylint: disable=protected-access - return self.current_page + + def _extract_data_cb(self, messages): + # There is no concept of continuation token, so raising on my own condition + if not messages: + raise StopIteration("End of paging") + return "TOKEN_IGNORED", [QueueMessage._from_generated(q) for q in messages] # pylint: disable=protected-access class QueueProperties(DictMixin): @@ -280,12 +280,12 @@ def _from_generated(cls, generated): return props -class QueuePropertiesPaged(Paged): +class QueuePropertiesPaged(PageIterator): """An iterable of Queue properties. :ivar str service_endpoint: The service URL. :ivar str prefix: A queue name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. :ivar str next_marker: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available @@ -298,44 +298,39 @@ class QueuePropertiesPaged(Paged): begin with the specified prefix. :param int results_per_page: The maximum number of queue names to retrieve per call. - :param str marker: An opaque continuation token. + :param str continuation_token: An opaque continuation token. """ - def __init__(self, command, prefix=None, results_per_page=None, marker=None): - super(QueuePropertiesPaged, self).__init__(command, None) + def __init__(self, command, prefix=None, results_per_page=None, continuation_token=None): + super(QueuePropertiesPaged, self).__init__( + self._get_next_cb, + self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command self.service_endpoint = None self.prefix = prefix - self.current_marker = None + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.location_mode = None - def _advance_page(self): - """Force moving the cursor to the next azure call. - - This method is for advanced usage, iterator protocol is prefered. - - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( - marker=self.next_marker or None, + return self._command( + marker=continuation_token or None, maxresults=self.results_per_page, cls=return_context_and_deserialized, use_location=self.location_mode) except StorageErrorException as error: process_storage_error(error) + + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.service_endpoint = self._response.service_endpoint self.prefix = self._response.prefix - self.current_marker = self._response.marker + self.marker = self._response.marker self.results_per_page = self._response.max_results - self.current_page = [QueueProperties._from_generated(q) for q in self._response.queue_items] # pylint: disable=protected-access - self.next_marker = self._response.next_marker or None - return self.current_page + + return self._response.next_marker or None, [QueueProperties._from_generated(q) for q in self._response.queue_items] # pylint: disable=protected-access class QueuePermissions(object): diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py index a8d58b638f73..ff780029de0c 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py @@ -16,6 +16,8 @@ import six +from azure.core.paging import ItemPaged + from ._shared.shared_access_signature import QueueSharedAccessSignature from ._shared.utils import ( StorageAccountHostsMixin, @@ -512,7 +514,7 @@ def enqueue_message( # type: ignore process_storage_error(error) def receive_messages(self, messages_per_page=None, visibility_timeout=None, timeout=None, **kwargs): # type: ignore - # type: (Optional[int], Optional[int], Optional[int], Optional[Any]) -> QueueMessage + # type: (Optional[int], Optional[int], Optional[int], Optional[Any]) -> ItemPaged[Message] """Removes one or more messages from the front of the queue. When a message is retrieved from the queue, the response includes the message @@ -540,7 +542,7 @@ def receive_messages(self, messages_per_page=None, visibility_timeout=None, time The server timeout, expressed in seconds. :return: Returns a message iterator of dict-like Message objects. - :rtype: ~azure.storage.queue.models.MessagesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.queue.models.Message] Example: .. literalinclude:: ../tests/test_queue_samples_message.py @@ -562,7 +564,7 @@ def receive_messages(self, messages_per_page=None, visibility_timeout=None, time cls=self._config.message_decode_policy, **kwargs ) - return MessagesPaged(command, results_per_page=messages_per_page) + return ItemPaged(command, results_per_page=messages_per_page, page_iterator_class=MessagesPaged) except StorageErrorException as error: process_storage_error(error) diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py index 41be25c1d6bf..1e7fca250953 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py @@ -13,6 +13,8 @@ except ImportError: from urlparse import urlparse # type: ignore +from azure.core.paging import ItemPaged + from ._shared.shared_access_signature import SharedAccessSignature from ._shared.models import LocationMode, Services from ._shared.utils import ( @@ -302,12 +304,11 @@ def set_service_properties( # type: ignore def list_queues( self, name_starts_with=None, # type: Optional[str] include_metadata=False, # type: Optional[bool] - marker=None, # type: Optional[str] results_per_page=None, # type: Optional[int] timeout=None, # type: Optional[int] **kwargs ): - # type: (...) -> QueuePropertiesPaged + # type: (...) -> ItemPaged[QueueProperties] """Returns a generator to list the queues under the specified account. The generator will lazily follow the continuation tokens returned by @@ -318,10 +319,6 @@ def list_queues( begin with the specified prefix. :param bool include_metadata: Specifies that queue metadata be returned in the response. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int results_per_page: The maximum number of queue names to retrieve per API call. If the request does not specify the server will return up to 5,000 items. @@ -330,7 +327,7 @@ def list_queues( calls to the service in which case the timeout value specified will be applied to each individual call. :returns: An iterable (auto-paging) of QueueProperties. - :rtype: ~azure.core.queue.models.QueuePropertiesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.core.queue.models.QueueProperties] Example: .. literalinclude:: ../tests/test_queue_samples_service.py @@ -347,8 +344,10 @@ def list_queues( include=include, timeout=timeout, **kwargs) - return QueuePropertiesPaged( - command, prefix=name_starts_with, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, prefix=name_starts_with, results_per_page=results_per_page, + page_iterator_class=QueuePropertiesPaged + ) def create_queue( self, name, # type: str @@ -357,7 +356,7 @@ def create_queue( **kwargs ): # type: (...) -> QueueClient - """Creates a new queue under the specified account. + """Creates a new queue under the specified account. If a queue with the same name already exists, the operation fails. Returns a client with which to interact with the newly created queue. diff --git a/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_delete_message.yaml b/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_delete_message.yaml index 51d38817ff39..7b9a2fe78803 100644 --- a/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_delete_message.yaml +++ b/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_delete_message.yaml @@ -2,1441 +2,246 @@ interactions: - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1b7a7e3a-952a-11e9-bd27-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49 - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - fd4a8222-9003-00c8-3c36-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1b9a01c6-952a-11e9-8b0c-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF442e2d59-b9ee-4fc1-b57f-1eede999ed26Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAAZ71f3TYp1QE=Sat,\ - \ 22 Jun 2019 20:12:49 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - fd4a822e-9003-00c8-4436-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1ba2cc3e-952a-11e9-84a6-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF4b1f4b61-a5c0-48fa-8473-231196864687Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAAayNo3TYp1QE=Sat,\ - \ 22 Jun 2019 20:12:49 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - fd4a8238-9003-00c8-4e36-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1bab46ca-952a-11e9-8a40-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFFbc529b8c-9f40-41ef-96f3-354cb25025b7Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAAkNdw3TYp1QE=Sat,\ - \ 22 Jun 2019 20:12:49 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - fd4a8241-9003-00c8-5536-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1bb3e9c6-952a-11e9-b2c0-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF635425fc-8557-4a2c-81fb-14a27d8b1c50Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAApmR53TYp1QE=Sat,\ - \ 22 Jun 2019 20:12:49 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - fd4a8249-9003-00c8-5c36-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1bbc4aba-952a-11e9-9d3a-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF442e2d59-b9ee-4fc1-b57f-1eede999ed26Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAAhkZj7zYp1QE=Sat,\ - \ 22 Jun 2019 20:13:19 GMT1message1" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - fd4a8253-9003-00c8-6536-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1bc4c398-952a-11e9-9d06-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: DELETE - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages/442e2d59-b9ee-4fc1-b57f-1eede999ed26?popreceipt=AgAAAAMAAAAAAAAAhkZj7zYp1QE%3D - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - fd4a825b-9003-00c8-6c36-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1bcd588c-952a-11e9-895b-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages?numofmessages=32 - response: - body: - string: "\uFEFF4b1f4b61-a5c0-48fa-8473-231196864687Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAA16507zYp1QE=Sat,\ - \ 22 Jun 2019 20:13:19 GMT1message2bc529b8c-9f40-41ef-96f3-354cb25025b7Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAA16507zYp1QE=Sat,\ - \ 22 Jun 2019 20:13:19 GMT1message3635425fc-8557-4a2c-81fb-14a27d8b1c50Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAA16507zYp1QE=Sat,\ - \ 22 Jun 2019 20:13:19 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - fd4a8261-9003-00c8-7236-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dcd5898c-952a-11e9-806a-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:13 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49 - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 0b5f410d-2003-0070-7d37-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dcf60022-952a-11e9-954d-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:13 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF1208b99d-12bd-4073-a3c8-9b0ad6bfdf33Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAASC69njcp1QE=Sat,\ - \ 22 Jun 2019 20:18:14 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 0b5f411d-2003-0070-0a37-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dcff4f9c-952a-11e9-83d3-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF3de1106c-a4cf-4a5f-a7dc-d5f70ad5c8b0Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAAzn7Gnjcp1QE=Sat,\ - \ 22 Jun 2019 20:18:14 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 0b5f412a-2003-0070-1637-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dd08b014-952a-11e9-aee4-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF4ec3ee4b-b0f3-48e9-a5d1-8b7fc1e2180aSat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAA+DLPnjcp1QE=Sat,\ - \ 22 Jun 2019 20:18:14 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 0b5f4137-2003-0070-1f37-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dd11436e-952a-11e9-8240-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFFea4ee1a4-2c09-42d5-bad1-210be95e91c7Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAATzXYnjcp1QE=Sat,\ - \ 22 Jun 2019 20:18:14 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 0b5f4149-2003-0070-2e37-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dd1a7bd2-952a-11e9-95d1-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF1208b99d-12bd-4073-a3c8-9b0ad6bfdf33Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAAkLPCsDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:44 GMT1message1" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 0b5f4151-2003-0070-3637-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dd23aae8-952a-11e9-b0bf-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: DELETE - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages/1208b99d-12bd-4073-a3c8-9b0ad6bfdf33?popreceipt=AgAAAAMAAAAAAAAAkLPCsDcp1QE%3D - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:18:14 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 0b5f4164-2003-0070-4737-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dd2c7de6-952a-11e9-9262-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages?numofmessages=32 - response: - body: - string: "\uFEFF3de1106c-a4cf-4a5f-a7dc-d5f70ad5c8b0Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAAV9/UsDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:44 GMT1message24ec3ee4b-b0f3-48e9-a5d1-8b7fc1e2180aSat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAAV9/UsDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:44 GMT1message3ea4ee1a4-2c09-42d5-bad1-210be95e91c7Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAAV9/UsDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:44 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:14 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 0b5f4172-2003-0070-5337-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 740b52d2-952b-11e9-9d3a-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b7b05c9c-ad96-11e9-ab10-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:44 GMT'] + x-ms-version: ['2018-03-28'] method: PUT uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49 response: - body: - string: '' + body: {string: ''} headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:22:26 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - f5f43da9-6003-0099-3638-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Length: ['0'] + Date: ['Tue, 23 Jul 2019 22:10:44 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [b462afff-6003-00dd-0ba3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message1' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 742c9034-952b-11e9-95de-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b81371ae-ad96-11e9-923b-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages response: - body: - string: "\uFEFF193f415e-aabc-46e0-9209-48d6f7dad682Sat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAxCb0NTgp1QE=Sat,\ - \ 22 Jun 2019 20:22:27 GMT" + body: {string: "\uFEFF8c67a6da-dc58-453c-a32c-2357250782d6Tue, + 23 Jul 2019 22:10:45 GMTTue, 30 Jul 2019 22:10:45 + GMTAgAAAAMAAAAAAAAASa7peaNB1QE=Tue, + 23 Jul 2019 22:10:45 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:26 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - f5f43db1-6003-0099-3a38-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [b462b023-6003-00dd-25a3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message2' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 7435d566-952b-11e9-a739-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b82af13e-ad96-11e9-89e9-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages response: - body: - string: "\uFEFF5b8f5b8c-25ca-42c2-a759-8feeba150f7cSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAGyn9NTgp1QE=Sat,\ - \ 22 Jun 2019 20:22:27 GMT" + body: {string: "\uFEFF53352c13-0ace-4405-a299-848592033386Tue, + 23 Jul 2019 22:10:45 GMTTue, 30 Jul 2019 22:10:45 + GMTAgAAAAMAAAAAAAAA9DX/eaNB1QE=Tue, + 23 Jul 2019 22:10:45 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:26 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - f5f43db7-6003-0099-3f38-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [b462b041-6003-00dd-3fa3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message3' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 743eee58-952b-11e9-8745-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b84060c8-ad96-11e9-89c5-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages response: - body: - string: "\uFEFFd867e71b-a641-4b87-b534-4659d5016cfdSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAcysGNjgp1QE=Sat,\ - \ 22 Jun 2019 20:22:27 GMT" + body: {string: "\uFEFF831f51e4-bdae-46c9-8085-7eb7ddf44022Tue, + 23 Jul 2019 22:10:46 GMTTue, 30 Jul 2019 22:10:46 + GMTAgAAAAMAAAAAAAAAow8TeqNB1QE=Tue, + 23 Jul 2019 22:10:46 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:26 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - f5f43dba-6003-0099-4238-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [b462b055-6003-00dd-51a3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message4' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 74482aa4-952b-11e9-9902-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b85423be-ad96-11e9-ad5e-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:46 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages response: - body: - string: "\uFEFF1cafa96b-c8b4-41b7-8dcf-407fffd8661cSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAA+XsPNjgp1QE=Sat,\ - \ 22 Jun 2019 20:22:27 GMT" + body: {string: "\uFEFF415e7230-45f9-423d-9090-b53936c23314Tue, + 23 Jul 2019 22:10:46 GMTTue, 30 Jul 2019 22:10:46 + GMTAgAAAAMAAAAAAAAAfeUoeqNB1QE=Tue, + 23 Jul 2019 22:10:46 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:26 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - f5f43dbe-6003-0099-4538-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [b462b073-6003-00dd-67a3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: null headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 74515192-952b-11e9-be15-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b86961c6-ad96-11e9-9926-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:46 GMT'] + x-ms-version: ['2018-03-28'] method: GET uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages response: - body: - string: "\uFEFF193f415e-aabc-46e0-9209-48d6f7dad682Sat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAl5b6Rzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:57 GMT1message1" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:27 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - f5f43dbf-6003-0099-4638-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 745b1524-952b-11e9-b3c4-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + body: {string: "\uFEFF8c67a6da-dc58-453c-a32c-2357250782d6Tue, + 23 Jul 2019 22:10:45 GMTTue, 30 Jul 2019 22:10:45 + GMTAgAAAAMAAAAAAAAAA7gajKNB1QE=Tue, + 23 Jul 2019 22:11:16 GMT1message1"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + Vary: [Origin] + x-ms-request-id: [b462b090-6003-00dd-7ca3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b879b574-ad96-11e9-8ec6-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:46 GMT'] + x-ms-version: ['2018-03-28'] method: DELETE - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages/193f415e-aabc-46e0-9209-48d6f7dad682?popreceipt=AgAAAAMAAAAAAAAAl5b6Rzgp1QE%3D + uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages/8c67a6da-dc58-453c-a32c-2357250782d6?popreceipt=AgAAAAMAAAAAAAAAA7gajKNB1QE%3D response: - body: - string: '' + body: {string: ''} headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:22:27 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - f5f43dc3-6003-0099-4a38-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 204 - message: No Content + Content-Length: ['0'] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [b462b0b7-6003-00dd-1ba3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 204, message: No Content} - request: body: null headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 74643122-952b-11e9-b8fb-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:28 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b88a0908-ad96-11e9-9586-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:46 GMT'] + x-ms-version: ['2018-03-28'] method: GET uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages?numofmessages=32 response: - body: - string: "\uFEFF5b8f5b8c-25ca-42c2-a759-8feeba150f7cSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAul4NSDgp1QE=Sat,\ - \ 22 Jun 2019 20:22:58 GMT1message2d867e71b-a641-4b87-b534-4659d5016cfdSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAul4NSDgp1QE=Sat,\ - \ 22 Jun 2019 20:22:58 GMT1message31cafa96b-c8b4-41b7-8dcf-407fffd8661cSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAul4NSDgp1QE=Sat,\ - \ 22 Jun 2019 20:22:58 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:27 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - f5f43dc5-6003-0099-4c38-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - aee1db86-952d-11e9-9f94-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49 - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 24506b4c-4003-00ca-6e3a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af02a3ac-952d-11e9-bdc7-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF914e12cd-da29-4d7f-828a-393828adfbbeSat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAeuTKcDop1QE=Sat,\ - \ 22 Jun 2019 20:38:25 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 24506b5e-4003-00ca-7e3a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af0bd666-952d-11e9-a81d-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFFcd560872-1500-4081-9887-44a67792f515Sat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAzubTcDop1QE=Sat,\ - \ 22 Jun 2019 20:38:25 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 24506b71-4003-00ca-103a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af14a5f4-952d-11e9-bfa3-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFFa047b162-8bd6-4ca3-8393-245d7af6dd90Sat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAA3HPccDop1QE=Sat,\ - \ 22 Jun 2019 20:38:25 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 24506b7f-4003-00ca-1d3a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af1d518c-952d-11e9-bc94-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFFcb60022d-89e1-4c86-afdb-627d48e3250fSat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAAijlcDop1QE=Sat,\ - \ 22 Jun 2019 20:38:25 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 24506b9c-4003-00ca-363a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af261bca-952d-11e9-8a6d-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF914e12cd-da29-4d7f-828a-393828adfbbeSat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAVs3Pgjop1QE=Sat,\ - \ 22 Jun 2019 20:38:55 GMT1message1" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 24506baa-4003-00ca-443a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af2f5190-952d-11e9-a222-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: DELETE - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages/914e12cd-da29-4d7f-828a-393828adfbbe?popreceipt=AgAAAAMAAAAAAAAAVs3Pgjop1QE%3D - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 24506bc9-4003-00ca-5e3a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af389908-952d-11e9-9591-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' + body: {string: "\uFEFF53352c13-0ace-4405-a299-848592033386Tue, + 23 Jul 2019 22:10:45 GMTTue, 30 Jul 2019 22:10:45 + GMTAgAAAAMAAAAAAAAAl689jKNB1QE=Tue, + 23 Jul 2019 22:11:16 GMT1message2831f51e4-bdae-46c9-8085-7eb7ddf44022Tue, + 23 Jul 2019 22:10:46 GMTTue, 30 Jul 2019 22:10:46 + GMTAgAAAAMAAAAAAAAAl689jKNB1QE=Tue, + 23 Jul 2019 22:11:16 GMT1message3415e7230-45f9-423d-9090-b53936c23314Tue, + 23 Jul 2019 22:10:46 GMTTue, 30 Jul 2019 22:10:46 + GMTAgAAAAMAAAAAAAAAl689jKNB1QE=Tue, + 23 Jul 2019 22:11:16 GMT1message4"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + Vary: [Origin] + x-ms-request-id: [b462b0e0-6003-00dd-3da3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b89de61a-ad96-11e9-94f2-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:46 GMT'] + x-ms-version: ['2018-03-28'] method: GET uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages?numofmessages=32 response: - body: - string: "\uFEFFcd560872-1500-4081-9887-44a67792f515Sat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAX27igjop1QE=Sat,\ - \ 22 Jun 2019 20:38:55 GMT1message2a047b162-8bd6-4ca3-8393-245d7af6dd90Sat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAX27igjop1QE=Sat,\ - \ 22 Jun 2019 20:38:55 GMT1message3cb60022d-89e1-4c86-afdb-627d48e3250fSat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAX27igjop1QE=Sat,\ - \ 22 Jun 2019 20:38:55 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 24506bd7-4003-00ca-6b3a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK + body: {string: "\uFEFF"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + Vary: [Origin] + x-ms-request-id: [b462b112-6003-00dd-66a3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 200, message: OK} version: 1 diff --git a/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_get_messages_with_options.yaml b/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_get_messages_with_options.yaml index 4f79ec258033..cb18246850ef 100644 --- a/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_get_messages_with_options.yaml +++ b/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_get_messages_with_options.yaml @@ -2,1121 +2,200 @@ interactions: - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1cb5f240-952a-11e9-8690-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 4ce61f8f-6003-0033-1436-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1cdbdadc-952a-11e9-908b-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFc07a14fe-0248-49ac-84ef-9183eec8c1f9Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAyXih3jYp1QE=Sat,\ - \ 22 Jun 2019 20:12:51 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 4ce61f99-6003-0033-1b36-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1ce4762e-952a-11e9-9f63-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF8c47bcca-e16f-4b92-92b1-15e94379eb52Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAwd6p3jYp1QE=Sat,\ - \ 22 Jun 2019 20:12:51 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 4ce61f9a-6003-0033-1c36-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1cecec34-952a-11e9-a5e2-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFee5ab552-39a9-40a8-ad63-d94e3b486906Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAtESy3jYp1QE=Sat,\ - \ 22 Jun 2019 20:12:51 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 4ce61f9f-6003-0033-2136-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1cf568ee-952a-11e9-bb36-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFd1646c72-1aa6-423b-a070-0cfc5d649668Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAmYO63jYp1QE=Sat,\ - \ 22 Jun 2019 20:12:51 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 4ce61fab-6003-0033-2c36-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1cfd9dfa-952a-11e9-896e-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f/messages?numofmessages=4&visibilitytimeout=20 - response: - body: - string: "\uFEFFc07a14fe-0248-49ac-84ef-9183eec8c1f9Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAkquu6jYp1QE=Sat,\ - \ 22 Jun 2019 20:13:11 GMT1message18c47bcca-e16f-4b92-92b1-15e94379eb52Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAkquu6jYp1QE=Sat,\ - \ 22 Jun 2019 20:13:11 GMT1message2ee5ab552-39a9-40a8-ad63-d94e3b486906Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAkquu6jYp1QE=Sat,\ - \ 22 Jun 2019 20:13:11 GMT1message3d1646c72-1aa6-423b-a070-0cfc5d649668Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAkquu6jYp1QE=Sat,\ - \ 22 Jun 2019 20:13:11 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 4ce61fb4-6003-0033-3536-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de5c3670-952a-11e9-837b-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [eb8b0f92-ad90-11e9-ad43-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + x-ms-version: ['2018-03-28'] method: PUT uri: https://storagename.queue.core.windows.net/pythonqueue6405110f response: - body: - string: '' + body: {string: ''} headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:18:15 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - e1a897ac-1003-0073-2a37-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Length: ['0'] + Date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [ab763224-9003-000f-719d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message1' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de7c09d2-952a-11e9-a68c-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ebe04322-ad90-11e9-90d1-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages response: - body: - string: "\uFEFF4a3e7e24-0f9b-488d-a93e-8f6c52511bd4Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAG91CoDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:16 GMT" + body: {string: "\uFEFF1aea519c-55e7-4613-a635-11e894f3f1cdTue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAiP6wrZ1B1QE=Tue, + 23 Jul 2019 21:29:15 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:16 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - e1a897b4-1003-0073-2e37-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [ab763242-9003-000f-099d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message2' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de8504a6-952a-11e9-b42e-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ebf1ec6c-ad90-11e9-a1a9-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages response: - body: - string: "\uFEFF6382f360-4bb2-4635-bbb0-0a2bdb1bc21bSat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAhwZMoDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:16 GMT" + body: {string: "\uFEFFfcc1b957-6743-4cd8-9a37-561f4e76a694Tue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAtJHArZ1B1QE=Tue, + 23 Jul 2019 21:29:15 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:16 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - e1a897bc-1003-0073-3337-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [ab76324f-9003-000f-159d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message3' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de8e1458-952a-11e9-8ed7-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ec017d92-ad90-11e9-9118-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages response: - body: - string: "\uFEFF4aa83d39-8722-46ab-a654-897fc8ff05b4Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAxOFUoDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:16 GMT" + body: {string: "\uFEFFb6cf0c16-2d49-40fc-93bb-29e45e32ec5bTue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAbA/RrZ1B1QE=Tue, + 23 Jul 2019 21:29:15 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:16 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - e1a897c8-1003-0073-3a37-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [ab76325c-9003-000f-209d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message4' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de96f262-952a-11e9-b5f5-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ec129446-ad90-11e9-9a37-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages response: - body: - string: "\uFEFF5425bc84-4683-47e1-bfe0-f38ddb517178Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAA6ZVdoDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:16 GMT" + body: {string: "\uFEFFee1fb3f0-9d97-49bf-87d6-46e6403847cfTue, + 23 Jul 2019 21:29:16 GMTTue, 30 Jul 2019 21:29:16 + GMTAgAAAAMAAAAAAAAAwPDgrZ1B1QE=Tue, + 23 Jul 2019 21:29:16 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:16 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - e1a897cf-1003-0073-3f37-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [ab76326e-9003-000f-309d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: null headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de9f9886-952a-11e9-bd95-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ec21afd2-ad90-11e9-b00f-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:16 GMT'] + x-ms-version: ['2018-03-28'] method: GET uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages?numofmessages=4&visibilitytimeout=20 response: - body: - string: "\uFEFF4a3e7e24-0f9b-488d-a93e-8f6c52511bd4Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAVYFSrDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:36 GMT1message16382f360-4bb2-4635-bbb0-0a2bdb1bc21bSat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAVYFSrDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:36 GMT1message24aa83d39-8722-46ab-a654-897fc8ff05b4Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAVYFSrDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:36 GMT1message35425bc84-4683-47e1-bfe0-f38ddb517178Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAVYFSrDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:36 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:16 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - e1a897d5-1003-0073-4437-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK + body: {string: "\uFEFF1aea519c-55e7-4613-a635-11e894f3f1cdTue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAXQnduZ1B1QE=Tue, + 23 Jul 2019 21:29:36 GMT1message1fcc1b957-6743-4cd8-9a37-561f4e76a694Tue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAXQnduZ1B1QE=Tue, + 23 Jul 2019 21:29:36 GMT1message2b6cf0c16-2d49-40fc-93bb-29e45e32ec5bTue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAXQnduZ1B1QE=Tue, + 23 Jul 2019 21:29:36 GMT1message3ee1fb3f0-9d97-49bf-87d6-46e6403847cfTue, + 23 Jul 2019 21:29:16 GMTTue, 30 Jul 2019 21:29:16 + GMTAgAAAAMAAAAAAAAAXQnduZ1B1QE=Tue, + 23 Jul 2019 21:29:36 GMT1message4"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:16 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + Vary: [Origin] + x-ms-request-id: [ab763281-9003-000f-3f9d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 200, message: OK} - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 75ccf3fa-952b-11e9-aff5-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 7df02fa6-3003-00ec-1538-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 75ed5910-952b-11e9-be2b-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF75b37bc0-c7e6-48e8-9ce3-94d914932dabSat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAqu20Nzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:30 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 7df02faf-3003-00ec-1b38-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 75f69162-952b-11e9-bff9-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFf4e91262-01c6-48ae-bc09-7af40ee60c6bSat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAA58i9Nzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:30 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 7df02fb3-3003-00ec-1f38-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 75ff663a-952b-11e9-adab-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF7001b035-8d54-406a-82b5-69753b3448e6Sat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAADX3GNzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:30 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 7df02fba-3003-00ec-2638-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 76087c36-952b-11e9-9eae-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF1ab76e0f-1d96-42d7-999c-3accd5230ee2Sat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAYX/PNzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:30 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 7df02fbd-3003-00ec-2938-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 76115afe-952b-11e9-8512-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ec33efd0-ad90-11e9-a453-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:16 GMT'] + x-ms-version: ['2018-03-28'] method: GET uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages?numofmessages=4&visibilitytimeout=20 response: - body: - string: "\uFEFF75b37bc0-c7e6-48e8-9ce3-94d914932dabSat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAtUPEQzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:50 GMT1message1f4e91262-01c6-48ae-bc09-7af40ee60c6bSat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAtUPEQzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:50 GMT1message27001b035-8d54-406a-82b5-69753b3448e6Sat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAtUPEQzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:50 GMT1message31ab76e0f-1d96-42d7-999c-3accd5230ee2Sat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAtUPEQzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:50 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 7df02fc2-3003-00ec-2e38-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b0efd498-952d-11e9-a770-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:28 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - abd1b919-4003-0006-193a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b11061ac-952d-11e9-b8b8-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:28 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFe2a1644d-981b-4c48-8b4c-fc8b539037f3Sat,\ - \ 22 Jun 2019 20:38:28 GMTSat, 29 Jun 2019\ - \ 20:38:28 GMTAgAAAAMAAAAAAAAA2cfYcjop1QE=Sat,\ - \ 22 Jun 2019 20:38:28 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - abd1b924-4003-0006-213a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b1198976-952d-11e9-a7a0-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:28 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF26981b56-716f-4f72-af1e-301773a26c92Sat,\ - \ 22 Jun 2019 20:38:28 GMTSat, 29 Jun 2019\ - \ 20:38:28 GMTAgAAAAMAAAAAAAAAAnzhcjop1QE=Sat,\ - \ 22 Jun 2019 20:38:28 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - abd1b929-4003-0006-263a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b1222c70-952d-11e9-ab5a-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:28 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFdebf68ee-14a5-4669-a34b-3e8092fe04a1Sat,\ - \ 22 Jun 2019 20:38:29 GMTSat, 29 Jun 2019\ - \ 20:38:29 GMTAgAAAAMAAAAAAAAAQ1fqcjop1QE=Sat,\ - \ 22 Jun 2019 20:38:29 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - abd1b932-4003-0006-2d3a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b12b1240-952d-11e9-afa4-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:28 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF103e9ae6-f20c-4d69-aede-b0d740fba873Sat,\ - \ 22 Jun 2019 20:38:29 GMTSat, 29 Jun 2019\ - \ 20:38:29 GMTAgAAAAMAAAAAAAAA+PXzcjop1QE=Sat,\ - \ 22 Jun 2019 20:38:29 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - abd1b93b-4003-0006-343a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b134a7ec-952d-11e9-a776-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:29 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages?numofmessages=4&visibilitytimeout=20 - response: - body: - string: "\uFEFFe2a1644d-981b-4c48-8b4c-fc8b539037f3Sat,\ - \ 22 Jun 2019 20:38:28 GMTSat, 29 Jun 2019\ - \ 20:38:28 GMTAgAAAAMAAAAAAAAAIWzofjop1QE=Sat,\ - \ 22 Jun 2019 20:38:49 GMT1message126981b56-716f-4f72-af1e-301773a26c92Sat,\ - \ 22 Jun 2019 20:38:28 GMTSat, 29 Jun 2019\ - \ 20:38:28 GMTAgAAAAMAAAAAAAAAIWzofjop1QE=Sat,\ - \ 22 Jun 2019 20:38:49 GMT1message2debf68ee-14a5-4669-a34b-3e8092fe04a1Sat,\ - \ 22 Jun 2019 20:38:29 GMTSat, 29 Jun 2019\ - \ 20:38:29 GMTAgAAAAMAAAAAAAAAIWzofjop1QE=Sat,\ - \ 22 Jun 2019 20:38:49 GMT1message3103e9ae6-f20c-4d69-aede-b0d740fba873Sat,\ - \ 22 Jun 2019 20:38:29 GMTSat, 29 Jun 2019\ - \ 20:38:29 GMTAgAAAAMAAAAAAAAAIWzofjop1QE=Sat,\ - \ 22 Jun 2019 20:38:49 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - abd1b940-4003-0006-383a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK + body: {string: "\uFEFF"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:16 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + Vary: [Origin] + x-ms-request-id: [ab763289-9003-000f-479d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 200, message: OK} version: 1 diff --git a/sdk/storage/azure-storage-queue/tests/test_queue.py b/sdk/storage/azure-storage-queue/tests/test_queue.py index 8df7fc472476..1aa1e14536ba 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue.py @@ -158,16 +158,13 @@ def test_list_queues_with_options(self): # Action generator1 = self.qsc.list_queues( name_starts_with=prefix, - results_per_page=3) - next(generator1) - queues1 = generator1.current_page + results_per_page=3).by_page() + queues1 = list(next(generator1)) generator2 = self.qsc.list_queues( name_starts_with=prefix, - marker=generator1.next_marker, - include_metadata=True) - next(generator2) - queues2 = generator2.current_page + include_metadata=True).by_page(generator1.continuation_token) + queues2 = list(next(generator2)) # Asserts self.assertIsNotNone(queues1) @@ -175,6 +172,7 @@ def test_list_queues_with_options(self): self.assertIsNotNone(queues1[0]) self.assertIsNone(queues1[0].metadata) self.assertNotEqual('', queues1[0].name) + assert generator1.location_mode is not None # Asserts self.assertIsNotNone(queues2) self.assertTrue(len(self.test_queues) - 3 <= len(queues2)) @@ -317,14 +315,14 @@ def test_get_messages_with_options(self): queue_client.enqueue_message(u'message2') queue_client.enqueue_message(u'message3') queue_client.enqueue_message(u'message4') - result = queue_client.receive_messages(messages_per_page=4, visibility_timeout=20) - next(result) + pager = queue_client.receive_messages(messages_per_page=4, visibility_timeout=20) + result = list(pager) # Asserts self.assertIsNotNone(result) - self.assertEqual(4, len(result.current_page)) + self.assertEqual(4, len(result)) - for message in result.current_page: + for message in result: self.assertIsNotNone(message) self.assertNotEqual('', message.id) self.assertNotEqual('', message.content) @@ -406,12 +404,12 @@ def test_delete_message(self): message = next(queue_client.receive_messages()) queue_client.delete_message(message) - messages = queue_client.receive_messages(messages_per_page=32) - next(messages) + messages_pager = queue_client.receive_messages(messages_per_page=32) + messages = list(messages_pager) # Asserts - self.assertIsNotNone(messages) - self.assertEqual(3, len(messages.current_page)) + assert messages is not None + assert len(messages) == 3 @record def test_update_message(self): From 4c4b583c509bec2d41be09d96b4692034c328c1b Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 15:48:49 -0700 Subject: [PATCH 077/244] get rid of should only propagate (#6497) --- .../pipeline/policies/distributed_tracing.py | 8 +----- sdk/core/azure-core/azure/core/settings.py | 4 --- .../azure-core/azure/core/tracing/common.py | 7 ----- .../azure/core/tracing/decorator.py | 2 +- .../azure/core/tracing/decorator_async.py | 2 +- .../test_tracing_decorator_async.py | 20 -------------- sdk/core/azure-core/tests/test_settings.py | 6 ++--- .../tests/test_tracing_decorator.py | 27 ------------------- .../azure-core/tests/test_tracing_policy.py | 6 +++-- sdk/core/azure-core/tests/tracing_common.py | 6 +---- 10 files changed, 10 insertions(+), 78 deletions(-) diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/distributed_tracing.py b/sdk/core/azure-core/azure/core/pipeline/policies/distributed_tracing.py index 229b7d4380b5..ee6c1a36109f 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/distributed_tracing.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/distributed_tracing.py @@ -77,11 +77,6 @@ def on_request(self, request): if parent_span is None: return - only_propagate = settings.tracing_should_only_propagate() - if only_propagate: - self.set_header(request, parent_span) - return - path = urlparse(request.http_request.url).path if not path: path = "/" @@ -96,8 +91,7 @@ def end_span(self, request, response=None): # type: (HttpRequest, Optional[HttpResponse]) -> None """Ends the span that is tracing the network and updates its status.""" span = tracing_context.current_span.get() # type: AbstractSpan - only_propagate = settings.tracing_should_only_propagate() - if span and not only_propagate: + if span is not None: span.set_http_attributes(request, response=response) request_id = request.headers.get(self._request_id) if request_id is not None: diff --git a/sdk/core/azure-core/azure/core/settings.py b/sdk/core/azure-core/azure/core/settings.py index e1b4c738cdb8..6bc71c9e850c 100644 --- a/sdk/core/azure-core/azure/core/settings.py +++ b/sdk/core/azure-core/azure/core/settings.py @@ -410,9 +410,5 @@ def _config(self, props): # pylint: disable=no-self-use "tracing_implementation", env_var="AZURE_SDK_TRACING_IMPLEMENTATION", convert=convert_tracing_impl, default=None ) - tracing_should_only_propagate = PrioritizedSetting( - "tracing_should_only_propagate", env_var="AZURE_TRACING_ONLY_PROPAGATE", convert=convert_bool, default=False - ) - settings = Settings() diff --git a/sdk/core/azure-core/azure/core/tracing/common.py b/sdk/core/azure-core/azure/core/tracing/common.py index f6e4716a2eb8..b0e425a14d10 100644 --- a/sdk/core/azure-core/azure/core/tracing/common.py +++ b/sdk/core/azure-core/azure/core/tracing/common.py @@ -83,10 +83,3 @@ def get_parent_span(parent_span): ) return parent_span - - -def should_use_trace(parent_span): - # type: (AbstractSpan) -> bool - """Given Parent Span Returns whether the function should be traced""" - only_propagate = settings.tracing_should_only_propagate() - return bool(parent_span and not only_propagate) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 9f647f3333c4..7d5d7bfce407 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if common.should_use_trace(parent_span): + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 1440f86525e2..781e20a6bef2 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if common.should_use_trace(parent_span): + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index 7fb903037d80..8b43ddf71a62 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -149,23 +149,3 @@ async def test_span_with_opencensus_complicated(value): assert parent.children[3].children[1].span_data.name == "MockClient.make_request" children = parent.children[1].children assert len(children) == 2 - - -@pytest.mark.asyncio -async def test_should_only_propagate(): - with ContextHelper(should_only_propagate=True): - exporter = MockExporter() - trace = tracer_module.Tracer(sampler=AlwaysOnSampler(), exporter=exporter) - with trace.start_span(name="OverAll") as parent: - client = MockClient() - await client.make_request(2) - with trace.span("child") as child: - await client.make_request(2, parent_span=parent) - assert OpenCensusSpan.get_current_span() == child - await client.make_request(2) - trace.finish() - exporter.build_tree() - parent = exporter.root - assert len(parent.children) == 1 - assert parent.children[0].span_data.name == "child" - assert not parent.children[0].children diff --git a/sdk/core/azure-core/tests/test_settings.py b/sdk/core/azure-core/tests/test_settings.py index 11e9dc48d523..1975c1adc6f3 100644 --- a/sdk/core/azure-core/tests/test_settings.py +++ b/sdk/core/azure-core/tests/test_settings.py @@ -217,20 +217,18 @@ def test_defaults(self): val = m.settings.defaults # assert isinstance(val, tuple) defaults = m.settings.config( - log_level=20, tracing_enabled=False, tracing_implementation=None, tracing_should_only_propagate=False + log_level=20, tracing_enabled=False, tracing_implementation=None ) assert val.log_level == defaults.log_level assert val.tracing_enabled == defaults.tracing_enabled assert val.tracing_implementation == defaults.tracing_implementation - assert val.tracing_should_only_propagate == defaults.tracing_should_only_propagate os.environ["AZURE_LOG_LEVEL"] = "debug" defaults = m.settings.config( - log_level=20, tracing_enabled=False, tracing_implementation=None, tracing_should_only_propagate=False + log_level=20, tracing_enabled=False, tracing_implementation=None ) assert val.log_level == defaults.log_level assert val.tracing_enabled == defaults.tracing_enabled assert val.tracing_implementation == defaults.tracing_implementation - assert val.tracing_should_only_propagate == defaults.tracing_should_only_propagate del os.environ["AZURE_LOG_LEVEL"] def test_current(self): diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index 873871f5b222..473060f6097a 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -105,15 +105,6 @@ def test_get_parent_span(self): should_be_old_parent = common.get_parent_span(parent.span_instance) assert should_be_old_parent.span_instance == parent.span_instance - def test_should_use_trace(self): - with ContextHelper(environ={"AZURE_TRACING_ONLY_PROPAGATE": "yes"}): - parent_span = OpenCensusSpan() - assert not common.should_use_trace(parent_span) - assert not common.should_use_trace(None) - parent_span = OpenCensusSpan() - assert common.should_use_trace(parent_span) - assert not common.should_use_trace(None) - class TestDecorator(object): def test_decorator_has_different_name(self): @@ -190,21 +181,3 @@ def test_span_with_opencensus_complicated(self, value): assert parent.children[3].children[1].span_data.name == "MockClient.make_request" children = parent.children[1].children assert len(children) == 2 - - def test_should_only_propagate(self): - with ContextHelper(should_only_propagate=True): - exporter = MockExporter() - trace = tracer_module.Tracer(sampler=AlwaysOnSampler(), exporter=exporter) - with trace.start_span(name="OverAll") as parent: - client = MockClient() - client.make_request(2) - with trace.span("child") as child: - client.make_request(2, parent_span=parent) - assert OpenCensusSpan.get_current_span() == child - client.make_request(2) - trace.finish() - exporter.build_tree() - parent = exporter.root - assert len(parent.children) == 1 - assert parent.children[0].span_data.name == "child" - assert not parent.children[0].children diff --git a/sdk/core/azure-core/tests/test_tracing_policy.py b/sdk/core/azure-core/tests/test_tracing_policy.py index 450baa2f4f1e..be7e1adf98e9 100644 --- a/sdk/core/azure-core/tests/test_tracing_policy.py +++ b/sdk/core/azure-core/tests/test_tracing_policy.py @@ -72,13 +72,15 @@ def test_distributed_tracing_policy_solo(should_set_sdk_context): assert network_span.span_data.attributes.get("http.status_code") == 504 -def test_distributed_tracing_policy_with_user_agent(): +@pytest.mark.parametrize("should_set_sdk_context", [True, False]) +def test_distributed_tracing_policy_with_user_agent(should_set_sdk_context): """Test policy working with user agent.""" with ContextHelper(environ={"AZURE_HTTP_USER_AGENT": "mytools"}): exporter = MockExporter() trace = tracer_module.Tracer(sampler=AlwaysOnSampler(), exporter=exporter) with trace.span("parent"): - tracing_context.current_span.set(OpenCensusSpan(trace.current_span())) + if should_set_sdk_context: + tracing_context.current_span.set(OpenCensusSpan(trace.current_span())) policy = DistributedTracingPolicy() request = HttpRequest("GET", "http://127.0.0.1") diff --git a/sdk/core/azure-core/tests/tracing_common.py b/sdk/core/azure-core/tests/tracing_common.py index 18f9b4e9f839..7fecf1d746f8 100644 --- a/sdk/core/azure-core/tests/tracing_common.py +++ b/sdk/core/azure-core/tests/tracing_common.py @@ -22,13 +22,12 @@ class ContextHelper(object): - def __init__(self, environ={}, tracer_to_use=None, should_only_propagate=None): + def __init__(self, environ={}, tracer_to_use=None): self.orig_tracer = OpenCensusSpan.get_current_tracer() self.orig_current_span = OpenCensusSpan.get_current_span() self.orig_sdk_context_span = tracing_context.current_span.get() self.os_env = mock.patch.dict(os.environ, environ) self.tracer_to_use = tracer_to_use - self.should_only_propagate = should_only_propagate def __enter__(self): self.orig_tracer = OpenCensusSpan.get_current_tracer() @@ -38,8 +37,6 @@ def __enter__(self): tracing_context.current_span.clear() if self.tracer_to_use is not None: settings.tracing_implementation.set_value(self.tracer_to_use) - if self.should_only_propagate is not None: - settings.tracing_should_only_propagate.set_value(self.should_only_propagate) self.os_env.start() execution_context.clear() tracing_context.current_span.clear() @@ -50,7 +47,6 @@ def __exit__(self, exc_type, exc_val, exc_tb): OpenCensusSpan.set_current_span(self.orig_current_span) tracing_context.current_span.set(self.orig_sdk_context_span) settings.tracing_implementation.unset_value() - settings.tracing_should_only_propagate.unset_value() self.os_env.stop() From 8fff8baf8f1fd60ddcf289222018809520b75295 Mon Sep 17 00:00:00 2001 From: Dan Schulte Date: Thu, 25 Jul 2019 18:49:01 -0700 Subject: [PATCH 078/244] Enable SDK Automation pull requests (#6498) --- swagger_to_sdk_config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swagger_to_sdk_config.json b/swagger_to_sdk_config.json index 4bad085c48f9..bae8c63cefa0 100644 --- a/swagger_to_sdk_config.json +++ b/swagger_to_sdk_config.json @@ -1,5 +1,5 @@ { - "$schema": "https://openapistoragetest.blob.core.windows.net/sdkautomation/test/schemas/swagger_to_sdk_config.schema.json", + "$schema": "https://openapistorageprod.blob.core.windows.net/sdkautomation/prod/schemas/swagger_to_sdk_config.schema.json", "meta": { "autorest_options": { "version": "preview", From e7c9a320888cc6c8483e08e07e7b4a87de02e7c3 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 26 Jul 2019 02:57:37 -0700 Subject: [PATCH 079/244] [AutoPR] devtestlabs/resource-manager (#6414) * [AutoPR devtestlabs/resource-manager] [Hub Generated] Review request for Microsoft.DevTestLab to add version stable/2018-09-15 (#6359) * Generated from c64177b58d5905986be6a16e270986ccfad08d25 Modification of PATCH description, plus minor fixes * Packaging update of azure-mgmt-devtestlabs * Generated from c2786532a6bf80ceb9cddda5e2c8b8abc09d6b30 Update specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/DTL.json Co-Authored-By: Nick Schonning * modified history and version * Added general breaking changes note * fixed indentation --- .../azure-mgmt-devtestlabs/HISTORY.rst | 19 + .../azure-mgmt-devtestlabs/MANIFEST.in | 1 + .../azure-mgmt-devtestlabs/README.rst | 2 +- .../azure/mgmt/devtestlabs/__init__.py | 7 +- .../azure/mgmt/devtestlabs/_configuration.py | 48 + ...abs_client.py => _dev_test_labs_client.py} | 86 +- .../azure/mgmt/devtestlabs/models/__init__.py | 744 ++- ...nums.py => _dev_test_labs_client_enums.py} | 2 + .../azure/mgmt/devtestlabs/models/_models.py | 5702 +++++++++++++++++ .../mgmt/devtestlabs/models/_models_py3.py | 5702 +++++++++++++++++ .../mgmt/devtestlabs/models/_paged_models.py | 261 + .../devtestlabs/models/applicable_schedule.py | 59 - .../models/applicable_schedule_fragment.py | 38 - .../applicable_schedule_fragment_py3.py | 38 - .../models/applicable_schedule_py3.py | 59 - .../models/apply_artifacts_request.py | 29 - .../models/apply_artifacts_request_py3.py | 29 - .../mgmt/devtestlabs/models/arm_template.py | 90 - .../devtestlabs/models/arm_template_info.py | 32 - .../models/arm_template_info_py3.py | 32 - .../devtestlabs/models/arm_template_paged.py | 27 - .../arm_template_parameter_properties.py | 32 - ..._template_parameter_properties_fragment.py | 32 - ...plate_parameter_properties_fragment_py3.py | 32 - .../arm_template_parameter_properties_py3.py | 32 - .../devtestlabs/models/arm_template_py3.py | 90 - .../azure/mgmt/devtestlabs/models/artifact.py | 88 - .../artifact_deployment_status_properties.py | 38 - ...t_deployment_status_properties_fragment.py | 38 - ...ployment_status_properties_fragment_py3.py | 38 - ...tifact_deployment_status_properties_py3.py | 38 - .../models/artifact_install_properties.py | 55 - .../artifact_install_properties_fragment.py | 55 - ...rtifact_install_properties_fragment_py3.py | 55 - .../models/artifact_install_properties_py3.py | 55 - .../mgmt/devtestlabs/models/artifact_paged.py | 27 - .../models/artifact_parameter_properties.py | 32 - .../artifact_parameter_properties_fragment.py | 32 - ...ifact_parameter_properties_fragment_py3.py | 32 - .../artifact_parameter_properties_py3.py | 32 - .../mgmt/devtestlabs/models/artifact_py3.py | 88 - .../devtestlabs/models/artifact_source.py | 100 - .../models/artifact_source_fragment.py | 63 - .../models/artifact_source_fragment_py3.py | 63 - .../models/artifact_source_paged.py | 27 - .../devtestlabs/models/artifact_source_py3.py | 100 - .../models/attach_disk_properties.py | 29 - .../models/attach_disk_properties_py3.py | 29 - .../models/attach_new_data_disk_options.py | 37 - .../attach_new_data_disk_options_fragment.py | 37 - ...tach_new_data_disk_options_fragment_py3.py | 37 - .../attach_new_data_disk_options_py3.py | 37 - .../models/bulk_creation_parameters.py | 28 - .../bulk_creation_parameters_fragment.py | 28 - .../bulk_creation_parameters_fragment_py3.py | 28 - .../models/bulk_creation_parameters_py3.py | 28 - .../devtestlabs/models/compute_data_disk.py | 41 - .../models/compute_data_disk_fragment.py | 41 - .../models/compute_data_disk_fragment_py3.py | 41 - .../models/compute_data_disk_py3.py | 41 - .../models/compute_vm_instance_view_status.py | 36 - ...ompute_vm_instance_view_status_fragment.py | 36 - ...te_vm_instance_view_status_fragment_py3.py | 36 - .../compute_vm_instance_view_status_py3.py | 36 - .../models/compute_vm_properties.py | 54 - .../models/compute_vm_properties_fragment.py | 55 - .../compute_vm_properties_fragment_py3.py | 55 - .../models/compute_vm_properties_py3.py | 54 - .../models/cost_threshold_properties.py | 51 - .../models/cost_threshold_properties_py3.py | 51 - .../mgmt/devtestlabs/models/custom_image.py | 106 - .../models/custom_image_fragment.py | 71 - .../models/custom_image_fragment_py3.py | 71 - .../devtestlabs/models/custom_image_paged.py | 27 - .../models/custom_image_properties_custom.py | 43 - ...custom_image_properties_custom_fragment.py | 37 - ...om_image_properties_custom_fragment_py3.py | 37 - .../custom_image_properties_custom_py3.py | 43 - .../custom_image_properties_from_plan.py | 38 - ...tom_image_properties_from_plan_fragment.py | 38 - ...image_properties_from_plan_fragment_py3.py | 38 - .../custom_image_properties_from_plan_py3.py | 38 - .../models/custom_image_properties_from_vm.py | 36 - ...ustom_image_properties_from_vm_fragment.py | 37 - ...m_image_properties_from_vm_fragment_py3.py | 37 - .../custom_image_properties_from_vm_py3.py | 36 - .../devtestlabs/models/custom_image_py3.py | 106 - .../models/data_disk_properties.py | 41 - .../models/data_disk_properties_fragment.py | 41 - .../data_disk_properties_fragment_py3.py | 41 - .../models/data_disk_properties_py3.py | 41 - .../models/data_disk_storage_type_info.py | 33 - .../data_disk_storage_type_info_fragment.py | 33 - ...ata_disk_storage_type_info_fragment_py3.py | 33 - .../models/data_disk_storage_type_info_py3.py | 33 - .../mgmt/devtestlabs/models/day_details.py | 28 - .../models/day_details_fragment.py | 28 - .../models/day_details_fragment_py3.py | 28 - .../devtestlabs/models/day_details_py3.py | 28 - .../models/detach_data_disk_properties.py | 29 - .../models/detach_data_disk_properties_py3.py | 29 - .../models/detach_disk_properties.py | 29 - .../models/detach_disk_properties_py3.py | 29 - .../azure/mgmt/devtestlabs/models/disk.py | 97 - .../mgmt/devtestlabs/models/disk_fragment.py | 60 - .../devtestlabs/models/disk_fragment_py3.py | 60 - .../mgmt/devtestlabs/models/disk_paged.py | 27 - .../azure/mgmt/devtestlabs/models/disk_py3.py | 97 - .../devtestlabs/models/dtl_environment.py | 81 - .../models/dtl_environment_fragment.py | 38 - .../models/dtl_environment_fragment_py3.py | 38 - .../models/dtl_environment_paged.py | 27 - .../devtestlabs/models/dtl_environment_py3.py | 81 - .../environment_deployment_properties.py | 33 - ...ironment_deployment_properties_fragment.py | 33 - ...ment_deployment_properties_fragment_py3.py | 33 - .../environment_deployment_properties_py3.py | 33 - .../models/evaluate_policies_properties.py | 40 - .../evaluate_policies_properties_py3.py | 40 - .../models/evaluate_policies_request.py | 29 - .../models/evaluate_policies_request_py3.py | 29 - .../models/evaluate_policies_response.py | 28 - .../models/evaluate_policies_response_py3.py | 28 - .../azure/mgmt/devtestlabs/models/event.py | 30 - .../mgmt/devtestlabs/models/event_fragment.py | 30 - .../devtestlabs/models/event_fragment_py3.py | 30 - .../mgmt/devtestlabs/models/event_py3.py | 30 - .../export_resource_usage_parameters.py | 35 - .../export_resource_usage_parameters_py3.py | 35 - .../devtestlabs/models/external_subnet.py | 32 - .../models/external_subnet_fragment.py | 32 - .../models/external_subnet_fragment_py3.py | 32 - .../devtestlabs/models/external_subnet_py3.py | 32 - .../azure/mgmt/devtestlabs/models/formula.py | 85 - .../devtestlabs/models/formula_fragment.py | 48 - .../models/formula_fragment_py3.py | 48 - .../mgmt/devtestlabs/models/formula_paged.py | 27 - .../models/formula_properties_from_vm.py | 29 - .../formula_properties_from_vm_fragment.py | 29 - ...formula_properties_from_vm_fragment_py3.py | 29 - .../models/formula_properties_from_vm_py3.py | 29 - .../mgmt/devtestlabs/models/formula_py3.py | 85 - .../mgmt/devtestlabs/models/gallery_image.py | 83 - .../devtestlabs/models/gallery_image_paged.py | 27 - .../devtestlabs/models/gallery_image_py3.py | 83 - .../models/gallery_image_reference.py | 44 - .../gallery_image_reference_fragment.py | 44 - .../gallery_image_reference_fragment_py3.py | 44 - .../models/gallery_image_reference_py3.py | 44 - .../models/generate_arm_template_request.py | 43 - .../generate_arm_template_request_py3.py | 43 - .../models/generate_upload_uri_parameter.py | 28 - .../generate_upload_uri_parameter_py3.py | 28 - .../models/generate_upload_uri_response.py | 28 - .../generate_upload_uri_response_py3.py | 28 - .../mgmt/devtestlabs/models/hour_details.py | 28 - .../models/hour_details_fragment.py | 28 - .../models/hour_details_fragment_py3.py | 28 - .../devtestlabs/models/hour_details_py3.py | 28 - .../devtestlabs/models/identity_properties.py | 40 - .../models/identity_properties_py3.py | 40 - .../import_lab_virtual_machine_request.py | 35 - .../import_lab_virtual_machine_request_py3.py | 35 - .../devtestlabs/models/inbound_nat_rule.py | 42 - .../models/inbound_nat_rule_fragment.py | 42 - .../models/inbound_nat_rule_fragment_py3.py | 42 - .../models/inbound_nat_rule_py3.py | 42 - .../azure/mgmt/devtestlabs/models/lab.py | 165 - .../models/lab_announcement_properties.py | 64 - .../lab_announcement_properties_fragment.py | 47 - ...ab_announcement_properties_fragment_py3.py | 47 - .../models/lab_announcement_properties_py3.py | 64 - .../azure/mgmt/devtestlabs/models/lab_cost.py | 97 - .../models/lab_cost_details_properties.py | 37 - .../models/lab_cost_details_properties_py3.py | 37 - .../mgmt/devtestlabs/models/lab_cost_py3.py | 97 - .../models/lab_cost_summary_properties.py | 28 - .../models/lab_cost_summary_properties_py3.py | 28 - .../mgmt/devtestlabs/models/lab_fragment.py | 78 - .../devtestlabs/models/lab_fragment_py3.py | 78 - .../mgmt/devtestlabs/models/lab_paged.py | 27 - .../azure/mgmt/devtestlabs/models/lab_py3.py | 165 - .../models/lab_resource_cost_properties.py | 63 - .../lab_resource_cost_properties_py3.py | 63 - .../models/lab_support_properties.py | 34 - .../models/lab_support_properties_fragment.py | 34 - .../lab_support_properties_fragment_py3.py | 34 - .../models/lab_support_properties_py3.py | 34 - .../azure/mgmt/devtestlabs/models/lab_vhd.py | 28 - .../mgmt/devtestlabs/models/lab_vhd_paged.py | 27 - .../mgmt/devtestlabs/models/lab_vhd_py3.py | 28 - .../devtestlabs/models/lab_virtual_machine.py | 221 - .../lab_virtual_machine_creation_parameter.py | 192 - ...ual_machine_creation_parameter_fragment.py | 192 - ...machine_creation_parameter_fragment_py3.py | 192 - ..._virtual_machine_creation_parameter_py3.py | 192 - .../models/lab_virtual_machine_fragment.py | 177 - .../lab_virtual_machine_fragment_py3.py | 177 - .../models/lab_virtual_machine_paged.py | 27 - .../models/lab_virtual_machine_py3.py | 221 - .../mgmt/devtestlabs/models/linux_os_info.py | 30 - .../models/linux_os_info_fragment.py | 30 - .../models/linux_os_info_fragment_py3.py | 30 - .../devtestlabs/models/linux_os_info_py3.py | 30 - .../models/network_interface_properties.py | 65 - .../network_interface_properties_fragment.py | 65 - ...twork_interface_properties_fragment_py3.py | 65 - .../network_interface_properties_py3.py | 65 - .../models/notification_channel.py | 86 - .../models/notification_channel_fragment.py | 49 - .../notification_channel_fragment_py3.py | 49 - .../models/notification_channel_paged.py | 27 - .../models/notification_channel_py3.py | 86 - .../models/notification_settings.py | 49 - .../models/notification_settings_fragment.py | 49 - .../notification_settings_fragment_py3.py | 49 - .../models/notification_settings_py3.py | 49 - .../devtestlabs/models/notify_parameters.py | 34 - .../models/notify_parameters_py3.py | 34 - .../devtestlabs/models/operation_error.py | 32 - .../devtestlabs/models/operation_error_py3.py | 32 - .../devtestlabs/models/operation_metadata.py | 32 - .../models/operation_metadata_display.py | 41 - .../models/operation_metadata_display_py3.py | 41 - .../models/operation_metadata_paged.py | 27 - .../models/operation_metadata_py3.py | 32 - .../devtestlabs/models/operation_result.py | 48 - .../models/operation_result_py3.py | 48 - .../mgmt/devtestlabs/models/parameter_info.py | 32 - .../devtestlabs/models/parameter_info_py3.py | 32 - .../models/parameters_value_file_info.py | 32 - .../models/parameters_value_file_info_py3.py | 32 - .../percentage_cost_threshold_properties.py | 28 - ...ercentage_cost_threshold_properties_py3.py | 28 - .../azure/mgmt/devtestlabs/models/policy.py | 97 - .../devtestlabs/models/policy_fragment.py | 60 - .../devtestlabs/models/policy_fragment_py3.py | 60 - .../mgmt/devtestlabs/models/policy_paged.py | 27 - .../mgmt/devtestlabs/models/policy_py3.py | 97 - .../devtestlabs/models/policy_set_result.py | 34 - .../models/policy_set_result_py3.py | 34 - .../devtestlabs/models/policy_violation.py | 32 - .../models/policy_violation_py3.py | 32 - .../azure/mgmt/devtestlabs/models/port.py | 34 - .../mgmt/devtestlabs/models/port_fragment.py | 34 - .../devtestlabs/models/port_fragment_py3.py | 34 - .../azure/mgmt/devtestlabs/models/port_py3.py | 34 - .../mgmt/devtestlabs/models/rdp_connection.py | 28 - .../devtestlabs/models/rdp_connection_py3.py | 28 - .../resize_lab_virtual_machine_properties.py | 28 - ...size_lab_virtual_machine_properties_py3.py | 28 - .../azure/mgmt/devtestlabs/models/resource.py | 53 - .../mgmt/devtestlabs/models/resource_py3.py | 53 - .../models/retarget_schedule_properties.py | 34 - .../retarget_schedule_properties_py3.py | 34 - .../azure/mgmt/devtestlabs/models/schedule.py | 102 - .../models/schedule_creation_parameter.py | 74 - .../schedule_creation_parameter_fragment.py | 76 - ...chedule_creation_parameter_fragment_py3.py | 76 - .../models/schedule_creation_parameter_py3.py | 74 - .../devtestlabs/models/schedule_fragment.py | 67 - .../models/schedule_fragment_py3.py | 67 - .../mgmt/devtestlabs/models/schedule_paged.py | 27 - .../mgmt/devtestlabs/models/schedule_py3.py | 102 - .../azure/mgmt/devtestlabs/models/secret.py | 63 - .../devtestlabs/models/secret_fragment.py | 31 - .../devtestlabs/models/secret_fragment_py3.py | 31 - .../mgmt/devtestlabs/models/secret_paged.py | 27 - .../mgmt/devtestlabs/models/secret_py3.py | 63 - .../mgmt/devtestlabs/models/service_fabric.py | 76 - .../models/service_fabric_fragment.py | 37 - .../models/service_fabric_fragment_py3.py | 37 - .../models/service_fabric_paged.py | 27 - .../devtestlabs/models/service_fabric_py3.py | 76 - .../mgmt/devtestlabs/models/service_runner.py | 52 - .../models/service_runner_paged.py | 27 - .../devtestlabs/models/service_runner_py3.py | 52 - .../shared_public_ip_address_configuration.py | 30 - ...ublic_ip_address_configuration_fragment.py | 30 - ...c_ip_address_configuration_fragment_py3.py | 30 - ...red_public_ip_address_configuration_py3.py | 30 - .../models/shutdown_notification_content.py | 78 - .../shutdown_notification_content_py3.py | 78 - .../azure/mgmt/devtestlabs/models/subnet.py | 39 - .../devtestlabs/models/subnet_fragment.py | 39 - .../devtestlabs/models/subnet_fragment_py3.py | 39 - .../devtestlabs/models/subnet_override.py | 57 - .../models/subnet_override_fragment.py | 57 - .../models/subnet_override_fragment_py3.py | 57 - .../devtestlabs/models/subnet_override_py3.py | 57 - .../mgmt/devtestlabs/models/subnet_py3.py | 39 - ..._shared_public_ip_address_configuration.py | 29 - ...ublic_ip_address_configuration_fragment.py | 29 - ...c_ip_address_configuration_fragment_py3.py | 29 - ...red_public_ip_address_configuration_py3.py | 29 - .../models/target_cost_properties.py | 51 - .../models/target_cost_properties_py3.py | 51 - .../devtestlabs/models/update_resource.py | 28 - .../devtestlabs/models/update_resource_py3.py | 28 - .../azure/mgmt/devtestlabs/models/user.py | 72 - .../mgmt/devtestlabs/models/user_fragment.py | 35 - .../devtestlabs/models/user_fragment_py3.py | 35 - .../mgmt/devtestlabs/models/user_identity.py | 49 - .../models/user_identity_fragment.py | 49 - .../models/user_identity_fragment_py3.py | 49 - .../devtestlabs/models/user_identity_py3.py | 49 - .../mgmt/devtestlabs/models/user_paged.py | 27 - .../azure/mgmt/devtestlabs/models/user_py3.py | 72 - .../devtestlabs/models/user_secret_store.py | 32 - .../models/user_secret_store_fragment.py | 32 - .../models/user_secret_store_fragment_py3.py | 32 - .../models/user_secret_store_py3.py | 32 - .../devtestlabs/models/virtual_network.py | 88 - .../models/virtual_network_fragment.py | 45 - .../models/virtual_network_fragment_py3.py | 45 - .../models/virtual_network_paged.py | 27 - .../devtestlabs/models/virtual_network_py3.py | 88 - .../mgmt/devtestlabs/models/week_details.py | 33 - .../models/week_details_fragment.py | 33 - .../models/week_details_fragment_py3.py | 33 - .../devtestlabs/models/week_details_py3.py | 33 - .../devtestlabs/models/windows_os_info.py | 31 - .../models/windows_os_info_fragment.py | 31 - .../models/windows_os_info_fragment_py3.py | 31 - .../devtestlabs/models/windows_os_info_py3.py | 31 - .../mgmt/devtestlabs/operations/__init__.py | 50 +- ...ations.py => _arm_templates_operations.py} | 19 +- ...ons.py => _artifact_sources_operations.py} | 22 +- ...operations.py => _artifacts_operations.py} | 18 +- ...sts_operations.py => _costs_operations.py} | 4 +- ...ations.py => _custom_images_operations.py} | 21 +- ...sks_operations.py => _disks_operations.py} | 20 +- ...rations.py => _environments_operations.py} | 21 +- ..._operations.py => _formulas_operations.py} | 23 +- ...tions.py => _gallery_images_operations.py} | 16 +- ...ons.py => _global_schedules_operations.py} | 36 +- ...labs_operations.py => _labs_operations.py} | 49 +- ...y => _notification_channels_operations.py} | 34 +- .../{operations.py => _operations.py} | 3 +- ..._operations.py => _policies_operations.py} | 22 +- ...erations.py => _policy_sets_operations.py} | 3 +- ..._operations.py => _provider_operations.py} | 16 +- ...operations.py => _schedules_operations.py} | 36 +- ...s_operations.py => _secrets_operations.py} | 20 +- ...> _service_fabric_schedules_operations.py} | 34 +- ...ions.py => _service_fabrics_operations.py} | 38 +- ...ions.py => _service_runners_operations.py} | 91 +- ...ers_operations.py => _users_operations.py} | 21 +- ... _virtual_machine_schedules_operations.py} | 22 +- ...ons.py => _virtual_machines_operations.py} | 25 +- ...ons.py => _virtual_networks_operations.py} | 21 +- .../azure/mgmt/devtestlabs/version.py | 2 +- .../azure-mgmt-devtestlabs/setup.py | 2 +- 353 files changed, 12470 insertions(+), 16125 deletions(-) create mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_configuration.py rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/{dev_test_labs_client.py => _dev_test_labs_client.py} (72%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/{dev_test_labs_client_enums.py => _dev_test_labs_client_enums.py} (98%) create mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models.py create mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models_py3.py create mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_paged_models.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_py3.py rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{arm_templates_operations.py => _arm_templates_operations.py} (95%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{artifact_sources_operations.py => _artifact_sources_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{artifacts_operations.py => _artifacts_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{costs_operations.py => _costs_operations.py} (98%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{custom_images_operations.py => _custom_images_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{disks_operations.py => _disks_operations.py} (98%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{environments_operations.py => _environments_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{formulas_operations.py => _formulas_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{gallery_images_operations.py => _gallery_images_operations.py} (93%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{global_schedules_operations.py => _global_schedules_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{labs_operations.py => _labs_operations.py} (98%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{notification_channels_operations.py => _notification_channels_operations.py} (96%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{operations.py => _operations.py} (96%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{policies_operations.py => _policies_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{policy_sets_operations.py => _policy_sets_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{provider_operations.py => _provider_operations.py} (90%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{schedules_operations.py => _schedules_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{secrets_operations.py => _secrets_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{service_fabric_schedules_operations.py => _service_fabric_schedules_operations.py} (96%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{service_fabrics_operations.py => _service_fabrics_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{service_runners_operations.py => _service_runners_operations.py} (71%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{users_operations.py => _users_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{virtual_machine_schedules_operations.py => _virtual_machine_schedules_operations.py} (98%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{virtual_machines_operations.py => _virtual_machines_operations.py} (99%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{virtual_networks_operations.py => _virtual_networks_operations.py} (97%) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/HISTORY.rst b/sdk/devtestlabs/azure-mgmt-devtestlabs/HISTORY.rst index ca00766f84e0..bfb266aba9c4 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/HISTORY.rst +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/HISTORY.rst @@ -3,6 +3,25 @@ Release History =============== +4.0.0 (2019-07-26) +++++++++++++++++++ + +**Breaking changes** + +- Removed operation ServiceRunnersOperations.list + +**General breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes if from some import. +In summary, some modules were incorrectly visible/importable and have been renamed. This fixed several issues caused by usage of classes that were not supposed to be used in the first place. + +- DevTestLabsClient cannot be imported from `azure.mgmt.devtestlabs.dev_test_labs_management_client` anymore (import from `azure.mgmt.devtestlabs` works like before) +- DevTestLabsManagementClientConfiguration import has been moved from `azure.mgmt.devtestlabs.dev_test_labs_management_client` to `azure.mgmt.devtestlabs` +- A model `MyClass` from a "models" sub-module cannot be imported anymore using `azure.mgmt.devtestlabs.models.my_class` (import from `azure.mgmt.devtestlabs.models` works like before) +- An operation class `MyClassOperations` from an `operations` sub-module cannot be imported anymore using `azure.mgmt.devtestlabs.operations.my_class_operations` (import from `azure.mgmt.devtestlabs.operations` works like before) + +Last but not least, HTTP connection pooling is now enabled by default. You should always use a client as a context manager, or call close(), or use no more than one client per process. + 3.0.0 (2019-02-07) ++++++++++++++++++ diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/MANIFEST.in b/sdk/devtestlabs/azure-mgmt-devtestlabs/MANIFEST.in index 6ceb27f7a96e..e4884efef41b 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/MANIFEST.in +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/MANIFEST.in @@ -1,3 +1,4 @@ +recursive-include tests *.py *.yaml include *.rst include azure/__init__.py include azure/mgmt/__init__.py diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/README.rst b/sdk/devtestlabs/azure-mgmt-devtestlabs/README.rst index 3b266c6e0f32..7863788f2412 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/README.rst +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure DevTestLabs Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/__init__.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/__init__.py index 18ce91ae3337..a60396771701 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/__init__.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .dev_test_labs_client import DevTestLabsClient -from .version import VERSION +from ._configuration import DevTestLabsClientConfiguration +from ._dev_test_labs_client import DevTestLabsClient +__all__ = ['DevTestLabsClient', 'DevTestLabsClientConfiguration'] -__all__ = ['DevTestLabsClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_configuration.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_configuration.py new file mode 100644 index 000000000000..ad4e6c48fb8d --- /dev/null +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_configuration.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class DevTestLabsClientConfiguration(AzureConfiguration): + """Configuration for DevTestLabsClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(DevTestLabsClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-devtestlabs/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/dev_test_labs_client.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_dev_test_labs_client.py similarity index 72% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/dev_test_labs_client.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_dev_test_labs_client.py index 74bdf0ef0fdc..aa051d2d128d 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/dev_test_labs_client.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_dev_test_labs_client.py @@ -11,66 +11,34 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.provider_operations import ProviderOperations -from .operations.labs_operations import LabsOperations -from .operations.operations import Operations -from .operations.global_schedules_operations import GlobalSchedulesOperations -from .operations.artifact_sources_operations import ArtifactSourcesOperations -from .operations.arm_templates_operations import ArmTemplatesOperations -from .operations.artifacts_operations import ArtifactsOperations -from .operations.costs_operations import CostsOperations -from .operations.custom_images_operations import CustomImagesOperations -from .operations.formulas_operations import FormulasOperations -from .operations.gallery_images_operations import GalleryImagesOperations -from .operations.notification_channels_operations import NotificationChannelsOperations -from .operations.policy_sets_operations import PolicySetsOperations -from .operations.policies_operations import PoliciesOperations -from .operations.schedules_operations import SchedulesOperations -from .operations.service_runners_operations import ServiceRunnersOperations -from .operations.users_operations import UsersOperations -from .operations.disks_operations import DisksOperations -from .operations.environments_operations import EnvironmentsOperations -from .operations.secrets_operations import SecretsOperations -from .operations.service_fabrics_operations import ServiceFabricsOperations -from .operations.service_fabric_schedules_operations import ServiceFabricSchedulesOperations -from .operations.virtual_machines_operations import VirtualMachinesOperations -from .operations.virtual_machine_schedules_operations import VirtualMachineSchedulesOperations -from .operations.virtual_networks_operations import VirtualNetworksOperations -from . import models - - -class DevTestLabsClientConfiguration(AzureConfiguration): - """Configuration for DevTestLabsClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(DevTestLabsClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-devtestlabs/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import DevTestLabsClientConfiguration +from .operations import ProviderOperations +from .operations import LabsOperations +from .operations import Operations +from .operations import GlobalSchedulesOperations +from .operations import ArtifactSourcesOperations +from .operations import ArmTemplatesOperations +from .operations import ArtifactsOperations +from .operations import CostsOperations +from .operations import CustomImagesOperations +from .operations import FormulasOperations +from .operations import GalleryImagesOperations +from .operations import NotificationChannelsOperations +from .operations import PolicySetsOperations +from .operations import PoliciesOperations +from .operations import SchedulesOperations +from .operations import ServiceRunnersOperations +from .operations import UsersOperations +from .operations import DisksOperations +from .operations import EnvironmentsOperations +from .operations import SecretsOperations +from .operations import ServiceFabricsOperations +from .operations import ServiceFabricSchedulesOperations +from .operations import VirtualMachinesOperations +from .operations import VirtualMachineSchedulesOperations +from .operations import VirtualNetworksOperations +from . import models class DevTestLabsClient(SDKClient): diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py index 56d0fd0fe73f..1bb40772c367 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py @@ -10,322 +10,321 @@ # -------------------------------------------------------------------------- try: - from .week_details_py3 import WeekDetails - from .day_details_py3 import DayDetails - from .hour_details_py3 import HourDetails - from .notification_settings_py3 import NotificationSettings - from .schedule_py3 import Schedule - from .applicable_schedule_py3 import ApplicableSchedule - from .week_details_fragment_py3 import WeekDetailsFragment - from .day_details_fragment_py3 import DayDetailsFragment - from .hour_details_fragment_py3 import HourDetailsFragment - from .notification_settings_fragment_py3 import NotificationSettingsFragment - from .schedule_fragment_py3 import ScheduleFragment - from .applicable_schedule_fragment_py3 import ApplicableScheduleFragment - from .artifact_parameter_properties_py3 import ArtifactParameterProperties - from .artifact_install_properties_py3 import ArtifactInstallProperties - from .apply_artifacts_request_py3 import ApplyArtifactsRequest - from .parameters_value_file_info_py3 import ParametersValueFileInfo - from .arm_template_py3 import ArmTemplate - from .arm_template_info_py3 import ArmTemplateInfo - from .arm_template_parameter_properties_py3 import ArmTemplateParameterProperties - from .arm_template_parameter_properties_fragment_py3 import ArmTemplateParameterPropertiesFragment - from .artifact_py3 import Artifact - from .artifact_deployment_status_properties_py3 import ArtifactDeploymentStatusProperties - from .artifact_deployment_status_properties_fragment_py3 import ArtifactDeploymentStatusPropertiesFragment - from .artifact_parameter_properties_fragment_py3 import ArtifactParameterPropertiesFragment - from .artifact_install_properties_fragment_py3 import ArtifactInstallPropertiesFragment - from .artifact_source_py3 import ArtifactSource - from .artifact_source_fragment_py3 import ArtifactSourceFragment - from .attach_disk_properties_py3 import AttachDiskProperties - from .attach_new_data_disk_options_py3 import AttachNewDataDiskOptions - from .attach_new_data_disk_options_fragment_py3 import AttachNewDataDiskOptionsFragment - from .bulk_creation_parameters_py3 import BulkCreationParameters - from .bulk_creation_parameters_fragment_py3 import BulkCreationParametersFragment - from .compute_data_disk_py3 import ComputeDataDisk - from .compute_data_disk_fragment_py3 import ComputeDataDiskFragment - from .compute_vm_instance_view_status_py3 import ComputeVmInstanceViewStatus - from .compute_vm_instance_view_status_fragment_py3 import ComputeVmInstanceViewStatusFragment - from .compute_vm_properties_py3 import ComputeVmProperties - from .compute_vm_properties_fragment_py3 import ComputeVmPropertiesFragment - from .percentage_cost_threshold_properties_py3 import PercentageCostThresholdProperties - from .cost_threshold_properties_py3 import CostThresholdProperties - from .windows_os_info_py3 import WindowsOsInfo - from .linux_os_info_py3 import LinuxOsInfo - from .custom_image_properties_from_vm_py3 import CustomImagePropertiesFromVm - from .custom_image_properties_custom_py3 import CustomImagePropertiesCustom - from .data_disk_storage_type_info_py3 import DataDiskStorageTypeInfo - from .custom_image_properties_from_plan_py3 import CustomImagePropertiesFromPlan - from .custom_image_py3 import CustomImage - from .windows_os_info_fragment_py3 import WindowsOsInfoFragment - from .linux_os_info_fragment_py3 import LinuxOsInfoFragment - from .custom_image_properties_from_vm_fragment_py3 import CustomImagePropertiesFromVmFragment - from .custom_image_properties_custom_fragment_py3 import CustomImagePropertiesCustomFragment - from .data_disk_storage_type_info_fragment_py3 import DataDiskStorageTypeInfoFragment - from .custom_image_properties_from_plan_fragment_py3 import CustomImagePropertiesFromPlanFragment - from .custom_image_fragment_py3 import CustomImageFragment - from .data_disk_properties_py3 import DataDiskProperties - from .data_disk_properties_fragment_py3 import DataDiskPropertiesFragment - from .detach_data_disk_properties_py3 import DetachDataDiskProperties - from .detach_disk_properties_py3 import DetachDiskProperties - from .disk_py3 import Disk - from .disk_fragment_py3 import DiskFragment - from .environment_deployment_properties_py3 import EnvironmentDeploymentProperties - from .dtl_environment_py3 import DtlEnvironment - from .environment_deployment_properties_fragment_py3 import EnvironmentDeploymentPropertiesFragment - from .dtl_environment_fragment_py3 import DtlEnvironmentFragment - from .evaluate_policies_properties_py3 import EvaluatePoliciesProperties - from .evaluate_policies_request_py3 import EvaluatePoliciesRequest - from .policy_violation_py3 import PolicyViolation - from .policy_set_result_py3 import PolicySetResult - from .evaluate_policies_response_py3 import EvaluatePoliciesResponse - from .event_py3 import Event - from .event_fragment_py3 import EventFragment - from .export_resource_usage_parameters_py3 import ExportResourceUsageParameters - from .external_subnet_py3 import ExternalSubnet - from .external_subnet_fragment_py3 import ExternalSubnetFragment - from .gallery_image_reference_py3 import GalleryImageReference - from .inbound_nat_rule_py3 import InboundNatRule - from .shared_public_ip_address_configuration_py3 import SharedPublicIpAddressConfiguration - from .network_interface_properties_py3 import NetworkInterfaceProperties - from .schedule_creation_parameter_py3 import ScheduleCreationParameter - from .lab_virtual_machine_creation_parameter_py3 import LabVirtualMachineCreationParameter - from .formula_properties_from_vm_py3 import FormulaPropertiesFromVm - from .formula_py3 import Formula - from .gallery_image_reference_fragment_py3 import GalleryImageReferenceFragment - from .inbound_nat_rule_fragment_py3 import InboundNatRuleFragment - from .shared_public_ip_address_configuration_fragment_py3 import SharedPublicIpAddressConfigurationFragment - from .network_interface_properties_fragment_py3 import NetworkInterfacePropertiesFragment - from .schedule_creation_parameter_fragment_py3 import ScheduleCreationParameterFragment - from .lab_virtual_machine_creation_parameter_fragment_py3 import LabVirtualMachineCreationParameterFragment - from .formula_properties_from_vm_fragment_py3 import FormulaPropertiesFromVmFragment - from .formula_fragment_py3 import FormulaFragment - from .gallery_image_py3 import GalleryImage - from .parameter_info_py3 import ParameterInfo - from .generate_arm_template_request_py3 import GenerateArmTemplateRequest - from .generate_upload_uri_parameter_py3 import GenerateUploadUriParameter - from .generate_upload_uri_response_py3 import GenerateUploadUriResponse - from .identity_properties_py3 import IdentityProperties - from .import_lab_virtual_machine_request_py3 import ImportLabVirtualMachineRequest - from .lab_announcement_properties_py3 import LabAnnouncementProperties - from .lab_support_properties_py3 import LabSupportProperties - from .lab_py3 import Lab - from .lab_announcement_properties_fragment_py3 import LabAnnouncementPropertiesFragment - from .target_cost_properties_py3 import TargetCostProperties - from .lab_cost_summary_properties_py3 import LabCostSummaryProperties - from .lab_cost_details_properties_py3 import LabCostDetailsProperties - from .lab_resource_cost_properties_py3 import LabResourceCostProperties - from .lab_cost_py3 import LabCost - from .lab_support_properties_fragment_py3 import LabSupportPropertiesFragment - from .lab_fragment_py3 import LabFragment - from .lab_vhd_py3 import LabVhd - from .lab_virtual_machine_py3 import LabVirtualMachine - from .lab_virtual_machine_fragment_py3 import LabVirtualMachineFragment - from .notification_channel_py3 import NotificationChannel - from .notification_channel_fragment_py3 import NotificationChannelFragment - from .notify_parameters_py3 import NotifyParameters - from .operation_error_py3 import OperationError - from .operation_metadata_display_py3 import OperationMetadataDisplay - from .operation_metadata_py3 import OperationMetadata - from .operation_result_py3 import OperationResult - from .policy_py3 import Policy - from .policy_fragment_py3 import PolicyFragment - from .port_py3 import Port - from .port_fragment_py3 import PortFragment - from .rdp_connection_py3 import RdpConnection - from .resize_lab_virtual_machine_properties_py3 import ResizeLabVirtualMachineProperties - from .resource_py3 import Resource - from .retarget_schedule_properties_py3 import RetargetScheduleProperties - from .secret_py3 import Secret - from .secret_fragment_py3 import SecretFragment - from .service_fabric_py3 import ServiceFabric - from .service_fabric_fragment_py3 import ServiceFabricFragment - from .service_runner_py3 import ServiceRunner - from .shutdown_notification_content_py3 import ShutdownNotificationContent - from .subnet_py3 import Subnet - from .subnet_fragment_py3 import SubnetFragment - from .subnet_shared_public_ip_address_configuration_py3 import SubnetSharedPublicIpAddressConfiguration - from .subnet_override_py3 import SubnetOverride - from .subnet_shared_public_ip_address_configuration_fragment_py3 import SubnetSharedPublicIpAddressConfigurationFragment - from .subnet_override_fragment_py3 import SubnetOverrideFragment - from .update_resource_py3 import UpdateResource - from .user_identity_py3 import UserIdentity - from .user_secret_store_py3 import UserSecretStore - from .user_py3 import User - from .user_identity_fragment_py3 import UserIdentityFragment - from .user_secret_store_fragment_py3 import UserSecretStoreFragment - from .user_fragment_py3 import UserFragment - from .virtual_network_py3 import VirtualNetwork - from .virtual_network_fragment_py3 import VirtualNetworkFragment + from ._models_py3 import ApplicableSchedule + from ._models_py3 import ApplicableScheduleFragment + from ._models_py3 import ApplyArtifactsRequest + from ._models_py3 import ArmTemplate + from ._models_py3 import ArmTemplateInfo + from ._models_py3 import ArmTemplateParameterProperties + from ._models_py3 import ArmTemplateParameterPropertiesFragment + from ._models_py3 import Artifact + from ._models_py3 import ArtifactDeploymentStatusProperties + from ._models_py3 import ArtifactDeploymentStatusPropertiesFragment + from ._models_py3 import ArtifactInstallProperties + from ._models_py3 import ArtifactInstallPropertiesFragment + from ._models_py3 import ArtifactParameterProperties + from ._models_py3 import ArtifactParameterPropertiesFragment + from ._models_py3 import ArtifactSource + from ._models_py3 import ArtifactSourceFragment + from ._models_py3 import AttachDiskProperties + from ._models_py3 import AttachNewDataDiskOptions + from ._models_py3 import AttachNewDataDiskOptionsFragment + from ._models_py3 import BulkCreationParameters + from ._models_py3 import BulkCreationParametersFragment + from ._models_py3 import ComputeDataDisk + from ._models_py3 import ComputeDataDiskFragment + from ._models_py3 import ComputeVmInstanceViewStatus + from ._models_py3 import ComputeVmInstanceViewStatusFragment + from ._models_py3 import ComputeVmProperties + from ._models_py3 import ComputeVmPropertiesFragment + from ._models_py3 import CostThresholdProperties + from ._models_py3 import CustomImage + from ._models_py3 import CustomImageFragment + from ._models_py3 import CustomImagePropertiesCustom + from ._models_py3 import CustomImagePropertiesCustomFragment + from ._models_py3 import CustomImagePropertiesFromPlan + from ._models_py3 import CustomImagePropertiesFromPlanFragment + from ._models_py3 import CustomImagePropertiesFromVm + from ._models_py3 import CustomImagePropertiesFromVmFragment + from ._models_py3 import DataDiskProperties + from ._models_py3 import DataDiskPropertiesFragment + from ._models_py3 import DataDiskStorageTypeInfo + from ._models_py3 import DataDiskStorageTypeInfoFragment + from ._models_py3 import DayDetails + from ._models_py3 import DayDetailsFragment + from ._models_py3 import DetachDataDiskProperties + from ._models_py3 import DetachDiskProperties + from ._models_py3 import Disk + from ._models_py3 import DiskFragment + from ._models_py3 import DtlEnvironment + from ._models_py3 import DtlEnvironmentFragment + from ._models_py3 import EnvironmentDeploymentProperties + from ._models_py3 import EnvironmentDeploymentPropertiesFragment + from ._models_py3 import EvaluatePoliciesProperties + from ._models_py3 import EvaluatePoliciesRequest + from ._models_py3 import EvaluatePoliciesResponse + from ._models_py3 import Event + from ._models_py3 import EventFragment + from ._models_py3 import ExportResourceUsageParameters + from ._models_py3 import ExternalSubnet + from ._models_py3 import ExternalSubnetFragment + from ._models_py3 import Formula + from ._models_py3 import FormulaFragment + from ._models_py3 import FormulaPropertiesFromVm + from ._models_py3 import FormulaPropertiesFromVmFragment + from ._models_py3 import GalleryImage + from ._models_py3 import GalleryImageReference + from ._models_py3 import GalleryImageReferenceFragment + from ._models_py3 import GenerateArmTemplateRequest + from ._models_py3 import GenerateUploadUriParameter + from ._models_py3 import GenerateUploadUriResponse + from ._models_py3 import HourDetails + from ._models_py3 import HourDetailsFragment + from ._models_py3 import IdentityProperties + from ._models_py3 import ImportLabVirtualMachineRequest + from ._models_py3 import InboundNatRule + from ._models_py3 import InboundNatRuleFragment + from ._models_py3 import Lab + from ._models_py3 import LabAnnouncementProperties + from ._models_py3 import LabAnnouncementPropertiesFragment + from ._models_py3 import LabCost + from ._models_py3 import LabCostDetailsProperties + from ._models_py3 import LabCostSummaryProperties + from ._models_py3 import LabFragment + from ._models_py3 import LabResourceCostProperties + from ._models_py3 import LabSupportProperties + from ._models_py3 import LabSupportPropertiesFragment + from ._models_py3 import LabVhd + from ._models_py3 import LabVirtualMachine + from ._models_py3 import LabVirtualMachineCreationParameter + from ._models_py3 import LabVirtualMachineCreationParameterFragment + from ._models_py3 import LabVirtualMachineFragment + from ._models_py3 import LinuxOsInfo + from ._models_py3 import LinuxOsInfoFragment + from ._models_py3 import NetworkInterfaceProperties + from ._models_py3 import NetworkInterfacePropertiesFragment + from ._models_py3 import NotificationChannel + from ._models_py3 import NotificationChannelFragment + from ._models_py3 import NotificationSettings + from ._models_py3 import NotificationSettingsFragment + from ._models_py3 import NotifyParameters + from ._models_py3 import OperationError + from ._models_py3 import OperationMetadata + from ._models_py3 import OperationMetadataDisplay + from ._models_py3 import OperationResult + from ._models_py3 import ParameterInfo + from ._models_py3 import ParametersValueFileInfo + from ._models_py3 import PercentageCostThresholdProperties + from ._models_py3 import Policy + from ._models_py3 import PolicyFragment + from ._models_py3 import PolicySetResult + from ._models_py3 import PolicyViolation + from ._models_py3 import Port + from ._models_py3 import PortFragment + from ._models_py3 import RdpConnection + from ._models_py3 import ResizeLabVirtualMachineProperties + from ._models_py3 import Resource + from ._models_py3 import RetargetScheduleProperties + from ._models_py3 import Schedule + from ._models_py3 import ScheduleCreationParameter + from ._models_py3 import ScheduleCreationParameterFragment + from ._models_py3 import ScheduleFragment + from ._models_py3 import Secret + from ._models_py3 import SecretFragment + from ._models_py3 import ServiceFabric + from ._models_py3 import ServiceFabricFragment + from ._models_py3 import ServiceRunner + from ._models_py3 import SharedPublicIpAddressConfiguration + from ._models_py3 import SharedPublicIpAddressConfigurationFragment + from ._models_py3 import ShutdownNotificationContent + from ._models_py3 import Subnet + from ._models_py3 import SubnetFragment + from ._models_py3 import SubnetOverride + from ._models_py3 import SubnetOverrideFragment + from ._models_py3 import SubnetSharedPublicIpAddressConfiguration + from ._models_py3 import SubnetSharedPublicIpAddressConfigurationFragment + from ._models_py3 import TargetCostProperties + from ._models_py3 import UpdateResource + from ._models_py3 import User + from ._models_py3 import UserFragment + from ._models_py3 import UserIdentity + from ._models_py3 import UserIdentityFragment + from ._models_py3 import UserSecretStore + from ._models_py3 import UserSecretStoreFragment + from ._models_py3 import VirtualNetwork + from ._models_py3 import VirtualNetworkFragment + from ._models_py3 import WeekDetails + from ._models_py3 import WeekDetailsFragment + from ._models_py3 import WindowsOsInfo + from ._models_py3 import WindowsOsInfoFragment except (SyntaxError, ImportError): - from .week_details import WeekDetails - from .day_details import DayDetails - from .hour_details import HourDetails - from .notification_settings import NotificationSettings - from .schedule import Schedule - from .applicable_schedule import ApplicableSchedule - from .week_details_fragment import WeekDetailsFragment - from .day_details_fragment import DayDetailsFragment - from .hour_details_fragment import HourDetailsFragment - from .notification_settings_fragment import NotificationSettingsFragment - from .schedule_fragment import ScheduleFragment - from .applicable_schedule_fragment import ApplicableScheduleFragment - from .artifact_parameter_properties import ArtifactParameterProperties - from .artifact_install_properties import ArtifactInstallProperties - from .apply_artifacts_request import ApplyArtifactsRequest - from .parameters_value_file_info import ParametersValueFileInfo - from .arm_template import ArmTemplate - from .arm_template_info import ArmTemplateInfo - from .arm_template_parameter_properties import ArmTemplateParameterProperties - from .arm_template_parameter_properties_fragment import ArmTemplateParameterPropertiesFragment - from .artifact import Artifact - from .artifact_deployment_status_properties import ArtifactDeploymentStatusProperties - from .artifact_deployment_status_properties_fragment import ArtifactDeploymentStatusPropertiesFragment - from .artifact_parameter_properties_fragment import ArtifactParameterPropertiesFragment - from .artifact_install_properties_fragment import ArtifactInstallPropertiesFragment - from .artifact_source import ArtifactSource - from .artifact_source_fragment import ArtifactSourceFragment - from .attach_disk_properties import AttachDiskProperties - from .attach_new_data_disk_options import AttachNewDataDiskOptions - from .attach_new_data_disk_options_fragment import AttachNewDataDiskOptionsFragment - from .bulk_creation_parameters import BulkCreationParameters - from .bulk_creation_parameters_fragment import BulkCreationParametersFragment - from .compute_data_disk import ComputeDataDisk - from .compute_data_disk_fragment import ComputeDataDiskFragment - from .compute_vm_instance_view_status import ComputeVmInstanceViewStatus - from .compute_vm_instance_view_status_fragment import ComputeVmInstanceViewStatusFragment - from .compute_vm_properties import ComputeVmProperties - from .compute_vm_properties_fragment import ComputeVmPropertiesFragment - from .percentage_cost_threshold_properties import PercentageCostThresholdProperties - from .cost_threshold_properties import CostThresholdProperties - from .windows_os_info import WindowsOsInfo - from .linux_os_info import LinuxOsInfo - from .custom_image_properties_from_vm import CustomImagePropertiesFromVm - from .custom_image_properties_custom import CustomImagePropertiesCustom - from .data_disk_storage_type_info import DataDiskStorageTypeInfo - from .custom_image_properties_from_plan import CustomImagePropertiesFromPlan - from .custom_image import CustomImage - from .windows_os_info_fragment import WindowsOsInfoFragment - from .linux_os_info_fragment import LinuxOsInfoFragment - from .custom_image_properties_from_vm_fragment import CustomImagePropertiesFromVmFragment - from .custom_image_properties_custom_fragment import CustomImagePropertiesCustomFragment - from .data_disk_storage_type_info_fragment import DataDiskStorageTypeInfoFragment - from .custom_image_properties_from_plan_fragment import CustomImagePropertiesFromPlanFragment - from .custom_image_fragment import CustomImageFragment - from .data_disk_properties import DataDiskProperties - from .data_disk_properties_fragment import DataDiskPropertiesFragment - from .detach_data_disk_properties import DetachDataDiskProperties - from .detach_disk_properties import DetachDiskProperties - from .disk import Disk - from .disk_fragment import DiskFragment - from .environment_deployment_properties import EnvironmentDeploymentProperties - from .dtl_environment import DtlEnvironment - from .environment_deployment_properties_fragment import EnvironmentDeploymentPropertiesFragment - from .dtl_environment_fragment import DtlEnvironmentFragment - from .evaluate_policies_properties import EvaluatePoliciesProperties - from .evaluate_policies_request import EvaluatePoliciesRequest - from .policy_violation import PolicyViolation - from .policy_set_result import PolicySetResult - from .evaluate_policies_response import EvaluatePoliciesResponse - from .event import Event - from .event_fragment import EventFragment - from .export_resource_usage_parameters import ExportResourceUsageParameters - from .external_subnet import ExternalSubnet - from .external_subnet_fragment import ExternalSubnetFragment - from .gallery_image_reference import GalleryImageReference - from .inbound_nat_rule import InboundNatRule - from .shared_public_ip_address_configuration import SharedPublicIpAddressConfiguration - from .network_interface_properties import NetworkInterfaceProperties - from .schedule_creation_parameter import ScheduleCreationParameter - from .lab_virtual_machine_creation_parameter import LabVirtualMachineCreationParameter - from .formula_properties_from_vm import FormulaPropertiesFromVm - from .formula import Formula - from .gallery_image_reference_fragment import GalleryImageReferenceFragment - from .inbound_nat_rule_fragment import InboundNatRuleFragment - from .shared_public_ip_address_configuration_fragment import SharedPublicIpAddressConfigurationFragment - from .network_interface_properties_fragment import NetworkInterfacePropertiesFragment - from .schedule_creation_parameter_fragment import ScheduleCreationParameterFragment - from .lab_virtual_machine_creation_parameter_fragment import LabVirtualMachineCreationParameterFragment - from .formula_properties_from_vm_fragment import FormulaPropertiesFromVmFragment - from .formula_fragment import FormulaFragment - from .gallery_image import GalleryImage - from .parameter_info import ParameterInfo - from .generate_arm_template_request import GenerateArmTemplateRequest - from .generate_upload_uri_parameter import GenerateUploadUriParameter - from .generate_upload_uri_response import GenerateUploadUriResponse - from .identity_properties import IdentityProperties - from .import_lab_virtual_machine_request import ImportLabVirtualMachineRequest - from .lab_announcement_properties import LabAnnouncementProperties - from .lab_support_properties import LabSupportProperties - from .lab import Lab - from .lab_announcement_properties_fragment import LabAnnouncementPropertiesFragment - from .target_cost_properties import TargetCostProperties - from .lab_cost_summary_properties import LabCostSummaryProperties - from .lab_cost_details_properties import LabCostDetailsProperties - from .lab_resource_cost_properties import LabResourceCostProperties - from .lab_cost import LabCost - from .lab_support_properties_fragment import LabSupportPropertiesFragment - from .lab_fragment import LabFragment - from .lab_vhd import LabVhd - from .lab_virtual_machine import LabVirtualMachine - from .lab_virtual_machine_fragment import LabVirtualMachineFragment - from .notification_channel import NotificationChannel - from .notification_channel_fragment import NotificationChannelFragment - from .notify_parameters import NotifyParameters - from .operation_error import OperationError - from .operation_metadata_display import OperationMetadataDisplay - from .operation_metadata import OperationMetadata - from .operation_result import OperationResult - from .policy import Policy - from .policy_fragment import PolicyFragment - from .port import Port - from .port_fragment import PortFragment - from .rdp_connection import RdpConnection - from .resize_lab_virtual_machine_properties import ResizeLabVirtualMachineProperties - from .resource import Resource - from .retarget_schedule_properties import RetargetScheduleProperties - from .secret import Secret - from .secret_fragment import SecretFragment - from .service_fabric import ServiceFabric - from .service_fabric_fragment import ServiceFabricFragment - from .service_runner import ServiceRunner - from .shutdown_notification_content import ShutdownNotificationContent - from .subnet import Subnet - from .subnet_fragment import SubnetFragment - from .subnet_shared_public_ip_address_configuration import SubnetSharedPublicIpAddressConfiguration - from .subnet_override import SubnetOverride - from .subnet_shared_public_ip_address_configuration_fragment import SubnetSharedPublicIpAddressConfigurationFragment - from .subnet_override_fragment import SubnetOverrideFragment - from .update_resource import UpdateResource - from .user_identity import UserIdentity - from .user_secret_store import UserSecretStore - from .user import User - from .user_identity_fragment import UserIdentityFragment - from .user_secret_store_fragment import UserSecretStoreFragment - from .user_fragment import UserFragment - from .virtual_network import VirtualNetwork - from .virtual_network_fragment import VirtualNetworkFragment -from .operation_metadata_paged import OperationMetadataPaged -from .lab_paged import LabPaged -from .lab_vhd_paged import LabVhdPaged -from .schedule_paged import SchedulePaged -from .artifact_source_paged import ArtifactSourcePaged -from .arm_template_paged import ArmTemplatePaged -from .artifact_paged import ArtifactPaged -from .custom_image_paged import CustomImagePaged -from .formula_paged import FormulaPaged -from .gallery_image_paged import GalleryImagePaged -from .notification_channel_paged import NotificationChannelPaged -from .policy_paged import PolicyPaged -from .service_runner_paged import ServiceRunnerPaged -from .user_paged import UserPaged -from .disk_paged import DiskPaged -from .dtl_environment_paged import DtlEnvironmentPaged -from .secret_paged import SecretPaged -from .service_fabric_paged import ServiceFabricPaged -from .lab_virtual_machine_paged import LabVirtualMachinePaged -from .virtual_network_paged import VirtualNetworkPaged -from .dev_test_labs_client_enums import ( + from ._models import ApplicableSchedule + from ._models import ApplicableScheduleFragment + from ._models import ApplyArtifactsRequest + from ._models import ArmTemplate + from ._models import ArmTemplateInfo + from ._models import ArmTemplateParameterProperties + from ._models import ArmTemplateParameterPropertiesFragment + from ._models import Artifact + from ._models import ArtifactDeploymentStatusProperties + from ._models import ArtifactDeploymentStatusPropertiesFragment + from ._models import ArtifactInstallProperties + from ._models import ArtifactInstallPropertiesFragment + from ._models import ArtifactParameterProperties + from ._models import ArtifactParameterPropertiesFragment + from ._models import ArtifactSource + from ._models import ArtifactSourceFragment + from ._models import AttachDiskProperties + from ._models import AttachNewDataDiskOptions + from ._models import AttachNewDataDiskOptionsFragment + from ._models import BulkCreationParameters + from ._models import BulkCreationParametersFragment + from ._models import ComputeDataDisk + from ._models import ComputeDataDiskFragment + from ._models import ComputeVmInstanceViewStatus + from ._models import ComputeVmInstanceViewStatusFragment + from ._models import ComputeVmProperties + from ._models import ComputeVmPropertiesFragment + from ._models import CostThresholdProperties + from ._models import CustomImage + from ._models import CustomImageFragment + from ._models import CustomImagePropertiesCustom + from ._models import CustomImagePropertiesCustomFragment + from ._models import CustomImagePropertiesFromPlan + from ._models import CustomImagePropertiesFromPlanFragment + from ._models import CustomImagePropertiesFromVm + from ._models import CustomImagePropertiesFromVmFragment + from ._models import DataDiskProperties + from ._models import DataDiskPropertiesFragment + from ._models import DataDiskStorageTypeInfo + from ._models import DataDiskStorageTypeInfoFragment + from ._models import DayDetails + from ._models import DayDetailsFragment + from ._models import DetachDataDiskProperties + from ._models import DetachDiskProperties + from ._models import Disk + from ._models import DiskFragment + from ._models import DtlEnvironment + from ._models import DtlEnvironmentFragment + from ._models import EnvironmentDeploymentProperties + from ._models import EnvironmentDeploymentPropertiesFragment + from ._models import EvaluatePoliciesProperties + from ._models import EvaluatePoliciesRequest + from ._models import EvaluatePoliciesResponse + from ._models import Event + from ._models import EventFragment + from ._models import ExportResourceUsageParameters + from ._models import ExternalSubnet + from ._models import ExternalSubnetFragment + from ._models import Formula + from ._models import FormulaFragment + from ._models import FormulaPropertiesFromVm + from ._models import FormulaPropertiesFromVmFragment + from ._models import GalleryImage + from ._models import GalleryImageReference + from ._models import GalleryImageReferenceFragment + from ._models import GenerateArmTemplateRequest + from ._models import GenerateUploadUriParameter + from ._models import GenerateUploadUriResponse + from ._models import HourDetails + from ._models import HourDetailsFragment + from ._models import IdentityProperties + from ._models import ImportLabVirtualMachineRequest + from ._models import InboundNatRule + from ._models import InboundNatRuleFragment + from ._models import Lab + from ._models import LabAnnouncementProperties + from ._models import LabAnnouncementPropertiesFragment + from ._models import LabCost + from ._models import LabCostDetailsProperties + from ._models import LabCostSummaryProperties + from ._models import LabFragment + from ._models import LabResourceCostProperties + from ._models import LabSupportProperties + from ._models import LabSupportPropertiesFragment + from ._models import LabVhd + from ._models import LabVirtualMachine + from ._models import LabVirtualMachineCreationParameter + from ._models import LabVirtualMachineCreationParameterFragment + from ._models import LabVirtualMachineFragment + from ._models import LinuxOsInfo + from ._models import LinuxOsInfoFragment + from ._models import NetworkInterfaceProperties + from ._models import NetworkInterfacePropertiesFragment + from ._models import NotificationChannel + from ._models import NotificationChannelFragment + from ._models import NotificationSettings + from ._models import NotificationSettingsFragment + from ._models import NotifyParameters + from ._models import OperationError + from ._models import OperationMetadata + from ._models import OperationMetadataDisplay + from ._models import OperationResult + from ._models import ParameterInfo + from ._models import ParametersValueFileInfo + from ._models import PercentageCostThresholdProperties + from ._models import Policy + from ._models import PolicyFragment + from ._models import PolicySetResult + from ._models import PolicyViolation + from ._models import Port + from ._models import PortFragment + from ._models import RdpConnection + from ._models import ResizeLabVirtualMachineProperties + from ._models import Resource + from ._models import RetargetScheduleProperties + from ._models import Schedule + from ._models import ScheduleCreationParameter + from ._models import ScheduleCreationParameterFragment + from ._models import ScheduleFragment + from ._models import Secret + from ._models import SecretFragment + from ._models import ServiceFabric + from ._models import ServiceFabricFragment + from ._models import ServiceRunner + from ._models import SharedPublicIpAddressConfiguration + from ._models import SharedPublicIpAddressConfigurationFragment + from ._models import ShutdownNotificationContent + from ._models import Subnet + from ._models import SubnetFragment + from ._models import SubnetOverride + from ._models import SubnetOverrideFragment + from ._models import SubnetSharedPublicIpAddressConfiguration + from ._models import SubnetSharedPublicIpAddressConfigurationFragment + from ._models import TargetCostProperties + from ._models import UpdateResource + from ._models import User + from ._models import UserFragment + from ._models import UserIdentity + from ._models import UserIdentityFragment + from ._models import UserSecretStore + from ._models import UserSecretStoreFragment + from ._models import VirtualNetwork + from ._models import VirtualNetworkFragment + from ._models import WeekDetails + from ._models import WeekDetailsFragment + from ._models import WindowsOsInfo + from ._models import WindowsOsInfoFragment +from ._paged_models import ArmTemplatePaged +from ._paged_models import ArtifactPaged +from ._paged_models import ArtifactSourcePaged +from ._paged_models import CustomImagePaged +from ._paged_models import DiskPaged +from ._paged_models import DtlEnvironmentPaged +from ._paged_models import FormulaPaged +from ._paged_models import GalleryImagePaged +from ._paged_models import LabPaged +from ._paged_models import LabVhdPaged +from ._paged_models import LabVirtualMachinePaged +from ._paged_models import NotificationChannelPaged +from ._paged_models import OperationMetadataPaged +from ._paged_models import PolicyPaged +from ._paged_models import SchedulePaged +from ._paged_models import SecretPaged +from ._paged_models import ServiceFabricPaged +from ._paged_models import UserPaged +from ._paged_models import VirtualNetworkPaged +from ._dev_test_labs_client_enums import ( EnableStatus, SourceControlType, StorageType, @@ -351,22 +350,9 @@ ) __all__ = [ - 'WeekDetails', - 'DayDetails', - 'HourDetails', - 'NotificationSettings', - 'Schedule', 'ApplicableSchedule', - 'WeekDetailsFragment', - 'DayDetailsFragment', - 'HourDetailsFragment', - 'NotificationSettingsFragment', - 'ScheduleFragment', 'ApplicableScheduleFragment', - 'ArtifactParameterProperties', - 'ArtifactInstallProperties', 'ApplyArtifactsRequest', - 'ParametersValueFileInfo', 'ArmTemplate', 'ArmTemplateInfo', 'ArmTemplateParameterProperties', @@ -374,8 +360,10 @@ 'Artifact', 'ArtifactDeploymentStatusProperties', 'ArtifactDeploymentStatusPropertiesFragment', - 'ArtifactParameterPropertiesFragment', + 'ArtifactInstallProperties', 'ArtifactInstallPropertiesFragment', + 'ArtifactParameterProperties', + 'ArtifactParameterPropertiesFragment', 'ArtifactSource', 'ArtifactSourceFragment', 'AttachDiskProperties', @@ -389,115 +377,126 @@ 'ComputeVmInstanceViewStatusFragment', 'ComputeVmProperties', 'ComputeVmPropertiesFragment', - 'PercentageCostThresholdProperties', 'CostThresholdProperties', - 'WindowsOsInfo', - 'LinuxOsInfo', - 'CustomImagePropertiesFromVm', - 'CustomImagePropertiesCustom', - 'DataDiskStorageTypeInfo', - 'CustomImagePropertiesFromPlan', 'CustomImage', - 'WindowsOsInfoFragment', - 'LinuxOsInfoFragment', - 'CustomImagePropertiesFromVmFragment', + 'CustomImageFragment', + 'CustomImagePropertiesCustom', 'CustomImagePropertiesCustomFragment', - 'DataDiskStorageTypeInfoFragment', + 'CustomImagePropertiesFromPlan', 'CustomImagePropertiesFromPlanFragment', - 'CustomImageFragment', + 'CustomImagePropertiesFromVm', + 'CustomImagePropertiesFromVmFragment', 'DataDiskProperties', 'DataDiskPropertiesFragment', + 'DataDiskStorageTypeInfo', + 'DataDiskStorageTypeInfoFragment', + 'DayDetails', + 'DayDetailsFragment', 'DetachDataDiskProperties', 'DetachDiskProperties', 'Disk', 'DiskFragment', - 'EnvironmentDeploymentProperties', 'DtlEnvironment', - 'EnvironmentDeploymentPropertiesFragment', 'DtlEnvironmentFragment', + 'EnvironmentDeploymentProperties', + 'EnvironmentDeploymentPropertiesFragment', 'EvaluatePoliciesProperties', 'EvaluatePoliciesRequest', - 'PolicyViolation', - 'PolicySetResult', 'EvaluatePoliciesResponse', 'Event', 'EventFragment', 'ExportResourceUsageParameters', 'ExternalSubnet', 'ExternalSubnetFragment', - 'GalleryImageReference', - 'InboundNatRule', - 'SharedPublicIpAddressConfiguration', - 'NetworkInterfaceProperties', - 'ScheduleCreationParameter', - 'LabVirtualMachineCreationParameter', - 'FormulaPropertiesFromVm', 'Formula', - 'GalleryImageReferenceFragment', - 'InboundNatRuleFragment', - 'SharedPublicIpAddressConfigurationFragment', - 'NetworkInterfacePropertiesFragment', - 'ScheduleCreationParameterFragment', - 'LabVirtualMachineCreationParameterFragment', - 'FormulaPropertiesFromVmFragment', 'FormulaFragment', + 'FormulaPropertiesFromVm', + 'FormulaPropertiesFromVmFragment', 'GalleryImage', - 'ParameterInfo', + 'GalleryImageReference', + 'GalleryImageReferenceFragment', 'GenerateArmTemplateRequest', 'GenerateUploadUriParameter', 'GenerateUploadUriResponse', + 'HourDetails', + 'HourDetailsFragment', 'IdentityProperties', 'ImportLabVirtualMachineRequest', - 'LabAnnouncementProperties', - 'LabSupportProperties', + 'InboundNatRule', + 'InboundNatRuleFragment', 'Lab', + 'LabAnnouncementProperties', 'LabAnnouncementPropertiesFragment', - 'TargetCostProperties', - 'LabCostSummaryProperties', + 'LabCost', 'LabCostDetailsProperties', + 'LabCostSummaryProperties', + 'LabFragment', 'LabResourceCostProperties', - 'LabCost', + 'LabSupportProperties', 'LabSupportPropertiesFragment', - 'LabFragment', 'LabVhd', 'LabVirtualMachine', + 'LabVirtualMachineCreationParameter', + 'LabVirtualMachineCreationParameterFragment', 'LabVirtualMachineFragment', + 'LinuxOsInfo', + 'LinuxOsInfoFragment', + 'NetworkInterfaceProperties', + 'NetworkInterfacePropertiesFragment', 'NotificationChannel', 'NotificationChannelFragment', + 'NotificationSettings', + 'NotificationSettingsFragment', 'NotifyParameters', 'OperationError', - 'OperationMetadataDisplay', 'OperationMetadata', + 'OperationMetadataDisplay', 'OperationResult', + 'ParameterInfo', + 'ParametersValueFileInfo', + 'PercentageCostThresholdProperties', 'Policy', 'PolicyFragment', + 'PolicySetResult', + 'PolicyViolation', 'Port', 'PortFragment', 'RdpConnection', 'ResizeLabVirtualMachineProperties', 'Resource', 'RetargetScheduleProperties', + 'Schedule', + 'ScheduleCreationParameter', + 'ScheduleCreationParameterFragment', + 'ScheduleFragment', 'Secret', 'SecretFragment', 'ServiceFabric', 'ServiceFabricFragment', 'ServiceRunner', + 'SharedPublicIpAddressConfiguration', + 'SharedPublicIpAddressConfigurationFragment', 'ShutdownNotificationContent', 'Subnet', 'SubnetFragment', - 'SubnetSharedPublicIpAddressConfiguration', 'SubnetOverride', - 'SubnetSharedPublicIpAddressConfigurationFragment', 'SubnetOverrideFragment', + 'SubnetSharedPublicIpAddressConfiguration', + 'SubnetSharedPublicIpAddressConfigurationFragment', + 'TargetCostProperties', 'UpdateResource', - 'UserIdentity', - 'UserSecretStore', 'User', + 'UserFragment', + 'UserIdentity', 'UserIdentityFragment', + 'UserSecretStore', 'UserSecretStoreFragment', - 'UserFragment', 'VirtualNetwork', 'VirtualNetworkFragment', + 'WeekDetails', + 'WeekDetailsFragment', + 'WindowsOsInfo', + 'WindowsOsInfoFragment', 'OperationMetadataPaged', 'LabPaged', 'LabVhdPaged', @@ -510,7 +509,6 @@ 'GalleryImagePaged', 'NotificationChannelPaged', 'PolicyPaged', - 'ServiceRunnerPaged', 'UserPaged', 'DiskPaged', 'DtlEnvironmentPaged', diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dev_test_labs_client_enums.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_dev_test_labs_client_enums.py similarity index 98% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dev_test_labs_client_enums.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_dev_test_labs_client_enums.py index 035e4b81b91c..6a60d733ee01 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dev_test_labs_client_enums.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_dev_test_labs_client_enums.py @@ -28,6 +28,7 @@ class StorageType(str, Enum): standard = "Standard" premium = "Premium" + standard_ssd = "StandardSSD" class CostThresholdStatus(str, Enum): @@ -80,6 +81,7 @@ class VirtualMachineCreationSource(str, Enum): from_custom_image = "FromCustomImage" from_gallery_image = "FromGalleryImage" + from_shared_gallery_image = "FromSharedGalleryImage" class FileUploadOptions(str, Enum): diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models.py new file mode 100644 index 000000000000..cd489495c90c --- /dev/null +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models.py @@ -0,0 +1,5702 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Resource(Model): + """An Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ApplicableSchedule(Resource): + """Schedules applicable to a virtual machine. The schedules may have been + defined on a VM or on lab level. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set + at the lab or lab resource level. + :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.Schedule + :param lab_vms_startup: The auto-startup schedule, if one has been set at + the lab or lab resource level. + :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.Schedule + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'Schedule'}, + 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'Schedule'}, + } + + def __init__(self, **kwargs): + super(ApplicableSchedule, self).__init__(**kwargs) + self.lab_vms_shutdown = kwargs.get('lab_vms_shutdown', None) + self.lab_vms_startup = kwargs.get('lab_vms_startup', None) + + +class UpdateResource(Model): + """Represents an update resource. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(UpdateResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class ApplicableScheduleFragment(UpdateResource): + """Schedules applicable to a virtual machine. The schedules may have been + defined on a VM or on lab level. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set + at the lab or lab resource level. + :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.ScheduleFragment + :param lab_vms_startup: The auto-startup schedule, if one has been set at + the lab or lab resource level. + :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.ScheduleFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'ScheduleFragment'}, + 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'ScheduleFragment'}, + } + + def __init__(self, **kwargs): + super(ApplicableScheduleFragment, self).__init__(**kwargs) + self.lab_vms_shutdown = kwargs.get('lab_vms_shutdown', None) + self.lab_vms_startup = kwargs.get('lab_vms_startup', None) + + +class ApplyArtifactsRequest(Model): + """Request body for applying artifacts to a virtual machine. + + :param artifacts: The list of artifacts to apply. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + """ + + _attribute_map = { + 'artifacts': {'key': 'artifacts', 'type': '[ArtifactInstallProperties]'}, + } + + def __init__(self, **kwargs): + super(ApplyArtifactsRequest, self).__init__(**kwargs) + self.artifacts = kwargs.get('artifacts', None) + + +class ArmTemplate(Resource): + """An Azure Resource Manager template. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar display_name: The display name of the ARM template. + :vartype display_name: str + :ivar description: The description of the ARM template. + :vartype description: str + :ivar publisher: The publisher of the ARM template. + :vartype publisher: str + :ivar icon: The URI to the icon of the ARM template. + :vartype icon: str + :ivar contents: The contents of the ARM template. + :vartype contents: object + :ivar created_date: The creation date of the armTemplate. + :vartype created_date: datetime + :ivar parameters_value_files_info: File name and parameter values + information from all azuredeploy.*.parameters.json for the ARM template. + :vartype parameters_value_files_info: + list[~azure.mgmt.devtestlabs.models.ParametersValueFileInfo] + :ivar enabled: Whether or not ARM template is enabled for use by lab user. + :vartype enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'publisher': {'readonly': True}, + 'icon': {'readonly': True}, + 'contents': {'readonly': True}, + 'created_date': {'readonly': True}, + 'parameters_value_files_info': {'readonly': True}, + 'enabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'contents': {'key': 'properties.contents', 'type': 'object'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'parameters_value_files_info': {'key': 'properties.parametersValueFilesInfo', 'type': '[ParametersValueFileInfo]'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ArmTemplate, self).__init__(**kwargs) + self.display_name = None + self.description = None + self.publisher = None + self.icon = None + self.contents = None + self.created_date = None + self.parameters_value_files_info = None + self.enabled = None + + +class ArmTemplateInfo(Model): + """Information about a generated ARM template. + + :param template: The template's contents. + :type template: object + :param parameters: The parameters of the ARM template. + :type parameters: object + """ + + _attribute_map = { + 'template': {'key': 'template', 'type': 'object'}, + 'parameters': {'key': 'parameters', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ArmTemplateInfo, self).__init__(**kwargs) + self.template = kwargs.get('template', None) + self.parameters = kwargs.get('parameters', None) + + +class ArmTemplateParameterProperties(Model): + """Properties of an Azure Resource Manager template parameter. + + :param name: The name of the template parameter. + :type name: str + :param value: The value of the template parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArmTemplateParameterProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class ArmTemplateParameterPropertiesFragment(Model): + """Properties of an Azure Resource Manager template parameter. + + :param name: The name of the template parameter. + :type name: str + :param value: The value of the template parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArmTemplateParameterPropertiesFragment, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class Artifact(Resource): + """An artifact. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar title: The artifact's title. + :vartype title: str + :ivar description: The artifact's description. + :vartype description: str + :ivar publisher: The artifact's publisher. + :vartype publisher: str + :ivar file_path: The file path to the artifact. + :vartype file_path: str + :ivar icon: The URI to the artifact icon. + :vartype icon: str + :ivar target_os_type: The artifact's target OS. + :vartype target_os_type: str + :ivar parameters: The artifact's parameters. + :vartype parameters: object + :ivar created_date: The artifact's creation date. + :vartype created_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'title': {'readonly': True}, + 'description': {'readonly': True}, + 'publisher': {'readonly': True}, + 'file_path': {'readonly': True}, + 'icon': {'readonly': True}, + 'target_os_type': {'readonly': True}, + 'parameters': {'readonly': True}, + 'created_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'file_path': {'key': 'properties.filePath', 'type': 'str'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'target_os_type': {'key': 'properties.targetOsType', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': 'object'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(Artifact, self).__init__(**kwargs) + self.title = None + self.description = None + self.publisher = None + self.file_path = None + self.icon = None + self.target_os_type = None + self.parameters = None + self.created_date = None + + +class ArtifactDeploymentStatusProperties(Model): + """Properties of an artifact deployment. + + :param deployment_status: The deployment status of the artifact. + :type deployment_status: str + :param artifacts_applied: The total count of the artifacts that were + successfully applied. + :type artifacts_applied: int + :param total_artifacts: The total count of the artifacts that were + tentatively applied. + :type total_artifacts: int + """ + + _attribute_map = { + 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, + 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, + 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ArtifactDeploymentStatusProperties, self).__init__(**kwargs) + self.deployment_status = kwargs.get('deployment_status', None) + self.artifacts_applied = kwargs.get('artifacts_applied', None) + self.total_artifacts = kwargs.get('total_artifacts', None) + + +class ArtifactDeploymentStatusPropertiesFragment(Model): + """Properties of an artifact deployment. + + :param deployment_status: The deployment status of the artifact. + :type deployment_status: str + :param artifacts_applied: The total count of the artifacts that were + successfully applied. + :type artifacts_applied: int + :param total_artifacts: The total count of the artifacts that were + tentatively applied. + :type total_artifacts: int + """ + + _attribute_map = { + 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, + 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, + 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ArtifactDeploymentStatusPropertiesFragment, self).__init__(**kwargs) + self.deployment_status = kwargs.get('deployment_status', None) + self.artifacts_applied = kwargs.get('artifacts_applied', None) + self.total_artifacts = kwargs.get('total_artifacts', None) + + +class ArtifactInstallProperties(Model): + """Properties of an artifact. + + :param artifact_id: The artifact's identifier. + :type artifact_id: str + :param artifact_title: The artifact's title. + :type artifact_title: str + :param parameters: The parameters of the artifact. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArtifactParameterProperties] + :param status: The status of the artifact. + :type status: str + :param deployment_status_message: The status message from the deployment. + :type deployment_status_message: str + :param vm_extension_status_message: The status message from the virtual + machine extension. + :type vm_extension_status_message: str + :param install_time: The time that the artifact starts to install on the + virtual machine. + :type install_time: datetime + """ + + _attribute_map = { + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterProperties]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, + 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, + 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ArtifactInstallProperties, self).__init__(**kwargs) + self.artifact_id = kwargs.get('artifact_id', None) + self.artifact_title = kwargs.get('artifact_title', None) + self.parameters = kwargs.get('parameters', None) + self.status = kwargs.get('status', None) + self.deployment_status_message = kwargs.get('deployment_status_message', None) + self.vm_extension_status_message = kwargs.get('vm_extension_status_message', None) + self.install_time = kwargs.get('install_time', None) + + +class ArtifactInstallPropertiesFragment(Model): + """Properties of an artifact. + + :param artifact_id: The artifact's identifier. + :type artifact_id: str + :param artifact_title: The artifact's title. + :type artifact_title: str + :param parameters: The parameters of the artifact. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArtifactParameterPropertiesFragment] + :param status: The status of the artifact. + :type status: str + :param deployment_status_message: The status message from the deployment. + :type deployment_status_message: str + :param vm_extension_status_message: The status message from the virtual + machine extension. + :type vm_extension_status_message: str + :param install_time: The time that the artifact starts to install on the + virtual machine. + :type install_time: datetime + """ + + _attribute_map = { + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterPropertiesFragment]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, + 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, + 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ArtifactInstallPropertiesFragment, self).__init__(**kwargs) + self.artifact_id = kwargs.get('artifact_id', None) + self.artifact_title = kwargs.get('artifact_title', None) + self.parameters = kwargs.get('parameters', None) + self.status = kwargs.get('status', None) + self.deployment_status_message = kwargs.get('deployment_status_message', None) + self.vm_extension_status_message = kwargs.get('vm_extension_status_message', None) + self.install_time = kwargs.get('install_time', None) + + +class ArtifactParameterProperties(Model): + """Properties of an artifact parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArtifactParameterProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class ArtifactParameterPropertiesFragment(Model): + """Properties of an artifact parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArtifactParameterPropertiesFragment, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class ArtifactSource(Resource): + """Properties of an artifact source. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param display_name: The artifact source's display name. + :type display_name: str + :param uri: The artifact source's URI. + :type uri: str + :param source_type: The artifact source's type. Possible values include: + 'VsoGit', 'GitHub' + :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType + :param folder_path: The folder containing artifacts. + :type folder_path: str + :param arm_template_folder_path: The folder containing Azure Resource + Manager templates. + :type arm_template_folder_path: str + :param branch_ref: The artifact source's branch reference. + :type branch_ref: str + :param security_token: The security token to authenticate to the artifact + source. + :type security_token: str + :param status: Indicates if the artifact source is enabled (values: + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :ivar created_date: The artifact source's creation date. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, + 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, + 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArtifactSource, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.uri = kwargs.get('uri', None) + self.source_type = kwargs.get('source_type', None) + self.folder_path = kwargs.get('folder_path', None) + self.arm_template_folder_path = kwargs.get('arm_template_folder_path', None) + self.branch_ref = kwargs.get('branch_ref', None) + self.security_token = kwargs.get('security_token', None) + self.status = kwargs.get('status', None) + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class ArtifactSourceFragment(UpdateResource): + """Properties of an artifact source. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param display_name: The artifact source's display name. + :type display_name: str + :param uri: The artifact source's URI. + :type uri: str + :param source_type: The artifact source's type. Possible values include: + 'VsoGit', 'GitHub' + :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType + :param folder_path: The folder containing artifacts. + :type folder_path: str + :param arm_template_folder_path: The folder containing Azure Resource + Manager templates. + :type arm_template_folder_path: str + :param branch_ref: The artifact source's branch reference. + :type branch_ref: str + :param security_token: The security token to authenticate to the artifact + source. + :type security_token: str + :param status: Indicates if the artifact source is enabled (values: + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, + 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, + 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArtifactSourceFragment, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.uri = kwargs.get('uri', None) + self.source_type = kwargs.get('source_type', None) + self.folder_path = kwargs.get('folder_path', None) + self.arm_template_folder_path = kwargs.get('arm_template_folder_path', None) + self.branch_ref = kwargs.get('branch_ref', None) + self.security_token = kwargs.get('security_token', None) + self.status = kwargs.get('status', None) + + +class AttachDiskProperties(Model): + """Properties of the disk to attach. + + :param leased_by_lab_vm_id: The resource ID of the Lab virtual machine to + which the disk is attached. + :type leased_by_lab_vm_id: str + """ + + _attribute_map = { + 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AttachDiskProperties, self).__init__(**kwargs) + self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) + + +class AttachNewDataDiskOptions(Model): + """Properties to attach new disk to the Virtual Machine. + + :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :type disk_size_gi_b: int + :param disk_name: The name of the disk to be attached. + :type disk_name: str + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + 'disk_name': {'key': 'diskName', 'type': 'str'}, + 'disk_type': {'key': 'diskType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AttachNewDataDiskOptions, self).__init__(**kwargs) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + self.disk_name = kwargs.get('disk_name', None) + self.disk_type = kwargs.get('disk_type', None) + + +class AttachNewDataDiskOptionsFragment(Model): + """Properties to attach new disk to the Virtual Machine. + + :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :type disk_size_gi_b: int + :param disk_name: The name of the disk to be attached. + :type disk_name: str + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + 'disk_name': {'key': 'diskName', 'type': 'str'}, + 'disk_type': {'key': 'diskType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AttachNewDataDiskOptionsFragment, self).__init__(**kwargs) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + self.disk_name = kwargs.get('disk_name', None) + self.disk_type = kwargs.get('disk_type', None) + + +class BulkCreationParameters(Model): + """Parameters for creating multiple virtual machines as a single action. + + :param instance_count: The number of virtual machine instances to create. + :type instance_count: int + """ + + _attribute_map = { + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BulkCreationParameters, self).__init__(**kwargs) + self.instance_count = kwargs.get('instance_count', None) + + +class BulkCreationParametersFragment(Model): + """Parameters for creating multiple virtual machines as a single action. + + :param instance_count: The number of virtual machine instances to create. + :type instance_count: int + """ + + _attribute_map = { + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BulkCreationParametersFragment, self).__init__(**kwargs) + self.instance_count = kwargs.get('instance_count', None) + + +class CloudError(Model): + """Error from a REST request. + + :param error: The cloud error that occurred + :type error: ~azure.mgmt.devtestlabs.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, **kwargs): + super(CloudError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """Body of an error from a REST request. + + :param code: The error code. + :type code: str + :param message: The error message. + :type message: str + :param target: The error target. + :type target: str + :param details: Inner errors. + :type details: list[~azure.mgmt.devtestlabs.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, **kwargs): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class ComputeDataDisk(Model): + """A data disks attached to a virtual machine. + + :param name: Gets data disk name. + :type name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :param disk_size_gi_b: Gets data disk size in GiB. + :type disk_size_gi_b: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disk_uri': {'key': 'diskUri', 'type': 'str'}, + 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ComputeDataDisk, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.disk_uri = kwargs.get('disk_uri', None) + self.managed_disk_id = kwargs.get('managed_disk_id', None) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + + +class ComputeDataDiskFragment(Model): + """A data disks attached to a virtual machine. + + :param name: Gets data disk name. + :type name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :param disk_size_gi_b: Gets data disk size in GiB. + :type disk_size_gi_b: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disk_uri': {'key': 'diskUri', 'type': 'str'}, + 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ComputeDataDiskFragment, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.disk_uri = kwargs.get('disk_uri', None) + self.managed_disk_id = kwargs.get('managed_disk_id', None) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + + +class ComputeVmInstanceViewStatus(Model): + """Status information about a virtual machine. + + :param code: Gets the status Code. + :type code: str + :param display_status: Gets the short localizable label for the status. + :type display_status: str + :param message: Gets the message associated with the status. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComputeVmInstanceViewStatus, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.display_status = kwargs.get('display_status', None) + self.message = kwargs.get('message', None) + + +class ComputeVmInstanceViewStatusFragment(Model): + """Status information about a virtual machine. + + :param code: Gets the status Code. + :type code: str + :param display_status: Gets the short localizable label for the status. + :type display_status: str + :param message: Gets the message associated with the status. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComputeVmInstanceViewStatusFragment, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.display_status = kwargs.get('display_status', None) + self.message = kwargs.get('message', None) + + +class ComputeVmProperties(Model): + """Properties of a virtual machine returned by the Microsoft.Compute API. + + :param statuses: Gets the statuses of the virtual machine. + :type statuses: + list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatus] + :param os_type: Gets the OS type of the virtual machine. + :type os_type: str + :param vm_size: Gets the size of the virtual machine. + :type vm_size: str + :param network_interface_id: Gets the network interface ID of the virtual + machine. + :type network_interface_id: str + :param os_disk_id: Gets OS disk blob uri for the virtual machine. + :type os_disk_id: str + :param data_disk_ids: Gets data disks blob uri for the virtual machine. + :type data_disk_ids: list[str] + :param data_disks: Gets all data disks attached to the virtual machine. + :type data_disks: list[~azure.mgmt.devtestlabs.models.ComputeDataDisk] + """ + + _attribute_map = { + 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatus]'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, + 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, + 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDisk]'}, + } + + def __init__(self, **kwargs): + super(ComputeVmProperties, self).__init__(**kwargs) + self.statuses = kwargs.get('statuses', None) + self.os_type = kwargs.get('os_type', None) + self.vm_size = kwargs.get('vm_size', None) + self.network_interface_id = kwargs.get('network_interface_id', None) + self.os_disk_id = kwargs.get('os_disk_id', None) + self.data_disk_ids = kwargs.get('data_disk_ids', None) + self.data_disks = kwargs.get('data_disks', None) + + +class ComputeVmPropertiesFragment(Model): + """Properties of a virtual machine returned by the Microsoft.Compute API. + + :param statuses: Gets the statuses of the virtual machine. + :type statuses: + list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatusFragment] + :param os_type: Gets the OS type of the virtual machine. + :type os_type: str + :param vm_size: Gets the size of the virtual machine. + :type vm_size: str + :param network_interface_id: Gets the network interface ID of the virtual + machine. + :type network_interface_id: str + :param os_disk_id: Gets OS disk blob uri for the virtual machine. + :type os_disk_id: str + :param data_disk_ids: Gets data disks blob uri for the virtual machine. + :type data_disk_ids: list[str] + :param data_disks: Gets all data disks attached to the virtual machine. + :type data_disks: + list[~azure.mgmt.devtestlabs.models.ComputeDataDiskFragment] + """ + + _attribute_map = { + 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatusFragment]'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, + 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, + 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDiskFragment]'}, + } + + def __init__(self, **kwargs): + super(ComputeVmPropertiesFragment, self).__init__(**kwargs) + self.statuses = kwargs.get('statuses', None) + self.os_type = kwargs.get('os_type', None) + self.vm_size = kwargs.get('vm_size', None) + self.network_interface_id = kwargs.get('network_interface_id', None) + self.os_disk_id = kwargs.get('os_disk_id', None) + self.data_disk_ids = kwargs.get('data_disk_ids', None) + self.data_disks = kwargs.get('data_disks', None) + + +class CostThresholdProperties(Model): + """Properties of a cost threshold item. + + :param threshold_id: The ID of the cost threshold item. + :type threshold_id: str + :param percentage_threshold: The value of the percentage cost threshold. + :type percentage_threshold: + ~azure.mgmt.devtestlabs.models.PercentageCostThresholdProperties + :param display_on_chart: Indicates whether this threshold will be + displayed on cost charts. Possible values include: 'Enabled', 'Disabled' + :type display_on_chart: str or + ~azure.mgmt.devtestlabs.models.CostThresholdStatus + :param send_notification_when_exceeded: Indicates whether notifications + will be sent when this threshold is exceeded. Possible values include: + 'Enabled', 'Disabled' + :type send_notification_when_exceeded: str or + ~azure.mgmt.devtestlabs.models.CostThresholdStatus + :param notification_sent: Indicates the datetime when notifications were + last sent for this threshold. + :type notification_sent: str + """ + + _attribute_map = { + 'threshold_id': {'key': 'thresholdId', 'type': 'str'}, + 'percentage_threshold': {'key': 'percentageThreshold', 'type': 'PercentageCostThresholdProperties'}, + 'display_on_chart': {'key': 'displayOnChart', 'type': 'str'}, + 'send_notification_when_exceeded': {'key': 'sendNotificationWhenExceeded', 'type': 'str'}, + 'notification_sent': {'key': 'notificationSent', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CostThresholdProperties, self).__init__(**kwargs) + self.threshold_id = kwargs.get('threshold_id', None) + self.percentage_threshold = kwargs.get('percentage_threshold', None) + self.display_on_chart = kwargs.get('display_on_chart', None) + self.send_notification_when_exceeded = kwargs.get('send_notification_when_exceeded', None) + self.notification_sent = kwargs.get('notification_sent', None) + + +class CustomImage(Resource): + """A custom image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param vm: The virtual machine from which the image is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVm + :param vhd: The VHD from which the image is to be created. + :type vhd: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustom + :param description: The description of the custom image. + :type description: str + :param author: The author of the custom image. + :type author: str + :ivar creation_date: The creation date of the custom image. + :vartype creation_date: datetime + :param managed_image_id: The Managed Image Id backing the custom image. + :type managed_image_id: str + :param managed_snapshot_id: The Managed Snapshot Id backing the custom + image. + :type managed_snapshot_id: str + :param data_disk_storage_info: Storage information about the data disks + present in the custom image + :type data_disk_storage_info: + list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfo] + :param custom_image_plan: Storage information about the plan related to + this custom image + :type custom_image_plan: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlan + :param is_plan_authorized: Whether or not the custom images underlying + offer/plan has been enabled for programmatic deployment + :type is_plan_authorized: bool + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVm'}, + 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustom'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, + 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, + 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfo]'}, + 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlan'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomImage, self).__init__(**kwargs) + self.vm = kwargs.get('vm', None) + self.vhd = kwargs.get('vhd', None) + self.description = kwargs.get('description', None) + self.author = kwargs.get('author', None) + self.creation_date = None + self.managed_image_id = kwargs.get('managed_image_id', None) + self.managed_snapshot_id = kwargs.get('managed_snapshot_id', None) + self.data_disk_storage_info = kwargs.get('data_disk_storage_info', None) + self.custom_image_plan = kwargs.get('custom_image_plan', None) + self.is_plan_authorized = kwargs.get('is_plan_authorized', None) + self.provisioning_state = None + self.unique_identifier = None + + +class CustomImageFragment(UpdateResource): + """A custom image. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param vm: The virtual machine from which the image is to be created. + :type vm: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVmFragment + :param vhd: The VHD from which the image is to be created. + :type vhd: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustomFragment + :param description: The description of the custom image. + :type description: str + :param author: The author of the custom image. + :type author: str + :param managed_image_id: The Managed Image Id backing the custom image. + :type managed_image_id: str + :param managed_snapshot_id: The Managed Snapshot Id backing the custom + image. + :type managed_snapshot_id: str + :param data_disk_storage_info: Storage information about the data disks + present in the custom image + :type data_disk_storage_info: + list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfoFragment] + :param custom_image_plan: Storage information about the plan related to + this custom image + :type custom_image_plan: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlanFragment + :param is_plan_authorized: Whether or not the custom images underlying + offer/plan has been enabled for programmatic deployment + :type is_plan_authorized: bool + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVmFragment'}, + 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustomFragment'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, + 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, + 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfoFragment]'}, + 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlanFragment'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(CustomImageFragment, self).__init__(**kwargs) + self.vm = kwargs.get('vm', None) + self.vhd = kwargs.get('vhd', None) + self.description = kwargs.get('description', None) + self.author = kwargs.get('author', None) + self.managed_image_id = kwargs.get('managed_image_id', None) + self.managed_snapshot_id = kwargs.get('managed_snapshot_id', None) + self.data_disk_storage_info = kwargs.get('data_disk_storage_info', None) + self.custom_image_plan = kwargs.get('custom_image_plan', None) + self.is_plan_authorized = kwargs.get('is_plan_authorized', None) + + +class CustomImagePropertiesCustom(Model): + """Properties for creating a custom image from a VHD. + + All required parameters must be populated in order to send to Azure. + + :param image_name: The image name. + :type image_name: str + :param sys_prep: Indicates whether sysprep has been run on the VHD. + :type sys_prep: bool + :param os_type: Required. The OS type of the custom image (i.e. Windows, + Linux). Possible values include: 'Windows', 'Linux', 'None' + :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType + """ + + _validation = { + 'os_type': {'required': True}, + } + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesCustom, self).__init__(**kwargs) + self.image_name = kwargs.get('image_name', None) + self.sys_prep = kwargs.get('sys_prep', None) + self.os_type = kwargs.get('os_type', None) + + +class CustomImagePropertiesCustomFragment(Model): + """Properties for creating a custom image from a VHD. + + :param image_name: The image name. + :type image_name: str + :param sys_prep: Indicates whether sysprep has been run on the VHD. + :type sys_prep: bool + :param os_type: The OS type of the custom image (i.e. Windows, Linux). + Possible values include: 'Windows', 'Linux', 'None' + :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType + """ + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesCustomFragment, self).__init__(**kwargs) + self.image_name = kwargs.get('image_name', None) + self.sys_prep = kwargs.get('sys_prep', None) + self.os_type = kwargs.get('os_type', None) + + +class CustomImagePropertiesFromPlan(Model): + """Properties for plan on a custom image. + + :param id: The id of the plan, equivalent to name of the plan + :type id: str + :param publisher: The publisher for the plan from the marketplace image + the custom image is derived from + :type publisher: str + :param offer: The offer for the plan from the marketplace image the custom + image is derived from + :type offer: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesFromPlan, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) + + +class CustomImagePropertiesFromPlanFragment(Model): + """Properties for plan on a custom image. + + :param id: The id of the plan, equivalent to name of the plan + :type id: str + :param publisher: The publisher for the plan from the marketplace image + the custom image is derived from + :type publisher: str + :param offer: The offer for the plan from the marketplace image the custom + image is derived from + :type offer: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesFromPlanFragment, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) + + +class CustomImagePropertiesFromVm(Model): + """Properties for creating a custom image from a virtual machine. + + :param source_vm_id: The source vm identifier. + :type source_vm_id: str + :param windows_os_info: The Windows OS information of the VM. + :type windows_os_info: ~azure.mgmt.devtestlabs.models.WindowsOsInfo + :param linux_os_info: The Linux OS information of the VM. + :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfo + """ + + _attribute_map = { + 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, + 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfo'}, + 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfo'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesFromVm, self).__init__(**kwargs) + self.source_vm_id = kwargs.get('source_vm_id', None) + self.windows_os_info = kwargs.get('windows_os_info', None) + self.linux_os_info = kwargs.get('linux_os_info', None) + + +class CustomImagePropertiesFromVmFragment(Model): + """Properties for creating a custom image from a virtual machine. + + :param source_vm_id: The source vm identifier. + :type source_vm_id: str + :param windows_os_info: The Windows OS information of the VM. + :type windows_os_info: + ~azure.mgmt.devtestlabs.models.WindowsOsInfoFragment + :param linux_os_info: The Linux OS information of the VM. + :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfoFragment + """ + + _attribute_map = { + 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, + 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfoFragment'}, + 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfoFragment'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesFromVmFragment, self).__init__(**kwargs) + self.source_vm_id = kwargs.get('source_vm_id', None) + self.windows_os_info = kwargs.get('windows_os_info', None) + self.linux_os_info = kwargs.get('linux_os_info', None) + + +class DataDiskProperties(Model): + """Request body for adding a new or existing data disk to a virtual machine. + + :param attach_new_data_disk_options: Specifies options to attach a new + disk to the virtual machine. + :type attach_new_data_disk_options: + ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptions + :param existing_lab_disk_id: Specifies the existing lab disk id to attach + to virtual machine. + :type existing_lab_disk_id: str + :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, + ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type host_caching: str or + ~azure.mgmt.devtestlabs.models.HostCachingOptions + """ + + _attribute_map = { + 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptions'}, + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + 'host_caching': {'key': 'hostCaching', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataDiskProperties, self).__init__(**kwargs) + self.attach_new_data_disk_options = kwargs.get('attach_new_data_disk_options', None) + self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) + self.host_caching = kwargs.get('host_caching', None) + + +class DataDiskPropertiesFragment(Model): + """Request body for adding a new or existing data disk to a virtual machine. + + :param attach_new_data_disk_options: Specifies options to attach a new + disk to the virtual machine. + :type attach_new_data_disk_options: + ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptionsFragment + :param existing_lab_disk_id: Specifies the existing lab disk id to attach + to virtual machine. + :type existing_lab_disk_id: str + :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, + ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type host_caching: str or + ~azure.mgmt.devtestlabs.models.HostCachingOptions + """ + + _attribute_map = { + 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptionsFragment'}, + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + 'host_caching': {'key': 'hostCaching', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataDiskPropertiesFragment, self).__init__(**kwargs) + self.attach_new_data_disk_options = kwargs.get('attach_new_data_disk_options', None) + self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) + self.host_caching = kwargs.get('host_caching', None) + + +class DataDiskStorageTypeInfo(Model): + """Storage information about the data disks present in the custom image. + + :param lun: Disk Lun + :type lun: str + :param storage_type: Disk Storage Type. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataDiskStorageTypeInfo, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.storage_type = kwargs.get('storage_type', None) + + +class DataDiskStorageTypeInfoFragment(Model): + """Storage information about the data disks present in the custom image. + + :param lun: Disk Lun + :type lun: str + :param storage_type: Disk Storage Type. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataDiskStorageTypeInfoFragment, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.storage_type = kwargs.get('storage_type', None) + + +class DayDetails(Model): + """Properties of a daily schedule. + + :param time: The time of day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DayDetails, self).__init__(**kwargs) + self.time = kwargs.get('time', None) + + +class DayDetailsFragment(Model): + """Properties of a daily schedule. + + :param time: The time of day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DayDetailsFragment, self).__init__(**kwargs) + self.time = kwargs.get('time', None) + + +class DetachDataDiskProperties(Model): + """Request body for detaching data disk from a virtual machine. + + :param existing_lab_disk_id: Specifies the disk resource ID to detach from + virtual machine. + :type existing_lab_disk_id: str + """ + + _attribute_map = { + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DetachDataDiskProperties, self).__init__(**kwargs) + self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) + + +class DetachDiskProperties(Model): + """Properties of the disk to detach. + + :param leased_by_lab_vm_id: The resource ID of the Lab VM to which the + disk is attached. + :type leased_by_lab_vm_id: str + """ + + _attribute_map = { + 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DetachDiskProperties, self).__init__(**kwargs) + self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) + + +class Disk(Resource): + """A Disk. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param disk_size_gi_b: The size of the disk in GibiBytes. + :type disk_size_gi_b: int + :param leased_by_lab_vm_id: The resource ID of the VM to which this disk + is leased. + :type leased_by_lab_vm_id: str + :param disk_blob_name: When backed by a blob, the name of the VHD blob + without extension. + :type disk_blob_name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :ivar created_date: The creation date of the disk. + :vartype created_date: datetime + :param host_caching: The host caching policy of the disk (i.e. None, + ReadOnly, ReadWrite). + :type host_caching: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, + 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, + 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, + 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, + 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Disk, self).__init__(**kwargs) + self.disk_type = kwargs.get('disk_type', None) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) + self.disk_blob_name = kwargs.get('disk_blob_name', None) + self.disk_uri = kwargs.get('disk_uri', None) + self.created_date = None + self.host_caching = kwargs.get('host_caching', None) + self.managed_disk_id = kwargs.get('managed_disk_id', None) + self.provisioning_state = None + self.unique_identifier = None + + +class DiskFragment(UpdateResource): + """A Disk. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param disk_size_gi_b: The size of the disk in GibiBytes. + :type disk_size_gi_b: int + :param leased_by_lab_vm_id: The resource ID of the VM to which this disk + is leased. + :type leased_by_lab_vm_id: str + :param disk_blob_name: When backed by a blob, the name of the VHD blob + without extension. + :type disk_blob_name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param host_caching: The host caching policy of the disk (i.e. None, + ReadOnly, ReadWrite). + :type host_caching: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, + 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, + 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, + 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, + 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, + 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DiskFragment, self).__init__(**kwargs) + self.disk_type = kwargs.get('disk_type', None) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) + self.disk_blob_name = kwargs.get('disk_blob_name', None) + self.disk_uri = kwargs.get('disk_uri', None) + self.host_caching = kwargs.get('host_caching', None) + self.managed_disk_id = kwargs.get('managed_disk_id', None) + + +class DtlEnvironment(Resource): + """An environment, which is essentially an ARM template deployment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param deployment_properties: The deployment properties of the + environment. + :type deployment_properties: + ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentProperties + :param arm_template_display_name: The display name of the Azure Resource + Manager template that produced the environment. + :type arm_template_display_name: str + :ivar resource_group_id: The identifier of the resource group containing + the environment's resources. + :vartype resource_group_id: str + :ivar created_by_user: The creator of the environment. + :vartype created_by_user: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_group_id': {'readonly': True}, + 'created_by_user': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentProperties'}, + 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, + 'resource_group_id': {'key': 'properties.resourceGroupId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DtlEnvironment, self).__init__(**kwargs) + self.deployment_properties = kwargs.get('deployment_properties', None) + self.arm_template_display_name = kwargs.get('arm_template_display_name', None) + self.resource_group_id = None + self.created_by_user = None + self.provisioning_state = None + self.unique_identifier = None + + +class DtlEnvironmentFragment(UpdateResource): + """An environment, which is essentially an ARM template deployment. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param deployment_properties: The deployment properties of the + environment. + :type deployment_properties: + ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentPropertiesFragment + :param arm_template_display_name: The display name of the Azure Resource + Manager template that produced the environment. + :type arm_template_display_name: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentPropertiesFragment'}, + 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DtlEnvironmentFragment, self).__init__(**kwargs) + self.deployment_properties = kwargs.get('deployment_properties', None) + self.arm_template_display_name = kwargs.get('arm_template_display_name', None) + + +class EnvironmentDeploymentProperties(Model): + """Properties of an environment deployment. + + :param arm_template_id: The Azure Resource Manager template's identifier. + :type arm_template_id: str + :param parameters: The parameters of the Azure Resource Manager template. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterProperties] + """ + + _attribute_map = { + 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterProperties]'}, + } + + def __init__(self, **kwargs): + super(EnvironmentDeploymentProperties, self).__init__(**kwargs) + self.arm_template_id = kwargs.get('arm_template_id', None) + self.parameters = kwargs.get('parameters', None) + + +class EnvironmentDeploymentPropertiesFragment(Model): + """Properties of an environment deployment. + + :param arm_template_id: The Azure Resource Manager template's identifier. + :type arm_template_id: str + :param parameters: The parameters of the Azure Resource Manager template. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterPropertiesFragment] + """ + + _attribute_map = { + 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterPropertiesFragment]'}, + } + + def __init__(self, **kwargs): + super(EnvironmentDeploymentPropertiesFragment, self).__init__(**kwargs) + self.arm_template_id = kwargs.get('arm_template_id', None) + self.parameters = kwargs.get('parameters', None) + + +class EvaluatePoliciesProperties(Model): + """Properties for evaluating a policy set. + + :param fact_name: The fact name. + :type fact_name: str + :param fact_data: The fact data. + :type fact_data: str + :param value_offset: The value offset. + :type value_offset: str + :param user_object_id: The user for which policies will be evaluated + :type user_object_id: str + """ + + _attribute_map = { + 'fact_name': {'key': 'factName', 'type': 'str'}, + 'fact_data': {'key': 'factData', 'type': 'str'}, + 'value_offset': {'key': 'valueOffset', 'type': 'str'}, + 'user_object_id': {'key': 'userObjectId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EvaluatePoliciesProperties, self).__init__(**kwargs) + self.fact_name = kwargs.get('fact_name', None) + self.fact_data = kwargs.get('fact_data', None) + self.value_offset = kwargs.get('value_offset', None) + self.user_object_id = kwargs.get('user_object_id', None) + + +class EvaluatePoliciesRequest(Model): + """Request body for evaluating a policy set. + + :param policies: Policies to evaluate. + :type policies: + list[~azure.mgmt.devtestlabs.models.EvaluatePoliciesProperties] + """ + + _attribute_map = { + 'policies': {'key': 'policies', 'type': '[EvaluatePoliciesProperties]'}, + } + + def __init__(self, **kwargs): + super(EvaluatePoliciesRequest, self).__init__(**kwargs) + self.policies = kwargs.get('policies', None) + + +class EvaluatePoliciesResponse(Model): + """Response body for evaluating a policy set. + + :param results: Results of evaluating a policy set. + :type results: list[~azure.mgmt.devtestlabs.models.PolicySetResult] + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': '[PolicySetResult]'}, + } + + def __init__(self, **kwargs): + super(EvaluatePoliciesResponse, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + + +class Event(Model): + """An event to be notified for. + + :param event_name: The event type for which this notification is enabled + (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Event, self).__init__(**kwargs) + self.event_name = kwargs.get('event_name', None) + + +class EventFragment(Model): + """An event to be notified for. + + :param event_name: The event type for which this notification is enabled + (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EventFragment, self).__init__(**kwargs) + self.event_name = kwargs.get('event_name', None) + + +class ExportResourceUsageParameters(Model): + """The parameters of the export operation. + + :param blob_storage_absolute_sas_uri: The blob storage absolute sas uri + with write permission to the container which the usage data needs to be + uploaded to. + :type blob_storage_absolute_sas_uri: str + :param usage_start_date: The start time of the usage. If not provided, + usage will be reported since the beginning of data collection. + :type usage_start_date: datetime + """ + + _attribute_map = { + 'blob_storage_absolute_sas_uri': {'key': 'blobStorageAbsoluteSasUri', 'type': 'str'}, + 'usage_start_date': {'key': 'usageStartDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ExportResourceUsageParameters, self).__init__(**kwargs) + self.blob_storage_absolute_sas_uri = kwargs.get('blob_storage_absolute_sas_uri', None) + self.usage_start_date = kwargs.get('usage_start_date', None) + + +class ExternalSubnet(Model): + """Subnet information as returned by the Microsoft.Network API. + + :param id: Gets or sets the identifier. + :type id: str + :param name: Gets or sets the name. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExternalSubnet, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + + +class ExternalSubnetFragment(Model): + """Subnet information as returned by the Microsoft.Network API. + + :param id: Gets or sets the identifier. + :type id: str + :param name: Gets or sets the name. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExternalSubnetFragment, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + + +class Formula(Resource): + """A formula for creating a VM, specifying an image base and other parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the formula. + :type description: str + :param author: The author of the formula. + :type author: str + :param os_type: The OS type of the formula. + :type os_type: str + :ivar creation_date: The creation date of the formula. + :vartype creation_date: datetime + :param formula_content: The content of the formula. + :type formula_content: + ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameter + :param vm: Information about a VM from which a formula is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVm + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameter'}, + 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVm'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Formula, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.author = kwargs.get('author', None) + self.os_type = kwargs.get('os_type', None) + self.creation_date = None + self.formula_content = kwargs.get('formula_content', None) + self.vm = kwargs.get('vm', None) + self.provisioning_state = None + self.unique_identifier = None + + +class FormulaFragment(UpdateResource): + """A formula for creating a VM, specifying an image base and other parameters. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the formula. + :type description: str + :param author: The author of the formula. + :type author: str + :param os_type: The OS type of the formula. + :type os_type: str + :param formula_content: The content of the formula. + :type formula_content: + ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameterFragment + :param vm: Information about a VM from which a formula is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVmFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameterFragment'}, + 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVmFragment'}, + } + + def __init__(self, **kwargs): + super(FormulaFragment, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.author = kwargs.get('author', None) + self.os_type = kwargs.get('os_type', None) + self.formula_content = kwargs.get('formula_content', None) + self.vm = kwargs.get('vm', None) + + +class FormulaPropertiesFromVm(Model): + """Information about a VM from which a formula is to be created. + + :param lab_vm_id: The identifier of the VM from which a formula is to be + created. + :type lab_vm_id: str + """ + + _attribute_map = { + 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FormulaPropertiesFromVm, self).__init__(**kwargs) + self.lab_vm_id = kwargs.get('lab_vm_id', None) + + +class FormulaPropertiesFromVmFragment(Model): + """Information about a VM from which a formula is to be created. + + :param lab_vm_id: The identifier of the VM from which a formula is to be + created. + :type lab_vm_id: str + """ + + _attribute_map = { + 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FormulaPropertiesFromVmFragment, self).__init__(**kwargs) + self.lab_vm_id = kwargs.get('lab_vm_id', None) + + +class GalleryImage(Resource): + """A gallery image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param author: The author of the gallery image. + :type author: str + :ivar created_date: The creation date of the gallery image. + :vartype created_date: datetime + :param description: The description of the gallery image. + :type description: str + :param image_reference: The image reference of the gallery image. + :type image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param icon: The icon of the gallery image. + :type icon: str + :param enabled: Indicates whether this gallery image is enabled. + :type enabled: bool + :param plan_id: The third party plan that applies to this image + :type plan_id: str + :param is_plan_authorized: Indicates if the plan has been authorized for + programmatic deployment. + :type is_plan_authorized: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'image_reference': {'key': 'properties.imageReference', 'type': 'GalleryImageReference'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(GalleryImage, self).__init__(**kwargs) + self.author = kwargs.get('author', None) + self.created_date = None + self.description = kwargs.get('description', None) + self.image_reference = kwargs.get('image_reference', None) + self.icon = kwargs.get('icon', None) + self.enabled = kwargs.get('enabled', None) + self.plan_id = kwargs.get('plan_id', None) + self.is_plan_authorized = kwargs.get('is_plan_authorized', None) + + +class GalleryImageReference(Model): + """The reference information for an Azure Marketplace image. + + :param offer: The offer of the gallery image. + :type offer: str + :param publisher: The publisher of the gallery image. + :type publisher: str + :param sku: The SKU of the gallery image. + :type sku: str + :param os_type: The OS type of the gallery image. + :type os_type: str + :param version: The version of the gallery image. + :type version: str + """ + + _attribute_map = { + 'offer': {'key': 'offer', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GalleryImageReference, self).__init__(**kwargs) + self.offer = kwargs.get('offer', None) + self.publisher = kwargs.get('publisher', None) + self.sku = kwargs.get('sku', None) + self.os_type = kwargs.get('os_type', None) + self.version = kwargs.get('version', None) + + +class GalleryImageReferenceFragment(Model): + """The reference information for an Azure Marketplace image. + + :param offer: The offer of the gallery image. + :type offer: str + :param publisher: The publisher of the gallery image. + :type publisher: str + :param sku: The SKU of the gallery image. + :type sku: str + :param os_type: The OS type of the gallery image. + :type os_type: str + :param version: The version of the gallery image. + :type version: str + """ + + _attribute_map = { + 'offer': {'key': 'offer', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GalleryImageReferenceFragment, self).__init__(**kwargs) + self.offer = kwargs.get('offer', None) + self.publisher = kwargs.get('publisher', None) + self.sku = kwargs.get('sku', None) + self.os_type = kwargs.get('os_type', None) + self.version = kwargs.get('version', None) + + +class GenerateArmTemplateRequest(Model): + """Parameters for generating an ARM template for deploying artifacts. + + :param virtual_machine_name: The resource name of the virtual machine. + :type virtual_machine_name: str + :param parameters: The parameters of the ARM template. + :type parameters: list[~azure.mgmt.devtestlabs.models.ParameterInfo] + :param location: The location of the virtual machine. + :type location: str + :param file_upload_options: Options for uploading the files for the + artifact. UploadFilesAndGenerateSasTokens is the default value. Possible + values include: 'UploadFilesAndGenerateSasTokens', 'None' + :type file_upload_options: str or + ~azure.mgmt.devtestlabs.models.FileUploadOptions + """ + + _attribute_map = { + 'virtual_machine_name': {'key': 'virtualMachineName', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ParameterInfo]'}, + 'location': {'key': 'location', 'type': 'str'}, + 'file_upload_options': {'key': 'fileUploadOptions', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenerateArmTemplateRequest, self).__init__(**kwargs) + self.virtual_machine_name = kwargs.get('virtual_machine_name', None) + self.parameters = kwargs.get('parameters', None) + self.location = kwargs.get('location', None) + self.file_upload_options = kwargs.get('file_upload_options', None) + + +class GenerateUploadUriParameter(Model): + """Properties for generating an upload URI. + + :param blob_name: The blob name of the upload URI. + :type blob_name: str + """ + + _attribute_map = { + 'blob_name': {'key': 'blobName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenerateUploadUriParameter, self).__init__(**kwargs) + self.blob_name = kwargs.get('blob_name', None) + + +class GenerateUploadUriResponse(Model): + """Response body for generating an upload URI. + + :param upload_uri: The upload URI for the VHD. + :type upload_uri: str + """ + + _attribute_map = { + 'upload_uri': {'key': 'uploadUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenerateUploadUriResponse, self).__init__(**kwargs) + self.upload_uri = kwargs.get('upload_uri', None) + + +class HourDetails(Model): + """Properties of an hourly schedule. + + :param minute: Minutes of the hour the schedule will run. + :type minute: int + """ + + _attribute_map = { + 'minute': {'key': 'minute', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(HourDetails, self).__init__(**kwargs) + self.minute = kwargs.get('minute', None) + + +class HourDetailsFragment(Model): + """Properties of an hourly schedule. + + :param minute: Minutes of the hour the schedule will run. + :type minute: int + """ + + _attribute_map = { + 'minute': {'key': 'minute', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(HourDetailsFragment, self).__init__(**kwargs) + self.minute = kwargs.get('minute', None) + + +class IdentityProperties(Model): + """Properties of a managed identity. + + :param type: Managed identity. + :type type: str + :param principal_id: The principal id of resource identity. + :type principal_id: str + :param tenant_id: The tenant identifier of resource. + :type tenant_id: str + :param client_secret_url: The client secret URL of the identity. + :type client_secret_url: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'client_secret_url': {'key': 'clientSecretUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IdentityProperties, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.principal_id = kwargs.get('principal_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.client_secret_url = kwargs.get('client_secret_url', None) + + +class ImportLabVirtualMachineRequest(Model): + """This represents the payload required to import a virtual machine from a + different lab into the current one. + + :param source_virtual_machine_resource_id: The full resource ID of the + virtual machine to be imported. + :type source_virtual_machine_resource_id: str + :param destination_virtual_machine_name: The name of the virtual machine + in the destination lab + :type destination_virtual_machine_name: str + """ + + _attribute_map = { + 'source_virtual_machine_resource_id': {'key': 'sourceVirtualMachineResourceId', 'type': 'str'}, + 'destination_virtual_machine_name': {'key': 'destinationVirtualMachineName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImportLabVirtualMachineRequest, self).__init__(**kwargs) + self.source_virtual_machine_resource_id = kwargs.get('source_virtual_machine_resource_id', None) + self.destination_virtual_machine_name = kwargs.get('destination_virtual_machine_name', None) + + +class InboundNatRule(Model): + """A rule for NAT - exposing a VM's port (backendPort) on the public IP + address using a load balancer. + + :param transport_protocol: The transport protocol for the endpoint. + Possible values include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param frontend_port: The external endpoint port of the inbound + connection. Possible values range between 1 and 65535, inclusive. If + unspecified, a value will be allocated automatically. + :type frontend_port: int + :param backend_port: The port to which the external traffic will be + redirected. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(InboundNatRule, self).__init__(**kwargs) + self.transport_protocol = kwargs.get('transport_protocol', None) + self.frontend_port = kwargs.get('frontend_port', None) + self.backend_port = kwargs.get('backend_port', None) + + +class InboundNatRuleFragment(Model): + """A rule for NAT - exposing a VM's port (backendPort) on the public IP + address using a load balancer. + + :param transport_protocol: The transport protocol for the endpoint. + Possible values include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param frontend_port: The external endpoint port of the inbound + connection. Possible values range between 1 and 65535, inclusive. If + unspecified, a value will be allocated automatically. + :type frontend_port: int + :param backend_port: The port to which the external traffic will be + redirected. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(InboundNatRuleFragment, self).__init__(**kwargs) + self.transport_protocol = kwargs.get('transport_protocol', None) + self.frontend_port = kwargs.get('frontend_port', None) + self.backend_port = kwargs.get('backend_port', None) + + +class Lab(Resource): + """A lab. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar default_storage_account: The lab's default storage account. + :vartype default_storage_account: str + :ivar default_premium_storage_account: The lab's default premium storage + account. + :vartype default_premium_storage_account: str + :ivar artifacts_storage_account: The lab's artifact storage account. + :vartype artifacts_storage_account: str + :ivar premium_data_disk_storage_account: The lab's premium data disk + storage account. + :vartype premium_data_disk_storage_account: str + :ivar vault_name: The lab's Key vault. + :vartype vault_name: str + :param lab_storage_type: Type of storage used by the lab. It can be either + Premium or Standard. Default is Premium. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param mandatory_artifacts_resource_ids_linux: The ordered list of + artifact resource IDs that should be applied on all Linux VM creations by + default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_linux: list[str] + :param mandatory_artifacts_resource_ids_windows: The ordered list of + artifact resource IDs that should be applied on all Windows VM creations + by default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_windows: list[str] + :ivar created_date: The creation date of the lab. + :vartype created_date: datetime + :param premium_data_disks: The setting to enable usage of premium data + disks. + When its value is 'Enabled', creation of standard or premium data disks is + allowed. + When its value is 'Disabled', only creation of standard data disks is + allowed. Possible values include: 'Disabled', 'Enabled' + :type premium_data_disks: str or + ~azure.mgmt.devtestlabs.models.PremiumDataDisk + :param environment_permission: The access rights to be granted to the user + when provisioning an environment. Possible values include: 'Reader', + 'Contributor' + :type environment_permission: str or + ~azure.mgmt.devtestlabs.models.EnvironmentPermission + :param announcement: The properties of any lab announcement associated + with this lab + :type announcement: + ~azure.mgmt.devtestlabs.models.LabAnnouncementProperties + :param support: The properties of any lab support message associated with + this lab + :type support: ~azure.mgmt.devtestlabs.models.LabSupportProperties + :ivar vm_creation_resource_group: The resource group in which all new lab + virtual machines will be created. To let DevTest Labs manage resource + group creation, set this value to null. + :vartype vm_creation_resource_group: str + :ivar public_ip_id: The public IP address for the lab's load balancer. + :vartype public_ip_id: str + :ivar load_balancer_id: The load balancer used to for lab VMs that use + shared IP address. + :vartype load_balancer_id: str + :ivar network_security_group_id: The Network Security Group attached to + the lab VMs Network interfaces to restrict open ports. + :vartype network_security_group_id: str + :param extended_properties: Extended properties of the lab used for + experimental features + :type extended_properties: dict[str, str] + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'default_storage_account': {'readonly': True}, + 'default_premium_storage_account': {'readonly': True}, + 'artifacts_storage_account': {'readonly': True}, + 'premium_data_disk_storage_account': {'readonly': True}, + 'vault_name': {'readonly': True}, + 'created_date': {'readonly': True}, + 'vm_creation_resource_group': {'readonly': True}, + 'public_ip_id': {'readonly': True}, + 'load_balancer_id': {'readonly': True}, + 'network_security_group_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'default_storage_account': {'key': 'properties.defaultStorageAccount', 'type': 'str'}, + 'default_premium_storage_account': {'key': 'properties.defaultPremiumStorageAccount', 'type': 'str'}, + 'artifacts_storage_account': {'key': 'properties.artifactsStorageAccount', 'type': 'str'}, + 'premium_data_disk_storage_account': {'key': 'properties.premiumDataDiskStorageAccount', 'type': 'str'}, + 'vault_name': {'key': 'properties.vaultName', 'type': 'str'}, + 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, + 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, + 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, + 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, + 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementProperties'}, + 'support': {'key': 'properties.support', 'type': 'LabSupportProperties'}, + 'vm_creation_resource_group': {'key': 'properties.vmCreationResourceGroup', 'type': 'str'}, + 'public_ip_id': {'key': 'properties.publicIpId', 'type': 'str'}, + 'load_balancer_id': {'key': 'properties.loadBalancerId', 'type': 'str'}, + 'network_security_group_id': {'key': 'properties.networkSecurityGroupId', 'type': 'str'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Lab, self).__init__(**kwargs) + self.default_storage_account = None + self.default_premium_storage_account = None + self.artifacts_storage_account = None + self.premium_data_disk_storage_account = None + self.vault_name = None + self.lab_storage_type = kwargs.get('lab_storage_type', None) + self.mandatory_artifacts_resource_ids_linux = kwargs.get('mandatory_artifacts_resource_ids_linux', None) + self.mandatory_artifacts_resource_ids_windows = kwargs.get('mandatory_artifacts_resource_ids_windows', None) + self.created_date = None + self.premium_data_disks = kwargs.get('premium_data_disks', None) + self.environment_permission = kwargs.get('environment_permission', None) + self.announcement = kwargs.get('announcement', None) + self.support = kwargs.get('support', None) + self.vm_creation_resource_group = None + self.public_ip_id = None + self.load_balancer_id = None + self.network_security_group_id = None + self.extended_properties = kwargs.get('extended_properties', None) + self.provisioning_state = None + self.unique_identifier = None + + +class LabAnnouncementProperties(Model): + """Properties of a lab's announcement banner. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param title: The plain text title for the lab announcement + :type title: str + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + :param enabled: Is the lab announcement active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param expiration_date: The time at which the announcement expires (null + for never) + :type expiration_date: datetime + :param expired: Has this announcement expired? + :type expired: bool + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'expired': {'key': 'expired', 'type': 'bool'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabAnnouncementProperties, self).__init__(**kwargs) + self.title = kwargs.get('title', None) + self.markdown = kwargs.get('markdown', None) + self.enabled = kwargs.get('enabled', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.expired = kwargs.get('expired', None) + self.provisioning_state = None + self.unique_identifier = None + + +class LabAnnouncementPropertiesFragment(Model): + """Properties of a lab's announcement banner. + + :param title: The plain text title for the lab announcement + :type title: str + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + :param enabled: Is the lab announcement active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param expiration_date: The time at which the announcement expires (null + for never) + :type expiration_date: datetime + :param expired: Has this announcement expired? + :type expired: bool + """ + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'expired': {'key': 'expired', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(LabAnnouncementPropertiesFragment, self).__init__(**kwargs) + self.title = kwargs.get('title', None) + self.markdown = kwargs.get('markdown', None) + self.enabled = kwargs.get('enabled', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.expired = kwargs.get('expired', None) + + +class LabCost(Resource): + """A cost item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param target_cost: The target cost properties + :type target_cost: ~azure.mgmt.devtestlabs.models.TargetCostProperties + :ivar lab_cost_summary: The lab cost summary component of the cost data. + :vartype lab_cost_summary: + ~azure.mgmt.devtestlabs.models.LabCostSummaryProperties + :ivar lab_cost_details: The lab cost details component of the cost data. + :vartype lab_cost_details: + list[~azure.mgmt.devtestlabs.models.LabCostDetailsProperties] + :ivar resource_costs: The resource cost component of the cost data. + :vartype resource_costs: + list[~azure.mgmt.devtestlabs.models.LabResourceCostProperties] + :param currency_code: The currency code of the cost. + :type currency_code: str + :param start_date_time: The start time of the cost data. + :type start_date_time: datetime + :param end_date_time: The end time of the cost data. + :type end_date_time: datetime + :param created_date: The creation date of the cost. + :type created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'lab_cost_summary': {'readonly': True}, + 'lab_cost_details': {'readonly': True}, + 'resource_costs': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'target_cost': {'key': 'properties.targetCost', 'type': 'TargetCostProperties'}, + 'lab_cost_summary': {'key': 'properties.labCostSummary', 'type': 'LabCostSummaryProperties'}, + 'lab_cost_details': {'key': 'properties.labCostDetails', 'type': '[LabCostDetailsProperties]'}, + 'resource_costs': {'key': 'properties.resourceCosts', 'type': '[LabResourceCostProperties]'}, + 'currency_code': {'key': 'properties.currencyCode', 'type': 'str'}, + 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, + 'end_date_time': {'key': 'properties.endDateTime', 'type': 'iso-8601'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabCost, self).__init__(**kwargs) + self.target_cost = kwargs.get('target_cost', None) + self.lab_cost_summary = None + self.lab_cost_details = None + self.resource_costs = None + self.currency_code = kwargs.get('currency_code', None) + self.start_date_time = kwargs.get('start_date_time', None) + self.end_date_time = kwargs.get('end_date_time', None) + self.created_date = kwargs.get('created_date', None) + self.provisioning_state = None + self.unique_identifier = None + + +class LabCostDetailsProperties(Model): + """The properties of a lab cost item. + + :param date_property: The date of the cost item. + :type date_property: datetime + :param cost: The cost component of the cost item. + :type cost: float + :param cost_type: The type of the cost. Possible values include: + 'Unavailable', 'Reported', 'Projected' + :type cost_type: str or ~azure.mgmt.devtestlabs.models.CostType + """ + + _attribute_map = { + 'date_property': {'key': 'date', 'type': 'iso-8601'}, + 'cost': {'key': 'cost', 'type': 'float'}, + 'cost_type': {'key': 'costType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabCostDetailsProperties, self).__init__(**kwargs) + self.date_property = kwargs.get('date_property', None) + self.cost = kwargs.get('cost', None) + self.cost_type = kwargs.get('cost_type', None) + + +class LabCostSummaryProperties(Model): + """The properties of the cost summary. + + :param estimated_lab_cost: The cost component of the cost item. + :type estimated_lab_cost: float + """ + + _attribute_map = { + 'estimated_lab_cost': {'key': 'estimatedLabCost', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(LabCostSummaryProperties, self).__init__(**kwargs) + self.estimated_lab_cost = kwargs.get('estimated_lab_cost', None) + + +class LabFragment(UpdateResource): + """A lab. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_storage_type: Type of storage used by the lab. It can be either + Premium or Standard. Default is Premium. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param mandatory_artifacts_resource_ids_linux: The ordered list of + artifact resource IDs that should be applied on all Linux VM creations by + default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_linux: list[str] + :param mandatory_artifacts_resource_ids_windows: The ordered list of + artifact resource IDs that should be applied on all Windows VM creations + by default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_windows: list[str] + :param premium_data_disks: The setting to enable usage of premium data + disks. + When its value is 'Enabled', creation of standard or premium data disks is + allowed. + When its value is 'Disabled', only creation of standard data disks is + allowed. Possible values include: 'Disabled', 'Enabled' + :type premium_data_disks: str or + ~azure.mgmt.devtestlabs.models.PremiumDataDisk + :param environment_permission: The access rights to be granted to the user + when provisioning an environment. Possible values include: 'Reader', + 'Contributor' + :type environment_permission: str or + ~azure.mgmt.devtestlabs.models.EnvironmentPermission + :param announcement: The properties of any lab announcement associated + with this lab + :type announcement: + ~azure.mgmt.devtestlabs.models.LabAnnouncementPropertiesFragment + :param support: The properties of any lab support message associated with + this lab + :type support: ~azure.mgmt.devtestlabs.models.LabSupportPropertiesFragment + :param extended_properties: Extended properties of the lab used for + experimental features + :type extended_properties: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, + 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, + 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, + 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, + 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, + 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementPropertiesFragment'}, + 'support': {'key': 'properties.support', 'type': 'LabSupportPropertiesFragment'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(LabFragment, self).__init__(**kwargs) + self.lab_storage_type = kwargs.get('lab_storage_type', None) + self.mandatory_artifacts_resource_ids_linux = kwargs.get('mandatory_artifacts_resource_ids_linux', None) + self.mandatory_artifacts_resource_ids_windows = kwargs.get('mandatory_artifacts_resource_ids_windows', None) + self.premium_data_disks = kwargs.get('premium_data_disks', None) + self.environment_permission = kwargs.get('environment_permission', None) + self.announcement = kwargs.get('announcement', None) + self.support = kwargs.get('support', None) + self.extended_properties = kwargs.get('extended_properties', None) + + +class LabResourceCostProperties(Model): + """The properties of a resource cost item. + + :param resourcename: The name of the resource. + :type resourcename: str + :param resource_uid: The unique identifier of the resource. + :type resource_uid: str + :param resource_cost: The cost component of the resource cost item. + :type resource_cost: float + :param resource_type: The logical resource type (ex. virtualmachine, + storageaccount) + :type resource_type: str + :param resource_owner: The owner of the resource (ex. + janedoe@microsoft.com) + :type resource_owner: str + :param resource_pricing_tier: The category of the resource (ex. + Premium_LRS, Standard_DS1) + :type resource_pricing_tier: str + :param resource_status: The status of the resource (ex. Active) + :type resource_status: str + :param resource_id: The ID of the resource + :type resource_id: str + :param external_resource_id: The ID of the external resource + :type external_resource_id: str + """ + + _attribute_map = { + 'resourcename': {'key': 'resourcename', 'type': 'str'}, + 'resource_uid': {'key': 'resourceUId', 'type': 'str'}, + 'resource_cost': {'key': 'resourceCost', 'type': 'float'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_owner': {'key': 'resourceOwner', 'type': 'str'}, + 'resource_pricing_tier': {'key': 'resourcePricingTier', 'type': 'str'}, + 'resource_status': {'key': 'resourceStatus', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'external_resource_id': {'key': 'externalResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabResourceCostProperties, self).__init__(**kwargs) + self.resourcename = kwargs.get('resourcename', None) + self.resource_uid = kwargs.get('resource_uid', None) + self.resource_cost = kwargs.get('resource_cost', None) + self.resource_type = kwargs.get('resource_type', None) + self.resource_owner = kwargs.get('resource_owner', None) + self.resource_pricing_tier = kwargs.get('resource_pricing_tier', None) + self.resource_status = kwargs.get('resource_status', None) + self.resource_id = kwargs.get('resource_id', None) + self.external_resource_id = kwargs.get('external_resource_id', None) + + +class LabSupportProperties(Model): + """Properties of a lab's support banner. + + :param enabled: Is the lab support banner active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabSupportProperties, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.markdown = kwargs.get('markdown', None) + + +class LabSupportPropertiesFragment(Model): + """Properties of a lab's support banner. + + :param enabled: Is the lab support banner active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabSupportPropertiesFragment, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.markdown = kwargs.get('markdown', None) + + +class LabVhd(Model): + """Properties of a VHD in the lab. + + :param id: The URI to the VHD. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabVhd, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class LabVirtualMachine(Resource): + """A virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :ivar compute_vm: The compute virtual machine properties. + :vartype compute_vm: ~azure.mgmt.devtestlabs.models.ComputeVmProperties + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties + :ivar applicable_schedule: The applicable schedule for the virtual + machine. + :vartype applicable_schedule: + ~azure.mgmt.devtestlabs.models.ApplicableSchedule + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskProperties] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'compute_vm': {'readonly': True}, + 'applicable_schedule': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'compute_vm': {'key': 'properties.computeVm', 'type': 'ComputeVmProperties'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, + 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabVirtualMachine, self).__init__(**kwargs) + self.notes = kwargs.get('notes', None) + self.owner_object_id = kwargs.get('owner_object_id', None) + self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) + self.created_by_user_id = kwargs.get('created_by_user_id', None) + self.created_by_user = kwargs.get('created_by_user', None) + self.created_date = kwargs.get('created_date', None) + self.compute_id = kwargs.get('compute_id', None) + self.custom_image_id = kwargs.get('custom_image_id', None) + self.os_type = kwargs.get('os_type', None) + self.size = kwargs.get('size', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.ssh_key = kwargs.get('ssh_key', None) + self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) + self.fqdn = kwargs.get('fqdn', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) + self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) + self.artifacts = kwargs.get('artifacts', None) + self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) + self.gallery_image_reference = kwargs.get('gallery_image_reference', None) + self.plan_id = kwargs.get('plan_id', None) + self.compute_vm = None + self.network_interface = kwargs.get('network_interface', None) + self.applicable_schedule = None + self.expiration_date = kwargs.get('expiration_date', None) + self.allow_claim = kwargs.get('allow_claim', None) + self.storage_type = kwargs.get('storage_type', None) + self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) + self.environment_id = kwargs.get('environment_id', None) + self.data_disk_parameters = kwargs.get('data_disk_parameters', None) + self.schedule_parameters = kwargs.get('schedule_parameters', None) + self.last_known_power_state = kwargs.get('last_known_power_state', None) + self.provisioning_state = None + self.unique_identifier = None + + +class LabVirtualMachineCreationParameter(Model): + """Properties for creating a virtual machine. + + :param bulk_creation_parameters: The number of virtual machine instances + to create. + :type bulk_creation_parameters: + ~azure.mgmt.devtestlabs.models.BulkCreationParameters + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskProperties] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParameters'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(LabVirtualMachineCreationParameter, self).__init__(**kwargs) + self.bulk_creation_parameters = kwargs.get('bulk_creation_parameters', None) + self.notes = kwargs.get('notes', None) + self.owner_object_id = kwargs.get('owner_object_id', None) + self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) + self.created_by_user_id = kwargs.get('created_by_user_id', None) + self.created_by_user = kwargs.get('created_by_user', None) + self.created_date = kwargs.get('created_date', None) + self.compute_id = kwargs.get('compute_id', None) + self.custom_image_id = kwargs.get('custom_image_id', None) + self.os_type = kwargs.get('os_type', None) + self.size = kwargs.get('size', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.ssh_key = kwargs.get('ssh_key', None) + self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) + self.fqdn = kwargs.get('fqdn', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) + self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) + self.artifacts = kwargs.get('artifacts', None) + self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) + self.gallery_image_reference = kwargs.get('gallery_image_reference', None) + self.plan_id = kwargs.get('plan_id', None) + self.network_interface = kwargs.get('network_interface', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.allow_claim = kwargs.get('allow_claim', None) + self.storage_type = kwargs.get('storage_type', None) + self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) + self.environment_id = kwargs.get('environment_id', None) + self.data_disk_parameters = kwargs.get('data_disk_parameters', None) + self.schedule_parameters = kwargs.get('schedule_parameters', None) + self.last_known_power_state = kwargs.get('last_known_power_state', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class LabVirtualMachineCreationParameterFragment(Model): + """Properties for creating a virtual machine. + + :param bulk_creation_parameters: The number of virtual machine instances + to create. + :type bulk_creation_parameters: + ~azure.mgmt.devtestlabs.models.BulkCreationParametersFragment + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParametersFragment'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(LabVirtualMachineCreationParameterFragment, self).__init__(**kwargs) + self.bulk_creation_parameters = kwargs.get('bulk_creation_parameters', None) + self.notes = kwargs.get('notes', None) + self.owner_object_id = kwargs.get('owner_object_id', None) + self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) + self.created_by_user_id = kwargs.get('created_by_user_id', None) + self.created_by_user = kwargs.get('created_by_user', None) + self.created_date = kwargs.get('created_date', None) + self.compute_id = kwargs.get('compute_id', None) + self.custom_image_id = kwargs.get('custom_image_id', None) + self.os_type = kwargs.get('os_type', None) + self.size = kwargs.get('size', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.ssh_key = kwargs.get('ssh_key', None) + self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) + self.fqdn = kwargs.get('fqdn', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) + self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) + self.artifacts = kwargs.get('artifacts', None) + self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) + self.gallery_image_reference = kwargs.get('gallery_image_reference', None) + self.plan_id = kwargs.get('plan_id', None) + self.network_interface = kwargs.get('network_interface', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.allow_claim = kwargs.get('allow_claim', None) + self.storage_type = kwargs.get('storage_type', None) + self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) + self.environment_id = kwargs.get('environment_id', None) + self.data_disk_parameters = kwargs.get('data_disk_parameters', None) + self.schedule_parameters = kwargs.get('schedule_parameters', None) + self.last_known_power_state = kwargs.get('last_known_power_state', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class LabVirtualMachineFragment(UpdateResource): + """A virtual machine. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabVirtualMachineFragment, self).__init__(**kwargs) + self.notes = kwargs.get('notes', None) + self.owner_object_id = kwargs.get('owner_object_id', None) + self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) + self.created_by_user_id = kwargs.get('created_by_user_id', None) + self.created_by_user = kwargs.get('created_by_user', None) + self.created_date = kwargs.get('created_date', None) + self.compute_id = kwargs.get('compute_id', None) + self.custom_image_id = kwargs.get('custom_image_id', None) + self.os_type = kwargs.get('os_type', None) + self.size = kwargs.get('size', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.ssh_key = kwargs.get('ssh_key', None) + self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) + self.fqdn = kwargs.get('fqdn', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) + self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) + self.artifacts = kwargs.get('artifacts', None) + self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) + self.gallery_image_reference = kwargs.get('gallery_image_reference', None) + self.plan_id = kwargs.get('plan_id', None) + self.network_interface = kwargs.get('network_interface', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.allow_claim = kwargs.get('allow_claim', None) + self.storage_type = kwargs.get('storage_type', None) + self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) + self.environment_id = kwargs.get('environment_id', None) + self.data_disk_parameters = kwargs.get('data_disk_parameters', None) + self.schedule_parameters = kwargs.get('schedule_parameters', None) + self.last_known_power_state = kwargs.get('last_known_power_state', None) + + +class LinuxOsInfo(Model): + """Information about a Linux OS. + + :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, + DeprovisionRequested, DeprovisionApplied). Possible values include: + 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' + :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState + """ + + _attribute_map = { + 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LinuxOsInfo, self).__init__(**kwargs) + self.linux_os_state = kwargs.get('linux_os_state', None) + + +class LinuxOsInfoFragment(Model): + """Information about a Linux OS. + + :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, + DeprovisionRequested, DeprovisionApplied). Possible values include: + 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' + :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState + """ + + _attribute_map = { + 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LinuxOsInfoFragment, self).__init__(**kwargs) + self.linux_os_state = kwargs.get('linux_os_state', None) + + +class NetworkInterfaceProperties(Model): + """Properties of a network interface. + + :param virtual_network_id: The resource ID of the virtual network. + :type virtual_network_id: str + :param subnet_id: The resource ID of the sub net. + :type subnet_id: str + :param public_ip_address_id: The resource ID of the public IP address. + :type public_ip_address_id: str + :param public_ip_address: The public IP address. + :type public_ip_address: str + :param private_ip_address: The private IP address. + :type private_ip_address: str + :param dns_name: The DNS name. + :type dns_name: str + :param rdp_authority: The RdpAuthority property is a server DNS host name + or IP address followed by the service port number for RDP (Remote Desktop + Protocol). + :type rdp_authority: str + :param ssh_authority: The SshAuthority property is a server DNS host name + or IP address followed by the service port number for SSH. + :type ssh_authority: str + :param shared_public_ip_address_configuration: The configuration for + sharing a public IP address across multiple virtual machines. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfiguration + """ + + _attribute_map = { + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, + 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfiguration'}, + } + + def __init__(self, **kwargs): + super(NetworkInterfaceProperties, self).__init__(**kwargs) + self.virtual_network_id = kwargs.get('virtual_network_id', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.public_ip_address_id = kwargs.get('public_ip_address_id', None) + self.public_ip_address = kwargs.get('public_ip_address', None) + self.private_ip_address = kwargs.get('private_ip_address', None) + self.dns_name = kwargs.get('dns_name', None) + self.rdp_authority = kwargs.get('rdp_authority', None) + self.ssh_authority = kwargs.get('ssh_authority', None) + self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) + + +class NetworkInterfacePropertiesFragment(Model): + """Properties of a network interface. + + :param virtual_network_id: The resource ID of the virtual network. + :type virtual_network_id: str + :param subnet_id: The resource ID of the sub net. + :type subnet_id: str + :param public_ip_address_id: The resource ID of the public IP address. + :type public_ip_address_id: str + :param public_ip_address: The public IP address. + :type public_ip_address: str + :param private_ip_address: The private IP address. + :type private_ip_address: str + :param dns_name: The DNS name. + :type dns_name: str + :param rdp_authority: The RdpAuthority property is a server DNS host name + or IP address followed by the service port number for RDP (Remote Desktop + Protocol). + :type rdp_authority: str + :param ssh_authority: The SshAuthority property is a server DNS host name + or IP address followed by the service port number for SSH. + :type ssh_authority: str + :param shared_public_ip_address_configuration: The configuration for + sharing a public IP address across multiple virtual machines. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfigurationFragment + """ + + _attribute_map = { + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, + 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfigurationFragment'}, + } + + def __init__(self, **kwargs): + super(NetworkInterfacePropertiesFragment, self).__init__(**kwargs) + self.virtual_network_id = kwargs.get('virtual_network_id', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.public_ip_address_id = kwargs.get('public_ip_address_id', None) + self.public_ip_address = kwargs.get('public_ip_address', None) + self.private_ip_address = kwargs.get('private_ip_address', None) + self.dns_name = kwargs.get('dns_name', None) + self.rdp_authority = kwargs.get('rdp_authority', None) + self.ssh_authority = kwargs.get('ssh_authority', None) + self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) + + +class NotificationChannel(Resource): + """A notification. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param web_hook_url: The webhook URL to send notifications to. + :type web_hook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + :param description: Description of notification. + :type description: str + :param events: The list of event for which this notification is enabled. + :type events: list[~azure.mgmt.devtestlabs.models.Event] + :ivar created_date: The creation date of the notification channel. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'events': {'key': 'properties.events', 'type': '[Event]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NotificationChannel, self).__init__(**kwargs) + self.web_hook_url = kwargs.get('web_hook_url', None) + self.email_recipient = kwargs.get('email_recipient', None) + self.notification_locale = kwargs.get('notification_locale', None) + self.description = kwargs.get('description', None) + self.events = kwargs.get('events', None) + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class NotificationChannelFragment(UpdateResource): + """A notification. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param web_hook_url: The webhook URL to send notifications to. + :type web_hook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + :param description: Description of notification. + :type description: str + :param events: The list of event for which this notification is enabled. + :type events: list[~azure.mgmt.devtestlabs.models.EventFragment] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'events': {'key': 'properties.events', 'type': '[EventFragment]'}, + } + + def __init__(self, **kwargs): + super(NotificationChannelFragment, self).__init__(**kwargs) + self.web_hook_url = kwargs.get('web_hook_url', None) + self.email_recipient = kwargs.get('email_recipient', None) + self.notification_locale = kwargs.get('notification_locale', None) + self.description = kwargs.get('description', None) + self.events = kwargs.get('events', None) + + +class NotificationSettings(Model): + """Notification settings for a schedule. + + :param status: If notifications are enabled for this schedule (i.e. + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param time_in_minutes: Time in minutes before event at which notification + will be sent. + :type time_in_minutes: int + :param webhook_url: The webhook URL to which the notification will be + sent. + :type webhook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, + 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NotificationSettings, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.time_in_minutes = kwargs.get('time_in_minutes', None) + self.webhook_url = kwargs.get('webhook_url', None) + self.email_recipient = kwargs.get('email_recipient', None) + self.notification_locale = kwargs.get('notification_locale', None) + + +class NotificationSettingsFragment(Model): + """Notification settings for a schedule. + + :param status: If notifications are enabled for this schedule (i.e. + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param time_in_minutes: Time in minutes before event at which notification + will be sent. + :type time_in_minutes: int + :param webhook_url: The webhook URL to which the notification will be + sent. + :type webhook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, + 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NotificationSettingsFragment, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.time_in_minutes = kwargs.get('time_in_minutes', None) + self.webhook_url = kwargs.get('webhook_url', None) + self.email_recipient = kwargs.get('email_recipient', None) + self.notification_locale = kwargs.get('notification_locale', None) + + +class NotifyParameters(Model): + """Properties for generating a Notification. + + :param event_name: The type of event (i.e. AutoShutdown, Cost). Possible + values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + :param json_payload: Properties for the notification in json format. + :type json_payload: str + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + 'json_payload': {'key': 'jsonPayload', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NotifyParameters, self).__init__(**kwargs) + self.event_name = kwargs.get('event_name', None) + self.json_payload = kwargs.get('json_payload', None) + + +class OperationError(Model): + """Error details for the operation in case of a failure. + + :param code: The error code of the operation error. + :type code: str + :param message: The error message of the operation error. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class OperationMetadata(Model): + """The REST API operation supported by DevTestLab ResourceProvider. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that describes the operations + :type display: ~azure.mgmt.devtestlabs.models.OperationMetadataDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationMetadataDisplay'}, + } + + def __init__(self, **kwargs): + super(OperationMetadata, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + + +class OperationMetadataDisplay(Model): + """The object that describes the operations. + + :param provider: Friendly name of the resource provider + :type provider: str + :param resource: Resource type on which the operation is performed. + :type resource: str + :param operation: Operation type: read, write, delete, listKeys/action, + etc. + :type operation: str + :param description: Friendly name of the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationMetadataDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class OperationResult(Model): + """An Operation Result. + + :param status: The operation status. + :type status: str + :param status_code: The status code for the operation. Possible values + include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', + 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', + 'PartialContent', 'MultipleChoices', 'MovedPermanently', 'Redirect', + 'SeeOther', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', + 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', + 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', + 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', + 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', + 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', + 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', + 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', + 'HttpVersionNotSupported' + :type status_code: str or ~azure.mgmt.devtestlabs.models.HttpStatusCode + :param error: Error details for the operation in case of a failure. + :type error: ~azure.mgmt.devtestlabs.models.OperationError + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'OperationError'}, + } + + def __init__(self, **kwargs): + super(OperationResult, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.status_code = kwargs.get('status_code', None) + self.error = kwargs.get('error', None) + + +class ParameterInfo(Model): + """Information about an artifact's parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ParameterInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class ParametersValueFileInfo(Model): + """A file containing a set of parameter values for an ARM template. + + :param file_name: File name. + :type file_name: str + :param parameters_value_info: Contents of the file. + :type parameters_value_info: object + """ + + _attribute_map = { + 'file_name': {'key': 'fileName', 'type': 'str'}, + 'parameters_value_info': {'key': 'parametersValueInfo', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ParametersValueFileInfo, self).__init__(**kwargs) + self.file_name = kwargs.get('file_name', None) + self.parameters_value_info = kwargs.get('parameters_value_info', None) + + +class PercentageCostThresholdProperties(Model): + """Properties of a percentage cost threshold. + + :param threshold_value: The cost threshold value. + :type threshold_value: float + """ + + _attribute_map = { + 'threshold_value': {'key': 'thresholdValue', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(PercentageCostThresholdProperties, self).__init__(**kwargs) + self.threshold_value = kwargs.get('threshold_value', None) + + +class Policy(Resource): + """A Policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the policy. + :type description: str + :param status: The status of the policy. Possible values include: + 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus + :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, + MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', + 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', + 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', + 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' + :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName + :param fact_data: The fact data of the policy. + :type fact_data: str + :param threshold: The threshold of the policy (i.e. a number for + MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). + :type threshold: str + :param evaluator_type: The evaluator type of the policy (i.e. + AllowedValuesPolicy, MaxValuePolicy). Possible values include: + 'AllowedValuesPolicy', 'MaxValuePolicy' + :type evaluator_type: str or + ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType + :ivar created_date: The creation date of the policy. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'fact_name': {'key': 'properties.factName', 'type': 'str'}, + 'fact_data': {'key': 'properties.factData', 'type': 'str'}, + 'threshold': {'key': 'properties.threshold', 'type': 'str'}, + 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Policy, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.status = kwargs.get('status', None) + self.fact_name = kwargs.get('fact_name', None) + self.fact_data = kwargs.get('fact_data', None) + self.threshold = kwargs.get('threshold', None) + self.evaluator_type = kwargs.get('evaluator_type', None) + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class PolicyFragment(UpdateResource): + """A Policy. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the policy. + :type description: str + :param status: The status of the policy. Possible values include: + 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus + :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, + MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', + 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', + 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', + 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' + :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName + :param fact_data: The fact data of the policy. + :type fact_data: str + :param threshold: The threshold of the policy (i.e. a number for + MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). + :type threshold: str + :param evaluator_type: The evaluator type of the policy (i.e. + AllowedValuesPolicy, MaxValuePolicy). Possible values include: + 'AllowedValuesPolicy', 'MaxValuePolicy' + :type evaluator_type: str or + ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'fact_name': {'key': 'properties.factName', 'type': 'str'}, + 'fact_data': {'key': 'properties.factData', 'type': 'str'}, + 'threshold': {'key': 'properties.threshold', 'type': 'str'}, + 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PolicyFragment, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.status = kwargs.get('status', None) + self.fact_name = kwargs.get('fact_name', None) + self.fact_data = kwargs.get('fact_data', None) + self.threshold = kwargs.get('threshold', None) + self.evaluator_type = kwargs.get('evaluator_type', None) + + +class PolicySetResult(Model): + """Result of a policy set evaluation. + + :param has_error: A value indicating whether this policy set evaluation + has discovered violations. + :type has_error: bool + :param policy_violations: The list of policy violations. + :type policy_violations: + list[~azure.mgmt.devtestlabs.models.PolicyViolation] + """ + + _attribute_map = { + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'policy_violations': {'key': 'policyViolations', 'type': '[PolicyViolation]'}, + } + + def __init__(self, **kwargs): + super(PolicySetResult, self).__init__(**kwargs) + self.has_error = kwargs.get('has_error', None) + self.policy_violations = kwargs.get('policy_violations', None) + + +class PolicyViolation(Model): + """Policy violation. + + :param code: The code of the policy violation. + :type code: str + :param message: The message of the policy violation. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PolicyViolation, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class Port(Model): + """Properties of a network port. + + :param transport_protocol: Protocol type of the port. Possible values + include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param backend_port: Backend port of the target virtual machine. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(Port, self).__init__(**kwargs) + self.transport_protocol = kwargs.get('transport_protocol', None) + self.backend_port = kwargs.get('backend_port', None) + + +class PortFragment(Model): + """Properties of a network port. + + :param transport_protocol: Protocol type of the port. Possible values + include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param backend_port: Backend port of the target virtual machine. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(PortFragment, self).__init__(**kwargs) + self.transport_protocol = kwargs.get('transport_protocol', None) + self.backend_port = kwargs.get('backend_port', None) + + +class RdpConnection(Model): + """Represents a .rdp file. + + :param contents: The contents of the .rdp file + :type contents: str + """ + + _attribute_map = { + 'contents': {'key': 'contents', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RdpConnection, self).__init__(**kwargs) + self.contents = kwargs.get('contents', None) + + +class ResizeLabVirtualMachineProperties(Model): + """Request body for resizing a virtual machine. + + :param size: Specifies the size of the virtual machine. + :type size: str + """ + + _attribute_map = { + 'size': {'key': 'size', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResizeLabVirtualMachineProperties, self).__init__(**kwargs) + self.size = kwargs.get('size', None) + + +class RetargetScheduleProperties(Model): + """Properties for retargeting a virtual machine schedule. + + :param current_resource_id: The resource Id of the virtual machine on + which the schedule operates + :type current_resource_id: str + :param target_resource_id: The resource Id of the virtual machine that the + schedule should be retargeted to + :type target_resource_id: str + """ + + _attribute_map = { + 'current_resource_id': {'key': 'currentResourceId', 'type': 'str'}, + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RetargetScheduleProperties, self).__init__(**kwargs) + self.current_resource_id = kwargs.get('current_resource_id', None) + self.target_resource_id = kwargs.get('target_resource_id', None) + + +class Schedule(Resource): + """A schedule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettings + :ivar created_date: The creation date of the schedule. + :vartype created_date: datetime + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Schedule, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.task_type = kwargs.get('task_type', None) + self.weekly_recurrence = kwargs.get('weekly_recurrence', None) + self.daily_recurrence = kwargs.get('daily_recurrence', None) + self.hourly_recurrence = kwargs.get('hourly_recurrence', None) + self.time_zone_id = kwargs.get('time_zone_id', None) + self.notification_settings = kwargs.get('notification_settings', None) + self.created_date = None + self.target_resource_id = kwargs.get('target_resource_id', None) + self.provisioning_state = None + self.unique_identifier = None + + +class ScheduleCreationParameter(Model): + """Properties for creating a schedule. + + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettings + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ScheduleCreationParameter, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.task_type = kwargs.get('task_type', None) + self.weekly_recurrence = kwargs.get('weekly_recurrence', None) + self.daily_recurrence = kwargs.get('daily_recurrence', None) + self.hourly_recurrence = kwargs.get('hourly_recurrence', None) + self.time_zone_id = kwargs.get('time_zone_id', None) + self.notification_settings = kwargs.get('notification_settings', None) + self.target_resource_id = kwargs.get('target_resource_id', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ScheduleCreationParameterFragment(Model): + """Properties for creating a schedule. + + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: + ~azure.mgmt.devtestlabs.models.WeekDetailsFragment + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: + ~azure.mgmt.devtestlabs.models.HourDetailsFragment + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ScheduleCreationParameterFragment, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.task_type = kwargs.get('task_type', None) + self.weekly_recurrence = kwargs.get('weekly_recurrence', None) + self.daily_recurrence = kwargs.get('daily_recurrence', None) + self.hourly_recurrence = kwargs.get('hourly_recurrence', None) + self.time_zone_id = kwargs.get('time_zone_id', None) + self.notification_settings = kwargs.get('notification_settings', None) + self.target_resource_id = kwargs.get('target_resource_id', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ScheduleFragment(UpdateResource): + """A schedule. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: + ~azure.mgmt.devtestlabs.models.WeekDetailsFragment + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: + ~azure.mgmt.devtestlabs.models.HourDetailsFragment + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ScheduleFragment, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.task_type = kwargs.get('task_type', None) + self.weekly_recurrence = kwargs.get('weekly_recurrence', None) + self.daily_recurrence = kwargs.get('daily_recurrence', None) + self.hourly_recurrence = kwargs.get('hourly_recurrence', None) + self.time_zone_id = kwargs.get('time_zone_id', None) + self.notification_settings = kwargs.get('notification_settings', None) + self.target_resource_id = kwargs.get('target_resource_id', None) + + +class Secret(Resource): + """A secret. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param value: The value of the secret for secret creation. + :type value: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Secret, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.provisioning_state = None + self.unique_identifier = None + + +class SecretFragment(UpdateResource): + """A secret. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param value: The value of the secret for secret creation. + :type value: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretFragment, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class ServiceFabric(Resource): + """A Service Fabric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param external_service_fabric_id: The backing service fabric resource's + id + :type external_service_fabric_id: str + :param environment_id: The resource id of the environment under which the + service fabric resource is present + :type environment_id: str + :ivar applicable_schedule: The applicable schedule for the virtual + machine. + :vartype applicable_schedule: + ~azure.mgmt.devtestlabs.models.ApplicableSchedule + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'applicable_schedule': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceFabric, self).__init__(**kwargs) + self.external_service_fabric_id = kwargs.get('external_service_fabric_id', None) + self.environment_id = kwargs.get('environment_id', None) + self.applicable_schedule = None + self.provisioning_state = None + self.unique_identifier = None + + +class ServiceFabricFragment(UpdateResource): + """A Service Fabric. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param external_service_fabric_id: The backing service fabric resource's + id + :type external_service_fabric_id: str + :param environment_id: The resource id of the environment under which the + service fabric resource is present + :type environment_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceFabricFragment, self).__init__(**kwargs) + self.external_service_fabric_id = kwargs.get('external_service_fabric_id', None) + self.environment_id = kwargs.get('environment_id', None) + + +class ServiceRunner(Resource): + """A container for a managed identity to execute DevTest lab services. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.devtestlabs.models.IdentityProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, + } + + def __init__(self, **kwargs): + super(ServiceRunner, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + + +class SharedPublicIpAddressConfiguration(Model): + """Properties of a virtual machine that determine how it is connected to a + load balancer. + + :param inbound_nat_rules: The incoming NAT rules + :type inbound_nat_rules: + list[~azure.mgmt.devtestlabs.models.InboundNatRule] + """ + + _attribute_map = { + 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRule]'}, + } + + def __init__(self, **kwargs): + super(SharedPublicIpAddressConfiguration, self).__init__(**kwargs) + self.inbound_nat_rules = kwargs.get('inbound_nat_rules', None) + + +class SharedPublicIpAddressConfigurationFragment(Model): + """Properties of a virtual machine that determine how it is connected to a + load balancer. + + :param inbound_nat_rules: The incoming NAT rules + :type inbound_nat_rules: + list[~azure.mgmt.devtestlabs.models.InboundNatRuleFragment] + """ + + _attribute_map = { + 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRuleFragment]'}, + } + + def __init__(self, **kwargs): + super(SharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) + self.inbound_nat_rules = kwargs.get('inbound_nat_rules', None) + + +class ShutdownNotificationContent(Model): + """The contents of a shutdown notification. Webhooks can use this type to + deserialize the request body when they get notified of an imminent + shutdown. + + :param skip_url: The URL to skip auto-shutdown. + :type skip_url: str + :param delay_url60: The URL to delay shutdown by 60 minutes. + :type delay_url60: str + :param delay_url120: The URL to delay shutdown by 2 hours. + :type delay_url120: str + :param vm_name: The virtual machine to be shut down. + :type vm_name: str + :param guid: The GUID for the virtual machine to be shut down. + :type guid: str + :param owner: The owner of the virtual machine. + :type owner: str + :param vm_url: The URL of the virtual machine. + :type vm_url: str + :param minutes_until_shutdown: Minutes remaining until shutdown + :type minutes_until_shutdown: str + :param event_type: The event for which a notification will be sent. + :type event_type: str + :param text: The text for the notification. + :type text: str + :param subscription_id: The subscription ID for the schedule. + :type subscription_id: str + :param resource_group_name: The resource group name for the schedule. + :type resource_group_name: str + :param lab_name: The lab for the schedule. + :type lab_name: str + """ + + _attribute_map = { + 'skip_url': {'key': 'skipUrl', 'type': 'str'}, + 'delay_url60': {'key': 'delayUrl60', 'type': 'str'}, + 'delay_url120': {'key': 'delayUrl120', 'type': 'str'}, + 'vm_name': {'key': 'vmName', 'type': 'str'}, + 'guid': {'key': 'guid', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'str'}, + 'vm_url': {'key': 'vmUrl', 'type': 'str'}, + 'minutes_until_shutdown': {'key': 'minutesUntilShutdown', 'type': 'str'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'lab_name': {'key': 'labName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ShutdownNotificationContent, self).__init__(**kwargs) + self.skip_url = kwargs.get('skip_url', None) + self.delay_url60 = kwargs.get('delay_url60', None) + self.delay_url120 = kwargs.get('delay_url120', None) + self.vm_name = kwargs.get('vm_name', None) + self.guid = kwargs.get('guid', None) + self.owner = kwargs.get('owner', None) + self.vm_url = kwargs.get('vm_url', None) + self.minutes_until_shutdown = kwargs.get('minutes_until_shutdown', None) + self.event_type = kwargs.get('event_type', None) + self.text = kwargs.get('text', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group_name = kwargs.get('resource_group_name', None) + self.lab_name = kwargs.get('lab_name', None) + + +class Subnet(Model): + """Subnet information. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name of the subnet as seen in the lab. + :type lab_subnet_name: str + :param allow_public_ip: The permission policy of the subnet for allowing + public IP addresses (i.e. Allow, Deny)). Possible values include: + 'Default', 'Deny', 'Allow' + :type allow_public_ip: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Subnet, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.allow_public_ip = kwargs.get('allow_public_ip', None) + + +class SubnetFragment(Model): + """Subnet information. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name of the subnet as seen in the lab. + :type lab_subnet_name: str + :param allow_public_ip: The permission policy of the subnet for allowing + public IP addresses (i.e. Allow, Deny)). Possible values include: + 'Default', 'Deny', 'Allow' + :type allow_public_ip: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubnetFragment, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.allow_public_ip = kwargs.get('allow_public_ip', None) + + +class SubnetOverride(Model): + """Property overrides on a subnet of a virtual network. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name given to the subnet within the lab. + :type lab_subnet_name: str + :param use_in_vm_creation_permission: Indicates whether this subnet can be + used during virtual machine creation (i.e. Allow, Deny). Possible values + include: 'Default', 'Deny', 'Allow' + :type use_in_vm_creation_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param use_public_ip_address_permission: Indicates whether public IP + addresses can be assigned to virtual machines on this subnet (i.e. Allow, + Deny). Possible values include: 'Default', 'Deny', 'Allow' + :type use_public_ip_address_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param shared_public_ip_address_configuration: Properties that virtual + machines on this subnet will share. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfiguration + :param virtual_network_pool_name: The virtual network pool associated with + this subnet. + :type virtual_network_pool_name: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, + 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfiguration'}, + 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubnetOverride, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.use_in_vm_creation_permission = kwargs.get('use_in_vm_creation_permission', None) + self.use_public_ip_address_permission = kwargs.get('use_public_ip_address_permission', None) + self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) + self.virtual_network_pool_name = kwargs.get('virtual_network_pool_name', None) + + +class SubnetOverrideFragment(Model): + """Property overrides on a subnet of a virtual network. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name given to the subnet within the lab. + :type lab_subnet_name: str + :param use_in_vm_creation_permission: Indicates whether this subnet can be + used during virtual machine creation (i.e. Allow, Deny). Possible values + include: 'Default', 'Deny', 'Allow' + :type use_in_vm_creation_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param use_public_ip_address_permission: Indicates whether public IP + addresses can be assigned to virtual machines on this subnet (i.e. Allow, + Deny). Possible values include: 'Default', 'Deny', 'Allow' + :type use_public_ip_address_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param shared_public_ip_address_configuration: Properties that virtual + machines on this subnet will share. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfigurationFragment + :param virtual_network_pool_name: The virtual network pool associated with + this subnet. + :type virtual_network_pool_name: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, + 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfigurationFragment'}, + 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubnetOverrideFragment, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.use_in_vm_creation_permission = kwargs.get('use_in_vm_creation_permission', None) + self.use_public_ip_address_permission = kwargs.get('use_public_ip_address_permission', None) + self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) + self.virtual_network_pool_name = kwargs.get('virtual_network_pool_name', None) + + +class SubnetSharedPublicIpAddressConfiguration(Model): + """Configuration for public IP address sharing. + + :param allowed_ports: Backend ports that virtual machines on this subnet + are allowed to expose + :type allowed_ports: list[~azure.mgmt.devtestlabs.models.Port] + """ + + _attribute_map = { + 'allowed_ports': {'key': 'allowedPorts', 'type': '[Port]'}, + } + + def __init__(self, **kwargs): + super(SubnetSharedPublicIpAddressConfiguration, self).__init__(**kwargs) + self.allowed_ports = kwargs.get('allowed_ports', None) + + +class SubnetSharedPublicIpAddressConfigurationFragment(Model): + """Configuration for public IP address sharing. + + :param allowed_ports: Backend ports that virtual machines on this subnet + are allowed to expose + :type allowed_ports: list[~azure.mgmt.devtestlabs.models.PortFragment] + """ + + _attribute_map = { + 'allowed_ports': {'key': 'allowedPorts', 'type': '[PortFragment]'}, + } + + def __init__(self, **kwargs): + super(SubnetSharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) + self.allowed_ports = kwargs.get('allowed_ports', None) + + +class TargetCostProperties(Model): + """Properties of a cost target. + + :param status: Target cost status. Possible values include: 'Enabled', + 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.TargetCostStatus + :param target: Lab target cost + :type target: int + :param cost_thresholds: Cost thresholds. + :type cost_thresholds: + list[~azure.mgmt.devtestlabs.models.CostThresholdProperties] + :param cycle_start_date_time: Reporting cycle start date. + :type cycle_start_date_time: datetime + :param cycle_end_date_time: Reporting cycle end date. + :type cycle_end_date_time: datetime + :param cycle_type: Reporting cycle type. Possible values include: + 'CalendarMonth', 'Custom' + :type cycle_type: str or ~azure.mgmt.devtestlabs.models.ReportingCycleType + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'int'}, + 'cost_thresholds': {'key': 'costThresholds', 'type': '[CostThresholdProperties]'}, + 'cycle_start_date_time': {'key': 'cycleStartDateTime', 'type': 'iso-8601'}, + 'cycle_end_date_time': {'key': 'cycleEndDateTime', 'type': 'iso-8601'}, + 'cycle_type': {'key': 'cycleType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TargetCostProperties, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.target = kwargs.get('target', None) + self.cost_thresholds = kwargs.get('cost_thresholds', None) + self.cycle_start_date_time = kwargs.get('cycle_start_date_time', None) + self.cycle_end_date_time = kwargs.get('cycle_end_date_time', None) + self.cycle_type = kwargs.get('cycle_type', None) + + +class User(Resource): + """Profile of a lab user. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the user. + :type identity: ~azure.mgmt.devtestlabs.models.UserIdentity + :param secret_store: The secret store of the user. + :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStore + :ivar created_date: The creation date of the user profile. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'properties.identity', 'type': 'UserIdentity'}, + 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStore'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(User, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.secret_store = kwargs.get('secret_store', None) + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class UserFragment(UpdateResource): + """Profile of a lab user. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the user. + :type identity: ~azure.mgmt.devtestlabs.models.UserIdentityFragment + :param secret_store: The secret store of the user. + :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStoreFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'properties.identity', 'type': 'UserIdentityFragment'}, + 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStoreFragment'}, + } + + def __init__(self, **kwargs): + super(UserFragment, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.secret_store = kwargs.get('secret_store', None) + + +class UserIdentity(Model): + """Identity attributes of a lab user. + + :param principal_name: Set to the principal name / UPN of the client JWT + making the request. + :type principal_name: str + :param principal_id: Set to the principal Id of the client JWT making the + request. Service principal will not have the principal Id. + :type principal_id: str + :param tenant_id: Set to the tenant ID of the client JWT making the + request. + :type tenant_id: str + :param object_id: Set to the object Id of the client JWT making the + request. Not all users have object Id. For CSP (reseller) scenarios for + example, object Id is not available. + :type object_id: str + :param app_id: Set to the app Id of the client JWT making the request. + :type app_id: str + """ + + _attribute_map = { + 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'app_id': {'key': 'appId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserIdentity, self).__init__(**kwargs) + self.principal_name = kwargs.get('principal_name', None) + self.principal_id = kwargs.get('principal_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.object_id = kwargs.get('object_id', None) + self.app_id = kwargs.get('app_id', None) + + +class UserIdentityFragment(Model): + """Identity attributes of a lab user. + + :param principal_name: Set to the principal name / UPN of the client JWT + making the request. + :type principal_name: str + :param principal_id: Set to the principal Id of the client JWT making the + request. Service principal will not have the principal Id. + :type principal_id: str + :param tenant_id: Set to the tenant ID of the client JWT making the + request. + :type tenant_id: str + :param object_id: Set to the object Id of the client JWT making the + request. Not all users have object Id. For CSP (reseller) scenarios for + example, object Id is not available. + :type object_id: str + :param app_id: Set to the app Id of the client JWT making the request. + :type app_id: str + """ + + _attribute_map = { + 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'app_id': {'key': 'appId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserIdentityFragment, self).__init__(**kwargs) + self.principal_name = kwargs.get('principal_name', None) + self.principal_id = kwargs.get('principal_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.object_id = kwargs.get('object_id', None) + self.app_id = kwargs.get('app_id', None) + + +class UserSecretStore(Model): + """Properties of a user's secret store. + + :param key_vault_uri: The URI of the user's Key vault. + :type key_vault_uri: str + :param key_vault_id: The ID of the user's Key vault. + :type key_vault_id: str + """ + + _attribute_map = { + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserSecretStore, self).__init__(**kwargs) + self.key_vault_uri = kwargs.get('key_vault_uri', None) + self.key_vault_id = kwargs.get('key_vault_id', None) + + +class UserSecretStoreFragment(Model): + """Properties of a user's secret store. + + :param key_vault_uri: The URI of the user's Key vault. + :type key_vault_uri: str + :param key_vault_id: The ID of the user's Key vault. + :type key_vault_id: str + """ + + _attribute_map = { + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserSecretStoreFragment, self).__init__(**kwargs) + self.key_vault_uri = kwargs.get('key_vault_uri', None) + self.key_vault_id = kwargs.get('key_vault_id', None) + + +class VirtualNetwork(Resource): + """A virtual network. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param allowed_subnets: The allowed subnets of the virtual network. + :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.Subnet] + :param description: The description of the virtual network. + :type description: str + :param external_provider_resource_id: The Microsoft.Network resource + identifier of the virtual network. + :type external_provider_resource_id: str + :ivar external_subnets: The external subnet properties. + :vartype external_subnets: + list[~azure.mgmt.devtestlabs.models.ExternalSubnet] + :param subnet_overrides: The subnet overrides of the virtual network. + :type subnet_overrides: + list[~azure.mgmt.devtestlabs.models.SubnetOverride] + :ivar created_date: The creation date of the virtual network. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'external_subnets': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[Subnet]'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, + 'external_subnets': {'key': 'properties.externalSubnets', 'type': '[ExternalSubnet]'}, + 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverride]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualNetwork, self).__init__(**kwargs) + self.allowed_subnets = kwargs.get('allowed_subnets', None) + self.description = kwargs.get('description', None) + self.external_provider_resource_id = kwargs.get('external_provider_resource_id', None) + self.external_subnets = None + self.subnet_overrides = kwargs.get('subnet_overrides', None) + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class VirtualNetworkFragment(UpdateResource): + """A virtual network. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param allowed_subnets: The allowed subnets of the virtual network. + :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.SubnetFragment] + :param description: The description of the virtual network. + :type description: str + :param external_provider_resource_id: The Microsoft.Network resource + identifier of the virtual network. + :type external_provider_resource_id: str + :param subnet_overrides: The subnet overrides of the virtual network. + :type subnet_overrides: + list[~azure.mgmt.devtestlabs.models.SubnetOverrideFragment] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[SubnetFragment]'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, + 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverrideFragment]'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkFragment, self).__init__(**kwargs) + self.allowed_subnets = kwargs.get('allowed_subnets', None) + self.description = kwargs.get('description', None) + self.external_provider_resource_id = kwargs.get('external_provider_resource_id', None) + self.subnet_overrides = kwargs.get('subnet_overrides', None) + + +class WeekDetails(Model): + """Properties of a weekly schedule. + + :param weekdays: The days of the week for which the schedule is set (e.g. + Sunday, Monday, Tuesday, etc.). + :type weekdays: list[str] + :param time: The time of the day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'weekdays': {'key': 'weekdays', 'type': '[str]'}, + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WeekDetails, self).__init__(**kwargs) + self.weekdays = kwargs.get('weekdays', None) + self.time = kwargs.get('time', None) + + +class WeekDetailsFragment(Model): + """Properties of a weekly schedule. + + :param weekdays: The days of the week for which the schedule is set (e.g. + Sunday, Monday, Tuesday, etc.). + :type weekdays: list[str] + :param time: The time of the day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'weekdays': {'key': 'weekdays', 'type': '[str]'}, + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WeekDetailsFragment, self).__init__(**kwargs) + self.weekdays = kwargs.get('weekdays', None) + self.time = kwargs.get('time', None) + + +class WindowsOsInfo(Model): + """Information about a Windows OS. + + :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, + SysprepRequested, SysprepApplied). Possible values include: + 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' + :type windows_os_state: str or + ~azure.mgmt.devtestlabs.models.WindowsOsState + """ + + _attribute_map = { + 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WindowsOsInfo, self).__init__(**kwargs) + self.windows_os_state = kwargs.get('windows_os_state', None) + + +class WindowsOsInfoFragment(Model): + """Information about a Windows OS. + + :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, + SysprepRequested, SysprepApplied). Possible values include: + 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' + :type windows_os_state: str or + ~azure.mgmt.devtestlabs.models.WindowsOsState + """ + + _attribute_map = { + 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WindowsOsInfoFragment, self).__init__(**kwargs) + self.windows_os_state = kwargs.get('windows_os_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models_py3.py new file mode 100644 index 000000000000..17a0bd5726ce --- /dev/null +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models_py3.py @@ -0,0 +1,5702 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Resource(Model): + """An Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class ApplicableSchedule(Resource): + """Schedules applicable to a virtual machine. The schedules may have been + defined on a VM or on lab level. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set + at the lab or lab resource level. + :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.Schedule + :param lab_vms_startup: The auto-startup schedule, if one has been set at + the lab or lab resource level. + :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.Schedule + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'Schedule'}, + 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'Schedule'}, + } + + def __init__(self, *, location: str=None, tags=None, lab_vms_shutdown=None, lab_vms_startup=None, **kwargs) -> None: + super(ApplicableSchedule, self).__init__(location=location, tags=tags, **kwargs) + self.lab_vms_shutdown = lab_vms_shutdown + self.lab_vms_startup = lab_vms_startup + + +class UpdateResource(Model): + """Represents an update resource. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(UpdateResource, self).__init__(**kwargs) + self.tags = tags + + +class ApplicableScheduleFragment(UpdateResource): + """Schedules applicable to a virtual machine. The schedules may have been + defined on a VM or on lab level. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set + at the lab or lab resource level. + :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.ScheduleFragment + :param lab_vms_startup: The auto-startup schedule, if one has been set at + the lab or lab resource level. + :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.ScheduleFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'ScheduleFragment'}, + 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'ScheduleFragment'}, + } + + def __init__(self, *, tags=None, lab_vms_shutdown=None, lab_vms_startup=None, **kwargs) -> None: + super(ApplicableScheduleFragment, self).__init__(tags=tags, **kwargs) + self.lab_vms_shutdown = lab_vms_shutdown + self.lab_vms_startup = lab_vms_startup + + +class ApplyArtifactsRequest(Model): + """Request body for applying artifacts to a virtual machine. + + :param artifacts: The list of artifacts to apply. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + """ + + _attribute_map = { + 'artifacts': {'key': 'artifacts', 'type': '[ArtifactInstallProperties]'}, + } + + def __init__(self, *, artifacts=None, **kwargs) -> None: + super(ApplyArtifactsRequest, self).__init__(**kwargs) + self.artifacts = artifacts + + +class ArmTemplate(Resource): + """An Azure Resource Manager template. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar display_name: The display name of the ARM template. + :vartype display_name: str + :ivar description: The description of the ARM template. + :vartype description: str + :ivar publisher: The publisher of the ARM template. + :vartype publisher: str + :ivar icon: The URI to the icon of the ARM template. + :vartype icon: str + :ivar contents: The contents of the ARM template. + :vartype contents: object + :ivar created_date: The creation date of the armTemplate. + :vartype created_date: datetime + :ivar parameters_value_files_info: File name and parameter values + information from all azuredeploy.*.parameters.json for the ARM template. + :vartype parameters_value_files_info: + list[~azure.mgmt.devtestlabs.models.ParametersValueFileInfo] + :ivar enabled: Whether or not ARM template is enabled for use by lab user. + :vartype enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'publisher': {'readonly': True}, + 'icon': {'readonly': True}, + 'contents': {'readonly': True}, + 'created_date': {'readonly': True}, + 'parameters_value_files_info': {'readonly': True}, + 'enabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'contents': {'key': 'properties.contents', 'type': 'object'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'parameters_value_files_info': {'key': 'properties.parametersValueFilesInfo', 'type': '[ParametersValueFileInfo]'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(ArmTemplate, self).__init__(location=location, tags=tags, **kwargs) + self.display_name = None + self.description = None + self.publisher = None + self.icon = None + self.contents = None + self.created_date = None + self.parameters_value_files_info = None + self.enabled = None + + +class ArmTemplateInfo(Model): + """Information about a generated ARM template. + + :param template: The template's contents. + :type template: object + :param parameters: The parameters of the ARM template. + :type parameters: object + """ + + _attribute_map = { + 'template': {'key': 'template', 'type': 'object'}, + 'parameters': {'key': 'parameters', 'type': 'object'}, + } + + def __init__(self, *, template=None, parameters=None, **kwargs) -> None: + super(ArmTemplateInfo, self).__init__(**kwargs) + self.template = template + self.parameters = parameters + + +class ArmTemplateParameterProperties(Model): + """Properties of an Azure Resource Manager template parameter. + + :param name: The name of the template parameter. + :type name: str + :param value: The value of the template parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ArmTemplateParameterProperties, self).__init__(**kwargs) + self.name = name + self.value = value + + +class ArmTemplateParameterPropertiesFragment(Model): + """Properties of an Azure Resource Manager template parameter. + + :param name: The name of the template parameter. + :type name: str + :param value: The value of the template parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ArmTemplateParameterPropertiesFragment, self).__init__(**kwargs) + self.name = name + self.value = value + + +class Artifact(Resource): + """An artifact. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar title: The artifact's title. + :vartype title: str + :ivar description: The artifact's description. + :vartype description: str + :ivar publisher: The artifact's publisher. + :vartype publisher: str + :ivar file_path: The file path to the artifact. + :vartype file_path: str + :ivar icon: The URI to the artifact icon. + :vartype icon: str + :ivar target_os_type: The artifact's target OS. + :vartype target_os_type: str + :ivar parameters: The artifact's parameters. + :vartype parameters: object + :ivar created_date: The artifact's creation date. + :vartype created_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'title': {'readonly': True}, + 'description': {'readonly': True}, + 'publisher': {'readonly': True}, + 'file_path': {'readonly': True}, + 'icon': {'readonly': True}, + 'target_os_type': {'readonly': True}, + 'parameters': {'readonly': True}, + 'created_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'file_path': {'key': 'properties.filePath', 'type': 'str'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'target_os_type': {'key': 'properties.targetOsType', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': 'object'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(Artifact, self).__init__(location=location, tags=tags, **kwargs) + self.title = None + self.description = None + self.publisher = None + self.file_path = None + self.icon = None + self.target_os_type = None + self.parameters = None + self.created_date = None + + +class ArtifactDeploymentStatusProperties(Model): + """Properties of an artifact deployment. + + :param deployment_status: The deployment status of the artifact. + :type deployment_status: str + :param artifacts_applied: The total count of the artifacts that were + successfully applied. + :type artifacts_applied: int + :param total_artifacts: The total count of the artifacts that were + tentatively applied. + :type total_artifacts: int + """ + + _attribute_map = { + 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, + 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, + 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, + } + + def __init__(self, *, deployment_status: str=None, artifacts_applied: int=None, total_artifacts: int=None, **kwargs) -> None: + super(ArtifactDeploymentStatusProperties, self).__init__(**kwargs) + self.deployment_status = deployment_status + self.artifacts_applied = artifacts_applied + self.total_artifacts = total_artifacts + + +class ArtifactDeploymentStatusPropertiesFragment(Model): + """Properties of an artifact deployment. + + :param deployment_status: The deployment status of the artifact. + :type deployment_status: str + :param artifacts_applied: The total count of the artifacts that were + successfully applied. + :type artifacts_applied: int + :param total_artifacts: The total count of the artifacts that were + tentatively applied. + :type total_artifacts: int + """ + + _attribute_map = { + 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, + 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, + 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, + } + + def __init__(self, *, deployment_status: str=None, artifacts_applied: int=None, total_artifacts: int=None, **kwargs) -> None: + super(ArtifactDeploymentStatusPropertiesFragment, self).__init__(**kwargs) + self.deployment_status = deployment_status + self.artifacts_applied = artifacts_applied + self.total_artifacts = total_artifacts + + +class ArtifactInstallProperties(Model): + """Properties of an artifact. + + :param artifact_id: The artifact's identifier. + :type artifact_id: str + :param artifact_title: The artifact's title. + :type artifact_title: str + :param parameters: The parameters of the artifact. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArtifactParameterProperties] + :param status: The status of the artifact. + :type status: str + :param deployment_status_message: The status message from the deployment. + :type deployment_status_message: str + :param vm_extension_status_message: The status message from the virtual + machine extension. + :type vm_extension_status_message: str + :param install_time: The time that the artifact starts to install on the + virtual machine. + :type install_time: datetime + """ + + _attribute_map = { + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterProperties]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, + 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, + 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, artifact_id: str=None, artifact_title: str=None, parameters=None, status: str=None, deployment_status_message: str=None, vm_extension_status_message: str=None, install_time=None, **kwargs) -> None: + super(ArtifactInstallProperties, self).__init__(**kwargs) + self.artifact_id = artifact_id + self.artifact_title = artifact_title + self.parameters = parameters + self.status = status + self.deployment_status_message = deployment_status_message + self.vm_extension_status_message = vm_extension_status_message + self.install_time = install_time + + +class ArtifactInstallPropertiesFragment(Model): + """Properties of an artifact. + + :param artifact_id: The artifact's identifier. + :type artifact_id: str + :param artifact_title: The artifact's title. + :type artifact_title: str + :param parameters: The parameters of the artifact. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArtifactParameterPropertiesFragment] + :param status: The status of the artifact. + :type status: str + :param deployment_status_message: The status message from the deployment. + :type deployment_status_message: str + :param vm_extension_status_message: The status message from the virtual + machine extension. + :type vm_extension_status_message: str + :param install_time: The time that the artifact starts to install on the + virtual machine. + :type install_time: datetime + """ + + _attribute_map = { + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterPropertiesFragment]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, + 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, + 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, artifact_id: str=None, artifact_title: str=None, parameters=None, status: str=None, deployment_status_message: str=None, vm_extension_status_message: str=None, install_time=None, **kwargs) -> None: + super(ArtifactInstallPropertiesFragment, self).__init__(**kwargs) + self.artifact_id = artifact_id + self.artifact_title = artifact_title + self.parameters = parameters + self.status = status + self.deployment_status_message = deployment_status_message + self.vm_extension_status_message = vm_extension_status_message + self.install_time = install_time + + +class ArtifactParameterProperties(Model): + """Properties of an artifact parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ArtifactParameterProperties, self).__init__(**kwargs) + self.name = name + self.value = value + + +class ArtifactParameterPropertiesFragment(Model): + """Properties of an artifact parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ArtifactParameterPropertiesFragment, self).__init__(**kwargs) + self.name = name + self.value = value + + +class ArtifactSource(Resource): + """Properties of an artifact source. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param display_name: The artifact source's display name. + :type display_name: str + :param uri: The artifact source's URI. + :type uri: str + :param source_type: The artifact source's type. Possible values include: + 'VsoGit', 'GitHub' + :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType + :param folder_path: The folder containing artifacts. + :type folder_path: str + :param arm_template_folder_path: The folder containing Azure Resource + Manager templates. + :type arm_template_folder_path: str + :param branch_ref: The artifact source's branch reference. + :type branch_ref: str + :param security_token: The security token to authenticate to the artifact + source. + :type security_token: str + :param status: Indicates if the artifact source is enabled (values: + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :ivar created_date: The artifact source's creation date. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, + 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, + 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, display_name: str=None, uri: str=None, source_type=None, folder_path: str=None, arm_template_folder_path: str=None, branch_ref: str=None, security_token: str=None, status=None, **kwargs) -> None: + super(ArtifactSource, self).__init__(location=location, tags=tags, **kwargs) + self.display_name = display_name + self.uri = uri + self.source_type = source_type + self.folder_path = folder_path + self.arm_template_folder_path = arm_template_folder_path + self.branch_ref = branch_ref + self.security_token = security_token + self.status = status + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class ArtifactSourceFragment(UpdateResource): + """Properties of an artifact source. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param display_name: The artifact source's display name. + :type display_name: str + :param uri: The artifact source's URI. + :type uri: str + :param source_type: The artifact source's type. Possible values include: + 'VsoGit', 'GitHub' + :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType + :param folder_path: The folder containing artifacts. + :type folder_path: str + :param arm_template_folder_path: The folder containing Azure Resource + Manager templates. + :type arm_template_folder_path: str + :param branch_ref: The artifact source's branch reference. + :type branch_ref: str + :param security_token: The security token to authenticate to the artifact + source. + :type security_token: str + :param status: Indicates if the artifact source is enabled (values: + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, + 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, + 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + } + + def __init__(self, *, tags=None, display_name: str=None, uri: str=None, source_type=None, folder_path: str=None, arm_template_folder_path: str=None, branch_ref: str=None, security_token: str=None, status=None, **kwargs) -> None: + super(ArtifactSourceFragment, self).__init__(tags=tags, **kwargs) + self.display_name = display_name + self.uri = uri + self.source_type = source_type + self.folder_path = folder_path + self.arm_template_folder_path = arm_template_folder_path + self.branch_ref = branch_ref + self.security_token = security_token + self.status = status + + +class AttachDiskProperties(Model): + """Properties of the disk to attach. + + :param leased_by_lab_vm_id: The resource ID of the Lab virtual machine to + which the disk is attached. + :type leased_by_lab_vm_id: str + """ + + _attribute_map = { + 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, + } + + def __init__(self, *, leased_by_lab_vm_id: str=None, **kwargs) -> None: + super(AttachDiskProperties, self).__init__(**kwargs) + self.leased_by_lab_vm_id = leased_by_lab_vm_id + + +class AttachNewDataDiskOptions(Model): + """Properties to attach new disk to the Virtual Machine. + + :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :type disk_size_gi_b: int + :param disk_name: The name of the disk to be attached. + :type disk_name: str + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + 'disk_name': {'key': 'diskName', 'type': 'str'}, + 'disk_type': {'key': 'diskType', 'type': 'str'}, + } + + def __init__(self, *, disk_size_gi_b: int=None, disk_name: str=None, disk_type=None, **kwargs) -> None: + super(AttachNewDataDiskOptions, self).__init__(**kwargs) + self.disk_size_gi_b = disk_size_gi_b + self.disk_name = disk_name + self.disk_type = disk_type + + +class AttachNewDataDiskOptionsFragment(Model): + """Properties to attach new disk to the Virtual Machine. + + :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :type disk_size_gi_b: int + :param disk_name: The name of the disk to be attached. + :type disk_name: str + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + 'disk_name': {'key': 'diskName', 'type': 'str'}, + 'disk_type': {'key': 'diskType', 'type': 'str'}, + } + + def __init__(self, *, disk_size_gi_b: int=None, disk_name: str=None, disk_type=None, **kwargs) -> None: + super(AttachNewDataDiskOptionsFragment, self).__init__(**kwargs) + self.disk_size_gi_b = disk_size_gi_b + self.disk_name = disk_name + self.disk_type = disk_type + + +class BulkCreationParameters(Model): + """Parameters for creating multiple virtual machines as a single action. + + :param instance_count: The number of virtual machine instances to create. + :type instance_count: int + """ + + _attribute_map = { + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + } + + def __init__(self, *, instance_count: int=None, **kwargs) -> None: + super(BulkCreationParameters, self).__init__(**kwargs) + self.instance_count = instance_count + + +class BulkCreationParametersFragment(Model): + """Parameters for creating multiple virtual machines as a single action. + + :param instance_count: The number of virtual machine instances to create. + :type instance_count: int + """ + + _attribute_map = { + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + } + + def __init__(self, *, instance_count: int=None, **kwargs) -> None: + super(BulkCreationParametersFragment, self).__init__(**kwargs) + self.instance_count = instance_count + + +class CloudError(Model): + """Error from a REST request. + + :param error: The cloud error that occurred + :type error: ~azure.mgmt.devtestlabs.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.error = error + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """Body of an error from a REST request. + + :param code: The error code. + :type code: str + :param message: The error message. + :type message: str + :param target: The error target. + :type target: str + :param details: Inner errors. + :type details: list[~azure.mgmt.devtestlabs.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class ComputeDataDisk(Model): + """A data disks attached to a virtual machine. + + :param name: Gets data disk name. + :type name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :param disk_size_gi_b: Gets data disk size in GiB. + :type disk_size_gi_b: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disk_uri': {'key': 'diskUri', 'type': 'str'}, + 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, disk_uri: str=None, managed_disk_id: str=None, disk_size_gi_b: int=None, **kwargs) -> None: + super(ComputeDataDisk, self).__init__(**kwargs) + self.name = name + self.disk_uri = disk_uri + self.managed_disk_id = managed_disk_id + self.disk_size_gi_b = disk_size_gi_b + + +class ComputeDataDiskFragment(Model): + """A data disks attached to a virtual machine. + + :param name: Gets data disk name. + :type name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :param disk_size_gi_b: Gets data disk size in GiB. + :type disk_size_gi_b: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disk_uri': {'key': 'diskUri', 'type': 'str'}, + 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, disk_uri: str=None, managed_disk_id: str=None, disk_size_gi_b: int=None, **kwargs) -> None: + super(ComputeDataDiskFragment, self).__init__(**kwargs) + self.name = name + self.disk_uri = disk_uri + self.managed_disk_id = managed_disk_id + self.disk_size_gi_b = disk_size_gi_b + + +class ComputeVmInstanceViewStatus(Model): + """Status information about a virtual machine. + + :param code: Gets the status Code. + :type code: str + :param display_status: Gets the short localizable label for the status. + :type display_status: str + :param message: Gets the message associated with the status. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, display_status: str=None, message: str=None, **kwargs) -> None: + super(ComputeVmInstanceViewStatus, self).__init__(**kwargs) + self.code = code + self.display_status = display_status + self.message = message + + +class ComputeVmInstanceViewStatusFragment(Model): + """Status information about a virtual machine. + + :param code: Gets the status Code. + :type code: str + :param display_status: Gets the short localizable label for the status. + :type display_status: str + :param message: Gets the message associated with the status. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, display_status: str=None, message: str=None, **kwargs) -> None: + super(ComputeVmInstanceViewStatusFragment, self).__init__(**kwargs) + self.code = code + self.display_status = display_status + self.message = message + + +class ComputeVmProperties(Model): + """Properties of a virtual machine returned by the Microsoft.Compute API. + + :param statuses: Gets the statuses of the virtual machine. + :type statuses: + list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatus] + :param os_type: Gets the OS type of the virtual machine. + :type os_type: str + :param vm_size: Gets the size of the virtual machine. + :type vm_size: str + :param network_interface_id: Gets the network interface ID of the virtual + machine. + :type network_interface_id: str + :param os_disk_id: Gets OS disk blob uri for the virtual machine. + :type os_disk_id: str + :param data_disk_ids: Gets data disks blob uri for the virtual machine. + :type data_disk_ids: list[str] + :param data_disks: Gets all data disks attached to the virtual machine. + :type data_disks: list[~azure.mgmt.devtestlabs.models.ComputeDataDisk] + """ + + _attribute_map = { + 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatus]'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, + 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, + 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDisk]'}, + } + + def __init__(self, *, statuses=None, os_type: str=None, vm_size: str=None, network_interface_id: str=None, os_disk_id: str=None, data_disk_ids=None, data_disks=None, **kwargs) -> None: + super(ComputeVmProperties, self).__init__(**kwargs) + self.statuses = statuses + self.os_type = os_type + self.vm_size = vm_size + self.network_interface_id = network_interface_id + self.os_disk_id = os_disk_id + self.data_disk_ids = data_disk_ids + self.data_disks = data_disks + + +class ComputeVmPropertiesFragment(Model): + """Properties of a virtual machine returned by the Microsoft.Compute API. + + :param statuses: Gets the statuses of the virtual machine. + :type statuses: + list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatusFragment] + :param os_type: Gets the OS type of the virtual machine. + :type os_type: str + :param vm_size: Gets the size of the virtual machine. + :type vm_size: str + :param network_interface_id: Gets the network interface ID of the virtual + machine. + :type network_interface_id: str + :param os_disk_id: Gets OS disk blob uri for the virtual machine. + :type os_disk_id: str + :param data_disk_ids: Gets data disks blob uri for the virtual machine. + :type data_disk_ids: list[str] + :param data_disks: Gets all data disks attached to the virtual machine. + :type data_disks: + list[~azure.mgmt.devtestlabs.models.ComputeDataDiskFragment] + """ + + _attribute_map = { + 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatusFragment]'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, + 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, + 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDiskFragment]'}, + } + + def __init__(self, *, statuses=None, os_type: str=None, vm_size: str=None, network_interface_id: str=None, os_disk_id: str=None, data_disk_ids=None, data_disks=None, **kwargs) -> None: + super(ComputeVmPropertiesFragment, self).__init__(**kwargs) + self.statuses = statuses + self.os_type = os_type + self.vm_size = vm_size + self.network_interface_id = network_interface_id + self.os_disk_id = os_disk_id + self.data_disk_ids = data_disk_ids + self.data_disks = data_disks + + +class CostThresholdProperties(Model): + """Properties of a cost threshold item. + + :param threshold_id: The ID of the cost threshold item. + :type threshold_id: str + :param percentage_threshold: The value of the percentage cost threshold. + :type percentage_threshold: + ~azure.mgmt.devtestlabs.models.PercentageCostThresholdProperties + :param display_on_chart: Indicates whether this threshold will be + displayed on cost charts. Possible values include: 'Enabled', 'Disabled' + :type display_on_chart: str or + ~azure.mgmt.devtestlabs.models.CostThresholdStatus + :param send_notification_when_exceeded: Indicates whether notifications + will be sent when this threshold is exceeded. Possible values include: + 'Enabled', 'Disabled' + :type send_notification_when_exceeded: str or + ~azure.mgmt.devtestlabs.models.CostThresholdStatus + :param notification_sent: Indicates the datetime when notifications were + last sent for this threshold. + :type notification_sent: str + """ + + _attribute_map = { + 'threshold_id': {'key': 'thresholdId', 'type': 'str'}, + 'percentage_threshold': {'key': 'percentageThreshold', 'type': 'PercentageCostThresholdProperties'}, + 'display_on_chart': {'key': 'displayOnChart', 'type': 'str'}, + 'send_notification_when_exceeded': {'key': 'sendNotificationWhenExceeded', 'type': 'str'}, + 'notification_sent': {'key': 'notificationSent', 'type': 'str'}, + } + + def __init__(self, *, threshold_id: str=None, percentage_threshold=None, display_on_chart=None, send_notification_when_exceeded=None, notification_sent: str=None, **kwargs) -> None: + super(CostThresholdProperties, self).__init__(**kwargs) + self.threshold_id = threshold_id + self.percentage_threshold = percentage_threshold + self.display_on_chart = display_on_chart + self.send_notification_when_exceeded = send_notification_when_exceeded + self.notification_sent = notification_sent + + +class CustomImage(Resource): + """A custom image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param vm: The virtual machine from which the image is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVm + :param vhd: The VHD from which the image is to be created. + :type vhd: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustom + :param description: The description of the custom image. + :type description: str + :param author: The author of the custom image. + :type author: str + :ivar creation_date: The creation date of the custom image. + :vartype creation_date: datetime + :param managed_image_id: The Managed Image Id backing the custom image. + :type managed_image_id: str + :param managed_snapshot_id: The Managed Snapshot Id backing the custom + image. + :type managed_snapshot_id: str + :param data_disk_storage_info: Storage information about the data disks + present in the custom image + :type data_disk_storage_info: + list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfo] + :param custom_image_plan: Storage information about the plan related to + this custom image + :type custom_image_plan: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlan + :param is_plan_authorized: Whether or not the custom images underlying + offer/plan has been enabled for programmatic deployment + :type is_plan_authorized: bool + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVm'}, + 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustom'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, + 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, + 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfo]'}, + 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlan'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, vm=None, vhd=None, description: str=None, author: str=None, managed_image_id: str=None, managed_snapshot_id: str=None, data_disk_storage_info=None, custom_image_plan=None, is_plan_authorized: bool=None, **kwargs) -> None: + super(CustomImage, self).__init__(location=location, tags=tags, **kwargs) + self.vm = vm + self.vhd = vhd + self.description = description + self.author = author + self.creation_date = None + self.managed_image_id = managed_image_id + self.managed_snapshot_id = managed_snapshot_id + self.data_disk_storage_info = data_disk_storage_info + self.custom_image_plan = custom_image_plan + self.is_plan_authorized = is_plan_authorized + self.provisioning_state = None + self.unique_identifier = None + + +class CustomImageFragment(UpdateResource): + """A custom image. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param vm: The virtual machine from which the image is to be created. + :type vm: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVmFragment + :param vhd: The VHD from which the image is to be created. + :type vhd: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustomFragment + :param description: The description of the custom image. + :type description: str + :param author: The author of the custom image. + :type author: str + :param managed_image_id: The Managed Image Id backing the custom image. + :type managed_image_id: str + :param managed_snapshot_id: The Managed Snapshot Id backing the custom + image. + :type managed_snapshot_id: str + :param data_disk_storage_info: Storage information about the data disks + present in the custom image + :type data_disk_storage_info: + list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfoFragment] + :param custom_image_plan: Storage information about the plan related to + this custom image + :type custom_image_plan: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlanFragment + :param is_plan_authorized: Whether or not the custom images underlying + offer/plan has been enabled for programmatic deployment + :type is_plan_authorized: bool + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVmFragment'}, + 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustomFragment'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, + 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, + 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfoFragment]'}, + 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlanFragment'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + } + + def __init__(self, *, tags=None, vm=None, vhd=None, description: str=None, author: str=None, managed_image_id: str=None, managed_snapshot_id: str=None, data_disk_storage_info=None, custom_image_plan=None, is_plan_authorized: bool=None, **kwargs) -> None: + super(CustomImageFragment, self).__init__(tags=tags, **kwargs) + self.vm = vm + self.vhd = vhd + self.description = description + self.author = author + self.managed_image_id = managed_image_id + self.managed_snapshot_id = managed_snapshot_id + self.data_disk_storage_info = data_disk_storage_info + self.custom_image_plan = custom_image_plan + self.is_plan_authorized = is_plan_authorized + + +class CustomImagePropertiesCustom(Model): + """Properties for creating a custom image from a VHD. + + All required parameters must be populated in order to send to Azure. + + :param image_name: The image name. + :type image_name: str + :param sys_prep: Indicates whether sysprep has been run on the VHD. + :type sys_prep: bool + :param os_type: Required. The OS type of the custom image (i.e. Windows, + Linux). Possible values include: 'Windows', 'Linux', 'None' + :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType + """ + + _validation = { + 'os_type': {'required': True}, + } + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, *, os_type, image_name: str=None, sys_prep: bool=None, **kwargs) -> None: + super(CustomImagePropertiesCustom, self).__init__(**kwargs) + self.image_name = image_name + self.sys_prep = sys_prep + self.os_type = os_type + + +class CustomImagePropertiesCustomFragment(Model): + """Properties for creating a custom image from a VHD. + + :param image_name: The image name. + :type image_name: str + :param sys_prep: Indicates whether sysprep has been run on the VHD. + :type sys_prep: bool + :param os_type: The OS type of the custom image (i.e. Windows, Linux). + Possible values include: 'Windows', 'Linux', 'None' + :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType + """ + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, *, image_name: str=None, sys_prep: bool=None, os_type=None, **kwargs) -> None: + super(CustomImagePropertiesCustomFragment, self).__init__(**kwargs) + self.image_name = image_name + self.sys_prep = sys_prep + self.os_type = os_type + + +class CustomImagePropertiesFromPlan(Model): + """Properties for plan on a custom image. + + :param id: The id of the plan, equivalent to name of the plan + :type id: str + :param publisher: The publisher for the plan from the marketplace image + the custom image is derived from + :type publisher: str + :param offer: The offer for the plan from the marketplace image the custom + image is derived from + :type offer: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, **kwargs) -> None: + super(CustomImagePropertiesFromPlan, self).__init__(**kwargs) + self.id = id + self.publisher = publisher + self.offer = offer + + +class CustomImagePropertiesFromPlanFragment(Model): + """Properties for plan on a custom image. + + :param id: The id of the plan, equivalent to name of the plan + :type id: str + :param publisher: The publisher for the plan from the marketplace image + the custom image is derived from + :type publisher: str + :param offer: The offer for the plan from the marketplace image the custom + image is derived from + :type offer: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, **kwargs) -> None: + super(CustomImagePropertiesFromPlanFragment, self).__init__(**kwargs) + self.id = id + self.publisher = publisher + self.offer = offer + + +class CustomImagePropertiesFromVm(Model): + """Properties for creating a custom image from a virtual machine. + + :param source_vm_id: The source vm identifier. + :type source_vm_id: str + :param windows_os_info: The Windows OS information of the VM. + :type windows_os_info: ~azure.mgmt.devtestlabs.models.WindowsOsInfo + :param linux_os_info: The Linux OS information of the VM. + :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfo + """ + + _attribute_map = { + 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, + 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfo'}, + 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfo'}, + } + + def __init__(self, *, source_vm_id: str=None, windows_os_info=None, linux_os_info=None, **kwargs) -> None: + super(CustomImagePropertiesFromVm, self).__init__(**kwargs) + self.source_vm_id = source_vm_id + self.windows_os_info = windows_os_info + self.linux_os_info = linux_os_info + + +class CustomImagePropertiesFromVmFragment(Model): + """Properties for creating a custom image from a virtual machine. + + :param source_vm_id: The source vm identifier. + :type source_vm_id: str + :param windows_os_info: The Windows OS information of the VM. + :type windows_os_info: + ~azure.mgmt.devtestlabs.models.WindowsOsInfoFragment + :param linux_os_info: The Linux OS information of the VM. + :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfoFragment + """ + + _attribute_map = { + 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, + 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfoFragment'}, + 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfoFragment'}, + } + + def __init__(self, *, source_vm_id: str=None, windows_os_info=None, linux_os_info=None, **kwargs) -> None: + super(CustomImagePropertiesFromVmFragment, self).__init__(**kwargs) + self.source_vm_id = source_vm_id + self.windows_os_info = windows_os_info + self.linux_os_info = linux_os_info + + +class DataDiskProperties(Model): + """Request body for adding a new or existing data disk to a virtual machine. + + :param attach_new_data_disk_options: Specifies options to attach a new + disk to the virtual machine. + :type attach_new_data_disk_options: + ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptions + :param existing_lab_disk_id: Specifies the existing lab disk id to attach + to virtual machine. + :type existing_lab_disk_id: str + :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, + ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type host_caching: str or + ~azure.mgmt.devtestlabs.models.HostCachingOptions + """ + + _attribute_map = { + 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptions'}, + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + 'host_caching': {'key': 'hostCaching', 'type': 'str'}, + } + + def __init__(self, *, attach_new_data_disk_options=None, existing_lab_disk_id: str=None, host_caching=None, **kwargs) -> None: + super(DataDiskProperties, self).__init__(**kwargs) + self.attach_new_data_disk_options = attach_new_data_disk_options + self.existing_lab_disk_id = existing_lab_disk_id + self.host_caching = host_caching + + +class DataDiskPropertiesFragment(Model): + """Request body for adding a new or existing data disk to a virtual machine. + + :param attach_new_data_disk_options: Specifies options to attach a new + disk to the virtual machine. + :type attach_new_data_disk_options: + ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptionsFragment + :param existing_lab_disk_id: Specifies the existing lab disk id to attach + to virtual machine. + :type existing_lab_disk_id: str + :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, + ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type host_caching: str or + ~azure.mgmt.devtestlabs.models.HostCachingOptions + """ + + _attribute_map = { + 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptionsFragment'}, + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + 'host_caching': {'key': 'hostCaching', 'type': 'str'}, + } + + def __init__(self, *, attach_new_data_disk_options=None, existing_lab_disk_id: str=None, host_caching=None, **kwargs) -> None: + super(DataDiskPropertiesFragment, self).__init__(**kwargs) + self.attach_new_data_disk_options = attach_new_data_disk_options + self.existing_lab_disk_id = existing_lab_disk_id + self.host_caching = host_caching + + +class DataDiskStorageTypeInfo(Model): + """Storage information about the data disks present in the custom image. + + :param lun: Disk Lun + :type lun: str + :param storage_type: Disk Storage Type. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + } + + def __init__(self, *, lun: str=None, storage_type=None, **kwargs) -> None: + super(DataDiskStorageTypeInfo, self).__init__(**kwargs) + self.lun = lun + self.storage_type = storage_type + + +class DataDiskStorageTypeInfoFragment(Model): + """Storage information about the data disks present in the custom image. + + :param lun: Disk Lun + :type lun: str + :param storage_type: Disk Storage Type. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + } + + def __init__(self, *, lun: str=None, storage_type=None, **kwargs) -> None: + super(DataDiskStorageTypeInfoFragment, self).__init__(**kwargs) + self.lun = lun + self.storage_type = storage_type + + +class DayDetails(Model): + """Properties of a daily schedule. + + :param time: The time of day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, *, time: str=None, **kwargs) -> None: + super(DayDetails, self).__init__(**kwargs) + self.time = time + + +class DayDetailsFragment(Model): + """Properties of a daily schedule. + + :param time: The time of day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, *, time: str=None, **kwargs) -> None: + super(DayDetailsFragment, self).__init__(**kwargs) + self.time = time + + +class DetachDataDiskProperties(Model): + """Request body for detaching data disk from a virtual machine. + + :param existing_lab_disk_id: Specifies the disk resource ID to detach from + virtual machine. + :type existing_lab_disk_id: str + """ + + _attribute_map = { + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + } + + def __init__(self, *, existing_lab_disk_id: str=None, **kwargs) -> None: + super(DetachDataDiskProperties, self).__init__(**kwargs) + self.existing_lab_disk_id = existing_lab_disk_id + + +class DetachDiskProperties(Model): + """Properties of the disk to detach. + + :param leased_by_lab_vm_id: The resource ID of the Lab VM to which the + disk is attached. + :type leased_by_lab_vm_id: str + """ + + _attribute_map = { + 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, + } + + def __init__(self, *, leased_by_lab_vm_id: str=None, **kwargs) -> None: + super(DetachDiskProperties, self).__init__(**kwargs) + self.leased_by_lab_vm_id = leased_by_lab_vm_id + + +class Disk(Resource): + """A Disk. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param disk_size_gi_b: The size of the disk in GibiBytes. + :type disk_size_gi_b: int + :param leased_by_lab_vm_id: The resource ID of the VM to which this disk + is leased. + :type leased_by_lab_vm_id: str + :param disk_blob_name: When backed by a blob, the name of the VHD blob + without extension. + :type disk_blob_name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :ivar created_date: The creation date of the disk. + :vartype created_date: datetime + :param host_caching: The host caching policy of the disk (i.e. None, + ReadOnly, ReadWrite). + :type host_caching: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, + 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, + 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, + 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, + 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, disk_type=None, disk_size_gi_b: int=None, leased_by_lab_vm_id: str=None, disk_blob_name: str=None, disk_uri: str=None, host_caching: str=None, managed_disk_id: str=None, **kwargs) -> None: + super(Disk, self).__init__(location=location, tags=tags, **kwargs) + self.disk_type = disk_type + self.disk_size_gi_b = disk_size_gi_b + self.leased_by_lab_vm_id = leased_by_lab_vm_id + self.disk_blob_name = disk_blob_name + self.disk_uri = disk_uri + self.created_date = None + self.host_caching = host_caching + self.managed_disk_id = managed_disk_id + self.provisioning_state = None + self.unique_identifier = None + + +class DiskFragment(UpdateResource): + """A Disk. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param disk_size_gi_b: The size of the disk in GibiBytes. + :type disk_size_gi_b: int + :param leased_by_lab_vm_id: The resource ID of the VM to which this disk + is leased. + :type leased_by_lab_vm_id: str + :param disk_blob_name: When backed by a blob, the name of the VHD blob + without extension. + :type disk_blob_name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param host_caching: The host caching policy of the disk (i.e. None, + ReadOnly, ReadWrite). + :type host_caching: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, + 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, + 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, + 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, + 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, + 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, + } + + def __init__(self, *, tags=None, disk_type=None, disk_size_gi_b: int=None, leased_by_lab_vm_id: str=None, disk_blob_name: str=None, disk_uri: str=None, host_caching: str=None, managed_disk_id: str=None, **kwargs) -> None: + super(DiskFragment, self).__init__(tags=tags, **kwargs) + self.disk_type = disk_type + self.disk_size_gi_b = disk_size_gi_b + self.leased_by_lab_vm_id = leased_by_lab_vm_id + self.disk_blob_name = disk_blob_name + self.disk_uri = disk_uri + self.host_caching = host_caching + self.managed_disk_id = managed_disk_id + + +class DtlEnvironment(Resource): + """An environment, which is essentially an ARM template deployment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param deployment_properties: The deployment properties of the + environment. + :type deployment_properties: + ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentProperties + :param arm_template_display_name: The display name of the Azure Resource + Manager template that produced the environment. + :type arm_template_display_name: str + :ivar resource_group_id: The identifier of the resource group containing + the environment's resources. + :vartype resource_group_id: str + :ivar created_by_user: The creator of the environment. + :vartype created_by_user: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_group_id': {'readonly': True}, + 'created_by_user': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentProperties'}, + 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, + 'resource_group_id': {'key': 'properties.resourceGroupId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, deployment_properties=None, arm_template_display_name: str=None, **kwargs) -> None: + super(DtlEnvironment, self).__init__(location=location, tags=tags, **kwargs) + self.deployment_properties = deployment_properties + self.arm_template_display_name = arm_template_display_name + self.resource_group_id = None + self.created_by_user = None + self.provisioning_state = None + self.unique_identifier = None + + +class DtlEnvironmentFragment(UpdateResource): + """An environment, which is essentially an ARM template deployment. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param deployment_properties: The deployment properties of the + environment. + :type deployment_properties: + ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentPropertiesFragment + :param arm_template_display_name: The display name of the Azure Resource + Manager template that produced the environment. + :type arm_template_display_name: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentPropertiesFragment'}, + 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, + } + + def __init__(self, *, tags=None, deployment_properties=None, arm_template_display_name: str=None, **kwargs) -> None: + super(DtlEnvironmentFragment, self).__init__(tags=tags, **kwargs) + self.deployment_properties = deployment_properties + self.arm_template_display_name = arm_template_display_name + + +class EnvironmentDeploymentProperties(Model): + """Properties of an environment deployment. + + :param arm_template_id: The Azure Resource Manager template's identifier. + :type arm_template_id: str + :param parameters: The parameters of the Azure Resource Manager template. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterProperties] + """ + + _attribute_map = { + 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterProperties]'}, + } + + def __init__(self, *, arm_template_id: str=None, parameters=None, **kwargs) -> None: + super(EnvironmentDeploymentProperties, self).__init__(**kwargs) + self.arm_template_id = arm_template_id + self.parameters = parameters + + +class EnvironmentDeploymentPropertiesFragment(Model): + """Properties of an environment deployment. + + :param arm_template_id: The Azure Resource Manager template's identifier. + :type arm_template_id: str + :param parameters: The parameters of the Azure Resource Manager template. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterPropertiesFragment] + """ + + _attribute_map = { + 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterPropertiesFragment]'}, + } + + def __init__(self, *, arm_template_id: str=None, parameters=None, **kwargs) -> None: + super(EnvironmentDeploymentPropertiesFragment, self).__init__(**kwargs) + self.arm_template_id = arm_template_id + self.parameters = parameters + + +class EvaluatePoliciesProperties(Model): + """Properties for evaluating a policy set. + + :param fact_name: The fact name. + :type fact_name: str + :param fact_data: The fact data. + :type fact_data: str + :param value_offset: The value offset. + :type value_offset: str + :param user_object_id: The user for which policies will be evaluated + :type user_object_id: str + """ + + _attribute_map = { + 'fact_name': {'key': 'factName', 'type': 'str'}, + 'fact_data': {'key': 'factData', 'type': 'str'}, + 'value_offset': {'key': 'valueOffset', 'type': 'str'}, + 'user_object_id': {'key': 'userObjectId', 'type': 'str'}, + } + + def __init__(self, *, fact_name: str=None, fact_data: str=None, value_offset: str=None, user_object_id: str=None, **kwargs) -> None: + super(EvaluatePoliciesProperties, self).__init__(**kwargs) + self.fact_name = fact_name + self.fact_data = fact_data + self.value_offset = value_offset + self.user_object_id = user_object_id + + +class EvaluatePoliciesRequest(Model): + """Request body for evaluating a policy set. + + :param policies: Policies to evaluate. + :type policies: + list[~azure.mgmt.devtestlabs.models.EvaluatePoliciesProperties] + """ + + _attribute_map = { + 'policies': {'key': 'policies', 'type': '[EvaluatePoliciesProperties]'}, + } + + def __init__(self, *, policies=None, **kwargs) -> None: + super(EvaluatePoliciesRequest, self).__init__(**kwargs) + self.policies = policies + + +class EvaluatePoliciesResponse(Model): + """Response body for evaluating a policy set. + + :param results: Results of evaluating a policy set. + :type results: list[~azure.mgmt.devtestlabs.models.PolicySetResult] + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': '[PolicySetResult]'}, + } + + def __init__(self, *, results=None, **kwargs) -> None: + super(EvaluatePoliciesResponse, self).__init__(**kwargs) + self.results = results + + +class Event(Model): + """An event to be notified for. + + :param event_name: The event type for which this notification is enabled + (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + } + + def __init__(self, *, event_name=None, **kwargs) -> None: + super(Event, self).__init__(**kwargs) + self.event_name = event_name + + +class EventFragment(Model): + """An event to be notified for. + + :param event_name: The event type for which this notification is enabled + (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + } + + def __init__(self, *, event_name=None, **kwargs) -> None: + super(EventFragment, self).__init__(**kwargs) + self.event_name = event_name + + +class ExportResourceUsageParameters(Model): + """The parameters of the export operation. + + :param blob_storage_absolute_sas_uri: The blob storage absolute sas uri + with write permission to the container which the usage data needs to be + uploaded to. + :type blob_storage_absolute_sas_uri: str + :param usage_start_date: The start time of the usage. If not provided, + usage will be reported since the beginning of data collection. + :type usage_start_date: datetime + """ + + _attribute_map = { + 'blob_storage_absolute_sas_uri': {'key': 'blobStorageAbsoluteSasUri', 'type': 'str'}, + 'usage_start_date': {'key': 'usageStartDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, blob_storage_absolute_sas_uri: str=None, usage_start_date=None, **kwargs) -> None: + super(ExportResourceUsageParameters, self).__init__(**kwargs) + self.blob_storage_absolute_sas_uri = blob_storage_absolute_sas_uri + self.usage_start_date = usage_start_date + + +class ExternalSubnet(Model): + """Subnet information as returned by the Microsoft.Network API. + + :param id: Gets or sets the identifier. + :type id: str + :param name: Gets or sets the name. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: + super(ExternalSubnet, self).__init__(**kwargs) + self.id = id + self.name = name + + +class ExternalSubnetFragment(Model): + """Subnet information as returned by the Microsoft.Network API. + + :param id: Gets or sets the identifier. + :type id: str + :param name: Gets or sets the name. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: + super(ExternalSubnetFragment, self).__init__(**kwargs) + self.id = id + self.name = name + + +class Formula(Resource): + """A formula for creating a VM, specifying an image base and other parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the formula. + :type description: str + :param author: The author of the formula. + :type author: str + :param os_type: The OS type of the formula. + :type os_type: str + :ivar creation_date: The creation date of the formula. + :vartype creation_date: datetime + :param formula_content: The content of the formula. + :type formula_content: + ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameter + :param vm: Information about a VM from which a formula is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVm + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameter'}, + 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVm'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, description: str=None, author: str=None, os_type: str=None, formula_content=None, vm=None, **kwargs) -> None: + super(Formula, self).__init__(location=location, tags=tags, **kwargs) + self.description = description + self.author = author + self.os_type = os_type + self.creation_date = None + self.formula_content = formula_content + self.vm = vm + self.provisioning_state = None + self.unique_identifier = None + + +class FormulaFragment(UpdateResource): + """A formula for creating a VM, specifying an image base and other parameters. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the formula. + :type description: str + :param author: The author of the formula. + :type author: str + :param os_type: The OS type of the formula. + :type os_type: str + :param formula_content: The content of the formula. + :type formula_content: + ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameterFragment + :param vm: Information about a VM from which a formula is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVmFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameterFragment'}, + 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVmFragment'}, + } + + def __init__(self, *, tags=None, description: str=None, author: str=None, os_type: str=None, formula_content=None, vm=None, **kwargs) -> None: + super(FormulaFragment, self).__init__(tags=tags, **kwargs) + self.description = description + self.author = author + self.os_type = os_type + self.formula_content = formula_content + self.vm = vm + + +class FormulaPropertiesFromVm(Model): + """Information about a VM from which a formula is to be created. + + :param lab_vm_id: The identifier of the VM from which a formula is to be + created. + :type lab_vm_id: str + """ + + _attribute_map = { + 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, + } + + def __init__(self, *, lab_vm_id: str=None, **kwargs) -> None: + super(FormulaPropertiesFromVm, self).__init__(**kwargs) + self.lab_vm_id = lab_vm_id + + +class FormulaPropertiesFromVmFragment(Model): + """Information about a VM from which a formula is to be created. + + :param lab_vm_id: The identifier of the VM from which a formula is to be + created. + :type lab_vm_id: str + """ + + _attribute_map = { + 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, + } + + def __init__(self, *, lab_vm_id: str=None, **kwargs) -> None: + super(FormulaPropertiesFromVmFragment, self).__init__(**kwargs) + self.lab_vm_id = lab_vm_id + + +class GalleryImage(Resource): + """A gallery image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param author: The author of the gallery image. + :type author: str + :ivar created_date: The creation date of the gallery image. + :vartype created_date: datetime + :param description: The description of the gallery image. + :type description: str + :param image_reference: The image reference of the gallery image. + :type image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param icon: The icon of the gallery image. + :type icon: str + :param enabled: Indicates whether this gallery image is enabled. + :type enabled: bool + :param plan_id: The third party plan that applies to this image + :type plan_id: str + :param is_plan_authorized: Indicates if the plan has been authorized for + programmatic deployment. + :type is_plan_authorized: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'image_reference': {'key': 'properties.imageReference', 'type': 'GalleryImageReference'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + } + + def __init__(self, *, location: str=None, tags=None, author: str=None, description: str=None, image_reference=None, icon: str=None, enabled: bool=None, plan_id: str=None, is_plan_authorized: bool=None, **kwargs) -> None: + super(GalleryImage, self).__init__(location=location, tags=tags, **kwargs) + self.author = author + self.created_date = None + self.description = description + self.image_reference = image_reference + self.icon = icon + self.enabled = enabled + self.plan_id = plan_id + self.is_plan_authorized = is_plan_authorized + + +class GalleryImageReference(Model): + """The reference information for an Azure Marketplace image. + + :param offer: The offer of the gallery image. + :type offer: str + :param publisher: The publisher of the gallery image. + :type publisher: str + :param sku: The SKU of the gallery image. + :type sku: str + :param os_type: The OS type of the gallery image. + :type os_type: str + :param version: The version of the gallery image. + :type version: str + """ + + _attribute_map = { + 'offer': {'key': 'offer', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, offer: str=None, publisher: str=None, sku: str=None, os_type: str=None, version: str=None, **kwargs) -> None: + super(GalleryImageReference, self).__init__(**kwargs) + self.offer = offer + self.publisher = publisher + self.sku = sku + self.os_type = os_type + self.version = version + + +class GalleryImageReferenceFragment(Model): + """The reference information for an Azure Marketplace image. + + :param offer: The offer of the gallery image. + :type offer: str + :param publisher: The publisher of the gallery image. + :type publisher: str + :param sku: The SKU of the gallery image. + :type sku: str + :param os_type: The OS type of the gallery image. + :type os_type: str + :param version: The version of the gallery image. + :type version: str + """ + + _attribute_map = { + 'offer': {'key': 'offer', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, offer: str=None, publisher: str=None, sku: str=None, os_type: str=None, version: str=None, **kwargs) -> None: + super(GalleryImageReferenceFragment, self).__init__(**kwargs) + self.offer = offer + self.publisher = publisher + self.sku = sku + self.os_type = os_type + self.version = version + + +class GenerateArmTemplateRequest(Model): + """Parameters for generating an ARM template for deploying artifacts. + + :param virtual_machine_name: The resource name of the virtual machine. + :type virtual_machine_name: str + :param parameters: The parameters of the ARM template. + :type parameters: list[~azure.mgmt.devtestlabs.models.ParameterInfo] + :param location: The location of the virtual machine. + :type location: str + :param file_upload_options: Options for uploading the files for the + artifact. UploadFilesAndGenerateSasTokens is the default value. Possible + values include: 'UploadFilesAndGenerateSasTokens', 'None' + :type file_upload_options: str or + ~azure.mgmt.devtestlabs.models.FileUploadOptions + """ + + _attribute_map = { + 'virtual_machine_name': {'key': 'virtualMachineName', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ParameterInfo]'}, + 'location': {'key': 'location', 'type': 'str'}, + 'file_upload_options': {'key': 'fileUploadOptions', 'type': 'str'}, + } + + def __init__(self, *, virtual_machine_name: str=None, parameters=None, location: str=None, file_upload_options=None, **kwargs) -> None: + super(GenerateArmTemplateRequest, self).__init__(**kwargs) + self.virtual_machine_name = virtual_machine_name + self.parameters = parameters + self.location = location + self.file_upload_options = file_upload_options + + +class GenerateUploadUriParameter(Model): + """Properties for generating an upload URI. + + :param blob_name: The blob name of the upload URI. + :type blob_name: str + """ + + _attribute_map = { + 'blob_name': {'key': 'blobName', 'type': 'str'}, + } + + def __init__(self, *, blob_name: str=None, **kwargs) -> None: + super(GenerateUploadUriParameter, self).__init__(**kwargs) + self.blob_name = blob_name + + +class GenerateUploadUriResponse(Model): + """Response body for generating an upload URI. + + :param upload_uri: The upload URI for the VHD. + :type upload_uri: str + """ + + _attribute_map = { + 'upload_uri': {'key': 'uploadUri', 'type': 'str'}, + } + + def __init__(self, *, upload_uri: str=None, **kwargs) -> None: + super(GenerateUploadUriResponse, self).__init__(**kwargs) + self.upload_uri = upload_uri + + +class HourDetails(Model): + """Properties of an hourly schedule. + + :param minute: Minutes of the hour the schedule will run. + :type minute: int + """ + + _attribute_map = { + 'minute': {'key': 'minute', 'type': 'int'}, + } + + def __init__(self, *, minute: int=None, **kwargs) -> None: + super(HourDetails, self).__init__(**kwargs) + self.minute = minute + + +class HourDetailsFragment(Model): + """Properties of an hourly schedule. + + :param minute: Minutes of the hour the schedule will run. + :type minute: int + """ + + _attribute_map = { + 'minute': {'key': 'minute', 'type': 'int'}, + } + + def __init__(self, *, minute: int=None, **kwargs) -> None: + super(HourDetailsFragment, self).__init__(**kwargs) + self.minute = minute + + +class IdentityProperties(Model): + """Properties of a managed identity. + + :param type: Managed identity. + :type type: str + :param principal_id: The principal id of resource identity. + :type principal_id: str + :param tenant_id: The tenant identifier of resource. + :type tenant_id: str + :param client_secret_url: The client secret URL of the identity. + :type client_secret_url: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'client_secret_url': {'key': 'clientSecretUrl', 'type': 'str'}, + } + + def __init__(self, *, type: str=None, principal_id: str=None, tenant_id: str=None, client_secret_url: str=None, **kwargs) -> None: + super(IdentityProperties, self).__init__(**kwargs) + self.type = type + self.principal_id = principal_id + self.tenant_id = tenant_id + self.client_secret_url = client_secret_url + + +class ImportLabVirtualMachineRequest(Model): + """This represents the payload required to import a virtual machine from a + different lab into the current one. + + :param source_virtual_machine_resource_id: The full resource ID of the + virtual machine to be imported. + :type source_virtual_machine_resource_id: str + :param destination_virtual_machine_name: The name of the virtual machine + in the destination lab + :type destination_virtual_machine_name: str + """ + + _attribute_map = { + 'source_virtual_machine_resource_id': {'key': 'sourceVirtualMachineResourceId', 'type': 'str'}, + 'destination_virtual_machine_name': {'key': 'destinationVirtualMachineName', 'type': 'str'}, + } + + def __init__(self, *, source_virtual_machine_resource_id: str=None, destination_virtual_machine_name: str=None, **kwargs) -> None: + super(ImportLabVirtualMachineRequest, self).__init__(**kwargs) + self.source_virtual_machine_resource_id = source_virtual_machine_resource_id + self.destination_virtual_machine_name = destination_virtual_machine_name + + +class InboundNatRule(Model): + """A rule for NAT - exposing a VM's port (backendPort) on the public IP + address using a load balancer. + + :param transport_protocol: The transport protocol for the endpoint. + Possible values include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param frontend_port: The external endpoint port of the inbound + connection. Possible values range between 1 and 65535, inclusive. If + unspecified, a value will be allocated automatically. + :type frontend_port: int + :param backend_port: The port to which the external traffic will be + redirected. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, *, transport_protocol=None, frontend_port: int=None, backend_port: int=None, **kwargs) -> None: + super(InboundNatRule, self).__init__(**kwargs) + self.transport_protocol = transport_protocol + self.frontend_port = frontend_port + self.backend_port = backend_port + + +class InboundNatRuleFragment(Model): + """A rule for NAT - exposing a VM's port (backendPort) on the public IP + address using a load balancer. + + :param transport_protocol: The transport protocol for the endpoint. + Possible values include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param frontend_port: The external endpoint port of the inbound + connection. Possible values range between 1 and 65535, inclusive. If + unspecified, a value will be allocated automatically. + :type frontend_port: int + :param backend_port: The port to which the external traffic will be + redirected. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, *, transport_protocol=None, frontend_port: int=None, backend_port: int=None, **kwargs) -> None: + super(InboundNatRuleFragment, self).__init__(**kwargs) + self.transport_protocol = transport_protocol + self.frontend_port = frontend_port + self.backend_port = backend_port + + +class Lab(Resource): + """A lab. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar default_storage_account: The lab's default storage account. + :vartype default_storage_account: str + :ivar default_premium_storage_account: The lab's default premium storage + account. + :vartype default_premium_storage_account: str + :ivar artifacts_storage_account: The lab's artifact storage account. + :vartype artifacts_storage_account: str + :ivar premium_data_disk_storage_account: The lab's premium data disk + storage account. + :vartype premium_data_disk_storage_account: str + :ivar vault_name: The lab's Key vault. + :vartype vault_name: str + :param lab_storage_type: Type of storage used by the lab. It can be either + Premium or Standard. Default is Premium. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param mandatory_artifacts_resource_ids_linux: The ordered list of + artifact resource IDs that should be applied on all Linux VM creations by + default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_linux: list[str] + :param mandatory_artifacts_resource_ids_windows: The ordered list of + artifact resource IDs that should be applied on all Windows VM creations + by default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_windows: list[str] + :ivar created_date: The creation date of the lab. + :vartype created_date: datetime + :param premium_data_disks: The setting to enable usage of premium data + disks. + When its value is 'Enabled', creation of standard or premium data disks is + allowed. + When its value is 'Disabled', only creation of standard data disks is + allowed. Possible values include: 'Disabled', 'Enabled' + :type premium_data_disks: str or + ~azure.mgmt.devtestlabs.models.PremiumDataDisk + :param environment_permission: The access rights to be granted to the user + when provisioning an environment. Possible values include: 'Reader', + 'Contributor' + :type environment_permission: str or + ~azure.mgmt.devtestlabs.models.EnvironmentPermission + :param announcement: The properties of any lab announcement associated + with this lab + :type announcement: + ~azure.mgmt.devtestlabs.models.LabAnnouncementProperties + :param support: The properties of any lab support message associated with + this lab + :type support: ~azure.mgmt.devtestlabs.models.LabSupportProperties + :ivar vm_creation_resource_group: The resource group in which all new lab + virtual machines will be created. To let DevTest Labs manage resource + group creation, set this value to null. + :vartype vm_creation_resource_group: str + :ivar public_ip_id: The public IP address for the lab's load balancer. + :vartype public_ip_id: str + :ivar load_balancer_id: The load balancer used to for lab VMs that use + shared IP address. + :vartype load_balancer_id: str + :ivar network_security_group_id: The Network Security Group attached to + the lab VMs Network interfaces to restrict open ports. + :vartype network_security_group_id: str + :param extended_properties: Extended properties of the lab used for + experimental features + :type extended_properties: dict[str, str] + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'default_storage_account': {'readonly': True}, + 'default_premium_storage_account': {'readonly': True}, + 'artifacts_storage_account': {'readonly': True}, + 'premium_data_disk_storage_account': {'readonly': True}, + 'vault_name': {'readonly': True}, + 'created_date': {'readonly': True}, + 'vm_creation_resource_group': {'readonly': True}, + 'public_ip_id': {'readonly': True}, + 'load_balancer_id': {'readonly': True}, + 'network_security_group_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'default_storage_account': {'key': 'properties.defaultStorageAccount', 'type': 'str'}, + 'default_premium_storage_account': {'key': 'properties.defaultPremiumStorageAccount', 'type': 'str'}, + 'artifacts_storage_account': {'key': 'properties.artifactsStorageAccount', 'type': 'str'}, + 'premium_data_disk_storage_account': {'key': 'properties.premiumDataDiskStorageAccount', 'type': 'str'}, + 'vault_name': {'key': 'properties.vaultName', 'type': 'str'}, + 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, + 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, + 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, + 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, + 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementProperties'}, + 'support': {'key': 'properties.support', 'type': 'LabSupportProperties'}, + 'vm_creation_resource_group': {'key': 'properties.vmCreationResourceGroup', 'type': 'str'}, + 'public_ip_id': {'key': 'properties.publicIpId', 'type': 'str'}, + 'load_balancer_id': {'key': 'properties.loadBalancerId', 'type': 'str'}, + 'network_security_group_id': {'key': 'properties.networkSecurityGroupId', 'type': 'str'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, lab_storage_type=None, mandatory_artifacts_resource_ids_linux=None, mandatory_artifacts_resource_ids_windows=None, premium_data_disks=None, environment_permission=None, announcement=None, support=None, extended_properties=None, **kwargs) -> None: + super(Lab, self).__init__(location=location, tags=tags, **kwargs) + self.default_storage_account = None + self.default_premium_storage_account = None + self.artifacts_storage_account = None + self.premium_data_disk_storage_account = None + self.vault_name = None + self.lab_storage_type = lab_storage_type + self.mandatory_artifacts_resource_ids_linux = mandatory_artifacts_resource_ids_linux + self.mandatory_artifacts_resource_ids_windows = mandatory_artifacts_resource_ids_windows + self.created_date = None + self.premium_data_disks = premium_data_disks + self.environment_permission = environment_permission + self.announcement = announcement + self.support = support + self.vm_creation_resource_group = None + self.public_ip_id = None + self.load_balancer_id = None + self.network_security_group_id = None + self.extended_properties = extended_properties + self.provisioning_state = None + self.unique_identifier = None + + +class LabAnnouncementProperties(Model): + """Properties of a lab's announcement banner. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param title: The plain text title for the lab announcement + :type title: str + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + :param enabled: Is the lab announcement active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param expiration_date: The time at which the announcement expires (null + for never) + :type expiration_date: datetime + :param expired: Has this announcement expired? + :type expired: bool + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'expired': {'key': 'expired', 'type': 'bool'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, title: str=None, markdown: str=None, enabled=None, expiration_date=None, expired: bool=None, **kwargs) -> None: + super(LabAnnouncementProperties, self).__init__(**kwargs) + self.title = title + self.markdown = markdown + self.enabled = enabled + self.expiration_date = expiration_date + self.expired = expired + self.provisioning_state = None + self.unique_identifier = None + + +class LabAnnouncementPropertiesFragment(Model): + """Properties of a lab's announcement banner. + + :param title: The plain text title for the lab announcement + :type title: str + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + :param enabled: Is the lab announcement active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param expiration_date: The time at which the announcement expires (null + for never) + :type expiration_date: datetime + :param expired: Has this announcement expired? + :type expired: bool + """ + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'expired': {'key': 'expired', 'type': 'bool'}, + } + + def __init__(self, *, title: str=None, markdown: str=None, enabled=None, expiration_date=None, expired: bool=None, **kwargs) -> None: + super(LabAnnouncementPropertiesFragment, self).__init__(**kwargs) + self.title = title + self.markdown = markdown + self.enabled = enabled + self.expiration_date = expiration_date + self.expired = expired + + +class LabCost(Resource): + """A cost item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param target_cost: The target cost properties + :type target_cost: ~azure.mgmt.devtestlabs.models.TargetCostProperties + :ivar lab_cost_summary: The lab cost summary component of the cost data. + :vartype lab_cost_summary: + ~azure.mgmt.devtestlabs.models.LabCostSummaryProperties + :ivar lab_cost_details: The lab cost details component of the cost data. + :vartype lab_cost_details: + list[~azure.mgmt.devtestlabs.models.LabCostDetailsProperties] + :ivar resource_costs: The resource cost component of the cost data. + :vartype resource_costs: + list[~azure.mgmt.devtestlabs.models.LabResourceCostProperties] + :param currency_code: The currency code of the cost. + :type currency_code: str + :param start_date_time: The start time of the cost data. + :type start_date_time: datetime + :param end_date_time: The end time of the cost data. + :type end_date_time: datetime + :param created_date: The creation date of the cost. + :type created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'lab_cost_summary': {'readonly': True}, + 'lab_cost_details': {'readonly': True}, + 'resource_costs': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'target_cost': {'key': 'properties.targetCost', 'type': 'TargetCostProperties'}, + 'lab_cost_summary': {'key': 'properties.labCostSummary', 'type': 'LabCostSummaryProperties'}, + 'lab_cost_details': {'key': 'properties.labCostDetails', 'type': '[LabCostDetailsProperties]'}, + 'resource_costs': {'key': 'properties.resourceCosts', 'type': '[LabResourceCostProperties]'}, + 'currency_code': {'key': 'properties.currencyCode', 'type': 'str'}, + 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, + 'end_date_time': {'key': 'properties.endDateTime', 'type': 'iso-8601'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, target_cost=None, currency_code: str=None, start_date_time=None, end_date_time=None, created_date=None, **kwargs) -> None: + super(LabCost, self).__init__(location=location, tags=tags, **kwargs) + self.target_cost = target_cost + self.lab_cost_summary = None + self.lab_cost_details = None + self.resource_costs = None + self.currency_code = currency_code + self.start_date_time = start_date_time + self.end_date_time = end_date_time + self.created_date = created_date + self.provisioning_state = None + self.unique_identifier = None + + +class LabCostDetailsProperties(Model): + """The properties of a lab cost item. + + :param date_property: The date of the cost item. + :type date_property: datetime + :param cost: The cost component of the cost item. + :type cost: float + :param cost_type: The type of the cost. Possible values include: + 'Unavailable', 'Reported', 'Projected' + :type cost_type: str or ~azure.mgmt.devtestlabs.models.CostType + """ + + _attribute_map = { + 'date_property': {'key': 'date', 'type': 'iso-8601'}, + 'cost': {'key': 'cost', 'type': 'float'}, + 'cost_type': {'key': 'costType', 'type': 'str'}, + } + + def __init__(self, *, date_property=None, cost: float=None, cost_type=None, **kwargs) -> None: + super(LabCostDetailsProperties, self).__init__(**kwargs) + self.date_property = date_property + self.cost = cost + self.cost_type = cost_type + + +class LabCostSummaryProperties(Model): + """The properties of the cost summary. + + :param estimated_lab_cost: The cost component of the cost item. + :type estimated_lab_cost: float + """ + + _attribute_map = { + 'estimated_lab_cost': {'key': 'estimatedLabCost', 'type': 'float'}, + } + + def __init__(self, *, estimated_lab_cost: float=None, **kwargs) -> None: + super(LabCostSummaryProperties, self).__init__(**kwargs) + self.estimated_lab_cost = estimated_lab_cost + + +class LabFragment(UpdateResource): + """A lab. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_storage_type: Type of storage used by the lab. It can be either + Premium or Standard. Default is Premium. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param mandatory_artifacts_resource_ids_linux: The ordered list of + artifact resource IDs that should be applied on all Linux VM creations by + default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_linux: list[str] + :param mandatory_artifacts_resource_ids_windows: The ordered list of + artifact resource IDs that should be applied on all Windows VM creations + by default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_windows: list[str] + :param premium_data_disks: The setting to enable usage of premium data + disks. + When its value is 'Enabled', creation of standard or premium data disks is + allowed. + When its value is 'Disabled', only creation of standard data disks is + allowed. Possible values include: 'Disabled', 'Enabled' + :type premium_data_disks: str or + ~azure.mgmt.devtestlabs.models.PremiumDataDisk + :param environment_permission: The access rights to be granted to the user + when provisioning an environment. Possible values include: 'Reader', + 'Contributor' + :type environment_permission: str or + ~azure.mgmt.devtestlabs.models.EnvironmentPermission + :param announcement: The properties of any lab announcement associated + with this lab + :type announcement: + ~azure.mgmt.devtestlabs.models.LabAnnouncementPropertiesFragment + :param support: The properties of any lab support message associated with + this lab + :type support: ~azure.mgmt.devtestlabs.models.LabSupportPropertiesFragment + :param extended_properties: Extended properties of the lab used for + experimental features + :type extended_properties: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, + 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, + 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, + 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, + 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, + 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementPropertiesFragment'}, + 'support': {'key': 'properties.support', 'type': 'LabSupportPropertiesFragment'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, lab_storage_type=None, mandatory_artifacts_resource_ids_linux=None, mandatory_artifacts_resource_ids_windows=None, premium_data_disks=None, environment_permission=None, announcement=None, support=None, extended_properties=None, **kwargs) -> None: + super(LabFragment, self).__init__(tags=tags, **kwargs) + self.lab_storage_type = lab_storage_type + self.mandatory_artifacts_resource_ids_linux = mandatory_artifacts_resource_ids_linux + self.mandatory_artifacts_resource_ids_windows = mandatory_artifacts_resource_ids_windows + self.premium_data_disks = premium_data_disks + self.environment_permission = environment_permission + self.announcement = announcement + self.support = support + self.extended_properties = extended_properties + + +class LabResourceCostProperties(Model): + """The properties of a resource cost item. + + :param resourcename: The name of the resource. + :type resourcename: str + :param resource_uid: The unique identifier of the resource. + :type resource_uid: str + :param resource_cost: The cost component of the resource cost item. + :type resource_cost: float + :param resource_type: The logical resource type (ex. virtualmachine, + storageaccount) + :type resource_type: str + :param resource_owner: The owner of the resource (ex. + janedoe@microsoft.com) + :type resource_owner: str + :param resource_pricing_tier: The category of the resource (ex. + Premium_LRS, Standard_DS1) + :type resource_pricing_tier: str + :param resource_status: The status of the resource (ex. Active) + :type resource_status: str + :param resource_id: The ID of the resource + :type resource_id: str + :param external_resource_id: The ID of the external resource + :type external_resource_id: str + """ + + _attribute_map = { + 'resourcename': {'key': 'resourcename', 'type': 'str'}, + 'resource_uid': {'key': 'resourceUId', 'type': 'str'}, + 'resource_cost': {'key': 'resourceCost', 'type': 'float'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_owner': {'key': 'resourceOwner', 'type': 'str'}, + 'resource_pricing_tier': {'key': 'resourcePricingTier', 'type': 'str'}, + 'resource_status': {'key': 'resourceStatus', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'external_resource_id': {'key': 'externalResourceId', 'type': 'str'}, + } + + def __init__(self, *, resourcename: str=None, resource_uid: str=None, resource_cost: float=None, resource_type: str=None, resource_owner: str=None, resource_pricing_tier: str=None, resource_status: str=None, resource_id: str=None, external_resource_id: str=None, **kwargs) -> None: + super(LabResourceCostProperties, self).__init__(**kwargs) + self.resourcename = resourcename + self.resource_uid = resource_uid + self.resource_cost = resource_cost + self.resource_type = resource_type + self.resource_owner = resource_owner + self.resource_pricing_tier = resource_pricing_tier + self.resource_status = resource_status + self.resource_id = resource_id + self.external_resource_id = external_resource_id + + +class LabSupportProperties(Model): + """Properties of a lab's support banner. + + :param enabled: Is the lab support banner active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + } + + def __init__(self, *, enabled=None, markdown: str=None, **kwargs) -> None: + super(LabSupportProperties, self).__init__(**kwargs) + self.enabled = enabled + self.markdown = markdown + + +class LabSupportPropertiesFragment(Model): + """Properties of a lab's support banner. + + :param enabled: Is the lab support banner active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + } + + def __init__(self, *, enabled=None, markdown: str=None, **kwargs) -> None: + super(LabSupportPropertiesFragment, self).__init__(**kwargs) + self.enabled = enabled + self.markdown = markdown + + +class LabVhd(Model): + """Properties of a VHD in the lab. + + :param id: The URI to the VHD. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(LabVhd, self).__init__(**kwargs) + self.id = id + + +class LabVirtualMachine(Resource): + """A virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :ivar compute_vm: The compute virtual machine properties. + :vartype compute_vm: ~azure.mgmt.devtestlabs.models.ComputeVmProperties + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties + :ivar applicable_schedule: The applicable schedule for the virtual + machine. + :vartype applicable_schedule: + ~azure.mgmt.devtestlabs.models.ApplicableSchedule + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskProperties] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'compute_vm': {'readonly': True}, + 'applicable_schedule': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'compute_vm': {'key': 'properties.computeVm', 'type': 'ComputeVmProperties'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, + 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, **kwargs) -> None: + super(LabVirtualMachine, self).__init__(location=location, tags=tags, **kwargs) + self.notes = notes + self.owner_object_id = owner_object_id + self.owner_user_principal_name = owner_user_principal_name + self.created_by_user_id = created_by_user_id + self.created_by_user = created_by_user + self.created_date = created_date + self.compute_id = compute_id + self.custom_image_id = custom_image_id + self.os_type = os_type + self.size = size + self.user_name = user_name + self.password = password + self.ssh_key = ssh_key + self.is_authentication_with_ssh_key = is_authentication_with_ssh_key + self.fqdn = fqdn + self.lab_subnet_name = lab_subnet_name + self.lab_virtual_network_id = lab_virtual_network_id + self.disallow_public_ip_address = disallow_public_ip_address + self.artifacts = artifacts + self.artifact_deployment_status = artifact_deployment_status + self.gallery_image_reference = gallery_image_reference + self.plan_id = plan_id + self.compute_vm = None + self.network_interface = network_interface + self.applicable_schedule = None + self.expiration_date = expiration_date + self.allow_claim = allow_claim + self.storage_type = storage_type + self.virtual_machine_creation_source = virtual_machine_creation_source + self.environment_id = environment_id + self.data_disk_parameters = data_disk_parameters + self.schedule_parameters = schedule_parameters + self.last_known_power_state = last_known_power_state + self.provisioning_state = None + self.unique_identifier = None + + +class LabVirtualMachineCreationParameter(Model): + """Properties for creating a virtual machine. + + :param bulk_creation_parameters: The number of virtual machine instances + to create. + :type bulk_creation_parameters: + ~azure.mgmt.devtestlabs.models.BulkCreationParameters + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskProperties] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParameters'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, bulk_creation_parameters=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(LabVirtualMachineCreationParameter, self).__init__(**kwargs) + self.bulk_creation_parameters = bulk_creation_parameters + self.notes = notes + self.owner_object_id = owner_object_id + self.owner_user_principal_name = owner_user_principal_name + self.created_by_user_id = created_by_user_id + self.created_by_user = created_by_user + self.created_date = created_date + self.compute_id = compute_id + self.custom_image_id = custom_image_id + self.os_type = os_type + self.size = size + self.user_name = user_name + self.password = password + self.ssh_key = ssh_key + self.is_authentication_with_ssh_key = is_authentication_with_ssh_key + self.fqdn = fqdn + self.lab_subnet_name = lab_subnet_name + self.lab_virtual_network_id = lab_virtual_network_id + self.disallow_public_ip_address = disallow_public_ip_address + self.artifacts = artifacts + self.artifact_deployment_status = artifact_deployment_status + self.gallery_image_reference = gallery_image_reference + self.plan_id = plan_id + self.network_interface = network_interface + self.expiration_date = expiration_date + self.allow_claim = allow_claim + self.storage_type = storage_type + self.virtual_machine_creation_source = virtual_machine_creation_source + self.environment_id = environment_id + self.data_disk_parameters = data_disk_parameters + self.schedule_parameters = schedule_parameters + self.last_known_power_state = last_known_power_state + self.name = name + self.location = location + self.tags = tags + + +class LabVirtualMachineCreationParameterFragment(Model): + """Properties for creating a virtual machine. + + :param bulk_creation_parameters: The number of virtual machine instances + to create. + :type bulk_creation_parameters: + ~azure.mgmt.devtestlabs.models.BulkCreationParametersFragment + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParametersFragment'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, bulk_creation_parameters=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(LabVirtualMachineCreationParameterFragment, self).__init__(**kwargs) + self.bulk_creation_parameters = bulk_creation_parameters + self.notes = notes + self.owner_object_id = owner_object_id + self.owner_user_principal_name = owner_user_principal_name + self.created_by_user_id = created_by_user_id + self.created_by_user = created_by_user + self.created_date = created_date + self.compute_id = compute_id + self.custom_image_id = custom_image_id + self.os_type = os_type + self.size = size + self.user_name = user_name + self.password = password + self.ssh_key = ssh_key + self.is_authentication_with_ssh_key = is_authentication_with_ssh_key + self.fqdn = fqdn + self.lab_subnet_name = lab_subnet_name + self.lab_virtual_network_id = lab_virtual_network_id + self.disallow_public_ip_address = disallow_public_ip_address + self.artifacts = artifacts + self.artifact_deployment_status = artifact_deployment_status + self.gallery_image_reference = gallery_image_reference + self.plan_id = plan_id + self.network_interface = network_interface + self.expiration_date = expiration_date + self.allow_claim = allow_claim + self.storage_type = storage_type + self.virtual_machine_creation_source = virtual_machine_creation_source + self.environment_id = environment_id + self.data_disk_parameters = data_disk_parameters + self.schedule_parameters = schedule_parameters + self.last_known_power_state = last_known_power_state + self.name = name + self.location = location + self.tags = tags + + +class LabVirtualMachineFragment(UpdateResource): + """A virtual machine. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + } + + def __init__(self, *, tags=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, **kwargs) -> None: + super(LabVirtualMachineFragment, self).__init__(tags=tags, **kwargs) + self.notes = notes + self.owner_object_id = owner_object_id + self.owner_user_principal_name = owner_user_principal_name + self.created_by_user_id = created_by_user_id + self.created_by_user = created_by_user + self.created_date = created_date + self.compute_id = compute_id + self.custom_image_id = custom_image_id + self.os_type = os_type + self.size = size + self.user_name = user_name + self.password = password + self.ssh_key = ssh_key + self.is_authentication_with_ssh_key = is_authentication_with_ssh_key + self.fqdn = fqdn + self.lab_subnet_name = lab_subnet_name + self.lab_virtual_network_id = lab_virtual_network_id + self.disallow_public_ip_address = disallow_public_ip_address + self.artifacts = artifacts + self.artifact_deployment_status = artifact_deployment_status + self.gallery_image_reference = gallery_image_reference + self.plan_id = plan_id + self.network_interface = network_interface + self.expiration_date = expiration_date + self.allow_claim = allow_claim + self.storage_type = storage_type + self.virtual_machine_creation_source = virtual_machine_creation_source + self.environment_id = environment_id + self.data_disk_parameters = data_disk_parameters + self.schedule_parameters = schedule_parameters + self.last_known_power_state = last_known_power_state + + +class LinuxOsInfo(Model): + """Information about a Linux OS. + + :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, + DeprovisionRequested, DeprovisionApplied). Possible values include: + 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' + :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState + """ + + _attribute_map = { + 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, + } + + def __init__(self, *, linux_os_state=None, **kwargs) -> None: + super(LinuxOsInfo, self).__init__(**kwargs) + self.linux_os_state = linux_os_state + + +class LinuxOsInfoFragment(Model): + """Information about a Linux OS. + + :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, + DeprovisionRequested, DeprovisionApplied). Possible values include: + 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' + :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState + """ + + _attribute_map = { + 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, + } + + def __init__(self, *, linux_os_state=None, **kwargs) -> None: + super(LinuxOsInfoFragment, self).__init__(**kwargs) + self.linux_os_state = linux_os_state + + +class NetworkInterfaceProperties(Model): + """Properties of a network interface. + + :param virtual_network_id: The resource ID of the virtual network. + :type virtual_network_id: str + :param subnet_id: The resource ID of the sub net. + :type subnet_id: str + :param public_ip_address_id: The resource ID of the public IP address. + :type public_ip_address_id: str + :param public_ip_address: The public IP address. + :type public_ip_address: str + :param private_ip_address: The private IP address. + :type private_ip_address: str + :param dns_name: The DNS name. + :type dns_name: str + :param rdp_authority: The RdpAuthority property is a server DNS host name + or IP address followed by the service port number for RDP (Remote Desktop + Protocol). + :type rdp_authority: str + :param ssh_authority: The SshAuthority property is a server DNS host name + or IP address followed by the service port number for SSH. + :type ssh_authority: str + :param shared_public_ip_address_configuration: The configuration for + sharing a public IP address across multiple virtual machines. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfiguration + """ + + _attribute_map = { + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, + 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfiguration'}, + } + + def __init__(self, *, virtual_network_id: str=None, subnet_id: str=None, public_ip_address_id: str=None, public_ip_address: str=None, private_ip_address: str=None, dns_name: str=None, rdp_authority: str=None, ssh_authority: str=None, shared_public_ip_address_configuration=None, **kwargs) -> None: + super(NetworkInterfaceProperties, self).__init__(**kwargs) + self.virtual_network_id = virtual_network_id + self.subnet_id = subnet_id + self.public_ip_address_id = public_ip_address_id + self.public_ip_address = public_ip_address + self.private_ip_address = private_ip_address + self.dns_name = dns_name + self.rdp_authority = rdp_authority + self.ssh_authority = ssh_authority + self.shared_public_ip_address_configuration = shared_public_ip_address_configuration + + +class NetworkInterfacePropertiesFragment(Model): + """Properties of a network interface. + + :param virtual_network_id: The resource ID of the virtual network. + :type virtual_network_id: str + :param subnet_id: The resource ID of the sub net. + :type subnet_id: str + :param public_ip_address_id: The resource ID of the public IP address. + :type public_ip_address_id: str + :param public_ip_address: The public IP address. + :type public_ip_address: str + :param private_ip_address: The private IP address. + :type private_ip_address: str + :param dns_name: The DNS name. + :type dns_name: str + :param rdp_authority: The RdpAuthority property is a server DNS host name + or IP address followed by the service port number for RDP (Remote Desktop + Protocol). + :type rdp_authority: str + :param ssh_authority: The SshAuthority property is a server DNS host name + or IP address followed by the service port number for SSH. + :type ssh_authority: str + :param shared_public_ip_address_configuration: The configuration for + sharing a public IP address across multiple virtual machines. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfigurationFragment + """ + + _attribute_map = { + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, + 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfigurationFragment'}, + } + + def __init__(self, *, virtual_network_id: str=None, subnet_id: str=None, public_ip_address_id: str=None, public_ip_address: str=None, private_ip_address: str=None, dns_name: str=None, rdp_authority: str=None, ssh_authority: str=None, shared_public_ip_address_configuration=None, **kwargs) -> None: + super(NetworkInterfacePropertiesFragment, self).__init__(**kwargs) + self.virtual_network_id = virtual_network_id + self.subnet_id = subnet_id + self.public_ip_address_id = public_ip_address_id + self.public_ip_address = public_ip_address + self.private_ip_address = private_ip_address + self.dns_name = dns_name + self.rdp_authority = rdp_authority + self.ssh_authority = ssh_authority + self.shared_public_ip_address_configuration = shared_public_ip_address_configuration + + +class NotificationChannel(Resource): + """A notification. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param web_hook_url: The webhook URL to send notifications to. + :type web_hook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + :param description: Description of notification. + :type description: str + :param events: The list of event for which this notification is enabled. + :type events: list[~azure.mgmt.devtestlabs.models.Event] + :ivar created_date: The creation date of the notification channel. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'events': {'key': 'properties.events', 'type': '[Event]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, web_hook_url: str=None, email_recipient: str=None, notification_locale: str=None, description: str=None, events=None, **kwargs) -> None: + super(NotificationChannel, self).__init__(location=location, tags=tags, **kwargs) + self.web_hook_url = web_hook_url + self.email_recipient = email_recipient + self.notification_locale = notification_locale + self.description = description + self.events = events + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class NotificationChannelFragment(UpdateResource): + """A notification. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param web_hook_url: The webhook URL to send notifications to. + :type web_hook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + :param description: Description of notification. + :type description: str + :param events: The list of event for which this notification is enabled. + :type events: list[~azure.mgmt.devtestlabs.models.EventFragment] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'events': {'key': 'properties.events', 'type': '[EventFragment]'}, + } + + def __init__(self, *, tags=None, web_hook_url: str=None, email_recipient: str=None, notification_locale: str=None, description: str=None, events=None, **kwargs) -> None: + super(NotificationChannelFragment, self).__init__(tags=tags, **kwargs) + self.web_hook_url = web_hook_url + self.email_recipient = email_recipient + self.notification_locale = notification_locale + self.description = description + self.events = events + + +class NotificationSettings(Model): + """Notification settings for a schedule. + + :param status: If notifications are enabled for this schedule (i.e. + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param time_in_minutes: Time in minutes before event at which notification + will be sent. + :type time_in_minutes: int + :param webhook_url: The webhook URL to which the notification will be + sent. + :type webhook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, + 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, + } + + def __init__(self, *, status=None, time_in_minutes: int=None, webhook_url: str=None, email_recipient: str=None, notification_locale: str=None, **kwargs) -> None: + super(NotificationSettings, self).__init__(**kwargs) + self.status = status + self.time_in_minutes = time_in_minutes + self.webhook_url = webhook_url + self.email_recipient = email_recipient + self.notification_locale = notification_locale + + +class NotificationSettingsFragment(Model): + """Notification settings for a schedule. + + :param status: If notifications are enabled for this schedule (i.e. + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param time_in_minutes: Time in minutes before event at which notification + will be sent. + :type time_in_minutes: int + :param webhook_url: The webhook URL to which the notification will be + sent. + :type webhook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, + 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, + } + + def __init__(self, *, status=None, time_in_minutes: int=None, webhook_url: str=None, email_recipient: str=None, notification_locale: str=None, **kwargs) -> None: + super(NotificationSettingsFragment, self).__init__(**kwargs) + self.status = status + self.time_in_minutes = time_in_minutes + self.webhook_url = webhook_url + self.email_recipient = email_recipient + self.notification_locale = notification_locale + + +class NotifyParameters(Model): + """Properties for generating a Notification. + + :param event_name: The type of event (i.e. AutoShutdown, Cost). Possible + values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + :param json_payload: Properties for the notification in json format. + :type json_payload: str + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + 'json_payload': {'key': 'jsonPayload', 'type': 'str'}, + } + + def __init__(self, *, event_name=None, json_payload: str=None, **kwargs) -> None: + super(NotifyParameters, self).__init__(**kwargs) + self.event_name = event_name + self.json_payload = json_payload + + +class OperationError(Model): + """Error details for the operation in case of a failure. + + :param code: The error code of the operation error. + :type code: str + :param message: The error message of the operation error. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(OperationError, self).__init__(**kwargs) + self.code = code + self.message = message + + +class OperationMetadata(Model): + """The REST API operation supported by DevTestLab ResourceProvider. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that describes the operations + :type display: ~azure.mgmt.devtestlabs.models.OperationMetadataDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationMetadataDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(OperationMetadata, self).__init__(**kwargs) + self.name = name + self.display = display + + +class OperationMetadataDisplay(Model): + """The object that describes the operations. + + :param provider: Friendly name of the resource provider + :type provider: str + :param resource: Resource type on which the operation is performed. + :type resource: str + :param operation: Operation type: read, write, delete, listKeys/action, + etc. + :type operation: str + :param description: Friendly name of the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationMetadataDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class OperationResult(Model): + """An Operation Result. + + :param status: The operation status. + :type status: str + :param status_code: The status code for the operation. Possible values + include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', + 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', + 'PartialContent', 'MultipleChoices', 'MovedPermanently', 'Redirect', + 'SeeOther', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', + 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', + 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', + 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', + 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', + 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', + 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', + 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', + 'HttpVersionNotSupported' + :type status_code: str or ~azure.mgmt.devtestlabs.models.HttpStatusCode + :param error: Error details for the operation in case of a failure. + :type error: ~azure.mgmt.devtestlabs.models.OperationError + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'OperationError'}, + } + + def __init__(self, *, status: str=None, status_code=None, error=None, **kwargs) -> None: + super(OperationResult, self).__init__(**kwargs) + self.status = status + self.status_code = status_code + self.error = error + + +class ParameterInfo(Model): + """Information about an artifact's parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ParameterInfo, self).__init__(**kwargs) + self.name = name + self.value = value + + +class ParametersValueFileInfo(Model): + """A file containing a set of parameter values for an ARM template. + + :param file_name: File name. + :type file_name: str + :param parameters_value_info: Contents of the file. + :type parameters_value_info: object + """ + + _attribute_map = { + 'file_name': {'key': 'fileName', 'type': 'str'}, + 'parameters_value_info': {'key': 'parametersValueInfo', 'type': 'object'}, + } + + def __init__(self, *, file_name: str=None, parameters_value_info=None, **kwargs) -> None: + super(ParametersValueFileInfo, self).__init__(**kwargs) + self.file_name = file_name + self.parameters_value_info = parameters_value_info + + +class PercentageCostThresholdProperties(Model): + """Properties of a percentage cost threshold. + + :param threshold_value: The cost threshold value. + :type threshold_value: float + """ + + _attribute_map = { + 'threshold_value': {'key': 'thresholdValue', 'type': 'float'}, + } + + def __init__(self, *, threshold_value: float=None, **kwargs) -> None: + super(PercentageCostThresholdProperties, self).__init__(**kwargs) + self.threshold_value = threshold_value + + +class Policy(Resource): + """A Policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the policy. + :type description: str + :param status: The status of the policy. Possible values include: + 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus + :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, + MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', + 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', + 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', + 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' + :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName + :param fact_data: The fact data of the policy. + :type fact_data: str + :param threshold: The threshold of the policy (i.e. a number for + MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). + :type threshold: str + :param evaluator_type: The evaluator type of the policy (i.e. + AllowedValuesPolicy, MaxValuePolicy). Possible values include: + 'AllowedValuesPolicy', 'MaxValuePolicy' + :type evaluator_type: str or + ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType + :ivar created_date: The creation date of the policy. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'fact_name': {'key': 'properties.factName', 'type': 'str'}, + 'fact_data': {'key': 'properties.factData', 'type': 'str'}, + 'threshold': {'key': 'properties.threshold', 'type': 'str'}, + 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, description: str=None, status=None, fact_name=None, fact_data: str=None, threshold: str=None, evaluator_type=None, **kwargs) -> None: + super(Policy, self).__init__(location=location, tags=tags, **kwargs) + self.description = description + self.status = status + self.fact_name = fact_name + self.fact_data = fact_data + self.threshold = threshold + self.evaluator_type = evaluator_type + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class PolicyFragment(UpdateResource): + """A Policy. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the policy. + :type description: str + :param status: The status of the policy. Possible values include: + 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus + :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, + MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', + 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', + 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', + 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' + :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName + :param fact_data: The fact data of the policy. + :type fact_data: str + :param threshold: The threshold of the policy (i.e. a number for + MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). + :type threshold: str + :param evaluator_type: The evaluator type of the policy (i.e. + AllowedValuesPolicy, MaxValuePolicy). Possible values include: + 'AllowedValuesPolicy', 'MaxValuePolicy' + :type evaluator_type: str or + ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'fact_name': {'key': 'properties.factName', 'type': 'str'}, + 'fact_data': {'key': 'properties.factData', 'type': 'str'}, + 'threshold': {'key': 'properties.threshold', 'type': 'str'}, + 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, + } + + def __init__(self, *, tags=None, description: str=None, status=None, fact_name=None, fact_data: str=None, threshold: str=None, evaluator_type=None, **kwargs) -> None: + super(PolicyFragment, self).__init__(tags=tags, **kwargs) + self.description = description + self.status = status + self.fact_name = fact_name + self.fact_data = fact_data + self.threshold = threshold + self.evaluator_type = evaluator_type + + +class PolicySetResult(Model): + """Result of a policy set evaluation. + + :param has_error: A value indicating whether this policy set evaluation + has discovered violations. + :type has_error: bool + :param policy_violations: The list of policy violations. + :type policy_violations: + list[~azure.mgmt.devtestlabs.models.PolicyViolation] + """ + + _attribute_map = { + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'policy_violations': {'key': 'policyViolations', 'type': '[PolicyViolation]'}, + } + + def __init__(self, *, has_error: bool=None, policy_violations=None, **kwargs) -> None: + super(PolicySetResult, self).__init__(**kwargs) + self.has_error = has_error + self.policy_violations = policy_violations + + +class PolicyViolation(Model): + """Policy violation. + + :param code: The code of the policy violation. + :type code: str + :param message: The message of the policy violation. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(PolicyViolation, self).__init__(**kwargs) + self.code = code + self.message = message + + +class Port(Model): + """Properties of a network port. + + :param transport_protocol: Protocol type of the port. Possible values + include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param backend_port: Backend port of the target virtual machine. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, *, transport_protocol=None, backend_port: int=None, **kwargs) -> None: + super(Port, self).__init__(**kwargs) + self.transport_protocol = transport_protocol + self.backend_port = backend_port + + +class PortFragment(Model): + """Properties of a network port. + + :param transport_protocol: Protocol type of the port. Possible values + include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param backend_port: Backend port of the target virtual machine. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, *, transport_protocol=None, backend_port: int=None, **kwargs) -> None: + super(PortFragment, self).__init__(**kwargs) + self.transport_protocol = transport_protocol + self.backend_port = backend_port + + +class RdpConnection(Model): + """Represents a .rdp file. + + :param contents: The contents of the .rdp file + :type contents: str + """ + + _attribute_map = { + 'contents': {'key': 'contents', 'type': 'str'}, + } + + def __init__(self, *, contents: str=None, **kwargs) -> None: + super(RdpConnection, self).__init__(**kwargs) + self.contents = contents + + +class ResizeLabVirtualMachineProperties(Model): + """Request body for resizing a virtual machine. + + :param size: Specifies the size of the virtual machine. + :type size: str + """ + + _attribute_map = { + 'size': {'key': 'size', 'type': 'str'}, + } + + def __init__(self, *, size: str=None, **kwargs) -> None: + super(ResizeLabVirtualMachineProperties, self).__init__(**kwargs) + self.size = size + + +class RetargetScheduleProperties(Model): + """Properties for retargeting a virtual machine schedule. + + :param current_resource_id: The resource Id of the virtual machine on + which the schedule operates + :type current_resource_id: str + :param target_resource_id: The resource Id of the virtual machine that the + schedule should be retargeted to + :type target_resource_id: str + """ + + _attribute_map = { + 'current_resource_id': {'key': 'currentResourceId', 'type': 'str'}, + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + } + + def __init__(self, *, current_resource_id: str=None, target_resource_id: str=None, **kwargs) -> None: + super(RetargetScheduleProperties, self).__init__(**kwargs) + self.current_resource_id = current_resource_id + self.target_resource_id = target_resource_id + + +class Schedule(Resource): + """A schedule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettings + :ivar created_date: The creation date of the schedule. + :vartype created_date: datetime + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, **kwargs) -> None: + super(Schedule, self).__init__(location=location, tags=tags, **kwargs) + self.status = status + self.task_type = task_type + self.weekly_recurrence = weekly_recurrence + self.daily_recurrence = daily_recurrence + self.hourly_recurrence = hourly_recurrence + self.time_zone_id = time_zone_id + self.notification_settings = notification_settings + self.created_date = None + self.target_resource_id = target_resource_id + self.provisioning_state = None + self.unique_identifier = None + + +class ScheduleCreationParameter(Model): + """Properties for creating a schedule. + + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettings + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(ScheduleCreationParameter, self).__init__(**kwargs) + self.status = status + self.task_type = task_type + self.weekly_recurrence = weekly_recurrence + self.daily_recurrence = daily_recurrence + self.hourly_recurrence = hourly_recurrence + self.time_zone_id = time_zone_id + self.notification_settings = notification_settings + self.target_resource_id = target_resource_id + self.name = name + self.location = location + self.tags = tags + + +class ScheduleCreationParameterFragment(Model): + """Properties for creating a schedule. + + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: + ~azure.mgmt.devtestlabs.models.WeekDetailsFragment + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: + ~azure.mgmt.devtestlabs.models.HourDetailsFragment + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(ScheduleCreationParameterFragment, self).__init__(**kwargs) + self.status = status + self.task_type = task_type + self.weekly_recurrence = weekly_recurrence + self.daily_recurrence = daily_recurrence + self.hourly_recurrence = hourly_recurrence + self.time_zone_id = time_zone_id + self.notification_settings = notification_settings + self.target_resource_id = target_resource_id + self.name = name + self.location = location + self.tags = tags + + +class ScheduleFragment(UpdateResource): + """A schedule. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: + ~azure.mgmt.devtestlabs.models.WeekDetailsFragment + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: + ~azure.mgmt.devtestlabs.models.HourDetailsFragment + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + } + + def __init__(self, *, tags=None, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, **kwargs) -> None: + super(ScheduleFragment, self).__init__(tags=tags, **kwargs) + self.status = status + self.task_type = task_type + self.weekly_recurrence = weekly_recurrence + self.daily_recurrence = daily_recurrence + self.hourly_recurrence = hourly_recurrence + self.time_zone_id = time_zone_id + self.notification_settings = notification_settings + self.target_resource_id = target_resource_id + + +class Secret(Resource): + """A secret. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param value: The value of the secret for secret creation. + :type value: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, value: str=None, **kwargs) -> None: + super(Secret, self).__init__(location=location, tags=tags, **kwargs) + self.value = value + self.provisioning_state = None + self.unique_identifier = None + + +class SecretFragment(UpdateResource): + """A secret. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param value: The value of the secret for secret creation. + :type value: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + } + + def __init__(self, *, tags=None, value: str=None, **kwargs) -> None: + super(SecretFragment, self).__init__(tags=tags, **kwargs) + self.value = value + + +class ServiceFabric(Resource): + """A Service Fabric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param external_service_fabric_id: The backing service fabric resource's + id + :type external_service_fabric_id: str + :param environment_id: The resource id of the environment under which the + service fabric resource is present + :type environment_id: str + :ivar applicable_schedule: The applicable schedule for the virtual + machine. + :vartype applicable_schedule: + ~azure.mgmt.devtestlabs.models.ApplicableSchedule + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'applicable_schedule': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, external_service_fabric_id: str=None, environment_id: str=None, **kwargs) -> None: + super(ServiceFabric, self).__init__(location=location, tags=tags, **kwargs) + self.external_service_fabric_id = external_service_fabric_id + self.environment_id = environment_id + self.applicable_schedule = None + self.provisioning_state = None + self.unique_identifier = None + + +class ServiceFabricFragment(UpdateResource): + """A Service Fabric. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param external_service_fabric_id: The backing service fabric resource's + id + :type external_service_fabric_id: str + :param environment_id: The resource id of the environment under which the + service fabric resource is present + :type environment_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + } + + def __init__(self, *, tags=None, external_service_fabric_id: str=None, environment_id: str=None, **kwargs) -> None: + super(ServiceFabricFragment, self).__init__(tags=tags, **kwargs) + self.external_service_fabric_id = external_service_fabric_id + self.environment_id = environment_id + + +class ServiceRunner(Resource): + """A container for a managed identity to execute DevTest lab services. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.devtestlabs.models.IdentityProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, + } + + def __init__(self, *, location: str=None, tags=None, identity=None, **kwargs) -> None: + super(ServiceRunner, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity + + +class SharedPublicIpAddressConfiguration(Model): + """Properties of a virtual machine that determine how it is connected to a + load balancer. + + :param inbound_nat_rules: The incoming NAT rules + :type inbound_nat_rules: + list[~azure.mgmt.devtestlabs.models.InboundNatRule] + """ + + _attribute_map = { + 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRule]'}, + } + + def __init__(self, *, inbound_nat_rules=None, **kwargs) -> None: + super(SharedPublicIpAddressConfiguration, self).__init__(**kwargs) + self.inbound_nat_rules = inbound_nat_rules + + +class SharedPublicIpAddressConfigurationFragment(Model): + """Properties of a virtual machine that determine how it is connected to a + load balancer. + + :param inbound_nat_rules: The incoming NAT rules + :type inbound_nat_rules: + list[~azure.mgmt.devtestlabs.models.InboundNatRuleFragment] + """ + + _attribute_map = { + 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRuleFragment]'}, + } + + def __init__(self, *, inbound_nat_rules=None, **kwargs) -> None: + super(SharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) + self.inbound_nat_rules = inbound_nat_rules + + +class ShutdownNotificationContent(Model): + """The contents of a shutdown notification. Webhooks can use this type to + deserialize the request body when they get notified of an imminent + shutdown. + + :param skip_url: The URL to skip auto-shutdown. + :type skip_url: str + :param delay_url60: The URL to delay shutdown by 60 minutes. + :type delay_url60: str + :param delay_url120: The URL to delay shutdown by 2 hours. + :type delay_url120: str + :param vm_name: The virtual machine to be shut down. + :type vm_name: str + :param guid: The GUID for the virtual machine to be shut down. + :type guid: str + :param owner: The owner of the virtual machine. + :type owner: str + :param vm_url: The URL of the virtual machine. + :type vm_url: str + :param minutes_until_shutdown: Minutes remaining until shutdown + :type minutes_until_shutdown: str + :param event_type: The event for which a notification will be sent. + :type event_type: str + :param text: The text for the notification. + :type text: str + :param subscription_id: The subscription ID for the schedule. + :type subscription_id: str + :param resource_group_name: The resource group name for the schedule. + :type resource_group_name: str + :param lab_name: The lab for the schedule. + :type lab_name: str + """ + + _attribute_map = { + 'skip_url': {'key': 'skipUrl', 'type': 'str'}, + 'delay_url60': {'key': 'delayUrl60', 'type': 'str'}, + 'delay_url120': {'key': 'delayUrl120', 'type': 'str'}, + 'vm_name': {'key': 'vmName', 'type': 'str'}, + 'guid': {'key': 'guid', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'str'}, + 'vm_url': {'key': 'vmUrl', 'type': 'str'}, + 'minutes_until_shutdown': {'key': 'minutesUntilShutdown', 'type': 'str'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'lab_name': {'key': 'labName', 'type': 'str'}, + } + + def __init__(self, *, skip_url: str=None, delay_url60: str=None, delay_url120: str=None, vm_name: str=None, guid: str=None, owner: str=None, vm_url: str=None, minutes_until_shutdown: str=None, event_type: str=None, text: str=None, subscription_id: str=None, resource_group_name: str=None, lab_name: str=None, **kwargs) -> None: + super(ShutdownNotificationContent, self).__init__(**kwargs) + self.skip_url = skip_url + self.delay_url60 = delay_url60 + self.delay_url120 = delay_url120 + self.vm_name = vm_name + self.guid = guid + self.owner = owner + self.vm_url = vm_url + self.minutes_until_shutdown = minutes_until_shutdown + self.event_type = event_type + self.text = text + self.subscription_id = subscription_id + self.resource_group_name = resource_group_name + self.lab_name = lab_name + + +class Subnet(Model): + """Subnet information. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name of the subnet as seen in the lab. + :type lab_subnet_name: str + :param allow_public_ip: The permission policy of the subnet for allowing + public IP addresses (i.e. Allow, Deny)). Possible values include: + 'Default', 'Deny', 'Allow' + :type allow_public_ip: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, allow_public_ip=None, **kwargs) -> None: + super(Subnet, self).__init__(**kwargs) + self.resource_id = resource_id + self.lab_subnet_name = lab_subnet_name + self.allow_public_ip = allow_public_ip + + +class SubnetFragment(Model): + """Subnet information. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name of the subnet as seen in the lab. + :type lab_subnet_name: str + :param allow_public_ip: The permission policy of the subnet for allowing + public IP addresses (i.e. Allow, Deny)). Possible values include: + 'Default', 'Deny', 'Allow' + :type allow_public_ip: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, allow_public_ip=None, **kwargs) -> None: + super(SubnetFragment, self).__init__(**kwargs) + self.resource_id = resource_id + self.lab_subnet_name = lab_subnet_name + self.allow_public_ip = allow_public_ip + + +class SubnetOverride(Model): + """Property overrides on a subnet of a virtual network. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name given to the subnet within the lab. + :type lab_subnet_name: str + :param use_in_vm_creation_permission: Indicates whether this subnet can be + used during virtual machine creation (i.e. Allow, Deny). Possible values + include: 'Default', 'Deny', 'Allow' + :type use_in_vm_creation_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param use_public_ip_address_permission: Indicates whether public IP + addresses can be assigned to virtual machines on this subnet (i.e. Allow, + Deny). Possible values include: 'Default', 'Deny', 'Allow' + :type use_public_ip_address_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param shared_public_ip_address_configuration: Properties that virtual + machines on this subnet will share. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfiguration + :param virtual_network_pool_name: The virtual network pool associated with + this subnet. + :type virtual_network_pool_name: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, + 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfiguration'}, + 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, use_in_vm_creation_permission=None, use_public_ip_address_permission=None, shared_public_ip_address_configuration=None, virtual_network_pool_name: str=None, **kwargs) -> None: + super(SubnetOverride, self).__init__(**kwargs) + self.resource_id = resource_id + self.lab_subnet_name = lab_subnet_name + self.use_in_vm_creation_permission = use_in_vm_creation_permission + self.use_public_ip_address_permission = use_public_ip_address_permission + self.shared_public_ip_address_configuration = shared_public_ip_address_configuration + self.virtual_network_pool_name = virtual_network_pool_name + + +class SubnetOverrideFragment(Model): + """Property overrides on a subnet of a virtual network. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name given to the subnet within the lab. + :type lab_subnet_name: str + :param use_in_vm_creation_permission: Indicates whether this subnet can be + used during virtual machine creation (i.e. Allow, Deny). Possible values + include: 'Default', 'Deny', 'Allow' + :type use_in_vm_creation_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param use_public_ip_address_permission: Indicates whether public IP + addresses can be assigned to virtual machines on this subnet (i.e. Allow, + Deny). Possible values include: 'Default', 'Deny', 'Allow' + :type use_public_ip_address_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param shared_public_ip_address_configuration: Properties that virtual + machines on this subnet will share. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfigurationFragment + :param virtual_network_pool_name: The virtual network pool associated with + this subnet. + :type virtual_network_pool_name: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, + 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfigurationFragment'}, + 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, use_in_vm_creation_permission=None, use_public_ip_address_permission=None, shared_public_ip_address_configuration=None, virtual_network_pool_name: str=None, **kwargs) -> None: + super(SubnetOverrideFragment, self).__init__(**kwargs) + self.resource_id = resource_id + self.lab_subnet_name = lab_subnet_name + self.use_in_vm_creation_permission = use_in_vm_creation_permission + self.use_public_ip_address_permission = use_public_ip_address_permission + self.shared_public_ip_address_configuration = shared_public_ip_address_configuration + self.virtual_network_pool_name = virtual_network_pool_name + + +class SubnetSharedPublicIpAddressConfiguration(Model): + """Configuration for public IP address sharing. + + :param allowed_ports: Backend ports that virtual machines on this subnet + are allowed to expose + :type allowed_ports: list[~azure.mgmt.devtestlabs.models.Port] + """ + + _attribute_map = { + 'allowed_ports': {'key': 'allowedPorts', 'type': '[Port]'}, + } + + def __init__(self, *, allowed_ports=None, **kwargs) -> None: + super(SubnetSharedPublicIpAddressConfiguration, self).__init__(**kwargs) + self.allowed_ports = allowed_ports + + +class SubnetSharedPublicIpAddressConfigurationFragment(Model): + """Configuration for public IP address sharing. + + :param allowed_ports: Backend ports that virtual machines on this subnet + are allowed to expose + :type allowed_ports: list[~azure.mgmt.devtestlabs.models.PortFragment] + """ + + _attribute_map = { + 'allowed_ports': {'key': 'allowedPorts', 'type': '[PortFragment]'}, + } + + def __init__(self, *, allowed_ports=None, **kwargs) -> None: + super(SubnetSharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) + self.allowed_ports = allowed_ports + + +class TargetCostProperties(Model): + """Properties of a cost target. + + :param status: Target cost status. Possible values include: 'Enabled', + 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.TargetCostStatus + :param target: Lab target cost + :type target: int + :param cost_thresholds: Cost thresholds. + :type cost_thresholds: + list[~azure.mgmt.devtestlabs.models.CostThresholdProperties] + :param cycle_start_date_time: Reporting cycle start date. + :type cycle_start_date_time: datetime + :param cycle_end_date_time: Reporting cycle end date. + :type cycle_end_date_time: datetime + :param cycle_type: Reporting cycle type. Possible values include: + 'CalendarMonth', 'Custom' + :type cycle_type: str or ~azure.mgmt.devtestlabs.models.ReportingCycleType + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'int'}, + 'cost_thresholds': {'key': 'costThresholds', 'type': '[CostThresholdProperties]'}, + 'cycle_start_date_time': {'key': 'cycleStartDateTime', 'type': 'iso-8601'}, + 'cycle_end_date_time': {'key': 'cycleEndDateTime', 'type': 'iso-8601'}, + 'cycle_type': {'key': 'cycleType', 'type': 'str'}, + } + + def __init__(self, *, status=None, target: int=None, cost_thresholds=None, cycle_start_date_time=None, cycle_end_date_time=None, cycle_type=None, **kwargs) -> None: + super(TargetCostProperties, self).__init__(**kwargs) + self.status = status + self.target = target + self.cost_thresholds = cost_thresholds + self.cycle_start_date_time = cycle_start_date_time + self.cycle_end_date_time = cycle_end_date_time + self.cycle_type = cycle_type + + +class User(Resource): + """Profile of a lab user. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the user. + :type identity: ~azure.mgmt.devtestlabs.models.UserIdentity + :param secret_store: The secret store of the user. + :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStore + :ivar created_date: The creation date of the user profile. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'properties.identity', 'type': 'UserIdentity'}, + 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStore'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, identity=None, secret_store=None, **kwargs) -> None: + super(User, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity + self.secret_store = secret_store + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class UserFragment(UpdateResource): + """Profile of a lab user. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the user. + :type identity: ~azure.mgmt.devtestlabs.models.UserIdentityFragment + :param secret_store: The secret store of the user. + :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStoreFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'properties.identity', 'type': 'UserIdentityFragment'}, + 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStoreFragment'}, + } + + def __init__(self, *, tags=None, identity=None, secret_store=None, **kwargs) -> None: + super(UserFragment, self).__init__(tags=tags, **kwargs) + self.identity = identity + self.secret_store = secret_store + + +class UserIdentity(Model): + """Identity attributes of a lab user. + + :param principal_name: Set to the principal name / UPN of the client JWT + making the request. + :type principal_name: str + :param principal_id: Set to the principal Id of the client JWT making the + request. Service principal will not have the principal Id. + :type principal_id: str + :param tenant_id: Set to the tenant ID of the client JWT making the + request. + :type tenant_id: str + :param object_id: Set to the object Id of the client JWT making the + request. Not all users have object Id. For CSP (reseller) scenarios for + example, object Id is not available. + :type object_id: str + :param app_id: Set to the app Id of the client JWT making the request. + :type app_id: str + """ + + _attribute_map = { + 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'app_id': {'key': 'appId', 'type': 'str'}, + } + + def __init__(self, *, principal_name: str=None, principal_id: str=None, tenant_id: str=None, object_id: str=None, app_id: str=None, **kwargs) -> None: + super(UserIdentity, self).__init__(**kwargs) + self.principal_name = principal_name + self.principal_id = principal_id + self.tenant_id = tenant_id + self.object_id = object_id + self.app_id = app_id + + +class UserIdentityFragment(Model): + """Identity attributes of a lab user. + + :param principal_name: Set to the principal name / UPN of the client JWT + making the request. + :type principal_name: str + :param principal_id: Set to the principal Id of the client JWT making the + request. Service principal will not have the principal Id. + :type principal_id: str + :param tenant_id: Set to the tenant ID of the client JWT making the + request. + :type tenant_id: str + :param object_id: Set to the object Id of the client JWT making the + request. Not all users have object Id. For CSP (reseller) scenarios for + example, object Id is not available. + :type object_id: str + :param app_id: Set to the app Id of the client JWT making the request. + :type app_id: str + """ + + _attribute_map = { + 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'app_id': {'key': 'appId', 'type': 'str'}, + } + + def __init__(self, *, principal_name: str=None, principal_id: str=None, tenant_id: str=None, object_id: str=None, app_id: str=None, **kwargs) -> None: + super(UserIdentityFragment, self).__init__(**kwargs) + self.principal_name = principal_name + self.principal_id = principal_id + self.tenant_id = tenant_id + self.object_id = object_id + self.app_id = app_id + + +class UserSecretStore(Model): + """Properties of a user's secret store. + + :param key_vault_uri: The URI of the user's Key vault. + :type key_vault_uri: str + :param key_vault_id: The ID of the user's Key vault. + :type key_vault_id: str + """ + + _attribute_map = { + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + } + + def __init__(self, *, key_vault_uri: str=None, key_vault_id: str=None, **kwargs) -> None: + super(UserSecretStore, self).__init__(**kwargs) + self.key_vault_uri = key_vault_uri + self.key_vault_id = key_vault_id + + +class UserSecretStoreFragment(Model): + """Properties of a user's secret store. + + :param key_vault_uri: The URI of the user's Key vault. + :type key_vault_uri: str + :param key_vault_id: The ID of the user's Key vault. + :type key_vault_id: str + """ + + _attribute_map = { + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + } + + def __init__(self, *, key_vault_uri: str=None, key_vault_id: str=None, **kwargs) -> None: + super(UserSecretStoreFragment, self).__init__(**kwargs) + self.key_vault_uri = key_vault_uri + self.key_vault_id = key_vault_id + + +class VirtualNetwork(Resource): + """A virtual network. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param allowed_subnets: The allowed subnets of the virtual network. + :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.Subnet] + :param description: The description of the virtual network. + :type description: str + :param external_provider_resource_id: The Microsoft.Network resource + identifier of the virtual network. + :type external_provider_resource_id: str + :ivar external_subnets: The external subnet properties. + :vartype external_subnets: + list[~azure.mgmt.devtestlabs.models.ExternalSubnet] + :param subnet_overrides: The subnet overrides of the virtual network. + :type subnet_overrides: + list[~azure.mgmt.devtestlabs.models.SubnetOverride] + :ivar created_date: The creation date of the virtual network. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'external_subnets': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[Subnet]'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, + 'external_subnets': {'key': 'properties.externalSubnets', 'type': '[ExternalSubnet]'}, + 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverride]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, allowed_subnets=None, description: str=None, external_provider_resource_id: str=None, subnet_overrides=None, **kwargs) -> None: + super(VirtualNetwork, self).__init__(location=location, tags=tags, **kwargs) + self.allowed_subnets = allowed_subnets + self.description = description + self.external_provider_resource_id = external_provider_resource_id + self.external_subnets = None + self.subnet_overrides = subnet_overrides + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class VirtualNetworkFragment(UpdateResource): + """A virtual network. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param allowed_subnets: The allowed subnets of the virtual network. + :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.SubnetFragment] + :param description: The description of the virtual network. + :type description: str + :param external_provider_resource_id: The Microsoft.Network resource + identifier of the virtual network. + :type external_provider_resource_id: str + :param subnet_overrides: The subnet overrides of the virtual network. + :type subnet_overrides: + list[~azure.mgmt.devtestlabs.models.SubnetOverrideFragment] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[SubnetFragment]'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, + 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverrideFragment]'}, + } + + def __init__(self, *, tags=None, allowed_subnets=None, description: str=None, external_provider_resource_id: str=None, subnet_overrides=None, **kwargs) -> None: + super(VirtualNetworkFragment, self).__init__(tags=tags, **kwargs) + self.allowed_subnets = allowed_subnets + self.description = description + self.external_provider_resource_id = external_provider_resource_id + self.subnet_overrides = subnet_overrides + + +class WeekDetails(Model): + """Properties of a weekly schedule. + + :param weekdays: The days of the week for which the schedule is set (e.g. + Sunday, Monday, Tuesday, etc.). + :type weekdays: list[str] + :param time: The time of the day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'weekdays': {'key': 'weekdays', 'type': '[str]'}, + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, *, weekdays=None, time: str=None, **kwargs) -> None: + super(WeekDetails, self).__init__(**kwargs) + self.weekdays = weekdays + self.time = time + + +class WeekDetailsFragment(Model): + """Properties of a weekly schedule. + + :param weekdays: The days of the week for which the schedule is set (e.g. + Sunday, Monday, Tuesday, etc.). + :type weekdays: list[str] + :param time: The time of the day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'weekdays': {'key': 'weekdays', 'type': '[str]'}, + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, *, weekdays=None, time: str=None, **kwargs) -> None: + super(WeekDetailsFragment, self).__init__(**kwargs) + self.weekdays = weekdays + self.time = time + + +class WindowsOsInfo(Model): + """Information about a Windows OS. + + :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, + SysprepRequested, SysprepApplied). Possible values include: + 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' + :type windows_os_state: str or + ~azure.mgmt.devtestlabs.models.WindowsOsState + """ + + _attribute_map = { + 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, + } + + def __init__(self, *, windows_os_state=None, **kwargs) -> None: + super(WindowsOsInfo, self).__init__(**kwargs) + self.windows_os_state = windows_os_state + + +class WindowsOsInfoFragment(Model): + """Information about a Windows OS. + + :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, + SysprepRequested, SysprepApplied). Possible values include: + 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' + :type windows_os_state: str or + ~azure.mgmt.devtestlabs.models.WindowsOsState + """ + + _attribute_map = { + 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, + } + + def __init__(self, *, windows_os_state=None, **kwargs) -> None: + super(WindowsOsInfoFragment, self).__init__(**kwargs) + self.windows_os_state = windows_os_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_paged_models.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_paged_models.py new file mode 100644 index 000000000000..3e947c89d709 --- /dev/null +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_paged_models.py @@ -0,0 +1,261 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationMetadataPaged(Paged): + """ + A paging container for iterating over a list of :class:`OperationMetadata ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[OperationMetadata]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationMetadataPaged, self).__init__(*args, **kwargs) +class LabPaged(Paged): + """ + A paging container for iterating over a list of :class:`Lab ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Lab]'} + } + + def __init__(self, *args, **kwargs): + + super(LabPaged, self).__init__(*args, **kwargs) +class LabVhdPaged(Paged): + """ + A paging container for iterating over a list of :class:`LabVhd ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[LabVhd]'} + } + + def __init__(self, *args, **kwargs): + + super(LabVhdPaged, self).__init__(*args, **kwargs) +class SchedulePaged(Paged): + """ + A paging container for iterating over a list of :class:`Schedule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Schedule]'} + } + + def __init__(self, *args, **kwargs): + + super(SchedulePaged, self).__init__(*args, **kwargs) +class ArtifactSourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`ArtifactSource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ArtifactSource]'} + } + + def __init__(self, *args, **kwargs): + + super(ArtifactSourcePaged, self).__init__(*args, **kwargs) +class ArmTemplatePaged(Paged): + """ + A paging container for iterating over a list of :class:`ArmTemplate ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ArmTemplate]'} + } + + def __init__(self, *args, **kwargs): + + super(ArmTemplatePaged, self).__init__(*args, **kwargs) +class ArtifactPaged(Paged): + """ + A paging container for iterating over a list of :class:`Artifact ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Artifact]'} + } + + def __init__(self, *args, **kwargs): + + super(ArtifactPaged, self).__init__(*args, **kwargs) +class CustomImagePaged(Paged): + """ + A paging container for iterating over a list of :class:`CustomImage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CustomImage]'} + } + + def __init__(self, *args, **kwargs): + + super(CustomImagePaged, self).__init__(*args, **kwargs) +class FormulaPaged(Paged): + """ + A paging container for iterating over a list of :class:`Formula ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Formula]'} + } + + def __init__(self, *args, **kwargs): + + super(FormulaPaged, self).__init__(*args, **kwargs) +class GalleryImagePaged(Paged): + """ + A paging container for iterating over a list of :class:`GalleryImage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GalleryImage]'} + } + + def __init__(self, *args, **kwargs): + + super(GalleryImagePaged, self).__init__(*args, **kwargs) +class NotificationChannelPaged(Paged): + """ + A paging container for iterating over a list of :class:`NotificationChannel ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[NotificationChannel]'} + } + + def __init__(self, *args, **kwargs): + + super(NotificationChannelPaged, self).__init__(*args, **kwargs) +class PolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`Policy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Policy]'} + } + + def __init__(self, *args, **kwargs): + + super(PolicyPaged, self).__init__(*args, **kwargs) +class UserPaged(Paged): + """ + A paging container for iterating over a list of :class:`User ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[User]'} + } + + def __init__(self, *args, **kwargs): + + super(UserPaged, self).__init__(*args, **kwargs) +class DiskPaged(Paged): + """ + A paging container for iterating over a list of :class:`Disk ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Disk]'} + } + + def __init__(self, *args, **kwargs): + + super(DiskPaged, self).__init__(*args, **kwargs) +class DtlEnvironmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`DtlEnvironment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DtlEnvironment]'} + } + + def __init__(self, *args, **kwargs): + + super(DtlEnvironmentPaged, self).__init__(*args, **kwargs) +class SecretPaged(Paged): + """ + A paging container for iterating over a list of :class:`Secret ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Secret]'} + } + + def __init__(self, *args, **kwargs): + + super(SecretPaged, self).__init__(*args, **kwargs) +class ServiceFabricPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServiceFabric ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServiceFabric]'} + } + + def __init__(self, *args, **kwargs): + + super(ServiceFabricPaged, self).__init__(*args, **kwargs) +class LabVirtualMachinePaged(Paged): + """ + A paging container for iterating over a list of :class:`LabVirtualMachine ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[LabVirtualMachine]'} + } + + def __init__(self, *args, **kwargs): + + super(LabVirtualMachinePaged, self).__init__(*args, **kwargs) +class VirtualNetworkPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualNetwork ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualNetwork]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualNetworkPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule.py deleted file mode 100644 index bbdc049f2f3f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ApplicableSchedule(Resource): - """Schedules applicable to a virtual machine. The schedules may have been - defined on a VM or on lab level. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set - at the lab or lab resource level. - :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.Schedule - :param lab_vms_startup: The auto-startup schedule, if one has been set at - the lab or lab resource level. - :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.Schedule - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'Schedule'}, - 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'Schedule'}, - } - - def __init__(self, **kwargs): - super(ApplicableSchedule, self).__init__(**kwargs) - self.lab_vms_shutdown = kwargs.get('lab_vms_shutdown', None) - self.lab_vms_startup = kwargs.get('lab_vms_startup', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment.py deleted file mode 100644 index 8139b26bbb37..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class ApplicableScheduleFragment(UpdateResource): - """Schedules applicable to a virtual machine. The schedules may have been - defined on a VM or on lab level. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set - at the lab or lab resource level. - :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.ScheduleFragment - :param lab_vms_startup: The auto-startup schedule, if one has been set at - the lab or lab resource level. - :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.ScheduleFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'ScheduleFragment'}, - 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'ScheduleFragment'}, - } - - def __init__(self, **kwargs): - super(ApplicableScheduleFragment, self).__init__(**kwargs) - self.lab_vms_shutdown = kwargs.get('lab_vms_shutdown', None) - self.lab_vms_startup = kwargs.get('lab_vms_startup', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment_py3.py deleted file mode 100644 index d1ddb7b37caa..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class ApplicableScheduleFragment(UpdateResource): - """Schedules applicable to a virtual machine. The schedules may have been - defined on a VM or on lab level. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set - at the lab or lab resource level. - :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.ScheduleFragment - :param lab_vms_startup: The auto-startup schedule, if one has been set at - the lab or lab resource level. - :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.ScheduleFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'ScheduleFragment'}, - 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'ScheduleFragment'}, - } - - def __init__(self, *, tags=None, lab_vms_shutdown=None, lab_vms_startup=None, **kwargs) -> None: - super(ApplicableScheduleFragment, self).__init__(tags=tags, **kwargs) - self.lab_vms_shutdown = lab_vms_shutdown - self.lab_vms_startup = lab_vms_startup diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_py3.py deleted file mode 100644 index dabce38bbcae..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ApplicableSchedule(Resource): - """Schedules applicable to a virtual machine. The schedules may have been - defined on a VM or on lab level. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set - at the lab or lab resource level. - :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.Schedule - :param lab_vms_startup: The auto-startup schedule, if one has been set at - the lab or lab resource level. - :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.Schedule - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'Schedule'}, - 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'Schedule'}, - } - - def __init__(self, *, location: str=None, tags=None, lab_vms_shutdown=None, lab_vms_startup=None, **kwargs) -> None: - super(ApplicableSchedule, self).__init__(location=location, tags=tags, **kwargs) - self.lab_vms_shutdown = lab_vms_shutdown - self.lab_vms_startup = lab_vms_startup diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request.py deleted file mode 100644 index 5576e79bf0ad..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplyArtifactsRequest(Model): - """Request body for applying artifacts to a virtual machine. - - :param artifacts: The list of artifacts to apply. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - """ - - _attribute_map = { - 'artifacts': {'key': 'artifacts', 'type': '[ArtifactInstallProperties]'}, - } - - def __init__(self, **kwargs): - super(ApplyArtifactsRequest, self).__init__(**kwargs) - self.artifacts = kwargs.get('artifacts', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request_py3.py deleted file mode 100644 index 2e5de7eca69f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplyArtifactsRequest(Model): - """Request body for applying artifacts to a virtual machine. - - :param artifacts: The list of artifacts to apply. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - """ - - _attribute_map = { - 'artifacts': {'key': 'artifacts', 'type': '[ArtifactInstallProperties]'}, - } - - def __init__(self, *, artifacts=None, **kwargs) -> None: - super(ApplyArtifactsRequest, self).__init__(**kwargs) - self.artifacts = artifacts diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template.py deleted file mode 100644 index 9ff3ebed92de..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ArmTemplate(Resource): - """An Azure Resource Manager template. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar display_name: The display name of the ARM template. - :vartype display_name: str - :ivar description: The description of the ARM template. - :vartype description: str - :ivar publisher: The publisher of the ARM template. - :vartype publisher: str - :ivar icon: The URI to the icon of the ARM template. - :vartype icon: str - :ivar contents: The contents of the ARM template. - :vartype contents: object - :ivar created_date: The creation date of the armTemplate. - :vartype created_date: datetime - :ivar parameters_value_files_info: File name and parameter values - information from all azuredeploy.*.parameters.json for the ARM template. - :vartype parameters_value_files_info: - list[~azure.mgmt.devtestlabs.models.ParametersValueFileInfo] - :ivar enabled: Whether or not ARM template is enabled for use by lab user. - :vartype enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'publisher': {'readonly': True}, - 'icon': {'readonly': True}, - 'contents': {'readonly': True}, - 'created_date': {'readonly': True}, - 'parameters_value_files_info': {'readonly': True}, - 'enabled': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'contents': {'key': 'properties.contents', 'type': 'object'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'parameters_value_files_info': {'key': 'properties.parametersValueFilesInfo', 'type': '[ParametersValueFileInfo]'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ArmTemplate, self).__init__(**kwargs) - self.display_name = None - self.description = None - self.publisher = None - self.icon = None - self.contents = None - self.created_date = None - self.parameters_value_files_info = None - self.enabled = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info.py deleted file mode 100644 index 9706cf3d1122..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArmTemplateInfo(Model): - """Information about a generated ARM template. - - :param template: The template's contents. - :type template: object - :param parameters: The parameters of the ARM template. - :type parameters: object - """ - - _attribute_map = { - 'template': {'key': 'template', 'type': 'object'}, - 'parameters': {'key': 'parameters', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ArmTemplateInfo, self).__init__(**kwargs) - self.template = kwargs.get('template', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info_py3.py deleted file mode 100644 index 6194e4d20559..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArmTemplateInfo(Model): - """Information about a generated ARM template. - - :param template: The template's contents. - :type template: object - :param parameters: The parameters of the ARM template. - :type parameters: object - """ - - _attribute_map = { - 'template': {'key': 'template', 'type': 'object'}, - 'parameters': {'key': 'parameters', 'type': 'object'}, - } - - def __init__(self, *, template=None, parameters=None, **kwargs) -> None: - super(ArmTemplateInfo, self).__init__(**kwargs) - self.template = template - self.parameters = parameters diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_paged.py deleted file mode 100644 index e209fa704487..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ArmTemplatePaged(Paged): - """ - A paging container for iterating over a list of :class:`ArmTemplate ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ArmTemplate]'} - } - - def __init__(self, *args, **kwargs): - - super(ArmTemplatePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties.py deleted file mode 100644 index 9c939b46ff98..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArmTemplateParameterProperties(Model): - """Properties of an Azure Resource Manager template parameter. - - :param name: The name of the template parameter. - :type name: str - :param value: The value of the template parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArmTemplateParameterProperties, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment.py deleted file mode 100644 index c73b8c260aee..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArmTemplateParameterPropertiesFragment(Model): - """Properties of an Azure Resource Manager template parameter. - - :param name: The name of the template parameter. - :type name: str - :param value: The value of the template parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArmTemplateParameterPropertiesFragment, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment_py3.py deleted file mode 100644 index ca110d0ee441..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArmTemplateParameterPropertiesFragment(Model): - """Properties of an Azure Resource Manager template parameter. - - :param name: The name of the template parameter. - :type name: str - :param value: The value of the template parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: - super(ArmTemplateParameterPropertiesFragment, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_py3.py deleted file mode 100644 index 16ab6753be2e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArmTemplateParameterProperties(Model): - """Properties of an Azure Resource Manager template parameter. - - :param name: The name of the template parameter. - :type name: str - :param value: The value of the template parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: - super(ArmTemplateParameterProperties, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_py3.py deleted file mode 100644 index 64b55696e79c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_py3.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ArmTemplate(Resource): - """An Azure Resource Manager template. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar display_name: The display name of the ARM template. - :vartype display_name: str - :ivar description: The description of the ARM template. - :vartype description: str - :ivar publisher: The publisher of the ARM template. - :vartype publisher: str - :ivar icon: The URI to the icon of the ARM template. - :vartype icon: str - :ivar contents: The contents of the ARM template. - :vartype contents: object - :ivar created_date: The creation date of the armTemplate. - :vartype created_date: datetime - :ivar parameters_value_files_info: File name and parameter values - information from all azuredeploy.*.parameters.json for the ARM template. - :vartype parameters_value_files_info: - list[~azure.mgmt.devtestlabs.models.ParametersValueFileInfo] - :ivar enabled: Whether or not ARM template is enabled for use by lab user. - :vartype enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'publisher': {'readonly': True}, - 'icon': {'readonly': True}, - 'contents': {'readonly': True}, - 'created_date': {'readonly': True}, - 'parameters_value_files_info': {'readonly': True}, - 'enabled': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'contents': {'key': 'properties.contents', 'type': 'object'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'parameters_value_files_info': {'key': 'properties.parametersValueFilesInfo', 'type': '[ParametersValueFileInfo]'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(ArmTemplate, self).__init__(location=location, tags=tags, **kwargs) - self.display_name = None - self.description = None - self.publisher = None - self.icon = None - self.contents = None - self.created_date = None - self.parameters_value_files_info = None - self.enabled = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact.py deleted file mode 100644 index cf1884020662..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Artifact(Resource): - """An artifact. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar title: The artifact's title. - :vartype title: str - :ivar description: The artifact's description. - :vartype description: str - :ivar publisher: The artifact's publisher. - :vartype publisher: str - :ivar file_path: The file path to the artifact. - :vartype file_path: str - :ivar icon: The URI to the artifact icon. - :vartype icon: str - :ivar target_os_type: The artifact's target OS. - :vartype target_os_type: str - :ivar parameters: The artifact's parameters. - :vartype parameters: object - :ivar created_date: The artifact's creation date. - :vartype created_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'title': {'readonly': True}, - 'description': {'readonly': True}, - 'publisher': {'readonly': True}, - 'file_path': {'readonly': True}, - 'icon': {'readonly': True}, - 'target_os_type': {'readonly': True}, - 'parameters': {'readonly': True}, - 'created_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'file_path': {'key': 'properties.filePath', 'type': 'str'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'target_os_type': {'key': 'properties.targetOsType', 'type': 'str'}, - 'parameters': {'key': 'properties.parameters', 'type': 'object'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(Artifact, self).__init__(**kwargs) - self.title = None - self.description = None - self.publisher = None - self.file_path = None - self.icon = None - self.target_os_type = None - self.parameters = None - self.created_date = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties.py deleted file mode 100644 index 00e10ab200d7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactDeploymentStatusProperties(Model): - """Properties of an artifact deployment. - - :param deployment_status: The deployment status of the artifact. - :type deployment_status: str - :param artifacts_applied: The total count of the artifacts that were - successfully applied. - :type artifacts_applied: int - :param total_artifacts: The total count of the artifacts that were - tentatively applied. - :type total_artifacts: int - """ - - _attribute_map = { - 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, - 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, - 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ArtifactDeploymentStatusProperties, self).__init__(**kwargs) - self.deployment_status = kwargs.get('deployment_status', None) - self.artifacts_applied = kwargs.get('artifacts_applied', None) - self.total_artifacts = kwargs.get('total_artifacts', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment.py deleted file mode 100644 index b5231c92c635..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactDeploymentStatusPropertiesFragment(Model): - """Properties of an artifact deployment. - - :param deployment_status: The deployment status of the artifact. - :type deployment_status: str - :param artifacts_applied: The total count of the artifacts that were - successfully applied. - :type artifacts_applied: int - :param total_artifacts: The total count of the artifacts that were - tentatively applied. - :type total_artifacts: int - """ - - _attribute_map = { - 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, - 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, - 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ArtifactDeploymentStatusPropertiesFragment, self).__init__(**kwargs) - self.deployment_status = kwargs.get('deployment_status', None) - self.artifacts_applied = kwargs.get('artifacts_applied', None) - self.total_artifacts = kwargs.get('total_artifacts', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment_py3.py deleted file mode 100644 index d3dd5372ef6d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactDeploymentStatusPropertiesFragment(Model): - """Properties of an artifact deployment. - - :param deployment_status: The deployment status of the artifact. - :type deployment_status: str - :param artifacts_applied: The total count of the artifacts that were - successfully applied. - :type artifacts_applied: int - :param total_artifacts: The total count of the artifacts that were - tentatively applied. - :type total_artifacts: int - """ - - _attribute_map = { - 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, - 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, - 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, - } - - def __init__(self, *, deployment_status: str=None, artifacts_applied: int=None, total_artifacts: int=None, **kwargs) -> None: - super(ArtifactDeploymentStatusPropertiesFragment, self).__init__(**kwargs) - self.deployment_status = deployment_status - self.artifacts_applied = artifacts_applied - self.total_artifacts = total_artifacts diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_py3.py deleted file mode 100644 index 5b38610af59e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactDeploymentStatusProperties(Model): - """Properties of an artifact deployment. - - :param deployment_status: The deployment status of the artifact. - :type deployment_status: str - :param artifacts_applied: The total count of the artifacts that were - successfully applied. - :type artifacts_applied: int - :param total_artifacts: The total count of the artifacts that were - tentatively applied. - :type total_artifacts: int - """ - - _attribute_map = { - 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, - 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, - 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, - } - - def __init__(self, *, deployment_status: str=None, artifacts_applied: int=None, total_artifacts: int=None, **kwargs) -> None: - super(ArtifactDeploymentStatusProperties, self).__init__(**kwargs) - self.deployment_status = deployment_status - self.artifacts_applied = artifacts_applied - self.total_artifacts = total_artifacts diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties.py deleted file mode 100644 index 7a976ea8f7b1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactInstallProperties(Model): - """Properties of an artifact. - - :param artifact_id: The artifact's identifier. - :type artifact_id: str - :param artifact_title: The artifact's title. - :type artifact_title: str - :param parameters: The parameters of the artifact. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArtifactParameterProperties] - :param status: The status of the artifact. - :type status: str - :param deployment_status_message: The status message from the deployment. - :type deployment_status_message: str - :param vm_extension_status_message: The status message from the virtual - machine extension. - :type vm_extension_status_message: str - :param install_time: The time that the artifact starts to install on the - virtual machine. - :type install_time: datetime - """ - - _attribute_map = { - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterProperties]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, - 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, - 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ArtifactInstallProperties, self).__init__(**kwargs) - self.artifact_id = kwargs.get('artifact_id', None) - self.artifact_title = kwargs.get('artifact_title', None) - self.parameters = kwargs.get('parameters', None) - self.status = kwargs.get('status', None) - self.deployment_status_message = kwargs.get('deployment_status_message', None) - self.vm_extension_status_message = kwargs.get('vm_extension_status_message', None) - self.install_time = kwargs.get('install_time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment.py deleted file mode 100644 index 0149af16d549..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactInstallPropertiesFragment(Model): - """Properties of an artifact. - - :param artifact_id: The artifact's identifier. - :type artifact_id: str - :param artifact_title: The artifact's title. - :type artifact_title: str - :param parameters: The parameters of the artifact. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArtifactParameterPropertiesFragment] - :param status: The status of the artifact. - :type status: str - :param deployment_status_message: The status message from the deployment. - :type deployment_status_message: str - :param vm_extension_status_message: The status message from the virtual - machine extension. - :type vm_extension_status_message: str - :param install_time: The time that the artifact starts to install on the - virtual machine. - :type install_time: datetime - """ - - _attribute_map = { - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterPropertiesFragment]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, - 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, - 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ArtifactInstallPropertiesFragment, self).__init__(**kwargs) - self.artifact_id = kwargs.get('artifact_id', None) - self.artifact_title = kwargs.get('artifact_title', None) - self.parameters = kwargs.get('parameters', None) - self.status = kwargs.get('status', None) - self.deployment_status_message = kwargs.get('deployment_status_message', None) - self.vm_extension_status_message = kwargs.get('vm_extension_status_message', None) - self.install_time = kwargs.get('install_time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment_py3.py deleted file mode 100644 index 4aa552477186..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactInstallPropertiesFragment(Model): - """Properties of an artifact. - - :param artifact_id: The artifact's identifier. - :type artifact_id: str - :param artifact_title: The artifact's title. - :type artifact_title: str - :param parameters: The parameters of the artifact. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArtifactParameterPropertiesFragment] - :param status: The status of the artifact. - :type status: str - :param deployment_status_message: The status message from the deployment. - :type deployment_status_message: str - :param vm_extension_status_message: The status message from the virtual - machine extension. - :type vm_extension_status_message: str - :param install_time: The time that the artifact starts to install on the - virtual machine. - :type install_time: datetime - """ - - _attribute_map = { - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterPropertiesFragment]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, - 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, - 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, artifact_id: str=None, artifact_title: str=None, parameters=None, status: str=None, deployment_status_message: str=None, vm_extension_status_message: str=None, install_time=None, **kwargs) -> None: - super(ArtifactInstallPropertiesFragment, self).__init__(**kwargs) - self.artifact_id = artifact_id - self.artifact_title = artifact_title - self.parameters = parameters - self.status = status - self.deployment_status_message = deployment_status_message - self.vm_extension_status_message = vm_extension_status_message - self.install_time = install_time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_py3.py deleted file mode 100644 index 3df682e56bc6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactInstallProperties(Model): - """Properties of an artifact. - - :param artifact_id: The artifact's identifier. - :type artifact_id: str - :param artifact_title: The artifact's title. - :type artifact_title: str - :param parameters: The parameters of the artifact. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArtifactParameterProperties] - :param status: The status of the artifact. - :type status: str - :param deployment_status_message: The status message from the deployment. - :type deployment_status_message: str - :param vm_extension_status_message: The status message from the virtual - machine extension. - :type vm_extension_status_message: str - :param install_time: The time that the artifact starts to install on the - virtual machine. - :type install_time: datetime - """ - - _attribute_map = { - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterProperties]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, - 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, - 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, artifact_id: str=None, artifact_title: str=None, parameters=None, status: str=None, deployment_status_message: str=None, vm_extension_status_message: str=None, install_time=None, **kwargs) -> None: - super(ArtifactInstallProperties, self).__init__(**kwargs) - self.artifact_id = artifact_id - self.artifact_title = artifact_title - self.parameters = parameters - self.status = status - self.deployment_status_message = deployment_status_message - self.vm_extension_status_message = vm_extension_status_message - self.install_time = install_time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_paged.py deleted file mode 100644 index 67c8e3601237..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ArtifactPaged(Paged): - """ - A paging container for iterating over a list of :class:`Artifact ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Artifact]'} - } - - def __init__(self, *args, **kwargs): - - super(ArtifactPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties.py deleted file mode 100644 index 546480baabd2..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactParameterProperties(Model): - """Properties of an artifact parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArtifactParameterProperties, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment.py deleted file mode 100644 index 77be250d5e11..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactParameterPropertiesFragment(Model): - """Properties of an artifact parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArtifactParameterPropertiesFragment, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment_py3.py deleted file mode 100644 index 326ea3643623..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactParameterPropertiesFragment(Model): - """Properties of an artifact parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: - super(ArtifactParameterPropertiesFragment, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_py3.py deleted file mode 100644 index c3ef4207b385..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactParameterProperties(Model): - """Properties of an artifact parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: - super(ArtifactParameterProperties, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_py3.py deleted file mode 100644 index 9e36ad2abf3f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Artifact(Resource): - """An artifact. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar title: The artifact's title. - :vartype title: str - :ivar description: The artifact's description. - :vartype description: str - :ivar publisher: The artifact's publisher. - :vartype publisher: str - :ivar file_path: The file path to the artifact. - :vartype file_path: str - :ivar icon: The URI to the artifact icon. - :vartype icon: str - :ivar target_os_type: The artifact's target OS. - :vartype target_os_type: str - :ivar parameters: The artifact's parameters. - :vartype parameters: object - :ivar created_date: The artifact's creation date. - :vartype created_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'title': {'readonly': True}, - 'description': {'readonly': True}, - 'publisher': {'readonly': True}, - 'file_path': {'readonly': True}, - 'icon': {'readonly': True}, - 'target_os_type': {'readonly': True}, - 'parameters': {'readonly': True}, - 'created_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'file_path': {'key': 'properties.filePath', 'type': 'str'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'target_os_type': {'key': 'properties.targetOsType', 'type': 'str'}, - 'parameters': {'key': 'properties.parameters', 'type': 'object'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(Artifact, self).__init__(location=location, tags=tags, **kwargs) - self.title = None - self.description = None - self.publisher = None - self.file_path = None - self.icon = None - self.target_os_type = None - self.parameters = None - self.created_date = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source.py deleted file mode 100644 index ba6cbfc20988..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ArtifactSource(Resource): - """Properties of an artifact source. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param display_name: The artifact source's display name. - :type display_name: str - :param uri: The artifact source's URI. - :type uri: str - :param source_type: The artifact source's type. Possible values include: - 'VsoGit', 'GitHub' - :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType - :param folder_path: The folder containing artifacts. - :type folder_path: str - :param arm_template_folder_path: The folder containing Azure Resource - Manager templates. - :type arm_template_folder_path: str - :param branch_ref: The artifact source's branch reference. - :type branch_ref: str - :param security_token: The security token to authenticate to the artifact - source. - :type security_token: str - :param status: Indicates if the artifact source is enabled (values: - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :ivar created_date: The artifact source's creation date. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, - 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, - 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, - 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, - 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArtifactSource, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.uri = kwargs.get('uri', None) - self.source_type = kwargs.get('source_type', None) - self.folder_path = kwargs.get('folder_path', None) - self.arm_template_folder_path = kwargs.get('arm_template_folder_path', None) - self.branch_ref = kwargs.get('branch_ref', None) - self.security_token = kwargs.get('security_token', None) - self.status = kwargs.get('status', None) - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment.py deleted file mode 100644 index 3c07b25eeb13..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class ArtifactSourceFragment(UpdateResource): - """Properties of an artifact source. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param display_name: The artifact source's display name. - :type display_name: str - :param uri: The artifact source's URI. - :type uri: str - :param source_type: The artifact source's type. Possible values include: - 'VsoGit', 'GitHub' - :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType - :param folder_path: The folder containing artifacts. - :type folder_path: str - :param arm_template_folder_path: The folder containing Azure Resource - Manager templates. - :type arm_template_folder_path: str - :param branch_ref: The artifact source's branch reference. - :type branch_ref: str - :param security_token: The security token to authenticate to the artifact - source. - :type security_token: str - :param status: Indicates if the artifact source is enabled (values: - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, - 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, - 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, - 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, - 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArtifactSourceFragment, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.uri = kwargs.get('uri', None) - self.source_type = kwargs.get('source_type', None) - self.folder_path = kwargs.get('folder_path', None) - self.arm_template_folder_path = kwargs.get('arm_template_folder_path', None) - self.branch_ref = kwargs.get('branch_ref', None) - self.security_token = kwargs.get('security_token', None) - self.status = kwargs.get('status', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment_py3.py deleted file mode 100644 index a243837b76d0..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class ArtifactSourceFragment(UpdateResource): - """Properties of an artifact source. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param display_name: The artifact source's display name. - :type display_name: str - :param uri: The artifact source's URI. - :type uri: str - :param source_type: The artifact source's type. Possible values include: - 'VsoGit', 'GitHub' - :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType - :param folder_path: The folder containing artifacts. - :type folder_path: str - :param arm_template_folder_path: The folder containing Azure Resource - Manager templates. - :type arm_template_folder_path: str - :param branch_ref: The artifact source's branch reference. - :type branch_ref: str - :param security_token: The security token to authenticate to the artifact - source. - :type security_token: str - :param status: Indicates if the artifact source is enabled (values: - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, - 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, - 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, - 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, - 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - } - - def __init__(self, *, tags=None, display_name: str=None, uri: str=None, source_type=None, folder_path: str=None, arm_template_folder_path: str=None, branch_ref: str=None, security_token: str=None, status=None, **kwargs) -> None: - super(ArtifactSourceFragment, self).__init__(tags=tags, **kwargs) - self.display_name = display_name - self.uri = uri - self.source_type = source_type - self.folder_path = folder_path - self.arm_template_folder_path = arm_template_folder_path - self.branch_ref = branch_ref - self.security_token = security_token - self.status = status diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_paged.py deleted file mode 100644 index d5990ee0e94f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ArtifactSourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`ArtifactSource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ArtifactSource]'} - } - - def __init__(self, *args, **kwargs): - - super(ArtifactSourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_py3.py deleted file mode 100644 index 53eeac5462f6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_py3.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ArtifactSource(Resource): - """Properties of an artifact source. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param display_name: The artifact source's display name. - :type display_name: str - :param uri: The artifact source's URI. - :type uri: str - :param source_type: The artifact source's type. Possible values include: - 'VsoGit', 'GitHub' - :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType - :param folder_path: The folder containing artifacts. - :type folder_path: str - :param arm_template_folder_path: The folder containing Azure Resource - Manager templates. - :type arm_template_folder_path: str - :param branch_ref: The artifact source's branch reference. - :type branch_ref: str - :param security_token: The security token to authenticate to the artifact - source. - :type security_token: str - :param status: Indicates if the artifact source is enabled (values: - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :ivar created_date: The artifact source's creation date. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, - 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, - 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, - 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, - 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, display_name: str=None, uri: str=None, source_type=None, folder_path: str=None, arm_template_folder_path: str=None, branch_ref: str=None, security_token: str=None, status=None, **kwargs) -> None: - super(ArtifactSource, self).__init__(location=location, tags=tags, **kwargs) - self.display_name = display_name - self.uri = uri - self.source_type = source_type - self.folder_path = folder_path - self.arm_template_folder_path = arm_template_folder_path - self.branch_ref = branch_ref - self.security_token = security_token - self.status = status - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties.py deleted file mode 100644 index 1935925ef669..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachDiskProperties(Model): - """Properties of the disk to attach. - - :param leased_by_lab_vm_id: The resource ID of the Lab virtual machine to - which the disk is attached. - :type leased_by_lab_vm_id: str - """ - - _attribute_map = { - 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AttachDiskProperties, self).__init__(**kwargs) - self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties_py3.py deleted file mode 100644 index 6cf94213e53e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachDiskProperties(Model): - """Properties of the disk to attach. - - :param leased_by_lab_vm_id: The resource ID of the Lab virtual machine to - which the disk is attached. - :type leased_by_lab_vm_id: str - """ - - _attribute_map = { - 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, - } - - def __init__(self, *, leased_by_lab_vm_id: str=None, **kwargs) -> None: - super(AttachDiskProperties, self).__init__(**kwargs) - self.leased_by_lab_vm_id = leased_by_lab_vm_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options.py deleted file mode 100644 index c4c18be9b277..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachNewDataDiskOptions(Model): - """Properties to attach new disk to the Virtual Machine. - - :param disk_size_gi_b: Size of the disk to be attached in Gibibytes. - :type disk_size_gi_b: int - :param disk_name: The name of the disk to be attached. - :type disk_name: str - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - 'disk_name': {'key': 'diskName', 'type': 'str'}, - 'disk_type': {'key': 'diskType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AttachNewDataDiskOptions, self).__init__(**kwargs) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) - self.disk_name = kwargs.get('disk_name', None) - self.disk_type = kwargs.get('disk_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment.py deleted file mode 100644 index 4ab7695dd872..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachNewDataDiskOptionsFragment(Model): - """Properties to attach new disk to the Virtual Machine. - - :param disk_size_gi_b: Size of the disk to be attached in Gibibytes. - :type disk_size_gi_b: int - :param disk_name: The name of the disk to be attached. - :type disk_name: str - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - 'disk_name': {'key': 'diskName', 'type': 'str'}, - 'disk_type': {'key': 'diskType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AttachNewDataDiskOptionsFragment, self).__init__(**kwargs) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) - self.disk_name = kwargs.get('disk_name', None) - self.disk_type = kwargs.get('disk_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment_py3.py deleted file mode 100644 index ec8d6863f811..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachNewDataDiskOptionsFragment(Model): - """Properties to attach new disk to the Virtual Machine. - - :param disk_size_gi_b: Size of the disk to be attached in Gibibytes. - :type disk_size_gi_b: int - :param disk_name: The name of the disk to be attached. - :type disk_name: str - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - 'disk_name': {'key': 'diskName', 'type': 'str'}, - 'disk_type': {'key': 'diskType', 'type': 'str'}, - } - - def __init__(self, *, disk_size_gi_b: int=None, disk_name: str=None, disk_type=None, **kwargs) -> None: - super(AttachNewDataDiskOptionsFragment, self).__init__(**kwargs) - self.disk_size_gi_b = disk_size_gi_b - self.disk_name = disk_name - self.disk_type = disk_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_py3.py deleted file mode 100644 index a03bb685e96c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachNewDataDiskOptions(Model): - """Properties to attach new disk to the Virtual Machine. - - :param disk_size_gi_b: Size of the disk to be attached in Gibibytes. - :type disk_size_gi_b: int - :param disk_name: The name of the disk to be attached. - :type disk_name: str - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - 'disk_name': {'key': 'diskName', 'type': 'str'}, - 'disk_type': {'key': 'diskType', 'type': 'str'}, - } - - def __init__(self, *, disk_size_gi_b: int=None, disk_name: str=None, disk_type=None, **kwargs) -> None: - super(AttachNewDataDiskOptions, self).__init__(**kwargs) - self.disk_size_gi_b = disk_size_gi_b - self.disk_name = disk_name - self.disk_type = disk_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters.py deleted file mode 100644 index f54138ff7a98..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BulkCreationParameters(Model): - """Parameters for creating multiple virtual machines as a single action. - - :param instance_count: The number of virtual machine instances to create. - :type instance_count: int - """ - - _attribute_map = { - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(BulkCreationParameters, self).__init__(**kwargs) - self.instance_count = kwargs.get('instance_count', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment.py deleted file mode 100644 index 1f03bf7aeffd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BulkCreationParametersFragment(Model): - """Parameters for creating multiple virtual machines as a single action. - - :param instance_count: The number of virtual machine instances to create. - :type instance_count: int - """ - - _attribute_map = { - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(BulkCreationParametersFragment, self).__init__(**kwargs) - self.instance_count = kwargs.get('instance_count', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment_py3.py deleted file mode 100644 index 3d78014f88c5..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BulkCreationParametersFragment(Model): - """Parameters for creating multiple virtual machines as a single action. - - :param instance_count: The number of virtual machine instances to create. - :type instance_count: int - """ - - _attribute_map = { - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - } - - def __init__(self, *, instance_count: int=None, **kwargs) -> None: - super(BulkCreationParametersFragment, self).__init__(**kwargs) - self.instance_count = instance_count diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_py3.py deleted file mode 100644 index c17ac0c6da94..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BulkCreationParameters(Model): - """Parameters for creating multiple virtual machines as a single action. - - :param instance_count: The number of virtual machine instances to create. - :type instance_count: int - """ - - _attribute_map = { - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - } - - def __init__(self, *, instance_count: int=None, **kwargs) -> None: - super(BulkCreationParameters, self).__init__(**kwargs) - self.instance_count = instance_count diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk.py deleted file mode 100644 index 36637b964ecc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeDataDisk(Model): - """A data disks attached to a virtual machine. - - :param name: Gets data disk name. - :type name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :param disk_size_gi_b: Gets data disk size in GiB. - :type disk_size_gi_b: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'disk_uri': {'key': 'diskUri', 'type': 'str'}, - 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ComputeDataDisk, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.disk_uri = kwargs.get('disk_uri', None) - self.managed_disk_id = kwargs.get('managed_disk_id', None) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment.py deleted file mode 100644 index 5dc673a52f22..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeDataDiskFragment(Model): - """A data disks attached to a virtual machine. - - :param name: Gets data disk name. - :type name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :param disk_size_gi_b: Gets data disk size in GiB. - :type disk_size_gi_b: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'disk_uri': {'key': 'diskUri', 'type': 'str'}, - 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ComputeDataDiskFragment, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.disk_uri = kwargs.get('disk_uri', None) - self.managed_disk_id = kwargs.get('managed_disk_id', None) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment_py3.py deleted file mode 100644 index 22fcaa4b3ad8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeDataDiskFragment(Model): - """A data disks attached to a virtual machine. - - :param name: Gets data disk name. - :type name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :param disk_size_gi_b: Gets data disk size in GiB. - :type disk_size_gi_b: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'disk_uri': {'key': 'diskUri', 'type': 'str'}, - 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - } - - def __init__(self, *, name: str=None, disk_uri: str=None, managed_disk_id: str=None, disk_size_gi_b: int=None, **kwargs) -> None: - super(ComputeDataDiskFragment, self).__init__(**kwargs) - self.name = name - self.disk_uri = disk_uri - self.managed_disk_id = managed_disk_id - self.disk_size_gi_b = disk_size_gi_b diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_py3.py deleted file mode 100644 index c88f007a5c0d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeDataDisk(Model): - """A data disks attached to a virtual machine. - - :param name: Gets data disk name. - :type name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :param disk_size_gi_b: Gets data disk size in GiB. - :type disk_size_gi_b: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'disk_uri': {'key': 'diskUri', 'type': 'str'}, - 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - } - - def __init__(self, *, name: str=None, disk_uri: str=None, managed_disk_id: str=None, disk_size_gi_b: int=None, **kwargs) -> None: - super(ComputeDataDisk, self).__init__(**kwargs) - self.name = name - self.disk_uri = disk_uri - self.managed_disk_id = managed_disk_id - self.disk_size_gi_b = disk_size_gi_b diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status.py deleted file mode 100644 index 896d9562e61d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmInstanceViewStatus(Model): - """Status information about a virtual machine. - - :param code: Gets the status Code. - :type code: str - :param display_status: Gets the short localizable label for the status. - :type display_status: str - :param message: Gets the message associated with the status. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ComputeVmInstanceViewStatus, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.display_status = kwargs.get('display_status', None) - self.message = kwargs.get('message', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment.py deleted file mode 100644 index 2b403562e4df..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmInstanceViewStatusFragment(Model): - """Status information about a virtual machine. - - :param code: Gets the status Code. - :type code: str - :param display_status: Gets the short localizable label for the status. - :type display_status: str - :param message: Gets the message associated with the status. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ComputeVmInstanceViewStatusFragment, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.display_status = kwargs.get('display_status', None) - self.message = kwargs.get('message', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment_py3.py deleted file mode 100644 index 81b1bd388f89..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmInstanceViewStatusFragment(Model): - """Status information about a virtual machine. - - :param code: Gets the status Code. - :type code: str - :param display_status: Gets the short localizable label for the status. - :type display_status: str - :param message: Gets the message associated with the status. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, display_status: str=None, message: str=None, **kwargs) -> None: - super(ComputeVmInstanceViewStatusFragment, self).__init__(**kwargs) - self.code = code - self.display_status = display_status - self.message = message diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_py3.py deleted file mode 100644 index 75fca83157a1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmInstanceViewStatus(Model): - """Status information about a virtual machine. - - :param code: Gets the status Code. - :type code: str - :param display_status: Gets the short localizable label for the status. - :type display_status: str - :param message: Gets the message associated with the status. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, display_status: str=None, message: str=None, **kwargs) -> None: - super(ComputeVmInstanceViewStatus, self).__init__(**kwargs) - self.code = code - self.display_status = display_status - self.message = message diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties.py deleted file mode 100644 index e4b785b9c47a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmProperties(Model): - """Properties of a virtual machine returned by the Microsoft.Compute API. - - :param statuses: Gets the statuses of the virtual machine. - :type statuses: - list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatus] - :param os_type: Gets the OS type of the virtual machine. - :type os_type: str - :param vm_size: Gets the size of the virtual machine. - :type vm_size: str - :param network_interface_id: Gets the network interface ID of the virtual - machine. - :type network_interface_id: str - :param os_disk_id: Gets OS disk blob uri for the virtual machine. - :type os_disk_id: str - :param data_disk_ids: Gets data disks blob uri for the virtual machine. - :type data_disk_ids: list[str] - :param data_disks: Gets all data disks attached to the virtual machine. - :type data_disks: list[~azure.mgmt.devtestlabs.models.ComputeDataDisk] - """ - - _attribute_map = { - 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatus]'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, - 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, - 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDisk]'}, - } - - def __init__(self, **kwargs): - super(ComputeVmProperties, self).__init__(**kwargs) - self.statuses = kwargs.get('statuses', None) - self.os_type = kwargs.get('os_type', None) - self.vm_size = kwargs.get('vm_size', None) - self.network_interface_id = kwargs.get('network_interface_id', None) - self.os_disk_id = kwargs.get('os_disk_id', None) - self.data_disk_ids = kwargs.get('data_disk_ids', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment.py deleted file mode 100644 index c6295526ebd6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmPropertiesFragment(Model): - """Properties of a virtual machine returned by the Microsoft.Compute API. - - :param statuses: Gets the statuses of the virtual machine. - :type statuses: - list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatusFragment] - :param os_type: Gets the OS type of the virtual machine. - :type os_type: str - :param vm_size: Gets the size of the virtual machine. - :type vm_size: str - :param network_interface_id: Gets the network interface ID of the virtual - machine. - :type network_interface_id: str - :param os_disk_id: Gets OS disk blob uri for the virtual machine. - :type os_disk_id: str - :param data_disk_ids: Gets data disks blob uri for the virtual machine. - :type data_disk_ids: list[str] - :param data_disks: Gets all data disks attached to the virtual machine. - :type data_disks: - list[~azure.mgmt.devtestlabs.models.ComputeDataDiskFragment] - """ - - _attribute_map = { - 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatusFragment]'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, - 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, - 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDiskFragment]'}, - } - - def __init__(self, **kwargs): - super(ComputeVmPropertiesFragment, self).__init__(**kwargs) - self.statuses = kwargs.get('statuses', None) - self.os_type = kwargs.get('os_type', None) - self.vm_size = kwargs.get('vm_size', None) - self.network_interface_id = kwargs.get('network_interface_id', None) - self.os_disk_id = kwargs.get('os_disk_id', None) - self.data_disk_ids = kwargs.get('data_disk_ids', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment_py3.py deleted file mode 100644 index 7668ed7983c1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmPropertiesFragment(Model): - """Properties of a virtual machine returned by the Microsoft.Compute API. - - :param statuses: Gets the statuses of the virtual machine. - :type statuses: - list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatusFragment] - :param os_type: Gets the OS type of the virtual machine. - :type os_type: str - :param vm_size: Gets the size of the virtual machine. - :type vm_size: str - :param network_interface_id: Gets the network interface ID of the virtual - machine. - :type network_interface_id: str - :param os_disk_id: Gets OS disk blob uri for the virtual machine. - :type os_disk_id: str - :param data_disk_ids: Gets data disks blob uri for the virtual machine. - :type data_disk_ids: list[str] - :param data_disks: Gets all data disks attached to the virtual machine. - :type data_disks: - list[~azure.mgmt.devtestlabs.models.ComputeDataDiskFragment] - """ - - _attribute_map = { - 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatusFragment]'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, - 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, - 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDiskFragment]'}, - } - - def __init__(self, *, statuses=None, os_type: str=None, vm_size: str=None, network_interface_id: str=None, os_disk_id: str=None, data_disk_ids=None, data_disks=None, **kwargs) -> None: - super(ComputeVmPropertiesFragment, self).__init__(**kwargs) - self.statuses = statuses - self.os_type = os_type - self.vm_size = vm_size - self.network_interface_id = network_interface_id - self.os_disk_id = os_disk_id - self.data_disk_ids = data_disk_ids - self.data_disks = data_disks diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_py3.py deleted file mode 100644 index 90c4ae4e246a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmProperties(Model): - """Properties of a virtual machine returned by the Microsoft.Compute API. - - :param statuses: Gets the statuses of the virtual machine. - :type statuses: - list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatus] - :param os_type: Gets the OS type of the virtual machine. - :type os_type: str - :param vm_size: Gets the size of the virtual machine. - :type vm_size: str - :param network_interface_id: Gets the network interface ID of the virtual - machine. - :type network_interface_id: str - :param os_disk_id: Gets OS disk blob uri for the virtual machine. - :type os_disk_id: str - :param data_disk_ids: Gets data disks blob uri for the virtual machine. - :type data_disk_ids: list[str] - :param data_disks: Gets all data disks attached to the virtual machine. - :type data_disks: list[~azure.mgmt.devtestlabs.models.ComputeDataDisk] - """ - - _attribute_map = { - 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatus]'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, - 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, - 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDisk]'}, - } - - def __init__(self, *, statuses=None, os_type: str=None, vm_size: str=None, network_interface_id: str=None, os_disk_id: str=None, data_disk_ids=None, data_disks=None, **kwargs) -> None: - super(ComputeVmProperties, self).__init__(**kwargs) - self.statuses = statuses - self.os_type = os_type - self.vm_size = vm_size - self.network_interface_id = network_interface_id - self.os_disk_id = os_disk_id - self.data_disk_ids = data_disk_ids - self.data_disks = data_disks diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties.py deleted file mode 100644 index 73269a4dd25d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CostThresholdProperties(Model): - """Properties of a cost threshold item. - - :param threshold_id: The ID of the cost threshold item. - :type threshold_id: str - :param percentage_threshold: The value of the percentage cost threshold. - :type percentage_threshold: - ~azure.mgmt.devtestlabs.models.PercentageCostThresholdProperties - :param display_on_chart: Indicates whether this threshold will be - displayed on cost charts. Possible values include: 'Enabled', 'Disabled' - :type display_on_chart: str or - ~azure.mgmt.devtestlabs.models.CostThresholdStatus - :param send_notification_when_exceeded: Indicates whether notifications - will be sent when this threshold is exceeded. Possible values include: - 'Enabled', 'Disabled' - :type send_notification_when_exceeded: str or - ~azure.mgmt.devtestlabs.models.CostThresholdStatus - :param notification_sent: Indicates the datetime when notifications were - last sent for this threshold. - :type notification_sent: str - """ - - _attribute_map = { - 'threshold_id': {'key': 'thresholdId', 'type': 'str'}, - 'percentage_threshold': {'key': 'percentageThreshold', 'type': 'PercentageCostThresholdProperties'}, - 'display_on_chart': {'key': 'displayOnChart', 'type': 'str'}, - 'send_notification_when_exceeded': {'key': 'sendNotificationWhenExceeded', 'type': 'str'}, - 'notification_sent': {'key': 'notificationSent', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CostThresholdProperties, self).__init__(**kwargs) - self.threshold_id = kwargs.get('threshold_id', None) - self.percentage_threshold = kwargs.get('percentage_threshold', None) - self.display_on_chart = kwargs.get('display_on_chart', None) - self.send_notification_when_exceeded = kwargs.get('send_notification_when_exceeded', None) - self.notification_sent = kwargs.get('notification_sent', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties_py3.py deleted file mode 100644 index fba335d6c3e5..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CostThresholdProperties(Model): - """Properties of a cost threshold item. - - :param threshold_id: The ID of the cost threshold item. - :type threshold_id: str - :param percentage_threshold: The value of the percentage cost threshold. - :type percentage_threshold: - ~azure.mgmt.devtestlabs.models.PercentageCostThresholdProperties - :param display_on_chart: Indicates whether this threshold will be - displayed on cost charts. Possible values include: 'Enabled', 'Disabled' - :type display_on_chart: str or - ~azure.mgmt.devtestlabs.models.CostThresholdStatus - :param send_notification_when_exceeded: Indicates whether notifications - will be sent when this threshold is exceeded. Possible values include: - 'Enabled', 'Disabled' - :type send_notification_when_exceeded: str or - ~azure.mgmt.devtestlabs.models.CostThresholdStatus - :param notification_sent: Indicates the datetime when notifications were - last sent for this threshold. - :type notification_sent: str - """ - - _attribute_map = { - 'threshold_id': {'key': 'thresholdId', 'type': 'str'}, - 'percentage_threshold': {'key': 'percentageThreshold', 'type': 'PercentageCostThresholdProperties'}, - 'display_on_chart': {'key': 'displayOnChart', 'type': 'str'}, - 'send_notification_when_exceeded': {'key': 'sendNotificationWhenExceeded', 'type': 'str'}, - 'notification_sent': {'key': 'notificationSent', 'type': 'str'}, - } - - def __init__(self, *, threshold_id: str=None, percentage_threshold=None, display_on_chart=None, send_notification_when_exceeded=None, notification_sent: str=None, **kwargs) -> None: - super(CostThresholdProperties, self).__init__(**kwargs) - self.threshold_id = threshold_id - self.percentage_threshold = percentage_threshold - self.display_on_chart = display_on_chart - self.send_notification_when_exceeded = send_notification_when_exceeded - self.notification_sent = notification_sent diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image.py deleted file mode 100644 index 136ee0481ee1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class CustomImage(Resource): - """A custom image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param vm: The virtual machine from which the image is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVm - :param vhd: The VHD from which the image is to be created. - :type vhd: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustom - :param description: The description of the custom image. - :type description: str - :param author: The author of the custom image. - :type author: str - :ivar creation_date: The creation date of the custom image. - :vartype creation_date: datetime - :param managed_image_id: The Managed Image Id backing the custom image. - :type managed_image_id: str - :param managed_snapshot_id: The Managed Snapshot Id backing the custom - image. - :type managed_snapshot_id: str - :param data_disk_storage_info: Storage information about the data disks - present in the custom image - :type data_disk_storage_info: - list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfo] - :param custom_image_plan: Storage information about the plan related to - this custom image - :type custom_image_plan: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlan - :param is_plan_authorized: Whether or not the custom images underlying - offer/plan has been enabled for programmatic deployment - :type is_plan_authorized: bool - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVm'}, - 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustom'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, - 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, - 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfo]'}, - 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlan'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CustomImage, self).__init__(**kwargs) - self.vm = kwargs.get('vm', None) - self.vhd = kwargs.get('vhd', None) - self.description = kwargs.get('description', None) - self.author = kwargs.get('author', None) - self.creation_date = None - self.managed_image_id = kwargs.get('managed_image_id', None) - self.managed_snapshot_id = kwargs.get('managed_snapshot_id', None) - self.data_disk_storage_info = kwargs.get('data_disk_storage_info', None) - self.custom_image_plan = kwargs.get('custom_image_plan', None) - self.is_plan_authorized = kwargs.get('is_plan_authorized', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment.py deleted file mode 100644 index 5ac36c53a6cd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class CustomImageFragment(UpdateResource): - """A custom image. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param vm: The virtual machine from which the image is to be created. - :type vm: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVmFragment - :param vhd: The VHD from which the image is to be created. - :type vhd: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustomFragment - :param description: The description of the custom image. - :type description: str - :param author: The author of the custom image. - :type author: str - :param managed_image_id: The Managed Image Id backing the custom image. - :type managed_image_id: str - :param managed_snapshot_id: The Managed Snapshot Id backing the custom - image. - :type managed_snapshot_id: str - :param data_disk_storage_info: Storage information about the data disks - present in the custom image - :type data_disk_storage_info: - list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfoFragment] - :param custom_image_plan: Storage information about the plan related to - this custom image - :type custom_image_plan: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlanFragment - :param is_plan_authorized: Whether or not the custom images underlying - offer/plan has been enabled for programmatic deployment - :type is_plan_authorized: bool - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVmFragment'}, - 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustomFragment'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, - 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, - 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfoFragment]'}, - 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlanFragment'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(CustomImageFragment, self).__init__(**kwargs) - self.vm = kwargs.get('vm', None) - self.vhd = kwargs.get('vhd', None) - self.description = kwargs.get('description', None) - self.author = kwargs.get('author', None) - self.managed_image_id = kwargs.get('managed_image_id', None) - self.managed_snapshot_id = kwargs.get('managed_snapshot_id', None) - self.data_disk_storage_info = kwargs.get('data_disk_storage_info', None) - self.custom_image_plan = kwargs.get('custom_image_plan', None) - self.is_plan_authorized = kwargs.get('is_plan_authorized', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment_py3.py deleted file mode 100644 index a3ccac2274eb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class CustomImageFragment(UpdateResource): - """A custom image. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param vm: The virtual machine from which the image is to be created. - :type vm: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVmFragment - :param vhd: The VHD from which the image is to be created. - :type vhd: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustomFragment - :param description: The description of the custom image. - :type description: str - :param author: The author of the custom image. - :type author: str - :param managed_image_id: The Managed Image Id backing the custom image. - :type managed_image_id: str - :param managed_snapshot_id: The Managed Snapshot Id backing the custom - image. - :type managed_snapshot_id: str - :param data_disk_storage_info: Storage information about the data disks - present in the custom image - :type data_disk_storage_info: - list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfoFragment] - :param custom_image_plan: Storage information about the plan related to - this custom image - :type custom_image_plan: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlanFragment - :param is_plan_authorized: Whether or not the custom images underlying - offer/plan has been enabled for programmatic deployment - :type is_plan_authorized: bool - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVmFragment'}, - 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustomFragment'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, - 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, - 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfoFragment]'}, - 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlanFragment'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - } - - def __init__(self, *, tags=None, vm=None, vhd=None, description: str=None, author: str=None, managed_image_id: str=None, managed_snapshot_id: str=None, data_disk_storage_info=None, custom_image_plan=None, is_plan_authorized: bool=None, **kwargs) -> None: - super(CustomImageFragment, self).__init__(tags=tags, **kwargs) - self.vm = vm - self.vhd = vhd - self.description = description - self.author = author - self.managed_image_id = managed_image_id - self.managed_snapshot_id = managed_snapshot_id - self.data_disk_storage_info = data_disk_storage_info - self.custom_image_plan = custom_image_plan - self.is_plan_authorized = is_plan_authorized diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_paged.py deleted file mode 100644 index d0e4b61d4560..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class CustomImagePaged(Paged): - """ - A paging container for iterating over a list of :class:`CustomImage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CustomImage]'} - } - - def __init__(self, *args, **kwargs): - - super(CustomImagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom.py deleted file mode 100644 index a1bd5ab66712..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesCustom(Model): - """Properties for creating a custom image from a VHD. - - All required parameters must be populated in order to send to Azure. - - :param image_name: The image name. - :type image_name: str - :param sys_prep: Indicates whether sysprep has been run on the VHD. - :type sys_prep: bool - :param os_type: Required. The OS type of the custom image (i.e. Windows, - Linux). Possible values include: 'Windows', 'Linux', 'None' - :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType - """ - - _validation = { - 'os_type': {'required': True}, - } - - _attribute_map = { - 'image_name': {'key': 'imageName', 'type': 'str'}, - 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesCustom, self).__init__(**kwargs) - self.image_name = kwargs.get('image_name', None) - self.sys_prep = kwargs.get('sys_prep', None) - self.os_type = kwargs.get('os_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment.py deleted file mode 100644 index 4fc581738e57..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesCustomFragment(Model): - """Properties for creating a custom image from a VHD. - - :param image_name: The image name. - :type image_name: str - :param sys_prep: Indicates whether sysprep has been run on the VHD. - :type sys_prep: bool - :param os_type: The OS type of the custom image (i.e. Windows, Linux). - Possible values include: 'Windows', 'Linux', 'None' - :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType - """ - - _attribute_map = { - 'image_name': {'key': 'imageName', 'type': 'str'}, - 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesCustomFragment, self).__init__(**kwargs) - self.image_name = kwargs.get('image_name', None) - self.sys_prep = kwargs.get('sys_prep', None) - self.os_type = kwargs.get('os_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment_py3.py deleted file mode 100644 index 3869682ca53d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesCustomFragment(Model): - """Properties for creating a custom image from a VHD. - - :param image_name: The image name. - :type image_name: str - :param sys_prep: Indicates whether sysprep has been run on the VHD. - :type sys_prep: bool - :param os_type: The OS type of the custom image (i.e. Windows, Linux). - Possible values include: 'Windows', 'Linux', 'None' - :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType - """ - - _attribute_map = { - 'image_name': {'key': 'imageName', 'type': 'str'}, - 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, *, image_name: str=None, sys_prep: bool=None, os_type=None, **kwargs) -> None: - super(CustomImagePropertiesCustomFragment, self).__init__(**kwargs) - self.image_name = image_name - self.sys_prep = sys_prep - self.os_type = os_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_py3.py deleted file mode 100644 index 5aede6b5507c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesCustom(Model): - """Properties for creating a custom image from a VHD. - - All required parameters must be populated in order to send to Azure. - - :param image_name: The image name. - :type image_name: str - :param sys_prep: Indicates whether sysprep has been run on the VHD. - :type sys_prep: bool - :param os_type: Required. The OS type of the custom image (i.e. Windows, - Linux). Possible values include: 'Windows', 'Linux', 'None' - :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType - """ - - _validation = { - 'os_type': {'required': True}, - } - - _attribute_map = { - 'image_name': {'key': 'imageName', 'type': 'str'}, - 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, *, os_type, image_name: str=None, sys_prep: bool=None, **kwargs) -> None: - super(CustomImagePropertiesCustom, self).__init__(**kwargs) - self.image_name = image_name - self.sys_prep = sys_prep - self.os_type = os_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan.py deleted file mode 100644 index 37067a750936..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromPlan(Model): - """Properties for plan on a custom image. - - :param id: The id of the plan, equivalent to name of the plan - :type id: str - :param publisher: The publisher for the plan from the marketplace image - the custom image is derived from - :type publisher: str - :param offer: The offer for the plan from the marketplace image the custom - image is derived from - :type offer: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesFromPlan, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.publisher = kwargs.get('publisher', None) - self.offer = kwargs.get('offer', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment.py deleted file mode 100644 index b8db62a3738f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromPlanFragment(Model): - """Properties for plan on a custom image. - - :param id: The id of the plan, equivalent to name of the plan - :type id: str - :param publisher: The publisher for the plan from the marketplace image - the custom image is derived from - :type publisher: str - :param offer: The offer for the plan from the marketplace image the custom - image is derived from - :type offer: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesFromPlanFragment, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.publisher = kwargs.get('publisher', None) - self.offer = kwargs.get('offer', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment_py3.py deleted file mode 100644 index 159740e13c32..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromPlanFragment(Model): - """Properties for plan on a custom image. - - :param id: The id of the plan, equivalent to name of the plan - :type id: str - :param publisher: The publisher for the plan from the marketplace image - the custom image is derived from - :type publisher: str - :param offer: The offer for the plan from the marketplace image the custom - image is derived from - :type offer: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, **kwargs) -> None: - super(CustomImagePropertiesFromPlanFragment, self).__init__(**kwargs) - self.id = id - self.publisher = publisher - self.offer = offer diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_py3.py deleted file mode 100644 index fcbfeea22012..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromPlan(Model): - """Properties for plan on a custom image. - - :param id: The id of the plan, equivalent to name of the plan - :type id: str - :param publisher: The publisher for the plan from the marketplace image - the custom image is derived from - :type publisher: str - :param offer: The offer for the plan from the marketplace image the custom - image is derived from - :type offer: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, **kwargs) -> None: - super(CustomImagePropertiesFromPlan, self).__init__(**kwargs) - self.id = id - self.publisher = publisher - self.offer = offer diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm.py deleted file mode 100644 index d08828df0def..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromVm(Model): - """Properties for creating a custom image from a virtual machine. - - :param source_vm_id: The source vm identifier. - :type source_vm_id: str - :param windows_os_info: The Windows OS information of the VM. - :type windows_os_info: ~azure.mgmt.devtestlabs.models.WindowsOsInfo - :param linux_os_info: The Linux OS information of the VM. - :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfo - """ - - _attribute_map = { - 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, - 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfo'}, - 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfo'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesFromVm, self).__init__(**kwargs) - self.source_vm_id = kwargs.get('source_vm_id', None) - self.windows_os_info = kwargs.get('windows_os_info', None) - self.linux_os_info = kwargs.get('linux_os_info', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment.py deleted file mode 100644 index c0274dab51e7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromVmFragment(Model): - """Properties for creating a custom image from a virtual machine. - - :param source_vm_id: The source vm identifier. - :type source_vm_id: str - :param windows_os_info: The Windows OS information of the VM. - :type windows_os_info: - ~azure.mgmt.devtestlabs.models.WindowsOsInfoFragment - :param linux_os_info: The Linux OS information of the VM. - :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfoFragment - """ - - _attribute_map = { - 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, - 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfoFragment'}, - 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfoFragment'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesFromVmFragment, self).__init__(**kwargs) - self.source_vm_id = kwargs.get('source_vm_id', None) - self.windows_os_info = kwargs.get('windows_os_info', None) - self.linux_os_info = kwargs.get('linux_os_info', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment_py3.py deleted file mode 100644 index 437a4005cf1e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromVmFragment(Model): - """Properties for creating a custom image from a virtual machine. - - :param source_vm_id: The source vm identifier. - :type source_vm_id: str - :param windows_os_info: The Windows OS information of the VM. - :type windows_os_info: - ~azure.mgmt.devtestlabs.models.WindowsOsInfoFragment - :param linux_os_info: The Linux OS information of the VM. - :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfoFragment - """ - - _attribute_map = { - 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, - 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfoFragment'}, - 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfoFragment'}, - } - - def __init__(self, *, source_vm_id: str=None, windows_os_info=None, linux_os_info=None, **kwargs) -> None: - super(CustomImagePropertiesFromVmFragment, self).__init__(**kwargs) - self.source_vm_id = source_vm_id - self.windows_os_info = windows_os_info - self.linux_os_info = linux_os_info diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_py3.py deleted file mode 100644 index 02a54467b6a7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromVm(Model): - """Properties for creating a custom image from a virtual machine. - - :param source_vm_id: The source vm identifier. - :type source_vm_id: str - :param windows_os_info: The Windows OS information of the VM. - :type windows_os_info: ~azure.mgmt.devtestlabs.models.WindowsOsInfo - :param linux_os_info: The Linux OS information of the VM. - :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfo - """ - - _attribute_map = { - 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, - 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfo'}, - 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfo'}, - } - - def __init__(self, *, source_vm_id: str=None, windows_os_info=None, linux_os_info=None, **kwargs) -> None: - super(CustomImagePropertiesFromVm, self).__init__(**kwargs) - self.source_vm_id = source_vm_id - self.windows_os_info = windows_os_info - self.linux_os_info = linux_os_info diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_py3.py deleted file mode 100644 index fd4736a3744b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_py3.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class CustomImage(Resource): - """A custom image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param vm: The virtual machine from which the image is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVm - :param vhd: The VHD from which the image is to be created. - :type vhd: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustom - :param description: The description of the custom image. - :type description: str - :param author: The author of the custom image. - :type author: str - :ivar creation_date: The creation date of the custom image. - :vartype creation_date: datetime - :param managed_image_id: The Managed Image Id backing the custom image. - :type managed_image_id: str - :param managed_snapshot_id: The Managed Snapshot Id backing the custom - image. - :type managed_snapshot_id: str - :param data_disk_storage_info: Storage information about the data disks - present in the custom image - :type data_disk_storage_info: - list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfo] - :param custom_image_plan: Storage information about the plan related to - this custom image - :type custom_image_plan: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlan - :param is_plan_authorized: Whether or not the custom images underlying - offer/plan has been enabled for programmatic deployment - :type is_plan_authorized: bool - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVm'}, - 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustom'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, - 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, - 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfo]'}, - 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlan'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, vm=None, vhd=None, description: str=None, author: str=None, managed_image_id: str=None, managed_snapshot_id: str=None, data_disk_storage_info=None, custom_image_plan=None, is_plan_authorized: bool=None, **kwargs) -> None: - super(CustomImage, self).__init__(location=location, tags=tags, **kwargs) - self.vm = vm - self.vhd = vhd - self.description = description - self.author = author - self.creation_date = None - self.managed_image_id = managed_image_id - self.managed_snapshot_id = managed_snapshot_id - self.data_disk_storage_info = data_disk_storage_info - self.custom_image_plan = custom_image_plan - self.is_plan_authorized = is_plan_authorized - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties.py deleted file mode 100644 index 7bbfad08d256..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskProperties(Model): - """Request body for adding a new or existing data disk to a virtual machine. - - :param attach_new_data_disk_options: Specifies options to attach a new - disk to the virtual machine. - :type attach_new_data_disk_options: - ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptions - :param existing_lab_disk_id: Specifies the existing lab disk id to attach - to virtual machine. - :type existing_lab_disk_id: str - :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, - ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type host_caching: str or - ~azure.mgmt.devtestlabs.models.HostCachingOptions - """ - - _attribute_map = { - 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptions'}, - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - 'host_caching': {'key': 'hostCaching', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataDiskProperties, self).__init__(**kwargs) - self.attach_new_data_disk_options = kwargs.get('attach_new_data_disk_options', None) - self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) - self.host_caching = kwargs.get('host_caching', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment.py deleted file mode 100644 index 71e152680e3f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskPropertiesFragment(Model): - """Request body for adding a new or existing data disk to a virtual machine. - - :param attach_new_data_disk_options: Specifies options to attach a new - disk to the virtual machine. - :type attach_new_data_disk_options: - ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptionsFragment - :param existing_lab_disk_id: Specifies the existing lab disk id to attach - to virtual machine. - :type existing_lab_disk_id: str - :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, - ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type host_caching: str or - ~azure.mgmt.devtestlabs.models.HostCachingOptions - """ - - _attribute_map = { - 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptionsFragment'}, - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - 'host_caching': {'key': 'hostCaching', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataDiskPropertiesFragment, self).__init__(**kwargs) - self.attach_new_data_disk_options = kwargs.get('attach_new_data_disk_options', None) - self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) - self.host_caching = kwargs.get('host_caching', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment_py3.py deleted file mode 100644 index d709d92d7113..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskPropertiesFragment(Model): - """Request body for adding a new or existing data disk to a virtual machine. - - :param attach_new_data_disk_options: Specifies options to attach a new - disk to the virtual machine. - :type attach_new_data_disk_options: - ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptionsFragment - :param existing_lab_disk_id: Specifies the existing lab disk id to attach - to virtual machine. - :type existing_lab_disk_id: str - :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, - ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type host_caching: str or - ~azure.mgmt.devtestlabs.models.HostCachingOptions - """ - - _attribute_map = { - 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptionsFragment'}, - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - 'host_caching': {'key': 'hostCaching', 'type': 'str'}, - } - - def __init__(self, *, attach_new_data_disk_options=None, existing_lab_disk_id: str=None, host_caching=None, **kwargs) -> None: - super(DataDiskPropertiesFragment, self).__init__(**kwargs) - self.attach_new_data_disk_options = attach_new_data_disk_options - self.existing_lab_disk_id = existing_lab_disk_id - self.host_caching = host_caching diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_py3.py deleted file mode 100644 index 9e654d16cd45..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskProperties(Model): - """Request body for adding a new or existing data disk to a virtual machine. - - :param attach_new_data_disk_options: Specifies options to attach a new - disk to the virtual machine. - :type attach_new_data_disk_options: - ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptions - :param existing_lab_disk_id: Specifies the existing lab disk id to attach - to virtual machine. - :type existing_lab_disk_id: str - :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, - ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type host_caching: str or - ~azure.mgmt.devtestlabs.models.HostCachingOptions - """ - - _attribute_map = { - 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptions'}, - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - 'host_caching': {'key': 'hostCaching', 'type': 'str'}, - } - - def __init__(self, *, attach_new_data_disk_options=None, existing_lab_disk_id: str=None, host_caching=None, **kwargs) -> None: - super(DataDiskProperties, self).__init__(**kwargs) - self.attach_new_data_disk_options = attach_new_data_disk_options - self.existing_lab_disk_id = existing_lab_disk_id - self.host_caching = host_caching diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info.py deleted file mode 100644 index 68a97bf75845..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskStorageTypeInfo(Model): - """Storage information about the data disks present in the custom image. - - :param lun: Disk Lun - :type lun: str - :param storage_type: Disk Storage Type. Possible values include: - 'Standard', 'Premium' - :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'str'}, - 'storage_type': {'key': 'storageType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataDiskStorageTypeInfo, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) - self.storage_type = kwargs.get('storage_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment.py deleted file mode 100644 index 62b512b1f863..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskStorageTypeInfoFragment(Model): - """Storage information about the data disks present in the custom image. - - :param lun: Disk Lun - :type lun: str - :param storage_type: Disk Storage Type. Possible values include: - 'Standard', 'Premium' - :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'str'}, - 'storage_type': {'key': 'storageType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataDiskStorageTypeInfoFragment, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) - self.storage_type = kwargs.get('storage_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment_py3.py deleted file mode 100644 index 9a1c830a7dcb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskStorageTypeInfoFragment(Model): - """Storage information about the data disks present in the custom image. - - :param lun: Disk Lun - :type lun: str - :param storage_type: Disk Storage Type. Possible values include: - 'Standard', 'Premium' - :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'str'}, - 'storage_type': {'key': 'storageType', 'type': 'str'}, - } - - def __init__(self, *, lun: str=None, storage_type=None, **kwargs) -> None: - super(DataDiskStorageTypeInfoFragment, self).__init__(**kwargs) - self.lun = lun - self.storage_type = storage_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_py3.py deleted file mode 100644 index d817ca84fdd8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskStorageTypeInfo(Model): - """Storage information about the data disks present in the custom image. - - :param lun: Disk Lun - :type lun: str - :param storage_type: Disk Storage Type. Possible values include: - 'Standard', 'Premium' - :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'str'}, - 'storage_type': {'key': 'storageType', 'type': 'str'}, - } - - def __init__(self, *, lun: str=None, storage_type=None, **kwargs) -> None: - super(DataDiskStorageTypeInfo, self).__init__(**kwargs) - self.lun = lun - self.storage_type = storage_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details.py deleted file mode 100644 index 7391a793dc1b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DayDetails(Model): - """Properties of a daily schedule. - - :param time: The time of day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DayDetails, self).__init__(**kwargs) - self.time = kwargs.get('time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment.py deleted file mode 100644 index b4f977d74fdf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DayDetailsFragment(Model): - """Properties of a daily schedule. - - :param time: The time of day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DayDetailsFragment, self).__init__(**kwargs) - self.time = kwargs.get('time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment_py3.py deleted file mode 100644 index 38c15b48bc89..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DayDetailsFragment(Model): - """Properties of a daily schedule. - - :param time: The time of day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, *, time: str=None, **kwargs) -> None: - super(DayDetailsFragment, self).__init__(**kwargs) - self.time = time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_py3.py deleted file mode 100644 index 593e341169d8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DayDetails(Model): - """Properties of a daily schedule. - - :param time: The time of day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, *, time: str=None, **kwargs) -> None: - super(DayDetails, self).__init__(**kwargs) - self.time = time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties.py deleted file mode 100644 index 9e66b91c3832..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DetachDataDiskProperties(Model): - """Request body for detaching data disk from a virtual machine. - - :param existing_lab_disk_id: Specifies the disk resource ID to detach from - virtual machine. - :type existing_lab_disk_id: str - """ - - _attribute_map = { - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DetachDataDiskProperties, self).__init__(**kwargs) - self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties_py3.py deleted file mode 100644 index ece9ea7842fb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DetachDataDiskProperties(Model): - """Request body for detaching data disk from a virtual machine. - - :param existing_lab_disk_id: Specifies the disk resource ID to detach from - virtual machine. - :type existing_lab_disk_id: str - """ - - _attribute_map = { - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - } - - def __init__(self, *, existing_lab_disk_id: str=None, **kwargs) -> None: - super(DetachDataDiskProperties, self).__init__(**kwargs) - self.existing_lab_disk_id = existing_lab_disk_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties.py deleted file mode 100644 index 2b781ad4f7ec..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DetachDiskProperties(Model): - """Properties of the disk to detach. - - :param leased_by_lab_vm_id: The resource ID of the Lab VM to which the - disk is attached. - :type leased_by_lab_vm_id: str - """ - - _attribute_map = { - 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DetachDiskProperties, self).__init__(**kwargs) - self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties_py3.py deleted file mode 100644 index bc02a7d21dc2..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DetachDiskProperties(Model): - """Properties of the disk to detach. - - :param leased_by_lab_vm_id: The resource ID of the Lab VM to which the - disk is attached. - :type leased_by_lab_vm_id: str - """ - - _attribute_map = { - 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, - } - - def __init__(self, *, leased_by_lab_vm_id: str=None, **kwargs) -> None: - super(DetachDiskProperties, self).__init__(**kwargs) - self.leased_by_lab_vm_id = leased_by_lab_vm_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk.py deleted file mode 100644 index e61a526ec3f7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Disk(Resource): - """A Disk. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param disk_size_gi_b: The size of the disk in Gibibytes. - :type disk_size_gi_b: int - :param leased_by_lab_vm_id: The resource ID of the VM to which this disk - is leased. - :type leased_by_lab_vm_id: str - :param disk_blob_name: When backed by a blob, the name of the VHD blob - without extension. - :type disk_blob_name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :ivar created_date: The creation date of the disk. - :vartype created_date: datetime - :param host_caching: The host caching policy of the disk (i.e. None, - ReadOnly, ReadWrite). - :type host_caching: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, - 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, - 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, - 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, - 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Disk, self).__init__(**kwargs) - self.disk_type = kwargs.get('disk_type', None) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) - self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) - self.disk_blob_name = kwargs.get('disk_blob_name', None) - self.disk_uri = kwargs.get('disk_uri', None) - self.created_date = None - self.host_caching = kwargs.get('host_caching', None) - self.managed_disk_id = kwargs.get('managed_disk_id', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment.py deleted file mode 100644 index fd351baa9716..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class DiskFragment(UpdateResource): - """A Disk. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param disk_size_gi_b: The size of the disk in Gibibytes. - :type disk_size_gi_b: int - :param leased_by_lab_vm_id: The resource ID of the VM to which this disk - is leased. - :type leased_by_lab_vm_id: str - :param disk_blob_name: When backed by a blob, the name of the VHD blob - without extension. - :type disk_blob_name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param host_caching: The host caching policy of the disk (i.e. None, - ReadOnly, ReadWrite). - :type host_caching: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, - 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, - 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, - 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, - 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, - 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DiskFragment, self).__init__(**kwargs) - self.disk_type = kwargs.get('disk_type', None) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) - self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) - self.disk_blob_name = kwargs.get('disk_blob_name', None) - self.disk_uri = kwargs.get('disk_uri', None) - self.host_caching = kwargs.get('host_caching', None) - self.managed_disk_id = kwargs.get('managed_disk_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment_py3.py deleted file mode 100644 index 6becee37891a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class DiskFragment(UpdateResource): - """A Disk. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param disk_size_gi_b: The size of the disk in Gibibytes. - :type disk_size_gi_b: int - :param leased_by_lab_vm_id: The resource ID of the VM to which this disk - is leased. - :type leased_by_lab_vm_id: str - :param disk_blob_name: When backed by a blob, the name of the VHD blob - without extension. - :type disk_blob_name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param host_caching: The host caching policy of the disk (i.e. None, - ReadOnly, ReadWrite). - :type host_caching: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, - 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, - 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, - 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, - 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, - 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, - } - - def __init__(self, *, tags=None, disk_type=None, disk_size_gi_b: int=None, leased_by_lab_vm_id: str=None, disk_blob_name: str=None, disk_uri: str=None, host_caching: str=None, managed_disk_id: str=None, **kwargs) -> None: - super(DiskFragment, self).__init__(tags=tags, **kwargs) - self.disk_type = disk_type - self.disk_size_gi_b = disk_size_gi_b - self.leased_by_lab_vm_id = leased_by_lab_vm_id - self.disk_blob_name = disk_blob_name - self.disk_uri = disk_uri - self.host_caching = host_caching - self.managed_disk_id = managed_disk_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_paged.py deleted file mode 100644 index 18396d66590a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DiskPaged(Paged): - """ - A paging container for iterating over a list of :class:`Disk ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Disk]'} - } - - def __init__(self, *args, **kwargs): - - super(DiskPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_py3.py deleted file mode 100644 index 5263a0668bcf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Disk(Resource): - """A Disk. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param disk_size_gi_b: The size of the disk in Gibibytes. - :type disk_size_gi_b: int - :param leased_by_lab_vm_id: The resource ID of the VM to which this disk - is leased. - :type leased_by_lab_vm_id: str - :param disk_blob_name: When backed by a blob, the name of the VHD blob - without extension. - :type disk_blob_name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :ivar created_date: The creation date of the disk. - :vartype created_date: datetime - :param host_caching: The host caching policy of the disk (i.e. None, - ReadOnly, ReadWrite). - :type host_caching: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, - 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, - 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, - 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, - 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, disk_type=None, disk_size_gi_b: int=None, leased_by_lab_vm_id: str=None, disk_blob_name: str=None, disk_uri: str=None, host_caching: str=None, managed_disk_id: str=None, **kwargs) -> None: - super(Disk, self).__init__(location=location, tags=tags, **kwargs) - self.disk_type = disk_type - self.disk_size_gi_b = disk_size_gi_b - self.leased_by_lab_vm_id = leased_by_lab_vm_id - self.disk_blob_name = disk_blob_name - self.disk_uri = disk_uri - self.created_date = None - self.host_caching = host_caching - self.managed_disk_id = managed_disk_id - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment.py deleted file mode 100644 index 47f7a67992f7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DtlEnvironment(Resource): - """An environment, which is essentially an ARM template deployment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param deployment_properties: The deployment properties of the - environment. - :type deployment_properties: - ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentProperties - :param arm_template_display_name: The display name of the Azure Resource - Manager template that produced the environment. - :type arm_template_display_name: str - :ivar resource_group_id: The identifier of the resource group containing - the environment's resources. - :vartype resource_group_id: str - :ivar created_by_user: The creator of the environment. - :vartype created_by_user: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource_group_id': {'readonly': True}, - 'created_by_user': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentProperties'}, - 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, - 'resource_group_id': {'key': 'properties.resourceGroupId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DtlEnvironment, self).__init__(**kwargs) - self.deployment_properties = kwargs.get('deployment_properties', None) - self.arm_template_display_name = kwargs.get('arm_template_display_name', None) - self.resource_group_id = None - self.created_by_user = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment.py deleted file mode 100644 index 14103673db5f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class DtlEnvironmentFragment(UpdateResource): - """An environment, which is essentially an ARM template deployment. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param deployment_properties: The deployment properties of the - environment. - :type deployment_properties: - ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentPropertiesFragment - :param arm_template_display_name: The display name of the Azure Resource - Manager template that produced the environment. - :type arm_template_display_name: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentPropertiesFragment'}, - 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DtlEnvironmentFragment, self).__init__(**kwargs) - self.deployment_properties = kwargs.get('deployment_properties', None) - self.arm_template_display_name = kwargs.get('arm_template_display_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment_py3.py deleted file mode 100644 index 9cd4e5caa7bf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class DtlEnvironmentFragment(UpdateResource): - """An environment, which is essentially an ARM template deployment. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param deployment_properties: The deployment properties of the - environment. - :type deployment_properties: - ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentPropertiesFragment - :param arm_template_display_name: The display name of the Azure Resource - Manager template that produced the environment. - :type arm_template_display_name: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentPropertiesFragment'}, - 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, - } - - def __init__(self, *, tags=None, deployment_properties=None, arm_template_display_name: str=None, **kwargs) -> None: - super(DtlEnvironmentFragment, self).__init__(tags=tags, **kwargs) - self.deployment_properties = deployment_properties - self.arm_template_display_name = arm_template_display_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_paged.py deleted file mode 100644 index e7c297f07ffa..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DtlEnvironmentPaged(Paged): - """ - A paging container for iterating over a list of :class:`DtlEnvironment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DtlEnvironment]'} - } - - def __init__(self, *args, **kwargs): - - super(DtlEnvironmentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_py3.py deleted file mode 100644 index f2fbb899f8cf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class DtlEnvironment(Resource): - """An environment, which is essentially an ARM template deployment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param deployment_properties: The deployment properties of the - environment. - :type deployment_properties: - ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentProperties - :param arm_template_display_name: The display name of the Azure Resource - Manager template that produced the environment. - :type arm_template_display_name: str - :ivar resource_group_id: The identifier of the resource group containing - the environment's resources. - :vartype resource_group_id: str - :ivar created_by_user: The creator of the environment. - :vartype created_by_user: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource_group_id': {'readonly': True}, - 'created_by_user': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentProperties'}, - 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, - 'resource_group_id': {'key': 'properties.resourceGroupId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, deployment_properties=None, arm_template_display_name: str=None, **kwargs) -> None: - super(DtlEnvironment, self).__init__(location=location, tags=tags, **kwargs) - self.deployment_properties = deployment_properties - self.arm_template_display_name = arm_template_display_name - self.resource_group_id = None - self.created_by_user = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties.py deleted file mode 100644 index 31dc62dfc89e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnvironmentDeploymentProperties(Model): - """Properties of an environment deployment. - - :param arm_template_id: The Azure Resource Manager template's identifier. - :type arm_template_id: str - :param parameters: The parameters of the Azure Resource Manager template. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterProperties] - """ - - _attribute_map = { - 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterProperties]'}, - } - - def __init__(self, **kwargs): - super(EnvironmentDeploymentProperties, self).__init__(**kwargs) - self.arm_template_id = kwargs.get('arm_template_id', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment.py deleted file mode 100644 index e441cfd4a17d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnvironmentDeploymentPropertiesFragment(Model): - """Properties of an environment deployment. - - :param arm_template_id: The Azure Resource Manager template's identifier. - :type arm_template_id: str - :param parameters: The parameters of the Azure Resource Manager template. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterPropertiesFragment] - """ - - _attribute_map = { - 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterPropertiesFragment]'}, - } - - def __init__(self, **kwargs): - super(EnvironmentDeploymentPropertiesFragment, self).__init__(**kwargs) - self.arm_template_id = kwargs.get('arm_template_id', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment_py3.py deleted file mode 100644 index 1a30a6aef98e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnvironmentDeploymentPropertiesFragment(Model): - """Properties of an environment deployment. - - :param arm_template_id: The Azure Resource Manager template's identifier. - :type arm_template_id: str - :param parameters: The parameters of the Azure Resource Manager template. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterPropertiesFragment] - """ - - _attribute_map = { - 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterPropertiesFragment]'}, - } - - def __init__(self, *, arm_template_id: str=None, parameters=None, **kwargs) -> None: - super(EnvironmentDeploymentPropertiesFragment, self).__init__(**kwargs) - self.arm_template_id = arm_template_id - self.parameters = parameters diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_py3.py deleted file mode 100644 index 866bbe7d7ebf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnvironmentDeploymentProperties(Model): - """Properties of an environment deployment. - - :param arm_template_id: The Azure Resource Manager template's identifier. - :type arm_template_id: str - :param parameters: The parameters of the Azure Resource Manager template. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterProperties] - """ - - _attribute_map = { - 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterProperties]'}, - } - - def __init__(self, *, arm_template_id: str=None, parameters=None, **kwargs) -> None: - super(EnvironmentDeploymentProperties, self).__init__(**kwargs) - self.arm_template_id = arm_template_id - self.parameters = parameters diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties.py deleted file mode 100644 index ec21cf9c743e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EvaluatePoliciesProperties(Model): - """Properties for evaluating a policy set. - - :param fact_name: The fact name. - :type fact_name: str - :param fact_data: The fact data. - :type fact_data: str - :param value_offset: The value offset. - :type value_offset: str - :param user_object_id: The user for which policies will be evaluated - :type user_object_id: str - """ - - _attribute_map = { - 'fact_name': {'key': 'factName', 'type': 'str'}, - 'fact_data': {'key': 'factData', 'type': 'str'}, - 'value_offset': {'key': 'valueOffset', 'type': 'str'}, - 'user_object_id': {'key': 'userObjectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EvaluatePoliciesProperties, self).__init__(**kwargs) - self.fact_name = kwargs.get('fact_name', None) - self.fact_data = kwargs.get('fact_data', None) - self.value_offset = kwargs.get('value_offset', None) - self.user_object_id = kwargs.get('user_object_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties_py3.py deleted file mode 100644 index 5f45b40617a1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EvaluatePoliciesProperties(Model): - """Properties for evaluating a policy set. - - :param fact_name: The fact name. - :type fact_name: str - :param fact_data: The fact data. - :type fact_data: str - :param value_offset: The value offset. - :type value_offset: str - :param user_object_id: The user for which policies will be evaluated - :type user_object_id: str - """ - - _attribute_map = { - 'fact_name': {'key': 'factName', 'type': 'str'}, - 'fact_data': {'key': 'factData', 'type': 'str'}, - 'value_offset': {'key': 'valueOffset', 'type': 'str'}, - 'user_object_id': {'key': 'userObjectId', 'type': 'str'}, - } - - def __init__(self, *, fact_name: str=None, fact_data: str=None, value_offset: str=None, user_object_id: str=None, **kwargs) -> None: - super(EvaluatePoliciesProperties, self).__init__(**kwargs) - self.fact_name = fact_name - self.fact_data = fact_data - self.value_offset = value_offset - self.user_object_id = user_object_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request.py deleted file mode 100644 index 3476c2176cd0..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EvaluatePoliciesRequest(Model): - """Request body for evaluating a policy set. - - :param policies: Policies to evaluate. - :type policies: - list[~azure.mgmt.devtestlabs.models.EvaluatePoliciesProperties] - """ - - _attribute_map = { - 'policies': {'key': 'policies', 'type': '[EvaluatePoliciesProperties]'}, - } - - def __init__(self, **kwargs): - super(EvaluatePoliciesRequest, self).__init__(**kwargs) - self.policies = kwargs.get('policies', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request_py3.py deleted file mode 100644 index 657e3a980fbb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EvaluatePoliciesRequest(Model): - """Request body for evaluating a policy set. - - :param policies: Policies to evaluate. - :type policies: - list[~azure.mgmt.devtestlabs.models.EvaluatePoliciesProperties] - """ - - _attribute_map = { - 'policies': {'key': 'policies', 'type': '[EvaluatePoliciesProperties]'}, - } - - def __init__(self, *, policies=None, **kwargs) -> None: - super(EvaluatePoliciesRequest, self).__init__(**kwargs) - self.policies = policies diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response.py deleted file mode 100644 index be1baad1d5a8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EvaluatePoliciesResponse(Model): - """Response body for evaluating a policy set. - - :param results: Results of evaluating a policy set. - :type results: list[~azure.mgmt.devtestlabs.models.PolicySetResult] - """ - - _attribute_map = { - 'results': {'key': 'results', 'type': '[PolicySetResult]'}, - } - - def __init__(self, **kwargs): - super(EvaluatePoliciesResponse, self).__init__(**kwargs) - self.results = kwargs.get('results', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response_py3.py deleted file mode 100644 index 166eb2130754..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EvaluatePoliciesResponse(Model): - """Response body for evaluating a policy set. - - :param results: Results of evaluating a policy set. - :type results: list[~azure.mgmt.devtestlabs.models.PolicySetResult] - """ - - _attribute_map = { - 'results': {'key': 'results', 'type': '[PolicySetResult]'}, - } - - def __init__(self, *, results=None, **kwargs) -> None: - super(EvaluatePoliciesResponse, self).__init__(**kwargs) - self.results = results diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event.py deleted file mode 100644 index 98395545b13e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Event(Model): - """An event to be notified for. - - :param event_name: The event type for which this notification is enabled - (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Event, self).__init__(**kwargs) - self.event_name = kwargs.get('event_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment.py deleted file mode 100644 index f6d18b5ba3e9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventFragment(Model): - """An event to be notified for. - - :param event_name: The event type for which this notification is enabled - (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EventFragment, self).__init__(**kwargs) - self.event_name = kwargs.get('event_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment_py3.py deleted file mode 100644 index a785e4b7201a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventFragment(Model): - """An event to be notified for. - - :param event_name: The event type for which this notification is enabled - (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - } - - def __init__(self, *, event_name=None, **kwargs) -> None: - super(EventFragment, self).__init__(**kwargs) - self.event_name = event_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_py3.py deleted file mode 100644 index faa50f83daea..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Event(Model): - """An event to be notified for. - - :param event_name: The event type for which this notification is enabled - (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - } - - def __init__(self, *, event_name=None, **kwargs) -> None: - super(Event, self).__init__(**kwargs) - self.event_name = event_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters.py deleted file mode 100644 index 464db115a353..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportResourceUsageParameters(Model): - """The parameters of the export operation. - - :param blob_storage_absolute_sas_uri: The blob storage absolute sas uri - with write permission to the container which the usage data needs to be - uploaded to. - :type blob_storage_absolute_sas_uri: str - :param usage_start_date: The start time of the usage. If not provided, - usage will be reported since the beginning of data collection. - :type usage_start_date: datetime - """ - - _attribute_map = { - 'blob_storage_absolute_sas_uri': {'key': 'blobStorageAbsoluteSasUri', 'type': 'str'}, - 'usage_start_date': {'key': 'usageStartDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ExportResourceUsageParameters, self).__init__(**kwargs) - self.blob_storage_absolute_sas_uri = kwargs.get('blob_storage_absolute_sas_uri', None) - self.usage_start_date = kwargs.get('usage_start_date', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters_py3.py deleted file mode 100644 index f58597733273..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportResourceUsageParameters(Model): - """The parameters of the export operation. - - :param blob_storage_absolute_sas_uri: The blob storage absolute sas uri - with write permission to the container which the usage data needs to be - uploaded to. - :type blob_storage_absolute_sas_uri: str - :param usage_start_date: The start time of the usage. If not provided, - usage will be reported since the beginning of data collection. - :type usage_start_date: datetime - """ - - _attribute_map = { - 'blob_storage_absolute_sas_uri': {'key': 'blobStorageAbsoluteSasUri', 'type': 'str'}, - 'usage_start_date': {'key': 'usageStartDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, blob_storage_absolute_sas_uri: str=None, usage_start_date=None, **kwargs) -> None: - super(ExportResourceUsageParameters, self).__init__(**kwargs) - self.blob_storage_absolute_sas_uri = blob_storage_absolute_sas_uri - self.usage_start_date = usage_start_date diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet.py deleted file mode 100644 index 6f7f1ff89fca..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExternalSubnet(Model): - """Subnet information as returned by the Microsoft.Network API. - - :param id: Gets or sets the identifier. - :type id: str - :param name: Gets or sets the name. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExternalSubnet, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment.py deleted file mode 100644 index ab2d5769fdab..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExternalSubnetFragment(Model): - """Subnet information as returned by the Microsoft.Network API. - - :param id: Gets or sets the identifier. - :type id: str - :param name: Gets or sets the name. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExternalSubnetFragment, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment_py3.py deleted file mode 100644 index f5f57186e9e5..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExternalSubnetFragment(Model): - """Subnet information as returned by the Microsoft.Network API. - - :param id: Gets or sets the identifier. - :type id: str - :param name: Gets or sets the name. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: - super(ExternalSubnetFragment, self).__init__(**kwargs) - self.id = id - self.name = name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_py3.py deleted file mode 100644 index 8a780e424313..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExternalSubnet(Model): - """Subnet information as returned by the Microsoft.Network API. - - :param id: Gets or sets the identifier. - :type id: str - :param name: Gets or sets the name. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: - super(ExternalSubnet, self).__init__(**kwargs) - self.id = id - self.name = name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula.py deleted file mode 100644 index e4b18a64b9fa..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Formula(Resource): - """A formula for creating a VM, specifying an image base and other parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the formula. - :type description: str - :param author: The author of the formula. - :type author: str - :param os_type: The OS type of the formula. - :type os_type: str - :ivar creation_date: The creation date of the formula. - :vartype creation_date: datetime - :param formula_content: The content of the formula. - :type formula_content: - ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameter - :param vm: Information about a VM from which a formula is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVm - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameter'}, - 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVm'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Formula, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.author = kwargs.get('author', None) - self.os_type = kwargs.get('os_type', None) - self.creation_date = None - self.formula_content = kwargs.get('formula_content', None) - self.vm = kwargs.get('vm', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment.py deleted file mode 100644 index f072e37b3036..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class FormulaFragment(UpdateResource): - """A formula for creating a VM, specifying an image base and other parameters. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the formula. - :type description: str - :param author: The author of the formula. - :type author: str - :param os_type: The OS type of the formula. - :type os_type: str - :param formula_content: The content of the formula. - :type formula_content: - ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameterFragment - :param vm: Information about a VM from which a formula is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVmFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameterFragment'}, - 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVmFragment'}, - } - - def __init__(self, **kwargs): - super(FormulaFragment, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.author = kwargs.get('author', None) - self.os_type = kwargs.get('os_type', None) - self.formula_content = kwargs.get('formula_content', None) - self.vm = kwargs.get('vm', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment_py3.py deleted file mode 100644 index 0f212fb85237..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class FormulaFragment(UpdateResource): - """A formula for creating a VM, specifying an image base and other parameters. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the formula. - :type description: str - :param author: The author of the formula. - :type author: str - :param os_type: The OS type of the formula. - :type os_type: str - :param formula_content: The content of the formula. - :type formula_content: - ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameterFragment - :param vm: Information about a VM from which a formula is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVmFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameterFragment'}, - 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVmFragment'}, - } - - def __init__(self, *, tags=None, description: str=None, author: str=None, os_type: str=None, formula_content=None, vm=None, **kwargs) -> None: - super(FormulaFragment, self).__init__(tags=tags, **kwargs) - self.description = description - self.author = author - self.os_type = os_type - self.formula_content = formula_content - self.vm = vm diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_paged.py deleted file mode 100644 index b8ae79e7de9d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class FormulaPaged(Paged): - """ - A paging container for iterating over a list of :class:`Formula ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Formula]'} - } - - def __init__(self, *args, **kwargs): - - super(FormulaPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm.py deleted file mode 100644 index 0811ea901b40..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FormulaPropertiesFromVm(Model): - """Information about a VM from which a formula is to be created. - - :param lab_vm_id: The identifier of the VM from which a formula is to be - created. - :type lab_vm_id: str - """ - - _attribute_map = { - 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FormulaPropertiesFromVm, self).__init__(**kwargs) - self.lab_vm_id = kwargs.get('lab_vm_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment.py deleted file mode 100644 index 240d0674d57e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FormulaPropertiesFromVmFragment(Model): - """Information about a VM from which a formula is to be created. - - :param lab_vm_id: The identifier of the VM from which a formula is to be - created. - :type lab_vm_id: str - """ - - _attribute_map = { - 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FormulaPropertiesFromVmFragment, self).__init__(**kwargs) - self.lab_vm_id = kwargs.get('lab_vm_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment_py3.py deleted file mode 100644 index 1fff926ae626..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FormulaPropertiesFromVmFragment(Model): - """Information about a VM from which a formula is to be created. - - :param lab_vm_id: The identifier of the VM from which a formula is to be - created. - :type lab_vm_id: str - """ - - _attribute_map = { - 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, - } - - def __init__(self, *, lab_vm_id: str=None, **kwargs) -> None: - super(FormulaPropertiesFromVmFragment, self).__init__(**kwargs) - self.lab_vm_id = lab_vm_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_py3.py deleted file mode 100644 index 2d7ac51274fe..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FormulaPropertiesFromVm(Model): - """Information about a VM from which a formula is to be created. - - :param lab_vm_id: The identifier of the VM from which a formula is to be - created. - :type lab_vm_id: str - """ - - _attribute_map = { - 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, - } - - def __init__(self, *, lab_vm_id: str=None, **kwargs) -> None: - super(FormulaPropertiesFromVm, self).__init__(**kwargs) - self.lab_vm_id = lab_vm_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_py3.py deleted file mode 100644 index 907919f44485..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_py3.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Formula(Resource): - """A formula for creating a VM, specifying an image base and other parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the formula. - :type description: str - :param author: The author of the formula. - :type author: str - :param os_type: The OS type of the formula. - :type os_type: str - :ivar creation_date: The creation date of the formula. - :vartype creation_date: datetime - :param formula_content: The content of the formula. - :type formula_content: - ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameter - :param vm: Information about a VM from which a formula is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVm - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameter'}, - 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVm'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, description: str=None, author: str=None, os_type: str=None, formula_content=None, vm=None, **kwargs) -> None: - super(Formula, self).__init__(location=location, tags=tags, **kwargs) - self.description = description - self.author = author - self.os_type = os_type - self.creation_date = None - self.formula_content = formula_content - self.vm = vm - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image.py deleted file mode 100644 index c16dcfd6e97f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class GalleryImage(Resource): - """A gallery image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param author: The author of the gallery image. - :type author: str - :ivar created_date: The creation date of the gallery image. - :vartype created_date: datetime - :param description: The description of the gallery image. - :type description: str - :param image_reference: The image reference of the gallery image. - :type image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param icon: The icon of the gallery image. - :type icon: str - :param enabled: Indicates whether this gallery image is enabled. - :type enabled: bool - :param plan_id: The third party plan that applies to this image - :type plan_id: str - :param is_plan_authorized: Indicates if the plan has been authorized for - programmatic deployment. - :type is_plan_authorized: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'image_reference': {'key': 'properties.imageReference', 'type': 'GalleryImageReference'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(GalleryImage, self).__init__(**kwargs) - self.author = kwargs.get('author', None) - self.created_date = None - self.description = kwargs.get('description', None) - self.image_reference = kwargs.get('image_reference', None) - self.icon = kwargs.get('icon', None) - self.enabled = kwargs.get('enabled', None) - self.plan_id = kwargs.get('plan_id', None) - self.is_plan_authorized = kwargs.get('is_plan_authorized', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_paged.py deleted file mode 100644 index 2712de454c83..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class GalleryImagePaged(Paged): - """ - A paging container for iterating over a list of :class:`GalleryImage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GalleryImage]'} - } - - def __init__(self, *args, **kwargs): - - super(GalleryImagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_py3.py deleted file mode 100644 index 2097997302c9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_py3.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class GalleryImage(Resource): - """A gallery image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param author: The author of the gallery image. - :type author: str - :ivar created_date: The creation date of the gallery image. - :vartype created_date: datetime - :param description: The description of the gallery image. - :type description: str - :param image_reference: The image reference of the gallery image. - :type image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param icon: The icon of the gallery image. - :type icon: str - :param enabled: Indicates whether this gallery image is enabled. - :type enabled: bool - :param plan_id: The third party plan that applies to this image - :type plan_id: str - :param is_plan_authorized: Indicates if the plan has been authorized for - programmatic deployment. - :type is_plan_authorized: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'image_reference': {'key': 'properties.imageReference', 'type': 'GalleryImageReference'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - } - - def __init__(self, *, location: str=None, tags=None, author: str=None, description: str=None, image_reference=None, icon: str=None, enabled: bool=None, plan_id: str=None, is_plan_authorized: bool=None, **kwargs) -> None: - super(GalleryImage, self).__init__(location=location, tags=tags, **kwargs) - self.author = author - self.created_date = None - self.description = description - self.image_reference = image_reference - self.icon = icon - self.enabled = enabled - self.plan_id = plan_id - self.is_plan_authorized = is_plan_authorized diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference.py deleted file mode 100644 index c896911316fd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryImageReference(Model): - """The reference information for an Azure Marketplace image. - - :param offer: The offer of the gallery image. - :type offer: str - :param publisher: The publisher of the gallery image. - :type publisher: str - :param sku: The SKU of the gallery image. - :type sku: str - :param os_type: The OS type of the gallery image. - :type os_type: str - :param version: The version of the gallery image. - :type version: str - """ - - _attribute_map = { - 'offer': {'key': 'offer', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GalleryImageReference, self).__init__(**kwargs) - self.offer = kwargs.get('offer', None) - self.publisher = kwargs.get('publisher', None) - self.sku = kwargs.get('sku', None) - self.os_type = kwargs.get('os_type', None) - self.version = kwargs.get('version', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment.py deleted file mode 100644 index 6bd266dbfbd8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryImageReferenceFragment(Model): - """The reference information for an Azure Marketplace image. - - :param offer: The offer of the gallery image. - :type offer: str - :param publisher: The publisher of the gallery image. - :type publisher: str - :param sku: The SKU of the gallery image. - :type sku: str - :param os_type: The OS type of the gallery image. - :type os_type: str - :param version: The version of the gallery image. - :type version: str - """ - - _attribute_map = { - 'offer': {'key': 'offer', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GalleryImageReferenceFragment, self).__init__(**kwargs) - self.offer = kwargs.get('offer', None) - self.publisher = kwargs.get('publisher', None) - self.sku = kwargs.get('sku', None) - self.os_type = kwargs.get('os_type', None) - self.version = kwargs.get('version', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment_py3.py deleted file mode 100644 index 3ebbfa4662f7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryImageReferenceFragment(Model): - """The reference information for an Azure Marketplace image. - - :param offer: The offer of the gallery image. - :type offer: str - :param publisher: The publisher of the gallery image. - :type publisher: str - :param sku: The SKU of the gallery image. - :type sku: str - :param os_type: The OS type of the gallery image. - :type os_type: str - :param version: The version of the gallery image. - :type version: str - """ - - _attribute_map = { - 'offer': {'key': 'offer', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, offer: str=None, publisher: str=None, sku: str=None, os_type: str=None, version: str=None, **kwargs) -> None: - super(GalleryImageReferenceFragment, self).__init__(**kwargs) - self.offer = offer - self.publisher = publisher - self.sku = sku - self.os_type = os_type - self.version = version diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_py3.py deleted file mode 100644 index 2541dc5b63e9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryImageReference(Model): - """The reference information for an Azure Marketplace image. - - :param offer: The offer of the gallery image. - :type offer: str - :param publisher: The publisher of the gallery image. - :type publisher: str - :param sku: The SKU of the gallery image. - :type sku: str - :param os_type: The OS type of the gallery image. - :type os_type: str - :param version: The version of the gallery image. - :type version: str - """ - - _attribute_map = { - 'offer': {'key': 'offer', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, offer: str=None, publisher: str=None, sku: str=None, os_type: str=None, version: str=None, **kwargs) -> None: - super(GalleryImageReference, self).__init__(**kwargs) - self.offer = offer - self.publisher = publisher - self.sku = sku - self.os_type = os_type - self.version = version diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request.py deleted file mode 100644 index 3c5fb7b2fafd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GenerateArmTemplateRequest(Model): - """Parameters for generating an ARM template for deploying artifacts. - - :param virtual_machine_name: The resource name of the virtual machine. - :type virtual_machine_name: str - :param parameters: The parameters of the ARM template. - :type parameters: list[~azure.mgmt.devtestlabs.models.ParameterInfo] - :param location: The location of the virtual machine. - :type location: str - :param file_upload_options: Options for uploading the files for the - artifact. UploadFilesAndGenerateSasTokens is the default value. Possible - values include: 'UploadFilesAndGenerateSasTokens', 'None' - :type file_upload_options: str or - ~azure.mgmt.devtestlabs.models.FileUploadOptions - """ - - _attribute_map = { - 'virtual_machine_name': {'key': 'virtualMachineName', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ParameterInfo]'}, - 'location': {'key': 'location', 'type': 'str'}, - 'file_upload_options': {'key': 'fileUploadOptions', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GenerateArmTemplateRequest, self).__init__(**kwargs) - self.virtual_machine_name = kwargs.get('virtual_machine_name', None) - self.parameters = kwargs.get('parameters', None) - self.location = kwargs.get('location', None) - self.file_upload_options = kwargs.get('file_upload_options', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request_py3.py deleted file mode 100644 index 677085554d25..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GenerateArmTemplateRequest(Model): - """Parameters for generating an ARM template for deploying artifacts. - - :param virtual_machine_name: The resource name of the virtual machine. - :type virtual_machine_name: str - :param parameters: The parameters of the ARM template. - :type parameters: list[~azure.mgmt.devtestlabs.models.ParameterInfo] - :param location: The location of the virtual machine. - :type location: str - :param file_upload_options: Options for uploading the files for the - artifact. UploadFilesAndGenerateSasTokens is the default value. Possible - values include: 'UploadFilesAndGenerateSasTokens', 'None' - :type file_upload_options: str or - ~azure.mgmt.devtestlabs.models.FileUploadOptions - """ - - _attribute_map = { - 'virtual_machine_name': {'key': 'virtualMachineName', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ParameterInfo]'}, - 'location': {'key': 'location', 'type': 'str'}, - 'file_upload_options': {'key': 'fileUploadOptions', 'type': 'str'}, - } - - def __init__(self, *, virtual_machine_name: str=None, parameters=None, location: str=None, file_upload_options=None, **kwargs) -> None: - super(GenerateArmTemplateRequest, self).__init__(**kwargs) - self.virtual_machine_name = virtual_machine_name - self.parameters = parameters - self.location = location - self.file_upload_options = file_upload_options diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter.py deleted file mode 100644 index 801afae7e028..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GenerateUploadUriParameter(Model): - """Properties for generating an upload URI. - - :param blob_name: The blob name of the upload URI. - :type blob_name: str - """ - - _attribute_map = { - 'blob_name': {'key': 'blobName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GenerateUploadUriParameter, self).__init__(**kwargs) - self.blob_name = kwargs.get('blob_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter_py3.py deleted file mode 100644 index ebc5724f0614..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GenerateUploadUriParameter(Model): - """Properties for generating an upload URI. - - :param blob_name: The blob name of the upload URI. - :type blob_name: str - """ - - _attribute_map = { - 'blob_name': {'key': 'blobName', 'type': 'str'}, - } - - def __init__(self, *, blob_name: str=None, **kwargs) -> None: - super(GenerateUploadUriParameter, self).__init__(**kwargs) - self.blob_name = blob_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response.py deleted file mode 100644 index 6b89d3111051..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GenerateUploadUriResponse(Model): - """Response body for generating an upload URI. - - :param upload_uri: The upload URI for the VHD. - :type upload_uri: str - """ - - _attribute_map = { - 'upload_uri': {'key': 'uploadUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GenerateUploadUriResponse, self).__init__(**kwargs) - self.upload_uri = kwargs.get('upload_uri', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response_py3.py deleted file mode 100644 index 8807569409ac..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GenerateUploadUriResponse(Model): - """Response body for generating an upload URI. - - :param upload_uri: The upload URI for the VHD. - :type upload_uri: str - """ - - _attribute_map = { - 'upload_uri': {'key': 'uploadUri', 'type': 'str'}, - } - - def __init__(self, *, upload_uri: str=None, **kwargs) -> None: - super(GenerateUploadUriResponse, self).__init__(**kwargs) - self.upload_uri = upload_uri diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details.py deleted file mode 100644 index e310a1bbc923..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HourDetails(Model): - """Properties of an hourly schedule. - - :param minute: Minutes of the hour the schedule will run. - :type minute: int - """ - - _attribute_map = { - 'minute': {'key': 'minute', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(HourDetails, self).__init__(**kwargs) - self.minute = kwargs.get('minute', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment.py deleted file mode 100644 index 3a41af20481d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HourDetailsFragment(Model): - """Properties of an hourly schedule. - - :param minute: Minutes of the hour the schedule will run. - :type minute: int - """ - - _attribute_map = { - 'minute': {'key': 'minute', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(HourDetailsFragment, self).__init__(**kwargs) - self.minute = kwargs.get('minute', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment_py3.py deleted file mode 100644 index afa962a3c628..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HourDetailsFragment(Model): - """Properties of an hourly schedule. - - :param minute: Minutes of the hour the schedule will run. - :type minute: int - """ - - _attribute_map = { - 'minute': {'key': 'minute', 'type': 'int'}, - } - - def __init__(self, *, minute: int=None, **kwargs) -> None: - super(HourDetailsFragment, self).__init__(**kwargs) - self.minute = minute diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_py3.py deleted file mode 100644 index 52c323352b24..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HourDetails(Model): - """Properties of an hourly schedule. - - :param minute: Minutes of the hour the schedule will run. - :type minute: int - """ - - _attribute_map = { - 'minute': {'key': 'minute', 'type': 'int'}, - } - - def __init__(self, *, minute: int=None, **kwargs) -> None: - super(HourDetails, self).__init__(**kwargs) - self.minute = minute diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties.py deleted file mode 100644 index ed4b127fc39c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IdentityProperties(Model): - """Properties of a managed identity. - - :param type: Managed identity. - :type type: str - :param principal_id: The principal id of resource identity. - :type principal_id: str - :param tenant_id: The tenant identifier of resource. - :type tenant_id: str - :param client_secret_url: The client secret URL of the identity. - :type client_secret_url: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'client_secret_url': {'key': 'clientSecretUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IdentityProperties, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.principal_id = kwargs.get('principal_id', None) - self.tenant_id = kwargs.get('tenant_id', None) - self.client_secret_url = kwargs.get('client_secret_url', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties_py3.py deleted file mode 100644 index 63fb90a1b974..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IdentityProperties(Model): - """Properties of a managed identity. - - :param type: Managed identity. - :type type: str - :param principal_id: The principal id of resource identity. - :type principal_id: str - :param tenant_id: The tenant identifier of resource. - :type tenant_id: str - :param client_secret_url: The client secret URL of the identity. - :type client_secret_url: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'client_secret_url': {'key': 'clientSecretUrl', 'type': 'str'}, - } - - def __init__(self, *, type: str=None, principal_id: str=None, tenant_id: str=None, client_secret_url: str=None, **kwargs) -> None: - super(IdentityProperties, self).__init__(**kwargs) - self.type = type - self.principal_id = principal_id - self.tenant_id = tenant_id - self.client_secret_url = client_secret_url diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request.py deleted file mode 100644 index 0c910e9b203e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImportLabVirtualMachineRequest(Model): - """This represents the payload required to import a virtual machine from a - different lab into the current one. - - :param source_virtual_machine_resource_id: The full resource ID of the - virtual machine to be imported. - :type source_virtual_machine_resource_id: str - :param destination_virtual_machine_name: The name of the virtual machine - in the destination lab - :type destination_virtual_machine_name: str - """ - - _attribute_map = { - 'source_virtual_machine_resource_id': {'key': 'sourceVirtualMachineResourceId', 'type': 'str'}, - 'destination_virtual_machine_name': {'key': 'destinationVirtualMachineName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImportLabVirtualMachineRequest, self).__init__(**kwargs) - self.source_virtual_machine_resource_id = kwargs.get('source_virtual_machine_resource_id', None) - self.destination_virtual_machine_name = kwargs.get('destination_virtual_machine_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request_py3.py deleted file mode 100644 index 6ca10ecff7a6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImportLabVirtualMachineRequest(Model): - """This represents the payload required to import a virtual machine from a - different lab into the current one. - - :param source_virtual_machine_resource_id: The full resource ID of the - virtual machine to be imported. - :type source_virtual_machine_resource_id: str - :param destination_virtual_machine_name: The name of the virtual machine - in the destination lab - :type destination_virtual_machine_name: str - """ - - _attribute_map = { - 'source_virtual_machine_resource_id': {'key': 'sourceVirtualMachineResourceId', 'type': 'str'}, - 'destination_virtual_machine_name': {'key': 'destinationVirtualMachineName', 'type': 'str'}, - } - - def __init__(self, *, source_virtual_machine_resource_id: str=None, destination_virtual_machine_name: str=None, **kwargs) -> None: - super(ImportLabVirtualMachineRequest, self).__init__(**kwargs) - self.source_virtual_machine_resource_id = source_virtual_machine_resource_id - self.destination_virtual_machine_name = destination_virtual_machine_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule.py deleted file mode 100644 index 56d745d71893..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InboundNatRule(Model): - """A rule for NAT - exposing a VM's port (backendPort) on the public IP - address using a load balancer. - - :param transport_protocol: The transport protocol for the endpoint. - Possible values include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param frontend_port: The external endpoint port of the inbound - connection. Possible values range between 1 and 65535, inclusive. If - unspecified, a value will be allocated automatically. - :type frontend_port: int - :param backend_port: The port to which the external traffic will be - redirected. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(InboundNatRule, self).__init__(**kwargs) - self.transport_protocol = kwargs.get('transport_protocol', None) - self.frontend_port = kwargs.get('frontend_port', None) - self.backend_port = kwargs.get('backend_port', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment.py deleted file mode 100644 index 034404f9923f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InboundNatRuleFragment(Model): - """A rule for NAT - exposing a VM's port (backendPort) on the public IP - address using a load balancer. - - :param transport_protocol: The transport protocol for the endpoint. - Possible values include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param frontend_port: The external endpoint port of the inbound - connection. Possible values range between 1 and 65535, inclusive. If - unspecified, a value will be allocated automatically. - :type frontend_port: int - :param backend_port: The port to which the external traffic will be - redirected. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(InboundNatRuleFragment, self).__init__(**kwargs) - self.transport_protocol = kwargs.get('transport_protocol', None) - self.frontend_port = kwargs.get('frontend_port', None) - self.backend_port = kwargs.get('backend_port', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment_py3.py deleted file mode 100644 index 397d4c523e32..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InboundNatRuleFragment(Model): - """A rule for NAT - exposing a VM's port (backendPort) on the public IP - address using a load balancer. - - :param transport_protocol: The transport protocol for the endpoint. - Possible values include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param frontend_port: The external endpoint port of the inbound - connection. Possible values range between 1 and 65535, inclusive. If - unspecified, a value will be allocated automatically. - :type frontend_port: int - :param backend_port: The port to which the external traffic will be - redirected. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, *, transport_protocol=None, frontend_port: int=None, backend_port: int=None, **kwargs) -> None: - super(InboundNatRuleFragment, self).__init__(**kwargs) - self.transport_protocol = transport_protocol - self.frontend_port = frontend_port - self.backend_port = backend_port diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_py3.py deleted file mode 100644 index 9ec4bd8a3d52..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InboundNatRule(Model): - """A rule for NAT - exposing a VM's port (backendPort) on the public IP - address using a load balancer. - - :param transport_protocol: The transport protocol for the endpoint. - Possible values include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param frontend_port: The external endpoint port of the inbound - connection. Possible values range between 1 and 65535, inclusive. If - unspecified, a value will be allocated automatically. - :type frontend_port: int - :param backend_port: The port to which the external traffic will be - redirected. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, *, transport_protocol=None, frontend_port: int=None, backend_port: int=None, **kwargs) -> None: - super(InboundNatRule, self).__init__(**kwargs) - self.transport_protocol = transport_protocol - self.frontend_port = frontend_port - self.backend_port = backend_port diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab.py deleted file mode 100644 index e495c96e01fa..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Lab(Resource): - """A lab. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar default_storage_account: The lab's default storage account. - :vartype default_storage_account: str - :ivar default_premium_storage_account: The lab's default premium storage - account. - :vartype default_premium_storage_account: str - :ivar artifacts_storage_account: The lab's artifact storage account. - :vartype artifacts_storage_account: str - :ivar premium_data_disk_storage_account: The lab's premium data disk - storage account. - :vartype premium_data_disk_storage_account: str - :ivar vault_name: The lab's Key vault. - :vartype vault_name: str - :param lab_storage_type: Type of storage used by the lab. It can be either - Premium or Standard. Default is Premium. Possible values include: - 'Standard', 'Premium' - :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param mandatory_artifacts_resource_ids_linux: The ordered list of - artifact resource IDs that should be applied on all Linux VM creations by - default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_linux: list[str] - :param mandatory_artifacts_resource_ids_windows: The ordered list of - artifact resource IDs that should be applied on all Windows VM creations - by default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_windows: list[str] - :ivar created_date: The creation date of the lab. - :vartype created_date: datetime - :param premium_data_disks: The setting to enable usage of premium data - disks. - When its value is 'Enabled', creation of standard or premium data disks is - allowed. - When its value is 'Disabled', only creation of standard data disks is - allowed. Possible values include: 'Disabled', 'Enabled' - :type premium_data_disks: str or - ~azure.mgmt.devtestlabs.models.PremiumDataDisk - :param environment_permission: The access rights to be granted to the user - when provisioning an environment. Possible values include: 'Reader', - 'Contributor' - :type environment_permission: str or - ~azure.mgmt.devtestlabs.models.EnvironmentPermission - :param announcement: The properties of any lab announcement associated - with this lab - :type announcement: - ~azure.mgmt.devtestlabs.models.LabAnnouncementProperties - :param support: The properties of any lab support message associated with - this lab - :type support: ~azure.mgmt.devtestlabs.models.LabSupportProperties - :ivar vm_creation_resource_group: The resource group in which lab virtual - machines will be created in. - :vartype vm_creation_resource_group: str - :ivar public_ip_id: The public IP address for the lab's load balancer. - :vartype public_ip_id: str - :ivar load_balancer_id: The load balancer used to for lab VMs that use - shared IP address. - :vartype load_balancer_id: str - :ivar network_security_group_id: The Network Security Group attached to - the lab VMs Network interfaces to restrict open ports. - :vartype network_security_group_id: str - :param extended_properties: Extended properties of the lab used for - experimental features - :type extended_properties: dict[str, str] - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'default_storage_account': {'readonly': True}, - 'default_premium_storage_account': {'readonly': True}, - 'artifacts_storage_account': {'readonly': True}, - 'premium_data_disk_storage_account': {'readonly': True}, - 'vault_name': {'readonly': True}, - 'created_date': {'readonly': True}, - 'vm_creation_resource_group': {'readonly': True}, - 'public_ip_id': {'readonly': True}, - 'load_balancer_id': {'readonly': True}, - 'network_security_group_id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'default_storage_account': {'key': 'properties.defaultStorageAccount', 'type': 'str'}, - 'default_premium_storage_account': {'key': 'properties.defaultPremiumStorageAccount', 'type': 'str'}, - 'artifacts_storage_account': {'key': 'properties.artifactsStorageAccount', 'type': 'str'}, - 'premium_data_disk_storage_account': {'key': 'properties.premiumDataDiskStorageAccount', 'type': 'str'}, - 'vault_name': {'key': 'properties.vaultName', 'type': 'str'}, - 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, - 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, - 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, - 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, - 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementProperties'}, - 'support': {'key': 'properties.support', 'type': 'LabSupportProperties'}, - 'vm_creation_resource_group': {'key': 'properties.vmCreationResourceGroup', 'type': 'str'}, - 'public_ip_id': {'key': 'properties.publicIpId', 'type': 'str'}, - 'load_balancer_id': {'key': 'properties.loadBalancerId', 'type': 'str'}, - 'network_security_group_id': {'key': 'properties.networkSecurityGroupId', 'type': 'str'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Lab, self).__init__(**kwargs) - self.default_storage_account = None - self.default_premium_storage_account = None - self.artifacts_storage_account = None - self.premium_data_disk_storage_account = None - self.vault_name = None - self.lab_storage_type = kwargs.get('lab_storage_type', None) - self.mandatory_artifacts_resource_ids_linux = kwargs.get('mandatory_artifacts_resource_ids_linux', None) - self.mandatory_artifacts_resource_ids_windows = kwargs.get('mandatory_artifacts_resource_ids_windows', None) - self.created_date = None - self.premium_data_disks = kwargs.get('premium_data_disks', None) - self.environment_permission = kwargs.get('environment_permission', None) - self.announcement = kwargs.get('announcement', None) - self.support = kwargs.get('support', None) - self.vm_creation_resource_group = None - self.public_ip_id = None - self.load_balancer_id = None - self.network_security_group_id = None - self.extended_properties = kwargs.get('extended_properties', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties.py deleted file mode 100644 index aee243079a09..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabAnnouncementProperties(Model): - """Properties of a lab's announcement banner. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param title: The plain text title for the lab announcement - :type title: str - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - :param enabled: Is the lab announcement active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param expiration_date: The time at which the announcement expires (null - for never) - :type expiration_date: datetime - :param expired: Has this announcement expired? - :type expired: bool - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'expired': {'key': 'expired', 'type': 'bool'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabAnnouncementProperties, self).__init__(**kwargs) - self.title = kwargs.get('title', None) - self.markdown = kwargs.get('markdown', None) - self.enabled = kwargs.get('enabled', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.expired = kwargs.get('expired', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment.py deleted file mode 100644 index 9d82a4819afa..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabAnnouncementPropertiesFragment(Model): - """Properties of a lab's announcement banner. - - :param title: The plain text title for the lab announcement - :type title: str - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - :param enabled: Is the lab announcement active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param expiration_date: The time at which the announcement expires (null - for never) - :type expiration_date: datetime - :param expired: Has this announcement expired? - :type expired: bool - """ - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'expired': {'key': 'expired', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(LabAnnouncementPropertiesFragment, self).__init__(**kwargs) - self.title = kwargs.get('title', None) - self.markdown = kwargs.get('markdown', None) - self.enabled = kwargs.get('enabled', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.expired = kwargs.get('expired', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment_py3.py deleted file mode 100644 index 33eea147dcf1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabAnnouncementPropertiesFragment(Model): - """Properties of a lab's announcement banner. - - :param title: The plain text title for the lab announcement - :type title: str - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - :param enabled: Is the lab announcement active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param expiration_date: The time at which the announcement expires (null - for never) - :type expiration_date: datetime - :param expired: Has this announcement expired? - :type expired: bool - """ - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'expired': {'key': 'expired', 'type': 'bool'}, - } - - def __init__(self, *, title: str=None, markdown: str=None, enabled=None, expiration_date=None, expired: bool=None, **kwargs) -> None: - super(LabAnnouncementPropertiesFragment, self).__init__(**kwargs) - self.title = title - self.markdown = markdown - self.enabled = enabled - self.expiration_date = expiration_date - self.expired = expired diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_py3.py deleted file mode 100644 index 3d818d58a02f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabAnnouncementProperties(Model): - """Properties of a lab's announcement banner. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param title: The plain text title for the lab announcement - :type title: str - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - :param enabled: Is the lab announcement active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param expiration_date: The time at which the announcement expires (null - for never) - :type expiration_date: datetime - :param expired: Has this announcement expired? - :type expired: bool - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'expired': {'key': 'expired', 'type': 'bool'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, title: str=None, markdown: str=None, enabled=None, expiration_date=None, expired: bool=None, **kwargs) -> None: - super(LabAnnouncementProperties, self).__init__(**kwargs) - self.title = title - self.markdown = markdown - self.enabled = enabled - self.expiration_date = expiration_date - self.expired = expired - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost.py deleted file mode 100644 index 6825b1e82b74..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class LabCost(Resource): - """A cost item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param target_cost: The target cost properties - :type target_cost: ~azure.mgmt.devtestlabs.models.TargetCostProperties - :ivar lab_cost_summary: The lab cost summary component of the cost data. - :vartype lab_cost_summary: - ~azure.mgmt.devtestlabs.models.LabCostSummaryProperties - :ivar lab_cost_details: The lab cost details component of the cost data. - :vartype lab_cost_details: - list[~azure.mgmt.devtestlabs.models.LabCostDetailsProperties] - :ivar resource_costs: The resource cost component of the cost data. - :vartype resource_costs: - list[~azure.mgmt.devtestlabs.models.LabResourceCostProperties] - :param currency_code: The currency code of the cost. - :type currency_code: str - :param start_date_time: The start time of the cost data. - :type start_date_time: datetime - :param end_date_time: The end time of the cost data. - :type end_date_time: datetime - :param created_date: The creation date of the cost. - :type created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'lab_cost_summary': {'readonly': True}, - 'lab_cost_details': {'readonly': True}, - 'resource_costs': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'target_cost': {'key': 'properties.targetCost', 'type': 'TargetCostProperties'}, - 'lab_cost_summary': {'key': 'properties.labCostSummary', 'type': 'LabCostSummaryProperties'}, - 'lab_cost_details': {'key': 'properties.labCostDetails', 'type': '[LabCostDetailsProperties]'}, - 'resource_costs': {'key': 'properties.resourceCosts', 'type': '[LabResourceCostProperties]'}, - 'currency_code': {'key': 'properties.currencyCode', 'type': 'str'}, - 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, - 'end_date_time': {'key': 'properties.endDateTime', 'type': 'iso-8601'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabCost, self).__init__(**kwargs) - self.target_cost = kwargs.get('target_cost', None) - self.lab_cost_summary = None - self.lab_cost_details = None - self.resource_costs = None - self.currency_code = kwargs.get('currency_code', None) - self.start_date_time = kwargs.get('start_date_time', None) - self.end_date_time = kwargs.get('end_date_time', None) - self.created_date = kwargs.get('created_date', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties.py deleted file mode 100644 index ac7c70074036..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabCostDetailsProperties(Model): - """The properties of a lab cost item. - - :param date_property: The date of the cost item. - :type date_property: datetime - :param cost: The cost component of the cost item. - :type cost: float - :param cost_type: The type of the cost. Possible values include: - 'Unavailable', 'Reported', 'Projected' - :type cost_type: str or ~azure.mgmt.devtestlabs.models.CostType - """ - - _attribute_map = { - 'date_property': {'key': 'date', 'type': 'iso-8601'}, - 'cost': {'key': 'cost', 'type': 'float'}, - 'cost_type': {'key': 'costType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabCostDetailsProperties, self).__init__(**kwargs) - self.date_property = kwargs.get('date_property', None) - self.cost = kwargs.get('cost', None) - self.cost_type = kwargs.get('cost_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties_py3.py deleted file mode 100644 index f6690c8c2184..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabCostDetailsProperties(Model): - """The properties of a lab cost item. - - :param date_property: The date of the cost item. - :type date_property: datetime - :param cost: The cost component of the cost item. - :type cost: float - :param cost_type: The type of the cost. Possible values include: - 'Unavailable', 'Reported', 'Projected' - :type cost_type: str or ~azure.mgmt.devtestlabs.models.CostType - """ - - _attribute_map = { - 'date_property': {'key': 'date', 'type': 'iso-8601'}, - 'cost': {'key': 'cost', 'type': 'float'}, - 'cost_type': {'key': 'costType', 'type': 'str'}, - } - - def __init__(self, *, date_property=None, cost: float=None, cost_type=None, **kwargs) -> None: - super(LabCostDetailsProperties, self).__init__(**kwargs) - self.date_property = date_property - self.cost = cost - self.cost_type = cost_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_py3.py deleted file mode 100644 index cef3ac68fdf8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class LabCost(Resource): - """A cost item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param target_cost: The target cost properties - :type target_cost: ~azure.mgmt.devtestlabs.models.TargetCostProperties - :ivar lab_cost_summary: The lab cost summary component of the cost data. - :vartype lab_cost_summary: - ~azure.mgmt.devtestlabs.models.LabCostSummaryProperties - :ivar lab_cost_details: The lab cost details component of the cost data. - :vartype lab_cost_details: - list[~azure.mgmt.devtestlabs.models.LabCostDetailsProperties] - :ivar resource_costs: The resource cost component of the cost data. - :vartype resource_costs: - list[~azure.mgmt.devtestlabs.models.LabResourceCostProperties] - :param currency_code: The currency code of the cost. - :type currency_code: str - :param start_date_time: The start time of the cost data. - :type start_date_time: datetime - :param end_date_time: The end time of the cost data. - :type end_date_time: datetime - :param created_date: The creation date of the cost. - :type created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'lab_cost_summary': {'readonly': True}, - 'lab_cost_details': {'readonly': True}, - 'resource_costs': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'target_cost': {'key': 'properties.targetCost', 'type': 'TargetCostProperties'}, - 'lab_cost_summary': {'key': 'properties.labCostSummary', 'type': 'LabCostSummaryProperties'}, - 'lab_cost_details': {'key': 'properties.labCostDetails', 'type': '[LabCostDetailsProperties]'}, - 'resource_costs': {'key': 'properties.resourceCosts', 'type': '[LabResourceCostProperties]'}, - 'currency_code': {'key': 'properties.currencyCode', 'type': 'str'}, - 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, - 'end_date_time': {'key': 'properties.endDateTime', 'type': 'iso-8601'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, target_cost=None, currency_code: str=None, start_date_time=None, end_date_time=None, created_date=None, **kwargs) -> None: - super(LabCost, self).__init__(location=location, tags=tags, **kwargs) - self.target_cost = target_cost - self.lab_cost_summary = None - self.lab_cost_details = None - self.resource_costs = None - self.currency_code = currency_code - self.start_date_time = start_date_time - self.end_date_time = end_date_time - self.created_date = created_date - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties.py deleted file mode 100644 index edeb814ef472..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabCostSummaryProperties(Model): - """The properties of the cost summary. - - :param estimated_lab_cost: The cost component of the cost item. - :type estimated_lab_cost: float - """ - - _attribute_map = { - 'estimated_lab_cost': {'key': 'estimatedLabCost', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(LabCostSummaryProperties, self).__init__(**kwargs) - self.estimated_lab_cost = kwargs.get('estimated_lab_cost', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties_py3.py deleted file mode 100644 index df5a84f3e609..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabCostSummaryProperties(Model): - """The properties of the cost summary. - - :param estimated_lab_cost: The cost component of the cost item. - :type estimated_lab_cost: float - """ - - _attribute_map = { - 'estimated_lab_cost': {'key': 'estimatedLabCost', 'type': 'float'}, - } - - def __init__(self, *, estimated_lab_cost: float=None, **kwargs) -> None: - super(LabCostSummaryProperties, self).__init__(**kwargs) - self.estimated_lab_cost = estimated_lab_cost diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment.py deleted file mode 100644 index 2ad6dc84b4ae..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class LabFragment(UpdateResource): - """A lab. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_storage_type: Type of storage used by the lab. It can be either - Premium or Standard. Default is Premium. Possible values include: - 'Standard', 'Premium' - :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param mandatory_artifacts_resource_ids_linux: The ordered list of - artifact resource IDs that should be applied on all Linux VM creations by - default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_linux: list[str] - :param mandatory_artifacts_resource_ids_windows: The ordered list of - artifact resource IDs that should be applied on all Windows VM creations - by default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_windows: list[str] - :param premium_data_disks: The setting to enable usage of premium data - disks. - When its value is 'Enabled', creation of standard or premium data disks is - allowed. - When its value is 'Disabled', only creation of standard data disks is - allowed. Possible values include: 'Disabled', 'Enabled' - :type premium_data_disks: str or - ~azure.mgmt.devtestlabs.models.PremiumDataDisk - :param environment_permission: The access rights to be granted to the user - when provisioning an environment. Possible values include: 'Reader', - 'Contributor' - :type environment_permission: str or - ~azure.mgmt.devtestlabs.models.EnvironmentPermission - :param announcement: The properties of any lab announcement associated - with this lab - :type announcement: - ~azure.mgmt.devtestlabs.models.LabAnnouncementPropertiesFragment - :param support: The properties of any lab support message associated with - this lab - :type support: ~azure.mgmt.devtestlabs.models.LabSupportPropertiesFragment - :param extended_properties: Extended properties of the lab used for - experimental features - :type extended_properties: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, - 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, - 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, - 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, - 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, - 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementPropertiesFragment'}, - 'support': {'key': 'properties.support', 'type': 'LabSupportPropertiesFragment'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(LabFragment, self).__init__(**kwargs) - self.lab_storage_type = kwargs.get('lab_storage_type', None) - self.mandatory_artifacts_resource_ids_linux = kwargs.get('mandatory_artifacts_resource_ids_linux', None) - self.mandatory_artifacts_resource_ids_windows = kwargs.get('mandatory_artifacts_resource_ids_windows', None) - self.premium_data_disks = kwargs.get('premium_data_disks', None) - self.environment_permission = kwargs.get('environment_permission', None) - self.announcement = kwargs.get('announcement', None) - self.support = kwargs.get('support', None) - self.extended_properties = kwargs.get('extended_properties', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment_py3.py deleted file mode 100644 index c5aa5b816807..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class LabFragment(UpdateResource): - """A lab. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_storage_type: Type of storage used by the lab. It can be either - Premium or Standard. Default is Premium. Possible values include: - 'Standard', 'Premium' - :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param mandatory_artifacts_resource_ids_linux: The ordered list of - artifact resource IDs that should be applied on all Linux VM creations by - default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_linux: list[str] - :param mandatory_artifacts_resource_ids_windows: The ordered list of - artifact resource IDs that should be applied on all Windows VM creations - by default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_windows: list[str] - :param premium_data_disks: The setting to enable usage of premium data - disks. - When its value is 'Enabled', creation of standard or premium data disks is - allowed. - When its value is 'Disabled', only creation of standard data disks is - allowed. Possible values include: 'Disabled', 'Enabled' - :type premium_data_disks: str or - ~azure.mgmt.devtestlabs.models.PremiumDataDisk - :param environment_permission: The access rights to be granted to the user - when provisioning an environment. Possible values include: 'Reader', - 'Contributor' - :type environment_permission: str or - ~azure.mgmt.devtestlabs.models.EnvironmentPermission - :param announcement: The properties of any lab announcement associated - with this lab - :type announcement: - ~azure.mgmt.devtestlabs.models.LabAnnouncementPropertiesFragment - :param support: The properties of any lab support message associated with - this lab - :type support: ~azure.mgmt.devtestlabs.models.LabSupportPropertiesFragment - :param extended_properties: Extended properties of the lab used for - experimental features - :type extended_properties: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, - 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, - 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, - 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, - 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, - 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementPropertiesFragment'}, - 'support': {'key': 'properties.support', 'type': 'LabSupportPropertiesFragment'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, lab_storage_type=None, mandatory_artifacts_resource_ids_linux=None, mandatory_artifacts_resource_ids_windows=None, premium_data_disks=None, environment_permission=None, announcement=None, support=None, extended_properties=None, **kwargs) -> None: - super(LabFragment, self).__init__(tags=tags, **kwargs) - self.lab_storage_type = lab_storage_type - self.mandatory_artifacts_resource_ids_linux = mandatory_artifacts_resource_ids_linux - self.mandatory_artifacts_resource_ids_windows = mandatory_artifacts_resource_ids_windows - self.premium_data_disks = premium_data_disks - self.environment_permission = environment_permission - self.announcement = announcement - self.support = support - self.extended_properties = extended_properties diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_paged.py deleted file mode 100644 index 869d4b1dee38..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class LabPaged(Paged): - """ - A paging container for iterating over a list of :class:`Lab ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Lab]'} - } - - def __init__(self, *args, **kwargs): - - super(LabPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_py3.py deleted file mode 100644 index ec30462d9336..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_py3.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Lab(Resource): - """A lab. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar default_storage_account: The lab's default storage account. - :vartype default_storage_account: str - :ivar default_premium_storage_account: The lab's default premium storage - account. - :vartype default_premium_storage_account: str - :ivar artifacts_storage_account: The lab's artifact storage account. - :vartype artifacts_storage_account: str - :ivar premium_data_disk_storage_account: The lab's premium data disk - storage account. - :vartype premium_data_disk_storage_account: str - :ivar vault_name: The lab's Key vault. - :vartype vault_name: str - :param lab_storage_type: Type of storage used by the lab. It can be either - Premium or Standard. Default is Premium. Possible values include: - 'Standard', 'Premium' - :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param mandatory_artifacts_resource_ids_linux: The ordered list of - artifact resource IDs that should be applied on all Linux VM creations by - default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_linux: list[str] - :param mandatory_artifacts_resource_ids_windows: The ordered list of - artifact resource IDs that should be applied on all Windows VM creations - by default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_windows: list[str] - :ivar created_date: The creation date of the lab. - :vartype created_date: datetime - :param premium_data_disks: The setting to enable usage of premium data - disks. - When its value is 'Enabled', creation of standard or premium data disks is - allowed. - When its value is 'Disabled', only creation of standard data disks is - allowed. Possible values include: 'Disabled', 'Enabled' - :type premium_data_disks: str or - ~azure.mgmt.devtestlabs.models.PremiumDataDisk - :param environment_permission: The access rights to be granted to the user - when provisioning an environment. Possible values include: 'Reader', - 'Contributor' - :type environment_permission: str or - ~azure.mgmt.devtestlabs.models.EnvironmentPermission - :param announcement: The properties of any lab announcement associated - with this lab - :type announcement: - ~azure.mgmt.devtestlabs.models.LabAnnouncementProperties - :param support: The properties of any lab support message associated with - this lab - :type support: ~azure.mgmt.devtestlabs.models.LabSupportProperties - :ivar vm_creation_resource_group: The resource group in which lab virtual - machines will be created in. - :vartype vm_creation_resource_group: str - :ivar public_ip_id: The public IP address for the lab's load balancer. - :vartype public_ip_id: str - :ivar load_balancer_id: The load balancer used to for lab VMs that use - shared IP address. - :vartype load_balancer_id: str - :ivar network_security_group_id: The Network Security Group attached to - the lab VMs Network interfaces to restrict open ports. - :vartype network_security_group_id: str - :param extended_properties: Extended properties of the lab used for - experimental features - :type extended_properties: dict[str, str] - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'default_storage_account': {'readonly': True}, - 'default_premium_storage_account': {'readonly': True}, - 'artifacts_storage_account': {'readonly': True}, - 'premium_data_disk_storage_account': {'readonly': True}, - 'vault_name': {'readonly': True}, - 'created_date': {'readonly': True}, - 'vm_creation_resource_group': {'readonly': True}, - 'public_ip_id': {'readonly': True}, - 'load_balancer_id': {'readonly': True}, - 'network_security_group_id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'default_storage_account': {'key': 'properties.defaultStorageAccount', 'type': 'str'}, - 'default_premium_storage_account': {'key': 'properties.defaultPremiumStorageAccount', 'type': 'str'}, - 'artifacts_storage_account': {'key': 'properties.artifactsStorageAccount', 'type': 'str'}, - 'premium_data_disk_storage_account': {'key': 'properties.premiumDataDiskStorageAccount', 'type': 'str'}, - 'vault_name': {'key': 'properties.vaultName', 'type': 'str'}, - 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, - 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, - 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, - 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, - 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementProperties'}, - 'support': {'key': 'properties.support', 'type': 'LabSupportProperties'}, - 'vm_creation_resource_group': {'key': 'properties.vmCreationResourceGroup', 'type': 'str'}, - 'public_ip_id': {'key': 'properties.publicIpId', 'type': 'str'}, - 'load_balancer_id': {'key': 'properties.loadBalancerId', 'type': 'str'}, - 'network_security_group_id': {'key': 'properties.networkSecurityGroupId', 'type': 'str'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, lab_storage_type=None, mandatory_artifacts_resource_ids_linux=None, mandatory_artifacts_resource_ids_windows=None, premium_data_disks=None, environment_permission=None, announcement=None, support=None, extended_properties=None, **kwargs) -> None: - super(Lab, self).__init__(location=location, tags=tags, **kwargs) - self.default_storage_account = None - self.default_premium_storage_account = None - self.artifacts_storage_account = None - self.premium_data_disk_storage_account = None - self.vault_name = None - self.lab_storage_type = lab_storage_type - self.mandatory_artifacts_resource_ids_linux = mandatory_artifacts_resource_ids_linux - self.mandatory_artifacts_resource_ids_windows = mandatory_artifacts_resource_ids_windows - self.created_date = None - self.premium_data_disks = premium_data_disks - self.environment_permission = environment_permission - self.announcement = announcement - self.support = support - self.vm_creation_resource_group = None - self.public_ip_id = None - self.load_balancer_id = None - self.network_security_group_id = None - self.extended_properties = extended_properties - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties.py deleted file mode 100644 index 8883745b9735..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabResourceCostProperties(Model): - """The properties of a resource cost item. - - :param resourcename: The name of the resource. - :type resourcename: str - :param resource_uid: The unique identifier of the resource. - :type resource_uid: str - :param resource_cost: The cost component of the resource cost item. - :type resource_cost: float - :param resource_type: The logical resource type (ex. virtualmachine, - storageaccount) - :type resource_type: str - :param resource_owner: The owner of the resource (ex. - janedoe@microsoft.com) - :type resource_owner: str - :param resource_pricing_tier: The category of the resource (ex. - Premium_LRS, Standard_DS1) - :type resource_pricing_tier: str - :param resource_status: The status of the resource (ex. Active) - :type resource_status: str - :param resource_id: The ID of the resource - :type resource_id: str - :param external_resource_id: The ID of the external resource - :type external_resource_id: str - """ - - _attribute_map = { - 'resourcename': {'key': 'resourcename', 'type': 'str'}, - 'resource_uid': {'key': 'resourceUId', 'type': 'str'}, - 'resource_cost': {'key': 'resourceCost', 'type': 'float'}, - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'resource_owner': {'key': 'resourceOwner', 'type': 'str'}, - 'resource_pricing_tier': {'key': 'resourcePricingTier', 'type': 'str'}, - 'resource_status': {'key': 'resourceStatus', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'external_resource_id': {'key': 'externalResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabResourceCostProperties, self).__init__(**kwargs) - self.resourcename = kwargs.get('resourcename', None) - self.resource_uid = kwargs.get('resource_uid', None) - self.resource_cost = kwargs.get('resource_cost', None) - self.resource_type = kwargs.get('resource_type', None) - self.resource_owner = kwargs.get('resource_owner', None) - self.resource_pricing_tier = kwargs.get('resource_pricing_tier', None) - self.resource_status = kwargs.get('resource_status', None) - self.resource_id = kwargs.get('resource_id', None) - self.external_resource_id = kwargs.get('external_resource_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties_py3.py deleted file mode 100644 index 5b360dee84b9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabResourceCostProperties(Model): - """The properties of a resource cost item. - - :param resourcename: The name of the resource. - :type resourcename: str - :param resource_uid: The unique identifier of the resource. - :type resource_uid: str - :param resource_cost: The cost component of the resource cost item. - :type resource_cost: float - :param resource_type: The logical resource type (ex. virtualmachine, - storageaccount) - :type resource_type: str - :param resource_owner: The owner of the resource (ex. - janedoe@microsoft.com) - :type resource_owner: str - :param resource_pricing_tier: The category of the resource (ex. - Premium_LRS, Standard_DS1) - :type resource_pricing_tier: str - :param resource_status: The status of the resource (ex. Active) - :type resource_status: str - :param resource_id: The ID of the resource - :type resource_id: str - :param external_resource_id: The ID of the external resource - :type external_resource_id: str - """ - - _attribute_map = { - 'resourcename': {'key': 'resourcename', 'type': 'str'}, - 'resource_uid': {'key': 'resourceUId', 'type': 'str'}, - 'resource_cost': {'key': 'resourceCost', 'type': 'float'}, - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'resource_owner': {'key': 'resourceOwner', 'type': 'str'}, - 'resource_pricing_tier': {'key': 'resourcePricingTier', 'type': 'str'}, - 'resource_status': {'key': 'resourceStatus', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'external_resource_id': {'key': 'externalResourceId', 'type': 'str'}, - } - - def __init__(self, *, resourcename: str=None, resource_uid: str=None, resource_cost: float=None, resource_type: str=None, resource_owner: str=None, resource_pricing_tier: str=None, resource_status: str=None, resource_id: str=None, external_resource_id: str=None, **kwargs) -> None: - super(LabResourceCostProperties, self).__init__(**kwargs) - self.resourcename = resourcename - self.resource_uid = resource_uid - self.resource_cost = resource_cost - self.resource_type = resource_type - self.resource_owner = resource_owner - self.resource_pricing_tier = resource_pricing_tier - self.resource_status = resource_status - self.resource_id = resource_id - self.external_resource_id = external_resource_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties.py deleted file mode 100644 index e948a530fa44..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabSupportProperties(Model): - """Properties of a lab's support banner. - - :param enabled: Is the lab support banner active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabSupportProperties, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.markdown = kwargs.get('markdown', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment.py deleted file mode 100644 index 53bf876c5a2c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabSupportPropertiesFragment(Model): - """Properties of a lab's support banner. - - :param enabled: Is the lab support banner active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabSupportPropertiesFragment, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.markdown = kwargs.get('markdown', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment_py3.py deleted file mode 100644 index 0495bf2657d2..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabSupportPropertiesFragment(Model): - """Properties of a lab's support banner. - - :param enabled: Is the lab support banner active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - } - - def __init__(self, *, enabled=None, markdown: str=None, **kwargs) -> None: - super(LabSupportPropertiesFragment, self).__init__(**kwargs) - self.enabled = enabled - self.markdown = markdown diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_py3.py deleted file mode 100644 index 0eac2ef2c950..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabSupportProperties(Model): - """Properties of a lab's support banner. - - :param enabled: Is the lab support banner active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - } - - def __init__(self, *, enabled=None, markdown: str=None, **kwargs) -> None: - super(LabSupportProperties, self).__init__(**kwargs) - self.enabled = enabled - self.markdown = markdown diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd.py deleted file mode 100644 index acb777ea8f1b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabVhd(Model): - """Properties of a VHD in the lab. - - :param id: The URI to the VHD. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabVhd, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_paged.py deleted file mode 100644 index 34d5dda853fe..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class LabVhdPaged(Paged): - """ - A paging container for iterating over a list of :class:`LabVhd ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[LabVhd]'} - } - - def __init__(self, *args, **kwargs): - - super(LabVhdPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_py3.py deleted file mode 100644 index 7f0adddb42ae..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabVhd(Model): - """Properties of a VHD in the lab. - - :param id: The URI to the VHD. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(LabVhd, self).__init__(**kwargs) - self.id = id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine.py deleted file mode 100644 index 079a4c3bb59f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine.py +++ /dev/null @@ -1,221 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class LabVirtualMachine(Resource): - """A virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :ivar compute_vm: The compute virtual machine properties. - :vartype compute_vm: ~azure.mgmt.devtestlabs.models.ComputeVmProperties - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties - :ivar applicable_schedule: The applicable schedule for the virtual - machine. - :vartype applicable_schedule: - ~azure.mgmt.devtestlabs.models.ApplicableSchedule - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskProperties] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'compute_vm': {'readonly': True}, - 'applicable_schedule': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'compute_vm': {'key': 'properties.computeVm', 'type': 'ComputeVmProperties'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, - 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabVirtualMachine, self).__init__(**kwargs) - self.notes = kwargs.get('notes', None) - self.owner_object_id = kwargs.get('owner_object_id', None) - self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) - self.created_by_user_id = kwargs.get('created_by_user_id', None) - self.created_by_user = kwargs.get('created_by_user', None) - self.created_date = kwargs.get('created_date', None) - self.compute_id = kwargs.get('compute_id', None) - self.custom_image_id = kwargs.get('custom_image_id', None) - self.os_type = kwargs.get('os_type', None) - self.size = kwargs.get('size', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.ssh_key = kwargs.get('ssh_key', None) - self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) - self.fqdn = kwargs.get('fqdn', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) - self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) - self.artifacts = kwargs.get('artifacts', None) - self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) - self.gallery_image_reference = kwargs.get('gallery_image_reference', None) - self.plan_id = kwargs.get('plan_id', None) - self.compute_vm = None - self.network_interface = kwargs.get('network_interface', None) - self.applicable_schedule = None - self.expiration_date = kwargs.get('expiration_date', None) - self.allow_claim = kwargs.get('allow_claim', None) - self.storage_type = kwargs.get('storage_type', None) - self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) - self.environment_id = kwargs.get('environment_id', None) - self.data_disk_parameters = kwargs.get('data_disk_parameters', None) - self.schedule_parameters = kwargs.get('schedule_parameters', None) - self.last_known_power_state = kwargs.get('last_known_power_state', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter.py deleted file mode 100644 index db9aad603356..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabVirtualMachineCreationParameter(Model): - """Properties for creating a virtual machine. - - :param bulk_creation_parameters: The number of virtual machine instances - to create. - :type bulk_creation_parameters: - ~azure.mgmt.devtestlabs.models.BulkCreationParameters - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskProperties] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParameters'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(LabVirtualMachineCreationParameter, self).__init__(**kwargs) - self.bulk_creation_parameters = kwargs.get('bulk_creation_parameters', None) - self.notes = kwargs.get('notes', None) - self.owner_object_id = kwargs.get('owner_object_id', None) - self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) - self.created_by_user_id = kwargs.get('created_by_user_id', None) - self.created_by_user = kwargs.get('created_by_user', None) - self.created_date = kwargs.get('created_date', None) - self.compute_id = kwargs.get('compute_id', None) - self.custom_image_id = kwargs.get('custom_image_id', None) - self.os_type = kwargs.get('os_type', None) - self.size = kwargs.get('size', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.ssh_key = kwargs.get('ssh_key', None) - self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) - self.fqdn = kwargs.get('fqdn', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) - self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) - self.artifacts = kwargs.get('artifacts', None) - self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) - self.gallery_image_reference = kwargs.get('gallery_image_reference', None) - self.plan_id = kwargs.get('plan_id', None) - self.network_interface = kwargs.get('network_interface', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.allow_claim = kwargs.get('allow_claim', None) - self.storage_type = kwargs.get('storage_type', None) - self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) - self.environment_id = kwargs.get('environment_id', None) - self.data_disk_parameters = kwargs.get('data_disk_parameters', None) - self.schedule_parameters = kwargs.get('schedule_parameters', None) - self.last_known_power_state = kwargs.get('last_known_power_state', None) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment.py deleted file mode 100644 index 2a58002ea2bf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabVirtualMachineCreationParameterFragment(Model): - """Properties for creating a virtual machine. - - :param bulk_creation_parameters: The number of virtual machine instances - to create. - :type bulk_creation_parameters: - ~azure.mgmt.devtestlabs.models.BulkCreationParametersFragment - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParametersFragment'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(LabVirtualMachineCreationParameterFragment, self).__init__(**kwargs) - self.bulk_creation_parameters = kwargs.get('bulk_creation_parameters', None) - self.notes = kwargs.get('notes', None) - self.owner_object_id = kwargs.get('owner_object_id', None) - self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) - self.created_by_user_id = kwargs.get('created_by_user_id', None) - self.created_by_user = kwargs.get('created_by_user', None) - self.created_date = kwargs.get('created_date', None) - self.compute_id = kwargs.get('compute_id', None) - self.custom_image_id = kwargs.get('custom_image_id', None) - self.os_type = kwargs.get('os_type', None) - self.size = kwargs.get('size', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.ssh_key = kwargs.get('ssh_key', None) - self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) - self.fqdn = kwargs.get('fqdn', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) - self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) - self.artifacts = kwargs.get('artifacts', None) - self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) - self.gallery_image_reference = kwargs.get('gallery_image_reference', None) - self.plan_id = kwargs.get('plan_id', None) - self.network_interface = kwargs.get('network_interface', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.allow_claim = kwargs.get('allow_claim', None) - self.storage_type = kwargs.get('storage_type', None) - self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) - self.environment_id = kwargs.get('environment_id', None) - self.data_disk_parameters = kwargs.get('data_disk_parameters', None) - self.schedule_parameters = kwargs.get('schedule_parameters', None) - self.last_known_power_state = kwargs.get('last_known_power_state', None) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment_py3.py deleted file mode 100644 index d583a499210f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment_py3.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabVirtualMachineCreationParameterFragment(Model): - """Properties for creating a virtual machine. - - :param bulk_creation_parameters: The number of virtual machine instances - to create. - :type bulk_creation_parameters: - ~azure.mgmt.devtestlabs.models.BulkCreationParametersFragment - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParametersFragment'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, bulk_creation_parameters=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: - super(LabVirtualMachineCreationParameterFragment, self).__init__(**kwargs) - self.bulk_creation_parameters = bulk_creation_parameters - self.notes = notes - self.owner_object_id = owner_object_id - self.owner_user_principal_name = owner_user_principal_name - self.created_by_user_id = created_by_user_id - self.created_by_user = created_by_user - self.created_date = created_date - self.compute_id = compute_id - self.custom_image_id = custom_image_id - self.os_type = os_type - self.size = size - self.user_name = user_name - self.password = password - self.ssh_key = ssh_key - self.is_authentication_with_ssh_key = is_authentication_with_ssh_key - self.fqdn = fqdn - self.lab_subnet_name = lab_subnet_name - self.lab_virtual_network_id = lab_virtual_network_id - self.disallow_public_ip_address = disallow_public_ip_address - self.artifacts = artifacts - self.artifact_deployment_status = artifact_deployment_status - self.gallery_image_reference = gallery_image_reference - self.plan_id = plan_id - self.network_interface = network_interface - self.expiration_date = expiration_date - self.allow_claim = allow_claim - self.storage_type = storage_type - self.virtual_machine_creation_source = virtual_machine_creation_source - self.environment_id = environment_id - self.data_disk_parameters = data_disk_parameters - self.schedule_parameters = schedule_parameters - self.last_known_power_state = last_known_power_state - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_py3.py deleted file mode 100644 index f6df337a6179..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_py3.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabVirtualMachineCreationParameter(Model): - """Properties for creating a virtual machine. - - :param bulk_creation_parameters: The number of virtual machine instances - to create. - :type bulk_creation_parameters: - ~azure.mgmt.devtestlabs.models.BulkCreationParameters - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskProperties] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParameters'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, bulk_creation_parameters=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: - super(LabVirtualMachineCreationParameter, self).__init__(**kwargs) - self.bulk_creation_parameters = bulk_creation_parameters - self.notes = notes - self.owner_object_id = owner_object_id - self.owner_user_principal_name = owner_user_principal_name - self.created_by_user_id = created_by_user_id - self.created_by_user = created_by_user - self.created_date = created_date - self.compute_id = compute_id - self.custom_image_id = custom_image_id - self.os_type = os_type - self.size = size - self.user_name = user_name - self.password = password - self.ssh_key = ssh_key - self.is_authentication_with_ssh_key = is_authentication_with_ssh_key - self.fqdn = fqdn - self.lab_subnet_name = lab_subnet_name - self.lab_virtual_network_id = lab_virtual_network_id - self.disallow_public_ip_address = disallow_public_ip_address - self.artifacts = artifacts - self.artifact_deployment_status = artifact_deployment_status - self.gallery_image_reference = gallery_image_reference - self.plan_id = plan_id - self.network_interface = network_interface - self.expiration_date = expiration_date - self.allow_claim = allow_claim - self.storage_type = storage_type - self.virtual_machine_creation_source = virtual_machine_creation_source - self.environment_id = environment_id - self.data_disk_parameters = data_disk_parameters - self.schedule_parameters = schedule_parameters - self.last_known_power_state = last_known_power_state - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment.py deleted file mode 100644 index 132affe5f1ba..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment.py +++ /dev/null @@ -1,177 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class LabVirtualMachineFragment(UpdateResource): - """A virtual machine. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabVirtualMachineFragment, self).__init__(**kwargs) - self.notes = kwargs.get('notes', None) - self.owner_object_id = kwargs.get('owner_object_id', None) - self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) - self.created_by_user_id = kwargs.get('created_by_user_id', None) - self.created_by_user = kwargs.get('created_by_user', None) - self.created_date = kwargs.get('created_date', None) - self.compute_id = kwargs.get('compute_id', None) - self.custom_image_id = kwargs.get('custom_image_id', None) - self.os_type = kwargs.get('os_type', None) - self.size = kwargs.get('size', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.ssh_key = kwargs.get('ssh_key', None) - self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) - self.fqdn = kwargs.get('fqdn', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) - self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) - self.artifacts = kwargs.get('artifacts', None) - self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) - self.gallery_image_reference = kwargs.get('gallery_image_reference', None) - self.plan_id = kwargs.get('plan_id', None) - self.network_interface = kwargs.get('network_interface', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.allow_claim = kwargs.get('allow_claim', None) - self.storage_type = kwargs.get('storage_type', None) - self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) - self.environment_id = kwargs.get('environment_id', None) - self.data_disk_parameters = kwargs.get('data_disk_parameters', None) - self.schedule_parameters = kwargs.get('schedule_parameters', None) - self.last_known_power_state = kwargs.get('last_known_power_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment_py3.py deleted file mode 100644 index 11dca443d47b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment_py3.py +++ /dev/null @@ -1,177 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class LabVirtualMachineFragment(UpdateResource): - """A virtual machine. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - } - - def __init__(self, *, tags=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, **kwargs) -> None: - super(LabVirtualMachineFragment, self).__init__(tags=tags, **kwargs) - self.notes = notes - self.owner_object_id = owner_object_id - self.owner_user_principal_name = owner_user_principal_name - self.created_by_user_id = created_by_user_id - self.created_by_user = created_by_user - self.created_date = created_date - self.compute_id = compute_id - self.custom_image_id = custom_image_id - self.os_type = os_type - self.size = size - self.user_name = user_name - self.password = password - self.ssh_key = ssh_key - self.is_authentication_with_ssh_key = is_authentication_with_ssh_key - self.fqdn = fqdn - self.lab_subnet_name = lab_subnet_name - self.lab_virtual_network_id = lab_virtual_network_id - self.disallow_public_ip_address = disallow_public_ip_address - self.artifacts = artifacts - self.artifact_deployment_status = artifact_deployment_status - self.gallery_image_reference = gallery_image_reference - self.plan_id = plan_id - self.network_interface = network_interface - self.expiration_date = expiration_date - self.allow_claim = allow_claim - self.storage_type = storage_type - self.virtual_machine_creation_source = virtual_machine_creation_source - self.environment_id = environment_id - self.data_disk_parameters = data_disk_parameters - self.schedule_parameters = schedule_parameters - self.last_known_power_state = last_known_power_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_paged.py deleted file mode 100644 index 08e2d31e58dc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class LabVirtualMachinePaged(Paged): - """ - A paging container for iterating over a list of :class:`LabVirtualMachine ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[LabVirtualMachine]'} - } - - def __init__(self, *args, **kwargs): - - super(LabVirtualMachinePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_py3.py deleted file mode 100644 index 354acb458cc9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_py3.py +++ /dev/null @@ -1,221 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class LabVirtualMachine(Resource): - """A virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :ivar compute_vm: The compute virtual machine properties. - :vartype compute_vm: ~azure.mgmt.devtestlabs.models.ComputeVmProperties - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties - :ivar applicable_schedule: The applicable schedule for the virtual - machine. - :vartype applicable_schedule: - ~azure.mgmt.devtestlabs.models.ApplicableSchedule - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskProperties] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'compute_vm': {'readonly': True}, - 'applicable_schedule': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'compute_vm': {'key': 'properties.computeVm', 'type': 'ComputeVmProperties'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, - 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, **kwargs) -> None: - super(LabVirtualMachine, self).__init__(location=location, tags=tags, **kwargs) - self.notes = notes - self.owner_object_id = owner_object_id - self.owner_user_principal_name = owner_user_principal_name - self.created_by_user_id = created_by_user_id - self.created_by_user = created_by_user - self.created_date = created_date - self.compute_id = compute_id - self.custom_image_id = custom_image_id - self.os_type = os_type - self.size = size - self.user_name = user_name - self.password = password - self.ssh_key = ssh_key - self.is_authentication_with_ssh_key = is_authentication_with_ssh_key - self.fqdn = fqdn - self.lab_subnet_name = lab_subnet_name - self.lab_virtual_network_id = lab_virtual_network_id - self.disallow_public_ip_address = disallow_public_ip_address - self.artifacts = artifacts - self.artifact_deployment_status = artifact_deployment_status - self.gallery_image_reference = gallery_image_reference - self.plan_id = plan_id - self.compute_vm = None - self.network_interface = network_interface - self.applicable_schedule = None - self.expiration_date = expiration_date - self.allow_claim = allow_claim - self.storage_type = storage_type - self.virtual_machine_creation_source = virtual_machine_creation_source - self.environment_id = environment_id - self.data_disk_parameters = data_disk_parameters - self.schedule_parameters = schedule_parameters - self.last_known_power_state = last_known_power_state - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info.py deleted file mode 100644 index 70154219e989..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxOsInfo(Model): - """Information about a Linux OS. - - :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, - DeprovisionRequested, DeprovisionApplied). Possible values include: - 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' - :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState - """ - - _attribute_map = { - 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LinuxOsInfo, self).__init__(**kwargs) - self.linux_os_state = kwargs.get('linux_os_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment.py deleted file mode 100644 index a7b98b278ea7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxOsInfoFragment(Model): - """Information about a Linux OS. - - :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, - DeprovisionRequested, DeprovisionApplied). Possible values include: - 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' - :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState - """ - - _attribute_map = { - 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LinuxOsInfoFragment, self).__init__(**kwargs) - self.linux_os_state = kwargs.get('linux_os_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment_py3.py deleted file mode 100644 index b8b4919c8eab..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxOsInfoFragment(Model): - """Information about a Linux OS. - - :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, - DeprovisionRequested, DeprovisionApplied). Possible values include: - 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' - :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState - """ - - _attribute_map = { - 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, - } - - def __init__(self, *, linux_os_state=None, **kwargs) -> None: - super(LinuxOsInfoFragment, self).__init__(**kwargs) - self.linux_os_state = linux_os_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_py3.py deleted file mode 100644 index a8176b7be240..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxOsInfo(Model): - """Information about a Linux OS. - - :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, - DeprovisionRequested, DeprovisionApplied). Possible values include: - 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' - :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState - """ - - _attribute_map = { - 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, - } - - def __init__(self, *, linux_os_state=None, **kwargs) -> None: - super(LinuxOsInfo, self).__init__(**kwargs) - self.linux_os_state = linux_os_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties.py deleted file mode 100644 index 67bd4ee0a9fc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkInterfaceProperties(Model): - """Properties of a network interface. - - :param virtual_network_id: The resource ID of the virtual network. - :type virtual_network_id: str - :param subnet_id: The resource ID of the sub net. - :type subnet_id: str - :param public_ip_address_id: The resource ID of the public IP address. - :type public_ip_address_id: str - :param public_ip_address: The public IP address. - :type public_ip_address: str - :param private_ip_address: The private IP address. - :type private_ip_address: str - :param dns_name: The DNS name. - :type dns_name: str - :param rdp_authority: The RdpAuthority property is a server DNS host name - or IP address followed by the service port number for RDP (Remote Desktop - Protocol). - :type rdp_authority: str - :param ssh_authority: The SshAuthority property is a server DNS host name - or IP address followed by the service port number for SSH. - :type ssh_authority: str - :param shared_public_ip_address_configuration: The configuration for - sharing a public IP address across multiple virtual machines. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfiguration - """ - - _attribute_map = { - 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, - 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, - 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, - 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfiguration'}, - } - - def __init__(self, **kwargs): - super(NetworkInterfaceProperties, self).__init__(**kwargs) - self.virtual_network_id = kwargs.get('virtual_network_id', None) - self.subnet_id = kwargs.get('subnet_id', None) - self.public_ip_address_id = kwargs.get('public_ip_address_id', None) - self.public_ip_address = kwargs.get('public_ip_address', None) - self.private_ip_address = kwargs.get('private_ip_address', None) - self.dns_name = kwargs.get('dns_name', None) - self.rdp_authority = kwargs.get('rdp_authority', None) - self.ssh_authority = kwargs.get('ssh_authority', None) - self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment.py deleted file mode 100644 index e42965548e38..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkInterfacePropertiesFragment(Model): - """Properties of a network interface. - - :param virtual_network_id: The resource ID of the virtual network. - :type virtual_network_id: str - :param subnet_id: The resource ID of the sub net. - :type subnet_id: str - :param public_ip_address_id: The resource ID of the public IP address. - :type public_ip_address_id: str - :param public_ip_address: The public IP address. - :type public_ip_address: str - :param private_ip_address: The private IP address. - :type private_ip_address: str - :param dns_name: The DNS name. - :type dns_name: str - :param rdp_authority: The RdpAuthority property is a server DNS host name - or IP address followed by the service port number for RDP (Remote Desktop - Protocol). - :type rdp_authority: str - :param ssh_authority: The SshAuthority property is a server DNS host name - or IP address followed by the service port number for SSH. - :type ssh_authority: str - :param shared_public_ip_address_configuration: The configuration for - sharing a public IP address across multiple virtual machines. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfigurationFragment - """ - - _attribute_map = { - 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, - 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, - 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, - 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfigurationFragment'}, - } - - def __init__(self, **kwargs): - super(NetworkInterfacePropertiesFragment, self).__init__(**kwargs) - self.virtual_network_id = kwargs.get('virtual_network_id', None) - self.subnet_id = kwargs.get('subnet_id', None) - self.public_ip_address_id = kwargs.get('public_ip_address_id', None) - self.public_ip_address = kwargs.get('public_ip_address', None) - self.private_ip_address = kwargs.get('private_ip_address', None) - self.dns_name = kwargs.get('dns_name', None) - self.rdp_authority = kwargs.get('rdp_authority', None) - self.ssh_authority = kwargs.get('ssh_authority', None) - self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment_py3.py deleted file mode 100644 index 87854401d799..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkInterfacePropertiesFragment(Model): - """Properties of a network interface. - - :param virtual_network_id: The resource ID of the virtual network. - :type virtual_network_id: str - :param subnet_id: The resource ID of the sub net. - :type subnet_id: str - :param public_ip_address_id: The resource ID of the public IP address. - :type public_ip_address_id: str - :param public_ip_address: The public IP address. - :type public_ip_address: str - :param private_ip_address: The private IP address. - :type private_ip_address: str - :param dns_name: The DNS name. - :type dns_name: str - :param rdp_authority: The RdpAuthority property is a server DNS host name - or IP address followed by the service port number for RDP (Remote Desktop - Protocol). - :type rdp_authority: str - :param ssh_authority: The SshAuthority property is a server DNS host name - or IP address followed by the service port number for SSH. - :type ssh_authority: str - :param shared_public_ip_address_configuration: The configuration for - sharing a public IP address across multiple virtual machines. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfigurationFragment - """ - - _attribute_map = { - 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, - 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, - 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, - 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfigurationFragment'}, - } - - def __init__(self, *, virtual_network_id: str=None, subnet_id: str=None, public_ip_address_id: str=None, public_ip_address: str=None, private_ip_address: str=None, dns_name: str=None, rdp_authority: str=None, ssh_authority: str=None, shared_public_ip_address_configuration=None, **kwargs) -> None: - super(NetworkInterfacePropertiesFragment, self).__init__(**kwargs) - self.virtual_network_id = virtual_network_id - self.subnet_id = subnet_id - self.public_ip_address_id = public_ip_address_id - self.public_ip_address = public_ip_address - self.private_ip_address = private_ip_address - self.dns_name = dns_name - self.rdp_authority = rdp_authority - self.ssh_authority = ssh_authority - self.shared_public_ip_address_configuration = shared_public_ip_address_configuration diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_py3.py deleted file mode 100644 index c68daf4e897b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkInterfaceProperties(Model): - """Properties of a network interface. - - :param virtual_network_id: The resource ID of the virtual network. - :type virtual_network_id: str - :param subnet_id: The resource ID of the sub net. - :type subnet_id: str - :param public_ip_address_id: The resource ID of the public IP address. - :type public_ip_address_id: str - :param public_ip_address: The public IP address. - :type public_ip_address: str - :param private_ip_address: The private IP address. - :type private_ip_address: str - :param dns_name: The DNS name. - :type dns_name: str - :param rdp_authority: The RdpAuthority property is a server DNS host name - or IP address followed by the service port number for RDP (Remote Desktop - Protocol). - :type rdp_authority: str - :param ssh_authority: The SshAuthority property is a server DNS host name - or IP address followed by the service port number for SSH. - :type ssh_authority: str - :param shared_public_ip_address_configuration: The configuration for - sharing a public IP address across multiple virtual machines. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfiguration - """ - - _attribute_map = { - 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, - 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, - 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, - 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfiguration'}, - } - - def __init__(self, *, virtual_network_id: str=None, subnet_id: str=None, public_ip_address_id: str=None, public_ip_address: str=None, private_ip_address: str=None, dns_name: str=None, rdp_authority: str=None, ssh_authority: str=None, shared_public_ip_address_configuration=None, **kwargs) -> None: - super(NetworkInterfaceProperties, self).__init__(**kwargs) - self.virtual_network_id = virtual_network_id - self.subnet_id = subnet_id - self.public_ip_address_id = public_ip_address_id - self.public_ip_address = public_ip_address - self.private_ip_address = private_ip_address - self.dns_name = dns_name - self.rdp_authority = rdp_authority - self.ssh_authority = ssh_authority - self.shared_public_ip_address_configuration = shared_public_ip_address_configuration diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel.py deleted file mode 100644 index 7132c4436c6e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class NotificationChannel(Resource): - """A notification. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param web_hook_url: The webhook URL to send notifications to. - :type web_hook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - :param description: Description of notification. - :type description: str - :param events: The list of event for which this notification is enabled. - :type events: list[~azure.mgmt.devtestlabs.models.Event] - :ivar created_date: The creation date of the notification channel. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'events': {'key': 'properties.events', 'type': '[Event]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NotificationChannel, self).__init__(**kwargs) - self.web_hook_url = kwargs.get('web_hook_url', None) - self.email_recipient = kwargs.get('email_recipient', None) - self.notification_locale = kwargs.get('notification_locale', None) - self.description = kwargs.get('description', None) - self.events = kwargs.get('events', None) - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment.py deleted file mode 100644 index 588dee5b2395..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class NotificationChannelFragment(UpdateResource): - """A notification. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param web_hook_url: The webhook URL to send notifications to. - :type web_hook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - :param description: Description of notification. - :type description: str - :param events: The list of event for which this notification is enabled. - :type events: list[~azure.mgmt.devtestlabs.models.EventFragment] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'events': {'key': 'properties.events', 'type': '[EventFragment]'}, - } - - def __init__(self, **kwargs): - super(NotificationChannelFragment, self).__init__(**kwargs) - self.web_hook_url = kwargs.get('web_hook_url', None) - self.email_recipient = kwargs.get('email_recipient', None) - self.notification_locale = kwargs.get('notification_locale', None) - self.description = kwargs.get('description', None) - self.events = kwargs.get('events', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment_py3.py deleted file mode 100644 index a7179388c512..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class NotificationChannelFragment(UpdateResource): - """A notification. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param web_hook_url: The webhook URL to send notifications to. - :type web_hook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - :param description: Description of notification. - :type description: str - :param events: The list of event for which this notification is enabled. - :type events: list[~azure.mgmt.devtestlabs.models.EventFragment] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'events': {'key': 'properties.events', 'type': '[EventFragment]'}, - } - - def __init__(self, *, tags=None, web_hook_url: str=None, email_recipient: str=None, notification_locale: str=None, description: str=None, events=None, **kwargs) -> None: - super(NotificationChannelFragment, self).__init__(tags=tags, **kwargs) - self.web_hook_url = web_hook_url - self.email_recipient = email_recipient - self.notification_locale = notification_locale - self.description = description - self.events = events diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_paged.py deleted file mode 100644 index 9a74839b31a1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class NotificationChannelPaged(Paged): - """ - A paging container for iterating over a list of :class:`NotificationChannel ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[NotificationChannel]'} - } - - def __init__(self, *args, **kwargs): - - super(NotificationChannelPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_py3.py deleted file mode 100644 index 08a0f47db1da..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_py3.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class NotificationChannel(Resource): - """A notification. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param web_hook_url: The webhook URL to send notifications to. - :type web_hook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - :param description: Description of notification. - :type description: str - :param events: The list of event for which this notification is enabled. - :type events: list[~azure.mgmt.devtestlabs.models.Event] - :ivar created_date: The creation date of the notification channel. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'events': {'key': 'properties.events', 'type': '[Event]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, web_hook_url: str=None, email_recipient: str=None, notification_locale: str=None, description: str=None, events=None, **kwargs) -> None: - super(NotificationChannel, self).__init__(location=location, tags=tags, **kwargs) - self.web_hook_url = web_hook_url - self.email_recipient = email_recipient - self.notification_locale = notification_locale - self.description = description - self.events = events - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings.py deleted file mode 100644 index 656eae9f9cb4..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NotificationSettings(Model): - """Notification settings for a schedule. - - :param status: If notifications are enabled for this schedule (i.e. - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param time_in_minutes: Time in minutes before event at which notification - will be sent. - :type time_in_minutes: int - :param webhook_url: The webhook URL to which the notification will be - sent. - :type webhook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, - 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NotificationSettings, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.time_in_minutes = kwargs.get('time_in_minutes', None) - self.webhook_url = kwargs.get('webhook_url', None) - self.email_recipient = kwargs.get('email_recipient', None) - self.notification_locale = kwargs.get('notification_locale', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.py deleted file mode 100644 index bc707e6ecfe7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NotificationSettingsFragment(Model): - """Notification settings for a schedule. - - :param status: If notifications are enabled for this schedule (i.e. - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param time_in_minutes: Time in minutes before event at which notification - will be sent. - :type time_in_minutes: int - :param webhook_url: The webhook URL to which the notification will be - sent. - :type webhook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, - 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NotificationSettingsFragment, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.time_in_minutes = kwargs.get('time_in_minutes', None) - self.webhook_url = kwargs.get('webhook_url', None) - self.email_recipient = kwargs.get('email_recipient', None) - self.notification_locale = kwargs.get('notification_locale', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment_py3.py deleted file mode 100644 index 260ce034f89d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NotificationSettingsFragment(Model): - """Notification settings for a schedule. - - :param status: If notifications are enabled for this schedule (i.e. - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param time_in_minutes: Time in minutes before event at which notification - will be sent. - :type time_in_minutes: int - :param webhook_url: The webhook URL to which the notification will be - sent. - :type webhook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, - 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, - } - - def __init__(self, *, status=None, time_in_minutes: int=None, webhook_url: str=None, email_recipient: str=None, notification_locale: str=None, **kwargs) -> None: - super(NotificationSettingsFragment, self).__init__(**kwargs) - self.status = status - self.time_in_minutes = time_in_minutes - self.webhook_url = webhook_url - self.email_recipient = email_recipient - self.notification_locale = notification_locale diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_py3.py deleted file mode 100644 index 66c77b99768a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NotificationSettings(Model): - """Notification settings for a schedule. - - :param status: If notifications are enabled for this schedule (i.e. - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param time_in_minutes: Time in minutes before event at which notification - will be sent. - :type time_in_minutes: int - :param webhook_url: The webhook URL to which the notification will be - sent. - :type webhook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, - 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, - } - - def __init__(self, *, status=None, time_in_minutes: int=None, webhook_url: str=None, email_recipient: str=None, notification_locale: str=None, **kwargs) -> None: - super(NotificationSettings, self).__init__(**kwargs) - self.status = status - self.time_in_minutes = time_in_minutes - self.webhook_url = webhook_url - self.email_recipient = email_recipient - self.notification_locale = notification_locale diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters.py deleted file mode 100644 index 8adc994f1e40..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NotifyParameters(Model): - """Properties for generating a Notification. - - :param event_name: The type of event (i.e. AutoShutdown, Cost). Possible - values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - :param json_payload: Properties for the notification in json format. - :type json_payload: str - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - 'json_payload': {'key': 'jsonPayload', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NotifyParameters, self).__init__(**kwargs) - self.event_name = kwargs.get('event_name', None) - self.json_payload = kwargs.get('json_payload', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters_py3.py deleted file mode 100644 index 40b8e900f189..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NotifyParameters(Model): - """Properties for generating a Notification. - - :param event_name: The type of event (i.e. AutoShutdown, Cost). Possible - values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - :param json_payload: Properties for the notification in json format. - :type json_payload: str - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - 'json_payload': {'key': 'jsonPayload', 'type': 'str'}, - } - - def __init__(self, *, event_name=None, json_payload: str=None, **kwargs) -> None: - super(NotifyParameters, self).__init__(**kwargs) - self.event_name = event_name - self.json_payload = json_payload diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error.py deleted file mode 100644 index 5ee1f80b2712..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationError(Model): - """Error details for the operation in case of a failure. - - :param code: The error code of the operation error. - :type code: str - :param message: The error message of the operation error. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationError, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error_py3.py deleted file mode 100644 index 19c57b944297..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationError(Model): - """Error details for the operation in case of a failure. - - :param code: The error code of the operation error. - :type code: str - :param message: The error message of the operation error. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: - super(OperationError, self).__init__(**kwargs) - self.code = code - self.message = message diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata.py deleted file mode 100644 index 3551895bd8c6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationMetadata(Model): - """The REST API operation supported by DevTestLab ResourceProvider. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: The object that describes the operations - :type display: ~azure.mgmt.devtestlabs.models.OperationMetadataDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationMetadataDisplay'}, - } - - def __init__(self, **kwargs): - super(OperationMetadata, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display.py deleted file mode 100644 index c20b0b519d3e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationMetadataDisplay(Model): - """The object that describes the operations. - - :param provider: Friendly name of the resource provider - :type provider: str - :param resource: Resource type on which the operation is performed. - :type resource: str - :param operation: Operation type: read, write, delete, listKeys/action, - etc. - :type operation: str - :param description: Friendly name of the operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationMetadataDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display_py3.py deleted file mode 100644 index a566cc55bfe8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationMetadataDisplay(Model): - """The object that describes the operations. - - :param provider: Friendly name of the resource provider - :type provider: str - :param resource: Resource type on which the operation is performed. - :type resource: str - :param operation: Operation type: read, write, delete, listKeys/action, - etc. - :type operation: str - :param description: Friendly name of the operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - super(OperationMetadataDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_paged.py deleted file mode 100644 index f0fa25a37bed..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationMetadataPaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationMetadata ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationMetadata]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationMetadataPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_py3.py deleted file mode 100644 index c1f8e2997f51..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationMetadata(Model): - """The REST API operation supported by DevTestLab ResourceProvider. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: The object that describes the operations - :type display: ~azure.mgmt.devtestlabs.models.OperationMetadataDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationMetadataDisplay'}, - } - - def __init__(self, *, name: str=None, display=None, **kwargs) -> None: - super(OperationMetadata, self).__init__(**kwargs) - self.name = name - self.display = display diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result.py deleted file mode 100644 index 90f43aa80f9f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationResult(Model): - """An Operation Result. - - :param status: The operation status. - :type status: str - :param status_code: The status code for the operation. Possible values - include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', - 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', - 'PartialContent', 'MultipleChoices', 'MovedPermanently', 'Redirect', - 'SeeOther', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', - 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', - 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', - 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', - 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', - 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', - 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', - 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', - 'HttpVersionNotSupported' - :type status_code: str or ~azure.mgmt.devtestlabs.models.HttpStatusCode - :param error: Error details for the operation in case of a failure. - :type error: ~azure.mgmt.devtestlabs.models.OperationError - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'status_code': {'key': 'statusCode', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'OperationError'}, - } - - def __init__(self, **kwargs): - super(OperationResult, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.status_code = kwargs.get('status_code', None) - self.error = kwargs.get('error', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result_py3.py deleted file mode 100644 index cb371c521fb0..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationResult(Model): - """An Operation Result. - - :param status: The operation status. - :type status: str - :param status_code: The status code for the operation. Possible values - include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', - 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', - 'PartialContent', 'MultipleChoices', 'MovedPermanently', 'Redirect', - 'SeeOther', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', - 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', - 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', - 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', - 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', - 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', - 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', - 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', - 'HttpVersionNotSupported' - :type status_code: str or ~azure.mgmt.devtestlabs.models.HttpStatusCode - :param error: Error details for the operation in case of a failure. - :type error: ~azure.mgmt.devtestlabs.models.OperationError - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'status_code': {'key': 'statusCode', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'OperationError'}, - } - - def __init__(self, *, status: str=None, status_code=None, error=None, **kwargs) -> None: - super(OperationResult, self).__init__(**kwargs) - self.status = status - self.status_code = status_code - self.error = error diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info.py deleted file mode 100644 index 6e1972e6eace..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ParameterInfo(Model): - """Information about an artifact's parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ParameterInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info_py3.py deleted file mode 100644 index f35b39ef3fe4..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ParameterInfo(Model): - """Information about an artifact's parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: - super(ParameterInfo, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info.py deleted file mode 100644 index a671306eac1c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ParametersValueFileInfo(Model): - """A file containing a set of parameter values for an ARM template. - - :param file_name: File name. - :type file_name: str - :param parameters_value_info: Contents of the file. - :type parameters_value_info: object - """ - - _attribute_map = { - 'file_name': {'key': 'fileName', 'type': 'str'}, - 'parameters_value_info': {'key': 'parametersValueInfo', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ParametersValueFileInfo, self).__init__(**kwargs) - self.file_name = kwargs.get('file_name', None) - self.parameters_value_info = kwargs.get('parameters_value_info', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info_py3.py deleted file mode 100644 index fcbc00df3f23..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ParametersValueFileInfo(Model): - """A file containing a set of parameter values for an ARM template. - - :param file_name: File name. - :type file_name: str - :param parameters_value_info: Contents of the file. - :type parameters_value_info: object - """ - - _attribute_map = { - 'file_name': {'key': 'fileName', 'type': 'str'}, - 'parameters_value_info': {'key': 'parametersValueInfo', 'type': 'object'}, - } - - def __init__(self, *, file_name: str=None, parameters_value_info=None, **kwargs) -> None: - super(ParametersValueFileInfo, self).__init__(**kwargs) - self.file_name = file_name - self.parameters_value_info = parameters_value_info diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties.py deleted file mode 100644 index 73de17d9ee24..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PercentageCostThresholdProperties(Model): - """Properties of a percentage cost threshold. - - :param threshold_value: The cost threshold value. - :type threshold_value: float - """ - - _attribute_map = { - 'threshold_value': {'key': 'thresholdValue', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(PercentageCostThresholdProperties, self).__init__(**kwargs) - self.threshold_value = kwargs.get('threshold_value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties_py3.py deleted file mode 100644 index 22ae6e7d274c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PercentageCostThresholdProperties(Model): - """Properties of a percentage cost threshold. - - :param threshold_value: The cost threshold value. - :type threshold_value: float - """ - - _attribute_map = { - 'threshold_value': {'key': 'thresholdValue', 'type': 'float'}, - } - - def __init__(self, *, threshold_value: float=None, **kwargs) -> None: - super(PercentageCostThresholdProperties, self).__init__(**kwargs) - self.threshold_value = threshold_value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy.py deleted file mode 100644 index 96719fffb5d7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Policy(Resource): - """A Policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the policy. - :type description: str - :param status: The status of the policy. Possible values include: - 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus - :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, - MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', - 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', - 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', - 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' - :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName - :param fact_data: The fact data of the policy. - :type fact_data: str - :param threshold: The threshold of the policy (i.e. a number for - MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). - :type threshold: str - :param evaluator_type: The evaluator type of the policy (i.e. - AllowedValuesPolicy, MaxValuePolicy). Possible values include: - 'AllowedValuesPolicy', 'MaxValuePolicy' - :type evaluator_type: str or - ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType - :ivar created_date: The creation date of the policy. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'fact_name': {'key': 'properties.factName', 'type': 'str'}, - 'fact_data': {'key': 'properties.factData', 'type': 'str'}, - 'threshold': {'key': 'properties.threshold', 'type': 'str'}, - 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Policy, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.status = kwargs.get('status', None) - self.fact_name = kwargs.get('fact_name', None) - self.fact_data = kwargs.get('fact_data', None) - self.threshold = kwargs.get('threshold', None) - self.evaluator_type = kwargs.get('evaluator_type', None) - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment.py deleted file mode 100644 index 4d240945e5a7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class PolicyFragment(UpdateResource): - """A Policy. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the policy. - :type description: str - :param status: The status of the policy. Possible values include: - 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus - :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, - MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', - 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', - 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', - 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' - :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName - :param fact_data: The fact data of the policy. - :type fact_data: str - :param threshold: The threshold of the policy (i.e. a number for - MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). - :type threshold: str - :param evaluator_type: The evaluator type of the policy (i.e. - AllowedValuesPolicy, MaxValuePolicy). Possible values include: - 'AllowedValuesPolicy', 'MaxValuePolicy' - :type evaluator_type: str or - ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'fact_name': {'key': 'properties.factName', 'type': 'str'}, - 'fact_data': {'key': 'properties.factData', 'type': 'str'}, - 'threshold': {'key': 'properties.threshold', 'type': 'str'}, - 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PolicyFragment, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.status = kwargs.get('status', None) - self.fact_name = kwargs.get('fact_name', None) - self.fact_data = kwargs.get('fact_data', None) - self.threshold = kwargs.get('threshold', None) - self.evaluator_type = kwargs.get('evaluator_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment_py3.py deleted file mode 100644 index b10648b0cdc7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class PolicyFragment(UpdateResource): - """A Policy. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the policy. - :type description: str - :param status: The status of the policy. Possible values include: - 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus - :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, - MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', - 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', - 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', - 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' - :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName - :param fact_data: The fact data of the policy. - :type fact_data: str - :param threshold: The threshold of the policy (i.e. a number for - MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). - :type threshold: str - :param evaluator_type: The evaluator type of the policy (i.e. - AllowedValuesPolicy, MaxValuePolicy). Possible values include: - 'AllowedValuesPolicy', 'MaxValuePolicy' - :type evaluator_type: str or - ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'fact_name': {'key': 'properties.factName', 'type': 'str'}, - 'fact_data': {'key': 'properties.factData', 'type': 'str'}, - 'threshold': {'key': 'properties.threshold', 'type': 'str'}, - 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, - } - - def __init__(self, *, tags=None, description: str=None, status=None, fact_name=None, fact_data: str=None, threshold: str=None, evaluator_type=None, **kwargs) -> None: - super(PolicyFragment, self).__init__(tags=tags, **kwargs) - self.description = description - self.status = status - self.fact_name = fact_name - self.fact_data = fact_data - self.threshold = threshold - self.evaluator_type = evaluator_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_paged.py deleted file mode 100644 index 6ef7f073726e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class PolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`Policy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Policy]'} - } - - def __init__(self, *args, **kwargs): - - super(PolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_py3.py deleted file mode 100644 index 1bfd40ab2402..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Policy(Resource): - """A Policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the policy. - :type description: str - :param status: The status of the policy. Possible values include: - 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus - :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, - MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', - 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', - 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', - 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' - :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName - :param fact_data: The fact data of the policy. - :type fact_data: str - :param threshold: The threshold of the policy (i.e. a number for - MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). - :type threshold: str - :param evaluator_type: The evaluator type of the policy (i.e. - AllowedValuesPolicy, MaxValuePolicy). Possible values include: - 'AllowedValuesPolicy', 'MaxValuePolicy' - :type evaluator_type: str or - ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType - :ivar created_date: The creation date of the policy. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'fact_name': {'key': 'properties.factName', 'type': 'str'}, - 'fact_data': {'key': 'properties.factData', 'type': 'str'}, - 'threshold': {'key': 'properties.threshold', 'type': 'str'}, - 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, description: str=None, status=None, fact_name=None, fact_data: str=None, threshold: str=None, evaluator_type=None, **kwargs) -> None: - super(Policy, self).__init__(location=location, tags=tags, **kwargs) - self.description = description - self.status = status - self.fact_name = fact_name - self.fact_data = fact_data - self.threshold = threshold - self.evaluator_type = evaluator_type - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result.py deleted file mode 100644 index 3dc1698dc354..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicySetResult(Model): - """Result of a policy set evaluation. - - :param has_error: A value indicating whether this policy set evaluation - has discovered violations. - :type has_error: bool - :param policy_violations: The list of policy violations. - :type policy_violations: - list[~azure.mgmt.devtestlabs.models.PolicyViolation] - """ - - _attribute_map = { - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'policy_violations': {'key': 'policyViolations', 'type': '[PolicyViolation]'}, - } - - def __init__(self, **kwargs): - super(PolicySetResult, self).__init__(**kwargs) - self.has_error = kwargs.get('has_error', None) - self.policy_violations = kwargs.get('policy_violations', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result_py3.py deleted file mode 100644 index 5368647ec498..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicySetResult(Model): - """Result of a policy set evaluation. - - :param has_error: A value indicating whether this policy set evaluation - has discovered violations. - :type has_error: bool - :param policy_violations: The list of policy violations. - :type policy_violations: - list[~azure.mgmt.devtestlabs.models.PolicyViolation] - """ - - _attribute_map = { - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'policy_violations': {'key': 'policyViolations', 'type': '[PolicyViolation]'}, - } - - def __init__(self, *, has_error: bool=None, policy_violations=None, **kwargs) -> None: - super(PolicySetResult, self).__init__(**kwargs) - self.has_error = has_error - self.policy_violations = policy_violations diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation.py deleted file mode 100644 index b8404db70da6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicyViolation(Model): - """Policy violation. - - :param code: The code of the policy violation. - :type code: str - :param message: The message of the policy violation. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PolicyViolation, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation_py3.py deleted file mode 100644 index 8f33f97afeed..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicyViolation(Model): - """Policy violation. - - :param code: The code of the policy violation. - :type code: str - :param message: The message of the policy violation. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: - super(PolicyViolation, self).__init__(**kwargs) - self.code = code - self.message = message diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port.py deleted file mode 100644 index 794610b68871..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Port(Model): - """Properties of a network port. - - :param transport_protocol: Protocol type of the port. Possible values - include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param backend_port: Backend port of the target virtual machine. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(Port, self).__init__(**kwargs) - self.transport_protocol = kwargs.get('transport_protocol', None) - self.backend_port = kwargs.get('backend_port', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment.py deleted file mode 100644 index 60e28efa9dd8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PortFragment(Model): - """Properties of a network port. - - :param transport_protocol: Protocol type of the port. Possible values - include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param backend_port: Backend port of the target virtual machine. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(PortFragment, self).__init__(**kwargs) - self.transport_protocol = kwargs.get('transport_protocol', None) - self.backend_port = kwargs.get('backend_port', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment_py3.py deleted file mode 100644 index dd39e446c5ff..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PortFragment(Model): - """Properties of a network port. - - :param transport_protocol: Protocol type of the port. Possible values - include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param backend_port: Backend port of the target virtual machine. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, *, transport_protocol=None, backend_port: int=None, **kwargs) -> None: - super(PortFragment, self).__init__(**kwargs) - self.transport_protocol = transport_protocol - self.backend_port = backend_port diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_py3.py deleted file mode 100644 index c4b7645a0a18..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Port(Model): - """Properties of a network port. - - :param transport_protocol: Protocol type of the port. Possible values - include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param backend_port: Backend port of the target virtual machine. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, *, transport_protocol=None, backend_port: int=None, **kwargs) -> None: - super(Port, self).__init__(**kwargs) - self.transport_protocol = transport_protocol - self.backend_port = backend_port diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection.py deleted file mode 100644 index 71926d62a621..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RdpConnection(Model): - """Represents a .rdp file. - - :param contents: The contents of the .rdp file - :type contents: str - """ - - _attribute_map = { - 'contents': {'key': 'contents', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RdpConnection, self).__init__(**kwargs) - self.contents = kwargs.get('contents', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection_py3.py deleted file mode 100644 index 3f92de164fea..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RdpConnection(Model): - """Represents a .rdp file. - - :param contents: The contents of the .rdp file - :type contents: str - """ - - _attribute_map = { - 'contents': {'key': 'contents', 'type': 'str'}, - } - - def __init__(self, *, contents: str=None, **kwargs) -> None: - super(RdpConnection, self).__init__(**kwargs) - self.contents = contents diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties.py deleted file mode 100644 index 13725ea5e306..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResizeLabVirtualMachineProperties(Model): - """Request body for resizing a virtual machine. - - :param size: Specifies the size of the virtual machine. - :type size: str - """ - - _attribute_map = { - 'size': {'key': 'size', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResizeLabVirtualMachineProperties, self).__init__(**kwargs) - self.size = kwargs.get('size', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties_py3.py deleted file mode 100644 index 266b19149f7a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResizeLabVirtualMachineProperties(Model): - """Request body for resizing a virtual machine. - - :param size: Specifies the size of the virtual machine. - :type size: str - """ - - _attribute_map = { - 'size': {'key': 'size', 'type': 'str'}, - } - - def __init__(self, *, size: str=None, **kwargs) -> None: - super(ResizeLabVirtualMachineProperties, self).__init__(**kwargs) - self.size = size diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource.py deleted file mode 100644 index f25b57698413..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """An Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource_py3.py deleted file mode 100644 index e59df581aa79..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """An Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties.py deleted file mode 100644 index 210f4a7b2eca..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RetargetScheduleProperties(Model): - """Properties for retargeting a virtual machine schedule. - - :param current_resource_id: The resource Id of the virtual machine on - which the schedule operates - :type current_resource_id: str - :param target_resource_id: The resource Id of the virtual machine that the - schedule should be retargeted to - :type target_resource_id: str - """ - - _attribute_map = { - 'current_resource_id': {'key': 'currentResourceId', 'type': 'str'}, - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RetargetScheduleProperties, self).__init__(**kwargs) - self.current_resource_id = kwargs.get('current_resource_id', None) - self.target_resource_id = kwargs.get('target_resource_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties_py3.py deleted file mode 100644 index debd7258fb28..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RetargetScheduleProperties(Model): - """Properties for retargeting a virtual machine schedule. - - :param current_resource_id: The resource Id of the virtual machine on - which the schedule operates - :type current_resource_id: str - :param target_resource_id: The resource Id of the virtual machine that the - schedule should be retargeted to - :type target_resource_id: str - """ - - _attribute_map = { - 'current_resource_id': {'key': 'currentResourceId', 'type': 'str'}, - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__(self, *, current_resource_id: str=None, target_resource_id: str=None, **kwargs) -> None: - super(RetargetScheduleProperties, self).__init__(**kwargs) - self.current_resource_id = current_resource_id - self.target_resource_id = target_resource_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule.py deleted file mode 100644 index a0c09919fa48..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Schedule(Resource): - """A schedule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettings - :ivar created_date: The creation date of the schedule. - :vartype created_date: datetime - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Schedule, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.task_type = kwargs.get('task_type', None) - self.weekly_recurrence = kwargs.get('weekly_recurrence', None) - self.daily_recurrence = kwargs.get('daily_recurrence', None) - self.hourly_recurrence = kwargs.get('hourly_recurrence', None) - self.time_zone_id = kwargs.get('time_zone_id', None) - self.notification_settings = kwargs.get('notification_settings', None) - self.created_date = None - self.target_resource_id = kwargs.get('target_resource_id', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter.py deleted file mode 100644 index 1eced41c432d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ScheduleCreationParameter(Model): - """Properties for creating a schedule. - - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettings - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ScheduleCreationParameter, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.task_type = kwargs.get('task_type', None) - self.weekly_recurrence = kwargs.get('weekly_recurrence', None) - self.daily_recurrence = kwargs.get('daily_recurrence', None) - self.hourly_recurrence = kwargs.get('hourly_recurrence', None) - self.time_zone_id = kwargs.get('time_zone_id', None) - self.notification_settings = kwargs.get('notification_settings', None) - self.target_resource_id = kwargs.get('target_resource_id', None) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment.py deleted file mode 100644 index e3f67d9d59bf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ScheduleCreationParameterFragment(Model): - """Properties for creating a schedule. - - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: - ~azure.mgmt.devtestlabs.models.WeekDetailsFragment - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: - ~azure.mgmt.devtestlabs.models.HourDetailsFragment - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ScheduleCreationParameterFragment, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.task_type = kwargs.get('task_type', None) - self.weekly_recurrence = kwargs.get('weekly_recurrence', None) - self.daily_recurrence = kwargs.get('daily_recurrence', None) - self.hourly_recurrence = kwargs.get('hourly_recurrence', None) - self.time_zone_id = kwargs.get('time_zone_id', None) - self.notification_settings = kwargs.get('notification_settings', None) - self.target_resource_id = kwargs.get('target_resource_id', None) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment_py3.py deleted file mode 100644 index 47e9ece35bfb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ScheduleCreationParameterFragment(Model): - """Properties for creating a schedule. - - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: - ~azure.mgmt.devtestlabs.models.WeekDetailsFragment - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: - ~azure.mgmt.devtestlabs.models.HourDetailsFragment - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: - super(ScheduleCreationParameterFragment, self).__init__(**kwargs) - self.status = status - self.task_type = task_type - self.weekly_recurrence = weekly_recurrence - self.daily_recurrence = daily_recurrence - self.hourly_recurrence = hourly_recurrence - self.time_zone_id = time_zone_id - self.notification_settings = notification_settings - self.target_resource_id = target_resource_id - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_py3.py deleted file mode 100644 index 8254f67c85be..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_py3.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ScheduleCreationParameter(Model): - """Properties for creating a schedule. - - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettings - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: - super(ScheduleCreationParameter, self).__init__(**kwargs) - self.status = status - self.task_type = task_type - self.weekly_recurrence = weekly_recurrence - self.daily_recurrence = daily_recurrence - self.hourly_recurrence = hourly_recurrence - self.time_zone_id = time_zone_id - self.notification_settings = notification_settings - self.target_resource_id = target_resource_id - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment.py deleted file mode 100644 index 17cb84a52572..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class ScheduleFragment(UpdateResource): - """A schedule. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: - ~azure.mgmt.devtestlabs.models.WeekDetailsFragment - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: - ~azure.mgmt.devtestlabs.models.HourDetailsFragment - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ScheduleFragment, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.task_type = kwargs.get('task_type', None) - self.weekly_recurrence = kwargs.get('weekly_recurrence', None) - self.daily_recurrence = kwargs.get('daily_recurrence', None) - self.hourly_recurrence = kwargs.get('hourly_recurrence', None) - self.time_zone_id = kwargs.get('time_zone_id', None) - self.notification_settings = kwargs.get('notification_settings', None) - self.target_resource_id = kwargs.get('target_resource_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment_py3.py deleted file mode 100644 index a51222b2406e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class ScheduleFragment(UpdateResource): - """A schedule. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: - ~azure.mgmt.devtestlabs.models.WeekDetailsFragment - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: - ~azure.mgmt.devtestlabs.models.HourDetailsFragment - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - } - - def __init__(self, *, tags=None, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, **kwargs) -> None: - super(ScheduleFragment, self).__init__(tags=tags, **kwargs) - self.status = status - self.task_type = task_type - self.weekly_recurrence = weekly_recurrence - self.daily_recurrence = daily_recurrence - self.hourly_recurrence = hourly_recurrence - self.time_zone_id = time_zone_id - self.notification_settings = notification_settings - self.target_resource_id = target_resource_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_paged.py deleted file mode 100644 index 1aa4946ff51e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SchedulePaged(Paged): - """ - A paging container for iterating over a list of :class:`Schedule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Schedule]'} - } - - def __init__(self, *args, **kwargs): - - super(SchedulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_py3.py deleted file mode 100644 index efd16216ef6e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_py3.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Schedule(Resource): - """A schedule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettings - :ivar created_date: The creation date of the schedule. - :vartype created_date: datetime - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, **kwargs) -> None: - super(Schedule, self).__init__(location=location, tags=tags, **kwargs) - self.status = status - self.task_type = task_type - self.weekly_recurrence = weekly_recurrence - self.daily_recurrence = daily_recurrence - self.hourly_recurrence = hourly_recurrence - self.time_zone_id = time_zone_id - self.notification_settings = notification_settings - self.created_date = None - self.target_resource_id = target_resource_id - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret.py deleted file mode 100644 index ae1048a9e9ec..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Secret(Resource): - """A secret. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param value: The value of the secret for secret creation. - :type value: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Secret, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment.py deleted file mode 100644 index 06df551c944b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class SecretFragment(UpdateResource): - """A secret. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param value: The value of the secret for secret creation. - :type value: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SecretFragment, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment_py3.py deleted file mode 100644 index 64907637295e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class SecretFragment(UpdateResource): - """A secret. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param value: The value of the secret for secret creation. - :type value: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - } - - def __init__(self, *, tags=None, value: str=None, **kwargs) -> None: - super(SecretFragment, self).__init__(tags=tags, **kwargs) - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_paged.py deleted file mode 100644 index 1c6a8f295064..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SecretPaged(Paged): - """ - A paging container for iterating over a list of :class:`Secret ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Secret]'} - } - - def __init__(self, *args, **kwargs): - - super(SecretPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_py3.py deleted file mode 100644 index 16b45cb8ccde..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Secret(Resource): - """A secret. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param value: The value of the secret for secret creation. - :type value: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, value: str=None, **kwargs) -> None: - super(Secret, self).__init__(location=location, tags=tags, **kwargs) - self.value = value - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric.py deleted file mode 100644 index e8f46ff06337..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ServiceFabric(Resource): - """A Service Fabric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param external_service_fabric_id: The backing service fabric resource's - id - :type external_service_fabric_id: str - :param environment_id: The resource id of the environment under which the - service fabric resource is present - :type environment_id: str - :ivar applicable_schedule: The applicable schedule for the virtual - machine. - :vartype applicable_schedule: - ~azure.mgmt.devtestlabs.models.ApplicableSchedule - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'applicable_schedule': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceFabric, self).__init__(**kwargs) - self.external_service_fabric_id = kwargs.get('external_service_fabric_id', None) - self.environment_id = kwargs.get('environment_id', None) - self.applicable_schedule = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment.py deleted file mode 100644 index 8feb8f2b0dcd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class ServiceFabricFragment(UpdateResource): - """A Service Fabric. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param external_service_fabric_id: The backing service fabric resource's - id - :type external_service_fabric_id: str - :param environment_id: The resource id of the environment under which the - service fabric resource is present - :type environment_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceFabricFragment, self).__init__(**kwargs) - self.external_service_fabric_id = kwargs.get('external_service_fabric_id', None) - self.environment_id = kwargs.get('environment_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment_py3.py deleted file mode 100644 index a1471c5984ea..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class ServiceFabricFragment(UpdateResource): - """A Service Fabric. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param external_service_fabric_id: The backing service fabric resource's - id - :type external_service_fabric_id: str - :param environment_id: The resource id of the environment under which the - service fabric resource is present - :type environment_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - } - - def __init__(self, *, tags=None, external_service_fabric_id: str=None, environment_id: str=None, **kwargs) -> None: - super(ServiceFabricFragment, self).__init__(tags=tags, **kwargs) - self.external_service_fabric_id = external_service_fabric_id - self.environment_id = environment_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_paged.py deleted file mode 100644 index 7de95722931e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServiceFabricPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServiceFabric ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServiceFabric]'} - } - - def __init__(self, *args, **kwargs): - - super(ServiceFabricPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_py3.py deleted file mode 100644 index 50cf5f715bf4..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ServiceFabric(Resource): - """A Service Fabric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param external_service_fabric_id: The backing service fabric resource's - id - :type external_service_fabric_id: str - :param environment_id: The resource id of the environment under which the - service fabric resource is present - :type environment_id: str - :ivar applicable_schedule: The applicable schedule for the virtual - machine. - :vartype applicable_schedule: - ~azure.mgmt.devtestlabs.models.ApplicableSchedule - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'applicable_schedule': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, external_service_fabric_id: str=None, environment_id: str=None, **kwargs) -> None: - super(ServiceFabric, self).__init__(location=location, tags=tags, **kwargs) - self.external_service_fabric_id = external_service_fabric_id - self.environment_id = environment_id - self.applicable_schedule = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner.py deleted file mode 100644 index 38d8100572ac..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ServiceRunner(Resource): - """A container for a managed identity to execute DevTest lab services. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the resource. - :type identity: ~azure.mgmt.devtestlabs.models.IdentityProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, - } - - def __init__(self, **kwargs): - super(ServiceRunner, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_paged.py deleted file mode 100644 index c5f8658f70e1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServiceRunnerPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServiceRunner ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServiceRunner]'} - } - - def __init__(self, *args, **kwargs): - - super(ServiceRunnerPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_py3.py deleted file mode 100644 index 5afa18026e0c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ServiceRunner(Resource): - """A container for a managed identity to execute DevTest lab services. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the resource. - :type identity: ~azure.mgmt.devtestlabs.models.IdentityProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, - } - - def __init__(self, *, location: str=None, tags=None, identity=None, **kwargs) -> None: - super(ServiceRunner, self).__init__(location=location, tags=tags, **kwargs) - self.identity = identity diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration.py deleted file mode 100644 index c372a21093bd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SharedPublicIpAddressConfiguration(Model): - """Properties of a virtual machine that determine how it is connected to a - load balancer. - - :param inbound_nat_rules: The incoming NAT rules - :type inbound_nat_rules: - list[~azure.mgmt.devtestlabs.models.InboundNatRule] - """ - - _attribute_map = { - 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRule]'}, - } - - def __init__(self, **kwargs): - super(SharedPublicIpAddressConfiguration, self).__init__(**kwargs) - self.inbound_nat_rules = kwargs.get('inbound_nat_rules', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment.py deleted file mode 100644 index 48eef7b014cc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SharedPublicIpAddressConfigurationFragment(Model): - """Properties of a virtual machine that determine how it is connected to a - load balancer. - - :param inbound_nat_rules: The incoming NAT rules - :type inbound_nat_rules: - list[~azure.mgmt.devtestlabs.models.InboundNatRuleFragment] - """ - - _attribute_map = { - 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRuleFragment]'}, - } - - def __init__(self, **kwargs): - super(SharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) - self.inbound_nat_rules = kwargs.get('inbound_nat_rules', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment_py3.py deleted file mode 100644 index d2121254c806..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SharedPublicIpAddressConfigurationFragment(Model): - """Properties of a virtual machine that determine how it is connected to a - load balancer. - - :param inbound_nat_rules: The incoming NAT rules - :type inbound_nat_rules: - list[~azure.mgmt.devtestlabs.models.InboundNatRuleFragment] - """ - - _attribute_map = { - 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRuleFragment]'}, - } - - def __init__(self, *, inbound_nat_rules=None, **kwargs) -> None: - super(SharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) - self.inbound_nat_rules = inbound_nat_rules diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_py3.py deleted file mode 100644 index 13c9209e5140..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SharedPublicIpAddressConfiguration(Model): - """Properties of a virtual machine that determine how it is connected to a - load balancer. - - :param inbound_nat_rules: The incoming NAT rules - :type inbound_nat_rules: - list[~azure.mgmt.devtestlabs.models.InboundNatRule] - """ - - _attribute_map = { - 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRule]'}, - } - - def __init__(self, *, inbound_nat_rules=None, **kwargs) -> None: - super(SharedPublicIpAddressConfiguration, self).__init__(**kwargs) - self.inbound_nat_rules = inbound_nat_rules diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content.py deleted file mode 100644 index 00b760315ab8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ShutdownNotificationContent(Model): - """The contents of a shutdown notification. Webhooks can use this type to - deserialize the request body when they get notified of an imminent - shutdown. - - :param skip_url: The URL to skip auto-shutdown. - :type skip_url: str - :param delay_url60: The URL to delay shutdown by 60 minutes. - :type delay_url60: str - :param delay_url120: The URL to delay shutdown by 2 hours. - :type delay_url120: str - :param vm_name: The virtual machine to be shut down. - :type vm_name: str - :param guid: The GUID for the virtual machine to be shut down. - :type guid: str - :param owner: The owner of the virtual machine. - :type owner: str - :param vm_url: The URL of the virtual machine. - :type vm_url: str - :param minutes_until_shutdown: Minutes remaining until shutdown - :type minutes_until_shutdown: str - :param event_type: The event for which a notification will be sent. - :type event_type: str - :param text: The text for the notification. - :type text: str - :param subscription_id: The subscription ID for the schedule. - :type subscription_id: str - :param resource_group_name: The resource group name for the schedule. - :type resource_group_name: str - :param lab_name: The lab for the schedule. - :type lab_name: str - """ - - _attribute_map = { - 'skip_url': {'key': 'skipUrl', 'type': 'str'}, - 'delay_url60': {'key': 'delayUrl60', 'type': 'str'}, - 'delay_url120': {'key': 'delayUrl120', 'type': 'str'}, - 'vm_name': {'key': 'vmName', 'type': 'str'}, - 'guid': {'key': 'guid', 'type': 'str'}, - 'owner': {'key': 'owner', 'type': 'str'}, - 'vm_url': {'key': 'vmUrl', 'type': 'str'}, - 'minutes_until_shutdown': {'key': 'minutesUntilShutdown', 'type': 'str'}, - 'event_type': {'key': 'eventType', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, - 'lab_name': {'key': 'labName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ShutdownNotificationContent, self).__init__(**kwargs) - self.skip_url = kwargs.get('skip_url', None) - self.delay_url60 = kwargs.get('delay_url60', None) - self.delay_url120 = kwargs.get('delay_url120', None) - self.vm_name = kwargs.get('vm_name', None) - self.guid = kwargs.get('guid', None) - self.owner = kwargs.get('owner', None) - self.vm_url = kwargs.get('vm_url', None) - self.minutes_until_shutdown = kwargs.get('minutes_until_shutdown', None) - self.event_type = kwargs.get('event_type', None) - self.text = kwargs.get('text', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group_name = kwargs.get('resource_group_name', None) - self.lab_name = kwargs.get('lab_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content_py3.py deleted file mode 100644 index 47242c6a1816..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ShutdownNotificationContent(Model): - """The contents of a shutdown notification. Webhooks can use this type to - deserialize the request body when they get notified of an imminent - shutdown. - - :param skip_url: The URL to skip auto-shutdown. - :type skip_url: str - :param delay_url60: The URL to delay shutdown by 60 minutes. - :type delay_url60: str - :param delay_url120: The URL to delay shutdown by 2 hours. - :type delay_url120: str - :param vm_name: The virtual machine to be shut down. - :type vm_name: str - :param guid: The GUID for the virtual machine to be shut down. - :type guid: str - :param owner: The owner of the virtual machine. - :type owner: str - :param vm_url: The URL of the virtual machine. - :type vm_url: str - :param minutes_until_shutdown: Minutes remaining until shutdown - :type minutes_until_shutdown: str - :param event_type: The event for which a notification will be sent. - :type event_type: str - :param text: The text for the notification. - :type text: str - :param subscription_id: The subscription ID for the schedule. - :type subscription_id: str - :param resource_group_name: The resource group name for the schedule. - :type resource_group_name: str - :param lab_name: The lab for the schedule. - :type lab_name: str - """ - - _attribute_map = { - 'skip_url': {'key': 'skipUrl', 'type': 'str'}, - 'delay_url60': {'key': 'delayUrl60', 'type': 'str'}, - 'delay_url120': {'key': 'delayUrl120', 'type': 'str'}, - 'vm_name': {'key': 'vmName', 'type': 'str'}, - 'guid': {'key': 'guid', 'type': 'str'}, - 'owner': {'key': 'owner', 'type': 'str'}, - 'vm_url': {'key': 'vmUrl', 'type': 'str'}, - 'minutes_until_shutdown': {'key': 'minutesUntilShutdown', 'type': 'str'}, - 'event_type': {'key': 'eventType', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, - 'lab_name': {'key': 'labName', 'type': 'str'}, - } - - def __init__(self, *, skip_url: str=None, delay_url60: str=None, delay_url120: str=None, vm_name: str=None, guid: str=None, owner: str=None, vm_url: str=None, minutes_until_shutdown: str=None, event_type: str=None, text: str=None, subscription_id: str=None, resource_group_name: str=None, lab_name: str=None, **kwargs) -> None: - super(ShutdownNotificationContent, self).__init__(**kwargs) - self.skip_url = skip_url - self.delay_url60 = delay_url60 - self.delay_url120 = delay_url120 - self.vm_name = vm_name - self.guid = guid - self.owner = owner - self.vm_url = vm_url - self.minutes_until_shutdown = minutes_until_shutdown - self.event_type = event_type - self.text = text - self.subscription_id = subscription_id - self.resource_group_name = resource_group_name - self.lab_name = lab_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet.py deleted file mode 100644 index 520ea0b84c0b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Subnet(Model): - """Subnet information. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name of the subnet as seen in the lab. - :type lab_subnet_name: str - :param allow_public_ip: The permission policy of the subnet for allowing - public IP addresses (i.e. Allow, Deny)). Possible values include: - 'Default', 'Deny', 'Allow' - :type allow_public_ip: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Subnet, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.allow_public_ip = kwargs.get('allow_public_ip', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment.py deleted file mode 100644 index db484aef5efc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetFragment(Model): - """Subnet information. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name of the subnet as seen in the lab. - :type lab_subnet_name: str - :param allow_public_ip: The permission policy of the subnet for allowing - public IP addresses (i.e. Allow, Deny)). Possible values include: - 'Default', 'Deny', 'Allow' - :type allow_public_ip: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubnetFragment, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.allow_public_ip = kwargs.get('allow_public_ip', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment_py3.py deleted file mode 100644 index bdca8f51fc58..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetFragment(Model): - """Subnet information. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name of the subnet as seen in the lab. - :type lab_subnet_name: str - :param allow_public_ip: The permission policy of the subnet for allowing - public IP addresses (i.e. Allow, Deny)). Possible values include: - 'Default', 'Deny', 'Allow' - :type allow_public_ip: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, allow_public_ip=None, **kwargs) -> None: - super(SubnetFragment, self).__init__(**kwargs) - self.resource_id = resource_id - self.lab_subnet_name = lab_subnet_name - self.allow_public_ip = allow_public_ip diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override.py deleted file mode 100644 index c091e516241d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetOverride(Model): - """Property overrides on a subnet of a virtual network. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name given to the subnet within the lab. - :type lab_subnet_name: str - :param use_in_vm_creation_permission: Indicates whether this subnet can be - used during virtual machine creation (i.e. Allow, Deny). Possible values - include: 'Default', 'Deny', 'Allow' - :type use_in_vm_creation_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param use_public_ip_address_permission: Indicates whether public IP - addresses can be assigned to virtual machines on this subnet (i.e. Allow, - Deny). Possible values include: 'Default', 'Deny', 'Allow' - :type use_public_ip_address_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param shared_public_ip_address_configuration: Properties that virtual - machines on this subnet will share. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfiguration - :param virtual_network_pool_name: The virtual network pool associated with - this subnet. - :type virtual_network_pool_name: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, - 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfiguration'}, - 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubnetOverride, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.use_in_vm_creation_permission = kwargs.get('use_in_vm_creation_permission', None) - self.use_public_ip_address_permission = kwargs.get('use_public_ip_address_permission', None) - self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) - self.virtual_network_pool_name = kwargs.get('virtual_network_pool_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment.py deleted file mode 100644 index 839368724e6a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetOverrideFragment(Model): - """Property overrides on a subnet of a virtual network. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name given to the subnet within the lab. - :type lab_subnet_name: str - :param use_in_vm_creation_permission: Indicates whether this subnet can be - used during virtual machine creation (i.e. Allow, Deny). Possible values - include: 'Default', 'Deny', 'Allow' - :type use_in_vm_creation_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param use_public_ip_address_permission: Indicates whether public IP - addresses can be assigned to virtual machines on this subnet (i.e. Allow, - Deny). Possible values include: 'Default', 'Deny', 'Allow' - :type use_public_ip_address_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param shared_public_ip_address_configuration: Properties that virtual - machines on this subnet will share. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfigurationFragment - :param virtual_network_pool_name: The virtual network pool associated with - this subnet. - :type virtual_network_pool_name: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, - 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfigurationFragment'}, - 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubnetOverrideFragment, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.use_in_vm_creation_permission = kwargs.get('use_in_vm_creation_permission', None) - self.use_public_ip_address_permission = kwargs.get('use_public_ip_address_permission', None) - self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) - self.virtual_network_pool_name = kwargs.get('virtual_network_pool_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment_py3.py deleted file mode 100644 index a48b90a27c65..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetOverrideFragment(Model): - """Property overrides on a subnet of a virtual network. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name given to the subnet within the lab. - :type lab_subnet_name: str - :param use_in_vm_creation_permission: Indicates whether this subnet can be - used during virtual machine creation (i.e. Allow, Deny). Possible values - include: 'Default', 'Deny', 'Allow' - :type use_in_vm_creation_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param use_public_ip_address_permission: Indicates whether public IP - addresses can be assigned to virtual machines on this subnet (i.e. Allow, - Deny). Possible values include: 'Default', 'Deny', 'Allow' - :type use_public_ip_address_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param shared_public_ip_address_configuration: Properties that virtual - machines on this subnet will share. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfigurationFragment - :param virtual_network_pool_name: The virtual network pool associated with - this subnet. - :type virtual_network_pool_name: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, - 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfigurationFragment'}, - 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, use_in_vm_creation_permission=None, use_public_ip_address_permission=None, shared_public_ip_address_configuration=None, virtual_network_pool_name: str=None, **kwargs) -> None: - super(SubnetOverrideFragment, self).__init__(**kwargs) - self.resource_id = resource_id - self.lab_subnet_name = lab_subnet_name - self.use_in_vm_creation_permission = use_in_vm_creation_permission - self.use_public_ip_address_permission = use_public_ip_address_permission - self.shared_public_ip_address_configuration = shared_public_ip_address_configuration - self.virtual_network_pool_name = virtual_network_pool_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_py3.py deleted file mode 100644 index 30ddcbe9a971..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetOverride(Model): - """Property overrides on a subnet of a virtual network. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name given to the subnet within the lab. - :type lab_subnet_name: str - :param use_in_vm_creation_permission: Indicates whether this subnet can be - used during virtual machine creation (i.e. Allow, Deny). Possible values - include: 'Default', 'Deny', 'Allow' - :type use_in_vm_creation_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param use_public_ip_address_permission: Indicates whether public IP - addresses can be assigned to virtual machines on this subnet (i.e. Allow, - Deny). Possible values include: 'Default', 'Deny', 'Allow' - :type use_public_ip_address_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param shared_public_ip_address_configuration: Properties that virtual - machines on this subnet will share. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfiguration - :param virtual_network_pool_name: The virtual network pool associated with - this subnet. - :type virtual_network_pool_name: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, - 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfiguration'}, - 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, use_in_vm_creation_permission=None, use_public_ip_address_permission=None, shared_public_ip_address_configuration=None, virtual_network_pool_name: str=None, **kwargs) -> None: - super(SubnetOverride, self).__init__(**kwargs) - self.resource_id = resource_id - self.lab_subnet_name = lab_subnet_name - self.use_in_vm_creation_permission = use_in_vm_creation_permission - self.use_public_ip_address_permission = use_public_ip_address_permission - self.shared_public_ip_address_configuration = shared_public_ip_address_configuration - self.virtual_network_pool_name = virtual_network_pool_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_py3.py deleted file mode 100644 index 6faba11229c2..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Subnet(Model): - """Subnet information. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name of the subnet as seen in the lab. - :type lab_subnet_name: str - :param allow_public_ip: The permission policy of the subnet for allowing - public IP addresses (i.e. Allow, Deny)). Possible values include: - 'Default', 'Deny', 'Allow' - :type allow_public_ip: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, allow_public_ip=None, **kwargs) -> None: - super(Subnet, self).__init__(**kwargs) - self.resource_id = resource_id - self.lab_subnet_name = lab_subnet_name - self.allow_public_ip = allow_public_ip diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration.py deleted file mode 100644 index c300efe3e12a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetSharedPublicIpAddressConfiguration(Model): - """Configuration for public IP address sharing. - - :param allowed_ports: Backend ports that virtual machines on this subnet - are allowed to expose - :type allowed_ports: list[~azure.mgmt.devtestlabs.models.Port] - """ - - _attribute_map = { - 'allowed_ports': {'key': 'allowedPorts', 'type': '[Port]'}, - } - - def __init__(self, **kwargs): - super(SubnetSharedPublicIpAddressConfiguration, self).__init__(**kwargs) - self.allowed_ports = kwargs.get('allowed_ports', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.py deleted file mode 100644 index 737aba0c3385..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetSharedPublicIpAddressConfigurationFragment(Model): - """Configuration for public IP address sharing. - - :param allowed_ports: Backend ports that virtual machines on this subnet - are allowed to expose - :type allowed_ports: list[~azure.mgmt.devtestlabs.models.PortFragment] - """ - - _attribute_map = { - 'allowed_ports': {'key': 'allowedPorts', 'type': '[PortFragment]'}, - } - - def __init__(self, **kwargs): - super(SubnetSharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) - self.allowed_ports = kwargs.get('allowed_ports', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment_py3.py deleted file mode 100644 index b108414e8db0..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetSharedPublicIpAddressConfigurationFragment(Model): - """Configuration for public IP address sharing. - - :param allowed_ports: Backend ports that virtual machines on this subnet - are allowed to expose - :type allowed_ports: list[~azure.mgmt.devtestlabs.models.PortFragment] - """ - - _attribute_map = { - 'allowed_ports': {'key': 'allowedPorts', 'type': '[PortFragment]'}, - } - - def __init__(self, *, allowed_ports=None, **kwargs) -> None: - super(SubnetSharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) - self.allowed_ports = allowed_ports diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_py3.py deleted file mode 100644 index b0149a863f64..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetSharedPublicIpAddressConfiguration(Model): - """Configuration for public IP address sharing. - - :param allowed_ports: Backend ports that virtual machines on this subnet - are allowed to expose - :type allowed_ports: list[~azure.mgmt.devtestlabs.models.Port] - """ - - _attribute_map = { - 'allowed_ports': {'key': 'allowedPorts', 'type': '[Port]'}, - } - - def __init__(self, *, allowed_ports=None, **kwargs) -> None: - super(SubnetSharedPublicIpAddressConfiguration, self).__init__(**kwargs) - self.allowed_ports = allowed_ports diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties.py deleted file mode 100644 index d6eca3dfd40e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TargetCostProperties(Model): - """Properties of a cost target. - - :param status: Target cost status. Possible values include: 'Enabled', - 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.TargetCostStatus - :param target: Lab target cost - :type target: int - :param cost_thresholds: Cost thresholds. - :type cost_thresholds: - list[~azure.mgmt.devtestlabs.models.CostThresholdProperties] - :param cycle_start_date_time: Reporting cycle start date. - :type cycle_start_date_time: datetime - :param cycle_end_date_time: Reporting cycle end date. - :type cycle_end_date_time: datetime - :param cycle_type: Reporting cycle type. Possible values include: - 'CalendarMonth', 'Custom' - :type cycle_type: str or ~azure.mgmt.devtestlabs.models.ReportingCycleType - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'int'}, - 'cost_thresholds': {'key': 'costThresholds', 'type': '[CostThresholdProperties]'}, - 'cycle_start_date_time': {'key': 'cycleStartDateTime', 'type': 'iso-8601'}, - 'cycle_end_date_time': {'key': 'cycleEndDateTime', 'type': 'iso-8601'}, - 'cycle_type': {'key': 'cycleType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TargetCostProperties, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.target = kwargs.get('target', None) - self.cost_thresholds = kwargs.get('cost_thresholds', None) - self.cycle_start_date_time = kwargs.get('cycle_start_date_time', None) - self.cycle_end_date_time = kwargs.get('cycle_end_date_time', None) - self.cycle_type = kwargs.get('cycle_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties_py3.py deleted file mode 100644 index 8e79d34b0ed9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TargetCostProperties(Model): - """Properties of a cost target. - - :param status: Target cost status. Possible values include: 'Enabled', - 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.TargetCostStatus - :param target: Lab target cost - :type target: int - :param cost_thresholds: Cost thresholds. - :type cost_thresholds: - list[~azure.mgmt.devtestlabs.models.CostThresholdProperties] - :param cycle_start_date_time: Reporting cycle start date. - :type cycle_start_date_time: datetime - :param cycle_end_date_time: Reporting cycle end date. - :type cycle_end_date_time: datetime - :param cycle_type: Reporting cycle type. Possible values include: - 'CalendarMonth', 'Custom' - :type cycle_type: str or ~azure.mgmt.devtestlabs.models.ReportingCycleType - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'int'}, - 'cost_thresholds': {'key': 'costThresholds', 'type': '[CostThresholdProperties]'}, - 'cycle_start_date_time': {'key': 'cycleStartDateTime', 'type': 'iso-8601'}, - 'cycle_end_date_time': {'key': 'cycleEndDateTime', 'type': 'iso-8601'}, - 'cycle_type': {'key': 'cycleType', 'type': 'str'}, - } - - def __init__(self, *, status=None, target: int=None, cost_thresholds=None, cycle_start_date_time=None, cycle_end_date_time=None, cycle_type=None, **kwargs) -> None: - super(TargetCostProperties, self).__init__(**kwargs) - self.status = status - self.target = target - self.cost_thresholds = cost_thresholds - self.cycle_start_date_time = cycle_start_date_time - self.cycle_end_date_time = cycle_end_date_time - self.cycle_type = cycle_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource.py deleted file mode 100644 index 4849be7f6102..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateResource(Model): - """Represents an update resource. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(UpdateResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource_py3.py deleted file mode 100644 index 62a3c23c2164..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateResource(Model): - """Represents an update resource. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(UpdateResource, self).__init__(**kwargs) - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user.py deleted file mode 100644 index 28099b85f900..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class User(Resource): - """Profile of a lab user. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the user. - :type identity: ~azure.mgmt.devtestlabs.models.UserIdentity - :param secret_store: The secret store of the user. - :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStore - :ivar created_date: The creation date of the user profile. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'properties.identity', 'type': 'UserIdentity'}, - 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStore'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(User, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.secret_store = kwargs.get('secret_store', None) - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment.py deleted file mode 100644 index cd9a685bdbbe..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class UserFragment(UpdateResource): - """Profile of a lab user. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the user. - :type identity: ~azure.mgmt.devtestlabs.models.UserIdentityFragment - :param secret_store: The secret store of the user. - :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStoreFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'properties.identity', 'type': 'UserIdentityFragment'}, - 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStoreFragment'}, - } - - def __init__(self, **kwargs): - super(UserFragment, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.secret_store = kwargs.get('secret_store', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment_py3.py deleted file mode 100644 index 357a81712e45..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class UserFragment(UpdateResource): - """Profile of a lab user. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the user. - :type identity: ~azure.mgmt.devtestlabs.models.UserIdentityFragment - :param secret_store: The secret store of the user. - :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStoreFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'properties.identity', 'type': 'UserIdentityFragment'}, - 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStoreFragment'}, - } - - def __init__(self, *, tags=None, identity=None, secret_store=None, **kwargs) -> None: - super(UserFragment, self).__init__(tags=tags, **kwargs) - self.identity = identity - self.secret_store = secret_store diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity.py deleted file mode 100644 index 557f65e2b82f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserIdentity(Model): - """Identity attributes of a lab user. - - :param principal_name: Set to the principal name / UPN of the client JWT - making the request. - :type principal_name: str - :param principal_id: Set to the principal Id of the client JWT making the - request. Service principal will not have the principal Id. - :type principal_id: str - :param tenant_id: Set to the tenant ID of the client JWT making the - request. - :type tenant_id: str - :param object_id: Set to the object Id of the client JWT making the - request. Not all users have object Id. For CSP (reseller) scenarios for - example, object Id is not available. - :type object_id: str - :param app_id: Set to the app Id of the client JWT making the request. - :type app_id: str - """ - - _attribute_map = { - 'principal_name': {'key': 'principalName', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserIdentity, self).__init__(**kwargs) - self.principal_name = kwargs.get('principal_name', None) - self.principal_id = kwargs.get('principal_id', None) - self.tenant_id = kwargs.get('tenant_id', None) - self.object_id = kwargs.get('object_id', None) - self.app_id = kwargs.get('app_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment.py deleted file mode 100644 index 0783b56f47b3..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserIdentityFragment(Model): - """Identity attributes of a lab user. - - :param principal_name: Set to the principal name / UPN of the client JWT - making the request. - :type principal_name: str - :param principal_id: Set to the principal Id of the client JWT making the - request. Service principal will not have the principal Id. - :type principal_id: str - :param tenant_id: Set to the tenant ID of the client JWT making the - request. - :type tenant_id: str - :param object_id: Set to the object Id of the client JWT making the - request. Not all users have object Id. For CSP (reseller) scenarios for - example, object Id is not available. - :type object_id: str - :param app_id: Set to the app Id of the client JWT making the request. - :type app_id: str - """ - - _attribute_map = { - 'principal_name': {'key': 'principalName', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserIdentityFragment, self).__init__(**kwargs) - self.principal_name = kwargs.get('principal_name', None) - self.principal_id = kwargs.get('principal_id', None) - self.tenant_id = kwargs.get('tenant_id', None) - self.object_id = kwargs.get('object_id', None) - self.app_id = kwargs.get('app_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment_py3.py deleted file mode 100644 index 3c2fdb6e005b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserIdentityFragment(Model): - """Identity attributes of a lab user. - - :param principal_name: Set to the principal name / UPN of the client JWT - making the request. - :type principal_name: str - :param principal_id: Set to the principal Id of the client JWT making the - request. Service principal will not have the principal Id. - :type principal_id: str - :param tenant_id: Set to the tenant ID of the client JWT making the - request. - :type tenant_id: str - :param object_id: Set to the object Id of the client JWT making the - request. Not all users have object Id. For CSP (reseller) scenarios for - example, object Id is not available. - :type object_id: str - :param app_id: Set to the app Id of the client JWT making the request. - :type app_id: str - """ - - _attribute_map = { - 'principal_name': {'key': 'principalName', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - } - - def __init__(self, *, principal_name: str=None, principal_id: str=None, tenant_id: str=None, object_id: str=None, app_id: str=None, **kwargs) -> None: - super(UserIdentityFragment, self).__init__(**kwargs) - self.principal_name = principal_name - self.principal_id = principal_id - self.tenant_id = tenant_id - self.object_id = object_id - self.app_id = app_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_py3.py deleted file mode 100644 index 03615a6e15b7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserIdentity(Model): - """Identity attributes of a lab user. - - :param principal_name: Set to the principal name / UPN of the client JWT - making the request. - :type principal_name: str - :param principal_id: Set to the principal Id of the client JWT making the - request. Service principal will not have the principal Id. - :type principal_id: str - :param tenant_id: Set to the tenant ID of the client JWT making the - request. - :type tenant_id: str - :param object_id: Set to the object Id of the client JWT making the - request. Not all users have object Id. For CSP (reseller) scenarios for - example, object Id is not available. - :type object_id: str - :param app_id: Set to the app Id of the client JWT making the request. - :type app_id: str - """ - - _attribute_map = { - 'principal_name': {'key': 'principalName', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - } - - def __init__(self, *, principal_name: str=None, principal_id: str=None, tenant_id: str=None, object_id: str=None, app_id: str=None, **kwargs) -> None: - super(UserIdentity, self).__init__(**kwargs) - self.principal_name = principal_name - self.principal_id = principal_id - self.tenant_id = tenant_id - self.object_id = object_id - self.app_id = app_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_paged.py deleted file mode 100644 index b48ce5901d56..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class UserPaged(Paged): - """ - A paging container for iterating over a list of :class:`User ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[User]'} - } - - def __init__(self, *args, **kwargs): - - super(UserPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_py3.py deleted file mode 100644 index 96d981829827..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class User(Resource): - """Profile of a lab user. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the user. - :type identity: ~azure.mgmt.devtestlabs.models.UserIdentity - :param secret_store: The secret store of the user. - :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStore - :ivar created_date: The creation date of the user profile. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'properties.identity', 'type': 'UserIdentity'}, - 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStore'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, identity=None, secret_store=None, **kwargs) -> None: - super(User, self).__init__(location=location, tags=tags, **kwargs) - self.identity = identity - self.secret_store = secret_store - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store.py deleted file mode 100644 index de4ee5cb6447..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserSecretStore(Model): - """Properties of a user's secret store. - - :param key_vault_uri: The URI of the user's Key vault. - :type key_vault_uri: str - :param key_vault_id: The ID of the user's Key vault. - :type key_vault_id: str - """ - - _attribute_map = { - 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, - 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserSecretStore, self).__init__(**kwargs) - self.key_vault_uri = kwargs.get('key_vault_uri', None) - self.key_vault_id = kwargs.get('key_vault_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment.py deleted file mode 100644 index 7789bff72056..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserSecretStoreFragment(Model): - """Properties of a user's secret store. - - :param key_vault_uri: The URI of the user's Key vault. - :type key_vault_uri: str - :param key_vault_id: The ID of the user's Key vault. - :type key_vault_id: str - """ - - _attribute_map = { - 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, - 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserSecretStoreFragment, self).__init__(**kwargs) - self.key_vault_uri = kwargs.get('key_vault_uri', None) - self.key_vault_id = kwargs.get('key_vault_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment_py3.py deleted file mode 100644 index 241c44664e06..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserSecretStoreFragment(Model): - """Properties of a user's secret store. - - :param key_vault_uri: The URI of the user's Key vault. - :type key_vault_uri: str - :param key_vault_id: The ID of the user's Key vault. - :type key_vault_id: str - """ - - _attribute_map = { - 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, - 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, - } - - def __init__(self, *, key_vault_uri: str=None, key_vault_id: str=None, **kwargs) -> None: - super(UserSecretStoreFragment, self).__init__(**kwargs) - self.key_vault_uri = key_vault_uri - self.key_vault_id = key_vault_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_py3.py deleted file mode 100644 index ad56603f7926..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserSecretStore(Model): - """Properties of a user's secret store. - - :param key_vault_uri: The URI of the user's Key vault. - :type key_vault_uri: str - :param key_vault_id: The ID of the user's Key vault. - :type key_vault_id: str - """ - - _attribute_map = { - 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, - 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, - } - - def __init__(self, *, key_vault_uri: str=None, key_vault_id: str=None, **kwargs) -> None: - super(UserSecretStore, self).__init__(**kwargs) - self.key_vault_uri = key_vault_uri - self.key_vault_id = key_vault_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network.py deleted file mode 100644 index 460ae9a78af0..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualNetwork(Resource): - """A virtual network. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param allowed_subnets: The allowed subnets of the virtual network. - :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.Subnet] - :param description: The description of the virtual network. - :type description: str - :param external_provider_resource_id: The Microsoft.Network resource - identifier of the virtual network. - :type external_provider_resource_id: str - :ivar external_subnets: The external subnet properties. - :vartype external_subnets: - list[~azure.mgmt.devtestlabs.models.ExternalSubnet] - :param subnet_overrides: The subnet overrides of the virtual network. - :type subnet_overrides: - list[~azure.mgmt.devtestlabs.models.SubnetOverride] - :ivar created_date: The creation date of the virtual network. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'external_subnets': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[Subnet]'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, - 'external_subnets': {'key': 'properties.externalSubnets', 'type': '[ExternalSubnet]'}, - 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverride]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualNetwork, self).__init__(**kwargs) - self.allowed_subnets = kwargs.get('allowed_subnets', None) - self.description = kwargs.get('description', None) - self.external_provider_resource_id = kwargs.get('external_provider_resource_id', None) - self.external_subnets = None - self.subnet_overrides = kwargs.get('subnet_overrides', None) - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment.py deleted file mode 100644 index 4840d07f21bb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class VirtualNetworkFragment(UpdateResource): - """A virtual network. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param allowed_subnets: The allowed subnets of the virtual network. - :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.SubnetFragment] - :param description: The description of the virtual network. - :type description: str - :param external_provider_resource_id: The Microsoft.Network resource - identifier of the virtual network. - :type external_provider_resource_id: str - :param subnet_overrides: The subnet overrides of the virtual network. - :type subnet_overrides: - list[~azure.mgmt.devtestlabs.models.SubnetOverrideFragment] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[SubnetFragment]'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, - 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverrideFragment]'}, - } - - def __init__(self, **kwargs): - super(VirtualNetworkFragment, self).__init__(**kwargs) - self.allowed_subnets = kwargs.get('allowed_subnets', None) - self.description = kwargs.get('description', None) - self.external_provider_resource_id = kwargs.get('external_provider_resource_id', None) - self.subnet_overrides = kwargs.get('subnet_overrides', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment_py3.py deleted file mode 100644 index bdc572018008..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class VirtualNetworkFragment(UpdateResource): - """A virtual network. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param allowed_subnets: The allowed subnets of the virtual network. - :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.SubnetFragment] - :param description: The description of the virtual network. - :type description: str - :param external_provider_resource_id: The Microsoft.Network resource - identifier of the virtual network. - :type external_provider_resource_id: str - :param subnet_overrides: The subnet overrides of the virtual network. - :type subnet_overrides: - list[~azure.mgmt.devtestlabs.models.SubnetOverrideFragment] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[SubnetFragment]'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, - 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverrideFragment]'}, - } - - def __init__(self, *, tags=None, allowed_subnets=None, description: str=None, external_provider_resource_id: str=None, subnet_overrides=None, **kwargs) -> None: - super(VirtualNetworkFragment, self).__init__(tags=tags, **kwargs) - self.allowed_subnets = allowed_subnets - self.description = description - self.external_provider_resource_id = external_provider_resource_id - self.subnet_overrides = subnet_overrides diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_paged.py deleted file mode 100644 index c4a6bac12054..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualNetworkPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualNetwork ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualNetwork]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualNetworkPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_py3.py deleted file mode 100644 index 4af05c325513..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualNetwork(Resource): - """A virtual network. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param allowed_subnets: The allowed subnets of the virtual network. - :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.Subnet] - :param description: The description of the virtual network. - :type description: str - :param external_provider_resource_id: The Microsoft.Network resource - identifier of the virtual network. - :type external_provider_resource_id: str - :ivar external_subnets: The external subnet properties. - :vartype external_subnets: - list[~azure.mgmt.devtestlabs.models.ExternalSubnet] - :param subnet_overrides: The subnet overrides of the virtual network. - :type subnet_overrides: - list[~azure.mgmt.devtestlabs.models.SubnetOverride] - :ivar created_date: The creation date of the virtual network. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'external_subnets': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[Subnet]'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, - 'external_subnets': {'key': 'properties.externalSubnets', 'type': '[ExternalSubnet]'}, - 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverride]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, allowed_subnets=None, description: str=None, external_provider_resource_id: str=None, subnet_overrides=None, **kwargs) -> None: - super(VirtualNetwork, self).__init__(location=location, tags=tags, **kwargs) - self.allowed_subnets = allowed_subnets - self.description = description - self.external_provider_resource_id = external_provider_resource_id - self.external_subnets = None - self.subnet_overrides = subnet_overrides - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details.py deleted file mode 100644 index 92d7a61279c1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WeekDetails(Model): - """Properties of a weekly schedule. - - :param weekdays: The days of the week for which the schedule is set (e.g. - Sunday, Monday, Tuesday, etc.). - :type weekdays: list[str] - :param time: The time of the day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'weekdays': {'key': 'weekdays', 'type': '[str]'}, - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WeekDetails, self).__init__(**kwargs) - self.weekdays = kwargs.get('weekdays', None) - self.time = kwargs.get('time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment.py deleted file mode 100644 index f40c5e26d54a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WeekDetailsFragment(Model): - """Properties of a weekly schedule. - - :param weekdays: The days of the week for which the schedule is set (e.g. - Sunday, Monday, Tuesday, etc.). - :type weekdays: list[str] - :param time: The time of the day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'weekdays': {'key': 'weekdays', 'type': '[str]'}, - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WeekDetailsFragment, self).__init__(**kwargs) - self.weekdays = kwargs.get('weekdays', None) - self.time = kwargs.get('time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment_py3.py deleted file mode 100644 index 4521250deffc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WeekDetailsFragment(Model): - """Properties of a weekly schedule. - - :param weekdays: The days of the week for which the schedule is set (e.g. - Sunday, Monday, Tuesday, etc.). - :type weekdays: list[str] - :param time: The time of the day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'weekdays': {'key': 'weekdays', 'type': '[str]'}, - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, *, weekdays=None, time: str=None, **kwargs) -> None: - super(WeekDetailsFragment, self).__init__(**kwargs) - self.weekdays = weekdays - self.time = time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_py3.py deleted file mode 100644 index d3bdddf6f4e4..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WeekDetails(Model): - """Properties of a weekly schedule. - - :param weekdays: The days of the week for which the schedule is set (e.g. - Sunday, Monday, Tuesday, etc.). - :type weekdays: list[str] - :param time: The time of the day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'weekdays': {'key': 'weekdays', 'type': '[str]'}, - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, *, weekdays=None, time: str=None, **kwargs) -> None: - super(WeekDetails, self).__init__(**kwargs) - self.weekdays = weekdays - self.time = time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info.py deleted file mode 100644 index 377c585b9162..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsOsInfo(Model): - """Information about a Windows OS. - - :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, - SysprepRequested, SysprepApplied). Possible values include: - 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' - :type windows_os_state: str or - ~azure.mgmt.devtestlabs.models.WindowsOsState - """ - - _attribute_map = { - 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WindowsOsInfo, self).__init__(**kwargs) - self.windows_os_state = kwargs.get('windows_os_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment.py deleted file mode 100644 index c54bfea8922a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsOsInfoFragment(Model): - """Information about a Windows OS. - - :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, - SysprepRequested, SysprepApplied). Possible values include: - 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' - :type windows_os_state: str or - ~azure.mgmt.devtestlabs.models.WindowsOsState - """ - - _attribute_map = { - 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WindowsOsInfoFragment, self).__init__(**kwargs) - self.windows_os_state = kwargs.get('windows_os_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment_py3.py deleted file mode 100644 index e2009eab0094..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsOsInfoFragment(Model): - """Information about a Windows OS. - - :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, - SysprepRequested, SysprepApplied). Possible values include: - 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' - :type windows_os_state: str or - ~azure.mgmt.devtestlabs.models.WindowsOsState - """ - - _attribute_map = { - 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, - } - - def __init__(self, *, windows_os_state=None, **kwargs) -> None: - super(WindowsOsInfoFragment, self).__init__(**kwargs) - self.windows_os_state = windows_os_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_py3.py deleted file mode 100644 index 6c59c08b3f5a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsOsInfo(Model): - """Information about a Windows OS. - - :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, - SysprepRequested, SysprepApplied). Possible values include: - 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' - :type windows_os_state: str or - ~azure.mgmt.devtestlabs.models.WindowsOsState - """ - - _attribute_map = { - 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, - } - - def __init__(self, *, windows_os_state=None, **kwargs) -> None: - super(WindowsOsInfo, self).__init__(**kwargs) - self.windows_os_state = windows_os_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/__init__.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/__init__.py index 89d5496052a3..659acdca2a6c 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/__init__.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/__init__.py @@ -9,31 +9,31 @@ # regenerated. # -------------------------------------------------------------------------- -from .provider_operations import ProviderOperations -from .labs_operations import LabsOperations -from .operations import Operations -from .global_schedules_operations import GlobalSchedulesOperations -from .artifact_sources_operations import ArtifactSourcesOperations -from .arm_templates_operations import ArmTemplatesOperations -from .artifacts_operations import ArtifactsOperations -from .costs_operations import CostsOperations -from .custom_images_operations import CustomImagesOperations -from .formulas_operations import FormulasOperations -from .gallery_images_operations import GalleryImagesOperations -from .notification_channels_operations import NotificationChannelsOperations -from .policy_sets_operations import PolicySetsOperations -from .policies_operations import PoliciesOperations -from .schedules_operations import SchedulesOperations -from .service_runners_operations import ServiceRunnersOperations -from .users_operations import UsersOperations -from .disks_operations import DisksOperations -from .environments_operations import EnvironmentsOperations -from .secrets_operations import SecretsOperations -from .service_fabrics_operations import ServiceFabricsOperations -from .service_fabric_schedules_operations import ServiceFabricSchedulesOperations -from .virtual_machines_operations import VirtualMachinesOperations -from .virtual_machine_schedules_operations import VirtualMachineSchedulesOperations -from .virtual_networks_operations import VirtualNetworksOperations +from ._provider_operations import ProviderOperations +from ._labs_operations import LabsOperations +from ._operations import Operations +from ._global_schedules_operations import GlobalSchedulesOperations +from ._artifact_sources_operations import ArtifactSourcesOperations +from ._arm_templates_operations import ArmTemplatesOperations +from ._artifacts_operations import ArtifactsOperations +from ._costs_operations import CostsOperations +from ._custom_images_operations import CustomImagesOperations +from ._formulas_operations import FormulasOperations +from ._gallery_images_operations import GalleryImagesOperations +from ._notification_channels_operations import NotificationChannelsOperations +from ._policy_sets_operations import PolicySetsOperations +from ._policies_operations import PoliciesOperations +from ._schedules_operations import SchedulesOperations +from ._service_runners_operations import ServiceRunnersOperations +from ._users_operations import UsersOperations +from ._disks_operations import DisksOperations +from ._environments_operations import EnvironmentsOperations +from ._secrets_operations import SecretsOperations +from ._service_fabrics_operations import ServiceFabricsOperations +from ._service_fabric_schedules_operations import ServiceFabricSchedulesOperations +from ._virtual_machines_operations import VirtualMachinesOperations +from ._virtual_machine_schedules_operations import VirtualMachineSchedulesOperations +from ._virtual_networks_operations import VirtualNetworksOperations __all__ = [ 'ProviderOperations', diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/arm_templates_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_arm_templates_operations.py similarity index 95% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/arm_templates_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_arm_templates_operations.py index fd4567544366..245a750452de 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/arm_templates_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_arm_templates_operations.py @@ -19,6 +19,8 @@ class ArmTemplatesOperations(object): """ArmTemplatesOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.ArmTemplatePaged[~azure.mgmt.devtestlabs.models.ArmTemplate] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -110,6 +111,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -120,12 +126,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ArmTemplatePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ArmTemplatePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ArmTemplatePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/armtemplates'} @@ -140,7 +144,7 @@ def get( :type lab_name: str :param artifact_source_name: The name of the artifact source. :type artifact_source_name: str - :param name: The name of the azure Resource Manager template. + :param name: The name of the azure resource manager template. :type name: str :param expand: Specify the $expand query. Example: 'properties($select=displayName)' @@ -192,7 +196,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ArmTemplate', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifact_sources_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifact_sources_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifact_sources_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifact_sources_operations.py index 67f75d5d6079..6ec87de82fc0 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifact_sources_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifact_sources_operations.py @@ -19,6 +19,8 @@ class ArtifactSourcesOperations(object): """ArtifactSourcesOperations 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. @@ -67,8 +69,7 @@ def list( ~azure.mgmt.devtestlabs.models.ArtifactSourcePaged[~azure.mgmt.devtestlabs.models.ArtifactSource] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -107,6 +108,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -117,12 +123,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ArtifactSourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ArtifactSourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ArtifactSourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources'} @@ -186,7 +190,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ArtifactSource', response) @@ -257,7 +260,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ArtifactSource', response) if response.status_code == 201: @@ -328,7 +330,8 @@ def delete( def update( self, resource_group_name, lab_name, name, artifact_source, custom_headers=None, raw=False, **operation_config): - """Modify properties of artifact sources. + """Allows modifying tags of artifact sources. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -387,7 +390,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ArtifactSource', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifacts_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifacts_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifacts_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifacts_operations.py index d036a6026f51..e4a5d9693cd5 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifacts_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifacts_operations.py @@ -19,6 +19,8 @@ class ArtifactsOperations(object): """ArtifactsOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.ArtifactPaged[~azure.mgmt.devtestlabs.models.Artifact] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -110,6 +111,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -120,12 +126,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ArtifactPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ArtifactPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ArtifactPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/artifacts'} @@ -192,7 +196,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Artifact', response) @@ -269,7 +272,6 @@ def generate_arm_template( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ArmTemplateInfo', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/costs_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_costs_operations.py similarity index 98% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/costs_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_costs_operations.py index b63651cdcedc..b0f9ccc59db7 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/costs_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_costs_operations.py @@ -19,6 +19,8 @@ class CostsOperations(object): """CostsOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LabCost', response) @@ -167,7 +168,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LabCost', response) if response.status_code == 201: diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/custom_images_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_custom_images_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/custom_images_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_custom_images_operations.py index 4471269a40a5..06d30d912df6 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/custom_images_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_custom_images_operations.py @@ -21,6 +21,8 @@ class CustomImagesOperations(object): """CustomImagesOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.CustomImagePaged[~azure.mgmt.devtestlabs.models.CustomImage] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -109,6 +110,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.CustomImagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.CustomImagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.CustomImagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/customimages'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CustomImage', response) @@ -391,7 +394,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, name, custom_image, custom_headers=None, raw=False, **operation_config): - """Modify properties of custom images. + """Allows modifying tags of custom images. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -449,7 +453,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CustomImage', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/disks_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_disks_operations.py similarity index 98% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/disks_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_disks_operations.py index 3fbe8eac7cb0..5e5fea17acdd 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/disks_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_disks_operations.py @@ -21,6 +21,8 @@ class DisksOperations(object): """DisksOperations 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. @@ -71,8 +73,7 @@ def list( ~azure.mgmt.devtestlabs.models.DiskPaged[~azure.mgmt.devtestlabs.models.Disk] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -112,6 +113,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -122,12 +128,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks'} @@ -194,7 +198,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Disk', response) @@ -405,7 +408,7 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, user_name, name, disk, custom_headers=None, raw=False, **operation_config): - """Modify properties of disks. + """Allows modifying tags of disks. All other properties will be ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -466,7 +469,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Disk', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/environments_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_environments_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/environments_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_environments_operations.py index 61947381c66d..5805df9f86c1 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/environments_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_environments_operations.py @@ -21,6 +21,8 @@ class EnvironmentsOperations(object): """EnvironmentsOperations 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. @@ -71,8 +73,7 @@ def list( ~azure.mgmt.devtestlabs.models.DtlEnvironmentPaged[~azure.mgmt.devtestlabs.models.DtlEnvironment] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -112,6 +113,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -122,12 +128,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DtlEnvironmentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DtlEnvironmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DtlEnvironmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/environments'} @@ -194,7 +198,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DtlEnvironment', response) @@ -406,7 +409,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, user_name, name, dtl_environment, custom_headers=None, raw=False, **operation_config): - """Modify properties of environments. + """Allows modifying tags of environments. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -469,7 +473,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DtlEnvironment', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/formulas_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_formulas_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/formulas_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_formulas_operations.py index 366a1a2a129e..1c0665356f52 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/formulas_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_formulas_operations.py @@ -21,6 +21,8 @@ class FormulasOperations(object): """FormulasOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.FormulaPaged[~azure.mgmt.devtestlabs.models.Formula] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -109,6 +110,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.FormulaPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.FormulaPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.FormulaPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/formulas'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Formula', response) @@ -254,7 +257,7 @@ def _create_or_update_initial( def create_or_update( self, resource_group_name, lab_name, name, formula, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or replace an existing Formula. This operation can take a while + """Create or replace an existing formula. This operation can take a while to complete. :param resource_group_name: The name of the resource group. @@ -365,7 +368,8 @@ def delete( def update( self, resource_group_name, lab_name, name, formula, custom_headers=None, raw=False, **operation_config): - """Modify properties of formulas. + """Allows modifying tags of formulas. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -424,7 +428,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Formula', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/gallery_images_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_gallery_images_operations.py similarity index 93% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/gallery_images_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_gallery_images_operations.py index 849946066b15..97c3cf13e2c0 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/gallery_images_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_gallery_images_operations.py @@ -19,6 +19,8 @@ class GalleryImagesOperations(object): """GalleryImagesOperations 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. @@ -67,8 +69,7 @@ def list( ~azure.mgmt.devtestlabs.models.GalleryImagePaged[~azure.mgmt.devtestlabs.models.GalleryImage] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -107,6 +108,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -117,12 +123,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.GalleryImagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.GalleryImagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.GalleryImagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/galleryimages'} diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/global_schedules_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_global_schedules_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/global_schedules_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_global_schedules_operations.py index 736efa3c0cea..c05fe0f1308e 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/global_schedules_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_global_schedules_operations.py @@ -21,6 +21,8 @@ class GlobalSchedulesOperations(object): """GlobalSchedulesOperations 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. @@ -65,8 +67,7 @@ def list_by_subscription( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_subscription.metadata['url'] @@ -103,6 +104,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -113,12 +119,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DevTestLab/schedules'} @@ -151,8 +155,7 @@ def list_by_resource_group( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -190,6 +193,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -200,12 +208,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules'} @@ -266,7 +272,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -334,7 +339,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) if response.status_code == 201: @@ -402,7 +406,8 @@ def delete( def update( self, resource_group_name, name, schedule, custom_headers=None, raw=False, **operation_config): - """Modify properties of schedules. + """Allows modifying tags of schedules. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -457,7 +462,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/labs_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_labs_operations.py similarity index 98% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/labs_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_labs_operations.py index d6ce7c62635f..a0b03f5a0c53 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/labs_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_labs_operations.py @@ -21,6 +21,8 @@ class LabsOperations(object): """LabsOperations 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. @@ -65,8 +67,7 @@ def list_by_subscription( ~azure.mgmt.devtestlabs.models.LabPaged[~azure.mgmt.devtestlabs.models.Lab] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_subscription.metadata['url'] @@ -103,6 +104,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -113,12 +119,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.LabPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.LabPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.LabPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DevTestLab/labs'} @@ -151,8 +155,7 @@ def list_by_resource_group( ~azure.mgmt.devtestlabs.models.LabPaged[~azure.mgmt.devtestlabs.models.Lab] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -190,6 +193,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -200,12 +208,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.LabPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.LabPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.LabPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs'} @@ -266,7 +272,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Lab', response) @@ -461,7 +466,7 @@ def get_long_running_output(response): def update( self, resource_group_name, name, lab, custom_headers=None, raw=False, **operation_config): - """Modify properties of labs. + """Allows modifying tags of labs. All other properties will be ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -516,7 +521,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Lab', response) @@ -850,7 +854,6 @@ def generate_upload_uri( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('GenerateUploadUriResponse', response) @@ -973,8 +976,7 @@ def list_vhds( ~azure.mgmt.devtestlabs.models.LabVhdPaged[~azure.mgmt.devtestlabs.models.LabVhd] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_vhds.metadata['url'] @@ -1005,6 +1007,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -1015,12 +1022,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.LabVhdPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.LabVhdPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.LabVhdPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_vhds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/listVhds'} diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/notification_channels_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_notification_channels_operations.py similarity index 96% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/notification_channels_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_notification_channels_operations.py index 0c19dd07462e..d0f4de2d054b 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/notification_channels_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_notification_channels_operations.py @@ -19,6 +19,8 @@ class NotificationChannelsOperations(object): """NotificationChannelsOperations 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. @@ -67,8 +69,7 @@ def list( ~azure.mgmt.devtestlabs.models.NotificationChannelPaged[~azure.mgmt.devtestlabs.models.NotificationChannel] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -107,6 +108,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -117,12 +123,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.NotificationChannelPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.NotificationChannelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.NotificationChannelPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/notificationchannels'} @@ -135,7 +139,7 @@ def get( :type resource_group_name: str :param lab_name: The name of the lab. :type lab_name: str - :param name: The name of the notificationChannel. + :param name: The name of the notification channel. :type name: str :param expand: Specify the $expand query. Example: 'properties($select=webHookUrl)' @@ -186,7 +190,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('NotificationChannel', response) @@ -199,13 +202,13 @@ def get( def create_or_update( self, resource_group_name, lab_name, name, notification_channel, custom_headers=None, raw=False, **operation_config): - """Create or replace an existing notificationChannel. + """Create or replace an existing notification channel. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param lab_name: The name of the lab. :type lab_name: str - :param name: The name of the notificationChannel. + :param name: The name of the notification channel. :type name: str :param notification_channel: A notification. :type notification_channel: @@ -258,7 +261,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('NotificationChannel', response) if response.status_code == 201: @@ -279,7 +281,7 @@ def delete( :type resource_group_name: str :param lab_name: The name of the lab. :type lab_name: str - :param name: The name of the notificationChannel. + :param name: The name of the notification channel. :type name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -329,13 +331,14 @@ def delete( def update( self, resource_group_name, lab_name, name, notification_channel, custom_headers=None, raw=False, **operation_config): - """Modify properties of notification channels. + """Allows modifying tags of notification channels. All other properties + will be ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param lab_name: The name of the lab. :type lab_name: str - :param name: The name of the notificationChannel. + :param name: The name of the notification channel. :type name: str :param notification_channel: A notification. :type notification_channel: @@ -388,7 +391,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('NotificationChannel', response) @@ -407,7 +409,7 @@ def notify( :type resource_group_name: str :param lab_name: The name of the lab. :type lab_name: str - :param name: The name of the notificationChannel. + :param name: The name of the notification channel. :type name: str :param event_name: The type of event (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_operations.py similarity index 96% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_operations.py index 2f0636e39f26..5576b0e6fc0f 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_operations.py @@ -19,6 +19,8 @@ class Operations(object): """Operations 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. @@ -88,7 +90,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('OperationResult', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policies_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policies_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policies_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policies_operations.py index da02489f324b..90b956a0d88c 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policies_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policies_operations.py @@ -19,6 +19,8 @@ class PoliciesOperations(object): """PoliciesOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.PolicyPaged[~azure.mgmt.devtestlabs.models.Policy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -110,6 +111,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -120,12 +126,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.PolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.PolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.PolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies'} @@ -192,7 +196,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Policy', response) @@ -266,7 +269,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Policy', response) if response.status_code == 201: @@ -340,7 +342,8 @@ def delete( def update( self, resource_group_name, lab_name, policy_set_name, name, policy, custom_headers=None, raw=False, **operation_config): - """Modify properties of policies. + """Allows modifying tags of policies. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -401,7 +404,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Policy', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policy_sets_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policy_sets_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policy_sets_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policy_sets_operations.py index ed602a5ba340..66acd3ffb5e6 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policy_sets_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policy_sets_operations.py @@ -19,6 +19,8 @@ class PolicySetsOperations(object): """PolicySetsOperations 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. @@ -100,7 +102,6 @@ def evaluate_policies( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('EvaluatePoliciesResponse', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/provider_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_provider_operations.py similarity index 90% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/provider_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_provider_operations.py index 3597edb7fa87..5b12492d4b39 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/provider_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_provider_operations.py @@ -19,6 +19,8 @@ class ProviderOperations(object): """ProviderOperations 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. @@ -51,8 +53,7 @@ def list( ~azure.mgmt.devtestlabs.models.OperationMetadataPaged[~azure.mgmt.devtestlabs.models.OperationMetadata] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -77,6 +78,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -87,12 +93,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationMetadataPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.DevTestLab/operations'} diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/schedules_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_schedules_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/schedules_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_schedules_operations.py index 5f4e9429e3a1..996b11b9e6d4 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/schedules_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_schedules_operations.py @@ -21,6 +21,8 @@ class SchedulesOperations(object): """SchedulesOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -109,6 +110,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -259,7 +262,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) if response.status_code == 201: @@ -330,7 +332,8 @@ def delete( def update( self, resource_group_name, lab_name, name, schedule, custom_headers=None, raw=False, **operation_config): - """Modify properties of schedules. + """Allows modifying tags of schedules. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -388,7 +391,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -502,8 +504,7 @@ def list_applicable( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_applicable.metadata['url'] @@ -535,6 +536,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -545,12 +551,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_applicable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}/listApplicable'} diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/secrets_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_secrets_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/secrets_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_secrets_operations.py index 46e2a62a2b88..aa04f243c68c 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/secrets_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_secrets_operations.py @@ -21,6 +21,8 @@ class SecretsOperations(object): """SecretsOperations 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. @@ -71,8 +73,7 @@ def list( ~azure.mgmt.devtestlabs.models.SecretPaged[~azure.mgmt.devtestlabs.models.Secret] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -112,6 +113,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -122,12 +128,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SecretPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SecretPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SecretPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/secrets'} @@ -194,7 +198,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Secret', response) @@ -377,7 +380,7 @@ def delete( def update( self, resource_group_name, lab_name, user_name, name, tags=None, value=None, custom_headers=None, raw=False, **operation_config): - """Modify properties of secrets. + """Allows modifying tags of secrets. All other properties will be ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -442,7 +445,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Secret', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabric_schedules_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabric_schedules_operations.py similarity index 96% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabric_schedules_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabric_schedules_operations.py index 892b9b3fb50b..62ac4ca15eb1 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabric_schedules_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabric_schedules_operations.py @@ -21,6 +21,8 @@ class ServiceFabricSchedulesOperations(object): """ServiceFabricSchedulesOperations 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. @@ -49,7 +51,7 @@ def list( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param expand: Specify the $expand query. Example: 'properties($select=status)' @@ -73,8 +75,7 @@ def list( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -115,6 +116,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -125,12 +131,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{serviceFabricName}/schedules'} @@ -145,7 +149,7 @@ def get( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param name: The name of the schedule. :type name: str @@ -200,7 +204,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -221,7 +224,7 @@ def create_or_update( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param name: The name of the schedule. :type name: str @@ -277,7 +280,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) if response.status_code == 201: @@ -300,7 +302,7 @@ def delete( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param name: The name of the schedule. :type name: str @@ -354,7 +356,8 @@ def delete( def update( self, resource_group_name, lab_name, user_name, service_fabric_name, name, schedule, custom_headers=None, raw=False, **operation_config): - """Modify properties of schedules. + """Allows modifying tags of schedules. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -362,7 +365,7 @@ def update( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param name: The name of the schedule. :type name: str @@ -418,7 +421,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -480,7 +482,7 @@ def execute( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param name: The name of the schedule. :type name: str diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabrics_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabrics_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabrics_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabrics_operations.py index 076aa87a7963..f3ef18b8584e 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabrics_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabrics_operations.py @@ -21,6 +21,8 @@ class ServiceFabricsOperations(object): """ServiceFabricsOperations 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. @@ -71,8 +73,7 @@ def list( ~azure.mgmt.devtestlabs.models.ServiceFabricPaged[~azure.mgmt.devtestlabs.models.ServiceFabric] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -112,6 +113,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -122,12 +128,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServiceFabricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServiceFabricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServiceFabricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/servicefabrics'} @@ -142,7 +146,7 @@ def get( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param expand: Specify the $expand query. Example: 'properties($expand=applicableSchedule)' @@ -194,7 +198,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceFabric', response) @@ -261,7 +264,7 @@ def _create_or_update_initial( def create_or_update( self, resource_group_name, lab_name, user_name, name, service_fabric, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or replace an existing Service Fabric. This operation can take a + """Create or replace an existing service fabric. This operation can take a while to complete. :param resource_group_name: The name of the resource group. @@ -270,7 +273,7 @@ def create_or_update( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param service_fabric: A Service Fabric. :type service_fabric: ~azure.mgmt.devtestlabs.models.ServiceFabric @@ -366,7 +369,7 @@ def delete( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the @@ -405,7 +408,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, user_name, name, service_fabric, custom_headers=None, raw=False, **operation_config): - """Modify properties of service fabrics. + """Allows modifying tags of service fabrics. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -413,7 +417,7 @@ def update( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param service_fabric: A Service Fabric. :type service_fabric: @@ -467,7 +471,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceFabric', response) @@ -488,7 +491,7 @@ def list_applicable_schedules( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -535,7 +538,6 @@ def list_applicable_schedules( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ApplicableSchedule', response) @@ -596,7 +598,7 @@ def start( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the @@ -683,7 +685,7 @@ def stop( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_runners_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_runners_operations.py similarity index 71% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_runners_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_runners_operations.py index 83b4e9dae88c..aa464691b2fd 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_runners_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_runners_operations.py @@ -19,6 +19,8 @@ class ServiceRunnersOperations(object): """ServiceRunnersOperations 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. @@ -37,91 +39,6 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def list( - self, resource_group_name, lab_name, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """List service runners in a given lab. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param lab_name: The name of the lab. - :type lab_name: str - :param filter: The filter to apply to the operation. Example: - '$filter=contains(name,'myName') - :type filter: str - :param top: The maximum number of resources to return from the - operation. Example: '$top=10' - :type top: int - :param orderby: The ordering expression for the results, using OData - notation. Example: '$orderby=name desc' - :type orderby: 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: An iterator like instance of ServiceRunner - :rtype: - ~azure.mgmt.devtestlabs.models.ServiceRunnerPaged[~azure.mgmt.devtestlabs.models.ServiceRunner] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.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'), - 'labName': self._serialize.url("lab_name", lab_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # 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 - - return response - - # Deserialize response - deserialized = models.ServiceRunnerPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ServiceRunnerPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/servicerunners'} - def get( self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): """Get service runner. @@ -176,7 +93,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceRunner', response) @@ -189,7 +105,7 @@ def get( def create_or_update( self, resource_group_name, lab_name, name, service_runner, custom_headers=None, raw=False, **operation_config): - """Create or replace an existing Service runner. + """Create or replace an existing service runner. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -248,7 +164,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceRunner', response) if response.status_code == 201: diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/users_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_users_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/users_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_users_operations.py index 5f68155fece3..7e4d74c46fab 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/users_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_users_operations.py @@ -21,6 +21,8 @@ class UsersOperations(object): """UsersOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.UserPaged[~azure.mgmt.devtestlabs.models.User] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -109,6 +110,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.UserPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.UserPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.UserPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('User', response) @@ -391,7 +394,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, name, user, custom_headers=None, raw=False, **operation_config): - """Modify properties of user profiles. + """Allows modifying tags of user profiles. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -449,7 +453,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('User', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machine_schedules_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machine_schedules_operations.py similarity index 98% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machine_schedules_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machine_schedules_operations.py index dadb93a7e064..080a6514a343 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machine_schedules_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machine_schedules_operations.py @@ -21,6 +21,8 @@ class VirtualMachineSchedulesOperations(object): """VirtualMachineSchedulesOperations 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. @@ -71,8 +73,7 @@ def list( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -112,6 +113,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -122,12 +128,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{virtualMachineName}/schedules'} @@ -194,7 +198,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -268,7 +271,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) if response.status_code == 201: @@ -342,7 +344,8 @@ def delete( def update( self, resource_group_name, lab_name, virtual_machine_name, name, schedule, custom_headers=None, raw=False, **operation_config): - """Modify properties of schedules. + """Allows modifying tags of schedules. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -403,7 +406,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machines_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machines_operations.py similarity index 99% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machines_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machines_operations.py index 16c7762bfc04..32c51685fb71 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machines_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machines_operations.py @@ -21,6 +21,8 @@ class VirtualMachinesOperations(object): """VirtualMachinesOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.LabVirtualMachinePaged[~azure.mgmt.devtestlabs.models.LabVirtualMachine] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -109,6 +110,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.LabVirtualMachinePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.LabVirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.LabVirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LabVirtualMachine', response) @@ -254,7 +257,7 @@ def _create_or_update_initial( def create_or_update( self, resource_group_name, lab_name, name, lab_virtual_machine, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or replace an existing Virtual machine. This operation can take + """Create or replace an existing virtual machine. This operation can take a while to complete. :param resource_group_name: The name of the resource group. @@ -392,7 +395,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, name, lab_virtual_machine, custom_headers=None, raw=False, **operation_config): - """Modify properties of virtual machines. + """Allows modifying tags of virtual machines. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -451,7 +455,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LabVirtualMachine', response) @@ -882,7 +885,6 @@ def get_rdp_file_contents( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RdpConnection', response) @@ -947,7 +949,6 @@ def list_applicable_schedules( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ApplicableSchedule', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_networks_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_networks_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_networks_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_networks_operations.py index 12ee56cd36ad..659a7cc31b2f 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_networks_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_networks_operations.py @@ -21,6 +21,8 @@ class VirtualNetworksOperations(object): """VirtualNetworksOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.VirtualNetworkPaged[~azure.mgmt.devtestlabs.models.VirtualNetwork] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -109,6 +110,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VirtualNetworkPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VirtualNetworkPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VirtualNetworkPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VirtualNetwork', response) @@ -391,7 +394,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, name, virtual_network, custom_headers=None, raw=False, **operation_config): - """Modify properties of virtual networks. + """Allows modifying tags of virtual networks. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -450,7 +454,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VirtualNetwork', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py index 7f225c6aab41..20cee28211d4 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "3.0.0" +VERSION = "4.0.0" diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/setup.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/setup.py index c74bcc7d5281..b136f9c8d9bf 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/setup.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/setup.py @@ -53,6 +53,7 @@ version=version, description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), long_description=readme + '\n\n' + history, + long_description_content_type='text/x-rst', license='MIT License', author='Microsoft Corporation', author_email='azpysdkhelp@microsoft.com', @@ -63,7 +64,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', From 307b92e90ec0a3b9def2dca43cf9073247e1b5aa Mon Sep 17 00:00:00 2001 From: annatisch Date: Fri, 26 Jul 2019 12:15:22 -0700 Subject: [PATCH 080/244] [azure-core] Small fixes for aiohttp (#6490) * Aiohttp read timeout * Aiohttp response status code * Aiohttp content type header * Review feedback * Fixed typo * Fixed async transport sleep coroutine * Fix for stream generators * Reverted attribute error handling * Fixed trio sleep test * Fixed identity test mocks * Fix identity mock to return content-type as string * Fix universal policy tests --- sdk/core/azure-core/azure/core/exceptions.py | 1 + .../azure/core/pipeline/policies/universal.py | 2 +- .../azure/core/pipeline/transport/aiohttp.py | 26 +++++++++---------- .../pipeline/transport/requests_asyncio.py | 20 +++++++------- .../core/pipeline/transport/requests_basic.py | 20 ++++++-------- .../core/pipeline/transport/requests_trio.py | 17 +++++------- .../azure_core_asynctests/test_pipeline.py | 17 ++++++++++++ .../tests/test_universal_pipeline.py | 4 +-- sdk/identity/azure-identity/tests/helpers.py | 2 +- .../azure-identity/tests/test_authn_client.py | 8 +++--- .../azure-identity/tests/test_identity.py | 4 +-- .../tests/test_identity_async.py | 4 +-- 12 files changed, 66 insertions(+), 59 deletions(-) diff --git a/sdk/core/azure-core/azure/core/exceptions.py b/sdk/core/azure-core/azure/core/exceptions.py index ae6ff7c53eb8..b69912108a40 100644 --- a/sdk/core/azure-core/azure/core/exceptions.py +++ b/sdk/core/azure-core/azure/core/exceptions.py @@ -114,6 +114,7 @@ def __init__(self, message=None, response=None, **kwargs): if response: self.reason = response.reason self.status_code = response.status_code + message = message or "Operation returned an invalid status '{}'".format(self.reason) try: try: diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/universal.py b/sdk/core/azure-core/azure/core/pipeline/policies/universal.py index 79b48bb162ce..b9338950ff38 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/universal.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/universal.py @@ -350,7 +350,7 @@ def deserialize_from_http_generics(cls, response): # Try to use content-type from headers if available content_type = None if response.content_type: # type: ignore - content_type = response.content_type[0].strip().lower() # type: ignore + content_type = response.content_type.split(";")[0].strip().lower() # type: ignore # Ouch, this server did not declare what it sent... # Let's guess it's JSON... diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/aiohttp.py b/sdk/core/azure-core/azure/core/pipeline/transport/aiohttp.py index f6ee555cea1c..9fb2eb125a5c 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/aiohttp.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/aiohttp.py @@ -31,7 +31,7 @@ import aiohttp from azure.core.configuration import ConnectionConfiguration -from azure.core.exceptions import ServiceRequestError +from azure.core.exceptions import ServiceRequestError, ServiceResponseError from azure.core.pipeline import Pipeline from requests.exceptions import ( @@ -181,7 +181,8 @@ async def send(self, request: HttpRequest, **config: Any) -> Optional[AsyncHttpR await response.load_body() except aiohttp.client_exceptions.ClientConnectorError as err: error = ServiceRequestError(err, error=err) - + except asyncio.TimeoutError as err: + error = ServiceResponseError(err, error=err) if error: raise error return response @@ -191,19 +192,16 @@ class AioHttpStreamDownloadGenerator(AsyncIterator): """Streams the response body data. :param pipeline: The pipeline object - :param request: The request object :param response: The client response object. - :type response: aiohttp.ClientResponse :param block_size: block size of data sent over connection. :type block_size: int """ - def __init__(self, pipeline: Pipeline, request: HttpRequest, - response: aiohttp.ClientResponse, block_size: int) -> None: + def __init__(self, pipeline: Pipeline, response: AsyncHttpResponse) -> None: self.pipeline = pipeline - self.request = request + self.request = response.request self.response = response - self.block_size = block_size - self.content_length = int(response.headers.get('Content-Length', 0)) + self.block_size = response.block_size + self.content_length = int(response.internal_response.headers.get('Content-Length', 0)) self.downloaded = 0 def __len__(self): @@ -215,13 +213,13 @@ async def __anext__(self): retry_interval = 1000 while retry_active: try: - chunk = await self.response.content.read(self.block_size) + chunk = await self.response.internal_response.content.read(self.block_size) if not chunk: raise _ResponseStopIteration() self.downloaded += self.block_size return chunk except _ResponseStopIteration: - self.response.close() + self.response.internal_response.close() raise StopAsyncIteration() except (ChunkedEncodingError, ConnectionError): retry_total -= 1 @@ -233,7 +231,7 @@ async def __anext__(self): resp = self.pipeline.run(self.request, stream=True, headers=headers) if resp.status_code == 416: raise - chunk = await self.response.content.read(self.block_size) + chunk = await self.response.internal_response.content.read(self.block_size) if not chunk: raise StopIteration() self.downloaded += chunk @@ -243,7 +241,7 @@ async def __anext__(self): raise except Exception as err: _LOGGER.warning("Unable to stream download: %s", err) - self.response.close() + self.response.internal_response.close() raise class AioHttpTransportResponse(AsyncHttpResponse): @@ -282,4 +280,4 @@ def stream_download(self, pipeline) -> AsyncIteratorType[bytes]: :param pipeline: The pipeline object :type pipeline: azure.core.pipeline """ - return AioHttpStreamDownloadGenerator(pipeline, self.request, self.internal_response, self.block_size) + return AioHttpStreamDownloadGenerator(pipeline, self) diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/requests_asyncio.py b/sdk/core/azure-core/azure/core/pipeline/transport/requests_asyncio.py index 1f302034a173..6093713c2928 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/requests_asyncio.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/requests_asyncio.py @@ -78,6 +78,9 @@ async def __aenter__(self): async def __aexit__(self, *exc_details): # pylint: disable=arguments-differ return super(AsyncioRequestsTransport, self).__exit__() + async def sleep(self, duration): + await asyncio.sleep(duration) + async def send(self, request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: # type: ignore """Send the request using this HTTP sender. @@ -135,18 +138,16 @@ class AsyncioStreamDownloadGenerator(AsyncIterator): """Streams the response body data. :param pipeline: The pipeline object - :param request: The request object :param response: The response object. - :param int block_size: block size of data sent over connection. :param generator iter_content_func: Iterator for response data. :param int content_length: size of body in bytes. """ - def __init__(self, pipeline: Pipeline, request: HttpRequest, response: requests.Response, block_size: int) -> None: + def __init__(self, pipeline: Pipeline, response: AsyncHttpResponse) -> None: self.pipeline = pipeline - self.request = request + self.request = response.request self.response = response - self.block_size = block_size - self.iter_content_func = self.response.iter_content(self.block_size) + self.block_size = response.block_size + self.iter_content_func = self.response.internal_response.iter_content(self.block_size) self.content_length = int(response.headers.get('Content-Length', 0)) self.downloaded = 0 @@ -170,7 +171,7 @@ async def __anext__(self): self.downloaded += self.block_size return chunk except _ResponseStopIteration: - self.response.close() + self.response.internal_response.close() raise StopAsyncIteration() except (requests.exceptions.ChunkedEncodingError, requests.exceptions.ConnectionError): @@ -197,7 +198,7 @@ async def __anext__(self): raise except Exception as err: _LOGGER.warning("Unable to stream download: %s", err) - self.response.close() + self.response.internal_response.close() raise @@ -206,5 +207,4 @@ class AsyncioRequestsTransportResponse(AsyncHttpResponse, RequestsTransportRespo """ def stream_download(self, pipeline) -> AsyncIteratorType[bytes]: # type: ignore """Generator for streaming request body data.""" - return AsyncioStreamDownloadGenerator(pipeline, self.request, - self.internal_response, self.block_size) # type: ignore + return AsyncioStreamDownloadGenerator(pipeline, self) # type: ignore diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/requests_basic.py b/sdk/core/azure-core/azure/core/pipeline/transport/requests_basic.py index 8907937c9a5a..95757edb63dd 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/requests_basic.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/requests_basic.py @@ -65,9 +65,7 @@ def __init__(self, request, requests_response, block_size=None): self.status_code = requests_response.status_code self.headers = requests_response.headers self.reason = requests_response.reason - content_type = requests_response.headers.get('content-type') - if content_type: - self.content_type = content_type.split(";") + self.content_type = requests_response.headers.get('content-type') def body(self): return self.internal_response.content @@ -82,18 +80,16 @@ class StreamDownloadGenerator(object): """Generator for streaming response data. :param pipeline: The pipeline object - :param request: The request object :param response: The response object. - :param int block_size: Number of bytes to read into memory. :param generator iter_content_func: Iterator for response data. :param int content_length: size of body in bytes. """ - def __init__(self, pipeline, request, response, block_size): + def __init__(self, pipeline, response): self.pipeline = pipeline - self.request = request + self.request = response.request self.response = response - self.block_size = block_size - self.iter_content_func = self.response.iter_content(self.block_size) + self.block_size = response.block_size + self.iter_content_func = self.response.internal_response.iter_content(self.block_size) self.content_length = int(response.headers.get('Content-Length', 0)) self.downloaded = 0 @@ -115,7 +111,7 @@ def __next__(self): self.downloaded += self.block_size return chunk except StopIteration: - self.response.close() + self.response.internal_response.close() raise StopIteration() except (requests.exceptions.ChunkedEncodingError, requests.exceptions.ConnectionError): @@ -138,7 +134,7 @@ def __next__(self): raise except Exception as err: _LOGGER.warning("Unable to stream download: %s", err) - self.response.close() + self.response.internal_response.close() raise next = __next__ # Python 2 compatibility. @@ -149,7 +145,7 @@ class RequestsTransportResponse(HttpResponse, _RequestsTransportResponseBase): def stream_download(self, pipeline): # type: (PipelineType) -> Iterator[bytes] """Generator for streaming request body data.""" - return StreamDownloadGenerator(pipeline, self.request, self.internal_response, self.block_size) + return StreamDownloadGenerator(pipeline, self) class RequestsTransport(HttpTransport): diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/requests_trio.py b/sdk/core/azure-core/azure/core/pipeline/transport/requests_trio.py index c3a1c591587b..f27f034033ea 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/requests_trio.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/requests_trio.py @@ -53,18 +53,16 @@ class TrioStreamDownloadGenerator(AsyncIterator): """Generator for streaming response data. :param pipeline: The pipeline object - :param request: The request object :param response: The response object. - :param int block_size: Number of bytes to read into memory. :param generator iter_content_func: Iterator for response data. :param int content_length: size of body in bytes. """ - def __init__(self, pipeline: Pipeline, request: HttpRequest, response: requests.Response, block_size: int) -> None: + def __init__(self, pipeline: Pipeline, response: AsyncHttpResponse) -> None: self.pipeline = pipeline - self.request = request + self.request = response.request self.response = response - self.block_size = block_size - self.iter_content_func = self.response.iter_content(self.block_size) + self.block_size = response.block_size + self.iter_content_func = self.response.internal_response.iter_content(self.block_size) self.content_length = int(response.headers.get('Content-Length', 0)) self.downloaded = 0 @@ -85,7 +83,7 @@ async def __anext__(self): self.downloaded += self.block_size return chunk except _ResponseStopIteration: - self.response.close() + self.response.internal_response.close() raise StopAsyncIteration() except (requests.exceptions.ChunkedEncodingError, requests.exceptions.ConnectionError): @@ -111,7 +109,7 @@ async def __anext__(self): raise except Exception as err: _LOGGER.warning("Unable to stream download: %s", err) - self.response.close() + self.response.internal_response.close() raise class TrioRequestsTransportResponse(AsyncHttpResponse, RequestsTransportResponse): # type: ignore @@ -120,8 +118,7 @@ class TrioRequestsTransportResponse(AsyncHttpResponse, RequestsTransportResponse def stream_download(self, pipeline) -> AsyncIteratorType[bytes]: # type: ignore """Generator for streaming response data. """ - return TrioStreamDownloadGenerator(pipeline, self.request, - self.internal_response, self.block_size) # type: ignore + return TrioStreamDownloadGenerator(pipeline, self) # type: ignore class TrioRequestsTransport(RequestsTransport, AsyncHttpTransport): # type: ignore diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_pipeline.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_pipeline.py index d344a9f90fff..bcefb9b4bb1a 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_pipeline.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_pipeline.py @@ -119,6 +119,23 @@ async def test_basic_async_requests(): assert response.http_response.status_code == 200 +@pytest.mark.asyncio +async def test_async_transport_sleep(): + + async with AsyncioRequestsTransport() as transport: + await transport.sleep(1) + + async with AioHttpTransport() as transport: + await transport.sleep(1) + +def test_async_trio_transport_sleep(): + + async def do(): + async with TrioRequestsTransport() as transport: + await transport.sleep(1) + + response = trio.run(do) + @pytest.mark.asyncio async def test_conf_async_requests(): diff --git a/sdk/core/azure-core/tests/test_universal_pipeline.py b/sdk/core/azure-core/tests/test_universal_pipeline.py index 0049e2277374..cc783b0d4c74 100644 --- a/sdk/core/azure-core/tests/test_universal_pipeline.py +++ b/sdk/core/azure-core/tests/test_universal_pipeline.py @@ -123,9 +123,7 @@ class MockResponse(HttpResponse): def __init__(self, body, content_type): super(MockResponse, self).__init__(None, None) self._body = body - self.content_type = None - if content_type: - self.content_type = [content_type] + self.content_type = content_type def body(self): return self._body diff --git a/sdk/identity/azure-identity/tests/helpers.py b/sdk/identity/azure-identity/tests/helpers.py index 8acb3d5f646b..694a92df922a 100644 --- a/sdk/identity/azure-identity/tests/helpers.py +++ b/sdk/identity/azure-identity/tests/helpers.py @@ -41,7 +41,7 @@ def mock_response(status_code=200, headers={}, json_payload=None): if json_payload is not None: response.text = lambda: json.dumps(json_payload) response.headers["content-type"] = "application/json" - response.content_type = ["application/json"] + response.content_type = "application/json" return response diff --git a/sdk/identity/azure-identity/tests/test_authn_client.py b/sdk/identity/azure-identity/tests/test_authn_client.py index 39889f003627..1aca947b3d89 100644 --- a/sdk/identity/azure-identity/tests/test_authn_client.py +++ b/sdk/identity/azure-identity/tests/test_authn_client.py @@ -28,7 +28,7 @@ def test_authn_client_deserialization(): scope = "scope" mock_response = Mock( - headers={"content-type": "application/json"}, status_code=200, content_type=["application/json"] + headers={"content-type": "application/json"}, status_code=200, content_type="application/json" ) mock_send = Mock(return_value=mock_response) @@ -87,7 +87,7 @@ def test_caching_when_only_expires_in_set(): text=lambda: json.dumps({"access_token": access_token, "expires_in": expires_in, "token_type": "Bearer"}), headers={"content-type": "application/json"}, status_code=200, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) @@ -106,7 +106,7 @@ def test_expires_in_strings(): expected_token = "token" mock_response = Mock( - headers={"content-type": "application/json"}, status_code=200, content_type=["application/json"] + headers={"content-type": "application/json"}, status_code=200, content_type="application/json" ) mock_send = Mock(return_value=mock_response) @@ -133,7 +133,7 @@ def test_cache_expiry(): text=lambda: json.dumps(token_payload), headers={"content-type": "application/json"}, status_code=200, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index c9756ad3b344..b017792595a8 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -191,7 +191,7 @@ def test_imds_credential_cache(): text=lambda: json.dumps(token_payload), headers={"content-type": "application/json"}, status_code=200, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) @@ -219,7 +219,7 @@ def test_imds_credential_retries(): mock_response = Mock( text=lambda: b"{}", headers={"content-type": "application/json", "Retry-After": "0"}, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) diff --git a/sdk/identity/azure-identity/tests/test_identity_async.py b/sdk/identity/azure-identity/tests/test_identity_async.py index ba203cd2eb59..03b53db9eccd 100644 --- a/sdk/identity/azure-identity/tests/test_identity_async.py +++ b/sdk/identity/azure-identity/tests/test_identity_async.py @@ -196,7 +196,7 @@ async def test_imds_credential_cache(): text=lambda: json.dumps(token_payload), headers={"content-type": "application/json"}, status_code=200, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) @@ -225,7 +225,7 @@ async def test_imds_credential_retries(): mock_response = Mock( text=lambda: b"{}", headers={"content-type": "application/json", "Retry-After": "0"}, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) From a36f0aa3977b54628ff238079633e6a15644312e Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Mon, 29 Jul 2019 14:05:36 -0700 Subject: [PATCH 081/244] decorator only trace very top level function (#6530) --- sdk/core/azure-core/azure/core/tracing/decorator.py | 2 +- .../azure-core/azure/core/tracing/decorator_async.py | 2 +- .../test_tracing_decorator_async.py | 9 +++------ sdk/core/azure-core/tests/test_tracing_decorator.py | 9 +++------ 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 7d5d7bfce407..3986dcaf31ed 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 781e20a6bef2..4df65fee77ef 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index 8b43ddf71a62..82b4f97dc92f 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -139,13 +139,10 @@ async def test_span_with_opencensus_complicated(value): parent = exporter.root assert len(parent.children) == 4 assert parent.children[0].span_data.name == "MockClient.__init__" + assert not parent.children[0].children assert parent.children[1].span_data.name == "MockClient.make_request" - assert parent.children[1].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[1].children[1].span_data.name == "MockClient.make_request" + assert not parent.children[1].children assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index 473060f6097a..764c09396255 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -171,13 +171,10 @@ def test_span_with_opencensus_complicated(self, value): parent = exporter.root assert len(parent.children) == 4 assert parent.children[0].span_data.name == "MockClient.__init__" + assert not parent.children[0].children assert parent.children[1].span_data.name == "MockClient.make_request" - assert parent.children[1].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[1].children[1].span_data.name == "MockClient.make_request" + assert not parent.children[1].children assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children From 6350bf040bb55facebd07da815b9f0177ed3ce38 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Mon, 29 Jul 2019 14:46:26 -0700 Subject: [PATCH 082/244] Import aiohttp only when necessary (#6496) --- sdk/core/azure-core/azure/core/pipeline_client_async.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/core/azure-core/azure/core/pipeline_client_async.py b/sdk/core/azure-core/azure/core/pipeline_client_async.py index 39b6c87c61fb..ad70f9ea7434 100644 --- a/sdk/core/azure-core/azure/core/pipeline_client_async.py +++ b/sdk/core/azure-core/azure/core/pipeline_client_async.py @@ -48,7 +48,6 @@ from .pipeline import AsyncPipeline from .pipeline.transport.base import PipelineClientBase from .pipeline.policies import ContentDecodePolicy -from .pipeline.transport import AioHttpTransport from .pipeline.policies.distributed_tracing import DistributedTracingPolicy @@ -121,6 +120,7 @@ def _build_pipeline(self, config, **kwargs): # pylint: disable=no-self-use ] if not transport: + from .pipeline.transport import AioHttpTransport transport = AioHttpTransport(**kwargs) return AsyncPipeline(transport, policies) From 19880fba84743ccb9dbc8dcf9a290562593abb23 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Mon, 29 Jul 2019 19:03:11 -0700 Subject: [PATCH 083/244] document async transport requirement (#6541) --- sdk/identity/azure-identity/README.md | 6 ++++++ sdk/keyvault/azure-keyvault-keys/README.md | 10 +++++----- sdk/keyvault/azure-keyvault-secrets/README.md | 10 +++++----- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/sdk/identity/azure-identity/README.md b/sdk/identity/azure-identity/README.md index b80aa7cb539b..22b1bf6c2019 100644 --- a/sdk/identity/azure-identity/README.md +++ b/sdk/identity/azure-identity/README.md @@ -173,6 +173,12 @@ client = EventHubClient(host, event_hub_path, credential) ``` ## Async credentials: +This library includes a complete async API supported on Python 3.5+. To use the +async credentials in `azure.identity.aio`, you must first install an async +transport, such as [`aiohttp`](https://pypi.org/project/aiohttp/). See +[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/README.md#transport) +for more information. + This example demonstrates authenticating the asynchronous `SecretClient` from [`azure-keyvault-secrets`][azure_keyvault_secrets] with asynchronous credentials. ```py diff --git a/sdk/keyvault/azure-keyvault-keys/README.md b/sdk/keyvault/azure-keyvault-keys/README.md index 0690e0822427..44d5ee7e9179 100644 --- a/sdk/keyvault/azure-keyvault-keys/README.md +++ b/sdk/keyvault/azure-keyvault-keys/README.md @@ -153,10 +153,11 @@ for key in keys: ``` ### Async operations -Python’s [asyncio package][asyncio_package] and its two keywords `async` and `await` serves to declare, build, execute, and manage asynchronous code. -The package supports async API on Python 3.5+ and is identical to synchronous API. - -The following examples provide code snippets for performing async operations in the Key Client library: +This library includes a complete async API supported on Python 3.5+. To use it, you must +first install an async transport, such as [`aiohttp`](https://pypi.org/project/aiohttp/). +See +[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/README.md#transport) +for more information. ### Asynchronously create a Key `create_rsa_key` and `create_ec_key` create RSA and elliptic curve keys in the vault, respectively. @@ -257,7 +258,6 @@ When you submit a pull request, a CLA-bot will automatically determine whether y This project has adopted the [Microsoft Open Source Code of Conduct][code_of_conduct]. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. -[asyncio_package]: https://docs.python.org/3/library/asyncio.html [azure_cloud_shell]: https://shell.azure.com/bash [azure_core_exceptions]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/docs/exceptions.md [azure_identity]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/identity/azure-identity diff --git a/sdk/keyvault/azure-keyvault-secrets/README.md b/sdk/keyvault/azure-keyvault-secrets/README.md index ab50a297d194..a94af9ac724b 100644 --- a/sdk/keyvault/azure-keyvault-secrets/README.md +++ b/sdk/keyvault/azure-keyvault-secrets/README.md @@ -148,10 +148,11 @@ This example lists all the secrets in the specified Key Vault. ``` ### Async operations -Python’s [asyncio package][asyncio_package] and its two keywords `async` and `await` serves to declare, build, execute, and manage asynchronous code. -The package supports async API on Python 3.5+ and is identical to synchronous API. - -The following examples provide code snippets for performing async operations in the Secret Client library: +This library includes a complete async API supported on Python 3.5+. To use it, you must +first install an async transport, such as [`aiohttp`](https://pypi.org/project/aiohttp/). +See +[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/README.md#transport) +for more information. ### Async create a secret This example creates a secret in the Key Vault with the specified optional arguments. @@ -247,7 +248,6 @@ When you submit a pull request, a CLA-bot will automatically determine whether y This project has adopted the [Microsoft Open Source Code of Conduct][code_of_conduct]. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. -[asyncio_package]: https://docs.python.org/3/library/asyncio.html [azure_cloud_shell]: https://shell.azure.com/bash [azure_core_exceptions]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/docs/exceptions.md [azure_identity]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/identity/azure-identity From 8d4adff07de255ae4e0cda2d564305ee63ce4760 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 29 Jul 2019 19:44:44 -0700 Subject: [PATCH 084/244] [AutoPR] alertsmanagement/resource-manager (#5697) * Generated from f4b30b3785ae1fa51f4333f2acd863137d9c84b2 (#5696) removed "required" field from ExpandDetectorParameter * Packaging update of azure-mgmt-alertsmanagement * Packaging update of azure-mgmt-alertsmanagement * regenerated package * recent version * update history and version... again... * added note about general breaking changes --- .../azure-mgmt-alertsmanagement/HISTORY.rst | 21 + .../azure-mgmt-alertsmanagement/MANIFEST.in | 4 + .../azure-mgmt-alertsmanagement/README.rst | 21 +- .../azure/mgmt/alertsmanagement/__init__.py | 7 +- ...client.py => _alerts_management_client.py} | 61 +- .../mgmt/alertsmanagement/_configuration.py | 55 + .../mgmt/alertsmanagement/models/__init__.py | 192 +- ....py => _alerts_management_client_enums.py} | 35 + .../mgmt/alertsmanagement/models/_models.py | 1704 +++++++++++++++++ .../alertsmanagement/models/_models_py3.py | 1704 +++++++++++++++++ .../alertsmanagement/models/_paged_models.py | 79 + .../mgmt/alertsmanagement/models/alert.py | 46 - .../models/alert_modification.py | 47 - .../models/alert_modification_item.py | 54 - .../models/alert_modification_item_py3.py | 54 - .../models/alert_modification_properties.py | 41 - .../alert_modification_properties_py3.py | 41 - .../models/alert_modification_py3.py | 47 - .../alertsmanagement/models/alert_paged.py | 27 - .../models/alert_properties.py | 36 - .../models/alert_properties_py3.py | 36 - .../mgmt/alertsmanagement/models/alert_py3.py | 46 - .../alertsmanagement/models/alerts_summary.py | 46 - .../models/alerts_summary_group.py | 41 - .../models/alerts_summary_group_item.py | 41 - .../models/alerts_summary_group_item_py3.py | 41 - .../models/alerts_summary_group_py3.py | 41 - .../models/alerts_summary_py3.py | 46 - .../alertsmanagement/models/essentials.py | 138 -- .../alertsmanagement/models/essentials_py3.py | 138 -- .../mgmt/alertsmanagement/models/operation.py | 32 - .../models/operation_display.py | 40 - .../models/operation_display_py3.py | 40 - .../models/operation_paged.py | 27 - .../alertsmanagement/models/operation_py3.py | 32 - .../mgmt/alertsmanagement/models/resource.py | 45 - .../alertsmanagement/models/resource_py3.py | 45 - .../alertsmanagement/models/smart_group.py | 118 -- .../models/smart_group_aggregated_property.py | 32 - .../smart_group_aggregated_property_py3.py | 32 - .../models/smart_group_modification.py | 47 - .../models/smart_group_modification_item.py | 54 - .../smart_group_modification_item_py3.py | 54 - .../smart_group_modification_properties.py | 45 - ...smart_group_modification_properties_py3.py | 45 - .../models/smart_group_modification_py3.py | 47 - .../models/smart_group_py3.py | 118 -- .../models/smart_groups_list.py | 32 - .../models/smart_groups_list_py3.py | 32 - .../alertsmanagement/operations/__init__.py | 10 +- .../operations/_action_rules_operations.py | 575 ++++++ ...ts_operations.py => _alerts_operations.py} | 162 +- .../{operations.py => _operations.py} | 20 +- .../_smart_detector_alert_rules_operations.py | 436 +++++ ...rations.py => _smart_groups_operations.py} | 180 +- .../azure/mgmt/alertsmanagement/version.py | 2 +- .../azure-mgmt-alertsmanagement/setup.py | 2 +- 57 files changed, 5003 insertions(+), 2191 deletions(-) rename sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/{alerts_management_client.py => _alerts_management_client.py} (57%) create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py rename sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/{alerts_management_client_enums.py => _alerts_management_client_enums.py} (84%) create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models.py create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models_py3.py create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_paged_models.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_paged.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_paged.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list_py3.py create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_action_rules_operations.py rename sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/{alerts_operations.py => _alerts_operations.py} (81%) rename sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/{operations.py => _operations.py} (87%) create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py rename sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/{smart_groups_operations.py => _smart_groups_operations.py} (70%) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/HISTORY.rst b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/HISTORY.rst index 2719b1b9c080..145999b84643 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/HISTORY.rst +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/HISTORY.rst @@ -3,6 +3,27 @@ Release History =============== +0.2.0rc1 (2019-07-29) ++++++++++++++++++++++ + +**Features** + +- Added operation AlertsOperations.meta_data +- Added operation group SmartDetectorAlertRulesOperations +- Added operation group ActionRulesOperations + +**General breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes if from some import. +In summary, some modules were incorrectly visible/importable and have been renamed. This fixed several issues caused by usage of classes that were not supposed to be used in the first place. + +- AlertsManagementClient cannot be imported from `azure.mgmt.alertsmanagement.alerts_management_client` anymore (import from `azure.mgmt.alertsmanagement` works like before) +- AlertsManagementClientConfiguration import has been moved from `azure.mgmt.alertsmanagement.alerts_management_client` to `azure.mgmt.alertsmanagement` +- A model `MyClass` from a "models" sub-module cannot be imported anymore using `azure.mgmt.alertsmanagement.models.my_class` (import from `azure.mgmt.alertsmanagement.models` works like before) +- An operation class `MyClassOperations` from an `operations` sub-module cannot be imported anymore using `azure.mgmt.alertsmanagement.operations.my_class_operations` (import from `azure.mgmt.alertsmanagement.operations` works like before) + +Last but not least, HTTP connection pooling is now enabled by default. You should always use a client as a context manager, or call close(), or use no more than one client per process. + 0.1.0 (2018-09-17) ++++++++++++++++++ diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/MANIFEST.in b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/MANIFEST.in index bb37a2723dae..e4884efef41b 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/MANIFEST.in +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/MANIFEST.in @@ -1 +1,5 @@ +recursive-include tests *.py *.yaml include *.rst +include azure/__init__.py +include azure/mgmt/__init__.py + diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/README.rst b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/README.rst index aa17aea1b51f..dad7b90d290e 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/README.rst +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Alerts Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see For a more complete set of Azure libraries, see the `azure `__ bundle package. -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - Usage ===== diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/__init__.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/__init__.py index 5512ab09648e..97a96941bfdd 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/__init__.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .alerts_management_client import AlertsManagementClient -from .version import VERSION +from ._configuration import AlertsManagementClientConfiguration +from ._alerts_management_client import AlertsManagementClient +__all__ = ['AlertsManagementClient', 'AlertsManagementClientConfiguration'] -__all__ = ['AlertsManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/alerts_management_client.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_alerts_management_client.py similarity index 57% rename from sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/alerts_management_client.py rename to sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_alerts_management_client.py index 735b0c12b85c..dea82c97209f 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/alerts_management_client.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_alerts_management_client.py @@ -11,46 +11,14 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.alerts_operations import AlertsOperations -from .operations.smart_groups_operations import SmartGroupsOperations -from . import models - - -class AlertsManagementClientConfiguration(AzureConfiguration): - """Configuration for AlertsManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'http://localhost' - - super(AlertsManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-alertsmanagement/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import AlertsManagementClientConfiguration +from .operations import Operations +from .operations import AlertsOperations +from .operations import SmartGroupsOperations +from .operations import ActionRulesOperations +from .operations import SmartDetectorAlertRulesOperations +from . import models class AlertsManagementClient(SDKClient): @@ -65,6 +33,10 @@ class AlertsManagementClient(SDKClient): :vartype alerts: azure.mgmt.alertsmanagement.operations.AlertsOperations :ivar smart_groups: SmartGroups operations :vartype smart_groups: azure.mgmt.alertsmanagement.operations.SmartGroupsOperations + :ivar action_rules: ActionRules operations + :vartype action_rules: azure.mgmt.alertsmanagement.operations.ActionRulesOperations + :ivar smart_detector_alert_rules: SmartDetectorAlertRules operations + :vartype smart_detector_alert_rules: azure.mgmt.alertsmanagement.operations.SmartDetectorAlertRulesOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -73,17 +45,18 @@ class AlertsManagementClient(SDKClient): Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. :type subscription_id: str + :param subscription_id1: The Azure subscription id. + :type subscription_id1: str :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, base_url=None): + self, credentials, subscription_id, subscription_id1, base_url=None): - self.config = AlertsManagementClientConfiguration(credentials, subscription_id, base_url) + self.config = AlertsManagementClientConfiguration(credentials, subscription_id, subscription_id1, base_url) super(AlertsManagementClient, 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 = '2018-05-05' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -93,3 +66,7 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.smart_groups = SmartGroupsOperations( self._client, self.config, self._serialize, self._deserialize) + self.action_rules = ActionRulesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.smart_detector_alert_rules = SmartDetectorAlertRulesOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py new file mode 100644 index 000000000000..cc778d8d1c6d --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class AlertsManagementClientConfiguration(AzureConfiguration): + """Configuration for AlertsManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param subscription_id1: The Azure subscription id. + :type subscription_id1: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, subscription_id1, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if subscription_id1 is None: + raise ValueError("Parameter 'subscription_id1' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(AlertsManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-alertsmanagement/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + self.subscription_id1 = subscription_id1 diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py index b5d44aef16b9..84870cf01aa0 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py @@ -10,46 +10,97 @@ # -------------------------------------------------------------------------- try: - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .resource_py3 import Resource - from .essentials_py3 import Essentials - from .alert_properties_py3 import AlertProperties - from .alert_py3 import Alert - from .alert_modification_item_py3 import AlertModificationItem - from .alert_modification_properties_py3 import AlertModificationProperties - from .alert_modification_py3 import AlertModification - from .smart_group_modification_item_py3 import SmartGroupModificationItem - from .smart_group_modification_properties_py3 import SmartGroupModificationProperties - from .smart_group_modification_py3 import SmartGroupModification - from .alerts_summary_group_item_py3 import AlertsSummaryGroupItem - from .alerts_summary_group_py3 import AlertsSummaryGroup - from .alerts_summary_py3 import AlertsSummary - from .smart_group_aggregated_property_py3 import SmartGroupAggregatedProperty - from .smart_group_py3 import SmartGroup - from .smart_groups_list_py3 import SmartGroupsList + from ._models_py3 import ActionGroup + from ._models_py3 import ActionGroupsInformation + from ._models_py3 import ActionRule + from ._models_py3 import ActionRuleProperties + from ._models_py3 import Alert + from ._models_py3 import AlertModification + from ._models_py3 import AlertModificationItem + from ._models_py3 import AlertModificationProperties + from ._models_py3 import AlertProperties + from ._models_py3 import AlertRule + from ._models_py3 import AlertRulePatchObject + from ._models_py3 import AlertsMetaData + from ._models_py3 import AlertsMetaDataProperties + from ._models_py3 import AlertsSummary + from ._models_py3 import AlertsSummaryGroup + from ._models_py3 import AlertsSummaryGroupItem + from ._models_py3 import AzureResource + from ._models_py3 import Condition + from ._models_py3 import Conditions + from ._models_py3 import Detector + from ._models_py3 import Diagnostics + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import ErrorResponse1, ErrorResponse1Exception + from ._models_py3 import ErrorResponseBody + from ._models_py3 import Essentials + from ._models_py3 import ManagedResource + from ._models_py3 import MonitorServiceDetails + from ._models_py3 import MonitorServiceList + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import PatchObject + from ._models_py3 import Resource + from ._models_py3 import Scope + from ._models_py3 import SmartGroup + from ._models_py3 import SmartGroupAggregatedProperty + from ._models_py3 import SmartGroupModification + from ._models_py3 import SmartGroupModificationItem + from ._models_py3 import SmartGroupModificationProperties + from ._models_py3 import Suppression + from ._models_py3 import SuppressionConfig + from ._models_py3 import SuppressionSchedule + from ._models_py3 import ThrottlingInformation except (SyntaxError, ImportError): - from .operation_display import OperationDisplay - from .operation import Operation - from .resource import Resource - from .essentials import Essentials - from .alert_properties import AlertProperties - from .alert import Alert - from .alert_modification_item import AlertModificationItem - from .alert_modification_properties import AlertModificationProperties - from .alert_modification import AlertModification - from .smart_group_modification_item import SmartGroupModificationItem - from .smart_group_modification_properties import SmartGroupModificationProperties - from .smart_group_modification import SmartGroupModification - from .alerts_summary_group_item import AlertsSummaryGroupItem - from .alerts_summary_group import AlertsSummaryGroup - from .alerts_summary import AlertsSummary - from .smart_group_aggregated_property import SmartGroupAggregatedProperty - from .smart_group import SmartGroup - from .smart_groups_list import SmartGroupsList -from .operation_paged import OperationPaged -from .alert_paged import AlertPaged -from .alerts_management_client_enums import ( + from ._models import ActionGroup + from ._models import ActionGroupsInformation + from ._models import ActionRule + from ._models import ActionRuleProperties + from ._models import Alert + from ._models import AlertModification + from ._models import AlertModificationItem + from ._models import AlertModificationProperties + from ._models import AlertProperties + from ._models import AlertRule + from ._models import AlertRulePatchObject + from ._models import AlertsMetaData + from ._models import AlertsMetaDataProperties + from ._models import AlertsSummary + from ._models import AlertsSummaryGroup + from ._models import AlertsSummaryGroupItem + from ._models import AzureResource + from ._models import Condition + from ._models import Conditions + from ._models import Detector + from ._models import Diagnostics + from ._models import ErrorResponse, ErrorResponseException + from ._models import ErrorResponse1, ErrorResponse1Exception + from ._models import ErrorResponseBody + from ._models import Essentials + from ._models import ManagedResource + from ._models import MonitorServiceDetails + from ._models import MonitorServiceList + from ._models import Operation + from ._models import OperationDisplay + from ._models import PatchObject + from ._models import Resource + from ._models import Scope + from ._models import SmartGroup + from ._models import SmartGroupAggregatedProperty + from ._models import SmartGroupModification + from ._models import SmartGroupModificationItem + from ._models import SmartGroupModificationProperties + from ._models import Suppression + from ._models import SuppressionConfig + from ._models import SuppressionSchedule + from ._models import ThrottlingInformation +from ._paged_models import ActionRulePaged +from ._paged_models import AlertPaged +from ._paged_models import AlertRulePaged +from ._paged_models import OperationPaged +from ._paged_models import SmartGroupPaged +from ._alerts_management_client_enums import ( Severity, SignalType, AlertState, @@ -58,6 +109,11 @@ AlertModificationEvent, SmartGroupModificationEvent, State, + ScopeType, + Operator, + SuppressionType, + ActionRuleStatus, + AlertRuleState, TimeRange, AlertsSortByFields, AlertsSummaryGroupByFields, @@ -65,26 +121,53 @@ ) __all__ = [ - 'OperationDisplay', - 'Operation', - 'Resource', - 'Essentials', - 'AlertProperties', + 'ActionGroup', + 'ActionGroupsInformation', + 'ActionRule', + 'ActionRuleProperties', 'Alert', + 'AlertModification', 'AlertModificationItem', 'AlertModificationProperties', - 'AlertModification', - 'SmartGroupModificationItem', - 'SmartGroupModificationProperties', - 'SmartGroupModification', - 'AlertsSummaryGroupItem', - 'AlertsSummaryGroup', + 'AlertProperties', + 'AlertRule', + 'AlertRulePatchObject', + 'AlertsMetaData', + 'AlertsMetaDataProperties', 'AlertsSummary', - 'SmartGroupAggregatedProperty', + 'AlertsSummaryGroup', + 'AlertsSummaryGroupItem', + 'AzureResource', + 'Condition', + 'Conditions', + 'Detector', + 'Diagnostics', + 'ErrorResponse', 'ErrorResponseException', + 'ErrorResponse1', 'ErrorResponse1Exception', + 'ErrorResponseBody', + 'Essentials', + 'ManagedResource', + 'MonitorServiceDetails', + 'MonitorServiceList', + 'Operation', + 'OperationDisplay', + 'PatchObject', + 'Resource', + 'Scope', 'SmartGroup', - 'SmartGroupsList', + 'SmartGroupAggregatedProperty', + 'SmartGroupModification', + 'SmartGroupModificationItem', + 'SmartGroupModificationProperties', + 'Suppression', + 'SuppressionConfig', + 'SuppressionSchedule', + 'ThrottlingInformation', 'OperationPaged', 'AlertPaged', + 'SmartGroupPaged', + 'ActionRulePaged', + 'AlertRulePaged', 'Severity', 'SignalType', 'AlertState', @@ -93,6 +176,11 @@ 'AlertModificationEvent', 'SmartGroupModificationEvent', 'State', + 'ScopeType', + 'Operator', + 'SuppressionType', + 'ActionRuleStatus', + 'AlertRuleState', 'TimeRange', 'AlertsSortByFields', 'AlertsSummaryGroupByFields', diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_management_client_enums.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_alerts_management_client_enums.py similarity index 84% rename from sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_management_client_enums.py rename to sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_alerts_management_client_enums.py index f3295fc6ef88..2d9334e583c7 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_management_client_enums.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_alerts_management_client_enums.py @@ -81,6 +81,41 @@ class State(str, Enum): closed = "Closed" +class ScopeType(str, Enum): + + resource_group = "ResourceGroup" + resource = "Resource" + + +class Operator(str, Enum): + + equals = "Equals" + not_equals = "NotEquals" + contains = "Contains" + does_not_contain = "DoesNotContain" + + +class SuppressionType(str, Enum): + + always = "Always" + once = "Once" + daily = "Daily" + weekly = "Weekly" + monthly = "Monthly" + + +class ActionRuleStatus(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class AlertRuleState(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + class TimeRange(str, Enum): oneh = "1h" diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models.py new file mode 100644 index 000000000000..a602fe2c9347 --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models.py @@ -0,0 +1,1704 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ActionRuleProperties(Model): + """Action rule properties defining scope, conditions, suppression logic for + action rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Suppression, ActionGroup, Diagnostics + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Suppression': 'Suppression', 'ActionGroup': 'ActionGroup', 'Diagnostics': 'Diagnostics'} + } + + def __init__(self, **kwargs): + super(ActionRuleProperties, self).__init__(**kwargs) + self.scope = kwargs.get('scope', None) + self.conditions = kwargs.get('conditions', None) + self.description = kwargs.get('description', None) + self.created_at = None + self.last_modified_at = None + self.created_by = None + self.last_modified_by = None + self.status = kwargs.get('status', None) + self.type = None + + +class ActionGroup(ActionRuleProperties): + """Action Group based Action Rule. + + Action rule with action group configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + :param action_group_id: Required. Action group to trigger if action rule + matches + :type action_group_id: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + 'action_group_id': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'action_group_id': {'key': 'actionGroupId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ActionGroup, self).__init__(**kwargs) + self.action_group_id = kwargs.get('action_group_id', None) + self.type = 'ActionGroup' + + +class ActionGroupsInformation(Model): + """The Action Groups information, used by the alert rule. + + All required parameters must be populated in order to send to Azure. + + :param custom_email_subject: An optional custom email subject to use in + email notifications. + :type custom_email_subject: str + :param custom_webhook_payload: An optional custom web-hook payload to use + in web-hook notifications. + :type custom_webhook_payload: str + :param group_ids: Required. The Action Group resource IDs. + :type group_ids: list[str] + """ + + _validation = { + 'group_ids': {'required': True}, + } + + _attribute_map = { + 'custom_email_subject': {'key': 'customEmailSubject', 'type': 'str'}, + 'custom_webhook_payload': {'key': 'customWebhookPayload', 'type': 'str'}, + 'group_ids': {'key': 'groupIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ActionGroupsInformation, self).__init__(**kwargs) + self.custom_email_subject = kwargs.get('custom_email_subject', None) + self.custom_webhook_payload = kwargs.get('custom_webhook_payload', None) + self.group_ids = kwargs.get('group_ids', None) + + +class Resource(Model): + """An azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + + +class ManagedResource(Resource): + """An azure managed resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ManagedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ActionRule(ManagedResource): + """Action rule object containing target scope, conditions and suppression + logic. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param properties: action rule properties + :type properties: ~azure.mgmt.alertsmanagement.models.ActionRuleProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'ActionRuleProperties'}, + } + + def __init__(self, **kwargs): + super(ActionRule, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class Alert(Resource): + """An alert created in alert management service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: ~azure.mgmt.alertsmanagement.models.AlertProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertProperties'}, + } + + def __init__(self, **kwargs): + super(Alert, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AlertModification(Resource): + """Alert Modification details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.AlertModificationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertModificationProperties'}, + } + + def __init__(self, **kwargs): + super(AlertModification, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AlertModificationItem(Model): + """Alert modification item. + + :param modification_event: Reason for the modification. Possible values + include: 'AlertCreated', 'StateChange', 'MonitorConditionChange' + :type modification_event: str or + ~azure.mgmt.alertsmanagement.models.AlertModificationEvent + :param old_value: Old value + :type old_value: str + :param new_value: New value + :type new_value: str + :param modified_at: Modified date and time + :type modified_at: str + :param modified_by: Modified user details (Principal client name) + :type modified_by: str + :param comments: Modification comments + :type comments: str + :param description: Description of the modification + :type description: str + """ + + _attribute_map = { + 'modification_event': {'key': 'modificationEvent', 'type': 'AlertModificationEvent'}, + 'old_value': {'key': 'oldValue', 'type': 'str'}, + 'new_value': {'key': 'newValue', 'type': 'str'}, + 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AlertModificationItem, self).__init__(**kwargs) + self.modification_event = kwargs.get('modification_event', None) + self.old_value = kwargs.get('old_value', None) + self.new_value = kwargs.get('new_value', None) + self.modified_at = kwargs.get('modified_at', None) + self.modified_by = kwargs.get('modified_by', None) + self.comments = kwargs.get('comments', None) + self.description = kwargs.get('description', None) + + +class AlertModificationProperties(Model): + """Properties of the alert modification item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar alert_id: Unique Id of the alert for which the history is being + retrieved + :vartype alert_id: str + :param modifications: Modification details + :type modifications: + list[~azure.mgmt.alertsmanagement.models.AlertModificationItem] + """ + + _validation = { + 'alert_id': {'readonly': True}, + } + + _attribute_map = { + 'alert_id': {'key': 'alertId', 'type': 'str'}, + 'modifications': {'key': 'modifications', 'type': '[AlertModificationItem]'}, + } + + def __init__(self, **kwargs): + super(AlertModificationProperties, self).__init__(**kwargs) + self.alert_id = None + self.modifications = kwargs.get('modifications', None) + + +class AlertProperties(Model): + """Alert property bag. + + :param essentials: + :type essentials: ~azure.mgmt.alertsmanagement.models.Essentials + :param context: + :type context: object + :param egress_config: + :type egress_config: object + """ + + _attribute_map = { + 'essentials': {'key': 'essentials', 'type': 'Essentials'}, + 'context': {'key': 'context', 'type': 'object'}, + 'egress_config': {'key': 'egressConfig', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AlertProperties, self).__init__(**kwargs) + self.essentials = kwargs.get('essentials', None) + self.context = kwargs.get('context', None) + self.egress_config = kwargs.get('egress_config', None) + + +class AzureResource(Model): + """An Azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param location: The resource location. Default value: "global" . + :type location: str + :param tags: The resource tags. + :type tags: object + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureResource, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.location = kwargs.get('location', "global") + self.tags = kwargs.get('tags', None) + + +class AlertRule(AzureResource): + """The alert rule information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param location: The resource location. Default value: "global" . + :type location: str + :param tags: The resource tags. + :type tags: object + :param description: The alert rule description. + :type description: str + :param state: Required. The alert rule state. Possible values include: + 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.alertsmanagement.models.AlertRuleState + :param severity: Required. The alert rule severity. Possible values + include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param frequency: Required. The alert rule frequency in ISO8601 format. + The time granularity must be in minutes and minimum value is 5 minutes. + :type frequency: timedelta + :param detector: Required. The alert rule's detector. + :type detector: ~azure.mgmt.alertsmanagement.models.Detector + :param scope: Required. The alert rule resources scope. + :type scope: list[str] + :param action_groups: Required. The alert rule actions. + :type action_groups: + ~azure.mgmt.alertsmanagement.models.ActionGroupsInformation + :param throttling: The alert rule throttling information. + :type throttling: + ~azure.mgmt.alertsmanagement.models.ThrottlingInformation + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'state': {'required': True}, + 'severity': {'required': True}, + 'frequency': {'required': True}, + 'detector': {'required': True}, + 'scope': {'required': True}, + 'action_groups': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'duration'}, + 'detector': {'key': 'properties.detector', 'type': 'Detector'}, + 'scope': {'key': 'properties.scope', 'type': '[str]'}, + 'action_groups': {'key': 'properties.actionGroups', 'type': 'ActionGroupsInformation'}, + 'throttling': {'key': 'properties.throttling', 'type': 'ThrottlingInformation'}, + } + + def __init__(self, **kwargs): + super(AlertRule, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.state = kwargs.get('state', None) + self.severity = kwargs.get('severity', None) + self.frequency = kwargs.get('frequency', None) + self.detector = kwargs.get('detector', None) + self.scope = kwargs.get('scope', None) + self.action_groups = kwargs.get('action_groups', None) + self.throttling = kwargs.get('throttling', None) + + +class AlertRulePatchObject(Model): + """The alert rule patch information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param tags: The resource tags. + :type tags: object + :param description: The alert rule description. + :type description: str + :param state: The alert rule state. Possible values include: 'Enabled', + 'Disabled' + :type state: str or ~azure.mgmt.alertsmanagement.models.AlertRuleState + :param severity: The alert rule severity. Possible values include: 'Sev0', + 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param frequency: The alert rule frequency in ISO8601 format. The time + granularity must be in minutes and minimum value is 5 minutes. + :type frequency: timedelta + :param action_groups: The alert rule actions. + :type action_groups: + ~azure.mgmt.alertsmanagement.models.ActionGroupsInformation + :param throttling: The alert rule throttling information. + :type throttling: + ~azure.mgmt.alertsmanagement.models.ThrottlingInformation + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'duration'}, + 'action_groups': {'key': 'properties.actionGroups', 'type': 'ActionGroupsInformation'}, + 'throttling': {'key': 'properties.throttling', 'type': 'ThrottlingInformation'}, + } + + def __init__(self, **kwargs): + super(AlertRulePatchObject, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.tags = kwargs.get('tags', None) + self.description = kwargs.get('description', None) + self.state = kwargs.get('state', None) + self.severity = kwargs.get('severity', None) + self.frequency = kwargs.get('frequency', None) + self.action_groups = kwargs.get('action_groups', None) + self.throttling = kwargs.get('throttling', None) + + +class AlertsMetaData(Model): + """alert meta data information. + + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.AlertsMetaDataProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'AlertsMetaDataProperties'}, + } + + def __init__(self, **kwargs): + super(AlertsMetaData, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AlertsMetaDataProperties(Model): + """alert meta data property bag. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MonitorServiceList + + All required parameters must be populated in order to send to Azure. + + :param metadata_identifier: Required. Constant filled by server. + :type metadata_identifier: str + """ + + _validation = { + 'metadata_identifier': {'required': True}, + } + + _attribute_map = { + 'metadata_identifier': {'key': 'metadataIdentifier', 'type': 'str'}, + } + + _subtype_map = { + 'metadata_identifier': {'MonitorServiceList': 'MonitorServiceList'} + } + + def __init__(self, **kwargs): + super(AlertsMetaDataProperties, self).__init__(**kwargs) + self.metadata_identifier = None + + +class AlertsSummary(Resource): + """Summary of alerts based on the input filters and 'groupby' parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroup + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertsSummaryGroup'}, + } + + def __init__(self, **kwargs): + super(AlertsSummary, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AlertsSummaryGroup(Model): + """Group the result set. + + :param total: Total count of the result set. + :type total: int + :param smart_groups_count: Total count of the smart groups. + :type smart_groups_count: int + :param groupedby: Name of the field aggregated + :type groupedby: str + :param values: List of the items + :type values: + list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] + """ + + _attribute_map = { + 'total': {'key': 'total', 'type': 'int'}, + 'smart_groups_count': {'key': 'smartGroupsCount', 'type': 'int'}, + 'groupedby': {'key': 'groupedby', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryGroup, self).__init__(**kwargs) + self.total = kwargs.get('total', None) + self.smart_groups_count = kwargs.get('smart_groups_count', None) + self.groupedby = kwargs.get('groupedby', None) + self.values = kwargs.get('values', None) + + +class AlertsSummaryGroupItem(Model): + """Alerts summary group item. + + :param name: Value of the aggregated field + :type name: str + :param count: Count of the aggregated field + :type count: int + :param groupedby: Name of the field aggregated + :type groupedby: str + :param values: List of the items + :type values: + list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'groupedby': {'key': 'groupedby', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryGroupItem, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.count = kwargs.get('count', None) + self.groupedby = kwargs.get('groupedby', None) + self.values = kwargs.get('values', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Condition(Model): + """condition to trigger an action rule. + + :param operator: operator for a given condition. Possible values include: + 'Equals', 'NotEquals', 'Contains', 'DoesNotContain' + :type operator: str or ~azure.mgmt.alertsmanagement.models.Operator + :param values: list of values to match for a given condition. + :type values: list[str] + """ + + _attribute_map = { + 'operator': {'key': 'operator', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Condition, self).__init__(**kwargs) + self.operator = kwargs.get('operator', None) + self.values = kwargs.get('values', None) + + +class Conditions(Model): + """Conditions in alert instance to be matched for a given action rule. Default + value is all. Multiple values could be provided with comma separation. + + :param severity: filter alerts by severity + :type severity: ~azure.mgmt.alertsmanagement.models.Condition + :param monitor_service: filter alerts by monitor service + :type monitor_service: ~azure.mgmt.alertsmanagement.models.Condition + :param monitor_condition: filter alerts by monitor condition + :type monitor_condition: ~azure.mgmt.alertsmanagement.models.Condition + :param target_resource_type: filter alerts by target resource type + :type target_resource_type: ~azure.mgmt.alertsmanagement.models.Condition + :param alert_rule_id: filter alerts by alert rule id + :type alert_rule_id: ~azure.mgmt.alertsmanagement.models.Condition + :param description: filter alerts by alert rule description + :type description: ~azure.mgmt.alertsmanagement.models.Condition + :param alert_context: filter alerts by alert context (payload) + :type alert_context: ~azure.mgmt.alertsmanagement.models.Condition + """ + + _attribute_map = { + 'severity': {'key': 'severity', 'type': 'Condition'}, + 'monitor_service': {'key': 'monitorService', 'type': 'Condition'}, + 'monitor_condition': {'key': 'monitorCondition', 'type': 'Condition'}, + 'target_resource_type': {'key': 'targetResourceType', 'type': 'Condition'}, + 'alert_rule_id': {'key': 'alertRuleId', 'type': 'Condition'}, + 'description': {'key': 'description', 'type': 'Condition'}, + 'alert_context': {'key': 'alertContext', 'type': 'Condition'}, + } + + def __init__(self, **kwargs): + super(Conditions, self).__init__(**kwargs) + self.severity = kwargs.get('severity', None) + self.monitor_service = kwargs.get('monitor_service', None) + self.monitor_condition = kwargs.get('monitor_condition', None) + self.target_resource_type = kwargs.get('target_resource_type', None) + self.alert_rule_id = kwargs.get('alert_rule_id', None) + self.description = kwargs.get('description', None) + self.alert_context = kwargs.get('alert_context', None) + + +class Detector(Model): + """The detector information. By default this is not populated, unless it's + specified in expandDetector. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The detector id. + :type id: str + :param parameters: The detector's parameters.' + :type parameters: dict[str, object] + :param name: The Smart Detector name. By default this is not populated, + unless it's specified in expandDetector + :type name: str + :param description: The Smart Detector description. By default this is not + populated, unless it's specified in expandDetector + :type description: str + :param supported_resource_types: The Smart Detector supported resource + types. By default this is not populated, unless it's specified in + expandDetector + :type supported_resource_types: list[str] + :param image_paths: The Smart Detector image path. By default this is not + populated, unless it's specified in expandDetector + :type image_paths: list[str] + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'supported_resource_types': {'key': 'supportedResourceTypes', 'type': '[str]'}, + 'image_paths': {'key': 'imagePaths', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Detector, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.parameters = kwargs.get('parameters', None) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.supported_resource_types = kwargs.get('supported_resource_types', None) + self.image_paths = kwargs.get('image_paths', None) + + +class Diagnostics(ActionRuleProperties): + """Diagnostics based Action Rule. + + Action rule with diagnostics configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Diagnostics, self).__init__(**kwargs) + self.type = 'Diagnostics' + + +class ErrorResponse(Model): + """An error response from the service. + + :param error: + :type error: ~azure.mgmt.alertsmanagement.models.ErrorResponseBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class ErrorResponse1(Model): + """Describe the format of an Error response. + + :param code: Error code + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse1, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class ErrorResponse1Exception(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse1'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponse1Exception, self).__init__(deserialize, response, 'ErrorResponse1', *args) + + +class ErrorResponseBody(Model): + """Details of error response. + + :param code: Error code, intended to be consumed programmatically. + :type code: str + :param message: Description of the error, intended for display in user + interface. + :type message: str + :param target: Target of the particular error, for example name of the + property. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.alertsmanagement.models.ErrorResponseBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorResponseBody]'}, + } + + def __init__(self, **kwargs): + super(ErrorResponseBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class Essentials(Model): + """This object contains consistent fields across different monitor services. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar severity: Severity of alert Sev0 being highest and Sev4 being + lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :ivar signal_type: The type of signal the alert is based on, which could + be metrics, logs or activity logs. Possible values include: 'Metric', + 'Log', 'Unknown' + :vartype signal_type: str or + ~azure.mgmt.alertsmanagement.models.SignalType + :ivar alert_state: Alert object state, which can be modified by the user. + Possible values include: 'New', 'Acknowledged', 'Closed' + :vartype alert_state: str or + ~azure.mgmt.alertsmanagement.models.AlertState + :ivar monitor_condition: Condition of the rule at the monitor service. It + represents whether the underlying conditions have crossed the defined + alert rule thresholds. Possible values include: 'Fired', 'Resolved' + :vartype monitor_condition: str or + ~azure.mgmt.alertsmanagement.models.MonitorCondition + :param target_resource: Target ARM resource, on which alert got created. + :type target_resource: str + :param target_resource_name: Name of the target ARM resource name, on + which alert got created. + :type target_resource_name: str + :param target_resource_group: Resource group of target ARM resource, on + which alert got created. + :type target_resource_group: str + :param target_resource_type: Resource type of target ARM resource, on + which alert got created. + :type target_resource_type: str + :ivar monitor_service: Monitor service on which the rule(monitor) is set. + Possible values include: 'Application Insights', 'ActivityLog + Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', + 'ActivityLog Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', + 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', + 'Zabbix' + :vartype monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :ivar alert_rule: Rule(monitor) which fired alert instance. Depending on + the monitor service, this would be ARM id or name of the rule. + :vartype alert_rule: str + :ivar source_created_id: Unique Id created by monitor service for each + alert instance. This could be used to track the issue at the monitor + service, in case of Nagios, Zabbix, SCOM etc. + :vartype source_created_id: str + :ivar smart_group_id: Unique Id of the smart group + :vartype smart_group_id: str + :ivar smart_grouping_reason: Verbose reason describing the reason why this + alert instance is added to a smart group + :vartype smart_grouping_reason: str + :ivar start_date_time: Creation time(ISO-8601 format) of alert instance. + :vartype start_date_time: datetime + :ivar last_modified_date_time: Last modification time(ISO-8601 format) of + alert instance. + :vartype last_modified_date_time: datetime + :ivar monitor_condition_resolved_date_time: Resolved time(ISO-8601 format) + of alert instance. This will be updated when monitor service resolves the + alert instance because the rule condition is no longer met. + :vartype monitor_condition_resolved_date_time: datetime + :ivar last_modified_user_name: User who last modified the alert, in case + of monitor service updates user would be 'system', otherwise name of the + user. + :vartype last_modified_user_name: str + """ + + _validation = { + 'severity': {'readonly': True}, + 'signal_type': {'readonly': True}, + 'alert_state': {'readonly': True}, + 'monitor_condition': {'readonly': True}, + 'monitor_service': {'readonly': True}, + 'alert_rule': {'readonly': True}, + 'source_created_id': {'readonly': True}, + 'smart_group_id': {'readonly': True}, + 'smart_grouping_reason': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'monitor_condition_resolved_date_time': {'readonly': True}, + 'last_modified_user_name': {'readonly': True}, + } + + _attribute_map = { + 'severity': {'key': 'severity', 'type': 'str'}, + 'signal_type': {'key': 'signalType', 'type': 'str'}, + 'alert_state': {'key': 'alertState', 'type': 'str'}, + 'monitor_condition': {'key': 'monitorCondition', 'type': 'str'}, + 'target_resource': {'key': 'targetResource', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'target_resource_type': {'key': 'targetResourceType', 'type': 'str'}, + 'monitor_service': {'key': 'monitorService', 'type': 'str'}, + 'alert_rule': {'key': 'alertRule', 'type': 'str'}, + 'source_created_id': {'key': 'sourceCreatedId', 'type': 'str'}, + 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, + 'smart_grouping_reason': {'key': 'smartGroupingReason', 'type': 'str'}, + 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, + 'monitor_condition_resolved_date_time': {'key': 'monitorConditionResolvedDateTime', 'type': 'iso-8601'}, + 'last_modified_user_name': {'key': 'lastModifiedUserName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Essentials, self).__init__(**kwargs) + self.severity = None + self.signal_type = None + self.alert_state = None + self.monitor_condition = None + self.target_resource = kwargs.get('target_resource', None) + self.target_resource_name = kwargs.get('target_resource_name', None) + self.target_resource_group = kwargs.get('target_resource_group', None) + self.target_resource_type = kwargs.get('target_resource_type', None) + self.monitor_service = None + self.alert_rule = None + self.source_created_id = None + self.smart_group_id = None + self.smart_grouping_reason = None + self.start_date_time = None + self.last_modified_date_time = None + self.monitor_condition_resolved_date_time = None + self.last_modified_user_name = None + + +class MonitorServiceDetails(Model): + """Details of a monitor service. + + :param name: Monitor service name + :type name: str + :param display_name: Monitor service display name + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MonitorServiceDetails, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + + +class MonitorServiceList(AlertsMetaDataProperties): + """Monitor service details. + + Monitor service details. + + All required parameters must be populated in order to send to Azure. + + :param metadata_identifier: Required. Constant filled by server. + :type metadata_identifier: str + :param data: Required. Array of operations + :type data: + list[~azure.mgmt.alertsmanagement.models.MonitorServiceDetails] + """ + + _validation = { + 'metadata_identifier': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'metadata_identifier': {'key': 'metadataIdentifier', 'type': 'str'}, + 'data': {'key': 'data', 'type': '[MonitorServiceDetails]'}, + } + + def __init__(self, **kwargs): + super(MonitorServiceList, self).__init__(**kwargs) + self.data = kwargs.get('data', None) + self.metadata_identifier = 'MonitorServiceList' + + +class Operation(Model): + """Operation provided by provider. + + :param name: Name of the operation + :type name: str + :param display: Properties of the operation + :type display: ~azure.mgmt.alertsmanagement.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """Properties of the operation. + + :param provider: Provider name + :type provider: str + :param resource: Resource name + :type resource: str + :param operation: Operation name + :type operation: str + :param description: Description of the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class PatchObject(Model): + """Data contract for patch. + + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param tags: tags to be updated + :type tags: object + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(PatchObject, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.tags = kwargs.get('tags', None) + + +class Scope(Model): + """Target scope for a given action rule. By default scope will be the + subscription. User can also provide list of resource groups or list of + resources from the scope subscription as well. + + :param scope_type: type of target scope. Possible values include: + 'ResourceGroup', 'Resource' + :type scope_type: str or ~azure.mgmt.alertsmanagement.models.ScopeType + :param values: list of ARM IDs of the given scope type which will be the + target of the given action rule. + :type values: list[str] + """ + + _attribute_map = { + 'scope_type': {'key': 'scopeType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Scope, self).__init__(**kwargs) + self.scope_type = kwargs.get('scope_type', None) + self.values = kwargs.get('values', None) + + +class SmartGroup(Resource): + """Set of related alerts grouped together smartly by AMS. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param alerts_count: Total number of alerts in smart group + :type alerts_count: int + :ivar smart_group_state: Smart group state. Possible values include: + 'New', 'Acknowledged', 'Closed' + :vartype smart_group_state: str or + ~azure.mgmt.alertsmanagement.models.State + :ivar severity: Severity of smart group is the highest(Sev0 >... > Sev4) + severity of all the alerts in the group. Possible values include: 'Sev0', + 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :ivar start_date_time: Creation time of smart group. Date-Time in ISO-8601 + format. + :vartype start_date_time: datetime + :ivar last_modified_date_time: Last updated time of smart group. Date-Time + in ISO-8601 format. + :vartype last_modified_date_time: datetime + :ivar last_modified_user_name: Last modified by user name. + :vartype last_modified_user_name: str + :param resources: Summary of target resources in the smart group + :type resources: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param resource_types: Summary of target resource types in the smart group + :type resource_types: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param resource_groups: Summary of target resource groups in the smart + group + :type resource_groups: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param monitor_services: Summary of monitorServices in the smart group + :type monitor_services: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param monitor_conditions: Summary of monitorConditions in the smart group + :type monitor_conditions: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param alert_states: Summary of alertStates in the smart group + :type alert_states: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param alert_severities: Summary of alertSeverities in the smart group + :type alert_severities: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param next_link: The URI to fetch the next page of alerts. Call + ListNext() with this URI to fetch the next page alerts. + :type next_link: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'smart_group_state': {'readonly': True}, + 'severity': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'last_modified_user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'alerts_count': {'key': 'properties.alertsCount', 'type': 'int'}, + 'smart_group_state': {'key': 'properties.smartGroupState', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'properties.lastModifiedDateTime', 'type': 'iso-8601'}, + 'last_modified_user_name': {'key': 'properties.lastModifiedUserName', 'type': 'str'}, + 'resources': {'key': 'properties.resources', 'type': '[SmartGroupAggregatedProperty]'}, + 'resource_types': {'key': 'properties.resourceTypes', 'type': '[SmartGroupAggregatedProperty]'}, + 'resource_groups': {'key': 'properties.resourceGroups', 'type': '[SmartGroupAggregatedProperty]'}, + 'monitor_services': {'key': 'properties.monitorServices', 'type': '[SmartGroupAggregatedProperty]'}, + 'monitor_conditions': {'key': 'properties.monitorConditions', 'type': '[SmartGroupAggregatedProperty]'}, + 'alert_states': {'key': 'properties.alertStates', 'type': '[SmartGroupAggregatedProperty]'}, + 'alert_severities': {'key': 'properties.alertSeverities', 'type': '[SmartGroupAggregatedProperty]'}, + 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SmartGroup, self).__init__(**kwargs) + self.alerts_count = kwargs.get('alerts_count', None) + self.smart_group_state = None + self.severity = None + self.start_date_time = None + self.last_modified_date_time = None + self.last_modified_user_name = None + self.resources = kwargs.get('resources', None) + self.resource_types = kwargs.get('resource_types', None) + self.resource_groups = kwargs.get('resource_groups', None) + self.monitor_services = kwargs.get('monitor_services', None) + self.monitor_conditions = kwargs.get('monitor_conditions', None) + self.alert_states = kwargs.get('alert_states', None) + self.alert_severities = kwargs.get('alert_severities', None) + self.next_link = kwargs.get('next_link', None) + + +class SmartGroupAggregatedProperty(Model): + """Aggregated property of each type. + + :param name: Name of the type. + :type name: str + :param count: Total number of items of type. + :type count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(SmartGroupAggregatedProperty, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.count = kwargs.get('count', None) + + +class SmartGroupModification(Resource): + """Alert Modification details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.SmartGroupModificationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'SmartGroupModificationProperties'}, + } + + def __init__(self, **kwargs): + super(SmartGroupModification, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class SmartGroupModificationItem(Model): + """smartGroup modification item. + + :param modification_event: Reason for the modification. Possible values + include: 'SmartGroupCreated', 'StateChange', 'AlertAdded', 'AlertRemoved' + :type modification_event: str or + ~azure.mgmt.alertsmanagement.models.SmartGroupModificationEvent + :param old_value: Old value + :type old_value: str + :param new_value: New value + :type new_value: str + :param modified_at: Modified date and time + :type modified_at: str + :param modified_by: Modified user details (Principal client name) + :type modified_by: str + :param comments: Modification comments + :type comments: str + :param description: Description of the modification + :type description: str + """ + + _attribute_map = { + 'modification_event': {'key': 'modificationEvent', 'type': 'SmartGroupModificationEvent'}, + 'old_value': {'key': 'oldValue', 'type': 'str'}, + 'new_value': {'key': 'newValue', 'type': 'str'}, + 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SmartGroupModificationItem, self).__init__(**kwargs) + self.modification_event = kwargs.get('modification_event', None) + self.old_value = kwargs.get('old_value', None) + self.new_value = kwargs.get('new_value', None) + self.modified_at = kwargs.get('modified_at', None) + self.modified_by = kwargs.get('modified_by', None) + self.comments = kwargs.get('comments', None) + self.description = kwargs.get('description', None) + + +class SmartGroupModificationProperties(Model): + """Properties of the smartGroup modification item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar smart_group_id: Unique Id of the smartGroup for which the history is + being retrieved + :vartype smart_group_id: str + :param modifications: Modification details + :type modifications: + list[~azure.mgmt.alertsmanagement.models.SmartGroupModificationItem] + :param next_link: URL to fetch the next set of results. + :type next_link: str + """ + + _validation = { + 'smart_group_id': {'readonly': True}, + } + + _attribute_map = { + 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, + 'modifications': {'key': 'modifications', 'type': '[SmartGroupModificationItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SmartGroupModificationProperties, self).__init__(**kwargs) + self.smart_group_id = None + self.modifications = kwargs.get('modifications', None) + self.next_link = kwargs.get('next_link', None) + + +class Suppression(ActionRuleProperties): + """Suppression based Action Rule. + + Action rule with suppression configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + :param suppression_config: Required. suppression configuration for the + action rule + :type suppression_config: + ~azure.mgmt.alertsmanagement.models.SuppressionConfig + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + 'suppression_config': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'suppression_config': {'key': 'suppressionConfig', 'type': 'SuppressionConfig'}, + } + + def __init__(self, **kwargs): + super(Suppression, self).__init__(**kwargs) + self.suppression_config = kwargs.get('suppression_config', None) + self.type = 'Suppression' + + +class SuppressionConfig(Model): + """Suppression logic for a given action rule. + + All required parameters must be populated in order to send to Azure. + + :param recurrence_type: Required. Specifies when the suppression should be + applied. Possible values include: 'Always', 'Once', 'Daily', 'Weekly', + 'Monthly' + :type recurrence_type: str or + ~azure.mgmt.alertsmanagement.models.SuppressionType + :param schedule: suppression schedule configuration + :type schedule: ~azure.mgmt.alertsmanagement.models.SuppressionSchedule + """ + + _validation = { + 'recurrence_type': {'required': True}, + } + + _attribute_map = { + 'recurrence_type': {'key': 'recurrenceType', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'SuppressionSchedule'}, + } + + def __init__(self, **kwargs): + super(SuppressionConfig, self).__init__(**kwargs) + self.recurrence_type = kwargs.get('recurrence_type', None) + self.schedule = kwargs.get('schedule', None) + + +class SuppressionSchedule(Model): + """Schedule for a given suppression configuration. + + :param start_date: Start date for suppression + :type start_date: str + :param end_date: End date for suppression + :type end_date: str + :param start_time: Start time for suppression + :type start_time: str + :param end_time: End date for suppression + :type end_time: str + :param recurrence_values: Specifies the values for recurrence pattern + :type recurrence_values: list[int] + """ + + _attribute_map = { + 'start_date': {'key': 'startDate', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'recurrence_values': {'key': 'recurrenceValues', 'type': '[int]'}, + } + + def __init__(self, **kwargs): + super(SuppressionSchedule, self).__init__(**kwargs) + self.start_date = kwargs.get('start_date', None) + self.end_date = kwargs.get('end_date', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.recurrence_values = kwargs.get('recurrence_values', None) + + +class ThrottlingInformation(Model): + """Optional throttling information for the alert rule. + + :param duration: The required duration (in ISO8601 format) to wait before + notifying on the alert rule again. The time granularity must be in minutes + and minimum value is 0 minutes + :type duration: timedelta + """ + + _attribute_map = { + 'duration': {'key': 'duration', 'type': 'duration'}, + } + + def __init__(self, **kwargs): + super(ThrottlingInformation, self).__init__(**kwargs) + self.duration = kwargs.get('duration', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models_py3.py new file mode 100644 index 000000000000..635be9d76f8e --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models_py3.py @@ -0,0 +1,1704 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ActionRuleProperties(Model): + """Action rule properties defining scope, conditions, suppression logic for + action rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Suppression, ActionGroup, Diagnostics + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Suppression': 'Suppression', 'ActionGroup': 'ActionGroup', 'Diagnostics': 'Diagnostics'} + } + + def __init__(self, *, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(ActionRuleProperties, self).__init__(**kwargs) + self.scope = scope + self.conditions = conditions + self.description = description + self.created_at = None + self.last_modified_at = None + self.created_by = None + self.last_modified_by = None + self.status = status + self.type = None + + +class ActionGroup(ActionRuleProperties): + """Action Group based Action Rule. + + Action rule with action group configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + :param action_group_id: Required. Action group to trigger if action rule + matches + :type action_group_id: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + 'action_group_id': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'action_group_id': {'key': 'actionGroupId', 'type': 'str'}, + } + + def __init__(self, *, action_group_id: str, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(ActionGroup, self).__init__(scope=scope, conditions=conditions, description=description, status=status, **kwargs) + self.action_group_id = action_group_id + self.type = 'ActionGroup' + + +class ActionGroupsInformation(Model): + """The Action Groups information, used by the alert rule. + + All required parameters must be populated in order to send to Azure. + + :param custom_email_subject: An optional custom email subject to use in + email notifications. + :type custom_email_subject: str + :param custom_webhook_payload: An optional custom web-hook payload to use + in web-hook notifications. + :type custom_webhook_payload: str + :param group_ids: Required. The Action Group resource IDs. + :type group_ids: list[str] + """ + + _validation = { + 'group_ids': {'required': True}, + } + + _attribute_map = { + 'custom_email_subject': {'key': 'customEmailSubject', 'type': 'str'}, + 'custom_webhook_payload': {'key': 'customWebhookPayload', 'type': 'str'}, + 'group_ids': {'key': 'groupIds', 'type': '[str]'}, + } + + def __init__(self, *, group_ids, custom_email_subject: str=None, custom_webhook_payload: str=None, **kwargs) -> None: + super(ActionGroupsInformation, self).__init__(**kwargs) + self.custom_email_subject = custom_email_subject + self.custom_webhook_payload = custom_webhook_payload + self.group_ids = group_ids + + +class Resource(Model): + """An azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + + +class ManagedResource(Resource): + """An azure managed resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(ManagedResource, self).__init__(**kwargs) + self.location = location + self.tags = tags + + +class ActionRule(ManagedResource): + """Action rule object containing target scope, conditions and suppression + logic. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param properties: action rule properties + :type properties: ~azure.mgmt.alertsmanagement.models.ActionRuleProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'ActionRuleProperties'}, + } + + def __init__(self, *, location: str, tags=None, properties=None, **kwargs) -> None: + super(ActionRule, self).__init__(location=location, tags=tags, **kwargs) + self.properties = properties + + +class Alert(Resource): + """An alert created in alert management service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: ~azure.mgmt.alertsmanagement.models.AlertProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(Alert, self).__init__(**kwargs) + self.properties = properties + + +class AlertModification(Resource): + """Alert Modification details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.AlertModificationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertModificationProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(AlertModification, self).__init__(**kwargs) + self.properties = properties + + +class AlertModificationItem(Model): + """Alert modification item. + + :param modification_event: Reason for the modification. Possible values + include: 'AlertCreated', 'StateChange', 'MonitorConditionChange' + :type modification_event: str or + ~azure.mgmt.alertsmanagement.models.AlertModificationEvent + :param old_value: Old value + :type old_value: str + :param new_value: New value + :type new_value: str + :param modified_at: Modified date and time + :type modified_at: str + :param modified_by: Modified user details (Principal client name) + :type modified_by: str + :param comments: Modification comments + :type comments: str + :param description: Description of the modification + :type description: str + """ + + _attribute_map = { + 'modification_event': {'key': 'modificationEvent', 'type': 'AlertModificationEvent'}, + 'old_value': {'key': 'oldValue', 'type': 'str'}, + 'new_value': {'key': 'newValue', 'type': 'str'}, + 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, modification_event=None, old_value: str=None, new_value: str=None, modified_at: str=None, modified_by: str=None, comments: str=None, description: str=None, **kwargs) -> None: + super(AlertModificationItem, self).__init__(**kwargs) + self.modification_event = modification_event + self.old_value = old_value + self.new_value = new_value + self.modified_at = modified_at + self.modified_by = modified_by + self.comments = comments + self.description = description + + +class AlertModificationProperties(Model): + """Properties of the alert modification item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar alert_id: Unique Id of the alert for which the history is being + retrieved + :vartype alert_id: str + :param modifications: Modification details + :type modifications: + list[~azure.mgmt.alertsmanagement.models.AlertModificationItem] + """ + + _validation = { + 'alert_id': {'readonly': True}, + } + + _attribute_map = { + 'alert_id': {'key': 'alertId', 'type': 'str'}, + 'modifications': {'key': 'modifications', 'type': '[AlertModificationItem]'}, + } + + def __init__(self, *, modifications=None, **kwargs) -> None: + super(AlertModificationProperties, self).__init__(**kwargs) + self.alert_id = None + self.modifications = modifications + + +class AlertProperties(Model): + """Alert property bag. + + :param essentials: + :type essentials: ~azure.mgmt.alertsmanagement.models.Essentials + :param context: + :type context: object + :param egress_config: + :type egress_config: object + """ + + _attribute_map = { + 'essentials': {'key': 'essentials', 'type': 'Essentials'}, + 'context': {'key': 'context', 'type': 'object'}, + 'egress_config': {'key': 'egressConfig', 'type': 'object'}, + } + + def __init__(self, *, essentials=None, context=None, egress_config=None, **kwargs) -> None: + super(AlertProperties, self).__init__(**kwargs) + self.essentials = essentials + self.context = context + self.egress_config = egress_config + + +class AzureResource(Model): + """An Azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param location: The resource location. Default value: "global" . + :type location: str + :param tags: The resource tags. + :type tags: object + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + } + + def __init__(self, *, location: str="global", tags=None, **kwargs) -> None: + super(AzureResource, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.location = location + self.tags = tags + + +class AlertRule(AzureResource): + """The alert rule information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param location: The resource location. Default value: "global" . + :type location: str + :param tags: The resource tags. + :type tags: object + :param description: The alert rule description. + :type description: str + :param state: Required. The alert rule state. Possible values include: + 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.alertsmanagement.models.AlertRuleState + :param severity: Required. The alert rule severity. Possible values + include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param frequency: Required. The alert rule frequency in ISO8601 format. + The time granularity must be in minutes and minimum value is 5 minutes. + :type frequency: timedelta + :param detector: Required. The alert rule's detector. + :type detector: ~azure.mgmt.alertsmanagement.models.Detector + :param scope: Required. The alert rule resources scope. + :type scope: list[str] + :param action_groups: Required. The alert rule actions. + :type action_groups: + ~azure.mgmt.alertsmanagement.models.ActionGroupsInformation + :param throttling: The alert rule throttling information. + :type throttling: + ~azure.mgmt.alertsmanagement.models.ThrottlingInformation + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'state': {'required': True}, + 'severity': {'required': True}, + 'frequency': {'required': True}, + 'detector': {'required': True}, + 'scope': {'required': True}, + 'action_groups': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'duration'}, + 'detector': {'key': 'properties.detector', 'type': 'Detector'}, + 'scope': {'key': 'properties.scope', 'type': '[str]'}, + 'action_groups': {'key': 'properties.actionGroups', 'type': 'ActionGroupsInformation'}, + 'throttling': {'key': 'properties.throttling', 'type': 'ThrottlingInformation'}, + } + + def __init__(self, *, state, severity, frequency, detector, scope, action_groups, location: str="global", tags=None, description: str=None, throttling=None, **kwargs) -> None: + super(AlertRule, self).__init__(location=location, tags=tags, **kwargs) + self.description = description + self.state = state + self.severity = severity + self.frequency = frequency + self.detector = detector + self.scope = scope + self.action_groups = action_groups + self.throttling = throttling + + +class AlertRulePatchObject(Model): + """The alert rule patch information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param tags: The resource tags. + :type tags: object + :param description: The alert rule description. + :type description: str + :param state: The alert rule state. Possible values include: 'Enabled', + 'Disabled' + :type state: str or ~azure.mgmt.alertsmanagement.models.AlertRuleState + :param severity: The alert rule severity. Possible values include: 'Sev0', + 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param frequency: The alert rule frequency in ISO8601 format. The time + granularity must be in minutes and minimum value is 5 minutes. + :type frequency: timedelta + :param action_groups: The alert rule actions. + :type action_groups: + ~azure.mgmt.alertsmanagement.models.ActionGroupsInformation + :param throttling: The alert rule throttling information. + :type throttling: + ~azure.mgmt.alertsmanagement.models.ThrottlingInformation + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'duration'}, + 'action_groups': {'key': 'properties.actionGroups', 'type': 'ActionGroupsInformation'}, + 'throttling': {'key': 'properties.throttling', 'type': 'ThrottlingInformation'}, + } + + def __init__(self, *, tags=None, description: str=None, state=None, severity=None, frequency=None, action_groups=None, throttling=None, **kwargs) -> None: + super(AlertRulePatchObject, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.tags = tags + self.description = description + self.state = state + self.severity = severity + self.frequency = frequency + self.action_groups = action_groups + self.throttling = throttling + + +class AlertsMetaData(Model): + """alert meta data information. + + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.AlertsMetaDataProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'AlertsMetaDataProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(AlertsMetaData, self).__init__(**kwargs) + self.properties = properties + + +class AlertsMetaDataProperties(Model): + """alert meta data property bag. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MonitorServiceList + + All required parameters must be populated in order to send to Azure. + + :param metadata_identifier: Required. Constant filled by server. + :type metadata_identifier: str + """ + + _validation = { + 'metadata_identifier': {'required': True}, + } + + _attribute_map = { + 'metadata_identifier': {'key': 'metadataIdentifier', 'type': 'str'}, + } + + _subtype_map = { + 'metadata_identifier': {'MonitorServiceList': 'MonitorServiceList'} + } + + def __init__(self, **kwargs) -> None: + super(AlertsMetaDataProperties, self).__init__(**kwargs) + self.metadata_identifier = None + + +class AlertsSummary(Resource): + """Summary of alerts based on the input filters and 'groupby' parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroup + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertsSummaryGroup'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(AlertsSummary, self).__init__(**kwargs) + self.properties = properties + + +class AlertsSummaryGroup(Model): + """Group the result set. + + :param total: Total count of the result set. + :type total: int + :param smart_groups_count: Total count of the smart groups. + :type smart_groups_count: int + :param groupedby: Name of the field aggregated + :type groupedby: str + :param values: List of the items + :type values: + list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] + """ + + _attribute_map = { + 'total': {'key': 'total', 'type': 'int'}, + 'smart_groups_count': {'key': 'smartGroupsCount', 'type': 'int'}, + 'groupedby': {'key': 'groupedby', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, + } + + def __init__(self, *, total: int=None, smart_groups_count: int=None, groupedby: str=None, values=None, **kwargs) -> None: + super(AlertsSummaryGroup, self).__init__(**kwargs) + self.total = total + self.smart_groups_count = smart_groups_count + self.groupedby = groupedby + self.values = values + + +class AlertsSummaryGroupItem(Model): + """Alerts summary group item. + + :param name: Value of the aggregated field + :type name: str + :param count: Count of the aggregated field + :type count: int + :param groupedby: Name of the field aggregated + :type groupedby: str + :param values: List of the items + :type values: + list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'groupedby': {'key': 'groupedby', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, + } + + def __init__(self, *, name: str=None, count: int=None, groupedby: str=None, values=None, **kwargs) -> None: + super(AlertsSummaryGroupItem, self).__init__(**kwargs) + self.name = name + self.count = count + self.groupedby = groupedby + self.values = values + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Condition(Model): + """condition to trigger an action rule. + + :param operator: operator for a given condition. Possible values include: + 'Equals', 'NotEquals', 'Contains', 'DoesNotContain' + :type operator: str or ~azure.mgmt.alertsmanagement.models.Operator + :param values: list of values to match for a given condition. + :type values: list[str] + """ + + _attribute_map = { + 'operator': {'key': 'operator', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, *, operator=None, values=None, **kwargs) -> None: + super(Condition, self).__init__(**kwargs) + self.operator = operator + self.values = values + + +class Conditions(Model): + """Conditions in alert instance to be matched for a given action rule. Default + value is all. Multiple values could be provided with comma separation. + + :param severity: filter alerts by severity + :type severity: ~azure.mgmt.alertsmanagement.models.Condition + :param monitor_service: filter alerts by monitor service + :type monitor_service: ~azure.mgmt.alertsmanagement.models.Condition + :param monitor_condition: filter alerts by monitor condition + :type monitor_condition: ~azure.mgmt.alertsmanagement.models.Condition + :param target_resource_type: filter alerts by target resource type + :type target_resource_type: ~azure.mgmt.alertsmanagement.models.Condition + :param alert_rule_id: filter alerts by alert rule id + :type alert_rule_id: ~azure.mgmt.alertsmanagement.models.Condition + :param description: filter alerts by alert rule description + :type description: ~azure.mgmt.alertsmanagement.models.Condition + :param alert_context: filter alerts by alert context (payload) + :type alert_context: ~azure.mgmt.alertsmanagement.models.Condition + """ + + _attribute_map = { + 'severity': {'key': 'severity', 'type': 'Condition'}, + 'monitor_service': {'key': 'monitorService', 'type': 'Condition'}, + 'monitor_condition': {'key': 'monitorCondition', 'type': 'Condition'}, + 'target_resource_type': {'key': 'targetResourceType', 'type': 'Condition'}, + 'alert_rule_id': {'key': 'alertRuleId', 'type': 'Condition'}, + 'description': {'key': 'description', 'type': 'Condition'}, + 'alert_context': {'key': 'alertContext', 'type': 'Condition'}, + } + + def __init__(self, *, severity=None, monitor_service=None, monitor_condition=None, target_resource_type=None, alert_rule_id=None, description=None, alert_context=None, **kwargs) -> None: + super(Conditions, self).__init__(**kwargs) + self.severity = severity + self.monitor_service = monitor_service + self.monitor_condition = monitor_condition + self.target_resource_type = target_resource_type + self.alert_rule_id = alert_rule_id + self.description = description + self.alert_context = alert_context + + +class Detector(Model): + """The detector information. By default this is not populated, unless it's + specified in expandDetector. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The detector id. + :type id: str + :param parameters: The detector's parameters.' + :type parameters: dict[str, object] + :param name: The Smart Detector name. By default this is not populated, + unless it's specified in expandDetector + :type name: str + :param description: The Smart Detector description. By default this is not + populated, unless it's specified in expandDetector + :type description: str + :param supported_resource_types: The Smart Detector supported resource + types. By default this is not populated, unless it's specified in + expandDetector + :type supported_resource_types: list[str] + :param image_paths: The Smart Detector image path. By default this is not + populated, unless it's specified in expandDetector + :type image_paths: list[str] + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'supported_resource_types': {'key': 'supportedResourceTypes', 'type': '[str]'}, + 'image_paths': {'key': 'imagePaths', 'type': '[str]'}, + } + + def __init__(self, *, id: str, parameters=None, name: str=None, description: str=None, supported_resource_types=None, image_paths=None, **kwargs) -> None: + super(Detector, self).__init__(**kwargs) + self.id = id + self.parameters = parameters + self.name = name + self.description = description + self.supported_resource_types = supported_resource_types + self.image_paths = image_paths + + +class Diagnostics(ActionRuleProperties): + """Diagnostics based Action Rule. + + Action rule with diagnostics configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(Diagnostics, self).__init__(scope=scope, conditions=conditions, description=description, status=status, **kwargs) + self.type = 'Diagnostics' + + +class ErrorResponse(Model): + """An error response from the service. + + :param error: + :type error: ~azure.mgmt.alertsmanagement.models.ErrorResponseBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class ErrorResponse1(Model): + """Describe the format of an Error response. + + :param code: Error code + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(ErrorResponse1, self).__init__(**kwargs) + self.code = code + self.message = message + + +class ErrorResponse1Exception(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse1'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponse1Exception, self).__init__(deserialize, response, 'ErrorResponse1', *args) + + +class ErrorResponseBody(Model): + """Details of error response. + + :param code: Error code, intended to be consumed programmatically. + :type code: str + :param message: Description of the error, intended for display in user + interface. + :type message: str + :param target: Target of the particular error, for example name of the + property. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.alertsmanagement.models.ErrorResponseBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorResponseBody]'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + super(ErrorResponseBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class Essentials(Model): + """This object contains consistent fields across different monitor services. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar severity: Severity of alert Sev0 being highest and Sev4 being + lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :ivar signal_type: The type of signal the alert is based on, which could + be metrics, logs or activity logs. Possible values include: 'Metric', + 'Log', 'Unknown' + :vartype signal_type: str or + ~azure.mgmt.alertsmanagement.models.SignalType + :ivar alert_state: Alert object state, which can be modified by the user. + Possible values include: 'New', 'Acknowledged', 'Closed' + :vartype alert_state: str or + ~azure.mgmt.alertsmanagement.models.AlertState + :ivar monitor_condition: Condition of the rule at the monitor service. It + represents whether the underlying conditions have crossed the defined + alert rule thresholds. Possible values include: 'Fired', 'Resolved' + :vartype monitor_condition: str or + ~azure.mgmt.alertsmanagement.models.MonitorCondition + :param target_resource: Target ARM resource, on which alert got created. + :type target_resource: str + :param target_resource_name: Name of the target ARM resource name, on + which alert got created. + :type target_resource_name: str + :param target_resource_group: Resource group of target ARM resource, on + which alert got created. + :type target_resource_group: str + :param target_resource_type: Resource type of target ARM resource, on + which alert got created. + :type target_resource_type: str + :ivar monitor_service: Monitor service on which the rule(monitor) is set. + Possible values include: 'Application Insights', 'ActivityLog + Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', + 'ActivityLog Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', + 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', + 'Zabbix' + :vartype monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :ivar alert_rule: Rule(monitor) which fired alert instance. Depending on + the monitor service, this would be ARM id or name of the rule. + :vartype alert_rule: str + :ivar source_created_id: Unique Id created by monitor service for each + alert instance. This could be used to track the issue at the monitor + service, in case of Nagios, Zabbix, SCOM etc. + :vartype source_created_id: str + :ivar smart_group_id: Unique Id of the smart group + :vartype smart_group_id: str + :ivar smart_grouping_reason: Verbose reason describing the reason why this + alert instance is added to a smart group + :vartype smart_grouping_reason: str + :ivar start_date_time: Creation time(ISO-8601 format) of alert instance. + :vartype start_date_time: datetime + :ivar last_modified_date_time: Last modification time(ISO-8601 format) of + alert instance. + :vartype last_modified_date_time: datetime + :ivar monitor_condition_resolved_date_time: Resolved time(ISO-8601 format) + of alert instance. This will be updated when monitor service resolves the + alert instance because the rule condition is no longer met. + :vartype monitor_condition_resolved_date_time: datetime + :ivar last_modified_user_name: User who last modified the alert, in case + of monitor service updates user would be 'system', otherwise name of the + user. + :vartype last_modified_user_name: str + """ + + _validation = { + 'severity': {'readonly': True}, + 'signal_type': {'readonly': True}, + 'alert_state': {'readonly': True}, + 'monitor_condition': {'readonly': True}, + 'monitor_service': {'readonly': True}, + 'alert_rule': {'readonly': True}, + 'source_created_id': {'readonly': True}, + 'smart_group_id': {'readonly': True}, + 'smart_grouping_reason': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'monitor_condition_resolved_date_time': {'readonly': True}, + 'last_modified_user_name': {'readonly': True}, + } + + _attribute_map = { + 'severity': {'key': 'severity', 'type': 'str'}, + 'signal_type': {'key': 'signalType', 'type': 'str'}, + 'alert_state': {'key': 'alertState', 'type': 'str'}, + 'monitor_condition': {'key': 'monitorCondition', 'type': 'str'}, + 'target_resource': {'key': 'targetResource', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'target_resource_type': {'key': 'targetResourceType', 'type': 'str'}, + 'monitor_service': {'key': 'monitorService', 'type': 'str'}, + 'alert_rule': {'key': 'alertRule', 'type': 'str'}, + 'source_created_id': {'key': 'sourceCreatedId', 'type': 'str'}, + 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, + 'smart_grouping_reason': {'key': 'smartGroupingReason', 'type': 'str'}, + 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, + 'monitor_condition_resolved_date_time': {'key': 'monitorConditionResolvedDateTime', 'type': 'iso-8601'}, + 'last_modified_user_name': {'key': 'lastModifiedUserName', 'type': 'str'}, + } + + def __init__(self, *, target_resource: str=None, target_resource_name: str=None, target_resource_group: str=None, target_resource_type: str=None, **kwargs) -> None: + super(Essentials, self).__init__(**kwargs) + self.severity = None + self.signal_type = None + self.alert_state = None + self.monitor_condition = None + self.target_resource = target_resource + self.target_resource_name = target_resource_name + self.target_resource_group = target_resource_group + self.target_resource_type = target_resource_type + self.monitor_service = None + self.alert_rule = None + self.source_created_id = None + self.smart_group_id = None + self.smart_grouping_reason = None + self.start_date_time = None + self.last_modified_date_time = None + self.monitor_condition_resolved_date_time = None + self.last_modified_user_name = None + + +class MonitorServiceDetails(Model): + """Details of a monitor service. + + :param name: Monitor service name + :type name: str + :param display_name: Monitor service display name + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, **kwargs) -> None: + super(MonitorServiceDetails, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + + +class MonitorServiceList(AlertsMetaDataProperties): + """Monitor service details. + + Monitor service details. + + All required parameters must be populated in order to send to Azure. + + :param metadata_identifier: Required. Constant filled by server. + :type metadata_identifier: str + :param data: Required. Array of operations + :type data: + list[~azure.mgmt.alertsmanagement.models.MonitorServiceDetails] + """ + + _validation = { + 'metadata_identifier': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'metadata_identifier': {'key': 'metadataIdentifier', 'type': 'str'}, + 'data': {'key': 'data', 'type': '[MonitorServiceDetails]'}, + } + + def __init__(self, *, data, **kwargs) -> None: + super(MonitorServiceList, self).__init__(**kwargs) + self.data = data + self.metadata_identifier = 'MonitorServiceList' + + +class Operation(Model): + """Operation provided by provider. + + :param name: Name of the operation + :type name: str + :param display: Properties of the operation + :type display: ~azure.mgmt.alertsmanagement.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + + +class OperationDisplay(Model): + """Properties of the operation. + + :param provider: Provider name + :type provider: str + :param resource: Resource name + :type resource: str + :param operation: Operation name + :type operation: str + :param description: Description of the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class PatchObject(Model): + """Data contract for patch. + + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param tags: tags to be updated + :type tags: object + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + } + + def __init__(self, *, status=None, tags=None, **kwargs) -> None: + super(PatchObject, self).__init__(**kwargs) + self.status = status + self.tags = tags + + +class Scope(Model): + """Target scope for a given action rule. By default scope will be the + subscription. User can also provide list of resource groups or list of + resources from the scope subscription as well. + + :param scope_type: type of target scope. Possible values include: + 'ResourceGroup', 'Resource' + :type scope_type: str or ~azure.mgmt.alertsmanagement.models.ScopeType + :param values: list of ARM IDs of the given scope type which will be the + target of the given action rule. + :type values: list[str] + """ + + _attribute_map = { + 'scope_type': {'key': 'scopeType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, *, scope_type=None, values=None, **kwargs) -> None: + super(Scope, self).__init__(**kwargs) + self.scope_type = scope_type + self.values = values + + +class SmartGroup(Resource): + """Set of related alerts grouped together smartly by AMS. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param alerts_count: Total number of alerts in smart group + :type alerts_count: int + :ivar smart_group_state: Smart group state. Possible values include: + 'New', 'Acknowledged', 'Closed' + :vartype smart_group_state: str or + ~azure.mgmt.alertsmanagement.models.State + :ivar severity: Severity of smart group is the highest(Sev0 >... > Sev4) + severity of all the alerts in the group. Possible values include: 'Sev0', + 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :ivar start_date_time: Creation time of smart group. Date-Time in ISO-8601 + format. + :vartype start_date_time: datetime + :ivar last_modified_date_time: Last updated time of smart group. Date-Time + in ISO-8601 format. + :vartype last_modified_date_time: datetime + :ivar last_modified_user_name: Last modified by user name. + :vartype last_modified_user_name: str + :param resources: Summary of target resources in the smart group + :type resources: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param resource_types: Summary of target resource types in the smart group + :type resource_types: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param resource_groups: Summary of target resource groups in the smart + group + :type resource_groups: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param monitor_services: Summary of monitorServices in the smart group + :type monitor_services: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param monitor_conditions: Summary of monitorConditions in the smart group + :type monitor_conditions: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param alert_states: Summary of alertStates in the smart group + :type alert_states: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param alert_severities: Summary of alertSeverities in the smart group + :type alert_severities: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param next_link: The URI to fetch the next page of alerts. Call + ListNext() with this URI to fetch the next page alerts. + :type next_link: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'smart_group_state': {'readonly': True}, + 'severity': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'last_modified_user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'alerts_count': {'key': 'properties.alertsCount', 'type': 'int'}, + 'smart_group_state': {'key': 'properties.smartGroupState', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'properties.lastModifiedDateTime', 'type': 'iso-8601'}, + 'last_modified_user_name': {'key': 'properties.lastModifiedUserName', 'type': 'str'}, + 'resources': {'key': 'properties.resources', 'type': '[SmartGroupAggregatedProperty]'}, + 'resource_types': {'key': 'properties.resourceTypes', 'type': '[SmartGroupAggregatedProperty]'}, + 'resource_groups': {'key': 'properties.resourceGroups', 'type': '[SmartGroupAggregatedProperty]'}, + 'monitor_services': {'key': 'properties.monitorServices', 'type': '[SmartGroupAggregatedProperty]'}, + 'monitor_conditions': {'key': 'properties.monitorConditions', 'type': '[SmartGroupAggregatedProperty]'}, + 'alert_states': {'key': 'properties.alertStates', 'type': '[SmartGroupAggregatedProperty]'}, + 'alert_severities': {'key': 'properties.alertSeverities', 'type': '[SmartGroupAggregatedProperty]'}, + 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, + } + + def __init__(self, *, alerts_count: int=None, resources=None, resource_types=None, resource_groups=None, monitor_services=None, monitor_conditions=None, alert_states=None, alert_severities=None, next_link: str=None, **kwargs) -> None: + super(SmartGroup, self).__init__(**kwargs) + self.alerts_count = alerts_count + self.smart_group_state = None + self.severity = None + self.start_date_time = None + self.last_modified_date_time = None + self.last_modified_user_name = None + self.resources = resources + self.resource_types = resource_types + self.resource_groups = resource_groups + self.monitor_services = monitor_services + self.monitor_conditions = monitor_conditions + self.alert_states = alert_states + self.alert_severities = alert_severities + self.next_link = next_link + + +class SmartGroupAggregatedProperty(Model): + """Aggregated property of each type. + + :param name: Name of the type. + :type name: str + :param count: Total number of items of type. + :type count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, count: int=None, **kwargs) -> None: + super(SmartGroupAggregatedProperty, self).__init__(**kwargs) + self.name = name + self.count = count + + +class SmartGroupModification(Resource): + """Alert Modification details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.SmartGroupModificationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'SmartGroupModificationProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(SmartGroupModification, self).__init__(**kwargs) + self.properties = properties + + +class SmartGroupModificationItem(Model): + """smartGroup modification item. + + :param modification_event: Reason for the modification. Possible values + include: 'SmartGroupCreated', 'StateChange', 'AlertAdded', 'AlertRemoved' + :type modification_event: str or + ~azure.mgmt.alertsmanagement.models.SmartGroupModificationEvent + :param old_value: Old value + :type old_value: str + :param new_value: New value + :type new_value: str + :param modified_at: Modified date and time + :type modified_at: str + :param modified_by: Modified user details (Principal client name) + :type modified_by: str + :param comments: Modification comments + :type comments: str + :param description: Description of the modification + :type description: str + """ + + _attribute_map = { + 'modification_event': {'key': 'modificationEvent', 'type': 'SmartGroupModificationEvent'}, + 'old_value': {'key': 'oldValue', 'type': 'str'}, + 'new_value': {'key': 'newValue', 'type': 'str'}, + 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, modification_event=None, old_value: str=None, new_value: str=None, modified_at: str=None, modified_by: str=None, comments: str=None, description: str=None, **kwargs) -> None: + super(SmartGroupModificationItem, self).__init__(**kwargs) + self.modification_event = modification_event + self.old_value = old_value + self.new_value = new_value + self.modified_at = modified_at + self.modified_by = modified_by + self.comments = comments + self.description = description + + +class SmartGroupModificationProperties(Model): + """Properties of the smartGroup modification item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar smart_group_id: Unique Id of the smartGroup for which the history is + being retrieved + :vartype smart_group_id: str + :param modifications: Modification details + :type modifications: + list[~azure.mgmt.alertsmanagement.models.SmartGroupModificationItem] + :param next_link: URL to fetch the next set of results. + :type next_link: str + """ + + _validation = { + 'smart_group_id': {'readonly': True}, + } + + _attribute_map = { + 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, + 'modifications': {'key': 'modifications', 'type': '[SmartGroupModificationItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, modifications=None, next_link: str=None, **kwargs) -> None: + super(SmartGroupModificationProperties, self).__init__(**kwargs) + self.smart_group_id = None + self.modifications = modifications + self.next_link = next_link + + +class Suppression(ActionRuleProperties): + """Suppression based Action Rule. + + Action rule with suppression configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + :param suppression_config: Required. suppression configuration for the + action rule + :type suppression_config: + ~azure.mgmt.alertsmanagement.models.SuppressionConfig + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + 'suppression_config': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'suppression_config': {'key': 'suppressionConfig', 'type': 'SuppressionConfig'}, + } + + def __init__(self, *, suppression_config, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(Suppression, self).__init__(scope=scope, conditions=conditions, description=description, status=status, **kwargs) + self.suppression_config = suppression_config + self.type = 'Suppression' + + +class SuppressionConfig(Model): + """Suppression logic for a given action rule. + + All required parameters must be populated in order to send to Azure. + + :param recurrence_type: Required. Specifies when the suppression should be + applied. Possible values include: 'Always', 'Once', 'Daily', 'Weekly', + 'Monthly' + :type recurrence_type: str or + ~azure.mgmt.alertsmanagement.models.SuppressionType + :param schedule: suppression schedule configuration + :type schedule: ~azure.mgmt.alertsmanagement.models.SuppressionSchedule + """ + + _validation = { + 'recurrence_type': {'required': True}, + } + + _attribute_map = { + 'recurrence_type': {'key': 'recurrenceType', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'SuppressionSchedule'}, + } + + def __init__(self, *, recurrence_type, schedule=None, **kwargs) -> None: + super(SuppressionConfig, self).__init__(**kwargs) + self.recurrence_type = recurrence_type + self.schedule = schedule + + +class SuppressionSchedule(Model): + """Schedule for a given suppression configuration. + + :param start_date: Start date for suppression + :type start_date: str + :param end_date: End date for suppression + :type end_date: str + :param start_time: Start time for suppression + :type start_time: str + :param end_time: End date for suppression + :type end_time: str + :param recurrence_values: Specifies the values for recurrence pattern + :type recurrence_values: list[int] + """ + + _attribute_map = { + 'start_date': {'key': 'startDate', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'recurrence_values': {'key': 'recurrenceValues', 'type': '[int]'}, + } + + def __init__(self, *, start_date: str=None, end_date: str=None, start_time: str=None, end_time: str=None, recurrence_values=None, **kwargs) -> None: + super(SuppressionSchedule, self).__init__(**kwargs) + self.start_date = start_date + self.end_date = end_date + self.start_time = start_time + self.end_time = end_time + self.recurrence_values = recurrence_values + + +class ThrottlingInformation(Model): + """Optional throttling information for the alert rule. + + :param duration: The required duration (in ISO8601 format) to wait before + notifying on the alert rule again. The time granularity must be in minutes + and minimum value is 0 minutes + :type duration: timedelta + """ + + _attribute_map = { + 'duration': {'key': 'duration', 'type': 'duration'}, + } + + def __init__(self, *, duration=None, **kwargs) -> None: + super(ThrottlingInformation, self).__init__(**kwargs) + self.duration = duration diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_paged_models.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_paged_models.py new file mode 100644 index 000000000000..aece7093df75 --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_paged_models.py @@ -0,0 +1,79 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class AlertPaged(Paged): + """ + A paging container for iterating over a list of :class:`Alert ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Alert]'} + } + + def __init__(self, *args, **kwargs): + + super(AlertPaged, self).__init__(*args, **kwargs) +class SmartGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`SmartGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SmartGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(SmartGroupPaged, self).__init__(*args, **kwargs) +class ActionRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`ActionRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ActionRule]'} + } + + def __init__(self, *args, **kwargs): + + super(ActionRulePaged, self).__init__(*args, **kwargs) +class AlertRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`AlertRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AlertRule]'} + } + + def __init__(self, *args, **kwargs): + + super(AlertRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert.py deleted file mode 100644 index 634c2c747b17..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Alert(Resource): - """An alert created in alert management service. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: ~azure.mgmt.alertsmanagement.models.AlertProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertProperties'}, - } - - def __init__(self, **kwargs): - super(Alert, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification.py deleted file mode 100644 index e2d77167596c..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AlertModification(Resource): - """Alert Modification details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: - ~azure.mgmt.alertsmanagement.models.AlertModificationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertModificationProperties'}, - } - - def __init__(self, **kwargs): - super(AlertModification, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item.py deleted file mode 100644 index 50915b06ce40..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertModificationItem(Model): - """Alert modification item. - - :param modification_event: Reason for the modification. Possible values - include: 'AlertCreated', 'StateChange', 'MonitorConditionChange' - :type modification_event: str or - ~azure.mgmt.alertsmanagement.models.AlertModificationEvent - :param old_value: Old value - :type old_value: str - :param new_value: New value - :type new_value: str - :param modified_at: Modified date and time - :type modified_at: str - :param modified_by: Modified user details (Principal client name) - :type modified_by: str - :param comments: Modification comments - :type comments: str - :param description: Description of the modification - :type description: str - """ - - _attribute_map = { - 'modification_event': {'key': 'modificationEvent', 'type': 'AlertModificationEvent'}, - 'old_value': {'key': 'oldValue', 'type': 'str'}, - 'new_value': {'key': 'newValue', 'type': 'str'}, - 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, - 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, - 'comments': {'key': 'comments', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AlertModificationItem, self).__init__(**kwargs) - self.modification_event = kwargs.get('modification_event', None) - self.old_value = kwargs.get('old_value', None) - self.new_value = kwargs.get('new_value', None) - self.modified_at = kwargs.get('modified_at', None) - self.modified_by = kwargs.get('modified_by', None) - self.comments = kwargs.get('comments', None) - self.description = kwargs.get('description', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item_py3.py deleted file mode 100644 index b051daad6d2a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertModificationItem(Model): - """Alert modification item. - - :param modification_event: Reason for the modification. Possible values - include: 'AlertCreated', 'StateChange', 'MonitorConditionChange' - :type modification_event: str or - ~azure.mgmt.alertsmanagement.models.AlertModificationEvent - :param old_value: Old value - :type old_value: str - :param new_value: New value - :type new_value: str - :param modified_at: Modified date and time - :type modified_at: str - :param modified_by: Modified user details (Principal client name) - :type modified_by: str - :param comments: Modification comments - :type comments: str - :param description: Description of the modification - :type description: str - """ - - _attribute_map = { - 'modification_event': {'key': 'modificationEvent', 'type': 'AlertModificationEvent'}, - 'old_value': {'key': 'oldValue', 'type': 'str'}, - 'new_value': {'key': 'newValue', 'type': 'str'}, - 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, - 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, - 'comments': {'key': 'comments', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, modification_event=None, old_value: str=None, new_value: str=None, modified_at: str=None, modified_by: str=None, comments: str=None, description: str=None, **kwargs) -> None: - super(AlertModificationItem, self).__init__(**kwargs) - self.modification_event = modification_event - self.old_value = old_value - self.new_value = new_value - self.modified_at = modified_at - self.modified_by = modified_by - self.comments = comments - self.description = description diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties.py deleted file mode 100644 index c1d1b8123ecd..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertModificationProperties(Model): - """Properties of the alert modification item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar alert_id: Unique Id of the alert for which the history is being - retrieved - :vartype alert_id: str - :param modifications: Modification details - :type modifications: - list[~azure.mgmt.alertsmanagement.models.AlertModificationItem] - """ - - _validation = { - 'alert_id': {'readonly': True}, - } - - _attribute_map = { - 'alert_id': {'key': 'alertId', 'type': 'str'}, - 'modifications': {'key': 'modifications', 'type': '[AlertModificationItem]'}, - } - - def __init__(self, **kwargs): - super(AlertModificationProperties, self).__init__(**kwargs) - self.alert_id = None - self.modifications = kwargs.get('modifications', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties_py3.py deleted file mode 100644 index 51e67637a07a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertModificationProperties(Model): - """Properties of the alert modification item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar alert_id: Unique Id of the alert for which the history is being - retrieved - :vartype alert_id: str - :param modifications: Modification details - :type modifications: - list[~azure.mgmt.alertsmanagement.models.AlertModificationItem] - """ - - _validation = { - 'alert_id': {'readonly': True}, - } - - _attribute_map = { - 'alert_id': {'key': 'alertId', 'type': 'str'}, - 'modifications': {'key': 'modifications', 'type': '[AlertModificationItem]'}, - } - - def __init__(self, *, modifications=None, **kwargs) -> None: - super(AlertModificationProperties, self).__init__(**kwargs) - self.alert_id = None - self.modifications = modifications diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_py3.py deleted file mode 100644 index b7cae8114091..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AlertModification(Resource): - """Alert Modification details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: - ~azure.mgmt.alertsmanagement.models.AlertModificationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertModificationProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(AlertModification, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_paged.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_paged.py deleted file mode 100644 index 2ae2c88ee2e1..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AlertPaged(Paged): - """ - A paging container for iterating over a list of :class:`Alert ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Alert]'} - } - - def __init__(self, *args, **kwargs): - - super(AlertPaged, self).__init__(*args, **kwargs) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties.py deleted file mode 100644 index a8c7b761aba5..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertProperties(Model): - """Alert property bag. - - :param essentials: - :type essentials: ~azure.mgmt.alertsmanagement.models.Essentials - :param context: - :type context: object - :param egress_config: - :type egress_config: object - """ - - _attribute_map = { - 'essentials': {'key': 'essentials', 'type': 'Essentials'}, - 'context': {'key': 'context', 'type': 'object'}, - 'egress_config': {'key': 'egressConfig', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AlertProperties, self).__init__(**kwargs) - self.essentials = kwargs.get('essentials', None) - self.context = kwargs.get('context', None) - self.egress_config = kwargs.get('egress_config', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties_py3.py deleted file mode 100644 index a6c9cf43db24..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertProperties(Model): - """Alert property bag. - - :param essentials: - :type essentials: ~azure.mgmt.alertsmanagement.models.Essentials - :param context: - :type context: object - :param egress_config: - :type egress_config: object - """ - - _attribute_map = { - 'essentials': {'key': 'essentials', 'type': 'Essentials'}, - 'context': {'key': 'context', 'type': 'object'}, - 'egress_config': {'key': 'egressConfig', 'type': 'object'}, - } - - def __init__(self, *, essentials=None, context=None, egress_config=None, **kwargs) -> None: - super(AlertProperties, self).__init__(**kwargs) - self.essentials = essentials - self.context = context - self.egress_config = egress_config diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_py3.py deleted file mode 100644 index 4068ed33b63a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Alert(Resource): - """An alert created in alert management service. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: ~azure.mgmt.alertsmanagement.models.AlertProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(Alert, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary.py deleted file mode 100644 index 9521d5cb5d32..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AlertsSummary(Resource): - """Summary of alerts based on the input filters and 'groupby' parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroup - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertsSummaryGroup'}, - } - - def __init__(self, **kwargs): - super(AlertsSummary, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group.py deleted file mode 100644 index 470f52f8efdf..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertsSummaryGroup(Model): - """Group the result set. - - :param total: Total count of the result set. - :type total: int - :param smart_groups_count: Total count of the smart groups. - :type smart_groups_count: int - :param groupedby: Name of the field aggregated - :type groupedby: str - :param values: List of the items - :type values: - list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] - """ - - _attribute_map = { - 'total': {'key': 'total', 'type': 'int'}, - 'smart_groups_count': {'key': 'smartGroupsCount', 'type': 'int'}, - 'groupedby': {'key': 'groupedby', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, - } - - def __init__(self, **kwargs): - super(AlertsSummaryGroup, self).__init__(**kwargs) - self.total = kwargs.get('total', None) - self.smart_groups_count = kwargs.get('smart_groups_count', None) - self.groupedby = kwargs.get('groupedby', None) - self.values = kwargs.get('values', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item.py deleted file mode 100644 index 232fd9f12e08..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertsSummaryGroupItem(Model): - """Alerts summary group item. - - :param name: Value of the aggregated field - :type name: str - :param count: Count of the aggregated field - :type count: int - :param groupedby: Name of the field aggregated - :type groupedby: str - :param values: List of the items - :type values: - list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'groupedby': {'key': 'groupedby', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, - } - - def __init__(self, **kwargs): - super(AlertsSummaryGroupItem, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.count = kwargs.get('count', None) - self.groupedby = kwargs.get('groupedby', None) - self.values = kwargs.get('values', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_py3.py deleted file mode 100644 index f802c4f1eaa3..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertsSummaryGroupItem(Model): - """Alerts summary group item. - - :param name: Value of the aggregated field - :type name: str - :param count: Count of the aggregated field - :type count: int - :param groupedby: Name of the field aggregated - :type groupedby: str - :param values: List of the items - :type values: - list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'groupedby': {'key': 'groupedby', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, - } - - def __init__(self, *, name: str=None, count: int=None, groupedby: str=None, values=None, **kwargs) -> None: - super(AlertsSummaryGroupItem, self).__init__(**kwargs) - self.name = name - self.count = count - self.groupedby = groupedby - self.values = values diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_py3.py deleted file mode 100644 index b9d4c71d3403..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertsSummaryGroup(Model): - """Group the result set. - - :param total: Total count of the result set. - :type total: int - :param smart_groups_count: Total count of the smart groups. - :type smart_groups_count: int - :param groupedby: Name of the field aggregated - :type groupedby: str - :param values: List of the items - :type values: - list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] - """ - - _attribute_map = { - 'total': {'key': 'total', 'type': 'int'}, - 'smart_groups_count': {'key': 'smartGroupsCount', 'type': 'int'}, - 'groupedby': {'key': 'groupedby', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, - } - - def __init__(self, *, total: int=None, smart_groups_count: int=None, groupedby: str=None, values=None, **kwargs) -> None: - super(AlertsSummaryGroup, self).__init__(**kwargs) - self.total = total - self.smart_groups_count = smart_groups_count - self.groupedby = groupedby - self.values = values diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_py3.py deleted file mode 100644 index ed41ea6d10de..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AlertsSummary(Resource): - """Summary of alerts based on the input filters and 'groupby' parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroup - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertsSummaryGroup'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(AlertsSummary, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials.py deleted file mode 100644 index a333d42f1b82..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Essentials(Model): - """This object contains normalized fields across different monitor service and - also contains state related fields. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar severity: Severity of alert Sev0 being highest and Sev3 being - lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :ivar signal_type: Log based alert or metric based alert. Possible values - include: 'Metric', 'Log', 'Unknown' - :vartype signal_type: str or - ~azure.mgmt.alertsmanagement.models.SignalType - :ivar alert_state: Alert object state, which is modified by the user. - Possible values include: 'New', 'Acknowledged', 'Closed' - :vartype alert_state: str or - ~azure.mgmt.alertsmanagement.models.AlertState - :ivar monitor_condition: Represents rule condition(Fired/Resolved) - maintained by monitor service depending on the state of the state. - Possible values include: 'Fired', 'Resolved' - :vartype monitor_condition: str or - ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param target_resource: Target ARM resource, on which alert got created. - :type target_resource: str - :param target_resource_name: Name of the target ARM resource name, on - which alert got created. - :type target_resource_name: str - :param target_resource_group: Resource group of target ARM resource, on - which alert got created. - :type target_resource_group: str - :param target_resource_type: Resource type of target ARM resource, on - which alert got created. - :type target_resource_type: str - :ivar monitor_service: Monitor service on which the rule(monitor) is set. - Possible values include: 'Application Insights', 'ActivityLog - Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', - 'ActivityLog Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' - :vartype monitor_service: str or - ~azure.mgmt.alertsmanagement.models.MonitorService - :ivar alert_rule: Rule(monitor) which fired alert instance. Depending on - the monitor service, this would be ARM id or name of the rule. - :vartype alert_rule: str - :ivar source_created_id: Unique Id created by monitor service for each - alert instance. This could be used to track the issue at the monitor - service, in case of Nagios, Zabbix, SCOM etc. - :vartype source_created_id: str - :ivar smart_group_id: Unique Id of the smart group - :vartype smart_group_id: str - :ivar smart_grouping_reason: Verbose reason describing the reason why this - alert instance is added to a smart group - :vartype smart_grouping_reason: str - :ivar start_date_time: Creation time(ISO-8601 format) of alert instance. - :vartype start_date_time: datetime - :ivar last_modified_date_time: Last modification time(ISO-8601 format) of - alert instance. - :vartype last_modified_date_time: datetime - :ivar monitor_condition_resolved_date_time: Resolved time(ISO-8601 format) - of alert instance. This will be updated when monitor service resolves the - alert instance because of the rule condition is not met. - :vartype monitor_condition_resolved_date_time: datetime - :ivar last_modified_user_name: User who last modified the alert, in case - of monitor service updates user would be 'system', otherwise name of the - user. - :vartype last_modified_user_name: str - """ - - _validation = { - 'severity': {'readonly': True}, - 'signal_type': {'readonly': True}, - 'alert_state': {'readonly': True}, - 'monitor_condition': {'readonly': True}, - 'monitor_service': {'readonly': True}, - 'alert_rule': {'readonly': True}, - 'source_created_id': {'readonly': True}, - 'smart_group_id': {'readonly': True}, - 'smart_grouping_reason': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'last_modified_date_time': {'readonly': True}, - 'monitor_condition_resolved_date_time': {'readonly': True}, - 'last_modified_user_name': {'readonly': True}, - } - - _attribute_map = { - 'severity': {'key': 'severity', 'type': 'str'}, - 'signal_type': {'key': 'signalType', 'type': 'str'}, - 'alert_state': {'key': 'alertState', 'type': 'str'}, - 'monitor_condition': {'key': 'monitorCondition', 'type': 'str'}, - 'target_resource': {'key': 'targetResource', 'type': 'str'}, - 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, - 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, - 'target_resource_type': {'key': 'targetResourceType', 'type': 'str'}, - 'monitor_service': {'key': 'monitorService', 'type': 'str'}, - 'alert_rule': {'key': 'alertRule', 'type': 'str'}, - 'source_created_id': {'key': 'sourceCreatedId', 'type': 'str'}, - 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, - 'smart_grouping_reason': {'key': 'smartGroupingReason', 'type': 'str'}, - 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, - 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, - 'monitor_condition_resolved_date_time': {'key': 'monitorConditionResolvedDateTime', 'type': 'iso-8601'}, - 'last_modified_user_name': {'key': 'lastModifiedUserName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Essentials, self).__init__(**kwargs) - self.severity = None - self.signal_type = None - self.alert_state = None - self.monitor_condition = None - self.target_resource = kwargs.get('target_resource', None) - self.target_resource_name = kwargs.get('target_resource_name', None) - self.target_resource_group = kwargs.get('target_resource_group', None) - self.target_resource_type = kwargs.get('target_resource_type', None) - self.monitor_service = None - self.alert_rule = None - self.source_created_id = None - self.smart_group_id = None - self.smart_grouping_reason = None - self.start_date_time = None - self.last_modified_date_time = None - self.monitor_condition_resolved_date_time = None - self.last_modified_user_name = None diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials_py3.py deleted file mode 100644 index 01052b35702e..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials_py3.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Essentials(Model): - """This object contains normalized fields across different monitor service and - also contains state related fields. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar severity: Severity of alert Sev0 being highest and Sev3 being - lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :ivar signal_type: Log based alert or metric based alert. Possible values - include: 'Metric', 'Log', 'Unknown' - :vartype signal_type: str or - ~azure.mgmt.alertsmanagement.models.SignalType - :ivar alert_state: Alert object state, which is modified by the user. - Possible values include: 'New', 'Acknowledged', 'Closed' - :vartype alert_state: str or - ~azure.mgmt.alertsmanagement.models.AlertState - :ivar monitor_condition: Represents rule condition(Fired/Resolved) - maintained by monitor service depending on the state of the state. - Possible values include: 'Fired', 'Resolved' - :vartype monitor_condition: str or - ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param target_resource: Target ARM resource, on which alert got created. - :type target_resource: str - :param target_resource_name: Name of the target ARM resource name, on - which alert got created. - :type target_resource_name: str - :param target_resource_group: Resource group of target ARM resource, on - which alert got created. - :type target_resource_group: str - :param target_resource_type: Resource type of target ARM resource, on - which alert got created. - :type target_resource_type: str - :ivar monitor_service: Monitor service on which the rule(monitor) is set. - Possible values include: 'Application Insights', 'ActivityLog - Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', - 'ActivityLog Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' - :vartype monitor_service: str or - ~azure.mgmt.alertsmanagement.models.MonitorService - :ivar alert_rule: Rule(monitor) which fired alert instance. Depending on - the monitor service, this would be ARM id or name of the rule. - :vartype alert_rule: str - :ivar source_created_id: Unique Id created by monitor service for each - alert instance. This could be used to track the issue at the monitor - service, in case of Nagios, Zabbix, SCOM etc. - :vartype source_created_id: str - :ivar smart_group_id: Unique Id of the smart group - :vartype smart_group_id: str - :ivar smart_grouping_reason: Verbose reason describing the reason why this - alert instance is added to a smart group - :vartype smart_grouping_reason: str - :ivar start_date_time: Creation time(ISO-8601 format) of alert instance. - :vartype start_date_time: datetime - :ivar last_modified_date_time: Last modification time(ISO-8601 format) of - alert instance. - :vartype last_modified_date_time: datetime - :ivar monitor_condition_resolved_date_time: Resolved time(ISO-8601 format) - of alert instance. This will be updated when monitor service resolves the - alert instance because of the rule condition is not met. - :vartype monitor_condition_resolved_date_time: datetime - :ivar last_modified_user_name: User who last modified the alert, in case - of monitor service updates user would be 'system', otherwise name of the - user. - :vartype last_modified_user_name: str - """ - - _validation = { - 'severity': {'readonly': True}, - 'signal_type': {'readonly': True}, - 'alert_state': {'readonly': True}, - 'monitor_condition': {'readonly': True}, - 'monitor_service': {'readonly': True}, - 'alert_rule': {'readonly': True}, - 'source_created_id': {'readonly': True}, - 'smart_group_id': {'readonly': True}, - 'smart_grouping_reason': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'last_modified_date_time': {'readonly': True}, - 'monitor_condition_resolved_date_time': {'readonly': True}, - 'last_modified_user_name': {'readonly': True}, - } - - _attribute_map = { - 'severity': {'key': 'severity', 'type': 'str'}, - 'signal_type': {'key': 'signalType', 'type': 'str'}, - 'alert_state': {'key': 'alertState', 'type': 'str'}, - 'monitor_condition': {'key': 'monitorCondition', 'type': 'str'}, - 'target_resource': {'key': 'targetResource', 'type': 'str'}, - 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, - 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, - 'target_resource_type': {'key': 'targetResourceType', 'type': 'str'}, - 'monitor_service': {'key': 'monitorService', 'type': 'str'}, - 'alert_rule': {'key': 'alertRule', 'type': 'str'}, - 'source_created_id': {'key': 'sourceCreatedId', 'type': 'str'}, - 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, - 'smart_grouping_reason': {'key': 'smartGroupingReason', 'type': 'str'}, - 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, - 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, - 'monitor_condition_resolved_date_time': {'key': 'monitorConditionResolvedDateTime', 'type': 'iso-8601'}, - 'last_modified_user_name': {'key': 'lastModifiedUserName', 'type': 'str'}, - } - - def __init__(self, *, target_resource: str=None, target_resource_name: str=None, target_resource_group: str=None, target_resource_type: str=None, **kwargs) -> None: - super(Essentials, self).__init__(**kwargs) - self.severity = None - self.signal_type = None - self.alert_state = None - self.monitor_condition = None - self.target_resource = target_resource - self.target_resource_name = target_resource_name - self.target_resource_group = target_resource_group - self.target_resource_type = target_resource_type - self.monitor_service = None - self.alert_rule = None - self.source_created_id = None - self.smart_group_id = None - self.smart_grouping_reason = None - self.start_date_time = None - self.last_modified_date_time = None - self.monitor_condition_resolved_date_time = None - self.last_modified_user_name = None diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation.py deleted file mode 100644 index 1b5fea4ff02a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """Operation provided by provider. - - :param name: Name of the operation - :type name: str - :param display: Properties of the operation - :type display: ~azure.mgmt.alertsmanagement.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display.py deleted file mode 100644 index 89c4bdd6ccb6..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """Properties of the operation. - - :param provider: Provider name - :type provider: str - :param resource: Resource name - :type resource: str - :param operation: Operation name - :type operation: str - :param description: Description of the operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display_py3.py deleted file mode 100644 index fa3740dfc655..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """Properties of the operation. - - :param provider: Provider name - :type provider: str - :param resource: Resource name - :type resource: str - :param operation: Operation name - :type operation: str - :param description: Description of the operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_paged.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_paged.py deleted file mode 100644 index 3794d02c84f1..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_py3.py deleted file mode 100644 index ee66b4cfa181..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """Operation provided by provider. - - :param name: Name of the operation - :type name: str - :param display: Properties of the operation - :type display: ~azure.mgmt.alertsmanagement.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, name: str=None, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource.py deleted file mode 100644 index 7454d56b9033..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """An azure resource object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.type = None - self.name = None diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource_py3.py deleted file mode 100644 index 83ff9951fb91..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """An azure resource object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.type = None - self.name = None diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group.py deleted file mode 100644 index b1754f67fb4c..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class SmartGroup(Resource): - """Set of related alerts grouped together smartly by AMS. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param alerts_count: Total number of alerts in smart group - :type alerts_count: int - :ivar smart_group_state: Smart group state. Possible values include: - 'New', 'Acknowledged', 'Closed' - :vartype smart_group_state: str or - ~azure.mgmt.alertsmanagement.models.State - :ivar severity: Severity of smart group is the highest(Sev0 >... > Sev4) - severity of all the alerts in the group. Possible values include: 'Sev0', - 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :ivar start_date_time: Creation time of smart group. Date-Time in ISO-8601 - format. - :vartype start_date_time: datetime - :ivar last_modified_date_time: Last updated time of smart group. Date-Time - in ISO-8601 format. - :vartype last_modified_date_time: datetime - :ivar last_modified_user_name: Last modified by user name. - :vartype last_modified_user_name: str - :param resources: Summary of target resources in the smart group - :type resources: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param resource_types: Summary of target resource types in the smart group - :type resource_types: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param resource_groups: Summary of target resource groups in the smart - group - :type resource_groups: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param monitor_services: Summary of monitorServices in the smart group - :type monitor_services: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param monitor_conditions: Summary of monitorConditions in the smart group - :type monitor_conditions: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param alert_states: Summary of alertStates in the smart group - :type alert_states: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param alert_severities: Summary of alertSeverities in the smart group - :type alert_severities: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param next_link: The URI to fetch the next page of alerts. Call - ListNext() with this URI to fetch the next page alerts. - :type next_link: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - 'smart_group_state': {'readonly': True}, - 'severity': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'last_modified_date_time': {'readonly': True}, - 'last_modified_user_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'alerts_count': {'key': 'properties.alertsCount', 'type': 'int'}, - 'smart_group_state': {'key': 'properties.smartGroupState', 'type': 'str'}, - 'severity': {'key': 'properties.severity', 'type': 'str'}, - 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, - 'last_modified_date_time': {'key': 'properties.lastModifiedDateTime', 'type': 'iso-8601'}, - 'last_modified_user_name': {'key': 'properties.lastModifiedUserName', 'type': 'str'}, - 'resources': {'key': 'properties.resources', 'type': '[SmartGroupAggregatedProperty]'}, - 'resource_types': {'key': 'properties.resourceTypes', 'type': '[SmartGroupAggregatedProperty]'}, - 'resource_groups': {'key': 'properties.resourceGroups', 'type': '[SmartGroupAggregatedProperty]'}, - 'monitor_services': {'key': 'properties.monitorServices', 'type': '[SmartGroupAggregatedProperty]'}, - 'monitor_conditions': {'key': 'properties.monitorConditions', 'type': '[SmartGroupAggregatedProperty]'}, - 'alert_states': {'key': 'properties.alertStates', 'type': '[SmartGroupAggregatedProperty]'}, - 'alert_severities': {'key': 'properties.alertSeverities', 'type': '[SmartGroupAggregatedProperty]'}, - 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SmartGroup, self).__init__(**kwargs) - self.alerts_count = kwargs.get('alerts_count', None) - self.smart_group_state = None - self.severity = None - self.start_date_time = None - self.last_modified_date_time = None - self.last_modified_user_name = None - self.resources = kwargs.get('resources', None) - self.resource_types = kwargs.get('resource_types', None) - self.resource_groups = kwargs.get('resource_groups', None) - self.monitor_services = kwargs.get('monitor_services', None) - self.monitor_conditions = kwargs.get('monitor_conditions', None) - self.alert_states = kwargs.get('alert_states', None) - self.alert_severities = kwargs.get('alert_severities', None) - self.next_link = kwargs.get('next_link', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property.py deleted file mode 100644 index 4681ff600eff..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupAggregatedProperty(Model): - """Aggregated property of each type. - - :param name: Name of the type. - :type name: str - :param count: Total number of items of type. - :type count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(SmartGroupAggregatedProperty, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.count = kwargs.get('count', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property_py3.py deleted file mode 100644 index 5a6bfb2d896e..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupAggregatedProperty(Model): - """Aggregated property of each type. - - :param name: Name of the type. - :type name: str - :param count: Total number of items of type. - :type count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, *, name: str=None, count: int=None, **kwargs) -> None: - super(SmartGroupAggregatedProperty, self).__init__(**kwargs) - self.name = name - self.count = count diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification.py deleted file mode 100644 index b0c27ebc02c4..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class SmartGroupModification(Resource): - """Alert Modification details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: - ~azure.mgmt.alertsmanagement.models.SmartGroupModificationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'SmartGroupModificationProperties'}, - } - - def __init__(self, **kwargs): - super(SmartGroupModification, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item.py deleted file mode 100644 index b87b7a06465d..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupModificationItem(Model): - """smartGroup modification item. - - :param modification_event: Reason for the modification. Possible values - include: 'SmartGroupCreated', 'StateChange', 'AlertAdded', 'AlertRemoved' - :type modification_event: str or - ~azure.mgmt.alertsmanagement.models.SmartGroupModificationEvent - :param old_value: Old value - :type old_value: str - :param new_value: New value - :type new_value: str - :param modified_at: Modified date and time - :type modified_at: str - :param modified_by: Modified user details (Principal client name) - :type modified_by: str - :param comments: Modification comments - :type comments: str - :param description: Description of the modification - :type description: str - """ - - _attribute_map = { - 'modification_event': {'key': 'modificationEvent', 'type': 'SmartGroupModificationEvent'}, - 'old_value': {'key': 'oldValue', 'type': 'str'}, - 'new_value': {'key': 'newValue', 'type': 'str'}, - 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, - 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, - 'comments': {'key': 'comments', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SmartGroupModificationItem, self).__init__(**kwargs) - self.modification_event = kwargs.get('modification_event', None) - self.old_value = kwargs.get('old_value', None) - self.new_value = kwargs.get('new_value', None) - self.modified_at = kwargs.get('modified_at', None) - self.modified_by = kwargs.get('modified_by', None) - self.comments = kwargs.get('comments', None) - self.description = kwargs.get('description', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item_py3.py deleted file mode 100644 index aa07075fb384..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupModificationItem(Model): - """smartGroup modification item. - - :param modification_event: Reason for the modification. Possible values - include: 'SmartGroupCreated', 'StateChange', 'AlertAdded', 'AlertRemoved' - :type modification_event: str or - ~azure.mgmt.alertsmanagement.models.SmartGroupModificationEvent - :param old_value: Old value - :type old_value: str - :param new_value: New value - :type new_value: str - :param modified_at: Modified date and time - :type modified_at: str - :param modified_by: Modified user details (Principal client name) - :type modified_by: str - :param comments: Modification comments - :type comments: str - :param description: Description of the modification - :type description: str - """ - - _attribute_map = { - 'modification_event': {'key': 'modificationEvent', 'type': 'SmartGroupModificationEvent'}, - 'old_value': {'key': 'oldValue', 'type': 'str'}, - 'new_value': {'key': 'newValue', 'type': 'str'}, - 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, - 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, - 'comments': {'key': 'comments', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, modification_event=None, old_value: str=None, new_value: str=None, modified_at: str=None, modified_by: str=None, comments: str=None, description: str=None, **kwargs) -> None: - super(SmartGroupModificationItem, self).__init__(**kwargs) - self.modification_event = modification_event - self.old_value = old_value - self.new_value = new_value - self.modified_at = modified_at - self.modified_by = modified_by - self.comments = comments - self.description = description diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties.py deleted file mode 100644 index 5535552813b3..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupModificationProperties(Model): - """Properties of the smartGroup modification item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar smart_group_id: Unique Id of the smartGroup for which the history is - being retrieved - :vartype smart_group_id: str - :param modifications: Modification details - :type modifications: - list[~azure.mgmt.alertsmanagement.models.SmartGroupModificationItem] - :param next_link: URL to fetch the next set of results. - :type next_link: str - """ - - _validation = { - 'smart_group_id': {'readonly': True}, - } - - _attribute_map = { - 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, - 'modifications': {'key': 'modifications', 'type': '[SmartGroupModificationItem]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SmartGroupModificationProperties, self).__init__(**kwargs) - self.smart_group_id = None - self.modifications = kwargs.get('modifications', None) - self.next_link = kwargs.get('next_link', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties_py3.py deleted file mode 100644 index 40d128112187..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupModificationProperties(Model): - """Properties of the smartGroup modification item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar smart_group_id: Unique Id of the smartGroup for which the history is - being retrieved - :vartype smart_group_id: str - :param modifications: Modification details - :type modifications: - list[~azure.mgmt.alertsmanagement.models.SmartGroupModificationItem] - :param next_link: URL to fetch the next set of results. - :type next_link: str - """ - - _validation = { - 'smart_group_id': {'readonly': True}, - } - - _attribute_map = { - 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, - 'modifications': {'key': 'modifications', 'type': '[SmartGroupModificationItem]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, modifications=None, next_link: str=None, **kwargs) -> None: - super(SmartGroupModificationProperties, self).__init__(**kwargs) - self.smart_group_id = None - self.modifications = modifications - self.next_link = next_link diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_py3.py deleted file mode 100644 index b8cb946b706a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class SmartGroupModification(Resource): - """Alert Modification details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: - ~azure.mgmt.alertsmanagement.models.SmartGroupModificationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'SmartGroupModificationProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(SmartGroupModification, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_py3.py deleted file mode 100644 index a0c00f029485..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_py3.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class SmartGroup(Resource): - """Set of related alerts grouped together smartly by AMS. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param alerts_count: Total number of alerts in smart group - :type alerts_count: int - :ivar smart_group_state: Smart group state. Possible values include: - 'New', 'Acknowledged', 'Closed' - :vartype smart_group_state: str or - ~azure.mgmt.alertsmanagement.models.State - :ivar severity: Severity of smart group is the highest(Sev0 >... > Sev4) - severity of all the alerts in the group. Possible values include: 'Sev0', - 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :ivar start_date_time: Creation time of smart group. Date-Time in ISO-8601 - format. - :vartype start_date_time: datetime - :ivar last_modified_date_time: Last updated time of smart group. Date-Time - in ISO-8601 format. - :vartype last_modified_date_time: datetime - :ivar last_modified_user_name: Last modified by user name. - :vartype last_modified_user_name: str - :param resources: Summary of target resources in the smart group - :type resources: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param resource_types: Summary of target resource types in the smart group - :type resource_types: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param resource_groups: Summary of target resource groups in the smart - group - :type resource_groups: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param monitor_services: Summary of monitorServices in the smart group - :type monitor_services: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param monitor_conditions: Summary of monitorConditions in the smart group - :type monitor_conditions: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param alert_states: Summary of alertStates in the smart group - :type alert_states: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param alert_severities: Summary of alertSeverities in the smart group - :type alert_severities: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param next_link: The URI to fetch the next page of alerts. Call - ListNext() with this URI to fetch the next page alerts. - :type next_link: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - 'smart_group_state': {'readonly': True}, - 'severity': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'last_modified_date_time': {'readonly': True}, - 'last_modified_user_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'alerts_count': {'key': 'properties.alertsCount', 'type': 'int'}, - 'smart_group_state': {'key': 'properties.smartGroupState', 'type': 'str'}, - 'severity': {'key': 'properties.severity', 'type': 'str'}, - 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, - 'last_modified_date_time': {'key': 'properties.lastModifiedDateTime', 'type': 'iso-8601'}, - 'last_modified_user_name': {'key': 'properties.lastModifiedUserName', 'type': 'str'}, - 'resources': {'key': 'properties.resources', 'type': '[SmartGroupAggregatedProperty]'}, - 'resource_types': {'key': 'properties.resourceTypes', 'type': '[SmartGroupAggregatedProperty]'}, - 'resource_groups': {'key': 'properties.resourceGroups', 'type': '[SmartGroupAggregatedProperty]'}, - 'monitor_services': {'key': 'properties.monitorServices', 'type': '[SmartGroupAggregatedProperty]'}, - 'monitor_conditions': {'key': 'properties.monitorConditions', 'type': '[SmartGroupAggregatedProperty]'}, - 'alert_states': {'key': 'properties.alertStates', 'type': '[SmartGroupAggregatedProperty]'}, - 'alert_severities': {'key': 'properties.alertSeverities', 'type': '[SmartGroupAggregatedProperty]'}, - 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, - } - - def __init__(self, *, alerts_count: int=None, resources=None, resource_types=None, resource_groups=None, monitor_services=None, monitor_conditions=None, alert_states=None, alert_severities=None, next_link: str=None, **kwargs) -> None: - super(SmartGroup, self).__init__(**kwargs) - self.alerts_count = alerts_count - self.smart_group_state = None - self.severity = None - self.start_date_time = None - self.last_modified_date_time = None - self.last_modified_user_name = None - self.resources = resources - self.resource_types = resource_types - self.resource_groups = resource_groups - self.monitor_services = monitor_services - self.monitor_conditions = monitor_conditions - self.alert_states = alert_states - self.alert_severities = alert_severities - self.next_link = next_link diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list.py deleted file mode 100644 index 17302096edc5..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupsList(Model): - """List the alerts. - - :param next_link: URL to fetch the next set of alerts. - :type next_link: str - :param value: List of alerts - :type value: list[~azure.mgmt.alertsmanagement.models.SmartGroup] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[SmartGroup]'}, - } - - def __init__(self, **kwargs): - super(SmartGroupsList, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list_py3.py deleted file mode 100644 index 538de5af7747..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupsList(Model): - """List the alerts. - - :param next_link: URL to fetch the next set of alerts. - :type next_link: str - :param value: List of alerts - :type value: list[~azure.mgmt.alertsmanagement.models.SmartGroup] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[SmartGroup]'}, - } - - def __init__(self, *, next_link: str=None, value=None, **kwargs) -> None: - super(SmartGroupsList, self).__init__(**kwargs) - self.next_link = next_link - self.value = value diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py index 9341f4bfee3b..946b389ce5fb 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py @@ -9,12 +9,16 @@ # regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .alerts_operations import AlertsOperations -from .smart_groups_operations import SmartGroupsOperations +from ._operations import Operations +from ._alerts_operations import AlertsOperations +from ._smart_groups_operations import SmartGroupsOperations +from ._action_rules_operations import ActionRulesOperations +from ._smart_detector_alert_rules_operations import SmartDetectorAlertRulesOperations __all__ = [ 'Operations', 'AlertsOperations', 'SmartGroupsOperations', + 'ActionRulesOperations', + 'SmartDetectorAlertRulesOperations', ] diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_action_rules_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_action_rules_operations.py new file mode 100644 index 000000000000..4b988fecc8a6 --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_action_rules_operations.py @@ -0,0 +1,575 @@ +# 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 .. import models + + +class ActionRulesOperations(object): + """ActionRulesOperations 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: "2019-05-05-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-05-05-preview" + + self.config = config + + def list_by_subscription( + self, target_resource_group=None, target_resource_type=None, target_resource=None, severity=None, monitor_service=None, impacted_scope=None, description=None, alert_rule_id=None, action_group=None, name=None, custom_headers=None, raw=False, **operation_config): + """Get all action rule in a given subscription. + + List all action rules of the subscription and given input filters. + + :param target_resource_group: Filter by target resource group name. + Default value is select all. + :type target_resource_group: str + :param target_resource_type: Filter by target resource type. Default + value is select all. + :type target_resource_type: str + :param target_resource: Filter by target resource( which is full ARM + ID) Default value is select all. + :type target_resource: str + :param severity: Filter by severity. Default value is select all. + Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' + :type monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :param impacted_scope: filter by impacted/target scope (provide comma + separated list for multiple scopes). The value should be an well + constructed ARM id of the scope. + :type impacted_scope: str + :param description: filter by alert rule description + :type description: str + :param alert_rule_id: filter by alert rule id + :type alert_rule_id: str + :param action_group: filter by action group configured as part of + action rule + :type action_group: str + :param name: filter by action rule name + :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: An iterator like instance of ActionRule + :rtype: + ~azure.mgmt.alertsmanagement.models.ActionRulePaged[~azure.mgmt.alertsmanagement.models.ActionRule] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if target_resource_group is not None: + query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') + if target_resource_type is not None: + query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') + if target_resource is not None: + query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') + if severity is not None: + query_parameters['severity'] = self._serialize.query("severity", severity, 'str') + if monitor_service is not None: + query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') + if impacted_scope is not None: + query_parameters['impactedScope'] = self._serialize.query("impacted_scope", impacted_scope, 'str') + if description is not None: + query_parameters['description'] = self._serialize.query("description", description, 'str') + if alert_rule_id is not None: + query_parameters['alertRuleId'] = self._serialize.query("alert_rule_id", alert_rule_id, 'str') + if action_group is not None: + query_parameters['actionGroup'] = self._serialize.query("action_group", action_group, 'str') + if name is not None: + query_parameters['name'] = self._serialize.query("name", name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ActionRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/actionRules'} + + def list_by_resource_group( + self, resource_group_name, target_resource_group=None, target_resource_type=None, target_resource=None, severity=None, monitor_service=None, impacted_scope=None, description=None, alert_rule_id=None, action_group=None, name=None, custom_headers=None, raw=False, **operation_config): + """Get all action rules created in a resource group. + + List all action rules of the subscription, created in given resource + group and given input filters. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param target_resource_group: Filter by target resource group name. + Default value is select all. + :type target_resource_group: str + :param target_resource_type: Filter by target resource type. Default + value is select all. + :type target_resource_type: str + :param target_resource: Filter by target resource( which is full ARM + ID) Default value is select all. + :type target_resource: str + :param severity: Filter by severity. Default value is select all. + Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' + :type monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :param impacted_scope: filter by impacted/target scope (provide comma + separated list for multiple scopes). The value should be an well + constructed ARM id of the scope. + :type impacted_scope: str + :param description: filter by alert rule description + :type description: str + :param alert_rule_id: filter by alert rule id + :type alert_rule_id: str + :param action_group: filter by action group configured as part of + action rule + :type action_group: str + :param name: filter by action rule name + :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: An iterator like instance of ActionRule + :rtype: + ~azure.mgmt.alertsmanagement.models.ActionRulePaged[~azure.mgmt.alertsmanagement.models.ActionRule] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if target_resource_group is not None: + query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') + if target_resource_type is not None: + query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') + if target_resource is not None: + query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') + if severity is not None: + query_parameters['severity'] = self._serialize.query("severity", severity, 'str') + if monitor_service is not None: + query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') + if impacted_scope is not None: + query_parameters['impactedScope'] = self._serialize.query("impacted_scope", impacted_scope, 'str') + if description is not None: + query_parameters['description'] = self._serialize.query("description", description, 'str') + if alert_rule_id is not None: + query_parameters['alertRuleId'] = self._serialize.query("alert_rule_id", alert_rule_id, 'str') + if action_group is not None: + query_parameters['actionGroup'] = self._serialize.query("action_group", action_group, 'str') + if name is not None: + query_parameters['name'] = self._serialize.query("name", name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ActionRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules'} + + def get_by_name( + self, resource_group_name, action_rule_name, custom_headers=None, raw=False, **operation_config): + """Get action rule by name. + + Get a specific action rule. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param action_rule_name: The name of action rule that needs to be + fetched + :type action_rule_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: ActionRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.ActionRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_by_name.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'), + 'actionRuleName': self._serialize.url("action_rule_name", action_rule_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]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ActionRule', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}'} + + def create_update( + self, resource_group_name, action_rule_name, action_rule, custom_headers=None, raw=False, **operation_config): + """Create/update an action rule. + + Creates/Updates a specific action rule. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param action_rule_name: The name of action rule that needs to be + created/updated + :type action_rule_name: str + :param action_rule: action rule to be created/updated + :type action_rule: ~azure.mgmt.alertsmanagement.models.ActionRule + :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: ActionRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.ActionRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_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'), + 'actionRuleName': self._serialize.url("action_rule_name", action_rule_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(action_rule, 'ActionRule') + + # 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]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ActionRule', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}'} + + def delete( + self, resource_group_name, action_rule_name, custom_headers=None, raw=False, **operation_config): + """Delete action rule. + + Deletes a given action rule. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param action_rule_name: The name that needs to be deleted + :type action_rule_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: bool or ClientRawResponse if raw=true + :rtype: bool or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.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'), + 'actionRuleName': self._serialize.url("action_rule_name", action_rule_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.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('bool', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}'} + + def update( + self, resource_group_name, action_rule_name, status=None, tags=None, custom_headers=None, raw=False, **operation_config): + """Patch action rule. + + Update enabled flag and/or tags for the given action rule. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param action_rule_name: The name that needs to be updated + :type action_rule_name: str + :param status: Indicates if the given action rule is enabled or + disabled. Possible values include: 'Enabled', 'Disabled' + :type status: str or + ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param tags: tags to be updated + :type tags: object + :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: ActionRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.ActionRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + action_rule_patch = models.PatchObject(status=status, tags=tags) + + # Construct 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'), + 'actionRuleName': self._serialize.url("action_rule_name", action_rule_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(action_rule_patch, 'PatchObject') + + # 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]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ActionRule', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}'} diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/alerts_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_alerts_operations.py similarity index 81% rename from sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/alerts_operations.py rename to sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_alerts_operations.py index fd15f46bc817..7d0a9fa6d063 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/alerts_operations.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_alerts_operations.py @@ -11,6 +11,7 @@ import uuid from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError from .. import models @@ -18,11 +19,14 @@ class AlertsOperations(object): """AlertsOperations 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: API version. Constant value: "2018-05-05". + :ivar api_version: client API version. Constant value: "2019-05-05-preview". + :ivar identifier: Identification of the information to be retrieved by API call. Constant value: "MonitorServiceList". """ models = models @@ -32,15 +36,70 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-05-05" + self.api_version = "2019-05-05-preview" + self.identifier = "MonitorServiceList" self.config = config + def meta_data( + self, custom_headers=None, raw=False, **operation_config): + """List alerts meta data information based on value of identifier + parameter. + + :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: AlertsMetaData or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.AlertsMetaData or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.meta_data.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['identifier'] = self._serialize.query("self.identifier", self.identifier, '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('AlertsMetaData', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + meta_data.metadata = {'url': '/providers/Microsoft.AlertsManagement/alertsMetaData'} + def get_all( self, target_resource=None, target_resource_type=None, target_resource_group=None, monitor_service=None, monitor_condition=None, severity=None, alert_state=None, alert_rule=None, smart_group_id=None, include_context=None, include_egress_config=None, page_count=None, sort_by=None, sort_order=None, select=None, time_range=None, custom_time_range=None, custom_headers=None, raw=False, **operation_config): - """List all the existing alerts, where the results can be selective by - passing multiple filter parameters including time range and sorted on - specific fields. . + """List all existing alerts, where the results can be filtered on the + basis of multiple parameters (e.g. time range). The results can then be + sorted on the basis specific fields, with the default being + lastModifiedDateTime. . :param target_resource: Filter by target resource( which is full ARM ID) Default value is select all. @@ -51,21 +110,20 @@ def get_all( :param target_resource_group: Filter by target resource group name. Default value is select all. :type target_resource_group: str - :param monitor_service: Filter by monitor service which is the source - of the alert instance. Default value is select all. Possible values - include: 'Application Insights', 'ActivityLog Administrative', - 'ActivityLog Security', 'ActivityLog Recommendation', 'ActivityLog - Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' :type monitor_service: str or ~azure.mgmt.alertsmanagement.models.MonitorService - :param monitor_condition: Filter by monitor condition which is the - state of the monitor(alertRule) at monitor service. Default value is - to select all. Possible values include: 'Fired', 'Resolved' + :param monitor_condition: Filter by monitor condition which is either + 'Fired' or 'Resolved'. Default value is to select all. Possible values + include: 'Fired', 'Resolved' :type monitor_condition: str or ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param severity: Filter by severity. Defaut value is select all. + :param severity: Filter by severity. Default value is select all. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity :param alert_state: Filter by state of the alert instance. Default @@ -73,14 +131,14 @@ def get_all( 'Acknowledged', 'Closed' :type alert_state: str or ~azure.mgmt.alertsmanagement.models.AlertState - :param alert_rule: Filter by alert rule(monitor) which fired alert - instance. Default value is to select all. + :param alert_rule: Filter by specific alert rule. Default value is to + select all. :type alert_rule: str :param smart_group_id: Filter the alerts list by the Smart Group Id. Default value is none. :type smart_group_id: str - :param include_context: Include context which has data contextual to - the monitor service. Default value is false' + :param include_context: Include context which has contextual data + specific to the monitor service. Default value is false' :type include_context: bool :param include_egress_config: Include egress config which would be used for displaying the content in portal. Default value is 'false'. @@ -102,9 +160,9 @@ def get_all( others. Possible values include: 'asc', 'desc' :type sort_order: str :param select: This filter allows to selection of the fields(comma - seperated) which would be part of the the essential section. This - would allow to project only the required fields rather than getting - entire content. Default is to fetch all the fields in the essentials + separated) which would be part of the essential section. This would + allow to project only the required fields rather than getting entire + content. Default is to fetch all the fields in the essentials section. :type select: str :param time_range: Filter by time range by below listed values. @@ -128,8 +186,7 @@ def get_all( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.get_all.metadata['url'] @@ -192,6 +249,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -200,12 +262,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized get_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts'} @@ -259,7 +319,6 @@ def get_by_id( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Alert', response) @@ -272,7 +331,7 @@ def get_by_id( def change_state( self, alert_id, new_state, custom_headers=None, raw=False, **operation_config): - """Change the state of the alert. + """Change the state of an alert. :param alert_id: Unique ID of an alert instance. :type alert_id: str @@ -321,7 +380,6 @@ def change_state( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Alert', response) @@ -334,7 +392,9 @@ def change_state( def get_history( self, alert_id, custom_headers=None, raw=False, **operation_config): - """Get the history of the changes of an alert. + """Get the history of an alert, which captures any monitor condition + changes (Fired/Resolved) and alert state changes + (New/Acknowledged/Closed). :param alert_id: Unique ID of an alert instance. :type alert_id: str @@ -379,7 +439,6 @@ def get_history( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AlertModification', response) @@ -392,10 +451,13 @@ def get_history( def get_summary( self, groupby, include_smart_groups_count=None, target_resource=None, target_resource_type=None, target_resource_group=None, monitor_service=None, monitor_condition=None, severity=None, alert_state=None, alert_rule=None, time_range=None, custom_time_range=None, custom_headers=None, raw=False, **operation_config): - """Summary of alerts with the count each severity. + """Get a summarized count of your alerts grouped by various parameters + (e.g. grouping by 'Severity' returns the count of alerts for each + severity). - :param groupby: This parameter allows the result set to be aggregated - by input fields. For example, groupby=severity,alertstate. Possible + :param groupby: This parameter allows the result set to be grouped by + input fields (Maximum 2 comma separated fields supported). For + example, groupby=severity or groupby=severity,alertstate. Possible values include: 'severity', 'alertState', 'monitorCondition', 'monitorService', 'signalType', 'alertRule' :type groupby: str or @@ -412,21 +474,20 @@ def get_summary( :param target_resource_group: Filter by target resource group name. Default value is select all. :type target_resource_group: str - :param monitor_service: Filter by monitor service which is the source - of the alert instance. Default value is select all. Possible values - include: 'Application Insights', 'ActivityLog Administrative', - 'ActivityLog Security', 'ActivityLog Recommendation', 'ActivityLog - Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' :type monitor_service: str or ~azure.mgmt.alertsmanagement.models.MonitorService - :param monitor_condition: Filter by monitor condition which is the - state of the monitor(alertRule) at monitor service. Default value is - to select all. Possible values include: 'Fired', 'Resolved' + :param monitor_condition: Filter by monitor condition which is either + 'Fired' or 'Resolved'. Default value is to select all. Possible values + include: 'Fired', 'Resolved' :type monitor_condition: str or ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param severity: Filter by severity. Defaut value is select all. + :param severity: Filter by severity. Default value is select all. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity :param alert_state: Filter by state of the alert instance. Default @@ -434,8 +495,8 @@ def get_summary( 'Acknowledged', 'Closed' :type alert_state: str or ~azure.mgmt.alertsmanagement.models.AlertState - :param alert_rule: Filter by alert rule(monitor) which fired alert - instance. Default value is to select all. + :param alert_rule: Filter by specific alert rule. Default value is to + select all. :type alert_rule: str :param time_range: Filter by time range by below listed values. Default value is 1 day. Possible values include: '1h', '1d', '7d', @@ -510,7 +571,6 @@ def get_summary( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AlertsSummary', response) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_operations.py similarity index 87% rename from sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/operations.py rename to sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_operations.py index 9718bb4566f6..057900f678f2 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/operations.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_operations.py @@ -19,11 +19,13 @@ class Operations(object): """Operations 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: API version. Constant value: "2018-05-05". + :ivar api_version: client API version. Constant value: "2019-05-05-preview". """ models = models @@ -33,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-05-05" + self.api_version = "2019-05-05-preview" self.config = config @@ -52,8 +54,7 @@ def list( ~azure.mgmt.alertsmanagement.models.OperationPaged[~azure.mgmt.alertsmanagement.models.Operation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -78,6 +79,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -88,12 +94,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.AlertsManagement/operations'} diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py new file mode 100644 index 000000000000..2cc0b1152ea4 --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py @@ -0,0 +1,436 @@ +# 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 .. import models + + +class SmartDetectorAlertRulesOperations(object): + """SmartDetectorAlertRulesOperations 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: "2019-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-06-01" + + self.config = config + + def list( + self, expand_detector=None, custom_headers=None, raw=False, **operation_config): + """List all the existing Smart Detector alert rules within the + subscription. + + :param expand_detector: Indicates if Smart Detector should be + expanded. + :type expand_detector: bool + :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: An iterator like instance of AlertRule + :rtype: + ~azure.mgmt.alertsmanagement.models.AlertRulePaged[~azure.mgmt.alertsmanagement.models.AlertRule] + :raises: + :class:`ErrorResponse1Exception` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if expand_detector is not None: + query_parameters['expandDetector'] = self._serialize.query("expand_detector", expand_detector, 'bool') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AlertRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.alertsManagement/smartDetectorAlertRules'} + + def list_by_resource_group( + self, resource_group_name, expand_detector=None, custom_headers=None, raw=False, **operation_config): + """List all the existing Smart Detector alert rules within the + subscription and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param expand_detector: Indicates if Smart Detector should be + expanded. + :type expand_detector: bool + :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: An iterator like instance of AlertRule + :rtype: + ~azure.mgmt.alertsmanagement.models.AlertRulePaged[~azure.mgmt.alertsmanagement.models.AlertRule] + :raises: + :class:`ErrorResponse1Exception` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.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') + } + 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') + if expand_detector is not None: + query_parameters['expandDetector'] = self._serialize.query("expand_detector", expand_detector, 'bool') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AlertRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules'} + + def get( + self, resource_group_name, alert_rule_name, expand_detector=None, custom_headers=None, raw=False, **operation_config): + """Get a specific Smart Detector alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param alert_rule_name: The name of the alert rule. + :type alert_rule_name: str + :param expand_detector: Indicates if Smart Detector should be + expanded. + :type expand_detector: bool + :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: AlertRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.AlertRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponse1Exception` + """ + # 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'), + 'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_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') + if expand_detector is not None: + query_parameters['expandDetector'] = self._serialize.query("expand_detector", expand_detector, 'bool') + + # 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]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AlertRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules/{alertRuleName}'} + + def create_or_update( + self, resource_group_name, alert_rule_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or update a Smart Detector alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param alert_rule_name: The name of the alert rule. + :type alert_rule_name: str + :param parameters: Parameters supplied to the operation. + :type parameters: ~azure.mgmt.alertsmanagement.models.AlertRule + :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: AlertRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.AlertRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponse1Exception` + """ + # Construct URL + url = self.create_or_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'), + 'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_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(parameters, 'AlertRule') + + # 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, 201]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AlertRule', response) + if response.status_code == 201: + deserialized = self._deserialize('AlertRule', 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.alertsManagement/smartDetectorAlertRules/{alertRuleName}'} + + def patch( + self, resource_group_name, alert_rule_name, parameters, custom_headers=None, raw=False, **operation_config): + """Patch a specific Smart Detector alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param alert_rule_name: The name of the alert rule. + :type alert_rule_name: str + :param parameters: Parameters supplied to the operation. + :type parameters: + ~azure.mgmt.alertsmanagement.models.AlertRulePatchObject + :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: AlertRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.AlertRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponse1Exception` + """ + # Construct URL + url = self.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'), + 'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_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(parameters, 'AlertRulePatchObject') + + # 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]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AlertRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules/{alertRuleName}'} + + def delete( + self, resource_group_name, alert_rule_name, custom_headers=None, raw=False, **operation_config): + """Delete an existing Smart Detector alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param alert_rule_name: The name of the alert rule. + :type alert_rule_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:`ErrorResponse1Exception` + """ + # Construct URL + url = self.delete.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'), + 'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_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 = {} + 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.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules/{alertRuleName}'} diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/smart_groups_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_groups_operations.py similarity index 70% rename from sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/smart_groups_operations.py rename to sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_groups_operations.py index 8ff2c33ae120..bd4c0cfce5c1 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/smart_groups_operations.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_groups_operations.py @@ -18,11 +18,13 @@ class SmartGroupsOperations(object): """SmartGroupsOperations 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: API version. Constant value: "2018-05-05". + :ivar api_version: client API version. Constant value: "2019-05-05-preview". """ models = models @@ -32,15 +34,15 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-05-05" + self.api_version = "2019-05-05-preview" self.config = config def get_all( self, target_resource=None, target_resource_group=None, target_resource_type=None, monitor_service=None, monitor_condition=None, severity=None, smart_group_state=None, time_range=None, page_count=None, sort_by=None, sort_order=None, custom_headers=None, raw=False, **operation_config): - """Get all smartGroups within the subscription. + """Get all Smart Groups within a specified subscription. - List all the smartGroups within the specified subscription. . + List all the Smart Groups within a specified subscription. . :param target_resource: Filter by target resource( which is full ARM ID) Default value is select all. @@ -51,21 +53,20 @@ def get_all( :param target_resource_type: Filter by target resource type. Default value is select all. :type target_resource_type: str - :param monitor_service: Filter by monitor service which is the source - of the alert instance. Default value is select all. Possible values - include: 'Application Insights', 'ActivityLog Administrative', - 'ActivityLog Security', 'ActivityLog Recommendation', 'ActivityLog - Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' :type monitor_service: str or ~azure.mgmt.alertsmanagement.models.MonitorService - :param monitor_condition: Filter by monitor condition which is the - state of the monitor(alertRule) at monitor service. Default value is - to select all. Possible values include: 'Fired', 'Resolved' + :param monitor_condition: Filter by monitor condition which is either + 'Fired' or 'Resolved'. Default value is to select all. Possible values + include: 'Fired', 'Resolved' :type monitor_condition: str or ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param severity: Filter by severity. Defaut value is select all. + :param severity: Filter by severity. Default value is select all. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity :param smart_group_state: Filter by state of the smart group. Default @@ -82,7 +83,7 @@ def get_all( "includeContent" filter is selected, maximum value allowed is 25. Default value is 25. :type page_count: int - :param sort_by: Sort the query results by input field Default value + :param sort_by: Sort the query results by input field. Default value is sort by 'lastModifiedDateTime'. Possible values include: 'alertsCount', 'state', 'severity', 'startDateTime', 'lastModifiedDateTime' @@ -97,79 +98,89 @@ def get_all( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: SmartGroupsList or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.alertsmanagement.models.SmartGroupsList or - ~msrest.pipeline.ClientRawResponse + :return: An iterator like instance of SmartGroup + :rtype: + ~azure.mgmt.alertsmanagement.models.SmartGroupPaged[~azure.mgmt.alertsmanagement.models.SmartGroup] :raises: :class:`ErrorResponseException` """ - # Construct URL - url = self.get_all.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if target_resource is not None: - query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') - if target_resource_group is not None: - query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') - if target_resource_type is not None: - query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') - if monitor_service is not None: - query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') - if monitor_condition is not None: - query_parameters['monitorCondition'] = self._serialize.query("monitor_condition", monitor_condition, 'str') - if severity is not None: - query_parameters['severity'] = self._serialize.query("severity", severity, 'str') - if smart_group_state is not None: - query_parameters['smartGroupState'] = self._serialize.query("smart_group_state", smart_group_state, 'str') - if time_range is not None: - query_parameters['timeRange'] = self._serialize.query("time_range", time_range, 'str') - if page_count is not None: - query_parameters['pageCount'] = self._serialize.query("page_count", page_count, 'int') - if sort_by is not None: - query_parameters['sortBy'] = self._serialize.query("sort_by", sort_by, 'str') - if sort_order is not None: - query_parameters['sortOrder'] = self._serialize.query("sort_order", sort_order, 'str') - 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]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SmartGroupsList', response) - + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_all.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if target_resource is not None: + query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') + if target_resource_group is not None: + query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') + if target_resource_type is not None: + query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') + if monitor_service is not None: + query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') + if monitor_condition is not None: + query_parameters['monitorCondition'] = self._serialize.query("monitor_condition", monitor_condition, 'str') + if severity is not None: + query_parameters['severity'] = self._serialize.query("severity", severity, 'str') + if smart_group_state is not None: + query_parameters['smartGroupState'] = self._serialize.query("smart_group_state", smart_group_state, 'str') + if time_range is not None: + query_parameters['timeRange'] = self._serialize.query("time_range", time_range, 'str') + if page_count is not None: + query_parameters['pageCount'] = self._serialize.query("page_count", page_count, 'int') + if sort_by is not None: + query_parameters['sortBy'] = self._serialize.query("sort_by", sort_by, 'str') + if sort_order is not None: + query_parameters['sortOrder'] = self._serialize.query("sort_order", sort_order, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + header_dict = {} + deserialized = models.SmartGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized get_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups'} def get_by_id( self, smart_group_id, custom_headers=None, raw=False, **operation_config): - """Get information of smart alerts group. + """Get information related to a specific Smart Group. - Get details of smart group. + Get information related to a specific Smart Group. :param smart_group_id: Smart group unique id. :type smart_group_id: str @@ -213,9 +224,8 @@ def get_by_id( if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) - deserialized = None header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('SmartGroup', response) header_dict = { @@ -232,8 +242,7 @@ def get_by_id( def change_state( self, smart_group_id, new_state, custom_headers=None, raw=False, **operation_config): - """Change the state from unresolved to resolved and all the alerts within - the smart group will also be resolved. + """Change the state of a Smart Group. :param smart_group_id: Smart group unique id. :type smart_group_id: str @@ -281,9 +290,8 @@ def change_state( if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) - deserialized = None header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('SmartGroup', response) header_dict = { @@ -300,7 +308,8 @@ def change_state( def get_history( self, smart_group_id, custom_headers=None, raw=False, **operation_config): - """Get the history of the changes of smart group. + """Get the history a smart group, which captures any Smart Group state + changes (New/Acknowledged/Closed) . :param smart_group_id: Smart group unique id. :type smart_group_id: str @@ -345,7 +354,6 @@ def get_history( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SmartGroupModification', response) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py index e0ec669828cb..fda99682a9d1 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.0" +VERSION = "0.2.0rc1" diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py index 129b94c14ea7..899d78df4c87 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py @@ -53,6 +53,7 @@ version=version, description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), long_description=readme + '\n\n' + history, + long_description_content_type='text/x-rst', license='MIT License', author='Microsoft Corporation', author_email='azpysdkhelp@microsoft.com', @@ -63,7 +64,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', From 7d735739cdf51d65c313a26ef9e512fb6369d423 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 08:51:19 -0700 Subject: [PATCH 085/244] Synchronous username/password auth (#6416) --- .../azure-identity/azure/identity/__init__.py | 2 + .../azure/identity/_internal/__init__.py | 4 +- .../identity/_internal/msal_credentials.py | 98 +++++++++++------ .../azure/identity/constants.py | 4 + .../azure/identity/credentials.py | 100 +++++++++++++++--- .../azure-identity/tests/test_identity.py | 31 ++++++ .../tests/{helpers.py => keys_helpers.py} | 0 .../tests/test_challenge_auth.py | 2 +- .../tests/test_challenge_auth_async.py | 2 +- 9 files changed, 194 insertions(+), 49 deletions(-) rename sdk/keyvault/azure-keyvault-keys/tests/{helpers.py => keys_helpers.py} (100%) diff --git a/sdk/identity/azure-identity/azure/identity/__init__.py b/sdk/identity/azure-identity/azure/identity/__init__.py index 512b415a27ec..fd23d51c8e32 100644 --- a/sdk/identity/azure-identity/azure/identity/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/__init__.py @@ -8,6 +8,7 @@ ClientSecretCredential, EnvironmentCredential, ManagedIdentityCredential, + UsernamePasswordCredential, ) @@ -35,4 +36,5 @@ def __init__(self, **kwargs): "DefaultAzureCredential", "EnvironmentCredential", "ManagedIdentityCredential", + "UsernamePasswordCredential", ] diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index 9ea29a25784d..cfdf935b801c 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,5 +2,5 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from .msal_credentials import ConfidentialClientCredential -from .msal_transport_adapter import MsalTransportResponse, MsalTransportAdapter +from .msal_credentials import ConfidentialClientCredential, PublicClientCredential +from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/azure/identity/_internal/msal_credentials.py b/sdk/identity/azure-identity/azure/identity/_internal/msal_credentials.py index 9bf44cbb3219..83906bf71c2e 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/msal_credentials.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/msal_credentials.py @@ -5,35 +5,40 @@ """Credentials wrapping MSAL applications and delegating token acquisition and caching to them. This entails monkeypatching MSAL's OAuth client with an adapter substituting an azure-core pipeline for Requests. """ - +import abc import time +import msal +from azure.core.credentials import AccessToken +from azure.core.exceptions import ClientAuthenticationError + +from .msal_transport_adapter import MsalTransportAdapter + try: - from typing import TYPE_CHECKING -except ImportError: - TYPE_CHECKING = False + ABC = abc.ABC +except AttributeError: # Python 2.7, abc exists, but not ABC + ABC = abc.ABCMeta("ABC", (object,), {"__slots__": ()}) # type: ignore try: from unittest import mock except ImportError: # python < 3.3 import mock # type: ignore +try: + from typing import TYPE_CHECKING +except ImportError: + TYPE_CHECKING = False + if TYPE_CHECKING: # pylint:disable=unused-import - from typing import Any, Mapping, Optional, Union + from typing import Any, Mapping, Optional, Type, Union -from azure.core.credentials import AccessToken -from azure.core.exceptions import ClientAuthenticationError -import msal - -from .msal_transport_adapter import MsalTransportAdapter - -class MsalCredential(object): +class MsalCredential(ABC): """Base class for credentials wrapping MSAL applications""" - def __init__(self, client_id, authority, app_class, client_credential=None, **kwargs): - # type: (str, str, msal.ClientApplication, Optional[Union[str, Mapping[str, str]]], Any) -> None + def __init__(self, client_id, authority, client_credential=None, **kwargs): + # type: (str, str, Optional[Union[str, Mapping[str, str]]], Any) -> None self._authority = authority self._client_credential = client_credential self._client_id = client_id @@ -41,35 +46,35 @@ def __init__(self, client_id, authority, app_class, client_credential=None, **kw self._adapter = kwargs.pop("msal_adapter", None) or MsalTransportAdapter(**kwargs) # postpone creating the wrapped application because its initializer uses the network - self._app_class = app_class self._msal_app = None # type: Optional[msal.ClientApplication] - @property - def _app(self): + @abc.abstractmethod + def get_token(self, *scopes): + # type: (str) -> AccessToken + pass + + @abc.abstractmethod + def _get_app(self): # type: () -> msal.ClientApplication - """The wrapped MSAL application""" + pass - if not self._msal_app: - # MSAL application initializers use msal.authority to send AAD tenant discovery requests - with mock.patch("msal.authority.requests", self._adapter): - app = self._app_class( - client_id=self._client_id, client_credential=self._client_credential, authority=self._authority - ) + def _create_app(self, cls): + # type: (Type[msal.ClientApplication]) -> msal.ClientApplication + """Creates an MSAL application, patching msal.authority to use an azure-core pipeline during tenant discovery""" - # monkeypatch the app to replace requests.Session with MsalTransportAdapter - app.client.session = self._adapter - self._msal_app = app + # MSAL application initializers use msal.authority to send AAD tenant discovery requests + with mock.patch("msal.authority.requests", self._adapter): + app = cls(client_id=self._client_id, client_credential=self._client_credential, authority=self._authority) - return self._msal_app + # monkeypatch the app to replace requests.Session with MsalTransportAdapter + app.client.session = self._adapter + + return app class ConfidentialClientCredential(MsalCredential): """Wraps an MSAL ConfidentialClientApplication with the TokenCredential API""" - def __init__(self, **kwargs): - # type: (Any) -> None - super(ConfidentialClientCredential, self).__init__(app_class=msal.ConfidentialClientApplication, **kwargs) - def get_token(self, *scopes): # type: (str) -> AccessToken @@ -79,10 +84,37 @@ def get_token(self, *scopes): # First try to get a cached access token or if a refresh token is cached, redeem it for an access token. # Failing that, acquire a new token. - app = self._app # type: msal.ConfidentialClientApplication + app = self._get_app() result = app.acquire_token_silent(scopes, account=None) or app.acquire_token_for_client(scopes) if "access_token" not in result: raise ClientAuthenticationError(message="authentication failed: {}".format(result.get("error_description"))) return AccessToken(result["access_token"], now + int(result["expires_in"])) + + def _get_app(self): + # type: () -> msal.ConfidentialClientApplication + if not self._msal_app: + self._msal_app = self._create_app(msal.ConfidentialClientApplication) + return self._msal_app + + +class PublicClientCredential(MsalCredential): + """Wraps an MSAL PublicClientApplication with the TokenCredential API""" + + def __init__(self, **kwargs): + # type: (Any) -> None + super(PublicClientCredential, self).__init__( + authority="https://login.microsoftonline.com/" + kwargs.pop("tenant", "organizations"), **kwargs + ) + + @abc.abstractmethod + def get_token(self, *scopes): + # type: (str) -> AccessToken + pass + + def _get_app(self): + # type: () -> msal.PublicClientApplication + if not self._msal_app: + self._msal_app = self._create_app(msal.PublicClientApplication) + return self._msal_app diff --git a/sdk/identity/azure-identity/azure/identity/constants.py b/sdk/identity/azure-identity/azure/identity/constants.py index 5b50dd98625b..1c2608e5da8b 100644 --- a/sdk/identity/azure-identity/azure/identity/constants.py +++ b/sdk/identity/azure-identity/azure/identity/constants.py @@ -13,6 +13,10 @@ class EnvironmentVariables: AZURE_CLIENT_CERTIFICATE_PATH = "AZURE_CLIENT_CERTIFICATE_PATH" CERT_VARS = (AZURE_CLIENT_ID, AZURE_CLIENT_CERTIFICATE_PATH, AZURE_TENANT_ID) + AZURE_USERNAME = "AZURE_USERNAME" + AZURE_PASSWORD = "AZURE_PASSWORD" + USERNAME_PASSWORD_VARS = (AZURE_CLIENT_ID, AZURE_USERNAME, AZURE_PASSWORD) + MSI_ENDPOINT = "MSI_ENDPOINT" MSI_SECRET = "MSI_SECRET" diff --git a/sdk/identity/azure-identity/azure/identity/credentials.py b/sdk/identity/azure-identity/azure/identity/credentials.py index d53edf8e2c62..2e09a306aa71 100644 --- a/sdk/identity/azure-identity/azure/identity/credentials.py +++ b/sdk/identity/azure-identity/azure/identity/credentials.py @@ -6,6 +6,7 @@ Credentials for Azure SDK authentication. """ import os +import time from azure.core import Configuration from azure.core.credentials import AccessToken @@ -14,6 +15,7 @@ from ._authn_client import AuthnClient from ._base import ClientSecretCredentialBase, CertificateCredentialBase +from ._internal import PublicClientCredential from ._managed_identity import ImdsCredential, MsiCredential from .constants import Endpoints, EnvironmentVariables @@ -26,6 +28,7 @@ # pylint:disable=unused-import from typing import Any, Dict, Mapping, Optional, Union from azure.core.credentials import TokenCredential + EnvironmentCredentialTypes = Union["CertificateCredential", "ClientSecretCredential", "UsernamePasswordCredential"] # pylint:disable=too-few-public-methods @@ -96,23 +99,29 @@ def get_token(self, *scopes): class EnvironmentCredential: """ - Authenticates as a service principal using a client ID/secret pair or a certificate, - depending on environment variable settings. - - These environment variables are required: + Authenticates as a service principal using a client secret or a certificate, or as a user with a username and + password, depending on environment variable settings. Configuration is attempted in this order, using these + environment variables: + Service principal with secret: - **AZURE_CLIENT_ID**: the service principal's client ID + - **AZURE_CLIENT_SECRET**: one of the service principal's client secrets - **AZURE_TENANT_ID**: ID of the service principal's tenant. Also called its 'directory' ID. - Additionally, set **one** of these to configure client secret or certificate authentication: - - - **AZURE_CLIENT_SECRET**: one of the service principal's client secrets + Service principal with certificate: + - **AZURE_CLIENT_ID**: the service principal's client ID - **AZURE_CLIENT_CERTIFICATE_PATH**: path to a PEM-encoded certificate file including the private key + - **AZURE_TENANT_ID**: ID of the service principal's tenant. Also called its 'directory' ID. + + User with username and password: + - **AZURE_CLIENT_ID**: the application's client ID + - **AZURE_USERNAME**: a username (usually an email address) + - **AZURE_PASSWORD**: that user's password """ def __init__(self, **kwargs): # type: (Mapping[str, Any]) -> None - self._credential = None # type: Optional[Union[CertificateCredential, ClientSecretCredential]] + self._credential = None # type: Optional[EnvironmentCredentialTypes] if all(os.environ.get(v) is not None for v in EnvironmentVariables.CLIENT_SECRET_VARS): self._credential = ClientSecretCredential( @@ -128,6 +137,14 @@ def __init__(self, **kwargs): certificate_path=os.environ[EnvironmentVariables.AZURE_CLIENT_CERTIFICATE_PATH], **kwargs ) + elif all(os.environ.get(v) is not None for v in EnvironmentVariables.USERNAME_PASSWORD_VARS): + self._credential = UsernamePasswordCredential( + client_id=os.environ[EnvironmentVariables.AZURE_CLIENT_ID], + username=os.environ[EnvironmentVariables.AZURE_USERNAME], + password=os.environ[EnvironmentVariables.AZURE_PASSWORD], + tenant=os.environ.get(EnvironmentVariables.AZURE_TENANT_ID), # optional for username/password auth + **kwargs + ) def get_token(self, *scopes): # type (*str) -> AccessToken @@ -139,10 +156,7 @@ def get_token(self, *scopes): :raises: :class:`azure.core.exceptions.ClientAuthenticationError` """ if not self._credential: - message = "Missing environment settings. To authenticate with one of the service principal's client secrets, set {}. To authenticate with a certificate, set {}.".format( - ", ".join(EnvironmentVariables.CLIENT_SECRET_VARS), ", ".join(EnvironmentVariables.CERT_VARS) - ) - raise ClientAuthenticationError(message=message) + raise ClientAuthenticationError(message="Incomplete environment configuration.") return self._credential.get_token(*scopes) @@ -233,3 +247,65 @@ def _get_error_message(history): else: attempts.append(credential.__class__.__name__) return "No valid token received. {}".format(". ".join(attempts)) + + +class UsernamePasswordCredential(PublicClientCredential): + """ + Authenticates a user with a username and password. In general, Microsoft doesn't recommend this kind of + authentication, because it's less secure than other authentication flows. + + Authentication with this credential is not interactive, so it is **not compatible with any form of + multi-factor authentication or consent prompting**. The application must already have the user's consent. + + This credential can only authenticate work and school accounts; Microsoft accounts are not supported. + See this document for more information about account types: + https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/sign-up-organization + + :param str client_id: the application's client ID + :param str username: the user's username (usually an email address) + :param str password: the user's password + + **Keyword arguments:** + + *tenant (str)* - a tenant ID or a domain associated with a tenant. If not provided, the credential defaults to the + 'organizations' tenant. + """ + + def __init__(self, client_id, username, password, **kwargs): + # type: (str, str, str, Any) -> None + super(UsernamePasswordCredential, self).__init__(client_id=client_id, **kwargs) + self._username = username + self._password = password + + def get_token(self, *scopes): + # type (*str) -> AccessToken + """ + Request an access token for `scopes`. + + :param str scopes: desired scopes for the token + :rtype: :class:`azure.core.credentials.AccessToken` + :raises: :class:`azure.core.exceptions.ClientAuthenticationError` + """ + + # MSAL requires scopes be a list + scopes = list(scopes) # type: ignore + now = int(time.time()) + + app = self._get_app() + accounts = app.get_accounts(username=self._username) + result = None + for account in accounts: + result = app.acquire_token_silent(scopes, account=account) + if result: + break + + if not result: + # cache miss -> request a new token + result = app.acquire_token_by_username_password( + username=self._username, password=self._password, scopes=scopes + ) + + if "access_token" not in result: + raise ClientAuthenticationError(message="authentication failed: {}".format(result.get("error_description"))) + + return AccessToken(result["access_token"], now + int(result["expires_in"])) diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index b017792595a8..4e7fb13b4f6b 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -21,6 +21,7 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, + UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential from azure.identity.constants import EnvironmentVariables @@ -239,3 +240,33 @@ def test_imds_credential_retries(): def test_default_credential(): DefaultAzureCredential() + + +def test_username_password_credential(): + expected_token = "access-token" + transport = validating_transport( + requests=[Request()] * 2, # not validating requests because they're formed by MSAL + responses=[ + # expecting tenant discovery then a token request + mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), + mock_response( + json_payload={ + "access_token": expected_token, + "expires_in": 42, + "token_type": "Bearer", + "ext_expires_in": 42, + } + ), + ], + ) + + credential = UsernamePasswordCredential( + client_id="some-guid", + username="user@azure", + password="secret_password", + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + token = credential.get_token("scope") + assert token.token == expected_token diff --git a/sdk/keyvault/azure-keyvault-keys/tests/helpers.py b/sdk/keyvault/azure-keyvault-keys/tests/keys_helpers.py similarity index 100% rename from sdk/keyvault/azure-keyvault-keys/tests/helpers.py rename to sdk/keyvault/azure-keyvault-keys/tests/keys_helpers.py diff --git a/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth.py b/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth.py index 04ead0b933b1..13054cc0b1d2 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth.py @@ -18,7 +18,7 @@ from azure.keyvault.keys._shared import ChallengeAuthPolicy, HttpChallenge, HttpChallengeCache import pytest -from helpers import mock_response, Request, validating_transport +from keys_helpers import mock_response, Request, validating_transport def test_challenge_cache(): diff --git a/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py b/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py index c4d72b1c7550..27cda5f91d8e 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py @@ -19,7 +19,7 @@ from azure.keyvault.keys._shared import AsyncChallengeAuthPolicy, HttpChallenge, HttpChallengeCache import pytest -from helpers import async_validating_transport, mock_response, Request +from keys_helpers import async_validating_transport, mock_response, Request @pytest.mark.asyncio From 479a6d121f50086979bee75f68e2bab7533b95fb Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 14:04:30 -0700 Subject: [PATCH 086/244] Synchronous interactive browser authentication (#6466) --- .../azure-identity/azure/identity/__init__.py | 2 + .../azure/identity/_internal/__init__.py | 1 + .../_internal/auth_code_redirect_handler.py | 75 +++++++++++ .../azure/identity/browser_auth.py | 121 ++++++++++++++++++ .../azure-identity/tests/test_identity.py | 73 ++++++++++- 5 files changed, 270 insertions(+), 2 deletions(-) create mode 100644 sdk/identity/azure-identity/azure/identity/_internal/auth_code_redirect_handler.py create mode 100644 sdk/identity/azure-identity/azure/identity/browser_auth.py diff --git a/sdk/identity/azure-identity/azure/identity/__init__.py b/sdk/identity/azure-identity/azure/identity/__init__.py index fd23d51c8e32..1df14dd617f5 100644 --- a/sdk/identity/azure-identity/azure/identity/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/__init__.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +from .browser_auth import InteractiveBrowserCredential from .credentials import ( CertificateCredential, ChainedTokenCredential, @@ -35,6 +36,7 @@ def __init__(self, **kwargs): "ClientSecretCredential", "DefaultAzureCredential", "EnvironmentCredential", + "InteractiveBrowserCredential", "ManagedIdentityCredential", "UsernamePasswordCredential", ] diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index cfdf935b801c..e7583139395b 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,5 +2,6 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +from .auth_code_redirect_handler import AuthCodeRedirectServer from .msal_credentials import ConfidentialClientCredential, PublicClientCredential from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/azure/identity/_internal/auth_code_redirect_handler.py b/sdk/identity/azure-identity/azure/identity/_internal/auth_code_redirect_handler.py new file mode 100644 index 000000000000..caaa9519033c --- /dev/null +++ b/sdk/identity/azure-identity/azure/identity/_internal/auth_code_redirect_handler.py @@ -0,0 +1,75 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +try: + from typing import TYPE_CHECKING +except ImportError: + TYPE_CHECKING = False + +if TYPE_CHECKING: + from typing import Any, Mapping, Optional + +try: + from http.server import HTTPServer, BaseHTTPRequestHandler +except ImportError: + from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler # type: ignore + +try: + from urllib.parse import parse_qs +except ImportError: + from urlparse import parse_qs # type: ignore + + +class AuthCodeRedirectHandler(BaseHTTPRequestHandler): + """HTTP request handler to capture the authentication server's response. + Largely from the Azure CLI: https://github.com/Azure/azure-cli/blob/dev/src/azure-cli-core/azure/cli/core/_profile.py + """ + + def do_GET(self): + if self.path.endswith("/favicon.ico"): # deal with legacy IE + self.send_response(204) + return + + query = self.path.split("?", 1)[-1] + query = parse_qs(query, keep_blank_values=True) + self.server.query_params = query + + self.send_response(200) + self.send_header("Content-Type", "text/html") + self.end_headers() + + self.wfile.write(b"Authentication complete. You can close this window.") + + def log_message(self, format, *args): # pylint: disable=redefined-builtin,unused-argument,no-self-use + pass # this prevents server dumping messages to stdout + + +class AuthCodeRedirectServer(HTTPServer): + """HTTP server that listens on localhost for the redirect request following an authorization code authentication""" + + query_params = {} # type: Mapping[str, Any] + + def __init__(self, port, timeout): + # type: (int, int) -> None + super(AuthCodeRedirectServer, self).__init__(("localhost", port), AuthCodeRedirectHandler) + self.timeout = timeout + + def wait_for_redirect(self): + # type: () -> Mapping[str, Any] + while not self.query_params: + try: + self.handle_request() + except ValueError: + # socket has been closed, probably by handle_timeout + break + + # ensure the underlying socket is closed (a no-op when the socket is already closed) + self.server_close() + + # if we timed out, this returns an empty dict + return self.query_params + + def handle_timeout(self): + """Break the request-handling loop by tearing down the server""" + self.server_close() diff --git a/sdk/identity/azure-identity/azure/identity/browser_auth.py b/sdk/identity/azure-identity/azure/identity/browser_auth.py new file mode 100644 index 000000000000..82460513092d --- /dev/null +++ b/sdk/identity/azure-identity/azure/identity/browser_auth.py @@ -0,0 +1,121 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +import socket +import time +import uuid +import webbrowser + +try: + from typing import TYPE_CHECKING +except ImportError: + TYPE_CHECKING = False + +if TYPE_CHECKING: + from typing import Any, List, Mapping + +from azure.core.credentials import AccessToken +from azure.core.exceptions import ClientAuthenticationError + +from ._internal import AuthCodeRedirectServer, ConfidentialClientCredential + + +class InteractiveBrowserCredential(ConfidentialClientCredential): + """ + Authenticates a user through the authorization code flow. This is an interactive flow: ``get_token`` opens a + browser to a login URL provided by Azure Active Directory, and waits for the user to authenticate there. + + Azure Active Directory documentation describes the authorization code flow in more detail: + https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-protocols-oauth-code + + :param str client_id: the application's client ID + :param str secret: one of the application's client secrets + + **Keyword arguments:** + + *tenant (str)* - a tenant ID or a domain associated with a tenant. If not provided, the credential defaults to the + 'organizations' tenant, which can authenticate work or school accounts. + *timeout (str)* - seconds to wait for the user to complete authentication. Defaults to 300 (5 minutes). + """ + + def __init__(self, client_id, client_secret, **kwargs): + # type: (str, str, Any) -> None + self._timeout = kwargs.pop("timeout", 300) + self._server_class = kwargs.pop("server_class", AuthCodeRedirectServer) # facilitate mocking + authority = "https://login.microsoftonline.com/" + kwargs.pop("tenant", "organizations") + super(InteractiveBrowserCredential, self).__init__( + client_id=client_id, client_credential=client_secret, authority=authority, **kwargs + ) + + def get_token(self, *scopes): + # type: (str) -> AccessToken + """ + Request an access token for `scopes`. This will open a browser to a login page and listen on localhost for a + request indicating authentication has completed. + + :param str scopes: desired scopes for the token + :rtype: :class:`azure.core.credentials.AccessToken` + :raises: :class:`azure.core.exceptions.ClientAuthenticationError` + """ + + # start an HTTP server on localhost to receive the redirect + for port in range(8400, 9000): + try: + server = self._server_class(port, timeout=self._timeout) + redirect_uri = "http://localhost:{}".format(port) + break + except socket.error: + continue # keep looking for an open port + + if not redirect_uri: + raise ClientAuthenticationError(message="Couldn't start an HTTP server on localhost") + + # get the url the user must visit to authenticate + scopes = list(scopes) # type: ignore + request_state = str(uuid.uuid4()) + app = self._get_app() + auth_url = app.get_authorization_request_url(scopes, redirect_uri=redirect_uri, state=request_state) + + # open browser to that url + webbrowser.open(auth_url) + + # block until the server times out or receives the post-authentication redirect + response = server.wait_for_redirect() + if not response: + raise ClientAuthenticationError( + message="Timed out after waiting {} seconds for the user to authenticate".format(self._timeout) + ) + + # redeem the authorization code for a token + code = self._parse_response(request_state, response) + now = int(time.time()) + result = app.acquire_token_by_authorization_code(code, scopes=scopes, redirect_uri=redirect_uri) + + if "access_token" not in result: + raise ClientAuthenticationError(message="Authentication failed: {}".format(result.get("error_description"))) + + return AccessToken(result["access_token"], now + int(result["expires_in"])) + + def _parse_response(self, request_state, response): + # type: (str, Mapping[str, Any]) -> List[str] + """ + Validates ``response`` and returns the authorization code it contains, if authentication succeeded. Raises + :class:`azure.core.exceptions.ClientAuthenticationError`, if authentication failed or ``response`` is malformed. + """ + + if "error" in response: + message = "Authentication failed: {}".format(response.get("error_description") or response["error"]) + raise ClientAuthenticationError(message=message) + if "code" not in response: + # a response with no error or code is malformed; we don't know what to do with it + message = "Authentication server didn't send an authorization code" + raise ClientAuthenticationError(message=message) + + # response must include the state sent in the auth request + if "state" not in response: + raise ClientAuthenticationError(message="Authentication response doesn't include OAuth state") + if response["state"][0] != request_state: + raise ClientAuthenticationError(message="Authentication response's OAuth state doesn't match the request's") + + return response["code"] diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 4e7fb13b4f6b..3aaa54a1f28f 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -2,15 +2,16 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +import functools import json import os import time import uuid try: - from unittest.mock import Mock + from unittest.mock import Mock, patch except ImportError: # python < 3.3 - from mock import Mock + from mock import Mock, patch import pytest from azure.core.credentials import AccessToken @@ -21,6 +22,7 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, + InteractiveBrowserCredential, UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential @@ -242,6 +244,73 @@ def test_default_credential(): DefaultAzureCredential() +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential(): + oauth_state = "state" + expected_token = "access-token" + + transport = validating_transport( + requests=[Request()] * 2, # not validating requests because they're formed by MSAL + responses=[ + # expecting tenant discovery then a token request + mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), + mock_response( + json_payload={ + "access_token": expected_token, + "expires_in": 42, + "token_type": "Bearer", + "ext_expires_in": 42, + } + ), + ], + ) + + # mock local server fakes successful authentication by immediately returning a well-formed response + auth_code_response = {"code": "authorization-code", "state": [oauth_state]} + server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + # ensure the request beginning the flow has a known state value + with patch("azure.identity.browser_auth.uuid.uuid4", lambda: oauth_state): + token = credential.get_token("scope") + assert token.token == expected_token + + +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential_timeout(): + # mock transport handles MSAL's tenant discovery + transport = Mock( + send=lambda _, **__: mock_response( + json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"} + ) + ) + + # mock local server blocks long enough to exceed the timeout + timeout = 1 + server_instance = Mock(wait_for_redirect=functools.partial(time.sleep, timeout + 1)) + server_class = Mock(return_value=server_instance) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + timeout=timeout, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + with pytest.raises(ClientAuthenticationError) as ex: + credential.get_token("scope") + assert "timed out" in ex.value.message.lower() + + def test_username_password_credential(): expected_token = "access-token" transport = validating_transport( From 35356f6a66c426efe481ed2b88ebb1dfc59b4713 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Tue, 30 Jul 2019 16:27:05 -0700 Subject: [PATCH 087/244] we dont need thread locks (#6551) --- .../azure-core/azure/core/tracing/context.py | 38 +++++-------------- .../azure-core/tests/test_tracing_context.py | 11 ++---- 2 files changed, 13 insertions(+), 36 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/context.py b/sdk/core/azure-core/azure/core/tracing/context.py index a00f88f2d854..f8761cd71502 100644 --- a/sdk/core/azure-core/azure/core/tracing/context.py +++ b/sdk/core/azure-core/azure/core/tracing/context.py @@ -29,8 +29,8 @@ class ContextProtocol(Protocol): Implements set and get variables in a thread safe way. """ - def __init__(self, name, default, lock): - # type: (string, Any, threading.Lock) -> None + def __init__(self, name, default): + # type: (string, Any) -> None pass def clear(self): @@ -54,11 +54,10 @@ class _AsyncContext(object): Uses contextvars to set and get variables globally in a thread safe way. """ - def __init__(self, name, default, lock): + def __init__(self, name, default): self.name = name self.contextvar = contextvars.ContextVar(name) self.default = default if callable(default) else (lambda: default) - self.lock = lock def clear(self): # type: () -> None @@ -78,8 +77,7 @@ def get(self): def set(self, value): # type: (Any) -> None """Set the value in the context.""" - with self.lock: - self.contextvar.set(value) + self.contextvar.set(value) class _ThreadLocalContext(object): @@ -88,11 +86,10 @@ class _ThreadLocalContext(object): """ _thread_local = threading.local() - def __init__(self, name, default, lock): - # type: (str, Any, threading.Lock) -> None + def __init__(self, name, default): + # type: (str, Any) -> None self.name = name self.default = default if callable(default) else (lambda: default) - self.lock = lock def clear(self): # type: () -> None @@ -112,16 +109,14 @@ def get(self): def set(self, value): # type: (Any) -> None """Set the value in the context.""" - with self.lock: - setattr(self._thread_local, self.name, value) + setattr(self._thread_local, self.name, value) -class TracingContext: - _lock = threading.Lock() - +class TracingContext(object): def __init__(self): # type: () -> None - self.current_span = TracingContext._get_context_class("current_span", None) + context_class = _AsyncContext if contextvars else _ThreadLocalContext + self.current_span = context_class("current_span", None) def with_current_context(self, func): # type: (Callable[[Any], Any]) -> Any @@ -146,17 +141,4 @@ def call_with_current_context(*args, **kwargs): return call_with_current_context - @classmethod - def _get_context_class(cls, name, default_val): - # type: (str, Any) -> ContextProtocol - """ - Returns an instance of the the context class that stores the variable. - :param name: The key to store the variable in the context class - :param default_val: The default value of the variable if unset - :return: An instance that implements the context protocol class - """ - context_class = _AsyncContext if contextvars else _ThreadLocalContext - return context_class(name, default_val, cls._lock) - - tracing_context = TracingContext() diff --git a/sdk/core/azure-core/tests/test_tracing_context.py b/sdk/core/azure-core/tests/test_tracing_context.py index 59aa2c8a8b60..984d2ad480d3 100644 --- a/sdk/core/azure-core/tests/test_tracing_context.py +++ b/sdk/core/azure-core/tests/test_tracing_context.py @@ -34,19 +34,14 @@ def __exit__(self, exc_type, exc_val, exc_tb): class TestContext(unittest.TestCase): - def test_get_context_class(self): - with ContextHelper(): - slot = tracing_context._get_context_class("temp", 1) - assert slot.get() == 1 - slot.set(2) - assert slot.get() == 2 - def test_current_span(self): with ContextHelper(): - assert tracing_context.current_span.get() is None + assert not tracing_context.current_span.get() val = mock.Mock(spec=AbstractSpan) tracing_context.current_span.set(val) assert tracing_context.current_span.get() == val + tracing_context.current_span.clear() + assert not tracing_context.current_span.get() def test_with_current_context(self): with ContextHelper(tracer_to_use=mock.Mock(AbstractSpan)): From 1b24b838f1c303f7421fa73679de7cace0a89ebf Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Tue, 30 Jul 2019 20:19:31 -0700 Subject: [PATCH 088/244] KV aiohttp by default (#6563) * Aiohttp default async transport * Record keys with aiohttp * Record secrets with aiohttp --- .../keys/_shared/async_client_base.py | 11 +- .../tests/keys_async_preparer.py | 16 +- .../test_keys_async.test_backup_restore.yaml | 294 +- ...t_keys_async.test_key_crud_operations.yaml | 886 ++--- .../test_keys_async.test_key_list.yaml | 522 ++- ...t_keys_async.test_key_wrap_and_unwrap.yaml | 354 +- ...est_keys_async.test_list_deleted_keys.yaml | 922 +++-- .../test_keys_async.test_list_versions.yaml | 520 ++- .../test_keys_async.test_purge.yaml | 1946 +++++----- .../test_keys_async.test_recover.yaml | 3248 +++++++---------- ...sync.test_example_key_crud_operations.yaml | 472 +-- ...sync.test_example_key_list_operations.yaml | 690 ++-- ...sync.test_example_keys_backup_restore.yaml | 294 +- ..._keys_async.test_example_keys_recover.yaml | 670 ++-- .../secrets/_shared/async_client_base.py | 9 +- ...c.test_example_secret_crud_operations.yaml | 340 +- ...c.test_example_secret_list_operations.yaml | 619 ++-- ...c.test_example_secrets_backup_restore.yaml | 337 +- ...ts_async.test_example_secrets_recover.yaml | 700 ++-- ...est_secrets_async.test_backup_restore.yaml | 281 +- ...crets_async.test_list_deleted_secrets.yaml | 945 ++--- ...test_secrets_async.test_list_versions.yaml | 507 ++- .../test_secrets_async.test_purge.yaml | 2032 +++++------ .../test_secrets_async.test_recover.yaml | 2956 +++++++-------- ...ets_async.test_secret_crud_operations.yaml | 459 ++- .../test_secrets_async.test_secret_list.yaml | 507 ++- .../tests/secrets_async_preparer.py | 16 +- 27 files changed, 9104 insertions(+), 11449 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 0714edabf420..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport +from azure.core.pipeline.transport import AsyncHttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient @@ -64,7 +64,7 @@ def __init__( self, vault_url: str, credential: "TokenCredential", - transport: HttpTransport = None, + transport: AsyncHttpTransport = None, api_version: str = None, **kwargs: Any ) -> None: @@ -91,7 +91,7 @@ def __init__( self._client = KeyVaultClient(credential, api_version=api_version, pipeline=pipeline, aio=True) @staticmethod - def _build_pipeline(config: Configuration, transport: HttpTransport, **kwargs: Any) -> AsyncPipeline: + def _build_pipeline(config: Configuration, transport: AsyncHttpTransport, **kwargs: Any) -> AsyncPipeline: policies = [ config.headers_policy, config.user_agent_policy, @@ -100,11 +100,12 @@ def _build_pipeline(config: Configuration, transport: HttpTransport, **kwargs: A config.retry_policy, config.authentication_policy, config.logging_policy, - DistributedTracingPolicy() + DistributedTracingPolicy(), ] if transport is None: - transport = AsyncioRequestsTransport(**kwargs) + from azure.core.pipeline.transport import AioHttpTransport + transport = AioHttpTransport(**kwargs) return AsyncPipeline(transport, policies=policies) diff --git a/sdk/keyvault/azure-keyvault-keys/tests/keys_async_preparer.py b/sdk/keyvault/azure-keyvault-keys/tests/keys_async_preparer.py index a232358ec959..4db357acc42b 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/keys_async_preparer.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/keys_async_preparer.py @@ -6,17 +6,31 @@ from unittest.mock import Mock from azure.core.credentials import AccessToken +from azure.core.pipeline.transport import AioHttpTransport from azure.identity.aio import EnvironmentCredential +from multidict import CIMultiDict, CIMultiDictProxy + from keys_preparer import VaultClientPreparer from keys_vault_client_async import VaultClient +class AiohttpTestTransport(AioHttpTransport): + """Workaround to vcrpy bug: https://github.com/kevin1024/vcrpy/pull/461 + """ + async def send(self, request, **config): + response = await super(AiohttpTestTransport, self).send(request, **config) + if not isinstance(response.headers, CIMultiDictProxy): + response.headers = CIMultiDictProxy(CIMultiDict(response.internal_response.headers)) + response.content_type = response.headers.get("content-type") + return response + + class AsyncVaultClientPreparer(VaultClientPreparer): def create_vault_client(self, vault_uri): if self.is_live: credential = EnvironmentCredential() else: credential = Mock(get_token=asyncio.coroutine(lambda _: AccessToken("fake-token", 0))) - return VaultClient(vault_uri, credential) + return VaultClient(vault_uri, credential, transport=AiohttpTestTransport()) diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_backup_restore.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_backup_restore.yaml index 1bdab8917b58..38a47ce653ba 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_backup_restore.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_backup_restore.yaml @@ -4,256 +4,202 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:51 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:49:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault4e00e7f.vault.azure.net + - /keys/keybak4e00e7f/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/54248fddc148400a9df744075bbfe2e8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lsgBFBFSUvohGWs21xzMCFc1IRDfnH0UlZ8aJnqVozFkc9rZgaBdr5IOVmt41hxbJY2MWuJxGpS4xAZ8AmrQZ1MOmS7nUiMmorcyqZZIcZYz3P7YXLjiv-ncb9rTty7IJ2R9v111Beiq3tNdHUrQYUt1wiysQPcPk69FGq7h4B5UqDM4SHQqXF-Rm3R2fU9wct7bx3F2XqYcaMmQWZBiYMH8vbooZWyh2QziCXVB2MhfBt0gTfoLUGT4hheDyLfIgbhhky6Hi0DC-3Ecll3tlK6JHAR6V1jLxJveWPgUy2WgRMSTATWdlcYL_i9Ji9OT4dSLkCFqXWhRN8krxXf9dw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/6335121a5c4e43919f25f6688e470924","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zPfZm_2ZxRIlx2K1MjSGUuBBpyaJjU_gk2yp9T9Ow8bvac_t6RgXTmsdK-4x27G4h1XjY0QVXkuJwnNxrUbSwrrNsxJtaz-KyCpetoPLcAEp4-EbEF2w-Q5fAPB76ngr-RKlHUv6fww8rfWWRxKb-GmtmYAq_BsUG7Ci1ALoF3dIxKyEpqueY0TeWofWxUKpftXLyjAIcuBVRO5UVSUv1bSfLl1mzm5Wxl6pk6G_BtAi9cn6TS7DERSSEilg_Raz53fCXt5MaoFnDpT5oRIl5E2ZaxaLJ2KwLxoZERB4oZ2vPGgjr8MocaOGY66xwVKZQJKttZmDy-7pUKWMxoBG4w","e":"AQAB"},"attributes":{"enabled":true,"created":1564526988,"updated":1564526988,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '648' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '648' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:49:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault4e00e7f.vault.azure.net + - /keys/keybak4e00e7f/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/backup?api-version=7.0 response: body: - string: '{"value":"JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmFvY0lxQ1Z1WFpwOTZLSTZQdmVlbENFZlMzeVl4ZC1yRm5rZkNTcmdXUVlwU2tzUGVpTmJENFZuVEdEbGR6dE1GRlZ5SGdMRHVwb2VJWDlIU3ExTEQ3MVFSNWpYQUE2aUZpendrLTYxbkJ5ZFY1SEVLcHFpdjJwckp0T0FRTlQwZmpsWlJadzBiSG9zSldIenF6SDZXZktQT25pOS1GTm1TV0xvZFF1cE84WGU2bC1PN1RoWVlhc3hoLXJNN3M4QUJrekZEUkVPUm5rTnczMVJ6SDAyQjJhOGk2R3VfcUVtbTdvUDdOTnJRaTJfRGJ6YnZBOFROdHBwU1gwbnc1c2ZnaWVFWmUxTmZwVXNSZDcxMmd4YWxWNUpuWklJaDAxcnF4ZUVZaVRRNlhxdXhPbkZJd1RaTTV6WTZSSVJ4QW5rTk8zb0pMUjlkSTU1cG02ZVlxMnFoZy5DUnVlaDRPYncwWGVkMXY3TU9GSVNnLlZRVXdIMno3UWV3SXJZN0kwSXhEU2h6Y0FLQmlKdThBVFVTQWZvUTBfd3J4WEZBNkxyOGlhM0k3clFMYm15X1hLbjNwa3FFR3VnVHZlTm9BenVmaDJNR1pHV1ZtOUJibGhCV0Z1OTZUS0s4cVRqOHJHUHpaZHB0MHpsSlloOTc1S3hZSnljNkdpNExzMVVqVDAzaExEcXVpYm9SMkZpNk9oZFRQQ2p5MXd3OXlNLUhKREswUHdzSUw1VW41YXFGaTMxUW52VlVja20tZUVNRFlJRWwyeTNtang0SmtVS2Rtc3FudzYtckRRcmd1OHFxV09NNXpDaFVKRW82dkQ1bnVCLWNLa2hJS0JPOEItM3RVbnQ0bjBQWldGSzhDaW0yb0dyV1JNZWtjSGxYdFp2Z2M0OHhVRVdQdjBhQ1l5QlhzOTlac29DN2ZRd3JIUllYdzZXNTFycUJqcTA4ckt2YWhTaVBxb2dkMmNfLTB0VVlOQ1BUWnBrcjVzanA2TTVvZUZlTG1KOURlUnVES3I3bWg0eTc5UndWam9xZ1JGdlptbmVBcmY3Wi1USmZydmlLZ3lLUjlUdjN5ZFVjNzI3aGJMTGQ5NC1LNFduMU41NE9paUtRNmJEbjRoWTd6a283aTdHV2s3NmdXWlRrRGFlVTFtaDgwQUE0UGEySXNsNXMtaXNuZkYwVTFXNXh6WUZaWWVYUnlNSDZkcUpHYm81RDBnNzZhdHdvTjg4eEZlNXNDVEpYQjBnQTBRUUNRNWRlX0E4WS1rcGFWakpKNDJPQ1NEX3RkWWR4a3JDOVZwZ1FlM0Q3ZzA3QmdqVlU4aHdFZTVkTzR2QmlRekdxcGtxX1lqWkRzSTcwWkFWYlk2UTE4QjRoWnJFd3VUZEs0QVdfS3Q4YmZiYVVuQlE3d2Z4cnJ0SldZeko4eUJaaFNOV201MThfekRoMmdYLTBuNjViMm5rUlVFckszWXBEVEpMZ0RZMnk5dGtETkdHX1dJUURIWkNiV3dDRDBTbDBheHdybWxHYmYxWS1heEhudHQtd214ODROZ09DcllEZU1SUnVkbjhScWlKSXF6d3I5N1JEU1pQMGx6dVZ5Y2xMX2RRSmdTYmtrRjVTdWdZbHotOFkyN2wybWV6VldrTDgxZ2w5enVMb0RiNmFMalA5WFBqdjV0WjZsOXF1azZCcjF0X3pBTVpadzNjUGZXOUVXa2hOdGNNbEZITXBYMlFkUTd5enVQSzJEb3V3bzVWV3gzQUFTelJCb3FJQmhIZEZLUWgzNUVFQlhHcEprcG9USzktTWhINkw4Tmd1dl9MVHJQNnBlOXBvS2otTjVha1VtUWtDY3ViTGRSUjQxcnFUeXNoYUl5WHBEYnVQZ19pbUF1eWpTLWR4VlZwb0Z1bXIyMk1aMFgyRTN5R0piZGg4cjVBTk1mM2lwZUNDdThOeF9VWUxubGFqczlMR3M2bVBneEktUFY4ZHBoUUxwa2dfM1FYR2xLOHcwcTVJMU1uMFNlc1R5NGJiMG12N0ZDdUYySzFKYXR4SGJqY0FFcmlpbm9QTk1yYUt4X29Kb1k0cVc0R09rYUFkQjA3MTBnZUJuYnBXcENuOGJNWkJ4RUZHNE1XU1lfbmV0cHFDVUhUZlQ2S2QwRzU4LUZQUHpxY05naXNGMUVuY1VhU0IxTVJ0YXVPMV9rSHgzT0RPNEhfSm5nYnd2bFRENWdXcjRpU1VYYldSdWQ0ak9YNXhJYkY0NzVyeGUxa2RNc1pORWhkZTVHbU1aQm9lSUd5VEM5bDJpTXNMQzFmdXp3YjU2SVczVlRmTzlTazVqOUN1RUdsMlVGcGd3N011U0laQ1VhSWZId3V2bEpXUXp4QlkwaG9xdEtSSjRQT1dWU2FhRWJ5OUdMa1VUSmFEV0p0YWFfc2x2UkVnb1E1WFFWeC1oUHZaWFczWDJlc1JsanJtQXZnVGJFWDQ5NUpJbUNsZTByaU1adjlETE9OS0k0a2NzUU12cGNsaUpQWHhsUE11X1dfZ2RBejExdHM2RUNGY2lVdHJOU1RMU19Qb0dqSlRSa2lEcERYSFBFSWpoaVp2X2xES0NUMjF4b0VsUE9kekk3OTYtNGpaYUUtbFBxOFpmTjdzQ19iRUxtdW92TjZIOS1yQ2oyc3BuczhLSDZzQXliZDBFNmxjTU42UHlCRWJWazU1R3V3UWNrLUNjaDA0M0l2OTJVVmZsNmJROUJsc1ZjenFoMlVGV3Y4SC1qaHVFeF9XNHZidFhHRVdsSDVSRDdEWlUwRmNCbkprQW5senF0d0tnMy00UGg1bHhTSWppWVJpdTRKZzg5clRuLXZIZUZnc0hBWF91TDFjM2xSZkd6MmVtQ202Z0RrNVVKdHZSWGtmUHREUGVHckp0SVlTRExqWjduaTlpRXl5X1JFVDR0T3NEX0R2N3hieXZ5SHFHUzZOa0JLRUkwY0g4OWpTVllVaGRxZk9hMUhqUU42OW8wRmt3OHE1TG51c2NXSW40UFVyajBYOGd5c3RIMWVha1ViSU9mRm05RWtzdzh0a1Z3S1g2LVlMbHktUS1mTlpwVXF1Mm9HbkxOcmV1dmhoWkJHdnJzQ0pzUVF0NHRjTWNwakc1dmVRd2RQT2l2R0tRUmVCOE9MazJCR2RlZGZXeVlyRGk2d2ZUclJ4VjZyb2tWUlpvVk85dTd6ZjkxWl9fMHZaRlFSN2ZubE5DVHpEM1dpOWdUUEZJaThFekdfS3BiRHNmRkRNN1lCeGx6SWNkeDdLZW9aZXhHRXpUdDR6T2JfTUllWTFGWkpFbDdJRUxxUWJydXhFMjBURVYyYi1VaWJvWWpvU3hRVUNZLTg4TmJ2czZCWWF4NGs2eU9yU3ByVVg1OXNNcVFPd25uMWRZUlFaeHZ3WGh0U3pWS2d2OGtzYkNvd0RHRW5pb0cxaUJKa2NDR2tlbUxPRzlMb2xpOWxRVDJVRlpBR0VzZXp1S0h3endPOGprRkEzODk5V1JXWHBqVFRuaEN6Wkdqd2JRN3BESUVBWFhyakIxZmJ1LUZhU2VYUGVhS2VkZDdMUy12LThJaTJFaXVLcUdIaWttV3MzaVJQNTNTN0VkNlhtMHJydHpSVE10RlJ5LUdQOXlWWlNiR3JyN2lFZ2YtMFhLT3ZPZ1FrQlo5enFua1FIM09rZVlfRHlNQVJqSEdkbTRIYnQ3d0VrZjM3MHJ5M2JVNTlud1ljWEI1b1l6YUQ5STVxM0Zmc09yTWhlN3hIVDZxZWRqbXlYRHNqdi1DQmJVYUVpc1lPTmFUUW5TbF8tRjhBZU4yajJrYmtCSl9tYzBSa1BncHA3cjZJQVRCRHg5dkd0ZjZkcTRpcndybWY4MV9SM1dfQ2ZhMmZlZWtzUDBFVjB0THVUVGloM0lEUlR0eU80MjVEQ0pCSm5BVGNkc0tPOVhuTDl2NGlMbG1Bd1E2S2U2Y1N0cTNTelNNUXhLUDI4TnlXS2lKV3NLemlMZ3ZGV21zQWQ3TG5Gd1dzWUFRa1ZidjR1WlZVYXhIaWJ4OUEzZGhsZFV5cHBEaUxlcWswck12U0JnTHNZVWk5SXJHbkdfSDdISzY5bU5CS2lNel9abDdBMjBLbFlJdlRVaUFBbnFLQi1kdnlCdmNVN3l6bzkxY2l4dUVidnNtYkNFUy16WVo0MUNLWGoyZ3BTZEdlUDRBVHhOYnV1eDdZWkFPUnlFamdHYmlJS3dUN1ViU0ROcEZEeml1eHBVby1jZmxabjlZZTNNcHFlLUI2NXF1RElxcDNvelJvdGt2SzVCcUpXMkRnTEVvUjBKZTNxb0gxVVJTT3Q5MlY3bmttSWRrUWloMURuUkttSEczQUUxS2YxUS1fRFJGSmJxTkozRklFYl9ONVlMT2hGaldmN2p5ZG92WEVqUnhvYWl3ODJOR0tHZTBOZDRhNW5JanhHbWhuRkpVVkxEajhnZHNyNG9ueTR3RWtsVnVqdG1DU1prb2VSRm9tQmtfNjlEY0pFbVl3U2hlY1JJdktxeWJ5MWx2VlNWTTZuSlpPam9FSEE1clNBVGxHQ2VxbEdWaVB1YVZGdXhmOGs3S0FwcGVFMzI1aVJXVzRhU1FHeE5NVjNWWHpIa2dZRjg3UldnLWNWNDI5M0ptSC1IOTlmT09Ic3JiVW9oaFRIS0E0MFMzV3kyTWc2anllQ1Jldko0SXhYVWVZclJVcVhBWnVOalgyM2pZcExKYTk2bkoyZEwzcHRiMW1WNF9vWnM1eG5pRjhmdEFEcTZfTDZFV3dRdHdfS0pDVkE3a3dGZHBOaFM4YU56V1g3d0ltNndRQ3lsTC1jTHQzSm9EX0ZtWmhfeEhmOFludFRUUFpwaVZyc0dpRlFKRE1YSk9OQ0FEekFlbk52cFVUMTIwaEtiX3BEUjdDa2RLbThQb0t6ZWU1UzhaN0h0NTZjYWltOF9ZSXZJLURZdWFuOTJ0ZXgySk9Ca0paV2p1Mk1LZHVOUDd3UzQ1dWZhTHZyT3dKSlRRQTk3eHNnVERXejN2WGJmSTVCX2VHMzVJVG9RX3EydXJOMlBfb2NlN2FRVU1mTkpzcHNQeTBkckVfekFoUW9QclVPNk1uU0dlS3NrRVAybHJzU2dhNUpsTUZyclVNNVdtMUREcW9oWnFqTDZPeXlPVFVvUXRrQ0dQUlVTM1lmbVFJcVpQV01NSG1wbXlwZUdiX0xSVDJXQm1hSFFOUVhfdVNWVG1LUWIxbDBJa1R0eEFNQmQ2NzNTQUJNVVllQ01zUWlXRWdxT1dBbVk3MjZWeWhneFg1bjMycEV5d2x0cXFGLUd2djlUMm82blFQRnVrWmNSc3c3TGROREx4V2hkMHVyTHFneDVyQkh4QXV4NlllaE9QYV9sYVR6WUVwUFhGSm5yR1c3LXpsYkU1UmtUUUFRNm8zbnh3TWkyLWFPREthSmxWS2EzNW5ZTHZPWUZtSUg1b3gwcHVBOFZGUXNmVGdGSjZQa2U5cWxic0JwcW82S3F3di16czIyWkxhWVkyNzlhRkUySXZ2RXhHakk2cW1HV2Y4RTVPbjFwOGZWSndqQXlqc0gzLXlwelFJOWFMYzF5WHVWcXFvNzVSbGlHZGE2Z21Ec2ZSRW5wVVNrdUgtYzVXTFBsX25jdFlmY1pKUU1IbWlLNUpPT3pnTk1IOC12ek1FY214NXJQeHpuTHI2cV9tWjhKb3MzSkFiMXliYm1PNmFoR0IwQ0hqZ0ppY0FOdXRQME1SMXd2eVd5Q3ZVUzFpclVnQ1RyLWNYOGFGblNKY2REdUxhMWY5TVV3ZmJzZTV6YkpTcFRpNUplckc5Sl8wLUwwajYzc0Q4ZkxyU2l2MGRiVnlhSl9SMTg3UWRWQzRMRERWMzhhRFZNM3FOdmNwYm5MdzBtYlZzZ2NFX1czTmtlWTRsbDBLa0I5T3BmRmdNX294d1p6T0R1S0lsdHZ2YVhkbGZha2E4a1BDdXJxS1BJZGxydC12bHNLdkdpQnBjNXVTUG12aGcyUEV4YThCQ1BBZHdocXo4aDl4Y2YwVko1MWtPRG44dWFWOVlzUlhtY0pOdzhZTXZXQXJnOXU2RnJzaWtsRXQ2NUdZbnZETTN5V3V3WlV1UUw5LUVvUUpCdTM2bUY3amwtQUFrYTRhUEZONWtlOVdlMEtObEtRZDFOVG9KR2w1dmZBUV9UQ0FXQUtQZjlGSjRyOEpzVFpWWW9lZE53OUJzQ2RLX3gyQ3pTdkZubzgxbE1JT2pyYWZLT0NpZ012QTBoTkM3NE00MXo5alZ5S1d0T0JXdVRWNEFFbGtDS1FDUXVBTnVmRFIxWUNoX0lsRzhVcklFR0VIdTdGMzhHUWVvWmtCd1NNMHoxZlEtZVVPUi1GX205ZHN4bHYzNGh6TFhUckx2ZGJ6YzJuYkV5R1pnSGhBWGVIZkx3eHFNWURwY0RmSW1XcEwwekJlT3JWWkNjZjdwcmNON2FRUGxSbTVYUUNnLWlVOUY1VXdkMUVQd1pFUGlNTGxGX1k5cGg2N0lzemNReG5VTmZZYzg1bnhIWVRBUzQxakFicmdJSjdfSy1KMDR5MVBib1lDb2dRcHN3cGlyNGZNdjR2c2RuMUtVbERxdkh4UjdZTkNXU1l4dlFmek4tNzUzazQwRERYd0xlXy1yS0tzSUo1LTY1RTJXYzZkNXZYLXpzdmJTbmhDRnlidE42X2FIZzZzeHlPc3lqTnh3N1pQVER4QXRXeHlZOWpZMzNnamI3eEw1WmdSMFlKRGVfaGpNS1FpUWk4LU02VHBlOS1YY3FuakVuWnBFdVJjUVBldnZKdjF6LVQ1YkpLMDZ0VnRLc01wSU9vR3FnbXBYNktzYWxNTXg4QVdCWUoxc2VfNmRZQ2o2TVVuckpIeEUwSXhzR3pOWkJlOXlVS1dzU2h5bUhZWGRTM1RDekxfNXhycjVuVy1nbUt3MkJTZUViNm52NGFoNTh6cjZ2MVBFZ2tMTGRuaFdPbjZZQWZCMzRzMDhWMDFiUnhUNEdSNEhSOWExSVJERVFVY3c2b21POWdoeDZCTkJKN29sNnVlZnBZbzYxNmdFMXgwWEFjQlBrVUJqTmw4eTVockJsOVlGMW1MWTJ1bEZUQkctaVlOdHhIdlZOZXllYzY2NTdxWlpYcUM5WlFfQ0txT09Qc1hrdWtEdndxMjhyNXdyWjAtbXhpOWZ2Z0J1NElsZ3FpbDIwQVZtSlZJRno4c0E3cFF1VThYeVlKTHdRbllTbG1mU1NqZEtoMUtrWnlsN2pwVjJ6ZlBBV2I1RWxsSkM5QmZUXzViQ2xfbTdpWUFlRGlnTkJXZXNwaVhuLXBUOWNnc1djdUZoYm5BTlB6SGtOYzZmOWVlb3p1OUk5N194SVpKSjF6eENtQUtZck0zTTFCNE1sb1lpcWJfblJDWGExbW4wdXFBVzBqSDZ4RFFLWW5tQVQyYnpRYXdYQVhxSmd0TXlza2xVaU04MkpOR01LWGFDLUZPTEhvYWt0NENBRm9CMzg1OTJHZ1NxODV2TXRqX0d1NHVYRmRtMGFTeUZjQThSTzlVTTZPelhncUNkaTVRWjZLMlVMc0FQTEdWdDFFUmZsWlFuX19SeUhfanFfbXZKTzhHcS0wWGd1RzZkN0pLQTluSE9QaVRnUW5yeWV0OTJqTEgtVTZuMjlIZkhrUnFNQWp6eGlCTk9WQk1namd4Y2VGeEVXRVFCYk9EQk5PcFJxM29oaXZ0WlFaMFN3ajI0eWloREQ3UzRTOVg4cXhhTVBGNFhOS0M5TW1YVzkzSGhLd01ZYXJfcTZ0UERxTlJJVGV1VGZCWnN1bWJITGR1YVZnWlVLczJTQ1dEQ1lrSXpHSHVyTmY5TFNtYWppOGJhZXVBal9PTTZ3TnIzUkFTdHhadlM0bGl3RmRreFBvNFB1NE9qbDFDTDFqY05BbTlsZXBLNlJxX1QtVkREeWdkWUxsSmM4U1UtZ3JCVUFiRzJtaGpPTXF4dUd5emdXNnExLTVjelBDeUZ3TGhkaVB2MHh2TGtyNm1Id3hMbWhldVBiUzNsNVlaMENQUl9qNTVNVnFwcGFzZW5Qc2JFYnpjbWlaQlhCNF9uV3Q3bWlSUFdnbWNCcFp6MUpMNFI0N3ZyX2pIanN6SkRfbmJhRHh3c2RPakFEV0lGSTlhTUhpM3lFdUpwMzgwRlFrWmptUndwaHoxSTJfNDhXaHhqLWlJcjc1WXFlUjVaRGRDNExNUTRDU2R1cVREV1Z3dm1wY21BWXRzalJaTlFESHZlTjdYbnJBU0s2b2pBN0dvOW4ydThoWGNyS1U0Sm5uc0dod1ZRSnJlN085SDJsWG5XaGZraF9IUnB3QUJQd2xZQmJRUUFzb19YUkFaV1AzOS1oODhNUlRiaE1jaXVHdl9Yb0c3LUpkSmpWYnAtT0c1cUo2dFAtM1Z6OEtSZFdJT2Z2enUyZ3YxSmJfeEp6LXBDY2xxWjlDT1ZNRlhCNXEwRHVTTGR5S1hpa0xVZll0M1hyM0Z1N1RyeVpzMDlrR3drV09NRmFCTnJXTHlKNkJIQW1TUURjZUc2cmNhTmtRZGlCOVItNVJKWXpEWWs3SFQzdDFvZHlEUDZBdDdfVzBxcXlsak80ZlFiRzJmM1RBMjQ4bHE0dE14c0R3Q240UmRtOGowU3Uwd2lQdzRJNnlvRkZaSUh3bjJhcVljSWJ1SllyZ2xJeXZ5a1cxSzBUdlg2ZVFId2k1YTZ3MTZZOFF3S085aEFJZlV6SWtxbl9ZRUo4dGp2ZW90UXMzWFZEaGtaMnI3UkZjdTBCc2xKVEo4TFVPLXhRNEdtSjZsVlN3OUw5TjRJNjhIMzRwUU9Ta1hValNaczFYRlhJbVlQZ3pRSEhwc0gyTTVOV3NsSmlucU1oLUxLd0xsQjBpaWF6b0lMRXVFWmJjNEpuakxCa2JoU2FuUEZZU0pNUXNRc21wYmxzUXVhZVFzQUNITUJIQ3pHQ3BicE83blBBbEFpU0xpc1hlOUs1TWZScHVLVDFDQTM2Q1Vpb0xEQ0haSW9ZMEVlVDJzQWthWW1tMjR2S183cjdWSHR3NklpTUxGdzlhMXJhdVdZSl8td0tjNERYM0pubXRWRDU2M2RwNm9ta1pMSm1Xd1hQOU9BaVFKd2g1bmFvMmFkX1JQbUdTbFZpa0x5OVk3U0NKbjlUTE9jV1k0R2hxVGZzTEE2RkN0RkxLNDl0dzZCT2hZSEF3ZkJlWnNnb3cwV0hYeldENzRiUHYxWkV0Q1o0VnFoTFdzRnRaWFF2V2FMNmhLUTZaS2llcktCdTcxbnVxSE9UT2JIVXhxOGJ3Y2lDVnhXaTNJalZUZlJ0cUltSXQ3Zi1yc3BncTFzbm5QRDJGUHEwRmNrdHMyUEJIWkJMOTEwTEtKVnlsRE5uR1J5cG9zWmliRlNkVlVqeU5HYUpyVTNEZGZFTmJ2R1A1TjZFbi0yTzNqckUyWWJPY0EyNXp0eTVvblhJQXRpM2hzZlAzWE5NREFpUXY3Rno5cjZNcGdxUnUwdndUelJtSDl2ZmNJaDhRX3VPV3c2cTkxbWNWTHBzcHhSNnE3a3hZbmYzTEhTYjE4YXd2bEsyMGg0TzVFVTJNWlVkWHJNaHRIZ3hXRmFtTTNLeVh1bHM3Ym13NFhVN3ctYWxiRC1oQ2dkWTNLUjU2U3MtM3hQdUwyNUpPS29ERHdldVVJWkx2WnJwNnI5bnN3VmZIZ3h1bU1GcTFQVG0zbzl2ZmZyc0xxcmQySm9VZU5zc1lVY1R5N1QtNkZpOXgwdFB2MDlzdGkxT2JCYVVvNGRiWHRRczRTSEwzTE5aZE5yNm9SdUpUa0hHYnJtc3ctUzZ3cmtBdDE3Z2c3TmpHOU5fX09GYS1VTVlyM0tJWXdudnBHQW03YVQ5QlBkODBjbFQ1UTVUWDJPYTRNbTEtSzh2VEoyN01CUjllMjZMMUNfcnNXTE5rZE91a0ZsUHNaNXdCTU5kVXNUajhVc21JQ080c1ZQWVpnbGhEMEtZSUNyeUpXdHR4Z25TNWFzQkZPdjJWOWszWktFOFZ0VE9GckhFb0I2QTNUQy1OdE1YNHluNk9KT3Z0OEcxdE96dkU2aHdPRHV2QllFZTFtb1pDblI2OC01WFctaGRVXzRwOFFzMmtTaGgtWFh6dUdaalVJb1Z1R0NsdWQwZzdIUTZtcC1wTDhhb1ZKbnRHWjVlVHRRSDBGNmk0Q3BQVl9hMkthT3NFbzRtMVd3VjhOSVdodW1XMGR2OHpfOERrcndPTlJwUVFKQWZsRkp1enFaanRYZExLdEN3d0ZoZ3ZnMWwtVWYzYmJjc2FjODNFc0l2R2pMcW9rZVdFdzBBSHkzZkdyTGd1UlVtZGZ3MEtjQjFuaFdnLlIwTk5LazVCRlFwSXJnRUJCc0I4emc"}' + string: '{"value":"JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLk9kems3TFFIaU9MbVZjcS1ubWZIWHZPTGlRMjEzeW5NOHlzU29JYkhyV2FoSlNsb2pQa2JjOWRfMG9JX0xBVnFFWjRUQWE5dDR3M1B5emRYRDloaTRPcWh5THRvbFRmajlxUndWcE1nZXVJaVp4WndpVnlFR29FOTN4dWNfOXp0Qy1aV3hmTTR2RHRPUG9KZUNDRnIxS1d2XzFNblV5ZGNjVzhvRWxXS0JscGlkRjZJQzI2V1BRMEQyWThscFNmMnZrN3FUejJzUjRkX01RSGwzSkZtdWtaU1hYTXJyNC1LcFBqaDNtNUhvWXM1bXFhNDZDNVFQUWVLRGNuR1lGTndhV1REQW5EcTZHaFZJNS1mU2ZEWUhqZVhJcUhtN3hmdllmVlBPTGdRdFJMbGt6VHNCUUgzZjlaYnlUczFWQ1JkeTN2MlNLNjhnbFFDOGFEcXBIU1FNdy5iby1PMVE1VG5HMGx4MGdpRjVSQVFBLm9lYUJUR043ZzNMNndRVS0wU0c3ZzRwXzdzU19KSVpJUmFqbktPZjdBNldnZ1AtbEZTTlVtV3RoQ0p1SjAyaFpyZW1mamRqcFBtLTJPRWZ3UFhzVjk1YnB2RGdMc1h3T28tRHZlTTdhNXRZVUxuYXJNXzhXVmp3emVpZ1BlUVpCV0c2UXAwbVZKX2J5RG4wUWJDb1FIRGdtTkVZWi04MGNXWVpJOEowNjBZVG1xTG0wM1RNN0h3ekpuN2ZjUnU5aXQ4WVVTZGl6Vk1nb3lNM1F3RWswRUlKWFJCZ19GVElEdWJIZ0Zub3NPaG81ZFRDSV9ZZXpTMVpkQndDOE5JZnBDalRSb2pEVFJpaUgwMmhXcTVacUEyNktIOXl1MGRZNTJ5TWYzWUlnSGZ4WjJrY3N6d0UwdlRBandyMGtSY0lnTXNSZV9MREROMWl4bjJQNlpzRkQzZVBLa3VNYmNmUi11RUxSV2VPRnpuWXVqeVRPVU40YkktZ3kxTVhpbm41aGJuZDYwb0tqZW5JYlVvT00yaFcyYURVRXlpWldXZ1hPNW5RWDVPSUcybEhEYmRUNTJzOGoyQVV2blJ3bTN1ZWF3dERjMFBveENCRzZMSE5CcUZJRkhqNkZfejl6S0FUUTlDaXBON1RRZE5yek1Pd3Q4NWVNTnN3bEZOOVdQd3pTSFJTb05maWxQN2EyaklQOW44SDN2NVloUlVQRFhaQ0VyYk44UDRLWEl3c0EydWY2czFia0J3UW1QRjk4UjdsLWZ1TDVRVnpWZGt4VzQyREdoMXJGcEwyQTFhQVpmU3lON3hNVEpzZ2lBNlRReTUwVENEc3lfcUIyMUh0ckRhMlhlT2JtNWI0QlBxelVjNXZYajU5LTBYeHZjX0ZoYUV4Nkx1Y1UtTmFVaWFfME41US1iZW9vMlh2SDZTNkhOSm94bFZ5RVVfUHF1a1E1bnZ0WW1JS0F3VVFXMng5WXhFa1gxTzVpd2N6Mzk0VlF1cjc0b3hkUnpzVHhKTGNIeDlpYnNBZkxtWjUwaUZFb3g2WnJJOWdVOGtTSmZ4ekhHOHRpSGNnYzhLTUpMaTdNZHhyZzEzSG12Y0hfMW5FemloMF9OUVJVY3c3X2xQSVBuZVJEX0hlUmRiU0ktOE9wN09hT2wwWGhMYWpKVUNrMXhzV0plNXVYLTh6SGxyT0ZTSWtlLXFIRkpjeDVlcFNyVWN0ME42bVo3akQ3bzJGb2h0cl9KNDA2Rk5hdXkxM2FEWTItTFRSSmhTSWNReUVzVGs3NXZBTHV3WElZYzJzMk16VXc1cEk1Qm9GaWhWOERqMExzNmVSNXAwbkpDeGFqXzFmWU5takFHSHhSZ2NGbzItQUg0RjF3ZXVhTEhDS0NNekc2bFBrQWZQb09kTHFWY2ZvRHozOGJlVl9ST0M0SFpmV0hySDAzVmxZaFFGdEVkRVI1XzMxQmdyQkpjV1JtQjJFTzFUTzJiYW42X056Z25wMU0zRTZkUExBaWZ4aUk3amxBWUlBUGU2UkVVc0lFaXdtd244MzQzRGdOR3FpeWk1S0YtSHZ4OXdCdmtoRFVDWmsyM0JzRWkydEs5ZkF6LTI4R3RHUW1TRi1Obmk5Q3NFQUlTRXlzcFBRSDFpV0ZXbU9WdGFJSk44QlowVXdXMjZRZ2I3NE9qTlZrem9KbTBibWtjSnVEb1pxMUZPX0RSd3VHYzdzd1JPTG9yTnNUSmFEdXB5d3ZlY1dLUi1rdlBIRnh1b1R0Rng3UjBVZ0FtQWhrZFZWMWlUd201LTJFYllJNm5iYXUwN0h3VXZHbzBfazU0dURoU05uMVVST0lHd1NqUWR1c1UzZThkTzNiVVhxdTVfVGFfYlB3QkI5TFQybkNPWlBSQ3A4TzlaZ1dKRWZxamZldl83NmJ6U05BZzJwOFh3UzBmbU5NdEphb0Nub0ZOWmhRSndtZ1g3cVlYX29oT0lEM01sUW5KQl95Wi1id1RFcjRKY21fdVkwRk5pVThSTjZvTjgwMjdfRWNybEI4ckw3d3RTRHhUUUxlVnl4UVFxaENFaXJNNWVHRGVNNldWc0lMR2tfNnRxSmM2bmNJdkxDc3hxZ2RNdlpYc2dqVTdHVkV5eVJNRnAwX2NQNVBndGYwdTJuclVJRmFUbWlUR2dhMXU1UWJUVk9hRDVSbTZvOHFmaTFzeGQtMlIzdEMtdkpIcU5rUTFLWGZNRDJ6d3U2LUJzTVRLUHk0bms0aEVxXzBIdU5DNFlyUk8ydmIzclNXZ3FHVEhmeGQ2bHdjMTJMazNDdDhIWW1vR0JzVS1vYldFejRYLWgzY1F1ZUdQcmNMaWNZZmsyTkVYV0Iwem5yV3BSaFd3enNTVEc2Nm9kSDRfeDRZei1HSVB1UXRNUjFNZ1BzSFVpOWFiam9rcmxRc3NqeU0wX21idGx3VkZob2paU3JzVW9LV0tBTXV0bVlkRFZKcmNmRGxCX1dXVF9PX0xxeHEzYVl2ejF6RmJadWVBcTBBMXlCSjFjdkJvZTVQS1JZcDRkS0c1NVpfVFp3NzlvYjVkaS11SWxoUzd5Z09XRi14bnFDdmg0TlpPME45SUkyWUduVW5wcU43TlNtbXJ3LWx6QzhnS0JfUmp0T1RqVWdSWjZtakFHZ0toYmViVTBGNWdYRENNeXRLM2NtNkpiRGs0SjZMaGI2bVJLTEhmVjN4SkNwMEdQOHN2UUdyOWx3d3NyNmJNMHNUQm51NllkYTRPeE9SNDg3aG5QVFowWU01RjFoc2pFM0p5cTV6MklWQXQycGNsTHhET3I2REMzUU9oN3NhTHNVWGRkbzVlejQ5V1E5dm9qU2RqU3YtMzEtZ0hncTVUaVFYY0xwcDVaeUZCcFNzMnVaVWdCb0lKLWpmRjY0ek1kU1lzZTRzbXgydjNESWlCNFNsRi1Kb05uejRLaUxkdEdTUVlMNW41VU9iX1pQa0Fwa2FQRnYza1dNM3Y5cjUxQ2dTS21ZWXNMMmJFUHBlV045aEFkUXJtYlJ3ako1aFZXT3RZT2dWcXM1dHBYSU1reDFvSnVuanF3dlJfS291MGw4cm5rSHhHVE00V1FGb0hqWGNFS1ozNHk1QnFmSGhiUUUydGUtRXNjek1QOFFaN0l2NzFEX3JwYm1IdDg5WTRGb1Bfb1ZkYW5YSUdJT3RDdmVsWVdsdGZ3blgwYTZTeWtRc2JDcXowb1A5RmFueDhibUlyeVNSSXdZVjVKaENQR1ZlMVluaXhqVmEtcVlVT0tXWG5tZU42M29RS0gtd0FyVTgzR2lhbFlCT1pNWVBCQTB6TzlyYkVYaHNLajFXQ2VnQk1iaHRvemhuY3VmZWpQX0JlUUdBOXBIRndsNnFJU3pPUGt6UC1ucEFCbjRxWVhXWk5JbWxNb1pyNzRmNnhVSXduVThyQU5EZGgxb250ZmlSbmxFdjJucFFiRFF6ZklvemFraTlsUXkzVWZCV0ZvMWR1emUyMVRWb1lqc2E2a2RSZzVJSUNyVDlnNVY3NGptdnc2SmVROUdQRkdHTXlablN5bG5yNEN0ZC1TY2xmZnRXamxkUW92cGhzaU1sc09YQVZEaVFsNktSazFkTEpTSVVwME93MXhOMG1FNUY3UF9OLWVTWWJ6azVGcFZTaUFjNWMtNklha0toUk5wd3NyX1ZPem41amt0UFBWWTFpcFZXNUhuVUpDaElhSFRXMDB1NmU1TVd3NVMyQzJsWTdIVXNESXF4Zks4bXJJXzZlcTV6LVNlaC1jMVJfLWw0aVdlemJULWEwUWxBNGtYdWpZNzRvNVduTDNwMDNDT0l2UzZUYjhMN2VXNndyYzRab29XRHFrUTlhQjNscXdwT0tBMEFCV2tSSUprV2dsZlZMUlQxUVM3Q29abmxFeUVlbTBhRnNKdGtTZWNnX1RkUFBUNndfT0I0Y0xXY0NJZGV1ZFd3THlieGgwNkhBQVR5dGYtMHZreTJxT0hkd0dJbFoxQlhTdmlSX3Y1LV9SY0JUcEZEcjVMcnR1U1JWQmVsRmlMWjJoaUUwQi1VUGwzQ0Z5OWtHdy01TTlVNmNKNE9CZnNMemF1Q3N2eDRYeVl3VnA3N3BzR3M3M2h1T0t0T05td1BHWVlPOUFuUm5ENFRmeV92ZVdZdXpRclZHV0Y1bms1WnFJUVZ3SVBaUHhLaUpIZXdFcVRiMXN3Z2RKSnV3ZC1PV29HMnZLZ3hWdVk0UXlzVjQzSUtjYURERzNROXZEWXNTNWU4enp4NVlFQVBXaGNhZ3M5UUh2NkJFVDU0LUpCTEUxc3F4Wm9jOXRVVmQtVWV2NC0wSHU5TEN2LXNnSWROVVlHT21ZRTB4NDlsc3NwQmVod0JBaUQ2OUh3V3Nud0NpNTBFSDdQcVVoOTZSYW1VU1IwVGxSWmx4REZoSlNsMTNWWExtLWZiX2VjV0I0NHl3NWt2WDhCTFJ6c1JDLTlfV2tyOWNRUGNLMWVxWWRDeVdxUEpBMG1NUWFqRlh5QTlwQ2JwZ1hGZWloLWgxaExLdHE3anJydnh1RWVxa09BM3QxdjB0cThCRUxTTUlxTGd4R3BwU21QeEtZeUgtVXdPS1A4ck05NmFacTY5STNpVlFuV2J4OFVnMEpNQ1liNmRVWHVOdGplSlk5TEFoXzl2QWRZSGtQYUVVZzRwV1h6X0JWMjA5SVFxVk5ZNHpmX1dVU3dQNHlYUUFqdElUbUR6b1REVUEyamk0R1dPOUNxN3pRNzVUcmVoZFlNNWVhLVpwY3RKQjlCX0xOdEhVclpNdHY4SlNZMUVscWxRdGc1dXladFBid3pWOF9jUkdEZnY4M08zR3hvYzF4bld1aHQ2UDRuQi10UGVyZC1taWN1U3g1VFRjMGU2Zl94TmJUc3dpRUE0QmhRS3dZVDBKY2xvS0c0UkQtUE5UOExlZk52UFBWZnVQSEdfSm1aQUdDOVJEcWFra0tXSF9EU0Y1Y0RfdW9BTndBYkhNUFlpY2ZDOHZETXZUcGNEdUs4NlZyTVRSNjFMdXpQWWxMdENxNWdiQlhZaWZFdlFJVm11TXVHZHF0SFpiUHZFSUo4eUEwMHFxdVd5cFFVRTZ0RWhibzRNZWt4R0NqTzJDaEoydjBobnh0MFYwenFBcm1xaXFYOVJHdUVQSmstOXkwY3lfWVNPX01jRmpMWGZhYTdHQjl4aDlTSVA3UGlSUmE0MzBEaXBaSnktejJxbTNXbE1KNW42Z3g4OFE5U3FqSU9mODZHQUJLRG1XZzhFbnJZa3lxNDhReWFwdUhOUlVHMFQwTFFGYjc0U0wzMUhPbWhQV0F1WjJrRl9XTDYzZW9JTlZTeFBoU3ZSMEVWYmFpdWtvcHhVYW5pRTlCdWYta1JHTnVlX0pBdTJZYzBKcjJ3UDd6YllIZTJ2QTdGMFBvWmt0cWp4LVZTTlN4QmE3cFYxZ2hpV3ZfZlhILVQ1MF9XQXFNSUZjWWhkeFdNNXJTZnFPaWxrVmNCbkJ5TUhQLUJwTEo3RTJLVmNoRzBGemxvQkZvazBEYzdtYkJBTEM2NEQwMVA1U01zZGY3bGpaOThUdFAwc0dDcUJuOTVsTUwtSWpnOUhDblZNZ0ViODFma3hLaFBXWTUzNDNDVjhiWnNyUDhtamZZUzNqUThoSmlocjdCb0c3amZPOUI5aDJkamFScnp3OHFKeEJDRHZRZ0M4VGZjOTBMY0pxS2YxVEc5UE9GQ1dLV2tRWXNSck1JdHhDWF9kTi1jekNNV0FSSUNhYUYycFdvTXNEY2tZdTRWV241UzFpNjF1NTdvdG02NUxPV3RoSlBDc3ZKaXFGaUtoajhHYWk4OUYzcE5xTU1YN2c0V1JmUXZIVmxucmJUeTdSVmZPaE1HYnlLX0VKWXVVTnU4dzFVVWFSS0JoMW9VcWNVMnBpNG9JV1k4LTFWb2NYMkpfTW9KTFRsTWlNSFZ2V2k3bDdLMDByNE1WbFhHWWhJSXBLdEJnN3BZRVQ1YlRqeTZfWVFqZjFKbVF6TnNJT1U4aGdtc1lCcTI0eFRoSmRONmdsNlhTRzI2YmgzMkNYZnBvS0U0M0tuY2tDUm1MeTdCbzQyV0t5SFhFUk9qYzJHdHh3TmJ3ak4wWnVkX2JJSkNtOW44d1hMOEpqencxeDZRQ1RKY1hSTGdLb1J2RWRvNmlaOUMyR0F2UWw0T1B1dkxobWpEV3p4LW9Ec3NnRXZmdEFYd0dWSlZvYVJhVWJET1EwM2FBdGh1ek9LRXhaTzNZamxHTzZrWjFHRnhGbWVneXlNQ3JoOTJiVm9tYUdSaDkwX2s4ZjVIbmlHT2dGdGlRMzFaUmtCc1JyTnJoZUlLb2Q3dTZRX2xSUEhMWk5pRk9UZTU4cjUwdkdKMVdRMzhYbFBHclhoekNWYTdFVGdRUURDNGRlTDhuM3FoN1lJbHlpcnBmakxyTVBUaURYMWNQSEppR3pjMmVQbVBiUkk3VFpnRE1HR1BTdUwyRUltWXNINzhvZi1HdDVya0t0eHZidW5jblJuZVMwUm53UFRYQmdFT1FKSExoWW5PbXRmcmIxTjkzVDI5U19udnZjRUZFOEpGZWtadXhxaEZJRUlKZ0lmbHQxSURxNEZSRFJVaXh6N3R6eVlIcGFtM1gzbmxUMzA0UWthR1hLb0N6YndUVVFsdldGR3BCVHZQcnB1dmp0VllNNzc4cGUtZHZxQjM4Snl3VkNoQVhnbDV5d3dpRHlCOFlTWUs0V21BNzQ4a1A0T0k1N25oc2hwSWNVX2pfS1NQclFQd1BXN2pxbzY4TjNiYXNYTW5ORHNUcjQ5QjF2cE40NGQwWWIyRzdTZXRzaU5SV1lhdmhZa0d5YjJPZ1dqTG5LMExZbGI1Uzc3SzdXN3J6S21uUUNfb0VnX0I3aERFY2NKUlJQd2dvazJiR2dYN1R0Y3pydkNtOElMTEpnUXVvVmFoREx1OGxGT3o0aEtYUlV3dlRwdEYxV2Z2WG9QOFlDc3VLYkRTUW4tVGxOc25DQzhmX214M0Vob01vUU9YS3pRRTN2NzhLb1NSRTZXWUJmVjlCNjlzY21pdWpSOHFyYTR4dVZfbDBnWVNLNDJaQU03enFKN1NqQmt1eGd2Vm5wSmVTbTc1c2NSZFdaSFVJam8wNDB6bTFlbmlLZlBGSWFZNmQxLWt2Y1BkRFFVLXhabmgzZWRQRlNTM0NDTUI2Rk92OG9CTWZ6Y2RmZllqM3JHRHVfSFJLbF8xaElwa01xdTNfckpNVjBhcVdsZm9aSVRhZnhYZ2tPZlhaemNiQnNCOGdXLXgxZ3FMT3pqUllVRGowVTk3N1NxX2x3c0ItQ053eVFoczBNNXI4bWRPeS1hQVBOUW9xb2VlN2I2MGR2RklUZUxMUE54TnB3LWVnbDNlRThucnhNN2FrRVB6enZLZlJOMHNPOE5QZHE2SUdKM1lDZzJQNnZPeVI0aDZPcjZiQlF1cXYwVkJ6cWo5bUJuZ0pyT3p2YnI1dTZFMUhORGZObk9NbFpzeGRnQnQwOENHUXdJUTdPbXM5blYycjRrYmQyNVk2OEZLbE1DMFhGLTZHdHVFY18ycFhQR1pldXlVUGNVVDNVUnlWVUp3UFJfSy1YaEdQZnJiN1d1TERTcms2LTV2Zk1OOC1ZanUwSzk3dEx3b0lkOHVVTVg4VHZvUWF0LTJCemc4cWVzSml5ZzdiWFl3anNiQW04dm9GcDQxSTdmWWVpYzNoQnZ5OVBuYVFsZUZ1a2JZY2N3bF91YzdzRl9Ea2NiZFpuYU1SNTRvOHkwZm5tT19sbl9PYTdNTmRMcGhWWmY1LWkwTXprdjJ3U3J0REVGYmo0ZFc5UWNHWlNpY2YyaGZiUEQ2NkFKVlRKVnBxbnAwd1Bia3hGajg2TUZxWllIYmFkajNaY0tmWDh1S0dXdlhZdE9QWFAxT1kxby0xWVNVSDA0ZV9oSWhud09acTZYNVJVajNoZnExQ0RyVmxTU0lzc3NhWHRkNHR0Tm1SUjYwaUlxOXBOR2gxZzJKMEdNWHFZUnQ0cHpVNTRlMjJXUjhnWjlPTV9XNkMyV2t0N29uWWZFcU1FNjR5cTZKamF3TDRzcHN4WFVBSTZ0LV9IY3JNZGd0Nm43Sl9ZVkgtWnJRZTEtN0NYUkJYcnF1cVF3VVctMkRmOUozaWcwcXR4VlFaRG1sZXdCbUZnZ3FXS1Z0OHgzQnl3d3RLWnRaai1saGJHTlNYTEpkSlIyTW1wSEY0YnhIWUxaanlITjlRb3JZOUxaNzBabFFBX2xSQ1BSTDdIYXZWZER6YVMyNXVhOW9iNWtNb2ZfcF9SZmpYNm8waVk0dUVUMTUxRGoySzBZMHlRb1J4UWs5dDhiNTJBdUNzUTA5NDVlU1pDY3lDNG9SN09uZHJiclJuWWtDTnVMdm5ZOUJYSHZjbkwweUJRQTZIUHRRM05qNllCUzktSHV5Y0dQNDJTY3pZNUJDQ1NnYTlxaFVtTDh3UUNhbEc1akZuZ3VDbU5mMmRCaTJWUnFucmNlWUVyaHJkWmxrMWF5UjZ0X2ZJOGc0emdzQ3NkTUswN3lJck9kbWZhZXBERzZ5ZTM5YWJyN21PdmJ4eEZBNjlINTFSUENfUDhOQ2pBRmpYVVp5UHdLOVNmQ1hLb0VwZVZVWlpRWWgwVFQxR0hJTy1WZGJoR0x1T2dDNGh4RS1jc3FHQ1hGS2xFMjV4dU5maS1uZFpaZzRNc0F4cVp5VTJpbm1sN19RdkhpaUkwVFB4eXZfdUtlSFItbGJ1eEw1RlAzY1Rpc182X2pteTE4T0pIT0hXaF92WExKdk1JT3BlU3o4Y0ZWeWRwMGpUbEVfMVRyR2xmQklIQmFKRnJJQkxfc1BXZEtJSUFDUUxUemZpUHdTSGZDR183V2c2U2I2MG1yTFhSc24zUDlLTGNkYVVoanVsOTZKbWJrTnZxM3JwUDJlUjJkWW9TYXhsTTZUNGVDRzVEREtlVFZFQXYtQ3J6SzZxWElzQmxEdDFGUnpEQ3lGLW9tSFRIMTRWZUJUcWxsNWl3dFpwSTkxMkIxUDNiYXNwLVVlSFdTSy1ZVmhBSVZXN0VBSE45UVhGMm1OVFhWYnozLWd2SlgtM29wMkhXWEtBMlctQ19PMWZTZWpyY3NhTjNGNThFd2h1UEpncVd4NFdsQkY1SDdjYk9JTzkxUkZ4OW1qcTB0SjFYaDF2UEo0OUJiTjhJeFRKOEZPSG9sRXFnclhiQ3FpZnF0X19kRUlON0JhS2Y0SE93a191T3lybWs0XzBkU1FCZ0ROWFdNNkQwQVVXbHJKdkxhaVhjVlhXOFRNX0ZwRVhEUVc0MzRvNGhmdi1zTkctWUE3Y2gtUFVET0pOR0JROFhjOHRvWmtfb19mdG9sUm9rS0Y0LTlOZHp6RVdDRjNnRzVBaEJzN3lsbUtldDhxNWJoZkgySWR6Ulphaml3eHFCV3IxdXloZDFXRG9sbXd3dFc4dU8yWlAyMkRsbFhPRXB0bERfUmF5bVpDQ291Vy1CbUprVFpJaGlOeDh4aTBubGhzNTQyZUt5eXAtQk1RdXl6YzB6c0pZVEJzN3I4QXVpeTlJM0hma1dnYVNoZ3huM0Jwdjh3NUJiTjZGSWozTVRvZDljaVVFVU9GckRlTThMVFBTa2ZOcm5hUEpSTS1sWEt1Mk1ER0w1VVV1VHdqOHYxc1AwaUFMSWpOYjFraXFvWGRyXzA4YzB6OEp5QS0yQ1U4LS02YndGNEZfZFdpbmd4elBoOGt1cVFhdlk4Zi1hWVFLWm1JYW9nUjFLT1dhR2M5V3Y4N0xPXzN5SkFqVUNGVFF0amhFdm9TbjViS2xRLWpwQjlFVzh6djJwUUFwSFJyV2ZCNFJlMTlTR1BNLkR1QmVad2xRamtvb0lfNXRvRFJQVVE"}' headers: - cache-control: - - no-cache - content-length: - - '10607' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '10607' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:49:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault4e00e7f.vault.azure.net + - /keys/keybak4e00e7f/backup + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/54248fddc148400a9df744075bbfe2e8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lsgBFBFSUvohGWs21xzMCFc1IRDfnH0UlZ8aJnqVozFkc9rZgaBdr5IOVmt41hxbJY2MWuJxGpS4xAZ8AmrQZ1MOmS7nUiMmorcyqZZIcZYz3P7YXLjiv-ncb9rTty7IJ2R9v111Beiq3tNdHUrQYUt1wiysQPcPk69FGq7h4B5UqDM4SHQqXF-Rm3R2fU9wct7bx3F2XqYcaMmQWZBiYMH8vbooZWyh2QziCXVB2MhfBt0gTfoLUGT4hheDyLfIgbhhky6Hi0DC-3Ecll3tlK6JHAR6V1jLxJveWPgUy2WgRMSTATWdlcYL_i9Ji9OT4dSLkCFqXWhRN8krxXf9dw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/6335121a5c4e43919f25f6688e470924","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zPfZm_2ZxRIlx2K1MjSGUuBBpyaJjU_gk2yp9T9Ow8bvac_t6RgXTmsdK-4x27G4h1XjY0QVXkuJwnNxrUbSwrrNsxJtaz-KyCpetoPLcAEp4-EbEF2w-Q5fAPB76ngr-RKlHUv6fww8rfWWRxKb-GmtmYAq_BsUG7Ci1ALoF3dIxKyEpqueY0TeWofWxUKpftXLyjAIcuBVRO5UVSUv1bSfLl1mzm5Wxl6pk6G_BtAi9cn6TS7DERSSEilg_Raz53fCXt5MaoFnDpT5oRIl5E2ZaxaLJ2KwLxoZERB4oZ2vPGgjr8MocaOGY66xwVKZQJKttZmDy-7pUKWMxoBG4w","e":"AQAB"},"attributes":{"enabled":true,"created":1564526988,"updated":1564526988,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '648' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '648' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:49:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault4e00e7f.vault.azure.net + - /keys/keybak4e00e7f + - api-version=7.0 + - '' - request: - body: '{"value": "JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmFvY0lxQ1Z1WFpwOTZLSTZQdmVlbENFZlMzeVl4ZC1yRm5rZkNTcmdXUVlwU2tzUGVpTmJENFZuVEdEbGR6dE1GRlZ5SGdMRHVwb2VJWDlIU3ExTEQ3MVFSNWpYQUE2aUZpendrLTYxbkJ5ZFY1SEVLcHFpdjJwckp0T0FRTlQwZmpsWlJadzBiSG9zSldIenF6SDZXZktQT25pOS1GTm1TV0xvZFF1cE84WGU2bC1PN1RoWVlhc3hoLXJNN3M4QUJrekZEUkVPUm5rTnczMVJ6SDAyQjJhOGk2R3VfcUVtbTdvUDdOTnJRaTJfRGJ6YnZBOFROdHBwU1gwbnc1c2ZnaWVFWmUxTmZwVXNSZDcxMmd4YWxWNUpuWklJaDAxcnF4ZUVZaVRRNlhxdXhPbkZJd1RaTTV6WTZSSVJ4QW5rTk8zb0pMUjlkSTU1cG02ZVlxMnFoZy5DUnVlaDRPYncwWGVkMXY3TU9GSVNnLlZRVXdIMno3UWV3SXJZN0kwSXhEU2h6Y0FLQmlKdThBVFVTQWZvUTBfd3J4WEZBNkxyOGlhM0k3clFMYm15X1hLbjNwa3FFR3VnVHZlTm9BenVmaDJNR1pHV1ZtOUJibGhCV0Z1OTZUS0s4cVRqOHJHUHpaZHB0MHpsSlloOTc1S3hZSnljNkdpNExzMVVqVDAzaExEcXVpYm9SMkZpNk9oZFRQQ2p5MXd3OXlNLUhKREswUHdzSUw1VW41YXFGaTMxUW52VlVja20tZUVNRFlJRWwyeTNtang0SmtVS2Rtc3FudzYtckRRcmd1OHFxV09NNXpDaFVKRW82dkQ1bnVCLWNLa2hJS0JPOEItM3RVbnQ0bjBQWldGSzhDaW0yb0dyV1JNZWtjSGxYdFp2Z2M0OHhVRVdQdjBhQ1l5QlhzOTlac29DN2ZRd3JIUllYdzZXNTFycUJqcTA4ckt2YWhTaVBxb2dkMmNfLTB0VVlOQ1BUWnBrcjVzanA2TTVvZUZlTG1KOURlUnVES3I3bWg0eTc5UndWam9xZ1JGdlptbmVBcmY3Wi1USmZydmlLZ3lLUjlUdjN5ZFVjNzI3aGJMTGQ5NC1LNFduMU41NE9paUtRNmJEbjRoWTd6a283aTdHV2s3NmdXWlRrRGFlVTFtaDgwQUE0UGEySXNsNXMtaXNuZkYwVTFXNXh6WUZaWWVYUnlNSDZkcUpHYm81RDBnNzZhdHdvTjg4eEZlNXNDVEpYQjBnQTBRUUNRNWRlX0E4WS1rcGFWakpKNDJPQ1NEX3RkWWR4a3JDOVZwZ1FlM0Q3ZzA3QmdqVlU4aHdFZTVkTzR2QmlRekdxcGtxX1lqWkRzSTcwWkFWYlk2UTE4QjRoWnJFd3VUZEs0QVdfS3Q4YmZiYVVuQlE3d2Z4cnJ0SldZeko4eUJaaFNOV201MThfekRoMmdYLTBuNjViMm5rUlVFckszWXBEVEpMZ0RZMnk5dGtETkdHX1dJUURIWkNiV3dDRDBTbDBheHdybWxHYmYxWS1heEhudHQtd214ODROZ09DcllEZU1SUnVkbjhScWlKSXF6d3I5N1JEU1pQMGx6dVZ5Y2xMX2RRSmdTYmtrRjVTdWdZbHotOFkyN2wybWV6VldrTDgxZ2w5enVMb0RiNmFMalA5WFBqdjV0WjZsOXF1azZCcjF0X3pBTVpadzNjUGZXOUVXa2hOdGNNbEZITXBYMlFkUTd5enVQSzJEb3V3bzVWV3gzQUFTelJCb3FJQmhIZEZLUWgzNUVFQlhHcEprcG9USzktTWhINkw4Tmd1dl9MVHJQNnBlOXBvS2otTjVha1VtUWtDY3ViTGRSUjQxcnFUeXNoYUl5WHBEYnVQZ19pbUF1eWpTLWR4VlZwb0Z1bXIyMk1aMFgyRTN5R0piZGg4cjVBTk1mM2lwZUNDdThOeF9VWUxubGFqczlMR3M2bVBneEktUFY4ZHBoUUxwa2dfM1FYR2xLOHcwcTVJMU1uMFNlc1R5NGJiMG12N0ZDdUYySzFKYXR4SGJqY0FFcmlpbm9QTk1yYUt4X29Kb1k0cVc0R09rYUFkQjA3MTBnZUJuYnBXcENuOGJNWkJ4RUZHNE1XU1lfbmV0cHFDVUhUZlQ2S2QwRzU4LUZQUHpxY05naXNGMUVuY1VhU0IxTVJ0YXVPMV9rSHgzT0RPNEhfSm5nYnd2bFRENWdXcjRpU1VYYldSdWQ0ak9YNXhJYkY0NzVyeGUxa2RNc1pORWhkZTVHbU1aQm9lSUd5VEM5bDJpTXNMQzFmdXp3YjU2SVczVlRmTzlTazVqOUN1RUdsMlVGcGd3N011U0laQ1VhSWZId3V2bEpXUXp4QlkwaG9xdEtSSjRQT1dWU2FhRWJ5OUdMa1VUSmFEV0p0YWFfc2x2UkVnb1E1WFFWeC1oUHZaWFczWDJlc1JsanJtQXZnVGJFWDQ5NUpJbUNsZTByaU1adjlETE9OS0k0a2NzUU12cGNsaUpQWHhsUE11X1dfZ2RBejExdHM2RUNGY2lVdHJOU1RMU19Qb0dqSlRSa2lEcERYSFBFSWpoaVp2X2xES0NUMjF4b0VsUE9kekk3OTYtNGpaYUUtbFBxOFpmTjdzQ19iRUxtdW92TjZIOS1yQ2oyc3BuczhLSDZzQXliZDBFNmxjTU42UHlCRWJWazU1R3V3UWNrLUNjaDA0M0l2OTJVVmZsNmJROUJsc1ZjenFoMlVGV3Y4SC1qaHVFeF9XNHZidFhHRVdsSDVSRDdEWlUwRmNCbkprQW5senF0d0tnMy00UGg1bHhTSWppWVJpdTRKZzg5clRuLXZIZUZnc0hBWF91TDFjM2xSZkd6MmVtQ202Z0RrNVVKdHZSWGtmUHREUGVHckp0SVlTRExqWjduaTlpRXl5X1JFVDR0T3NEX0R2N3hieXZ5SHFHUzZOa0JLRUkwY0g4OWpTVllVaGRxZk9hMUhqUU42OW8wRmt3OHE1TG51c2NXSW40UFVyajBYOGd5c3RIMWVha1ViSU9mRm05RWtzdzh0a1Z3S1g2LVlMbHktUS1mTlpwVXF1Mm9HbkxOcmV1dmhoWkJHdnJzQ0pzUVF0NHRjTWNwakc1dmVRd2RQT2l2R0tRUmVCOE9MazJCR2RlZGZXeVlyRGk2d2ZUclJ4VjZyb2tWUlpvVk85dTd6ZjkxWl9fMHZaRlFSN2ZubE5DVHpEM1dpOWdUUEZJaThFekdfS3BiRHNmRkRNN1lCeGx6SWNkeDdLZW9aZXhHRXpUdDR6T2JfTUllWTFGWkpFbDdJRUxxUWJydXhFMjBURVYyYi1VaWJvWWpvU3hRVUNZLTg4TmJ2czZCWWF4NGs2eU9yU3ByVVg1OXNNcVFPd25uMWRZUlFaeHZ3WGh0U3pWS2d2OGtzYkNvd0RHRW5pb0cxaUJKa2NDR2tlbUxPRzlMb2xpOWxRVDJVRlpBR0VzZXp1S0h3endPOGprRkEzODk5V1JXWHBqVFRuaEN6Wkdqd2JRN3BESUVBWFhyakIxZmJ1LUZhU2VYUGVhS2VkZDdMUy12LThJaTJFaXVLcUdIaWttV3MzaVJQNTNTN0VkNlhtMHJydHpSVE10RlJ5LUdQOXlWWlNiR3JyN2lFZ2YtMFhLT3ZPZ1FrQlo5enFua1FIM09rZVlfRHlNQVJqSEdkbTRIYnQ3d0VrZjM3MHJ5M2JVNTlud1ljWEI1b1l6YUQ5STVxM0Zmc09yTWhlN3hIVDZxZWRqbXlYRHNqdi1DQmJVYUVpc1lPTmFUUW5TbF8tRjhBZU4yajJrYmtCSl9tYzBSa1BncHA3cjZJQVRCRHg5dkd0ZjZkcTRpcndybWY4MV9SM1dfQ2ZhMmZlZWtzUDBFVjB0THVUVGloM0lEUlR0eU80MjVEQ0pCSm5BVGNkc0tPOVhuTDl2NGlMbG1Bd1E2S2U2Y1N0cTNTelNNUXhLUDI4TnlXS2lKV3NLemlMZ3ZGV21zQWQ3TG5Gd1dzWUFRa1ZidjR1WlZVYXhIaWJ4OUEzZGhsZFV5cHBEaUxlcWswck12U0JnTHNZVWk5SXJHbkdfSDdISzY5bU5CS2lNel9abDdBMjBLbFlJdlRVaUFBbnFLQi1kdnlCdmNVN3l6bzkxY2l4dUVidnNtYkNFUy16WVo0MUNLWGoyZ3BTZEdlUDRBVHhOYnV1eDdZWkFPUnlFamdHYmlJS3dUN1ViU0ROcEZEeml1eHBVby1jZmxabjlZZTNNcHFlLUI2NXF1RElxcDNvelJvdGt2SzVCcUpXMkRnTEVvUjBKZTNxb0gxVVJTT3Q5MlY3bmttSWRrUWloMURuUkttSEczQUUxS2YxUS1fRFJGSmJxTkozRklFYl9ONVlMT2hGaldmN2p5ZG92WEVqUnhvYWl3ODJOR0tHZTBOZDRhNW5JanhHbWhuRkpVVkxEajhnZHNyNG9ueTR3RWtsVnVqdG1DU1prb2VSRm9tQmtfNjlEY0pFbVl3U2hlY1JJdktxeWJ5MWx2VlNWTTZuSlpPam9FSEE1clNBVGxHQ2VxbEdWaVB1YVZGdXhmOGs3S0FwcGVFMzI1aVJXVzRhU1FHeE5NVjNWWHpIa2dZRjg3UldnLWNWNDI5M0ptSC1IOTlmT09Ic3JiVW9oaFRIS0E0MFMzV3kyTWc2anllQ1Jldko0SXhYVWVZclJVcVhBWnVOalgyM2pZcExKYTk2bkoyZEwzcHRiMW1WNF9vWnM1eG5pRjhmdEFEcTZfTDZFV3dRdHdfS0pDVkE3a3dGZHBOaFM4YU56V1g3d0ltNndRQ3lsTC1jTHQzSm9EX0ZtWmhfeEhmOFludFRUUFpwaVZyc0dpRlFKRE1YSk9OQ0FEekFlbk52cFVUMTIwaEtiX3BEUjdDa2RLbThQb0t6ZWU1UzhaN0h0NTZjYWltOF9ZSXZJLURZdWFuOTJ0ZXgySk9Ca0paV2p1Mk1LZHVOUDd3UzQ1dWZhTHZyT3dKSlRRQTk3eHNnVERXejN2WGJmSTVCX2VHMzVJVG9RX3EydXJOMlBfb2NlN2FRVU1mTkpzcHNQeTBkckVfekFoUW9QclVPNk1uU0dlS3NrRVAybHJzU2dhNUpsTUZyclVNNVdtMUREcW9oWnFqTDZPeXlPVFVvUXRrQ0dQUlVTM1lmbVFJcVpQV01NSG1wbXlwZUdiX0xSVDJXQm1hSFFOUVhfdVNWVG1LUWIxbDBJa1R0eEFNQmQ2NzNTQUJNVVllQ01zUWlXRWdxT1dBbVk3MjZWeWhneFg1bjMycEV5d2x0cXFGLUd2djlUMm82blFQRnVrWmNSc3c3TGROREx4V2hkMHVyTHFneDVyQkh4QXV4NlllaE9QYV9sYVR6WUVwUFhGSm5yR1c3LXpsYkU1UmtUUUFRNm8zbnh3TWkyLWFPREthSmxWS2EzNW5ZTHZPWUZtSUg1b3gwcHVBOFZGUXNmVGdGSjZQa2U5cWxic0JwcW82S3F3di16czIyWkxhWVkyNzlhRkUySXZ2RXhHakk2cW1HV2Y4RTVPbjFwOGZWSndqQXlqc0gzLXlwelFJOWFMYzF5WHVWcXFvNzVSbGlHZGE2Z21Ec2ZSRW5wVVNrdUgtYzVXTFBsX25jdFlmY1pKUU1IbWlLNUpPT3pnTk1IOC12ek1FY214NXJQeHpuTHI2cV9tWjhKb3MzSkFiMXliYm1PNmFoR0IwQ0hqZ0ppY0FOdXRQME1SMXd2eVd5Q3ZVUzFpclVnQ1RyLWNYOGFGblNKY2REdUxhMWY5TVV3ZmJzZTV6YkpTcFRpNUplckc5Sl8wLUwwajYzc0Q4ZkxyU2l2MGRiVnlhSl9SMTg3UWRWQzRMRERWMzhhRFZNM3FOdmNwYm5MdzBtYlZzZ2NFX1czTmtlWTRsbDBLa0I5T3BmRmdNX294d1p6T0R1S0lsdHZ2YVhkbGZha2E4a1BDdXJxS1BJZGxydC12bHNLdkdpQnBjNXVTUG12aGcyUEV4YThCQ1BBZHdocXo4aDl4Y2YwVko1MWtPRG44dWFWOVlzUlhtY0pOdzhZTXZXQXJnOXU2RnJzaWtsRXQ2NUdZbnZETTN5V3V3WlV1UUw5LUVvUUpCdTM2bUY3amwtQUFrYTRhUEZONWtlOVdlMEtObEtRZDFOVG9KR2w1dmZBUV9UQ0FXQUtQZjlGSjRyOEpzVFpWWW9lZE53OUJzQ2RLX3gyQ3pTdkZubzgxbE1JT2pyYWZLT0NpZ012QTBoTkM3NE00MXo5alZ5S1d0T0JXdVRWNEFFbGtDS1FDUXVBTnVmRFIxWUNoX0lsRzhVcklFR0VIdTdGMzhHUWVvWmtCd1NNMHoxZlEtZVVPUi1GX205ZHN4bHYzNGh6TFhUckx2ZGJ6YzJuYkV5R1pnSGhBWGVIZkx3eHFNWURwY0RmSW1XcEwwekJlT3JWWkNjZjdwcmNON2FRUGxSbTVYUUNnLWlVOUY1VXdkMUVQd1pFUGlNTGxGX1k5cGg2N0lzemNReG5VTmZZYzg1bnhIWVRBUzQxakFicmdJSjdfSy1KMDR5MVBib1lDb2dRcHN3cGlyNGZNdjR2c2RuMUtVbERxdkh4UjdZTkNXU1l4dlFmek4tNzUzazQwRERYd0xlXy1yS0tzSUo1LTY1RTJXYzZkNXZYLXpzdmJTbmhDRnlidE42X2FIZzZzeHlPc3lqTnh3N1pQVER4QXRXeHlZOWpZMzNnamI3eEw1WmdSMFlKRGVfaGpNS1FpUWk4LU02VHBlOS1YY3FuakVuWnBFdVJjUVBldnZKdjF6LVQ1YkpLMDZ0VnRLc01wSU9vR3FnbXBYNktzYWxNTXg4QVdCWUoxc2VfNmRZQ2o2TVVuckpIeEUwSXhzR3pOWkJlOXlVS1dzU2h5bUhZWGRTM1RDekxfNXhycjVuVy1nbUt3MkJTZUViNm52NGFoNTh6cjZ2MVBFZ2tMTGRuaFdPbjZZQWZCMzRzMDhWMDFiUnhUNEdSNEhSOWExSVJERVFVY3c2b21POWdoeDZCTkJKN29sNnVlZnBZbzYxNmdFMXgwWEFjQlBrVUJqTmw4eTVockJsOVlGMW1MWTJ1bEZUQkctaVlOdHhIdlZOZXllYzY2NTdxWlpYcUM5WlFfQ0txT09Qc1hrdWtEdndxMjhyNXdyWjAtbXhpOWZ2Z0J1NElsZ3FpbDIwQVZtSlZJRno4c0E3cFF1VThYeVlKTHdRbllTbG1mU1NqZEtoMUtrWnlsN2pwVjJ6ZlBBV2I1RWxsSkM5QmZUXzViQ2xfbTdpWUFlRGlnTkJXZXNwaVhuLXBUOWNnc1djdUZoYm5BTlB6SGtOYzZmOWVlb3p1OUk5N194SVpKSjF6eENtQUtZck0zTTFCNE1sb1lpcWJfblJDWGExbW4wdXFBVzBqSDZ4RFFLWW5tQVQyYnpRYXdYQVhxSmd0TXlza2xVaU04MkpOR01LWGFDLUZPTEhvYWt0NENBRm9CMzg1OTJHZ1NxODV2TXRqX0d1NHVYRmRtMGFTeUZjQThSTzlVTTZPelhncUNkaTVRWjZLMlVMc0FQTEdWdDFFUmZsWlFuX19SeUhfanFfbXZKTzhHcS0wWGd1RzZkN0pLQTluSE9QaVRnUW5yeWV0OTJqTEgtVTZuMjlIZkhrUnFNQWp6eGlCTk9WQk1namd4Y2VGeEVXRVFCYk9EQk5PcFJxM29oaXZ0WlFaMFN3ajI0eWloREQ3UzRTOVg4cXhhTVBGNFhOS0M5TW1YVzkzSGhLd01ZYXJfcTZ0UERxTlJJVGV1VGZCWnN1bWJITGR1YVZnWlVLczJTQ1dEQ1lrSXpHSHVyTmY5TFNtYWppOGJhZXVBal9PTTZ3TnIzUkFTdHhadlM0bGl3RmRreFBvNFB1NE9qbDFDTDFqY05BbTlsZXBLNlJxX1QtVkREeWdkWUxsSmM4U1UtZ3JCVUFiRzJtaGpPTXF4dUd5emdXNnExLTVjelBDeUZ3TGhkaVB2MHh2TGtyNm1Id3hMbWhldVBiUzNsNVlaMENQUl9qNTVNVnFwcGFzZW5Qc2JFYnpjbWlaQlhCNF9uV3Q3bWlSUFdnbWNCcFp6MUpMNFI0N3ZyX2pIanN6SkRfbmJhRHh3c2RPakFEV0lGSTlhTUhpM3lFdUpwMzgwRlFrWmptUndwaHoxSTJfNDhXaHhqLWlJcjc1WXFlUjVaRGRDNExNUTRDU2R1cVREV1Z3dm1wY21BWXRzalJaTlFESHZlTjdYbnJBU0s2b2pBN0dvOW4ydThoWGNyS1U0Sm5uc0dod1ZRSnJlN085SDJsWG5XaGZraF9IUnB3QUJQd2xZQmJRUUFzb19YUkFaV1AzOS1oODhNUlRiaE1jaXVHdl9Yb0c3LUpkSmpWYnAtT0c1cUo2dFAtM1Z6OEtSZFdJT2Z2enUyZ3YxSmJfeEp6LXBDY2xxWjlDT1ZNRlhCNXEwRHVTTGR5S1hpa0xVZll0M1hyM0Z1N1RyeVpzMDlrR3drV09NRmFCTnJXTHlKNkJIQW1TUURjZUc2cmNhTmtRZGlCOVItNVJKWXpEWWs3SFQzdDFvZHlEUDZBdDdfVzBxcXlsak80ZlFiRzJmM1RBMjQ4bHE0dE14c0R3Q240UmRtOGowU3Uwd2lQdzRJNnlvRkZaSUh3bjJhcVljSWJ1SllyZ2xJeXZ5a1cxSzBUdlg2ZVFId2k1YTZ3MTZZOFF3S085aEFJZlV6SWtxbl9ZRUo4dGp2ZW90UXMzWFZEaGtaMnI3UkZjdTBCc2xKVEo4TFVPLXhRNEdtSjZsVlN3OUw5TjRJNjhIMzRwUU9Ta1hValNaczFYRlhJbVlQZ3pRSEhwc0gyTTVOV3NsSmlucU1oLUxLd0xsQjBpaWF6b0lMRXVFWmJjNEpuakxCa2JoU2FuUEZZU0pNUXNRc21wYmxzUXVhZVFzQUNITUJIQ3pHQ3BicE83blBBbEFpU0xpc1hlOUs1TWZScHVLVDFDQTM2Q1Vpb0xEQ0haSW9ZMEVlVDJzQWthWW1tMjR2S183cjdWSHR3NklpTUxGdzlhMXJhdVdZSl8td0tjNERYM0pubXRWRDU2M2RwNm9ta1pMSm1Xd1hQOU9BaVFKd2g1bmFvMmFkX1JQbUdTbFZpa0x5OVk3U0NKbjlUTE9jV1k0R2hxVGZzTEE2RkN0RkxLNDl0dzZCT2hZSEF3ZkJlWnNnb3cwV0hYeldENzRiUHYxWkV0Q1o0VnFoTFdzRnRaWFF2V2FMNmhLUTZaS2llcktCdTcxbnVxSE9UT2JIVXhxOGJ3Y2lDVnhXaTNJalZUZlJ0cUltSXQ3Zi1yc3BncTFzbm5QRDJGUHEwRmNrdHMyUEJIWkJMOTEwTEtKVnlsRE5uR1J5cG9zWmliRlNkVlVqeU5HYUpyVTNEZGZFTmJ2R1A1TjZFbi0yTzNqckUyWWJPY0EyNXp0eTVvblhJQXRpM2hzZlAzWE5NREFpUXY3Rno5cjZNcGdxUnUwdndUelJtSDl2ZmNJaDhRX3VPV3c2cTkxbWNWTHBzcHhSNnE3a3hZbmYzTEhTYjE4YXd2bEsyMGg0TzVFVTJNWlVkWHJNaHRIZ3hXRmFtTTNLeVh1bHM3Ym13NFhVN3ctYWxiRC1oQ2dkWTNLUjU2U3MtM3hQdUwyNUpPS29ERHdldVVJWkx2WnJwNnI5bnN3VmZIZ3h1bU1GcTFQVG0zbzl2ZmZyc0xxcmQySm9VZU5zc1lVY1R5N1QtNkZpOXgwdFB2MDlzdGkxT2JCYVVvNGRiWHRRczRTSEwzTE5aZE5yNm9SdUpUa0hHYnJtc3ctUzZ3cmtBdDE3Z2c3TmpHOU5fX09GYS1VTVlyM0tJWXdudnBHQW03YVQ5QlBkODBjbFQ1UTVUWDJPYTRNbTEtSzh2VEoyN01CUjllMjZMMUNfcnNXTE5rZE91a0ZsUHNaNXdCTU5kVXNUajhVc21JQ080c1ZQWVpnbGhEMEtZSUNyeUpXdHR4Z25TNWFzQkZPdjJWOWszWktFOFZ0VE9GckhFb0I2QTNUQy1OdE1YNHluNk9KT3Z0OEcxdE96dkU2aHdPRHV2QllFZTFtb1pDblI2OC01WFctaGRVXzRwOFFzMmtTaGgtWFh6dUdaalVJb1Z1R0NsdWQwZzdIUTZtcC1wTDhhb1ZKbnRHWjVlVHRRSDBGNmk0Q3BQVl9hMkthT3NFbzRtMVd3VjhOSVdodW1XMGR2OHpfOERrcndPTlJwUVFKQWZsRkp1enFaanRYZExLdEN3d0ZoZ3ZnMWwtVWYzYmJjc2FjODNFc0l2R2pMcW9rZVdFdzBBSHkzZkdyTGd1UlVtZGZ3MEtjQjFuaFdnLlIwTk5LazVCRlFwSXJnRUJCc0I4emc"}' + body: '{"value": "JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLk9kems3TFFIaU9MbVZjcS1ubWZIWHZPTGlRMjEzeW5NOHlzU29JYkhyV2FoSlNsb2pQa2JjOWRfMG9JX0xBVnFFWjRUQWE5dDR3M1B5emRYRDloaTRPcWh5THRvbFRmajlxUndWcE1nZXVJaVp4WndpVnlFR29FOTN4dWNfOXp0Qy1aV3hmTTR2RHRPUG9KZUNDRnIxS1d2XzFNblV5ZGNjVzhvRWxXS0JscGlkRjZJQzI2V1BRMEQyWThscFNmMnZrN3FUejJzUjRkX01RSGwzSkZtdWtaU1hYTXJyNC1LcFBqaDNtNUhvWXM1bXFhNDZDNVFQUWVLRGNuR1lGTndhV1REQW5EcTZHaFZJNS1mU2ZEWUhqZVhJcUhtN3hmdllmVlBPTGdRdFJMbGt6VHNCUUgzZjlaYnlUczFWQ1JkeTN2MlNLNjhnbFFDOGFEcXBIU1FNdy5iby1PMVE1VG5HMGx4MGdpRjVSQVFBLm9lYUJUR043ZzNMNndRVS0wU0c3ZzRwXzdzU19KSVpJUmFqbktPZjdBNldnZ1AtbEZTTlVtV3RoQ0p1SjAyaFpyZW1mamRqcFBtLTJPRWZ3UFhzVjk1YnB2RGdMc1h3T28tRHZlTTdhNXRZVUxuYXJNXzhXVmp3emVpZ1BlUVpCV0c2UXAwbVZKX2J5RG4wUWJDb1FIRGdtTkVZWi04MGNXWVpJOEowNjBZVG1xTG0wM1RNN0h3ekpuN2ZjUnU5aXQ4WVVTZGl6Vk1nb3lNM1F3RWswRUlKWFJCZ19GVElEdWJIZ0Zub3NPaG81ZFRDSV9ZZXpTMVpkQndDOE5JZnBDalRSb2pEVFJpaUgwMmhXcTVacUEyNktIOXl1MGRZNTJ5TWYzWUlnSGZ4WjJrY3N6d0UwdlRBandyMGtSY0lnTXNSZV9MREROMWl4bjJQNlpzRkQzZVBLa3VNYmNmUi11RUxSV2VPRnpuWXVqeVRPVU40YkktZ3kxTVhpbm41aGJuZDYwb0tqZW5JYlVvT00yaFcyYURVRXlpWldXZ1hPNW5RWDVPSUcybEhEYmRUNTJzOGoyQVV2blJ3bTN1ZWF3dERjMFBveENCRzZMSE5CcUZJRkhqNkZfejl6S0FUUTlDaXBON1RRZE5yek1Pd3Q4NWVNTnN3bEZOOVdQd3pTSFJTb05maWxQN2EyaklQOW44SDN2NVloUlVQRFhaQ0VyYk44UDRLWEl3c0EydWY2czFia0J3UW1QRjk4UjdsLWZ1TDVRVnpWZGt4VzQyREdoMXJGcEwyQTFhQVpmU3lON3hNVEpzZ2lBNlRReTUwVENEc3lfcUIyMUh0ckRhMlhlT2JtNWI0QlBxelVjNXZYajU5LTBYeHZjX0ZoYUV4Nkx1Y1UtTmFVaWFfME41US1iZW9vMlh2SDZTNkhOSm94bFZ5RVVfUHF1a1E1bnZ0WW1JS0F3VVFXMng5WXhFa1gxTzVpd2N6Mzk0VlF1cjc0b3hkUnpzVHhKTGNIeDlpYnNBZkxtWjUwaUZFb3g2WnJJOWdVOGtTSmZ4ekhHOHRpSGNnYzhLTUpMaTdNZHhyZzEzSG12Y0hfMW5FemloMF9OUVJVY3c3X2xQSVBuZVJEX0hlUmRiU0ktOE9wN09hT2wwWGhMYWpKVUNrMXhzV0plNXVYLTh6SGxyT0ZTSWtlLXFIRkpjeDVlcFNyVWN0ME42bVo3akQ3bzJGb2h0cl9KNDA2Rk5hdXkxM2FEWTItTFRSSmhTSWNReUVzVGs3NXZBTHV3WElZYzJzMk16VXc1cEk1Qm9GaWhWOERqMExzNmVSNXAwbkpDeGFqXzFmWU5takFHSHhSZ2NGbzItQUg0RjF3ZXVhTEhDS0NNekc2bFBrQWZQb09kTHFWY2ZvRHozOGJlVl9ST0M0SFpmV0hySDAzVmxZaFFGdEVkRVI1XzMxQmdyQkpjV1JtQjJFTzFUTzJiYW42X056Z25wMU0zRTZkUExBaWZ4aUk3amxBWUlBUGU2UkVVc0lFaXdtd244MzQzRGdOR3FpeWk1S0YtSHZ4OXdCdmtoRFVDWmsyM0JzRWkydEs5ZkF6LTI4R3RHUW1TRi1Obmk5Q3NFQUlTRXlzcFBRSDFpV0ZXbU9WdGFJSk44QlowVXdXMjZRZ2I3NE9qTlZrem9KbTBibWtjSnVEb1pxMUZPX0RSd3VHYzdzd1JPTG9yTnNUSmFEdXB5d3ZlY1dLUi1rdlBIRnh1b1R0Rng3UjBVZ0FtQWhrZFZWMWlUd201LTJFYllJNm5iYXUwN0h3VXZHbzBfazU0dURoU05uMVVST0lHd1NqUWR1c1UzZThkTzNiVVhxdTVfVGFfYlB3QkI5TFQybkNPWlBSQ3A4TzlaZ1dKRWZxamZldl83NmJ6U05BZzJwOFh3UzBmbU5NdEphb0Nub0ZOWmhRSndtZ1g3cVlYX29oT0lEM01sUW5KQl95Wi1id1RFcjRKY21fdVkwRk5pVThSTjZvTjgwMjdfRWNybEI4ckw3d3RTRHhUUUxlVnl4UVFxaENFaXJNNWVHRGVNNldWc0lMR2tfNnRxSmM2bmNJdkxDc3hxZ2RNdlpYc2dqVTdHVkV5eVJNRnAwX2NQNVBndGYwdTJuclVJRmFUbWlUR2dhMXU1UWJUVk9hRDVSbTZvOHFmaTFzeGQtMlIzdEMtdkpIcU5rUTFLWGZNRDJ6d3U2LUJzTVRLUHk0bms0aEVxXzBIdU5DNFlyUk8ydmIzclNXZ3FHVEhmeGQ2bHdjMTJMazNDdDhIWW1vR0JzVS1vYldFejRYLWgzY1F1ZUdQcmNMaWNZZmsyTkVYV0Iwem5yV3BSaFd3enNTVEc2Nm9kSDRfeDRZei1HSVB1UXRNUjFNZ1BzSFVpOWFiam9rcmxRc3NqeU0wX21idGx3VkZob2paU3JzVW9LV0tBTXV0bVlkRFZKcmNmRGxCX1dXVF9PX0xxeHEzYVl2ejF6RmJadWVBcTBBMXlCSjFjdkJvZTVQS1JZcDRkS0c1NVpfVFp3NzlvYjVkaS11SWxoUzd5Z09XRi14bnFDdmg0TlpPME45SUkyWUduVW5wcU43TlNtbXJ3LWx6QzhnS0JfUmp0T1RqVWdSWjZtakFHZ0toYmViVTBGNWdYRENNeXRLM2NtNkpiRGs0SjZMaGI2bVJLTEhmVjN4SkNwMEdQOHN2UUdyOWx3d3NyNmJNMHNUQm51NllkYTRPeE9SNDg3aG5QVFowWU01RjFoc2pFM0p5cTV6MklWQXQycGNsTHhET3I2REMzUU9oN3NhTHNVWGRkbzVlejQ5V1E5dm9qU2RqU3YtMzEtZ0hncTVUaVFYY0xwcDVaeUZCcFNzMnVaVWdCb0lKLWpmRjY0ek1kU1lzZTRzbXgydjNESWlCNFNsRi1Kb05uejRLaUxkdEdTUVlMNW41VU9iX1pQa0Fwa2FQRnYza1dNM3Y5cjUxQ2dTS21ZWXNMMmJFUHBlV045aEFkUXJtYlJ3ako1aFZXT3RZT2dWcXM1dHBYSU1reDFvSnVuanF3dlJfS291MGw4cm5rSHhHVE00V1FGb0hqWGNFS1ozNHk1QnFmSGhiUUUydGUtRXNjek1QOFFaN0l2NzFEX3JwYm1IdDg5WTRGb1Bfb1ZkYW5YSUdJT3RDdmVsWVdsdGZ3blgwYTZTeWtRc2JDcXowb1A5RmFueDhibUlyeVNSSXdZVjVKaENQR1ZlMVluaXhqVmEtcVlVT0tXWG5tZU42M29RS0gtd0FyVTgzR2lhbFlCT1pNWVBCQTB6TzlyYkVYaHNLajFXQ2VnQk1iaHRvemhuY3VmZWpQX0JlUUdBOXBIRndsNnFJU3pPUGt6UC1ucEFCbjRxWVhXWk5JbWxNb1pyNzRmNnhVSXduVThyQU5EZGgxb250ZmlSbmxFdjJucFFiRFF6ZklvemFraTlsUXkzVWZCV0ZvMWR1emUyMVRWb1lqc2E2a2RSZzVJSUNyVDlnNVY3NGptdnc2SmVROUdQRkdHTXlablN5bG5yNEN0ZC1TY2xmZnRXamxkUW92cGhzaU1sc09YQVZEaVFsNktSazFkTEpTSVVwME93MXhOMG1FNUY3UF9OLWVTWWJ6azVGcFZTaUFjNWMtNklha0toUk5wd3NyX1ZPem41amt0UFBWWTFpcFZXNUhuVUpDaElhSFRXMDB1NmU1TVd3NVMyQzJsWTdIVXNESXF4Zks4bXJJXzZlcTV6LVNlaC1jMVJfLWw0aVdlemJULWEwUWxBNGtYdWpZNzRvNVduTDNwMDNDT0l2UzZUYjhMN2VXNndyYzRab29XRHFrUTlhQjNscXdwT0tBMEFCV2tSSUprV2dsZlZMUlQxUVM3Q29abmxFeUVlbTBhRnNKdGtTZWNnX1RkUFBUNndfT0I0Y0xXY0NJZGV1ZFd3THlieGgwNkhBQVR5dGYtMHZreTJxT0hkd0dJbFoxQlhTdmlSX3Y1LV9SY0JUcEZEcjVMcnR1U1JWQmVsRmlMWjJoaUUwQi1VUGwzQ0Z5OWtHdy01TTlVNmNKNE9CZnNMemF1Q3N2eDRYeVl3VnA3N3BzR3M3M2h1T0t0T05td1BHWVlPOUFuUm5ENFRmeV92ZVdZdXpRclZHV0Y1bms1WnFJUVZ3SVBaUHhLaUpIZXdFcVRiMXN3Z2RKSnV3ZC1PV29HMnZLZ3hWdVk0UXlzVjQzSUtjYURERzNROXZEWXNTNWU4enp4NVlFQVBXaGNhZ3M5UUh2NkJFVDU0LUpCTEUxc3F4Wm9jOXRVVmQtVWV2NC0wSHU5TEN2LXNnSWROVVlHT21ZRTB4NDlsc3NwQmVod0JBaUQ2OUh3V3Nud0NpNTBFSDdQcVVoOTZSYW1VU1IwVGxSWmx4REZoSlNsMTNWWExtLWZiX2VjV0I0NHl3NWt2WDhCTFJ6c1JDLTlfV2tyOWNRUGNLMWVxWWRDeVdxUEpBMG1NUWFqRlh5QTlwQ2JwZ1hGZWloLWgxaExLdHE3anJydnh1RWVxa09BM3QxdjB0cThCRUxTTUlxTGd4R3BwU21QeEtZeUgtVXdPS1A4ck05NmFacTY5STNpVlFuV2J4OFVnMEpNQ1liNmRVWHVOdGplSlk5TEFoXzl2QWRZSGtQYUVVZzRwV1h6X0JWMjA5SVFxVk5ZNHpmX1dVU3dQNHlYUUFqdElUbUR6b1REVUEyamk0R1dPOUNxN3pRNzVUcmVoZFlNNWVhLVpwY3RKQjlCX0xOdEhVclpNdHY4SlNZMUVscWxRdGc1dXladFBid3pWOF9jUkdEZnY4M08zR3hvYzF4bld1aHQ2UDRuQi10UGVyZC1taWN1U3g1VFRjMGU2Zl94TmJUc3dpRUE0QmhRS3dZVDBKY2xvS0c0UkQtUE5UOExlZk52UFBWZnVQSEdfSm1aQUdDOVJEcWFra0tXSF9EU0Y1Y0RfdW9BTndBYkhNUFlpY2ZDOHZETXZUcGNEdUs4NlZyTVRSNjFMdXpQWWxMdENxNWdiQlhZaWZFdlFJVm11TXVHZHF0SFpiUHZFSUo4eUEwMHFxdVd5cFFVRTZ0RWhibzRNZWt4R0NqTzJDaEoydjBobnh0MFYwenFBcm1xaXFYOVJHdUVQSmstOXkwY3lfWVNPX01jRmpMWGZhYTdHQjl4aDlTSVA3UGlSUmE0MzBEaXBaSnktejJxbTNXbE1KNW42Z3g4OFE5U3FqSU9mODZHQUJLRG1XZzhFbnJZa3lxNDhReWFwdUhOUlVHMFQwTFFGYjc0U0wzMUhPbWhQV0F1WjJrRl9XTDYzZW9JTlZTeFBoU3ZSMEVWYmFpdWtvcHhVYW5pRTlCdWYta1JHTnVlX0pBdTJZYzBKcjJ3UDd6YllIZTJ2QTdGMFBvWmt0cWp4LVZTTlN4QmE3cFYxZ2hpV3ZfZlhILVQ1MF9XQXFNSUZjWWhkeFdNNXJTZnFPaWxrVmNCbkJ5TUhQLUJwTEo3RTJLVmNoRzBGemxvQkZvazBEYzdtYkJBTEM2NEQwMVA1U01zZGY3bGpaOThUdFAwc0dDcUJuOTVsTUwtSWpnOUhDblZNZ0ViODFma3hLaFBXWTUzNDNDVjhiWnNyUDhtamZZUzNqUThoSmlocjdCb0c3amZPOUI5aDJkamFScnp3OHFKeEJDRHZRZ0M4VGZjOTBMY0pxS2YxVEc5UE9GQ1dLV2tRWXNSck1JdHhDWF9kTi1jekNNV0FSSUNhYUYycFdvTXNEY2tZdTRWV241UzFpNjF1NTdvdG02NUxPV3RoSlBDc3ZKaXFGaUtoajhHYWk4OUYzcE5xTU1YN2c0V1JmUXZIVmxucmJUeTdSVmZPaE1HYnlLX0VKWXVVTnU4dzFVVWFSS0JoMW9VcWNVMnBpNG9JV1k4LTFWb2NYMkpfTW9KTFRsTWlNSFZ2V2k3bDdLMDByNE1WbFhHWWhJSXBLdEJnN3BZRVQ1YlRqeTZfWVFqZjFKbVF6TnNJT1U4aGdtc1lCcTI0eFRoSmRONmdsNlhTRzI2YmgzMkNYZnBvS0U0M0tuY2tDUm1MeTdCbzQyV0t5SFhFUk9qYzJHdHh3TmJ3ak4wWnVkX2JJSkNtOW44d1hMOEpqencxeDZRQ1RKY1hSTGdLb1J2RWRvNmlaOUMyR0F2UWw0T1B1dkxobWpEV3p4LW9Ec3NnRXZmdEFYd0dWSlZvYVJhVWJET1EwM2FBdGh1ek9LRXhaTzNZamxHTzZrWjFHRnhGbWVneXlNQ3JoOTJiVm9tYUdSaDkwX2s4ZjVIbmlHT2dGdGlRMzFaUmtCc1JyTnJoZUlLb2Q3dTZRX2xSUEhMWk5pRk9UZTU4cjUwdkdKMVdRMzhYbFBHclhoekNWYTdFVGdRUURDNGRlTDhuM3FoN1lJbHlpcnBmakxyTVBUaURYMWNQSEppR3pjMmVQbVBiUkk3VFpnRE1HR1BTdUwyRUltWXNINzhvZi1HdDVya0t0eHZidW5jblJuZVMwUm53UFRYQmdFT1FKSExoWW5PbXRmcmIxTjkzVDI5U19udnZjRUZFOEpGZWtadXhxaEZJRUlKZ0lmbHQxSURxNEZSRFJVaXh6N3R6eVlIcGFtM1gzbmxUMzA0UWthR1hLb0N6YndUVVFsdldGR3BCVHZQcnB1dmp0VllNNzc4cGUtZHZxQjM4Snl3VkNoQVhnbDV5d3dpRHlCOFlTWUs0V21BNzQ4a1A0T0k1N25oc2hwSWNVX2pfS1NQclFQd1BXN2pxbzY4TjNiYXNYTW5ORHNUcjQ5QjF2cE40NGQwWWIyRzdTZXRzaU5SV1lhdmhZa0d5YjJPZ1dqTG5LMExZbGI1Uzc3SzdXN3J6S21uUUNfb0VnX0I3aERFY2NKUlJQd2dvazJiR2dYN1R0Y3pydkNtOElMTEpnUXVvVmFoREx1OGxGT3o0aEtYUlV3dlRwdEYxV2Z2WG9QOFlDc3VLYkRTUW4tVGxOc25DQzhmX214M0Vob01vUU9YS3pRRTN2NzhLb1NSRTZXWUJmVjlCNjlzY21pdWpSOHFyYTR4dVZfbDBnWVNLNDJaQU03enFKN1NqQmt1eGd2Vm5wSmVTbTc1c2NSZFdaSFVJam8wNDB6bTFlbmlLZlBGSWFZNmQxLWt2Y1BkRFFVLXhabmgzZWRQRlNTM0NDTUI2Rk92OG9CTWZ6Y2RmZllqM3JHRHVfSFJLbF8xaElwa01xdTNfckpNVjBhcVdsZm9aSVRhZnhYZ2tPZlhaemNiQnNCOGdXLXgxZ3FMT3pqUllVRGowVTk3N1NxX2x3c0ItQ053eVFoczBNNXI4bWRPeS1hQVBOUW9xb2VlN2I2MGR2RklUZUxMUE54TnB3LWVnbDNlRThucnhNN2FrRVB6enZLZlJOMHNPOE5QZHE2SUdKM1lDZzJQNnZPeVI0aDZPcjZiQlF1cXYwVkJ6cWo5bUJuZ0pyT3p2YnI1dTZFMUhORGZObk9NbFpzeGRnQnQwOENHUXdJUTdPbXM5blYycjRrYmQyNVk2OEZLbE1DMFhGLTZHdHVFY18ycFhQR1pldXlVUGNVVDNVUnlWVUp3UFJfSy1YaEdQZnJiN1d1TERTcms2LTV2Zk1OOC1ZanUwSzk3dEx3b0lkOHVVTVg4VHZvUWF0LTJCemc4cWVzSml5ZzdiWFl3anNiQW04dm9GcDQxSTdmWWVpYzNoQnZ5OVBuYVFsZUZ1a2JZY2N3bF91YzdzRl9Ea2NiZFpuYU1SNTRvOHkwZm5tT19sbl9PYTdNTmRMcGhWWmY1LWkwTXprdjJ3U3J0REVGYmo0ZFc5UWNHWlNpY2YyaGZiUEQ2NkFKVlRKVnBxbnAwd1Bia3hGajg2TUZxWllIYmFkajNaY0tmWDh1S0dXdlhZdE9QWFAxT1kxby0xWVNVSDA0ZV9oSWhud09acTZYNVJVajNoZnExQ0RyVmxTU0lzc3NhWHRkNHR0Tm1SUjYwaUlxOXBOR2gxZzJKMEdNWHFZUnQ0cHpVNTRlMjJXUjhnWjlPTV9XNkMyV2t0N29uWWZFcU1FNjR5cTZKamF3TDRzcHN4WFVBSTZ0LV9IY3JNZGd0Nm43Sl9ZVkgtWnJRZTEtN0NYUkJYcnF1cVF3VVctMkRmOUozaWcwcXR4VlFaRG1sZXdCbUZnZ3FXS1Z0OHgzQnl3d3RLWnRaai1saGJHTlNYTEpkSlIyTW1wSEY0YnhIWUxaanlITjlRb3JZOUxaNzBabFFBX2xSQ1BSTDdIYXZWZER6YVMyNXVhOW9iNWtNb2ZfcF9SZmpYNm8waVk0dUVUMTUxRGoySzBZMHlRb1J4UWs5dDhiNTJBdUNzUTA5NDVlU1pDY3lDNG9SN09uZHJiclJuWWtDTnVMdm5ZOUJYSHZjbkwweUJRQTZIUHRRM05qNllCUzktSHV5Y0dQNDJTY3pZNUJDQ1NnYTlxaFVtTDh3UUNhbEc1akZuZ3VDbU5mMmRCaTJWUnFucmNlWUVyaHJkWmxrMWF5UjZ0X2ZJOGc0emdzQ3NkTUswN3lJck9kbWZhZXBERzZ5ZTM5YWJyN21PdmJ4eEZBNjlINTFSUENfUDhOQ2pBRmpYVVp5UHdLOVNmQ1hLb0VwZVZVWlpRWWgwVFQxR0hJTy1WZGJoR0x1T2dDNGh4RS1jc3FHQ1hGS2xFMjV4dU5maS1uZFpaZzRNc0F4cVp5VTJpbm1sN19RdkhpaUkwVFB4eXZfdUtlSFItbGJ1eEw1RlAzY1Rpc182X2pteTE4T0pIT0hXaF92WExKdk1JT3BlU3o4Y0ZWeWRwMGpUbEVfMVRyR2xmQklIQmFKRnJJQkxfc1BXZEtJSUFDUUxUemZpUHdTSGZDR183V2c2U2I2MG1yTFhSc24zUDlLTGNkYVVoanVsOTZKbWJrTnZxM3JwUDJlUjJkWW9TYXhsTTZUNGVDRzVEREtlVFZFQXYtQ3J6SzZxWElzQmxEdDFGUnpEQ3lGLW9tSFRIMTRWZUJUcWxsNWl3dFpwSTkxMkIxUDNiYXNwLVVlSFdTSy1ZVmhBSVZXN0VBSE45UVhGMm1OVFhWYnozLWd2SlgtM29wMkhXWEtBMlctQ19PMWZTZWpyY3NhTjNGNThFd2h1UEpncVd4NFdsQkY1SDdjYk9JTzkxUkZ4OW1qcTB0SjFYaDF2UEo0OUJiTjhJeFRKOEZPSG9sRXFnclhiQ3FpZnF0X19kRUlON0JhS2Y0SE93a191T3lybWs0XzBkU1FCZ0ROWFdNNkQwQVVXbHJKdkxhaVhjVlhXOFRNX0ZwRVhEUVc0MzRvNGhmdi1zTkctWUE3Y2gtUFVET0pOR0JROFhjOHRvWmtfb19mdG9sUm9rS0Y0LTlOZHp6RVdDRjNnRzVBaEJzN3lsbUtldDhxNWJoZkgySWR6Ulphaml3eHFCV3IxdXloZDFXRG9sbXd3dFc4dU8yWlAyMkRsbFhPRXB0bERfUmF5bVpDQ291Vy1CbUprVFpJaGlOeDh4aTBubGhzNTQyZUt5eXAtQk1RdXl6YzB6c0pZVEJzN3I4QXVpeTlJM0hma1dnYVNoZ3huM0Jwdjh3NUJiTjZGSWozTVRvZDljaVVFVU9GckRlTThMVFBTa2ZOcm5hUEpSTS1sWEt1Mk1ER0w1VVV1VHdqOHYxc1AwaUFMSWpOYjFraXFvWGRyXzA4YzB6OEp5QS0yQ1U4LS02YndGNEZfZFdpbmd4elBoOGt1cVFhdlk4Zi1hWVFLWm1JYW9nUjFLT1dhR2M5V3Y4N0xPXzN5SkFqVUNGVFF0amhFdm9TbjViS2xRLWpwQjlFVzh6djJwUUFwSFJyV2ZCNFJlMTlTR1BNLkR1QmVad2xRamtvb0lfNXRvRFJQVVE"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '10608' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault4e00e7f.vault.azure.net/keys/restore?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/54248fddc148400a9df744075bbfe2e8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lsgBFBFSUvohGWs21xzMCFc1IRDfnH0UlZ8aJnqVozFkc9rZgaBdr5IOVmt41hxbJY2MWuJxGpS4xAZ8AmrQZ1MOmS7nUiMmorcyqZZIcZYz3P7YXLjiv-ncb9rTty7IJ2R9v111Beiq3tNdHUrQYUt1wiysQPcPk69FGq7h4B5UqDM4SHQqXF-Rm3R2fU9wct7bx3F2XqYcaMmQWZBiYMH8vbooZWyh2QziCXVB2MhfBt0gTfoLUGT4hheDyLfIgbhhky6Hi0DC-3Ecll3tlK6JHAR6V1jLxJveWPgUy2WgRMSTATWdlcYL_i9Ji9OT4dSLkCFqXWhRN8krxXf9dw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/6335121a5c4e43919f25f6688e470924","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zPfZm_2ZxRIlx2K1MjSGUuBBpyaJjU_gk2yp9T9Ow8bvac_t6RgXTmsdK-4x27G4h1XjY0QVXkuJwnNxrUbSwrrNsxJtaz-KyCpetoPLcAEp4-EbEF2w-Q5fAPB76ngr-RKlHUv6fww8rfWWRxKb-GmtmYAq_BsUG7Ci1ALoF3dIxKyEpqueY0TeWofWxUKpftXLyjAIcuBVRO5UVSUv1bSfLl1mzm5Wxl6pk6G_BtAi9cn6TS7DERSSEilg_Raz53fCXt5MaoFnDpT5oRIl5E2ZaxaLJ2KwLxoZERB4oZ2vPGgjr8MocaOGY66xwVKZQJKttZmDy-7pUKWMxoBG4w","e":"AQAB"},"attributes":{"enabled":true,"created":1564526988,"updated":1564526988,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '648' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '648' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:49:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault4e00e7f.vault.azure.net + - /keys/restore + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_crud_operations.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_crud_operations.yaml index 15050919b2c8..bd62679835e0 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_crud_operations.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_crud_operations.yaml @@ -4,620 +4,650 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault5416109f.vault.azure.net/keys/crud-ec-key/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:51 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:50:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-ec-key/create + - api-version=7.0 + - '' - request: - body: '{"attributes": {"enabled": true}, "tags": {"purpose": "unit test", "test - name": "CreateECKeyTest"}, "kty": "EC-HSM"}' + body: '{"kty": "EC-HSM", "attributes": {"enabled": true}, "tags": {"purpose": + "unit test", "test name": "CreateECKeyTest"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '116' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault5416109f.vault.azure.net/keys/crud-ec-key/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-ec-key/7e76b0fc24ca49de8d22b283874b4aa8","kty":"EC-HSM","key_ops":["sign","verify"],"crv":"P-256","x":"FDZyxw3F8gSsjKrFwIAxsZ7UFqXykyn9dhPZqUCZ2uw","y":"uwkjuEzOUxSMEh1gm35SysHWS9wrpCUObRu3bzy5eoE"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"purpose":"unit + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-ec-key/3f38336e9de04e7ea3a3ba86094fe0c0","kty":"EC-HSM","key_ops":["sign","verify"],"crv":"P-256","x":"KPH8P9UF3zj4Mb-E16WdJk2yE1v4RYMbbI3eraGUS0Y","y":"wXamLF3U4ekD8lKEixbJ1JNaveo_aWkvD6fllRvCAz8"},"attributes":{"enabled":true,"created":1564527027,"updated":1564527027,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"purpose":"unit test","test name":"CreateECKeyTest"}}' headers: - cache-control: - - no-cache - content-length: - - '435' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '435' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-ec-key/create + - api-version=7.0 + - '' - request: - body: '{"crv": "P-256", "kty": "EC"}' + body: '{"kty": "EC", "crv": "P-256"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '29' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault5416109f.vault.azure.net/keys/crud-P-256-ec-key/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-P-256-ec-key/ccf44a9e1f0a4f65b16196c5115e7580","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"Xp3Dh254KJvTKQEI-SEno4nr47Ste9Q0OozXC1mB3os","y":"jJ2D4Cm41HnPPyqeAtcPGUAOLX7e8B2dzBLz4-HpEiw"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-P-256-ec-key/1085fdf8d174406bb92d1c4dc73559f0","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"29pQuyVmhkbuizq-9M-ngz-H59dPnQ07GpzXpWolEVE","y":"b3owWVWqXekjdSKuf5RnuJqyGAtUQr8J5DxP1CQhG4o"},"attributes":{"enabled":true,"created":1564527027,"updated":1564527027,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '376' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '376' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-P-256-ec-key/create + - api-version=7.0 + - '' - request: - body: '{"key": {"n": "AKCRTQAjSsaDshtMFdW-2Ie9yVnC5Xr1Suc06PAHINd10nXkVSB-N4TO62ClCkZV3XKnqU0nHo7o95WaZpym53W_DiO62umRtFKdl4UotL2QUh0y3SZWeWuoK2u_x2aMj17rUFN0f9GZMZ0pqEQNCPRBLVJ_-TEe2nGCWSC0exxGsRqz6R1zFkB-icfzQPe4WjQELOUXQ7J9RxhAPTTHtDivYYG-BeTRHrmF04JT1_6b9T_C8bAC0i0teT-nmlBLarQtBJKATXBx1yegbPOoiTqlQrFQP4MrKWNxtnB9Tcbjcvj-Z9je0ckI_eRc4DvAhqcUh_p15Dqg4GeaoNIO_jU", - "q": "AMPcZrZBqbc82DO8Q5zTT8ZXRGWrW36KktMllaIk1W2RHnRiQiW0jBWmcCgqUcQNHa1LwumjyNqwx28QBS37BTvG7ULGUoio6LrOeoiBGEMj-U19sX6m37plEhj5Mak7j3OPPY_T9rohjTW5aGGg9YSwq4jdz0RrmBX00ofYOjI3", - "p": "ANHerI1o3dLB_VLVmZZVss8VZSYN5SaeQ_0qhfOSgOFwj__waCFmy2EG7l6l6f_Z-Y0L7Mn_LNov68lyWSFa2EuQUeVj4UoFHc5Di8ZUGiSsTwFM-XMtNuv8HmGgDYLL5BIJD3eTz71LdgW-Ez38OZH34b7VeG8zfeUDb8Hi30zz", - "key_ops": ["encrypt", "decrypt", "sign", "verify", "wrapKey", "unwrapKey"], - "kty": "RSA", "dq": "AKC9TAo9n2RDaggjdLXK8kiLrBVoaWFTpqXkzYXRhtsx4vWPAkxhfSnze05rVMl6HiXv7FnE0f0wYawzUJzoyuXBH0zS6D9BqCZPeF543AmWB27iPf38Q9Z8Rjr6oBgMSnGDV_mm8nDVQkeaDyE4cOZh-5UKvKShTKKQVwunmDNH", - "e": "AQAB", "dp": "AMmhWb5yZcu6vJr8xJZ-t0_likxJRUMZAtEULaWZt2DgODj4y9JrZDJP6mvckzhQP0WXk2NuWbU2HR5pUeCN2wieG1B76VKoH76vfnaJDqT1NuJVBcP2SLHog3ffwZtMME5zjfygchG3kihqOSpwTQ9ETAqAJTkRC38fEhwAz_Cp", + body: '{"key": {"kty": "RSA", "key_ops": ["encrypt", "decrypt", "sign", "verify", + "wrapKey", "unwrapKey"], "n": "AKCRTQAjSsaDshtMFdW-2Ie9yVnC5Xr1Suc06PAHINd10nXkVSB-N4TO62ClCkZV3XKnqU0nHo7o95WaZpym53W_DiO62umRtFKdl4UotL2QUh0y3SZWeWuoK2u_x2aMj17rUFN0f9GZMZ0pqEQNCPRBLVJ_-TEe2nGCWSC0exxGsRqz6R1zFkB-icfzQPe4WjQELOUXQ7J9RxhAPTTHtDivYYG-BeTRHrmF04JT1_6b9T_C8bAC0i0teT-nmlBLarQtBJKATXBx1yegbPOoiTqlQrFQP4MrKWNxtnB9Tcbjcvj-Z9je0ckI_eRc4DvAhqcUh_p15Dqg4GeaoNIO_jU", + "e": "AQAB", "d": "Ynx9JGaBSP4iUsf6ZJ6opantRNdcdmzaQrKbZg6ZQE8Ohi1FYabJWvaoPSE-CiJEsDzShXZHMhUHN4X7Bn8BXaGQhK3p9HXgiwQKmix7oAJTu4ElUIyd8UC3UWHSZr40el4PaQD-HYu_eMzCXus34MnRiNbh_BUWm6T-Eidhk9d3kNIyaSi9YNDQHW6tjWrEhhq63O7JU1j9ZonFChZxpKk20jdkQKQURVAdpOdL-5j4I70ZxFuU6wHZj8DS8oRQfwGOvZKbgYDb5jgf3UNL_7eACqq92XPVX56vm7iKbqeyjCqAIx5y3hrSRIJtZlWCwjYnYQGd4unxDLi8wmJWSQ", + "dp": "AMmhWb5yZcu6vJr8xJZ-t0_likxJRUMZAtEULaWZt2DgODj4y9JrZDJP6mvckzhQP0WXk2NuWbU2HR5pUeCN2wieG1B76VKoH76vfnaJDqT1NuJVBcP2SLHog3ffwZtMME5zjfygchG3kihqOSpwTQ9ETAqAJTkRC38fEhwAz_Cp", + "dq": "AKC9TAo9n2RDaggjdLXK8kiLrBVoaWFTpqXkzYXRhtsx4vWPAkxhfSnze05rVMl6HiXv7FnE0f0wYawzUJzoyuXBH0zS6D9BqCZPeF543AmWB27iPf38Q9Z8Rjr6oBgMSnGDV_mm8nDVQkeaDyE4cOZh-5UKvKShTKKQVwunmDNH", "qi": "AJ_nrkLpK8BPzVeARkvSHQyKwMWZ-a8CD95qsKfn0dOZAvXY-2xhQYTEwbED-0bpTNEKbIpA-ZkaHygmnzJkNbbFAnb9pkkzU8ZQqDP3JNgMfVIroWx58Oth9nJza2j7i-MkPRCUPEq3Ao0J52z7WJIiLji8TTVYW_NaiM1oxzsH", - "d": "Ynx9JGaBSP4iUsf6ZJ6opantRNdcdmzaQrKbZg6ZQE8Ohi1FYabJWvaoPSE-CiJEsDzShXZHMhUHN4X7Bn8BXaGQhK3p9HXgiwQKmix7oAJTu4ElUIyd8UC3UWHSZr40el4PaQD-HYu_eMzCXus34MnRiNbh_BUWm6T-Eidhk9d3kNIyaSi9YNDQHW6tjWrEhhq63O7JU1j9ZonFChZxpKk20jdkQKQURVAdpOdL-5j4I70ZxFuU6wHZj8DS8oRQfwGOvZKbgYDb5jgf3UNL_7eACqq92XPVX56vm7iKbqeyjCqAIx5y3hrSRIJtZlWCwjYnYQGd4unxDLi8wmJWSQ"}}' + "p": "ANHerI1o3dLB_VLVmZZVss8VZSYN5SaeQ_0qhfOSgOFwj__waCFmy2EG7l6l6f_Z-Y0L7Mn_LNov68lyWSFa2EuQUeVj4UoFHc5Di8ZUGiSsTwFM-XMtNuv8HmGgDYLL5BIJD3eTz71LdgW-Ez38OZH34b7VeG8zfeUDb8Hi30zz", + "q": "AMPcZrZBqbc82DO8Q5zTT8ZXRGWrW36KktMllaIk1W2RHnRiQiW0jBWmcCgqUcQNHa1LwumjyNqwx28QBS37BTvG7ULGUoio6LrOeoiBGEMj-U19sX6m37plEhj5Mak7j3OPPY_T9rohjTW5aGGg9YSwq4jdz0RrmBX00ofYOjI3"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '1724' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5416109f.vault.azure.net/keys/import-test-key?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/import-test-key/7123c497acc9445cb23e076358438cbe","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"AKCRTQAjSsaDshtMFdW-2Ie9yVnC5Xr1Suc06PAHINd10nXkVSB-N4TO62ClCkZV3XKnqU0nHo7o95WaZpym53W_DiO62umRtFKdl4UotL2QUh0y3SZWeWuoK2u_x2aMj17rUFN0f9GZMZ0pqEQNCPRBLVJ_-TEe2nGCWSC0exxGsRqz6R1zFkB-icfzQPe4WjQELOUXQ7J9RxhAPTTHtDivYYG-BeTRHrmF04JT1_6b9T_C8bAC0i0teT-nmlBLarQtBJKATXBx1yegbPOoiTqlQrFQP4MrKWNxtnB9Tcbjcvj-Z9je0ckI_eRc4DvAhqcUh_p15Dqg4GeaoNIO_jU","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/import-test-key/42143a5692c24ebb9e9b3a5e951aead6","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"AKCRTQAjSsaDshtMFdW-2Ie9yVnC5Xr1Suc06PAHINd10nXkVSB-N4TO62ClCkZV3XKnqU0nHo7o95WaZpym53W_DiO62umRtFKdl4UotL2QUh0y3SZWeWuoK2u_x2aMj17rUFN0f9GZMZ0pqEQNCPRBLVJ_-TEe2nGCWSC0exxGsRqz6R1zFkB-icfzQPe4WjQELOUXQ7J9RxhAPTTHtDivYYG-BeTRHrmF04JT1_6b9T_C8bAC0i0teT-nmlBLarQtBJKATXBx1yegbPOoiTqlQrFQP4MrKWNxtnB9Tcbjcvj-Z9je0ckI_eRc4DvAhqcUh_p15Dqg4GeaoNIO_jU","e":"AQAB"},"attributes":{"enabled":true,"created":1564527027,"updated":1564527027,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '664' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '664' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/import-test-key + - api-version=7.0 + - '' - request: - body: '{"tags": {"test name ": "CreateRSAKeyTest", "purpose": "unit test"}, "key_ops": - ["encrypt", "decrypt", "sign", "verify", "wrapKey", "unwrapKey"], "kty": "RSA", - "key_size": 2048}' + body: '{"kty": "RSA", "key_size": 2048, "key_ops": ["encrypt", "decrypt", "sign", + "verify", "wrapKey", "unwrapKey"], "tags": {"purpose": "unit test", "test name + ": "CreateRSAKeyTest"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '177' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"test - name ":"CreateRSAKeyTest","purpose":"unit test"}}' - headers: - cache-control: - - no-cache - content-length: - - '723' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527028,"updated":1564527028,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"purpose":"unit + test","test name ":"CreateRSAKeyTest"}}' + headers: + cache-control: no-cache + content-length: '723' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-rsa-key/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123?api-version=7.0 + uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"test - name ":"CreateRSAKeyTest","purpose":"unit test"}}' - headers: - cache-control: - - no-cache - content-length: - - '723' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527028,"updated":1564527028,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"purpose":"unit + test","test name ":"CreateRSAKeyTest"}}' + headers: + cache-control: no-cache + content-length: '723' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"test - name ":"CreateRSAKeyTest","purpose":"unit test"}}' - headers: - cache-control: - - no-cache - content-length: - - '723' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527028,"updated":1564527028,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"purpose":"unit + test","test name ":"CreateRSAKeyTest"}}' + headers: + cache-control: no-cache + content-length: '723' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-rsa-key/ + - api-version=7.0 + - '' - request: body: '{"attributes": {"exp": 2524723200}, "tags": {"foo": "updated tag"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '67' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PATCH uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703473,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527028,"updated":1564527029,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '706' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '706' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-rsa-key/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703473,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1564527029,"scheduledPurgeDate":1572303029,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527028,"updated":1564527029,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '841' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '841' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-rsa-key + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: crud-rsa-key"}}' headers: - cache-control: - - no-cache - content-length: - - '80' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '80' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: crud-rsa-key"}}' + headers: + cache-control: no-cache + content-length: '80' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:32 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703473,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: crud-rsa-key"}}' + headers: + cache-control: no-cache + content-length: '80' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:35 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: crud-rsa-key"}}' + headers: + cache-control: no-cache + content-length: '80' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:38 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: crud-rsa-key"}}' + headers: + cache-control: no-cache + content-length: '80' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 + response: + body: + string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1564527029,"scheduledPurgeDate":1572303029,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527028,"updated":1564527029,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '841' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:57 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '841' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703473,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1564527029,"scheduledPurgeDate":1572303029,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527028,"updated":1564527029,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '841' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:57 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '841' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_list.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_list.yaml index 51c87bd8cbb5..b32c1b43787b 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_list.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_list.yaml @@ -4,464 +4,374 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key0/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:51:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key0/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key0/c3878937d48c43329f222ec5d2b76c1e","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lJIfl9xtZMQVY21_qGFK5QXeCbwhavw_7CUAht9SAK_gIEG4AI4NIOeOi3dS0QdJTYfPUrcpySR7Bk3T87AqqBh-CKkWKIZ3nhYL6PAyycCddK4M4NWaQcwrjhi14AXZJi1qmokZIs92yvrXWy9oUh2QjatpCkL1EWtZph7UGHhWda4qU48-rL-e8BwN1LglFlR-fFTc6N_tfQHgdN0hQaM4YELOx9le2unTtPuR5acj_JTGBZwvttERTF5PBupYd3h3VbfTTecXG1EPsUelLHMRc1EaAw0q5vjwdbaLwDXfyvFEypkn8iEH_5CdYSFV0oPtwEpGi7yF4WThT6U4DQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703472,"updated":1562703472,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key0/f69e28d9f4324473b5bd0975bef0b17f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r5KgC3SObkSXF1aWoNtdHkM9ht3YC6Hte6-DtL8A7B0XnOJWBt6GThkjd9rmrYcLE0MXjs-oskYY0Iir6cyQapZ3HEOi_zlOU09e7dk1piADk838EImb46UZxbnDtoCRlMX87JMRWFmEqKvUvkLjEf64IvN7QAleRJdwFx79CJ_qRhZbvVTd7ZD8vt5PFTccwDb_wM4TQdPnanEGHQZFFmB75faNZefnNRbROMwgUkFHSJu4Ono8nW-LsmLZlQKEZO5JiI69wA8VjgsLQXi1ION_ujDuFp5ojMG7YlD8G_njTGjHvdmhIqZmJSumNlGEPB1k4B2O281-l-hBK6A3wQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527109,"updated":1564527109,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key1/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key1/b023d80926a5491abbdd63338ffc168b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tXG3Izs9RyCg-553a9N_Yz4N3H0AQEftAK4HNfmAM1JeEEci-F2ByaSeTs4R3jQYuQpJE1iY2YcQUop_ojFfy11CwUZnBR-wWYLj634VxuARoTDEFJTsWBACToK_D9IAsyphscqcmz3vBAnCkpnqd-Yc0UxBpLOBbv-RZfH-uuSm5xX33bU68h5ry1YDoxDK_3GEZg39SxjQu7j6T9nZmnfT1do_Ccny8TBAsViJJZga5SsjPAOwjSSw2-4ZIz2bvu65gWdck17IBulXTdatjpvdOOYoXudAHR3ZduDDkns6Id2gXuy4CHqwGCgKXpVaWd6C50w01JjGAFXuAS-TWw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key1/7abf970d281f4eb98e3f870688da9f89","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tkecVG8HJoW1QSh1DkZPm2op8q6Cvc6-0CpQjaobDBeJNSwbj_c-9Z8mEmIrGH-Inq89iSKvVXcvCOP7uiIkjOKFFzFpHc9ItdQqImNmDyLFlp8UBRyR8VTMxYiCq04i80www8Js1ALsp9Nup-2uVCrq-9z2pWUV8-QQO-1bgQJeUYkWHOsdv1uMkPBfLNNkFTSlSiAtHipNh2NtYi_OnkOofvrDFF4gX5ULllA4v17mZQspfeDU4llIJmEZNvTQXPLwQixX4hjBwXdH-7yGrEGPA_ZXPBl9ljkz0VjwJLZ294HEcLFfBcB66ePZ6rtRiMFZ345dGZKs4W38IMap8w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527109,"updated":1564527109,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key1/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key2/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key2/37574dac891145798031bdc16ae59c2c","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sG0yoon1QqM_RKNd0MAN2qmvjwSXCQ581sbogwBCNGcxX6CH2oRubUqVeQr4Nm__NGmjD4mikbKkkpxzaf9rd0-YCRpKRUL0ATCuhfIj8u0acP7uUPBrJXyqSsOUze0jvRCCCV9s3_QtqsLIxbID9uZuIu8xcJ5zkdYhtVWd2U9_601XWlboeWhWiTIMggsf5wj9PnTVYgM1tN4TY0AuFYjgb6FJD9MbJ92Y5bCDRH4Lpxze3bgskArHjOfZTVUjPd5_sCyi2a48Ky8u5N2uqEgv8OaNLML3JAeoSz07k7mg3hLnlDdldIgR0vdJPeW8MiwN1WkC2w35eRu4JGHXsQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key2/dcab406fd2b14132b97afa7241f0cdcd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"pnYNev0ZqxpCrih-DOzgA0RRXfCPF4fS2DmFWitUvpYR8PmqEzg23NSkh5lsFtQDj0zIcE_hrbrf91ZXbXTi10bBjO7SystNXHplIiQOXKYPx5J7od8ADLLZwJMGCY-FLc2zGUHAWHRJlB0oYSKOxXREwziT0qOyIhubwUXR2hDOxE4GuAeQCMgaU_HyHG42RVWoWis2Wgg26miJTzdfs9LLzrqbsvUfFSG5skFq5SltyHyzeLVzBjIvxKoMt-R_8RacsbUXc85sJfMBym4V4FRH7xkgQMc_3_TmRvBbO7fS-QzD6V7Mfdv8bv1y4398LYVHQMtdomjJrylohwUlpw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key2/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key3/90b5aac48baa474f9c13e295e3d593fe","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"y2AJUotY9EXCjtEq815wHGDerpkwIFgMRW-5vpt8RIhScsPc7-GK4Cog62_JwtRSduqJtEw3NWL6icZ8i-5HmRTfN-uDr7xt0iVs3sDVArc-osPBan07LTgiMPMyw_qlmwvzrdkl2LmSvipNZymHGcg-kUh7_7ZQS_ZxCAUNu9eA1zmjENAux3svJLl1ISXoVk9OwRXYeU7WdN82s8_GbkeAG6js-mazlO99z7iAM2eLKWV6rGqZgouBMfr3POBPhg895vgHDpCIX_1QQzGVwJld2mzuC81_dSDc6eTbQKEgf0Sr1-P8ywXo23DR76fYC7pzILh-LuFLnf-NbnmBpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key3/ff3f5ac04b114bcb8d398abd238d900d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"uefbUngKT-RjMND2guq1DLRxUHBjJYNnWdYWd58Y6xodyu2aup8wQysPurgdYMQiNQI58JPo-7dlVgAi__63cZ357df1SzQOGx2erne-RJ5MzmxnB3W-Dg5d_w8Fv7wwbnkoZx8QUi54geI1Gp0o9qratTjNLjnbEFBNZ74E9NiMT63Ps_KU4-2l5HAQPXoXpehFfY4buvsVLNBIno_kBqrqAh1tSPTE7OT-uidwtxdFZAxtL_abz5XSR0sLwRmdrmDvqlaGWTniAWUD_l3imisOYj1I3bhshCwKlge3BJ6m706fgP7LGrTmtIZBJYBBNBsG9BrAskWyBYFDwCLzCw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key4/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key4/897d30c8c9a64c5baf42ddc28cc323a2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"nBnwU-Tc_DQd5xt8pxaNa1jJytxCM6nXf0TLMG-K7fURjW8FuYpaUdLEkK8PXGzxrUdJVgR-9tRLjbDgYdqxa0RG4-jHy6Rwbm3XO7gUUoQrQzlDot7HBEvrjldOKfu-evN510V-ZrH1ABJ717cm2CPtmhyW7WQ_jGxmvFq-sWwhWOUfC6UpV7AnYyBkq_fAn9vnbPRH7dXoMf1G5lCtJ5uoAlt8ys9Vr6Bq1tkf3U2JW9-SnWwfb51dZjbRkKCVuqIVm90Ik7qnUoV-r32Ehdo1t-VbKpiTfyOdhxclV8fbgCQ2NO0P1oWoC6wDEs8ut_JaX-1V6NuiocpvmSt4Tw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key4/1783678540a949af87bb325dc25ca8a7","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"td-f0a_KPz3Koohs9dhl2kZuH9ZJa9xXhZrugBZBsOrTb6TbJuP1YcPSaKpseA_edeR-jT0gdm503PcKMskF5KQCtr5v90zOnpYWafJ_8Q16m7h9DjfChFkDxxIVvi68YMYwT-R0eL2Cr-9j5rotjqPp2wPBRFQ8hcH2FY4aJMvZ5CqTCI9Ci_S0DB26G2IbianCAYhn7_KHvZCnOFaP42UpqS5DDMnq1KJtIjImuAhOsmHtm6RvjUR9MPD4B9LxydnP0lzBhkzPXo9vnR8NeJjhGgALFyDB-09w7XzcroPDtq1--SmUpF9GqiXBoJnOa7TlQnCc7dphqGCTnPJtqQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key4/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key5/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key5/689d4f8f09004d8aab516b94aca67d00","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"67VK0tZg5Ui7KAtcdVy4I4Y-IHca4jl966D8DWcj8ZEovCAGIWlQvFSlVRvFeEqrmoVD3zSeO5yXOQwKRzDI3rrKmc2a4b_so2cuCqxtP6OuMbiCzTS5vV57UpkqIDuN1IuyKjFnS9T_ZLAQE9y_4SLRXM9vUzzC0tCaOR924WJ-mEIfKtUlab6IytrcUHLdJi5kkO-882I-HptJfjzoyGAvHTmJIDuQWgMuMAkQP1-5ZG8V3pEinuj8FtLKcfmI8RGixEEAvTxO5FAre1aEeta2EdbsdIVTi85xXOcPu5LrWdo0URY400ytWN5yQvSDsCOEqO5Apdhk5elgl6trTw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key5/4ff953ee148d4cd8816f3dfbcade0691","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1ApBVUvnMDvdH_yGJfdTzMZmtwLm2k7tg_2IVywj5ZvxxTiZ5aTTCiwuVXjXzqMdGAcj3hmrAC7m0kr8gLSAXye5Tq-5oofu-48jZ91SzY9bWfi5Ss1NpaWTJ0RIe7bEvcjdYQprz1A5FIr_B7IaHYdhbkXz3qzf96gLq8elRBeSDev1NC4bFz0CkWKOeXZF3vTOsHo38q9Ne9XZMW_hEb0ln4ZCADsVV20pLZ4IZmsRIUuwwEaSAkaPzpJYOsGc3Oh_qRXr-hMRkdZv7dPYsZ1LfdeuIb9slHgBEza5OBb9NGOhNFMfk3Kyiez4rHdlk3JF7fPIvkt9St-7lnHJbQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527111,"updated":1564527111,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key5/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key6/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key6/a1f7acfaafc34a6495a429c6aed2eadf","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"l0gxdJyCn-voQuNg_2bqrlOXgnQStVxXHDYdvBdOlZpoq2BzzvvC73MoPcldBuI5ySRiF8B1nx82yXQKnEabXpXWvvl70Ye36l7YrDrg_Dhq38MU4Uv7i_rdqdBQPG4tr6cBz0BWR5yHqGy4LL7dcWhLtyUH3-wbC74zj2KqjCGIx3AfadEwkR8HIjCGmLhbtaUbCEU5PoHrIfLOFt1u4Ah2NripLqv54n75PeJSXaRffSzQJOU6qC4eOnHcEbP85w9SsnSlOZp4gvjqN9JvwWaoy7E20anft6zt7tjFLG_inkASqUU8QcrN9SwBkV_saE4WAWcd31-6dBpeGY9Jww","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key6/3863898fb4ea4c8ca57c47785d614ba5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"x3Hyl5Sqttjt1gg_OK1g1ghjqGiDUrUpKkq5k7hiBs9KkYK5sSvKQCalGHWStOE2YUB5tt056_PYbXIG3KO_z58BNXy3yneEiqZxAWyPKDyvQcuyPj_zqXdDDMVuBe1mrIXTU5kgyQ3JgWB69PE6ALtAY6BnFz5vx97yLdgnebHzv486Ti23VdusiDagnLkY8_chGtcZZ-9VE8OSOrNH1zk46wxDP7gERk2O64nT_EKViMBn9vWTJs093v7SIrWrJKUXL8RGMPW5jJ1uCgdBDOPz5pWz1Wl6VLcqHfUsVjgKrU9QffxugIMeFpx9vSFUOVeKiI__iRHUTE0Y_T35Ow","e":"AQAB"},"attributes":{"enabled":true,"created":1564527111,"updated":1564527111,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key6/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb4dd0c0a.vault.azure.net/keys?api-version=7.0&maxresults=7 + uri: https://vaultb4dd0c0a.vault.azure.net/keys?maxresults=7&api-version=7.0 response: body: - string: '{"value":[{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key0","attributes":{"enabled":true,"created":1562703472,"updated":1562703472,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key1","attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key2","attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key3","attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key4","attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key5","attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key6","attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}],"nextLink":null}' + string: '{"value":[{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key0","attributes":{"enabled":true,"created":1564527109,"updated":1564527109,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key1","attributes":{"enabled":true,"created":1564527109,"updated":1564527109,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key2","attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key3","attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key4","attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key5","attributes":{"enabled":true,"created":1564527111,"updated":1564527111,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key6","attributes":{"enabled":true,"created":1564527111,"updated":1564527111,"recoveryLevel":"Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '1133' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '1133' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:51 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys + - maxresults=7&api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_wrap_and_unwrap.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_wrap_and_unwrap.yaml index f4b7259e3499..d8b5e54d09b3 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_wrap_and_unwrap.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_wrap_and_unwrap.yaml @@ -4,312 +4,252 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"ny6wNPsxof_QVouEvyn1dKEiKG8hArgSRJzUhtQKuA9A5Nij2CxUdqgezqmm4CAqyj9sBuQqIHI_BO1RKq7Jea1BzfbWmce40hhPqa1RLDG8Kb_LrYRz3GavBXCl9QR_lzn5DQYawzLCQFKvt4lXOJVhSOAiGmAayV2axTNxCM---8pwfztqf6g4dc7cUEIiLc0ZtnzcqwmgBuLu2ysrEkVRvhRY517fp5M17OLQDmIx75f9y2Nc8t_w4ZsWhIZKiUJBDfNKcBxN08Nljnowhc2CwemQ5aZLQCPZiibsOMVIi9FufjBOTBxnD2MSoaGrIuEDrLv1Y1UEK1wHE_MFuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"kUy_5eJ-0LXYETECBi2NIkf184IoLXhY30v3XFmJYSyy4roFaUr-0CQNtZ-Rztee5M1LNJpROZ4uSZjSZgabLj-IGpO27NLc8_jw1tR956bLlphc2D4jPPq9AXEDotXGAjAop8FXUCyDYmAStaEu0VZWK66S9N1mFTRG46aiy4F4sj_68ZeMQDlbzrR6aH7zq-1FEuSiQGAVMkMGS4CCoXAWm68WexBui0_CgJbcd5z-050qEBkGVvWXYkAA_uko9hsQNNCCh7-pGW4hwavS-T8s2g95UOiYlDSJwzLUqSfw_mNWjr490gtP76OaHyT3DB5JGGeHFWLsGdJhW10rvQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527149,"updated":1564527149,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096/create + - api-version=7.0 + - '' - request: body: '{"alg": "RSA-OAEP", "value": "NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '299' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/wrapkey?api-version=7.0 response: body: - string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db","value":"IQvJgnnmWgtVoYpCoo_iIDfVfgYpJSe6IA-XUdpXgkQYwjzvvtQANNJtDQY3jhbWiMV71oy6uVFmDD9ey5erJrEJHpKMEivQ0FZ6H566SFd8srhiV_x3trpoFxvXgOe6osF7YCzS-DMP7GHYVRRIDf-VldIbldpS-OL7jn6ZW3SSdmKrTfHEpOyXK_78c91VVpDbf0j8QCaj_bzNWs1Xtpgxut1f0V-Yof2fX2nh7DGauR0Vk1ryopjyciU3YAozxT7CSTPalCr-EPqY48RvCCEIMf1htLaTq20mCUHVinVOSpE-cEzF2WUdmMzZXa6zvb1Ls59lO8ZhKHUSFSuVjg"}' + string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b","value":"RC2-jG4FsccE0rV8izEDzvoxLovaDxdMek6YJHMW3MOvTy3LSm9FihBTo-XLZz4pdS7XZ7VvHVNpEbcKXRuSeCyViVt6Umv_7XOx9TkMUmmhFxgsBcPY52K4r_4W6LyYWpG6y3yN07Mj9u8HHWuf-2H-SOPykAEFd6xWteMFtGSU-RKLXHI0Xb-YdixlxUU4twfcp3uDuRMgs0NT3d4VZVi8o44YCPtMiVG1NplWKepWkTb4l_rphclayQ062Ln5o-1fWAIUhnyfYY4HzHdFh75ELkkQGi8ZeI6-rL6o-WtQrsSAyBLpS3ioytuaPazyTHeAMN69YVUJz01cc9IETg"}' headers: - cache-control: - - no-cache - content-length: - - '454' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '454' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096//wrapkey + - api-version=7.0 + - '' - request: - body: '{"alg": "RSA-OAEP", "value": "IQvJgnnmWgtVoYpCoo_iIDfVfgYpJSe6IA-XUdpXgkQYwjzvvtQANNJtDQY3jhbWiMV71oy6uVFmDD9ey5erJrEJHpKMEivQ0FZ6H566SFd8srhiV_x3trpoFxvXgOe6osF7YCzS-DMP7GHYVRRIDf-VldIbldpS-OL7jn6ZW3SSdmKrTfHEpOyXK_78c91VVpDbf0j8QCaj_bzNWs1Xtpgxut1f0V-Yof2fX2nh7DGauR0Vk1ryopjyciU3YAozxT7CSTPalCr-EPqY48RvCCEIMf1htLaTq20mCUHVinVOSpE-cEzF2WUdmMzZXa6zvb1Ls59lO8ZhKHUSFSuVjg"}' + body: '{"alg": "RSA-OAEP", "value": "RC2-jG4FsccE0rV8izEDzvoxLovaDxdMek6YJHMW3MOvTy3LSm9FihBTo-XLZz4pdS7XZ7VvHVNpEbcKXRuSeCyViVt6Umv_7XOx9TkMUmmhFxgsBcPY52K4r_4W6LyYWpG6y3yN07Mj9u8HHWuf-2H-SOPykAEFd6xWteMFtGSU-RKLXHI0Xb-YdixlxUU4twfcp3uDuRMgs0NT3d4VZVi8o44YCPtMiVG1NplWKepWkTb4l_rphclayQ062Ln5o-1fWAIUhnyfYY4HzHdFh75ELkkQGi8ZeI6-rL6o-WtQrsSAyBLpS3ioytuaPazyTHeAMN69YVUJz01cc9IETg"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '374' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/unwrapkey?api-version=7.0 response: body: - string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db","value":"NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' + string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b","value":"NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' headers: - cache-control: - - no-cache - content-length: - - '379' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '379' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096//unwrapkey + - api-version=7.0 + - '' - request: body: '{"alg": "RSA-OAEP", "value": "NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '299' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db/wrapkey?api-version=7.0 + uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b/wrapkey?api-version=7.0 response: body: - string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db","value":"Vxzu0xm5GG276Yj9qMpc_EBbTPPlv0wuH43zSp75370UohLnX-QimTYjncIpJtcFaXDmJb2_USJUbt5GBHaBpy8MAdQWwskj4eUWLtK3b53CO3lg8aoFETRbNQqAoTp3tqihmMFhNTxTXcm5bU7e3s0VdzQ8U8_J6vAmipB6IGe-T7xDWO288DoZbubPlSylnuUu5rdfZSpzoQ-UxD77uyqpS7ll0_SpOJ8DrcrsesaCDkVDuzcCDQ5lfvh7ptdJf68faiSGIJQ_0LW7jUwv4aJzN5xf9TD27WEg9XCe6grH5x6GA38E8Yc5CsCbMlAjD_dTUyjOAFqaYUV5QdMJvw"}' + string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b","value":"X768DS_JoGXi8mHl_PTmWnjSOkA5qvrlDQzvebrWTCBgHQiMuRXsyFqpS3urvodJcpatIjfqbGPaG-50d5J-BlUtvevA8a5vFVNjrmjqN1jR4PHvIEnA3Y4m940Mq0Z4-ESgCIMw12trkZfN3U0j3X9HggJNJkolepRCcF7wnn0CoK7Yqt3rMSR6aMg-gMJINApJ22jhlRz8omsI--bJEXjObz-cR041NMY8bxIm_R5s6Hxi9XId-jAMpedmuQchhliOSlIqbs0jidn-5wUCpCTKOao5lVXVN2kqmsvICWxLj15HwcRuCoi_2ciMRjcCnhrqHcQEUH-L-jKrkoI79w"}' headers: - cache-control: - - no-cache - content-length: - - '454' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '454' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b/wrapkey + - api-version=7.0 + - '' - request: - body: '{"alg": "RSA-OAEP", "value": "Vxzu0xm5GG276Yj9qMpc_EBbTPPlv0wuH43zSp75370UohLnX-QimTYjncIpJtcFaXDmJb2_USJUbt5GBHaBpy8MAdQWwskj4eUWLtK3b53CO3lg8aoFETRbNQqAoTp3tqihmMFhNTxTXcm5bU7e3s0VdzQ8U8_J6vAmipB6IGe-T7xDWO288DoZbubPlSylnuUu5rdfZSpzoQ-UxD77uyqpS7ll0_SpOJ8DrcrsesaCDkVDuzcCDQ5lfvh7ptdJf68faiSGIJQ_0LW7jUwv4aJzN5xf9TD27WEg9XCe6grH5x6GA38E8Yc5CsCbMlAjD_dTUyjOAFqaYUV5QdMJvw"}' + body: '{"alg": "RSA-OAEP", "value": "X768DS_JoGXi8mHl_PTmWnjSOkA5qvrlDQzvebrWTCBgHQiMuRXsyFqpS3urvodJcpatIjfqbGPaG-50d5J-BlUtvevA8a5vFVNjrmjqN1jR4PHvIEnA3Y4m940Mq0Z4-ESgCIMw12trkZfN3U0j3X9HggJNJkolepRCcF7wnn0CoK7Yqt3rMSR6aMg-gMJINApJ22jhlRz8omsI--bJEXjObz-cR041NMY8bxIm_R5s6Hxi9XId-jAMpedmuQchhliOSlIqbs0jidn-5wUCpCTKOao5lVXVN2kqmsvICWxLj15HwcRuCoi_2ciMRjcCnhrqHcQEUH-L-jKrkoI79w"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '374' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db/unwrapkey?api-version=7.0 + uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b/unwrapkey?api-version=7.0 response: body: - string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db","value":"NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' + string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b","value":"NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' headers: - cache-control: - - no-cache - content-length: - - '379' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '379' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b/unwrapkey + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_deleted_keys.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_deleted_keys.yaml index 235cb77d07bd..c59b3ce7c6e0 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_deleted_keys.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_deleted_keys.yaml @@ -4,706 +4,678 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:53:13 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/a724cd7584454a3cbe29f3a05d7eef10","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"nC7idSUXK32dkqtn8M-4UB3JoMvCGygFa1TlYH0nQQUvYGn7aNp5t1vtJFqq2Jlafl5pZhdHTumt-R-Plewno2zO3iyjza1MOTdeK8FJEHPpK7I7FNH01KdYnU5Q0xY95L8tbXUcQAYW7ankxMIeKxqrokt7flCGUQeXDwOalJIyQyFvdUe4buytdGHTMFV7lgHIQx4mvekZi3yzuWgyDiuohRd8Krb0lo6suUYOIetzbcXMWqrSRmQdEO_vvptApgSOwxPrqx7OkcNsrcgJkrXQzd6xjgho57GQ6u_TxmGB7uW3LBTKnwqgWOfmELKVCH5laRfjmZk2S-Fwc1tXyQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/f96ace71d4b941eca3ae0490e503d288","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"28DloB07w40yR2-_MHpdg-prfQ_xseRn-d10ZMoZg5jZaU1prixa2ZCWOtLXPVMsFU-fNOb4QtZJ3fJbJTVU-h-tPzKsixRwVljpiAwLw2wlRExZWUbQETs6Rd8B4q_GKJZpiHzO2-NLk61PJJyLoQ1iKA0SOIAtZMROAHx5CHuEc6wsuIsGEDpwdjncXH6-REvllgkOQ_SpfeiERvMlaAoFPceg4bi6SVE47xDGl0J1yEAaXiCba49o_jhO4SQ2fh2nYR-2sN5ZlgYFFVyPfp1PyvzL-NQLNp5KXwuQQY0-GNsXz-PWZMGstAqSRWjR76vWx5-lB0ohA7JwM_VCuw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527194,"updated":1564527194,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:14 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/4c4f6f8faf7b48a7bef7972fb705379d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"k8Ow-6LTG9ELTNRnQC3MqQncYGqmUY-6EgNnX1Ed5Q_SM8hJUl7dBtb8gVn0qc3KFy6Q32gBgveziuCaEaMK_wN48RCLmRLCuFsXmnHsHDdxMzEv2YL_dV0RrpcW0O0m-bgAt6z5aOOY4Pwa5EOBTyqNS5H56Rp9mm7MQijt1mcWRwOUHIRteZWpjQ2DPoSu20bufIldM97wdC7dZd38q5NFDY9W7TCNLTD__MEl-ySmkVRIEPaMpcObNtRPiB6kadylcgBsoAAR871Wzb1tdRiQkpyEko5of_9iAdZEbUY0XiG_zJpdFxfvy9rds3fXfXhSppolt-CC20IHfyjEqQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/dca838942cc249aba2f9d052ee4d9bd0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2azn8ADVPwbppZCfxsCvr_XKqCeA49ZRxxyuIUC-_Cue-13fIKGkHqFqbJVdJuPftJxsh1MmrUVcfUGMPsTFdUBCVfpuiFXEXSe9exEudUAZNmBYb3HiCbbu3ThWw2Z5-OioKDwf-qKA_H_vooI9YP-yYEDhJcfvjsiyxzBNGoLBld6yiPi3PhCw9kqvEHUYnS-XPgTqhJChf7g4oYRT-XMVPhR8nkbQ-NQ_IQjjZzxkhkpltWfEYX_KL0-Uy4x3kz2ykPtQXRpeZuaD2PpuRXIt5ssqTC4segtWiyzCKhp4H9A8pVbJKd_9fnSArsfNQXY0e5bJac6ZhJJd_ES2XQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:14 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/5c71fbc7997e4fe2b2aff141a6886d11","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"nPBVYE_5WfYi6r0Z_rnhhYuBQe_qy67NeGm6dAJCSFT_4Mc2iitb5cJmEJO_0cUxMaiSWatpHzGYTzQ_c51yKjpW0CNX08FZi4ZO0JsZVUnUUL8gYjEK9VNNaeSJPvrNMHPsp-ee1TieBpdB-emZanoRtKVlotJ35-B5KYcs2BIv6KG81LI_F-ZFleqBAlR0u6ty1cggkEgz7OsKjIePcfG0wIdttqyzlKoYOVPTx6wWfHHZDcseTPWpikGUaSTi8GWL9HJ_BugI16JEW9WIALoWOlflQ7884UoH2S7WZ0wQ97MT0NbwdkwgcowiKzD6li0euweojvu2D8WYk1M-VQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/f50f900706a24363be08c408cd3d8908","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"oMEeM4hmofM8AW7C67c_Jubcu1t9yh3uDLGSQP8cowwyKh3IVtLgyruzGwLoXF8B9gJZaj39iaKhMdPzc8metT1746Ub3vFiIGGXDBJ_R8EXPxSjSFvOn43QwRBQhEmfsqqnjIqHvj-e_IXyLtUMFj8HteNPbfpzAdlKsXAZhNd1l9INIekQZKfuOLRdB2SIMC6saG_gkQcL5y80lDozJCOQEhHfRdvVg5H1HDa994SPwGZqygKS-JTwYvNDyjFR2HMpAYK1d-2PHCLAMD-n-b_FRcg8EPU6g8DtEBqWpXSlFmTmBDA9hs9bVUZgbPMOIg0edSHPj4n4oxcupmsw9Q","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:14 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/ae0bb0500b5a4899873962cedbd62ef3","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1XLrHrA2xR35sNHz7Bl23TuCTwcdOO8aY891NJLUnxQUvPxj90vLf9iQA7Kd_J9-XxU3ImXY-qp0kOb7qJPeRI2MydpRxbpipmmU1aMjDhHReaY-4eiEt1Wq4H1i73qE62VnQMY04pSkweNqcG5GANlpuBKqmaFvi6uLeK0b38ioK5leJsZ-bQyVveNa23hxZ7bAt3WlMe1-eoh0S5yITRFIlq3GDieFC546e2oL0H-TJOPsdZ6aUiF9Ff2D9mMtw1V44ulaZHs9wyQXPPcukY495_yBPq7W6NvEq4C7FJgYroBRNw1wg7y_iFQ8cvf3vTfK2m8ofwtoaeePWC75lw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/7b75b1c578a94a1a814f889d2edfa79e","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vm4vIl0Qd7O-kBaGB5xZUi-1s6PjVoiOOrA1vJC3jCYDb2YB-xO5Okibq_rrmeqKCGqA1BvjAYU5koHNuI81HwYLVnSuaH05xxX4h2_tDpupmHNMyvaixEAFldoS_rY6LXu0sjU-NiTxug8qesZSk2D6Y8dtblv87MxPbz11Asc-IjhseHzkn6U8HfPx4Z0IVRtKtC83Qa_fE5PvFXE-vgzDCKbJcpQKvk_ykByxZGyYn9etCJntKuPCob1w5MnFoWbIAvLmkd_xXr1c75jhRT1Wio6eKPUYk3oj13kn0Wci5t_MYz7PeAUVlLXgx38hxU6rlkAKI5_c_mEaLF4mpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/22e7a0ac26f541309d942aae55f56069","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"i3dwC_iG7Pnosa0C-7DGNoZ1mnH-wWPwXdYDPUr0Tl4ZQna3klAnLRO-yVO4zeB3t3kgVmQ3nYSw-M4HYM4FA-_BcbddPqcelUSWgD5LMH4SKW0sQyKPfeUWqgQQq1Q2K4LO55nLjPzu87FOdGT-fJ1hNCqCOWb6WMio6fIAA7Aw91ZfgDt1_icif_c7OzIyskD657ryxPn45P2t3z-XRUmYVg2Xt4WLSlqc-jScZtGYGNwq82E-t2IviQplaBvLB4sNtCRYzqu5NChFYUXEhZal87Q0kWTq6xZa9D-82OmwCk9WnHCia_XDf8zPNcQQsvMisoD-bDbipGZIHjLrPw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/57fccb90503944cf8c8cb4f5ff94cf96","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1FfP070rHhDf3XumOs1t9fiXrXnYxt4mj1JQaz73YveKVuUGZ8MhY05So7SZlTnCaYGjY0p_pyMJK5hMRQX_gSUXFdKsB3HJZdxcEEnsgkXoLHI4tpGfGjznjj-Ky0G4rV6hQjlsIf6n4nxRCiPG4CjJw7nWlBJn4eDw1HSwEFtKcMHIW0p79rrHhuHGMYRbGWAMYgVTkGypsH45e6PyVXE5ueEERzJKA0f4S9LioIsp5LEleThm_E4CE9azlnYvl2WbKeensPKnYVlw_30gIDGsd719UJizsYxyn0Z6q-6ki7Ws4RWrWmZRaZii1c3CdhIpT8h504_DB-4DECqKSw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/39f5c626c2234116b55e89a302e37cd0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tIN4UcaySsLj1sY6wvLbFT2WCKGqf-VtnzBfNcnTNqGe0dZbX8fE4LJmPF7--uy3zN3zucHJS9TptQJuyHUI8Opb9dTnA_O7BpECmCLxdpEucmhdpX_Jn4rSZ_B2Gd6ssBO03QjwqUEiNWiIdeASyx7sCy1AazekV6jPIyiAiZH9aW9KtPp0x-hHCEnoiCTo_vsX7L0q6ZIxA1ro6pLEt6HhTFRQN3MpFU-rMMHgyqDhbgquOUzTmWaUMtMJhRvH2Fyfyd07Q3BnguhZMulT7uOWGbF3uorMcVq-TMxi3XA97ri3BQzAgDwfXxLpWxWu3cstSJwsdjs6hp-QkIFAMQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/e8ff437f48034bc08401754943403333","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"iW4vfWb9owDVk2P5GGu4qfMbIrRhcQUenHS6BRkAQPhqrDQ-8FuHO27r-fliHlm7bGNRlBgD7dMtPBrsAPdGHS21MX4T5Yo8YjQvYwGkqiMHlDeGiWqrEKZhj7yOWvqJXtCJkgCYLoswMgy6nIz3Ptj3yKhQ6nzb4djeVgNnaatxgas-QUbhLobplHq94AoxlJDqIBvBqLv2C4AR9XqtxS0mOFu_BM4eCNq_-ALK3hMpdYGfxpoDCRiWAsC8s1iHsv5DjeKF44Gmoexw7A081shyar5HW067ttOyMz_iI3lj9Dxo8n2g5o8HSQgz7ysPDR_QcxEY-rxsUhDdxwFUqw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/38ddd3f6f70d422a8aad4175d9d01acd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"rPb0on1WhFWeJd5-woJsOTbLA9Y_lFO9Mw0NtXGQ0gzwkpcvm8pSNDrudla-Dw_jKu_Yh35fL3AnsVzvttcsyNu4BrJ5lG_Nd2ApgAOtT2NqRgScCkCXheeKPtxeht7ambqKcbk7C6NBDa81zd1jqVnVojucsVAY1jkYKjw8r3WQQ53zAt2oMO4XCkEi-jQgIL4QwfY_eBfWiMZDzcYz8u8BlC07QLBHkT200YfIVDSjoKLf4pOx1hCWvzA27ndkemgt0thlL84EjLp5PE0chNtZCuLK2ojKkcSU21kZ3GV7NptS_IwyjkEvO3j9YKshOXzwFzIeMsyHMnQ5BsyRCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/2fa84ef9423a4cb5b286ca7bf77cfd02","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qInaUwEM6ZQAcb_Hk5d5rUP-DannLP_iAToOZeoUFgDi_dQBjwL5z0KMO2OBXUPgTh1ms_ePW0fvjRD7xyS-ZQ1aftrIX3pK_1OdnOpO5dDgFDOAEW9LCTz31RCCyMS9FMkjjbQ1iwX1ydEpM8eCw5_MrXhGL5FrPuorIq_GHpTbyV-ars_u1oJfdsUHOaD7riBizEk4sGld58EBoOHiH3HRojQ86E7WoXMUnX5KBX6CLggP9_SlVg2nnLPjDKWPddTPPpBmelCy9VF5g7T7UV3BtMymC-2XFZuPHOq8VjAjzZOn2Ant3IWotwRnokM1axlRqKa9rNGdEJvit6JB2w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1562703474,"scheduledPurgeDate":1570479474,"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/38ddd3f6f70d422a8aad4175d9d01acd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"rPb0on1WhFWeJd5-woJsOTbLA9Y_lFO9Mw0NtXGQ0gzwkpcvm8pSNDrudla-Dw_jKu_Yh35fL3AnsVzvttcsyNu4BrJ5lG_Nd2ApgAOtT2NqRgScCkCXheeKPtxeht7ambqKcbk7C6NBDa81zd1jqVnVojucsVAY1jkYKjw8r3WQQ53zAt2oMO4XCkEi-jQgIL4QwfY_eBfWiMZDzcYz8u8BlC07QLBHkT200YfIVDSjoKLf4pOx1hCWvzA27ndkemgt0thlL84EjLp5PE0chNtZCuLK2ojKkcSU21kZ3GV7NptS_IwyjkEvO3j9YKshOXzwFzIeMsyHMnQ5BsyRCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1564527196,"scheduledPurgeDate":1572303196,"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/2fa84ef9423a4cb5b286ca7bf77cfd02","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qInaUwEM6ZQAcb_Hk5d5rUP-DannLP_iAToOZeoUFgDi_dQBjwL5z0KMO2OBXUPgTh1ms_ePW0fvjRD7xyS-ZQ1aftrIX3pK_1OdnOpO5dDgFDOAEW9LCTz31RCCyMS9FMkjjbQ1iwX1ydEpM8eCw5_MrXhGL5FrPuorIq_GHpTbyV-ars_u1oJfdsUHOaD7riBizEk4sGld58EBoOHiH3HRojQ86E7WoXMUnX5KBX6CLggP9_SlVg2nnLPjDKWPddTPPpBmelCy9VF5g7T7UV3BtMymC-2XFZuPHOq8VjAjzZOn2Ant3IWotwRnokM1axlRqKa9rNGdEJvit6JB2w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '793' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '793' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: sec32f70fb3"}}' headers: - cache-control: - - no-cache - content-length: - - '79' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '79' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: sec32f70fb3"}}' headers: - cache-control: - - no-cache - content-length: - - '79' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:57 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '79' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1562703474,"scheduledPurgeDate":1570479474,"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/38ddd3f6f70d422a8aad4175d9d01acd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"rPb0on1WhFWeJd5-woJsOTbLA9Y_lFO9Mw0NtXGQ0gzwkpcvm8pSNDrudla-Dw_jKu_Yh35fL3AnsVzvttcsyNu4BrJ5lG_Nd2ApgAOtT2NqRgScCkCXheeKPtxeht7ambqKcbk7C6NBDa81zd1jqVnVojucsVAY1jkYKjw8r3WQQ53zAt2oMO4XCkEi-jQgIL4QwfY_eBfWiMZDzcYz8u8BlC07QLBHkT200YfIVDSjoKLf4pOx1hCWvzA27ndkemgt0thlL84EjLp5PE0chNtZCuLK2ojKkcSU21kZ3GV7NptS_IwyjkEvO3j9YKshOXzwFzIeMsyHMnQ5BsyRCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: sec32f70fb3"}}' headers: - cache-control: - - no-cache - content-length: - - '793' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '79' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:21 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: sec32f70fb3"}}' + headers: + cache-control: no-cache + content-length: '79' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: sec32f70fb3"}}' + headers: + cache-control: no-cache + content-length: '79' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 + response: + body: + string: '{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1564527196,"scheduledPurgeDate":1572303196,"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/2fa84ef9423a4cb5b286ca7bf77cfd02","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qInaUwEM6ZQAcb_Hk5d5rUP-DannLP_iAToOZeoUFgDi_dQBjwL5z0KMO2OBXUPgTh1ms_ePW0fvjRD7xyS-ZQ1aftrIX3pK_1OdnOpO5dDgFDOAEW9LCTz31RCCyMS9FMkjjbQ1iwX1ydEpM8eCw5_MrXhGL5FrPuorIq_GHpTbyV-ars_u1oJfdsUHOaD7riBizEk4sGld58EBoOHiH3HRojQ86E7WoXMUnX5KBX6CLggP9_SlVg2nnLPjDKWPddTPPpBmelCy9VF5g7T7UV3BtMymC-2XFZuPHOq8VjAjzZOn2Ant3IWotwRnokM1axlRqKa9rNGdEJvit6JB2w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '793' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault32f70fb3.vault.azure.net/deletedkeys?api-version=7.0 response: body: - string: '{"value":[{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1562703474,"scheduledPurgeDate":1570479474,"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3","attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + string: '{"value":[{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1564527196,"scheduledPurgeDate":1572303196,"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3","attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '338' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '338' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault32f70fb3.vault.azure.net/deletedkeys?api-version=7.0 response: body: - string: '{"value":[{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1562703474,"scheduledPurgeDate":1570479474,"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3","attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + string: '{"value":[{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1564527196,"scheduledPurgeDate":1572303196,"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3","attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '338' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '338' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_versions.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_versions.yaml index 506c1eec8c5b..8fc2e743bbf5 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_versions.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_versions.yaml @@ -4,464 +4,374 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:54:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/786f33cf86024134b1795f24b3f0f955","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"7koFGg8HikMmRoD_jMkk75c8jcJPc16nIpU3e3HxM8svQlFT3nM3gV2WCmkuydO98UYQIeHvm7mPNAAIpIZtnYHnDdT-YNZt4o4VEsUQvd-caLXLWaNaUkZDycCC3NLnOltKVoKNIcZz1AstY5I4o-4OYvYkTp1YeXBsHAzafCClwGbUF9bXx0N8InLGsUzNnU38Pi-RiBZQDyloHJ6x6_n5vhu2gBQUgfyCCwnknQDJD6Gw0DG0JM0lNKN3NhtMRgsuJSd0BXvty6pVN1TFvS320eNSlHIBX--hdN5U1ByKuy8MWIzSNyeF18nyW_ThlJCb-M3W4NgQN3B9hWm76w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/6c0645bada774c53829be1e9d92b8033","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1Cae7MgCaUb8l3cPvfpb97X4idEo2n6G3duPbBtVrarFg_hxNMrcRCeRhURHqZSc8vMnXnAoGWI43WWOJxm9ZCsTJ4h3KOHKv3t6BSB-cI28UNvTolGeVcs6SPfaj6ZinqkS9FNIvUQd7hanoXDq3l8qurjD1HKP8nYvnny0g8V3v_lcuIrexQbp1E3o0V3XX9eaFTD_NMNN28bELyRSM9dqnFTnelqrw4PBkaPfZ7hcUyCVHki6DCIAceuaneCwwZnOQyDYNsFdaEK8ahdorMrSQ5Z00ZYT3gWMgFjEP5mRzTOya6uMw-8Tqy5DDRf-ajTydYamzXjYzSoY00uapw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527265,"updated":1564527265,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/c2b39ea5f3ee4c1181284d3109f4f66e","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"96s63BcHVYpDmfb9hVIqsWAovKP2CaBMRrOSzB4LNxD7iVCEBubsoFoc37_CqK5dhcNIRV8Z6GQoP2gDjP317V_ToJxPk6dqhSymhQGvIT6PvTaIovmzQUgl9CCn8rRC366kcZofyB4FOZVjs2UJe30EjqdyZOBraXsWWa6DCBM7uuRTXHorOcA464mz4RFSHgyoaEhQrtTwGUBUEK_4zXSnrUO7_k4tLjCgZhvNIRaC2pBQ5XY4n-jCSRw2R-5BbjSvqoVYzQ_P-6iZs2Krj9VWNzAdWTHXDr-vS5isShwo2FODdiygabZMnwtJRUv-N_QicsXe4QRii0DHPFFtLw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/f68bb459f88048a28511a6bc9546c4f4","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"pv95cZnMAvrZ6RYvddRwe9Mh46LsolgFNHT0S_NFIL-Lk_HQkpR90iRR3hMhv8zucL8bFDo-JFVktFG1mf4kYXIwSNELfHQW5STjRzZePeE9waRtXRtvm9pwifGCS5lD8xq3zm5BMtRYJlNlrymLVbCK9U9bzB7aSi-ByTUd7SaFCFV7mHNrSaNjonLZWtWMcEh76P8DZC0GBO4cxG0XyLXd51fDNnwBd0DlXFPXUHlQ3d2TGHtd7aQCCsO3iOfdmoOJNv6RjsHR67ZUsHHE1sBm1rOoMHNUUTWSoEhYi9WeAWcahijZfcABjoXmNHyPmByDVNmxrNwgSbMlKOjzww","e":"AQAB"},"attributes":{"enabled":true,"created":1564527265,"updated":1564527265,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/8bf922cf4b0640ad8fbe53288acbcbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vkJZ9m9QRSVxUOx1X1Ag2MVp3Hnl9Fs3tQ5VXXMm7d-KxntbQH2xr5KHZe3YmUK1ZHHOH_TWjneoQS0fGwkarA0GAzhGr8O_SpDDQ8l5KttNe4niAYuxRT9_5-DTOzkMAuTKyJPJS0RblaPWxo9lQLpvQLdLPD5HyQBRlz0N4g2wi5Rcdu5rqKPBFBWnNRz-CfpEPA7ov_vec5bEATmqIphxAPasKuxGGyJ4ceLWM4dnQlxsgLjI_QE4r1UoLucZPkK8_lV9W76uh28SLY4Ve-wwyq8anPYT5oOLXWrWhqrxxCHeKpFhXgpLYd3_Mong9A6OSvGmL2nG-G7LBXxfpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/0889019e6e1146a5b4b9e2cee6f21c72","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"xk9Ix3IM9NfXTXbn7KV3Fe34jpKghO0M7X1ZwFTDa2bcWvxBewgsI5L2m017H9EoCqRpbu2-HkHGztKZfwSfpEKYA4OvdObgwBXA_IVHDUiExsjrtkcQJR_LtPrsIrZpIZt5_g_RMOhjpWG40iOHtzo7XiYjg26-MV1LNWGiooPRECJNaXZaS1fy2FCNXxHff6kR7kpKBSZQSx4qNUwnfmLmIvGSyOdLnCOvdrQtESGaSc7LMWCLJs1HlyN1wlaXmZnIIAs7Vo15ABCK3FCP5zZ0DpppAZUdMay4tWyevvlMG5CK6NpQTLkc49U884XqXILVfkEAzkwZekdr6gu_Cw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/a0d22140c0ed4278870724e54d99b938","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"n9pVD9XL43BykxzcY1c6XKmGMuN20UbSM6uaku1GdCzvuPCWO54fdRqs8JduEvUOgRTuYV52QMGLvyb2_AXrzvedEZI6o2PE2FO5kJH8qfFyCjqiqY6H-MeFfMfa2UoVSG-ykYIxqayh_HpwSwndVMPnoc0p5_lmecZqsFCJrT5OZZTmHat9iyNXEp9G-nY4EVOPnxb_HsqxWoIivjqO_OeVUXneLYzU9iCEpihr3eXYrE8nIeiGMimehDC0EF3RlJ9BvsC2Aj6EddajS9xh8mrTXMms4k-2X_8IJwQcarPpAqiz9K7GWbCcTPdQEbddQSX5FkZ_FeeLC013JEap9Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/c4cf39ef0106455198808a4ba6619fb3","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"h-72gARqMwXp7XtwAwPww4PVBoPuK5UA6mXubetsECLjnjrAU5W90bGcj9hM6qqLxZzUHWXB17SNObjBK39Up9DSaq7nX9N8MDslgW0NgQ5Sm2fRc2t7Rr87qrk8HqRQrqqo3MwArB5C-K7AYQrfihBMG8C21XTrv_NFS7VSWc1dzA9nWm7ch96I5pK7b-VCJ1M5UMuMBpu4JAOrebwiIbyt51CWkq2Qn0FBwg433ygFJFJCTjDV9biGFWePS1TknaJGFGwh6oMqokpItcWBIlD5qWbq-DaCjKD2HLnt7pWWjee6Qcjwoib4MrqBoJCZ8hK4J0oWZiYS93gfuGpDHw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/b329bb00403f4aaebbd90983b562d23d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wOKd__6i8rgLj8FY36VE4_r912xmbafiiaruIKRg0YH88kkDeFyrtuma13WFYco4C_Mpd9_VmTOBYydkLUJG3skk0pYj_lpaXgickbrUfYUO518-3rMXR6ZEfP_UAZonk6rc6rMAl1mBHPxJSI_61TKFRyDPFIVN3cfn3Rlu32MTTk4yFlGKzkx03z1DHjxNvAoDWOq4Rx7M2y-SFb3hS-Cbo9S3k3EObwpyqyLab9NuHjK8_TlaTChVSyaKegaxDKPdZSOwLpaugzKGiuYDc2Pv7FBvBysrZwWo9y8g-djQTCW7de4Sg4d1e_OgXkVd9jKM-iDmZP-0FG1KNrODUw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/4dede8ef1f0c4896876f41d26e623eda","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"pj2NZDpblOdcn9WnMuduYVQH6L4sQaHLnENAgOpBVJrmPGFaTC06UizxlnFQQgXFrWFIDV3fMRYZjvKj0CDTZw3ArUDI1AC3rAMez07CNJrxBc-pyRJo2qm7yET4JjUcoNUzPe49Jg0sTm_GjYCU5oO8hNPjmkvFBqk_tK21wn-GUezhNSw5Xt5wrNut5D9bx9Ec6SNw1jhtC58jyB4BAfyprpbPEBf7jbQ4rmEbPmFNWYtRp2wu-dd2AJ8rUzkyrtDsMIrZeki4J9VmrOd3sfxb2mrTh52u8MMUr4LpVC57YsExMluLEAgKS7BORvwL0zUhbsLE0gbYJ29ovETHbw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/b948df1fd198403b9d957fe3c2b304c8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"ywQxBhO2g4PKjb28A6xkhoNpIJpbEB7CR9XnCQYugrMCTBbgn1Wu5WUIL4nFbOHQqfZFgVm3Iz3GxQx9qbEuKZAZLrQemQvPKfJxShysmvaUvfOFkWAHreHROokOOhpz6RONaOKCExDLebh6xrwY_QX4Mu3CQRLrxXAXCpNCpLkLxSGcwf2QsxyfDgDk5_do5CHWUdDIrfYeBwphry-amLVnevfaMiy-cfuEA7uNXT-g6E0G0IKpK7d4BC_-D_Ik-H1Za5lbMDYCzIDaTyILuoQ3o6AyP2sSQFu287_RMlwny17Z1z_uUSp4t33mLBmKfqnofOpj3DTFV1cSVi_58Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/6e6d01abed4a44119e2a6f7fb100301a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"xny3krbx8hK8KQxeapgTJ062YqcjL40lwn3SaYZF6jvd_NdgExGmHBwqzZhaK0PGciDWQjUSDffKWuOAMJpZRskJ-HkHqB5s2kDQxqNcgHC0M20HA-JjiPRWHqAOpd7-CwaP4Dh0WkuCUZZ2cFHn13AzPifHE9W3uaRVm4UqsSJ9DhVYMxmtdykXkxPbamuv7C7-Cc7OJepctGFRI-z2_locTjZCjLAioOLkR-TiO8HC-dwhdVHGVLb6ndKfnK1oONyKMYmdamciR_xoswsR64k9L8zRH4mQXs1JLcK5bdZGSI9TC8HLsJ1pbISmbvcB8UBWr-vKBvLyyQxCh-oVxQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/90e449bfebae4beabf380cb73f8f9db9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"u1FSeDgoMKXed5j9AedatfVS7qA5zOZuIV5Si5_8A9H5AbJnR6SixEbxH-en_MEeFGIegUfuV_KGnGI7prxZtNH8Wcb5j3FPRsHo4icHMGXfXIJBKsGzP6pt6SzCF3PyGW9IjLFfIf1HD3LLzd5OiaYSHxtpOuHYNPzyo26O0ElTtHBwhUnp0YLSN6_gfCXLEMwjsXMk3EJ-XCDBuPXmRz4CqWgBtA8sABeU9Sy4Ptv_MsdDjLz5wRnvE-_WPHmux2-7BjMvgxln5c_vMEhkmU3L3Jaz5vEK_JO41Q3TVT09mVqudpGCu0qGzd3U4dGn_T-lEW89bR-K9Oqt52ZChQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/e0acb596946145368fd13c8b4e0c2c31","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p6oM5Rje-NLaSvWUXblUxWhXXQ57Uu-4TshEi02pY8Prj9j77Noem7d8RjwPVhTFWEcVoBsivfU8QOHb4yv9v2vWNxCXf6pcqCQU6edvRaxT8C71FlKcMcaRCOqJJRT0lCyf6lbGKsAhpMAfztyV9HBcLUnLtQPtQtqif4tBfCkiDGSI0606lZHmP3bUd5EurPOXGpcLq9gV2m_L5_EjDa5ZgTl_weMHOrzxsIyKjDG3z0Mf66SSLkpt2e6qvsa2bvsV10m0mqAo1jHkJPa2XXdrE4EAe5X2EWoesw_voom0zsrfemdFD1poDPwWsbZvkRBR1T-GmN7cj6xjucJspQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/versions?api-version=7.0 response: body: - string: '{"value":[{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/786f33cf86024134b1795f24b3f0f955","attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/8bf922cf4b0640ad8fbe53288acbcbbb","attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/90e449bfebae4beabf380cb73f8f9db9","attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/a0d22140c0ed4278870724e54d99b938","attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/b329bb00403f4aaebbd90983b562d23d","attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/b948df1fd198403b9d957fe3c2b304c8","attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/c2b39ea5f3ee4c1181284d3109f4f66e","attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}],"nextLink":null}' + string: '{"value":[{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/0889019e6e1146a5b4b9e2cee6f21c72","attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/4dede8ef1f0c4896876f41d26e623eda","attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/6c0645bada774c53829be1e9d92b8033","attributes":{"enabled":true,"created":1564527265,"updated":1564527265,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/6e6d01abed4a44119e2a6f7fb100301a","attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/c4cf39ef0106455198808a4ba6619fb3","attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/e0acb596946145368fd13c8b4e0c2c31","attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/f68bb459f88048a28511a6bc9546c4f4","attributes":{"enabled":true,"created":1564527265,"updated":1564527265,"recoveryLevel":"Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '1441' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '1441' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/versions + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_purge.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_purge.yaml index 8986e7164929..2d209bec87d0 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_purge.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_purge.yaml @@ -4,1472 +4,1334 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key0/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:55:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key0/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/b7b15c069a764103aca616941247c05b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2yh-wv0OiJllHsJD2ksiZ2az_143p22PHO_3mqj_W76twCIcehvLnGrVvqBKphuOV81ZHAe0_T491wBWyagcbda_pYlYKMbhnh_U9Xm-UvQB3u6z1S7D4SotH03DCdAUFIjOad6ghlfBUJ-A-hOCOIh3QTv2vqtg7WrdUbuV_4zy1BuW0QfoBZ13apKtU-8HyalVMqkenk3__Rpqub8yifPod3Mx81JqMWGeVqKA2wwAsC8PNbu6mbjC1mGpeI1HwEZRjObRXllYLZoyN2lTOsrxZdzTQQ0biU5RL320u98tg-3a58qclvXJA8TfjEcMQyfi90fVnUBCz58A28jBUQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/a4543a8280204c68978f6f2caae4cbec","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"7wL18EOC3opS5mWL6zSV_0crQP8HuBTVxmpcE1EfePfWRFVc242HNftjbwh-D-3ypnfx0pngk5dM2Wys6K7uC8UDX7xvEIz8Q4yov6EJHFERbUH4QHy5RrywBSry31vmIHdCyLikwyekjeuYDg7jHViKLGU-aRkdSYPhXBZnGjDqzbYwH8_fh9SQnsBDVtJ5dUF0ua2xstnqjZfoTdzvMGMTqrO4rivXc34kdhMAAcbAlg7yvfN8dr9legQfIQq-vSaBuhiLpQXJ7yrCIjWtFyz52F6sVYWFRZDhAEsVfFg0KwMROwPhLDZuolRnc5113C8rZTjSrPGTvzKloqgybQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key1/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/e2105e596e1244a496166f11ef3fcc83","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"q_cGt1m0sRbgdPQvIy5YpXC4LQ49mOhVO1IH4XoTMiGgSAF5RtJzSPBWPx93I1Lmuvlml15EroYaudSZRivYgOM9BmVet_ZEAl0yL7FySYG1aepyalxZ1HU00b6Thn0MCYZawsK_HR6_VQsK4uVf0uBiwjSXgAT39yK9M6YC09ny5Tokdxi0CtlI88TBzhGVcsU4GBLB7zziUMsIdMNvU_08XXMdyFO0MZCCtZ4FKQ-LWrMXTd9TonbeyxHjKK55RYk73vOrurPdtncmL-7Tal-ReUfWNa8IBTbv2-5HF9pKeWiugPsYx5LZDkeMPShLLXLhUl9IrAWNJ75TbJnqCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/594bd6b877b549e78c65e8e6065f9b61","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vL6fWpzKR-eh3DEeb8meE7BVQhQ3EslTQ2YFnfI7z1PSJbTYL9GzOEYDOCEw3HK1-kDQlQNuG9cS9w8a-XyXN2GaIN1d3wCsvkiF8IxSgZvyzah76cnJlY9k8s2_-xpH9-eDn2V_O_oT5S05ZDGE8S3yQXX40b12GbCzox2ydAmbiG26o75ee9Ep-VcA65Sn8gSGR8GyBeu_pfuEZR2ExG6ykluUJWV5S-aHNQP1QwC5J5lN6BA6IQw_CNiu5IIen69RATOv9OUlEcb8qUzAa6w77y2BfIPW-721Al6AVsQc5qfs-fPGvlAMMTgRpUULbZtJf_Ua_x4SJLEg5gqEEQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key1/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key2/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/1d4636bd96ce41dbbca191bf2d58f491","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vUAwWk483zwp364hcyCNX8EzclzX-56CvL-UAmRkaI3rDttCvgo9lDk6unH7S1E6lB1J9ZfF5LebqqfNR7MheTPuvlq034V-eQHiMFmYgbpHkyM3YYElSQulBk7dlJ5JmVW9LgdDkVeRdKU0NXzFSbScn2gynewJx5uJDREcKRKLKbD4WXMtpUep_YgJG3tT3Moy0OrgB8GD1EeGU5xGb9HKLU6B4YxT7vOTd9oP_vrUGzWLzv2gUVcat3ey0KLymyS2UEQcXazrJ8I48plMYRFuo7rVDolp2KmqrQLYutqn5c-bW_mq0kytdH-9-NxDW_zrsVSMSjuXfa3rPXQQ1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/4cf7e15813524ce8a0cbbff407e4320f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lCN9N51jfLTckgcgoUDBIa8fKsi-BBeyz6RtKo0rxdiU8HiI8bPwjWomaGom950KKIvxVZO81xh7R7wOsVMoo4pmfM6IoSX9xRJKDG0Z3-rjkXi8wswKbcVP2EgPZ0ZZfMi1MgPHarfMXPMCtA1fOndYM_FGWijYbf6ngXvgvRsMkg-d5AOU0vP9A_Cw4f5CvdeVKGsbaHkXy8udls-Ir5we-S749TcCzpje2UJ7UftWOMynXPl5bagZ1jZBXqPI0Yn4lLUXmI2xLw-QkZPEBgMGyMwcjI3bGZUKHVQdnFymdXIN8xZyiTnWvjaYHGQK7w-c_bjBxs4WA5EgiIUAGw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key2/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/bf97328c64bc4190b7c0b5025152e0ef","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"iC40PZjyzCPorzlWM7YTGIcZp4zP9YeUzig51DOE5iAHLXaIDbjZs2H-TO0l3q205oCX3R3dBBoJvxlEDbLjSLI4NdLym0EqIWTd4B6JelFBq-3zEeJJt4SHkMRQdkWPA7dwIEi4JgfyazFN8JkL3x-S2zSqqyzmoG4U4gpxKN3NPAyk1qmszmpKjnGzNJg7ywY9tewDlqx6MiMQkODxr27rOjXHx_hbp7iKhD3ZwTKAvX7g14JzpYIkXmKsyUtCU_pLx6HEqNUVLNyV0xfAtXctSSuudeE5LDItakUEY5oFe7iT1DlqPDOGoVmtfg3wf5OocdtajvdfZGfMRUpi4w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/00e02fa485e44c17afda5770e8153dcb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1p-HLSbIn1lvsmxtwTf9Gmsd7r--sUU9C0CSjMQzz_yXSt4nnKzNbtbPfpkG1UPSyysrnNKfz9YWIaJWrYUZbdDRF_xNMV_QHiXHrsW851fZqZZYYz_KICrD9PZoBgE9SMIZznXBnx1AXEhDtZeMsHixlIWCmW1zrnwtaa1a9jjbNCArj3bF9WK7Fz4lm4sov5J98XaOHFvaFmDIVSW1mPlU7IFY7qzvim_ADeWFFZ2ibgb2fZbdo4EK1sL8HpkrVaryidFBRYVfQjIAusI8bNTcrEp2RLvaiPTh9Kqcwqz1GIJ8rWMCjflxOHsXiwpucyekYpEMX0PJD9RKYeBSZQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key4/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/df257ae8ce7445499e565c897a68dfbd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"3nDxOtRk2XEekU3CDix3JvDSL_ovOzFqQOiGcm4gAsnxKBF7KAOINLVdOU-jgDU1tW0lDU9EB7tgt09O3ZRn6wHfX11FbsWX_UQVVZZ1-9TN8qNm05VCT41hXVJXp0orAnc8oMj3zBgWuHRzNOO3H6HECD0O1rTtgpSzBVlkRjvJFoNZ_VeM4ALRdghGM5pZwDhZmXjPwWMNBhrxsehGcIwWwapylZUSjDTkv6RcVs7nROpDZiEyXxGkLMDZgQKcbZPUP8pUmWaWS9639d3NL-y8wvBrxkz2YLcLU4rVMZBKwQD-QA6kfRBZ-tSdm2Wjosn9tY_4ZaF5BT2bSZ4jWQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/7744766f37c84db6b97adf44cfdf3c01","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"5ffGsn2LropTgRfM75DCYE5k_rlbSIgAVqf4IFIHhIVwHdbco3qg8ROnX36f6jsH_x8JMvGfACIuFTwGLhw8VCK4NZOHIHFeq2kSSOHrqBLhIw7WZKCWrKfPBDtdKAvVmhMzLIn31FFAbNpbgDNVYa681ajXk7kBMdJaCX9ymT8a-DvNLDh3K33ImrqXZLNLX6KOh8-sAECfOVZcoRDfvzi6I5edrzxG-jMZnyYXMvdOWWO4SfmmD_-L6_kCksibxIbL-7LFqfO4rtcbv2ew87GA-V4Drm3OwQrX0h13xIuGZ5J6GVOQ8uhXwrHdz_UCL38_A5wLlWzMnDe7iMDMmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key4/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key5/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/1977c712eff64ef9a3384f93eec3920d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"0V3D3E6vH_DcYMtkqMZjr6Cw1M6sYzYjUlu3eyNrh2h8qq2oIWFgDRzm_wvfG0k1JOuS28L_ZkYaAsIeW3mQx0liwfi0Qw3nMWFjzcLpLw9GBM6WZBr1C8uh0DbSvoWGo82FIIWONKWYZtimkep2UtBpEkbWXtBK7HMwWr1YhQxLwya-eq7R7L_F-d5CmAJCWZAfIU7shSesGIFZLYV8UzM2rfWueyEVQw0jrC5SC7eVoiIQ9t7bkGw_mooqod7KdIDIIyeaOpe-7xd8EqntmOeOl2EYehTeH2oaUwm-SWSfE53-Jf8GzqHMYLsXO0FcYTkZO2RCl630YSJWOQ0J_Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/0b821b69a2a3451793d33595b4b52674","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2i-Yevb0gLnOGSWkCrRSfbsui3vbi5PcXH8mYAA-O5DF64zVu3tgj7MD1bHG9Xnw9KX75MRwPFZoZnXByNEWEPyndhbOsNTypLxcFYagDEB9tMH9oO_M6SO7pOotlnqKT_Zhf4w3hWK-Gsrmovl6T2729nyAOmbVjNosC-u5JCU128WXpnel8HbJXKMjtmGDVKCOBErTm1ZYTeGjr8nMnlhnOFbaRkGST3c3YcaabJ0ZZQ7BVhna_ddt4de5yGxfNUi4-E2KwwcC8EWBWAL4idDfeaRGf-J954hMdtQXvIFjM4ovpZtajP5OjjcGsp9spfChZ4UMsmk8LMWptzjukQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key5/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key6/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/a46d41e3df94485998d628effc1cc9fa","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2pOHXzB_Ek3t-w1EPmq6Wv9tDkaP1tekAEn1FDJNKSMPRwsoQ77_2VE3aggrKhRAEhxxXJqCpsnSK3aOxeiO3PAnPkXBg9FqQ2GcFykqXwQaKEeJi3oFo_Ik4O3VgaGca4g3LyAIjhcU5RglkrdP6gxBPd38ykGmi5kmxBViQc2LVCSwWSK34a_QoYi_mTEu4ai3yyfn4c2DvvJA4Nc-jUoQi4XydgzaDwFIHwBpJ5VZvHbfj88iEQ5r-Ym4xsDZhPv2ywyKokNSocbNDgpk5mpzOGW4v_ZkAuS1DsMd7ZdVYtuVzg1y_jNtaK985OWrJhTz0_VWXKLoR_sBGkNN1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/06c3cfdcaa30440e80108348d890bfe0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"70-948DTxaM8NbPNVnBTYQQ9bBjrA1jLjmDHW8RHZA_DvPxLHiTOLIcXX_YoZNVpjqzvBMhtoyHawmD8b6dKeyeefqkjXryxFBo2L89IDp2MKsg8iG75eeAP0p6FFWBljpfwyduuUCsOZ_x5M6_K5M3aaC2R6oTedX5Gp90dZKUQ97W4S1Im8hW0qrg_HM09vQ7RZ5w_reDC2hk18c6CnERE_W7Z8Q3AEoi17t3cRez616DvLWZxkj2YMyP5mTnYaniSIbpgBU-Eqb4UVKBAAScLHpslfS-cdQr3vyYeIOI-EO1I2K5gLq_2UVn3-VL1fySHw7zvkS9bX_TkdzZnyQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key6/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/keys/key3?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/keys/key0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key3","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/bf97328c64bc4190b7c0b5025152e0ef","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"iC40PZjyzCPorzlWM7YTGIcZp4zP9YeUzig51DOE5iAHLXaIDbjZs2H-TO0l3q205oCX3R3dBBoJvxlEDbLjSLI4NdLym0EqIWTd4B6JelFBq-3zEeJJt4SHkMRQdkWPA7dwIEi4JgfyazFN8JkL3x-S2zSqqyzmoG4U4gpxKN3NPAyk1qmszmpKjnGzNJg7ywY9tewDlqx6MiMQkODxr27rOjXHx_hbp7iKhD3ZwTKAvX7g14JzpYIkXmKsyUtCU_pLx6HEqNUVLNyV0xfAtXctSSuudeE5LDItakUEY5oFe7iT1DlqPDOGoVmtfg3wf5OocdtajvdfZGfMRUpi4w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key0","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/a4543a8280204c68978f6f2caae4cbec","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"7wL18EOC3opS5mWL6zSV_0crQP8HuBTVxmpcE1EfePfWRFVc242HNftjbwh-D-3ypnfx0pngk5dM2Wys6K7uC8UDX7xvEIz8Q4yov6EJHFERbUH4QHy5RrywBSry31vmIHdCyLikwyekjeuYDg7jHViKLGU-aRkdSYPhXBZnGjDqzbYwH8_fh9SQnsBDVtJ5dUF0ua2xstnqjZfoTdzvMGMTqrO4rivXc34kdhMAAcbAlg7yvfN8dr9legQfIQq-vSaBuhiLpQXJ7yrCIjWtFyz52F6sVYWFRZDhAEsVfFg0KwMROwPhLDZuolRnc5113C8rZTjSrPGTvzKloqgybQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/keys/key2?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/keys/key1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key2","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/1d4636bd96ce41dbbca191bf2d58f491","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vUAwWk483zwp364hcyCNX8EzclzX-56CvL-UAmRkaI3rDttCvgo9lDk6unH7S1E6lB1J9ZfF5LebqqfNR7MheTPuvlq034V-eQHiMFmYgbpHkyM3YYElSQulBk7dlJ5JmVW9LgdDkVeRdKU0NXzFSbScn2gynewJx5uJDREcKRKLKbD4WXMtpUep_YgJG3tT3Moy0OrgB8GD1EeGU5xGb9HKLU6B4YxT7vOTd9oP_vrUGzWLzv2gUVcat3ey0KLymyS2UEQcXazrJ8I48plMYRFuo7rVDolp2KmqrQLYutqn5c-bW_mq0kytdH-9-NxDW_zrsVSMSjuXfa3rPXQQ1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key1","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/594bd6b877b549e78c65e8e6065f9b61","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vL6fWpzKR-eh3DEeb8meE7BVQhQ3EslTQ2YFnfI7z1PSJbTYL9GzOEYDOCEw3HK1-kDQlQNuG9cS9w8a-XyXN2GaIN1d3wCsvkiF8IxSgZvyzah76cnJlY9k8s2_-xpH9-eDn2V_O_oT5S05ZDGE8S3yQXX40b12GbCzox2ydAmbiG26o75ee9Ep-VcA65Sn8gSGR8GyBeu_pfuEZR2ExG6ykluUJWV5S-aHNQP1QwC5J5lN6BA6IQw_CNiu5IIen69RATOv9OUlEcb8qUzAa6w77y2BfIPW-721Al6AVsQc5qfs-fPGvlAMMTgRpUULbZtJf_Ua_x4SJLEg5gqEEQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/keys/key6?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/keys/key2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key6","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/a46d41e3df94485998d628effc1cc9fa","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2pOHXzB_Ek3t-w1EPmq6Wv9tDkaP1tekAEn1FDJNKSMPRwsoQ77_2VE3aggrKhRAEhxxXJqCpsnSK3aOxeiO3PAnPkXBg9FqQ2GcFykqXwQaKEeJi3oFo_Ik4O3VgaGca4g3LyAIjhcU5RglkrdP6gxBPd38ykGmi5kmxBViQc2LVCSwWSK34a_QoYi_mTEu4ai3yyfn4c2DvvJA4Nc-jUoQi4XydgzaDwFIHwBpJ5VZvHbfj88iEQ5r-Ym4xsDZhPv2ywyKokNSocbNDgpk5mpzOGW4v_ZkAuS1DsMd7ZdVYtuVzg1y_jNtaK985OWrJhTz0_VWXKLoR_sBGkNN1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key2","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/4cf7e15813524ce8a0cbbff407e4320f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lCN9N51jfLTckgcgoUDBIa8fKsi-BBeyz6RtKo0rxdiU8HiI8bPwjWomaGom950KKIvxVZO81xh7R7wOsVMoo4pmfM6IoSX9xRJKDG0Z3-rjkXi8wswKbcVP2EgPZ0ZZfMi1MgPHarfMXPMCtA1fOndYM_FGWijYbf6ngXvgvRsMkg-d5AOU0vP9A_Cw4f5CvdeVKGsbaHkXy8udls-Ir5we-S749TcCzpje2UJ7UftWOMynXPl5bagZ1jZBXqPI0Yn4lLUXmI2xLw-QkZPEBgMGyMwcjI3bGZUKHVQdnFymdXIN8xZyiTnWvjaYHGQK7w-c_bjBxs4WA5EgiIUAGw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/keys/key0?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/keys/key3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key0","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/b7b15c069a764103aca616941247c05b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2yh-wv0OiJllHsJD2ksiZ2az_143p22PHO_3mqj_W76twCIcehvLnGrVvqBKphuOV81ZHAe0_T491wBWyagcbda_pYlYKMbhnh_U9Xm-UvQB3u6z1S7D4SotH03DCdAUFIjOad6ghlfBUJ-A-hOCOIh3QTv2vqtg7WrdUbuV_4zy1BuW0QfoBZ13apKtU-8HyalVMqkenk3__Rpqub8yifPod3Mx81JqMWGeVqKA2wwAsC8PNbu6mbjC1mGpeI1HwEZRjObRXllYLZoyN2lTOsrxZdzTQQ0biU5RL320u98tg-3a58qclvXJA8TfjEcMQyfi90fVnUBCz58A28jBUQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key3","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/00e02fa485e44c17afda5770e8153dcb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1p-HLSbIn1lvsmxtwTf9Gmsd7r--sUU9C0CSjMQzz_yXSt4nnKzNbtbPfpkG1UPSyysrnNKfz9YWIaJWrYUZbdDRF_xNMV_QHiXHrsW851fZqZZYYz_KICrD9PZoBgE9SMIZznXBnx1AXEhDtZeMsHixlIWCmW1zrnwtaa1a9jjbNCArj3bF9WK7Fz4lm4sov5J98XaOHFvaFmDIVSW1mPlU7IFY7qzvim_ADeWFFZ2ibgb2fZbdo4EK1sL8HpkrVaryidFBRYVfQjIAusI8bNTcrEp2RLvaiPTh9Kqcwqz1GIJ8rWMCjflxOHsXiwpucyekYpEMX0PJD9RKYeBSZQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault92670ac9.vault.azure.net/keys/key4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key4","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/df257ae8ce7445499e565c897a68dfbd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"3nDxOtRk2XEekU3CDix3JvDSL_ovOzFqQOiGcm4gAsnxKBF7KAOINLVdOU-jgDU1tW0lDU9EB7tgt09O3ZRn6wHfX11FbsWX_UQVVZZ1-9TN8qNm05VCT41hXVJXp0orAnc8oMj3zBgWuHRzNOO3H6HECD0O1rTtgpSzBVlkRjvJFoNZ_VeM4ALRdghGM5pZwDhZmXjPwWMNBhrxsehGcIwWwapylZUSjDTkv6RcVs7nROpDZiEyXxGkLMDZgQKcbZPUP8pUmWaWS9639d3NL-y8wvBrxkz2YLcLU4rVMZBKwQD-QA6kfRBZ-tSdm2Wjosn9tY_4ZaF5BT2bSZ4jWQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key4","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/7744766f37c84db6b97adf44cfdf3c01","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"5ffGsn2LropTgRfM75DCYE5k_rlbSIgAVqf4IFIHhIVwHdbco3qg8ROnX36f6jsH_x8JMvGfACIuFTwGLhw8VCK4NZOHIHFeq2kSSOHrqBLhIw7WZKCWrKfPBDtdKAvVmhMzLIn31FFAbNpbgDNVYa681ajXk7kBMdJaCX9ymT8a-DvNLDh3K33ImrqXZLNLX6KOh8-sAECfOVZcoRDfvzi6I5edrzxG-jMZnyYXMvdOWWO4SfmmD_-L6_kCksibxIbL-7LFqfO4rtcbv2ew87GA-V4Drm3OwQrX0h13xIuGZ5J6GVOQ8uhXwrHdz_UCL38_A5wLlWzMnDe7iMDMmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault92670ac9.vault.azure.net/keys/key5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key5","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/1977c712eff64ef9a3384f93eec3920d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"0V3D3E6vH_DcYMtkqMZjr6Cw1M6sYzYjUlu3eyNrh2h8qq2oIWFgDRzm_wvfG0k1JOuS28L_ZkYaAsIeW3mQx0liwfi0Qw3nMWFjzcLpLw9GBM6WZBr1C8uh0DbSvoWGo82FIIWONKWYZtimkep2UtBpEkbWXtBK7HMwWr1YhQxLwya-eq7R7L_F-d5CmAJCWZAfIU7shSesGIFZLYV8UzM2rfWueyEVQw0jrC5SC7eVoiIQ9t7bkGw_mooqod7KdIDIIyeaOpe-7xd8EqntmOeOl2EYehTeH2oaUwm-SWSfE53-Jf8GzqHMYLsXO0FcYTkZO2RCl630YSJWOQ0J_Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key5","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/0b821b69a2a3451793d33595b4b52674","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2i-Yevb0gLnOGSWkCrRSfbsui3vbi5PcXH8mYAA-O5DF64zVu3tgj7MD1bHG9Xnw9KX75MRwPFZoZnXByNEWEPyndhbOsNTypLxcFYagDEB9tMH9oO_M6SO7pOotlnqKT_Zhf4w3hWK-Gsrmovl6T2729nyAOmbVjNosC-u5JCU128WXpnel8HbJXKMjtmGDVKCOBErTm1ZYTeGjr8nMnlhnOFbaRkGST3c3YcaabJ0ZZQ7BVhna_ddt4de5yGxfNUi4-E2KwwcC8EWBWAL4idDfeaRGf-J954hMdtQXvIFjM4ovpZtajP5OjjcGsp9spfChZ4UMsmk8LMWptzjukQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/keys/key1?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/keys/key6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key1","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/e2105e596e1244a496166f11ef3fcc83","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"q_cGt1m0sRbgdPQvIy5YpXC4LQ49mOhVO1IH4XoTMiGgSAF5RtJzSPBWPx93I1Lmuvlml15EroYaudSZRivYgOM9BmVet_ZEAl0yL7FySYG1aepyalxZ1HU00b6Thn0MCYZawsK_HR6_VQsK4uVf0uBiwjSXgAT39yK9M6YC09ny5Tokdxi0CtlI88TBzhGVcsU4GBLB7zziUMsIdMNvU_08XXMdyFO0MZCCtZ4FKQ-LWrMXTd9TonbeyxHjKK55RYk73vOrurPdtncmL-7Tal-ReUfWNa8IBTbv2-5HF9pKeWiugPsYx5LZDkeMPShLLXLhUl9IrAWNJ75TbJnqCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key6","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/06c3cfdcaa30440e80108348d890bfe0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"70-948DTxaM8NbPNVnBTYQQ9bBjrA1jLjmDHW8RHZA_DvPxLHiTOLIcXX_YoZNVpjqzvBMhtoyHawmD8b6dKeyeefqkjXryxFBo2L89IDp2MKsg8iG75eeAP0p6FFWBljpfwyduuUCsOZ_x5M6_K5M3aaC2R6oTedX5Gp90dZKUQ97W4S1Im8hW0qrg_HM09vQ7RZ5w_reDC2hk18c6CnERE_W7Z8Q3AEoi17t3cRez616DvLWZxkj2YMyP5mTnYaniSIbpgBU-Eqb4UVKBAAScLHpslfS-cdQr3vyYeIOI-EO1I2K5gLq_2UVn3-VL1fySHw7zvkS9bX_TkdzZnyQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key3?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key3"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key3?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key3","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/bf97328c64bc4190b7c0b5025152e0ef","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"iC40PZjyzCPorzlWM7YTGIcZp4zP9YeUzig51DOE5iAHLXaIDbjZs2H-TO0l3q205oCX3R3dBBoJvxlEDbLjSLI4NdLym0EqIWTd4B6JelFBq-3zEeJJt4SHkMRQdkWPA7dwIEi4JgfyazFN8JkL3x-S2zSqqyzmoG4U4gpxKN3NPAyk1qmszmpKjnGzNJg7ywY9tewDlqx6MiMQkODxr27rOjXHx_hbp7iKhD3ZwTKAvX7g14JzpYIkXmKsyUtCU_pLx6HEqNUVLNyV0xfAtXctSSuudeE5LDItakUEY5oFe7iT1DlqPDOGoVmtfg3wf5OocdtajvdfZGfMRUpi4w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' + headers: + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:33 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' + headers: + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:36 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' + headers: + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:39 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' + headers: + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + response: + body: + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key0","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/a4543a8280204c68978f6f2caae4cbec","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"7wL18EOC3opS5mWL6zSV_0crQP8HuBTVxmpcE1EfePfWRFVc242HNftjbwh-D-3ypnfx0pngk5dM2Wys6K7uC8UDX7xvEIz8Q4yov6EJHFERbUH4QHy5RrywBSry31vmIHdCyLikwyekjeuYDg7jHViKLGU-aRkdSYPhXBZnGjDqzbYwH8_fh9SQnsBDVtJ5dUF0ua2xstnqjZfoTdzvMGMTqrO4rivXc34kdhMAAcbAlg7yvfN8dr9legQfIQq-vSaBuhiLpQXJ7yrCIjWtFyz52F6sVYWFRZDhAEsVfFg0KwMROwPhLDZuolRnc5113C8rZTjSrPGTvzKloqgybQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key2?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key2","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/1d4636bd96ce41dbbca191bf2d58f491","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vUAwWk483zwp364hcyCNX8EzclzX-56CvL-UAmRkaI3rDttCvgo9lDk6unH7S1E6lB1J9ZfF5LebqqfNR7MheTPuvlq034V-eQHiMFmYgbpHkyM3YYElSQulBk7dlJ5JmVW9LgdDkVeRdKU0NXzFSbScn2gynewJx5uJDREcKRKLKbD4WXMtpUep_YgJG3tT3Moy0OrgB8GD1EeGU5xGb9HKLU6B4YxT7vOTd9oP_vrUGzWLzv2gUVcat3ey0KLymyS2UEQcXazrJ8I48plMYRFuo7rVDolp2KmqrQLYutqn5c-bW_mq0kytdH-9-NxDW_zrsVSMSjuXfa3rPXQQ1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key1","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/594bd6b877b549e78c65e8e6065f9b61","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vL6fWpzKR-eh3DEeb8meE7BVQhQ3EslTQ2YFnfI7z1PSJbTYL9GzOEYDOCEw3HK1-kDQlQNuG9cS9w8a-XyXN2GaIN1d3wCsvkiF8IxSgZvyzah76cnJlY9k8s2_-xpH9-eDn2V_O_oT5S05ZDGE8S3yQXX40b12GbCzox2ydAmbiG26o75ee9Ep-VcA65Sn8gSGR8GyBeu_pfuEZR2ExG6ykluUJWV5S-aHNQP1QwC5J5lN6BA6IQw_CNiu5IIen69RATOv9OUlEcb8qUzAa6w77y2BfIPW-721Al6AVsQc5qfs-fPGvlAMMTgRpUULbZtJf_Ua_x4SJLEg5gqEEQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key6?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key6","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/a46d41e3df94485998d628effc1cc9fa","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2pOHXzB_Ek3t-w1EPmq6Wv9tDkaP1tekAEn1FDJNKSMPRwsoQ77_2VE3aggrKhRAEhxxXJqCpsnSK3aOxeiO3PAnPkXBg9FqQ2GcFykqXwQaKEeJi3oFo_Ik4O3VgaGca4g3LyAIjhcU5RglkrdP6gxBPd38ykGmi5kmxBViQc2LVCSwWSK34a_QoYi_mTEu4ai3yyfn4c2DvvJA4Nc-jUoQi4XydgzaDwFIHwBpJ5VZvHbfj88iEQ5r-Ym4xsDZhPv2ywyKokNSocbNDgpk5mpzOGW4v_ZkAuS1DsMd7ZdVYtuVzg1y_jNtaK985OWrJhTz0_VWXKLoR_sBGkNN1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key2","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/4cf7e15813524ce8a0cbbff407e4320f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lCN9N51jfLTckgcgoUDBIa8fKsi-BBeyz6RtKo0rxdiU8HiI8bPwjWomaGom950KKIvxVZO81xh7R7wOsVMoo4pmfM6IoSX9xRJKDG0Z3-rjkXi8wswKbcVP2EgPZ0ZZfMi1MgPHarfMXPMCtA1fOndYM_FGWijYbf6ngXvgvRsMkg-d5AOU0vP9A_Cw4f5CvdeVKGsbaHkXy8udls-Ir5we-S749TcCzpje2UJ7UftWOMynXPl5bagZ1jZBXqPI0Yn4lLUXmI2xLw-QkZPEBgMGyMwcjI3bGZUKHVQdnFymdXIN8xZyiTnWvjaYHGQK7w-c_bjBxs4WA5EgiIUAGw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key0","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/b7b15c069a764103aca616941247c05b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2yh-wv0OiJllHsJD2ksiZ2az_143p22PHO_3mqj_W76twCIcehvLnGrVvqBKphuOV81ZHAe0_T491wBWyagcbda_pYlYKMbhnh_U9Xm-UvQB3u6z1S7D4SotH03DCdAUFIjOad6ghlfBUJ-A-hOCOIh3QTv2vqtg7WrdUbuV_4zy1BuW0QfoBZ13apKtU-8HyalVMqkenk3__Rpqub8yifPod3Mx81JqMWGeVqKA2wwAsC8PNbu6mbjC1mGpeI1HwEZRjObRXllYLZoyN2lTOsrxZdzTQQ0biU5RL320u98tg-3a58qclvXJA8TfjEcMQyfi90fVnUBCz58A28jBUQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key3","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/00e02fa485e44c17afda5770e8153dcb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1p-HLSbIn1lvsmxtwTf9Gmsd7r--sUU9C0CSjMQzz_yXSt4nnKzNbtbPfpkG1UPSyysrnNKfz9YWIaJWrYUZbdDRF_xNMV_QHiXHrsW851fZqZZYYz_KICrD9PZoBgE9SMIZznXBnx1AXEhDtZeMsHixlIWCmW1zrnwtaa1a9jjbNCArj3bF9WK7Fz4lm4sov5J98XaOHFvaFmDIVSW1mPlU7IFY7qzvim_ADeWFFZ2ibgb2fZbdo4EK1sL8HpkrVaryidFBRYVfQjIAusI8bNTcrEp2RLvaiPTh9Kqcwqz1GIJ8rWMCjflxOHsXiwpucyekYpEMX0PJD9RKYeBSZQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault92670ac9.vault.azure.net/deletedkeys/key4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key4","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/df257ae8ce7445499e565c897a68dfbd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"3nDxOtRk2XEekU3CDix3JvDSL_ovOzFqQOiGcm4gAsnxKBF7KAOINLVdOU-jgDU1tW0lDU9EB7tgt09O3ZRn6wHfX11FbsWX_UQVVZZ1-9TN8qNm05VCT41hXVJXp0orAnc8oMj3zBgWuHRzNOO3H6HECD0O1rTtgpSzBVlkRjvJFoNZ_VeM4ALRdghGM5pZwDhZmXjPwWMNBhrxsehGcIwWwapylZUSjDTkv6RcVs7nROpDZiEyXxGkLMDZgQKcbZPUP8pUmWaWS9639d3NL-y8wvBrxkz2YLcLU4rVMZBKwQD-QA6kfRBZ-tSdm2Wjosn9tY_4ZaF5BT2bSZ4jWQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key4","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/7744766f37c84db6b97adf44cfdf3c01","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"5ffGsn2LropTgRfM75DCYE5k_rlbSIgAVqf4IFIHhIVwHdbco3qg8ROnX36f6jsH_x8JMvGfACIuFTwGLhw8VCK4NZOHIHFeq2kSSOHrqBLhIw7WZKCWrKfPBDtdKAvVmhMzLIn31FFAbNpbgDNVYa681ajXk7kBMdJaCX9ymT8a-DvNLDh3K33ImrqXZLNLX6KOh8-sAECfOVZcoRDfvzi6I5edrzxG-jMZnyYXMvdOWWO4SfmmD_-L6_kCksibxIbL-7LFqfO4rtcbv2ew87GA-V4Drm3OwQrX0h13xIuGZ5J6GVOQ8uhXwrHdz_UCL38_A5wLlWzMnDe7iMDMmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault92670ac9.vault.azure.net/deletedkeys/key5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key5","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/1977c712eff64ef9a3384f93eec3920d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"0V3D3E6vH_DcYMtkqMZjr6Cw1M6sYzYjUlu3eyNrh2h8qq2oIWFgDRzm_wvfG0k1JOuS28L_ZkYaAsIeW3mQx0liwfi0Qw3nMWFjzcLpLw9GBM6WZBr1C8uh0DbSvoWGo82FIIWONKWYZtimkep2UtBpEkbWXtBK7HMwWr1YhQxLwya-eq7R7L_F-d5CmAJCWZAfIU7shSesGIFZLYV8UzM2rfWueyEVQw0jrC5SC7eVoiIQ9t7bkGw_mooqod7KdIDIIyeaOpe-7xd8EqntmOeOl2EYehTeH2oaUwm-SWSfE53-Jf8GzqHMYLsXO0FcYTkZO2RCl630YSJWOQ0J_Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key5","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/0b821b69a2a3451793d33595b4b52674","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2i-Yevb0gLnOGSWkCrRSfbsui3vbi5PcXH8mYAA-O5DF64zVu3tgj7MD1bHG9Xnw9KX75MRwPFZoZnXByNEWEPyndhbOsNTypLxcFYagDEB9tMH9oO_M6SO7pOotlnqKT_Zhf4w3hWK-Gsrmovl6T2729nyAOmbVjNosC-u5JCU128WXpnel8HbJXKMjtmGDVKCOBErTm1ZYTeGjr8nMnlhnOFbaRkGST3c3YcaabJ0ZZQ7BVhna_ddt4de5yGxfNUi4-E2KwwcC8EWBWAL4idDfeaRGf-J954hMdtQXvIFjM4ovpZtajP5OjjcGsp9spfChZ4UMsmk8LMWptzjukQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key1","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/e2105e596e1244a496166f11ef3fcc83","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"q_cGt1m0sRbgdPQvIy5YpXC4LQ49mOhVO1IH4XoTMiGgSAF5RtJzSPBWPx93I1Lmuvlml15EroYaudSZRivYgOM9BmVet_ZEAl0yL7FySYG1aepyalxZ1HU00b6Thn0MCYZawsK_HR6_VQsK4uVf0uBiwjSXgAT39yK9M6YC09ny5Tokdxi0CtlI88TBzhGVcsU4GBLB7zziUMsIdMNvU_08XXMdyFO0MZCCtZ4FKQ-LWrMXTd9TonbeyxHjKK55RYk73vOrurPdtncmL-7Tal-ReUfWNa8IBTbv2-5HF9pKeWiugPsYx5LZDkeMPShLLXLhUl9IrAWNJ75TbJnqCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key6","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/06c3cfdcaa30440e80108348d890bfe0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"70-948DTxaM8NbPNVnBTYQQ9bBjrA1jLjmDHW8RHZA_DvPxLHiTOLIcXX_YoZNVpjqzvBMhtoyHawmD8b6dKeyeefqkjXryxFBo2L89IDp2MKsg8iG75eeAP0p6FFWBljpfwyduuUCsOZ_x5M6_K5M3aaC2R6oTedX5Gp90dZKUQ97W4S1Im8hW0qrg_HM09vQ7RZ5w_reDC2hk18c6CnERE_W7Z8Q3AEoi17t3cRez616DvLWZxkj2YMyP5mTnYaniSIbpgBU-Eqb4UVKBAAScLHpslfS-cdQr3vyYeIOI-EO1I2K5gLq_2UVn3-VL1fySHw7zvkS9bX_TkdzZnyQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key6 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key3?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key2?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key1?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key1 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key6?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key2?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key2 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key3?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:47 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key3 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault92670ac9.vault.azure.net/deletedkeys/key4?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:47 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key4 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault92670ac9.vault.azure.net/deletedkeys/key5?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:59 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:47 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key5 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key6?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:59 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:47 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key6 + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_recover.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_recover.yaml index 4ee4fb170618..e24f206c563f 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_recover.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_recover.yaml @@ -4,2604 +4,2008 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:57:22 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:22 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key1/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key1/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key2/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key4/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key5/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key6/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0","deletedDate":1564527444,"scheduledPurgeDate":1572303444,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key1?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5","deletedDate":1562703477,"scheduledPurgeDate":1570479477,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:59 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4?api-version=7.0 - response: - body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:59 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 200 - message: OK + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 200 - message: OK + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key1"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:35 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key1"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:04 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:37 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key1"}}' - headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:07 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0","deletedDate":1564527444,"scheduledPurgeDate":1572303444,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 404 - message: Not Found + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key1"}}' - headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:10 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 404 - message: Not Found + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5","deletedDate":1562703477,"scheduledPurgeDate":1570479477,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 - method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0/recover?api-version=7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4/recover?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3/recover?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key1/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1/recover?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key2/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6/recover?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key3/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2/recover?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key4/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key5/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: POST + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6/recover?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Key not found: key0"}}' - headers: - cache-control: - - no-cache - content-length: - - '64' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 404 - message: Not Found + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key6/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '64' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:17 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '64' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '64' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:20 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '64' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '64' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '64' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '64' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:26 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '64' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:51 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key1/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key1/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key2/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key3/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key4/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key5/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key6/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key1/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key1/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key2/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key3/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:55 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key4/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:55 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key5/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:55 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key6/ + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_crud_operations.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_crud_operations.yaml index c4fcbb136ec5..311c72bb7799 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_crud_operations.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_crud_operations.yaml @@ -4,409 +4,327 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault9627173e.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:18:51 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:58:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: - body: '{"attributes": {"exp": 2527401600}, "key_ops": ["encrypt", "decrypt", "sign", - "verify", "wrapKey", "unwrapKey"], "kty": "RSA", "key_size": 2048}' + body: '{"kty": "RSA", "key_size": 2048, "key_ops": ["encrypt", "decrypt", "sign", + "verify", "wrapKey", "unwrapKey"], "attributes": {"exp": 2527401600}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '144' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault9627173e.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/1bb7bf47dd094b40aa9c050474731167","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-JtT7b6aQoFd3zphPJ6UkTUHc3j0wzUXYodlpplJVWbNc0wOkaeA41omIFcMIVekvTmFJrFPMw3NFTwGeO0TrbQvQJtmksfIx3dTPWOG4zlWcnWrHMhSS2m5HZwYQPWFhSHB9VtgBE6fCzosaInazhiI61f1eGULobYGiRWv3fZ8Ez4iF531AC1RbgYT9uHoOCZ6a2LvwBOOEC3vGLJGRy0A9Ez-s2Yek_fy95ZVySOD7J6OSh4h_GC9roVICi0v9fHwGd8MXCRnKzq-lUxrylIsyfXU78PbG4rojGMQswD8oPfkONH45jWSBe2e2SXkx-HiRQ4VzbMKOxm9bpSYQ","e":"AQAB"},"attributes":{"enabled":true,"exp":2527401600,"created":1562703532,"updated":1562703532,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/5bb4d99959504269a7f5e4bf00ae97a6","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"pmTUlox1v_IPM5MvQyBqp98q8Xhf9Jl_sLc_Z-GN-MSIEXJUuy9otFpP7AxaiF_EpmRWHfhvnnYvjHMEiye29zhavf_nreGFJFoTtWi0ONPF9CCEjG1xyxwnp6wA6EuvhdVzY7NZAlgqQOGULH4QSFsiQw4WZrEJBdV3nsV8aBAhe7uDhHEuy9GZR92l1p1QUrMwOfW1-ELKV0B0naLY5bScduOJADZAe_C6ChHye_e4Ha4L9xH0arfgf5A42t7UCYF7N0DAKK94EDRHTJlFXWt--MzFatkLQtaAYrR8PhBIRB3lwmPmE0LS73KHxOMqBJRlilUMCUxTUXkGYIuxsQ","e":"AQAB"},"attributes":{"enabled":true,"exp":2527401600,"created":1564527529,"updated":1564527529,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '673' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '673' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA-HSM", "key_size": 2048}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '36' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault9627173e.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/ab5beb5937e94d788ebb0ccbdc4859aa","kty":"RSA-HSM","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"pebUyWT5U8L33ZSuWtyPAcoHvB8gOQySsc1PJVzt03rA5UJrfwtJ4Qr5sHS4phxkUmG3gb4FzUHwztAPRaTdwquqM7b9Qk8OPP1BRZeZrrM78iATXd0gM_xzcFs6GE58WFc-ZFVTC9PDVb9ktwDwwf5nSLGsPlqW0dPZEaOkFwv6w9RBqyJtdvGw7zQGeKm9oRG1eQXNSenhJfiYLyDM1Ve6eiSYEBwiG3KAr7QxBIoRxIqecutM2e7MwLWedoPr0BwMUnI6x9k78ytHv9YaHkRU0cLN34o4t4sghoRGape1sg-SR8NW298U5LyukSRX68zAn89d1LU2X-gBSUA9Yw","e":"AAEAAQ"},"attributes":{"enabled":true,"created":1562703532,"updated":1562703532,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/eb05248e5ec54109bf3b4cc3d9880773","kty":"RSA-HSM","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"rlLVJ4CJfxs5CnDFBNqjxlE7c5pcfDFU7PR3v47sL0r0-pPHBya1yUY7Q5FaqCqOIaYAZ9y48MLmcBWHrY5A1xj70DnLXc4ss5KazZopPjCGDLjNzzsfd8YSb0BGm3CrmaYgTXWy3KUbBNR8GX1KaSZkL_OtlPh0jHluHukTZDCsNZWXFqC2ffms31dh-IG9JL-zwtb1zDHJ2oBI43Che5nJVY1_y4ebFDXanwyHzbww2KkbXupR2mK0GqbI3uvjD4v5BEJCX6mCtY2gEW35B1K6lsFgqEFwybD8zbjGKPmrLE0WwFZoXXtQtqch0dica4G4lZm2oX9LnHq_3tPYUQ","e":"AAEAAQ"},"attributes":{"enabled":true,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '662' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '662' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: - body: '{"crv": "P-256", "kty": "EC"}' + body: '{"kty": "EC", "crv": "P-256"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '29' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault9627173e.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"uiR3274tb0zkEvMPr_sxHsmHhutBdxftwkqFiamW1-w","y":"7xk9VqY3UcNGM3V5gnmtHb3vq_q1Q36Sp4s1zA7lDKM"},"attributes":{"enabled":true,"created":1562703532,"updated":1562703532,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"CYFBDHsovMeX0Skq-Jz-spYFLV1KvE4hOEOizQIQHz4","y":"J2E_YSzULuCNo4LZDDRn8IP7inCBoCS-85vkGd8pGf8"},"attributes":{"enabled":true,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '367' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '367' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault9627173e.vault.azure.net/keys/key-name/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"uiR3274tb0zkEvMPr_sxHsmHhutBdxftwkqFiamW1-w","y":"7xk9VqY3UcNGM3V5gnmtHb3vq_q1Q36Sp4s1zA7lDKM"},"attributes":{"enabled":true,"created":1562703532,"updated":1562703532,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"CYFBDHsovMeX0Skq-Jz-spYFLV1KvE4hOEOizQIQHz4","y":"J2E_YSzULuCNo4LZDDRn8IP7inCBoCS-85vkGd8pGf8"},"attributes":{"enabled":true,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '367' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '367' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2?api-version=7.0 + uri: https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"uiR3274tb0zkEvMPr_sxHsmHhutBdxftwkqFiamW1-w","y":"7xk9VqY3UcNGM3V5gnmtHb3vq_q1Q36Sp4s1zA7lDKM"},"attributes":{"enabled":true,"created":1562703532,"updated":1562703532,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"CYFBDHsovMeX0Skq-Jz-spYFLV1KvE4hOEOizQIQHz4","y":"J2E_YSzULuCNo4LZDDRn8IP7inCBoCS-85vkGd8pGf8"},"attributes":{"enabled":true,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '367' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '367' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f + - api-version=7.0 + - '' - request: body: '{"attributes": {"exp": 2524723200}, "tags": {"foo": "updated tag"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '67' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PATCH uri: https://vault9627173e.vault.azure.net/keys/key-name/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"uiR3274tb0zkEvMPr_sxHsmHhutBdxftwkqFiamW1-w","y":"7xk9VqY3UcNGM3V5gnmtHb3vq_q1Q36Sp4s1zA7lDKM"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703532,"updated":1562703533,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"CYFBDHsovMeX0Skq-Jz-spYFLV1KvE4hOEOizQIQHz4","y":"J2E_YSzULuCNo4LZDDRn8IP7inCBoCS-85vkGd8pGf8"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '413' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '413' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault9627173e.vault.azure.net/keys/key-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault9627173e.vault.azure.net/deletedkeys/key-name","deletedDate":1562703533,"scheduledPurgeDate":1570479533,"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"uiR3274tb0zkEvMPr_sxHsmHhutBdxftwkqFiamW1-w","y":"7xk9VqY3UcNGM3V5gnmtHb3vq_q1Q36Sp4s1zA7lDKM"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703532,"updated":1562703533,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"recoveryId":"https://vault9627173e.vault.azure.net/deletedkeys/key-name","deletedDate":1564527530,"scheduledPurgeDate":1572303530,"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"CYFBDHsovMeX0Skq-Jz-spYFLV1KvE4hOEOizQIQHz4","y":"J2E_YSzULuCNo4LZDDRn8IP7inCBoCS-85vkGd8pGf8"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '544' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '544' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_list_operations.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_list_operations.yaml index 6c925adfa57b..d69c5663290a 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_list_operations.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_list_operations.yaml @@ -4,612 +4,492 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key0/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:59:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "EC"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '13' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key0/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key0/8bd25d6c7e4d4c95b249df2ad1a06f03","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"kt3oH8H10CKe2_VPcIxBJ4PQt6O1eCkmCrtyHmdmF6Y","y":"Oje7K1kKsEoeFQn7WZgJ0pZ5n325HykdIeOXoOgVes8"},"attributes":{"enabled":true,"created":1562703511,"updated":1562703511,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key0/99a194f5b97f44ae9125c47157810df2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"b-JfAkvIfu_ILrlz684i-pj0cpd55tzyHDWcW8T0OaA","y":"w1TcOgtEU3ehfOd5jRiZl9PNRHieGIDDwUcWCGuNeQM"},"attributes":{"enabled":true,"created":1564527584,"updated":1564527584,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '363' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '363' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "EC"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '13' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key1/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key1/986a1037ce7845eb9b3927fc07576f12","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"Ulzv_dmHaTAW68YM9dNRAAtYHSxfIWG1pJsl_ZVknvo","y":"ywMBREwV1gC0OBCHul6Mm-sbwku3DjQA1yK7CpQyFBk"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key1/fbc0bda5d70640fe85e5fb435aa55d93","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"7q_mEVJXTIDf7a0CVque6SFN5tXoJyzlZENayGeWsSI","y":"rL-ILnqU7evEpes10rf3xzsnlEbg6gdsDfc08s8LN4k"},"attributes":{"enabled":true,"created":1564527584,"updated":1564527584,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '363' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '363' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key1/create + - api-version=7.0 + - '' - request: body: '{"kty": "EC"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '13' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key2/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key2/a0501fcbc568481b829637c6a92e4abb","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"--BpzoUqMk2FLfcY1VnrLKSzW4GtjfBu_cVUFATu7mY","y":"BU_Q-pS8w3hH9elSSPe0jKzKj4Ey03I3GdgGy_tS7mo"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key2/21946cb8e9d14344a7c9ba8d3db75227","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"Qw1ppcyCUcBHgQ2UEyuTdPYTwOGn7OHLxsT8lXeKdRY","y":"gTWfs8Cjd6QWnWeaAR9lzVePttSlFLzoX1c80aNAkyI"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '363' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '363' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key2/create + - api-version=7.0 + - '' - request: body: '{"kty": "EC"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '13' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key3/b62f8f82b76b47549153d116b383815f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"VQqpb7RotE1iQu9i-7iRZGg8GOpxVQQB6tx_7tMPMZU","y":"SRqLIoGAGpKgrXYP8JwBPSEdW50xNPXpMOeh4YkpvgI"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key3/8bb57a6e699544c6b71d279fd8df32e9","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"xs5QeiF_UBlgmjt9gcJPoI_d71xgE8RqUl_q3Gna760","y":"rfbSl_9PK-Pq704mE6SQIyrhDRK66QIme0DEZHi2rPQ"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '363' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '363' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key0/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key0/6b36301002db4081bfc37dc15a3cf31b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"9rz853RQmmMerwKCfQpSONzDOwC9mniosBB0IWOQldmNJL53cj-yYVaXIaXyblWBA3uDkwWFLFvtz8_mxDowBxMamsJ46_njsKswVOHCgvxwilwc22EwEPyxaQimvRipMtU7mHMEyETOhvMKNhifTa3kv7YKKNGrIO2Psa2MvH7mxdYmjFhbPgdXwF_b7cINa2UGrf0fI_aXryJjY7E1L6J2GDAXiBGaVh59FMRU1DQQkRBBDVIzuGep6QLhpi9Jk4fUKYpFwL6ees5KRmg_Ztgz8E15yWkSRmsoEcNvrL6Enb05blHGNc6uCUYrRcwki1VV_mGW-DWEOE0zHaQysw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key0/0be8a06e74a14348be5604f2d9b2f3ce","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tBGkSMbkIgrbJ61a9DarlO_4f08KDkv8II8OHveKO7JCC2oWX6tOuXdn_zK00wY_Z7QkpBcsdStiPVjdyh9EsyqpaMoheM-HYFPNIMFOa8olntSvHs1D3pAoaHlJOh4-w9QF7CQALLHb6AM5t6molo8Upui1Z7XdHGKXX7RO4IYA752AzaLIakjLO3TCAMinZmnDDGAhunUB94_WpsWv1AAJSFSPjDHCz2dakZnLvreR-EVZz9nk-l3R8aQcr9y9p__ksIshnGKwJJ9l2vMO6p7MiK2RJLd-HFzEWDFKkWfYm9iRfp5vcoNxujLbXP2Rde4qvVlW5PmjLiBSLBxEhQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key1/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key1/a298f2b63271489f807d41d71a2e10c4","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wWuHzO89M8QbAl7BsuKWydhq_xj0RkrAsUjJTtRiLJs6CGl4jkvI9jBJb25Wis0anulK7cQKLv9K7MwtZtpLhnbUya-Qj_D9d9BSOCyjm_DFH9v6tNqKuexqKDu2aUrulDxXqUng4jW_4Is7P2g1uhkdoMJ0pzkToEIi0TUETmfUT7SBOgwr3zwPKcLGeO8H5jwT7AS7lVaz6MKFn07vVnE6sVq6Jxi9jyB6IHO7iwRB6w3cGVPexJGft5m3bt9Kuf47WHyOzVHqmwMMv5W2r8Wb5zVv6cVnb08o44OqGKOGXk0vqqiM2QAB__vM5MbVQMK2TcuJiotjiSHrNJZ8pw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key1/6bd05085b2d54b9093127c75e5109209","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sUhJXxGr6fnKoM9o2q_-XBTFhglYPxfx3XpPPRaTCQlS12cWlu9mKBY1RyuJafMWsUP73N8iNJKa4qFF1C_F6PGBMPJ8lANW98WmJwaF764ZpkEkndGC7wCmqeWQkx0s3PH7mG8jj5uZdCVRAkWqGtmPfxBmV9dYRyDWVgr1r26XnqYzHhXclfIlOdg7VLg5xbtJ_rzrGP5PeETOeBDLJy_4iANPL8YVaJg8r75W_g9JjvLm2ieg66uqwvIm5RlZ8RtqcNgUXLlaCmYXL1jFbTP5lRXFPkXFl1DmXT9pXKS43Wo34MFOuU1tCJsHvtXgyeUHUKHpBdbhxSRc-UZmow","e":"AQAB"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key1/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key2/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key2/022d0289f15b460c830fcd30ddfdafca","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"z56wacSTQoxXCtyq_6uTAUvh-UESgYVJy2RbWQ5DMl1ZJDeIHTublcGy8e_kBOUgkiCFhObP29e8DaTEhuc-vJ62XX2EuDzvmMp2tUido83IIeXatP1gb4TQpXAVBviFXdPQNbce1sDZ5XpA4Zi8HCV1QqVyAJLKTJB6hOpwTW_HXG2qpYQVqOhMXv-39ZkWnVWSWLfz9kKDvfbXCeBDiLz7iVDVdB8ELExAi6vz4xjCRZPExQCCvXXu22OsbehfoW4FLb_NhcTjmTQQfCQ-3G_eskXYl8envgVsi5dxMqklnb0aHM3PTadXrY1wcnjLhYL1vgC7LKS7dc8c5rX29Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703513,"updated":1562703513,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key2/a7fd89dcc95045e9adac42c03dcc7c42","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"n1XbURcEge3wXm6Nk0F10k896dMK7xHaM4pJM6en8WHWuP0OJbTM9NzSmtyhZKh0akiphWCgfaycX4aChrB-7tYGxGcNS3iACwuciBbYeE39tzhJ5eD8byzCWUQVJkx4vsMOhICsaZcrc1Rei5b_LHu-U-T0CTdRDGM-Xvc7-5zP0fLWhhgxahTnTzEne_j4LGIp62H8ijge-btNpU4yK_lWMl0JNgtSSmkY9GTfU0hOqBvCQqWeZ2rfOczeROyzk1XEaLIsjBeSK4us8qjg74OpRGyl4khN__eYIjNPf3gO0qTQMljWtGc4iwG5n72tlx9yg8uIQP9fR38O5xXBVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key2/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key3/f9aabe1e98594882908b42b110e3bc82","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tazNLMksNQi1DwDd3CF2qpnUteGfDXKoraalUO1qmpnVVta8m0z3Ekl9QQocQNFoJlIAnG0PHRrnKRdLt5QMiacE4VO61G-KqP7l-2L6CbC1fEywIqE_FNC7U1neWDuSpel5s1v9HSQp616yUz4zGaBMdwzPykyp4bo2MPcRXkrpZjOBUaX2Z9MGW58Q5ic3Aj3l3MrNY_uOj8JdisNSShn0tnzez5QOV1rdEOcYzmzrNCr00xqjY1qE70uhKSFfdIuxKEsRU05dCuJTbAyLKj_vhsnnnyKQEN1pXcQCO2XaH_ZlCsXdvwWbH5Ptldyn2AHJQ2FT9iLGNOmgr820jw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703513,"updated":1562703513,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key3/14a31e671a3542528b59e4dc06e16bc2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vJCL4Hqk2sGCa8jhMLNRXkUW5fxYdXReSH8K7p7ntVCWnTQGxQVo4gWDHT21Jl8hPCsowiPcddNMLBPV0PTH7J4hTtH-Qsf0nTxduGXvsUCPZIE8noWq4ExTUhoiBysZ6ginKjc_YHH8Dvd3Ei9CK7GP5JF2sfswra1MzU9M2sOQrcFy9-vr6HzThDyhSZpfcy3wN4RvQPLKGxS7tv9bpNrUWoP-1anA6rlj3I1qgbbKS6JFr8X8bxfbql77qOAl07j7zpdaPLGONa2WW8V7XOgR9x_2DLwLJxccBXHURPa3YvMm0av_xSuLZIEIk1cQ11WLSRUZemY-PXtXb_kXww","e":"AQAB"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key3/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault96d6174c.vault.azure.net/keys?api-version=7.0 response: body: - string: '{"value":[{"kid":"https://vault96d6174c.vault.azure.net/keys/key0","attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key1","attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key2","attributes":{"enabled":true,"created":1562703513,"updated":1562703513,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key3","attributes":{"enabled":true,"created":1562703513,"updated":1562703513,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + string: '{"value":[{"kid":"https://vault96d6174c.vault.azure.net/keys/key0","attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key1","attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key2","attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key3","attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '707' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '707' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault96d6174c.vault.azure.net/keys/key-name/versions?api-version=7.0 response: body: string: '{"value":[],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '28' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '28' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key-name/versions + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault96d6174c.vault.azure.net/deletedkeys?api-version=7.0 response: body: string: '{"value":[],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '28' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '28' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /deletedkeys + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_backup_restore.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_backup_restore.yaml index 16f0745fa807..84db990cff27 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_backup_restore.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_backup_restore.yaml @@ -4,256 +4,202 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96041739.vault.azure.net/keys/test-key/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:00:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96041739.vault.azure.net + - /keys/test-key/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96041739.vault.azure.net/keys/test-key/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/7089b08b10a64ec68db241e20e2109d0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qbGcivUVxthKiCxcjxOGdsiItrjjTm0_-o0gkZmRSDlEY4ixbjJYBZMwZLxLm7_ZzoGTVTdON-_6bLu-ZwFqAAe2Nc_HDLkL3FTn1YkjTSA5I6FTXI-CC79m3mPLbrVNkHRUkN7QPpl9Qak8RyRl4TA5XtOp_ztKm5Lfuc1eJsosaRdqaMe2UlEbu0XCdYDoP1UoNRAhrUZwli-GHH6yWQxq0SBtnfUsXH0CkgprrnpDYM3dxUkjJJ6IRpW4acRXrFDg-ccCBQDRLty6eSRehugfZyTGciaT4fBcj245OjytQZHxz2ZGixRxN0YsvjoZXqquXKqfkKEcknMDNapyFw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/d2c863b455c9439b87fc78c6ac184217","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"uWCbdAq6V_Z3_JRNeKK4o27y-v8lL_IUNGXQHywjTU4aoVK8iDvM0ChRMhlChsMcI-SyGaAk7kiS2ywdNx5JI3rcaZiiasFZ-4CUnUQbOB_p5L_r2dDXvfdQzGaigM6cttEW5Iwze5dEd3BOcDQumxRrtSJNld4AlxEK-Kp7xaOUFc_2yAV1QPvELtjJLN1zMNw12FXNqocpZwZ8t1BGvvXKYfz3yrS6rq0nG36n3S1yA9Cb0NnrTjp84na3diRQXpuaUg65QXrbhcBW6o1aKTsuEAVH5FAqDliBa4v5lqTNsWxOGS996rMfjsJHJQ_fymvIy69zHrMe2UPupwz_OQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527628,"updated":1564527628,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '644' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '644' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:00:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96041739.vault.azure.net + - /keys/test-key/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96041739.vault.azure.net/keys/test-key/backup?api-version=7.0 response: body: - string: '{"value":"JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLk4zTkxnQUltVllzMTBLb0R6T2ZkcGI2aHRhMFBQNGxQOXh2VWQ5dEJEaUE4X2dPa1hQcnFza1dMTDd6d1psd2FOYlZNbFZpbnVzbmVwZndNUnlQdENmaHZUSjBMWG5PdUh0TmJfcTNpY1F1LUt2UnhfTHZpaGp4bnVCMUtKNW5ac08xR19RbTVPLXEwdkZySGZJNE9ZQjhIY01fR1VaOGx1dlFYWW5aSl9mY3ZaREZmazlWdVRzaW5fQmxCbXN6Q0JrdnA1LUFrMkwzQXFDUml5TUNjNTMwTVFPbjI4eElXTEhUcUdBTHpLM1pRRTNFMTdqVk9iT1ZtN2ZoWWh5Y3JHYjJWZFpQdmkzR2Vmd2xQZlFNal9VUlM3SzNUc1FkSnRUazREdVdsWkZJTThHY1R1NjZ0dDhIblA5LUE0Vjd5RTliQWJnWXlCZG9QUnhzem01TVg3US54dXBZUjhXMGdvNTI1eUlCSVdsUzF3LnJ0MHZkWFFDUlAyYjJ5b2htdk8wdlRjY1pKLWVlQWNlVHF2WVpEd0tqX1R5SE5iV0RQcFQ4ckN1Z3JpcVJ6ekFvY1hNNDZWME1Fc1JFbGNKTnBKNVNPR0pzeEQ0dVM2c194aDlCQjgwUkRxZTRHcllGckpsSlc4Wl9GLTljMGI2dm54aEhvck9vQ0VxS19VU0xTcU1wNE5pS05CMlZ4aGV4My1NSldJS0Q3M1BxaTZQdnU0MVZnUlR1NGlqTmhMeDJYQ3NtRFpxZkVuUGZHeHFQcWdVYTVvRm9uYUh1enNyRV93LVNORlhlWFQ0Skp2SWkwTFNMRDF0d25CTkVpNUo0Qk16TzJzZExJODhWX001SlpBLXp3RmtGRGNHUnJGeXJkOHVwaDhMVmFrMUpKZExvWkxocERmRjRpQWVLWW0wT0ZtdV9zNEFzbWJCR3ZuTnpUS3IxNlpNZlNrcUtuMm5uUHc2aV9JN3FzR1lEX2xEdm5KaGx2cmQweW0zb1RlSEFRR010OFRZRFhqNXZTejUyNExyNC14M0JMaWx3QlI3UF9SQVhfa2d3LTFYbjdGa3pGM0lscm8wMmNsSUxPWDcySjJUT0JRT2ZZVjRyOGxscE5Bakt0SEJ2cFFRMXV2MTRZbkhhN2VKTVlWWkEwV0VnSlg4elhJb1Nwemd4VnNLSTlRU2ZQLWZQVGdMQ3VUNm1iZVBHWWdSczE4dDdjbGhJaTJwQXRtaVYtam5GVXZJMXZwbWJzekg4SDAzYmZxZF85QmpHbzlzRklNVTBwZjR1Rk1aSmpfUnBldU00MjBmak91clpNY0xFV3lYQm0tU0E0ZUdjb0ViRTlqaVA3RUlveHVOSE5STVpWYjJtdTVzTHplZTNlNXJENzhMazV6bHpld1hPRHdyOHBiY2t5N25hTmRhMi1zOWF0WThwejBQZkhqUGpkdEh6NDEtZkhObl8tb0t4RWU4RDE5LWhRY3pGZkZkaGUyVloxYkRQRV9FckdJSGg0dndSaGNudXllS3p5bFMyQm1WSUdMZ2xzN2lRc2Zta1NpUUl0ZnoyVjZFMGh4aGFWd09PS21tNkpDbWRLR2s3aGE0a3h4aHRxNHZoQi0tclpFTlRTamc3MHdOOVVacFVlUnFQanYyQ1RVcUQxdXZPMHRRTW5zQjRVSWxwa3lqTlpaaVJqVFNaY2FhRzZGRXpDUVczV3c3T0l0S0FBc1AxNnJDYklZVUdRTkZKcUpYSnMybDEzR2JkTTU2OUx2Nnh4V2dSUm1UQ1dKMnJSTEtvY0ptOTh6S0gtV0dKQjA1cVlaT0JZYTdQOVlrdExNZTYzUkRuc0RoZzM5N054UEJFT1pvenh4Rzk0U0tLSUNyUXJYMEJvYmcxRUFlcWFfY1lvMWpIcjUzTFhBV3J2Nno3UHFCYmRVSXM1cEI2cGo0M091MDhzV0c3UTVyREZkd3JHZEpmallLR1hQZnpJcUVJWi02a2xZeE94cC1kazlKT1dpZFdQd2hmblhyWFBsa1ZnOUhDMkdrYzVwM0ptMlVCWE9MQzRZM04tYTBYT1UwSHhjbDhjbHlwVEVpNExCNV9VU25sSFVDVERuS2h0TjE1WEZieG9obnpySDJRYkFKeWM0eUJKeHNZUDRJcVV6QTdBdklfYmpxQTQwX2UxNk5yMHB6YktIU1czZWlLTzBPSmJqa0JONnBlSjdveU9vX0FUU3Q1RGsyWW5DRnBHMDFnY3V4aFdpaE1NWVVzdm1Td2RQb05FX2xnazcwS3FwbG0zbVlTM2UzSXhCNnA4NFBFT3pnMUpwRUt4U25EcHZ4SGxUTmJzSXprUTlIN2Zmb2dLcUx0T2VySkg5NGZ0d3hVNGwwRXFTUHRfMHVFTjlBLTd3WkY4REhhOHlReW9wSUxkS0JOZ0hsN3p0dzJVOVN1TEVGeTM4Wlc5THllVWRqM0dDNjN6SURXM1pHM3B3MDVHSVlMVHQzdHI0NS1LdnZlaHpLYmhfQWxGcTFnaGV5bS11R3ZyME54cUVuTDJzdUFyUy1oS2ljenZiaFNuUFRuQTNHdkVaRWZkVDcyTW4xT2JTVnBVNzZSZlUxand2MXpVOUZ0V1l3dk5YVHU5bF94cmIzSGJVeE1vQ1l2cjJnQUZ2RXVHaTJwS0NEb1J4LWlRcmZlS1Q5Rm5xZmpic1RxQ0pseHViNDA1MjRuVFhTWVJQTnJscEhJaVhBMkRyUGtBUUdGakcwTG43S2VrY3V5ajF0LVU0T0dNM2JaYnY5ZGJPV1hIcVFQUGhrcmNvTTd0SFVyT1lPUmM0ZFdsX1JyNHlqYnRmQl9Zb3BtOHl4ay1uZUJ5VzJqUldaSHhMWC1vZUlQZWFBVFBvTE4wZURsX2F2bTNiY2hfb2xNOEFfNExTdjlDMzRwN3BkcnVtd3ZaWTYyNWpqTFBxVFBOMTFzQXRDVDdma3FUODZxUU0ydGkzS2JBRmVSY0ZtTzRvQjA4YzZRWDRCWTJVQ21xT0Q1OWV2RDBhanFBdnhOSEZ4eWVnS21MZERoREN6MmJIbmJUMlhqQU53aUhIQUV4SnRINmtSMGZiRGF5QzRZZjZsZUFva2xVeF9LaGNwUjY3Y29VZWN2MTJPa0NhZXhCZFJKTmI0aGUzTEVhQ3pOUGZ3YXc5MGVMRnE4RjlKSEFLdzgwNW9URlFyMkZBcWl6OEppMnRsR1RsTW80YndNM0FJZUhpTFZzU0xheWRJMzJRbWVzeE9ScG1ZNVRPSHZLMW5QaUduZGZnWkpNajlpMTdOVUlKcTRaeDhHN1BYWERJcWlseU95UWdvN3UtcTlhd1VmcHh3Z0tMb0pQNXVqVXZucWxBV2VPZ05KbXZNcTIxRU9RTUdZdWlROU9CUTJROXpyQVNXWC1BQW1qemZEUENXcW5BOHNUQnRTZ21FY3l5eDkzek5wdjBnZDdhd2l0LVBlVlZBWXpfRGxickk4dkNOVHZxU181ZWJwZmhPZmlkbDBJV1lBZEZQOXJVLVI0M1JOZWZ3bWM5V1pLek1RZm1HR0lsN01RSjZBQ1FORVNsYUIzdXl6RmVKeVdfQWFTMWh1RS1PVGVoVGpaWEtKY2VPSEo5MXotSFFQNEk5bVhrTXllRDh6UFZUVnVNN1BUNnRYcWNoR1FSdktIckVudmFUZ2tsRGt3bXZHOXI5N3FGQ1htRDB0Um9pSXFKN3lSNFlNN0ZLVWdaRnRpVEVvWEgwb0tKc3ZQQzZBcU9ZcXNlTVBWN0t3VGdZbUdjTWRFVlBCT3BBSkF6MWtyVTN3UVRtb1pDNlhhSlZ0VHptVGo1QzhFekdEMkFsT0VFSjNrcnJyTGVRR25hTFdhOHlPUzVWa3VpNjNvQ2RhZHdqLTZ5ejVtYTQzLXQ4Slp1a1UyWC1HYTAwZ0J2aVhWcnVuNW5BczFRMmwyUTlMWlVESG45UGdCd05SNWM0WUN4d1l0a3FmR1Yxb3FLSV9rQ3lSbWYtSVdTM1BLbFpNQnZYaHFzakIySFd4aHR3RlhJWkpPZ09YUkcxdDBaNGVERWo1b0tlMGFzdHNvNnpySWZ5dEZMMHZhT2oxZ1VjR2R2ZHc2UXRNLXJ2el9tNmRUWktLb293YmJpTmt6SGRuMEQ4Q25MU3JKUW44YmstWDJyTm42VmgzRUhZZWNBSE9BNWRyUHVBdy1WNnJXQl9FblV5ckJwYVVUVTV3MWhNYnMtcnY0OUc2bk1WYjZtTFVkU2ZCZURfdE9XQXptZXhVdXB1eGxkWTdOVGRfTGxKRVFxNUVQQWt2SXM5N3Q3WnlVMVZuYzJ5N2ZXZ1N2NkVLQmNmanZDWno2V0FjaVpPRkhWcm9hQ2dsM0NFQzFkNW1wcHluWUxyS3FRRDQ3OGRoRmNuQXp3WmgxNVl2NldzR2lkRGRiOEVDQmdOZ0tZakJ4YnpmZWZJNTRtaERrRWl2Yi1nYnhfZlJJTWV3MWdBb3ZKTWQ4ZnJRaTNhRExBNVFySl9ZNkpMWGtKdzNUdVNpV3dOX0pvNmRJT1lTTEZhdk9aMXZjaDNWaTJKcWVJXzAwbEs1TGo2MmZYNzhHTDBsd2RGRk00azVBUjZMVEl6bFlNRVJuM0dHbXN0cUh2bWxpVFkzaGNnNXlpTEx5dmRsWVB0WURQTjVRRE1NaGdWdFctUm9QMVNHbk16cVVrU0pfcUxYZ3BzQjNoanFkbUFZSEk1cXJDWkdyR1pieV9Ock9zVGMxczV5QlhGOVhkWkFDZkthWFcxdmpaTjJFSWEwMzRNOEw3ak5DdFdCRmhzM1VRMm9aZmJHQ2ZqbFdqdWJsV3VON2pBWDJTVnQwREppb2ZBZFJUZXhwY2hrU0dNRGJNR2daT29Yc0dJM3I4NUttV2RQOTN1WVJ5a0dxVVBnRlJxMjVDaVh0eF9BbWdVOGRmb0F3M29takNMcTZUVUVkZVoxaWZJZDFIeWRWdDFFZFlCU1Y4cGU0dzQyVnpxY2FONkNiYVh5T2NqX0ZicUJsV1owM0FES0oxaFM4Zy1wVDF0aG9SRWQ3U2RhYlFfUFhJVlYwMFRKR3AwdS1VYW5kZ21zU1BCYTU0QVVIQjBrbzNWV2ctdmdhSmU0WC1DY054SjREbmZzVTVzNWlSVm15aEZmajNBUzVTREdPNjlMQ1RoZUlhd3d4M2NwZDZHa19nTjdwel9IbFhCNTkycFA0TXcwTk9IUG5lQ1F4SlljVkpvTC14ZVJBWHMxT1VJMDItcy1tWWE4bTRGTzU5OVZwbnBWQzd2eEZybmluUm0tU09KSktSSDJYSGRBbjlTVTZlMUlVMnZJaE14djBjdHh3NHVWa0d1cUhnRW9xWWYtQW01dkpLNWs2dE1BSVI1RDAzdlBpLWtGY2w1YlZUNnVEOWJSQmVDVnZXdzZac2lydjdmMEdPcXpiTFljWDZVSEtOYXhPV3AzMWxnRndEbjFQSG1zWmZJaHB2VWJCd2tocl9VZFNFdDdRRjAzNFdsRkV6TVRTU0dpZ2tCTlltNTZ6QVpfY2VSaS05TG91ZUUtaS1aLTNBTC1vSzVfbXNmOTl3UkdsZ2pWb2kxYy1PUTZQY1hPOEZERHNTVEw0V25vdzdJUlByRnRhTnRBcDBEX1RQNmgwSGpqYnFjdU44eU40MEhvU1NXbl9HOXJTLVozRzM3cURsZkdEcXZyOWROaFB3d0twN1BHNDZNZWF4bkI5dGYxSEZ1S2h3dkk2MEZLMC1kVFU4b2pqRDQ3SS1teXZMaDJITy1hTU9PMS1iQTA3dkltT2pobWh4RS1uSXdzQVk5TURvQ1hFQTZYeE10ckdFQkNOVFVaQ1hTSW4wYmpUYTVKNlhXLUl6XzdLU2dhclRla045N1RMVzdFdEpUNXFwekhYajViZld6c2JKMWF5bWVDczFybFkyZjBLSnpLXzk3QmlCazlMVjdwU0VfX2JOcTFpa1hvZlVRZkFKekhaWDF0M0xRUzhTUVRhRzBsX192em9pb05NeWhTZ0tUR0dGenpabE5jdmRCRTJEeURLZ2VkZ09lZDJsd0MxTjg3bFY5U1pSNUdPbTV3ZjY5MmVMYWN6cEZFMGUzUHg4T002TlM0UkQ5QXgzNDhZcU9RS2tlTElFRjR1UnVzdTlGUjhDZ1Z4dXBlckxabFdaaWZIVkdudDBrdWdqSy0zU3FwZVg0ZlVlbS04LVZBY2V6LVNpbVc4Q3JybnlCSDdWNUlqamk1MEZUNjFFVUh4aE5JeFQtendlLTRlUkRvWUVhN3hwdUs2MDNZTlFUSU84a25QeHZaUE4ybjJoZkp3ckRhbkxkaVhLSUxWUjdONE9RcGYxd0RUbFplNXJuTzJQbVBNSk1zZHZvUDZ6ellYakN6SmtqQ3kyVTBnb0pYQ0hrWi00Rm9FZkpnQWJLNGlEY0lLWGIzTGZRSE9SQUFfTmx4THU0bmFpdElaUVdfNktqR0g1eXV6ZXFKdnVqTHVqam4tUXU5MGthOU5JaS11QUxxcU1QYTJ6S0padnJlNkJBTU5QTU1PODFFckRNc3lNTDZ6cl8zSWl1ZDE1dWtaRjVDQkpmSXZWeklxSldwanJiYTRldGF5S0dLUGZSc1k4dUpNU0daUTZSa0dra1RrWU1scnhlaG9tM2JzcG5QSkJqMVUtaU1paDlKVEE3d1JMa0RsVHEta2lKbDZQYkVielVsQ2RvRFNLUkxiR0RlLXEtM0xWeV9Wa1E0OXlrUy05Tm5GRF9PTDVFNlYxSG9JMW10dVI4SmprOWlsbWxmR25NVHp3emY1UGI0Wkp2Tjc2WWRZZTE0dnoxbWtPZFZnVTVicm9PNl9aY0NWQ3E0MUxVZVhmZTJDZlN3SGJfM0x2aW5ZMWZMMVJ4UFhIZzlwendIX0lINXFjRWFybUdQcFpVNUFKenN6dVNXQ0k2QlNEdmNpbnptN3pNNjNoUlFxNG42Z1U4NERJWjRhMW1pQXJyN05rbjlDVnVRdDJEWHVUcWV1N1l2UkNtUk1qNVFYenVEeHJzdGpfaHlIdHJmUDFNdmlxWnFMckUzbzZCRm1vZlVLNGpWUEJzZC1YaHMyU0J5dlFjVjlCQ0RjRGU5X0c3bWpobTVRelprMEZxM0l2d3BpWWI2bkc5Uk9vZzZRQnJQVjFwUExjc09TMm42WWoyX0RNLXFBSzNLdVVMamdXRlNMNUVyRzhwUldHT3ZWU0p2X1c3VXBLVHI5WXZGUVEzbWZyN0REYTVER0tRbzlfblRyVDUySkh0bTNSVUE2bzlqNy1hUUVidnBNUEx6eDRGSThGWWRtejQzMXlpMDhEbVMwVkU5SVYtRzhoOXpJY19yZjZsWmU1dS15bnVZNnJQUV95bGFYSGIydHpLb0Fjdkxpckw1RVJBZFNBNk96bEU1SVdZcTNhU2JPTUdxN0dCc3d2LUR2UUxlRGtBSWhQbHFyTGpfX1pxTHkxRTVrOEt6cllnZXBjdUc4M0I0SEFfWGp5RXRPMDQ3cEZma0ptektBckdOU2V6NFN4cENIaWdyNkZIMHpaVWYxdVNFNVFPeGliUVVJa0ZQV2FQcUUyOVV4STEyQ1JETUtQLVlpZjlWQTd0NjB2XzNPS05XUVlHZl9UcGRKM3pEaC1xR0NOZFlxa3d0eTU0TUtvU3BLNzZ0X1lEZ2NCcm9SNm15NmZtbVRUei1lSDVpS0ZvSnFxYWtoX0o5dGhrU1l1alNzYm1zckcwMmZidmNMMW5uOURRSUdVMlJLRGcwWWI1cVVoek1nTHBraWNjbXZ0SGlrQVFmSW9nZWVmNTMwTnhpb3VBOTNYSEd0dTVfcHVYVGp3REJzZjhPdGQ0eE1LMWZoYnFvZXpGYzVJRklxWWt5WXlBMXFCN1E3VmVwc1djSHF1cEVtOHhjendOYnhyeXh4dmpHaUJwbjllbW9HejdQc1RuWmpGRnVRNzZxcEhqblRqUENWRnFHdEp0N3pEZnBkcGZ0cVBYVk1sQldzT3NOY2pYVFQ4eUJWa0ZSbVN2akNzeE55OHZuZGFEZWh5dno2Z3ZRbXBzNWRGekhNNmNHOWw4M2ZSNWxwTEc1a0JQbXlkQkNiRno2NHhsX2VGVW0yUFVtTWI2Q1ZSaHBmNXJjZmxHWGRRWDlDLVBGSjFVSG1pc1JWMG1VM2xnekJuTWpDSzg4MFctNGZodldLTFZ4OW5KbEJObTdtWF9ZeGVMQUg2Vjh6VFA0YTVRaEVIUGVvVFJ4WlEyQTM4emEzcG5iSS1YaXZsOTE4eHBGVUN3UExpbGRjU2ZGQU5xNDk5OU43X1lUVmd4bXRPTi00YXJkWWZwbE9yRnMwbzRzbEhYVVNOUUtNQUFLNXQzbGFtcDVNaFZRUWExWFAwVk5SdV9KS0lZYUJCV1V5T01hd25vZDA2MEY5T2N2Qkw3ZVUtQlJkak5NeVgyMFRMT3NkWUQ5SXR6STd6RVFIX3l5R1FEdVFfall0X2ttTURTMl9FTFd6TVhDSUs4Ni10bGFCT293dnZGNlVpWlRDM2N5WG9Ic0ZoNzFjRC1MWks1VXg3ZFhRNmR4bUtGRDE5SG9uNlQtV0FySk5lOEk1NGpUaHU2SWZqX3M4VDhMQVY3QU5jMl9INGZzeHFuLXg5MjJ3T21BamQzNmYzMF9wMmc2VWdlQWZNVkFFc3czWG1uUjhhbGFLOTVkMnJKSF9fNzVOSDNIUjl1RXBaNV9sLWRhNmVDOGdvUDBLbTk1UU4zeEtVSWxjb0Z2d3AwTTh4QUZMelN0RUVSN0l5dDNGRnNBalVuNzFIWlVIM3dEVHpNUW5Bdnp5RWdsNmtkRnp0dG1PQ1NOclBGTXJpQ3FCejEtRXpYT2YxR0d2NXJ0N05aUW9VX0hjM2xUN2N5eWNUSV9JNDJQUjdmRG5RUHAyLXZJRXNOQXoxNF9zXzZxUktVVldoTEJWWUVnOU1NMXR3bkNkM0d5MjBKMmdvZ2xxbzdRa3JXYXp5MzNBdVdXMV82RWxOZHQ0OS0xYWNpTHNCQUZxaDdxcUM4eDM3bGR1MFhRTzczU0pYMDV1dzRSTk5fUHFXOGY1cnJFblhuWTV4cl84d1gwOF9EOHlXNjc1NkxFT2Q3Qk9XYmRCbHl2a2lhTG5naDN5UDlPQVQ1ZjV5cHlhc0l1S3lPckFnX1JqQUtPZzNUQm1UZjJZTGs1OUNxWFpnbWhKNHJrS1M5X2p3UXI1c2lXZnNFclVXbVFRaExueGZZNGVXMVR6NDdRNnEtSThJdmJHdm9NZEc4aGRESXhzczJTQmZLZ0lpZlB6NGpuLXp2TVVzOEZnTDA4UWpDVEFheHFHOFJYbVNqSW5aRERESHlzY3owSmRabHpITDJsZkNMMVk1eE9Ha2JrTV9YZjBreER4ODF3bVFjWTNXbjl0eFlFLXhFVDloNndOTGN6UVh6TzlONXFpSDZpNGJadlR0MkxqdmJrV1M5MEw0TFVFZ2puSE9PTVQtWmtYbWI2d3FoVzlfbjNvWkRZcjlNQ0xPWU5FQ3BUVzF0aGZtTVRDTkk5dW95V1hHZDdDVXAxaUo2UGRDT3lXb19vblpnaGVQY0JNUkhmdU9NN3pfRnJIdTlqNEN2Yk5nd1A2cnFvQnNWcFJMRUp6bHhZbU0xZFF1WnFheVlYbXBiOS1XTnhtZ01tWVd3TVhaZFZWWXJhOTJmSXJUVzdkU0lkeVpZQWI0YUtIZVlMdExJTEtkRjZHLWZiNmVVZTU1Vm9sMEl5S2I1X0xqTFhRLUtBUW92OC1RaXhUODN4N3k3cFZDeEZ4R3R3ZnBOLTFVaklfTDVEZHQ3N1dxMi1wN3JaNDFoOE9ER18yUmlOVVFucUFEeDc0WVlFX2I1SlA4MjY2SDhCSEQxVjFWUFR0aVFvUFNETF9kZTBFVnZ3dUt4Y1pRYnV1UnpzRUpXZHZfWkVJRks0dXdfaHdQOEV4ZGFpb2M5a1FzMmdJem9DVW1yaGFjSkZUU2J6YXI5elBteld2Vmc0a3ZjVUMwSVkzTTMxS1JhT0plWkkxQ2FWWmlfblZHLUYtbmFJQ3hIcm9tQUVBZDBEVFJJOTNBU1E3QUlIVE10bDlfQkxOaEo0UU1RQ0dSblFXdkF0SzhvbnA2NGVzcXBubzFfODktWDFzTVBaejlOMWVOOWR5UHBfZlVfOEpUdmwtVF9lRGwtOXJaS3duUnFOdHhHeEZuVXBNdXE0MEg5dThlMHhYbXJlOGdTTzhxZEtKeFpvMkNEUE9Ca2RGcF94Rk9GNFNCUjdQWGx4aHl3SWJ4dVYyRlYtd2FERzR6UDZCa1ZKdlZHejJSNkpzTXVELUoxdWJtc2hhQTJsR19fbXItLXVUbFlybGxLanFVUHBQS1BGUDZVZU9weFVWdV9CWlZBYnBJRmV4VVdxc3hrZXdxaGlFS0lSckF5Lk9YUTNscWkxdk4wNG1sb1Mxa2xPdVE"}' + string: '{"value":"JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmR5bWh1WnJvMmhHTEdNakFVNEMzbXlJU1JPUFNDRmpvckxUcU81TkZCU25RT19LOW5BSGxoeUFHSXJnSDhmZ21CY3QxZndxdTI2TEVPVmJZT29Cbk5xMWg3U3c2S2tVTkVhY1ptcVJFYzRmb0hZVzJDYW55ZHJEb1JZY2VUME1aSEt0MTFIZF9KUndTZWNnS2ZyTVMxTFhjdlZab2MzY3hiT2wxRG1rOENsZElZZ2dROGwwcXZTclpsWV9qTHRtaTc4SHBjSTZoczE3aFRoYTkzYXIyVGszMUg4UjhFR042Y09JcW55YldCSFFRQlpOSU12RnRnY3hZRWIzWDBmMzlmdk1sajVTajFtZG00TDN3VUYzZWNHUWVIODdLQWtIemJiWWV2QTZmcU9vaHVuWUY0aE9XSzVsaS11R0pGOUprdFBDQmkydF9jSlJ2eGdBQlJpRlZLUS5EUEtzYVRwaEVKb1ZJdEpXcC1MR3pnLjRjMnlBMzFLcHdSQkNDb0pkTzdqdFk0NmxBZUlJOHhORUp6TU9xd3JwWjNQREtVa1JhOXhKdWVIVG5SU1F5bk5YSmY1LURZVjNqRGZlVjhKamIzRTZaeTQ5VTdqZ0pvV2lkZUthTHRXQjVTcWtEd0pSY1FuLW5aTVdJajgwcTM5RXV4eC0yeGdNdDlGOFhObmlWNHN3R2xOZnJYeUkzNV9OMktGNTh3RmtTcVEybmZRN2owLS0zeXBGZjZrN05TNlFJYXNWUEIxMkxXRGFQSzBVcm5NV2xyQ0hGbkp0WmZ2Zm11TnRMVnRQYUVIdDFzZFVad3lsOVhQSTk3ZzNpbXFPM3N5UjJ3ZmtTUGtXdE9kR0VQaGZKWElvN0F6NGcxckpucTN5OEd4d0hQbklHVlZTODl1aTJRdFVpMXM1VHVNZWxtTUJmczl1ZDVpQ29lSS1vNmtJQ3FqN3Rjdy1rTkN4SGQ3NWE0cXdDTnU2ZlNjM2VyY29BU2RUMEdZYVdXU1ZBWmg5cC1QZzZlVXlSUF8xbjFPcUlLWDJPR2NIelNvRWZkQmZMSVZxQUZJaDB4X0tqckcxOE5ZXzY1V1kzNkRJVjR4X2ZHcEQ5QXdzdVN2a19PSVZ3VDB4NkhtRTRhMU1pTzl4TlY1R3Q0N2dIY1NrdldpM2JteTE5VHF4X05fdm5PZnE2Q216WVhDb1JtdVZnaU53WS1fNXNoSVpHUlk5YUF3cUVxRUNkOWJLbUgzeDZlWGdUR04tWWRrSkVHdkt6RTZ5UExHdGdMX0RqQmNMcW5JNHMxOXhDRFFLTnJIZEx4WEpQcVpHYmRqTHVfbGFWcXdBUnI3S0lZUG5FNTBOalZyUEpZU2ZaRjRCMWVPTUJvang1cFJFbERDODRqSTRvTENJdTBhbTlnNVBudlhUQ2FHSUJPaTBCX0J1ZkZZajBndWp1dTdHZl8zdDhrQ1UxQklEYXQwX2JlUmx2MmJrR2RNQnBNRFlRaTZ0NmV5U2drYkZZM2dseVo2U1ZWNE1HNER0cUJCWnVISmRCZTZzSFFNRnliNHFQTkpfN1pGVEJHLWRfc2gxYWJhWEM5Wk9qV3FwZGx5RXBKaE9kd2dXZWRXcDFOQy1sSWE0eWZoLUVjVTl5VDZxU2FXcGd4SUNEdjJZekc1QjE0aGlUU2ZKb2txVG9PeEtWV1gwTjJGc2VBNHduYjBZWGdXSW5aYVk1WThsUkQydzVrNEpTaGYtUm1GejRvU0JLWEQ3UEp2dTNCTEg1RF9GVlM3SEZHajdMRG55MkF2RnY0ZVdLT1ZCWWphb2hndVhFOGc0eXFsUVZERGM5NzJVWVVsTS1SSjdqUjlGYUJGM1htdlViUjZSSjd0WTlDeURuQ0xJUWI3YUFJM01iRi1uTkI1aTZaY2RyaWNXWWo1UHM2NUpBZzFGZlRrUmRINXRkRXVlbDhqandXNDFoRWlfSl95QWVCX3BTNF9MYno3RS1qWTFOTmEtX2loYUtqVDZEM3JpQWc5WU5Ud0hndHRzTGZReTJWM25admlEUEZSRkJUVGIyNW5qeXQ2VGwxanNmMVNibkhnaXp1NDUzQXVWNXJjNzlHYlBsZ01pd0Q0TDR2Y0JLSzdVMVNNNXVXN2pPc3czeVUzMFQtSXlDUUJ5aUlpbnU0R1Z3LUhuLTZKeUFYZjExQWpsSG8tcW03dDltZmJxOUNYaU9Td2Y3N2FsNXQyMER4T2tfUkU1cW04ZEk0NWozMjBia284SkxjV3VVODdNNThYTXNVaEVycGM4OU0xeXpBMUM3TUg3VnhSZnlQNUFBdzdBVTVBUkx1VVhleXd1Zk91aEtqVjEzZ1ExNUYxS3FNVkdxWFY1U1g3Sy1waWdrN21HUFVQVW4tTXlQYXQ5OTVDZ1BGMTl4NnFmd2M3RGxZSDBLbklQd056bHVfTHA0ZXQ4T0NST0sxOFd4ZzZmNUdJdmQzOF9TWEZWMjJyOEp2enNzZDFrX3htbTdWOTVGbTE4QW5WZWRVanhueDQ3aGFyS3JQdGFsOHo0TDM1azZCSDVFQlQ3SXFxUWhodFQtenUzTUsyMzZISWdsd3hGci1kM19IRnlCMjd4M3U3ODFpQmlBTVZ2R2tERW1uVGhOQ1c5Qm1JcEJ1bnE5eS0yNE1HRUlSY0FoWFN6R3VzQUtwcUJObElTWl9ZQWVxOXJRVXowYnZfSUxsNkRJdTdGYmlGLVVuTFdOMWdRUWlkU1dHVVh3Q2YzN2JMeFpIUGFCOVFnYnp5R3ozUDNxMHNiWk1Ra1BWTVZPSWF3S29FeEdvX2lPd2pSMDJiaGh5aWI3em10NmJKZ3Z6R2xZbC1uM3lYYVZWeEx6M0pQVWVPVU40Uk1hT2F6SHYtWE5wYlFWQndUQ2MzdHlwSlJpanpHVzUxOFVNeFFMRmZYajV6eHZrb3NxSGl1c3llR0NoVWFSWm00Si1CQkRuYWxCLUlaX1NoMXR1dnRXT0dJSHRCV01qY1lmckxrSUNJUDktOGQxc3AtZVV2Um1nRzNseFFWQVNuRnJyYk9NNnVzUEc2bEtiZHVhdnU4VDFLUWlNSHdhMVdYNGJYYUp4LUxqcE5rbW0wbFltT1RwUjV4bEE4RkdwY2lvM1licGxZVnVzNHhWV0NmS1lEZTJ4elhwMGJvSWU1Nm8zYThwOERrbDhWR0Fwd2JRdDI5TXZGdnRhSWpDRnJyYUdRZjV4ZG1sa01PSFNLaDhQb3R5TG5talFSTlZva3pEYUl1dUtMSjNRaGdrNlRhejc5b0pLZGlMVkNPdXNwMERSS1I0SFlBV2pURHVCLVhITmd2YnNzWFNFTkQwMHoteDVfcjZfTnNzaVhFU0hodENTMHNjT09DZEdVNTA3MTZpZ0szYlVSU2RzZ1BzOXBnd29vZG9Cc0VQdXpFN2ItZFhVbWdxNUVFNlgzY1Itcm4wblRFczNac1dOdjhuanFfSVYxMjlNMVpNenJnT002THhmVGl5WjBScl9BOF9UQUFXRWpkODV1VUI3NnBiMUZXdXFOTHVwLW1fNUt0elc5MTJEZmVndVNoSEljS1lsT1M2U3YzZUVhWlZlTnJSWUJsUzZYLWlINVl2cVJYX19yOGYydTNYb2JpTWxNbk42TC1jN3VqVHlCa09wQ1lVU3hoNFptWHZfSHhJZ0t6OVlLMXVzNEV2Z1h2bWFoN0NXSy1NRmItSzRMLUUydWV3eGc5WlpMRm1iTE4zcXRhMm5FRGF3ckFIN0E1QTNBU0dDenFmR3c3VzlwQzA0SnpSS3FYMnZ5U2lzaVlJUWpCNUVSQzdYTlNYN2xWQ3ZpYnpsRXJlNzFSaHh5bUlLekEzQ2VTTFlIX2pMTEE4cEh5Qlo0Q2kzWlNOcVBrZXhOWlZRdkxKZWY0TV9JanV3UkxmY0pQSUxiOFM1Ymt6ZmpaSDZKdWp4Ry1ycl9LcTE3STQ4N3ZuWVVGSGM2UVQ3XzZzR0lCUzZncjRPSkFLSUdMNjQ2SXhJRTExdWw3YTZJYkZHeGl3X0c1QU9kd1Nvd0tmckVVVzFMOEE2ZWF5VjVjSFRIT0ZHUHYzM1R1U1VpN2pFMTJXdm40eThNTWJKYVhTNkFJVS0zN2Q0WjRmbFpjNU1ZbUxIVktoQ1pMYjh1Rnc2REZCamdyY0Y3MVhUVG52dVp0cEgwZ09EM3ZqV1dvZEZwNzlqdzNfNHkxbVJvbG1semhDaDBZd1IwYkJ5R21qS2dDVEQtNjdidEdZb1FHLUY4SWprUzJxcXhWWGpvWkdyOXVJZkNuQUpTUmRlYWNLaWpkc3FKYUtHSk85dEF2YXhXWXc4MUFMQUVqdElySk1fcTJ3c3liV0tSWkJmX3JUQVNfTFJUSGVpd2prRVVtZ2lWelQwUEdfSjRDWGM0YnFhcERhQURGTGlScFNwYUlKS3JhdVc4UDFsNzROeHRVbXB5SDBRZ2U4SnJ4b3lYTDQzdFI0T0dOLWg0aUUwRzNoa0MzSzFRQ0Z5NXN2VmtBdGxha2l0aXc3ZVFGN1pjcEtSeE5hREZEYllUb3pFTVJWQUtWa0RYbWEycjRxVXJPc2ROSlROQnFlWWdhbnh5Q1RpR2FNRVZEZjdEanJTWjktTVJ3a3R5UVF2d1NYa0k0VmR5SlViX2xJdEF4UERkMUNpV1BYRkgtdWdEa1RrQmRCdEpYMEN5N3Jaby1kSUJ6VHU3cDItNTJvOUotVUhfbDV3LU9FZ0dZaENnQUtGTkpaSWh0Z21nY3ljUVdHcm1RT0plN3QzNUlIeExwZ1Z6aTJGVWp0QWNGR0dPeDVuQW1DTVZOdzhxQnZQbnV4bzJSV3NZa0VJcGRRU2MwS3Z4MHBvWmEzeDhObW1BYnYxa0VzdzhZNjhFNG5wSTB6bnFLYmV4NFU2OFh3ZTBlSGVpV2lwemthREpUUnRqVWg1eE5Wak5RMktPYTEteHJjSjJ6MXdJc1JqdXp4VklNaGdpSXVleGp0aWNleU81WnBjUWVDZ3J4UWx5bFdTdnNOd21nOUJIWmNwVnZaNWN0LWVvZ1pQSUN4S1pZSmNpTXd1ZHlZdUtXdEdiTVRMWF9jYzd2NXdTa0o5VnZFQXdfUi1QeW5VY1hZY2RNcUw3WldxY2E4czVIRG1lWlNZb1RWTnBSUzdJRFZBMnh5Q3JZWjZkanppYUZHT0NSS196d0pPWVEyeE4zWGpMYXAxSWNFOV9qUkhJM3loYUQwUlVyVkppNVdGdC12VnlsYldVeVNZa3JzZElzUGVzQ2U2S3NpXy0zdHNzNDNGU0NCVkZ3azhhbkdxcGVwWmdneFkzX3JtSERiSjBaZmV5SUlkb1RKYzF4Q3dGZ0kxZ3o1X08yS1BXWWF1ZGdiMVpjRmstS1cxSG1ISmx1cU9Qa0NzZUFGYmc0M2NZTUtsNjJKY0VsVjhQdlB2Xy1pMFU4ZDJ6bEpfUm4zakpvb2NnV2o4RXR4ZEh6UGozdnMzRU13ZlpVQjIyVnZGM243N3g3STZxTkhVZlNObGo0TWxnc2ctVFJfVW9Nc0M0dUlQYnp6XzBUdlJfMXQ5LWVYaWZWcF9zYXhEWEJuS1R2LUxSaEIxRjA0d0R3SzZpX2h2cmdwd0ZVbldSME9ObURSNVp3TmVaMGZ5U1V5M3lFNnFZLXZSbXB5RjVqdE80V1dSQW9mb3R2OXJNd3FvNTlvNUNmY0kycVVockJvOERSd3JzOHFMczR6Q2Fxa190RlZ6dzVrdkoxSWs4U29EQ01COFYwWFJnblVLS2FndFJ0UFVfUGh3c1BpMlU4NGJpeU1WMmJBQlZsVEx1QmF6ekg1UE9Jc1o3bDlyLXV6ZW5XR1ZwbEpFUHB2c0ZEMy16OHJ0VXN6SjVNU0NJcERRc0xMUTB6WmZCY212ZURJMnZ0c2JvVEgwSVo2QWl6VnlTVUtaMnZDNFNCRml4Sm9GT25YT3ZUZGVfeFQwRGJLcUlac3llX1lLbG1Kd21LNHlRT3JwckY2NkRjZmV1d05YWkJ3a09RMktJVVJOenFQX01ERmtIRWIwamtlektrTjJ2amtHcXgzQ2VjZHY1SkZCWC1lSDlVeWIyajd0VGphSkVYbUtvZ3VDY1hJNjBOX3RyZGhRQUpjeExnQkloekJjQ0s0RmRkZ24zMDh6b1VHMU5pc29pWnBKekIySkZuZzFDeUpJMXlSTWhSUEdJNFRlMmJxV04weUdXS2NJTmI5NUIxcXE4Vmg3Si1IM1RZeEtydTVKTjBDNmdoVDJKXzRDdzZMNWdMd2dwWXA3VkM2WDJmY2ROcWRIUW1tRy1uLVFYc2Vfa29MNWF5U0tidkowYVN3UF84OFlYYmNBU0dhZW4zSVpwMUNhaVRfTXNMaXBXX05rOUZYcmlXcHhNZVYyQU9sZFE3MmhjYWVhNlBTS0g0blZwalhwMTk2X3lMT0JOTV9Vbl9Wc3FZZzl3NlVZSlZHYloxS0dUd1RVMGIzb2Y3b0ZnLVJNTUV0bGtBYlNUTk53ajRQSDM3a0JGVmhra0VkYmxQdlFDRk9zYzFRM1BDcVpqS2dsZHg4Q21xaHNHVDN4QlEtczd0bEdUMlJLaVdnbWZORDA4dHdOYlptZnV2QnEwYnpmandnQVhsYVZwUVp3d19sV3JoNmJUamVVREtfQmc1bHljSl9JeFhQOXl3X1pDZ28tN1dYaDlONm9fRDEwM2ZVUjBhLWRuaGs4UXhCbGc2bm1QVWVLekt3cGRrWmxYRGNMazBmMW9DNURoaGR5SEY4SkM5czRBY01LVzUxZ0pBSHRFczYwZzQwcko0eTJKWG5sbnoyenJHNG5zMkNRc3lfblNWUXlWOG8xaXdxYm1pZUN1dXBSTFNZcnF6M0xsX18yYUp2UTB1cmdqVkI1bkhhMkpkVmZvTXh5WDVwMm9KaHYxZE8tMlFuZmJoaHpZNExVNG9qNmhMMG04MXhfQXJWRjBUaVNNX2dLWlM5bHlPR0FCSHRPZi1GYmZzNVpOMmJKR0d0ek82QVRGaWFiQ3VTX0RzbHA0YUg4M0xaNGZ3WXphZFZPeG1UaHFIUXJyaGl2TDAxTzVlYk5aa2Rnc2NmblowLTNTNjA4QXNYRkFYM0lhRFR1ZVhDa3VQc1BtcWxLeXRLVmtjOU9BVktIb0I2YkR1cDVIQzZZQVY0dkt3VXAyUlN3dDIyNE52eTJ4RHRfd194c3VieGdSbnhPMEFGaFdUQ0dqMWhKeExZaXJLQVlKNTlVY3hoV195RURlcjhhTWdrWUNkWHVMNTNxQ2dLbFlVNHNmN1hGYktFWHdXUUE1RWd3cTVsRHlVbksyT2kwMlIwVFpBbWRfZFh1ZG0wMWFnZ1FiNlVwYU54VDU3MDM0Wng5U0Q2T0IxRzFlbGtITEFHcThaT2d3Qm84c2YyOWhaLVBBZDhpa3QwQkhSOHhBODA4SXJlNmtzSkJDbVk0WTB0OGo2Q1NvNVF0UWtSdzZmVmE0ZHctVWNSc2s3NkxZSGZWTVRXQnZMRlVNdEVSRUpoSGVLdlRjVHcwdXpTRHJPcFFMRXlISkRrZV9hVjRpenRYVy1nTHNDd3l3czNCLUtoQ3JJOTktZ214QTVVOVczMEdHRWY3NVFWU1FiallhU2JxVmFQMHRuWVc1R09meGFtYVdNMnRUcC1VRVRyRHhFMGMwY1pCbEdEUFpjT180Zm5nOXVvSG0zVG5EYk51Z1ZIdGI3N0F0RzJ2ZU0zc1o1WldpTWFmRXRTYUNHb242OG5kWDRFR1V3STdEMzQ0YVhFeGR0UDRaSWFnQ1d2Ukd1NHk0Ym1RbURqaHhFbnVMOFdLS2JXTDFYQ0NyNVFyU3liT3VIUl94d1RnRFFRY0k3YnVxTGhMME1jbHBTR2VTZ25VaHRkekI2ZTJiT1E0QnVyRExjbHpCVFVwMzhtWm95TVRfN05PWTYtNHktTjE2SDdiZTRQVFozTGh5eUg3dUNYYUtsbFF3VExERGIyZ3ZUdmU1N1hfNzRkbHBlNFFxVVZ6cWIxcnViVXk0Q0c3MHdsTUFGMlphdEh5WmlhVHVVR1lSbWFUQmhJamNSZFJzZUVMdmV1U3pMMVEyZGdmbGNsTGdQVU4yMFdHSURKOGxHdklqU2NzbVNjZjFNSnNRSjVPRzVzcmpMdVYxZXFHUkVBR084bmlXd1MtN3p6QlZxbGptUW56MGhmS2tVbXRMMEJuYktXYURLeUtsa192TnNBSkFqVEJRSlpTdkxaUG1xbmJ6b0p2N1dNN3Q1dngycEJsbDJ0dTBRM1R1aDdSWTFOZUROWDZta3B5bmtrR2N6V2E2TU1KWkdLYU1iSDIzVkF5V1JScC1BRkx0b3hWYXFqOUpkei1lNmUtaVNwQlFpRWFxcGpvdFpBT2twVGM5VXNsT0szQWdrZ2FMX0RBU1FDOEc3VVM0VDJlLUxrci1Dd2QxeUswdVdmVmU5LVpBYW04R2ZzclpWTHJGMEJIXzVkWlZoNlB3N3FEZS14ZVRfenljenlqOXFFYkhTTjlqd3VRMmNmWTJSZkUzZEpoTlJaYzBlZXpyVWZxa1JuRXFvX2xTMVBYampXV0VoUE1PcENYbURqMV8zWllaLUVpSlItWVZBUEJSNXQ0eE9hdFhULXVyT2N5NlByQ2s2QjNLNTNQOTdSU05WLUZ2MDE5NzJlTVdZVllOMVdjaDRfbmJGcjVhYkpQV0I2UzFuUEprU0hyU2Z4WVptRmNHaG1jc1BSMFI2V19hMm5DQmhPTFBOUVdQc184Tk1JN1ZPS1VEU0lLMVZRWmJpLW5kcElfRGxKZ0pGcnYwU3Q1NTlINThjXzZrNFBENWZsQWdkWFBKbmlRX2FYckRpTFFaSlhRM243ZUt0Z2J2VzFGek1sSHAwOG4wd3g2b29xcU1aenE4eVY3RDkzSE9wUVNLQ2hBVTNNNDVEZnZzdktFTVo0ZFRlaFJIYWo3SlZGc2pWRFVFS0JrckYwSDZsMl9zMjZmNjJGbEhSY0ppeVd3eW80Tmt2YkFCdG9LSEpSUzBLVGZUS3BRYmE3OEVqZGZoX19SOURQUFlkWnNDQzlOQnVyV1VlWm0zbTRsSFd1emNJMkpLZ1RxN3VlaUFkWVdFQkljMkNld1d1S0tGUnI0Vm5QODNNdm83NXZwd0JRT29DdWhvZkJNSGFzbThhNWEtWW05VlRLNGRSQnZ3TDI2b01hQU1PWVQ0VVhUd1plVW9UVUlQZURvZGRNbk9PSGVEelZuVGF5ajN4a2d6dDQwWUdqazZwcTlnejZoSnN5eXhSc2w1RU90NUNxZXZzY2NtZHVrQUVvQ0dhb2pTeVJ1ZUlLWUtLR2M0YktNR3RnSC1nR0FYck1GT1BZNHo5NDV5MXZfVktGZ254blBITnM1VFRxS1NFY0tLc2EwNWZIM3htSktrTnlUTy1MeXA1ZzlxMS1CeDZIUzZxVmVKLWFtaTgyUHRzcFFOZUc3cVFIbDF4LWxPWjlla29ZclVteXV4bnBJeDNnRlc0eGkyUWlHNWV4TWxxRFRWM19JTTBCSEdZbUNMTFUzTzhjTWEyUTBucFd1THJYZ1U0LXE2c1YzVlFYM1pydG9NdzVRXzRtd24xYV9PbklpNHdYSTJrVWVYSWVVOVFINzFVYWZJcHVWWUhqRDhTOTdYVVVOQnJ6YVN6d0VJcVhvc0FZazJsaG9FSy01Y3d1ekdEaUU5Z0JSMjJ2em85T0xhYy1ERGpSN3pDM2ptX2lSRlVqbFNJTE9fYXNRYm9VSnctVnlWRy1kOWFKZGV3aVV5bmEydXcyTkhsYVhFUUk0Ri1wS3hMNk04bFhMVDhDdnFVVVA3ZnFWVFZCUnRmZlRkSEtGZ3BZUFZRbk5ka202SmtVZEp1Z05NSG8xRnMtbDdBZmxnVHRKeEZ1Um5ZcVZkVVlWdkJBamVqdXZoQ1FtaGFlcDdwSEUwQVhPSGp5dC1jWjFpN2RqQTNrTTNONDJSVC1ucFNfQnExYkJoUUFLRFl5NnhzOTJTMWdHZVpMcmhYRnBMMkt0b0E0Y2g5YVNESEVhRUVoM3BTSDJydnhfRGhLYkxhazJXZWVpMXZHVWpMZDBiZjRYcm5NcExhSlV5M1htbjZVdXBsZHA3UFIyRGpZVVV3dTJHS3FONUhKLUlWVlNvNlMtaWhuLXhFZUNSVmo3QVdQM1FPLUw5OHVUQy1NR0laOW5pU0ZuUGJOZnlHMUp3ei1FbEhYOVZXdloxS0pKMVpXSU9PZ3ZtZWppY04xTUcxZ0F6V0NkRFhIaUpkU3c2RDJPMnNiUGdFWFlLZFJNWG5CYjVJQlRzZkNIc1RmNHlGZGxOaVNqNm5DdlU3VlVoeVdudmZhd1hiaTBwbkoxejV3WDRBQURRODdPdmdQRzd5dkxBM0sweXpXeXhOajhuLkxkd0syeDBvSUxocXZtMnZpSzhseXc"}' headers: - cache-control: - - no-cache - content-length: - - '10635' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '10635' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:00:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96041739.vault.azure.net + - /keys/test-key/backup + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault96041739.vault.azure.net/keys/test-key?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/7089b08b10a64ec68db241e20e2109d0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qbGcivUVxthKiCxcjxOGdsiItrjjTm0_-o0gkZmRSDlEY4ixbjJYBZMwZLxLm7_ZzoGTVTdON-_6bLu-ZwFqAAe2Nc_HDLkL3FTn1YkjTSA5I6FTXI-CC79m3mPLbrVNkHRUkN7QPpl9Qak8RyRl4TA5XtOp_ztKm5Lfuc1eJsosaRdqaMe2UlEbu0XCdYDoP1UoNRAhrUZwli-GHH6yWQxq0SBtnfUsXH0CkgprrnpDYM3dxUkjJJ6IRpW4acRXrFDg-ccCBQDRLty6eSRehugfZyTGciaT4fBcj245OjytQZHxz2ZGixRxN0YsvjoZXqquXKqfkKEcknMDNapyFw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/d2c863b455c9439b87fc78c6ac184217","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"uWCbdAq6V_Z3_JRNeKK4o27y-v8lL_IUNGXQHywjTU4aoVK8iDvM0ChRMhlChsMcI-SyGaAk7kiS2ywdNx5JI3rcaZiiasFZ-4CUnUQbOB_p5L_r2dDXvfdQzGaigM6cttEW5Iwze5dEd3BOcDQumxRrtSJNld4AlxEK-Kp7xaOUFc_2yAV1QPvELtjJLN1zMNw12FXNqocpZwZ8t1BGvvXKYfz3yrS6rq0nG36n3S1yA9Cb0NnrTjp84na3diRQXpuaUg65QXrbhcBW6o1aKTsuEAVH5FAqDliBa4v5lqTNsWxOGS996rMfjsJHJQ_fymvIy69zHrMe2UPupwz_OQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527628,"updated":1564527628,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '644' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '644' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:00:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96041739.vault.azure.net + - /keys/test-key + - api-version=7.0 + - '' - request: - body: '{"value": "JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLk4zTkxnQUltVllzMTBLb0R6T2ZkcGI2aHRhMFBQNGxQOXh2VWQ5dEJEaUE4X2dPa1hQcnFza1dMTDd6d1psd2FOYlZNbFZpbnVzbmVwZndNUnlQdENmaHZUSjBMWG5PdUh0TmJfcTNpY1F1LUt2UnhfTHZpaGp4bnVCMUtKNW5ac08xR19RbTVPLXEwdkZySGZJNE9ZQjhIY01fR1VaOGx1dlFYWW5aSl9mY3ZaREZmazlWdVRzaW5fQmxCbXN6Q0JrdnA1LUFrMkwzQXFDUml5TUNjNTMwTVFPbjI4eElXTEhUcUdBTHpLM1pRRTNFMTdqVk9iT1ZtN2ZoWWh5Y3JHYjJWZFpQdmkzR2Vmd2xQZlFNal9VUlM3SzNUc1FkSnRUazREdVdsWkZJTThHY1R1NjZ0dDhIblA5LUE0Vjd5RTliQWJnWXlCZG9QUnhzem01TVg3US54dXBZUjhXMGdvNTI1eUlCSVdsUzF3LnJ0MHZkWFFDUlAyYjJ5b2htdk8wdlRjY1pKLWVlQWNlVHF2WVpEd0tqX1R5SE5iV0RQcFQ4ckN1Z3JpcVJ6ekFvY1hNNDZWME1Fc1JFbGNKTnBKNVNPR0pzeEQ0dVM2c194aDlCQjgwUkRxZTRHcllGckpsSlc4Wl9GLTljMGI2dm54aEhvck9vQ0VxS19VU0xTcU1wNE5pS05CMlZ4aGV4My1NSldJS0Q3M1BxaTZQdnU0MVZnUlR1NGlqTmhMeDJYQ3NtRFpxZkVuUGZHeHFQcWdVYTVvRm9uYUh1enNyRV93LVNORlhlWFQ0Skp2SWkwTFNMRDF0d25CTkVpNUo0Qk16TzJzZExJODhWX001SlpBLXp3RmtGRGNHUnJGeXJkOHVwaDhMVmFrMUpKZExvWkxocERmRjRpQWVLWW0wT0ZtdV9zNEFzbWJCR3ZuTnpUS3IxNlpNZlNrcUtuMm5uUHc2aV9JN3FzR1lEX2xEdm5KaGx2cmQweW0zb1RlSEFRR010OFRZRFhqNXZTejUyNExyNC14M0JMaWx3QlI3UF9SQVhfa2d3LTFYbjdGa3pGM0lscm8wMmNsSUxPWDcySjJUT0JRT2ZZVjRyOGxscE5Bakt0SEJ2cFFRMXV2MTRZbkhhN2VKTVlWWkEwV0VnSlg4elhJb1Nwemd4VnNLSTlRU2ZQLWZQVGdMQ3VUNm1iZVBHWWdSczE4dDdjbGhJaTJwQXRtaVYtam5GVXZJMXZwbWJzekg4SDAzYmZxZF85QmpHbzlzRklNVTBwZjR1Rk1aSmpfUnBldU00MjBmak91clpNY0xFV3lYQm0tU0E0ZUdjb0ViRTlqaVA3RUlveHVOSE5STVpWYjJtdTVzTHplZTNlNXJENzhMazV6bHpld1hPRHdyOHBiY2t5N25hTmRhMi1zOWF0WThwejBQZkhqUGpkdEh6NDEtZkhObl8tb0t4RWU4RDE5LWhRY3pGZkZkaGUyVloxYkRQRV9FckdJSGg0dndSaGNudXllS3p5bFMyQm1WSUdMZ2xzN2lRc2Zta1NpUUl0ZnoyVjZFMGh4aGFWd09PS21tNkpDbWRLR2s3aGE0a3h4aHRxNHZoQi0tclpFTlRTamc3MHdOOVVacFVlUnFQanYyQ1RVcUQxdXZPMHRRTW5zQjRVSWxwa3lqTlpaaVJqVFNaY2FhRzZGRXpDUVczV3c3T0l0S0FBc1AxNnJDYklZVUdRTkZKcUpYSnMybDEzR2JkTTU2OUx2Nnh4V2dSUm1UQ1dKMnJSTEtvY0ptOTh6S0gtV0dKQjA1cVlaT0JZYTdQOVlrdExNZTYzUkRuc0RoZzM5N054UEJFT1pvenh4Rzk0U0tLSUNyUXJYMEJvYmcxRUFlcWFfY1lvMWpIcjUzTFhBV3J2Nno3UHFCYmRVSXM1cEI2cGo0M091MDhzV0c3UTVyREZkd3JHZEpmallLR1hQZnpJcUVJWi02a2xZeE94cC1kazlKT1dpZFdQd2hmblhyWFBsa1ZnOUhDMkdrYzVwM0ptMlVCWE9MQzRZM04tYTBYT1UwSHhjbDhjbHlwVEVpNExCNV9VU25sSFVDVERuS2h0TjE1WEZieG9obnpySDJRYkFKeWM0eUJKeHNZUDRJcVV6QTdBdklfYmpxQTQwX2UxNk5yMHB6YktIU1czZWlLTzBPSmJqa0JONnBlSjdveU9vX0FUU3Q1RGsyWW5DRnBHMDFnY3V4aFdpaE1NWVVzdm1Td2RQb05FX2xnazcwS3FwbG0zbVlTM2UzSXhCNnA4NFBFT3pnMUpwRUt4U25EcHZ4SGxUTmJzSXprUTlIN2Zmb2dLcUx0T2VySkg5NGZ0d3hVNGwwRXFTUHRfMHVFTjlBLTd3WkY4REhhOHlReW9wSUxkS0JOZ0hsN3p0dzJVOVN1TEVGeTM4Wlc5THllVWRqM0dDNjN6SURXM1pHM3B3MDVHSVlMVHQzdHI0NS1LdnZlaHpLYmhfQWxGcTFnaGV5bS11R3ZyME54cUVuTDJzdUFyUy1oS2ljenZiaFNuUFRuQTNHdkVaRWZkVDcyTW4xT2JTVnBVNzZSZlUxand2MXpVOUZ0V1l3dk5YVHU5bF94cmIzSGJVeE1vQ1l2cjJnQUZ2RXVHaTJwS0NEb1J4LWlRcmZlS1Q5Rm5xZmpic1RxQ0pseHViNDA1MjRuVFhTWVJQTnJscEhJaVhBMkRyUGtBUUdGakcwTG43S2VrY3V5ajF0LVU0T0dNM2JaYnY5ZGJPV1hIcVFQUGhrcmNvTTd0SFVyT1lPUmM0ZFdsX1JyNHlqYnRmQl9Zb3BtOHl4ay1uZUJ5VzJqUldaSHhMWC1vZUlQZWFBVFBvTE4wZURsX2F2bTNiY2hfb2xNOEFfNExTdjlDMzRwN3BkcnVtd3ZaWTYyNWpqTFBxVFBOMTFzQXRDVDdma3FUODZxUU0ydGkzS2JBRmVSY0ZtTzRvQjA4YzZRWDRCWTJVQ21xT0Q1OWV2RDBhanFBdnhOSEZ4eWVnS21MZERoREN6MmJIbmJUMlhqQU53aUhIQUV4SnRINmtSMGZiRGF5QzRZZjZsZUFva2xVeF9LaGNwUjY3Y29VZWN2MTJPa0NhZXhCZFJKTmI0aGUzTEVhQ3pOUGZ3YXc5MGVMRnE4RjlKSEFLdzgwNW9URlFyMkZBcWl6OEppMnRsR1RsTW80YndNM0FJZUhpTFZzU0xheWRJMzJRbWVzeE9ScG1ZNVRPSHZLMW5QaUduZGZnWkpNajlpMTdOVUlKcTRaeDhHN1BYWERJcWlseU95UWdvN3UtcTlhd1VmcHh3Z0tMb0pQNXVqVXZucWxBV2VPZ05KbXZNcTIxRU9RTUdZdWlROU9CUTJROXpyQVNXWC1BQW1qemZEUENXcW5BOHNUQnRTZ21FY3l5eDkzek5wdjBnZDdhd2l0LVBlVlZBWXpfRGxickk4dkNOVHZxU181ZWJwZmhPZmlkbDBJV1lBZEZQOXJVLVI0M1JOZWZ3bWM5V1pLek1RZm1HR0lsN01RSjZBQ1FORVNsYUIzdXl6RmVKeVdfQWFTMWh1RS1PVGVoVGpaWEtKY2VPSEo5MXotSFFQNEk5bVhrTXllRDh6UFZUVnVNN1BUNnRYcWNoR1FSdktIckVudmFUZ2tsRGt3bXZHOXI5N3FGQ1htRDB0Um9pSXFKN3lSNFlNN0ZLVWdaRnRpVEVvWEgwb0tKc3ZQQzZBcU9ZcXNlTVBWN0t3VGdZbUdjTWRFVlBCT3BBSkF6MWtyVTN3UVRtb1pDNlhhSlZ0VHptVGo1QzhFekdEMkFsT0VFSjNrcnJyTGVRR25hTFdhOHlPUzVWa3VpNjNvQ2RhZHdqLTZ5ejVtYTQzLXQ4Slp1a1UyWC1HYTAwZ0J2aVhWcnVuNW5BczFRMmwyUTlMWlVESG45UGdCd05SNWM0WUN4d1l0a3FmR1Yxb3FLSV9rQ3lSbWYtSVdTM1BLbFpNQnZYaHFzakIySFd4aHR3RlhJWkpPZ09YUkcxdDBaNGVERWo1b0tlMGFzdHNvNnpySWZ5dEZMMHZhT2oxZ1VjR2R2ZHc2UXRNLXJ2el9tNmRUWktLb293YmJpTmt6SGRuMEQ4Q25MU3JKUW44YmstWDJyTm42VmgzRUhZZWNBSE9BNWRyUHVBdy1WNnJXQl9FblV5ckJwYVVUVTV3MWhNYnMtcnY0OUc2bk1WYjZtTFVkU2ZCZURfdE9XQXptZXhVdXB1eGxkWTdOVGRfTGxKRVFxNUVQQWt2SXM5N3Q3WnlVMVZuYzJ5N2ZXZ1N2NkVLQmNmanZDWno2V0FjaVpPRkhWcm9hQ2dsM0NFQzFkNW1wcHluWUxyS3FRRDQ3OGRoRmNuQXp3WmgxNVl2NldzR2lkRGRiOEVDQmdOZ0tZakJ4YnpmZWZJNTRtaERrRWl2Yi1nYnhfZlJJTWV3MWdBb3ZKTWQ4ZnJRaTNhRExBNVFySl9ZNkpMWGtKdzNUdVNpV3dOX0pvNmRJT1lTTEZhdk9aMXZjaDNWaTJKcWVJXzAwbEs1TGo2MmZYNzhHTDBsd2RGRk00azVBUjZMVEl6bFlNRVJuM0dHbXN0cUh2bWxpVFkzaGNnNXlpTEx5dmRsWVB0WURQTjVRRE1NaGdWdFctUm9QMVNHbk16cVVrU0pfcUxYZ3BzQjNoanFkbUFZSEk1cXJDWkdyR1pieV9Ock9zVGMxczV5QlhGOVhkWkFDZkthWFcxdmpaTjJFSWEwMzRNOEw3ak5DdFdCRmhzM1VRMm9aZmJHQ2ZqbFdqdWJsV3VON2pBWDJTVnQwREppb2ZBZFJUZXhwY2hrU0dNRGJNR2daT29Yc0dJM3I4NUttV2RQOTN1WVJ5a0dxVVBnRlJxMjVDaVh0eF9BbWdVOGRmb0F3M29takNMcTZUVUVkZVoxaWZJZDFIeWRWdDFFZFlCU1Y4cGU0dzQyVnpxY2FONkNiYVh5T2NqX0ZicUJsV1owM0FES0oxaFM4Zy1wVDF0aG9SRWQ3U2RhYlFfUFhJVlYwMFRKR3AwdS1VYW5kZ21zU1BCYTU0QVVIQjBrbzNWV2ctdmdhSmU0WC1DY054SjREbmZzVTVzNWlSVm15aEZmajNBUzVTREdPNjlMQ1RoZUlhd3d4M2NwZDZHa19nTjdwel9IbFhCNTkycFA0TXcwTk9IUG5lQ1F4SlljVkpvTC14ZVJBWHMxT1VJMDItcy1tWWE4bTRGTzU5OVZwbnBWQzd2eEZybmluUm0tU09KSktSSDJYSGRBbjlTVTZlMUlVMnZJaE14djBjdHh3NHVWa0d1cUhnRW9xWWYtQW01dkpLNWs2dE1BSVI1RDAzdlBpLWtGY2w1YlZUNnVEOWJSQmVDVnZXdzZac2lydjdmMEdPcXpiTFljWDZVSEtOYXhPV3AzMWxnRndEbjFQSG1zWmZJaHB2VWJCd2tocl9VZFNFdDdRRjAzNFdsRkV6TVRTU0dpZ2tCTlltNTZ6QVpfY2VSaS05TG91ZUUtaS1aLTNBTC1vSzVfbXNmOTl3UkdsZ2pWb2kxYy1PUTZQY1hPOEZERHNTVEw0V25vdzdJUlByRnRhTnRBcDBEX1RQNmgwSGpqYnFjdU44eU40MEhvU1NXbl9HOXJTLVozRzM3cURsZkdEcXZyOWROaFB3d0twN1BHNDZNZWF4bkI5dGYxSEZ1S2h3dkk2MEZLMC1kVFU4b2pqRDQ3SS1teXZMaDJITy1hTU9PMS1iQTA3dkltT2pobWh4RS1uSXdzQVk5TURvQ1hFQTZYeE10ckdFQkNOVFVaQ1hTSW4wYmpUYTVKNlhXLUl6XzdLU2dhclRla045N1RMVzdFdEpUNXFwekhYajViZld6c2JKMWF5bWVDczFybFkyZjBLSnpLXzk3QmlCazlMVjdwU0VfX2JOcTFpa1hvZlVRZkFKekhaWDF0M0xRUzhTUVRhRzBsX192em9pb05NeWhTZ0tUR0dGenpabE5jdmRCRTJEeURLZ2VkZ09lZDJsd0MxTjg3bFY5U1pSNUdPbTV3ZjY5MmVMYWN6cEZFMGUzUHg4T002TlM0UkQ5QXgzNDhZcU9RS2tlTElFRjR1UnVzdTlGUjhDZ1Z4dXBlckxabFdaaWZIVkdudDBrdWdqSy0zU3FwZVg0ZlVlbS04LVZBY2V6LVNpbVc4Q3JybnlCSDdWNUlqamk1MEZUNjFFVUh4aE5JeFQtendlLTRlUkRvWUVhN3hwdUs2MDNZTlFUSU84a25QeHZaUE4ybjJoZkp3ckRhbkxkaVhLSUxWUjdONE9RcGYxd0RUbFplNXJuTzJQbVBNSk1zZHZvUDZ6ellYakN6SmtqQ3kyVTBnb0pYQ0hrWi00Rm9FZkpnQWJLNGlEY0lLWGIzTGZRSE9SQUFfTmx4THU0bmFpdElaUVdfNktqR0g1eXV6ZXFKdnVqTHVqam4tUXU5MGthOU5JaS11QUxxcU1QYTJ6S0padnJlNkJBTU5QTU1PODFFckRNc3lNTDZ6cl8zSWl1ZDE1dWtaRjVDQkpmSXZWeklxSldwanJiYTRldGF5S0dLUGZSc1k4dUpNU0daUTZSa0dra1RrWU1scnhlaG9tM2JzcG5QSkJqMVUtaU1paDlKVEE3d1JMa0RsVHEta2lKbDZQYkVielVsQ2RvRFNLUkxiR0RlLXEtM0xWeV9Wa1E0OXlrUy05Tm5GRF9PTDVFNlYxSG9JMW10dVI4SmprOWlsbWxmR25NVHp3emY1UGI0Wkp2Tjc2WWRZZTE0dnoxbWtPZFZnVTVicm9PNl9aY0NWQ3E0MUxVZVhmZTJDZlN3SGJfM0x2aW5ZMWZMMVJ4UFhIZzlwendIX0lINXFjRWFybUdQcFpVNUFKenN6dVNXQ0k2QlNEdmNpbnptN3pNNjNoUlFxNG42Z1U4NERJWjRhMW1pQXJyN05rbjlDVnVRdDJEWHVUcWV1N1l2UkNtUk1qNVFYenVEeHJzdGpfaHlIdHJmUDFNdmlxWnFMckUzbzZCRm1vZlVLNGpWUEJzZC1YaHMyU0J5dlFjVjlCQ0RjRGU5X0c3bWpobTVRelprMEZxM0l2d3BpWWI2bkc5Uk9vZzZRQnJQVjFwUExjc09TMm42WWoyX0RNLXFBSzNLdVVMamdXRlNMNUVyRzhwUldHT3ZWU0p2X1c3VXBLVHI5WXZGUVEzbWZyN0REYTVER0tRbzlfblRyVDUySkh0bTNSVUE2bzlqNy1hUUVidnBNUEx6eDRGSThGWWRtejQzMXlpMDhEbVMwVkU5SVYtRzhoOXpJY19yZjZsWmU1dS15bnVZNnJQUV95bGFYSGIydHpLb0Fjdkxpckw1RVJBZFNBNk96bEU1SVdZcTNhU2JPTUdxN0dCc3d2LUR2UUxlRGtBSWhQbHFyTGpfX1pxTHkxRTVrOEt6cllnZXBjdUc4M0I0SEFfWGp5RXRPMDQ3cEZma0ptektBckdOU2V6NFN4cENIaWdyNkZIMHpaVWYxdVNFNVFPeGliUVVJa0ZQV2FQcUUyOVV4STEyQ1JETUtQLVlpZjlWQTd0NjB2XzNPS05XUVlHZl9UcGRKM3pEaC1xR0NOZFlxa3d0eTU0TUtvU3BLNzZ0X1lEZ2NCcm9SNm15NmZtbVRUei1lSDVpS0ZvSnFxYWtoX0o5dGhrU1l1alNzYm1zckcwMmZidmNMMW5uOURRSUdVMlJLRGcwWWI1cVVoek1nTHBraWNjbXZ0SGlrQVFmSW9nZWVmNTMwTnhpb3VBOTNYSEd0dTVfcHVYVGp3REJzZjhPdGQ0eE1LMWZoYnFvZXpGYzVJRklxWWt5WXlBMXFCN1E3VmVwc1djSHF1cEVtOHhjendOYnhyeXh4dmpHaUJwbjllbW9HejdQc1RuWmpGRnVRNzZxcEhqblRqUENWRnFHdEp0N3pEZnBkcGZ0cVBYVk1sQldzT3NOY2pYVFQ4eUJWa0ZSbVN2akNzeE55OHZuZGFEZWh5dno2Z3ZRbXBzNWRGekhNNmNHOWw4M2ZSNWxwTEc1a0JQbXlkQkNiRno2NHhsX2VGVW0yUFVtTWI2Q1ZSaHBmNXJjZmxHWGRRWDlDLVBGSjFVSG1pc1JWMG1VM2xnekJuTWpDSzg4MFctNGZodldLTFZ4OW5KbEJObTdtWF9ZeGVMQUg2Vjh6VFA0YTVRaEVIUGVvVFJ4WlEyQTM4emEzcG5iSS1YaXZsOTE4eHBGVUN3UExpbGRjU2ZGQU5xNDk5OU43X1lUVmd4bXRPTi00YXJkWWZwbE9yRnMwbzRzbEhYVVNOUUtNQUFLNXQzbGFtcDVNaFZRUWExWFAwVk5SdV9KS0lZYUJCV1V5T01hd25vZDA2MEY5T2N2Qkw3ZVUtQlJkak5NeVgyMFRMT3NkWUQ5SXR6STd6RVFIX3l5R1FEdVFfall0X2ttTURTMl9FTFd6TVhDSUs4Ni10bGFCT293dnZGNlVpWlRDM2N5WG9Ic0ZoNzFjRC1MWks1VXg3ZFhRNmR4bUtGRDE5SG9uNlQtV0FySk5lOEk1NGpUaHU2SWZqX3M4VDhMQVY3QU5jMl9INGZzeHFuLXg5MjJ3T21BamQzNmYzMF9wMmc2VWdlQWZNVkFFc3czWG1uUjhhbGFLOTVkMnJKSF9fNzVOSDNIUjl1RXBaNV9sLWRhNmVDOGdvUDBLbTk1UU4zeEtVSWxjb0Z2d3AwTTh4QUZMelN0RUVSN0l5dDNGRnNBalVuNzFIWlVIM3dEVHpNUW5Bdnp5RWdsNmtkRnp0dG1PQ1NOclBGTXJpQ3FCejEtRXpYT2YxR0d2NXJ0N05aUW9VX0hjM2xUN2N5eWNUSV9JNDJQUjdmRG5RUHAyLXZJRXNOQXoxNF9zXzZxUktVVldoTEJWWUVnOU1NMXR3bkNkM0d5MjBKMmdvZ2xxbzdRa3JXYXp5MzNBdVdXMV82RWxOZHQ0OS0xYWNpTHNCQUZxaDdxcUM4eDM3bGR1MFhRTzczU0pYMDV1dzRSTk5fUHFXOGY1cnJFblhuWTV4cl84d1gwOF9EOHlXNjc1NkxFT2Q3Qk9XYmRCbHl2a2lhTG5naDN5UDlPQVQ1ZjV5cHlhc0l1S3lPckFnX1JqQUtPZzNUQm1UZjJZTGs1OUNxWFpnbWhKNHJrS1M5X2p3UXI1c2lXZnNFclVXbVFRaExueGZZNGVXMVR6NDdRNnEtSThJdmJHdm9NZEc4aGRESXhzczJTQmZLZ0lpZlB6NGpuLXp2TVVzOEZnTDA4UWpDVEFheHFHOFJYbVNqSW5aRERESHlzY3owSmRabHpITDJsZkNMMVk1eE9Ha2JrTV9YZjBreER4ODF3bVFjWTNXbjl0eFlFLXhFVDloNndOTGN6UVh6TzlONXFpSDZpNGJadlR0MkxqdmJrV1M5MEw0TFVFZ2puSE9PTVQtWmtYbWI2d3FoVzlfbjNvWkRZcjlNQ0xPWU5FQ3BUVzF0aGZtTVRDTkk5dW95V1hHZDdDVXAxaUo2UGRDT3lXb19vblpnaGVQY0JNUkhmdU9NN3pfRnJIdTlqNEN2Yk5nd1A2cnFvQnNWcFJMRUp6bHhZbU0xZFF1WnFheVlYbXBiOS1XTnhtZ01tWVd3TVhaZFZWWXJhOTJmSXJUVzdkU0lkeVpZQWI0YUtIZVlMdExJTEtkRjZHLWZiNmVVZTU1Vm9sMEl5S2I1X0xqTFhRLUtBUW92OC1RaXhUODN4N3k3cFZDeEZ4R3R3ZnBOLTFVaklfTDVEZHQ3N1dxMi1wN3JaNDFoOE9ER18yUmlOVVFucUFEeDc0WVlFX2I1SlA4MjY2SDhCSEQxVjFWUFR0aVFvUFNETF9kZTBFVnZ3dUt4Y1pRYnV1UnpzRUpXZHZfWkVJRks0dXdfaHdQOEV4ZGFpb2M5a1FzMmdJem9DVW1yaGFjSkZUU2J6YXI5elBteld2Vmc0a3ZjVUMwSVkzTTMxS1JhT0plWkkxQ2FWWmlfblZHLUYtbmFJQ3hIcm9tQUVBZDBEVFJJOTNBU1E3QUlIVE10bDlfQkxOaEo0UU1RQ0dSblFXdkF0SzhvbnA2NGVzcXBubzFfODktWDFzTVBaejlOMWVOOWR5UHBfZlVfOEpUdmwtVF9lRGwtOXJaS3duUnFOdHhHeEZuVXBNdXE0MEg5dThlMHhYbXJlOGdTTzhxZEtKeFpvMkNEUE9Ca2RGcF94Rk9GNFNCUjdQWGx4aHl3SWJ4dVYyRlYtd2FERzR6UDZCa1ZKdlZHejJSNkpzTXVELUoxdWJtc2hhQTJsR19fbXItLXVUbFlybGxLanFVUHBQS1BGUDZVZU9weFVWdV9CWlZBYnBJRmV4VVdxc3hrZXdxaGlFS0lSckF5Lk9YUTNscWkxdk4wNG1sb1Mxa2xPdVE"}' + body: '{"value": "JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmR5bWh1WnJvMmhHTEdNakFVNEMzbXlJU1JPUFNDRmpvckxUcU81TkZCU25RT19LOW5BSGxoeUFHSXJnSDhmZ21CY3QxZndxdTI2TEVPVmJZT29Cbk5xMWg3U3c2S2tVTkVhY1ptcVJFYzRmb0hZVzJDYW55ZHJEb1JZY2VUME1aSEt0MTFIZF9KUndTZWNnS2ZyTVMxTFhjdlZab2MzY3hiT2wxRG1rOENsZElZZ2dROGwwcXZTclpsWV9qTHRtaTc4SHBjSTZoczE3aFRoYTkzYXIyVGszMUg4UjhFR042Y09JcW55YldCSFFRQlpOSU12RnRnY3hZRWIzWDBmMzlmdk1sajVTajFtZG00TDN3VUYzZWNHUWVIODdLQWtIemJiWWV2QTZmcU9vaHVuWUY0aE9XSzVsaS11R0pGOUprdFBDQmkydF9jSlJ2eGdBQlJpRlZLUS5EUEtzYVRwaEVKb1ZJdEpXcC1MR3pnLjRjMnlBMzFLcHdSQkNDb0pkTzdqdFk0NmxBZUlJOHhORUp6TU9xd3JwWjNQREtVa1JhOXhKdWVIVG5SU1F5bk5YSmY1LURZVjNqRGZlVjhKamIzRTZaeTQ5VTdqZ0pvV2lkZUthTHRXQjVTcWtEd0pSY1FuLW5aTVdJajgwcTM5RXV4eC0yeGdNdDlGOFhObmlWNHN3R2xOZnJYeUkzNV9OMktGNTh3RmtTcVEybmZRN2owLS0zeXBGZjZrN05TNlFJYXNWUEIxMkxXRGFQSzBVcm5NV2xyQ0hGbkp0WmZ2Zm11TnRMVnRQYUVIdDFzZFVad3lsOVhQSTk3ZzNpbXFPM3N5UjJ3ZmtTUGtXdE9kR0VQaGZKWElvN0F6NGcxckpucTN5OEd4d0hQbklHVlZTODl1aTJRdFVpMXM1VHVNZWxtTUJmczl1ZDVpQ29lSS1vNmtJQ3FqN3Rjdy1rTkN4SGQ3NWE0cXdDTnU2ZlNjM2VyY29BU2RUMEdZYVdXU1ZBWmg5cC1QZzZlVXlSUF8xbjFPcUlLWDJPR2NIelNvRWZkQmZMSVZxQUZJaDB4X0tqckcxOE5ZXzY1V1kzNkRJVjR4X2ZHcEQ5QXdzdVN2a19PSVZ3VDB4NkhtRTRhMU1pTzl4TlY1R3Q0N2dIY1NrdldpM2JteTE5VHF4X05fdm5PZnE2Q216WVhDb1JtdVZnaU53WS1fNXNoSVpHUlk5YUF3cUVxRUNkOWJLbUgzeDZlWGdUR04tWWRrSkVHdkt6RTZ5UExHdGdMX0RqQmNMcW5JNHMxOXhDRFFLTnJIZEx4WEpQcVpHYmRqTHVfbGFWcXdBUnI3S0lZUG5FNTBOalZyUEpZU2ZaRjRCMWVPTUJvang1cFJFbERDODRqSTRvTENJdTBhbTlnNVBudlhUQ2FHSUJPaTBCX0J1ZkZZajBndWp1dTdHZl8zdDhrQ1UxQklEYXQwX2JlUmx2MmJrR2RNQnBNRFlRaTZ0NmV5U2drYkZZM2dseVo2U1ZWNE1HNER0cUJCWnVISmRCZTZzSFFNRnliNHFQTkpfN1pGVEJHLWRfc2gxYWJhWEM5Wk9qV3FwZGx5RXBKaE9kd2dXZWRXcDFOQy1sSWE0eWZoLUVjVTl5VDZxU2FXcGd4SUNEdjJZekc1QjE0aGlUU2ZKb2txVG9PeEtWV1gwTjJGc2VBNHduYjBZWGdXSW5aYVk1WThsUkQydzVrNEpTaGYtUm1GejRvU0JLWEQ3UEp2dTNCTEg1RF9GVlM3SEZHajdMRG55MkF2RnY0ZVdLT1ZCWWphb2hndVhFOGc0eXFsUVZERGM5NzJVWVVsTS1SSjdqUjlGYUJGM1htdlViUjZSSjd0WTlDeURuQ0xJUWI3YUFJM01iRi1uTkI1aTZaY2RyaWNXWWo1UHM2NUpBZzFGZlRrUmRINXRkRXVlbDhqandXNDFoRWlfSl95QWVCX3BTNF9MYno3RS1qWTFOTmEtX2loYUtqVDZEM3JpQWc5WU5Ud0hndHRzTGZReTJWM25admlEUEZSRkJUVGIyNW5qeXQ2VGwxanNmMVNibkhnaXp1NDUzQXVWNXJjNzlHYlBsZ01pd0Q0TDR2Y0JLSzdVMVNNNXVXN2pPc3czeVUzMFQtSXlDUUJ5aUlpbnU0R1Z3LUhuLTZKeUFYZjExQWpsSG8tcW03dDltZmJxOUNYaU9Td2Y3N2FsNXQyMER4T2tfUkU1cW04ZEk0NWozMjBia284SkxjV3VVODdNNThYTXNVaEVycGM4OU0xeXpBMUM3TUg3VnhSZnlQNUFBdzdBVTVBUkx1VVhleXd1Zk91aEtqVjEzZ1ExNUYxS3FNVkdxWFY1U1g3Sy1waWdrN21HUFVQVW4tTXlQYXQ5OTVDZ1BGMTl4NnFmd2M3RGxZSDBLbklQd056bHVfTHA0ZXQ4T0NST0sxOFd4ZzZmNUdJdmQzOF9TWEZWMjJyOEp2enNzZDFrX3htbTdWOTVGbTE4QW5WZWRVanhueDQ3aGFyS3JQdGFsOHo0TDM1azZCSDVFQlQ3SXFxUWhodFQtenUzTUsyMzZISWdsd3hGci1kM19IRnlCMjd4M3U3ODFpQmlBTVZ2R2tERW1uVGhOQ1c5Qm1JcEJ1bnE5eS0yNE1HRUlSY0FoWFN6R3VzQUtwcUJObElTWl9ZQWVxOXJRVXowYnZfSUxsNkRJdTdGYmlGLVVuTFdOMWdRUWlkU1dHVVh3Q2YzN2JMeFpIUGFCOVFnYnp5R3ozUDNxMHNiWk1Ra1BWTVZPSWF3S29FeEdvX2lPd2pSMDJiaGh5aWI3em10NmJKZ3Z6R2xZbC1uM3lYYVZWeEx6M0pQVWVPVU40Uk1hT2F6SHYtWE5wYlFWQndUQ2MzdHlwSlJpanpHVzUxOFVNeFFMRmZYajV6eHZrb3NxSGl1c3llR0NoVWFSWm00Si1CQkRuYWxCLUlaX1NoMXR1dnRXT0dJSHRCV01qY1lmckxrSUNJUDktOGQxc3AtZVV2Um1nRzNseFFWQVNuRnJyYk9NNnVzUEc2bEtiZHVhdnU4VDFLUWlNSHdhMVdYNGJYYUp4LUxqcE5rbW0wbFltT1RwUjV4bEE4RkdwY2lvM1licGxZVnVzNHhWV0NmS1lEZTJ4elhwMGJvSWU1Nm8zYThwOERrbDhWR0Fwd2JRdDI5TXZGdnRhSWpDRnJyYUdRZjV4ZG1sa01PSFNLaDhQb3R5TG5talFSTlZva3pEYUl1dUtMSjNRaGdrNlRhejc5b0pLZGlMVkNPdXNwMERSS1I0SFlBV2pURHVCLVhITmd2YnNzWFNFTkQwMHoteDVfcjZfTnNzaVhFU0hodENTMHNjT09DZEdVNTA3MTZpZ0szYlVSU2RzZ1BzOXBnd29vZG9Cc0VQdXpFN2ItZFhVbWdxNUVFNlgzY1Itcm4wblRFczNac1dOdjhuanFfSVYxMjlNMVpNenJnT002THhmVGl5WjBScl9BOF9UQUFXRWpkODV1VUI3NnBiMUZXdXFOTHVwLW1fNUt0elc5MTJEZmVndVNoSEljS1lsT1M2U3YzZUVhWlZlTnJSWUJsUzZYLWlINVl2cVJYX19yOGYydTNYb2JpTWxNbk42TC1jN3VqVHlCa09wQ1lVU3hoNFptWHZfSHhJZ0t6OVlLMXVzNEV2Z1h2bWFoN0NXSy1NRmItSzRMLUUydWV3eGc5WlpMRm1iTE4zcXRhMm5FRGF3ckFIN0E1QTNBU0dDenFmR3c3VzlwQzA0SnpSS3FYMnZ5U2lzaVlJUWpCNUVSQzdYTlNYN2xWQ3ZpYnpsRXJlNzFSaHh5bUlLekEzQ2VTTFlIX2pMTEE4cEh5Qlo0Q2kzWlNOcVBrZXhOWlZRdkxKZWY0TV9JanV3UkxmY0pQSUxiOFM1Ymt6ZmpaSDZKdWp4Ry1ycl9LcTE3STQ4N3ZuWVVGSGM2UVQ3XzZzR0lCUzZncjRPSkFLSUdMNjQ2SXhJRTExdWw3YTZJYkZHeGl3X0c1QU9kd1Nvd0tmckVVVzFMOEE2ZWF5VjVjSFRIT0ZHUHYzM1R1U1VpN2pFMTJXdm40eThNTWJKYVhTNkFJVS0zN2Q0WjRmbFpjNU1ZbUxIVktoQ1pMYjh1Rnc2REZCamdyY0Y3MVhUVG52dVp0cEgwZ09EM3ZqV1dvZEZwNzlqdzNfNHkxbVJvbG1semhDaDBZd1IwYkJ5R21qS2dDVEQtNjdidEdZb1FHLUY4SWprUzJxcXhWWGpvWkdyOXVJZkNuQUpTUmRlYWNLaWpkc3FKYUtHSk85dEF2YXhXWXc4MUFMQUVqdElySk1fcTJ3c3liV0tSWkJmX3JUQVNfTFJUSGVpd2prRVVtZ2lWelQwUEdfSjRDWGM0YnFhcERhQURGTGlScFNwYUlKS3JhdVc4UDFsNzROeHRVbXB5SDBRZ2U4SnJ4b3lYTDQzdFI0T0dOLWg0aUUwRzNoa0MzSzFRQ0Z5NXN2VmtBdGxha2l0aXc3ZVFGN1pjcEtSeE5hREZEYllUb3pFTVJWQUtWa0RYbWEycjRxVXJPc2ROSlROQnFlWWdhbnh5Q1RpR2FNRVZEZjdEanJTWjktTVJ3a3R5UVF2d1NYa0k0VmR5SlViX2xJdEF4UERkMUNpV1BYRkgtdWdEa1RrQmRCdEpYMEN5N3Jaby1kSUJ6VHU3cDItNTJvOUotVUhfbDV3LU9FZ0dZaENnQUtGTkpaSWh0Z21nY3ljUVdHcm1RT0plN3QzNUlIeExwZ1Z6aTJGVWp0QWNGR0dPeDVuQW1DTVZOdzhxQnZQbnV4bzJSV3NZa0VJcGRRU2MwS3Z4MHBvWmEzeDhObW1BYnYxa0VzdzhZNjhFNG5wSTB6bnFLYmV4NFU2OFh3ZTBlSGVpV2lwemthREpUUnRqVWg1eE5Wak5RMktPYTEteHJjSjJ6MXdJc1JqdXp4VklNaGdpSXVleGp0aWNleU81WnBjUWVDZ3J4UWx5bFdTdnNOd21nOUJIWmNwVnZaNWN0LWVvZ1pQSUN4S1pZSmNpTXd1ZHlZdUtXdEdiTVRMWF9jYzd2NXdTa0o5VnZFQXdfUi1QeW5VY1hZY2RNcUw3WldxY2E4czVIRG1lWlNZb1RWTnBSUzdJRFZBMnh5Q3JZWjZkanppYUZHT0NSS196d0pPWVEyeE4zWGpMYXAxSWNFOV9qUkhJM3loYUQwUlVyVkppNVdGdC12VnlsYldVeVNZa3JzZElzUGVzQ2U2S3NpXy0zdHNzNDNGU0NCVkZ3azhhbkdxcGVwWmdneFkzX3JtSERiSjBaZmV5SUlkb1RKYzF4Q3dGZ0kxZ3o1X08yS1BXWWF1ZGdiMVpjRmstS1cxSG1ISmx1cU9Qa0NzZUFGYmc0M2NZTUtsNjJKY0VsVjhQdlB2Xy1pMFU4ZDJ6bEpfUm4zakpvb2NnV2o4RXR4ZEh6UGozdnMzRU13ZlpVQjIyVnZGM243N3g3STZxTkhVZlNObGo0TWxnc2ctVFJfVW9Nc0M0dUlQYnp6XzBUdlJfMXQ5LWVYaWZWcF9zYXhEWEJuS1R2LUxSaEIxRjA0d0R3SzZpX2h2cmdwd0ZVbldSME9ObURSNVp3TmVaMGZ5U1V5M3lFNnFZLXZSbXB5RjVqdE80V1dSQW9mb3R2OXJNd3FvNTlvNUNmY0kycVVockJvOERSd3JzOHFMczR6Q2Fxa190RlZ6dzVrdkoxSWs4U29EQ01COFYwWFJnblVLS2FndFJ0UFVfUGh3c1BpMlU4NGJpeU1WMmJBQlZsVEx1QmF6ekg1UE9Jc1o3bDlyLXV6ZW5XR1ZwbEpFUHB2c0ZEMy16OHJ0VXN6SjVNU0NJcERRc0xMUTB6WmZCY212ZURJMnZ0c2JvVEgwSVo2QWl6VnlTVUtaMnZDNFNCRml4Sm9GT25YT3ZUZGVfeFQwRGJLcUlac3llX1lLbG1Kd21LNHlRT3JwckY2NkRjZmV1d05YWkJ3a09RMktJVVJOenFQX01ERmtIRWIwamtlektrTjJ2amtHcXgzQ2VjZHY1SkZCWC1lSDlVeWIyajd0VGphSkVYbUtvZ3VDY1hJNjBOX3RyZGhRQUpjeExnQkloekJjQ0s0RmRkZ24zMDh6b1VHMU5pc29pWnBKekIySkZuZzFDeUpJMXlSTWhSUEdJNFRlMmJxV04weUdXS2NJTmI5NUIxcXE4Vmg3Si1IM1RZeEtydTVKTjBDNmdoVDJKXzRDdzZMNWdMd2dwWXA3VkM2WDJmY2ROcWRIUW1tRy1uLVFYc2Vfa29MNWF5U0tidkowYVN3UF84OFlYYmNBU0dhZW4zSVpwMUNhaVRfTXNMaXBXX05rOUZYcmlXcHhNZVYyQU9sZFE3MmhjYWVhNlBTS0g0blZwalhwMTk2X3lMT0JOTV9Vbl9Wc3FZZzl3NlVZSlZHYloxS0dUd1RVMGIzb2Y3b0ZnLVJNTUV0bGtBYlNUTk53ajRQSDM3a0JGVmhra0VkYmxQdlFDRk9zYzFRM1BDcVpqS2dsZHg4Q21xaHNHVDN4QlEtczd0bEdUMlJLaVdnbWZORDA4dHdOYlptZnV2QnEwYnpmandnQVhsYVZwUVp3d19sV3JoNmJUamVVREtfQmc1bHljSl9JeFhQOXl3X1pDZ28tN1dYaDlONm9fRDEwM2ZVUjBhLWRuaGs4UXhCbGc2bm1QVWVLekt3cGRrWmxYRGNMazBmMW9DNURoaGR5SEY4SkM5czRBY01LVzUxZ0pBSHRFczYwZzQwcko0eTJKWG5sbnoyenJHNG5zMkNRc3lfblNWUXlWOG8xaXdxYm1pZUN1dXBSTFNZcnF6M0xsX18yYUp2UTB1cmdqVkI1bkhhMkpkVmZvTXh5WDVwMm9KaHYxZE8tMlFuZmJoaHpZNExVNG9qNmhMMG04MXhfQXJWRjBUaVNNX2dLWlM5bHlPR0FCSHRPZi1GYmZzNVpOMmJKR0d0ek82QVRGaWFiQ3VTX0RzbHA0YUg4M0xaNGZ3WXphZFZPeG1UaHFIUXJyaGl2TDAxTzVlYk5aa2Rnc2NmblowLTNTNjA4QXNYRkFYM0lhRFR1ZVhDa3VQc1BtcWxLeXRLVmtjOU9BVktIb0I2YkR1cDVIQzZZQVY0dkt3VXAyUlN3dDIyNE52eTJ4RHRfd194c3VieGdSbnhPMEFGaFdUQ0dqMWhKeExZaXJLQVlKNTlVY3hoV195RURlcjhhTWdrWUNkWHVMNTNxQ2dLbFlVNHNmN1hGYktFWHdXUUE1RWd3cTVsRHlVbksyT2kwMlIwVFpBbWRfZFh1ZG0wMWFnZ1FiNlVwYU54VDU3MDM0Wng5U0Q2T0IxRzFlbGtITEFHcThaT2d3Qm84c2YyOWhaLVBBZDhpa3QwQkhSOHhBODA4SXJlNmtzSkJDbVk0WTB0OGo2Q1NvNVF0UWtSdzZmVmE0ZHctVWNSc2s3NkxZSGZWTVRXQnZMRlVNdEVSRUpoSGVLdlRjVHcwdXpTRHJPcFFMRXlISkRrZV9hVjRpenRYVy1nTHNDd3l3czNCLUtoQ3JJOTktZ214QTVVOVczMEdHRWY3NVFWU1FiallhU2JxVmFQMHRuWVc1R09meGFtYVdNMnRUcC1VRVRyRHhFMGMwY1pCbEdEUFpjT180Zm5nOXVvSG0zVG5EYk51Z1ZIdGI3N0F0RzJ2ZU0zc1o1WldpTWFmRXRTYUNHb242OG5kWDRFR1V3STdEMzQ0YVhFeGR0UDRaSWFnQ1d2Ukd1NHk0Ym1RbURqaHhFbnVMOFdLS2JXTDFYQ0NyNVFyU3liT3VIUl94d1RnRFFRY0k3YnVxTGhMME1jbHBTR2VTZ25VaHRkekI2ZTJiT1E0QnVyRExjbHpCVFVwMzhtWm95TVRfN05PWTYtNHktTjE2SDdiZTRQVFozTGh5eUg3dUNYYUtsbFF3VExERGIyZ3ZUdmU1N1hfNzRkbHBlNFFxVVZ6cWIxcnViVXk0Q0c3MHdsTUFGMlphdEh5WmlhVHVVR1lSbWFUQmhJamNSZFJzZUVMdmV1U3pMMVEyZGdmbGNsTGdQVU4yMFdHSURKOGxHdklqU2NzbVNjZjFNSnNRSjVPRzVzcmpMdVYxZXFHUkVBR084bmlXd1MtN3p6QlZxbGptUW56MGhmS2tVbXRMMEJuYktXYURLeUtsa192TnNBSkFqVEJRSlpTdkxaUG1xbmJ6b0p2N1dNN3Q1dngycEJsbDJ0dTBRM1R1aDdSWTFOZUROWDZta3B5bmtrR2N6V2E2TU1KWkdLYU1iSDIzVkF5V1JScC1BRkx0b3hWYXFqOUpkei1lNmUtaVNwQlFpRWFxcGpvdFpBT2twVGM5VXNsT0szQWdrZ2FMX0RBU1FDOEc3VVM0VDJlLUxrci1Dd2QxeUswdVdmVmU5LVpBYW04R2ZzclpWTHJGMEJIXzVkWlZoNlB3N3FEZS14ZVRfenljenlqOXFFYkhTTjlqd3VRMmNmWTJSZkUzZEpoTlJaYzBlZXpyVWZxa1JuRXFvX2xTMVBYampXV0VoUE1PcENYbURqMV8zWllaLUVpSlItWVZBUEJSNXQ0eE9hdFhULXVyT2N5NlByQ2s2QjNLNTNQOTdSU05WLUZ2MDE5NzJlTVdZVllOMVdjaDRfbmJGcjVhYkpQV0I2UzFuUEprU0hyU2Z4WVptRmNHaG1jc1BSMFI2V19hMm5DQmhPTFBOUVdQc184Tk1JN1ZPS1VEU0lLMVZRWmJpLW5kcElfRGxKZ0pGcnYwU3Q1NTlINThjXzZrNFBENWZsQWdkWFBKbmlRX2FYckRpTFFaSlhRM243ZUt0Z2J2VzFGek1sSHAwOG4wd3g2b29xcU1aenE4eVY3RDkzSE9wUVNLQ2hBVTNNNDVEZnZzdktFTVo0ZFRlaFJIYWo3SlZGc2pWRFVFS0JrckYwSDZsMl9zMjZmNjJGbEhSY0ppeVd3eW80Tmt2YkFCdG9LSEpSUzBLVGZUS3BRYmE3OEVqZGZoX19SOURQUFlkWnNDQzlOQnVyV1VlWm0zbTRsSFd1emNJMkpLZ1RxN3VlaUFkWVdFQkljMkNld1d1S0tGUnI0Vm5QODNNdm83NXZwd0JRT29DdWhvZkJNSGFzbThhNWEtWW05VlRLNGRSQnZ3TDI2b01hQU1PWVQ0VVhUd1plVW9UVUlQZURvZGRNbk9PSGVEelZuVGF5ajN4a2d6dDQwWUdqazZwcTlnejZoSnN5eXhSc2w1RU90NUNxZXZzY2NtZHVrQUVvQ0dhb2pTeVJ1ZUlLWUtLR2M0YktNR3RnSC1nR0FYck1GT1BZNHo5NDV5MXZfVktGZ254blBITnM1VFRxS1NFY0tLc2EwNWZIM3htSktrTnlUTy1MeXA1ZzlxMS1CeDZIUzZxVmVKLWFtaTgyUHRzcFFOZUc3cVFIbDF4LWxPWjlla29ZclVteXV4bnBJeDNnRlc0eGkyUWlHNWV4TWxxRFRWM19JTTBCSEdZbUNMTFUzTzhjTWEyUTBucFd1THJYZ1U0LXE2c1YzVlFYM1pydG9NdzVRXzRtd24xYV9PbklpNHdYSTJrVWVYSWVVOVFINzFVYWZJcHVWWUhqRDhTOTdYVVVOQnJ6YVN6d0VJcVhvc0FZazJsaG9FSy01Y3d1ekdEaUU5Z0JSMjJ2em85T0xhYy1ERGpSN3pDM2ptX2lSRlVqbFNJTE9fYXNRYm9VSnctVnlWRy1kOWFKZGV3aVV5bmEydXcyTkhsYVhFUUk0Ri1wS3hMNk04bFhMVDhDdnFVVVA3ZnFWVFZCUnRmZlRkSEtGZ3BZUFZRbk5ka202SmtVZEp1Z05NSG8xRnMtbDdBZmxnVHRKeEZ1Um5ZcVZkVVlWdkJBamVqdXZoQ1FtaGFlcDdwSEUwQVhPSGp5dC1jWjFpN2RqQTNrTTNONDJSVC1ucFNfQnExYkJoUUFLRFl5NnhzOTJTMWdHZVpMcmhYRnBMMkt0b0E0Y2g5YVNESEVhRUVoM3BTSDJydnhfRGhLYkxhazJXZWVpMXZHVWpMZDBiZjRYcm5NcExhSlV5M1htbjZVdXBsZHA3UFIyRGpZVVV3dTJHS3FONUhKLUlWVlNvNlMtaWhuLXhFZUNSVmo3QVdQM1FPLUw5OHVUQy1NR0laOW5pU0ZuUGJOZnlHMUp3ei1FbEhYOVZXdloxS0pKMVpXSU9PZ3ZtZWppY04xTUcxZ0F6V0NkRFhIaUpkU3c2RDJPMnNiUGdFWFlLZFJNWG5CYjVJQlRzZkNIc1RmNHlGZGxOaVNqNm5DdlU3VlVoeVdudmZhd1hiaTBwbkoxejV3WDRBQURRODdPdmdQRzd5dkxBM0sweXpXeXhOajhuLkxkd0syeDBvSUxocXZtMnZpSzhseXc"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '10636' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96041739.vault.azure.net/keys/restore?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/7089b08b10a64ec68db241e20e2109d0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qbGcivUVxthKiCxcjxOGdsiItrjjTm0_-o0gkZmRSDlEY4ixbjJYBZMwZLxLm7_ZzoGTVTdON-_6bLu-ZwFqAAe2Nc_HDLkL3FTn1YkjTSA5I6FTXI-CC79m3mPLbrVNkHRUkN7QPpl9Qak8RyRl4TA5XtOp_ztKm5Lfuc1eJsosaRdqaMe2UlEbu0XCdYDoP1UoNRAhrUZwli-GHH6yWQxq0SBtnfUsXH0CkgprrnpDYM3dxUkjJJ6IRpW4acRXrFDg-ccCBQDRLty6eSRehugfZyTGciaT4fBcj245OjytQZHxz2ZGixRxN0YsvjoZXqquXKqfkKEcknMDNapyFw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/d2c863b455c9439b87fc78c6ac184217","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"uWCbdAq6V_Z3_JRNeKK4o27y-v8lL_IUNGXQHywjTU4aoVK8iDvM0ChRMhlChsMcI-SyGaAk7kiS2ywdNx5JI3rcaZiiasFZ-4CUnUQbOB_p5L_r2dDXvfdQzGaigM6cttEW5Iwze5dEd3BOcDQumxRrtSJNld4AlxEK-Kp7xaOUFc_2yAV1QPvELtjJLN1zMNw12FXNqocpZwZ8t1BGvvXKYfz3yrS6rq0nG36n3S1yA9Cb0NnrTjp84na3diRQXpuaUg65QXrbhcBW6o1aKTsuEAVH5FAqDliBa4v5lqTNsWxOGS996rMfjsJHJQ_fymvIy69zHrMe2UPupwz_OQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527628,"updated":1564527628,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '644' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '644' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:00:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96041739.vault.azure.net + - /keys/restore + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_recover.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_recover.yaml index d1318da0dda6..f2bac86a4b60 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_recover.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_recover.yaml @@ -4,444 +4,502 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultfcf91456.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:18:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:01:06 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultfcf91456.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/c062f7d6222743fc8ce103b1d9850298","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wTcadP8ONiTwlvzh9KqAqaScUg1734Ux7ykEs-X3wyoi7MjSFaGb-ZAhDrH7iKSbArQeT_Pp4EvCl2axAvOJvT_P2Kw9CE9rtOaD2p6lMZjqY2R0jiMQVyYHpvOICi-87uhEe_N3pdoWxS93WXjo8NblF2dmvwbwCmuAD4IPWD5Ve0VGf2kKh9QtGmJHrQ2C1tdkPP1VHQmfgLNjBQmvPPxK1aAUgTf1jw1NxNErOyHOyiKuYe_phcO8qg0st7Q3wRuDfRYs2_J_1veYQGytghxlAlZ8DjiyUyKNK2fTDUKU5-zDCFWnn9mI1eiTVKXo_4FgEWLfno9vhZEvsO4EOw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703534,"updated":1562703534,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/896fd129ece84f1781b0fbc146a5ecf5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tC-zwt_MYEF4cZ4DDFjtfMUrlie9a0s5ZdkhA2p-BpOGpfcR1jkXQtOirLaC-c7vCyHTj7FauK-j-sZp6tLLQVTrjxuF4yr23qnJPaOsmmMT5um36xNg8eNaMF7p7z9VYEAwXOAWx1ei77MdfgBRV_YMzdxRLYvyzvorUDWhHg58Ple1ZM37VStOpU8layK0T12wJOsqJnPvOvz_m24WlbaP94UJcjs79GZPCXdrK-XRmmaw0ibKbE2mtAltfJHOMdQ7etmlUUW4eY838dTGudYi3vdvJI77h6700K7QH8xRm9jlUlp9AH8PIcBqfW-QI1a45N4GvsGYfHFYCz4piw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527667,"updated":1564527667,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '656' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '656' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vaultfcf91456.vault.azure.net/keys/key-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1562703534,"scheduledPurgeDate":1570479534,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/c062f7d6222743fc8ce103b1d9850298","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wTcadP8ONiTwlvzh9KqAqaScUg1734Ux7ykEs-X3wyoi7MjSFaGb-ZAhDrH7iKSbArQeT_Pp4EvCl2axAvOJvT_P2Kw9CE9rtOaD2p6lMZjqY2R0jiMQVyYHpvOICi-87uhEe_N3pdoWxS93WXjo8NblF2dmvwbwCmuAD4IPWD5Ve0VGf2kKh9QtGmJHrQ2C1tdkPP1VHQmfgLNjBQmvPPxK1aAUgTf1jw1NxNErOyHOyiKuYe_phcO8qg0st7Q3wRuDfRYs2_J_1veYQGytghxlAlZ8DjiyUyKNK2fTDUKU5-zDCFWnn9mI1eiTVKXo_4FgEWLfno9vhZEvsO4EOw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703534,"updated":1562703534,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1564527667,"scheduledPurgeDate":1572303667,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/896fd129ece84f1781b0fbc146a5ecf5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tC-zwt_MYEF4cZ4DDFjtfMUrlie9a0s5ZdkhA2p-BpOGpfcR1jkXQtOirLaC-c7vCyHTj7FauK-j-sZp6tLLQVTrjxuF4yr23qnJPaOsmmMT5um36xNg8eNaMF7p7z9VYEAwXOAWx1ei77MdfgBRV_YMzdxRLYvyzvorUDWhHg58Ple1ZM37VStOpU8layK0T12wJOsqJnPvOvz_m24WlbaP94UJcjs79GZPCXdrK-XRmmaw0ibKbE2mtAltfJHOMdQ7etmlUUW4eY838dTGudYi3vdvJI77h6700K7QH8xRm9jlUlp9AH8PIcBqfW-QI1a45N4GvsGYfHFYCz4piw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527667,"updated":1564527667,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '787' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '787' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /keys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' headers: - cache-control: - - no-cache - content-length: - - '76' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' headers: - cache-control: - - no-cache - content-length: - - '76' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:10 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' headers: - cache-control: - - no-cache - content-length: - - '76' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:19:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:13 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1562703534,"scheduledPurgeDate":1570479534,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/c062f7d6222743fc8ce103b1d9850298","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wTcadP8ONiTwlvzh9KqAqaScUg1734Ux7ykEs-X3wyoi7MjSFaGb-ZAhDrH7iKSbArQeT_Pp4EvCl2axAvOJvT_P2Kw9CE9rtOaD2p6lMZjqY2R0jiMQVyYHpvOICi-87uhEe_N3pdoWxS93WXjo8NblF2dmvwbwCmuAD4IPWD5Ve0VGf2kKh9QtGmJHrQ2C1tdkPP1VHQmfgLNjBQmvPPxK1aAUgTf1jw1NxNErOyHOyiKuYe_phcO8qg0st7Q3wRuDfRYs2_J_1veYQGytghxlAlZ8DjiyUyKNK2fTDUKU5-zDCFWnn9mI1eiTVKXo_4FgEWLfno9vhZEvsO4EOw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703534,"updated":1562703534,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' headers: - cache-control: - - no-cache - content-length: - - '787' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:19:03 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:16 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' + headers: + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' + headers: + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:22 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' + headers: + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 + response: + body: + string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1564527667,"scheduledPurgeDate":1572303667,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/896fd129ece84f1781b0fbc146a5ecf5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tC-zwt_MYEF4cZ4DDFjtfMUrlie9a0s5ZdkhA2p-BpOGpfcR1jkXQtOirLaC-c7vCyHTj7FauK-j-sZp6tLLQVTrjxuF4yr23qnJPaOsmmMT5um36xNg8eNaMF7p7z9VYEAwXOAWx1ei77MdfgBRV_YMzdxRLYvyzvorUDWhHg58Ple1ZM37VStOpU8layK0T12wJOsqJnPvOvz_m24WlbaP94UJcjs79GZPCXdrK-XRmmaw0ibKbE2mtAltfJHOMdQ7etmlUUW4eY838dTGudYi3vdvJI77h6700K7QH8xRm9jlUlp9AH8PIcBqfW-QI1a45N4GvsGYfHFYCz4piw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527667,"updated":1564527667,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '787' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1562703534,"scheduledPurgeDate":1570479534,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/c062f7d6222743fc8ce103b1d9850298","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wTcadP8ONiTwlvzh9KqAqaScUg1734Ux7ykEs-X3wyoi7MjSFaGb-ZAhDrH7iKSbArQeT_Pp4EvCl2axAvOJvT_P2Kw9CE9rtOaD2p6lMZjqY2R0jiMQVyYHpvOICi-87uhEe_N3pdoWxS93WXjo8NblF2dmvwbwCmuAD4IPWD5Ve0VGf2kKh9QtGmJHrQ2C1tdkPP1VHQmfgLNjBQmvPPxK1aAUgTf1jw1NxNErOyHOyiKuYe_phcO8qg0st7Q3wRuDfRYs2_J_1veYQGytghxlAlZ8DjiyUyKNK2fTDUKU5-zDCFWnn9mI1eiTVKXo_4FgEWLfno9vhZEvsO4EOw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703534,"updated":1562703534,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1564527667,"scheduledPurgeDate":1572303667,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/896fd129ece84f1781b0fbc146a5ecf5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tC-zwt_MYEF4cZ4DDFjtfMUrlie9a0s5ZdkhA2p-BpOGpfcR1jkXQtOirLaC-c7vCyHTj7FauK-j-sZp6tLLQVTrjxuF4yr23qnJPaOsmmMT5um36xNg8eNaMF7p7z9VYEAwXOAWx1ei77MdfgBRV_YMzdxRLYvyzvorUDWhHg58Ple1ZM37VStOpU8layK0T12wJOsqJnPvOvz_m24WlbaP94UJcjs79GZPCXdrK-XRmmaw0ibKbE2mtAltfJHOMdQ7etmlUUW4eY838dTGudYi3vdvJI77h6700K7QH8xRm9jlUlp9AH8PIcBqfW-QI1a45N4GvsGYfHFYCz4piw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527667,"updated":1564527667,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '787' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:19:03 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '787' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/c062f7d6222743fc8ce103b1d9850298","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wTcadP8ONiTwlvzh9KqAqaScUg1734Ux7ykEs-X3wyoi7MjSFaGb-ZAhDrH7iKSbArQeT_Pp4EvCl2axAvOJvT_P2Kw9CE9rtOaD2p6lMZjqY2R0jiMQVyYHpvOICi-87uhEe_N3pdoWxS93WXjo8NblF2dmvwbwCmuAD4IPWD5Ve0VGf2kKh9QtGmJHrQ2C1tdkPP1VHQmfgLNjBQmvPPxK1aAUgTf1jw1NxNErOyHOyiKuYe_phcO8qg0st7Q3wRuDfRYs2_J_1veYQGytghxlAlZ8DjiyUyKNK2fTDUKU5-zDCFWnn9mI1eiTVKXo_4FgEWLfno9vhZEvsO4EOw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703534,"updated":1562703534,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/896fd129ece84f1781b0fbc146a5ecf5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tC-zwt_MYEF4cZ4DDFjtfMUrlie9a0s5ZdkhA2p-BpOGpfcR1jkXQtOirLaC-c7vCyHTj7FauK-j-sZp6tLLQVTrjxuF4yr23qnJPaOsmmMT5um36xNg8eNaMF7p7z9VYEAwXOAWx1ei77MdfgBRV_YMzdxRLYvyzvorUDWhHg58Ple1ZM37VStOpU8layK0T12wJOsqJnPvOvz_m24WlbaP94UJcjs79GZPCXdrK-XRmmaw0ibKbE2mtAltfJHOMdQ7etmlUUW4eY838dTGudYi3vdvJI77h6700K7QH8xRm9jlUlp9AH8PIcBqfW-QI1a45N4GvsGYfHFYCz4piw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527667,"updated":1564527667,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '656' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:19:03 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '656' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name/recover + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index dd2c6f0a9b95..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport +from azure.core.pipeline.transport import AsyncHttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient @@ -64,7 +64,7 @@ def __init__( self, vault_url: str, credential: "TokenCredential", - transport: HttpTransport = None, + transport: AsyncHttpTransport = None, api_version: str = None, **kwargs: Any ) -> None: @@ -91,7 +91,7 @@ def __init__( self._client = KeyVaultClient(credential, api_version=api_version, pipeline=pipeline, aio=True) @staticmethod - def _build_pipeline(config: Configuration, transport: HttpTransport, **kwargs: Any) -> AsyncPipeline: + def _build_pipeline(config: Configuration, transport: AsyncHttpTransport, **kwargs: Any) -> AsyncPipeline: policies = [ config.headers_policy, config.user_agent_policy, @@ -104,7 +104,8 @@ def _build_pipeline(config: Configuration, transport: HttpTransport, **kwargs: A ] if transport is None: - transport = AsyncioRequestsTransport(**kwargs) + from azure.core.pipeline.transport import AioHttpTransport + transport = AioHttpTransport(**kwargs) return AsyncPipeline(transport, policies=policies) diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_crud_operations.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_crud_operations.yaml index aa5bf8efab58..cc15961c68b4 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_crud_operations.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_crud_operations.yaml @@ -1,255 +1,245 @@ interactions: - request: - body: '{"value": "secret-value", "attributes": {"exp": 2527401600, "enabled": - true}}' + body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - - '77' + - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43","attributes":{"enabled":true,"exp":2527401600,"created":1562687784,"updated":1562687784,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' +- request: + body: '{"value": "secret-value", "attributes": {"enabled": true, "exp": 2527401600}}' headers: - cache-control: - - no-cache - content-length: - - '251' - content-type: + Accept: + - application/json + Content-Length: + - '77' + Content-Type: - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name?api-version=7.0 + response: + body: + string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d","attributes":{"enabled":true,"exp":2527401600,"created":1564528272,"updated":1564528272,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '251' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name/?api-version=7.0 response: body: - string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43","attributes":{"enabled":true,"exp":2527401600,"created":1562687784,"updated":1562687784,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d","attributes":{"enabled":true,"exp":2527401600,"created":1564528272,"updated":1564528272,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '251' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '251' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43?api-version=7.0 + uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d?api-version=7.0 response: body: - string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43","attributes":{"enabled":true,"exp":2527401600,"created":1562687784,"updated":1562687784,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d","attributes":{"enabled":true,"exp":2527401600,"created":1564528272,"updated":1564528272,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '251' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '251' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name/20166f0199b14d72b73abfd7de4a766d + - api-version=7.0 + - '' - request: body: '{"contentType": "text/plain", "tags": {"foo": "updated tag"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '61' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PATCH uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name/?api-version=7.0 response: body: - string: '{"contentType":"text/plain","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43","attributes":{"enabled":true,"exp":2527401600,"created":1562687784,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"contentType":"text/plain","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d","attributes":{"enabled":true,"exp":2527401600,"created":1564528272,"updated":1564528273,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '284' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '284' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault29fe19b8.vault.azure.net/deletedsecrets/secret-name","deletedDate":1562687785,"scheduledPurgeDate":1570463785,"contentType":"text/plain","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43","attributes":{"enabled":true,"exp":2527401600,"created":1562687784,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"recoveryId":"https://vault29fe19b8.vault.azure.net/deletedsecrets/secret-name","deletedDate":1564528273,"scheduledPurgeDate":1572304273,"contentType":"text/plain","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d","attributes":{"enabled":true,"exp":2527401600,"created":1564528272,"updated":1564528273,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '421' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '421' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_list_operations.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_list_operations.yaml index a8f8117e3c14..d51d5f132c6f 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_list_operations.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_list_operations.yaml @@ -1,510 +1,453 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault2aad19c6.vault.azure.net/secrets/key0?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:12:01 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key0 + - api-version=7.0 + - '' - request: body: '{"value": "value0"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key0?api-version=7.0 response: body: - string: '{"value":"value0","id":"https://vault2aad19c6.vault.azure.net/secrets/key0/7b96a58d018e4599ab88e88b9572c2bf","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value0","id":"https://vault2aad19c6.vault.azure.net/secrets/key0/36914dd1657f4c27a5b0b018511debd4","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:01 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key0 + - api-version=7.0 + - '' - request: body: '{"value": "value1"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key1?api-version=7.0 response: body: - string: '{"value":"value1","id":"https://vault2aad19c6.vault.azure.net/secrets/key1/c83f87d170cb4436b96399150e087f63","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value1","id":"https://vault2aad19c6.vault.azure.net/secrets/key1/4ba6609ebc11430eb24e151319af2559","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key1 + - api-version=7.0 + - '' - request: body: '{"value": "value2"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key2?api-version=7.0 response: body: - string: '{"value":"value2","id":"https://vault2aad19c6.vault.azure.net/secrets/key2/5f6ee6ed44b044edb5a6f00fe7f9061d","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value2","id":"https://vault2aad19c6.vault.azure.net/secrets/key2/407135ffe3844dfda97b308d219da2bc","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key2 + - api-version=7.0 + - '' - request: body: '{"value": "value3"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key3?api-version=7.0 response: body: - string: '{"value":"value3","id":"https://vault2aad19c6.vault.azure.net/secrets/key3/39faf9645abe43a7afa4833e92ca1fff","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value3","id":"https://vault2aad19c6.vault.azure.net/secrets/key3/64057abdfdb845e49ba1693718fde7ae","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key3 + - api-version=7.0 + - '' - request: body: '{"value": "value4"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key4?api-version=7.0 response: body: - string: '{"value":"value4","id":"https://vault2aad19c6.vault.azure.net/secrets/key4/15315d867b184d72968338963ef8306c","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value4","id":"https://vault2aad19c6.vault.azure.net/secrets/key4/ec5f2a5b6971486e87bbb9a0c9c6ed5a","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key4 + - api-version=7.0 + - '' - request: body: '{"value": "value5"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key5?api-version=7.0 response: body: - string: '{"value":"value5","id":"https://vault2aad19c6.vault.azure.net/secrets/key5/e5301eed3f1d4dec927bf145794b0465","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value5","id":"https://vault2aad19c6.vault.azure.net/secrets/key5/22314f577cda4d898c295eaf427c83e6","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key5 + - api-version=7.0 + - '' - request: body: '{"value": "value6"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key6?api-version=7.0 response: body: - string: '{"value":"value6","id":"https://vault2aad19c6.vault.azure.net/secrets/key6/82158634aff74f8881ccef96e604a47b","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value6","id":"https://vault2aad19c6.vault.azure.net/secrets/key6/f78f624a3cb046c4927a84f599e6eeb1","attributes":{"enabled":true,"created":1564528323,"updated":1564528323,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault2aad19c6.vault.azure.net/secrets?api-version=7.0 response: body: - string: '{"value":[{"id":"https://vault2aad19c6.vault.azure.net/secrets/key0","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key1","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key2","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key3","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key4","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key5","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key6","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + string: '{"value":[{"id":"https://vault2aad19c6.vault.azure.net/secrets/key0","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key1","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key2","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key3","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key4","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key5","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key6","attributes":{"enabled":true,"created":1564528323,"updated":1564528323,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '1231' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '1231' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault2aad19c6.vault.azure.net/secrets/secret-name/versions?api-version=7.0 response: body: string: '{"value":[],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '28' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '28' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/secret-name/versions + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault2aad19c6.vault.azure.net/deletedsecrets?api-version=7.0 response: body: string: '{"value":[],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '28' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '28' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /deletedsecrets + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_backup_restore.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_backup_restore.yaml index 9f94d903ad43..28cbfb841c0e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_backup_restore.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_backup_restore.yaml @@ -1,254 +1,243 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault29db19b3.vault.azure.net/secrets/secret-name?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:12:51 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: '{"value": "secret-value"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '25' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault29db19b3.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"value":"secret-value","id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/16a8591563fc434f8ea6e2ed9a17d76b","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secret-value","id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/53a7c0e391b243b98ff0838306e5f101","attributes":{"enabled":true,"created":1564528371,"updated":1564528371,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '222' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '222' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:51 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault29db19b3.vault.azure.net/secrets/secret-name/backup?api-version=7.0 response: body: - string: '{"value":"KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLlJWZjNKWlg0WEpua3QyOGF5VUplTTdDNFBvMV9kYWRVZHVYbjlqUUF0MGFkdUJOeTcxTm5ZSEtXbmpOWW1kTWU2WXZMR2pUMGFFeXcwaWVSNWczMEZsNXI0MVFhaWFnZUNYbGxkNER2VGd2cmFxZ3BCY21WYVlXQkRhQm4wRm51SzV6Z2QweG1IUmhOamh1bks4aVZ6ZzRFN0RETHBNMlZiaVBkb09ZOEhSNVNlMUNHZUloRWpQMms0VkVtVzlPOWxKM2lHdTNLRk45SVVKVjE5TmVOOVo2bnJmOHhlOVhtdHRoZnlaUWhMdzdWQjM1WnlTd01pR2dsN2o2XzlTWnl4azkwbVFCUDhMLUVNbHVFZjhXNUlQckFIdXAyRHZydDZrSEo5RGdhX2RrVzExVy1UeVhzZW8xSGhHRWFrUkVBVExGckFuU2VFeTVRTjFFRzhHYk1Kdy40WmNsbDNmcHo4Tkw4SkhTUnRGRnFRLlhnUm9mbXBEX2YtVFpJRkxFWnJpQ2w2ZTA0OFN6THc5VGE0TkVCTDFGcW81ZjdYLU9uQjE3cURWOExabW5WRWhLNXZVVzktNHlPNS1CdGprR0xFV3c2QnZMZjlhd2NCcVhLUlYxeHI5RXBqWTN6UWpVTV9aQVI2YzdCbzVOMC1oQnNEbERiUU1iYVlSX2JxTTQ2LWtOMHdKX1FpbkRHSllzLWFZSC1BR2liOUlhdE9IbzlPdk1vVUtUckxkMGwtWDJrSlFTVUhvb1d5QmNKeExlZlBiMGNOamRtVk5uTlhFS1VCRy1nLU9IWDNPTUdSVmQ0amZiZFBIMGI3MGxvbWlLOEZRcFhpcUw2dXJxOG1zTGJrQlhSMnpjYVlNMmJWUU9DS1l3U0FLb0t0MWU0d0JXNUdvdnJHZnl3YVB1YzFyaUoxWmMwZFpyZk5WVGZaQVJ3bk1IMldsZkMxVm5GUm1hUThGQTZ2VnJrb3FVRVVYQzN3M011UVktaWk4UFVYMTAtWVV6RTdHN1RWWHFuN1l6a2s4NmdRdzdub1pDNGtNS1J6WS11OUQxYlVlYzEzdjg2SXJXZldVZWN2NldtLTlCWC1YenliS2djdVRTQ3ZUY1ZWdF9wSVdMZkpoMkZZb040ZWV5YThLRmZUV3BqZnc2ZmlpSUgzN0ZtVHJUYUt0X3dFdTV4MDd1WkUzdkJHV3BPWktrYmlsX1pGQUhJYWtMaS1yR0ZuTEp3cGJKV0pLSDZGM1VBYVE5anpBOVB1UnpxaVp2VWNHcUJDam9HUGphaF8zcWxsazZCLWZaQ0c2aERYRlpTei1WX1NGWkViNU0ydlA5Z3Y4OU03QjJOeXRpd1hZRzhhMFBlc2VSdXFGNkRNTXQ1SXJyY1g4TjZ5QlVDMF9Ya1hZT2Yxb2phM0xMeFZKUVEzdVdhRTJLbW0waEZla25hc0lLNzA2MjFRSUFncTNyel9YS3RNakU2MGpZT21UUWpNY3BNbFRBMzNTWjlwTTlRX3dEdFVXLTZualZOMXJla1huZEFFZzRJMTFsZkQzck42b1k1WTdHb0dBYW8tRWE2dkVkS0dfMlk5eGNUbEtiMHpyRWxtNk83TDd5ZGFVcGJBblNaRDVPdm84UHFFQUVzeWJwb1lCVnQ3dTFXRXFUQVBJa0ZrRC1sZWFaWHlnalViZFZPV1BaNEtnUlBrU0ZSakNxblhTTVpWcDQzaUh6ODVjTnRJSVVzMXVnNXVpU2dNS3ZpYW4zVTZjWkVEd1NkaTE1bFpDVGZ5ZmZmbUxyLURabFpTdWxEYjN5dk9DZmE1ajB5emRNOC1Jd0pWZUJJM2pZNXZJVWlYRnRuM2pTRC1CMERLaHliS2FsMGZ3NTV0T25zZzIyRFM1TnJ0TTgyWGw0SGF0ZG92Sm5OSGp0bVVYNFpxYTI2RmRzdmVraUdLQ2ZxWWdtbUZpX1dXaXphZU5rM3dzNTFOZmpCQTBKQnhORVBKeUFsZlcwN3NtbVhDdHZ5dDZ4Y3FtRVc0NXpQeWxNX21yazhoQ09HcnVlR3RENExGcURqTW1mT0Z5Mjc1eXlRTDNCU3lJOExfNktzblBaTGJtc0M1LU50ZzE4VjVRVmNkOVZQY0UzMlI5dTRUOHYxS1pqbXQ3S19tYmJGS2x2NkZEQ0lvRDJ4S015UzhFSURSd3VqbUotRTRiQWEzVlhtSmZ5MlpPaUVYNTJnZVlFVGswTUhqaWxlVzhsOWNaNHZJTzZnYVp1UW1kMEM3Zi02Umx3WG9jaWtYeWtCeWYxbU1Qakt4blYtWTRRenZObENmaU1fczNJdnUxUWRUUTRValh1OERDOTcxTk92VWJuNGJCVVN6NW1KY0FQRkQ4dGhVVXE2UFJnVW1WcVB2dlEtcFZiNmxNeUFxSDF1RWlpd240eFBwRWp2V2tmX2ltVGtBb2ZhTmNhdnYxcmpHS1ZrX0J1MmZINVlxWUZqSXFIQzJ3TE0tZzhhY3ZjMHk1MmM2MVpwcjc0aGxmSTc5WV9Oc1BwUng2RmI1XzUtbzVQZWw3Y0VOd05mZ0pPdTk4d3d3RGFSOUktLVJrUDJnTDloVVRsY0JYcUJRalpWZTR3aGVxT00yTW0ybmpIWEFIU0ZRSDZ1bHFvb0V3YXl1LXZ3d25ZU1lzX3Roa2RTQjJUZG5rY3VHbTRtQWxJSGM4YW5vU2prTnI5cklsSDc1M0dNNXJiM2ZHb3IzWm1kOGJ1RUExcmN2YlpmWFlkWjF1MmdlT0VZN2FwZWtUMFFIeHJtU1M4NFZnOXhMM2VHSl81cmVzcW5XYmJhVTdqZU44RTRlWGx6OUhiTzM5aGpuNVhsMkpsTWVLV0JnWTRvOG1lYmJNNG94QndRWkUxVGJPcThXSGRzSE9TQ2VHNmF6U2ZHSTAySUEzYmtEcUNSNjluVG1RbTY2NWM4LUxKc2NFT1dQSWoxX1c3bnUzY18ya1J4RDFHbDBtWFNIM1BRMl9qdE03bVpNSm9tdkdGemRlRUNZdWFVRlVPWjJ4Rnk4ZlU3Ulk2V2ZHUGFBeVF6Z0V3ajdnV3I0RUd4cFJ6d0tzUnI3NXJWd3ZtbE5XR1VtM1VLc01DTmwxckluc0lfd0I3Y184STU4S1hCbUk0dGNUdEF6MGNsd25RMDFIY2dod3BrbkhiRWZ3VVZybkhnNGRZdG1OeDE0T0J0QXFRTG5lMHVoSndyWTlrblN1Tlh1eWNENmt6d3JCQVVKSXgySXpvcXVENVhJRVV1UG55UFVlWDZiLU9BTmR4dTR1WGZBWFc0TWd2dHVDcnQ4VS13TlpMTkNBQjQ5eWRKSGItWUhVSlRWLXVKaTBQb0NzOWhCTzJWZkZDSUh6VERicGVXdk40bGFYRFNCc3dsdGdURXdIai1kcVBLUVl3aUpCcjk5akI2ekZZWVp1MkRtMXNuRjUtR0t1VUZyU2M5UTU4Mnk2a3ZLLS0zYXRwNUN5SlJRQkRqMnY1VnBmdWJCNmc4R3FpdGV4ZzAwaXJwc0c4TW11clNwTTRhQUF4SHMwV2xFQWtCZ18tTEZ2ODIzNGg0aFBzY1FVdnNaeTcySlJXTzVsdC1Ka0lQandZNC1pOV9CMXRzZmRlVlI5eGdzM2RHU1ZHSkpfQlcxQWhmUGppSndhWGFwOEFNRzFzYzJQQnBwQ0wxdk5admNDTzRHOWhkTEFsenNUaGtUaFE5M2YwWVhjTzRhNThNSGNpVjZaUlZOOTNXWVpsbzZxOFZBdWZuZ0t3b2sxd1d0ZVhLVk5DVk8tWjVBV05LMkp6Nmg0eW9FSmU0SGUweFQ5VlJISWU4V0MwSlpMVFZaaXZUY1ZyOXR1cFk1YVNBUFUzRi1hV3B1SzVfRFg4ZkdHX1kybnp2MmsycmtmcFNRMTdRR1lRQ2RMTUxDN3hRNHFEbUMzVGlKTVBGNDB1bGZBQ0hiZDh4RkdBV050LTl1MU5obE9aNGNPM1VhRlVOT0h2dEVFbHRRMUpkQzF6RVpSUGx3VFMxYTVJdkVWV2pockNoZnEwTG43Uk1XaktNOERQNjdfbDJ3MU9rd3VUM3VOejFpTnBZeUZSdEpORjh3NUxjYV9LTkdSVU50V3ZyZUVwU0k0UXlPY1V1REpLc0p1YjY4M2pmaVlHaUJXX0FyblRkS0x1cks3Nlc4UUQ5VFM1aTdWeHhockxwaGFvbkluMjVMMGxpeXJSRmt0UnNGT0JvSXY3LVoxd19tTmpRdXlrQU1DSTBZTG0tandkb3M2TllncXFUQktWS01YRGwzZTFhRUlOa2NEZ0gzcEg2MUNMZTR3c2hRSGl4X3FDQ21lbVBSN0l6T28wY1hzeHdKb21jS1J4bk56QTFKakZUenFJQUhTNm9GbHQ5LXJObU1Sb0ZpNTRlRkJDOFctLUw4QjFIVWVTYkF6WnU1MzFfbUJadWdRVUllV0NLQzJta1B5cjFhZFVYa1QwUTRQVjVlSVhmTWVWcHBPSnJGQ1dXSGJkelB5WkVtZ0psTFlsSGZBMXJ2Z2cyRTJMVDFfd1NzSEtMb2t2UWFNaTNSRUFmSEpINGRoUlZjOGlHM1RyUkFsZ0ZUSnZ4NVY3aXJzcW92RkVsQVhRY0w2UHB6OUJrVFhCcFlxRGhRNXhvS01vcDdrSkRmSXFscXZxWVo3NG15X0FNNDhMZ1AzQzhKMEFjMTJzNzFjR2gzel9QTWpnN282WE0ya21VX2dzT0llY2FTM0czMEtPdjNxSmFHVmk1QzVqTVpfQjUtMTJtZll2R2h0aGYzUVBqUl9PUmpWY3pxT2wxUUpqSEFqN29FU1R6dDQ2SEd6MFJnbG1mVFNVdFl1ODdNNmpfaFpwWktIUXB1RVpkaDViWXFpYjhJQWY1d3pvYl83RGNoRHU2WU5CbW1raHIweThEMlBuZmMyazlrRjhDbVVBaFZQX19YSng1eV9lbGJpTGhhWmh4N0V0UHVHaEdwX3FjNlI3c1laZmNwdGt1RUVxM043aWRDd24tYnpabDFObndMRGQ2MjhyLTNDdGlwVGJsMVNsRVdYX0h1Nk5oMTh1V0l0bmdXanNJcUt2RUlZV1hsSHlEN29meEhKaHAyWms2V2JRRTdfcWFDM3F1TnZmR2hjZHVmb1VkemxPMFdVanRVbm93TnRjamVsV1BMUVBTVE5yN1kuRmg3TzJVbHIyTzdzVVhJZ2FiY0dNdw"}' + string: '{"value":"KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLkhpSUhtRzluUXFhVUZXcnRlQ0Z1TEEwVV90YnlPczJ4TnN5YnBEUUR5SkltNWlKWVJmeUZhVFVlLXZsVFI1VDFxMm5SU3NFaHBnWkk4Z1ZBZ3ZmN3Q3Z0VDZVQ1RUVzRXZzTjFKS0lPc1JzeVlXRGVwWnU0U2pOQWtScHkxT0RfbnFmeWpCLXpqNUswaW9KVVJTS09Md0d2Tm1MUXlJZjZObUZFSE1CUEpVaXQ0OWpOYXNHYlphalhsYUk5Qjk0SERsVlI1bEFzYVNKMnlMM2JlRTBncGYyNUFLX3NDa1hFc1RFbFU2bmVnUjdjQjllUS1IWXNqY3dTaGVNWmM4cFdibE50cXFJZGhOMkpBYW1wR3J2dHc0VDRpd0UtTEVCUDJCaWt4TmctNWN6ajN5azdHSHpaSDJlOWhpak0tRDVGZ2VaMGhiZ19paHV5R0FlWDFmbHBCUS5SQ2Q5RUhTZ28yenlNbTJQZ04yUExBLlJLRkVyZnl1ck1MNGFHOUhKQ3pfc1U3ZUFOMnBTV1AwdWU2YzRGYU9XY2VGaDJDNUppVlBqOGFFRFVxaWFzNEJWVGd4Q2htbHNpMmpQd0V1SENGY3RqRHNSVzZtSGhINUJSZFFKUG94a0V3eEpGZi1PQ0poN3RPR21CczdIbWFOTGo2aGd3Skl3TnZPX0VsSGdhZTEwd2VqTWxTQ19WZDIzYWRiSGRuUXRCQWlVYTVydi0wOTdWRUdwWnpvMHN0a2w2QUFvcjYweXo3WWpWcWdKRm85X2t3TTFIcVY3bWtNSWJKUVhTSTI3YWpHYVBUdTcyZFpkUGdvX21la2FJaDRlSmVRZWlfMDZZeEtwSUZDTS1QaUxNSUpzWU12X2c5ZDJjbEQwQU8wWmNhaEhaeXZfOEZJS3g0RHpYV1E0bkNRS1dDeDh0Nlh6TmlBYnNsMk1OM2lFb3l3VUhma0w5WFNQYVJXZExJamo0SzY4eUpJU2R6aVhudDlaNS02VE9qYUdXdUtSQ0lvSlZOM2FHVUt3aXVBcEtDdkVSbXlNLXctaWNHZmNfZVFHUHNlNTZHQVR5dG02SFZ4OTlUYnpYUHJaeWtqY0tfT2ZlRVRHc0tzSkZZQmtWVE9UTXdJdDFid0JDT1ZuNEdkSndsWDd2eUx2RVRTOHIzM1lqNXo1OUZ5TnJ6QjBqamRaLXBPeFc3ZU9zRUl6MTFVcnMxYkJzcWpXcXV5bTdGdk42dktNdFp3cGgwYUoxMXNULVJkcHgtX3E2a1lsTWc1MHpVWlRYUnpPY0VzQktselNkRjROdUx4ZlFUUVd5UmtWdEQ4UlEyV2czV0JhaTZrZUFpOWpjdVNTN2F2VUw0ODZJMmlpTFJtOEItVG9vQnl2XzJOd0s4OTRlNjc4bTdna0ZtS0pwUUJhMVdOclU3cDV3SUJ0eUQ4RlYyRURYMjc5QThISzNCZnNNZ0NTUWxLdmUtRURzTzdOaTBTclRHN29RLVRVVWpIdmM0RHY4RkUxOW9Yc3VYMHd4dm9CczdRZ2k1eTV2Q2FYSmtMbGVHc3hSeGV1cUhaUE1STHZ0eVBvMEVoTUhSblMtbXp6WWVhcHh4V05VSUhRWFB6MDdLSDZiY1JOMkptbndnb2ZhcDdxYUNyV1l1OGNjLU0zM2N1UnlOc05pRDhWWV94WlhTdXZNT0RmWXo1VkpMX29JZlRjMEVCWDlOQm5ISlZ2Qk5KZ2lUemZXYWlRdE4wdlZ5elg4TjBoOXY3UXMzTENJbmp1aXczbzJSdThISEY1cDNubVhQbFFaOFVOUWdENlZTaXBQUzNwS1RGRF9fTjNDWUYxNzNobHo1ei1MRVFSX25LYTZjREQ5QXAxRkExZDRNX29JWFJvSktkV1JUV0pHdThXaG5OSWFDN0ZlNzlhWk9XYnJwTWlad1hfSUdUWHU5Y0dzYTljbHN4Q05yN2dmUnN4c3VJOGlNMDBTVHZHUkUya0t1RGRRT3JyOXRkMDFoQXhIZmh2cFYyc3lHRnVSTjA5aUc1YVc5Rlo1UnNoMGVybWl1c29WRUlwREMtYWZFbWNLa0l6WmJWb3NSZnktSF9BV3d4VWVMb3hnN3NuUFBmaE5SYTM4TU43bGdhOW43Mk1ZZzN4Zl91VWl2aEw5SWF6OFdRdHlTZzhMMnh1VmwxazZDTjZ3SF9JV09vVGljNzh2bk5qLXBoTU84cFFqYklaMnhueWRzdi1ZRTlFR1RjOHFFc2ozdEpXUVhOOFc1MC1CREtlLTZTMGxjRXdQQkM4cnVuQ19VVHJxc3MwSTd1Mmk0V3k5azBWSzdZb090UWhuTGc0MHJOZERubTdHUDg4R0JTamdvU2JTeURmQUNhRDREMXlJWFVqWG1vQ2pGZ1o3bUQxWTludk1YUFZjSWp2V3F2Ml9kUU15eXlkeDgxRnNEVVNyTE1sODZQYmlnSVlJV2NPY0FLSGdsWnRKTVZHNXZ6ZWNhUU93ek9iMEQyVGdKSmladndOa3MwWWpIQ0ZXa0xXTDZEcnB4b1lEVGRwUzNoWFhYSDRRN2VaOFV5M3U5MjFmWjQ4Z0JodEpDSVVtY2U5Q05EemttUHlKS0kyVkJiWDgxQUxkVzNyTVZlY0lheG1hOEdLNS1DbGFDcUVUWGpheU9yNFNxUW1ZWEI5YnFQeXlQZDVwSTZUVkJ3M2lYdWVSV2VxcDdjVnZ6UmE2YjhvTE1aSlFoR3JxX2VGOElMLVlnRE52NmRXLTlPRk5ad29TOGtRM3RUbGNLUXlIT05WUmVMWXhZNjRPM1ZVYm9iSXY0RzVaZUljV2VaS2NjN3I5ZVBMdTJrcllRbXIwRzd6Y2M4cUdfOWo2eHhDU2NIVlk1Zm1OcWxBRlMtcEcyM01mRW41aUNxdzA5R0c3bWY4a01qMThTZF9kbGw5RC1MbW1UWFZzYi1QMDVZSHBqTHB2TFFQYlZVSTQxRU5VVENnUFFpd2I3US15ODNJdm1IZ3IyVkdTRllrZm9wam5yVWMzM1VXTERnc1pDQzgwTGF3ZGxtZWxFYThDZ1FnVm5EeFJBZ0NMN1BmQWhyV0h1YkduZlQwbndyc1h1ZkRWa0llTkJfVjhrZTlPMXY5WVRlYkZiaFJvR0JBbC1ndHdCNlcyaXY1emxVR2dfcGdQUUlqdXgyMHRtNVZCVGlYbzBLV3ZidGdLVm51V2c5U1dUSnEzOWs1WnRieFpGX0M2NGNvSnlBOUE2TTlHRjlPMkd2WHVPd0lpU1JZazBySGNDMmpudkJwVzMxVjF4TDE3RE84NGpreVNUaF95WW1sSnBkd3VrSlJaNUJsOWpWTnI3bGFrNW15R3ZuTU5PS1NvejF3dXVBY1IyRFBSdEJXVFgzZUVraG9DaFR1V3ZwSmF0Ung2a1ZFTUY1eDcxLTBJMUlkZEJFYlhLM0pxSnJFVTVmTmZBdU9TMU0wSE5mLXNQZjFfZHpVY05vVkN1cUMza1pSSVViY3RwT1pORFBxd282amdyak92MWlOeGFtemZJWHVyZXJuSW5fcDV3OFRmSmUwZHIxTXVycTAwdHhEamxJR0lIMjJoQm9TYW1adkNYUktJYk00LUhiYzlmTlhudnZSRVROWjV6MlFqS2lieDBJd2tDWjZxVS1OTnBnZGN4SHZ4SGhJTWlieVBRWkxkS0t2ZHo4S01ucjNaUGVnWTAwTWx5VkpKY1BGRm1MMloyeVBzb25uT0tjd05lNUFpVkt1S0gwbTJyQmRZMXVzbGljaF9MZEdmbHdrMHA0TTBSaUZBaXluRWlqMl8tZTVjcWJoWFdXdGYyWUZGNmNZSF9OeVhYallIWGZQTllkNzlOV0d5dVk1N051WXk5ZllfY21WVVdPTVFnd1NWcW9qeC00NHEwRWlkTE1RLUVEcFduTlpPX0xaOWNSeTl6anhOSjR1cXRnY2Z4STNXX0ltTTRKbGNuOWJDMzA4WGJSM2dHVkl1OUdkeS13NERVcTFwVWVITGdQbFRfVFg0eVYtbHFRWHNTc0ZkSkZLbzlic3NUS0V1dGNBQTZKRzcwOUJCSkdoMDFIT3BpUFFPWTYzSmNoMFBiSXZubmxmeXc3M2tCWU40MWJMTGxRUnV5dXA4emtzOFVvVW5uT3ZIb2xveE0wQ3VlX0owTmZBdExtU0xEWHozVHUxeDV0RGVJdjlHcDBheUlJZy1wcHZ6RzNMb3pnQUowUjVrMzNkeG9udjVxVFI2MXhnc2JaNUZZT0ljMXBqTVgwQUU4WVZLMGpVcTZ3QzlnTnRDN0M5LXg1cW56Z0pjdHQwbkRHV3NFdElnX3J6SFJhdlFpNlF1SGJIS3doOTBBekVVems5VXFPWjdnTjVoa2FvVkprVFdYZlhTc3B0Zml6WGU2MDFfMlFKNkhtUG1FbGJSeFRCbU1janhiSDE1SDJCcHR6bHdxVWJhSlB3MWd4Q2h1LTNGWC04S3RaY25DaGNrOXBya3VCaEl4czdVaDdDYjE0T1VjVExlcjZGVHZaa3FLczBhcXJPZGpZaDBVeFE1amRIQTc5TDJrMFF1enNYWkNfZXA4YkJQa094RzRCUGpaN2ZSVkRPcjdaaFlRenRQbnpHZXo1eFJoVGhEWWU5eEZTTkRsM1pqXzYyNzduMXllNFAwLU54V3ZTWExFc1ZJUzVabVNYd25KOUpjX3YwTWRkMjliZno4aXFBSVpXX2QzakNsWVBzWG0tMlNzTjBkYnJ0TG5NUzNkOXV0cC13blRfRDN4Qmc2R000MGZSZzFnaG5uM3dhWnB6YzU0T2xORDNZR2RnclQtc3dNY1NwcExiM0FRZEVSQVFycjFSUXJNUHczaUpEdlVKdFFyVElTMHJpRE5rb2kyMFJHQjMzYUtRR2VSZkt0ZldOUFJmSGh5Z0lTdUpWLVZqdHZHT2dWTFAyZ0RUZGNMZ1VQX19kNUxlUzllWEFiaUZWVUJyOWhhdTNzVnFYazR1QWE1QkZRaFlTQWVyN3RxclZGbGRhM1N5UURSU0dETWtyaksyZHFlVlVpTHRYTnJ3VHRfQ01iLXd3LWhhTDcyTmZSaEQtYkpoS2s3X1JIM09GQV9DaDZnaUZQUDBzTzF3a0t6NHNJelhQQ0pUY0pTMTZFNV9sSkkxTGtHOGVfMFItMEk1ejk2blVKRS1RTDQuMktGazBXd2JUdVBadHJMMnFRSXF4QQ"}' headers: - cache-control: - - no-cache - content-length: - - '5406' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '5406' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:51 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/secret-name/backup + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault29db19b3.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/16a8591563fc434f8ea6e2ed9a17d76b","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Purgeable"}}' + string: '{"id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/53a7c0e391b243b98ff0838306e5f101","attributes":{"enabled":true,"created":1564528371,"updated":1564528371,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '199' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '199' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:52 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault29db19b3.vault.azure.net/secrets/secret-name/?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret-name"}}' headers: - cache-control: - - no-cache - content-length: - - '77' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '77' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:52 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/secret-name/ + - api-version=7.0 + - '' - request: - body: '{"value": "KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLlJWZjNKWlg0WEpua3QyOGF5VUplTTdDNFBvMV9kYWRVZHVYbjlqUUF0MGFkdUJOeTcxTm5ZSEtXbmpOWW1kTWU2WXZMR2pUMGFFeXcwaWVSNWczMEZsNXI0MVFhaWFnZUNYbGxkNER2VGd2cmFxZ3BCY21WYVlXQkRhQm4wRm51SzV6Z2QweG1IUmhOamh1bks4aVZ6ZzRFN0RETHBNMlZiaVBkb09ZOEhSNVNlMUNHZUloRWpQMms0VkVtVzlPOWxKM2lHdTNLRk45SVVKVjE5TmVOOVo2bnJmOHhlOVhtdHRoZnlaUWhMdzdWQjM1WnlTd01pR2dsN2o2XzlTWnl4azkwbVFCUDhMLUVNbHVFZjhXNUlQckFIdXAyRHZydDZrSEo5RGdhX2RrVzExVy1UeVhzZW8xSGhHRWFrUkVBVExGckFuU2VFeTVRTjFFRzhHYk1Kdy40WmNsbDNmcHo4Tkw4SkhTUnRGRnFRLlhnUm9mbXBEX2YtVFpJRkxFWnJpQ2w2ZTA0OFN6THc5VGE0TkVCTDFGcW81ZjdYLU9uQjE3cURWOExabW5WRWhLNXZVVzktNHlPNS1CdGprR0xFV3c2QnZMZjlhd2NCcVhLUlYxeHI5RXBqWTN6UWpVTV9aQVI2YzdCbzVOMC1oQnNEbERiUU1iYVlSX2JxTTQ2LWtOMHdKX1FpbkRHSllzLWFZSC1BR2liOUlhdE9IbzlPdk1vVUtUckxkMGwtWDJrSlFTVUhvb1d5QmNKeExlZlBiMGNOamRtVk5uTlhFS1VCRy1nLU9IWDNPTUdSVmQ0amZiZFBIMGI3MGxvbWlLOEZRcFhpcUw2dXJxOG1zTGJrQlhSMnpjYVlNMmJWUU9DS1l3U0FLb0t0MWU0d0JXNUdvdnJHZnl3YVB1YzFyaUoxWmMwZFpyZk5WVGZaQVJ3bk1IMldsZkMxVm5GUm1hUThGQTZ2VnJrb3FVRVVYQzN3M011UVktaWk4UFVYMTAtWVV6RTdHN1RWWHFuN1l6a2s4NmdRdzdub1pDNGtNS1J6WS11OUQxYlVlYzEzdjg2SXJXZldVZWN2NldtLTlCWC1YenliS2djdVRTQ3ZUY1ZWdF9wSVdMZkpoMkZZb040ZWV5YThLRmZUV3BqZnc2ZmlpSUgzN0ZtVHJUYUt0X3dFdTV4MDd1WkUzdkJHV3BPWktrYmlsX1pGQUhJYWtMaS1yR0ZuTEp3cGJKV0pLSDZGM1VBYVE5anpBOVB1UnpxaVp2VWNHcUJDam9HUGphaF8zcWxsazZCLWZaQ0c2aERYRlpTei1WX1NGWkViNU0ydlA5Z3Y4OU03QjJOeXRpd1hZRzhhMFBlc2VSdXFGNkRNTXQ1SXJyY1g4TjZ5QlVDMF9Ya1hZT2Yxb2phM0xMeFZKUVEzdVdhRTJLbW0waEZla25hc0lLNzA2MjFRSUFncTNyel9YS3RNakU2MGpZT21UUWpNY3BNbFRBMzNTWjlwTTlRX3dEdFVXLTZualZOMXJla1huZEFFZzRJMTFsZkQzck42b1k1WTdHb0dBYW8tRWE2dkVkS0dfMlk5eGNUbEtiMHpyRWxtNk83TDd5ZGFVcGJBblNaRDVPdm84UHFFQUVzeWJwb1lCVnQ3dTFXRXFUQVBJa0ZrRC1sZWFaWHlnalViZFZPV1BaNEtnUlBrU0ZSakNxblhTTVpWcDQzaUh6ODVjTnRJSVVzMXVnNXVpU2dNS3ZpYW4zVTZjWkVEd1NkaTE1bFpDVGZ5ZmZmbUxyLURabFpTdWxEYjN5dk9DZmE1ajB5emRNOC1Jd0pWZUJJM2pZNXZJVWlYRnRuM2pTRC1CMERLaHliS2FsMGZ3NTV0T25zZzIyRFM1TnJ0TTgyWGw0SGF0ZG92Sm5OSGp0bVVYNFpxYTI2RmRzdmVraUdLQ2ZxWWdtbUZpX1dXaXphZU5rM3dzNTFOZmpCQTBKQnhORVBKeUFsZlcwN3NtbVhDdHZ5dDZ4Y3FtRVc0NXpQeWxNX21yazhoQ09HcnVlR3RENExGcURqTW1mT0Z5Mjc1eXlRTDNCU3lJOExfNktzblBaTGJtc0M1LU50ZzE4VjVRVmNkOVZQY0UzMlI5dTRUOHYxS1pqbXQ3S19tYmJGS2x2NkZEQ0lvRDJ4S015UzhFSURSd3VqbUotRTRiQWEzVlhtSmZ5MlpPaUVYNTJnZVlFVGswTUhqaWxlVzhsOWNaNHZJTzZnYVp1UW1kMEM3Zi02Umx3WG9jaWtYeWtCeWYxbU1Qakt4blYtWTRRenZObENmaU1fczNJdnUxUWRUUTRValh1OERDOTcxTk92VWJuNGJCVVN6NW1KY0FQRkQ4dGhVVXE2UFJnVW1WcVB2dlEtcFZiNmxNeUFxSDF1RWlpd240eFBwRWp2V2tmX2ltVGtBb2ZhTmNhdnYxcmpHS1ZrX0J1MmZINVlxWUZqSXFIQzJ3TE0tZzhhY3ZjMHk1MmM2MVpwcjc0aGxmSTc5WV9Oc1BwUng2RmI1XzUtbzVQZWw3Y0VOd05mZ0pPdTk4d3d3RGFSOUktLVJrUDJnTDloVVRsY0JYcUJRalpWZTR3aGVxT00yTW0ybmpIWEFIU0ZRSDZ1bHFvb0V3YXl1LXZ3d25ZU1lzX3Roa2RTQjJUZG5rY3VHbTRtQWxJSGM4YW5vU2prTnI5cklsSDc1M0dNNXJiM2ZHb3IzWm1kOGJ1RUExcmN2YlpmWFlkWjF1MmdlT0VZN2FwZWtUMFFIeHJtU1M4NFZnOXhMM2VHSl81cmVzcW5XYmJhVTdqZU44RTRlWGx6OUhiTzM5aGpuNVhsMkpsTWVLV0JnWTRvOG1lYmJNNG94QndRWkUxVGJPcThXSGRzSE9TQ2VHNmF6U2ZHSTAySUEzYmtEcUNSNjluVG1RbTY2NWM4LUxKc2NFT1dQSWoxX1c3bnUzY18ya1J4RDFHbDBtWFNIM1BRMl9qdE03bVpNSm9tdkdGemRlRUNZdWFVRlVPWjJ4Rnk4ZlU3Ulk2V2ZHUGFBeVF6Z0V3ajdnV3I0RUd4cFJ6d0tzUnI3NXJWd3ZtbE5XR1VtM1VLc01DTmwxckluc0lfd0I3Y184STU4S1hCbUk0dGNUdEF6MGNsd25RMDFIY2dod3BrbkhiRWZ3VVZybkhnNGRZdG1OeDE0T0J0QXFRTG5lMHVoSndyWTlrblN1Tlh1eWNENmt6d3JCQVVKSXgySXpvcXVENVhJRVV1UG55UFVlWDZiLU9BTmR4dTR1WGZBWFc0TWd2dHVDcnQ4VS13TlpMTkNBQjQ5eWRKSGItWUhVSlRWLXVKaTBQb0NzOWhCTzJWZkZDSUh6VERicGVXdk40bGFYRFNCc3dsdGdURXdIai1kcVBLUVl3aUpCcjk5akI2ekZZWVp1MkRtMXNuRjUtR0t1VUZyU2M5UTU4Mnk2a3ZLLS0zYXRwNUN5SlJRQkRqMnY1VnBmdWJCNmc4R3FpdGV4ZzAwaXJwc0c4TW11clNwTTRhQUF4SHMwV2xFQWtCZ18tTEZ2ODIzNGg0aFBzY1FVdnNaeTcySlJXTzVsdC1Ka0lQandZNC1pOV9CMXRzZmRlVlI5eGdzM2RHU1ZHSkpfQlcxQWhmUGppSndhWGFwOEFNRzFzYzJQQnBwQ0wxdk5admNDTzRHOWhkTEFsenNUaGtUaFE5M2YwWVhjTzRhNThNSGNpVjZaUlZOOTNXWVpsbzZxOFZBdWZuZ0t3b2sxd1d0ZVhLVk5DVk8tWjVBV05LMkp6Nmg0eW9FSmU0SGUweFQ5VlJISWU4V0MwSlpMVFZaaXZUY1ZyOXR1cFk1YVNBUFUzRi1hV3B1SzVfRFg4ZkdHX1kybnp2MmsycmtmcFNRMTdRR1lRQ2RMTUxDN3hRNHFEbUMzVGlKTVBGNDB1bGZBQ0hiZDh4RkdBV050LTl1MU5obE9aNGNPM1VhRlVOT0h2dEVFbHRRMUpkQzF6RVpSUGx3VFMxYTVJdkVWV2pockNoZnEwTG43Uk1XaktNOERQNjdfbDJ3MU9rd3VUM3VOejFpTnBZeUZSdEpORjh3NUxjYV9LTkdSVU50V3ZyZUVwU0k0UXlPY1V1REpLc0p1YjY4M2pmaVlHaUJXX0FyblRkS0x1cks3Nlc4UUQ5VFM1aTdWeHhockxwaGFvbkluMjVMMGxpeXJSRmt0UnNGT0JvSXY3LVoxd19tTmpRdXlrQU1DSTBZTG0tandkb3M2TllncXFUQktWS01YRGwzZTFhRUlOa2NEZ0gzcEg2MUNMZTR3c2hRSGl4X3FDQ21lbVBSN0l6T28wY1hzeHdKb21jS1J4bk56QTFKakZUenFJQUhTNm9GbHQ5LXJObU1Sb0ZpNTRlRkJDOFctLUw4QjFIVWVTYkF6WnU1MzFfbUJadWdRVUllV0NLQzJta1B5cjFhZFVYa1QwUTRQVjVlSVhmTWVWcHBPSnJGQ1dXSGJkelB5WkVtZ0psTFlsSGZBMXJ2Z2cyRTJMVDFfd1NzSEtMb2t2UWFNaTNSRUFmSEpINGRoUlZjOGlHM1RyUkFsZ0ZUSnZ4NVY3aXJzcW92RkVsQVhRY0w2UHB6OUJrVFhCcFlxRGhRNXhvS01vcDdrSkRmSXFscXZxWVo3NG15X0FNNDhMZ1AzQzhKMEFjMTJzNzFjR2gzel9QTWpnN282WE0ya21VX2dzT0llY2FTM0czMEtPdjNxSmFHVmk1QzVqTVpfQjUtMTJtZll2R2h0aGYzUVBqUl9PUmpWY3pxT2wxUUpqSEFqN29FU1R6dDQ2SEd6MFJnbG1mVFNVdFl1ODdNNmpfaFpwWktIUXB1RVpkaDViWXFpYjhJQWY1d3pvYl83RGNoRHU2WU5CbW1raHIweThEMlBuZmMyazlrRjhDbVVBaFZQX19YSng1eV9lbGJpTGhhWmh4N0V0UHVHaEdwX3FjNlI3c1laZmNwdGt1RUVxM043aWRDd24tYnpabDFObndMRGQ2MjhyLTNDdGlwVGJsMVNsRVdYX0h1Nk5oMTh1V0l0bmdXanNJcUt2RUlZV1hsSHlEN29meEhKaHAyWms2V2JRRTdfcWFDM3F1TnZmR2hjZHVmb1VkemxPMFdVanRVbm93TnRjamVsV1BMUVBTVE5yN1kuRmg3TzJVbHIyTzdzVVhJZ2FiY0dNdw"}' + body: '{"value": "KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLkhpSUhtRzluUXFhVUZXcnRlQ0Z1TEEwVV90YnlPczJ4TnN5YnBEUUR5SkltNWlKWVJmeUZhVFVlLXZsVFI1VDFxMm5SU3NFaHBnWkk4Z1ZBZ3ZmN3Q3Z0VDZVQ1RUVzRXZzTjFKS0lPc1JzeVlXRGVwWnU0U2pOQWtScHkxT0RfbnFmeWpCLXpqNUswaW9KVVJTS09Md0d2Tm1MUXlJZjZObUZFSE1CUEpVaXQ0OWpOYXNHYlphalhsYUk5Qjk0SERsVlI1bEFzYVNKMnlMM2JlRTBncGYyNUFLX3NDa1hFc1RFbFU2bmVnUjdjQjllUS1IWXNqY3dTaGVNWmM4cFdibE50cXFJZGhOMkpBYW1wR3J2dHc0VDRpd0UtTEVCUDJCaWt4TmctNWN6ajN5azdHSHpaSDJlOWhpak0tRDVGZ2VaMGhiZ19paHV5R0FlWDFmbHBCUS5SQ2Q5RUhTZ28yenlNbTJQZ04yUExBLlJLRkVyZnl1ck1MNGFHOUhKQ3pfc1U3ZUFOMnBTV1AwdWU2YzRGYU9XY2VGaDJDNUppVlBqOGFFRFVxaWFzNEJWVGd4Q2htbHNpMmpQd0V1SENGY3RqRHNSVzZtSGhINUJSZFFKUG94a0V3eEpGZi1PQ0poN3RPR21CczdIbWFOTGo2aGd3Skl3TnZPX0VsSGdhZTEwd2VqTWxTQ19WZDIzYWRiSGRuUXRCQWlVYTVydi0wOTdWRUdwWnpvMHN0a2w2QUFvcjYweXo3WWpWcWdKRm85X2t3TTFIcVY3bWtNSWJKUVhTSTI3YWpHYVBUdTcyZFpkUGdvX21la2FJaDRlSmVRZWlfMDZZeEtwSUZDTS1QaUxNSUpzWU12X2c5ZDJjbEQwQU8wWmNhaEhaeXZfOEZJS3g0RHpYV1E0bkNRS1dDeDh0Nlh6TmlBYnNsMk1OM2lFb3l3VUhma0w5WFNQYVJXZExJamo0SzY4eUpJU2R6aVhudDlaNS02VE9qYUdXdUtSQ0lvSlZOM2FHVUt3aXVBcEtDdkVSbXlNLXctaWNHZmNfZVFHUHNlNTZHQVR5dG02SFZ4OTlUYnpYUHJaeWtqY0tfT2ZlRVRHc0tzSkZZQmtWVE9UTXdJdDFid0JDT1ZuNEdkSndsWDd2eUx2RVRTOHIzM1lqNXo1OUZ5TnJ6QjBqamRaLXBPeFc3ZU9zRUl6MTFVcnMxYkJzcWpXcXV5bTdGdk42dktNdFp3cGgwYUoxMXNULVJkcHgtX3E2a1lsTWc1MHpVWlRYUnpPY0VzQktselNkRjROdUx4ZlFUUVd5UmtWdEQ4UlEyV2czV0JhaTZrZUFpOWpjdVNTN2F2VUw0ODZJMmlpTFJtOEItVG9vQnl2XzJOd0s4OTRlNjc4bTdna0ZtS0pwUUJhMVdOclU3cDV3SUJ0eUQ4RlYyRURYMjc5QThISzNCZnNNZ0NTUWxLdmUtRURzTzdOaTBTclRHN29RLVRVVWpIdmM0RHY4RkUxOW9Yc3VYMHd4dm9CczdRZ2k1eTV2Q2FYSmtMbGVHc3hSeGV1cUhaUE1STHZ0eVBvMEVoTUhSblMtbXp6WWVhcHh4V05VSUhRWFB6MDdLSDZiY1JOMkptbndnb2ZhcDdxYUNyV1l1OGNjLU0zM2N1UnlOc05pRDhWWV94WlhTdXZNT0RmWXo1VkpMX29JZlRjMEVCWDlOQm5ISlZ2Qk5KZ2lUemZXYWlRdE4wdlZ5elg4TjBoOXY3UXMzTENJbmp1aXczbzJSdThISEY1cDNubVhQbFFaOFVOUWdENlZTaXBQUzNwS1RGRF9fTjNDWUYxNzNobHo1ei1MRVFSX25LYTZjREQ5QXAxRkExZDRNX29JWFJvSktkV1JUV0pHdThXaG5OSWFDN0ZlNzlhWk9XYnJwTWlad1hfSUdUWHU5Y0dzYTljbHN4Q05yN2dmUnN4c3VJOGlNMDBTVHZHUkUya0t1RGRRT3JyOXRkMDFoQXhIZmh2cFYyc3lHRnVSTjA5aUc1YVc5Rlo1UnNoMGVybWl1c29WRUlwREMtYWZFbWNLa0l6WmJWb3NSZnktSF9BV3d4VWVMb3hnN3NuUFBmaE5SYTM4TU43bGdhOW43Mk1ZZzN4Zl91VWl2aEw5SWF6OFdRdHlTZzhMMnh1VmwxazZDTjZ3SF9JV09vVGljNzh2bk5qLXBoTU84cFFqYklaMnhueWRzdi1ZRTlFR1RjOHFFc2ozdEpXUVhOOFc1MC1CREtlLTZTMGxjRXdQQkM4cnVuQ19VVHJxc3MwSTd1Mmk0V3k5azBWSzdZb090UWhuTGc0MHJOZERubTdHUDg4R0JTamdvU2JTeURmQUNhRDREMXlJWFVqWG1vQ2pGZ1o3bUQxWTludk1YUFZjSWp2V3F2Ml9kUU15eXlkeDgxRnNEVVNyTE1sODZQYmlnSVlJV2NPY0FLSGdsWnRKTVZHNXZ6ZWNhUU93ek9iMEQyVGdKSmladndOa3MwWWpIQ0ZXa0xXTDZEcnB4b1lEVGRwUzNoWFhYSDRRN2VaOFV5M3U5MjFmWjQ4Z0JodEpDSVVtY2U5Q05EemttUHlKS0kyVkJiWDgxQUxkVzNyTVZlY0lheG1hOEdLNS1DbGFDcUVUWGpheU9yNFNxUW1ZWEI5YnFQeXlQZDVwSTZUVkJ3M2lYdWVSV2VxcDdjVnZ6UmE2YjhvTE1aSlFoR3JxX2VGOElMLVlnRE52NmRXLTlPRk5ad29TOGtRM3RUbGNLUXlIT05WUmVMWXhZNjRPM1ZVYm9iSXY0RzVaZUljV2VaS2NjN3I5ZVBMdTJrcllRbXIwRzd6Y2M4cUdfOWo2eHhDU2NIVlk1Zm1OcWxBRlMtcEcyM01mRW41aUNxdzA5R0c3bWY4a01qMThTZF9kbGw5RC1MbW1UWFZzYi1QMDVZSHBqTHB2TFFQYlZVSTQxRU5VVENnUFFpd2I3US15ODNJdm1IZ3IyVkdTRllrZm9wam5yVWMzM1VXTERnc1pDQzgwTGF3ZGxtZWxFYThDZ1FnVm5EeFJBZ0NMN1BmQWhyV0h1YkduZlQwbndyc1h1ZkRWa0llTkJfVjhrZTlPMXY5WVRlYkZiaFJvR0JBbC1ndHdCNlcyaXY1emxVR2dfcGdQUUlqdXgyMHRtNVZCVGlYbzBLV3ZidGdLVm51V2c5U1dUSnEzOWs1WnRieFpGX0M2NGNvSnlBOUE2TTlHRjlPMkd2WHVPd0lpU1JZazBySGNDMmpudkJwVzMxVjF4TDE3RE84NGpreVNUaF95WW1sSnBkd3VrSlJaNUJsOWpWTnI3bGFrNW15R3ZuTU5PS1NvejF3dXVBY1IyRFBSdEJXVFgzZUVraG9DaFR1V3ZwSmF0Ung2a1ZFTUY1eDcxLTBJMUlkZEJFYlhLM0pxSnJFVTVmTmZBdU9TMU0wSE5mLXNQZjFfZHpVY05vVkN1cUMza1pSSVViY3RwT1pORFBxd282amdyak92MWlOeGFtemZJWHVyZXJuSW5fcDV3OFRmSmUwZHIxTXVycTAwdHhEamxJR0lIMjJoQm9TYW1adkNYUktJYk00LUhiYzlmTlhudnZSRVROWjV6MlFqS2lieDBJd2tDWjZxVS1OTnBnZGN4SHZ4SGhJTWlieVBRWkxkS0t2ZHo4S01ucjNaUGVnWTAwTWx5VkpKY1BGRm1MMloyeVBzb25uT0tjd05lNUFpVkt1S0gwbTJyQmRZMXVzbGljaF9MZEdmbHdrMHA0TTBSaUZBaXluRWlqMl8tZTVjcWJoWFdXdGYyWUZGNmNZSF9OeVhYallIWGZQTllkNzlOV0d5dVk1N051WXk5ZllfY21WVVdPTVFnd1NWcW9qeC00NHEwRWlkTE1RLUVEcFduTlpPX0xaOWNSeTl6anhOSjR1cXRnY2Z4STNXX0ltTTRKbGNuOWJDMzA4WGJSM2dHVkl1OUdkeS13NERVcTFwVWVITGdQbFRfVFg0eVYtbHFRWHNTc0ZkSkZLbzlic3NUS0V1dGNBQTZKRzcwOUJCSkdoMDFIT3BpUFFPWTYzSmNoMFBiSXZubmxmeXc3M2tCWU40MWJMTGxRUnV5dXA4emtzOFVvVW5uT3ZIb2xveE0wQ3VlX0owTmZBdExtU0xEWHozVHUxeDV0RGVJdjlHcDBheUlJZy1wcHZ6RzNMb3pnQUowUjVrMzNkeG9udjVxVFI2MXhnc2JaNUZZT0ljMXBqTVgwQUU4WVZLMGpVcTZ3QzlnTnRDN0M5LXg1cW56Z0pjdHQwbkRHV3NFdElnX3J6SFJhdlFpNlF1SGJIS3doOTBBekVVems5VXFPWjdnTjVoa2FvVkprVFdYZlhTc3B0Zml6WGU2MDFfMlFKNkhtUG1FbGJSeFRCbU1janhiSDE1SDJCcHR6bHdxVWJhSlB3MWd4Q2h1LTNGWC04S3RaY25DaGNrOXBya3VCaEl4czdVaDdDYjE0T1VjVExlcjZGVHZaa3FLczBhcXJPZGpZaDBVeFE1amRIQTc5TDJrMFF1enNYWkNfZXA4YkJQa094RzRCUGpaN2ZSVkRPcjdaaFlRenRQbnpHZXo1eFJoVGhEWWU5eEZTTkRsM1pqXzYyNzduMXllNFAwLU54V3ZTWExFc1ZJUzVabVNYd25KOUpjX3YwTWRkMjliZno4aXFBSVpXX2QzakNsWVBzWG0tMlNzTjBkYnJ0TG5NUzNkOXV0cC13blRfRDN4Qmc2R000MGZSZzFnaG5uM3dhWnB6YzU0T2xORDNZR2RnclQtc3dNY1NwcExiM0FRZEVSQVFycjFSUXJNUHczaUpEdlVKdFFyVElTMHJpRE5rb2kyMFJHQjMzYUtRR2VSZkt0ZldOUFJmSGh5Z0lTdUpWLVZqdHZHT2dWTFAyZ0RUZGNMZ1VQX19kNUxlUzllWEFiaUZWVUJyOWhhdTNzVnFYazR1QWE1QkZRaFlTQWVyN3RxclZGbGRhM1N5UURSU0dETWtyaksyZHFlVlVpTHRYTnJ3VHRfQ01iLXd3LWhhTDcyTmZSaEQtYkpoS2s3X1JIM09GQV9DaDZnaUZQUDBzTzF3a0t6NHNJelhQQ0pUY0pTMTZFNV9sSkkxTGtHOGVfMFItMEk1ejk2blVKRS1RTDQuMktGazBXd2JUdVBadHJMMnFRSXF4QQ"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '5407' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault29db19b3.vault.azure.net/secrets/restore?api-version=7.0 response: body: - string: '{"id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/16a8591563fc434f8ea6e2ed9a17d76b","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Purgeable"}}' + string: '{"id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/53a7c0e391b243b98ff0838306e5f101","attributes":{"enabled":true,"created":1564528371,"updated":1564528371,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '199' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '199' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:52 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/restore + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_recover.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_recover.yaml index c42445d00a55..8936cbf3e59b 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_recover.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_recover.yaml @@ -1,117 +1,134 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault7f7a16d0.vault.azure.net/secrets/secret-name?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:13:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: '{"value": "secret-value"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '25' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault7f7a16d0.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"value":"secret-value","id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/387abddfcc2c4b7eb4a4604d274a39cb","attributes":{"enabled":true,"created":1562687832,"updated":1562687832,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"secret-value","id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/731695cfdc604c60809900f0dded0c26","attributes":{"enabled":true,"created":1564528411,"updated":1564528411,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '234' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:12 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '234' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault7f7a16d0.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1562687832,"scheduledPurgeDate":1570463832,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/387abddfcc2c4b7eb4a4604d274a39cb","attributes":{"enabled":true,"created":1562687832,"updated":1562687832,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1564528411,"scheduledPurgeDate":1572304411,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/731695cfdc604c60809900f0dded0c26","attributes":{"enabled":true,"created":1564528411,"updated":1564528411,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '348' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:12 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '348' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 response: @@ -119,48 +136,38 @@ interactions: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: secret-name"}}' headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:12 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 response: @@ -168,48 +175,38 @@ interactions: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: secret-name"}}' headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:15 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:34 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 response: @@ -217,181 +214,338 @@ interactions: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: secret-name"}}' headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:37 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1562687832,"scheduledPurgeDate":1570463832,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/387abddfcc2c4b7eb4a4604d274a39cb","attributes":{"enabled":true,"created":1562687832,"updated":1562687832,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: + secret-name"}}' headers: - cache-control: - - no-cache - content-length: - - '348' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:40 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: + secret-name"}}' + headers: + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:43 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: + secret-name"}}' + headers: + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: + secret-name"}}' + headers: + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: + secret-name"}}' + headers: + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:52 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 + response: + body: + string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1564528411,"scheduledPurgeDate":1572304411,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/731695cfdc604c60809900f0dded0c26","attributes":{"enabled":true,"created":1564528411,"updated":1564528411,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '348' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:55 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1562687832,"scheduledPurgeDate":1570463832,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/387abddfcc2c4b7eb4a4604d274a39cb","attributes":{"enabled":true,"created":1562687832,"updated":1562687832,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1564528411,"scheduledPurgeDate":1572304411,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/731695cfdc604c60809900f0dded0c26","attributes":{"enabled":true,"created":1564528411,"updated":1564528411,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '348' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '348' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:55 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name/recover?api-version=7.0 response: body: - string: '{"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/387abddfcc2c4b7eb4a4604d274a39cb","attributes":{"enabled":true,"created":1562687832,"updated":1562687832,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/731695cfdc604c60809900f0dded0c26","attributes":{"enabled":true,"created":1564528411,"updated":1564528411,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '211' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '211' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:56 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name/recover + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_backup_restore.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_backup_restore.yaml index b6c8060bf441..90c8d9b81ab1 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_backup_restore.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_backup_restore.yaml @@ -1,206 +1,205 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:14:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f60fbc.vault.azure.net + - /secrets/secbak32f60fbc + - api-version=7.0 + - '' - request: body: '{"value": "secVal32f60fbc"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc?api-version=7.0 response: body: - string: '{"value":"secVal32f60fbc","id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/8968fbea165844c6ba86c8774431bfd2","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal32f60fbc","id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/778d727d3bae4014a6285fdaad85736f","attributes":{"enabled":true,"created":1564528490,"updated":1564528490,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '227' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '227' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:14:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f60fbc.vault.azure.net + - /secrets/secbak32f60fbc + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/backup?api-version=7.0 response: body: - string: '{"value":"KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmZENXM5Qkl4M3FfWWd4OHAteWRFVXF1SDRqRWUxalhCZUczbkh2WFZtaHQtaXZXWnZaLUpGV2hKTGg3SmJkOGhMTlJzSnJ0OGtJeEVENW1rNnc3blpkVDRiRUIzRWlVdkx0eE9UakpsX1JwdWxhTDhabmY4a1B4RHdsSzh3VWpTX3hSTjI0Y2M3WU1KR2o1aHUxT29oZXJHT2FzRmthM2w3ek1ZMlVWVFFFck5GLXlyOHkyYnd1WW9HNGpUSGtNZkN5OWZ1OEMwdHcyRWVwWlNGdl9aMk94bjY3aVZLTDU2LTZybVhRZnBMYmhic2t3QTRUaGJiRl8yRlhXZTg2a2s3NEp2cjJzazczMVFkTGdWNGc2TFlpV2lISmR4aXdKOEsyZ01BX2RXLVBMZHA3N2d4endzTk1Tb2hHeVFLbU15M3ltVFRkMHRjS0g2VVp6d1Rnb1AwQS5oR2F2aHlIMzRPRnBVTmVJUVNrbWdRLjl0alJIYkpDUjgtbkFzLUh6VHM1RDl6ZzV6dlR2ZC1YbDFfREpZbzBJYnRBanNBWVBFWGdUQUFDUTlMTDFJdTA4OUhpblN3MWUwUDRyd3poNHpTdG5saHlDNGlPdDQ4SzVoMGZUR2dPa1ZsOE1PdGl1bFhwTHJtZUdzeHJaVjFoaE0tUW8yb2g2VGJwUmM3bnphcTBpcnBNeUxiRTU0S2EwRTNCNlpEb3ExQkpzRmNMZ2RTeTRMLXhyRk9ZclEzc0xYUU1FTFRIRkNMVHV4dFlianBtdUlrTHo0UHFjV0p5TFFSQ1EwV2ZObHVFel9razY3N0VpS0V3UDcyb095RElnZ0ZjT0k1VEh0VVFGeXRRX3BpMEtvajJkRExRM3J2WXhYVVRqUm9uN3BnVmxnZVltZGM4aTR5QmFYUm10TW5VYWV3WC1fblNQWkhTNUJ1MlV2VEMxVEJGQk8wWUhpamlVWnd2WTNrLXVtY0xlT0lGeWxzNnBMLTdELXJRZk5SWnowVkh4dF91aThSMUZaSFZHeGlyMmI1N0xJU3hBUDBHejJPQ3NDQWVGMy1Gb2NaSVM2UkRsbE1WdHlCNE9kUFUxTktOdUwwdlY4bVdyRzVlSU5ncVFWZFRUN0EwRjBOd2dSd2l5dTFHcXo1NVhXVVVxMjN3cDhMdDR2R2wwelNzblJsNldrRWtrRDZUcFFrTm1xdU4zM1p0UjZHejJ3NmpBRGJHMzFreHhkVEMyN095QUJiWjdUUWF6ZzZKcUlaZllpdkFJOVpuNXIxV05RWDQxV2s4aEo4bXdWc1ZXbkRFeURLRFhGUF8yYWNSX3hDSjlpU2gycnlQeEFtaUFySi1vSHFoSWI0TFlJZTIxbmNGMFRoYzNoNnZrMVNPS1JTSl9zemFnazRySEVfZm04WWkzNi1RU2pMdlJ6SFJtTEpPNWVvQzNNMF9Vb2FQdHpEUE1FUGpXVk1GY2FNbmZ0QmxjY3AwSUo4Rk5nR0YzTmttcFpEcmFPcWRtYWc5TnViaXpQM0V3YjBuR0lwUWc4QzNHOHdtWmdwV3ItV3BQQUszRXo4SVVXc2xOVmZKMjBQSEg5SVIyS2UxMmVsM3ZlbkdsYWtXbW1ZR1NMLUFOTHI5TXQtUWdLeGtGdW1leVFRdTJZaEZxMDlHU2tBcFk5WkVENDFDa2JocVlOTUcwbzVGR1BmSWFGM3FYcGNPdEdhd0k1RkI0Zzh6LXktUXd4UDhnUzI5X3hSWEZLd3BJYU5sRDVHWi1rYVJVSU5kTXY0SC1LcUZ4VlFKYUxiOHRCbTNsdWp4dHYyelJ0cXRlRkVoRnBhLW5MRmhlR0ktdjJJSF9idUJDNHVSajJyRDZNYjVYZjBGSGo3bnNtdl9GX1h0VDlsNXFwbmV6U294MWdhUExKY1pzSlZVbzNCR2hiQ1VMTkt6ZnFNWm1jNml6QW1hcGpCUGtRRDNtejVoT1l4RUxOWUhiUHJjZlFuaGR4Z3ZHVjFJa1lSbVFZb2ltUkx2ay0wWVpMMzVIT2xEYWxNTmNnUkNZdXRTSmJpZ3B3MjBHVG9tdkVQUV94TTRQUXh2MFU1bl9hMzIza3ZNY25nbGFyQldMb0NBMjJtbXZlYm5GbXAyUGwtY1BOYS1zd0FHYnRHVlhQMV9jd25hUzlwbWRlZTJ2MlBmVlhWa1Boa3l6TVB1bEpKNUp0bkt1SWhyTk1SWEFwT3FoTzlFVG1WOXRYTTNhT19aY2wxWDBaSlRQMS1EZXdQTVNpUGdzMjJuM2sxWmVOUEFMYjM2MmxsZzk0RFBuTkxLeTVTaUkwWkdpWjd1U0psdTNFSWFUQW9NbVRseDZBSmI5T3R4aUtCMjNTODhJYV9SNmR5Z0ZmTHd2SzBZSjN2WjdEakctWDBLRU5QbTRqTl9kamwxOEJ3eUJuZXZoRG1DbTZjLWpndFJWcHo0bTUxcGFjMHVKaFBJLWt4cElCSmlaZC1HUW1wc01hOGs1MFdHdHctU0E1c0JxeUVuRkNXdi12QWZEUzl2VHRoOFhGUE5hM05JUWdZaUYzUE5mMk0xZzlEZ0poQ053OW5yRTcwVkVIeHNRRFdNR1pib1NoSEhLWW5UbUVfOGVRbXY1c3BEbDcxaVR6OHdCT2MyeE1seTNkY1pUT2pzMFFQUTY3N2xNd2VoWVh4NFFSMG5MT2psd3h5WGs4VG42LWpFdWlaS1pFaGJVclA2OExKSHc4YnVJOWFoeXRuWFRKVWZfWlB3a1NBU0VBRjV1V2JEeG1ISTdFUE9SejgyN2t4anBZcnAtSmJ5NHFzRW5MUFlqS3Z5OEY1Yk1POGc4djRralB3YXhYRHgzSHI4VlJoUlRiN2dpcjhIb3A4UkNtYkM1c3lwZy16MmNaVmk4dmh1NWxjN3l6elg2Qmp4Vy1zUzlDV2YtM0FWX0NlQ1JJUmJjV0dSR21PeVZ1czBpTGlmVVhEdEdhazVBdkhtLUNxZDNkdDFrRlBmbk5TbmZvMHZYWUhTTmljaGVQVm9xNGkzZm1FYlJmazFqQlNXT0FDT3NyS3pIQU1BWEVZNGxCWXUxWDRQVExOYTlFS1BCd1h1RmdveURKSkdHSWp4RmN3Z1JBeXp0TEZBV0o2MFJ4YnpUd3VhdENqREUyM1BEZlZNMm9nYkxKNVZ3NDlLWUR3UmRMN0EtbGQ0V0daSHVVYTE1djA1ZlF4d3ZsYTQ5Mngyek9OdG1NajZtbGZYUTJhMlVGTTVWeTVnQUJEMmFjbVZZSzV0dTR2SDFTT19kckxIZmdJR2lEcUluemNyQmtSZ3ZvQjd6Rng3OVBkdllXVllxODFWQmxfWkZHRk9lZ2dxSXNFdkhZZjRHdVdwTXo1T21WVERCWTh5Yzh6RExxTUhGa1M5bEQtbXFxTTdrUmFxdHlOMkdvenp0M1ZVNjFRbjBFQ1FXNG8zYmcwS0NsWUxWVXpPNjVrRnl0VVQ5bGt6Zm9HYkdJMWphS0ZwVFMxSk01RUFwVm1fSkJJOTRRdk5vSjUzWmg3T0xPWTQ5UUpUTTZvY1U5MmhHUmtyeThyRVpsc2VPN2lZenVhX0sxZTUwS01INzlrM09DdDlkMXpBZVdTakVyWHpHMW5zemFXRE1XSk5BVXlFTVpGZVRDX3FraGJhZzd2a0ROS1hvQVB4R2oyQWNMWXNaRXhUa3IzUFBTYThjSVphWmk3T09xOEpjb0JSMG5BQXJXSTR0YlRQRHJ6NHBNaXRjQ1lVVG5RYUpFV2N3WWpqQWp3eTZzLVhqNHZDSXBmQTNEei1mSS1MSHdHeTZMcExuZ0pnLTVHVVFiS0dEbW5OSGdmXzd1YXo3YUp5OGhaV0VTd2cxQ2poMGJkNXIxS24tOW1WZ21ZcVpHckQ4YUZCNVA0ZGxYWVotNXpqMThkU2VlNE5sbjZGRTllbUdWVnN3SnFSblo2V1ZJaVZJUDNKN19iVmdGSW5INklQSWFNY1dLU2tZbmVZUFRjODFFZ2ZndDBEWjFTaklYRWI0eWxmV0tjenJyODR1WGJYLThUaGJCRklMSk5oazhWTDJKOVVkSS1hcTFES1lUbmc4TzlyMS1qa0NnRjNYNmd0MHpnWW1qcmxZR2NNVm1ENTR6WHRkbENGWDBPN0RpMHJmemZ0WEhXV25IaHFjNzQzR3YwUjVtbnVndEJkQXN1SzJFS1p3bUFOc2hnRV9EbmVZOW1sckZYc3g2NVZlOE44SGlMdlFBb1ZkR0lsXzdSMG15b21IOWowam1idnhGeDJCUEZ6RHQwREJyZFdVRWdXOU9pRTUtNFRWOWEwWEs3UHY1UVJ0SFRIMHhfSEw5bndFeTN4VlE1eHQ5WGs0NWM1djhTRXBCd0czamJDM1A5UkZZWnp3YWo0SjBnazlPbloxSXRvaDQwZmJfLVNjZ0k0WE9pUnBkaGM2bnJIWkhjckg3dHFqeFVVNTlUaDJjSURLQnJEcVJIX1E5emVmODlMNUZDakxsUTJIVXlmT0tZOHh2LWpqS0hldkt2OUFuZ0JTd2FrcklCU0tLV2JvZks3bXJHamJzcWp5SC1TX2RLT3ZkRmFxVlM4c2xyeWwtUnNwWFJscENpem16R19OWm40ZjBhN1JGVmZPSGxMVUV4Q1BWVDllMVFIVmhmUk9Ld2FpNGRLcDVtNGZTZ1FubGkzbEs3QW90OXFVTkZhX1F4aWxya01jM19OOGFlRklmZjN5ZVlGWUluOHpqd1RrZVJURmtEeGFKOGlJa09HVHhYNEhtWXhpSmkxZ2ZiTXpiYWlBeHBtdU9QOXI2dEZvTTQtVmpaUnFFTkJqUnNKSGQtZnpLVE5OV3VrVlNfYkN1dkhzZEZkSkxmZm80NXBWMmVUS1dZVUNibHhEU2hTZ1JqUXo5Z2tJTXd1RW5iNTZ2amcxUzNkMDhGNDBTU3hKYXhPcTRqUW85ZEpPaFR5NXRaaWc1djluaDFhVU8wSUtFZ2tsVERJR2hyVjZkWUFiSW5FbWhZWi1LejJEdjlRNzZ3MXQ3Y0trQ28tb3I0UU1XM3dVUm5NdkRCYjZubVNkOS12M0xKZWN2dDF1dS1RMzNCb2kyYk9fdTNtSk5nRVBBalhMQ3MtQ3RCNnhBNnVxbU1HSTU2R1pYdHVwTXloVXcuOGc3M3ZHQVdDam1YYW0xeVYzbXhnUQ"}' + string: '{"value":"KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLkFMc0piLWlWcUk5Y01EcVRhS2w1d3g0UTd4dGtzZ3FTWjFfdVEtRGxuR19yaXZ4bGlWakFfbGlxQ3dhZ2lNaTQydkRGa29Jd2U3UnYwYmwzMXlzY1NpQmdkSmxvSzl4SjBJVWJQdjI0Y182amd4TmVVNWx0M2hKRTZ1R1JFQTZYSWpOeEJkazQ1a18yMTZ2a2hRbEt0X3g4dC1oZzk3ems2bkNpT0RTLWtWQmhIS2RST1RmRFZXUmJhVlcyQm9wTHBKM0E2cEpadEtPMjF1dHgwQWRkTVVSMXQyamdkZEs0eTJxWDJTX2hrY3ZUdnR5VGxiUXkxTmF2WnFodlptc0ZIY3ZZT0ZWdW83VTEtWWR1TUI4SmtuaFljanZkSU5lNmJSdzg0UWxQQzQwNzZXTk5TSlh0V2NNbkVMaWF0ZnFLT0RGQzY3TUVTVlA4TVNMWHZQOGIxZy5TTXhZMkRyaDlzckJCQldYNDJMVDBBLjY3S0pxd3FQekFPMVR6ZGNOTHpOY2ROQmNsVWc1SE5CSFRRYWNqNFJHN0RlWGRZMWJ1c05UMUdYUXFqTDNURzVqM0Y2TVVGYXh2R2drcjQ3czJ3cW1KVmRON2JEYlhyR2dobU9ENThmanBXbzA4ZHQ2ZHJWTC1yX0FDeV9CRGFERFFrb3Q5VHU2RW9FSjB0WjVsNFpPWUxaSmVFS0JfaUlCVWRfaW02MzkyeWtrZDIzT0dlNFRuZ2xNSzlJc25sMWMyN2JySl82aUR5R2hheEpiQTBHc0ZDM1I2Q3dlenRjdV9COUY2WE9WNlJTLWoyOW9vd29URUxpM3pwZXJaN0h0OGFlSnFzRHFkMzFLT2tlUDNEcEpVdnpEczJKNDRTNC1Qanl5dDV6UTk2LVFrLVhaZ3FSVndETWQ1VFAweHFQZXdTX3Y0dmlDRUxfbTBvTW5jY3lYTEhvMmVvMzdRUDUzU2Nodm1ocFVCTEpmYUl1dG11TC1XN0Fla0xJbjU0R0NfMzVWV2VHR1lQWnJtNERYbHp3d3huY1E5U3h0OVAtQXctTHJleHVFUWlOWGlrVXh6R2djYm9HVWJ2VFlzdnBGR2JWN21oN3B6SHQtc21Td0hoRkczczd2Z0xvc2tPbUNuQVJ6REwxcXR4dzRERmNONERQRk93YzMzUUdTb3Z6ZVByblVnTU1NRHlvT1NwS1ZwdlA2Wm9zdTdTTy1LUUV2MlJ4TE5ZaHJVZWtKdnlXMkRGbFhkV3VwaXZnbU1fcWFYM09ZVHZtbnlwNDNtcDFyNHFqSzNOTkZKNEJ3M0VCT2xHSV9UdHo5cjF6ancxenJXcTNWVTlkdzQyeXJQSk5na3REY1dzWGdoN1NNRWV5X213R21sNEJLRmtnTWpCVWYtV0kwWkdhVDVrT1QwZGVjRGxaUXpHcG1KTVI3N0p3ZUZsaDhTZDd1ZXVEU285ZkhCODFfeGIzUVhWb29iUXJfcUtMRmpMbFZSLThjd1BLeURCUEhtLTBrd1JyN3FGb3BmQjNfOG81UHFhSENvbHBRQ00wTlhhaXhaN2xBV1daRUxyTXI1RGxzMlE4cUh1UWo0dE91VzRFbW9xb3Vpb1ZYclZwMlBOMGV1ZmkzU1YtRUJhdXZfZ0Jzcy13YzZQSEZ4TFRaRGJyTDBpSDlsSE5YOTZLS1dQQjV5YktNM0x2cWdQMk0wOTlESS02TnN4V1B3U2tTdGFjQzJlUk04MmZQNENyS1Z2c1BqTkFTd256M3NqbXUzR0xBWDlKem56d1Vrem1mVC13SDVqM1FIMUs3T0lzeEdnWXQ0THlWSnZQQWFJenU5Mzd6bmpyQ2JNUmloM1ctMzNGZG5QdFdJa1FrN254VmtITHlfaTU2NS1FZHBZNW1sVTBIMnJCTjE4cEoyZUJscmpWcXFMT0VPMzFxQy12M0dJS1lTbkVhdTZGNjY4ZVE0dU91R1AwZUhqLWFzNm1pLUVZSXk4WVhKTlBxanB1OHEtZG5BdkdSRFFUaWs1bHZHQW9JMXBzcU94aENNdVp4amhNbHA2aXY5aTctMWxNUkpKVnpoY3BwRmdXLVpvX3I1Y1NDbmFsZkN2UzhvQklOdVdJdzNWMERIREw1ZGhUTTBfZ3JEazdheEpjVlZISFZMR0tMSi1hbTJBLUc1MjlxMGJ4UzJJUVVWV1lhcGNHZjdvVHc5TXluOFdJOTVhRVN1a0Y4XzluVFdqVmI2d1VQeXpIRWpUOHhGVTVuTW1HSDdLSnpIT2cxNDM4eV9lVjJPZTNqX3kxclN2Sm1FUFM4OWpHa3dNOXZGSWxGcDY2Xzc3Y2FUR201MmRoemo2d1dkbi1rVVBWS1dwZW00VHcxSTZ0eTdkWUYweUtRQTFRWmppMm00dlUyS1JSeXV4NFF6alVVUWtPQzJ2dW9ZMXdzbGFkNVdycjI1VDMtMkIyODdtaUVOSGdGNEt5eFhiLUFmZ0hiWU5SbWVwR2c4UktRX2dnbEQ5Qllib1ZfMWM2RkpjaUszemZDQzB4QVBMSU9ZYzZZQTE2QV9XWGJ1RWZVM3Vwclh1TjhWckFTeTlPV3Q2UnhDVjB4Wmc0R28xeFhxRDROaC1KZ1NibExCOEVkNG9MZ3hDRUtwWVdUbU91alFlQ2R3STVZZUxBTS1Sdm5zN09HN0JRN0JaTlpEOXBoeHZmcjZLM1oyVGRNMVBSRTI2YjEwSUZTMmJiY05tVERxcjRfOTd4RzF0cURqQWFTX1loMWgxczM3QWxpQ01RRS16TDY4MHA5ai1XeURnTW1IVWs3ZEpFcGo5RlBPdEthcXdmLTZlc0ZmazdCQkxvSGl3YUx1SDZqTmVRNXdpMjRNeUZ3NlJqTTlzTlpHQm9HRTk3RmFwdXg3T3ZYWHRQWjhxYkpmSUtJYzR6Q2NHdDRDakhQMWdqX2tERkJLeGZuNlItekRlS3hGX1NuSlJpWUNnRGJnVjlUMU9OcXhqLXA4LXNFdTRleWdIcVhHaDVGcXZ1dld4OTd2X0lkVF9HYUtTWUN5bGxDaFVwS1hWbWZnVUtnQVNZWkx1RnJrd3V5VGFmODloQVY4YmVXVkNZaUxORDd1bDRwZHlMajlnZ0ZFSTdaYVNXSFRsX29uZndDNUZmRGs5VGI4aHp3NVBWanNWNU9pU2QweENpSlotbGdvTnQwaFRsYUZ5UUYyWnBxU0FrRm9SSWVnYlNxTVlpSDRGcE1IZWY2eEZFblpxSUpxeG0yc2VycWhRTWZfVURBYVotZ05Ra09qalptcHg1Y0NRTXpvdUpKcnNrVzBDNHFpZ25CQTdlWmZCQ01TYkIzREtPbjJQNEQxTDdIUnZ3TnZUVXpDS3RYWGlnUWk4dWpvWUc1SUdQMVNVS2dRMTZqMEgtc1hTZGFBR0RiRDFvNk1ocjNZNzhQV0NEd0toWkpmNkpxaXNZYWNEUXZuYWg0LWdhbGd6dDY4dzBoWncybDNKRmFUNnJNMjBsdWR5eHluZW1ldXJISUE1c0Rfb1d3YmZmemcxaHlKbDRQVjVORmNLZlZ3THBJNU9PbEFXRW00VTRDbl9sR3lZak15cDFRSTVieEVwRjR4NUg2dXI2WW1vQks0Uk1kMDBHdUowMUZ0cEVENFJ1akFiNUhIVVhseEp3TkMwanNrYVpMVW5kcGdIYnZqMVV5YnhZc055VnFRUjVvWjFqSHFkT0ZLckc5dmxnN25EZHpFekJoeTdndWtuV0xmb3duRnhlZVZyaGVSOEhzZDE5SW1lTHI3a0FOWkhEVjh1czdsZHV2bkNjWlFYaGZxSnBtcUozZEgwblhuWWZCalpEZV92eHpoUkYwbGc1SFhZanhybVNpYXI5dHBWV1hVWmJnRVE0Zkp5bllES0JLOVdWZjBxMnBveVpGRzA0Q3ZYeUpIeTZCaktzNXRIRTRZLV9EbE12OUI4NXN5OXFBb2N2d2N1d0UzbGRXbzdoZnBCN2lkekthaTlqN0lNV1E4YWE4RURFclNnUXpnVFdDZW12VGZPUlVPVXRtWnJZZGt0TWNpYXZibVFvd0Uwb3RxZ3ZQM211NHJkMUFjdHA4eWFGNDVTUlhtQkZuS1pWTkdMM2Z0dFZuR25QbXdLNU1qOFB6NWs4c2RqZ1I4akhLSjUydEdkQzV1TWE2RjVLb3FROUVGNEJKMWNLemhkSE1kRkRieVhLazJyaDN2UVY3a1FiRHZmMjh2ZnNWUFNqWHJXWUpXZ0hIUXlFdVItUzJIRExuVUtPa3BGbkwtUWhjcW5iWE51VHZtOUxRbEFJeEdoRUo1M0gzUW44S1RjODViUWxLeU5aa2RtOWxhRTAyemExRXJzYnQwU1E2ZGhIR1hRblFHUS1HSzFJcE0wT3loLVdWYmZidzNwN19GeTVlRnZ3S3duNzhxQWZtM2N6alQ4NUlacWJxb3dmb1VvS25rUVVlNEdJWmQtZ29LS0d0WTlFZDRxb3BqV1hOM1dYVHlYRWdmOGVuUXhqblhLeEM4MDdqWWhaeE0zWmVDNE01d1hyMzJZRmRPc3Z5SmtLb2FTampER3liblNaOFdHVHR4Mk1HM0hHR0NHdW5xWG9vOFZHRjQzemVteVU5RGtZQ3pmZm9qU09tc2pERkUyTW1LWTNYd04wdmdGSkExY0pjWjVySE8taVROZ1Bsa2h3eXNkek1GdDFoVEdFaEY2aERWQ2taQ2NpSEktNEdfVEJFZmJ3eTZJV0tPeHpETTlRejlRNV9lWGlVbUR0M2hBdXZyMkdHZDJNWEI4R29PWGhJekNKbl9IalA1QzlMclh5VFQ0TEQxSVh1UWRpSXJqNWJUTVFKX0oxeFlRQW1EaG9QVXhCdGlGSVRxaWJOcGk2V0lzMWF3VlhWUWRwcWlaMjVfRG8yRjQ5QnU5UHRuX3Z3SHR4REdGUlMzQTF6QUtYUlBjTlpCWHl1a1JjWGVCb2lHR2I0OHNVOXhBMUtnZlNSTDRUS1NOV0JjTTJtLUNPN0VnMDM1QldQUGU3ZGhEWE5CWl82VzJRMzVKcWlYd3FqZTBPUmNUY0FmR0NSTC1NZHFvWVYtaHd3UnQtdEtwbEdDMElXS1d1Yk5ldm43NzRQbGpqV2ZJMFR4ZEkzNkFKa1YzdzN2WlVfUDAwQlEuY0Y5bXk4cXZWMjRVV2JKcGZJRDVCQQ"}' headers: - cache-control: - - no-cache - content-length: - - '5378' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '5378' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:14:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f60fbc.vault.azure.net + - /secrets/secbak32f60fbc/backup + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc?api-version=7.0 response: body: - string: '{"id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/8968fbea165844c6ba86c8774431bfd2","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/778d727d3bae4014a6285fdaad85736f","attributes":{"enabled":true,"created":1564528490,"updated":1564528490,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '202' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '202' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:14:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f60fbc.vault.azure.net + - /secrets/secbak32f60fbc + - api-version=7.0 + - '' - request: - body: '{"value": "KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmZENXM5Qkl4M3FfWWd4OHAteWRFVXF1SDRqRWUxalhCZUczbkh2WFZtaHQtaXZXWnZaLUpGV2hKTGg3SmJkOGhMTlJzSnJ0OGtJeEVENW1rNnc3blpkVDRiRUIzRWlVdkx0eE9UakpsX1JwdWxhTDhabmY4a1B4RHdsSzh3VWpTX3hSTjI0Y2M3WU1KR2o1aHUxT29oZXJHT2FzRmthM2w3ek1ZMlVWVFFFck5GLXlyOHkyYnd1WW9HNGpUSGtNZkN5OWZ1OEMwdHcyRWVwWlNGdl9aMk94bjY3aVZLTDU2LTZybVhRZnBMYmhic2t3QTRUaGJiRl8yRlhXZTg2a2s3NEp2cjJzazczMVFkTGdWNGc2TFlpV2lISmR4aXdKOEsyZ01BX2RXLVBMZHA3N2d4endzTk1Tb2hHeVFLbU15M3ltVFRkMHRjS0g2VVp6d1Rnb1AwQS5oR2F2aHlIMzRPRnBVTmVJUVNrbWdRLjl0alJIYkpDUjgtbkFzLUh6VHM1RDl6ZzV6dlR2ZC1YbDFfREpZbzBJYnRBanNBWVBFWGdUQUFDUTlMTDFJdTA4OUhpblN3MWUwUDRyd3poNHpTdG5saHlDNGlPdDQ4SzVoMGZUR2dPa1ZsOE1PdGl1bFhwTHJtZUdzeHJaVjFoaE0tUW8yb2g2VGJwUmM3bnphcTBpcnBNeUxiRTU0S2EwRTNCNlpEb3ExQkpzRmNMZ2RTeTRMLXhyRk9ZclEzc0xYUU1FTFRIRkNMVHV4dFlianBtdUlrTHo0UHFjV0p5TFFSQ1EwV2ZObHVFel9razY3N0VpS0V3UDcyb095RElnZ0ZjT0k1VEh0VVFGeXRRX3BpMEtvajJkRExRM3J2WXhYVVRqUm9uN3BnVmxnZVltZGM4aTR5QmFYUm10TW5VYWV3WC1fblNQWkhTNUJ1MlV2VEMxVEJGQk8wWUhpamlVWnd2WTNrLXVtY0xlT0lGeWxzNnBMLTdELXJRZk5SWnowVkh4dF91aThSMUZaSFZHeGlyMmI1N0xJU3hBUDBHejJPQ3NDQWVGMy1Gb2NaSVM2UkRsbE1WdHlCNE9kUFUxTktOdUwwdlY4bVdyRzVlSU5ncVFWZFRUN0EwRjBOd2dSd2l5dTFHcXo1NVhXVVVxMjN3cDhMdDR2R2wwelNzblJsNldrRWtrRDZUcFFrTm1xdU4zM1p0UjZHejJ3NmpBRGJHMzFreHhkVEMyN095QUJiWjdUUWF6ZzZKcUlaZllpdkFJOVpuNXIxV05RWDQxV2s4aEo4bXdWc1ZXbkRFeURLRFhGUF8yYWNSX3hDSjlpU2gycnlQeEFtaUFySi1vSHFoSWI0TFlJZTIxbmNGMFRoYzNoNnZrMVNPS1JTSl9zemFnazRySEVfZm04WWkzNi1RU2pMdlJ6SFJtTEpPNWVvQzNNMF9Vb2FQdHpEUE1FUGpXVk1GY2FNbmZ0QmxjY3AwSUo4Rk5nR0YzTmttcFpEcmFPcWRtYWc5TnViaXpQM0V3YjBuR0lwUWc4QzNHOHdtWmdwV3ItV3BQQUszRXo4SVVXc2xOVmZKMjBQSEg5SVIyS2UxMmVsM3ZlbkdsYWtXbW1ZR1NMLUFOTHI5TXQtUWdLeGtGdW1leVFRdTJZaEZxMDlHU2tBcFk5WkVENDFDa2JocVlOTUcwbzVGR1BmSWFGM3FYcGNPdEdhd0k1RkI0Zzh6LXktUXd4UDhnUzI5X3hSWEZLd3BJYU5sRDVHWi1rYVJVSU5kTXY0SC1LcUZ4VlFKYUxiOHRCbTNsdWp4dHYyelJ0cXRlRkVoRnBhLW5MRmhlR0ktdjJJSF9idUJDNHVSajJyRDZNYjVYZjBGSGo3bnNtdl9GX1h0VDlsNXFwbmV6U294MWdhUExKY1pzSlZVbzNCR2hiQ1VMTkt6ZnFNWm1jNml6QW1hcGpCUGtRRDNtejVoT1l4RUxOWUhiUHJjZlFuaGR4Z3ZHVjFJa1lSbVFZb2ltUkx2ay0wWVpMMzVIT2xEYWxNTmNnUkNZdXRTSmJpZ3B3MjBHVG9tdkVQUV94TTRQUXh2MFU1bl9hMzIza3ZNY25nbGFyQldMb0NBMjJtbXZlYm5GbXAyUGwtY1BOYS1zd0FHYnRHVlhQMV9jd25hUzlwbWRlZTJ2MlBmVlhWa1Boa3l6TVB1bEpKNUp0bkt1SWhyTk1SWEFwT3FoTzlFVG1WOXRYTTNhT19aY2wxWDBaSlRQMS1EZXdQTVNpUGdzMjJuM2sxWmVOUEFMYjM2MmxsZzk0RFBuTkxLeTVTaUkwWkdpWjd1U0psdTNFSWFUQW9NbVRseDZBSmI5T3R4aUtCMjNTODhJYV9SNmR5Z0ZmTHd2SzBZSjN2WjdEakctWDBLRU5QbTRqTl9kamwxOEJ3eUJuZXZoRG1DbTZjLWpndFJWcHo0bTUxcGFjMHVKaFBJLWt4cElCSmlaZC1HUW1wc01hOGs1MFdHdHctU0E1c0JxeUVuRkNXdi12QWZEUzl2VHRoOFhGUE5hM05JUWdZaUYzUE5mMk0xZzlEZ0poQ053OW5yRTcwVkVIeHNRRFdNR1pib1NoSEhLWW5UbUVfOGVRbXY1c3BEbDcxaVR6OHdCT2MyeE1seTNkY1pUT2pzMFFQUTY3N2xNd2VoWVh4NFFSMG5MT2psd3h5WGs4VG42LWpFdWlaS1pFaGJVclA2OExKSHc4YnVJOWFoeXRuWFRKVWZfWlB3a1NBU0VBRjV1V2JEeG1ISTdFUE9SejgyN2t4anBZcnAtSmJ5NHFzRW5MUFlqS3Z5OEY1Yk1POGc4djRralB3YXhYRHgzSHI4VlJoUlRiN2dpcjhIb3A4UkNtYkM1c3lwZy16MmNaVmk4dmh1NWxjN3l6elg2Qmp4Vy1zUzlDV2YtM0FWX0NlQ1JJUmJjV0dSR21PeVZ1czBpTGlmVVhEdEdhazVBdkhtLUNxZDNkdDFrRlBmbk5TbmZvMHZYWUhTTmljaGVQVm9xNGkzZm1FYlJmazFqQlNXT0FDT3NyS3pIQU1BWEVZNGxCWXUxWDRQVExOYTlFS1BCd1h1RmdveURKSkdHSWp4RmN3Z1JBeXp0TEZBV0o2MFJ4YnpUd3VhdENqREUyM1BEZlZNMm9nYkxKNVZ3NDlLWUR3UmRMN0EtbGQ0V0daSHVVYTE1djA1ZlF4d3ZsYTQ5Mngyek9OdG1NajZtbGZYUTJhMlVGTTVWeTVnQUJEMmFjbVZZSzV0dTR2SDFTT19kckxIZmdJR2lEcUluemNyQmtSZ3ZvQjd6Rng3OVBkdllXVllxODFWQmxfWkZHRk9lZ2dxSXNFdkhZZjRHdVdwTXo1T21WVERCWTh5Yzh6RExxTUhGa1M5bEQtbXFxTTdrUmFxdHlOMkdvenp0M1ZVNjFRbjBFQ1FXNG8zYmcwS0NsWUxWVXpPNjVrRnl0VVQ5bGt6Zm9HYkdJMWphS0ZwVFMxSk01RUFwVm1fSkJJOTRRdk5vSjUzWmg3T0xPWTQ5UUpUTTZvY1U5MmhHUmtyeThyRVpsc2VPN2lZenVhX0sxZTUwS01INzlrM09DdDlkMXpBZVdTakVyWHpHMW5zemFXRE1XSk5BVXlFTVpGZVRDX3FraGJhZzd2a0ROS1hvQVB4R2oyQWNMWXNaRXhUa3IzUFBTYThjSVphWmk3T09xOEpjb0JSMG5BQXJXSTR0YlRQRHJ6NHBNaXRjQ1lVVG5RYUpFV2N3WWpqQWp3eTZzLVhqNHZDSXBmQTNEei1mSS1MSHdHeTZMcExuZ0pnLTVHVVFiS0dEbW5OSGdmXzd1YXo3YUp5OGhaV0VTd2cxQ2poMGJkNXIxS24tOW1WZ21ZcVpHckQ4YUZCNVA0ZGxYWVotNXpqMThkU2VlNE5sbjZGRTllbUdWVnN3SnFSblo2V1ZJaVZJUDNKN19iVmdGSW5INklQSWFNY1dLU2tZbmVZUFRjODFFZ2ZndDBEWjFTaklYRWI0eWxmV0tjenJyODR1WGJYLThUaGJCRklMSk5oazhWTDJKOVVkSS1hcTFES1lUbmc4TzlyMS1qa0NnRjNYNmd0MHpnWW1qcmxZR2NNVm1ENTR6WHRkbENGWDBPN0RpMHJmemZ0WEhXV25IaHFjNzQzR3YwUjVtbnVndEJkQXN1SzJFS1p3bUFOc2hnRV9EbmVZOW1sckZYc3g2NVZlOE44SGlMdlFBb1ZkR0lsXzdSMG15b21IOWowam1idnhGeDJCUEZ6RHQwREJyZFdVRWdXOU9pRTUtNFRWOWEwWEs3UHY1UVJ0SFRIMHhfSEw5bndFeTN4VlE1eHQ5WGs0NWM1djhTRXBCd0czamJDM1A5UkZZWnp3YWo0SjBnazlPbloxSXRvaDQwZmJfLVNjZ0k0WE9pUnBkaGM2bnJIWkhjckg3dHFqeFVVNTlUaDJjSURLQnJEcVJIX1E5emVmODlMNUZDakxsUTJIVXlmT0tZOHh2LWpqS0hldkt2OUFuZ0JTd2FrcklCU0tLV2JvZks3bXJHamJzcWp5SC1TX2RLT3ZkRmFxVlM4c2xyeWwtUnNwWFJscENpem16R19OWm40ZjBhN1JGVmZPSGxMVUV4Q1BWVDllMVFIVmhmUk9Ld2FpNGRLcDVtNGZTZ1FubGkzbEs3QW90OXFVTkZhX1F4aWxya01jM19OOGFlRklmZjN5ZVlGWUluOHpqd1RrZVJURmtEeGFKOGlJa09HVHhYNEhtWXhpSmkxZ2ZiTXpiYWlBeHBtdU9QOXI2dEZvTTQtVmpaUnFFTkJqUnNKSGQtZnpLVE5OV3VrVlNfYkN1dkhzZEZkSkxmZm80NXBWMmVUS1dZVUNibHhEU2hTZ1JqUXo5Z2tJTXd1RW5iNTZ2amcxUzNkMDhGNDBTU3hKYXhPcTRqUW85ZEpPaFR5NXRaaWc1djluaDFhVU8wSUtFZ2tsVERJR2hyVjZkWUFiSW5FbWhZWi1LejJEdjlRNzZ3MXQ3Y0trQ28tb3I0UU1XM3dVUm5NdkRCYjZubVNkOS12M0xKZWN2dDF1dS1RMzNCb2kyYk9fdTNtSk5nRVBBalhMQ3MtQ3RCNnhBNnVxbU1HSTU2R1pYdHVwTXloVXcuOGc3M3ZHQVdDam1YYW0xeVYzbXhnUQ"}' + body: '{"value": "KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLkFMc0piLWlWcUk5Y01EcVRhS2w1d3g0UTd4dGtzZ3FTWjFfdVEtRGxuR19yaXZ4bGlWakFfbGlxQ3dhZ2lNaTQydkRGa29Jd2U3UnYwYmwzMXlzY1NpQmdkSmxvSzl4SjBJVWJQdjI0Y182amd4TmVVNWx0M2hKRTZ1R1JFQTZYSWpOeEJkazQ1a18yMTZ2a2hRbEt0X3g4dC1oZzk3ems2bkNpT0RTLWtWQmhIS2RST1RmRFZXUmJhVlcyQm9wTHBKM0E2cEpadEtPMjF1dHgwQWRkTVVSMXQyamdkZEs0eTJxWDJTX2hrY3ZUdnR5VGxiUXkxTmF2WnFodlptc0ZIY3ZZT0ZWdW83VTEtWWR1TUI4SmtuaFljanZkSU5lNmJSdzg0UWxQQzQwNzZXTk5TSlh0V2NNbkVMaWF0ZnFLT0RGQzY3TUVTVlA4TVNMWHZQOGIxZy5TTXhZMkRyaDlzckJCQldYNDJMVDBBLjY3S0pxd3FQekFPMVR6ZGNOTHpOY2ROQmNsVWc1SE5CSFRRYWNqNFJHN0RlWGRZMWJ1c05UMUdYUXFqTDNURzVqM0Y2TVVGYXh2R2drcjQ3czJ3cW1KVmRON2JEYlhyR2dobU9ENThmanBXbzA4ZHQ2ZHJWTC1yX0FDeV9CRGFERFFrb3Q5VHU2RW9FSjB0WjVsNFpPWUxaSmVFS0JfaUlCVWRfaW02MzkyeWtrZDIzT0dlNFRuZ2xNSzlJc25sMWMyN2JySl82aUR5R2hheEpiQTBHc0ZDM1I2Q3dlenRjdV9COUY2WE9WNlJTLWoyOW9vd29URUxpM3pwZXJaN0h0OGFlSnFzRHFkMzFLT2tlUDNEcEpVdnpEczJKNDRTNC1Qanl5dDV6UTk2LVFrLVhaZ3FSVndETWQ1VFAweHFQZXdTX3Y0dmlDRUxfbTBvTW5jY3lYTEhvMmVvMzdRUDUzU2Nodm1ocFVCTEpmYUl1dG11TC1XN0Fla0xJbjU0R0NfMzVWV2VHR1lQWnJtNERYbHp3d3huY1E5U3h0OVAtQXctTHJleHVFUWlOWGlrVXh6R2djYm9HVWJ2VFlzdnBGR2JWN21oN3B6SHQtc21Td0hoRkczczd2Z0xvc2tPbUNuQVJ6REwxcXR4dzRERmNONERQRk93YzMzUUdTb3Z6ZVByblVnTU1NRHlvT1NwS1ZwdlA2Wm9zdTdTTy1LUUV2MlJ4TE5ZaHJVZWtKdnlXMkRGbFhkV3VwaXZnbU1fcWFYM09ZVHZtbnlwNDNtcDFyNHFqSzNOTkZKNEJ3M0VCT2xHSV9UdHo5cjF6ancxenJXcTNWVTlkdzQyeXJQSk5na3REY1dzWGdoN1NNRWV5X213R21sNEJLRmtnTWpCVWYtV0kwWkdhVDVrT1QwZGVjRGxaUXpHcG1KTVI3N0p3ZUZsaDhTZDd1ZXVEU285ZkhCODFfeGIzUVhWb29iUXJfcUtMRmpMbFZSLThjd1BLeURCUEhtLTBrd1JyN3FGb3BmQjNfOG81UHFhSENvbHBRQ00wTlhhaXhaN2xBV1daRUxyTXI1RGxzMlE4cUh1UWo0dE91VzRFbW9xb3Vpb1ZYclZwMlBOMGV1ZmkzU1YtRUJhdXZfZ0Jzcy13YzZQSEZ4TFRaRGJyTDBpSDlsSE5YOTZLS1dQQjV5YktNM0x2cWdQMk0wOTlESS02TnN4V1B3U2tTdGFjQzJlUk04MmZQNENyS1Z2c1BqTkFTd256M3NqbXUzR0xBWDlKem56d1Vrem1mVC13SDVqM1FIMUs3T0lzeEdnWXQ0THlWSnZQQWFJenU5Mzd6bmpyQ2JNUmloM1ctMzNGZG5QdFdJa1FrN254VmtITHlfaTU2NS1FZHBZNW1sVTBIMnJCTjE4cEoyZUJscmpWcXFMT0VPMzFxQy12M0dJS1lTbkVhdTZGNjY4ZVE0dU91R1AwZUhqLWFzNm1pLUVZSXk4WVhKTlBxanB1OHEtZG5BdkdSRFFUaWs1bHZHQW9JMXBzcU94aENNdVp4amhNbHA2aXY5aTctMWxNUkpKVnpoY3BwRmdXLVpvX3I1Y1NDbmFsZkN2UzhvQklOdVdJdzNWMERIREw1ZGhUTTBfZ3JEazdheEpjVlZISFZMR0tMSi1hbTJBLUc1MjlxMGJ4UzJJUVVWV1lhcGNHZjdvVHc5TXluOFdJOTVhRVN1a0Y4XzluVFdqVmI2d1VQeXpIRWpUOHhGVTVuTW1HSDdLSnpIT2cxNDM4eV9lVjJPZTNqX3kxclN2Sm1FUFM4OWpHa3dNOXZGSWxGcDY2Xzc3Y2FUR201MmRoemo2d1dkbi1rVVBWS1dwZW00VHcxSTZ0eTdkWUYweUtRQTFRWmppMm00dlUyS1JSeXV4NFF6alVVUWtPQzJ2dW9ZMXdzbGFkNVdycjI1VDMtMkIyODdtaUVOSGdGNEt5eFhiLUFmZ0hiWU5SbWVwR2c4UktRX2dnbEQ5Qllib1ZfMWM2RkpjaUszemZDQzB4QVBMSU9ZYzZZQTE2QV9XWGJ1RWZVM3Vwclh1TjhWckFTeTlPV3Q2UnhDVjB4Wmc0R28xeFhxRDROaC1KZ1NibExCOEVkNG9MZ3hDRUtwWVdUbU91alFlQ2R3STVZZUxBTS1Sdm5zN09HN0JRN0JaTlpEOXBoeHZmcjZLM1oyVGRNMVBSRTI2YjEwSUZTMmJiY05tVERxcjRfOTd4RzF0cURqQWFTX1loMWgxczM3QWxpQ01RRS16TDY4MHA5ai1XeURnTW1IVWs3ZEpFcGo5RlBPdEthcXdmLTZlc0ZmazdCQkxvSGl3YUx1SDZqTmVRNXdpMjRNeUZ3NlJqTTlzTlpHQm9HRTk3RmFwdXg3T3ZYWHRQWjhxYkpmSUtJYzR6Q2NHdDRDakhQMWdqX2tERkJLeGZuNlItekRlS3hGX1NuSlJpWUNnRGJnVjlUMU9OcXhqLXA4LXNFdTRleWdIcVhHaDVGcXZ1dld4OTd2X0lkVF9HYUtTWUN5bGxDaFVwS1hWbWZnVUtnQVNZWkx1RnJrd3V5VGFmODloQVY4YmVXVkNZaUxORDd1bDRwZHlMajlnZ0ZFSTdaYVNXSFRsX29uZndDNUZmRGs5VGI4aHp3NVBWanNWNU9pU2QweENpSlotbGdvTnQwaFRsYUZ5UUYyWnBxU0FrRm9SSWVnYlNxTVlpSDRGcE1IZWY2eEZFblpxSUpxeG0yc2VycWhRTWZfVURBYVotZ05Ra09qalptcHg1Y0NRTXpvdUpKcnNrVzBDNHFpZ25CQTdlWmZCQ01TYkIzREtPbjJQNEQxTDdIUnZ3TnZUVXpDS3RYWGlnUWk4dWpvWUc1SUdQMVNVS2dRMTZqMEgtc1hTZGFBR0RiRDFvNk1ocjNZNzhQV0NEd0toWkpmNkpxaXNZYWNEUXZuYWg0LWdhbGd6dDY4dzBoWncybDNKRmFUNnJNMjBsdWR5eHluZW1ldXJISUE1c0Rfb1d3YmZmemcxaHlKbDRQVjVORmNLZlZ3THBJNU9PbEFXRW00VTRDbl9sR3lZak15cDFRSTVieEVwRjR4NUg2dXI2WW1vQks0Uk1kMDBHdUowMUZ0cEVENFJ1akFiNUhIVVhseEp3TkMwanNrYVpMVW5kcGdIYnZqMVV5YnhZc055VnFRUjVvWjFqSHFkT0ZLckc5dmxnN25EZHpFekJoeTdndWtuV0xmb3duRnhlZVZyaGVSOEhzZDE5SW1lTHI3a0FOWkhEVjh1czdsZHV2bkNjWlFYaGZxSnBtcUozZEgwblhuWWZCalpEZV92eHpoUkYwbGc1SFhZanhybVNpYXI5dHBWV1hVWmJnRVE0Zkp5bllES0JLOVdWZjBxMnBveVpGRzA0Q3ZYeUpIeTZCaktzNXRIRTRZLV9EbE12OUI4NXN5OXFBb2N2d2N1d0UzbGRXbzdoZnBCN2lkekthaTlqN0lNV1E4YWE4RURFclNnUXpnVFdDZW12VGZPUlVPVXRtWnJZZGt0TWNpYXZibVFvd0Uwb3RxZ3ZQM211NHJkMUFjdHA4eWFGNDVTUlhtQkZuS1pWTkdMM2Z0dFZuR25QbXdLNU1qOFB6NWs4c2RqZ1I4akhLSjUydEdkQzV1TWE2RjVLb3FROUVGNEJKMWNLemhkSE1kRkRieVhLazJyaDN2UVY3a1FiRHZmMjh2ZnNWUFNqWHJXWUpXZ0hIUXlFdVItUzJIRExuVUtPa3BGbkwtUWhjcW5iWE51VHZtOUxRbEFJeEdoRUo1M0gzUW44S1RjODViUWxLeU5aa2RtOWxhRTAyemExRXJzYnQwU1E2ZGhIR1hRblFHUS1HSzFJcE0wT3loLVdWYmZidzNwN19GeTVlRnZ3S3duNzhxQWZtM2N6alQ4NUlacWJxb3dmb1VvS25rUVVlNEdJWmQtZ29LS0d0WTlFZDRxb3BqV1hOM1dYVHlYRWdmOGVuUXhqblhLeEM4MDdqWWhaeE0zWmVDNE01d1hyMzJZRmRPc3Z5SmtLb2FTampER3liblNaOFdHVHR4Mk1HM0hHR0NHdW5xWG9vOFZHRjQzemVteVU5RGtZQ3pmZm9qU09tc2pERkUyTW1LWTNYd04wdmdGSkExY0pjWjVySE8taVROZ1Bsa2h3eXNkek1GdDFoVEdFaEY2aERWQ2taQ2NpSEktNEdfVEJFZmJ3eTZJV0tPeHpETTlRejlRNV9lWGlVbUR0M2hBdXZyMkdHZDJNWEI4R29PWGhJekNKbl9IalA1QzlMclh5VFQ0TEQxSVh1UWRpSXJqNWJUTVFKX0oxeFlRQW1EaG9QVXhCdGlGSVRxaWJOcGk2V0lzMWF3VlhWUWRwcWlaMjVfRG8yRjQ5QnU5UHRuX3Z3SHR4REdGUlMzQTF6QUtYUlBjTlpCWHl1a1JjWGVCb2lHR2I0OHNVOXhBMUtnZlNSTDRUS1NOV0JjTTJtLUNPN0VnMDM1QldQUGU3ZGhEWE5CWl82VzJRMzVKcWlYd3FqZTBPUmNUY0FmR0NSTC1NZHFvWVYtaHd3UnQtdEtwbEdDMElXS1d1Yk5ldm43NzRQbGpqV2ZJMFR4ZEkzNkFKa1YzdzN2WlVfUDAwQlEuY0Y5bXk4cXZWMjRVV2JKcGZJRDVCQQ"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '5379' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f60fbc.vault.azure.net/secrets/restore?api-version=7.0 response: body: - string: '{"id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/8968fbea165844c6ba86c8774431bfd2","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/778d727d3bae4014a6285fdaad85736f","attributes":{"enabled":true,"created":1564528490,"updated":1564528490,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '202' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '202' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:14:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f60fbc.vault.azure.net + - /secrets/restore + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_deleted_secrets.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_deleted_secrets.yaml index e8638c8abf32..dba0b9685274 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_deleted_secrets.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_deleted_secrets.yaml @@ -1,625 +1,386 @@ interactions: - request: - body: '{"value": "secval99e4122d"}' + body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - - '27' + - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/4176712f5ccc49e69605dba983a4f344","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:17 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:15:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 200 - message: OK + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/bebb1fbf2bf34988b8e02c8ee5f925ad","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/093a7c0702ba41e2920961edf29252e1","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/2c24f5bc003541cca1fea12d2bd5f82b","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/1b12330c84764ba9a010e7cc65d06ea3","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/398ba2a5091d435ca4b7ac05058b509b","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/1c47984da2fd45ca960731c2d62031ab","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/b76683bd312a4f129eb83d59901cae55","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/354aa036d79d4ec9aacc5a0c762e8e88","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/ac1f506c933b41c3a5732247e2334429","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/c591ae13276d4e84848e59c8bda9db05","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/e99017ab4bc14aa6a8aabd4482f4b784","attributes":{"enabled":true,"created":1560538519,"updated":1560538519,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/6eec08471fbc443daa555c8b44a4ed6f","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: - body: null + body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - - '0' + - '27' + Content-Type: + - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: DELETE + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1560538519,"scheduledPurgeDate":1568314519,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/e99017ab4bc14aa6a8aabd4482f4b784","attributes":{"enabled":true,"created":1560538519,"updated":1560538519,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '348' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:19 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/fa8f25489fac47afa288a741ab227858","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 - response: - body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - sec99e4122d"}}' - headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:19 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 - response: - body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - sec99e4122d"}}' - headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 - response: - body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - sec99e4122d"}}' - headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: DELETE + uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - sec99e4122d"}}' - headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:28 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1564528528,"scheduledPurgeDate":1572304528,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/fa8f25489fac47afa288a741ab227858","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '348' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 404 - message: Not Found + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 response: @@ -627,48 +388,38 @@ interactions: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: sec99e4122d"}}' headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /deletedsecrets/sec99e4122d + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 response: @@ -676,131 +427,105 @@ interactions: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: sec99e4122d"}}' headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /deletedsecrets/sec99e4122d + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1560538519,"scheduledPurgeDate":1568314519,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/e99017ab4bc14aa6a8aabd4482f4b784","attributes":{"enabled":true,"created":1560538519,"updated":1560538519,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '348' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:38 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1564528528,"scheduledPurgeDate":1572304528,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/fa8f25489fac47afa288a741ab227858","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '348' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:34 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /deletedsecrets/sec99e4122d + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault99e4122d.vault.azure.net/deletedsecrets?api-version=7.0 response: body: - string: '{"value":[{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1560538519,"scheduledPurgeDate":1568314519,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d","attributes":{"enabled":true,"created":1560538519,"updated":1560538519,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' - headers: - cache-control: - - no-cache - content-length: - - '343' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:38 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":[{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1564528528,"scheduledPurgeDate":1572304528,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + headers: + cache-control: no-cache + content-length: '343' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:34 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /deletedsecrets + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_versions.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_versions.yaml index 0891a7d98254..f21aa267f8e2 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_versions.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_versions.yaml @@ -1,414 +1,377 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:16:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/01a1c421f99d4e11bd1faf3385a638ca","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/d14f229e00a0466588945a17f72f9ef4","attributes":{"enabled":true,"created":1564528588,"updated":1564528588,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/6df9785175c94931bb8f9f7bf54a43bf","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/62bd3e1ae4c943b0834475dcf0593813","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/5aaaf0401ced49dbb6b5376220eb6bd4","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/548690f3d6e448a4afa1946ddd2ad9a3","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/bdf0770f231b4f13bc5f6dabfb907e9c","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/6e93babb4bf34f64a3096fe587c1a874","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/194031008cdc435abc85946271e16fb9","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/8ef101e684de4189ae32349d68c7563c","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/416f926b2a2c415da3756c2cf9110302","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/877971b0463b4d4f8f0b3dd1c8ee74ab","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/ab4bd70148bf4d1984aa143b95d7f738","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/581cbd091a3646daa866c6c54732fed3","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/versions?api-version=7.0 response: body: - string: '{"value":[{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/01a1c421f99d4e11bd1faf3385a638ca","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/194031008cdc435abc85946271e16fb9","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/416f926b2a2c415da3756c2cf9110302","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/5aaaf0401ced49dbb6b5376220eb6bd4","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/6df9785175c94931bb8f9f7bf54a43bf","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/ab4bd70148bf4d1984aa143b95d7f738","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/bdf0770f231b4f13bc5f6dabfb907e9c","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}],"nextLink":null}' + string: '{"value":[{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/548690f3d6e448a4afa1946ddd2ad9a3","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/581cbd091a3646daa866c6c54732fed3","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/62bd3e1ae4c943b0834475dcf0593813","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/6e93babb4bf34f64a3096fe587c1a874","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/877971b0463b4d4f8f0b3dd1c8ee74ab","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/8ef101e684de4189ae32349d68c7563c","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/d14f229e00a0466588945a17f72f9ef4","attributes":{"enabled":true,"created":1564528588,"updated":1564528588,"recoveryLevel":"Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '1427' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:45 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '1427' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77/versions + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_purge.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_purge.yaml index c68d8212f97b..2a5134de0b12 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_purge.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_purge.yaml @@ -1,1618 +1,1264 @@ interactions: - request: - body: '{"value": "value0"}' + body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - - '19' + - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret0?api-version=7.0 response: body: - string: '{"value":"value0","id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/c31d65f64d5b40fa805f9e3eb67bde05","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:17:06 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' +- request: + body: '{"value": "value0"}' + headers: + Accept: + - application/json + Content-Length: + - '19' + Content-Type: - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vaultb5580c06.vault.azure.net/secrets/secret0?api-version=7.0 + response: + body: + string: '{"value":"value0","id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/8966cffcb88e467687e8634e8837df4e","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:06 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' - request: body: '{"value": "value1"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret1?api-version=7.0 response: body: - string: '{"value":"value1","id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/0cc8e9fc0e1642f6a1041ff4ad2c013e","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value1","id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/01a16d10e4834f40a9f50ee36ec02781","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret1 + - api-version=7.0 + - '' - request: body: '{"value": "value2"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret2?api-version=7.0 response: body: - string: '{"value":"value2","id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/de7fc9fd9f4448f081cb23de8ed7da0d","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value2","id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/3fff9d5c111a42b1bd1815f56ed4c797","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret2 + - api-version=7.0 + - '' - request: body: '{"value": "value3"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret3?api-version=7.0 response: body: - string: '{"value":"value3","id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/47e941e1cdbd4a558231536fff8e05ab","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value3","id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/b4be0b4560154409a4ac6f740b272133","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret3 + - api-version=7.0 + - '' - request: body: '{"value": "value4"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret4?api-version=7.0 response: body: - string: '{"value":"value4","id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/333b17ecad69484f84a8dfd4b8d6b5f7","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value4","id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/eb62dde290ba42da9735cf34b575fcfd","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret4 + - api-version=7.0 + - '' - request: body: '{"value": "value5"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret5?api-version=7.0 response: body: - string: '{"value":"value5","id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/571e47d981d64ad0b5b35d692dd1fd29","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value5","id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/13d1a85f33f94d95afadf8cef91c3d17","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret5 + - api-version=7.0 + - '' - request: body: '{"value": "value6"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret6?api-version=7.0 response: body: - string: '{"value":"value6","id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/d2ff1a7f7fd14e989fdb7ebbac87d7ff","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value6","id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/b7804c43991a414ba965299128f66458","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/333b17ecad69484f84a8dfd4b8d6b5f7","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/8966cffcb88e467687e8634e8837df4e","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret3?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/47e941e1cdbd4a558231536fff8e05ab","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/01a16d10e4834f40a9f50ee36ec02781","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret5?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/571e47d981d64ad0b5b35d692dd1fd29","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/3fff9d5c111a42b1bd1815f56ed4c797","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret0?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/c31d65f64d5b40fa805f9e3eb67bde05","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/b4be0b4560154409a4ac6f740b272133","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:08 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret6?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/d2ff1a7f7fd14e989fdb7ebbac87d7ff","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/eb62dde290ba42da9735cf34b575fcfd","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:08 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret1?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/0cc8e9fc0e1642f6a1041ff4ad2c013e","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/13d1a85f33f94d95afadf8cef91c3d17","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:08 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret2?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/de7fc9fd9f4448f081cb23de8ed7da0d","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528629,"scheduledPurgeDate":1572304629,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/b7804c43991a414ba965299128f66458","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:08 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 - response: - body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret4"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret4"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:08 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret4"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret4"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/333b17ecad69484f84a8dfd4b8d6b5f7","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/8966cffcb88e467687e8634e8837df4e","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/47e941e1cdbd4a558231536fff8e05ab","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/01a16d10e4834f40a9f50ee36ec02781","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/571e47d981d64ad0b5b35d692dd1fd29","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/3fff9d5c111a42b1bd1815f56ed4c797","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/c31d65f64d5b40fa805f9e3eb67bde05","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/b4be0b4560154409a4ac6f740b272133","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/d2ff1a7f7fd14e989fdb7ebbac87d7ff","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/eb62dde290ba42da9735cf34b575fcfd","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/0cc8e9fc0e1642f6a1041ff4ad2c013e","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/13d1a85f33f94d95afadf8cef91c3d17","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/de7fc9fd9f4448f081cb23de8ed7da0d","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528629,"scheduledPurgeDate":1572304629,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/b7804c43991a414ba965299128f66458","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultb5580c06.vault.azure.net/deletedsecrets?api-version=7.0 response: body: - string: '{"value":[{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' - headers: - cache-control: - - no-cache - content-length: - - '2183' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":[{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528629,"scheduledPurgeDate":1572304629,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + headers: + cache-control: no-cache + content-length: '2183' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret1 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret2 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret3 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret4 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret5 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:38 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret6 + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_recover.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_recover.yaml index 57e1f8288b5f..aee5c8738d11 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_recover.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_recover.yaml @@ -1,2320 +1,1826 @@ interactions: - request: - body: '{"value": "value0"}' + body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - - '19' + - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret0?api-version=7.0 response: body: - string: '{"value":"value0","id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/fa36e67096af4f899772f9950aaa0f72","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' +- request: + body: '{"value": "value0"}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: + Accept: + - application/json + Content-Length: + - '19' + Content-Type: - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0?api-version=7.0 + response: + body: + string: '{"value":"value0","id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/d1f164c23b8d4dd99f17bb50e84c5d1f","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' - request: body: '{"value": "value1"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret1?api-version=7.0 response: body: - string: '{"value":"value1","id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/fbb5f0622390490dbb7848336086f4cc","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value1","id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/07653aa977ab498f8cae0d495ecda5f3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret1 + - api-version=7.0 + - '' - request: body: '{"value": "value2"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret2?api-version=7.0 response: body: - string: '{"value":"value2","id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/f3332fded0d54da6b5a61a96aab2a3d7","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value2","id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/9a46000095e543a6b265060a97979e76","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret2 + - api-version=7.0 + - '' - request: body: '{"value": "value3"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret3?api-version=7.0 response: body: - string: '{"value":"value3","id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/23599f329eb74f91b52de1268affa7a2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value3","id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/a9a6431ed3af4764a21358fe1670f659","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret3 + - api-version=7.0 + - '' - request: body: '{"value": "value4"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret4?api-version=7.0 response: body: - string: '{"value":"value4","id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/41dcbf735cd546e98fd732857184ee41","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value4","id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/5519e4d02b96446c920e66b494eef218","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret4 + - api-version=7.0 + - '' - request: body: '{"value": "value5"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret5?api-version=7.0 response: body: - string: '{"value":"value5","id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/aa198d7afe694c34acc709384cbe2d77","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value5","id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/1d21e63d093447d48133cf4350e1b5bc","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret5 + - api-version=7.0 + - '' - request: body: '{"value": "value6"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret6?api-version=7.0 response: body: - string: '{"value":"value6","id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/a8b0b304c73441f4a9c609f10edaf8c9","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value6","id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/04d8d9d3f519485683412facb79f3240","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/f3332fded0d54da6b5a61a96aab2a3d7","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/d1f164c23b8d4dd99f17bb50e84c5d1f","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret3?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/23599f329eb74f91b52de1268affa7a2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/07653aa977ab498f8cae0d495ecda5f3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret1?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/fbb5f0622390490dbb7848336086f4cc","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/9a46000095e543a6b265060a97979e76","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret0?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/fa36e67096af4f899772f9950aaa0f72","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/a9a6431ed3af4764a21358fe1670f659","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret5?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/aa198d7afe694c34acc709384cbe2d77","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/5519e4d02b96446c920e66b494eef218","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret6?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/a8b0b304c73441f4a9c609f10edaf8c9","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/1d21e63d093447d48133cf4350e1b5bc","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret4?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/41dcbf735cd546e98fd732857184ee41","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/04d8d9d3f519485683412facb79f3240","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:13 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 - response: - body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:05 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:13 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:09 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:16 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:12 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:20 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:15 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/f3332fded0d54da6b5a61a96aab2a3d7","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/d1f164c23b8d4dd99f17bb50e84c5d1f","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/23599f329eb74f91b52de1268affa7a2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/07653aa977ab498f8cae0d495ecda5f3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/fbb5f0622390490dbb7848336086f4cc","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/9a46000095e543a6b265060a97979e76","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/fa36e67096af4f899772f9950aaa0f72","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/a9a6431ed3af4764a21358fe1670f659","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/aa198d7afe694c34acc709384cbe2d77","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/5519e4d02b96446c920e66b494eef218","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/a8b0b304c73441f4a9c609f10edaf8c9","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/1d21e63d093447d48133cf4350e1b5bc","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/41dcbf735cd546e98fd732857184ee41","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/04d8d9d3f519485683412facb79f3240","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultce560cd9.vault.azure.net/deletedsecrets?api-version=7.0 response: body: - string: '{"value":[{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' - headers: - cache-control: - - no-cache - content-length: - - '2183' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":[{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + headers: + cache-control: no-cache + content-length: '2183' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/f3332fded0d54da6b5a61a96aab2a3d7","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/d1f164c23b8d4dd99f17bb50e84c5d1f","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/23599f329eb74f91b52de1268affa7a2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/07653aa977ab498f8cae0d495ecda5f3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret1/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/fbb5f0622390490dbb7848336086f4cc","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/9a46000095e543a6b265060a97979e76","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret2/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/fa36e67096af4f899772f9950aaa0f72","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/a9a6431ed3af4764a21358fe1670f659","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret3/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/aa198d7afe694c34acc709384cbe2d77","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/5519e4d02b96446c920e66b494eef218","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret4/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/a8b0b304c73441f4a9c609f10edaf8c9","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/1d21e63d093447d48133cf4350e1b5bc","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret5/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/41dcbf735cd546e98fd732857184ee41","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/04d8d9d3f519485683412facb79f3240","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret6/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '73' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret0"}}' + headers: + cache-control: no-cache + content-length: '73' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '73' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:26 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret0"}}' + headers: + cache-control: no-cache + content-length: '73' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:33 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '73' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret0"}}' + headers: + cache-control: no-cache + content-length: '73' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:36 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '73' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret0"}}' + headers: + cache-control: no-cache + content-length: '73' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:39 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '73' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret0"}}' + headers: + cache-control: no-cache + content-length: '73' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"value":"value2","id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/f3332fded0d54da6b5a61a96aab2a3d7","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value0","id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/d1f164c23b8d4dd99f17bb50e84c5d1f","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret3/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret1/?api-version=7.0 response: body: - string: '{"value":"value3","id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/23599f329eb74f91b52de1268affa7a2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value1","id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/07653aa977ab498f8cae0d495ecda5f3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret1/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret1/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 response: body: - string: '{"value":"value1","id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/fbb5f0622390490dbb7848336086f4cc","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value2","id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/9a46000095e543a6b265060a97979e76","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret2/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret3/?api-version=7.0 response: body: - string: '{"value":"value0","id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/fa36e67096af4f899772f9950aaa0f72","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value3","id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/a9a6431ed3af4764a21358fe1670f659","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret3/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret5/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret4/?api-version=7.0 response: body: - string: '{"value":"value5","id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/aa198d7afe694c34acc709384cbe2d77","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value4","id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/5519e4d02b96446c920e66b494eef218","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret4/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret6/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret5/?api-version=7.0 response: body: - string: '{"value":"value6","id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/a8b0b304c73441f4a9c609f10edaf8c9","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value5","id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/1d21e63d093447d48133cf4350e1b5bc","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret5/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret4/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret6/?api-version=7.0 response: body: - string: '{"value":"value4","id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/41dcbf735cd546e98fd732857184ee41","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value6","id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/04d8d9d3f519485683412facb79f3240","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret6/ + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_crud_operations.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_crud_operations.yaml index 5267d8020874..5d9a0991c11a 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_crud_operations.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_crud_operations.yaml @@ -1,359 +1,330 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:19:38 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret + - api-version=7.0 + - '' - request: body: '{"value": "crud_secret_valuec01d1319"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '38' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret?api-version=7.0 response: body: - string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/177427fb4ac34d35be6430082742ca9d","attributes":{"enabled":true,"created":1560296924,"updated":1560296924,"recoveryLevel":"Purgeable"}}' + string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/eeecb8113ad344299d57e9d44eb3694c","attributes":{"enabled":true,"created":1564528779,"updated":1564528779,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '235' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:44 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '235' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:38 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret + - api-version=7.0 + - '' - request: - body: '{"value": "crud_secret_valuec01d1319", "attributes": {"enabled": true, - "nbf": 1422864000}, "tags": {"foo": "created tag"}}' + body: '{"value": "crud_secret_valuec01d1319", "tags": {"foo": "created tag"}, + "attributes": {"enabled": true, "nbf": 1422864000}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '122' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret?api-version=7.0 response: body: - string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd","attributes":{"enabled":true,"nbf":1422864000,"created":1560296924,"updated":1560296924,"recoveryLevel":"Purgeable"},"tags":{"foo":"created + string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27","attributes":{"enabled":true,"nbf":1422864000,"created":1564528779,"updated":1564528779,"recoveryLevel":"Purgeable"},"tags":{"foo":"created tag"}}' headers: - cache-control: - - no-cache - content-length: - - '281' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:44 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '281' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:38 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/?api-version=7.0 response: body: - string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd","attributes":{"enabled":true,"nbf":1422864000,"created":1560296924,"updated":1560296924,"recoveryLevel":"Purgeable"},"tags":{"foo":"created + string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27","attributes":{"enabled":true,"nbf":1422864000,"created":1564528779,"updated":1564528779,"recoveryLevel":"Purgeable"},"tags":{"foo":"created tag"}}' headers: - cache-control: - - no-cache - content-length: - - '281' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:44 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '281' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:38 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd?api-version=7.0 + uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27?api-version=7.0 response: body: - string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd","attributes":{"enabled":true,"nbf":1422864000,"created":1560296924,"updated":1560296924,"recoveryLevel":"Purgeable"},"tags":{"foo":"created + string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27","attributes":{"enabled":true,"nbf":1422864000,"created":1564528779,"updated":1564528779,"recoveryLevel":"Purgeable"},"tags":{"foo":"created tag"}}' headers: - cache-control: - - no-cache - content-length: - - '281' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:44 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '281' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:39 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret/f75b715b3c51403198b5cbd26287da27 + - api-version=7.0 + - '' - request: - body: '{"attributes": {"exp": 2527401600, "enabled": false}, "contentType": "text/plain", + body: '{"contentType": "text/plain", "attributes": {"enabled": false, "exp": 2527401600}, "tags": {"foo": "updated tag"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '114' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PATCH - uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd?api-version=7.0 + uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27?api-version=7.0 response: body: - string: '{"contentType":"text/plain","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd","attributes":{"enabled":false,"nbf":1422864000,"exp":2527401600,"created":1560296924,"updated":1560296926,"recoveryLevel":"Purgeable"},"tags":{"foo":"updated + string: '{"contentType":"text/plain","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27","attributes":{"enabled":false,"nbf":1422864000,"exp":2527401600,"created":1564528779,"updated":1564528780,"recoveryLevel":"Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '290' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:45 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '290' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:40 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret/f75b715b3c51403198b5cbd26287da27 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret?api-version=7.0 response: body: - string: '{"contentType":"text/plain","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd","attributes":{"enabled":false,"nbf":1422864000,"exp":2527401600,"created":1560296924,"updated":1560296926,"recoveryLevel":"Purgeable"},"tags":{"foo":"updated + string: '{"contentType":"text/plain","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27","attributes":{"enabled":false,"nbf":1422864000,"exp":2527401600,"created":1564528779,"updated":1564528780,"recoveryLevel":"Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '290' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:45 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '290' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:40 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Secret not found: crud-secret"}}' headers: - cache-control: - - no-cache - content-length: - - '77' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:46 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '77' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:40 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret/ + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_list.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_list.yaml index 35c4ed11f967..96d5382039a5 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_list.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_list.yaml @@ -1,414 +1,377 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault5b50e84.vault.azure.net/secrets/sec0?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec0 + - api-version=7.0 + - '' - request: body: '{"value": "secVal05b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec0?api-version=7.0 response: body: - string: '{"value":"secVal05b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec0/bfaad709fbaa4d57ae07facbff500795","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal05b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec0/7f3cb1f832414f19a13156842b138e4f","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec0 + - api-version=7.0 + - '' - request: body: '{"value": "secVal15b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec1?api-version=7.0 response: body: - string: '{"value":"secVal15b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec1/392da3f3b4b44b71aefb2e9ffdba9321","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal15b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec1/b11f6d6c11ec4c84b08b9b759540bf96","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec1 + - api-version=7.0 + - '' - request: body: '{"value": "secVal25b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec2?api-version=7.0 response: body: - string: '{"value":"secVal25b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec2/59fa973224914f6fb53d37c20f2e87e6","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal25b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec2/f50f507c68ff48e593f32de9f03de503","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec2 + - api-version=7.0 + - '' - request: body: '{"value": "secVal35b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec3?api-version=7.0 response: body: - string: '{"value":"secVal35b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec3/050564bf189641819bc88c0d70d31ee6","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal35b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec3/699ddadf328143de8c19b32677a5b3ac","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec3 + - api-version=7.0 + - '' - request: body: '{"value": "secVal45b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec4?api-version=7.0 response: body: - string: '{"value":"secVal45b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec4/aae71679bf754b668f14bcd9bd9fe2f9","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal45b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec4/b57c587071b4448a89ecac767c62435f","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec4 + - api-version=7.0 + - '' - request: body: '{"value": "secVal55b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec5?api-version=7.0 response: body: - string: '{"value":"secVal55b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec5/48cf92ab65f340f6a98002ebf0ca4dcd","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal55b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec5/ea4090f7b0294803b170516bc009cc16","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec5 + - api-version=7.0 + - '' - request: body: '{"value": "secVal65b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec6?api-version=7.0 response: body: - string: '{"value":"secVal65b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec6/53fcee1dc3ac4805940914670cc50199","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal65b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec6/2eb7ddee8282440fb1cf9d0b37517c41","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault5b50e84.vault.azure.net/secrets?api-version=7.0 response: body: - string: '{"value":[{"id":"https://vault5b50e84.vault.azure.net/secrets/sec0","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec1","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec2","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec3","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec4","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec5","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec6","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}}],"nextLink":null}' + string: '{"value":[{"id":"https://vault5b50e84.vault.azure.net/secrets/sec0","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec1","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec2","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec3","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec4","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec5","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec6","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '1140' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '1140' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/secrets_async_preparer.py b/sdk/keyvault/azure-keyvault-secrets/tests/secrets_async_preparer.py index 6472b3d3308d..da13fcdc54c8 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/secrets_async_preparer.py +++ b/sdk/keyvault/azure-keyvault-secrets/tests/secrets_async_preparer.py @@ -6,17 +6,31 @@ from unittest.mock import Mock from azure.core.credentials import AccessToken +from azure.core.pipeline.transport import AioHttpTransport from azure.identity.aio import EnvironmentCredential +from multidict import CIMultiDict, CIMultiDictProxy + from secrets_preparer import VaultClientPreparer from secrets_vault_client_async import VaultClient +class AiohttpTestTransport(AioHttpTransport): + """Workaround to vcrpy bug: https://github.com/kevin1024/vcrpy/pull/461 + """ + async def send(self, request, **config): + response = await super(AiohttpTestTransport, self).send(request, **config) + if not isinstance(response.headers, CIMultiDictProxy): + response.headers = CIMultiDictProxy(CIMultiDict(response.internal_response.headers)) + response.content_type = response.headers.get("content-type") + return response + + class AsyncVaultClientPreparer(VaultClientPreparer): def create_vault_client(self, vault_uri): if self.is_live: credential = EnvironmentCredential() else: credential = Mock(get_token=asyncio.coroutine(lambda _: AccessToken("fake-token", 0))) - return VaultClient(vault_uri, credential) + return VaultClient(vault_uri, credential, transport=AiohttpTestTransport()) From 0438bd379f59e7be13dfff9cdce8a11d6f61c916 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 31 Jul 2019 01:19:55 -0700 Subject: [PATCH 089/244] [AutoPR hanaonazure/resource-manager] Removing monitoring hana instance API (#6535) * Generated from 70b51057c4cca0cdb6a743b4e02f39c132121570 Removing monitoring hana instance API * Generated from a6757c439ed37f69147b6a7b50a20f1ca69789be Removing monitoring hana instance API * Packaging update of azure-mgmt-hanaonazure * Updated Release History --- .../azure-mgmt-hanaonazure/HISTORY.rst | 12 +++ .../azure-mgmt-hanaonazure/README.rst | 2 +- .../azure/mgmt/hanaonazure/models/_models.py | 10 +++ .../mgmt/hanaonazure/models/_models_py3.py | 12 ++- .../operations/_hana_instances_operations.py | 89 ------------------- .../azure/mgmt/hanaonazure/version.py | 2 +- .../azure-mgmt-hanaonazure/setup.py | 1 - 7 files changed, 35 insertions(+), 93 deletions(-) diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/HISTORY.rst b/sdk/hanaonazure/azure-mgmt-hanaonazure/HISTORY.rst index b99767ae2a90..cdda9582b52b 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/HISTORY.rst +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/HISTORY.rst @@ -3,6 +3,18 @@ Release History =============== +0.9.0 (2019-07-31) +++++++++++++++++++ + +**Features** + +- Model SapMonitor has a new parameter hana_db_credentials_msi_id +- Model SapMonitor has a new parameter hana_db_password_key_vault_url + +**Breaking changes** + +- Removed operation HanaInstancesOperations.enable_monitoring + 0.8.0 (2019-06-26) ++++++++++++++++++ diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/README.rst b/sdk/hanaonazure/azure-mgmt-hanaonazure/README.rst index 3751f89d5670..1c9ad134cc31 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/README.rst +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure SAP Hana on Azure Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models.py index d9c93b5d62d8..2643e4c67737 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models.py @@ -489,6 +489,12 @@ class SapMonitor(Resource): :type hana_db_username: str :param hana_db_password: Database password of the HANA instance. :type hana_db_password: str + :param hana_db_password_key_vault_url: KeyVault URL link to the password + for the HANA database. + :type hana_db_password_key_vault_url: str + :param hana_db_credentials_msi_id: MSI ID passed by customer which has + access to customer's KeyVault and to be assigned to the Collector VM. + :type hana_db_credentials_msi_id: str :ivar provisioning_state: State of provisioning of the HanaInstance. Possible values include: 'Accepted', 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', 'Migrating' @@ -516,6 +522,8 @@ class SapMonitor(Resource): 'hana_db_sql_port': {'key': 'properties.hanaDbSqlPort', 'type': 'int'}, 'hana_db_username': {'key': 'properties.hanaDbUsername', 'type': 'str'}, 'hana_db_password': {'key': 'properties.hanaDbPassword', 'type': 'str'}, + 'hana_db_password_key_vault_url': {'key': 'properties.hanaDbPasswordKeyVaultUrl', 'type': 'str'}, + 'hana_db_credentials_msi_id': {'key': 'properties.hanaDbCredentialsMsiId', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } @@ -527,6 +535,8 @@ def __init__(self, **kwargs): self.hana_db_sql_port = kwargs.get('hana_db_sql_port', None) self.hana_db_username = kwargs.get('hana_db_username', None) self.hana_db_password = kwargs.get('hana_db_password', None) + self.hana_db_password_key_vault_url = kwargs.get('hana_db_password_key_vault_url', None) + self.hana_db_credentials_msi_id = kwargs.get('hana_db_credentials_msi_id', None) self.provisioning_state = None diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models_py3.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models_py3.py index dece72c8661c..9f6950525157 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models_py3.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models_py3.py @@ -489,6 +489,12 @@ class SapMonitor(Resource): :type hana_db_username: str :param hana_db_password: Database password of the HANA instance. :type hana_db_password: str + :param hana_db_password_key_vault_url: KeyVault URL link to the password + for the HANA database. + :type hana_db_password_key_vault_url: str + :param hana_db_credentials_msi_id: MSI ID passed by customer which has + access to customer's KeyVault and to be assigned to the Collector VM. + :type hana_db_credentials_msi_id: str :ivar provisioning_state: State of provisioning of the HanaInstance. Possible values include: 'Accepted', 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', 'Migrating' @@ -516,10 +522,12 @@ class SapMonitor(Resource): 'hana_db_sql_port': {'key': 'properties.hanaDbSqlPort', 'type': 'int'}, 'hana_db_username': {'key': 'properties.hanaDbUsername', 'type': 'str'}, 'hana_db_password': {'key': 'properties.hanaDbPassword', 'type': 'str'}, + 'hana_db_password_key_vault_url': {'key': 'properties.hanaDbPasswordKeyVaultUrl', 'type': 'str'}, + 'hana_db_credentials_msi_id': {'key': 'properties.hanaDbCredentialsMsiId', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, *, location: str=None, hana_subnet: str=None, hana_hostname: str=None, hana_db_name: str=None, hana_db_sql_port: int=None, hana_db_username: str=None, hana_db_password: str=None, **kwargs) -> None: + def __init__(self, *, location: str=None, hana_subnet: str=None, hana_hostname: str=None, hana_db_name: str=None, hana_db_sql_port: int=None, hana_db_username: str=None, hana_db_password: str=None, hana_db_password_key_vault_url: str=None, hana_db_credentials_msi_id: str=None, **kwargs) -> None: super(SapMonitor, self).__init__(location=location, **kwargs) self.hana_subnet = hana_subnet self.hana_hostname = hana_hostname @@ -527,6 +535,8 @@ def __init__(self, *, location: str=None, hana_subnet: str=None, hana_hostname: self.hana_db_sql_port = hana_db_sql_port self.hana_db_username = hana_db_username self.hana_db_password = hana_db_password + self.hana_db_password_key_vault_url = hana_db_password_key_vault_url + self.hana_db_credentials_msi_id = hana_db_credentials_msi_id self.provisioning_state = None diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_hana_instances_operations.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_hana_instances_operations.py index b4932fa45b64..2165693784cd 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_hana_instances_operations.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_hana_instances_operations.py @@ -11,7 +11,6 @@ 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 @@ -737,91 +736,3 @@ def get_long_running_output(response): else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) shutdown.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}/shutdown'} - - - def _enable_monitoring_initial( - self, resource_group_name, hana_instance_name, monitoring_parameter, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.enable_monitoring.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'), - 'hanaInstanceName': self._serialize.url("hana_instance_name", hana_instance_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['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_parameter, 'MonitoringDetails') - - # 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def enable_monitoring( - self, resource_group_name, hana_instance_name, monitoring_parameter, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to add a monitor to an SAP HANA instance. - - :param resource_group_name: Name of the resource group. - :type resource_group_name: str - :param hana_instance_name: Name of the SAP HANA on Azure instance. - :type hana_instance_name: str - :param monitoring_parameter: Request body that only contains - monitoring attributes - :type monitoring_parameter: - ~azure.mgmt.hanaonazure.models.MonitoringDetails - :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._enable_monitoring_initial( - resource_group_name=resource_group_name, - hana_instance_name=hana_instance_name, - monitoring_parameter=monitoring_parameter, - 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) - enable_monitoring.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}/monitoring'} diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py index e4f3d5055303..3697d9b71739 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.8.0" +VERSION = "0.9.0" diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/setup.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/setup.py index d88dbac05eaf..57c68ff652aa 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/setup.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/setup.py @@ -64,7 +64,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', From 43c9b448201e9d8db82377950c8f7b0bd050f150 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 10:27:22 -0700 Subject: [PATCH 090/244] KV moved paging return type to ItemPaged (#6558) * KV with latest autorest * Make KV return ItemPaged from azure-core --- .../azure/keyvault/keys/_client.py | 25 +++++-- .../azure/keyvault/keys/_shared/__init__.py | 4 +- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_generated/v2016_10_01/models/_models.py | 8 --- .../v2016_10_01/models/_models_py3.py | 8 --- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_shared/_generated/v7_0/models/_models.py | 8 --- .../_generated/v7_0/models/_models_py3.py | 8 --- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../keys/_shared/async_client_base.py | 19 ----- .../azure/keyvault/keys/aio/_client.py | 30 +++++--- .../azure/keyvault/secrets/_client.py | 25 +++++-- .../keyvault/secrets/_shared/__init__.py | 4 +- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_generated/v2016_10_01/models/_models.py | 8 --- .../v2016_10_01/models/_models_py3.py | 8 --- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_shared/_generated/v7_0/models/_models.py | 8 --- .../_generated/v7_0/models/_models_py3.py | 8 --- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../secrets/_shared/async_client_base.py | 19 ----- .../azure/keyvault/secrets/aio/_client.py | 30 +++++--- 24 files changed, 498 insertions(+), 242 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py index ee0e81d07f73..b591ffdcaf0f 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py @@ -353,8 +353,12 @@ def list_deleted_keys(self, **kwargs): :dedent: 8 """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_deleted_keys(self._vault_url, maxresults=max_page_size, **kwargs) - return (DeletedKey._from_deleted_key_item(item) for item in pages) + return self._client.get_deleted_keys( + self._vault_url, + maxresults=max_page_size, + cls=lambda objs: [DeletedKey._from_deleted_key_item(x) for x in objs], + **kwargs + ) @distributed_trace def list_keys(self, **kwargs): @@ -381,8 +385,12 @@ def list_keys(self, **kwargs): :dedent: 8 """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_keys(self._vault_url, maxresults=max_page_size, **kwargs) - return (KeyBase._from_key_item(item) for item in pages) + return self._client.get_keys( + self._vault_url, + maxresults=max_page_size, + cls=lambda objs: [KeyBase._from_key_item(x) for x in objs], + **kwargs + ) @distributed_trace def list_key_versions(self, name, **kwargs): @@ -407,8 +415,13 @@ def list_key_versions(self, name, **kwargs): :dedent: 8 """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_key_versions(self._vault_url, name, maxresults=max_page_size, **kwargs) - return (KeyBase._from_key_item(item) for item in pages) + return self._client.get_key_versions( + self._vault_url, + name, + maxresults=max_page_size, + cls=lambda objs: [KeyBase._from_key_item(x) for x in objs], + **kwargs + ) @distributed_trace def purge_deleted_key(self, name, **kwargs): diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py index beb24c202495..72fb27441900 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py @@ -49,8 +49,8 @@ def parse_vault_id(url): try: from .async_challenge_auth_policy import AsyncChallengeAuthPolicy - from .async_client_base import AsyncKeyVaultClientBase, AsyncPagingAdapter + from .async_client_base import AsyncKeyVaultClientBase - __all__.extend(["AsyncChallengeAuthPolicy", "AsyncKeyVaultClientBase", "AsyncPagingAdapter"]) + __all__.extend(["AsyncChallengeAuthPolicy", "AsyncKeyVaultClientBase"]) except (SyntaxError, ImportError): pass diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py index e918a167f2dd..d1b025916b46 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py @@ -692,14 +692,6 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py index 07d530b486f6..94ec3b96083e 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py @@ -692,14 +692,6 @@ def __init__(self, *, certificate_policy=None, certificate_attributes=None, tags self.tags = tags -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py index 24dfe4beb6a9..8b8ed5a83d62 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py @@ -753,14 +753,6 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py index 52f4aa981815..59e6f039d4b6 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py @@ -753,14 +753,6 @@ def __init__(self, *, certificate_policy=None, certificate_attributes=None, tags self.tags = tags -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py index 51f916d2938f..28bccc61f053 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py @@ -9,7 +9,7 @@ from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.keyvault.keys._models import Key, DeletedKey, KeyBase, KeyOperationResult -from azure.keyvault.keys._shared import AsyncKeyVaultClientBase, AsyncPagingAdapter +from azure.keyvault.keys._shared import AsyncKeyVaultClientBase class KeyClient(AsyncKeyVaultClientBase): @@ -354,9 +354,12 @@ def list_keys(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[KeyBase]: :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_keys(self.vault_url, maxresults=max_results, **kwargs) - iterable = AsyncPagingAdapter(pages, KeyBase._from_key_item) - return iterable + return self._client.get_keys( + self.vault_url, + maxresults=max_results, + cls=lambda objs: [KeyBase._from_key_item(x) for x in objs], + **kwargs + ) @distributed_trace def list_key_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncIterable[KeyBase]: @@ -380,9 +383,13 @@ def list_key_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncIter :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_key_versions(self.vault_url, name, maxresults=max_results, **kwargs) - iterable = AsyncPagingAdapter(pages, KeyBase._from_key_item) - return iterable + return self._client.get_key_versions( + self.vault_url, + name, + maxresults=max_results, + cls=lambda objs: [KeyBase._from_key_item(x) for x in objs], + **kwargs + ) @distributed_trace_async async def backup_key(self, name: str, **kwargs: Mapping[str, Any]) -> bytes: @@ -538,9 +545,12 @@ def list_deleted_keys(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[Delete :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_deleted_keys(self.vault_url, maxresults=max_results, **kwargs) - iterable = AsyncPagingAdapter(pages, DeletedKey._from_deleted_key_item) - return iterable + return self._client.get_deleted_keys( + self.vault_url, + maxresults=max_results, + cls=lambda objs: [DeletedKey._from_deleted_key_item(x) for x in objs], + **kwargs + ) @distributed_trace_async async def purge_deleted_key(self, name: str, **kwargs: Mapping[str, Any]) -> None: diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py index 1f0a670bf217..40678aabf7d4 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py @@ -179,8 +179,12 @@ def list_secrets(self, **kwargs): """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_secrets(self._vault_url, maxresults=max_page_size, **kwargs) - return (SecretAttributes._from_secret_item(item) for item in pages) + return self._client.get_secrets( + self._vault_url, + maxresults=max_page_size, + cls=lambda objs: [DeletedSecret._from_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace def list_secret_versions(self, name, **kwargs): @@ -206,8 +210,13 @@ def list_secret_versions(self, name, **kwargs): """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_secret_versions(self._vault_url, name, maxresults=max_page_size, **kwargs) - return (SecretAttributes._from_secret_item(item) for item in pages) + return self._client.get_secret_versions( + self._vault_url, + name, + maxresults=max_page_size, + cls=lambda objs: [DeletedSecret._from_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace def backup_secret(self, name, **kwargs): @@ -336,8 +345,12 @@ def list_deleted_secrets(self, **kwargs): """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_deleted_secrets(self._vault_url, maxresults=max_page_size, **kwargs) - return (DeletedSecret._from_deleted_secret_item(item) for item in pages) + return self._client.get_deleted_secrets( + self._vault_url, + maxresults=max_page_size, + cls=lambda objs: [DeletedSecret._from_deleted_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace def purge_deleted_secret(self, name, **kwargs): diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/__init__.py index beb24c202495..72fb27441900 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/__init__.py @@ -49,8 +49,8 @@ def parse_vault_id(url): try: from .async_challenge_auth_policy import AsyncChallengeAuthPolicy - from .async_client_base import AsyncKeyVaultClientBase, AsyncPagingAdapter + from .async_client_base import AsyncKeyVaultClientBase - __all__.extend(["AsyncChallengeAuthPolicy", "AsyncKeyVaultClientBase", "AsyncPagingAdapter"]) + __all__.extend(["AsyncChallengeAuthPolicy", "AsyncKeyVaultClientBase"]) except (SyntaxError, ImportError): pass diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py index e918a167f2dd..d1b025916b46 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py @@ -692,14 +692,6 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py index 07d530b486f6..94ec3b96083e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py @@ -692,14 +692,6 @@ def __init__(self, *, certificate_policy=None, certificate_attributes=None, tags self.tags = tags -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py index 24dfe4beb6a9..8b8ed5a83d62 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py @@ -753,14 +753,6 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py index 52f4aa981815..59e6f039d4b6 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py @@ -753,14 +753,6 @@ def __init__(self, *, certificate_policy=None, certificate_attributes=None, tags self.tags = tags -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py index 89a0fa98836e..9a4a92375ad9 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py @@ -10,7 +10,7 @@ from azure.core.tracing.decorator_async import distributed_trace_async from azure.keyvault.secrets._models import Secret, DeletedSecret, SecretAttributes -from .._shared import AsyncKeyVaultClientBase, AsyncPagingAdapter +from .._shared import AsyncKeyVaultClientBase class SecretClient(AsyncKeyVaultClientBase): @@ -182,9 +182,12 @@ def list_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[SecretAttri :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_secrets(self.vault_url, maxresults=max_results) - iterable = AsyncPagingAdapter(pages, SecretAttributes._from_secret_item) - return iterable + return self._client.get_secrets( + self.vault_url, + maxresults=max_results, + cls=lambda objs: [SecretAttributes._from_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace def list_secret_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncIterable[SecretAttributes]: @@ -208,9 +211,13 @@ def list_secret_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncI :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_secret_versions(self.vault_url, name, maxresults=max_results) - iterable = AsyncPagingAdapter(pages, SecretAttributes._from_secret_item) - return iterable + return self._client.get_secret_versions( + self.vault_url, + name, + maxresults=max_results, + cls=lambda objs: [SecretAttributes._from_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace_async async def backup_secret(self, name: str, **kwargs: Mapping[str, Any]) -> bytes: @@ -335,9 +342,12 @@ def list_deleted_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[Del :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_deleted_secrets(self.vault_url, maxresults=max_results, **kwargs) - iterable = AsyncPagingAdapter(pages, DeletedSecret._from_deleted_secret_item) - return iterable + return self._client.get_deleted_secrets( + self.vault_url, + maxresults=max_results, + cls=lambda objs: [DeletedSecret._from_deleted_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace_async async def purge_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> None: From f4cfff2286bd00a363be999609d4c6f7fae56fc0 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 10:33:30 -0700 Subject: [PATCH 091/244] azure-core history 1.0.0b2 (#6562) * azure-core history * Update HISTORY.md --- sdk/core/azure-core/HISTORY.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/sdk/core/azure-core/HISTORY.md b/sdk/core/azure-core/HISTORY.md index b54129f9c2e0..2123f6308b80 100644 --- a/sdk/core/azure-core/HISTORY.md +++ b/sdk/core/azure-core/HISTORY.md @@ -3,6 +3,27 @@ ------------------- +2019-08-XX Version 1.0.0b2 + +## Breaking changes + +- Transport classes don't take `config` parameter anymore (use kwargs instead) #6372 +- `azure.core.paging` has been completely refactored #6420 +- HttpResponse.content_type attribute is now a string (was a list) #6490 +- For `StreamDownloadGenerator` subclasses, `response` is now an `HttpResponse`, and not a transport response like `aiohttp.ClientResponse` or `requests.Response`. The transport response is available in `internal_response` attribute #6490 + +## Bug fixes + +- aiohttp is not required to import async pipelines classes #6496 +- `AsyncioRequestsTransport.sleep` is now a coroutine as expected #6490 +- `RequestsTransport` is not tight to `ProxyPolicy` implementation details anymore #6372 +- `AiohttpTransport` does not raise on unexpected kwargs #6355 + +## Features + +- New paging base classes that support `continuation_token` and `by_page()` #6420 +- Proxy support for `AiohttpTransport` #6372 + 2019-06-26 Version 1.0.0b1 - Preview 1 release From 6649ad76351f5e6915b2710343375dd2a1d4a44c Mon Sep 17 00:00:00 2001 From: Bryan Van de Ven Date: Wed, 31 Jul 2019 11:28:59 -0700 Subject: [PATCH 092/244] Make private Cosmos modules private [WIP] (#6329) * make consistent_hash_ring private * make default_retry_policy private * make endpoint_discovery_retry_policy private * make hash_partition_resolver private * make location_cache private * make murmur_hash private * make range private * make range_partition_resolver private * make vector_session_token private * make resource_throttle_retry_policy private * make retry_utility private * make utils private * make routing private * make execution_context private * make cosmos_client_connection private * make retry_options private * make query_iterable private * make constants private * make synchronized_request private * make session_retry_policy private * make partition private * make global_endpoint_manager private * make runtime_constants private * make session private * make request_object private * make base private --- .../azure/cosmos/{base.py => _base.py} | 8 +- ..._hash_ring.py => _consistent_hash_ring.py} | 8 +- .../cosmos/{constants.py => _constants.py} | 0 ...ection.py => _cosmos_client_connection.py} | 48 ++++++------ ...try_policy.py => _default_retry_policy.py} | 4 +- ...py => _endpoint_discovery_retry_policy.py} | 6 +- .../__init__.py | 0 .../aggregators.py | 2 +- .../base_execution_context.py | 14 ++-- .../document_producer.py | 8 +- .../endpoint_component.py | 2 +- .../execution_dispatcher.py | 10 +-- .../multi_execution_aggregator.py | 8 +- .../query_execution_info.py | 0 ...manager.py => _global_endpoint_manager.py} | 4 +- ...esolver.py => _hash_partition_resolver.py} | 8 +- .../{location_cache.py => _location_cache.py} | 1 - .../{murmur_hash.py => _murmur_hash.py} | 2 +- .../cosmos/{partition.py => _partition.py} | 2 +- .../{query_iterable.py => _query_iterable.py} | 4 +- .../azure/cosmos/{range.py => _range.py} | 0 ...solver.py => _range_partition_resolver.py} | 0 .../{request_object.py => _request_object.py} | 2 +- ....py => _resource_throttle_retry_policy.py} | 2 +- .../{retry_options.py => _retry_options.py} | 0 .../{retry_utility.py => _retry_utility.py} | 24 +++--- .../cosmos/{routing => _routing}/__init__.py | 0 .../collection_routing_map.py | 34 ++++---- .../routing_map_provider.py | 42 +++++----- .../{routing => _routing}/routing_range.py | 12 +-- ...ime_constants.py => _runtime_constants.py} | 0 .../azure/cosmos/{session.py => _session.py} | 12 +-- ...try_policy.py => _session_retry_policy.py} | 0 ...ed_request.py => _synchronized_request.py} | 4 +- .../azure/cosmos/{utils.py => _utils.py} | 10 +-- ...sion_token.py => _vector_session_token.py} | 1 - .../azure-cosmos/azure/cosmos/container.py | 14 ++-- .../azure/cosmos/cosmos_client.py | 8 +- .../azure-cosmos/azure/cosmos/database.py | 12 +-- .../azure-cosmos/azure/cosmos/documents.py | 4 +- .../azure-cosmos/azure/cosmos/scripts.py | 16 ++-- sdk/cosmos/azure-cosmos/azure/cosmos/user.py | 6 +- .../MultiMasterOperations/ConflictWorker.py | 1 - .../MultiMasterScenario.py | 2 +- .../azure-cosmos/test/base_unit_tests.py | 2 +- sdk/cosmos/azure-cosmos/test/crud_tests.py | 52 ++++++------- .../azure-cosmos/test/globaldb_mock_tests.py | 18 ++--- .../azure-cosmos/test/globaldb_tests.py | 18 ++--- .../azure-cosmos/test/location_cache_tests.py | 24 +++--- .../azure-cosmos/test/multimaster_tests.py | 10 +-- sdk/cosmos/azure-cosmos/test/orderby_tests.py | 4 +- sdk/cosmos/azure-cosmos/test/proxy_tests.py | 2 +- .../test/query_execution_context_tests.py | 4 +- .../azure-cosmos/test/retry_policy_tests.py | 46 +++++------ .../routing/collection_routing_map_test.py | 34 ++++---- .../routing/routing_map_provider_tests.py | 78 +++++++++---------- .../azure-cosmos/test/routing_map_tests.py | 8 +- sdk/cosmos/azure-cosmos/test/session_tests.py | 16 ++-- .../test/session_token_unit_tests.py | 2 +- .../test/streaming_failover_test.py | 24 +++--- sdk/cosmos/azure-cosmos/test/utils_tests.py | 4 +- 61 files changed, 344 insertions(+), 347 deletions(-) rename sdk/cosmos/azure-cosmos/azure/cosmos/{base.py => _base.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{consistent_hash_ring.py => _consistent_hash_ring.py} (96%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{constants.py => _constants.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{cosmos_client_connection.py => _cosmos_client_connection.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{default_retry_policy.py => _default_retry_policy.py} (96%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{endpoint_discovery_retry_policy.py => _endpoint_discovery_retry_policy.py} (94%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/__init__.py (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/aggregators.py (97%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/base_execution_context.py (94%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/document_producer.py (97%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/endpoint_component.py (97%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/execution_dispatcher.py (94%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/multi_execution_aggregator.py (95%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/query_execution_info.py (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{global_endpoint_manager.py => _global_endpoint_manager.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{hash_partition_resolver.py => _hash_partition_resolver.py} (95%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{location_cache.py => _location_cache.py} (99%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{murmur_hash.py => _murmur_hash.py} (99%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{partition.py => _partition.py} (99%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{query_iterable.py => _query_iterable.py} (97%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{range.py => _range.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{range_partition_resolver.py => _range_partition_resolver.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{request_object.py => _request_object.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{resource_throttle_retry_policy.py => _resource_throttle_retry_policy.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{retry_options.py => _retry_options.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{retry_utility.py => _retry_utility.py} (83%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{routing => _routing}/__init__.py (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{routing => _routing}/collection_routing_map.py (79%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{routing => _routing}/routing_map_provider.py (80%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{routing => _routing}/routing_range.py (89%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{runtime_constants.py => _runtime_constants.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{session.py => _session.py} (95%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{session_retry_policy.py => _session_retry_policy.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{synchronized_request.py => _synchronized_request.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{utils.py => _utils.py} (86%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{vector_session_token.py => _vector_session_token.py} (99%) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/base.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_base.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/base.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_base.py index 5fa2839f0b0d..6e4bf3e10888 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/base.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_base.py @@ -33,8 +33,8 @@ from . import documents from . import partition_key from . import http_constants -from . import constants -from . import runtime_constants +from . import _constants as constants +from . import _runtime_constants import six from six.moves.urllib.parse import quote as urllib_quote @@ -178,10 +178,10 @@ def GetHeaders(cosmos_client_connection, if verb == 'post' or verb == 'put': if not headers.get(http_constants.HttpHeaders.ContentType): - headers[http_constants.HttpHeaders.ContentType] = runtime_constants.MediaTypes.Json + headers[http_constants.HttpHeaders.ContentType] = _runtime_constants.MediaTypes.Json if not headers.get(http_constants.HttpHeaders.Accept): - headers[http_constants.HttpHeaders.Accept] = runtime_constants.MediaTypes.Json + headers[http_constants.HttpHeaders.Accept] = _runtime_constants.MediaTypes.Json if partition_key_range_id is not None: headers[http_constants.HttpHeaders.PartitionKeyRangeID] = partition_key_range_id diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/consistent_hash_ring.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_consistent_hash_ring.py similarity index 96% rename from sdk/cosmos/azure-cosmos/azure/cosmos/consistent_hash_ring.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_consistent_hash_ring.py index 6b6bdd086b62..93198b3f1d72 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/consistent_hash_ring.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_consistent_hash_ring.py @@ -26,10 +26,10 @@ import six from six.moves import xrange -from . import partition +from . import _partition -class _ConsistentHashRing(object): +class ConsistentHashRing(object): """The ConsistentHashRing class implements a consistent hash ring using the hash generator specified. """ @@ -79,13 +79,13 @@ def _ConstructPartitions(self, collection_links, partitions_per_node): using the hashing algorithm and then finally sorting the partitions based on the hash value. """ collections_node_count = len(collection_links) - partitions = [partition._Partition() for _ in xrange(0, partitions_per_node * collections_node_count)] + partitions = [_partition.Partition() for _ in xrange(0, partitions_per_node * collections_node_count)] index = 0 for collection_node in collection_links: hash_value = self.hash_generator.ComputeHash(self._GetBytes(collection_node)) for _ in xrange(0, partitions_per_node): - partitions[index] = partition._Partition(hash_value, collection_node) + partitions[index] = _partition.Partition(hash_value, collection_node) index += 1 hash_value = self.hash_generator.ComputeHash(hash_value) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/constants.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_constants.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/constants.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_constants.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client_connection.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_client_connection.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client_connection.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_client_connection.py index f7b2fe1cca57..6f9fe50a1c86 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client_connection.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_client_connection.py @@ -25,18 +25,18 @@ import six from typing import cast -from . import base +from . import _base as base from . import documents -from . import constants +from . import _constants as constants from . import http_constants -from . import query_iterable -from . import runtime_constants -from . import request_object -from . import synchronized_request -from . import global_endpoint_manager -from .routing import routing_map_provider as routing_map_provider -from . import session -from . import utils +from . import _query_iterable as query_iterable +from . import _runtime_constants as runtime_constants +from . import _request_object +from . import _synchronized_request as synchronized_request +from . import _global_endpoint_manager as global_endpoint_manager +from ._routing import routing_map_provider as routing_map_provider +from . import _session +from . import _utils from .partition_key import _Undefined, _Empty @@ -110,7 +110,7 @@ def __init__(self, http_constants.HttpHeaders.Version: http_constants.Versions.CurrentVersion, http_constants.HttpHeaders.UserAgent: - utils._get_user_agent(), + _utils.get_user_agent(), # For single partition query with aggregate functions we would try to accumulate the results on the SDK. # We need to set continuation as not expected. http_constants.HttpHeaders.IsContinuationExpected: False @@ -127,7 +127,7 @@ def __init__(self, '''create a session - this is maintained only if the default consistency level on the client is set to session, or if the user explicitly sets it as a property via setter''' - self.session = session.Session(self.url_connection) + self.session = _session.Session(self.url_connection) else: self.session = None @@ -150,7 +150,7 @@ def __init__(self, self._query_compatibility_mode = CosmosClientConnection._QueryCompatibilityMode.Default # Routing map provider - self._routing_map_provider = routing_map_provider._SmartRoutingMapProvider(self) + self._routing_map_provider = routing_map_provider.SmartRoutingMapProvider(self) database_account = self._global_endpoint_manager._GetDatabaseAccount() self._global_endpoint_manager.force_refresh(database_account) @@ -1932,7 +1932,7 @@ def ReadMedia(self, media_link): {}) # ReadMedia will always use WriteEndpoint since it's not replicated in readable Geo regions - request = request_object._RequestObject('media', documents._OperationType.Read) + request = _request_object.RequestObject('media', documents._OperationType.Read) result, self.last_response_headers = self.__Get(path, request, headers) @@ -1981,7 +1981,7 @@ def UpdateMedia(self, media_link, readable_stream, options=None): options) # UpdateMedia will use WriteEndpoint since it uses PUT operation - request = request_object._RequestObject('media', documents._OperationType.Update) + request = _request_object.RequestObject('media', documents._OperationType.Update) result, self.last_response_headers = self.__Put(path, request, readable_stream, @@ -2200,7 +2200,7 @@ def ExecuteStoredProcedure(self, sproc_link, params, options=None): options) # ExecuteStoredProcedure will use WriteEndpoint since it uses POST operation - request = request_object._RequestObject('sprocs', documents._OperationType.ExecuteJavaScript) + request = _request_object.RequestObject('sprocs', documents._OperationType.ExecuteJavaScript) result, self.last_response_headers = self.__Post(path, request, params, @@ -2389,7 +2389,7 @@ def GetDatabaseAccount(self, url_connection=None): '', # type {}) - request = request_object._RequestObject('databaseaccount', documents._OperationType.Read, url_connection) + request = _request_object.RequestObject('databaseaccount', documents._OperationType.Read, url_connection) result, self.last_response_headers = self.__Get('', request, headers) @@ -2449,7 +2449,7 @@ def Create(self, body, path, type, id, initial_headers, options=None): options) # Create will use WriteEndpoint since it uses POST operation - request = request_object._RequestObject(type, documents._OperationType.Create) + request = _request_object.RequestObject(type, documents._OperationType.Create) result, self.last_response_headers = self.__Post(path, request, body, @@ -2491,7 +2491,7 @@ def Upsert(self, body, path, type, id, initial_headers, options=None): headers[http_constants.HttpHeaders.IsUpsert] = True # Upsert will use WriteEndpoint since it uses POST operation - request = request_object._RequestObject(type, documents._OperationType.Upsert) + request = _request_object.RequestObject(type, documents._OperationType.Upsert) result, self.last_response_headers = self.__Post(path, request, body, @@ -2529,7 +2529,7 @@ def Replace(self, resource, path, type, id, initial_headers, options=None): type, options) # Replace will use WriteEndpoint since it uses PUT operation - request = request_object._RequestObject(type, documents._OperationType.Replace) + request = _request_object.RequestObject(type, documents._OperationType.Replace) result, self.last_response_headers = self.__Put(path, request, resource, @@ -2567,7 +2567,7 @@ def Read(self, path, type, id, initial_headers, options=None): type, options) # Read will use ReadEndpoint since it uses GET operation - request = request_object._RequestObject(type, documents._OperationType.Read) + request = _request_object.RequestObject(type, documents._OperationType.Read) result, self.last_response_headers = self.__Get(path, request, headers) @@ -2601,7 +2601,7 @@ def DeleteResource(self, path, type, id, initial_headers, options=None): type, options) # Delete will use WriteEndpoint since it uses DELETE operation - request = request_object._RequestObject(type, documents._OperationType.Delete) + request = _request_object.RequestObject(type, documents._OperationType.Delete) result, self.last_response_headers = self.__Delete(path, request, headers) @@ -2783,7 +2783,7 @@ def __GetBodiesFromQueryResult(result): # Copy to make sure that default_headers won't be changed. if query is None: # Query operations will use ReadEndpoint even though it uses GET(for feed requests) - request = request_object._RequestObject(type, documents._OperationType.ReadFeed) + request = _request_object.RequestObject(type, documents._OperationType.ReadFeed) headers = base.GetHeaders(self, initial_headers, 'get', @@ -2811,7 +2811,7 @@ def __GetBodiesFromQueryResult(result): raise SystemError('Unexpected query compatibility mode.') # Query operations will use ReadEndpoint even though it uses POST(for regular query operations) - request = request_object._RequestObject(type, documents._OperationType.SqlQuery) + request = _request_object.RequestObject(type, documents._OperationType.SqlQuery) headers = base.GetHeaders(self, initial_headers, 'post', diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/default_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_default_retry_policy.py similarity index 96% rename from sdk/cosmos/azure-cosmos/azure/cosmos/default_retry_policy.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_default_retry_policy.py index 1fc309c98302..8cb094c1552a 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/default_retry_policy.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_default_retry_policy.py @@ -23,7 +23,7 @@ """ from . import http_constants -class _DefaultRetryPolicy(object): +class DefaultRetryPolicy(object): error_codes = http_constants._ErrorCodes CONNECTION_ERROR_CODES = [ @@ -52,7 +52,7 @@ def __init__(self, *args): self.args = args def needsRetry(self, error_code): - if error_code in _DefaultRetryPolicy.CONNECTION_ERROR_CODES: + if error_code in DefaultRetryPolicy.CONNECTION_ERROR_CODES: if (len(self.args) > 0): if (self.args[4]['method'] == 'GET') or (http_constants.HttpHeaders.IsQuery in self.args[4]['headers']): return True diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/endpoint_discovery_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_endpoint_discovery_retry_policy.py similarity index 94% rename from sdk/cosmos/azure-cosmos/azure/cosmos/endpoint_discovery_retry_policy.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_endpoint_discovery_retry_policy.py index dbc1e41f845f..d3158cd20035 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/endpoint_discovery_retry_policy.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_endpoint_discovery_retry_policy.py @@ -33,7 +33,7 @@ logger.addHandler(log_handler) -class _EndpointDiscoveryRetryPolicy(object): +class EndpointDiscoveryRetryPolicy(object): """The endpoint discovery retry policy class used for geo-replicated database accounts to handle the write forbidden exceptions due to writable/readable location changes (say, after a failover). @@ -44,9 +44,9 @@ class _EndpointDiscoveryRetryPolicy(object): def __init__(self, connection_policy, global_endpoint_manager, *args): self.global_endpoint_manager = global_endpoint_manager - self._max_retry_attempt_count = _EndpointDiscoveryRetryPolicy.Max_retry_attempt_count + self._max_retry_attempt_count = EndpointDiscoveryRetryPolicy.Max_retry_attempt_count self.failover_retry_count = 0 - self.retry_after_in_milliseconds = _EndpointDiscoveryRetryPolicy.Retry_after_in_milliseconds + self.retry_after_in_milliseconds = EndpointDiscoveryRetryPolicy.Retry_after_in_milliseconds self.connection_policy = connection_policy self.request = args[0] if args else None #clear previous location-based routing directive diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/__init__.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/__init__.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/__init__.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/__init__.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/aggregators.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aggregators.py similarity index 97% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/aggregators.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aggregators.py index 402acb514fbc..2a3ed76bce64 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/aggregators.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aggregators.py @@ -22,7 +22,7 @@ """Internal class for aggregation queries implementation in the Azure Cosmos database service. """ from abc import abstractmethod, ABCMeta -from azure.cosmos.execution_context.document_producer import _OrderByHelper +from azure.cosmos._execution_context.document_producer import _OrderByHelper class _Aggregator(object): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/base_execution_context.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/base_execution_context.py similarity index 94% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/base_execution_context.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/base_execution_context.py index 42bd23269da2..e32fb2e95b28 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/base_execution_context.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/base_execution_context.py @@ -23,9 +23,9 @@ """ from collections import deque -from .. import retry_utility +from .. import _retry_utility from .. import http_constants -from .. import base +from .. import _base class _QueryExecutionContextBase(object): """ @@ -140,7 +140,7 @@ def _fetch_items_helper_with_retries(self, fetch_function): def callback(): return self._fetch_items_helper_no_retries(fetch_function) - return retry_utility._Execute(self._client, self._client._global_endpoint_manager, callback) + return _retry_utility.Execute(self._client, self._client._global_endpoint_manager, callback) class _DefaultQueryExecutionContext(_QueryExecutionContextBase): @@ -208,8 +208,8 @@ def __init__(self, client, options, database_link, query, partition_key): raise ValueError("_collection_links_length is not greater than 0.") # Creating the QueryFeed for the first collection - path = base.GetPathFromLink(self._collection_links[self._current_collection_index], 'docs') - collection_id = base.GetResourceIdOrFullNameFromLink(self._collection_links[self._current_collection_index]) + path = _base.GetPathFromLink(self._collection_links[self._current_collection_index], 'docs') + collection_id = _base.GetResourceIdOrFullNameFromLink(self._collection_links[self._current_collection_index]) self._current_collection_index += 1 @@ -241,8 +241,8 @@ def _fetch_next_block(self): # creating separate feed queries for each collection and fetching the items while not fetched_items: if self._collection_links and self._current_collection_index < self._collection_links_length: - path = base.GetPathFromLink(self._collection_links[self._current_collection_index], 'docs') - collection_id = base.GetResourceIdOrFullNameFromLink(self._collection_links[self._current_collection_index]) + path = _base.GetPathFromLink(self._collection_links[self._current_collection_index], 'docs') + collection_id = _base.GetResourceIdOrFullNameFromLink(self._collection_links[self._current_collection_index]) self._continuation = None self._has_started = False diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/document_producer.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/document_producer.py similarity index 97% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/document_producer.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/document_producer.py index c74a60e3bade..f6f7db7e911e 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/document_producer.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/document_producer.py @@ -25,8 +25,8 @@ import six import numbers from collections import deque -from azure.cosmos import base -from azure.cosmos.execution_context.base_execution_context import _DefaultQueryExecutionContext +from azure.cosmos import _base +from azure.cosmos._execution_context.base_execution_context import _DefaultQueryExecutionContext from six.moves import xrange class _DocumentProducer(object): @@ -51,8 +51,8 @@ def __init__(self, partition_key_target_range, client, collection_link, query, d self._cur_item = None # initiate execution context - path = base.GetPathFromLink(collection_link, 'docs') - collection_id = base.GetResourceIdOrFullNameFromLink(collection_link) + path = _base.GetPathFromLink(collection_link, 'docs') + collection_id = _base.GetResourceIdOrFullNameFromLink(collection_link) def fetch_fn(options): return self._client.QueryFeed(path, collection_id, diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/endpoint_component.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/endpoint_component.py similarity index 97% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/endpoint_component.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/endpoint_component.py index 868a55464639..77dda8512b00 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/endpoint_component.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/endpoint_component.py @@ -23,7 +23,7 @@ """ import numbers -from azure.cosmos.execution_context.aggregators import _AverageAggregator, _CountAggregator, _MaxAggregator, \ +from azure.cosmos._execution_context.aggregators import _AverageAggregator, _CountAggregator, _MaxAggregator, \ _MinAggregator, _SumAggregator diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/execution_dispatcher.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/execution_dispatcher.py similarity index 94% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/execution_dispatcher.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/execution_dispatcher.py index 6f7740af4f43..acc7452da9ab 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/execution_dispatcher.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/execution_dispatcher.py @@ -25,11 +25,11 @@ import json from six.moves import xrange from azure.cosmos.errors import HTTPFailure -from azure.cosmos.execution_context.base_execution_context import _QueryExecutionContextBase -from azure.cosmos.execution_context.base_execution_context import _DefaultQueryExecutionContext -from azure.cosmos.execution_context.query_execution_info import _PartitionedQueryExecutionInfo -from azure.cosmos.execution_context import endpoint_component -from azure.cosmos.execution_context import multi_execution_aggregator +from azure.cosmos._execution_context.base_execution_context import _QueryExecutionContextBase +from azure.cosmos._execution_context.base_execution_context import _DefaultQueryExecutionContext +from azure.cosmos._execution_context.query_execution_info import _PartitionedQueryExecutionInfo +from azure.cosmos._execution_context import endpoint_component +from azure.cosmos._execution_context import multi_execution_aggregator from azure.cosmos.http_constants import StatusCodes, SubStatusCodes class _ProxyQueryExecutionContext(_QueryExecutionContextBase): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/multi_execution_aggregator.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/multi_execution_aggregator.py similarity index 95% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/multi_execution_aggregator.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/multi_execution_aggregator.py index 63a2dfb3b706..f0bfb8887fd1 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/multi_execution_aggregator.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/multi_execution_aggregator.py @@ -23,9 +23,9 @@ """ import heapq -from azure.cosmos.execution_context.base_execution_context import _QueryExecutionContextBase -from azure.cosmos.execution_context import document_producer -from azure.cosmos.routing import routing_range +from azure.cosmos._execution_context.base_execution_context import _QueryExecutionContextBase +from azure.cosmos._execution_context import document_producer +from azure.cosmos._routing import routing_range class _MultiExecutionContextAggregator(_QueryExecutionContextBase): """This class is capable of queries which requires rewriting based on @@ -147,4 +147,4 @@ def _createTargetPartitionQueryExecutionContext(self, partition_key_target_range def _get_target_parition_key_range(self): query_ranges = self._partitioned_query_ex_info.get_query_ranges() - return self._routing_provider.get_overlapping_ranges(self._resource_link, [routing_range._Range.ParseFromDict(range_as_dict) for range_as_dict in query_ranges]) + return self._routing_provider.get_overlapping_ranges(self._resource_link, [routing_range.Range.ParseFromDict(range_as_dict) for range_as_dict in query_ranges]) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/query_execution_info.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/query_execution_info.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/query_execution_info.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/query_execution_info.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/global_endpoint_manager.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_global_endpoint_manager.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/global_endpoint_manager.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_global_endpoint_manager.py index 0d7ff3936b76..0c44a81a138a 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/global_endpoint_manager.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_global_endpoint_manager.py @@ -24,9 +24,9 @@ from six.moves.urllib.parse import urlparse import threading -from . import constants +from . import _constants as constants from . import errors -from .location_cache import LocationCache +from ._location_cache import LocationCache class _GlobalEndpointManager(object): """ diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/hash_partition_resolver.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_hash_partition_resolver.py similarity index 95% rename from sdk/cosmos/azure-cosmos/azure/cosmos/hash_partition_resolver.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_hash_partition_resolver.py index 8b15926ec680..fca0cfe85d6f 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/hash_partition_resolver.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_hash_partition_resolver.py @@ -22,8 +22,8 @@ """Hash partition resolver implementation in the Azure Cosmos database service. """ -from . import murmur_hash -from . import consistent_hash_ring +from . import _murmur_hash +from . import _consistent_hash_ring class HashPartitionResolver(object): """HashPartitionResolver implements partitioning based on the value of a hash function, allowing you to evenly @@ -51,9 +51,9 @@ def __init__(self, partition_key_extractor, collection_links, default_number_of_ self.collection_links = collection_links if hash_generator is None: - hash_generator = murmur_hash._MurmurHash() + hash_generator = _murmur_hash.MurmurHash() - self.consistent_hash_ring = consistent_hash_ring._ConsistentHashRing(self.collection_links, default_number_of_virtual_nodes_per_collection, hash_generator) + self.consistent_hash_ring = _consistent_hash_ring.ConsistentHashRing(self.collection_links, default_number_of_virtual_nodes_per_collection, hash_generator) def ResolveForCreate(self, document): """Resolves the collection for creating the document based on the partition key. diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/location_cache.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_location_cache.py similarity index 99% rename from sdk/cosmos/azure-cosmos/azure/cosmos/location_cache.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_location_cache.py index 1534cef4f9ea..68f7cdb23a24 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/location_cache.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_location_cache.py @@ -25,7 +25,6 @@ import collections import time -from . import base from . import documents from . import http_constants diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/murmur_hash.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_murmur_hash.py similarity index 99% rename from sdk/cosmos/azure-cosmos/azure/cosmos/murmur_hash.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_murmur_hash.py index d94b5f39044b..0785b75096e6 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/murmur_hash.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_murmur_hash.py @@ -43,7 +43,7 @@ https://pypi.python.org/pypi/mmh3/2.0 ''' -class _MurmurHash(object): +class MurmurHash(object): """ The 32 bit x86 version of MurmurHash3 implementation. """ def ComputeHash(self, key): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/partition.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_partition.py similarity index 99% rename from sdk/cosmos/azure-cosmos/azure/cosmos/partition.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_partition.py index ffd931965bca..35f1611a21bc 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/partition.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_partition.py @@ -24,7 +24,7 @@ from six.moves import xrange -class _Partition(object): +class Partition(object): """Represents a class that holds the hash value and node name for each partition. """ def __init__(self, hash_value = None, node = None): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/query_iterable.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_query_iterable.py similarity index 97% rename from sdk/cosmos/azure-cosmos/azure/cosmos/query_iterable.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_query_iterable.py index ad2e8cd98d96..8abd73b4f8c1 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/query_iterable.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_query_iterable.py @@ -21,8 +21,8 @@ """Iterable query results in the Azure Cosmos database service. """ -from azure.cosmos.execution_context import execution_dispatcher -from azure.cosmos.execution_context import base_execution_context +from azure.cosmos._execution_context import execution_dispatcher +from azure.cosmos._execution_context import base_execution_context class QueryIterable(object): """Represents an iterable object of the query results. diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/range.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_range.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/range.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_range.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/range_partition_resolver.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_range_partition_resolver.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/range_partition_resolver.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_range_partition_resolver.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/request_object.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_request_object.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/request_object.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_request_object.py index db9ef786765f..fa882a0a0c54 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/request_object.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_request_object.py @@ -21,7 +21,7 @@ """Represents a request object. """ -class _RequestObject(object): +class RequestObject(object): def __init__(self, resource_type, operation_type, endpoint_override = None): self.resource_type = resource_type self.operation_type = operation_type diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/resource_throttle_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_resource_throttle_retry_policy.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/resource_throttle_retry_policy.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_resource_throttle_retry_policy.py index f3179a1902ef..57d32fd2b8e7 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/resource_throttle_retry_policy.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_resource_throttle_retry_policy.py @@ -24,7 +24,7 @@ from . import http_constants -class _ResourceThrottleRetryPolicy(object): +class ResourceThrottleRetryPolicy(object): def __init__(self, max_retry_attempt_count, fixed_retry_interval_in_milliseconds, max_wait_time_in_seconds): self._max_retry_attempt_count = max_retry_attempt_count diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/retry_options.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_retry_options.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/retry_options.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_retry_options.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/retry_utility.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_retry_utility.py similarity index 83% rename from sdk/cosmos/azure-cosmos/azure/cosmos/retry_utility.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_retry_utility.py index 1daa9a1f8c26..95f611fe4f2d 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/retry_utility.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_retry_utility.py @@ -25,13 +25,13 @@ import time from . import errors -from . import endpoint_discovery_retry_policy -from . import resource_throttle_retry_policy -from . import default_retry_policy -from . import session_retry_policy +from . import _endpoint_discovery_retry_policy +from . import _resource_throttle_retry_policy +from . import _default_retry_policy +from . import _session_retry_policy from .http_constants import HttpHeaders, StatusCodes, SubStatusCodes -def _Execute(client, global_endpoint_manager, function, *args, **kwargs): +def Execute(client, global_endpoint_manager, function, *args, **kwargs): """Exectutes the function with passed parameters applying all retry policies :param object client: @@ -45,20 +45,20 @@ def _Execute(client, global_endpoint_manager, function, *args, **kwargs): """ # instantiate all retry policies here to be applied for each request execution - endpointDiscovery_retry_policy = endpoint_discovery_retry_policy._EndpointDiscoveryRetryPolicy(client.connection_policy, global_endpoint_manager, *args) + endpointDiscovery_retry_policy = _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy(client.connection_policy, global_endpoint_manager, *args) - resourceThrottle_retry_policy = resource_throttle_retry_policy._ResourceThrottleRetryPolicy(client.connection_policy.RetryOptions.MaxRetryAttemptCount, + resourceThrottle_retry_policy = _resource_throttle_retry_policy.ResourceThrottleRetryPolicy(client.connection_policy.RetryOptions.MaxRetryAttemptCount, client.connection_policy.RetryOptions.FixedRetryIntervalInMilliseconds, client.connection_policy.RetryOptions.MaxWaitTimeInSeconds) - defaultRetry_policy = default_retry_policy._DefaultRetryPolicy(*args) + defaultRetry_policy = _default_retry_policy.DefaultRetryPolicy(*args) - sessionRetry_policy = session_retry_policy._SessionRetryPolicy(client.connection_policy.EnableEndpointDiscovery, global_endpoint_manager, *args) + sessionRetry_policy = _session_retry_policy._SessionRetryPolicy(client.connection_policy.EnableEndpointDiscovery, global_endpoint_manager, *args) while True: try: if args: - result = _ExecuteFunction(function, global_endpoint_manager, *args, **kwargs) + result = ExecuteFunction(function, global_endpoint_manager, *args, **kwargs) else: - result = _ExecuteFunction(function, *args, **kwargs) + result = ExecuteFunction(function, *args, **kwargs) if not client.last_response_headers: client.last_response_headers = {} @@ -94,7 +94,7 @@ def _Execute(client, global_endpoint_manager, function, *args, **kwargs): # Wait for retry_after_in_milliseconds time before the next retry time.sleep(retry_policy.retry_after_in_milliseconds / 1000.0) -def _ExecuteFunction(function, *args, **kwargs): +def ExecuteFunction(function, *args, **kwargs): """ Stub method so that it can be used for mocking purposes as well. """ return function(*args, **kwargs) \ No newline at end of file diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/__init__.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/__init__.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/routing/__init__.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_routing/__init__.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/collection_routing_map.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/collection_routing_map.py similarity index 79% rename from sdk/cosmos/azure-cosmos/azure/cosmos/routing/collection_routing_map.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_routing/collection_routing_map.py index bb030c3fc223..d1f86eb05b89 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/collection_routing_map.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/collection_routing_map.py @@ -23,11 +23,11 @@ """ import bisect -from azure.cosmos.routing import routing_range -from azure.cosmos.routing.routing_range import _PartitionKeyRange +from azure.cosmos._routing import routing_range +from azure.cosmos._routing.routing_range import PartitionKeyRange from six.moves import xrange -class _CollectionRoutingMap(object): +class CollectionRoutingMap(object): """Stores partition key ranges in an efficient way with some additional information and provides convenience methods for working with set of ranges. """ @@ -40,7 +40,7 @@ def __init__(self, range_by_id, range_by_info, ordered_partition_key_ranges, ord self._rangeByInfo = range_by_info self._orderedPartitionKeyRanges = ordered_partition_key_ranges - self._orderedRanges = [routing_range._Range(pkr[_PartitionKeyRange.MinInclusive], pkr[_PartitionKeyRange.MaxExclusive], True, False) for pkr in ordered_partition_key_ranges] + self._orderedRanges = [routing_range.Range(pkr[PartitionKeyRange.MinInclusive], pkr[PartitionKeyRange.MaxExclusive], True, False) for pkr in ordered_partition_key_ranges] self._orderedPartitionInfo = ordered_partition_info self._collectionUniqueId = collection_unique_id @@ -51,15 +51,15 @@ def CompleteRoutingMap(cls, partition_key_range_info_tupple_list, collection_uni sortedRanges = [] for r in partition_key_range_info_tupple_list: - rangeById[r[0][_PartitionKeyRange.Id]] = r + rangeById[r[0][PartitionKeyRange.Id]] = r rangeByInfo[r[1]] = r[0] sortedRanges.append(r) - sortedRanges.sort(key = lambda r: r[0][_PartitionKeyRange.MinInclusive]) + sortedRanges.sort(key = lambda r: r[0][PartitionKeyRange.MinInclusive]) partitionKeyOrderedRange = [r[0] for r in sortedRanges] orderedPartitionInfo = [r[1] for r in sortedRanges] - if not _CollectionRoutingMap.is_complete_set_of_range(partitionKeyOrderedRange): return None + if not CollectionRoutingMap.is_complete_set_of_range(partitionKeyOrderedRange): return None return cls(rangeById, rangeByInfo, partitionKeyOrderedRange, orderedPartitionInfo, collection_unique_id) def get_ordered_partition_key_ranges(self): @@ -80,10 +80,10 @@ def get_range_by_effective_partition_key(self, effective_partition_key_value): The partition key range. :rtype: dict """ - if _CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey == effective_partition_key_value: + if CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey == effective_partition_key_value: return self._orderedPartitionKeyRanges[0] - if _CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey == effective_partition_key_value: + if CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey == effective_partition_key_value: return None sortedLow = [(r.min, not r.isMinInclusive) for r in self._orderedRanges] @@ -118,7 +118,7 @@ def get_overlapping_ranges(self, provided_partition_key_ranges): :rtype: list """ - if isinstance(provided_partition_key_ranges, routing_range._Range): + if isinstance(provided_partition_key_ranges, routing_range.Range): return self.get_overlapping_ranges([provided_partition_key_ranges]) minToPartitionRange = {} @@ -135,14 +135,14 @@ def get_overlapping_ranges(self, provided_partition_key_ranges): maxIndex = maxIndex - 1 for i in xrange(minIndex, maxIndex + 1): - if routing_range._Range.overlaps(self._orderedRanges[i], providedRange): - minToPartitionRange[self._orderedPartitionKeyRanges[i][_PartitionKeyRange.MinInclusive]] = self._orderedPartitionKeyRanges[i] + if routing_range.Range.overlaps(self._orderedRanges[i], providedRange): + minToPartitionRange[self._orderedPartitionKeyRanges[i][PartitionKeyRange.MinInclusive]] = self._orderedPartitionKeyRanges[i] overlapping_partition_key_ranges = list(minToPartitionRange.values()) def getKey(r): - return r[_PartitionKeyRange.MinInclusive] + return r[PartitionKeyRange.MinInclusive] overlapping_partition_key_ranges.sort(key = getKey) return overlapping_partition_key_ranges @@ -153,16 +153,16 @@ def is_complete_set_of_range(ordered_partition_key_range_list): firstRange = ordered_partition_key_range_list[0] lastRange = ordered_partition_key_range_list[-1] - isComplete = (firstRange[_PartitionKeyRange.MinInclusive] == _CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey) - isComplete &= (lastRange[_PartitionKeyRange.MaxExclusive] == _CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey) + isComplete = (firstRange[PartitionKeyRange.MinInclusive] == CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey) + isComplete &= (lastRange[PartitionKeyRange.MaxExclusive] == CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey) for i in range(1, len(ordered_partition_key_range_list)): previousRange = ordered_partition_key_range_list[i - 1] currentRange = ordered_partition_key_range_list[i] - isComplete &= previousRange[_PartitionKeyRange.MaxExclusive] == currentRange[_PartitionKeyRange.MinInclusive] + isComplete &= previousRange[PartitionKeyRange.MaxExclusive] == currentRange[PartitionKeyRange.MinInclusive] if not isComplete: - if previousRange[_PartitionKeyRange.MaxExclusive] > currentRange[_PartitionKeyRange.MinInclusive]: + if previousRange[PartitionKeyRange.MaxExclusive] > currentRange[PartitionKeyRange.MinInclusive]: raise ValueError("Ranges overlap") break diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_map_provider.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_map_provider.py similarity index 80% rename from sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_map_provider.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_map_provider.py index 73c9ed56529d..7b371e97e2d3 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_map_provider.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_map_provider.py @@ -22,14 +22,14 @@ """Internal class for partition key range cache implementation in the Azure Cosmos database service. """ -from .. import base -from .collection_routing_map import _CollectionRoutingMap +from .. import _base +from .collection_routing_map import CollectionRoutingMap from . import routing_range -from .routing_range import _PartitionKeyRange +from .routing_range import PartitionKeyRange -class _PartitionKeyRangeCache(object): +class PartitionKeyRangeCache(object): ''' - _PartitionKeyRangeCache provides list of effective partition key ranges for a collection. + PartitionKeyRangeCache provides list of effective partition key ranges for a collection. This implementation loads and caches the collection routing map per collection on demand. ''' @@ -59,7 +59,7 @@ def get_overlapping_ranges(self, collection_link, partition_key_ranges): ''' cl = self._documentClient - collection_id = base.GetResourceIdOrFullNameFromLink(collection_link) + collection_id = _base.GetResourceIdOrFullNameFromLink(collection_link) collection_routing_map = self._collection_routing_map_by_item.get(collection_id) if collection_routing_map is None: @@ -67,8 +67,8 @@ def get_overlapping_ranges(self, collection_link, partition_key_ranges): # for large collections, a split may complete between the read partition key ranges query page responses, # causing the partitionKeyRanges to have both the children ranges and their parents. Therefore, we need # to discard the parent ranges to have a valid routing map. - collection_pk_ranges = _PartitionKeyRangeCache._discard_parent_ranges(collection_pk_ranges) - collection_routing_map = _CollectionRoutingMap.CompleteRoutingMap([(r, True) for r in collection_pk_ranges], collection_id) + collection_pk_ranges = PartitionKeyRangeCache._discard_parent_ranges(collection_pk_ranges) + collection_routing_map = CollectionRoutingMap.CompleteRoutingMap([(r, True) for r in collection_pk_ranges], collection_id) self._collection_routing_map_by_item[collection_id] = collection_routing_map return collection_routing_map.get_overlapping_ranges(partition_key_ranges) @@ -76,17 +76,17 @@ def get_overlapping_ranges(self, collection_link, partition_key_ranges): def _discard_parent_ranges(partitionKeyRanges): parentIds = set() for r in partitionKeyRanges: - if isinstance(r, dict) and _PartitionKeyRange.Parents in r: - for parentId in r[_PartitionKeyRange.Parents]: + if isinstance(r, dict) and PartitionKeyRange.Parents in r: + for parentId in r[PartitionKeyRange.Parents]: parentIds.add(parentId) - return (r for r in partitionKeyRanges if r[_PartitionKeyRange.Id] not in parentIds) + return (r for r in partitionKeyRanges if r[PartitionKeyRange.Id] not in parentIds) -class _SmartRoutingMapProvider(_PartitionKeyRangeCache): +class SmartRoutingMapProvider(PartitionKeyRangeCache): """ - Efficiently uses PartitionKeyRangeCach and minimizes the unnecessary invocation of _CollectionRoutingMap.get_overlapping_ranges() + Efficiently uses PartitionKeyRangeCach and minimizes the unnecessary invocation of CollectionRoutingMap.get_overlapping_ranges() """ def __init__(self, client): - super(_SmartRoutingMapProvider, self).__init__(client) + super(SmartRoutingMapProvider, self).__init__(client) def _second_range_is_after_first_range(self, range1, range2): @@ -112,20 +112,20 @@ def _subtract_range(self, r, partition_key_range): Evaluates and returns r - partition_key_range :param dict partition_key_range: Partition key range. - :param routing_range._Range r: query range. + :param routing_range.Range r: query range. :return: The subtract r - partition_key_range. - :rtype: routing_range._Range + :rtype: routing_range.Range """ - left = max(partition_key_range[routing_range._PartitionKeyRange.MaxExclusive], r.min) + left = max(partition_key_range[routing_range.PartitionKeyRange.MaxExclusive], r.min) if left == r.min: leftInclusive = r.isMinInclusive else: leftInclusive = False - queryRange = routing_range._Range(left, r.max, leftInclusive, + queryRange = routing_range.Range(left, r.max, leftInclusive, r.isMaxInclusive) return queryRange @@ -136,7 +136,7 @@ def get_overlapping_ranges(self, collection_link, sorted_ranges): :param str collection_link: The collection link. - :param (list of routing_range._Range) sorted_ranges: The sorted list of non-overlapping ranges. + :param (list of routing_range.Range) sorted_ranges: The sorted list of non-overlapping ranges. :return: List of partition key ranges. :rtype: list of dict @@ -163,11 +163,11 @@ def get_overlapping_ranges(self, collection_link, sorted_ranges): else: queryRange = currentProvidedRange - overlappingRanges = _PartitionKeyRangeCache.get_overlapping_ranges(self, collection_link, queryRange) + overlappingRanges = PartitionKeyRangeCache.get_overlapping_ranges(self, collection_link, queryRange) assert len(overlappingRanges), ("code bug: returned overlapping ranges for queryRange {} is empty".format(queryRange)) target_partition_key_ranges.extend(overlappingRanges) - lastKnownTargetRange = routing_range._Range.PartitionKeyRangeToRange(target_partition_key_ranges[-1]) + lastKnownTargetRange = routing_range.Range.PartitionKeyRangeToRange(target_partition_key_ranges[-1]) # the overlapping ranges must contain the requested range assert currentProvidedRange.max <= lastKnownTargetRange.max, "code bug: returned overlapping ranges {} does not contain the requested range {}".format(overlappingRanges, queryRange) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_range.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_range.py similarity index 89% rename from sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_range.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_range.py index f2ca0d76e148..fa0678f5b57c 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_range.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_range.py @@ -22,14 +22,14 @@ """Internal class for partition key range implementation in the Azure Cosmos database service. """ -class _PartitionKeyRange(object): +class PartitionKeyRange(object): """Partition Key Range Constants""" MinInclusive = 'minInclusive' MaxExclusive = 'maxExclusive' Id = 'id' Parents = 'parents' -class _Range(object): +class Range(object): """description of class""" MinPath = 'min' @@ -58,13 +58,13 @@ def contains(self, value): @classmethod def PartitionKeyRangeToRange(cls, partition_key_range): - self = cls(partition_key_range[_PartitionKeyRange.MinInclusive], partition_key_range[_PartitionKeyRange.MaxExclusive], + self = cls(partition_key_range[PartitionKeyRange.MinInclusive], partition_key_range[PartitionKeyRange.MaxExclusive], True, False) return self @classmethod def ParseFromDict(cls, range_as_dict): - self = cls(range_as_dict[_Range.MinPath], range_as_dict[_Range.MaxPath], range_as_dict[_Range.IsMinInclusivePath], range_as_dict[_Range.IsMaxInclusivePath]) + self = cls(range_as_dict[Range.MinPath], range_as_dict[Range.MaxPath], range_as_dict[Range.IsMinInclusivePath], range_as_dict[Range.IsMaxInclusivePath]) return self def isSingleValue(self): @@ -97,8 +97,8 @@ def overlaps(range1, range2): if range1 is None or range2 is None: return False if range1.isEmpty() or range2.isEmpty(): return False - cmp1 = _Range._compare_helper(range1.min, range2.max) - cmp2 = _Range._compare_helper(range2.min, range1.max) + cmp1 = Range._compare_helper(range1.min, range2.max) + cmp2 = Range._compare_helper(range2.min, range1.max) if (cmp1 <= 0 or cmp2 <= 0): if ((cmp1 == 0 and not(range1.isMinInclusive and range2.isMaxInclusive)) or (cmp2 == 0 and not(range2.isMinInclusive and range1.isMaxInclusive))): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/runtime_constants.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_runtime_constants.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/runtime_constants.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_runtime_constants.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/session.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_session.py similarity index 95% rename from sdk/cosmos/azure-cosmos/azure/cosmos/session.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_session.py index 38eece56dec2..fe7c35cdf9d6 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/session.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_session.py @@ -25,9 +25,9 @@ import sys, traceback import threading -from . import base +from . import _base from . import http_constants -from .vector_session_token import VectorSessionToken +from ._vector_session_token import VectorSessionToken from .errors import HTTPFailure class SessionContainer(object): @@ -51,17 +51,17 @@ def get_session_token(self, resource_path): """ with self.session_lock: - is_name_based = base.IsNameBased(resource_path) + is_name_based = _base.IsNameBased(resource_path) collection_rid = '' session_token = '' try: if is_name_based: # get the collection name - collection_name = base.GetItemContainerLink(resource_path) + collection_name = _base.GetItemContainerLink(resource_path) collection_rid = self.collection_name_to_rid[collection_name] else: - collection_rid = base.GetItemContainerLink(resource_path) + collection_rid = _base.GetItemContainerLink(resource_path) if collection_rid in self.rid_to_session_token: token_dict = self.rid_to_session_token[collection_rid] @@ -112,7 +112,7 @@ def set_session_token(self, response_result, response_headers): response_result_id = response_result[response_result_id_key] else: return - collection_rid, collection_name = base.GetItemContainerInfo(self_link, alt_content_path, response_result_id) + collection_rid, collection_name = _base.GetItemContainerInfo(self_link, alt_content_path, response_result_id) except ValueError: return diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/session_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_session_retry_policy.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/session_retry_policy.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_session_retry_policy.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/synchronized_request.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_synchronized_request.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/synchronized_request.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_synchronized_request.py index 9538a993580c..2ba8c1b2cdd8 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/synchronized_request.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_synchronized_request.py @@ -30,7 +30,7 @@ from . import documents from . import errors from . import http_constants -from . import retry_utility +from . import _retry_utility def _IsReadableStream(obj): """Checks whether obj is a file-like readable stream. @@ -224,5 +224,5 @@ def SynchronizedRequest(client, request_options['headers'][http_constants.HttpHeaders.ContentLength] = 0 # Pass _Request function with it's parameters to retry_utility's Execute method that wraps the call with retries - return retry_utility._Execute(client, global_endpoint_manager, _Request, request, connection_policy, requests_session, path, request_options, request_body) + return _retry_utility.Execute(client, global_endpoint_manager, _Request, request, connection_policy, requests_session, path, request_options, request_body) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/utils.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_utils.py similarity index 86% rename from sdk/cosmos/azure-cosmos/azure/cosmos/utils.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_utils.py index e20216199ef5..8178ef426084 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/utils.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_utils.py @@ -26,17 +26,17 @@ import re as re from . import http_constants -def _get_user_agent(): - os_name = _safe_user_agent_header(platform.system()) - os_version = _safe_user_agent_header(platform.release()) - python_version = _safe_user_agent_header(platform.python_version()) +def get_user_agent(): + os_name = safe_user_agent_header(platform.system()) + os_version = safe_user_agent_header(platform.release()) + python_version = safe_user_agent_header(platform.python_version()) user_agent = "{}/{} Python/{} {}/{}".format(os_name, os_version, python_version, http_constants.Versions.SDKName, http_constants.Versions.SDKVersion) return user_agent -def _safe_user_agent_header(s): +def safe_user_agent_header(s): if s is None: s = "unknown" # remove all white spaces diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/vector_session_token.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_vector_session_token.py similarity index 99% rename from sdk/cosmos/azure-cosmos/azure/cosmos/vector_session_token.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_vector_session_token.py index 1dfee1974e6b..d2cd6920fc1c 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/vector_session_token.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_vector_session_token.py @@ -23,7 +23,6 @@ """ from . import errors -from . import base from .http_constants import StatusCodes class VectorSessionToken(object): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/container.py b/sdk/cosmos/azure-cosmos/azure/cosmos/container.py index 8326d5224260..7d2b9fd35795 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/container.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/container.py @@ -23,12 +23,12 @@ """ import six -from .cosmos_client_connection import CosmosClientConnection +from ._cosmos_client_connection import CosmosClientConnection from .errors import HTTPFailure from .http_constants import StatusCodes from .offer import Offer from .scripts import Scripts -from .query_iterable import QueryIterable +from ._query_iterable import QueryIterable from .partition_key import NonePartitionKeyValue from typing import ( Any, @@ -222,7 +222,7 @@ def read_all_items( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of items (dicts). + :returns: An Iterable of items (dicts). """ if not feed_options: feed_options = {} # type: Dict[str, Any] @@ -264,7 +264,7 @@ def query_items_change_feed( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of items (dicts). + :returns: An Iterable of items (dicts). """ if not feed_options: @@ -317,7 +317,7 @@ def query_items( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of items (dicts). + :returns: An Iterable of items (dicts). You can use any value for the container name in the FROM clause, but typically the container name is used. In the examples below, the container name is "products," and is aliased as "p" for easier referencing @@ -675,7 +675,7 @@ def read_all_conflicts( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of conflicts (dicts). + :returns: An Iterable of conflicts (dicts). """ if not feed_options: @@ -712,7 +712,7 @@ def query_conflicts( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of conflicts (dicts). + :returns: An Iterable of conflicts (dicts). """ if not feed_options: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client.py b/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client.py index f1de1976f98a..a4d5ff828734 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client.py @@ -23,10 +23,10 @@ """ import six -from .cosmos_client_connection import CosmosClientConnection +from ._cosmos_client_connection import CosmosClientConnection from .database import Database from .documents import ConnectionPolicy, DatabaseAccount -from .query_iterable import QueryIterable +from ._query_iterable import QueryIterable from typing import ( Any, Callable, @@ -184,7 +184,7 @@ def read_all_databases( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of database properties (dicts). + :returns: An Iterable of database properties (dicts). """ if not feed_options: @@ -231,7 +231,7 @@ def query_databases( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of database properties (dicts). + :returns: An Iterable of database properties (dicts). """ if not feed_options: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/database.py b/sdk/cosmos/azure-cosmos/azure/cosmos/database.py index 68ef288106e5..21df096ca050 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/database.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/database.py @@ -23,13 +23,13 @@ """ import six -from .cosmos_client_connection import CosmosClientConnection +from ._cosmos_client_connection import CosmosClientConnection from .container import Container from .offer import Offer from .http_constants import StatusCodes from .errors import HTTPFailure from .user import User -from .query_iterable import QueryIterable +from ._query_iterable import QueryIterable from .partition_key import PartitionKey from typing import ( @@ -332,7 +332,7 @@ def read_all_containers( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of container properties (dicts). + :returns: An Iterable of container properties (dicts). .. literalinclude:: ../../examples/examples.py :start-after: [START list_containers] @@ -385,7 +385,7 @@ def query_containers( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of container properties (dicts). + :returns: An Iterable of container properties (dicts). """ if not feed_options: @@ -503,7 +503,7 @@ def read_all_users( :param max_item_count: Max number of users to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of user properties (dicts). + :returns: An Iterable of user properties (dicts). """ if not feed_options: @@ -536,7 +536,7 @@ def query_users( :param max_item_count: Max number of users to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of user properties (dicts). + :returns: An Iterable of user properties (dicts). """ if not feed_options: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/documents.py b/sdk/cosmos/azure-cosmos/azure/cosmos/documents.py index fc45f5157dfc..33be86d9004f 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/documents.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/documents.py @@ -22,7 +22,7 @@ """AzureDocument classes and enums for the Azure Cosmos database service. """ -from . import retry_options +from . import _retry_options class DatabaseAccount(object): """Database account. A DatabaseAccount is the container for databases. @@ -368,7 +368,7 @@ def __init__(self): self.ProxyConfiguration = None self.EnableEndpointDiscovery = True self.PreferredLocations = [] - self.RetryOptions = retry_options.RetryOptions() + self.RetryOptions = _retry_options.RetryOptions() self.DisableSSLVerification = False self.UseMultipleWriteLocations = False diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/scripts.py b/sdk/cosmos/azure-cosmos/azure/cosmos/scripts.py index 7487c36a4d3b..52f9ccfdd6e3 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/scripts.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/scripts.py @@ -23,9 +23,9 @@ """ import six -from azure.cosmos.cosmos_client_connection import CosmosClientConnection +from azure.cosmos._cosmos_client_connection import CosmosClientConnection from .partition_key import NonePartitionKeyValue -from.query_iterable import QueryIterable +from ._query_iterable import QueryIterable from typing import ( Any, List, @@ -64,7 +64,7 @@ def list_stored_procedures( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of stored procedures (dicts). + :returns: An Iterable of stored procedures (dicts). """ if not feed_options: @@ -91,7 +91,7 @@ def query_stored_procedures( :param parameters: Optional array of parameters to the query. Ignored if no query is provided. :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of stored procedures (dicts). + :returns: An Iterable of stored procedures (dicts). """ if not feed_options: @@ -246,7 +246,7 @@ def list_triggers( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of triggers (dicts). + :returns: An Iterable of triggers (dicts). """ if not feed_options: @@ -273,7 +273,7 @@ def query_triggers( :param parameters: Optional array of parameters to the query. Ignored if no query is provided. :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of triggers (dicts). + :returns: An Iterable of triggers (dicts). """ if not feed_options: @@ -394,7 +394,7 @@ def list_user_defined_functions( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of user defined functions (dicts). + :returns: An Iterable of user defined functions (dicts). """ if not feed_options: @@ -421,7 +421,7 @@ def query_user_defined_functions( :param parameters: Optional array of parameters to the query. Ignored if no query is provided. :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of user defined functions (dicts). + :returns: An Iterable of user defined functions (dicts). """ if not feed_options: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/user.py b/sdk/cosmos/azure-cosmos/azure/cosmos/user.py index f7c212c56c27..9b1eaf39236b 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/user.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/user.py @@ -23,7 +23,7 @@ """ import six -from .cosmos_client_connection import CosmosClientConnection +from ._cosmos_client_connection import CosmosClientConnection from typing import ( Any, List, @@ -99,7 +99,7 @@ def read_all_permissions( :param max_item_count: Max number of permissions to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of permissions (dicts). + :returns: An Iterable of permissions (dicts). """ if not feed_options: @@ -133,7 +133,7 @@ def query_permissions( :param max_item_count: Max number of permissions to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of permissions (dicts). + :returns: An Iterable of permissions (dicts). """ if not feed_options: diff --git a/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/ConflictWorker.py b/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/ConflictWorker.py index 52f31029be52..a714278dc71d 100644 --- a/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/ConflictWorker.py +++ b/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/ConflictWorker.py @@ -4,7 +4,6 @@ import json import azure.cosmos.errors as errors from azure.cosmos.http_constants import StatusCodes -import azure.cosmos.base as base class ConflictWorker(object): def __init__(self, database_name, basic_collection_name, manual_collection_name, lww_collection_name, udp_collection_name): diff --git a/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/MultiMasterScenario.py b/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/MultiMasterScenario.py index 8b36c27ba0fe..8b97f0899838 100644 --- a/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/MultiMasterScenario.py +++ b/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/MultiMasterScenario.py @@ -3,7 +3,7 @@ from Worker import Worker from multiprocessing.pool import ThreadPool import azure.cosmos.documents as documents -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection class MultiMasterScenario(object): def __init__(self): diff --git a/sdk/cosmos/azure-cosmos/test/base_unit_tests.py b/sdk/cosmos/azure-cosmos/test/base_unit_tests.py index 2dd41a646231..cd0082c5582e 100644 --- a/sdk/cosmos/azure-cosmos/test/base_unit_tests.py +++ b/sdk/cosmos/azure-cosmos/test/base_unit_tests.py @@ -1,6 +1,6 @@ import unittest import pytest -import azure.cosmos.base as base +import azure.cosmos._base as base pytestmark = pytest.mark.cosmosEmulator diff --git a/sdk/cosmos/azure-cosmos/test/crud_tests.py b/sdk/cosmos/azure-cosmos/test/crud_tests.py index 12f1d53df464..77a20f52709c 100644 --- a/sdk/cosmos/azure-cosmos/test/crud_tests.py +++ b/sdk/cosmos/azure-cosmos/test/crud_tests.py @@ -41,18 +41,18 @@ import urllib.parse as urllib import uuid import pytest -import azure.cosmos.consistent_hash_ring as consistent_hash_ring +from azure.cosmos import _consistent_hash_ring import azure.cosmos.documents as documents import azure.cosmos.errors as errors from azure.cosmos.http_constants import HttpHeaders, StatusCodes, SubStatusCodes -import azure.cosmos.murmur_hash as murmur_hash +import azure.cosmos._murmur_hash as _murmur_hash import test_config -import azure.cosmos.base as base +import azure.cosmos._base as base import azure.cosmos.cosmos_client as cosmos_client from azure.cosmos.diagnostics import RecordDiagnostics from azure.cosmos.partition_key import PartitionKey import conftest -import azure.cosmos.retry_utility as retry_utility +from azure.cosmos import _retry_utility pytestmark = pytest.mark.cosmosEmulator @@ -298,11 +298,11 @@ def test_partitioned_collection_partition_key_extraction(self): } } - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction # create document without partition key being specified created_document = created_collection.create_item(body=document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction self.assertEquals(self.last_headers[1], '["WA"]') del self.last_headers[:] @@ -315,11 +315,11 @@ def test_partitioned_collection_partition_key_extraction(self): partition_key=PartitionKey(path='/address', kind=documents.PartitionKind.Hash) ) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction # Create document with partitionkey not present as a leaf level property but a dict created_document = created_collection1.create_item(document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction self.assertEquals(self.last_headers[1], [{}]) del self.last_headers[:] @@ -331,11 +331,11 @@ def test_partitioned_collection_partition_key_extraction(self): partition_key=PartitionKey(path='/address/state/city', kind=documents.PartitionKind.Hash) ) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction # Create document with partitionkey not present in the document created_document = created_collection2.create_item(document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction self.assertEquals(self.last_headers[1], [{}]) del self.last_headers[:] @@ -358,10 +358,10 @@ def test_partitioned_collection_partition_key_extraction_special_chars(self): "level' 1*()": {"le/vel2": 'val1'} } - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction created_document = created_collection1.create_item(body=document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction self.assertEquals(self.last_headers[1], '["val1"]') del self.last_headers[:] @@ -385,11 +385,11 @@ def test_partitioned_collection_partition_key_extraction_special_chars(self): 'level\" 1*()': {'le/vel2': 'val2'} } - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction # create document without partition key being specified created_document = created_collection2.create_item(body=document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction self.assertEquals(self.last_headers[1], '["val2"]') del self.last_headers[:] @@ -851,13 +851,13 @@ def test_murmur_hash(self): str = 'afdgdd' bytes = bytearray(str, encoding='utf-8') - hash_value = murmur_hash._MurmurHash._ComputeHash(bytes) + hash_value = _murmur_hash.MurmurHash._ComputeHash(bytes) self.assertEqual(1099701186, hash_value) num = 374.0 bytes = bytearray(pack('d', num)) - hash_value = murmur_hash._MurmurHash._ComputeHash(bytes) + hash_value = _murmur_hash.MurmurHash._ComputeHash(bytes) self.assertEqual(3717946798, hash_value) self._validate_bytes("", 0x1B873593, bytearray(b'\xEE\xA8\xA2\x67'), 1738713326) @@ -878,25 +878,25 @@ def test_murmur_hash(self): 3381504877) def _validate_bytes(self, str, seed, expected_hash_bytes, expected_value): - hash_value = murmur_hash._MurmurHash._ComputeHash(bytearray(str, encoding='utf-8'), seed) + hash_value = _murmur_hash.MurmurHash._ComputeHash(bytearray(str, encoding='utf-8'), seed) bytes = bytearray(pack('I', hash_value)) self.assertEqual(expected_value, hash_value) self.assertEqual(expected_hash_bytes, bytes) def test_get_bytes(self): - actual_bytes = consistent_hash_ring._ConsistentHashRing._GetBytes("documentdb") + actual_bytes = _consistent_hash_ring.ConsistentHashRing._GetBytes("documentdb") expected_bytes = bytearray(b'\x64\x6F\x63\x75\x6D\x65\x6E\x74\x64\x62') self.assertEqual(expected_bytes, actual_bytes) - actual_bytes = consistent_hash_ring._ConsistentHashRing._GetBytes("azure") + actual_bytes = _consistent_hash_ring.ConsistentHashRing._GetBytes("azure") expected_bytes = bytearray(b'\x61\x7A\x75\x72\x65') self.assertEqual(expected_bytes, actual_bytes) - actual_bytes = consistent_hash_ring._ConsistentHashRing._GetBytes("json") + actual_bytes = _consistent_hash_ring.ConsistentHashRing._GetBytes("json") expected_bytes = bytearray(b'\x6A\x73\x6F\x6E') self.assertEqual(expected_bytes, actual_bytes) - actual_bytes = consistent_hash_ring._ConsistentHashRing._GetBytes("nosql") + actual_bytes = _consistent_hash_ring.ConsistentHashRing._GetBytes("nosql") expected_bytes = bytearray(b'\x6E\x6F\x73\x71\x6C') self.assertEqual(expected_bytes, actual_bytes) diff --git a/sdk/cosmos/azure-cosmos/test/globaldb_mock_tests.py b/sdk/cosmos/azure-cosmos/test/globaldb_mock_tests.py index c387000390d9..5c07812625bf 100644 --- a/sdk/cosmos/azure-cosmos/test/globaldb_mock_tests.py +++ b/sdk/cosmos/azure-cosmos/test/globaldb_mock_tests.py @@ -23,13 +23,13 @@ import json import pytest -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection import azure.cosmos.documents as documents import azure.cosmos.errors as errors -import azure.cosmos.constants as constants +import azure.cosmos._constants as constants from azure.cosmos.http_constants import StatusCodes -import azure.cosmos.global_endpoint_manager as global_endpoint_manager -import azure.cosmos.retry_utility as retry_utility +import azure.cosmos._global_endpoint_manager as global_endpoint_manager +from azure.cosmos import _retry_utility import test_config pytestmark = pytest.mark.cosmosEmulator @@ -132,7 +132,7 @@ def setUp(self): # Copying the original objects and functions before assigning the mock versions of them self.OriginalGetDatabaseAccountStub = global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub self.OriginalGlobalEndpointManager = global_endpoint_manager._GlobalEndpointManager - self.OriginalExecuteFunction = retry_utility._ExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction # Make azure-cosmos use the MockGlobalEndpointManager global_endpoint_manager._GlobalEndpointManager = MockGlobalEndpointManager @@ -141,13 +141,13 @@ def tearDown(self): # Restoring the original objects and functions global_endpoint_manager._GlobalEndpointManager = self.OriginalGlobalEndpointManager global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = self.OriginalGetDatabaseAccountStub - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def MockExecuteFunction(self, function, *args, **kwargs): global location_changed if self.endpoint_discovery_retry_count == 2: - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction return (json.dumps([{ 'id': 'mock database' }]), None) else: self.endpoint_discovery_retry_count += 1 @@ -158,8 +158,8 @@ def MockGetDatabaseAccountStub(self, endpoint): raise errors.HTTPFailure(StatusCodes.SERVICE_UNAVAILABLE, "Service unavailable") def MockCreateDatabase(self, client, database): - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self.MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self.MockExecuteFunction client.CreateDatabase(database) def test_globaldb_endpoint_discovery_retry_policy(self): diff --git a/sdk/cosmos/azure-cosmos/test/globaldb_tests.py b/sdk/cosmos/azure-cosmos/test/globaldb_tests.py index 5241118dbfa7..e0e8eb41db7e 100644 --- a/sdk/cosmos/azure-cosmos/test/globaldb_tests.py +++ b/sdk/cosmos/azure-cosmos/test/globaldb_tests.py @@ -26,12 +26,12 @@ import time import pytest -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection import azure.cosmos.documents as documents import azure.cosmos.errors as errors -import azure.cosmos.global_endpoint_manager as global_endpoint_manager -import azure.cosmos.endpoint_discovery_retry_policy as endpoint_discovery_retry_policy -import azure.cosmos.retry_utility as retry_utility +import azure.cosmos._global_endpoint_manager as global_endpoint_manager +from azure.cosmos import _endpoint_discovery_retry_policy +from azure.cosmos import _retry_utility from azure.cosmos.http_constants import HttpHeaders, StatusCodes, SubStatusCodes import test_config @@ -359,8 +359,8 @@ def test_globaldb_locational_endpoint_parser(self): def test_globaldb_endpoint_discovery_retry_policy_mock(self): client = cosmos_client_connection.CosmosClientConnection(Test_globaldb_tests.host, {'masterKey': Test_globaldb_tests.masterKey}) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction self.OriginalGetDatabaseAccount = client.GetDatabaseAccount client.GetDatabaseAccount = self._MockGetDatabaseAccount @@ -368,8 +368,8 @@ def test_globaldb_endpoint_discovery_retry_policy_mock(self): max_retry_attempt_count = 10 retry_after_in_milliseconds = 500 - endpoint_discovery_retry_policy._EndpointDiscoveryRetryPolicy.Max_retry_attempt_count = max_retry_attempt_count - endpoint_discovery_retry_policy._EndpointDiscoveryRetryPolicy.Retry_after_in_milliseconds = retry_after_in_milliseconds + _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy.Max_retry_attempt_count = max_retry_attempt_count + _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy.Retry_after_in_milliseconds = retry_after_in_milliseconds document_definition = { 'id': 'doc', 'name': 'sample document', @@ -382,7 +382,7 @@ def test_globaldb_endpoint_discovery_retry_policy_mock(self): self.test_coll['_self'], document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def _MockExecuteFunction(self, function, *args, **kwargs): raise errors.HTTPFailure(StatusCodes.FORBIDDEN, "Write Forbidden", {'x-ms-substatus' : SubStatusCodes.WRITE_FORBIDDEN}) diff --git a/sdk/cosmos/azure-cosmos/test/location_cache_tests.py b/sdk/cosmos/azure-cosmos/test/location_cache_tests.py index 22e2689cded4..a2772ce270e8 100644 --- a/sdk/cosmos/azure-cosmos/test/location_cache_tests.py +++ b/sdk/cosmos/azure-cosmos/test/location_cache_tests.py @@ -4,13 +4,13 @@ from time import sleep from azure.cosmos.http_constants import ResourceType -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection import azure.cosmos.documents as documents -from azure.cosmos.request_object import _RequestObject -from azure.cosmos.location_cache import LocationCache +from azure.cosmos._request_object import RequestObject +from azure.cosmos._location_cache import LocationCache import azure.cosmos.errors as errors from azure.cosmos.http_constants import StatusCodes, SubStatusCodes, HttpHeaders -import azure.cosmos.retry_utility as retry_utility +from azure.cosmos import _retry_utility import six pytestmark = pytest.mark.cosmosEmulator @@ -74,8 +74,8 @@ def test_validate_retry_on_session_not_availabe_with_disable_multiple_write_loca def validate_retry_on_session_not_availabe_with_endpoint_discovery_disabled(self, is_preferred_locations_list_empty, use_multiple_write_locations, is_read_request): self.counter = 0 - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunctionSessionReadFailureOnce + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunctionSessionReadFailureOnce self.original_get_database_account = cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount = self.mock_create_db_with_flag_enabled if use_multiple_write_locations else self.mock_create_db_with_flag_disabled enable_endpoint_discovery = False @@ -95,7 +95,7 @@ def validate_retry_on_session_not_availabe_with_endpoint_discovery_disabled(self self.assertEqual(e.sub_status, SubStatusCodes.READ_SESSION_NOTAVAILABLE) cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount = self.original_get_database_account - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def _MockExecuteFunctionSessionReadFailureOnce(self, function, *args, **kwargs): self.counter += 1 @@ -116,8 +116,8 @@ def test_validate_retry_on_session_not_availabe_with_endpoint_discovery_enabled( def validate_retry_on_session_not_availabe(self, is_preferred_locations_list_empty, use_multiple_write_locations): self.counter = 0 - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunctionSessionReadFailureTwice + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunctionSessionReadFailureTwice self.original_get_database_account = cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount = self.mock_create_db_with_flag_enabled if use_multiple_write_locations else self.mock_create_db_with_flag_disabled @@ -136,7 +136,7 @@ def validate_retry_on_session_not_availabe(self, is_preferred_locations_list_emp self.assertEqual(e.sub_status, SubStatusCodes.READ_SESSION_NOTAVAILABLE) cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount = self.original_get_database_account - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def _MockExecuteFunctionSessionReadFailureTwice(self, function, *args, **kwargs): request = args[1] @@ -376,11 +376,11 @@ def validate_request_endpoint_resolution(self, use_multiple_write_locations, end def resolve_endpoint_for_read_request(self, master_resource_type): operation_type = documents._OperationType.Read resource_type = ResourceType.Database if master_resource_type else ResourceType.Document - request = _RequestObject(resource_type, operation_type) + request = RequestObject(resource_type, operation_type) return self.location_cache.resolve_service_endpoint(request) def resolve_endpoint_for_write_request(self, resource_type, use_alternate_write_endpoint): operation_type = documents._OperationType.Create - request = _RequestObject(resource_type, operation_type) + request = RequestObject(resource_type, operation_type) request.route_to_location_with_preferred_location_flag(1 if use_alternate_write_endpoint else 0, ResourceType.IsCollectionChild(resource_type)) return self.location_cache.resolve_service_endpoint(request) diff --git a/sdk/cosmos/azure-cosmos/test/multimaster_tests.py b/sdk/cosmos/azure-cosmos/test/multimaster_tests.py index 8c0b5b24fa1a..11c740244dcc 100644 --- a/sdk/cosmos/azure-cosmos/test/multimaster_tests.py +++ b/sdk/cosmos/azure-cosmos/test/multimaster_tests.py @@ -2,9 +2,9 @@ import uuid import azure.cosmos.cosmos_client as cosmos_client import pytest -import azure.cosmos.constants as constants +import azure.cosmos._constants as constants from azure.cosmos.http_constants import HttpHeaders -import azure.cosmos.retry_utility as retry_utility +from azure.cosmos import _retry_utility import test_config from azure.cosmos.partition_key import PartitionKey @@ -31,8 +31,8 @@ def test_tentative_writes_header_not_present(self): def _validate_tentative_write_headers(self): - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction connectionPolicy = MultiMasterTests.connectionPolicy connectionPolicy.UseMultipleWriteLocations = True @@ -115,7 +115,7 @@ def _validate_tentative_write_headers(self): # Delete Database self.assertEqual(self.last_headers[10], is_allow_tentative_writes_set) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def _MockExecuteFunction(self, function, *args, **kwargs): self.counter += 1 diff --git a/sdk/cosmos/azure-cosmos/test/orderby_tests.py b/sdk/cosmos/azure-cosmos/test/orderby_tests.py index d8f85a49eb03..7b84ed856aaa 100644 --- a/sdk/cosmos/azure-cosmos/test/orderby_tests.py +++ b/sdk/cosmos/azure-cosmos/test/orderby_tests.py @@ -25,8 +25,8 @@ import azure.cosmos.documents as documents from azure.cosmos.partition_key import PartitionKey import azure.cosmos.cosmos_client as cosmos_client -from azure.cosmos import query_iterable -import azure.cosmos.base as base +from azure.cosmos import _query_iterable as query_iterable +import azure.cosmos._base as base from six.moves import xrange import test_config diff --git a/sdk/cosmos/azure-cosmos/test/proxy_tests.py b/sdk/cosmos/azure-cosmos/test/proxy_tests.py index c9144b8bec9e..552f76ee301c 100644 --- a/sdk/cosmos/azure-cosmos/test/proxy_tests.py +++ b/sdk/cosmos/azure-cosmos/test/proxy_tests.py @@ -22,7 +22,7 @@ import unittest import pytest import azure.cosmos.documents as documents -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection import test_config import six if six.PY2: diff --git a/sdk/cosmos/azure-cosmos/test/query_execution_context_tests.py b/sdk/cosmos/azure-cosmos/test/query_execution_context_tests.py index 4a0ac5692459..f8138b6d5a8a 100644 --- a/sdk/cosmos/azure-cosmos/test/query_execution_context_tests.py +++ b/sdk/cosmos/azure-cosmos/test/query_execution_context_tests.py @@ -24,8 +24,8 @@ import pytest from six.moves import xrange import azure.cosmos.cosmos_client as cosmos_client -from azure.cosmos.execution_context import base_execution_context as base_execution_context -import azure.cosmos.base as base +from azure.cosmos._execution_context import base_execution_context as base_execution_context +import azure.cosmos._base as base import test_config from azure.cosmos.partition_key import PartitionKey diff --git a/sdk/cosmos/azure-cosmos/test/retry_policy_tests.py b/sdk/cosmos/azure-cosmos/test/retry_policy_tests.py index bffe7a194d0e..f25dfce77e78 100644 --- a/sdk/cosmos/azure-cosmos/test/retry_policy_tests.py +++ b/sdk/cosmos/azure-cosmos/test/retry_policy_tests.py @@ -25,9 +25,9 @@ import pytest import azure.cosmos.documents as documents import azure.cosmos.errors as errors -import azure.cosmos.retry_options as retry_options +import azure.cosmos._retry_options as retry_options from azure.cosmos.http_constants import HttpHeaders, StatusCodes, SubStatusCodes -import azure.cosmos.retry_utility as retry_utility +from azure.cosmos import _retry_utility import test_config pytestmark = pytest.mark.cosmosEmulator @@ -78,9 +78,9 @@ def test_resource_throttle_retry_policy_default_retry_after(self): connection_policy = Test_retry_policy_tests.connectionPolicy connection_policy.RetryOptions = retry_options.RetryOptions(5) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction try: - retry_utility._ExecuteFunction = self._MockExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction document_definition = { 'id': 'doc', 'name': 'sample document', @@ -94,15 +94,15 @@ def test_resource_throttle_retry_policy_default_retry_after(self): self.assertGreaterEqual( self.created_collection.client_connection.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs], connection_policy.RetryOptions.MaxRetryAttemptCount * self.retry_after_in_milliseconds) finally: - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def test_resource_throttle_retry_policy_fixed_retry_after(self): connection_policy = Test_retry_policy_tests.connectionPolicy connection_policy.RetryOptions = retry_options.RetryOptions(5, 2000) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction try: - retry_utility._ExecuteFunction = self._MockExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction document_definition = { 'id': 'doc', 'name': 'sample document', @@ -117,15 +117,15 @@ def test_resource_throttle_retry_policy_fixed_retry_after(self): connection_policy.RetryOptions.MaxRetryAttemptCount * connection_policy.RetryOptions.FixedRetryIntervalInMilliseconds) finally: - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def test_resource_throttle_retry_policy_max_wait_time(self): connection_policy = Test_retry_policy_tests.connectionPolicy connection_policy.RetryOptions = retry_options.RetryOptions(5, 2000, 3) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction try: - retry_utility._ExecuteFunction = self._MockExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction document_definition = { 'id': 'doc', 'name': 'sample document', @@ -138,7 +138,7 @@ def test_resource_throttle_retry_policy_max_wait_time(self): self.assertGreaterEqual(self.created_collection.client_connection.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs], connection_policy.RetryOptions.MaxWaitTimeInSeconds * 1000) finally: - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def test_resource_throttle_retry_policy_query(self): connection_policy = Test_retry_policy_tests.connectionPolicy @@ -150,9 +150,9 @@ def test_resource_throttle_retry_policy_query(self): self.created_collection.create_item(body=document_definition) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction try: - retry_utility._ExecuteFunction = self._MockExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction try: list(self.created_collection.query_items( @@ -169,7 +169,7 @@ def test_resource_throttle_retry_policy_query(self): self.assertGreaterEqual(self.created_collection.client_connection.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs], connection_policy.RetryOptions.MaxRetryAttemptCount * self.retry_after_in_milliseconds) finally: - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def test_default_retry_policy_for_query(self): document_definition_1 = { 'id': 'doc1', @@ -183,9 +183,9 @@ def test_default_retry_policy_for_query(self): self.created_collection.create_item(body=document_definition_2) try: - original_execute_function = retry_utility._ExecuteFunction + original_execute_function = _retry_utility.ExecuteFunction mf = self.MockExecuteFunctionConnectionReset(original_execute_function) - retry_utility._ExecuteFunction = mf + _retry_utility.ExecuteFunction = mf docs = self.created_collection.query_items(query="Select * from c", max_item_count=1, enable_cross_partition_query=True) @@ -194,7 +194,7 @@ def test_default_retry_policy_for_query(self): self.assertEqual(result_docs[1]['id'], 'doc2') self.assertEqual(mf.counter, 12) finally: - retry_utility._ExecuteFunction = original_execute_function + _retry_utility.ExecuteFunction = original_execute_function self.created_collection.delete_item(item=result_docs[0], partition_key=result_docs[0]['id']) self.created_collection.delete_item(item=result_docs[1], partition_key=result_docs[1]['id']) @@ -207,16 +207,16 @@ def test_default_retry_policy_for_read(self): created_document = self.created_collection.create_item(body=document_definition) try: - original_execute_function = retry_utility._ExecuteFunction + original_execute_function = _retry_utility.ExecuteFunction mf = self.MockExecuteFunctionConnectionReset(original_execute_function) - retry_utility._ExecuteFunction = mf + _retry_utility.ExecuteFunction = mf doc = self.created_collection.read_item(item=created_document['id'], partition_key=created_document['id']) self.assertEqual(doc['id'], 'doc') self.assertEqual(mf.counter, 3) finally: - retry_utility._ExecuteFunction = original_execute_function + _retry_utility.ExecuteFunction = original_execute_function self.created_collection.delete_item(item=created_document, partition_key=created_document['id']) @@ -226,9 +226,9 @@ def test_default_retry_policy_for_create(self): 'key': 'value'} try: - original_execute_function = retry_utility._ExecuteFunction + original_execute_function = _retry_utility.ExecuteFunction mf = self.MockExecuteFunctionConnectionReset(original_execute_function) - retry_utility._ExecuteFunction = mf + _retry_utility.ExecuteFunction = mf created_document = {} try : @@ -241,7 +241,7 @@ def test_default_retry_policy_for_create(self): # 3 retries for readCollection. No retry for createDocument. self.assertEqual(mf.counter, 1) # TODO: The comment above implies that there should be a read in the test. But there isn't... finally: - retry_utility._ExecuteFunction = original_execute_function + _retry_utility.ExecuteFunction = original_execute_function def _MockExecuteFunction(self, function, *args, **kwargs): raise errors.HTTPFailure(StatusCodes.TOO_MANY_REQUESTS, "Request rate is too large", {HttpHeaders.RetryAfterInMilliseconds: self.retry_after_in_milliseconds}) diff --git a/sdk/cosmos/azure-cosmos/test/routing/collection_routing_map_test.py b/sdk/cosmos/azure-cosmos/test/routing/collection_routing_map_test.py index ae5fa2c011af..c6cae9afd4ce 100644 --- a/sdk/cosmos/azure-cosmos/test/routing/collection_routing_map_test.py +++ b/sdk/cosmos/azure-cosmos/test/routing/collection_routing_map_test.py @@ -21,9 +21,9 @@ import unittest import pytest -from azure.cosmos.routing.collection_routing_map import _CollectionRoutingMap -import azure.cosmos.routing.routing_range as routing_range -from azure.cosmos.routing.routing_map_provider import _PartitionKeyRangeCache +from azure.cosmos._routing.collection_routing_map import CollectionRoutingMap +import azure.cosmos._routing.routing_range as routing_range +from azure.cosmos._routing.routing_map_provider import PartitionKeyRangeCache pytestmark = pytest.mark.cosmosEmulator @@ -34,8 +34,8 @@ def test_advanced(self): partition_key_ranges = [{u'id': u'0', u'minInclusive': u'', u'maxExclusive': u'05C1C9CD673398'}, {u'id': u'1', u'minInclusive': u'05C1C9CD673398', u'maxExclusive': u'05C1D9CD673398'}, {u'id': u'2', u'minInclusive': u'05C1D9CD673398', u'maxExclusive': u'05C1E399CD6732'}, {u'id': u'3', u'minInclusive': u'05C1E399CD6732', u'maxExclusive': u'05C1E9CD673398'}, {u'id': u'4', u'minInclusive': u'05C1E9CD673398', u'maxExclusive': u'FF'}] partitionRangeWithInfo = [(r, True) for r in partition_key_ranges] - pkRange = routing_range._Range("", "FF", True, False) - collection_routing_map = _CollectionRoutingMap.CompleteRoutingMap(partitionRangeWithInfo, 'sample collection id') + pkRange = routing_range.Range("", "FF", True, False) + collection_routing_map = CollectionRoutingMap.CompleteRoutingMap(partitionRangeWithInfo, 'sample collection id') overlapping_partition_key_ranges = collection_routing_map.get_overlapping_ranges(pkRange) self.assertEqual(len(overlapping_partition_key_ranges), len(partition_key_ranges)) @@ -74,7 +74,7 @@ def get_range_id(r): return r[Id] # verify no thing is filtered out since there is no children ranges - filteredRanges = _PartitionKeyRangeCache._discard_parent_ranges(partitionKeyRanges) + filteredRanges = PartitionKeyRangeCache._discard_parent_ranges(partitionKeyRanges) self.assertEqual(['2', '0', '1', '3'], list(map(get_range_id, filteredRanges))) # add some children partition key ranges with parents Ids @@ -93,7 +93,7 @@ def get_range_id(r): Parents : ["0"]}) # verify the filtered range list has children ranges and the parent Ids are discarded - filteredRanges = _PartitionKeyRangeCache._discard_parent_ranges(partitionKeyRanges) + filteredRanges = PartitionKeyRangeCache._discard_parent_ranges(partitionKeyRanges) expectedRanges = ['2', '1', '3', '6', '7', '5'] self.assertEqual(expectedRanges, list(map(get_range_id, filteredRanges))) @@ -123,7 +123,7 @@ def test_collection_routing_map(self): 3) ] - crm = _CollectionRoutingMap.CompleteRoutingMap(partitionKeyRanges, "") + crm = CollectionRoutingMap.CompleteRoutingMap(partitionKeyRanges, "") self.assertEqual("0", crm._orderedPartitionKeyRanges[0][Id]) self.assertEqual("1", crm._orderedPartitionKeyRanges[1][Id]) @@ -144,7 +144,7 @@ def test_collection_routing_map(self): self.assertEqual("0", crm.get_range_by_partition_key_range_id("0")[Id]) self.assertEqual("1", crm.get_range_by_partition_key_range_id("1")[Id]) - fullRangeMinToMaxRange = routing_range._Range(_CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, _CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey, True, False) + fullRangeMinToMaxRange = routing_range.Range(CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey, True, False) overlappingRanges = crm.get_overlapping_ranges([fullRangeMinToMaxRange]) self.assertEqual(4, len(overlappingRanges)) @@ -154,18 +154,18 @@ def getKey(r): onlyParitionRanges.sort(key = getKey) self.assertEqual(overlappingRanges, onlyParitionRanges) - noPoint = routing_range._Range(_CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, _CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, False, False) + noPoint = routing_range.Range(CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, False, False) self.assertEqual(0, len(crm.get_overlapping_ranges([noPoint]))) - onePoint = routing_range._Range("0000000040", "0000000040", True, True) + onePoint = routing_range.Range("0000000040", "0000000040", True, True) overlappingPartitionKeyRanges = crm.get_overlapping_ranges([onePoint]) self.assertEqual(1, len(overlappingPartitionKeyRanges)) self.assertEqual("1", overlappingPartitionKeyRanges[0][Id]) ranges = [ - routing_range._Range("0000000040", "0000000045", True, True), - routing_range._Range("0000000045", "0000000046", True, True), - routing_range._Range("0000000046", "0000000050", True, True) + routing_range.Range("0000000040", "0000000045", True, True), + routing_range.Range("0000000045", "0000000046", True, True), + routing_range.Range("0000000046", "0000000050", True, True) ] overlappingPartitionKeyRanges = crm.get_overlapping_ranges(ranges) @@ -182,12 +182,12 @@ def test_invalid_routing_map(self): collectionUniqueId = "" def createRoutingMap(): - _CollectionRoutingMap.CompleteRoutingMap(partitionKeyRanges, collectionUniqueId) + CollectionRoutingMap.CompleteRoutingMap(partitionKeyRanges, collectionUniqueId) self.assertRaises(ValueError, createRoutingMap) def test_incomplete_routing_map(self): - crm = _CollectionRoutingMap.CompleteRoutingMap( + crm = CollectionRoutingMap.CompleteRoutingMap( [ ({ 'id' : "2", 'minInclusive' : "", 'maxExclusive' : "0000000030"}, 2), ({ 'id' : "3", 'minInclusive' : "0000000031", 'maxExclusive' : "FF"}, 2), @@ -195,7 +195,7 @@ def test_incomplete_routing_map(self): , "") self.assertIsNone(crm) - crm = _CollectionRoutingMap.CompleteRoutingMap( + crm = CollectionRoutingMap.CompleteRoutingMap( [ ({ 'id' : "2", 'minInclusive' : "", 'maxExclusive' : "0000000030"}, 2), ({ 'id' : "2", 'minInclusive' : "0000000030", 'maxExclusive' : "FF"}, 2), diff --git a/sdk/cosmos/azure-cosmos/test/routing/routing_map_provider_tests.py b/sdk/cosmos/azure-cosmos/test/routing/routing_map_provider_tests.py index 252c79e418d3..2601084c6fa4 100644 --- a/sdk/cosmos/azure-cosmos/test/routing/routing_map_provider_tests.py +++ b/sdk/cosmos/azure-cosmos/test/routing/routing_map_provider_tests.py @@ -21,9 +21,9 @@ import unittest import pytest -from azure.cosmos.routing.routing_map_provider import _SmartRoutingMapProvider -from azure.cosmos.routing.routing_map_provider import _CollectionRoutingMap -from azure.cosmos.routing import routing_range as routing_range +from azure.cosmos._routing.routing_map_provider import SmartRoutingMapProvider +from azure.cosmos._routing.routing_map_provider import CollectionRoutingMap +from azure.cosmos._routing import routing_range as routing_range pytestmark = pytest.mark.cosmosEmulator @@ -43,27 +43,27 @@ def setUp(self): self.smart_routing_map_provider = self.instantiate_smart_routing_map_provider(self.partition_key_ranges) partitionRangeWithInfo = map(lambda r: (r, True), self.partition_key_ranges) - self.cached_collection_routing_map = _CollectionRoutingMap.CompleteRoutingMap(partitionRangeWithInfo, 'sample collection id') + self.cached_collection_routing_map = CollectionRoutingMap.CompleteRoutingMap(partitionRangeWithInfo, 'sample collection id') def instantiate_smart_routing_map_provider(self, partition_key_ranges): client = RoutingMapProviderTests.MockedCosmosClientConnection(partition_key_ranges) - return _SmartRoutingMapProvider(client) + return SmartRoutingMapProvider(client) def test_full_range(self): # query range is the whole partition key range - pkRange = routing_range._Range("", "FF", True, False) + pkRange = routing_range.Range("", "FF", True, False) overlapping_partition_key_ranges = self.get_overlapping_ranges([pkRange]) self.assertEqual(len(overlapping_partition_key_ranges), len(self.partition_key_ranges)) self.assertEqual(overlapping_partition_key_ranges, self.partition_key_ranges) - pkRange = routing_range._Range("", "FF", False, False) + pkRange = routing_range.Range("", "FF", False, False) overlapping_partition_key_ranges = self.get_overlapping_ranges([pkRange]) self.assertEqual(overlapping_partition_key_ranges, self.partition_key_ranges) self.assertEqual(self.cached_collection_routing_map.get_overlapping_ranges([pkRange]), self.partition_key_ranges) def test_empty_ranges(self): # query range is the whole partition key range - pkRange = routing_range._Range("", "FF", True, False) + pkRange = routing_range.Range("", "FF", True, False) overlapping_partition_key_ranges = self.get_overlapping_ranges([pkRange]) self.assertEqual(len(overlapping_partition_key_ranges), len(self.partition_key_ranges)) self.assertEqual(overlapping_partition_key_ranges, self.partition_key_ranges) @@ -73,17 +73,17 @@ def test_empty_ranges(self): self.assertEqual(len(overlapping_partition_key_ranges), 0) # validate the overlaping partition key ranges results for empty ranges is empty - empty_start_range = routing_range._Range("", "", False, True) - empty_end_range = routing_range._Range("FF", "FF", False, True) - empty_range = routing_range._Range("AA", "AA", False, True) + empty_start_range = routing_range.Range("", "", False, True) + empty_end_range = routing_range.Range("FF", "FF", False, True) + empty_range = routing_range.Range("AA", "AA", False, True) self.validate_empty_query_ranges([empty_range], [empty_start_range], [empty_end_range], [empty_start_range, empty_range], [empty_start_range, empty_end_range], [empty_range, empty_end_range], [empty_range, empty_range, empty_end_range]) def test_bad_overlapping_query_ranges(self): # they share AA point - r1 = routing_range._Range("", "AA", True, True) - r2 = routing_range._Range("AA", "FF", True, False) + r1 = routing_range.Range("", "AA", True, True) + r2 = routing_range.Range("AA", "FF", True, False) def func_one_point_overlap(): self.smart_routing_map_provider.get_overlapping_ranges("sample collection id", [r1, r2]) @@ -91,16 +91,16 @@ def func_one_point_overlap(): self.assertRaises(ValueError, func_one_point_overlap) # overlapping range - r1 = routing_range._Range("", "AB", True, False) - r2 = routing_range._Range("AA", "FA", True, False) + r1 = routing_range.Range("", "AB", True, False) + r2 = routing_range.Range("AA", "FA", True, False) def func_overlap(): self.smart_routing_map_provider.get_overlapping_ranges("sample collection id", [r1, r2]) self.assertRaises(ValueError, func_overlap) - r1 = routing_range._Range("AB", "AC", True, False) - r1 = routing_range._Range("AA", "AB", True, False) + r1 = routing_range.Range("AB", "AC", True, False) + r1 = routing_range.Range("AA", "AB", True, False) def func_non_sorted(): self.smart_routing_map_provider.get_overlapping_ranges("sample collection id", [r1, r2]) @@ -108,31 +108,31 @@ def func_non_sorted(): self.assertRaises(ValueError, func_overlap) def test_empty_ranges_are_thrown_away(self): - e1 = routing_range._Range("", "", True, False) - r1 = routing_range._Range("", "AB", True, False) - e2 = routing_range._Range("AB", "AB", True, False) - r2 = routing_range._Range("AB", "AC", True, False) - e3 = routing_range._Range("AC", "AC", True, False) - e4 = routing_range._Range("AD", "AD", True, False) + e1 = routing_range.Range("", "", True, False) + r1 = routing_range.Range("", "AB", True, False) + e2 = routing_range.Range("AB", "AB", True, False) + r2 = routing_range.Range("AB", "AC", True, False) + e3 = routing_range.Range("AC", "AC", True, False) + e4 = routing_range.Range("AD", "AD", True, False) self.validate_overlapping_ranges_results([e1, r1, e2, r2, e3, e4], self.get_overlapping_ranges([r1, r2])) self.validate_against_cached_collection_results([e1, r1, e2, r2, e3, e4]) def test_simple(self): - r = routing_range._Range("AB", "AC", True, False) + r = routing_range.Range("AB", "AC", True, False) self.validate_against_cached_collection_results([r]) ranges = [ - routing_range._Range("0000000040", "0000000045", True, False), - routing_range._Range("0000000045", "0000000046", True, False), - routing_range._Range("0000000046", "0000000050", True, False) + routing_range.Range("0000000040", "0000000045", True, False), + routing_range.Range("0000000045", "0000000046", True, False), + routing_range.Range("0000000046", "0000000050", True, False) ] self.validate_against_cached_collection_results(ranges) def test_simple_boundary(self): ranges = [ - routing_range._Range("05C1C9CD673398", "05C1D9CD673398", True, False), + routing_range.Range("05C1C9CD673398", "05C1D9CD673398", True, False), ] self.validate_against_cached_collection_results(ranges) self.validate_overlapping_ranges_results(ranges, self.partition_key_ranges[1:2]) @@ -140,10 +140,10 @@ def test_simple_boundary(self): def test_two_adjacent_boundary(self): ranges = [ # self.partition_key_ranges[1] - routing_range._Range("05C1C9CD673398", "05C1D9CD673398", True, False), + routing_range.Range("05C1C9CD673398", "05C1D9CD673398", True, False), # self.partition_key_ranges[2] - routing_range._Range("05C1D9CD673398", "05C1D9CD673399", True, False), + routing_range.Range("05C1D9CD673398", "05C1D9CD673399", True, False), ] self.validate_against_cached_collection_results(ranges) self.validate_overlapping_ranges_results(ranges, self.partition_key_ranges[1:3]) @@ -151,8 +151,8 @@ def test_two_adjacent_boundary(self): def test_two_ranges_in_one_partition_key_range(self): # two ranges fall in the same partition key range ranges = [ - routing_range._Range("05C1C9CD673400", "05C1C9CD673401", True, False), - routing_range._Range("05C1C9CD673402", "05C1C9CD673403", True, False), + routing_range.Range("05C1C9CD673400", "05C1C9CD673401", True, False), + routing_range.Range("05C1C9CD673402", "05C1C9CD673403", True, False), ] self.validate_against_cached_collection_results(ranges) @@ -161,15 +161,15 @@ def test_two_ranges_in_one_partition_key_range(self): def test_complex(self): ranges = [ # all are covered by self.partition_key_ranges[1] - routing_range._Range("05C1C9CD673398", "05C1D9CD673391", True, False), - routing_range._Range("05C1D9CD673391", "05C1D9CD673392", True, False), - routing_range._Range("05C1D9CD673393", "05C1D9CD673395", True, False), - routing_range._Range("05C1D9CD673395", "05C1D9CD673395", True, False), + routing_range.Range("05C1C9CD673398", "05C1D9CD673391", True, False), + routing_range.Range("05C1D9CD673391", "05C1D9CD673392", True, False), + routing_range.Range("05C1D9CD673393", "05C1D9CD673395", True, False), + routing_range.Range("05C1D9CD673395", "05C1D9CD673395", True, False), # all are covered by self.partition_key_ranges[4]] - routing_range._Range("05C1E9CD673398", "05C1E9CD673401", True, False), - routing_range._Range("05C1E9CD673402", "05C1E9CD673403", True, False), + routing_range.Range("05C1E9CD673398", "05C1E9CD673401", True, False), + routing_range.Range("05C1E9CD673402", "05C1E9CD673403", True, False), # empty range - routing_range._Range("FF", "FF", True, False), + routing_range.Range("FF", "FF", True, False), ] self.validate_against_cached_collection_results(ranges) self.validate_overlapping_ranges_results(ranges, [self.partition_key_ranges[1], self.partition_key_ranges[4]]) diff --git a/sdk/cosmos/azure-cosmos/test/routing_map_tests.py b/sdk/cosmos/azure-cosmos/test/routing_map_tests.py index 48bbae7b173c..f2f396700be2 100644 --- a/sdk/cosmos/azure-cosmos/test/routing_map_tests.py +++ b/sdk/cosmos/azure-cosmos/test/routing_map_tests.py @@ -23,8 +23,8 @@ import pytest import azure.cosmos.documents as documents import azure.cosmos.cosmos_client as cosmos_client -from azure.cosmos.routing.routing_map_provider import _PartitionKeyRangeCache -from azure.cosmos.routing import routing_range as routing_range +from azure.cosmos._routing.routing_map_provider import PartitionKeyRangeCache +from azure.cosmos._routing import routing_range as routing_range import test_config pytestmark = pytest.mark.cosmosEmulator @@ -66,8 +66,8 @@ def test_read_partition_key_ranges(self): def test_routing_map_provider(self): partition_key_ranges = list(self.client.client_connection._ReadPartitionKeyRanges(self.collection_link)) - routing_mp = _PartitionKeyRangeCache(self.client.client_connection) - overlapping_partition_key_ranges = routing_mp.get_overlapping_ranges(self.collection_link, routing_range._Range("", "FF", True, False)) + routing_mp = PartitionKeyRangeCache(self.client.client_connection) + overlapping_partition_key_ranges = routing_mp.get_overlapping_ranges(self.collection_link, routing_range.Range("", "FF", True, False)) self.assertEqual(len(overlapping_partition_key_ranges), len(partition_key_ranges)) self.assertEqual(overlapping_partition_key_ranges, partition_key_ranges) diff --git a/sdk/cosmos/azure-cosmos/test/session_tests.py b/sdk/cosmos/azure-cosmos/test/session_tests.py index 03c28703615b..cdd0799dafd5 100644 --- a/sdk/cosmos/azure-cosmos/test/session_tests.py +++ b/sdk/cosmos/azure-cosmos/test/session_tests.py @@ -9,8 +9,8 @@ import test_config import azure.cosmos.errors as errors from azure.cosmos.http_constants import StatusCodes, SubStatusCodes, HttpHeaders -import azure.cosmos.synchronized_request as synchronized_request -import azure.cosmos.retry_utility as retry_utility +import azure.cosmos._synchronized_request as synchronized_request +from azure.cosmos import _retry_utility pytestmark = pytest.mark.cosmosEmulator @@ -62,8 +62,8 @@ def _MockExecuteFunctionSessionReadFailureOnce(self, function, *args, **kwargs): def test_clear_session_token(self): created_document = self.created_collection.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunctionSessionReadFailureOnce + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunctionSessionReadFailureOnce try: self.created_collection.read_item(item=created_document['id'], partition_key='mypk') except errors.HTTPFailure as e: @@ -71,7 +71,7 @@ def test_clear_session_token(self): 'dbs/' + self.created_db.id + '/colls/' + self.created_collection.id), "") self.assertEqual(e.status_code, StatusCodes.NOT_FOUND) self.assertEqual(e.sub_status, SubStatusCodes.READ_SESSION_NOTAVAILABLE) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def _MockExecuteFunctionInvalidSessionToken(self, function, *args, **kwargs): response = {'_self':'dbs/90U1AA==/colls/90U1AJ4o6iA=/docs/90U1AJ4o6iABCT0AAAAABA==/', 'id':'1'} @@ -79,12 +79,12 @@ def _MockExecuteFunctionInvalidSessionToken(self, function, *args, **kwargs): return (response, headers) def test_internal_server_error_raised_for_invalid_session_token_received_from_server(self): - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunctionInvalidSessionToken + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunctionInvalidSessionToken try: self.created_collection.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}) self.fail() except errors.HTTPFailure as e: self.assertEqual(e._http_error_message, "Could not parse the received session token: 2") self.assertEqual(e.status_code, StatusCodes.INTERNAL_SERVER_ERROR) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction diff --git a/sdk/cosmos/azure-cosmos/test/session_token_unit_tests.py b/sdk/cosmos/azure-cosmos/test/session_token_unit_tests.py index ecdc2b1de238..76e9482ade4f 100644 --- a/sdk/cosmos/azure-cosmos/test/session_token_unit_tests.py +++ b/sdk/cosmos/azure-cosmos/test/session_token_unit_tests.py @@ -1,6 +1,6 @@ import unittest import pytest -from azure.cosmos.vector_session_token import VectorSessionToken +from azure.cosmos._vector_session_token import VectorSessionToken from azure.cosmos.errors import CosmosError pytestmark = pytest.mark.cosmosEmulator diff --git a/sdk/cosmos/azure-cosmos/test/streaming_failover_test.py b/sdk/cosmos/azure-cosmos/test/streaming_failover_test.py index 4a594fed9e96..73ab656627b2 100644 --- a/sdk/cosmos/azure-cosmos/test/streaming_failover_test.py +++ b/sdk/cosmos/azure-cosmos/test/streaming_failover_test.py @@ -1,13 +1,13 @@ import unittest -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection import pytest import azure.cosmos.documents as documents import azure.cosmos.errors as errors from azure.cosmos.http_constants import HttpHeaders, StatusCodes, SubStatusCodes -import azure.cosmos.retry_utility as retry_utility -import azure.cosmos.endpoint_discovery_retry_policy as endpoint_discovery_retry_policy -from azure.cosmos.request_object import _RequestObject -import azure.cosmos.global_endpoint_manager as global_endpoint_manager +from azure.cosmos import _retry_utility +from azure.cosmos import _endpoint_discovery_retry_policy +from azure.cosmos._request_object import RequestObject +import azure.cosmos._global_endpoint_manager as global_endpoint_manager import azure.cosmos.http_constants as http_constants pytestmark = pytest.mark.cosmosEmulator @@ -30,8 +30,8 @@ class TestStreamingFailover(unittest.TestCase): endpoint_sequence = [] def test_streaming_failover(self): - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunctionEndpointDiscover + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunctionEndpointDiscover connection_policy = documents.ConnectionPolicy() connection_policy.PreferredLocations = self.preferred_regional_endpoints connection_policy.DisableSSLVerification = True @@ -62,7 +62,7 @@ def test_streaming_failover(self): self.assertEqual(self.endpoint_sequence[i], self.WRITE_ENDPOINT2) cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount = self.original_get_database_account - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def mock_get_database_account(self, url_connection = None): database_account = documents.DatabaseAccount() @@ -105,16 +105,16 @@ def test_retry_policy_does_not_mark_null_locations_unavailable(self): # these functions should not be called self._read_counter = 0 self._write_counter = 0 - request = _RequestObject(http_constants.ResourceType.Document, documents._OperationType.Read) - endpointDiscovery_retry_policy = endpoint_discovery_retry_policy._EndpointDiscoveryRetryPolicy(documents.ConnectionPolicy(), endpoint_manager, request) + request = RequestObject(http_constants.ResourceType.Document, documents._OperationType.Read) + endpointDiscovery_retry_policy = _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy(documents.ConnectionPolicy(), endpoint_manager, request) endpointDiscovery_retry_policy.ShouldRetry(errors.HTTPFailure(http_constants.StatusCodes.FORBIDDEN)) self.assertEqual(self._read_counter, 0) self.assertEqual(self._write_counter, 0) self._read_counter = 0 self._write_counter = 0 - request = _RequestObject(http_constants.ResourceType.Document, documents._OperationType.Create) - endpointDiscovery_retry_policy = endpoint_discovery_retry_policy._EndpointDiscoveryRetryPolicy(documents.ConnectionPolicy(), endpoint_manager, request) + request = RequestObject(http_constants.ResourceType.Document, documents._OperationType.Create) + endpointDiscovery_retry_policy = _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy(documents.ConnectionPolicy(), endpoint_manager, request) endpointDiscovery_retry_policy.ShouldRetry(errors.HTTPFailure(http_constants.StatusCodes.FORBIDDEN)) self.assertEqual(self._read_counter, 0) self.assertEqual(self._write_counter, 0) diff --git a/sdk/cosmos/azure-cosmos/test/utils_tests.py b/sdk/cosmos/azure-cosmos/test/utils_tests.py index 0dc7d7b8315a..4349502fe854 100644 --- a/sdk/cosmos/azure-cosmos/test/utils_tests.py +++ b/sdk/cosmos/azure-cosmos/test/utils_tests.py @@ -21,7 +21,7 @@ import unittest import pytest -import azure.cosmos.utils as utils +import azure.cosmos._utils as _utils import platform import azure.cosmos.http_constants as http_constants @@ -33,7 +33,7 @@ class UtilsTests(unittest.TestCase): """ def test_user_agent(self): - user_agent = utils._get_user_agent() + user_agent = _utils.get_user_agent() expected_user_agent = "{}/{} Python/{} azure-cosmos/{}".format( platform.system(), platform.release(), platform.python_version(), From f43130c1d8d76985c778f0abe0904bd850a5079a Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:17:51 -0700 Subject: [PATCH 093/244] Accept extension of JSON content-type (#6583) * Accept extension of JSON content-type * Adding text/something+json test * Support digit --- .../azure/core/pipeline/policies/universal.py | 9 ++++----- sdk/core/azure-core/tests/test_universal_pipeline.py | 12 ++++++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/universal.py b/sdk/core/azure-core/azure/core/pipeline/policies/universal.py index b9338950ff38..77ffd69c6a39 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/universal.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/universal.py @@ -266,10 +266,9 @@ def on_response(self, request, response): class ContentDecodePolicy(SansIOHTTPPolicy): """Policy for decoding unstreamed response content. """ - JSON_MIMETYPES = [ - 'application/json', - 'text/json' # Because we're open minded people... - ] + # Accept "text" because we're open minded people... + JSON_REGEXP = re.compile(r'^(application|text)/([0-9a-z+.]+\+)?json$') + # Name used in context CONTEXT_NAME = "deserialized_data" @@ -301,7 +300,7 @@ def deserialize_from_text(cls, response, content_type=None): if content_type is None: return data - if content_type in cls.JSON_MIMETYPES: + if cls.JSON_REGEXP.match(content_type): try: return json.loads(data_as_str) except ValueError as err: diff --git a/sdk/core/azure-core/tests/test_universal_pipeline.py b/sdk/core/azure-core/tests/test_universal_pipeline.py index cc783b0d4c74..035a462d388a 100644 --- a/sdk/core/azure-core/tests/test_universal_pipeline.py +++ b/sdk/core/azure-core/tests/test_universal_pipeline.py @@ -160,6 +160,18 @@ def body(self): result = response.context["deserialized_data"] assert result["success"] is True + # Simple JSON with complex content_type + response = build_response(b'{"success": true}', content_type="application/vnd.microsoft.appconfig.kv.v1+json") + raw_deserializer.on_response(None, response) + result = response.context["deserialized_data"] + assert result["success"] is True + + # Simple JSON with complex content_type, v2 + response = build_response(b'{"success": true}', content_type="text/vnd.microsoft.appconfig.kv.v1+json") + raw_deserializer.on_response(None, response) + result = response.context["deserialized_data"] + assert result["success"] is True + # For compat, if no content-type, decode JSON response = build_response(b'"data"') raw_deserializer.on_response(None, response) From d72657cc7669450802595c7288708cd16ec4ef06 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:40:30 -0700 Subject: [PATCH 094/244] Remove docdb mgmt package from master (#6585) --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 - sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 - sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 - .../azure-mgmt-documentdb/azure/__init__.py | 1 - .../azure/mgmt/__init__.py | 1 - .../azure/mgmt/documentdb/__init__.py | 18 - .../azure/mgmt/documentdb/document_db.py | 83 -- .../azure/mgmt/documentdb/models/__init__.py | 52 - .../documentdb/models/consistency_policy.py | 50 - .../documentdb/models/database_account.py | 117 --- .../database_account_connection_string.py | 39 - ...tabase_account_create_update_parameters.py | 90 -- ..._account_list_connection_strings_result.py | 29 - .../database_account_list_keys_result.py | 53 - ...base_account_list_read_only_keys_result.py | 41 - .../models/database_account_paged.py | 27 - .../database_account_patch_parameters.py | 31 - ...abase_account_regenerate_key_parameters.py | 33 - .../documentdb/models/document_db_enums.py | 41 - .../documentdb/models/failover_policies.py | 28 - .../mgmt/documentdb/models/failover_policy.py | 48 - .../azure/mgmt/documentdb/models/location.py | 58 -- .../azure/mgmt/documentdb/models/resource.py | 54 -- .../mgmt/documentdb/operations/__init__.py | 16 - .../database_accounts_operations.py | 918 ------------------ .../azure/mgmt/documentdb/version.py | 13 - .../azure_bdist_wheel.py | 54 -- sdk/cosmos/azure-mgmt-documentdb/build.json | 5 - .../dev_requirements.txt | 1 - .../azure-mgmt-documentdb/sdk_packaging.toml | 2 - sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 - sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 -- ..._mgmt_documentdb.test_accounts_create.yaml | 193 ---- ..._mgmt_documentdb.test_accounts_delete.yaml | 467 --------- ...gmt_documentdb.test_accounts_features.yaml | 272 ------ .../tests/test_mgmt_documentdb.py | 146 --- 36 files changed, 3147 deletions(-) delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst deleted file mode 100644 index eb7345b4071e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. :changelog: - -Release History -=============== - -0.1.3 (2017-05-02) -++++++++++++++++++ - -* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix - -0.1.2 (2017-04-20) -++++++++++++++++++ - -This wheel package is now built with the azure wheel extension - -0.1.1 (2017-03-21) -++++++++++++++++++ - -* Added support for listing database account connection strings - -0.1.0 (2017-01-31) -++++++++++++++++++ - -* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in deleted file mode 100644 index 9ecaeb15de50..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst deleted file mode 100644 index a5204ea75358..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/README.rst +++ /dev/null @@ -1,52 +0,0 @@ -Microsoft Azure SDK for Python -============================== - -This is the Microsoft Azure DocumentDB Management Client Library. - -Azure Resource Manager (ARM) is the next generation of management APIs that -replace the old Azure Service Management (ASM). - -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. - -For the older Azure Service Management (ASM) libraries, see -`azure-servicemanagement-legacy `__ library. - -For a more complete set of Azure libraries, see the `azure `__ bundle package. - - -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - -Usage -===== - -For code examples, see `DocumentDB Management -`__ -on readthedocs.org. - - -Provide Feedback -================ - -If you encounter any bugs or have suggestions, please file an issue in the -`Issues `__ -section of the project. - - -.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py deleted file mode 100755 index 3ec900145f1e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .document_db import DocumentDB -from .version import VERSION - -__all__ = ['DocumentDB'] - -__version__ = VERSION - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py deleted file mode 100755 index 5eda44ab3e32..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import ServiceClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.database_accounts_operations import DatabaseAccountsOperations -from . import models - - -class DocumentDBConfiguration(AzureConfiguration): - """Configuration for DocumentDB - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") - if not base_url: - base_url = 'https://management.azure.com' - - super(DocumentDBConfiguration, self).__init__(base_url) - - self.add_user_agent('documentdb/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class DocumentDB(object): - """Azure DocumentDB Database Service Resource Provider REST API - - :ivar config: Configuration for client. - :vartype config: DocumentDBConfiguration - - :ivar database_accounts: DatabaseAccounts operations - :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2015-04-08' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.database_accounts = DatabaseAccountsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py deleted file mode 100755 index 2ed68c568a84..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .consistency_policy import ConsistencyPolicy -from .location import Location -from .failover_policy import FailoverPolicy -from .database_account import DatabaseAccount -from .failover_policies import FailoverPolicies -from .resource import Resource -from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters -from .database_account_patch_parameters import DatabaseAccountPatchParameters -from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult -from .database_account_list_keys_result import DatabaseAccountListKeysResult -from .database_account_connection_string import DatabaseAccountConnectionString -from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult -from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters -from .database_account_paged import DatabaseAccountPaged -from .document_db_enums import ( - DatabaseAccountKind, - DatabaseAccountOfferType, - DefaultConsistencyLevel, - KeyKind, -) - -__all__ = [ - 'ConsistencyPolicy', - 'Location', - 'FailoverPolicy', - 'DatabaseAccount', - 'FailoverPolicies', - 'Resource', - 'DatabaseAccountCreateUpdateParameters', - 'DatabaseAccountPatchParameters', - 'DatabaseAccountListReadOnlyKeysResult', - 'DatabaseAccountListKeysResult', - 'DatabaseAccountConnectionString', - 'DatabaseAccountListConnectionStringsResult', - 'DatabaseAccountRegenerateKeyParameters', - 'DatabaseAccountPaged', - 'DatabaseAccountKind', - 'DatabaseAccountOfferType', - 'DefaultConsistencyLevel', - 'KeyKind', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py deleted file mode 100755 index d8cefd4c0b59..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConsistencyPolicy(Model): - """The consistency policy for the DocumentDB database account. - - :param default_consistency_level: The default consistency level and - configuration settings of the DocumentDB account. Possible values include: - 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' - :type default_consistency_level: str or :class:`DefaultConsistencyLevel - ` - :param max_staleness_prefix: When used with the Bounded Staleness - consistency level, this value represents the number of stale requests - tolerated. Accepted range for this value is 1 – 2,147,483,647. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_staleness_prefix: long - :param max_interval_in_seconds: When used with the Bounded Staleness - consistency level, this value represents the time amount of staleness (in - seconds) tolerated. Accepted range for this value is 1 - 100. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_interval_in_seconds: int - """ - - _validation = { - 'default_consistency_level': {'required': True}, - 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, - 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, - 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, - 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, - } - - def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): - self.default_consistency_level = default_consistency_level - self.max_staleness_prefix = max_staleness_prefix - self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py deleted file mode 100755 index 89031adc35cb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccount(Resource): - """A DocumentDB database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param provisioning_state: - :type provisioning_state: str - :ivar document_endpoint: The connection endpoint for the DocumentDB - database account. - :vartype document_endpoint: str - :ivar database_account_offer_type: The offer type for the DocumentDB - database account. Default value: Standard. Possible values include: - 'Standard' - :vartype database_account_offer_type: str or - :class:`DatabaseAccountOfferType - ` - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - :param consistency_policy: The consistency policy for the DocumentDB - database account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :ivar write_locations: An array that contains the write location for the - DocumentDB account. - :vartype write_locations: list of :class:`Location - ` - :ivar read_locations: An array that contains of the read locations enabled - for the DocumentDB account. - :vartype read_locations: list of :class:`Location - ` - :ivar failover_policies: An array that contains the regions ordered by - their failover priorities. - :vartype failover_policies: list of :class:`FailoverPolicy - ` - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'document_endpoint': {'readonly': True}, - 'database_account_offer_type': {'readonly': True}, - 'write_locations': {'readonly': True}, - 'read_locations': {'readonly': True}, - 'failover_policies': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, - 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, - 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): - super(DatabaseAccount, self).__init__(location=location, tags=tags) - self.kind = kind - self.provisioning_state = provisioning_state - self.document_endpoint = None - self.database_account_offer_type = None - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover - self.consistency_policy = consistency_policy - self.write_locations = None - self.read_locations = None - self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py deleted file mode 100755 index db1828208069..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountConnectionString(Model): - """Connection string for the DocumentDB account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar connection_string: Value of the connection string - :vartype connection_string: str - :ivar description: Description of the connection string - :vartype description: str - """ - - _validation = { - 'connection_string': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self): - self.connection_string = None - self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py deleted file mode 100755 index 30978f482f0b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccountCreateUpdateParameters(Resource): - """Parameters to create and update DocumentDB database accounts. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param consistency_policy: The consistency policy for the DocumentDB - account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :param locations: An array that contains the georeplication locations - enabled for the DocumentDB account. - :type locations: list of :class:`Location - ` - :ivar database_account_offer_type: Default value: "Standard" . - :vartype database_account_offer_type: str - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - } - - database_account_offer_type = "Standard" - - def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): - super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) - self.kind = kind - self.consistency_policy = consistency_policy - self.locations = locations - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py deleted file mode 100755 index 7cddc00a3de1..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListConnectionStringsResult(Model): - """The connection strings for the given database account. - - :param connection_strings: An array that contains the connection strings - for the DocumentDB account. - :type connection_strings: list of :class:`DatabaseAccountConnectionString - ` - """ - - _attribute_map = { - 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, - } - - def __init__(self, connection_strings=None): - self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py deleted file mode 100755 index 4d775054ac14..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListKeysResult(Model): - """The access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_master_key: Base 64 encoded value of the primary read-write - key. - :vartype primary_master_key: str - :ivar secondary_master_key: Base 64 encoded value of the secondary - read-write key. - :vartype secondary_master_key: str - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_master_key': {'readonly': True}, - 'secondary_master_key': {'readonly': True}, - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, - 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, - 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_master_key = None - self.secondary_master_key = None - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py deleted file mode 100755 index 3330353950c6..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListReadOnlyKeysResult(Model): - """The read-only access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py deleted file mode 100755 index 4cb94909c515..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseAccountPaged(Paged): - """ - A paging container for iterating over a list of DatabaseAccount object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py deleted file mode 100755 index be78a4fd6817..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountPatchParameters(Model): - """Parameters for patching Azure DocumentDB database account properties. - - :param tags: - :type tags: dict - """ - - _validation = { - 'tags': {'required': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, tags): - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py deleted file mode 100755 index 3bff90d33db3..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountRegenerateKeyParameters(Model): - """Parameters to regenerate the keys within the database account. - - :param key_kind: The access key to regenerate. Possible values include: - 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - """ - - _validation = { - 'key_kind': {'required': True}, - } - - _attribute_map = { - 'key_kind': {'key': 'keyKind', 'type': 'str'}, - } - - def __init__(self, key_kind): - self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py deleted file mode 100755 index 1e87cecaeb2a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class DatabaseAccountKind(Enum): - - global_document_db = "GlobalDocumentDB" - mongo_db = "MongoDB" - parse = "Parse" - - -class DatabaseAccountOfferType(Enum): - - standard = "Standard" - - -class DefaultConsistencyLevel(Enum): - - eventual = "Eventual" - session = "Session" - bounded_staleness = "BoundedStaleness" - strong = "Strong" - consistent_prefix = "ConsistentPrefix" - - -class KeyKind(Enum): - - primary = "primary" - secondary = "secondary" - primary_readonly = "primaryReadonly" - secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py deleted file mode 100755 index 4c3ebff5e3b5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicies(Model): - """The list of new failover policies for the failover priority change. - - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - """ - - _attribute_map = { - 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, failover_policies=None): - self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py deleted file mode 100755 index 99cc2769403b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicy(Model): - """The failover policy for a given region of a database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region in which the database - account replicates to. Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region in which the database account - exists. - :type location_name: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py deleted file mode 100755 index 8bc82bde2c3f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Location(Model): - """A region in which the Azure DocumentDB database account is deployed. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region within the database account. - Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region. - :type location_name: str - :ivar document_endpoint: The connection endpoint for the specific region. - Example: - https://<accountName>-<locationName>.documents.azure.com:443/ - :vartype document_endpoint: str - :param provisioning_state: - :type provisioning_state: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.document_endpoint = None - self.provisioning_state = provisioning_state - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py deleted file mode 100755 index d5e887d0b78a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """A database account resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, location, tags=None): - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py deleted file mode 100755 index 27ed7c069537..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .database_accounts_operations import DatabaseAccountsOperations - -__all__ = [ - 'DatabaseAccountsOperations', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py deleted file mode 100755 index 2bb39b1f6839..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py +++ /dev/null @@ -1,918 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrestazure.azure_operation import AzureOperationPoller -import uuid - -from .. import models - - -class DatabaseAccountsOperations(object): - """DatabaseAccountsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". - """ - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-04-08" - - self.config = config - - def get( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Retrieves the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def patch( - self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): - """Patches the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param tags: - :type tags: dict - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - update_parameters = models.DatabaseAccountPatchParameters(tags=tags) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(update_parameters, 'DatabaseAccountPatchParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.patch(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def create_or_update( - self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): - """Creates or updates an Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param create_update_parameters: The parameters to provide for the - current database account. - :type create_update_parameters: - :class:`DatabaseAccountCreateUpdateParameters - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def delete( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Deletes an existing Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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 - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - def long_running_send(): - - request = self._client.delete(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def failover_priority_change( - self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): - """Changes the failover priority for the Azure DocumentDB database - account. A failover priority of 0 indicates a write region. The maximum - value for a failover priority = (total number of regions - 1). Failover - priority values must be unique for each of the regions in which the - database account exists. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(failover_parameters, 'FailoverPolicies') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - subscription. - - :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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - given resource group. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the access keys for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_connection_strings( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the connection strings for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListConnectionStringsResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_read_only_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the read-only access keys for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListReadOnlyKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def regenerate_key( - self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): - """Regenerates an access key for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param key_kind: The access key to regenerate. Possible values - include: 'primary', 'secondary', 'primaryReadonly', - 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def check_name_exists( - self, account_name, custom_headers=None, raw=False, **operation_config): - """Checks that the Azure DocumentDB account name already exists. A valid - account name may contain only lowercase letters, numbers, and the '-' - character, and must be between 3 and 50 characters. - - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: bool - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' - path_format_arguments = { - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.head(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = (response.status_code == 200) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py deleted file mode 100755 index 95ed79d29108..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.3" - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -from distutils import log as logger -import os.path - -from wheel.bdist_wheel import bdist_wheel -class azure_bdist_wheel(bdist_wheel): - """The purpose of this class is to build wheel a little differently than the sdist, - without requiring to build the wheel from the sdist (i.e. you can build the wheel - directly from source). - """ - - description = "Create an Azure wheel distribution" - - user_options = bdist_wheel.user_options + \ - [('azure-namespace-package=', None, - "Name of the deepest nspkg used")] - - def initialize_options(self): - bdist_wheel.initialize_options(self) - self.azure_namespace_package = None - - def finalize_options(self): - bdist_wheel.finalize_options(self) - if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): - raise ValueError("azure_namespace_package must finish by -nspkg") - - def run(self): - if not self.distribution.install_requires: - self.distribution.install_requires = [] - self.distribution.install_requires.append( - "{}>=2.0.0".format(self.azure_namespace_package)) - bdist_wheel.run(self) - - def write_record(self, bdist_dir, distinfo_dir): - if self.azure_namespace_package: - # Split and remove last part, assuming it's "nspkg" - subparts = self.azure_namespace_package.split('-')[0:-1] - folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] - for azure_sub_package in folder_with_init: - init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') - if os.path.isfile(init_file): - logger.info("manually remove {} while building the wheel".format(init_file)) - os.remove(init_file) - else: - raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) - bdist_wheel.write_record(self, bdist_dir, distinfo_dir) -cmdclass = { - 'bdist_wheel': azure_bdist_wheel, -} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json deleted file mode 100644 index 4d98fc12a39e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/build.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "autorest": "1.0.1-20170501-2300-nightly", - "date": "2017-05-01T20:13:42Z", - "version": "0.1.3" -} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt deleted file mode 100644 index 6ccb7f031ddd..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt +++ /dev/null @@ -1 +0,0 @@ --e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml deleted file mode 100644 index e7687fdae93b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml +++ /dev/null @@ -1,2 +0,0 @@ -[packaging] -auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg deleted file mode 100644 index 856f4164982c..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[bdist_wheel] -universal=1 -azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py deleted file mode 100644 index ddef54e31bb5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.py +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env python - -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup -try: - from azure_bdist_wheel import cmdclass -except ImportError: - from distutils import log as logger - logger.warn("Wheel is not available, disabling bdist_wheel hook") - cmdclass = {} - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-documentdb" -PACKAGE_PPRINT_NAME = "DocumentDB Management" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') - -# azure v0.x is not compatible with this package -# azure v0.x used to have a __version__ attribute (newer versions don't) -try: - import azure - try: - ver = azure.__version__ - raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' - ) - except AttributeError: - pass -except ImportError: - pass - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError('Cannot find version information') - -with open('README.rst', encoding='utf-8') as f: - readme = f.read() -with open('HISTORY.rst', encoding='utf-8') as f: - history = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + history, - license='MIT License', - author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', - classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'License :: OSI Approved :: MIT License', - ], - zip_safe=False, - packages=find_packages(), - install_requires=[ - 'msrestazure~=0.4.7', - 'azure-common~=1.1.5', - ], - cmdclass=cmdclass -) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml deleted file mode 100644 index d470d7f8673d..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml +++ /dev/null @@ -1,193 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] - method: HEAD - uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: ''} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['142'] - Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-ratelimit-remaining-tenant-reads: ['14999'] - x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] - status: {code: 404, message: NotFound} -- request: - body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], - "databaseAccountOfferType": "Standard"}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['121'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['910'] - x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Completed","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['33'] - x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml deleted file mode 100644 index e6f4e2348f8f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml +++ /dev/null @@ -1,467 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' - under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' - was not found."}}'} - headers: - Cache-Control: [no-cache] - Content-Length: ['214'] - Content-Type: [application/json; charset=utf-8] - Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-failure-cause: [gateway] - x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] - status: {code: 404, message: Not Found} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml deleted file mode 100644 index b2e4b82a9d9e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml +++ /dev/null @@ -1,272 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1144'] - x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1156'] - x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['2225'] - x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] - status: {code: 200, message: Ok} -- request: - body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['73'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 - response: - body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique - and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['170'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] - status: {code: 400, message: BadRequest} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 - response: - body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['239'] - x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] - status: {code: 200, message: Ok} -- request: - body: '{"keyKind": "primary"}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['22'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] - x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py deleted file mode 100644 index 902666a22cf0..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py +++ /dev/null @@ -1,146 +0,0 @@ -# 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. -#-------------------------------------------------------------------------- -import unittest - -import azure.mgmt.documentdb -from msrestazure.azure_exceptions import CloudError -from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer - - -class MgmtDocDBTest(AzureMgmtTestCase): - - def setUp(self): - super(MgmtDocDBTest, self).setUp() - self.client = self.create_mgmt_client( - azure.mgmt.documentdb.DocumentDB - ) - - @ResourceGroupPreparer() - def test_accounts_create(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtst') - - self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) - - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - account = async_docdb_create.result() - self.assertIsNotNone(account) - # Rest API issue - # self.assertEqual(account.name, account_name) - - @ResourceGroupPreparer() - def test_accounts_features(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtest') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - account = self.client.database_accounts.get( - resource_group.name, - account_name - ) - self.assertEqual(account.name, account_name) - - my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) - self.assertEqual(len(my_accounts), 1) - self.assertEqual(my_accounts[0].name, account_name) - - my_accounts = list(self.client.database_accounts.list()) - self.assertTrue(len(my_accounts) >= 1) - self.assertTrue(any(db.name == account_name for db in my_accounts)) - - # I guess we can make this test with no error, need to check with DocDB team - # This is an interesting test anyway, this implies that the serialization works - # and error message is available. Since this method does not return an object - # (i.e. no deserialization to test), this is a complete test. - # We are NOT here to test the RestAPI, but the Swagger file and Python code. - with self.assertRaises(CloudError) as cm: - async_change = self.client.database_accounts.failover_priority_change( - resource_group.name, - account_name, - [{ - 'location_name': self.region, - 'failover_priority': 0 - }] - ) - async_change.wait() - self.assertIn('Failover priorities must be unique', cm.exception.message) - - my_keys = self.client.database_accounts.list_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_master_key) - self.assertIsNotNone(my_keys.secondary_master_key) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - my_keys = self.client.database_accounts.list_read_only_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - async_regenerate = self.client.database_accounts.regenerate_key( - resource_group.name, - account_name, - "primary" - ) - async_regenerate.wait() - - @ResourceGroupPreparer() - def test_accounts_delete(self, resource_group, location): - account_name = self.get_resource_name('pydocumentdbtst') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - # Current implementation of msrestazure does not support 404 as a end of LRO delete - # https://github.com/Azure/msrestazure-for-python/issues/7 - async_delete = self.client.database_accounts.delete(resource_group.name, account_name) - try: - async_delete.wait() - except CloudError as err: - if err.response.status_code != 404: - raise - - -#------------------------------------------------------------------------------ -if __name__ == '__main__': - unittest.main() From 9ab788ce45fe8ea5f029a64b42b7287298f512cd Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:42:03 -0700 Subject: [PATCH 095/244] Revert "Remove docdb mgmt package from master (#6585)" (#6593) This reverts commit d2ed7d87997eac9b715ee9802c15349a12446b84. --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 + sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 + sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 + .../azure-mgmt-documentdb/azure/__init__.py | 1 + .../azure/mgmt/__init__.py | 1 + .../azure/mgmt/documentdb/__init__.py | 18 + .../azure/mgmt/documentdb/document_db.py | 83 ++ .../azure/mgmt/documentdb/models/__init__.py | 52 + .../documentdb/models/consistency_policy.py | 50 + .../documentdb/models/database_account.py | 117 +++ .../database_account_connection_string.py | 39 + ...tabase_account_create_update_parameters.py | 90 ++ ..._account_list_connection_strings_result.py | 29 + .../database_account_list_keys_result.py | 53 + ...base_account_list_read_only_keys_result.py | 41 + .../models/database_account_paged.py | 27 + .../database_account_patch_parameters.py | 31 + ...abase_account_regenerate_key_parameters.py | 33 + .../documentdb/models/document_db_enums.py | 41 + .../documentdb/models/failover_policies.py | 28 + .../mgmt/documentdb/models/failover_policy.py | 48 + .../azure/mgmt/documentdb/models/location.py | 58 ++ .../azure/mgmt/documentdb/models/resource.py | 54 ++ .../mgmt/documentdb/operations/__init__.py | 16 + .../database_accounts_operations.py | 918 ++++++++++++++++++ .../azure/mgmt/documentdb/version.py | 13 + .../azure_bdist_wheel.py | 54 ++ sdk/cosmos/azure-mgmt-documentdb/build.json | 5 + .../dev_requirements.txt | 1 + .../azure-mgmt-documentdb/sdk_packaging.toml | 2 + sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 + sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 ++ ..._mgmt_documentdb.test_accounts_create.yaml | 193 ++++ ..._mgmt_documentdb.test_accounts_delete.yaml | 467 +++++++++ ...gmt_documentdb.test_accounts_features.yaml | 272 ++++++ .../tests/test_mgmt_documentdb.py | 146 +++ 36 files changed, 3147 insertions(+) create mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in create mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json create mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt create mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst new file mode 100644 index 000000000000..eb7345b4071e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst @@ -0,0 +1,24 @@ +.. :changelog: + +Release History +=============== + +0.1.3 (2017-05-02) +++++++++++++++++++ + +* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix + +0.1.2 (2017-04-20) +++++++++++++++++++ + +This wheel package is now built with the azure wheel extension + +0.1.1 (2017-03-21) +++++++++++++++++++ + +* Added support for listing database account connection strings + +0.1.0 (2017-01-31) +++++++++++++++++++ + +* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in new file mode 100644 index 000000000000..9ecaeb15de50 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in @@ -0,0 +1,2 @@ +include *.rst +include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst new file mode 100644 index 000000000000..a5204ea75358 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/README.rst @@ -0,0 +1,52 @@ +Microsoft Azure SDK for Python +============================== + +This is the Microsoft Azure DocumentDB Management Client Library. + +Azure Resource Manager (ARM) is the next generation of management APIs that +replace the old Azure Service Management (ASM). + +This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. + +For the older Azure Service Management (ASM) libraries, see +`azure-servicemanagement-legacy `__ library. + +For a more complete set of Azure libraries, see the `azure `__ bundle package. + + +Compatibility +============= + +**IMPORTANT**: If you have an earlier version of the azure package +(version < 1.0), you should uninstall it before installing this package. + +You can check the version using pip: + +.. code:: shell + + pip freeze + +If you see azure==0.11.0 (or any version below 1.0), uninstall it first: + +.. code:: shell + + pip uninstall azure + + +Usage +===== + +For code examples, see `DocumentDB Management +`__ +on readthedocs.org. + + +Provide Feedback +================ + +If you encounter any bugs or have suggestions, please file an issue in the +`Issues `__ +section of the project. + + +.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py new file mode 100755 index 000000000000..3ec900145f1e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .document_db import DocumentDB +from .version import VERSION + +__all__ = ['DocumentDB'] + +__version__ = VERSION + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py new file mode 100755 index 000000000000..5eda44ab3e32 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import ServiceClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.database_accounts_operations import DatabaseAccountsOperations +from . import models + + +class DocumentDBConfiguration(AzureConfiguration): + """Configuration for DocumentDB + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not isinstance(subscription_id, str): + raise TypeError("Parameter 'subscription_id' must be str.") + if not base_url: + base_url = 'https://management.azure.com' + + super(DocumentDBConfiguration, self).__init__(base_url) + + self.add_user_agent('documentdb/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class DocumentDB(object): + """Azure DocumentDB Database Service Resource Provider REST API + + :ivar config: Configuration for client. + :vartype config: DocumentDBConfiguration + + :ivar database_accounts: DatabaseAccounts operations + :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) + self._client = ServiceClient(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2015-04-08' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.database_accounts = DatabaseAccountsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py new file mode 100755 index 000000000000..2ed68c568a84 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .consistency_policy import ConsistencyPolicy +from .location import Location +from .failover_policy import FailoverPolicy +from .database_account import DatabaseAccount +from .failover_policies import FailoverPolicies +from .resource import Resource +from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters +from .database_account_patch_parameters import DatabaseAccountPatchParameters +from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult +from .database_account_list_keys_result import DatabaseAccountListKeysResult +from .database_account_connection_string import DatabaseAccountConnectionString +from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult +from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters +from .database_account_paged import DatabaseAccountPaged +from .document_db_enums import ( + DatabaseAccountKind, + DatabaseAccountOfferType, + DefaultConsistencyLevel, + KeyKind, +) + +__all__ = [ + 'ConsistencyPolicy', + 'Location', + 'FailoverPolicy', + 'DatabaseAccount', + 'FailoverPolicies', + 'Resource', + 'DatabaseAccountCreateUpdateParameters', + 'DatabaseAccountPatchParameters', + 'DatabaseAccountListReadOnlyKeysResult', + 'DatabaseAccountListKeysResult', + 'DatabaseAccountConnectionString', + 'DatabaseAccountListConnectionStringsResult', + 'DatabaseAccountRegenerateKeyParameters', + 'DatabaseAccountPaged', + 'DatabaseAccountKind', + 'DatabaseAccountOfferType', + 'DefaultConsistencyLevel', + 'KeyKind', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py new file mode 100755 index 000000000000..d8cefd4c0b59 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConsistencyPolicy(Model): + """The consistency policy for the DocumentDB database account. + + :param default_consistency_level: The default consistency level and + configuration settings of the DocumentDB account. Possible values include: + 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' + :type default_consistency_level: str or :class:`DefaultConsistencyLevel + ` + :param max_staleness_prefix: When used with the Bounded Staleness + consistency level, this value represents the number of stale requests + tolerated. Accepted range for this value is 1 – 2,147,483,647. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_staleness_prefix: long + :param max_interval_in_seconds: When used with the Bounded Staleness + consistency level, this value represents the time amount of staleness (in + seconds) tolerated. Accepted range for this value is 1 - 100. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_interval_in_seconds: int + """ + + _validation = { + 'default_consistency_level': {'required': True}, + 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, + 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, + 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, + 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, + } + + def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): + self.default_consistency_level = default_consistency_level + self.max_staleness_prefix = max_staleness_prefix + self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py new file mode 100755 index 000000000000..89031adc35cb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py @@ -0,0 +1,117 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccount(Resource): + """A DocumentDB database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param provisioning_state: + :type provisioning_state: str + :ivar document_endpoint: The connection endpoint for the DocumentDB + database account. + :vartype document_endpoint: str + :ivar database_account_offer_type: The offer type for the DocumentDB + database account. Default value: Standard. Possible values include: + 'Standard' + :vartype database_account_offer_type: str or + :class:`DatabaseAccountOfferType + ` + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + :param consistency_policy: The consistency policy for the DocumentDB + database account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :ivar write_locations: An array that contains the write location for the + DocumentDB account. + :vartype write_locations: list of :class:`Location + ` + :ivar read_locations: An array that contains of the read locations enabled + for the DocumentDB account. + :vartype read_locations: list of :class:`Location + ` + :ivar failover_policies: An array that contains the regions ordered by + their failover priorities. + :vartype failover_policies: list of :class:`FailoverPolicy + ` + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'document_endpoint': {'readonly': True}, + 'database_account_offer_type': {'readonly': True}, + 'write_locations': {'readonly': True}, + 'read_locations': {'readonly': True}, + 'failover_policies': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, + 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, + 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): + super(DatabaseAccount, self).__init__(location=location, tags=tags) + self.kind = kind + self.provisioning_state = provisioning_state + self.document_endpoint = None + self.database_account_offer_type = None + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover + self.consistency_policy = consistency_policy + self.write_locations = None + self.read_locations = None + self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py new file mode 100755 index 000000000000..db1828208069 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountConnectionString(Model): + """Connection string for the DocumentDB account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar connection_string: Value of the connection string + :vartype connection_string: str + :ivar description: Description of the connection string + :vartype description: str + """ + + _validation = { + 'connection_string': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self): + self.connection_string = None + self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py new file mode 100755 index 000000000000..30978f482f0b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccountCreateUpdateParameters(Resource): + """Parameters to create and update DocumentDB database accounts. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param consistency_policy: The consistency policy for the DocumentDB + account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :param locations: An array that contains the georeplication locations + enabled for the DocumentDB account. + :type locations: list of :class:`Location + ` + :ivar database_account_offer_type: Default value: "Standard" . + :vartype database_account_offer_type: str + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'locations': {'required': True}, + 'database_account_offer_type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + } + + database_account_offer_type = "Standard" + + def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): + super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) + self.kind = kind + self.consistency_policy = consistency_policy + self.locations = locations + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py new file mode 100755 index 000000000000..7cddc00a3de1 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListConnectionStringsResult(Model): + """The connection strings for the given database account. + + :param connection_strings: An array that contains the connection strings + for the DocumentDB account. + :type connection_strings: list of :class:`DatabaseAccountConnectionString + ` + """ + + _attribute_map = { + 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, + } + + def __init__(self, connection_strings=None): + self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py new file mode 100755 index 000000000000..4d775054ac14 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListKeysResult(Model): + """The access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_master_key: Base 64 encoded value of the primary read-write + key. + :vartype primary_master_key: str + :ivar secondary_master_key: Base 64 encoded value of the secondary + read-write key. + :vartype secondary_master_key: str + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_master_key': {'readonly': True}, + 'secondary_master_key': {'readonly': True}, + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, + 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, + 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_master_key = None + self.secondary_master_key = None + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py new file mode 100755 index 000000000000..3330353950c6 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListReadOnlyKeysResult(Model): + """The read-only access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py new file mode 100755 index 000000000000..4cb94909c515 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class DatabaseAccountPaged(Paged): + """ + A paging container for iterating over a list of DatabaseAccount object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py new file mode 100755 index 000000000000..be78a4fd6817 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountPatchParameters(Model): + """Parameters for patching Azure DocumentDB database account properties. + + :param tags: + :type tags: dict + """ + + _validation = { + 'tags': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, tags): + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py new file mode 100755 index 000000000000..3bff90d33db3 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountRegenerateKeyParameters(Model): + """Parameters to regenerate the keys within the database account. + + :param key_kind: The access key to regenerate. Possible values include: + 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + """ + + _validation = { + 'key_kind': {'required': True}, + } + + _attribute_map = { + 'key_kind': {'key': 'keyKind', 'type': 'str'}, + } + + def __init__(self, key_kind): + self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py new file mode 100755 index 000000000000..1e87cecaeb2a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class DatabaseAccountKind(Enum): + + global_document_db = "GlobalDocumentDB" + mongo_db = "MongoDB" + parse = "Parse" + + +class DatabaseAccountOfferType(Enum): + + standard = "Standard" + + +class DefaultConsistencyLevel(Enum): + + eventual = "Eventual" + session = "Session" + bounded_staleness = "BoundedStaleness" + strong = "Strong" + consistent_prefix = "ConsistentPrefix" + + +class KeyKind(Enum): + + primary = "primary" + secondary = "secondary" + primary_readonly = "primaryReadonly" + secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py new file mode 100755 index 000000000000..4c3ebff5e3b5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicies(Model): + """The list of new failover policies for the failover priority change. + + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + """ + + _attribute_map = { + 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, failover_policies=None): + self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py new file mode 100755 index 000000000000..99cc2769403b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicy(Model): + """The failover policy for a given region of a database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region in which the database + account replicates to. Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region in which the database account + exists. + :type location_name: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py new file mode 100755 index 000000000000..8bc82bde2c3f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Location(Model): + """A region in which the Azure DocumentDB database account is deployed. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region within the database account. + Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region. + :type location_name: str + :ivar document_endpoint: The connection endpoint for the specific region. + Example: + https://<accountName>-<locationName>.documents.azure.com:443/ + :vartype document_endpoint: str + :param provisioning_state: + :type provisioning_state: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'document_endpoint': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.document_endpoint = None + self.provisioning_state = provisioning_state + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py new file mode 100755 index 000000000000..d5e887d0b78a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """A database account resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, location, tags=None): + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py new file mode 100755 index 000000000000..27ed7c069537 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py @@ -0,0 +1,16 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .database_accounts_operations import DatabaseAccountsOperations + +__all__ = [ + 'DatabaseAccountsOperations', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py new file mode 100755 index 000000000000..2bb39b1f6839 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py @@ -0,0 +1,918 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrestazure.azure_operation import AzureOperationPoller +import uuid + +from .. import models + + +class DatabaseAccountsOperations(object): + """DatabaseAccountsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". + """ + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-04-08" + + self.config = config + + def get( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Retrieves the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def patch( + self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): + """Patches the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param tags: + :type tags: dict + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + update_parameters = models.DatabaseAccountPatchParameters(tags=tags) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(update_parameters, 'DatabaseAccountPatchParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.patch(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def create_or_update( + self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates an Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param create_update_parameters: The parameters to provide for the + current database account. + :type create_update_parameters: + :class:`DatabaseAccountCreateUpdateParameters + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.put(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def delete( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Deletes an existing Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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 + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + def long_running_send(): + + request = self._client.delete(url, query_parameters) + return self._client.send(request, header_parameters, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def failover_priority_change( + self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): + """Changes the failover priority for the Azure DocumentDB database + account. A failover priority of 0 indicates a write region. The maximum + value for a failover priority = (total number of regions - 1). Failover + priority values must be unique for each of the regions in which the + database account exists. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(failover_parameters, 'FailoverPolicies') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + subscription. + + :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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + given resource group. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the access keys for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_connection_strings( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the connection strings for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListConnectionStringsResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_read_only_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the read-only access keys for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListReadOnlyKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def regenerate_key( + self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): + """Regenerates an access key for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param key_kind: The access key to regenerate. Possible values + include: 'primary', 'secondary', 'primaryReadonly', + 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def check_name_exists( + self, account_name, custom_headers=None, raw=False, **operation_config): + """Checks that the Azure DocumentDB account name already exists. A valid + account name may contain only lowercase letters, numbers, and the '-' + character, and must be between 3 and 50 characters. + + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: bool + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' + path_format_arguments = { + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.head(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = (response.status_code == 200) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py new file mode 100755 index 000000000000..95ed79d29108 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.3" + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py new file mode 100644 index 000000000000..8a81d1b61775 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py @@ -0,0 +1,54 @@ +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +from distutils import log as logger +import os.path + +from wheel.bdist_wheel import bdist_wheel +class azure_bdist_wheel(bdist_wheel): + """The purpose of this class is to build wheel a little differently than the sdist, + without requiring to build the wheel from the sdist (i.e. you can build the wheel + directly from source). + """ + + description = "Create an Azure wheel distribution" + + user_options = bdist_wheel.user_options + \ + [('azure-namespace-package=', None, + "Name of the deepest nspkg used")] + + def initialize_options(self): + bdist_wheel.initialize_options(self) + self.azure_namespace_package = None + + def finalize_options(self): + bdist_wheel.finalize_options(self) + if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): + raise ValueError("azure_namespace_package must finish by -nspkg") + + def run(self): + if not self.distribution.install_requires: + self.distribution.install_requires = [] + self.distribution.install_requires.append( + "{}>=2.0.0".format(self.azure_namespace_package)) + bdist_wheel.run(self) + + def write_record(self, bdist_dir, distinfo_dir): + if self.azure_namespace_package: + # Split and remove last part, assuming it's "nspkg" + subparts = self.azure_namespace_package.split('-')[0:-1] + folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] + for azure_sub_package in folder_with_init: + init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') + if os.path.isfile(init_file): + logger.info("manually remove {} while building the wheel".format(init_file)) + os.remove(init_file) + else: + raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) + bdist_wheel.write_record(self, bdist_dir, distinfo_dir) +cmdclass = { + 'bdist_wheel': azure_bdist_wheel, +} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json new file mode 100644 index 000000000000..4d98fc12a39e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/build.json @@ -0,0 +1,5 @@ +{ + "autorest": "1.0.1-20170501-2300-nightly", + "date": "2017-05-01T20:13:42Z", + "version": "0.1.3" +} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt new file mode 100644 index 000000000000..6ccb7f031ddd --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt @@ -0,0 +1 @@ +-e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml new file mode 100644 index 000000000000..e7687fdae93b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg new file mode 100644 index 000000000000..856f4164982c --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg @@ -0,0 +1,3 @@ +[bdist_wheel] +universal=1 +azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py new file mode 100644 index 000000000000..ddef54e31bb5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup +try: + from azure_bdist_wheel import cmdclass +except ImportError: + from distutils import log as logger + logger.warn("Wheel is not available, disabling bdist_wheel hook") + cmdclass = {} + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-documentdb" +PACKAGE_PPRINT_NAME = "DocumentDB Management" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.rst', encoding='utf-8') as f: + readme = f.read() +with open('HISTORY.rst', encoding='utf-8') as f: + history = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + history, + license='MIT License', + author='Microsoft Corporation', + author_email='ptvshelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(), + install_requires=[ + 'msrestazure~=0.4.7', + 'azure-common~=1.1.5', + ], + cmdclass=cmdclass +) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml new file mode 100644 index 000000000000..d470d7f8673d --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml @@ -0,0 +1,193 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] + method: HEAD + uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: ''} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['142'] + Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-ratelimit-remaining-tenant-reads: ['14999'] + x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] + status: {code: 404, message: NotFound} +- request: + body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], + "databaseAccountOfferType": "Standard"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['121'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['910'] + x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Completed","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['33'] + x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml new file mode 100644 index 000000000000..e6f4e2348f8f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml @@ -0,0 +1,467 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' + under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' + was not found."}}'} + headers: + Cache-Control: [no-cache] + Content-Length: ['214'] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-failure-cause: [gateway] + x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] + status: {code: 404, message: Not Found} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml new file mode 100644 index 000000000000..b2e4b82a9d9e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml @@ -0,0 +1,272 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1144'] + x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1156'] + x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2225'] + x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] + status: {code: 200, message: Ok} +- request: + body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['73'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 + response: + body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique + and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['170'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] + status: {code: 400, message: BadRequest} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 + response: + body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['239'] + x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] + status: {code: 200, message: Ok} +- request: + body: '{"keyKind": "primary"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['22'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] + x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py new file mode 100644 index 000000000000..902666a22cf0 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py @@ -0,0 +1,146 @@ +# 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. +#-------------------------------------------------------------------------- +import unittest + +import azure.mgmt.documentdb +from msrestazure.azure_exceptions import CloudError +from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer + + +class MgmtDocDBTest(AzureMgmtTestCase): + + def setUp(self): + super(MgmtDocDBTest, self).setUp() + self.client = self.create_mgmt_client( + azure.mgmt.documentdb.DocumentDB + ) + + @ResourceGroupPreparer() + def test_accounts_create(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtst') + + self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) + + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + account = async_docdb_create.result() + self.assertIsNotNone(account) + # Rest API issue + # self.assertEqual(account.name, account_name) + + @ResourceGroupPreparer() + def test_accounts_features(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtest') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + account = self.client.database_accounts.get( + resource_group.name, + account_name + ) + self.assertEqual(account.name, account_name) + + my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) + self.assertEqual(len(my_accounts), 1) + self.assertEqual(my_accounts[0].name, account_name) + + my_accounts = list(self.client.database_accounts.list()) + self.assertTrue(len(my_accounts) >= 1) + self.assertTrue(any(db.name == account_name for db in my_accounts)) + + # I guess we can make this test with no error, need to check with DocDB team + # This is an interesting test anyway, this implies that the serialization works + # and error message is available. Since this method does not return an object + # (i.e. no deserialization to test), this is a complete test. + # We are NOT here to test the RestAPI, but the Swagger file and Python code. + with self.assertRaises(CloudError) as cm: + async_change = self.client.database_accounts.failover_priority_change( + resource_group.name, + account_name, + [{ + 'location_name': self.region, + 'failover_priority': 0 + }] + ) + async_change.wait() + self.assertIn('Failover priorities must be unique', cm.exception.message) + + my_keys = self.client.database_accounts.list_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_master_key) + self.assertIsNotNone(my_keys.secondary_master_key) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + my_keys = self.client.database_accounts.list_read_only_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + async_regenerate = self.client.database_accounts.regenerate_key( + resource_group.name, + account_name, + "primary" + ) + async_regenerate.wait() + + @ResourceGroupPreparer() + def test_accounts_delete(self, resource_group, location): + account_name = self.get_resource_name('pydocumentdbtst') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + # Current implementation of msrestazure does not support 404 as a end of LRO delete + # https://github.com/Azure/msrestazure-for-python/issues/7 + async_delete = self.client.database_accounts.delete(resource_group.name, account_name) + try: + async_delete.wait() + except CloudError as err: + if err.response.status_code != 404: + raise + + +#------------------------------------------------------------------------------ +if __name__ == '__main__': + unittest.main() From 7894cfabe62eb3fe360de084b607fa68979b0c0f Mon Sep 17 00:00:00 2001 From: "openapi-bot[bot]" <37845953+openapi-bot[bot]@users.noreply.github.com> Date: Thu, 1 Aug 2019 05:35:08 +0000 Subject: [PATCH 096/244] Generated from 368b5914a375e09ef413285c932b72038a8af7e4 (#48) fix: sql preview model validation errors - Remove empty "body" for RESPONSE_SCHEMA_NOT_IN_SPEC errors - IsAzureMonitorTargetEnabled -> isAzureMonitorTargetEnabled - "State" -> "state" - emailAccountAdmins "true" -> true - Add 202 response for RestorePoints_Create - password -> certPassword for ManagedInstanceTdeCertificates_Create and TdeCertificates_Create --- .../azure-mgmt-sql/azure/mgmt/sql/__init__.py | 7 +- .../azure/mgmt/sql/_configuration.py | 49 + ...nt_client.py => _sql_management_client.py} | 215 +- .../azure/mgmt/sql/models/__init__.py | 1004 +- .../azure/mgmt/sql/models/_models.py | 8891 +++++++++++++++++ .../azure/mgmt/sql/models/_models_py3.py | 8891 +++++++++++++++++ .../azure/mgmt/sql/models/_paged_models.py | 885 ++ ...ums.py => _sql_management_client_enums.py} | 49 +- .../sql/models/automatic_tuning_options.py | 57 - .../models/automatic_tuning_options_py3.py | 57 - .../models/automatic_tuning_server_options.py | 56 - .../automatic_tuning_server_options_py3.py | 56 - .../backup_long_term_retention_policy.py | 62 - .../backup_long_term_retention_policy_py3.py | 62 - .../backup_short_term_retention_policy.py | 47 - ...ackup_short_term_retention_policy_paged.py | 27 - .../backup_short_term_retention_policy_py3.py | 47 - .../models/check_name_availability_request.py | 44 - .../check_name_availability_request_py3.py | 44 - .../check_name_availability_response.py | 54 - .../check_name_availability_response_py3.py | 54 - .../complete_database_restore_definition.py | 35 - ...omplete_database_restore_definition_py3.py | 35 - ...reate_database_restore_point_definition.py | 35 - ...e_database_restore_point_definition_py3.py | 35 - .../mgmt/sql/models/data_masking_policy.py | 80 - .../sql/models/data_masking_policy_py3.py | 80 - .../mgmt/sql/models/data_masking_rule.py | 129 - .../sql/models/data_masking_rule_paged.py | 27 - .../mgmt/sql/models/data_masking_rule_py3.py | 129 - .../azure/mgmt/sql/models/database.py | 237 - .../sql/models/database_automatic_tuning.py | 57 - .../models/database_automatic_tuning_py3.py | 57 - .../models/database_blob_auditing_policy.py | 165 - .../database_blob_auditing_policy_py3.py | 165 - .../mgmt/sql/models/database_operation.py | 115 - .../sql/models/database_operation_paged.py | 27 - .../mgmt/sql/models/database_operation_py3.py | 115 - .../azure/mgmt/sql/models/database_paged.py | 27 - .../azure/mgmt/sql/models/database_py3.py | 237 - .../models/database_security_alert_policy.py | 102 - .../database_security_alert_policy_py3.py | 102 - .../azure/mgmt/sql/models/database_update.py | 209 - .../mgmt/sql/models/database_update_py3.py | 209 - .../azure/mgmt/sql/models/database_usage.py | 66 - .../mgmt/sql/models/database_usage_paged.py | 27 - .../mgmt/sql/models/database_usage_py3.py | 66 - .../database_vulnerability_assessment.py | 67 - ...database_vulnerability_assessment_paged.py | 27 - .../database_vulnerability_assessment_py3.py | 67 - ..._vulnerability_assessment_rule_baseline.py | 50 - ...erability_assessment_rule_baseline_item.py | 35 - ...ility_assessment_rule_baseline_item_py3.py | 35 - ...nerability_assessment_rule_baseline_py3.py | 50 - ...e_vulnerability_assessment_scans_export.py | 48 - ...lnerability_assessment_scans_export_py3.py | 48 - .../mgmt/sql/models/edition_capability.py | 58 - .../mgmt/sql/models/edition_capability_py3.py | 58 - .../azure/mgmt/sql/models/elastic_pool.py | 95 - .../mgmt/sql/models/elastic_pool_activity.py | 151 - .../sql/models/elastic_pool_activity_paged.py | 27 - .../sql/models/elastic_pool_activity_py3.py | 151 - .../models/elastic_pool_database_activity.py | 125 - .../elastic_pool_database_activity_paged.py | 27 - .../elastic_pool_database_activity_py3.py | 125 - .../models/elastic_pool_edition_capability.py | 58 - .../elastic_pool_edition_capability_py3.py | 58 - .../mgmt/sql/models/elastic_pool_operation.py | 114 - .../models/elastic_pool_operation_paged.py | 27 - .../sql/models/elastic_pool_operation_py3.py | 114 - .../mgmt/sql/models/elastic_pool_paged.py | 27 - ...tabase_max_performance_level_capability.py | 58 - ...se_max_performance_level_capability_py3.py | 58 - ...tabase_min_performance_level_capability.py | 51 - ...se_min_performance_level_capability_py3.py | 51 - .../elastic_pool_per_database_settings.py | 32 - .../elastic_pool_per_database_settings_py3.py | 32 - ...astic_pool_performance_level_capability.py | 88 - ...c_pool_performance_level_capability_py3.py | 88 - .../azure/mgmt/sql/models/elastic_pool_py3.py | 95 - .../mgmt/sql/models/elastic_pool_update.py | 54 - .../sql/models/elastic_pool_update_py3.py | 54 - .../mgmt/sql/models/encryption_protector.py | 80 - .../sql/models/encryption_protector_paged.py | 27 - .../sql/models/encryption_protector_py3.py | 80 - .../azure/mgmt/sql/models/export_request.py | 63 - .../mgmt/sql/models/export_request_py3.py | 63 - .../extended_database_blob_auditing_policy.py | 165 - ...ended_database_blob_auditing_policy_py3.py | 165 - .../extended_server_blob_auditing_policy.py | 165 - ...xtended_server_blob_auditing_policy_py3.py | 165 - .../azure/mgmt/sql/models/failover_group.py | 88 - .../mgmt/sql/models/failover_group_paged.py | 27 - .../mgmt/sql/models/failover_group_py3.py | 88 - .../failover_group_read_only_endpoint.py | 30 - .../failover_group_read_only_endpoint_py3.py | 30 - .../failover_group_read_write_endpoint.py | 45 - .../failover_group_read_write_endpoint_py3.py | 45 - .../mgmt/sql/models/failover_group_update.py | 44 - .../sql/models/failover_group_update_py3.py | 44 - .../azure/mgmt/sql/models/firewall_rule.py | 68 - .../mgmt/sql/models/firewall_rule_paged.py | 27 - .../mgmt/sql/models/firewall_rule_py3.py | 68 - .../mgmt/sql/models/geo_backup_policy.py | 66 - .../sql/models/geo_backup_policy_paged.py | 27 - .../mgmt/sql/models/geo_backup_policy_py3.py | 66 - .../mgmt/sql/models/import_export_response.py | 87 - .../sql/models/import_export_response_py3.py | 87 - .../sql/models/import_extension_request.py | 81 - .../models/import_extension_request_py3.py | 81 - .../azure/mgmt/sql/models/import_request.py | 91 - .../mgmt/sql/models/import_request_py3.py | 91 - .../sql/models/instance_failover_group.py | 82 - .../models/instance_failover_group_paged.py | 27 - .../sql/models/instance_failover_group_py3.py | 82 - ...tance_failover_group_read_only_endpoint.py | 30 - ...e_failover_group_read_only_endpoint_py3.py | 30 - ...ance_failover_group_read_write_endpoint.py | 45 - ..._failover_group_read_write_endpoint_py3.py | 45 - .../azure/mgmt/sql/models/job.py | 56 - .../azure/mgmt/sql/models/job_agent.py | 67 - .../azure/mgmt/sql/models/job_agent_paged.py | 27 - .../azure/mgmt/sql/models/job_agent_py3.py | 67 - .../azure/mgmt/sql/models/job_agent_update.py | 28 - .../mgmt/sql/models/job_agent_update_py3.py | 28 - .../azure/mgmt/sql/models/job_credential.py | 55 - .../mgmt/sql/models/job_credential_paged.py | 27 - .../mgmt/sql/models/job_credential_py3.py | 55 - .../azure/mgmt/sql/models/job_execution.py | 113 - .../mgmt/sql/models/job_execution_paged.py | 27 - .../mgmt/sql/models/job_execution_py3.py | 113 - .../mgmt/sql/models/job_execution_target.py | 46 - .../sql/models/job_execution_target_py3.py | 46 - .../azure/mgmt/sql/models/job_paged.py | 27 - .../azure/mgmt/sql/models/job_py3.py | 56 - .../azure/mgmt/sql/models/job_schedule.py | 48 - .../azure/mgmt/sql/models/job_schedule_py3.py | 48 - .../azure/mgmt/sql/models/job_step.py | 75 - .../azure/mgmt/sql/models/job_step_action.py | 45 - .../mgmt/sql/models/job_step_action_py3.py | 45 - .../sql/models/job_step_execution_options.py | 49 - .../models/job_step_execution_options_py3.py | 49 - .../azure/mgmt/sql/models/job_step_output.py | 67 - .../mgmt/sql/models/job_step_output_py3.py | 67 - .../azure/mgmt/sql/models/job_step_paged.py | 27 - .../azure/mgmt/sql/models/job_step_py3.py | 75 - .../azure/mgmt/sql/models/job_target.py | 65 - .../azure/mgmt/sql/models/job_target_group.py | 49 - .../mgmt/sql/models/job_target_group_paged.py | 27 - .../mgmt/sql/models/job_target_group_py3.py | 49 - .../azure/mgmt/sql/models/job_target_py3.py | 65 - .../azure/mgmt/sql/models/job_version.py | 42 - .../mgmt/sql/models/job_version_paged.py | 27 - .../azure/mgmt/sql/models/job_version_py3.py | 42 - .../sql/models/license_type_capability.py | 45 - .../sql/models/license_type_capability_py3.py | 45 - .../mgmt/sql/models/location_capabilities.py | 58 - .../sql/models/location_capabilities_py3.py | 58 - .../mgmt/sql/models/log_size_capability.py | 41 - .../sql/models/log_size_capability_py3.py | 41 - .../sql/models/long_term_retention_backup.py | 73 - .../long_term_retention_backup_paged.py | 27 - .../models/long_term_retention_backup_py3.py | 73 - ...aged_backup_short_term_retention_policy.py | 47 - ...ackup_short_term_retention_policy_paged.py | 27 - ..._backup_short_term_retention_policy_py3.py | 47 - .../azure/mgmt/sql/models/managed_database.py | 136 - .../mgmt/sql/models/managed_database_paged.py | 27 - .../mgmt/sql/models/managed_database_py3.py | 136 - .../managed_database_security_alert_policy.py | 88 - ...ed_database_security_alert_policy_paged.py | 27 - ...aged_database_security_alert_policy_py3.py | 88 - .../sql/models/managed_database_update.py | 119 - .../sql/models/managed_database_update_py3.py | 119 - .../azure/mgmt/sql/models/managed_instance.py | 139 - .../managed_instance_edition_capability.py | 51 - ...managed_instance_edition_capability_py3.py | 51 - .../managed_instance_encryption_protector.py | 71 - ...ged_instance_encryption_protector_paged.py | 27 - ...naged_instance_encryption_protector_py3.py | 71 - .../managed_instance_family_capability.py | 73 - .../managed_instance_family_capability_py3.py | 73 - .../mgmt/sql/models/managed_instance_key.py | 72 - .../sql/models/managed_instance_key_paged.py | 27 - .../sql/models/managed_instance_key_py3.py | 72 - .../mgmt/sql/models/managed_instance_paged.py | 27 - .../sql/models/managed_instance_pair_info.py | 34 - .../models/managed_instance_pair_info_py3.py | 34 - .../mgmt/sql/models/managed_instance_py3.py | 139 - .../sql/models/managed_instance_update.py | 117 - .../sql/models/managed_instance_update_py3.py | 117 - .../managed_instance_vcores_capability.py | 50 - .../managed_instance_vcores_capability_py3.py | 50 - .../managed_instance_version_capability.py | 51 - ...managed_instance_version_capability_py3.py | 51 - ...naged_instance_vulnerability_assessment.py | 70 - ...instance_vulnerability_assessment_paged.py | 27 - ...d_instance_vulnerability_assessment_py3.py | 70 - .../managed_server_security_alert_policy.py | 88 - ...aged_server_security_alert_policy_paged.py | 27 - ...anaged_server_security_alert_policy_py3.py | 88 - .../mgmt/sql/models/max_size_capability.py | 41 - .../sql/models/max_size_capability_py3.py | 41 - .../sql/models/max_size_range_capability.py | 61 - .../models/max_size_range_capability_py3.py | 61 - .../azure/mgmt/sql/models/metric.py | 62 - .../mgmt/sql/models/metric_availability.py | 40 - .../sql/models/metric_availability_py3.py | 40 - .../mgmt/sql/models/metric_definition.py | 61 - .../sql/models/metric_definition_paged.py | 27 - .../mgmt/sql/models/metric_definition_py3.py | 61 - .../azure/mgmt/sql/models/metric_name.py | 40 - .../azure/mgmt/sql/models/metric_name_py3.py | 40 - .../azure/mgmt/sql/models/metric_paged.py | 27 - .../azure/mgmt/sql/models/metric_py3.py | 62 - .../azure/mgmt/sql/models/metric_value.py | 60 - .../azure/mgmt/sql/models/metric_value_py3.py | 60 - .../azure/mgmt/sql/models/operation.py | 53 - .../mgmt/sql/models/operation_display.py | 51 - .../mgmt/sql/models/operation_display_py3.py | 51 - .../azure/mgmt/sql/models/operation_impact.py | 51 - .../mgmt/sql/models/operation_impact_py3.py | 51 - .../azure/mgmt/sql/models/operation_paged.py | 27 - .../azure/mgmt/sql/models/operation_py3.py | 53 - .../azure/mgmt/sql/models/partner_info.py | 49 - .../azure/mgmt/sql/models/partner_info_py3.py | 49 - .../mgmt/sql/models/partner_region_info.py | 41 - .../sql/models/partner_region_info_py3.py | 41 - .../models/performance_level_capability.py | 41 - .../performance_level_capability_py3.py | 41 - .../azure/mgmt/sql/models/proxy_resource.py | 42 - .../mgmt/sql/models/proxy_resource_py3.py | 42 - .../sql/models/recommended_elastic_pool.py | 100 - .../models/recommended_elastic_pool_metric.py | 37 - .../recommended_elastic_pool_metric_paged.py | 27 - .../recommended_elastic_pool_metric_py3.py | 37 - .../models/recommended_elastic_pool_paged.py | 27 - .../models/recommended_elastic_pool_py3.py | 100 - .../mgmt/sql/models/recommended_index.py | 112 - .../mgmt/sql/models/recommended_index_py3.py | 112 - .../mgmt/sql/models/recoverable_database.py | 64 - .../sql/models/recoverable_database_paged.py | 27 - .../sql/models/recoverable_database_py3.py | 64 - .../models/recoverable_managed_database.py | 47 - .../recoverable_managed_database_paged.py | 27 - .../recoverable_managed_database_py3.py | 47 - .../azure/mgmt/sql/models/replication_link.py | 104 - .../mgmt/sql/models/replication_link_paged.py | 27 - .../mgmt/sql/models/replication_link_py3.py | 104 - .../azure/mgmt/sql/models/resource.py | 45 - .../mgmt/sql/models/resource_identity.py | 46 - .../mgmt/sql/models/resource_identity_py3.py | 46 - .../sql/models/resource_move_definition.py | 34 - .../models/resource_move_definition_py3.py | 34 - .../azure/mgmt/sql/models/resource_py3.py | 45 - .../sql/models/restorable_dropped_database.py | 89 - .../restorable_dropped_database_paged.py | 27 - .../models/restorable_dropped_database_py3.py | 89 - .../restorable_dropped_managed_database.py | 72 - ...storable_dropped_managed_database_paged.py | 27 - ...restorable_dropped_managed_database_py3.py | 72 - .../azure/mgmt/sql/models/restore_point.py | 71 - .../mgmt/sql/models/restore_point_paged.py | 27 - .../mgmt/sql/models/restore_point_py3.py | 71 - .../mgmt/sql/models/sensitivity_label.py | 58 - .../sql/models/sensitivity_label_paged.py | 27 - .../mgmt/sql/models/sensitivity_label_py3.py | 58 - .../azure/mgmt/sql/models/server.py | 86 - .../sql/models/server_automatic_tuning.py | 60 - .../sql/models/server_automatic_tuning_py3.py | 60 - .../models/server_azure_ad_administrator.py | 67 - .../server_azure_ad_administrator_paged.py | 27 - .../server_azure_ad_administrator_py3.py | 67 - .../sql/models/server_blob_auditing_policy.py | 160 - .../models/server_blob_auditing_policy_py3.py | 160 - .../sql/models/server_communication_link.py | 65 - .../models/server_communication_link_paged.py | 27 - .../models/server_communication_link_py3.py | 65 - .../sql/models/server_connection_policy.py | 60 - .../models/server_connection_policy_py3.py | 60 - .../azure/mgmt/sql/models/server_dns_alias.py | 47 - .../models/server_dns_alias_acquisition.py | 29 - .../server_dns_alias_acquisition_py3.py | 29 - .../mgmt/sql/models/server_dns_alias_paged.py | 27 - .../mgmt/sql/models/server_dns_alias_py3.py | 47 - .../azure/mgmt/sql/models/server_key.py | 78 - .../azure/mgmt/sql/models/server_key_paged.py | 27 - .../azure/mgmt/sql/models/server_key_py3.py | 78 - .../azure/mgmt/sql/models/server_paged.py | 27 - .../azure/mgmt/sql/models/server_py3.py | 86 - .../models/server_security_alert_policy.py | 88 - .../server_security_alert_policy_paged.py | 27 - .../server_security_alert_policy_py3.py | 88 - .../azure/mgmt/sql/models/server_update.py | 59 - .../mgmt/sql/models/server_update_py3.py | 59 - .../azure/mgmt/sql/models/server_usage.py | 66 - .../mgmt/sql/models/server_usage_paged.py | 27 - .../azure/mgmt/sql/models/server_usage_py3.py | 66 - .../sql/models/server_version_capability.py | 58 - .../models/server_version_capability_py3.py | 58 - .../models/server_vulnerability_assessment.py | 70 - .../server_vulnerability_assessment_paged.py | 27 - .../server_vulnerability_assessment_py3.py | 70 - .../mgmt/sql/models/service_objective.py | 69 - .../models/service_objective_capability.py | 78 - .../service_objective_capability_py3.py | 78 - .../sql/models/service_objective_paged.py | 27 - .../mgmt/sql/models/service_objective_py3.py | 69 - .../mgmt/sql/models/service_tier_advisor.py | 157 - .../sql/models/service_tier_advisor_paged.py | 27 - .../sql/models/service_tier_advisor_py3.py | 157 - .../azure/mgmt/sql/models/sku.py | 57 - .../azure/mgmt/sql/models/sku_py3.py | 57 - .../azure/mgmt/sql/models/slo_usage_metric.py | 57 - .../mgmt/sql/models/slo_usage_metric_py3.py | 57 - .../mgmt/sql/models/subscription_usage.py | 62 - .../sql/models/subscription_usage_paged.py | 27 - .../mgmt/sql/models/subscription_usage_py3.py | 62 - .../azure/mgmt/sql/models/sync_agent.py | 78 - .../sql/models/sync_agent_key_properties.py | 35 - .../models/sync_agent_key_properties_py3.py | 35 - .../sql/models/sync_agent_linked_database.py | 73 - .../sync_agent_linked_database_paged.py | 27 - .../models/sync_agent_linked_database_py3.py | 73 - .../azure/mgmt/sql/models/sync_agent_paged.py | 27 - .../azure/mgmt/sql/models/sync_agent_py3.py | 78 - .../sql/models/sync_database_id_properties.py | 35 - .../sync_database_id_properties_paged.py | 27 - .../models/sync_database_id_properties_py3.py | 35 - .../sql/models/sync_full_schema_properties.py | 40 - .../sync_full_schema_properties_paged.py | 27 - .../models/sync_full_schema_properties_py3.py | 40 - .../mgmt/sql/models/sync_full_schema_table.py | 55 - .../models/sync_full_schema_table_column.py | 65 - .../sync_full_schema_table_column_py3.py | 65 - .../sql/models/sync_full_schema_table_py3.py | 55 - .../azure/mgmt/sql/models/sync_group.py | 82 - .../sql/models/sync_group_log_properties.py | 61 - .../models/sync_group_log_properties_paged.py | 27 - .../models/sync_group_log_properties_py3.py | 61 - .../azure/mgmt/sql/models/sync_group_paged.py | 27 - .../azure/mgmt/sql/models/sync_group_py3.py | 82 - .../mgmt/sql/models/sync_group_schema.py | 33 - .../mgmt/sql/models/sync_group_schema_py3.py | 33 - .../sql/models/sync_group_schema_table.py | 32 - .../models/sync_group_schema_table_column.py | 36 - .../sync_group_schema_table_column_py3.py | 36 - .../sql/models/sync_group_schema_table_py3.py | 32 - .../azure/mgmt/sql/models/sync_member.py | 89 - .../mgmt/sql/models/sync_member_paged.py | 27 - .../azure/mgmt/sql/models/sync_member_py3.py | 89 - .../azure/mgmt/sql/models/tde_certificate.py | 54 - .../mgmt/sql/models/tde_certificate_py3.py | 54 - .../azure/mgmt/sql/models/tracked_resource.py | 53 - .../mgmt/sql/models/tracked_resource_py3.py | 53 - .../sql/models/transparent_data_encryption.py | 53 - .../transparent_data_encryption_activity.py | 60 - ...nsparent_data_encryption_activity_paged.py | 27 - ...ransparent_data_encryption_activity_py3.py | 60 - .../models/transparent_data_encryption_py3.py | 53 - .../azure/mgmt/sql/models/virtual_cluster.py | 66 - .../mgmt/sql/models/virtual_cluster_paged.py | 27 - .../mgmt/sql/models/virtual_cluster_py3.py | 66 - .../mgmt/sql/models/virtual_cluster_update.py | 49 - .../sql/models/virtual_cluster_update_py3.py | 49 - .../mgmt/sql/models/virtual_network_rule.py | 61 - .../sql/models/virtual_network_rule_paged.py | 27 - .../sql/models/virtual_network_rule_py3.py | 61 - ...y_assessment_recurring_scans_properties.py | 39 - ...sessment_recurring_scans_properties_py3.py | 39 - .../vulnerability_assessment_scan_error.py | 40 - ...vulnerability_assessment_scan_error_py3.py | 40 - .../vulnerability_assessment_scan_record.py | 88 - ...nerability_assessment_scan_record_paged.py | 27 - ...ulnerability_assessment_scan_record_py3.py | 88 - .../azure/mgmt/sql/operations/__init__.py | 166 +- ...ong_term_retention_policies_operations.py} | 4 +- ...ort_term_retention_policies_operations.py} | 17 +- ...rations.py => _capabilities_operations.py} | 3 +- ...y => _data_masking_policies_operations.py} | 4 +- ...s.py => _data_masking_rules_operations.py} | 17 +- ... _database_automatic_tuning_operations.py} | 4 +- ...base_blob_auditing_policies_operations.py} | 4 +- ..._operations.py => _database_operations.py} | 16 +- ...e_threat_detection_policies_operations.py} | 4 +- ...ions.py => _database_usages_operations.py} | 16 +- ...y_assessment_rule_baselines_operations.py} | 4 +- ...nerability_assessment_scans_operations.py} | 18 +- ...e_vulnerability_assessments_operations.py} | 18 +- ...operations.py => _databases_operations.py} | 146 +- ...=> _elastic_pool_activities_operations.py} | 16 +- ...ic_pool_database_activities_operations.py} | 16 +- ...rations.py => _elastic_pool_operations.py} | 16 +- ...ations.py => _elastic_pools_operations.py} | 132 +- ...y => _encryption_protectors_operations.py} | 17 +- ...base_blob_auditing_policies_operations.py} | 4 +- ...rver_blob_auditing_policies_operations.py} | 3 +- ...ions.py => _failover_groups_operations.py} | 17 +- ...tions.py => _firewall_rules_operations.py} | 18 +- ....py => _geo_backup_policies_operations.py} | 18 +- ...> _instance_failover_groups_operations.py} | 17 +- .../operations/_instance_pools_operations.py | 534 + ...perations.py => _job_agents_operations.py} | 17 +- ...ions.py => _job_credentials_operations.py} | 18 +- ...tions.py => _job_executions_operations.py} | 31 +- ....py => _job_step_executions_operations.py} | 17 +- ...operations.py => _job_steps_operations.py} | 33 +- ...y => _job_target_executions_operations.py} | 31 +- ...ns.py => _job_target_groups_operations.py} | 18 +- ...rations.py => _job_versions_operations.py} | 17 +- ...jobs_operations.py => _jobs_operations.py} | 18 +- ..._long_term_retention_backups_operations.py | 880 ++ ...ort_term_retention_policies_operations.py} | 17 +- ...ase_security_alert_policies_operations.py} | 18 +- ...database_sensitivity_labels_operations.py} | 190 +- ...y_assessment_rule_baselines_operations.py} | 4 +- ...nerability_assessment_scans_operations.py} | 18 +- ...e_vulnerability_assessments_operations.py} | 18 +- ...ns.py => _managed_databases_operations.py} | 17 +- ...tance_encryption_protectors_operations.py} | 17 +- ...y => _managed_instance_keys_operations.py} | 17 +- ...d_instance_tde_certificates_operations.py} | 2 + ...e_vulnerability_assessments_operations.py} | 18 +- ...ns.py => _managed_instances_operations.py} | 119 +- ...ort_term_retention_policies_operations.py} | 17 +- ...ver_security_alert_policies_operations.py} | 17 +- .../{operations.py => _operations.py} | 16 +- ... _recommended_elastic_pools_operations.py} | 31 +- ...y => _recoverable_databases_operations.py} | 17 +- ...coverable_managed_databases_operations.py} | 17 +- ...ns.py => _replication_links_operations.py} | 17 +- ...estorable_dropped_databases_operations.py} | 17 +- ...e_dropped_managed_databases_operations.py} | 17 +- ...tions.py => _restore_points_operations.py} | 17 +- ...s.py => _sensitivity_labels_operations.py} | 190 +- ...=> _server_automatic_tuning_operations.py} | 4 +- ...ver_azure_ad_administrators_operations.py} | 17 +- ...rver_blob_auditing_policies_operations.py} | 3 +- ..._server_communication_links_operations.py} | 17 +- ..._server_connection_policies_operations.py} | 4 +- ...s.py => _server_dns_aliases_operations.py} | 17 +- ...erations.py => _server_keys_operations.py} | 17 +- ...ver_security_alert_policies_operations.py} | 17 +- ...ations.py => _server_usages_operations.py} | 16 +- ...r_vulnerability_assessments_operations.py} | 18 +- ...s_operations.py => _servers_operations.py} | 32 +- ...s.py => _service_objectives_operations.py} | 17 +- ...y => _service_tier_advisors_operations.py} | 17 +- ....py => _subscription_usages_operations.py} | 17 +- ...erations.py => _sync_agents_operations.py} | 32 +- ...erations.py => _sync_groups_operations.py} | 59 +- ...rations.py => _sync_members_operations.py} | 31 +- ...ons.py => _tde_certificates_operations.py} | 2 + ..._data_encryption_activities_operations.py} | 16 +- ...ransparent_data_encryptions_operations.py} | 4 +- .../mgmt/sql/operations/_usages_operations.py | 120 + ...ons.py => _virtual_clusters_operations.py} | 31 +- ...y => _virtual_network_rules_operations.py} | 17 +- .../long_term_retention_backups_operations.py | 441 - 459 files changed, 22360 insertions(+), 24337 deletions(-) create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_configuration.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/{sql_management_client.py => _sql_management_client.py} (75%) create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/{sql_management_client_enums.py => _sql_management_client_enums.py} (95%) delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_py3.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{backup_long_term_retention_policies_operations.py => _backup_long_term_retention_policies_operations.py} (99%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{backup_short_term_retention_policies_operations.py => _backup_short_term_retention_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{capabilities_operations.py => _capabilities_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{data_masking_policies_operations.py => _data_masking_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{data_masking_rules_operations.py => _data_masking_rules_operations.py} (96%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_automatic_tuning_operations.py => _database_automatic_tuning_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_blob_auditing_policies_operations.py => _database_blob_auditing_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_operations.py => _database_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_threat_detection_policies_operations.py => _database_threat_detection_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_usages_operations.py => _database_usages_operations.py} (92%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_vulnerability_assessment_rule_baselines_operations.py => _database_vulnerability_assessment_rule_baselines_operations.py} (99%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_vulnerability_assessment_scans_operations.py => _database_vulnerability_assessment_scans_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_vulnerability_assessments_operations.py => _database_vulnerability_assessments_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{databases_operations.py => _databases_operations.py} (92%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{elastic_pool_activities_operations.py => _elastic_pool_activities_operations.py} (92%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{elastic_pool_database_activities_operations.py => _elastic_pool_database_activities_operations.py} (92%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{elastic_pool_operations.py => _elastic_pool_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{elastic_pools_operations.py => _elastic_pools_operations.py} (85%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{encryption_protectors_operations.py => _encryption_protectors_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{extended_database_blob_auditing_policies_operations.py => _extended_database_blob_auditing_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{extended_server_blob_auditing_policies_operations.py => _extended_server_blob_auditing_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{failover_groups_operations.py => _failover_groups_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{firewall_rules_operations.py => _firewall_rules_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{geo_backup_policies_operations.py => _geo_backup_policies_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{instance_failover_groups_operations.py => _instance_failover_groups_operations.py} (98%) create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_pools_operations.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_agents_operations.py => _job_agents_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_credentials_operations.py => _job_credentials_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_executions_operations.py => _job_executions_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_step_executions_operations.py => _job_step_executions_operations.py} (96%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_steps_operations.py => _job_steps_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_target_executions_operations.py => _job_target_executions_operations.py} (96%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_target_groups_operations.py => _job_target_groups_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_versions_operations.py => _job_versions_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{jobs_operations.py => _jobs_operations.py} (97%) create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_backups_operations.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_backup_short_term_retention_policies_operations.py => _managed_backup_short_term_retention_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_database_security_alert_policies_operations.py => _managed_database_security_alert_policies_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_database_sensitivity_labels_operations.py => _managed_database_sensitivity_labels_operations.py} (70%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_database_vulnerability_assessment_rule_baselines_operations.py => _managed_database_vulnerability_assessment_rule_baselines_operations.py} (99%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_database_vulnerability_assessment_scans_operations.py => _managed_database_vulnerability_assessment_scans_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_database_vulnerability_assessments_operations.py => _managed_database_vulnerability_assessments_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_databases_operations.py => _managed_databases_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_instance_encryption_protectors_operations.py => _managed_instance_encryption_protectors_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_instance_keys_operations.py => _managed_instance_keys_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_instance_tde_certificates_operations.py => _managed_instance_tde_certificates_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_instance_vulnerability_assessments_operations.py => _managed_instance_vulnerability_assessments_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_instances_operations.py => _managed_instances_operations.py} (84%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py => _managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_server_security_alert_policies_operations.py => _managed_server_security_alert_policies_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{operations.py => _operations.py} (90%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{recommended_elastic_pools_operations.py => _recommended_elastic_pools_operations.py} (94%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{recoverable_databases_operations.py => _recoverable_databases_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{recoverable_managed_databases_operations.py => _recoverable_managed_databases_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{replication_links_operations.py => _replication_links_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{restorable_dropped_databases_operations.py => _restorable_dropped_databases_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{restorable_dropped_managed_databases_operations.py => _restorable_dropped_managed_databases_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{restore_points_operations.py => _restore_points_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{sensitivity_labels_operations.py => _sensitivity_labels_operations.py} (70%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_automatic_tuning_operations.py => _server_automatic_tuning_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_azure_ad_administrators_operations.py => _server_azure_ad_administrators_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_blob_auditing_policies_operations.py => _server_blob_auditing_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_communication_links_operations.py => _server_communication_links_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_connection_policies_operations.py => _server_connection_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_dns_aliases_operations.py => _server_dns_aliases_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_keys_operations.py => _server_keys_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_security_alert_policies_operations.py => _server_security_alert_policies_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_usages_operations.py => _server_usages_operations.py} (92%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_vulnerability_assessments_operations.py => _server_vulnerability_assessments_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{servers_operations.py => _servers_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{service_objectives_operations.py => _service_objectives_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{service_tier_advisors_operations.py => _service_tier_advisors_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{subscription_usages_operations.py => _subscription_usages_operations.py} (94%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{sync_agents_operations.py => _sync_agents_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{sync_groups_operations.py => _sync_groups_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{sync_members_operations.py => _sync_members_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{tde_certificates_operations.py => _tde_certificates_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{transparent_data_encryption_activities_operations.py => _transparent_data_encryption_activities_operations.py} (93%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{transparent_data_encryptions_operations.py => _transparent_data_encryptions_operations.py} (98%) create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_usages_operations.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{virtual_clusters_operations.py => _virtual_clusters_operations.py} (96%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{virtual_network_rules_operations.py => _virtual_network_rules_operations.py} (97%) delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/long_term_retention_backups_operations.py diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/__init__.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/__init__.py index 33b83233be3c..48b056c94dfa 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/__init__.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .sql_management_client import SqlManagementClient -from .version import VERSION +from ._configuration import SqlManagementClientConfiguration +from ._sql_management_client import SqlManagementClient +__all__ = ['SqlManagementClient', 'SqlManagementClientConfiguration'] -__all__ = ['SqlManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_configuration.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_configuration.py new file mode 100644 index 000000000000..ca7086f8dadf --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_configuration.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class SqlManagementClientConfiguration(AzureConfiguration): + """Configuration for SqlManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription ID that identifies an Azure + subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(SqlManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-sql/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py similarity index 75% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py index aae1ce917e14..1bedc764b599 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py @@ -11,122 +11,91 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.recoverable_databases_operations import RecoverableDatabasesOperations -from .operations.restorable_dropped_databases_operations import RestorableDroppedDatabasesOperations -from .operations.servers_operations import ServersOperations -from .operations.server_connection_policies_operations import ServerConnectionPoliciesOperations -from .operations.database_threat_detection_policies_operations import DatabaseThreatDetectionPoliciesOperations -from .operations.data_masking_policies_operations import DataMaskingPoliciesOperations -from .operations.data_masking_rules_operations import DataMaskingRulesOperations -from .operations.firewall_rules_operations import FirewallRulesOperations -from .operations.geo_backup_policies_operations import GeoBackupPoliciesOperations -from .operations.databases_operations import DatabasesOperations -from .operations.elastic_pools_operations import ElasticPoolsOperations -from .operations.recommended_elastic_pools_operations import RecommendedElasticPoolsOperations -from .operations.replication_links_operations import ReplicationLinksOperations -from .operations.server_azure_ad_administrators_operations import ServerAzureADAdministratorsOperations -from .operations.server_communication_links_operations import ServerCommunicationLinksOperations -from .operations.service_objectives_operations import ServiceObjectivesOperations -from .operations.elastic_pool_activities_operations import ElasticPoolActivitiesOperations -from .operations.elastic_pool_database_activities_operations import ElasticPoolDatabaseActivitiesOperations -from .operations.service_tier_advisors_operations import ServiceTierAdvisorsOperations -from .operations.transparent_data_encryptions_operations import TransparentDataEncryptionsOperations -from .operations.transparent_data_encryption_activities_operations import TransparentDataEncryptionActivitiesOperations -from .operations.server_usages_operations import ServerUsagesOperations -from .operations.database_usages_operations import DatabaseUsagesOperations -from .operations.database_automatic_tuning_operations import DatabaseAutomaticTuningOperations -from .operations.encryption_protectors_operations import EncryptionProtectorsOperations -from .operations.failover_groups_operations import FailoverGroupsOperations -from .operations.managed_instances_operations import ManagedInstancesOperations -from .operations.operations import Operations -from .operations.server_keys_operations import ServerKeysOperations -from .operations.sync_agents_operations import SyncAgentsOperations -from .operations.sync_groups_operations import SyncGroupsOperations -from .operations.sync_members_operations import SyncMembersOperations -from .operations.subscription_usages_operations import SubscriptionUsagesOperations -from .operations.virtual_clusters_operations import VirtualClustersOperations -from .operations.virtual_network_rules_operations import VirtualNetworkRulesOperations -from .operations.extended_database_blob_auditing_policies_operations import ExtendedDatabaseBlobAuditingPoliciesOperations -from .operations.extended_server_blob_auditing_policies_operations import ExtendedServerBlobAuditingPoliciesOperations -from .operations.server_blob_auditing_policies_operations import ServerBlobAuditingPoliciesOperations -from .operations.database_blob_auditing_policies_operations import DatabaseBlobAuditingPoliciesOperations -from .operations.database_vulnerability_assessment_rule_baselines_operations import DatabaseVulnerabilityAssessmentRuleBaselinesOperations -from .operations.database_vulnerability_assessments_operations import DatabaseVulnerabilityAssessmentsOperations -from .operations.job_agents_operations import JobAgentsOperations -from .operations.job_credentials_operations import JobCredentialsOperations -from .operations.job_executions_operations import JobExecutionsOperations -from .operations.jobs_operations import JobsOperations -from .operations.job_step_executions_operations import JobStepExecutionsOperations -from .operations.job_steps_operations import JobStepsOperations -from .operations.job_target_executions_operations import JobTargetExecutionsOperations -from .operations.job_target_groups_operations import JobTargetGroupsOperations -from .operations.job_versions_operations import JobVersionsOperations -from .operations.long_term_retention_backups_operations import LongTermRetentionBackupsOperations -from .operations.backup_long_term_retention_policies_operations import BackupLongTermRetentionPoliciesOperations -from .operations.managed_backup_short_term_retention_policies_operations import ManagedBackupShortTermRetentionPoliciesOperations -from .operations.managed_databases_operations import ManagedDatabasesOperations -from .operations.managed_restorable_dropped_database_backup_short_term_retention_policies_operations import ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations -from .operations.server_automatic_tuning_operations import ServerAutomaticTuningOperations -from .operations.server_dns_aliases_operations import ServerDnsAliasesOperations -from .operations.server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations -from .operations.restorable_dropped_managed_databases_operations import RestorableDroppedManagedDatabasesOperations -from .operations.restore_points_operations import RestorePointsOperations -from .operations.managed_database_security_alert_policies_operations import ManagedDatabaseSecurityAlertPoliciesOperations -from .operations.managed_server_security_alert_policies_operations import ManagedServerSecurityAlertPoliciesOperations -from .operations.sensitivity_labels_operations import SensitivityLabelsOperations -from .operations.database_operations import DatabaseOperations -from .operations.elastic_pool_operations import ElasticPoolOperations -from .operations.capabilities_operations import CapabilitiesOperations -from .operations.database_vulnerability_assessment_scans_operations import DatabaseVulnerabilityAssessmentScansOperations -from .operations.managed_database_vulnerability_assessment_rule_baselines_operations import ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations -from .operations.managed_database_vulnerability_assessment_scans_operations import ManagedDatabaseVulnerabilityAssessmentScansOperations -from .operations.managed_database_vulnerability_assessments_operations import ManagedDatabaseVulnerabilityAssessmentsOperations -from .operations.instance_failover_groups_operations import InstanceFailoverGroupsOperations -from .operations.backup_short_term_retention_policies_operations import BackupShortTermRetentionPoliciesOperations -from .operations.tde_certificates_operations import TdeCertificatesOperations -from .operations.managed_instance_tde_certificates_operations import ManagedInstanceTdeCertificatesOperations -from .operations.managed_instance_keys_operations import ManagedInstanceKeysOperations -from .operations.managed_instance_encryption_protectors_operations import ManagedInstanceEncryptionProtectorsOperations -from .operations.recoverable_managed_databases_operations import RecoverableManagedDatabasesOperations -from .operations.managed_instance_vulnerability_assessments_operations import ManagedInstanceVulnerabilityAssessmentsOperations -from .operations.server_vulnerability_assessments_operations import ServerVulnerabilityAssessmentsOperations -from .operations.managed_database_sensitivity_labels_operations import ManagedDatabaseSensitivityLabelsOperations -from . import models - - -class SqlManagementClientConfiguration(AzureConfiguration): - """Configuration for SqlManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The subscription ID that identifies an Azure - subscription. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(SqlManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-sql/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import SqlManagementClientConfiguration +from .operations import RecoverableDatabasesOperations +from .operations import RestorableDroppedDatabasesOperations +from .operations import ServersOperations +from .operations import ServerConnectionPoliciesOperations +from .operations import DatabaseThreatDetectionPoliciesOperations +from .operations import DataMaskingPoliciesOperations +from .operations import DataMaskingRulesOperations +from .operations import FirewallRulesOperations +from .operations import GeoBackupPoliciesOperations +from .operations import DatabasesOperations +from .operations import ElasticPoolsOperations +from .operations import RecommendedElasticPoolsOperations +from .operations import ReplicationLinksOperations +from .operations import ServerAzureADAdministratorsOperations +from .operations import ServerCommunicationLinksOperations +from .operations import ServiceObjectivesOperations +from .operations import ElasticPoolActivitiesOperations +from .operations import ElasticPoolDatabaseActivitiesOperations +from .operations import ServiceTierAdvisorsOperations +from .operations import TransparentDataEncryptionsOperations +from .operations import TransparentDataEncryptionActivitiesOperations +from .operations import ServerUsagesOperations +from .operations import DatabaseUsagesOperations +from .operations import DatabaseAutomaticTuningOperations +from .operations import EncryptionProtectorsOperations +from .operations import FailoverGroupsOperations +from .operations import Operations +from .operations import ServerKeysOperations +from .operations import SyncAgentsOperations +from .operations import SyncGroupsOperations +from .operations import SyncMembersOperations +from .operations import SubscriptionUsagesOperations +from .operations import VirtualClustersOperations +from .operations import VirtualNetworkRulesOperations +from .operations import ExtendedDatabaseBlobAuditingPoliciesOperations +from .operations import ExtendedServerBlobAuditingPoliciesOperations +from .operations import ServerBlobAuditingPoliciesOperations +from .operations import DatabaseBlobAuditingPoliciesOperations +from .operations import DatabaseVulnerabilityAssessmentRuleBaselinesOperations +from .operations import DatabaseVulnerabilityAssessmentsOperations +from .operations import JobAgentsOperations +from .operations import JobCredentialsOperations +from .operations import JobExecutionsOperations +from .operations import JobsOperations +from .operations import JobStepExecutionsOperations +from .operations import JobStepsOperations +from .operations import JobTargetExecutionsOperations +from .operations import JobTargetGroupsOperations +from .operations import JobVersionsOperations +from .operations import LongTermRetentionBackupsOperations +from .operations import BackupLongTermRetentionPoliciesOperations +from .operations import ManagedBackupShortTermRetentionPoliciesOperations +from .operations import ManagedDatabasesOperations +from .operations import ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations +from .operations import ServerAutomaticTuningOperations +from .operations import ServerDnsAliasesOperations +from .operations import ServerSecurityAlertPoliciesOperations +from .operations import RestorableDroppedManagedDatabasesOperations +from .operations import RestorePointsOperations +from .operations import ManagedDatabaseSecurityAlertPoliciesOperations +from .operations import ManagedServerSecurityAlertPoliciesOperations +from .operations import SensitivityLabelsOperations +from .operations import DatabaseOperations +from .operations import ElasticPoolOperations +from .operations import CapabilitiesOperations +from .operations import DatabaseVulnerabilityAssessmentScansOperations +from .operations import ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations +from .operations import ManagedDatabaseVulnerabilityAssessmentScansOperations +from .operations import ManagedDatabaseVulnerabilityAssessmentsOperations +from .operations import InstanceFailoverGroupsOperations +from .operations import BackupShortTermRetentionPoliciesOperations +from .operations import TdeCertificatesOperations +from .operations import ManagedInstanceTdeCertificatesOperations +from .operations import ManagedInstanceKeysOperations +from .operations import ManagedInstanceEncryptionProtectorsOperations +from .operations import RecoverableManagedDatabasesOperations +from .operations import ManagedInstanceVulnerabilityAssessmentsOperations +from .operations import ServerVulnerabilityAssessmentsOperations +from .operations import ManagedDatabaseSensitivityLabelsOperations +from .operations import InstancePoolsOperations +from .operations import UsagesOperations +from .operations import ManagedInstancesOperations +from . import models class SqlManagementClient(SDKClient): @@ -187,8 +156,6 @@ class SqlManagementClient(SDKClient): :vartype encryption_protectors: azure.mgmt.sql.operations.EncryptionProtectorsOperations :ivar failover_groups: FailoverGroups operations :vartype failover_groups: azure.mgmt.sql.operations.FailoverGroupsOperations - :ivar managed_instances: ManagedInstances operations - :vartype managed_instances: azure.mgmt.sql.operations.ManagedInstancesOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.sql.operations.Operations :ivar server_keys: ServerKeys operations @@ -295,6 +262,12 @@ class SqlManagementClient(SDKClient): :vartype server_vulnerability_assessments: azure.mgmt.sql.operations.ServerVulnerabilityAssessmentsOperations :ivar managed_database_sensitivity_labels: ManagedDatabaseSensitivityLabels operations :vartype managed_database_sensitivity_labels: azure.mgmt.sql.operations.ManagedDatabaseSensitivityLabelsOperations + :ivar instance_pools: InstancePools operations + :vartype instance_pools: azure.mgmt.sql.operations.InstancePoolsOperations + :ivar usages: Usages operations + :vartype usages: azure.mgmt.sql.operations.UsagesOperations + :ivar managed_instances: ManagedInstances operations + :vartype managed_instances: azure.mgmt.sql.operations.ManagedInstancesOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -367,8 +340,6 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.failover_groups = FailoverGroupsOperations( self._client, self.config, self._serialize, self._deserialize) - self.managed_instances = ManagedInstancesOperations( - self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) self.server_keys = ServerKeysOperations( @@ -475,3 +446,9 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.managed_database_sensitivity_labels = ManagedDatabaseSensitivityLabelsOperations( self._client, self.config, self._serialize, self._deserialize) + self.instance_pools = InstancePoolsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.usages = UsagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.managed_instances = ManagedInstancesOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py index 0a543180d7e4..57ac98e75568 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py @@ -10,375 +10,385 @@ # -------------------------------------------------------------------------- try: - from .recoverable_database_py3 import RecoverableDatabase - from .restorable_dropped_database_py3 import RestorableDroppedDatabase - from .tracked_resource_py3 import TrackedResource - from .resource_py3 import Resource - from .proxy_resource_py3 import ProxyResource - from .check_name_availability_request_py3 import CheckNameAvailabilityRequest - from .check_name_availability_response_py3 import CheckNameAvailabilityResponse - from .server_connection_policy_py3 import ServerConnectionPolicy - from .database_security_alert_policy_py3 import DatabaseSecurityAlertPolicy - from .data_masking_policy_py3 import DataMaskingPolicy - from .data_masking_rule_py3 import DataMaskingRule - from .firewall_rule_py3 import FirewallRule - from .geo_backup_policy_py3 import GeoBackupPolicy - from .import_extension_request_py3 import ImportExtensionRequest - from .import_export_response_py3 import ImportExportResponse - from .import_request_py3 import ImportRequest - from .export_request_py3 import ExportRequest - from .metric_value_py3 import MetricValue - from .metric_name_py3 import MetricName - from .metric_py3 import Metric - from .metric_availability_py3 import MetricAvailability - from .metric_definition_py3 import MetricDefinition - from .recommended_elastic_pool_metric_py3 import RecommendedElasticPoolMetric - from .recommended_elastic_pool_py3 import RecommendedElasticPool - from .replication_link_py3 import ReplicationLink - from .server_azure_ad_administrator_py3 import ServerAzureADAdministrator - from .server_communication_link_py3 import ServerCommunicationLink - from .service_objective_py3 import ServiceObjective - from .elastic_pool_activity_py3 import ElasticPoolActivity - from .elastic_pool_database_activity_py3 import ElasticPoolDatabaseActivity - from .operation_impact_py3 import OperationImpact - from .recommended_index_py3 import RecommendedIndex - from .transparent_data_encryption_py3 import TransparentDataEncryption - from .slo_usage_metric_py3 import SloUsageMetric - from .service_tier_advisor_py3 import ServiceTierAdvisor - from .transparent_data_encryption_activity_py3 import TransparentDataEncryptionActivity - from .server_usage_py3 import ServerUsage - from .database_usage_py3 import DatabaseUsage - from .automatic_tuning_options_py3 import AutomaticTuningOptions - from .database_automatic_tuning_py3 import DatabaseAutomaticTuning - from .encryption_protector_py3 import EncryptionProtector - from .failover_group_read_write_endpoint_py3 import FailoverGroupReadWriteEndpoint - from .failover_group_read_only_endpoint_py3 import FailoverGroupReadOnlyEndpoint - from .partner_info_py3 import PartnerInfo - from .failover_group_py3 import FailoverGroup - from .failover_group_update_py3 import FailoverGroupUpdate - from .resource_identity_py3 import ResourceIdentity - from .sku_py3 import Sku - from .managed_instance_py3 import ManagedInstance - from .managed_instance_update_py3 import ManagedInstanceUpdate - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .server_key_py3 import ServerKey - from .server_py3 import Server - from .server_update_py3 import ServerUpdate - from .sync_agent_py3 import SyncAgent - from .sync_agent_key_properties_py3 import SyncAgentKeyProperties - from .sync_agent_linked_database_py3 import SyncAgentLinkedDatabase - from .sync_database_id_properties_py3 import SyncDatabaseIdProperties - from .sync_full_schema_table_column_py3 import SyncFullSchemaTableColumn - from .sync_full_schema_table_py3 import SyncFullSchemaTable - from .sync_full_schema_properties_py3 import SyncFullSchemaProperties - from .sync_group_log_properties_py3 import SyncGroupLogProperties - from .sync_group_schema_table_column_py3 import SyncGroupSchemaTableColumn - from .sync_group_schema_table_py3 import SyncGroupSchemaTable - from .sync_group_schema_py3 import SyncGroupSchema - from .sync_group_py3 import SyncGroup - from .sync_member_py3 import SyncMember - from .subscription_usage_py3 import SubscriptionUsage - from .virtual_cluster_py3 import VirtualCluster - from .virtual_cluster_update_py3 import VirtualClusterUpdate - from .virtual_network_rule_py3 import VirtualNetworkRule - from .extended_database_blob_auditing_policy_py3 import ExtendedDatabaseBlobAuditingPolicy - from .extended_server_blob_auditing_policy_py3 import ExtendedServerBlobAuditingPolicy - from .server_blob_auditing_policy_py3 import ServerBlobAuditingPolicy - from .database_blob_auditing_policy_py3 import DatabaseBlobAuditingPolicy - from .database_vulnerability_assessment_rule_baseline_item_py3 import DatabaseVulnerabilityAssessmentRuleBaselineItem - from .database_vulnerability_assessment_rule_baseline_py3 import DatabaseVulnerabilityAssessmentRuleBaseline - from .vulnerability_assessment_recurring_scans_properties_py3 import VulnerabilityAssessmentRecurringScansProperties - from .database_vulnerability_assessment_py3 import DatabaseVulnerabilityAssessment - from .job_agent_py3 import JobAgent - from .job_agent_update_py3 import JobAgentUpdate - from .job_credential_py3 import JobCredential - from .job_execution_target_py3 import JobExecutionTarget - from .job_execution_py3 import JobExecution - from .job_schedule_py3 import JobSchedule - from .job_py3 import Job - from .job_step_action_py3 import JobStepAction - from .job_step_output_py3 import JobStepOutput - from .job_step_execution_options_py3 import JobStepExecutionOptions - from .job_step_py3 import JobStep - from .job_target_py3 import JobTarget - from .job_target_group_py3 import JobTargetGroup - from .job_version_py3 import JobVersion - from .long_term_retention_backup_py3 import LongTermRetentionBackup - from .backup_long_term_retention_policy_py3 import BackupLongTermRetentionPolicy - from .managed_backup_short_term_retention_policy_py3 import ManagedBackupShortTermRetentionPolicy - from .complete_database_restore_definition_py3 import CompleteDatabaseRestoreDefinition - from .managed_database_py3 import ManagedDatabase - from .managed_database_update_py3 import ManagedDatabaseUpdate - from .automatic_tuning_server_options_py3 import AutomaticTuningServerOptions - from .server_automatic_tuning_py3 import ServerAutomaticTuning - from .server_dns_alias_py3 import ServerDnsAlias - from .server_dns_alias_acquisition_py3 import ServerDnsAliasAcquisition - from .server_security_alert_policy_py3 import ServerSecurityAlertPolicy - from .restorable_dropped_managed_database_py3 import RestorableDroppedManagedDatabase - from .restore_point_py3 import RestorePoint - from .create_database_restore_point_definition_py3 import CreateDatabaseRestorePointDefinition - from .managed_database_security_alert_policy_py3 import ManagedDatabaseSecurityAlertPolicy - from .managed_server_security_alert_policy_py3 import ManagedServerSecurityAlertPolicy - from .sensitivity_label_py3 import SensitivityLabel - from .database_operation_py3 import DatabaseOperation - from .elastic_pool_operation_py3 import ElasticPoolOperation - from .max_size_capability_py3 import MaxSizeCapability - from .log_size_capability_py3 import LogSizeCapability - from .max_size_range_capability_py3 import MaxSizeRangeCapability - from .performance_level_capability_py3 import PerformanceLevelCapability - from .license_type_capability_py3 import LicenseTypeCapability - from .service_objective_capability_py3 import ServiceObjectiveCapability - from .edition_capability_py3 import EditionCapability - from .elastic_pool_per_database_min_performance_level_capability_py3 import ElasticPoolPerDatabaseMinPerformanceLevelCapability - from .elastic_pool_per_database_max_performance_level_capability_py3 import ElasticPoolPerDatabaseMaxPerformanceLevelCapability - from .elastic_pool_performance_level_capability_py3 import ElasticPoolPerformanceLevelCapability - from .elastic_pool_edition_capability_py3 import ElasticPoolEditionCapability - from .server_version_capability_py3 import ServerVersionCapability - from .managed_instance_vcores_capability_py3 import ManagedInstanceVcoresCapability - from .managed_instance_family_capability_py3 import ManagedInstanceFamilyCapability - from .managed_instance_edition_capability_py3 import ManagedInstanceEditionCapability - from .managed_instance_version_capability_py3 import ManagedInstanceVersionCapability - from .location_capabilities_py3 import LocationCapabilities - from .database_py3 import Database - from .database_update_py3 import DatabaseUpdate - from .resource_move_definition_py3 import ResourceMoveDefinition - from .elastic_pool_per_database_settings_py3 import ElasticPoolPerDatabaseSettings - from .elastic_pool_py3 import ElasticPool - from .elastic_pool_update_py3 import ElasticPoolUpdate - from .vulnerability_assessment_scan_error_py3 import VulnerabilityAssessmentScanError - from .vulnerability_assessment_scan_record_py3 import VulnerabilityAssessmentScanRecord - from .database_vulnerability_assessment_scans_export_py3 import DatabaseVulnerabilityAssessmentScansExport - from .instance_failover_group_read_write_endpoint_py3 import InstanceFailoverGroupReadWriteEndpoint - from .instance_failover_group_read_only_endpoint_py3 import InstanceFailoverGroupReadOnlyEndpoint - from .partner_region_info_py3 import PartnerRegionInfo - from .managed_instance_pair_info_py3 import ManagedInstancePairInfo - from .instance_failover_group_py3 import InstanceFailoverGroup - from .backup_short_term_retention_policy_py3 import BackupShortTermRetentionPolicy - from .tde_certificate_py3 import TdeCertificate - from .managed_instance_key_py3 import ManagedInstanceKey - from .managed_instance_encryption_protector_py3 import ManagedInstanceEncryptionProtector - from .recoverable_managed_database_py3 import RecoverableManagedDatabase - from .managed_instance_vulnerability_assessment_py3 import ManagedInstanceVulnerabilityAssessment - from .server_vulnerability_assessment_py3 import ServerVulnerabilityAssessment + from ._models_py3 import AutomaticTuningOptions + from ._models_py3 import AutomaticTuningServerOptions + from ._models_py3 import BackupLongTermRetentionPolicy + from ._models_py3 import BackupShortTermRetentionPolicy + from ._models_py3 import CheckNameAvailabilityRequest + from ._models_py3 import CheckNameAvailabilityResponse + from ._models_py3 import CompleteDatabaseRestoreDefinition + from ._models_py3 import CreateDatabaseRestorePointDefinition + from ._models_py3 import Database + from ._models_py3 import DatabaseAutomaticTuning + from ._models_py3 import DatabaseBlobAuditingPolicy + from ._models_py3 import DatabaseOperation + from ._models_py3 import DatabaseSecurityAlertPolicy + from ._models_py3 import DatabaseUpdate + from ._models_py3 import DatabaseUsage + from ._models_py3 import DatabaseVulnerabilityAssessment + from ._models_py3 import DatabaseVulnerabilityAssessmentRuleBaseline + from ._models_py3 import DatabaseVulnerabilityAssessmentRuleBaselineItem + from ._models_py3 import DatabaseVulnerabilityAssessmentScansExport + from ._models_py3 import DataMaskingPolicy + from ._models_py3 import DataMaskingRule + from ._models_py3 import EditionCapability + from ._models_py3 import ElasticPool + from ._models_py3 import ElasticPoolActivity + from ._models_py3 import ElasticPoolDatabaseActivity + from ._models_py3 import ElasticPoolEditionCapability + from ._models_py3 import ElasticPoolOperation + from ._models_py3 import ElasticPoolPerDatabaseMaxPerformanceLevelCapability + from ._models_py3 import ElasticPoolPerDatabaseMinPerformanceLevelCapability + from ._models_py3 import ElasticPoolPerDatabaseSettings + from ._models_py3 import ElasticPoolPerformanceLevelCapability + from ._models_py3 import ElasticPoolUpdate + from ._models_py3 import EncryptionProtector + from ._models_py3 import ExportRequest + from ._models_py3 import ExtendedDatabaseBlobAuditingPolicy + from ._models_py3 import ExtendedServerBlobAuditingPolicy + from ._models_py3 import FailoverGroup + from ._models_py3 import FailoverGroupReadOnlyEndpoint + from ._models_py3 import FailoverGroupReadWriteEndpoint + from ._models_py3 import FailoverGroupUpdate + from ._models_py3 import FirewallRule + from ._models_py3 import GeoBackupPolicy + from ._models_py3 import ImportExportResponse + from ._models_py3 import ImportExtensionRequest + from ._models_py3 import ImportRequest + from ._models_py3 import InstanceFailoverGroup + from ._models_py3 import InstanceFailoverGroupReadOnlyEndpoint + from ._models_py3 import InstanceFailoverGroupReadWriteEndpoint + from ._models_py3 import InstancePool + from ._models_py3 import InstancePoolUpdate + from ._models_py3 import Job + from ._models_py3 import JobAgent + from ._models_py3 import JobAgentUpdate + from ._models_py3 import JobCredential + from ._models_py3 import JobExecution + from ._models_py3 import JobExecutionTarget + from ._models_py3 import JobSchedule + from ._models_py3 import JobStep + from ._models_py3 import JobStepAction + from ._models_py3 import JobStepExecutionOptions + from ._models_py3 import JobStepOutput + from ._models_py3 import JobTarget + from ._models_py3 import JobTargetGroup + from ._models_py3 import JobVersion + from ._models_py3 import LicenseTypeCapability + from ._models_py3 import LocationCapabilities + from ._models_py3 import LogSizeCapability + from ._models_py3 import LongTermRetentionBackup + from ._models_py3 import ManagedBackupShortTermRetentionPolicy + from ._models_py3 import ManagedDatabase + from ._models_py3 import ManagedDatabaseSecurityAlertPolicy + from ._models_py3 import ManagedDatabaseUpdate + from ._models_py3 import ManagedInstance + from ._models_py3 import ManagedInstanceEditionCapability + from ._models_py3 import ManagedInstanceEncryptionProtector + from ._models_py3 import ManagedInstanceFamilyCapability + from ._models_py3 import ManagedInstanceKey + from ._models_py3 import ManagedInstancePairInfo + from ._models_py3 import ManagedInstanceUpdate + from ._models_py3 import ManagedInstanceVcoresCapability + from ._models_py3 import ManagedInstanceVersionCapability + from ._models_py3 import ManagedInstanceVulnerabilityAssessment + from ._models_py3 import ManagedServerSecurityAlertPolicy + from ._models_py3 import MaxSizeCapability + from ._models_py3 import MaxSizeRangeCapability + from ._models_py3 import Metric + from ._models_py3 import MetricAvailability + from ._models_py3 import MetricDefinition + from ._models_py3 import MetricName + from ._models_py3 import MetricValue + from ._models_py3 import Name + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationImpact + from ._models_py3 import PartnerInfo + from ._models_py3 import PartnerRegionInfo + from ._models_py3 import PerformanceLevelCapability + from ._models_py3 import ProxyResource + from ._models_py3 import RecommendedElasticPool + from ._models_py3 import RecommendedElasticPoolMetric + from ._models_py3 import RecommendedIndex + from ._models_py3 import RecoverableDatabase + from ._models_py3 import RecoverableManagedDatabase + from ._models_py3 import ReplicationLink + from ._models_py3 import Resource + from ._models_py3 import ResourceIdentity + from ._models_py3 import ResourceMoveDefinition + from ._models_py3 import RestorableDroppedDatabase + from ._models_py3 import RestorableDroppedManagedDatabase + from ._models_py3 import RestorePoint + from ._models_py3 import SensitivityLabel + from ._models_py3 import Server + from ._models_py3 import ServerAutomaticTuning + from ._models_py3 import ServerAzureADAdministrator + from ._models_py3 import ServerBlobAuditingPolicy + from ._models_py3 import ServerCommunicationLink + from ._models_py3 import ServerConnectionPolicy + from ._models_py3 import ServerDnsAlias + from ._models_py3 import ServerDnsAliasAcquisition + from ._models_py3 import ServerKey + from ._models_py3 import ServerSecurityAlertPolicy + from ._models_py3 import ServerUpdate + from ._models_py3 import ServerUsage + from ._models_py3 import ServerVersionCapability + from ._models_py3 import ServerVulnerabilityAssessment + from ._models_py3 import ServiceObjective + from ._models_py3 import ServiceObjectiveCapability + from ._models_py3 import ServiceTierAdvisor + from ._models_py3 import Sku + from ._models_py3 import SloUsageMetric + from ._models_py3 import SubscriptionUsage + from ._models_py3 import SyncAgent + from ._models_py3 import SyncAgentKeyProperties + from ._models_py3 import SyncAgentLinkedDatabase + from ._models_py3 import SyncDatabaseIdProperties + from ._models_py3 import SyncFullSchemaProperties + from ._models_py3 import SyncFullSchemaTable + from ._models_py3 import SyncFullSchemaTableColumn + from ._models_py3 import SyncGroup + from ._models_py3 import SyncGroupLogProperties + from ._models_py3 import SyncGroupSchema + from ._models_py3 import SyncGroupSchemaTable + from ._models_py3 import SyncGroupSchemaTableColumn + from ._models_py3 import SyncMember + from ._models_py3 import TdeCertificate + from ._models_py3 import TrackedResource + from ._models_py3 import TransparentDataEncryption + from ._models_py3 import TransparentDataEncryptionActivity + from ._models_py3 import Usage + from ._models_py3 import VirtualCluster + from ._models_py3 import VirtualClusterUpdate + from ._models_py3 import VirtualNetworkRule + from ._models_py3 import VulnerabilityAssessmentRecurringScansProperties + from ._models_py3 import VulnerabilityAssessmentScanError + from ._models_py3 import VulnerabilityAssessmentScanRecord except (SyntaxError, ImportError): - from .recoverable_database import RecoverableDatabase - from .restorable_dropped_database import RestorableDroppedDatabase - from .tracked_resource import TrackedResource - from .resource import Resource - from .proxy_resource import ProxyResource - from .check_name_availability_request import CheckNameAvailabilityRequest - from .check_name_availability_response import CheckNameAvailabilityResponse - from .server_connection_policy import ServerConnectionPolicy - from .database_security_alert_policy import DatabaseSecurityAlertPolicy - from .data_masking_policy import DataMaskingPolicy - from .data_masking_rule import DataMaskingRule - from .firewall_rule import FirewallRule - from .geo_backup_policy import GeoBackupPolicy - from .import_extension_request import ImportExtensionRequest - from .import_export_response import ImportExportResponse - from .import_request import ImportRequest - from .export_request import ExportRequest - from .metric_value import MetricValue - from .metric_name import MetricName - from .metric import Metric - from .metric_availability import MetricAvailability - from .metric_definition import MetricDefinition - from .recommended_elastic_pool_metric import RecommendedElasticPoolMetric - from .recommended_elastic_pool import RecommendedElasticPool - from .replication_link import ReplicationLink - from .server_azure_ad_administrator import ServerAzureADAdministrator - from .server_communication_link import ServerCommunicationLink - from .service_objective import ServiceObjective - from .elastic_pool_activity import ElasticPoolActivity - from .elastic_pool_database_activity import ElasticPoolDatabaseActivity - from .operation_impact import OperationImpact - from .recommended_index import RecommendedIndex - from .transparent_data_encryption import TransparentDataEncryption - from .slo_usage_metric import SloUsageMetric - from .service_tier_advisor import ServiceTierAdvisor - from .transparent_data_encryption_activity import TransparentDataEncryptionActivity - from .server_usage import ServerUsage - from .database_usage import DatabaseUsage - from .automatic_tuning_options import AutomaticTuningOptions - from .database_automatic_tuning import DatabaseAutomaticTuning - from .encryption_protector import EncryptionProtector - from .failover_group_read_write_endpoint import FailoverGroupReadWriteEndpoint - from .failover_group_read_only_endpoint import FailoverGroupReadOnlyEndpoint - from .partner_info import PartnerInfo - from .failover_group import FailoverGroup - from .failover_group_update import FailoverGroupUpdate - from .resource_identity import ResourceIdentity - from .sku import Sku - from .managed_instance import ManagedInstance - from .managed_instance_update import ManagedInstanceUpdate - from .operation_display import OperationDisplay - from .operation import Operation - from .server_key import ServerKey - from .server import Server - from .server_update import ServerUpdate - from .sync_agent import SyncAgent - from .sync_agent_key_properties import SyncAgentKeyProperties - from .sync_agent_linked_database import SyncAgentLinkedDatabase - from .sync_database_id_properties import SyncDatabaseIdProperties - from .sync_full_schema_table_column import SyncFullSchemaTableColumn - from .sync_full_schema_table import SyncFullSchemaTable - from .sync_full_schema_properties import SyncFullSchemaProperties - from .sync_group_log_properties import SyncGroupLogProperties - from .sync_group_schema_table_column import SyncGroupSchemaTableColumn - from .sync_group_schema_table import SyncGroupSchemaTable - from .sync_group_schema import SyncGroupSchema - from .sync_group import SyncGroup - from .sync_member import SyncMember - from .subscription_usage import SubscriptionUsage - from .virtual_cluster import VirtualCluster - from .virtual_cluster_update import VirtualClusterUpdate - from .virtual_network_rule import VirtualNetworkRule - from .extended_database_blob_auditing_policy import ExtendedDatabaseBlobAuditingPolicy - from .extended_server_blob_auditing_policy import ExtendedServerBlobAuditingPolicy - from .server_blob_auditing_policy import ServerBlobAuditingPolicy - from .database_blob_auditing_policy import DatabaseBlobAuditingPolicy - from .database_vulnerability_assessment_rule_baseline_item import DatabaseVulnerabilityAssessmentRuleBaselineItem - from .database_vulnerability_assessment_rule_baseline import DatabaseVulnerabilityAssessmentRuleBaseline - from .vulnerability_assessment_recurring_scans_properties import VulnerabilityAssessmentRecurringScansProperties - from .database_vulnerability_assessment import DatabaseVulnerabilityAssessment - from .job_agent import JobAgent - from .job_agent_update import JobAgentUpdate - from .job_credential import JobCredential - from .job_execution_target import JobExecutionTarget - from .job_execution import JobExecution - from .job_schedule import JobSchedule - from .job import Job - from .job_step_action import JobStepAction - from .job_step_output import JobStepOutput - from .job_step_execution_options import JobStepExecutionOptions - from .job_step import JobStep - from .job_target import JobTarget - from .job_target_group import JobTargetGroup - from .job_version import JobVersion - from .long_term_retention_backup import LongTermRetentionBackup - from .backup_long_term_retention_policy import BackupLongTermRetentionPolicy - from .managed_backup_short_term_retention_policy import ManagedBackupShortTermRetentionPolicy - from .complete_database_restore_definition import CompleteDatabaseRestoreDefinition - from .managed_database import ManagedDatabase - from .managed_database_update import ManagedDatabaseUpdate - from .automatic_tuning_server_options import AutomaticTuningServerOptions - from .server_automatic_tuning import ServerAutomaticTuning - from .server_dns_alias import ServerDnsAlias - from .server_dns_alias_acquisition import ServerDnsAliasAcquisition - from .server_security_alert_policy import ServerSecurityAlertPolicy - from .restorable_dropped_managed_database import RestorableDroppedManagedDatabase - from .restore_point import RestorePoint - from .create_database_restore_point_definition import CreateDatabaseRestorePointDefinition - from .managed_database_security_alert_policy import ManagedDatabaseSecurityAlertPolicy - from .managed_server_security_alert_policy import ManagedServerSecurityAlertPolicy - from .sensitivity_label import SensitivityLabel - from .database_operation import DatabaseOperation - from .elastic_pool_operation import ElasticPoolOperation - from .max_size_capability import MaxSizeCapability - from .log_size_capability import LogSizeCapability - from .max_size_range_capability import MaxSizeRangeCapability - from .performance_level_capability import PerformanceLevelCapability - from .license_type_capability import LicenseTypeCapability - from .service_objective_capability import ServiceObjectiveCapability - from .edition_capability import EditionCapability - from .elastic_pool_per_database_min_performance_level_capability import ElasticPoolPerDatabaseMinPerformanceLevelCapability - from .elastic_pool_per_database_max_performance_level_capability import ElasticPoolPerDatabaseMaxPerformanceLevelCapability - from .elastic_pool_performance_level_capability import ElasticPoolPerformanceLevelCapability - from .elastic_pool_edition_capability import ElasticPoolEditionCapability - from .server_version_capability import ServerVersionCapability - from .managed_instance_vcores_capability import ManagedInstanceVcoresCapability - from .managed_instance_family_capability import ManagedInstanceFamilyCapability - from .managed_instance_edition_capability import ManagedInstanceEditionCapability - from .managed_instance_version_capability import ManagedInstanceVersionCapability - from .location_capabilities import LocationCapabilities - from .database import Database - from .database_update import DatabaseUpdate - from .resource_move_definition import ResourceMoveDefinition - from .elastic_pool_per_database_settings import ElasticPoolPerDatabaseSettings - from .elastic_pool import ElasticPool - from .elastic_pool_update import ElasticPoolUpdate - from .vulnerability_assessment_scan_error import VulnerabilityAssessmentScanError - from .vulnerability_assessment_scan_record import VulnerabilityAssessmentScanRecord - from .database_vulnerability_assessment_scans_export import DatabaseVulnerabilityAssessmentScansExport - from .instance_failover_group_read_write_endpoint import InstanceFailoverGroupReadWriteEndpoint - from .instance_failover_group_read_only_endpoint import InstanceFailoverGroupReadOnlyEndpoint - from .partner_region_info import PartnerRegionInfo - from .managed_instance_pair_info import ManagedInstancePairInfo - from .instance_failover_group import InstanceFailoverGroup - from .backup_short_term_retention_policy import BackupShortTermRetentionPolicy - from .tde_certificate import TdeCertificate - from .managed_instance_key import ManagedInstanceKey - from .managed_instance_encryption_protector import ManagedInstanceEncryptionProtector - from .recoverable_managed_database import RecoverableManagedDatabase - from .managed_instance_vulnerability_assessment import ManagedInstanceVulnerabilityAssessment - from .server_vulnerability_assessment import ServerVulnerabilityAssessment -from .recoverable_database_paged import RecoverableDatabasePaged -from .restorable_dropped_database_paged import RestorableDroppedDatabasePaged -from .server_paged import ServerPaged -from .data_masking_rule_paged import DataMaskingRulePaged -from .firewall_rule_paged import FirewallRulePaged -from .geo_backup_policy_paged import GeoBackupPolicyPaged -from .metric_paged import MetricPaged -from .metric_definition_paged import MetricDefinitionPaged -from .database_paged import DatabasePaged -from .elastic_pool_paged import ElasticPoolPaged -from .recommended_elastic_pool_paged import RecommendedElasticPoolPaged -from .recommended_elastic_pool_metric_paged import RecommendedElasticPoolMetricPaged -from .replication_link_paged import ReplicationLinkPaged -from .server_azure_ad_administrator_paged import ServerAzureADAdministratorPaged -from .server_communication_link_paged import ServerCommunicationLinkPaged -from .service_objective_paged import ServiceObjectivePaged -from .elastic_pool_activity_paged import ElasticPoolActivityPaged -from .elastic_pool_database_activity_paged import ElasticPoolDatabaseActivityPaged -from .service_tier_advisor_paged import ServiceTierAdvisorPaged -from .transparent_data_encryption_activity_paged import TransparentDataEncryptionActivityPaged -from .server_usage_paged import ServerUsagePaged -from .database_usage_paged import DatabaseUsagePaged -from .encryption_protector_paged import EncryptionProtectorPaged -from .failover_group_paged import FailoverGroupPaged -from .managed_instance_paged import ManagedInstancePaged -from .operation_paged import OperationPaged -from .server_key_paged import ServerKeyPaged -from .sync_agent_paged import SyncAgentPaged -from .sync_agent_linked_database_paged import SyncAgentLinkedDatabasePaged -from .sync_database_id_properties_paged import SyncDatabaseIdPropertiesPaged -from .sync_full_schema_properties_paged import SyncFullSchemaPropertiesPaged -from .sync_group_log_properties_paged import SyncGroupLogPropertiesPaged -from .sync_group_paged import SyncGroupPaged -from .sync_member_paged import SyncMemberPaged -from .subscription_usage_paged import SubscriptionUsagePaged -from .virtual_cluster_paged import VirtualClusterPaged -from .virtual_network_rule_paged import VirtualNetworkRulePaged -from .database_vulnerability_assessment_paged import DatabaseVulnerabilityAssessmentPaged -from .job_agent_paged import JobAgentPaged -from .job_credential_paged import JobCredentialPaged -from .job_execution_paged import JobExecutionPaged -from .job_paged import JobPaged -from .job_step_paged import JobStepPaged -from .job_target_group_paged import JobTargetGroupPaged -from .job_version_paged import JobVersionPaged -from .long_term_retention_backup_paged import LongTermRetentionBackupPaged -from .managed_backup_short_term_retention_policy_paged import ManagedBackupShortTermRetentionPolicyPaged -from .managed_database_paged import ManagedDatabasePaged -from .server_dns_alias_paged import ServerDnsAliasPaged -from .server_security_alert_policy_paged import ServerSecurityAlertPolicyPaged -from .restorable_dropped_managed_database_paged import RestorableDroppedManagedDatabasePaged -from .restore_point_paged import RestorePointPaged -from .managed_database_security_alert_policy_paged import ManagedDatabaseSecurityAlertPolicyPaged -from .managed_server_security_alert_policy_paged import ManagedServerSecurityAlertPolicyPaged -from .sensitivity_label_paged import SensitivityLabelPaged -from .database_operation_paged import DatabaseOperationPaged -from .elastic_pool_operation_paged import ElasticPoolOperationPaged -from .vulnerability_assessment_scan_record_paged import VulnerabilityAssessmentScanRecordPaged -from .instance_failover_group_paged import InstanceFailoverGroupPaged -from .backup_short_term_retention_policy_paged import BackupShortTermRetentionPolicyPaged -from .managed_instance_key_paged import ManagedInstanceKeyPaged -from .managed_instance_encryption_protector_paged import ManagedInstanceEncryptionProtectorPaged -from .recoverable_managed_database_paged import RecoverableManagedDatabasePaged -from .managed_instance_vulnerability_assessment_paged import ManagedInstanceVulnerabilityAssessmentPaged -from .server_vulnerability_assessment_paged import ServerVulnerabilityAssessmentPaged -from .sql_management_client_enums import ( + from ._models import AutomaticTuningOptions + from ._models import AutomaticTuningServerOptions + from ._models import BackupLongTermRetentionPolicy + from ._models import BackupShortTermRetentionPolicy + from ._models import CheckNameAvailabilityRequest + from ._models import CheckNameAvailabilityResponse + from ._models import CompleteDatabaseRestoreDefinition + from ._models import CreateDatabaseRestorePointDefinition + from ._models import Database + from ._models import DatabaseAutomaticTuning + from ._models import DatabaseBlobAuditingPolicy + from ._models import DatabaseOperation + from ._models import DatabaseSecurityAlertPolicy + from ._models import DatabaseUpdate + from ._models import DatabaseUsage + from ._models import DatabaseVulnerabilityAssessment + from ._models import DatabaseVulnerabilityAssessmentRuleBaseline + from ._models import DatabaseVulnerabilityAssessmentRuleBaselineItem + from ._models import DatabaseVulnerabilityAssessmentScansExport + from ._models import DataMaskingPolicy + from ._models import DataMaskingRule + from ._models import EditionCapability + from ._models import ElasticPool + from ._models import ElasticPoolActivity + from ._models import ElasticPoolDatabaseActivity + from ._models import ElasticPoolEditionCapability + from ._models import ElasticPoolOperation + from ._models import ElasticPoolPerDatabaseMaxPerformanceLevelCapability + from ._models import ElasticPoolPerDatabaseMinPerformanceLevelCapability + from ._models import ElasticPoolPerDatabaseSettings + from ._models import ElasticPoolPerformanceLevelCapability + from ._models import ElasticPoolUpdate + from ._models import EncryptionProtector + from ._models import ExportRequest + from ._models import ExtendedDatabaseBlobAuditingPolicy + from ._models import ExtendedServerBlobAuditingPolicy + from ._models import FailoverGroup + from ._models import FailoverGroupReadOnlyEndpoint + from ._models import FailoverGroupReadWriteEndpoint + from ._models import FailoverGroupUpdate + from ._models import FirewallRule + from ._models import GeoBackupPolicy + from ._models import ImportExportResponse + from ._models import ImportExtensionRequest + from ._models import ImportRequest + from ._models import InstanceFailoverGroup + from ._models import InstanceFailoverGroupReadOnlyEndpoint + from ._models import InstanceFailoverGroupReadWriteEndpoint + from ._models import InstancePool + from ._models import InstancePoolUpdate + from ._models import Job + from ._models import JobAgent + from ._models import JobAgentUpdate + from ._models import JobCredential + from ._models import JobExecution + from ._models import JobExecutionTarget + from ._models import JobSchedule + from ._models import JobStep + from ._models import JobStepAction + from ._models import JobStepExecutionOptions + from ._models import JobStepOutput + from ._models import JobTarget + from ._models import JobTargetGroup + from ._models import JobVersion + from ._models import LicenseTypeCapability + from ._models import LocationCapabilities + from ._models import LogSizeCapability + from ._models import LongTermRetentionBackup + from ._models import ManagedBackupShortTermRetentionPolicy + from ._models import ManagedDatabase + from ._models import ManagedDatabaseSecurityAlertPolicy + from ._models import ManagedDatabaseUpdate + from ._models import ManagedInstance + from ._models import ManagedInstanceEditionCapability + from ._models import ManagedInstanceEncryptionProtector + from ._models import ManagedInstanceFamilyCapability + from ._models import ManagedInstanceKey + from ._models import ManagedInstancePairInfo + from ._models import ManagedInstanceUpdate + from ._models import ManagedInstanceVcoresCapability + from ._models import ManagedInstanceVersionCapability + from ._models import ManagedInstanceVulnerabilityAssessment + from ._models import ManagedServerSecurityAlertPolicy + from ._models import MaxSizeCapability + from ._models import MaxSizeRangeCapability + from ._models import Metric + from ._models import MetricAvailability + from ._models import MetricDefinition + from ._models import MetricName + from ._models import MetricValue + from ._models import Name + from ._models import Operation + from ._models import OperationDisplay + from ._models import OperationImpact + from ._models import PartnerInfo + from ._models import PartnerRegionInfo + from ._models import PerformanceLevelCapability + from ._models import ProxyResource + from ._models import RecommendedElasticPool + from ._models import RecommendedElasticPoolMetric + from ._models import RecommendedIndex + from ._models import RecoverableDatabase + from ._models import RecoverableManagedDatabase + from ._models import ReplicationLink + from ._models import Resource + from ._models import ResourceIdentity + from ._models import ResourceMoveDefinition + from ._models import RestorableDroppedDatabase + from ._models import RestorableDroppedManagedDatabase + from ._models import RestorePoint + from ._models import SensitivityLabel + from ._models import Server + from ._models import ServerAutomaticTuning + from ._models import ServerAzureADAdministrator + from ._models import ServerBlobAuditingPolicy + from ._models import ServerCommunicationLink + from ._models import ServerConnectionPolicy + from ._models import ServerDnsAlias + from ._models import ServerDnsAliasAcquisition + from ._models import ServerKey + from ._models import ServerSecurityAlertPolicy + from ._models import ServerUpdate + from ._models import ServerUsage + from ._models import ServerVersionCapability + from ._models import ServerVulnerabilityAssessment + from ._models import ServiceObjective + from ._models import ServiceObjectiveCapability + from ._models import ServiceTierAdvisor + from ._models import Sku + from ._models import SloUsageMetric + from ._models import SubscriptionUsage + from ._models import SyncAgent + from ._models import SyncAgentKeyProperties + from ._models import SyncAgentLinkedDatabase + from ._models import SyncDatabaseIdProperties + from ._models import SyncFullSchemaProperties + from ._models import SyncFullSchemaTable + from ._models import SyncFullSchemaTableColumn + from ._models import SyncGroup + from ._models import SyncGroupLogProperties + from ._models import SyncGroupSchema + from ._models import SyncGroupSchemaTable + from ._models import SyncGroupSchemaTableColumn + from ._models import SyncMember + from ._models import TdeCertificate + from ._models import TrackedResource + from ._models import TransparentDataEncryption + from ._models import TransparentDataEncryptionActivity + from ._models import Usage + from ._models import VirtualCluster + from ._models import VirtualClusterUpdate + from ._models import VirtualNetworkRule + from ._models import VulnerabilityAssessmentRecurringScansProperties + from ._models import VulnerabilityAssessmentScanError + from ._models import VulnerabilityAssessmentScanRecord +from ._paged_models import BackupShortTermRetentionPolicyPaged +from ._paged_models import DatabaseOperationPaged +from ._paged_models import DatabasePaged +from ._paged_models import DatabaseUsagePaged +from ._paged_models import DatabaseVulnerabilityAssessmentPaged +from ._paged_models import DataMaskingRulePaged +from ._paged_models import ElasticPoolActivityPaged +from ._paged_models import ElasticPoolDatabaseActivityPaged +from ._paged_models import ElasticPoolOperationPaged +from ._paged_models import ElasticPoolPaged +from ._paged_models import EncryptionProtectorPaged +from ._paged_models import FailoverGroupPaged +from ._paged_models import FirewallRulePaged +from ._paged_models import GeoBackupPolicyPaged +from ._paged_models import InstanceFailoverGroupPaged +from ._paged_models import InstancePoolPaged +from ._paged_models import JobAgentPaged +from ._paged_models import JobCredentialPaged +from ._paged_models import JobExecutionPaged +from ._paged_models import JobPaged +from ._paged_models import JobStepPaged +from ._paged_models import JobTargetGroupPaged +from ._paged_models import JobVersionPaged +from ._paged_models import LongTermRetentionBackupPaged +from ._paged_models import ManagedBackupShortTermRetentionPolicyPaged +from ._paged_models import ManagedDatabasePaged +from ._paged_models import ManagedDatabaseSecurityAlertPolicyPaged +from ._paged_models import ManagedInstanceEncryptionProtectorPaged +from ._paged_models import ManagedInstanceKeyPaged +from ._paged_models import ManagedInstancePaged +from ._paged_models import ManagedInstanceVulnerabilityAssessmentPaged +from ._paged_models import ManagedServerSecurityAlertPolicyPaged +from ._paged_models import MetricDefinitionPaged +from ._paged_models import MetricPaged +from ._paged_models import OperationPaged +from ._paged_models import RecommendedElasticPoolMetricPaged +from ._paged_models import RecommendedElasticPoolPaged +from ._paged_models import RecoverableDatabasePaged +from ._paged_models import RecoverableManagedDatabasePaged +from ._paged_models import ReplicationLinkPaged +from ._paged_models import RestorableDroppedDatabasePaged +from ._paged_models import RestorableDroppedManagedDatabasePaged +from ._paged_models import RestorePointPaged +from ._paged_models import SensitivityLabelPaged +from ._paged_models import ServerAzureADAdministratorPaged +from ._paged_models import ServerCommunicationLinkPaged +from ._paged_models import ServerDnsAliasPaged +from ._paged_models import ServerKeyPaged +from ._paged_models import ServerPaged +from ._paged_models import ServerSecurityAlertPolicyPaged +from ._paged_models import ServerUsagePaged +from ._paged_models import ServerVulnerabilityAssessmentPaged +from ._paged_models import ServiceObjectivePaged +from ._paged_models import ServiceTierAdvisorPaged +from ._paged_models import SubscriptionUsagePaged +from ._paged_models import SyncAgentLinkedDatabasePaged +from ._paged_models import SyncAgentPaged +from ._paged_models import SyncDatabaseIdPropertiesPaged +from ._paged_models import SyncFullSchemaPropertiesPaged +from ._paged_models import SyncGroupLogPropertiesPaged +from ._paged_models import SyncGroupPaged +from ._paged_models import SyncMemberPaged +from ._paged_models import TransparentDataEncryptionActivityPaged +from ._paged_models import UsagePaged +from ._paged_models import VirtualClusterPaged +from ._paged_models import VirtualNetworkRulePaged +from ._paged_models import VulnerabilityAssessmentScanRecordPaged +from ._sql_management_client_enums import ( CheckNameAvailabilityReason, ServerConnectionType, SecurityAlertPolicyState, @@ -411,9 +421,8 @@ ReadWriteEndpointFailoverPolicy, ReadOnlyEndpointFailoverPolicy, FailoverGroupReplicationRole, - IdentityType, - ManagedInstanceProxyOverride, OperationOrigin, + IdentityType, SyncAgentState, SyncMemberDbType, SyncGroupLogType, @@ -453,6 +462,10 @@ VulnerabilityAssessmentScanTriggerType, VulnerabilityAssessmentScanState, InstanceFailoverGroupReplicationRole, + InstancePoolLicenseType, + ManagedServerCreateMode, + ManagedInstanceLicenseType, + ManagedInstanceProxyOverride, LongTermRetentionDatabaseState, VulnerabilityAssessmentPolicyBaselineName, SensitivityLabelSource, @@ -460,157 +473,161 @@ ) __all__ = [ - 'RecoverableDatabase', - 'RestorableDroppedDatabase', - 'TrackedResource', - 'Resource', - 'ProxyResource', + 'AutomaticTuningOptions', + 'AutomaticTuningServerOptions', + 'BackupLongTermRetentionPolicy', + 'BackupShortTermRetentionPolicy', 'CheckNameAvailabilityRequest', 'CheckNameAvailabilityResponse', - 'ServerConnectionPolicy', + 'CompleteDatabaseRestoreDefinition', + 'CreateDatabaseRestorePointDefinition', + 'Database', + 'DatabaseAutomaticTuning', + 'DatabaseBlobAuditingPolicy', + 'DatabaseOperation', 'DatabaseSecurityAlertPolicy', + 'DatabaseUpdate', + 'DatabaseUsage', + 'DatabaseVulnerabilityAssessment', + 'DatabaseVulnerabilityAssessmentRuleBaseline', + 'DatabaseVulnerabilityAssessmentRuleBaselineItem', + 'DatabaseVulnerabilityAssessmentScansExport', 'DataMaskingPolicy', 'DataMaskingRule', + 'EditionCapability', + 'ElasticPool', + 'ElasticPoolActivity', + 'ElasticPoolDatabaseActivity', + 'ElasticPoolEditionCapability', + 'ElasticPoolOperation', + 'ElasticPoolPerDatabaseMaxPerformanceLevelCapability', + 'ElasticPoolPerDatabaseMinPerformanceLevelCapability', + 'ElasticPoolPerDatabaseSettings', + 'ElasticPoolPerformanceLevelCapability', + 'ElasticPoolUpdate', + 'EncryptionProtector', + 'ExportRequest', + 'ExtendedDatabaseBlobAuditingPolicy', + 'ExtendedServerBlobAuditingPolicy', + 'FailoverGroup', + 'FailoverGroupReadOnlyEndpoint', + 'FailoverGroupReadWriteEndpoint', + 'FailoverGroupUpdate', 'FirewallRule', 'GeoBackupPolicy', - 'ImportExtensionRequest', 'ImportExportResponse', + 'ImportExtensionRequest', 'ImportRequest', - 'ExportRequest', - 'MetricValue', - 'MetricName', + 'InstanceFailoverGroup', + 'InstanceFailoverGroupReadOnlyEndpoint', + 'InstanceFailoverGroupReadWriteEndpoint', + 'InstancePool', + 'InstancePoolUpdate', + 'Job', + 'JobAgent', + 'JobAgentUpdate', + 'JobCredential', + 'JobExecution', + 'JobExecutionTarget', + 'JobSchedule', + 'JobStep', + 'JobStepAction', + 'JobStepExecutionOptions', + 'JobStepOutput', + 'JobTarget', + 'JobTargetGroup', + 'JobVersion', + 'LicenseTypeCapability', + 'LocationCapabilities', + 'LogSizeCapability', + 'LongTermRetentionBackup', + 'ManagedBackupShortTermRetentionPolicy', + 'ManagedDatabase', + 'ManagedDatabaseSecurityAlertPolicy', + 'ManagedDatabaseUpdate', + 'ManagedInstance', + 'ManagedInstanceEditionCapability', + 'ManagedInstanceEncryptionProtector', + 'ManagedInstanceFamilyCapability', + 'ManagedInstanceKey', + 'ManagedInstancePairInfo', + 'ManagedInstanceUpdate', + 'ManagedInstanceVcoresCapability', + 'ManagedInstanceVersionCapability', + 'ManagedInstanceVulnerabilityAssessment', + 'ManagedServerSecurityAlertPolicy', + 'MaxSizeCapability', + 'MaxSizeRangeCapability', 'Metric', 'MetricAvailability', 'MetricDefinition', - 'RecommendedElasticPoolMetric', + 'MetricName', + 'MetricValue', + 'Name', + 'Operation', + 'OperationDisplay', + 'OperationImpact', + 'PartnerInfo', + 'PartnerRegionInfo', + 'PerformanceLevelCapability', + 'ProxyResource', 'RecommendedElasticPool', + 'RecommendedElasticPoolMetric', + 'RecommendedIndex', + 'RecoverableDatabase', + 'RecoverableManagedDatabase', 'ReplicationLink', + 'Resource', + 'ResourceIdentity', + 'ResourceMoveDefinition', + 'RestorableDroppedDatabase', + 'RestorableDroppedManagedDatabase', + 'RestorePoint', + 'SensitivityLabel', + 'Server', + 'ServerAutomaticTuning', 'ServerAzureADAdministrator', + 'ServerBlobAuditingPolicy', 'ServerCommunicationLink', + 'ServerConnectionPolicy', + 'ServerDnsAlias', + 'ServerDnsAliasAcquisition', + 'ServerKey', + 'ServerSecurityAlertPolicy', + 'ServerUpdate', + 'ServerUsage', + 'ServerVersionCapability', + 'ServerVulnerabilityAssessment', 'ServiceObjective', - 'ElasticPoolActivity', - 'ElasticPoolDatabaseActivity', - 'OperationImpact', - 'RecommendedIndex', - 'TransparentDataEncryption', - 'SloUsageMetric', + 'ServiceObjectiveCapability', 'ServiceTierAdvisor', - 'TransparentDataEncryptionActivity', - 'ServerUsage', - 'DatabaseUsage', - 'AutomaticTuningOptions', - 'DatabaseAutomaticTuning', - 'EncryptionProtector', - 'FailoverGroupReadWriteEndpoint', - 'FailoverGroupReadOnlyEndpoint', - 'PartnerInfo', - 'FailoverGroup', - 'FailoverGroupUpdate', - 'ResourceIdentity', 'Sku', - 'ManagedInstance', - 'ManagedInstanceUpdate', - 'OperationDisplay', - 'Operation', - 'ServerKey', - 'Server', - 'ServerUpdate', + 'SloUsageMetric', + 'SubscriptionUsage', 'SyncAgent', 'SyncAgentKeyProperties', 'SyncAgentLinkedDatabase', 'SyncDatabaseIdProperties', - 'SyncFullSchemaTableColumn', - 'SyncFullSchemaTable', 'SyncFullSchemaProperties', + 'SyncFullSchemaTable', + 'SyncFullSchemaTableColumn', + 'SyncGroup', 'SyncGroupLogProperties', - 'SyncGroupSchemaTableColumn', - 'SyncGroupSchemaTable', 'SyncGroupSchema', - 'SyncGroup', + 'SyncGroupSchemaTable', + 'SyncGroupSchemaTableColumn', 'SyncMember', - 'SubscriptionUsage', + 'TdeCertificate', + 'TrackedResource', + 'TransparentDataEncryption', + 'TransparentDataEncryptionActivity', + 'Usage', 'VirtualCluster', 'VirtualClusterUpdate', 'VirtualNetworkRule', - 'ExtendedDatabaseBlobAuditingPolicy', - 'ExtendedServerBlobAuditingPolicy', - 'ServerBlobAuditingPolicy', - 'DatabaseBlobAuditingPolicy', - 'DatabaseVulnerabilityAssessmentRuleBaselineItem', - 'DatabaseVulnerabilityAssessmentRuleBaseline', 'VulnerabilityAssessmentRecurringScansProperties', - 'DatabaseVulnerabilityAssessment', - 'JobAgent', - 'JobAgentUpdate', - 'JobCredential', - 'JobExecutionTarget', - 'JobExecution', - 'JobSchedule', - 'Job', - 'JobStepAction', - 'JobStepOutput', - 'JobStepExecutionOptions', - 'JobStep', - 'JobTarget', - 'JobTargetGroup', - 'JobVersion', - 'LongTermRetentionBackup', - 'BackupLongTermRetentionPolicy', - 'ManagedBackupShortTermRetentionPolicy', - 'CompleteDatabaseRestoreDefinition', - 'ManagedDatabase', - 'ManagedDatabaseUpdate', - 'AutomaticTuningServerOptions', - 'ServerAutomaticTuning', - 'ServerDnsAlias', - 'ServerDnsAliasAcquisition', - 'ServerSecurityAlertPolicy', - 'RestorableDroppedManagedDatabase', - 'RestorePoint', - 'CreateDatabaseRestorePointDefinition', - 'ManagedDatabaseSecurityAlertPolicy', - 'ManagedServerSecurityAlertPolicy', - 'SensitivityLabel', - 'DatabaseOperation', - 'ElasticPoolOperation', - 'MaxSizeCapability', - 'LogSizeCapability', - 'MaxSizeRangeCapability', - 'PerformanceLevelCapability', - 'LicenseTypeCapability', - 'ServiceObjectiveCapability', - 'EditionCapability', - 'ElasticPoolPerDatabaseMinPerformanceLevelCapability', - 'ElasticPoolPerDatabaseMaxPerformanceLevelCapability', - 'ElasticPoolPerformanceLevelCapability', - 'ElasticPoolEditionCapability', - 'ServerVersionCapability', - 'ManagedInstanceVcoresCapability', - 'ManagedInstanceFamilyCapability', - 'ManagedInstanceEditionCapability', - 'ManagedInstanceVersionCapability', - 'LocationCapabilities', - 'Database', - 'DatabaseUpdate', - 'ResourceMoveDefinition', - 'ElasticPoolPerDatabaseSettings', - 'ElasticPool', - 'ElasticPoolUpdate', 'VulnerabilityAssessmentScanError', 'VulnerabilityAssessmentScanRecord', - 'DatabaseVulnerabilityAssessmentScansExport', - 'InstanceFailoverGroupReadWriteEndpoint', - 'InstanceFailoverGroupReadOnlyEndpoint', - 'PartnerRegionInfo', - 'ManagedInstancePairInfo', - 'InstanceFailoverGroup', - 'BackupShortTermRetentionPolicy', - 'TdeCertificate', - 'ManagedInstanceKey', - 'ManagedInstanceEncryptionProtector', - 'RecoverableManagedDatabase', - 'ManagedInstanceVulnerabilityAssessment', - 'ServerVulnerabilityAssessment', 'RecoverableDatabasePaged', 'RestorableDroppedDatabasePaged', 'ServerPaged', @@ -635,7 +652,6 @@ 'DatabaseUsagePaged', 'EncryptionProtectorPaged', 'FailoverGroupPaged', - 'ManagedInstancePaged', 'OperationPaged', 'ServerKeyPaged', 'SyncAgentPaged', @@ -676,6 +692,9 @@ 'RecoverableManagedDatabasePaged', 'ManagedInstanceVulnerabilityAssessmentPaged', 'ServerVulnerabilityAssessmentPaged', + 'InstancePoolPaged', + 'UsagePaged', + 'ManagedInstancePaged', 'CheckNameAvailabilityReason', 'ServerConnectionType', 'SecurityAlertPolicyState', @@ -708,9 +727,8 @@ 'ReadWriteEndpointFailoverPolicy', 'ReadOnlyEndpointFailoverPolicy', 'FailoverGroupReplicationRole', - 'IdentityType', - 'ManagedInstanceProxyOverride', 'OperationOrigin', + 'IdentityType', 'SyncAgentState', 'SyncMemberDbType', 'SyncGroupLogType', @@ -750,6 +768,10 @@ 'VulnerabilityAssessmentScanTriggerType', 'VulnerabilityAssessmentScanState', 'InstanceFailoverGroupReplicationRole', + 'InstancePoolLicenseType', + 'ManagedServerCreateMode', + 'ManagedInstanceLicenseType', + 'ManagedInstanceProxyOverride', 'LongTermRetentionDatabaseState', 'VulnerabilityAssessmentPolicyBaselineName', 'SensitivityLabelSource', diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py new file mode 100644 index 000000000000..afc88d2be7ad --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py @@ -0,0 +1,8891 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AutomaticTuningOptions(Model): + """Automatic tuning properties for individual advisors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param desired_state: Automatic tuning option desired state. Possible + values include: 'Off', 'On', 'Default' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired + :ivar actual_state: Automatic tuning option actual state. Possible values + include: 'Off', 'On' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual + :ivar reason_code: Reason code if desired and actual state are different. + :vartype reason_code: int + :ivar reason_desc: Reason description if desired and actual state are + different. Possible values include: 'Default', 'Disabled', + 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', + 'QueryStoreReadOnly', 'NotSupported' + :vartype reason_desc: str or + ~azure.mgmt.sql.models.AutomaticTuningDisabledReason + """ + + _validation = { + 'actual_state': {'readonly': True}, + 'reason_code': {'readonly': True}, + 'reason_desc': {'readonly': True}, + } + + _attribute_map = { + 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, + 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, + 'reason_code': {'key': 'reasonCode', 'type': 'int'}, + 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningDisabledReason'}, + } + + def __init__(self, **kwargs): + super(AutomaticTuningOptions, self).__init__(**kwargs) + self.desired_state = kwargs.get('desired_state', None) + self.actual_state = None + self.reason_code = None + self.reason_desc = None + + +class AutomaticTuningServerOptions(Model): + """Automatic tuning properties for individual advisors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param desired_state: Automatic tuning option desired state. Possible + values include: 'Off', 'On', 'Default' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired + :ivar actual_state: Automatic tuning option actual state. Possible values + include: 'Off', 'On' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual + :ivar reason_code: Reason code if desired and actual state are different. + :vartype reason_code: int + :ivar reason_desc: Reason description if desired and actual state are + different. Possible values include: 'Default', 'Disabled', + 'AutoConfigured' + :vartype reason_desc: str or + ~azure.mgmt.sql.models.AutomaticTuningServerReason + """ + + _validation = { + 'actual_state': {'readonly': True}, + 'reason_code': {'readonly': True}, + 'reason_desc': {'readonly': True}, + } + + _attribute_map = { + 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, + 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, + 'reason_code': {'key': 'reasonCode', 'type': 'int'}, + 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningServerReason'}, + } + + def __init__(self, **kwargs): + super(AutomaticTuningServerOptions, self).__init__(**kwargs) + self.desired_state = kwargs.get('desired_state', None) + self.actual_state = None + self.reason_code = None + self.reason_desc = None + + +class Resource(Model): + """ARM resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ProxyResource(Resource): + """ARM proxy resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) + + +class BackupLongTermRetentionPolicy(ProxyResource): + """A long term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param weekly_retention: The weekly retention policy for an LTR backup in + an ISO 8601 format. + :type weekly_retention: str + :param monthly_retention: The monthly retention policy for an LTR backup + in an ISO 8601 format. + :type monthly_retention: str + :param yearly_retention: The yearly retention policy for an LTR backup in + an ISO 8601 format. + :type yearly_retention: str + :param week_of_year: The week of year to take the yearly backup in an ISO + 8601 format. + :type week_of_year: int + """ + + _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'}, + 'weekly_retention': {'key': 'properties.weeklyRetention', 'type': 'str'}, + 'monthly_retention': {'key': 'properties.monthlyRetention', 'type': 'str'}, + 'yearly_retention': {'key': 'properties.yearlyRetention', 'type': 'str'}, + 'week_of_year': {'key': 'properties.weekOfYear', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BackupLongTermRetentionPolicy, self).__init__(**kwargs) + self.weekly_retention = kwargs.get('weekly_retention', None) + self.monthly_retention = kwargs.get('monthly_retention', None) + self.yearly_retention = kwargs.get('yearly_retention', None) + self.week_of_year = kwargs.get('week_of_year', None) + + +class BackupShortTermRetentionPolicy(ProxyResource): + """A short term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param retention_days: The backup retention period in days. This is how + many days Point-in-Time Restore will be supported. + :type retention_days: int + """ + + _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'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) + self.retention_days = kwargs.get('retention_days', None) + + +class CheckNameAvailabilityRequest(Model): + """A request to check whether the specified name for a resource is available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name whose availability is to be checked. + :type name: str + :ivar type: Required. The type of resource that is used as the scope of + the availability check. Default value: "Microsoft.Sql/servers" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.Sql/servers" + + def __init__(self, **kwargs): + super(CheckNameAvailabilityRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class CheckNameAvailabilityResponse(Model): + """A response indicating whether the specified name for a resource is + available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar available: True if the name is available, otherwise false. + :vartype available: bool + :ivar message: A message explaining why the name is unavailable. Will be + null if the name is available. + :vartype message: str + :ivar name: The name whose availability was checked. + :vartype name: str + :ivar reason: The reason code explaining why the name is unavailable. Will + be null if the name is available. Possible values include: 'Invalid', + 'AlreadyExists' + :vartype reason: str or ~azure.mgmt.sql.models.CheckNameAvailabilityReason + """ + + _validation = { + 'available': {'readonly': True}, + 'message': {'readonly': True}, + 'name': {'readonly': True}, + 'reason': {'readonly': True}, + } + + _attribute_map = { + 'available': {'key': 'available', 'type': 'bool'}, + 'message': {'key': 'message', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'CheckNameAvailabilityReason'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailabilityResponse, self).__init__(**kwargs) + self.available = None + self.message = None + self.name = None + self.reason = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class CompleteDatabaseRestoreDefinition(Model): + """Contains the information necessary to perform a complete database restore + operation. + + All required parameters must be populated in order to send to Azure. + + :param last_backup_name: Required. The last backup name to apply + :type last_backup_name: str + """ + + _validation = { + 'last_backup_name': {'required': True}, + } + + _attribute_map = { + 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CompleteDatabaseRestoreDefinition, self).__init__(**kwargs) + self.last_backup_name = kwargs.get('last_backup_name', None) + + +class CreateDatabaseRestorePointDefinition(Model): + """Contains the information necessary to perform a create database restore + point operation. + + All required parameters must be populated in order to send to Azure. + + :param restore_point_label: Required. The restore point label to apply + :type restore_point_label: str + """ + + _validation = { + 'restore_point_label': {'required': True}, + } + + _attribute_map = { + 'restore_point_label': {'key': 'restorePointLabel', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CreateDatabaseRestorePointDefinition, self).__init__(**kwargs) + self.restore_point_label = kwargs.get('restore_point_label', None) + + +class TrackedResource(Resource): + """ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class Database(TrackedResource): + """A database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The database SKU. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location + ```` + :type sku: ~azure.mgmt.sql.models.Sku + :ivar kind: Kind of database. This is metadata used for the Azure portal + experience. + :vartype kind: str + :ivar managed_by: Resource that manages the database. + :vartype managed_by: str + :param create_mode: Specifies the mode of database creation. + Default: regular database creation. + Copy: creates a database as a copy of an existing database. + sourceDatabaseId must be specified as the resource ID of the source + database. + Secondary: creates a database as a secondary replica of an existing + database. sourceDatabaseId must be specified as the resource ID of the + existing primary database. + PointInTimeRestore: Creates a database by restoring a point in time backup + of an existing database. sourceDatabaseId must be specified as the + resource ID of the existing database, and restorePointInTime must be + specified. + Recovery: Creates a database by restoring a geo-replicated backup. + sourceDatabaseId must be specified as the recoverable database resource ID + to restore. + Restore: Creates a database by restoring a backup of a deleted database. + sourceDatabaseId must be specified. If sourceDatabaseId is the database's + original resource ID, then sourceDatabaseDeletionDate must be specified. + Otherwise sourceDatabaseId must be the restorable dropped database + resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime + may also be specified to restore from an earlier point in time. + RestoreLongTermRetentionBackup: Creates a database by restoring from a + long term retention vault. recoveryServicesRecoveryPointResourceId must be + specified as the recovery point resource ID. + Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for + DataWarehouse edition. Possible values include: 'Default', 'Copy', + 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', + 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', + 'RestoreLongTermRetentionBackup', 'OnlineSecondary' + :type create_mode: str or ~azure.mgmt.sql.models.CreateMode + :param collation: The collation of the database. + :type collation: str + :param max_size_bytes: The max size of the database expressed in bytes. + :type max_size_bytes: long + :param sample_name: The name of the sample schema to apply when creating + this database. Possible values include: 'AdventureWorksLT', + 'WideWorldImportersStd', 'WideWorldImportersFull' + :type sample_name: str or ~azure.mgmt.sql.models.SampleName + :param elastic_pool_id: The resource identifier of the elastic pool + containing this database. + :type elastic_pool_id: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :ivar status: The status of the database. Possible values include: + 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', + 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', + 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', + 'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers', + 'OnlineChangingDwPerformanceTiers' + :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus + :ivar database_id: The ID of the database. + :vartype database_id: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar current_service_objective_name: The current service level objective + name of the database. + :vartype current_service_objective_name: str + :ivar requested_service_objective_name: The requested service level + objective name of the database. + :vartype requested_service_objective_name: str + :ivar default_secondary_location: The default secondary region for this + database. + :vartype default_secondary_location: str + :ivar failover_group_id: Failover Group resource identifier that this + database belongs to. + :vartype failover_group_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param source_database_deletion_date: Specifies the time that the database + was deleted. + :type source_database_deletion_date: datetime + :param recovery_services_recovery_point_id: The resource identifier of the + recovery point associated with create operation of this database. + :type recovery_services_recovery_point_id: str + :param long_term_retention_backup_resource_id: The resource identifier of + the long term retention backup associated with create operation of this + database. + :type long_term_retention_backup_resource_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param restorable_dropped_database_id: The resource identifier of the + restorable dropped database associated with create operation of this + database. + :type restorable_dropped_database_id: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param zone_redundant: Whether or not this database is zone redundant, + which means the replicas of this database will be spread across multiple + availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this database. Possible + values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType + :ivar max_log_size_bytes: The max log size for this database. + :vartype max_log_size_bytes: long + :ivar earliest_restore_date: This records the earliest start date and time + that restore is available for this database (ISO8601 format). + :vartype earliest_restore_date: datetime + :param read_scale: The state of read-only routing. If enabled, connections + that have application intent set to readonly in their connection string + may be routed to a readonly secondary replica in the same region. Possible + values include: 'Enabled', 'Disabled' + :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale + :ivar current_sku: The name and tier of the SKU. + :vartype current_sku: ~azure.mgmt.sql.models.Sku + :param auto_pause_delay: Time in minutes after which database is + automatically paused. A value of -1 means that automatic pause is disabled + :type auto_pause_delay: int + :param min_capacity: Minimal capacity that database will always have + allocated, if not paused + :type min_capacity: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'managed_by': {'readonly': True}, + 'status': {'readonly': True}, + 'database_id': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'current_service_objective_name': {'readonly': True}, + 'requested_service_objective_name': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + 'max_log_size_bytes': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'current_sku': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, + 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, + 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, + 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, + 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, + 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, + 'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'}, + 'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(Database, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.kind = None + self.managed_by = None + self.create_mode = kwargs.get('create_mode', None) + self.collation = kwargs.get('collation', None) + self.max_size_bytes = kwargs.get('max_size_bytes', None) + self.sample_name = kwargs.get('sample_name', None) + self.elastic_pool_id = kwargs.get('elastic_pool_id', None) + self.source_database_id = kwargs.get('source_database_id', None) + self.status = None + self.database_id = None + self.creation_date = None + self.current_service_objective_name = None + self.requested_service_objective_name = None + self.default_secondary_location = None + self.failover_group_id = None + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.source_database_deletion_date = kwargs.get('source_database_deletion_date', None) + self.recovery_services_recovery_point_id = kwargs.get('recovery_services_recovery_point_id', None) + self.long_term_retention_backup_resource_id = kwargs.get('long_term_retention_backup_resource_id', None) + self.recoverable_database_id = kwargs.get('recoverable_database_id', None) + self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) + self.catalog_collation = kwargs.get('catalog_collation', None) + self.zone_redundant = kwargs.get('zone_redundant', None) + self.license_type = kwargs.get('license_type', None) + self.max_log_size_bytes = None + self.earliest_restore_date = None + self.read_scale = kwargs.get('read_scale', None) + self.current_sku = None + self.auto_pause_delay = kwargs.get('auto_pause_delay', None) + self.min_capacity = kwargs.get('min_capacity', None) + + +class DatabaseAutomaticTuning(ProxyResource): + """Database-level Automatic Tuning. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param desired_state: Automatic tuning desired state. Possible values + include: 'Inherit', 'Custom', 'Auto', 'Unspecified' + :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode + :ivar actual_state: Automatic tuning actual state. Possible values + include: 'Inherit', 'Custom', 'Auto', 'Unspecified' + :vartype actual_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode + :param options: Automatic tuning options definition. + :type options: dict[str, ~azure.mgmt.sql.models.AutomaticTuningOptions] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'actual_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningMode'}, + 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningMode'}, + 'options': {'key': 'properties.options', 'type': '{AutomaticTuningOptions}'}, + } + + def __init__(self, **kwargs): + super(DatabaseAutomaticTuning, self).__init__(**kwargs) + self.desired_state = kwargs.get('desired_state', None) + self.actual_state = None + self.options = kwargs.get('options', None) + + +class DatabaseBlobAuditingPolicy(ProxyResource): + """A database blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Resource kind. + :vartype kind: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DatabaseBlobAuditingPolicy, self).__init__(**kwargs) + self.kind = None + self.state = kwargs.get('state', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) + self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) + self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) + self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) + + +class DatabaseOperation(ProxyResource): + """A database operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_name: The name of the database the operation is being + performed on. + :vartype database_name: str + :ivar operation: The name of operation. + :vartype operation: str + :ivar operation_friendly_name: The friendly name of operation. + :vartype operation_friendly_name: str + :ivar percent_complete: The percentage of the operation completed. + :vartype percent_complete: int + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar start_time: The operation start time. + :vartype start_time: datetime + :ivar state: The operation state. Possible values include: 'Pending', + 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', 'Cancelled' + :vartype state: str or ~azure.mgmt.sql.models.ManagementOperationState + :ivar error_code: The operation error code. + :vartype error_code: int + :ivar error_description: The operation error description. + :vartype error_description: str + :ivar error_severity: The operation error severity. + :vartype error_severity: int + :ivar is_user_error: Whether or not the error is a user error. + :vartype is_user_error: bool + :ivar estimated_completion_time: The estimated completion time of the + operation. + :vartype estimated_completion_time: datetime + :ivar description: The operation description. + :vartype description: str + :ivar is_cancellable: Whether the operation can be cancelled. + :vartype is_cancellable: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_name': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_friendly_name': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_description': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'is_user_error': {'readonly': True}, + 'estimated_completion_time': {'readonly': True}, + 'description': {'readonly': True}, + 'is_cancellable': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, + 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DatabaseOperation, self).__init__(**kwargs) + self.database_name = None + self.operation = None + self.operation_friendly_name = None + self.percent_complete = None + self.server_name = None + self.start_time = None + self.state = None + self.error_code = None + self.error_description = None + self.error_severity = None + self.is_user_error = None + self.estimated_completion_time = None + self.description = None + self.is_cancellable = None + + +class DatabaseSecurityAlertPolicy(ProxyResource): + """Contains information about a database Threat Detection policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar kind: Resource kind. + :vartype kind: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint and storageAccountAccessKey are required. + Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies the semicolon-separated list of alerts + that are disabled, or empty string to disable no alerts. Possible values: + Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; + Data_Exfiltration; Unsafe_Action. + :type disabled_alerts: str + :param email_addresses: Specifies the semicolon-separated list of e-mail + addresses to which the alert is sent. + :type email_addresses: str + :param email_account_admins: Specifies that the alert is sent to the + account administrators. Possible values include: 'Enabled', 'Disabled' + :type email_account_admins: str or + ~azure.mgmt.sql.models.SecurityAlertPolicyEmailAccountAdmins + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. If state is Enabled, storageEndpoint is + required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. If state is Enabled, + storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :param use_server_default: Specifies whether to use the default server + policy. Possible values include: 'Enabled', 'Disabled' + :type use_server_default: str or + ~azure.mgmt.sql.models.SecurityAlertPolicyUseServerDefault + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': 'str'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': 'str'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'SecurityAlertPolicyEmailAccountAdmins'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'use_server_default': {'key': 'properties.useServerDefault', 'type': 'SecurityAlertPolicyUseServerDefault'}, + } + + def __init__(self, **kwargs): + super(DatabaseSecurityAlertPolicy, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.kind = None + self.state = kwargs.get('state', None) + self.disabled_alerts = kwargs.get('disabled_alerts', None) + self.email_addresses = kwargs.get('email_addresses', None) + self.email_account_admins = kwargs.get('email_account_admins', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.use_server_default = kwargs.get('use_server_default', None) + + +class DatabaseUpdate(Model): + """A database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param create_mode: Specifies the mode of database creation. + Default: regular database creation. + Copy: creates a database as a copy of an existing database. + sourceDatabaseId must be specified as the resource ID of the source + database. + Secondary: creates a database as a secondary replica of an existing + database. sourceDatabaseId must be specified as the resource ID of the + existing primary database. + PointInTimeRestore: Creates a database by restoring a point in time backup + of an existing database. sourceDatabaseId must be specified as the + resource ID of the existing database, and restorePointInTime must be + specified. + Recovery: Creates a database by restoring a geo-replicated backup. + sourceDatabaseId must be specified as the recoverable database resource ID + to restore. + Restore: Creates a database by restoring a backup of a deleted database. + sourceDatabaseId must be specified. If sourceDatabaseId is the database's + original resource ID, then sourceDatabaseDeletionDate must be specified. + Otherwise sourceDatabaseId must be the restorable dropped database + resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime + may also be specified to restore from an earlier point in time. + RestoreLongTermRetentionBackup: Creates a database by restoring from a + long term retention vault. recoveryServicesRecoveryPointResourceId must be + specified as the recovery point resource ID. + Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for + DataWarehouse edition. Possible values include: 'Default', 'Copy', + 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', + 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', + 'RestoreLongTermRetentionBackup', 'OnlineSecondary' + :type create_mode: str or ~azure.mgmt.sql.models.CreateMode + :param collation: The collation of the database. + :type collation: str + :param max_size_bytes: The max size of the database expressed in bytes. + :type max_size_bytes: long + :param sample_name: The name of the sample schema to apply when creating + this database. Possible values include: 'AdventureWorksLT', + 'WideWorldImportersStd', 'WideWorldImportersFull' + :type sample_name: str or ~azure.mgmt.sql.models.SampleName + :param elastic_pool_id: The resource identifier of the elastic pool + containing this database. + :type elastic_pool_id: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :ivar status: The status of the database. Possible values include: + 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', + 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', + 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', + 'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers', + 'OnlineChangingDwPerformanceTiers' + :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus + :ivar database_id: The ID of the database. + :vartype database_id: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar current_service_objective_name: The current service level objective + name of the database. + :vartype current_service_objective_name: str + :ivar requested_service_objective_name: The requested service level + objective name of the database. + :vartype requested_service_objective_name: str + :ivar default_secondary_location: The default secondary region for this + database. + :vartype default_secondary_location: str + :ivar failover_group_id: Failover Group resource identifier that this + database belongs to. + :vartype failover_group_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param source_database_deletion_date: Specifies the time that the database + was deleted. + :type source_database_deletion_date: datetime + :param recovery_services_recovery_point_id: The resource identifier of the + recovery point associated with create operation of this database. + :type recovery_services_recovery_point_id: str + :param long_term_retention_backup_resource_id: The resource identifier of + the long term retention backup associated with create operation of this + database. + :type long_term_retention_backup_resource_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param restorable_dropped_database_id: The resource identifier of the + restorable dropped database associated with create operation of this + database. + :type restorable_dropped_database_id: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param zone_redundant: Whether or not this database is zone redundant, + which means the replicas of this database will be spread across multiple + availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this database. Possible + values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType + :ivar max_log_size_bytes: The max log size for this database. + :vartype max_log_size_bytes: long + :ivar earliest_restore_date: This records the earliest start date and time + that restore is available for this database (ISO8601 format). + :vartype earliest_restore_date: datetime + :param read_scale: The state of read-only routing. If enabled, connections + that have application intent set to readonly in their connection string + may be routed to a readonly secondary replica in the same region. Possible + values include: 'Enabled', 'Disabled' + :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale + :ivar current_sku: The name and tier of the SKU. + :vartype current_sku: ~azure.mgmt.sql.models.Sku + :param auto_pause_delay: Time in minutes after which database is + automatically paused. A value of -1 means that automatic pause is disabled + :type auto_pause_delay: int + :param min_capacity: Minimal capacity that database will always have + allocated, if not paused + :type min_capacity: float + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'status': {'readonly': True}, + 'database_id': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'current_service_objective_name': {'readonly': True}, + 'requested_service_objective_name': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + 'max_log_size_bytes': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'current_sku': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, + 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, + 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, + 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, + 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, + 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, + 'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'}, + 'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(DatabaseUpdate, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.create_mode = kwargs.get('create_mode', None) + self.collation = kwargs.get('collation', None) + self.max_size_bytes = kwargs.get('max_size_bytes', None) + self.sample_name = kwargs.get('sample_name', None) + self.elastic_pool_id = kwargs.get('elastic_pool_id', None) + self.source_database_id = kwargs.get('source_database_id', None) + self.status = None + self.database_id = None + self.creation_date = None + self.current_service_objective_name = None + self.requested_service_objective_name = None + self.default_secondary_location = None + self.failover_group_id = None + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.source_database_deletion_date = kwargs.get('source_database_deletion_date', None) + self.recovery_services_recovery_point_id = kwargs.get('recovery_services_recovery_point_id', None) + self.long_term_retention_backup_resource_id = kwargs.get('long_term_retention_backup_resource_id', None) + self.recoverable_database_id = kwargs.get('recoverable_database_id', None) + self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) + self.catalog_collation = kwargs.get('catalog_collation', None) + self.zone_redundant = kwargs.get('zone_redundant', None) + self.license_type = kwargs.get('license_type', None) + self.max_log_size_bytes = None + self.earliest_restore_date = None + self.read_scale = kwargs.get('read_scale', None) + self.current_sku = None + self.auto_pause_delay = kwargs.get('auto_pause_delay', None) + self.min_capacity = kwargs.get('min_capacity', None) + self.tags = kwargs.get('tags', None) + + +class DatabaseUsage(Model): + """The database usages. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the usage metric. + :vartype name: str + :ivar resource_name: The name of the resource. + :vartype resource_name: str + :ivar display_name: The usage metric display name. + :vartype display_name: str + :ivar current_value: The current value of the usage metric. + :vartype current_value: float + :ivar limit: The current limit of the usage metric. + :vartype limit: float + :ivar unit: The units of the usage metric. + :vartype unit: str + :ivar next_reset_time: The next reset time for the usage metric (ISO8601 + format). + :vartype next_reset_time: datetime + """ + + _validation = { + 'name': {'readonly': True}, + 'resource_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'next_reset_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(DatabaseUsage, self).__init__(**kwargs) + self.name = None + self.resource_name = None + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + self.next_reset_time = None + + +class DatabaseVulnerabilityAssessment(ProxyResource): + """A database vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: A blob storage container path to hold the + scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It + is required if server level vulnerability assessment policy doesn't set + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _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'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, **kwargs): + super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = kwargs.get('storage_container_path', None) + self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.recurring_scans = kwargs.get('recurring_scans', None) + + +class DatabaseVulnerabilityAssessmentRuleBaseline(ProxyResource): + """A database vulnerability assessment rule baseline. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param baseline_results: Required. The rule baseline result + :type baseline_results: + list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'baseline_results': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'baseline_results': {'key': 'properties.baselineResults', 'type': '[DatabaseVulnerabilityAssessmentRuleBaselineItem]'}, + } + + def __init__(self, **kwargs): + super(DatabaseVulnerabilityAssessmentRuleBaseline, self).__init__(**kwargs) + self.baseline_results = kwargs.get('baseline_results', None) + + +class DatabaseVulnerabilityAssessmentRuleBaselineItem(Model): + """Properties for an Azure SQL Database Vulnerability Assessment rule + baseline's result. + + All required parameters must be populated in order to send to Azure. + + :param result: Required. The rule baseline result + :type result: list[str] + """ + + _validation = { + 'result': {'required': True}, + } + + _attribute_map = { + 'result': {'key': 'result', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(DatabaseVulnerabilityAssessmentRuleBaselineItem, self).__init__(**kwargs) + self.result = kwargs.get('result', None) + + +class DatabaseVulnerabilityAssessmentScansExport(ProxyResource): + """A database Vulnerability Assessment scan export resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar exported_report_location: Location of the exported report (e.g. + https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). + :vartype exported_report_location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'exported_report_location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs) + self.exported_report_location = None + + +class DataMaskingPolicy(ProxyResource): + """Represents a database data masking policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param data_masking_state: Required. The state of the data masking policy. + Possible values include: 'Disabled', 'Enabled' + :type data_masking_state: str or ~azure.mgmt.sql.models.DataMaskingState + :param exempt_principals: The list of the exempt principals. Specifies the + semicolon-separated list of database users for which the data masking + policy does not apply. The specified users receive data results without + masking for all of the database queries. + :type exempt_principals: str + :ivar application_principals: The list of the application principals. This + is a legacy parameter and is no longer used. + :vartype application_principals: str + :ivar masking_level: The masking level. This is a legacy parameter and is + no longer used. + :vartype masking_level: str + :ivar location: The location of the data masking policy. + :vartype location: str + :ivar kind: The kind of data masking policy. Metadata, used for Azure + portal. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_masking_state': {'required': True}, + 'application_principals': {'readonly': True}, + 'masking_level': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_masking_state': {'key': 'properties.dataMaskingState', 'type': 'DataMaskingState'}, + 'exempt_principals': {'key': 'properties.exemptPrincipals', 'type': 'str'}, + 'application_principals': {'key': 'properties.applicationPrincipals', 'type': 'str'}, + 'masking_level': {'key': 'properties.maskingLevel', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataMaskingPolicy, self).__init__(**kwargs) + self.data_masking_state = kwargs.get('data_masking_state', None) + self.exempt_principals = kwargs.get('exempt_principals', None) + self.application_principals = None + self.masking_level = None + self.location = None + self.kind = None + + +class DataMaskingRule(ProxyResource): + """Represents a database data masking rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar data_masking_rule_id: The rule Id. + :vartype data_masking_rule_id: str + :param alias_name: The alias name. This is a legacy parameter and is no + longer used. + :type alias_name: str + :param rule_state: The rule state. Used to delete a rule. To delete an + existing rule, specify the schemaName, tableName, columnName, + maskingFunction, and specify ruleState as disabled. However, if the rule + doesn't already exist, the rule will be created with ruleState set to + enabled, regardless of the provided value of ruleState. Possible values + include: 'Disabled', 'Enabled' + :type rule_state: str or ~azure.mgmt.sql.models.DataMaskingRuleState + :param schema_name: Required. The schema name on which the data masking + rule is applied. + :type schema_name: str + :param table_name: Required. The table name on which the data masking rule + is applied. + :type table_name: str + :param column_name: Required. The column name on which the data masking + rule is applied. + :type column_name: str + :param masking_function: Required. The masking function that is used for + the data masking rule. Possible values include: 'Default', 'CCN', 'Email', + 'Number', 'SSN', 'Text' + :type masking_function: str or ~azure.mgmt.sql.models.DataMaskingFunction + :param number_from: The numberFrom property of the masking rule. Required + if maskingFunction is set to Number, otherwise this parameter will be + ignored. + :type number_from: str + :param number_to: The numberTo property of the data masking rule. Required + if maskingFunction is set to Number, otherwise this parameter will be + ignored. + :type number_to: str + :param prefix_size: If maskingFunction is set to Text, the number of + characters to show unmasked in the beginning of the string. Otherwise, + this parameter will be ignored. + :type prefix_size: str + :param suffix_size: If maskingFunction is set to Text, the number of + characters to show unmasked at the end of the string. Otherwise, this + parameter will be ignored. + :type suffix_size: str + :param replacement_string: If maskingFunction is set to Text, the + character to use for masking the unexposed part of the string. Otherwise, + this parameter will be ignored. + :type replacement_string: str + :ivar location: The location of the data masking rule. + :vartype location: str + :ivar kind: The kind of Data Masking Rule. Metadata, used for Azure + portal. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_masking_rule_id': {'readonly': True}, + 'schema_name': {'required': True}, + 'table_name': {'required': True}, + 'column_name': {'required': True}, + 'masking_function': {'required': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_masking_rule_id': {'key': 'properties.id', 'type': 'str'}, + 'alias_name': {'key': 'properties.aliasName', 'type': 'str'}, + 'rule_state': {'key': 'properties.ruleState', 'type': 'DataMaskingRuleState'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, + 'table_name': {'key': 'properties.tableName', 'type': 'str'}, + 'column_name': {'key': 'properties.columnName', 'type': 'str'}, + 'masking_function': {'key': 'properties.maskingFunction', 'type': 'DataMaskingFunction'}, + 'number_from': {'key': 'properties.numberFrom', 'type': 'str'}, + 'number_to': {'key': 'properties.numberTo', 'type': 'str'}, + 'prefix_size': {'key': 'properties.prefixSize', 'type': 'str'}, + 'suffix_size': {'key': 'properties.suffixSize', 'type': 'str'}, + 'replacement_string': {'key': 'properties.replacementString', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataMaskingRule, self).__init__(**kwargs) + self.data_masking_rule_id = None + self.alias_name = kwargs.get('alias_name', None) + self.rule_state = kwargs.get('rule_state', None) + self.schema_name = kwargs.get('schema_name', None) + self.table_name = kwargs.get('table_name', None) + self.column_name = kwargs.get('column_name', None) + self.masking_function = kwargs.get('masking_function', None) + self.number_from = kwargs.get('number_from', None) + self.number_to = kwargs.get('number_to', None) + self.prefix_size = kwargs.get('prefix_size', None) + self.suffix_size = kwargs.get('suffix_size', None) + self.replacement_string = kwargs.get('replacement_string', None) + self.location = None + self.kind = None + + +class EditionCapability(Model): + """The edition capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The database edition name. + :vartype name: str + :ivar supported_service_level_objectives: The list of supported service + objectives for the edition. + :vartype supported_service_level_objectives: + list[~azure.mgmt.sql.models.ServiceObjectiveCapability] + :ivar zone_redundant: Whether or not zone redundancy is supported for the + edition. + :vartype zone_redundant: bool + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_service_level_objectives': {'readonly': True}, + 'zone_redundant': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_service_level_objectives': {'key': 'supportedServiceLevelObjectives', 'type': '[ServiceObjectiveCapability]'}, + 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_service_level_objectives = None + self.zone_redundant = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ElasticPool(TrackedResource): + """An elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The elastic pool SKU. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or the following command: + ```azurecli + az sql elastic-pool list-editions -l -o table + ```` + :type sku: ~azure.mgmt.sql.models.Sku + :ivar kind: Kind of elastic pool. This is metadata used for the Azure + portal experience. + :vartype kind: str + :ivar state: The state of the elastic pool. Possible values include: + 'Creating', 'Ready', 'Disabled' + :vartype state: str or ~azure.mgmt.sql.models.ElasticPoolState + :ivar creation_date: The creation date of the elastic pool (ISO8601 + format). + :vartype creation_date: datetime + :param max_size_bytes: The storage limit for the database elastic pool in + bytes. + :type max_size_bytes: long + :param per_database_settings: The per database settings for the elastic + pool. + :type per_database_settings: + ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings + :param zone_redundant: Whether or not this elastic pool is zone redundant, + which means the replicas of this elastic pool will be spread across + multiple availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this elastic pool. + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'state': {'readonly': True}, + 'creation_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPool, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.kind = None + self.state = None + self.creation_date = None + self.max_size_bytes = kwargs.get('max_size_bytes', None) + self.per_database_settings = kwargs.get('per_database_settings', None) + self.zone_redundant = kwargs.get('zone_redundant', None) + self.license_type = kwargs.get('license_type', None) + + +class ElasticPoolActivity(ProxyResource): + """Represents the activity on an elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar end_time: The time the operation finished (ISO8601 format). + :vartype end_time: datetime + :ivar error_code: The error code if available. + :vartype error_code: int + :ivar error_message: The error message if available. + :vartype error_message: str + :ivar error_severity: The error severity if available. + :vartype error_severity: int + :ivar operation: The operation name. + :vartype operation: str + :ivar operation_id: The unique operation ID. + :vartype operation_id: str + :ivar percent_complete: The percentage complete if available. + :vartype percent_complete: int + :ivar requested_database_dtu_max: The requested max DTU per database if + available. + :vartype requested_database_dtu_max: int + :ivar requested_database_dtu_min: The requested min DTU per database if + available. + :vartype requested_database_dtu_min: int + :ivar requested_dtu: The requested DTU for the pool if available. + :vartype requested_dtu: int + :ivar requested_elastic_pool_name: The requested name for the elastic pool + if available. + :vartype requested_elastic_pool_name: str + :ivar requested_storage_limit_in_gb: The requested storage limit for the + pool in GB if available. + :vartype requested_storage_limit_in_gb: long + :ivar elastic_pool_name: The name of the elastic pool. + :vartype elastic_pool_name: str + :ivar server_name: The name of the server the elastic pool is in. + :vartype server_name: str + :ivar start_time: The time the operation started (ISO8601 format). + :vartype start_time: datetime + :ivar state: The current state of the operation. + :vartype state: str + :ivar requested_storage_limit_in_mb: The requested storage limit in MB. + :vartype requested_storage_limit_in_mb: int + :ivar requested_database_dtu_guarantee: The requested per database DTU + guarantee. + :vartype requested_database_dtu_guarantee: int + :ivar requested_database_dtu_cap: The requested per database DTU cap. + :vartype requested_database_dtu_cap: int + :ivar requested_dtu_guarantee: The requested DTU guarantee. + :vartype requested_dtu_guarantee: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_message': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_id': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'requested_database_dtu_max': {'readonly': True}, + 'requested_database_dtu_min': {'readonly': True}, + 'requested_dtu': {'readonly': True}, + 'requested_elastic_pool_name': {'readonly': True}, + 'requested_storage_limit_in_gb': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'requested_storage_limit_in_mb': {'readonly': True}, + 'requested_database_dtu_guarantee': {'readonly': True}, + 'requested_database_dtu_cap': {'readonly': True}, + 'requested_dtu_guarantee': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'requested_database_dtu_max': {'key': 'properties.requestedDatabaseDtuMax', 'type': 'int'}, + 'requested_database_dtu_min': {'key': 'properties.requestedDatabaseDtuMin', 'type': 'int'}, + 'requested_dtu': {'key': 'properties.requestedDtu', 'type': 'int'}, + 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, + 'requested_storage_limit_in_gb': {'key': 'properties.requestedStorageLimitInGB', 'type': 'long'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'requested_storage_limit_in_mb': {'key': 'properties.requestedStorageLimitInMB', 'type': 'int'}, + 'requested_database_dtu_guarantee': {'key': 'properties.requestedDatabaseDtuGuarantee', 'type': 'int'}, + 'requested_database_dtu_cap': {'key': 'properties.requestedDatabaseDtuCap', 'type': 'int'}, + 'requested_dtu_guarantee': {'key': 'properties.requestedDtuGuarantee', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolActivity, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.end_time = None + self.error_code = None + self.error_message = None + self.error_severity = None + self.operation = None + self.operation_id = None + self.percent_complete = None + self.requested_database_dtu_max = None + self.requested_database_dtu_min = None + self.requested_dtu = None + self.requested_elastic_pool_name = None + self.requested_storage_limit_in_gb = None + self.elastic_pool_name = None + self.server_name = None + self.start_time = None + self.state = None + self.requested_storage_limit_in_mb = None + self.requested_database_dtu_guarantee = None + self.requested_database_dtu_cap = None + self.requested_dtu_guarantee = None + + +class ElasticPoolDatabaseActivity(ProxyResource): + """Represents the activity on an elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar database_name: The database name. + :vartype database_name: str + :ivar end_time: The time the operation finished (ISO8601 format). + :vartype end_time: datetime + :ivar error_code: The error code if available. + :vartype error_code: int + :ivar error_message: The error message if available. + :vartype error_message: str + :ivar error_severity: The error severity if available. + :vartype error_severity: int + :ivar operation: The operation name. + :vartype operation: str + :ivar operation_id: The unique operation ID. + :vartype operation_id: str + :ivar percent_complete: The percentage complete if available. + :vartype percent_complete: int + :ivar requested_elastic_pool_name: The name for the elastic pool the + database is moving into if available. + :vartype requested_elastic_pool_name: str + :ivar current_elastic_pool_name: The name of the current elastic pool the + database is in if available. + :vartype current_elastic_pool_name: str + :ivar current_service_objective: The name of the current service objective + if available. + :vartype current_service_objective: str + :ivar requested_service_objective: The name of the requested service + objective if available. + :vartype requested_service_objective: str + :ivar server_name: The name of the server the elastic pool is in. + :vartype server_name: str + :ivar start_time: The time the operation started (ISO8601 format). + :vartype start_time: datetime + :ivar state: The current state of the operation. + :vartype state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_name': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_message': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_id': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'requested_elastic_pool_name': {'readonly': True}, + 'current_elastic_pool_name': {'readonly': True}, + 'current_service_objective': {'readonly': True}, + 'requested_service_objective': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, + 'current_elastic_pool_name': {'key': 'properties.currentElasticPoolName', 'type': 'str'}, + 'current_service_objective': {'key': 'properties.currentServiceObjective', 'type': 'str'}, + 'requested_service_objective': {'key': 'properties.requestedServiceObjective', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolDatabaseActivity, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.database_name = None + self.end_time = None + self.error_code = None + self.error_message = None + self.error_severity = None + self.operation = None + self.operation_id = None + self.percent_complete = None + self.requested_elastic_pool_name = None + self.current_elastic_pool_name = None + self.current_service_objective = None + self.requested_service_objective = None + self.server_name = None + self.start_time = None + self.state = None + + +class ElasticPoolEditionCapability(Model): + """The elastic pool edition capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The elastic pool edition name. + :vartype name: str + :ivar supported_elastic_pool_performance_levels: The list of supported + elastic pool DTU levels for the edition. + :vartype supported_elastic_pool_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerformanceLevelCapability] + :ivar zone_redundant: Whether or not zone redundancy is supported for the + edition. + :vartype zone_redundant: bool + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_elastic_pool_performance_levels': {'readonly': True}, + 'zone_redundant': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_elastic_pool_performance_levels': {'key': 'supportedElasticPoolPerformanceLevels', 'type': '[ElasticPoolPerformanceLevelCapability]'}, + 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolEditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_elastic_pool_performance_levels = None + self.zone_redundant = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ElasticPoolOperation(ProxyResource): + """A elastic pool operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar elastic_pool_name: The name of the elastic pool the operation is + being performed on. + :vartype elastic_pool_name: str + :ivar operation: The name of operation. + :vartype operation: str + :ivar operation_friendly_name: The friendly name of operation. + :vartype operation_friendly_name: str + :ivar percent_complete: The percentage of the operation completed. + :vartype percent_complete: int + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar start_time: The operation start time. + :vartype start_time: datetime + :ivar state: The operation state. + :vartype state: str + :ivar error_code: The operation error code. + :vartype error_code: int + :ivar error_description: The operation error description. + :vartype error_description: str + :ivar error_severity: The operation error severity. + :vartype error_severity: int + :ivar is_user_error: Whether or not the error is a user error. + :vartype is_user_error: bool + :ivar estimated_completion_time: The estimated completion time of the + operation. + :vartype estimated_completion_time: datetime + :ivar description: The operation description. + :vartype description: str + :ivar is_cancellable: Whether the operation can be cancelled. + :vartype is_cancellable: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_friendly_name': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_description': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'is_user_error': {'readonly': True}, + 'estimated_completion_time': {'readonly': True}, + 'description': {'readonly': True}, + 'is_cancellable': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, + 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolOperation, self).__init__(**kwargs) + self.elastic_pool_name = None + self.operation = None + self.operation_friendly_name = None + self.percent_complete = None + self.server_name = None + self.start_time = None + self.state = None + self.error_code = None + self.error_description = None + self.error_severity = None + self.is_user_error = None + self.estimated_completion_time = None + self.description = None + self.is_cancellable = None + + +class ElasticPoolPerDatabaseMaxPerformanceLevelCapability(Model): + """The max per-database performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The maximum performance level per database. + :vartype limit: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + :ivar supported_per_database_min_performance_levels: The list of supported + min database performance levels. + :vartype supported_per_database_min_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMinPerformanceLevelCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'supported_per_database_min_performance_levels': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'supported_per_database_min_performance_levels': {'key': 'supportedPerDatabaseMinPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMinPerformanceLevelCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolPerDatabaseMaxPerformanceLevelCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + self.supported_per_database_min_performance_levels = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ElasticPoolPerDatabaseMinPerformanceLevelCapability(Model): + """The minimum per-database performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The minimum performance level per database. + :vartype limit: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolPerDatabaseMinPerformanceLevelCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ElasticPoolPerDatabaseSettings(Model): + """Per database settings of an elastic pool. + + :param min_capacity: The minimum capacity all databases are guaranteed. + :type min_capacity: float + :param max_capacity: The maximum capacity any one database can consume. + :type max_capacity: float + """ + + _attribute_map = { + 'min_capacity': {'key': 'minCapacity', 'type': 'float'}, + 'max_capacity': {'key': 'maxCapacity', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolPerDatabaseSettings, self).__init__(**kwargs) + self.min_capacity = kwargs.get('min_capacity', None) + self.max_capacity = kwargs.get('max_capacity', None) + + +class ElasticPoolPerformanceLevelCapability(Model): + """The Elastic Pool performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar performance_level: The performance level for the pool. + :vartype performance_level: + ~azure.mgmt.sql.models.PerformanceLevelCapability + :ivar sku: The sku. + :vartype sku: ~azure.mgmt.sql.models.Sku + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar max_database_count: The maximum number of databases supported. + :vartype max_database_count: int + :ivar included_max_size: The included (free) max size for this performance + level. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar supported_max_sizes: The list of supported max sizes. + :vartype supported_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar supported_per_database_max_sizes: The list of supported per database + max sizes. + :vartype supported_per_database_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar supported_per_database_max_performance_levels: The list of supported + per database max performance levels. + :vartype supported_per_database_max_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMaxPerformanceLevelCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'performance_level': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'max_database_count': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'supported_max_sizes': {'readonly': True}, + 'supported_per_database_max_sizes': {'readonly': True}, + 'supported_per_database_max_performance_levels': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'max_database_count': {'key': 'maxDatabaseCount', 'type': 'int'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'supported_per_database_max_sizes': {'key': 'supportedPerDatabaseMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'supported_per_database_max_performance_levels': {'key': 'supportedPerDatabaseMaxPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMaxPerformanceLevelCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolPerformanceLevelCapability, self).__init__(**kwargs) + self.performance_level = None + self.sku = None + self.supported_license_types = None + self.max_database_count = None + self.included_max_size = None + self.supported_max_sizes = None + self.supported_per_database_max_sizes = None + self.supported_per_database_max_performance_levels = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ElasticPoolUpdate(Model): + """An elastic pool update. + + :param sku: + :type sku: ~azure.mgmt.sql.models.Sku + :param max_size_bytes: The storage limit for the database elastic pool in + bytes. + :type max_size_bytes: long + :param per_database_settings: The per database settings for the elastic + pool. + :type per_database_settings: + ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings + :param zone_redundant: Whether or not this elastic pool is zone redundant, + which means the replicas of this elastic pool will be spread across + multiple availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this elastic pool. + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolUpdate, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.max_size_bytes = kwargs.get('max_size_bytes', None) + self.per_database_settings = kwargs.get('per_database_settings', None) + self.zone_redundant = kwargs.get('zone_redundant', None) + self.license_type = kwargs.get('license_type', None) + self.tags = kwargs.get('tags', None) + + +class EncryptionProtector(ProxyResource): + """The server encryption protector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :type kind: str + :ivar location: Resource location. + :vartype location: str + :ivar subregion: Subregion of the encryption protector. + :vartype subregion: str + :param server_key_name: The name of the server key. + :type server_key_name: str + :param server_key_type: Required. The encryption protector type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :ivar uri: The URI of the server key. + :vartype uri: str + :ivar thumbprint: Thumbprint of the server key. + :vartype thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'subregion': {'readonly': True}, + 'server_key_type': {'required': True}, + 'uri': {'readonly': True}, + 'thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'subregion': {'key': 'properties.subregion', 'type': 'str'}, + 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EncryptionProtector, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + self.location = None + self.subregion = None + self.server_key_name = kwargs.get('server_key_name', None) + self.server_key_type = kwargs.get('server_key_type', None) + self.uri = None + self.thumbprint = None + + +class ExportRequest(Model): + """Export database parameters. + + All required parameters must be populated in order to send to Azure. + + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + } + + _attribute_map = { + 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, + } + + def __init__(self, **kwargs): + super(ExportRequest, self).__init__(**kwargs) + self.storage_key_type = kwargs.get('storage_key_type', None) + self.storage_key = kwargs.get('storage_key', None) + self.storage_uri = kwargs.get('storage_uri', None) + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.authentication_type = kwargs.get('authentication_type', "SQL") + + +class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): + """An extended database blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param predicate_expression: Specifies condition of where clause when + creating an audit. + :type predicate_expression: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ExtendedDatabaseBlobAuditingPolicy, self).__init__(**kwargs) + self.predicate_expression = kwargs.get('predicate_expression', None) + self.state = kwargs.get('state', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) + self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) + self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) + self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) + + +class ExtendedServerBlobAuditingPolicy(ProxyResource): + """An extended server blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param predicate_expression: Specifies condition of where clause when + creating an audit. + :type predicate_expression: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ExtendedServerBlobAuditingPolicy, self).__init__(**kwargs) + self.predicate_expression = kwargs.get('predicate_expression', None) + self.state = kwargs.get('state', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) + self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) + self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) + self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) + + +class FailoverGroup(ProxyResource): + """A failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param read_write_endpoint: Required. Read-write endpoint of the failover + group instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint + :ivar replication_role: Local replication role of the failover group + instance. Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.FailoverGroupReplicationRole + :ivar replication_state: Replication state of the failover group instance. + :vartype replication_state: str + :param partner_servers: Required. List of partner server information for + the failover group. + :type partner_servers: list[~azure.mgmt.sql.models.PartnerInfo] + :param databases: List of databases in the failover group. + :type databases: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'read_write_endpoint': {'required': True}, + 'replication_role': {'readonly': True}, + 'replication_state': {'readonly': True}, + 'partner_servers': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, + 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + 'partner_servers': {'key': 'properties.partnerServers', 'type': '[PartnerInfo]'}, + 'databases': {'key': 'properties.databases', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(FailoverGroup, self).__init__(**kwargs) + self.location = None + self.tags = kwargs.get('tags', None) + self.read_write_endpoint = kwargs.get('read_write_endpoint', None) + self.read_only_endpoint = kwargs.get('read_only_endpoint', None) + self.replication_role = None + self.replication_state = None + self.partner_servers = kwargs.get('partner_servers', None) + self.databases = kwargs.get('databases', None) + + +class FailoverGroupReadOnlyEndpoint(Model): + """Read-only endpoint of the failover group instance. + + :param failover_policy: Failover policy of the read-only endpoint for the + failover group. Possible values include: 'Disabled', 'Enabled' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy + """ + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) + self.failover_policy = kwargs.get('failover_policy', None) + + +class FailoverGroupReadWriteEndpoint(Model): + """Read-write endpoint of the failover group instance. + + All required parameters must be populated in order to send to Azure. + + :param failover_policy: Required. Failover policy of the read-write + endpoint for the failover group. If failoverPolicy is Automatic then + failoverWithDataLossGracePeriodMinutes is required. Possible values + include: 'Manual', 'Automatic' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy + :param failover_with_data_loss_grace_period_minutes: Grace period before + failover with data loss is attempted for the read-write endpoint. If + failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is + required. + :type failover_with_data_loss_grace_period_minutes: int + """ + + _validation = { + 'failover_policy': {'required': True}, + } + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(FailoverGroupReadWriteEndpoint, self).__init__(**kwargs) + self.failover_policy = kwargs.get('failover_policy', None) + self.failover_with_data_loss_grace_period_minutes = kwargs.get('failover_with_data_loss_grace_period_minutes', None) + + +class FailoverGroupUpdate(Model): + """A failover group update request. + + :param read_write_endpoint: Read-write endpoint of the failover group + instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint + :param databases: List of databases in the failover group. + :type databases: list[str] + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, + 'databases': {'key': 'properties.databases', 'type': '[str]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(FailoverGroupUpdate, self).__init__(**kwargs) + self.read_write_endpoint = kwargs.get('read_write_endpoint', None) + self.read_only_endpoint = kwargs.get('read_only_endpoint', None) + self.databases = kwargs.get('databases', None) + self.tags = kwargs.get('tags', None) + + +class FirewallRule(ProxyResource): + """Represents a server firewall rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of server that contains this firewall rule. + :vartype kind: str + :ivar location: Location of the server that contains this firewall rule. + :vartype location: str + :param start_ip_address: Required. The start IP address of the firewall + rule. Must be IPv4 format. Use value '0.0.0.0' to represent all + Azure-internal IP addresses. + :type start_ip_address: str + :param end_ip_address: Required. The end IP address of the firewall rule. + Must be IPv4 format. Must be greater than or equal to startIpAddress. Use + value '0.0.0.0' to represent all Azure-internal IP addresses. + :type end_ip_address: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + 'start_ip_address': {'required': True}, + 'end_ip_address': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FirewallRule, self).__init__(**kwargs) + self.kind = None + self.location = None + self.start_ip_address = kwargs.get('start_ip_address', None) + self.end_ip_address = kwargs.get('end_ip_address', None) + + +class GeoBackupPolicy(ProxyResource): + """A database geo backup policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. The state of the geo backup policy. Possible + values include: 'Disabled', 'Enabled' + :type state: str or ~azure.mgmt.sql.models.GeoBackupPolicyState + :ivar storage_type: The storage type of the geo backup policy. + :vartype storage_type: str + :ivar kind: Kind of geo backup policy. This is metadata used for the + Azure portal experience. + :vartype kind: str + :ivar location: Backup policy location. + :vartype location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'storage_type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'GeoBackupPolicyState'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GeoBackupPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.storage_type = None + self.kind = None + self.location = None + + +class ImportExportResponse(ProxyResource): + """Response for Import/Export Get operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar request_type: The request type of the operation. + :vartype request_type: str + :ivar request_id: The request type of the operation. + :vartype request_id: str + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar database_name: The name of the database. + :vartype database_name: str + :ivar status: The status message returned from the server. + :vartype status: str + :ivar last_modified_time: The operation status last modified time. + :vartype last_modified_time: str + :ivar queued_time: The operation queued time. + :vartype queued_time: str + :ivar blob_uri: The blob uri. + :vartype blob_uri: str + :ivar error_message: The error message returned from the server. + :vartype error_message: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'request_type': {'readonly': True}, + 'request_id': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'status': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'queued_time': {'readonly': True}, + 'blob_uri': {'readonly': True}, + 'error_message': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'request_type': {'key': 'properties.requestType', 'type': 'str'}, + 'request_id': {'key': 'properties.requestId', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'str'}, + 'queued_time': {'key': 'properties.queuedTime', 'type': 'str'}, + 'blob_uri': {'key': 'properties.blobUri', 'type': 'str'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImportExportResponse, self).__init__(**kwargs) + self.request_type = None + self.request_id = None + self.server_name = None + self.database_name = None + self.status = None + self.last_modified_time = None + self.queued_time = None + self.blob_uri = None + self.error_message = None + + +class ImportExtensionRequest(Model): + """Import database parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: The name of the extension. + :type name: str + :param type: The type of the extension. + :type type: str + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + :ivar operation_mode: Required. The type of import operation being + performed. This is always Import. Default value: "Import" . + :vartype operation_mode: str + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + 'operation_mode': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_key_type': {'key': 'properties.storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'properties.storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'properties.storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'properties.authenticationType', 'type': 'AuthenticationType'}, + 'operation_mode': {'key': 'properties.operationMode', 'type': 'str'}, + } + + operation_mode = "Import" + + def __init__(self, **kwargs): + super(ImportExtensionRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.storage_key_type = kwargs.get('storage_key_type', None) + self.storage_key = kwargs.get('storage_key', None) + self.storage_uri = kwargs.get('storage_uri', None) + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.authentication_type = kwargs.get('authentication_type', "SQL") + + +class ImportRequest(ExportRequest): + """Import database parameters. + + All required parameters must be populated in order to send to Azure. + + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + :param database_name: Required. The name of the database to import. + :type database_name: str + :param edition: Required. The edition for the database being created. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location + ```` + . Possible values include: 'Web', 'Business', 'Basic', 'Standard', + 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', + 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale' + :type edition: str or ~azure.mgmt.sql.models.DatabaseEdition + :param service_objective_name: Required. The name of the service objective + to assign to the database. Possible values include: 'System', 'System0', + 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', + 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', + 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', + 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', + 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', + 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', + 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', + 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' + :type service_objective_name: str or + ~azure.mgmt.sql.models.ServiceObjectiveName + :param max_size_bytes: Required. The maximum size for the newly imported + database. + :type max_size_bytes: str + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + 'database_name': {'required': True}, + 'edition': {'required': True}, + 'service_objective_name': {'required': True}, + 'max_size_bytes': {'required': True}, + } + + _attribute_map = { + 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'edition': {'key': 'edition', 'type': 'str'}, + 'service_objective_name': {'key': 'serviceObjectiveName', 'type': 'str'}, + 'max_size_bytes': {'key': 'maxSizeBytes', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImportRequest, self).__init__(**kwargs) + self.database_name = kwargs.get('database_name', None) + self.edition = kwargs.get('edition', None) + self.service_objective_name = kwargs.get('service_objective_name', None) + self.max_size_bytes = kwargs.get('max_size_bytes', None) + + +class InstanceFailoverGroup(ProxyResource): + """An instance failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param read_write_endpoint: Required. Read-write endpoint of the failover + group instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.InstanceFailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.InstanceFailoverGroupReadOnlyEndpoint + :ivar replication_role: Local replication role of the failover group + instance. Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole + :ivar replication_state: Replication state of the failover group instance. + :vartype replication_state: str + :param partner_regions: Required. Partner region information for the + failover group. + :type partner_regions: list[~azure.mgmt.sql.models.PartnerRegionInfo] + :param managed_instance_pairs: Required. List of managed instance pairs in + the failover group. + :type managed_instance_pairs: + list[~azure.mgmt.sql.models.ManagedInstancePairInfo] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'read_write_endpoint': {'required': True}, + 'replication_role': {'readonly': True}, + 'replication_state': {'readonly': True}, + 'partner_regions': {'required': True}, + 'managed_instance_pairs': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'InstanceFailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'InstanceFailoverGroupReadOnlyEndpoint'}, + 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + 'partner_regions': {'key': 'properties.partnerRegions', 'type': '[PartnerRegionInfo]'}, + 'managed_instance_pairs': {'key': 'properties.managedInstancePairs', 'type': '[ManagedInstancePairInfo]'}, + } + + def __init__(self, **kwargs): + super(InstanceFailoverGroup, self).__init__(**kwargs) + self.read_write_endpoint = kwargs.get('read_write_endpoint', None) + self.read_only_endpoint = kwargs.get('read_only_endpoint', None) + self.replication_role = None + self.replication_state = None + self.partner_regions = kwargs.get('partner_regions', None) + self.managed_instance_pairs = kwargs.get('managed_instance_pairs', None) + + +class InstanceFailoverGroupReadOnlyEndpoint(Model): + """Read-only endpoint of the failover group instance. + + :param failover_policy: Failover policy of the read-only endpoint for the + failover group. Possible values include: 'Disabled', 'Enabled' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy + """ + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InstanceFailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) + self.failover_policy = kwargs.get('failover_policy', None) + + +class InstanceFailoverGroupReadWriteEndpoint(Model): + """Read-write endpoint of the failover group instance. + + All required parameters must be populated in order to send to Azure. + + :param failover_policy: Required. Failover policy of the read-write + endpoint for the failover group. If failoverPolicy is Automatic then + failoverWithDataLossGracePeriodMinutes is required. Possible values + include: 'Manual', 'Automatic' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy + :param failover_with_data_loss_grace_period_minutes: Grace period before + failover with data loss is attempted for the read-write endpoint. If + failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is + required. + :type failover_with_data_loss_grace_period_minutes: int + """ + + _validation = { + 'failover_policy': {'required': True}, + } + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(InstanceFailoverGroupReadWriteEndpoint, self).__init__(**kwargs) + self.failover_policy = kwargs.get('failover_policy', None) + self.failover_with_data_loss_grace_period_minutes = kwargs.get('failover_with_data_loss_grace_period_minutes', None) + + +class InstancePool(TrackedResource): + """An Azure SQL instance pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param subnet_id: Required. Resource ID of the subnet to place this + instance pool in. + :type subnet_id: str + :param v_cores: Required. Count of vCores belonging to this instance pool. + :type v_cores: int + :param license_type: Required. The license type. Possible values are + 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' + (without SQL license price). Possible values include: 'LicenseIncluded', + 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.InstancePoolLicenseType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'subnet_id': {'required': True}, + 'v_cores': {'required': True}, + 'license_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InstancePool, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.v_cores = kwargs.get('v_cores', None) + self.license_type = kwargs.get('license_type', None) + + +class InstancePoolUpdate(Model): + """An update to an Instance pool. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(InstancePoolUpdate, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class Job(ProxyResource): + """A job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param description: User-defined description of the job. Default value: "" + . + :type description: str + :ivar version: The job version number. + :vartype version: int + :param schedule: Schedule properties of the job. + :type schedule: ~azure.mgmt.sql.models.JobSchedule + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'int'}, + 'schedule': {'key': 'properties.schedule', 'type': 'JobSchedule'}, + } + + def __init__(self, **kwargs): + super(Job, self).__init__(**kwargs) + self.description = kwargs.get('description', "") + self.version = None + self.schedule = kwargs.get('schedule', None) + + +class JobAgent(TrackedResource): + """An Azure SQL job agent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param database_id: Required. Resource ID of the database to store job + metadata in. + :type database_id: str + :ivar state: The state of the job agent. Possible values include: + 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' + :vartype state: str or ~azure.mgmt.sql.models.JobAgentState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'database_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobAgent, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.database_id = kwargs.get('database_id', None) + self.state = None + + +class JobAgentUpdate(Model): + """An update to an Azure SQL job agent. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(JobAgentUpdate, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class JobCredential(ProxyResource): + """A stored credential that can be used by a job to connect to target + databases. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param username: Required. The credential user name. + :type username: str + :param password: Required. The credential password. + :type password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'username': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'username': {'key': 'properties.username', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobCredential, self).__init__(**kwargs) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + + +class JobExecution(ProxyResource): + """An execution of a job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar job_version: The job version number. + :vartype job_version: int + :ivar step_name: The job step name. + :vartype step_name: str + :ivar step_id: The job step id. + :vartype step_id: int + :ivar job_execution_id: The unique identifier of the job execution. + :vartype job_execution_id: str + :ivar lifecycle: The detailed state of the job execution. Possible values + include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', + 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', + 'TimedOut', 'Canceled', 'Skipped' + :vartype lifecycle: str or ~azure.mgmt.sql.models.JobExecutionLifecycle + :ivar provisioning_state: The ARM provisioning state of the job execution. + Possible values include: 'Created', 'InProgress', 'Succeeded', 'Failed', + 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.sql.models.ProvisioningState + :ivar create_time: The time that the job execution was created. + :vartype create_time: datetime + :ivar start_time: The time that the job execution started. + :vartype start_time: datetime + :ivar end_time: The time that the job execution completed. + :vartype end_time: datetime + :param current_attempts: Number of times the job execution has been + attempted. + :type current_attempts: int + :ivar current_attempt_start_time: Start time of the current attempt. + :vartype current_attempt_start_time: datetime + :ivar last_message: The last status or error message. + :vartype last_message: str + :ivar target: The target that this execution is executed on. + :vartype target: ~azure.mgmt.sql.models.JobExecutionTarget + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'job_version': {'readonly': True}, + 'step_name': {'readonly': True}, + 'step_id': {'readonly': True}, + 'job_execution_id': {'readonly': True}, + 'lifecycle': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'create_time': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'current_attempt_start_time': {'readonly': True}, + 'last_message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'job_version': {'key': 'properties.jobVersion', 'type': 'int'}, + 'step_name': {'key': 'properties.stepName', 'type': 'str'}, + 'step_id': {'key': 'properties.stepId', 'type': 'int'}, + 'job_execution_id': {'key': 'properties.jobExecutionId', 'type': 'str'}, + 'lifecycle': {'key': 'properties.lifecycle', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'current_attempts': {'key': 'properties.currentAttempts', 'type': 'int'}, + 'current_attempt_start_time': {'key': 'properties.currentAttemptStartTime', 'type': 'iso-8601'}, + 'last_message': {'key': 'properties.lastMessage', 'type': 'str'}, + 'target': {'key': 'properties.target', 'type': 'JobExecutionTarget'}, + } + + def __init__(self, **kwargs): + super(JobExecution, self).__init__(**kwargs) + self.job_version = None + self.step_name = None + self.step_id = None + self.job_execution_id = None + self.lifecycle = None + self.provisioning_state = None + self.create_time = None + self.start_time = None + self.end_time = None + self.current_attempts = kwargs.get('current_attempts', None) + self.current_attempt_start_time = None + self.last_message = None + self.target = None + + +class JobExecutionTarget(Model): + """The target that a job execution is executed on. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of the target. Possible values include: + 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + :vartype type: str or ~azure.mgmt.sql.models.JobTargetType + :ivar server_name: The server name. + :vartype server_name: str + :ivar database_name: The database name. + :vartype database_name: str + """ + + _validation = { + 'type': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobExecutionTarget, self).__init__(**kwargs) + self.type = None + self.server_name = None + self.database_name = None + + +class JobSchedule(Model): + """Scheduling properties of a job. + + :param start_time: Schedule start time. Default value: + "0001-01-01T00:00:00Z" . + :type start_time: datetime + :param end_time: Schedule end time. Default value: "9999-12-31T11:59:59Z" + . + :type end_time: datetime + :param type: Schedule interval type. Possible values include: 'Once', + 'Recurring'. Default value: "Once" . + :type type: str or ~azure.mgmt.sql.models.JobScheduleType + :param enabled: Whether or not the schedule is enabled. + :type enabled: bool + :param interval: Value of the schedule's recurring interval, if the + schedule type is recurring. ISO8601 duration format. + :type interval: str + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'JobScheduleType'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'interval': {'key': 'interval', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobSchedule, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', "0001-01-01T00:00:00Z") + self.end_time = kwargs.get('end_time', "9999-12-31T11:59:59Z") + self.type = kwargs.get('type', "Once") + self.enabled = kwargs.get('enabled', None) + self.interval = kwargs.get('interval', None) + + +class JobStep(ProxyResource): + """A job step. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param step_id: The job step's index within the job. If not specified when + creating the job step, it will be created as the last step. If not + specified when updating the job step, the step id is not modified. + :type step_id: int + :param target_group: Required. The resource ID of the target group that + the job step will be executed on. + :type target_group: str + :param credential: Required. The resource ID of the job credential that + will be used to connect to the targets. + :type credential: str + :param action: Required. The action payload of the job step. + :type action: ~azure.mgmt.sql.models.JobStepAction + :param output: Output destination properties of the job step. + :type output: ~azure.mgmt.sql.models.JobStepOutput + :param execution_options: Execution options for the job step. + :type execution_options: ~azure.mgmt.sql.models.JobStepExecutionOptions + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'target_group': {'required': True}, + 'credential': {'required': True}, + 'action': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'step_id': {'key': 'properties.stepId', 'type': 'int'}, + 'target_group': {'key': 'properties.targetGroup', 'type': 'str'}, + 'credential': {'key': 'properties.credential', 'type': 'str'}, + 'action': {'key': 'properties.action', 'type': 'JobStepAction'}, + 'output': {'key': 'properties.output', 'type': 'JobStepOutput'}, + 'execution_options': {'key': 'properties.executionOptions', 'type': 'JobStepExecutionOptions'}, + } + + def __init__(self, **kwargs): + super(JobStep, self).__init__(**kwargs) + self.step_id = kwargs.get('step_id', None) + self.target_group = kwargs.get('target_group', None) + self.credential = kwargs.get('credential', None) + self.action = kwargs.get('action', None) + self.output = kwargs.get('output', None) + self.execution_options = kwargs.get('execution_options', None) + + +class JobStepAction(Model): + """The action to be executed by a job step. + + All required parameters must be populated in order to send to Azure. + + :param type: Type of action being executed by the job step. Possible + values include: 'TSql'. Default value: "TSql" . + :type type: str or ~azure.mgmt.sql.models.JobStepActionType + :param source: The source of the action to execute. Possible values + include: 'Inline'. Default value: "Inline" . + :type source: str or ~azure.mgmt.sql.models.JobStepActionSource + :param value: Required. The action value, for example the text of the + T-SQL script to execute. + :type value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobStepAction, self).__init__(**kwargs) + self.type = kwargs.get('type', "TSql") + self.source = kwargs.get('source', "Inline") + self.value = kwargs.get('value', None) + + +class JobStepExecutionOptions(Model): + """The execution options of a job step. + + :param timeout_seconds: Execution timeout for the job step. Default value: + 43200 . + :type timeout_seconds: int + :param retry_attempts: Maximum number of times the job step will be + reattempted if the first attempt fails. Default value: 10 . + :type retry_attempts: int + :param initial_retry_interval_seconds: Initial delay between retries for + job step execution. Default value: 1 . + :type initial_retry_interval_seconds: int + :param maximum_retry_interval_seconds: The maximum amount of time to wait + between retries for job step execution. Default value: 120 . + :type maximum_retry_interval_seconds: int + :param retry_interval_backoff_multiplier: The backoff multiplier for the + time between retries. Default value: 2 . + :type retry_interval_backoff_multiplier: float + """ + + _attribute_map = { + 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, + 'retry_attempts': {'key': 'retryAttempts', 'type': 'int'}, + 'initial_retry_interval_seconds': {'key': 'initialRetryIntervalSeconds', 'type': 'int'}, + 'maximum_retry_interval_seconds': {'key': 'maximumRetryIntervalSeconds', 'type': 'int'}, + 'retry_interval_backoff_multiplier': {'key': 'retryIntervalBackoffMultiplier', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(JobStepExecutionOptions, self).__init__(**kwargs) + self.timeout_seconds = kwargs.get('timeout_seconds', 43200) + self.retry_attempts = kwargs.get('retry_attempts', 10) + self.initial_retry_interval_seconds = kwargs.get('initial_retry_interval_seconds', 1) + self.maximum_retry_interval_seconds = kwargs.get('maximum_retry_interval_seconds', 120) + self.retry_interval_backoff_multiplier = kwargs.get('retry_interval_backoff_multiplier', 2) + + +class JobStepOutput(Model): + """The output configuration of a job step. + + All required parameters must be populated in order to send to Azure. + + :param type: The output destination type. Possible values include: + 'SqlDatabase'. Default value: "SqlDatabase" . + :type type: str or ~azure.mgmt.sql.models.JobStepOutputType + :param subscription_id: The output destination subscription id. + :type subscription_id: str + :param resource_group_name: The output destination resource group. + :type resource_group_name: str + :param server_name: Required. The output destination server name. + :type server_name: str + :param database_name: Required. The output destination database. + :type database_name: str + :param schema_name: The output destination schema. Default value: "dbo" . + :type schema_name: str + :param table_name: Required. The output destination table. + :type table_name: str + :param credential: Required. The resource ID of the credential to use to + connect to the output destination. + :type credential: str + """ + + _validation = { + 'server_name': {'required': True}, + 'database_name': {'required': True}, + 'table_name': {'required': True}, + 'credential': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'credential': {'key': 'credential', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobStepOutput, self).__init__(**kwargs) + self.type = kwargs.get('type', "SqlDatabase") + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group_name = kwargs.get('resource_group_name', None) + self.server_name = kwargs.get('server_name', None) + self.database_name = kwargs.get('database_name', None) + self.schema_name = kwargs.get('schema_name', "dbo") + self.table_name = kwargs.get('table_name', None) + self.credential = kwargs.get('credential', None) + + +class JobTarget(Model): + """A job target, for example a specific database or a container of databases + that is evaluated during job execution. + + All required parameters must be populated in order to send to Azure. + + :param membership_type: Whether the target is included or excluded from + the group. Possible values include: 'Include', 'Exclude'. Default value: + "Include" . + :type membership_type: str or + ~azure.mgmt.sql.models.JobTargetGroupMembershipType + :param type: Required. The target type. Possible values include: + 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + :type type: str or ~azure.mgmt.sql.models.JobTargetType + :param server_name: The target server name. + :type server_name: str + :param database_name: The target database name. + :type database_name: str + :param elastic_pool_name: The target elastic pool name. + :type elastic_pool_name: str + :param shard_map_name: The target shard map. + :type shard_map_name: str + :param refresh_credential: The resource ID of the credential that is used + during job execution to connect to the target and determine the list of + databases inside the target. + :type refresh_credential: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'membership_type': {'key': 'membershipType', 'type': 'JobTargetGroupMembershipType'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'elastic_pool_name': {'key': 'elasticPoolName', 'type': 'str'}, + 'shard_map_name': {'key': 'shardMapName', 'type': 'str'}, + 'refresh_credential': {'key': 'refreshCredential', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobTarget, self).__init__(**kwargs) + self.membership_type = kwargs.get('membership_type', "Include") + self.type = kwargs.get('type', None) + self.server_name = kwargs.get('server_name', None) + self.database_name = kwargs.get('database_name', None) + self.elastic_pool_name = kwargs.get('elastic_pool_name', None) + self.shard_map_name = kwargs.get('shard_map_name', None) + self.refresh_credential = kwargs.get('refresh_credential', None) + + +class JobTargetGroup(ProxyResource): + """A group of job targets. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param members: Required. Members of the target group. + :type members: list[~azure.mgmt.sql.models.JobTarget] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'members': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'members': {'key': 'properties.members', 'type': '[JobTarget]'}, + } + + def __init__(self, **kwargs): + super(JobTargetGroup, self).__init__(**kwargs) + self.members = kwargs.get('members', None) + + +class JobVersion(ProxyResource): + """A job version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobVersion, self).__init__(**kwargs) + + +class LicenseTypeCapability(Model): + """The license type capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: License type identifier. + :vartype name: str + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LicenseTypeCapability, self).__init__(**kwargs) + self.name = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class LocationCapabilities(Model): + """The location capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The location name. + :vartype name: str + :ivar supported_server_versions: The list of supported server versions. + :vartype supported_server_versions: + list[~azure.mgmt.sql.models.ServerVersionCapability] + :ivar supported_managed_instance_versions: The list of supported managed + instance versions. + :vartype supported_managed_instance_versions: + list[~azure.mgmt.sql.models.ManagedInstanceVersionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_server_versions': {'readonly': True}, + 'supported_managed_instance_versions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_server_versions': {'key': 'supportedServerVersions', 'type': '[ServerVersionCapability]'}, + 'supported_managed_instance_versions': {'key': 'supportedManagedInstanceVersions', 'type': '[ManagedInstanceVersionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LocationCapabilities, self).__init__(**kwargs) + self.name = None + self.supported_server_versions = None + self.supported_managed_instance_versions = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class LogSizeCapability(Model): + """The log size capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The log size limit (see 'unit' for the units). + :vartype limit: int + :ivar unit: The units that the limit is expressed in. Possible values + include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes', 'Percent' + :vartype unit: str or ~azure.mgmt.sql.models.LogSizeUnit + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'int'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LogSizeCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + + +class LongTermRetentionBackup(ProxyResource): + """A long term retention backup. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar server_name: The server name that the backup database belong to. + :vartype server_name: str + :ivar server_create_time: The create time of the server. + :vartype server_create_time: datetime + :ivar database_name: The name of the database the backup belong to + :vartype database_name: str + :ivar database_deletion_time: The delete time of the database + :vartype database_deletion_time: datetime + :ivar backup_time: The time the backup was taken + :vartype backup_time: datetime + :ivar backup_expiration_time: The time the long term retention backup will + expire. + :vartype backup_expiration_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'server_name': {'readonly': True}, + 'server_create_time': {'readonly': True}, + 'database_name': {'readonly': True}, + 'database_deletion_time': {'readonly': True}, + 'backup_time': {'readonly': True}, + 'backup_expiration_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'server_create_time': {'key': 'properties.serverCreateTime', 'type': 'iso-8601'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'database_deletion_time': {'key': 'properties.databaseDeletionTime', 'type': 'iso-8601'}, + 'backup_time': {'key': 'properties.backupTime', 'type': 'iso-8601'}, + 'backup_expiration_time': {'key': 'properties.backupExpirationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(LongTermRetentionBackup, self).__init__(**kwargs) + self.server_name = None + self.server_create_time = None + self.database_name = None + self.database_deletion_time = None + self.backup_time = None + self.backup_expiration_time = None + + +class ManagedBackupShortTermRetentionPolicy(ProxyResource): + """A short term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param retention_days: The backup retention period in days. This is how + many days Point-in-Time Restore will be supported. + :type retention_days: int + """ + + _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'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ManagedBackupShortTermRetentionPolicy, self).__init__(**kwargs) + self.retention_days = kwargs.get('retention_days', None) + + +class ManagedDatabase(TrackedResource): + """A managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param collation: Collation of the managed database. + :type collation: str + :ivar status: Status of the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' + :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus + :ivar creation_date: Creation date of the database. + :vartype creation_date: datetime + :ivar earliest_restore_point: Earliest restore point in time for point in + time restore. + :vartype earliest_restore_point: datetime + :param restore_point_in_time: Conditional. If createMode is + PointInTimeRestore, this value is required. Specifies the point in time + (ISO8601 format) of the source database that will be restored to create + the new database. + :type restore_point_in_time: datetime + :ivar default_secondary_location: Geo paired region. + :vartype default_secondary_location: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param create_mode: Managed database create mode. PointInTimeRestore: + Create a database by restoring a point in time backup of an existing + database. SourceDatabaseName, SourceManagedInstanceName and PointInTime + must be specified. RestoreExternalBackup: Create a database by restoring + from external backup files. Collation, StorageContainerUri and + StorageContainerSasToken must be specified. Recovery: Creates a database + by restoring a geo-replicated backup. RecoverableDatabaseId must be + specified as the recoverable database resource ID to restore. Possible + values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', + 'Recovery' + :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode + :param storage_container_uri: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the uri of the + storage container where backups for this restore are stored. + :type storage_container_uri: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :param restorable_dropped_database_id: The restorable dropped database + resource id to restore when creating this database. + :type restorable_dropped_database_id: str + :param storage_container_sas_token: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the storage + container sas token. + :type storage_container_sas_token: str + :ivar failover_group_id: Instance Failover Group resource identifier that + this managed database belongs to. + :vartype failover_group_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'status': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'earliest_restore_point': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedDatabase, self).__init__(**kwargs) + self.collation = kwargs.get('collation', None) + self.status = None + self.creation_date = None + self.earliest_restore_point = None + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.default_secondary_location = None + self.catalog_collation = kwargs.get('catalog_collation', None) + self.create_mode = kwargs.get('create_mode', None) + self.storage_container_uri = kwargs.get('storage_container_uri', None) + self.source_database_id = kwargs.get('source_database_id', None) + self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) + self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None) + self.failover_group_id = None + self.recoverable_database_id = kwargs.get('recoverable_database_id', None) + + +class ManagedDatabaseSecurityAlertPolicy(ProxyResource): + """A managed database security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ManagedDatabaseSecurityAlertPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.disabled_alerts = kwargs.get('disabled_alerts', None) + self.email_addresses = kwargs.get('email_addresses', None) + self.email_account_admins = kwargs.get('email_account_admins', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.creation_time = None + + +class ManagedDatabaseUpdate(Model): + """An managed database update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param collation: Collation of the managed database. + :type collation: str + :ivar status: Status of the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' + :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus + :ivar creation_date: Creation date of the database. + :vartype creation_date: datetime + :ivar earliest_restore_point: Earliest restore point in time for point in + time restore. + :vartype earliest_restore_point: datetime + :param restore_point_in_time: Conditional. If createMode is + PointInTimeRestore, this value is required. Specifies the point in time + (ISO8601 format) of the source database that will be restored to create + the new database. + :type restore_point_in_time: datetime + :ivar default_secondary_location: Geo paired region. + :vartype default_secondary_location: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param create_mode: Managed database create mode. PointInTimeRestore: + Create a database by restoring a point in time backup of an existing + database. SourceDatabaseName, SourceManagedInstanceName and PointInTime + must be specified. RestoreExternalBackup: Create a database by restoring + from external backup files. Collation, StorageContainerUri and + StorageContainerSasToken must be specified. Recovery: Creates a database + by restoring a geo-replicated backup. RecoverableDatabaseId must be + specified as the recoverable database resource ID to restore. Possible + values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', + 'Recovery' + :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode + :param storage_container_uri: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the uri of the + storage container where backups for this restore are stored. + :type storage_container_uri: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :param restorable_dropped_database_id: The restorable dropped database + resource id to restore when creating this database. + :type restorable_dropped_database_id: str + :param storage_container_sas_token: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the storage + container sas token. + :type storage_container_sas_token: str + :ivar failover_group_id: Instance Failover Group resource identifier that + this managed database belongs to. + :vartype failover_group_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'status': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'earliest_restore_point': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + } + + _attribute_map = { + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ManagedDatabaseUpdate, self).__init__(**kwargs) + self.collation = kwargs.get('collation', None) + self.status = None + self.creation_date = None + self.earliest_restore_point = None + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.default_secondary_location = None + self.catalog_collation = kwargs.get('catalog_collation', None) + self.create_mode = kwargs.get('create_mode', None) + self.storage_container_uri = kwargs.get('storage_container_uri', None) + self.source_database_id = kwargs.get('source_database_id', None) + self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) + self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None) + self.failover_group_id = None + self.recoverable_database_id = kwargs.get('recoverable_database_id', None) + self.tags = kwargs.get('tags', None) + + +class ManagedInstance(TrackedResource): + """An Azure SQL managed instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param identity: The Azure Active Directory identity of the managed + instance. + :type identity: ~azure.mgmt.sql.models.ResourceIdentity + :param sku: Managed instance SKU. Allowed values for sku.name: GP_Gen4, + GP_Gen5, BC_Gen4, BC_Gen5 + :type sku: ~azure.mgmt.sql.models.Sku + :param managed_instance_create_mode: Specifies the mode of database + creation. + Default: Regular instance creation. + Restore: Creates an instance by restoring a set of backups to specific + point in time. RestorePointInTime and SourceManagedInstanceId must be + specified. Possible values include: 'Default', 'PointInTimeRestore' + :type managed_instance_create_mode: str or + ~azure.mgmt.sql.models.ManagedServerCreateMode + :ivar fully_qualified_domain_name: The fully qualified domain name of the + managed instance. + :vartype fully_qualified_domain_name: str + :param administrator_login: Administrator username for the managed + instance. Can only be specified when the managed instance is being created + (and is required for creation). + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for managed instance creation). + :type administrator_login_password: str + :param subnet_id: Subnet resource ID for the managed instance. + :type subnet_id: str + :ivar state: The state of the managed instance. + :vartype state: str + :param license_type: The license type. Possible values are + 'LicenseIncluded' (regular price inclusive of a new SQL license) and + 'BasePrice' (discounted AHB price for bringing your own SQL licenses). + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or + ~azure.mgmt.sql.models.ManagedInstanceLicenseType + :param v_cores: The number of vCores. Allowed values: 8, 16, 24, 32, 40, + 64, 80. + :type v_cores: int + :param storage_size_in_gb: Storage size in GB. Minimum value: 32. Maximum + value: 8192. Increments of 32 GB allowed only. + :type storage_size_in_gb: int + :param collation: Collation of the managed instance. + :type collation: str + :ivar dns_zone: The Dns Zone that the managed instance is in. + :vartype dns_zone: str + :param dns_zone_partner: The resource id of another managed instance whose + DNS zone this managed instance will share after creation. + :type dns_zone_partner: str + :param public_data_endpoint_enabled: Whether or not the public data + endpoint is enabled. + :type public_data_endpoint_enabled: bool + :param source_managed_instance_id: The resource identifier of the source + managed instance associated with create operation of this instance. + :type source_managed_instance_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param proxy_override: Connection type used for connecting to the + instance. Possible values include: 'Proxy', 'Redirect', 'Default' + :type proxy_override: str or + ~azure.mgmt.sql.models.ManagedInstanceProxyOverride + :param timezone_id: Id of the timezone. Allowed values are timezones + supported by Windows. + Windows keeps details on supported timezones, including the id, in + registry under + KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time + Zones. + You can get those registry values via SQL Server by querying SELECT name + AS timezone_id FROM sys.time_zone_info. + List of Ids can also be obtained by executing + [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + An example of valid timezone id is "Pacific Standard Time" or "W. Europe + Standard Time". + :type timezone_id: str + :param instance_pool_id: The Id of the instance pool this managed server + belongs to. + :type instance_pool_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'fully_qualified_domain_name': {'readonly': True}, + 'state': {'readonly': True}, + 'dns_zone': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, + 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, + 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, + 'source_managed_instance_id': {'key': 'properties.sourceManagedInstanceId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, + 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, + 'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstance, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.sku = kwargs.get('sku', None) + self.managed_instance_create_mode = kwargs.get('managed_instance_create_mode', None) + self.fully_qualified_domain_name = None + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.state = None + self.license_type = kwargs.get('license_type', None) + self.v_cores = kwargs.get('v_cores', None) + self.storage_size_in_gb = kwargs.get('storage_size_in_gb', None) + self.collation = kwargs.get('collation', None) + self.dns_zone = None + self.dns_zone_partner = kwargs.get('dns_zone_partner', None) + self.public_data_endpoint_enabled = kwargs.get('public_data_endpoint_enabled', None) + self.source_managed_instance_id = kwargs.get('source_managed_instance_id', None) + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.proxy_override = kwargs.get('proxy_override', None) + self.timezone_id = kwargs.get('timezone_id', None) + self.instance_pool_id = kwargs.get('instance_pool_id', None) + + +class ManagedInstanceEditionCapability(Model): + """The managed server capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The managed server version name. + :vartype name: str + :ivar supported_families: The supported families. + :vartype supported_families: + list[~azure.mgmt.sql.models.ManagedInstanceFamilyCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_families': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_families': {'key': 'supportedFamilies', 'type': '[ManagedInstanceFamilyCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceEditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_families = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ManagedInstanceEncryptionProtector(ProxyResource): + """The managed instance encryption protector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :vartype kind: str + :param server_key_name: The name of the managed instance key. + :type server_key_name: str + :param server_key_type: Required. The encryption protector type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :ivar uri: The URI of the server key. + :vartype uri: str + :ivar thumbprint: Thumbprint of the server key. + :vartype thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'server_key_type': {'required': True}, + 'uri': {'readonly': True}, + 'thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceEncryptionProtector, self).__init__(**kwargs) + self.kind = None + self.server_key_name = kwargs.get('server_key_name', None) + self.server_key_type = kwargs.get('server_key_type', None) + self.uri = None + self.thumbprint = None + + +class ManagedInstanceFamilyCapability(Model): + """The managed server family capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Family name. + :vartype name: str + :ivar sku: SKU name. + :vartype sku: str + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar supported_vcores_values: List of supported virtual cores values. + :vartype supported_vcores_values: + list[~azure.mgmt.sql.models.ManagedInstanceVcoresCapability] + :ivar included_max_size: Included size. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar supported_storage_sizes: Storage size ranges. + :vartype supported_storage_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'supported_vcores_values': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'supported_storage_sizes': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'supported_vcores_values': {'key': 'supportedVcoresValues', 'type': '[ManagedInstanceVcoresCapability]'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'supported_storage_sizes': {'key': 'supportedStorageSizes', 'type': '[MaxSizeRangeCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceFamilyCapability, self).__init__(**kwargs) + self.name = None + self.sku = None + self.supported_license_types = None + self.supported_vcores_values = None + self.included_max_size = None + self.supported_storage_sizes = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ManagedInstanceKey(ProxyResource): + """A managed instance key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :vartype kind: str + :param server_key_type: Required. The key type like 'ServiceManaged', + 'AzureKeyVault'. Possible values include: 'ServiceManaged', + 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :param uri: The URI of the key. If the ServerKeyType is AzureKeyVault, + then the URI is required. + :type uri: str + :ivar thumbprint: Thumbprint of the key. + :vartype thumbprint: str + :ivar creation_date: The key creation date. + :vartype creation_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'server_key_type': {'required': True}, + 'thumbprint': {'readonly': True}, + 'creation_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceKey, self).__init__(**kwargs) + self.kind = None + self.server_key_type = kwargs.get('server_key_type', None) + self.uri = kwargs.get('uri', None) + self.thumbprint = None + self.creation_date = None + + +class ManagedInstancePairInfo(Model): + """Pairs of Managed Instances in the failover group. + + :param primary_managed_instance_id: Id of Primary Managed Instance in + pair. + :type primary_managed_instance_id: str + :param partner_managed_instance_id: Id of Partner Managed Instance in + pair. + :type partner_managed_instance_id: str + """ + + _attribute_map = { + 'primary_managed_instance_id': {'key': 'primaryManagedInstanceId', 'type': 'str'}, + 'partner_managed_instance_id': {'key': 'partnerManagedInstanceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstancePairInfo, self).__init__(**kwargs) + self.primary_managed_instance_id = kwargs.get('primary_managed_instance_id', None) + self.partner_managed_instance_id = kwargs.get('partner_managed_instance_id', None) + + +class ManagedInstanceUpdate(Model): + """An update request for an Azure SQL Database managed instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param sku: Managed instance sku + :type sku: ~azure.mgmt.sql.models.Sku + :param managed_instance_create_mode: Specifies the mode of database + creation. + Default: Regular instance creation. + Restore: Creates an instance by restoring a set of backups to specific + point in time. RestorePointInTime and SourceManagedInstanceId must be + specified. Possible values include: 'Default', 'PointInTimeRestore' + :type managed_instance_create_mode: str or + ~azure.mgmt.sql.models.ManagedServerCreateMode + :ivar fully_qualified_domain_name: The fully qualified domain name of the + managed instance. + :vartype fully_qualified_domain_name: str + :param administrator_login: Administrator username for the managed + instance. Can only be specified when the managed instance is being created + (and is required for creation). + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for managed instance creation). + :type administrator_login_password: str + :param subnet_id: Subnet resource ID for the managed instance. + :type subnet_id: str + :ivar state: The state of the managed instance. + :vartype state: str + :param license_type: The license type. Possible values are + 'LicenseIncluded' (regular price inclusive of a new SQL license) and + 'BasePrice' (discounted AHB price for bringing your own SQL licenses). + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or + ~azure.mgmt.sql.models.ManagedInstanceLicenseType + :param v_cores: The number of vCores. Allowed values: 8, 16, 24, 32, 40, + 64, 80. + :type v_cores: int + :param storage_size_in_gb: Storage size in GB. Minimum value: 32. Maximum + value: 8192. Increments of 32 GB allowed only. + :type storage_size_in_gb: int + :param collation: Collation of the managed instance. + :type collation: str + :ivar dns_zone: The Dns Zone that the managed instance is in. + :vartype dns_zone: str + :param dns_zone_partner: The resource id of another managed instance whose + DNS zone this managed instance will share after creation. + :type dns_zone_partner: str + :param public_data_endpoint_enabled: Whether or not the public data + endpoint is enabled. + :type public_data_endpoint_enabled: bool + :param source_managed_instance_id: The resource identifier of the source + managed instance associated with create operation of this instance. + :type source_managed_instance_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param proxy_override: Connection type used for connecting to the + instance. Possible values include: 'Proxy', 'Redirect', 'Default' + :type proxy_override: str or + ~azure.mgmt.sql.models.ManagedInstanceProxyOverride + :param timezone_id: Id of the timezone. Allowed values are timezones + supported by Windows. + Windows keeps details on supported timezones, including the id, in + registry under + KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time + Zones. + You can get those registry values via SQL Server by querying SELECT name + AS timezone_id FROM sys.time_zone_info. + List of Ids can also be obtained by executing + [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + An example of valid timezone id is "Pacific Standard Time" or "W. Europe + Standard Time". + :type timezone_id: str + :param instance_pool_id: The Id of the instance pool this managed server + belongs to. + :type instance_pool_id: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'fully_qualified_domain_name': {'readonly': True}, + 'state': {'readonly': True}, + 'dns_zone': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, + 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, + 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, + 'source_managed_instance_id': {'key': 'properties.sourceManagedInstanceId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, + 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, + 'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceUpdate, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.managed_instance_create_mode = kwargs.get('managed_instance_create_mode', None) + self.fully_qualified_domain_name = None + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.state = None + self.license_type = kwargs.get('license_type', None) + self.v_cores = kwargs.get('v_cores', None) + self.storage_size_in_gb = kwargs.get('storage_size_in_gb', None) + self.collation = kwargs.get('collation', None) + self.dns_zone = None + self.dns_zone_partner = kwargs.get('dns_zone_partner', None) + self.public_data_endpoint_enabled = kwargs.get('public_data_endpoint_enabled', None) + self.source_managed_instance_id = kwargs.get('source_managed_instance_id', None) + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.proxy_override = kwargs.get('proxy_override', None) + self.timezone_id = kwargs.get('timezone_id', None) + self.instance_pool_id = kwargs.get('instance_pool_id', None) + self.tags = kwargs.get('tags', None) + + +class ManagedInstanceVcoresCapability(Model): + """The managed instance virtual cores capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The virtual cores identifier. + :vartype name: str + :ivar value: The virtual cores value. + :vartype value: int + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'int'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceVcoresCapability, self).__init__(**kwargs) + self.name = None + self.value = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ManagedInstanceVersionCapability(Model): + """The managed instance capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The server version name. + :vartype name: str + :ivar supported_editions: The list of supported managed instance editions. + :vartype supported_editions: + list[~azure.mgmt.sql.models.ManagedInstanceEditionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_editions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_editions': {'key': 'supportedEditions', 'type': '[ManagedInstanceEditionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceVersionCapability, self).__init__(**kwargs) + self.name = None + self.supported_editions = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ManagedInstanceVulnerabilityAssessment(ProxyResource): + """A managed instance vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: Required. A blob storage container path to + hold the scan results (e.g. + https://myStorage.blob.core.windows.net/VaScans/). + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_container_path': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = kwargs.get('storage_container_path', None) + self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.recurring_scans = kwargs.get('recurring_scans', None) + + +class ManagedServerSecurityAlertPolicy(ProxyResource): + """A managed server security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ManagedServerSecurityAlertPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.disabled_alerts = kwargs.get('disabled_alerts', None) + self.email_addresses = kwargs.get('email_addresses', None) + self.email_account_admins = kwargs.get('email_account_admins', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.creation_time = None + + +class MaxSizeCapability(Model): + """The maximum size capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The maximum size limit (see 'unit' for the units). + :vartype limit: int + :ivar unit: The units that the limit is expressed in. Possible values + include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' + :vartype unit: str or ~azure.mgmt.sql.models.MaxSizeUnit + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'int'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MaxSizeCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + + +class MaxSizeRangeCapability(Model): + """The maximum size range capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar min_value: Minimum value. + :vartype min_value: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar max_value: Maximum value. + :vartype max_value: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar scale_size: Scale/step size for discrete values between the minimum + value and the maximum value. + :vartype scale_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar log_size: Size of transaction log. + :vartype log_size: ~azure.mgmt.sql.models.LogSizeCapability + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'min_value': {'readonly': True}, + 'max_value': {'readonly': True}, + 'scale_size': {'readonly': True}, + 'log_size': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'min_value': {'key': 'minValue', 'type': 'MaxSizeCapability'}, + 'max_value': {'key': 'maxValue', 'type': 'MaxSizeCapability'}, + 'scale_size': {'key': 'scaleSize', 'type': 'MaxSizeCapability'}, + 'log_size': {'key': 'logSize', 'type': 'LogSizeCapability'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MaxSizeRangeCapability, self).__init__(**kwargs) + self.min_value = None + self.max_value = None + self.scale_size = None + self.log_size = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class Metric(Model): + """Database metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar start_time: The start time for the metric (ISO-8601 format). + :vartype start_time: datetime + :ivar end_time: The end time for the metric (ISO-8601 format). + :vartype end_time: datetime + :ivar time_grain: The time step to be used to summarize the metric values. + :vartype time_grain: str + :ivar unit: The unit of the metric. Possible values include: 'count', + 'bytes', 'seconds', 'percent', 'countPerSecond', 'bytesPerSecond' + :vartype unit: str or ~azure.mgmt.sql.models.UnitType + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.sql.models.MetricName + :ivar metric_values: The metric values for the specified time window and + timestep. + :vartype metric_values: list[~azure.mgmt.sql.models.MetricValue] + """ + + _validation = { + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'time_grain': {'readonly': True}, + 'unit': {'readonly': True}, + 'name': {'readonly': True}, + 'metric_values': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'MetricName'}, + 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, + } + + def __init__(self, **kwargs): + super(Metric, self).__init__(**kwargs) + self.start_time = None + self.end_time = None + self.time_grain = None + self.unit = None + self.name = None + self.metric_values = None + + +class MetricAvailability(Model): + """A metric availability value. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar retention: The length of retention for the database metric. + :vartype retention: str + :ivar time_grain: The granularity of the database metric. + :vartype time_grain: str + """ + + _validation = { + 'retention': {'readonly': True}, + 'time_grain': {'readonly': True}, + } + + _attribute_map = { + 'retention': {'key': 'retention', 'type': 'str'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetricAvailability, self).__init__(**kwargs) + self.retention = None + self.time_grain = None + + +class MetricDefinition(Model): + """A database metric definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.sql.models.MetricName + :ivar primary_aggregation_type: The primary aggregation type defining how + metric values are displayed. Possible values include: 'None', 'Average', + 'Count', 'Minimum', 'Maximum', 'Total' + :vartype primary_aggregation_type: str or + ~azure.mgmt.sql.models.PrimaryAggregationType + :ivar resource_uri: The resource uri of the database. + :vartype resource_uri: str + :ivar unit: The unit of the metric. Possible values include: 'Count', + 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' + :vartype unit: str or ~azure.mgmt.sql.models.UnitDefinitionType + :ivar metric_availabilities: The list of database metric availabilities + for the metric. + :vartype metric_availabilities: + list[~azure.mgmt.sql.models.MetricAvailability] + """ + + _validation = { + 'name': {'readonly': True}, + 'primary_aggregation_type': {'readonly': True}, + 'resource_uri': {'readonly': True}, + 'unit': {'readonly': True}, + 'metric_availabilities': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'MetricName'}, + 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, + } + + def __init__(self, **kwargs): + super(MetricDefinition, self).__init__(**kwargs) + self.name = None + self.primary_aggregation_type = None + self.resource_uri = None + self.unit = None + self.metric_availabilities = None + + +class MetricName(Model): + """A database metric name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The name of the database metric. + :vartype value: str + :ivar localized_value: The friendly name of the database metric. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetricName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class MetricValue(Model): + """Represents database metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar count: The number of values for the metric. + :vartype count: float + :ivar average: The average value of the metric. + :vartype average: float + :ivar maximum: The max value of the metric. + :vartype maximum: float + :ivar minimum: The min value of the metric. + :vartype minimum: float + :ivar timestamp: The metric timestamp (ISO-8601 format). + :vartype timestamp: datetime + :ivar total: The total value of the metric. + :vartype total: float + """ + + _validation = { + 'count': {'readonly': True}, + 'average': {'readonly': True}, + 'maximum': {'readonly': True}, + 'minimum': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'total': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'float'}, + 'average': {'key': 'average', 'type': 'float'}, + 'maximum': {'key': 'maximum', 'type': 'float'}, + 'minimum': {'key': 'minimum', 'type': 'float'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'total': {'key': 'total', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(MetricValue, self).__init__(**kwargs) + self.count = None + self.average = None + self.maximum = None + self.minimum = None + self.timestamp = None + self.total = None + + +class Name(Model): + """ARM Usage Name. + + :param value: Usage name value + :type value: str + :param localized_value: Usage name localized value. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Name, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) + + +class Operation(Model): + """SQL REST API operation definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the operation being performed on this particular + object. + :vartype name: str + :ivar display: The localized display information for this particular + operation / action. + :vartype display: ~azure.mgmt.sql.models.OperationDisplay + :ivar origin: The intended executor of the operation. Possible values + include: 'user', 'system' + :vartype origin: str or ~azure.mgmt.sql.models.OperationOrigin + :ivar properties: Additional descriptions for the operation. + :vartype properties: dict[str, object] + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + 'origin': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + self.origin = None + self.properties = None + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The localized friendly form of the resource provider name. + :vartype provider: str + :ivar resource: The localized friendly form of the resource type related + to this action/operation. + :vartype resource: str + :ivar operation: The localized friendly name for the operation. + :vartype operation: str + :ivar description: The localized friendly description for the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class OperationImpact(Model): + """The impact of an operation, both in absolute and relative terms. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the impact dimension. + :vartype name: str + :ivar unit: The unit in which estimated impact to dimension is measured. + :vartype unit: str + :ivar change_value_absolute: The absolute impact to dimension. + :vartype change_value_absolute: float + :ivar change_value_relative: The relative impact to dimension (null if not + applicable) + :vartype change_value_relative: float + """ + + _validation = { + 'name': {'readonly': True}, + 'unit': {'readonly': True}, + 'change_value_absolute': {'readonly': True}, + 'change_value_relative': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'change_value_absolute': {'key': 'changeValueAbsolute', 'type': 'float'}, + 'change_value_relative': {'key': 'changeValueRelative', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(OperationImpact, self).__init__(**kwargs) + self.name = None + self.unit = None + self.change_value_absolute = None + self.change_value_relative = None + + +class PartnerInfo(Model): + """Partner server information for the failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource identifier of the partner server. + :type id: str + :ivar location: Geo location of the partner server. + :vartype location: str + :ivar replication_role: Replication role of the partner server. Possible + values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.FailoverGroupReplicationRole + """ + + _validation = { + 'id': {'required': True}, + 'location': {'readonly': True}, + 'replication_role': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'replication_role': {'key': 'replicationRole', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PartnerInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.location = None + self.replication_role = None + + +class PartnerRegionInfo(Model): + """Partner region information for the failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param location: Geo location of the partner managed instances. + :type location: str + :ivar replication_role: Replication role of the partner managed instances. + Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole + """ + + _validation = { + 'replication_role': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'replication_role': {'key': 'replicationRole', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PartnerRegionInfo, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.replication_role = None + + +class PerformanceLevelCapability(Model): + """The performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: Performance level value. + :vartype value: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + """ + + _validation = { + 'value': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PerformanceLevelCapability, self).__init__(**kwargs) + self.value = None + self.unit = None + + +class RecommendedElasticPool(ProxyResource): + """Represents a recommended elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_edition: The edition of the recommended elastic pool. The + ElasticPoolEdition enumeration contains all the valid editions. Possible + values include: 'Basic', 'Standard', 'Premium', 'GeneralPurpose', + 'BusinessCritical' + :vartype database_edition: str or + ~azure.mgmt.sql.models.ElasticPoolEdition + :param dtu: The DTU for the recommended elastic pool. + :type dtu: float + :param database_dtu_min: The minimum DTU for the database. + :type database_dtu_min: float + :param database_dtu_max: The maximum DTU for the database. + :type database_dtu_max: float + :param storage_mb: Gets storage size in megabytes. + :type storage_mb: float + :ivar observation_period_start: The observation period start (ISO8601 + format). + :vartype observation_period_start: datetime + :ivar observation_period_end: The observation period start (ISO8601 + format). + :vartype observation_period_end: datetime + :ivar max_observed_dtu: Gets maximum observed DTU. + :vartype max_observed_dtu: float + :ivar max_observed_storage_mb: Gets maximum observed storage in megabytes. + :vartype max_observed_storage_mb: float + :ivar databases: The list of databases in this pool. Expanded property + :vartype databases: list[~azure.mgmt.sql.models.TrackedResource] + :ivar metrics: The list of databases housed in the server. Expanded + property + :vartype metrics: + list[~azure.mgmt.sql.models.RecommendedElasticPoolMetric] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_edition': {'readonly': True}, + 'observation_period_start': {'readonly': True}, + 'observation_period_end': {'readonly': True}, + 'max_observed_dtu': {'readonly': True}, + 'max_observed_storage_mb': {'readonly': True}, + 'databases': {'readonly': True}, + 'metrics': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'dtu': {'key': 'properties.dtu', 'type': 'float'}, + 'database_dtu_min': {'key': 'properties.databaseDtuMin', 'type': 'float'}, + 'database_dtu_max': {'key': 'properties.databaseDtuMax', 'type': 'float'}, + 'storage_mb': {'key': 'properties.storageMB', 'type': 'float'}, + 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, + 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, + 'max_observed_dtu': {'key': 'properties.maxObservedDtu', 'type': 'float'}, + 'max_observed_storage_mb': {'key': 'properties.maxObservedStorageMB', 'type': 'float'}, + 'databases': {'key': 'properties.databases', 'type': '[TrackedResource]'}, + 'metrics': {'key': 'properties.metrics', 'type': '[RecommendedElasticPoolMetric]'}, + } + + def __init__(self, **kwargs): + super(RecommendedElasticPool, self).__init__(**kwargs) + self.database_edition = None + self.dtu = kwargs.get('dtu', None) + self.database_dtu_min = kwargs.get('database_dtu_min', None) + self.database_dtu_max = kwargs.get('database_dtu_max', None) + self.storage_mb = kwargs.get('storage_mb', None) + self.observation_period_start = None + self.observation_period_end = None + self.max_observed_dtu = None + self.max_observed_storage_mb = None + self.databases = None + self.metrics = None + + +class RecommendedElasticPoolMetric(Model): + """Represents recommended elastic pool metric. + + :param date_time_property: The time of metric (ISO8601 format). + :type date_time_property: datetime + :param dtu: Gets or sets the DTUs (Database Transaction Units). See + https://azure.microsoft.com/documentation/articles/sql-database-what-is-a-dtu/ + :type dtu: float + :param size_gb: Gets or sets size in gigabytes. + :type size_gb: float + """ + + _attribute_map = { + 'date_time_property': {'key': 'dateTime', 'type': 'iso-8601'}, + 'dtu': {'key': 'dtu', 'type': 'float'}, + 'size_gb': {'key': 'sizeGB', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(RecommendedElasticPoolMetric, self).__init__(**kwargs) + self.date_time_property = kwargs.get('date_time_property', None) + self.dtu = kwargs.get('dtu', None) + self.size_gb = kwargs.get('size_gb', None) + + +class RecommendedIndex(ProxyResource): + """Represents a database recommended index. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar action: The proposed index action. You can create a missing index, + drop an unused index, or rebuild an existing index to improve its + performance. Possible values include: 'Create', 'Drop', 'Rebuild' + :vartype action: str or ~azure.mgmt.sql.models.RecommendedIndexAction + :ivar state: The current recommendation state. Possible values include: + 'Active', 'Pending', 'Executing', 'Verifying', 'Pending Revert', + 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success' + :vartype state: str or ~azure.mgmt.sql.models.RecommendedIndexState + :ivar created: The UTC datetime showing when this resource was created + (ISO8601 format). + :vartype created: datetime + :ivar last_modified: The UTC datetime of when was this resource last + changed (ISO8601 format). + :vartype last_modified: datetime + :ivar index_type: The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, + CLUSTERED COLUMNSTORE). Possible values include: 'CLUSTERED', + 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED COLUMNSTORE' + :vartype index_type: str or ~azure.mgmt.sql.models.RecommendedIndexType + :ivar schema: The schema where table to build index over resides + :vartype schema: str + :ivar table: The table on which to build index. + :vartype table: str + :ivar columns: Columns over which to build index + :vartype columns: list[str] + :ivar included_columns: The list of column names to be included in the + index + :vartype included_columns: list[str] + :ivar index_script: The full build index script + :vartype index_script: str + :ivar estimated_impact: The estimated impact of doing recommended index + action. + :vartype estimated_impact: list[~azure.mgmt.sql.models.OperationImpact] + :ivar reported_impact: The values reported after index action is complete. + :vartype reported_impact: list[~azure.mgmt.sql.models.OperationImpact] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'action': {'readonly': True}, + 'state': {'readonly': True}, + 'created': {'readonly': True}, + 'last_modified': {'readonly': True}, + 'index_type': {'readonly': True}, + 'schema': {'readonly': True}, + 'table': {'readonly': True}, + 'columns': {'readonly': True}, + 'included_columns': {'readonly': True}, + 'index_script': {'readonly': True}, + 'estimated_impact': {'readonly': True}, + 'reported_impact': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'action': {'key': 'properties.action', 'type': 'RecommendedIndexAction'}, + 'state': {'key': 'properties.state', 'type': 'RecommendedIndexState'}, + 'created': {'key': 'properties.created', 'type': 'iso-8601'}, + 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, + 'index_type': {'key': 'properties.indexType', 'type': 'RecommendedIndexType'}, + 'schema': {'key': 'properties.schema', 'type': 'str'}, + 'table': {'key': 'properties.table', 'type': 'str'}, + 'columns': {'key': 'properties.columns', 'type': '[str]'}, + 'included_columns': {'key': 'properties.includedColumns', 'type': '[str]'}, + 'index_script': {'key': 'properties.indexScript', 'type': 'str'}, + 'estimated_impact': {'key': 'properties.estimatedImpact', 'type': '[OperationImpact]'}, + 'reported_impact': {'key': 'properties.reportedImpact', 'type': '[OperationImpact]'}, + } + + def __init__(self, **kwargs): + super(RecommendedIndex, self).__init__(**kwargs) + self.action = None + self.state = None + self.created = None + self.last_modified = None + self.index_type = None + self.schema = None + self.table = None + self.columns = None + self.included_columns = None + self.index_script = None + self.estimated_impact = None + self.reported_impact = None + + +class RecoverableDatabase(ProxyResource): + """A recoverable database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar edition: The edition of the database + :vartype edition: str + :ivar service_level_objective: The service level objective name of the + database + :vartype service_level_objective: str + :ivar elastic_pool_name: The elastic pool name of the database + :vartype elastic_pool_name: str + :ivar last_available_backup_date: The last available backup date of the + database (ISO8601 format) + :vartype last_available_backup_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'edition': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'last_available_backup_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(RecoverableDatabase, self).__init__(**kwargs) + self.edition = None + self.service_level_objective = None + self.elastic_pool_name = None + self.last_available_backup_date = None + + +class RecoverableManagedDatabase(ProxyResource): + """A recoverable managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar last_available_backup_date: The last available backup date. + :vartype last_available_backup_date: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_available_backup_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RecoverableManagedDatabase, self).__init__(**kwargs) + self.last_available_backup_date = None + + +class ReplicationLink(ProxyResource): + """Represents a database replication link. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Location of the server that contains this firewall rule. + :vartype location: str + :ivar is_termination_allowed: Legacy value indicating whether termination + is allowed. Currently always returns true. + :vartype is_termination_allowed: bool + :ivar replication_mode: Replication mode of this replication link. + :vartype replication_mode: str + :ivar partner_server: The name of the server hosting the partner database. + :vartype partner_server: str + :ivar partner_database: The name of the partner database. + :vartype partner_database: str + :ivar partner_location: The Azure Region of the partner database. + :vartype partner_location: str + :ivar role: The role of the database in the replication link. Possible + values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', + 'Copy' + :vartype role: str or ~azure.mgmt.sql.models.ReplicationRole + :ivar partner_role: The role of the partner database in the replication + link. Possible values include: 'Primary', 'Secondary', + 'NonReadableSecondary', 'Source', 'Copy' + :vartype partner_role: str or ~azure.mgmt.sql.models.ReplicationRole + :ivar start_time: The start time for the replication link. + :vartype start_time: datetime + :ivar percent_complete: The percentage of seeding complete for the + replication link. + :vartype percent_complete: int + :ivar replication_state: The replication state for the replication link. + Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP', 'SUSPENDED' + :vartype replication_state: str or ~azure.mgmt.sql.models.ReplicationState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'is_termination_allowed': {'readonly': True}, + 'replication_mode': {'readonly': True}, + 'partner_server': {'readonly': True}, + 'partner_database': {'readonly': True}, + 'partner_location': {'readonly': True}, + 'role': {'readonly': True}, + 'partner_role': {'readonly': True}, + 'start_time': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'replication_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'is_termination_allowed': {'key': 'properties.isTerminationAllowed', 'type': 'bool'}, + 'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'}, + 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, + 'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'}, + 'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'}, + 'role': {'key': 'properties.role', 'type': 'ReplicationRole'}, + 'partner_role': {'key': 'properties.partnerRole', 'type': 'ReplicationRole'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ReplicationLink, self).__init__(**kwargs) + self.location = None + self.is_termination_allowed = None + self.replication_mode = None + self.partner_server = None + self.partner_database = None + self.partner_location = None + self.role = None + self.partner_role = None + self.start_time = None + self.percent_complete = None + self.replication_state = None + + +class ResourceIdentity(Model): + """Azure Active Directory identity configuration for a resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The Azure Active Directory principal id. + :vartype principal_id: str + :param type: The identity type. Set this to 'SystemAssigned' in order to + automatically create and assign an Azure Active Directory principal for + the resource. Possible values include: 'SystemAssigned' + :type type: str or ~azure.mgmt.sql.models.IdentityType + :ivar tenant_id: The Azure Active Directory tenant id. + :vartype tenant_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.type = kwargs.get('type', None) + self.tenant_id = None + + +class ResourceMoveDefinition(Model): + """Contains the information necessary to perform a resource move (rename). + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The target ID for the resource + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceMoveDefinition, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class RestorableDroppedDatabase(ProxyResource): + """A restorable dropped database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: The geo-location where the resource lives + :vartype location: str + :ivar database_name: The name of the database + :vartype database_name: str + :ivar edition: The edition of the database + :vartype edition: str + :ivar max_size_bytes: The max size in bytes of the database + :vartype max_size_bytes: str + :ivar service_level_objective: The service level objective name of the + database + :vartype service_level_objective: str + :ivar elastic_pool_name: The elastic pool name of the database + :vartype elastic_pool_name: str + :ivar creation_date: The creation date of the database (ISO8601 format) + :vartype creation_date: datetime + :ivar deletion_date: The deletion date of the database (ISO8601 format) + :vartype deletion_date: datetime + :ivar earliest_restore_date: The earliest restore date of the database + (ISO8601 format) + :vartype earliest_restore_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'database_name': {'readonly': True}, + 'edition': {'readonly': True}, + 'max_size_bytes': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(RestorableDroppedDatabase, self).__init__(**kwargs) + self.location = None + self.database_name = None + self.edition = None + self.max_size_bytes = None + self.service_level_objective = None + self.elastic_pool_name = None + self.creation_date = None + self.deletion_date = None + self.earliest_restore_date = None + + +class RestorableDroppedManagedDatabase(TrackedResource): + """A restorable dropped managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar database_name: The name of the database. + :vartype database_name: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar deletion_date: The deletion date of the database (ISO8601 format). + :vartype deletion_date: datetime + :ivar earliest_restore_date: The earliest restore date of the database + (ISO8601 format). + :vartype earliest_restore_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'database_name': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(RestorableDroppedManagedDatabase, self).__init__(**kwargs) + self.database_name = None + self.creation_date = None + self.deletion_date = None + self.earliest_restore_date = None + + +class RestorePoint(ProxyResource): + """Database restore points. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar restore_point_type: The type of restore point. Possible values + include: 'CONTINUOUS', 'DISCRETE' + :vartype restore_point_type: str or + ~azure.mgmt.sql.models.RestorePointType + :ivar earliest_restore_date: The earliest time to which this database can + be restored + :vartype earliest_restore_date: datetime + :ivar restore_point_creation_date: The time the backup was taken + :vartype restore_point_creation_date: datetime + :ivar restore_point_label: The label of restore point for backup request + by user + :vartype restore_point_label: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'restore_point_type': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'restore_point_creation_date': {'readonly': True}, + 'restore_point_label': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'restore_point_type': {'key': 'properties.restorePointType', 'type': 'RestorePointType'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, + 'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RestorePoint, self).__init__(**kwargs) + self.location = None + self.restore_point_type = None + self.earliest_restore_date = None + self.restore_point_creation_date = None + self.restore_point_label = None + + +class SensitivityLabel(ProxyResource): + """A sensitivity label. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param label_name: The label name. + :type label_name: str + :param label_id: The label ID. + :type label_id: str + :param information_type: The information type. + :type information_type: str + :param information_type_id: The information type ID. + :type information_type_id: str + :ivar is_disabled: Is sensitivity recommendation disabled. Applicable for + recommended sensitivity label only. Specifies whether the sensitivity + recommendation on this column is disabled (dismissed) or not. + :vartype is_disabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'is_disabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'label_name': {'key': 'properties.labelName', 'type': 'str'}, + 'label_id': {'key': 'properties.labelId', 'type': 'str'}, + 'information_type': {'key': 'properties.informationType', 'type': 'str'}, + 'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'}, + 'is_disabled': {'key': 'properties.isDisabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(SensitivityLabel, self).__init__(**kwargs) + self.label_name = kwargs.get('label_name', None) + self.label_id = kwargs.get('label_id', None) + self.information_type = kwargs.get('information_type', None) + self.information_type_id = kwargs.get('information_type_id', None) + self.is_disabled = None + + +class Server(TrackedResource): + """An Azure SQL Database server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param identity: The Azure Active Directory identity of the server. + :type identity: ~azure.mgmt.sql.models.ResourceIdentity + :ivar kind: Kind of sql server. This is metadata used for the Azure portal + experience. + :vartype kind: str + :param administrator_login: Administrator username for the server. Once + created it cannot be changed. + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for server creation). + :type administrator_login_password: str + :param version: The version of the server. + :type version: str + :ivar state: The state of the server. + :vartype state: str + :ivar fully_qualified_domain_name: The fully qualified domain name of the + server. + :vartype fully_qualified_domain_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'state': {'readonly': True}, + 'fully_qualified_domain_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Server, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.kind = None + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.version = kwargs.get('version', None) + self.state = None + self.fully_qualified_domain_name = None + + +class ServerAutomaticTuning(ProxyResource): + """Server-level Automatic Tuning. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param desired_state: Automatic tuning desired state. Possible values + include: 'Custom', 'Auto', 'Unspecified' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningServerMode + :ivar actual_state: Automatic tuning actual state. Possible values + include: 'Custom', 'Auto', 'Unspecified' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningServerMode + :param options: Automatic tuning options definition. + :type options: dict[str, + ~azure.mgmt.sql.models.AutomaticTuningServerOptions] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'actual_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningServerMode'}, + 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningServerMode'}, + 'options': {'key': 'properties.options', 'type': '{AutomaticTuningServerOptions}'}, + } + + def __init__(self, **kwargs): + super(ServerAutomaticTuning, self).__init__(**kwargs) + self.desired_state = kwargs.get('desired_state', None) + self.actual_state = None + self.options = kwargs.get('options', None) + + +class ServerAzureADAdministrator(ProxyResource): + """An server Active Directory Administrator. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar administrator_type: Required. The type of administrator. Default + value: "ActiveDirectory" . + :vartype administrator_type: str + :param login: Required. The server administrator login value. + :type login: str + :param sid: Required. The server administrator Sid (Secure ID). + :type sid: str + :param tenant_id: Required. The server Active Directory Administrator + tenant id. + :type tenant_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'administrator_type': {'required': True, 'constant': True}, + 'login': {'required': True}, + 'sid': {'required': True}, + 'tenant_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, + 'login': {'key': 'properties.login', 'type': 'str'}, + 'sid': {'key': 'properties.sid', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + } + + administrator_type = "ActiveDirectory" + + def __init__(self, **kwargs): + super(ServerAzureADAdministrator, self).__init__(**kwargs) + self.login = kwargs.get('login', None) + self.sid = kwargs.get('sid', None) + self.tenant_id = kwargs.get('tenant_id', None) + + +class ServerBlobAuditingPolicy(ProxyResource): + """A server blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ServerBlobAuditingPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) + self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) + self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) + self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) + + +class ServerCommunicationLink(ProxyResource): + """Server communication link. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar state: The state. + :vartype state: str + :param partner_server: Required. The name of the partner server. + :type partner_server: str + :ivar location: Communication link location. + :vartype location: str + :ivar kind: Communication link kind. This property is used for Azure + Portal metadata. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'partner_server': {'required': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerCommunicationLink, self).__init__(**kwargs) + self.state = None + self.partner_server = kwargs.get('partner_server', None) + self.location = None + self.kind = None + + +class ServerConnectionPolicy(ProxyResource): + """A server secure connection policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Metadata used for the Azure portal experience. + :vartype kind: str + :ivar location: Resource location. + :vartype location: str + :param connection_type: Required. The server connection type. Possible + values include: 'Default', 'Proxy', 'Redirect' + :type connection_type: str or ~azure.mgmt.sql.models.ServerConnectionType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + 'connection_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'connection_type': {'key': 'properties.connectionType', 'type': 'ServerConnectionType'}, + } + + def __init__(self, **kwargs): + super(ServerConnectionPolicy, self).__init__(**kwargs) + self.kind = None + self.location = None + self.connection_type = kwargs.get('connection_type', None) + + +class ServerDnsAlias(ProxyResource): + """A server DNS alias. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar azure_dns_record: The fully qualified DNS record for alias + :vartype azure_dns_record: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'azure_dns_record': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'azure_dns_record': {'key': 'properties.azureDnsRecord', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerDnsAlias, self).__init__(**kwargs) + self.azure_dns_record = None + + +class ServerDnsAliasAcquisition(Model): + """A server DNS alias acquisition request. + + :param old_server_dns_alias_id: The id of the server alias that will be + acquired to point to this server instead. + :type old_server_dns_alias_id: str + """ + + _attribute_map = { + 'old_server_dns_alias_id': {'key': 'oldServerDnsAliasId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerDnsAliasAcquisition, self).__init__(**kwargs) + self.old_server_dns_alias_id = kwargs.get('old_server_dns_alias_id', None) + + +class ServerKey(ProxyResource): + """A server key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :type kind: str + :ivar location: Resource location. + :vartype location: str + :ivar subregion: Subregion of the server key. + :vartype subregion: str + :param server_key_type: Required. The server key type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :param uri: The URI of the server key. + :type uri: str + :param thumbprint: Thumbprint of the server key. + :type thumbprint: str + :param creation_date: The server key creation date. + :type creation_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'subregion': {'readonly': True}, + 'server_key_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'subregion': {'key': 'properties.subregion', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ServerKey, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + self.location = None + self.subregion = None + self.server_key_type = kwargs.get('server_key_type', None) + self.uri = kwargs.get('uri', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.creation_date = kwargs.get('creation_date', None) + + +class ServerSecurityAlertPolicy(ProxyResource): + """A server security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ServerSecurityAlertPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.disabled_alerts = kwargs.get('disabled_alerts', None) + self.email_addresses = kwargs.get('email_addresses', None) + self.email_account_admins = kwargs.get('email_account_admins', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.creation_time = None + + +class ServerUpdate(Model): + """An update request for an Azure SQL Database server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param administrator_login: Administrator username for the server. Once + created it cannot be changed. + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for server creation). + :type administrator_login_password: str + :param version: The version of the server. + :type version: str + :ivar state: The state of the server. + :vartype state: str + :ivar fully_qualified_domain_name: The fully qualified domain name of the + server. + :vartype fully_qualified_domain_name: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'state': {'readonly': True}, + 'fully_qualified_domain_name': {'readonly': True}, + } + + _attribute_map = { + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ServerUpdate, self).__init__(**kwargs) + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.version = kwargs.get('version', None) + self.state = None + self.fully_qualified_domain_name = None + self.tags = kwargs.get('tags', None) + + +class ServerUsage(Model): + """Represents server metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the server usage metric. + :vartype name: str + :ivar resource_name: The name of the resource. + :vartype resource_name: str + :ivar display_name: The metric display name. + :vartype display_name: str + :ivar current_value: The current value of the metric. + :vartype current_value: float + :ivar limit: The current limit of the metric. + :vartype limit: float + :ivar unit: The units of the metric. + :vartype unit: str + :ivar next_reset_time: The next reset time for the metric (ISO8601 + format). + :vartype next_reset_time: datetime + """ + + _validation = { + 'name': {'readonly': True}, + 'resource_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'next_reset_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ServerUsage, self).__init__(**kwargs) + self.name = None + self.resource_name = None + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + self.next_reset_time = None + + +class ServerVersionCapability(Model): + """The server capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The server version name. + :vartype name: str + :ivar supported_editions: The list of supported database editions. + :vartype supported_editions: + list[~azure.mgmt.sql.models.EditionCapability] + :ivar supported_elastic_pool_editions: The list of supported elastic pool + editions. + :vartype supported_elastic_pool_editions: + list[~azure.mgmt.sql.models.ElasticPoolEditionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_editions': {'readonly': True}, + 'supported_elastic_pool_editions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_editions': {'key': 'supportedEditions', 'type': '[EditionCapability]'}, + 'supported_elastic_pool_editions': {'key': 'supportedElasticPoolEditions', 'type': '[ElasticPoolEditionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerVersionCapability, self).__init__(**kwargs) + self.name = None + self.supported_editions = None + self.supported_elastic_pool_editions = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ServerVulnerabilityAssessment(ProxyResource): + """A server vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: Required. A blob storage container path to + hold the scan results (e.g. + https://myStorage.blob.core.windows.net/VaScans/). + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_container_path': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, **kwargs): + super(ServerVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = kwargs.get('storage_container_path', None) + self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.recurring_scans = kwargs.get('recurring_scans', None) + + +class ServiceObjective(ProxyResource): + """Represents a database service objective. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar service_objective_name: The name for the service objective. + :vartype service_objective_name: str + :ivar is_default: Gets whether the service level objective is the default + service objective. + :vartype is_default: bool + :ivar is_system: Gets whether the service level objective is a system + service objective. + :vartype is_system: bool + :ivar description: The description for the service level objective. + :vartype description: str + :ivar enabled: Gets whether the service level objective is enabled. + :vartype enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'service_objective_name': {'readonly': True}, + 'is_default': {'readonly': True}, + 'is_system': {'readonly': True}, + 'description': {'readonly': True}, + 'enabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'service_objective_name': {'key': 'properties.serviceObjectiveName', 'type': 'str'}, + 'is_default': {'key': 'properties.isDefault', 'type': 'bool'}, + 'is_system': {'key': 'properties.isSystem', 'type': 'bool'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ServiceObjective, self).__init__(**kwargs) + self.service_objective_name = None + self.is_default = None + self.is_system = None + self.description = None + self.enabled = None + + +class ServiceObjectiveCapability(Model): + """The service objectives capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique ID of the service objective. + :vartype id: str + :ivar name: The service objective name. + :vartype name: str + :ivar supported_max_sizes: The list of supported maximum database sizes. + :vartype supported_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar performance_level: The performance level. + :vartype performance_level: + ~azure.mgmt.sql.models.PerformanceLevelCapability + :ivar sku: The sku. + :vartype sku: ~azure.mgmt.sql.models.Sku + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar included_max_size: The included (free) max size. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'supported_max_sizes': {'readonly': True}, + 'performance_level': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceObjectiveCapability, self).__init__(**kwargs) + self.id = None + self.name = None + self.supported_max_sizes = None + self.performance_level = None + self.sku = None + self.supported_license_types = None + self.included_max_size = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ServiceTierAdvisor(ProxyResource): + """Represents a Service Tier Advisor. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar observation_period_start: The observation period start (ISO8601 + format). + :vartype observation_period_start: datetime + :ivar observation_period_end: The observation period start (ISO8601 + format). + :vartype observation_period_end: datetime + :ivar active_time_ratio: The activeTimeRatio for service tier advisor. + :vartype active_time_ratio: float + :ivar min_dtu: Gets or sets minDtu for service tier advisor. + :vartype min_dtu: float + :ivar avg_dtu: Gets or sets avgDtu for service tier advisor. + :vartype avg_dtu: float + :ivar max_dtu: Gets or sets maxDtu for service tier advisor. + :vartype max_dtu: float + :ivar max_size_in_gb: Gets or sets maxSizeInGB for service tier advisor. + :vartype max_size_in_gb: float + :ivar service_level_objective_usage_metrics: Gets or sets + serviceLevelObjectiveUsageMetrics for the service tier advisor. + :vartype service_level_objective_usage_metrics: + list[~azure.mgmt.sql.models.SloUsageMetric] + :ivar current_service_level_objective: Gets or sets + currentServiceLevelObjective for service tier advisor. + :vartype current_service_level_objective: str + :ivar current_service_level_objective_id: Gets or sets + currentServiceLevelObjectiveId for service tier advisor. + :vartype current_service_level_objective_id: str + :ivar usage_based_recommendation_service_level_objective: Gets or sets + usageBasedRecommendationServiceLevelObjective for service tier advisor. + :vartype usage_based_recommendation_service_level_objective: str + :ivar usage_based_recommendation_service_level_objective_id: Gets or sets + usageBasedRecommendationServiceLevelObjectiveId for service tier advisor. + :vartype usage_based_recommendation_service_level_objective_id: str + :ivar database_size_based_recommendation_service_level_objective: Gets or + sets databaseSizeBasedRecommendationServiceLevelObjective for service tier + advisor. + :vartype database_size_based_recommendation_service_level_objective: str + :ivar database_size_based_recommendation_service_level_objective_id: Gets + or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service + tier advisor. + :vartype database_size_based_recommendation_service_level_objective_id: + str + :ivar disaster_plan_based_recommendation_service_level_objective: Gets or + sets disasterPlanBasedRecommendationServiceLevelObjective for service tier + advisor. + :vartype disaster_plan_based_recommendation_service_level_objective: str + :ivar disaster_plan_based_recommendation_service_level_objective_id: Gets + or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service + tier advisor. + :vartype disaster_plan_based_recommendation_service_level_objective_id: + str + :ivar overall_recommendation_service_level_objective: Gets or sets + overallRecommendationServiceLevelObjective for service tier advisor. + :vartype overall_recommendation_service_level_objective: str + :ivar overall_recommendation_service_level_objective_id: Gets or sets + overallRecommendationServiceLevelObjectiveId for service tier advisor. + :vartype overall_recommendation_service_level_objective_id: str + :ivar confidence: Gets or sets confidence for service tier advisor. + :vartype confidence: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'observation_period_start': {'readonly': True}, + 'observation_period_end': {'readonly': True}, + 'active_time_ratio': {'readonly': True}, + 'min_dtu': {'readonly': True}, + 'avg_dtu': {'readonly': True}, + 'max_dtu': {'readonly': True}, + 'max_size_in_gb': {'readonly': True}, + 'service_level_objective_usage_metrics': {'readonly': True}, + 'current_service_level_objective': {'readonly': True}, + 'current_service_level_objective_id': {'readonly': True}, + 'usage_based_recommendation_service_level_objective': {'readonly': True}, + 'usage_based_recommendation_service_level_objective_id': {'readonly': True}, + 'database_size_based_recommendation_service_level_objective': {'readonly': True}, + 'database_size_based_recommendation_service_level_objective_id': {'readonly': True}, + 'disaster_plan_based_recommendation_service_level_objective': {'readonly': True}, + 'disaster_plan_based_recommendation_service_level_objective_id': {'readonly': True}, + 'overall_recommendation_service_level_objective': {'readonly': True}, + 'overall_recommendation_service_level_objective_id': {'readonly': True}, + 'confidence': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, + 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, + 'active_time_ratio': {'key': 'properties.activeTimeRatio', 'type': 'float'}, + 'min_dtu': {'key': 'properties.minDtu', 'type': 'float'}, + 'avg_dtu': {'key': 'properties.avgDtu', 'type': 'float'}, + 'max_dtu': {'key': 'properties.maxDtu', 'type': 'float'}, + 'max_size_in_gb': {'key': 'properties.maxSizeInGB', 'type': 'float'}, + 'service_level_objective_usage_metrics': {'key': 'properties.serviceLevelObjectiveUsageMetrics', 'type': '[SloUsageMetric]'}, + 'current_service_level_objective': {'key': 'properties.currentServiceLevelObjective', 'type': 'str'}, + 'current_service_level_objective_id': {'key': 'properties.currentServiceLevelObjectiveId', 'type': 'str'}, + 'usage_based_recommendation_service_level_objective': {'key': 'properties.usageBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'usage_based_recommendation_service_level_objective_id': {'key': 'properties.usageBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'database_size_based_recommendation_service_level_objective': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'database_size_based_recommendation_service_level_objective_id': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'disaster_plan_based_recommendation_service_level_objective': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'disaster_plan_based_recommendation_service_level_objective_id': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'overall_recommendation_service_level_objective': {'key': 'properties.overallRecommendationServiceLevelObjective', 'type': 'str'}, + 'overall_recommendation_service_level_objective_id': {'key': 'properties.overallRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'confidence': {'key': 'properties.confidence', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ServiceTierAdvisor, self).__init__(**kwargs) + self.observation_period_start = None + self.observation_period_end = None + self.active_time_ratio = None + self.min_dtu = None + self.avg_dtu = None + self.max_dtu = None + self.max_size_in_gb = None + self.service_level_objective_usage_metrics = None + self.current_service_level_objective = None + self.current_service_level_objective_id = None + self.usage_based_recommendation_service_level_objective = None + self.usage_based_recommendation_service_level_objective_id = None + self.database_size_based_recommendation_service_level_objective = None + self.database_size_based_recommendation_service_level_objective_id = None + self.disaster_plan_based_recommendation_service_level_objective = None + self.disaster_plan_based_recommendation_service_level_objective_id = None + self.overall_recommendation_service_level_objective = None + self.overall_recommendation_service_level_objective_id = None + self.confidence = None + + +class Sku(Model): + """The resource model definition representing SKU. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Ex - P3. It is typically a + letter+number code + :type name: str + :param tier: This field is required to be implemented by the Resource + Provider if the service has more than one tier, but is not required on a + PUT. + :type tier: str + :param size: The SKU size. When the name field is the combination of tier + and some other value, this would be the standalone code. + :type size: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :param capacity: If the SKU supports scale out/in then the capacity + integer should be included. If scale out/in is not possible for the + resource this may be omitted. + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.size = kwargs.get('size', None) + self.family = kwargs.get('family', None) + self.capacity = kwargs.get('capacity', None) + + +class SloUsageMetric(Model): + """A Slo Usage Metric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar service_level_objective: The serviceLevelObjective for SLO usage + metric. Possible values include: 'System', 'System0', 'System1', + 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', + 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', + 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', + 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', + 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', + 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', + 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', + 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' + :vartype service_level_objective: str or + ~azure.mgmt.sql.models.ServiceObjectiveName + :ivar service_level_objective_id: The serviceLevelObjectiveId for SLO + usage metric. + :vartype service_level_objective_id: str + :ivar in_range_time_ratio: Gets or sets inRangeTimeRatio for SLO usage + metric. + :vartype in_range_time_ratio: float + """ + + _validation = { + 'service_level_objective': {'readonly': True}, + 'service_level_objective_id': {'readonly': True}, + 'in_range_time_ratio': {'readonly': True}, + } + + _attribute_map = { + 'service_level_objective': {'key': 'serviceLevelObjective', 'type': 'str'}, + 'service_level_objective_id': {'key': 'serviceLevelObjectiveId', 'type': 'str'}, + 'in_range_time_ratio': {'key': 'inRangeTimeRatio', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(SloUsageMetric, self).__init__(**kwargs) + self.service_level_objective = None + self.service_level_objective_id = None + self.in_range_time_ratio = None + + +class SubscriptionUsage(ProxyResource): + """Usage Metric of a Subscription in a Location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar display_name: User-readable name of the metric. + :vartype display_name: str + :ivar current_value: Current value of the metric. + :vartype current_value: float + :ivar limit: Boundary value of the metric. + :vartype limit: float + :ivar unit: Unit of the metric. + :vartype unit: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'current_value': {'key': 'properties.currentValue', 'type': 'float'}, + 'limit': {'key': 'properties.limit', 'type': 'float'}, + 'unit': {'key': 'properties.unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubscriptionUsage, self).__init__(**kwargs) + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + + +class SyncAgent(ProxyResource): + """An Azure SQL Database sync agent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar sync_agent_name: Name of the sync agent. + :vartype sync_agent_name: str + :param sync_database_id: ARM resource id of the sync database in the sync + agent. + :type sync_database_id: str + :ivar last_alive_time: Last alive time of the sync agent. + :vartype last_alive_time: datetime + :ivar state: State of the sync agent. Possible values include: 'Online', + 'Offline', 'NeverConnected' + :vartype state: str or ~azure.mgmt.sql.models.SyncAgentState + :ivar is_up_to_date: If the sync agent version is up to date. + :vartype is_up_to_date: bool + :ivar expiry_time: Expiration time of the sync agent version. + :vartype expiry_time: datetime + :ivar version: Version of the sync agent. + :vartype version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sync_agent_name': {'readonly': True}, + 'last_alive_time': {'readonly': True}, + 'state': {'readonly': True}, + 'is_up_to_date': {'readonly': True}, + 'expiry_time': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sync_agent_name': {'key': 'properties.name', 'type': 'str'}, + 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, + 'last_alive_time': {'key': 'properties.lastAliveTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'is_up_to_date': {'key': 'properties.isUpToDate', 'type': 'bool'}, + 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncAgent, self).__init__(**kwargs) + self.sync_agent_name = None + self.sync_database_id = kwargs.get('sync_database_id', None) + self.last_alive_time = None + self.state = None + self.is_up_to_date = None + self.expiry_time = None + self.version = None + + +class SyncAgentKeyProperties(Model): + """Properties of an Azure SQL Database sync agent key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar sync_agent_key: Key of sync agent. + :vartype sync_agent_key: str + """ + + _validation = { + 'sync_agent_key': {'readonly': True}, + } + + _attribute_map = { + 'sync_agent_key': {'key': 'syncAgentKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncAgentKeyProperties, self).__init__(**kwargs) + self.sync_agent_key = None + + +class SyncAgentLinkedDatabase(ProxyResource): + """An Azure SQL Database sync agent linked database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_type: Type of the sync agent linked database. Possible + values include: 'AzureSqlDatabase', 'SqlServerDatabase' + :vartype database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType + :ivar database_id: Id of the sync agent linked database. + :vartype database_id: str + :ivar description: Description of the sync agent linked database. + :vartype description: str + :ivar server_name: Server name of the sync agent linked database. + :vartype server_name: str + :ivar database_name: Database name of the sync agent linked database. + :vartype database_name: str + :ivar user_name: User name of the sync agent linked database. + :vartype user_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_type': {'readonly': True}, + 'database_id': {'readonly': True}, + 'description': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncAgentLinkedDatabase, self).__init__(**kwargs) + self.database_type = None + self.database_id = None + self.description = None + self.server_name = None + self.database_name = None + self.user_name = None + + +class SyncDatabaseIdProperties(Model): + """Properties of the sync database id. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: ARM resource id of sync database. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncDatabaseIdProperties, self).__init__(**kwargs) + self.id = None + + +class SyncFullSchemaProperties(Model): + """Properties of the database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar tables: List of tables in the database full schema. + :vartype tables: list[~azure.mgmt.sql.models.SyncFullSchemaTable] + :ivar last_update_time: Last update time of the database schema. + :vartype last_update_time: datetime + """ + + _validation = { + 'tables': {'readonly': True}, + 'last_update_time': {'readonly': True}, + } + + _attribute_map = { + 'tables': {'key': 'tables', 'type': '[SyncFullSchemaTable]'}, + 'last_update_time': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(SyncFullSchemaProperties, self).__init__(**kwargs) + self.tables = None + self.last_update_time = None + + +class SyncFullSchemaTable(Model): + """Properties of the table in the database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar columns: List of columns in the table of database full schema. + :vartype columns: list[~azure.mgmt.sql.models.SyncFullSchemaTableColumn] + :ivar error_id: Error id of the table. + :vartype error_id: str + :ivar has_error: If there is error in the table. + :vartype has_error: bool + :ivar name: Name of the table. + :vartype name: str + :ivar quoted_name: Quoted name of the table. + :vartype quoted_name: str + """ + + _validation = { + 'columns': {'readonly': True}, + 'error_id': {'readonly': True}, + 'has_error': {'readonly': True}, + 'name': {'readonly': True}, + 'quoted_name': {'readonly': True}, + } + + _attribute_map = { + 'columns': {'key': 'columns', 'type': '[SyncFullSchemaTableColumn]'}, + 'error_id': {'key': 'errorId', 'type': 'str'}, + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncFullSchemaTable, self).__init__(**kwargs) + self.columns = None + self.error_id = None + self.has_error = None + self.name = None + self.quoted_name = None + + +class SyncFullSchemaTableColumn(Model): + """Properties of the column in the table of database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar data_size: Data size of the column. + :vartype data_size: str + :ivar data_type: Data type of the column. + :vartype data_type: str + :ivar error_id: Error id of the column. + :vartype error_id: str + :ivar has_error: If there is error in the table. + :vartype has_error: bool + :ivar is_primary_key: If it is the primary key of the table. + :vartype is_primary_key: bool + :ivar name: Name of the column. + :vartype name: str + :ivar quoted_name: Quoted name of the column. + :vartype quoted_name: str + """ + + _validation = { + 'data_size': {'readonly': True}, + 'data_type': {'readonly': True}, + 'error_id': {'readonly': True}, + 'has_error': {'readonly': True}, + 'is_primary_key': {'readonly': True}, + 'name': {'readonly': True}, + 'quoted_name': {'readonly': True}, + } + + _attribute_map = { + 'data_size': {'key': 'dataSize', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + 'error_id': {'key': 'errorId', 'type': 'str'}, + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'is_primary_key': {'key': 'isPrimaryKey', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncFullSchemaTableColumn, self).__init__(**kwargs) + self.data_size = None + self.data_type = None + self.error_id = None + self.has_error = None + self.is_primary_key = None + self.name = None + self.quoted_name = None + + +class SyncGroup(ProxyResource): + """An Azure SQL Database sync group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param interval: Sync interval of the sync group. + :type interval: int + :ivar last_sync_time: Last sync time of the sync group. + :vartype last_sync_time: datetime + :param conflict_resolution_policy: Conflict resolution policy of the sync + group. Possible values include: 'HubWin', 'MemberWin' + :type conflict_resolution_policy: str or + ~azure.mgmt.sql.models.SyncConflictResolutionPolicy + :param sync_database_id: ARM resource id of the sync database in the sync + group. + :type sync_database_id: str + :param hub_database_user_name: User name for the sync group hub database + credential. + :type hub_database_user_name: str + :param hub_database_password: Password for the sync group hub database + credential. + :type hub_database_password: str + :ivar sync_state: Sync state of the sync group. Possible values include: + 'NotReady', 'Error', 'Warning', 'Progressing', 'Good' + :vartype sync_state: str or ~azure.mgmt.sql.models.SyncGroupState + :param schema: Sync schema of the sync group. + :type schema: ~azure.mgmt.sql.models.SyncGroupSchema + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_sync_time': {'readonly': True}, + 'sync_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'interval': {'key': 'properties.interval', 'type': 'int'}, + 'last_sync_time': {'key': 'properties.lastSyncTime', 'type': 'iso-8601'}, + 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'str'}, + 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, + 'hub_database_user_name': {'key': 'properties.hubDatabaseUserName', 'type': 'str'}, + 'hub_database_password': {'key': 'properties.hubDatabasePassword', 'type': 'str'}, + 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, + 'schema': {'key': 'properties.schema', 'type': 'SyncGroupSchema'}, + } + + def __init__(self, **kwargs): + super(SyncGroup, self).__init__(**kwargs) + self.interval = kwargs.get('interval', None) + self.last_sync_time = None + self.conflict_resolution_policy = kwargs.get('conflict_resolution_policy', None) + self.sync_database_id = kwargs.get('sync_database_id', None) + self.hub_database_user_name = kwargs.get('hub_database_user_name', None) + self.hub_database_password = kwargs.get('hub_database_password', None) + self.sync_state = None + self.schema = kwargs.get('schema', None) + + +class SyncGroupLogProperties(Model): + """Properties of an Azure SQL Database sync group log. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar timestamp: Timestamp of the sync group log. + :vartype timestamp: datetime + :ivar type: Type of the sync group log. Possible values include: 'All', + 'Error', 'Warning', 'Success' + :vartype type: str or ~azure.mgmt.sql.models.SyncGroupLogType + :ivar source: Source of the sync group log. + :vartype source: str + :ivar details: Details of the sync group log. + :vartype details: str + :ivar tracing_id: TracingId of the sync group log. + :vartype tracing_id: str + :ivar operation_status: OperationStatus of the sync group log. + :vartype operation_status: str + """ + + _validation = { + 'timestamp': {'readonly': True}, + 'type': {'readonly': True}, + 'source': {'readonly': True}, + 'details': {'readonly': True}, + 'tracing_id': {'readonly': True}, + 'operation_status': {'readonly': True}, + } + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, + 'tracing_id': {'key': 'tracingId', 'type': 'str'}, + 'operation_status': {'key': 'operationStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncGroupLogProperties, self).__init__(**kwargs) + self.timestamp = None + self.type = None + self.source = None + self.details = None + self.tracing_id = None + self.operation_status = None + + +class SyncGroupSchema(Model): + """Properties of sync group schema. + + :param tables: List of tables in sync group schema. + :type tables: list[~azure.mgmt.sql.models.SyncGroupSchemaTable] + :param master_sync_member_name: Name of master sync member where the + schema is from. + :type master_sync_member_name: str + """ + + _attribute_map = { + 'tables': {'key': 'tables', 'type': '[SyncGroupSchemaTable]'}, + 'master_sync_member_name': {'key': 'masterSyncMemberName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncGroupSchema, self).__init__(**kwargs) + self.tables = kwargs.get('tables', None) + self.master_sync_member_name = kwargs.get('master_sync_member_name', None) + + +class SyncGroupSchemaTable(Model): + """Properties of table in sync group schema. + + :param columns: List of columns in sync group schema. + :type columns: list[~azure.mgmt.sql.models.SyncGroupSchemaTableColumn] + :param quoted_name: Quoted name of sync group schema table. + :type quoted_name: str + """ + + _attribute_map = { + 'columns': {'key': 'columns', 'type': '[SyncGroupSchemaTableColumn]'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncGroupSchemaTable, self).__init__(**kwargs) + self.columns = kwargs.get('columns', None) + self.quoted_name = kwargs.get('quoted_name', None) + + +class SyncGroupSchemaTableColumn(Model): + """Properties of column in sync group table. + + :param quoted_name: Quoted name of sync group table column. + :type quoted_name: str + :param data_size: Data size of the column. + :type data_size: str + :param data_type: Data type of the column. + :type data_type: str + """ + + _attribute_map = { + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + 'data_size': {'key': 'dataSize', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncGroupSchemaTableColumn, self).__init__(**kwargs) + self.quoted_name = kwargs.get('quoted_name', None) + self.data_size = kwargs.get('data_size', None) + self.data_type = kwargs.get('data_type', None) + + +class SyncMember(ProxyResource): + """An Azure SQL Database sync member. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param database_type: Database type of the sync member. Possible values + include: 'AzureSqlDatabase', 'SqlServerDatabase' + :type database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType + :param sync_agent_id: ARM resource id of the sync agent in the sync + member. + :type sync_agent_id: str + :param sql_server_database_id: SQL Server database id of the sync member. + :type sql_server_database_id: str + :param server_name: Server name of the member database in the sync member + :type server_name: str + :param database_name: Database name of the member database in the sync + member. + :type database_name: str + :param user_name: User name of the member database in the sync member. + :type user_name: str + :param password: Password of the member database in the sync member. + :type password: str + :param sync_direction: Sync direction of the sync member. Possible values + include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember' + :type sync_direction: str or ~azure.mgmt.sql.models.SyncDirection + :ivar sync_state: Sync state of the sync member. Possible values include: + 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', + 'DisabledTombstoneCleanup', 'DisabledBackupRestore', + 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', + 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', + 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', + 'ReprovisionFailed', 'UnReprovisioned' + :vartype sync_state: str or ~azure.mgmt.sql.models.SyncMemberState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sync_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, + 'sync_agent_id': {'key': 'properties.syncAgentId', 'type': 'str'}, + 'sql_server_database_id': {'key': 'properties.sqlServerDatabaseId', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'sync_direction': {'key': 'properties.syncDirection', 'type': 'str'}, + 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncMember, self).__init__(**kwargs) + self.database_type = kwargs.get('database_type', None) + self.sync_agent_id = kwargs.get('sync_agent_id', None) + self.sql_server_database_id = kwargs.get('sql_server_database_id', None) + self.server_name = kwargs.get('server_name', None) + self.database_name = kwargs.get('database_name', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.sync_direction = kwargs.get('sync_direction', None) + self.sync_state = None + + +class TdeCertificate(ProxyResource): + """A TDE certificate that can be uploaded into a server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param private_blob: Required. The base64 encoded certificate private + blob. + :type private_blob: str + :param cert_password: The certificate password. + :type cert_password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'private_blob': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_blob': {'key': 'properties.privateBlob', 'type': 'str'}, + 'cert_password': {'key': 'properties.certPassword', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TdeCertificate, self).__init__(**kwargs) + self.private_blob = kwargs.get('private_blob', None) + self.cert_password = kwargs.get('cert_password', None) + + +class TransparentDataEncryption(ProxyResource): + """Represents a database transparent data encryption configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :param status: The status of the database transparent data encryption. + Possible values include: 'Enabled', 'Disabled' + :type status: str or + ~azure.mgmt.sql.models.TransparentDataEncryptionStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'TransparentDataEncryptionStatus'}, + } + + def __init__(self, **kwargs): + super(TransparentDataEncryption, self).__init__(**kwargs) + self.location = None + self.status = kwargs.get('status', None) + + +class TransparentDataEncryptionActivity(ProxyResource): + """Represents a database transparent data encryption Scan. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar status: The status of the database. Possible values include: + 'Encrypting', 'Decrypting' + :vartype status: str or + ~azure.mgmt.sql.models.TransparentDataEncryptionActivityStatus + :ivar percent_complete: The percent complete of the transparent data + encryption scan for a database. + :vartype percent_complete: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'status': {'readonly': True}, + 'percent_complete': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(TransparentDataEncryptionActivity, self).__init__(**kwargs) + self.location = None + self.status = None + self.percent_complete = None + + +class Usage(Model): + """ARM usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: ~azure.mgmt.sql.models.Name + :ivar type: Resource type. + :vartype type: str + :ivar unit: Usage unit. + :vartype unit: str + :ivar current_value: Usage current value. + :vartype current_value: int + :ivar limit: Usage limit. + :vartype limit: int + :ivar requested_limit: Usage requested limit. + :vartype requested_limit: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'unit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'requested_limit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'Name'}, + 'type': {'key': 'type', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'int'}, + 'requested_limit': {'key': 'requestedLimit', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(Usage, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.unit = None + self.current_value = None + self.limit = None + self.requested_limit = None + + +class VirtualCluster(TrackedResource): + """An Azure SQL virtual cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar subnet_id: Subnet resource ID for the virtual cluster. + :vartype subnet_id: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :ivar child_resources: List of resources in this virtual cluster. + :vartype child_resources: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'subnet_id': {'readonly': True}, + 'child_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'family': {'key': 'properties.family', 'type': 'str'}, + 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualCluster, self).__init__(**kwargs) + self.subnet_id = None + self.family = kwargs.get('family', None) + self.child_resources = None + + +class VirtualClusterUpdate(Model): + """An update request for an Azure SQL Database virtual cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar subnet_id: Subnet resource ID for the virtual cluster. + :vartype subnet_id: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :ivar child_resources: List of resources in this virtual cluster. + :vartype child_resources: list[str] + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'subnet_id': {'readonly': True}, + 'child_resources': {'readonly': True}, + } + + _attribute_map = { + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'family': {'key': 'properties.family', 'type': 'str'}, + 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(VirtualClusterUpdate, self).__init__(**kwargs) + self.subnet_id = None + self.family = kwargs.get('family', None) + self.child_resources = None + self.tags = kwargs.get('tags', None) + + +class VirtualNetworkRule(ProxyResource): + """A virtual network rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param virtual_network_subnet_id: Required. The ARM resource id of the + virtual network subnet. + :type virtual_network_subnet_id: str + :param ignore_missing_vnet_service_endpoint: Create firewall rule before + the virtual network has vnet service endpoint enabled. + :type ignore_missing_vnet_service_endpoint: bool + :ivar state: Virtual Network Rule State. Possible values include: + 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' + :vartype state: str or ~azure.mgmt.sql.models.VirtualNetworkRuleState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'virtual_network_subnet_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, + 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkRule, self).__init__(**kwargs) + self.virtual_network_subnet_id = kwargs.get('virtual_network_subnet_id', None) + self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) + self.state = None + + +class VulnerabilityAssessmentRecurringScansProperties(Model): + """Properties of a Vulnerability Assessment recurring scans. + + :param is_enabled: Recurring scans state. + :type is_enabled: bool + :param email_subscription_admins: Specifies that the schedule scan + notification will be is sent to the subscription administrators. Default + value: True . + :type email_subscription_admins: bool + :param emails: Specifies an array of e-mail addresses to which the scan + notification is sent. + :type emails: list[str] + """ + + _attribute_map = { + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'}, + 'emails': {'key': 'emails', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs) + self.is_enabled = kwargs.get('is_enabled', None) + self.email_subscription_admins = kwargs.get('email_subscription_admins', True) + self.emails = kwargs.get('emails', None) + + +class VulnerabilityAssessmentScanError(Model): + """Properties of a vulnerability assessment scan error. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VulnerabilityAssessmentScanError, self).__init__(**kwargs) + self.code = None + self.message = None + + +class VulnerabilityAssessmentScanRecord(ProxyResource): + """A vulnerability assessment scan record. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar scan_id: The scan ID. + :vartype scan_id: str + :ivar trigger_type: The scan trigger type. Possible values include: + 'OnDemand', 'Recurring' + :vartype trigger_type: str or + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanTriggerType + :ivar state: The scan status. Possible values include: 'Passed', 'Failed', + 'FailedToRun', 'InProgress' + :vartype state: str or + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanState + :ivar start_time: The scan start time (UTC). + :vartype start_time: datetime + :ivar end_time: The scan end time (UTC). + :vartype end_time: datetime + :ivar errors: The scan errors. + :vartype errors: + list[~azure.mgmt.sql.models.VulnerabilityAssessmentScanError] + :ivar storage_container_path: The scan results storage container path. + :vartype storage_container_path: str + :ivar number_of_failed_security_checks: The number of failed security + checks. + :vartype number_of_failed_security_checks: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'scan_id': {'readonly': True}, + 'trigger_type': {'readonly': True}, + 'state': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'errors': {'readonly': True}, + 'storage_container_path': {'readonly': True}, + 'number_of_failed_security_checks': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'scan_id': {'key': 'properties.scanId', 'type': 'str'}, + 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'errors': {'key': 'properties.errors', 'type': '[VulnerabilityAssessmentScanError]'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'number_of_failed_security_checks': {'key': 'properties.numberOfFailedSecurityChecks', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(VulnerabilityAssessmentScanRecord, self).__init__(**kwargs) + self.scan_id = None + self.trigger_type = None + self.state = None + self.start_time = None + self.end_time = None + self.errors = None + self.storage_container_path = None + self.number_of_failed_security_checks = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py new file mode 100644 index 000000000000..24ba7183e418 --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py @@ -0,0 +1,8891 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AutomaticTuningOptions(Model): + """Automatic tuning properties for individual advisors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param desired_state: Automatic tuning option desired state. Possible + values include: 'Off', 'On', 'Default' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired + :ivar actual_state: Automatic tuning option actual state. Possible values + include: 'Off', 'On' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual + :ivar reason_code: Reason code if desired and actual state are different. + :vartype reason_code: int + :ivar reason_desc: Reason description if desired and actual state are + different. Possible values include: 'Default', 'Disabled', + 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', + 'QueryStoreReadOnly', 'NotSupported' + :vartype reason_desc: str or + ~azure.mgmt.sql.models.AutomaticTuningDisabledReason + """ + + _validation = { + 'actual_state': {'readonly': True}, + 'reason_code': {'readonly': True}, + 'reason_desc': {'readonly': True}, + } + + _attribute_map = { + 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, + 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, + 'reason_code': {'key': 'reasonCode', 'type': 'int'}, + 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningDisabledReason'}, + } + + def __init__(self, *, desired_state=None, **kwargs) -> None: + super(AutomaticTuningOptions, self).__init__(**kwargs) + self.desired_state = desired_state + self.actual_state = None + self.reason_code = None + self.reason_desc = None + + +class AutomaticTuningServerOptions(Model): + """Automatic tuning properties for individual advisors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param desired_state: Automatic tuning option desired state. Possible + values include: 'Off', 'On', 'Default' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired + :ivar actual_state: Automatic tuning option actual state. Possible values + include: 'Off', 'On' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual + :ivar reason_code: Reason code if desired and actual state are different. + :vartype reason_code: int + :ivar reason_desc: Reason description if desired and actual state are + different. Possible values include: 'Default', 'Disabled', + 'AutoConfigured' + :vartype reason_desc: str or + ~azure.mgmt.sql.models.AutomaticTuningServerReason + """ + + _validation = { + 'actual_state': {'readonly': True}, + 'reason_code': {'readonly': True}, + 'reason_desc': {'readonly': True}, + } + + _attribute_map = { + 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, + 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, + 'reason_code': {'key': 'reasonCode', 'type': 'int'}, + 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningServerReason'}, + } + + def __init__(self, *, desired_state=None, **kwargs) -> None: + super(AutomaticTuningServerOptions, self).__init__(**kwargs) + self.desired_state = desired_state + self.actual_state = None + self.reason_code = None + self.reason_desc = None + + +class Resource(Model): + """ARM resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ProxyResource(Resource): + """ARM proxy resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) + + +class BackupLongTermRetentionPolicy(ProxyResource): + """A long term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param weekly_retention: The weekly retention policy for an LTR backup in + an ISO 8601 format. + :type weekly_retention: str + :param monthly_retention: The monthly retention policy for an LTR backup + in an ISO 8601 format. + :type monthly_retention: str + :param yearly_retention: The yearly retention policy for an LTR backup in + an ISO 8601 format. + :type yearly_retention: str + :param week_of_year: The week of year to take the yearly backup in an ISO + 8601 format. + :type week_of_year: int + """ + + _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'}, + 'weekly_retention': {'key': 'properties.weeklyRetention', 'type': 'str'}, + 'monthly_retention': {'key': 'properties.monthlyRetention', 'type': 'str'}, + 'yearly_retention': {'key': 'properties.yearlyRetention', 'type': 'str'}, + 'week_of_year': {'key': 'properties.weekOfYear', 'type': 'int'}, + } + + def __init__(self, *, weekly_retention: str=None, monthly_retention: str=None, yearly_retention: str=None, week_of_year: int=None, **kwargs) -> None: + super(BackupLongTermRetentionPolicy, self).__init__(**kwargs) + self.weekly_retention = weekly_retention + self.monthly_retention = monthly_retention + self.yearly_retention = yearly_retention + self.week_of_year = week_of_year + + +class BackupShortTermRetentionPolicy(ProxyResource): + """A short term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param retention_days: The backup retention period in days. This is how + many days Point-in-Time Restore will be supported. + :type retention_days: int + """ + + _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'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + } + + def __init__(self, *, retention_days: int=None, **kwargs) -> None: + super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) + self.retention_days = retention_days + + +class CheckNameAvailabilityRequest(Model): + """A request to check whether the specified name for a resource is available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name whose availability is to be checked. + :type name: str + :ivar type: Required. The type of resource that is used as the scope of + the availability check. Default value: "Microsoft.Sql/servers" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.Sql/servers" + + def __init__(self, *, name: str, **kwargs) -> None: + super(CheckNameAvailabilityRequest, self).__init__(**kwargs) + self.name = name + + +class CheckNameAvailabilityResponse(Model): + """A response indicating whether the specified name for a resource is + available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar available: True if the name is available, otherwise false. + :vartype available: bool + :ivar message: A message explaining why the name is unavailable. Will be + null if the name is available. + :vartype message: str + :ivar name: The name whose availability was checked. + :vartype name: str + :ivar reason: The reason code explaining why the name is unavailable. Will + be null if the name is available. Possible values include: 'Invalid', + 'AlreadyExists' + :vartype reason: str or ~azure.mgmt.sql.models.CheckNameAvailabilityReason + """ + + _validation = { + 'available': {'readonly': True}, + 'message': {'readonly': True}, + 'name': {'readonly': True}, + 'reason': {'readonly': True}, + } + + _attribute_map = { + 'available': {'key': 'available', 'type': 'bool'}, + 'message': {'key': 'message', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'CheckNameAvailabilityReason'}, + } + + def __init__(self, **kwargs) -> None: + super(CheckNameAvailabilityResponse, self).__init__(**kwargs) + self.available = None + self.message = None + self.name = None + self.reason = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class CompleteDatabaseRestoreDefinition(Model): + """Contains the information necessary to perform a complete database restore + operation. + + All required parameters must be populated in order to send to Azure. + + :param last_backup_name: Required. The last backup name to apply + :type last_backup_name: str + """ + + _validation = { + 'last_backup_name': {'required': True}, + } + + _attribute_map = { + 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, + } + + def __init__(self, *, last_backup_name: str, **kwargs) -> None: + super(CompleteDatabaseRestoreDefinition, self).__init__(**kwargs) + self.last_backup_name = last_backup_name + + +class CreateDatabaseRestorePointDefinition(Model): + """Contains the information necessary to perform a create database restore + point operation. + + All required parameters must be populated in order to send to Azure. + + :param restore_point_label: Required. The restore point label to apply + :type restore_point_label: str + """ + + _validation = { + 'restore_point_label': {'required': True}, + } + + _attribute_map = { + 'restore_point_label': {'key': 'restorePointLabel', 'type': 'str'}, + } + + def __init__(self, *, restore_point_label: str, **kwargs) -> None: + super(CreateDatabaseRestorePointDefinition, self).__init__(**kwargs) + self.restore_point_label = restore_point_label + + +class TrackedResource(Resource): + """ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.location = location + self.tags = tags + + +class Database(TrackedResource): + """A database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The database SKU. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location + ```` + :type sku: ~azure.mgmt.sql.models.Sku + :ivar kind: Kind of database. This is metadata used for the Azure portal + experience. + :vartype kind: str + :ivar managed_by: Resource that manages the database. + :vartype managed_by: str + :param create_mode: Specifies the mode of database creation. + Default: regular database creation. + Copy: creates a database as a copy of an existing database. + sourceDatabaseId must be specified as the resource ID of the source + database. + Secondary: creates a database as a secondary replica of an existing + database. sourceDatabaseId must be specified as the resource ID of the + existing primary database. + PointInTimeRestore: Creates a database by restoring a point in time backup + of an existing database. sourceDatabaseId must be specified as the + resource ID of the existing database, and restorePointInTime must be + specified. + Recovery: Creates a database by restoring a geo-replicated backup. + sourceDatabaseId must be specified as the recoverable database resource ID + to restore. + Restore: Creates a database by restoring a backup of a deleted database. + sourceDatabaseId must be specified. If sourceDatabaseId is the database's + original resource ID, then sourceDatabaseDeletionDate must be specified. + Otherwise sourceDatabaseId must be the restorable dropped database + resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime + may also be specified to restore from an earlier point in time. + RestoreLongTermRetentionBackup: Creates a database by restoring from a + long term retention vault. recoveryServicesRecoveryPointResourceId must be + specified as the recovery point resource ID. + Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for + DataWarehouse edition. Possible values include: 'Default', 'Copy', + 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', + 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', + 'RestoreLongTermRetentionBackup', 'OnlineSecondary' + :type create_mode: str or ~azure.mgmt.sql.models.CreateMode + :param collation: The collation of the database. + :type collation: str + :param max_size_bytes: The max size of the database expressed in bytes. + :type max_size_bytes: long + :param sample_name: The name of the sample schema to apply when creating + this database. Possible values include: 'AdventureWorksLT', + 'WideWorldImportersStd', 'WideWorldImportersFull' + :type sample_name: str or ~azure.mgmt.sql.models.SampleName + :param elastic_pool_id: The resource identifier of the elastic pool + containing this database. + :type elastic_pool_id: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :ivar status: The status of the database. Possible values include: + 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', + 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', + 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', + 'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers', + 'OnlineChangingDwPerformanceTiers' + :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus + :ivar database_id: The ID of the database. + :vartype database_id: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar current_service_objective_name: The current service level objective + name of the database. + :vartype current_service_objective_name: str + :ivar requested_service_objective_name: The requested service level + objective name of the database. + :vartype requested_service_objective_name: str + :ivar default_secondary_location: The default secondary region for this + database. + :vartype default_secondary_location: str + :ivar failover_group_id: Failover Group resource identifier that this + database belongs to. + :vartype failover_group_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param source_database_deletion_date: Specifies the time that the database + was deleted. + :type source_database_deletion_date: datetime + :param recovery_services_recovery_point_id: The resource identifier of the + recovery point associated with create operation of this database. + :type recovery_services_recovery_point_id: str + :param long_term_retention_backup_resource_id: The resource identifier of + the long term retention backup associated with create operation of this + database. + :type long_term_retention_backup_resource_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param restorable_dropped_database_id: The resource identifier of the + restorable dropped database associated with create operation of this + database. + :type restorable_dropped_database_id: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param zone_redundant: Whether or not this database is zone redundant, + which means the replicas of this database will be spread across multiple + availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this database. Possible + values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType + :ivar max_log_size_bytes: The max log size for this database. + :vartype max_log_size_bytes: long + :ivar earliest_restore_date: This records the earliest start date and time + that restore is available for this database (ISO8601 format). + :vartype earliest_restore_date: datetime + :param read_scale: The state of read-only routing. If enabled, connections + that have application intent set to readonly in their connection string + may be routed to a readonly secondary replica in the same region. Possible + values include: 'Enabled', 'Disabled' + :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale + :ivar current_sku: The name and tier of the SKU. + :vartype current_sku: ~azure.mgmt.sql.models.Sku + :param auto_pause_delay: Time in minutes after which database is + automatically paused. A value of -1 means that automatic pause is disabled + :type auto_pause_delay: int + :param min_capacity: Minimal capacity that database will always have + allocated, if not paused + :type min_capacity: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'managed_by': {'readonly': True}, + 'status': {'readonly': True}, + 'database_id': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'current_service_objective_name': {'readonly': True}, + 'requested_service_objective_name': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + 'max_log_size_bytes': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'current_sku': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, + 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, + 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, + 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, + 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, + 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, + 'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'}, + 'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'}, + } + + def __init__(self, *, location: str, tags=None, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, auto_pause_delay: int=None, min_capacity: float=None, **kwargs) -> None: + super(Database, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.kind = None + self.managed_by = None + self.create_mode = create_mode + self.collation = collation + self.max_size_bytes = max_size_bytes + self.sample_name = sample_name + self.elastic_pool_id = elastic_pool_id + self.source_database_id = source_database_id + self.status = None + self.database_id = None + self.creation_date = None + self.current_service_objective_name = None + self.requested_service_objective_name = None + self.default_secondary_location = None + self.failover_group_id = None + self.restore_point_in_time = restore_point_in_time + self.source_database_deletion_date = source_database_deletion_date + self.recovery_services_recovery_point_id = recovery_services_recovery_point_id + self.long_term_retention_backup_resource_id = long_term_retention_backup_resource_id + self.recoverable_database_id = recoverable_database_id + self.restorable_dropped_database_id = restorable_dropped_database_id + self.catalog_collation = catalog_collation + self.zone_redundant = zone_redundant + self.license_type = license_type + self.max_log_size_bytes = None + self.earliest_restore_date = None + self.read_scale = read_scale + self.current_sku = None + self.auto_pause_delay = auto_pause_delay + self.min_capacity = min_capacity + + +class DatabaseAutomaticTuning(ProxyResource): + """Database-level Automatic Tuning. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param desired_state: Automatic tuning desired state. Possible values + include: 'Inherit', 'Custom', 'Auto', 'Unspecified' + :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode + :ivar actual_state: Automatic tuning actual state. Possible values + include: 'Inherit', 'Custom', 'Auto', 'Unspecified' + :vartype actual_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode + :param options: Automatic tuning options definition. + :type options: dict[str, ~azure.mgmt.sql.models.AutomaticTuningOptions] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'actual_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningMode'}, + 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningMode'}, + 'options': {'key': 'properties.options', 'type': '{AutomaticTuningOptions}'}, + } + + def __init__(self, *, desired_state=None, options=None, **kwargs) -> None: + super(DatabaseAutomaticTuning, self).__init__(**kwargs) + self.desired_state = desired_state + self.actual_state = None + self.options = options + + +class DatabaseBlobAuditingPolicy(ProxyResource): + """A database blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Resource kind. + :vartype kind: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: + super(DatabaseBlobAuditingPolicy, self).__init__(**kwargs) + self.kind = None + self.state = state + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.audit_actions_and_groups = audit_actions_and_groups + self.storage_account_subscription_id = storage_account_subscription_id + self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use + self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + + +class DatabaseOperation(ProxyResource): + """A database operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_name: The name of the database the operation is being + performed on. + :vartype database_name: str + :ivar operation: The name of operation. + :vartype operation: str + :ivar operation_friendly_name: The friendly name of operation. + :vartype operation_friendly_name: str + :ivar percent_complete: The percentage of the operation completed. + :vartype percent_complete: int + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar start_time: The operation start time. + :vartype start_time: datetime + :ivar state: The operation state. Possible values include: 'Pending', + 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', 'Cancelled' + :vartype state: str or ~azure.mgmt.sql.models.ManagementOperationState + :ivar error_code: The operation error code. + :vartype error_code: int + :ivar error_description: The operation error description. + :vartype error_description: str + :ivar error_severity: The operation error severity. + :vartype error_severity: int + :ivar is_user_error: Whether or not the error is a user error. + :vartype is_user_error: bool + :ivar estimated_completion_time: The estimated completion time of the + operation. + :vartype estimated_completion_time: datetime + :ivar description: The operation description. + :vartype description: str + :ivar is_cancellable: Whether the operation can be cancelled. + :vartype is_cancellable: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_name': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_friendly_name': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_description': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'is_user_error': {'readonly': True}, + 'estimated_completion_time': {'readonly': True}, + 'description': {'readonly': True}, + 'is_cancellable': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, + 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(DatabaseOperation, self).__init__(**kwargs) + self.database_name = None + self.operation = None + self.operation_friendly_name = None + self.percent_complete = None + self.server_name = None + self.start_time = None + self.state = None + self.error_code = None + self.error_description = None + self.error_severity = None + self.is_user_error = None + self.estimated_completion_time = None + self.description = None + self.is_cancellable = None + + +class DatabaseSecurityAlertPolicy(ProxyResource): + """Contains information about a database Threat Detection policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar kind: Resource kind. + :vartype kind: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint and storageAccountAccessKey are required. + Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies the semicolon-separated list of alerts + that are disabled, or empty string to disable no alerts. Possible values: + Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; + Data_Exfiltration; Unsafe_Action. + :type disabled_alerts: str + :param email_addresses: Specifies the semicolon-separated list of e-mail + addresses to which the alert is sent. + :type email_addresses: str + :param email_account_admins: Specifies that the alert is sent to the + account administrators. Possible values include: 'Enabled', 'Disabled' + :type email_account_admins: str or + ~azure.mgmt.sql.models.SecurityAlertPolicyEmailAccountAdmins + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. If state is Enabled, storageEndpoint is + required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. If state is Enabled, + storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :param use_server_default: Specifies whether to use the default server + policy. Possible values include: 'Enabled', 'Disabled' + :type use_server_default: str or + ~azure.mgmt.sql.models.SecurityAlertPolicyUseServerDefault + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': 'str'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': 'str'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'SecurityAlertPolicyEmailAccountAdmins'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'use_server_default': {'key': 'properties.useServerDefault', 'type': 'SecurityAlertPolicyUseServerDefault'}, + } + + def __init__(self, *, state, location: str=None, disabled_alerts: str=None, email_addresses: str=None, email_account_admins=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, use_server_default=None, **kwargs) -> None: + super(DatabaseSecurityAlertPolicy, self).__init__(**kwargs) + self.location = location + self.kind = None + self.state = state + self.disabled_alerts = disabled_alerts + self.email_addresses = email_addresses + self.email_account_admins = email_account_admins + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.use_server_default = use_server_default + + +class DatabaseUpdate(Model): + """A database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param create_mode: Specifies the mode of database creation. + Default: regular database creation. + Copy: creates a database as a copy of an existing database. + sourceDatabaseId must be specified as the resource ID of the source + database. + Secondary: creates a database as a secondary replica of an existing + database. sourceDatabaseId must be specified as the resource ID of the + existing primary database. + PointInTimeRestore: Creates a database by restoring a point in time backup + of an existing database. sourceDatabaseId must be specified as the + resource ID of the existing database, and restorePointInTime must be + specified. + Recovery: Creates a database by restoring a geo-replicated backup. + sourceDatabaseId must be specified as the recoverable database resource ID + to restore. + Restore: Creates a database by restoring a backup of a deleted database. + sourceDatabaseId must be specified. If sourceDatabaseId is the database's + original resource ID, then sourceDatabaseDeletionDate must be specified. + Otherwise sourceDatabaseId must be the restorable dropped database + resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime + may also be specified to restore from an earlier point in time. + RestoreLongTermRetentionBackup: Creates a database by restoring from a + long term retention vault. recoveryServicesRecoveryPointResourceId must be + specified as the recovery point resource ID. + Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for + DataWarehouse edition. Possible values include: 'Default', 'Copy', + 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', + 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', + 'RestoreLongTermRetentionBackup', 'OnlineSecondary' + :type create_mode: str or ~azure.mgmt.sql.models.CreateMode + :param collation: The collation of the database. + :type collation: str + :param max_size_bytes: The max size of the database expressed in bytes. + :type max_size_bytes: long + :param sample_name: The name of the sample schema to apply when creating + this database. Possible values include: 'AdventureWorksLT', + 'WideWorldImportersStd', 'WideWorldImportersFull' + :type sample_name: str or ~azure.mgmt.sql.models.SampleName + :param elastic_pool_id: The resource identifier of the elastic pool + containing this database. + :type elastic_pool_id: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :ivar status: The status of the database. Possible values include: + 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', + 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', + 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', + 'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers', + 'OnlineChangingDwPerformanceTiers' + :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus + :ivar database_id: The ID of the database. + :vartype database_id: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar current_service_objective_name: The current service level objective + name of the database. + :vartype current_service_objective_name: str + :ivar requested_service_objective_name: The requested service level + objective name of the database. + :vartype requested_service_objective_name: str + :ivar default_secondary_location: The default secondary region for this + database. + :vartype default_secondary_location: str + :ivar failover_group_id: Failover Group resource identifier that this + database belongs to. + :vartype failover_group_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param source_database_deletion_date: Specifies the time that the database + was deleted. + :type source_database_deletion_date: datetime + :param recovery_services_recovery_point_id: The resource identifier of the + recovery point associated with create operation of this database. + :type recovery_services_recovery_point_id: str + :param long_term_retention_backup_resource_id: The resource identifier of + the long term retention backup associated with create operation of this + database. + :type long_term_retention_backup_resource_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param restorable_dropped_database_id: The resource identifier of the + restorable dropped database associated with create operation of this + database. + :type restorable_dropped_database_id: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param zone_redundant: Whether or not this database is zone redundant, + which means the replicas of this database will be spread across multiple + availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this database. Possible + values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType + :ivar max_log_size_bytes: The max log size for this database. + :vartype max_log_size_bytes: long + :ivar earliest_restore_date: This records the earliest start date and time + that restore is available for this database (ISO8601 format). + :vartype earliest_restore_date: datetime + :param read_scale: The state of read-only routing. If enabled, connections + that have application intent set to readonly in their connection string + may be routed to a readonly secondary replica in the same region. Possible + values include: 'Enabled', 'Disabled' + :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale + :ivar current_sku: The name and tier of the SKU. + :vartype current_sku: ~azure.mgmt.sql.models.Sku + :param auto_pause_delay: Time in minutes after which database is + automatically paused. A value of -1 means that automatic pause is disabled + :type auto_pause_delay: int + :param min_capacity: Minimal capacity that database will always have + allocated, if not paused + :type min_capacity: float + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'status': {'readonly': True}, + 'database_id': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'current_service_objective_name': {'readonly': True}, + 'requested_service_objective_name': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + 'max_log_size_bytes': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'current_sku': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, + 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, + 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, + 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, + 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, + 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, + 'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'}, + 'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, auto_pause_delay: int=None, min_capacity: float=None, tags=None, **kwargs) -> None: + super(DatabaseUpdate, self).__init__(**kwargs) + self.sku = sku + self.create_mode = create_mode + self.collation = collation + self.max_size_bytes = max_size_bytes + self.sample_name = sample_name + self.elastic_pool_id = elastic_pool_id + self.source_database_id = source_database_id + self.status = None + self.database_id = None + self.creation_date = None + self.current_service_objective_name = None + self.requested_service_objective_name = None + self.default_secondary_location = None + self.failover_group_id = None + self.restore_point_in_time = restore_point_in_time + self.source_database_deletion_date = source_database_deletion_date + self.recovery_services_recovery_point_id = recovery_services_recovery_point_id + self.long_term_retention_backup_resource_id = long_term_retention_backup_resource_id + self.recoverable_database_id = recoverable_database_id + self.restorable_dropped_database_id = restorable_dropped_database_id + self.catalog_collation = catalog_collation + self.zone_redundant = zone_redundant + self.license_type = license_type + self.max_log_size_bytes = None + self.earliest_restore_date = None + self.read_scale = read_scale + self.current_sku = None + self.auto_pause_delay = auto_pause_delay + self.min_capacity = min_capacity + self.tags = tags + + +class DatabaseUsage(Model): + """The database usages. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the usage metric. + :vartype name: str + :ivar resource_name: The name of the resource. + :vartype resource_name: str + :ivar display_name: The usage metric display name. + :vartype display_name: str + :ivar current_value: The current value of the usage metric. + :vartype current_value: float + :ivar limit: The current limit of the usage metric. + :vartype limit: float + :ivar unit: The units of the usage metric. + :vartype unit: str + :ivar next_reset_time: The next reset time for the usage metric (ISO8601 + format). + :vartype next_reset_time: datetime + """ + + _validation = { + 'name': {'readonly': True}, + 'resource_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'next_reset_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(DatabaseUsage, self).__init__(**kwargs) + self.name = None + self.resource_name = None + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + self.next_reset_time = None + + +class DatabaseVulnerabilityAssessment(ProxyResource): + """A database vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: A blob storage container path to hold the + scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It + is required if server level vulnerability assessment policy doesn't set + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _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'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, *, storage_container_path: str=None, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: + super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = storage_container_path + self.storage_container_sas_key = storage_container_sas_key + self.storage_account_access_key = storage_account_access_key + self.recurring_scans = recurring_scans + + +class DatabaseVulnerabilityAssessmentRuleBaseline(ProxyResource): + """A database vulnerability assessment rule baseline. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param baseline_results: Required. The rule baseline result + :type baseline_results: + list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'baseline_results': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'baseline_results': {'key': 'properties.baselineResults', 'type': '[DatabaseVulnerabilityAssessmentRuleBaselineItem]'}, + } + + def __init__(self, *, baseline_results, **kwargs) -> None: + super(DatabaseVulnerabilityAssessmentRuleBaseline, self).__init__(**kwargs) + self.baseline_results = baseline_results + + +class DatabaseVulnerabilityAssessmentRuleBaselineItem(Model): + """Properties for an Azure SQL Database Vulnerability Assessment rule + baseline's result. + + All required parameters must be populated in order to send to Azure. + + :param result: Required. The rule baseline result + :type result: list[str] + """ + + _validation = { + 'result': {'required': True}, + } + + _attribute_map = { + 'result': {'key': 'result', 'type': '[str]'}, + } + + def __init__(self, *, result, **kwargs) -> None: + super(DatabaseVulnerabilityAssessmentRuleBaselineItem, self).__init__(**kwargs) + self.result = result + + +class DatabaseVulnerabilityAssessmentScansExport(ProxyResource): + """A database Vulnerability Assessment scan export resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar exported_report_location: Location of the exported report (e.g. + https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). + :vartype exported_report_location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'exported_report_location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs) + self.exported_report_location = None + + +class DataMaskingPolicy(ProxyResource): + """Represents a database data masking policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param data_masking_state: Required. The state of the data masking policy. + Possible values include: 'Disabled', 'Enabled' + :type data_masking_state: str or ~azure.mgmt.sql.models.DataMaskingState + :param exempt_principals: The list of the exempt principals. Specifies the + semicolon-separated list of database users for which the data masking + policy does not apply. The specified users receive data results without + masking for all of the database queries. + :type exempt_principals: str + :ivar application_principals: The list of the application principals. This + is a legacy parameter and is no longer used. + :vartype application_principals: str + :ivar masking_level: The masking level. This is a legacy parameter and is + no longer used. + :vartype masking_level: str + :ivar location: The location of the data masking policy. + :vartype location: str + :ivar kind: The kind of data masking policy. Metadata, used for Azure + portal. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_masking_state': {'required': True}, + 'application_principals': {'readonly': True}, + 'masking_level': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_masking_state': {'key': 'properties.dataMaskingState', 'type': 'DataMaskingState'}, + 'exempt_principals': {'key': 'properties.exemptPrincipals', 'type': 'str'}, + 'application_principals': {'key': 'properties.applicationPrincipals', 'type': 'str'}, + 'masking_level': {'key': 'properties.maskingLevel', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, data_masking_state, exempt_principals: str=None, **kwargs) -> None: + super(DataMaskingPolicy, self).__init__(**kwargs) + self.data_masking_state = data_masking_state + self.exempt_principals = exempt_principals + self.application_principals = None + self.masking_level = None + self.location = None + self.kind = None + + +class DataMaskingRule(ProxyResource): + """Represents a database data masking rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar data_masking_rule_id: The rule Id. + :vartype data_masking_rule_id: str + :param alias_name: The alias name. This is a legacy parameter and is no + longer used. + :type alias_name: str + :param rule_state: The rule state. Used to delete a rule. To delete an + existing rule, specify the schemaName, tableName, columnName, + maskingFunction, and specify ruleState as disabled. However, if the rule + doesn't already exist, the rule will be created with ruleState set to + enabled, regardless of the provided value of ruleState. Possible values + include: 'Disabled', 'Enabled' + :type rule_state: str or ~azure.mgmt.sql.models.DataMaskingRuleState + :param schema_name: Required. The schema name on which the data masking + rule is applied. + :type schema_name: str + :param table_name: Required. The table name on which the data masking rule + is applied. + :type table_name: str + :param column_name: Required. The column name on which the data masking + rule is applied. + :type column_name: str + :param masking_function: Required. The masking function that is used for + the data masking rule. Possible values include: 'Default', 'CCN', 'Email', + 'Number', 'SSN', 'Text' + :type masking_function: str or ~azure.mgmt.sql.models.DataMaskingFunction + :param number_from: The numberFrom property of the masking rule. Required + if maskingFunction is set to Number, otherwise this parameter will be + ignored. + :type number_from: str + :param number_to: The numberTo property of the data masking rule. Required + if maskingFunction is set to Number, otherwise this parameter will be + ignored. + :type number_to: str + :param prefix_size: If maskingFunction is set to Text, the number of + characters to show unmasked in the beginning of the string. Otherwise, + this parameter will be ignored. + :type prefix_size: str + :param suffix_size: If maskingFunction is set to Text, the number of + characters to show unmasked at the end of the string. Otherwise, this + parameter will be ignored. + :type suffix_size: str + :param replacement_string: If maskingFunction is set to Text, the + character to use for masking the unexposed part of the string. Otherwise, + this parameter will be ignored. + :type replacement_string: str + :ivar location: The location of the data masking rule. + :vartype location: str + :ivar kind: The kind of Data Masking Rule. Metadata, used for Azure + portal. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_masking_rule_id': {'readonly': True}, + 'schema_name': {'required': True}, + 'table_name': {'required': True}, + 'column_name': {'required': True}, + 'masking_function': {'required': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_masking_rule_id': {'key': 'properties.id', 'type': 'str'}, + 'alias_name': {'key': 'properties.aliasName', 'type': 'str'}, + 'rule_state': {'key': 'properties.ruleState', 'type': 'DataMaskingRuleState'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, + 'table_name': {'key': 'properties.tableName', 'type': 'str'}, + 'column_name': {'key': 'properties.columnName', 'type': 'str'}, + 'masking_function': {'key': 'properties.maskingFunction', 'type': 'DataMaskingFunction'}, + 'number_from': {'key': 'properties.numberFrom', 'type': 'str'}, + 'number_to': {'key': 'properties.numberTo', 'type': 'str'}, + 'prefix_size': {'key': 'properties.prefixSize', 'type': 'str'}, + 'suffix_size': {'key': 'properties.suffixSize', 'type': 'str'}, + 'replacement_string': {'key': 'properties.replacementString', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, schema_name: str, table_name: str, column_name: str, masking_function, alias_name: str=None, rule_state=None, number_from: str=None, number_to: str=None, prefix_size: str=None, suffix_size: str=None, replacement_string: str=None, **kwargs) -> None: + super(DataMaskingRule, self).__init__(**kwargs) + self.data_masking_rule_id = None + self.alias_name = alias_name + self.rule_state = rule_state + self.schema_name = schema_name + self.table_name = table_name + self.column_name = column_name + self.masking_function = masking_function + self.number_from = number_from + self.number_to = number_to + self.prefix_size = prefix_size + self.suffix_size = suffix_size + self.replacement_string = replacement_string + self.location = None + self.kind = None + + +class EditionCapability(Model): + """The edition capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The database edition name. + :vartype name: str + :ivar supported_service_level_objectives: The list of supported service + objectives for the edition. + :vartype supported_service_level_objectives: + list[~azure.mgmt.sql.models.ServiceObjectiveCapability] + :ivar zone_redundant: Whether or not zone redundancy is supported for the + edition. + :vartype zone_redundant: bool + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_service_level_objectives': {'readonly': True}, + 'zone_redundant': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_service_level_objectives': {'key': 'supportedServiceLevelObjectives', 'type': '[ServiceObjectiveCapability]'}, + 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(EditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_service_level_objectives = None + self.zone_redundant = None + self.status = None + self.reason = reason + + +class ElasticPool(TrackedResource): + """An elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The elastic pool SKU. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or the following command: + ```azurecli + az sql elastic-pool list-editions -l -o table + ```` + :type sku: ~azure.mgmt.sql.models.Sku + :ivar kind: Kind of elastic pool. This is metadata used for the Azure + portal experience. + :vartype kind: str + :ivar state: The state of the elastic pool. Possible values include: + 'Creating', 'Ready', 'Disabled' + :vartype state: str or ~azure.mgmt.sql.models.ElasticPoolState + :ivar creation_date: The creation date of the elastic pool (ISO8601 + format). + :vartype creation_date: datetime + :param max_size_bytes: The storage limit for the database elastic pool in + bytes. + :type max_size_bytes: long + :param per_database_settings: The per database settings for the elastic + pool. + :type per_database_settings: + ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings + :param zone_redundant: Whether or not this elastic pool is zone redundant, + which means the replicas of this elastic pool will be spread across + multiple availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this elastic pool. + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'state': {'readonly': True}, + 'creation_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, sku=None, max_size_bytes: int=None, per_database_settings=None, zone_redundant: bool=None, license_type=None, **kwargs) -> None: + super(ElasticPool, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.kind = None + self.state = None + self.creation_date = None + self.max_size_bytes = max_size_bytes + self.per_database_settings = per_database_settings + self.zone_redundant = zone_redundant + self.license_type = license_type + + +class ElasticPoolActivity(ProxyResource): + """Represents the activity on an elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar end_time: The time the operation finished (ISO8601 format). + :vartype end_time: datetime + :ivar error_code: The error code if available. + :vartype error_code: int + :ivar error_message: The error message if available. + :vartype error_message: str + :ivar error_severity: The error severity if available. + :vartype error_severity: int + :ivar operation: The operation name. + :vartype operation: str + :ivar operation_id: The unique operation ID. + :vartype operation_id: str + :ivar percent_complete: The percentage complete if available. + :vartype percent_complete: int + :ivar requested_database_dtu_max: The requested max DTU per database if + available. + :vartype requested_database_dtu_max: int + :ivar requested_database_dtu_min: The requested min DTU per database if + available. + :vartype requested_database_dtu_min: int + :ivar requested_dtu: The requested DTU for the pool if available. + :vartype requested_dtu: int + :ivar requested_elastic_pool_name: The requested name for the elastic pool + if available. + :vartype requested_elastic_pool_name: str + :ivar requested_storage_limit_in_gb: The requested storage limit for the + pool in GB if available. + :vartype requested_storage_limit_in_gb: long + :ivar elastic_pool_name: The name of the elastic pool. + :vartype elastic_pool_name: str + :ivar server_name: The name of the server the elastic pool is in. + :vartype server_name: str + :ivar start_time: The time the operation started (ISO8601 format). + :vartype start_time: datetime + :ivar state: The current state of the operation. + :vartype state: str + :ivar requested_storage_limit_in_mb: The requested storage limit in MB. + :vartype requested_storage_limit_in_mb: int + :ivar requested_database_dtu_guarantee: The requested per database DTU + guarantee. + :vartype requested_database_dtu_guarantee: int + :ivar requested_database_dtu_cap: The requested per database DTU cap. + :vartype requested_database_dtu_cap: int + :ivar requested_dtu_guarantee: The requested DTU guarantee. + :vartype requested_dtu_guarantee: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_message': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_id': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'requested_database_dtu_max': {'readonly': True}, + 'requested_database_dtu_min': {'readonly': True}, + 'requested_dtu': {'readonly': True}, + 'requested_elastic_pool_name': {'readonly': True}, + 'requested_storage_limit_in_gb': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'requested_storage_limit_in_mb': {'readonly': True}, + 'requested_database_dtu_guarantee': {'readonly': True}, + 'requested_database_dtu_cap': {'readonly': True}, + 'requested_dtu_guarantee': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'requested_database_dtu_max': {'key': 'properties.requestedDatabaseDtuMax', 'type': 'int'}, + 'requested_database_dtu_min': {'key': 'properties.requestedDatabaseDtuMin', 'type': 'int'}, + 'requested_dtu': {'key': 'properties.requestedDtu', 'type': 'int'}, + 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, + 'requested_storage_limit_in_gb': {'key': 'properties.requestedStorageLimitInGB', 'type': 'long'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'requested_storage_limit_in_mb': {'key': 'properties.requestedStorageLimitInMB', 'type': 'int'}, + 'requested_database_dtu_guarantee': {'key': 'properties.requestedDatabaseDtuGuarantee', 'type': 'int'}, + 'requested_database_dtu_cap': {'key': 'properties.requestedDatabaseDtuCap', 'type': 'int'}, + 'requested_dtu_guarantee': {'key': 'properties.requestedDtuGuarantee', 'type': 'int'}, + } + + def __init__(self, *, location: str=None, **kwargs) -> None: + super(ElasticPoolActivity, self).__init__(**kwargs) + self.location = location + self.end_time = None + self.error_code = None + self.error_message = None + self.error_severity = None + self.operation = None + self.operation_id = None + self.percent_complete = None + self.requested_database_dtu_max = None + self.requested_database_dtu_min = None + self.requested_dtu = None + self.requested_elastic_pool_name = None + self.requested_storage_limit_in_gb = None + self.elastic_pool_name = None + self.server_name = None + self.start_time = None + self.state = None + self.requested_storage_limit_in_mb = None + self.requested_database_dtu_guarantee = None + self.requested_database_dtu_cap = None + self.requested_dtu_guarantee = None + + +class ElasticPoolDatabaseActivity(ProxyResource): + """Represents the activity on an elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar database_name: The database name. + :vartype database_name: str + :ivar end_time: The time the operation finished (ISO8601 format). + :vartype end_time: datetime + :ivar error_code: The error code if available. + :vartype error_code: int + :ivar error_message: The error message if available. + :vartype error_message: str + :ivar error_severity: The error severity if available. + :vartype error_severity: int + :ivar operation: The operation name. + :vartype operation: str + :ivar operation_id: The unique operation ID. + :vartype operation_id: str + :ivar percent_complete: The percentage complete if available. + :vartype percent_complete: int + :ivar requested_elastic_pool_name: The name for the elastic pool the + database is moving into if available. + :vartype requested_elastic_pool_name: str + :ivar current_elastic_pool_name: The name of the current elastic pool the + database is in if available. + :vartype current_elastic_pool_name: str + :ivar current_service_objective: The name of the current service objective + if available. + :vartype current_service_objective: str + :ivar requested_service_objective: The name of the requested service + objective if available. + :vartype requested_service_objective: str + :ivar server_name: The name of the server the elastic pool is in. + :vartype server_name: str + :ivar start_time: The time the operation started (ISO8601 format). + :vartype start_time: datetime + :ivar state: The current state of the operation. + :vartype state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_name': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_message': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_id': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'requested_elastic_pool_name': {'readonly': True}, + 'current_elastic_pool_name': {'readonly': True}, + 'current_service_objective': {'readonly': True}, + 'requested_service_objective': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, + 'current_elastic_pool_name': {'key': 'properties.currentElasticPoolName', 'type': 'str'}, + 'current_service_objective': {'key': 'properties.currentServiceObjective', 'type': 'str'}, + 'requested_service_objective': {'key': 'properties.requestedServiceObjective', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, **kwargs) -> None: + super(ElasticPoolDatabaseActivity, self).__init__(**kwargs) + self.location = location + self.database_name = None + self.end_time = None + self.error_code = None + self.error_message = None + self.error_severity = None + self.operation = None + self.operation_id = None + self.percent_complete = None + self.requested_elastic_pool_name = None + self.current_elastic_pool_name = None + self.current_service_objective = None + self.requested_service_objective = None + self.server_name = None + self.start_time = None + self.state = None + + +class ElasticPoolEditionCapability(Model): + """The elastic pool edition capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The elastic pool edition name. + :vartype name: str + :ivar supported_elastic_pool_performance_levels: The list of supported + elastic pool DTU levels for the edition. + :vartype supported_elastic_pool_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerformanceLevelCapability] + :ivar zone_redundant: Whether or not zone redundancy is supported for the + edition. + :vartype zone_redundant: bool + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_elastic_pool_performance_levels': {'readonly': True}, + 'zone_redundant': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_elastic_pool_performance_levels': {'key': 'supportedElasticPoolPerformanceLevels', 'type': '[ElasticPoolPerformanceLevelCapability]'}, + 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ElasticPoolEditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_elastic_pool_performance_levels = None + self.zone_redundant = None + self.status = None + self.reason = reason + + +class ElasticPoolOperation(ProxyResource): + """A elastic pool operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar elastic_pool_name: The name of the elastic pool the operation is + being performed on. + :vartype elastic_pool_name: str + :ivar operation: The name of operation. + :vartype operation: str + :ivar operation_friendly_name: The friendly name of operation. + :vartype operation_friendly_name: str + :ivar percent_complete: The percentage of the operation completed. + :vartype percent_complete: int + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar start_time: The operation start time. + :vartype start_time: datetime + :ivar state: The operation state. + :vartype state: str + :ivar error_code: The operation error code. + :vartype error_code: int + :ivar error_description: The operation error description. + :vartype error_description: str + :ivar error_severity: The operation error severity. + :vartype error_severity: int + :ivar is_user_error: Whether or not the error is a user error. + :vartype is_user_error: bool + :ivar estimated_completion_time: The estimated completion time of the + operation. + :vartype estimated_completion_time: datetime + :ivar description: The operation description. + :vartype description: str + :ivar is_cancellable: Whether the operation can be cancelled. + :vartype is_cancellable: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_friendly_name': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_description': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'is_user_error': {'readonly': True}, + 'estimated_completion_time': {'readonly': True}, + 'description': {'readonly': True}, + 'is_cancellable': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, + 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(ElasticPoolOperation, self).__init__(**kwargs) + self.elastic_pool_name = None + self.operation = None + self.operation_friendly_name = None + self.percent_complete = None + self.server_name = None + self.start_time = None + self.state = None + self.error_code = None + self.error_description = None + self.error_severity = None + self.is_user_error = None + self.estimated_completion_time = None + self.description = None + self.is_cancellable = None + + +class ElasticPoolPerDatabaseMaxPerformanceLevelCapability(Model): + """The max per-database performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The maximum performance level per database. + :vartype limit: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + :ivar supported_per_database_min_performance_levels: The list of supported + min database performance levels. + :vartype supported_per_database_min_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMinPerformanceLevelCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'supported_per_database_min_performance_levels': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'supported_per_database_min_performance_levels': {'key': 'supportedPerDatabaseMinPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMinPerformanceLevelCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ElasticPoolPerDatabaseMaxPerformanceLevelCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + self.supported_per_database_min_performance_levels = None + self.status = None + self.reason = reason + + +class ElasticPoolPerDatabaseMinPerformanceLevelCapability(Model): + """The minimum per-database performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The minimum performance level per database. + :vartype limit: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ElasticPoolPerDatabaseMinPerformanceLevelCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + self.status = None + self.reason = reason + + +class ElasticPoolPerDatabaseSettings(Model): + """Per database settings of an elastic pool. + + :param min_capacity: The minimum capacity all databases are guaranteed. + :type min_capacity: float + :param max_capacity: The maximum capacity any one database can consume. + :type max_capacity: float + """ + + _attribute_map = { + 'min_capacity': {'key': 'minCapacity', 'type': 'float'}, + 'max_capacity': {'key': 'maxCapacity', 'type': 'float'}, + } + + def __init__(self, *, min_capacity: float=None, max_capacity: float=None, **kwargs) -> None: + super(ElasticPoolPerDatabaseSettings, self).__init__(**kwargs) + self.min_capacity = min_capacity + self.max_capacity = max_capacity + + +class ElasticPoolPerformanceLevelCapability(Model): + """The Elastic Pool performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar performance_level: The performance level for the pool. + :vartype performance_level: + ~azure.mgmt.sql.models.PerformanceLevelCapability + :ivar sku: The sku. + :vartype sku: ~azure.mgmt.sql.models.Sku + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar max_database_count: The maximum number of databases supported. + :vartype max_database_count: int + :ivar included_max_size: The included (free) max size for this performance + level. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar supported_max_sizes: The list of supported max sizes. + :vartype supported_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar supported_per_database_max_sizes: The list of supported per database + max sizes. + :vartype supported_per_database_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar supported_per_database_max_performance_levels: The list of supported + per database max performance levels. + :vartype supported_per_database_max_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMaxPerformanceLevelCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'performance_level': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'max_database_count': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'supported_max_sizes': {'readonly': True}, + 'supported_per_database_max_sizes': {'readonly': True}, + 'supported_per_database_max_performance_levels': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'max_database_count': {'key': 'maxDatabaseCount', 'type': 'int'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'supported_per_database_max_sizes': {'key': 'supportedPerDatabaseMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'supported_per_database_max_performance_levels': {'key': 'supportedPerDatabaseMaxPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMaxPerformanceLevelCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ElasticPoolPerformanceLevelCapability, self).__init__(**kwargs) + self.performance_level = None + self.sku = None + self.supported_license_types = None + self.max_database_count = None + self.included_max_size = None + self.supported_max_sizes = None + self.supported_per_database_max_sizes = None + self.supported_per_database_max_performance_levels = None + self.status = None + self.reason = reason + + +class ElasticPoolUpdate(Model): + """An elastic pool update. + + :param sku: + :type sku: ~azure.mgmt.sql.models.Sku + :param max_size_bytes: The storage limit for the database elastic pool in + bytes. + :type max_size_bytes: long + :param per_database_settings: The per database settings for the elastic + pool. + :type per_database_settings: + ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings + :param zone_redundant: Whether or not this elastic pool is zone redundant, + which means the replicas of this elastic pool will be spread across + multiple availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this elastic pool. + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, sku=None, max_size_bytes: int=None, per_database_settings=None, zone_redundant: bool=None, license_type=None, tags=None, **kwargs) -> None: + super(ElasticPoolUpdate, self).__init__(**kwargs) + self.sku = sku + self.max_size_bytes = max_size_bytes + self.per_database_settings = per_database_settings + self.zone_redundant = zone_redundant + self.license_type = license_type + self.tags = tags + + +class EncryptionProtector(ProxyResource): + """The server encryption protector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :type kind: str + :ivar location: Resource location. + :vartype location: str + :ivar subregion: Subregion of the encryption protector. + :vartype subregion: str + :param server_key_name: The name of the server key. + :type server_key_name: str + :param server_key_type: Required. The encryption protector type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :ivar uri: The URI of the server key. + :vartype uri: str + :ivar thumbprint: Thumbprint of the server key. + :vartype thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'subregion': {'readonly': True}, + 'server_key_type': {'required': True}, + 'uri': {'readonly': True}, + 'thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'subregion': {'key': 'properties.subregion', 'type': 'str'}, + 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, *, server_key_type, kind: str=None, server_key_name: str=None, **kwargs) -> None: + super(EncryptionProtector, self).__init__(**kwargs) + self.kind = kind + self.location = None + self.subregion = None + self.server_key_name = server_key_name + self.server_key_type = server_key_type + self.uri = None + self.thumbprint = None + + +class ExportRequest(Model): + """Export database parameters. + + All required parameters must be populated in order to send to Azure. + + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + } + + _attribute_map = { + 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, + } + + def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, authentication_type="SQL", **kwargs) -> None: + super(ExportRequest, self).__init__(**kwargs) + self.storage_key_type = storage_key_type + self.storage_key = storage_key + self.storage_uri = storage_uri + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.authentication_type = authentication_type + + +class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): + """An extended database blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param predicate_expression: Specifies condition of where clause when + creating an audit. + :type predicate_expression: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: + super(ExtendedDatabaseBlobAuditingPolicy, self).__init__(**kwargs) + self.predicate_expression = predicate_expression + self.state = state + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.audit_actions_and_groups = audit_actions_and_groups + self.storage_account_subscription_id = storage_account_subscription_id + self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use + self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + + +class ExtendedServerBlobAuditingPolicy(ProxyResource): + """An extended server blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param predicate_expression: Specifies condition of where clause when + creating an audit. + :type predicate_expression: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: + super(ExtendedServerBlobAuditingPolicy, self).__init__(**kwargs) + self.predicate_expression = predicate_expression + self.state = state + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.audit_actions_and_groups = audit_actions_and_groups + self.storage_account_subscription_id = storage_account_subscription_id + self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use + self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + + +class FailoverGroup(ProxyResource): + """A failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param read_write_endpoint: Required. Read-write endpoint of the failover + group instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint + :ivar replication_role: Local replication role of the failover group + instance. Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.FailoverGroupReplicationRole + :ivar replication_state: Replication state of the failover group instance. + :vartype replication_state: str + :param partner_servers: Required. List of partner server information for + the failover group. + :type partner_servers: list[~azure.mgmt.sql.models.PartnerInfo] + :param databases: List of databases in the failover group. + :type databases: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'read_write_endpoint': {'required': True}, + 'replication_role': {'readonly': True}, + 'replication_state': {'readonly': True}, + 'partner_servers': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, + 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + 'partner_servers': {'key': 'properties.partnerServers', 'type': '[PartnerInfo]'}, + 'databases': {'key': 'properties.databases', 'type': '[str]'}, + } + + def __init__(self, *, read_write_endpoint, partner_servers, tags=None, read_only_endpoint=None, databases=None, **kwargs) -> None: + super(FailoverGroup, self).__init__(**kwargs) + self.location = None + self.tags = tags + self.read_write_endpoint = read_write_endpoint + self.read_only_endpoint = read_only_endpoint + self.replication_role = None + self.replication_state = None + self.partner_servers = partner_servers + self.databases = databases + + +class FailoverGroupReadOnlyEndpoint(Model): + """Read-only endpoint of the failover group instance. + + :param failover_policy: Failover policy of the read-only endpoint for the + failover group. Possible values include: 'Disabled', 'Enabled' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy + """ + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + } + + def __init__(self, *, failover_policy=None, **kwargs) -> None: + super(FailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) + self.failover_policy = failover_policy + + +class FailoverGroupReadWriteEndpoint(Model): + """Read-write endpoint of the failover group instance. + + All required parameters must be populated in order to send to Azure. + + :param failover_policy: Required. Failover policy of the read-write + endpoint for the failover group. If failoverPolicy is Automatic then + failoverWithDataLossGracePeriodMinutes is required. Possible values + include: 'Manual', 'Automatic' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy + :param failover_with_data_loss_grace_period_minutes: Grace period before + failover with data loss is attempted for the read-write endpoint. If + failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is + required. + :type failover_with_data_loss_grace_period_minutes: int + """ + + _validation = { + 'failover_policy': {'required': True}, + } + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, + } + + def __init__(self, *, failover_policy, failover_with_data_loss_grace_period_minutes: int=None, **kwargs) -> None: + super(FailoverGroupReadWriteEndpoint, self).__init__(**kwargs) + self.failover_policy = failover_policy + self.failover_with_data_loss_grace_period_minutes = failover_with_data_loss_grace_period_minutes + + +class FailoverGroupUpdate(Model): + """A failover group update request. + + :param read_write_endpoint: Read-write endpoint of the failover group + instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint + :param databases: List of databases in the failover group. + :type databases: list[str] + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, + 'databases': {'key': 'properties.databases', 'type': '[str]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, read_write_endpoint=None, read_only_endpoint=None, databases=None, tags=None, **kwargs) -> None: + super(FailoverGroupUpdate, self).__init__(**kwargs) + self.read_write_endpoint = read_write_endpoint + self.read_only_endpoint = read_only_endpoint + self.databases = databases + self.tags = tags + + +class FirewallRule(ProxyResource): + """Represents a server firewall rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of server that contains this firewall rule. + :vartype kind: str + :ivar location: Location of the server that contains this firewall rule. + :vartype location: str + :param start_ip_address: Required. The start IP address of the firewall + rule. Must be IPv4 format. Use value '0.0.0.0' to represent all + Azure-internal IP addresses. + :type start_ip_address: str + :param end_ip_address: Required. The end IP address of the firewall rule. + Must be IPv4 format. Must be greater than or equal to startIpAddress. Use + value '0.0.0.0' to represent all Azure-internal IP addresses. + :type end_ip_address: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + 'start_ip_address': {'required': True}, + 'end_ip_address': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + } + + def __init__(self, *, start_ip_address: str, end_ip_address: str, **kwargs) -> None: + super(FirewallRule, self).__init__(**kwargs) + self.kind = None + self.location = None + self.start_ip_address = start_ip_address + self.end_ip_address = end_ip_address + + +class GeoBackupPolicy(ProxyResource): + """A database geo backup policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. The state of the geo backup policy. Possible + values include: 'Disabled', 'Enabled' + :type state: str or ~azure.mgmt.sql.models.GeoBackupPolicyState + :ivar storage_type: The storage type of the geo backup policy. + :vartype storage_type: str + :ivar kind: Kind of geo backup policy. This is metadata used for the + Azure portal experience. + :vartype kind: str + :ivar location: Backup policy location. + :vartype location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'storage_type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'GeoBackupPolicyState'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, state, **kwargs) -> None: + super(GeoBackupPolicy, self).__init__(**kwargs) + self.state = state + self.storage_type = None + self.kind = None + self.location = None + + +class ImportExportResponse(ProxyResource): + """Response for Import/Export Get operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar request_type: The request type of the operation. + :vartype request_type: str + :ivar request_id: The request type of the operation. + :vartype request_id: str + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar database_name: The name of the database. + :vartype database_name: str + :ivar status: The status message returned from the server. + :vartype status: str + :ivar last_modified_time: The operation status last modified time. + :vartype last_modified_time: str + :ivar queued_time: The operation queued time. + :vartype queued_time: str + :ivar blob_uri: The blob uri. + :vartype blob_uri: str + :ivar error_message: The error message returned from the server. + :vartype error_message: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'request_type': {'readonly': True}, + 'request_id': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'status': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'queued_time': {'readonly': True}, + 'blob_uri': {'readonly': True}, + 'error_message': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'request_type': {'key': 'properties.requestType', 'type': 'str'}, + 'request_id': {'key': 'properties.requestId', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'str'}, + 'queued_time': {'key': 'properties.queuedTime', 'type': 'str'}, + 'blob_uri': {'key': 'properties.blobUri', 'type': 'str'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ImportExportResponse, self).__init__(**kwargs) + self.request_type = None + self.request_id = None + self.server_name = None + self.database_name = None + self.status = None + self.last_modified_time = None + self.queued_time = None + self.blob_uri = None + self.error_message = None + + +class ImportExtensionRequest(Model): + """Import database parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: The name of the extension. + :type name: str + :param type: The type of the extension. + :type type: str + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + :ivar operation_mode: Required. The type of import operation being + performed. This is always Import. Default value: "Import" . + :vartype operation_mode: str + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + 'operation_mode': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_key_type': {'key': 'properties.storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'properties.storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'properties.storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'properties.authenticationType', 'type': 'AuthenticationType'}, + 'operation_mode': {'key': 'properties.operationMode', 'type': 'str'}, + } + + operation_mode = "Import" + + def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, name: str=None, type: str=None, authentication_type="SQL", **kwargs) -> None: + super(ImportExtensionRequest, self).__init__(**kwargs) + self.name = name + self.type = type + self.storage_key_type = storage_key_type + self.storage_key = storage_key + self.storage_uri = storage_uri + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.authentication_type = authentication_type + + +class ImportRequest(ExportRequest): + """Import database parameters. + + All required parameters must be populated in order to send to Azure. + + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + :param database_name: Required. The name of the database to import. + :type database_name: str + :param edition: Required. The edition for the database being created. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location + ```` + . Possible values include: 'Web', 'Business', 'Basic', 'Standard', + 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', + 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale' + :type edition: str or ~azure.mgmt.sql.models.DatabaseEdition + :param service_objective_name: Required. The name of the service objective + to assign to the database. Possible values include: 'System', 'System0', + 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', + 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', + 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', + 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', + 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', + 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', + 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', + 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' + :type service_objective_name: str or + ~azure.mgmt.sql.models.ServiceObjectiveName + :param max_size_bytes: Required. The maximum size for the newly imported + database. + :type max_size_bytes: str + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + 'database_name': {'required': True}, + 'edition': {'required': True}, + 'service_objective_name': {'required': True}, + 'max_size_bytes': {'required': True}, + } + + _attribute_map = { + 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'edition': {'key': 'edition', 'type': 'str'}, + 'service_objective_name': {'key': 'serviceObjectiveName', 'type': 'str'}, + 'max_size_bytes': {'key': 'maxSizeBytes', 'type': 'str'}, + } + + def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, database_name: str, edition, service_objective_name, max_size_bytes: str, authentication_type="SQL", **kwargs) -> None: + super(ImportRequest, self).__init__(storage_key_type=storage_key_type, storage_key=storage_key, storage_uri=storage_uri, administrator_login=administrator_login, administrator_login_password=administrator_login_password, authentication_type=authentication_type, **kwargs) + self.database_name = database_name + self.edition = edition + self.service_objective_name = service_objective_name + self.max_size_bytes = max_size_bytes + + +class InstanceFailoverGroup(ProxyResource): + """An instance failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param read_write_endpoint: Required. Read-write endpoint of the failover + group instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.InstanceFailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.InstanceFailoverGroupReadOnlyEndpoint + :ivar replication_role: Local replication role of the failover group + instance. Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole + :ivar replication_state: Replication state of the failover group instance. + :vartype replication_state: str + :param partner_regions: Required. Partner region information for the + failover group. + :type partner_regions: list[~azure.mgmt.sql.models.PartnerRegionInfo] + :param managed_instance_pairs: Required. List of managed instance pairs in + the failover group. + :type managed_instance_pairs: + list[~azure.mgmt.sql.models.ManagedInstancePairInfo] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'read_write_endpoint': {'required': True}, + 'replication_role': {'readonly': True}, + 'replication_state': {'readonly': True}, + 'partner_regions': {'required': True}, + 'managed_instance_pairs': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'InstanceFailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'InstanceFailoverGroupReadOnlyEndpoint'}, + 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + 'partner_regions': {'key': 'properties.partnerRegions', 'type': '[PartnerRegionInfo]'}, + 'managed_instance_pairs': {'key': 'properties.managedInstancePairs', 'type': '[ManagedInstancePairInfo]'}, + } + + def __init__(self, *, read_write_endpoint, partner_regions, managed_instance_pairs, read_only_endpoint=None, **kwargs) -> None: + super(InstanceFailoverGroup, self).__init__(**kwargs) + self.read_write_endpoint = read_write_endpoint + self.read_only_endpoint = read_only_endpoint + self.replication_role = None + self.replication_state = None + self.partner_regions = partner_regions + self.managed_instance_pairs = managed_instance_pairs + + +class InstanceFailoverGroupReadOnlyEndpoint(Model): + """Read-only endpoint of the failover group instance. + + :param failover_policy: Failover policy of the read-only endpoint for the + failover group. Possible values include: 'Disabled', 'Enabled' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy + """ + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + } + + def __init__(self, *, failover_policy=None, **kwargs) -> None: + super(InstanceFailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) + self.failover_policy = failover_policy + + +class InstanceFailoverGroupReadWriteEndpoint(Model): + """Read-write endpoint of the failover group instance. + + All required parameters must be populated in order to send to Azure. + + :param failover_policy: Required. Failover policy of the read-write + endpoint for the failover group. If failoverPolicy is Automatic then + failoverWithDataLossGracePeriodMinutes is required. Possible values + include: 'Manual', 'Automatic' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy + :param failover_with_data_loss_grace_period_minutes: Grace period before + failover with data loss is attempted for the read-write endpoint. If + failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is + required. + :type failover_with_data_loss_grace_period_minutes: int + """ + + _validation = { + 'failover_policy': {'required': True}, + } + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, + } + + def __init__(self, *, failover_policy, failover_with_data_loss_grace_period_minutes: int=None, **kwargs) -> None: + super(InstanceFailoverGroupReadWriteEndpoint, self).__init__(**kwargs) + self.failover_policy = failover_policy + self.failover_with_data_loss_grace_period_minutes = failover_with_data_loss_grace_period_minutes + + +class InstancePool(TrackedResource): + """An Azure SQL instance pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param subnet_id: Required. Resource ID of the subnet to place this + instance pool in. + :type subnet_id: str + :param v_cores: Required. Count of vCores belonging to this instance pool. + :type v_cores: int + :param license_type: Required. The license type. Possible values are + 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' + (without SQL license price). Possible values include: 'LicenseIncluded', + 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.InstancePoolLicenseType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'subnet_id': {'required': True}, + 'v_cores': {'required': True}, + 'license_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + } + + def __init__(self, *, location: str, subnet_id: str, v_cores: int, license_type, tags=None, sku=None, **kwargs) -> None: + super(InstancePool, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.subnet_id = subnet_id + self.v_cores = v_cores + self.license_type = license_type + + +class InstancePoolUpdate(Model): + """An update to an Instance pool. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(InstancePoolUpdate, self).__init__(**kwargs) + self.tags = tags + + +class Job(ProxyResource): + """A job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param description: User-defined description of the job. Default value: "" + . + :type description: str + :ivar version: The job version number. + :vartype version: int + :param schedule: Schedule properties of the job. + :type schedule: ~azure.mgmt.sql.models.JobSchedule + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'int'}, + 'schedule': {'key': 'properties.schedule', 'type': 'JobSchedule'}, + } + + def __init__(self, *, description: str="", schedule=None, **kwargs) -> None: + super(Job, self).__init__(**kwargs) + self.description = description + self.version = None + self.schedule = schedule + + +class JobAgent(TrackedResource): + """An Azure SQL job agent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param database_id: Required. Resource ID of the database to store job + metadata in. + :type database_id: str + :ivar state: The state of the job agent. Possible values include: + 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' + :vartype state: str or ~azure.mgmt.sql.models.JobAgentState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'database_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, *, location: str, database_id: str, tags=None, sku=None, **kwargs) -> None: + super(JobAgent, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.database_id = database_id + self.state = None + + +class JobAgentUpdate(Model): + """An update to an Azure SQL job agent. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(JobAgentUpdate, self).__init__(**kwargs) + self.tags = tags + + +class JobCredential(ProxyResource): + """A stored credential that can be used by a job to connect to target + databases. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param username: Required. The credential user name. + :type username: str + :param password: Required. The credential password. + :type password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'username': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'username': {'key': 'properties.username', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + } + + def __init__(self, *, username: str, password: str, **kwargs) -> None: + super(JobCredential, self).__init__(**kwargs) + self.username = username + self.password = password + + +class JobExecution(ProxyResource): + """An execution of a job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar job_version: The job version number. + :vartype job_version: int + :ivar step_name: The job step name. + :vartype step_name: str + :ivar step_id: The job step id. + :vartype step_id: int + :ivar job_execution_id: The unique identifier of the job execution. + :vartype job_execution_id: str + :ivar lifecycle: The detailed state of the job execution. Possible values + include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', + 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', + 'TimedOut', 'Canceled', 'Skipped' + :vartype lifecycle: str or ~azure.mgmt.sql.models.JobExecutionLifecycle + :ivar provisioning_state: The ARM provisioning state of the job execution. + Possible values include: 'Created', 'InProgress', 'Succeeded', 'Failed', + 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.sql.models.ProvisioningState + :ivar create_time: The time that the job execution was created. + :vartype create_time: datetime + :ivar start_time: The time that the job execution started. + :vartype start_time: datetime + :ivar end_time: The time that the job execution completed. + :vartype end_time: datetime + :param current_attempts: Number of times the job execution has been + attempted. + :type current_attempts: int + :ivar current_attempt_start_time: Start time of the current attempt. + :vartype current_attempt_start_time: datetime + :ivar last_message: The last status or error message. + :vartype last_message: str + :ivar target: The target that this execution is executed on. + :vartype target: ~azure.mgmt.sql.models.JobExecutionTarget + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'job_version': {'readonly': True}, + 'step_name': {'readonly': True}, + 'step_id': {'readonly': True}, + 'job_execution_id': {'readonly': True}, + 'lifecycle': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'create_time': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'current_attempt_start_time': {'readonly': True}, + 'last_message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'job_version': {'key': 'properties.jobVersion', 'type': 'int'}, + 'step_name': {'key': 'properties.stepName', 'type': 'str'}, + 'step_id': {'key': 'properties.stepId', 'type': 'int'}, + 'job_execution_id': {'key': 'properties.jobExecutionId', 'type': 'str'}, + 'lifecycle': {'key': 'properties.lifecycle', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'current_attempts': {'key': 'properties.currentAttempts', 'type': 'int'}, + 'current_attempt_start_time': {'key': 'properties.currentAttemptStartTime', 'type': 'iso-8601'}, + 'last_message': {'key': 'properties.lastMessage', 'type': 'str'}, + 'target': {'key': 'properties.target', 'type': 'JobExecutionTarget'}, + } + + def __init__(self, *, current_attempts: int=None, **kwargs) -> None: + super(JobExecution, self).__init__(**kwargs) + self.job_version = None + self.step_name = None + self.step_id = None + self.job_execution_id = None + self.lifecycle = None + self.provisioning_state = None + self.create_time = None + self.start_time = None + self.end_time = None + self.current_attempts = current_attempts + self.current_attempt_start_time = None + self.last_message = None + self.target = None + + +class JobExecutionTarget(Model): + """The target that a job execution is executed on. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of the target. Possible values include: + 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + :vartype type: str or ~azure.mgmt.sql.models.JobTargetType + :ivar server_name: The server name. + :vartype server_name: str + :ivar database_name: The database name. + :vartype database_name: str + """ + + _validation = { + 'type': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(JobExecutionTarget, self).__init__(**kwargs) + self.type = None + self.server_name = None + self.database_name = None + + +class JobSchedule(Model): + """Scheduling properties of a job. + + :param start_time: Schedule start time. Default value: + "0001-01-01T00:00:00Z" . + :type start_time: datetime + :param end_time: Schedule end time. Default value: "9999-12-31T11:59:59Z" + . + :type end_time: datetime + :param type: Schedule interval type. Possible values include: 'Once', + 'Recurring'. Default value: "Once" . + :type type: str or ~azure.mgmt.sql.models.JobScheduleType + :param enabled: Whether or not the schedule is enabled. + :type enabled: bool + :param interval: Value of the schedule's recurring interval, if the + schedule type is recurring. ISO8601 duration format. + :type interval: str + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'JobScheduleType'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'interval': {'key': 'interval', 'type': 'str'}, + } + + def __init__(self, *, start_time="0001-01-01T00:00:00Z", end_time="9999-12-31T11:59:59Z", type="Once", enabled: bool=None, interval: str=None, **kwargs) -> None: + super(JobSchedule, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.type = type + self.enabled = enabled + self.interval = interval + + +class JobStep(ProxyResource): + """A job step. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param step_id: The job step's index within the job. If not specified when + creating the job step, it will be created as the last step. If not + specified when updating the job step, the step id is not modified. + :type step_id: int + :param target_group: Required. The resource ID of the target group that + the job step will be executed on. + :type target_group: str + :param credential: Required. The resource ID of the job credential that + will be used to connect to the targets. + :type credential: str + :param action: Required. The action payload of the job step. + :type action: ~azure.mgmt.sql.models.JobStepAction + :param output: Output destination properties of the job step. + :type output: ~azure.mgmt.sql.models.JobStepOutput + :param execution_options: Execution options for the job step. + :type execution_options: ~azure.mgmt.sql.models.JobStepExecutionOptions + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'target_group': {'required': True}, + 'credential': {'required': True}, + 'action': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'step_id': {'key': 'properties.stepId', 'type': 'int'}, + 'target_group': {'key': 'properties.targetGroup', 'type': 'str'}, + 'credential': {'key': 'properties.credential', 'type': 'str'}, + 'action': {'key': 'properties.action', 'type': 'JobStepAction'}, + 'output': {'key': 'properties.output', 'type': 'JobStepOutput'}, + 'execution_options': {'key': 'properties.executionOptions', 'type': 'JobStepExecutionOptions'}, + } + + def __init__(self, *, target_group: str, credential: str, action, step_id: int=None, output=None, execution_options=None, **kwargs) -> None: + super(JobStep, self).__init__(**kwargs) + self.step_id = step_id + self.target_group = target_group + self.credential = credential + self.action = action + self.output = output + self.execution_options = execution_options + + +class JobStepAction(Model): + """The action to be executed by a job step. + + All required parameters must be populated in order to send to Azure. + + :param type: Type of action being executed by the job step. Possible + values include: 'TSql'. Default value: "TSql" . + :type type: str or ~azure.mgmt.sql.models.JobStepActionType + :param source: The source of the action to execute. Possible values + include: 'Inline'. Default value: "Inline" . + :type source: str or ~azure.mgmt.sql.models.JobStepActionSource + :param value: Required. The action value, for example the text of the + T-SQL script to execute. + :type value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, value: str, type="TSql", source="Inline", **kwargs) -> None: + super(JobStepAction, self).__init__(**kwargs) + self.type = type + self.source = source + self.value = value + + +class JobStepExecutionOptions(Model): + """The execution options of a job step. + + :param timeout_seconds: Execution timeout for the job step. Default value: + 43200 . + :type timeout_seconds: int + :param retry_attempts: Maximum number of times the job step will be + reattempted if the first attempt fails. Default value: 10 . + :type retry_attempts: int + :param initial_retry_interval_seconds: Initial delay between retries for + job step execution. Default value: 1 . + :type initial_retry_interval_seconds: int + :param maximum_retry_interval_seconds: The maximum amount of time to wait + between retries for job step execution. Default value: 120 . + :type maximum_retry_interval_seconds: int + :param retry_interval_backoff_multiplier: The backoff multiplier for the + time between retries. Default value: 2 . + :type retry_interval_backoff_multiplier: float + """ + + _attribute_map = { + 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, + 'retry_attempts': {'key': 'retryAttempts', 'type': 'int'}, + 'initial_retry_interval_seconds': {'key': 'initialRetryIntervalSeconds', 'type': 'int'}, + 'maximum_retry_interval_seconds': {'key': 'maximumRetryIntervalSeconds', 'type': 'int'}, + 'retry_interval_backoff_multiplier': {'key': 'retryIntervalBackoffMultiplier', 'type': 'float'}, + } + + def __init__(self, *, timeout_seconds: int=43200, retry_attempts: int=10, initial_retry_interval_seconds: int=1, maximum_retry_interval_seconds: int=120, retry_interval_backoff_multiplier: float=2, **kwargs) -> None: + super(JobStepExecutionOptions, self).__init__(**kwargs) + self.timeout_seconds = timeout_seconds + self.retry_attempts = retry_attempts + self.initial_retry_interval_seconds = initial_retry_interval_seconds + self.maximum_retry_interval_seconds = maximum_retry_interval_seconds + self.retry_interval_backoff_multiplier = retry_interval_backoff_multiplier + + +class JobStepOutput(Model): + """The output configuration of a job step. + + All required parameters must be populated in order to send to Azure. + + :param type: The output destination type. Possible values include: + 'SqlDatabase'. Default value: "SqlDatabase" . + :type type: str or ~azure.mgmt.sql.models.JobStepOutputType + :param subscription_id: The output destination subscription id. + :type subscription_id: str + :param resource_group_name: The output destination resource group. + :type resource_group_name: str + :param server_name: Required. The output destination server name. + :type server_name: str + :param database_name: Required. The output destination database. + :type database_name: str + :param schema_name: The output destination schema. Default value: "dbo" . + :type schema_name: str + :param table_name: Required. The output destination table. + :type table_name: str + :param credential: Required. The resource ID of the credential to use to + connect to the output destination. + :type credential: str + """ + + _validation = { + 'server_name': {'required': True}, + 'database_name': {'required': True}, + 'table_name': {'required': True}, + 'credential': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'credential': {'key': 'credential', 'type': 'str'}, + } + + def __init__(self, *, server_name: str, database_name: str, table_name: str, credential: str, type="SqlDatabase", subscription_id: str=None, resource_group_name: str=None, schema_name: str="dbo", **kwargs) -> None: + super(JobStepOutput, self).__init__(**kwargs) + self.type = type + self.subscription_id = subscription_id + self.resource_group_name = resource_group_name + self.server_name = server_name + self.database_name = database_name + self.schema_name = schema_name + self.table_name = table_name + self.credential = credential + + +class JobTarget(Model): + """A job target, for example a specific database or a container of databases + that is evaluated during job execution. + + All required parameters must be populated in order to send to Azure. + + :param membership_type: Whether the target is included or excluded from + the group. Possible values include: 'Include', 'Exclude'. Default value: + "Include" . + :type membership_type: str or + ~azure.mgmt.sql.models.JobTargetGroupMembershipType + :param type: Required. The target type. Possible values include: + 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + :type type: str or ~azure.mgmt.sql.models.JobTargetType + :param server_name: The target server name. + :type server_name: str + :param database_name: The target database name. + :type database_name: str + :param elastic_pool_name: The target elastic pool name. + :type elastic_pool_name: str + :param shard_map_name: The target shard map. + :type shard_map_name: str + :param refresh_credential: The resource ID of the credential that is used + during job execution to connect to the target and determine the list of + databases inside the target. + :type refresh_credential: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'membership_type': {'key': 'membershipType', 'type': 'JobTargetGroupMembershipType'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'elastic_pool_name': {'key': 'elasticPoolName', 'type': 'str'}, + 'shard_map_name': {'key': 'shardMapName', 'type': 'str'}, + 'refresh_credential': {'key': 'refreshCredential', 'type': 'str'}, + } + + def __init__(self, *, type, membership_type="Include", server_name: str=None, database_name: str=None, elastic_pool_name: str=None, shard_map_name: str=None, refresh_credential: str=None, **kwargs) -> None: + super(JobTarget, self).__init__(**kwargs) + self.membership_type = membership_type + self.type = type + self.server_name = server_name + self.database_name = database_name + self.elastic_pool_name = elastic_pool_name + self.shard_map_name = shard_map_name + self.refresh_credential = refresh_credential + + +class JobTargetGroup(ProxyResource): + """A group of job targets. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param members: Required. Members of the target group. + :type members: list[~azure.mgmt.sql.models.JobTarget] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'members': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'members': {'key': 'properties.members', 'type': '[JobTarget]'}, + } + + def __init__(self, *, members, **kwargs) -> None: + super(JobTargetGroup, self).__init__(**kwargs) + self.members = members + + +class JobVersion(ProxyResource): + """A job version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(JobVersion, self).__init__(**kwargs) + + +class LicenseTypeCapability(Model): + """The license type capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: License type identifier. + :vartype name: str + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(LicenseTypeCapability, self).__init__(**kwargs) + self.name = None + self.status = None + self.reason = reason + + +class LocationCapabilities(Model): + """The location capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The location name. + :vartype name: str + :ivar supported_server_versions: The list of supported server versions. + :vartype supported_server_versions: + list[~azure.mgmt.sql.models.ServerVersionCapability] + :ivar supported_managed_instance_versions: The list of supported managed + instance versions. + :vartype supported_managed_instance_versions: + list[~azure.mgmt.sql.models.ManagedInstanceVersionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_server_versions': {'readonly': True}, + 'supported_managed_instance_versions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_server_versions': {'key': 'supportedServerVersions', 'type': '[ServerVersionCapability]'}, + 'supported_managed_instance_versions': {'key': 'supportedManagedInstanceVersions', 'type': '[ManagedInstanceVersionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(LocationCapabilities, self).__init__(**kwargs) + self.name = None + self.supported_server_versions = None + self.supported_managed_instance_versions = None + self.status = None + self.reason = reason + + +class LogSizeCapability(Model): + """The log size capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The log size limit (see 'unit' for the units). + :vartype limit: int + :ivar unit: The units that the limit is expressed in. Possible values + include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes', 'Percent' + :vartype unit: str or ~azure.mgmt.sql.models.LogSizeUnit + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'int'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(LogSizeCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + + +class LongTermRetentionBackup(ProxyResource): + """A long term retention backup. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar server_name: The server name that the backup database belong to. + :vartype server_name: str + :ivar server_create_time: The create time of the server. + :vartype server_create_time: datetime + :ivar database_name: The name of the database the backup belong to + :vartype database_name: str + :ivar database_deletion_time: The delete time of the database + :vartype database_deletion_time: datetime + :ivar backup_time: The time the backup was taken + :vartype backup_time: datetime + :ivar backup_expiration_time: The time the long term retention backup will + expire. + :vartype backup_expiration_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'server_name': {'readonly': True}, + 'server_create_time': {'readonly': True}, + 'database_name': {'readonly': True}, + 'database_deletion_time': {'readonly': True}, + 'backup_time': {'readonly': True}, + 'backup_expiration_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'server_create_time': {'key': 'properties.serverCreateTime', 'type': 'iso-8601'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'database_deletion_time': {'key': 'properties.databaseDeletionTime', 'type': 'iso-8601'}, + 'backup_time': {'key': 'properties.backupTime', 'type': 'iso-8601'}, + 'backup_expiration_time': {'key': 'properties.backupExpirationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(LongTermRetentionBackup, self).__init__(**kwargs) + self.server_name = None + self.server_create_time = None + self.database_name = None + self.database_deletion_time = None + self.backup_time = None + self.backup_expiration_time = None + + +class ManagedBackupShortTermRetentionPolicy(ProxyResource): + """A short term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param retention_days: The backup retention period in days. This is how + many days Point-in-Time Restore will be supported. + :type retention_days: int + """ + + _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'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + } + + def __init__(self, *, retention_days: int=None, **kwargs) -> None: + super(ManagedBackupShortTermRetentionPolicy, self).__init__(**kwargs) + self.retention_days = retention_days + + +class ManagedDatabase(TrackedResource): + """A managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param collation: Collation of the managed database. + :type collation: str + :ivar status: Status of the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' + :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus + :ivar creation_date: Creation date of the database. + :vartype creation_date: datetime + :ivar earliest_restore_point: Earliest restore point in time for point in + time restore. + :vartype earliest_restore_point: datetime + :param restore_point_in_time: Conditional. If createMode is + PointInTimeRestore, this value is required. Specifies the point in time + (ISO8601 format) of the source database that will be restored to create + the new database. + :type restore_point_in_time: datetime + :ivar default_secondary_location: Geo paired region. + :vartype default_secondary_location: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param create_mode: Managed database create mode. PointInTimeRestore: + Create a database by restoring a point in time backup of an existing + database. SourceDatabaseName, SourceManagedInstanceName and PointInTime + must be specified. RestoreExternalBackup: Create a database by restoring + from external backup files. Collation, StorageContainerUri and + StorageContainerSasToken must be specified. Recovery: Creates a database + by restoring a geo-replicated backup. RecoverableDatabaseId must be + specified as the recoverable database resource ID to restore. Possible + values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', + 'Recovery' + :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode + :param storage_container_uri: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the uri of the + storage container where backups for this restore are stored. + :type storage_container_uri: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :param restorable_dropped_database_id: The restorable dropped database + resource id to restore when creating this database. + :type restorable_dropped_database_id: str + :param storage_container_sas_token: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the storage + container sas token. + :type storage_container_sas_token: str + :ivar failover_group_id: Instance Failover Group resource identifier that + this managed database belongs to. + :vartype failover_group_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'status': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'earliest_restore_point': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, restorable_dropped_database_id: str=None, storage_container_sas_token: str=None, recoverable_database_id: str=None, **kwargs) -> None: + super(ManagedDatabase, self).__init__(location=location, tags=tags, **kwargs) + self.collation = collation + self.status = None + self.creation_date = None + self.earliest_restore_point = None + self.restore_point_in_time = restore_point_in_time + self.default_secondary_location = None + self.catalog_collation = catalog_collation + self.create_mode = create_mode + self.storage_container_uri = storage_container_uri + self.source_database_id = source_database_id + self.restorable_dropped_database_id = restorable_dropped_database_id + self.storage_container_sas_token = storage_container_sas_token + self.failover_group_id = None + self.recoverable_database_id = recoverable_database_id + + +class ManagedDatabaseSecurityAlertPolicy(ProxyResource): + """A managed database security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: + super(ManagedDatabaseSecurityAlertPolicy, self).__init__(**kwargs) + self.state = state + self.disabled_alerts = disabled_alerts + self.email_addresses = email_addresses + self.email_account_admins = email_account_admins + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.creation_time = None + + +class ManagedDatabaseUpdate(Model): + """An managed database update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param collation: Collation of the managed database. + :type collation: str + :ivar status: Status of the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' + :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus + :ivar creation_date: Creation date of the database. + :vartype creation_date: datetime + :ivar earliest_restore_point: Earliest restore point in time for point in + time restore. + :vartype earliest_restore_point: datetime + :param restore_point_in_time: Conditional. If createMode is + PointInTimeRestore, this value is required. Specifies the point in time + (ISO8601 format) of the source database that will be restored to create + the new database. + :type restore_point_in_time: datetime + :ivar default_secondary_location: Geo paired region. + :vartype default_secondary_location: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param create_mode: Managed database create mode. PointInTimeRestore: + Create a database by restoring a point in time backup of an existing + database. SourceDatabaseName, SourceManagedInstanceName and PointInTime + must be specified. RestoreExternalBackup: Create a database by restoring + from external backup files. Collation, StorageContainerUri and + StorageContainerSasToken must be specified. Recovery: Creates a database + by restoring a geo-replicated backup. RecoverableDatabaseId must be + specified as the recoverable database resource ID to restore. Possible + values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', + 'Recovery' + :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode + :param storage_container_uri: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the uri of the + storage container where backups for this restore are stored. + :type storage_container_uri: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :param restorable_dropped_database_id: The restorable dropped database + resource id to restore when creating this database. + :type restorable_dropped_database_id: str + :param storage_container_sas_token: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the storage + container sas token. + :type storage_container_sas_token: str + :ivar failover_group_id: Instance Failover Group resource identifier that + this managed database belongs to. + :vartype failover_group_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'status': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'earliest_restore_point': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + } + + _attribute_map = { + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, restorable_dropped_database_id: str=None, storage_container_sas_token: str=None, recoverable_database_id: str=None, tags=None, **kwargs) -> None: + super(ManagedDatabaseUpdate, self).__init__(**kwargs) + self.collation = collation + self.status = None + self.creation_date = None + self.earliest_restore_point = None + self.restore_point_in_time = restore_point_in_time + self.default_secondary_location = None + self.catalog_collation = catalog_collation + self.create_mode = create_mode + self.storage_container_uri = storage_container_uri + self.source_database_id = source_database_id + self.restorable_dropped_database_id = restorable_dropped_database_id + self.storage_container_sas_token = storage_container_sas_token + self.failover_group_id = None + self.recoverable_database_id = recoverable_database_id + self.tags = tags + + +class ManagedInstance(TrackedResource): + """An Azure SQL managed instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param identity: The Azure Active Directory identity of the managed + instance. + :type identity: ~azure.mgmt.sql.models.ResourceIdentity + :param sku: Managed instance SKU. Allowed values for sku.name: GP_Gen4, + GP_Gen5, BC_Gen4, BC_Gen5 + :type sku: ~azure.mgmt.sql.models.Sku + :param managed_instance_create_mode: Specifies the mode of database + creation. + Default: Regular instance creation. + Restore: Creates an instance by restoring a set of backups to specific + point in time. RestorePointInTime and SourceManagedInstanceId must be + specified. Possible values include: 'Default', 'PointInTimeRestore' + :type managed_instance_create_mode: str or + ~azure.mgmt.sql.models.ManagedServerCreateMode + :ivar fully_qualified_domain_name: The fully qualified domain name of the + managed instance. + :vartype fully_qualified_domain_name: str + :param administrator_login: Administrator username for the managed + instance. Can only be specified when the managed instance is being created + (and is required for creation). + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for managed instance creation). + :type administrator_login_password: str + :param subnet_id: Subnet resource ID for the managed instance. + :type subnet_id: str + :ivar state: The state of the managed instance. + :vartype state: str + :param license_type: The license type. Possible values are + 'LicenseIncluded' (regular price inclusive of a new SQL license) and + 'BasePrice' (discounted AHB price for bringing your own SQL licenses). + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or + ~azure.mgmt.sql.models.ManagedInstanceLicenseType + :param v_cores: The number of vCores. Allowed values: 8, 16, 24, 32, 40, + 64, 80. + :type v_cores: int + :param storage_size_in_gb: Storage size in GB. Minimum value: 32. Maximum + value: 8192. Increments of 32 GB allowed only. + :type storage_size_in_gb: int + :param collation: Collation of the managed instance. + :type collation: str + :ivar dns_zone: The Dns Zone that the managed instance is in. + :vartype dns_zone: str + :param dns_zone_partner: The resource id of another managed instance whose + DNS zone this managed instance will share after creation. + :type dns_zone_partner: str + :param public_data_endpoint_enabled: Whether or not the public data + endpoint is enabled. + :type public_data_endpoint_enabled: bool + :param source_managed_instance_id: The resource identifier of the source + managed instance associated with create operation of this instance. + :type source_managed_instance_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param proxy_override: Connection type used for connecting to the + instance. Possible values include: 'Proxy', 'Redirect', 'Default' + :type proxy_override: str or + ~azure.mgmt.sql.models.ManagedInstanceProxyOverride + :param timezone_id: Id of the timezone. Allowed values are timezones + supported by Windows. + Windows keeps details on supported timezones, including the id, in + registry under + KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time + Zones. + You can get those registry values via SQL Server by querying SELECT name + AS timezone_id FROM sys.time_zone_info. + List of Ids can also be obtained by executing + [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + An example of valid timezone id is "Pacific Standard Time" or "W. Europe + Standard Time". + :type timezone_id: str + :param instance_pool_id: The Id of the instance pool this managed server + belongs to. + :type instance_pool_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'fully_qualified_domain_name': {'readonly': True}, + 'state': {'readonly': True}, + 'dns_zone': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, + 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, + 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, + 'source_managed_instance_id': {'key': 'properties.sourceManagedInstanceId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, + 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, + 'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, identity=None, sku=None, managed_instance_create_mode=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type=None, v_cores: int=None, storage_size_in_gb: int=None, collation: str=None, dns_zone_partner: str=None, public_data_endpoint_enabled: bool=None, source_managed_instance_id: str=None, restore_point_in_time=None, proxy_override=None, timezone_id: str=None, instance_pool_id: str=None, **kwargs) -> None: + super(ManagedInstance, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity + self.sku = sku + self.managed_instance_create_mode = managed_instance_create_mode + self.fully_qualified_domain_name = None + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.subnet_id = subnet_id + self.state = None + self.license_type = license_type + self.v_cores = v_cores + self.storage_size_in_gb = storage_size_in_gb + self.collation = collation + self.dns_zone = None + self.dns_zone_partner = dns_zone_partner + self.public_data_endpoint_enabled = public_data_endpoint_enabled + self.source_managed_instance_id = source_managed_instance_id + self.restore_point_in_time = restore_point_in_time + self.proxy_override = proxy_override + self.timezone_id = timezone_id + self.instance_pool_id = instance_pool_id + + +class ManagedInstanceEditionCapability(Model): + """The managed server capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The managed server version name. + :vartype name: str + :ivar supported_families: The supported families. + :vartype supported_families: + list[~azure.mgmt.sql.models.ManagedInstanceFamilyCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_families': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_families': {'key': 'supportedFamilies', 'type': '[ManagedInstanceFamilyCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ManagedInstanceEditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_families = None + self.status = None + self.reason = reason + + +class ManagedInstanceEncryptionProtector(ProxyResource): + """The managed instance encryption protector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :vartype kind: str + :param server_key_name: The name of the managed instance key. + :type server_key_name: str + :param server_key_type: Required. The encryption protector type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :ivar uri: The URI of the server key. + :vartype uri: str + :ivar thumbprint: Thumbprint of the server key. + :vartype thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'server_key_type': {'required': True}, + 'uri': {'readonly': True}, + 'thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, *, server_key_type, server_key_name: str=None, **kwargs) -> None: + super(ManagedInstanceEncryptionProtector, self).__init__(**kwargs) + self.kind = None + self.server_key_name = server_key_name + self.server_key_type = server_key_type + self.uri = None + self.thumbprint = None + + +class ManagedInstanceFamilyCapability(Model): + """The managed server family capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Family name. + :vartype name: str + :ivar sku: SKU name. + :vartype sku: str + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar supported_vcores_values: List of supported virtual cores values. + :vartype supported_vcores_values: + list[~azure.mgmt.sql.models.ManagedInstanceVcoresCapability] + :ivar included_max_size: Included size. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar supported_storage_sizes: Storage size ranges. + :vartype supported_storage_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'supported_vcores_values': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'supported_storage_sizes': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'supported_vcores_values': {'key': 'supportedVcoresValues', 'type': '[ManagedInstanceVcoresCapability]'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'supported_storage_sizes': {'key': 'supportedStorageSizes', 'type': '[MaxSizeRangeCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ManagedInstanceFamilyCapability, self).__init__(**kwargs) + self.name = None + self.sku = None + self.supported_license_types = None + self.supported_vcores_values = None + self.included_max_size = None + self.supported_storage_sizes = None + self.status = None + self.reason = reason + + +class ManagedInstanceKey(ProxyResource): + """A managed instance key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :vartype kind: str + :param server_key_type: Required. The key type like 'ServiceManaged', + 'AzureKeyVault'. Possible values include: 'ServiceManaged', + 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :param uri: The URI of the key. If the ServerKeyType is AzureKeyVault, + then the URI is required. + :type uri: str + :ivar thumbprint: Thumbprint of the key. + :vartype thumbprint: str + :ivar creation_date: The key creation date. + :vartype creation_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'server_key_type': {'required': True}, + 'thumbprint': {'readonly': True}, + 'creation_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, server_key_type, uri: str=None, **kwargs) -> None: + super(ManagedInstanceKey, self).__init__(**kwargs) + self.kind = None + self.server_key_type = server_key_type + self.uri = uri + self.thumbprint = None + self.creation_date = None + + +class ManagedInstancePairInfo(Model): + """Pairs of Managed Instances in the failover group. + + :param primary_managed_instance_id: Id of Primary Managed Instance in + pair. + :type primary_managed_instance_id: str + :param partner_managed_instance_id: Id of Partner Managed Instance in + pair. + :type partner_managed_instance_id: str + """ + + _attribute_map = { + 'primary_managed_instance_id': {'key': 'primaryManagedInstanceId', 'type': 'str'}, + 'partner_managed_instance_id': {'key': 'partnerManagedInstanceId', 'type': 'str'}, + } + + def __init__(self, *, primary_managed_instance_id: str=None, partner_managed_instance_id: str=None, **kwargs) -> None: + super(ManagedInstancePairInfo, self).__init__(**kwargs) + self.primary_managed_instance_id = primary_managed_instance_id + self.partner_managed_instance_id = partner_managed_instance_id + + +class ManagedInstanceUpdate(Model): + """An update request for an Azure SQL Database managed instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param sku: Managed instance sku + :type sku: ~azure.mgmt.sql.models.Sku + :param managed_instance_create_mode: Specifies the mode of database + creation. + Default: Regular instance creation. + Restore: Creates an instance by restoring a set of backups to specific + point in time. RestorePointInTime and SourceManagedInstanceId must be + specified. Possible values include: 'Default', 'PointInTimeRestore' + :type managed_instance_create_mode: str or + ~azure.mgmt.sql.models.ManagedServerCreateMode + :ivar fully_qualified_domain_name: The fully qualified domain name of the + managed instance. + :vartype fully_qualified_domain_name: str + :param administrator_login: Administrator username for the managed + instance. Can only be specified when the managed instance is being created + (and is required for creation). + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for managed instance creation). + :type administrator_login_password: str + :param subnet_id: Subnet resource ID for the managed instance. + :type subnet_id: str + :ivar state: The state of the managed instance. + :vartype state: str + :param license_type: The license type. Possible values are + 'LicenseIncluded' (regular price inclusive of a new SQL license) and + 'BasePrice' (discounted AHB price for bringing your own SQL licenses). + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or + ~azure.mgmt.sql.models.ManagedInstanceLicenseType + :param v_cores: The number of vCores. Allowed values: 8, 16, 24, 32, 40, + 64, 80. + :type v_cores: int + :param storage_size_in_gb: Storage size in GB. Minimum value: 32. Maximum + value: 8192. Increments of 32 GB allowed only. + :type storage_size_in_gb: int + :param collation: Collation of the managed instance. + :type collation: str + :ivar dns_zone: The Dns Zone that the managed instance is in. + :vartype dns_zone: str + :param dns_zone_partner: The resource id of another managed instance whose + DNS zone this managed instance will share after creation. + :type dns_zone_partner: str + :param public_data_endpoint_enabled: Whether or not the public data + endpoint is enabled. + :type public_data_endpoint_enabled: bool + :param source_managed_instance_id: The resource identifier of the source + managed instance associated with create operation of this instance. + :type source_managed_instance_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param proxy_override: Connection type used for connecting to the + instance. Possible values include: 'Proxy', 'Redirect', 'Default' + :type proxy_override: str or + ~azure.mgmt.sql.models.ManagedInstanceProxyOverride + :param timezone_id: Id of the timezone. Allowed values are timezones + supported by Windows. + Windows keeps details on supported timezones, including the id, in + registry under + KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time + Zones. + You can get those registry values via SQL Server by querying SELECT name + AS timezone_id FROM sys.time_zone_info. + List of Ids can also be obtained by executing + [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + An example of valid timezone id is "Pacific Standard Time" or "W. Europe + Standard Time". + :type timezone_id: str + :param instance_pool_id: The Id of the instance pool this managed server + belongs to. + :type instance_pool_id: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'fully_qualified_domain_name': {'readonly': True}, + 'state': {'readonly': True}, + 'dns_zone': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, + 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, + 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, + 'source_managed_instance_id': {'key': 'properties.sourceManagedInstanceId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, + 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, + 'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, sku=None, managed_instance_create_mode=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type=None, v_cores: int=None, storage_size_in_gb: int=None, collation: str=None, dns_zone_partner: str=None, public_data_endpoint_enabled: bool=None, source_managed_instance_id: str=None, restore_point_in_time=None, proxy_override=None, timezone_id: str=None, instance_pool_id: str=None, tags=None, **kwargs) -> None: + super(ManagedInstanceUpdate, self).__init__(**kwargs) + self.sku = sku + self.managed_instance_create_mode = managed_instance_create_mode + self.fully_qualified_domain_name = None + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.subnet_id = subnet_id + self.state = None + self.license_type = license_type + self.v_cores = v_cores + self.storage_size_in_gb = storage_size_in_gb + self.collation = collation + self.dns_zone = None + self.dns_zone_partner = dns_zone_partner + self.public_data_endpoint_enabled = public_data_endpoint_enabled + self.source_managed_instance_id = source_managed_instance_id + self.restore_point_in_time = restore_point_in_time + self.proxy_override = proxy_override + self.timezone_id = timezone_id + self.instance_pool_id = instance_pool_id + self.tags = tags + + +class ManagedInstanceVcoresCapability(Model): + """The managed instance virtual cores capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The virtual cores identifier. + :vartype name: str + :ivar value: The virtual cores value. + :vartype value: int + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'int'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ManagedInstanceVcoresCapability, self).__init__(**kwargs) + self.name = None + self.value = None + self.status = None + self.reason = reason + + +class ManagedInstanceVersionCapability(Model): + """The managed instance capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The server version name. + :vartype name: str + :ivar supported_editions: The list of supported managed instance editions. + :vartype supported_editions: + list[~azure.mgmt.sql.models.ManagedInstanceEditionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_editions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_editions': {'key': 'supportedEditions', 'type': '[ManagedInstanceEditionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ManagedInstanceVersionCapability, self).__init__(**kwargs) + self.name = None + self.supported_editions = None + self.status = None + self.reason = reason + + +class ManagedInstanceVulnerabilityAssessment(ProxyResource): + """A managed instance vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: Required. A blob storage container path to + hold the scan results (e.g. + https://myStorage.blob.core.windows.net/VaScans/). + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_container_path': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, *, storage_container_path: str, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: + super(ManagedInstanceVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = storage_container_path + self.storage_container_sas_key = storage_container_sas_key + self.storage_account_access_key = storage_account_access_key + self.recurring_scans = recurring_scans + + +class ManagedServerSecurityAlertPolicy(ProxyResource): + """A managed server security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: + super(ManagedServerSecurityAlertPolicy, self).__init__(**kwargs) + self.state = state + self.disabled_alerts = disabled_alerts + self.email_addresses = email_addresses + self.email_account_admins = email_account_admins + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.creation_time = None + + +class MaxSizeCapability(Model): + """The maximum size capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The maximum size limit (see 'unit' for the units). + :vartype limit: int + :ivar unit: The units that the limit is expressed in. Possible values + include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' + :vartype unit: str or ~azure.mgmt.sql.models.MaxSizeUnit + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'int'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MaxSizeCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + + +class MaxSizeRangeCapability(Model): + """The maximum size range capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar min_value: Minimum value. + :vartype min_value: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar max_value: Maximum value. + :vartype max_value: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar scale_size: Scale/step size for discrete values between the minimum + value and the maximum value. + :vartype scale_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar log_size: Size of transaction log. + :vartype log_size: ~azure.mgmt.sql.models.LogSizeCapability + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'min_value': {'readonly': True}, + 'max_value': {'readonly': True}, + 'scale_size': {'readonly': True}, + 'log_size': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'min_value': {'key': 'minValue', 'type': 'MaxSizeCapability'}, + 'max_value': {'key': 'maxValue', 'type': 'MaxSizeCapability'}, + 'scale_size': {'key': 'scaleSize', 'type': 'MaxSizeCapability'}, + 'log_size': {'key': 'logSize', 'type': 'LogSizeCapability'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(MaxSizeRangeCapability, self).__init__(**kwargs) + self.min_value = None + self.max_value = None + self.scale_size = None + self.log_size = None + self.status = None + self.reason = reason + + +class Metric(Model): + """Database metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar start_time: The start time for the metric (ISO-8601 format). + :vartype start_time: datetime + :ivar end_time: The end time for the metric (ISO-8601 format). + :vartype end_time: datetime + :ivar time_grain: The time step to be used to summarize the metric values. + :vartype time_grain: str + :ivar unit: The unit of the metric. Possible values include: 'count', + 'bytes', 'seconds', 'percent', 'countPerSecond', 'bytesPerSecond' + :vartype unit: str or ~azure.mgmt.sql.models.UnitType + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.sql.models.MetricName + :ivar metric_values: The metric values for the specified time window and + timestep. + :vartype metric_values: list[~azure.mgmt.sql.models.MetricValue] + """ + + _validation = { + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'time_grain': {'readonly': True}, + 'unit': {'readonly': True}, + 'name': {'readonly': True}, + 'metric_values': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'MetricName'}, + 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, + } + + def __init__(self, **kwargs) -> None: + super(Metric, self).__init__(**kwargs) + self.start_time = None + self.end_time = None + self.time_grain = None + self.unit = None + self.name = None + self.metric_values = None + + +class MetricAvailability(Model): + """A metric availability value. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar retention: The length of retention for the database metric. + :vartype retention: str + :ivar time_grain: The granularity of the database metric. + :vartype time_grain: str + """ + + _validation = { + 'retention': {'readonly': True}, + 'time_grain': {'readonly': True}, + } + + _attribute_map = { + 'retention': {'key': 'retention', 'type': 'str'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MetricAvailability, self).__init__(**kwargs) + self.retention = None + self.time_grain = None + + +class MetricDefinition(Model): + """A database metric definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.sql.models.MetricName + :ivar primary_aggregation_type: The primary aggregation type defining how + metric values are displayed. Possible values include: 'None', 'Average', + 'Count', 'Minimum', 'Maximum', 'Total' + :vartype primary_aggregation_type: str or + ~azure.mgmt.sql.models.PrimaryAggregationType + :ivar resource_uri: The resource uri of the database. + :vartype resource_uri: str + :ivar unit: The unit of the metric. Possible values include: 'Count', + 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' + :vartype unit: str or ~azure.mgmt.sql.models.UnitDefinitionType + :ivar metric_availabilities: The list of database metric availabilities + for the metric. + :vartype metric_availabilities: + list[~azure.mgmt.sql.models.MetricAvailability] + """ + + _validation = { + 'name': {'readonly': True}, + 'primary_aggregation_type': {'readonly': True}, + 'resource_uri': {'readonly': True}, + 'unit': {'readonly': True}, + 'metric_availabilities': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'MetricName'}, + 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, + } + + def __init__(self, **kwargs) -> None: + super(MetricDefinition, self).__init__(**kwargs) + self.name = None + self.primary_aggregation_type = None + self.resource_uri = None + self.unit = None + self.metric_availabilities = None + + +class MetricName(Model): + """A database metric name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The name of the database metric. + :vartype value: str + :ivar localized_value: The friendly name of the database metric. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MetricName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class MetricValue(Model): + """Represents database metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar count: The number of values for the metric. + :vartype count: float + :ivar average: The average value of the metric. + :vartype average: float + :ivar maximum: The max value of the metric. + :vartype maximum: float + :ivar minimum: The min value of the metric. + :vartype minimum: float + :ivar timestamp: The metric timestamp (ISO-8601 format). + :vartype timestamp: datetime + :ivar total: The total value of the metric. + :vartype total: float + """ + + _validation = { + 'count': {'readonly': True}, + 'average': {'readonly': True}, + 'maximum': {'readonly': True}, + 'minimum': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'total': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'float'}, + 'average': {'key': 'average', 'type': 'float'}, + 'maximum': {'key': 'maximum', 'type': 'float'}, + 'minimum': {'key': 'minimum', 'type': 'float'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'total': {'key': 'total', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(MetricValue, self).__init__(**kwargs) + self.count = None + self.average = None + self.maximum = None + self.minimum = None + self.timestamp = None + self.total = None + + +class Name(Model): + """ARM Usage Name. + + :param value: Usage name value + :type value: str + :param localized_value: Usage name localized value. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: + super(Name, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class Operation(Model): + """SQL REST API operation definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the operation being performed on this particular + object. + :vartype name: str + :ivar display: The localized display information for this particular + operation / action. + :vartype display: ~azure.mgmt.sql.models.OperationDisplay + :ivar origin: The intended executor of the operation. Possible values + include: 'user', 'system' + :vartype origin: str or ~azure.mgmt.sql.models.OperationOrigin + :ivar properties: Additional descriptions for the operation. + :vartype properties: dict[str, object] + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + 'origin': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + } + + def __init__(self, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + self.origin = None + self.properties = None + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The localized friendly form of the resource provider name. + :vartype provider: str + :ivar resource: The localized friendly form of the resource type related + to this action/operation. + :vartype resource: str + :ivar operation: The localized friendly name for the operation. + :vartype operation: str + :ivar description: The localized friendly description for the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class OperationImpact(Model): + """The impact of an operation, both in absolute and relative terms. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the impact dimension. + :vartype name: str + :ivar unit: The unit in which estimated impact to dimension is measured. + :vartype unit: str + :ivar change_value_absolute: The absolute impact to dimension. + :vartype change_value_absolute: float + :ivar change_value_relative: The relative impact to dimension (null if not + applicable) + :vartype change_value_relative: float + """ + + _validation = { + 'name': {'readonly': True}, + 'unit': {'readonly': True}, + 'change_value_absolute': {'readonly': True}, + 'change_value_relative': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'change_value_absolute': {'key': 'changeValueAbsolute', 'type': 'float'}, + 'change_value_relative': {'key': 'changeValueRelative', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationImpact, self).__init__(**kwargs) + self.name = None + self.unit = None + self.change_value_absolute = None + self.change_value_relative = None + + +class PartnerInfo(Model): + """Partner server information for the failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource identifier of the partner server. + :type id: str + :ivar location: Geo location of the partner server. + :vartype location: str + :ivar replication_role: Replication role of the partner server. Possible + values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.FailoverGroupReplicationRole + """ + + _validation = { + 'id': {'required': True}, + 'location': {'readonly': True}, + 'replication_role': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'replication_role': {'key': 'replicationRole', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(PartnerInfo, self).__init__(**kwargs) + self.id = id + self.location = None + self.replication_role = None + + +class PartnerRegionInfo(Model): + """Partner region information for the failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param location: Geo location of the partner managed instances. + :type location: str + :ivar replication_role: Replication role of the partner managed instances. + Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole + """ + + _validation = { + 'replication_role': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'replication_role': {'key': 'replicationRole', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, **kwargs) -> None: + super(PartnerRegionInfo, self).__init__(**kwargs) + self.location = location + self.replication_role = None + + +class PerformanceLevelCapability(Model): + """The performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: Performance level value. + :vartype value: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + """ + + _validation = { + 'value': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(PerformanceLevelCapability, self).__init__(**kwargs) + self.value = None + self.unit = None + + +class RecommendedElasticPool(ProxyResource): + """Represents a recommended elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_edition: The edition of the recommended elastic pool. The + ElasticPoolEdition enumeration contains all the valid editions. Possible + values include: 'Basic', 'Standard', 'Premium', 'GeneralPurpose', + 'BusinessCritical' + :vartype database_edition: str or + ~azure.mgmt.sql.models.ElasticPoolEdition + :param dtu: The DTU for the recommended elastic pool. + :type dtu: float + :param database_dtu_min: The minimum DTU for the database. + :type database_dtu_min: float + :param database_dtu_max: The maximum DTU for the database. + :type database_dtu_max: float + :param storage_mb: Gets storage size in megabytes. + :type storage_mb: float + :ivar observation_period_start: The observation period start (ISO8601 + format). + :vartype observation_period_start: datetime + :ivar observation_period_end: The observation period start (ISO8601 + format). + :vartype observation_period_end: datetime + :ivar max_observed_dtu: Gets maximum observed DTU. + :vartype max_observed_dtu: float + :ivar max_observed_storage_mb: Gets maximum observed storage in megabytes. + :vartype max_observed_storage_mb: float + :ivar databases: The list of databases in this pool. Expanded property + :vartype databases: list[~azure.mgmt.sql.models.TrackedResource] + :ivar metrics: The list of databases housed in the server. Expanded + property + :vartype metrics: + list[~azure.mgmt.sql.models.RecommendedElasticPoolMetric] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_edition': {'readonly': True}, + 'observation_period_start': {'readonly': True}, + 'observation_period_end': {'readonly': True}, + 'max_observed_dtu': {'readonly': True}, + 'max_observed_storage_mb': {'readonly': True}, + 'databases': {'readonly': True}, + 'metrics': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'dtu': {'key': 'properties.dtu', 'type': 'float'}, + 'database_dtu_min': {'key': 'properties.databaseDtuMin', 'type': 'float'}, + 'database_dtu_max': {'key': 'properties.databaseDtuMax', 'type': 'float'}, + 'storage_mb': {'key': 'properties.storageMB', 'type': 'float'}, + 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, + 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, + 'max_observed_dtu': {'key': 'properties.maxObservedDtu', 'type': 'float'}, + 'max_observed_storage_mb': {'key': 'properties.maxObservedStorageMB', 'type': 'float'}, + 'databases': {'key': 'properties.databases', 'type': '[TrackedResource]'}, + 'metrics': {'key': 'properties.metrics', 'type': '[RecommendedElasticPoolMetric]'}, + } + + def __init__(self, *, dtu: float=None, database_dtu_min: float=None, database_dtu_max: float=None, storage_mb: float=None, **kwargs) -> None: + super(RecommendedElasticPool, self).__init__(**kwargs) + self.database_edition = None + self.dtu = dtu + self.database_dtu_min = database_dtu_min + self.database_dtu_max = database_dtu_max + self.storage_mb = storage_mb + self.observation_period_start = None + self.observation_period_end = None + self.max_observed_dtu = None + self.max_observed_storage_mb = None + self.databases = None + self.metrics = None + + +class RecommendedElasticPoolMetric(Model): + """Represents recommended elastic pool metric. + + :param date_time_property: The time of metric (ISO8601 format). + :type date_time_property: datetime + :param dtu: Gets or sets the DTUs (Database Transaction Units). See + https://azure.microsoft.com/documentation/articles/sql-database-what-is-a-dtu/ + :type dtu: float + :param size_gb: Gets or sets size in gigabytes. + :type size_gb: float + """ + + _attribute_map = { + 'date_time_property': {'key': 'dateTime', 'type': 'iso-8601'}, + 'dtu': {'key': 'dtu', 'type': 'float'}, + 'size_gb': {'key': 'sizeGB', 'type': 'float'}, + } + + def __init__(self, *, date_time_property=None, dtu: float=None, size_gb: float=None, **kwargs) -> None: + super(RecommendedElasticPoolMetric, self).__init__(**kwargs) + self.date_time_property = date_time_property + self.dtu = dtu + self.size_gb = size_gb + + +class RecommendedIndex(ProxyResource): + """Represents a database recommended index. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar action: The proposed index action. You can create a missing index, + drop an unused index, or rebuild an existing index to improve its + performance. Possible values include: 'Create', 'Drop', 'Rebuild' + :vartype action: str or ~azure.mgmt.sql.models.RecommendedIndexAction + :ivar state: The current recommendation state. Possible values include: + 'Active', 'Pending', 'Executing', 'Verifying', 'Pending Revert', + 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success' + :vartype state: str or ~azure.mgmt.sql.models.RecommendedIndexState + :ivar created: The UTC datetime showing when this resource was created + (ISO8601 format). + :vartype created: datetime + :ivar last_modified: The UTC datetime of when was this resource last + changed (ISO8601 format). + :vartype last_modified: datetime + :ivar index_type: The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, + CLUSTERED COLUMNSTORE). Possible values include: 'CLUSTERED', + 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED COLUMNSTORE' + :vartype index_type: str or ~azure.mgmt.sql.models.RecommendedIndexType + :ivar schema: The schema where table to build index over resides + :vartype schema: str + :ivar table: The table on which to build index. + :vartype table: str + :ivar columns: Columns over which to build index + :vartype columns: list[str] + :ivar included_columns: The list of column names to be included in the + index + :vartype included_columns: list[str] + :ivar index_script: The full build index script + :vartype index_script: str + :ivar estimated_impact: The estimated impact of doing recommended index + action. + :vartype estimated_impact: list[~azure.mgmt.sql.models.OperationImpact] + :ivar reported_impact: The values reported after index action is complete. + :vartype reported_impact: list[~azure.mgmt.sql.models.OperationImpact] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'action': {'readonly': True}, + 'state': {'readonly': True}, + 'created': {'readonly': True}, + 'last_modified': {'readonly': True}, + 'index_type': {'readonly': True}, + 'schema': {'readonly': True}, + 'table': {'readonly': True}, + 'columns': {'readonly': True}, + 'included_columns': {'readonly': True}, + 'index_script': {'readonly': True}, + 'estimated_impact': {'readonly': True}, + 'reported_impact': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'action': {'key': 'properties.action', 'type': 'RecommendedIndexAction'}, + 'state': {'key': 'properties.state', 'type': 'RecommendedIndexState'}, + 'created': {'key': 'properties.created', 'type': 'iso-8601'}, + 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, + 'index_type': {'key': 'properties.indexType', 'type': 'RecommendedIndexType'}, + 'schema': {'key': 'properties.schema', 'type': 'str'}, + 'table': {'key': 'properties.table', 'type': 'str'}, + 'columns': {'key': 'properties.columns', 'type': '[str]'}, + 'included_columns': {'key': 'properties.includedColumns', 'type': '[str]'}, + 'index_script': {'key': 'properties.indexScript', 'type': 'str'}, + 'estimated_impact': {'key': 'properties.estimatedImpact', 'type': '[OperationImpact]'}, + 'reported_impact': {'key': 'properties.reportedImpact', 'type': '[OperationImpact]'}, + } + + def __init__(self, **kwargs) -> None: + super(RecommendedIndex, self).__init__(**kwargs) + self.action = None + self.state = None + self.created = None + self.last_modified = None + self.index_type = None + self.schema = None + self.table = None + self.columns = None + self.included_columns = None + self.index_script = None + self.estimated_impact = None + self.reported_impact = None + + +class RecoverableDatabase(ProxyResource): + """A recoverable database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar edition: The edition of the database + :vartype edition: str + :ivar service_level_objective: The service level objective name of the + database + :vartype service_level_objective: str + :ivar elastic_pool_name: The elastic pool name of the database + :vartype elastic_pool_name: str + :ivar last_available_backup_date: The last available backup date of the + database (ISO8601 format) + :vartype last_available_backup_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'edition': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'last_available_backup_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(RecoverableDatabase, self).__init__(**kwargs) + self.edition = None + self.service_level_objective = None + self.elastic_pool_name = None + self.last_available_backup_date = None + + +class RecoverableManagedDatabase(ProxyResource): + """A recoverable managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar last_available_backup_date: The last available backup date. + :vartype last_available_backup_date: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_available_backup_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(RecoverableManagedDatabase, self).__init__(**kwargs) + self.last_available_backup_date = None + + +class ReplicationLink(ProxyResource): + """Represents a database replication link. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Location of the server that contains this firewall rule. + :vartype location: str + :ivar is_termination_allowed: Legacy value indicating whether termination + is allowed. Currently always returns true. + :vartype is_termination_allowed: bool + :ivar replication_mode: Replication mode of this replication link. + :vartype replication_mode: str + :ivar partner_server: The name of the server hosting the partner database. + :vartype partner_server: str + :ivar partner_database: The name of the partner database. + :vartype partner_database: str + :ivar partner_location: The Azure Region of the partner database. + :vartype partner_location: str + :ivar role: The role of the database in the replication link. Possible + values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', + 'Copy' + :vartype role: str or ~azure.mgmt.sql.models.ReplicationRole + :ivar partner_role: The role of the partner database in the replication + link. Possible values include: 'Primary', 'Secondary', + 'NonReadableSecondary', 'Source', 'Copy' + :vartype partner_role: str or ~azure.mgmt.sql.models.ReplicationRole + :ivar start_time: The start time for the replication link. + :vartype start_time: datetime + :ivar percent_complete: The percentage of seeding complete for the + replication link. + :vartype percent_complete: int + :ivar replication_state: The replication state for the replication link. + Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP', 'SUSPENDED' + :vartype replication_state: str or ~azure.mgmt.sql.models.ReplicationState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'is_termination_allowed': {'readonly': True}, + 'replication_mode': {'readonly': True}, + 'partner_server': {'readonly': True}, + 'partner_database': {'readonly': True}, + 'partner_location': {'readonly': True}, + 'role': {'readonly': True}, + 'partner_role': {'readonly': True}, + 'start_time': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'replication_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'is_termination_allowed': {'key': 'properties.isTerminationAllowed', 'type': 'bool'}, + 'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'}, + 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, + 'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'}, + 'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'}, + 'role': {'key': 'properties.role', 'type': 'ReplicationRole'}, + 'partner_role': {'key': 'properties.partnerRole', 'type': 'ReplicationRole'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ReplicationLink, self).__init__(**kwargs) + self.location = None + self.is_termination_allowed = None + self.replication_mode = None + self.partner_server = None + self.partner_database = None + self.partner_location = None + self.role = None + self.partner_role = None + self.start_time = None + self.percent_complete = None + self.replication_state = None + + +class ResourceIdentity(Model): + """Azure Active Directory identity configuration for a resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The Azure Active Directory principal id. + :vartype principal_id: str + :param type: The identity type. Set this to 'SystemAssigned' in order to + automatically create and assign an Azure Active Directory principal for + the resource. Possible values include: 'SystemAssigned' + :type type: str or ~azure.mgmt.sql.models.IdentityType + :ivar tenant_id: The Azure Active Directory tenant id. + :vartype tenant_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(ResourceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.type = type + self.tenant_id = None + + +class ResourceMoveDefinition(Model): + """Contains the information necessary to perform a resource move (rename). + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The target ID for the resource + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(ResourceMoveDefinition, self).__init__(**kwargs) + self.id = id + + +class RestorableDroppedDatabase(ProxyResource): + """A restorable dropped database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: The geo-location where the resource lives + :vartype location: str + :ivar database_name: The name of the database + :vartype database_name: str + :ivar edition: The edition of the database + :vartype edition: str + :ivar max_size_bytes: The max size in bytes of the database + :vartype max_size_bytes: str + :ivar service_level_objective: The service level objective name of the + database + :vartype service_level_objective: str + :ivar elastic_pool_name: The elastic pool name of the database + :vartype elastic_pool_name: str + :ivar creation_date: The creation date of the database (ISO8601 format) + :vartype creation_date: datetime + :ivar deletion_date: The deletion date of the database (ISO8601 format) + :vartype deletion_date: datetime + :ivar earliest_restore_date: The earliest restore date of the database + (ISO8601 format) + :vartype earliest_restore_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'database_name': {'readonly': True}, + 'edition': {'readonly': True}, + 'max_size_bytes': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(RestorableDroppedDatabase, self).__init__(**kwargs) + self.location = None + self.database_name = None + self.edition = None + self.max_size_bytes = None + self.service_level_objective = None + self.elastic_pool_name = None + self.creation_date = None + self.deletion_date = None + self.earliest_restore_date = None + + +class RestorableDroppedManagedDatabase(TrackedResource): + """A restorable dropped managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar database_name: The name of the database. + :vartype database_name: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar deletion_date: The deletion date of the database (ISO8601 format). + :vartype deletion_date: datetime + :ivar earliest_restore_date: The earliest restore date of the database + (ISO8601 format). + :vartype earliest_restore_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'database_name': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(RestorableDroppedManagedDatabase, self).__init__(location=location, tags=tags, **kwargs) + self.database_name = None + self.creation_date = None + self.deletion_date = None + self.earliest_restore_date = None + + +class RestorePoint(ProxyResource): + """Database restore points. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar restore_point_type: The type of restore point. Possible values + include: 'CONTINUOUS', 'DISCRETE' + :vartype restore_point_type: str or + ~azure.mgmt.sql.models.RestorePointType + :ivar earliest_restore_date: The earliest time to which this database can + be restored + :vartype earliest_restore_date: datetime + :ivar restore_point_creation_date: The time the backup was taken + :vartype restore_point_creation_date: datetime + :ivar restore_point_label: The label of restore point for backup request + by user + :vartype restore_point_label: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'restore_point_type': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'restore_point_creation_date': {'readonly': True}, + 'restore_point_label': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'restore_point_type': {'key': 'properties.restorePointType', 'type': 'RestorePointType'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, + 'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(RestorePoint, self).__init__(**kwargs) + self.location = None + self.restore_point_type = None + self.earliest_restore_date = None + self.restore_point_creation_date = None + self.restore_point_label = None + + +class SensitivityLabel(ProxyResource): + """A sensitivity label. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param label_name: The label name. + :type label_name: str + :param label_id: The label ID. + :type label_id: str + :param information_type: The information type. + :type information_type: str + :param information_type_id: The information type ID. + :type information_type_id: str + :ivar is_disabled: Is sensitivity recommendation disabled. Applicable for + recommended sensitivity label only. Specifies whether the sensitivity + recommendation on this column is disabled (dismissed) or not. + :vartype is_disabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'is_disabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'label_name': {'key': 'properties.labelName', 'type': 'str'}, + 'label_id': {'key': 'properties.labelId', 'type': 'str'}, + 'information_type': {'key': 'properties.informationType', 'type': 'str'}, + 'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'}, + 'is_disabled': {'key': 'properties.isDisabled', 'type': 'bool'}, + } + + def __init__(self, *, label_name: str=None, label_id: str=None, information_type: str=None, information_type_id: str=None, **kwargs) -> None: + super(SensitivityLabel, self).__init__(**kwargs) + self.label_name = label_name + self.label_id = label_id + self.information_type = information_type + self.information_type_id = information_type_id + self.is_disabled = None + + +class Server(TrackedResource): + """An Azure SQL Database server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param identity: The Azure Active Directory identity of the server. + :type identity: ~azure.mgmt.sql.models.ResourceIdentity + :ivar kind: Kind of sql server. This is metadata used for the Azure portal + experience. + :vartype kind: str + :param administrator_login: Administrator username for the server. Once + created it cannot be changed. + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for server creation). + :type administrator_login_password: str + :param version: The version of the server. + :type version: str + :ivar state: The state of the server. + :vartype state: str + :ivar fully_qualified_domain_name: The fully qualified domain name of the + server. + :vartype fully_qualified_domain_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'state': {'readonly': True}, + 'fully_qualified_domain_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, identity=None, administrator_login: str=None, administrator_login_password: str=None, version: str=None, **kwargs) -> None: + super(Server, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity + self.kind = None + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.version = version + self.state = None + self.fully_qualified_domain_name = None + + +class ServerAutomaticTuning(ProxyResource): + """Server-level Automatic Tuning. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param desired_state: Automatic tuning desired state. Possible values + include: 'Custom', 'Auto', 'Unspecified' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningServerMode + :ivar actual_state: Automatic tuning actual state. Possible values + include: 'Custom', 'Auto', 'Unspecified' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningServerMode + :param options: Automatic tuning options definition. + :type options: dict[str, + ~azure.mgmt.sql.models.AutomaticTuningServerOptions] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'actual_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningServerMode'}, + 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningServerMode'}, + 'options': {'key': 'properties.options', 'type': '{AutomaticTuningServerOptions}'}, + } + + def __init__(self, *, desired_state=None, options=None, **kwargs) -> None: + super(ServerAutomaticTuning, self).__init__(**kwargs) + self.desired_state = desired_state + self.actual_state = None + self.options = options + + +class ServerAzureADAdministrator(ProxyResource): + """An server Active Directory Administrator. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar administrator_type: Required. The type of administrator. Default + value: "ActiveDirectory" . + :vartype administrator_type: str + :param login: Required. The server administrator login value. + :type login: str + :param sid: Required. The server administrator Sid (Secure ID). + :type sid: str + :param tenant_id: Required. The server Active Directory Administrator + tenant id. + :type tenant_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'administrator_type': {'required': True, 'constant': True}, + 'login': {'required': True}, + 'sid': {'required': True}, + 'tenant_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, + 'login': {'key': 'properties.login', 'type': 'str'}, + 'sid': {'key': 'properties.sid', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + } + + administrator_type = "ActiveDirectory" + + def __init__(self, *, login: str, sid: str, tenant_id: str, **kwargs) -> None: + super(ServerAzureADAdministrator, self).__init__(**kwargs) + self.login = login + self.sid = sid + self.tenant_id = tenant_id + + +class ServerBlobAuditingPolicy(ProxyResource): + """A server blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: + super(ServerBlobAuditingPolicy, self).__init__(**kwargs) + self.state = state + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.audit_actions_and_groups = audit_actions_and_groups + self.storage_account_subscription_id = storage_account_subscription_id + self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use + self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + + +class ServerCommunicationLink(ProxyResource): + """Server communication link. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar state: The state. + :vartype state: str + :param partner_server: Required. The name of the partner server. + :type partner_server: str + :ivar location: Communication link location. + :vartype location: str + :ivar kind: Communication link kind. This property is used for Azure + Portal metadata. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'partner_server': {'required': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, partner_server: str, **kwargs) -> None: + super(ServerCommunicationLink, self).__init__(**kwargs) + self.state = None + self.partner_server = partner_server + self.location = None + self.kind = None + + +class ServerConnectionPolicy(ProxyResource): + """A server secure connection policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Metadata used for the Azure portal experience. + :vartype kind: str + :ivar location: Resource location. + :vartype location: str + :param connection_type: Required. The server connection type. Possible + values include: 'Default', 'Proxy', 'Redirect' + :type connection_type: str or ~azure.mgmt.sql.models.ServerConnectionType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + 'connection_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'connection_type': {'key': 'properties.connectionType', 'type': 'ServerConnectionType'}, + } + + def __init__(self, *, connection_type, **kwargs) -> None: + super(ServerConnectionPolicy, self).__init__(**kwargs) + self.kind = None + self.location = None + self.connection_type = connection_type + + +class ServerDnsAlias(ProxyResource): + """A server DNS alias. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar azure_dns_record: The fully qualified DNS record for alias + :vartype azure_dns_record: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'azure_dns_record': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'azure_dns_record': {'key': 'properties.azureDnsRecord', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ServerDnsAlias, self).__init__(**kwargs) + self.azure_dns_record = None + + +class ServerDnsAliasAcquisition(Model): + """A server DNS alias acquisition request. + + :param old_server_dns_alias_id: The id of the server alias that will be + acquired to point to this server instead. + :type old_server_dns_alias_id: str + """ + + _attribute_map = { + 'old_server_dns_alias_id': {'key': 'oldServerDnsAliasId', 'type': 'str'}, + } + + def __init__(self, *, old_server_dns_alias_id: str=None, **kwargs) -> None: + super(ServerDnsAliasAcquisition, self).__init__(**kwargs) + self.old_server_dns_alias_id = old_server_dns_alias_id + + +class ServerKey(ProxyResource): + """A server key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :type kind: str + :ivar location: Resource location. + :vartype location: str + :ivar subregion: Subregion of the server key. + :vartype subregion: str + :param server_key_type: Required. The server key type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :param uri: The URI of the server key. + :type uri: str + :param thumbprint: Thumbprint of the server key. + :type thumbprint: str + :param creation_date: The server key creation date. + :type creation_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'subregion': {'readonly': True}, + 'server_key_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'subregion': {'key': 'properties.subregion', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, server_key_type, kind: str=None, uri: str=None, thumbprint: str=None, creation_date=None, **kwargs) -> None: + super(ServerKey, self).__init__(**kwargs) + self.kind = kind + self.location = None + self.subregion = None + self.server_key_type = server_key_type + self.uri = uri + self.thumbprint = thumbprint + self.creation_date = creation_date + + +class ServerSecurityAlertPolicy(ProxyResource): + """A server security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: + super(ServerSecurityAlertPolicy, self).__init__(**kwargs) + self.state = state + self.disabled_alerts = disabled_alerts + self.email_addresses = email_addresses + self.email_account_admins = email_account_admins + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.creation_time = None + + +class ServerUpdate(Model): + """An update request for an Azure SQL Database server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param administrator_login: Administrator username for the server. Once + created it cannot be changed. + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for server creation). + :type administrator_login_password: str + :param version: The version of the server. + :type version: str + :ivar state: The state of the server. + :vartype state: str + :ivar fully_qualified_domain_name: The fully qualified domain name of the + server. + :vartype fully_qualified_domain_name: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'state': {'readonly': True}, + 'fully_qualified_domain_name': {'readonly': True}, + } + + _attribute_map = { + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, administrator_login: str=None, administrator_login_password: str=None, version: str=None, tags=None, **kwargs) -> None: + super(ServerUpdate, self).__init__(**kwargs) + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.version = version + self.state = None + self.fully_qualified_domain_name = None + self.tags = tags + + +class ServerUsage(Model): + """Represents server metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the server usage metric. + :vartype name: str + :ivar resource_name: The name of the resource. + :vartype resource_name: str + :ivar display_name: The metric display name. + :vartype display_name: str + :ivar current_value: The current value of the metric. + :vartype current_value: float + :ivar limit: The current limit of the metric. + :vartype limit: float + :ivar unit: The units of the metric. + :vartype unit: str + :ivar next_reset_time: The next reset time for the metric (ISO8601 + format). + :vartype next_reset_time: datetime + """ + + _validation = { + 'name': {'readonly': True}, + 'resource_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'next_reset_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(ServerUsage, self).__init__(**kwargs) + self.name = None + self.resource_name = None + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + self.next_reset_time = None + + +class ServerVersionCapability(Model): + """The server capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The server version name. + :vartype name: str + :ivar supported_editions: The list of supported database editions. + :vartype supported_editions: + list[~azure.mgmt.sql.models.EditionCapability] + :ivar supported_elastic_pool_editions: The list of supported elastic pool + editions. + :vartype supported_elastic_pool_editions: + list[~azure.mgmt.sql.models.ElasticPoolEditionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_editions': {'readonly': True}, + 'supported_elastic_pool_editions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_editions': {'key': 'supportedEditions', 'type': '[EditionCapability]'}, + 'supported_elastic_pool_editions': {'key': 'supportedElasticPoolEditions', 'type': '[ElasticPoolEditionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ServerVersionCapability, self).__init__(**kwargs) + self.name = None + self.supported_editions = None + self.supported_elastic_pool_editions = None + self.status = None + self.reason = reason + + +class ServerVulnerabilityAssessment(ProxyResource): + """A server vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: Required. A blob storage container path to + hold the scan results (e.g. + https://myStorage.blob.core.windows.net/VaScans/). + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_container_path': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, *, storage_container_path: str, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: + super(ServerVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = storage_container_path + self.storage_container_sas_key = storage_container_sas_key + self.storage_account_access_key = storage_account_access_key + self.recurring_scans = recurring_scans + + +class ServiceObjective(ProxyResource): + """Represents a database service objective. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar service_objective_name: The name for the service objective. + :vartype service_objective_name: str + :ivar is_default: Gets whether the service level objective is the default + service objective. + :vartype is_default: bool + :ivar is_system: Gets whether the service level objective is a system + service objective. + :vartype is_system: bool + :ivar description: The description for the service level objective. + :vartype description: str + :ivar enabled: Gets whether the service level objective is enabled. + :vartype enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'service_objective_name': {'readonly': True}, + 'is_default': {'readonly': True}, + 'is_system': {'readonly': True}, + 'description': {'readonly': True}, + 'enabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'service_objective_name': {'key': 'properties.serviceObjectiveName', 'type': 'str'}, + 'is_default': {'key': 'properties.isDefault', 'type': 'bool'}, + 'is_system': {'key': 'properties.isSystem', 'type': 'bool'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(ServiceObjective, self).__init__(**kwargs) + self.service_objective_name = None + self.is_default = None + self.is_system = None + self.description = None + self.enabled = None + + +class ServiceObjectiveCapability(Model): + """The service objectives capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique ID of the service objective. + :vartype id: str + :ivar name: The service objective name. + :vartype name: str + :ivar supported_max_sizes: The list of supported maximum database sizes. + :vartype supported_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar performance_level: The performance level. + :vartype performance_level: + ~azure.mgmt.sql.models.PerformanceLevelCapability + :ivar sku: The sku. + :vartype sku: ~azure.mgmt.sql.models.Sku + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar included_max_size: The included (free) max size. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'supported_max_sizes': {'readonly': True}, + 'performance_level': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ServiceObjectiveCapability, self).__init__(**kwargs) + self.id = None + self.name = None + self.supported_max_sizes = None + self.performance_level = None + self.sku = None + self.supported_license_types = None + self.included_max_size = None + self.status = None + self.reason = reason + + +class ServiceTierAdvisor(ProxyResource): + """Represents a Service Tier Advisor. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar observation_period_start: The observation period start (ISO8601 + format). + :vartype observation_period_start: datetime + :ivar observation_period_end: The observation period start (ISO8601 + format). + :vartype observation_period_end: datetime + :ivar active_time_ratio: The activeTimeRatio for service tier advisor. + :vartype active_time_ratio: float + :ivar min_dtu: Gets or sets minDtu for service tier advisor. + :vartype min_dtu: float + :ivar avg_dtu: Gets or sets avgDtu for service tier advisor. + :vartype avg_dtu: float + :ivar max_dtu: Gets or sets maxDtu for service tier advisor. + :vartype max_dtu: float + :ivar max_size_in_gb: Gets or sets maxSizeInGB for service tier advisor. + :vartype max_size_in_gb: float + :ivar service_level_objective_usage_metrics: Gets or sets + serviceLevelObjectiveUsageMetrics for the service tier advisor. + :vartype service_level_objective_usage_metrics: + list[~azure.mgmt.sql.models.SloUsageMetric] + :ivar current_service_level_objective: Gets or sets + currentServiceLevelObjective for service tier advisor. + :vartype current_service_level_objective: str + :ivar current_service_level_objective_id: Gets or sets + currentServiceLevelObjectiveId for service tier advisor. + :vartype current_service_level_objective_id: str + :ivar usage_based_recommendation_service_level_objective: Gets or sets + usageBasedRecommendationServiceLevelObjective for service tier advisor. + :vartype usage_based_recommendation_service_level_objective: str + :ivar usage_based_recommendation_service_level_objective_id: Gets or sets + usageBasedRecommendationServiceLevelObjectiveId for service tier advisor. + :vartype usage_based_recommendation_service_level_objective_id: str + :ivar database_size_based_recommendation_service_level_objective: Gets or + sets databaseSizeBasedRecommendationServiceLevelObjective for service tier + advisor. + :vartype database_size_based_recommendation_service_level_objective: str + :ivar database_size_based_recommendation_service_level_objective_id: Gets + or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service + tier advisor. + :vartype database_size_based_recommendation_service_level_objective_id: + str + :ivar disaster_plan_based_recommendation_service_level_objective: Gets or + sets disasterPlanBasedRecommendationServiceLevelObjective for service tier + advisor. + :vartype disaster_plan_based_recommendation_service_level_objective: str + :ivar disaster_plan_based_recommendation_service_level_objective_id: Gets + or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service + tier advisor. + :vartype disaster_plan_based_recommendation_service_level_objective_id: + str + :ivar overall_recommendation_service_level_objective: Gets or sets + overallRecommendationServiceLevelObjective for service tier advisor. + :vartype overall_recommendation_service_level_objective: str + :ivar overall_recommendation_service_level_objective_id: Gets or sets + overallRecommendationServiceLevelObjectiveId for service tier advisor. + :vartype overall_recommendation_service_level_objective_id: str + :ivar confidence: Gets or sets confidence for service tier advisor. + :vartype confidence: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'observation_period_start': {'readonly': True}, + 'observation_period_end': {'readonly': True}, + 'active_time_ratio': {'readonly': True}, + 'min_dtu': {'readonly': True}, + 'avg_dtu': {'readonly': True}, + 'max_dtu': {'readonly': True}, + 'max_size_in_gb': {'readonly': True}, + 'service_level_objective_usage_metrics': {'readonly': True}, + 'current_service_level_objective': {'readonly': True}, + 'current_service_level_objective_id': {'readonly': True}, + 'usage_based_recommendation_service_level_objective': {'readonly': True}, + 'usage_based_recommendation_service_level_objective_id': {'readonly': True}, + 'database_size_based_recommendation_service_level_objective': {'readonly': True}, + 'database_size_based_recommendation_service_level_objective_id': {'readonly': True}, + 'disaster_plan_based_recommendation_service_level_objective': {'readonly': True}, + 'disaster_plan_based_recommendation_service_level_objective_id': {'readonly': True}, + 'overall_recommendation_service_level_objective': {'readonly': True}, + 'overall_recommendation_service_level_objective_id': {'readonly': True}, + 'confidence': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, + 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, + 'active_time_ratio': {'key': 'properties.activeTimeRatio', 'type': 'float'}, + 'min_dtu': {'key': 'properties.minDtu', 'type': 'float'}, + 'avg_dtu': {'key': 'properties.avgDtu', 'type': 'float'}, + 'max_dtu': {'key': 'properties.maxDtu', 'type': 'float'}, + 'max_size_in_gb': {'key': 'properties.maxSizeInGB', 'type': 'float'}, + 'service_level_objective_usage_metrics': {'key': 'properties.serviceLevelObjectiveUsageMetrics', 'type': '[SloUsageMetric]'}, + 'current_service_level_objective': {'key': 'properties.currentServiceLevelObjective', 'type': 'str'}, + 'current_service_level_objective_id': {'key': 'properties.currentServiceLevelObjectiveId', 'type': 'str'}, + 'usage_based_recommendation_service_level_objective': {'key': 'properties.usageBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'usage_based_recommendation_service_level_objective_id': {'key': 'properties.usageBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'database_size_based_recommendation_service_level_objective': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'database_size_based_recommendation_service_level_objective_id': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'disaster_plan_based_recommendation_service_level_objective': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'disaster_plan_based_recommendation_service_level_objective_id': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'overall_recommendation_service_level_objective': {'key': 'properties.overallRecommendationServiceLevelObjective', 'type': 'str'}, + 'overall_recommendation_service_level_objective_id': {'key': 'properties.overallRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'confidence': {'key': 'properties.confidence', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(ServiceTierAdvisor, self).__init__(**kwargs) + self.observation_period_start = None + self.observation_period_end = None + self.active_time_ratio = None + self.min_dtu = None + self.avg_dtu = None + self.max_dtu = None + self.max_size_in_gb = None + self.service_level_objective_usage_metrics = None + self.current_service_level_objective = None + self.current_service_level_objective_id = None + self.usage_based_recommendation_service_level_objective = None + self.usage_based_recommendation_service_level_objective_id = None + self.database_size_based_recommendation_service_level_objective = None + self.database_size_based_recommendation_service_level_objective_id = None + self.disaster_plan_based_recommendation_service_level_objective = None + self.disaster_plan_based_recommendation_service_level_objective_id = None + self.overall_recommendation_service_level_objective = None + self.overall_recommendation_service_level_objective_id = None + self.confidence = None + + +class Sku(Model): + """The resource model definition representing SKU. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Ex - P3. It is typically a + letter+number code + :type name: str + :param tier: This field is required to be implemented by the Resource + Provider if the service has more than one tier, but is not required on a + PUT. + :type tier: str + :param size: The SKU size. When the name field is the combination of tier + and some other value, this would be the standalone code. + :type size: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :param capacity: If the SKU supports scale out/in then the capacity + integer should be included. If scale out/in is not possible for the + resource this may be omitted. + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, *, name: str, tier: str=None, size: str=None, family: str=None, capacity: int=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.size = size + self.family = family + self.capacity = capacity + + +class SloUsageMetric(Model): + """A Slo Usage Metric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar service_level_objective: The serviceLevelObjective for SLO usage + metric. Possible values include: 'System', 'System0', 'System1', + 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', + 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', + 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', + 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', + 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', + 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', + 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', + 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' + :vartype service_level_objective: str or + ~azure.mgmt.sql.models.ServiceObjectiveName + :ivar service_level_objective_id: The serviceLevelObjectiveId for SLO + usage metric. + :vartype service_level_objective_id: str + :ivar in_range_time_ratio: Gets or sets inRangeTimeRatio for SLO usage + metric. + :vartype in_range_time_ratio: float + """ + + _validation = { + 'service_level_objective': {'readonly': True}, + 'service_level_objective_id': {'readonly': True}, + 'in_range_time_ratio': {'readonly': True}, + } + + _attribute_map = { + 'service_level_objective': {'key': 'serviceLevelObjective', 'type': 'str'}, + 'service_level_objective_id': {'key': 'serviceLevelObjectiveId', 'type': 'str'}, + 'in_range_time_ratio': {'key': 'inRangeTimeRatio', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(SloUsageMetric, self).__init__(**kwargs) + self.service_level_objective = None + self.service_level_objective_id = None + self.in_range_time_ratio = None + + +class SubscriptionUsage(ProxyResource): + """Usage Metric of a Subscription in a Location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar display_name: User-readable name of the metric. + :vartype display_name: str + :ivar current_value: Current value of the metric. + :vartype current_value: float + :ivar limit: Boundary value of the metric. + :vartype limit: float + :ivar unit: Unit of the metric. + :vartype unit: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'current_value': {'key': 'properties.currentValue', 'type': 'float'}, + 'limit': {'key': 'properties.limit', 'type': 'float'}, + 'unit': {'key': 'properties.unit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubscriptionUsage, self).__init__(**kwargs) + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + + +class SyncAgent(ProxyResource): + """An Azure SQL Database sync agent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar sync_agent_name: Name of the sync agent. + :vartype sync_agent_name: str + :param sync_database_id: ARM resource id of the sync database in the sync + agent. + :type sync_database_id: str + :ivar last_alive_time: Last alive time of the sync agent. + :vartype last_alive_time: datetime + :ivar state: State of the sync agent. Possible values include: 'Online', + 'Offline', 'NeverConnected' + :vartype state: str or ~azure.mgmt.sql.models.SyncAgentState + :ivar is_up_to_date: If the sync agent version is up to date. + :vartype is_up_to_date: bool + :ivar expiry_time: Expiration time of the sync agent version. + :vartype expiry_time: datetime + :ivar version: Version of the sync agent. + :vartype version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sync_agent_name': {'readonly': True}, + 'last_alive_time': {'readonly': True}, + 'state': {'readonly': True}, + 'is_up_to_date': {'readonly': True}, + 'expiry_time': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sync_agent_name': {'key': 'properties.name', 'type': 'str'}, + 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, + 'last_alive_time': {'key': 'properties.lastAliveTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'is_up_to_date': {'key': 'properties.isUpToDate', 'type': 'bool'}, + 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + } + + def __init__(self, *, sync_database_id: str=None, **kwargs) -> None: + super(SyncAgent, self).__init__(**kwargs) + self.sync_agent_name = None + self.sync_database_id = sync_database_id + self.last_alive_time = None + self.state = None + self.is_up_to_date = None + self.expiry_time = None + self.version = None + + +class SyncAgentKeyProperties(Model): + """Properties of an Azure SQL Database sync agent key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar sync_agent_key: Key of sync agent. + :vartype sync_agent_key: str + """ + + _validation = { + 'sync_agent_key': {'readonly': True}, + } + + _attribute_map = { + 'sync_agent_key': {'key': 'syncAgentKey', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncAgentKeyProperties, self).__init__(**kwargs) + self.sync_agent_key = None + + +class SyncAgentLinkedDatabase(ProxyResource): + """An Azure SQL Database sync agent linked database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_type: Type of the sync agent linked database. Possible + values include: 'AzureSqlDatabase', 'SqlServerDatabase' + :vartype database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType + :ivar database_id: Id of the sync agent linked database. + :vartype database_id: str + :ivar description: Description of the sync agent linked database. + :vartype description: str + :ivar server_name: Server name of the sync agent linked database. + :vartype server_name: str + :ivar database_name: Database name of the sync agent linked database. + :vartype database_name: str + :ivar user_name: User name of the sync agent linked database. + :vartype user_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_type': {'readonly': True}, + 'database_id': {'readonly': True}, + 'description': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncAgentLinkedDatabase, self).__init__(**kwargs) + self.database_type = None + self.database_id = None + self.description = None + self.server_name = None + self.database_name = None + self.user_name = None + + +class SyncDatabaseIdProperties(Model): + """Properties of the sync database id. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: ARM resource id of sync database. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncDatabaseIdProperties, self).__init__(**kwargs) + self.id = None + + +class SyncFullSchemaProperties(Model): + """Properties of the database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar tables: List of tables in the database full schema. + :vartype tables: list[~azure.mgmt.sql.models.SyncFullSchemaTable] + :ivar last_update_time: Last update time of the database schema. + :vartype last_update_time: datetime + """ + + _validation = { + 'tables': {'readonly': True}, + 'last_update_time': {'readonly': True}, + } + + _attribute_map = { + 'tables': {'key': 'tables', 'type': '[SyncFullSchemaTable]'}, + 'last_update_time': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncFullSchemaProperties, self).__init__(**kwargs) + self.tables = None + self.last_update_time = None + + +class SyncFullSchemaTable(Model): + """Properties of the table in the database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar columns: List of columns in the table of database full schema. + :vartype columns: list[~azure.mgmt.sql.models.SyncFullSchemaTableColumn] + :ivar error_id: Error id of the table. + :vartype error_id: str + :ivar has_error: If there is error in the table. + :vartype has_error: bool + :ivar name: Name of the table. + :vartype name: str + :ivar quoted_name: Quoted name of the table. + :vartype quoted_name: str + """ + + _validation = { + 'columns': {'readonly': True}, + 'error_id': {'readonly': True}, + 'has_error': {'readonly': True}, + 'name': {'readonly': True}, + 'quoted_name': {'readonly': True}, + } + + _attribute_map = { + 'columns': {'key': 'columns', 'type': '[SyncFullSchemaTableColumn]'}, + 'error_id': {'key': 'errorId', 'type': 'str'}, + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncFullSchemaTable, self).__init__(**kwargs) + self.columns = None + self.error_id = None + self.has_error = None + self.name = None + self.quoted_name = None + + +class SyncFullSchemaTableColumn(Model): + """Properties of the column in the table of database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar data_size: Data size of the column. + :vartype data_size: str + :ivar data_type: Data type of the column. + :vartype data_type: str + :ivar error_id: Error id of the column. + :vartype error_id: str + :ivar has_error: If there is error in the table. + :vartype has_error: bool + :ivar is_primary_key: If it is the primary key of the table. + :vartype is_primary_key: bool + :ivar name: Name of the column. + :vartype name: str + :ivar quoted_name: Quoted name of the column. + :vartype quoted_name: str + """ + + _validation = { + 'data_size': {'readonly': True}, + 'data_type': {'readonly': True}, + 'error_id': {'readonly': True}, + 'has_error': {'readonly': True}, + 'is_primary_key': {'readonly': True}, + 'name': {'readonly': True}, + 'quoted_name': {'readonly': True}, + } + + _attribute_map = { + 'data_size': {'key': 'dataSize', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + 'error_id': {'key': 'errorId', 'type': 'str'}, + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'is_primary_key': {'key': 'isPrimaryKey', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncFullSchemaTableColumn, self).__init__(**kwargs) + self.data_size = None + self.data_type = None + self.error_id = None + self.has_error = None + self.is_primary_key = None + self.name = None + self.quoted_name = None + + +class SyncGroup(ProxyResource): + """An Azure SQL Database sync group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param interval: Sync interval of the sync group. + :type interval: int + :ivar last_sync_time: Last sync time of the sync group. + :vartype last_sync_time: datetime + :param conflict_resolution_policy: Conflict resolution policy of the sync + group. Possible values include: 'HubWin', 'MemberWin' + :type conflict_resolution_policy: str or + ~azure.mgmt.sql.models.SyncConflictResolutionPolicy + :param sync_database_id: ARM resource id of the sync database in the sync + group. + :type sync_database_id: str + :param hub_database_user_name: User name for the sync group hub database + credential. + :type hub_database_user_name: str + :param hub_database_password: Password for the sync group hub database + credential. + :type hub_database_password: str + :ivar sync_state: Sync state of the sync group. Possible values include: + 'NotReady', 'Error', 'Warning', 'Progressing', 'Good' + :vartype sync_state: str or ~azure.mgmt.sql.models.SyncGroupState + :param schema: Sync schema of the sync group. + :type schema: ~azure.mgmt.sql.models.SyncGroupSchema + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_sync_time': {'readonly': True}, + 'sync_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'interval': {'key': 'properties.interval', 'type': 'int'}, + 'last_sync_time': {'key': 'properties.lastSyncTime', 'type': 'iso-8601'}, + 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'str'}, + 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, + 'hub_database_user_name': {'key': 'properties.hubDatabaseUserName', 'type': 'str'}, + 'hub_database_password': {'key': 'properties.hubDatabasePassword', 'type': 'str'}, + 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, + 'schema': {'key': 'properties.schema', 'type': 'SyncGroupSchema'}, + } + + def __init__(self, *, interval: int=None, conflict_resolution_policy=None, sync_database_id: str=None, hub_database_user_name: str=None, hub_database_password: str=None, schema=None, **kwargs) -> None: + super(SyncGroup, self).__init__(**kwargs) + self.interval = interval + self.last_sync_time = None + self.conflict_resolution_policy = conflict_resolution_policy + self.sync_database_id = sync_database_id + self.hub_database_user_name = hub_database_user_name + self.hub_database_password = hub_database_password + self.sync_state = None + self.schema = schema + + +class SyncGroupLogProperties(Model): + """Properties of an Azure SQL Database sync group log. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar timestamp: Timestamp of the sync group log. + :vartype timestamp: datetime + :ivar type: Type of the sync group log. Possible values include: 'All', + 'Error', 'Warning', 'Success' + :vartype type: str or ~azure.mgmt.sql.models.SyncGroupLogType + :ivar source: Source of the sync group log. + :vartype source: str + :ivar details: Details of the sync group log. + :vartype details: str + :ivar tracing_id: TracingId of the sync group log. + :vartype tracing_id: str + :ivar operation_status: OperationStatus of the sync group log. + :vartype operation_status: str + """ + + _validation = { + 'timestamp': {'readonly': True}, + 'type': {'readonly': True}, + 'source': {'readonly': True}, + 'details': {'readonly': True}, + 'tracing_id': {'readonly': True}, + 'operation_status': {'readonly': True}, + } + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, + 'tracing_id': {'key': 'tracingId', 'type': 'str'}, + 'operation_status': {'key': 'operationStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncGroupLogProperties, self).__init__(**kwargs) + self.timestamp = None + self.type = None + self.source = None + self.details = None + self.tracing_id = None + self.operation_status = None + + +class SyncGroupSchema(Model): + """Properties of sync group schema. + + :param tables: List of tables in sync group schema. + :type tables: list[~azure.mgmt.sql.models.SyncGroupSchemaTable] + :param master_sync_member_name: Name of master sync member where the + schema is from. + :type master_sync_member_name: str + """ + + _attribute_map = { + 'tables': {'key': 'tables', 'type': '[SyncGroupSchemaTable]'}, + 'master_sync_member_name': {'key': 'masterSyncMemberName', 'type': 'str'}, + } + + def __init__(self, *, tables=None, master_sync_member_name: str=None, **kwargs) -> None: + super(SyncGroupSchema, self).__init__(**kwargs) + self.tables = tables + self.master_sync_member_name = master_sync_member_name + + +class SyncGroupSchemaTable(Model): + """Properties of table in sync group schema. + + :param columns: List of columns in sync group schema. + :type columns: list[~azure.mgmt.sql.models.SyncGroupSchemaTableColumn] + :param quoted_name: Quoted name of sync group schema table. + :type quoted_name: str + """ + + _attribute_map = { + 'columns': {'key': 'columns', 'type': '[SyncGroupSchemaTableColumn]'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, *, columns=None, quoted_name: str=None, **kwargs) -> None: + super(SyncGroupSchemaTable, self).__init__(**kwargs) + self.columns = columns + self.quoted_name = quoted_name + + +class SyncGroupSchemaTableColumn(Model): + """Properties of column in sync group table. + + :param quoted_name: Quoted name of sync group table column. + :type quoted_name: str + :param data_size: Data size of the column. + :type data_size: str + :param data_type: Data type of the column. + :type data_type: str + """ + + _attribute_map = { + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + 'data_size': {'key': 'dataSize', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + } + + def __init__(self, *, quoted_name: str=None, data_size: str=None, data_type: str=None, **kwargs) -> None: + super(SyncGroupSchemaTableColumn, self).__init__(**kwargs) + self.quoted_name = quoted_name + self.data_size = data_size + self.data_type = data_type + + +class SyncMember(ProxyResource): + """An Azure SQL Database sync member. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param database_type: Database type of the sync member. Possible values + include: 'AzureSqlDatabase', 'SqlServerDatabase' + :type database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType + :param sync_agent_id: ARM resource id of the sync agent in the sync + member. + :type sync_agent_id: str + :param sql_server_database_id: SQL Server database id of the sync member. + :type sql_server_database_id: str + :param server_name: Server name of the member database in the sync member + :type server_name: str + :param database_name: Database name of the member database in the sync + member. + :type database_name: str + :param user_name: User name of the member database in the sync member. + :type user_name: str + :param password: Password of the member database in the sync member. + :type password: str + :param sync_direction: Sync direction of the sync member. Possible values + include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember' + :type sync_direction: str or ~azure.mgmt.sql.models.SyncDirection + :ivar sync_state: Sync state of the sync member. Possible values include: + 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', + 'DisabledTombstoneCleanup', 'DisabledBackupRestore', + 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', + 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', + 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', + 'ReprovisionFailed', 'UnReprovisioned' + :vartype sync_state: str or ~azure.mgmt.sql.models.SyncMemberState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sync_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, + 'sync_agent_id': {'key': 'properties.syncAgentId', 'type': 'str'}, + 'sql_server_database_id': {'key': 'properties.sqlServerDatabaseId', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'sync_direction': {'key': 'properties.syncDirection', 'type': 'str'}, + 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, + } + + def __init__(self, *, database_type=None, sync_agent_id: str=None, sql_server_database_id: str=None, server_name: str=None, database_name: str=None, user_name: str=None, password: str=None, sync_direction=None, **kwargs) -> None: + super(SyncMember, self).__init__(**kwargs) + self.database_type = database_type + self.sync_agent_id = sync_agent_id + self.sql_server_database_id = sql_server_database_id + self.server_name = server_name + self.database_name = database_name + self.user_name = user_name + self.password = password + self.sync_direction = sync_direction + self.sync_state = None + + +class TdeCertificate(ProxyResource): + """A TDE certificate that can be uploaded into a server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param private_blob: Required. The base64 encoded certificate private + blob. + :type private_blob: str + :param cert_password: The certificate password. + :type cert_password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'private_blob': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_blob': {'key': 'properties.privateBlob', 'type': 'str'}, + 'cert_password': {'key': 'properties.certPassword', 'type': 'str'}, + } + + def __init__(self, *, private_blob: str, cert_password: str=None, **kwargs) -> None: + super(TdeCertificate, self).__init__(**kwargs) + self.private_blob = private_blob + self.cert_password = cert_password + + +class TransparentDataEncryption(ProxyResource): + """Represents a database transparent data encryption configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :param status: The status of the database transparent data encryption. + Possible values include: 'Enabled', 'Disabled' + :type status: str or + ~azure.mgmt.sql.models.TransparentDataEncryptionStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'TransparentDataEncryptionStatus'}, + } + + def __init__(self, *, status=None, **kwargs) -> None: + super(TransparentDataEncryption, self).__init__(**kwargs) + self.location = None + self.status = status + + +class TransparentDataEncryptionActivity(ProxyResource): + """Represents a database transparent data encryption Scan. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar status: The status of the database. Possible values include: + 'Encrypting', 'Decrypting' + :vartype status: str or + ~azure.mgmt.sql.models.TransparentDataEncryptionActivityStatus + :ivar percent_complete: The percent complete of the transparent data + encryption scan for a database. + :vartype percent_complete: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'status': {'readonly': True}, + 'percent_complete': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(TransparentDataEncryptionActivity, self).__init__(**kwargs) + self.location = None + self.status = None + self.percent_complete = None + + +class Usage(Model): + """ARM usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: ~azure.mgmt.sql.models.Name + :ivar type: Resource type. + :vartype type: str + :ivar unit: Usage unit. + :vartype unit: str + :ivar current_value: Usage current value. + :vartype current_value: int + :ivar limit: Usage limit. + :vartype limit: int + :ivar requested_limit: Usage requested limit. + :vartype requested_limit: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'unit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'requested_limit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'Name'}, + 'type': {'key': 'type', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'int'}, + 'requested_limit': {'key': 'requestedLimit', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(Usage, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.unit = None + self.current_value = None + self.limit = None + self.requested_limit = None + + +class VirtualCluster(TrackedResource): + """An Azure SQL virtual cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar subnet_id: Subnet resource ID for the virtual cluster. + :vartype subnet_id: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :ivar child_resources: List of resources in this virtual cluster. + :vartype child_resources: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'subnet_id': {'readonly': True}, + 'child_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'family': {'key': 'properties.family', 'type': 'str'}, + 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, + } + + def __init__(self, *, location: str, tags=None, family: str=None, **kwargs) -> None: + super(VirtualCluster, self).__init__(location=location, tags=tags, **kwargs) + self.subnet_id = None + self.family = family + self.child_resources = None + + +class VirtualClusterUpdate(Model): + """An update request for an Azure SQL Database virtual cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar subnet_id: Subnet resource ID for the virtual cluster. + :vartype subnet_id: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :ivar child_resources: List of resources in this virtual cluster. + :vartype child_resources: list[str] + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'subnet_id': {'readonly': True}, + 'child_resources': {'readonly': True}, + } + + _attribute_map = { + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'family': {'key': 'properties.family', 'type': 'str'}, + 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, family: str=None, tags=None, **kwargs) -> None: + super(VirtualClusterUpdate, self).__init__(**kwargs) + self.subnet_id = None + self.family = family + self.child_resources = None + self.tags = tags + + +class VirtualNetworkRule(ProxyResource): + """A virtual network rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param virtual_network_subnet_id: Required. The ARM resource id of the + virtual network subnet. + :type virtual_network_subnet_id: str + :param ignore_missing_vnet_service_endpoint: Create firewall rule before + the virtual network has vnet service endpoint enabled. + :type ignore_missing_vnet_service_endpoint: bool + :ivar state: Virtual Network Rule State. Possible values include: + 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' + :vartype state: str or ~azure.mgmt.sql.models.VirtualNetworkRuleState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'virtual_network_subnet_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, + 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, *, virtual_network_subnet_id: str, ignore_missing_vnet_service_endpoint: bool=None, **kwargs) -> None: + super(VirtualNetworkRule, self).__init__(**kwargs) + self.virtual_network_subnet_id = virtual_network_subnet_id + self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint + self.state = None + + +class VulnerabilityAssessmentRecurringScansProperties(Model): + """Properties of a Vulnerability Assessment recurring scans. + + :param is_enabled: Recurring scans state. + :type is_enabled: bool + :param email_subscription_admins: Specifies that the schedule scan + notification will be is sent to the subscription administrators. Default + value: True . + :type email_subscription_admins: bool + :param emails: Specifies an array of e-mail addresses to which the scan + notification is sent. + :type emails: list[str] + """ + + _attribute_map = { + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'}, + 'emails': {'key': 'emails', 'type': '[str]'}, + } + + def __init__(self, *, is_enabled: bool=None, email_subscription_admins: bool=True, emails=None, **kwargs) -> None: + super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs) + self.is_enabled = is_enabled + self.email_subscription_admins = email_subscription_admins + self.emails = emails + + +class VulnerabilityAssessmentScanError(Model): + """Properties of a vulnerability assessment scan error. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(VulnerabilityAssessmentScanError, self).__init__(**kwargs) + self.code = None + self.message = None + + +class VulnerabilityAssessmentScanRecord(ProxyResource): + """A vulnerability assessment scan record. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar scan_id: The scan ID. + :vartype scan_id: str + :ivar trigger_type: The scan trigger type. Possible values include: + 'OnDemand', 'Recurring' + :vartype trigger_type: str or + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanTriggerType + :ivar state: The scan status. Possible values include: 'Passed', 'Failed', + 'FailedToRun', 'InProgress' + :vartype state: str or + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanState + :ivar start_time: The scan start time (UTC). + :vartype start_time: datetime + :ivar end_time: The scan end time (UTC). + :vartype end_time: datetime + :ivar errors: The scan errors. + :vartype errors: + list[~azure.mgmt.sql.models.VulnerabilityAssessmentScanError] + :ivar storage_container_path: The scan results storage container path. + :vartype storage_container_path: str + :ivar number_of_failed_security_checks: The number of failed security + checks. + :vartype number_of_failed_security_checks: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'scan_id': {'readonly': True}, + 'trigger_type': {'readonly': True}, + 'state': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'errors': {'readonly': True}, + 'storage_container_path': {'readonly': True}, + 'number_of_failed_security_checks': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'scan_id': {'key': 'properties.scanId', 'type': 'str'}, + 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'errors': {'key': 'properties.errors', 'type': '[VulnerabilityAssessmentScanError]'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'number_of_failed_security_checks': {'key': 'properties.numberOfFailedSecurityChecks', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(VulnerabilityAssessmentScanRecord, self).__init__(**kwargs) + self.scan_id = None + self.trigger_type = None + self.state = None + self.start_time = None + self.end_time = None + self.errors = None + self.storage_container_path = None + self.number_of_failed_security_checks = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py new file mode 100644 index 000000000000..43eb7dc78de9 --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py @@ -0,0 +1,885 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class RecoverableDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`RecoverableDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RecoverableDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(RecoverableDatabasePaged, self).__init__(*args, **kwargs) +class RestorableDroppedDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`RestorableDroppedDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RestorableDroppedDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(RestorableDroppedDatabasePaged, self).__init__(*args, **kwargs) +class ServerPaged(Paged): + """ + A paging container for iterating over a list of :class:`Server ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Server]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerPaged, self).__init__(*args, **kwargs) +class DataMaskingRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`DataMaskingRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DataMaskingRule]'} + } + + def __init__(self, *args, **kwargs): + + super(DataMaskingRulePaged, self).__init__(*args, **kwargs) +class FirewallRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`FirewallRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[FirewallRule]'} + } + + def __init__(self, *args, **kwargs): + + super(FirewallRulePaged, self).__init__(*args, **kwargs) +class GeoBackupPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`GeoBackupPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GeoBackupPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(GeoBackupPolicyPaged, self).__init__(*args, **kwargs) +class MetricPaged(Paged): + """ + A paging container for iterating over a list of :class:`Metric ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Metric]'} + } + + def __init__(self, *args, **kwargs): + + super(MetricPaged, self).__init__(*args, **kwargs) +class MetricDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`MetricDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[MetricDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(MetricDefinitionPaged, self).__init__(*args, **kwargs) +class DatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`Database ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Database]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabasePaged, self).__init__(*args, **kwargs) +class ElasticPoolPaged(Paged): + """ + A paging container for iterating over a list of :class:`ElasticPool ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ElasticPool]'} + } + + def __init__(self, *args, **kwargs): + + super(ElasticPoolPaged, self).__init__(*args, **kwargs) +class RecommendedElasticPoolPaged(Paged): + """ + A paging container for iterating over a list of :class:`RecommendedElasticPool ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RecommendedElasticPool]'} + } + + def __init__(self, *args, **kwargs): + + super(RecommendedElasticPoolPaged, self).__init__(*args, **kwargs) +class RecommendedElasticPoolMetricPaged(Paged): + """ + A paging container for iterating over a list of :class:`RecommendedElasticPoolMetric ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RecommendedElasticPoolMetric]'} + } + + def __init__(self, *args, **kwargs): + + super(RecommendedElasticPoolMetricPaged, self).__init__(*args, **kwargs) +class ReplicationLinkPaged(Paged): + """ + A paging container for iterating over a list of :class:`ReplicationLink ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ReplicationLink]'} + } + + def __init__(self, *args, **kwargs): + + super(ReplicationLinkPaged, self).__init__(*args, **kwargs) +class ServerAzureADAdministratorPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerAzureADAdministrator ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerAzureADAdministrator]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerAzureADAdministratorPaged, self).__init__(*args, **kwargs) +class ServerCommunicationLinkPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerCommunicationLink ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerCommunicationLink]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerCommunicationLinkPaged, self).__init__(*args, **kwargs) +class ServiceObjectivePaged(Paged): + """ + A paging container for iterating over a list of :class:`ServiceObjective ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServiceObjective]'} + } + + def __init__(self, *args, **kwargs): + + super(ServiceObjectivePaged, self).__init__(*args, **kwargs) +class ElasticPoolActivityPaged(Paged): + """ + A paging container for iterating over a list of :class:`ElasticPoolActivity ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ElasticPoolActivity]'} + } + + def __init__(self, *args, **kwargs): + + super(ElasticPoolActivityPaged, self).__init__(*args, **kwargs) +class ElasticPoolDatabaseActivityPaged(Paged): + """ + A paging container for iterating over a list of :class:`ElasticPoolDatabaseActivity ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ElasticPoolDatabaseActivity]'} + } + + def __init__(self, *args, **kwargs): + + super(ElasticPoolDatabaseActivityPaged, self).__init__(*args, **kwargs) +class ServiceTierAdvisorPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServiceTierAdvisor ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServiceTierAdvisor]'} + } + + def __init__(self, *args, **kwargs): + + super(ServiceTierAdvisorPaged, self).__init__(*args, **kwargs) +class TransparentDataEncryptionActivityPaged(Paged): + """ + A paging container for iterating over a list of :class:`TransparentDataEncryptionActivity ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TransparentDataEncryptionActivity]'} + } + + def __init__(self, *args, **kwargs): + + super(TransparentDataEncryptionActivityPaged, self).__init__(*args, **kwargs) +class ServerUsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerUsage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerUsage]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerUsagePaged, self).__init__(*args, **kwargs) +class DatabaseUsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`DatabaseUsage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseUsage]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseUsagePaged, self).__init__(*args, **kwargs) +class EncryptionProtectorPaged(Paged): + """ + A paging container for iterating over a list of :class:`EncryptionProtector ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[EncryptionProtector]'} + } + + def __init__(self, *args, **kwargs): + + super(EncryptionProtectorPaged, self).__init__(*args, **kwargs) +class FailoverGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`FailoverGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[FailoverGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(FailoverGroupPaged, self).__init__(*args, **kwargs) +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class ServerKeyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerKey ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerKey]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerKeyPaged, self).__init__(*args, **kwargs) +class SyncAgentPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncAgent ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncAgent]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncAgentPaged, self).__init__(*args, **kwargs) +class SyncAgentLinkedDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncAgentLinkedDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncAgentLinkedDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncAgentLinkedDatabasePaged, self).__init__(*args, **kwargs) +class SyncDatabaseIdPropertiesPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncDatabaseIdProperties ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncDatabaseIdProperties]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncDatabaseIdPropertiesPaged, self).__init__(*args, **kwargs) +class SyncFullSchemaPropertiesPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncFullSchemaProperties ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncFullSchemaProperties]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncFullSchemaPropertiesPaged, self).__init__(*args, **kwargs) +class SyncGroupLogPropertiesPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncGroupLogProperties ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncGroupLogProperties]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncGroupLogPropertiesPaged, self).__init__(*args, **kwargs) +class SyncGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncGroupPaged, self).__init__(*args, **kwargs) +class SyncMemberPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncMember ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncMember]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncMemberPaged, self).__init__(*args, **kwargs) +class SubscriptionUsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`SubscriptionUsage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SubscriptionUsage]'} + } + + def __init__(self, *args, **kwargs): + + super(SubscriptionUsagePaged, self).__init__(*args, **kwargs) +class VirtualClusterPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualCluster ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualCluster]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualClusterPaged, self).__init__(*args, **kwargs) +class VirtualNetworkRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualNetworkRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualNetworkRule]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualNetworkRulePaged, self).__init__(*args, **kwargs) +class DatabaseVulnerabilityAssessmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`DatabaseVulnerabilityAssessment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseVulnerabilityAssessment]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) +class JobAgentPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobAgent ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobAgent]'} + } + + def __init__(self, *args, **kwargs): + + super(JobAgentPaged, self).__init__(*args, **kwargs) +class JobCredentialPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobCredential ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobCredential]'} + } + + def __init__(self, *args, **kwargs): + + super(JobCredentialPaged, self).__init__(*args, **kwargs) +class JobExecutionPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobExecution ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobExecution]'} + } + + def __init__(self, *args, **kwargs): + + super(JobExecutionPaged, self).__init__(*args, **kwargs) +class JobPaged(Paged): + """ + A paging container for iterating over a list of :class:`Job ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Job]'} + } + + def __init__(self, *args, **kwargs): + + super(JobPaged, self).__init__(*args, **kwargs) +class JobStepPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobStep ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobStep]'} + } + + def __init__(self, *args, **kwargs): + + super(JobStepPaged, self).__init__(*args, **kwargs) +class JobTargetGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobTargetGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobTargetGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(JobTargetGroupPaged, self).__init__(*args, **kwargs) +class JobVersionPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobVersion ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobVersion]'} + } + + def __init__(self, *args, **kwargs): + + super(JobVersionPaged, self).__init__(*args, **kwargs) +class LongTermRetentionBackupPaged(Paged): + """ + A paging container for iterating over a list of :class:`LongTermRetentionBackup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[LongTermRetentionBackup]'} + } + + def __init__(self, *args, **kwargs): + + super(LongTermRetentionBackupPaged, self).__init__(*args, **kwargs) +class ManagedBackupShortTermRetentionPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedBackupShortTermRetentionPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedBackupShortTermRetentionPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedBackupShortTermRetentionPolicyPaged, self).__init__(*args, **kwargs) +class ManagedDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedDatabasePaged, self).__init__(*args, **kwargs) +class ServerDnsAliasPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerDnsAlias ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerDnsAlias]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerDnsAliasPaged, self).__init__(*args, **kwargs) +class ServerSecurityAlertPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerSecurityAlertPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerSecurityAlertPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) +class RestorableDroppedManagedDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`RestorableDroppedManagedDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RestorableDroppedManagedDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(RestorableDroppedManagedDatabasePaged, self).__init__(*args, **kwargs) +class RestorePointPaged(Paged): + """ + A paging container for iterating over a list of :class:`RestorePoint ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RestorePoint]'} + } + + def __init__(self, *args, **kwargs): + + super(RestorePointPaged, self).__init__(*args, **kwargs) +class ManagedDatabaseSecurityAlertPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedDatabaseSecurityAlertPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedDatabaseSecurityAlertPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedDatabaseSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) +class ManagedServerSecurityAlertPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedServerSecurityAlertPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedServerSecurityAlertPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedServerSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) +class SensitivityLabelPaged(Paged): + """ + A paging container for iterating over a list of :class:`SensitivityLabel ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SensitivityLabel]'} + } + + def __init__(self, *args, **kwargs): + + super(SensitivityLabelPaged, self).__init__(*args, **kwargs) +class DatabaseOperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`DatabaseOperation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseOperation]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseOperationPaged, self).__init__(*args, **kwargs) +class ElasticPoolOperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`ElasticPoolOperation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ElasticPoolOperation]'} + } + + def __init__(self, *args, **kwargs): + + super(ElasticPoolOperationPaged, self).__init__(*args, **kwargs) +class VulnerabilityAssessmentScanRecordPaged(Paged): + """ + A paging container for iterating over a list of :class:`VulnerabilityAssessmentScanRecord ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VulnerabilityAssessmentScanRecord]'} + } + + def __init__(self, *args, **kwargs): + + super(VulnerabilityAssessmentScanRecordPaged, self).__init__(*args, **kwargs) +class InstanceFailoverGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`InstanceFailoverGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[InstanceFailoverGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(InstanceFailoverGroupPaged, self).__init__(*args, **kwargs) +class BackupShortTermRetentionPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`BackupShortTermRetentionPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BackupShortTermRetentionPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(BackupShortTermRetentionPolicyPaged, self).__init__(*args, **kwargs) +class ManagedInstanceKeyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedInstanceKey ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedInstanceKey]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedInstanceKeyPaged, self).__init__(*args, **kwargs) +class ManagedInstanceEncryptionProtectorPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedInstanceEncryptionProtector ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedInstanceEncryptionProtector]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedInstanceEncryptionProtectorPaged, self).__init__(*args, **kwargs) +class RecoverableManagedDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`RecoverableManagedDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RecoverableManagedDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(RecoverableManagedDatabasePaged, self).__init__(*args, **kwargs) +class ManagedInstanceVulnerabilityAssessmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedInstanceVulnerabilityAssessment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedInstanceVulnerabilityAssessment]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedInstanceVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) +class ServerVulnerabilityAssessmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerVulnerabilityAssessment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerVulnerabilityAssessment]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) +class InstancePoolPaged(Paged): + """ + A paging container for iterating over a list of :class:`InstancePool ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[InstancePool]'} + } + + def __init__(self, *args, **kwargs): + + super(InstancePoolPaged, self).__init__(*args, **kwargs) +class UsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Usage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Usage]'} + } + + def __init__(self, *args, **kwargs): + + super(UsagePaged, self).__init__(*args, **kwargs) +class ManagedInstancePaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedInstance ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedInstance]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedInstancePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py index de1d73caf27c..0ac10a4f69f8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py @@ -85,6 +85,9 @@ class DatabaseEdition(str, Enum): data_warehouse = "DataWarehouse" system = "System" system2 = "System2" + general_purpose = "GeneralPurpose" + business_critical = "BusinessCritical" + hyperscale = "Hyperscale" class ServiceObjectiveName(str, Enum): @@ -203,6 +206,8 @@ class ElasticPoolEdition(str, Enum): basic = "Basic" standard = "Standard" premium = "Premium" + general_purpose = "GeneralPurpose" + business_critical = "BusinessCritical" class ReplicationRole(str, Enum): @@ -320,24 +325,17 @@ class FailoverGroupReplicationRole(str, Enum): secondary = "Secondary" -class IdentityType(str, Enum): - - system_assigned = "SystemAssigned" - - -class ManagedInstanceProxyOverride(str, Enum): - - proxy = "Proxy" - redirect = "Redirect" - default = "Default" - - class OperationOrigin(str, Enum): user = "user" system = "system" +class IdentityType(str, Enum): + + system_assigned = "SystemAssigned" + + class SyncAgentState(str, Enum): online = "Online" @@ -612,6 +610,8 @@ class DatabaseStatus(str, Enum): paused = "Paused" resuming = "Resuming" scaling = "Scaling" + offline_changing_dw_performance_tiers = "OfflineChangingDwPerformanceTiers" + online_changing_dw_performance_tiers = "OnlineChangingDwPerformanceTiers" class DatabaseLicenseType(str, Enum): @@ -659,6 +659,31 @@ class InstanceFailoverGroupReplicationRole(str, Enum): secondary = "Secondary" +class InstancePoolLicenseType(str, Enum): + + license_included = "LicenseIncluded" + base_price = "BasePrice" + + +class ManagedServerCreateMode(str, Enum): + + default = "Default" + point_in_time_restore = "PointInTimeRestore" + + +class ManagedInstanceLicenseType(str, Enum): + + license_included = "LicenseIncluded" + base_price = "BasePrice" + + +class ManagedInstanceProxyOverride(str, Enum): + + proxy = "Proxy" + redirect = "Redirect" + default = "Default" + + class LongTermRetentionDatabaseState(str, Enum): all = "All" diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options.py deleted file mode 100644 index 42c5aa7ac8a1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutomaticTuningOptions(Model): - """Automatic tuning properties for individual advisors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param desired_state: Automatic tuning option desired state. Possible - values include: 'Off', 'On', 'Default' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired - :ivar actual_state: Automatic tuning option actual state. Possible values - include: 'Off', 'On' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual - :ivar reason_code: Reason code if desired and actual state are different. - :vartype reason_code: int - :ivar reason_desc: Reason description if desired and actual state are - different. Possible values include: 'Default', 'Disabled', - 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', - 'QueryStoreReadOnly', 'NotSupported' - :vartype reason_desc: str or - ~azure.mgmt.sql.models.AutomaticTuningDisabledReason - """ - - _validation = { - 'actual_state': {'readonly': True}, - 'reason_code': {'readonly': True}, - 'reason_desc': {'readonly': True}, - } - - _attribute_map = { - 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, - 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, - 'reason_code': {'key': 'reasonCode', 'type': 'int'}, - 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningDisabledReason'}, - } - - def __init__(self, **kwargs): - super(AutomaticTuningOptions, self).__init__(**kwargs) - self.desired_state = kwargs.get('desired_state', None) - self.actual_state = None - self.reason_code = None - self.reason_desc = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options_py3.py deleted file mode 100644 index b55fd35d8157..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutomaticTuningOptions(Model): - """Automatic tuning properties for individual advisors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param desired_state: Automatic tuning option desired state. Possible - values include: 'Off', 'On', 'Default' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired - :ivar actual_state: Automatic tuning option actual state. Possible values - include: 'Off', 'On' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual - :ivar reason_code: Reason code if desired and actual state are different. - :vartype reason_code: int - :ivar reason_desc: Reason description if desired and actual state are - different. Possible values include: 'Default', 'Disabled', - 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', - 'QueryStoreReadOnly', 'NotSupported' - :vartype reason_desc: str or - ~azure.mgmt.sql.models.AutomaticTuningDisabledReason - """ - - _validation = { - 'actual_state': {'readonly': True}, - 'reason_code': {'readonly': True}, - 'reason_desc': {'readonly': True}, - } - - _attribute_map = { - 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, - 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, - 'reason_code': {'key': 'reasonCode', 'type': 'int'}, - 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningDisabledReason'}, - } - - def __init__(self, *, desired_state=None, **kwargs) -> None: - super(AutomaticTuningOptions, self).__init__(**kwargs) - self.desired_state = desired_state - self.actual_state = None - self.reason_code = None - self.reason_desc = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options.py deleted file mode 100644 index ef7fbcc75e4b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutomaticTuningServerOptions(Model): - """Automatic tuning properties for individual advisors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param desired_state: Automatic tuning option desired state. Possible - values include: 'Off', 'On', 'Default' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired - :ivar actual_state: Automatic tuning option actual state. Possible values - include: 'Off', 'On' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual - :ivar reason_code: Reason code if desired and actual state are different. - :vartype reason_code: int - :ivar reason_desc: Reason description if desired and actual state are - different. Possible values include: 'Default', 'Disabled', - 'AutoConfigured' - :vartype reason_desc: str or - ~azure.mgmt.sql.models.AutomaticTuningServerReason - """ - - _validation = { - 'actual_state': {'readonly': True}, - 'reason_code': {'readonly': True}, - 'reason_desc': {'readonly': True}, - } - - _attribute_map = { - 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, - 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, - 'reason_code': {'key': 'reasonCode', 'type': 'int'}, - 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningServerReason'}, - } - - def __init__(self, **kwargs): - super(AutomaticTuningServerOptions, self).__init__(**kwargs) - self.desired_state = kwargs.get('desired_state', None) - self.actual_state = None - self.reason_code = None - self.reason_desc = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options_py3.py deleted file mode 100644 index 28e5fc0873ad..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutomaticTuningServerOptions(Model): - """Automatic tuning properties for individual advisors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param desired_state: Automatic tuning option desired state. Possible - values include: 'Off', 'On', 'Default' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired - :ivar actual_state: Automatic tuning option actual state. Possible values - include: 'Off', 'On' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual - :ivar reason_code: Reason code if desired and actual state are different. - :vartype reason_code: int - :ivar reason_desc: Reason description if desired and actual state are - different. Possible values include: 'Default', 'Disabled', - 'AutoConfigured' - :vartype reason_desc: str or - ~azure.mgmt.sql.models.AutomaticTuningServerReason - """ - - _validation = { - 'actual_state': {'readonly': True}, - 'reason_code': {'readonly': True}, - 'reason_desc': {'readonly': True}, - } - - _attribute_map = { - 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, - 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, - 'reason_code': {'key': 'reasonCode', 'type': 'int'}, - 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningServerReason'}, - } - - def __init__(self, *, desired_state=None, **kwargs) -> None: - super(AutomaticTuningServerOptions, self).__init__(**kwargs) - self.desired_state = desired_state - self.actual_state = None - self.reason_code = None - self.reason_desc = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy.py deleted file mode 100644 index 544110988a82..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class BackupLongTermRetentionPolicy(ProxyResource): - """A long term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param weekly_retention: The weekly retention policy for an LTR backup in - an ISO 8601 format. - :type weekly_retention: str - :param monthly_retention: The monthly retention policy for an LTR backup - in an ISO 8601 format. - :type monthly_retention: str - :param yearly_retention: The yearly retention policy for an LTR backup in - an ISO 8601 format. - :type yearly_retention: str - :param week_of_year: The week of year to take the yearly backup in an ISO - 8601 format. - :type week_of_year: int - """ - - _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'}, - 'weekly_retention': {'key': 'properties.weeklyRetention', 'type': 'str'}, - 'monthly_retention': {'key': 'properties.monthlyRetention', 'type': 'str'}, - 'yearly_retention': {'key': 'properties.yearlyRetention', 'type': 'str'}, - 'week_of_year': {'key': 'properties.weekOfYear', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(BackupLongTermRetentionPolicy, self).__init__(**kwargs) - self.weekly_retention = kwargs.get('weekly_retention', None) - self.monthly_retention = kwargs.get('monthly_retention', None) - self.yearly_retention = kwargs.get('yearly_retention', None) - self.week_of_year = kwargs.get('week_of_year', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_py3.py deleted file mode 100644 index 6e7cb8ace394..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class BackupLongTermRetentionPolicy(ProxyResource): - """A long term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param weekly_retention: The weekly retention policy for an LTR backup in - an ISO 8601 format. - :type weekly_retention: str - :param monthly_retention: The monthly retention policy for an LTR backup - in an ISO 8601 format. - :type monthly_retention: str - :param yearly_retention: The yearly retention policy for an LTR backup in - an ISO 8601 format. - :type yearly_retention: str - :param week_of_year: The week of year to take the yearly backup in an ISO - 8601 format. - :type week_of_year: int - """ - - _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'}, - 'weekly_retention': {'key': 'properties.weeklyRetention', 'type': 'str'}, - 'monthly_retention': {'key': 'properties.monthlyRetention', 'type': 'str'}, - 'yearly_retention': {'key': 'properties.yearlyRetention', 'type': 'str'}, - 'week_of_year': {'key': 'properties.weekOfYear', 'type': 'int'}, - } - - def __init__(self, *, weekly_retention: str=None, monthly_retention: str=None, yearly_retention: str=None, week_of_year: int=None, **kwargs) -> None: - super(BackupLongTermRetentionPolicy, self).__init__(**kwargs) - self.weekly_retention = weekly_retention - self.monthly_retention = monthly_retention - self.yearly_retention = yearly_retention - self.week_of_year = week_of_year diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy.py deleted file mode 100644 index 1d4fba2cfff4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class BackupShortTermRetentionPolicy(ProxyResource): - """A short term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param retention_days: The backup retention period in days. This is how - many days Point-in-Time Restore will be supported. - :type retention_days: int - """ - - _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'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) - self.retention_days = kwargs.get('retention_days', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_paged.py deleted file mode 100644 index 16d31e341795..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class BackupShortTermRetentionPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`BackupShortTermRetentionPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[BackupShortTermRetentionPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(BackupShortTermRetentionPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_py3.py deleted file mode 100644 index 9df25577baf3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class BackupShortTermRetentionPolicy(ProxyResource): - """A short term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param retention_days: The backup retention period in days. This is how - many days Point-in-Time Restore will be supported. - :type retention_days: int - """ - - _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'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, *, retention_days: int=None, **kwargs) -> None: - super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) - self.retention_days = retention_days diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request.py deleted file mode 100644 index 345059f6dd49..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailabilityRequest(Model): - """A request to check whether the specified name for a resource is available. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name whose availability is to be checked. - :type name: str - :ivar type: Required. The type of resource that is used as the scope of - the availability check. Default value: "Microsoft.Sql/servers" . - :vartype type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - type = "Microsoft.Sql/servers" - - def __init__(self, **kwargs): - super(CheckNameAvailabilityRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request_py3.py deleted file mode 100644 index 5399ec3a7ffb..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailabilityRequest(Model): - """A request to check whether the specified name for a resource is available. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name whose availability is to be checked. - :type name: str - :ivar type: Required. The type of resource that is used as the scope of - the availability check. Default value: "Microsoft.Sql/servers" . - :vartype type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - type = "Microsoft.Sql/servers" - - def __init__(self, *, name: str, **kwargs) -> None: - super(CheckNameAvailabilityRequest, self).__init__(**kwargs) - self.name = name diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response.py deleted file mode 100644 index 40f429db82da..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailabilityResponse(Model): - """A response indicating whether the specified name for a resource is - available. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar available: True if the name is available, otherwise false. - :vartype available: bool - :ivar message: A message explaining why the name is unavailable. Will be - null if the name is available. - :vartype message: str - :ivar name: The name whose availability was checked. - :vartype name: str - :ivar reason: The reason code explaining why the name is unavailable. Will - be null if the name is available. Possible values include: 'Invalid', - 'AlreadyExists' - :vartype reason: str or ~azure.mgmt.sql.models.CheckNameAvailabilityReason - """ - - _validation = { - 'available': {'readonly': True}, - 'message': {'readonly': True}, - 'name': {'readonly': True}, - 'reason': {'readonly': True}, - } - - _attribute_map = { - 'available': {'key': 'available', 'type': 'bool'}, - 'message': {'key': 'message', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'reason': {'key': 'reason', 'type': 'CheckNameAvailabilityReason'}, - } - - def __init__(self, **kwargs): - super(CheckNameAvailabilityResponse, self).__init__(**kwargs) - self.available = None - self.message = None - self.name = None - self.reason = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response_py3.py deleted file mode 100644 index 613c8fd41661..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailabilityResponse(Model): - """A response indicating whether the specified name for a resource is - available. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar available: True if the name is available, otherwise false. - :vartype available: bool - :ivar message: A message explaining why the name is unavailable. Will be - null if the name is available. - :vartype message: str - :ivar name: The name whose availability was checked. - :vartype name: str - :ivar reason: The reason code explaining why the name is unavailable. Will - be null if the name is available. Possible values include: 'Invalid', - 'AlreadyExists' - :vartype reason: str or ~azure.mgmt.sql.models.CheckNameAvailabilityReason - """ - - _validation = { - 'available': {'readonly': True}, - 'message': {'readonly': True}, - 'name': {'readonly': True}, - 'reason': {'readonly': True}, - } - - _attribute_map = { - 'available': {'key': 'available', 'type': 'bool'}, - 'message': {'key': 'message', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'reason': {'key': 'reason', 'type': 'CheckNameAvailabilityReason'}, - } - - def __init__(self, **kwargs) -> None: - super(CheckNameAvailabilityResponse, self).__init__(**kwargs) - self.available = None - self.message = None - self.name = None - self.reason = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition.py deleted file mode 100644 index 926012a21f09..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CompleteDatabaseRestoreDefinition(Model): - """Contains the information necessary to perform a complete database restore - operation. - - All required parameters must be populated in order to send to Azure. - - :param last_backup_name: Required. The last backup name to apply - :type last_backup_name: str - """ - - _validation = { - 'last_backup_name': {'required': True}, - } - - _attribute_map = { - 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CompleteDatabaseRestoreDefinition, self).__init__(**kwargs) - self.last_backup_name = kwargs.get('last_backup_name', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition_py3.py deleted file mode 100644 index 8b3c7f3da1f8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CompleteDatabaseRestoreDefinition(Model): - """Contains the information necessary to perform a complete database restore - operation. - - All required parameters must be populated in order to send to Azure. - - :param last_backup_name: Required. The last backup name to apply - :type last_backup_name: str - """ - - _validation = { - 'last_backup_name': {'required': True}, - } - - _attribute_map = { - 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, - } - - def __init__(self, *, last_backup_name: str, **kwargs) -> None: - super(CompleteDatabaseRestoreDefinition, self).__init__(**kwargs) - self.last_backup_name = last_backup_name diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition.py deleted file mode 100644 index 34ae6626306e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreateDatabaseRestorePointDefinition(Model): - """Contains the information necessary to perform a create database restore - point operation. - - All required parameters must be populated in order to send to Azure. - - :param restore_point_label: Required. The restore point label to apply - :type restore_point_label: str - """ - - _validation = { - 'restore_point_label': {'required': True}, - } - - _attribute_map = { - 'restore_point_label': {'key': 'restorePointLabel', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CreateDatabaseRestorePointDefinition, self).__init__(**kwargs) - self.restore_point_label = kwargs.get('restore_point_label', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition_py3.py deleted file mode 100644 index 7200fc8c236a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreateDatabaseRestorePointDefinition(Model): - """Contains the information necessary to perform a create database restore - point operation. - - All required parameters must be populated in order to send to Azure. - - :param restore_point_label: Required. The restore point label to apply - :type restore_point_label: str - """ - - _validation = { - 'restore_point_label': {'required': True}, - } - - _attribute_map = { - 'restore_point_label': {'key': 'restorePointLabel', 'type': 'str'}, - } - - def __init__(self, *, restore_point_label: str, **kwargs) -> None: - super(CreateDatabaseRestorePointDefinition, self).__init__(**kwargs) - self.restore_point_label = restore_point_label diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy.py deleted file mode 100644 index a872d3af9676..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DataMaskingPolicy(ProxyResource): - """Represents a database data masking policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param data_masking_state: Required. The state of the data masking policy. - Possible values include: 'Disabled', 'Enabled' - :type data_masking_state: str or ~azure.mgmt.sql.models.DataMaskingState - :param exempt_principals: The list of the exempt principals. Specifies the - semicolon-separated list of database users for which the data masking - policy does not apply. The specified users receive data results without - masking for all of the database queries. - :type exempt_principals: str - :ivar application_principals: The list of the application principals. This - is a legacy parameter and is no longer used. - :vartype application_principals: str - :ivar masking_level: The masking level. This is a legacy parameter and is - no longer used. - :vartype masking_level: str - :ivar location: The location of the data masking policy. - :vartype location: str - :ivar kind: The kind of data masking policy. Metadata, used for Azure - portal. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'data_masking_state': {'required': True}, - 'application_principals': {'readonly': True}, - 'masking_level': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data_masking_state': {'key': 'properties.dataMaskingState', 'type': 'DataMaskingState'}, - 'exempt_principals': {'key': 'properties.exemptPrincipals', 'type': 'str'}, - 'application_principals': {'key': 'properties.applicationPrincipals', 'type': 'str'}, - 'masking_level': {'key': 'properties.maskingLevel', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataMaskingPolicy, self).__init__(**kwargs) - self.data_masking_state = kwargs.get('data_masking_state', None) - self.exempt_principals = kwargs.get('exempt_principals', None) - self.application_principals = None - self.masking_level = None - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy_py3.py deleted file mode 100644 index c2227aeb60da..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DataMaskingPolicy(ProxyResource): - """Represents a database data masking policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param data_masking_state: Required. The state of the data masking policy. - Possible values include: 'Disabled', 'Enabled' - :type data_masking_state: str or ~azure.mgmt.sql.models.DataMaskingState - :param exempt_principals: The list of the exempt principals. Specifies the - semicolon-separated list of database users for which the data masking - policy does not apply. The specified users receive data results without - masking for all of the database queries. - :type exempt_principals: str - :ivar application_principals: The list of the application principals. This - is a legacy parameter and is no longer used. - :vartype application_principals: str - :ivar masking_level: The masking level. This is a legacy parameter and is - no longer used. - :vartype masking_level: str - :ivar location: The location of the data masking policy. - :vartype location: str - :ivar kind: The kind of data masking policy. Metadata, used for Azure - portal. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'data_masking_state': {'required': True}, - 'application_principals': {'readonly': True}, - 'masking_level': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data_masking_state': {'key': 'properties.dataMaskingState', 'type': 'DataMaskingState'}, - 'exempt_principals': {'key': 'properties.exemptPrincipals', 'type': 'str'}, - 'application_principals': {'key': 'properties.applicationPrincipals', 'type': 'str'}, - 'masking_level': {'key': 'properties.maskingLevel', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, data_masking_state, exempt_principals: str=None, **kwargs) -> None: - super(DataMaskingPolicy, self).__init__(**kwargs) - self.data_masking_state = data_masking_state - self.exempt_principals = exempt_principals - self.application_principals = None - self.masking_level = None - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule.py deleted file mode 100644 index 9c31fca591b6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DataMaskingRule(ProxyResource): - """Represents a database data masking rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar data_masking_rule_id: The rule Id. - :vartype data_masking_rule_id: str - :param alias_name: The alias name. This is a legacy parameter and is no - longer used. - :type alias_name: str - :param rule_state: The rule state. Used to delete a rule. To delete an - existing rule, specify the schemaName, tableName, columnName, - maskingFunction, and specify ruleState as disabled. However, if the rule - doesn't already exist, the rule will be created with ruleState set to - enabled, regardless of the provided value of ruleState. Possible values - include: 'Disabled', 'Enabled' - :type rule_state: str or ~azure.mgmt.sql.models.DataMaskingRuleState - :param schema_name: Required. The schema name on which the data masking - rule is applied. - :type schema_name: str - :param table_name: Required. The table name on which the data masking rule - is applied. - :type table_name: str - :param column_name: Required. The column name on which the data masking - rule is applied. - :type column_name: str - :param masking_function: Required. The masking function that is used for - the data masking rule. Possible values include: 'Default', 'CCN', 'Email', - 'Number', 'SSN', 'Text' - :type masking_function: str or ~azure.mgmt.sql.models.DataMaskingFunction - :param number_from: The numberFrom property of the masking rule. Required - if maskingFunction is set to Number, otherwise this parameter will be - ignored. - :type number_from: str - :param number_to: The numberTo property of the data masking rule. Required - if maskingFunction is set to Number, otherwise this parameter will be - ignored. - :type number_to: str - :param prefix_size: If maskingFunction is set to Text, the number of - characters to show unmasked in the beginning of the string. Otherwise, - this parameter will be ignored. - :type prefix_size: str - :param suffix_size: If maskingFunction is set to Text, the number of - characters to show unmasked at the end of the string. Otherwise, this - parameter will be ignored. - :type suffix_size: str - :param replacement_string: If maskingFunction is set to Text, the - character to use for masking the unexposed part of the string. Otherwise, - this parameter will be ignored. - :type replacement_string: str - :ivar location: The location of the data masking rule. - :vartype location: str - :ivar kind: The kind of Data Masking Rule. Metadata, used for Azure - portal. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'data_masking_rule_id': {'readonly': True}, - 'schema_name': {'required': True}, - 'table_name': {'required': True}, - 'column_name': {'required': True}, - 'masking_function': {'required': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data_masking_rule_id': {'key': 'properties.id', 'type': 'str'}, - 'alias_name': {'key': 'properties.aliasName', 'type': 'str'}, - 'rule_state': {'key': 'properties.ruleState', 'type': 'DataMaskingRuleState'}, - 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, - 'table_name': {'key': 'properties.tableName', 'type': 'str'}, - 'column_name': {'key': 'properties.columnName', 'type': 'str'}, - 'masking_function': {'key': 'properties.maskingFunction', 'type': 'DataMaskingFunction'}, - 'number_from': {'key': 'properties.numberFrom', 'type': 'str'}, - 'number_to': {'key': 'properties.numberTo', 'type': 'str'}, - 'prefix_size': {'key': 'properties.prefixSize', 'type': 'str'}, - 'suffix_size': {'key': 'properties.suffixSize', 'type': 'str'}, - 'replacement_string': {'key': 'properties.replacementString', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataMaskingRule, self).__init__(**kwargs) - self.data_masking_rule_id = None - self.alias_name = kwargs.get('alias_name', None) - self.rule_state = kwargs.get('rule_state', None) - self.schema_name = kwargs.get('schema_name', None) - self.table_name = kwargs.get('table_name', None) - self.column_name = kwargs.get('column_name', None) - self.masking_function = kwargs.get('masking_function', None) - self.number_from = kwargs.get('number_from', None) - self.number_to = kwargs.get('number_to', None) - self.prefix_size = kwargs.get('prefix_size', None) - self.suffix_size = kwargs.get('suffix_size', None) - self.replacement_string = kwargs.get('replacement_string', None) - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_paged.py deleted file mode 100644 index 4e1eed7b9f51..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DataMaskingRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`DataMaskingRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DataMaskingRule]'} - } - - def __init__(self, *args, **kwargs): - - super(DataMaskingRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_py3.py deleted file mode 100644 index 775fd78a2d6b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_py3.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DataMaskingRule(ProxyResource): - """Represents a database data masking rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar data_masking_rule_id: The rule Id. - :vartype data_masking_rule_id: str - :param alias_name: The alias name. This is a legacy parameter and is no - longer used. - :type alias_name: str - :param rule_state: The rule state. Used to delete a rule. To delete an - existing rule, specify the schemaName, tableName, columnName, - maskingFunction, and specify ruleState as disabled. However, if the rule - doesn't already exist, the rule will be created with ruleState set to - enabled, regardless of the provided value of ruleState. Possible values - include: 'Disabled', 'Enabled' - :type rule_state: str or ~azure.mgmt.sql.models.DataMaskingRuleState - :param schema_name: Required. The schema name on which the data masking - rule is applied. - :type schema_name: str - :param table_name: Required. The table name on which the data masking rule - is applied. - :type table_name: str - :param column_name: Required. The column name on which the data masking - rule is applied. - :type column_name: str - :param masking_function: Required. The masking function that is used for - the data masking rule. Possible values include: 'Default', 'CCN', 'Email', - 'Number', 'SSN', 'Text' - :type masking_function: str or ~azure.mgmt.sql.models.DataMaskingFunction - :param number_from: The numberFrom property of the masking rule. Required - if maskingFunction is set to Number, otherwise this parameter will be - ignored. - :type number_from: str - :param number_to: The numberTo property of the data masking rule. Required - if maskingFunction is set to Number, otherwise this parameter will be - ignored. - :type number_to: str - :param prefix_size: If maskingFunction is set to Text, the number of - characters to show unmasked in the beginning of the string. Otherwise, - this parameter will be ignored. - :type prefix_size: str - :param suffix_size: If maskingFunction is set to Text, the number of - characters to show unmasked at the end of the string. Otherwise, this - parameter will be ignored. - :type suffix_size: str - :param replacement_string: If maskingFunction is set to Text, the - character to use for masking the unexposed part of the string. Otherwise, - this parameter will be ignored. - :type replacement_string: str - :ivar location: The location of the data masking rule. - :vartype location: str - :ivar kind: The kind of Data Masking Rule. Metadata, used for Azure - portal. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'data_masking_rule_id': {'readonly': True}, - 'schema_name': {'required': True}, - 'table_name': {'required': True}, - 'column_name': {'required': True}, - 'masking_function': {'required': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data_masking_rule_id': {'key': 'properties.id', 'type': 'str'}, - 'alias_name': {'key': 'properties.aliasName', 'type': 'str'}, - 'rule_state': {'key': 'properties.ruleState', 'type': 'DataMaskingRuleState'}, - 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, - 'table_name': {'key': 'properties.tableName', 'type': 'str'}, - 'column_name': {'key': 'properties.columnName', 'type': 'str'}, - 'masking_function': {'key': 'properties.maskingFunction', 'type': 'DataMaskingFunction'}, - 'number_from': {'key': 'properties.numberFrom', 'type': 'str'}, - 'number_to': {'key': 'properties.numberTo', 'type': 'str'}, - 'prefix_size': {'key': 'properties.prefixSize', 'type': 'str'}, - 'suffix_size': {'key': 'properties.suffixSize', 'type': 'str'}, - 'replacement_string': {'key': 'properties.replacementString', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, schema_name: str, table_name: str, column_name: str, masking_function, alias_name: str=None, rule_state=None, number_from: str=None, number_to: str=None, prefix_size: str=None, suffix_size: str=None, replacement_string: str=None, **kwargs) -> None: - super(DataMaskingRule, self).__init__(**kwargs) - self.data_masking_rule_id = None - self.alias_name = alias_name - self.rule_state = rule_state - self.schema_name = schema_name - self.table_name = table_name - self.column_name = column_name - self.masking_function = masking_function - self.number_from = number_from - self.number_to = number_to - self.prefix_size = prefix_size - self.suffix_size = suffix_size - self.replacement_string = replacement_string - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database.py deleted file mode 100644 index f3f66d024a7a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database.py +++ /dev/null @@ -1,237 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class Database(TrackedResource): - """A database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :ivar kind: Kind of database. This is metadata used for the Azure portal - experience. - :vartype kind: str - :ivar managed_by: Resource that manages the database. - :vartype managed_by: str - :param create_mode: Specifies the mode of database creation. - Default: regular database creation. - Copy: creates a database as a copy of an existing database. - sourceDatabaseId must be specified as the resource ID of the source - database. - Secondary: creates a database as a secondary replica of an existing - database. sourceDatabaseId must be specified as the resource ID of the - existing primary database. - PointInTimeRestore: Creates a database by restoring a point in time backup - of an existing database. sourceDatabaseId must be specified as the - resource ID of the existing database, and restorePointInTime must be - specified. - Recovery: Creates a database by restoring a geo-replicated backup. - sourceDatabaseId must be specified as the recoverable database resource ID - to restore. - Restore: Creates a database by restoring a backup of a deleted database. - sourceDatabaseId must be specified. If sourceDatabaseId is the database's - original resource ID, then sourceDatabaseDeletionDate must be specified. - Otherwise sourceDatabaseId must be the restorable dropped database - resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime - may also be specified to restore from an earlier point in time. - RestoreLongTermRetentionBackup: Creates a database by restoring from a - long term retention vault. recoveryServicesRecoveryPointResourceId must be - specified as the recovery point resource ID. - Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for - DataWarehouse edition. Possible values include: 'Default', 'Copy', - 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', - 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', - 'RestoreLongTermRetentionBackup', 'OnlineSecondary' - :type create_mode: str or ~azure.mgmt.sql.models.CreateMode - :param collation: The collation of the database. - :type collation: str - :param max_size_bytes: The max size of the database expressed in bytes. - :type max_size_bytes: long - :param sample_name: The name of the sample schema to apply when creating - this database. Possible values include: 'AdventureWorksLT', - 'WideWorldImportersStd', 'WideWorldImportersFull' - :type sample_name: str or ~azure.mgmt.sql.models.SampleName - :param elastic_pool_id: The resource identifier of the elastic pool - containing this database. - :type elastic_pool_id: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :ivar status: The status of the database. Possible values include: - 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', - 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', - 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', - 'Paused', 'Resuming', 'Scaling' - :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus - :ivar database_id: The ID of the database. - :vartype database_id: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar current_service_objective_name: The current service level objective - name of the database. - :vartype current_service_objective_name: str - :ivar requested_service_objective_name: The requested service level - objective name of the database. - :vartype requested_service_objective_name: str - :ivar default_secondary_location: The default secondary region for this - database. - :vartype default_secondary_location: str - :ivar failover_group_id: Failover Group resource identifier that this - database belongs to. - :vartype failover_group_id: str - :param restore_point_in_time: Specifies the point in time (ISO8601 format) - of the source database that will be restored to create the new database. - :type restore_point_in_time: datetime - :param source_database_deletion_date: Specifies the time that the database - was deleted. - :type source_database_deletion_date: datetime - :param recovery_services_recovery_point_id: The resource identifier of the - recovery point associated with create operation of this database. - :type recovery_services_recovery_point_id: str - :param long_term_retention_backup_resource_id: The resource identifier of - the long term retention backup associated with create operation of this - database. - :type long_term_retention_backup_resource_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param restorable_dropped_database_id: The resource identifier of the - restorable dropped database associated with create operation of this - database. - :type restorable_dropped_database_id: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param zone_redundant: Whether or not this database is zone redundant, - which means the replicas of this database will be spread across multiple - availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this database. Possible - values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType - :ivar max_log_size_bytes: The max log size for this database. - :vartype max_log_size_bytes: long - :ivar earliest_restore_date: This records the earliest start date and time - that restore is available for this database (ISO8601 format). - :vartype earliest_restore_date: datetime - :param read_scale: The state of read-only routing. If enabled, connections - that have application intent set to readonly in their connection string - may be routed to a readonly secondary replica in the same region. Possible - values include: 'Enabled', 'Disabled' - :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale - :ivar current_sku: The name and tier of the SKU. - :vartype current_sku: ~azure.mgmt.sql.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'managed_by': {'readonly': True}, - 'status': {'readonly': True}, - 'database_id': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'current_service_objective_name': {'readonly': True}, - 'requested_service_objective_name': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - 'max_log_size_bytes': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'current_sku': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, - 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, - 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, - 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, - 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, - 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs): - super(Database, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.kind = None - self.managed_by = None - self.create_mode = kwargs.get('create_mode', None) - self.collation = kwargs.get('collation', None) - self.max_size_bytes = kwargs.get('max_size_bytes', None) - self.sample_name = kwargs.get('sample_name', None) - self.elastic_pool_id = kwargs.get('elastic_pool_id', None) - self.source_database_id = kwargs.get('source_database_id', None) - self.status = None - self.database_id = None - self.creation_date = None - self.current_service_objective_name = None - self.requested_service_objective_name = None - self.default_secondary_location = None - self.failover_group_id = None - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.source_database_deletion_date = kwargs.get('source_database_deletion_date', None) - self.recovery_services_recovery_point_id = kwargs.get('recovery_services_recovery_point_id', None) - self.long_term_retention_backup_resource_id = kwargs.get('long_term_retention_backup_resource_id', None) - self.recoverable_database_id = kwargs.get('recoverable_database_id', None) - self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) - self.catalog_collation = kwargs.get('catalog_collation', None) - self.zone_redundant = kwargs.get('zone_redundant', None) - self.license_type = kwargs.get('license_type', None) - self.max_log_size_bytes = None - self.earliest_restore_date = None - self.read_scale = kwargs.get('read_scale', None) - self.current_sku = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning.py deleted file mode 100644 index eca56cffda2c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseAutomaticTuning(ProxyResource): - """Database-level Automatic Tuning. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param desired_state: Automatic tuning desired state. Possible values - include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode - :ivar actual_state: Automatic tuning actual state. Possible values - include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - :vartype actual_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode - :param options: Automatic tuning options definition. - :type options: dict[str, ~azure.mgmt.sql.models.AutomaticTuningOptions] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'actual_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningMode'}, - 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningMode'}, - 'options': {'key': 'properties.options', 'type': '{AutomaticTuningOptions}'}, - } - - def __init__(self, **kwargs): - super(DatabaseAutomaticTuning, self).__init__(**kwargs) - self.desired_state = kwargs.get('desired_state', None) - self.actual_state = None - self.options = kwargs.get('options', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning_py3.py deleted file mode 100644 index 86bb068ce54f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseAutomaticTuning(ProxyResource): - """Database-level Automatic Tuning. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param desired_state: Automatic tuning desired state. Possible values - include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode - :ivar actual_state: Automatic tuning actual state. Possible values - include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - :vartype actual_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode - :param options: Automatic tuning options definition. - :type options: dict[str, ~azure.mgmt.sql.models.AutomaticTuningOptions] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'actual_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningMode'}, - 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningMode'}, - 'options': {'key': 'properties.options', 'type': '{AutomaticTuningOptions}'}, - } - - def __init__(self, *, desired_state=None, options=None, **kwargs) -> None: - super(DatabaseAutomaticTuning, self).__init__(**kwargs) - self.desired_state = desired_state - self.actual_state = None - self.options = options diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy.py deleted file mode 100644 index 6db06ede30ad..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseBlobAuditingPolicy(ProxyResource): - """A database blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Resource kind. - :vartype kind: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DatabaseBlobAuditingPolicy, self).__init__(**kwargs) - self.kind = None - self.state = kwargs.get('state', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) - self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) - self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) - self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy_py3.py deleted file mode 100644 index 2acc43dae952..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy_py3.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseBlobAuditingPolicy(ProxyResource): - """A database blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Resource kind. - :vartype kind: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: - super(DatabaseBlobAuditingPolicy, self).__init__(**kwargs) - self.kind = None - self.state = state - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.audit_actions_and_groups = audit_actions_and_groups - self.storage_account_subscription_id = storage_account_subscription_id - self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use - self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation.py deleted file mode 100644 index fec6e0e19b64..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseOperation(ProxyResource): - """A database operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_name: The name of the database the operation is being - performed on. - :vartype database_name: str - :ivar operation: The name of operation. - :vartype operation: str - :ivar operation_friendly_name: The friendly name of operation. - :vartype operation_friendly_name: str - :ivar percent_complete: The percentage of the operation completed. - :vartype percent_complete: int - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar start_time: The operation start time. - :vartype start_time: datetime - :ivar state: The operation state. Possible values include: 'Pending', - 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', 'Cancelled' - :vartype state: str or ~azure.mgmt.sql.models.ManagementOperationState - :ivar error_code: The operation error code. - :vartype error_code: int - :ivar error_description: The operation error description. - :vartype error_description: str - :ivar error_severity: The operation error severity. - :vartype error_severity: int - :ivar is_user_error: Whether or not the error is a user error. - :vartype is_user_error: bool - :ivar estimated_completion_time: The estimated completion time of the - operation. - :vartype estimated_completion_time: datetime - :ivar description: The operation description. - :vartype description: str - :ivar is_cancellable: Whether the operation can be cancelled. - :vartype is_cancellable: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_name': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_friendly_name': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_description': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'is_user_error': {'readonly': True}, - 'estimated_completion_time': {'readonly': True}, - 'description': {'readonly': True}, - 'is_cancellable': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, - 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DatabaseOperation, self).__init__(**kwargs) - self.database_name = None - self.operation = None - self.operation_friendly_name = None - self.percent_complete = None - self.server_name = None - self.start_time = None - self.state = None - self.error_code = None - self.error_description = None - self.error_severity = None - self.is_user_error = None - self.estimated_completion_time = None - self.description = None - self.is_cancellable = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_paged.py deleted file mode 100644 index 4c22372df877..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseOperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`DatabaseOperation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseOperation]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseOperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_py3.py deleted file mode 100644 index 66fb0bb0c602..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_py3.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseOperation(ProxyResource): - """A database operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_name: The name of the database the operation is being - performed on. - :vartype database_name: str - :ivar operation: The name of operation. - :vartype operation: str - :ivar operation_friendly_name: The friendly name of operation. - :vartype operation_friendly_name: str - :ivar percent_complete: The percentage of the operation completed. - :vartype percent_complete: int - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar start_time: The operation start time. - :vartype start_time: datetime - :ivar state: The operation state. Possible values include: 'Pending', - 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', 'Cancelled' - :vartype state: str or ~azure.mgmt.sql.models.ManagementOperationState - :ivar error_code: The operation error code. - :vartype error_code: int - :ivar error_description: The operation error description. - :vartype error_description: str - :ivar error_severity: The operation error severity. - :vartype error_severity: int - :ivar is_user_error: Whether or not the error is a user error. - :vartype is_user_error: bool - :ivar estimated_completion_time: The estimated completion time of the - operation. - :vartype estimated_completion_time: datetime - :ivar description: The operation description. - :vartype description: str - :ivar is_cancellable: Whether the operation can be cancelled. - :vartype is_cancellable: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_name': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_friendly_name': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_description': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'is_user_error': {'readonly': True}, - 'estimated_completion_time': {'readonly': True}, - 'description': {'readonly': True}, - 'is_cancellable': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, - 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, - } - - def __init__(self, **kwargs) -> None: - super(DatabaseOperation, self).__init__(**kwargs) - self.database_name = None - self.operation = None - self.operation_friendly_name = None - self.percent_complete = None - self.server_name = None - self.start_time = None - self.state = None - self.error_code = None - self.error_description = None - self.error_severity = None - self.is_user_error = None - self.estimated_completion_time = None - self.description = None - self.is_cancellable = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_paged.py deleted file mode 100644 index bc3842934a39..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`Database ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Database]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py deleted file mode 100644 index 9cfb4d07a7e6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py +++ /dev/null @@ -1,237 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class Database(TrackedResource): - """A database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :ivar kind: Kind of database. This is metadata used for the Azure portal - experience. - :vartype kind: str - :ivar managed_by: Resource that manages the database. - :vartype managed_by: str - :param create_mode: Specifies the mode of database creation. - Default: regular database creation. - Copy: creates a database as a copy of an existing database. - sourceDatabaseId must be specified as the resource ID of the source - database. - Secondary: creates a database as a secondary replica of an existing - database. sourceDatabaseId must be specified as the resource ID of the - existing primary database. - PointInTimeRestore: Creates a database by restoring a point in time backup - of an existing database. sourceDatabaseId must be specified as the - resource ID of the existing database, and restorePointInTime must be - specified. - Recovery: Creates a database by restoring a geo-replicated backup. - sourceDatabaseId must be specified as the recoverable database resource ID - to restore. - Restore: Creates a database by restoring a backup of a deleted database. - sourceDatabaseId must be specified. If sourceDatabaseId is the database's - original resource ID, then sourceDatabaseDeletionDate must be specified. - Otherwise sourceDatabaseId must be the restorable dropped database - resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime - may also be specified to restore from an earlier point in time. - RestoreLongTermRetentionBackup: Creates a database by restoring from a - long term retention vault. recoveryServicesRecoveryPointResourceId must be - specified as the recovery point resource ID. - Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for - DataWarehouse edition. Possible values include: 'Default', 'Copy', - 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', - 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', - 'RestoreLongTermRetentionBackup', 'OnlineSecondary' - :type create_mode: str or ~azure.mgmt.sql.models.CreateMode - :param collation: The collation of the database. - :type collation: str - :param max_size_bytes: The max size of the database expressed in bytes. - :type max_size_bytes: long - :param sample_name: The name of the sample schema to apply when creating - this database. Possible values include: 'AdventureWorksLT', - 'WideWorldImportersStd', 'WideWorldImportersFull' - :type sample_name: str or ~azure.mgmt.sql.models.SampleName - :param elastic_pool_id: The resource identifier of the elastic pool - containing this database. - :type elastic_pool_id: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :ivar status: The status of the database. Possible values include: - 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', - 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', - 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', - 'Paused', 'Resuming', 'Scaling' - :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus - :ivar database_id: The ID of the database. - :vartype database_id: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar current_service_objective_name: The current service level objective - name of the database. - :vartype current_service_objective_name: str - :ivar requested_service_objective_name: The requested service level - objective name of the database. - :vartype requested_service_objective_name: str - :ivar default_secondary_location: The default secondary region for this - database. - :vartype default_secondary_location: str - :ivar failover_group_id: Failover Group resource identifier that this - database belongs to. - :vartype failover_group_id: str - :param restore_point_in_time: Specifies the point in time (ISO8601 format) - of the source database that will be restored to create the new database. - :type restore_point_in_time: datetime - :param source_database_deletion_date: Specifies the time that the database - was deleted. - :type source_database_deletion_date: datetime - :param recovery_services_recovery_point_id: The resource identifier of the - recovery point associated with create operation of this database. - :type recovery_services_recovery_point_id: str - :param long_term_retention_backup_resource_id: The resource identifier of - the long term retention backup associated with create operation of this - database. - :type long_term_retention_backup_resource_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param restorable_dropped_database_id: The resource identifier of the - restorable dropped database associated with create operation of this - database. - :type restorable_dropped_database_id: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param zone_redundant: Whether or not this database is zone redundant, - which means the replicas of this database will be spread across multiple - availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this database. Possible - values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType - :ivar max_log_size_bytes: The max log size for this database. - :vartype max_log_size_bytes: long - :ivar earliest_restore_date: This records the earliest start date and time - that restore is available for this database (ISO8601 format). - :vartype earliest_restore_date: datetime - :param read_scale: The state of read-only routing. If enabled, connections - that have application intent set to readonly in their connection string - may be routed to a readonly secondary replica in the same region. Possible - values include: 'Enabled', 'Disabled' - :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale - :ivar current_sku: The name and tier of the SKU. - :vartype current_sku: ~azure.mgmt.sql.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'managed_by': {'readonly': True}, - 'status': {'readonly': True}, - 'database_id': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'current_service_objective_name': {'readonly': True}, - 'requested_service_objective_name': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - 'max_log_size_bytes': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'current_sku': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, - 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, - 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, - 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, - 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, - 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, - } - - def __init__(self, *, location: str, tags=None, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, **kwargs) -> None: - super(Database, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.kind = None - self.managed_by = None - self.create_mode = create_mode - self.collation = collation - self.max_size_bytes = max_size_bytes - self.sample_name = sample_name - self.elastic_pool_id = elastic_pool_id - self.source_database_id = source_database_id - self.status = None - self.database_id = None - self.creation_date = None - self.current_service_objective_name = None - self.requested_service_objective_name = None - self.default_secondary_location = None - self.failover_group_id = None - self.restore_point_in_time = restore_point_in_time - self.source_database_deletion_date = source_database_deletion_date - self.recovery_services_recovery_point_id = recovery_services_recovery_point_id - self.long_term_retention_backup_resource_id = long_term_retention_backup_resource_id - self.recoverable_database_id = recoverable_database_id - self.restorable_dropped_database_id = restorable_dropped_database_id - self.catalog_collation = catalog_collation - self.zone_redundant = zone_redundant - self.license_type = license_type - self.max_log_size_bytes = None - self.earliest_restore_date = None - self.read_scale = read_scale - self.current_sku = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy.py deleted file mode 100644 index c425573a5a91..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseSecurityAlertPolicy(ProxyResource): - """Contains information about a database Threat Detection policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar kind: Resource kind. - :vartype kind: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint and storageAccountAccessKey are required. - Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies the semicolon-separated list of alerts - that are disabled, or empty string to disable no alerts. Possible values: - Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; - Data_Exfiltration; Unsafe_Action. - :type disabled_alerts: str - :param email_addresses: Specifies the semicolon-separated list of e-mail - addresses to which the alert is sent. - :type email_addresses: str - :param email_account_admins: Specifies that the alert is sent to the - account administrators. Possible values include: 'Enabled', 'Disabled' - :type email_account_admins: str or - ~azure.mgmt.sql.models.SecurityAlertPolicyEmailAccountAdmins - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. If state is Enabled, storageEndpoint is - required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. If state is Enabled, - storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :param use_server_default: Specifies whether to use the default server - policy. Possible values include: 'Enabled', 'Disabled' - :type use_server_default: str or - ~azure.mgmt.sql.models.SecurityAlertPolicyUseServerDefault - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': 'str'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': 'str'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'SecurityAlertPolicyEmailAccountAdmins'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'use_server_default': {'key': 'properties.useServerDefault', 'type': 'SecurityAlertPolicyUseServerDefault'}, - } - - def __init__(self, **kwargs): - super(DatabaseSecurityAlertPolicy, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.kind = None - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.use_server_default = kwargs.get('use_server_default', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy_py3.py deleted file mode 100644 index 3d85e01a6635..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy_py3.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseSecurityAlertPolicy(ProxyResource): - """Contains information about a database Threat Detection policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar kind: Resource kind. - :vartype kind: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint and storageAccountAccessKey are required. - Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies the semicolon-separated list of alerts - that are disabled, or empty string to disable no alerts. Possible values: - Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; - Data_Exfiltration; Unsafe_Action. - :type disabled_alerts: str - :param email_addresses: Specifies the semicolon-separated list of e-mail - addresses to which the alert is sent. - :type email_addresses: str - :param email_account_admins: Specifies that the alert is sent to the - account administrators. Possible values include: 'Enabled', 'Disabled' - :type email_account_admins: str or - ~azure.mgmt.sql.models.SecurityAlertPolicyEmailAccountAdmins - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. If state is Enabled, storageEndpoint is - required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. If state is Enabled, - storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :param use_server_default: Specifies whether to use the default server - policy. Possible values include: 'Enabled', 'Disabled' - :type use_server_default: str or - ~azure.mgmt.sql.models.SecurityAlertPolicyUseServerDefault - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': 'str'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': 'str'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'SecurityAlertPolicyEmailAccountAdmins'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'use_server_default': {'key': 'properties.useServerDefault', 'type': 'SecurityAlertPolicyUseServerDefault'}, - } - - def __init__(self, *, state, location: str=None, disabled_alerts: str=None, email_addresses: str=None, email_account_admins=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, use_server_default=None, **kwargs) -> None: - super(DatabaseSecurityAlertPolicy, self).__init__(**kwargs) - self.location = location - self.kind = None - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.use_server_default = use_server_default diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update.py deleted file mode 100644 index d4d4cbdf4270..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update.py +++ /dev/null @@ -1,209 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseUpdate(Model): - """A database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :param create_mode: Specifies the mode of database creation. - Default: regular database creation. - Copy: creates a database as a copy of an existing database. - sourceDatabaseId must be specified as the resource ID of the source - database. - Secondary: creates a database as a secondary replica of an existing - database. sourceDatabaseId must be specified as the resource ID of the - existing primary database. - PointInTimeRestore: Creates a database by restoring a point in time backup - of an existing database. sourceDatabaseId must be specified as the - resource ID of the existing database, and restorePointInTime must be - specified. - Recovery: Creates a database by restoring a geo-replicated backup. - sourceDatabaseId must be specified as the recoverable database resource ID - to restore. - Restore: Creates a database by restoring a backup of a deleted database. - sourceDatabaseId must be specified. If sourceDatabaseId is the database's - original resource ID, then sourceDatabaseDeletionDate must be specified. - Otherwise sourceDatabaseId must be the restorable dropped database - resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime - may also be specified to restore from an earlier point in time. - RestoreLongTermRetentionBackup: Creates a database by restoring from a - long term retention vault. recoveryServicesRecoveryPointResourceId must be - specified as the recovery point resource ID. - Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for - DataWarehouse edition. Possible values include: 'Default', 'Copy', - 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', - 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', - 'RestoreLongTermRetentionBackup', 'OnlineSecondary' - :type create_mode: str or ~azure.mgmt.sql.models.CreateMode - :param collation: The collation of the database. - :type collation: str - :param max_size_bytes: The max size of the database expressed in bytes. - :type max_size_bytes: long - :param sample_name: The name of the sample schema to apply when creating - this database. Possible values include: 'AdventureWorksLT', - 'WideWorldImportersStd', 'WideWorldImportersFull' - :type sample_name: str or ~azure.mgmt.sql.models.SampleName - :param elastic_pool_id: The resource identifier of the elastic pool - containing this database. - :type elastic_pool_id: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :ivar status: The status of the database. Possible values include: - 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', - 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', - 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', - 'Paused', 'Resuming', 'Scaling' - :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus - :ivar database_id: The ID of the database. - :vartype database_id: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar current_service_objective_name: The current service level objective - name of the database. - :vartype current_service_objective_name: str - :ivar requested_service_objective_name: The requested service level - objective name of the database. - :vartype requested_service_objective_name: str - :ivar default_secondary_location: The default secondary region for this - database. - :vartype default_secondary_location: str - :ivar failover_group_id: Failover Group resource identifier that this - database belongs to. - :vartype failover_group_id: str - :param restore_point_in_time: Specifies the point in time (ISO8601 format) - of the source database that will be restored to create the new database. - :type restore_point_in_time: datetime - :param source_database_deletion_date: Specifies the time that the database - was deleted. - :type source_database_deletion_date: datetime - :param recovery_services_recovery_point_id: The resource identifier of the - recovery point associated with create operation of this database. - :type recovery_services_recovery_point_id: str - :param long_term_retention_backup_resource_id: The resource identifier of - the long term retention backup associated with create operation of this - database. - :type long_term_retention_backup_resource_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param restorable_dropped_database_id: The resource identifier of the - restorable dropped database associated with create operation of this - database. - :type restorable_dropped_database_id: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param zone_redundant: Whether or not this database is zone redundant, - which means the replicas of this database will be spread across multiple - availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this database. Possible - values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType - :ivar max_log_size_bytes: The max log size for this database. - :vartype max_log_size_bytes: long - :ivar earliest_restore_date: This records the earliest start date and time - that restore is available for this database (ISO8601 format). - :vartype earliest_restore_date: datetime - :param read_scale: The state of read-only routing. If enabled, connections - that have application intent set to readonly in their connection string - may be routed to a readonly secondary replica in the same region. Possible - values include: 'Enabled', 'Disabled' - :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale - :ivar current_sku: The name and tier of the SKU. - :vartype current_sku: ~azure.mgmt.sql.models.Sku - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'status': {'readonly': True}, - 'database_id': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'current_service_objective_name': {'readonly': True}, - 'requested_service_objective_name': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - 'max_log_size_bytes': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'current_sku': {'readonly': True}, - } - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, - 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, - 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, - 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, - 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, - 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(DatabaseUpdate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.create_mode = kwargs.get('create_mode', None) - self.collation = kwargs.get('collation', None) - self.max_size_bytes = kwargs.get('max_size_bytes', None) - self.sample_name = kwargs.get('sample_name', None) - self.elastic_pool_id = kwargs.get('elastic_pool_id', None) - self.source_database_id = kwargs.get('source_database_id', None) - self.status = None - self.database_id = None - self.creation_date = None - self.current_service_objective_name = None - self.requested_service_objective_name = None - self.default_secondary_location = None - self.failover_group_id = None - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.source_database_deletion_date = kwargs.get('source_database_deletion_date', None) - self.recovery_services_recovery_point_id = kwargs.get('recovery_services_recovery_point_id', None) - self.long_term_retention_backup_resource_id = kwargs.get('long_term_retention_backup_resource_id', None) - self.recoverable_database_id = kwargs.get('recoverable_database_id', None) - self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) - self.catalog_collation = kwargs.get('catalog_collation', None) - self.zone_redundant = kwargs.get('zone_redundant', None) - self.license_type = kwargs.get('license_type', None) - self.max_log_size_bytes = None - self.earliest_restore_date = None - self.read_scale = kwargs.get('read_scale', None) - self.current_sku = None - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update_py3.py deleted file mode 100644 index 5a9a6f3b742d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update_py3.py +++ /dev/null @@ -1,209 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseUpdate(Model): - """A database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :param create_mode: Specifies the mode of database creation. - Default: regular database creation. - Copy: creates a database as a copy of an existing database. - sourceDatabaseId must be specified as the resource ID of the source - database. - Secondary: creates a database as a secondary replica of an existing - database. sourceDatabaseId must be specified as the resource ID of the - existing primary database. - PointInTimeRestore: Creates a database by restoring a point in time backup - of an existing database. sourceDatabaseId must be specified as the - resource ID of the existing database, and restorePointInTime must be - specified. - Recovery: Creates a database by restoring a geo-replicated backup. - sourceDatabaseId must be specified as the recoverable database resource ID - to restore. - Restore: Creates a database by restoring a backup of a deleted database. - sourceDatabaseId must be specified. If sourceDatabaseId is the database's - original resource ID, then sourceDatabaseDeletionDate must be specified. - Otherwise sourceDatabaseId must be the restorable dropped database - resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime - may also be specified to restore from an earlier point in time. - RestoreLongTermRetentionBackup: Creates a database by restoring from a - long term retention vault. recoveryServicesRecoveryPointResourceId must be - specified as the recovery point resource ID. - Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for - DataWarehouse edition. Possible values include: 'Default', 'Copy', - 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', - 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', - 'RestoreLongTermRetentionBackup', 'OnlineSecondary' - :type create_mode: str or ~azure.mgmt.sql.models.CreateMode - :param collation: The collation of the database. - :type collation: str - :param max_size_bytes: The max size of the database expressed in bytes. - :type max_size_bytes: long - :param sample_name: The name of the sample schema to apply when creating - this database. Possible values include: 'AdventureWorksLT', - 'WideWorldImportersStd', 'WideWorldImportersFull' - :type sample_name: str or ~azure.mgmt.sql.models.SampleName - :param elastic_pool_id: The resource identifier of the elastic pool - containing this database. - :type elastic_pool_id: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :ivar status: The status of the database. Possible values include: - 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', - 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', - 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', - 'Paused', 'Resuming', 'Scaling' - :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus - :ivar database_id: The ID of the database. - :vartype database_id: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar current_service_objective_name: The current service level objective - name of the database. - :vartype current_service_objective_name: str - :ivar requested_service_objective_name: The requested service level - objective name of the database. - :vartype requested_service_objective_name: str - :ivar default_secondary_location: The default secondary region for this - database. - :vartype default_secondary_location: str - :ivar failover_group_id: Failover Group resource identifier that this - database belongs to. - :vartype failover_group_id: str - :param restore_point_in_time: Specifies the point in time (ISO8601 format) - of the source database that will be restored to create the new database. - :type restore_point_in_time: datetime - :param source_database_deletion_date: Specifies the time that the database - was deleted. - :type source_database_deletion_date: datetime - :param recovery_services_recovery_point_id: The resource identifier of the - recovery point associated with create operation of this database. - :type recovery_services_recovery_point_id: str - :param long_term_retention_backup_resource_id: The resource identifier of - the long term retention backup associated with create operation of this - database. - :type long_term_retention_backup_resource_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param restorable_dropped_database_id: The resource identifier of the - restorable dropped database associated with create operation of this - database. - :type restorable_dropped_database_id: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param zone_redundant: Whether or not this database is zone redundant, - which means the replicas of this database will be spread across multiple - availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this database. Possible - values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType - :ivar max_log_size_bytes: The max log size for this database. - :vartype max_log_size_bytes: long - :ivar earliest_restore_date: This records the earliest start date and time - that restore is available for this database (ISO8601 format). - :vartype earliest_restore_date: datetime - :param read_scale: The state of read-only routing. If enabled, connections - that have application intent set to readonly in their connection string - may be routed to a readonly secondary replica in the same region. Possible - values include: 'Enabled', 'Disabled' - :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale - :ivar current_sku: The name and tier of the SKU. - :vartype current_sku: ~azure.mgmt.sql.models.Sku - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'status': {'readonly': True}, - 'database_id': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'current_service_objective_name': {'readonly': True}, - 'requested_service_objective_name': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - 'max_log_size_bytes': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'current_sku': {'readonly': True}, - } - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, - 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, - 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, - 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, - 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, - 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, tags=None, **kwargs) -> None: - super(DatabaseUpdate, self).__init__(**kwargs) - self.sku = sku - self.create_mode = create_mode - self.collation = collation - self.max_size_bytes = max_size_bytes - self.sample_name = sample_name - self.elastic_pool_id = elastic_pool_id - self.source_database_id = source_database_id - self.status = None - self.database_id = None - self.creation_date = None - self.current_service_objective_name = None - self.requested_service_objective_name = None - self.default_secondary_location = None - self.failover_group_id = None - self.restore_point_in_time = restore_point_in_time - self.source_database_deletion_date = source_database_deletion_date - self.recovery_services_recovery_point_id = recovery_services_recovery_point_id - self.long_term_retention_backup_resource_id = long_term_retention_backup_resource_id - self.recoverable_database_id = recoverable_database_id - self.restorable_dropped_database_id = restorable_dropped_database_id - self.catalog_collation = catalog_collation - self.zone_redundant = zone_redundant - self.license_type = license_type - self.max_log_size_bytes = None - self.earliest_restore_date = None - self.read_scale = read_scale - self.current_sku = None - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage.py deleted file mode 100644 index 948942f56124..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseUsage(Model): - """The database usages. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the usage metric. - :vartype name: str - :ivar resource_name: The name of the resource. - :vartype resource_name: str - :ivar display_name: The usage metric display name. - :vartype display_name: str - :ivar current_value: The current value of the usage metric. - :vartype current_value: float - :ivar limit: The current limit of the usage metric. - :vartype limit: float - :ivar unit: The units of the usage metric. - :vartype unit: str - :ivar next_reset_time: The next reset time for the usage metric (ISO8601 - format). - :vartype next_reset_time: datetime - """ - - _validation = { - 'name': {'readonly': True}, - 'resource_name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'next_reset_time': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_name': {'key': 'resourceName', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(DatabaseUsage, self).__init__(**kwargs) - self.name = None - self.resource_name = None - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None - self.next_reset_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_paged.py deleted file mode 100644 index 9641161225df..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseUsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`DatabaseUsage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseUsage]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseUsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_py3.py deleted file mode 100644 index 46a0f5ca4ba9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseUsage(Model): - """The database usages. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the usage metric. - :vartype name: str - :ivar resource_name: The name of the resource. - :vartype resource_name: str - :ivar display_name: The usage metric display name. - :vartype display_name: str - :ivar current_value: The current value of the usage metric. - :vartype current_value: float - :ivar limit: The current limit of the usage metric. - :vartype limit: float - :ivar unit: The units of the usage metric. - :vartype unit: str - :ivar next_reset_time: The next reset time for the usage metric (ISO8601 - format). - :vartype next_reset_time: datetime - """ - - _validation = { - 'name': {'readonly': True}, - 'resource_name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'next_reset_time': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_name': {'key': 'resourceName', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(DatabaseUsage, self).__init__(**kwargs) - self.name = None - self.resource_name = None - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None - self.next_reset_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment.py deleted file mode 100644 index b4fbd42f864b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseVulnerabilityAssessment(ProxyResource): - """A database vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: A blob storage container path to hold the - scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It - is required if server level vulnerability assessment policy doesn't set - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _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'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, **kwargs): - super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = kwargs.get('storage_container_path', None) - self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.recurring_scans = kwargs.get('recurring_scans', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_paged.py deleted file mode 100644 index 8ec2fe4eae5f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseVulnerabilityAssessmentPaged(Paged): - """ - A paging container for iterating over a list of :class:`DatabaseVulnerabilityAssessment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseVulnerabilityAssessment]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_py3.py deleted file mode 100644 index e0d54f6105f1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseVulnerabilityAssessment(ProxyResource): - """A database vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: A blob storage container path to hold the - scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It - is required if server level vulnerability assessment policy doesn't set - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _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'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, *, storage_container_path: str=None, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: - super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = storage_container_path - self.storage_container_sas_key = storage_container_sas_key - self.storage_account_access_key = storage_account_access_key - self.recurring_scans = recurring_scans diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline.py deleted file mode 100644 index 66881dfb9b5c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseVulnerabilityAssessmentRuleBaseline(ProxyResource): - """A database vulnerability assessment rule baseline. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param baseline_results: Required. The rule baseline result - :type baseline_results: - list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'baseline_results': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'baseline_results': {'key': 'properties.baselineResults', 'type': '[DatabaseVulnerabilityAssessmentRuleBaselineItem]'}, - } - - def __init__(self, **kwargs): - super(DatabaseVulnerabilityAssessmentRuleBaseline, self).__init__(**kwargs) - self.baseline_results = kwargs.get('baseline_results', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item.py deleted file mode 100644 index 4bd7d0e16f52..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseVulnerabilityAssessmentRuleBaselineItem(Model): - """Properties for an Azure SQL Database Vulnerability Assessment rule - baseline's result. - - All required parameters must be populated in order to send to Azure. - - :param result: Required. The rule baseline result - :type result: list[str] - """ - - _validation = { - 'result': {'required': True}, - } - - _attribute_map = { - 'result': {'key': 'result', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(DatabaseVulnerabilityAssessmentRuleBaselineItem, self).__init__(**kwargs) - self.result = kwargs.get('result', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py deleted file mode 100644 index 9378a89cc0f0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseVulnerabilityAssessmentRuleBaselineItem(Model): - """Properties for an Azure SQL Database Vulnerability Assessment rule - baseline's result. - - All required parameters must be populated in order to send to Azure. - - :param result: Required. The rule baseline result - :type result: list[str] - """ - - _validation = { - 'result': {'required': True}, - } - - _attribute_map = { - 'result': {'key': 'result', 'type': '[str]'}, - } - - def __init__(self, *, result, **kwargs) -> None: - super(DatabaseVulnerabilityAssessmentRuleBaselineItem, self).__init__(**kwargs) - self.result = result diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_py3.py deleted file mode 100644 index 4997c258c475..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseVulnerabilityAssessmentRuleBaseline(ProxyResource): - """A database vulnerability assessment rule baseline. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param baseline_results: Required. The rule baseline result - :type baseline_results: - list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'baseline_results': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'baseline_results': {'key': 'properties.baselineResults', 'type': '[DatabaseVulnerabilityAssessmentRuleBaselineItem]'}, - } - - def __init__(self, *, baseline_results, **kwargs) -> None: - super(DatabaseVulnerabilityAssessmentRuleBaseline, self).__init__(**kwargs) - self.baseline_results = baseline_results diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export.py deleted file mode 100644 index 4d088fd265c0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseVulnerabilityAssessmentScansExport(ProxyResource): - """A database Vulnerability Assessment scan export resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar exported_report_location: Location of the exported report (e.g. - https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). - :vartype exported_report_location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'exported_report_location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs) - self.exported_report_location = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export_py3.py deleted file mode 100644 index 7e925fb428ce..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseVulnerabilityAssessmentScansExport(ProxyResource): - """A database Vulnerability Assessment scan export resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar exported_report_location: Location of the exported report (e.g. - https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). - :vartype exported_report_location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'exported_report_location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs) - self.exported_report_location = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability.py deleted file mode 100644 index e2b212e365b0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EditionCapability(Model): - """The edition capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The database edition name. - :vartype name: str - :ivar supported_service_level_objectives: The list of supported service - objectives for the edition. - :vartype supported_service_level_objectives: - list[~azure.mgmt.sql.models.ServiceObjectiveCapability] - :ivar zone_redundant: Whether or not zone redundancy is supported for the - edition. - :vartype zone_redundant: bool - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_service_level_objectives': {'readonly': True}, - 'zone_redundant': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_service_level_objectives': {'key': 'supportedServiceLevelObjectives', 'type': '[ServiceObjectiveCapability]'}, - 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_service_level_objectives = None - self.zone_redundant = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability_py3.py deleted file mode 100644 index e2eaad22c5d5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EditionCapability(Model): - """The edition capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The database edition name. - :vartype name: str - :ivar supported_service_level_objectives: The list of supported service - objectives for the edition. - :vartype supported_service_level_objectives: - list[~azure.mgmt.sql.models.ServiceObjectiveCapability] - :ivar zone_redundant: Whether or not zone redundancy is supported for the - edition. - :vartype zone_redundant: bool - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_service_level_objectives': {'readonly': True}, - 'zone_redundant': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_service_level_objectives': {'key': 'supportedServiceLevelObjectives', 'type': '[ServiceObjectiveCapability]'}, - 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(EditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_service_level_objectives = None - self.zone_redundant = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py deleted file mode 100644 index 10a28ea0f6e3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class ElasticPool(TrackedResource): - """An elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.sql.models.Sku - :ivar kind: Kind of elastic pool. This is metadata used for the Azure - portal experience. - :vartype kind: str - :ivar state: The state of the elastic pool. Possible values include: - 'Creating', 'Ready', 'Disabled' - :vartype state: str or ~azure.mgmt.sql.models.ElasticPoolState - :ivar creation_date: The creation date of the elastic pool (ISO8601 - format). - :vartype creation_date: datetime - :param max_size_bytes: The storage limit for the database elastic pool in - bytes. - :type max_size_bytes: long - :param per_database_settings: The per database settings for the elastic - pool. - :type per_database_settings: - ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings - :param zone_redundant: Whether or not this elastic pool is zone redundant, - which means the replicas of this elastic pool will be spread across - multiple availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this elastic pool. - Possible values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'state': {'readonly': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPool, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.kind = None - self.state = None - self.creation_date = None - self.max_size_bytes = kwargs.get('max_size_bytes', None) - self.per_database_settings = kwargs.get('per_database_settings', None) - self.zone_redundant = kwargs.get('zone_redundant', None) - self.license_type = kwargs.get('license_type', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity.py deleted file mode 100644 index 30c56a11077d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ElasticPoolActivity(ProxyResource): - """Represents the activity on an elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar end_time: The time the operation finished (ISO8601 format). - :vartype end_time: datetime - :ivar error_code: The error code if available. - :vartype error_code: int - :ivar error_message: The error message if available. - :vartype error_message: str - :ivar error_severity: The error severity if available. - :vartype error_severity: int - :ivar operation: The operation name. - :vartype operation: str - :ivar operation_id: The unique operation ID. - :vartype operation_id: str - :ivar percent_complete: The percentage complete if available. - :vartype percent_complete: int - :ivar requested_database_dtu_max: The requested max DTU per database if - available. - :vartype requested_database_dtu_max: int - :ivar requested_database_dtu_min: The requested min DTU per database if - available. - :vartype requested_database_dtu_min: int - :ivar requested_dtu: The requested DTU for the pool if available. - :vartype requested_dtu: int - :ivar requested_elastic_pool_name: The requested name for the elastic pool - if available. - :vartype requested_elastic_pool_name: str - :ivar requested_storage_limit_in_gb: The requested storage limit for the - pool in GB if available. - :vartype requested_storage_limit_in_gb: long - :ivar elastic_pool_name: The name of the elastic pool. - :vartype elastic_pool_name: str - :ivar server_name: The name of the server the elastic pool is in. - :vartype server_name: str - :ivar start_time: The time the operation started (ISO8601 format). - :vartype start_time: datetime - :ivar state: The current state of the operation. - :vartype state: str - :ivar requested_storage_limit_in_mb: The requested storage limit in MB. - :vartype requested_storage_limit_in_mb: int - :ivar requested_database_dtu_guarantee: The requested per database DTU - guarantee. - :vartype requested_database_dtu_guarantee: int - :ivar requested_database_dtu_cap: The requested per database DTU cap. - :vartype requested_database_dtu_cap: int - :ivar requested_dtu_guarantee: The requested DTU guarantee. - :vartype requested_dtu_guarantee: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_message': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_id': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'requested_database_dtu_max': {'readonly': True}, - 'requested_database_dtu_min': {'readonly': True}, - 'requested_dtu': {'readonly': True}, - 'requested_elastic_pool_name': {'readonly': True}, - 'requested_storage_limit_in_gb': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'requested_storage_limit_in_mb': {'readonly': True}, - 'requested_database_dtu_guarantee': {'readonly': True}, - 'requested_database_dtu_cap': {'readonly': True}, - 'requested_dtu_guarantee': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'requested_database_dtu_max': {'key': 'properties.requestedDatabaseDtuMax', 'type': 'int'}, - 'requested_database_dtu_min': {'key': 'properties.requestedDatabaseDtuMin', 'type': 'int'}, - 'requested_dtu': {'key': 'properties.requestedDtu', 'type': 'int'}, - 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, - 'requested_storage_limit_in_gb': {'key': 'properties.requestedStorageLimitInGB', 'type': 'long'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'requested_storage_limit_in_mb': {'key': 'properties.requestedStorageLimitInMB', 'type': 'int'}, - 'requested_database_dtu_guarantee': {'key': 'properties.requestedDatabaseDtuGuarantee', 'type': 'int'}, - 'requested_database_dtu_cap': {'key': 'properties.requestedDatabaseDtuCap', 'type': 'int'}, - 'requested_dtu_guarantee': {'key': 'properties.requestedDtuGuarantee', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolActivity, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.end_time = None - self.error_code = None - self.error_message = None - self.error_severity = None - self.operation = None - self.operation_id = None - self.percent_complete = None - self.requested_database_dtu_max = None - self.requested_database_dtu_min = None - self.requested_dtu = None - self.requested_elastic_pool_name = None - self.requested_storage_limit_in_gb = None - self.elastic_pool_name = None - self.server_name = None - self.start_time = None - self.state = None - self.requested_storage_limit_in_mb = None - self.requested_database_dtu_guarantee = None - self.requested_database_dtu_cap = None - self.requested_dtu_guarantee = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_paged.py deleted file mode 100644 index 729a44a94bb5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ElasticPoolActivityPaged(Paged): - """ - A paging container for iterating over a list of :class:`ElasticPoolActivity ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ElasticPoolActivity]'} - } - - def __init__(self, *args, **kwargs): - - super(ElasticPoolActivityPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_py3.py deleted file mode 100644 index 5d8d4f61727a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_py3.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ElasticPoolActivity(ProxyResource): - """Represents the activity on an elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar end_time: The time the operation finished (ISO8601 format). - :vartype end_time: datetime - :ivar error_code: The error code if available. - :vartype error_code: int - :ivar error_message: The error message if available. - :vartype error_message: str - :ivar error_severity: The error severity if available. - :vartype error_severity: int - :ivar operation: The operation name. - :vartype operation: str - :ivar operation_id: The unique operation ID. - :vartype operation_id: str - :ivar percent_complete: The percentage complete if available. - :vartype percent_complete: int - :ivar requested_database_dtu_max: The requested max DTU per database if - available. - :vartype requested_database_dtu_max: int - :ivar requested_database_dtu_min: The requested min DTU per database if - available. - :vartype requested_database_dtu_min: int - :ivar requested_dtu: The requested DTU for the pool if available. - :vartype requested_dtu: int - :ivar requested_elastic_pool_name: The requested name for the elastic pool - if available. - :vartype requested_elastic_pool_name: str - :ivar requested_storage_limit_in_gb: The requested storage limit for the - pool in GB if available. - :vartype requested_storage_limit_in_gb: long - :ivar elastic_pool_name: The name of the elastic pool. - :vartype elastic_pool_name: str - :ivar server_name: The name of the server the elastic pool is in. - :vartype server_name: str - :ivar start_time: The time the operation started (ISO8601 format). - :vartype start_time: datetime - :ivar state: The current state of the operation. - :vartype state: str - :ivar requested_storage_limit_in_mb: The requested storage limit in MB. - :vartype requested_storage_limit_in_mb: int - :ivar requested_database_dtu_guarantee: The requested per database DTU - guarantee. - :vartype requested_database_dtu_guarantee: int - :ivar requested_database_dtu_cap: The requested per database DTU cap. - :vartype requested_database_dtu_cap: int - :ivar requested_dtu_guarantee: The requested DTU guarantee. - :vartype requested_dtu_guarantee: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_message': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_id': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'requested_database_dtu_max': {'readonly': True}, - 'requested_database_dtu_min': {'readonly': True}, - 'requested_dtu': {'readonly': True}, - 'requested_elastic_pool_name': {'readonly': True}, - 'requested_storage_limit_in_gb': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'requested_storage_limit_in_mb': {'readonly': True}, - 'requested_database_dtu_guarantee': {'readonly': True}, - 'requested_database_dtu_cap': {'readonly': True}, - 'requested_dtu_guarantee': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'requested_database_dtu_max': {'key': 'properties.requestedDatabaseDtuMax', 'type': 'int'}, - 'requested_database_dtu_min': {'key': 'properties.requestedDatabaseDtuMin', 'type': 'int'}, - 'requested_dtu': {'key': 'properties.requestedDtu', 'type': 'int'}, - 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, - 'requested_storage_limit_in_gb': {'key': 'properties.requestedStorageLimitInGB', 'type': 'long'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'requested_storage_limit_in_mb': {'key': 'properties.requestedStorageLimitInMB', 'type': 'int'}, - 'requested_database_dtu_guarantee': {'key': 'properties.requestedDatabaseDtuGuarantee', 'type': 'int'}, - 'requested_database_dtu_cap': {'key': 'properties.requestedDatabaseDtuCap', 'type': 'int'}, - 'requested_dtu_guarantee': {'key': 'properties.requestedDtuGuarantee', 'type': 'int'}, - } - - def __init__(self, *, location: str=None, **kwargs) -> None: - super(ElasticPoolActivity, self).__init__(**kwargs) - self.location = location - self.end_time = None - self.error_code = None - self.error_message = None - self.error_severity = None - self.operation = None - self.operation_id = None - self.percent_complete = None - self.requested_database_dtu_max = None - self.requested_database_dtu_min = None - self.requested_dtu = None - self.requested_elastic_pool_name = None - self.requested_storage_limit_in_gb = None - self.elastic_pool_name = None - self.server_name = None - self.start_time = None - self.state = None - self.requested_storage_limit_in_mb = None - self.requested_database_dtu_guarantee = None - self.requested_database_dtu_cap = None - self.requested_dtu_guarantee = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity.py deleted file mode 100644 index 9427b6973ff9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity.py +++ /dev/null @@ -1,125 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ElasticPoolDatabaseActivity(ProxyResource): - """Represents the activity on an elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar database_name: The database name. - :vartype database_name: str - :ivar end_time: The time the operation finished (ISO8601 format). - :vartype end_time: datetime - :ivar error_code: The error code if available. - :vartype error_code: int - :ivar error_message: The error message if available. - :vartype error_message: str - :ivar error_severity: The error severity if available. - :vartype error_severity: int - :ivar operation: The operation name. - :vartype operation: str - :ivar operation_id: The unique operation ID. - :vartype operation_id: str - :ivar percent_complete: The percentage complete if available. - :vartype percent_complete: int - :ivar requested_elastic_pool_name: The name for the elastic pool the - database is moving into if available. - :vartype requested_elastic_pool_name: str - :ivar current_elastic_pool_name: The name of the current elastic pool the - database is in if available. - :vartype current_elastic_pool_name: str - :ivar current_service_objective: The name of the current service objective - if available. - :vartype current_service_objective: str - :ivar requested_service_objective: The name of the requested service - objective if available. - :vartype requested_service_objective: str - :ivar server_name: The name of the server the elastic pool is in. - :vartype server_name: str - :ivar start_time: The time the operation started (ISO8601 format). - :vartype start_time: datetime - :ivar state: The current state of the operation. - :vartype state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_name': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_message': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_id': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'requested_elastic_pool_name': {'readonly': True}, - 'current_elastic_pool_name': {'readonly': True}, - 'current_service_objective': {'readonly': True}, - 'requested_service_objective': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, - 'current_elastic_pool_name': {'key': 'properties.currentElasticPoolName', 'type': 'str'}, - 'current_service_objective': {'key': 'properties.currentServiceObjective', 'type': 'str'}, - 'requested_service_objective': {'key': 'properties.requestedServiceObjective', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolDatabaseActivity, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.database_name = None - self.end_time = None - self.error_code = None - self.error_message = None - self.error_severity = None - self.operation = None - self.operation_id = None - self.percent_complete = None - self.requested_elastic_pool_name = None - self.current_elastic_pool_name = None - self.current_service_objective = None - self.requested_service_objective = None - self.server_name = None - self.start_time = None - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_paged.py deleted file mode 100644 index e4d12fc20b4a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ElasticPoolDatabaseActivityPaged(Paged): - """ - A paging container for iterating over a list of :class:`ElasticPoolDatabaseActivity ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ElasticPoolDatabaseActivity]'} - } - - def __init__(self, *args, **kwargs): - - super(ElasticPoolDatabaseActivityPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_py3.py deleted file mode 100644 index 2e2818eee69a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_py3.py +++ /dev/null @@ -1,125 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ElasticPoolDatabaseActivity(ProxyResource): - """Represents the activity on an elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar database_name: The database name. - :vartype database_name: str - :ivar end_time: The time the operation finished (ISO8601 format). - :vartype end_time: datetime - :ivar error_code: The error code if available. - :vartype error_code: int - :ivar error_message: The error message if available. - :vartype error_message: str - :ivar error_severity: The error severity if available. - :vartype error_severity: int - :ivar operation: The operation name. - :vartype operation: str - :ivar operation_id: The unique operation ID. - :vartype operation_id: str - :ivar percent_complete: The percentage complete if available. - :vartype percent_complete: int - :ivar requested_elastic_pool_name: The name for the elastic pool the - database is moving into if available. - :vartype requested_elastic_pool_name: str - :ivar current_elastic_pool_name: The name of the current elastic pool the - database is in if available. - :vartype current_elastic_pool_name: str - :ivar current_service_objective: The name of the current service objective - if available. - :vartype current_service_objective: str - :ivar requested_service_objective: The name of the requested service - objective if available. - :vartype requested_service_objective: str - :ivar server_name: The name of the server the elastic pool is in. - :vartype server_name: str - :ivar start_time: The time the operation started (ISO8601 format). - :vartype start_time: datetime - :ivar state: The current state of the operation. - :vartype state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_name': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_message': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_id': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'requested_elastic_pool_name': {'readonly': True}, - 'current_elastic_pool_name': {'readonly': True}, - 'current_service_objective': {'readonly': True}, - 'requested_service_objective': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, - 'current_elastic_pool_name': {'key': 'properties.currentElasticPoolName', 'type': 'str'}, - 'current_service_objective': {'key': 'properties.currentServiceObjective', 'type': 'str'}, - 'requested_service_objective': {'key': 'properties.requestedServiceObjective', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, **kwargs) -> None: - super(ElasticPoolDatabaseActivity, self).__init__(**kwargs) - self.location = location - self.database_name = None - self.end_time = None - self.error_code = None - self.error_message = None - self.error_severity = None - self.operation = None - self.operation_id = None - self.percent_complete = None - self.requested_elastic_pool_name = None - self.current_elastic_pool_name = None - self.current_service_objective = None - self.requested_service_objective = None - self.server_name = None - self.start_time = None - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability.py deleted file mode 100644 index f870c33b6143..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolEditionCapability(Model): - """The elastic pool edition capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The elastic pool edition name. - :vartype name: str - :ivar supported_elastic_pool_performance_levels: The list of supported - elastic pool DTU levels for the edition. - :vartype supported_elastic_pool_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerformanceLevelCapability] - :ivar zone_redundant: Whether or not zone redundancy is supported for the - edition. - :vartype zone_redundant: bool - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_elastic_pool_performance_levels': {'readonly': True}, - 'zone_redundant': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_elastic_pool_performance_levels': {'key': 'supportedElasticPoolPerformanceLevels', 'type': '[ElasticPoolPerformanceLevelCapability]'}, - 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_elastic_pool_performance_levels = None - self.zone_redundant = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability_py3.py deleted file mode 100644 index 54af1f63906f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolEditionCapability(Model): - """The elastic pool edition capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The elastic pool edition name. - :vartype name: str - :ivar supported_elastic_pool_performance_levels: The list of supported - elastic pool DTU levels for the edition. - :vartype supported_elastic_pool_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerformanceLevelCapability] - :ivar zone_redundant: Whether or not zone redundancy is supported for the - edition. - :vartype zone_redundant: bool - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_elastic_pool_performance_levels': {'readonly': True}, - 'zone_redundant': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_elastic_pool_performance_levels': {'key': 'supportedElasticPoolPerformanceLevels', 'type': '[ElasticPoolPerformanceLevelCapability]'}, - 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ElasticPoolEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_elastic_pool_performance_levels = None - self.zone_redundant = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation.py deleted file mode 100644 index 7f01bbf3f1af..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ElasticPoolOperation(ProxyResource): - """A elastic pool operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar elastic_pool_name: The name of the elastic pool the operation is - being performed on. - :vartype elastic_pool_name: str - :ivar operation: The name of operation. - :vartype operation: str - :ivar operation_friendly_name: The friendly name of operation. - :vartype operation_friendly_name: str - :ivar percent_complete: The percentage of the operation completed. - :vartype percent_complete: int - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar start_time: The operation start time. - :vartype start_time: datetime - :ivar state: The operation state. - :vartype state: str - :ivar error_code: The operation error code. - :vartype error_code: int - :ivar error_description: The operation error description. - :vartype error_description: str - :ivar error_severity: The operation error severity. - :vartype error_severity: int - :ivar is_user_error: Whether or not the error is a user error. - :vartype is_user_error: bool - :ivar estimated_completion_time: The estimated completion time of the - operation. - :vartype estimated_completion_time: datetime - :ivar description: The operation description. - :vartype description: str - :ivar is_cancellable: Whether the operation can be cancelled. - :vartype is_cancellable: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_friendly_name': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_description': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'is_user_error': {'readonly': True}, - 'estimated_completion_time': {'readonly': True}, - 'description': {'readonly': True}, - 'is_cancellable': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, - 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolOperation, self).__init__(**kwargs) - self.elastic_pool_name = None - self.operation = None - self.operation_friendly_name = None - self.percent_complete = None - self.server_name = None - self.start_time = None - self.state = None - self.error_code = None - self.error_description = None - self.error_severity = None - self.is_user_error = None - self.estimated_completion_time = None - self.description = None - self.is_cancellable = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_paged.py deleted file mode 100644 index 530637e1479c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ElasticPoolOperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`ElasticPoolOperation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ElasticPoolOperation]'} - } - - def __init__(self, *args, **kwargs): - - super(ElasticPoolOperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_py3.py deleted file mode 100644 index c214b66532a5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_py3.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ElasticPoolOperation(ProxyResource): - """A elastic pool operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar elastic_pool_name: The name of the elastic pool the operation is - being performed on. - :vartype elastic_pool_name: str - :ivar operation: The name of operation. - :vartype operation: str - :ivar operation_friendly_name: The friendly name of operation. - :vartype operation_friendly_name: str - :ivar percent_complete: The percentage of the operation completed. - :vartype percent_complete: int - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar start_time: The operation start time. - :vartype start_time: datetime - :ivar state: The operation state. - :vartype state: str - :ivar error_code: The operation error code. - :vartype error_code: int - :ivar error_description: The operation error description. - :vartype error_description: str - :ivar error_severity: The operation error severity. - :vartype error_severity: int - :ivar is_user_error: Whether or not the error is a user error. - :vartype is_user_error: bool - :ivar estimated_completion_time: The estimated completion time of the - operation. - :vartype estimated_completion_time: datetime - :ivar description: The operation description. - :vartype description: str - :ivar is_cancellable: Whether the operation can be cancelled. - :vartype is_cancellable: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_friendly_name': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_description': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'is_user_error': {'readonly': True}, - 'estimated_completion_time': {'readonly': True}, - 'description': {'readonly': True}, - 'is_cancellable': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, - 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, - } - - def __init__(self, **kwargs) -> None: - super(ElasticPoolOperation, self).__init__(**kwargs) - self.elastic_pool_name = None - self.operation = None - self.operation_friendly_name = None - self.percent_complete = None - self.server_name = None - self.start_time = None - self.state = None - self.error_code = None - self.error_description = None - self.error_severity = None - self.is_user_error = None - self.estimated_completion_time = None - self.description = None - self.is_cancellable = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_paged.py deleted file mode 100644 index 4c391860ee2d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ElasticPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`ElasticPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ElasticPool]'} - } - - def __init__(self, *args, **kwargs): - - super(ElasticPoolPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability.py deleted file mode 100644 index 1f99b527f962..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseMaxPerformanceLevelCapability(Model): - """The max per-database performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The maximum performance level per database. - :vartype limit: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - :ivar supported_per_database_min_performance_levels: The list of supported - min database performance levels. - :vartype supported_per_database_min_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMinPerformanceLevelCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'supported_per_database_min_performance_levels': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'supported_per_database_min_performance_levels': {'key': 'supportedPerDatabaseMinPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMinPerformanceLevelCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolPerDatabaseMaxPerformanceLevelCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None - self.supported_per_database_min_performance_levels = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability_py3.py deleted file mode 100644 index 7e80c9d6cd5e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseMaxPerformanceLevelCapability(Model): - """The max per-database performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The maximum performance level per database. - :vartype limit: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - :ivar supported_per_database_min_performance_levels: The list of supported - min database performance levels. - :vartype supported_per_database_min_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMinPerformanceLevelCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'supported_per_database_min_performance_levels': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'supported_per_database_min_performance_levels': {'key': 'supportedPerDatabaseMinPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMinPerformanceLevelCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ElasticPoolPerDatabaseMaxPerformanceLevelCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None - self.supported_per_database_min_performance_levels = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability.py deleted file mode 100644 index 52306e685c47..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseMinPerformanceLevelCapability(Model): - """The minimum per-database performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The minimum performance level per database. - :vartype limit: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolPerDatabaseMinPerformanceLevelCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability_py3.py deleted file mode 100644 index d1dceda281f6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseMinPerformanceLevelCapability(Model): - """The minimum per-database performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The minimum performance level per database. - :vartype limit: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ElasticPoolPerDatabaseMinPerformanceLevelCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings.py deleted file mode 100644 index 5c7951cd9c4b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseSettings(Model): - """Per database settings of an elastic pool. - - :param min_capacity: The minimum capacity all databases are guaranteed. - :type min_capacity: float - :param max_capacity: The maximum capacity any one database can consume. - :type max_capacity: float - """ - - _attribute_map = { - 'min_capacity': {'key': 'minCapacity', 'type': 'float'}, - 'max_capacity': {'key': 'maxCapacity', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolPerDatabaseSettings, self).__init__(**kwargs) - self.min_capacity = kwargs.get('min_capacity', None) - self.max_capacity = kwargs.get('max_capacity', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings_py3.py deleted file mode 100644 index 64ab19c4217d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseSettings(Model): - """Per database settings of an elastic pool. - - :param min_capacity: The minimum capacity all databases are guaranteed. - :type min_capacity: float - :param max_capacity: The maximum capacity any one database can consume. - :type max_capacity: float - """ - - _attribute_map = { - 'min_capacity': {'key': 'minCapacity', 'type': 'float'}, - 'max_capacity': {'key': 'maxCapacity', 'type': 'float'}, - } - - def __init__(self, *, min_capacity: float=None, max_capacity: float=None, **kwargs) -> None: - super(ElasticPoolPerDatabaseSettings, self).__init__(**kwargs) - self.min_capacity = min_capacity - self.max_capacity = max_capacity diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability.py deleted file mode 100644 index 8d5de8c9e0db..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerformanceLevelCapability(Model): - """The Elastic Pool performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar performance_level: The performance level for the pool. - :vartype performance_level: - ~azure.mgmt.sql.models.PerformanceLevelCapability - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.sql.models.Sku - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar max_database_count: The maximum number of databases supported. - :vartype max_database_count: int - :ivar included_max_size: The included (free) max size for this performance - level. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar supported_max_sizes: The list of supported max sizes. - :vartype supported_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar supported_per_database_max_sizes: The list of supported per database - max sizes. - :vartype supported_per_database_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar supported_per_database_max_performance_levels: The list of supported - per database max performance levels. - :vartype supported_per_database_max_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMaxPerformanceLevelCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'performance_level': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'max_database_count': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'supported_max_sizes': {'readonly': True}, - 'supported_per_database_max_sizes': {'readonly': True}, - 'supported_per_database_max_performance_levels': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'max_database_count': {'key': 'maxDatabaseCount', 'type': 'int'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'supported_per_database_max_sizes': {'key': 'supportedPerDatabaseMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'supported_per_database_max_performance_levels': {'key': 'supportedPerDatabaseMaxPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMaxPerformanceLevelCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolPerformanceLevelCapability, self).__init__(**kwargs) - self.performance_level = None - self.sku = None - self.supported_license_types = None - self.max_database_count = None - self.included_max_size = None - self.supported_max_sizes = None - self.supported_per_database_max_sizes = None - self.supported_per_database_max_performance_levels = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability_py3.py deleted file mode 100644 index 6842c7fed8b8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerformanceLevelCapability(Model): - """The Elastic Pool performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar performance_level: The performance level for the pool. - :vartype performance_level: - ~azure.mgmt.sql.models.PerformanceLevelCapability - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.sql.models.Sku - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar max_database_count: The maximum number of databases supported. - :vartype max_database_count: int - :ivar included_max_size: The included (free) max size for this performance - level. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar supported_max_sizes: The list of supported max sizes. - :vartype supported_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar supported_per_database_max_sizes: The list of supported per database - max sizes. - :vartype supported_per_database_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar supported_per_database_max_performance_levels: The list of supported - per database max performance levels. - :vartype supported_per_database_max_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMaxPerformanceLevelCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'performance_level': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'max_database_count': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'supported_max_sizes': {'readonly': True}, - 'supported_per_database_max_sizes': {'readonly': True}, - 'supported_per_database_max_performance_levels': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'max_database_count': {'key': 'maxDatabaseCount', 'type': 'int'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'supported_per_database_max_sizes': {'key': 'supportedPerDatabaseMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'supported_per_database_max_performance_levels': {'key': 'supportedPerDatabaseMaxPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMaxPerformanceLevelCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ElasticPoolPerformanceLevelCapability, self).__init__(**kwargs) - self.performance_level = None - self.sku = None - self.supported_license_types = None - self.max_database_count = None - self.included_max_size = None - self.supported_max_sizes = None - self.supported_per_database_max_sizes = None - self.supported_per_database_max_performance_levels = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py deleted file mode 100644 index eb092529ac3b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class ElasticPool(TrackedResource): - """An elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.sql.models.Sku - :ivar kind: Kind of elastic pool. This is metadata used for the Azure - portal experience. - :vartype kind: str - :ivar state: The state of the elastic pool. Possible values include: - 'Creating', 'Ready', 'Disabled' - :vartype state: str or ~azure.mgmt.sql.models.ElasticPoolState - :ivar creation_date: The creation date of the elastic pool (ISO8601 - format). - :vartype creation_date: datetime - :param max_size_bytes: The storage limit for the database elastic pool in - bytes. - :type max_size_bytes: long - :param per_database_settings: The per database settings for the elastic - pool. - :type per_database_settings: - ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings - :param zone_redundant: Whether or not this elastic pool is zone redundant, - which means the replicas of this elastic pool will be spread across - multiple availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this elastic pool. - Possible values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'state': {'readonly': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, sku=None, max_size_bytes: int=None, per_database_settings=None, zone_redundant: bool=None, license_type=None, **kwargs) -> None: - super(ElasticPool, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.kind = None - self.state = None - self.creation_date = None - self.max_size_bytes = max_size_bytes - self.per_database_settings = per_database_settings - self.zone_redundant = zone_redundant - self.license_type = license_type diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update.py deleted file mode 100644 index ce71dfa7257e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolUpdate(Model): - """An elastic pool update. - - :param sku: - :type sku: ~azure.mgmt.sql.models.Sku - :param max_size_bytes: The storage limit for the database elastic pool in - bytes. - :type max_size_bytes: long - :param per_database_settings: The per database settings for the elastic - pool. - :type per_database_settings: - ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings - :param zone_redundant: Whether or not this elastic pool is zone redundant, - which means the replicas of this elastic pool will be spread across - multiple availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this elastic pool. - Possible values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolUpdate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.max_size_bytes = kwargs.get('max_size_bytes', None) - self.per_database_settings = kwargs.get('per_database_settings', None) - self.zone_redundant = kwargs.get('zone_redundant', None) - self.license_type = kwargs.get('license_type', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update_py3.py deleted file mode 100644 index d51753795c8a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolUpdate(Model): - """An elastic pool update. - - :param sku: - :type sku: ~azure.mgmt.sql.models.Sku - :param max_size_bytes: The storage limit for the database elastic pool in - bytes. - :type max_size_bytes: long - :param per_database_settings: The per database settings for the elastic - pool. - :type per_database_settings: - ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings - :param zone_redundant: Whether or not this elastic pool is zone redundant, - which means the replicas of this elastic pool will be spread across - multiple availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this elastic pool. - Possible values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, sku=None, max_size_bytes: int=None, per_database_settings=None, zone_redundant: bool=None, license_type=None, tags=None, **kwargs) -> None: - super(ElasticPoolUpdate, self).__init__(**kwargs) - self.sku = sku - self.max_size_bytes = max_size_bytes - self.per_database_settings = per_database_settings - self.zone_redundant = zone_redundant - self.license_type = license_type - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector.py deleted file mode 100644 index f6fe4ba3732d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class EncryptionProtector(ProxyResource): - """The server encryption protector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :type kind: str - :ivar location: Resource location. - :vartype location: str - :ivar subregion: Subregion of the encryption protector. - :vartype subregion: str - :param server_key_name: The name of the server key. - :type server_key_name: str - :param server_key_type: Required. The encryption protector type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :ivar uri: The URI of the server key. - :vartype uri: str - :ivar thumbprint: Thumbprint of the server key. - :vartype thumbprint: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'subregion': {'readonly': True}, - 'server_key_type': {'required': True}, - 'uri': {'readonly': True}, - 'thumbprint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'subregion': {'key': 'properties.subregion', 'type': 'str'}, - 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EncryptionProtector, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) - self.location = None - self.subregion = None - self.server_key_name = kwargs.get('server_key_name', None) - self.server_key_type = kwargs.get('server_key_type', None) - self.uri = None - self.thumbprint = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_paged.py deleted file mode 100644 index afb096561566..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class EncryptionProtectorPaged(Paged): - """ - A paging container for iterating over a list of :class:`EncryptionProtector ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[EncryptionProtector]'} - } - - def __init__(self, *args, **kwargs): - - super(EncryptionProtectorPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_py3.py deleted file mode 100644 index 6dd4bad3cfbe..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class EncryptionProtector(ProxyResource): - """The server encryption protector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :type kind: str - :ivar location: Resource location. - :vartype location: str - :ivar subregion: Subregion of the encryption protector. - :vartype subregion: str - :param server_key_name: The name of the server key. - :type server_key_name: str - :param server_key_type: Required. The encryption protector type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :ivar uri: The URI of the server key. - :vartype uri: str - :ivar thumbprint: Thumbprint of the server key. - :vartype thumbprint: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'subregion': {'readonly': True}, - 'server_key_type': {'required': True}, - 'uri': {'readonly': True}, - 'thumbprint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'subregion': {'key': 'properties.subregion', 'type': 'str'}, - 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, *, server_key_type, kind: str=None, server_key_name: str=None, **kwargs) -> None: - super(EncryptionProtector, self).__init__(**kwargs) - self.kind = kind - self.location = None - self.subregion = None - self.server_key_name = server_key_name - self.server_key_type = server_key_type - self.uri = None - self.thumbprint = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request.py deleted file mode 100644 index c0eb27d98299..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportRequest(Model): - """Export database parameters. - - All required parameters must be populated in order to send to Azure. - - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - } - - _attribute_map = { - 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, - } - - def __init__(self, **kwargs): - super(ExportRequest, self).__init__(**kwargs) - self.storage_key_type = kwargs.get('storage_key_type', None) - self.storage_key = kwargs.get('storage_key', None) - self.storage_uri = kwargs.get('storage_uri', None) - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.authentication_type = kwargs.get('authentication_type', "SQL") diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request_py3.py deleted file mode 100644 index 1cb99a5fe8fe..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportRequest(Model): - """Export database parameters. - - All required parameters must be populated in order to send to Azure. - - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - } - - _attribute_map = { - 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, - } - - def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, authentication_type="SQL", **kwargs) -> None: - super(ExportRequest, self).__init__(**kwargs) - self.storage_key_type = storage_key_type - self.storage_key = storage_key - self.storage_uri = storage_uri - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.authentication_type = authentication_type diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy.py deleted file mode 100644 index 48c324aa3153..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): - """An extended database blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param predicate_expression: Specifies condition of where clause when - creating an audit. - :type predicate_expression: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ExtendedDatabaseBlobAuditingPolicy, self).__init__(**kwargs) - self.predicate_expression = kwargs.get('predicate_expression', None) - self.state = kwargs.get('state', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) - self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) - self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) - self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy_py3.py deleted file mode 100644 index 9550f279968c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy_py3.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): - """An extended database blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param predicate_expression: Specifies condition of where clause when - creating an audit. - :type predicate_expression: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: - super(ExtendedDatabaseBlobAuditingPolicy, self).__init__(**kwargs) - self.predicate_expression = predicate_expression - self.state = state - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.audit_actions_and_groups = audit_actions_and_groups - self.storage_account_subscription_id = storage_account_subscription_id - self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use - self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy.py deleted file mode 100644 index ac110357f4b8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ExtendedServerBlobAuditingPolicy(ProxyResource): - """An extended server blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param predicate_expression: Specifies condition of where clause when - creating an audit. - :type predicate_expression: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ExtendedServerBlobAuditingPolicy, self).__init__(**kwargs) - self.predicate_expression = kwargs.get('predicate_expression', None) - self.state = kwargs.get('state', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) - self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) - self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) - self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy_py3.py deleted file mode 100644 index 89b96febe17d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy_py3.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ExtendedServerBlobAuditingPolicy(ProxyResource): - """An extended server blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param predicate_expression: Specifies condition of where clause when - creating an audit. - :type predicate_expression: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: - super(ExtendedServerBlobAuditingPolicy, self).__init__(**kwargs) - self.predicate_expression = predicate_expression - self.state = state - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.audit_actions_and_groups = audit_actions_and_groups - self.storage_account_subscription_id = storage_account_subscription_id - self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use - self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group.py deleted file mode 100644 index 1fd973aae6ff..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class FailoverGroup(ProxyResource): - """A failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param read_write_endpoint: Required. Read-write endpoint of the failover - group instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint - :ivar replication_role: Local replication role of the failover group - instance. Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.FailoverGroupReplicationRole - :ivar replication_state: Replication state of the failover group instance. - :vartype replication_state: str - :param partner_servers: Required. List of partner server information for - the failover group. - :type partner_servers: list[~azure.mgmt.sql.models.PartnerInfo] - :param databases: List of databases in the failover group. - :type databases: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'read_write_endpoint': {'required': True}, - 'replication_role': {'readonly': True}, - 'replication_state': {'readonly': True}, - 'partner_servers': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - 'partner_servers': {'key': 'properties.partnerServers', 'type': '[PartnerInfo]'}, - 'databases': {'key': 'properties.databases', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(FailoverGroup, self).__init__(**kwargs) - self.location = None - self.tags = kwargs.get('tags', None) - self.read_write_endpoint = kwargs.get('read_write_endpoint', None) - self.read_only_endpoint = kwargs.get('read_only_endpoint', None) - self.replication_role = None - self.replication_state = None - self.partner_servers = kwargs.get('partner_servers', None) - self.databases = kwargs.get('databases', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_paged.py deleted file mode 100644 index 5bdb8723cdc3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class FailoverGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`FailoverGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[FailoverGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(FailoverGroupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_py3.py deleted file mode 100644 index 4b179cf5b45f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class FailoverGroup(ProxyResource): - """A failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param read_write_endpoint: Required. Read-write endpoint of the failover - group instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint - :ivar replication_role: Local replication role of the failover group - instance. Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.FailoverGroupReplicationRole - :ivar replication_state: Replication state of the failover group instance. - :vartype replication_state: str - :param partner_servers: Required. List of partner server information for - the failover group. - :type partner_servers: list[~azure.mgmt.sql.models.PartnerInfo] - :param databases: List of databases in the failover group. - :type databases: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'read_write_endpoint': {'required': True}, - 'replication_role': {'readonly': True}, - 'replication_state': {'readonly': True}, - 'partner_servers': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - 'partner_servers': {'key': 'properties.partnerServers', 'type': '[PartnerInfo]'}, - 'databases': {'key': 'properties.databases', 'type': '[str]'}, - } - - def __init__(self, *, read_write_endpoint, partner_servers, tags=None, read_only_endpoint=None, databases=None, **kwargs) -> None: - super(FailoverGroup, self).__init__(**kwargs) - self.location = None - self.tags = tags - self.read_write_endpoint = read_write_endpoint - self.read_only_endpoint = read_only_endpoint - self.replication_role = None - self.replication_state = None - self.partner_servers = partner_servers - self.databases = databases diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint.py deleted file mode 100644 index c64da55dfec9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupReadOnlyEndpoint(Model): - """Read-only endpoint of the failover group instance. - - :param failover_policy: Failover policy of the read-only endpoint for the - failover group. Possible values include: 'Disabled', 'Enabled' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy - """ - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) - self.failover_policy = kwargs.get('failover_policy', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint_py3.py deleted file mode 100644 index aa923c8b0ce8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupReadOnlyEndpoint(Model): - """Read-only endpoint of the failover group instance. - - :param failover_policy: Failover policy of the read-only endpoint for the - failover group. Possible values include: 'Disabled', 'Enabled' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy - """ - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - } - - def __init__(self, *, failover_policy=None, **kwargs) -> None: - super(FailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) - self.failover_policy = failover_policy diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint.py deleted file mode 100644 index 8eb4368fe7be..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupReadWriteEndpoint(Model): - """Read-write endpoint of the failover group instance. - - All required parameters must be populated in order to send to Azure. - - :param failover_policy: Required. Failover policy of the read-write - endpoint for the failover group. If failoverPolicy is Automatic then - failoverWithDataLossGracePeriodMinutes is required. Possible values - include: 'Manual', 'Automatic' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy - :param failover_with_data_loss_grace_period_minutes: Grace period before - failover with data loss is attempted for the read-write endpoint. If - failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is - required. - :type failover_with_data_loss_grace_period_minutes: int - """ - - _validation = { - 'failover_policy': {'required': True}, - } - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(FailoverGroupReadWriteEndpoint, self).__init__(**kwargs) - self.failover_policy = kwargs.get('failover_policy', None) - self.failover_with_data_loss_grace_period_minutes = kwargs.get('failover_with_data_loss_grace_period_minutes', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint_py3.py deleted file mode 100644 index f9ffb4558ebc..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupReadWriteEndpoint(Model): - """Read-write endpoint of the failover group instance. - - All required parameters must be populated in order to send to Azure. - - :param failover_policy: Required. Failover policy of the read-write - endpoint for the failover group. If failoverPolicy is Automatic then - failoverWithDataLossGracePeriodMinutes is required. Possible values - include: 'Manual', 'Automatic' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy - :param failover_with_data_loss_grace_period_minutes: Grace period before - failover with data loss is attempted for the read-write endpoint. If - failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is - required. - :type failover_with_data_loss_grace_period_minutes: int - """ - - _validation = { - 'failover_policy': {'required': True}, - } - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, - } - - def __init__(self, *, failover_policy, failover_with_data_loss_grace_period_minutes: int=None, **kwargs) -> None: - super(FailoverGroupReadWriteEndpoint, self).__init__(**kwargs) - self.failover_policy = failover_policy - self.failover_with_data_loss_grace_period_minutes = failover_with_data_loss_grace_period_minutes diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update.py deleted file mode 100644 index e491b250f0da..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupUpdate(Model): - """A failover group update request. - - :param read_write_endpoint: Read-write endpoint of the failover group - instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint - :param databases: List of databases in the failover group. - :type databases: list[str] - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, - 'databases': {'key': 'properties.databases', 'type': '[str]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(FailoverGroupUpdate, self).__init__(**kwargs) - self.read_write_endpoint = kwargs.get('read_write_endpoint', None) - self.read_only_endpoint = kwargs.get('read_only_endpoint', None) - self.databases = kwargs.get('databases', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update_py3.py deleted file mode 100644 index 3aee1ee5c78c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupUpdate(Model): - """A failover group update request. - - :param read_write_endpoint: Read-write endpoint of the failover group - instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint - :param databases: List of databases in the failover group. - :type databases: list[str] - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, - 'databases': {'key': 'properties.databases', 'type': '[str]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, read_write_endpoint=None, read_only_endpoint=None, databases=None, tags=None, **kwargs) -> None: - super(FailoverGroupUpdate, self).__init__(**kwargs) - self.read_write_endpoint = read_write_endpoint - self.read_only_endpoint = read_only_endpoint - self.databases = databases - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule.py deleted file mode 100644 index 48004048c43a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class FirewallRule(ProxyResource): - """Represents a server firewall rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of server that contains this firewall rule. - :vartype kind: str - :ivar location: Location of the server that contains this firewall rule. - :vartype location: str - :param start_ip_address: Required. The start IP address of the firewall - rule. Must be IPv4 format. Use value '0.0.0.0' to represent all - Azure-internal IP addresses. - :type start_ip_address: str - :param end_ip_address: Required. The end IP address of the firewall rule. - Must be IPv4 format. Must be greater than or equal to startIpAddress. Use - value '0.0.0.0' to represent all Azure-internal IP addresses. - :type end_ip_address: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - 'start_ip_address': {'required': True}, - 'end_ip_address': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, - 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FirewallRule, self).__init__(**kwargs) - self.kind = None - self.location = None - self.start_ip_address = kwargs.get('start_ip_address', None) - self.end_ip_address = kwargs.get('end_ip_address', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_paged.py deleted file mode 100644 index 07586a09287a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class FirewallRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`FirewallRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[FirewallRule]'} - } - - def __init__(self, *args, **kwargs): - - super(FirewallRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_py3.py deleted file mode 100644 index c292730d9653..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_py3.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class FirewallRule(ProxyResource): - """Represents a server firewall rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of server that contains this firewall rule. - :vartype kind: str - :ivar location: Location of the server that contains this firewall rule. - :vartype location: str - :param start_ip_address: Required. The start IP address of the firewall - rule. Must be IPv4 format. Use value '0.0.0.0' to represent all - Azure-internal IP addresses. - :type start_ip_address: str - :param end_ip_address: Required. The end IP address of the firewall rule. - Must be IPv4 format. Must be greater than or equal to startIpAddress. Use - value '0.0.0.0' to represent all Azure-internal IP addresses. - :type end_ip_address: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - 'start_ip_address': {'required': True}, - 'end_ip_address': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, - 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, - } - - def __init__(self, *, start_ip_address: str, end_ip_address: str, **kwargs) -> None: - super(FirewallRule, self).__init__(**kwargs) - self.kind = None - self.location = None - self.start_ip_address = start_ip_address - self.end_ip_address = end_ip_address diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy.py deleted file mode 100644 index 3d8203075617..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class GeoBackupPolicy(ProxyResource): - """A database geo backup policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. The state of the geo backup policy. Possible - values include: 'Disabled', 'Enabled' - :type state: str or ~azure.mgmt.sql.models.GeoBackupPolicyState - :ivar storage_type: The storage type of the geo backup policy. - :vartype storage_type: str - :ivar kind: Kind of geo backup policy. This is metadata used for the - Azure portal experience. - :vartype kind: str - :ivar location: Backup policy location. - :vartype location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'storage_type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'GeoBackupPolicyState'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GeoBackupPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.storage_type = None - self.kind = None - self.location = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_paged.py deleted file mode 100644 index 7a207daa100e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class GeoBackupPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`GeoBackupPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GeoBackupPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(GeoBackupPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_py3.py deleted file mode 100644 index 23941df5ee47..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class GeoBackupPolicy(ProxyResource): - """A database geo backup policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. The state of the geo backup policy. Possible - values include: 'Disabled', 'Enabled' - :type state: str or ~azure.mgmt.sql.models.GeoBackupPolicyState - :ivar storage_type: The storage type of the geo backup policy. - :vartype storage_type: str - :ivar kind: Kind of geo backup policy. This is metadata used for the - Azure portal experience. - :vartype kind: str - :ivar location: Backup policy location. - :vartype location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'storage_type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'GeoBackupPolicyState'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, *, state, **kwargs) -> None: - super(GeoBackupPolicy, self).__init__(**kwargs) - self.state = state - self.storage_type = None - self.kind = None - self.location = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response.py deleted file mode 100644 index 5cfb638398f0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ImportExportResponse(ProxyResource): - """Response for Import/Export Get operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar request_type: The request type of the operation. - :vartype request_type: str - :ivar request_id: The request type of the operation. - :vartype request_id: str - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar database_name: The name of the database. - :vartype database_name: str - :ivar status: The status message returned from the server. - :vartype status: str - :ivar last_modified_time: The operation status last modified time. - :vartype last_modified_time: str - :ivar queued_time: The operation queued time. - :vartype queued_time: str - :ivar blob_uri: The blob uri. - :vartype blob_uri: str - :ivar error_message: The error message returned from the server. - :vartype error_message: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'request_type': {'readonly': True}, - 'request_id': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - 'status': {'readonly': True}, - 'last_modified_time': {'readonly': True}, - 'queued_time': {'readonly': True}, - 'blob_uri': {'readonly': True}, - 'error_message': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'request_type': {'key': 'properties.requestType', 'type': 'str'}, - 'request_id': {'key': 'properties.requestId', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'str'}, - 'queued_time': {'key': 'properties.queuedTime', 'type': 'str'}, - 'blob_uri': {'key': 'properties.blobUri', 'type': 'str'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImportExportResponse, self).__init__(**kwargs) - self.request_type = None - self.request_id = None - self.server_name = None - self.database_name = None - self.status = None - self.last_modified_time = None - self.queued_time = None - self.blob_uri = None - self.error_message = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response_py3.py deleted file mode 100644 index a344fc99266b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response_py3.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ImportExportResponse(ProxyResource): - """Response for Import/Export Get operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar request_type: The request type of the operation. - :vartype request_type: str - :ivar request_id: The request type of the operation. - :vartype request_id: str - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar database_name: The name of the database. - :vartype database_name: str - :ivar status: The status message returned from the server. - :vartype status: str - :ivar last_modified_time: The operation status last modified time. - :vartype last_modified_time: str - :ivar queued_time: The operation queued time. - :vartype queued_time: str - :ivar blob_uri: The blob uri. - :vartype blob_uri: str - :ivar error_message: The error message returned from the server. - :vartype error_message: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'request_type': {'readonly': True}, - 'request_id': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - 'status': {'readonly': True}, - 'last_modified_time': {'readonly': True}, - 'queued_time': {'readonly': True}, - 'blob_uri': {'readonly': True}, - 'error_message': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'request_type': {'key': 'properties.requestType', 'type': 'str'}, - 'request_id': {'key': 'properties.requestId', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'str'}, - 'queued_time': {'key': 'properties.queuedTime', 'type': 'str'}, - 'blob_uri': {'key': 'properties.blobUri', 'type': 'str'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ImportExportResponse, self).__init__(**kwargs) - self.request_type = None - self.request_id = None - self.server_name = None - self.database_name = None - self.status = None - self.last_modified_time = None - self.queued_time = None - self.blob_uri = None - self.error_message = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request.py deleted file mode 100644 index 3eba93dcec8e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImportExtensionRequest(Model): - """Import database parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: The name of the extension. - :type name: str - :param type: The type of the extension. - :type type: str - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - :ivar operation_mode: Required. The type of import operation being - performed. This is always Import. Default value: "Import" . - :vartype operation_mode: str - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - 'operation_mode': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_key_type': {'key': 'properties.storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'properties.storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'properties.storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'properties.authenticationType', 'type': 'AuthenticationType'}, - 'operation_mode': {'key': 'properties.operationMode', 'type': 'str'}, - } - - operation_mode = "Import" - - def __init__(self, **kwargs): - super(ImportExtensionRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.storage_key_type = kwargs.get('storage_key_type', None) - self.storage_key = kwargs.get('storage_key', None) - self.storage_uri = kwargs.get('storage_uri', None) - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.authentication_type = kwargs.get('authentication_type', "SQL") diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request_py3.py deleted file mode 100644 index 0486f0a68dbe..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImportExtensionRequest(Model): - """Import database parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: The name of the extension. - :type name: str - :param type: The type of the extension. - :type type: str - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - :ivar operation_mode: Required. The type of import operation being - performed. This is always Import. Default value: "Import" . - :vartype operation_mode: str - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - 'operation_mode': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_key_type': {'key': 'properties.storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'properties.storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'properties.storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'properties.authenticationType', 'type': 'AuthenticationType'}, - 'operation_mode': {'key': 'properties.operationMode', 'type': 'str'}, - } - - operation_mode = "Import" - - def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, name: str=None, type: str=None, authentication_type="SQL", **kwargs) -> None: - super(ImportExtensionRequest, self).__init__(**kwargs) - self.name = name - self.type = type - self.storage_key_type = storage_key_type - self.storage_key = storage_key - self.storage_uri = storage_uri - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.authentication_type = authentication_type diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request.py deleted file mode 100644 index a1683ffad9b4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .export_request import ExportRequest - - -class ImportRequest(ExportRequest): - """Import database parameters. - - All required parameters must be populated in order to send to Azure. - - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - :param database_name: Required. The name of the database to import. - :type database_name: str - :param edition: Required. The edition for the database being created. - Possible values include: 'Web', 'Business', 'Basic', 'Standard', - 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', - 'System2' - :type edition: str or ~azure.mgmt.sql.models.DatabaseEdition - :param service_objective_name: Required. The name of the service objective - to assign to the database. Possible values include: 'System', 'System0', - 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', - 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', - 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', - 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', - 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', - 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', - 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', - 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - :type service_objective_name: str or - ~azure.mgmt.sql.models.ServiceObjectiveName - :param max_size_bytes: Required. The maximum size for the newly imported - database. - :type max_size_bytes: str - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - 'database_name': {'required': True}, - 'edition': {'required': True}, - 'service_objective_name': {'required': True}, - 'max_size_bytes': {'required': True}, - } - - _attribute_map = { - 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'edition': {'key': 'edition', 'type': 'str'}, - 'service_objective_name': {'key': 'serviceObjectiveName', 'type': 'str'}, - 'max_size_bytes': {'key': 'maxSizeBytes', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImportRequest, self).__init__(**kwargs) - self.database_name = kwargs.get('database_name', None) - self.edition = kwargs.get('edition', None) - self.service_objective_name = kwargs.get('service_objective_name', None) - self.max_size_bytes = kwargs.get('max_size_bytes', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py deleted file mode 100644 index 68b97ae814a3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .export_request_py3 import ExportRequest - - -class ImportRequest(ExportRequest): - """Import database parameters. - - All required parameters must be populated in order to send to Azure. - - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - :param database_name: Required. The name of the database to import. - :type database_name: str - :param edition: Required. The edition for the database being created. - Possible values include: 'Web', 'Business', 'Basic', 'Standard', - 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', - 'System2' - :type edition: str or ~azure.mgmt.sql.models.DatabaseEdition - :param service_objective_name: Required. The name of the service objective - to assign to the database. Possible values include: 'System', 'System0', - 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', - 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', - 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', - 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', - 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', - 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', - 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', - 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - :type service_objective_name: str or - ~azure.mgmt.sql.models.ServiceObjectiveName - :param max_size_bytes: Required. The maximum size for the newly imported - database. - :type max_size_bytes: str - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - 'database_name': {'required': True}, - 'edition': {'required': True}, - 'service_objective_name': {'required': True}, - 'max_size_bytes': {'required': True}, - } - - _attribute_map = { - 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'edition': {'key': 'edition', 'type': 'str'}, - 'service_objective_name': {'key': 'serviceObjectiveName', 'type': 'str'}, - 'max_size_bytes': {'key': 'maxSizeBytes', 'type': 'str'}, - } - - def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, database_name: str, edition, service_objective_name, max_size_bytes: str, authentication_type="SQL", **kwargs) -> None: - super(ImportRequest, self).__init__(storage_key_type=storage_key_type, storage_key=storage_key, storage_uri=storage_uri, administrator_login=administrator_login, administrator_login_password=administrator_login_password, authentication_type=authentication_type, **kwargs) - self.database_name = database_name - self.edition = edition - self.service_objective_name = service_objective_name - self.max_size_bytes = max_size_bytes diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group.py deleted file mode 100644 index f360ffbfed57..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class InstanceFailoverGroup(ProxyResource): - """An instance failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param read_write_endpoint: Required. Read-write endpoint of the failover - group instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.InstanceFailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.InstanceFailoverGroupReadOnlyEndpoint - :ivar replication_role: Local replication role of the failover group - instance. Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole - :ivar replication_state: Replication state of the failover group instance. - :vartype replication_state: str - :param partner_regions: Required. Partner region information for the - failover group. - :type partner_regions: list[~azure.mgmt.sql.models.PartnerRegionInfo] - :param managed_instance_pairs: Required. List of managed instance pairs in - the failover group. - :type managed_instance_pairs: - list[~azure.mgmt.sql.models.ManagedInstancePairInfo] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'read_write_endpoint': {'required': True}, - 'replication_role': {'readonly': True}, - 'replication_state': {'readonly': True}, - 'partner_regions': {'required': True}, - 'managed_instance_pairs': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'InstanceFailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'InstanceFailoverGroupReadOnlyEndpoint'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - 'partner_regions': {'key': 'properties.partnerRegions', 'type': '[PartnerRegionInfo]'}, - 'managed_instance_pairs': {'key': 'properties.managedInstancePairs', 'type': '[ManagedInstancePairInfo]'}, - } - - def __init__(self, **kwargs): - super(InstanceFailoverGroup, self).__init__(**kwargs) - self.read_write_endpoint = kwargs.get('read_write_endpoint', None) - self.read_only_endpoint = kwargs.get('read_only_endpoint', None) - self.replication_role = None - self.replication_state = None - self.partner_regions = kwargs.get('partner_regions', None) - self.managed_instance_pairs = kwargs.get('managed_instance_pairs', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_paged.py deleted file mode 100644 index c67eaf2ef670..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class InstanceFailoverGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`InstanceFailoverGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[InstanceFailoverGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(InstanceFailoverGroupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_py3.py deleted file mode 100644 index 8959f26c9f69..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_py3.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class InstanceFailoverGroup(ProxyResource): - """An instance failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param read_write_endpoint: Required. Read-write endpoint of the failover - group instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.InstanceFailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.InstanceFailoverGroupReadOnlyEndpoint - :ivar replication_role: Local replication role of the failover group - instance. Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole - :ivar replication_state: Replication state of the failover group instance. - :vartype replication_state: str - :param partner_regions: Required. Partner region information for the - failover group. - :type partner_regions: list[~azure.mgmt.sql.models.PartnerRegionInfo] - :param managed_instance_pairs: Required. List of managed instance pairs in - the failover group. - :type managed_instance_pairs: - list[~azure.mgmt.sql.models.ManagedInstancePairInfo] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'read_write_endpoint': {'required': True}, - 'replication_role': {'readonly': True}, - 'replication_state': {'readonly': True}, - 'partner_regions': {'required': True}, - 'managed_instance_pairs': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'InstanceFailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'InstanceFailoverGroupReadOnlyEndpoint'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - 'partner_regions': {'key': 'properties.partnerRegions', 'type': '[PartnerRegionInfo]'}, - 'managed_instance_pairs': {'key': 'properties.managedInstancePairs', 'type': '[ManagedInstancePairInfo]'}, - } - - def __init__(self, *, read_write_endpoint, partner_regions, managed_instance_pairs, read_only_endpoint=None, **kwargs) -> None: - super(InstanceFailoverGroup, self).__init__(**kwargs) - self.read_write_endpoint = read_write_endpoint - self.read_only_endpoint = read_only_endpoint - self.replication_role = None - self.replication_state = None - self.partner_regions = partner_regions - self.managed_instance_pairs = managed_instance_pairs diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint.py deleted file mode 100644 index 2a9857817ae4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceFailoverGroupReadOnlyEndpoint(Model): - """Read-only endpoint of the failover group instance. - - :param failover_policy: Failover policy of the read-only endpoint for the - failover group. Possible values include: 'Disabled', 'Enabled' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy - """ - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(InstanceFailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) - self.failover_policy = kwargs.get('failover_policy', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint_py3.py deleted file mode 100644 index 71c9f180cdf7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceFailoverGroupReadOnlyEndpoint(Model): - """Read-only endpoint of the failover group instance. - - :param failover_policy: Failover policy of the read-only endpoint for the - failover group. Possible values include: 'Disabled', 'Enabled' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy - """ - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - } - - def __init__(self, *, failover_policy=None, **kwargs) -> None: - super(InstanceFailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) - self.failover_policy = failover_policy diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint.py deleted file mode 100644 index 89a86899e503..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceFailoverGroupReadWriteEndpoint(Model): - """Read-write endpoint of the failover group instance. - - All required parameters must be populated in order to send to Azure. - - :param failover_policy: Required. Failover policy of the read-write - endpoint for the failover group. If failoverPolicy is Automatic then - failoverWithDataLossGracePeriodMinutes is required. Possible values - include: 'Manual', 'Automatic' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy - :param failover_with_data_loss_grace_period_minutes: Grace period before - failover with data loss is attempted for the read-write endpoint. If - failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is - required. - :type failover_with_data_loss_grace_period_minutes: int - """ - - _validation = { - 'failover_policy': {'required': True}, - } - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(InstanceFailoverGroupReadWriteEndpoint, self).__init__(**kwargs) - self.failover_policy = kwargs.get('failover_policy', None) - self.failover_with_data_loss_grace_period_minutes = kwargs.get('failover_with_data_loss_grace_period_minutes', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint_py3.py deleted file mode 100644 index 7fdc047ba37c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceFailoverGroupReadWriteEndpoint(Model): - """Read-write endpoint of the failover group instance. - - All required parameters must be populated in order to send to Azure. - - :param failover_policy: Required. Failover policy of the read-write - endpoint for the failover group. If failoverPolicy is Automatic then - failoverWithDataLossGracePeriodMinutes is required. Possible values - include: 'Manual', 'Automatic' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy - :param failover_with_data_loss_grace_period_minutes: Grace period before - failover with data loss is attempted for the read-write endpoint. If - failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is - required. - :type failover_with_data_loss_grace_period_minutes: int - """ - - _validation = { - 'failover_policy': {'required': True}, - } - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, - } - - def __init__(self, *, failover_policy, failover_with_data_loss_grace_period_minutes: int=None, **kwargs) -> None: - super(InstanceFailoverGroupReadWriteEndpoint, self).__init__(**kwargs) - self.failover_policy = failover_policy - self.failover_with_data_loss_grace_period_minutes = failover_with_data_loss_grace_period_minutes diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job.py deleted file mode 100644 index 6b2c60fd1d4b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class Job(ProxyResource): - """A job. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param description: User-defined description of the job. Default value: "" - . - :type description: str - :ivar version: The job version number. - :vartype version: int - :param schedule: Schedule properties of the job. - :type schedule: ~azure.mgmt.sql.models.JobSchedule - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'version': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'int'}, - 'schedule': {'key': 'properties.schedule', 'type': 'JobSchedule'}, - } - - def __init__(self, **kwargs): - super(Job, self).__init__(**kwargs) - self.description = kwargs.get('description', "") - self.version = None - self.schedule = kwargs.get('schedule', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent.py deleted file mode 100644 index 48d42c28260c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class JobAgent(TrackedResource): - """An Azure SQL job agent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :param database_id: Required. Resource ID of the database to store job - metadata in. - :type database_id: str - :ivar state: The state of the job agent. Possible values include: - 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' - :vartype state: str or ~azure.mgmt.sql.models.JobAgentState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'database_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobAgent, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.database_id = kwargs.get('database_id', None) - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_paged.py deleted file mode 100644 index 25dd750b9d1f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobAgentPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobAgent ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobAgent]'} - } - - def __init__(self, *args, **kwargs): - - super(JobAgentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_py3.py deleted file mode 100644 index 936d87932ebc..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class JobAgent(TrackedResource): - """An Azure SQL job agent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :param database_id: Required. Resource ID of the database to store job - metadata in. - :type database_id: str - :ivar state: The state of the job agent. Possible values include: - 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' - :vartype state: str or ~azure.mgmt.sql.models.JobAgentState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'database_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, *, location: str, database_id: str, tags=None, sku=None, **kwargs) -> None: - super(JobAgent, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.database_id = database_id - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update.py deleted file mode 100644 index af781de91cbf..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobAgentUpdate(Model): - """An update to an Azure SQL job agent. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(JobAgentUpdate, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update_py3.py deleted file mode 100644 index ab5e71f7b1d1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobAgentUpdate(Model): - """An update to an Azure SQL job agent. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(JobAgentUpdate, self).__init__(**kwargs) - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential.py deleted file mode 100644 index 807d34975114..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class JobCredential(ProxyResource): - """A stored credential that can be used by a job to connect to target - databases. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param username: Required. The credential user name. - :type username: str - :param password: Required. The credential password. - :type password: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'username': {'required': True}, - 'password': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'username': {'key': 'properties.username', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobCredential, self).__init__(**kwargs) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_paged.py deleted file mode 100644 index 550108e41c93..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobCredentialPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobCredential ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobCredential]'} - } - - def __init__(self, *args, **kwargs): - - super(JobCredentialPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_py3.py deleted file mode 100644 index 5158010b9c74..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class JobCredential(ProxyResource): - """A stored credential that can be used by a job to connect to target - databases. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param username: Required. The credential user name. - :type username: str - :param password: Required. The credential password. - :type password: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'username': {'required': True}, - 'password': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'username': {'key': 'properties.username', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - } - - def __init__(self, *, username: str, password: str, **kwargs) -> None: - super(JobCredential, self).__init__(**kwargs) - self.username = username - self.password = password diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution.py deleted file mode 100644 index 92744fb7c75b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class JobExecution(ProxyResource): - """An execution of a job. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar job_version: The job version number. - :vartype job_version: int - :ivar step_name: The job step name. - :vartype step_name: str - :ivar step_id: The job step id. - :vartype step_id: int - :ivar job_execution_id: The unique identifier of the job execution. - :vartype job_execution_id: str - :ivar lifecycle: The detailed state of the job execution. Possible values - include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', - 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', - 'TimedOut', 'Canceled', 'Skipped' - :vartype lifecycle: str or ~azure.mgmt.sql.models.JobExecutionLifecycle - :ivar provisioning_state: The ARM provisioning state of the job execution. - Possible values include: 'Created', 'InProgress', 'Succeeded', 'Failed', - 'Canceled' - :vartype provisioning_state: str or - ~azure.mgmt.sql.models.ProvisioningState - :ivar create_time: The time that the job execution was created. - :vartype create_time: datetime - :ivar start_time: The time that the job execution started. - :vartype start_time: datetime - :ivar end_time: The time that the job execution completed. - :vartype end_time: datetime - :param current_attempts: Number of times the job execution has been - attempted. - :type current_attempts: int - :ivar current_attempt_start_time: Start time of the current attempt. - :vartype current_attempt_start_time: datetime - :ivar last_message: The last status or error message. - :vartype last_message: str - :ivar target: The target that this execution is executed on. - :vartype target: ~azure.mgmt.sql.models.JobExecutionTarget - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'job_version': {'readonly': True}, - 'step_name': {'readonly': True}, - 'step_id': {'readonly': True}, - 'job_execution_id': {'readonly': True}, - 'lifecycle': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'create_time': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'current_attempt_start_time': {'readonly': True}, - 'last_message': {'readonly': True}, - 'target': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'job_version': {'key': 'properties.jobVersion', 'type': 'int'}, - 'step_name': {'key': 'properties.stepName', 'type': 'str'}, - 'step_id': {'key': 'properties.stepId', 'type': 'int'}, - 'job_execution_id': {'key': 'properties.jobExecutionId', 'type': 'str'}, - 'lifecycle': {'key': 'properties.lifecycle', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'current_attempts': {'key': 'properties.currentAttempts', 'type': 'int'}, - 'current_attempt_start_time': {'key': 'properties.currentAttemptStartTime', 'type': 'iso-8601'}, - 'last_message': {'key': 'properties.lastMessage', 'type': 'str'}, - 'target': {'key': 'properties.target', 'type': 'JobExecutionTarget'}, - } - - def __init__(self, **kwargs): - super(JobExecution, self).__init__(**kwargs) - self.job_version = None - self.step_name = None - self.step_id = None - self.job_execution_id = None - self.lifecycle = None - self.provisioning_state = None - self.create_time = None - self.start_time = None - self.end_time = None - self.current_attempts = kwargs.get('current_attempts', None) - self.current_attempt_start_time = None - self.last_message = None - self.target = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_paged.py deleted file mode 100644 index bfcdb03ea9aa..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobExecutionPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobExecution ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobExecution]'} - } - - def __init__(self, *args, **kwargs): - - super(JobExecutionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_py3.py deleted file mode 100644 index b7fdaba7c147..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_py3.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class JobExecution(ProxyResource): - """An execution of a job. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar job_version: The job version number. - :vartype job_version: int - :ivar step_name: The job step name. - :vartype step_name: str - :ivar step_id: The job step id. - :vartype step_id: int - :ivar job_execution_id: The unique identifier of the job execution. - :vartype job_execution_id: str - :ivar lifecycle: The detailed state of the job execution. Possible values - include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', - 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', - 'TimedOut', 'Canceled', 'Skipped' - :vartype lifecycle: str or ~azure.mgmt.sql.models.JobExecutionLifecycle - :ivar provisioning_state: The ARM provisioning state of the job execution. - Possible values include: 'Created', 'InProgress', 'Succeeded', 'Failed', - 'Canceled' - :vartype provisioning_state: str or - ~azure.mgmt.sql.models.ProvisioningState - :ivar create_time: The time that the job execution was created. - :vartype create_time: datetime - :ivar start_time: The time that the job execution started. - :vartype start_time: datetime - :ivar end_time: The time that the job execution completed. - :vartype end_time: datetime - :param current_attempts: Number of times the job execution has been - attempted. - :type current_attempts: int - :ivar current_attempt_start_time: Start time of the current attempt. - :vartype current_attempt_start_time: datetime - :ivar last_message: The last status or error message. - :vartype last_message: str - :ivar target: The target that this execution is executed on. - :vartype target: ~azure.mgmt.sql.models.JobExecutionTarget - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'job_version': {'readonly': True}, - 'step_name': {'readonly': True}, - 'step_id': {'readonly': True}, - 'job_execution_id': {'readonly': True}, - 'lifecycle': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'create_time': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'current_attempt_start_time': {'readonly': True}, - 'last_message': {'readonly': True}, - 'target': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'job_version': {'key': 'properties.jobVersion', 'type': 'int'}, - 'step_name': {'key': 'properties.stepName', 'type': 'str'}, - 'step_id': {'key': 'properties.stepId', 'type': 'int'}, - 'job_execution_id': {'key': 'properties.jobExecutionId', 'type': 'str'}, - 'lifecycle': {'key': 'properties.lifecycle', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'current_attempts': {'key': 'properties.currentAttempts', 'type': 'int'}, - 'current_attempt_start_time': {'key': 'properties.currentAttemptStartTime', 'type': 'iso-8601'}, - 'last_message': {'key': 'properties.lastMessage', 'type': 'str'}, - 'target': {'key': 'properties.target', 'type': 'JobExecutionTarget'}, - } - - def __init__(self, *, current_attempts: int=None, **kwargs) -> None: - super(JobExecution, self).__init__(**kwargs) - self.job_version = None - self.step_name = None - self.step_id = None - self.job_execution_id = None - self.lifecycle = None - self.provisioning_state = None - self.create_time = None - self.start_time = None - self.end_time = None - self.current_attempts = current_attempts - self.current_attempt_start_time = None - self.last_message = None - self.target = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target.py deleted file mode 100644 index 50557aaf96d0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobExecutionTarget(Model): - """The target that a job execution is executed on. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The type of the target. Possible values include: - 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' - :vartype type: str or ~azure.mgmt.sql.models.JobTargetType - :ivar server_name: The server name. - :vartype server_name: str - :ivar database_name: The database name. - :vartype database_name: str - """ - - _validation = { - 'type': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobExecutionTarget, self).__init__(**kwargs) - self.type = None - self.server_name = None - self.database_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target_py3.py deleted file mode 100644 index 551716c3cd31..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobExecutionTarget(Model): - """The target that a job execution is executed on. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The type of the target. Possible values include: - 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' - :vartype type: str or ~azure.mgmt.sql.models.JobTargetType - :ivar server_name: The server name. - :vartype server_name: str - :ivar database_name: The database name. - :vartype database_name: str - """ - - _validation = { - 'type': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(JobExecutionTarget, self).__init__(**kwargs) - self.type = None - self.server_name = None - self.database_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_paged.py deleted file mode 100644 index 3b85770570f2..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobPaged(Paged): - """ - A paging container for iterating over a list of :class:`Job ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Job]'} - } - - def __init__(self, *args, **kwargs): - - super(JobPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_py3.py deleted file mode 100644 index 5bfb9b53f03f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class Job(ProxyResource): - """A job. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param description: User-defined description of the job. Default value: "" - . - :type description: str - :ivar version: The job version number. - :vartype version: int - :param schedule: Schedule properties of the job. - :type schedule: ~azure.mgmt.sql.models.JobSchedule - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'version': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'int'}, - 'schedule': {'key': 'properties.schedule', 'type': 'JobSchedule'}, - } - - def __init__(self, *, description: str="", schedule=None, **kwargs) -> None: - super(Job, self).__init__(**kwargs) - self.description = description - self.version = None - self.schedule = schedule diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule.py deleted file mode 100644 index 354e32c4f5b0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobSchedule(Model): - """Scheduling properties of a job. - - :param start_time: Schedule start time. Default value: - "0001-01-01T00:00:00Z" . - :type start_time: datetime - :param end_time: Schedule end time. Default value: "9999-12-31T11:59:59Z" - . - :type end_time: datetime - :param type: Schedule interval type. Possible values include: 'Once', - 'Recurring'. Default value: "Once" . - :type type: str or ~azure.mgmt.sql.models.JobScheduleType - :param enabled: Whether or not the schedule is enabled. - :type enabled: bool - :param interval: Value of the schedule's recurring interval, if the - schedule type is recurring. ISO8601 duration format. - :type interval: str - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'JobScheduleType'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'interval': {'key': 'interval', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobSchedule, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', "0001-01-01T00:00:00Z") - self.end_time = kwargs.get('end_time', "9999-12-31T11:59:59Z") - self.type = kwargs.get('type', "Once") - self.enabled = kwargs.get('enabled', None) - self.interval = kwargs.get('interval', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule_py3.py deleted file mode 100644 index 4b4a6a8f8971..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobSchedule(Model): - """Scheduling properties of a job. - - :param start_time: Schedule start time. Default value: - "0001-01-01T00:00:00Z" . - :type start_time: datetime - :param end_time: Schedule end time. Default value: "9999-12-31T11:59:59Z" - . - :type end_time: datetime - :param type: Schedule interval type. Possible values include: 'Once', - 'Recurring'. Default value: "Once" . - :type type: str or ~azure.mgmt.sql.models.JobScheduleType - :param enabled: Whether or not the schedule is enabled. - :type enabled: bool - :param interval: Value of the schedule's recurring interval, if the - schedule type is recurring. ISO8601 duration format. - :type interval: str - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'JobScheduleType'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'interval': {'key': 'interval', 'type': 'str'}, - } - - def __init__(self, *, start_time="0001-01-01T00:00:00Z", end_time="9999-12-31T11:59:59Z", type="Once", enabled: bool=None, interval: str=None, **kwargs) -> None: - super(JobSchedule, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time - self.type = type - self.enabled = enabled - self.interval = interval diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step.py deleted file mode 100644 index f032375dec32..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class JobStep(ProxyResource): - """A job step. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param step_id: The job step's index within the job. If not specified when - creating the job step, it will be created as the last step. If not - specified when updating the job step, the step id is not modified. - :type step_id: int - :param target_group: Required. The resource ID of the target group that - the job step will be executed on. - :type target_group: str - :param credential: Required. The resource ID of the job credential that - will be used to connect to the targets. - :type credential: str - :param action: Required. The action payload of the job step. - :type action: ~azure.mgmt.sql.models.JobStepAction - :param output: Output destination properties of the job step. - :type output: ~azure.mgmt.sql.models.JobStepOutput - :param execution_options: Execution options for the job step. - :type execution_options: ~azure.mgmt.sql.models.JobStepExecutionOptions - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'target_group': {'required': True}, - 'credential': {'required': True}, - 'action': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'step_id': {'key': 'properties.stepId', 'type': 'int'}, - 'target_group': {'key': 'properties.targetGroup', 'type': 'str'}, - 'credential': {'key': 'properties.credential', 'type': 'str'}, - 'action': {'key': 'properties.action', 'type': 'JobStepAction'}, - 'output': {'key': 'properties.output', 'type': 'JobStepOutput'}, - 'execution_options': {'key': 'properties.executionOptions', 'type': 'JobStepExecutionOptions'}, - } - - def __init__(self, **kwargs): - super(JobStep, self).__init__(**kwargs) - self.step_id = kwargs.get('step_id', None) - self.target_group = kwargs.get('target_group', None) - self.credential = kwargs.get('credential', None) - self.action = kwargs.get('action', None) - self.output = kwargs.get('output', None) - self.execution_options = kwargs.get('execution_options', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action.py deleted file mode 100644 index 68e55b1fa38f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepAction(Model): - """The action to be executed by a job step. - - All required parameters must be populated in order to send to Azure. - - :param type: Type of action being executed by the job step. Possible - values include: 'TSql'. Default value: "TSql" . - :type type: str or ~azure.mgmt.sql.models.JobStepActionType - :param source: The source of the action to execute. Possible values - include: 'Inline'. Default value: "Inline" . - :type source: str or ~azure.mgmt.sql.models.JobStepActionSource - :param value: Required. The action value, for example the text of the - T-SQL script to execute. - :type value: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobStepAction, self).__init__(**kwargs) - self.type = kwargs.get('type', "TSql") - self.source = kwargs.get('source', "Inline") - self.value = kwargs.get('value', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action_py3.py deleted file mode 100644 index 4d8848c8eaef..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepAction(Model): - """The action to be executed by a job step. - - All required parameters must be populated in order to send to Azure. - - :param type: Type of action being executed by the job step. Possible - values include: 'TSql'. Default value: "TSql" . - :type type: str or ~azure.mgmt.sql.models.JobStepActionType - :param source: The source of the action to execute. Possible values - include: 'Inline'. Default value: "Inline" . - :type source: str or ~azure.mgmt.sql.models.JobStepActionSource - :param value: Required. The action value, for example the text of the - T-SQL script to execute. - :type value: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, value: str, type="TSql", source="Inline", **kwargs) -> None: - super(JobStepAction, self).__init__(**kwargs) - self.type = type - self.source = source - self.value = value diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options.py deleted file mode 100644 index 6a49f1d10f25..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepExecutionOptions(Model): - """The execution options of a job step. - - :param timeout_seconds: Execution timeout for the job step. Default value: - 43200 . - :type timeout_seconds: int - :param retry_attempts: Maximum number of times the job step will be - reattempted if the first attempt fails. Default value: 10 . - :type retry_attempts: int - :param initial_retry_interval_seconds: Initial delay between retries for - job step execution. Default value: 1 . - :type initial_retry_interval_seconds: int - :param maximum_retry_interval_seconds: The maximum amount of time to wait - between retries for job step execution. Default value: 120 . - :type maximum_retry_interval_seconds: int - :param retry_interval_backoff_multiplier: The backoff multiplier for the - time between retries. Default value: 2 . - :type retry_interval_backoff_multiplier: float - """ - - _attribute_map = { - 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, - 'retry_attempts': {'key': 'retryAttempts', 'type': 'int'}, - 'initial_retry_interval_seconds': {'key': 'initialRetryIntervalSeconds', 'type': 'int'}, - 'maximum_retry_interval_seconds': {'key': 'maximumRetryIntervalSeconds', 'type': 'int'}, - 'retry_interval_backoff_multiplier': {'key': 'retryIntervalBackoffMultiplier', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(JobStepExecutionOptions, self).__init__(**kwargs) - self.timeout_seconds = kwargs.get('timeout_seconds', 43200) - self.retry_attempts = kwargs.get('retry_attempts', 10) - self.initial_retry_interval_seconds = kwargs.get('initial_retry_interval_seconds', 1) - self.maximum_retry_interval_seconds = kwargs.get('maximum_retry_interval_seconds', 120) - self.retry_interval_backoff_multiplier = kwargs.get('retry_interval_backoff_multiplier', 2) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options_py3.py deleted file mode 100644 index 712f0e947436..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepExecutionOptions(Model): - """The execution options of a job step. - - :param timeout_seconds: Execution timeout for the job step. Default value: - 43200 . - :type timeout_seconds: int - :param retry_attempts: Maximum number of times the job step will be - reattempted if the first attempt fails. Default value: 10 . - :type retry_attempts: int - :param initial_retry_interval_seconds: Initial delay between retries for - job step execution. Default value: 1 . - :type initial_retry_interval_seconds: int - :param maximum_retry_interval_seconds: The maximum amount of time to wait - between retries for job step execution. Default value: 120 . - :type maximum_retry_interval_seconds: int - :param retry_interval_backoff_multiplier: The backoff multiplier for the - time between retries. Default value: 2 . - :type retry_interval_backoff_multiplier: float - """ - - _attribute_map = { - 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, - 'retry_attempts': {'key': 'retryAttempts', 'type': 'int'}, - 'initial_retry_interval_seconds': {'key': 'initialRetryIntervalSeconds', 'type': 'int'}, - 'maximum_retry_interval_seconds': {'key': 'maximumRetryIntervalSeconds', 'type': 'int'}, - 'retry_interval_backoff_multiplier': {'key': 'retryIntervalBackoffMultiplier', 'type': 'float'}, - } - - def __init__(self, *, timeout_seconds: int=43200, retry_attempts: int=10, initial_retry_interval_seconds: int=1, maximum_retry_interval_seconds: int=120, retry_interval_backoff_multiplier: float=2, **kwargs) -> None: - super(JobStepExecutionOptions, self).__init__(**kwargs) - self.timeout_seconds = timeout_seconds - self.retry_attempts = retry_attempts - self.initial_retry_interval_seconds = initial_retry_interval_seconds - self.maximum_retry_interval_seconds = maximum_retry_interval_seconds - self.retry_interval_backoff_multiplier = retry_interval_backoff_multiplier diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output.py deleted file mode 100644 index 8a015a7505bd..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepOutput(Model): - """The output configuration of a job step. - - All required parameters must be populated in order to send to Azure. - - :param type: The output destination type. Possible values include: - 'SqlDatabase'. Default value: "SqlDatabase" . - :type type: str or ~azure.mgmt.sql.models.JobStepOutputType - :param subscription_id: The output destination subscription id. - :type subscription_id: str - :param resource_group_name: The output destination resource group. - :type resource_group_name: str - :param server_name: Required. The output destination server name. - :type server_name: str - :param database_name: Required. The output destination database. - :type database_name: str - :param schema_name: The output destination schema. Default value: "dbo" . - :type schema_name: str - :param table_name: Required. The output destination table. - :type table_name: str - :param credential: Required. The resource ID of the credential to use to - connect to the output destination. - :type credential: str - """ - - _validation = { - 'server_name': {'required': True}, - 'database_name': {'required': True}, - 'table_name': {'required': True}, - 'credential': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'schema_name': {'key': 'schemaName', 'type': 'str'}, - 'table_name': {'key': 'tableName', 'type': 'str'}, - 'credential': {'key': 'credential', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobStepOutput, self).__init__(**kwargs) - self.type = kwargs.get('type', "SqlDatabase") - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group_name = kwargs.get('resource_group_name', None) - self.server_name = kwargs.get('server_name', None) - self.database_name = kwargs.get('database_name', None) - self.schema_name = kwargs.get('schema_name', "dbo") - self.table_name = kwargs.get('table_name', None) - self.credential = kwargs.get('credential', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output_py3.py deleted file mode 100644 index d10ecbbd6f8c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepOutput(Model): - """The output configuration of a job step. - - All required parameters must be populated in order to send to Azure. - - :param type: The output destination type. Possible values include: - 'SqlDatabase'. Default value: "SqlDatabase" . - :type type: str or ~azure.mgmt.sql.models.JobStepOutputType - :param subscription_id: The output destination subscription id. - :type subscription_id: str - :param resource_group_name: The output destination resource group. - :type resource_group_name: str - :param server_name: Required. The output destination server name. - :type server_name: str - :param database_name: Required. The output destination database. - :type database_name: str - :param schema_name: The output destination schema. Default value: "dbo" . - :type schema_name: str - :param table_name: Required. The output destination table. - :type table_name: str - :param credential: Required. The resource ID of the credential to use to - connect to the output destination. - :type credential: str - """ - - _validation = { - 'server_name': {'required': True}, - 'database_name': {'required': True}, - 'table_name': {'required': True}, - 'credential': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'schema_name': {'key': 'schemaName', 'type': 'str'}, - 'table_name': {'key': 'tableName', 'type': 'str'}, - 'credential': {'key': 'credential', 'type': 'str'}, - } - - def __init__(self, *, server_name: str, database_name: str, table_name: str, credential: str, type="SqlDatabase", subscription_id: str=None, resource_group_name: str=None, schema_name: str="dbo", **kwargs) -> None: - super(JobStepOutput, self).__init__(**kwargs) - self.type = type - self.subscription_id = subscription_id - self.resource_group_name = resource_group_name - self.server_name = server_name - self.database_name = database_name - self.schema_name = schema_name - self.table_name = table_name - self.credential = credential diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_paged.py deleted file mode 100644 index 1bda4f5adf6e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobStepPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobStep ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobStep]'} - } - - def __init__(self, *args, **kwargs): - - super(JobStepPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_py3.py deleted file mode 100644 index bd267f9fd9a6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_py3.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class JobStep(ProxyResource): - """A job step. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param step_id: The job step's index within the job. If not specified when - creating the job step, it will be created as the last step. If not - specified when updating the job step, the step id is not modified. - :type step_id: int - :param target_group: Required. The resource ID of the target group that - the job step will be executed on. - :type target_group: str - :param credential: Required. The resource ID of the job credential that - will be used to connect to the targets. - :type credential: str - :param action: Required. The action payload of the job step. - :type action: ~azure.mgmt.sql.models.JobStepAction - :param output: Output destination properties of the job step. - :type output: ~azure.mgmt.sql.models.JobStepOutput - :param execution_options: Execution options for the job step. - :type execution_options: ~azure.mgmt.sql.models.JobStepExecutionOptions - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'target_group': {'required': True}, - 'credential': {'required': True}, - 'action': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'step_id': {'key': 'properties.stepId', 'type': 'int'}, - 'target_group': {'key': 'properties.targetGroup', 'type': 'str'}, - 'credential': {'key': 'properties.credential', 'type': 'str'}, - 'action': {'key': 'properties.action', 'type': 'JobStepAction'}, - 'output': {'key': 'properties.output', 'type': 'JobStepOutput'}, - 'execution_options': {'key': 'properties.executionOptions', 'type': 'JobStepExecutionOptions'}, - } - - def __init__(self, *, target_group: str, credential: str, action, step_id: int=None, output=None, execution_options=None, **kwargs) -> None: - super(JobStep, self).__init__(**kwargs) - self.step_id = step_id - self.target_group = target_group - self.credential = credential - self.action = action - self.output = output - self.execution_options = execution_options diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target.py deleted file mode 100644 index a608d87c1af1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobTarget(Model): - """A job target, for example a specific database or a container of databases - that is evaluated during job execution. - - All required parameters must be populated in order to send to Azure. - - :param membership_type: Whether the target is included or excluded from - the group. Possible values include: 'Include', 'Exclude'. Default value: - "Include" . - :type membership_type: str or - ~azure.mgmt.sql.models.JobTargetGroupMembershipType - :param type: Required. The target type. Possible values include: - 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' - :type type: str or ~azure.mgmt.sql.models.JobTargetType - :param server_name: The target server name. - :type server_name: str - :param database_name: The target database name. - :type database_name: str - :param elastic_pool_name: The target elastic pool name. - :type elastic_pool_name: str - :param shard_map_name: The target shard map. - :type shard_map_name: str - :param refresh_credential: The resource ID of the credential that is used - during job execution to connect to the target and determine the list of - databases inside the target. - :type refresh_credential: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'membership_type': {'key': 'membershipType', 'type': 'JobTargetGroupMembershipType'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'elastic_pool_name': {'key': 'elasticPoolName', 'type': 'str'}, - 'shard_map_name': {'key': 'shardMapName', 'type': 'str'}, - 'refresh_credential': {'key': 'refreshCredential', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobTarget, self).__init__(**kwargs) - self.membership_type = kwargs.get('membership_type', "Include") - self.type = kwargs.get('type', None) - self.server_name = kwargs.get('server_name', None) - self.database_name = kwargs.get('database_name', None) - self.elastic_pool_name = kwargs.get('elastic_pool_name', None) - self.shard_map_name = kwargs.get('shard_map_name', None) - self.refresh_credential = kwargs.get('refresh_credential', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group.py deleted file mode 100644 index 38148fb244c4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class JobTargetGroup(ProxyResource): - """A group of job targets. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param members: Required. Members of the target group. - :type members: list[~azure.mgmt.sql.models.JobTarget] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'members': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'members': {'key': 'properties.members', 'type': '[JobTarget]'}, - } - - def __init__(self, **kwargs): - super(JobTargetGroup, self).__init__(**kwargs) - self.members = kwargs.get('members', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_paged.py deleted file mode 100644 index cd466e5afa84..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobTargetGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobTargetGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobTargetGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(JobTargetGroupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_py3.py deleted file mode 100644 index a9582212ff82..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class JobTargetGroup(ProxyResource): - """A group of job targets. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param members: Required. Members of the target group. - :type members: list[~azure.mgmt.sql.models.JobTarget] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'members': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'members': {'key': 'properties.members', 'type': '[JobTarget]'}, - } - - def __init__(self, *, members, **kwargs) -> None: - super(JobTargetGroup, self).__init__(**kwargs) - self.members = members diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_py3.py deleted file mode 100644 index 281eb7598f18..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobTarget(Model): - """A job target, for example a specific database or a container of databases - that is evaluated during job execution. - - All required parameters must be populated in order to send to Azure. - - :param membership_type: Whether the target is included or excluded from - the group. Possible values include: 'Include', 'Exclude'. Default value: - "Include" . - :type membership_type: str or - ~azure.mgmt.sql.models.JobTargetGroupMembershipType - :param type: Required. The target type. Possible values include: - 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' - :type type: str or ~azure.mgmt.sql.models.JobTargetType - :param server_name: The target server name. - :type server_name: str - :param database_name: The target database name. - :type database_name: str - :param elastic_pool_name: The target elastic pool name. - :type elastic_pool_name: str - :param shard_map_name: The target shard map. - :type shard_map_name: str - :param refresh_credential: The resource ID of the credential that is used - during job execution to connect to the target and determine the list of - databases inside the target. - :type refresh_credential: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'membership_type': {'key': 'membershipType', 'type': 'JobTargetGroupMembershipType'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'elastic_pool_name': {'key': 'elasticPoolName', 'type': 'str'}, - 'shard_map_name': {'key': 'shardMapName', 'type': 'str'}, - 'refresh_credential': {'key': 'refreshCredential', 'type': 'str'}, - } - - def __init__(self, *, type, membership_type="Include", server_name: str=None, database_name: str=None, elastic_pool_name: str=None, shard_map_name: str=None, refresh_credential: str=None, **kwargs) -> None: - super(JobTarget, self).__init__(**kwargs) - self.membership_type = membership_type - self.type = type - self.server_name = server_name - self.database_name = database_name - self.elastic_pool_name = elastic_pool_name - self.shard_map_name = shard_map_name - self.refresh_credential = refresh_credential diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version.py deleted file mode 100644 index 3c480e739607..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class JobVersion(ProxyResource): - """A job version. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobVersion, self).__init__(**kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_paged.py deleted file mode 100644 index 162e4d8cfb5e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobVersionPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobVersion ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobVersion]'} - } - - def __init__(self, *args, **kwargs): - - super(JobVersionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_py3.py deleted file mode 100644 index 16a8798c5949..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class JobVersion(ProxyResource): - """A job version. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(JobVersion, self).__init__(**kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability.py deleted file mode 100644 index f40ad624e1c5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LicenseTypeCapability(Model): - """The license type capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: License type identifier. - :vartype name: str - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LicenseTypeCapability, self).__init__(**kwargs) - self.name = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability_py3.py deleted file mode 100644 index ecfa1918210a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LicenseTypeCapability(Model): - """The license type capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: License type identifier. - :vartype name: str - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(LicenseTypeCapability, self).__init__(**kwargs) - self.name = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities.py deleted file mode 100644 index b7e7f0980834..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LocationCapabilities(Model): - """The location capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The location name. - :vartype name: str - :ivar supported_server_versions: The list of supported server versions. - :vartype supported_server_versions: - list[~azure.mgmt.sql.models.ServerVersionCapability] - :ivar supported_managed_instance_versions: The list of supported managed - instance versions. - :vartype supported_managed_instance_versions: - list[~azure.mgmt.sql.models.ManagedInstanceVersionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_server_versions': {'readonly': True}, - 'supported_managed_instance_versions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_server_versions': {'key': 'supportedServerVersions', 'type': '[ServerVersionCapability]'}, - 'supported_managed_instance_versions': {'key': 'supportedManagedInstanceVersions', 'type': '[ManagedInstanceVersionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LocationCapabilities, self).__init__(**kwargs) - self.name = None - self.supported_server_versions = None - self.supported_managed_instance_versions = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities_py3.py deleted file mode 100644 index 69b257f605a9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LocationCapabilities(Model): - """The location capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The location name. - :vartype name: str - :ivar supported_server_versions: The list of supported server versions. - :vartype supported_server_versions: - list[~azure.mgmt.sql.models.ServerVersionCapability] - :ivar supported_managed_instance_versions: The list of supported managed - instance versions. - :vartype supported_managed_instance_versions: - list[~azure.mgmt.sql.models.ManagedInstanceVersionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_server_versions': {'readonly': True}, - 'supported_managed_instance_versions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_server_versions': {'key': 'supportedServerVersions', 'type': '[ServerVersionCapability]'}, - 'supported_managed_instance_versions': {'key': 'supportedManagedInstanceVersions', 'type': '[ManagedInstanceVersionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(LocationCapabilities, self).__init__(**kwargs) - self.name = None - self.supported_server_versions = None - self.supported_managed_instance_versions = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability.py deleted file mode 100644 index ad86f97123cf..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogSizeCapability(Model): - """The log size capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The log size limit (see 'unit' for the units). - :vartype limit: int - :ivar unit: The units that the limit is expressed in. Possible values - include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes', 'Percent' - :vartype unit: str or ~azure.mgmt.sql.models.LogSizeUnit - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'int'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LogSizeCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability_py3.py deleted file mode 100644 index 787e781b3025..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogSizeCapability(Model): - """The log size capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The log size limit (see 'unit' for the units). - :vartype limit: int - :ivar unit: The units that the limit is expressed in. Possible values - include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes', 'Percent' - :vartype unit: str or ~azure.mgmt.sql.models.LogSizeUnit - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'int'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(LogSizeCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup.py deleted file mode 100644 index 288ac55f501f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class LongTermRetentionBackup(ProxyResource): - """A long term retention backup. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar server_name: The server name that the backup database belong to. - :vartype server_name: str - :ivar server_create_time: The create time of the server. - :vartype server_create_time: datetime - :ivar database_name: The name of the database the backup belong to - :vartype database_name: str - :ivar database_deletion_time: The delete time of the database - :vartype database_deletion_time: datetime - :ivar backup_time: The time the backup was taken - :vartype backup_time: datetime - :ivar backup_expiration_time: The time the long term retention backup will - expire. - :vartype backup_expiration_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'server_name': {'readonly': True}, - 'server_create_time': {'readonly': True}, - 'database_name': {'readonly': True}, - 'database_deletion_time': {'readonly': True}, - 'backup_time': {'readonly': True}, - 'backup_expiration_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'server_create_time': {'key': 'properties.serverCreateTime', 'type': 'iso-8601'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'database_deletion_time': {'key': 'properties.databaseDeletionTime', 'type': 'iso-8601'}, - 'backup_time': {'key': 'properties.backupTime', 'type': 'iso-8601'}, - 'backup_expiration_time': {'key': 'properties.backupExpirationTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(LongTermRetentionBackup, self).__init__(**kwargs) - self.server_name = None - self.server_create_time = None - self.database_name = None - self.database_deletion_time = None - self.backup_time = None - self.backup_expiration_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_paged.py deleted file mode 100644 index 15e32283bbd7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class LongTermRetentionBackupPaged(Paged): - """ - A paging container for iterating over a list of :class:`LongTermRetentionBackup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[LongTermRetentionBackup]'} - } - - def __init__(self, *args, **kwargs): - - super(LongTermRetentionBackupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_py3.py deleted file mode 100644 index eb1372180fb0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class LongTermRetentionBackup(ProxyResource): - """A long term retention backup. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar server_name: The server name that the backup database belong to. - :vartype server_name: str - :ivar server_create_time: The create time of the server. - :vartype server_create_time: datetime - :ivar database_name: The name of the database the backup belong to - :vartype database_name: str - :ivar database_deletion_time: The delete time of the database - :vartype database_deletion_time: datetime - :ivar backup_time: The time the backup was taken - :vartype backup_time: datetime - :ivar backup_expiration_time: The time the long term retention backup will - expire. - :vartype backup_expiration_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'server_name': {'readonly': True}, - 'server_create_time': {'readonly': True}, - 'database_name': {'readonly': True}, - 'database_deletion_time': {'readonly': True}, - 'backup_time': {'readonly': True}, - 'backup_expiration_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'server_create_time': {'key': 'properties.serverCreateTime', 'type': 'iso-8601'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'database_deletion_time': {'key': 'properties.databaseDeletionTime', 'type': 'iso-8601'}, - 'backup_time': {'key': 'properties.backupTime', 'type': 'iso-8601'}, - 'backup_expiration_time': {'key': 'properties.backupExpirationTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(LongTermRetentionBackup, self).__init__(**kwargs) - self.server_name = None - self.server_create_time = None - self.database_name = None - self.database_deletion_time = None - self.backup_time = None - self.backup_expiration_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy.py deleted file mode 100644 index 4cab44ce75c7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedBackupShortTermRetentionPolicy(ProxyResource): - """A short term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param retention_days: The backup retention period in days. This is how - many days Point-in-Time Restore will be supported. - :type retention_days: int - """ - - _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'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedBackupShortTermRetentionPolicy, self).__init__(**kwargs) - self.retention_days = kwargs.get('retention_days', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_paged.py deleted file mode 100644 index 17bcf3e363fc..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedBackupShortTermRetentionPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedBackupShortTermRetentionPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedBackupShortTermRetentionPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedBackupShortTermRetentionPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_py3.py deleted file mode 100644 index 46a3fafddeee..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedBackupShortTermRetentionPolicy(ProxyResource): - """A short term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param retention_days: The backup retention period in days. This is how - many days Point-in-Time Restore will be supported. - :type retention_days: int - """ - - _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'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, *, retention_days: int=None, **kwargs) -> None: - super(ManagedBackupShortTermRetentionPolicy, self).__init__(**kwargs) - self.retention_days = retention_days diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py deleted file mode 100644 index 0c5141eaaef5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class ManagedDatabase(TrackedResource): - """A managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param collation: Collation of the managed database. - :type collation: str - :ivar status: Status of the database. Possible values include: 'Online', - 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' - :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus - :ivar creation_date: Creation date of the database. - :vartype creation_date: datetime - :ivar earliest_restore_point: Earliest restore point in time for point in - time restore. - :vartype earliest_restore_point: datetime - :param restore_point_in_time: Conditional. If createMode is - PointInTimeRestore, this value is required. Specifies the point in time - (ISO8601 format) of the source database that will be restored to create - the new database. - :type restore_point_in_time: datetime - :ivar default_secondary_location: Geo paired region. - :vartype default_secondary_location: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param create_mode: Managed database create mode. PointInTimeRestore: - Create a database by restoring a point in time backup of an existing - database. SourceDatabaseName, SourceManagedInstanceName and PointInTime - must be specified. RestoreExternalBackup: Create a database by restoring - from external backup files. Collation, StorageContainerUri and - StorageContainerSasToken must be specified. Recovery: Creates a database - by restoring a geo-replicated backup. RecoverableDatabaseId must be - specified as the recoverable database resource ID to restore. Possible - values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', - 'Recovery' - :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode - :param storage_container_uri: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the uri of the - storage container where backups for this restore are stored. - :type storage_container_uri: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :param restorable_dropped_database_id: The restorable dropped database - resource id to restore when creating this database. - :type restorable_dropped_database_id: str - :param storage_container_sas_token: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the storage - container sas token. - :type storage_container_sas_token: str - :ivar failover_group_id: Instance Failover Group resource identifier that - this managed database belongs to. - :vartype failover_group_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'status': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'earliest_restore_point': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedDatabase, self).__init__(**kwargs) - self.collation = kwargs.get('collation', None) - self.status = None - self.creation_date = None - self.earliest_restore_point = None - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.default_secondary_location = None - self.catalog_collation = kwargs.get('catalog_collation', None) - self.create_mode = kwargs.get('create_mode', None) - self.storage_container_uri = kwargs.get('storage_container_uri', None) - self.source_database_id = kwargs.get('source_database_id', None) - self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) - self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None) - self.failover_group_id = None - self.recoverable_database_id = kwargs.get('recoverable_database_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_paged.py deleted file mode 100644 index e15d9d532b5a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py deleted file mode 100644 index cc5b655604ad..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class ManagedDatabase(TrackedResource): - """A managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param collation: Collation of the managed database. - :type collation: str - :ivar status: Status of the database. Possible values include: 'Online', - 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' - :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus - :ivar creation_date: Creation date of the database. - :vartype creation_date: datetime - :ivar earliest_restore_point: Earliest restore point in time for point in - time restore. - :vartype earliest_restore_point: datetime - :param restore_point_in_time: Conditional. If createMode is - PointInTimeRestore, this value is required. Specifies the point in time - (ISO8601 format) of the source database that will be restored to create - the new database. - :type restore_point_in_time: datetime - :ivar default_secondary_location: Geo paired region. - :vartype default_secondary_location: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param create_mode: Managed database create mode. PointInTimeRestore: - Create a database by restoring a point in time backup of an existing - database. SourceDatabaseName, SourceManagedInstanceName and PointInTime - must be specified. RestoreExternalBackup: Create a database by restoring - from external backup files. Collation, StorageContainerUri and - StorageContainerSasToken must be specified. Recovery: Creates a database - by restoring a geo-replicated backup. RecoverableDatabaseId must be - specified as the recoverable database resource ID to restore. Possible - values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', - 'Recovery' - :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode - :param storage_container_uri: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the uri of the - storage container where backups for this restore are stored. - :type storage_container_uri: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :param restorable_dropped_database_id: The restorable dropped database - resource id to restore when creating this database. - :type restorable_dropped_database_id: str - :param storage_container_sas_token: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the storage - container sas token. - :type storage_container_sas_token: str - :ivar failover_group_id: Instance Failover Group resource identifier that - this managed database belongs to. - :vartype failover_group_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'status': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'earliest_restore_point': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, restorable_dropped_database_id: str=None, storage_container_sas_token: str=None, recoverable_database_id: str=None, **kwargs) -> None: - super(ManagedDatabase, self).__init__(location=location, tags=tags, **kwargs) - self.collation = collation - self.status = None - self.creation_date = None - self.earliest_restore_point = None - self.restore_point_in_time = restore_point_in_time - self.default_secondary_location = None - self.catalog_collation = catalog_collation - self.create_mode = create_mode - self.storage_container_uri = storage_container_uri - self.source_database_id = source_database_id - self.restorable_dropped_database_id = restorable_dropped_database_id - self.storage_container_sas_token = storage_container_sas_token - self.failover_group_id = None - self.recoverable_database_id = recoverable_database_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy.py deleted file mode 100644 index e3117c33610e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedDatabaseSecurityAlertPolicy(ProxyResource): - """A managed database security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ManagedDatabaseSecurityAlertPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_paged.py deleted file mode 100644 index e05f23ba364c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedDatabaseSecurityAlertPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedDatabaseSecurityAlertPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedDatabaseSecurityAlertPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedDatabaseSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_py3.py deleted file mode 100644 index 365f34280641..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedDatabaseSecurityAlertPolicy(ProxyResource): - """A managed database security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: - super(ManagedDatabaseSecurityAlertPolicy, self).__init__(**kwargs) - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py deleted file mode 100644 index 5ce3a036dcb9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedDatabaseUpdate(Model): - """An managed database update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param collation: Collation of the managed database. - :type collation: str - :ivar status: Status of the database. Possible values include: 'Online', - 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' - :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus - :ivar creation_date: Creation date of the database. - :vartype creation_date: datetime - :ivar earliest_restore_point: Earliest restore point in time for point in - time restore. - :vartype earliest_restore_point: datetime - :param restore_point_in_time: Conditional. If createMode is - PointInTimeRestore, this value is required. Specifies the point in time - (ISO8601 format) of the source database that will be restored to create - the new database. - :type restore_point_in_time: datetime - :ivar default_secondary_location: Geo paired region. - :vartype default_secondary_location: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param create_mode: Managed database create mode. PointInTimeRestore: - Create a database by restoring a point in time backup of an existing - database. SourceDatabaseName, SourceManagedInstanceName and PointInTime - must be specified. RestoreExternalBackup: Create a database by restoring - from external backup files. Collation, StorageContainerUri and - StorageContainerSasToken must be specified. Recovery: Creates a database - by restoring a geo-replicated backup. RecoverableDatabaseId must be - specified as the recoverable database resource ID to restore. Possible - values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', - 'Recovery' - :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode - :param storage_container_uri: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the uri of the - storage container where backups for this restore are stored. - :type storage_container_uri: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :param restorable_dropped_database_id: The restorable dropped database - resource id to restore when creating this database. - :type restorable_dropped_database_id: str - :param storage_container_sas_token: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the storage - container sas token. - :type storage_container_sas_token: str - :ivar failover_group_id: Instance Failover Group resource identifier that - this managed database belongs to. - :vartype failover_group_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'status': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'earliest_restore_point': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - } - - _attribute_map = { - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedDatabaseUpdate, self).__init__(**kwargs) - self.collation = kwargs.get('collation', None) - self.status = None - self.creation_date = None - self.earliest_restore_point = None - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.default_secondary_location = None - self.catalog_collation = kwargs.get('catalog_collation', None) - self.create_mode = kwargs.get('create_mode', None) - self.storage_container_uri = kwargs.get('storage_container_uri', None) - self.source_database_id = kwargs.get('source_database_id', None) - self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) - self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None) - self.failover_group_id = None - self.recoverable_database_id = kwargs.get('recoverable_database_id', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py deleted file mode 100644 index 34ae1be2b3fe..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedDatabaseUpdate(Model): - """An managed database update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param collation: Collation of the managed database. - :type collation: str - :ivar status: Status of the database. Possible values include: 'Online', - 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' - :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus - :ivar creation_date: Creation date of the database. - :vartype creation_date: datetime - :ivar earliest_restore_point: Earliest restore point in time for point in - time restore. - :vartype earliest_restore_point: datetime - :param restore_point_in_time: Conditional. If createMode is - PointInTimeRestore, this value is required. Specifies the point in time - (ISO8601 format) of the source database that will be restored to create - the new database. - :type restore_point_in_time: datetime - :ivar default_secondary_location: Geo paired region. - :vartype default_secondary_location: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param create_mode: Managed database create mode. PointInTimeRestore: - Create a database by restoring a point in time backup of an existing - database. SourceDatabaseName, SourceManagedInstanceName and PointInTime - must be specified. RestoreExternalBackup: Create a database by restoring - from external backup files. Collation, StorageContainerUri and - StorageContainerSasToken must be specified. Recovery: Creates a database - by restoring a geo-replicated backup. RecoverableDatabaseId must be - specified as the recoverable database resource ID to restore. Possible - values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', - 'Recovery' - :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode - :param storage_container_uri: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the uri of the - storage container where backups for this restore are stored. - :type storage_container_uri: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :param restorable_dropped_database_id: The restorable dropped database - resource id to restore when creating this database. - :type restorable_dropped_database_id: str - :param storage_container_sas_token: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the storage - container sas token. - :type storage_container_sas_token: str - :ivar failover_group_id: Instance Failover Group resource identifier that - this managed database belongs to. - :vartype failover_group_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'status': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'earliest_restore_point': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - } - - _attribute_map = { - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, restorable_dropped_database_id: str=None, storage_container_sas_token: str=None, recoverable_database_id: str=None, tags=None, **kwargs) -> None: - super(ManagedDatabaseUpdate, self).__init__(**kwargs) - self.collation = collation - self.status = None - self.creation_date = None - self.earliest_restore_point = None - self.restore_point_in_time = restore_point_in_time - self.default_secondary_location = None - self.catalog_collation = catalog_collation - self.create_mode = create_mode - self.storage_container_uri = storage_container_uri - self.source_database_id = source_database_id - self.restorable_dropped_database_id = restorable_dropped_database_id - self.storage_container_sas_token = storage_container_sas_token - self.failover_group_id = None - self.recoverable_database_id = recoverable_database_id - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance.py deleted file mode 100644 index cf680e0ddac0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class ManagedInstance(TrackedResource): - """An Azure SQL managed instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param identity: The Azure Active Directory identity of the managed - instance. - :type identity: ~azure.mgmt.sql.models.ResourceIdentity - :param sku: Managed instance sku - :type sku: ~azure.mgmt.sql.models.Sku - :ivar fully_qualified_domain_name: The fully qualified domain name of the - managed instance. - :vartype fully_qualified_domain_name: str - :param administrator_login: Administrator username for the managed - instance. Can only be specified when the managed instance is being created - (and is required for creation). - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for managed instance creation). - :type administrator_login_password: str - :param subnet_id: Subnet resource ID for the managed instance. - :type subnet_id: str - :ivar state: The state of the managed instance. - :vartype state: str - :param license_type: The license type. Possible values are - 'LicenseIncluded' and 'BasePrice'. - :type license_type: str - :param v_cores: The number of VCores. - :type v_cores: int - :param storage_size_in_gb: The maximum storage size in GB. - :type storage_size_in_gb: int - :param collation: Collation of the managed instance. - :type collation: str - :ivar dns_zone: The Dns Zone that the managed instance is in. - :vartype dns_zone: str - :param dns_zone_partner: The resource id of another managed instance whose - DNS zone this managed instance will share after creation. - :type dns_zone_partner: str - :param public_data_endpoint_enabled: Whether or not the public data - endpoint is enabled. - :type public_data_endpoint_enabled: bool - :param proxy_override: Connection type used for connecting to the - instance. Possible values include: 'Proxy', 'Redirect', 'Default' - :type proxy_override: str or - ~azure.mgmt.sql.models.ManagedInstanceProxyOverride - :param timezone_id: Id of the timezone. Allowed values are timezones - supported by Windows. - Windows keeps details on supported timezones, including the id, in - registry under - KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time - Zones. - You can get those registry values via SQL Server by querying SELECT name - AS timezone_id FROM sys.time_zone_info. - List of Ids can also be obtained by executing - [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. - An example of valid timezone id is "Pacific Standard Time" or "W. Europe - Standard Time". - :type timezone_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'fully_qualified_domain_name': {'readonly': True}, - 'state': {'readonly': True}, - 'dns_zone': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, - 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, - 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, - 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, - 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, - 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstance, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - self.fully_qualified_domain_name = None - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.subnet_id = kwargs.get('subnet_id', None) - self.state = None - self.license_type = kwargs.get('license_type', None) - self.v_cores = kwargs.get('v_cores', None) - self.storage_size_in_gb = kwargs.get('storage_size_in_gb', None) - self.collation = kwargs.get('collation', None) - self.dns_zone = None - self.dns_zone_partner = kwargs.get('dns_zone_partner', None) - self.public_data_endpoint_enabled = kwargs.get('public_data_endpoint_enabled', None) - self.proxy_override = kwargs.get('proxy_override', None) - self.timezone_id = kwargs.get('timezone_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability.py deleted file mode 100644 index adeab90a3543..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceEditionCapability(Model): - """The managed server capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The managed server version name. - :vartype name: str - :ivar supported_families: The supported families. - :vartype supported_families: - list[~azure.mgmt.sql.models.ManagedInstanceFamilyCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_families': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_families': {'key': 'supportedFamilies', 'type': '[ManagedInstanceFamilyCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_families = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability_py3.py deleted file mode 100644 index 1627f4652fec..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceEditionCapability(Model): - """The managed server capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The managed server version name. - :vartype name: str - :ivar supported_families: The supported families. - :vartype supported_families: - list[~azure.mgmt.sql.models.ManagedInstanceFamilyCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_families': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_families': {'key': 'supportedFamilies', 'type': '[ManagedInstanceFamilyCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ManagedInstanceEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_families = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector.py deleted file mode 100644 index 87ffcbf35af7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedInstanceEncryptionProtector(ProxyResource): - """The managed instance encryption protector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :vartype kind: str - :param server_key_name: The name of the managed instance key. - :type server_key_name: str - :param server_key_type: Required. The encryption protector type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :ivar uri: The URI of the server key. - :vartype uri: str - :ivar thumbprint: Thumbprint of the server key. - :vartype thumbprint: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True}, - 'uri': {'readonly': True}, - 'thumbprint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceEncryptionProtector, self).__init__(**kwargs) - self.kind = None - self.server_key_name = kwargs.get('server_key_name', None) - self.server_key_type = kwargs.get('server_key_type', None) - self.uri = None - self.thumbprint = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_paged.py deleted file mode 100644 index 39ba69c33e17..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedInstanceEncryptionProtectorPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedInstanceEncryptionProtector ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedInstanceEncryptionProtector]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedInstanceEncryptionProtectorPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_py3.py deleted file mode 100644 index 4d45efcf8c5d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedInstanceEncryptionProtector(ProxyResource): - """The managed instance encryption protector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :vartype kind: str - :param server_key_name: The name of the managed instance key. - :type server_key_name: str - :param server_key_type: Required. The encryption protector type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :ivar uri: The URI of the server key. - :vartype uri: str - :ivar thumbprint: Thumbprint of the server key. - :vartype thumbprint: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True}, - 'uri': {'readonly': True}, - 'thumbprint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, *, server_key_type, server_key_name: str=None, **kwargs) -> None: - super(ManagedInstanceEncryptionProtector, self).__init__(**kwargs) - self.kind = None - self.server_key_name = server_key_name - self.server_key_type = server_key_type - self.uri = None - self.thumbprint = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability.py deleted file mode 100644 index df08ea8764c9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceFamilyCapability(Model): - """The managed server family capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Family name. - :vartype name: str - :ivar sku: SKU name. - :vartype sku: str - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar supported_vcores_values: List of supported virtual cores values. - :vartype supported_vcores_values: - list[~azure.mgmt.sql.models.ManagedInstanceVcoresCapability] - :ivar included_max_size: Included size. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar supported_storage_sizes: Storage size ranges. - :vartype supported_storage_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'supported_vcores_values': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'supported_storage_sizes': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'supported_vcores_values': {'key': 'supportedVcoresValues', 'type': '[ManagedInstanceVcoresCapability]'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'supported_storage_sizes': {'key': 'supportedStorageSizes', 'type': '[MaxSizeRangeCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceFamilyCapability, self).__init__(**kwargs) - self.name = None - self.sku = None - self.supported_license_types = None - self.supported_vcores_values = None - self.included_max_size = None - self.supported_storage_sizes = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability_py3.py deleted file mode 100644 index 5ea36be729d5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceFamilyCapability(Model): - """The managed server family capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Family name. - :vartype name: str - :ivar sku: SKU name. - :vartype sku: str - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar supported_vcores_values: List of supported virtual cores values. - :vartype supported_vcores_values: - list[~azure.mgmt.sql.models.ManagedInstanceVcoresCapability] - :ivar included_max_size: Included size. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar supported_storage_sizes: Storage size ranges. - :vartype supported_storage_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'supported_vcores_values': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'supported_storage_sizes': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'supported_vcores_values': {'key': 'supportedVcoresValues', 'type': '[ManagedInstanceVcoresCapability]'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'supported_storage_sizes': {'key': 'supportedStorageSizes', 'type': '[MaxSizeRangeCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ManagedInstanceFamilyCapability, self).__init__(**kwargs) - self.name = None - self.sku = None - self.supported_license_types = None - self.supported_vcores_values = None - self.included_max_size = None - self.supported_storage_sizes = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key.py deleted file mode 100644 index 5a7ee9724f96..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedInstanceKey(ProxyResource): - """A managed instance key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :vartype kind: str - :param server_key_type: Required. The key type like 'ServiceManaged', - 'AzureKeyVault'. Possible values include: 'ServiceManaged', - 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :param uri: The URI of the key. If the ServerKeyType is AzureKeyVault, - then the URI is required. - :type uri: str - :ivar thumbprint: Thumbprint of the key. - :vartype thumbprint: str - :ivar creation_date: The key creation date. - :vartype creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True}, - 'thumbprint': {'readonly': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceKey, self).__init__(**kwargs) - self.kind = None - self.server_key_type = kwargs.get('server_key_type', None) - self.uri = kwargs.get('uri', None) - self.thumbprint = None - self.creation_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_paged.py deleted file mode 100644 index 8c730f73a383..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedInstanceKeyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedInstanceKey ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedInstanceKey]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedInstanceKeyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_py3.py deleted file mode 100644 index f00bafa838f2..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedInstanceKey(ProxyResource): - """A managed instance key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :vartype kind: str - :param server_key_type: Required. The key type like 'ServiceManaged', - 'AzureKeyVault'. Possible values include: 'ServiceManaged', - 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :param uri: The URI of the key. If the ServerKeyType is AzureKeyVault, - then the URI is required. - :type uri: str - :ivar thumbprint: Thumbprint of the key. - :vartype thumbprint: str - :ivar creation_date: The key creation date. - :vartype creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True}, - 'thumbprint': {'readonly': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, server_key_type, uri: str=None, **kwargs) -> None: - super(ManagedInstanceKey, self).__init__(**kwargs) - self.kind = None - self.server_key_type = server_key_type - self.uri = uri - self.thumbprint = None - self.creation_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_paged.py deleted file mode 100644 index c39881da9f3b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedInstancePaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedInstance ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedInstance]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedInstancePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info.py deleted file mode 100644 index ee49c1db0c62..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstancePairInfo(Model): - """Pairs of Managed Instances in the failover group. - - :param primary_managed_instance_id: Id of Primary Managed Instance in - pair. - :type primary_managed_instance_id: str - :param partner_managed_instance_id: Id of Partner Managed Instance in - pair. - :type partner_managed_instance_id: str - """ - - _attribute_map = { - 'primary_managed_instance_id': {'key': 'primaryManagedInstanceId', 'type': 'str'}, - 'partner_managed_instance_id': {'key': 'partnerManagedInstanceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstancePairInfo, self).__init__(**kwargs) - self.primary_managed_instance_id = kwargs.get('primary_managed_instance_id', None) - self.partner_managed_instance_id = kwargs.get('partner_managed_instance_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info_py3.py deleted file mode 100644 index 49f52752b439..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstancePairInfo(Model): - """Pairs of Managed Instances in the failover group. - - :param primary_managed_instance_id: Id of Primary Managed Instance in - pair. - :type primary_managed_instance_id: str - :param partner_managed_instance_id: Id of Partner Managed Instance in - pair. - :type partner_managed_instance_id: str - """ - - _attribute_map = { - 'primary_managed_instance_id': {'key': 'primaryManagedInstanceId', 'type': 'str'}, - 'partner_managed_instance_id': {'key': 'partnerManagedInstanceId', 'type': 'str'}, - } - - def __init__(self, *, primary_managed_instance_id: str=None, partner_managed_instance_id: str=None, **kwargs) -> None: - super(ManagedInstancePairInfo, self).__init__(**kwargs) - self.primary_managed_instance_id = primary_managed_instance_id - self.partner_managed_instance_id = partner_managed_instance_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_py3.py deleted file mode 100644 index 9233da80dae4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_py3.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class ManagedInstance(TrackedResource): - """An Azure SQL managed instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param identity: The Azure Active Directory identity of the managed - instance. - :type identity: ~azure.mgmt.sql.models.ResourceIdentity - :param sku: Managed instance sku - :type sku: ~azure.mgmt.sql.models.Sku - :ivar fully_qualified_domain_name: The fully qualified domain name of the - managed instance. - :vartype fully_qualified_domain_name: str - :param administrator_login: Administrator username for the managed - instance. Can only be specified when the managed instance is being created - (and is required for creation). - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for managed instance creation). - :type administrator_login_password: str - :param subnet_id: Subnet resource ID for the managed instance. - :type subnet_id: str - :ivar state: The state of the managed instance. - :vartype state: str - :param license_type: The license type. Possible values are - 'LicenseIncluded' and 'BasePrice'. - :type license_type: str - :param v_cores: The number of VCores. - :type v_cores: int - :param storage_size_in_gb: The maximum storage size in GB. - :type storage_size_in_gb: int - :param collation: Collation of the managed instance. - :type collation: str - :ivar dns_zone: The Dns Zone that the managed instance is in. - :vartype dns_zone: str - :param dns_zone_partner: The resource id of another managed instance whose - DNS zone this managed instance will share after creation. - :type dns_zone_partner: str - :param public_data_endpoint_enabled: Whether or not the public data - endpoint is enabled. - :type public_data_endpoint_enabled: bool - :param proxy_override: Connection type used for connecting to the - instance. Possible values include: 'Proxy', 'Redirect', 'Default' - :type proxy_override: str or - ~azure.mgmt.sql.models.ManagedInstanceProxyOverride - :param timezone_id: Id of the timezone. Allowed values are timezones - supported by Windows. - Windows keeps details on supported timezones, including the id, in - registry under - KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time - Zones. - You can get those registry values via SQL Server by querying SELECT name - AS timezone_id FROM sys.time_zone_info. - List of Ids can also be obtained by executing - [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. - An example of valid timezone id is "Pacific Standard Time" or "W. Europe - Standard Time". - :type timezone_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'fully_qualified_domain_name': {'readonly': True}, - 'state': {'readonly': True}, - 'dns_zone': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, - 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, - 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, - 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, - 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, - 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, identity=None, sku=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type: str=None, v_cores: int=None, storage_size_in_gb: int=None, collation: str=None, dns_zone_partner: str=None, public_data_endpoint_enabled: bool=None, proxy_override=None, timezone_id: str=None, **kwargs) -> None: - super(ManagedInstance, self).__init__(location=location, tags=tags, **kwargs) - self.identity = identity - self.sku = sku - self.fully_qualified_domain_name = None - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.subnet_id = subnet_id - self.state = None - self.license_type = license_type - self.v_cores = v_cores - self.storage_size_in_gb = storage_size_in_gb - self.collation = collation - self.dns_zone = None - self.dns_zone_partner = dns_zone_partner - self.public_data_endpoint_enabled = public_data_endpoint_enabled - self.proxy_override = proxy_override - self.timezone_id = timezone_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update.py deleted file mode 100644 index e3c543f0a6b1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceUpdate(Model): - """An update request for an Azure SQL Database managed instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param sku: Managed instance sku - :type sku: ~azure.mgmt.sql.models.Sku - :ivar fully_qualified_domain_name: The fully qualified domain name of the - managed instance. - :vartype fully_qualified_domain_name: str - :param administrator_login: Administrator username for the managed - instance. Can only be specified when the managed instance is being created - (and is required for creation). - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for managed instance creation). - :type administrator_login_password: str - :param subnet_id: Subnet resource ID for the managed instance. - :type subnet_id: str - :ivar state: The state of the managed instance. - :vartype state: str - :param license_type: The license type. Possible values are - 'LicenseIncluded' and 'BasePrice'. - :type license_type: str - :param v_cores: The number of VCores. - :type v_cores: int - :param storage_size_in_gb: The maximum storage size in GB. - :type storage_size_in_gb: int - :param collation: Collation of the managed instance. - :type collation: str - :ivar dns_zone: The Dns Zone that the managed instance is in. - :vartype dns_zone: str - :param dns_zone_partner: The resource id of another managed instance whose - DNS zone this managed instance will share after creation. - :type dns_zone_partner: str - :param public_data_endpoint_enabled: Whether or not the public data - endpoint is enabled. - :type public_data_endpoint_enabled: bool - :param proxy_override: Connection type used for connecting to the - instance. Possible values include: 'Proxy', 'Redirect', 'Default' - :type proxy_override: str or - ~azure.mgmt.sql.models.ManagedInstanceProxyOverride - :param timezone_id: Id of the timezone. Allowed values are timezones - supported by Windows. - Windows keeps details on supported timezones, including the id, in - registry under - KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time - Zones. - You can get those registry values via SQL Server by querying SELECT name - AS timezone_id FROM sys.time_zone_info. - List of Ids can also be obtained by executing - [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. - An example of valid timezone id is "Pacific Standard Time" or "W. Europe - Standard Time". - :type timezone_id: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'fully_qualified_domain_name': {'readonly': True}, - 'state': {'readonly': True}, - 'dns_zone': {'readonly': True}, - } - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, - 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, - 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, - 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, - 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, - 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceUpdate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.fully_qualified_domain_name = None - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.subnet_id = kwargs.get('subnet_id', None) - self.state = None - self.license_type = kwargs.get('license_type', None) - self.v_cores = kwargs.get('v_cores', None) - self.storage_size_in_gb = kwargs.get('storage_size_in_gb', None) - self.collation = kwargs.get('collation', None) - self.dns_zone = None - self.dns_zone_partner = kwargs.get('dns_zone_partner', None) - self.public_data_endpoint_enabled = kwargs.get('public_data_endpoint_enabled', None) - self.proxy_override = kwargs.get('proxy_override', None) - self.timezone_id = kwargs.get('timezone_id', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update_py3.py deleted file mode 100644 index 4a2e6aa0bd78..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update_py3.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceUpdate(Model): - """An update request for an Azure SQL Database managed instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param sku: Managed instance sku - :type sku: ~azure.mgmt.sql.models.Sku - :ivar fully_qualified_domain_name: The fully qualified domain name of the - managed instance. - :vartype fully_qualified_domain_name: str - :param administrator_login: Administrator username for the managed - instance. Can only be specified when the managed instance is being created - (and is required for creation). - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for managed instance creation). - :type administrator_login_password: str - :param subnet_id: Subnet resource ID for the managed instance. - :type subnet_id: str - :ivar state: The state of the managed instance. - :vartype state: str - :param license_type: The license type. Possible values are - 'LicenseIncluded' and 'BasePrice'. - :type license_type: str - :param v_cores: The number of VCores. - :type v_cores: int - :param storage_size_in_gb: The maximum storage size in GB. - :type storage_size_in_gb: int - :param collation: Collation of the managed instance. - :type collation: str - :ivar dns_zone: The Dns Zone that the managed instance is in. - :vartype dns_zone: str - :param dns_zone_partner: The resource id of another managed instance whose - DNS zone this managed instance will share after creation. - :type dns_zone_partner: str - :param public_data_endpoint_enabled: Whether or not the public data - endpoint is enabled. - :type public_data_endpoint_enabled: bool - :param proxy_override: Connection type used for connecting to the - instance. Possible values include: 'Proxy', 'Redirect', 'Default' - :type proxy_override: str or - ~azure.mgmt.sql.models.ManagedInstanceProxyOverride - :param timezone_id: Id of the timezone. Allowed values are timezones - supported by Windows. - Windows keeps details on supported timezones, including the id, in - registry under - KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time - Zones. - You can get those registry values via SQL Server by querying SELECT name - AS timezone_id FROM sys.time_zone_info. - List of Ids can also be obtained by executing - [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. - An example of valid timezone id is "Pacific Standard Time" or "W. Europe - Standard Time". - :type timezone_id: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'fully_qualified_domain_name': {'readonly': True}, - 'state': {'readonly': True}, - 'dns_zone': {'readonly': True}, - } - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, - 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, - 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, - 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, - 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, - 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, sku=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type: str=None, v_cores: int=None, storage_size_in_gb: int=None, collation: str=None, dns_zone_partner: str=None, public_data_endpoint_enabled: bool=None, proxy_override=None, timezone_id: str=None, tags=None, **kwargs) -> None: - super(ManagedInstanceUpdate, self).__init__(**kwargs) - self.sku = sku - self.fully_qualified_domain_name = None - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.subnet_id = subnet_id - self.state = None - self.license_type = license_type - self.v_cores = v_cores - self.storage_size_in_gb = storage_size_in_gb - self.collation = collation - self.dns_zone = None - self.dns_zone_partner = dns_zone_partner - self.public_data_endpoint_enabled = public_data_endpoint_enabled - self.proxy_override = proxy_override - self.timezone_id = timezone_id - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability.py deleted file mode 100644 index 29503dd20ae2..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceVcoresCapability(Model): - """The managed instance virtual cores capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The virtual cores identifier. - :vartype name: str - :ivar value: The virtual cores value. - :vartype value: int - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'int'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceVcoresCapability, self).__init__(**kwargs) - self.name = None - self.value = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability_py3.py deleted file mode 100644 index 23d3bb49d4e8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceVcoresCapability(Model): - """The managed instance virtual cores capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The virtual cores identifier. - :vartype name: str - :ivar value: The virtual cores value. - :vartype value: int - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'int'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ManagedInstanceVcoresCapability, self).__init__(**kwargs) - self.name = None - self.value = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability.py deleted file mode 100644 index 949b1fcf4ad5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceVersionCapability(Model): - """The managed instance capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The server version name. - :vartype name: str - :ivar supported_editions: The list of supported managed instance editions. - :vartype supported_editions: - list[~azure.mgmt.sql.models.ManagedInstanceEditionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_editions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_editions': {'key': 'supportedEditions', 'type': '[ManagedInstanceEditionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceVersionCapability, self).__init__(**kwargs) - self.name = None - self.supported_editions = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability_py3.py deleted file mode 100644 index 6d078061def9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceVersionCapability(Model): - """The managed instance capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The server version name. - :vartype name: str - :ivar supported_editions: The list of supported managed instance editions. - :vartype supported_editions: - list[~azure.mgmt.sql.models.ManagedInstanceEditionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_editions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_editions': {'key': 'supportedEditions', 'type': '[ManagedInstanceEditionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ManagedInstanceVersionCapability, self).__init__(**kwargs) - self.name = None - self.supported_editions = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment.py deleted file mode 100644 index 78d257382e26..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedInstanceVulnerabilityAssessment(ProxyResource): - """A managed instance vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: Required. A blob storage container path to - hold the scan results (e.g. - https://myStorage.blob.core.windows.net/VaScans/). - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_container_path': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = kwargs.get('storage_container_path', None) - self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.recurring_scans = kwargs.get('recurring_scans', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_paged.py deleted file mode 100644 index a7322fe506bf..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedInstanceVulnerabilityAssessmentPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedInstanceVulnerabilityAssessment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedInstanceVulnerabilityAssessment]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedInstanceVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_py3.py deleted file mode 100644 index 6f3da10fea84..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedInstanceVulnerabilityAssessment(ProxyResource): - """A managed instance vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: Required. A blob storage container path to - hold the scan results (e.g. - https://myStorage.blob.core.windows.net/VaScans/). - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_container_path': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, *, storage_container_path: str, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: - super(ManagedInstanceVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = storage_container_path - self.storage_container_sas_key = storage_container_sas_key - self.storage_account_access_key = storage_account_access_key - self.recurring_scans = recurring_scans diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy.py deleted file mode 100644 index e3a0a5062157..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedServerSecurityAlertPolicy(ProxyResource): - """A managed server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ManagedServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_paged.py deleted file mode 100644 index 2d99504f4744..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedServerSecurityAlertPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedServerSecurityAlertPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedServerSecurityAlertPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedServerSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_py3.py deleted file mode 100644 index b16c97c79bea..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedServerSecurityAlertPolicy(ProxyResource): - """A managed server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: - super(ManagedServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability.py deleted file mode 100644 index d103c6f969f7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaxSizeCapability(Model): - """The maximum size capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The maximum size limit (see 'unit' for the units). - :vartype limit: int - :ivar unit: The units that the limit is expressed in. Possible values - include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' - :vartype unit: str or ~azure.mgmt.sql.models.MaxSizeUnit - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'int'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MaxSizeCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability_py3.py deleted file mode 100644 index 54bd7cb00171..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaxSizeCapability(Model): - """The maximum size capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The maximum size limit (see 'unit' for the units). - :vartype limit: int - :ivar unit: The units that the limit is expressed in. Possible values - include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' - :vartype unit: str or ~azure.mgmt.sql.models.MaxSizeUnit - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'int'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MaxSizeCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability.py deleted file mode 100644 index 3ec6c663b559..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaxSizeRangeCapability(Model): - """The maximum size range capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar min_value: Minimum value. - :vartype min_value: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar max_value: Maximum value. - :vartype max_value: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar scale_size: Scale/step size for discrete values between the minimum - value and the maximum value. - :vartype scale_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar log_size: Size of transaction log. - :vartype log_size: ~azure.mgmt.sql.models.LogSizeCapability - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'min_value': {'readonly': True}, - 'max_value': {'readonly': True}, - 'scale_size': {'readonly': True}, - 'log_size': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'min_value': {'key': 'minValue', 'type': 'MaxSizeCapability'}, - 'max_value': {'key': 'maxValue', 'type': 'MaxSizeCapability'}, - 'scale_size': {'key': 'scaleSize', 'type': 'MaxSizeCapability'}, - 'log_size': {'key': 'logSize', 'type': 'LogSizeCapability'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MaxSizeRangeCapability, self).__init__(**kwargs) - self.min_value = None - self.max_value = None - self.scale_size = None - self.log_size = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability_py3.py deleted file mode 100644 index f0f95ebd7f36..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaxSizeRangeCapability(Model): - """The maximum size range capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar min_value: Minimum value. - :vartype min_value: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar max_value: Maximum value. - :vartype max_value: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar scale_size: Scale/step size for discrete values between the minimum - value and the maximum value. - :vartype scale_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar log_size: Size of transaction log. - :vartype log_size: ~azure.mgmt.sql.models.LogSizeCapability - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'min_value': {'readonly': True}, - 'max_value': {'readonly': True}, - 'scale_size': {'readonly': True}, - 'log_size': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'min_value': {'key': 'minValue', 'type': 'MaxSizeCapability'}, - 'max_value': {'key': 'maxValue', 'type': 'MaxSizeCapability'}, - 'scale_size': {'key': 'scaleSize', 'type': 'MaxSizeCapability'}, - 'log_size': {'key': 'logSize', 'type': 'LogSizeCapability'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(MaxSizeRangeCapability, self).__init__(**kwargs) - self.min_value = None - self.max_value = None - self.scale_size = None - self.log_size = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric.py deleted file mode 100644 index 3d3b4b8df154..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Metric(Model): - """Database metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar start_time: The start time for the metric (ISO-8601 format). - :vartype start_time: datetime - :ivar end_time: The end time for the metric (ISO-8601 format). - :vartype end_time: datetime - :ivar time_grain: The time step to be used to summarize the metric values. - :vartype time_grain: str - :ivar unit: The unit of the metric. Possible values include: 'count', - 'bytes', 'seconds', 'percent', 'countPerSecond', 'bytesPerSecond' - :vartype unit: str or ~azure.mgmt.sql.models.UnitType - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.sql.models.MetricName - :ivar metric_values: The metric values for the specified time window and - timestep. - :vartype metric_values: list[~azure.mgmt.sql.models.MetricValue] - """ - - _validation = { - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'unit': {'readonly': True}, - 'name': {'readonly': True}, - 'metric_values': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, - } - - def __init__(self, **kwargs): - super(Metric, self).__init__(**kwargs) - self.start_time = None - self.end_time = None - self.time_grain = None - self.unit = None - self.name = None - self.metric_values = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability.py deleted file mode 100644 index ef43027b61ba..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricAvailability(Model): - """A metric availability value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar retention: The length of retention for the database metric. - :vartype retention: str - :ivar time_grain: The granularity of the database metric. - :vartype time_grain: str - """ - - _validation = { - 'retention': {'readonly': True}, - 'time_grain': {'readonly': True}, - } - - _attribute_map = { - 'retention': {'key': 'retention', 'type': 'str'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MetricAvailability, self).__init__(**kwargs) - self.retention = None - self.time_grain = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability_py3.py deleted file mode 100644 index 6e47c8134a38..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricAvailability(Model): - """A metric availability value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar retention: The length of retention for the database metric. - :vartype retention: str - :ivar time_grain: The granularity of the database metric. - :vartype time_grain: str - """ - - _validation = { - 'retention': {'readonly': True}, - 'time_grain': {'readonly': True}, - } - - _attribute_map = { - 'retention': {'key': 'retention', 'type': 'str'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MetricAvailability, self).__init__(**kwargs) - self.retention = None - self.time_grain = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition.py deleted file mode 100644 index 0b760f50f3ba..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricDefinition(Model): - """A database metric definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.sql.models.MetricName - :ivar primary_aggregation_type: The primary aggregation type defining how - metric values are displayed. Possible values include: 'None', 'Average', - 'Count', 'Minimum', 'Maximum', 'Total' - :vartype primary_aggregation_type: str or - ~azure.mgmt.sql.models.PrimaryAggregationType - :ivar resource_uri: The resource uri of the database. - :vartype resource_uri: str - :ivar unit: The unit of the metric. Possible values include: 'Count', - 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' - :vartype unit: str or ~azure.mgmt.sql.models.UnitDefinitionType - :ivar metric_availabilities: The list of database metric availabilities - for the metric. - :vartype metric_availabilities: - list[~azure.mgmt.sql.models.MetricAvailability] - """ - - _validation = { - 'name': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'resource_uri': {'readonly': True}, - 'unit': {'readonly': True}, - 'metric_availabilities': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'MetricName'}, - 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, - } - - def __init__(self, **kwargs): - super(MetricDefinition, self).__init__(**kwargs) - self.name = None - self.primary_aggregation_type = None - self.resource_uri = None - self.unit = None - self.metric_availabilities = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_paged.py deleted file mode 100644 index 95a01ebf4e85..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class MetricDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`MetricDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[MetricDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(MetricDefinitionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_py3.py deleted file mode 100644 index 33d5fa9e1323..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricDefinition(Model): - """A database metric definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.sql.models.MetricName - :ivar primary_aggregation_type: The primary aggregation type defining how - metric values are displayed. Possible values include: 'None', 'Average', - 'Count', 'Minimum', 'Maximum', 'Total' - :vartype primary_aggregation_type: str or - ~azure.mgmt.sql.models.PrimaryAggregationType - :ivar resource_uri: The resource uri of the database. - :vartype resource_uri: str - :ivar unit: The unit of the metric. Possible values include: 'Count', - 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' - :vartype unit: str or ~azure.mgmt.sql.models.UnitDefinitionType - :ivar metric_availabilities: The list of database metric availabilities - for the metric. - :vartype metric_availabilities: - list[~azure.mgmt.sql.models.MetricAvailability] - """ - - _validation = { - 'name': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'resource_uri': {'readonly': True}, - 'unit': {'readonly': True}, - 'metric_availabilities': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'MetricName'}, - 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, - } - - def __init__(self, **kwargs) -> None: - super(MetricDefinition, self).__init__(**kwargs) - self.name = None - self.primary_aggregation_type = None - self.resource_uri = None - self.unit = None - self.metric_availabilities = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name.py deleted file mode 100644 index 10643031ce5a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricName(Model): - """A database metric name. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: The name of the database metric. - :vartype value: str - :ivar localized_value: The friendly name of the database metric. - :vartype localized_value: str - """ - - _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MetricName, self).__init__(**kwargs) - self.value = None - self.localized_value = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name_py3.py deleted file mode 100644 index 67551bc7aed9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricName(Model): - """A database metric name. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: The name of the database metric. - :vartype value: str - :ivar localized_value: The friendly name of the database metric. - :vartype localized_value: str - """ - - _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MetricName, self).__init__(**kwargs) - self.value = None - self.localized_value = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_paged.py deleted file mode 100644 index 61aa43a2fced..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class MetricPaged(Paged): - """ - A paging container for iterating over a list of :class:`Metric ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Metric]'} - } - - def __init__(self, *args, **kwargs): - - super(MetricPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_py3.py deleted file mode 100644 index 5eae901bca7e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Metric(Model): - """Database metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar start_time: The start time for the metric (ISO-8601 format). - :vartype start_time: datetime - :ivar end_time: The end time for the metric (ISO-8601 format). - :vartype end_time: datetime - :ivar time_grain: The time step to be used to summarize the metric values. - :vartype time_grain: str - :ivar unit: The unit of the metric. Possible values include: 'count', - 'bytes', 'seconds', 'percent', 'countPerSecond', 'bytesPerSecond' - :vartype unit: str or ~azure.mgmt.sql.models.UnitType - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.sql.models.MetricName - :ivar metric_values: The metric values for the specified time window and - timestep. - :vartype metric_values: list[~azure.mgmt.sql.models.MetricValue] - """ - - _validation = { - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'unit': {'readonly': True}, - 'name': {'readonly': True}, - 'metric_values': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, - } - - def __init__(self, **kwargs) -> None: - super(Metric, self).__init__(**kwargs) - self.start_time = None - self.end_time = None - self.time_grain = None - self.unit = None - self.name = None - self.metric_values = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value.py deleted file mode 100644 index a506295d5bfb..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricValue(Model): - """Represents database metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar count: The number of values for the metric. - :vartype count: float - :ivar average: The average value of the metric. - :vartype average: float - :ivar maximum: The max value of the metric. - :vartype maximum: float - :ivar minimum: The min value of the metric. - :vartype minimum: float - :ivar timestamp: The metric timestamp (ISO-8601 format). - :vartype timestamp: datetime - :ivar total: The total value of the metric. - :vartype total: float - """ - - _validation = { - 'count': {'readonly': True}, - 'average': {'readonly': True}, - 'maximum': {'readonly': True}, - 'minimum': {'readonly': True}, - 'timestamp': {'readonly': True}, - 'total': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'float'}, - 'average': {'key': 'average', 'type': 'float'}, - 'maximum': {'key': 'maximum', 'type': 'float'}, - 'minimum': {'key': 'minimum', 'type': 'float'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'total': {'key': 'total', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(MetricValue, self).__init__(**kwargs) - self.count = None - self.average = None - self.maximum = None - self.minimum = None - self.timestamp = None - self.total = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value_py3.py deleted file mode 100644 index a1b027d62864..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricValue(Model): - """Represents database metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar count: The number of values for the metric. - :vartype count: float - :ivar average: The average value of the metric. - :vartype average: float - :ivar maximum: The max value of the metric. - :vartype maximum: float - :ivar minimum: The min value of the metric. - :vartype minimum: float - :ivar timestamp: The metric timestamp (ISO-8601 format). - :vartype timestamp: datetime - :ivar total: The total value of the metric. - :vartype total: float - """ - - _validation = { - 'count': {'readonly': True}, - 'average': {'readonly': True}, - 'maximum': {'readonly': True}, - 'minimum': {'readonly': True}, - 'timestamp': {'readonly': True}, - 'total': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'float'}, - 'average': {'key': 'average', 'type': 'float'}, - 'maximum': {'key': 'maximum', 'type': 'float'}, - 'minimum': {'key': 'minimum', 'type': 'float'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'total': {'key': 'total', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(MetricValue, self).__init__(**kwargs) - self.count = None - self.average = None - self.maximum = None - self.minimum = None - self.timestamp = None - self.total = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation.py deleted file mode 100644 index 09138c4b9086..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """SQL REST API operation definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the operation being performed on this particular - object. - :vartype name: str - :ivar display: The localized display information for this particular - operation / action. - :vartype display: ~azure.mgmt.sql.models.OperationDisplay - :ivar origin: The intended executor of the operation. Possible values - include: 'user', 'system' - :vartype origin: str or ~azure.mgmt.sql.models.OperationOrigin - :ivar properties: Additional descriptions for the operation. - :vartype properties: dict[str, object] - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - 'origin': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{object}'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.origin = None - self.properties = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display.py deleted file mode 100644 index dfbc4a6fcff3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """Display metadata associated with the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: The localized friendly form of the resource provider name. - :vartype provider: str - :ivar resource: The localized friendly form of the resource type related - to this action/operation. - :vartype resource: str - :ivar operation: The localized friendly name for the operation. - :vartype operation: str - :ivar description: The localized friendly description for the operation. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display_py3.py deleted file mode 100644 index 0541321c178c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """Display metadata associated with the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: The localized friendly form of the resource provider name. - :vartype provider: str - :ivar resource: The localized friendly form of the resource type related - to this action/operation. - :vartype resource: str - :ivar operation: The localized friendly name for the operation. - :vartype operation: str - :ivar description: The localized friendly description for the operation. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact.py deleted file mode 100644 index 6b69a122de4c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationImpact(Model): - """The impact of an operation, both in absolute and relative terms. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the impact dimension. - :vartype name: str - :ivar unit: The unit in which estimated impact to dimension is measured. - :vartype unit: str - :ivar change_value_absolute: The absolute impact to dimension. - :vartype change_value_absolute: float - :ivar change_value_relative: The relative impact to dimension (null if not - applicable) - :vartype change_value_relative: float - """ - - _validation = { - 'name': {'readonly': True}, - 'unit': {'readonly': True}, - 'change_value_absolute': {'readonly': True}, - 'change_value_relative': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'change_value_absolute': {'key': 'changeValueAbsolute', 'type': 'float'}, - 'change_value_relative': {'key': 'changeValueRelative', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(OperationImpact, self).__init__(**kwargs) - self.name = None - self.unit = None - self.change_value_absolute = None - self.change_value_relative = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact_py3.py deleted file mode 100644 index f53b9445f998..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationImpact(Model): - """The impact of an operation, both in absolute and relative terms. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the impact dimension. - :vartype name: str - :ivar unit: The unit in which estimated impact to dimension is measured. - :vartype unit: str - :ivar change_value_absolute: The absolute impact to dimension. - :vartype change_value_absolute: float - :ivar change_value_relative: The relative impact to dimension (null if not - applicable) - :vartype change_value_relative: float - """ - - _validation = { - 'name': {'readonly': True}, - 'unit': {'readonly': True}, - 'change_value_absolute': {'readonly': True}, - 'change_value_relative': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'change_value_absolute': {'key': 'changeValueAbsolute', 'type': 'float'}, - 'change_value_relative': {'key': 'changeValueRelative', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationImpact, self).__init__(**kwargs) - self.name = None - self.unit = None - self.change_value_absolute = None - self.change_value_relative = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_paged.py deleted file mode 100644 index ec8c4dc4c1c7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_py3.py deleted file mode 100644 index 4968981d1858..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """SQL REST API operation definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the operation being performed on this particular - object. - :vartype name: str - :ivar display: The localized display information for this particular - operation / action. - :vartype display: ~azure.mgmt.sql.models.OperationDisplay - :ivar origin: The intended executor of the operation. Possible values - include: 'user', 'system' - :vartype origin: str or ~azure.mgmt.sql.models.OperationOrigin - :ivar properties: Additional descriptions for the operation. - :vartype properties: dict[str, object] - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - 'origin': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{object}'}, - } - - def __init__(self, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.origin = None - self.properties = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info.py deleted file mode 100644 index de30bd259f7a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartnerInfo(Model): - """Partner server information for the failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource identifier of the partner server. - :type id: str - :ivar location: Geo location of the partner server. - :vartype location: str - :ivar replication_role: Replication role of the partner server. Possible - values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.FailoverGroupReplicationRole - """ - - _validation = { - 'id': {'required': True}, - 'location': {'readonly': True}, - 'replication_role': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'replication_role': {'key': 'replicationRole', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PartnerInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.location = None - self.replication_role = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info_py3.py deleted file mode 100644 index 0edede88118a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartnerInfo(Model): - """Partner server information for the failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource identifier of the partner server. - :type id: str - :ivar location: Geo location of the partner server. - :vartype location: str - :ivar replication_role: Replication role of the partner server. Possible - values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.FailoverGroupReplicationRole - """ - - _validation = { - 'id': {'required': True}, - 'location': {'readonly': True}, - 'replication_role': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'replication_role': {'key': 'replicationRole', 'type': 'str'}, - } - - def __init__(self, *, id: str, **kwargs) -> None: - super(PartnerInfo, self).__init__(**kwargs) - self.id = id - self.location = None - self.replication_role = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info.py deleted file mode 100644 index 4d8e2688acb1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartnerRegionInfo(Model): - """Partner region information for the failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param location: Geo location of the partner managed instances. - :type location: str - :ivar replication_role: Replication role of the partner managed instances. - Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole - """ - - _validation = { - 'replication_role': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'replication_role': {'key': 'replicationRole', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PartnerRegionInfo, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.replication_role = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info_py3.py deleted file mode 100644 index 76c52b49c0ba..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartnerRegionInfo(Model): - """Partner region information for the failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param location: Geo location of the partner managed instances. - :type location: str - :ivar replication_role: Replication role of the partner managed instances. - Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole - """ - - _validation = { - 'replication_role': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'replication_role': {'key': 'replicationRole', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, **kwargs) -> None: - super(PartnerRegionInfo, self).__init__(**kwargs) - self.location = location - self.replication_role = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability.py deleted file mode 100644 index 2463e1818718..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PerformanceLevelCapability(Model): - """The performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: Performance level value. - :vartype value: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - """ - - _validation = { - 'value': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PerformanceLevelCapability, self).__init__(**kwargs) - self.value = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability_py3.py deleted file mode 100644 index 96119e14568d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PerformanceLevelCapability(Model): - """The performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: Performance level value. - :vartype value: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - """ - - _validation = { - 'value': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(PerformanceLevelCapability, self).__init__(**kwargs) - self.value = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource.py deleted file mode 100644 index 21fea4f24360..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ProxyResource(Resource): - """ARM proxy resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProxyResource, self).__init__(**kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource_py3.py deleted file mode 100644 index 707323dfc134..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ProxyResource(Resource): - """ARM proxy resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ProxyResource, self).__init__(**kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool.py deleted file mode 100644 index 0d80a9a31ac9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RecommendedElasticPool(ProxyResource): - """Represents a recommended elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_edition: The edition of the recommended elastic pool. The - ElasticPoolEdition enumeration contains all the valid editions. Possible - values include: 'Basic', 'Standard', 'Premium' - :vartype database_edition: str or - ~azure.mgmt.sql.models.ElasticPoolEdition - :param dtu: The DTU for the recommended elastic pool. - :type dtu: float - :param database_dtu_min: The minimum DTU for the database. - :type database_dtu_min: float - :param database_dtu_max: The maximum DTU for the database. - :type database_dtu_max: float - :param storage_mb: Gets storage size in megabytes. - :type storage_mb: float - :ivar observation_period_start: The observation period start (ISO8601 - format). - :vartype observation_period_start: datetime - :ivar observation_period_end: The observation period start (ISO8601 - format). - :vartype observation_period_end: datetime - :ivar max_observed_dtu: Gets maximum observed DTU. - :vartype max_observed_dtu: float - :ivar max_observed_storage_mb: Gets maximum observed storage in megabytes. - :vartype max_observed_storage_mb: float - :ivar databases: The list of databases in this pool. Expanded property - :vartype databases: list[~azure.mgmt.sql.models.TrackedResource] - :ivar metrics: The list of databases housed in the server. Expanded - property - :vartype metrics: - list[~azure.mgmt.sql.models.RecommendedElasticPoolMetric] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_edition': {'readonly': True}, - 'observation_period_start': {'readonly': True}, - 'observation_period_end': {'readonly': True}, - 'max_observed_dtu': {'readonly': True}, - 'max_observed_storage_mb': {'readonly': True}, - 'databases': {'readonly': True}, - 'metrics': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'dtu': {'key': 'properties.dtu', 'type': 'float'}, - 'database_dtu_min': {'key': 'properties.databaseDtuMin', 'type': 'float'}, - 'database_dtu_max': {'key': 'properties.databaseDtuMax', 'type': 'float'}, - 'storage_mb': {'key': 'properties.storageMB', 'type': 'float'}, - 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, - 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, - 'max_observed_dtu': {'key': 'properties.maxObservedDtu', 'type': 'float'}, - 'max_observed_storage_mb': {'key': 'properties.maxObservedStorageMB', 'type': 'float'}, - 'databases': {'key': 'properties.databases', 'type': '[TrackedResource]'}, - 'metrics': {'key': 'properties.metrics', 'type': '[RecommendedElasticPoolMetric]'}, - } - - def __init__(self, **kwargs): - super(RecommendedElasticPool, self).__init__(**kwargs) - self.database_edition = None - self.dtu = kwargs.get('dtu', None) - self.database_dtu_min = kwargs.get('database_dtu_min', None) - self.database_dtu_max = kwargs.get('database_dtu_max', None) - self.storage_mb = kwargs.get('storage_mb', None) - self.observation_period_start = None - self.observation_period_end = None - self.max_observed_dtu = None - self.max_observed_storage_mb = None - self.databases = None - self.metrics = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric.py deleted file mode 100644 index 9ed07ced53d7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecommendedElasticPoolMetric(Model): - """Represents recommended elastic pool metric. - - :param date_time_property: The time of metric (ISO8601 format). - :type date_time_property: datetime - :param dtu: Gets or sets the DTUs (Database Transaction Units). See - https://azure.microsoft.com/documentation/articles/sql-database-what-is-a-dtu/ - :type dtu: float - :param size_gb: Gets or sets size in gigabytes. - :type size_gb: float - """ - - _attribute_map = { - 'date_time_property': {'key': 'dateTime', 'type': 'iso-8601'}, - 'dtu': {'key': 'dtu', 'type': 'float'}, - 'size_gb': {'key': 'sizeGB', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(RecommendedElasticPoolMetric, self).__init__(**kwargs) - self.date_time_property = kwargs.get('date_time_property', None) - self.dtu = kwargs.get('dtu', None) - self.size_gb = kwargs.get('size_gb', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_paged.py deleted file mode 100644 index a5106f989535..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RecommendedElasticPoolMetricPaged(Paged): - """ - A paging container for iterating over a list of :class:`RecommendedElasticPoolMetric ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RecommendedElasticPoolMetric]'} - } - - def __init__(self, *args, **kwargs): - - super(RecommendedElasticPoolMetricPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_py3.py deleted file mode 100644 index d33210bf6e58..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecommendedElasticPoolMetric(Model): - """Represents recommended elastic pool metric. - - :param date_time_property: The time of metric (ISO8601 format). - :type date_time_property: datetime - :param dtu: Gets or sets the DTUs (Database Transaction Units). See - https://azure.microsoft.com/documentation/articles/sql-database-what-is-a-dtu/ - :type dtu: float - :param size_gb: Gets or sets size in gigabytes. - :type size_gb: float - """ - - _attribute_map = { - 'date_time_property': {'key': 'dateTime', 'type': 'iso-8601'}, - 'dtu': {'key': 'dtu', 'type': 'float'}, - 'size_gb': {'key': 'sizeGB', 'type': 'float'}, - } - - def __init__(self, *, date_time_property=None, dtu: float=None, size_gb: float=None, **kwargs) -> None: - super(RecommendedElasticPoolMetric, self).__init__(**kwargs) - self.date_time_property = date_time_property - self.dtu = dtu - self.size_gb = size_gb diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_paged.py deleted file mode 100644 index ceb235126fbe..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RecommendedElasticPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`RecommendedElasticPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RecommendedElasticPool]'} - } - - def __init__(self, *args, **kwargs): - - super(RecommendedElasticPoolPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_py3.py deleted file mode 100644 index 2f8a14d6abfa..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_py3.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RecommendedElasticPool(ProxyResource): - """Represents a recommended elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_edition: The edition of the recommended elastic pool. The - ElasticPoolEdition enumeration contains all the valid editions. Possible - values include: 'Basic', 'Standard', 'Premium' - :vartype database_edition: str or - ~azure.mgmt.sql.models.ElasticPoolEdition - :param dtu: The DTU for the recommended elastic pool. - :type dtu: float - :param database_dtu_min: The minimum DTU for the database. - :type database_dtu_min: float - :param database_dtu_max: The maximum DTU for the database. - :type database_dtu_max: float - :param storage_mb: Gets storage size in megabytes. - :type storage_mb: float - :ivar observation_period_start: The observation period start (ISO8601 - format). - :vartype observation_period_start: datetime - :ivar observation_period_end: The observation period start (ISO8601 - format). - :vartype observation_period_end: datetime - :ivar max_observed_dtu: Gets maximum observed DTU. - :vartype max_observed_dtu: float - :ivar max_observed_storage_mb: Gets maximum observed storage in megabytes. - :vartype max_observed_storage_mb: float - :ivar databases: The list of databases in this pool. Expanded property - :vartype databases: list[~azure.mgmt.sql.models.TrackedResource] - :ivar metrics: The list of databases housed in the server. Expanded - property - :vartype metrics: - list[~azure.mgmt.sql.models.RecommendedElasticPoolMetric] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_edition': {'readonly': True}, - 'observation_period_start': {'readonly': True}, - 'observation_period_end': {'readonly': True}, - 'max_observed_dtu': {'readonly': True}, - 'max_observed_storage_mb': {'readonly': True}, - 'databases': {'readonly': True}, - 'metrics': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'dtu': {'key': 'properties.dtu', 'type': 'float'}, - 'database_dtu_min': {'key': 'properties.databaseDtuMin', 'type': 'float'}, - 'database_dtu_max': {'key': 'properties.databaseDtuMax', 'type': 'float'}, - 'storage_mb': {'key': 'properties.storageMB', 'type': 'float'}, - 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, - 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, - 'max_observed_dtu': {'key': 'properties.maxObservedDtu', 'type': 'float'}, - 'max_observed_storage_mb': {'key': 'properties.maxObservedStorageMB', 'type': 'float'}, - 'databases': {'key': 'properties.databases', 'type': '[TrackedResource]'}, - 'metrics': {'key': 'properties.metrics', 'type': '[RecommendedElasticPoolMetric]'}, - } - - def __init__(self, *, dtu: float=None, database_dtu_min: float=None, database_dtu_max: float=None, storage_mb: float=None, **kwargs) -> None: - super(RecommendedElasticPool, self).__init__(**kwargs) - self.database_edition = None - self.dtu = dtu - self.database_dtu_min = database_dtu_min - self.database_dtu_max = database_dtu_max - self.storage_mb = storage_mb - self.observation_period_start = None - self.observation_period_end = None - self.max_observed_dtu = None - self.max_observed_storage_mb = None - self.databases = None - self.metrics = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index.py deleted file mode 100644 index df1eba91f84f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RecommendedIndex(ProxyResource): - """Represents a database recommended index. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar action: The proposed index action. You can create a missing index, - drop an unused index, or rebuild an existing index to improve its - performance. Possible values include: 'Create', 'Drop', 'Rebuild' - :vartype action: str or ~azure.mgmt.sql.models.RecommendedIndexAction - :ivar state: The current recommendation state. Possible values include: - 'Active', 'Pending', 'Executing', 'Verifying', 'Pending Revert', - 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success' - :vartype state: str or ~azure.mgmt.sql.models.RecommendedIndexState - :ivar created: The UTC datetime showing when this resource was created - (ISO8601 format). - :vartype created: datetime - :ivar last_modified: The UTC datetime of when was this resource last - changed (ISO8601 format). - :vartype last_modified: datetime - :ivar index_type: The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, - CLUSTERED COLUMNSTORE). Possible values include: 'CLUSTERED', - 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED COLUMNSTORE' - :vartype index_type: str or ~azure.mgmt.sql.models.RecommendedIndexType - :ivar schema: The schema where table to build index over resides - :vartype schema: str - :ivar table: The table on which to build index. - :vartype table: str - :ivar columns: Columns over which to build index - :vartype columns: list[str] - :ivar included_columns: The list of column names to be included in the - index - :vartype included_columns: list[str] - :ivar index_script: The full build index script - :vartype index_script: str - :ivar estimated_impact: The estimated impact of doing recommended index - action. - :vartype estimated_impact: list[~azure.mgmt.sql.models.OperationImpact] - :ivar reported_impact: The values reported after index action is complete. - :vartype reported_impact: list[~azure.mgmt.sql.models.OperationImpact] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'action': {'readonly': True}, - 'state': {'readonly': True}, - 'created': {'readonly': True}, - 'last_modified': {'readonly': True}, - 'index_type': {'readonly': True}, - 'schema': {'readonly': True}, - 'table': {'readonly': True}, - 'columns': {'readonly': True}, - 'included_columns': {'readonly': True}, - 'index_script': {'readonly': True}, - 'estimated_impact': {'readonly': True}, - 'reported_impact': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'action': {'key': 'properties.action', 'type': 'RecommendedIndexAction'}, - 'state': {'key': 'properties.state', 'type': 'RecommendedIndexState'}, - 'created': {'key': 'properties.created', 'type': 'iso-8601'}, - 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, - 'index_type': {'key': 'properties.indexType', 'type': 'RecommendedIndexType'}, - 'schema': {'key': 'properties.schema', 'type': 'str'}, - 'table': {'key': 'properties.table', 'type': 'str'}, - 'columns': {'key': 'properties.columns', 'type': '[str]'}, - 'included_columns': {'key': 'properties.includedColumns', 'type': '[str]'}, - 'index_script': {'key': 'properties.indexScript', 'type': 'str'}, - 'estimated_impact': {'key': 'properties.estimatedImpact', 'type': '[OperationImpact]'}, - 'reported_impact': {'key': 'properties.reportedImpact', 'type': '[OperationImpact]'}, - } - - def __init__(self, **kwargs): - super(RecommendedIndex, self).__init__(**kwargs) - self.action = None - self.state = None - self.created = None - self.last_modified = None - self.index_type = None - self.schema = None - self.table = None - self.columns = None - self.included_columns = None - self.index_script = None - self.estimated_impact = None - self.reported_impact = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index_py3.py deleted file mode 100644 index 5aea5620371e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index_py3.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RecommendedIndex(ProxyResource): - """Represents a database recommended index. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar action: The proposed index action. You can create a missing index, - drop an unused index, or rebuild an existing index to improve its - performance. Possible values include: 'Create', 'Drop', 'Rebuild' - :vartype action: str or ~azure.mgmt.sql.models.RecommendedIndexAction - :ivar state: The current recommendation state. Possible values include: - 'Active', 'Pending', 'Executing', 'Verifying', 'Pending Revert', - 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success' - :vartype state: str or ~azure.mgmt.sql.models.RecommendedIndexState - :ivar created: The UTC datetime showing when this resource was created - (ISO8601 format). - :vartype created: datetime - :ivar last_modified: The UTC datetime of when was this resource last - changed (ISO8601 format). - :vartype last_modified: datetime - :ivar index_type: The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, - CLUSTERED COLUMNSTORE). Possible values include: 'CLUSTERED', - 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED COLUMNSTORE' - :vartype index_type: str or ~azure.mgmt.sql.models.RecommendedIndexType - :ivar schema: The schema where table to build index over resides - :vartype schema: str - :ivar table: The table on which to build index. - :vartype table: str - :ivar columns: Columns over which to build index - :vartype columns: list[str] - :ivar included_columns: The list of column names to be included in the - index - :vartype included_columns: list[str] - :ivar index_script: The full build index script - :vartype index_script: str - :ivar estimated_impact: The estimated impact of doing recommended index - action. - :vartype estimated_impact: list[~azure.mgmt.sql.models.OperationImpact] - :ivar reported_impact: The values reported after index action is complete. - :vartype reported_impact: list[~azure.mgmt.sql.models.OperationImpact] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'action': {'readonly': True}, - 'state': {'readonly': True}, - 'created': {'readonly': True}, - 'last_modified': {'readonly': True}, - 'index_type': {'readonly': True}, - 'schema': {'readonly': True}, - 'table': {'readonly': True}, - 'columns': {'readonly': True}, - 'included_columns': {'readonly': True}, - 'index_script': {'readonly': True}, - 'estimated_impact': {'readonly': True}, - 'reported_impact': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'action': {'key': 'properties.action', 'type': 'RecommendedIndexAction'}, - 'state': {'key': 'properties.state', 'type': 'RecommendedIndexState'}, - 'created': {'key': 'properties.created', 'type': 'iso-8601'}, - 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, - 'index_type': {'key': 'properties.indexType', 'type': 'RecommendedIndexType'}, - 'schema': {'key': 'properties.schema', 'type': 'str'}, - 'table': {'key': 'properties.table', 'type': 'str'}, - 'columns': {'key': 'properties.columns', 'type': '[str]'}, - 'included_columns': {'key': 'properties.includedColumns', 'type': '[str]'}, - 'index_script': {'key': 'properties.indexScript', 'type': 'str'}, - 'estimated_impact': {'key': 'properties.estimatedImpact', 'type': '[OperationImpact]'}, - 'reported_impact': {'key': 'properties.reportedImpact', 'type': '[OperationImpact]'}, - } - - def __init__(self, **kwargs) -> None: - super(RecommendedIndex, self).__init__(**kwargs) - self.action = None - self.state = None - self.created = None - self.last_modified = None - self.index_type = None - self.schema = None - self.table = None - self.columns = None - self.included_columns = None - self.index_script = None - self.estimated_impact = None - self.reported_impact = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database.py deleted file mode 100644 index 0d3b630ce18d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RecoverableDatabase(ProxyResource): - """A recoverable database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar edition: The edition of the database - :vartype edition: str - :ivar service_level_objective: The service level objective name of the - database - :vartype service_level_objective: str - :ivar elastic_pool_name: The elastic pool name of the database - :vartype elastic_pool_name: str - :ivar last_available_backup_date: The last available backup date of the - database (ISO8601 format) - :vartype last_available_backup_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'edition': {'readonly': True}, - 'service_level_objective': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'last_available_backup_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'edition': {'key': 'properties.edition', 'type': 'str'}, - 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(RecoverableDatabase, self).__init__(**kwargs) - self.edition = None - self.service_level_objective = None - self.elastic_pool_name = None - self.last_available_backup_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_paged.py deleted file mode 100644 index cf4cde8ae7e0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RecoverableDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`RecoverableDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RecoverableDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(RecoverableDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_py3.py deleted file mode 100644 index 8eb9d5510689..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RecoverableDatabase(ProxyResource): - """A recoverable database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar edition: The edition of the database - :vartype edition: str - :ivar service_level_objective: The service level objective name of the - database - :vartype service_level_objective: str - :ivar elastic_pool_name: The elastic pool name of the database - :vartype elastic_pool_name: str - :ivar last_available_backup_date: The last available backup date of the - database (ISO8601 format) - :vartype last_available_backup_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'edition': {'readonly': True}, - 'service_level_objective': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'last_available_backup_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'edition': {'key': 'properties.edition', 'type': 'str'}, - 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(RecoverableDatabase, self).__init__(**kwargs) - self.edition = None - self.service_level_objective = None - self.elastic_pool_name = None - self.last_available_backup_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database.py deleted file mode 100644 index cd6adeaeac89..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RecoverableManagedDatabase(ProxyResource): - """A recoverable managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar last_available_backup_date: The last available backup date. - :vartype last_available_backup_date: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'last_available_backup_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RecoverableManagedDatabase, self).__init__(**kwargs) - self.last_available_backup_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_paged.py deleted file mode 100644 index 9c3a35713275..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RecoverableManagedDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`RecoverableManagedDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RecoverableManagedDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(RecoverableManagedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_py3.py deleted file mode 100644 index b6f295aceffb..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RecoverableManagedDatabase(ProxyResource): - """A recoverable managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar last_available_backup_date: The last available backup date. - :vartype last_available_backup_date: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'last_available_backup_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(RecoverableManagedDatabase, self).__init__(**kwargs) - self.last_available_backup_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link.py deleted file mode 100644 index 450161ab6c9b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ReplicationLink(ProxyResource): - """Represents a database replication link. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Location of the server that contains this firewall rule. - :vartype location: str - :ivar is_termination_allowed: Legacy value indicating whether termination - is allowed. Currently always returns true. - :vartype is_termination_allowed: bool - :ivar replication_mode: Replication mode of this replication link. - :vartype replication_mode: str - :ivar partner_server: The name of the server hosting the partner database. - :vartype partner_server: str - :ivar partner_database: The name of the partner database. - :vartype partner_database: str - :ivar partner_location: The Azure Region of the partner database. - :vartype partner_location: str - :ivar role: The role of the database in the replication link. Possible - values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', - 'Copy' - :vartype role: str or ~azure.mgmt.sql.models.ReplicationRole - :ivar partner_role: The role of the partner database in the replication - link. Possible values include: 'Primary', 'Secondary', - 'NonReadableSecondary', 'Source', 'Copy' - :vartype partner_role: str or ~azure.mgmt.sql.models.ReplicationRole - :ivar start_time: The start time for the replication link. - :vartype start_time: datetime - :ivar percent_complete: The percentage of seeding complete for the - replication link. - :vartype percent_complete: int - :ivar replication_state: The replication state for the replication link. - Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP', 'SUSPENDED' - :vartype replication_state: str or ~azure.mgmt.sql.models.ReplicationState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'is_termination_allowed': {'readonly': True}, - 'replication_mode': {'readonly': True}, - 'partner_server': {'readonly': True}, - 'partner_database': {'readonly': True}, - 'partner_location': {'readonly': True}, - 'role': {'readonly': True}, - 'partner_role': {'readonly': True}, - 'start_time': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'replication_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'is_termination_allowed': {'key': 'properties.isTerminationAllowed', 'type': 'bool'}, - 'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'}, - 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, - 'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'}, - 'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'}, - 'role': {'key': 'properties.role', 'type': 'ReplicationRole'}, - 'partner_role': {'key': 'properties.partnerRole', 'type': 'ReplicationRole'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ReplicationLink, self).__init__(**kwargs) - self.location = None - self.is_termination_allowed = None - self.replication_mode = None - self.partner_server = None - self.partner_database = None - self.partner_location = None - self.role = None - self.partner_role = None - self.start_time = None - self.percent_complete = None - self.replication_state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_paged.py deleted file mode 100644 index 18b96c9e0e3c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ReplicationLinkPaged(Paged): - """ - A paging container for iterating over a list of :class:`ReplicationLink ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ReplicationLink]'} - } - - def __init__(self, *args, **kwargs): - - super(ReplicationLinkPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_py3.py deleted file mode 100644 index 740748f154b2..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_py3.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ReplicationLink(ProxyResource): - """Represents a database replication link. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Location of the server that contains this firewall rule. - :vartype location: str - :ivar is_termination_allowed: Legacy value indicating whether termination - is allowed. Currently always returns true. - :vartype is_termination_allowed: bool - :ivar replication_mode: Replication mode of this replication link. - :vartype replication_mode: str - :ivar partner_server: The name of the server hosting the partner database. - :vartype partner_server: str - :ivar partner_database: The name of the partner database. - :vartype partner_database: str - :ivar partner_location: The Azure Region of the partner database. - :vartype partner_location: str - :ivar role: The role of the database in the replication link. Possible - values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', - 'Copy' - :vartype role: str or ~azure.mgmt.sql.models.ReplicationRole - :ivar partner_role: The role of the partner database in the replication - link. Possible values include: 'Primary', 'Secondary', - 'NonReadableSecondary', 'Source', 'Copy' - :vartype partner_role: str or ~azure.mgmt.sql.models.ReplicationRole - :ivar start_time: The start time for the replication link. - :vartype start_time: datetime - :ivar percent_complete: The percentage of seeding complete for the - replication link. - :vartype percent_complete: int - :ivar replication_state: The replication state for the replication link. - Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP', 'SUSPENDED' - :vartype replication_state: str or ~azure.mgmt.sql.models.ReplicationState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'is_termination_allowed': {'readonly': True}, - 'replication_mode': {'readonly': True}, - 'partner_server': {'readonly': True}, - 'partner_database': {'readonly': True}, - 'partner_location': {'readonly': True}, - 'role': {'readonly': True}, - 'partner_role': {'readonly': True}, - 'start_time': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'replication_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'is_termination_allowed': {'key': 'properties.isTerminationAllowed', 'type': 'bool'}, - 'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'}, - 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, - 'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'}, - 'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'}, - 'role': {'key': 'properties.role', 'type': 'ReplicationRole'}, - 'partner_role': {'key': 'properties.partnerRole', 'type': 'ReplicationRole'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ReplicationLink, self).__init__(**kwargs) - self.location = None - self.is_termination_allowed = None - self.replication_mode = None - self.partner_server = None - self.partner_database = None - self.partner_location = None - self.role = None - self.partner_role = None - self.start_time = None - self.percent_complete = None - self.replication_state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource.py deleted file mode 100644 index fc92549d32e9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """ARM resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity.py deleted file mode 100644 index 57a9e4b4a161..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceIdentity(Model): - """Azure Active Directory identity configuration for a resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The Azure Active Directory principal id. - :vartype principal_id: str - :param type: The identity type. Set this to 'SystemAssigned' in order to - automatically create and assign an Azure Active Directory principal for - the resource. Possible values include: 'SystemAssigned' - :type type: str or ~azure.mgmt.sql.models.IdentityType - :ivar tenant_id: The Azure Active Directory tenant id. - :vartype tenant_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceIdentity, self).__init__(**kwargs) - self.principal_id = None - self.type = kwargs.get('type', None) - self.tenant_id = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity_py3.py deleted file mode 100644 index 3b1d8d90f100..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceIdentity(Model): - """Azure Active Directory identity configuration for a resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The Azure Active Directory principal id. - :vartype principal_id: str - :param type: The identity type. Set this to 'SystemAssigned' in order to - automatically create and assign an Azure Active Directory principal for - the resource. Possible values include: 'SystemAssigned' - :type type: str or ~azure.mgmt.sql.models.IdentityType - :ivar tenant_id: The Azure Active Directory tenant id. - :vartype tenant_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ResourceIdentity, self).__init__(**kwargs) - self.principal_id = None - self.type = type - self.tenant_id = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition.py deleted file mode 100644 index 2c933120d7c8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceMoveDefinition(Model): - """Contains the information necessary to perform a resource move (rename). - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The target ID for the resource - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceMoveDefinition, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition_py3.py deleted file mode 100644 index f6ce2ac0f628..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceMoveDefinition(Model): - """Contains the information necessary to perform a resource move (rename). - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The target ID for the resource - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str, **kwargs) -> None: - super(ResourceMoveDefinition, self).__init__(**kwargs) - self.id = id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_py3.py deleted file mode 100644 index aedc5cfaf0b9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """ARM resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database.py deleted file mode 100644 index 8e419fb0b50b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RestorableDroppedDatabase(ProxyResource): - """A restorable dropped database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: The geo-location where the resource lives - :vartype location: str - :ivar database_name: The name of the database - :vartype database_name: str - :ivar edition: The edition of the database - :vartype edition: str - :ivar max_size_bytes: The max size in bytes of the database - :vartype max_size_bytes: str - :ivar service_level_objective: The service level objective name of the - database - :vartype service_level_objective: str - :ivar elastic_pool_name: The elastic pool name of the database - :vartype elastic_pool_name: str - :ivar creation_date: The creation date of the database (ISO8601 format) - :vartype creation_date: datetime - :ivar deletion_date: The deletion date of the database (ISO8601 format) - :vartype deletion_date: datetime - :ivar earliest_restore_date: The earliest restore date of the database - (ISO8601 format) - :vartype earliest_restore_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'database_name': {'readonly': True}, - 'edition': {'readonly': True}, - 'max_size_bytes': {'readonly': True}, - 'service_level_objective': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'edition': {'key': 'properties.edition', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'str'}, - 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(RestorableDroppedDatabase, self).__init__(**kwargs) - self.location = None - self.database_name = None - self.edition = None - self.max_size_bytes = None - self.service_level_objective = None - self.elastic_pool_name = None - self.creation_date = None - self.deletion_date = None - self.earliest_restore_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_paged.py deleted file mode 100644 index b0eb93010942..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RestorableDroppedDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`RestorableDroppedDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RestorableDroppedDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(RestorableDroppedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_py3.py deleted file mode 100644 index 0e4a5f45ec89..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_py3.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RestorableDroppedDatabase(ProxyResource): - """A restorable dropped database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: The geo-location where the resource lives - :vartype location: str - :ivar database_name: The name of the database - :vartype database_name: str - :ivar edition: The edition of the database - :vartype edition: str - :ivar max_size_bytes: The max size in bytes of the database - :vartype max_size_bytes: str - :ivar service_level_objective: The service level objective name of the - database - :vartype service_level_objective: str - :ivar elastic_pool_name: The elastic pool name of the database - :vartype elastic_pool_name: str - :ivar creation_date: The creation date of the database (ISO8601 format) - :vartype creation_date: datetime - :ivar deletion_date: The deletion date of the database (ISO8601 format) - :vartype deletion_date: datetime - :ivar earliest_restore_date: The earliest restore date of the database - (ISO8601 format) - :vartype earliest_restore_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'database_name': {'readonly': True}, - 'edition': {'readonly': True}, - 'max_size_bytes': {'readonly': True}, - 'service_level_objective': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'edition': {'key': 'properties.edition', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'str'}, - 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(RestorableDroppedDatabase, self).__init__(**kwargs) - self.location = None - self.database_name = None - self.edition = None - self.max_size_bytes = None - self.service_level_objective = None - self.elastic_pool_name = None - self.creation_date = None - self.deletion_date = None - self.earliest_restore_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database.py deleted file mode 100644 index e23713aa2a2d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class RestorableDroppedManagedDatabase(TrackedResource): - """A restorable dropped managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :ivar database_name: The name of the database. - :vartype database_name: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar deletion_date: The deletion date of the database (ISO8601 format). - :vartype deletion_date: datetime - :ivar earliest_restore_date: The earliest restore date of the database - (ISO8601 format). - :vartype earliest_restore_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'database_name': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(RestorableDroppedManagedDatabase, self).__init__(**kwargs) - self.database_name = None - self.creation_date = None - self.deletion_date = None - self.earliest_restore_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_paged.py deleted file mode 100644 index d6e432c2c351..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RestorableDroppedManagedDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`RestorableDroppedManagedDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RestorableDroppedManagedDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(RestorableDroppedManagedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_py3.py deleted file mode 100644 index 7997b13a21ce..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class RestorableDroppedManagedDatabase(TrackedResource): - """A restorable dropped managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :ivar database_name: The name of the database. - :vartype database_name: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar deletion_date: The deletion date of the database (ISO8601 format). - :vartype deletion_date: datetime - :ivar earliest_restore_date: The earliest restore date of the database - (ISO8601 format). - :vartype earliest_restore_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'database_name': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(RestorableDroppedManagedDatabase, self).__init__(location=location, tags=tags, **kwargs) - self.database_name = None - self.creation_date = None - self.deletion_date = None - self.earliest_restore_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point.py deleted file mode 100644 index 86cf0382ffc8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RestorePoint(ProxyResource): - """Database restore points. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar restore_point_type: The type of restore point. Possible values - include: 'CONTINUOUS', 'DISCRETE' - :vartype restore_point_type: str or - ~azure.mgmt.sql.models.RestorePointType - :ivar earliest_restore_date: The earliest time to which this database can - be restored - :vartype earliest_restore_date: datetime - :ivar restore_point_creation_date: The time the backup was taken - :vartype restore_point_creation_date: datetime - :ivar restore_point_label: The label of restore point for backup request - by user - :vartype restore_point_label: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'restore_point_type': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'restore_point_creation_date': {'readonly': True}, - 'restore_point_label': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'restore_point_type': {'key': 'properties.restorePointType', 'type': 'RestorePointType'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, - 'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RestorePoint, self).__init__(**kwargs) - self.location = None - self.restore_point_type = None - self.earliest_restore_date = None - self.restore_point_creation_date = None - self.restore_point_label = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_paged.py deleted file mode 100644 index b77cde666dd0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RestorePointPaged(Paged): - """ - A paging container for iterating over a list of :class:`RestorePoint ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RestorePoint]'} - } - - def __init__(self, *args, **kwargs): - - super(RestorePointPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_py3.py deleted file mode 100644 index 886f576a4575..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RestorePoint(ProxyResource): - """Database restore points. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar restore_point_type: The type of restore point. Possible values - include: 'CONTINUOUS', 'DISCRETE' - :vartype restore_point_type: str or - ~azure.mgmt.sql.models.RestorePointType - :ivar earliest_restore_date: The earliest time to which this database can - be restored - :vartype earliest_restore_date: datetime - :ivar restore_point_creation_date: The time the backup was taken - :vartype restore_point_creation_date: datetime - :ivar restore_point_label: The label of restore point for backup request - by user - :vartype restore_point_label: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'restore_point_type': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'restore_point_creation_date': {'readonly': True}, - 'restore_point_label': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'restore_point_type': {'key': 'properties.restorePointType', 'type': 'RestorePointType'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, - 'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(RestorePoint, self).__init__(**kwargs) - self.location = None - self.restore_point_type = None - self.earliest_restore_date = None - self.restore_point_creation_date = None - self.restore_point_label = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label.py deleted file mode 100644 index a076a11634e6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SensitivityLabel(ProxyResource): - """A sensitivity label. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param label_name: The label name. - :type label_name: str - :param label_id: The label ID. - :type label_id: str - :param information_type: The information type. - :type information_type: str - :param information_type_id: The information type ID. - :type information_type_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'label_name': {'key': 'properties.labelName', 'type': 'str'}, - 'label_id': {'key': 'properties.labelId', 'type': 'str'}, - 'information_type': {'key': 'properties.informationType', 'type': 'str'}, - 'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SensitivityLabel, self).__init__(**kwargs) - self.label_name = kwargs.get('label_name', None) - self.label_id = kwargs.get('label_id', None) - self.information_type = kwargs.get('information_type', None) - self.information_type_id = kwargs.get('information_type_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_paged.py deleted file mode 100644 index 438bfd86f9be..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SensitivityLabelPaged(Paged): - """ - A paging container for iterating over a list of :class:`SensitivityLabel ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SensitivityLabel]'} - } - - def __init__(self, *args, **kwargs): - - super(SensitivityLabelPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_py3.py deleted file mode 100644 index f304363d916b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SensitivityLabel(ProxyResource): - """A sensitivity label. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param label_name: The label name. - :type label_name: str - :param label_id: The label ID. - :type label_id: str - :param information_type: The information type. - :type information_type: str - :param information_type_id: The information type ID. - :type information_type_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'label_name': {'key': 'properties.labelName', 'type': 'str'}, - 'label_id': {'key': 'properties.labelId', 'type': 'str'}, - 'information_type': {'key': 'properties.informationType', 'type': 'str'}, - 'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'}, - } - - def __init__(self, *, label_name: str=None, label_id: str=None, information_type: str=None, information_type_id: str=None, **kwargs) -> None: - super(SensitivityLabel, self).__init__(**kwargs) - self.label_name = label_name - self.label_id = label_id - self.information_type = information_type - self.information_type_id = information_type_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server.py deleted file mode 100644 index 1c399fadb353..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class Server(TrackedResource): - """An Azure SQL Database server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.sql.models.ResourceIdentity - :ivar kind: Kind of sql server. This is metadata used for the Azure portal - experience. - :vartype kind: str - :param administrator_login: Administrator username for the server. Once - created it cannot be changed. - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for server creation). - :type administrator_login_password: str - :param version: The version of the server. - :type version: str - :ivar state: The state of the server. - :vartype state: str - :ivar fully_qualified_domain_name: The fully qualified domain name of the - server. - :vartype fully_qualified_domain_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'state': {'readonly': True}, - 'fully_qualified_domain_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Server, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.kind = None - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.version = kwargs.get('version', None) - self.state = None - self.fully_qualified_domain_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning.py deleted file mode 100644 index 583c0b843c1b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerAutomaticTuning(ProxyResource): - """Server-level Automatic Tuning. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param desired_state: Automatic tuning desired state. Possible values - include: 'Custom', 'Auto', 'Unspecified' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningServerMode - :ivar actual_state: Automatic tuning actual state. Possible values - include: 'Custom', 'Auto', 'Unspecified' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningServerMode - :param options: Automatic tuning options definition. - :type options: dict[str, - ~azure.mgmt.sql.models.AutomaticTuningServerOptions] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'actual_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningServerMode'}, - 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningServerMode'}, - 'options': {'key': 'properties.options', 'type': '{AutomaticTuningServerOptions}'}, - } - - def __init__(self, **kwargs): - super(ServerAutomaticTuning, self).__init__(**kwargs) - self.desired_state = kwargs.get('desired_state', None) - self.actual_state = None - self.options = kwargs.get('options', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning_py3.py deleted file mode 100644 index fb8fb4804610..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerAutomaticTuning(ProxyResource): - """Server-level Automatic Tuning. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param desired_state: Automatic tuning desired state. Possible values - include: 'Custom', 'Auto', 'Unspecified' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningServerMode - :ivar actual_state: Automatic tuning actual state. Possible values - include: 'Custom', 'Auto', 'Unspecified' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningServerMode - :param options: Automatic tuning options definition. - :type options: dict[str, - ~azure.mgmt.sql.models.AutomaticTuningServerOptions] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'actual_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningServerMode'}, - 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningServerMode'}, - 'options': {'key': 'properties.options', 'type': '{AutomaticTuningServerOptions}'}, - } - - def __init__(self, *, desired_state=None, options=None, **kwargs) -> None: - super(ServerAutomaticTuning, self).__init__(**kwargs) - self.desired_state = desired_state - self.actual_state = None - self.options = options diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator.py deleted file mode 100644 index ef037e8a9dc8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerAzureADAdministrator(ProxyResource): - """An server Active Directory Administrator. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar administrator_type: Required. The type of administrator. Default - value: "ActiveDirectory" . - :vartype administrator_type: str - :param login: Required. The server administrator login value. - :type login: str - :param sid: Required. The server administrator Sid (Secure ID). - :type sid: str - :param tenant_id: Required. The server Active Directory Administrator - tenant id. - :type tenant_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'administrator_type': {'required': True, 'constant': True}, - 'login': {'required': True}, - 'sid': {'required': True}, - 'tenant_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, - 'login': {'key': 'properties.login', 'type': 'str'}, - 'sid': {'key': 'properties.sid', 'type': 'str'}, - 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, - } - - administrator_type = "ActiveDirectory" - - def __init__(self, **kwargs): - super(ServerAzureADAdministrator, self).__init__(**kwargs) - self.login = kwargs.get('login', None) - self.sid = kwargs.get('sid', None) - self.tenant_id = kwargs.get('tenant_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_paged.py deleted file mode 100644 index 519adc226385..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerAzureADAdministratorPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerAzureADAdministrator ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerAzureADAdministrator]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerAzureADAdministratorPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_py3.py deleted file mode 100644 index 3dfeb71123c3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerAzureADAdministrator(ProxyResource): - """An server Active Directory Administrator. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar administrator_type: Required. The type of administrator. Default - value: "ActiveDirectory" . - :vartype administrator_type: str - :param login: Required. The server administrator login value. - :type login: str - :param sid: Required. The server administrator Sid (Secure ID). - :type sid: str - :param tenant_id: Required. The server Active Directory Administrator - tenant id. - :type tenant_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'administrator_type': {'required': True, 'constant': True}, - 'login': {'required': True}, - 'sid': {'required': True}, - 'tenant_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, - 'login': {'key': 'properties.login', 'type': 'str'}, - 'sid': {'key': 'properties.sid', 'type': 'str'}, - 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, - } - - administrator_type = "ActiveDirectory" - - def __init__(self, *, login: str, sid: str, tenant_id: str, **kwargs) -> None: - super(ServerAzureADAdministrator, self).__init__(**kwargs) - self.login = login - self.sid = sid - self.tenant_id = tenant_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy.py deleted file mode 100644 index 9a7bc69b8c5d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy.py +++ /dev/null @@ -1,160 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerBlobAuditingPolicy(ProxyResource): - """A server blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ServerBlobAuditingPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) - self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) - self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) - self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy_py3.py deleted file mode 100644 index 120d066e6427..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy_py3.py +++ /dev/null @@ -1,160 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerBlobAuditingPolicy(ProxyResource): - """A server blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: - super(ServerBlobAuditingPolicy, self).__init__(**kwargs) - self.state = state - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.audit_actions_and_groups = audit_actions_and_groups - self.storage_account_subscription_id = storage_account_subscription_id - self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use - self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link.py deleted file mode 100644 index 88fef4fa788f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerCommunicationLink(ProxyResource): - """Server communication link. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar state: The state. - :vartype state: str - :param partner_server: Required. The name of the partner server. - :type partner_server: str - :ivar location: Communication link location. - :vartype location: str - :ivar kind: Communication link kind. This property is used for Azure - Portal metadata. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'readonly': True}, - 'partner_server': {'required': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerCommunicationLink, self).__init__(**kwargs) - self.state = None - self.partner_server = kwargs.get('partner_server', None) - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_paged.py deleted file mode 100644 index 6e2fef5d7ce0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerCommunicationLinkPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerCommunicationLink ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerCommunicationLink]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerCommunicationLinkPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_py3.py deleted file mode 100644 index 6a32069ca067..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerCommunicationLink(ProxyResource): - """Server communication link. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar state: The state. - :vartype state: str - :param partner_server: Required. The name of the partner server. - :type partner_server: str - :ivar location: Communication link location. - :vartype location: str - :ivar kind: Communication link kind. This property is used for Azure - Portal metadata. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'readonly': True}, - 'partner_server': {'required': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, partner_server: str, **kwargs) -> None: - super(ServerCommunicationLink, self).__init__(**kwargs) - self.state = None - self.partner_server = partner_server - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy.py deleted file mode 100644 index dd0097235550..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerConnectionPolicy(ProxyResource): - """A server secure connection policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Metadata used for the Azure portal experience. - :vartype kind: str - :ivar location: Resource location. - :vartype location: str - :param connection_type: Required. The server connection type. Possible - values include: 'Default', 'Proxy', 'Redirect' - :type connection_type: str or ~azure.mgmt.sql.models.ServerConnectionType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - 'connection_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'connection_type': {'key': 'properties.connectionType', 'type': 'ServerConnectionType'}, - } - - def __init__(self, **kwargs): - super(ServerConnectionPolicy, self).__init__(**kwargs) - self.kind = None - self.location = None - self.connection_type = kwargs.get('connection_type', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy_py3.py deleted file mode 100644 index 10bd81052301..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerConnectionPolicy(ProxyResource): - """A server secure connection policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Metadata used for the Azure portal experience. - :vartype kind: str - :ivar location: Resource location. - :vartype location: str - :param connection_type: Required. The server connection type. Possible - values include: 'Default', 'Proxy', 'Redirect' - :type connection_type: str or ~azure.mgmt.sql.models.ServerConnectionType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - 'connection_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'connection_type': {'key': 'properties.connectionType', 'type': 'ServerConnectionType'}, - } - - def __init__(self, *, connection_type, **kwargs) -> None: - super(ServerConnectionPolicy, self).__init__(**kwargs) - self.kind = None - self.location = None - self.connection_type = connection_type diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias.py deleted file mode 100644 index 691db960c1a7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerDnsAlias(ProxyResource): - """A server DNS alias. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar azure_dns_record: The fully qualified DNS record for alias - :vartype azure_dns_record: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'azure_dns_record': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'azure_dns_record': {'key': 'properties.azureDnsRecord', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerDnsAlias, self).__init__(**kwargs) - self.azure_dns_record = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition.py deleted file mode 100644 index 2f7757f5daf2..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerDnsAliasAcquisition(Model): - """A server DNS alias acquisition request. - - :param old_server_dns_alias_id: The id of the server alias that will be - acquired to point to this server instead. - :type old_server_dns_alias_id: str - """ - - _attribute_map = { - 'old_server_dns_alias_id': {'key': 'oldServerDnsAliasId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerDnsAliasAcquisition, self).__init__(**kwargs) - self.old_server_dns_alias_id = kwargs.get('old_server_dns_alias_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition_py3.py deleted file mode 100644 index 93cf9e0027c9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerDnsAliasAcquisition(Model): - """A server DNS alias acquisition request. - - :param old_server_dns_alias_id: The id of the server alias that will be - acquired to point to this server instead. - :type old_server_dns_alias_id: str - """ - - _attribute_map = { - 'old_server_dns_alias_id': {'key': 'oldServerDnsAliasId', 'type': 'str'}, - } - - def __init__(self, *, old_server_dns_alias_id: str=None, **kwargs) -> None: - super(ServerDnsAliasAcquisition, self).__init__(**kwargs) - self.old_server_dns_alias_id = old_server_dns_alias_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_paged.py deleted file mode 100644 index 2fdd93879f3b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerDnsAliasPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerDnsAlias ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerDnsAlias]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerDnsAliasPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_py3.py deleted file mode 100644 index c57df1a85f06..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerDnsAlias(ProxyResource): - """A server DNS alias. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar azure_dns_record: The fully qualified DNS record for alias - :vartype azure_dns_record: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'azure_dns_record': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'azure_dns_record': {'key': 'properties.azureDnsRecord', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ServerDnsAlias, self).__init__(**kwargs) - self.azure_dns_record = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key.py deleted file mode 100644 index 1258d1e0da7f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerKey(ProxyResource): - """A server key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :type kind: str - :ivar location: Resource location. - :vartype location: str - :ivar subregion: Subregion of the server key. - :vartype subregion: str - :param server_key_type: Required. The server key type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :param uri: The URI of the server key. - :type uri: str - :param thumbprint: Thumbprint of the server key. - :type thumbprint: str - :param creation_date: The server key creation date. - :type creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'subregion': {'readonly': True}, - 'server_key_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'subregion': {'key': 'properties.subregion', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ServerKey, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) - self.location = None - self.subregion = None - self.server_key_type = kwargs.get('server_key_type', None) - self.uri = kwargs.get('uri', None) - self.thumbprint = kwargs.get('thumbprint', None) - self.creation_date = kwargs.get('creation_date', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_paged.py deleted file mode 100644 index 1d5e262c9c89..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerKeyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerKey ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerKey]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerKeyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_py3.py deleted file mode 100644 index 41ef40ab165a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerKey(ProxyResource): - """A server key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :type kind: str - :ivar location: Resource location. - :vartype location: str - :ivar subregion: Subregion of the server key. - :vartype subregion: str - :param server_key_type: Required. The server key type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :param uri: The URI of the server key. - :type uri: str - :param thumbprint: Thumbprint of the server key. - :type thumbprint: str - :param creation_date: The server key creation date. - :type creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'subregion': {'readonly': True}, - 'server_key_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'subregion': {'key': 'properties.subregion', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, server_key_type, kind: str=None, uri: str=None, thumbprint: str=None, creation_date=None, **kwargs) -> None: - super(ServerKey, self).__init__(**kwargs) - self.kind = kind - self.location = None - self.subregion = None - self.server_key_type = server_key_type - self.uri = uri - self.thumbprint = thumbprint - self.creation_date = creation_date diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_paged.py deleted file mode 100644 index 2d6e6fe0e114..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerPaged(Paged): - """ - A paging container for iterating over a list of :class:`Server ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Server]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_py3.py deleted file mode 100644 index 625c4d0aea4c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_py3.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class Server(TrackedResource): - """An Azure SQL Database server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.sql.models.ResourceIdentity - :ivar kind: Kind of sql server. This is metadata used for the Azure portal - experience. - :vartype kind: str - :param administrator_login: Administrator username for the server. Once - created it cannot be changed. - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for server creation). - :type administrator_login_password: str - :param version: The version of the server. - :type version: str - :ivar state: The state of the server. - :vartype state: str - :ivar fully_qualified_domain_name: The fully qualified domain name of the - server. - :vartype fully_qualified_domain_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'state': {'readonly': True}, - 'fully_qualified_domain_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, identity=None, administrator_login: str=None, administrator_login_password: str=None, version: str=None, **kwargs) -> None: - super(Server, self).__init__(location=location, tags=tags, **kwargs) - self.identity = identity - self.kind = None - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.version = version - self.state = None - self.fully_qualified_domain_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy.py deleted file mode 100644 index 06c40dd93125..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerSecurityAlertPolicy(ProxyResource): - """A server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_paged.py deleted file mode 100644 index 3a8836b45245..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerSecurityAlertPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerSecurityAlertPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerSecurityAlertPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_py3.py deleted file mode 100644 index 38c0c87b0372..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerSecurityAlertPolicy(ProxyResource): - """A server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: - super(ServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update.py deleted file mode 100644 index d39d49bea953..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerUpdate(Model): - """An update request for an Azure SQL Database server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param administrator_login: Administrator username for the server. Once - created it cannot be changed. - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for server creation). - :type administrator_login_password: str - :param version: The version of the server. - :type version: str - :ivar state: The state of the server. - :vartype state: str - :ivar fully_qualified_domain_name: The fully qualified domain name of the - server. - :vartype fully_qualified_domain_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'state': {'readonly': True}, - 'fully_qualified_domain_name': {'readonly': True}, - } - - _attribute_map = { - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ServerUpdate, self).__init__(**kwargs) - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.version = kwargs.get('version', None) - self.state = None - self.fully_qualified_domain_name = None - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update_py3.py deleted file mode 100644 index 863f2b52fa01..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerUpdate(Model): - """An update request for an Azure SQL Database server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param administrator_login: Administrator username for the server. Once - created it cannot be changed. - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for server creation). - :type administrator_login_password: str - :param version: The version of the server. - :type version: str - :ivar state: The state of the server. - :vartype state: str - :ivar fully_qualified_domain_name: The fully qualified domain name of the - server. - :vartype fully_qualified_domain_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'state': {'readonly': True}, - 'fully_qualified_domain_name': {'readonly': True}, - } - - _attribute_map = { - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, administrator_login: str=None, administrator_login_password: str=None, version: str=None, tags=None, **kwargs) -> None: - super(ServerUpdate, self).__init__(**kwargs) - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.version = version - self.state = None - self.fully_qualified_domain_name = None - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage.py deleted file mode 100644 index e04fb8c60a82..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerUsage(Model): - """Represents server metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of the server usage metric. - :vartype name: str - :ivar resource_name: The name of the resource. - :vartype resource_name: str - :ivar display_name: The metric display name. - :vartype display_name: str - :ivar current_value: The current value of the metric. - :vartype current_value: float - :ivar limit: The current limit of the metric. - :vartype limit: float - :ivar unit: The units of the metric. - :vartype unit: str - :ivar next_reset_time: The next reset time for the metric (ISO8601 - format). - :vartype next_reset_time: datetime - """ - - _validation = { - 'name': {'readonly': True}, - 'resource_name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'next_reset_time': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_name': {'key': 'resourceName', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ServerUsage, self).__init__(**kwargs) - self.name = None - self.resource_name = None - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None - self.next_reset_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_paged.py deleted file mode 100644 index 688d3b408383..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerUsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerUsage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerUsage]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerUsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_py3.py deleted file mode 100644 index 3a6feaecdc8d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerUsage(Model): - """Represents server metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of the server usage metric. - :vartype name: str - :ivar resource_name: The name of the resource. - :vartype resource_name: str - :ivar display_name: The metric display name. - :vartype display_name: str - :ivar current_value: The current value of the metric. - :vartype current_value: float - :ivar limit: The current limit of the metric. - :vartype limit: float - :ivar unit: The units of the metric. - :vartype unit: str - :ivar next_reset_time: The next reset time for the metric (ISO8601 - format). - :vartype next_reset_time: datetime - """ - - _validation = { - 'name': {'readonly': True}, - 'resource_name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'next_reset_time': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_name': {'key': 'resourceName', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(ServerUsage, self).__init__(**kwargs) - self.name = None - self.resource_name = None - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None - self.next_reset_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability.py deleted file mode 100644 index 811e93df8aa4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerVersionCapability(Model): - """The server capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The server version name. - :vartype name: str - :ivar supported_editions: The list of supported database editions. - :vartype supported_editions: - list[~azure.mgmt.sql.models.EditionCapability] - :ivar supported_elastic_pool_editions: The list of supported elastic pool - editions. - :vartype supported_elastic_pool_editions: - list[~azure.mgmt.sql.models.ElasticPoolEditionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_editions': {'readonly': True}, - 'supported_elastic_pool_editions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_editions': {'key': 'supportedEditions', 'type': '[EditionCapability]'}, - 'supported_elastic_pool_editions': {'key': 'supportedElasticPoolEditions', 'type': '[ElasticPoolEditionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerVersionCapability, self).__init__(**kwargs) - self.name = None - self.supported_editions = None - self.supported_elastic_pool_editions = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability_py3.py deleted file mode 100644 index 66a1a0251ede..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerVersionCapability(Model): - """The server capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The server version name. - :vartype name: str - :ivar supported_editions: The list of supported database editions. - :vartype supported_editions: - list[~azure.mgmt.sql.models.EditionCapability] - :ivar supported_elastic_pool_editions: The list of supported elastic pool - editions. - :vartype supported_elastic_pool_editions: - list[~azure.mgmt.sql.models.ElasticPoolEditionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_editions': {'readonly': True}, - 'supported_elastic_pool_editions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_editions': {'key': 'supportedEditions', 'type': '[EditionCapability]'}, - 'supported_elastic_pool_editions': {'key': 'supportedElasticPoolEditions', 'type': '[ElasticPoolEditionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ServerVersionCapability, self).__init__(**kwargs) - self.name = None - self.supported_editions = None - self.supported_elastic_pool_editions = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment.py deleted file mode 100644 index eecad7a9b04d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerVulnerabilityAssessment(ProxyResource): - """A server vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: Required. A blob storage container path to - hold the scan results (e.g. - https://myStorage.blob.core.windows.net/VaScans/). - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_container_path': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, **kwargs): - super(ServerVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = kwargs.get('storage_container_path', None) - self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.recurring_scans = kwargs.get('recurring_scans', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_paged.py deleted file mode 100644 index 43c1a3b65779..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerVulnerabilityAssessmentPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerVulnerabilityAssessment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerVulnerabilityAssessment]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_py3.py deleted file mode 100644 index bb42c3866a3f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerVulnerabilityAssessment(ProxyResource): - """A server vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: Required. A blob storage container path to - hold the scan results (e.g. - https://myStorage.blob.core.windows.net/VaScans/). - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_container_path': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, *, storage_container_path: str, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: - super(ServerVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = storage_container_path - self.storage_container_sas_key = storage_container_sas_key - self.storage_account_access_key = storage_account_access_key - self.recurring_scans = recurring_scans diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective.py deleted file mode 100644 index 71133da2f551..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServiceObjective(ProxyResource): - """Represents a database service objective. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar service_objective_name: The name for the service objective. - :vartype service_objective_name: str - :ivar is_default: Gets whether the service level objective is the default - service objective. - :vartype is_default: bool - :ivar is_system: Gets whether the service level objective is a system - service objective. - :vartype is_system: bool - :ivar description: The description for the service level objective. - :vartype description: str - :ivar enabled: Gets whether the service level objective is enabled. - :vartype enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'service_objective_name': {'readonly': True}, - 'is_default': {'readonly': True}, - 'is_system': {'readonly': True}, - 'description': {'readonly': True}, - 'enabled': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'service_objective_name': {'key': 'properties.serviceObjectiveName', 'type': 'str'}, - 'is_default': {'key': 'properties.isDefault', 'type': 'bool'}, - 'is_system': {'key': 'properties.isSystem', 'type': 'bool'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ServiceObjective, self).__init__(**kwargs) - self.service_objective_name = None - self.is_default = None - self.is_system = None - self.description = None - self.enabled = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability.py deleted file mode 100644 index 1e6c2158be9a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceObjectiveCapability(Model): - """The service objectives capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique ID of the service objective. - :vartype id: str - :ivar name: The service objective name. - :vartype name: str - :ivar supported_max_sizes: The list of supported maximum database sizes. - :vartype supported_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar performance_level: The performance level. - :vartype performance_level: - ~azure.mgmt.sql.models.PerformanceLevelCapability - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.sql.models.Sku - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar included_max_size: The included (free) max size. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'supported_max_sizes': {'readonly': True}, - 'performance_level': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceObjectiveCapability, self).__init__(**kwargs) - self.id = None - self.name = None - self.supported_max_sizes = None - self.performance_level = None - self.sku = None - self.supported_license_types = None - self.included_max_size = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability_py3.py deleted file mode 100644 index f777ffd74f97..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceObjectiveCapability(Model): - """The service objectives capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique ID of the service objective. - :vartype id: str - :ivar name: The service objective name. - :vartype name: str - :ivar supported_max_sizes: The list of supported maximum database sizes. - :vartype supported_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar performance_level: The performance level. - :vartype performance_level: - ~azure.mgmt.sql.models.PerformanceLevelCapability - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.sql.models.Sku - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar included_max_size: The included (free) max size. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'supported_max_sizes': {'readonly': True}, - 'performance_level': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ServiceObjectiveCapability, self).__init__(**kwargs) - self.id = None - self.name = None - self.supported_max_sizes = None - self.performance_level = None - self.sku = None - self.supported_license_types = None - self.included_max_size = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_paged.py deleted file mode 100644 index 7afe16629d1d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServiceObjectivePaged(Paged): - """ - A paging container for iterating over a list of :class:`ServiceObjective ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServiceObjective]'} - } - - def __init__(self, *args, **kwargs): - - super(ServiceObjectivePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_py3.py deleted file mode 100644 index 2fc00134e6ec..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServiceObjective(ProxyResource): - """Represents a database service objective. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar service_objective_name: The name for the service objective. - :vartype service_objective_name: str - :ivar is_default: Gets whether the service level objective is the default - service objective. - :vartype is_default: bool - :ivar is_system: Gets whether the service level objective is a system - service objective. - :vartype is_system: bool - :ivar description: The description for the service level objective. - :vartype description: str - :ivar enabled: Gets whether the service level objective is enabled. - :vartype enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'service_objective_name': {'readonly': True}, - 'is_default': {'readonly': True}, - 'is_system': {'readonly': True}, - 'description': {'readonly': True}, - 'enabled': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'service_objective_name': {'key': 'properties.serviceObjectiveName', 'type': 'str'}, - 'is_default': {'key': 'properties.isDefault', 'type': 'bool'}, - 'is_system': {'key': 'properties.isSystem', 'type': 'bool'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs) -> None: - super(ServiceObjective, self).__init__(**kwargs) - self.service_objective_name = None - self.is_default = None - self.is_system = None - self.description = None - self.enabled = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor.py deleted file mode 100644 index cb8974906ee6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServiceTierAdvisor(ProxyResource): - """Represents a Service Tier Advisor. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar observation_period_start: The observation period start (ISO8601 - format). - :vartype observation_period_start: datetime - :ivar observation_period_end: The observation period start (ISO8601 - format). - :vartype observation_period_end: datetime - :ivar active_time_ratio: The activeTimeRatio for service tier advisor. - :vartype active_time_ratio: float - :ivar min_dtu: Gets or sets minDtu for service tier advisor. - :vartype min_dtu: float - :ivar avg_dtu: Gets or sets avgDtu for service tier advisor. - :vartype avg_dtu: float - :ivar max_dtu: Gets or sets maxDtu for service tier advisor. - :vartype max_dtu: float - :ivar max_size_in_gb: Gets or sets maxSizeInGB for service tier advisor. - :vartype max_size_in_gb: float - :ivar service_level_objective_usage_metrics: Gets or sets - serviceLevelObjectiveUsageMetrics for the service tier advisor. - :vartype service_level_objective_usage_metrics: - list[~azure.mgmt.sql.models.SloUsageMetric] - :ivar current_service_level_objective: Gets or sets - currentServiceLevelObjective for service tier advisor. - :vartype current_service_level_objective: str - :ivar current_service_level_objective_id: Gets or sets - currentServiceLevelObjectiveId for service tier advisor. - :vartype current_service_level_objective_id: str - :ivar usage_based_recommendation_service_level_objective: Gets or sets - usageBasedRecommendationServiceLevelObjective for service tier advisor. - :vartype usage_based_recommendation_service_level_objective: str - :ivar usage_based_recommendation_service_level_objective_id: Gets or sets - usageBasedRecommendationServiceLevelObjectiveId for service tier advisor. - :vartype usage_based_recommendation_service_level_objective_id: str - :ivar database_size_based_recommendation_service_level_objective: Gets or - sets databaseSizeBasedRecommendationServiceLevelObjective for service tier - advisor. - :vartype database_size_based_recommendation_service_level_objective: str - :ivar database_size_based_recommendation_service_level_objective_id: Gets - or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service - tier advisor. - :vartype database_size_based_recommendation_service_level_objective_id: - str - :ivar disaster_plan_based_recommendation_service_level_objective: Gets or - sets disasterPlanBasedRecommendationServiceLevelObjective for service tier - advisor. - :vartype disaster_plan_based_recommendation_service_level_objective: str - :ivar disaster_plan_based_recommendation_service_level_objective_id: Gets - or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service - tier advisor. - :vartype disaster_plan_based_recommendation_service_level_objective_id: - str - :ivar overall_recommendation_service_level_objective: Gets or sets - overallRecommendationServiceLevelObjective for service tier advisor. - :vartype overall_recommendation_service_level_objective: str - :ivar overall_recommendation_service_level_objective_id: Gets or sets - overallRecommendationServiceLevelObjectiveId for service tier advisor. - :vartype overall_recommendation_service_level_objective_id: str - :ivar confidence: Gets or sets confidence for service tier advisor. - :vartype confidence: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'observation_period_start': {'readonly': True}, - 'observation_period_end': {'readonly': True}, - 'active_time_ratio': {'readonly': True}, - 'min_dtu': {'readonly': True}, - 'avg_dtu': {'readonly': True}, - 'max_dtu': {'readonly': True}, - 'max_size_in_gb': {'readonly': True}, - 'service_level_objective_usage_metrics': {'readonly': True}, - 'current_service_level_objective': {'readonly': True}, - 'current_service_level_objective_id': {'readonly': True}, - 'usage_based_recommendation_service_level_objective': {'readonly': True}, - 'usage_based_recommendation_service_level_objective_id': {'readonly': True}, - 'database_size_based_recommendation_service_level_objective': {'readonly': True}, - 'database_size_based_recommendation_service_level_objective_id': {'readonly': True}, - 'disaster_plan_based_recommendation_service_level_objective': {'readonly': True}, - 'disaster_plan_based_recommendation_service_level_objective_id': {'readonly': True}, - 'overall_recommendation_service_level_objective': {'readonly': True}, - 'overall_recommendation_service_level_objective_id': {'readonly': True}, - 'confidence': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, - 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, - 'active_time_ratio': {'key': 'properties.activeTimeRatio', 'type': 'float'}, - 'min_dtu': {'key': 'properties.minDtu', 'type': 'float'}, - 'avg_dtu': {'key': 'properties.avgDtu', 'type': 'float'}, - 'max_dtu': {'key': 'properties.maxDtu', 'type': 'float'}, - 'max_size_in_gb': {'key': 'properties.maxSizeInGB', 'type': 'float'}, - 'service_level_objective_usage_metrics': {'key': 'properties.serviceLevelObjectiveUsageMetrics', 'type': '[SloUsageMetric]'}, - 'current_service_level_objective': {'key': 'properties.currentServiceLevelObjective', 'type': 'str'}, - 'current_service_level_objective_id': {'key': 'properties.currentServiceLevelObjectiveId', 'type': 'str'}, - 'usage_based_recommendation_service_level_objective': {'key': 'properties.usageBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'usage_based_recommendation_service_level_objective_id': {'key': 'properties.usageBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'database_size_based_recommendation_service_level_objective': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'database_size_based_recommendation_service_level_objective_id': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'disaster_plan_based_recommendation_service_level_objective': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'disaster_plan_based_recommendation_service_level_objective_id': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'overall_recommendation_service_level_objective': {'key': 'properties.overallRecommendationServiceLevelObjective', 'type': 'str'}, - 'overall_recommendation_service_level_objective_id': {'key': 'properties.overallRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'confidence': {'key': 'properties.confidence', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ServiceTierAdvisor, self).__init__(**kwargs) - self.observation_period_start = None - self.observation_period_end = None - self.active_time_ratio = None - self.min_dtu = None - self.avg_dtu = None - self.max_dtu = None - self.max_size_in_gb = None - self.service_level_objective_usage_metrics = None - self.current_service_level_objective = None - self.current_service_level_objective_id = None - self.usage_based_recommendation_service_level_objective = None - self.usage_based_recommendation_service_level_objective_id = None - self.database_size_based_recommendation_service_level_objective = None - self.database_size_based_recommendation_service_level_objective_id = None - self.disaster_plan_based_recommendation_service_level_objective = None - self.disaster_plan_based_recommendation_service_level_objective_id = None - self.overall_recommendation_service_level_objective = None - self.overall_recommendation_service_level_objective_id = None - self.confidence = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_paged.py deleted file mode 100644 index 8275906eb639..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServiceTierAdvisorPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServiceTierAdvisor ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServiceTierAdvisor]'} - } - - def __init__(self, *args, **kwargs): - - super(ServiceTierAdvisorPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_py3.py deleted file mode 100644 index 04f5dceca1c0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_py3.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServiceTierAdvisor(ProxyResource): - """Represents a Service Tier Advisor. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar observation_period_start: The observation period start (ISO8601 - format). - :vartype observation_period_start: datetime - :ivar observation_period_end: The observation period start (ISO8601 - format). - :vartype observation_period_end: datetime - :ivar active_time_ratio: The activeTimeRatio for service tier advisor. - :vartype active_time_ratio: float - :ivar min_dtu: Gets or sets minDtu for service tier advisor. - :vartype min_dtu: float - :ivar avg_dtu: Gets or sets avgDtu for service tier advisor. - :vartype avg_dtu: float - :ivar max_dtu: Gets or sets maxDtu for service tier advisor. - :vartype max_dtu: float - :ivar max_size_in_gb: Gets or sets maxSizeInGB for service tier advisor. - :vartype max_size_in_gb: float - :ivar service_level_objective_usage_metrics: Gets or sets - serviceLevelObjectiveUsageMetrics for the service tier advisor. - :vartype service_level_objective_usage_metrics: - list[~azure.mgmt.sql.models.SloUsageMetric] - :ivar current_service_level_objective: Gets or sets - currentServiceLevelObjective for service tier advisor. - :vartype current_service_level_objective: str - :ivar current_service_level_objective_id: Gets or sets - currentServiceLevelObjectiveId for service tier advisor. - :vartype current_service_level_objective_id: str - :ivar usage_based_recommendation_service_level_objective: Gets or sets - usageBasedRecommendationServiceLevelObjective for service tier advisor. - :vartype usage_based_recommendation_service_level_objective: str - :ivar usage_based_recommendation_service_level_objective_id: Gets or sets - usageBasedRecommendationServiceLevelObjectiveId for service tier advisor. - :vartype usage_based_recommendation_service_level_objective_id: str - :ivar database_size_based_recommendation_service_level_objective: Gets or - sets databaseSizeBasedRecommendationServiceLevelObjective for service tier - advisor. - :vartype database_size_based_recommendation_service_level_objective: str - :ivar database_size_based_recommendation_service_level_objective_id: Gets - or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service - tier advisor. - :vartype database_size_based_recommendation_service_level_objective_id: - str - :ivar disaster_plan_based_recommendation_service_level_objective: Gets or - sets disasterPlanBasedRecommendationServiceLevelObjective for service tier - advisor. - :vartype disaster_plan_based_recommendation_service_level_objective: str - :ivar disaster_plan_based_recommendation_service_level_objective_id: Gets - or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service - tier advisor. - :vartype disaster_plan_based_recommendation_service_level_objective_id: - str - :ivar overall_recommendation_service_level_objective: Gets or sets - overallRecommendationServiceLevelObjective for service tier advisor. - :vartype overall_recommendation_service_level_objective: str - :ivar overall_recommendation_service_level_objective_id: Gets or sets - overallRecommendationServiceLevelObjectiveId for service tier advisor. - :vartype overall_recommendation_service_level_objective_id: str - :ivar confidence: Gets or sets confidence for service tier advisor. - :vartype confidence: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'observation_period_start': {'readonly': True}, - 'observation_period_end': {'readonly': True}, - 'active_time_ratio': {'readonly': True}, - 'min_dtu': {'readonly': True}, - 'avg_dtu': {'readonly': True}, - 'max_dtu': {'readonly': True}, - 'max_size_in_gb': {'readonly': True}, - 'service_level_objective_usage_metrics': {'readonly': True}, - 'current_service_level_objective': {'readonly': True}, - 'current_service_level_objective_id': {'readonly': True}, - 'usage_based_recommendation_service_level_objective': {'readonly': True}, - 'usage_based_recommendation_service_level_objective_id': {'readonly': True}, - 'database_size_based_recommendation_service_level_objective': {'readonly': True}, - 'database_size_based_recommendation_service_level_objective_id': {'readonly': True}, - 'disaster_plan_based_recommendation_service_level_objective': {'readonly': True}, - 'disaster_plan_based_recommendation_service_level_objective_id': {'readonly': True}, - 'overall_recommendation_service_level_objective': {'readonly': True}, - 'overall_recommendation_service_level_objective_id': {'readonly': True}, - 'confidence': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, - 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, - 'active_time_ratio': {'key': 'properties.activeTimeRatio', 'type': 'float'}, - 'min_dtu': {'key': 'properties.minDtu', 'type': 'float'}, - 'avg_dtu': {'key': 'properties.avgDtu', 'type': 'float'}, - 'max_dtu': {'key': 'properties.maxDtu', 'type': 'float'}, - 'max_size_in_gb': {'key': 'properties.maxSizeInGB', 'type': 'float'}, - 'service_level_objective_usage_metrics': {'key': 'properties.serviceLevelObjectiveUsageMetrics', 'type': '[SloUsageMetric]'}, - 'current_service_level_objective': {'key': 'properties.currentServiceLevelObjective', 'type': 'str'}, - 'current_service_level_objective_id': {'key': 'properties.currentServiceLevelObjectiveId', 'type': 'str'}, - 'usage_based_recommendation_service_level_objective': {'key': 'properties.usageBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'usage_based_recommendation_service_level_objective_id': {'key': 'properties.usageBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'database_size_based_recommendation_service_level_objective': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'database_size_based_recommendation_service_level_objective_id': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'disaster_plan_based_recommendation_service_level_objective': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'disaster_plan_based_recommendation_service_level_objective_id': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'overall_recommendation_service_level_objective': {'key': 'properties.overallRecommendationServiceLevelObjective', 'type': 'str'}, - 'overall_recommendation_service_level_objective_id': {'key': 'properties.overallRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'confidence': {'key': 'properties.confidence', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(ServiceTierAdvisor, self).__init__(**kwargs) - self.observation_period_start = None - self.observation_period_end = None - self.active_time_ratio = None - self.min_dtu = None - self.avg_dtu = None - self.max_dtu = None - self.max_size_in_gb = None - self.service_level_objective_usage_metrics = None - self.current_service_level_objective = None - self.current_service_level_objective_id = None - self.usage_based_recommendation_service_level_objective = None - self.usage_based_recommendation_service_level_objective_id = None - self.database_size_based_recommendation_service_level_objective = None - self.database_size_based_recommendation_service_level_objective_id = None - self.disaster_plan_based_recommendation_service_level_objective = None - self.disaster_plan_based_recommendation_service_level_objective_id = None - self.overall_recommendation_service_level_objective = None - self.overall_recommendation_service_level_objective_id = None - self.confidence = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku.py deleted file mode 100644 index e37091dc4e2f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """The resource model definition representing SKU. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU. Ex - P3. It is typically a - letter+number code - :type name: str - :param tier: This field is required to be implemented by the Resource - Provider if the service has more than one tier, but is not required on a - PUT. - :type tier: str - :param size: The SKU size. When the name field is the combination of tier - and some other value, this would be the standalone code. - :type size: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :param capacity: If the SKU supports scale out/in then the capacity - integer should be included. If scale out/in is not possible for the - resource this may be omitted. - :type capacity: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.size = kwargs.get('size', None) - self.family = kwargs.get('family', None) - self.capacity = kwargs.get('capacity', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku_py3.py deleted file mode 100644 index a6f04765e87c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """The resource model definition representing SKU. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU. Ex - P3. It is typically a - letter+number code - :type name: str - :param tier: This field is required to be implemented by the Resource - Provider if the service has more than one tier, but is not required on a - PUT. - :type tier: str - :param size: The SKU size. When the name field is the combination of tier - and some other value, this would be the standalone code. - :type size: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :param capacity: If the SKU supports scale out/in then the capacity - integer should be included. If scale out/in is not possible for the - resource this may be omitted. - :type capacity: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__(self, *, name: str, tier: str=None, size: str=None, family: str=None, capacity: int=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.size = size - self.family = family - self.capacity = capacity diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric.py deleted file mode 100644 index 262017a0b87c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SloUsageMetric(Model): - """A Slo Usage Metric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar service_level_objective: The serviceLevelObjective for SLO usage - metric. Possible values include: 'System', 'System0', 'System1', - 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', - 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', - 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', - 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', - 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', - 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', - 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', - 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - :vartype service_level_objective: str or - ~azure.mgmt.sql.models.ServiceObjectiveName - :ivar service_level_objective_id: The serviceLevelObjectiveId for SLO - usage metric. - :vartype service_level_objective_id: str - :ivar in_range_time_ratio: Gets or sets inRangeTimeRatio for SLO usage - metric. - :vartype in_range_time_ratio: float - """ - - _validation = { - 'service_level_objective': {'readonly': True}, - 'service_level_objective_id': {'readonly': True}, - 'in_range_time_ratio': {'readonly': True}, - } - - _attribute_map = { - 'service_level_objective': {'key': 'serviceLevelObjective', 'type': 'str'}, - 'service_level_objective_id': {'key': 'serviceLevelObjectiveId', 'type': 'str'}, - 'in_range_time_ratio': {'key': 'inRangeTimeRatio', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(SloUsageMetric, self).__init__(**kwargs) - self.service_level_objective = None - self.service_level_objective_id = None - self.in_range_time_ratio = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric_py3.py deleted file mode 100644 index 6b221a8eb36f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SloUsageMetric(Model): - """A Slo Usage Metric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar service_level_objective: The serviceLevelObjective for SLO usage - metric. Possible values include: 'System', 'System0', 'System1', - 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', - 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', - 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', - 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', - 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', - 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', - 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', - 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - :vartype service_level_objective: str or - ~azure.mgmt.sql.models.ServiceObjectiveName - :ivar service_level_objective_id: The serviceLevelObjectiveId for SLO - usage metric. - :vartype service_level_objective_id: str - :ivar in_range_time_ratio: Gets or sets inRangeTimeRatio for SLO usage - metric. - :vartype in_range_time_ratio: float - """ - - _validation = { - 'service_level_objective': {'readonly': True}, - 'service_level_objective_id': {'readonly': True}, - 'in_range_time_ratio': {'readonly': True}, - } - - _attribute_map = { - 'service_level_objective': {'key': 'serviceLevelObjective', 'type': 'str'}, - 'service_level_objective_id': {'key': 'serviceLevelObjectiveId', 'type': 'str'}, - 'in_range_time_ratio': {'key': 'inRangeTimeRatio', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(SloUsageMetric, self).__init__(**kwargs) - self.service_level_objective = None - self.service_level_objective_id = None - self.in_range_time_ratio = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage.py deleted file mode 100644 index 5fe0b0fe90a0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SubscriptionUsage(ProxyResource): - """Usage Metric of a Subscription in a Location. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar display_name: User-readable name of the metric. - :vartype display_name: str - :ivar current_value: Current value of the metric. - :vartype current_value: float - :ivar limit: Boundary value of the metric. - :vartype limit: float - :ivar unit: Unit of the metric. - :vartype unit: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'current_value': {'key': 'properties.currentValue', 'type': 'float'}, - 'limit': {'key': 'properties.limit', 'type': 'float'}, - 'unit': {'key': 'properties.unit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubscriptionUsage, self).__init__(**kwargs) - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_paged.py deleted file mode 100644 index 14875f12bfe6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SubscriptionUsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`SubscriptionUsage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SubscriptionUsage]'} - } - - def __init__(self, *args, **kwargs): - - super(SubscriptionUsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_py3.py deleted file mode 100644 index d55e3275a74b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SubscriptionUsage(ProxyResource): - """Usage Metric of a Subscription in a Location. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar display_name: User-readable name of the metric. - :vartype display_name: str - :ivar current_value: Current value of the metric. - :vartype current_value: float - :ivar limit: Boundary value of the metric. - :vartype limit: float - :ivar unit: Unit of the metric. - :vartype unit: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'current_value': {'key': 'properties.currentValue', 'type': 'float'}, - 'limit': {'key': 'properties.limit', 'type': 'float'}, - 'unit': {'key': 'properties.unit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubscriptionUsage, self).__init__(**kwargs) - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent.py deleted file mode 100644 index c617de5bdf26..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SyncAgent(ProxyResource): - """An Azure SQL Database sync agent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar sync_agent_name: Name of the sync agent. - :vartype sync_agent_name: str - :param sync_database_id: ARM resource id of the sync database in the sync - agent. - :type sync_database_id: str - :ivar last_alive_time: Last alive time of the sync agent. - :vartype last_alive_time: datetime - :ivar state: State of the sync agent. Possible values include: 'Online', - 'Offline', 'NeverConnected' - :vartype state: str or ~azure.mgmt.sql.models.SyncAgentState - :ivar is_up_to_date: If the sync agent version is up to date. - :vartype is_up_to_date: bool - :ivar expiry_time: Expiration time of the sync agent version. - :vartype expiry_time: datetime - :ivar version: Version of the sync agent. - :vartype version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sync_agent_name': {'readonly': True}, - 'last_alive_time': {'readonly': True}, - 'state': {'readonly': True}, - 'is_up_to_date': {'readonly': True}, - 'expiry_time': {'readonly': True}, - 'version': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'sync_agent_name': {'key': 'properties.name', 'type': 'str'}, - 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, - 'last_alive_time': {'key': 'properties.lastAliveTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'is_up_to_date': {'key': 'properties.isUpToDate', 'type': 'bool'}, - 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncAgent, self).__init__(**kwargs) - self.sync_agent_name = None - self.sync_database_id = kwargs.get('sync_database_id', None) - self.last_alive_time = None - self.state = None - self.is_up_to_date = None - self.expiry_time = None - self.version = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties.py deleted file mode 100644 index da65194bc61a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncAgentKeyProperties(Model): - """Properties of an Azure SQL Database sync agent key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar sync_agent_key: Key of sync agent. - :vartype sync_agent_key: str - """ - - _validation = { - 'sync_agent_key': {'readonly': True}, - } - - _attribute_map = { - 'sync_agent_key': {'key': 'syncAgentKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncAgentKeyProperties, self).__init__(**kwargs) - self.sync_agent_key = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties_py3.py deleted file mode 100644 index 4230f4d95712..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncAgentKeyProperties(Model): - """Properties of an Azure SQL Database sync agent key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar sync_agent_key: Key of sync agent. - :vartype sync_agent_key: str - """ - - _validation = { - 'sync_agent_key': {'readonly': True}, - } - - _attribute_map = { - 'sync_agent_key': {'key': 'syncAgentKey', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncAgentKeyProperties, self).__init__(**kwargs) - self.sync_agent_key = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database.py deleted file mode 100644 index 597c51388f47..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SyncAgentLinkedDatabase(ProxyResource): - """An Azure SQL Database sync agent linked database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_type: Type of the sync agent linked database. Possible - values include: 'AzureSqlDatabase', 'SqlServerDatabase' - :vartype database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType - :ivar database_id: Id of the sync agent linked database. - :vartype database_id: str - :ivar description: Description of the sync agent linked database. - :vartype description: str - :ivar server_name: Server name of the sync agent linked database. - :vartype server_name: str - :ivar database_name: Database name of the sync agent linked database. - :vartype database_name: str - :ivar user_name: User name of the sync agent linked database. - :vartype user_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_type': {'readonly': True}, - 'database_id': {'readonly': True}, - 'description': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - 'user_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncAgentLinkedDatabase, self).__init__(**kwargs) - self.database_type = None - self.database_id = None - self.description = None - self.server_name = None - self.database_name = None - self.user_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_paged.py deleted file mode 100644 index 6c0fad6ae749..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncAgentLinkedDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncAgentLinkedDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncAgentLinkedDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncAgentLinkedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_py3.py deleted file mode 100644 index 7d92287e1a37..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SyncAgentLinkedDatabase(ProxyResource): - """An Azure SQL Database sync agent linked database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_type: Type of the sync agent linked database. Possible - values include: 'AzureSqlDatabase', 'SqlServerDatabase' - :vartype database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType - :ivar database_id: Id of the sync agent linked database. - :vartype database_id: str - :ivar description: Description of the sync agent linked database. - :vartype description: str - :ivar server_name: Server name of the sync agent linked database. - :vartype server_name: str - :ivar database_name: Database name of the sync agent linked database. - :vartype database_name: str - :ivar user_name: User name of the sync agent linked database. - :vartype user_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_type': {'readonly': True}, - 'database_id': {'readonly': True}, - 'description': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - 'user_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncAgentLinkedDatabase, self).__init__(**kwargs) - self.database_type = None - self.database_id = None - self.description = None - self.server_name = None - self.database_name = None - self.user_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_paged.py deleted file mode 100644 index 116fc542dbbd..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncAgentPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncAgent ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncAgent]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncAgentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_py3.py deleted file mode 100644 index f07649750457..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SyncAgent(ProxyResource): - """An Azure SQL Database sync agent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar sync_agent_name: Name of the sync agent. - :vartype sync_agent_name: str - :param sync_database_id: ARM resource id of the sync database in the sync - agent. - :type sync_database_id: str - :ivar last_alive_time: Last alive time of the sync agent. - :vartype last_alive_time: datetime - :ivar state: State of the sync agent. Possible values include: 'Online', - 'Offline', 'NeverConnected' - :vartype state: str or ~azure.mgmt.sql.models.SyncAgentState - :ivar is_up_to_date: If the sync agent version is up to date. - :vartype is_up_to_date: bool - :ivar expiry_time: Expiration time of the sync agent version. - :vartype expiry_time: datetime - :ivar version: Version of the sync agent. - :vartype version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sync_agent_name': {'readonly': True}, - 'last_alive_time': {'readonly': True}, - 'state': {'readonly': True}, - 'is_up_to_date': {'readonly': True}, - 'expiry_time': {'readonly': True}, - 'version': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'sync_agent_name': {'key': 'properties.name', 'type': 'str'}, - 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, - 'last_alive_time': {'key': 'properties.lastAliveTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'is_up_to_date': {'key': 'properties.isUpToDate', 'type': 'bool'}, - 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - } - - def __init__(self, *, sync_database_id: str=None, **kwargs) -> None: - super(SyncAgent, self).__init__(**kwargs) - self.sync_agent_name = None - self.sync_database_id = sync_database_id - self.last_alive_time = None - self.state = None - self.is_up_to_date = None - self.expiry_time = None - self.version = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties.py deleted file mode 100644 index 6dd5a323fd61..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncDatabaseIdProperties(Model): - """Properties of the sync database id. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: ARM resource id of sync database. - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncDatabaseIdProperties, self).__init__(**kwargs) - self.id = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_paged.py deleted file mode 100644 index 2f70734f930a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncDatabaseIdPropertiesPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncDatabaseIdProperties ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncDatabaseIdProperties]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncDatabaseIdPropertiesPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_py3.py deleted file mode 100644 index cdb7ce89c435..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncDatabaseIdProperties(Model): - """Properties of the sync database id. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: ARM resource id of sync database. - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncDatabaseIdProperties, self).__init__(**kwargs) - self.id = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties.py deleted file mode 100644 index 984d4c7a5d56..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaProperties(Model): - """Properties of the database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar tables: List of tables in the database full schema. - :vartype tables: list[~azure.mgmt.sql.models.SyncFullSchemaTable] - :ivar last_update_time: Last update time of the database schema. - :vartype last_update_time: datetime - """ - - _validation = { - 'tables': {'readonly': True}, - 'last_update_time': {'readonly': True}, - } - - _attribute_map = { - 'tables': {'key': 'tables', 'type': '[SyncFullSchemaTable]'}, - 'last_update_time': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(SyncFullSchemaProperties, self).__init__(**kwargs) - self.tables = None - self.last_update_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_paged.py deleted file mode 100644 index 20c3b2df16d4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncFullSchemaPropertiesPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncFullSchemaProperties ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncFullSchemaProperties]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncFullSchemaPropertiesPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_py3.py deleted file mode 100644 index b3d4a75c65bf..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaProperties(Model): - """Properties of the database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar tables: List of tables in the database full schema. - :vartype tables: list[~azure.mgmt.sql.models.SyncFullSchemaTable] - :ivar last_update_time: Last update time of the database schema. - :vartype last_update_time: datetime - """ - - _validation = { - 'tables': {'readonly': True}, - 'last_update_time': {'readonly': True}, - } - - _attribute_map = { - 'tables': {'key': 'tables', 'type': '[SyncFullSchemaTable]'}, - 'last_update_time': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncFullSchemaProperties, self).__init__(**kwargs) - self.tables = None - self.last_update_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table.py deleted file mode 100644 index dcec31c48f1c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaTable(Model): - """Properties of the table in the database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar columns: List of columns in the table of database full schema. - :vartype columns: list[~azure.mgmt.sql.models.SyncFullSchemaTableColumn] - :ivar error_id: Error id of the table. - :vartype error_id: str - :ivar has_error: If there is error in the table. - :vartype has_error: bool - :ivar name: Name of the table. - :vartype name: str - :ivar quoted_name: Quoted name of the table. - :vartype quoted_name: str - """ - - _validation = { - 'columns': {'readonly': True}, - 'error_id': {'readonly': True}, - 'has_error': {'readonly': True}, - 'name': {'readonly': True}, - 'quoted_name': {'readonly': True}, - } - - _attribute_map = { - 'columns': {'key': 'columns', 'type': '[SyncFullSchemaTableColumn]'}, - 'error_id': {'key': 'errorId', 'type': 'str'}, - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncFullSchemaTable, self).__init__(**kwargs) - self.columns = None - self.error_id = None - self.has_error = None - self.name = None - self.quoted_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column.py deleted file mode 100644 index 8eaa3659873b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaTableColumn(Model): - """Properties of the column in the table of database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar data_size: Data size of the column. - :vartype data_size: str - :ivar data_type: Data type of the column. - :vartype data_type: str - :ivar error_id: Error id of the column. - :vartype error_id: str - :ivar has_error: If there is error in the table. - :vartype has_error: bool - :ivar is_primary_key: If it is the primary key of the table. - :vartype is_primary_key: bool - :ivar name: Name of the column. - :vartype name: str - :ivar quoted_name: Quoted name of the column. - :vartype quoted_name: str - """ - - _validation = { - 'data_size': {'readonly': True}, - 'data_type': {'readonly': True}, - 'error_id': {'readonly': True}, - 'has_error': {'readonly': True}, - 'is_primary_key': {'readonly': True}, - 'name': {'readonly': True}, - 'quoted_name': {'readonly': True}, - } - - _attribute_map = { - 'data_size': {'key': 'dataSize', 'type': 'str'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'error_id': {'key': 'errorId', 'type': 'str'}, - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'is_primary_key': {'key': 'isPrimaryKey', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncFullSchemaTableColumn, self).__init__(**kwargs) - self.data_size = None - self.data_type = None - self.error_id = None - self.has_error = None - self.is_primary_key = None - self.name = None - self.quoted_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column_py3.py deleted file mode 100644 index 33df54b37b59..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaTableColumn(Model): - """Properties of the column in the table of database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar data_size: Data size of the column. - :vartype data_size: str - :ivar data_type: Data type of the column. - :vartype data_type: str - :ivar error_id: Error id of the column. - :vartype error_id: str - :ivar has_error: If there is error in the table. - :vartype has_error: bool - :ivar is_primary_key: If it is the primary key of the table. - :vartype is_primary_key: bool - :ivar name: Name of the column. - :vartype name: str - :ivar quoted_name: Quoted name of the column. - :vartype quoted_name: str - """ - - _validation = { - 'data_size': {'readonly': True}, - 'data_type': {'readonly': True}, - 'error_id': {'readonly': True}, - 'has_error': {'readonly': True}, - 'is_primary_key': {'readonly': True}, - 'name': {'readonly': True}, - 'quoted_name': {'readonly': True}, - } - - _attribute_map = { - 'data_size': {'key': 'dataSize', 'type': 'str'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'error_id': {'key': 'errorId', 'type': 'str'}, - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'is_primary_key': {'key': 'isPrimaryKey', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncFullSchemaTableColumn, self).__init__(**kwargs) - self.data_size = None - self.data_type = None - self.error_id = None - self.has_error = None - self.is_primary_key = None - self.name = None - self.quoted_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_py3.py deleted file mode 100644 index 194f50826875..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaTable(Model): - """Properties of the table in the database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar columns: List of columns in the table of database full schema. - :vartype columns: list[~azure.mgmt.sql.models.SyncFullSchemaTableColumn] - :ivar error_id: Error id of the table. - :vartype error_id: str - :ivar has_error: If there is error in the table. - :vartype has_error: bool - :ivar name: Name of the table. - :vartype name: str - :ivar quoted_name: Quoted name of the table. - :vartype quoted_name: str - """ - - _validation = { - 'columns': {'readonly': True}, - 'error_id': {'readonly': True}, - 'has_error': {'readonly': True}, - 'name': {'readonly': True}, - 'quoted_name': {'readonly': True}, - } - - _attribute_map = { - 'columns': {'key': 'columns', 'type': '[SyncFullSchemaTableColumn]'}, - 'error_id': {'key': 'errorId', 'type': 'str'}, - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncFullSchemaTable, self).__init__(**kwargs) - self.columns = None - self.error_id = None - self.has_error = None - self.name = None - self.quoted_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group.py deleted file mode 100644 index 5a252358a340..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SyncGroup(ProxyResource): - """An Azure SQL Database sync group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param interval: Sync interval of the sync group. - :type interval: int - :ivar last_sync_time: Last sync time of the sync group. - :vartype last_sync_time: datetime - :param conflict_resolution_policy: Conflict resolution policy of the sync - group. Possible values include: 'HubWin', 'MemberWin' - :type conflict_resolution_policy: str or - ~azure.mgmt.sql.models.SyncConflictResolutionPolicy - :param sync_database_id: ARM resource id of the sync database in the sync - group. - :type sync_database_id: str - :param hub_database_user_name: User name for the sync group hub database - credential. - :type hub_database_user_name: str - :param hub_database_password: Password for the sync group hub database - credential. - :type hub_database_password: str - :ivar sync_state: Sync state of the sync group. Possible values include: - 'NotReady', 'Error', 'Warning', 'Progressing', 'Good' - :vartype sync_state: str or ~azure.mgmt.sql.models.SyncGroupState - :param schema: Sync schema of the sync group. - :type schema: ~azure.mgmt.sql.models.SyncGroupSchema - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'last_sync_time': {'readonly': True}, - 'sync_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'interval': {'key': 'properties.interval', 'type': 'int'}, - 'last_sync_time': {'key': 'properties.lastSyncTime', 'type': 'iso-8601'}, - 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'str'}, - 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, - 'hub_database_user_name': {'key': 'properties.hubDatabaseUserName', 'type': 'str'}, - 'hub_database_password': {'key': 'properties.hubDatabasePassword', 'type': 'str'}, - 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, - 'schema': {'key': 'properties.schema', 'type': 'SyncGroupSchema'}, - } - - def __init__(self, **kwargs): - super(SyncGroup, self).__init__(**kwargs) - self.interval = kwargs.get('interval', None) - self.last_sync_time = None - self.conflict_resolution_policy = kwargs.get('conflict_resolution_policy', None) - self.sync_database_id = kwargs.get('sync_database_id', None) - self.hub_database_user_name = kwargs.get('hub_database_user_name', None) - self.hub_database_password = kwargs.get('hub_database_password', None) - self.sync_state = None - self.schema = kwargs.get('schema', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties.py deleted file mode 100644 index 22cb584b67be..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupLogProperties(Model): - """Properties of an Azure SQL Database sync group log. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar timestamp: Timestamp of the sync group log. - :vartype timestamp: datetime - :ivar type: Type of the sync group log. Possible values include: 'All', - 'Error', 'Warning', 'Success' - :vartype type: str or ~azure.mgmt.sql.models.SyncGroupLogType - :ivar source: Source of the sync group log. - :vartype source: str - :ivar details: Details of the sync group log. - :vartype details: str - :ivar tracing_id: TracingId of the sync group log. - :vartype tracing_id: str - :ivar operation_status: OperationStatus of the sync group log. - :vartype operation_status: str - """ - - _validation = { - 'timestamp': {'readonly': True}, - 'type': {'readonly': True}, - 'source': {'readonly': True}, - 'details': {'readonly': True}, - 'tracing_id': {'readonly': True}, - 'operation_status': {'readonly': True}, - } - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'str'}, - 'tracing_id': {'key': 'tracingId', 'type': 'str'}, - 'operation_status': {'key': 'operationStatus', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncGroupLogProperties, self).__init__(**kwargs) - self.timestamp = None - self.type = None - self.source = None - self.details = None - self.tracing_id = None - self.operation_status = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_paged.py deleted file mode 100644 index bc7e0c3e7750..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncGroupLogPropertiesPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncGroupLogProperties ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncGroupLogProperties]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncGroupLogPropertiesPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_py3.py deleted file mode 100644 index 067424b40232..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupLogProperties(Model): - """Properties of an Azure SQL Database sync group log. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar timestamp: Timestamp of the sync group log. - :vartype timestamp: datetime - :ivar type: Type of the sync group log. Possible values include: 'All', - 'Error', 'Warning', 'Success' - :vartype type: str or ~azure.mgmt.sql.models.SyncGroupLogType - :ivar source: Source of the sync group log. - :vartype source: str - :ivar details: Details of the sync group log. - :vartype details: str - :ivar tracing_id: TracingId of the sync group log. - :vartype tracing_id: str - :ivar operation_status: OperationStatus of the sync group log. - :vartype operation_status: str - """ - - _validation = { - 'timestamp': {'readonly': True}, - 'type': {'readonly': True}, - 'source': {'readonly': True}, - 'details': {'readonly': True}, - 'tracing_id': {'readonly': True}, - 'operation_status': {'readonly': True}, - } - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'str'}, - 'tracing_id': {'key': 'tracingId', 'type': 'str'}, - 'operation_status': {'key': 'operationStatus', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncGroupLogProperties, self).__init__(**kwargs) - self.timestamp = None - self.type = None - self.source = None - self.details = None - self.tracing_id = None - self.operation_status = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_paged.py deleted file mode 100644 index b20ca4d8e098..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncGroupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_py3.py deleted file mode 100644 index 1654af79245f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_py3.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SyncGroup(ProxyResource): - """An Azure SQL Database sync group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param interval: Sync interval of the sync group. - :type interval: int - :ivar last_sync_time: Last sync time of the sync group. - :vartype last_sync_time: datetime - :param conflict_resolution_policy: Conflict resolution policy of the sync - group. Possible values include: 'HubWin', 'MemberWin' - :type conflict_resolution_policy: str or - ~azure.mgmt.sql.models.SyncConflictResolutionPolicy - :param sync_database_id: ARM resource id of the sync database in the sync - group. - :type sync_database_id: str - :param hub_database_user_name: User name for the sync group hub database - credential. - :type hub_database_user_name: str - :param hub_database_password: Password for the sync group hub database - credential. - :type hub_database_password: str - :ivar sync_state: Sync state of the sync group. Possible values include: - 'NotReady', 'Error', 'Warning', 'Progressing', 'Good' - :vartype sync_state: str or ~azure.mgmt.sql.models.SyncGroupState - :param schema: Sync schema of the sync group. - :type schema: ~azure.mgmt.sql.models.SyncGroupSchema - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'last_sync_time': {'readonly': True}, - 'sync_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'interval': {'key': 'properties.interval', 'type': 'int'}, - 'last_sync_time': {'key': 'properties.lastSyncTime', 'type': 'iso-8601'}, - 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'str'}, - 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, - 'hub_database_user_name': {'key': 'properties.hubDatabaseUserName', 'type': 'str'}, - 'hub_database_password': {'key': 'properties.hubDatabasePassword', 'type': 'str'}, - 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, - 'schema': {'key': 'properties.schema', 'type': 'SyncGroupSchema'}, - } - - def __init__(self, *, interval: int=None, conflict_resolution_policy=None, sync_database_id: str=None, hub_database_user_name: str=None, hub_database_password: str=None, schema=None, **kwargs) -> None: - super(SyncGroup, self).__init__(**kwargs) - self.interval = interval - self.last_sync_time = None - self.conflict_resolution_policy = conflict_resolution_policy - self.sync_database_id = sync_database_id - self.hub_database_user_name = hub_database_user_name - self.hub_database_password = hub_database_password - self.sync_state = None - self.schema = schema diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema.py deleted file mode 100644 index ece05d7301d0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchema(Model): - """Properties of sync group schema. - - :param tables: List of tables in sync group schema. - :type tables: list[~azure.mgmt.sql.models.SyncGroupSchemaTable] - :param master_sync_member_name: Name of master sync member where the - schema is from. - :type master_sync_member_name: str - """ - - _attribute_map = { - 'tables': {'key': 'tables', 'type': '[SyncGroupSchemaTable]'}, - 'master_sync_member_name': {'key': 'masterSyncMemberName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncGroupSchema, self).__init__(**kwargs) - self.tables = kwargs.get('tables', None) - self.master_sync_member_name = kwargs.get('master_sync_member_name', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_py3.py deleted file mode 100644 index b26d4b1b791c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchema(Model): - """Properties of sync group schema. - - :param tables: List of tables in sync group schema. - :type tables: list[~azure.mgmt.sql.models.SyncGroupSchemaTable] - :param master_sync_member_name: Name of master sync member where the - schema is from. - :type master_sync_member_name: str - """ - - _attribute_map = { - 'tables': {'key': 'tables', 'type': '[SyncGroupSchemaTable]'}, - 'master_sync_member_name': {'key': 'masterSyncMemberName', 'type': 'str'}, - } - - def __init__(self, *, tables=None, master_sync_member_name: str=None, **kwargs) -> None: - super(SyncGroupSchema, self).__init__(**kwargs) - self.tables = tables - self.master_sync_member_name = master_sync_member_name diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table.py deleted file mode 100644 index cf83bba5825d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchemaTable(Model): - """Properties of table in sync group schema. - - :param columns: List of columns in sync group schema. - :type columns: list[~azure.mgmt.sql.models.SyncGroupSchemaTableColumn] - :param quoted_name: Quoted name of sync group schema table. - :type quoted_name: str - """ - - _attribute_map = { - 'columns': {'key': 'columns', 'type': '[SyncGroupSchemaTableColumn]'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncGroupSchemaTable, self).__init__(**kwargs) - self.columns = kwargs.get('columns', None) - self.quoted_name = kwargs.get('quoted_name', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column.py deleted file mode 100644 index 705810d1d2a3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchemaTableColumn(Model): - """Properties of column in sync group table. - - :param quoted_name: Quoted name of sync group table column. - :type quoted_name: str - :param data_size: Data size of the column. - :type data_size: str - :param data_type: Data type of the column. - :type data_type: str - """ - - _attribute_map = { - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - 'data_size': {'key': 'dataSize', 'type': 'str'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncGroupSchemaTableColumn, self).__init__(**kwargs) - self.quoted_name = kwargs.get('quoted_name', None) - self.data_size = kwargs.get('data_size', None) - self.data_type = kwargs.get('data_type', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column_py3.py deleted file mode 100644 index bb8cce2d8c34..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchemaTableColumn(Model): - """Properties of column in sync group table. - - :param quoted_name: Quoted name of sync group table column. - :type quoted_name: str - :param data_size: Data size of the column. - :type data_size: str - :param data_type: Data type of the column. - :type data_type: str - """ - - _attribute_map = { - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - 'data_size': {'key': 'dataSize', 'type': 'str'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - } - - def __init__(self, *, quoted_name: str=None, data_size: str=None, data_type: str=None, **kwargs) -> None: - super(SyncGroupSchemaTableColumn, self).__init__(**kwargs) - self.quoted_name = quoted_name - self.data_size = data_size - self.data_type = data_type diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_py3.py deleted file mode 100644 index ecbbd26a576d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchemaTable(Model): - """Properties of table in sync group schema. - - :param columns: List of columns in sync group schema. - :type columns: list[~azure.mgmt.sql.models.SyncGroupSchemaTableColumn] - :param quoted_name: Quoted name of sync group schema table. - :type quoted_name: str - """ - - _attribute_map = { - 'columns': {'key': 'columns', 'type': '[SyncGroupSchemaTableColumn]'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, *, columns=None, quoted_name: str=None, **kwargs) -> None: - super(SyncGroupSchemaTable, self).__init__(**kwargs) - self.columns = columns - self.quoted_name = quoted_name diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member.py deleted file mode 100644 index 1474c6320dc1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SyncMember(ProxyResource): - """An Azure SQL Database sync member. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param database_type: Database type of the sync member. Possible values - include: 'AzureSqlDatabase', 'SqlServerDatabase' - :type database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType - :param sync_agent_id: ARM resource id of the sync agent in the sync - member. - :type sync_agent_id: str - :param sql_server_database_id: SQL Server database id of the sync member. - :type sql_server_database_id: str - :param server_name: Server name of the member database in the sync member - :type server_name: str - :param database_name: Database name of the member database in the sync - member. - :type database_name: str - :param user_name: User name of the member database in the sync member. - :type user_name: str - :param password: Password of the member database in the sync member. - :type password: str - :param sync_direction: Sync direction of the sync member. Possible values - include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember' - :type sync_direction: str or ~azure.mgmt.sql.models.SyncDirection - :ivar sync_state: Sync state of the sync member. Possible values include: - 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', - 'DisabledTombstoneCleanup', 'DisabledBackupRestore', - 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', - 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', - 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', - 'ReprovisionFailed', 'UnReprovisioned' - :vartype sync_state: str or ~azure.mgmt.sql.models.SyncMemberState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sync_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, - 'sync_agent_id': {'key': 'properties.syncAgentId', 'type': 'str'}, - 'sql_server_database_id': {'key': 'properties.sqlServerDatabaseId', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'sync_direction': {'key': 'properties.syncDirection', 'type': 'str'}, - 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncMember, self).__init__(**kwargs) - self.database_type = kwargs.get('database_type', None) - self.sync_agent_id = kwargs.get('sync_agent_id', None) - self.sql_server_database_id = kwargs.get('sql_server_database_id', None) - self.server_name = kwargs.get('server_name', None) - self.database_name = kwargs.get('database_name', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.sync_direction = kwargs.get('sync_direction', None) - self.sync_state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_paged.py deleted file mode 100644 index 68bddeeeec1b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncMemberPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncMember ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncMember]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncMemberPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_py3.py deleted file mode 100644 index 50cf8fe2d65c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_py3.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SyncMember(ProxyResource): - """An Azure SQL Database sync member. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param database_type: Database type of the sync member. Possible values - include: 'AzureSqlDatabase', 'SqlServerDatabase' - :type database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType - :param sync_agent_id: ARM resource id of the sync agent in the sync - member. - :type sync_agent_id: str - :param sql_server_database_id: SQL Server database id of the sync member. - :type sql_server_database_id: str - :param server_name: Server name of the member database in the sync member - :type server_name: str - :param database_name: Database name of the member database in the sync - member. - :type database_name: str - :param user_name: User name of the member database in the sync member. - :type user_name: str - :param password: Password of the member database in the sync member. - :type password: str - :param sync_direction: Sync direction of the sync member. Possible values - include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember' - :type sync_direction: str or ~azure.mgmt.sql.models.SyncDirection - :ivar sync_state: Sync state of the sync member. Possible values include: - 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', - 'DisabledTombstoneCleanup', 'DisabledBackupRestore', - 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', - 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', - 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', - 'ReprovisionFailed', 'UnReprovisioned' - :vartype sync_state: str or ~azure.mgmt.sql.models.SyncMemberState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sync_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, - 'sync_agent_id': {'key': 'properties.syncAgentId', 'type': 'str'}, - 'sql_server_database_id': {'key': 'properties.sqlServerDatabaseId', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'sync_direction': {'key': 'properties.syncDirection', 'type': 'str'}, - 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, - } - - def __init__(self, *, database_type=None, sync_agent_id: str=None, sql_server_database_id: str=None, server_name: str=None, database_name: str=None, user_name: str=None, password: str=None, sync_direction=None, **kwargs) -> None: - super(SyncMember, self).__init__(**kwargs) - self.database_type = database_type - self.sync_agent_id = sync_agent_id - self.sql_server_database_id = sql_server_database_id - self.server_name = server_name - self.database_name = database_name - self.user_name = user_name - self.password = password - self.sync_direction = sync_direction - self.sync_state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate.py deleted file mode 100644 index 1171ee8adf94..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class TdeCertificate(ProxyResource): - """A TDE certificate that can be uploaded into a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param private_blob: Required. The base64 encoded certificate private - blob. - :type private_blob: str - :param cert_password: The certificate password. - :type cert_password: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'private_blob': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'private_blob': {'key': 'properties.privateBlob', 'type': 'str'}, - 'cert_password': {'key': 'properties.certPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TdeCertificate, self).__init__(**kwargs) - self.private_blob = kwargs.get('private_blob', None) - self.cert_password = kwargs.get('cert_password', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate_py3.py deleted file mode 100644 index b4e54453cae1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class TdeCertificate(ProxyResource): - """A TDE certificate that can be uploaded into a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param private_blob: Required. The base64 encoded certificate private - blob. - :type private_blob: str - :param cert_password: The certificate password. - :type cert_password: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'private_blob': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'private_blob': {'key': 'properties.privateBlob', 'type': 'str'}, - 'cert_password': {'key': 'properties.certPassword', 'type': 'str'}, - } - - def __init__(self, *, private_blob: str, cert_password: str=None, **kwargs) -> None: - super(TdeCertificate, self).__init__(**kwargs) - self.private_blob = private_blob - self.cert_password = cert_password diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource.py deleted file mode 100644 index dc99e096cf18..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class TrackedResource(Resource): - """ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TrackedResource, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource_py3.py deleted file mode 100644 index 5edf04ac0a73..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class TrackedResource(Resource): - """ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(TrackedResource, self).__init__(**kwargs) - self.location = location - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption.py deleted file mode 100644 index 4270fa860c1d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class TransparentDataEncryption(ProxyResource): - """Represents a database transparent data encryption configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :param status: The status of the database transparent data encryption. - Possible values include: 'Enabled', 'Disabled' - :type status: str or - ~azure.mgmt.sql.models.TransparentDataEncryptionStatus - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'TransparentDataEncryptionStatus'}, - } - - def __init__(self, **kwargs): - super(TransparentDataEncryption, self).__init__(**kwargs) - self.location = None - self.status = kwargs.get('status', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity.py deleted file mode 100644 index 60e9505eba4c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class TransparentDataEncryptionActivity(ProxyResource): - """Represents a database transparent data encryption Scan. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar status: The status of the database. Possible values include: - 'Encrypting', 'Decrypting' - :vartype status: str or - ~azure.mgmt.sql.models.TransparentDataEncryptionActivityStatus - :ivar percent_complete: The percent complete of the transparent data - encryption scan for a database. - :vartype percent_complete: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, - 'percent_complete': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(TransparentDataEncryptionActivity, self).__init__(**kwargs) - self.location = None - self.status = None - self.percent_complete = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_paged.py deleted file mode 100644 index b86dce24923c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class TransparentDataEncryptionActivityPaged(Paged): - """ - A paging container for iterating over a list of :class:`TransparentDataEncryptionActivity ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TransparentDataEncryptionActivity]'} - } - - def __init__(self, *args, **kwargs): - - super(TransparentDataEncryptionActivityPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_py3.py deleted file mode 100644 index 9bf146137c20..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class TransparentDataEncryptionActivity(ProxyResource): - """Represents a database transparent data encryption Scan. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar status: The status of the database. Possible values include: - 'Encrypting', 'Decrypting' - :vartype status: str or - ~azure.mgmt.sql.models.TransparentDataEncryptionActivityStatus - :ivar percent_complete: The percent complete of the transparent data - encryption scan for a database. - :vartype percent_complete: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, - 'percent_complete': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(TransparentDataEncryptionActivity, self).__init__(**kwargs) - self.location = None - self.status = None - self.percent_complete = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_py3.py deleted file mode 100644 index db2b2096f798..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class TransparentDataEncryption(ProxyResource): - """Represents a database transparent data encryption configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :param status: The status of the database transparent data encryption. - Possible values include: 'Enabled', 'Disabled' - :type status: str or - ~azure.mgmt.sql.models.TransparentDataEncryptionStatus - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'TransparentDataEncryptionStatus'}, - } - - def __init__(self, *, status=None, **kwargs) -> None: - super(TransparentDataEncryption, self).__init__(**kwargs) - self.location = None - self.status = status diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster.py deleted file mode 100644 index a3c9dd04abca..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class VirtualCluster(TrackedResource): - """An Azure SQL virtual cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :ivar subnet_id: Subnet resource ID for the virtual cluster. - :vartype subnet_id: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :ivar child_resources: List of resources in this virtual cluster. - :vartype child_resources: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'subnet_id': {'readonly': True}, - 'child_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'family': {'key': 'properties.family', 'type': 'str'}, - 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualCluster, self).__init__(**kwargs) - self.subnet_id = None - self.family = kwargs.get('family', None) - self.child_resources = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_paged.py deleted file mode 100644 index 865bbd5e9f86..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualClusterPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_py3.py deleted file mode 100644 index e11fb730e2be..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class VirtualCluster(TrackedResource): - """An Azure SQL virtual cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :ivar subnet_id: Subnet resource ID for the virtual cluster. - :vartype subnet_id: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :ivar child_resources: List of resources in this virtual cluster. - :vartype child_resources: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'subnet_id': {'readonly': True}, - 'child_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'family': {'key': 'properties.family', 'type': 'str'}, - 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, - } - - def __init__(self, *, location: str, tags=None, family: str=None, **kwargs) -> None: - super(VirtualCluster, self).__init__(location=location, tags=tags, **kwargs) - self.subnet_id = None - self.family = family - self.child_resources = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update.py deleted file mode 100644 index c6604df3568a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualClusterUpdate(Model): - """An update request for an Azure SQL Database virtual cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar subnet_id: Subnet resource ID for the virtual cluster. - :vartype subnet_id: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :ivar child_resources: List of resources in this virtual cluster. - :vartype child_resources: list[str] - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'subnet_id': {'readonly': True}, - 'child_resources': {'readonly': True}, - } - - _attribute_map = { - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'family': {'key': 'properties.family', 'type': 'str'}, - 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(VirtualClusterUpdate, self).__init__(**kwargs) - self.subnet_id = None - self.family = kwargs.get('family', None) - self.child_resources = None - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update_py3.py deleted file mode 100644 index ec26101b089a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualClusterUpdate(Model): - """An update request for an Azure SQL Database virtual cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar subnet_id: Subnet resource ID for the virtual cluster. - :vartype subnet_id: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :ivar child_resources: List of resources in this virtual cluster. - :vartype child_resources: list[str] - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'subnet_id': {'readonly': True}, - 'child_resources': {'readonly': True}, - } - - _attribute_map = { - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'family': {'key': 'properties.family', 'type': 'str'}, - 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, family: str=None, tags=None, **kwargs) -> None: - super(VirtualClusterUpdate, self).__init__(**kwargs) - self.subnet_id = None - self.family = family - self.child_resources = None - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule.py deleted file mode 100644 index 0960e4289c66..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class VirtualNetworkRule(ProxyResource): - """A virtual network rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param virtual_network_subnet_id: Required. The ARM resource id of the - virtual network subnet. - :type virtual_network_subnet_id: str - :param ignore_missing_vnet_service_endpoint: Create firewall rule before - the virtual network has vnet service endpoint enabled. - :type ignore_missing_vnet_service_endpoint: bool - :ivar state: Virtual Network Rule State. Possible values include: - 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' - :vartype state: str or ~azure.mgmt.sql.models.VirtualNetworkRuleState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_subnet_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, - 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualNetworkRule, self).__init__(**kwargs) - self.virtual_network_subnet_id = kwargs.get('virtual_network_subnet_id', None) - self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_paged.py deleted file mode 100644 index 1cc23039a558..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualNetworkRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualNetworkRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualNetworkRule]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualNetworkRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_py3.py deleted file mode 100644 index 19e6bd30ff5e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class VirtualNetworkRule(ProxyResource): - """A virtual network rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param virtual_network_subnet_id: Required. The ARM resource id of the - virtual network subnet. - :type virtual_network_subnet_id: str - :param ignore_missing_vnet_service_endpoint: Create firewall rule before - the virtual network has vnet service endpoint enabled. - :type ignore_missing_vnet_service_endpoint: bool - :ivar state: Virtual Network Rule State. Possible values include: - 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' - :vartype state: str or ~azure.mgmt.sql.models.VirtualNetworkRuleState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_subnet_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, - 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, *, virtual_network_subnet_id: str, ignore_missing_vnet_service_endpoint: bool=None, **kwargs) -> None: - super(VirtualNetworkRule, self).__init__(**kwargs) - self.virtual_network_subnet_id = virtual_network_subnet_id - self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties.py deleted file mode 100644 index e7d424543f2b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VulnerabilityAssessmentRecurringScansProperties(Model): - """Properties of a Vulnerability Assessment recurring scans. - - :param is_enabled: Recurring scans state. - :type is_enabled: bool - :param email_subscription_admins: Specifies that the schedule scan - notification will be is sent to the subscription administrators. Default - value: True . - :type email_subscription_admins: bool - :param emails: Specifies an array of e-mail addresses to which the scan - notification is sent. - :type emails: list[str] - """ - - _attribute_map = { - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'}, - 'emails': {'key': 'emails', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs) - self.is_enabled = kwargs.get('is_enabled', None) - self.email_subscription_admins = kwargs.get('email_subscription_admins', True) - self.emails = kwargs.get('emails', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py deleted file mode 100644 index 3a55afaa0a5e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VulnerabilityAssessmentRecurringScansProperties(Model): - """Properties of a Vulnerability Assessment recurring scans. - - :param is_enabled: Recurring scans state. - :type is_enabled: bool - :param email_subscription_admins: Specifies that the schedule scan - notification will be is sent to the subscription administrators. Default - value: True . - :type email_subscription_admins: bool - :param emails: Specifies an array of e-mail addresses to which the scan - notification is sent. - :type emails: list[str] - """ - - _attribute_map = { - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'}, - 'emails': {'key': 'emails', 'type': '[str]'}, - } - - def __init__(self, *, is_enabled: bool=None, email_subscription_admins: bool=True, emails=None, **kwargs) -> None: - super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs) - self.is_enabled = is_enabled - self.email_subscription_admins = email_subscription_admins - self.emails = emails diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error.py deleted file mode 100644 index 1d465691ba60..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VulnerabilityAssessmentScanError(Model): - """Properties of a vulnerability assessment scan error. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VulnerabilityAssessmentScanError, self).__init__(**kwargs) - self.code = None - self.message = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error_py3.py deleted file mode 100644 index 93c13998eb25..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VulnerabilityAssessmentScanError(Model): - """Properties of a vulnerability assessment scan error. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(VulnerabilityAssessmentScanError, self).__init__(**kwargs) - self.code = None - self.message = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record.py deleted file mode 100644 index 67a6d163f90c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class VulnerabilityAssessmentScanRecord(ProxyResource): - """A vulnerability assessment scan record. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar scan_id: The scan ID. - :vartype scan_id: str - :ivar trigger_type: The scan trigger type. Possible values include: - 'OnDemand', 'Recurring' - :vartype trigger_type: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentScanTriggerType - :ivar state: The scan status. Possible values include: 'Passed', 'Failed', - 'FailedToRun', 'InProgress' - :vartype state: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentScanState - :ivar start_time: The scan start time (UTC). - :vartype start_time: datetime - :ivar end_time: The scan end time (UTC). - :vartype end_time: datetime - :ivar errors: The scan errors. - :vartype errors: - list[~azure.mgmt.sql.models.VulnerabilityAssessmentScanError] - :ivar storage_container_path: The scan results storage container path. - :vartype storage_container_path: str - :ivar number_of_failed_security_checks: The number of failed security - checks. - :vartype number_of_failed_security_checks: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'scan_id': {'readonly': True}, - 'trigger_type': {'readonly': True}, - 'state': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'errors': {'readonly': True}, - 'storage_container_path': {'readonly': True}, - 'number_of_failed_security_checks': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'scan_id': {'key': 'properties.scanId', 'type': 'str'}, - 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'errors': {'key': 'properties.errors', 'type': '[VulnerabilityAssessmentScanError]'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'number_of_failed_security_checks': {'key': 'properties.numberOfFailedSecurityChecks', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(VulnerabilityAssessmentScanRecord, self).__init__(**kwargs) - self.scan_id = None - self.trigger_type = None - self.state = None - self.start_time = None - self.end_time = None - self.errors = None - self.storage_container_path = None - self.number_of_failed_security_checks = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_paged.py deleted file mode 100644 index 7076acc9290f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VulnerabilityAssessmentScanRecordPaged(Paged): - """ - A paging container for iterating over a list of :class:`VulnerabilityAssessmentScanRecord ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VulnerabilityAssessmentScanRecord]'} - } - - def __init__(self, *args, **kwargs): - - super(VulnerabilityAssessmentScanRecordPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_py3.py deleted file mode 100644 index e31d141065af..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class VulnerabilityAssessmentScanRecord(ProxyResource): - """A vulnerability assessment scan record. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar scan_id: The scan ID. - :vartype scan_id: str - :ivar trigger_type: The scan trigger type. Possible values include: - 'OnDemand', 'Recurring' - :vartype trigger_type: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentScanTriggerType - :ivar state: The scan status. Possible values include: 'Passed', 'Failed', - 'FailedToRun', 'InProgress' - :vartype state: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentScanState - :ivar start_time: The scan start time (UTC). - :vartype start_time: datetime - :ivar end_time: The scan end time (UTC). - :vartype end_time: datetime - :ivar errors: The scan errors. - :vartype errors: - list[~azure.mgmt.sql.models.VulnerabilityAssessmentScanError] - :ivar storage_container_path: The scan results storage container path. - :vartype storage_container_path: str - :ivar number_of_failed_security_checks: The number of failed security - checks. - :vartype number_of_failed_security_checks: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'scan_id': {'readonly': True}, - 'trigger_type': {'readonly': True}, - 'state': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'errors': {'readonly': True}, - 'storage_container_path': {'readonly': True}, - 'number_of_failed_security_checks': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'scan_id': {'key': 'properties.scanId', 'type': 'str'}, - 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'errors': {'key': 'properties.errors', 'type': '[VulnerabilityAssessmentScanError]'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'number_of_failed_security_checks': {'key': 'properties.numberOfFailedSecurityChecks', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(VulnerabilityAssessmentScanRecord, self).__init__(**kwargs) - self.scan_id = None - self.trigger_type = None - self.state = None - self.start_time = None - self.end_time = None - self.errors = None - self.storage_container_path = None - self.number_of_failed_security_checks = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py index 3db410ac9cd7..57aa89c2fe9a 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py @@ -9,86 +9,88 @@ # regenerated. # -------------------------------------------------------------------------- -from .recoverable_databases_operations import RecoverableDatabasesOperations -from .restorable_dropped_databases_operations import RestorableDroppedDatabasesOperations -from .servers_operations import ServersOperations -from .server_connection_policies_operations import ServerConnectionPoliciesOperations -from .database_threat_detection_policies_operations import DatabaseThreatDetectionPoliciesOperations -from .data_masking_policies_operations import DataMaskingPoliciesOperations -from .data_masking_rules_operations import DataMaskingRulesOperations -from .firewall_rules_operations import FirewallRulesOperations -from .geo_backup_policies_operations import GeoBackupPoliciesOperations -from .databases_operations import DatabasesOperations -from .elastic_pools_operations import ElasticPoolsOperations -from .recommended_elastic_pools_operations import RecommendedElasticPoolsOperations -from .replication_links_operations import ReplicationLinksOperations -from .server_azure_ad_administrators_operations import ServerAzureADAdministratorsOperations -from .server_communication_links_operations import ServerCommunicationLinksOperations -from .service_objectives_operations import ServiceObjectivesOperations -from .elastic_pool_activities_operations import ElasticPoolActivitiesOperations -from .elastic_pool_database_activities_operations import ElasticPoolDatabaseActivitiesOperations -from .service_tier_advisors_operations import ServiceTierAdvisorsOperations -from .transparent_data_encryptions_operations import TransparentDataEncryptionsOperations -from .transparent_data_encryption_activities_operations import TransparentDataEncryptionActivitiesOperations -from .server_usages_operations import ServerUsagesOperations -from .database_usages_operations import DatabaseUsagesOperations -from .database_automatic_tuning_operations import DatabaseAutomaticTuningOperations -from .encryption_protectors_operations import EncryptionProtectorsOperations -from .failover_groups_operations import FailoverGroupsOperations -from .managed_instances_operations import ManagedInstancesOperations -from .operations import Operations -from .server_keys_operations import ServerKeysOperations -from .sync_agents_operations import SyncAgentsOperations -from .sync_groups_operations import SyncGroupsOperations -from .sync_members_operations import SyncMembersOperations -from .subscription_usages_operations import SubscriptionUsagesOperations -from .virtual_clusters_operations import VirtualClustersOperations -from .virtual_network_rules_operations import VirtualNetworkRulesOperations -from .extended_database_blob_auditing_policies_operations import ExtendedDatabaseBlobAuditingPoliciesOperations -from .extended_server_blob_auditing_policies_operations import ExtendedServerBlobAuditingPoliciesOperations -from .server_blob_auditing_policies_operations import ServerBlobAuditingPoliciesOperations -from .database_blob_auditing_policies_operations import DatabaseBlobAuditingPoliciesOperations -from .database_vulnerability_assessment_rule_baselines_operations import DatabaseVulnerabilityAssessmentRuleBaselinesOperations -from .database_vulnerability_assessments_operations import DatabaseVulnerabilityAssessmentsOperations -from .job_agents_operations import JobAgentsOperations -from .job_credentials_operations import JobCredentialsOperations -from .job_executions_operations import JobExecutionsOperations -from .jobs_operations import JobsOperations -from .job_step_executions_operations import JobStepExecutionsOperations -from .job_steps_operations import JobStepsOperations -from .job_target_executions_operations import JobTargetExecutionsOperations -from .job_target_groups_operations import JobTargetGroupsOperations -from .job_versions_operations import JobVersionsOperations -from .long_term_retention_backups_operations import LongTermRetentionBackupsOperations -from .backup_long_term_retention_policies_operations import BackupLongTermRetentionPoliciesOperations -from .managed_backup_short_term_retention_policies_operations import ManagedBackupShortTermRetentionPoliciesOperations -from .managed_databases_operations import ManagedDatabasesOperations -from .managed_restorable_dropped_database_backup_short_term_retention_policies_operations import ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations -from .server_automatic_tuning_operations import ServerAutomaticTuningOperations -from .server_dns_aliases_operations import ServerDnsAliasesOperations -from .server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations -from .restorable_dropped_managed_databases_operations import RestorableDroppedManagedDatabasesOperations -from .restore_points_operations import RestorePointsOperations -from .managed_database_security_alert_policies_operations import ManagedDatabaseSecurityAlertPoliciesOperations -from .managed_server_security_alert_policies_operations import ManagedServerSecurityAlertPoliciesOperations -from .sensitivity_labels_operations import SensitivityLabelsOperations -from .database_operations import DatabaseOperations -from .elastic_pool_operations import ElasticPoolOperations -from .capabilities_operations import CapabilitiesOperations -from .database_vulnerability_assessment_scans_operations import DatabaseVulnerabilityAssessmentScansOperations -from .managed_database_vulnerability_assessment_rule_baselines_operations import ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations -from .managed_database_vulnerability_assessment_scans_operations import ManagedDatabaseVulnerabilityAssessmentScansOperations -from .managed_database_vulnerability_assessments_operations import ManagedDatabaseVulnerabilityAssessmentsOperations -from .instance_failover_groups_operations import InstanceFailoverGroupsOperations -from .backup_short_term_retention_policies_operations import BackupShortTermRetentionPoliciesOperations -from .tde_certificates_operations import TdeCertificatesOperations -from .managed_instance_tde_certificates_operations import ManagedInstanceTdeCertificatesOperations -from .managed_instance_keys_operations import ManagedInstanceKeysOperations -from .managed_instance_encryption_protectors_operations import ManagedInstanceEncryptionProtectorsOperations -from .recoverable_managed_databases_operations import RecoverableManagedDatabasesOperations -from .managed_instance_vulnerability_assessments_operations import ManagedInstanceVulnerabilityAssessmentsOperations -from .server_vulnerability_assessments_operations import ServerVulnerabilityAssessmentsOperations -from .managed_database_sensitivity_labels_operations import ManagedDatabaseSensitivityLabelsOperations +from ._recoverable_databases_operations import RecoverableDatabasesOperations +from ._restorable_dropped_databases_operations import RestorableDroppedDatabasesOperations +from ._servers_operations import ServersOperations +from ._server_connection_policies_operations import ServerConnectionPoliciesOperations +from ._database_threat_detection_policies_operations import DatabaseThreatDetectionPoliciesOperations +from ._data_masking_policies_operations import DataMaskingPoliciesOperations +from ._data_masking_rules_operations import DataMaskingRulesOperations +from ._firewall_rules_operations import FirewallRulesOperations +from ._geo_backup_policies_operations import GeoBackupPoliciesOperations +from ._databases_operations import DatabasesOperations +from ._elastic_pools_operations import ElasticPoolsOperations +from ._recommended_elastic_pools_operations import RecommendedElasticPoolsOperations +from ._replication_links_operations import ReplicationLinksOperations +from ._server_azure_ad_administrators_operations import ServerAzureADAdministratorsOperations +from ._server_communication_links_operations import ServerCommunicationLinksOperations +from ._service_objectives_operations import ServiceObjectivesOperations +from ._elastic_pool_activities_operations import ElasticPoolActivitiesOperations +from ._elastic_pool_database_activities_operations import ElasticPoolDatabaseActivitiesOperations +from ._service_tier_advisors_operations import ServiceTierAdvisorsOperations +from ._transparent_data_encryptions_operations import TransparentDataEncryptionsOperations +from ._transparent_data_encryption_activities_operations import TransparentDataEncryptionActivitiesOperations +from ._server_usages_operations import ServerUsagesOperations +from ._database_usages_operations import DatabaseUsagesOperations +from ._database_automatic_tuning_operations import DatabaseAutomaticTuningOperations +from ._encryption_protectors_operations import EncryptionProtectorsOperations +from ._failover_groups_operations import FailoverGroupsOperations +from ._operations import Operations +from ._server_keys_operations import ServerKeysOperations +from ._sync_agents_operations import SyncAgentsOperations +from ._sync_groups_operations import SyncGroupsOperations +from ._sync_members_operations import SyncMembersOperations +from ._subscription_usages_operations import SubscriptionUsagesOperations +from ._virtual_clusters_operations import VirtualClustersOperations +from ._virtual_network_rules_operations import VirtualNetworkRulesOperations +from ._extended_database_blob_auditing_policies_operations import ExtendedDatabaseBlobAuditingPoliciesOperations +from ._extended_server_blob_auditing_policies_operations import ExtendedServerBlobAuditingPoliciesOperations +from ._server_blob_auditing_policies_operations import ServerBlobAuditingPoliciesOperations +from ._database_blob_auditing_policies_operations import DatabaseBlobAuditingPoliciesOperations +from ._database_vulnerability_assessment_rule_baselines_operations import DatabaseVulnerabilityAssessmentRuleBaselinesOperations +from ._database_vulnerability_assessments_operations import DatabaseVulnerabilityAssessmentsOperations +from ._job_agents_operations import JobAgentsOperations +from ._job_credentials_operations import JobCredentialsOperations +from ._job_executions_operations import JobExecutionsOperations +from ._jobs_operations import JobsOperations +from ._job_step_executions_operations import JobStepExecutionsOperations +from ._job_steps_operations import JobStepsOperations +from ._job_target_executions_operations import JobTargetExecutionsOperations +from ._job_target_groups_operations import JobTargetGroupsOperations +from ._job_versions_operations import JobVersionsOperations +from ._long_term_retention_backups_operations import LongTermRetentionBackupsOperations +from ._backup_long_term_retention_policies_operations import BackupLongTermRetentionPoliciesOperations +from ._managed_backup_short_term_retention_policies_operations import ManagedBackupShortTermRetentionPoliciesOperations +from ._managed_databases_operations import ManagedDatabasesOperations +from ._managed_restorable_dropped_database_backup_short_term_retention_policies_operations import ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations +from ._server_automatic_tuning_operations import ServerAutomaticTuningOperations +from ._server_dns_aliases_operations import ServerDnsAliasesOperations +from ._server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations +from ._restorable_dropped_managed_databases_operations import RestorableDroppedManagedDatabasesOperations +from ._restore_points_operations import RestorePointsOperations +from ._managed_database_security_alert_policies_operations import ManagedDatabaseSecurityAlertPoliciesOperations +from ._managed_server_security_alert_policies_operations import ManagedServerSecurityAlertPoliciesOperations +from ._sensitivity_labels_operations import SensitivityLabelsOperations +from ._database_operations import DatabaseOperations +from ._elastic_pool_operations import ElasticPoolOperations +from ._capabilities_operations import CapabilitiesOperations +from ._database_vulnerability_assessment_scans_operations import DatabaseVulnerabilityAssessmentScansOperations +from ._managed_database_vulnerability_assessment_rule_baselines_operations import ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations +from ._managed_database_vulnerability_assessment_scans_operations import ManagedDatabaseVulnerabilityAssessmentScansOperations +from ._managed_database_vulnerability_assessments_operations import ManagedDatabaseVulnerabilityAssessmentsOperations +from ._instance_failover_groups_operations import InstanceFailoverGroupsOperations +from ._backup_short_term_retention_policies_operations import BackupShortTermRetentionPoliciesOperations +from ._tde_certificates_operations import TdeCertificatesOperations +from ._managed_instance_tde_certificates_operations import ManagedInstanceTdeCertificatesOperations +from ._managed_instance_keys_operations import ManagedInstanceKeysOperations +from ._managed_instance_encryption_protectors_operations import ManagedInstanceEncryptionProtectorsOperations +from ._recoverable_managed_databases_operations import RecoverableManagedDatabasesOperations +from ._managed_instance_vulnerability_assessments_operations import ManagedInstanceVulnerabilityAssessmentsOperations +from ._server_vulnerability_assessments_operations import ServerVulnerabilityAssessmentsOperations +from ._managed_database_sensitivity_labels_operations import ManagedDatabaseSensitivityLabelsOperations +from ._instance_pools_operations import InstancePoolsOperations +from ._usages_operations import UsagesOperations +from ._managed_instances_operations import ManagedInstancesOperations __all__ = [ 'RecoverableDatabasesOperations', @@ -117,7 +119,6 @@ 'DatabaseAutomaticTuningOperations', 'EncryptionProtectorsOperations', 'FailoverGroupsOperations', - 'ManagedInstancesOperations', 'Operations', 'ServerKeysOperations', 'SyncAgentsOperations', @@ -171,4 +172,7 @@ 'ManagedInstanceVulnerabilityAssessmentsOperations', 'ServerVulnerabilityAssessmentsOperations', 'ManagedDatabaseSensitivityLabelsOperations', + 'InstancePoolsOperations', + 'UsagesOperations', + 'ManagedInstancesOperations', ] diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_long_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_long_term_retention_policies_operations.py similarity index 99% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_long_term_retention_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_long_term_retention_policies_operations.py index c42ba1ab812b..532ce23b9aef 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_long_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_long_term_retention_policies_operations.py @@ -21,6 +21,8 @@ class BackupLongTermRetentionPoliciesOperations(object): """BackupLongTermRetentionPoliciesOperations 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. @@ -99,7 +101,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BackupLongTermRetentionPolicy', response) @@ -275,7 +276,6 @@ def list_by_database( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BackupLongTermRetentionPolicy', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_short_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_short_term_retention_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_short_term_retention_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_short_term_retention_policies_operations.py index c7957810c281..1fab2366624f 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_short_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_short_term_retention_policies_operations.py @@ -21,6 +21,8 @@ class BackupShortTermRetentionPoliciesOperations(object): """BackupShortTermRetentionPoliciesOperations 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. @@ -99,7 +101,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BackupShortTermRetentionPolicy', response) @@ -354,8 +355,7 @@ def list_by_database( ~azure.mgmt.sql.models.BackupShortTermRetentionPolicyPaged[~azure.mgmt.sql.models.BackupShortTermRetentionPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -387,6 +387,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -397,12 +402,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.BackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.BackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.BackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/capabilities_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_capabilities_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/capabilities_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_capabilities_operations.py index a873a3a87f92..755f2dd6c70f 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/capabilities_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_capabilities_operations.py @@ -19,6 +19,8 @@ class CapabilitiesOperations(object): """CapabilitiesOperations 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. @@ -93,7 +95,6 @@ def list_by_location( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LocationCapabilities', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_policies_operations.py index 2d1099c8be0d..3d51678f036d 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_policies_operations.py @@ -19,6 +19,8 @@ class DataMaskingPoliciesOperations(object): """DataMaskingPoliciesOperations 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. @@ -111,7 +113,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DataMaskingPolicy', response) @@ -179,7 +180,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DataMaskingPolicy', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_rules_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_rules_operations.py similarity index 96% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_rules_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_rules_operations.py index c5fd4c63ab46..4430f4d7bc9c 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_rules_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_rules_operations.py @@ -19,6 +19,8 @@ class DataMaskingRulesOperations(object): """DataMaskingRulesOperations 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. @@ -106,7 +108,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DataMaskingRule', response) if response.status_code == 201: @@ -141,8 +142,7 @@ def list_by_database( ~azure.mgmt.sql.models.DataMaskingRulePaged[~azure.mgmt.sql.models.DataMaskingRule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -175,6 +175,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -185,12 +190,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DataMaskingRulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DataMaskingRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DataMaskingRulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_automatic_tuning_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_automatic_tuning_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_automatic_tuning_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_automatic_tuning_operations.py index 7a94b97b9546..30b493d10191 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_automatic_tuning_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_automatic_tuning_operations.py @@ -19,6 +19,8 @@ class DatabaseAutomaticTuningOperations(object): """DatabaseAutomaticTuningOperations 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. @@ -93,7 +95,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseAutomaticTuning', response) @@ -172,7 +173,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseAutomaticTuning', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_blob_auditing_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_blob_auditing_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_blob_auditing_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_blob_auditing_policies_operations.py index a0c09cfd8f09..873e1dc55d36 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_blob_auditing_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_blob_auditing_policies_operations.py @@ -19,6 +19,8 @@ class DatabaseBlobAuditingPoliciesOperations(object): """DatabaseBlobAuditingPoliciesOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseBlobAuditingPolicy', response) @@ -170,7 +171,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseBlobAuditingPolicy', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_operations.py index 8d482411f199..9fdb5969fcff 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_operations.py @@ -19,6 +19,8 @@ class DatabaseOperations(object): """DatabaseOperations 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. @@ -120,8 +122,7 @@ def list_by_database( ~azure.mgmt.sql.models.DatabaseOperationPaged[~azure.mgmt.sql.models.DatabaseOperation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -153,6 +154,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -163,12 +169,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabaseOperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabaseOperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabaseOperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_threat_detection_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_threat_detection_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_threat_detection_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_threat_detection_policies_operations.py index 38501854c428..888228ba55d3 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_threat_detection_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_threat_detection_policies_operations.py @@ -19,6 +19,8 @@ class DatabaseThreatDetectionPoliciesOperations(object): """DatabaseThreatDetectionPoliciesOperations 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. @@ -97,7 +99,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseSecurityAlertPolicy', response) @@ -172,7 +173,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseSecurityAlertPolicy', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_usages_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_usages_operations.py similarity index 92% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_usages_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_usages_operations.py index 543a8ba6f509..8cf8df83a5a8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_usages_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_usages_operations.py @@ -19,6 +19,8 @@ class DatabaseUsagesOperations(object): """DatabaseUsagesOperations 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. @@ -59,8 +61,7 @@ def list_by_database( ~azure.mgmt.sql.models.DatabaseUsagePaged[~azure.mgmt.sql.models.DatabaseUsage] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -92,6 +93,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -102,12 +108,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabaseUsagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabaseUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabaseUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/usages'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_rule_baselines_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_rule_baselines_operations.py similarity index 99% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_rule_baselines_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_rule_baselines_operations.py index 9dba003a5ff2..8e04b1fbc4a1 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_rule_baselines_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_rule_baselines_operations.py @@ -19,6 +19,8 @@ class DatabaseVulnerabilityAssessmentRuleBaselinesOperations(object): """DatabaseVulnerabilityAssessmentRuleBaselinesOperations 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. @@ -109,7 +111,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentRuleBaseline', response) @@ -199,7 +200,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentRuleBaseline', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_scans_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_scans_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_scans_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_scans_operations.py index 97725d782e9e..06efd2638038 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_scans_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_scans_operations.py @@ -21,6 +21,8 @@ class DatabaseVulnerabilityAssessmentScansOperations(object): """DatabaseVulnerabilityAssessmentScansOperations 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. @@ -64,8 +66,7 @@ def list_by_database( ~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecordPaged[~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecord] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -98,6 +99,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -108,12 +114,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans'} @@ -180,7 +184,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VulnerabilityAssessmentScanRecord', response) @@ -345,7 +348,6 @@ def export( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentScansExport', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessments_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessments_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessments_operations.py index 5fa6a1ef7ade..4fbf4f24a995 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessments_operations.py @@ -19,6 +19,8 @@ class DatabaseVulnerabilityAssessmentsOperations(object): """DatabaseVulnerabilityAssessmentsOperations 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. @@ -98,7 +100,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessment', response) @@ -175,7 +176,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessment', response) if response.status_code == 201: @@ -271,8 +271,7 @@ def list_by_database( ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentPaged[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessment] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -304,6 +303,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -314,12 +318,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_databases_operations.py similarity index 92% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_databases_operations.py index 3b4e01e8a397..e3b5174323da 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_databases_operations.py @@ -21,6 +21,8 @@ class DatabasesOperations(object): """DatabasesOperations 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. @@ -390,8 +392,7 @@ def list_metrics( """ api_version = "2014-04-01" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metrics.metadata['url'] @@ -424,6 +425,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -434,12 +440,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metrics'} @@ -468,8 +472,7 @@ def list_metric_definitions( """ api_version = "2014-04-01" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metric_definitions.metadata['url'] @@ -501,6 +504,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -511,12 +519,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metricDefinitions'} @@ -630,8 +636,7 @@ def list_by_server( """ api_version = "2017-10-01-preview" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -662,6 +667,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -672,12 +682,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases'} @@ -740,7 +748,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Database', response) @@ -1080,8 +1087,7 @@ def list_by_elastic_pool( """ api_version = "2017-10-01-preview" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_elastic_pool.metadata['url'] @@ -1113,6 +1119,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -1123,12 +1134,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_elastic_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases'} @@ -1402,3 +1411,90 @@ def rename( client_raw_response = ClientRawResponse(None, response) return client_raw_response rename.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/move'} + + + def _failover_initial( + self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): + api_version = "2018-06-01-preview" + + # Construct URL + url = self.failover.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def failover( + self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Failovers a database. + + :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 server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database to failover. + :type database_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._failover_initial( + resource_group_name=resource_group_name, + server_name=server_name, + database_name=database_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) + failover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/failover'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_activities_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_activities_operations.py similarity index 92% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_activities_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_activities_operations.py index a2d2dc49c203..3fb2cfc9bb14 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_activities_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_activities_operations.py @@ -19,6 +19,8 @@ class ElasticPoolActivitiesOperations(object): """ElasticPoolActivitiesOperations 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. @@ -60,8 +62,7 @@ def list_by_elastic_pool( ~azure.mgmt.sql.models.ElasticPoolActivityPaged[~azure.mgmt.sql.models.ElasticPoolActivity] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_elastic_pool.metadata['url'] @@ -93,6 +94,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -103,12 +109,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ElasticPoolActivityPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ElasticPoolActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ElasticPoolActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_elastic_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolActivity'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_database_activities_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_database_activities_operations.py similarity index 92% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_database_activities_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_database_activities_operations.py index 5ed1492b9615..6280285c5e59 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_database_activities_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_database_activities_operations.py @@ -19,6 +19,8 @@ class ElasticPoolDatabaseActivitiesOperations(object): """ElasticPoolDatabaseActivitiesOperations 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. @@ -59,8 +61,7 @@ def list_by_elastic_pool( ~azure.mgmt.sql.models.ElasticPoolDatabaseActivityPaged[~azure.mgmt.sql.models.ElasticPoolDatabaseActivity] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_elastic_pool.metadata['url'] @@ -92,6 +93,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -102,12 +108,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ElasticPoolDatabaseActivityPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ElasticPoolDatabaseActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ElasticPoolDatabaseActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_elastic_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolDatabaseActivity'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_operations.py index eb71face0db1..26dd59fe4abf 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_operations.py @@ -19,6 +19,8 @@ class ElasticPoolOperations(object): """ElasticPoolOperations 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. @@ -120,8 +122,7 @@ def list_by_elastic_pool( ~azure.mgmt.sql.models.ElasticPoolOperationPaged[~azure.mgmt.sql.models.ElasticPoolOperation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_elastic_pool.metadata['url'] @@ -153,6 +154,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -163,12 +169,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ElasticPoolOperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ElasticPoolOperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ElasticPoolOperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_elastic_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/operations'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pools_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pools_operations.py similarity index 85% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pools_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pools_operations.py index e7fba924b0c6..8f780c6995e1 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pools_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pools_operations.py @@ -21,6 +21,8 @@ class ElasticPoolsOperations(object): """ElasticPoolsOperations 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. @@ -64,8 +66,7 @@ def list_metrics( """ api_version = "2014-04-01" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metrics.metadata['url'] @@ -98,6 +99,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -108,12 +114,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metrics'} @@ -142,8 +146,7 @@ def list_metric_definitions( """ api_version = "2014-04-01" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metric_definitions.metadata['url'] @@ -175,6 +178,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -185,12 +193,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metricDefinitions'} @@ -219,8 +225,7 @@ def list_by_server( """ api_version = "2017-10-01-preview" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -253,6 +258,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -263,12 +273,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ElasticPoolPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ElasticPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ElasticPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools'} @@ -331,7 +339,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ElasticPool', response) @@ -646,3 +653,90 @@ def get_long_running_output(response): 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.Sql/servers/{serverName}/elasticPools/{elasticPoolName}'} + + + def _failover_initial( + self, resource_group_name, server_name, elastic_pool_name, custom_headers=None, raw=False, **operation_config): + api_version = "2018-06-01-preview" + + # Construct URL + url = self.failover.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'elasticPoolName': self._serialize.url("elastic_pool_name", elastic_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def failover( + self, resource_group_name, server_name, elastic_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Failovers an elastic pool. + + :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 server_name: The name of the server. + :type server_name: str + :param elastic_pool_name: The name of the elastic pool to failover. + :type elastic_pool_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._failover_initial( + resource_group_name=resource_group_name, + server_name=server_name, + elastic_pool_name=elastic_pool_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) + failover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/failover'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/encryption_protectors_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_encryption_protectors_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/encryption_protectors_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_encryption_protectors_operations.py index d19233971f4c..4ee94af811f2 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/encryption_protectors_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_encryption_protectors_operations.py @@ -21,6 +21,8 @@ class EncryptionProtectorsOperations(object): """EncryptionProtectorsOperations 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. @@ -61,8 +63,7 @@ def list_by_server( ~azure.mgmt.sql.models.EncryptionProtectorPaged[~azure.mgmt.sql.models.EncryptionProtector] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -93,6 +94,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -103,12 +109,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.EncryptionProtectorPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.EncryptionProtectorPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.EncryptionProtectorPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector'} @@ -167,7 +171,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('EncryptionProtector', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_database_blob_auditing_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_database_blob_auditing_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_database_blob_auditing_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_database_blob_auditing_policies_operations.py index 38bdfb2a0875..ea9c9d8d7aaf 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_database_blob_auditing_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_database_blob_auditing_policies_operations.py @@ -19,6 +19,8 @@ class ExtendedDatabaseBlobAuditingPoliciesOperations(object): """ExtendedDatabaseBlobAuditingPoliciesOperations 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. @@ -97,7 +99,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ExtendedDatabaseBlobAuditingPolicy', response) @@ -173,7 +174,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ExtendedDatabaseBlobAuditingPolicy', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_server_blob_auditing_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_server_blob_auditing_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_server_blob_auditing_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_server_blob_auditing_policies_operations.py index 64524eb42a17..dff8fac62031 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_server_blob_auditing_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_server_blob_auditing_policies_operations.py @@ -21,6 +21,8 @@ class ExtendedServerBlobAuditingPoliciesOperations(object): """ExtendedServerBlobAuditingPoliciesOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ExtendedServerBlobAuditingPolicy', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/failover_groups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_failover_groups_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/failover_groups_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_failover_groups_operations.py index fb779255c2a8..797c0d27ab17 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/failover_groups_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_failover_groups_operations.py @@ -21,6 +21,8 @@ class FailoverGroupsOperations(object): """FailoverGroupsOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('FailoverGroup', response) @@ -430,8 +431,7 @@ def list_by_server( ~azure.mgmt.sql.models.FailoverGroupPaged[~azure.mgmt.sql.models.FailoverGroup] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -462,6 +462,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -472,12 +477,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.FailoverGroupPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.FailoverGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.FailoverGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/firewall_rules_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_firewall_rules_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/firewall_rules_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_firewall_rules_operations.py index 7f62a3fa0811..e211cff58cbb 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/firewall_rules_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_firewall_rules_operations.py @@ -19,6 +19,8 @@ class FirewallRulesOperations(object): """FirewallRulesOperations 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. @@ -107,7 +109,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('FirewallRule', response) if response.status_code == 201: @@ -234,7 +235,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('FirewallRule', response) @@ -265,8 +265,7 @@ def list_by_server( ~azure.mgmt.sql.models.FirewallRulePaged[~azure.mgmt.sql.models.FirewallRule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -297,6 +296,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -307,12 +311,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.FirewallRulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.FirewallRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.FirewallRulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/geo_backup_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_geo_backup_policies_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/geo_backup_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_geo_backup_policies_operations.py index bd81aeca5fa6..e3b1cc9cd7ec 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/geo_backup_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_geo_backup_policies_operations.py @@ -19,6 +19,8 @@ class GeoBackupPoliciesOperations(object): """GeoBackupPoliciesOperations 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. @@ -105,7 +107,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('GeoBackupPolicy', response) if response.status_code == 201: @@ -175,7 +176,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('GeoBackupPolicy', response) @@ -208,8 +208,7 @@ def list_by_database( ~azure.mgmt.sql.models.GeoBackupPolicyPaged[~azure.mgmt.sql.models.GeoBackupPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -241,6 +240,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -251,12 +255,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.GeoBackupPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.GeoBackupPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.GeoBackupPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/instance_failover_groups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_failover_groups_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/instance_failover_groups_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_failover_groups_operations.py index 795d169692ab..33960af71031 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/instance_failover_groups_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_failover_groups_operations.py @@ -21,6 +21,8 @@ class InstanceFailoverGroupsOperations(object): """InstanceFailoverGroupsOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('InstanceFailoverGroup', response) @@ -323,8 +324,7 @@ def list_by_location( ~azure.mgmt.sql.models.InstanceFailoverGroupPaged[~azure.mgmt.sql.models.InstanceFailoverGroup] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_location.metadata['url'] @@ -355,6 +355,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -365,12 +370,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.InstanceFailoverGroupPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.InstanceFailoverGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.InstanceFailoverGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_pools_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_pools_operations.py new file mode 100644 index 000000000000..43721ed26b1b --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_pools_operations.py @@ -0,0 +1,534 @@ +# 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 InstancePoolsOperations(object): + """InstancePoolsOperations 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: The API version to use for the request. Constant value: "2018-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01-preview" + + self.config = config + + def get( + self, resource_group_name, instance_pool_name, custom_headers=None, raw=False, **operation_config): + """Gets an instance pool. + + :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 instance_pool_name: The name of the instance pool to be + retrieved. + :type instance_pool_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: InstancePool or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.InstancePool or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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('InstancePool', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}'} + + + def _create_or_update_initial( + self, resource_group_name, instance_pool_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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(parameters, 'InstancePool') + + # 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, 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('InstancePool', response) + if response.status_code == 201: + deserialized = self._deserialize('InstancePool', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, instance_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates an instance pool. + + :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 instance_pool_name: The name of the instance pool to be created + or updated. + :type instance_pool_name: str + :param parameters: The requested instance pool resource state. + :type parameters: ~azure.mgmt.sql.models.InstancePool + :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 InstancePool or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.InstancePool] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.InstancePool]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + instance_pool_name=instance_pool_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('InstancePool', 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.Sql/instancePools/{instancePoolName}'} + + + def _delete_initial( + self, resource_group_name, instance_pool_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, instance_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an instance pool. + + :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 instance_pool_name: The name of the instance pool to be deleted + :type instance_pool_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, + instance_pool_name=instance_pool_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.Sql/instancePools/{instancePoolName}'} + + + def _update_initial( + self, resource_group_name, instance_pool_name, tags=None, custom_headers=None, raw=False, **operation_config): + parameters = models.InstancePoolUpdate(tags=tags) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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(parameters, 'InstancePoolUpdate') + + # 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('InstancePool', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, instance_pool_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates an instance pool. + + :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 instance_pool_name: The name of the instance pool to be + updated. + :type instance_pool_name: str + :param tags: Resource tags. + :type tags: dict[str, 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 InstancePool or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.InstancePool] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.InstancePool]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + instance_pool_name=instance_pool_name, + tags=tags, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('InstancePool', 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.Sql/instancePools/{instancePoolName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of instance pools in the resource group. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :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: An iterator like instance of InstancePool + :rtype: + ~azure.mgmt.sql.models.InstancePoolPaged[~azure.mgmt.sql.models.InstancePool] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.InstancePoolPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of all instance pools in the subscription. + + :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: An iterator like instance of InstancePool + :rtype: + ~azure.mgmt.sql.models.InstancePoolPaged[~azure.mgmt.sql.models.InstancePool] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.InstancePoolPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/instancePools'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_agents_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_agents_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_agents_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_agents_operations.py index eaeb4480cab8..a6641946abaf 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_agents_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_agents_operations.py @@ -21,6 +21,8 @@ class JobAgentsOperations(object): """JobAgentsOperations 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. @@ -59,8 +61,7 @@ def list_by_server( ~azure.mgmt.sql.models.JobAgentPaged[~azure.mgmt.sql.models.JobAgent] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -91,6 +92,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -101,12 +107,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobAgentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobAgentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobAgentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents'} @@ -167,7 +171,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobAgent', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_credentials_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_credentials_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_credentials_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_credentials_operations.py index 309d5212b81e..9c469c605600 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_credentials_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_credentials_operations.py @@ -19,6 +19,8 @@ class JobCredentialsOperations(object): """JobCredentialsOperations 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. @@ -59,8 +61,7 @@ def list_by_agent( ~azure.mgmt.sql.models.JobCredentialPaged[~azure.mgmt.sql.models.JobCredential] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_agent.metadata['url'] @@ -92,6 +93,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -102,12 +108,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobCredentialPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobCredentialPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobCredentialPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials'} @@ -171,7 +175,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobCredential', response) @@ -251,7 +254,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobCredential', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_executions_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_executions_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_executions_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_executions_operations.py index f874991f8510..71885bdb661e 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_executions_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_executions_operations.py @@ -21,6 +21,8 @@ class JobExecutionsOperations(object): """JobExecutionsOperations 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. @@ -80,8 +82,7 @@ def list_by_agent( ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_agent.metadata['url'] @@ -127,6 +128,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -137,12 +143,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/executions'} @@ -357,8 +361,7 @@ def list_by_job( ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_job.metadata['url'] @@ -405,6 +408,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -415,12 +423,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions'} @@ -487,7 +493,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobExecution', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_step_executions_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_step_executions_operations.py similarity index 96% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_step_executions_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_step_executions_operations.py index 92c6442fc7e5..8410a94138e8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_step_executions_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_step_executions_operations.py @@ -19,6 +19,8 @@ class JobStepExecutionsOperations(object): """JobStepExecutionsOperations 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. @@ -82,8 +84,7 @@ def list_by_job_execution( ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_job_execution.metadata['url'] @@ -131,6 +132,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -141,12 +147,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_job_execution.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps'} @@ -216,7 +220,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobExecution', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_steps_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_steps_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_steps_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_steps_operations.py index a37bfc3f4474..e7383e961171 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_steps_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_steps_operations.py @@ -19,6 +19,8 @@ class JobStepsOperations(object): """JobStepsOperations 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. @@ -63,8 +65,7 @@ def list_by_version( ~azure.mgmt.sql.models.JobStepPaged[~azure.mgmt.sql.models.JobStep] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_version.metadata['url'] @@ -98,6 +99,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -108,12 +114,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobStepPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobStepPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobStepPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps'} @@ -183,7 +187,6 @@ def get_by_version( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobStep', response) @@ -218,8 +221,7 @@ def list_by_job( ~azure.mgmt.sql.models.JobStepPaged[~azure.mgmt.sql.models.JobStep] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_job.metadata['url'] @@ -252,6 +254,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -262,12 +269,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobStepPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobStepPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobStepPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps'} @@ -334,7 +339,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobStep', response) @@ -414,7 +418,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobStep', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_executions_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_executions_operations.py similarity index 96% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_executions_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_executions_operations.py index 6c664709c063..a6722c0278bc 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_executions_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_executions_operations.py @@ -19,6 +19,8 @@ class JobTargetExecutionsOperations(object): """JobTargetExecutionsOperations 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. @@ -82,8 +84,7 @@ def list_by_job_execution( ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_job_execution.metadata['url'] @@ -131,6 +132,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -141,12 +147,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_job_execution.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/targets'} @@ -198,8 +202,7 @@ def list_by_step( ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_step.metadata['url'] @@ -248,6 +251,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -258,12 +266,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_step.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets'} @@ -336,7 +342,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobExecution', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_groups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_groups_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_groups_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_groups_operations.py index 6a8bf6eed349..a3769c0e2bcb 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_groups_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_groups_operations.py @@ -19,6 +19,8 @@ class JobTargetGroupsOperations(object): """JobTargetGroupsOperations 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. @@ -59,8 +61,7 @@ def list_by_agent( ~azure.mgmt.sql.models.JobTargetGroupPaged[~azure.mgmt.sql.models.JobTargetGroup] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_agent.metadata['url'] @@ -92,6 +93,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -102,12 +108,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobTargetGroupPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobTargetGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobTargetGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups'} @@ -171,7 +175,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobTargetGroup', response) @@ -249,7 +252,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobTargetGroup', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_versions_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_versions_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_versions_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_versions_operations.py index d03635534ff4..da92973e0695 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_versions_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_versions_operations.py @@ -19,6 +19,8 @@ class JobVersionsOperations(object): """JobVersionsOperations 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. @@ -61,8 +63,7 @@ def list_by_job( ~azure.mgmt.sql.models.JobVersionPaged[~azure.mgmt.sql.models.JobVersion] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_job.metadata['url'] @@ -95,6 +96,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -105,12 +111,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobVersionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobVersionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobVersionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions'} @@ -177,7 +181,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobVersion', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/jobs_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_jobs_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/jobs_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_jobs_operations.py index 2545fc1514e5..f0830d089829 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/jobs_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_jobs_operations.py @@ -19,6 +19,8 @@ class JobsOperations(object): """JobsOperations 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. @@ -58,8 +60,7 @@ def list_by_agent( :rtype: ~azure.mgmt.sql.models.JobPaged[~azure.mgmt.sql.models.Job] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_agent.metadata['url'] @@ -91,6 +92,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -101,12 +107,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs'} @@ -170,7 +174,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Job', response) @@ -250,7 +253,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Job', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_backups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_backups_operations.py new file mode 100644 index 000000000000..55a0bbdd777a --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_backups_operations.py @@ -0,0 +1,880 @@ +# 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 LongTermRetentionBackupsOperations(object): + """LongTermRetentionBackupsOperations 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: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-01-preview" + + self.config = config + + def get_by_resource_group( + self, resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): + """Gets a long term retention backup. + + :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 location_name: The location of the database. + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param backup_name: The backup name. + :type backup_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: LongTermRetentionBackup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.LongTermRetentionBackup or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'backupName': self._serialize.url("backup_name", backup_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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('LongTermRetentionBackup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} + + + def _delete_by_resource_group_initial( + self, resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'backupName': self._serialize.url("backup_name", backup_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.delete(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete_by_resource_group( + self, resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a long term retention backup. + + :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 location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param backup_name: The backup name. + :type backup_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_by_resource_group_initial( + resource_group_name=resource_group_name, + location_name=location_name, + long_term_retention_server_name=long_term_retention_server_name, + long_term_retention_database_name=long_term_retention_database_name, + backup_name=backup_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_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} + + def list_by_resource_group_database( + self, resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists all long term retention backups for a database. + + :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 location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group_database.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups'} + + def list_by_resource_group_location( + self, resource_group_name, location_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists the long term retention backups for a given location. + + :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 location_name: The location of the database + :type location_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group_location.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group_location.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups'} + + def list_by_resource_group_server( + self, resource_group_name, location_name, long_term_retention_server_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists the long term retention backups for a given 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 location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group_server.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups'} + + def get( + self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): + """Gets a long term retention backup. + + :param location_name: The location of the database. + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param backup_name: The backup name. + :type backup_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: LongTermRetentionBackup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.LongTermRetentionBackup or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'backupName': self._serialize.url("backup_name", backup_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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('LongTermRetentionBackup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} + + + def _delete_initial( + self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'backupName': self._serialize.url("backup_name", backup_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.delete(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a long term retention backup. + + :param location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param backup_name: The backup name. + :type backup_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( + location_name=location_name, + long_term_retention_server_name=long_term_retention_server_name, + long_term_retention_database_name=long_term_retention_database_name, + backup_name=backup_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}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} + + def list_by_database( + self, location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists all long term retention backups for a database. + + :param location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_database.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups'} + + def list_by_location( + self, location_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists the long term retention backups for a given location. + + :param location_name: The location of the database + :type location_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_location.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups'} + + def list_by_server( + self, location_name, long_term_retention_server_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists the long term retention backups for a given server. + + :param location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_backup_short_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_backup_short_term_retention_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_backup_short_term_retention_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_backup_short_term_retention_policies_operations.py index 8f50f44b5354..475f8b2228e1 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_backup_short_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_backup_short_term_retention_policies_operations.py @@ -21,6 +21,8 @@ class ManagedBackupShortTermRetentionPoliciesOperations(object): """ManagedBackupShortTermRetentionPoliciesOperations 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. @@ -99,7 +101,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedBackupShortTermRetentionPolicy', response) @@ -355,8 +356,7 @@ def list_by_database( ~azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicyPaged[~azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -388,6 +388,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -398,12 +403,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_security_alert_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_security_alert_policies_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_security_alert_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_security_alert_policies_operations.py index 87ba42c8193a..c1f7467d795c 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_security_alert_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_security_alert_policies_operations.py @@ -19,6 +19,8 @@ class ManagedDatabaseSecurityAlertPoliciesOperations(object): """ManagedDatabaseSecurityAlertPoliciesOperations 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. @@ -98,7 +100,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedDatabaseSecurityAlertPolicy', response) @@ -175,7 +176,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedDatabaseSecurityAlertPolicy', response) if response.status_code == 201: @@ -212,8 +212,7 @@ def list_by_database( ~azure.mgmt.sql.models.ManagedDatabaseSecurityAlertPolicyPaged[~azure.mgmt.sql.models.ManagedDatabaseSecurityAlertPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -245,6 +244,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -255,12 +259,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedDatabaseSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedDatabaseSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedDatabaseSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_sensitivity_labels_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_sensitivity_labels_operations.py similarity index 70% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_sensitivity_labels_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_sensitivity_labels_operations.py index 1b03564854f8..5ff97dd77a49 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_sensitivity_labels_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_sensitivity_labels_operations.py @@ -19,12 +19,13 @@ class ManagedDatabaseSensitivityLabelsOperations(object): """ManagedDatabaseSensitivityLabelsOperations 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: The API version to use for the request. Constant value: "2018-06-01-preview". - :ivar sensitivity_label_source: The source of the sensitivity label. Constant value: "current". """ models = models @@ -35,7 +36,6 @@ def __init__(self, client, config, serializer, deserializer): self._serialize = serializer self._deserialize = deserializer self.api_version = "2018-06-01-preview" - self.sensitivity_label_source = "current" self.config = config @@ -109,7 +109,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SensitivityLabel', response) @@ -150,6 +149,8 @@ def create_or_update( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + sensitivity_label_source = "current" + # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { @@ -159,7 +160,7 @@ def create_or_update( 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), 'tableName': self._serialize.url("table_name", table_name, 'str'), 'columnName': self._serialize.url("column_name", column_name, 'str'), - 'sensitivityLabelSource': self._serialize.url("self.sensitivity_label_source", self.sensitivity_label_source, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -192,7 +193,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SensitivityLabel', response) if response.status_code == 201: @@ -232,6 +232,8 @@ def delete( :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + sensitivity_label_source = "current" + # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -241,7 +243,7 @@ def delete( 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), 'tableName': self._serialize.url("table_name", table_name, 'str'), 'columnName': self._serialize.url("column_name", column_name, 'str'), - 'sensitivityLabelSource': self._serialize.url("self.sensitivity_label_source", self.sensitivity_label_source, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -273,6 +275,147 @@ def delete( return client_raw_response delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}'} + def disable_recommendation( + self, resource_group_name, managed_instance_name, database_name, schema_name, table_name, column_name, custom_headers=None, raw=False, **operation_config): + """Disables sensitivity recommendations on a given column. + + :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 managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param database_name: The name of the database. + :type database_name: str + :param schema_name: The name of the schema. + :type schema_name: str + :param table_name: The name of the table. + :type table_name: str + :param column_name: The name of the column. + :type column_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` + """ + sensitivity_label_source = "recommended" + + # Construct URL + url = self.disable_recommendation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str'), + 'columnName': self._serialize.url("column_name", column_name, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_recommendation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable'} + + def enable_recommendation( + self, resource_group_name, managed_instance_name, database_name, schema_name, table_name, column_name, custom_headers=None, raw=False, **operation_config): + """Enables sensitivity recommendations on a given column (recommendations + are enabled by default on all columns). + + :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 managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param database_name: The name of the database. + :type database_name: str + :param schema_name: The name of the schema. + :type schema_name: str + :param table_name: The name of the table. + :type table_name: str + :param column_name: The name of the column. + :type column_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` + """ + sensitivity_label_source = "recommended" + + # Construct URL + url = self.enable_recommendation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str'), + 'columnName': self._serialize.url("column_name", column_name, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + enable_recommendation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable'} + def list_current_by_database( self, resource_group_name, managed_instance_name, database_name, filter=None, custom_headers=None, raw=False, **operation_config): """Gets the sensitivity labels of a given database. @@ -298,8 +441,7 @@ def list_current_by_database( ~azure.mgmt.sql.models.SensitivityLabelPaged[~azure.mgmt.sql.models.SensitivityLabel] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_current_by_database.metadata['url'] @@ -333,6 +475,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -343,18 +490,16 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_current_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels'} def list_recommended_by_database( - self, resource_group_name, managed_instance_name, database_name, skip_token=None, filter=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, managed_instance_name, database_name, include_disabled_recommendations=None, skip_token=None, filter=None, custom_headers=None, raw=False, **operation_config): """Gets the sensitivity labels of a given database. :param resource_group_name: The name of the resource group that @@ -365,6 +510,9 @@ def list_recommended_by_database( :type managed_instance_name: str :param database_name: The name of the database. :type database_name: str + :param include_disabled_recommendations: Specifies whether to include + disabled recommendations or not. + :type include_disabled_recommendations: bool :param skip_token: :type skip_token: str :param filter: An OData filter expression that filters elements in the @@ -380,8 +528,7 @@ def list_recommended_by_database( ~azure.mgmt.sql.models.SensitivityLabelPaged[~azure.mgmt.sql.models.SensitivityLabel] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_recommended_by_database.metadata['url'] @@ -395,6 +542,8 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} + if include_disabled_recommendations is not None: + query_parameters['includeDisabledRecommendations'] = self._serialize.query("include_disabled_recommendations", include_disabled_recommendations, 'bool') if skip_token is not None: query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') if filter is not None: @@ -417,6 +566,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -427,12 +581,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_recommended_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/recommendedSensitivityLabels'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_rule_baselines_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_rule_baselines_operations.py similarity index 99% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_rule_baselines_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_rule_baselines_operations.py index bf5121b3707b..2c4017b6193b 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_rule_baselines_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_rule_baselines_operations.py @@ -19,6 +19,8 @@ class ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations(object): """ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations 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. @@ -109,7 +111,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentRuleBaseline', response) @@ -199,7 +200,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentRuleBaseline', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_scans_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_scans_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_scans_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_scans_operations.py index d45dc1beb3b7..e3a2b20ffdc4 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_scans_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_scans_operations.py @@ -21,6 +21,8 @@ class ManagedDatabaseVulnerabilityAssessmentScansOperations(object): """ManagedDatabaseVulnerabilityAssessmentScansOperations 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. @@ -64,8 +66,7 @@ def list_by_database( ~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecordPaged[~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecord] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -98,6 +99,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -108,12 +114,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans'} @@ -180,7 +184,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VulnerabilityAssessmentScanRecord', response) @@ -345,7 +348,6 @@ def export( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentScansExport', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessments_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessments_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessments_operations.py index 6c224244c8fc..c5d8e57cb81f 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessments_operations.py @@ -19,6 +19,8 @@ class ManagedDatabaseVulnerabilityAssessmentsOperations(object): """ManagedDatabaseVulnerabilityAssessmentsOperations 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. @@ -98,7 +100,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessment', response) @@ -175,7 +176,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessment', response) if response.status_code == 201: @@ -271,8 +271,7 @@ def list_by_database( ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentPaged[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessment] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -304,6 +303,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -314,12 +318,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_databases_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_databases_operations.py index e2b8d02ae534..9825283b3ab6 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_databases_operations.py @@ -21,6 +21,8 @@ class ManagedDatabasesOperations(object): """ManagedDatabasesOperations 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. @@ -149,8 +151,7 @@ def list_by_instance( ~azure.mgmt.sql.models.ManagedDatabasePaged[~azure.mgmt.sql.models.ManagedDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -181,6 +182,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -191,12 +197,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases'} @@ -257,7 +261,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedDatabase', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_encryption_protectors_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_encryption_protectors_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_encryption_protectors_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_encryption_protectors_operations.py index 61ab8baa5d32..5c35d34aac66 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_encryption_protectors_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_encryption_protectors_operations.py @@ -21,6 +21,8 @@ class ManagedInstanceEncryptionProtectorsOperations(object): """ManagedInstanceEncryptionProtectorsOperations 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. @@ -62,8 +64,7 @@ def list_by_instance( ~azure.mgmt.sql.models.ManagedInstanceEncryptionProtectorPaged[~azure.mgmt.sql.models.ManagedInstanceEncryptionProtector] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -94,6 +95,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -104,12 +110,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedInstanceEncryptionProtectorPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedInstanceEncryptionProtectorPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedInstanceEncryptionProtectorPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector'} @@ -169,7 +173,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedInstanceEncryptionProtector', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_keys_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_keys_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_keys_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_keys_operations.py index adb5c4bfa0f0..7d7876efc7bd 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_keys_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_keys_operations.py @@ -21,6 +21,8 @@ class ManagedInstanceKeysOperations(object): """ManagedInstanceKeysOperations 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. @@ -62,8 +64,7 @@ def list_by_instance( ~azure.mgmt.sql.models.ManagedInstanceKeyPaged[~azure.mgmt.sql.models.ManagedInstanceKey] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -96,6 +97,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -106,12 +112,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedInstanceKeyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedInstanceKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedInstanceKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys'} @@ -172,7 +176,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedInstanceKey', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_tde_certificates_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_tde_certificates_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_tde_certificates_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_tde_certificates_operations.py index be4ee1969fdd..c3f3e3fdc8e5 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_tde_certificates_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_tde_certificates_operations.py @@ -21,6 +21,8 @@ class ManagedInstanceTdeCertificatesOperations(object): """ManagedInstanceTdeCertificatesOperations 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. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_vulnerability_assessments_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_vulnerability_assessments_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_vulnerability_assessments_operations.py index 601294eb6777..04c452d37993 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_vulnerability_assessments_operations.py @@ -19,6 +19,8 @@ class ManagedInstanceVulnerabilityAssessmentsOperations(object): """ManagedInstanceVulnerabilityAssessmentsOperations 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. @@ -95,7 +97,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedInstanceVulnerabilityAssessment', response) @@ -169,7 +170,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedInstanceVulnerabilityAssessment', response) if response.status_code == 201: @@ -261,8 +261,7 @@ def list_by_instance( ~azure.mgmt.sql.models.ManagedInstanceVulnerabilityAssessmentPaged[~azure.mgmt.sql.models.ManagedInstanceVulnerabilityAssessment] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -293,6 +292,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -303,12 +307,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedInstanceVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedInstanceVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedInstanceVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instances_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instances_operations.py similarity index 84% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instances_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instances_operations.py index 1fee247c7c96..c1cb3d973264 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instances_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instances_operations.py @@ -21,11 +21,13 @@ class ManagedInstancesOperations(object): """ManagedInstancesOperations 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: The API version to use for the request. Constant value: "2015-05-01-preview". + :ivar api_version: The API version to use for the request. Constant value: "2018-06-01-preview". """ models = models @@ -35,14 +37,20 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-05-01-preview" + self.api_version = "2018-06-01-preview" self.config = config - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of all managed instances in the subscription. + def list_by_instance_pool( + self, resource_group_name, instance_pool_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of all managed instances in an instance pool. + :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 instance_pool_name: The instance pool name. + :type instance_pool_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 @@ -53,12 +61,13 @@ def list( ~azure.mgmt.sql.models.ManagedInstancePaged[~azure.mgmt.sql.models.ManagedInstance] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list_by_instance_pool.metadata['url'] path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -83,6 +92,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -93,15 +107,13 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances'} + list_by_instance_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/managedInstances'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -121,8 +133,7 @@ def list_by_resource_group( ~azure.mgmt.sql.models.ManagedInstancePaged[~azure.mgmt.sql.models.ManagedInstance] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -152,6 +163,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -162,12 +178,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances'} @@ -225,7 +239,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedInstance', response) @@ -522,3 +535,69 @@ def get_long_running_output(response): 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.Sql/managedInstances/{managedInstanceName}'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of all managed instances in the subscription. + + :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: An iterator like instance of ManagedInstance + :rtype: + ~azure.mgmt.sql.models.ManagedInstancePaged[~azure.mgmt.sql.models.ManagedInstance] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py index df833033a1b9..882500ff53e5 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py @@ -21,6 +21,8 @@ class ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations(object): """ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations 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. @@ -99,7 +101,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedBackupShortTermRetentionPolicy', response) @@ -355,8 +356,7 @@ def list_by_restorable_dropped_database( ~azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicyPaged[~azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_restorable_dropped_database.metadata['url'] @@ -388,6 +388,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -398,12 +403,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_restorable_dropped_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_server_security_alert_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_server_security_alert_policies_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_server_security_alert_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_server_security_alert_policies_operations.py index 16ad81dac173..1f75bd170197 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_server_security_alert_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_server_security_alert_policies_operations.py @@ -21,6 +21,8 @@ class ManagedServerSecurityAlertPoliciesOperations(object): """ManagedServerSecurityAlertPoliciesOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedServerSecurityAlertPolicy', response) @@ -232,8 +233,7 @@ def list_by_instance( ~azure.mgmt.sql.models.ManagedServerSecurityAlertPolicyPaged[~azure.mgmt.sql.models.ManagedServerSecurityAlertPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -264,6 +264,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -274,12 +279,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/securityAlertPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_operations.py similarity index 90% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_operations.py index 5f8f397a39b9..7ccdf683aa8a 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_operations.py @@ -19,6 +19,8 @@ class Operations(object): """Operations 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. @@ -51,8 +53,7 @@ def list( ~azure.mgmt.sql.models.OperationPaged[~azure.mgmt.sql.models.Operation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -77,6 +78,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -87,12 +93,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.Sql/operations'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recommended_elastic_pools_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recommended_elastic_pools_operations.py similarity index 94% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recommended_elastic_pools_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recommended_elastic_pools_operations.py index 960bd52a034b..95c89bf1df1b 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recommended_elastic_pools_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recommended_elastic_pools_operations.py @@ -19,6 +19,8 @@ class RecommendedElasticPoolsOperations(object): """RecommendedElasticPoolsOperations 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. @@ -94,7 +96,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RecommendedElasticPool', response) @@ -125,8 +126,7 @@ def list_by_server( ~azure.mgmt.sql.models.RecommendedElasticPoolPaged[~azure.mgmt.sql.models.RecommendedElasticPool] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -157,6 +157,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -167,12 +172,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RecommendedElasticPoolPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RecommendedElasticPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RecommendedElasticPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools'} @@ -200,8 +203,7 @@ def list_metrics( ~azure.mgmt.sql.models.RecommendedElasticPoolMetricPaged[~azure.mgmt.sql.models.RecommendedElasticPoolMetric] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metrics.metadata['url'] @@ -233,6 +235,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -243,12 +250,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RecommendedElasticPoolMetricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RecommendedElasticPoolMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RecommendedElasticPoolMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}/metrics'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_databases_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_databases_operations.py index 87b5873c5619..178abf85f1b5 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_databases_operations.py @@ -19,6 +19,8 @@ class RecoverableDatabasesOperations(object): """RecoverableDatabasesOperations 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. @@ -94,7 +96,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RecoverableDatabase', response) @@ -125,8 +126,7 @@ def list_by_server( ~azure.mgmt.sql.models.RecoverableDatabasePaged[~azure.mgmt.sql.models.RecoverableDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -157,6 +157,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -167,12 +172,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RecoverableDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RecoverableDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RecoverableDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_managed_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_managed_databases_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_managed_databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_managed_databases_operations.py index d8bf8cbb6665..2595a4069152 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_managed_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_managed_databases_operations.py @@ -19,6 +19,8 @@ class RecoverableManagedDatabasesOperations(object): """RecoverableManagedDatabasesOperations 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. @@ -57,8 +59,7 @@ def list_by_instance( ~azure.mgmt.sql.models.RecoverableManagedDatabasePaged[~azure.mgmt.sql.models.RecoverableManagedDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -89,6 +90,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -99,12 +105,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RecoverableManagedDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RecoverableManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RecoverableManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/recoverableDatabases'} @@ -165,7 +169,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RecoverableManagedDatabase', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/replication_links_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_replication_links_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/replication_links_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_replication_links_operations.py index d3d3cee87622..bebd9d62e04d 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/replication_links_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_replication_links_operations.py @@ -21,6 +21,8 @@ class ReplicationLinksOperations(object): """ReplicationLinksOperations 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. @@ -160,7 +162,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ReplicationLink', response) @@ -375,8 +376,7 @@ def list_by_database( ~azure.mgmt.sql.models.ReplicationLinkPaged[~azure.mgmt.sql.models.ReplicationLink] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -408,6 +408,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -418,12 +423,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ReplicationLinkPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ReplicationLinkPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ReplicationLinkPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_databases_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_databases_operations.py index 0dfb4989691a..aa2480c63f73 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_databases_operations.py @@ -19,6 +19,8 @@ class RestorableDroppedDatabasesOperations(object): """RestorableDroppedDatabasesOperations 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. @@ -94,7 +96,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RestorableDroppedDatabase', response) @@ -125,8 +126,7 @@ def list_by_server( ~azure.mgmt.sql.models.RestorableDroppedDatabasePaged[~azure.mgmt.sql.models.RestorableDroppedDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -157,6 +157,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -167,12 +172,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RestorableDroppedDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RestorableDroppedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RestorableDroppedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_managed_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_managed_databases_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_managed_databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_managed_databases_operations.py index 58e81f79908a..0ef3d7b7c3c8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_managed_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_managed_databases_operations.py @@ -19,6 +19,8 @@ class RestorableDroppedManagedDatabasesOperations(object): """RestorableDroppedManagedDatabasesOperations 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. @@ -57,8 +59,7 @@ def list_by_instance( ~azure.mgmt.sql.models.RestorableDroppedManagedDatabasePaged[~azure.mgmt.sql.models.RestorableDroppedManagedDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -89,6 +90,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -99,12 +105,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RestorableDroppedManagedDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RestorableDroppedManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RestorableDroppedManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases'} @@ -166,7 +170,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RestorableDroppedManagedDatabase', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restore_points_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restore_points_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restore_points_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restore_points_operations.py index e5b49d9d1ed3..0a7f74a92b42 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restore_points_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restore_points_operations.py @@ -21,6 +21,8 @@ class RestorePointsOperations(object): """RestorePointsOperations 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. @@ -61,8 +63,7 @@ def list_by_database( ~azure.mgmt.sql.models.RestorePointPaged[~azure.mgmt.sql.models.RestorePoint] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -94,6 +95,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -104,12 +110,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RestorePointPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RestorePointPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RestorePointPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints'} @@ -283,7 +287,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RestorePoint', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sensitivity_labels_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sensitivity_labels_operations.py similarity index 70% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sensitivity_labels_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sensitivity_labels_operations.py index 5be551f7fd12..2cfb2974a8b8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sensitivity_labels_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sensitivity_labels_operations.py @@ -19,12 +19,13 @@ class SensitivityLabelsOperations(object): """SensitivityLabelsOperations 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: The API version to use for the request. Constant value: "2017-03-01-preview". - :ivar sensitivity_label_source: The source of the sensitivity label. Constant value: "current". """ models = models @@ -35,7 +36,6 @@ def __init__(self, client, config, serializer, deserializer): self._serialize = serializer self._deserialize = deserializer self.api_version = "2017-03-01-preview" - self.sensitivity_label_source = "current" self.config = config @@ -64,8 +64,7 @@ def list_current_by_database( ~azure.mgmt.sql.models.SensitivityLabelPaged[~azure.mgmt.sql.models.SensitivityLabel] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_current_by_database.metadata['url'] @@ -99,6 +98,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -109,18 +113,16 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_current_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/currentSensitivityLabels'} def list_recommended_by_database( - self, resource_group_name, server_name, database_name, skip_token=None, filter=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, server_name, database_name, include_disabled_recommendations=None, skip_token=None, filter=None, custom_headers=None, raw=False, **operation_config): """Gets the sensitivity labels of a given database. :param resource_group_name: The name of the resource group that @@ -131,6 +133,9 @@ def list_recommended_by_database( :type server_name: str :param database_name: The name of the database. :type database_name: str + :param include_disabled_recommendations: Specifies whether to include + disabled recommendations or not. + :type include_disabled_recommendations: bool :param skip_token: :type skip_token: str :param filter: An OData filter expression that filters elements in the @@ -146,8 +151,7 @@ def list_recommended_by_database( ~azure.mgmt.sql.models.SensitivityLabelPaged[~azure.mgmt.sql.models.SensitivityLabel] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_recommended_by_database.metadata['url'] @@ -161,6 +165,8 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} + if include_disabled_recommendations is not None: + query_parameters['includeDisabledRecommendations'] = self._serialize.query("include_disabled_recommendations", include_disabled_recommendations, 'bool') if skip_token is not None: query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') if filter is not None: @@ -183,6 +189,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -193,16 +204,155 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_recommended_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/recommendedSensitivityLabels'} + def enable_recommendation( + self, resource_group_name, server_name, database_name, schema_name, table_name, column_name, custom_headers=None, raw=False, **operation_config): + """Enables sensitivity recommendations on a given column (recommendations + are enabled by default on all columns). + + :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 server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param schema_name: The name of the schema. + :type schema_name: str + :param table_name: The name of the table. + :type table_name: str + :param column_name: The name of the column. + :type column_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` + """ + sensitivity_label_source = "recommended" + + # Construct URL + url = self.enable_recommendation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str'), + 'columnName': self._serialize.url("column_name", column_name, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + enable_recommendation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable'} + + def disable_recommendation( + self, resource_group_name, server_name, database_name, schema_name, table_name, column_name, custom_headers=None, raw=False, **operation_config): + """Disables sensitivity recommendations on a given column. + + :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 server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param schema_name: The name of the schema. + :type schema_name: str + :param table_name: The name of the table. + :type table_name: str + :param column_name: The name of the column. + :type column_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` + """ + sensitivity_label_source = "recommended" + + # Construct URL + url = self.disable_recommendation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str'), + 'columnName': self._serialize.url("column_name", column_name, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_recommendation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable'} + def get( self, resource_group_name, server_name, database_name, schema_name, table_name, column_name, sensitivity_label_source, custom_headers=None, raw=False, **operation_config): """Gets the sensitivity label of a given column. @@ -273,7 +423,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SensitivityLabel', response) @@ -314,6 +463,8 @@ def create_or_update( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + sensitivity_label_source = "current" + # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { @@ -323,7 +474,7 @@ def create_or_update( 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), 'tableName': self._serialize.url("table_name", table_name, 'str'), 'columnName': self._serialize.url("column_name", column_name, 'str'), - 'sensitivityLabelSource': self._serialize.url("self.sensitivity_label_source", self.sensitivity_label_source, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -356,7 +507,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SensitivityLabel', response) if response.status_code == 201: @@ -396,6 +546,8 @@ def delete( :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + sensitivity_label_source = "current" + # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -405,7 +557,7 @@ def delete( 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), 'tableName': self._serialize.url("table_name", table_name, 'str'), 'columnName': self._serialize.url("column_name", column_name, 'str'), - 'sensitivityLabelSource': self._serialize.url("self.sensitivity_label_source", self.sensitivity_label_source, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_automatic_tuning_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_automatic_tuning_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_automatic_tuning_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_automatic_tuning_operations.py index 675d886377c6..243174bc107d 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_automatic_tuning_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_automatic_tuning_operations.py @@ -19,6 +19,8 @@ class ServerAutomaticTuningOperations(object): """ServerAutomaticTuningOperations 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. @@ -90,7 +92,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerAutomaticTuning', response) @@ -167,7 +168,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerAutomaticTuning', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_azure_ad_administrators_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_administrators_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_azure_ad_administrators_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_administrators_operations.py index c7a66d57ea08..7fdf686673b7 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_azure_ad_administrators_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_administrators_operations.py @@ -21,6 +21,8 @@ class ServerAzureADAdministratorsOperations(object): """ServerAzureADAdministratorsOperations 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. @@ -306,7 +308,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerAzureADAdministrator', response) @@ -337,8 +338,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerAzureADAdministratorPaged[~azure.mgmt.sql.models.ServerAzureADAdministrator] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -369,6 +369,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -379,12 +384,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerAzureADAdministratorPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerAzureADAdministratorPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerAzureADAdministratorPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_blob_auditing_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_blob_auditing_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_blob_auditing_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_blob_auditing_policies_operations.py index ac7c8ef280ac..88cb823e64e9 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_blob_auditing_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_blob_auditing_policies_operations.py @@ -21,6 +21,8 @@ class ServerBlobAuditingPoliciesOperations(object): """ServerBlobAuditingPoliciesOperations 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. @@ -95,7 +97,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerBlobAuditingPolicy', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_communication_links_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_communication_links_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_communication_links_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_communication_links_operations.py index 2844c4068ea4..3a8782c7510f 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_communication_links_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_communication_links_operations.py @@ -21,6 +21,8 @@ class ServerCommunicationLinksOperations(object): """ServerCommunicationLinksOperations 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. @@ -155,7 +157,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerCommunicationLink', response) @@ -295,8 +296,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerCommunicationLinkPaged[~azure.mgmt.sql.models.ServerCommunicationLink] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -327,6 +327,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -337,12 +342,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerCommunicationLinkPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerCommunicationLinkPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerCommunicationLinkPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_connection_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_connection_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_connection_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_connection_policies_operations.py index c1d5c68e7f7f..4813f39f62ac 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_connection_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_connection_policies_operations.py @@ -19,6 +19,8 @@ class ServerConnectionPoliciesOperations(object): """ServerConnectionPoliciesOperations 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. @@ -103,7 +105,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerConnectionPolicy', response) if response.status_code == 201: @@ -170,7 +171,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerConnectionPolicy', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_dns_aliases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_dns_aliases_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_dns_aliases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_dns_aliases_operations.py index a4f79dfce854..d8ec5ec33941 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_dns_aliases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_dns_aliases_operations.py @@ -21,6 +21,8 @@ class ServerDnsAliasesOperations(object): """ServerDnsAliasesOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerDnsAlias', response) @@ -316,8 +317,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerDnsAliasPaged[~azure.mgmt.sql.models.ServerDnsAlias] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -348,6 +348,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -358,12 +363,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerDnsAliasPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerDnsAliasPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerDnsAliasPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_keys_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_keys_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_keys_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_keys_operations.py index e52b751d7eb8..ffbd75711807 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_keys_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_keys_operations.py @@ -21,6 +21,8 @@ class ServerKeysOperations(object): """ServerKeysOperations 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. @@ -59,8 +61,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerKeyPaged[~azure.mgmt.sql.models.ServerKey] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -91,6 +92,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -101,12 +107,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerKeyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys'} @@ -167,7 +171,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerKey', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_security_alert_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_security_alert_policies_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_security_alert_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_security_alert_policies_operations.py index 95e884990da2..b5b8e4d82427 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_security_alert_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_security_alert_policies_operations.py @@ -21,6 +21,8 @@ class ServerSecurityAlertPoliciesOperations(object): """ServerSecurityAlertPoliciesOperations 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. @@ -95,7 +97,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerSecurityAlertPolicy', response) @@ -230,8 +231,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerSecurityAlertPolicyPaged[~azure.mgmt.sql.models.ServerSecurityAlertPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -262,6 +262,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -272,12 +277,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_usages_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_usages_operations.py similarity index 92% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_usages_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_usages_operations.py index 4d60726ff42f..5ac207d27f69 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_usages_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_usages_operations.py @@ -19,6 +19,8 @@ class ServerUsagesOperations(object): """ServerUsagesOperations 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. @@ -57,8 +59,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerUsagePaged[~azure.mgmt.sql.models.ServerUsage] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -89,6 +90,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -99,12 +105,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerUsagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/usages'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_vulnerability_assessments_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_vulnerability_assessments_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_vulnerability_assessments_operations.py index ffe8dd567342..4caee1f1fb49 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_vulnerability_assessments_operations.py @@ -19,6 +19,8 @@ class ServerVulnerabilityAssessmentsOperations(object): """ServerVulnerabilityAssessmentsOperations 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. @@ -95,7 +97,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerVulnerabilityAssessment', response) @@ -168,7 +169,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerVulnerabilityAssessment', response) if response.status_code == 201: @@ -258,8 +258,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerVulnerabilityAssessmentPaged[~azure.mgmt.sql.models.ServerVulnerabilityAssessment] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -290,6 +289,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -300,12 +304,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/servers_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_servers_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/servers_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_servers_operations.py index 7abad6723542..16fd05d12be8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/servers_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_servers_operations.py @@ -21,6 +21,8 @@ class ServersOperations(object): """ServersOperations 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. @@ -93,7 +95,6 @@ def check_name_availability( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CheckNameAvailabilityResponse', response) @@ -120,8 +121,7 @@ def list( """ api_version = "2015-05-01-preview" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -150,6 +150,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -160,12 +165,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers'} @@ -190,8 +193,7 @@ def list_by_resource_group( """ api_version = "2015-05-01-preview" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -221,6 +223,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -231,12 +238,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers'} @@ -296,7 +301,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Server', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_objectives_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_objectives_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_objectives_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_objectives_operations.py index d4f53c7313af..f1ae98c7828e 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_objectives_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_objectives_operations.py @@ -19,6 +19,8 @@ class ServiceObjectivesOperations(object): """ServiceObjectivesOperations 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. @@ -94,7 +96,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceObjective', response) @@ -125,8 +126,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServiceObjectivePaged[~azure.mgmt.sql.models.ServiceObjective] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -157,6 +157,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -167,12 +172,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServiceObjectivePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServiceObjectivePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServiceObjectivePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/serviceObjectives'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_tier_advisors_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_tier_advisors_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_tier_advisors_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_tier_advisors_operations.py index cc9ba091db21..ff0328f21bd7 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_tier_advisors_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_tier_advisors_operations.py @@ -19,6 +19,8 @@ class ServiceTierAdvisorsOperations(object): """ServiceTierAdvisorsOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceTierAdvisor', response) @@ -129,8 +130,7 @@ def list_by_database( ~azure.mgmt.sql.models.ServiceTierAdvisorPaged[~azure.mgmt.sql.models.ServiceTierAdvisor] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -162,6 +162,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -172,12 +177,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServiceTierAdvisorPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServiceTierAdvisorPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServiceTierAdvisorPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/serviceTierAdvisors'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/subscription_usages_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_subscription_usages_operations.py similarity index 94% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/subscription_usages_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_subscription_usages_operations.py index b70973ca790e..355be5f6fd68 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/subscription_usages_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_subscription_usages_operations.py @@ -19,6 +19,8 @@ class SubscriptionUsagesOperations(object): """SubscriptionUsagesOperations 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. @@ -54,8 +56,7 @@ def list_by_location( ~azure.mgmt.sql.models.SubscriptionUsagePaged[~azure.mgmt.sql.models.SubscriptionUsage] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_location.metadata['url'] @@ -85,6 +86,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -95,12 +101,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SubscriptionUsagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SubscriptionUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SubscriptionUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages'} @@ -157,7 +161,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SubscriptionUsage', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_agents_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_agents_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_agents_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_agents_operations.py index 9ac0651a57d3..ec00730c027a 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_agents_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_agents_operations.py @@ -21,6 +21,8 @@ class SyncAgentsOperations(object): """SyncAgentsOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SyncAgent', response) @@ -326,8 +327,7 @@ def list_by_server( ~azure.mgmt.sql.models.SyncAgentPaged[~azure.mgmt.sql.models.SyncAgent] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -358,6 +358,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -368,12 +373,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncAgentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncAgentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncAgentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents'} @@ -435,7 +438,6 @@ def generate_key( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SyncAgentKeyProperties', response) @@ -469,8 +471,7 @@ def list_linked_databases( ~azure.mgmt.sql.models.SyncAgentLinkedDatabasePaged[~azure.mgmt.sql.models.SyncAgentLinkedDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_linked_databases.metadata['url'] @@ -502,6 +503,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -512,12 +518,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncAgentLinkedDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncAgentLinkedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncAgentLinkedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_linked_databases.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}/linkedDatabases'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_groups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_groups_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_groups_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_groups_operations.py index 484f24f33781..bf78088e717b 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_groups_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_groups_operations.py @@ -21,6 +21,8 @@ class SyncGroupsOperations(object): """SyncGroupsOperations 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. @@ -56,8 +58,7 @@ def list_sync_database_ids( ~azure.mgmt.sql.models.SyncDatabaseIdPropertiesPaged[~azure.mgmt.sql.models.SyncDatabaseIdProperties] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_sync_database_ids.metadata['url'] @@ -87,6 +88,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -97,12 +103,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncDatabaseIdPropertiesPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncDatabaseIdPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncDatabaseIdPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_sync_database_ids.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds'} @@ -222,8 +226,7 @@ def list_hub_schemas( ~azure.mgmt.sql.models.SyncFullSchemaPropertiesPaged[~azure.mgmt.sql.models.SyncFullSchemaProperties] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_hub_schemas.metadata['url'] @@ -256,6 +259,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -266,12 +274,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_hub_schemas.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/hubSchemas'} @@ -310,8 +316,7 @@ def list_logs( ~azure.mgmt.sql.models.SyncGroupLogPropertiesPaged[~azure.mgmt.sql.models.SyncGroupLogProperties] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_logs.metadata['url'] @@ -349,6 +354,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -359,12 +369,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncGroupLogPropertiesPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncGroupLogPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncGroupLogPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/logs'} @@ -553,7 +561,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SyncGroup', response) @@ -901,8 +908,7 @@ def list_by_database( ~azure.mgmt.sql.models.SyncGroupPaged[~azure.mgmt.sql.models.SyncGroup] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -934,6 +940,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -944,12 +955,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncGroupPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_members_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_members_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_members_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_members_operations.py index 4eab11133d05..23343d374072 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_members_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_members_operations.py @@ -21,6 +21,8 @@ class SyncMembersOperations(object): """SyncMembersOperations 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. @@ -103,7 +105,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SyncMember', response) @@ -468,8 +469,7 @@ def list_by_sync_group( ~azure.mgmt.sql.models.SyncMemberPaged[~azure.mgmt.sql.models.SyncMember] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_sync_group.metadata['url'] @@ -502,6 +502,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -512,12 +517,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncMemberPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncMemberPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncMemberPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_sync_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers'} @@ -550,8 +553,7 @@ def list_member_schemas( ~azure.mgmt.sql.models.SyncFullSchemaPropertiesPaged[~azure.mgmt.sql.models.SyncFullSchemaProperties] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_member_schemas.metadata['url'] @@ -585,6 +587,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -595,12 +602,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_member_schemas.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/schemas'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/tde_certificates_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_tde_certificates_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/tde_certificates_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_tde_certificates_operations.py index bc529a38043f..86037d49ca05 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/tde_certificates_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_tde_certificates_operations.py @@ -21,6 +21,8 @@ class TdeCertificatesOperations(object): """TdeCertificatesOperations 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. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryption_activities_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryption_activities_operations.py similarity index 93% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryption_activities_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryption_activities_operations.py index ae930a401246..6807645bd6c0 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryption_activities_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryption_activities_operations.py @@ -19,6 +19,8 @@ class TransparentDataEncryptionActivitiesOperations(object): """TransparentDataEncryptionActivitiesOperations 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. @@ -63,8 +65,7 @@ def list_by_configuration( ~azure.mgmt.sql.models.TransparentDataEncryptionActivityPaged[~azure.mgmt.sql.models.TransparentDataEncryptionActivity] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_configuration.metadata['url'] @@ -97,6 +98,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -107,12 +113,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.TransparentDataEncryptionActivityPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.TransparentDataEncryptionActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.TransparentDataEncryptionActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{transparentDataEncryptionName}/operationResults'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryptions_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryptions_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryptions_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryptions_operations.py index a0f3c8184f57..b497a7ee5656 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryptions_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryptions_operations.py @@ -19,6 +19,8 @@ class TransparentDataEncryptionsOperations(object): """TransparentDataEncryptionsOperations 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. @@ -108,7 +110,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('TransparentDataEncryption', response) if response.status_code == 201: @@ -179,7 +180,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('TransparentDataEncryption', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_usages_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_usages_operations.py new file mode 100644 index 000000000000..59164a38e347 --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_usages_operations.py @@ -0,0 +1,120 @@ +# 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 .. import models + + +class UsagesOperations(object): + """UsagesOperations 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: The API version to use for the request. Constant value: "2018-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01-preview" + + self.config = config + + def list_by_instance_pool( + self, resource_group_name, instance_pool_name, expand_children=None, custom_headers=None, raw=False, **operation_config): + """Gets all instance pool usage metrics. + + :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 instance_pool_name: The name of the instance pool to be + retrieved. + :type instance_pool_name: str + :param expand_children: Optional request parameter to include managed + instance usages within the instance pool. + :type expand_children: bool + :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: An iterator like instance of Usage + :rtype: + ~azure.mgmt.sql.models.UsagePaged[~azure.mgmt.sql.models.Usage] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_instance_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand_children is not None: + query_parameters['expandChildren'] = self._serialize.query("expand_children", expand_children, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_instance_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/usages'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_clusters_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_clusters_operations.py similarity index 96% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_clusters_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_clusters_operations.py index 90a685e001a5..b91ece534ef3 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_clusters_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_clusters_operations.py @@ -21,6 +21,8 @@ class VirtualClustersOperations(object): """VirtualClustersOperations 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. @@ -53,8 +55,7 @@ def list( ~azure.mgmt.sql.models.VirtualClusterPaged[~azure.mgmt.sql.models.VirtualCluster] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -83,6 +84,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -93,12 +99,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/virtualClusters'} @@ -121,8 +125,7 @@ def list_by_resource_group( ~azure.mgmt.sql.models.VirtualClusterPaged[~azure.mgmt.sql.models.VirtualCluster] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -152,6 +155,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -162,12 +170,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters'} @@ -225,7 +231,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VirtualCluster', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_network_rules_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_network_rules_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_network_rules_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_network_rules_operations.py index 01bc6f5bdf3e..3485f42e9f85 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_network_rules_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_network_rules_operations.py @@ -21,6 +21,8 @@ class VirtualNetworkRulesOperations(object): """VirtualNetworkRulesOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VirtualNetworkRule', response) @@ -329,8 +330,7 @@ def list_by_server( ~azure.mgmt.sql.models.VirtualNetworkRulePaged[~azure.mgmt.sql.models.VirtualNetworkRule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -361,6 +361,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -371,12 +376,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/long_term_retention_backups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/long_term_retention_backups_operations.py deleted file mode 100644 index c803786f5ff3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/long_term_retention_backups_operations.py +++ /dev/null @@ -1,441 +0,0 @@ -# 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 LongTermRetentionBackupsOperations(object): - """LongTermRetentionBackupsOperations operations. - - :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: The API version to use for the request. Constant value: "2017-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-01-preview" - - self.config = config - - def get( - self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): - """Gets a long term retention backup. - - :param location_name: The location of the database. - :type location_name: str - :param long_term_retention_server_name: The name of the server - :type long_term_retention_server_name: str - :param long_term_retention_database_name: The name of the database - :type long_term_retention_database_name: str - :param backup_name: The backup name. - :type backup_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: LongTermRetentionBackup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.LongTermRetentionBackup or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), - 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), - 'backupName': self._serialize.url("backup_name", backup_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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('LongTermRetentionBackup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} - - - def _delete_initial( - self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), - 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), - 'backupName': self._serialize.url("backup_name", backup_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - 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.delete(url, query_parameters, header_parameters) - 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a long term retention backup. - - :param location_name: The location of the database - :type location_name: str - :param long_term_retention_server_name: The name of the server - :type long_term_retention_server_name: str - :param long_term_retention_database_name: The name of the database - :type long_term_retention_database_name: str - :param backup_name: The backup name. - :type backup_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( - location_name=location_name, - long_term_retention_server_name=long_term_retention_server_name, - long_term_retention_database_name=long_term_retention_database_name, - backup_name=backup_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}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} - - def list_by_database( - self, location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): - """Lists all long term retention backups for a database. - - :param location_name: The location of the database - :type location_name: str - :param long_term_retention_server_name: The name of the server - :type long_term_retention_server_name: str - :param long_term_retention_database_name: The name of the database - :type long_term_retention_database_name: str - :param only_latest_per_database: Whether or not to only get the latest - backup for each database. - :type only_latest_per_database: bool - :param database_state: Whether to query against just live databases, - just deleted databases, or all databases. Possible values include: - 'All', 'Live', 'Deleted' - :type database_state: str or - ~azure.mgmt.sql.models.LongTermRetentionDatabaseState - :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: An iterator like instance of LongTermRetentionBackup - :rtype: - ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_database.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), - 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if only_latest_per_database is not None: - query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') - if database_state is not None: - query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # 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 - - return response - - # Deserialize response - deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups'} - - def list_by_location( - self, location_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): - """Lists the long term retention backups for a given location. - - :param location_name: The location of the database - :type location_name: str - :param only_latest_per_database: Whether or not to only get the latest - backup for each database. - :type only_latest_per_database: bool - :param database_state: Whether to query against just live databases, - just deleted databases, or all databases. Possible values include: - 'All', 'Live', 'Deleted' - :type database_state: str or - ~azure.mgmt.sql.models.LongTermRetentionDatabaseState - :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: An iterator like instance of LongTermRetentionBackup - :rtype: - ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_location.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if only_latest_per_database is not None: - query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') - if database_state is not None: - query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # 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 - - return response - - # Deserialize response - deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups'} - - def list_by_server( - self, location_name, long_term_retention_server_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): - """Lists the long term retention backups for a given server. - - :param location_name: The location of the database - :type location_name: str - :param long_term_retention_server_name: The name of the server - :type long_term_retention_server_name: str - :param only_latest_per_database: Whether or not to only get the latest - backup for each database. - :type only_latest_per_database: bool - :param database_state: Whether to query against just live databases, - just deleted databases, or all databases. Possible values include: - 'All', 'Live', 'Deleted' - :type database_state: str or - ~azure.mgmt.sql.models.LongTermRetentionDatabaseState - :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: An iterator like instance of LongTermRetentionBackup - :rtype: - ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if only_latest_per_database is not None: - query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') - if database_state is not None: - query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # 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 - - return response - - # Deserialize response - deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups'} From ae08b856c7a7185d6dbeb6ee8f249b782e045866 Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 10:16:27 -0700 Subject: [PATCH 097/244] Update CODEOWNERS --- .github/CODEOWNERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 07d57ac48320..0172563e9a84 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -40,6 +40,9 @@ # Management Plane /**/*mgmt*/ @zikalino +# Management Plane +/**/*mgmt*/ @zikalino + ########### # Eng Sys ########### From 8b3893d7373ba14182a5b8f7efda5d90a79212bd Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 11:03:35 -0700 Subject: [PATCH 098/244] more code owners --- .github/CODEOWNERS | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0172563e9a84..07d57ac48320 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -40,9 +40,6 @@ # Management Plane /**/*mgmt*/ @zikalino -# Management Plane -/**/*mgmt*/ @zikalino - ########### # Eng Sys ########### From 95f7bd3c873d80889eab7ca2c697025030744af3 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 11:58:35 -0700 Subject: [PATCH 099/244] add policy and decorators for secrets (#6453) --- .../azure/keyvault/secrets/_shared/async_client_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 193e6e324c7e..c451ffb1e766 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncHttpTransport +from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient From 87a738535734c92d390fdbba28634c4ac9eb4bb3 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Thu, 25 Jul 2019 12:41:38 -0700 Subject: [PATCH 100/244] Paging v2 (#6420) * First version of paging * Clean sync paging * Async paging * Name AsyncList without underscore * MyPy happyness * pylint * black * PageIterator as conf * Simplify ItemPaged * Use chain to link iterable * Make Paging more open * Docstring * pylint / mypy / black * Regenerate KV with latest Autorest + Paging branch (#6479) * Regenerate KV with latest Autorest + Paging branch * Remove unused import in tests * Make the async adapter more generic * Regeneration after operation mixin fix in Autorest * COmmit changes forgotten in #6418 * Fixing syntax for 2.7 * Move Storage Queue to new Paging (#6447) * Move Storage Queue to new Paging * Working Storage queue on new paging * Fix types * First shot of blob tests update * Fixing blob tests * File to new paging * Doc fix * Feedbacks from @annatisch * Fix last @annatisch comment * Simplify paging contract * Fix storage queue after new paging contract --- .../_key_vault_client_operations_async.py | 60 ++++------------ .../_key_vault_client_operations.py | 60 ++++------------ .../_key_vault_client_operations_async.py | 70 ++++--------------- .../_key_vault_client_operations.py | 70 ++++--------------- .../keys/_shared/async_client_base.py | 19 +++++ .../_key_vault_client_operations_async.py | 60 ++++------------ .../_key_vault_client_operations.py | 60 ++++------------ .../_key_vault_client_operations_async.py | 70 ++++--------------- .../_key_vault_client_operations.py | 70 ++++--------------- .../secrets/_shared/async_client_base.py | 19 +++++ 10 files changed, 142 insertions(+), 416 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index b5cc965119ed..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 0ae7fd5fb025..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index 08e45c2b44a7..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index b9ed6e10ea21..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 193e6e324c7e..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -21,6 +21,25 @@ pass +class AsyncPagingAdapter: + """For each item in an AsyncIterator, returns the result of applying fn to that item. + Python 3.6 added syntax that could replace this (yield within async for).""" + + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: + self._pages = pages + self._fn = fn + + def __aiter__(self): + return self + + async def __anext__(self) -> Any: + item = await self._pages.__anext__() + if not item: + raise StopAsyncIteration + return self._fn(item) + # TODO: expected type Model got Coroutine instead? + + class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index b5cc965119ed..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 0ae7fd5fb025..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index 08e45c2b44a7..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index b9ed6e10ea21..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index c451ffb1e766..0119ef5a6e44 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -21,6 +21,25 @@ pass +class AsyncPagingAdapter: + """For each item in an AsyncIterator, returns the result of applying fn to that item. + Python 3.6 added syntax that could replace this (yield within async for).""" + + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: + self._pages = pages + self._fn = fn + + def __aiter__(self): + return self + + async def __anext__(self) -> Any: + item = await self._pages.__anext__() + if not item: + raise StopAsyncIteration + return self._fn(item) + # TODO: expected type Model got Coroutine instead? + + class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, From 5bee585074ef9b0197acdd90c8467eaae868686f Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 15:48:49 -0700 Subject: [PATCH 101/244] get rid of should only propagate (#6497) --- sdk/core/azure-core/azure/core/tracing/decorator.py | 2 +- sdk/core/azure-core/azure/core/tracing/decorator_async.py | 2 +- .../azure_core_asynctests/test_tracing_decorator_async.py | 5 ++++- sdk/core/azure-core/tests/test_tracing_decorator.py | 5 ++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 3986dcaf31ed..7d5d7bfce407 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None and orig_wrapped_span is None: + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 4df65fee77ef..781e20a6bef2 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None and orig_wrapped_span is None: + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index 82b4f97dc92f..e2a5c92e60b9 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -145,4 +145,7 @@ async def test_span_with_opencensus_complicated(value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert not parent.children[3].children + assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" + assert parent.children[3].children[1].span_data.name == "MockClient.make_request" + children = parent.children[1].children + assert len(children) == 2 diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index 764c09396255..eedd34c0afdd 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -177,4 +177,7 @@ def test_span_with_opencensus_complicated(self, value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert not parent.children[3].children + assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" + assert parent.children[3].children[1].span_data.name == "MockClient.make_request" + children = parent.children[1].children + assert len(children) == 2 From 1324998d4c821dee0b1eecbf9558cd35c7d47c7d Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Mon, 29 Jul 2019 14:05:36 -0700 Subject: [PATCH 102/244] decorator only trace very top level function (#6530) --- sdk/core/azure-core/azure/core/tracing/decorator.py | 2 +- sdk/core/azure-core/azure/core/tracing/decorator_async.py | 2 +- .../azure_core_asynctests/test_tracing_decorator_async.py | 5 +---- sdk/core/azure-core/tests/test_tracing_decorator.py | 5 +---- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 7d5d7bfce407..3986dcaf31ed 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 781e20a6bef2..4df65fee77ef 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index e2a5c92e60b9..82b4f97dc92f 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -145,7 +145,4 @@ async def test_span_with_opencensus_complicated(value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index eedd34c0afdd..764c09396255 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -177,7 +177,4 @@ def test_span_with_opencensus_complicated(self, value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children From 45d854d778d7545e7656f5073af739aaef6182e6 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 08:51:19 -0700 Subject: [PATCH 103/244] Synchronous username/password auth (#6416) --- .../azure/identity/_internal/__init__.py | 1 - .../azure-identity/tests/test_identity.py | 68 ------------------- 2 files changed, 69 deletions(-) diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index e7583139395b..cfdf935b801c 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,6 +2,5 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from .auth_code_redirect_handler import AuthCodeRedirectServer from .msal_credentials import ConfidentialClientCredential, PublicClientCredential from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 3aaa54a1f28f..8e7245522519 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -22,7 +22,6 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, - InteractiveBrowserCredential, UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential @@ -244,73 +243,6 @@ def test_default_credential(): DefaultAzureCredential() -@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser -def test_interactive_credential(): - oauth_state = "state" - expected_token = "access-token" - - transport = validating_transport( - requests=[Request()] * 2, # not validating requests because they're formed by MSAL - responses=[ - # expecting tenant discovery then a token request - mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), - mock_response( - json_payload={ - "access_token": expected_token, - "expires_in": 42, - "token_type": "Bearer", - "ext_expires_in": 42, - } - ), - ], - ) - - # mock local server fakes successful authentication by immediately returning a well-formed response - auth_code_response = {"code": "authorization-code", "state": [oauth_state]} - server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) - - credential = InteractiveBrowserCredential( - client_id="guid", - client_secret="secret", - server_class=server_class, - transport=transport, - instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request - ) - - # ensure the request beginning the flow has a known state value - with patch("azure.identity.browser_auth.uuid.uuid4", lambda: oauth_state): - token = credential.get_token("scope") - assert token.token == expected_token - - -@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser -def test_interactive_credential_timeout(): - # mock transport handles MSAL's tenant discovery - transport = Mock( - send=lambda _, **__: mock_response( - json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"} - ) - ) - - # mock local server blocks long enough to exceed the timeout - timeout = 1 - server_instance = Mock(wait_for_redirect=functools.partial(time.sleep, timeout + 1)) - server_class = Mock(return_value=server_instance) - - credential = InteractiveBrowserCredential( - client_id="guid", - client_secret="secret", - server_class=server_class, - timeout=timeout, - transport=transport, - instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request - ) - - with pytest.raises(ClientAuthenticationError) as ex: - credential.get_token("scope") - assert "timed out" in ex.value.message.lower() - - def test_username_password_credential(): expected_token = "access-token" transport = validating_transport( From 537723388ac3f5578abebfdf593c9d3d6457627b Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 14:04:30 -0700 Subject: [PATCH 104/244] Synchronous interactive browser authentication (#6466) --- .../azure/identity/_internal/__init__.py | 1 + .../azure-identity/tests/test_identity.py | 68 +++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index cfdf935b801c..e7583139395b 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,5 +2,6 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +from .auth_code_redirect_handler import AuthCodeRedirectServer from .msal_credentials import ConfidentialClientCredential, PublicClientCredential from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 8e7245522519..3aaa54a1f28f 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -22,6 +22,7 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, + InteractiveBrowserCredential, UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential @@ -243,6 +244,73 @@ def test_default_credential(): DefaultAzureCredential() +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential(): + oauth_state = "state" + expected_token = "access-token" + + transport = validating_transport( + requests=[Request()] * 2, # not validating requests because they're formed by MSAL + responses=[ + # expecting tenant discovery then a token request + mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), + mock_response( + json_payload={ + "access_token": expected_token, + "expires_in": 42, + "token_type": "Bearer", + "ext_expires_in": 42, + } + ), + ], + ) + + # mock local server fakes successful authentication by immediately returning a well-formed response + auth_code_response = {"code": "authorization-code", "state": [oauth_state]} + server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + # ensure the request beginning the flow has a known state value + with patch("azure.identity.browser_auth.uuid.uuid4", lambda: oauth_state): + token = credential.get_token("scope") + assert token.token == expected_token + + +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential_timeout(): + # mock transport handles MSAL's tenant discovery + transport = Mock( + send=lambda _, **__: mock_response( + json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"} + ) + ) + + # mock local server blocks long enough to exceed the timeout + timeout = 1 + server_instance = Mock(wait_for_redirect=functools.partial(time.sleep, timeout + 1)) + server_class = Mock(return_value=server_instance) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + timeout=timeout, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + with pytest.raises(ClientAuthenticationError) as ex: + credential.get_token("scope") + assert "timed out" in ex.value.message.lower() + + def test_username_password_credential(): expected_token = "access-token" transport = validating_transport( From 54e5484b0f4a61eb6c118bba592deb4f33503cd1 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Tue, 30 Jul 2019 20:19:31 -0700 Subject: [PATCH 105/244] KV aiohttp by default (#6563) * Aiohttp default async transport * Record keys with aiohttp * Record secrets with aiohttp --- .../azure/keyvault/secrets/_shared/async_client_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 0119ef5a6e44..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport +from azure.core.pipeline.transport import AsyncHttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient From 3a35da709aa4e41d210dd944aa033b4ae64f162f Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 10:27:22 -0700 Subject: [PATCH 106/244] KV moved paging return type to ItemPaged (#6558) * KV with latest autorest * Make KV return ItemPaged from azure-core --- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../keys/_shared/async_client_base.py | 19 ----- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../secrets/_shared/async_client_base.py | 19 ----- 10 files changed, 416 insertions(+), 142 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, From dbe9cd0c6bf43cbdf4c4463f2c31272b2bd42332 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:40:30 -0700 Subject: [PATCH 107/244] Remove docdb mgmt package from master (#6585) --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 - sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 - sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 - .../azure-mgmt-documentdb/azure/__init__.py | 1 - .../azure/mgmt/__init__.py | 1 - .../azure/mgmt/documentdb/__init__.py | 18 - .../azure/mgmt/documentdb/document_db.py | 83 -- .../azure/mgmt/documentdb/models/__init__.py | 52 - .../documentdb/models/consistency_policy.py | 50 - .../documentdb/models/database_account.py | 117 --- .../database_account_connection_string.py | 39 - ...tabase_account_create_update_parameters.py | 90 -- ..._account_list_connection_strings_result.py | 29 - .../database_account_list_keys_result.py | 53 - ...base_account_list_read_only_keys_result.py | 41 - .../models/database_account_paged.py | 27 - .../database_account_patch_parameters.py | 31 - ...abase_account_regenerate_key_parameters.py | 33 - .../documentdb/models/document_db_enums.py | 41 - .../documentdb/models/failover_policies.py | 28 - .../mgmt/documentdb/models/failover_policy.py | 48 - .../azure/mgmt/documentdb/models/location.py | 58 -- .../azure/mgmt/documentdb/models/resource.py | 54 -- .../mgmt/documentdb/operations/__init__.py | 16 - .../database_accounts_operations.py | 918 ------------------ .../azure/mgmt/documentdb/version.py | 13 - .../azure_bdist_wheel.py | 54 -- sdk/cosmos/azure-mgmt-documentdb/build.json | 5 - .../dev_requirements.txt | 1 - .../azure-mgmt-documentdb/sdk_packaging.toml | 2 - sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 - sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 -- ..._mgmt_documentdb.test_accounts_create.yaml | 193 ---- ..._mgmt_documentdb.test_accounts_delete.yaml | 467 --------- ...gmt_documentdb.test_accounts_features.yaml | 272 ------ .../tests/test_mgmt_documentdb.py | 146 --- 36 files changed, 3147 deletions(-) delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst deleted file mode 100644 index eb7345b4071e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. :changelog: - -Release History -=============== - -0.1.3 (2017-05-02) -++++++++++++++++++ - -* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix - -0.1.2 (2017-04-20) -++++++++++++++++++ - -This wheel package is now built with the azure wheel extension - -0.1.1 (2017-03-21) -++++++++++++++++++ - -* Added support for listing database account connection strings - -0.1.0 (2017-01-31) -++++++++++++++++++ - -* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in deleted file mode 100644 index 9ecaeb15de50..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst deleted file mode 100644 index a5204ea75358..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/README.rst +++ /dev/null @@ -1,52 +0,0 @@ -Microsoft Azure SDK for Python -============================== - -This is the Microsoft Azure DocumentDB Management Client Library. - -Azure Resource Manager (ARM) is the next generation of management APIs that -replace the old Azure Service Management (ASM). - -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. - -For the older Azure Service Management (ASM) libraries, see -`azure-servicemanagement-legacy `__ library. - -For a more complete set of Azure libraries, see the `azure `__ bundle package. - - -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - -Usage -===== - -For code examples, see `DocumentDB Management -`__ -on readthedocs.org. - - -Provide Feedback -================ - -If you encounter any bugs or have suggestions, please file an issue in the -`Issues `__ -section of the project. - - -.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py deleted file mode 100755 index 3ec900145f1e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .document_db import DocumentDB -from .version import VERSION - -__all__ = ['DocumentDB'] - -__version__ = VERSION - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py deleted file mode 100755 index 5eda44ab3e32..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import ServiceClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.database_accounts_operations import DatabaseAccountsOperations -from . import models - - -class DocumentDBConfiguration(AzureConfiguration): - """Configuration for DocumentDB - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") - if not base_url: - base_url = 'https://management.azure.com' - - super(DocumentDBConfiguration, self).__init__(base_url) - - self.add_user_agent('documentdb/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class DocumentDB(object): - """Azure DocumentDB Database Service Resource Provider REST API - - :ivar config: Configuration for client. - :vartype config: DocumentDBConfiguration - - :ivar database_accounts: DatabaseAccounts operations - :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2015-04-08' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.database_accounts = DatabaseAccountsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py deleted file mode 100755 index 2ed68c568a84..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .consistency_policy import ConsistencyPolicy -from .location import Location -from .failover_policy import FailoverPolicy -from .database_account import DatabaseAccount -from .failover_policies import FailoverPolicies -from .resource import Resource -from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters -from .database_account_patch_parameters import DatabaseAccountPatchParameters -from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult -from .database_account_list_keys_result import DatabaseAccountListKeysResult -from .database_account_connection_string import DatabaseAccountConnectionString -from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult -from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters -from .database_account_paged import DatabaseAccountPaged -from .document_db_enums import ( - DatabaseAccountKind, - DatabaseAccountOfferType, - DefaultConsistencyLevel, - KeyKind, -) - -__all__ = [ - 'ConsistencyPolicy', - 'Location', - 'FailoverPolicy', - 'DatabaseAccount', - 'FailoverPolicies', - 'Resource', - 'DatabaseAccountCreateUpdateParameters', - 'DatabaseAccountPatchParameters', - 'DatabaseAccountListReadOnlyKeysResult', - 'DatabaseAccountListKeysResult', - 'DatabaseAccountConnectionString', - 'DatabaseAccountListConnectionStringsResult', - 'DatabaseAccountRegenerateKeyParameters', - 'DatabaseAccountPaged', - 'DatabaseAccountKind', - 'DatabaseAccountOfferType', - 'DefaultConsistencyLevel', - 'KeyKind', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py deleted file mode 100755 index d8cefd4c0b59..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConsistencyPolicy(Model): - """The consistency policy for the DocumentDB database account. - - :param default_consistency_level: The default consistency level and - configuration settings of the DocumentDB account. Possible values include: - 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' - :type default_consistency_level: str or :class:`DefaultConsistencyLevel - ` - :param max_staleness_prefix: When used with the Bounded Staleness - consistency level, this value represents the number of stale requests - tolerated. Accepted range for this value is 1 – 2,147,483,647. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_staleness_prefix: long - :param max_interval_in_seconds: When used with the Bounded Staleness - consistency level, this value represents the time amount of staleness (in - seconds) tolerated. Accepted range for this value is 1 - 100. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_interval_in_seconds: int - """ - - _validation = { - 'default_consistency_level': {'required': True}, - 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, - 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, - 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, - 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, - } - - def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): - self.default_consistency_level = default_consistency_level - self.max_staleness_prefix = max_staleness_prefix - self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py deleted file mode 100755 index 89031adc35cb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccount(Resource): - """A DocumentDB database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param provisioning_state: - :type provisioning_state: str - :ivar document_endpoint: The connection endpoint for the DocumentDB - database account. - :vartype document_endpoint: str - :ivar database_account_offer_type: The offer type for the DocumentDB - database account. Default value: Standard. Possible values include: - 'Standard' - :vartype database_account_offer_type: str or - :class:`DatabaseAccountOfferType - ` - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - :param consistency_policy: The consistency policy for the DocumentDB - database account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :ivar write_locations: An array that contains the write location for the - DocumentDB account. - :vartype write_locations: list of :class:`Location - ` - :ivar read_locations: An array that contains of the read locations enabled - for the DocumentDB account. - :vartype read_locations: list of :class:`Location - ` - :ivar failover_policies: An array that contains the regions ordered by - their failover priorities. - :vartype failover_policies: list of :class:`FailoverPolicy - ` - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'document_endpoint': {'readonly': True}, - 'database_account_offer_type': {'readonly': True}, - 'write_locations': {'readonly': True}, - 'read_locations': {'readonly': True}, - 'failover_policies': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, - 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, - 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): - super(DatabaseAccount, self).__init__(location=location, tags=tags) - self.kind = kind - self.provisioning_state = provisioning_state - self.document_endpoint = None - self.database_account_offer_type = None - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover - self.consistency_policy = consistency_policy - self.write_locations = None - self.read_locations = None - self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py deleted file mode 100755 index db1828208069..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountConnectionString(Model): - """Connection string for the DocumentDB account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar connection_string: Value of the connection string - :vartype connection_string: str - :ivar description: Description of the connection string - :vartype description: str - """ - - _validation = { - 'connection_string': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self): - self.connection_string = None - self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py deleted file mode 100755 index 30978f482f0b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccountCreateUpdateParameters(Resource): - """Parameters to create and update DocumentDB database accounts. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param consistency_policy: The consistency policy for the DocumentDB - account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :param locations: An array that contains the georeplication locations - enabled for the DocumentDB account. - :type locations: list of :class:`Location - ` - :ivar database_account_offer_type: Default value: "Standard" . - :vartype database_account_offer_type: str - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - } - - database_account_offer_type = "Standard" - - def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): - super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) - self.kind = kind - self.consistency_policy = consistency_policy - self.locations = locations - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py deleted file mode 100755 index 7cddc00a3de1..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListConnectionStringsResult(Model): - """The connection strings for the given database account. - - :param connection_strings: An array that contains the connection strings - for the DocumentDB account. - :type connection_strings: list of :class:`DatabaseAccountConnectionString - ` - """ - - _attribute_map = { - 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, - } - - def __init__(self, connection_strings=None): - self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py deleted file mode 100755 index 4d775054ac14..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListKeysResult(Model): - """The access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_master_key: Base 64 encoded value of the primary read-write - key. - :vartype primary_master_key: str - :ivar secondary_master_key: Base 64 encoded value of the secondary - read-write key. - :vartype secondary_master_key: str - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_master_key': {'readonly': True}, - 'secondary_master_key': {'readonly': True}, - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, - 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, - 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_master_key = None - self.secondary_master_key = None - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py deleted file mode 100755 index 3330353950c6..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListReadOnlyKeysResult(Model): - """The read-only access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py deleted file mode 100755 index 4cb94909c515..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseAccountPaged(Paged): - """ - A paging container for iterating over a list of DatabaseAccount object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py deleted file mode 100755 index be78a4fd6817..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountPatchParameters(Model): - """Parameters for patching Azure DocumentDB database account properties. - - :param tags: - :type tags: dict - """ - - _validation = { - 'tags': {'required': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, tags): - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py deleted file mode 100755 index 3bff90d33db3..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountRegenerateKeyParameters(Model): - """Parameters to regenerate the keys within the database account. - - :param key_kind: The access key to regenerate. Possible values include: - 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - """ - - _validation = { - 'key_kind': {'required': True}, - } - - _attribute_map = { - 'key_kind': {'key': 'keyKind', 'type': 'str'}, - } - - def __init__(self, key_kind): - self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py deleted file mode 100755 index 1e87cecaeb2a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class DatabaseAccountKind(Enum): - - global_document_db = "GlobalDocumentDB" - mongo_db = "MongoDB" - parse = "Parse" - - -class DatabaseAccountOfferType(Enum): - - standard = "Standard" - - -class DefaultConsistencyLevel(Enum): - - eventual = "Eventual" - session = "Session" - bounded_staleness = "BoundedStaleness" - strong = "Strong" - consistent_prefix = "ConsistentPrefix" - - -class KeyKind(Enum): - - primary = "primary" - secondary = "secondary" - primary_readonly = "primaryReadonly" - secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py deleted file mode 100755 index 4c3ebff5e3b5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicies(Model): - """The list of new failover policies for the failover priority change. - - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - """ - - _attribute_map = { - 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, failover_policies=None): - self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py deleted file mode 100755 index 99cc2769403b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicy(Model): - """The failover policy for a given region of a database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region in which the database - account replicates to. Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region in which the database account - exists. - :type location_name: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py deleted file mode 100755 index 8bc82bde2c3f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Location(Model): - """A region in which the Azure DocumentDB database account is deployed. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region within the database account. - Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region. - :type location_name: str - :ivar document_endpoint: The connection endpoint for the specific region. - Example: - https://<accountName>-<locationName>.documents.azure.com:443/ - :vartype document_endpoint: str - :param provisioning_state: - :type provisioning_state: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.document_endpoint = None - self.provisioning_state = provisioning_state - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py deleted file mode 100755 index d5e887d0b78a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """A database account resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, location, tags=None): - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py deleted file mode 100755 index 27ed7c069537..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .database_accounts_operations import DatabaseAccountsOperations - -__all__ = [ - 'DatabaseAccountsOperations', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py deleted file mode 100755 index 2bb39b1f6839..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py +++ /dev/null @@ -1,918 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrestazure.azure_operation import AzureOperationPoller -import uuid - -from .. import models - - -class DatabaseAccountsOperations(object): - """DatabaseAccountsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". - """ - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-04-08" - - self.config = config - - def get( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Retrieves the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def patch( - self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): - """Patches the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param tags: - :type tags: dict - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - update_parameters = models.DatabaseAccountPatchParameters(tags=tags) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(update_parameters, 'DatabaseAccountPatchParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.patch(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def create_or_update( - self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): - """Creates or updates an Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param create_update_parameters: The parameters to provide for the - current database account. - :type create_update_parameters: - :class:`DatabaseAccountCreateUpdateParameters - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def delete( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Deletes an existing Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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 - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - def long_running_send(): - - request = self._client.delete(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def failover_priority_change( - self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): - """Changes the failover priority for the Azure DocumentDB database - account. A failover priority of 0 indicates a write region. The maximum - value for a failover priority = (total number of regions - 1). Failover - priority values must be unique for each of the regions in which the - database account exists. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(failover_parameters, 'FailoverPolicies') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - subscription. - - :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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - given resource group. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the access keys for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_connection_strings( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the connection strings for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListConnectionStringsResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_read_only_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the read-only access keys for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListReadOnlyKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def regenerate_key( - self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): - """Regenerates an access key for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param key_kind: The access key to regenerate. Possible values - include: 'primary', 'secondary', 'primaryReadonly', - 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def check_name_exists( - self, account_name, custom_headers=None, raw=False, **operation_config): - """Checks that the Azure DocumentDB account name already exists. A valid - account name may contain only lowercase letters, numbers, and the '-' - character, and must be between 3 and 50 characters. - - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: bool - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' - path_format_arguments = { - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.head(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = (response.status_code == 200) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py deleted file mode 100755 index 95ed79d29108..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.3" - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -from distutils import log as logger -import os.path - -from wheel.bdist_wheel import bdist_wheel -class azure_bdist_wheel(bdist_wheel): - """The purpose of this class is to build wheel a little differently than the sdist, - without requiring to build the wheel from the sdist (i.e. you can build the wheel - directly from source). - """ - - description = "Create an Azure wheel distribution" - - user_options = bdist_wheel.user_options + \ - [('azure-namespace-package=', None, - "Name of the deepest nspkg used")] - - def initialize_options(self): - bdist_wheel.initialize_options(self) - self.azure_namespace_package = None - - def finalize_options(self): - bdist_wheel.finalize_options(self) - if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): - raise ValueError("azure_namespace_package must finish by -nspkg") - - def run(self): - if not self.distribution.install_requires: - self.distribution.install_requires = [] - self.distribution.install_requires.append( - "{}>=2.0.0".format(self.azure_namespace_package)) - bdist_wheel.run(self) - - def write_record(self, bdist_dir, distinfo_dir): - if self.azure_namespace_package: - # Split and remove last part, assuming it's "nspkg" - subparts = self.azure_namespace_package.split('-')[0:-1] - folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] - for azure_sub_package in folder_with_init: - init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') - if os.path.isfile(init_file): - logger.info("manually remove {} while building the wheel".format(init_file)) - os.remove(init_file) - else: - raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) - bdist_wheel.write_record(self, bdist_dir, distinfo_dir) -cmdclass = { - 'bdist_wheel': azure_bdist_wheel, -} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json deleted file mode 100644 index 4d98fc12a39e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/build.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "autorest": "1.0.1-20170501-2300-nightly", - "date": "2017-05-01T20:13:42Z", - "version": "0.1.3" -} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt deleted file mode 100644 index 6ccb7f031ddd..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt +++ /dev/null @@ -1 +0,0 @@ --e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml deleted file mode 100644 index e7687fdae93b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml +++ /dev/null @@ -1,2 +0,0 @@ -[packaging] -auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg deleted file mode 100644 index 856f4164982c..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[bdist_wheel] -universal=1 -azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py deleted file mode 100644 index ddef54e31bb5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.py +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env python - -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup -try: - from azure_bdist_wheel import cmdclass -except ImportError: - from distutils import log as logger - logger.warn("Wheel is not available, disabling bdist_wheel hook") - cmdclass = {} - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-documentdb" -PACKAGE_PPRINT_NAME = "DocumentDB Management" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') - -# azure v0.x is not compatible with this package -# azure v0.x used to have a __version__ attribute (newer versions don't) -try: - import azure - try: - ver = azure.__version__ - raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' - ) - except AttributeError: - pass -except ImportError: - pass - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError('Cannot find version information') - -with open('README.rst', encoding='utf-8') as f: - readme = f.read() -with open('HISTORY.rst', encoding='utf-8') as f: - history = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + history, - license='MIT License', - author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', - classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'License :: OSI Approved :: MIT License', - ], - zip_safe=False, - packages=find_packages(), - install_requires=[ - 'msrestazure~=0.4.7', - 'azure-common~=1.1.5', - ], - cmdclass=cmdclass -) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml deleted file mode 100644 index d470d7f8673d..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml +++ /dev/null @@ -1,193 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] - method: HEAD - uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: ''} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['142'] - Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-ratelimit-remaining-tenant-reads: ['14999'] - x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] - status: {code: 404, message: NotFound} -- request: - body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], - "databaseAccountOfferType": "Standard"}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['121'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['910'] - x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Completed","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['33'] - x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml deleted file mode 100644 index e6f4e2348f8f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml +++ /dev/null @@ -1,467 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' - under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' - was not found."}}'} - headers: - Cache-Control: [no-cache] - Content-Length: ['214'] - Content-Type: [application/json; charset=utf-8] - Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-failure-cause: [gateway] - x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] - status: {code: 404, message: Not Found} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml deleted file mode 100644 index b2e4b82a9d9e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml +++ /dev/null @@ -1,272 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1144'] - x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1156'] - x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['2225'] - x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] - status: {code: 200, message: Ok} -- request: - body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['73'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 - response: - body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique - and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['170'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] - status: {code: 400, message: BadRequest} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 - response: - body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['239'] - x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] - status: {code: 200, message: Ok} -- request: - body: '{"keyKind": "primary"}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['22'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] - x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py deleted file mode 100644 index 902666a22cf0..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py +++ /dev/null @@ -1,146 +0,0 @@ -# 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. -#-------------------------------------------------------------------------- -import unittest - -import azure.mgmt.documentdb -from msrestazure.azure_exceptions import CloudError -from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer - - -class MgmtDocDBTest(AzureMgmtTestCase): - - def setUp(self): - super(MgmtDocDBTest, self).setUp() - self.client = self.create_mgmt_client( - azure.mgmt.documentdb.DocumentDB - ) - - @ResourceGroupPreparer() - def test_accounts_create(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtst') - - self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) - - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - account = async_docdb_create.result() - self.assertIsNotNone(account) - # Rest API issue - # self.assertEqual(account.name, account_name) - - @ResourceGroupPreparer() - def test_accounts_features(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtest') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - account = self.client.database_accounts.get( - resource_group.name, - account_name - ) - self.assertEqual(account.name, account_name) - - my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) - self.assertEqual(len(my_accounts), 1) - self.assertEqual(my_accounts[0].name, account_name) - - my_accounts = list(self.client.database_accounts.list()) - self.assertTrue(len(my_accounts) >= 1) - self.assertTrue(any(db.name == account_name for db in my_accounts)) - - # I guess we can make this test with no error, need to check with DocDB team - # This is an interesting test anyway, this implies that the serialization works - # and error message is available. Since this method does not return an object - # (i.e. no deserialization to test), this is a complete test. - # We are NOT here to test the RestAPI, but the Swagger file and Python code. - with self.assertRaises(CloudError) as cm: - async_change = self.client.database_accounts.failover_priority_change( - resource_group.name, - account_name, - [{ - 'location_name': self.region, - 'failover_priority': 0 - }] - ) - async_change.wait() - self.assertIn('Failover priorities must be unique', cm.exception.message) - - my_keys = self.client.database_accounts.list_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_master_key) - self.assertIsNotNone(my_keys.secondary_master_key) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - my_keys = self.client.database_accounts.list_read_only_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - async_regenerate = self.client.database_accounts.regenerate_key( - resource_group.name, - account_name, - "primary" - ) - async_regenerate.wait() - - @ResourceGroupPreparer() - def test_accounts_delete(self, resource_group, location): - account_name = self.get_resource_name('pydocumentdbtst') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - # Current implementation of msrestazure does not support 404 as a end of LRO delete - # https://github.com/Azure/msrestazure-for-python/issues/7 - async_delete = self.client.database_accounts.delete(resource_group.name, account_name) - try: - async_delete.wait() - except CloudError as err: - if err.response.status_code != 404: - raise - - -#------------------------------------------------------------------------------ -if __name__ == '__main__': - unittest.main() From 5d91db3af5df61b0ac08f2d85f728935ad1da8d3 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:42:03 -0700 Subject: [PATCH 108/244] Revert "Remove docdb mgmt package from master (#6585)" (#6593) This reverts commit d2ed7d87997eac9b715ee9802c15349a12446b84. --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 + sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 + sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 + .../azure-mgmt-documentdb/azure/__init__.py | 1 + .../azure/mgmt/__init__.py | 1 + .../azure/mgmt/documentdb/__init__.py | 18 + .../azure/mgmt/documentdb/document_db.py | 83 ++ .../azure/mgmt/documentdb/models/__init__.py | 52 + .../documentdb/models/consistency_policy.py | 50 + .../documentdb/models/database_account.py | 117 +++ .../database_account_connection_string.py | 39 + ...tabase_account_create_update_parameters.py | 90 ++ ..._account_list_connection_strings_result.py | 29 + .../database_account_list_keys_result.py | 53 + ...base_account_list_read_only_keys_result.py | 41 + .../models/database_account_paged.py | 27 + .../database_account_patch_parameters.py | 31 + ...abase_account_regenerate_key_parameters.py | 33 + .../documentdb/models/document_db_enums.py | 41 + .../documentdb/models/failover_policies.py | 28 + .../mgmt/documentdb/models/failover_policy.py | 48 + .../azure/mgmt/documentdb/models/location.py | 58 ++ .../azure/mgmt/documentdb/models/resource.py | 54 ++ .../mgmt/documentdb/operations/__init__.py | 16 + .../database_accounts_operations.py | 918 ++++++++++++++++++ .../azure/mgmt/documentdb/version.py | 13 + .../azure_bdist_wheel.py | 54 ++ sdk/cosmos/azure-mgmt-documentdb/build.json | 5 + .../dev_requirements.txt | 1 + .../azure-mgmt-documentdb/sdk_packaging.toml | 2 + sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 + sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 ++ ..._mgmt_documentdb.test_accounts_create.yaml | 193 ++++ ..._mgmt_documentdb.test_accounts_delete.yaml | 467 +++++++++ ...gmt_documentdb.test_accounts_features.yaml | 272 ++++++ .../tests/test_mgmt_documentdb.py | 146 +++ 36 files changed, 3147 insertions(+) create mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in create mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json create mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt create mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst new file mode 100644 index 000000000000..eb7345b4071e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst @@ -0,0 +1,24 @@ +.. :changelog: + +Release History +=============== + +0.1.3 (2017-05-02) +++++++++++++++++++ + +* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix + +0.1.2 (2017-04-20) +++++++++++++++++++ + +This wheel package is now built with the azure wheel extension + +0.1.1 (2017-03-21) +++++++++++++++++++ + +* Added support for listing database account connection strings + +0.1.0 (2017-01-31) +++++++++++++++++++ + +* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in new file mode 100644 index 000000000000..9ecaeb15de50 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in @@ -0,0 +1,2 @@ +include *.rst +include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst new file mode 100644 index 000000000000..a5204ea75358 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/README.rst @@ -0,0 +1,52 @@ +Microsoft Azure SDK for Python +============================== + +This is the Microsoft Azure DocumentDB Management Client Library. + +Azure Resource Manager (ARM) is the next generation of management APIs that +replace the old Azure Service Management (ASM). + +This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. + +For the older Azure Service Management (ASM) libraries, see +`azure-servicemanagement-legacy `__ library. + +For a more complete set of Azure libraries, see the `azure `__ bundle package. + + +Compatibility +============= + +**IMPORTANT**: If you have an earlier version of the azure package +(version < 1.0), you should uninstall it before installing this package. + +You can check the version using pip: + +.. code:: shell + + pip freeze + +If you see azure==0.11.0 (or any version below 1.0), uninstall it first: + +.. code:: shell + + pip uninstall azure + + +Usage +===== + +For code examples, see `DocumentDB Management +`__ +on readthedocs.org. + + +Provide Feedback +================ + +If you encounter any bugs or have suggestions, please file an issue in the +`Issues `__ +section of the project. + + +.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py new file mode 100755 index 000000000000..3ec900145f1e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .document_db import DocumentDB +from .version import VERSION + +__all__ = ['DocumentDB'] + +__version__ = VERSION + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py new file mode 100755 index 000000000000..5eda44ab3e32 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import ServiceClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.database_accounts_operations import DatabaseAccountsOperations +from . import models + + +class DocumentDBConfiguration(AzureConfiguration): + """Configuration for DocumentDB + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not isinstance(subscription_id, str): + raise TypeError("Parameter 'subscription_id' must be str.") + if not base_url: + base_url = 'https://management.azure.com' + + super(DocumentDBConfiguration, self).__init__(base_url) + + self.add_user_agent('documentdb/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class DocumentDB(object): + """Azure DocumentDB Database Service Resource Provider REST API + + :ivar config: Configuration for client. + :vartype config: DocumentDBConfiguration + + :ivar database_accounts: DatabaseAccounts operations + :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) + self._client = ServiceClient(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2015-04-08' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.database_accounts = DatabaseAccountsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py new file mode 100755 index 000000000000..2ed68c568a84 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .consistency_policy import ConsistencyPolicy +from .location import Location +from .failover_policy import FailoverPolicy +from .database_account import DatabaseAccount +from .failover_policies import FailoverPolicies +from .resource import Resource +from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters +from .database_account_patch_parameters import DatabaseAccountPatchParameters +from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult +from .database_account_list_keys_result import DatabaseAccountListKeysResult +from .database_account_connection_string import DatabaseAccountConnectionString +from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult +from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters +from .database_account_paged import DatabaseAccountPaged +from .document_db_enums import ( + DatabaseAccountKind, + DatabaseAccountOfferType, + DefaultConsistencyLevel, + KeyKind, +) + +__all__ = [ + 'ConsistencyPolicy', + 'Location', + 'FailoverPolicy', + 'DatabaseAccount', + 'FailoverPolicies', + 'Resource', + 'DatabaseAccountCreateUpdateParameters', + 'DatabaseAccountPatchParameters', + 'DatabaseAccountListReadOnlyKeysResult', + 'DatabaseAccountListKeysResult', + 'DatabaseAccountConnectionString', + 'DatabaseAccountListConnectionStringsResult', + 'DatabaseAccountRegenerateKeyParameters', + 'DatabaseAccountPaged', + 'DatabaseAccountKind', + 'DatabaseAccountOfferType', + 'DefaultConsistencyLevel', + 'KeyKind', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py new file mode 100755 index 000000000000..d8cefd4c0b59 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConsistencyPolicy(Model): + """The consistency policy for the DocumentDB database account. + + :param default_consistency_level: The default consistency level and + configuration settings of the DocumentDB account. Possible values include: + 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' + :type default_consistency_level: str or :class:`DefaultConsistencyLevel + ` + :param max_staleness_prefix: When used with the Bounded Staleness + consistency level, this value represents the number of stale requests + tolerated. Accepted range for this value is 1 – 2,147,483,647. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_staleness_prefix: long + :param max_interval_in_seconds: When used with the Bounded Staleness + consistency level, this value represents the time amount of staleness (in + seconds) tolerated. Accepted range for this value is 1 - 100. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_interval_in_seconds: int + """ + + _validation = { + 'default_consistency_level': {'required': True}, + 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, + 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, + 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, + 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, + } + + def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): + self.default_consistency_level = default_consistency_level + self.max_staleness_prefix = max_staleness_prefix + self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py new file mode 100755 index 000000000000..89031adc35cb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py @@ -0,0 +1,117 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccount(Resource): + """A DocumentDB database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param provisioning_state: + :type provisioning_state: str + :ivar document_endpoint: The connection endpoint for the DocumentDB + database account. + :vartype document_endpoint: str + :ivar database_account_offer_type: The offer type for the DocumentDB + database account. Default value: Standard. Possible values include: + 'Standard' + :vartype database_account_offer_type: str or + :class:`DatabaseAccountOfferType + ` + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + :param consistency_policy: The consistency policy for the DocumentDB + database account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :ivar write_locations: An array that contains the write location for the + DocumentDB account. + :vartype write_locations: list of :class:`Location + ` + :ivar read_locations: An array that contains of the read locations enabled + for the DocumentDB account. + :vartype read_locations: list of :class:`Location + ` + :ivar failover_policies: An array that contains the regions ordered by + their failover priorities. + :vartype failover_policies: list of :class:`FailoverPolicy + ` + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'document_endpoint': {'readonly': True}, + 'database_account_offer_type': {'readonly': True}, + 'write_locations': {'readonly': True}, + 'read_locations': {'readonly': True}, + 'failover_policies': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, + 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, + 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): + super(DatabaseAccount, self).__init__(location=location, tags=tags) + self.kind = kind + self.provisioning_state = provisioning_state + self.document_endpoint = None + self.database_account_offer_type = None + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover + self.consistency_policy = consistency_policy + self.write_locations = None + self.read_locations = None + self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py new file mode 100755 index 000000000000..db1828208069 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountConnectionString(Model): + """Connection string for the DocumentDB account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar connection_string: Value of the connection string + :vartype connection_string: str + :ivar description: Description of the connection string + :vartype description: str + """ + + _validation = { + 'connection_string': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self): + self.connection_string = None + self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py new file mode 100755 index 000000000000..30978f482f0b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccountCreateUpdateParameters(Resource): + """Parameters to create and update DocumentDB database accounts. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param consistency_policy: The consistency policy for the DocumentDB + account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :param locations: An array that contains the georeplication locations + enabled for the DocumentDB account. + :type locations: list of :class:`Location + ` + :ivar database_account_offer_type: Default value: "Standard" . + :vartype database_account_offer_type: str + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'locations': {'required': True}, + 'database_account_offer_type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + } + + database_account_offer_type = "Standard" + + def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): + super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) + self.kind = kind + self.consistency_policy = consistency_policy + self.locations = locations + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py new file mode 100755 index 000000000000..7cddc00a3de1 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListConnectionStringsResult(Model): + """The connection strings for the given database account. + + :param connection_strings: An array that contains the connection strings + for the DocumentDB account. + :type connection_strings: list of :class:`DatabaseAccountConnectionString + ` + """ + + _attribute_map = { + 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, + } + + def __init__(self, connection_strings=None): + self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py new file mode 100755 index 000000000000..4d775054ac14 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListKeysResult(Model): + """The access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_master_key: Base 64 encoded value of the primary read-write + key. + :vartype primary_master_key: str + :ivar secondary_master_key: Base 64 encoded value of the secondary + read-write key. + :vartype secondary_master_key: str + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_master_key': {'readonly': True}, + 'secondary_master_key': {'readonly': True}, + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, + 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, + 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_master_key = None + self.secondary_master_key = None + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py new file mode 100755 index 000000000000..3330353950c6 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListReadOnlyKeysResult(Model): + """The read-only access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py new file mode 100755 index 000000000000..4cb94909c515 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class DatabaseAccountPaged(Paged): + """ + A paging container for iterating over a list of DatabaseAccount object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py new file mode 100755 index 000000000000..be78a4fd6817 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountPatchParameters(Model): + """Parameters for patching Azure DocumentDB database account properties. + + :param tags: + :type tags: dict + """ + + _validation = { + 'tags': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, tags): + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py new file mode 100755 index 000000000000..3bff90d33db3 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountRegenerateKeyParameters(Model): + """Parameters to regenerate the keys within the database account. + + :param key_kind: The access key to regenerate. Possible values include: + 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + """ + + _validation = { + 'key_kind': {'required': True}, + } + + _attribute_map = { + 'key_kind': {'key': 'keyKind', 'type': 'str'}, + } + + def __init__(self, key_kind): + self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py new file mode 100755 index 000000000000..1e87cecaeb2a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class DatabaseAccountKind(Enum): + + global_document_db = "GlobalDocumentDB" + mongo_db = "MongoDB" + parse = "Parse" + + +class DatabaseAccountOfferType(Enum): + + standard = "Standard" + + +class DefaultConsistencyLevel(Enum): + + eventual = "Eventual" + session = "Session" + bounded_staleness = "BoundedStaleness" + strong = "Strong" + consistent_prefix = "ConsistentPrefix" + + +class KeyKind(Enum): + + primary = "primary" + secondary = "secondary" + primary_readonly = "primaryReadonly" + secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py new file mode 100755 index 000000000000..4c3ebff5e3b5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicies(Model): + """The list of new failover policies for the failover priority change. + + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + """ + + _attribute_map = { + 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, failover_policies=None): + self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py new file mode 100755 index 000000000000..99cc2769403b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicy(Model): + """The failover policy for a given region of a database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region in which the database + account replicates to. Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region in which the database account + exists. + :type location_name: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py new file mode 100755 index 000000000000..8bc82bde2c3f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Location(Model): + """A region in which the Azure DocumentDB database account is deployed. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region within the database account. + Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region. + :type location_name: str + :ivar document_endpoint: The connection endpoint for the specific region. + Example: + https://<accountName>-<locationName>.documents.azure.com:443/ + :vartype document_endpoint: str + :param provisioning_state: + :type provisioning_state: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'document_endpoint': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.document_endpoint = None + self.provisioning_state = provisioning_state + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py new file mode 100755 index 000000000000..d5e887d0b78a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """A database account resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, location, tags=None): + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py new file mode 100755 index 000000000000..27ed7c069537 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py @@ -0,0 +1,16 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .database_accounts_operations import DatabaseAccountsOperations + +__all__ = [ + 'DatabaseAccountsOperations', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py new file mode 100755 index 000000000000..2bb39b1f6839 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py @@ -0,0 +1,918 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrestazure.azure_operation import AzureOperationPoller +import uuid + +from .. import models + + +class DatabaseAccountsOperations(object): + """DatabaseAccountsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". + """ + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-04-08" + + self.config = config + + def get( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Retrieves the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def patch( + self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): + """Patches the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param tags: + :type tags: dict + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + update_parameters = models.DatabaseAccountPatchParameters(tags=tags) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(update_parameters, 'DatabaseAccountPatchParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.patch(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def create_or_update( + self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates an Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param create_update_parameters: The parameters to provide for the + current database account. + :type create_update_parameters: + :class:`DatabaseAccountCreateUpdateParameters + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.put(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def delete( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Deletes an existing Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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 + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + def long_running_send(): + + request = self._client.delete(url, query_parameters) + return self._client.send(request, header_parameters, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def failover_priority_change( + self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): + """Changes the failover priority for the Azure DocumentDB database + account. A failover priority of 0 indicates a write region. The maximum + value for a failover priority = (total number of regions - 1). Failover + priority values must be unique for each of the regions in which the + database account exists. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(failover_parameters, 'FailoverPolicies') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + subscription. + + :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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + given resource group. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the access keys for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_connection_strings( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the connection strings for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListConnectionStringsResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_read_only_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the read-only access keys for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListReadOnlyKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def regenerate_key( + self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): + """Regenerates an access key for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param key_kind: The access key to regenerate. Possible values + include: 'primary', 'secondary', 'primaryReadonly', + 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def check_name_exists( + self, account_name, custom_headers=None, raw=False, **operation_config): + """Checks that the Azure DocumentDB account name already exists. A valid + account name may contain only lowercase letters, numbers, and the '-' + character, and must be between 3 and 50 characters. + + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: bool + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' + path_format_arguments = { + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.head(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = (response.status_code == 200) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py new file mode 100755 index 000000000000..95ed79d29108 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.3" + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py new file mode 100644 index 000000000000..8a81d1b61775 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py @@ -0,0 +1,54 @@ +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +from distutils import log as logger +import os.path + +from wheel.bdist_wheel import bdist_wheel +class azure_bdist_wheel(bdist_wheel): + """The purpose of this class is to build wheel a little differently than the sdist, + without requiring to build the wheel from the sdist (i.e. you can build the wheel + directly from source). + """ + + description = "Create an Azure wheel distribution" + + user_options = bdist_wheel.user_options + \ + [('azure-namespace-package=', None, + "Name of the deepest nspkg used")] + + def initialize_options(self): + bdist_wheel.initialize_options(self) + self.azure_namespace_package = None + + def finalize_options(self): + bdist_wheel.finalize_options(self) + if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): + raise ValueError("azure_namespace_package must finish by -nspkg") + + def run(self): + if not self.distribution.install_requires: + self.distribution.install_requires = [] + self.distribution.install_requires.append( + "{}>=2.0.0".format(self.azure_namespace_package)) + bdist_wheel.run(self) + + def write_record(self, bdist_dir, distinfo_dir): + if self.azure_namespace_package: + # Split and remove last part, assuming it's "nspkg" + subparts = self.azure_namespace_package.split('-')[0:-1] + folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] + for azure_sub_package in folder_with_init: + init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') + if os.path.isfile(init_file): + logger.info("manually remove {} while building the wheel".format(init_file)) + os.remove(init_file) + else: + raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) + bdist_wheel.write_record(self, bdist_dir, distinfo_dir) +cmdclass = { + 'bdist_wheel': azure_bdist_wheel, +} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json new file mode 100644 index 000000000000..4d98fc12a39e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/build.json @@ -0,0 +1,5 @@ +{ + "autorest": "1.0.1-20170501-2300-nightly", + "date": "2017-05-01T20:13:42Z", + "version": "0.1.3" +} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt new file mode 100644 index 000000000000..6ccb7f031ddd --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt @@ -0,0 +1 @@ +-e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml new file mode 100644 index 000000000000..e7687fdae93b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg new file mode 100644 index 000000000000..856f4164982c --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg @@ -0,0 +1,3 @@ +[bdist_wheel] +universal=1 +azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py new file mode 100644 index 000000000000..ddef54e31bb5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup +try: + from azure_bdist_wheel import cmdclass +except ImportError: + from distutils import log as logger + logger.warn("Wheel is not available, disabling bdist_wheel hook") + cmdclass = {} + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-documentdb" +PACKAGE_PPRINT_NAME = "DocumentDB Management" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.rst', encoding='utf-8') as f: + readme = f.read() +with open('HISTORY.rst', encoding='utf-8') as f: + history = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + history, + license='MIT License', + author='Microsoft Corporation', + author_email='ptvshelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(), + install_requires=[ + 'msrestazure~=0.4.7', + 'azure-common~=1.1.5', + ], + cmdclass=cmdclass +) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml new file mode 100644 index 000000000000..d470d7f8673d --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml @@ -0,0 +1,193 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] + method: HEAD + uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: ''} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['142'] + Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-ratelimit-remaining-tenant-reads: ['14999'] + x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] + status: {code: 404, message: NotFound} +- request: + body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], + "databaseAccountOfferType": "Standard"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['121'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['910'] + x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Completed","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['33'] + x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml new file mode 100644 index 000000000000..e6f4e2348f8f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml @@ -0,0 +1,467 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' + under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' + was not found."}}'} + headers: + Cache-Control: [no-cache] + Content-Length: ['214'] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-failure-cause: [gateway] + x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] + status: {code: 404, message: Not Found} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml new file mode 100644 index 000000000000..b2e4b82a9d9e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml @@ -0,0 +1,272 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1144'] + x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1156'] + x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2225'] + x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] + status: {code: 200, message: Ok} +- request: + body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['73'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 + response: + body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique + and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['170'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] + status: {code: 400, message: BadRequest} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 + response: + body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['239'] + x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] + status: {code: 200, message: Ok} +- request: + body: '{"keyKind": "primary"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['22'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] + x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py new file mode 100644 index 000000000000..902666a22cf0 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py @@ -0,0 +1,146 @@ +# 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. +#-------------------------------------------------------------------------- +import unittest + +import azure.mgmt.documentdb +from msrestazure.azure_exceptions import CloudError +from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer + + +class MgmtDocDBTest(AzureMgmtTestCase): + + def setUp(self): + super(MgmtDocDBTest, self).setUp() + self.client = self.create_mgmt_client( + azure.mgmt.documentdb.DocumentDB + ) + + @ResourceGroupPreparer() + def test_accounts_create(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtst') + + self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) + + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + account = async_docdb_create.result() + self.assertIsNotNone(account) + # Rest API issue + # self.assertEqual(account.name, account_name) + + @ResourceGroupPreparer() + def test_accounts_features(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtest') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + account = self.client.database_accounts.get( + resource_group.name, + account_name + ) + self.assertEqual(account.name, account_name) + + my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) + self.assertEqual(len(my_accounts), 1) + self.assertEqual(my_accounts[0].name, account_name) + + my_accounts = list(self.client.database_accounts.list()) + self.assertTrue(len(my_accounts) >= 1) + self.assertTrue(any(db.name == account_name for db in my_accounts)) + + # I guess we can make this test with no error, need to check with DocDB team + # This is an interesting test anyway, this implies that the serialization works + # and error message is available. Since this method does not return an object + # (i.e. no deserialization to test), this is a complete test. + # We are NOT here to test the RestAPI, but the Swagger file and Python code. + with self.assertRaises(CloudError) as cm: + async_change = self.client.database_accounts.failover_priority_change( + resource_group.name, + account_name, + [{ + 'location_name': self.region, + 'failover_priority': 0 + }] + ) + async_change.wait() + self.assertIn('Failover priorities must be unique', cm.exception.message) + + my_keys = self.client.database_accounts.list_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_master_key) + self.assertIsNotNone(my_keys.secondary_master_key) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + my_keys = self.client.database_accounts.list_read_only_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + async_regenerate = self.client.database_accounts.regenerate_key( + resource_group.name, + account_name, + "primary" + ) + async_regenerate.wait() + + @ResourceGroupPreparer() + def test_accounts_delete(self, resource_group, location): + account_name = self.get_resource_name('pydocumentdbtst') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + # Current implementation of msrestazure does not support 404 as a end of LRO delete + # https://github.com/Azure/msrestazure-for-python/issues/7 + async_delete = self.client.database_accounts.delete(resource_group.name, account_name) + try: + async_delete.wait() + except CloudError as err: + if err.response.status_code != 404: + raise + + +#------------------------------------------------------------------------------ +if __name__ == '__main__': + unittest.main() From f7a7c216f5672e2ded787f2a4379d773d50f2277 Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 10:16:27 -0700 Subject: [PATCH 109/244] Update CODEOWNERS --- .github/CODEOWNERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 07d57ac48320..0172563e9a84 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -40,6 +40,9 @@ # Management Plane /**/*mgmt*/ @zikalino +# Management Plane +/**/*mgmt*/ @zikalino + ########### # Eng Sys ########### From 11016cda3132391fe6289192b374691a66447801 Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 11:03:35 -0700 Subject: [PATCH 110/244] more code owners --- .github/CODEOWNERS | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0172563e9a84..07d57ac48320 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -40,9 +40,6 @@ # Management Plane /**/*mgmt*/ @zikalino -# Management Plane -/**/*mgmt*/ @zikalino - ########### # Eng Sys ########### From 55dce19e9938684c6029f7e0ae62beafe3638466 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 11:58:35 -0700 Subject: [PATCH 111/244] add policy and decorators for secrets (#6453) --- .../azure/keyvault/secrets/_shared/async_client_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 193e6e324c7e..c451ffb1e766 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncHttpTransport +from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient From 3a25ebd0f98c989d9508a50c4b2c8cd9a4c944b9 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Thu, 25 Jul 2019 12:41:38 -0700 Subject: [PATCH 112/244] Paging v2 (#6420) * First version of paging * Clean sync paging * Async paging * Name AsyncList without underscore * MyPy happyness * pylint * black * PageIterator as conf * Simplify ItemPaged * Use chain to link iterable * Make Paging more open * Docstring * pylint / mypy / black * Regenerate KV with latest Autorest + Paging branch (#6479) * Regenerate KV with latest Autorest + Paging branch * Remove unused import in tests * Make the async adapter more generic * Regeneration after operation mixin fix in Autorest * COmmit changes forgotten in #6418 * Fixing syntax for 2.7 * Move Storage Queue to new Paging (#6447) * Move Storage Queue to new Paging * Working Storage queue on new paging * Fix types * First shot of blob tests update * Fixing blob tests * File to new paging * Doc fix * Feedbacks from @annatisch * Fix last @annatisch comment * Simplify paging contract * Fix storage queue after new paging contract --- .../_key_vault_client_operations_async.py | 60 ++++------------ .../_key_vault_client_operations.py | 60 ++++------------ .../_key_vault_client_operations_async.py | 70 ++++--------------- .../_key_vault_client_operations.py | 70 ++++--------------- .../keys/_shared/async_client_base.py | 19 +++++ .../_key_vault_client_operations_async.py | 60 ++++------------ .../_key_vault_client_operations.py | 60 ++++------------ .../_key_vault_client_operations_async.py | 70 ++++--------------- .../_key_vault_client_operations.py | 70 ++++--------------- .../secrets/_shared/async_client_base.py | 19 +++++ 10 files changed, 142 insertions(+), 416 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index b5cc965119ed..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 0ae7fd5fb025..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index 08e45c2b44a7..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index b9ed6e10ea21..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 193e6e324c7e..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -21,6 +21,25 @@ pass +class AsyncPagingAdapter: + """For each item in an AsyncIterator, returns the result of applying fn to that item. + Python 3.6 added syntax that could replace this (yield within async for).""" + + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: + self._pages = pages + self._fn = fn + + def __aiter__(self): + return self + + async def __anext__(self) -> Any: + item = await self._pages.__anext__() + if not item: + raise StopAsyncIteration + return self._fn(item) + # TODO: expected type Model got Coroutine instead? + + class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index b5cc965119ed..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 0ae7fd5fb025..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index 08e45c2b44a7..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index b9ed6e10ea21..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index c451ffb1e766..0119ef5a6e44 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -21,6 +21,25 @@ pass +class AsyncPagingAdapter: + """For each item in an AsyncIterator, returns the result of applying fn to that item. + Python 3.6 added syntax that could replace this (yield within async for).""" + + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: + self._pages = pages + self._fn = fn + + def __aiter__(self): + return self + + async def __anext__(self) -> Any: + item = await self._pages.__anext__() + if not item: + raise StopAsyncIteration + return self._fn(item) + # TODO: expected type Model got Coroutine instead? + + class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, From f02017e207c75177bb98ab611d0c9b44bd5c8b33 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 15:48:49 -0700 Subject: [PATCH 113/244] get rid of should only propagate (#6497) --- sdk/core/azure-core/azure/core/tracing/decorator.py | 2 +- sdk/core/azure-core/azure/core/tracing/decorator_async.py | 2 +- .../azure_core_asynctests/test_tracing_decorator_async.py | 5 ++++- sdk/core/azure-core/tests/test_tracing_decorator.py | 5 ++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 3986dcaf31ed..7d5d7bfce407 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None and orig_wrapped_span is None: + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 4df65fee77ef..781e20a6bef2 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None and orig_wrapped_span is None: + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index 82b4f97dc92f..e2a5c92e60b9 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -145,4 +145,7 @@ async def test_span_with_opencensus_complicated(value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert not parent.children[3].children + assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" + assert parent.children[3].children[1].span_data.name == "MockClient.make_request" + children = parent.children[1].children + assert len(children) == 2 diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index 764c09396255..eedd34c0afdd 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -177,4 +177,7 @@ def test_span_with_opencensus_complicated(self, value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert not parent.children[3].children + assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" + assert parent.children[3].children[1].span_data.name == "MockClient.make_request" + children = parent.children[1].children + assert len(children) == 2 From 984b619b8474c5779b05e681c499bd18ffc59885 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Mon, 29 Jul 2019 14:05:36 -0700 Subject: [PATCH 114/244] decorator only trace very top level function (#6530) --- sdk/core/azure-core/azure/core/tracing/decorator.py | 2 +- sdk/core/azure-core/azure/core/tracing/decorator_async.py | 2 +- .../azure_core_asynctests/test_tracing_decorator_async.py | 5 +---- sdk/core/azure-core/tests/test_tracing_decorator.py | 5 +---- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 7d5d7bfce407..3986dcaf31ed 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 781e20a6bef2..4df65fee77ef 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index e2a5c92e60b9..82b4f97dc92f 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -145,7 +145,4 @@ async def test_span_with_opencensus_complicated(value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index eedd34c0afdd..764c09396255 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -177,7 +177,4 @@ def test_span_with_opencensus_complicated(self, value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children From 54fb94fd56aa961e1307f885c1650cfa17542857 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 08:51:19 -0700 Subject: [PATCH 115/244] Synchronous username/password auth (#6416) --- .../azure/identity/_internal/__init__.py | 1 - .../azure-identity/tests/test_identity.py | 68 ------------------- 2 files changed, 69 deletions(-) diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index e7583139395b..cfdf935b801c 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,6 +2,5 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from .auth_code_redirect_handler import AuthCodeRedirectServer from .msal_credentials import ConfidentialClientCredential, PublicClientCredential from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 3aaa54a1f28f..8e7245522519 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -22,7 +22,6 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, - InteractiveBrowserCredential, UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential @@ -244,73 +243,6 @@ def test_default_credential(): DefaultAzureCredential() -@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser -def test_interactive_credential(): - oauth_state = "state" - expected_token = "access-token" - - transport = validating_transport( - requests=[Request()] * 2, # not validating requests because they're formed by MSAL - responses=[ - # expecting tenant discovery then a token request - mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), - mock_response( - json_payload={ - "access_token": expected_token, - "expires_in": 42, - "token_type": "Bearer", - "ext_expires_in": 42, - } - ), - ], - ) - - # mock local server fakes successful authentication by immediately returning a well-formed response - auth_code_response = {"code": "authorization-code", "state": [oauth_state]} - server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) - - credential = InteractiveBrowserCredential( - client_id="guid", - client_secret="secret", - server_class=server_class, - transport=transport, - instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request - ) - - # ensure the request beginning the flow has a known state value - with patch("azure.identity.browser_auth.uuid.uuid4", lambda: oauth_state): - token = credential.get_token("scope") - assert token.token == expected_token - - -@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser -def test_interactive_credential_timeout(): - # mock transport handles MSAL's tenant discovery - transport = Mock( - send=lambda _, **__: mock_response( - json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"} - ) - ) - - # mock local server blocks long enough to exceed the timeout - timeout = 1 - server_instance = Mock(wait_for_redirect=functools.partial(time.sleep, timeout + 1)) - server_class = Mock(return_value=server_instance) - - credential = InteractiveBrowserCredential( - client_id="guid", - client_secret="secret", - server_class=server_class, - timeout=timeout, - transport=transport, - instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request - ) - - with pytest.raises(ClientAuthenticationError) as ex: - credential.get_token("scope") - assert "timed out" in ex.value.message.lower() - - def test_username_password_credential(): expected_token = "access-token" transport = validating_transport( From 0b1240be4b5c6cd5f2cc658f3d0cca1ae38e7e5d Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 14:04:30 -0700 Subject: [PATCH 116/244] Synchronous interactive browser authentication (#6466) --- .../azure/identity/_internal/__init__.py | 1 + .../azure-identity/tests/test_identity.py | 68 +++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index cfdf935b801c..e7583139395b 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,5 +2,6 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +from .auth_code_redirect_handler import AuthCodeRedirectServer from .msal_credentials import ConfidentialClientCredential, PublicClientCredential from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 8e7245522519..3aaa54a1f28f 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -22,6 +22,7 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, + InteractiveBrowserCredential, UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential @@ -243,6 +244,73 @@ def test_default_credential(): DefaultAzureCredential() +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential(): + oauth_state = "state" + expected_token = "access-token" + + transport = validating_transport( + requests=[Request()] * 2, # not validating requests because they're formed by MSAL + responses=[ + # expecting tenant discovery then a token request + mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), + mock_response( + json_payload={ + "access_token": expected_token, + "expires_in": 42, + "token_type": "Bearer", + "ext_expires_in": 42, + } + ), + ], + ) + + # mock local server fakes successful authentication by immediately returning a well-formed response + auth_code_response = {"code": "authorization-code", "state": [oauth_state]} + server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + # ensure the request beginning the flow has a known state value + with patch("azure.identity.browser_auth.uuid.uuid4", lambda: oauth_state): + token = credential.get_token("scope") + assert token.token == expected_token + + +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential_timeout(): + # mock transport handles MSAL's tenant discovery + transport = Mock( + send=lambda _, **__: mock_response( + json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"} + ) + ) + + # mock local server blocks long enough to exceed the timeout + timeout = 1 + server_instance = Mock(wait_for_redirect=functools.partial(time.sleep, timeout + 1)) + server_class = Mock(return_value=server_instance) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + timeout=timeout, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + with pytest.raises(ClientAuthenticationError) as ex: + credential.get_token("scope") + assert "timed out" in ex.value.message.lower() + + def test_username_password_credential(): expected_token = "access-token" transport = validating_transport( From 770a0c15341ed51f91611f5a857cb0cbf184de4f Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Tue, 30 Jul 2019 20:19:31 -0700 Subject: [PATCH 117/244] KV aiohttp by default (#6563) * Aiohttp default async transport * Record keys with aiohttp * Record secrets with aiohttp --- .../azure/keyvault/secrets/_shared/async_client_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 0119ef5a6e44..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport +from azure.core.pipeline.transport import AsyncHttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient From 28a8eafc78083c189358f4c277e24d1c6b75d409 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 10:27:22 -0700 Subject: [PATCH 118/244] KV moved paging return type to ItemPaged (#6558) * KV with latest autorest * Make KV return ItemPaged from azure-core --- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../keys/_shared/async_client_base.py | 19 ----- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../secrets/_shared/async_client_base.py | 19 ----- 10 files changed, 416 insertions(+), 142 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, From ccacffe349291c120656d09725a209630b36e094 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:40:30 -0700 Subject: [PATCH 119/244] Remove docdb mgmt package from master (#6585) --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 - sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 - sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 - .../azure-mgmt-documentdb/azure/__init__.py | 1 - .../azure/mgmt/__init__.py | 1 - .../azure/mgmt/documentdb/__init__.py | 18 - .../azure/mgmt/documentdb/document_db.py | 83 -- .../azure/mgmt/documentdb/models/__init__.py | 52 - .../documentdb/models/consistency_policy.py | 50 - .../documentdb/models/database_account.py | 117 --- .../database_account_connection_string.py | 39 - ...tabase_account_create_update_parameters.py | 90 -- ..._account_list_connection_strings_result.py | 29 - .../database_account_list_keys_result.py | 53 - ...base_account_list_read_only_keys_result.py | 41 - .../models/database_account_paged.py | 27 - .../database_account_patch_parameters.py | 31 - ...abase_account_regenerate_key_parameters.py | 33 - .../documentdb/models/document_db_enums.py | 41 - .../documentdb/models/failover_policies.py | 28 - .../mgmt/documentdb/models/failover_policy.py | 48 - .../azure/mgmt/documentdb/models/location.py | 58 -- .../azure/mgmt/documentdb/models/resource.py | 54 -- .../mgmt/documentdb/operations/__init__.py | 16 - .../database_accounts_operations.py | 918 ------------------ .../azure/mgmt/documentdb/version.py | 13 - .../azure_bdist_wheel.py | 54 -- sdk/cosmos/azure-mgmt-documentdb/build.json | 5 - .../dev_requirements.txt | 1 - .../azure-mgmt-documentdb/sdk_packaging.toml | 2 - sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 - sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 -- ..._mgmt_documentdb.test_accounts_create.yaml | 193 ---- ..._mgmt_documentdb.test_accounts_delete.yaml | 467 --------- ...gmt_documentdb.test_accounts_features.yaml | 272 ------ .../tests/test_mgmt_documentdb.py | 146 --- 36 files changed, 3147 deletions(-) delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst deleted file mode 100644 index eb7345b4071e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. :changelog: - -Release History -=============== - -0.1.3 (2017-05-02) -++++++++++++++++++ - -* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix - -0.1.2 (2017-04-20) -++++++++++++++++++ - -This wheel package is now built with the azure wheel extension - -0.1.1 (2017-03-21) -++++++++++++++++++ - -* Added support for listing database account connection strings - -0.1.0 (2017-01-31) -++++++++++++++++++ - -* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in deleted file mode 100644 index 9ecaeb15de50..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst deleted file mode 100644 index a5204ea75358..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/README.rst +++ /dev/null @@ -1,52 +0,0 @@ -Microsoft Azure SDK for Python -============================== - -This is the Microsoft Azure DocumentDB Management Client Library. - -Azure Resource Manager (ARM) is the next generation of management APIs that -replace the old Azure Service Management (ASM). - -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. - -For the older Azure Service Management (ASM) libraries, see -`azure-servicemanagement-legacy `__ library. - -For a more complete set of Azure libraries, see the `azure `__ bundle package. - - -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - -Usage -===== - -For code examples, see `DocumentDB Management -`__ -on readthedocs.org. - - -Provide Feedback -================ - -If you encounter any bugs or have suggestions, please file an issue in the -`Issues `__ -section of the project. - - -.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py deleted file mode 100755 index 3ec900145f1e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .document_db import DocumentDB -from .version import VERSION - -__all__ = ['DocumentDB'] - -__version__ = VERSION - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py deleted file mode 100755 index 5eda44ab3e32..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import ServiceClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.database_accounts_operations import DatabaseAccountsOperations -from . import models - - -class DocumentDBConfiguration(AzureConfiguration): - """Configuration for DocumentDB - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") - if not base_url: - base_url = 'https://management.azure.com' - - super(DocumentDBConfiguration, self).__init__(base_url) - - self.add_user_agent('documentdb/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class DocumentDB(object): - """Azure DocumentDB Database Service Resource Provider REST API - - :ivar config: Configuration for client. - :vartype config: DocumentDBConfiguration - - :ivar database_accounts: DatabaseAccounts operations - :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2015-04-08' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.database_accounts = DatabaseAccountsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py deleted file mode 100755 index 2ed68c568a84..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .consistency_policy import ConsistencyPolicy -from .location import Location -from .failover_policy import FailoverPolicy -from .database_account import DatabaseAccount -from .failover_policies import FailoverPolicies -from .resource import Resource -from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters -from .database_account_patch_parameters import DatabaseAccountPatchParameters -from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult -from .database_account_list_keys_result import DatabaseAccountListKeysResult -from .database_account_connection_string import DatabaseAccountConnectionString -from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult -from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters -from .database_account_paged import DatabaseAccountPaged -from .document_db_enums import ( - DatabaseAccountKind, - DatabaseAccountOfferType, - DefaultConsistencyLevel, - KeyKind, -) - -__all__ = [ - 'ConsistencyPolicy', - 'Location', - 'FailoverPolicy', - 'DatabaseAccount', - 'FailoverPolicies', - 'Resource', - 'DatabaseAccountCreateUpdateParameters', - 'DatabaseAccountPatchParameters', - 'DatabaseAccountListReadOnlyKeysResult', - 'DatabaseAccountListKeysResult', - 'DatabaseAccountConnectionString', - 'DatabaseAccountListConnectionStringsResult', - 'DatabaseAccountRegenerateKeyParameters', - 'DatabaseAccountPaged', - 'DatabaseAccountKind', - 'DatabaseAccountOfferType', - 'DefaultConsistencyLevel', - 'KeyKind', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py deleted file mode 100755 index d8cefd4c0b59..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConsistencyPolicy(Model): - """The consistency policy for the DocumentDB database account. - - :param default_consistency_level: The default consistency level and - configuration settings of the DocumentDB account. Possible values include: - 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' - :type default_consistency_level: str or :class:`DefaultConsistencyLevel - ` - :param max_staleness_prefix: When used with the Bounded Staleness - consistency level, this value represents the number of stale requests - tolerated. Accepted range for this value is 1 – 2,147,483,647. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_staleness_prefix: long - :param max_interval_in_seconds: When used with the Bounded Staleness - consistency level, this value represents the time amount of staleness (in - seconds) tolerated. Accepted range for this value is 1 - 100. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_interval_in_seconds: int - """ - - _validation = { - 'default_consistency_level': {'required': True}, - 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, - 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, - 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, - 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, - } - - def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): - self.default_consistency_level = default_consistency_level - self.max_staleness_prefix = max_staleness_prefix - self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py deleted file mode 100755 index 89031adc35cb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccount(Resource): - """A DocumentDB database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param provisioning_state: - :type provisioning_state: str - :ivar document_endpoint: The connection endpoint for the DocumentDB - database account. - :vartype document_endpoint: str - :ivar database_account_offer_type: The offer type for the DocumentDB - database account. Default value: Standard. Possible values include: - 'Standard' - :vartype database_account_offer_type: str or - :class:`DatabaseAccountOfferType - ` - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - :param consistency_policy: The consistency policy for the DocumentDB - database account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :ivar write_locations: An array that contains the write location for the - DocumentDB account. - :vartype write_locations: list of :class:`Location - ` - :ivar read_locations: An array that contains of the read locations enabled - for the DocumentDB account. - :vartype read_locations: list of :class:`Location - ` - :ivar failover_policies: An array that contains the regions ordered by - their failover priorities. - :vartype failover_policies: list of :class:`FailoverPolicy - ` - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'document_endpoint': {'readonly': True}, - 'database_account_offer_type': {'readonly': True}, - 'write_locations': {'readonly': True}, - 'read_locations': {'readonly': True}, - 'failover_policies': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, - 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, - 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): - super(DatabaseAccount, self).__init__(location=location, tags=tags) - self.kind = kind - self.provisioning_state = provisioning_state - self.document_endpoint = None - self.database_account_offer_type = None - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover - self.consistency_policy = consistency_policy - self.write_locations = None - self.read_locations = None - self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py deleted file mode 100755 index db1828208069..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountConnectionString(Model): - """Connection string for the DocumentDB account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar connection_string: Value of the connection string - :vartype connection_string: str - :ivar description: Description of the connection string - :vartype description: str - """ - - _validation = { - 'connection_string': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self): - self.connection_string = None - self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py deleted file mode 100755 index 30978f482f0b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccountCreateUpdateParameters(Resource): - """Parameters to create and update DocumentDB database accounts. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param consistency_policy: The consistency policy for the DocumentDB - account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :param locations: An array that contains the georeplication locations - enabled for the DocumentDB account. - :type locations: list of :class:`Location - ` - :ivar database_account_offer_type: Default value: "Standard" . - :vartype database_account_offer_type: str - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - } - - database_account_offer_type = "Standard" - - def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): - super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) - self.kind = kind - self.consistency_policy = consistency_policy - self.locations = locations - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py deleted file mode 100755 index 7cddc00a3de1..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListConnectionStringsResult(Model): - """The connection strings for the given database account. - - :param connection_strings: An array that contains the connection strings - for the DocumentDB account. - :type connection_strings: list of :class:`DatabaseAccountConnectionString - ` - """ - - _attribute_map = { - 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, - } - - def __init__(self, connection_strings=None): - self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py deleted file mode 100755 index 4d775054ac14..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListKeysResult(Model): - """The access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_master_key: Base 64 encoded value of the primary read-write - key. - :vartype primary_master_key: str - :ivar secondary_master_key: Base 64 encoded value of the secondary - read-write key. - :vartype secondary_master_key: str - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_master_key': {'readonly': True}, - 'secondary_master_key': {'readonly': True}, - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, - 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, - 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_master_key = None - self.secondary_master_key = None - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py deleted file mode 100755 index 3330353950c6..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListReadOnlyKeysResult(Model): - """The read-only access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py deleted file mode 100755 index 4cb94909c515..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseAccountPaged(Paged): - """ - A paging container for iterating over a list of DatabaseAccount object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py deleted file mode 100755 index be78a4fd6817..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountPatchParameters(Model): - """Parameters for patching Azure DocumentDB database account properties. - - :param tags: - :type tags: dict - """ - - _validation = { - 'tags': {'required': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, tags): - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py deleted file mode 100755 index 3bff90d33db3..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountRegenerateKeyParameters(Model): - """Parameters to regenerate the keys within the database account. - - :param key_kind: The access key to regenerate. Possible values include: - 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - """ - - _validation = { - 'key_kind': {'required': True}, - } - - _attribute_map = { - 'key_kind': {'key': 'keyKind', 'type': 'str'}, - } - - def __init__(self, key_kind): - self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py deleted file mode 100755 index 1e87cecaeb2a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class DatabaseAccountKind(Enum): - - global_document_db = "GlobalDocumentDB" - mongo_db = "MongoDB" - parse = "Parse" - - -class DatabaseAccountOfferType(Enum): - - standard = "Standard" - - -class DefaultConsistencyLevel(Enum): - - eventual = "Eventual" - session = "Session" - bounded_staleness = "BoundedStaleness" - strong = "Strong" - consistent_prefix = "ConsistentPrefix" - - -class KeyKind(Enum): - - primary = "primary" - secondary = "secondary" - primary_readonly = "primaryReadonly" - secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py deleted file mode 100755 index 4c3ebff5e3b5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicies(Model): - """The list of new failover policies for the failover priority change. - - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - """ - - _attribute_map = { - 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, failover_policies=None): - self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py deleted file mode 100755 index 99cc2769403b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicy(Model): - """The failover policy for a given region of a database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region in which the database - account replicates to. Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region in which the database account - exists. - :type location_name: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py deleted file mode 100755 index 8bc82bde2c3f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Location(Model): - """A region in which the Azure DocumentDB database account is deployed. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region within the database account. - Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region. - :type location_name: str - :ivar document_endpoint: The connection endpoint for the specific region. - Example: - https://<accountName>-<locationName>.documents.azure.com:443/ - :vartype document_endpoint: str - :param provisioning_state: - :type provisioning_state: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.document_endpoint = None - self.provisioning_state = provisioning_state - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py deleted file mode 100755 index d5e887d0b78a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """A database account resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, location, tags=None): - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py deleted file mode 100755 index 27ed7c069537..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .database_accounts_operations import DatabaseAccountsOperations - -__all__ = [ - 'DatabaseAccountsOperations', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py deleted file mode 100755 index 2bb39b1f6839..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py +++ /dev/null @@ -1,918 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrestazure.azure_operation import AzureOperationPoller -import uuid - -from .. import models - - -class DatabaseAccountsOperations(object): - """DatabaseAccountsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". - """ - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-04-08" - - self.config = config - - def get( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Retrieves the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def patch( - self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): - """Patches the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param tags: - :type tags: dict - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - update_parameters = models.DatabaseAccountPatchParameters(tags=tags) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(update_parameters, 'DatabaseAccountPatchParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.patch(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def create_or_update( - self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): - """Creates or updates an Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param create_update_parameters: The parameters to provide for the - current database account. - :type create_update_parameters: - :class:`DatabaseAccountCreateUpdateParameters - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def delete( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Deletes an existing Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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 - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - def long_running_send(): - - request = self._client.delete(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def failover_priority_change( - self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): - """Changes the failover priority for the Azure DocumentDB database - account. A failover priority of 0 indicates a write region. The maximum - value for a failover priority = (total number of regions - 1). Failover - priority values must be unique for each of the regions in which the - database account exists. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(failover_parameters, 'FailoverPolicies') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - subscription. - - :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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - given resource group. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the access keys for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_connection_strings( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the connection strings for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListConnectionStringsResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_read_only_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the read-only access keys for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListReadOnlyKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def regenerate_key( - self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): - """Regenerates an access key for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param key_kind: The access key to regenerate. Possible values - include: 'primary', 'secondary', 'primaryReadonly', - 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def check_name_exists( - self, account_name, custom_headers=None, raw=False, **operation_config): - """Checks that the Azure DocumentDB account name already exists. A valid - account name may contain only lowercase letters, numbers, and the '-' - character, and must be between 3 and 50 characters. - - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: bool - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' - path_format_arguments = { - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.head(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = (response.status_code == 200) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py deleted file mode 100755 index 95ed79d29108..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.3" - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -from distutils import log as logger -import os.path - -from wheel.bdist_wheel import bdist_wheel -class azure_bdist_wheel(bdist_wheel): - """The purpose of this class is to build wheel a little differently than the sdist, - without requiring to build the wheel from the sdist (i.e. you can build the wheel - directly from source). - """ - - description = "Create an Azure wheel distribution" - - user_options = bdist_wheel.user_options + \ - [('azure-namespace-package=', None, - "Name of the deepest nspkg used")] - - def initialize_options(self): - bdist_wheel.initialize_options(self) - self.azure_namespace_package = None - - def finalize_options(self): - bdist_wheel.finalize_options(self) - if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): - raise ValueError("azure_namespace_package must finish by -nspkg") - - def run(self): - if not self.distribution.install_requires: - self.distribution.install_requires = [] - self.distribution.install_requires.append( - "{}>=2.0.0".format(self.azure_namespace_package)) - bdist_wheel.run(self) - - def write_record(self, bdist_dir, distinfo_dir): - if self.azure_namespace_package: - # Split and remove last part, assuming it's "nspkg" - subparts = self.azure_namespace_package.split('-')[0:-1] - folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] - for azure_sub_package in folder_with_init: - init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') - if os.path.isfile(init_file): - logger.info("manually remove {} while building the wheel".format(init_file)) - os.remove(init_file) - else: - raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) - bdist_wheel.write_record(self, bdist_dir, distinfo_dir) -cmdclass = { - 'bdist_wheel': azure_bdist_wheel, -} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json deleted file mode 100644 index 4d98fc12a39e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/build.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "autorest": "1.0.1-20170501-2300-nightly", - "date": "2017-05-01T20:13:42Z", - "version": "0.1.3" -} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt deleted file mode 100644 index 6ccb7f031ddd..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt +++ /dev/null @@ -1 +0,0 @@ --e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml deleted file mode 100644 index e7687fdae93b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml +++ /dev/null @@ -1,2 +0,0 @@ -[packaging] -auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg deleted file mode 100644 index 856f4164982c..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[bdist_wheel] -universal=1 -azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py deleted file mode 100644 index ddef54e31bb5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.py +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env python - -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup -try: - from azure_bdist_wheel import cmdclass -except ImportError: - from distutils import log as logger - logger.warn("Wheel is not available, disabling bdist_wheel hook") - cmdclass = {} - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-documentdb" -PACKAGE_PPRINT_NAME = "DocumentDB Management" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') - -# azure v0.x is not compatible with this package -# azure v0.x used to have a __version__ attribute (newer versions don't) -try: - import azure - try: - ver = azure.__version__ - raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' - ) - except AttributeError: - pass -except ImportError: - pass - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError('Cannot find version information') - -with open('README.rst', encoding='utf-8') as f: - readme = f.read() -with open('HISTORY.rst', encoding='utf-8') as f: - history = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + history, - license='MIT License', - author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', - classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'License :: OSI Approved :: MIT License', - ], - zip_safe=False, - packages=find_packages(), - install_requires=[ - 'msrestazure~=0.4.7', - 'azure-common~=1.1.5', - ], - cmdclass=cmdclass -) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml deleted file mode 100644 index d470d7f8673d..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml +++ /dev/null @@ -1,193 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] - method: HEAD - uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: ''} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['142'] - Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-ratelimit-remaining-tenant-reads: ['14999'] - x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] - status: {code: 404, message: NotFound} -- request: - body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], - "databaseAccountOfferType": "Standard"}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['121'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['910'] - x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Completed","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['33'] - x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml deleted file mode 100644 index e6f4e2348f8f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml +++ /dev/null @@ -1,467 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' - under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' - was not found."}}'} - headers: - Cache-Control: [no-cache] - Content-Length: ['214'] - Content-Type: [application/json; charset=utf-8] - Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-failure-cause: [gateway] - x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] - status: {code: 404, message: Not Found} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml deleted file mode 100644 index b2e4b82a9d9e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml +++ /dev/null @@ -1,272 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1144'] - x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1156'] - x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['2225'] - x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] - status: {code: 200, message: Ok} -- request: - body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['73'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 - response: - body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique - and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['170'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] - status: {code: 400, message: BadRequest} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 - response: - body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['239'] - x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] - status: {code: 200, message: Ok} -- request: - body: '{"keyKind": "primary"}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['22'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] - x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py deleted file mode 100644 index 902666a22cf0..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py +++ /dev/null @@ -1,146 +0,0 @@ -# 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. -#-------------------------------------------------------------------------- -import unittest - -import azure.mgmt.documentdb -from msrestazure.azure_exceptions import CloudError -from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer - - -class MgmtDocDBTest(AzureMgmtTestCase): - - def setUp(self): - super(MgmtDocDBTest, self).setUp() - self.client = self.create_mgmt_client( - azure.mgmt.documentdb.DocumentDB - ) - - @ResourceGroupPreparer() - def test_accounts_create(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtst') - - self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) - - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - account = async_docdb_create.result() - self.assertIsNotNone(account) - # Rest API issue - # self.assertEqual(account.name, account_name) - - @ResourceGroupPreparer() - def test_accounts_features(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtest') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - account = self.client.database_accounts.get( - resource_group.name, - account_name - ) - self.assertEqual(account.name, account_name) - - my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) - self.assertEqual(len(my_accounts), 1) - self.assertEqual(my_accounts[0].name, account_name) - - my_accounts = list(self.client.database_accounts.list()) - self.assertTrue(len(my_accounts) >= 1) - self.assertTrue(any(db.name == account_name for db in my_accounts)) - - # I guess we can make this test with no error, need to check with DocDB team - # This is an interesting test anyway, this implies that the serialization works - # and error message is available. Since this method does not return an object - # (i.e. no deserialization to test), this is a complete test. - # We are NOT here to test the RestAPI, but the Swagger file and Python code. - with self.assertRaises(CloudError) as cm: - async_change = self.client.database_accounts.failover_priority_change( - resource_group.name, - account_name, - [{ - 'location_name': self.region, - 'failover_priority': 0 - }] - ) - async_change.wait() - self.assertIn('Failover priorities must be unique', cm.exception.message) - - my_keys = self.client.database_accounts.list_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_master_key) - self.assertIsNotNone(my_keys.secondary_master_key) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - my_keys = self.client.database_accounts.list_read_only_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - async_regenerate = self.client.database_accounts.regenerate_key( - resource_group.name, - account_name, - "primary" - ) - async_regenerate.wait() - - @ResourceGroupPreparer() - def test_accounts_delete(self, resource_group, location): - account_name = self.get_resource_name('pydocumentdbtst') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - # Current implementation of msrestazure does not support 404 as a end of LRO delete - # https://github.com/Azure/msrestazure-for-python/issues/7 - async_delete = self.client.database_accounts.delete(resource_group.name, account_name) - try: - async_delete.wait() - except CloudError as err: - if err.response.status_code != 404: - raise - - -#------------------------------------------------------------------------------ -if __name__ == '__main__': - unittest.main() From b0cc66a4e7010cb8aa0e0b3c65b6b6fc87966acc Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:42:03 -0700 Subject: [PATCH 120/244] Revert "Remove docdb mgmt package from master (#6585)" (#6593) This reverts commit d2ed7d87997eac9b715ee9802c15349a12446b84. --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 + sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 + sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 + .../azure-mgmt-documentdb/azure/__init__.py | 1 + .../azure/mgmt/__init__.py | 1 + .../azure/mgmt/documentdb/__init__.py | 18 + .../azure/mgmt/documentdb/document_db.py | 83 ++ .../azure/mgmt/documentdb/models/__init__.py | 52 + .../documentdb/models/consistency_policy.py | 50 + .../documentdb/models/database_account.py | 117 +++ .../database_account_connection_string.py | 39 + ...tabase_account_create_update_parameters.py | 90 ++ ..._account_list_connection_strings_result.py | 29 + .../database_account_list_keys_result.py | 53 + ...base_account_list_read_only_keys_result.py | 41 + .../models/database_account_paged.py | 27 + .../database_account_patch_parameters.py | 31 + ...abase_account_regenerate_key_parameters.py | 33 + .../documentdb/models/document_db_enums.py | 41 + .../documentdb/models/failover_policies.py | 28 + .../mgmt/documentdb/models/failover_policy.py | 48 + .../azure/mgmt/documentdb/models/location.py | 58 ++ .../azure/mgmt/documentdb/models/resource.py | 54 ++ .../mgmt/documentdb/operations/__init__.py | 16 + .../database_accounts_operations.py | 918 ++++++++++++++++++ .../azure/mgmt/documentdb/version.py | 13 + .../azure_bdist_wheel.py | 54 ++ sdk/cosmos/azure-mgmt-documentdb/build.json | 5 + .../dev_requirements.txt | 1 + .../azure-mgmt-documentdb/sdk_packaging.toml | 2 + sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 + sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 ++ ..._mgmt_documentdb.test_accounts_create.yaml | 193 ++++ ..._mgmt_documentdb.test_accounts_delete.yaml | 467 +++++++++ ...gmt_documentdb.test_accounts_features.yaml | 272 ++++++ .../tests/test_mgmt_documentdb.py | 146 +++ 36 files changed, 3147 insertions(+) create mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in create mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json create mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt create mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst new file mode 100644 index 000000000000..eb7345b4071e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst @@ -0,0 +1,24 @@ +.. :changelog: + +Release History +=============== + +0.1.3 (2017-05-02) +++++++++++++++++++ + +* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix + +0.1.2 (2017-04-20) +++++++++++++++++++ + +This wheel package is now built with the azure wheel extension + +0.1.1 (2017-03-21) +++++++++++++++++++ + +* Added support for listing database account connection strings + +0.1.0 (2017-01-31) +++++++++++++++++++ + +* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in new file mode 100644 index 000000000000..9ecaeb15de50 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in @@ -0,0 +1,2 @@ +include *.rst +include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst new file mode 100644 index 000000000000..a5204ea75358 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/README.rst @@ -0,0 +1,52 @@ +Microsoft Azure SDK for Python +============================== + +This is the Microsoft Azure DocumentDB Management Client Library. + +Azure Resource Manager (ARM) is the next generation of management APIs that +replace the old Azure Service Management (ASM). + +This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. + +For the older Azure Service Management (ASM) libraries, see +`azure-servicemanagement-legacy `__ library. + +For a more complete set of Azure libraries, see the `azure `__ bundle package. + + +Compatibility +============= + +**IMPORTANT**: If you have an earlier version of the azure package +(version < 1.0), you should uninstall it before installing this package. + +You can check the version using pip: + +.. code:: shell + + pip freeze + +If you see azure==0.11.0 (or any version below 1.0), uninstall it first: + +.. code:: shell + + pip uninstall azure + + +Usage +===== + +For code examples, see `DocumentDB Management +`__ +on readthedocs.org. + + +Provide Feedback +================ + +If you encounter any bugs or have suggestions, please file an issue in the +`Issues `__ +section of the project. + + +.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py new file mode 100755 index 000000000000..3ec900145f1e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .document_db import DocumentDB +from .version import VERSION + +__all__ = ['DocumentDB'] + +__version__ = VERSION + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py new file mode 100755 index 000000000000..5eda44ab3e32 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import ServiceClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.database_accounts_operations import DatabaseAccountsOperations +from . import models + + +class DocumentDBConfiguration(AzureConfiguration): + """Configuration for DocumentDB + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not isinstance(subscription_id, str): + raise TypeError("Parameter 'subscription_id' must be str.") + if not base_url: + base_url = 'https://management.azure.com' + + super(DocumentDBConfiguration, self).__init__(base_url) + + self.add_user_agent('documentdb/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class DocumentDB(object): + """Azure DocumentDB Database Service Resource Provider REST API + + :ivar config: Configuration for client. + :vartype config: DocumentDBConfiguration + + :ivar database_accounts: DatabaseAccounts operations + :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) + self._client = ServiceClient(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2015-04-08' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.database_accounts = DatabaseAccountsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py new file mode 100755 index 000000000000..2ed68c568a84 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .consistency_policy import ConsistencyPolicy +from .location import Location +from .failover_policy import FailoverPolicy +from .database_account import DatabaseAccount +from .failover_policies import FailoverPolicies +from .resource import Resource +from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters +from .database_account_patch_parameters import DatabaseAccountPatchParameters +from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult +from .database_account_list_keys_result import DatabaseAccountListKeysResult +from .database_account_connection_string import DatabaseAccountConnectionString +from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult +from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters +from .database_account_paged import DatabaseAccountPaged +from .document_db_enums import ( + DatabaseAccountKind, + DatabaseAccountOfferType, + DefaultConsistencyLevel, + KeyKind, +) + +__all__ = [ + 'ConsistencyPolicy', + 'Location', + 'FailoverPolicy', + 'DatabaseAccount', + 'FailoverPolicies', + 'Resource', + 'DatabaseAccountCreateUpdateParameters', + 'DatabaseAccountPatchParameters', + 'DatabaseAccountListReadOnlyKeysResult', + 'DatabaseAccountListKeysResult', + 'DatabaseAccountConnectionString', + 'DatabaseAccountListConnectionStringsResult', + 'DatabaseAccountRegenerateKeyParameters', + 'DatabaseAccountPaged', + 'DatabaseAccountKind', + 'DatabaseAccountOfferType', + 'DefaultConsistencyLevel', + 'KeyKind', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py new file mode 100755 index 000000000000..d8cefd4c0b59 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConsistencyPolicy(Model): + """The consistency policy for the DocumentDB database account. + + :param default_consistency_level: The default consistency level and + configuration settings of the DocumentDB account. Possible values include: + 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' + :type default_consistency_level: str or :class:`DefaultConsistencyLevel + ` + :param max_staleness_prefix: When used with the Bounded Staleness + consistency level, this value represents the number of stale requests + tolerated. Accepted range for this value is 1 – 2,147,483,647. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_staleness_prefix: long + :param max_interval_in_seconds: When used with the Bounded Staleness + consistency level, this value represents the time amount of staleness (in + seconds) tolerated. Accepted range for this value is 1 - 100. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_interval_in_seconds: int + """ + + _validation = { + 'default_consistency_level': {'required': True}, + 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, + 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, + 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, + 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, + } + + def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): + self.default_consistency_level = default_consistency_level + self.max_staleness_prefix = max_staleness_prefix + self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py new file mode 100755 index 000000000000..89031adc35cb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py @@ -0,0 +1,117 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccount(Resource): + """A DocumentDB database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param provisioning_state: + :type provisioning_state: str + :ivar document_endpoint: The connection endpoint for the DocumentDB + database account. + :vartype document_endpoint: str + :ivar database_account_offer_type: The offer type for the DocumentDB + database account. Default value: Standard. Possible values include: + 'Standard' + :vartype database_account_offer_type: str or + :class:`DatabaseAccountOfferType + ` + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + :param consistency_policy: The consistency policy for the DocumentDB + database account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :ivar write_locations: An array that contains the write location for the + DocumentDB account. + :vartype write_locations: list of :class:`Location + ` + :ivar read_locations: An array that contains of the read locations enabled + for the DocumentDB account. + :vartype read_locations: list of :class:`Location + ` + :ivar failover_policies: An array that contains the regions ordered by + their failover priorities. + :vartype failover_policies: list of :class:`FailoverPolicy + ` + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'document_endpoint': {'readonly': True}, + 'database_account_offer_type': {'readonly': True}, + 'write_locations': {'readonly': True}, + 'read_locations': {'readonly': True}, + 'failover_policies': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, + 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, + 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): + super(DatabaseAccount, self).__init__(location=location, tags=tags) + self.kind = kind + self.provisioning_state = provisioning_state + self.document_endpoint = None + self.database_account_offer_type = None + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover + self.consistency_policy = consistency_policy + self.write_locations = None + self.read_locations = None + self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py new file mode 100755 index 000000000000..db1828208069 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountConnectionString(Model): + """Connection string for the DocumentDB account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar connection_string: Value of the connection string + :vartype connection_string: str + :ivar description: Description of the connection string + :vartype description: str + """ + + _validation = { + 'connection_string': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self): + self.connection_string = None + self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py new file mode 100755 index 000000000000..30978f482f0b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccountCreateUpdateParameters(Resource): + """Parameters to create and update DocumentDB database accounts. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param consistency_policy: The consistency policy for the DocumentDB + account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :param locations: An array that contains the georeplication locations + enabled for the DocumentDB account. + :type locations: list of :class:`Location + ` + :ivar database_account_offer_type: Default value: "Standard" . + :vartype database_account_offer_type: str + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'locations': {'required': True}, + 'database_account_offer_type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + } + + database_account_offer_type = "Standard" + + def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): + super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) + self.kind = kind + self.consistency_policy = consistency_policy + self.locations = locations + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py new file mode 100755 index 000000000000..7cddc00a3de1 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListConnectionStringsResult(Model): + """The connection strings for the given database account. + + :param connection_strings: An array that contains the connection strings + for the DocumentDB account. + :type connection_strings: list of :class:`DatabaseAccountConnectionString + ` + """ + + _attribute_map = { + 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, + } + + def __init__(self, connection_strings=None): + self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py new file mode 100755 index 000000000000..4d775054ac14 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListKeysResult(Model): + """The access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_master_key: Base 64 encoded value of the primary read-write + key. + :vartype primary_master_key: str + :ivar secondary_master_key: Base 64 encoded value of the secondary + read-write key. + :vartype secondary_master_key: str + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_master_key': {'readonly': True}, + 'secondary_master_key': {'readonly': True}, + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, + 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, + 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_master_key = None + self.secondary_master_key = None + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py new file mode 100755 index 000000000000..3330353950c6 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListReadOnlyKeysResult(Model): + """The read-only access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py new file mode 100755 index 000000000000..4cb94909c515 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class DatabaseAccountPaged(Paged): + """ + A paging container for iterating over a list of DatabaseAccount object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py new file mode 100755 index 000000000000..be78a4fd6817 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountPatchParameters(Model): + """Parameters for patching Azure DocumentDB database account properties. + + :param tags: + :type tags: dict + """ + + _validation = { + 'tags': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, tags): + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py new file mode 100755 index 000000000000..3bff90d33db3 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountRegenerateKeyParameters(Model): + """Parameters to regenerate the keys within the database account. + + :param key_kind: The access key to regenerate. Possible values include: + 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + """ + + _validation = { + 'key_kind': {'required': True}, + } + + _attribute_map = { + 'key_kind': {'key': 'keyKind', 'type': 'str'}, + } + + def __init__(self, key_kind): + self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py new file mode 100755 index 000000000000..1e87cecaeb2a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class DatabaseAccountKind(Enum): + + global_document_db = "GlobalDocumentDB" + mongo_db = "MongoDB" + parse = "Parse" + + +class DatabaseAccountOfferType(Enum): + + standard = "Standard" + + +class DefaultConsistencyLevel(Enum): + + eventual = "Eventual" + session = "Session" + bounded_staleness = "BoundedStaleness" + strong = "Strong" + consistent_prefix = "ConsistentPrefix" + + +class KeyKind(Enum): + + primary = "primary" + secondary = "secondary" + primary_readonly = "primaryReadonly" + secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py new file mode 100755 index 000000000000..4c3ebff5e3b5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicies(Model): + """The list of new failover policies for the failover priority change. + + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + """ + + _attribute_map = { + 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, failover_policies=None): + self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py new file mode 100755 index 000000000000..99cc2769403b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicy(Model): + """The failover policy for a given region of a database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region in which the database + account replicates to. Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region in which the database account + exists. + :type location_name: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py new file mode 100755 index 000000000000..8bc82bde2c3f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Location(Model): + """A region in which the Azure DocumentDB database account is deployed. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region within the database account. + Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region. + :type location_name: str + :ivar document_endpoint: The connection endpoint for the specific region. + Example: + https://<accountName>-<locationName>.documents.azure.com:443/ + :vartype document_endpoint: str + :param provisioning_state: + :type provisioning_state: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'document_endpoint': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.document_endpoint = None + self.provisioning_state = provisioning_state + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py new file mode 100755 index 000000000000..d5e887d0b78a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """A database account resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, location, tags=None): + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py new file mode 100755 index 000000000000..27ed7c069537 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py @@ -0,0 +1,16 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .database_accounts_operations import DatabaseAccountsOperations + +__all__ = [ + 'DatabaseAccountsOperations', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py new file mode 100755 index 000000000000..2bb39b1f6839 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py @@ -0,0 +1,918 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrestazure.azure_operation import AzureOperationPoller +import uuid + +from .. import models + + +class DatabaseAccountsOperations(object): + """DatabaseAccountsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". + """ + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-04-08" + + self.config = config + + def get( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Retrieves the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def patch( + self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): + """Patches the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param tags: + :type tags: dict + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + update_parameters = models.DatabaseAccountPatchParameters(tags=tags) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(update_parameters, 'DatabaseAccountPatchParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.patch(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def create_or_update( + self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates an Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param create_update_parameters: The parameters to provide for the + current database account. + :type create_update_parameters: + :class:`DatabaseAccountCreateUpdateParameters + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.put(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def delete( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Deletes an existing Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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 + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + def long_running_send(): + + request = self._client.delete(url, query_parameters) + return self._client.send(request, header_parameters, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def failover_priority_change( + self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): + """Changes the failover priority for the Azure DocumentDB database + account. A failover priority of 0 indicates a write region. The maximum + value for a failover priority = (total number of regions - 1). Failover + priority values must be unique for each of the regions in which the + database account exists. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(failover_parameters, 'FailoverPolicies') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + subscription. + + :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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + given resource group. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the access keys for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_connection_strings( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the connection strings for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListConnectionStringsResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_read_only_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the read-only access keys for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListReadOnlyKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def regenerate_key( + self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): + """Regenerates an access key for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param key_kind: The access key to regenerate. Possible values + include: 'primary', 'secondary', 'primaryReadonly', + 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def check_name_exists( + self, account_name, custom_headers=None, raw=False, **operation_config): + """Checks that the Azure DocumentDB account name already exists. A valid + account name may contain only lowercase letters, numbers, and the '-' + character, and must be between 3 and 50 characters. + + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: bool + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' + path_format_arguments = { + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.head(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = (response.status_code == 200) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py new file mode 100755 index 000000000000..95ed79d29108 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.3" + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py new file mode 100644 index 000000000000..8a81d1b61775 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py @@ -0,0 +1,54 @@ +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +from distutils import log as logger +import os.path + +from wheel.bdist_wheel import bdist_wheel +class azure_bdist_wheel(bdist_wheel): + """The purpose of this class is to build wheel a little differently than the sdist, + without requiring to build the wheel from the sdist (i.e. you can build the wheel + directly from source). + """ + + description = "Create an Azure wheel distribution" + + user_options = bdist_wheel.user_options + \ + [('azure-namespace-package=', None, + "Name of the deepest nspkg used")] + + def initialize_options(self): + bdist_wheel.initialize_options(self) + self.azure_namespace_package = None + + def finalize_options(self): + bdist_wheel.finalize_options(self) + if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): + raise ValueError("azure_namespace_package must finish by -nspkg") + + def run(self): + if not self.distribution.install_requires: + self.distribution.install_requires = [] + self.distribution.install_requires.append( + "{}>=2.0.0".format(self.azure_namespace_package)) + bdist_wheel.run(self) + + def write_record(self, bdist_dir, distinfo_dir): + if self.azure_namespace_package: + # Split and remove last part, assuming it's "nspkg" + subparts = self.azure_namespace_package.split('-')[0:-1] + folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] + for azure_sub_package in folder_with_init: + init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') + if os.path.isfile(init_file): + logger.info("manually remove {} while building the wheel".format(init_file)) + os.remove(init_file) + else: + raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) + bdist_wheel.write_record(self, bdist_dir, distinfo_dir) +cmdclass = { + 'bdist_wheel': azure_bdist_wheel, +} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json new file mode 100644 index 000000000000..4d98fc12a39e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/build.json @@ -0,0 +1,5 @@ +{ + "autorest": "1.0.1-20170501-2300-nightly", + "date": "2017-05-01T20:13:42Z", + "version": "0.1.3" +} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt new file mode 100644 index 000000000000..6ccb7f031ddd --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt @@ -0,0 +1 @@ +-e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml new file mode 100644 index 000000000000..e7687fdae93b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg new file mode 100644 index 000000000000..856f4164982c --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg @@ -0,0 +1,3 @@ +[bdist_wheel] +universal=1 +azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py new file mode 100644 index 000000000000..ddef54e31bb5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup +try: + from azure_bdist_wheel import cmdclass +except ImportError: + from distutils import log as logger + logger.warn("Wheel is not available, disabling bdist_wheel hook") + cmdclass = {} + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-documentdb" +PACKAGE_PPRINT_NAME = "DocumentDB Management" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.rst', encoding='utf-8') as f: + readme = f.read() +with open('HISTORY.rst', encoding='utf-8') as f: + history = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + history, + license='MIT License', + author='Microsoft Corporation', + author_email='ptvshelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(), + install_requires=[ + 'msrestazure~=0.4.7', + 'azure-common~=1.1.5', + ], + cmdclass=cmdclass +) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml new file mode 100644 index 000000000000..d470d7f8673d --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml @@ -0,0 +1,193 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] + method: HEAD + uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: ''} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['142'] + Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-ratelimit-remaining-tenant-reads: ['14999'] + x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] + status: {code: 404, message: NotFound} +- request: + body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], + "databaseAccountOfferType": "Standard"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['121'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['910'] + x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Completed","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['33'] + x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml new file mode 100644 index 000000000000..e6f4e2348f8f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml @@ -0,0 +1,467 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' + under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' + was not found."}}'} + headers: + Cache-Control: [no-cache] + Content-Length: ['214'] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-failure-cause: [gateway] + x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] + status: {code: 404, message: Not Found} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml new file mode 100644 index 000000000000..b2e4b82a9d9e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml @@ -0,0 +1,272 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1144'] + x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1156'] + x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2225'] + x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] + status: {code: 200, message: Ok} +- request: + body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['73'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 + response: + body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique + and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['170'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] + status: {code: 400, message: BadRequest} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 + response: + body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['239'] + x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] + status: {code: 200, message: Ok} +- request: + body: '{"keyKind": "primary"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['22'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] + x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py new file mode 100644 index 000000000000..902666a22cf0 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py @@ -0,0 +1,146 @@ +# 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. +#-------------------------------------------------------------------------- +import unittest + +import azure.mgmt.documentdb +from msrestazure.azure_exceptions import CloudError +from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer + + +class MgmtDocDBTest(AzureMgmtTestCase): + + def setUp(self): + super(MgmtDocDBTest, self).setUp() + self.client = self.create_mgmt_client( + azure.mgmt.documentdb.DocumentDB + ) + + @ResourceGroupPreparer() + def test_accounts_create(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtst') + + self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) + + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + account = async_docdb_create.result() + self.assertIsNotNone(account) + # Rest API issue + # self.assertEqual(account.name, account_name) + + @ResourceGroupPreparer() + def test_accounts_features(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtest') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + account = self.client.database_accounts.get( + resource_group.name, + account_name + ) + self.assertEqual(account.name, account_name) + + my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) + self.assertEqual(len(my_accounts), 1) + self.assertEqual(my_accounts[0].name, account_name) + + my_accounts = list(self.client.database_accounts.list()) + self.assertTrue(len(my_accounts) >= 1) + self.assertTrue(any(db.name == account_name for db in my_accounts)) + + # I guess we can make this test with no error, need to check with DocDB team + # This is an interesting test anyway, this implies that the serialization works + # and error message is available. Since this method does not return an object + # (i.e. no deserialization to test), this is a complete test. + # We are NOT here to test the RestAPI, but the Swagger file and Python code. + with self.assertRaises(CloudError) as cm: + async_change = self.client.database_accounts.failover_priority_change( + resource_group.name, + account_name, + [{ + 'location_name': self.region, + 'failover_priority': 0 + }] + ) + async_change.wait() + self.assertIn('Failover priorities must be unique', cm.exception.message) + + my_keys = self.client.database_accounts.list_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_master_key) + self.assertIsNotNone(my_keys.secondary_master_key) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + my_keys = self.client.database_accounts.list_read_only_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + async_regenerate = self.client.database_accounts.regenerate_key( + resource_group.name, + account_name, + "primary" + ) + async_regenerate.wait() + + @ResourceGroupPreparer() + def test_accounts_delete(self, resource_group, location): + account_name = self.get_resource_name('pydocumentdbtst') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + # Current implementation of msrestazure does not support 404 as a end of LRO delete + # https://github.com/Azure/msrestazure-for-python/issues/7 + async_delete = self.client.database_accounts.delete(resource_group.name, account_name) + try: + async_delete.wait() + except CloudError as err: + if err.response.status_code != 404: + raise + + +#------------------------------------------------------------------------------ +if __name__ == '__main__': + unittest.main() From 76cf58e7fff4d231799410638dcf166f80c15acf Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 10:16:27 -0700 Subject: [PATCH 121/244] Update CODEOWNERS --- .github/CODEOWNERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 07d57ac48320..0172563e9a84 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -40,6 +40,9 @@ # Management Plane /**/*mgmt*/ @zikalino +# Management Plane +/**/*mgmt*/ @zikalino + ########### # Eng Sys ########### From ffaec4f6868b75978b0327847081e5ba3c0ca3b2 Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 11:03:35 -0700 Subject: [PATCH 122/244] more code owners --- .github/CODEOWNERS | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0172563e9a84..07d57ac48320 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -40,9 +40,6 @@ # Management Plane /**/*mgmt*/ @zikalino -# Management Plane -/**/*mgmt*/ @zikalino - ########### # Eng Sys ########### From 73a4ece98fa39b56aca401a567d8b17ce619dac7 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 11:58:35 -0700 Subject: [PATCH 123/244] add policy and decorators for secrets (#6453) --- .../azure/keyvault/secrets/_shared/async_client_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 193e6e324c7e..c451ffb1e766 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncHttpTransport +from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient From 95c7e075ffd5e008ce4d0748bef87d5ef9c7fcf9 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Thu, 25 Jul 2019 12:41:38 -0700 Subject: [PATCH 124/244] Paging v2 (#6420) * First version of paging * Clean sync paging * Async paging * Name AsyncList without underscore * MyPy happyness * pylint * black * PageIterator as conf * Simplify ItemPaged * Use chain to link iterable * Make Paging more open * Docstring * pylint / mypy / black * Regenerate KV with latest Autorest + Paging branch (#6479) * Regenerate KV with latest Autorest + Paging branch * Remove unused import in tests * Make the async adapter more generic * Regeneration after operation mixin fix in Autorest * COmmit changes forgotten in #6418 * Fixing syntax for 2.7 * Move Storage Queue to new Paging (#6447) * Move Storage Queue to new Paging * Working Storage queue on new paging * Fix types * First shot of blob tests update * Fixing blob tests * File to new paging * Doc fix * Feedbacks from @annatisch * Fix last @annatisch comment * Simplify paging contract * Fix storage queue after new paging contract --- .../_key_vault_client_operations_async.py | 60 ++++------------ .../_key_vault_client_operations.py | 60 ++++------------ .../_key_vault_client_operations_async.py | 70 ++++--------------- .../_key_vault_client_operations.py | 70 ++++--------------- .../keys/_shared/async_client_base.py | 19 +++++ .../_key_vault_client_operations_async.py | 60 ++++------------ .../_key_vault_client_operations.py | 60 ++++------------ .../_key_vault_client_operations_async.py | 70 ++++--------------- .../_key_vault_client_operations.py | 70 ++++--------------- .../secrets/_shared/async_client_base.py | 19 +++++ 10 files changed, 142 insertions(+), 416 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index b5cc965119ed..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 0ae7fd5fb025..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index 08e45c2b44a7..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index b9ed6e10ea21..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 193e6e324c7e..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -21,6 +21,25 @@ pass +class AsyncPagingAdapter: + """For each item in an AsyncIterator, returns the result of applying fn to that item. + Python 3.6 added syntax that could replace this (yield within async for).""" + + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: + self._pages = pages + self._fn = fn + + def __aiter__(self): + return self + + async def __anext__(self) -> Any: + item = await self._pages.__anext__() + if not item: + raise StopAsyncIteration + return self._fn(item) + # TODO: expected type Model got Coroutine instead? + + class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index b5cc965119ed..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 0ae7fd5fb025..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index 08e45c2b44a7..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index b9ed6e10ea21..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index c451ffb1e766..0119ef5a6e44 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -21,6 +21,25 @@ pass +class AsyncPagingAdapter: + """For each item in an AsyncIterator, returns the result of applying fn to that item. + Python 3.6 added syntax that could replace this (yield within async for).""" + + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: + self._pages = pages + self._fn = fn + + def __aiter__(self): + return self + + async def __anext__(self) -> Any: + item = await self._pages.__anext__() + if not item: + raise StopAsyncIteration + return self._fn(item) + # TODO: expected type Model got Coroutine instead? + + class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, From 6b9436317c7226b4fea92b65f788ebe08d2ec11a Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 15:48:49 -0700 Subject: [PATCH 125/244] get rid of should only propagate (#6497) --- sdk/core/azure-core/azure/core/tracing/decorator.py | 2 +- sdk/core/azure-core/azure/core/tracing/decorator_async.py | 2 +- .../azure_core_asynctests/test_tracing_decorator_async.py | 5 ++++- sdk/core/azure-core/tests/test_tracing_decorator.py | 5 ++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 3986dcaf31ed..7d5d7bfce407 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None and orig_wrapped_span is None: + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 4df65fee77ef..781e20a6bef2 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None and orig_wrapped_span is None: + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index 82b4f97dc92f..e2a5c92e60b9 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -145,4 +145,7 @@ async def test_span_with_opencensus_complicated(value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert not parent.children[3].children + assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" + assert parent.children[3].children[1].span_data.name == "MockClient.make_request" + children = parent.children[1].children + assert len(children) == 2 diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index 764c09396255..eedd34c0afdd 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -177,4 +177,7 @@ def test_span_with_opencensus_complicated(self, value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert not parent.children[3].children + assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" + assert parent.children[3].children[1].span_data.name == "MockClient.make_request" + children = parent.children[1].children + assert len(children) == 2 From e1820329111e7e6e0c0265c78ae583b1af22b9b1 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Mon, 29 Jul 2019 14:05:36 -0700 Subject: [PATCH 126/244] decorator only trace very top level function (#6530) --- sdk/core/azure-core/azure/core/tracing/decorator.py | 2 +- sdk/core/azure-core/azure/core/tracing/decorator_async.py | 2 +- .../azure_core_asynctests/test_tracing_decorator_async.py | 5 +---- sdk/core/azure-core/tests/test_tracing_decorator.py | 5 +---- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 7d5d7bfce407..3986dcaf31ed 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 781e20a6bef2..4df65fee77ef 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index e2a5c92e60b9..82b4f97dc92f 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -145,7 +145,4 @@ async def test_span_with_opencensus_complicated(value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index eedd34c0afdd..764c09396255 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -177,7 +177,4 @@ def test_span_with_opencensus_complicated(self, value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children From f5c400167cf6fa3e99a5598220bd925f263729fa Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 08:51:19 -0700 Subject: [PATCH 127/244] Synchronous username/password auth (#6416) --- .../azure/identity/_internal/__init__.py | 1 - .../azure-identity/tests/test_identity.py | 68 ------------------- 2 files changed, 69 deletions(-) diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index e7583139395b..cfdf935b801c 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,6 +2,5 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from .auth_code_redirect_handler import AuthCodeRedirectServer from .msal_credentials import ConfidentialClientCredential, PublicClientCredential from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 3aaa54a1f28f..8e7245522519 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -22,7 +22,6 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, - InteractiveBrowserCredential, UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential @@ -244,73 +243,6 @@ def test_default_credential(): DefaultAzureCredential() -@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser -def test_interactive_credential(): - oauth_state = "state" - expected_token = "access-token" - - transport = validating_transport( - requests=[Request()] * 2, # not validating requests because they're formed by MSAL - responses=[ - # expecting tenant discovery then a token request - mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), - mock_response( - json_payload={ - "access_token": expected_token, - "expires_in": 42, - "token_type": "Bearer", - "ext_expires_in": 42, - } - ), - ], - ) - - # mock local server fakes successful authentication by immediately returning a well-formed response - auth_code_response = {"code": "authorization-code", "state": [oauth_state]} - server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) - - credential = InteractiveBrowserCredential( - client_id="guid", - client_secret="secret", - server_class=server_class, - transport=transport, - instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request - ) - - # ensure the request beginning the flow has a known state value - with patch("azure.identity.browser_auth.uuid.uuid4", lambda: oauth_state): - token = credential.get_token("scope") - assert token.token == expected_token - - -@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser -def test_interactive_credential_timeout(): - # mock transport handles MSAL's tenant discovery - transport = Mock( - send=lambda _, **__: mock_response( - json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"} - ) - ) - - # mock local server blocks long enough to exceed the timeout - timeout = 1 - server_instance = Mock(wait_for_redirect=functools.partial(time.sleep, timeout + 1)) - server_class = Mock(return_value=server_instance) - - credential = InteractiveBrowserCredential( - client_id="guid", - client_secret="secret", - server_class=server_class, - timeout=timeout, - transport=transport, - instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request - ) - - with pytest.raises(ClientAuthenticationError) as ex: - credential.get_token("scope") - assert "timed out" in ex.value.message.lower() - - def test_username_password_credential(): expected_token = "access-token" transport = validating_transport( From 51e1037b7f26820302951bcdfa59c59afc3d8217 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 14:04:30 -0700 Subject: [PATCH 128/244] Synchronous interactive browser authentication (#6466) --- .../azure/identity/_internal/__init__.py | 1 + .../azure-identity/tests/test_identity.py | 68 +++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index cfdf935b801c..e7583139395b 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,5 +2,6 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +from .auth_code_redirect_handler import AuthCodeRedirectServer from .msal_credentials import ConfidentialClientCredential, PublicClientCredential from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 8e7245522519..3aaa54a1f28f 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -22,6 +22,7 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, + InteractiveBrowserCredential, UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential @@ -243,6 +244,73 @@ def test_default_credential(): DefaultAzureCredential() +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential(): + oauth_state = "state" + expected_token = "access-token" + + transport = validating_transport( + requests=[Request()] * 2, # not validating requests because they're formed by MSAL + responses=[ + # expecting tenant discovery then a token request + mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), + mock_response( + json_payload={ + "access_token": expected_token, + "expires_in": 42, + "token_type": "Bearer", + "ext_expires_in": 42, + } + ), + ], + ) + + # mock local server fakes successful authentication by immediately returning a well-formed response + auth_code_response = {"code": "authorization-code", "state": [oauth_state]} + server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + # ensure the request beginning the flow has a known state value + with patch("azure.identity.browser_auth.uuid.uuid4", lambda: oauth_state): + token = credential.get_token("scope") + assert token.token == expected_token + + +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential_timeout(): + # mock transport handles MSAL's tenant discovery + transport = Mock( + send=lambda _, **__: mock_response( + json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"} + ) + ) + + # mock local server blocks long enough to exceed the timeout + timeout = 1 + server_instance = Mock(wait_for_redirect=functools.partial(time.sleep, timeout + 1)) + server_class = Mock(return_value=server_instance) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + timeout=timeout, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + with pytest.raises(ClientAuthenticationError) as ex: + credential.get_token("scope") + assert "timed out" in ex.value.message.lower() + + def test_username_password_credential(): expected_token = "access-token" transport = validating_transport( From 9a79b2dfbd1a7ff01d5b9fd8ab48b29ffd4d59dd Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Tue, 30 Jul 2019 20:19:31 -0700 Subject: [PATCH 129/244] KV aiohttp by default (#6563) * Aiohttp default async transport * Record keys with aiohttp * Record secrets with aiohttp --- .../azure/keyvault/secrets/_shared/async_client_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 0119ef5a6e44..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport +from azure.core.pipeline.transport import AsyncHttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient From ae0fb511f037ca9bd888ccb3efbc775d08d24d3a Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 10:27:22 -0700 Subject: [PATCH 130/244] KV moved paging return type to ItemPaged (#6558) * KV with latest autorest * Make KV return ItemPaged from azure-core --- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../keys/_shared/async_client_base.py | 19 ----- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../secrets/_shared/async_client_base.py | 19 ----- 10 files changed, 416 insertions(+), 142 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, From 9e5fe3599e97f4333cc50957e1debcb4e36e00aa Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:40:30 -0700 Subject: [PATCH 131/244] Remove docdb mgmt package from master (#6585) --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 - sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 - sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 - .../azure-mgmt-documentdb/azure/__init__.py | 1 - .../azure/mgmt/__init__.py | 1 - .../azure/mgmt/documentdb/__init__.py | 18 - .../azure/mgmt/documentdb/document_db.py | 83 -- .../azure/mgmt/documentdb/models/__init__.py | 52 - .../documentdb/models/consistency_policy.py | 50 - .../documentdb/models/database_account.py | 117 --- .../database_account_connection_string.py | 39 - ...tabase_account_create_update_parameters.py | 90 -- ..._account_list_connection_strings_result.py | 29 - .../database_account_list_keys_result.py | 53 - ...base_account_list_read_only_keys_result.py | 41 - .../models/database_account_paged.py | 27 - .../database_account_patch_parameters.py | 31 - ...abase_account_regenerate_key_parameters.py | 33 - .../documentdb/models/document_db_enums.py | 41 - .../documentdb/models/failover_policies.py | 28 - .../mgmt/documentdb/models/failover_policy.py | 48 - .../azure/mgmt/documentdb/models/location.py | 58 -- .../azure/mgmt/documentdb/models/resource.py | 54 -- .../mgmt/documentdb/operations/__init__.py | 16 - .../database_accounts_operations.py | 918 ------------------ .../azure/mgmt/documentdb/version.py | 13 - .../azure_bdist_wheel.py | 54 -- sdk/cosmos/azure-mgmt-documentdb/build.json | 5 - .../dev_requirements.txt | 1 - .../azure-mgmt-documentdb/sdk_packaging.toml | 2 - sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 - sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 -- ..._mgmt_documentdb.test_accounts_create.yaml | 193 ---- ..._mgmt_documentdb.test_accounts_delete.yaml | 467 --------- ...gmt_documentdb.test_accounts_features.yaml | 272 ------ .../tests/test_mgmt_documentdb.py | 146 --- 36 files changed, 3147 deletions(-) delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst deleted file mode 100644 index eb7345b4071e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. :changelog: - -Release History -=============== - -0.1.3 (2017-05-02) -++++++++++++++++++ - -* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix - -0.1.2 (2017-04-20) -++++++++++++++++++ - -This wheel package is now built with the azure wheel extension - -0.1.1 (2017-03-21) -++++++++++++++++++ - -* Added support for listing database account connection strings - -0.1.0 (2017-01-31) -++++++++++++++++++ - -* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in deleted file mode 100644 index 9ecaeb15de50..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst deleted file mode 100644 index a5204ea75358..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/README.rst +++ /dev/null @@ -1,52 +0,0 @@ -Microsoft Azure SDK for Python -============================== - -This is the Microsoft Azure DocumentDB Management Client Library. - -Azure Resource Manager (ARM) is the next generation of management APIs that -replace the old Azure Service Management (ASM). - -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. - -For the older Azure Service Management (ASM) libraries, see -`azure-servicemanagement-legacy `__ library. - -For a more complete set of Azure libraries, see the `azure `__ bundle package. - - -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - -Usage -===== - -For code examples, see `DocumentDB Management -`__ -on readthedocs.org. - - -Provide Feedback -================ - -If you encounter any bugs or have suggestions, please file an issue in the -`Issues `__ -section of the project. - - -.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py deleted file mode 100755 index 3ec900145f1e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .document_db import DocumentDB -from .version import VERSION - -__all__ = ['DocumentDB'] - -__version__ = VERSION - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py deleted file mode 100755 index 5eda44ab3e32..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import ServiceClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.database_accounts_operations import DatabaseAccountsOperations -from . import models - - -class DocumentDBConfiguration(AzureConfiguration): - """Configuration for DocumentDB - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") - if not base_url: - base_url = 'https://management.azure.com' - - super(DocumentDBConfiguration, self).__init__(base_url) - - self.add_user_agent('documentdb/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class DocumentDB(object): - """Azure DocumentDB Database Service Resource Provider REST API - - :ivar config: Configuration for client. - :vartype config: DocumentDBConfiguration - - :ivar database_accounts: DatabaseAccounts operations - :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2015-04-08' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.database_accounts = DatabaseAccountsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py deleted file mode 100755 index 2ed68c568a84..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .consistency_policy import ConsistencyPolicy -from .location import Location -from .failover_policy import FailoverPolicy -from .database_account import DatabaseAccount -from .failover_policies import FailoverPolicies -from .resource import Resource -from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters -from .database_account_patch_parameters import DatabaseAccountPatchParameters -from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult -from .database_account_list_keys_result import DatabaseAccountListKeysResult -from .database_account_connection_string import DatabaseAccountConnectionString -from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult -from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters -from .database_account_paged import DatabaseAccountPaged -from .document_db_enums import ( - DatabaseAccountKind, - DatabaseAccountOfferType, - DefaultConsistencyLevel, - KeyKind, -) - -__all__ = [ - 'ConsistencyPolicy', - 'Location', - 'FailoverPolicy', - 'DatabaseAccount', - 'FailoverPolicies', - 'Resource', - 'DatabaseAccountCreateUpdateParameters', - 'DatabaseAccountPatchParameters', - 'DatabaseAccountListReadOnlyKeysResult', - 'DatabaseAccountListKeysResult', - 'DatabaseAccountConnectionString', - 'DatabaseAccountListConnectionStringsResult', - 'DatabaseAccountRegenerateKeyParameters', - 'DatabaseAccountPaged', - 'DatabaseAccountKind', - 'DatabaseAccountOfferType', - 'DefaultConsistencyLevel', - 'KeyKind', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py deleted file mode 100755 index d8cefd4c0b59..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConsistencyPolicy(Model): - """The consistency policy for the DocumentDB database account. - - :param default_consistency_level: The default consistency level and - configuration settings of the DocumentDB account. Possible values include: - 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' - :type default_consistency_level: str or :class:`DefaultConsistencyLevel - ` - :param max_staleness_prefix: When used with the Bounded Staleness - consistency level, this value represents the number of stale requests - tolerated. Accepted range for this value is 1 – 2,147,483,647. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_staleness_prefix: long - :param max_interval_in_seconds: When used with the Bounded Staleness - consistency level, this value represents the time amount of staleness (in - seconds) tolerated. Accepted range for this value is 1 - 100. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_interval_in_seconds: int - """ - - _validation = { - 'default_consistency_level': {'required': True}, - 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, - 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, - 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, - 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, - } - - def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): - self.default_consistency_level = default_consistency_level - self.max_staleness_prefix = max_staleness_prefix - self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py deleted file mode 100755 index 89031adc35cb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccount(Resource): - """A DocumentDB database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param provisioning_state: - :type provisioning_state: str - :ivar document_endpoint: The connection endpoint for the DocumentDB - database account. - :vartype document_endpoint: str - :ivar database_account_offer_type: The offer type for the DocumentDB - database account. Default value: Standard. Possible values include: - 'Standard' - :vartype database_account_offer_type: str or - :class:`DatabaseAccountOfferType - ` - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - :param consistency_policy: The consistency policy for the DocumentDB - database account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :ivar write_locations: An array that contains the write location for the - DocumentDB account. - :vartype write_locations: list of :class:`Location - ` - :ivar read_locations: An array that contains of the read locations enabled - for the DocumentDB account. - :vartype read_locations: list of :class:`Location - ` - :ivar failover_policies: An array that contains the regions ordered by - their failover priorities. - :vartype failover_policies: list of :class:`FailoverPolicy - ` - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'document_endpoint': {'readonly': True}, - 'database_account_offer_type': {'readonly': True}, - 'write_locations': {'readonly': True}, - 'read_locations': {'readonly': True}, - 'failover_policies': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, - 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, - 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): - super(DatabaseAccount, self).__init__(location=location, tags=tags) - self.kind = kind - self.provisioning_state = provisioning_state - self.document_endpoint = None - self.database_account_offer_type = None - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover - self.consistency_policy = consistency_policy - self.write_locations = None - self.read_locations = None - self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py deleted file mode 100755 index db1828208069..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountConnectionString(Model): - """Connection string for the DocumentDB account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar connection_string: Value of the connection string - :vartype connection_string: str - :ivar description: Description of the connection string - :vartype description: str - """ - - _validation = { - 'connection_string': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self): - self.connection_string = None - self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py deleted file mode 100755 index 30978f482f0b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccountCreateUpdateParameters(Resource): - """Parameters to create and update DocumentDB database accounts. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param consistency_policy: The consistency policy for the DocumentDB - account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :param locations: An array that contains the georeplication locations - enabled for the DocumentDB account. - :type locations: list of :class:`Location - ` - :ivar database_account_offer_type: Default value: "Standard" . - :vartype database_account_offer_type: str - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - } - - database_account_offer_type = "Standard" - - def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): - super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) - self.kind = kind - self.consistency_policy = consistency_policy - self.locations = locations - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py deleted file mode 100755 index 7cddc00a3de1..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListConnectionStringsResult(Model): - """The connection strings for the given database account. - - :param connection_strings: An array that contains the connection strings - for the DocumentDB account. - :type connection_strings: list of :class:`DatabaseAccountConnectionString - ` - """ - - _attribute_map = { - 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, - } - - def __init__(self, connection_strings=None): - self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py deleted file mode 100755 index 4d775054ac14..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListKeysResult(Model): - """The access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_master_key: Base 64 encoded value of the primary read-write - key. - :vartype primary_master_key: str - :ivar secondary_master_key: Base 64 encoded value of the secondary - read-write key. - :vartype secondary_master_key: str - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_master_key': {'readonly': True}, - 'secondary_master_key': {'readonly': True}, - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, - 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, - 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_master_key = None - self.secondary_master_key = None - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py deleted file mode 100755 index 3330353950c6..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListReadOnlyKeysResult(Model): - """The read-only access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py deleted file mode 100755 index 4cb94909c515..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseAccountPaged(Paged): - """ - A paging container for iterating over a list of DatabaseAccount object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py deleted file mode 100755 index be78a4fd6817..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountPatchParameters(Model): - """Parameters for patching Azure DocumentDB database account properties. - - :param tags: - :type tags: dict - """ - - _validation = { - 'tags': {'required': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, tags): - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py deleted file mode 100755 index 3bff90d33db3..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountRegenerateKeyParameters(Model): - """Parameters to regenerate the keys within the database account. - - :param key_kind: The access key to regenerate. Possible values include: - 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - """ - - _validation = { - 'key_kind': {'required': True}, - } - - _attribute_map = { - 'key_kind': {'key': 'keyKind', 'type': 'str'}, - } - - def __init__(self, key_kind): - self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py deleted file mode 100755 index 1e87cecaeb2a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class DatabaseAccountKind(Enum): - - global_document_db = "GlobalDocumentDB" - mongo_db = "MongoDB" - parse = "Parse" - - -class DatabaseAccountOfferType(Enum): - - standard = "Standard" - - -class DefaultConsistencyLevel(Enum): - - eventual = "Eventual" - session = "Session" - bounded_staleness = "BoundedStaleness" - strong = "Strong" - consistent_prefix = "ConsistentPrefix" - - -class KeyKind(Enum): - - primary = "primary" - secondary = "secondary" - primary_readonly = "primaryReadonly" - secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py deleted file mode 100755 index 4c3ebff5e3b5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicies(Model): - """The list of new failover policies for the failover priority change. - - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - """ - - _attribute_map = { - 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, failover_policies=None): - self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py deleted file mode 100755 index 99cc2769403b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicy(Model): - """The failover policy for a given region of a database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region in which the database - account replicates to. Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region in which the database account - exists. - :type location_name: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py deleted file mode 100755 index 8bc82bde2c3f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Location(Model): - """A region in which the Azure DocumentDB database account is deployed. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region within the database account. - Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region. - :type location_name: str - :ivar document_endpoint: The connection endpoint for the specific region. - Example: - https://<accountName>-<locationName>.documents.azure.com:443/ - :vartype document_endpoint: str - :param provisioning_state: - :type provisioning_state: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.document_endpoint = None - self.provisioning_state = provisioning_state - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py deleted file mode 100755 index d5e887d0b78a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """A database account resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, location, tags=None): - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py deleted file mode 100755 index 27ed7c069537..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .database_accounts_operations import DatabaseAccountsOperations - -__all__ = [ - 'DatabaseAccountsOperations', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py deleted file mode 100755 index 2bb39b1f6839..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py +++ /dev/null @@ -1,918 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrestazure.azure_operation import AzureOperationPoller -import uuid - -from .. import models - - -class DatabaseAccountsOperations(object): - """DatabaseAccountsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". - """ - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-04-08" - - self.config = config - - def get( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Retrieves the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def patch( - self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): - """Patches the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param tags: - :type tags: dict - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - update_parameters = models.DatabaseAccountPatchParameters(tags=tags) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(update_parameters, 'DatabaseAccountPatchParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.patch(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def create_or_update( - self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): - """Creates or updates an Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param create_update_parameters: The parameters to provide for the - current database account. - :type create_update_parameters: - :class:`DatabaseAccountCreateUpdateParameters - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def delete( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Deletes an existing Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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 - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - def long_running_send(): - - request = self._client.delete(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def failover_priority_change( - self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): - """Changes the failover priority for the Azure DocumentDB database - account. A failover priority of 0 indicates a write region. The maximum - value for a failover priority = (total number of regions - 1). Failover - priority values must be unique for each of the regions in which the - database account exists. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(failover_parameters, 'FailoverPolicies') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - subscription. - - :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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - given resource group. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the access keys for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_connection_strings( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the connection strings for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListConnectionStringsResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_read_only_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the read-only access keys for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListReadOnlyKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def regenerate_key( - self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): - """Regenerates an access key for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param key_kind: The access key to regenerate. Possible values - include: 'primary', 'secondary', 'primaryReadonly', - 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def check_name_exists( - self, account_name, custom_headers=None, raw=False, **operation_config): - """Checks that the Azure DocumentDB account name already exists. A valid - account name may contain only lowercase letters, numbers, and the '-' - character, and must be between 3 and 50 characters. - - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: bool - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' - path_format_arguments = { - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.head(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = (response.status_code == 200) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py deleted file mode 100755 index 95ed79d29108..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.3" - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -from distutils import log as logger -import os.path - -from wheel.bdist_wheel import bdist_wheel -class azure_bdist_wheel(bdist_wheel): - """The purpose of this class is to build wheel a little differently than the sdist, - without requiring to build the wheel from the sdist (i.e. you can build the wheel - directly from source). - """ - - description = "Create an Azure wheel distribution" - - user_options = bdist_wheel.user_options + \ - [('azure-namespace-package=', None, - "Name of the deepest nspkg used")] - - def initialize_options(self): - bdist_wheel.initialize_options(self) - self.azure_namespace_package = None - - def finalize_options(self): - bdist_wheel.finalize_options(self) - if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): - raise ValueError("azure_namespace_package must finish by -nspkg") - - def run(self): - if not self.distribution.install_requires: - self.distribution.install_requires = [] - self.distribution.install_requires.append( - "{}>=2.0.0".format(self.azure_namespace_package)) - bdist_wheel.run(self) - - def write_record(self, bdist_dir, distinfo_dir): - if self.azure_namespace_package: - # Split and remove last part, assuming it's "nspkg" - subparts = self.azure_namespace_package.split('-')[0:-1] - folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] - for azure_sub_package in folder_with_init: - init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') - if os.path.isfile(init_file): - logger.info("manually remove {} while building the wheel".format(init_file)) - os.remove(init_file) - else: - raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) - bdist_wheel.write_record(self, bdist_dir, distinfo_dir) -cmdclass = { - 'bdist_wheel': azure_bdist_wheel, -} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json deleted file mode 100644 index 4d98fc12a39e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/build.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "autorest": "1.0.1-20170501-2300-nightly", - "date": "2017-05-01T20:13:42Z", - "version": "0.1.3" -} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt deleted file mode 100644 index 6ccb7f031ddd..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt +++ /dev/null @@ -1 +0,0 @@ --e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml deleted file mode 100644 index e7687fdae93b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml +++ /dev/null @@ -1,2 +0,0 @@ -[packaging] -auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg deleted file mode 100644 index 856f4164982c..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[bdist_wheel] -universal=1 -azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py deleted file mode 100644 index ddef54e31bb5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.py +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env python - -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup -try: - from azure_bdist_wheel import cmdclass -except ImportError: - from distutils import log as logger - logger.warn("Wheel is not available, disabling bdist_wheel hook") - cmdclass = {} - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-documentdb" -PACKAGE_PPRINT_NAME = "DocumentDB Management" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') - -# azure v0.x is not compatible with this package -# azure v0.x used to have a __version__ attribute (newer versions don't) -try: - import azure - try: - ver = azure.__version__ - raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' - ) - except AttributeError: - pass -except ImportError: - pass - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError('Cannot find version information') - -with open('README.rst', encoding='utf-8') as f: - readme = f.read() -with open('HISTORY.rst', encoding='utf-8') as f: - history = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + history, - license='MIT License', - author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', - classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'License :: OSI Approved :: MIT License', - ], - zip_safe=False, - packages=find_packages(), - install_requires=[ - 'msrestazure~=0.4.7', - 'azure-common~=1.1.5', - ], - cmdclass=cmdclass -) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml deleted file mode 100644 index d470d7f8673d..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml +++ /dev/null @@ -1,193 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] - method: HEAD - uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: ''} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['142'] - Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-ratelimit-remaining-tenant-reads: ['14999'] - x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] - status: {code: 404, message: NotFound} -- request: - body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], - "databaseAccountOfferType": "Standard"}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['121'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['910'] - x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Completed","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['33'] - x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml deleted file mode 100644 index e6f4e2348f8f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml +++ /dev/null @@ -1,467 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' - under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' - was not found."}}'} - headers: - Cache-Control: [no-cache] - Content-Length: ['214'] - Content-Type: [application/json; charset=utf-8] - Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-failure-cause: [gateway] - x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] - status: {code: 404, message: Not Found} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml deleted file mode 100644 index b2e4b82a9d9e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml +++ /dev/null @@ -1,272 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1144'] - x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1156'] - x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['2225'] - x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] - status: {code: 200, message: Ok} -- request: - body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['73'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 - response: - body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique - and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['170'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] - status: {code: 400, message: BadRequest} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 - response: - body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['239'] - x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] - status: {code: 200, message: Ok} -- request: - body: '{"keyKind": "primary"}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['22'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] - x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py deleted file mode 100644 index 902666a22cf0..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py +++ /dev/null @@ -1,146 +0,0 @@ -# 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. -#-------------------------------------------------------------------------- -import unittest - -import azure.mgmt.documentdb -from msrestazure.azure_exceptions import CloudError -from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer - - -class MgmtDocDBTest(AzureMgmtTestCase): - - def setUp(self): - super(MgmtDocDBTest, self).setUp() - self.client = self.create_mgmt_client( - azure.mgmt.documentdb.DocumentDB - ) - - @ResourceGroupPreparer() - def test_accounts_create(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtst') - - self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) - - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - account = async_docdb_create.result() - self.assertIsNotNone(account) - # Rest API issue - # self.assertEqual(account.name, account_name) - - @ResourceGroupPreparer() - def test_accounts_features(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtest') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - account = self.client.database_accounts.get( - resource_group.name, - account_name - ) - self.assertEqual(account.name, account_name) - - my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) - self.assertEqual(len(my_accounts), 1) - self.assertEqual(my_accounts[0].name, account_name) - - my_accounts = list(self.client.database_accounts.list()) - self.assertTrue(len(my_accounts) >= 1) - self.assertTrue(any(db.name == account_name for db in my_accounts)) - - # I guess we can make this test with no error, need to check with DocDB team - # This is an interesting test anyway, this implies that the serialization works - # and error message is available. Since this method does not return an object - # (i.e. no deserialization to test), this is a complete test. - # We are NOT here to test the RestAPI, but the Swagger file and Python code. - with self.assertRaises(CloudError) as cm: - async_change = self.client.database_accounts.failover_priority_change( - resource_group.name, - account_name, - [{ - 'location_name': self.region, - 'failover_priority': 0 - }] - ) - async_change.wait() - self.assertIn('Failover priorities must be unique', cm.exception.message) - - my_keys = self.client.database_accounts.list_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_master_key) - self.assertIsNotNone(my_keys.secondary_master_key) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - my_keys = self.client.database_accounts.list_read_only_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - async_regenerate = self.client.database_accounts.regenerate_key( - resource_group.name, - account_name, - "primary" - ) - async_regenerate.wait() - - @ResourceGroupPreparer() - def test_accounts_delete(self, resource_group, location): - account_name = self.get_resource_name('pydocumentdbtst') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - # Current implementation of msrestazure does not support 404 as a end of LRO delete - # https://github.com/Azure/msrestazure-for-python/issues/7 - async_delete = self.client.database_accounts.delete(resource_group.name, account_name) - try: - async_delete.wait() - except CloudError as err: - if err.response.status_code != 404: - raise - - -#------------------------------------------------------------------------------ -if __name__ == '__main__': - unittest.main() From 9837ef7d8058107b48940e5118e67c9895163877 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:42:03 -0700 Subject: [PATCH 132/244] Revert "Remove docdb mgmt package from master (#6585)" (#6593) This reverts commit d2ed7d87997eac9b715ee9802c15349a12446b84. --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 + sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 + sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 + .../azure-mgmt-documentdb/azure/__init__.py | 1 + .../azure/mgmt/__init__.py | 1 + .../azure/mgmt/documentdb/__init__.py | 18 + .../azure/mgmt/documentdb/document_db.py | 83 ++ .../azure/mgmt/documentdb/models/__init__.py | 52 + .../documentdb/models/consistency_policy.py | 50 + .../documentdb/models/database_account.py | 117 +++ .../database_account_connection_string.py | 39 + ...tabase_account_create_update_parameters.py | 90 ++ ..._account_list_connection_strings_result.py | 29 + .../database_account_list_keys_result.py | 53 + ...base_account_list_read_only_keys_result.py | 41 + .../models/database_account_paged.py | 27 + .../database_account_patch_parameters.py | 31 + ...abase_account_regenerate_key_parameters.py | 33 + .../documentdb/models/document_db_enums.py | 41 + .../documentdb/models/failover_policies.py | 28 + .../mgmt/documentdb/models/failover_policy.py | 48 + .../azure/mgmt/documentdb/models/location.py | 58 ++ .../azure/mgmt/documentdb/models/resource.py | 54 ++ .../mgmt/documentdb/operations/__init__.py | 16 + .../database_accounts_operations.py | 918 ++++++++++++++++++ .../azure/mgmt/documentdb/version.py | 13 + .../azure_bdist_wheel.py | 54 ++ sdk/cosmos/azure-mgmt-documentdb/build.json | 5 + .../dev_requirements.txt | 1 + .../azure-mgmt-documentdb/sdk_packaging.toml | 2 + sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 + sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 ++ ..._mgmt_documentdb.test_accounts_create.yaml | 193 ++++ ..._mgmt_documentdb.test_accounts_delete.yaml | 467 +++++++++ ...gmt_documentdb.test_accounts_features.yaml | 272 ++++++ .../tests/test_mgmt_documentdb.py | 146 +++ 36 files changed, 3147 insertions(+) create mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in create mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json create mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt create mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst new file mode 100644 index 000000000000..eb7345b4071e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst @@ -0,0 +1,24 @@ +.. :changelog: + +Release History +=============== + +0.1.3 (2017-05-02) +++++++++++++++++++ + +* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix + +0.1.2 (2017-04-20) +++++++++++++++++++ + +This wheel package is now built with the azure wheel extension + +0.1.1 (2017-03-21) +++++++++++++++++++ + +* Added support for listing database account connection strings + +0.1.0 (2017-01-31) +++++++++++++++++++ + +* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in new file mode 100644 index 000000000000..9ecaeb15de50 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in @@ -0,0 +1,2 @@ +include *.rst +include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst new file mode 100644 index 000000000000..a5204ea75358 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/README.rst @@ -0,0 +1,52 @@ +Microsoft Azure SDK for Python +============================== + +This is the Microsoft Azure DocumentDB Management Client Library. + +Azure Resource Manager (ARM) is the next generation of management APIs that +replace the old Azure Service Management (ASM). + +This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. + +For the older Azure Service Management (ASM) libraries, see +`azure-servicemanagement-legacy `__ library. + +For a more complete set of Azure libraries, see the `azure `__ bundle package. + + +Compatibility +============= + +**IMPORTANT**: If you have an earlier version of the azure package +(version < 1.0), you should uninstall it before installing this package. + +You can check the version using pip: + +.. code:: shell + + pip freeze + +If you see azure==0.11.0 (or any version below 1.0), uninstall it first: + +.. code:: shell + + pip uninstall azure + + +Usage +===== + +For code examples, see `DocumentDB Management +`__ +on readthedocs.org. + + +Provide Feedback +================ + +If you encounter any bugs or have suggestions, please file an issue in the +`Issues `__ +section of the project. + + +.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py new file mode 100755 index 000000000000..3ec900145f1e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .document_db import DocumentDB +from .version import VERSION + +__all__ = ['DocumentDB'] + +__version__ = VERSION + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py new file mode 100755 index 000000000000..5eda44ab3e32 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import ServiceClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.database_accounts_operations import DatabaseAccountsOperations +from . import models + + +class DocumentDBConfiguration(AzureConfiguration): + """Configuration for DocumentDB + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not isinstance(subscription_id, str): + raise TypeError("Parameter 'subscription_id' must be str.") + if not base_url: + base_url = 'https://management.azure.com' + + super(DocumentDBConfiguration, self).__init__(base_url) + + self.add_user_agent('documentdb/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class DocumentDB(object): + """Azure DocumentDB Database Service Resource Provider REST API + + :ivar config: Configuration for client. + :vartype config: DocumentDBConfiguration + + :ivar database_accounts: DatabaseAccounts operations + :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) + self._client = ServiceClient(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2015-04-08' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.database_accounts = DatabaseAccountsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py new file mode 100755 index 000000000000..2ed68c568a84 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .consistency_policy import ConsistencyPolicy +from .location import Location +from .failover_policy import FailoverPolicy +from .database_account import DatabaseAccount +from .failover_policies import FailoverPolicies +from .resource import Resource +from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters +from .database_account_patch_parameters import DatabaseAccountPatchParameters +from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult +from .database_account_list_keys_result import DatabaseAccountListKeysResult +from .database_account_connection_string import DatabaseAccountConnectionString +from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult +from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters +from .database_account_paged import DatabaseAccountPaged +from .document_db_enums import ( + DatabaseAccountKind, + DatabaseAccountOfferType, + DefaultConsistencyLevel, + KeyKind, +) + +__all__ = [ + 'ConsistencyPolicy', + 'Location', + 'FailoverPolicy', + 'DatabaseAccount', + 'FailoverPolicies', + 'Resource', + 'DatabaseAccountCreateUpdateParameters', + 'DatabaseAccountPatchParameters', + 'DatabaseAccountListReadOnlyKeysResult', + 'DatabaseAccountListKeysResult', + 'DatabaseAccountConnectionString', + 'DatabaseAccountListConnectionStringsResult', + 'DatabaseAccountRegenerateKeyParameters', + 'DatabaseAccountPaged', + 'DatabaseAccountKind', + 'DatabaseAccountOfferType', + 'DefaultConsistencyLevel', + 'KeyKind', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py new file mode 100755 index 000000000000..d8cefd4c0b59 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConsistencyPolicy(Model): + """The consistency policy for the DocumentDB database account. + + :param default_consistency_level: The default consistency level and + configuration settings of the DocumentDB account. Possible values include: + 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' + :type default_consistency_level: str or :class:`DefaultConsistencyLevel + ` + :param max_staleness_prefix: When used with the Bounded Staleness + consistency level, this value represents the number of stale requests + tolerated. Accepted range for this value is 1 – 2,147,483,647. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_staleness_prefix: long + :param max_interval_in_seconds: When used with the Bounded Staleness + consistency level, this value represents the time amount of staleness (in + seconds) tolerated. Accepted range for this value is 1 - 100. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_interval_in_seconds: int + """ + + _validation = { + 'default_consistency_level': {'required': True}, + 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, + 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, + 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, + 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, + } + + def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): + self.default_consistency_level = default_consistency_level + self.max_staleness_prefix = max_staleness_prefix + self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py new file mode 100755 index 000000000000..89031adc35cb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py @@ -0,0 +1,117 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccount(Resource): + """A DocumentDB database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param provisioning_state: + :type provisioning_state: str + :ivar document_endpoint: The connection endpoint for the DocumentDB + database account. + :vartype document_endpoint: str + :ivar database_account_offer_type: The offer type for the DocumentDB + database account. Default value: Standard. Possible values include: + 'Standard' + :vartype database_account_offer_type: str or + :class:`DatabaseAccountOfferType + ` + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + :param consistency_policy: The consistency policy for the DocumentDB + database account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :ivar write_locations: An array that contains the write location for the + DocumentDB account. + :vartype write_locations: list of :class:`Location + ` + :ivar read_locations: An array that contains of the read locations enabled + for the DocumentDB account. + :vartype read_locations: list of :class:`Location + ` + :ivar failover_policies: An array that contains the regions ordered by + their failover priorities. + :vartype failover_policies: list of :class:`FailoverPolicy + ` + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'document_endpoint': {'readonly': True}, + 'database_account_offer_type': {'readonly': True}, + 'write_locations': {'readonly': True}, + 'read_locations': {'readonly': True}, + 'failover_policies': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, + 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, + 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): + super(DatabaseAccount, self).__init__(location=location, tags=tags) + self.kind = kind + self.provisioning_state = provisioning_state + self.document_endpoint = None + self.database_account_offer_type = None + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover + self.consistency_policy = consistency_policy + self.write_locations = None + self.read_locations = None + self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py new file mode 100755 index 000000000000..db1828208069 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountConnectionString(Model): + """Connection string for the DocumentDB account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar connection_string: Value of the connection string + :vartype connection_string: str + :ivar description: Description of the connection string + :vartype description: str + """ + + _validation = { + 'connection_string': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self): + self.connection_string = None + self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py new file mode 100755 index 000000000000..30978f482f0b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccountCreateUpdateParameters(Resource): + """Parameters to create and update DocumentDB database accounts. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param consistency_policy: The consistency policy for the DocumentDB + account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :param locations: An array that contains the georeplication locations + enabled for the DocumentDB account. + :type locations: list of :class:`Location + ` + :ivar database_account_offer_type: Default value: "Standard" . + :vartype database_account_offer_type: str + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'locations': {'required': True}, + 'database_account_offer_type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + } + + database_account_offer_type = "Standard" + + def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): + super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) + self.kind = kind + self.consistency_policy = consistency_policy + self.locations = locations + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py new file mode 100755 index 000000000000..7cddc00a3de1 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListConnectionStringsResult(Model): + """The connection strings for the given database account. + + :param connection_strings: An array that contains the connection strings + for the DocumentDB account. + :type connection_strings: list of :class:`DatabaseAccountConnectionString + ` + """ + + _attribute_map = { + 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, + } + + def __init__(self, connection_strings=None): + self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py new file mode 100755 index 000000000000..4d775054ac14 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListKeysResult(Model): + """The access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_master_key: Base 64 encoded value of the primary read-write + key. + :vartype primary_master_key: str + :ivar secondary_master_key: Base 64 encoded value of the secondary + read-write key. + :vartype secondary_master_key: str + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_master_key': {'readonly': True}, + 'secondary_master_key': {'readonly': True}, + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, + 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, + 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_master_key = None + self.secondary_master_key = None + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py new file mode 100755 index 000000000000..3330353950c6 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListReadOnlyKeysResult(Model): + """The read-only access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py new file mode 100755 index 000000000000..4cb94909c515 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class DatabaseAccountPaged(Paged): + """ + A paging container for iterating over a list of DatabaseAccount object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py new file mode 100755 index 000000000000..be78a4fd6817 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountPatchParameters(Model): + """Parameters for patching Azure DocumentDB database account properties. + + :param tags: + :type tags: dict + """ + + _validation = { + 'tags': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, tags): + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py new file mode 100755 index 000000000000..3bff90d33db3 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountRegenerateKeyParameters(Model): + """Parameters to regenerate the keys within the database account. + + :param key_kind: The access key to regenerate. Possible values include: + 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + """ + + _validation = { + 'key_kind': {'required': True}, + } + + _attribute_map = { + 'key_kind': {'key': 'keyKind', 'type': 'str'}, + } + + def __init__(self, key_kind): + self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py new file mode 100755 index 000000000000..1e87cecaeb2a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class DatabaseAccountKind(Enum): + + global_document_db = "GlobalDocumentDB" + mongo_db = "MongoDB" + parse = "Parse" + + +class DatabaseAccountOfferType(Enum): + + standard = "Standard" + + +class DefaultConsistencyLevel(Enum): + + eventual = "Eventual" + session = "Session" + bounded_staleness = "BoundedStaleness" + strong = "Strong" + consistent_prefix = "ConsistentPrefix" + + +class KeyKind(Enum): + + primary = "primary" + secondary = "secondary" + primary_readonly = "primaryReadonly" + secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py new file mode 100755 index 000000000000..4c3ebff5e3b5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicies(Model): + """The list of new failover policies for the failover priority change. + + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + """ + + _attribute_map = { + 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, failover_policies=None): + self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py new file mode 100755 index 000000000000..99cc2769403b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicy(Model): + """The failover policy for a given region of a database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region in which the database + account replicates to. Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region in which the database account + exists. + :type location_name: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py new file mode 100755 index 000000000000..8bc82bde2c3f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Location(Model): + """A region in which the Azure DocumentDB database account is deployed. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region within the database account. + Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region. + :type location_name: str + :ivar document_endpoint: The connection endpoint for the specific region. + Example: + https://<accountName>-<locationName>.documents.azure.com:443/ + :vartype document_endpoint: str + :param provisioning_state: + :type provisioning_state: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'document_endpoint': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.document_endpoint = None + self.provisioning_state = provisioning_state + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py new file mode 100755 index 000000000000..d5e887d0b78a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """A database account resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, location, tags=None): + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py new file mode 100755 index 000000000000..27ed7c069537 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py @@ -0,0 +1,16 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .database_accounts_operations import DatabaseAccountsOperations + +__all__ = [ + 'DatabaseAccountsOperations', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py new file mode 100755 index 000000000000..2bb39b1f6839 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py @@ -0,0 +1,918 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrestazure.azure_operation import AzureOperationPoller +import uuid + +from .. import models + + +class DatabaseAccountsOperations(object): + """DatabaseAccountsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". + """ + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-04-08" + + self.config = config + + def get( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Retrieves the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def patch( + self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): + """Patches the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param tags: + :type tags: dict + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + update_parameters = models.DatabaseAccountPatchParameters(tags=tags) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(update_parameters, 'DatabaseAccountPatchParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.patch(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def create_or_update( + self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates an Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param create_update_parameters: The parameters to provide for the + current database account. + :type create_update_parameters: + :class:`DatabaseAccountCreateUpdateParameters + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.put(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def delete( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Deletes an existing Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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 + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + def long_running_send(): + + request = self._client.delete(url, query_parameters) + return self._client.send(request, header_parameters, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def failover_priority_change( + self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): + """Changes the failover priority for the Azure DocumentDB database + account. A failover priority of 0 indicates a write region. The maximum + value for a failover priority = (total number of regions - 1). Failover + priority values must be unique for each of the regions in which the + database account exists. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(failover_parameters, 'FailoverPolicies') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + subscription. + + :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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + given resource group. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the access keys for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_connection_strings( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the connection strings for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListConnectionStringsResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_read_only_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the read-only access keys for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListReadOnlyKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def regenerate_key( + self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): + """Regenerates an access key for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param key_kind: The access key to regenerate. Possible values + include: 'primary', 'secondary', 'primaryReadonly', + 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def check_name_exists( + self, account_name, custom_headers=None, raw=False, **operation_config): + """Checks that the Azure DocumentDB account name already exists. A valid + account name may contain only lowercase letters, numbers, and the '-' + character, and must be between 3 and 50 characters. + + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: bool + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' + path_format_arguments = { + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.head(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = (response.status_code == 200) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py new file mode 100755 index 000000000000..95ed79d29108 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.3" + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py new file mode 100644 index 000000000000..8a81d1b61775 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py @@ -0,0 +1,54 @@ +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +from distutils import log as logger +import os.path + +from wheel.bdist_wheel import bdist_wheel +class azure_bdist_wheel(bdist_wheel): + """The purpose of this class is to build wheel a little differently than the sdist, + without requiring to build the wheel from the sdist (i.e. you can build the wheel + directly from source). + """ + + description = "Create an Azure wheel distribution" + + user_options = bdist_wheel.user_options + \ + [('azure-namespace-package=', None, + "Name of the deepest nspkg used")] + + def initialize_options(self): + bdist_wheel.initialize_options(self) + self.azure_namespace_package = None + + def finalize_options(self): + bdist_wheel.finalize_options(self) + if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): + raise ValueError("azure_namespace_package must finish by -nspkg") + + def run(self): + if not self.distribution.install_requires: + self.distribution.install_requires = [] + self.distribution.install_requires.append( + "{}>=2.0.0".format(self.azure_namespace_package)) + bdist_wheel.run(self) + + def write_record(self, bdist_dir, distinfo_dir): + if self.azure_namespace_package: + # Split and remove last part, assuming it's "nspkg" + subparts = self.azure_namespace_package.split('-')[0:-1] + folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] + for azure_sub_package in folder_with_init: + init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') + if os.path.isfile(init_file): + logger.info("manually remove {} while building the wheel".format(init_file)) + os.remove(init_file) + else: + raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) + bdist_wheel.write_record(self, bdist_dir, distinfo_dir) +cmdclass = { + 'bdist_wheel': azure_bdist_wheel, +} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json new file mode 100644 index 000000000000..4d98fc12a39e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/build.json @@ -0,0 +1,5 @@ +{ + "autorest": "1.0.1-20170501-2300-nightly", + "date": "2017-05-01T20:13:42Z", + "version": "0.1.3" +} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt new file mode 100644 index 000000000000..6ccb7f031ddd --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt @@ -0,0 +1 @@ +-e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml new file mode 100644 index 000000000000..e7687fdae93b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg new file mode 100644 index 000000000000..856f4164982c --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg @@ -0,0 +1,3 @@ +[bdist_wheel] +universal=1 +azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py new file mode 100644 index 000000000000..ddef54e31bb5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup +try: + from azure_bdist_wheel import cmdclass +except ImportError: + from distutils import log as logger + logger.warn("Wheel is not available, disabling bdist_wheel hook") + cmdclass = {} + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-documentdb" +PACKAGE_PPRINT_NAME = "DocumentDB Management" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.rst', encoding='utf-8') as f: + readme = f.read() +with open('HISTORY.rst', encoding='utf-8') as f: + history = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + history, + license='MIT License', + author='Microsoft Corporation', + author_email='ptvshelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(), + install_requires=[ + 'msrestazure~=0.4.7', + 'azure-common~=1.1.5', + ], + cmdclass=cmdclass +) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml new file mode 100644 index 000000000000..d470d7f8673d --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml @@ -0,0 +1,193 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] + method: HEAD + uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: ''} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['142'] + Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-ratelimit-remaining-tenant-reads: ['14999'] + x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] + status: {code: 404, message: NotFound} +- request: + body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], + "databaseAccountOfferType": "Standard"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['121'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['910'] + x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Completed","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['33'] + x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml new file mode 100644 index 000000000000..e6f4e2348f8f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml @@ -0,0 +1,467 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' + under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' + was not found."}}'} + headers: + Cache-Control: [no-cache] + Content-Length: ['214'] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-failure-cause: [gateway] + x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] + status: {code: 404, message: Not Found} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml new file mode 100644 index 000000000000..b2e4b82a9d9e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml @@ -0,0 +1,272 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1144'] + x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1156'] + x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2225'] + x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] + status: {code: 200, message: Ok} +- request: + body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['73'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 + response: + body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique + and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['170'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] + status: {code: 400, message: BadRequest} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 + response: + body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['239'] + x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] + status: {code: 200, message: Ok} +- request: + body: '{"keyKind": "primary"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['22'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] + x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py new file mode 100644 index 000000000000..902666a22cf0 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py @@ -0,0 +1,146 @@ +# 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. +#-------------------------------------------------------------------------- +import unittest + +import azure.mgmt.documentdb +from msrestazure.azure_exceptions import CloudError +from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer + + +class MgmtDocDBTest(AzureMgmtTestCase): + + def setUp(self): + super(MgmtDocDBTest, self).setUp() + self.client = self.create_mgmt_client( + azure.mgmt.documentdb.DocumentDB + ) + + @ResourceGroupPreparer() + def test_accounts_create(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtst') + + self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) + + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + account = async_docdb_create.result() + self.assertIsNotNone(account) + # Rest API issue + # self.assertEqual(account.name, account_name) + + @ResourceGroupPreparer() + def test_accounts_features(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtest') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + account = self.client.database_accounts.get( + resource_group.name, + account_name + ) + self.assertEqual(account.name, account_name) + + my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) + self.assertEqual(len(my_accounts), 1) + self.assertEqual(my_accounts[0].name, account_name) + + my_accounts = list(self.client.database_accounts.list()) + self.assertTrue(len(my_accounts) >= 1) + self.assertTrue(any(db.name == account_name for db in my_accounts)) + + # I guess we can make this test with no error, need to check with DocDB team + # This is an interesting test anyway, this implies that the serialization works + # and error message is available. Since this method does not return an object + # (i.e. no deserialization to test), this is a complete test. + # We are NOT here to test the RestAPI, but the Swagger file and Python code. + with self.assertRaises(CloudError) as cm: + async_change = self.client.database_accounts.failover_priority_change( + resource_group.name, + account_name, + [{ + 'location_name': self.region, + 'failover_priority': 0 + }] + ) + async_change.wait() + self.assertIn('Failover priorities must be unique', cm.exception.message) + + my_keys = self.client.database_accounts.list_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_master_key) + self.assertIsNotNone(my_keys.secondary_master_key) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + my_keys = self.client.database_accounts.list_read_only_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + async_regenerate = self.client.database_accounts.regenerate_key( + resource_group.name, + account_name, + "primary" + ) + async_regenerate.wait() + + @ResourceGroupPreparer() + def test_accounts_delete(self, resource_group, location): + account_name = self.get_resource_name('pydocumentdbtst') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + # Current implementation of msrestazure does not support 404 as a end of LRO delete + # https://github.com/Azure/msrestazure-for-python/issues/7 + async_delete = self.client.database_accounts.delete(resource_group.name, account_name) + try: + async_delete.wait() + except CloudError as err: + if err.response.status_code != 404: + raise + + +#------------------------------------------------------------------------------ +if __name__ == '__main__': + unittest.main() From f967363e5898697aa7fe717c04c26f2ad55c1e0f Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Wed, 24 Jul 2019 17:41:59 -0700 Subject: [PATCH 133/244] Trace identity (#6455) * make sure its int. Need it to pass the test * added policy and decorator * dont decorate authn * loggin policy behind retry policy * managed should not be decoratored * dont need my workaround * dont trace get_token * dont need this extra indent --- .../azure-identity/azure/identity/_authn_client.py | 3 ++- .../azure-identity/azure/identity/aio/_authn_client.py | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/sdk/identity/azure-identity/azure/identity/_authn_client.py b/sdk/identity/azure-identity/azure/identity/_authn_client.py index 14d86ff8c9f7..09fc166d917e 100644 --- a/sdk/identity/azure-identity/azure/identity/_authn_client.py +++ b/sdk/identity/azure-identity/azure/identity/_authn_client.py @@ -10,6 +10,7 @@ from azure.core.exceptions import ClientAuthenticationError from azure.core.pipeline import Pipeline from azure.core.pipeline.policies import ContentDecodePolicy, NetworkTraceLoggingPolicy, RetryPolicy +from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy from azure.core.pipeline.transport import HttpTransport, RequestsTransport from msal import TokenCache @@ -119,7 +120,7 @@ class AuthnClient(AuthnClientBase): def __init__(self, auth_url, config=None, policies=None, transport=None, **kwargs): # type: (str, Optional[Configuration], Optional[Iterable[HTTPPolicy]], Optional[HttpTransport], Mapping[str, Any]) -> None config = config or self.create_config(**kwargs) - policies = policies or [ContentDecodePolicy(), config.logging_policy, config.retry_policy] + policies = policies or [ContentDecodePolicy(), config.retry_policy, config.logging_policy, DistributedTracingPolicy()] if not transport: transport = RequestsTransport(**kwargs) self._pipeline = Pipeline(transport=transport, policies=policies) diff --git a/sdk/identity/azure-identity/azure/identity/aio/_authn_client.py b/sdk/identity/azure-identity/azure/identity/aio/_authn_client.py index 6b57a9d02d2d..4d75cd07b1a3 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/_authn_client.py +++ b/sdk/identity/azure-identity/azure/identity/aio/_authn_client.py @@ -8,6 +8,7 @@ from azure.core import Configuration from azure.core.credentials import AccessToken from azure.core.pipeline import AsyncPipeline +from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy from azure.core.pipeline.policies import AsyncRetryPolicy, ContentDecodePolicy, HTTPPolicy, NetworkTraceLoggingPolicy from azure.core.pipeline.transport import AsyncHttpTransport from azure.core.pipeline.transport.requests_asyncio import AsyncioRequestsTransport @@ -27,7 +28,12 @@ def __init__( **kwargs: Mapping[str, Any] ) -> None: config = config or self.create_config(**kwargs) - policies = policies or [ContentDecodePolicy(), config.logging_policy, config.retry_policy] + policies = policies or [ + ContentDecodePolicy(), + config.retry_policy, + config.logging_policy, + DistributedTracingPolicy(), + ] if not transport: transport = AsyncioRequestsTransport(**kwargs) self._pipeline = AsyncPipeline(transport=transport, policies=policies) From 1d7bf36819f3b92e3e772c874c42b722c4869b58 Mon Sep 17 00:00:00 2001 From: Kate Olszewska Date: Thu, 25 Jul 2019 09:52:14 -0700 Subject: [PATCH 134/244] Update root README.md Updating the Contributing section according to the guidelines --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index de33c04f8fa3..e11a735c6574 100644 --- a/README.md +++ b/README.md @@ -53,9 +53,14 @@ Libraries which enable you to provision specific resources. They are responsible ## Contributing For details on contributing to this repository, see the [contributing guide](CONTRIBUTING.md). -## Code of Conduct +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit +https://cla.microsoft.com. -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2FREADME.png) From 527cfb9c2b0cb25b3e5a894c4fcbe0e5f169fe5f Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 10:16:27 -0700 Subject: [PATCH 135/244] Update CODEOWNERS --- .github/CODEOWNERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e7da96b211dc..518b5aa20c8c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -37,6 +37,9 @@ /sql/sql/ @jaredmoo /sdk/servicebus/azure-servicebus/ @annatisch +# Management Plane +/**/*mgmt*/ @zikalino + ########### # Eng Sys ########### From 64d44c9029b9aef20998b5b44b0ae1ebc1f428c3 Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 11:03:35 -0700 Subject: [PATCH 136/244] more code owners --- .github/CODEOWNERS | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 518b5aa20c8c..07d57ac48320 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -6,20 +6,20 @@ ########### # Catch all -# /sdk/ @mayurid +/sdk/ @mayurid # Core -/sdk/core/ @lmazuel +/sdk/core/ @lmazuel @xiangyan99 @johanste /sdk/core/azure-core/ @xiangyan99 @bryevdv # Service team -# /sdk/identity/ -# /sdk/eventhub/ +/sdk/identity/ @chlowell @schaabs +/sdk/eventhub/ @annatisch @yunhaoling @YijunXieMS /sdk/storage/ @zezha-msft @annatisch @rakshith91 /sdk/applicationinsights/ @alexeldeib /sdk/batch/ @bgklein @matthchr @xingwu1 /sdk/cognitiveservices/azure-cognitiveservices-vision-customvision/ @areddish -/sdk/keyvault/ @schaabs @chlowell +/sdk/keyvault/ @schaabs @chlowell @iscai-msft /sdk/loganalytics/ @alexeldeib /sdk/consumption/ @sandeepnl /sdk/containerinstance/ @samkreter @xizhamsft @@ -35,7 +35,7 @@ /sdk/recoveryservices/ @DheerendraRathor /sdk/servicefabric/ @QingChenmsft @samedder /sql/sql/ @jaredmoo -/sdk/servicebus/azure-servicebus/ @annatisch +/sdk/servicebus/azure-servicebus/ @annatisch @yunhaoling @YijunXieMS # Management Plane /**/*mgmt*/ @zikalino From 88a8ea022b5a62d22d507ff5bc1460094544f8cf Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 11:58:35 -0700 Subject: [PATCH 137/244] add policy and decorators for secrets (#6453) --- .../azure/keyvault/secrets/_client.py | 13 +++++++++++++ .../keyvault/secrets/_shared/async_client_base.py | 2 ++ .../azure/keyvault/secrets/_shared/client_base.py | 2 ++ .../azure/keyvault/secrets/aio/_client.py | 14 ++++++++++++++ 4 files changed, 31 insertions(+) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py index f15b6779b9d3..1f0a670bf217 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py @@ -13,6 +13,7 @@ from typing import Any, Dict, Generator, Mapping, Optional from azure.core.exceptions import ResourceExistsError, ResourceNotFoundError +from azure.core.tracing.decorator import distributed_trace from ._shared import KeyVaultClientBase from ._models import Secret, DeletedSecret, SecretAttributes @@ -32,6 +33,7 @@ class SecretClient(KeyVaultClientBase): # pylint:disable=protected-access + @distributed_trace def get_secret(self, name, version=None, **kwargs): # type: (str, str, Mapping[str, Any]) -> Secret """Get a specified secret from the vault. @@ -59,6 +61,7 @@ def get_secret(self, name, version=None, **kwargs): ) return Secret._from_secret_bundle(bundle) + @distributed_trace def set_secret( self, name, value, content_type=None, enabled=None, not_before=None, expires=None, tags=None, **kwargs ): @@ -101,6 +104,7 @@ def set_secret( ) return Secret._from_secret_bundle(bundle) + @distributed_trace def update_secret( self, name, version=None, content_type=None, enabled=None, not_before=None, expires=None, tags=None, **kwargs ): @@ -151,6 +155,7 @@ def update_secret( ) return SecretAttributes._from_secret_bundle(bundle) # pylint: disable=protected-access + @distributed_trace def list_secrets(self, **kwargs): # type: (Mapping[str, Any]) -> Generator[SecretAttributes] """List secrets in the vault. @@ -177,6 +182,7 @@ def list_secrets(self, **kwargs): pages = self._client.get_secrets(self._vault_url, maxresults=max_page_size, **kwargs) return (SecretAttributes._from_secret_item(item) for item in pages) + @distributed_trace def list_secret_versions(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> Generator[SecretAttributes] """List all versions of the specified secret. @@ -203,6 +209,7 @@ def list_secret_versions(self, name, **kwargs): pages = self._client.get_secret_versions(self._vault_url, name, maxresults=max_page_size, **kwargs) return (SecretAttributes._from_secret_item(item) for item in pages) + @distributed_trace def backup_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> bytes """Backs up the specified secret. @@ -230,6 +237,7 @@ def backup_secret(self, name, **kwargs): ) return backup_result.value + @distributed_trace def restore_secret(self, backup, **kwargs): # type: (bytes, Mapping[str, Any]) -> SecretAttributes """Restore a backed up secret to the vault. @@ -254,6 +262,7 @@ def restore_secret(self, backup, **kwargs): bundle = self._client.restore_secret(self.vault_url, backup, error_map={409: ResourceExistsError}, **kwargs) return SecretAttributes._from_secret_bundle(bundle) + @distributed_trace def delete_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> DeletedSecret """Deletes a secret from the vault. @@ -279,6 +288,7 @@ def delete_secret(self, name, **kwargs): bundle = self._client.delete_secret(self.vault_url, name, error_map={404: ResourceNotFoundError}, **kwargs) return DeletedSecret._from_deleted_secret_bundle(bundle) + @distributed_trace def get_deleted_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> DeletedSecret """Gets the specified deleted secret. @@ -303,6 +313,7 @@ def get_deleted_secret(self, name, **kwargs): bundle = self._client.get_deleted_secret(self.vault_url, name, error_map={404: ResourceNotFoundError}, **kwargs) return DeletedSecret._from_deleted_secret_bundle(bundle) + @distributed_trace def list_deleted_secrets(self, **kwargs): # type: (Mapping[str, Any]) -> Generator[DeletedSecret] """Lists deleted secrets of the vault. @@ -328,6 +339,7 @@ def list_deleted_secrets(self, **kwargs): pages = self._client.get_deleted_secrets(self._vault_url, maxresults=max_page_size, **kwargs) return (DeletedSecret._from_deleted_secret_item(item) for item in pages) + @distributed_trace def purge_deleted_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> None """Permanently deletes the specified secret. @@ -350,6 +362,7 @@ def purge_deleted_secret(self, name, **kwargs): """ self._client.purge_deleted_secret(self.vault_url, name, **kwargs) + @distributed_trace def recover_deleted_secret(self, name, **kwargs): # type: (str, Mapping[str, Any]) -> SecretAttributes """Recovers the deleted secret to the latest version. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index a24761a6afe6..c40e314accc7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,6 +6,7 @@ from azure.core.async_paging import AsyncPagedMixin from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline +from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport from msrest.serialization import Model @@ -100,6 +101,7 @@ def _build_pipeline(config: Configuration, transport: HttpTransport, **kwargs: A config.retry_policy, config.authentication_policy, config.logging_policy, + DistributedTracingPolicy(), ] if transport is None: diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/client_base.py index 6a3253c77655..dbde6d74f640 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/client_base.py @@ -15,6 +15,7 @@ from azure.core.pipeline.transport import HttpTransport from .challenge_auth_policy import ChallengeAuthPolicy +from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy KEY_VAULT_SCOPE = "https://vault.azure.net/.default" @@ -73,6 +74,7 @@ def _build_pipeline(self, config, transport, **kwargs): config.retry_policy, config.authentication_policy, config.logging_policy, + DistributedTracingPolicy(), ] if transport is None: diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py index d7cf860c4309..89a0fa98836e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py @@ -6,6 +6,8 @@ from typing import Any, AsyncIterable, Mapping, Optional, Dict from azure.core.exceptions import ResourceExistsError, ResourceNotFoundError +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.keyvault.secrets._models import Secret, DeletedSecret, SecretAttributes from .._shared import AsyncKeyVaultClientBase, AsyncPagingAdapter @@ -25,6 +27,7 @@ class SecretClient(AsyncKeyVaultClientBase): # pylint:disable=protected-access + @distributed_trace_async async def get_secret(self, name: str, version: Optional[str] = None, **kwargs: Mapping[str, Any]) -> Secret: """Get a specified secret from the vault. @@ -51,6 +54,7 @@ async def get_secret(self, name: str, version: Optional[str] = None, **kwargs: M ) return Secret._from_secret_bundle(bundle) + @distributed_trace_async async def set_secret( self, name: str, @@ -99,6 +103,7 @@ async def set_secret( ) return Secret._from_secret_bundle(bundle) + @distributed_trace_async async def update_secret( self, name: str, @@ -155,6 +160,7 @@ async def update_secret( ) return SecretAttributes._from_secret_bundle(bundle) # pylint: disable=protected-access + @distributed_trace def list_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[SecretAttributes]: """List secrets in the vault. @@ -180,6 +186,7 @@ def list_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[SecretAttri iterable = AsyncPagingAdapter(pages, SecretAttributes._from_secret_item) return iterable + @distributed_trace def list_secret_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncIterable[SecretAttributes]: """List all versions of the specified secret. @@ -205,6 +212,7 @@ def list_secret_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncI iterable = AsyncPagingAdapter(pages, SecretAttributes._from_secret_item) return iterable + @distributed_trace_async async def backup_secret(self, name: str, **kwargs: Mapping[str, Any]) -> bytes: """Backs up the specified secret. @@ -230,6 +238,7 @@ async def backup_secret(self, name: str, **kwargs: Mapping[str, Any]) -> bytes: ) return backup_result.value + @distributed_trace_async async def restore_secret(self, backup: bytes, **kwargs: Mapping[str, Any]) -> SecretAttributes: """Restores a backed up secret to a vault. @@ -254,6 +263,7 @@ async def restore_secret(self, backup: bytes, **kwargs: Mapping[str, Any]) -> Se ) return SecretAttributes._from_secret_bundle(bundle) + @distributed_trace_async async def delete_secret(self, name: str, **kwargs: Mapping[str, Any]) -> DeletedSecret: """Deletes a secret from the vault. @@ -279,6 +289,7 @@ async def delete_secret(self, name: str, **kwargs: Mapping[str, Any]) -> Deleted ) return DeletedSecret._from_deleted_secret_bundle(bundle) + @distributed_trace_async async def get_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> DeletedSecret: """Gets the specified deleted secret. @@ -303,6 +314,7 @@ async def get_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> De ) return DeletedSecret._from_deleted_secret_bundle(bundle) + @distributed_trace def list_deleted_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[DeletedSecret]: """Lists deleted secrets of the vault. @@ -327,6 +339,7 @@ def list_deleted_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[Del iterable = AsyncPagingAdapter(pages, DeletedSecret._from_deleted_secret_item) return iterable + @distributed_trace_async async def purge_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> None: """Permanently deletes the specified secret. @@ -347,6 +360,7 @@ async def purge_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> """ await self._client.purge_deleted_secret(self.vault_url, name, **kwargs) + @distributed_trace_async async def recover_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> SecretAttributes: """Recovers the deleted secret to the latest version. From 2a265516486246ef9805b9110a44ae2d036ff0be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20C=C3=A1rdenas?= Date: Thu, 25 Jul 2019 12:01:53 -0700 Subject: [PATCH 138/244] Smoke test for Python (#6412) * Smoke Test Sample for Track 2 libraries Smoke Test for Indentity, Key Vault Secrets, Storage Blobs, Event Hubs and Cosmos DB * simpleQuery method added * Method's names updated * Create README.md * Update README.md * Commented lines deleted * README.md moved to correct folder * Create requirements.txt * Update README.md * Update README.md * Imports changed * Use of literals instead of append * Database Name variable to class level. * Use of Pythonic with statements * Update requirements.txt * Revert "Update requirements.txt" This reverts commit 4b79c6a84780f169e15c17d96e5728f32ed419f3. * Revert "Use of Pythonic with statements" This reverts commit 81adc4ca46f67d3a068aeee5e41c4514d63d8758. * Revert "Revert "Use of Pythonic with statements"" This reverts commit 27b2a2d635ff47880dee2c741bcb5c81c187df7d. * requiriments.txt encoded as a txt file * requirements.txt as text file * Misspelling in "Key concepts" * Update .docsettings.yml to match the tittle of Smoke Test * Went trought Suyog comments * Revert "Went trought Suyog comments" This reverts commit 35c62232f8e0562087b7f5eb3d4bdf57ea6e502f. * Gone trought Suyog comments * use of snake case in file names --- .docsettings.yml | 2 +- samples/smoketest/Program.py | 13 +++ samples/smoketest/README.md | 116 +++++++++++++++++++++++++ samples/smoketest/cosmos_db.py | 84 ++++++++++++++++++ samples/smoketest/event_hubs.py | 66 ++++++++++++++ samples/smoketest/key_vault_secrets.py | 46 ++++++++++ samples/smoketest/requirements.txt | 8 ++ samples/smoketest/storage_blob.py | 51 +++++++++++ 8 files changed, 385 insertions(+), 1 deletion(-) create mode 100644 samples/smoketest/Program.py create mode 100644 samples/smoketest/README.md create mode 100644 samples/smoketest/cosmos_db.py create mode 100644 samples/smoketest/event_hubs.py create mode 100644 samples/smoketest/key_vault_secrets.py create mode 100644 samples/smoketest/requirements.txt create mode 100644 samples/smoketest/storage_blob.py diff --git a/.docsettings.yml b/.docsettings.yml index 317e26b199cd..a8b9d07e4c40 100644 --- a/.docsettings.yml +++ b/.docsettings.yml @@ -9,7 +9,7 @@ omitted_paths: language: python root_check_enabled: True required_readme_sections: - - "Azure .+ client library for Python" + - ^Azure (.+ client library for Python|Smoke Test for Python) - ^Getting started$ - ^Key concepts$ - ^Examples$ diff --git a/samples/smoketest/Program.py b/samples/smoketest/Program.py new file mode 100644 index 000000000000..dd43a67f9287 --- /dev/null +++ b/samples/smoketest/Program.py @@ -0,0 +1,13 @@ +from key_vault_secrets import KeyVault +from storage_blob import StorageBlob +from event_hubs import EventHub +from cosmos_db import CosmosDB + +print("==========================================") +print(" AZURE TRACK 2 SDKs SMOKE TEST") +print("==========================================") + +KeyVault().Run() +StorageBlob().Run() +EventHub().Run() +CosmosDB().Run() diff --git a/samples/smoketest/README.md b/samples/smoketest/README.md new file mode 100644 index 000000000000..6e0a21c70235 --- /dev/null +++ b/samples/smoketest/README.md @@ -0,0 +1,116 @@ +# Azure Smoke Test for Python +This sample code is a smoke test to ensure that Azure Preview for Python work while loaded into the same process by performing 2 or more actions with them. + +Libraries tested: +* keyvault-secrets +* identity +* storage-blob +* event-hubs +* cosmos + +## Getting started +### Setup Azure resources +For this sample, it is necessary to create/have the following resources in the [Azure Portal](https://portal.azure.com/): +* **App registration**: Register a new app or use an existing one. + * Under _Certificates & secrets_ create a new **client secret** and store the value in a safe place. +* **Key Vaults**: Create a new Key Vault resource or use an existing one. + * Under _Access policies_, add the app registrated in the previous step. +* **Storage acounts**: Create a container in a new or existing storage account. The container in this sample is named "mycontainer", if you want to use other name you can change the value in `BlobStorage.ts` file: +`const containerName = "mycontainer";` +* **Event Hubs**: Create an event hub inside a new or existing Event Hubs Namespace. The container in this sample is named "myeventhub", if you want to use other name you can change the value in `EventHubsTest.ts` file: `let eventHubName = "myeventhub";` +* **Azure Cosmos DB**: Create a new account or use an existing one. + +### Azure credentials +The following environment variables are needed: +* From **App Registration**, in the _Overview_ section: + * AZURE_TENANT_ID: The directory tentant ID. + * AZURE_CLIENT_ID: The application ID. + * AZURE_CLIENT_SECRET: The client secret stored previusly when creating the _client secret_. + +* From **Key Vault**, in the _Overview_ section: + * AZURE_PROJECT_URL: The DNS Name + +* From **Event Hubs**, in _Shared access policies_ section: + * EVENT_HUBS_CONNECTION_STRING: Connection string from a policy + +* From **Storage Account**, in the _Access Keys_ section: + * STORAGE_CONNECTION_STRING : A connection strings. + +* From **Azure Cosmos DB**, in the _Keys_ section, select the _Read-Write Keys_ tab: + * COSMOS_ENDPOINT: URI. + * COSMOS_KEY: Primary or secondary key. + +``` +//Bash code to create the environment variables +export AZURE_CLIENT_ID="" +export AZURE_CLIENT_SECRET="" +export AZURE_TENANT_ID="" +export EVENT_HUBS_CONNECTION_STRING="" +export AZURE_PROJECT_URL="" +export STORAGE_CONNECTION_STRING="" +export COSMOS_ENDPOINT="" +export COSMOS_KEY="" +``` + +### Running the console app +[Python](https://www.python.org/downloads/) version 3.7.4 was used to run this sample. + +In the \SmokeTest\ directory, run Program.py +``` +python .\Program.py +``` + +## Key concepts + + +## Examples +All the classes in this sample has a `Run()` method as entry point, and do not depend on each other. + +It is possible to run them individually: +```python +from KeyVaultSecrets import KeyVault + +KeyVault().Run() +``` + +They can be included in other projects by moving the class in it: +```python +from KeyVaultSecrets import KeyVault + +... + +def myTests(): + console.log("Smoke Test imported from other project") + KeyVault().Run() + +myTests() +otherFunction() +... +``` + +The classes can be used as base code and be changed to satisfied specific needs. For example, the method `EventHub().SendAndReceiveEvents()` can be change to only send events from an array given from a parameter: +```python +def SendAndReceiveEvents(self, partitionID, events): + producer = self.client.create_producer(partition_id=partitionID) + producer.send(events) + producer.close() +``` + +**Note:** The methods in the classes are not necessary independent on each other, and the order matters. For example, in order to run `BlobStorage().DeleteBlob();`, the method `BlobStorage().UploadBLob();` must be run before, since in the other way it will fail because there is not going to be a blob to delete. + +## Troubleshooting + +### Authentication +Be sure to set the environment variables and credentials required before running the sample. + +## Next steps +Check the [Azure SDK for Python Repository](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk) for more samples inside the sdk folder. + +## Contributing +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. + +If you'd like to contribute to this library, please read the contributing guide to learn more about how to build and test the code. + +This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. \ No newline at end of file diff --git a/samples/smoketest/cosmos_db.py b/samples/smoketest/cosmos_db.py new file mode 100644 index 000000000000..b4e2a56aa025 --- /dev/null +++ b/samples/smoketest/cosmos_db.py @@ -0,0 +1,84 @@ +import os +from azure.cosmos import CosmosClient +from azure.cosmos.partition_key import PartitionKey + + +class CosmosDB: + def __init__(self): + URL = os.environ["COSMOS_ENDPOINT"] + KEY = os.environ["COSMOS_KEY"] + self.client = CosmosClient(URL, {"masterKey": KEY}) + self.dbName = "pySolarSystem" + + def CreateDatabase(self): + print("Creating '{0}' database...".format(self.dbName)) + return self.client.create_database(self.dbName) + + def CreateContainer(self, db): + collectionName = "Planets" + print("Creating '{0}' collection...".format(collectionName)) + partition_key = PartitionKey(path="/id", kind="Hash") + return db.create_container(id="Planets", partition_key=partition_key) + + def CreateDocuments(self, container): + # Cosmos will look for an 'id' field in the items, if the 'id' is not specify Cosmos is going to assing a random key. + planets = [ + { + "id": "Earth", + "HasRings": False, + "Radius": 3959, + "Moons": [{"Name": "Moon"}], + }, + { + "id": "Mars", + "HasRings": False, + "Radius": 2106, + "Moons": [{"Name": "Phobos"}, {"Name": "Deimos"}], + }, + ] + + print("Inserting items in the collection...") + for planet in planets: + container.create_item(planet) + print("\t'{0}' created".format(planet["id"])) + print("\tdone") + + def SimpleQuery(self, container): + print("Quering the container...") + items = list( + container.query_items( + query="SELECT c.id FROM c", enable_cross_partition_query=True + ) + ) + print("\tdone: {0}".format(items)) + + def DeleteDatabase(self): + print("Cleaning up the resource...") + self.client.delete_database(self.dbName) + print("\tdone") + + def Run(self): + print() + print("------------------------") + print("Cosmos DB") + print("------------------------") + print("1) Create a Database") + print("2) Create a Container in the database") + print("3) Insert Documents (items) into the Container") + print("4) Delete Database (Clean up the resource)") + print() + + # Ensure that the database does not exists + try: + self.DeleteDatabase() + except: + pass + + try: + db = self.CreateDatabase() + container = self.CreateContainer(db=db) + self.CreateDocuments(container=container) + self.SimpleQuery(container=container) + finally: + # if something goes wrong, the resource should be cleaned anyway + self.DeleteDatabase() diff --git a/samples/smoketest/event_hubs.py b/samples/smoketest/event_hubs.py new file mode 100644 index 000000000000..9a0ed400b5c5 --- /dev/null +++ b/samples/smoketest/event_hubs.py @@ -0,0 +1,66 @@ +import os +from datetime import datetime +from azure.eventhub import EventHubClient, EventData, EventPosition + + +class EventHub: + def __init__(self): + # This test requires a previusly created Event Hub. + # In this example the name is "myeventhub", but it could be change below + connectionString = os.environ["EVENT_HUBS_CONNECTION_STRING"] + eventHubName = "myeventhub" + self.client = EventHubClient.from_connection_string( + connectionString, eventHubName + ) + + def GetPartitionIds(self): + print("Getting partitions id...") + partition_ids = self.client.get_partition_ids() + print("\tdone") + return partition_ids + + def SendAndReceiveEvents(self, partitionID): + with self.client.create_consumer( + consumer_group="$default", + partition_id=partitionID, + event_position=EventPosition(datetime.utcnow()), + ) as consumer: + + print("Sending events...") + with self.client.create_producer(partition_id=partitionID) as producer: + event_list = [ + EventData(b"Test Event 1 in Python"), + EventData(b"Test Event 2 in Python"), + EventData(b"Test Event 3 in Python"), + ] + producer.send(event_list) + print("\tdone") + + print("Receiving events...") + received = consumer.receive(max_batch_size=len(event_list), timeout=2) + for event_data in received: + print("\tEvent Received: " + event_data.body_as_str()) + + print("\tdone") + + if len(received) != len(event_list): + raise Exception( + "Error, expecting {0} events, but {1} were received.".format( + str(len(event_list)), str(len(received)) + ) + ) + + def Run(self): + print() + print("------------------------") + print("Event Hubs") + print("------------------------") + print("1) Get partition ID") + print("2) Send Events") + print("3) Consume Events") + print() + + partitionID = self.GetPartitionIds() + # In this sample the same partition id is going to be used for the producer and consumer, + # It is the first one, but it could be any (is not relevant as long as it is the same in both producer and consumer) + self.SendAndReceiveEvents(partitionID[0]) diff --git a/samples/smoketest/key_vault_secrets.py b/samples/smoketest/key_vault_secrets.py new file mode 100644 index 000000000000..7f27b02460f1 --- /dev/null +++ b/samples/smoketest/key_vault_secrets.py @@ -0,0 +1,46 @@ +import os +from azure.identity import DefaultAzureCredential +from azure.keyvault.secrets import SecretClient + + +class KeyVault: + def __init__(self): + # DefaultAzureCredential() expects the following environment variables: + # * AZURE_CLIENT_ID + # * AZURE_CLIENT_SECRET + # * AZURE_TENANT_ID + credential = DefaultAzureCredential() + self.secret_client = SecretClient( + vault_url=os.environ["AZURE_PROJECT_URL"], credential=credential + ) + + def SetSecret(self): + print("Setting a secret...") + self.secret_client.set_secret("secret-name", "secret-value") + print("\tdone") + + def GetSecret(self): + print("Getting a secret...") + secret = self.secret_client.get_secret("secret-name") + print("\tdone: " + secret.name) + + def DeleteSecret(self): + print("Deleting a secret...") + deleted_secret = self.secret_client.delete_secret("secret-name") + print("\tdone: " + deleted_secret.name) + + def Run(self): + print() + print("------------------------") + print("Key Vault - Secrets\nIdentity - Credential") + print("------------------------") + print("1) Set a secret") + print("2) Get that secret") + print("3) Delete that secret (Clean up the resource)") + print() + + try: + self.SetSecret() + self.GetSecret() + finally: + self.DeleteSecret() diff --git a/samples/smoketest/requirements.txt b/samples/smoketest/requirements.txt new file mode 100644 index 000000000000..eaf49d15335d --- /dev/null +++ b/samples/smoketest/requirements.txt @@ -0,0 +1,8 @@ +azure-common==1.1.23 +azure-core==1.0.0b1 +azure-cosmos==4.0.0b1 +azure-eventhub==5.0.0b1 +azure-identity==1.0.0b1 +azure-keyvault-secrets==4.0.0b1 +azure-storage-blob==12.0.0b1 +azure-storage-common==2.0.0 \ No newline at end of file diff --git a/samples/smoketest/storage_blob.py b/samples/smoketest/storage_blob.py new file mode 100644 index 000000000000..7e0c394f9580 --- /dev/null +++ b/samples/smoketest/storage_blob.py @@ -0,0 +1,51 @@ +import os +from azure.storage.blob import BlobClient +from azure.core import exceptions + + +class StorageBlob: + def __init__(self): + connectionString = os.environ["STORAGE_CONNECTION_STRING"] + self.blob = BlobClient.from_connection_string( + connectionString, container="mycontainer", blob="pyTestBlob.txt" + ) + + def UploadBLob(self): + print("uploading blob...") + self.data = "This is a sample data for Python Test" + self.blob.upload_blob(self.data) + print("\tdone") + + def DownloadBlob(self): + print("downloading blob...") + with open("./downloadedBlob.txt", "wb+") as my_blob: + my_blob.writelines(self.blob.download_blob()) + + print("\tdone") + + def DeleteBlob(self): + print("Cleaning up the resource...") + self.blob.delete_blob() + print("\tdone") + + def Run(self): + print() + print("------------------------") + print("Storage - Blob") + print("------------------------") + print("1) Upload a Blob") + print("2) Download a Blob") + print("3) Delete that Blob (Clean up the resource)") + print() + + # Ensure that the blob does not exists before the tests + try: + self.DeleteBlob() + except exceptions.AzureError: + pass + + try: + self.UploadBLob() + self.DownloadBlob() + finally: + self.DeleteBlob() From cd75eb09c42a39e582d9779e12d2f636860faaed Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Thu, 25 Jul 2019 12:41:38 -0700 Subject: [PATCH 139/244] Paging v2 (#6420) * First version of paging * Clean sync paging * Async paging * Name AsyncList without underscore * MyPy happyness * pylint * black * PageIterator as conf * Simplify ItemPaged * Use chain to link iterable * Make Paging more open * Docstring * pylint / mypy / black * Regenerate KV with latest Autorest + Paging branch (#6479) * Regenerate KV with latest Autorest + Paging branch * Remove unused import in tests * Make the async adapter more generic * Regeneration after operation mixin fix in Autorest * COmmit changes forgotten in #6418 * Fixing syntax for 2.7 * Move Storage Queue to new Paging (#6447) * Move Storage Queue to new Paging * Working Storage queue on new paging * Fix types * First shot of blob tests update * Fixing blob tests * File to new paging * Doc fix * Feedbacks from @annatisch * Fix last @annatisch comment * Simplify paging contract * Fix storage queue after new paging contract --- .../azure-core/azure/core/async_paging.py | 153 +- sdk/core/azure-core/azure/core/paging.py | 153 +- .../azure_core_asynctests/test_paging.py | 122 ++ sdk/core/azure-core/tests/test_paging.py | 99 +- .../_generated/v2016_10_01/__init__.py | 3 +- .../_generated/v2016_10_01/_configuration.py | 2 +- .../v2016_10_01/_key_vault_client.py | 4 +- .../_generated/v2016_10_01/aio/__init__.py | 3 +- .../v2016_10_01/aio/_configuration_async.py | 1 - .../aio/_key_vault_client_async.py | 4 +- .../_key_vault_client_operations_async.py | 543 ++---- .../_generated/v2016_10_01/models/__init__.py | 45 +- .../_generated/v2016_10_01/models/_models.py | 265 +++ .../v2016_10_01/models/_models_py3.py | 265 +++ .../v2016_10_01/models/_paged_models.py | 131 -- .../_key_vault_client_operations.py | 399 ++--- .../keys/_shared/_generated/v7_0/__init__.py | 3 +- .../_shared/_generated/v7_0/_configuration.py | 2 +- .../_generated/v7_0/_key_vault_client.py | 4 +- .../_shared/_generated/v7_0/aio/__init__.py | 3 +- .../v7_0/aio/_configuration_async.py | 1 - .../v7_0/aio/_key_vault_client_async.py | 4 +- .../_key_vault_client_operations_async.py | 633 ++----- .../_generated/v7_0/models/__init__.py | 55 +- .../_shared/_generated/v7_0/models/_models.py | 323 ++++ .../_generated/v7_0/models/_models_py3.py | 323 ++++ .../_generated/v7_0/models/_paged_models.py | 157 -- .../_key_vault_client_operations.py | 465 ++--- .../keys/_shared/async_client_base.py | 7 +- .../tests/keys_vault_client_async.py | 1 - .../_shared/_generated/key_vault_client.py | 8 +- .../_generated/v2016_10_01/__init__.py | 3 +- .../_generated/v2016_10_01/_configuration.py | 2 +- .../v2016_10_01/_key_vault_client.py | 4 +- .../_generated/v2016_10_01/aio/__init__.py | 3 +- .../v2016_10_01/aio/_configuration_async.py | 1 - .../aio/_key_vault_client_async.py | 4 +- .../_key_vault_client_operations_async.py | 543 ++---- .../_generated/v2016_10_01/models/__init__.py | 45 +- .../_generated/v2016_10_01/models/_models.py | 265 +++ .../v2016_10_01/models/_models_py3.py | 265 +++ .../v2016_10_01/models/_paged_models.py | 131 -- .../_key_vault_client_operations.py | 399 ++--- .../_shared/_generated/v7_0/__init__.py | 3 +- .../_shared/_generated/v7_0/_configuration.py | 2 +- .../_generated/v7_0/_key_vault_client.py | 4 +- .../_shared/_generated/v7_0/aio/__init__.py | 3 +- .../v7_0/aio/_configuration_async.py | 1 - .../v7_0/aio/_key_vault_client_async.py | 4 +- .../_key_vault_client_operations_async.py | 633 ++----- .../_generated/v7_0/models/__init__.py | 55 +- .../_shared/_generated/v7_0/models/_models.py | 323 ++++ .../_generated/v7_0/models/_models_py3.py | 323 ++++ .../_generated/v7_0/models/_paged_models.py | 157 -- .../_key_vault_client_operations.py | 465 ++--- .../secrets/_shared/async_client_base.py | 7 +- .../tests/secrets_vault_client_async.py | 1 - .../azure/storage/blob/blob_service_client.py | 15 +- .../azure/storage/blob/container_client.py | 28 +- .../azure/storage/blob/models.py | 171 +- .../tests/test_container.py | 22 +- .../azure/storage/file/directory_client.py | 29 +- .../azure/storage/file/file_client.py | 14 +- .../azure/storage/file/file_service_client.py | 18 +- .../azure/storage/file/models.py | 124 +- .../azure-storage-file/tests/test_handle.py | 13 +- .../azure-storage-file/tests/test_share.py | 37 +- .../azure/storage/queue/models.py | 83 +- .../azure/storage/queue/queue_client.py | 8 +- .../storage/queue/queue_service_client.py | 19 +- .../test_queue.test_delete_message.yaml | 1563 ++--------------- ..._queue.test_get_messages_with_options.yaml | 1209 ++----------- .../azure-storage-queue/tests/test_queue.py | 28 +- 73 files changed, 4595 insertions(+), 6613 deletions(-) create mode 100644 sdk/core/azure-core/tests/azure_core_asynctests/test_paging.py delete mode 100644 sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_paged_models.py delete mode 100644 sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_paged_models.py delete mode 100644 sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_paged_models.py delete mode 100644 sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_paged_models.py diff --git a/sdk/core/azure-core/azure/core/async_paging.py b/sdk/core/azure-core/azure/core/async_paging.py index 4a4af4d28cc5..8a61c5b00ddc 100644 --- a/sdk/core/azure-core/azure/core/async_paging.py +++ b/sdk/core/azure-core/azure/core/async_paging.py @@ -23,44 +23,127 @@ # IN THE SOFTWARE. # # -------------------------------------------------------------------------- -from collections.abc import AsyncIterator +import collections.abc import logging +from typing import ( + Iterable, + AsyncIterator, + TypeVar, + Callable, + Tuple, + Optional, + Awaitable, +) + _LOGGER = logging.getLogger(__name__) -class AsyncPagedMixin(AsyncIterator): - """Bring async to Paging. - - **Keyword argument:** - - *async_command* - Mandatory keyword argument for this mixin to work. - """ - def __init__(self, *args, **kwargs): # pylint: disable=unused-argument - self._async_get_next = kwargs.get("async_command") - if not self._async_get_next: - _LOGGER.debug("Paging async iterator protocol is not available for %s", - self.__class__.__name__) - - async def _async_advance_page(self): - if not self._async_get_next: - raise NotImplementedError( - "The class {} does not support async paging.".format(self.__class__.__name__) - ) - if self.next_link is None: - raise StopAsyncIteration("End of paging") - self._current_page_iter_index = 0 - self._response = await self._async_get_next(self.next_link) - self._deserializer(self, self._response) - return self.current_page +ReturnType = TypeVar("ReturnType") +ResponseType = TypeVar("ResponseType") + + +class AsyncList(AsyncIterator[ReturnType]): + def __init__(self, iterable: Iterable[ReturnType]) -> None: + """Change an iterable into a fake async iterator. + + Coul be useful to fill the async iterator contract when you get a list. + + :param iterable: A sync iterable of T + """ + # Technically, if it's a real iterator, I don't need "iter" + # but that will cover iterable and list as well with no troubles created. + self._iterator = iter(iterable) + + async def __anext__(self) -> ReturnType: + try: + return next(self._iterator) + except StopIteration as err: + raise StopAsyncIteration() from err + + +class AsyncPageIterator(AsyncIterator[AsyncIterator[ReturnType]]): + def __init__( + self, + get_next: Callable[[Optional[str]], Awaitable[ResponseType]], + extract_data: Callable[ + [ResponseType], Awaitable[Tuple[str, AsyncIterator[ReturnType]]] + ], + continuation_token: Optional[str] = None, + ) -> None: + """Return an async iterator of pages. + + :param get_next: Callable that take the continuation token and return a HTTP response + :param extract_data: Callable that take an HTTP response and return a tuple continuation token, + list of ReturnType + :param str continuation_token: The continuation token needed by get_next + """ + self._get_next = get_next + self._extract_data = extract_data + self.continuation_token = continuation_token + self._did_a_call_already = False + self._response = None + self._current_page = None async def __anext__(self): - """Iterate through responses.""" - # Storing the list iterator might work out better, but there's no - # guarantee that some code won't replace the list entirely with a copy, - # invalidating an list iterator that might be saved between iterations. - if self.current_page and self._current_page_iter_index < len(self.current_page): - response = self.current_page[self._current_page_iter_index] - self._current_page_iter_index += 1 - return response - await self._async_advance_page() - return await self.__anext__() + if self.continuation_token is None and self._did_a_call_already: + raise StopAsyncIteration("End of paging") + + self._response = await self._get_next(self.continuation_token) + self._did_a_call_already = True + + self.continuation_token, self._current_page = await self._extract_data( + self._response + ) + + # If current_page was a sync list, wrap it async-like + if isinstance(self._current_page, collections.abc.Iterable): + self._current_page = AsyncList(self._current_page) + + return self._current_page + + +class AsyncItemPaged(AsyncIterator[ReturnType]): + def __init__(self, *args, **kwargs) -> None: + """Return an async iterator of items. + + args and kwargs will be passed to the AsyncPageIterator constructor directly, + except page_iterator_class + """ + self._args = args + self._kwargs = kwargs + self._page_iterator = ( + None + ) # type: Optional[AsyncIterator[AsyncIterator[ReturnType]]] + self._page = None # type: Optional[AsyncIterator[ReturnType]] + self._page_iterator_class = self._kwargs.pop( + "page_iterator_class", AsyncPageIterator + ) + + def by_page( + self, continuation_token: Optional[str] = None + ) -> AsyncIterator[AsyncIterator[ReturnType]]: + """Get an async iterator of pages of objects, instead of an async iterator of objects. + + :param str continuation_token: + An opaque continuation token. This value can be retrieved from the + continuation_token field of a previous generator object. If specified, + this generator will begin returning results from this point. + :returns: An async iterator of pages (themselves async iterator of objects) + """ + return self._page_iterator_class( + *self._args, **self._kwargs, continuation_token=continuation_token + ) + + async def __anext__(self) -> ReturnType: + if self._page_iterator is None: + self._page_iterator = self.by_page() + return await self.__anext__() + if self._page is None: + # Let it raise StopAsyncIteration + self._page = await self._page_iterator.__anext__() + return await self.__anext__() + try: + return await self._page.__anext__() + except StopAsyncIteration: + self._page = None + return await self.__anext__() diff --git a/sdk/core/azure-core/azure/core/paging.py b/sdk/core/azure-core/azure/core/paging.py index 9a04250dc932..9f4089d02099 100644 --- a/sdk/core/azure-core/azure/core/paging.py +++ b/sdk/core/azure-core/azure/core/paging.py @@ -23,86 +23,99 @@ # IN THE SOFTWARE. # # -------------------------------------------------------------------------- -import sys -try: - from collections.abc import Iterator - xrange = range -except ImportError: - from collections import Iterator - -from typing import Dict, Any, List, Callable, Optional, TYPE_CHECKING # pylint: disable=unused-import - -if TYPE_CHECKING: - from .pipeline.transport.base import HttpResponse - from msrest.serialization import Deserializer, Model # type: ignore # pylint: disable=unused-import - -if sys.version_info >= (3, 5, 2): - # Not executed on old Python, no syntax error - from .async_paging import AsyncPagedMixin # type: ignore -else: - class AsyncPagedMixin(object): # type: ignore - pass - -class Paged(AsyncPagedMixin, Iterator): - """A container for paged REST responses. - - :param response: server response object. - :type response: ~azure.core.pipeline.transport.HttpResponse - :param callable command: Function to retrieve the next page of items. - :param Deserializer deserializer: a Deserializer instance to use - """ - _validation = {} # type: Dict[str, Dict[str, Any]] - _attribute_map = {} # type: Dict[str, Dict[str, Any]] - - def __init__(self, command, deserializer, **kwargs): - # type: (Callable[[str], HttpResponse], Deserializer, Any) -> None - super(Paged, self).__init__(**kwargs) # type: ignore - # Sets next_link, current_page, and _current_page_iter_index. - self.next_link = "" - self.current_page = [] # type: List[Model] - self._current_page_iter_index = 0 - self._deserializer = deserializer - self._get_next = command - self._response = None # type: Optional[HttpResponse] +import itertools +from typing import ( + Callable, + Optional, + TypeVar, + Iterator, + Iterable, + Tuple, +) # pylint: disable=unused-import +import logging + + +_LOGGER = logging.getLogger(__name__) + +ReturnType = TypeVar("ReturnType") +ResponseType = TypeVar("ResponseType") + + +class PageIterator(Iterator[Iterator[ReturnType]]): + def __init__( + self, + get_next, # type: Callable[[Optional[str]], ResponseType] + extract_data, # type: Callable[[ResponseType], Tuple[str, Iterable[ReturnType]]] + continuation_token=None, # type: Optional[str] + ): + """Return an iterator of pages. + + :param get_next: Callable that take the continuation token and return a HTTP response + :param extract_data: Callable that take an HTTP response and return a tuple continuation token, + list of ReturnType + :param str continuation_token: The continuation token needed by get_next + """ + self._get_next = get_next + self._extract_data = extract_data + self.continuation_token = continuation_token + self._did_a_call_already = False + self._response = None # type: Optional[ResponseType] + self._current_page = None # type: Optional[Iterable[ReturnType]] def __iter__(self): """Return 'self'.""" - # Since iteration mutates this object, consider it an iterator in-and-of - # itself. return self - @classmethod - def _get_subtype_map(cls): - """Required for parity to Model object for deserialization.""" - return {} + def __next__(self): + # type: () -> Iterator[ReturnType] + if self.continuation_token is None and self._did_a_call_already: + raise StopIteration("End of paging") + + self._response = self._get_next(self.continuation_token) + self._did_a_call_already = True + + self.continuation_token, self._current_page = self._extract_data(self._response) - def _advance_page(self): - # type: () -> List[Model] - """Force moving the cursor to the next azure call. + return iter(self._current_page) - This method is for advanced usage, iterator protocol is prefered. + next = __next__ # Python 2 compatibility. + + +class ItemPaged(Iterator[ReturnType]): + def __init__(self, *args, **kwargs): + """Return an iterator of items. - :raises: StopIteration if no further page - :return: The current page list - :rtype: list + args and kwargs will be passed to the PageIterator constructor directly, + except page_iterator_class """ - if self.next_link is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 - self._response = self._get_next(self.next_link) - self._deserializer(self, self._response) - return self.current_page + self._args = args + self._kwargs = kwargs + self._page_iterator = None + self._page_iterator_class = self._kwargs.pop( + "page_iterator_class", PageIterator + ) + + def by_page(self, continuation_token=None): + # type: (Optional[str]) -> Iterator[Iterator[ReturnType]] + """Get an iterator of pages of objects, instead of an iterator of objects. + + :param str continuation_token: + An opaque continuation token. This value can be retrieved from the + continuation_token field of a previous generator object. If specified, + this generator will begin returning results from this point. + :returns: An iterator of pages (themselves iterator of objects) + """ + return self._page_iterator_class( + continuation_token=continuation_token, *self._args, **self._kwargs + ) + + def __iter__(self): + """Return 'self'.""" + return self def __next__(self): - """Iterate through responses.""" - # Storing the list iterator might work out better, but there's no - # guarantee that some code won't replace the list entirely with a copy, - # invalidating an list iterator that might be saved between iterations. - if self.current_page and self._current_page_iter_index < len(self.current_page): - response = self.current_page[self._current_page_iter_index] - self._current_page_iter_index += 1 - return response - self._advance_page() - return self.__next__() + if self._page_iterator is None: + self._page_iterator = itertools.chain.from_iterable(self.by_page()) + return next(self._page_iterator) next = __next__ # Python 2 compatibility. diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_paging.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_paging.py new file mode 100644 index 000000000000..88d8cbe147d1 --- /dev/null +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_paging.py @@ -0,0 +1,122 @@ +#-------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# +#-------------------------------------------------------------------------- + +from typing import AsyncIterator, TypeVar, List + +from azure.core.async_paging import AsyncItemPaged, AsyncList + +import pytest + + +T = TypeVar("T") + + +async def _as_list(async_iter: AsyncIterator[T]) -> List[T]: + """Flatten an async iterator into a list. + + For testing purpose. + """ + # 3.6 only : result_iterated = [obj async for obj in deserialized] + result = [] + async for el in async_iter: + result.append(el) + return result + + +class TestPaging: + + @pytest.mark.asyncio + async def test_basic_paging(self): + + async def get_next(continuation_token=None): + """Simplify my life and return JSON and not response, but should be response. + """ + if not continuation_token: + return { + 'nextLink': 'page2', + 'value': ['value1.0', 'value1.1'] + } + else: + return { + 'nextLink': None, + 'value': ['value2.0', 'value2.1'] + } + + async def extract_data(response): + return response['nextLink'], AsyncList(response['value']) + + pager = AsyncItemPaged(get_next, extract_data) + result_iterated = await _as_list(pager) + + assert ['value1.0', 'value1.1', 'value2.0', 'value2.1'] == result_iterated + + @pytest.mark.asyncio + async def test_advance_paging(self): + + async def get_next(continuation_token=None): + """Simplify my life and return JSON and not response, but should be response. + """ + if not continuation_token: + return { + 'nextLink': 'page2', + 'value': ['value1.0', 'value1.1'] + } + else: + return { + 'nextLink': None, + 'value': ['value2.0', 'value2.1'] + } + + async def extract_data(response): + return response['nextLink'], AsyncList(response['value']) + + pager = AsyncItemPaged(get_next, extract_data).by_page() + + page1 = await pager.__anext__() + assert ['value1.0', 'value1.1'] == await _as_list(page1) + + page2 = await pager.__anext__() + assert ['value2.0', 'value2.1'] == await _as_list(page2) + + with pytest.raises(StopAsyncIteration): + await pager.__anext__() + + + @pytest.mark.asyncio + async def test_none_value(self): + async def get_next(continuation_token=None): + return { + 'nextLink': None, + 'value': None + } + + async def extract_data(response): + return response['nextLink'], AsyncList(response['value'] or []) + + pager = AsyncItemPaged(get_next, extract_data) + result_iterated = await _as_list(pager) + + assert len(result_iterated) == 0 diff --git a/sdk/core/azure-core/tests/test_paging.py b/sdk/core/azure-core/tests/test_paging.py index 41e00b0b86af..945f133cf7a9 100644 --- a/sdk/core/azure-core/tests/test_paging.py +++ b/sdk/core/azure-core/tests/test_paging.py @@ -1,6 +1,6 @@ #-------------------------------------------------------------------------- # -# Copyright (c) Microsoft Corporation. All rights reserved. +# Copyright (c) Microsoft Corporation. All rights reserved. # # The MIT License (MIT) # @@ -24,29 +24,43 @@ # #-------------------------------------------------------------------------- -import unittest +from azure.core.paging import ItemPaged -from azure.core.paging import Paged +import pytest -from msrest.serialization import Deserializer -class FakePaged(Paged): - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[str]'} - } +class TestPaging(object): - def __init__(self, *args, **kwargs): - super(FakePaged, self).__init__(*args, **kwargs) + def test_basic_paging(self): + + def get_next(continuation_token=None): + """Simplify my life and return JSON and not response, but should be response. + """ + if not continuation_token: + return { + 'nextLink': 'page2', + 'value': ['value1.0', 'value1.1'] + } + else: + return { + 'nextLink': None, + 'value': ['value2.0', 'value2.1'] + } -_test_deserializer = Deserializer({}) + def extract_data(response): + return response['nextLink'], iter(response['value']) -class TestPaging(unittest.TestCase): + pager = ItemPaged(get_next, extract_data) + result_iterated = list(pager) - def test_basic_paging(self): + assert ['value1.0', 'value1.1', 'value2.0', 'value2.1'] == result_iterated - def internal_paging(next_link=None, raw=False): - if not next_link: + def test_by_page_paging(self): + + def get_next(continuation_token=None): + """Simplify my life and return JSON and not response, but should be response. + """ + if not continuation_token: return { 'nextLink': 'page2', 'value': ['value1.0', 'value1.1'] @@ -57,17 +71,25 @@ def internal_paging(next_link=None, raw=False): 'value': ['value2.0', 'value2.1'] } - deserialized = FakePaged(internal_paging, _test_deserializer) - result_iterated = list(deserialized) - self.assertListEqual( - ['value1.0', 'value1.1', 'value2.0', 'value2.1'], - result_iterated - ) + def extract_data(response): + return response['nextLink'], iter(response['value']) + + pager = ItemPaged(get_next, extract_data).by_page() + page1 = next(pager) + assert list(page1) == ['value1.0', 'value1.1'] + + page2 = next(pager) + assert list(page2) == ['value2.0', 'value2.1'] + + with pytest.raises(StopIteration): + next(pager) def test_advance_paging(self): - def internal_paging(next_link=None, raw=False): - if not next_link: + def get_next(continuation_token=None): + """Simplify my life and return JSON and not response, but should be response. + """ + if not continuation_token: return { 'nextLink': 'page2', 'value': ['value1.0', 'value1.1'] @@ -78,27 +100,32 @@ def internal_paging(next_link=None, raw=False): 'value': ['value2.0', 'value2.1'] } - deserialized = FakePaged(internal_paging, _test_deserializer) - page1 = next(deserialized) + def extract_data(response): + return response['nextLink'], iter(response['value']) + + pager = ItemPaged(get_next, extract_data) + page1 = next(pager) assert page1 == 'value1.0' - page1 = next(deserialized) + page1 = next(pager) assert page1 == 'value1.1' - - page2 = next(deserialized) + + page2 = next(pager) assert page2 == 'value2.0' - page2 = next(deserialized) + page2 = next(pager) assert page2 == 'value2.1' - with self.assertRaises(StopIteration): - next(deserialized) + with pytest.raises(StopIteration): + next(pager) def test_none_value(self): - def internal_paging(next_link=None, raw=False): + def get_next(continuation_token=None): return { 'nextLink': None, 'value': None } + def extract_data(response): + return response['nextLink'], iter(response['value'] or []) - deserialized = FakePaged(internal_paging, _test_deserializer) - result_iterated = list(deserialized) - self.assertEqual(len(result_iterated), 0) + pager = ItemPaged(get_next, extract_data) + result_iterated = list(pager) + assert len(result_iterated) == 0 diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/__init__.py index d3fda25cc7ab..e913d4cf6c46 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/__init__.py @@ -9,9 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from ._configuration import KeyVaultClientConfiguration from ._key_vault_client import KeyVaultClient -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] from .version import VERSION diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_configuration.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_configuration.py index beb5eb930fa8..28cf75e3d2b4 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_configuration.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_configuration.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials @@ -45,4 +44,5 @@ def _configure(self, **kwargs): self.proxy_policy = policies.ProxyPolicy(**kwargs) self.logging_policy = policies.NetworkTraceLoggingPolicy(**kwargs) self.retry_policy = policies.RetryPolicy(**kwargs) + self.custom_hook_policy = policies.CustomHookPolicy(**kwargs) self.redirect_policy = policies.RedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_key_vault_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_key_vault_client.py index 0252b1e16a5e..e3ec609b6cd3 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/_key_vault_client.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/__init__.py index ffece9055d9b..fb2e6c3866fd 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/__init__.py @@ -10,5 +10,4 @@ # -------------------------------------------------------------------------- from ._key_vault_client_async import KeyVaultClient -from ._configuration_async import KeyVaultClientConfiguration -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_configuration_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_configuration_async.py index 2144132ebe2d..a61d9eeff444 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_configuration_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_configuration_async.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py index 559d48da029a..ad4b8a97754f 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 28ea64adc6a6..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.async_paging import AsyncItemPaged, AsyncList from ... import models import uuid @@ -78,8 +79,6 @@ async def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops 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 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(parameters, 'KeyCreateParameters') @@ -154,8 +153,6 @@ async def import_key(self, vault_base_url, key_name, key, hsm=None, key_attribut 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 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(parameters, 'KeyImportParameters') @@ -218,8 +215,6 @@ async def delete_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -294,8 +289,6 @@ async def update_key(self, vault_base_url, key_name, key_version, key_ops=None, 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 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(parameters, 'KeyUpdateParameters') @@ -360,8 +353,6 @@ async def get_key(self, vault_base_url, key_name, key_version, *, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -399,11 +390,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -412,60 +404,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -487,11 +462,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -499,60 +475,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_keys.metadata = {'url': '/keys'} async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -604,8 +563,6 @@ async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -677,8 +634,6 @@ async def restore_key(self, vault_base_url, key_bundle_backup, *, cls=None, **kw 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 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(parameters, 'KeyRestoreParameters') @@ -759,8 +714,6 @@ async def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -838,8 +791,6 @@ async def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -915,8 +866,6 @@ async def sign(self, vault_base_url, key_name, key_version, algorithm, value, *, 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 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(parameters, 'KeySignParameters') @@ -998,8 +947,6 @@ async def verify(self, vault_base_url, key_name, key_version, algorithm, digest, 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 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(parameters, 'KeyVerifyParameters') @@ -1077,8 +1024,6 @@ async def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value 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 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(parameters, 'KeyOperationsParameters') @@ -1154,8 +1099,6 @@ async def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, val 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 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(parameters, 'KeyOperationsParameters') @@ -1199,11 +1142,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedKeyItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1211,60 +1155,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -1305,8 +1232,6 @@ async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs) header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1364,8 +1289,6 @@ async def purge_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwarg header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1421,8 +1344,6 @@ async def recover_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1493,8 +1414,6 @@ async def set_secret(self, vault_base_url, secret_name, value, tags=None, conten 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 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(parameters, 'SecretSetParameters') @@ -1555,8 +1474,6 @@ async def delete_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1630,8 +1547,6 @@ async def update_secret(self, vault_base_url, secret_name, secret_version, conte 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 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(parameters, 'SecretUpdateParameters') @@ -1694,8 +1609,6 @@ async def get_secret(self, vault_base_url, secret_name, secret_version, *, cls=N header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1733,11 +1646,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1745,60 +1659,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1819,11 +1716,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1832,60 +1730,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1904,11 +1785,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedSecretItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1916,60 +1798,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs): @@ -2009,8 +1874,6 @@ async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2068,8 +1931,6 @@ async def purge_deleted_secret(self, vault_base_url, secret_name, *, cls=None, * header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2122,8 +1983,6 @@ async def recover_deleted_secret(self, vault_base_url, secret_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2181,8 +2040,6 @@ async def backup_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2242,8 +2099,6 @@ async def restore_secret(self, vault_base_url, secret_bundle_backup, *, cls=None 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 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(parameters, 'SecretRestoreParameters') @@ -2283,11 +2138,12 @@ def get_certificates( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2295,60 +2151,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificates.metadata = {'url': '/certificates'} async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -2389,8 +2228,6 @@ async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2449,8 +2286,6 @@ async def set_certificate_contacts(self, vault_base_url, contact_list=None, *, c 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 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(contacts, 'Contacts') @@ -2508,8 +2343,6 @@ async def get_certificate_contacts(self, vault_base_url, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2563,8 +2396,6 @@ async def delete_certificate_contacts(self, vault_base_url, *, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2601,11 +2432,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateIssuerItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2613,60 +2445,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, *, cls=None, **kwargs): @@ -2720,8 +2535,6 @@ async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, cr 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2796,8 +2609,6 @@ async def update_certificate_issuer(self, vault_base_url, issuer_name, provider= 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2858,8 +2669,6 @@ async def get_certificate_issuer(self, vault_base_url, issuer_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2917,8 +2726,6 @@ async def delete_certificate_issuer(self, vault_base_url, issuer_name, *, cls=No header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2988,8 +2795,6 @@ async def create_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateCreateParameters') @@ -3072,8 +2877,6 @@ async def import_certificate(self, vault_base_url, certificate_name, base64_enco 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 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(parameters, 'CertificateImportParameters') @@ -3115,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3128,60 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3222,8 +3009,6 @@ async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3285,8 +3070,6 @@ async def update_certificate_policy(self, vault_base_url, certificate_name, cert 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 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(certificate_policy, 'CertificatePolicy') @@ -3364,8 +3147,6 @@ async def update_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateUpdateParameters') @@ -3429,8 +3210,6 @@ async def get_certificate(self, vault_base_url, certificate_name, certificate_ve header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3493,8 +3272,6 @@ async def update_certificate_operation(self, vault_base_url, certificate_name, c 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3554,8 +3331,6 @@ async def get_certificate_operation(self, vault_base_url, certificate_name, *, c header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3613,8 +3388,6 @@ async def delete_certificate_operation(self, vault_base_url, certificate_name, * header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3686,8 +3459,6 @@ async def merge_certificate(self, vault_base_url, certificate_name, x509_certifi 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 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(parameters, 'CertificateMergeParameters') @@ -3730,11 +3501,12 @@ def get_deleted_certificates( :type maxresults: int :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedCertificateItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3742,60 +3514,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3836,8 +3591,6 @@ async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3895,8 +3648,6 @@ async def purge_deleted_certificate(self, vault_base_url, certificate_name, *, c header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3952,8 +3703,6 @@ async def recover_deleted_certificate(self, vault_base_url, certificate_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3987,11 +3736,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v2016_10_01.models.StorageAccountItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3999,60 +3749,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_storage_accounts.metadata = {'url': '/storage'} async def delete_storage_account(self, vault_base_url, storage_account_name, *, cls=None, **kwargs): @@ -4089,8 +3822,6 @@ async def delete_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4145,8 +3876,6 @@ async def get_storage_account(self, vault_base_url, storage_account_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4221,8 +3950,6 @@ async def set_storage_account(self, vault_base_url, storage_account_name, resour 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 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(parameters, 'StorageAccountCreateParameters') @@ -4298,8 +4025,6 @@ async def update_storage_account(self, vault_base_url, storage_account_name, act 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4362,8 +4087,6 @@ async def regenerate_storage_account_key(self, vault_base_url, storage_account_n 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4402,11 +4125,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v2016_10_01.models.SasDefinitionItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4415,60 +4139,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, *, cls=None, **kwargs): @@ -4508,8 +4215,6 @@ async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4567,8 +4272,6 @@ async def get_sas_definition(self, vault_base_url, storage_account_name, sas_def header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4639,8 +4342,6 @@ async def set_sas_definition(self, vault_base_url, storage_account_name, sas_def 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 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(parameters1, 'SasDefinitionCreateParameters') @@ -4714,8 +4415,6 @@ async def update_sas_definition(self, vault_base_url, storage_account_name, sas_ 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 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(parameters1, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/__init__.py index 76f4bf1ab9bc..6f134becdbd3 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/__init__.py @@ -20,9 +20,11 @@ from ._models_py3 import CertificateCreateParameters from ._models_py3 import CertificateImportParameters from ._models_py3 import CertificateIssuerItem + from ._models_py3 import CertificateIssuerListResult from ._models_py3 import CertificateIssuerSetParameters from ._models_py3 import CertificateIssuerUpdateParameters from ._models_py3 import CertificateItem + from ._models_py3 import CertificateListResult from ._models_py3 import CertificateMergeParameters from ._models_py3 import CertificateOperation from ._models_py3 import CertificateOperationUpdateParameter @@ -32,10 +34,13 @@ from ._models_py3 import Contacts from ._models_py3 import DeletedCertificateBundle from ._models_py3 import DeletedCertificateItem + from ._models_py3 import DeletedCertificateListResult from ._models_py3 import DeletedKeyBundle from ._models_py3 import DeletedKeyItem + from ._models_py3 import DeletedKeyListResult from ._models_py3 import DeletedSecretBundle from ._models_py3 import DeletedSecretItem + from ._models_py3 import DeletedSecretListResult from ._models_py3 import Error from ._models_py3 import IssuerAttributes from ._models_py3 import IssuerBundle @@ -47,6 +52,7 @@ from ._models_py3 import KeyCreateParameters from ._models_py3 import KeyImportParameters from ._models_py3 import KeyItem + from ._models_py3 import KeyListResult from ._models_py3 import KeyOperationResult from ._models_py3 import KeyOperationsParameters from ._models_py3 import KeyProperties @@ -63,10 +69,12 @@ from ._models_py3 import SasDefinitionBundle from ._models_py3 import SasDefinitionCreateParameters from ._models_py3 import SasDefinitionItem + from ._models_py3 import SasDefinitionListResult from ._models_py3 import SasDefinitionUpdateParameters from ._models_py3 import SecretAttributes from ._models_py3 import SecretBundle from ._models_py3 import SecretItem + from ._models_py3 import SecretListResult from ._models_py3 import SecretProperties from ._models_py3 import SecretRestoreParameters from ._models_py3 import SecretSetParameters @@ -77,6 +85,7 @@ from ._models_py3 import StorageAccountRegenerteKeyParameters from ._models_py3 import StorageAccountUpdateParameters from ._models_py3 import StorageBundle + from ._models_py3 import StorageListResult from ._models_py3 import SubjectAlternativeNames from ._models_py3 import Trigger from ._models_py3 import X509CertificateProperties @@ -91,9 +100,11 @@ from ._models import CertificateCreateParameters from ._models import CertificateImportParameters from ._models import CertificateIssuerItem + from ._models import CertificateIssuerListResult from ._models import CertificateIssuerSetParameters from ._models import CertificateIssuerUpdateParameters from ._models import CertificateItem + from ._models import CertificateListResult from ._models import CertificateMergeParameters from ._models import CertificateOperation from ._models import CertificateOperationUpdateParameter @@ -103,10 +114,13 @@ from ._models import Contacts from ._models import DeletedCertificateBundle from ._models import DeletedCertificateItem + from ._models import DeletedCertificateListResult from ._models import DeletedKeyBundle from ._models import DeletedKeyItem + from ._models import DeletedKeyListResult from ._models import DeletedSecretBundle from ._models import DeletedSecretItem + from ._models import DeletedSecretListResult from ._models import Error from ._models import IssuerAttributes from ._models import IssuerBundle @@ -118,6 +132,7 @@ from ._models import KeyCreateParameters from ._models import KeyImportParameters from ._models import KeyItem + from ._models import KeyListResult from ._models import KeyOperationResult from ._models import KeyOperationsParameters from ._models import KeyProperties @@ -134,10 +149,12 @@ from ._models import SasDefinitionBundle from ._models import SasDefinitionCreateParameters from ._models import SasDefinitionItem + from ._models import SasDefinitionListResult from ._models import SasDefinitionUpdateParameters from ._models import SecretAttributes from ._models import SecretBundle from ._models import SecretItem + from ._models import SecretListResult from ._models import SecretProperties from ._models import SecretRestoreParameters from ._models import SecretSetParameters @@ -148,18 +165,10 @@ from ._models import StorageAccountRegenerteKeyParameters from ._models import StorageAccountUpdateParameters from ._models import StorageBundle + from ._models import StorageListResult from ._models import SubjectAlternativeNames from ._models import Trigger from ._models import X509CertificateProperties -from ._paged_models import CertificateIssuerItemPaged -from ._paged_models import CertificateItemPaged -from ._paged_models import DeletedCertificateItemPaged -from ._paged_models import DeletedKeyItemPaged -from ._paged_models import DeletedSecretItemPaged -from ._paged_models import KeyItemPaged -from ._paged_models import SasDefinitionItemPaged -from ._paged_models import SecretItemPaged -from ._paged_models import StorageAccountItemPaged from ._key_vault_client_enums import ( JsonWebKeyType, JsonWebKeyCurveName, @@ -182,9 +191,11 @@ 'CertificateCreateParameters', 'CertificateImportParameters', 'CertificateIssuerItem', + 'CertificateIssuerListResult', 'CertificateIssuerSetParameters', 'CertificateIssuerUpdateParameters', 'CertificateItem', + 'CertificateListResult', 'CertificateMergeParameters', 'CertificateOperation', 'CertificateOperationUpdateParameter', @@ -194,10 +205,13 @@ 'Contacts', 'DeletedCertificateBundle', 'DeletedCertificateItem', + 'DeletedCertificateListResult', 'DeletedKeyBundle', 'DeletedKeyItem', + 'DeletedKeyListResult', 'DeletedSecretBundle', 'DeletedSecretItem', + 'DeletedSecretListResult', 'Error', 'IssuerAttributes', 'IssuerBundle', @@ -209,6 +223,7 @@ 'KeyCreateParameters', 'KeyImportParameters', 'KeyItem', + 'KeyListResult', 'KeyOperationResult', 'KeyOperationsParameters', 'KeyProperties', @@ -225,10 +240,12 @@ 'SasDefinitionBundle', 'SasDefinitionCreateParameters', 'SasDefinitionItem', + 'SasDefinitionListResult', 'SasDefinitionUpdateParameters', 'SecretAttributes', 'SecretBundle', 'SecretItem', + 'SecretListResult', 'SecretProperties', 'SecretRestoreParameters', 'SecretSetParameters', @@ -239,18 +256,10 @@ 'StorageAccountRegenerteKeyParameters', 'StorageAccountUpdateParameters', 'StorageBundle', + 'StorageListResult', 'SubjectAlternativeNames', 'Trigger', 'X509CertificateProperties', - 'KeyItemPaged', - 'DeletedKeyItemPaged', - 'SecretItemPaged', - 'DeletedSecretItemPaged', - 'CertificateItemPaged', - 'CertificateIssuerItemPaged', - 'DeletedCertificateItemPaged', - 'StorageAccountItemPaged', - 'SasDefinitionItemPaged', 'JsonWebKeyType', 'JsonWebKeyCurveName', 'DeletionRecoveryLevel', diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py index f9caaf92c16e..e918a167f2dd 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py @@ -341,6 +341,37 @@ def __init__(self, **kwargs): self.provider = kwargs.get('provider', None) +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -435,6 +466,35 @@ def __init__(self, **kwargs): self.x509_thumbprint = kwargs.get('x509_thumbprint', None) +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v2016_10_01.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -805,6 +865,36 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: + list[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -975,6 +1065,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1176,6 +1295,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -1531,6 +1679,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v2016_10_01.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2012,6 +2189,35 @@ def __init__(self, **kwargs): self.tags = None +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2084,6 +2290,35 @@ def __init__(self, **kwargs): self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2415,6 +2650,36 @@ def __init__(self, **kwargs): self.tags = None +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SubjectAlternativeNames(Model): """The subject alternate names of a X509 object. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py index 4920c195ef89..07d530b486f6 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py @@ -341,6 +341,37 @@ def __init__(self, *, id: str=None, provider: str=None, **kwargs) -> None: self.provider = provider +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -435,6 +466,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.x509_thumbprint = x509_thumbprint +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v2016_10_01.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -805,6 +865,36 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: + list[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -975,6 +1065,35 @@ def __init__(self, *, kid: str=None, attributes=None, tags=None, recovery_id: st self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1176,6 +1295,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, content_type: st self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -1531,6 +1679,35 @@ def __init__(self, *, key, hsm: bool=None, key_attributes=None, tags=None, **kwa self.tags = tags +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v2016_10_01.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2012,6 +2189,35 @@ def __init__(self, **kwargs) -> None: self.tags = None +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2084,6 +2290,35 @@ def __init__(self, *, enabled: bool=None, not_before=None, expires=None, **kwarg self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2415,6 +2650,36 @@ def __init__(self, **kwargs) -> None: self.tags = None +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SubjectAlternativeNames(Model): """The subject alternate names of a X509 object. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_paged_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_paged_models.py deleted file mode 100644 index e5ddd1d7edc4..000000000000 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_paged_models.py +++ /dev/null @@ -1,131 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from azure.core.paging import Paged - - -class KeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`KeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[KeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(KeyItemPaged, self).__init__(*args, **kwargs) -class DeletedKeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedKeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedKeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedKeyItemPaged, self).__init__(*args, **kwargs) -class SecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SecretItemPaged, self).__init__(*args, **kwargs) -class DeletedSecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSecretItemPaged, self).__init__(*args, **kwargs) -class CertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateItemPaged, self).__init__(*args, **kwargs) -class CertificateIssuerItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateIssuerItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateIssuerItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateIssuerItemPaged, self).__init__(*args, **kwargs) -class DeletedCertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedCertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedCertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedCertificateItemPaged, self).__init__(*args, **kwargs) -class StorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`StorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(StorageAccountItemPaged, self).__init__(*args, **kwargs) -class SasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SasDefinitionItemPaged, self).__init__(*args, **kwargs) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 40ad1ab95087..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.paging import ItemPaged from .. import models import uuid @@ -78,8 +79,6 @@ def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops=None, 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 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(parameters, 'KeyCreateParameters') @@ -154,8 +153,6 @@ def import_key(self, vault_base_url, key_name, key, hsm=None, key_attributes=Non 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 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(parameters, 'KeyImportParameters') @@ -218,8 +215,6 @@ def delete_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -294,8 +289,6 @@ def update_key(self, vault_base_url, key_name, key_version, key_ops=None, key_at 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 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(parameters, 'KeyUpdateParameters') @@ -360,8 +353,6 @@ def get_key(self, vault_base_url, key_name, key_version, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -399,11 +390,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -412,46 +404,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -473,11 +462,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -485,46 +475,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_keys.metadata = {'url': '/keys'} def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -576,8 +563,6 @@ def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -649,8 +634,6 @@ def restore_key(self, vault_base_url, key_bundle_backup, cls=None, **kwargs): 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 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(parameters, 'KeyRestoreParameters') @@ -731,8 +714,6 @@ def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -810,8 +791,6 @@ def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -887,8 +866,6 @@ def sign(self, vault_base_url, key_name, key_version, algorithm, value, cls=None 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 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(parameters, 'KeySignParameters') @@ -970,8 +947,6 @@ def verify(self, vault_base_url, key_name, key_version, algorithm, digest, signa 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 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(parameters, 'KeyVerifyParameters') @@ -1049,8 +1024,6 @@ def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cls= 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 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(parameters, 'KeyOperationsParameters') @@ -1126,8 +1099,6 @@ def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cl 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 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(parameters, 'KeyOperationsParameters') @@ -1171,11 +1142,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedKeyItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1183,46 +1155,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -1263,8 +1232,6 @@ def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1322,8 +1289,6 @@ def purge_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1379,8 +1344,6 @@ def recover_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1451,8 +1414,6 @@ def set_secret(self, vault_base_url, secret_name, value, tags=None, content_type 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 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(parameters, 'SecretSetParameters') @@ -1513,8 +1474,6 @@ def delete_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1588,8 +1547,6 @@ def update_secret(self, vault_base_url, secret_name, secret_version, content_typ 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 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(parameters, 'SecretUpdateParameters') @@ -1652,8 +1609,6 @@ def get_secret(self, vault_base_url, secret_name, secret_version, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1691,11 +1646,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1703,46 +1659,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1763,11 +1716,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1776,46 +1730,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1834,11 +1785,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedSecretItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1846,46 +1798,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): @@ -1925,8 +1874,6 @@ def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1984,8 +1931,6 @@ def purge_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2038,8 +1983,6 @@ def recover_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2097,8 +2040,6 @@ def backup_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2158,8 +2099,6 @@ def restore_secret(self, vault_base_url, secret_bundle_backup, cls=None, **kwarg 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 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(parameters, 'SecretRestoreParameters') @@ -2199,11 +2138,12 @@ def get_certificates( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2211,46 +2151,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificates.metadata = {'url': '/certificates'} def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -2291,8 +2228,6 @@ def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2351,8 +2286,6 @@ def set_certificate_contacts(self, vault_base_url, contact_list=None, cls=None, 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 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(contacts, 'Contacts') @@ -2410,8 +2343,6 @@ def get_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2465,8 +2396,6 @@ def delete_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2503,11 +2432,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateIssuerItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2515,46 +2445,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, cls=None, **kwargs): @@ -2608,8 +2535,6 @@ def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credenti 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2684,8 +2609,6 @@ def update_certificate_issuer(self, vault_base_url, issuer_name, provider=None, 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2746,8 +2669,6 @@ def get_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2805,8 +2726,6 @@ def delete_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2876,8 +2795,6 @@ def create_certificate(self, vault_base_url, certificate_name, certificate_polic 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 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(parameters, 'CertificateCreateParameters') @@ -2960,8 +2877,6 @@ def import_certificate(self, vault_base_url, certificate_name, base64_encoded_ce 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 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(parameters, 'CertificateImportParameters') @@ -3003,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3016,46 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3096,8 +3009,6 @@ def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3159,8 +3070,6 @@ def update_certificate_policy(self, vault_base_url, certificate_name, certificat 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 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(certificate_policy, 'CertificatePolicy') @@ -3238,8 +3147,6 @@ def update_certificate(self, vault_base_url, certificate_name, certificate_versi 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 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(parameters, 'CertificateUpdateParameters') @@ -3303,8 +3210,6 @@ def get_certificate(self, vault_base_url, certificate_name, certificate_version, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3367,8 +3272,6 @@ def update_certificate_operation(self, vault_base_url, certificate_name, cancell 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3428,8 +3331,6 @@ def get_certificate_operation(self, vault_base_url, certificate_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3487,8 +3388,6 @@ def delete_certificate_operation(self, vault_base_url, certificate_name, cls=Non header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3560,8 +3459,6 @@ def merge_certificate(self, vault_base_url, certificate_name, x509_certificates, 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 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(parameters, 'CertificateMergeParameters') @@ -3604,11 +3501,12 @@ def get_deleted_certificates( :type maxresults: int :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedCertificateItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3616,46 +3514,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3696,8 +3591,6 @@ def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3755,8 +3648,6 @@ def purge_deleted_certificate(self, vault_base_url, certificate_name, cls=None, header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3812,8 +3703,6 @@ def recover_deleted_certificate(self, vault_base_url, certificate_name, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3847,11 +3736,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v2016_10_01.models.StorageAccountItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3859,46 +3749,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_storage_accounts.metadata = {'url': '/storage'} def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, **kwargs): @@ -3935,8 +3822,6 @@ def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3991,8 +3876,6 @@ def get_storage_account(self, vault_base_url, storage_account_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4067,8 +3950,6 @@ def set_storage_account(self, vault_base_url, storage_account_name, resource_id, 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 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(parameters, 'StorageAccountCreateParameters') @@ -4144,8 +4025,6 @@ def update_storage_account(self, vault_base_url, storage_account_name, active_ke 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4208,8 +4087,6 @@ def regenerate_storage_account_key(self, vault_base_url, storage_account_name, k 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4248,11 +4125,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v2016_10_01.models.SasDefinitionItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4261,46 +4139,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def delete_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, cls=None, **kwargs): @@ -4340,8 +4215,6 @@ def delete_sas_definition(self, vault_base_url, storage_account_name, sas_defini header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4399,8 +4272,6 @@ def get_sas_definition(self, vault_base_url, storage_account_name, sas_definitio header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4471,8 +4342,6 @@ def set_sas_definition(self, vault_base_url, storage_account_name, sas_definitio 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 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(parameters1, 'SasDefinitionCreateParameters') @@ -4546,8 +4415,6 @@ def update_sas_definition(self, vault_base_url, storage_account_name, sas_defini 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 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(parameters1, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/__init__.py index d3fda25cc7ab..e913d4cf6c46 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/__init__.py @@ -9,9 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from ._configuration import KeyVaultClientConfiguration from ._key_vault_client import KeyVaultClient -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] from .version import VERSION diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_configuration.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_configuration.py index beb5eb930fa8..28cf75e3d2b4 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_configuration.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_configuration.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials @@ -45,4 +44,5 @@ def _configure(self, **kwargs): self.proxy_policy = policies.ProxyPolicy(**kwargs) self.logging_policy = policies.NetworkTraceLoggingPolicy(**kwargs) self.retry_policy = policies.RetryPolicy(**kwargs) + self.custom_hook_policy = policies.CustomHookPolicy(**kwargs) self.redirect_policy = policies.RedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_key_vault_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_key_vault_client.py index 699433682e60..a1a1eb19328b 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/_key_vault_client.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/__init__.py index ffece9055d9b..fb2e6c3866fd 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/__init__.py @@ -10,5 +10,4 @@ # -------------------------------------------------------------------------- from ._key_vault_client_async import KeyVaultClient -from ._configuration_async import KeyVaultClientConfiguration -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_configuration_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_configuration_async.py index 2144132ebe2d..a61d9eeff444 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_configuration_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_configuration_async.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_key_vault_client_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_key_vault_client_async.py index 739ab6ea407d..482d6336ab1a 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_key_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/_key_vault_client_async.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index a97144221c6a..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.async_paging import AsyncItemPaged, AsyncList from ... import models import uuid @@ -77,8 +78,6 @@ async def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops 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 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(parameters, 'KeyCreateParameters') @@ -153,8 +152,6 @@ async def import_key(self, vault_base_url, key_name, key, hsm=None, key_attribut 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 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(parameters, 'KeyImportParameters') @@ -217,8 +214,6 @@ async def delete_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -293,8 +288,6 @@ async def update_key(self, vault_base_url, key_name, key_version, key_ops=None, 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 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(parameters, 'KeyUpdateParameters') @@ -359,8 +352,6 @@ async def get_key(self, vault_base_url, key_name, key_version, *, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -398,11 +389,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -411,60 +403,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -486,11 +461,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -498,60 +474,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_keys.metadata = {'url': '/keys'} async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -603,8 +562,6 @@ async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -676,8 +633,6 @@ async def restore_key(self, vault_base_url, key_bundle_backup, *, cls=None, **kw 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 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(parameters, 'KeyRestoreParameters') @@ -758,8 +713,6 @@ async def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -837,8 +790,6 @@ async def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -914,8 +865,6 @@ async def sign(self, vault_base_url, key_name, key_version, algorithm, value, *, 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 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(parameters, 'KeySignParameters') @@ -997,8 +946,6 @@ async def verify(self, vault_base_url, key_name, key_version, algorithm, digest, 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 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(parameters, 'KeyVerifyParameters') @@ -1076,8 +1023,6 @@ async def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value 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 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(parameters, 'KeyOperationsParameters') @@ -1153,8 +1098,6 @@ async def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, val 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 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(parameters, 'KeyOperationsParameters') @@ -1198,11 +1141,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v7_0.models.DeletedKeyItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1210,60 +1154,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -1304,8 +1231,6 @@ async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs) header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1363,8 +1288,6 @@ async def purge_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwarg header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1420,8 +1343,6 @@ async def recover_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1491,8 +1412,6 @@ async def set_secret(self, vault_base_url, secret_name, value, tags=None, conten 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 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(parameters, 'SecretSetParameters') @@ -1553,8 +1472,6 @@ async def delete_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1627,8 +1544,6 @@ async def update_secret(self, vault_base_url, secret_name, secret_version, conte 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 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(parameters, 'SecretUpdateParameters') @@ -1691,8 +1606,6 @@ async def get_secret(self, vault_base_url, secret_name, secret_version, *, cls=N header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1730,11 +1643,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1742,60 +1656,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1816,11 +1713,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1829,60 +1727,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1901,11 +1782,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSecretItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1913,60 +1795,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs): @@ -2006,8 +1871,6 @@ async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2065,8 +1928,6 @@ async def purge_deleted_secret(self, vault_base_url, secret_name, *, cls=None, * header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2119,8 +1980,6 @@ async def recover_deleted_secret(self, vault_base_url, secret_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2178,8 +2037,6 @@ async def backup_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2239,8 +2096,6 @@ async def restore_secret(self, vault_base_url, secret_bundle_backup, *, cls=None 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 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(parameters, 'SecretRestoreParameters') @@ -2283,11 +2138,12 @@ def get_certificates( :type include_pending: bool :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2295,9 +2151,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -2306,51 +2159,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificates.metadata = {'url': '/certificates'} async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -2391,8 +2230,6 @@ async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2451,8 +2288,6 @@ async def set_certificate_contacts(self, vault_base_url, contact_list=None, *, c 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 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(contacts, 'Contacts') @@ -2510,8 +2345,6 @@ async def get_certificate_contacts(self, vault_base_url, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2565,8 +2398,6 @@ async def delete_certificate_contacts(self, vault_base_url, *, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2603,11 +2434,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v7_0.models.CertificateIssuerItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2615,60 +2447,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, *, cls=None, **kwargs): @@ -2721,8 +2536,6 @@ async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, cr 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2796,8 +2609,6 @@ async def update_certificate_issuer(self, vault_base_url, issuer_name, provider= 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2858,8 +2669,6 @@ async def get_certificate_issuer(self, vault_base_url, issuer_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2917,8 +2726,6 @@ async def delete_certificate_issuer(self, vault_base_url, issuer_name, *, cls=No header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2988,8 +2795,6 @@ async def create_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateCreateParameters') @@ -3072,8 +2877,6 @@ async def import_certificate(self, vault_base_url, certificate_name, base64_enco 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 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(parameters, 'CertificateImportParameters') @@ -3115,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3128,60 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3222,8 +3009,6 @@ async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3285,8 +3070,6 @@ async def update_certificate_policy(self, vault_base_url, certificate_name, cert 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 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(certificate_policy, 'CertificatePolicy') @@ -3364,8 +3147,6 @@ async def update_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateUpdateParameters') @@ -3429,8 +3210,6 @@ async def get_certificate(self, vault_base_url, certificate_name, certificate_ve header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3493,8 +3272,6 @@ async def update_certificate_operation(self, vault_base_url, certificate_name, c 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3554,8 +3331,6 @@ async def get_certificate_operation(self, vault_base_url, certificate_name, *, c header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3613,8 +3388,6 @@ async def delete_certificate_operation(self, vault_base_url, certificate_name, * header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3686,8 +3459,6 @@ async def merge_certificate(self, vault_base_url, certificate_name, x509_certifi 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 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(parameters, 'CertificateMergeParameters') @@ -3748,8 +3519,6 @@ async def backup_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3809,8 +3578,6 @@ async def restore_certificate(self, vault_base_url, certificate_bundle_backup, * 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 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(parameters, 'CertificateRestoreParameters') @@ -3856,11 +3623,12 @@ def get_deleted_certificates( :type include_pending: bool :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v7_0.models.DeletedCertificateItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3868,9 +3636,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -3879,51 +3644,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3964,8 +3715,6 @@ async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4023,8 +3772,6 @@ async def purge_deleted_certificate(self, vault_base_url, certificate_name, *, c header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4080,8 +3827,6 @@ async def recover_deleted_certificate(self, vault_base_url, certificate_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4115,11 +3860,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.StorageAccountItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -4127,60 +3873,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_storage_accounts.metadata = {'url': '/storage'} def get_deleted_storage_accounts( @@ -4199,11 +3928,12 @@ def get_deleted_storage_accounts( :type maxresults: int :return: An iterator like instance of DeletedStorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.DeletedStorageAccountItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_storage_accounts.metadata['url'] @@ -4211,60 +3941,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('DeletedStorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedStorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_storage_accounts.metadata = {'url': '/deletedstorage'} async def get_deleted_storage_account(self, vault_base_url, storage_account_name, *, cls=None, **kwargs): @@ -4304,8 +4017,6 @@ async def get_deleted_storage_account(self, vault_base_url, storage_account_name header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4363,8 +4074,6 @@ async def purge_deleted_storage_account(self, vault_base_url, storage_account_na header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4417,8 +4126,6 @@ async def recover_deleted_storage_account(self, vault_base_url, storage_account_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4475,8 +4182,6 @@ async def backup_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4536,8 +4241,6 @@ async def restore_storage_account(self, vault_base_url, storage_bundle_backup, * 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 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(parameters, 'StorageRestoreParameters') @@ -4595,8 +4298,6 @@ async def delete_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4651,8 +4352,6 @@ async def get_storage_account(self, vault_base_url, storage_account_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4727,8 +4426,6 @@ async def set_storage_account(self, vault_base_url, storage_account_name, resour 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 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(parameters, 'StorageAccountCreateParameters') @@ -4804,8 +4501,6 @@ async def update_storage_account(self, vault_base_url, storage_account_name, act 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4868,8 +4563,6 @@ async def regenerate_storage_account_key(self, vault_base_url, storage_account_n 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4908,11 +4601,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.SasDefinitionItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4921,60 +4615,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def get_deleted_sas_definitions( @@ -4996,11 +4673,12 @@ def get_deleted_sas_definitions( :type maxresults: int :return: An iterator like instance of DeletedSasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSasDefinitionItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_sas_definitions.metadata['url'] @@ -5009,60 +4687,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_sas_definitions.metadata = {'url': '/deletedstorage/{storage-account-name}/sas'} async def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, *, cls=None, **kwargs): @@ -5105,8 +4766,6 @@ async def get_deleted_sas_definition(self, vault_base_url, storage_account_name, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5167,8 +4826,6 @@ async def recover_deleted_sas_definition(self, vault_base_url, storage_account_n header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -5226,8 +4883,6 @@ async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -5285,8 +4940,6 @@ async def get_sas_definition(self, vault_base_url, storage_account_name, sas_def header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5364,8 +5017,6 @@ async def set_sas_definition(self, vault_base_url, storage_account_name, sas_def 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 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(parameters, 'SasDefinitionCreateParameters') @@ -5446,8 +5097,6 @@ async def update_sas_definition(self, vault_base_url, storage_account_name, sas_ 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 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(parameters, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/__init__.py index 4debdd0f3d13..5e72f49a73f6 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/__init__.py @@ -22,9 +22,11 @@ from ._models_py3 import CertificateCreateParameters from ._models_py3 import CertificateImportParameters from ._models_py3 import CertificateIssuerItem + from ._models_py3 import CertificateIssuerListResult from ._models_py3 import CertificateIssuerSetParameters from ._models_py3 import CertificateIssuerUpdateParameters from ._models_py3 import CertificateItem + from ._models_py3 import CertificateListResult from ._models_py3 import CertificateMergeParameters from ._models_py3 import CertificateOperation from ._models_py3 import CertificateOperationUpdateParameter @@ -35,14 +37,19 @@ from ._models_py3 import Contacts from ._models_py3 import DeletedCertificateBundle from ._models_py3 import DeletedCertificateItem + from ._models_py3 import DeletedCertificateListResult from ._models_py3 import DeletedKeyBundle from ._models_py3 import DeletedKeyItem + from ._models_py3 import DeletedKeyListResult from ._models_py3 import DeletedSasDefinitionBundle from ._models_py3 import DeletedSasDefinitionItem + from ._models_py3 import DeletedSasDefinitionListResult from ._models_py3 import DeletedSecretBundle from ._models_py3 import DeletedSecretItem + from ._models_py3 import DeletedSecretListResult from ._models_py3 import DeletedStorageAccountItem from ._models_py3 import DeletedStorageBundle + from ._models_py3 import DeletedStorageListResult from ._models_py3 import Error from ._models_py3 import IssuerAttributes from ._models_py3 import IssuerBundle @@ -54,6 +61,7 @@ from ._models_py3 import KeyCreateParameters from ._models_py3 import KeyImportParameters from ._models_py3 import KeyItem + from ._models_py3 import KeyListResult from ._models_py3 import KeyOperationResult from ._models_py3 import KeyOperationsParameters from ._models_py3 import KeyProperties @@ -70,10 +78,12 @@ from ._models_py3 import SasDefinitionBundle from ._models_py3 import SasDefinitionCreateParameters from ._models_py3 import SasDefinitionItem + from ._models_py3 import SasDefinitionListResult from ._models_py3 import SasDefinitionUpdateParameters from ._models_py3 import SecretAttributes from ._models_py3 import SecretBundle from ._models_py3 import SecretItem + from ._models_py3 import SecretListResult from ._models_py3 import SecretProperties from ._models_py3 import SecretRestoreParameters from ._models_py3 import SecretSetParameters @@ -84,6 +94,7 @@ from ._models_py3 import StorageAccountRegenerteKeyParameters from ._models_py3 import StorageAccountUpdateParameters from ._models_py3 import StorageBundle + from ._models_py3 import StorageListResult from ._models_py3 import StorageRestoreParameters from ._models_py3 import SubjectAlternativeNames from ._models_py3 import Trigger @@ -101,9 +112,11 @@ from ._models import CertificateCreateParameters from ._models import CertificateImportParameters from ._models import CertificateIssuerItem + from ._models import CertificateIssuerListResult from ._models import CertificateIssuerSetParameters from ._models import CertificateIssuerUpdateParameters from ._models import CertificateItem + from ._models import CertificateListResult from ._models import CertificateMergeParameters from ._models import CertificateOperation from ._models import CertificateOperationUpdateParameter @@ -114,14 +127,19 @@ from ._models import Contacts from ._models import DeletedCertificateBundle from ._models import DeletedCertificateItem + from ._models import DeletedCertificateListResult from ._models import DeletedKeyBundle from ._models import DeletedKeyItem + from ._models import DeletedKeyListResult from ._models import DeletedSasDefinitionBundle from ._models import DeletedSasDefinitionItem + from ._models import DeletedSasDefinitionListResult from ._models import DeletedSecretBundle from ._models import DeletedSecretItem + from ._models import DeletedSecretListResult from ._models import DeletedStorageAccountItem from ._models import DeletedStorageBundle + from ._models import DeletedStorageListResult from ._models import Error from ._models import IssuerAttributes from ._models import IssuerBundle @@ -133,6 +151,7 @@ from ._models import KeyCreateParameters from ._models import KeyImportParameters from ._models import KeyItem + from ._models import KeyListResult from ._models import KeyOperationResult from ._models import KeyOperationsParameters from ._models import KeyProperties @@ -149,10 +168,12 @@ from ._models import SasDefinitionBundle from ._models import SasDefinitionCreateParameters from ._models import SasDefinitionItem + from ._models import SasDefinitionListResult from ._models import SasDefinitionUpdateParameters from ._models import SecretAttributes from ._models import SecretBundle from ._models import SecretItem + from ._models import SecretListResult from ._models import SecretProperties from ._models import SecretRestoreParameters from ._models import SecretSetParameters @@ -163,21 +184,11 @@ from ._models import StorageAccountRegenerteKeyParameters from ._models import StorageAccountUpdateParameters from ._models import StorageBundle + from ._models import StorageListResult from ._models import StorageRestoreParameters from ._models import SubjectAlternativeNames from ._models import Trigger from ._models import X509CertificateProperties -from ._paged_models import CertificateIssuerItemPaged -from ._paged_models import CertificateItemPaged -from ._paged_models import DeletedCertificateItemPaged -from ._paged_models import DeletedKeyItemPaged -from ._paged_models import DeletedSasDefinitionItemPaged -from ._paged_models import DeletedSecretItemPaged -from ._paged_models import DeletedStorageAccountItemPaged -from ._paged_models import KeyItemPaged -from ._paged_models import SasDefinitionItemPaged -from ._paged_models import SecretItemPaged -from ._paged_models import StorageAccountItemPaged from ._key_vault_client_enums import ( JsonWebKeyType, JsonWebKeyCurveName, @@ -203,9 +214,11 @@ 'CertificateCreateParameters', 'CertificateImportParameters', 'CertificateIssuerItem', + 'CertificateIssuerListResult', 'CertificateIssuerSetParameters', 'CertificateIssuerUpdateParameters', 'CertificateItem', + 'CertificateListResult', 'CertificateMergeParameters', 'CertificateOperation', 'CertificateOperationUpdateParameter', @@ -216,14 +229,19 @@ 'Contacts', 'DeletedCertificateBundle', 'DeletedCertificateItem', + 'DeletedCertificateListResult', 'DeletedKeyBundle', 'DeletedKeyItem', + 'DeletedKeyListResult', 'DeletedSasDefinitionBundle', 'DeletedSasDefinitionItem', + 'DeletedSasDefinitionListResult', 'DeletedSecretBundle', 'DeletedSecretItem', + 'DeletedSecretListResult', 'DeletedStorageAccountItem', 'DeletedStorageBundle', + 'DeletedStorageListResult', 'Error', 'IssuerAttributes', 'IssuerBundle', @@ -235,6 +253,7 @@ 'KeyCreateParameters', 'KeyImportParameters', 'KeyItem', + 'KeyListResult', 'KeyOperationResult', 'KeyOperationsParameters', 'KeyProperties', @@ -251,10 +270,12 @@ 'SasDefinitionBundle', 'SasDefinitionCreateParameters', 'SasDefinitionItem', + 'SasDefinitionListResult', 'SasDefinitionUpdateParameters', 'SecretAttributes', 'SecretBundle', 'SecretItem', + 'SecretListResult', 'SecretProperties', 'SecretRestoreParameters', 'SecretSetParameters', @@ -265,21 +286,11 @@ 'StorageAccountRegenerteKeyParameters', 'StorageAccountUpdateParameters', 'StorageBundle', + 'StorageListResult', 'StorageRestoreParameters', 'SubjectAlternativeNames', 'Trigger', 'X509CertificateProperties', - 'KeyItemPaged', - 'DeletedKeyItemPaged', - 'SecretItemPaged', - 'DeletedSecretItemPaged', - 'CertificateItemPaged', - 'CertificateIssuerItemPaged', - 'DeletedCertificateItemPaged', - 'StorageAccountItemPaged', - 'DeletedStorageAccountItemPaged', - 'SasDefinitionItemPaged', - 'DeletedSasDefinitionItemPaged', 'JsonWebKeyType', 'JsonWebKeyCurveName', 'DeletionRecoveryLevel', diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py index e02ddd417cdb..24dfe4beb6a9 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py @@ -385,6 +385,36 @@ def __init__(self, **kwargs): self.provider = kwargs.get('provider', None) +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -479,6 +509,35 @@ def __init__(self, **kwargs): self.x509_thumbprint = kwargs.get('x509_thumbprint', None) +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -867,6 +926,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: list[~azure.keyvault.v7_0.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -1037,6 +1125,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v7_0.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionBundle(Model): """A SAS definition bundle consists of key vault SAS definition details plus its attributes. @@ -1251,6 +1368,36 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSasDefinitionListResult(Model): + """The deleted SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted SAS + definitions in the vault along with a link to the next page of deleted sas + definitions + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + :ivar next_link: The URL to get the next set of deleted SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1452,6 +1599,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageAccountItem(Model): """The storage account item containing storage account metadata. @@ -1662,6 +1838,37 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedStorageListResult(Model): + """The deleted storage account list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted storage + accounts in the vault along with a link to the next page of deleted + storage accounts + :vartype value: + list[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + :ivar next_link: The URL to get the next set of deleted storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedStorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedStorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -2023,6 +2230,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v7_0.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2451,6 +2687,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v7_0.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2534,6 +2799,35 @@ def __init__(self, **kwargs): self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v7_0.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2779,6 +3073,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: list[~azure.keyvault.v7_0.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageRestoreParameters(Model): """The secret restore parameters. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py index 1f394c8f5f38..52f4aa981815 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py @@ -385,6 +385,36 @@ def __init__(self, *, id: str=None, provider: str=None, **kwargs) -> None: self.provider = provider +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -479,6 +509,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.x509_thumbprint = x509_thumbprint +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -867,6 +926,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: list[~azure.keyvault.v7_0.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -1037,6 +1125,35 @@ def __init__(self, *, kid: str=None, attributes=None, tags=None, recovery_id: st self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v7_0.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionBundle(Model): """A SAS definition bundle consists of key vault SAS definition details plus its attributes. @@ -1251,6 +1368,36 @@ def __init__(self, *, recovery_id: str=None, **kwargs) -> None: self.deleted_date = None +class DeletedSasDefinitionListResult(Model): + """The deleted SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted SAS + definitions in the vault along with a link to the next page of deleted sas + definitions + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + :ivar next_link: The URL to get the next set of deleted SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1452,6 +1599,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, content_type: st self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageAccountItem(Model): """The storage account item containing storage account metadata. @@ -1662,6 +1838,37 @@ def __init__(self, *, recovery_id: str=None, **kwargs) -> None: self.deleted_date = None +class DeletedStorageListResult(Model): + """The deleted storage account list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted storage + accounts in the vault along with a link to the next page of deleted + storage accounts + :vartype value: + list[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + :ivar next_link: The URL to get the next set of deleted storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedStorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedStorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -2023,6 +2230,35 @@ def __init__(self, *, key, hsm: bool=None, key_attributes=None, tags=None, **kwa self.tags = tags +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v7_0.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2451,6 +2687,35 @@ def __init__(self, *, template_uri: str, sas_type, validity_period: str, sas_def self.tags = tags +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v7_0.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2534,6 +2799,35 @@ def __init__(self, *, enabled: bool=None, not_before=None, expires=None, **kwarg self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v7_0.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2779,6 +3073,35 @@ def __init__(self, *, active_key_name: str=None, auto_regenerate_key: bool=None, self.tags = tags +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: list[~azure.keyvault.v7_0.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageRestoreParameters(Model): """The secret restore parameters. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_paged_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_paged_models.py deleted file mode 100644 index 0fbf874da2a7..000000000000 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_paged_models.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from azure.core.paging import Paged - - -class KeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`KeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[KeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(KeyItemPaged, self).__init__(*args, **kwargs) -class DeletedKeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedKeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedKeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedKeyItemPaged, self).__init__(*args, **kwargs) -class SecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SecretItemPaged, self).__init__(*args, **kwargs) -class DeletedSecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSecretItemPaged, self).__init__(*args, **kwargs) -class CertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateItemPaged, self).__init__(*args, **kwargs) -class CertificateIssuerItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateIssuerItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateIssuerItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateIssuerItemPaged, self).__init__(*args, **kwargs) -class DeletedCertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedCertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedCertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedCertificateItemPaged, self).__init__(*args, **kwargs) -class StorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`StorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(StorageAccountItemPaged, self).__init__(*args, **kwargs) -class DeletedStorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedStorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedStorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedStorageAccountItemPaged, self).__init__(*args, **kwargs) -class SasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SasDefinitionItemPaged, self).__init__(*args, **kwargs) -class DeletedSasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSasDefinitionItemPaged, self).__init__(*args, **kwargs) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index c0e15566f02e..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.paging import ItemPaged from .. import models import uuid @@ -77,8 +78,6 @@ def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops=None, 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 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(parameters, 'KeyCreateParameters') @@ -153,8 +152,6 @@ def import_key(self, vault_base_url, key_name, key, hsm=None, key_attributes=Non 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 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(parameters, 'KeyImportParameters') @@ -217,8 +214,6 @@ def delete_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -293,8 +288,6 @@ def update_key(self, vault_base_url, key_name, key_version, key_ops=None, key_at 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 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(parameters, 'KeyUpdateParameters') @@ -359,8 +352,6 @@ def get_key(self, vault_base_url, key_name, key_version, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -398,11 +389,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -411,46 +403,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -472,11 +461,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -484,46 +474,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_keys.metadata = {'url': '/keys'} def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -575,8 +562,6 @@ def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -648,8 +633,6 @@ def restore_key(self, vault_base_url, key_bundle_backup, cls=None, **kwargs): 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 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(parameters, 'KeyRestoreParameters') @@ -730,8 +713,6 @@ def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -809,8 +790,6 @@ def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -886,8 +865,6 @@ def sign(self, vault_base_url, key_name, key_version, algorithm, value, cls=None 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 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(parameters, 'KeySignParameters') @@ -969,8 +946,6 @@ def verify(self, vault_base_url, key_name, key_version, algorithm, digest, signa 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 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(parameters, 'KeyVerifyParameters') @@ -1048,8 +1023,6 @@ def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cls= 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 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(parameters, 'KeyOperationsParameters') @@ -1125,8 +1098,6 @@ def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cl 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 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(parameters, 'KeyOperationsParameters') @@ -1170,11 +1141,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v7_0.models.DeletedKeyItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1182,46 +1154,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -1262,8 +1231,6 @@ def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1321,8 +1288,6 @@ def purge_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1378,8 +1343,6 @@ def recover_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1449,8 +1412,6 @@ def set_secret(self, vault_base_url, secret_name, value, tags=None, content_type 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 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(parameters, 'SecretSetParameters') @@ -1511,8 +1472,6 @@ def delete_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1585,8 +1544,6 @@ def update_secret(self, vault_base_url, secret_name, secret_version, content_typ 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 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(parameters, 'SecretUpdateParameters') @@ -1649,8 +1606,6 @@ def get_secret(self, vault_base_url, secret_name, secret_version, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1688,11 +1643,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1700,46 +1656,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1760,11 +1713,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1773,46 +1727,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1831,11 +1782,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSecretItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1843,46 +1795,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): @@ -1922,8 +1871,6 @@ def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1981,8 +1928,6 @@ def purge_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2035,8 +1980,6 @@ def recover_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2094,8 +2037,6 @@ def backup_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2155,8 +2096,6 @@ def restore_secret(self, vault_base_url, secret_bundle_backup, cls=None, **kwarg 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 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(parameters, 'SecretRestoreParameters') @@ -2199,11 +2138,12 @@ def get_certificates( :type include_pending: bool :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2211,9 +2151,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -2222,37 +2159,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificates.metadata = {'url': '/certificates'} def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -2293,8 +2230,6 @@ def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2353,8 +2288,6 @@ def set_certificate_contacts(self, vault_base_url, contact_list=None, cls=None, 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 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(contacts, 'Contacts') @@ -2412,8 +2345,6 @@ def get_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2467,8 +2398,6 @@ def delete_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2505,11 +2434,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v7_0.models.CertificateIssuerItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2517,46 +2447,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, cls=None, **kwargs): @@ -2609,8 +2536,6 @@ def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credenti 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2684,8 +2609,6 @@ def update_certificate_issuer(self, vault_base_url, issuer_name, provider=None, 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2746,8 +2669,6 @@ def get_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2805,8 +2726,6 @@ def delete_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2876,8 +2795,6 @@ def create_certificate(self, vault_base_url, certificate_name, certificate_polic 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 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(parameters, 'CertificateCreateParameters') @@ -2960,8 +2877,6 @@ def import_certificate(self, vault_base_url, certificate_name, base64_encoded_ce 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 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(parameters, 'CertificateImportParameters') @@ -3003,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3016,46 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3096,8 +3009,6 @@ def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3159,8 +3070,6 @@ def update_certificate_policy(self, vault_base_url, certificate_name, certificat 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 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(certificate_policy, 'CertificatePolicy') @@ -3238,8 +3147,6 @@ def update_certificate(self, vault_base_url, certificate_name, certificate_versi 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 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(parameters, 'CertificateUpdateParameters') @@ -3303,8 +3210,6 @@ def get_certificate(self, vault_base_url, certificate_name, certificate_version, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3367,8 +3272,6 @@ def update_certificate_operation(self, vault_base_url, certificate_name, cancell 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3428,8 +3331,6 @@ def get_certificate_operation(self, vault_base_url, certificate_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3487,8 +3388,6 @@ def delete_certificate_operation(self, vault_base_url, certificate_name, cls=Non header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3560,8 +3459,6 @@ def merge_certificate(self, vault_base_url, certificate_name, x509_certificates, 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 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(parameters, 'CertificateMergeParameters') @@ -3622,8 +3519,6 @@ def backup_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3683,8 +3578,6 @@ def restore_certificate(self, vault_base_url, certificate_bundle_backup, cls=Non 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 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(parameters, 'CertificateRestoreParameters') @@ -3730,11 +3623,12 @@ def get_deleted_certificates( :type include_pending: bool :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v7_0.models.DeletedCertificateItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3742,9 +3636,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -3753,37 +3644,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3824,8 +3715,6 @@ def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3883,8 +3772,6 @@ def purge_deleted_certificate(self, vault_base_url, certificate_name, cls=None, header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3940,8 +3827,6 @@ def recover_deleted_certificate(self, vault_base_url, certificate_name, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3975,11 +3860,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.StorageAccountItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3987,46 +3873,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_storage_accounts.metadata = {'url': '/storage'} def get_deleted_storage_accounts( @@ -4045,11 +3928,12 @@ def get_deleted_storage_accounts( :type maxresults: int :return: An iterator like instance of DeletedStorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.DeletedStorageAccountItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_storage_accounts.metadata['url'] @@ -4057,46 +3941,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedStorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedStorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_storage_accounts.metadata = {'url': '/deletedstorage'} def get_deleted_storage_account(self, vault_base_url, storage_account_name, cls=None, **kwargs): @@ -4136,8 +4017,6 @@ def get_deleted_storage_account(self, vault_base_url, storage_account_name, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4195,8 +4074,6 @@ def purge_deleted_storage_account(self, vault_base_url, storage_account_name, cl header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4249,8 +4126,6 @@ def recover_deleted_storage_account(self, vault_base_url, storage_account_name, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4307,8 +4182,6 @@ def backup_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4368,8 +4241,6 @@ def restore_storage_account(self, vault_base_url, storage_bundle_backup, cls=Non 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 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(parameters, 'StorageRestoreParameters') @@ -4427,8 +4298,6 @@ def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4483,8 +4352,6 @@ def get_storage_account(self, vault_base_url, storage_account_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4559,8 +4426,6 @@ def set_storage_account(self, vault_base_url, storage_account_name, resource_id, 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 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(parameters, 'StorageAccountCreateParameters') @@ -4636,8 +4501,6 @@ def update_storage_account(self, vault_base_url, storage_account_name, active_ke 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4700,8 +4563,6 @@ def regenerate_storage_account_key(self, vault_base_url, storage_account_name, k 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4740,11 +4601,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.SasDefinitionItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4753,46 +4615,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def get_deleted_sas_definitions( @@ -4814,11 +4673,12 @@ def get_deleted_sas_definitions( :type maxresults: int :return: An iterator like instance of DeletedSasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSasDefinitionItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_sas_definitions.metadata['url'] @@ -4827,46 +4687,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_sas_definitions.metadata = {'url': '/deletedstorage/{storage-account-name}/sas'} def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, cls=None, **kwargs): @@ -4909,8 +4766,6 @@ def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_d header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4971,8 +4826,6 @@ def recover_deleted_sas_definition(self, vault_base_url, storage_account_name, s header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -5030,8 +4883,6 @@ def delete_sas_definition(self, vault_base_url, storage_account_name, sas_defini header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -5089,8 +4940,6 @@ def get_sas_definition(self, vault_base_url, storage_account_name, sas_definitio header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5168,8 +5017,6 @@ def set_sas_definition(self, vault_base_url, storage_account_name, sas_definitio 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 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(parameters, 'SasDefinitionCreateParameters') @@ -5250,8 +5097,6 @@ def update_sas_definition(self, vault_base_url, storage_account_name, sas_defini 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 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(parameters, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 56148a5820ef..0714edabf420 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -2,8 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from typing import Any, Callable, Mapping, TYPE_CHECKING -from azure.core.async_paging import AsyncPagedMixin +from typing import Any, Callable, Mapping, AsyncIterator, TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy @@ -23,10 +22,10 @@ class AsyncPagingAdapter: - """For each item in an AsyncPagedMixin, returns the result of applying fn to that item. + """For each item in an AsyncIterator, returns the result of applying fn to that item. Python 3.6 added syntax that could replace this (yield within async for).""" - def __init__(self, pages: AsyncPagedMixin, fn: Callable[[Model], Any]) -> None: + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: self._pages = pages self._fn = fn diff --git a/sdk/keyvault/azure-keyvault-keys/tests/keys_vault_client_async.py b/sdk/keyvault/azure-keyvault-keys/tests/keys_vault_client_async.py index b95fd1aa7ad4..a09d581eb39a 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/keys_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/keys_vault_client_async.py @@ -3,7 +3,6 @@ # Licensed under the MIT License. # ------------------------------------ from typing import Any, Callable, Mapping, TYPE_CHECKING -from azure.core.async_paging import AsyncPagedMixin from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies import AsyncBearerTokenCredentialPolicy diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/key_vault_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/key_vault_client.py index afec64f70804..6221dd5e7bec 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/key_vault_client.py @@ -50,14 +50,14 @@ def get_configuration_class(api_version, aio=False): """ if api_version == V7_0_VERSION: if aio: - from .v7_0.aio import KeyVaultClientConfiguration as ImplConfig + from .v7_0.aio._configuration_async import KeyVaultClientConfiguration as ImplConfig else: - from .v7_0 import KeyVaultClientConfiguration as ImplConfig + from .v7_0._configuration import KeyVaultClientConfiguration as ImplConfig elif api_version == V2016_10_01_VERSION: if aio: - from .v2016_10_01.aio import KeyVaultClientConfiguration as ImplConfig + from .v2016_10_01.aio._configuration_async import KeyVaultClientConfiguration as ImplConfig else: - from .v2016_10_01 import KeyVaultClientConfiguration as ImplConfig + from .v2016_10_01._configuration import KeyVaultClientConfiguration as ImplConfig else: raise NotImplementedError("API version {} is not available".format(api_version)) return ImplConfig diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/__init__.py index d3fda25cc7ab..e913d4cf6c46 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/__init__.py @@ -9,9 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from ._configuration import KeyVaultClientConfiguration from ._key_vault_client import KeyVaultClient -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] from .version import VERSION diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_configuration.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_configuration.py index beb5eb930fa8..28cf75e3d2b4 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_configuration.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_configuration.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials @@ -45,4 +44,5 @@ def _configure(self, **kwargs): self.proxy_policy = policies.ProxyPolicy(**kwargs) self.logging_policy = policies.NetworkTraceLoggingPolicy(**kwargs) self.retry_policy = policies.RetryPolicy(**kwargs) + self.custom_hook_policy = policies.CustomHookPolicy(**kwargs) self.redirect_policy = policies.RedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_key_vault_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_key_vault_client.py index 0252b1e16a5e..e3ec609b6cd3 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/_key_vault_client.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/__init__.py index ffece9055d9b..fb2e6c3866fd 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/__init__.py @@ -10,5 +10,4 @@ # -------------------------------------------------------------------------- from ._key_vault_client_async import KeyVaultClient -from ._configuration_async import KeyVaultClientConfiguration -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_configuration_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_configuration_async.py index 2144132ebe2d..a61d9eeff444 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_configuration_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_configuration_async.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py index 559d48da029a..ad4b8a97754f 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/_key_vault_client_async.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 28ea64adc6a6..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.async_paging import AsyncItemPaged, AsyncList from ... import models import uuid @@ -78,8 +79,6 @@ async def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops 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 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(parameters, 'KeyCreateParameters') @@ -154,8 +153,6 @@ async def import_key(self, vault_base_url, key_name, key, hsm=None, key_attribut 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 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(parameters, 'KeyImportParameters') @@ -218,8 +215,6 @@ async def delete_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -294,8 +289,6 @@ async def update_key(self, vault_base_url, key_name, key_version, key_ops=None, 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 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(parameters, 'KeyUpdateParameters') @@ -360,8 +353,6 @@ async def get_key(self, vault_base_url, key_name, key_version, *, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -399,11 +390,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -412,60 +404,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -487,11 +462,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -499,60 +475,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_keys.metadata = {'url': '/keys'} async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -604,8 +563,6 @@ async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -677,8 +634,6 @@ async def restore_key(self, vault_base_url, key_bundle_backup, *, cls=None, **kw 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 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(parameters, 'KeyRestoreParameters') @@ -759,8 +714,6 @@ async def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -838,8 +791,6 @@ async def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -915,8 +866,6 @@ async def sign(self, vault_base_url, key_name, key_version, algorithm, value, *, 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 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(parameters, 'KeySignParameters') @@ -998,8 +947,6 @@ async def verify(self, vault_base_url, key_name, key_version, algorithm, digest, 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 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(parameters, 'KeyVerifyParameters') @@ -1077,8 +1024,6 @@ async def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value 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 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(parameters, 'KeyOperationsParameters') @@ -1154,8 +1099,6 @@ async def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, val 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 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(parameters, 'KeyOperationsParameters') @@ -1199,11 +1142,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedKeyItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1211,60 +1155,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -1305,8 +1232,6 @@ async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs) header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1364,8 +1289,6 @@ async def purge_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwarg header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1421,8 +1344,6 @@ async def recover_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1493,8 +1414,6 @@ async def set_secret(self, vault_base_url, secret_name, value, tags=None, conten 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 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(parameters, 'SecretSetParameters') @@ -1555,8 +1474,6 @@ async def delete_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1630,8 +1547,6 @@ async def update_secret(self, vault_base_url, secret_name, secret_version, conte 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 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(parameters, 'SecretUpdateParameters') @@ -1694,8 +1609,6 @@ async def get_secret(self, vault_base_url, secret_name, secret_version, *, cls=N header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1733,11 +1646,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1745,60 +1659,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1819,11 +1716,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1832,60 +1730,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1904,11 +1785,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedSecretItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1916,60 +1798,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs): @@ -2009,8 +1874,6 @@ async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2068,8 +1931,6 @@ async def purge_deleted_secret(self, vault_base_url, secret_name, *, cls=None, * header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2122,8 +1983,6 @@ async def recover_deleted_secret(self, vault_base_url, secret_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2181,8 +2040,6 @@ async def backup_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2242,8 +2099,6 @@ async def restore_secret(self, vault_base_url, secret_bundle_backup, *, cls=None 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 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(parameters, 'SecretRestoreParameters') @@ -2283,11 +2138,12 @@ def get_certificates( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2295,60 +2151,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificates.metadata = {'url': '/certificates'} async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -2389,8 +2228,6 @@ async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2449,8 +2286,6 @@ async def set_certificate_contacts(self, vault_base_url, contact_list=None, *, c 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 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(contacts, 'Contacts') @@ -2508,8 +2343,6 @@ async def get_certificate_contacts(self, vault_base_url, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2563,8 +2396,6 @@ async def delete_certificate_contacts(self, vault_base_url, *, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2601,11 +2432,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateIssuerItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2613,60 +2445,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, *, cls=None, **kwargs): @@ -2720,8 +2535,6 @@ async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, cr 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2796,8 +2609,6 @@ async def update_certificate_issuer(self, vault_base_url, issuer_name, provider= 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2858,8 +2669,6 @@ async def get_certificate_issuer(self, vault_base_url, issuer_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2917,8 +2726,6 @@ async def delete_certificate_issuer(self, vault_base_url, issuer_name, *, cls=No header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2988,8 +2795,6 @@ async def create_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateCreateParameters') @@ -3072,8 +2877,6 @@ async def import_certificate(self, vault_base_url, certificate_name, base64_enco 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 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(parameters, 'CertificateImportParameters') @@ -3115,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3128,60 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3222,8 +3009,6 @@ async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3285,8 +3070,6 @@ async def update_certificate_policy(self, vault_base_url, certificate_name, cert 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 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(certificate_policy, 'CertificatePolicy') @@ -3364,8 +3147,6 @@ async def update_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateUpdateParameters') @@ -3429,8 +3210,6 @@ async def get_certificate(self, vault_base_url, certificate_name, certificate_ve header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3493,8 +3272,6 @@ async def update_certificate_operation(self, vault_base_url, certificate_name, c 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3554,8 +3331,6 @@ async def get_certificate_operation(self, vault_base_url, certificate_name, *, c header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3613,8 +3388,6 @@ async def delete_certificate_operation(self, vault_base_url, certificate_name, * header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3686,8 +3459,6 @@ async def merge_certificate(self, vault_base_url, certificate_name, x509_certifi 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 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(parameters, 'CertificateMergeParameters') @@ -3730,11 +3501,12 @@ def get_deleted_certificates( :type maxresults: int :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedCertificateItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3742,60 +3514,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3836,8 +3591,6 @@ async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3895,8 +3648,6 @@ async def purge_deleted_certificate(self, vault_base_url, certificate_name, *, c header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3952,8 +3703,6 @@ async def recover_deleted_certificate(self, vault_base_url, certificate_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3987,11 +3736,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v2016_10_01.models.StorageAccountItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3999,60 +3749,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_storage_accounts.metadata = {'url': '/storage'} async def delete_storage_account(self, vault_base_url, storage_account_name, *, cls=None, **kwargs): @@ -4089,8 +3822,6 @@ async def delete_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4145,8 +3876,6 @@ async def get_storage_account(self, vault_base_url, storage_account_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4221,8 +3950,6 @@ async def set_storage_account(self, vault_base_url, storage_account_name, resour 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 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(parameters, 'StorageAccountCreateParameters') @@ -4298,8 +4025,6 @@ async def update_storage_account(self, vault_base_url, storage_account_name, act 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4362,8 +4087,6 @@ async def regenerate_storage_account_key(self, vault_base_url, storage_account_n 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4402,11 +4125,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v2016_10_01.models.SasDefinitionItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4415,60 +4139,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, *, cls=None, **kwargs): @@ -4508,8 +4215,6 @@ async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4567,8 +4272,6 @@ async def get_sas_definition(self, vault_base_url, storage_account_name, sas_def header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4639,8 +4342,6 @@ async def set_sas_definition(self, vault_base_url, storage_account_name, sas_def 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 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(parameters1, 'SasDefinitionCreateParameters') @@ -4714,8 +4415,6 @@ async def update_sas_definition(self, vault_base_url, storage_account_name, sas_ 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 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(parameters1, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/__init__.py index 76f4bf1ab9bc..6f134becdbd3 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/__init__.py @@ -20,9 +20,11 @@ from ._models_py3 import CertificateCreateParameters from ._models_py3 import CertificateImportParameters from ._models_py3 import CertificateIssuerItem + from ._models_py3 import CertificateIssuerListResult from ._models_py3 import CertificateIssuerSetParameters from ._models_py3 import CertificateIssuerUpdateParameters from ._models_py3 import CertificateItem + from ._models_py3 import CertificateListResult from ._models_py3 import CertificateMergeParameters from ._models_py3 import CertificateOperation from ._models_py3 import CertificateOperationUpdateParameter @@ -32,10 +34,13 @@ from ._models_py3 import Contacts from ._models_py3 import DeletedCertificateBundle from ._models_py3 import DeletedCertificateItem + from ._models_py3 import DeletedCertificateListResult from ._models_py3 import DeletedKeyBundle from ._models_py3 import DeletedKeyItem + from ._models_py3 import DeletedKeyListResult from ._models_py3 import DeletedSecretBundle from ._models_py3 import DeletedSecretItem + from ._models_py3 import DeletedSecretListResult from ._models_py3 import Error from ._models_py3 import IssuerAttributes from ._models_py3 import IssuerBundle @@ -47,6 +52,7 @@ from ._models_py3 import KeyCreateParameters from ._models_py3 import KeyImportParameters from ._models_py3 import KeyItem + from ._models_py3 import KeyListResult from ._models_py3 import KeyOperationResult from ._models_py3 import KeyOperationsParameters from ._models_py3 import KeyProperties @@ -63,10 +69,12 @@ from ._models_py3 import SasDefinitionBundle from ._models_py3 import SasDefinitionCreateParameters from ._models_py3 import SasDefinitionItem + from ._models_py3 import SasDefinitionListResult from ._models_py3 import SasDefinitionUpdateParameters from ._models_py3 import SecretAttributes from ._models_py3 import SecretBundle from ._models_py3 import SecretItem + from ._models_py3 import SecretListResult from ._models_py3 import SecretProperties from ._models_py3 import SecretRestoreParameters from ._models_py3 import SecretSetParameters @@ -77,6 +85,7 @@ from ._models_py3 import StorageAccountRegenerteKeyParameters from ._models_py3 import StorageAccountUpdateParameters from ._models_py3 import StorageBundle + from ._models_py3 import StorageListResult from ._models_py3 import SubjectAlternativeNames from ._models_py3 import Trigger from ._models_py3 import X509CertificateProperties @@ -91,9 +100,11 @@ from ._models import CertificateCreateParameters from ._models import CertificateImportParameters from ._models import CertificateIssuerItem + from ._models import CertificateIssuerListResult from ._models import CertificateIssuerSetParameters from ._models import CertificateIssuerUpdateParameters from ._models import CertificateItem + from ._models import CertificateListResult from ._models import CertificateMergeParameters from ._models import CertificateOperation from ._models import CertificateOperationUpdateParameter @@ -103,10 +114,13 @@ from ._models import Contacts from ._models import DeletedCertificateBundle from ._models import DeletedCertificateItem + from ._models import DeletedCertificateListResult from ._models import DeletedKeyBundle from ._models import DeletedKeyItem + from ._models import DeletedKeyListResult from ._models import DeletedSecretBundle from ._models import DeletedSecretItem + from ._models import DeletedSecretListResult from ._models import Error from ._models import IssuerAttributes from ._models import IssuerBundle @@ -118,6 +132,7 @@ from ._models import KeyCreateParameters from ._models import KeyImportParameters from ._models import KeyItem + from ._models import KeyListResult from ._models import KeyOperationResult from ._models import KeyOperationsParameters from ._models import KeyProperties @@ -134,10 +149,12 @@ from ._models import SasDefinitionBundle from ._models import SasDefinitionCreateParameters from ._models import SasDefinitionItem + from ._models import SasDefinitionListResult from ._models import SasDefinitionUpdateParameters from ._models import SecretAttributes from ._models import SecretBundle from ._models import SecretItem + from ._models import SecretListResult from ._models import SecretProperties from ._models import SecretRestoreParameters from ._models import SecretSetParameters @@ -148,18 +165,10 @@ from ._models import StorageAccountRegenerteKeyParameters from ._models import StorageAccountUpdateParameters from ._models import StorageBundle + from ._models import StorageListResult from ._models import SubjectAlternativeNames from ._models import Trigger from ._models import X509CertificateProperties -from ._paged_models import CertificateIssuerItemPaged -from ._paged_models import CertificateItemPaged -from ._paged_models import DeletedCertificateItemPaged -from ._paged_models import DeletedKeyItemPaged -from ._paged_models import DeletedSecretItemPaged -from ._paged_models import KeyItemPaged -from ._paged_models import SasDefinitionItemPaged -from ._paged_models import SecretItemPaged -from ._paged_models import StorageAccountItemPaged from ._key_vault_client_enums import ( JsonWebKeyType, JsonWebKeyCurveName, @@ -182,9 +191,11 @@ 'CertificateCreateParameters', 'CertificateImportParameters', 'CertificateIssuerItem', + 'CertificateIssuerListResult', 'CertificateIssuerSetParameters', 'CertificateIssuerUpdateParameters', 'CertificateItem', + 'CertificateListResult', 'CertificateMergeParameters', 'CertificateOperation', 'CertificateOperationUpdateParameter', @@ -194,10 +205,13 @@ 'Contacts', 'DeletedCertificateBundle', 'DeletedCertificateItem', + 'DeletedCertificateListResult', 'DeletedKeyBundle', 'DeletedKeyItem', + 'DeletedKeyListResult', 'DeletedSecretBundle', 'DeletedSecretItem', + 'DeletedSecretListResult', 'Error', 'IssuerAttributes', 'IssuerBundle', @@ -209,6 +223,7 @@ 'KeyCreateParameters', 'KeyImportParameters', 'KeyItem', + 'KeyListResult', 'KeyOperationResult', 'KeyOperationsParameters', 'KeyProperties', @@ -225,10 +240,12 @@ 'SasDefinitionBundle', 'SasDefinitionCreateParameters', 'SasDefinitionItem', + 'SasDefinitionListResult', 'SasDefinitionUpdateParameters', 'SecretAttributes', 'SecretBundle', 'SecretItem', + 'SecretListResult', 'SecretProperties', 'SecretRestoreParameters', 'SecretSetParameters', @@ -239,18 +256,10 @@ 'StorageAccountRegenerteKeyParameters', 'StorageAccountUpdateParameters', 'StorageBundle', + 'StorageListResult', 'SubjectAlternativeNames', 'Trigger', 'X509CertificateProperties', - 'KeyItemPaged', - 'DeletedKeyItemPaged', - 'SecretItemPaged', - 'DeletedSecretItemPaged', - 'CertificateItemPaged', - 'CertificateIssuerItemPaged', - 'DeletedCertificateItemPaged', - 'StorageAccountItemPaged', - 'SasDefinitionItemPaged', 'JsonWebKeyType', 'JsonWebKeyCurveName', 'DeletionRecoveryLevel', diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py index f9caaf92c16e..e918a167f2dd 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py @@ -341,6 +341,37 @@ def __init__(self, **kwargs): self.provider = kwargs.get('provider', None) +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -435,6 +466,35 @@ def __init__(self, **kwargs): self.x509_thumbprint = kwargs.get('x509_thumbprint', None) +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v2016_10_01.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -805,6 +865,36 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: + list[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -975,6 +1065,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1176,6 +1295,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -1531,6 +1679,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v2016_10_01.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2012,6 +2189,35 @@ def __init__(self, **kwargs): self.tags = None +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2084,6 +2290,35 @@ def __init__(self, **kwargs): self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2415,6 +2650,36 @@ def __init__(self, **kwargs): self.tags = None +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SubjectAlternativeNames(Model): """The subject alternate names of a X509 object. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py index 4920c195ef89..07d530b486f6 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py @@ -341,6 +341,37 @@ def __init__(self, *, id: str=None, provider: str=None, **kwargs) -> None: self.provider = provider +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -435,6 +466,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.x509_thumbprint = x509_thumbprint +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v2016_10_01.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -805,6 +865,36 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: + list[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -975,6 +1065,35 @@ def __init__(self, *, kid: str=None, attributes=None, tags=None, recovery_id: st self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1176,6 +1295,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, content_type: st self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -1531,6 +1679,35 @@ def __init__(self, *, key, hsm: bool=None, key_attributes=None, tags=None, **kwa self.tags = tags +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v2016_10_01.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2012,6 +2189,35 @@ def __init__(self, **kwargs) -> None: self.tags = None +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2084,6 +2290,35 @@ def __init__(self, *, enabled: bool=None, not_before=None, expires=None, **kwarg self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v2016_10_01.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2415,6 +2650,36 @@ def __init__(self, **kwargs) -> None: self.tags = None +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: + list[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SubjectAlternativeNames(Model): """The subject alternate names of a X509 object. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_paged_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_paged_models.py deleted file mode 100644 index e5ddd1d7edc4..000000000000 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_paged_models.py +++ /dev/null @@ -1,131 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from azure.core.paging import Paged - - -class KeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`KeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[KeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(KeyItemPaged, self).__init__(*args, **kwargs) -class DeletedKeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedKeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedKeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedKeyItemPaged, self).__init__(*args, **kwargs) -class SecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SecretItemPaged, self).__init__(*args, **kwargs) -class DeletedSecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSecretItemPaged, self).__init__(*args, **kwargs) -class CertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateItemPaged, self).__init__(*args, **kwargs) -class CertificateIssuerItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateIssuerItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateIssuerItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateIssuerItemPaged, self).__init__(*args, **kwargs) -class DeletedCertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedCertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedCertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedCertificateItemPaged, self).__init__(*args, **kwargs) -class StorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`StorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(StorageAccountItemPaged, self).__init__(*args, **kwargs) -class SasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SasDefinitionItemPaged, self).__init__(*args, **kwargs) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 40ad1ab95087..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.paging import ItemPaged from .. import models import uuid @@ -78,8 +79,6 @@ def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops=None, 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 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(parameters, 'KeyCreateParameters') @@ -154,8 +153,6 @@ def import_key(self, vault_base_url, key_name, key, hsm=None, key_attributes=Non 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 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(parameters, 'KeyImportParameters') @@ -218,8 +215,6 @@ def delete_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -294,8 +289,6 @@ def update_key(self, vault_base_url, key_name, key_version, key_ops=None, key_at 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 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(parameters, 'KeyUpdateParameters') @@ -360,8 +353,6 @@ def get_key(self, vault_base_url, key_name, key_version, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -399,11 +390,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -412,46 +404,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -473,11 +462,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.KeyItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -485,46 +475,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_keys.metadata = {'url': '/keys'} def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -576,8 +563,6 @@ def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -649,8 +634,6 @@ def restore_key(self, vault_base_url, key_bundle_backup, cls=None, **kwargs): 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 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(parameters, 'KeyRestoreParameters') @@ -731,8 +714,6 @@ def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -810,8 +791,6 @@ def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -887,8 +866,6 @@ def sign(self, vault_base_url, key_name, key_version, algorithm, value, cls=None 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 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(parameters, 'KeySignParameters') @@ -970,8 +947,6 @@ def verify(self, vault_base_url, key_name, key_version, algorithm, digest, signa 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 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(parameters, 'KeyVerifyParameters') @@ -1049,8 +1024,6 @@ def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cls= 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 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(parameters, 'KeyOperationsParameters') @@ -1126,8 +1099,6 @@ def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cl 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 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(parameters, 'KeyOperationsParameters') @@ -1171,11 +1142,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedKeyItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1183,46 +1155,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -1263,8 +1232,6 @@ def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1322,8 +1289,6 @@ def purge_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1379,8 +1344,6 @@ def recover_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1451,8 +1414,6 @@ def set_secret(self, vault_base_url, secret_name, value, tags=None, content_type 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 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(parameters, 'SecretSetParameters') @@ -1513,8 +1474,6 @@ def delete_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1588,8 +1547,6 @@ def update_secret(self, vault_base_url, secret_name, secret_version, content_typ 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 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(parameters, 'SecretUpdateParameters') @@ -1652,8 +1609,6 @@ def get_secret(self, vault_base_url, secret_name, secret_version, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1691,11 +1646,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1703,46 +1659,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1763,11 +1716,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.SecretItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1776,46 +1730,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1834,11 +1785,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedSecretItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1846,46 +1798,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): @@ -1925,8 +1874,6 @@ def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1984,8 +1931,6 @@ def purge_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2038,8 +1983,6 @@ def recover_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2097,8 +2040,6 @@ def backup_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2158,8 +2099,6 @@ def restore_secret(self, vault_base_url, secret_bundle_backup, cls=None, **kwarg 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 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(parameters, 'SecretRestoreParameters') @@ -2199,11 +2138,12 @@ def get_certificates( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2211,46 +2151,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificates.metadata = {'url': '/certificates'} def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -2291,8 +2228,6 @@ def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2351,8 +2286,6 @@ def set_certificate_contacts(self, vault_base_url, contact_list=None, cls=None, 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 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(contacts, 'Contacts') @@ -2410,8 +2343,6 @@ def get_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2465,8 +2396,6 @@ def delete_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2503,11 +2432,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateIssuerItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2515,46 +2445,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, cls=None, **kwargs): @@ -2608,8 +2535,6 @@ def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credenti 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2684,8 +2609,6 @@ def update_certificate_issuer(self, vault_base_url, issuer_name, provider=None, 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2746,8 +2669,6 @@ def get_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2805,8 +2726,6 @@ def delete_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2876,8 +2795,6 @@ def create_certificate(self, vault_base_url, certificate_name, certificate_polic 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 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(parameters, 'CertificateCreateParameters') @@ -2960,8 +2877,6 @@ def import_certificate(self, vault_base_url, certificate_name, base64_encoded_ce 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 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(parameters, 'CertificateImportParameters') @@ -3003,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.CertificateItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3016,46 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3096,8 +3009,6 @@ def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3159,8 +3070,6 @@ def update_certificate_policy(self, vault_base_url, certificate_name, certificat 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 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(certificate_policy, 'CertificatePolicy') @@ -3238,8 +3147,6 @@ def update_certificate(self, vault_base_url, certificate_name, certificate_versi 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 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(parameters, 'CertificateUpdateParameters') @@ -3303,8 +3210,6 @@ def get_certificate(self, vault_base_url, certificate_name, certificate_version, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3367,8 +3272,6 @@ def update_certificate_operation(self, vault_base_url, certificate_name, cancell 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3428,8 +3331,6 @@ def get_certificate_operation(self, vault_base_url, certificate_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3487,8 +3388,6 @@ def delete_certificate_operation(self, vault_base_url, certificate_name, cls=Non header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3560,8 +3459,6 @@ def merge_certificate(self, vault_base_url, certificate_name, x509_certificates, 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 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(parameters, 'CertificateMergeParameters') @@ -3604,11 +3501,12 @@ def get_deleted_certificates( :type maxresults: int :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v2016_10_01.models.DeletedCertificateItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3616,46 +3514,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3696,8 +3591,6 @@ def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3755,8 +3648,6 @@ def purge_deleted_certificate(self, vault_base_url, certificate_name, cls=None, header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3812,8 +3703,6 @@ def recover_deleted_certificate(self, vault_base_url, certificate_name, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3847,11 +3736,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v2016_10_01.models.StorageAccountItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3859,46 +3749,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_storage_accounts.metadata = {'url': '/storage'} def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, **kwargs): @@ -3935,8 +3822,6 @@ def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3991,8 +3876,6 @@ def get_storage_account(self, vault_base_url, storage_account_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4067,8 +3950,6 @@ def set_storage_account(self, vault_base_url, storage_account_name, resource_id, 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 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(parameters, 'StorageAccountCreateParameters') @@ -4144,8 +4025,6 @@ def update_storage_account(self, vault_base_url, storage_account_name, active_ke 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4208,8 +4087,6 @@ def regenerate_storage_account_key(self, vault_base_url, storage_account_name, k 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4248,11 +4125,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v2016_10_01.models.SasDefinitionItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v2016_10_01.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4261,46 +4139,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def delete_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, cls=None, **kwargs): @@ -4340,8 +4215,6 @@ def delete_sas_definition(self, vault_base_url, storage_account_name, sas_defini header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4399,8 +4272,6 @@ def get_sas_definition(self, vault_base_url, storage_account_name, sas_definitio header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4471,8 +4342,6 @@ def set_sas_definition(self, vault_base_url, storage_account_name, sas_definitio 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 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(parameters1, 'SasDefinitionCreateParameters') @@ -4546,8 +4415,6 @@ def update_sas_definition(self, vault_base_url, storage_account_name, sas_defini 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 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(parameters1, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/__init__.py index d3fda25cc7ab..e913d4cf6c46 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/__init__.py @@ -9,9 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from ._configuration import KeyVaultClientConfiguration from ._key_vault_client import KeyVaultClient -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] from .version import VERSION diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_configuration.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_configuration.py index beb5eb930fa8..28cf75e3d2b4 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_configuration.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_configuration.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials @@ -45,4 +44,5 @@ def _configure(self, **kwargs): self.proxy_policy = policies.ProxyPolicy(**kwargs) self.logging_policy = policies.NetworkTraceLoggingPolicy(**kwargs) self.retry_policy = policies.RetryPolicy(**kwargs) + self.custom_hook_policy = policies.CustomHookPolicy(**kwargs) self.redirect_policy = policies.RedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_key_vault_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_key_vault_client.py index 699433682e60..a1a1eb19328b 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/_key_vault_client.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/__init__.py index ffece9055d9b..fb2e6c3866fd 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/__init__.py @@ -10,5 +10,4 @@ # -------------------------------------------------------------------------- from ._key_vault_client_async import KeyVaultClient -from ._configuration_async import KeyVaultClientConfiguration -__all__ = ['KeyVaultClient', 'KeyVaultClientConfiguration'] +__all__ = ['KeyVaultClient'] diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_configuration_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_configuration_async.py index 2144132ebe2d..a61d9eeff444 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_configuration_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_configuration_async.py @@ -34,7 +34,6 @@ def __init__(self, credentials, **kwargs): self.user_agent_policy.add_user_agent('azsdk-python-azure-keyvault/{}'.format(VERSION)) self.generate_client_request_id = True - self.accept_language = None self.credentials = credentials diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_key_vault_client_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_key_vault_client_async.py index 739ab6ea407d..482d6336ab1a 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_key_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/_key_vault_client_async.py @@ -27,10 +27,10 @@ class KeyVaultClient(KeyVaultClientOperationsMixin): """ def __init__( - self, credentials, config=None, **kwargs): + self, credentials, **kwargs): base_url = '{vaultBaseUrl}' - self._config = config or KeyVaultClientConfiguration(credentials, **kwargs) + self._config = KeyVaultClientConfiguration(credentials, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index a97144221c6a..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.async_paging import AsyncItemPaged, AsyncList from ... import models import uuid @@ -77,8 +78,6 @@ async def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops 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 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(parameters, 'KeyCreateParameters') @@ -153,8 +152,6 @@ async def import_key(self, vault_base_url, key_name, key, hsm=None, key_attribut 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 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(parameters, 'KeyImportParameters') @@ -217,8 +214,6 @@ async def delete_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -293,8 +288,6 @@ async def update_key(self, vault_base_url, key_name, key_version, key_ops=None, 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 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(parameters, 'KeyUpdateParameters') @@ -359,8 +352,6 @@ async def get_key(self, vault_base_url, key_name, key_version, *, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -398,11 +389,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -411,60 +403,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -486,11 +461,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -498,60 +474,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_keys.metadata = {'url': '/keys'} async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -603,8 +562,6 @@ async def backup_key(self, vault_base_url, key_name, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -676,8 +633,6 @@ async def restore_key(self, vault_base_url, key_bundle_backup, *, cls=None, **kw 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 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(parameters, 'KeyRestoreParameters') @@ -758,8 +713,6 @@ async def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -837,8 +790,6 @@ async def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, 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 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(parameters, 'KeyOperationsParameters') @@ -914,8 +865,6 @@ async def sign(self, vault_base_url, key_name, key_version, algorithm, value, *, 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 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(parameters, 'KeySignParameters') @@ -997,8 +946,6 @@ async def verify(self, vault_base_url, key_name, key_version, algorithm, digest, 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 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(parameters, 'KeyVerifyParameters') @@ -1076,8 +1023,6 @@ async def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value 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 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(parameters, 'KeyOperationsParameters') @@ -1153,8 +1098,6 @@ async def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, val 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 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(parameters, 'KeyOperationsParameters') @@ -1198,11 +1141,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v7_0.models.DeletedKeyItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1210,60 +1154,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs): @@ -1304,8 +1231,6 @@ async def get_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwargs) header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1363,8 +1288,6 @@ async def purge_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwarg header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1420,8 +1343,6 @@ async def recover_deleted_key(self, vault_base_url, key_name, *, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1491,8 +1412,6 @@ async def set_secret(self, vault_base_url, secret_name, value, tags=None, conten 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 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(parameters, 'SecretSetParameters') @@ -1553,8 +1472,6 @@ async def delete_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1627,8 +1544,6 @@ async def update_secret(self, vault_base_url, secret_name, secret_version, conte 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 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(parameters, 'SecretUpdateParameters') @@ -1691,8 +1606,6 @@ async def get_secret(self, vault_base_url, secret_name, secret_version, *, cls=N header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1730,11 +1643,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1742,60 +1656,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1816,11 +1713,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1829,60 +1727,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1901,11 +1782,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSecretItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1913,60 +1795,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs): @@ -2006,8 +1871,6 @@ async def get_deleted_secret(self, vault_base_url, secret_name, *, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2065,8 +1928,6 @@ async def purge_deleted_secret(self, vault_base_url, secret_name, *, cls=None, * header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2119,8 +1980,6 @@ async def recover_deleted_secret(self, vault_base_url, secret_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2178,8 +2037,6 @@ async def backup_secret(self, vault_base_url, secret_name, *, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2239,8 +2096,6 @@ async def restore_secret(self, vault_base_url, secret_bundle_backup, *, cls=None 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 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(parameters, 'SecretRestoreParameters') @@ -2283,11 +2138,12 @@ def get_certificates( :type include_pending: bool :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2295,9 +2151,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -2306,51 +2159,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificates.metadata = {'url': '/certificates'} async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -2391,8 +2230,6 @@ async def delete_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2451,8 +2288,6 @@ async def set_certificate_contacts(self, vault_base_url, contact_list=None, *, c 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 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(contacts, 'Contacts') @@ -2510,8 +2345,6 @@ async def get_certificate_contacts(self, vault_base_url, *, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2565,8 +2398,6 @@ async def delete_certificate_contacts(self, vault_base_url, *, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2603,11 +2434,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v7_0.models.CertificateIssuerItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2615,60 +2447,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, *, cls=None, **kwargs): @@ -2721,8 +2536,6 @@ async def set_certificate_issuer(self, vault_base_url, issuer_name, provider, cr 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2796,8 +2609,6 @@ async def update_certificate_issuer(self, vault_base_url, issuer_name, provider= 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2858,8 +2669,6 @@ async def get_certificate_issuer(self, vault_base_url, issuer_name, *, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2917,8 +2726,6 @@ async def delete_certificate_issuer(self, vault_base_url, issuer_name, *, cls=No header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2988,8 +2795,6 @@ async def create_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateCreateParameters') @@ -3072,8 +2877,6 @@ async def import_certificate(self, vault_base_url, certificate_name, base64_enco 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 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(parameters, 'CertificateImportParameters') @@ -3115,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3128,60 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3222,8 +3009,6 @@ async def get_certificate_policy(self, vault_base_url, certificate_name, *, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3285,8 +3070,6 @@ async def update_certificate_policy(self, vault_base_url, certificate_name, cert 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 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(certificate_policy, 'CertificatePolicy') @@ -3364,8 +3147,6 @@ async def update_certificate(self, vault_base_url, certificate_name, certificate 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 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(parameters, 'CertificateUpdateParameters') @@ -3429,8 +3210,6 @@ async def get_certificate(self, vault_base_url, certificate_name, certificate_ve header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3493,8 +3272,6 @@ async def update_certificate_operation(self, vault_base_url, certificate_name, c 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3554,8 +3331,6 @@ async def get_certificate_operation(self, vault_base_url, certificate_name, *, c header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3613,8 +3388,6 @@ async def delete_certificate_operation(self, vault_base_url, certificate_name, * header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3686,8 +3459,6 @@ async def merge_certificate(self, vault_base_url, certificate_name, x509_certifi 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 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(parameters, 'CertificateMergeParameters') @@ -3748,8 +3519,6 @@ async def backup_certificate(self, vault_base_url, certificate_name, *, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3809,8 +3578,6 @@ async def restore_certificate(self, vault_base_url, certificate_bundle_backup, * 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 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(parameters, 'CertificateRestoreParameters') @@ -3856,11 +3623,12 @@ def get_deleted_certificates( :type include_pending: bool :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v7_0.models.DeletedCertificateItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3868,9 +3636,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -3879,51 +3644,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls=None, **kwargs): @@ -3964,8 +3715,6 @@ async def get_deleted_certificate(self, vault_base_url, certificate_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4023,8 +3772,6 @@ async def purge_deleted_certificate(self, vault_base_url, certificate_name, *, c header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4080,8 +3827,6 @@ async def recover_deleted_certificate(self, vault_base_url, certificate_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4115,11 +3860,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.StorageAccountItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -4127,60 +3873,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_storage_accounts.metadata = {'url': '/storage'} def get_deleted_storage_accounts( @@ -4199,11 +3928,12 @@ def get_deleted_storage_accounts( :type maxresults: int :return: An iterator like instance of DeletedStorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.DeletedStorageAccountItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_storage_accounts.metadata['url'] @@ -4211,60 +3941,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) + async def extract_data_async(response): + deserialized = self._deserialize('DeletedStorageListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - return response - - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedStorageAccountItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_storage_accounts.metadata = {'url': '/deletedstorage'} async def get_deleted_storage_account(self, vault_base_url, storage_account_name, *, cls=None, **kwargs): @@ -4304,8 +4017,6 @@ async def get_deleted_storage_account(self, vault_base_url, storage_account_name header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4363,8 +4074,6 @@ async def purge_deleted_storage_account(self, vault_base_url, storage_account_na header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4417,8 +4126,6 @@ async def recover_deleted_storage_account(self, vault_base_url, storage_account_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4475,8 +4182,6 @@ async def backup_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4536,8 +4241,6 @@ async def restore_storage_account(self, vault_base_url, storage_bundle_backup, * 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 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(parameters, 'StorageRestoreParameters') @@ -4595,8 +4298,6 @@ async def delete_storage_account(self, vault_base_url, storage_account_name, *, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4651,8 +4352,6 @@ async def get_storage_account(self, vault_base_url, storage_account_name, *, cls header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4727,8 +4426,6 @@ async def set_storage_account(self, vault_base_url, storage_account_name, resour 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 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(parameters, 'StorageAccountCreateParameters') @@ -4804,8 +4501,6 @@ async def update_storage_account(self, vault_base_url, storage_account_name, act 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4868,8 +4563,6 @@ async def regenerate_storage_account_key(self, vault_base_url, storage_account_n 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4908,11 +4601,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.SasDefinitionItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4921,60 +4615,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def get_deleted_sas_definitions( @@ -4996,11 +4673,12 @@ def get_deleted_sas_definitions( :type maxresults: int :return: An iterator like instance of DeletedSasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSasDefinitionItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_sas_definitions.metadata['url'] @@ -5009,60 +4687,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise models.KeyVaultErrorException(response, self._deserialize) - - return response + async def extract_data_async(response): + deserialized = self._deserialize('DeletedSasDefinitionListResult', response) + return deserialized.next_link, AsyncList(deserialized.value) - async def internal_paging_async(next_link=None): - error_map = kwargs.pop('error_map', None) + async def get_next_async(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSasDefinitionItemPaged( - internal_paging, self._deserialize, async_command=internal_paging_async) - - return deserialized + return AsyncItemPaged( + get_next_async, extract_data_async + ) get_deleted_sas_definitions.metadata = {'url': '/deletedstorage/{storage-account-name}/sas'} async def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, *, cls=None, **kwargs): @@ -5105,8 +4766,6 @@ async def get_deleted_sas_definition(self, vault_base_url, storage_account_name, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5167,8 +4826,6 @@ async def recover_deleted_sas_definition(self, vault_base_url, storage_account_n header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -5226,8 +4883,6 @@ async def delete_sas_definition(self, vault_base_url, storage_account_name, sas_ header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -5285,8 +4940,6 @@ async def get_sas_definition(self, vault_base_url, storage_account_name, sas_def header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5364,8 +5017,6 @@ async def set_sas_definition(self, vault_base_url, storage_account_name, sas_def 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 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(parameters, 'SasDefinitionCreateParameters') @@ -5446,8 +5097,6 @@ async def update_sas_definition(self, vault_base_url, storage_account_name, sas_ 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 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(parameters, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/__init__.py index 4debdd0f3d13..5e72f49a73f6 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/__init__.py @@ -22,9 +22,11 @@ from ._models_py3 import CertificateCreateParameters from ._models_py3 import CertificateImportParameters from ._models_py3 import CertificateIssuerItem + from ._models_py3 import CertificateIssuerListResult from ._models_py3 import CertificateIssuerSetParameters from ._models_py3 import CertificateIssuerUpdateParameters from ._models_py3 import CertificateItem + from ._models_py3 import CertificateListResult from ._models_py3 import CertificateMergeParameters from ._models_py3 import CertificateOperation from ._models_py3 import CertificateOperationUpdateParameter @@ -35,14 +37,19 @@ from ._models_py3 import Contacts from ._models_py3 import DeletedCertificateBundle from ._models_py3 import DeletedCertificateItem + from ._models_py3 import DeletedCertificateListResult from ._models_py3 import DeletedKeyBundle from ._models_py3 import DeletedKeyItem + from ._models_py3 import DeletedKeyListResult from ._models_py3 import DeletedSasDefinitionBundle from ._models_py3 import DeletedSasDefinitionItem + from ._models_py3 import DeletedSasDefinitionListResult from ._models_py3 import DeletedSecretBundle from ._models_py3 import DeletedSecretItem + from ._models_py3 import DeletedSecretListResult from ._models_py3 import DeletedStorageAccountItem from ._models_py3 import DeletedStorageBundle + from ._models_py3 import DeletedStorageListResult from ._models_py3 import Error from ._models_py3 import IssuerAttributes from ._models_py3 import IssuerBundle @@ -54,6 +61,7 @@ from ._models_py3 import KeyCreateParameters from ._models_py3 import KeyImportParameters from ._models_py3 import KeyItem + from ._models_py3 import KeyListResult from ._models_py3 import KeyOperationResult from ._models_py3 import KeyOperationsParameters from ._models_py3 import KeyProperties @@ -70,10 +78,12 @@ from ._models_py3 import SasDefinitionBundle from ._models_py3 import SasDefinitionCreateParameters from ._models_py3 import SasDefinitionItem + from ._models_py3 import SasDefinitionListResult from ._models_py3 import SasDefinitionUpdateParameters from ._models_py3 import SecretAttributes from ._models_py3 import SecretBundle from ._models_py3 import SecretItem + from ._models_py3 import SecretListResult from ._models_py3 import SecretProperties from ._models_py3 import SecretRestoreParameters from ._models_py3 import SecretSetParameters @@ -84,6 +94,7 @@ from ._models_py3 import StorageAccountRegenerteKeyParameters from ._models_py3 import StorageAccountUpdateParameters from ._models_py3 import StorageBundle + from ._models_py3 import StorageListResult from ._models_py3 import StorageRestoreParameters from ._models_py3 import SubjectAlternativeNames from ._models_py3 import Trigger @@ -101,9 +112,11 @@ from ._models import CertificateCreateParameters from ._models import CertificateImportParameters from ._models import CertificateIssuerItem + from ._models import CertificateIssuerListResult from ._models import CertificateIssuerSetParameters from ._models import CertificateIssuerUpdateParameters from ._models import CertificateItem + from ._models import CertificateListResult from ._models import CertificateMergeParameters from ._models import CertificateOperation from ._models import CertificateOperationUpdateParameter @@ -114,14 +127,19 @@ from ._models import Contacts from ._models import DeletedCertificateBundle from ._models import DeletedCertificateItem + from ._models import DeletedCertificateListResult from ._models import DeletedKeyBundle from ._models import DeletedKeyItem + from ._models import DeletedKeyListResult from ._models import DeletedSasDefinitionBundle from ._models import DeletedSasDefinitionItem + from ._models import DeletedSasDefinitionListResult from ._models import DeletedSecretBundle from ._models import DeletedSecretItem + from ._models import DeletedSecretListResult from ._models import DeletedStorageAccountItem from ._models import DeletedStorageBundle + from ._models import DeletedStorageListResult from ._models import Error from ._models import IssuerAttributes from ._models import IssuerBundle @@ -133,6 +151,7 @@ from ._models import KeyCreateParameters from ._models import KeyImportParameters from ._models import KeyItem + from ._models import KeyListResult from ._models import KeyOperationResult from ._models import KeyOperationsParameters from ._models import KeyProperties @@ -149,10 +168,12 @@ from ._models import SasDefinitionBundle from ._models import SasDefinitionCreateParameters from ._models import SasDefinitionItem + from ._models import SasDefinitionListResult from ._models import SasDefinitionUpdateParameters from ._models import SecretAttributes from ._models import SecretBundle from ._models import SecretItem + from ._models import SecretListResult from ._models import SecretProperties from ._models import SecretRestoreParameters from ._models import SecretSetParameters @@ -163,21 +184,11 @@ from ._models import StorageAccountRegenerteKeyParameters from ._models import StorageAccountUpdateParameters from ._models import StorageBundle + from ._models import StorageListResult from ._models import StorageRestoreParameters from ._models import SubjectAlternativeNames from ._models import Trigger from ._models import X509CertificateProperties -from ._paged_models import CertificateIssuerItemPaged -from ._paged_models import CertificateItemPaged -from ._paged_models import DeletedCertificateItemPaged -from ._paged_models import DeletedKeyItemPaged -from ._paged_models import DeletedSasDefinitionItemPaged -from ._paged_models import DeletedSecretItemPaged -from ._paged_models import DeletedStorageAccountItemPaged -from ._paged_models import KeyItemPaged -from ._paged_models import SasDefinitionItemPaged -from ._paged_models import SecretItemPaged -from ._paged_models import StorageAccountItemPaged from ._key_vault_client_enums import ( JsonWebKeyType, JsonWebKeyCurveName, @@ -203,9 +214,11 @@ 'CertificateCreateParameters', 'CertificateImportParameters', 'CertificateIssuerItem', + 'CertificateIssuerListResult', 'CertificateIssuerSetParameters', 'CertificateIssuerUpdateParameters', 'CertificateItem', + 'CertificateListResult', 'CertificateMergeParameters', 'CertificateOperation', 'CertificateOperationUpdateParameter', @@ -216,14 +229,19 @@ 'Contacts', 'DeletedCertificateBundle', 'DeletedCertificateItem', + 'DeletedCertificateListResult', 'DeletedKeyBundle', 'DeletedKeyItem', + 'DeletedKeyListResult', 'DeletedSasDefinitionBundle', 'DeletedSasDefinitionItem', + 'DeletedSasDefinitionListResult', 'DeletedSecretBundle', 'DeletedSecretItem', + 'DeletedSecretListResult', 'DeletedStorageAccountItem', 'DeletedStorageBundle', + 'DeletedStorageListResult', 'Error', 'IssuerAttributes', 'IssuerBundle', @@ -235,6 +253,7 @@ 'KeyCreateParameters', 'KeyImportParameters', 'KeyItem', + 'KeyListResult', 'KeyOperationResult', 'KeyOperationsParameters', 'KeyProperties', @@ -251,10 +270,12 @@ 'SasDefinitionBundle', 'SasDefinitionCreateParameters', 'SasDefinitionItem', + 'SasDefinitionListResult', 'SasDefinitionUpdateParameters', 'SecretAttributes', 'SecretBundle', 'SecretItem', + 'SecretListResult', 'SecretProperties', 'SecretRestoreParameters', 'SecretSetParameters', @@ -265,21 +286,11 @@ 'StorageAccountRegenerteKeyParameters', 'StorageAccountUpdateParameters', 'StorageBundle', + 'StorageListResult', 'StorageRestoreParameters', 'SubjectAlternativeNames', 'Trigger', 'X509CertificateProperties', - 'KeyItemPaged', - 'DeletedKeyItemPaged', - 'SecretItemPaged', - 'DeletedSecretItemPaged', - 'CertificateItemPaged', - 'CertificateIssuerItemPaged', - 'DeletedCertificateItemPaged', - 'StorageAccountItemPaged', - 'DeletedStorageAccountItemPaged', - 'SasDefinitionItemPaged', - 'DeletedSasDefinitionItemPaged', 'JsonWebKeyType', 'JsonWebKeyCurveName', 'DeletionRecoveryLevel', diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py index e02ddd417cdb..24dfe4beb6a9 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py @@ -385,6 +385,36 @@ def __init__(self, **kwargs): self.provider = kwargs.get('provider', None) +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -479,6 +509,35 @@ def __init__(self, **kwargs): self.x509_thumbprint = kwargs.get('x509_thumbprint', None) +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -867,6 +926,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: list[~azure.keyvault.v7_0.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -1037,6 +1125,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v7_0.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionBundle(Model): """A SAS definition bundle consists of key vault SAS definition details plus its attributes. @@ -1251,6 +1368,36 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSasDefinitionListResult(Model): + """The deleted SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted SAS + definitions in the vault along with a link to the next page of deleted sas + definitions + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + :ivar next_link: The URL to get the next set of deleted SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1452,6 +1599,35 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageAccountItem(Model): """The storage account item containing storage account metadata. @@ -1662,6 +1838,37 @@ def __init__(self, **kwargs): self.deleted_date = None +class DeletedStorageListResult(Model): + """The deleted storage account list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted storage + accounts in the vault along with a link to the next page of deleted + storage accounts + :vartype value: + list[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + :ivar next_link: The URL to get the next set of deleted storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedStorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedStorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -2023,6 +2230,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v7_0.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2451,6 +2687,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v7_0.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2534,6 +2799,35 @@ def __init__(self, **kwargs): self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v7_0.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2779,6 +3073,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: list[~azure.keyvault.v7_0.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageRestoreParameters(Model): """The secret restore parameters. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py index 1f394c8f5f38..52f4aa981815 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py @@ -385,6 +385,36 @@ def __init__(self, *, id: str=None, provider: str=None, **kwargs) -> None: self.provider = provider +class CertificateIssuerListResult(Model): + """The certificate issuer list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificate issuers + in the key vault along with a link to the next page of certificate + issuers. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateIssuerItem] + :ivar next_link: The URL to get the next set of certificate issuers. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateIssuerItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateIssuerListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateIssuerSetParameters(Model): """The certificate issuer set parameters. @@ -479,6 +509,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.x509_thumbprint = x509_thumbprint +class CertificateListResult(Model): + """The certificate list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of certificates in the + key vault along with a link to the next page of certificates. + :vartype value: list[~azure.keyvault.v7_0.models.CertificateItem] + :ivar next_link: The URL to get the next set of certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class CertificateMergeParameters(Model): """The certificate merge parameters. @@ -867,6 +926,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, x509_thumbprint: self.deleted_date = None +class DeletedCertificateListResult(Model): + """A list of certificates that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted certificates + in the vault along with a link to the next page of deleted certificates + :vartype value: list[~azure.keyvault.v7_0.models.DeletedCertificateItem] + :ivar next_link: The URL to get the next set of deleted certificates. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedCertificateItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedCertificateListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyBundle(Model): """A KeyBundle consisting of a WebKey plus its attributes. @@ -1037,6 +1125,35 @@ def __init__(self, *, kid: str=None, attributes=None, tags=None, recovery_id: st self.deleted_date = None +class DeletedKeyListResult(Model): + """A list of keys that have been deleted in this vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of deleted keys in the + vault along with a link to the next page of deleted keys + :vartype value: list[~azure.keyvault.v7_0.models.DeletedKeyItem] + :ivar next_link: The URL to get the next set of deleted keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedKeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedKeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionBundle(Model): """A SAS definition bundle consists of key vault SAS definition details plus its attributes. @@ -1251,6 +1368,36 @@ def __init__(self, *, recovery_id: str=None, **kwargs) -> None: self.deleted_date = None +class DeletedSasDefinitionListResult(Model): + """The deleted SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted SAS + definitions in the vault along with a link to the next page of deleted sas + definitions + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + :ivar next_link: The URL to get the next set of deleted SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretBundle(Model): """A secret consisting of a value, id and its attributes. @@ -1452,6 +1599,35 @@ def __init__(self, *, id: str=None, attributes=None, tags=None, content_type: st self.deleted_date = None +class DeletedSecretListResult(Model): + """The deleted secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted secrets + in the vault along with a link to the next page of deleted secrets + :vartype value: list[~azure.keyvault.v7_0.models.DeletedSecretItem] + :ivar next_link: The URL to get the next set of deleted secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedSecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageAccountItem(Model): """The storage account item containing storage account metadata. @@ -1662,6 +1838,37 @@ def __init__(self, *, recovery_id: str=None, **kwargs) -> None: self.deleted_date = None +class DeletedStorageListResult(Model): + """The deleted storage account list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of the deleted storage + accounts in the vault along with a link to the next page of deleted + storage accounts + :vartype value: + list[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + :ivar next_link: The URL to get the next set of deleted storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedStorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedStorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Error(Model): """The key vault server error. @@ -2023,6 +2230,35 @@ def __init__(self, *, key, hsm: bool=None, key_attributes=None, tags=None, **kwa self.tags = tags +class KeyListResult(Model): + """The key list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of keys in the key vault + along with a link to the next page of keys. + :vartype value: list[~azure.keyvault.v7_0.models.KeyItem] + :ivar next_link: The URL to get the next set of keys. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[KeyItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(KeyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class KeyOperationResult(Model): """The key operation result. @@ -2451,6 +2687,35 @@ def __init__(self, *, template_uri: str, sas_type, validity_period: str, sas_def self.tags = tags +class SasDefinitionListResult(Model): + """The storage account SAS definition list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of SAS definitions along + with a link to the next page of SAS definitions. + :vartype value: list[~azure.keyvault.v7_0.models.SasDefinitionItem] + :ivar next_link: The URL to get the next set of SAS definitions. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SasDefinitionItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SasDefinitionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SasDefinitionUpdateParameters(Model): """The SAS definition update parameters. @@ -2534,6 +2799,35 @@ def __init__(self, *, enabled: bool=None, not_before=None, expires=None, **kwarg self.recovery_level = None +class SecretListResult(Model): + """The secret list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of secrets in the key + vault along with a link to the next page of secrets. + :vartype value: list[~azure.keyvault.v7_0.models.SecretItem] + :ivar next_link: The URL to get the next set of secrets. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecretItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SecretListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecretProperties(Model): """Properties of the key backing a certificate. @@ -2779,6 +3073,35 @@ def __init__(self, *, active_key_name: str=None, auto_regenerate_key: bool=None, self.tags = tags +class StorageListResult(Model): + """The storage accounts list result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A response message containing a list of storage accounts in + the key vault along with a link to the next page of storage accounts. + :vartype value: list[~azure.keyvault.v7_0.models.StorageAccountItem] + :ivar next_link: The URL to get the next set of storage accounts. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StorageAccountItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class StorageRestoreParameters(Model): """The secret restore parameters. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_paged_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_paged_models.py deleted file mode 100644 index 0fbf874da2a7..000000000000 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_paged_models.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from azure.core.paging import Paged - - -class KeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`KeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[KeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(KeyItemPaged, self).__init__(*args, **kwargs) -class DeletedKeyItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedKeyItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedKeyItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedKeyItemPaged, self).__init__(*args, **kwargs) -class SecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SecretItemPaged, self).__init__(*args, **kwargs) -class DeletedSecretItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSecretItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSecretItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSecretItemPaged, self).__init__(*args, **kwargs) -class CertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateItemPaged, self).__init__(*args, **kwargs) -class CertificateIssuerItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateIssuerItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateIssuerItem]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateIssuerItemPaged, self).__init__(*args, **kwargs) -class DeletedCertificateItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedCertificateItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedCertificateItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedCertificateItemPaged, self).__init__(*args, **kwargs) -class StorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`StorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(StorageAccountItemPaged, self).__init__(*args, **kwargs) -class DeletedStorageAccountItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedStorageAccountItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedStorageAccountItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedStorageAccountItemPaged, self).__init__(*args, **kwargs) -class SasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`SasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(SasDefinitionItemPaged, self).__init__(*args, **kwargs) -class DeletedSasDefinitionItemPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedSasDefinitionItem ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedSasDefinitionItem]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedSasDefinitionItemPaged, self).__init__(*args, **kwargs) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index c0e15566f02e..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- from azure.core.exceptions import map_error +from azure.core.paging import ItemPaged from .. import models import uuid @@ -77,8 +78,6 @@ def create_key(self, vault_base_url, key_name, kty, key_size=None, key_ops=None, 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 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(parameters, 'KeyCreateParameters') @@ -153,8 +152,6 @@ def import_key(self, vault_base_url, key_name, key, hsm=None, key_attributes=Non 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 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(parameters, 'KeyImportParameters') @@ -217,8 +214,6 @@ def delete_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -293,8 +288,6 @@ def update_key(self, vault_base_url, key_name, key_version, key_ops=None, key_at 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 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(parameters, 'KeyUpdateParameters') @@ -359,8 +352,6 @@ def get_key(self, vault_base_url, key_name, key_version, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -398,11 +389,12 @@ def get_key_versions( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_key_versions.metadata['url'] @@ -411,46 +403,43 @@ def prepare_request(next_link=None): 'key-name': self._serialize.url("key_name", key_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_key_versions.metadata = {'url': '/keys/{key-name}/versions'} def get_keys( @@ -472,11 +461,12 @@ def get_keys( :type maxresults: int :return: An iterator like instance of KeyItem :rtype: - ~azure.keyvault.v7_0.models.KeyItemPaged[~azure.keyvault.v7_0.models.KeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.KeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_keys.metadata['url'] @@ -484,46 +474,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('KeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.KeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_keys.metadata = {'url': '/keys'} def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -575,8 +562,6 @@ def backup_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -648,8 +633,6 @@ def restore_key(self, vault_base_url, key_bundle_backup, cls=None, **kwargs): 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 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(parameters, 'KeyRestoreParameters') @@ -730,8 +713,6 @@ def encrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -809,8 +790,6 @@ def decrypt(self, vault_base_url, key_name, key_version, algorithm, value, cls=N 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 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(parameters, 'KeyOperationsParameters') @@ -886,8 +865,6 @@ def sign(self, vault_base_url, key_name, key_version, algorithm, value, cls=None 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 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(parameters, 'KeySignParameters') @@ -969,8 +946,6 @@ def verify(self, vault_base_url, key_name, key_version, algorithm, digest, signa 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 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(parameters, 'KeyVerifyParameters') @@ -1048,8 +1023,6 @@ def wrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cls= 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 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(parameters, 'KeyOperationsParameters') @@ -1125,8 +1098,6 @@ def unwrap_key(self, vault_base_url, key_name, key_version, algorithm, value, cl 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 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(parameters, 'KeyOperationsParameters') @@ -1170,11 +1141,12 @@ def get_deleted_keys( :type maxresults: int :return: An iterator like instance of DeletedKeyItem :rtype: - ~azure.keyvault.v7_0.models.DeletedKeyItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedKeyItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_keys.metadata['url'] @@ -1182,46 +1154,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedKeyListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedKeyItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_keys.metadata = {'url': '/deletedkeys'} def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): @@ -1262,8 +1231,6 @@ def get_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1321,8 +1288,6 @@ def purge_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1378,8 +1343,6 @@ def recover_deleted_key(self, vault_base_url, key_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -1449,8 +1412,6 @@ def set_secret(self, vault_base_url, secret_name, value, tags=None, content_type 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 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(parameters, 'SecretSetParameters') @@ -1511,8 +1472,6 @@ def delete_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -1585,8 +1544,6 @@ def update_secret(self, vault_base_url, secret_name, secret_version, content_typ 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 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(parameters, 'SecretUpdateParameters') @@ -1649,8 +1606,6 @@ def get_secret(self, vault_base_url, secret_name, secret_version, cls=None, **kw header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1688,11 +1643,12 @@ def get_secrets( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secrets.metadata['url'] @@ -1700,46 +1656,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secrets.metadata = {'url': '/secrets'} def get_secret_versions( @@ -1760,11 +1713,12 @@ def get_secret_versions( :type maxresults: int :return: An iterator like instance of SecretItem :rtype: - ~azure.keyvault.v7_0.models.SecretItemPaged[~azure.keyvault.v7_0.models.SecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_secret_versions.metadata['url'] @@ -1773,46 +1727,43 @@ def prepare_request(next_link=None): 'secret-name': self._serialize.url("secret_name", secret_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_secret_versions.metadata = {'url': '/secrets/{secret-name}/versions'} def get_deleted_secrets( @@ -1831,11 +1782,12 @@ def get_deleted_secrets( :type maxresults: int :return: An iterator like instance of DeletedSecretItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSecretItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedSecretItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_secrets.metadata['url'] @@ -1843,46 +1795,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSecretListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSecretItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_secrets.metadata = {'url': '/deletedsecrets'} def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): @@ -1922,8 +1871,6 @@ def get_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -1981,8 +1928,6 @@ def purge_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2035,8 +1980,6 @@ def recover_deleted_secret(self, vault_base_url, secret_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2094,8 +2037,6 @@ def backup_secret(self, vault_base_url, secret_name, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -2155,8 +2096,6 @@ def restore_secret(self, vault_base_url, secret_bundle_backup, cls=None, **kwarg 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 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(parameters, 'SecretRestoreParameters') @@ -2199,11 +2138,12 @@ def get_certificates( :type include_pending: bool :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificates.metadata['url'] @@ -2211,9 +2151,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -2222,37 +2159,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificates.metadata = {'url': '/certificates'} def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -2293,8 +2230,6 @@ def delete_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2353,8 +2288,6 @@ def set_certificate_contacts(self, vault_base_url, contact_list=None, cls=None, 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 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(contacts, 'Contacts') @@ -2412,8 +2345,6 @@ def get_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2467,8 +2398,6 @@ def delete_certificate_contacts(self, vault_base_url, cls=None, **kwargs): header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2505,11 +2434,12 @@ def get_certificate_issuers( :type maxresults: int :return: An iterator like instance of CertificateIssuerItem :rtype: - ~azure.keyvault.v7_0.models.CertificateIssuerItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateIssuerItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_issuers.metadata['url'] @@ -2517,46 +2447,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateIssuerListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateIssuerItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_issuers.metadata = {'url': '/certificates/issuers'} def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credentials=None, organization_details=None, attributes=None, cls=None, **kwargs): @@ -2609,8 +2536,6 @@ def set_certificate_issuer(self, vault_base_url, issuer_name, provider, credenti 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 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(parameter, 'CertificateIssuerSetParameters') @@ -2684,8 +2609,6 @@ def update_certificate_issuer(self, vault_base_url, issuer_name, provider=None, 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 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(parameter, 'CertificateIssuerUpdateParameters') @@ -2746,8 +2669,6 @@ def get_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwargs header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -2805,8 +2726,6 @@ def delete_certificate_issuer(self, vault_base_url, issuer_name, cls=None, **kwa header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -2876,8 +2795,6 @@ def create_certificate(self, vault_base_url, certificate_name, certificate_polic 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 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(parameters, 'CertificateCreateParameters') @@ -2960,8 +2877,6 @@ def import_certificate(self, vault_base_url, certificate_name, base64_encoded_ce 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 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(parameters, 'CertificateImportParameters') @@ -3003,11 +2918,12 @@ def get_certificate_versions( :type maxresults: int :return: An iterator like instance of CertificateItem :rtype: - ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.CertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_certificate_versions.metadata['url'] @@ -3016,46 +2932,43 @@ def prepare_request(next_link=None): 'certificate-name': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('CertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.CertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_certificate_versions.metadata = {'url': '/certificates/{certificate-name}/versions'} def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3096,8 +3009,6 @@ def get_certificate_policy(self, vault_base_url, certificate_name, cls=None, **k header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3159,8 +3070,6 @@ def update_certificate_policy(self, vault_base_url, certificate_name, certificat 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 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(certificate_policy, 'CertificatePolicy') @@ -3238,8 +3147,6 @@ def update_certificate(self, vault_base_url, certificate_name, certificate_versi 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 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(parameters, 'CertificateUpdateParameters') @@ -3303,8 +3210,6 @@ def get_certificate(self, vault_base_url, certificate_name, certificate_version, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3367,8 +3272,6 @@ def update_certificate_operation(self, vault_base_url, certificate_name, cancell 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 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(certificate_operation, 'CertificateOperationUpdateParameter') @@ -3428,8 +3331,6 @@ def get_certificate_operation(self, vault_base_url, certificate_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3487,8 +3388,6 @@ def delete_certificate_operation(self, vault_base_url, certificate_name, cls=Non header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3560,8 +3459,6 @@ def merge_certificate(self, vault_base_url, certificate_name, x509_certificates, 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 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(parameters, 'CertificateMergeParameters') @@ -3622,8 +3519,6 @@ def backup_certificate(self, vault_base_url, certificate_name, cls=None, **kwarg header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3683,8 +3578,6 @@ def restore_certificate(self, vault_base_url, certificate_bundle_backup, cls=Non 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 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(parameters, 'CertificateRestoreParameters') @@ -3730,11 +3623,12 @@ def get_deleted_certificates( :type include_pending: bool :return: An iterator like instance of DeletedCertificateItem :rtype: - ~azure.keyvault.v7_0.models.DeletedCertificateItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedCertificateItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_certificates.metadata['url'] @@ -3742,9 +3636,6 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) if include_pending is not None: @@ -3753,37 +3644,37 @@ def prepare_request(next_link=None): else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedCertificateListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedCertificateItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_certificates.metadata = {'url': '/deletedcertificates'} def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, **kwargs): @@ -3824,8 +3715,6 @@ def get_deleted_certificate(self, vault_base_url, certificate_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -3883,8 +3772,6 @@ def purge_deleted_certificate(self, vault_base_url, certificate_name, cls=None, header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -3940,8 +3827,6 @@ def recover_deleted_certificate(self, vault_base_url, certificate_name, cls=None header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -3975,11 +3860,12 @@ def get_storage_accounts( :type maxresults: int :return: An iterator like instance of StorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.StorageAccountItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.StorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_storage_accounts.metadata['url'] @@ -3987,46 +3873,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('StorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.StorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_storage_accounts.metadata = {'url': '/storage'} def get_deleted_storage_accounts( @@ -4045,11 +3928,12 @@ def get_deleted_storage_accounts( :type maxresults: int :return: An iterator like instance of DeletedStorageAccountItem :rtype: - ~azure.keyvault.v7_0.models.DeletedStorageAccountItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedStorageAccountItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_storage_accounts.metadata['url'] @@ -4057,46 +3941,43 @@ def prepare_request(next_link=None): 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedStorageListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedStorageAccountItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_storage_accounts.metadata = {'url': '/deletedstorage'} def get_deleted_storage_account(self, vault_base_url, storage_account_name, cls=None, **kwargs): @@ -4136,8 +4017,6 @@ def get_deleted_storage_account(self, vault_base_url, storage_account_name, cls= header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4195,8 +4074,6 @@ def purge_deleted_storage_account(self, vault_base_url, storage_account_name, cl header_parameters = {} if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4249,8 +4126,6 @@ def recover_deleted_storage_account(self, vault_base_url, storage_account_name, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4307,8 +4182,6 @@ def backup_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -4368,8 +4241,6 @@ def restore_storage_account(self, vault_base_url, storage_bundle_backup, cls=Non 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 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(parameters, 'StorageRestoreParameters') @@ -4427,8 +4298,6 @@ def delete_storage_account(self, vault_base_url, storage_account_name, cls=None, header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -4483,8 +4352,6 @@ def get_storage_account(self, vault_base_url, storage_account_name, cls=None, ** header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4559,8 +4426,6 @@ def set_storage_account(self, vault_base_url, storage_account_name, resource_id, 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 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(parameters, 'StorageAccountCreateParameters') @@ -4636,8 +4501,6 @@ def update_storage_account(self, vault_base_url, storage_account_name, active_ke 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 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(parameters, 'StorageAccountUpdateParameters') @@ -4700,8 +4563,6 @@ def regenerate_storage_account_key(self, vault_base_url, storage_account_name, k 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 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(parameters, 'StorageAccountRegenerteKeyParameters') @@ -4740,11 +4601,12 @@ def get_sas_definitions( :type maxresults: int :return: An iterator like instance of SasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.SasDefinitionItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.SasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_sas_definitions.metadata['url'] @@ -4753,46 +4615,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('SasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.SasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_sas_definitions.metadata = {'url': '/storage/{storage-account-name}/sas'} def get_deleted_sas_definitions( @@ -4814,11 +4673,12 @@ def get_deleted_sas_definitions( :type maxresults: int :return: An iterator like instance of DeletedSasDefinitionItem :rtype: - ~azure.keyvault.v7_0.models.DeletedSasDefinitionItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] + ~azure.core.paging.ItemPaged[~azure.keyvault.v7_0.models.DeletedSasDefinitionItem] :raises: :class:`KeyVaultErrorException` """ def prepare_request(next_link=None): + query_parameters = {} if not next_link: # Construct URL url = self.get_deleted_sas_definitions.metadata['url'] @@ -4827,46 +4687,43 @@ def prepare_request(next_link=None): 'storage-account-name': self._serialize.url("storage_account_name", storage_account_name, 'str', pattern=r'^[0-9a-zA-Z]+$') } url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} if maxresults is not None: query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link - query_parameters = {} # 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 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) return request - def internal_paging(next_link=None): - error_map = kwargs.pop('error_map', None) + def extract_data(response): + deserialized = self._deserialize('DeletedSasDefinitionListResult', response) + return deserialized.next_link, iter(deserialized.value) + + def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request) response = pipeline_response.http_response + error_map = kwargs.pop('error_map', None) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise models.KeyVaultErrorException(response, self._deserialize) - return response # Deserialize response - deserialized = models.DeletedSasDefinitionItemPaged(internal_paging, self._deserialize) - - return deserialized + return ItemPaged( + get_next, extract_data + ) get_deleted_sas_definitions.metadata = {'url': '/deletedstorage/{storage-account-name}/sas'} def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_definition_name, cls=None, **kwargs): @@ -4909,8 +4766,6 @@ def get_deleted_sas_definition(self, vault_base_url, storage_account_name, sas_d header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -4971,8 +4826,6 @@ def recover_deleted_sas_definition(self, vault_base_url, storage_account_name, s header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.post(url, query_parameters, header_parameters) @@ -5030,8 +4883,6 @@ def delete_sas_definition(self, vault_base_url, storage_account_name, sas_defini header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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.delete(url, query_parameters, header_parameters) @@ -5089,8 +4940,6 @@ def get_sas_definition(self, vault_base_url, storage_account_name, sas_definitio header_parameters['Accept'] = 'application/json' if self._config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - 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) @@ -5168,8 +5017,6 @@ def set_sas_definition(self, vault_base_url, storage_account_name, sas_definitio 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 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(parameters, 'SasDefinitionCreateParameters') @@ -5250,8 +5097,6 @@ def update_sas_definition(self, vault_base_url, storage_account_name, sas_defini 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 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(parameters, 'SasDefinitionUpdateParameters') diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index c40e314accc7..dd2c6f0a9b95 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -2,8 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from typing import Any, Callable, Mapping, TYPE_CHECKING -from azure.core.async_paging import AsyncPagedMixin +from typing import Any, Callable, Mapping, AsyncIterator, TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy @@ -23,10 +22,10 @@ class AsyncPagingAdapter: - """For each item in an AsyncPagedMixin, returns the result of applying fn to that item. + """For each item in an AsyncIterator, returns the result of applying fn to that item. Python 3.6 added syntax that could replace this (yield within async for).""" - def __init__(self, pages: AsyncPagedMixin, fn: Callable[[Model], Any]) -> None: + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: self._pages = pages self._fn = fn diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/secrets_vault_client_async.py b/sdk/keyvault/azure-keyvault-secrets/tests/secrets_vault_client_async.py index 73578320e809..a374f9a3782c 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/secrets_vault_client_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/tests/secrets_vault_client_async.py @@ -3,7 +3,6 @@ # Licensed under the MIT License. # ------------------------------------ from typing import Any, Callable, Mapping, TYPE_CHECKING -from azure.core.async_paging import AsyncPagedMixin from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies import AsyncBearerTokenCredentialPolicy diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py index c2b7cce9f255..6484882d65bb 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py @@ -14,6 +14,8 @@ except ImportError: from urlparse import urlparse # type: ignore +from azure.core.paging import ItemPaged + from ._shared.shared_access_signature import SharedAccessSignature from ._shared.models import LocationMode, Services from ._shared.utils import ( @@ -380,12 +382,11 @@ def set_service_properties( def list_containers( self, name_starts_with=None, # type: Optional[str] include_metadata=False, # type: Optional[bool] - marker=None, # type: Optional[str] results_per_page=None, # type: Optional[int] timeout=None, # type: Optional[int] **kwargs ): - # type: (...) -> ContainerPropertiesPaged + # type: (...) -> ItemPaged[ContainerProperties] """Returns a generator to list the containers under the specified account. The generator will lazily follow the continuation tokens returned by @@ -397,17 +398,13 @@ def list_containers( :param bool include_metadata: Specifies that container metadata be returned in the response. The default value is `False`. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int results_per_page: The maximum number of container names to retrieve per API call. If the request does not specify the server will return up to 5,000 items. :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) of ContainerProperties. - :rtype: ~azure.core.blob.models.ContainerPropertiesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.core.blob.models.ContainerProperties] Example: .. literalinclude:: ../tests/test_blob_samples_service.py @@ -424,8 +421,8 @@ def list_containers( include=include, timeout=timeout, **kwargs) - return ContainerPropertiesPaged( - command, prefix=name_starts_with, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, prefix=name_starts_with, results_per_page=results_per_page, page_iterator_class=ContainerPropertiesPaged) def create_container( self, name, # type: str diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py index 28da09873c1e..2f43f56806e3 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py @@ -16,6 +16,8 @@ from urlparse import urlparse # type: ignore from urllib2 import quote, unquote # type: ignore +from azure.core.paging import ItemPaged + import six from ._shared.shared_access_signature import BlobSharedAccessSignature @@ -658,8 +660,8 @@ def set_container_access_policy( except StorageErrorException as error: process_storage_error(error) - def list_blobs(self, name_starts_with=None, include=None, marker=None, timeout=None, **kwargs): - # type: (Optional[str], Optional[Any], Optional[str], Optional[int], **Any) -> Iterable[BlobProperties] + def list_blobs(self, name_starts_with=None, include=None, timeout=None, **kwargs): + # type: (Optional[str], Optional[Any], Optional[int], **Any) -> ItemPaged[BlobProperties] """Returns a generator to list the blobs under the specified container. The generator will lazily follow the continuation tokens returned by the service. @@ -670,14 +672,10 @@ def list_blobs(self, name_starts_with=None, include=None, marker=None, timeout=N :param list[str] include: Specifies one or more additional datasets to include in the response. Options include: 'snapshots', 'metadata', 'uncommittedblobs', 'copy', 'deleted'. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) response of BlobProperties. - :rtype: ~azure.storage.blob.models.BlobPropertiesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.models.BlobProperties] Example: .. literalinclude:: ../tests/test_blob_samples_containers.py @@ -696,17 +694,19 @@ def list_blobs(self, name_starts_with=None, include=None, marker=None, timeout=N include=include, timeout=timeout, **kwargs) - return BlobPropertiesPaged(command, prefix=name_starts_with, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, prefix=name_starts_with, results_per_page=results_per_page, + page_iterator_class=BlobPropertiesPaged) + def walk_blobs( self, name_starts_with=None, # type: Optional[str] include=None, # type: Optional[Any] delimiter="/", # type: str - marker=None, # type: Optional[str] timeout=None, # type: Optional[int] **kwargs # type: Optional[Any] ): - # type: (...) -> Iterable[BlobProperties] + # type: (...) -> ItemPaged[BlobProperties] """Returns a generator to list the blobs under the specified container. The generator will lazily follow the continuation tokens returned by the service. This operation will list blobs in accordance with a hierarchy, @@ -723,20 +723,15 @@ def walk_blobs( element in the response body that acts as a placeholder for all blobs whose names begin with the same substring up to the appearance of the delimiter character. The delimiter may be a single character or a string. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) response of BlobProperties. - :rtype: ~azure.storage.blob.models.BlobPrefix + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.models.BlobProperties] """ if include and not isinstance(include, list): include = [include] results_per_page = kwargs.pop('results_per_page', None) - marker = kwargs.pop('marker', "") command = functools.partial( self._client.container.list_blob_hierarchy_segment, delimiter=delimiter, @@ -747,7 +742,6 @@ def walk_blobs( command, prefix=name_starts_with, results_per_page=results_per_page, - marker=marker, delimiter=delimiter) def upload_blob( diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/models.py b/sdk/storage/azure-storage-blob/azure/storage/blob/models.py index ab75e1d7722d..c5c90d21f15e 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/models.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/models.py @@ -9,7 +9,7 @@ from enum import Enum from typing import List, Any, TYPE_CHECKING # pylint: disable=unused-import -from azure.core.paging import Paged +from azure.core.paging import PageIterator, ItemPaged from ._shared.utils import ( decode_base64, @@ -287,14 +287,14 @@ def _from_generated(cls, generated): return props -class ContainerPropertiesPaged(Paged): +class ContainerPropertiesPaged(PageIterator): """An Iterable of Container properties. :ivar str service_endpoint: The service URL. :ivar str prefix: A container name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. - :ivar str next_marker: The continuation token to retrieve the next page of results. + :ivar str continuation_token: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available options include "primary" and "secondary". :ivar current_page: The current page of listed results. @@ -305,53 +305,45 @@ class ContainerPropertiesPaged(Paged): begin with the specified prefix. :param int results_per_page: The maximum number of container names to retrieve per call. - :param str marker: An opaque continuation token. - """ - def __init__(self, command, prefix=None, results_per_page=None, marker=None): - super(ContainerPropertiesPaged, self).__init__(command, None) + :param str continuation_token: An opaque continuation token. + """ + def __init__(self, command, prefix=None, results_per_page=None, continuation_token=None): + super(ContainerPropertiesPaged, self).__init__( + get_next=self._get_next_cb, + extract_data=self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command self.service_endpoint = None self.prefix = prefix - self.current_marker = None + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.location_mode = None + self.current_page = [] - def _advance_page(self): - """Force moving the cursor to the next azure call. - - This method is for advanced usage, iterator protocol is prefered. - - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( - marker=self.next_marker or None, + return self._command( + marker=continuation_token or None, maxresults=self.results_per_page, cls=return_context_and_deserialized, use_location=self.location_mode) except StorageErrorException as error: process_storage_error(error) + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.service_endpoint = self._response.service_endpoint self.prefix = self._response.prefix - self.current_marker = self._response.marker + self.marker = self._response.marker self.results_per_page = self._response.max_results - self.current_page = self._response.container_items - self.next_marker = self._response.next_marker or None - return self.current_page + self.current_page = [self._build_item(item) for item in self._response.container_items] - def __next__(self): # type: ignore - item = super(ContainerPropertiesPaged, self).__next__() - if isinstance(item, ContainerProperties): - return item - return ContainerProperties._from_generated(item) # pylint: disable=protected-access + return self._response.next_marker or None, self.current_page - next = __next__ + @staticmethod + def _build_item(item): + return ContainerProperties._from_generated(item) # pylint: disable=protected-access class BlobProperties(DictMixin): @@ -469,14 +461,14 @@ def _from_generated(cls, generated): return blob -class BlobPropertiesPaged(Paged): +class BlobPropertiesPaged(PageIterator): """An Iterable of Blob properties. :ivar str service_endpoint: The service URL. :ivar str prefix: A blob name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. - :ivar str next_marker: The continuation token to retrieve the next page of results. + :ivar str continuation_token: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available options include "primary" and "secondary". :ivar current_page: The current page of listed results. @@ -489,7 +481,7 @@ class BlobPropertiesPaged(Paged): begin with the specified prefix. :param int results_per_page: The maximum number of blobs to retrieve per call. - :param str marker: An opaque continuation token. + :param str continuation_token: An opaque continuation token. :param str delimiter: Used to capture blobs whose names begin with the same substring up to the appearance of the delimiter character. The delimiter may be a single @@ -503,55 +495,48 @@ def __init__( container=None, prefix=None, results_per_page=None, - marker=None, + continuation_token=None, delimiter=None, location_mode=None): - super(BlobPropertiesPaged, self).__init__(command, None) + super(BlobPropertiesPaged, self).__init__( + get_next=self._get_next_cb, + extract_data=self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command self.service_endpoint = None self.prefix = prefix - self.current_marker = None + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.container = container self.delimiter = delimiter self.current_page = None self.location_mode = location_mode - def _advance_page(self): - """Force moving the cursor to the next azure call. - - This method is for advanced usage, iterator protocol is prefered. - - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 - + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( + return self._command( prefix=self.prefix, - marker=self.next_marker or None, + marker=continuation_token or None, maxresults=self.results_per_page, cls=return_context_and_deserialized, use_location=self.location_mode) except StorageErrorException as error: process_storage_error(error) + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.service_endpoint = self._response.service_endpoint self.prefix = self._response.prefix - self.current_marker = self._response.marker + self.marker = self._response.marker self.results_per_page = self._response.max_results - self.current_page = self._response.segment.blob_items - self.next_marker = self._response.next_marker or None self.container = self._response.container_name + self.current_page = [self._build_item(item) for item in self._response.segment.blob_items] self.delimiter = self._response.delimiter - return self.current_page - def __next__(self): - item = super(BlobPropertiesPaged, self).__next__() + return self._response.next_marker or None, self.current_page + + def _build_item(self, item): if isinstance(item, BlobProperties): return item if isinstance(item, BlobItem): @@ -560,10 +545,8 @@ def __next__(self): return blob return item - next = __next__ - -class BlobPrefix(BlobPropertiesPaged, DictMixin): +class BlobPrefix(ItemPaged, DictMixin): """An Iterable of Blob properties. Returned from walk_blobs when a delimiter is used. @@ -572,7 +555,7 @@ class BlobPrefix(BlobPropertiesPaged, DictMixin): :ivar str name: The prefix, or "directory name" of the blob. :ivar str service_endpoint: The service URL. :ivar str prefix: A blob name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. :ivar str next_marker: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available @@ -597,51 +580,37 @@ class BlobPrefix(BlobPropertiesPaged, DictMixin): Options include 'primary' or 'secondary'. """ def __init__(self, *args, **kwargs): - super(BlobPrefix, self).__init__(*args, **kwargs) + super(BlobPrefix, self).__init__(*args, page_iterator_class=BlobPrefixPaged, **kwargs) + self.name = kwargs.get('prefix') + self.prefix = kwargs.get('prefix') + self.results_per_page = kwargs.get('results_per_page') + self.container = kwargs.get('container') + self.delimiter = kwargs.get('delimiter') + self.location_mode = kwargs.get('location_mode') + +class BlobPrefixPaged(BlobPropertiesPaged): + def __init__(self, *args, **kwargs): + super(BlobPrefixPaged, self).__init__(*args, **kwargs) self.name = self.prefix - def _advance_page(self): - """Force moving the cursor to the next azure call. - - This method is for advanced usage, iterator protocol is prefered. - - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 - self.location_mode, self._response = self._get_next( - prefix=self.prefix, - marker=self.next_marker or None, - maxresults=self.results_per_page, - cls=return_context_and_deserialized, - use_location=self.location_mode) - self.service_endpoint = self._response.service_endpoint - self.prefix = self._response.prefix - self.current_marker = self._response.marker - self.results_per_page = self._response.max_results - self.current_page = self._response.segment.blob_prefixes - self.current_page.extend(self._response.segment.blob_items) - self.next_marker = self._response.next_marker or None - self.container = self._response.container_name - self.delimiter = self._response.delimiter + def _extract_data_cb(self, get_next_return): + continuation_token, _ = super(BlobPrefixPaged, self)._extract_data_cb(get_next_return) + self.current_page = self._response.segment.blob_prefixes + self._response.segment.blob_items + self.current_page = [self._build_item(item) for item in self.current_page] - def __next__(self): - item = super(BlobPrefix, self).__next__() + return continuation_token, self.current_page + + def _build_item(self, item): + item = super(BlobPrefixPaged, self)._build_item(item) if isinstance(item, GenBlobPrefix): return BlobPrefix( - self._get_next, + self._command, container=self.container, prefix=item.name, results_per_page=self.results_per_page, location_mode=self.location_mode) return item - next = __next__ - - class LeaseProperties(DictMixin): """Blob Lease Properties. diff --git a/sdk/storage/azure-storage-blob/tests/test_container.py b/sdk/storage/azure-storage-blob/tests/test_container.py index 889e270dd662..a22b8e50f62a 100644 --- a/sdk/storage/azure-storage-blob/tests/test_container.py +++ b/sdk/storage/azure-storage-blob/tests/test_container.py @@ -120,7 +120,7 @@ def test_create_container_with_public_access_blob(self): blob = container.get_blob_client("blob1") blob.upload_blob(u'xyz') - + anonymous_service = BlobClient( self._get_account_url(), container=container_name, @@ -247,15 +247,12 @@ def test_list_containers_with_num_results_and_marker(self): container_names.sort() # Act - generator1 = self.bsc.list_containers(name_starts_with=prefix, results_per_page=2) - next(generator1) + generator1 = self.bsc.list_containers(name_starts_with=prefix, results_per_page=2).by_page() + containers1 = list(next(generator1)) generator2 = self.bsc.list_containers( - name_starts_with=prefix, marker=generator1.next_marker, results_per_page=2) - next(generator2) - - containers1 = list(generator1.current_page) - containers2 = list(generator2.current_page) + name_starts_with=prefix, results_per_page=2).by_page(generator1.continuation_token) + containers2 = list(next(generator2)) # Assert self.assertIsNotNone(containers1) @@ -817,14 +814,13 @@ def test_list_blobs_with_num_results(self): # Act - blobs = container.list_blobs(results_per_page=2) - next(blobs) + blobs = list(next(container.list_blobs(results_per_page=2).by_page())) # Assert self.assertIsNotNone(blobs) - self.assertEqual(len(blobs.current_page), 2) - self.assertNamedItemInContainer(blobs.current_page, 'blob_a1') - self.assertNamedItemInContainer(blobs.current_page, 'blob_a2') + self.assertEqual(len(blobs), 2) + self.assertNamedItemInContainer(blobs, 'blob_a1') + self.assertNamedItemInContainer(blobs, 'blob_a2') @record def test_list_blobs_with_include_snapshots(self): diff --git a/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py b/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py index 7e0bb4f4885c..50a1dacb7298 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py @@ -16,6 +16,7 @@ import six from azure.core.polling import LROPoller +from azure.core.paging import ItemPaged from .file_client import FileClient @@ -269,21 +270,17 @@ def delete_directory(self, timeout=None, **kwargs): except StorageErrorException as error: process_storage_error(error) - def list_directories_and_files(self, name_starts_with=None, marker=None, timeout=None, **kwargs): - # type: (Optional[str], Optional[str], Optional[int], **Any) -> DirectoryProperties + def list_directories_and_files(self, name_starts_with=None, timeout=None, **kwargs): + # type: (Optional[str], Optional[str], Optional[int], **Any) -> ItemPaged """Lists all the directories and files under the directory. :param str name_starts_with: Filters the results to return only entities whose names begin with the specified prefix. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int timeout: The timeout parameter is expressed in seconds. :returns: An auto-paging iterable of dict-like DirectoryProperties and FileProperties - :rtype: ~azure.storage.file.models.DirectoryPropertiesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.models.DirectoryProperties] Example: .. literalinclude:: ../tests/test_file_samples_directory.py @@ -299,23 +296,20 @@ def list_directories_and_files(self, name_starts_with=None, marker=None, timeout sharesnapshot=self.snapshot, timeout=timeout, **kwargs) - return DirectoryPropertiesPaged( - command, prefix=name_starts_with, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, prefix=name_starts_with, results_per_page=results_per_page, + page_iterator_class=DirectoryPropertiesPaged) - def list_handles(self, marker=None, recursive=False, timeout=None, **kwargs): + def list_handles(self, recursive=False, timeout=None, **kwargs): """Lists opened handles on a directory or a file under the directory. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param bool recursive: Boolean that specifies if operation should apply to the directory specified by the client, its files, its subdirectories and their files. Default value is False. :param int timeout: The timeout parameter is expressed in seconds. :returns: An auto-paging iterable of HandleItems - :rtype: ~azure.storage.file.models.HandlesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.models.Handles] """ results_per_page = kwargs.pop('results_per_page', None) command = functools.partial( @@ -324,8 +318,9 @@ def list_handles(self, marker=None, recursive=False, timeout=None, **kwargs): timeout=timeout, recursive=recursive, **kwargs) - return HandlesPaged( - command, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, results_per_page=results_per_page, + page_iterator_class=HandlesPaged) def close_handles( self, handle=None, # type: Union[str, HandleItem] diff --git a/sdk/storage/azure-storage-file/azure/storage/file/file_client.py b/sdk/storage/azure-storage-file/azure/storage/file/file_client.py index ec492fe25197..a67cc9736fad 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/file_client.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/file_client.py @@ -18,6 +18,7 @@ import six from azure.core.polling import LROPoller +from azure.core.paging import ItemPaged from .models import HandlesPaged from ._generated import AzureFileStorage @@ -781,16 +782,14 @@ def resize_file(self, size, timeout=None, **kwargs): # type: ignore except StorageErrorException as error: process_storage_error(error) - def list_handles(self, marker=None, timeout=None, **kwargs): + def list_handles(self, timeout=None, **kwargs): + # type: (int, Any) -> ItemPaged[Handle] """Lists handles for file. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int timeout: The timeout parameter is expressed in seconds. :returns: An auto-paging iterable of HandleItems + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.models.Handle] """ results_per_page = kwargs.pop('results_per_page', None) command = functools.partial( @@ -798,8 +797,9 @@ def list_handles(self, marker=None, timeout=None, **kwargs): sharesnapshot=self.snapshot, timeout=timeout, **kwargs) - return HandlesPaged( - command, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, results_per_page=results_per_page, + page_iterator_class=HandlesPaged) def close_handles( self, handle=None, # type: Union[str, HandleItem] diff --git a/sdk/storage/azure-storage-file/azure/storage/file/file_service_client.py b/sdk/storage/azure-storage-file/azure/storage/file/file_service_client.py index ffde63e24f69..160a73a7af6a 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/file_service_client.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/file_service_client.py @@ -6,7 +6,7 @@ import functools from typing import ( # pylint: disable=unused-import - Union, Optional, Any, Iterable, Dict, List, + Union, Optional, Any, Dict, List, TYPE_CHECKING ) try: @@ -14,6 +14,8 @@ except ImportError: from urlparse import urlparse # type: ignore +from azure.core.paging import ItemPaged + from .share_client import ShareClient from ._shared.shared_access_signature import SharedAccessSignature from ._shared.models import Services @@ -270,11 +272,10 @@ def list_shares( self, name_starts_with=None, # type: Optional[str] include_metadata=False, # type: Optional[bool] include_snapshots=False, # type: Optional[bool] - marker=None, timeout=None, # type: Optional[int] **kwargs ): - # type: (...) -> SharePropertiesPaged + # type: (...) -> ItemPaged[ShareProperties] """Returns auto-paging iterable of dict-like ShareProperties under the specified account. The generator will lazily follow the continuation tokens returned by the service and stop when all shares have been returned. @@ -286,14 +287,10 @@ def list_shares( Specifies that share metadata be returned in the response. :param bool include_snapshots: Specifies that share snapshot be returned in the response. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) of ShareProperties. - :rtype: ~azure.storage.file.models.SharePropertiesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.models.ShareProperties] Example: .. literalinclude:: ../tests/test_file_samples_service.py @@ -314,8 +311,9 @@ def list_shares( include=include, timeout=timeout, **kwargs) - return SharePropertiesPaged( - command, prefix=name_starts_with, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, prefix=name_starts_with, results_per_page=results_per_page, + page_iterator_class=SharePropertiesPaged) def create_share( self, share_name, # type: str diff --git a/sdk/storage/azure-storage-file/azure/storage/file/models.py b/sdk/storage/azure-storage-file/azure/storage/file/models.py index d77baed48d7d..8a393cc37417 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/models.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/models.py @@ -6,7 +6,7 @@ # pylint: disable=too-few-public-methods, too-many-instance-attributes # pylint: disable=super-init-not-called, too-many-lines -from azure.core.paging import Paged +from azure.core.paging import PageIterator from ._shared.utils import ( return_context_and_deserialized, process_storage_error) @@ -243,12 +243,12 @@ def _from_generated(cls, generated): return props -class SharePropertiesPaged(Paged): +class SharePropertiesPaged(PageIterator): """An iterable of Share properties. :ivar str service_endpoint: The service URL. :ivar str prefix: A file name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. :ivar str next_marker: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available @@ -261,43 +261,40 @@ class SharePropertiesPaged(Paged): begin with the specified prefix. :param int results_per_page: The maximum number of share names to retrieve per call. - :param str marker: An opaque continuation token. + :param str continuation_token: An opaque continuation token. """ - def __init__(self, command, prefix=None, results_per_page=None, marker=None, **kwargs): - super(SharePropertiesPaged, self).__init__(command, None) + def __init__(self, command, prefix=None, results_per_page=None, continuation_token=None): + super(SharePropertiesPaged, self).__init__( + get_next=self._get_next_cb, + extract_data=self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command self.service_endpoint = None self.prefix = prefix - self.current_marker = None + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.location_mode = None + self.current_page = [] - def _advance_page(self): - """Force moving the cursor to the next azure call. - This method is for advanced usage, iterator protocol is prefered. - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( - marker=self.next_marker or None, + return self._command( + marker=continuation_token or None, maxresults=self.results_per_page, cls=return_context_and_deserialized, use_location=self.location_mode) except StorageErrorException as error: process_storage_error(error) + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.service_endpoint = self._response.service_endpoint self.prefix = self._response.prefix - self.current_marker = self._response.marker + self.marker = self._response.marker self.results_per_page = self._response.max_results self.current_page = [ShareProperties._from_generated(i) for i in self._response.share_items] # pylint: disable=protected-access - self.next_marker = self._response.next_marker or None - return self.current_page + return self._response.next_marker or None, self.current_page class Handle(DictMixin): @@ -352,10 +349,10 @@ def _from_generated(cls, generated): return handle -class HandlesPaged(Paged): +class HandlesPaged(PageIterator): """An iterable of Handles. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. :ivar str next_marker: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available @@ -366,36 +363,34 @@ class HandlesPaged(Paged): :param callable command: Function to retrieve the next page of items. :param int results_per_page: The maximum number of share names to retrieve per call. - :param str marker: An opaque continuation token. + :param str continuation_token: An opaque continuation token. """ - def __init__(self, command, results_per_page=None, marker=None, **kwargs): - super(HandlesPaged, self).__init__(command, None) - self.current_marker = None + def __init__(self, command, results_per_page=None, continuation_token=None): + super(HandlesPaged, self).__init__( + get_next=self._get_next_cb, + extract_data=self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.location_mode = None + self.current_page = [] - def _advance_page(self): - """Force moving the cursor to the next azure call. - This method is for advanced usage, iterator protocol is prefered. - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( - marker=self.next_marker or None, + return self._command( + marker=continuation_token or None, maxresults=self.results_per_page, cls=return_context_and_deserialized, use_location=self.location_mode) except StorageErrorException as error: process_storage_error(error) + + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.current_page = [Handle._from_generated(h) for h in self._response.handle_list] # pylint: disable=protected-access - self.next_marker = self._response.next_marker or None - return self.current_page + return self._response.next_marker or None, self.current_page class DirectoryProperties(DictMixin): @@ -432,7 +427,7 @@ def _from_generated(cls, generated): return props -class DirectoryPropertiesPaged(Paged): +class DirectoryPropertiesPaged(PageIterator): """An iterable for the contents of a directory. This iterable will yield dicts for the contents of the directory. The dicts @@ -441,7 +436,7 @@ class DirectoryPropertiesPaged(Paged): :ivar str service_endpoint: The service URL. :ivar str prefix: A file name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. :ivar str next_marker: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available @@ -454,30 +449,26 @@ class DirectoryPropertiesPaged(Paged): begin with the specified prefix. :param int results_per_page: The maximum number of share names to retrieve per call. - :param str marker: An opaque continuation token. + :param str continuation_token: An opaque continuation token. """ - def __init__(self, command, prefix=None, results_per_page=None, marker=None, **kwargs): - super(DirectoryPropertiesPaged, self).__init__(command, None) + def __init__(self, command, prefix=None, results_per_page=None, continuation_token=None): + super(DirectoryPropertiesPaged, self).__init__( + get_next=self._get_next_cb, + extract_data=self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command self.service_endpoint = None self.prefix = prefix - self.current_marker = None + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.location_mode = None + self.current_page = [] - def _advance_page(self): - """Force moving the cursor to the next azure call. - This method is for advanced usage, iterator protocol is prefered. - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( - marker=self.next_marker or None, + return self._command( + marker=continuation_token or None, prefix=self.prefix, maxresults=self.results_per_page, cls=return_context_and_deserialized, @@ -485,14 +476,15 @@ def _advance_page(self): except StorageErrorException as error: process_storage_error(error) + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.service_endpoint = self._response.service_endpoint self.prefix = self._response.prefix - self.current_marker = self._response.marker + self.marker = self._response.marker self.results_per_page = self._response.max_results self.current_page = [_wrap_item(i) for i in self._response.segment.directory_items] self.current_page.extend([_wrap_item(i) for i in self._response.segment.file_items]) - self.next_marker = self._response.next_marker or None - return self.current_page + return self._response.next_marker or None, self.current_page class FileProperties(DictMixin): diff --git a/sdk/storage/azure-storage-file/tests/test_handle.py b/sdk/storage/azure-storage-file/tests/test_handle.py index 7fe3d3a5e3d4..220e71d679c2 100644 --- a/sdk/storage/azure-storage-file/tests/test_handle.py +++ b/sdk/storage/azure-storage-file/tests/test_handle.py @@ -114,20 +114,21 @@ def test_list_handles_with_marker(self): root = share.get_directory_client() # Act - handle_generator = root.list_handles(recursive=True, results_per_page=1) - next(handle_generator) + handle_generator = root.list_handles(recursive=True, results_per_page=1).by_page() + handles = list(next(handle_generator)) # Assert - self.assertIsNotNone(handle_generator.next_marker) - handles = handle_generator.current_page + self.assertIsNotNone(handle_generator.continuation_token) self._validate_handles(handles) # Note down a handle that we saw old_handle = handles[0] # Continue listing - remaining_handles = list( - root.list_handles(recursive=True, marker=handle_generator.next_marker)) + remaining_handles = list(next( + root.list_handles(recursive=True).by_page( + continuation_token=handle_generator.continuation_token) + )) self._validate_handles(handles) # Make sure the old handle did not appear diff --git a/sdk/storage/azure-storage-file/tests/test_share.py b/sdk/storage/azure-storage-file/tests/test_share.py index 4eabf312d3f4..cc134be6c710 100644 --- a/sdk/storage/azure-storage-file/tests/test_share.py +++ b/sdk/storage/azure-storage-file/tests/test_share.py @@ -341,14 +341,12 @@ def test_list_shares_with_num_results_and_marker(self): share_names.sort() # Act - generator1 = self.fsc.list_shares(prefix, results_per_page=2) - next(generator1) - generator2 = self.fsc.list_shares( - prefix, marker=generator1.next_marker, results_per_page=2) - next(generator2) + generator1 = self.fsc.list_shares(prefix, results_per_page=2).by_page() + shares1 = list(next(generator1)) - shares1 = generator1.current_page - shares2 = generator2.current_page + generator2 = self.fsc.list_shares( + prefix, results_per_page=2).by_page(continuation_token=generator1.continuation_token) + shares2 = list(next(generator2)) # Assert self.assertIsNotNone(shares1) @@ -606,14 +604,14 @@ def test_list_directories_and_files_with_num_results(self): root.upload_file('fileb1', '1024') # Act - result = share_name.list_directories_and_files(results_per_page=2) - next(result) + result = share_name.list_directories_and_files(results_per_page=2).by_page() + result = list(next(result)) # Assert self.assertIsNotNone(result) - self.assertEqual(len(result.current_page), 2) - self.assertNamedItemInContainer(result.current_page, 'dir1') - self.assertNamedItemInContainer(result.current_page, 'filea1') + self.assertEqual(len(result), 2) + self.assertNamedItemInContainer(result, 'dir1') + self.assertNamedItemInContainer(result, 'filea1') @record def test_list_directories_and_files_with_num_results_and_marker(self): @@ -627,14 +625,13 @@ def test_list_directories_and_files_with_num_results_and_marker(self): dir1.upload_file('fileb1', '1024') # Act - generator1 = share_name.list_directories_and_files('dir1', results_per_page=2) - next(generator1) - generator2 = share_name.list_directories_and_files( - 'dir1', marker=generator1.next_marker, results_per_page=2) - next(generator2) + generator1 = share_name.list_directories_and_files( + 'dir1', results_per_page=2).by_page() + result1 = list(next(generator1)) - result1 = generator1.current_page - result2 = generator2.current_page + generator2 = share_name.list_directories_and_files( + 'dir1', results_per_page=2).by_page(continuation_token=generator1.continuation_token) + result2 = list(next(generator2)) # Assert self.assertEqual(len(result1), 2) @@ -643,7 +640,7 @@ def test_list_directories_and_files_with_num_results_and_marker(self): self.assertNamedItemInContainer(result1, 'filea2') self.assertNamedItemInContainer(result2, 'filea3') self.assertNamedItemInContainer(result2, 'fileb1') - self.assertEqual(generator2.next_marker, None) + self.assertEqual(generator2.continuation_token, None) @record def test_list_directories_and_files_with_prefix(self): diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/models.py b/sdk/storage/azure-storage-queue/azure/storage/queue/models.py index 224508d959fc..eb8250e918f6 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/models.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/models.py @@ -7,7 +7,7 @@ # pylint: disable=super-init-not-called from typing import List # pylint: disable=unused-import -from azure.core.paging import Paged +from azure.core.paging import PageIterator from ._shared.utils import ( return_context_and_deserialized, process_storage_error) @@ -220,7 +220,7 @@ def _from_generated(cls, generated): return message -class MessagesPaged(Paged): +class MessagesPaged(PageIterator): """An iterable of Queue Messages. :ivar int results_per_page: The maximum number of results retrieved per API call. @@ -231,28 +231,28 @@ class MessagesPaged(Paged): :param int results_per_page: The maximum number of messages to retrieve per call. """ - def __init__(self, command, results_per_page=None): - super(MessagesPaged, self).__init__(command, None) + def __init__(self, command, results_per_page=None, continuation_token=None): + if continuation_token is not None: + raise ValueError("This operation does not support continuation token") + + super(MessagesPaged, self).__init__( + self._get_next_cb, + self._extract_data_cb, + ) + self._command = command self.results_per_page = results_per_page - def _advance_page(self): - """Force moving the cursor to the next azure call. - - This method is for advanced usage, iterator protocol is prefered. - - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - messages = self._get_next(number_of_messages=self.results_per_page) - if not messages: - raise StopIteration() + return self._command(number_of_messages=self.results_per_page) except StorageErrorException as error: process_storage_error(error) - self.current_page = [QueueMessage._from_generated(q) for q in messages] # pylint: disable=protected-access - return self.current_page + + def _extract_data_cb(self, messages): + # There is no concept of continuation token, so raising on my own condition + if not messages: + raise StopIteration("End of paging") + return "TOKEN_IGNORED", [QueueMessage._from_generated(q) for q in messages] # pylint: disable=protected-access class QueueProperties(DictMixin): @@ -280,12 +280,12 @@ def _from_generated(cls, generated): return props -class QueuePropertiesPaged(Paged): +class QueuePropertiesPaged(PageIterator): """An iterable of Queue properties. :ivar str service_endpoint: The service URL. :ivar str prefix: A queue name prefix being used to filter the list. - :ivar str current_marker: The continuation token of the current page of results. + :ivar str marker: The continuation token of the current page of results. :ivar int results_per_page: The maximum number of results retrieved per API call. :ivar str next_marker: The continuation token to retrieve the next page of results. :ivar str location_mode: The location mode being used to list results. The available @@ -298,44 +298,39 @@ class QueuePropertiesPaged(Paged): begin with the specified prefix. :param int results_per_page: The maximum number of queue names to retrieve per call. - :param str marker: An opaque continuation token. + :param str continuation_token: An opaque continuation token. """ - def __init__(self, command, prefix=None, results_per_page=None, marker=None): - super(QueuePropertiesPaged, self).__init__(command, None) + def __init__(self, command, prefix=None, results_per_page=None, continuation_token=None): + super(QueuePropertiesPaged, self).__init__( + self._get_next_cb, + self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command self.service_endpoint = None self.prefix = prefix - self.current_marker = None + self.marker = None self.results_per_page = results_per_page - self.next_marker = marker or "" self.location_mode = None - def _advance_page(self): - """Force moving the cursor to the next azure call. - - This method is for advanced usage, iterator protocol is prefered. - - :raises: StopIteration if no further page - :return: The current page list - :rtype: list - """ - if self.next_marker is None: - raise StopIteration("End of paging") - self._current_page_iter_index = 0 + def _get_next_cb(self, continuation_token): try: - self.location_mode, self._response = self._get_next( - marker=self.next_marker or None, + return self._command( + marker=continuation_token or None, maxresults=self.results_per_page, cls=return_context_and_deserialized, use_location=self.location_mode) except StorageErrorException as error: process_storage_error(error) + + def _extract_data_cb(self, get_next_return): + self.location_mode, self._response = get_next_return self.service_endpoint = self._response.service_endpoint self.prefix = self._response.prefix - self.current_marker = self._response.marker + self.marker = self._response.marker self.results_per_page = self._response.max_results - self.current_page = [QueueProperties._from_generated(q) for q in self._response.queue_items] # pylint: disable=protected-access - self.next_marker = self._response.next_marker or None - return self.current_page + + return self._response.next_marker or None, [QueueProperties._from_generated(q) for q in self._response.queue_items] # pylint: disable=protected-access class QueuePermissions(object): diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py index a8d58b638f73..ff780029de0c 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py @@ -16,6 +16,8 @@ import six +from azure.core.paging import ItemPaged + from ._shared.shared_access_signature import QueueSharedAccessSignature from ._shared.utils import ( StorageAccountHostsMixin, @@ -512,7 +514,7 @@ def enqueue_message( # type: ignore process_storage_error(error) def receive_messages(self, messages_per_page=None, visibility_timeout=None, timeout=None, **kwargs): # type: ignore - # type: (Optional[int], Optional[int], Optional[int], Optional[Any]) -> QueueMessage + # type: (Optional[int], Optional[int], Optional[int], Optional[Any]) -> ItemPaged[Message] """Removes one or more messages from the front of the queue. When a message is retrieved from the queue, the response includes the message @@ -540,7 +542,7 @@ def receive_messages(self, messages_per_page=None, visibility_timeout=None, time The server timeout, expressed in seconds. :return: Returns a message iterator of dict-like Message objects. - :rtype: ~azure.storage.queue.models.MessagesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.queue.models.Message] Example: .. literalinclude:: ../tests/test_queue_samples_message.py @@ -562,7 +564,7 @@ def receive_messages(self, messages_per_page=None, visibility_timeout=None, time cls=self._config.message_decode_policy, **kwargs ) - return MessagesPaged(command, results_per_page=messages_per_page) + return ItemPaged(command, results_per_page=messages_per_page, page_iterator_class=MessagesPaged) except StorageErrorException as error: process_storage_error(error) diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py index 41be25c1d6bf..1e7fca250953 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py @@ -13,6 +13,8 @@ except ImportError: from urlparse import urlparse # type: ignore +from azure.core.paging import ItemPaged + from ._shared.shared_access_signature import SharedAccessSignature from ._shared.models import LocationMode, Services from ._shared.utils import ( @@ -302,12 +304,11 @@ def set_service_properties( # type: ignore def list_queues( self, name_starts_with=None, # type: Optional[str] include_metadata=False, # type: Optional[bool] - marker=None, # type: Optional[str] results_per_page=None, # type: Optional[int] timeout=None, # type: Optional[int] **kwargs ): - # type: (...) -> QueuePropertiesPaged + # type: (...) -> ItemPaged[QueueProperties] """Returns a generator to list the queues under the specified account. The generator will lazily follow the continuation tokens returned by @@ -318,10 +319,6 @@ def list_queues( begin with the specified prefix. :param bool include_metadata: Specifies that queue metadata be returned in the response. - :param str marker: - An opaque continuation token. This value can be retrieved from the - next_marker field of a previous generator object. If specified, - this generator will begin returning results from this point. :param int results_per_page: The maximum number of queue names to retrieve per API call. If the request does not specify the server will return up to 5,000 items. @@ -330,7 +327,7 @@ def list_queues( calls to the service in which case the timeout value specified will be applied to each individual call. :returns: An iterable (auto-paging) of QueueProperties. - :rtype: ~azure.core.queue.models.QueuePropertiesPaged + :rtype: ~azure.core.paging.ItemPaged[~azure.core.queue.models.QueueProperties] Example: .. literalinclude:: ../tests/test_queue_samples_service.py @@ -347,8 +344,10 @@ def list_queues( include=include, timeout=timeout, **kwargs) - return QueuePropertiesPaged( - command, prefix=name_starts_with, results_per_page=results_per_page, marker=marker) + return ItemPaged( + command, prefix=name_starts_with, results_per_page=results_per_page, + page_iterator_class=QueuePropertiesPaged + ) def create_queue( self, name, # type: str @@ -357,7 +356,7 @@ def create_queue( **kwargs ): # type: (...) -> QueueClient - """Creates a new queue under the specified account. + """Creates a new queue under the specified account. If a queue with the same name already exists, the operation fails. Returns a client with which to interact with the newly created queue. diff --git a/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_delete_message.yaml b/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_delete_message.yaml index 51d38817ff39..7b9a2fe78803 100644 --- a/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_delete_message.yaml +++ b/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_delete_message.yaml @@ -2,1441 +2,246 @@ interactions: - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1b7a7e3a-952a-11e9-bd27-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49 - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - fd4a8222-9003-00c8-3c36-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1b9a01c6-952a-11e9-8b0c-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF442e2d59-b9ee-4fc1-b57f-1eede999ed26Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAAZ71f3TYp1QE=Sat,\ - \ 22 Jun 2019 20:12:49 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - fd4a822e-9003-00c8-4436-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1ba2cc3e-952a-11e9-84a6-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF4b1f4b61-a5c0-48fa-8473-231196864687Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAAayNo3TYp1QE=Sat,\ - \ 22 Jun 2019 20:12:49 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - fd4a8238-9003-00c8-4e36-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1bab46ca-952a-11e9-8a40-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFFbc529b8c-9f40-41ef-96f3-354cb25025b7Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAAkNdw3TYp1QE=Sat,\ - \ 22 Jun 2019 20:12:49 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - fd4a8241-9003-00c8-5536-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1bb3e9c6-952a-11e9-b2c0-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF635425fc-8557-4a2c-81fb-14a27d8b1c50Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAApmR53TYp1QE=Sat,\ - \ 22 Jun 2019 20:12:49 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - fd4a8249-9003-00c8-5c36-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1bbc4aba-952a-11e9-9d3a-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF442e2d59-b9ee-4fc1-b57f-1eede999ed26Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAAhkZj7zYp1QE=Sat,\ - \ 22 Jun 2019 20:13:19 GMT1message1" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - fd4a8253-9003-00c8-6536-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1bc4c398-952a-11e9-9d06-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: DELETE - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages/442e2d59-b9ee-4fc1-b57f-1eede999ed26?popreceipt=AgAAAAMAAAAAAAAAhkZj7zYp1QE%3D - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - fd4a825b-9003-00c8-6c36-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1bcd588c-952a-11e9-895b-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:49 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://remotestoragename.queue.core.windows.net/pythonqueuebf910c49/messages?numofmessages=32 - response: - body: - string: "\uFEFF4b1f4b61-a5c0-48fa-8473-231196864687Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAA16507zYp1QE=Sat,\ - \ 22 Jun 2019 20:13:19 GMT1message2bc529b8c-9f40-41ef-96f3-354cb25025b7Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAA16507zYp1QE=Sat,\ - \ 22 Jun 2019 20:13:19 GMT1message3635425fc-8557-4a2c-81fb-14a27d8b1c50Sat,\ - \ 22 Jun 2019 20:12:49 GMTSat, 29 Jun 2019\ - \ 20:12:49 GMTAgAAAAMAAAAAAAAA16507zYp1QE=Sat,\ - \ 22 Jun 2019 20:13:19 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:49 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - fd4a8261-9003-00c8-7236-29f537000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dcd5898c-952a-11e9-806a-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:13 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49 - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 0b5f410d-2003-0070-7d37-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dcf60022-952a-11e9-954d-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:13 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF1208b99d-12bd-4073-a3c8-9b0ad6bfdf33Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAASC69njcp1QE=Sat,\ - \ 22 Jun 2019 20:18:14 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 0b5f411d-2003-0070-0a37-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dcff4f9c-952a-11e9-83d3-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF3de1106c-a4cf-4a5f-a7dc-d5f70ad5c8b0Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAAzn7Gnjcp1QE=Sat,\ - \ 22 Jun 2019 20:18:14 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 0b5f412a-2003-0070-1637-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dd08b014-952a-11e9-aee4-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF4ec3ee4b-b0f3-48e9-a5d1-8b7fc1e2180aSat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAA+DLPnjcp1QE=Sat,\ - \ 22 Jun 2019 20:18:14 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 0b5f4137-2003-0070-1f37-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dd11436e-952a-11e9-8240-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFFea4ee1a4-2c09-42d5-bad1-210be95e91c7Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAATzXYnjcp1QE=Sat,\ - \ 22 Jun 2019 20:18:14 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 0b5f4149-2003-0070-2e37-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dd1a7bd2-952a-11e9-95d1-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF1208b99d-12bd-4073-a3c8-9b0ad6bfdf33Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAAkLPCsDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:44 GMT1message1" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:13 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 0b5f4151-2003-0070-3637-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dd23aae8-952a-11e9-b0bf-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: DELETE - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages/1208b99d-12bd-4073-a3c8-9b0ad6bfdf33?popreceipt=AgAAAAMAAAAAAAAAkLPCsDcp1QE%3D - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:18:14 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 0b5f4164-2003-0070-4737-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - dd2c7de6-952a-11e9-9262-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:14 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages?numofmessages=32 - response: - body: - string: "\uFEFF3de1106c-a4cf-4a5f-a7dc-d5f70ad5c8b0Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAAV9/UsDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:44 GMT1message24ec3ee4b-b0f3-48e9-a5d1-8b7fc1e2180aSat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAAV9/UsDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:44 GMT1message3ea4ee1a4-2c09-42d5-bad1-210be95e91c7Sat,\ - \ 22 Jun 2019 20:18:14 GMTSat, 29 Jun 2019\ - \ 20:18:14 GMTAgAAAAMAAAAAAAAAV9/UsDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:44 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:14 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 0b5f4172-2003-0070-5337-2917c4000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 740b52d2-952b-11e9-9d3a-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b7b05c9c-ad96-11e9-ab10-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:44 GMT'] + x-ms-version: ['2018-03-28'] method: PUT uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49 response: - body: - string: '' + body: {string: ''} headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:22:26 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - f5f43da9-6003-0099-3638-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Length: ['0'] + Date: ['Tue, 23 Jul 2019 22:10:44 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [b462afff-6003-00dd-0ba3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message1' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 742c9034-952b-11e9-95de-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b81371ae-ad96-11e9-923b-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages response: - body: - string: "\uFEFF193f415e-aabc-46e0-9209-48d6f7dad682Sat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAxCb0NTgp1QE=Sat,\ - \ 22 Jun 2019 20:22:27 GMT" + body: {string: "\uFEFF8c67a6da-dc58-453c-a32c-2357250782d6Tue, + 23 Jul 2019 22:10:45 GMTTue, 30 Jul 2019 22:10:45 + GMTAgAAAAMAAAAAAAAASa7peaNB1QE=Tue, + 23 Jul 2019 22:10:45 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:26 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - f5f43db1-6003-0099-3a38-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [b462b023-6003-00dd-25a3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message2' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 7435d566-952b-11e9-a739-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b82af13e-ad96-11e9-89e9-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages response: - body: - string: "\uFEFF5b8f5b8c-25ca-42c2-a759-8feeba150f7cSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAGyn9NTgp1QE=Sat,\ - \ 22 Jun 2019 20:22:27 GMT" + body: {string: "\uFEFF53352c13-0ace-4405-a299-848592033386Tue, + 23 Jul 2019 22:10:45 GMTTue, 30 Jul 2019 22:10:45 + GMTAgAAAAMAAAAAAAAA9DX/eaNB1QE=Tue, + 23 Jul 2019 22:10:45 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:26 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - f5f43db7-6003-0099-3f38-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [b462b041-6003-00dd-3fa3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message3' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 743eee58-952b-11e9-8745-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b84060c8-ad96-11e9-89c5-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages response: - body: - string: "\uFEFFd867e71b-a641-4b87-b534-4659d5016cfdSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAcysGNjgp1QE=Sat,\ - \ 22 Jun 2019 20:22:27 GMT" + body: {string: "\uFEFF831f51e4-bdae-46c9-8085-7eb7ddf44022Tue, + 23 Jul 2019 22:10:46 GMTTue, 30 Jul 2019 22:10:46 + GMTAgAAAAMAAAAAAAAAow8TeqNB1QE=Tue, + 23 Jul 2019 22:10:46 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:26 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - f5f43dba-6003-0099-4238-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [b462b055-6003-00dd-51a3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message4' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 74482aa4-952b-11e9-9902-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b85423be-ad96-11e9-ad5e-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:46 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages response: - body: - string: "\uFEFF1cafa96b-c8b4-41b7-8dcf-407fffd8661cSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAA+XsPNjgp1QE=Sat,\ - \ 22 Jun 2019 20:22:27 GMT" + body: {string: "\uFEFF415e7230-45f9-423d-9090-b53936c23314Tue, + 23 Jul 2019 22:10:46 GMTTue, 30 Jul 2019 22:10:46 + GMTAgAAAAMAAAAAAAAAfeUoeqNB1QE=Tue, + 23 Jul 2019 22:10:46 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:26 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - f5f43dbe-6003-0099-4538-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [b462b073-6003-00dd-67a3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: null headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 74515192-952b-11e9-be15-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b86961c6-ad96-11e9-9926-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:46 GMT'] + x-ms-version: ['2018-03-28'] method: GET uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages response: - body: - string: "\uFEFF193f415e-aabc-46e0-9209-48d6f7dad682Sat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAl5b6Rzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:57 GMT1message1" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:27 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - f5f43dbf-6003-0099-4638-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 745b1524-952b-11e9-b3c4-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:27 GMT - x-ms-version: - - '2018-03-28' + body: {string: "\uFEFF8c67a6da-dc58-453c-a32c-2357250782d6Tue, + 23 Jul 2019 22:10:45 GMTTue, 30 Jul 2019 22:10:45 + GMTAgAAAAMAAAAAAAAAA7gajKNB1QE=Tue, + 23 Jul 2019 22:11:16 GMT1message1"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + Vary: [Origin] + x-ms-request-id: [b462b090-6003-00dd-7ca3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b879b574-ad96-11e9-8ec6-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:46 GMT'] + x-ms-version: ['2018-03-28'] method: DELETE - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages/193f415e-aabc-46e0-9209-48d6f7dad682?popreceipt=AgAAAAMAAAAAAAAAl5b6Rzgp1QE%3D + uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages/8c67a6da-dc58-453c-a32c-2357250782d6?popreceipt=AgAAAAMAAAAAAAAAA7gajKNB1QE%3D response: - body: - string: '' + body: {string: ''} headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:22:27 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - f5f43dc3-6003-0099-4a38-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 204 - message: No Content + Content-Length: ['0'] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [b462b0b7-6003-00dd-1ba3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 204, message: No Content} - request: body: null headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 74643122-952b-11e9-b8fb-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:28 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b88a0908-ad96-11e9-9586-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:46 GMT'] + x-ms-version: ['2018-03-28'] method: GET uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages?numofmessages=32 response: - body: - string: "\uFEFF5b8f5b8c-25ca-42c2-a759-8feeba150f7cSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAul4NSDgp1QE=Sat,\ - \ 22 Jun 2019 20:22:58 GMT1message2d867e71b-a641-4b87-b534-4659d5016cfdSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAul4NSDgp1QE=Sat,\ - \ 22 Jun 2019 20:22:58 GMT1message31cafa96b-c8b4-41b7-8dcf-407fffd8661cSat,\ - \ 22 Jun 2019 20:22:27 GMTSat, 29 Jun 2019\ - \ 20:22:27 GMTAgAAAAMAAAAAAAAAul4NSDgp1QE=Sat,\ - \ 22 Jun 2019 20:22:58 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:27 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - f5f43dc5-6003-0099-4c38-29ebc2000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - aee1db86-952d-11e9-9f94-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49 - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 24506b4c-4003-00ca-6e3a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af02a3ac-952d-11e9-bdc7-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF914e12cd-da29-4d7f-828a-393828adfbbeSat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAeuTKcDop1QE=Sat,\ - \ 22 Jun 2019 20:38:25 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 24506b5e-4003-00ca-7e3a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af0bd666-952d-11e9-a81d-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFFcd560872-1500-4081-9887-44a67792f515Sat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAzubTcDop1QE=Sat,\ - \ 22 Jun 2019 20:38:25 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 24506b71-4003-00ca-103a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af14a5f4-952d-11e9-bfa3-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFFa047b162-8bd6-4ca3-8393-245d7af6dd90Sat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAA3HPccDop1QE=Sat,\ - \ 22 Jun 2019 20:38:25 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 24506b7f-4003-00ca-1d3a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af1d518c-952d-11e9-bc94-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFFcb60022d-89e1-4c86-afdb-627d48e3250fSat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAAijlcDop1QE=Sat,\ - \ 22 Jun 2019 20:38:25 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 24506b9c-4003-00ca-363a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af261bca-952d-11e9-8a6d-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages - response: - body: - string: "\uFEFF914e12cd-da29-4d7f-828a-393828adfbbeSat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAVs3Pgjop1QE=Sat,\ - \ 22 Jun 2019 20:38:55 GMT1message1" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 24506baa-4003-00ca-443a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af2f5190-952d-11e9-a222-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' - method: DELETE - uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages/914e12cd-da29-4d7f-828a-393828adfbbe?popreceipt=AgAAAAMAAAAAAAAAVs3Pgjop1QE%3D - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 24506bc9-4003-00ca-5e3a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - af389908-952d-11e9-9591-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:25 GMT - x-ms-version: - - '2018-03-28' + body: {string: "\uFEFF53352c13-0ace-4405-a299-848592033386Tue, + 23 Jul 2019 22:10:45 GMTTue, 30 Jul 2019 22:10:45 + GMTAgAAAAMAAAAAAAAAl689jKNB1QE=Tue, + 23 Jul 2019 22:11:16 GMT1message2831f51e4-bdae-46c9-8085-7eb7ddf44022Tue, + 23 Jul 2019 22:10:46 GMTTue, 30 Jul 2019 22:10:46 + GMTAgAAAAMAAAAAAAAAl689jKNB1QE=Tue, + 23 Jul 2019 22:11:16 GMT1message3415e7230-45f9-423d-9090-b53936c23314Tue, + 23 Jul 2019 22:10:46 GMTTue, 30 Jul 2019 22:10:46 + GMTAgAAAAMAAAAAAAAAl689jKNB1QE=Tue, + 23 Jul 2019 22:11:16 GMT1message4"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + Vary: [Origin] + x-ms-request-id: [b462b0e0-6003-00dd-3da3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [b89de61a-ad96-11e9-94f2-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 22:10:46 GMT'] + x-ms-version: ['2018-03-28'] method: GET uri: https://storagename.queue.core.windows.net/pythonqueuebf910c49/messages?numofmessages=32 response: - body: - string: "\uFEFFcd560872-1500-4081-9887-44a67792f515Sat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAX27igjop1QE=Sat,\ - \ 22 Jun 2019 20:38:55 GMT1message2a047b162-8bd6-4ca3-8393-245d7af6dd90Sat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAX27igjop1QE=Sat,\ - \ 22 Jun 2019 20:38:55 GMT1message3cb60022d-89e1-4c86-afdb-627d48e3250fSat,\ - \ 22 Jun 2019 20:38:25 GMTSat, 29 Jun 2019\ - \ 20:38:25 GMTAgAAAAMAAAAAAAAAX27igjop1QE=Sat,\ - \ 22 Jun 2019 20:38:55 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:24 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 24506bd7-4003-00ca-6b3a-29f7cd000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK + body: {string: "\uFEFF"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 22:10:45 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + Vary: [Origin] + x-ms-request-id: [b462b112-6003-00dd-66a3-4137ae000000] + x-ms-version: ['2018-03-28'] + status: {code: 200, message: OK} version: 1 diff --git a/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_get_messages_with_options.yaml b/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_get_messages_with_options.yaml index 4f79ec258033..cb18246850ef 100644 --- a/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_get_messages_with_options.yaml +++ b/sdk/storage/azure-storage-queue/tests/recordings/test_queue.test_get_messages_with_options.yaml @@ -2,1121 +2,200 @@ interactions: - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1cb5f240-952a-11e9-8690-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 4ce61f8f-6003-0033-1436-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1cdbdadc-952a-11e9-908b-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFc07a14fe-0248-49ac-84ef-9183eec8c1f9Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAyXih3jYp1QE=Sat,\ - \ 22 Jun 2019 20:12:51 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 4ce61f99-6003-0033-1b36-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1ce4762e-952a-11e9-9f63-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF8c47bcca-e16f-4b92-92b1-15e94379eb52Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAwd6p3jYp1QE=Sat,\ - \ 22 Jun 2019 20:12:51 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 4ce61f9a-6003-0033-1c36-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1cecec34-952a-11e9-a5e2-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFee5ab552-39a9-40a8-ad63-d94e3b486906Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAtESy3jYp1QE=Sat,\ - \ 22 Jun 2019 20:12:51 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 4ce61f9f-6003-0033-2136-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1cf568ee-952a-11e9-bb36-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFd1646c72-1aa6-423b-a070-0cfc5d649668Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAmYO63jYp1QE=Sat,\ - \ 22 Jun 2019 20:12:51 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 4ce61fab-6003-0033-2c36-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 1cfd9dfa-952a-11e9-896e-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:12:51 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://remotestoragename.queue.core.windows.net/pythonqueue6405110f/messages?numofmessages=4&visibilitytimeout=20 - response: - body: - string: "\uFEFFc07a14fe-0248-49ac-84ef-9183eec8c1f9Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAkquu6jYp1QE=Sat,\ - \ 22 Jun 2019 20:13:11 GMT1message18c47bcca-e16f-4b92-92b1-15e94379eb52Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAkquu6jYp1QE=Sat,\ - \ 22 Jun 2019 20:13:11 GMT1message2ee5ab552-39a9-40a8-ad63-d94e3b486906Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAkquu6jYp1QE=Sat,\ - \ 22 Jun 2019 20:13:11 GMT1message3d1646c72-1aa6-423b-a070-0cfc5d649668Sat,\ - \ 22 Jun 2019 20:12:51 GMTSat, 29 Jun 2019\ - \ 20:12:51 GMTAgAAAAMAAAAAAAAAkquu6jYp1QE=Sat,\ - \ 22 Jun 2019 20:13:11 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:12:51 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 4ce61fb4-6003-0033-3536-293d2d000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de5c3670-952a-11e9-837b-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [eb8b0f92-ad90-11e9-ad43-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + x-ms-version: ['2018-03-28'] method: PUT uri: https://storagename.queue.core.windows.net/pythonqueue6405110f response: - body: - string: '' + body: {string: ''} headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:18:15 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - e1a897ac-1003-0073-2a37-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Length: ['0'] + Date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [ab763224-9003-000f-719d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message1' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de7c09d2-952a-11e9-a68c-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ebe04322-ad90-11e9-90d1-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages response: - body: - string: "\uFEFF4a3e7e24-0f9b-488d-a93e-8f6c52511bd4Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAG91CoDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:16 GMT" + body: {string: "\uFEFF1aea519c-55e7-4613-a635-11e894f3f1cdTue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAiP6wrZ1B1QE=Tue, + 23 Jul 2019 21:29:15 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:16 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - e1a897b4-1003-0073-2e37-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [ab763242-9003-000f-099d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message2' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de8504a6-952a-11e9-b42e-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ebf1ec6c-ad90-11e9-a1a9-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages response: - body: - string: "\uFEFF6382f360-4bb2-4635-bbb0-0a2bdb1bc21bSat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAhwZMoDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:16 GMT" + body: {string: "\uFEFFfcc1b957-6743-4cd8-9a37-561f4e76a694Tue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAtJHArZ1B1QE=Tue, + 23 Jul 2019 21:29:15 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:16 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - e1a897bc-1003-0073-3337-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [ab76324f-9003-000f-159d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message3' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de8e1458-952a-11e9-8ed7-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ec017d92-ad90-11e9-9118-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages response: - body: - string: "\uFEFF4aa83d39-8722-46ab-a654-897fc8ff05b4Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAxOFUoDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:16 GMT" + body: {string: "\uFEFFb6cf0c16-2d49-40fc-93bb-29e45e32ec5bTue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAbA/RrZ1B1QE=Tue, + 23 Jul 2019 21:29:15 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:16 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - e1a897c8-1003-0073-3a37-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [ab76325c-9003-000f-209d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: ' message4' headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de96f262-952a-11e9-b5f5-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/xml; charset=utf-8] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ec129446-ad90-11e9-9a37-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + x-ms-version: ['2018-03-28'] method: POST uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages response: - body: - string: "\uFEFF5425bc84-4683-47e1-bfe0-f38ddb517178Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAA6ZVdoDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:16 GMT" + body: {string: "\uFEFFee1fb3f0-9d97-49bf-87d6-46e6403847cfTue, + 23 Jul 2019 21:29:16 GMTTue, 30 Jul 2019 21:29:16 + GMTAgAAAAMAAAAAAAAAwPDgrZ1B1QE=Tue, + 23 Jul 2019 21:29:16 GMT"} headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:16 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - e1a897cf-1003-0073-3f37-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:15 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + x-ms-request-id: [ab76326e-9003-000f-309d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 201, message: Created} - request: body: null headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - de9f9886-952a-11e9-bd95-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:18:16 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ec21afd2-ad90-11e9-b00f-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:16 GMT'] + x-ms-version: ['2018-03-28'] method: GET uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages?numofmessages=4&visibilitytimeout=20 response: - body: - string: "\uFEFF4a3e7e24-0f9b-488d-a93e-8f6c52511bd4Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAVYFSrDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:36 GMT1message16382f360-4bb2-4635-bbb0-0a2bdb1bc21bSat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAVYFSrDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:36 GMT1message24aa83d39-8722-46ab-a654-897fc8ff05b4Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAVYFSrDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:36 GMT1message35425bc84-4683-47e1-bfe0-f38ddb517178Sat,\ - \ 22 Jun 2019 20:18:16 GMTSat, 29 Jun 2019\ - \ 20:18:16 GMTAgAAAAMAAAAAAAAAVYFSrDcp1QE=Sat,\ - \ 22 Jun 2019 20:18:36 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:18:16 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - e1a897d5-1003-0073-4437-2914c3000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK + body: {string: "\uFEFF1aea519c-55e7-4613-a635-11e894f3f1cdTue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAXQnduZ1B1QE=Tue, + 23 Jul 2019 21:29:36 GMT1message1fcc1b957-6743-4cd8-9a37-561f4e76a694Tue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAXQnduZ1B1QE=Tue, + 23 Jul 2019 21:29:36 GMT1message2b6cf0c16-2d49-40fc-93bb-29e45e32ec5bTue, + 23 Jul 2019 21:29:15 GMTTue, 30 Jul 2019 21:29:15 + GMTAgAAAAMAAAAAAAAAXQnduZ1B1QE=Tue, + 23 Jul 2019 21:29:36 GMT1message3ee1fb3f0-9d97-49bf-87d6-46e6403847cfTue, + 23 Jul 2019 21:29:16 GMTTue, 30 Jul 2019 21:29:16 + GMTAgAAAAMAAAAAAAAAXQnduZ1B1QE=Tue, + 23 Jul 2019 21:29:36 GMT1message4"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:16 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + Vary: [Origin] + x-ms-request-id: [ab763281-9003-000f-3f9d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 200, message: OK} - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 75ccf3fa-952b-11e9-aff5-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - 7df02fa6-3003-00ec-1538-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 75ed5910-952b-11e9-be2b-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF75b37bc0-c7e6-48e8-9ce3-94d914932dabSat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAqu20Nzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:30 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 7df02faf-3003-00ec-1b38-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 75f69162-952b-11e9-bff9-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFf4e91262-01c6-48ae-bc09-7af40ee60c6bSat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAA58i9Nzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:30 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 7df02fb3-3003-00ec-1f38-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 75ff663a-952b-11e9-adab-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF7001b035-8d54-406a-82b5-69753b3448e6Sat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAADX3GNzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:30 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 7df02fba-3003-00ec-2638-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 76087c36-952b-11e9-9eae-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF1ab76e0f-1d96-42d7-999c-3accd5230ee2Sat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAYX/PNzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:30 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - 7df02fbd-3003-00ec-2938-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - 76115afe-952b-11e9-8512-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:22:30 GMT - x-ms-version: - - '2018-03-28' + Accept: [application/xml] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [azsdk-python-storage-queue/12.0.0b1 Python/3.7.0 (Windows-10-10.0.18362-SP0)] + x-ms-client-request-id: [ec33efd0-ad90-11e9-a453-ecb1d756380e] + x-ms-date: ['Tue, 23 Jul 2019 21:29:16 GMT'] + x-ms-version: ['2018-03-28'] method: GET uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages?numofmessages=4&visibilitytimeout=20 response: - body: - string: "\uFEFF75b37bc0-c7e6-48e8-9ce3-94d914932dabSat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAtUPEQzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:50 GMT1message1f4e91262-01c6-48ae-bc09-7af40ee60c6bSat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAtUPEQzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:50 GMT1message27001b035-8d54-406a-82b5-69753b3448e6Sat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAtUPEQzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:50 GMT1message31ab76e0f-1d96-42d7-999c-3accd5230ee2Sat,\ - \ 22 Jun 2019 20:22:30 GMTSat, 29 Jun 2019\ - \ 20:22:30 GMTAgAAAAMAAAAAAAAAtUPEQzgp1QE=Sat,\ - \ 22 Jun 2019 20:22:50 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:22:29 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - 7df02fc2-3003-00ec-2e38-296c79000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b0efd498-952d-11e9-a770-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:28 GMT - x-ms-version: - - '2018-03-28' - method: PUT - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f - response: - body: - string: '' - headers: - Content-Length: - - '0' - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: - - abd1b919-4003-0006-193a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message1' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b11061ac-952d-11e9-b8b8-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:28 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFe2a1644d-981b-4c48-8b4c-fc8b539037f3Sat,\ - \ 22 Jun 2019 20:38:28 GMTSat, 29 Jun 2019\ - \ 20:38:28 GMTAgAAAAMAAAAAAAAA2cfYcjop1QE=Sat,\ - \ 22 Jun 2019 20:38:28 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - abd1b924-4003-0006-213a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message2' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b1198976-952d-11e9-a7a0-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:28 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF26981b56-716f-4f72-af1e-301773a26c92Sat,\ - \ 22 Jun 2019 20:38:28 GMTSat, 29 Jun 2019\ - \ 20:38:28 GMTAgAAAAMAAAAAAAAAAnzhcjop1QE=Sat,\ - \ 22 Jun 2019 20:38:28 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - abd1b929-4003-0006-263a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message3' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b1222c70-952d-11e9-ab5a-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:28 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFFdebf68ee-14a5-4669-a34b-3e8092fe04a1Sat,\ - \ 22 Jun 2019 20:38:29 GMTSat, 29 Jun 2019\ - \ 20:38:29 GMTAgAAAAMAAAAAAAAAQ1fqcjop1QE=Sat,\ - \ 22 Jun 2019 20:38:29 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - abd1b932-4003-0006-2d3a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: ' - - message4' - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '103' - Content-Type: - - application/xml; charset=utf-8 - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b12b1240-952d-11e9-afa4-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:28 GMT - x-ms-version: - - '2018-03-28' - method: POST - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages - response: - body: - string: "\uFEFF103e9ae6-f20c-4d69-aede-b0d740fba873Sat,\ - \ 22 Jun 2019 20:38:29 GMTSat, 29 Jun 2019\ - \ 20:38:29 GMTAgAAAAMAAAAAAAAA+PXzcjop1QE=Sat,\ - \ 22 Jun 2019 20:38:29 GMT" - headers: - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - x-ms-request-id: - - abd1b93b-4003-0006-343a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.5 (Darwin-16.7.0-x86_64-i386-64bit) azure-core/0.0.1 - x-ms-client-request-id: - - b134a7ec-952d-11e9-a776-f45c89a7d159 - x-ms-date: - - Sat, 22 Jun 2019 20:38:29 GMT - x-ms-version: - - '2018-03-28' - method: GET - uri: https://storagename.queue.core.windows.net/pythonqueue6405110f/messages?numofmessages=4&visibilitytimeout=20 - response: - body: - string: "\uFEFFe2a1644d-981b-4c48-8b4c-fc8b539037f3Sat,\ - \ 22 Jun 2019 20:38:28 GMTSat, 29 Jun 2019\ - \ 20:38:28 GMTAgAAAAMAAAAAAAAAIWzofjop1QE=Sat,\ - \ 22 Jun 2019 20:38:49 GMT1message126981b56-716f-4f72-af1e-301773a26c92Sat,\ - \ 22 Jun 2019 20:38:28 GMTSat, 29 Jun 2019\ - \ 20:38:28 GMTAgAAAAMAAAAAAAAAIWzofjop1QE=Sat,\ - \ 22 Jun 2019 20:38:49 GMT1message2debf68ee-14a5-4669-a34b-3e8092fe04a1Sat,\ - \ 22 Jun 2019 20:38:29 GMTSat, 29 Jun 2019\ - \ 20:38:29 GMTAgAAAAMAAAAAAAAAIWzofjop1QE=Sat,\ - \ 22 Jun 2019 20:38:49 GMT1message3103e9ae6-f20c-4d69-aede-b0d740fba873Sat,\ - \ 22 Jun 2019 20:38:29 GMTSat, 29 Jun 2019\ - \ 20:38:29 GMTAgAAAAMAAAAAAAAAIWzofjop1QE=Sat,\ - \ 22 Jun 2019 20:38:49 GMT1message4" - headers: - Cache-Control: - - no-cache - Content-Type: - - application/xml - Date: - - Sat, 22 Jun 2019 20:38:28 GMT - Server: - - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 - Transfer-Encoding: - - chunked - Vary: - - Origin - x-ms-request-id: - - abd1b940-4003-0006-383a-299378000000 - x-ms-version: - - '2018-03-28' - status: - code: 200 - message: OK + body: {string: "\uFEFF"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/xml] + Date: ['Tue, 23 Jul 2019 21:29:16 GMT'] + Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + Transfer-Encoding: [chunked] + Vary: [Origin] + x-ms-request-id: [ab763289-9003-000f-479d-4189f6000000] + x-ms-version: ['2018-03-28'] + status: {code: 200, message: OK} version: 1 diff --git a/sdk/storage/azure-storage-queue/tests/test_queue.py b/sdk/storage/azure-storage-queue/tests/test_queue.py index 8df7fc472476..1aa1e14536ba 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue.py @@ -158,16 +158,13 @@ def test_list_queues_with_options(self): # Action generator1 = self.qsc.list_queues( name_starts_with=prefix, - results_per_page=3) - next(generator1) - queues1 = generator1.current_page + results_per_page=3).by_page() + queues1 = list(next(generator1)) generator2 = self.qsc.list_queues( name_starts_with=prefix, - marker=generator1.next_marker, - include_metadata=True) - next(generator2) - queues2 = generator2.current_page + include_metadata=True).by_page(generator1.continuation_token) + queues2 = list(next(generator2)) # Asserts self.assertIsNotNone(queues1) @@ -175,6 +172,7 @@ def test_list_queues_with_options(self): self.assertIsNotNone(queues1[0]) self.assertIsNone(queues1[0].metadata) self.assertNotEqual('', queues1[0].name) + assert generator1.location_mode is not None # Asserts self.assertIsNotNone(queues2) self.assertTrue(len(self.test_queues) - 3 <= len(queues2)) @@ -317,14 +315,14 @@ def test_get_messages_with_options(self): queue_client.enqueue_message(u'message2') queue_client.enqueue_message(u'message3') queue_client.enqueue_message(u'message4') - result = queue_client.receive_messages(messages_per_page=4, visibility_timeout=20) - next(result) + pager = queue_client.receive_messages(messages_per_page=4, visibility_timeout=20) + result = list(pager) # Asserts self.assertIsNotNone(result) - self.assertEqual(4, len(result.current_page)) + self.assertEqual(4, len(result)) - for message in result.current_page: + for message in result: self.assertIsNotNone(message) self.assertNotEqual('', message.id) self.assertNotEqual('', message.content) @@ -406,12 +404,12 @@ def test_delete_message(self): message = next(queue_client.receive_messages()) queue_client.delete_message(message) - messages = queue_client.receive_messages(messages_per_page=32) - next(messages) + messages_pager = queue_client.receive_messages(messages_per_page=32) + messages = list(messages_pager) # Asserts - self.assertIsNotNone(messages) - self.assertEqual(3, len(messages.current_page)) + assert messages is not None + assert len(messages) == 3 @record def test_update_message(self): From 7a25e0569b25dab9abfa75adb49d5a99b5a9d49a Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 15:48:49 -0700 Subject: [PATCH 140/244] get rid of should only propagate (#6497) --- .../pipeline/policies/distributed_tracing.py | 8 +----- sdk/core/azure-core/azure/core/settings.py | 4 --- .../azure-core/azure/core/tracing/common.py | 7 ----- .../azure/core/tracing/decorator.py | 2 +- .../azure/core/tracing/decorator_async.py | 2 +- .../test_tracing_decorator_async.py | 20 -------------- sdk/core/azure-core/tests/test_settings.py | 6 ++--- .../tests/test_tracing_decorator.py | 27 ------------------- .../azure-core/tests/test_tracing_policy.py | 6 +++-- sdk/core/azure-core/tests/tracing_common.py | 6 +---- 10 files changed, 10 insertions(+), 78 deletions(-) diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/distributed_tracing.py b/sdk/core/azure-core/azure/core/pipeline/policies/distributed_tracing.py index 229b7d4380b5..ee6c1a36109f 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/distributed_tracing.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/distributed_tracing.py @@ -77,11 +77,6 @@ def on_request(self, request): if parent_span is None: return - only_propagate = settings.tracing_should_only_propagate() - if only_propagate: - self.set_header(request, parent_span) - return - path = urlparse(request.http_request.url).path if not path: path = "/" @@ -96,8 +91,7 @@ def end_span(self, request, response=None): # type: (HttpRequest, Optional[HttpResponse]) -> None """Ends the span that is tracing the network and updates its status.""" span = tracing_context.current_span.get() # type: AbstractSpan - only_propagate = settings.tracing_should_only_propagate() - if span and not only_propagate: + if span is not None: span.set_http_attributes(request, response=response) request_id = request.headers.get(self._request_id) if request_id is not None: diff --git a/sdk/core/azure-core/azure/core/settings.py b/sdk/core/azure-core/azure/core/settings.py index e1b4c738cdb8..6bc71c9e850c 100644 --- a/sdk/core/azure-core/azure/core/settings.py +++ b/sdk/core/azure-core/azure/core/settings.py @@ -410,9 +410,5 @@ def _config(self, props): # pylint: disable=no-self-use "tracing_implementation", env_var="AZURE_SDK_TRACING_IMPLEMENTATION", convert=convert_tracing_impl, default=None ) - tracing_should_only_propagate = PrioritizedSetting( - "tracing_should_only_propagate", env_var="AZURE_TRACING_ONLY_PROPAGATE", convert=convert_bool, default=False - ) - settings = Settings() diff --git a/sdk/core/azure-core/azure/core/tracing/common.py b/sdk/core/azure-core/azure/core/tracing/common.py index f6e4716a2eb8..b0e425a14d10 100644 --- a/sdk/core/azure-core/azure/core/tracing/common.py +++ b/sdk/core/azure-core/azure/core/tracing/common.py @@ -83,10 +83,3 @@ def get_parent_span(parent_span): ) return parent_span - - -def should_use_trace(parent_span): - # type: (AbstractSpan) -> bool - """Given Parent Span Returns whether the function should be traced""" - only_propagate = settings.tracing_should_only_propagate() - return bool(parent_span and not only_propagate) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 9f647f3333c4..7d5d7bfce407 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if common.should_use_trace(parent_span): + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 1440f86525e2..781e20a6bef2 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if common.should_use_trace(parent_span): + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index 7fb903037d80..8b43ddf71a62 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -149,23 +149,3 @@ async def test_span_with_opencensus_complicated(value): assert parent.children[3].children[1].span_data.name == "MockClient.make_request" children = parent.children[1].children assert len(children) == 2 - - -@pytest.mark.asyncio -async def test_should_only_propagate(): - with ContextHelper(should_only_propagate=True): - exporter = MockExporter() - trace = tracer_module.Tracer(sampler=AlwaysOnSampler(), exporter=exporter) - with trace.start_span(name="OverAll") as parent: - client = MockClient() - await client.make_request(2) - with trace.span("child") as child: - await client.make_request(2, parent_span=parent) - assert OpenCensusSpan.get_current_span() == child - await client.make_request(2) - trace.finish() - exporter.build_tree() - parent = exporter.root - assert len(parent.children) == 1 - assert parent.children[0].span_data.name == "child" - assert not parent.children[0].children diff --git a/sdk/core/azure-core/tests/test_settings.py b/sdk/core/azure-core/tests/test_settings.py index 11e9dc48d523..1975c1adc6f3 100644 --- a/sdk/core/azure-core/tests/test_settings.py +++ b/sdk/core/azure-core/tests/test_settings.py @@ -217,20 +217,18 @@ def test_defaults(self): val = m.settings.defaults # assert isinstance(val, tuple) defaults = m.settings.config( - log_level=20, tracing_enabled=False, tracing_implementation=None, tracing_should_only_propagate=False + log_level=20, tracing_enabled=False, tracing_implementation=None ) assert val.log_level == defaults.log_level assert val.tracing_enabled == defaults.tracing_enabled assert val.tracing_implementation == defaults.tracing_implementation - assert val.tracing_should_only_propagate == defaults.tracing_should_only_propagate os.environ["AZURE_LOG_LEVEL"] = "debug" defaults = m.settings.config( - log_level=20, tracing_enabled=False, tracing_implementation=None, tracing_should_only_propagate=False + log_level=20, tracing_enabled=False, tracing_implementation=None ) assert val.log_level == defaults.log_level assert val.tracing_enabled == defaults.tracing_enabled assert val.tracing_implementation == defaults.tracing_implementation - assert val.tracing_should_only_propagate == defaults.tracing_should_only_propagate del os.environ["AZURE_LOG_LEVEL"] def test_current(self): diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index 873871f5b222..473060f6097a 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -105,15 +105,6 @@ def test_get_parent_span(self): should_be_old_parent = common.get_parent_span(parent.span_instance) assert should_be_old_parent.span_instance == parent.span_instance - def test_should_use_trace(self): - with ContextHelper(environ={"AZURE_TRACING_ONLY_PROPAGATE": "yes"}): - parent_span = OpenCensusSpan() - assert not common.should_use_trace(parent_span) - assert not common.should_use_trace(None) - parent_span = OpenCensusSpan() - assert common.should_use_trace(parent_span) - assert not common.should_use_trace(None) - class TestDecorator(object): def test_decorator_has_different_name(self): @@ -190,21 +181,3 @@ def test_span_with_opencensus_complicated(self, value): assert parent.children[3].children[1].span_data.name == "MockClient.make_request" children = parent.children[1].children assert len(children) == 2 - - def test_should_only_propagate(self): - with ContextHelper(should_only_propagate=True): - exporter = MockExporter() - trace = tracer_module.Tracer(sampler=AlwaysOnSampler(), exporter=exporter) - with trace.start_span(name="OverAll") as parent: - client = MockClient() - client.make_request(2) - with trace.span("child") as child: - client.make_request(2, parent_span=parent) - assert OpenCensusSpan.get_current_span() == child - client.make_request(2) - trace.finish() - exporter.build_tree() - parent = exporter.root - assert len(parent.children) == 1 - assert parent.children[0].span_data.name == "child" - assert not parent.children[0].children diff --git a/sdk/core/azure-core/tests/test_tracing_policy.py b/sdk/core/azure-core/tests/test_tracing_policy.py index 450baa2f4f1e..be7e1adf98e9 100644 --- a/sdk/core/azure-core/tests/test_tracing_policy.py +++ b/sdk/core/azure-core/tests/test_tracing_policy.py @@ -72,13 +72,15 @@ def test_distributed_tracing_policy_solo(should_set_sdk_context): assert network_span.span_data.attributes.get("http.status_code") == 504 -def test_distributed_tracing_policy_with_user_agent(): +@pytest.mark.parametrize("should_set_sdk_context", [True, False]) +def test_distributed_tracing_policy_with_user_agent(should_set_sdk_context): """Test policy working with user agent.""" with ContextHelper(environ={"AZURE_HTTP_USER_AGENT": "mytools"}): exporter = MockExporter() trace = tracer_module.Tracer(sampler=AlwaysOnSampler(), exporter=exporter) with trace.span("parent"): - tracing_context.current_span.set(OpenCensusSpan(trace.current_span())) + if should_set_sdk_context: + tracing_context.current_span.set(OpenCensusSpan(trace.current_span())) policy = DistributedTracingPolicy() request = HttpRequest("GET", "http://127.0.0.1") diff --git a/sdk/core/azure-core/tests/tracing_common.py b/sdk/core/azure-core/tests/tracing_common.py index 18f9b4e9f839..7fecf1d746f8 100644 --- a/sdk/core/azure-core/tests/tracing_common.py +++ b/sdk/core/azure-core/tests/tracing_common.py @@ -22,13 +22,12 @@ class ContextHelper(object): - def __init__(self, environ={}, tracer_to_use=None, should_only_propagate=None): + def __init__(self, environ={}, tracer_to_use=None): self.orig_tracer = OpenCensusSpan.get_current_tracer() self.orig_current_span = OpenCensusSpan.get_current_span() self.orig_sdk_context_span = tracing_context.current_span.get() self.os_env = mock.patch.dict(os.environ, environ) self.tracer_to_use = tracer_to_use - self.should_only_propagate = should_only_propagate def __enter__(self): self.orig_tracer = OpenCensusSpan.get_current_tracer() @@ -38,8 +37,6 @@ def __enter__(self): tracing_context.current_span.clear() if self.tracer_to_use is not None: settings.tracing_implementation.set_value(self.tracer_to_use) - if self.should_only_propagate is not None: - settings.tracing_should_only_propagate.set_value(self.should_only_propagate) self.os_env.start() execution_context.clear() tracing_context.current_span.clear() @@ -50,7 +47,6 @@ def __exit__(self, exc_type, exc_val, exc_tb): OpenCensusSpan.set_current_span(self.orig_current_span) tracing_context.current_span.set(self.orig_sdk_context_span) settings.tracing_implementation.unset_value() - settings.tracing_should_only_propagate.unset_value() self.os_env.stop() From b73752888428119ba382a2ed574270052b901522 Mon Sep 17 00:00:00 2001 From: Dan Schulte Date: Thu, 25 Jul 2019 18:49:01 -0700 Subject: [PATCH 141/244] Enable SDK Automation pull requests (#6498) --- swagger_to_sdk_config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swagger_to_sdk_config.json b/swagger_to_sdk_config.json index 4bad085c48f9..bae8c63cefa0 100644 --- a/swagger_to_sdk_config.json +++ b/swagger_to_sdk_config.json @@ -1,5 +1,5 @@ { - "$schema": "https://openapistoragetest.blob.core.windows.net/sdkautomation/test/schemas/swagger_to_sdk_config.schema.json", + "$schema": "https://openapistorageprod.blob.core.windows.net/sdkautomation/prod/schemas/swagger_to_sdk_config.schema.json", "meta": { "autorest_options": { "version": "preview", From fb0556024a83c9b7ff7c8a90279e1a47baccd95b Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 26 Jul 2019 02:57:37 -0700 Subject: [PATCH 142/244] [AutoPR] devtestlabs/resource-manager (#6414) * [AutoPR devtestlabs/resource-manager] [Hub Generated] Review request for Microsoft.DevTestLab to add version stable/2018-09-15 (#6359) * Generated from c64177b58d5905986be6a16e270986ccfad08d25 Modification of PATCH description, plus minor fixes * Packaging update of azure-mgmt-devtestlabs * Generated from c2786532a6bf80ceb9cddda5e2c8b8abc09d6b30 Update specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/DTL.json Co-Authored-By: Nick Schonning * modified history and version * Added general breaking changes note * fixed indentation --- .../azure-mgmt-devtestlabs/HISTORY.rst | 19 + .../azure-mgmt-devtestlabs/MANIFEST.in | 1 + .../azure-mgmt-devtestlabs/README.rst | 2 +- .../azure/mgmt/devtestlabs/__init__.py | 7 +- .../azure/mgmt/devtestlabs/_configuration.py | 48 + ...abs_client.py => _dev_test_labs_client.py} | 86 +- .../azure/mgmt/devtestlabs/models/__init__.py | 744 ++- ...nums.py => _dev_test_labs_client_enums.py} | 2 + .../azure/mgmt/devtestlabs/models/_models.py | 5702 +++++++++++++++++ .../mgmt/devtestlabs/models/_models_py3.py | 5702 +++++++++++++++++ .../mgmt/devtestlabs/models/_paged_models.py | 261 + .../devtestlabs/models/applicable_schedule.py | 59 - .../models/applicable_schedule_fragment.py | 38 - .../applicable_schedule_fragment_py3.py | 38 - .../models/applicable_schedule_py3.py | 59 - .../models/apply_artifacts_request.py | 29 - .../models/apply_artifacts_request_py3.py | 29 - .../mgmt/devtestlabs/models/arm_template.py | 90 - .../devtestlabs/models/arm_template_info.py | 32 - .../models/arm_template_info_py3.py | 32 - .../devtestlabs/models/arm_template_paged.py | 27 - .../arm_template_parameter_properties.py | 32 - ..._template_parameter_properties_fragment.py | 32 - ...plate_parameter_properties_fragment_py3.py | 32 - .../arm_template_parameter_properties_py3.py | 32 - .../devtestlabs/models/arm_template_py3.py | 90 - .../azure/mgmt/devtestlabs/models/artifact.py | 88 - .../artifact_deployment_status_properties.py | 38 - ...t_deployment_status_properties_fragment.py | 38 - ...ployment_status_properties_fragment_py3.py | 38 - ...tifact_deployment_status_properties_py3.py | 38 - .../models/artifact_install_properties.py | 55 - .../artifact_install_properties_fragment.py | 55 - ...rtifact_install_properties_fragment_py3.py | 55 - .../models/artifact_install_properties_py3.py | 55 - .../mgmt/devtestlabs/models/artifact_paged.py | 27 - .../models/artifact_parameter_properties.py | 32 - .../artifact_parameter_properties_fragment.py | 32 - ...ifact_parameter_properties_fragment_py3.py | 32 - .../artifact_parameter_properties_py3.py | 32 - .../mgmt/devtestlabs/models/artifact_py3.py | 88 - .../devtestlabs/models/artifact_source.py | 100 - .../models/artifact_source_fragment.py | 63 - .../models/artifact_source_fragment_py3.py | 63 - .../models/artifact_source_paged.py | 27 - .../devtestlabs/models/artifact_source_py3.py | 100 - .../models/attach_disk_properties.py | 29 - .../models/attach_disk_properties_py3.py | 29 - .../models/attach_new_data_disk_options.py | 37 - .../attach_new_data_disk_options_fragment.py | 37 - ...tach_new_data_disk_options_fragment_py3.py | 37 - .../attach_new_data_disk_options_py3.py | 37 - .../models/bulk_creation_parameters.py | 28 - .../bulk_creation_parameters_fragment.py | 28 - .../bulk_creation_parameters_fragment_py3.py | 28 - .../models/bulk_creation_parameters_py3.py | 28 - .../devtestlabs/models/compute_data_disk.py | 41 - .../models/compute_data_disk_fragment.py | 41 - .../models/compute_data_disk_fragment_py3.py | 41 - .../models/compute_data_disk_py3.py | 41 - .../models/compute_vm_instance_view_status.py | 36 - ...ompute_vm_instance_view_status_fragment.py | 36 - ...te_vm_instance_view_status_fragment_py3.py | 36 - .../compute_vm_instance_view_status_py3.py | 36 - .../models/compute_vm_properties.py | 54 - .../models/compute_vm_properties_fragment.py | 55 - .../compute_vm_properties_fragment_py3.py | 55 - .../models/compute_vm_properties_py3.py | 54 - .../models/cost_threshold_properties.py | 51 - .../models/cost_threshold_properties_py3.py | 51 - .../mgmt/devtestlabs/models/custom_image.py | 106 - .../models/custom_image_fragment.py | 71 - .../models/custom_image_fragment_py3.py | 71 - .../devtestlabs/models/custom_image_paged.py | 27 - .../models/custom_image_properties_custom.py | 43 - ...custom_image_properties_custom_fragment.py | 37 - ...om_image_properties_custom_fragment_py3.py | 37 - .../custom_image_properties_custom_py3.py | 43 - .../custom_image_properties_from_plan.py | 38 - ...tom_image_properties_from_plan_fragment.py | 38 - ...image_properties_from_plan_fragment_py3.py | 38 - .../custom_image_properties_from_plan_py3.py | 38 - .../models/custom_image_properties_from_vm.py | 36 - ...ustom_image_properties_from_vm_fragment.py | 37 - ...m_image_properties_from_vm_fragment_py3.py | 37 - .../custom_image_properties_from_vm_py3.py | 36 - .../devtestlabs/models/custom_image_py3.py | 106 - .../models/data_disk_properties.py | 41 - .../models/data_disk_properties_fragment.py | 41 - .../data_disk_properties_fragment_py3.py | 41 - .../models/data_disk_properties_py3.py | 41 - .../models/data_disk_storage_type_info.py | 33 - .../data_disk_storage_type_info_fragment.py | 33 - ...ata_disk_storage_type_info_fragment_py3.py | 33 - .../models/data_disk_storage_type_info_py3.py | 33 - .../mgmt/devtestlabs/models/day_details.py | 28 - .../models/day_details_fragment.py | 28 - .../models/day_details_fragment_py3.py | 28 - .../devtestlabs/models/day_details_py3.py | 28 - .../models/detach_data_disk_properties.py | 29 - .../models/detach_data_disk_properties_py3.py | 29 - .../models/detach_disk_properties.py | 29 - .../models/detach_disk_properties_py3.py | 29 - .../azure/mgmt/devtestlabs/models/disk.py | 97 - .../mgmt/devtestlabs/models/disk_fragment.py | 60 - .../devtestlabs/models/disk_fragment_py3.py | 60 - .../mgmt/devtestlabs/models/disk_paged.py | 27 - .../azure/mgmt/devtestlabs/models/disk_py3.py | 97 - .../devtestlabs/models/dtl_environment.py | 81 - .../models/dtl_environment_fragment.py | 38 - .../models/dtl_environment_fragment_py3.py | 38 - .../models/dtl_environment_paged.py | 27 - .../devtestlabs/models/dtl_environment_py3.py | 81 - .../environment_deployment_properties.py | 33 - ...ironment_deployment_properties_fragment.py | 33 - ...ment_deployment_properties_fragment_py3.py | 33 - .../environment_deployment_properties_py3.py | 33 - .../models/evaluate_policies_properties.py | 40 - .../evaluate_policies_properties_py3.py | 40 - .../models/evaluate_policies_request.py | 29 - .../models/evaluate_policies_request_py3.py | 29 - .../models/evaluate_policies_response.py | 28 - .../models/evaluate_policies_response_py3.py | 28 - .../azure/mgmt/devtestlabs/models/event.py | 30 - .../mgmt/devtestlabs/models/event_fragment.py | 30 - .../devtestlabs/models/event_fragment_py3.py | 30 - .../mgmt/devtestlabs/models/event_py3.py | 30 - .../export_resource_usage_parameters.py | 35 - .../export_resource_usage_parameters_py3.py | 35 - .../devtestlabs/models/external_subnet.py | 32 - .../models/external_subnet_fragment.py | 32 - .../models/external_subnet_fragment_py3.py | 32 - .../devtestlabs/models/external_subnet_py3.py | 32 - .../azure/mgmt/devtestlabs/models/formula.py | 85 - .../devtestlabs/models/formula_fragment.py | 48 - .../models/formula_fragment_py3.py | 48 - .../mgmt/devtestlabs/models/formula_paged.py | 27 - .../models/formula_properties_from_vm.py | 29 - .../formula_properties_from_vm_fragment.py | 29 - ...formula_properties_from_vm_fragment_py3.py | 29 - .../models/formula_properties_from_vm_py3.py | 29 - .../mgmt/devtestlabs/models/formula_py3.py | 85 - .../mgmt/devtestlabs/models/gallery_image.py | 83 - .../devtestlabs/models/gallery_image_paged.py | 27 - .../devtestlabs/models/gallery_image_py3.py | 83 - .../models/gallery_image_reference.py | 44 - .../gallery_image_reference_fragment.py | 44 - .../gallery_image_reference_fragment_py3.py | 44 - .../models/gallery_image_reference_py3.py | 44 - .../models/generate_arm_template_request.py | 43 - .../generate_arm_template_request_py3.py | 43 - .../models/generate_upload_uri_parameter.py | 28 - .../generate_upload_uri_parameter_py3.py | 28 - .../models/generate_upload_uri_response.py | 28 - .../generate_upload_uri_response_py3.py | 28 - .../mgmt/devtestlabs/models/hour_details.py | 28 - .../models/hour_details_fragment.py | 28 - .../models/hour_details_fragment_py3.py | 28 - .../devtestlabs/models/hour_details_py3.py | 28 - .../devtestlabs/models/identity_properties.py | 40 - .../models/identity_properties_py3.py | 40 - .../import_lab_virtual_machine_request.py | 35 - .../import_lab_virtual_machine_request_py3.py | 35 - .../devtestlabs/models/inbound_nat_rule.py | 42 - .../models/inbound_nat_rule_fragment.py | 42 - .../models/inbound_nat_rule_fragment_py3.py | 42 - .../models/inbound_nat_rule_py3.py | 42 - .../azure/mgmt/devtestlabs/models/lab.py | 165 - .../models/lab_announcement_properties.py | 64 - .../lab_announcement_properties_fragment.py | 47 - ...ab_announcement_properties_fragment_py3.py | 47 - .../models/lab_announcement_properties_py3.py | 64 - .../azure/mgmt/devtestlabs/models/lab_cost.py | 97 - .../models/lab_cost_details_properties.py | 37 - .../models/lab_cost_details_properties_py3.py | 37 - .../mgmt/devtestlabs/models/lab_cost_py3.py | 97 - .../models/lab_cost_summary_properties.py | 28 - .../models/lab_cost_summary_properties_py3.py | 28 - .../mgmt/devtestlabs/models/lab_fragment.py | 78 - .../devtestlabs/models/lab_fragment_py3.py | 78 - .../mgmt/devtestlabs/models/lab_paged.py | 27 - .../azure/mgmt/devtestlabs/models/lab_py3.py | 165 - .../models/lab_resource_cost_properties.py | 63 - .../lab_resource_cost_properties_py3.py | 63 - .../models/lab_support_properties.py | 34 - .../models/lab_support_properties_fragment.py | 34 - .../lab_support_properties_fragment_py3.py | 34 - .../models/lab_support_properties_py3.py | 34 - .../azure/mgmt/devtestlabs/models/lab_vhd.py | 28 - .../mgmt/devtestlabs/models/lab_vhd_paged.py | 27 - .../mgmt/devtestlabs/models/lab_vhd_py3.py | 28 - .../devtestlabs/models/lab_virtual_machine.py | 221 - .../lab_virtual_machine_creation_parameter.py | 192 - ...ual_machine_creation_parameter_fragment.py | 192 - ...machine_creation_parameter_fragment_py3.py | 192 - ..._virtual_machine_creation_parameter_py3.py | 192 - .../models/lab_virtual_machine_fragment.py | 177 - .../lab_virtual_machine_fragment_py3.py | 177 - .../models/lab_virtual_machine_paged.py | 27 - .../models/lab_virtual_machine_py3.py | 221 - .../mgmt/devtestlabs/models/linux_os_info.py | 30 - .../models/linux_os_info_fragment.py | 30 - .../models/linux_os_info_fragment_py3.py | 30 - .../devtestlabs/models/linux_os_info_py3.py | 30 - .../models/network_interface_properties.py | 65 - .../network_interface_properties_fragment.py | 65 - ...twork_interface_properties_fragment_py3.py | 65 - .../network_interface_properties_py3.py | 65 - .../models/notification_channel.py | 86 - .../models/notification_channel_fragment.py | 49 - .../notification_channel_fragment_py3.py | 49 - .../models/notification_channel_paged.py | 27 - .../models/notification_channel_py3.py | 86 - .../models/notification_settings.py | 49 - .../models/notification_settings_fragment.py | 49 - .../notification_settings_fragment_py3.py | 49 - .../models/notification_settings_py3.py | 49 - .../devtestlabs/models/notify_parameters.py | 34 - .../models/notify_parameters_py3.py | 34 - .../devtestlabs/models/operation_error.py | 32 - .../devtestlabs/models/operation_error_py3.py | 32 - .../devtestlabs/models/operation_metadata.py | 32 - .../models/operation_metadata_display.py | 41 - .../models/operation_metadata_display_py3.py | 41 - .../models/operation_metadata_paged.py | 27 - .../models/operation_metadata_py3.py | 32 - .../devtestlabs/models/operation_result.py | 48 - .../models/operation_result_py3.py | 48 - .../mgmt/devtestlabs/models/parameter_info.py | 32 - .../devtestlabs/models/parameter_info_py3.py | 32 - .../models/parameters_value_file_info.py | 32 - .../models/parameters_value_file_info_py3.py | 32 - .../percentage_cost_threshold_properties.py | 28 - ...ercentage_cost_threshold_properties_py3.py | 28 - .../azure/mgmt/devtestlabs/models/policy.py | 97 - .../devtestlabs/models/policy_fragment.py | 60 - .../devtestlabs/models/policy_fragment_py3.py | 60 - .../mgmt/devtestlabs/models/policy_paged.py | 27 - .../mgmt/devtestlabs/models/policy_py3.py | 97 - .../devtestlabs/models/policy_set_result.py | 34 - .../models/policy_set_result_py3.py | 34 - .../devtestlabs/models/policy_violation.py | 32 - .../models/policy_violation_py3.py | 32 - .../azure/mgmt/devtestlabs/models/port.py | 34 - .../mgmt/devtestlabs/models/port_fragment.py | 34 - .../devtestlabs/models/port_fragment_py3.py | 34 - .../azure/mgmt/devtestlabs/models/port_py3.py | 34 - .../mgmt/devtestlabs/models/rdp_connection.py | 28 - .../devtestlabs/models/rdp_connection_py3.py | 28 - .../resize_lab_virtual_machine_properties.py | 28 - ...size_lab_virtual_machine_properties_py3.py | 28 - .../azure/mgmt/devtestlabs/models/resource.py | 53 - .../mgmt/devtestlabs/models/resource_py3.py | 53 - .../models/retarget_schedule_properties.py | 34 - .../retarget_schedule_properties_py3.py | 34 - .../azure/mgmt/devtestlabs/models/schedule.py | 102 - .../models/schedule_creation_parameter.py | 74 - .../schedule_creation_parameter_fragment.py | 76 - ...chedule_creation_parameter_fragment_py3.py | 76 - .../models/schedule_creation_parameter_py3.py | 74 - .../devtestlabs/models/schedule_fragment.py | 67 - .../models/schedule_fragment_py3.py | 67 - .../mgmt/devtestlabs/models/schedule_paged.py | 27 - .../mgmt/devtestlabs/models/schedule_py3.py | 102 - .../azure/mgmt/devtestlabs/models/secret.py | 63 - .../devtestlabs/models/secret_fragment.py | 31 - .../devtestlabs/models/secret_fragment_py3.py | 31 - .../mgmt/devtestlabs/models/secret_paged.py | 27 - .../mgmt/devtestlabs/models/secret_py3.py | 63 - .../mgmt/devtestlabs/models/service_fabric.py | 76 - .../models/service_fabric_fragment.py | 37 - .../models/service_fabric_fragment_py3.py | 37 - .../models/service_fabric_paged.py | 27 - .../devtestlabs/models/service_fabric_py3.py | 76 - .../mgmt/devtestlabs/models/service_runner.py | 52 - .../models/service_runner_paged.py | 27 - .../devtestlabs/models/service_runner_py3.py | 52 - .../shared_public_ip_address_configuration.py | 30 - ...ublic_ip_address_configuration_fragment.py | 30 - ...c_ip_address_configuration_fragment_py3.py | 30 - ...red_public_ip_address_configuration_py3.py | 30 - .../models/shutdown_notification_content.py | 78 - .../shutdown_notification_content_py3.py | 78 - .../azure/mgmt/devtestlabs/models/subnet.py | 39 - .../devtestlabs/models/subnet_fragment.py | 39 - .../devtestlabs/models/subnet_fragment_py3.py | 39 - .../devtestlabs/models/subnet_override.py | 57 - .../models/subnet_override_fragment.py | 57 - .../models/subnet_override_fragment_py3.py | 57 - .../devtestlabs/models/subnet_override_py3.py | 57 - .../mgmt/devtestlabs/models/subnet_py3.py | 39 - ..._shared_public_ip_address_configuration.py | 29 - ...ublic_ip_address_configuration_fragment.py | 29 - ...c_ip_address_configuration_fragment_py3.py | 29 - ...red_public_ip_address_configuration_py3.py | 29 - .../models/target_cost_properties.py | 51 - .../models/target_cost_properties_py3.py | 51 - .../devtestlabs/models/update_resource.py | 28 - .../devtestlabs/models/update_resource_py3.py | 28 - .../azure/mgmt/devtestlabs/models/user.py | 72 - .../mgmt/devtestlabs/models/user_fragment.py | 35 - .../devtestlabs/models/user_fragment_py3.py | 35 - .../mgmt/devtestlabs/models/user_identity.py | 49 - .../models/user_identity_fragment.py | 49 - .../models/user_identity_fragment_py3.py | 49 - .../devtestlabs/models/user_identity_py3.py | 49 - .../mgmt/devtestlabs/models/user_paged.py | 27 - .../azure/mgmt/devtestlabs/models/user_py3.py | 72 - .../devtestlabs/models/user_secret_store.py | 32 - .../models/user_secret_store_fragment.py | 32 - .../models/user_secret_store_fragment_py3.py | 32 - .../models/user_secret_store_py3.py | 32 - .../devtestlabs/models/virtual_network.py | 88 - .../models/virtual_network_fragment.py | 45 - .../models/virtual_network_fragment_py3.py | 45 - .../models/virtual_network_paged.py | 27 - .../devtestlabs/models/virtual_network_py3.py | 88 - .../mgmt/devtestlabs/models/week_details.py | 33 - .../models/week_details_fragment.py | 33 - .../models/week_details_fragment_py3.py | 33 - .../devtestlabs/models/week_details_py3.py | 33 - .../devtestlabs/models/windows_os_info.py | 31 - .../models/windows_os_info_fragment.py | 31 - .../models/windows_os_info_fragment_py3.py | 31 - .../devtestlabs/models/windows_os_info_py3.py | 31 - .../mgmt/devtestlabs/operations/__init__.py | 50 +- ...ations.py => _arm_templates_operations.py} | 19 +- ...ons.py => _artifact_sources_operations.py} | 22 +- ...operations.py => _artifacts_operations.py} | 18 +- ...sts_operations.py => _costs_operations.py} | 4 +- ...ations.py => _custom_images_operations.py} | 21 +- ...sks_operations.py => _disks_operations.py} | 20 +- ...rations.py => _environments_operations.py} | 21 +- ..._operations.py => _formulas_operations.py} | 23 +- ...tions.py => _gallery_images_operations.py} | 16 +- ...ons.py => _global_schedules_operations.py} | 36 +- ...labs_operations.py => _labs_operations.py} | 49 +- ...y => _notification_channels_operations.py} | 34 +- .../{operations.py => _operations.py} | 3 +- ..._operations.py => _policies_operations.py} | 22 +- ...erations.py => _policy_sets_operations.py} | 3 +- ..._operations.py => _provider_operations.py} | 16 +- ...operations.py => _schedules_operations.py} | 36 +- ...s_operations.py => _secrets_operations.py} | 20 +- ...> _service_fabric_schedules_operations.py} | 34 +- ...ions.py => _service_fabrics_operations.py} | 38 +- ...ions.py => _service_runners_operations.py} | 91 +- ...ers_operations.py => _users_operations.py} | 21 +- ... _virtual_machine_schedules_operations.py} | 22 +- ...ons.py => _virtual_machines_operations.py} | 25 +- ...ons.py => _virtual_networks_operations.py} | 21 +- .../azure/mgmt/devtestlabs/version.py | 2 +- .../azure-mgmt-devtestlabs/setup.py | 2 +- 353 files changed, 12470 insertions(+), 16125 deletions(-) create mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_configuration.py rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/{dev_test_labs_client.py => _dev_test_labs_client.py} (72%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/{dev_test_labs_client_enums.py => _dev_test_labs_client_enums.py} (98%) create mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models.py create mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models_py3.py create mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_paged_models.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_paged.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment_py3.py delete mode 100644 sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_py3.py rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{arm_templates_operations.py => _arm_templates_operations.py} (95%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{artifact_sources_operations.py => _artifact_sources_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{artifacts_operations.py => _artifacts_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{costs_operations.py => _costs_operations.py} (98%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{custom_images_operations.py => _custom_images_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{disks_operations.py => _disks_operations.py} (98%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{environments_operations.py => _environments_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{formulas_operations.py => _formulas_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{gallery_images_operations.py => _gallery_images_operations.py} (93%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{global_schedules_operations.py => _global_schedules_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{labs_operations.py => _labs_operations.py} (98%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{notification_channels_operations.py => _notification_channels_operations.py} (96%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{operations.py => _operations.py} (96%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{policies_operations.py => _policies_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{policy_sets_operations.py => _policy_sets_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{provider_operations.py => _provider_operations.py} (90%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{schedules_operations.py => _schedules_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{secrets_operations.py => _secrets_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{service_fabric_schedules_operations.py => _service_fabric_schedules_operations.py} (96%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{service_fabrics_operations.py => _service_fabrics_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{service_runners_operations.py => _service_runners_operations.py} (71%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{users_operations.py => _users_operations.py} (97%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{virtual_machine_schedules_operations.py => _virtual_machine_schedules_operations.py} (98%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{virtual_machines_operations.py => _virtual_machines_operations.py} (99%) rename sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/{virtual_networks_operations.py => _virtual_networks_operations.py} (97%) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/HISTORY.rst b/sdk/devtestlabs/azure-mgmt-devtestlabs/HISTORY.rst index ca00766f84e0..bfb266aba9c4 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/HISTORY.rst +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/HISTORY.rst @@ -3,6 +3,25 @@ Release History =============== +4.0.0 (2019-07-26) +++++++++++++++++++ + +**Breaking changes** + +- Removed operation ServiceRunnersOperations.list + +**General breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes if from some import. +In summary, some modules were incorrectly visible/importable and have been renamed. This fixed several issues caused by usage of classes that were not supposed to be used in the first place. + +- DevTestLabsClient cannot be imported from `azure.mgmt.devtestlabs.dev_test_labs_management_client` anymore (import from `azure.mgmt.devtestlabs` works like before) +- DevTestLabsManagementClientConfiguration import has been moved from `azure.mgmt.devtestlabs.dev_test_labs_management_client` to `azure.mgmt.devtestlabs` +- A model `MyClass` from a "models" sub-module cannot be imported anymore using `azure.mgmt.devtestlabs.models.my_class` (import from `azure.mgmt.devtestlabs.models` works like before) +- An operation class `MyClassOperations` from an `operations` sub-module cannot be imported anymore using `azure.mgmt.devtestlabs.operations.my_class_operations` (import from `azure.mgmt.devtestlabs.operations` works like before) + +Last but not least, HTTP connection pooling is now enabled by default. You should always use a client as a context manager, or call close(), or use no more than one client per process. + 3.0.0 (2019-02-07) ++++++++++++++++++ diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/MANIFEST.in b/sdk/devtestlabs/azure-mgmt-devtestlabs/MANIFEST.in index 6ceb27f7a96e..e4884efef41b 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/MANIFEST.in +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/MANIFEST.in @@ -1,3 +1,4 @@ +recursive-include tests *.py *.yaml include *.rst include azure/__init__.py include azure/mgmt/__init__.py diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/README.rst b/sdk/devtestlabs/azure-mgmt-devtestlabs/README.rst index 3b266c6e0f32..7863788f2412 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/README.rst +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure DevTestLabs Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/__init__.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/__init__.py index 18ce91ae3337..a60396771701 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/__init__.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .dev_test_labs_client import DevTestLabsClient -from .version import VERSION +from ._configuration import DevTestLabsClientConfiguration +from ._dev_test_labs_client import DevTestLabsClient +__all__ = ['DevTestLabsClient', 'DevTestLabsClientConfiguration'] -__all__ = ['DevTestLabsClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_configuration.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_configuration.py new file mode 100644 index 000000000000..ad4e6c48fb8d --- /dev/null +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_configuration.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class DevTestLabsClientConfiguration(AzureConfiguration): + """Configuration for DevTestLabsClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(DevTestLabsClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-devtestlabs/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/dev_test_labs_client.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_dev_test_labs_client.py similarity index 72% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/dev_test_labs_client.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_dev_test_labs_client.py index 74bdf0ef0fdc..aa051d2d128d 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/dev_test_labs_client.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_dev_test_labs_client.py @@ -11,66 +11,34 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.provider_operations import ProviderOperations -from .operations.labs_operations import LabsOperations -from .operations.operations import Operations -from .operations.global_schedules_operations import GlobalSchedulesOperations -from .operations.artifact_sources_operations import ArtifactSourcesOperations -from .operations.arm_templates_operations import ArmTemplatesOperations -from .operations.artifacts_operations import ArtifactsOperations -from .operations.costs_operations import CostsOperations -from .operations.custom_images_operations import CustomImagesOperations -from .operations.formulas_operations import FormulasOperations -from .operations.gallery_images_operations import GalleryImagesOperations -from .operations.notification_channels_operations import NotificationChannelsOperations -from .operations.policy_sets_operations import PolicySetsOperations -from .operations.policies_operations import PoliciesOperations -from .operations.schedules_operations import SchedulesOperations -from .operations.service_runners_operations import ServiceRunnersOperations -from .operations.users_operations import UsersOperations -from .operations.disks_operations import DisksOperations -from .operations.environments_operations import EnvironmentsOperations -from .operations.secrets_operations import SecretsOperations -from .operations.service_fabrics_operations import ServiceFabricsOperations -from .operations.service_fabric_schedules_operations import ServiceFabricSchedulesOperations -from .operations.virtual_machines_operations import VirtualMachinesOperations -from .operations.virtual_machine_schedules_operations import VirtualMachineSchedulesOperations -from .operations.virtual_networks_operations import VirtualNetworksOperations -from . import models - - -class DevTestLabsClientConfiguration(AzureConfiguration): - """Configuration for DevTestLabsClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(DevTestLabsClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-devtestlabs/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import DevTestLabsClientConfiguration +from .operations import ProviderOperations +from .operations import LabsOperations +from .operations import Operations +from .operations import GlobalSchedulesOperations +from .operations import ArtifactSourcesOperations +from .operations import ArmTemplatesOperations +from .operations import ArtifactsOperations +from .operations import CostsOperations +from .operations import CustomImagesOperations +from .operations import FormulasOperations +from .operations import GalleryImagesOperations +from .operations import NotificationChannelsOperations +from .operations import PolicySetsOperations +from .operations import PoliciesOperations +from .operations import SchedulesOperations +from .operations import ServiceRunnersOperations +from .operations import UsersOperations +from .operations import DisksOperations +from .operations import EnvironmentsOperations +from .operations import SecretsOperations +from .operations import ServiceFabricsOperations +from .operations import ServiceFabricSchedulesOperations +from .operations import VirtualMachinesOperations +from .operations import VirtualMachineSchedulesOperations +from .operations import VirtualNetworksOperations +from . import models class DevTestLabsClient(SDKClient): diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py index 56d0fd0fe73f..1bb40772c367 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py @@ -10,322 +10,321 @@ # -------------------------------------------------------------------------- try: - from .week_details_py3 import WeekDetails - from .day_details_py3 import DayDetails - from .hour_details_py3 import HourDetails - from .notification_settings_py3 import NotificationSettings - from .schedule_py3 import Schedule - from .applicable_schedule_py3 import ApplicableSchedule - from .week_details_fragment_py3 import WeekDetailsFragment - from .day_details_fragment_py3 import DayDetailsFragment - from .hour_details_fragment_py3 import HourDetailsFragment - from .notification_settings_fragment_py3 import NotificationSettingsFragment - from .schedule_fragment_py3 import ScheduleFragment - from .applicable_schedule_fragment_py3 import ApplicableScheduleFragment - from .artifact_parameter_properties_py3 import ArtifactParameterProperties - from .artifact_install_properties_py3 import ArtifactInstallProperties - from .apply_artifacts_request_py3 import ApplyArtifactsRequest - from .parameters_value_file_info_py3 import ParametersValueFileInfo - from .arm_template_py3 import ArmTemplate - from .arm_template_info_py3 import ArmTemplateInfo - from .arm_template_parameter_properties_py3 import ArmTemplateParameterProperties - from .arm_template_parameter_properties_fragment_py3 import ArmTemplateParameterPropertiesFragment - from .artifact_py3 import Artifact - from .artifact_deployment_status_properties_py3 import ArtifactDeploymentStatusProperties - from .artifact_deployment_status_properties_fragment_py3 import ArtifactDeploymentStatusPropertiesFragment - from .artifact_parameter_properties_fragment_py3 import ArtifactParameterPropertiesFragment - from .artifact_install_properties_fragment_py3 import ArtifactInstallPropertiesFragment - from .artifact_source_py3 import ArtifactSource - from .artifact_source_fragment_py3 import ArtifactSourceFragment - from .attach_disk_properties_py3 import AttachDiskProperties - from .attach_new_data_disk_options_py3 import AttachNewDataDiskOptions - from .attach_new_data_disk_options_fragment_py3 import AttachNewDataDiskOptionsFragment - from .bulk_creation_parameters_py3 import BulkCreationParameters - from .bulk_creation_parameters_fragment_py3 import BulkCreationParametersFragment - from .compute_data_disk_py3 import ComputeDataDisk - from .compute_data_disk_fragment_py3 import ComputeDataDiskFragment - from .compute_vm_instance_view_status_py3 import ComputeVmInstanceViewStatus - from .compute_vm_instance_view_status_fragment_py3 import ComputeVmInstanceViewStatusFragment - from .compute_vm_properties_py3 import ComputeVmProperties - from .compute_vm_properties_fragment_py3 import ComputeVmPropertiesFragment - from .percentage_cost_threshold_properties_py3 import PercentageCostThresholdProperties - from .cost_threshold_properties_py3 import CostThresholdProperties - from .windows_os_info_py3 import WindowsOsInfo - from .linux_os_info_py3 import LinuxOsInfo - from .custom_image_properties_from_vm_py3 import CustomImagePropertiesFromVm - from .custom_image_properties_custom_py3 import CustomImagePropertiesCustom - from .data_disk_storage_type_info_py3 import DataDiskStorageTypeInfo - from .custom_image_properties_from_plan_py3 import CustomImagePropertiesFromPlan - from .custom_image_py3 import CustomImage - from .windows_os_info_fragment_py3 import WindowsOsInfoFragment - from .linux_os_info_fragment_py3 import LinuxOsInfoFragment - from .custom_image_properties_from_vm_fragment_py3 import CustomImagePropertiesFromVmFragment - from .custom_image_properties_custom_fragment_py3 import CustomImagePropertiesCustomFragment - from .data_disk_storage_type_info_fragment_py3 import DataDiskStorageTypeInfoFragment - from .custom_image_properties_from_plan_fragment_py3 import CustomImagePropertiesFromPlanFragment - from .custom_image_fragment_py3 import CustomImageFragment - from .data_disk_properties_py3 import DataDiskProperties - from .data_disk_properties_fragment_py3 import DataDiskPropertiesFragment - from .detach_data_disk_properties_py3 import DetachDataDiskProperties - from .detach_disk_properties_py3 import DetachDiskProperties - from .disk_py3 import Disk - from .disk_fragment_py3 import DiskFragment - from .environment_deployment_properties_py3 import EnvironmentDeploymentProperties - from .dtl_environment_py3 import DtlEnvironment - from .environment_deployment_properties_fragment_py3 import EnvironmentDeploymentPropertiesFragment - from .dtl_environment_fragment_py3 import DtlEnvironmentFragment - from .evaluate_policies_properties_py3 import EvaluatePoliciesProperties - from .evaluate_policies_request_py3 import EvaluatePoliciesRequest - from .policy_violation_py3 import PolicyViolation - from .policy_set_result_py3 import PolicySetResult - from .evaluate_policies_response_py3 import EvaluatePoliciesResponse - from .event_py3 import Event - from .event_fragment_py3 import EventFragment - from .export_resource_usage_parameters_py3 import ExportResourceUsageParameters - from .external_subnet_py3 import ExternalSubnet - from .external_subnet_fragment_py3 import ExternalSubnetFragment - from .gallery_image_reference_py3 import GalleryImageReference - from .inbound_nat_rule_py3 import InboundNatRule - from .shared_public_ip_address_configuration_py3 import SharedPublicIpAddressConfiguration - from .network_interface_properties_py3 import NetworkInterfaceProperties - from .schedule_creation_parameter_py3 import ScheduleCreationParameter - from .lab_virtual_machine_creation_parameter_py3 import LabVirtualMachineCreationParameter - from .formula_properties_from_vm_py3 import FormulaPropertiesFromVm - from .formula_py3 import Formula - from .gallery_image_reference_fragment_py3 import GalleryImageReferenceFragment - from .inbound_nat_rule_fragment_py3 import InboundNatRuleFragment - from .shared_public_ip_address_configuration_fragment_py3 import SharedPublicIpAddressConfigurationFragment - from .network_interface_properties_fragment_py3 import NetworkInterfacePropertiesFragment - from .schedule_creation_parameter_fragment_py3 import ScheduleCreationParameterFragment - from .lab_virtual_machine_creation_parameter_fragment_py3 import LabVirtualMachineCreationParameterFragment - from .formula_properties_from_vm_fragment_py3 import FormulaPropertiesFromVmFragment - from .formula_fragment_py3 import FormulaFragment - from .gallery_image_py3 import GalleryImage - from .parameter_info_py3 import ParameterInfo - from .generate_arm_template_request_py3 import GenerateArmTemplateRequest - from .generate_upload_uri_parameter_py3 import GenerateUploadUriParameter - from .generate_upload_uri_response_py3 import GenerateUploadUriResponse - from .identity_properties_py3 import IdentityProperties - from .import_lab_virtual_machine_request_py3 import ImportLabVirtualMachineRequest - from .lab_announcement_properties_py3 import LabAnnouncementProperties - from .lab_support_properties_py3 import LabSupportProperties - from .lab_py3 import Lab - from .lab_announcement_properties_fragment_py3 import LabAnnouncementPropertiesFragment - from .target_cost_properties_py3 import TargetCostProperties - from .lab_cost_summary_properties_py3 import LabCostSummaryProperties - from .lab_cost_details_properties_py3 import LabCostDetailsProperties - from .lab_resource_cost_properties_py3 import LabResourceCostProperties - from .lab_cost_py3 import LabCost - from .lab_support_properties_fragment_py3 import LabSupportPropertiesFragment - from .lab_fragment_py3 import LabFragment - from .lab_vhd_py3 import LabVhd - from .lab_virtual_machine_py3 import LabVirtualMachine - from .lab_virtual_machine_fragment_py3 import LabVirtualMachineFragment - from .notification_channel_py3 import NotificationChannel - from .notification_channel_fragment_py3 import NotificationChannelFragment - from .notify_parameters_py3 import NotifyParameters - from .operation_error_py3 import OperationError - from .operation_metadata_display_py3 import OperationMetadataDisplay - from .operation_metadata_py3 import OperationMetadata - from .operation_result_py3 import OperationResult - from .policy_py3 import Policy - from .policy_fragment_py3 import PolicyFragment - from .port_py3 import Port - from .port_fragment_py3 import PortFragment - from .rdp_connection_py3 import RdpConnection - from .resize_lab_virtual_machine_properties_py3 import ResizeLabVirtualMachineProperties - from .resource_py3 import Resource - from .retarget_schedule_properties_py3 import RetargetScheduleProperties - from .secret_py3 import Secret - from .secret_fragment_py3 import SecretFragment - from .service_fabric_py3 import ServiceFabric - from .service_fabric_fragment_py3 import ServiceFabricFragment - from .service_runner_py3 import ServiceRunner - from .shutdown_notification_content_py3 import ShutdownNotificationContent - from .subnet_py3 import Subnet - from .subnet_fragment_py3 import SubnetFragment - from .subnet_shared_public_ip_address_configuration_py3 import SubnetSharedPublicIpAddressConfiguration - from .subnet_override_py3 import SubnetOverride - from .subnet_shared_public_ip_address_configuration_fragment_py3 import SubnetSharedPublicIpAddressConfigurationFragment - from .subnet_override_fragment_py3 import SubnetOverrideFragment - from .update_resource_py3 import UpdateResource - from .user_identity_py3 import UserIdentity - from .user_secret_store_py3 import UserSecretStore - from .user_py3 import User - from .user_identity_fragment_py3 import UserIdentityFragment - from .user_secret_store_fragment_py3 import UserSecretStoreFragment - from .user_fragment_py3 import UserFragment - from .virtual_network_py3 import VirtualNetwork - from .virtual_network_fragment_py3 import VirtualNetworkFragment + from ._models_py3 import ApplicableSchedule + from ._models_py3 import ApplicableScheduleFragment + from ._models_py3 import ApplyArtifactsRequest + from ._models_py3 import ArmTemplate + from ._models_py3 import ArmTemplateInfo + from ._models_py3 import ArmTemplateParameterProperties + from ._models_py3 import ArmTemplateParameterPropertiesFragment + from ._models_py3 import Artifact + from ._models_py3 import ArtifactDeploymentStatusProperties + from ._models_py3 import ArtifactDeploymentStatusPropertiesFragment + from ._models_py3 import ArtifactInstallProperties + from ._models_py3 import ArtifactInstallPropertiesFragment + from ._models_py3 import ArtifactParameterProperties + from ._models_py3 import ArtifactParameterPropertiesFragment + from ._models_py3 import ArtifactSource + from ._models_py3 import ArtifactSourceFragment + from ._models_py3 import AttachDiskProperties + from ._models_py3 import AttachNewDataDiskOptions + from ._models_py3 import AttachNewDataDiskOptionsFragment + from ._models_py3 import BulkCreationParameters + from ._models_py3 import BulkCreationParametersFragment + from ._models_py3 import ComputeDataDisk + from ._models_py3 import ComputeDataDiskFragment + from ._models_py3 import ComputeVmInstanceViewStatus + from ._models_py3 import ComputeVmInstanceViewStatusFragment + from ._models_py3 import ComputeVmProperties + from ._models_py3 import ComputeVmPropertiesFragment + from ._models_py3 import CostThresholdProperties + from ._models_py3 import CustomImage + from ._models_py3 import CustomImageFragment + from ._models_py3 import CustomImagePropertiesCustom + from ._models_py3 import CustomImagePropertiesCustomFragment + from ._models_py3 import CustomImagePropertiesFromPlan + from ._models_py3 import CustomImagePropertiesFromPlanFragment + from ._models_py3 import CustomImagePropertiesFromVm + from ._models_py3 import CustomImagePropertiesFromVmFragment + from ._models_py3 import DataDiskProperties + from ._models_py3 import DataDiskPropertiesFragment + from ._models_py3 import DataDiskStorageTypeInfo + from ._models_py3 import DataDiskStorageTypeInfoFragment + from ._models_py3 import DayDetails + from ._models_py3 import DayDetailsFragment + from ._models_py3 import DetachDataDiskProperties + from ._models_py3 import DetachDiskProperties + from ._models_py3 import Disk + from ._models_py3 import DiskFragment + from ._models_py3 import DtlEnvironment + from ._models_py3 import DtlEnvironmentFragment + from ._models_py3 import EnvironmentDeploymentProperties + from ._models_py3 import EnvironmentDeploymentPropertiesFragment + from ._models_py3 import EvaluatePoliciesProperties + from ._models_py3 import EvaluatePoliciesRequest + from ._models_py3 import EvaluatePoliciesResponse + from ._models_py3 import Event + from ._models_py3 import EventFragment + from ._models_py3 import ExportResourceUsageParameters + from ._models_py3 import ExternalSubnet + from ._models_py3 import ExternalSubnetFragment + from ._models_py3 import Formula + from ._models_py3 import FormulaFragment + from ._models_py3 import FormulaPropertiesFromVm + from ._models_py3 import FormulaPropertiesFromVmFragment + from ._models_py3 import GalleryImage + from ._models_py3 import GalleryImageReference + from ._models_py3 import GalleryImageReferenceFragment + from ._models_py3 import GenerateArmTemplateRequest + from ._models_py3 import GenerateUploadUriParameter + from ._models_py3 import GenerateUploadUriResponse + from ._models_py3 import HourDetails + from ._models_py3 import HourDetailsFragment + from ._models_py3 import IdentityProperties + from ._models_py3 import ImportLabVirtualMachineRequest + from ._models_py3 import InboundNatRule + from ._models_py3 import InboundNatRuleFragment + from ._models_py3 import Lab + from ._models_py3 import LabAnnouncementProperties + from ._models_py3 import LabAnnouncementPropertiesFragment + from ._models_py3 import LabCost + from ._models_py3 import LabCostDetailsProperties + from ._models_py3 import LabCostSummaryProperties + from ._models_py3 import LabFragment + from ._models_py3 import LabResourceCostProperties + from ._models_py3 import LabSupportProperties + from ._models_py3 import LabSupportPropertiesFragment + from ._models_py3 import LabVhd + from ._models_py3 import LabVirtualMachine + from ._models_py3 import LabVirtualMachineCreationParameter + from ._models_py3 import LabVirtualMachineCreationParameterFragment + from ._models_py3 import LabVirtualMachineFragment + from ._models_py3 import LinuxOsInfo + from ._models_py3 import LinuxOsInfoFragment + from ._models_py3 import NetworkInterfaceProperties + from ._models_py3 import NetworkInterfacePropertiesFragment + from ._models_py3 import NotificationChannel + from ._models_py3 import NotificationChannelFragment + from ._models_py3 import NotificationSettings + from ._models_py3 import NotificationSettingsFragment + from ._models_py3 import NotifyParameters + from ._models_py3 import OperationError + from ._models_py3 import OperationMetadata + from ._models_py3 import OperationMetadataDisplay + from ._models_py3 import OperationResult + from ._models_py3 import ParameterInfo + from ._models_py3 import ParametersValueFileInfo + from ._models_py3 import PercentageCostThresholdProperties + from ._models_py3 import Policy + from ._models_py3 import PolicyFragment + from ._models_py3 import PolicySetResult + from ._models_py3 import PolicyViolation + from ._models_py3 import Port + from ._models_py3 import PortFragment + from ._models_py3 import RdpConnection + from ._models_py3 import ResizeLabVirtualMachineProperties + from ._models_py3 import Resource + from ._models_py3 import RetargetScheduleProperties + from ._models_py3 import Schedule + from ._models_py3 import ScheduleCreationParameter + from ._models_py3 import ScheduleCreationParameterFragment + from ._models_py3 import ScheduleFragment + from ._models_py3 import Secret + from ._models_py3 import SecretFragment + from ._models_py3 import ServiceFabric + from ._models_py3 import ServiceFabricFragment + from ._models_py3 import ServiceRunner + from ._models_py3 import SharedPublicIpAddressConfiguration + from ._models_py3 import SharedPublicIpAddressConfigurationFragment + from ._models_py3 import ShutdownNotificationContent + from ._models_py3 import Subnet + from ._models_py3 import SubnetFragment + from ._models_py3 import SubnetOverride + from ._models_py3 import SubnetOverrideFragment + from ._models_py3 import SubnetSharedPublicIpAddressConfiguration + from ._models_py3 import SubnetSharedPublicIpAddressConfigurationFragment + from ._models_py3 import TargetCostProperties + from ._models_py3 import UpdateResource + from ._models_py3 import User + from ._models_py3 import UserFragment + from ._models_py3 import UserIdentity + from ._models_py3 import UserIdentityFragment + from ._models_py3 import UserSecretStore + from ._models_py3 import UserSecretStoreFragment + from ._models_py3 import VirtualNetwork + from ._models_py3 import VirtualNetworkFragment + from ._models_py3 import WeekDetails + from ._models_py3 import WeekDetailsFragment + from ._models_py3 import WindowsOsInfo + from ._models_py3 import WindowsOsInfoFragment except (SyntaxError, ImportError): - from .week_details import WeekDetails - from .day_details import DayDetails - from .hour_details import HourDetails - from .notification_settings import NotificationSettings - from .schedule import Schedule - from .applicable_schedule import ApplicableSchedule - from .week_details_fragment import WeekDetailsFragment - from .day_details_fragment import DayDetailsFragment - from .hour_details_fragment import HourDetailsFragment - from .notification_settings_fragment import NotificationSettingsFragment - from .schedule_fragment import ScheduleFragment - from .applicable_schedule_fragment import ApplicableScheduleFragment - from .artifact_parameter_properties import ArtifactParameterProperties - from .artifact_install_properties import ArtifactInstallProperties - from .apply_artifacts_request import ApplyArtifactsRequest - from .parameters_value_file_info import ParametersValueFileInfo - from .arm_template import ArmTemplate - from .arm_template_info import ArmTemplateInfo - from .arm_template_parameter_properties import ArmTemplateParameterProperties - from .arm_template_parameter_properties_fragment import ArmTemplateParameterPropertiesFragment - from .artifact import Artifact - from .artifact_deployment_status_properties import ArtifactDeploymentStatusProperties - from .artifact_deployment_status_properties_fragment import ArtifactDeploymentStatusPropertiesFragment - from .artifact_parameter_properties_fragment import ArtifactParameterPropertiesFragment - from .artifact_install_properties_fragment import ArtifactInstallPropertiesFragment - from .artifact_source import ArtifactSource - from .artifact_source_fragment import ArtifactSourceFragment - from .attach_disk_properties import AttachDiskProperties - from .attach_new_data_disk_options import AttachNewDataDiskOptions - from .attach_new_data_disk_options_fragment import AttachNewDataDiskOptionsFragment - from .bulk_creation_parameters import BulkCreationParameters - from .bulk_creation_parameters_fragment import BulkCreationParametersFragment - from .compute_data_disk import ComputeDataDisk - from .compute_data_disk_fragment import ComputeDataDiskFragment - from .compute_vm_instance_view_status import ComputeVmInstanceViewStatus - from .compute_vm_instance_view_status_fragment import ComputeVmInstanceViewStatusFragment - from .compute_vm_properties import ComputeVmProperties - from .compute_vm_properties_fragment import ComputeVmPropertiesFragment - from .percentage_cost_threshold_properties import PercentageCostThresholdProperties - from .cost_threshold_properties import CostThresholdProperties - from .windows_os_info import WindowsOsInfo - from .linux_os_info import LinuxOsInfo - from .custom_image_properties_from_vm import CustomImagePropertiesFromVm - from .custom_image_properties_custom import CustomImagePropertiesCustom - from .data_disk_storage_type_info import DataDiskStorageTypeInfo - from .custom_image_properties_from_plan import CustomImagePropertiesFromPlan - from .custom_image import CustomImage - from .windows_os_info_fragment import WindowsOsInfoFragment - from .linux_os_info_fragment import LinuxOsInfoFragment - from .custom_image_properties_from_vm_fragment import CustomImagePropertiesFromVmFragment - from .custom_image_properties_custom_fragment import CustomImagePropertiesCustomFragment - from .data_disk_storage_type_info_fragment import DataDiskStorageTypeInfoFragment - from .custom_image_properties_from_plan_fragment import CustomImagePropertiesFromPlanFragment - from .custom_image_fragment import CustomImageFragment - from .data_disk_properties import DataDiskProperties - from .data_disk_properties_fragment import DataDiskPropertiesFragment - from .detach_data_disk_properties import DetachDataDiskProperties - from .detach_disk_properties import DetachDiskProperties - from .disk import Disk - from .disk_fragment import DiskFragment - from .environment_deployment_properties import EnvironmentDeploymentProperties - from .dtl_environment import DtlEnvironment - from .environment_deployment_properties_fragment import EnvironmentDeploymentPropertiesFragment - from .dtl_environment_fragment import DtlEnvironmentFragment - from .evaluate_policies_properties import EvaluatePoliciesProperties - from .evaluate_policies_request import EvaluatePoliciesRequest - from .policy_violation import PolicyViolation - from .policy_set_result import PolicySetResult - from .evaluate_policies_response import EvaluatePoliciesResponse - from .event import Event - from .event_fragment import EventFragment - from .export_resource_usage_parameters import ExportResourceUsageParameters - from .external_subnet import ExternalSubnet - from .external_subnet_fragment import ExternalSubnetFragment - from .gallery_image_reference import GalleryImageReference - from .inbound_nat_rule import InboundNatRule - from .shared_public_ip_address_configuration import SharedPublicIpAddressConfiguration - from .network_interface_properties import NetworkInterfaceProperties - from .schedule_creation_parameter import ScheduleCreationParameter - from .lab_virtual_machine_creation_parameter import LabVirtualMachineCreationParameter - from .formula_properties_from_vm import FormulaPropertiesFromVm - from .formula import Formula - from .gallery_image_reference_fragment import GalleryImageReferenceFragment - from .inbound_nat_rule_fragment import InboundNatRuleFragment - from .shared_public_ip_address_configuration_fragment import SharedPublicIpAddressConfigurationFragment - from .network_interface_properties_fragment import NetworkInterfacePropertiesFragment - from .schedule_creation_parameter_fragment import ScheduleCreationParameterFragment - from .lab_virtual_machine_creation_parameter_fragment import LabVirtualMachineCreationParameterFragment - from .formula_properties_from_vm_fragment import FormulaPropertiesFromVmFragment - from .formula_fragment import FormulaFragment - from .gallery_image import GalleryImage - from .parameter_info import ParameterInfo - from .generate_arm_template_request import GenerateArmTemplateRequest - from .generate_upload_uri_parameter import GenerateUploadUriParameter - from .generate_upload_uri_response import GenerateUploadUriResponse - from .identity_properties import IdentityProperties - from .import_lab_virtual_machine_request import ImportLabVirtualMachineRequest - from .lab_announcement_properties import LabAnnouncementProperties - from .lab_support_properties import LabSupportProperties - from .lab import Lab - from .lab_announcement_properties_fragment import LabAnnouncementPropertiesFragment - from .target_cost_properties import TargetCostProperties - from .lab_cost_summary_properties import LabCostSummaryProperties - from .lab_cost_details_properties import LabCostDetailsProperties - from .lab_resource_cost_properties import LabResourceCostProperties - from .lab_cost import LabCost - from .lab_support_properties_fragment import LabSupportPropertiesFragment - from .lab_fragment import LabFragment - from .lab_vhd import LabVhd - from .lab_virtual_machine import LabVirtualMachine - from .lab_virtual_machine_fragment import LabVirtualMachineFragment - from .notification_channel import NotificationChannel - from .notification_channel_fragment import NotificationChannelFragment - from .notify_parameters import NotifyParameters - from .operation_error import OperationError - from .operation_metadata_display import OperationMetadataDisplay - from .operation_metadata import OperationMetadata - from .operation_result import OperationResult - from .policy import Policy - from .policy_fragment import PolicyFragment - from .port import Port - from .port_fragment import PortFragment - from .rdp_connection import RdpConnection - from .resize_lab_virtual_machine_properties import ResizeLabVirtualMachineProperties - from .resource import Resource - from .retarget_schedule_properties import RetargetScheduleProperties - from .secret import Secret - from .secret_fragment import SecretFragment - from .service_fabric import ServiceFabric - from .service_fabric_fragment import ServiceFabricFragment - from .service_runner import ServiceRunner - from .shutdown_notification_content import ShutdownNotificationContent - from .subnet import Subnet - from .subnet_fragment import SubnetFragment - from .subnet_shared_public_ip_address_configuration import SubnetSharedPublicIpAddressConfiguration - from .subnet_override import SubnetOverride - from .subnet_shared_public_ip_address_configuration_fragment import SubnetSharedPublicIpAddressConfigurationFragment - from .subnet_override_fragment import SubnetOverrideFragment - from .update_resource import UpdateResource - from .user_identity import UserIdentity - from .user_secret_store import UserSecretStore - from .user import User - from .user_identity_fragment import UserIdentityFragment - from .user_secret_store_fragment import UserSecretStoreFragment - from .user_fragment import UserFragment - from .virtual_network import VirtualNetwork - from .virtual_network_fragment import VirtualNetworkFragment -from .operation_metadata_paged import OperationMetadataPaged -from .lab_paged import LabPaged -from .lab_vhd_paged import LabVhdPaged -from .schedule_paged import SchedulePaged -from .artifact_source_paged import ArtifactSourcePaged -from .arm_template_paged import ArmTemplatePaged -from .artifact_paged import ArtifactPaged -from .custom_image_paged import CustomImagePaged -from .formula_paged import FormulaPaged -from .gallery_image_paged import GalleryImagePaged -from .notification_channel_paged import NotificationChannelPaged -from .policy_paged import PolicyPaged -from .service_runner_paged import ServiceRunnerPaged -from .user_paged import UserPaged -from .disk_paged import DiskPaged -from .dtl_environment_paged import DtlEnvironmentPaged -from .secret_paged import SecretPaged -from .service_fabric_paged import ServiceFabricPaged -from .lab_virtual_machine_paged import LabVirtualMachinePaged -from .virtual_network_paged import VirtualNetworkPaged -from .dev_test_labs_client_enums import ( + from ._models import ApplicableSchedule + from ._models import ApplicableScheduleFragment + from ._models import ApplyArtifactsRequest + from ._models import ArmTemplate + from ._models import ArmTemplateInfo + from ._models import ArmTemplateParameterProperties + from ._models import ArmTemplateParameterPropertiesFragment + from ._models import Artifact + from ._models import ArtifactDeploymentStatusProperties + from ._models import ArtifactDeploymentStatusPropertiesFragment + from ._models import ArtifactInstallProperties + from ._models import ArtifactInstallPropertiesFragment + from ._models import ArtifactParameterProperties + from ._models import ArtifactParameterPropertiesFragment + from ._models import ArtifactSource + from ._models import ArtifactSourceFragment + from ._models import AttachDiskProperties + from ._models import AttachNewDataDiskOptions + from ._models import AttachNewDataDiskOptionsFragment + from ._models import BulkCreationParameters + from ._models import BulkCreationParametersFragment + from ._models import ComputeDataDisk + from ._models import ComputeDataDiskFragment + from ._models import ComputeVmInstanceViewStatus + from ._models import ComputeVmInstanceViewStatusFragment + from ._models import ComputeVmProperties + from ._models import ComputeVmPropertiesFragment + from ._models import CostThresholdProperties + from ._models import CustomImage + from ._models import CustomImageFragment + from ._models import CustomImagePropertiesCustom + from ._models import CustomImagePropertiesCustomFragment + from ._models import CustomImagePropertiesFromPlan + from ._models import CustomImagePropertiesFromPlanFragment + from ._models import CustomImagePropertiesFromVm + from ._models import CustomImagePropertiesFromVmFragment + from ._models import DataDiskProperties + from ._models import DataDiskPropertiesFragment + from ._models import DataDiskStorageTypeInfo + from ._models import DataDiskStorageTypeInfoFragment + from ._models import DayDetails + from ._models import DayDetailsFragment + from ._models import DetachDataDiskProperties + from ._models import DetachDiskProperties + from ._models import Disk + from ._models import DiskFragment + from ._models import DtlEnvironment + from ._models import DtlEnvironmentFragment + from ._models import EnvironmentDeploymentProperties + from ._models import EnvironmentDeploymentPropertiesFragment + from ._models import EvaluatePoliciesProperties + from ._models import EvaluatePoliciesRequest + from ._models import EvaluatePoliciesResponse + from ._models import Event + from ._models import EventFragment + from ._models import ExportResourceUsageParameters + from ._models import ExternalSubnet + from ._models import ExternalSubnetFragment + from ._models import Formula + from ._models import FormulaFragment + from ._models import FormulaPropertiesFromVm + from ._models import FormulaPropertiesFromVmFragment + from ._models import GalleryImage + from ._models import GalleryImageReference + from ._models import GalleryImageReferenceFragment + from ._models import GenerateArmTemplateRequest + from ._models import GenerateUploadUriParameter + from ._models import GenerateUploadUriResponse + from ._models import HourDetails + from ._models import HourDetailsFragment + from ._models import IdentityProperties + from ._models import ImportLabVirtualMachineRequest + from ._models import InboundNatRule + from ._models import InboundNatRuleFragment + from ._models import Lab + from ._models import LabAnnouncementProperties + from ._models import LabAnnouncementPropertiesFragment + from ._models import LabCost + from ._models import LabCostDetailsProperties + from ._models import LabCostSummaryProperties + from ._models import LabFragment + from ._models import LabResourceCostProperties + from ._models import LabSupportProperties + from ._models import LabSupportPropertiesFragment + from ._models import LabVhd + from ._models import LabVirtualMachine + from ._models import LabVirtualMachineCreationParameter + from ._models import LabVirtualMachineCreationParameterFragment + from ._models import LabVirtualMachineFragment + from ._models import LinuxOsInfo + from ._models import LinuxOsInfoFragment + from ._models import NetworkInterfaceProperties + from ._models import NetworkInterfacePropertiesFragment + from ._models import NotificationChannel + from ._models import NotificationChannelFragment + from ._models import NotificationSettings + from ._models import NotificationSettingsFragment + from ._models import NotifyParameters + from ._models import OperationError + from ._models import OperationMetadata + from ._models import OperationMetadataDisplay + from ._models import OperationResult + from ._models import ParameterInfo + from ._models import ParametersValueFileInfo + from ._models import PercentageCostThresholdProperties + from ._models import Policy + from ._models import PolicyFragment + from ._models import PolicySetResult + from ._models import PolicyViolation + from ._models import Port + from ._models import PortFragment + from ._models import RdpConnection + from ._models import ResizeLabVirtualMachineProperties + from ._models import Resource + from ._models import RetargetScheduleProperties + from ._models import Schedule + from ._models import ScheduleCreationParameter + from ._models import ScheduleCreationParameterFragment + from ._models import ScheduleFragment + from ._models import Secret + from ._models import SecretFragment + from ._models import ServiceFabric + from ._models import ServiceFabricFragment + from ._models import ServiceRunner + from ._models import SharedPublicIpAddressConfiguration + from ._models import SharedPublicIpAddressConfigurationFragment + from ._models import ShutdownNotificationContent + from ._models import Subnet + from ._models import SubnetFragment + from ._models import SubnetOverride + from ._models import SubnetOverrideFragment + from ._models import SubnetSharedPublicIpAddressConfiguration + from ._models import SubnetSharedPublicIpAddressConfigurationFragment + from ._models import TargetCostProperties + from ._models import UpdateResource + from ._models import User + from ._models import UserFragment + from ._models import UserIdentity + from ._models import UserIdentityFragment + from ._models import UserSecretStore + from ._models import UserSecretStoreFragment + from ._models import VirtualNetwork + from ._models import VirtualNetworkFragment + from ._models import WeekDetails + from ._models import WeekDetailsFragment + from ._models import WindowsOsInfo + from ._models import WindowsOsInfoFragment +from ._paged_models import ArmTemplatePaged +from ._paged_models import ArtifactPaged +from ._paged_models import ArtifactSourcePaged +from ._paged_models import CustomImagePaged +from ._paged_models import DiskPaged +from ._paged_models import DtlEnvironmentPaged +from ._paged_models import FormulaPaged +from ._paged_models import GalleryImagePaged +from ._paged_models import LabPaged +from ._paged_models import LabVhdPaged +from ._paged_models import LabVirtualMachinePaged +from ._paged_models import NotificationChannelPaged +from ._paged_models import OperationMetadataPaged +from ._paged_models import PolicyPaged +from ._paged_models import SchedulePaged +from ._paged_models import SecretPaged +from ._paged_models import ServiceFabricPaged +from ._paged_models import UserPaged +from ._paged_models import VirtualNetworkPaged +from ._dev_test_labs_client_enums import ( EnableStatus, SourceControlType, StorageType, @@ -351,22 +350,9 @@ ) __all__ = [ - 'WeekDetails', - 'DayDetails', - 'HourDetails', - 'NotificationSettings', - 'Schedule', 'ApplicableSchedule', - 'WeekDetailsFragment', - 'DayDetailsFragment', - 'HourDetailsFragment', - 'NotificationSettingsFragment', - 'ScheduleFragment', 'ApplicableScheduleFragment', - 'ArtifactParameterProperties', - 'ArtifactInstallProperties', 'ApplyArtifactsRequest', - 'ParametersValueFileInfo', 'ArmTemplate', 'ArmTemplateInfo', 'ArmTemplateParameterProperties', @@ -374,8 +360,10 @@ 'Artifact', 'ArtifactDeploymentStatusProperties', 'ArtifactDeploymentStatusPropertiesFragment', - 'ArtifactParameterPropertiesFragment', + 'ArtifactInstallProperties', 'ArtifactInstallPropertiesFragment', + 'ArtifactParameterProperties', + 'ArtifactParameterPropertiesFragment', 'ArtifactSource', 'ArtifactSourceFragment', 'AttachDiskProperties', @@ -389,115 +377,126 @@ 'ComputeVmInstanceViewStatusFragment', 'ComputeVmProperties', 'ComputeVmPropertiesFragment', - 'PercentageCostThresholdProperties', 'CostThresholdProperties', - 'WindowsOsInfo', - 'LinuxOsInfo', - 'CustomImagePropertiesFromVm', - 'CustomImagePropertiesCustom', - 'DataDiskStorageTypeInfo', - 'CustomImagePropertiesFromPlan', 'CustomImage', - 'WindowsOsInfoFragment', - 'LinuxOsInfoFragment', - 'CustomImagePropertiesFromVmFragment', + 'CustomImageFragment', + 'CustomImagePropertiesCustom', 'CustomImagePropertiesCustomFragment', - 'DataDiskStorageTypeInfoFragment', + 'CustomImagePropertiesFromPlan', 'CustomImagePropertiesFromPlanFragment', - 'CustomImageFragment', + 'CustomImagePropertiesFromVm', + 'CustomImagePropertiesFromVmFragment', 'DataDiskProperties', 'DataDiskPropertiesFragment', + 'DataDiskStorageTypeInfo', + 'DataDiskStorageTypeInfoFragment', + 'DayDetails', + 'DayDetailsFragment', 'DetachDataDiskProperties', 'DetachDiskProperties', 'Disk', 'DiskFragment', - 'EnvironmentDeploymentProperties', 'DtlEnvironment', - 'EnvironmentDeploymentPropertiesFragment', 'DtlEnvironmentFragment', + 'EnvironmentDeploymentProperties', + 'EnvironmentDeploymentPropertiesFragment', 'EvaluatePoliciesProperties', 'EvaluatePoliciesRequest', - 'PolicyViolation', - 'PolicySetResult', 'EvaluatePoliciesResponse', 'Event', 'EventFragment', 'ExportResourceUsageParameters', 'ExternalSubnet', 'ExternalSubnetFragment', - 'GalleryImageReference', - 'InboundNatRule', - 'SharedPublicIpAddressConfiguration', - 'NetworkInterfaceProperties', - 'ScheduleCreationParameter', - 'LabVirtualMachineCreationParameter', - 'FormulaPropertiesFromVm', 'Formula', - 'GalleryImageReferenceFragment', - 'InboundNatRuleFragment', - 'SharedPublicIpAddressConfigurationFragment', - 'NetworkInterfacePropertiesFragment', - 'ScheduleCreationParameterFragment', - 'LabVirtualMachineCreationParameterFragment', - 'FormulaPropertiesFromVmFragment', 'FormulaFragment', + 'FormulaPropertiesFromVm', + 'FormulaPropertiesFromVmFragment', 'GalleryImage', - 'ParameterInfo', + 'GalleryImageReference', + 'GalleryImageReferenceFragment', 'GenerateArmTemplateRequest', 'GenerateUploadUriParameter', 'GenerateUploadUriResponse', + 'HourDetails', + 'HourDetailsFragment', 'IdentityProperties', 'ImportLabVirtualMachineRequest', - 'LabAnnouncementProperties', - 'LabSupportProperties', + 'InboundNatRule', + 'InboundNatRuleFragment', 'Lab', + 'LabAnnouncementProperties', 'LabAnnouncementPropertiesFragment', - 'TargetCostProperties', - 'LabCostSummaryProperties', + 'LabCost', 'LabCostDetailsProperties', + 'LabCostSummaryProperties', + 'LabFragment', 'LabResourceCostProperties', - 'LabCost', + 'LabSupportProperties', 'LabSupportPropertiesFragment', - 'LabFragment', 'LabVhd', 'LabVirtualMachine', + 'LabVirtualMachineCreationParameter', + 'LabVirtualMachineCreationParameterFragment', 'LabVirtualMachineFragment', + 'LinuxOsInfo', + 'LinuxOsInfoFragment', + 'NetworkInterfaceProperties', + 'NetworkInterfacePropertiesFragment', 'NotificationChannel', 'NotificationChannelFragment', + 'NotificationSettings', + 'NotificationSettingsFragment', 'NotifyParameters', 'OperationError', - 'OperationMetadataDisplay', 'OperationMetadata', + 'OperationMetadataDisplay', 'OperationResult', + 'ParameterInfo', + 'ParametersValueFileInfo', + 'PercentageCostThresholdProperties', 'Policy', 'PolicyFragment', + 'PolicySetResult', + 'PolicyViolation', 'Port', 'PortFragment', 'RdpConnection', 'ResizeLabVirtualMachineProperties', 'Resource', 'RetargetScheduleProperties', + 'Schedule', + 'ScheduleCreationParameter', + 'ScheduleCreationParameterFragment', + 'ScheduleFragment', 'Secret', 'SecretFragment', 'ServiceFabric', 'ServiceFabricFragment', 'ServiceRunner', + 'SharedPublicIpAddressConfiguration', + 'SharedPublicIpAddressConfigurationFragment', 'ShutdownNotificationContent', 'Subnet', 'SubnetFragment', - 'SubnetSharedPublicIpAddressConfiguration', 'SubnetOverride', - 'SubnetSharedPublicIpAddressConfigurationFragment', 'SubnetOverrideFragment', + 'SubnetSharedPublicIpAddressConfiguration', + 'SubnetSharedPublicIpAddressConfigurationFragment', + 'TargetCostProperties', 'UpdateResource', - 'UserIdentity', - 'UserSecretStore', 'User', + 'UserFragment', + 'UserIdentity', 'UserIdentityFragment', + 'UserSecretStore', 'UserSecretStoreFragment', - 'UserFragment', 'VirtualNetwork', 'VirtualNetworkFragment', + 'WeekDetails', + 'WeekDetailsFragment', + 'WindowsOsInfo', + 'WindowsOsInfoFragment', 'OperationMetadataPaged', 'LabPaged', 'LabVhdPaged', @@ -510,7 +509,6 @@ 'GalleryImagePaged', 'NotificationChannelPaged', 'PolicyPaged', - 'ServiceRunnerPaged', 'UserPaged', 'DiskPaged', 'DtlEnvironmentPaged', diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dev_test_labs_client_enums.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_dev_test_labs_client_enums.py similarity index 98% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dev_test_labs_client_enums.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_dev_test_labs_client_enums.py index 035e4b81b91c..6a60d733ee01 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dev_test_labs_client_enums.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_dev_test_labs_client_enums.py @@ -28,6 +28,7 @@ class StorageType(str, Enum): standard = "Standard" premium = "Premium" + standard_ssd = "StandardSSD" class CostThresholdStatus(str, Enum): @@ -80,6 +81,7 @@ class VirtualMachineCreationSource(str, Enum): from_custom_image = "FromCustomImage" from_gallery_image = "FromGalleryImage" + from_shared_gallery_image = "FromSharedGalleryImage" class FileUploadOptions(str, Enum): diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models.py new file mode 100644 index 000000000000..cd489495c90c --- /dev/null +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models.py @@ -0,0 +1,5702 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Resource(Model): + """An Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ApplicableSchedule(Resource): + """Schedules applicable to a virtual machine. The schedules may have been + defined on a VM or on lab level. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set + at the lab or lab resource level. + :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.Schedule + :param lab_vms_startup: The auto-startup schedule, if one has been set at + the lab or lab resource level. + :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.Schedule + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'Schedule'}, + 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'Schedule'}, + } + + def __init__(self, **kwargs): + super(ApplicableSchedule, self).__init__(**kwargs) + self.lab_vms_shutdown = kwargs.get('lab_vms_shutdown', None) + self.lab_vms_startup = kwargs.get('lab_vms_startup', None) + + +class UpdateResource(Model): + """Represents an update resource. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(UpdateResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class ApplicableScheduleFragment(UpdateResource): + """Schedules applicable to a virtual machine. The schedules may have been + defined on a VM or on lab level. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set + at the lab or lab resource level. + :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.ScheduleFragment + :param lab_vms_startup: The auto-startup schedule, if one has been set at + the lab or lab resource level. + :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.ScheduleFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'ScheduleFragment'}, + 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'ScheduleFragment'}, + } + + def __init__(self, **kwargs): + super(ApplicableScheduleFragment, self).__init__(**kwargs) + self.lab_vms_shutdown = kwargs.get('lab_vms_shutdown', None) + self.lab_vms_startup = kwargs.get('lab_vms_startup', None) + + +class ApplyArtifactsRequest(Model): + """Request body for applying artifacts to a virtual machine. + + :param artifacts: The list of artifacts to apply. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + """ + + _attribute_map = { + 'artifacts': {'key': 'artifacts', 'type': '[ArtifactInstallProperties]'}, + } + + def __init__(self, **kwargs): + super(ApplyArtifactsRequest, self).__init__(**kwargs) + self.artifacts = kwargs.get('artifacts', None) + + +class ArmTemplate(Resource): + """An Azure Resource Manager template. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar display_name: The display name of the ARM template. + :vartype display_name: str + :ivar description: The description of the ARM template. + :vartype description: str + :ivar publisher: The publisher of the ARM template. + :vartype publisher: str + :ivar icon: The URI to the icon of the ARM template. + :vartype icon: str + :ivar contents: The contents of the ARM template. + :vartype contents: object + :ivar created_date: The creation date of the armTemplate. + :vartype created_date: datetime + :ivar parameters_value_files_info: File name and parameter values + information from all azuredeploy.*.parameters.json for the ARM template. + :vartype parameters_value_files_info: + list[~azure.mgmt.devtestlabs.models.ParametersValueFileInfo] + :ivar enabled: Whether or not ARM template is enabled for use by lab user. + :vartype enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'publisher': {'readonly': True}, + 'icon': {'readonly': True}, + 'contents': {'readonly': True}, + 'created_date': {'readonly': True}, + 'parameters_value_files_info': {'readonly': True}, + 'enabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'contents': {'key': 'properties.contents', 'type': 'object'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'parameters_value_files_info': {'key': 'properties.parametersValueFilesInfo', 'type': '[ParametersValueFileInfo]'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ArmTemplate, self).__init__(**kwargs) + self.display_name = None + self.description = None + self.publisher = None + self.icon = None + self.contents = None + self.created_date = None + self.parameters_value_files_info = None + self.enabled = None + + +class ArmTemplateInfo(Model): + """Information about a generated ARM template. + + :param template: The template's contents. + :type template: object + :param parameters: The parameters of the ARM template. + :type parameters: object + """ + + _attribute_map = { + 'template': {'key': 'template', 'type': 'object'}, + 'parameters': {'key': 'parameters', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ArmTemplateInfo, self).__init__(**kwargs) + self.template = kwargs.get('template', None) + self.parameters = kwargs.get('parameters', None) + + +class ArmTemplateParameterProperties(Model): + """Properties of an Azure Resource Manager template parameter. + + :param name: The name of the template parameter. + :type name: str + :param value: The value of the template parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArmTemplateParameterProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class ArmTemplateParameterPropertiesFragment(Model): + """Properties of an Azure Resource Manager template parameter. + + :param name: The name of the template parameter. + :type name: str + :param value: The value of the template parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArmTemplateParameterPropertiesFragment, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class Artifact(Resource): + """An artifact. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar title: The artifact's title. + :vartype title: str + :ivar description: The artifact's description. + :vartype description: str + :ivar publisher: The artifact's publisher. + :vartype publisher: str + :ivar file_path: The file path to the artifact. + :vartype file_path: str + :ivar icon: The URI to the artifact icon. + :vartype icon: str + :ivar target_os_type: The artifact's target OS. + :vartype target_os_type: str + :ivar parameters: The artifact's parameters. + :vartype parameters: object + :ivar created_date: The artifact's creation date. + :vartype created_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'title': {'readonly': True}, + 'description': {'readonly': True}, + 'publisher': {'readonly': True}, + 'file_path': {'readonly': True}, + 'icon': {'readonly': True}, + 'target_os_type': {'readonly': True}, + 'parameters': {'readonly': True}, + 'created_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'file_path': {'key': 'properties.filePath', 'type': 'str'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'target_os_type': {'key': 'properties.targetOsType', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': 'object'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(Artifact, self).__init__(**kwargs) + self.title = None + self.description = None + self.publisher = None + self.file_path = None + self.icon = None + self.target_os_type = None + self.parameters = None + self.created_date = None + + +class ArtifactDeploymentStatusProperties(Model): + """Properties of an artifact deployment. + + :param deployment_status: The deployment status of the artifact. + :type deployment_status: str + :param artifacts_applied: The total count of the artifacts that were + successfully applied. + :type artifacts_applied: int + :param total_artifacts: The total count of the artifacts that were + tentatively applied. + :type total_artifacts: int + """ + + _attribute_map = { + 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, + 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, + 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ArtifactDeploymentStatusProperties, self).__init__(**kwargs) + self.deployment_status = kwargs.get('deployment_status', None) + self.artifacts_applied = kwargs.get('artifacts_applied', None) + self.total_artifacts = kwargs.get('total_artifacts', None) + + +class ArtifactDeploymentStatusPropertiesFragment(Model): + """Properties of an artifact deployment. + + :param deployment_status: The deployment status of the artifact. + :type deployment_status: str + :param artifacts_applied: The total count of the artifacts that were + successfully applied. + :type artifacts_applied: int + :param total_artifacts: The total count of the artifacts that were + tentatively applied. + :type total_artifacts: int + """ + + _attribute_map = { + 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, + 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, + 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ArtifactDeploymentStatusPropertiesFragment, self).__init__(**kwargs) + self.deployment_status = kwargs.get('deployment_status', None) + self.artifacts_applied = kwargs.get('artifacts_applied', None) + self.total_artifacts = kwargs.get('total_artifacts', None) + + +class ArtifactInstallProperties(Model): + """Properties of an artifact. + + :param artifact_id: The artifact's identifier. + :type artifact_id: str + :param artifact_title: The artifact's title. + :type artifact_title: str + :param parameters: The parameters of the artifact. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArtifactParameterProperties] + :param status: The status of the artifact. + :type status: str + :param deployment_status_message: The status message from the deployment. + :type deployment_status_message: str + :param vm_extension_status_message: The status message from the virtual + machine extension. + :type vm_extension_status_message: str + :param install_time: The time that the artifact starts to install on the + virtual machine. + :type install_time: datetime + """ + + _attribute_map = { + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterProperties]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, + 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, + 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ArtifactInstallProperties, self).__init__(**kwargs) + self.artifact_id = kwargs.get('artifact_id', None) + self.artifact_title = kwargs.get('artifact_title', None) + self.parameters = kwargs.get('parameters', None) + self.status = kwargs.get('status', None) + self.deployment_status_message = kwargs.get('deployment_status_message', None) + self.vm_extension_status_message = kwargs.get('vm_extension_status_message', None) + self.install_time = kwargs.get('install_time', None) + + +class ArtifactInstallPropertiesFragment(Model): + """Properties of an artifact. + + :param artifact_id: The artifact's identifier. + :type artifact_id: str + :param artifact_title: The artifact's title. + :type artifact_title: str + :param parameters: The parameters of the artifact. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArtifactParameterPropertiesFragment] + :param status: The status of the artifact. + :type status: str + :param deployment_status_message: The status message from the deployment. + :type deployment_status_message: str + :param vm_extension_status_message: The status message from the virtual + machine extension. + :type vm_extension_status_message: str + :param install_time: The time that the artifact starts to install on the + virtual machine. + :type install_time: datetime + """ + + _attribute_map = { + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterPropertiesFragment]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, + 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, + 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ArtifactInstallPropertiesFragment, self).__init__(**kwargs) + self.artifact_id = kwargs.get('artifact_id', None) + self.artifact_title = kwargs.get('artifact_title', None) + self.parameters = kwargs.get('parameters', None) + self.status = kwargs.get('status', None) + self.deployment_status_message = kwargs.get('deployment_status_message', None) + self.vm_extension_status_message = kwargs.get('vm_extension_status_message', None) + self.install_time = kwargs.get('install_time', None) + + +class ArtifactParameterProperties(Model): + """Properties of an artifact parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArtifactParameterProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class ArtifactParameterPropertiesFragment(Model): + """Properties of an artifact parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArtifactParameterPropertiesFragment, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class ArtifactSource(Resource): + """Properties of an artifact source. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param display_name: The artifact source's display name. + :type display_name: str + :param uri: The artifact source's URI. + :type uri: str + :param source_type: The artifact source's type. Possible values include: + 'VsoGit', 'GitHub' + :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType + :param folder_path: The folder containing artifacts. + :type folder_path: str + :param arm_template_folder_path: The folder containing Azure Resource + Manager templates. + :type arm_template_folder_path: str + :param branch_ref: The artifact source's branch reference. + :type branch_ref: str + :param security_token: The security token to authenticate to the artifact + source. + :type security_token: str + :param status: Indicates if the artifact source is enabled (values: + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :ivar created_date: The artifact source's creation date. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, + 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, + 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArtifactSource, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.uri = kwargs.get('uri', None) + self.source_type = kwargs.get('source_type', None) + self.folder_path = kwargs.get('folder_path', None) + self.arm_template_folder_path = kwargs.get('arm_template_folder_path', None) + self.branch_ref = kwargs.get('branch_ref', None) + self.security_token = kwargs.get('security_token', None) + self.status = kwargs.get('status', None) + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class ArtifactSourceFragment(UpdateResource): + """Properties of an artifact source. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param display_name: The artifact source's display name. + :type display_name: str + :param uri: The artifact source's URI. + :type uri: str + :param source_type: The artifact source's type. Possible values include: + 'VsoGit', 'GitHub' + :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType + :param folder_path: The folder containing artifacts. + :type folder_path: str + :param arm_template_folder_path: The folder containing Azure Resource + Manager templates. + :type arm_template_folder_path: str + :param branch_ref: The artifact source's branch reference. + :type branch_ref: str + :param security_token: The security token to authenticate to the artifact + source. + :type security_token: str + :param status: Indicates if the artifact source is enabled (values: + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, + 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, + 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArtifactSourceFragment, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.uri = kwargs.get('uri', None) + self.source_type = kwargs.get('source_type', None) + self.folder_path = kwargs.get('folder_path', None) + self.arm_template_folder_path = kwargs.get('arm_template_folder_path', None) + self.branch_ref = kwargs.get('branch_ref', None) + self.security_token = kwargs.get('security_token', None) + self.status = kwargs.get('status', None) + + +class AttachDiskProperties(Model): + """Properties of the disk to attach. + + :param leased_by_lab_vm_id: The resource ID of the Lab virtual machine to + which the disk is attached. + :type leased_by_lab_vm_id: str + """ + + _attribute_map = { + 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AttachDiskProperties, self).__init__(**kwargs) + self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) + + +class AttachNewDataDiskOptions(Model): + """Properties to attach new disk to the Virtual Machine. + + :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :type disk_size_gi_b: int + :param disk_name: The name of the disk to be attached. + :type disk_name: str + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + 'disk_name': {'key': 'diskName', 'type': 'str'}, + 'disk_type': {'key': 'diskType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AttachNewDataDiskOptions, self).__init__(**kwargs) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + self.disk_name = kwargs.get('disk_name', None) + self.disk_type = kwargs.get('disk_type', None) + + +class AttachNewDataDiskOptionsFragment(Model): + """Properties to attach new disk to the Virtual Machine. + + :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :type disk_size_gi_b: int + :param disk_name: The name of the disk to be attached. + :type disk_name: str + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + 'disk_name': {'key': 'diskName', 'type': 'str'}, + 'disk_type': {'key': 'diskType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AttachNewDataDiskOptionsFragment, self).__init__(**kwargs) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + self.disk_name = kwargs.get('disk_name', None) + self.disk_type = kwargs.get('disk_type', None) + + +class BulkCreationParameters(Model): + """Parameters for creating multiple virtual machines as a single action. + + :param instance_count: The number of virtual machine instances to create. + :type instance_count: int + """ + + _attribute_map = { + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BulkCreationParameters, self).__init__(**kwargs) + self.instance_count = kwargs.get('instance_count', None) + + +class BulkCreationParametersFragment(Model): + """Parameters for creating multiple virtual machines as a single action. + + :param instance_count: The number of virtual machine instances to create. + :type instance_count: int + """ + + _attribute_map = { + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BulkCreationParametersFragment, self).__init__(**kwargs) + self.instance_count = kwargs.get('instance_count', None) + + +class CloudError(Model): + """Error from a REST request. + + :param error: The cloud error that occurred + :type error: ~azure.mgmt.devtestlabs.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, **kwargs): + super(CloudError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """Body of an error from a REST request. + + :param code: The error code. + :type code: str + :param message: The error message. + :type message: str + :param target: The error target. + :type target: str + :param details: Inner errors. + :type details: list[~azure.mgmt.devtestlabs.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, **kwargs): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class ComputeDataDisk(Model): + """A data disks attached to a virtual machine. + + :param name: Gets data disk name. + :type name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :param disk_size_gi_b: Gets data disk size in GiB. + :type disk_size_gi_b: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disk_uri': {'key': 'diskUri', 'type': 'str'}, + 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ComputeDataDisk, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.disk_uri = kwargs.get('disk_uri', None) + self.managed_disk_id = kwargs.get('managed_disk_id', None) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + + +class ComputeDataDiskFragment(Model): + """A data disks attached to a virtual machine. + + :param name: Gets data disk name. + :type name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :param disk_size_gi_b: Gets data disk size in GiB. + :type disk_size_gi_b: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disk_uri': {'key': 'diskUri', 'type': 'str'}, + 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ComputeDataDiskFragment, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.disk_uri = kwargs.get('disk_uri', None) + self.managed_disk_id = kwargs.get('managed_disk_id', None) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + + +class ComputeVmInstanceViewStatus(Model): + """Status information about a virtual machine. + + :param code: Gets the status Code. + :type code: str + :param display_status: Gets the short localizable label for the status. + :type display_status: str + :param message: Gets the message associated with the status. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComputeVmInstanceViewStatus, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.display_status = kwargs.get('display_status', None) + self.message = kwargs.get('message', None) + + +class ComputeVmInstanceViewStatusFragment(Model): + """Status information about a virtual machine. + + :param code: Gets the status Code. + :type code: str + :param display_status: Gets the short localizable label for the status. + :type display_status: str + :param message: Gets the message associated with the status. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComputeVmInstanceViewStatusFragment, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.display_status = kwargs.get('display_status', None) + self.message = kwargs.get('message', None) + + +class ComputeVmProperties(Model): + """Properties of a virtual machine returned by the Microsoft.Compute API. + + :param statuses: Gets the statuses of the virtual machine. + :type statuses: + list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatus] + :param os_type: Gets the OS type of the virtual machine. + :type os_type: str + :param vm_size: Gets the size of the virtual machine. + :type vm_size: str + :param network_interface_id: Gets the network interface ID of the virtual + machine. + :type network_interface_id: str + :param os_disk_id: Gets OS disk blob uri for the virtual machine. + :type os_disk_id: str + :param data_disk_ids: Gets data disks blob uri for the virtual machine. + :type data_disk_ids: list[str] + :param data_disks: Gets all data disks attached to the virtual machine. + :type data_disks: list[~azure.mgmt.devtestlabs.models.ComputeDataDisk] + """ + + _attribute_map = { + 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatus]'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, + 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, + 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDisk]'}, + } + + def __init__(self, **kwargs): + super(ComputeVmProperties, self).__init__(**kwargs) + self.statuses = kwargs.get('statuses', None) + self.os_type = kwargs.get('os_type', None) + self.vm_size = kwargs.get('vm_size', None) + self.network_interface_id = kwargs.get('network_interface_id', None) + self.os_disk_id = kwargs.get('os_disk_id', None) + self.data_disk_ids = kwargs.get('data_disk_ids', None) + self.data_disks = kwargs.get('data_disks', None) + + +class ComputeVmPropertiesFragment(Model): + """Properties of a virtual machine returned by the Microsoft.Compute API. + + :param statuses: Gets the statuses of the virtual machine. + :type statuses: + list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatusFragment] + :param os_type: Gets the OS type of the virtual machine. + :type os_type: str + :param vm_size: Gets the size of the virtual machine. + :type vm_size: str + :param network_interface_id: Gets the network interface ID of the virtual + machine. + :type network_interface_id: str + :param os_disk_id: Gets OS disk blob uri for the virtual machine. + :type os_disk_id: str + :param data_disk_ids: Gets data disks blob uri for the virtual machine. + :type data_disk_ids: list[str] + :param data_disks: Gets all data disks attached to the virtual machine. + :type data_disks: + list[~azure.mgmt.devtestlabs.models.ComputeDataDiskFragment] + """ + + _attribute_map = { + 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatusFragment]'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, + 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, + 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDiskFragment]'}, + } + + def __init__(self, **kwargs): + super(ComputeVmPropertiesFragment, self).__init__(**kwargs) + self.statuses = kwargs.get('statuses', None) + self.os_type = kwargs.get('os_type', None) + self.vm_size = kwargs.get('vm_size', None) + self.network_interface_id = kwargs.get('network_interface_id', None) + self.os_disk_id = kwargs.get('os_disk_id', None) + self.data_disk_ids = kwargs.get('data_disk_ids', None) + self.data_disks = kwargs.get('data_disks', None) + + +class CostThresholdProperties(Model): + """Properties of a cost threshold item. + + :param threshold_id: The ID of the cost threshold item. + :type threshold_id: str + :param percentage_threshold: The value of the percentage cost threshold. + :type percentage_threshold: + ~azure.mgmt.devtestlabs.models.PercentageCostThresholdProperties + :param display_on_chart: Indicates whether this threshold will be + displayed on cost charts. Possible values include: 'Enabled', 'Disabled' + :type display_on_chart: str or + ~azure.mgmt.devtestlabs.models.CostThresholdStatus + :param send_notification_when_exceeded: Indicates whether notifications + will be sent when this threshold is exceeded. Possible values include: + 'Enabled', 'Disabled' + :type send_notification_when_exceeded: str or + ~azure.mgmt.devtestlabs.models.CostThresholdStatus + :param notification_sent: Indicates the datetime when notifications were + last sent for this threshold. + :type notification_sent: str + """ + + _attribute_map = { + 'threshold_id': {'key': 'thresholdId', 'type': 'str'}, + 'percentage_threshold': {'key': 'percentageThreshold', 'type': 'PercentageCostThresholdProperties'}, + 'display_on_chart': {'key': 'displayOnChart', 'type': 'str'}, + 'send_notification_when_exceeded': {'key': 'sendNotificationWhenExceeded', 'type': 'str'}, + 'notification_sent': {'key': 'notificationSent', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CostThresholdProperties, self).__init__(**kwargs) + self.threshold_id = kwargs.get('threshold_id', None) + self.percentage_threshold = kwargs.get('percentage_threshold', None) + self.display_on_chart = kwargs.get('display_on_chart', None) + self.send_notification_when_exceeded = kwargs.get('send_notification_when_exceeded', None) + self.notification_sent = kwargs.get('notification_sent', None) + + +class CustomImage(Resource): + """A custom image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param vm: The virtual machine from which the image is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVm + :param vhd: The VHD from which the image is to be created. + :type vhd: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustom + :param description: The description of the custom image. + :type description: str + :param author: The author of the custom image. + :type author: str + :ivar creation_date: The creation date of the custom image. + :vartype creation_date: datetime + :param managed_image_id: The Managed Image Id backing the custom image. + :type managed_image_id: str + :param managed_snapshot_id: The Managed Snapshot Id backing the custom + image. + :type managed_snapshot_id: str + :param data_disk_storage_info: Storage information about the data disks + present in the custom image + :type data_disk_storage_info: + list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfo] + :param custom_image_plan: Storage information about the plan related to + this custom image + :type custom_image_plan: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlan + :param is_plan_authorized: Whether or not the custom images underlying + offer/plan has been enabled for programmatic deployment + :type is_plan_authorized: bool + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVm'}, + 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustom'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, + 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, + 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfo]'}, + 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlan'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomImage, self).__init__(**kwargs) + self.vm = kwargs.get('vm', None) + self.vhd = kwargs.get('vhd', None) + self.description = kwargs.get('description', None) + self.author = kwargs.get('author', None) + self.creation_date = None + self.managed_image_id = kwargs.get('managed_image_id', None) + self.managed_snapshot_id = kwargs.get('managed_snapshot_id', None) + self.data_disk_storage_info = kwargs.get('data_disk_storage_info', None) + self.custom_image_plan = kwargs.get('custom_image_plan', None) + self.is_plan_authorized = kwargs.get('is_plan_authorized', None) + self.provisioning_state = None + self.unique_identifier = None + + +class CustomImageFragment(UpdateResource): + """A custom image. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param vm: The virtual machine from which the image is to be created. + :type vm: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVmFragment + :param vhd: The VHD from which the image is to be created. + :type vhd: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustomFragment + :param description: The description of the custom image. + :type description: str + :param author: The author of the custom image. + :type author: str + :param managed_image_id: The Managed Image Id backing the custom image. + :type managed_image_id: str + :param managed_snapshot_id: The Managed Snapshot Id backing the custom + image. + :type managed_snapshot_id: str + :param data_disk_storage_info: Storage information about the data disks + present in the custom image + :type data_disk_storage_info: + list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfoFragment] + :param custom_image_plan: Storage information about the plan related to + this custom image + :type custom_image_plan: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlanFragment + :param is_plan_authorized: Whether or not the custom images underlying + offer/plan has been enabled for programmatic deployment + :type is_plan_authorized: bool + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVmFragment'}, + 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustomFragment'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, + 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, + 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfoFragment]'}, + 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlanFragment'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(CustomImageFragment, self).__init__(**kwargs) + self.vm = kwargs.get('vm', None) + self.vhd = kwargs.get('vhd', None) + self.description = kwargs.get('description', None) + self.author = kwargs.get('author', None) + self.managed_image_id = kwargs.get('managed_image_id', None) + self.managed_snapshot_id = kwargs.get('managed_snapshot_id', None) + self.data_disk_storage_info = kwargs.get('data_disk_storage_info', None) + self.custom_image_plan = kwargs.get('custom_image_plan', None) + self.is_plan_authorized = kwargs.get('is_plan_authorized', None) + + +class CustomImagePropertiesCustom(Model): + """Properties for creating a custom image from a VHD. + + All required parameters must be populated in order to send to Azure. + + :param image_name: The image name. + :type image_name: str + :param sys_prep: Indicates whether sysprep has been run on the VHD. + :type sys_prep: bool + :param os_type: Required. The OS type of the custom image (i.e. Windows, + Linux). Possible values include: 'Windows', 'Linux', 'None' + :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType + """ + + _validation = { + 'os_type': {'required': True}, + } + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesCustom, self).__init__(**kwargs) + self.image_name = kwargs.get('image_name', None) + self.sys_prep = kwargs.get('sys_prep', None) + self.os_type = kwargs.get('os_type', None) + + +class CustomImagePropertiesCustomFragment(Model): + """Properties for creating a custom image from a VHD. + + :param image_name: The image name. + :type image_name: str + :param sys_prep: Indicates whether sysprep has been run on the VHD. + :type sys_prep: bool + :param os_type: The OS type of the custom image (i.e. Windows, Linux). + Possible values include: 'Windows', 'Linux', 'None' + :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType + """ + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesCustomFragment, self).__init__(**kwargs) + self.image_name = kwargs.get('image_name', None) + self.sys_prep = kwargs.get('sys_prep', None) + self.os_type = kwargs.get('os_type', None) + + +class CustomImagePropertiesFromPlan(Model): + """Properties for plan on a custom image. + + :param id: The id of the plan, equivalent to name of the plan + :type id: str + :param publisher: The publisher for the plan from the marketplace image + the custom image is derived from + :type publisher: str + :param offer: The offer for the plan from the marketplace image the custom + image is derived from + :type offer: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesFromPlan, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) + + +class CustomImagePropertiesFromPlanFragment(Model): + """Properties for plan on a custom image. + + :param id: The id of the plan, equivalent to name of the plan + :type id: str + :param publisher: The publisher for the plan from the marketplace image + the custom image is derived from + :type publisher: str + :param offer: The offer for the plan from the marketplace image the custom + image is derived from + :type offer: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesFromPlanFragment, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) + + +class CustomImagePropertiesFromVm(Model): + """Properties for creating a custom image from a virtual machine. + + :param source_vm_id: The source vm identifier. + :type source_vm_id: str + :param windows_os_info: The Windows OS information of the VM. + :type windows_os_info: ~azure.mgmt.devtestlabs.models.WindowsOsInfo + :param linux_os_info: The Linux OS information of the VM. + :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfo + """ + + _attribute_map = { + 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, + 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfo'}, + 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfo'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesFromVm, self).__init__(**kwargs) + self.source_vm_id = kwargs.get('source_vm_id', None) + self.windows_os_info = kwargs.get('windows_os_info', None) + self.linux_os_info = kwargs.get('linux_os_info', None) + + +class CustomImagePropertiesFromVmFragment(Model): + """Properties for creating a custom image from a virtual machine. + + :param source_vm_id: The source vm identifier. + :type source_vm_id: str + :param windows_os_info: The Windows OS information of the VM. + :type windows_os_info: + ~azure.mgmt.devtestlabs.models.WindowsOsInfoFragment + :param linux_os_info: The Linux OS information of the VM. + :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfoFragment + """ + + _attribute_map = { + 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, + 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfoFragment'}, + 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfoFragment'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesFromVmFragment, self).__init__(**kwargs) + self.source_vm_id = kwargs.get('source_vm_id', None) + self.windows_os_info = kwargs.get('windows_os_info', None) + self.linux_os_info = kwargs.get('linux_os_info', None) + + +class DataDiskProperties(Model): + """Request body for adding a new or existing data disk to a virtual machine. + + :param attach_new_data_disk_options: Specifies options to attach a new + disk to the virtual machine. + :type attach_new_data_disk_options: + ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptions + :param existing_lab_disk_id: Specifies the existing lab disk id to attach + to virtual machine. + :type existing_lab_disk_id: str + :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, + ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type host_caching: str or + ~azure.mgmt.devtestlabs.models.HostCachingOptions + """ + + _attribute_map = { + 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptions'}, + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + 'host_caching': {'key': 'hostCaching', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataDiskProperties, self).__init__(**kwargs) + self.attach_new_data_disk_options = kwargs.get('attach_new_data_disk_options', None) + self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) + self.host_caching = kwargs.get('host_caching', None) + + +class DataDiskPropertiesFragment(Model): + """Request body for adding a new or existing data disk to a virtual machine. + + :param attach_new_data_disk_options: Specifies options to attach a new + disk to the virtual machine. + :type attach_new_data_disk_options: + ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptionsFragment + :param existing_lab_disk_id: Specifies the existing lab disk id to attach + to virtual machine. + :type existing_lab_disk_id: str + :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, + ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type host_caching: str or + ~azure.mgmt.devtestlabs.models.HostCachingOptions + """ + + _attribute_map = { + 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptionsFragment'}, + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + 'host_caching': {'key': 'hostCaching', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataDiskPropertiesFragment, self).__init__(**kwargs) + self.attach_new_data_disk_options = kwargs.get('attach_new_data_disk_options', None) + self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) + self.host_caching = kwargs.get('host_caching', None) + + +class DataDiskStorageTypeInfo(Model): + """Storage information about the data disks present in the custom image. + + :param lun: Disk Lun + :type lun: str + :param storage_type: Disk Storage Type. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataDiskStorageTypeInfo, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.storage_type = kwargs.get('storage_type', None) + + +class DataDiskStorageTypeInfoFragment(Model): + """Storage information about the data disks present in the custom image. + + :param lun: Disk Lun + :type lun: str + :param storage_type: Disk Storage Type. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataDiskStorageTypeInfoFragment, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.storage_type = kwargs.get('storage_type', None) + + +class DayDetails(Model): + """Properties of a daily schedule. + + :param time: The time of day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DayDetails, self).__init__(**kwargs) + self.time = kwargs.get('time', None) + + +class DayDetailsFragment(Model): + """Properties of a daily schedule. + + :param time: The time of day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DayDetailsFragment, self).__init__(**kwargs) + self.time = kwargs.get('time', None) + + +class DetachDataDiskProperties(Model): + """Request body for detaching data disk from a virtual machine. + + :param existing_lab_disk_id: Specifies the disk resource ID to detach from + virtual machine. + :type existing_lab_disk_id: str + """ + + _attribute_map = { + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DetachDataDiskProperties, self).__init__(**kwargs) + self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) + + +class DetachDiskProperties(Model): + """Properties of the disk to detach. + + :param leased_by_lab_vm_id: The resource ID of the Lab VM to which the + disk is attached. + :type leased_by_lab_vm_id: str + """ + + _attribute_map = { + 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DetachDiskProperties, self).__init__(**kwargs) + self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) + + +class Disk(Resource): + """A Disk. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param disk_size_gi_b: The size of the disk in GibiBytes. + :type disk_size_gi_b: int + :param leased_by_lab_vm_id: The resource ID of the VM to which this disk + is leased. + :type leased_by_lab_vm_id: str + :param disk_blob_name: When backed by a blob, the name of the VHD blob + without extension. + :type disk_blob_name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :ivar created_date: The creation date of the disk. + :vartype created_date: datetime + :param host_caching: The host caching policy of the disk (i.e. None, + ReadOnly, ReadWrite). + :type host_caching: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, + 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, + 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, + 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, + 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Disk, self).__init__(**kwargs) + self.disk_type = kwargs.get('disk_type', None) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) + self.disk_blob_name = kwargs.get('disk_blob_name', None) + self.disk_uri = kwargs.get('disk_uri', None) + self.created_date = None + self.host_caching = kwargs.get('host_caching', None) + self.managed_disk_id = kwargs.get('managed_disk_id', None) + self.provisioning_state = None + self.unique_identifier = None + + +class DiskFragment(UpdateResource): + """A Disk. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param disk_size_gi_b: The size of the disk in GibiBytes. + :type disk_size_gi_b: int + :param leased_by_lab_vm_id: The resource ID of the VM to which this disk + is leased. + :type leased_by_lab_vm_id: str + :param disk_blob_name: When backed by a blob, the name of the VHD blob + without extension. + :type disk_blob_name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param host_caching: The host caching policy of the disk (i.e. None, + ReadOnly, ReadWrite). + :type host_caching: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, + 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, + 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, + 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, + 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, + 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DiskFragment, self).__init__(**kwargs) + self.disk_type = kwargs.get('disk_type', None) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) + self.disk_blob_name = kwargs.get('disk_blob_name', None) + self.disk_uri = kwargs.get('disk_uri', None) + self.host_caching = kwargs.get('host_caching', None) + self.managed_disk_id = kwargs.get('managed_disk_id', None) + + +class DtlEnvironment(Resource): + """An environment, which is essentially an ARM template deployment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param deployment_properties: The deployment properties of the + environment. + :type deployment_properties: + ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentProperties + :param arm_template_display_name: The display name of the Azure Resource + Manager template that produced the environment. + :type arm_template_display_name: str + :ivar resource_group_id: The identifier of the resource group containing + the environment's resources. + :vartype resource_group_id: str + :ivar created_by_user: The creator of the environment. + :vartype created_by_user: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_group_id': {'readonly': True}, + 'created_by_user': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentProperties'}, + 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, + 'resource_group_id': {'key': 'properties.resourceGroupId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DtlEnvironment, self).__init__(**kwargs) + self.deployment_properties = kwargs.get('deployment_properties', None) + self.arm_template_display_name = kwargs.get('arm_template_display_name', None) + self.resource_group_id = None + self.created_by_user = None + self.provisioning_state = None + self.unique_identifier = None + + +class DtlEnvironmentFragment(UpdateResource): + """An environment, which is essentially an ARM template deployment. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param deployment_properties: The deployment properties of the + environment. + :type deployment_properties: + ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentPropertiesFragment + :param arm_template_display_name: The display name of the Azure Resource + Manager template that produced the environment. + :type arm_template_display_name: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentPropertiesFragment'}, + 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DtlEnvironmentFragment, self).__init__(**kwargs) + self.deployment_properties = kwargs.get('deployment_properties', None) + self.arm_template_display_name = kwargs.get('arm_template_display_name', None) + + +class EnvironmentDeploymentProperties(Model): + """Properties of an environment deployment. + + :param arm_template_id: The Azure Resource Manager template's identifier. + :type arm_template_id: str + :param parameters: The parameters of the Azure Resource Manager template. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterProperties] + """ + + _attribute_map = { + 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterProperties]'}, + } + + def __init__(self, **kwargs): + super(EnvironmentDeploymentProperties, self).__init__(**kwargs) + self.arm_template_id = kwargs.get('arm_template_id', None) + self.parameters = kwargs.get('parameters', None) + + +class EnvironmentDeploymentPropertiesFragment(Model): + """Properties of an environment deployment. + + :param arm_template_id: The Azure Resource Manager template's identifier. + :type arm_template_id: str + :param parameters: The parameters of the Azure Resource Manager template. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterPropertiesFragment] + """ + + _attribute_map = { + 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterPropertiesFragment]'}, + } + + def __init__(self, **kwargs): + super(EnvironmentDeploymentPropertiesFragment, self).__init__(**kwargs) + self.arm_template_id = kwargs.get('arm_template_id', None) + self.parameters = kwargs.get('parameters', None) + + +class EvaluatePoliciesProperties(Model): + """Properties for evaluating a policy set. + + :param fact_name: The fact name. + :type fact_name: str + :param fact_data: The fact data. + :type fact_data: str + :param value_offset: The value offset. + :type value_offset: str + :param user_object_id: The user for which policies will be evaluated + :type user_object_id: str + """ + + _attribute_map = { + 'fact_name': {'key': 'factName', 'type': 'str'}, + 'fact_data': {'key': 'factData', 'type': 'str'}, + 'value_offset': {'key': 'valueOffset', 'type': 'str'}, + 'user_object_id': {'key': 'userObjectId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EvaluatePoliciesProperties, self).__init__(**kwargs) + self.fact_name = kwargs.get('fact_name', None) + self.fact_data = kwargs.get('fact_data', None) + self.value_offset = kwargs.get('value_offset', None) + self.user_object_id = kwargs.get('user_object_id', None) + + +class EvaluatePoliciesRequest(Model): + """Request body for evaluating a policy set. + + :param policies: Policies to evaluate. + :type policies: + list[~azure.mgmt.devtestlabs.models.EvaluatePoliciesProperties] + """ + + _attribute_map = { + 'policies': {'key': 'policies', 'type': '[EvaluatePoliciesProperties]'}, + } + + def __init__(self, **kwargs): + super(EvaluatePoliciesRequest, self).__init__(**kwargs) + self.policies = kwargs.get('policies', None) + + +class EvaluatePoliciesResponse(Model): + """Response body for evaluating a policy set. + + :param results: Results of evaluating a policy set. + :type results: list[~azure.mgmt.devtestlabs.models.PolicySetResult] + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': '[PolicySetResult]'}, + } + + def __init__(self, **kwargs): + super(EvaluatePoliciesResponse, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + + +class Event(Model): + """An event to be notified for. + + :param event_name: The event type for which this notification is enabled + (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Event, self).__init__(**kwargs) + self.event_name = kwargs.get('event_name', None) + + +class EventFragment(Model): + """An event to be notified for. + + :param event_name: The event type for which this notification is enabled + (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EventFragment, self).__init__(**kwargs) + self.event_name = kwargs.get('event_name', None) + + +class ExportResourceUsageParameters(Model): + """The parameters of the export operation. + + :param blob_storage_absolute_sas_uri: The blob storage absolute sas uri + with write permission to the container which the usage data needs to be + uploaded to. + :type blob_storage_absolute_sas_uri: str + :param usage_start_date: The start time of the usage. If not provided, + usage will be reported since the beginning of data collection. + :type usage_start_date: datetime + """ + + _attribute_map = { + 'blob_storage_absolute_sas_uri': {'key': 'blobStorageAbsoluteSasUri', 'type': 'str'}, + 'usage_start_date': {'key': 'usageStartDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ExportResourceUsageParameters, self).__init__(**kwargs) + self.blob_storage_absolute_sas_uri = kwargs.get('blob_storage_absolute_sas_uri', None) + self.usage_start_date = kwargs.get('usage_start_date', None) + + +class ExternalSubnet(Model): + """Subnet information as returned by the Microsoft.Network API. + + :param id: Gets or sets the identifier. + :type id: str + :param name: Gets or sets the name. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExternalSubnet, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + + +class ExternalSubnetFragment(Model): + """Subnet information as returned by the Microsoft.Network API. + + :param id: Gets or sets the identifier. + :type id: str + :param name: Gets or sets the name. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExternalSubnetFragment, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + + +class Formula(Resource): + """A formula for creating a VM, specifying an image base and other parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the formula. + :type description: str + :param author: The author of the formula. + :type author: str + :param os_type: The OS type of the formula. + :type os_type: str + :ivar creation_date: The creation date of the formula. + :vartype creation_date: datetime + :param formula_content: The content of the formula. + :type formula_content: + ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameter + :param vm: Information about a VM from which a formula is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVm + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameter'}, + 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVm'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Formula, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.author = kwargs.get('author', None) + self.os_type = kwargs.get('os_type', None) + self.creation_date = None + self.formula_content = kwargs.get('formula_content', None) + self.vm = kwargs.get('vm', None) + self.provisioning_state = None + self.unique_identifier = None + + +class FormulaFragment(UpdateResource): + """A formula for creating a VM, specifying an image base and other parameters. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the formula. + :type description: str + :param author: The author of the formula. + :type author: str + :param os_type: The OS type of the formula. + :type os_type: str + :param formula_content: The content of the formula. + :type formula_content: + ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameterFragment + :param vm: Information about a VM from which a formula is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVmFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameterFragment'}, + 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVmFragment'}, + } + + def __init__(self, **kwargs): + super(FormulaFragment, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.author = kwargs.get('author', None) + self.os_type = kwargs.get('os_type', None) + self.formula_content = kwargs.get('formula_content', None) + self.vm = kwargs.get('vm', None) + + +class FormulaPropertiesFromVm(Model): + """Information about a VM from which a formula is to be created. + + :param lab_vm_id: The identifier of the VM from which a formula is to be + created. + :type lab_vm_id: str + """ + + _attribute_map = { + 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FormulaPropertiesFromVm, self).__init__(**kwargs) + self.lab_vm_id = kwargs.get('lab_vm_id', None) + + +class FormulaPropertiesFromVmFragment(Model): + """Information about a VM from which a formula is to be created. + + :param lab_vm_id: The identifier of the VM from which a formula is to be + created. + :type lab_vm_id: str + """ + + _attribute_map = { + 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FormulaPropertiesFromVmFragment, self).__init__(**kwargs) + self.lab_vm_id = kwargs.get('lab_vm_id', None) + + +class GalleryImage(Resource): + """A gallery image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param author: The author of the gallery image. + :type author: str + :ivar created_date: The creation date of the gallery image. + :vartype created_date: datetime + :param description: The description of the gallery image. + :type description: str + :param image_reference: The image reference of the gallery image. + :type image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param icon: The icon of the gallery image. + :type icon: str + :param enabled: Indicates whether this gallery image is enabled. + :type enabled: bool + :param plan_id: The third party plan that applies to this image + :type plan_id: str + :param is_plan_authorized: Indicates if the plan has been authorized for + programmatic deployment. + :type is_plan_authorized: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'image_reference': {'key': 'properties.imageReference', 'type': 'GalleryImageReference'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(GalleryImage, self).__init__(**kwargs) + self.author = kwargs.get('author', None) + self.created_date = None + self.description = kwargs.get('description', None) + self.image_reference = kwargs.get('image_reference', None) + self.icon = kwargs.get('icon', None) + self.enabled = kwargs.get('enabled', None) + self.plan_id = kwargs.get('plan_id', None) + self.is_plan_authorized = kwargs.get('is_plan_authorized', None) + + +class GalleryImageReference(Model): + """The reference information for an Azure Marketplace image. + + :param offer: The offer of the gallery image. + :type offer: str + :param publisher: The publisher of the gallery image. + :type publisher: str + :param sku: The SKU of the gallery image. + :type sku: str + :param os_type: The OS type of the gallery image. + :type os_type: str + :param version: The version of the gallery image. + :type version: str + """ + + _attribute_map = { + 'offer': {'key': 'offer', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GalleryImageReference, self).__init__(**kwargs) + self.offer = kwargs.get('offer', None) + self.publisher = kwargs.get('publisher', None) + self.sku = kwargs.get('sku', None) + self.os_type = kwargs.get('os_type', None) + self.version = kwargs.get('version', None) + + +class GalleryImageReferenceFragment(Model): + """The reference information for an Azure Marketplace image. + + :param offer: The offer of the gallery image. + :type offer: str + :param publisher: The publisher of the gallery image. + :type publisher: str + :param sku: The SKU of the gallery image. + :type sku: str + :param os_type: The OS type of the gallery image. + :type os_type: str + :param version: The version of the gallery image. + :type version: str + """ + + _attribute_map = { + 'offer': {'key': 'offer', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GalleryImageReferenceFragment, self).__init__(**kwargs) + self.offer = kwargs.get('offer', None) + self.publisher = kwargs.get('publisher', None) + self.sku = kwargs.get('sku', None) + self.os_type = kwargs.get('os_type', None) + self.version = kwargs.get('version', None) + + +class GenerateArmTemplateRequest(Model): + """Parameters for generating an ARM template for deploying artifacts. + + :param virtual_machine_name: The resource name of the virtual machine. + :type virtual_machine_name: str + :param parameters: The parameters of the ARM template. + :type parameters: list[~azure.mgmt.devtestlabs.models.ParameterInfo] + :param location: The location of the virtual machine. + :type location: str + :param file_upload_options: Options for uploading the files for the + artifact. UploadFilesAndGenerateSasTokens is the default value. Possible + values include: 'UploadFilesAndGenerateSasTokens', 'None' + :type file_upload_options: str or + ~azure.mgmt.devtestlabs.models.FileUploadOptions + """ + + _attribute_map = { + 'virtual_machine_name': {'key': 'virtualMachineName', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ParameterInfo]'}, + 'location': {'key': 'location', 'type': 'str'}, + 'file_upload_options': {'key': 'fileUploadOptions', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenerateArmTemplateRequest, self).__init__(**kwargs) + self.virtual_machine_name = kwargs.get('virtual_machine_name', None) + self.parameters = kwargs.get('parameters', None) + self.location = kwargs.get('location', None) + self.file_upload_options = kwargs.get('file_upload_options', None) + + +class GenerateUploadUriParameter(Model): + """Properties for generating an upload URI. + + :param blob_name: The blob name of the upload URI. + :type blob_name: str + """ + + _attribute_map = { + 'blob_name': {'key': 'blobName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenerateUploadUriParameter, self).__init__(**kwargs) + self.blob_name = kwargs.get('blob_name', None) + + +class GenerateUploadUriResponse(Model): + """Response body for generating an upload URI. + + :param upload_uri: The upload URI for the VHD. + :type upload_uri: str + """ + + _attribute_map = { + 'upload_uri': {'key': 'uploadUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenerateUploadUriResponse, self).__init__(**kwargs) + self.upload_uri = kwargs.get('upload_uri', None) + + +class HourDetails(Model): + """Properties of an hourly schedule. + + :param minute: Minutes of the hour the schedule will run. + :type minute: int + """ + + _attribute_map = { + 'minute': {'key': 'minute', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(HourDetails, self).__init__(**kwargs) + self.minute = kwargs.get('minute', None) + + +class HourDetailsFragment(Model): + """Properties of an hourly schedule. + + :param minute: Minutes of the hour the schedule will run. + :type minute: int + """ + + _attribute_map = { + 'minute': {'key': 'minute', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(HourDetailsFragment, self).__init__(**kwargs) + self.minute = kwargs.get('minute', None) + + +class IdentityProperties(Model): + """Properties of a managed identity. + + :param type: Managed identity. + :type type: str + :param principal_id: The principal id of resource identity. + :type principal_id: str + :param tenant_id: The tenant identifier of resource. + :type tenant_id: str + :param client_secret_url: The client secret URL of the identity. + :type client_secret_url: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'client_secret_url': {'key': 'clientSecretUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IdentityProperties, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.principal_id = kwargs.get('principal_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.client_secret_url = kwargs.get('client_secret_url', None) + + +class ImportLabVirtualMachineRequest(Model): + """This represents the payload required to import a virtual machine from a + different lab into the current one. + + :param source_virtual_machine_resource_id: The full resource ID of the + virtual machine to be imported. + :type source_virtual_machine_resource_id: str + :param destination_virtual_machine_name: The name of the virtual machine + in the destination lab + :type destination_virtual_machine_name: str + """ + + _attribute_map = { + 'source_virtual_machine_resource_id': {'key': 'sourceVirtualMachineResourceId', 'type': 'str'}, + 'destination_virtual_machine_name': {'key': 'destinationVirtualMachineName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImportLabVirtualMachineRequest, self).__init__(**kwargs) + self.source_virtual_machine_resource_id = kwargs.get('source_virtual_machine_resource_id', None) + self.destination_virtual_machine_name = kwargs.get('destination_virtual_machine_name', None) + + +class InboundNatRule(Model): + """A rule for NAT - exposing a VM's port (backendPort) on the public IP + address using a load balancer. + + :param transport_protocol: The transport protocol for the endpoint. + Possible values include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param frontend_port: The external endpoint port of the inbound + connection. Possible values range between 1 and 65535, inclusive. If + unspecified, a value will be allocated automatically. + :type frontend_port: int + :param backend_port: The port to which the external traffic will be + redirected. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(InboundNatRule, self).__init__(**kwargs) + self.transport_protocol = kwargs.get('transport_protocol', None) + self.frontend_port = kwargs.get('frontend_port', None) + self.backend_port = kwargs.get('backend_port', None) + + +class InboundNatRuleFragment(Model): + """A rule for NAT - exposing a VM's port (backendPort) on the public IP + address using a load balancer. + + :param transport_protocol: The transport protocol for the endpoint. + Possible values include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param frontend_port: The external endpoint port of the inbound + connection. Possible values range between 1 and 65535, inclusive. If + unspecified, a value will be allocated automatically. + :type frontend_port: int + :param backend_port: The port to which the external traffic will be + redirected. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(InboundNatRuleFragment, self).__init__(**kwargs) + self.transport_protocol = kwargs.get('transport_protocol', None) + self.frontend_port = kwargs.get('frontend_port', None) + self.backend_port = kwargs.get('backend_port', None) + + +class Lab(Resource): + """A lab. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar default_storage_account: The lab's default storage account. + :vartype default_storage_account: str + :ivar default_premium_storage_account: The lab's default premium storage + account. + :vartype default_premium_storage_account: str + :ivar artifacts_storage_account: The lab's artifact storage account. + :vartype artifacts_storage_account: str + :ivar premium_data_disk_storage_account: The lab's premium data disk + storage account. + :vartype premium_data_disk_storage_account: str + :ivar vault_name: The lab's Key vault. + :vartype vault_name: str + :param lab_storage_type: Type of storage used by the lab. It can be either + Premium or Standard. Default is Premium. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param mandatory_artifacts_resource_ids_linux: The ordered list of + artifact resource IDs that should be applied on all Linux VM creations by + default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_linux: list[str] + :param mandatory_artifacts_resource_ids_windows: The ordered list of + artifact resource IDs that should be applied on all Windows VM creations + by default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_windows: list[str] + :ivar created_date: The creation date of the lab. + :vartype created_date: datetime + :param premium_data_disks: The setting to enable usage of premium data + disks. + When its value is 'Enabled', creation of standard or premium data disks is + allowed. + When its value is 'Disabled', only creation of standard data disks is + allowed. Possible values include: 'Disabled', 'Enabled' + :type premium_data_disks: str or + ~azure.mgmt.devtestlabs.models.PremiumDataDisk + :param environment_permission: The access rights to be granted to the user + when provisioning an environment. Possible values include: 'Reader', + 'Contributor' + :type environment_permission: str or + ~azure.mgmt.devtestlabs.models.EnvironmentPermission + :param announcement: The properties of any lab announcement associated + with this lab + :type announcement: + ~azure.mgmt.devtestlabs.models.LabAnnouncementProperties + :param support: The properties of any lab support message associated with + this lab + :type support: ~azure.mgmt.devtestlabs.models.LabSupportProperties + :ivar vm_creation_resource_group: The resource group in which all new lab + virtual machines will be created. To let DevTest Labs manage resource + group creation, set this value to null. + :vartype vm_creation_resource_group: str + :ivar public_ip_id: The public IP address for the lab's load balancer. + :vartype public_ip_id: str + :ivar load_balancer_id: The load balancer used to for lab VMs that use + shared IP address. + :vartype load_balancer_id: str + :ivar network_security_group_id: The Network Security Group attached to + the lab VMs Network interfaces to restrict open ports. + :vartype network_security_group_id: str + :param extended_properties: Extended properties of the lab used for + experimental features + :type extended_properties: dict[str, str] + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'default_storage_account': {'readonly': True}, + 'default_premium_storage_account': {'readonly': True}, + 'artifacts_storage_account': {'readonly': True}, + 'premium_data_disk_storage_account': {'readonly': True}, + 'vault_name': {'readonly': True}, + 'created_date': {'readonly': True}, + 'vm_creation_resource_group': {'readonly': True}, + 'public_ip_id': {'readonly': True}, + 'load_balancer_id': {'readonly': True}, + 'network_security_group_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'default_storage_account': {'key': 'properties.defaultStorageAccount', 'type': 'str'}, + 'default_premium_storage_account': {'key': 'properties.defaultPremiumStorageAccount', 'type': 'str'}, + 'artifacts_storage_account': {'key': 'properties.artifactsStorageAccount', 'type': 'str'}, + 'premium_data_disk_storage_account': {'key': 'properties.premiumDataDiskStorageAccount', 'type': 'str'}, + 'vault_name': {'key': 'properties.vaultName', 'type': 'str'}, + 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, + 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, + 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, + 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, + 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementProperties'}, + 'support': {'key': 'properties.support', 'type': 'LabSupportProperties'}, + 'vm_creation_resource_group': {'key': 'properties.vmCreationResourceGroup', 'type': 'str'}, + 'public_ip_id': {'key': 'properties.publicIpId', 'type': 'str'}, + 'load_balancer_id': {'key': 'properties.loadBalancerId', 'type': 'str'}, + 'network_security_group_id': {'key': 'properties.networkSecurityGroupId', 'type': 'str'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Lab, self).__init__(**kwargs) + self.default_storage_account = None + self.default_premium_storage_account = None + self.artifacts_storage_account = None + self.premium_data_disk_storage_account = None + self.vault_name = None + self.lab_storage_type = kwargs.get('lab_storage_type', None) + self.mandatory_artifacts_resource_ids_linux = kwargs.get('mandatory_artifacts_resource_ids_linux', None) + self.mandatory_artifacts_resource_ids_windows = kwargs.get('mandatory_artifacts_resource_ids_windows', None) + self.created_date = None + self.premium_data_disks = kwargs.get('premium_data_disks', None) + self.environment_permission = kwargs.get('environment_permission', None) + self.announcement = kwargs.get('announcement', None) + self.support = kwargs.get('support', None) + self.vm_creation_resource_group = None + self.public_ip_id = None + self.load_balancer_id = None + self.network_security_group_id = None + self.extended_properties = kwargs.get('extended_properties', None) + self.provisioning_state = None + self.unique_identifier = None + + +class LabAnnouncementProperties(Model): + """Properties of a lab's announcement banner. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param title: The plain text title for the lab announcement + :type title: str + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + :param enabled: Is the lab announcement active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param expiration_date: The time at which the announcement expires (null + for never) + :type expiration_date: datetime + :param expired: Has this announcement expired? + :type expired: bool + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'expired': {'key': 'expired', 'type': 'bool'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabAnnouncementProperties, self).__init__(**kwargs) + self.title = kwargs.get('title', None) + self.markdown = kwargs.get('markdown', None) + self.enabled = kwargs.get('enabled', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.expired = kwargs.get('expired', None) + self.provisioning_state = None + self.unique_identifier = None + + +class LabAnnouncementPropertiesFragment(Model): + """Properties of a lab's announcement banner. + + :param title: The plain text title for the lab announcement + :type title: str + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + :param enabled: Is the lab announcement active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param expiration_date: The time at which the announcement expires (null + for never) + :type expiration_date: datetime + :param expired: Has this announcement expired? + :type expired: bool + """ + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'expired': {'key': 'expired', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(LabAnnouncementPropertiesFragment, self).__init__(**kwargs) + self.title = kwargs.get('title', None) + self.markdown = kwargs.get('markdown', None) + self.enabled = kwargs.get('enabled', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.expired = kwargs.get('expired', None) + + +class LabCost(Resource): + """A cost item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param target_cost: The target cost properties + :type target_cost: ~azure.mgmt.devtestlabs.models.TargetCostProperties + :ivar lab_cost_summary: The lab cost summary component of the cost data. + :vartype lab_cost_summary: + ~azure.mgmt.devtestlabs.models.LabCostSummaryProperties + :ivar lab_cost_details: The lab cost details component of the cost data. + :vartype lab_cost_details: + list[~azure.mgmt.devtestlabs.models.LabCostDetailsProperties] + :ivar resource_costs: The resource cost component of the cost data. + :vartype resource_costs: + list[~azure.mgmt.devtestlabs.models.LabResourceCostProperties] + :param currency_code: The currency code of the cost. + :type currency_code: str + :param start_date_time: The start time of the cost data. + :type start_date_time: datetime + :param end_date_time: The end time of the cost data. + :type end_date_time: datetime + :param created_date: The creation date of the cost. + :type created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'lab_cost_summary': {'readonly': True}, + 'lab_cost_details': {'readonly': True}, + 'resource_costs': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'target_cost': {'key': 'properties.targetCost', 'type': 'TargetCostProperties'}, + 'lab_cost_summary': {'key': 'properties.labCostSummary', 'type': 'LabCostSummaryProperties'}, + 'lab_cost_details': {'key': 'properties.labCostDetails', 'type': '[LabCostDetailsProperties]'}, + 'resource_costs': {'key': 'properties.resourceCosts', 'type': '[LabResourceCostProperties]'}, + 'currency_code': {'key': 'properties.currencyCode', 'type': 'str'}, + 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, + 'end_date_time': {'key': 'properties.endDateTime', 'type': 'iso-8601'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabCost, self).__init__(**kwargs) + self.target_cost = kwargs.get('target_cost', None) + self.lab_cost_summary = None + self.lab_cost_details = None + self.resource_costs = None + self.currency_code = kwargs.get('currency_code', None) + self.start_date_time = kwargs.get('start_date_time', None) + self.end_date_time = kwargs.get('end_date_time', None) + self.created_date = kwargs.get('created_date', None) + self.provisioning_state = None + self.unique_identifier = None + + +class LabCostDetailsProperties(Model): + """The properties of a lab cost item. + + :param date_property: The date of the cost item. + :type date_property: datetime + :param cost: The cost component of the cost item. + :type cost: float + :param cost_type: The type of the cost. Possible values include: + 'Unavailable', 'Reported', 'Projected' + :type cost_type: str or ~azure.mgmt.devtestlabs.models.CostType + """ + + _attribute_map = { + 'date_property': {'key': 'date', 'type': 'iso-8601'}, + 'cost': {'key': 'cost', 'type': 'float'}, + 'cost_type': {'key': 'costType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabCostDetailsProperties, self).__init__(**kwargs) + self.date_property = kwargs.get('date_property', None) + self.cost = kwargs.get('cost', None) + self.cost_type = kwargs.get('cost_type', None) + + +class LabCostSummaryProperties(Model): + """The properties of the cost summary. + + :param estimated_lab_cost: The cost component of the cost item. + :type estimated_lab_cost: float + """ + + _attribute_map = { + 'estimated_lab_cost': {'key': 'estimatedLabCost', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(LabCostSummaryProperties, self).__init__(**kwargs) + self.estimated_lab_cost = kwargs.get('estimated_lab_cost', None) + + +class LabFragment(UpdateResource): + """A lab. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_storage_type: Type of storage used by the lab. It can be either + Premium or Standard. Default is Premium. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param mandatory_artifacts_resource_ids_linux: The ordered list of + artifact resource IDs that should be applied on all Linux VM creations by + default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_linux: list[str] + :param mandatory_artifacts_resource_ids_windows: The ordered list of + artifact resource IDs that should be applied on all Windows VM creations + by default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_windows: list[str] + :param premium_data_disks: The setting to enable usage of premium data + disks. + When its value is 'Enabled', creation of standard or premium data disks is + allowed. + When its value is 'Disabled', only creation of standard data disks is + allowed. Possible values include: 'Disabled', 'Enabled' + :type premium_data_disks: str or + ~azure.mgmt.devtestlabs.models.PremiumDataDisk + :param environment_permission: The access rights to be granted to the user + when provisioning an environment. Possible values include: 'Reader', + 'Contributor' + :type environment_permission: str or + ~azure.mgmt.devtestlabs.models.EnvironmentPermission + :param announcement: The properties of any lab announcement associated + with this lab + :type announcement: + ~azure.mgmt.devtestlabs.models.LabAnnouncementPropertiesFragment + :param support: The properties of any lab support message associated with + this lab + :type support: ~azure.mgmt.devtestlabs.models.LabSupportPropertiesFragment + :param extended_properties: Extended properties of the lab used for + experimental features + :type extended_properties: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, + 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, + 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, + 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, + 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, + 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementPropertiesFragment'}, + 'support': {'key': 'properties.support', 'type': 'LabSupportPropertiesFragment'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(LabFragment, self).__init__(**kwargs) + self.lab_storage_type = kwargs.get('lab_storage_type', None) + self.mandatory_artifacts_resource_ids_linux = kwargs.get('mandatory_artifacts_resource_ids_linux', None) + self.mandatory_artifacts_resource_ids_windows = kwargs.get('mandatory_artifacts_resource_ids_windows', None) + self.premium_data_disks = kwargs.get('premium_data_disks', None) + self.environment_permission = kwargs.get('environment_permission', None) + self.announcement = kwargs.get('announcement', None) + self.support = kwargs.get('support', None) + self.extended_properties = kwargs.get('extended_properties', None) + + +class LabResourceCostProperties(Model): + """The properties of a resource cost item. + + :param resourcename: The name of the resource. + :type resourcename: str + :param resource_uid: The unique identifier of the resource. + :type resource_uid: str + :param resource_cost: The cost component of the resource cost item. + :type resource_cost: float + :param resource_type: The logical resource type (ex. virtualmachine, + storageaccount) + :type resource_type: str + :param resource_owner: The owner of the resource (ex. + janedoe@microsoft.com) + :type resource_owner: str + :param resource_pricing_tier: The category of the resource (ex. + Premium_LRS, Standard_DS1) + :type resource_pricing_tier: str + :param resource_status: The status of the resource (ex. Active) + :type resource_status: str + :param resource_id: The ID of the resource + :type resource_id: str + :param external_resource_id: The ID of the external resource + :type external_resource_id: str + """ + + _attribute_map = { + 'resourcename': {'key': 'resourcename', 'type': 'str'}, + 'resource_uid': {'key': 'resourceUId', 'type': 'str'}, + 'resource_cost': {'key': 'resourceCost', 'type': 'float'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_owner': {'key': 'resourceOwner', 'type': 'str'}, + 'resource_pricing_tier': {'key': 'resourcePricingTier', 'type': 'str'}, + 'resource_status': {'key': 'resourceStatus', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'external_resource_id': {'key': 'externalResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabResourceCostProperties, self).__init__(**kwargs) + self.resourcename = kwargs.get('resourcename', None) + self.resource_uid = kwargs.get('resource_uid', None) + self.resource_cost = kwargs.get('resource_cost', None) + self.resource_type = kwargs.get('resource_type', None) + self.resource_owner = kwargs.get('resource_owner', None) + self.resource_pricing_tier = kwargs.get('resource_pricing_tier', None) + self.resource_status = kwargs.get('resource_status', None) + self.resource_id = kwargs.get('resource_id', None) + self.external_resource_id = kwargs.get('external_resource_id', None) + + +class LabSupportProperties(Model): + """Properties of a lab's support banner. + + :param enabled: Is the lab support banner active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabSupportProperties, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.markdown = kwargs.get('markdown', None) + + +class LabSupportPropertiesFragment(Model): + """Properties of a lab's support banner. + + :param enabled: Is the lab support banner active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabSupportPropertiesFragment, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.markdown = kwargs.get('markdown', None) + + +class LabVhd(Model): + """Properties of a VHD in the lab. + + :param id: The URI to the VHD. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabVhd, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class LabVirtualMachine(Resource): + """A virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :ivar compute_vm: The compute virtual machine properties. + :vartype compute_vm: ~azure.mgmt.devtestlabs.models.ComputeVmProperties + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties + :ivar applicable_schedule: The applicable schedule for the virtual + machine. + :vartype applicable_schedule: + ~azure.mgmt.devtestlabs.models.ApplicableSchedule + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskProperties] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'compute_vm': {'readonly': True}, + 'applicable_schedule': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'compute_vm': {'key': 'properties.computeVm', 'type': 'ComputeVmProperties'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, + 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabVirtualMachine, self).__init__(**kwargs) + self.notes = kwargs.get('notes', None) + self.owner_object_id = kwargs.get('owner_object_id', None) + self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) + self.created_by_user_id = kwargs.get('created_by_user_id', None) + self.created_by_user = kwargs.get('created_by_user', None) + self.created_date = kwargs.get('created_date', None) + self.compute_id = kwargs.get('compute_id', None) + self.custom_image_id = kwargs.get('custom_image_id', None) + self.os_type = kwargs.get('os_type', None) + self.size = kwargs.get('size', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.ssh_key = kwargs.get('ssh_key', None) + self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) + self.fqdn = kwargs.get('fqdn', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) + self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) + self.artifacts = kwargs.get('artifacts', None) + self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) + self.gallery_image_reference = kwargs.get('gallery_image_reference', None) + self.plan_id = kwargs.get('plan_id', None) + self.compute_vm = None + self.network_interface = kwargs.get('network_interface', None) + self.applicable_schedule = None + self.expiration_date = kwargs.get('expiration_date', None) + self.allow_claim = kwargs.get('allow_claim', None) + self.storage_type = kwargs.get('storage_type', None) + self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) + self.environment_id = kwargs.get('environment_id', None) + self.data_disk_parameters = kwargs.get('data_disk_parameters', None) + self.schedule_parameters = kwargs.get('schedule_parameters', None) + self.last_known_power_state = kwargs.get('last_known_power_state', None) + self.provisioning_state = None + self.unique_identifier = None + + +class LabVirtualMachineCreationParameter(Model): + """Properties for creating a virtual machine. + + :param bulk_creation_parameters: The number of virtual machine instances + to create. + :type bulk_creation_parameters: + ~azure.mgmt.devtestlabs.models.BulkCreationParameters + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskProperties] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParameters'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(LabVirtualMachineCreationParameter, self).__init__(**kwargs) + self.bulk_creation_parameters = kwargs.get('bulk_creation_parameters', None) + self.notes = kwargs.get('notes', None) + self.owner_object_id = kwargs.get('owner_object_id', None) + self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) + self.created_by_user_id = kwargs.get('created_by_user_id', None) + self.created_by_user = kwargs.get('created_by_user', None) + self.created_date = kwargs.get('created_date', None) + self.compute_id = kwargs.get('compute_id', None) + self.custom_image_id = kwargs.get('custom_image_id', None) + self.os_type = kwargs.get('os_type', None) + self.size = kwargs.get('size', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.ssh_key = kwargs.get('ssh_key', None) + self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) + self.fqdn = kwargs.get('fqdn', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) + self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) + self.artifacts = kwargs.get('artifacts', None) + self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) + self.gallery_image_reference = kwargs.get('gallery_image_reference', None) + self.plan_id = kwargs.get('plan_id', None) + self.network_interface = kwargs.get('network_interface', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.allow_claim = kwargs.get('allow_claim', None) + self.storage_type = kwargs.get('storage_type', None) + self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) + self.environment_id = kwargs.get('environment_id', None) + self.data_disk_parameters = kwargs.get('data_disk_parameters', None) + self.schedule_parameters = kwargs.get('schedule_parameters', None) + self.last_known_power_state = kwargs.get('last_known_power_state', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class LabVirtualMachineCreationParameterFragment(Model): + """Properties for creating a virtual machine. + + :param bulk_creation_parameters: The number of virtual machine instances + to create. + :type bulk_creation_parameters: + ~azure.mgmt.devtestlabs.models.BulkCreationParametersFragment + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParametersFragment'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(LabVirtualMachineCreationParameterFragment, self).__init__(**kwargs) + self.bulk_creation_parameters = kwargs.get('bulk_creation_parameters', None) + self.notes = kwargs.get('notes', None) + self.owner_object_id = kwargs.get('owner_object_id', None) + self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) + self.created_by_user_id = kwargs.get('created_by_user_id', None) + self.created_by_user = kwargs.get('created_by_user', None) + self.created_date = kwargs.get('created_date', None) + self.compute_id = kwargs.get('compute_id', None) + self.custom_image_id = kwargs.get('custom_image_id', None) + self.os_type = kwargs.get('os_type', None) + self.size = kwargs.get('size', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.ssh_key = kwargs.get('ssh_key', None) + self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) + self.fqdn = kwargs.get('fqdn', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) + self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) + self.artifacts = kwargs.get('artifacts', None) + self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) + self.gallery_image_reference = kwargs.get('gallery_image_reference', None) + self.plan_id = kwargs.get('plan_id', None) + self.network_interface = kwargs.get('network_interface', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.allow_claim = kwargs.get('allow_claim', None) + self.storage_type = kwargs.get('storage_type', None) + self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) + self.environment_id = kwargs.get('environment_id', None) + self.data_disk_parameters = kwargs.get('data_disk_parameters', None) + self.schedule_parameters = kwargs.get('schedule_parameters', None) + self.last_known_power_state = kwargs.get('last_known_power_state', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class LabVirtualMachineFragment(UpdateResource): + """A virtual machine. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabVirtualMachineFragment, self).__init__(**kwargs) + self.notes = kwargs.get('notes', None) + self.owner_object_id = kwargs.get('owner_object_id', None) + self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) + self.created_by_user_id = kwargs.get('created_by_user_id', None) + self.created_by_user = kwargs.get('created_by_user', None) + self.created_date = kwargs.get('created_date', None) + self.compute_id = kwargs.get('compute_id', None) + self.custom_image_id = kwargs.get('custom_image_id', None) + self.os_type = kwargs.get('os_type', None) + self.size = kwargs.get('size', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.ssh_key = kwargs.get('ssh_key', None) + self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) + self.fqdn = kwargs.get('fqdn', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) + self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) + self.artifacts = kwargs.get('artifacts', None) + self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) + self.gallery_image_reference = kwargs.get('gallery_image_reference', None) + self.plan_id = kwargs.get('plan_id', None) + self.network_interface = kwargs.get('network_interface', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.allow_claim = kwargs.get('allow_claim', None) + self.storage_type = kwargs.get('storage_type', None) + self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) + self.environment_id = kwargs.get('environment_id', None) + self.data_disk_parameters = kwargs.get('data_disk_parameters', None) + self.schedule_parameters = kwargs.get('schedule_parameters', None) + self.last_known_power_state = kwargs.get('last_known_power_state', None) + + +class LinuxOsInfo(Model): + """Information about a Linux OS. + + :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, + DeprovisionRequested, DeprovisionApplied). Possible values include: + 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' + :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState + """ + + _attribute_map = { + 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LinuxOsInfo, self).__init__(**kwargs) + self.linux_os_state = kwargs.get('linux_os_state', None) + + +class LinuxOsInfoFragment(Model): + """Information about a Linux OS. + + :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, + DeprovisionRequested, DeprovisionApplied). Possible values include: + 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' + :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState + """ + + _attribute_map = { + 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LinuxOsInfoFragment, self).__init__(**kwargs) + self.linux_os_state = kwargs.get('linux_os_state', None) + + +class NetworkInterfaceProperties(Model): + """Properties of a network interface. + + :param virtual_network_id: The resource ID of the virtual network. + :type virtual_network_id: str + :param subnet_id: The resource ID of the sub net. + :type subnet_id: str + :param public_ip_address_id: The resource ID of the public IP address. + :type public_ip_address_id: str + :param public_ip_address: The public IP address. + :type public_ip_address: str + :param private_ip_address: The private IP address. + :type private_ip_address: str + :param dns_name: The DNS name. + :type dns_name: str + :param rdp_authority: The RdpAuthority property is a server DNS host name + or IP address followed by the service port number for RDP (Remote Desktop + Protocol). + :type rdp_authority: str + :param ssh_authority: The SshAuthority property is a server DNS host name + or IP address followed by the service port number for SSH. + :type ssh_authority: str + :param shared_public_ip_address_configuration: The configuration for + sharing a public IP address across multiple virtual machines. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfiguration + """ + + _attribute_map = { + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, + 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfiguration'}, + } + + def __init__(self, **kwargs): + super(NetworkInterfaceProperties, self).__init__(**kwargs) + self.virtual_network_id = kwargs.get('virtual_network_id', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.public_ip_address_id = kwargs.get('public_ip_address_id', None) + self.public_ip_address = kwargs.get('public_ip_address', None) + self.private_ip_address = kwargs.get('private_ip_address', None) + self.dns_name = kwargs.get('dns_name', None) + self.rdp_authority = kwargs.get('rdp_authority', None) + self.ssh_authority = kwargs.get('ssh_authority', None) + self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) + + +class NetworkInterfacePropertiesFragment(Model): + """Properties of a network interface. + + :param virtual_network_id: The resource ID of the virtual network. + :type virtual_network_id: str + :param subnet_id: The resource ID of the sub net. + :type subnet_id: str + :param public_ip_address_id: The resource ID of the public IP address. + :type public_ip_address_id: str + :param public_ip_address: The public IP address. + :type public_ip_address: str + :param private_ip_address: The private IP address. + :type private_ip_address: str + :param dns_name: The DNS name. + :type dns_name: str + :param rdp_authority: The RdpAuthority property is a server DNS host name + or IP address followed by the service port number for RDP (Remote Desktop + Protocol). + :type rdp_authority: str + :param ssh_authority: The SshAuthority property is a server DNS host name + or IP address followed by the service port number for SSH. + :type ssh_authority: str + :param shared_public_ip_address_configuration: The configuration for + sharing a public IP address across multiple virtual machines. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfigurationFragment + """ + + _attribute_map = { + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, + 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfigurationFragment'}, + } + + def __init__(self, **kwargs): + super(NetworkInterfacePropertiesFragment, self).__init__(**kwargs) + self.virtual_network_id = kwargs.get('virtual_network_id', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.public_ip_address_id = kwargs.get('public_ip_address_id', None) + self.public_ip_address = kwargs.get('public_ip_address', None) + self.private_ip_address = kwargs.get('private_ip_address', None) + self.dns_name = kwargs.get('dns_name', None) + self.rdp_authority = kwargs.get('rdp_authority', None) + self.ssh_authority = kwargs.get('ssh_authority', None) + self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) + + +class NotificationChannel(Resource): + """A notification. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param web_hook_url: The webhook URL to send notifications to. + :type web_hook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + :param description: Description of notification. + :type description: str + :param events: The list of event for which this notification is enabled. + :type events: list[~azure.mgmt.devtestlabs.models.Event] + :ivar created_date: The creation date of the notification channel. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'events': {'key': 'properties.events', 'type': '[Event]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NotificationChannel, self).__init__(**kwargs) + self.web_hook_url = kwargs.get('web_hook_url', None) + self.email_recipient = kwargs.get('email_recipient', None) + self.notification_locale = kwargs.get('notification_locale', None) + self.description = kwargs.get('description', None) + self.events = kwargs.get('events', None) + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class NotificationChannelFragment(UpdateResource): + """A notification. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param web_hook_url: The webhook URL to send notifications to. + :type web_hook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + :param description: Description of notification. + :type description: str + :param events: The list of event for which this notification is enabled. + :type events: list[~azure.mgmt.devtestlabs.models.EventFragment] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'events': {'key': 'properties.events', 'type': '[EventFragment]'}, + } + + def __init__(self, **kwargs): + super(NotificationChannelFragment, self).__init__(**kwargs) + self.web_hook_url = kwargs.get('web_hook_url', None) + self.email_recipient = kwargs.get('email_recipient', None) + self.notification_locale = kwargs.get('notification_locale', None) + self.description = kwargs.get('description', None) + self.events = kwargs.get('events', None) + + +class NotificationSettings(Model): + """Notification settings for a schedule. + + :param status: If notifications are enabled for this schedule (i.e. + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param time_in_minutes: Time in minutes before event at which notification + will be sent. + :type time_in_minutes: int + :param webhook_url: The webhook URL to which the notification will be + sent. + :type webhook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, + 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NotificationSettings, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.time_in_minutes = kwargs.get('time_in_minutes', None) + self.webhook_url = kwargs.get('webhook_url', None) + self.email_recipient = kwargs.get('email_recipient', None) + self.notification_locale = kwargs.get('notification_locale', None) + + +class NotificationSettingsFragment(Model): + """Notification settings for a schedule. + + :param status: If notifications are enabled for this schedule (i.e. + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param time_in_minutes: Time in minutes before event at which notification + will be sent. + :type time_in_minutes: int + :param webhook_url: The webhook URL to which the notification will be + sent. + :type webhook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, + 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NotificationSettingsFragment, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.time_in_minutes = kwargs.get('time_in_minutes', None) + self.webhook_url = kwargs.get('webhook_url', None) + self.email_recipient = kwargs.get('email_recipient', None) + self.notification_locale = kwargs.get('notification_locale', None) + + +class NotifyParameters(Model): + """Properties for generating a Notification. + + :param event_name: The type of event (i.e. AutoShutdown, Cost). Possible + values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + :param json_payload: Properties for the notification in json format. + :type json_payload: str + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + 'json_payload': {'key': 'jsonPayload', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NotifyParameters, self).__init__(**kwargs) + self.event_name = kwargs.get('event_name', None) + self.json_payload = kwargs.get('json_payload', None) + + +class OperationError(Model): + """Error details for the operation in case of a failure. + + :param code: The error code of the operation error. + :type code: str + :param message: The error message of the operation error. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class OperationMetadata(Model): + """The REST API operation supported by DevTestLab ResourceProvider. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that describes the operations + :type display: ~azure.mgmt.devtestlabs.models.OperationMetadataDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationMetadataDisplay'}, + } + + def __init__(self, **kwargs): + super(OperationMetadata, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + + +class OperationMetadataDisplay(Model): + """The object that describes the operations. + + :param provider: Friendly name of the resource provider + :type provider: str + :param resource: Resource type on which the operation is performed. + :type resource: str + :param operation: Operation type: read, write, delete, listKeys/action, + etc. + :type operation: str + :param description: Friendly name of the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationMetadataDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class OperationResult(Model): + """An Operation Result. + + :param status: The operation status. + :type status: str + :param status_code: The status code for the operation. Possible values + include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', + 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', + 'PartialContent', 'MultipleChoices', 'MovedPermanently', 'Redirect', + 'SeeOther', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', + 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', + 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', + 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', + 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', + 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', + 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', + 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', + 'HttpVersionNotSupported' + :type status_code: str or ~azure.mgmt.devtestlabs.models.HttpStatusCode + :param error: Error details for the operation in case of a failure. + :type error: ~azure.mgmt.devtestlabs.models.OperationError + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'OperationError'}, + } + + def __init__(self, **kwargs): + super(OperationResult, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.status_code = kwargs.get('status_code', None) + self.error = kwargs.get('error', None) + + +class ParameterInfo(Model): + """Information about an artifact's parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ParameterInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class ParametersValueFileInfo(Model): + """A file containing a set of parameter values for an ARM template. + + :param file_name: File name. + :type file_name: str + :param parameters_value_info: Contents of the file. + :type parameters_value_info: object + """ + + _attribute_map = { + 'file_name': {'key': 'fileName', 'type': 'str'}, + 'parameters_value_info': {'key': 'parametersValueInfo', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ParametersValueFileInfo, self).__init__(**kwargs) + self.file_name = kwargs.get('file_name', None) + self.parameters_value_info = kwargs.get('parameters_value_info', None) + + +class PercentageCostThresholdProperties(Model): + """Properties of a percentage cost threshold. + + :param threshold_value: The cost threshold value. + :type threshold_value: float + """ + + _attribute_map = { + 'threshold_value': {'key': 'thresholdValue', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(PercentageCostThresholdProperties, self).__init__(**kwargs) + self.threshold_value = kwargs.get('threshold_value', None) + + +class Policy(Resource): + """A Policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the policy. + :type description: str + :param status: The status of the policy. Possible values include: + 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus + :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, + MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', + 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', + 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', + 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' + :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName + :param fact_data: The fact data of the policy. + :type fact_data: str + :param threshold: The threshold of the policy (i.e. a number for + MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). + :type threshold: str + :param evaluator_type: The evaluator type of the policy (i.e. + AllowedValuesPolicy, MaxValuePolicy). Possible values include: + 'AllowedValuesPolicy', 'MaxValuePolicy' + :type evaluator_type: str or + ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType + :ivar created_date: The creation date of the policy. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'fact_name': {'key': 'properties.factName', 'type': 'str'}, + 'fact_data': {'key': 'properties.factData', 'type': 'str'}, + 'threshold': {'key': 'properties.threshold', 'type': 'str'}, + 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Policy, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.status = kwargs.get('status', None) + self.fact_name = kwargs.get('fact_name', None) + self.fact_data = kwargs.get('fact_data', None) + self.threshold = kwargs.get('threshold', None) + self.evaluator_type = kwargs.get('evaluator_type', None) + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class PolicyFragment(UpdateResource): + """A Policy. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the policy. + :type description: str + :param status: The status of the policy. Possible values include: + 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus + :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, + MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', + 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', + 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', + 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' + :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName + :param fact_data: The fact data of the policy. + :type fact_data: str + :param threshold: The threshold of the policy (i.e. a number for + MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). + :type threshold: str + :param evaluator_type: The evaluator type of the policy (i.e. + AllowedValuesPolicy, MaxValuePolicy). Possible values include: + 'AllowedValuesPolicy', 'MaxValuePolicy' + :type evaluator_type: str or + ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'fact_name': {'key': 'properties.factName', 'type': 'str'}, + 'fact_data': {'key': 'properties.factData', 'type': 'str'}, + 'threshold': {'key': 'properties.threshold', 'type': 'str'}, + 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PolicyFragment, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.status = kwargs.get('status', None) + self.fact_name = kwargs.get('fact_name', None) + self.fact_data = kwargs.get('fact_data', None) + self.threshold = kwargs.get('threshold', None) + self.evaluator_type = kwargs.get('evaluator_type', None) + + +class PolicySetResult(Model): + """Result of a policy set evaluation. + + :param has_error: A value indicating whether this policy set evaluation + has discovered violations. + :type has_error: bool + :param policy_violations: The list of policy violations. + :type policy_violations: + list[~azure.mgmt.devtestlabs.models.PolicyViolation] + """ + + _attribute_map = { + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'policy_violations': {'key': 'policyViolations', 'type': '[PolicyViolation]'}, + } + + def __init__(self, **kwargs): + super(PolicySetResult, self).__init__(**kwargs) + self.has_error = kwargs.get('has_error', None) + self.policy_violations = kwargs.get('policy_violations', None) + + +class PolicyViolation(Model): + """Policy violation. + + :param code: The code of the policy violation. + :type code: str + :param message: The message of the policy violation. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PolicyViolation, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class Port(Model): + """Properties of a network port. + + :param transport_protocol: Protocol type of the port. Possible values + include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param backend_port: Backend port of the target virtual machine. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(Port, self).__init__(**kwargs) + self.transport_protocol = kwargs.get('transport_protocol', None) + self.backend_port = kwargs.get('backend_port', None) + + +class PortFragment(Model): + """Properties of a network port. + + :param transport_protocol: Protocol type of the port. Possible values + include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param backend_port: Backend port of the target virtual machine. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(PortFragment, self).__init__(**kwargs) + self.transport_protocol = kwargs.get('transport_protocol', None) + self.backend_port = kwargs.get('backend_port', None) + + +class RdpConnection(Model): + """Represents a .rdp file. + + :param contents: The contents of the .rdp file + :type contents: str + """ + + _attribute_map = { + 'contents': {'key': 'contents', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RdpConnection, self).__init__(**kwargs) + self.contents = kwargs.get('contents', None) + + +class ResizeLabVirtualMachineProperties(Model): + """Request body for resizing a virtual machine. + + :param size: Specifies the size of the virtual machine. + :type size: str + """ + + _attribute_map = { + 'size': {'key': 'size', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResizeLabVirtualMachineProperties, self).__init__(**kwargs) + self.size = kwargs.get('size', None) + + +class RetargetScheduleProperties(Model): + """Properties for retargeting a virtual machine schedule. + + :param current_resource_id: The resource Id of the virtual machine on + which the schedule operates + :type current_resource_id: str + :param target_resource_id: The resource Id of the virtual machine that the + schedule should be retargeted to + :type target_resource_id: str + """ + + _attribute_map = { + 'current_resource_id': {'key': 'currentResourceId', 'type': 'str'}, + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RetargetScheduleProperties, self).__init__(**kwargs) + self.current_resource_id = kwargs.get('current_resource_id', None) + self.target_resource_id = kwargs.get('target_resource_id', None) + + +class Schedule(Resource): + """A schedule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettings + :ivar created_date: The creation date of the schedule. + :vartype created_date: datetime + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Schedule, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.task_type = kwargs.get('task_type', None) + self.weekly_recurrence = kwargs.get('weekly_recurrence', None) + self.daily_recurrence = kwargs.get('daily_recurrence', None) + self.hourly_recurrence = kwargs.get('hourly_recurrence', None) + self.time_zone_id = kwargs.get('time_zone_id', None) + self.notification_settings = kwargs.get('notification_settings', None) + self.created_date = None + self.target_resource_id = kwargs.get('target_resource_id', None) + self.provisioning_state = None + self.unique_identifier = None + + +class ScheduleCreationParameter(Model): + """Properties for creating a schedule. + + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettings + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ScheduleCreationParameter, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.task_type = kwargs.get('task_type', None) + self.weekly_recurrence = kwargs.get('weekly_recurrence', None) + self.daily_recurrence = kwargs.get('daily_recurrence', None) + self.hourly_recurrence = kwargs.get('hourly_recurrence', None) + self.time_zone_id = kwargs.get('time_zone_id', None) + self.notification_settings = kwargs.get('notification_settings', None) + self.target_resource_id = kwargs.get('target_resource_id', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ScheduleCreationParameterFragment(Model): + """Properties for creating a schedule. + + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: + ~azure.mgmt.devtestlabs.models.WeekDetailsFragment + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: + ~azure.mgmt.devtestlabs.models.HourDetailsFragment + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ScheduleCreationParameterFragment, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.task_type = kwargs.get('task_type', None) + self.weekly_recurrence = kwargs.get('weekly_recurrence', None) + self.daily_recurrence = kwargs.get('daily_recurrence', None) + self.hourly_recurrence = kwargs.get('hourly_recurrence', None) + self.time_zone_id = kwargs.get('time_zone_id', None) + self.notification_settings = kwargs.get('notification_settings', None) + self.target_resource_id = kwargs.get('target_resource_id', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ScheduleFragment(UpdateResource): + """A schedule. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: + ~azure.mgmt.devtestlabs.models.WeekDetailsFragment + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: + ~azure.mgmt.devtestlabs.models.HourDetailsFragment + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ScheduleFragment, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.task_type = kwargs.get('task_type', None) + self.weekly_recurrence = kwargs.get('weekly_recurrence', None) + self.daily_recurrence = kwargs.get('daily_recurrence', None) + self.hourly_recurrence = kwargs.get('hourly_recurrence', None) + self.time_zone_id = kwargs.get('time_zone_id', None) + self.notification_settings = kwargs.get('notification_settings', None) + self.target_resource_id = kwargs.get('target_resource_id', None) + + +class Secret(Resource): + """A secret. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param value: The value of the secret for secret creation. + :type value: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Secret, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.provisioning_state = None + self.unique_identifier = None + + +class SecretFragment(UpdateResource): + """A secret. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param value: The value of the secret for secret creation. + :type value: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretFragment, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class ServiceFabric(Resource): + """A Service Fabric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param external_service_fabric_id: The backing service fabric resource's + id + :type external_service_fabric_id: str + :param environment_id: The resource id of the environment under which the + service fabric resource is present + :type environment_id: str + :ivar applicable_schedule: The applicable schedule for the virtual + machine. + :vartype applicable_schedule: + ~azure.mgmt.devtestlabs.models.ApplicableSchedule + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'applicable_schedule': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceFabric, self).__init__(**kwargs) + self.external_service_fabric_id = kwargs.get('external_service_fabric_id', None) + self.environment_id = kwargs.get('environment_id', None) + self.applicable_schedule = None + self.provisioning_state = None + self.unique_identifier = None + + +class ServiceFabricFragment(UpdateResource): + """A Service Fabric. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param external_service_fabric_id: The backing service fabric resource's + id + :type external_service_fabric_id: str + :param environment_id: The resource id of the environment under which the + service fabric resource is present + :type environment_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceFabricFragment, self).__init__(**kwargs) + self.external_service_fabric_id = kwargs.get('external_service_fabric_id', None) + self.environment_id = kwargs.get('environment_id', None) + + +class ServiceRunner(Resource): + """A container for a managed identity to execute DevTest lab services. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.devtestlabs.models.IdentityProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, + } + + def __init__(self, **kwargs): + super(ServiceRunner, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + + +class SharedPublicIpAddressConfiguration(Model): + """Properties of a virtual machine that determine how it is connected to a + load balancer. + + :param inbound_nat_rules: The incoming NAT rules + :type inbound_nat_rules: + list[~azure.mgmt.devtestlabs.models.InboundNatRule] + """ + + _attribute_map = { + 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRule]'}, + } + + def __init__(self, **kwargs): + super(SharedPublicIpAddressConfiguration, self).__init__(**kwargs) + self.inbound_nat_rules = kwargs.get('inbound_nat_rules', None) + + +class SharedPublicIpAddressConfigurationFragment(Model): + """Properties of a virtual machine that determine how it is connected to a + load balancer. + + :param inbound_nat_rules: The incoming NAT rules + :type inbound_nat_rules: + list[~azure.mgmt.devtestlabs.models.InboundNatRuleFragment] + """ + + _attribute_map = { + 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRuleFragment]'}, + } + + def __init__(self, **kwargs): + super(SharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) + self.inbound_nat_rules = kwargs.get('inbound_nat_rules', None) + + +class ShutdownNotificationContent(Model): + """The contents of a shutdown notification. Webhooks can use this type to + deserialize the request body when they get notified of an imminent + shutdown. + + :param skip_url: The URL to skip auto-shutdown. + :type skip_url: str + :param delay_url60: The URL to delay shutdown by 60 minutes. + :type delay_url60: str + :param delay_url120: The URL to delay shutdown by 2 hours. + :type delay_url120: str + :param vm_name: The virtual machine to be shut down. + :type vm_name: str + :param guid: The GUID for the virtual machine to be shut down. + :type guid: str + :param owner: The owner of the virtual machine. + :type owner: str + :param vm_url: The URL of the virtual machine. + :type vm_url: str + :param minutes_until_shutdown: Minutes remaining until shutdown + :type minutes_until_shutdown: str + :param event_type: The event for which a notification will be sent. + :type event_type: str + :param text: The text for the notification. + :type text: str + :param subscription_id: The subscription ID for the schedule. + :type subscription_id: str + :param resource_group_name: The resource group name for the schedule. + :type resource_group_name: str + :param lab_name: The lab for the schedule. + :type lab_name: str + """ + + _attribute_map = { + 'skip_url': {'key': 'skipUrl', 'type': 'str'}, + 'delay_url60': {'key': 'delayUrl60', 'type': 'str'}, + 'delay_url120': {'key': 'delayUrl120', 'type': 'str'}, + 'vm_name': {'key': 'vmName', 'type': 'str'}, + 'guid': {'key': 'guid', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'str'}, + 'vm_url': {'key': 'vmUrl', 'type': 'str'}, + 'minutes_until_shutdown': {'key': 'minutesUntilShutdown', 'type': 'str'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'lab_name': {'key': 'labName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ShutdownNotificationContent, self).__init__(**kwargs) + self.skip_url = kwargs.get('skip_url', None) + self.delay_url60 = kwargs.get('delay_url60', None) + self.delay_url120 = kwargs.get('delay_url120', None) + self.vm_name = kwargs.get('vm_name', None) + self.guid = kwargs.get('guid', None) + self.owner = kwargs.get('owner', None) + self.vm_url = kwargs.get('vm_url', None) + self.minutes_until_shutdown = kwargs.get('minutes_until_shutdown', None) + self.event_type = kwargs.get('event_type', None) + self.text = kwargs.get('text', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group_name = kwargs.get('resource_group_name', None) + self.lab_name = kwargs.get('lab_name', None) + + +class Subnet(Model): + """Subnet information. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name of the subnet as seen in the lab. + :type lab_subnet_name: str + :param allow_public_ip: The permission policy of the subnet for allowing + public IP addresses (i.e. Allow, Deny)). Possible values include: + 'Default', 'Deny', 'Allow' + :type allow_public_ip: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Subnet, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.allow_public_ip = kwargs.get('allow_public_ip', None) + + +class SubnetFragment(Model): + """Subnet information. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name of the subnet as seen in the lab. + :type lab_subnet_name: str + :param allow_public_ip: The permission policy of the subnet for allowing + public IP addresses (i.e. Allow, Deny)). Possible values include: + 'Default', 'Deny', 'Allow' + :type allow_public_ip: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubnetFragment, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.allow_public_ip = kwargs.get('allow_public_ip', None) + + +class SubnetOverride(Model): + """Property overrides on a subnet of a virtual network. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name given to the subnet within the lab. + :type lab_subnet_name: str + :param use_in_vm_creation_permission: Indicates whether this subnet can be + used during virtual machine creation (i.e. Allow, Deny). Possible values + include: 'Default', 'Deny', 'Allow' + :type use_in_vm_creation_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param use_public_ip_address_permission: Indicates whether public IP + addresses can be assigned to virtual machines on this subnet (i.e. Allow, + Deny). Possible values include: 'Default', 'Deny', 'Allow' + :type use_public_ip_address_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param shared_public_ip_address_configuration: Properties that virtual + machines on this subnet will share. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfiguration + :param virtual_network_pool_name: The virtual network pool associated with + this subnet. + :type virtual_network_pool_name: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, + 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfiguration'}, + 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubnetOverride, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.use_in_vm_creation_permission = kwargs.get('use_in_vm_creation_permission', None) + self.use_public_ip_address_permission = kwargs.get('use_public_ip_address_permission', None) + self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) + self.virtual_network_pool_name = kwargs.get('virtual_network_pool_name', None) + + +class SubnetOverrideFragment(Model): + """Property overrides on a subnet of a virtual network. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name given to the subnet within the lab. + :type lab_subnet_name: str + :param use_in_vm_creation_permission: Indicates whether this subnet can be + used during virtual machine creation (i.e. Allow, Deny). Possible values + include: 'Default', 'Deny', 'Allow' + :type use_in_vm_creation_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param use_public_ip_address_permission: Indicates whether public IP + addresses can be assigned to virtual machines on this subnet (i.e. Allow, + Deny). Possible values include: 'Default', 'Deny', 'Allow' + :type use_public_ip_address_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param shared_public_ip_address_configuration: Properties that virtual + machines on this subnet will share. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfigurationFragment + :param virtual_network_pool_name: The virtual network pool associated with + this subnet. + :type virtual_network_pool_name: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, + 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfigurationFragment'}, + 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubnetOverrideFragment, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.use_in_vm_creation_permission = kwargs.get('use_in_vm_creation_permission', None) + self.use_public_ip_address_permission = kwargs.get('use_public_ip_address_permission', None) + self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) + self.virtual_network_pool_name = kwargs.get('virtual_network_pool_name', None) + + +class SubnetSharedPublicIpAddressConfiguration(Model): + """Configuration for public IP address sharing. + + :param allowed_ports: Backend ports that virtual machines on this subnet + are allowed to expose + :type allowed_ports: list[~azure.mgmt.devtestlabs.models.Port] + """ + + _attribute_map = { + 'allowed_ports': {'key': 'allowedPorts', 'type': '[Port]'}, + } + + def __init__(self, **kwargs): + super(SubnetSharedPublicIpAddressConfiguration, self).__init__(**kwargs) + self.allowed_ports = kwargs.get('allowed_ports', None) + + +class SubnetSharedPublicIpAddressConfigurationFragment(Model): + """Configuration for public IP address sharing. + + :param allowed_ports: Backend ports that virtual machines on this subnet + are allowed to expose + :type allowed_ports: list[~azure.mgmt.devtestlabs.models.PortFragment] + """ + + _attribute_map = { + 'allowed_ports': {'key': 'allowedPorts', 'type': '[PortFragment]'}, + } + + def __init__(self, **kwargs): + super(SubnetSharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) + self.allowed_ports = kwargs.get('allowed_ports', None) + + +class TargetCostProperties(Model): + """Properties of a cost target. + + :param status: Target cost status. Possible values include: 'Enabled', + 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.TargetCostStatus + :param target: Lab target cost + :type target: int + :param cost_thresholds: Cost thresholds. + :type cost_thresholds: + list[~azure.mgmt.devtestlabs.models.CostThresholdProperties] + :param cycle_start_date_time: Reporting cycle start date. + :type cycle_start_date_time: datetime + :param cycle_end_date_time: Reporting cycle end date. + :type cycle_end_date_time: datetime + :param cycle_type: Reporting cycle type. Possible values include: + 'CalendarMonth', 'Custom' + :type cycle_type: str or ~azure.mgmt.devtestlabs.models.ReportingCycleType + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'int'}, + 'cost_thresholds': {'key': 'costThresholds', 'type': '[CostThresholdProperties]'}, + 'cycle_start_date_time': {'key': 'cycleStartDateTime', 'type': 'iso-8601'}, + 'cycle_end_date_time': {'key': 'cycleEndDateTime', 'type': 'iso-8601'}, + 'cycle_type': {'key': 'cycleType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TargetCostProperties, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.target = kwargs.get('target', None) + self.cost_thresholds = kwargs.get('cost_thresholds', None) + self.cycle_start_date_time = kwargs.get('cycle_start_date_time', None) + self.cycle_end_date_time = kwargs.get('cycle_end_date_time', None) + self.cycle_type = kwargs.get('cycle_type', None) + + +class User(Resource): + """Profile of a lab user. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the user. + :type identity: ~azure.mgmt.devtestlabs.models.UserIdentity + :param secret_store: The secret store of the user. + :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStore + :ivar created_date: The creation date of the user profile. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'properties.identity', 'type': 'UserIdentity'}, + 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStore'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(User, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.secret_store = kwargs.get('secret_store', None) + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class UserFragment(UpdateResource): + """Profile of a lab user. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the user. + :type identity: ~azure.mgmt.devtestlabs.models.UserIdentityFragment + :param secret_store: The secret store of the user. + :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStoreFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'properties.identity', 'type': 'UserIdentityFragment'}, + 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStoreFragment'}, + } + + def __init__(self, **kwargs): + super(UserFragment, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.secret_store = kwargs.get('secret_store', None) + + +class UserIdentity(Model): + """Identity attributes of a lab user. + + :param principal_name: Set to the principal name / UPN of the client JWT + making the request. + :type principal_name: str + :param principal_id: Set to the principal Id of the client JWT making the + request. Service principal will not have the principal Id. + :type principal_id: str + :param tenant_id: Set to the tenant ID of the client JWT making the + request. + :type tenant_id: str + :param object_id: Set to the object Id of the client JWT making the + request. Not all users have object Id. For CSP (reseller) scenarios for + example, object Id is not available. + :type object_id: str + :param app_id: Set to the app Id of the client JWT making the request. + :type app_id: str + """ + + _attribute_map = { + 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'app_id': {'key': 'appId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserIdentity, self).__init__(**kwargs) + self.principal_name = kwargs.get('principal_name', None) + self.principal_id = kwargs.get('principal_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.object_id = kwargs.get('object_id', None) + self.app_id = kwargs.get('app_id', None) + + +class UserIdentityFragment(Model): + """Identity attributes of a lab user. + + :param principal_name: Set to the principal name / UPN of the client JWT + making the request. + :type principal_name: str + :param principal_id: Set to the principal Id of the client JWT making the + request. Service principal will not have the principal Id. + :type principal_id: str + :param tenant_id: Set to the tenant ID of the client JWT making the + request. + :type tenant_id: str + :param object_id: Set to the object Id of the client JWT making the + request. Not all users have object Id. For CSP (reseller) scenarios for + example, object Id is not available. + :type object_id: str + :param app_id: Set to the app Id of the client JWT making the request. + :type app_id: str + """ + + _attribute_map = { + 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'app_id': {'key': 'appId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserIdentityFragment, self).__init__(**kwargs) + self.principal_name = kwargs.get('principal_name', None) + self.principal_id = kwargs.get('principal_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.object_id = kwargs.get('object_id', None) + self.app_id = kwargs.get('app_id', None) + + +class UserSecretStore(Model): + """Properties of a user's secret store. + + :param key_vault_uri: The URI of the user's Key vault. + :type key_vault_uri: str + :param key_vault_id: The ID of the user's Key vault. + :type key_vault_id: str + """ + + _attribute_map = { + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserSecretStore, self).__init__(**kwargs) + self.key_vault_uri = kwargs.get('key_vault_uri', None) + self.key_vault_id = kwargs.get('key_vault_id', None) + + +class UserSecretStoreFragment(Model): + """Properties of a user's secret store. + + :param key_vault_uri: The URI of the user's Key vault. + :type key_vault_uri: str + :param key_vault_id: The ID of the user's Key vault. + :type key_vault_id: str + """ + + _attribute_map = { + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserSecretStoreFragment, self).__init__(**kwargs) + self.key_vault_uri = kwargs.get('key_vault_uri', None) + self.key_vault_id = kwargs.get('key_vault_id', None) + + +class VirtualNetwork(Resource): + """A virtual network. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param allowed_subnets: The allowed subnets of the virtual network. + :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.Subnet] + :param description: The description of the virtual network. + :type description: str + :param external_provider_resource_id: The Microsoft.Network resource + identifier of the virtual network. + :type external_provider_resource_id: str + :ivar external_subnets: The external subnet properties. + :vartype external_subnets: + list[~azure.mgmt.devtestlabs.models.ExternalSubnet] + :param subnet_overrides: The subnet overrides of the virtual network. + :type subnet_overrides: + list[~azure.mgmt.devtestlabs.models.SubnetOverride] + :ivar created_date: The creation date of the virtual network. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'external_subnets': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[Subnet]'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, + 'external_subnets': {'key': 'properties.externalSubnets', 'type': '[ExternalSubnet]'}, + 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverride]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualNetwork, self).__init__(**kwargs) + self.allowed_subnets = kwargs.get('allowed_subnets', None) + self.description = kwargs.get('description', None) + self.external_provider_resource_id = kwargs.get('external_provider_resource_id', None) + self.external_subnets = None + self.subnet_overrides = kwargs.get('subnet_overrides', None) + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class VirtualNetworkFragment(UpdateResource): + """A virtual network. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param allowed_subnets: The allowed subnets of the virtual network. + :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.SubnetFragment] + :param description: The description of the virtual network. + :type description: str + :param external_provider_resource_id: The Microsoft.Network resource + identifier of the virtual network. + :type external_provider_resource_id: str + :param subnet_overrides: The subnet overrides of the virtual network. + :type subnet_overrides: + list[~azure.mgmt.devtestlabs.models.SubnetOverrideFragment] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[SubnetFragment]'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, + 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverrideFragment]'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkFragment, self).__init__(**kwargs) + self.allowed_subnets = kwargs.get('allowed_subnets', None) + self.description = kwargs.get('description', None) + self.external_provider_resource_id = kwargs.get('external_provider_resource_id', None) + self.subnet_overrides = kwargs.get('subnet_overrides', None) + + +class WeekDetails(Model): + """Properties of a weekly schedule. + + :param weekdays: The days of the week for which the schedule is set (e.g. + Sunday, Monday, Tuesday, etc.). + :type weekdays: list[str] + :param time: The time of the day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'weekdays': {'key': 'weekdays', 'type': '[str]'}, + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WeekDetails, self).__init__(**kwargs) + self.weekdays = kwargs.get('weekdays', None) + self.time = kwargs.get('time', None) + + +class WeekDetailsFragment(Model): + """Properties of a weekly schedule. + + :param weekdays: The days of the week for which the schedule is set (e.g. + Sunday, Monday, Tuesday, etc.). + :type weekdays: list[str] + :param time: The time of the day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'weekdays': {'key': 'weekdays', 'type': '[str]'}, + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WeekDetailsFragment, self).__init__(**kwargs) + self.weekdays = kwargs.get('weekdays', None) + self.time = kwargs.get('time', None) + + +class WindowsOsInfo(Model): + """Information about a Windows OS. + + :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, + SysprepRequested, SysprepApplied). Possible values include: + 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' + :type windows_os_state: str or + ~azure.mgmt.devtestlabs.models.WindowsOsState + """ + + _attribute_map = { + 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WindowsOsInfo, self).__init__(**kwargs) + self.windows_os_state = kwargs.get('windows_os_state', None) + + +class WindowsOsInfoFragment(Model): + """Information about a Windows OS. + + :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, + SysprepRequested, SysprepApplied). Possible values include: + 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' + :type windows_os_state: str or + ~azure.mgmt.devtestlabs.models.WindowsOsState + """ + + _attribute_map = { + 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WindowsOsInfoFragment, self).__init__(**kwargs) + self.windows_os_state = kwargs.get('windows_os_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models_py3.py new file mode 100644 index 000000000000..17a0bd5726ce --- /dev/null +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_models_py3.py @@ -0,0 +1,5702 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Resource(Model): + """An Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class ApplicableSchedule(Resource): + """Schedules applicable to a virtual machine. The schedules may have been + defined on a VM or on lab level. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set + at the lab or lab resource level. + :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.Schedule + :param lab_vms_startup: The auto-startup schedule, if one has been set at + the lab or lab resource level. + :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.Schedule + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'Schedule'}, + 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'Schedule'}, + } + + def __init__(self, *, location: str=None, tags=None, lab_vms_shutdown=None, lab_vms_startup=None, **kwargs) -> None: + super(ApplicableSchedule, self).__init__(location=location, tags=tags, **kwargs) + self.lab_vms_shutdown = lab_vms_shutdown + self.lab_vms_startup = lab_vms_startup + + +class UpdateResource(Model): + """Represents an update resource. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(UpdateResource, self).__init__(**kwargs) + self.tags = tags + + +class ApplicableScheduleFragment(UpdateResource): + """Schedules applicable to a virtual machine. The schedules may have been + defined on a VM or on lab level. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set + at the lab or lab resource level. + :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.ScheduleFragment + :param lab_vms_startup: The auto-startup schedule, if one has been set at + the lab or lab resource level. + :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.ScheduleFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'ScheduleFragment'}, + 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'ScheduleFragment'}, + } + + def __init__(self, *, tags=None, lab_vms_shutdown=None, lab_vms_startup=None, **kwargs) -> None: + super(ApplicableScheduleFragment, self).__init__(tags=tags, **kwargs) + self.lab_vms_shutdown = lab_vms_shutdown + self.lab_vms_startup = lab_vms_startup + + +class ApplyArtifactsRequest(Model): + """Request body for applying artifacts to a virtual machine. + + :param artifacts: The list of artifacts to apply. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + """ + + _attribute_map = { + 'artifacts': {'key': 'artifacts', 'type': '[ArtifactInstallProperties]'}, + } + + def __init__(self, *, artifacts=None, **kwargs) -> None: + super(ApplyArtifactsRequest, self).__init__(**kwargs) + self.artifacts = artifacts + + +class ArmTemplate(Resource): + """An Azure Resource Manager template. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar display_name: The display name of the ARM template. + :vartype display_name: str + :ivar description: The description of the ARM template. + :vartype description: str + :ivar publisher: The publisher of the ARM template. + :vartype publisher: str + :ivar icon: The URI to the icon of the ARM template. + :vartype icon: str + :ivar contents: The contents of the ARM template. + :vartype contents: object + :ivar created_date: The creation date of the armTemplate. + :vartype created_date: datetime + :ivar parameters_value_files_info: File name and parameter values + information from all azuredeploy.*.parameters.json for the ARM template. + :vartype parameters_value_files_info: + list[~azure.mgmt.devtestlabs.models.ParametersValueFileInfo] + :ivar enabled: Whether or not ARM template is enabled for use by lab user. + :vartype enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'publisher': {'readonly': True}, + 'icon': {'readonly': True}, + 'contents': {'readonly': True}, + 'created_date': {'readonly': True}, + 'parameters_value_files_info': {'readonly': True}, + 'enabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'contents': {'key': 'properties.contents', 'type': 'object'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'parameters_value_files_info': {'key': 'properties.parametersValueFilesInfo', 'type': '[ParametersValueFileInfo]'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(ArmTemplate, self).__init__(location=location, tags=tags, **kwargs) + self.display_name = None + self.description = None + self.publisher = None + self.icon = None + self.contents = None + self.created_date = None + self.parameters_value_files_info = None + self.enabled = None + + +class ArmTemplateInfo(Model): + """Information about a generated ARM template. + + :param template: The template's contents. + :type template: object + :param parameters: The parameters of the ARM template. + :type parameters: object + """ + + _attribute_map = { + 'template': {'key': 'template', 'type': 'object'}, + 'parameters': {'key': 'parameters', 'type': 'object'}, + } + + def __init__(self, *, template=None, parameters=None, **kwargs) -> None: + super(ArmTemplateInfo, self).__init__(**kwargs) + self.template = template + self.parameters = parameters + + +class ArmTemplateParameterProperties(Model): + """Properties of an Azure Resource Manager template parameter. + + :param name: The name of the template parameter. + :type name: str + :param value: The value of the template parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ArmTemplateParameterProperties, self).__init__(**kwargs) + self.name = name + self.value = value + + +class ArmTemplateParameterPropertiesFragment(Model): + """Properties of an Azure Resource Manager template parameter. + + :param name: The name of the template parameter. + :type name: str + :param value: The value of the template parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ArmTemplateParameterPropertiesFragment, self).__init__(**kwargs) + self.name = name + self.value = value + + +class Artifact(Resource): + """An artifact. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar title: The artifact's title. + :vartype title: str + :ivar description: The artifact's description. + :vartype description: str + :ivar publisher: The artifact's publisher. + :vartype publisher: str + :ivar file_path: The file path to the artifact. + :vartype file_path: str + :ivar icon: The URI to the artifact icon. + :vartype icon: str + :ivar target_os_type: The artifact's target OS. + :vartype target_os_type: str + :ivar parameters: The artifact's parameters. + :vartype parameters: object + :ivar created_date: The artifact's creation date. + :vartype created_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'title': {'readonly': True}, + 'description': {'readonly': True}, + 'publisher': {'readonly': True}, + 'file_path': {'readonly': True}, + 'icon': {'readonly': True}, + 'target_os_type': {'readonly': True}, + 'parameters': {'readonly': True}, + 'created_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'file_path': {'key': 'properties.filePath', 'type': 'str'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'target_os_type': {'key': 'properties.targetOsType', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': 'object'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(Artifact, self).__init__(location=location, tags=tags, **kwargs) + self.title = None + self.description = None + self.publisher = None + self.file_path = None + self.icon = None + self.target_os_type = None + self.parameters = None + self.created_date = None + + +class ArtifactDeploymentStatusProperties(Model): + """Properties of an artifact deployment. + + :param deployment_status: The deployment status of the artifact. + :type deployment_status: str + :param artifacts_applied: The total count of the artifacts that were + successfully applied. + :type artifacts_applied: int + :param total_artifacts: The total count of the artifacts that were + tentatively applied. + :type total_artifacts: int + """ + + _attribute_map = { + 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, + 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, + 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, + } + + def __init__(self, *, deployment_status: str=None, artifacts_applied: int=None, total_artifacts: int=None, **kwargs) -> None: + super(ArtifactDeploymentStatusProperties, self).__init__(**kwargs) + self.deployment_status = deployment_status + self.artifacts_applied = artifacts_applied + self.total_artifacts = total_artifacts + + +class ArtifactDeploymentStatusPropertiesFragment(Model): + """Properties of an artifact deployment. + + :param deployment_status: The deployment status of the artifact. + :type deployment_status: str + :param artifacts_applied: The total count of the artifacts that were + successfully applied. + :type artifacts_applied: int + :param total_artifacts: The total count of the artifacts that were + tentatively applied. + :type total_artifacts: int + """ + + _attribute_map = { + 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, + 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, + 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, + } + + def __init__(self, *, deployment_status: str=None, artifacts_applied: int=None, total_artifacts: int=None, **kwargs) -> None: + super(ArtifactDeploymentStatusPropertiesFragment, self).__init__(**kwargs) + self.deployment_status = deployment_status + self.artifacts_applied = artifacts_applied + self.total_artifacts = total_artifacts + + +class ArtifactInstallProperties(Model): + """Properties of an artifact. + + :param artifact_id: The artifact's identifier. + :type artifact_id: str + :param artifact_title: The artifact's title. + :type artifact_title: str + :param parameters: The parameters of the artifact. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArtifactParameterProperties] + :param status: The status of the artifact. + :type status: str + :param deployment_status_message: The status message from the deployment. + :type deployment_status_message: str + :param vm_extension_status_message: The status message from the virtual + machine extension. + :type vm_extension_status_message: str + :param install_time: The time that the artifact starts to install on the + virtual machine. + :type install_time: datetime + """ + + _attribute_map = { + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterProperties]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, + 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, + 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, artifact_id: str=None, artifact_title: str=None, parameters=None, status: str=None, deployment_status_message: str=None, vm_extension_status_message: str=None, install_time=None, **kwargs) -> None: + super(ArtifactInstallProperties, self).__init__(**kwargs) + self.artifact_id = artifact_id + self.artifact_title = artifact_title + self.parameters = parameters + self.status = status + self.deployment_status_message = deployment_status_message + self.vm_extension_status_message = vm_extension_status_message + self.install_time = install_time + + +class ArtifactInstallPropertiesFragment(Model): + """Properties of an artifact. + + :param artifact_id: The artifact's identifier. + :type artifact_id: str + :param artifact_title: The artifact's title. + :type artifact_title: str + :param parameters: The parameters of the artifact. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArtifactParameterPropertiesFragment] + :param status: The status of the artifact. + :type status: str + :param deployment_status_message: The status message from the deployment. + :type deployment_status_message: str + :param vm_extension_status_message: The status message from the virtual + machine extension. + :type vm_extension_status_message: str + :param install_time: The time that the artifact starts to install on the + virtual machine. + :type install_time: datetime + """ + + _attribute_map = { + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterPropertiesFragment]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, + 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, + 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, artifact_id: str=None, artifact_title: str=None, parameters=None, status: str=None, deployment_status_message: str=None, vm_extension_status_message: str=None, install_time=None, **kwargs) -> None: + super(ArtifactInstallPropertiesFragment, self).__init__(**kwargs) + self.artifact_id = artifact_id + self.artifact_title = artifact_title + self.parameters = parameters + self.status = status + self.deployment_status_message = deployment_status_message + self.vm_extension_status_message = vm_extension_status_message + self.install_time = install_time + + +class ArtifactParameterProperties(Model): + """Properties of an artifact parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ArtifactParameterProperties, self).__init__(**kwargs) + self.name = name + self.value = value + + +class ArtifactParameterPropertiesFragment(Model): + """Properties of an artifact parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ArtifactParameterPropertiesFragment, self).__init__(**kwargs) + self.name = name + self.value = value + + +class ArtifactSource(Resource): + """Properties of an artifact source. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param display_name: The artifact source's display name. + :type display_name: str + :param uri: The artifact source's URI. + :type uri: str + :param source_type: The artifact source's type. Possible values include: + 'VsoGit', 'GitHub' + :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType + :param folder_path: The folder containing artifacts. + :type folder_path: str + :param arm_template_folder_path: The folder containing Azure Resource + Manager templates. + :type arm_template_folder_path: str + :param branch_ref: The artifact source's branch reference. + :type branch_ref: str + :param security_token: The security token to authenticate to the artifact + source. + :type security_token: str + :param status: Indicates if the artifact source is enabled (values: + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :ivar created_date: The artifact source's creation date. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, + 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, + 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, display_name: str=None, uri: str=None, source_type=None, folder_path: str=None, arm_template_folder_path: str=None, branch_ref: str=None, security_token: str=None, status=None, **kwargs) -> None: + super(ArtifactSource, self).__init__(location=location, tags=tags, **kwargs) + self.display_name = display_name + self.uri = uri + self.source_type = source_type + self.folder_path = folder_path + self.arm_template_folder_path = arm_template_folder_path + self.branch_ref = branch_ref + self.security_token = security_token + self.status = status + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class ArtifactSourceFragment(UpdateResource): + """Properties of an artifact source. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param display_name: The artifact source's display name. + :type display_name: str + :param uri: The artifact source's URI. + :type uri: str + :param source_type: The artifact source's type. Possible values include: + 'VsoGit', 'GitHub' + :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType + :param folder_path: The folder containing artifacts. + :type folder_path: str + :param arm_template_folder_path: The folder containing Azure Resource + Manager templates. + :type arm_template_folder_path: str + :param branch_ref: The artifact source's branch reference. + :type branch_ref: str + :param security_token: The security token to authenticate to the artifact + source. + :type security_token: str + :param status: Indicates if the artifact source is enabled (values: + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, + 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, + 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + } + + def __init__(self, *, tags=None, display_name: str=None, uri: str=None, source_type=None, folder_path: str=None, arm_template_folder_path: str=None, branch_ref: str=None, security_token: str=None, status=None, **kwargs) -> None: + super(ArtifactSourceFragment, self).__init__(tags=tags, **kwargs) + self.display_name = display_name + self.uri = uri + self.source_type = source_type + self.folder_path = folder_path + self.arm_template_folder_path = arm_template_folder_path + self.branch_ref = branch_ref + self.security_token = security_token + self.status = status + + +class AttachDiskProperties(Model): + """Properties of the disk to attach. + + :param leased_by_lab_vm_id: The resource ID of the Lab virtual machine to + which the disk is attached. + :type leased_by_lab_vm_id: str + """ + + _attribute_map = { + 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, + } + + def __init__(self, *, leased_by_lab_vm_id: str=None, **kwargs) -> None: + super(AttachDiskProperties, self).__init__(**kwargs) + self.leased_by_lab_vm_id = leased_by_lab_vm_id + + +class AttachNewDataDiskOptions(Model): + """Properties to attach new disk to the Virtual Machine. + + :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :type disk_size_gi_b: int + :param disk_name: The name of the disk to be attached. + :type disk_name: str + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + 'disk_name': {'key': 'diskName', 'type': 'str'}, + 'disk_type': {'key': 'diskType', 'type': 'str'}, + } + + def __init__(self, *, disk_size_gi_b: int=None, disk_name: str=None, disk_type=None, **kwargs) -> None: + super(AttachNewDataDiskOptions, self).__init__(**kwargs) + self.disk_size_gi_b = disk_size_gi_b + self.disk_name = disk_name + self.disk_type = disk_type + + +class AttachNewDataDiskOptionsFragment(Model): + """Properties to attach new disk to the Virtual Machine. + + :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :type disk_size_gi_b: int + :param disk_name: The name of the disk to be attached. + :type disk_name: str + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + 'disk_name': {'key': 'diskName', 'type': 'str'}, + 'disk_type': {'key': 'diskType', 'type': 'str'}, + } + + def __init__(self, *, disk_size_gi_b: int=None, disk_name: str=None, disk_type=None, **kwargs) -> None: + super(AttachNewDataDiskOptionsFragment, self).__init__(**kwargs) + self.disk_size_gi_b = disk_size_gi_b + self.disk_name = disk_name + self.disk_type = disk_type + + +class BulkCreationParameters(Model): + """Parameters for creating multiple virtual machines as a single action. + + :param instance_count: The number of virtual machine instances to create. + :type instance_count: int + """ + + _attribute_map = { + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + } + + def __init__(self, *, instance_count: int=None, **kwargs) -> None: + super(BulkCreationParameters, self).__init__(**kwargs) + self.instance_count = instance_count + + +class BulkCreationParametersFragment(Model): + """Parameters for creating multiple virtual machines as a single action. + + :param instance_count: The number of virtual machine instances to create. + :type instance_count: int + """ + + _attribute_map = { + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + } + + def __init__(self, *, instance_count: int=None, **kwargs) -> None: + super(BulkCreationParametersFragment, self).__init__(**kwargs) + self.instance_count = instance_count + + +class CloudError(Model): + """Error from a REST request. + + :param error: The cloud error that occurred + :type error: ~azure.mgmt.devtestlabs.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.error = error + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """Body of an error from a REST request. + + :param code: The error code. + :type code: str + :param message: The error message. + :type message: str + :param target: The error target. + :type target: str + :param details: Inner errors. + :type details: list[~azure.mgmt.devtestlabs.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class ComputeDataDisk(Model): + """A data disks attached to a virtual machine. + + :param name: Gets data disk name. + :type name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :param disk_size_gi_b: Gets data disk size in GiB. + :type disk_size_gi_b: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disk_uri': {'key': 'diskUri', 'type': 'str'}, + 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, disk_uri: str=None, managed_disk_id: str=None, disk_size_gi_b: int=None, **kwargs) -> None: + super(ComputeDataDisk, self).__init__(**kwargs) + self.name = name + self.disk_uri = disk_uri + self.managed_disk_id = managed_disk_id + self.disk_size_gi_b = disk_size_gi_b + + +class ComputeDataDiskFragment(Model): + """A data disks attached to a virtual machine. + + :param name: Gets data disk name. + :type name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :param disk_size_gi_b: Gets data disk size in GiB. + :type disk_size_gi_b: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disk_uri': {'key': 'diskUri', 'type': 'str'}, + 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, disk_uri: str=None, managed_disk_id: str=None, disk_size_gi_b: int=None, **kwargs) -> None: + super(ComputeDataDiskFragment, self).__init__(**kwargs) + self.name = name + self.disk_uri = disk_uri + self.managed_disk_id = managed_disk_id + self.disk_size_gi_b = disk_size_gi_b + + +class ComputeVmInstanceViewStatus(Model): + """Status information about a virtual machine. + + :param code: Gets the status Code. + :type code: str + :param display_status: Gets the short localizable label for the status. + :type display_status: str + :param message: Gets the message associated with the status. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, display_status: str=None, message: str=None, **kwargs) -> None: + super(ComputeVmInstanceViewStatus, self).__init__(**kwargs) + self.code = code + self.display_status = display_status + self.message = message + + +class ComputeVmInstanceViewStatusFragment(Model): + """Status information about a virtual machine. + + :param code: Gets the status Code. + :type code: str + :param display_status: Gets the short localizable label for the status. + :type display_status: str + :param message: Gets the message associated with the status. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, display_status: str=None, message: str=None, **kwargs) -> None: + super(ComputeVmInstanceViewStatusFragment, self).__init__(**kwargs) + self.code = code + self.display_status = display_status + self.message = message + + +class ComputeVmProperties(Model): + """Properties of a virtual machine returned by the Microsoft.Compute API. + + :param statuses: Gets the statuses of the virtual machine. + :type statuses: + list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatus] + :param os_type: Gets the OS type of the virtual machine. + :type os_type: str + :param vm_size: Gets the size of the virtual machine. + :type vm_size: str + :param network_interface_id: Gets the network interface ID of the virtual + machine. + :type network_interface_id: str + :param os_disk_id: Gets OS disk blob uri for the virtual machine. + :type os_disk_id: str + :param data_disk_ids: Gets data disks blob uri for the virtual machine. + :type data_disk_ids: list[str] + :param data_disks: Gets all data disks attached to the virtual machine. + :type data_disks: list[~azure.mgmt.devtestlabs.models.ComputeDataDisk] + """ + + _attribute_map = { + 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatus]'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, + 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, + 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDisk]'}, + } + + def __init__(self, *, statuses=None, os_type: str=None, vm_size: str=None, network_interface_id: str=None, os_disk_id: str=None, data_disk_ids=None, data_disks=None, **kwargs) -> None: + super(ComputeVmProperties, self).__init__(**kwargs) + self.statuses = statuses + self.os_type = os_type + self.vm_size = vm_size + self.network_interface_id = network_interface_id + self.os_disk_id = os_disk_id + self.data_disk_ids = data_disk_ids + self.data_disks = data_disks + + +class ComputeVmPropertiesFragment(Model): + """Properties of a virtual machine returned by the Microsoft.Compute API. + + :param statuses: Gets the statuses of the virtual machine. + :type statuses: + list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatusFragment] + :param os_type: Gets the OS type of the virtual machine. + :type os_type: str + :param vm_size: Gets the size of the virtual machine. + :type vm_size: str + :param network_interface_id: Gets the network interface ID of the virtual + machine. + :type network_interface_id: str + :param os_disk_id: Gets OS disk blob uri for the virtual machine. + :type os_disk_id: str + :param data_disk_ids: Gets data disks blob uri for the virtual machine. + :type data_disk_ids: list[str] + :param data_disks: Gets all data disks attached to the virtual machine. + :type data_disks: + list[~azure.mgmt.devtestlabs.models.ComputeDataDiskFragment] + """ + + _attribute_map = { + 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatusFragment]'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, + 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, + 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDiskFragment]'}, + } + + def __init__(self, *, statuses=None, os_type: str=None, vm_size: str=None, network_interface_id: str=None, os_disk_id: str=None, data_disk_ids=None, data_disks=None, **kwargs) -> None: + super(ComputeVmPropertiesFragment, self).__init__(**kwargs) + self.statuses = statuses + self.os_type = os_type + self.vm_size = vm_size + self.network_interface_id = network_interface_id + self.os_disk_id = os_disk_id + self.data_disk_ids = data_disk_ids + self.data_disks = data_disks + + +class CostThresholdProperties(Model): + """Properties of a cost threshold item. + + :param threshold_id: The ID of the cost threshold item. + :type threshold_id: str + :param percentage_threshold: The value of the percentage cost threshold. + :type percentage_threshold: + ~azure.mgmt.devtestlabs.models.PercentageCostThresholdProperties + :param display_on_chart: Indicates whether this threshold will be + displayed on cost charts. Possible values include: 'Enabled', 'Disabled' + :type display_on_chart: str or + ~azure.mgmt.devtestlabs.models.CostThresholdStatus + :param send_notification_when_exceeded: Indicates whether notifications + will be sent when this threshold is exceeded. Possible values include: + 'Enabled', 'Disabled' + :type send_notification_when_exceeded: str or + ~azure.mgmt.devtestlabs.models.CostThresholdStatus + :param notification_sent: Indicates the datetime when notifications were + last sent for this threshold. + :type notification_sent: str + """ + + _attribute_map = { + 'threshold_id': {'key': 'thresholdId', 'type': 'str'}, + 'percentage_threshold': {'key': 'percentageThreshold', 'type': 'PercentageCostThresholdProperties'}, + 'display_on_chart': {'key': 'displayOnChart', 'type': 'str'}, + 'send_notification_when_exceeded': {'key': 'sendNotificationWhenExceeded', 'type': 'str'}, + 'notification_sent': {'key': 'notificationSent', 'type': 'str'}, + } + + def __init__(self, *, threshold_id: str=None, percentage_threshold=None, display_on_chart=None, send_notification_when_exceeded=None, notification_sent: str=None, **kwargs) -> None: + super(CostThresholdProperties, self).__init__(**kwargs) + self.threshold_id = threshold_id + self.percentage_threshold = percentage_threshold + self.display_on_chart = display_on_chart + self.send_notification_when_exceeded = send_notification_when_exceeded + self.notification_sent = notification_sent + + +class CustomImage(Resource): + """A custom image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param vm: The virtual machine from which the image is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVm + :param vhd: The VHD from which the image is to be created. + :type vhd: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustom + :param description: The description of the custom image. + :type description: str + :param author: The author of the custom image. + :type author: str + :ivar creation_date: The creation date of the custom image. + :vartype creation_date: datetime + :param managed_image_id: The Managed Image Id backing the custom image. + :type managed_image_id: str + :param managed_snapshot_id: The Managed Snapshot Id backing the custom + image. + :type managed_snapshot_id: str + :param data_disk_storage_info: Storage information about the data disks + present in the custom image + :type data_disk_storage_info: + list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfo] + :param custom_image_plan: Storage information about the plan related to + this custom image + :type custom_image_plan: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlan + :param is_plan_authorized: Whether or not the custom images underlying + offer/plan has been enabled for programmatic deployment + :type is_plan_authorized: bool + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVm'}, + 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustom'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, + 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, + 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfo]'}, + 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlan'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, vm=None, vhd=None, description: str=None, author: str=None, managed_image_id: str=None, managed_snapshot_id: str=None, data_disk_storage_info=None, custom_image_plan=None, is_plan_authorized: bool=None, **kwargs) -> None: + super(CustomImage, self).__init__(location=location, tags=tags, **kwargs) + self.vm = vm + self.vhd = vhd + self.description = description + self.author = author + self.creation_date = None + self.managed_image_id = managed_image_id + self.managed_snapshot_id = managed_snapshot_id + self.data_disk_storage_info = data_disk_storage_info + self.custom_image_plan = custom_image_plan + self.is_plan_authorized = is_plan_authorized + self.provisioning_state = None + self.unique_identifier = None + + +class CustomImageFragment(UpdateResource): + """A custom image. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param vm: The virtual machine from which the image is to be created. + :type vm: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVmFragment + :param vhd: The VHD from which the image is to be created. + :type vhd: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustomFragment + :param description: The description of the custom image. + :type description: str + :param author: The author of the custom image. + :type author: str + :param managed_image_id: The Managed Image Id backing the custom image. + :type managed_image_id: str + :param managed_snapshot_id: The Managed Snapshot Id backing the custom + image. + :type managed_snapshot_id: str + :param data_disk_storage_info: Storage information about the data disks + present in the custom image + :type data_disk_storage_info: + list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfoFragment] + :param custom_image_plan: Storage information about the plan related to + this custom image + :type custom_image_plan: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlanFragment + :param is_plan_authorized: Whether or not the custom images underlying + offer/plan has been enabled for programmatic deployment + :type is_plan_authorized: bool + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVmFragment'}, + 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustomFragment'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, + 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, + 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfoFragment]'}, + 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlanFragment'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + } + + def __init__(self, *, tags=None, vm=None, vhd=None, description: str=None, author: str=None, managed_image_id: str=None, managed_snapshot_id: str=None, data_disk_storage_info=None, custom_image_plan=None, is_plan_authorized: bool=None, **kwargs) -> None: + super(CustomImageFragment, self).__init__(tags=tags, **kwargs) + self.vm = vm + self.vhd = vhd + self.description = description + self.author = author + self.managed_image_id = managed_image_id + self.managed_snapshot_id = managed_snapshot_id + self.data_disk_storage_info = data_disk_storage_info + self.custom_image_plan = custom_image_plan + self.is_plan_authorized = is_plan_authorized + + +class CustomImagePropertiesCustom(Model): + """Properties for creating a custom image from a VHD. + + All required parameters must be populated in order to send to Azure. + + :param image_name: The image name. + :type image_name: str + :param sys_prep: Indicates whether sysprep has been run on the VHD. + :type sys_prep: bool + :param os_type: Required. The OS type of the custom image (i.e. Windows, + Linux). Possible values include: 'Windows', 'Linux', 'None' + :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType + """ + + _validation = { + 'os_type': {'required': True}, + } + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, *, os_type, image_name: str=None, sys_prep: bool=None, **kwargs) -> None: + super(CustomImagePropertiesCustom, self).__init__(**kwargs) + self.image_name = image_name + self.sys_prep = sys_prep + self.os_type = os_type + + +class CustomImagePropertiesCustomFragment(Model): + """Properties for creating a custom image from a VHD. + + :param image_name: The image name. + :type image_name: str + :param sys_prep: Indicates whether sysprep has been run on the VHD. + :type sys_prep: bool + :param os_type: The OS type of the custom image (i.e. Windows, Linux). + Possible values include: 'Windows', 'Linux', 'None' + :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType + """ + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, *, image_name: str=None, sys_prep: bool=None, os_type=None, **kwargs) -> None: + super(CustomImagePropertiesCustomFragment, self).__init__(**kwargs) + self.image_name = image_name + self.sys_prep = sys_prep + self.os_type = os_type + + +class CustomImagePropertiesFromPlan(Model): + """Properties for plan on a custom image. + + :param id: The id of the plan, equivalent to name of the plan + :type id: str + :param publisher: The publisher for the plan from the marketplace image + the custom image is derived from + :type publisher: str + :param offer: The offer for the plan from the marketplace image the custom + image is derived from + :type offer: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, **kwargs) -> None: + super(CustomImagePropertiesFromPlan, self).__init__(**kwargs) + self.id = id + self.publisher = publisher + self.offer = offer + + +class CustomImagePropertiesFromPlanFragment(Model): + """Properties for plan on a custom image. + + :param id: The id of the plan, equivalent to name of the plan + :type id: str + :param publisher: The publisher for the plan from the marketplace image + the custom image is derived from + :type publisher: str + :param offer: The offer for the plan from the marketplace image the custom + image is derived from + :type offer: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, **kwargs) -> None: + super(CustomImagePropertiesFromPlanFragment, self).__init__(**kwargs) + self.id = id + self.publisher = publisher + self.offer = offer + + +class CustomImagePropertiesFromVm(Model): + """Properties for creating a custom image from a virtual machine. + + :param source_vm_id: The source vm identifier. + :type source_vm_id: str + :param windows_os_info: The Windows OS information of the VM. + :type windows_os_info: ~azure.mgmt.devtestlabs.models.WindowsOsInfo + :param linux_os_info: The Linux OS information of the VM. + :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfo + """ + + _attribute_map = { + 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, + 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfo'}, + 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfo'}, + } + + def __init__(self, *, source_vm_id: str=None, windows_os_info=None, linux_os_info=None, **kwargs) -> None: + super(CustomImagePropertiesFromVm, self).__init__(**kwargs) + self.source_vm_id = source_vm_id + self.windows_os_info = windows_os_info + self.linux_os_info = linux_os_info + + +class CustomImagePropertiesFromVmFragment(Model): + """Properties for creating a custom image from a virtual machine. + + :param source_vm_id: The source vm identifier. + :type source_vm_id: str + :param windows_os_info: The Windows OS information of the VM. + :type windows_os_info: + ~azure.mgmt.devtestlabs.models.WindowsOsInfoFragment + :param linux_os_info: The Linux OS information of the VM. + :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfoFragment + """ + + _attribute_map = { + 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, + 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfoFragment'}, + 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfoFragment'}, + } + + def __init__(self, *, source_vm_id: str=None, windows_os_info=None, linux_os_info=None, **kwargs) -> None: + super(CustomImagePropertiesFromVmFragment, self).__init__(**kwargs) + self.source_vm_id = source_vm_id + self.windows_os_info = windows_os_info + self.linux_os_info = linux_os_info + + +class DataDiskProperties(Model): + """Request body for adding a new or existing data disk to a virtual machine. + + :param attach_new_data_disk_options: Specifies options to attach a new + disk to the virtual machine. + :type attach_new_data_disk_options: + ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptions + :param existing_lab_disk_id: Specifies the existing lab disk id to attach + to virtual machine. + :type existing_lab_disk_id: str + :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, + ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type host_caching: str or + ~azure.mgmt.devtestlabs.models.HostCachingOptions + """ + + _attribute_map = { + 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptions'}, + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + 'host_caching': {'key': 'hostCaching', 'type': 'str'}, + } + + def __init__(self, *, attach_new_data_disk_options=None, existing_lab_disk_id: str=None, host_caching=None, **kwargs) -> None: + super(DataDiskProperties, self).__init__(**kwargs) + self.attach_new_data_disk_options = attach_new_data_disk_options + self.existing_lab_disk_id = existing_lab_disk_id + self.host_caching = host_caching + + +class DataDiskPropertiesFragment(Model): + """Request body for adding a new or existing data disk to a virtual machine. + + :param attach_new_data_disk_options: Specifies options to attach a new + disk to the virtual machine. + :type attach_new_data_disk_options: + ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptionsFragment + :param existing_lab_disk_id: Specifies the existing lab disk id to attach + to virtual machine. + :type existing_lab_disk_id: str + :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, + ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type host_caching: str or + ~azure.mgmt.devtestlabs.models.HostCachingOptions + """ + + _attribute_map = { + 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptionsFragment'}, + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + 'host_caching': {'key': 'hostCaching', 'type': 'str'}, + } + + def __init__(self, *, attach_new_data_disk_options=None, existing_lab_disk_id: str=None, host_caching=None, **kwargs) -> None: + super(DataDiskPropertiesFragment, self).__init__(**kwargs) + self.attach_new_data_disk_options = attach_new_data_disk_options + self.existing_lab_disk_id = existing_lab_disk_id + self.host_caching = host_caching + + +class DataDiskStorageTypeInfo(Model): + """Storage information about the data disks present in the custom image. + + :param lun: Disk Lun + :type lun: str + :param storage_type: Disk Storage Type. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + } + + def __init__(self, *, lun: str=None, storage_type=None, **kwargs) -> None: + super(DataDiskStorageTypeInfo, self).__init__(**kwargs) + self.lun = lun + self.storage_type = storage_type + + +class DataDiskStorageTypeInfoFragment(Model): + """Storage information about the data disks present in the custom image. + + :param lun: Disk Lun + :type lun: str + :param storage_type: Disk Storage Type. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + } + + def __init__(self, *, lun: str=None, storage_type=None, **kwargs) -> None: + super(DataDiskStorageTypeInfoFragment, self).__init__(**kwargs) + self.lun = lun + self.storage_type = storage_type + + +class DayDetails(Model): + """Properties of a daily schedule. + + :param time: The time of day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, *, time: str=None, **kwargs) -> None: + super(DayDetails, self).__init__(**kwargs) + self.time = time + + +class DayDetailsFragment(Model): + """Properties of a daily schedule. + + :param time: The time of day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, *, time: str=None, **kwargs) -> None: + super(DayDetailsFragment, self).__init__(**kwargs) + self.time = time + + +class DetachDataDiskProperties(Model): + """Request body for detaching data disk from a virtual machine. + + :param existing_lab_disk_id: Specifies the disk resource ID to detach from + virtual machine. + :type existing_lab_disk_id: str + """ + + _attribute_map = { + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + } + + def __init__(self, *, existing_lab_disk_id: str=None, **kwargs) -> None: + super(DetachDataDiskProperties, self).__init__(**kwargs) + self.existing_lab_disk_id = existing_lab_disk_id + + +class DetachDiskProperties(Model): + """Properties of the disk to detach. + + :param leased_by_lab_vm_id: The resource ID of the Lab VM to which the + disk is attached. + :type leased_by_lab_vm_id: str + """ + + _attribute_map = { + 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, + } + + def __init__(self, *, leased_by_lab_vm_id: str=None, **kwargs) -> None: + super(DetachDiskProperties, self).__init__(**kwargs) + self.leased_by_lab_vm_id = leased_by_lab_vm_id + + +class Disk(Resource): + """A Disk. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param disk_size_gi_b: The size of the disk in GibiBytes. + :type disk_size_gi_b: int + :param leased_by_lab_vm_id: The resource ID of the VM to which this disk + is leased. + :type leased_by_lab_vm_id: str + :param disk_blob_name: When backed by a blob, the name of the VHD blob + without extension. + :type disk_blob_name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :ivar created_date: The creation date of the disk. + :vartype created_date: datetime + :param host_caching: The host caching policy of the disk (i.e. None, + ReadOnly, ReadWrite). + :type host_caching: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, + 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, + 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, + 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, + 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, disk_type=None, disk_size_gi_b: int=None, leased_by_lab_vm_id: str=None, disk_blob_name: str=None, disk_uri: str=None, host_caching: str=None, managed_disk_id: str=None, **kwargs) -> None: + super(Disk, self).__init__(location=location, tags=tags, **kwargs) + self.disk_type = disk_type + self.disk_size_gi_b = disk_size_gi_b + self.leased_by_lab_vm_id = leased_by_lab_vm_id + self.disk_blob_name = disk_blob_name + self.disk_uri = disk_uri + self.created_date = None + self.host_caching = host_caching + self.managed_disk_id = managed_disk_id + self.provisioning_state = None + self.unique_identifier = None + + +class DiskFragment(UpdateResource): + """A Disk. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium', 'StandardSSD' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param disk_size_gi_b: The size of the disk in GibiBytes. + :type disk_size_gi_b: int + :param leased_by_lab_vm_id: The resource ID of the VM to which this disk + is leased. + :type leased_by_lab_vm_id: str + :param disk_blob_name: When backed by a blob, the name of the VHD blob + without extension. + :type disk_blob_name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param host_caching: The host caching policy of the disk (i.e. None, + ReadOnly, ReadWrite). + :type host_caching: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, + 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, + 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, + 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, + 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, + 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, + } + + def __init__(self, *, tags=None, disk_type=None, disk_size_gi_b: int=None, leased_by_lab_vm_id: str=None, disk_blob_name: str=None, disk_uri: str=None, host_caching: str=None, managed_disk_id: str=None, **kwargs) -> None: + super(DiskFragment, self).__init__(tags=tags, **kwargs) + self.disk_type = disk_type + self.disk_size_gi_b = disk_size_gi_b + self.leased_by_lab_vm_id = leased_by_lab_vm_id + self.disk_blob_name = disk_blob_name + self.disk_uri = disk_uri + self.host_caching = host_caching + self.managed_disk_id = managed_disk_id + + +class DtlEnvironment(Resource): + """An environment, which is essentially an ARM template deployment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param deployment_properties: The deployment properties of the + environment. + :type deployment_properties: + ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentProperties + :param arm_template_display_name: The display name of the Azure Resource + Manager template that produced the environment. + :type arm_template_display_name: str + :ivar resource_group_id: The identifier of the resource group containing + the environment's resources. + :vartype resource_group_id: str + :ivar created_by_user: The creator of the environment. + :vartype created_by_user: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_group_id': {'readonly': True}, + 'created_by_user': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentProperties'}, + 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, + 'resource_group_id': {'key': 'properties.resourceGroupId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, deployment_properties=None, arm_template_display_name: str=None, **kwargs) -> None: + super(DtlEnvironment, self).__init__(location=location, tags=tags, **kwargs) + self.deployment_properties = deployment_properties + self.arm_template_display_name = arm_template_display_name + self.resource_group_id = None + self.created_by_user = None + self.provisioning_state = None + self.unique_identifier = None + + +class DtlEnvironmentFragment(UpdateResource): + """An environment, which is essentially an ARM template deployment. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param deployment_properties: The deployment properties of the + environment. + :type deployment_properties: + ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentPropertiesFragment + :param arm_template_display_name: The display name of the Azure Resource + Manager template that produced the environment. + :type arm_template_display_name: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentPropertiesFragment'}, + 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, + } + + def __init__(self, *, tags=None, deployment_properties=None, arm_template_display_name: str=None, **kwargs) -> None: + super(DtlEnvironmentFragment, self).__init__(tags=tags, **kwargs) + self.deployment_properties = deployment_properties + self.arm_template_display_name = arm_template_display_name + + +class EnvironmentDeploymentProperties(Model): + """Properties of an environment deployment. + + :param arm_template_id: The Azure Resource Manager template's identifier. + :type arm_template_id: str + :param parameters: The parameters of the Azure Resource Manager template. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterProperties] + """ + + _attribute_map = { + 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterProperties]'}, + } + + def __init__(self, *, arm_template_id: str=None, parameters=None, **kwargs) -> None: + super(EnvironmentDeploymentProperties, self).__init__(**kwargs) + self.arm_template_id = arm_template_id + self.parameters = parameters + + +class EnvironmentDeploymentPropertiesFragment(Model): + """Properties of an environment deployment. + + :param arm_template_id: The Azure Resource Manager template's identifier. + :type arm_template_id: str + :param parameters: The parameters of the Azure Resource Manager template. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterPropertiesFragment] + """ + + _attribute_map = { + 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterPropertiesFragment]'}, + } + + def __init__(self, *, arm_template_id: str=None, parameters=None, **kwargs) -> None: + super(EnvironmentDeploymentPropertiesFragment, self).__init__(**kwargs) + self.arm_template_id = arm_template_id + self.parameters = parameters + + +class EvaluatePoliciesProperties(Model): + """Properties for evaluating a policy set. + + :param fact_name: The fact name. + :type fact_name: str + :param fact_data: The fact data. + :type fact_data: str + :param value_offset: The value offset. + :type value_offset: str + :param user_object_id: The user for which policies will be evaluated + :type user_object_id: str + """ + + _attribute_map = { + 'fact_name': {'key': 'factName', 'type': 'str'}, + 'fact_data': {'key': 'factData', 'type': 'str'}, + 'value_offset': {'key': 'valueOffset', 'type': 'str'}, + 'user_object_id': {'key': 'userObjectId', 'type': 'str'}, + } + + def __init__(self, *, fact_name: str=None, fact_data: str=None, value_offset: str=None, user_object_id: str=None, **kwargs) -> None: + super(EvaluatePoliciesProperties, self).__init__(**kwargs) + self.fact_name = fact_name + self.fact_data = fact_data + self.value_offset = value_offset + self.user_object_id = user_object_id + + +class EvaluatePoliciesRequest(Model): + """Request body for evaluating a policy set. + + :param policies: Policies to evaluate. + :type policies: + list[~azure.mgmt.devtestlabs.models.EvaluatePoliciesProperties] + """ + + _attribute_map = { + 'policies': {'key': 'policies', 'type': '[EvaluatePoliciesProperties]'}, + } + + def __init__(self, *, policies=None, **kwargs) -> None: + super(EvaluatePoliciesRequest, self).__init__(**kwargs) + self.policies = policies + + +class EvaluatePoliciesResponse(Model): + """Response body for evaluating a policy set. + + :param results: Results of evaluating a policy set. + :type results: list[~azure.mgmt.devtestlabs.models.PolicySetResult] + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': '[PolicySetResult]'}, + } + + def __init__(self, *, results=None, **kwargs) -> None: + super(EvaluatePoliciesResponse, self).__init__(**kwargs) + self.results = results + + +class Event(Model): + """An event to be notified for. + + :param event_name: The event type for which this notification is enabled + (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + } + + def __init__(self, *, event_name=None, **kwargs) -> None: + super(Event, self).__init__(**kwargs) + self.event_name = event_name + + +class EventFragment(Model): + """An event to be notified for. + + :param event_name: The event type for which this notification is enabled + (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + } + + def __init__(self, *, event_name=None, **kwargs) -> None: + super(EventFragment, self).__init__(**kwargs) + self.event_name = event_name + + +class ExportResourceUsageParameters(Model): + """The parameters of the export operation. + + :param blob_storage_absolute_sas_uri: The blob storage absolute sas uri + with write permission to the container which the usage data needs to be + uploaded to. + :type blob_storage_absolute_sas_uri: str + :param usage_start_date: The start time of the usage. If not provided, + usage will be reported since the beginning of data collection. + :type usage_start_date: datetime + """ + + _attribute_map = { + 'blob_storage_absolute_sas_uri': {'key': 'blobStorageAbsoluteSasUri', 'type': 'str'}, + 'usage_start_date': {'key': 'usageStartDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, blob_storage_absolute_sas_uri: str=None, usage_start_date=None, **kwargs) -> None: + super(ExportResourceUsageParameters, self).__init__(**kwargs) + self.blob_storage_absolute_sas_uri = blob_storage_absolute_sas_uri + self.usage_start_date = usage_start_date + + +class ExternalSubnet(Model): + """Subnet information as returned by the Microsoft.Network API. + + :param id: Gets or sets the identifier. + :type id: str + :param name: Gets or sets the name. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: + super(ExternalSubnet, self).__init__(**kwargs) + self.id = id + self.name = name + + +class ExternalSubnetFragment(Model): + """Subnet information as returned by the Microsoft.Network API. + + :param id: Gets or sets the identifier. + :type id: str + :param name: Gets or sets the name. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: + super(ExternalSubnetFragment, self).__init__(**kwargs) + self.id = id + self.name = name + + +class Formula(Resource): + """A formula for creating a VM, specifying an image base and other parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the formula. + :type description: str + :param author: The author of the formula. + :type author: str + :param os_type: The OS type of the formula. + :type os_type: str + :ivar creation_date: The creation date of the formula. + :vartype creation_date: datetime + :param formula_content: The content of the formula. + :type formula_content: + ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameter + :param vm: Information about a VM from which a formula is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVm + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameter'}, + 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVm'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, description: str=None, author: str=None, os_type: str=None, formula_content=None, vm=None, **kwargs) -> None: + super(Formula, self).__init__(location=location, tags=tags, **kwargs) + self.description = description + self.author = author + self.os_type = os_type + self.creation_date = None + self.formula_content = formula_content + self.vm = vm + self.provisioning_state = None + self.unique_identifier = None + + +class FormulaFragment(UpdateResource): + """A formula for creating a VM, specifying an image base and other parameters. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the formula. + :type description: str + :param author: The author of the formula. + :type author: str + :param os_type: The OS type of the formula. + :type os_type: str + :param formula_content: The content of the formula. + :type formula_content: + ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameterFragment + :param vm: Information about a VM from which a formula is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVmFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameterFragment'}, + 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVmFragment'}, + } + + def __init__(self, *, tags=None, description: str=None, author: str=None, os_type: str=None, formula_content=None, vm=None, **kwargs) -> None: + super(FormulaFragment, self).__init__(tags=tags, **kwargs) + self.description = description + self.author = author + self.os_type = os_type + self.formula_content = formula_content + self.vm = vm + + +class FormulaPropertiesFromVm(Model): + """Information about a VM from which a formula is to be created. + + :param lab_vm_id: The identifier of the VM from which a formula is to be + created. + :type lab_vm_id: str + """ + + _attribute_map = { + 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, + } + + def __init__(self, *, lab_vm_id: str=None, **kwargs) -> None: + super(FormulaPropertiesFromVm, self).__init__(**kwargs) + self.lab_vm_id = lab_vm_id + + +class FormulaPropertiesFromVmFragment(Model): + """Information about a VM from which a formula is to be created. + + :param lab_vm_id: The identifier of the VM from which a formula is to be + created. + :type lab_vm_id: str + """ + + _attribute_map = { + 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, + } + + def __init__(self, *, lab_vm_id: str=None, **kwargs) -> None: + super(FormulaPropertiesFromVmFragment, self).__init__(**kwargs) + self.lab_vm_id = lab_vm_id + + +class GalleryImage(Resource): + """A gallery image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param author: The author of the gallery image. + :type author: str + :ivar created_date: The creation date of the gallery image. + :vartype created_date: datetime + :param description: The description of the gallery image. + :type description: str + :param image_reference: The image reference of the gallery image. + :type image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param icon: The icon of the gallery image. + :type icon: str + :param enabled: Indicates whether this gallery image is enabled. + :type enabled: bool + :param plan_id: The third party plan that applies to this image + :type plan_id: str + :param is_plan_authorized: Indicates if the plan has been authorized for + programmatic deployment. + :type is_plan_authorized: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'image_reference': {'key': 'properties.imageReference', 'type': 'GalleryImageReference'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + } + + def __init__(self, *, location: str=None, tags=None, author: str=None, description: str=None, image_reference=None, icon: str=None, enabled: bool=None, plan_id: str=None, is_plan_authorized: bool=None, **kwargs) -> None: + super(GalleryImage, self).__init__(location=location, tags=tags, **kwargs) + self.author = author + self.created_date = None + self.description = description + self.image_reference = image_reference + self.icon = icon + self.enabled = enabled + self.plan_id = plan_id + self.is_plan_authorized = is_plan_authorized + + +class GalleryImageReference(Model): + """The reference information for an Azure Marketplace image. + + :param offer: The offer of the gallery image. + :type offer: str + :param publisher: The publisher of the gallery image. + :type publisher: str + :param sku: The SKU of the gallery image. + :type sku: str + :param os_type: The OS type of the gallery image. + :type os_type: str + :param version: The version of the gallery image. + :type version: str + """ + + _attribute_map = { + 'offer': {'key': 'offer', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, offer: str=None, publisher: str=None, sku: str=None, os_type: str=None, version: str=None, **kwargs) -> None: + super(GalleryImageReference, self).__init__(**kwargs) + self.offer = offer + self.publisher = publisher + self.sku = sku + self.os_type = os_type + self.version = version + + +class GalleryImageReferenceFragment(Model): + """The reference information for an Azure Marketplace image. + + :param offer: The offer of the gallery image. + :type offer: str + :param publisher: The publisher of the gallery image. + :type publisher: str + :param sku: The SKU of the gallery image. + :type sku: str + :param os_type: The OS type of the gallery image. + :type os_type: str + :param version: The version of the gallery image. + :type version: str + """ + + _attribute_map = { + 'offer': {'key': 'offer', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, offer: str=None, publisher: str=None, sku: str=None, os_type: str=None, version: str=None, **kwargs) -> None: + super(GalleryImageReferenceFragment, self).__init__(**kwargs) + self.offer = offer + self.publisher = publisher + self.sku = sku + self.os_type = os_type + self.version = version + + +class GenerateArmTemplateRequest(Model): + """Parameters for generating an ARM template for deploying artifacts. + + :param virtual_machine_name: The resource name of the virtual machine. + :type virtual_machine_name: str + :param parameters: The parameters of the ARM template. + :type parameters: list[~azure.mgmt.devtestlabs.models.ParameterInfo] + :param location: The location of the virtual machine. + :type location: str + :param file_upload_options: Options for uploading the files for the + artifact. UploadFilesAndGenerateSasTokens is the default value. Possible + values include: 'UploadFilesAndGenerateSasTokens', 'None' + :type file_upload_options: str or + ~azure.mgmt.devtestlabs.models.FileUploadOptions + """ + + _attribute_map = { + 'virtual_machine_name': {'key': 'virtualMachineName', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ParameterInfo]'}, + 'location': {'key': 'location', 'type': 'str'}, + 'file_upload_options': {'key': 'fileUploadOptions', 'type': 'str'}, + } + + def __init__(self, *, virtual_machine_name: str=None, parameters=None, location: str=None, file_upload_options=None, **kwargs) -> None: + super(GenerateArmTemplateRequest, self).__init__(**kwargs) + self.virtual_machine_name = virtual_machine_name + self.parameters = parameters + self.location = location + self.file_upload_options = file_upload_options + + +class GenerateUploadUriParameter(Model): + """Properties for generating an upload URI. + + :param blob_name: The blob name of the upload URI. + :type blob_name: str + """ + + _attribute_map = { + 'blob_name': {'key': 'blobName', 'type': 'str'}, + } + + def __init__(self, *, blob_name: str=None, **kwargs) -> None: + super(GenerateUploadUriParameter, self).__init__(**kwargs) + self.blob_name = blob_name + + +class GenerateUploadUriResponse(Model): + """Response body for generating an upload URI. + + :param upload_uri: The upload URI for the VHD. + :type upload_uri: str + """ + + _attribute_map = { + 'upload_uri': {'key': 'uploadUri', 'type': 'str'}, + } + + def __init__(self, *, upload_uri: str=None, **kwargs) -> None: + super(GenerateUploadUriResponse, self).__init__(**kwargs) + self.upload_uri = upload_uri + + +class HourDetails(Model): + """Properties of an hourly schedule. + + :param minute: Minutes of the hour the schedule will run. + :type minute: int + """ + + _attribute_map = { + 'minute': {'key': 'minute', 'type': 'int'}, + } + + def __init__(self, *, minute: int=None, **kwargs) -> None: + super(HourDetails, self).__init__(**kwargs) + self.minute = minute + + +class HourDetailsFragment(Model): + """Properties of an hourly schedule. + + :param minute: Minutes of the hour the schedule will run. + :type minute: int + """ + + _attribute_map = { + 'minute': {'key': 'minute', 'type': 'int'}, + } + + def __init__(self, *, minute: int=None, **kwargs) -> None: + super(HourDetailsFragment, self).__init__(**kwargs) + self.minute = minute + + +class IdentityProperties(Model): + """Properties of a managed identity. + + :param type: Managed identity. + :type type: str + :param principal_id: The principal id of resource identity. + :type principal_id: str + :param tenant_id: The tenant identifier of resource. + :type tenant_id: str + :param client_secret_url: The client secret URL of the identity. + :type client_secret_url: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'client_secret_url': {'key': 'clientSecretUrl', 'type': 'str'}, + } + + def __init__(self, *, type: str=None, principal_id: str=None, tenant_id: str=None, client_secret_url: str=None, **kwargs) -> None: + super(IdentityProperties, self).__init__(**kwargs) + self.type = type + self.principal_id = principal_id + self.tenant_id = tenant_id + self.client_secret_url = client_secret_url + + +class ImportLabVirtualMachineRequest(Model): + """This represents the payload required to import a virtual machine from a + different lab into the current one. + + :param source_virtual_machine_resource_id: The full resource ID of the + virtual machine to be imported. + :type source_virtual_machine_resource_id: str + :param destination_virtual_machine_name: The name of the virtual machine + in the destination lab + :type destination_virtual_machine_name: str + """ + + _attribute_map = { + 'source_virtual_machine_resource_id': {'key': 'sourceVirtualMachineResourceId', 'type': 'str'}, + 'destination_virtual_machine_name': {'key': 'destinationVirtualMachineName', 'type': 'str'}, + } + + def __init__(self, *, source_virtual_machine_resource_id: str=None, destination_virtual_machine_name: str=None, **kwargs) -> None: + super(ImportLabVirtualMachineRequest, self).__init__(**kwargs) + self.source_virtual_machine_resource_id = source_virtual_machine_resource_id + self.destination_virtual_machine_name = destination_virtual_machine_name + + +class InboundNatRule(Model): + """A rule for NAT - exposing a VM's port (backendPort) on the public IP + address using a load balancer. + + :param transport_protocol: The transport protocol for the endpoint. + Possible values include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param frontend_port: The external endpoint port of the inbound + connection. Possible values range between 1 and 65535, inclusive. If + unspecified, a value will be allocated automatically. + :type frontend_port: int + :param backend_port: The port to which the external traffic will be + redirected. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, *, transport_protocol=None, frontend_port: int=None, backend_port: int=None, **kwargs) -> None: + super(InboundNatRule, self).__init__(**kwargs) + self.transport_protocol = transport_protocol + self.frontend_port = frontend_port + self.backend_port = backend_port + + +class InboundNatRuleFragment(Model): + """A rule for NAT - exposing a VM's port (backendPort) on the public IP + address using a load balancer. + + :param transport_protocol: The transport protocol for the endpoint. + Possible values include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param frontend_port: The external endpoint port of the inbound + connection. Possible values range between 1 and 65535, inclusive. If + unspecified, a value will be allocated automatically. + :type frontend_port: int + :param backend_port: The port to which the external traffic will be + redirected. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, *, transport_protocol=None, frontend_port: int=None, backend_port: int=None, **kwargs) -> None: + super(InboundNatRuleFragment, self).__init__(**kwargs) + self.transport_protocol = transport_protocol + self.frontend_port = frontend_port + self.backend_port = backend_port + + +class Lab(Resource): + """A lab. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar default_storage_account: The lab's default storage account. + :vartype default_storage_account: str + :ivar default_premium_storage_account: The lab's default premium storage + account. + :vartype default_premium_storage_account: str + :ivar artifacts_storage_account: The lab's artifact storage account. + :vartype artifacts_storage_account: str + :ivar premium_data_disk_storage_account: The lab's premium data disk + storage account. + :vartype premium_data_disk_storage_account: str + :ivar vault_name: The lab's Key vault. + :vartype vault_name: str + :param lab_storage_type: Type of storage used by the lab. It can be either + Premium or Standard. Default is Premium. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param mandatory_artifacts_resource_ids_linux: The ordered list of + artifact resource IDs that should be applied on all Linux VM creations by + default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_linux: list[str] + :param mandatory_artifacts_resource_ids_windows: The ordered list of + artifact resource IDs that should be applied on all Windows VM creations + by default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_windows: list[str] + :ivar created_date: The creation date of the lab. + :vartype created_date: datetime + :param premium_data_disks: The setting to enable usage of premium data + disks. + When its value is 'Enabled', creation of standard or premium data disks is + allowed. + When its value is 'Disabled', only creation of standard data disks is + allowed. Possible values include: 'Disabled', 'Enabled' + :type premium_data_disks: str or + ~azure.mgmt.devtestlabs.models.PremiumDataDisk + :param environment_permission: The access rights to be granted to the user + when provisioning an environment. Possible values include: 'Reader', + 'Contributor' + :type environment_permission: str or + ~azure.mgmt.devtestlabs.models.EnvironmentPermission + :param announcement: The properties of any lab announcement associated + with this lab + :type announcement: + ~azure.mgmt.devtestlabs.models.LabAnnouncementProperties + :param support: The properties of any lab support message associated with + this lab + :type support: ~azure.mgmt.devtestlabs.models.LabSupportProperties + :ivar vm_creation_resource_group: The resource group in which all new lab + virtual machines will be created. To let DevTest Labs manage resource + group creation, set this value to null. + :vartype vm_creation_resource_group: str + :ivar public_ip_id: The public IP address for the lab's load balancer. + :vartype public_ip_id: str + :ivar load_balancer_id: The load balancer used to for lab VMs that use + shared IP address. + :vartype load_balancer_id: str + :ivar network_security_group_id: The Network Security Group attached to + the lab VMs Network interfaces to restrict open ports. + :vartype network_security_group_id: str + :param extended_properties: Extended properties of the lab used for + experimental features + :type extended_properties: dict[str, str] + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'default_storage_account': {'readonly': True}, + 'default_premium_storage_account': {'readonly': True}, + 'artifacts_storage_account': {'readonly': True}, + 'premium_data_disk_storage_account': {'readonly': True}, + 'vault_name': {'readonly': True}, + 'created_date': {'readonly': True}, + 'vm_creation_resource_group': {'readonly': True}, + 'public_ip_id': {'readonly': True}, + 'load_balancer_id': {'readonly': True}, + 'network_security_group_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'default_storage_account': {'key': 'properties.defaultStorageAccount', 'type': 'str'}, + 'default_premium_storage_account': {'key': 'properties.defaultPremiumStorageAccount', 'type': 'str'}, + 'artifacts_storage_account': {'key': 'properties.artifactsStorageAccount', 'type': 'str'}, + 'premium_data_disk_storage_account': {'key': 'properties.premiumDataDiskStorageAccount', 'type': 'str'}, + 'vault_name': {'key': 'properties.vaultName', 'type': 'str'}, + 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, + 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, + 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, + 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, + 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementProperties'}, + 'support': {'key': 'properties.support', 'type': 'LabSupportProperties'}, + 'vm_creation_resource_group': {'key': 'properties.vmCreationResourceGroup', 'type': 'str'}, + 'public_ip_id': {'key': 'properties.publicIpId', 'type': 'str'}, + 'load_balancer_id': {'key': 'properties.loadBalancerId', 'type': 'str'}, + 'network_security_group_id': {'key': 'properties.networkSecurityGroupId', 'type': 'str'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, lab_storage_type=None, mandatory_artifacts_resource_ids_linux=None, mandatory_artifacts_resource_ids_windows=None, premium_data_disks=None, environment_permission=None, announcement=None, support=None, extended_properties=None, **kwargs) -> None: + super(Lab, self).__init__(location=location, tags=tags, **kwargs) + self.default_storage_account = None + self.default_premium_storage_account = None + self.artifacts_storage_account = None + self.premium_data_disk_storage_account = None + self.vault_name = None + self.lab_storage_type = lab_storage_type + self.mandatory_artifacts_resource_ids_linux = mandatory_artifacts_resource_ids_linux + self.mandatory_artifacts_resource_ids_windows = mandatory_artifacts_resource_ids_windows + self.created_date = None + self.premium_data_disks = premium_data_disks + self.environment_permission = environment_permission + self.announcement = announcement + self.support = support + self.vm_creation_resource_group = None + self.public_ip_id = None + self.load_balancer_id = None + self.network_security_group_id = None + self.extended_properties = extended_properties + self.provisioning_state = None + self.unique_identifier = None + + +class LabAnnouncementProperties(Model): + """Properties of a lab's announcement banner. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param title: The plain text title for the lab announcement + :type title: str + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + :param enabled: Is the lab announcement active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param expiration_date: The time at which the announcement expires (null + for never) + :type expiration_date: datetime + :param expired: Has this announcement expired? + :type expired: bool + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'expired': {'key': 'expired', 'type': 'bool'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, title: str=None, markdown: str=None, enabled=None, expiration_date=None, expired: bool=None, **kwargs) -> None: + super(LabAnnouncementProperties, self).__init__(**kwargs) + self.title = title + self.markdown = markdown + self.enabled = enabled + self.expiration_date = expiration_date + self.expired = expired + self.provisioning_state = None + self.unique_identifier = None + + +class LabAnnouncementPropertiesFragment(Model): + """Properties of a lab's announcement banner. + + :param title: The plain text title for the lab announcement + :type title: str + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + :param enabled: Is the lab announcement active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param expiration_date: The time at which the announcement expires (null + for never) + :type expiration_date: datetime + :param expired: Has this announcement expired? + :type expired: bool + """ + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'expired': {'key': 'expired', 'type': 'bool'}, + } + + def __init__(self, *, title: str=None, markdown: str=None, enabled=None, expiration_date=None, expired: bool=None, **kwargs) -> None: + super(LabAnnouncementPropertiesFragment, self).__init__(**kwargs) + self.title = title + self.markdown = markdown + self.enabled = enabled + self.expiration_date = expiration_date + self.expired = expired + + +class LabCost(Resource): + """A cost item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param target_cost: The target cost properties + :type target_cost: ~azure.mgmt.devtestlabs.models.TargetCostProperties + :ivar lab_cost_summary: The lab cost summary component of the cost data. + :vartype lab_cost_summary: + ~azure.mgmt.devtestlabs.models.LabCostSummaryProperties + :ivar lab_cost_details: The lab cost details component of the cost data. + :vartype lab_cost_details: + list[~azure.mgmt.devtestlabs.models.LabCostDetailsProperties] + :ivar resource_costs: The resource cost component of the cost data. + :vartype resource_costs: + list[~azure.mgmt.devtestlabs.models.LabResourceCostProperties] + :param currency_code: The currency code of the cost. + :type currency_code: str + :param start_date_time: The start time of the cost data. + :type start_date_time: datetime + :param end_date_time: The end time of the cost data. + :type end_date_time: datetime + :param created_date: The creation date of the cost. + :type created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'lab_cost_summary': {'readonly': True}, + 'lab_cost_details': {'readonly': True}, + 'resource_costs': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'target_cost': {'key': 'properties.targetCost', 'type': 'TargetCostProperties'}, + 'lab_cost_summary': {'key': 'properties.labCostSummary', 'type': 'LabCostSummaryProperties'}, + 'lab_cost_details': {'key': 'properties.labCostDetails', 'type': '[LabCostDetailsProperties]'}, + 'resource_costs': {'key': 'properties.resourceCosts', 'type': '[LabResourceCostProperties]'}, + 'currency_code': {'key': 'properties.currencyCode', 'type': 'str'}, + 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, + 'end_date_time': {'key': 'properties.endDateTime', 'type': 'iso-8601'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, target_cost=None, currency_code: str=None, start_date_time=None, end_date_time=None, created_date=None, **kwargs) -> None: + super(LabCost, self).__init__(location=location, tags=tags, **kwargs) + self.target_cost = target_cost + self.lab_cost_summary = None + self.lab_cost_details = None + self.resource_costs = None + self.currency_code = currency_code + self.start_date_time = start_date_time + self.end_date_time = end_date_time + self.created_date = created_date + self.provisioning_state = None + self.unique_identifier = None + + +class LabCostDetailsProperties(Model): + """The properties of a lab cost item. + + :param date_property: The date of the cost item. + :type date_property: datetime + :param cost: The cost component of the cost item. + :type cost: float + :param cost_type: The type of the cost. Possible values include: + 'Unavailable', 'Reported', 'Projected' + :type cost_type: str or ~azure.mgmt.devtestlabs.models.CostType + """ + + _attribute_map = { + 'date_property': {'key': 'date', 'type': 'iso-8601'}, + 'cost': {'key': 'cost', 'type': 'float'}, + 'cost_type': {'key': 'costType', 'type': 'str'}, + } + + def __init__(self, *, date_property=None, cost: float=None, cost_type=None, **kwargs) -> None: + super(LabCostDetailsProperties, self).__init__(**kwargs) + self.date_property = date_property + self.cost = cost + self.cost_type = cost_type + + +class LabCostSummaryProperties(Model): + """The properties of the cost summary. + + :param estimated_lab_cost: The cost component of the cost item. + :type estimated_lab_cost: float + """ + + _attribute_map = { + 'estimated_lab_cost': {'key': 'estimatedLabCost', 'type': 'float'}, + } + + def __init__(self, *, estimated_lab_cost: float=None, **kwargs) -> None: + super(LabCostSummaryProperties, self).__init__(**kwargs) + self.estimated_lab_cost = estimated_lab_cost + + +class LabFragment(UpdateResource): + """A lab. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_storage_type: Type of storage used by the lab. It can be either + Premium or Standard. Default is Premium. Possible values include: + 'Standard', 'Premium', 'StandardSSD' + :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param mandatory_artifacts_resource_ids_linux: The ordered list of + artifact resource IDs that should be applied on all Linux VM creations by + default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_linux: list[str] + :param mandatory_artifacts_resource_ids_windows: The ordered list of + artifact resource IDs that should be applied on all Windows VM creations + by default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_windows: list[str] + :param premium_data_disks: The setting to enable usage of premium data + disks. + When its value is 'Enabled', creation of standard or premium data disks is + allowed. + When its value is 'Disabled', only creation of standard data disks is + allowed. Possible values include: 'Disabled', 'Enabled' + :type premium_data_disks: str or + ~azure.mgmt.devtestlabs.models.PremiumDataDisk + :param environment_permission: The access rights to be granted to the user + when provisioning an environment. Possible values include: 'Reader', + 'Contributor' + :type environment_permission: str or + ~azure.mgmt.devtestlabs.models.EnvironmentPermission + :param announcement: The properties of any lab announcement associated + with this lab + :type announcement: + ~azure.mgmt.devtestlabs.models.LabAnnouncementPropertiesFragment + :param support: The properties of any lab support message associated with + this lab + :type support: ~azure.mgmt.devtestlabs.models.LabSupportPropertiesFragment + :param extended_properties: Extended properties of the lab used for + experimental features + :type extended_properties: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, + 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, + 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, + 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, + 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, + 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementPropertiesFragment'}, + 'support': {'key': 'properties.support', 'type': 'LabSupportPropertiesFragment'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, lab_storage_type=None, mandatory_artifacts_resource_ids_linux=None, mandatory_artifacts_resource_ids_windows=None, premium_data_disks=None, environment_permission=None, announcement=None, support=None, extended_properties=None, **kwargs) -> None: + super(LabFragment, self).__init__(tags=tags, **kwargs) + self.lab_storage_type = lab_storage_type + self.mandatory_artifacts_resource_ids_linux = mandatory_artifacts_resource_ids_linux + self.mandatory_artifacts_resource_ids_windows = mandatory_artifacts_resource_ids_windows + self.premium_data_disks = premium_data_disks + self.environment_permission = environment_permission + self.announcement = announcement + self.support = support + self.extended_properties = extended_properties + + +class LabResourceCostProperties(Model): + """The properties of a resource cost item. + + :param resourcename: The name of the resource. + :type resourcename: str + :param resource_uid: The unique identifier of the resource. + :type resource_uid: str + :param resource_cost: The cost component of the resource cost item. + :type resource_cost: float + :param resource_type: The logical resource type (ex. virtualmachine, + storageaccount) + :type resource_type: str + :param resource_owner: The owner of the resource (ex. + janedoe@microsoft.com) + :type resource_owner: str + :param resource_pricing_tier: The category of the resource (ex. + Premium_LRS, Standard_DS1) + :type resource_pricing_tier: str + :param resource_status: The status of the resource (ex. Active) + :type resource_status: str + :param resource_id: The ID of the resource + :type resource_id: str + :param external_resource_id: The ID of the external resource + :type external_resource_id: str + """ + + _attribute_map = { + 'resourcename': {'key': 'resourcename', 'type': 'str'}, + 'resource_uid': {'key': 'resourceUId', 'type': 'str'}, + 'resource_cost': {'key': 'resourceCost', 'type': 'float'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_owner': {'key': 'resourceOwner', 'type': 'str'}, + 'resource_pricing_tier': {'key': 'resourcePricingTier', 'type': 'str'}, + 'resource_status': {'key': 'resourceStatus', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'external_resource_id': {'key': 'externalResourceId', 'type': 'str'}, + } + + def __init__(self, *, resourcename: str=None, resource_uid: str=None, resource_cost: float=None, resource_type: str=None, resource_owner: str=None, resource_pricing_tier: str=None, resource_status: str=None, resource_id: str=None, external_resource_id: str=None, **kwargs) -> None: + super(LabResourceCostProperties, self).__init__(**kwargs) + self.resourcename = resourcename + self.resource_uid = resource_uid + self.resource_cost = resource_cost + self.resource_type = resource_type + self.resource_owner = resource_owner + self.resource_pricing_tier = resource_pricing_tier + self.resource_status = resource_status + self.resource_id = resource_id + self.external_resource_id = external_resource_id + + +class LabSupportProperties(Model): + """Properties of a lab's support banner. + + :param enabled: Is the lab support banner active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + } + + def __init__(self, *, enabled=None, markdown: str=None, **kwargs) -> None: + super(LabSupportProperties, self).__init__(**kwargs) + self.enabled = enabled + self.markdown = markdown + + +class LabSupportPropertiesFragment(Model): + """Properties of a lab's support banner. + + :param enabled: Is the lab support banner active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + } + + def __init__(self, *, enabled=None, markdown: str=None, **kwargs) -> None: + super(LabSupportPropertiesFragment, self).__init__(**kwargs) + self.enabled = enabled + self.markdown = markdown + + +class LabVhd(Model): + """Properties of a VHD in the lab. + + :param id: The URI to the VHD. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(LabVhd, self).__init__(**kwargs) + self.id = id + + +class LabVirtualMachine(Resource): + """A virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :ivar compute_vm: The compute virtual machine properties. + :vartype compute_vm: ~azure.mgmt.devtestlabs.models.ComputeVmProperties + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties + :ivar applicable_schedule: The applicable schedule for the virtual + machine. + :vartype applicable_schedule: + ~azure.mgmt.devtestlabs.models.ApplicableSchedule + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskProperties] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'compute_vm': {'readonly': True}, + 'applicable_schedule': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'compute_vm': {'key': 'properties.computeVm', 'type': 'ComputeVmProperties'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, + 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, **kwargs) -> None: + super(LabVirtualMachine, self).__init__(location=location, tags=tags, **kwargs) + self.notes = notes + self.owner_object_id = owner_object_id + self.owner_user_principal_name = owner_user_principal_name + self.created_by_user_id = created_by_user_id + self.created_by_user = created_by_user + self.created_date = created_date + self.compute_id = compute_id + self.custom_image_id = custom_image_id + self.os_type = os_type + self.size = size + self.user_name = user_name + self.password = password + self.ssh_key = ssh_key + self.is_authentication_with_ssh_key = is_authentication_with_ssh_key + self.fqdn = fqdn + self.lab_subnet_name = lab_subnet_name + self.lab_virtual_network_id = lab_virtual_network_id + self.disallow_public_ip_address = disallow_public_ip_address + self.artifacts = artifacts + self.artifact_deployment_status = artifact_deployment_status + self.gallery_image_reference = gallery_image_reference + self.plan_id = plan_id + self.compute_vm = None + self.network_interface = network_interface + self.applicable_schedule = None + self.expiration_date = expiration_date + self.allow_claim = allow_claim + self.storage_type = storage_type + self.virtual_machine_creation_source = virtual_machine_creation_source + self.environment_id = environment_id + self.data_disk_parameters = data_disk_parameters + self.schedule_parameters = schedule_parameters + self.last_known_power_state = last_known_power_state + self.provisioning_state = None + self.unique_identifier = None + + +class LabVirtualMachineCreationParameter(Model): + """Properties for creating a virtual machine. + + :param bulk_creation_parameters: The number of virtual machine instances + to create. + :type bulk_creation_parameters: + ~azure.mgmt.devtestlabs.models.BulkCreationParameters + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskProperties] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParameters'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, bulk_creation_parameters=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(LabVirtualMachineCreationParameter, self).__init__(**kwargs) + self.bulk_creation_parameters = bulk_creation_parameters + self.notes = notes + self.owner_object_id = owner_object_id + self.owner_user_principal_name = owner_user_principal_name + self.created_by_user_id = created_by_user_id + self.created_by_user = created_by_user + self.created_date = created_date + self.compute_id = compute_id + self.custom_image_id = custom_image_id + self.os_type = os_type + self.size = size + self.user_name = user_name + self.password = password + self.ssh_key = ssh_key + self.is_authentication_with_ssh_key = is_authentication_with_ssh_key + self.fqdn = fqdn + self.lab_subnet_name = lab_subnet_name + self.lab_virtual_network_id = lab_virtual_network_id + self.disallow_public_ip_address = disallow_public_ip_address + self.artifacts = artifacts + self.artifact_deployment_status = artifact_deployment_status + self.gallery_image_reference = gallery_image_reference + self.plan_id = plan_id + self.network_interface = network_interface + self.expiration_date = expiration_date + self.allow_claim = allow_claim + self.storage_type = storage_type + self.virtual_machine_creation_source = virtual_machine_creation_source + self.environment_id = environment_id + self.data_disk_parameters = data_disk_parameters + self.schedule_parameters = schedule_parameters + self.last_known_power_state = last_known_power_state + self.name = name + self.location = location + self.tags = tags + + +class LabVirtualMachineCreationParameterFragment(Model): + """Properties for creating a virtual machine. + + :param bulk_creation_parameters: The number of virtual machine instances + to create. + :type bulk_creation_parameters: + ~azure.mgmt.devtestlabs.models.BulkCreationParametersFragment + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParametersFragment'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, bulk_creation_parameters=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(LabVirtualMachineCreationParameterFragment, self).__init__(**kwargs) + self.bulk_creation_parameters = bulk_creation_parameters + self.notes = notes + self.owner_object_id = owner_object_id + self.owner_user_principal_name = owner_user_principal_name + self.created_by_user_id = created_by_user_id + self.created_by_user = created_by_user + self.created_date = created_date + self.compute_id = compute_id + self.custom_image_id = custom_image_id + self.os_type = os_type + self.size = size + self.user_name = user_name + self.password = password + self.ssh_key = ssh_key + self.is_authentication_with_ssh_key = is_authentication_with_ssh_key + self.fqdn = fqdn + self.lab_subnet_name = lab_subnet_name + self.lab_virtual_network_id = lab_virtual_network_id + self.disallow_public_ip_address = disallow_public_ip_address + self.artifacts = artifacts + self.artifact_deployment_status = artifact_deployment_status + self.gallery_image_reference = gallery_image_reference + self.plan_id = plan_id + self.network_interface = network_interface + self.expiration_date = expiration_date + self.allow_claim = allow_claim + self.storage_type = storage_type + self.virtual_machine_creation_source = virtual_machine_creation_source + self.environment_id = environment_id + self.data_disk_parameters = data_disk_parameters + self.schedule_parameters = schedule_parameters + self.last_known_power_state = last_known_power_state + self.name = name + self.location = location + self.tags = tags + + +class LabVirtualMachineFragment(UpdateResource): + """A virtual machine. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage', 'FromSharedGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + } + + def __init__(self, *, tags=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, **kwargs) -> None: + super(LabVirtualMachineFragment, self).__init__(tags=tags, **kwargs) + self.notes = notes + self.owner_object_id = owner_object_id + self.owner_user_principal_name = owner_user_principal_name + self.created_by_user_id = created_by_user_id + self.created_by_user = created_by_user + self.created_date = created_date + self.compute_id = compute_id + self.custom_image_id = custom_image_id + self.os_type = os_type + self.size = size + self.user_name = user_name + self.password = password + self.ssh_key = ssh_key + self.is_authentication_with_ssh_key = is_authentication_with_ssh_key + self.fqdn = fqdn + self.lab_subnet_name = lab_subnet_name + self.lab_virtual_network_id = lab_virtual_network_id + self.disallow_public_ip_address = disallow_public_ip_address + self.artifacts = artifacts + self.artifact_deployment_status = artifact_deployment_status + self.gallery_image_reference = gallery_image_reference + self.plan_id = plan_id + self.network_interface = network_interface + self.expiration_date = expiration_date + self.allow_claim = allow_claim + self.storage_type = storage_type + self.virtual_machine_creation_source = virtual_machine_creation_source + self.environment_id = environment_id + self.data_disk_parameters = data_disk_parameters + self.schedule_parameters = schedule_parameters + self.last_known_power_state = last_known_power_state + + +class LinuxOsInfo(Model): + """Information about a Linux OS. + + :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, + DeprovisionRequested, DeprovisionApplied). Possible values include: + 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' + :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState + """ + + _attribute_map = { + 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, + } + + def __init__(self, *, linux_os_state=None, **kwargs) -> None: + super(LinuxOsInfo, self).__init__(**kwargs) + self.linux_os_state = linux_os_state + + +class LinuxOsInfoFragment(Model): + """Information about a Linux OS. + + :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, + DeprovisionRequested, DeprovisionApplied). Possible values include: + 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' + :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState + """ + + _attribute_map = { + 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, + } + + def __init__(self, *, linux_os_state=None, **kwargs) -> None: + super(LinuxOsInfoFragment, self).__init__(**kwargs) + self.linux_os_state = linux_os_state + + +class NetworkInterfaceProperties(Model): + """Properties of a network interface. + + :param virtual_network_id: The resource ID of the virtual network. + :type virtual_network_id: str + :param subnet_id: The resource ID of the sub net. + :type subnet_id: str + :param public_ip_address_id: The resource ID of the public IP address. + :type public_ip_address_id: str + :param public_ip_address: The public IP address. + :type public_ip_address: str + :param private_ip_address: The private IP address. + :type private_ip_address: str + :param dns_name: The DNS name. + :type dns_name: str + :param rdp_authority: The RdpAuthority property is a server DNS host name + or IP address followed by the service port number for RDP (Remote Desktop + Protocol). + :type rdp_authority: str + :param ssh_authority: The SshAuthority property is a server DNS host name + or IP address followed by the service port number for SSH. + :type ssh_authority: str + :param shared_public_ip_address_configuration: The configuration for + sharing a public IP address across multiple virtual machines. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfiguration + """ + + _attribute_map = { + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, + 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfiguration'}, + } + + def __init__(self, *, virtual_network_id: str=None, subnet_id: str=None, public_ip_address_id: str=None, public_ip_address: str=None, private_ip_address: str=None, dns_name: str=None, rdp_authority: str=None, ssh_authority: str=None, shared_public_ip_address_configuration=None, **kwargs) -> None: + super(NetworkInterfaceProperties, self).__init__(**kwargs) + self.virtual_network_id = virtual_network_id + self.subnet_id = subnet_id + self.public_ip_address_id = public_ip_address_id + self.public_ip_address = public_ip_address + self.private_ip_address = private_ip_address + self.dns_name = dns_name + self.rdp_authority = rdp_authority + self.ssh_authority = ssh_authority + self.shared_public_ip_address_configuration = shared_public_ip_address_configuration + + +class NetworkInterfacePropertiesFragment(Model): + """Properties of a network interface. + + :param virtual_network_id: The resource ID of the virtual network. + :type virtual_network_id: str + :param subnet_id: The resource ID of the sub net. + :type subnet_id: str + :param public_ip_address_id: The resource ID of the public IP address. + :type public_ip_address_id: str + :param public_ip_address: The public IP address. + :type public_ip_address: str + :param private_ip_address: The private IP address. + :type private_ip_address: str + :param dns_name: The DNS name. + :type dns_name: str + :param rdp_authority: The RdpAuthority property is a server DNS host name + or IP address followed by the service port number for RDP (Remote Desktop + Protocol). + :type rdp_authority: str + :param ssh_authority: The SshAuthority property is a server DNS host name + or IP address followed by the service port number for SSH. + :type ssh_authority: str + :param shared_public_ip_address_configuration: The configuration for + sharing a public IP address across multiple virtual machines. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfigurationFragment + """ + + _attribute_map = { + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, + 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfigurationFragment'}, + } + + def __init__(self, *, virtual_network_id: str=None, subnet_id: str=None, public_ip_address_id: str=None, public_ip_address: str=None, private_ip_address: str=None, dns_name: str=None, rdp_authority: str=None, ssh_authority: str=None, shared_public_ip_address_configuration=None, **kwargs) -> None: + super(NetworkInterfacePropertiesFragment, self).__init__(**kwargs) + self.virtual_network_id = virtual_network_id + self.subnet_id = subnet_id + self.public_ip_address_id = public_ip_address_id + self.public_ip_address = public_ip_address + self.private_ip_address = private_ip_address + self.dns_name = dns_name + self.rdp_authority = rdp_authority + self.ssh_authority = ssh_authority + self.shared_public_ip_address_configuration = shared_public_ip_address_configuration + + +class NotificationChannel(Resource): + """A notification. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param web_hook_url: The webhook URL to send notifications to. + :type web_hook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + :param description: Description of notification. + :type description: str + :param events: The list of event for which this notification is enabled. + :type events: list[~azure.mgmt.devtestlabs.models.Event] + :ivar created_date: The creation date of the notification channel. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'events': {'key': 'properties.events', 'type': '[Event]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, web_hook_url: str=None, email_recipient: str=None, notification_locale: str=None, description: str=None, events=None, **kwargs) -> None: + super(NotificationChannel, self).__init__(location=location, tags=tags, **kwargs) + self.web_hook_url = web_hook_url + self.email_recipient = email_recipient + self.notification_locale = notification_locale + self.description = description + self.events = events + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class NotificationChannelFragment(UpdateResource): + """A notification. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param web_hook_url: The webhook URL to send notifications to. + :type web_hook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + :param description: Description of notification. + :type description: str + :param events: The list of event for which this notification is enabled. + :type events: list[~azure.mgmt.devtestlabs.models.EventFragment] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'events': {'key': 'properties.events', 'type': '[EventFragment]'}, + } + + def __init__(self, *, tags=None, web_hook_url: str=None, email_recipient: str=None, notification_locale: str=None, description: str=None, events=None, **kwargs) -> None: + super(NotificationChannelFragment, self).__init__(tags=tags, **kwargs) + self.web_hook_url = web_hook_url + self.email_recipient = email_recipient + self.notification_locale = notification_locale + self.description = description + self.events = events + + +class NotificationSettings(Model): + """Notification settings for a schedule. + + :param status: If notifications are enabled for this schedule (i.e. + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param time_in_minutes: Time in minutes before event at which notification + will be sent. + :type time_in_minutes: int + :param webhook_url: The webhook URL to which the notification will be + sent. + :type webhook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, + 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, + } + + def __init__(self, *, status=None, time_in_minutes: int=None, webhook_url: str=None, email_recipient: str=None, notification_locale: str=None, **kwargs) -> None: + super(NotificationSettings, self).__init__(**kwargs) + self.status = status + self.time_in_minutes = time_in_minutes + self.webhook_url = webhook_url + self.email_recipient = email_recipient + self.notification_locale = notification_locale + + +class NotificationSettingsFragment(Model): + """Notification settings for a schedule. + + :param status: If notifications are enabled for this schedule (i.e. + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param time_in_minutes: Time in minutes before event at which notification + will be sent. + :type time_in_minutes: int + :param webhook_url: The webhook URL to which the notification will be + sent. + :type webhook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon separated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, + 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, + } + + def __init__(self, *, status=None, time_in_minutes: int=None, webhook_url: str=None, email_recipient: str=None, notification_locale: str=None, **kwargs) -> None: + super(NotificationSettingsFragment, self).__init__(**kwargs) + self.status = status + self.time_in_minutes = time_in_minutes + self.webhook_url = webhook_url + self.email_recipient = email_recipient + self.notification_locale = notification_locale + + +class NotifyParameters(Model): + """Properties for generating a Notification. + + :param event_name: The type of event (i.e. AutoShutdown, Cost). Possible + values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + :param json_payload: Properties for the notification in json format. + :type json_payload: str + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + 'json_payload': {'key': 'jsonPayload', 'type': 'str'}, + } + + def __init__(self, *, event_name=None, json_payload: str=None, **kwargs) -> None: + super(NotifyParameters, self).__init__(**kwargs) + self.event_name = event_name + self.json_payload = json_payload + + +class OperationError(Model): + """Error details for the operation in case of a failure. + + :param code: The error code of the operation error. + :type code: str + :param message: The error message of the operation error. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(OperationError, self).__init__(**kwargs) + self.code = code + self.message = message + + +class OperationMetadata(Model): + """The REST API operation supported by DevTestLab ResourceProvider. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that describes the operations + :type display: ~azure.mgmt.devtestlabs.models.OperationMetadataDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationMetadataDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(OperationMetadata, self).__init__(**kwargs) + self.name = name + self.display = display + + +class OperationMetadataDisplay(Model): + """The object that describes the operations. + + :param provider: Friendly name of the resource provider + :type provider: str + :param resource: Resource type on which the operation is performed. + :type resource: str + :param operation: Operation type: read, write, delete, listKeys/action, + etc. + :type operation: str + :param description: Friendly name of the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationMetadataDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class OperationResult(Model): + """An Operation Result. + + :param status: The operation status. + :type status: str + :param status_code: The status code for the operation. Possible values + include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', + 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', + 'PartialContent', 'MultipleChoices', 'MovedPermanently', 'Redirect', + 'SeeOther', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', + 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', + 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', + 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', + 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', + 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', + 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', + 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', + 'HttpVersionNotSupported' + :type status_code: str or ~azure.mgmt.devtestlabs.models.HttpStatusCode + :param error: Error details for the operation in case of a failure. + :type error: ~azure.mgmt.devtestlabs.models.OperationError + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'OperationError'}, + } + + def __init__(self, *, status: str=None, status_code=None, error=None, **kwargs) -> None: + super(OperationResult, self).__init__(**kwargs) + self.status = status + self.status_code = status_code + self.error = error + + +class ParameterInfo(Model): + """Information about an artifact's parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ParameterInfo, self).__init__(**kwargs) + self.name = name + self.value = value + + +class ParametersValueFileInfo(Model): + """A file containing a set of parameter values for an ARM template. + + :param file_name: File name. + :type file_name: str + :param parameters_value_info: Contents of the file. + :type parameters_value_info: object + """ + + _attribute_map = { + 'file_name': {'key': 'fileName', 'type': 'str'}, + 'parameters_value_info': {'key': 'parametersValueInfo', 'type': 'object'}, + } + + def __init__(self, *, file_name: str=None, parameters_value_info=None, **kwargs) -> None: + super(ParametersValueFileInfo, self).__init__(**kwargs) + self.file_name = file_name + self.parameters_value_info = parameters_value_info + + +class PercentageCostThresholdProperties(Model): + """Properties of a percentage cost threshold. + + :param threshold_value: The cost threshold value. + :type threshold_value: float + """ + + _attribute_map = { + 'threshold_value': {'key': 'thresholdValue', 'type': 'float'}, + } + + def __init__(self, *, threshold_value: float=None, **kwargs) -> None: + super(PercentageCostThresholdProperties, self).__init__(**kwargs) + self.threshold_value = threshold_value + + +class Policy(Resource): + """A Policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the policy. + :type description: str + :param status: The status of the policy. Possible values include: + 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus + :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, + MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', + 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', + 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', + 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' + :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName + :param fact_data: The fact data of the policy. + :type fact_data: str + :param threshold: The threshold of the policy (i.e. a number for + MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). + :type threshold: str + :param evaluator_type: The evaluator type of the policy (i.e. + AllowedValuesPolicy, MaxValuePolicy). Possible values include: + 'AllowedValuesPolicy', 'MaxValuePolicy' + :type evaluator_type: str or + ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType + :ivar created_date: The creation date of the policy. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'fact_name': {'key': 'properties.factName', 'type': 'str'}, + 'fact_data': {'key': 'properties.factData', 'type': 'str'}, + 'threshold': {'key': 'properties.threshold', 'type': 'str'}, + 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, description: str=None, status=None, fact_name=None, fact_data: str=None, threshold: str=None, evaluator_type=None, **kwargs) -> None: + super(Policy, self).__init__(location=location, tags=tags, **kwargs) + self.description = description + self.status = status + self.fact_name = fact_name + self.fact_data = fact_data + self.threshold = threshold + self.evaluator_type = evaluator_type + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class PolicyFragment(UpdateResource): + """A Policy. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the policy. + :type description: str + :param status: The status of the policy. Possible values include: + 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus + :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, + MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', + 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', + 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', + 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' + :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName + :param fact_data: The fact data of the policy. + :type fact_data: str + :param threshold: The threshold of the policy (i.e. a number for + MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). + :type threshold: str + :param evaluator_type: The evaluator type of the policy (i.e. + AllowedValuesPolicy, MaxValuePolicy). Possible values include: + 'AllowedValuesPolicy', 'MaxValuePolicy' + :type evaluator_type: str or + ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'fact_name': {'key': 'properties.factName', 'type': 'str'}, + 'fact_data': {'key': 'properties.factData', 'type': 'str'}, + 'threshold': {'key': 'properties.threshold', 'type': 'str'}, + 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, + } + + def __init__(self, *, tags=None, description: str=None, status=None, fact_name=None, fact_data: str=None, threshold: str=None, evaluator_type=None, **kwargs) -> None: + super(PolicyFragment, self).__init__(tags=tags, **kwargs) + self.description = description + self.status = status + self.fact_name = fact_name + self.fact_data = fact_data + self.threshold = threshold + self.evaluator_type = evaluator_type + + +class PolicySetResult(Model): + """Result of a policy set evaluation. + + :param has_error: A value indicating whether this policy set evaluation + has discovered violations. + :type has_error: bool + :param policy_violations: The list of policy violations. + :type policy_violations: + list[~azure.mgmt.devtestlabs.models.PolicyViolation] + """ + + _attribute_map = { + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'policy_violations': {'key': 'policyViolations', 'type': '[PolicyViolation]'}, + } + + def __init__(self, *, has_error: bool=None, policy_violations=None, **kwargs) -> None: + super(PolicySetResult, self).__init__(**kwargs) + self.has_error = has_error + self.policy_violations = policy_violations + + +class PolicyViolation(Model): + """Policy violation. + + :param code: The code of the policy violation. + :type code: str + :param message: The message of the policy violation. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(PolicyViolation, self).__init__(**kwargs) + self.code = code + self.message = message + + +class Port(Model): + """Properties of a network port. + + :param transport_protocol: Protocol type of the port. Possible values + include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param backend_port: Backend port of the target virtual machine. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, *, transport_protocol=None, backend_port: int=None, **kwargs) -> None: + super(Port, self).__init__(**kwargs) + self.transport_protocol = transport_protocol + self.backend_port = backend_port + + +class PortFragment(Model): + """Properties of a network port. + + :param transport_protocol: Protocol type of the port. Possible values + include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param backend_port: Backend port of the target virtual machine. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, *, transport_protocol=None, backend_port: int=None, **kwargs) -> None: + super(PortFragment, self).__init__(**kwargs) + self.transport_protocol = transport_protocol + self.backend_port = backend_port + + +class RdpConnection(Model): + """Represents a .rdp file. + + :param contents: The contents of the .rdp file + :type contents: str + """ + + _attribute_map = { + 'contents': {'key': 'contents', 'type': 'str'}, + } + + def __init__(self, *, contents: str=None, **kwargs) -> None: + super(RdpConnection, self).__init__(**kwargs) + self.contents = contents + + +class ResizeLabVirtualMachineProperties(Model): + """Request body for resizing a virtual machine. + + :param size: Specifies the size of the virtual machine. + :type size: str + """ + + _attribute_map = { + 'size': {'key': 'size', 'type': 'str'}, + } + + def __init__(self, *, size: str=None, **kwargs) -> None: + super(ResizeLabVirtualMachineProperties, self).__init__(**kwargs) + self.size = size + + +class RetargetScheduleProperties(Model): + """Properties for retargeting a virtual machine schedule. + + :param current_resource_id: The resource Id of the virtual machine on + which the schedule operates + :type current_resource_id: str + :param target_resource_id: The resource Id of the virtual machine that the + schedule should be retargeted to + :type target_resource_id: str + """ + + _attribute_map = { + 'current_resource_id': {'key': 'currentResourceId', 'type': 'str'}, + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + } + + def __init__(self, *, current_resource_id: str=None, target_resource_id: str=None, **kwargs) -> None: + super(RetargetScheduleProperties, self).__init__(**kwargs) + self.current_resource_id = current_resource_id + self.target_resource_id = target_resource_id + + +class Schedule(Resource): + """A schedule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettings + :ivar created_date: The creation date of the schedule. + :vartype created_date: datetime + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, **kwargs) -> None: + super(Schedule, self).__init__(location=location, tags=tags, **kwargs) + self.status = status + self.task_type = task_type + self.weekly_recurrence = weekly_recurrence + self.daily_recurrence = daily_recurrence + self.hourly_recurrence = hourly_recurrence + self.time_zone_id = time_zone_id + self.notification_settings = notification_settings + self.created_date = None + self.target_resource_id = target_resource_id + self.provisioning_state = None + self.unique_identifier = None + + +class ScheduleCreationParameter(Model): + """Properties for creating a schedule. + + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettings + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(ScheduleCreationParameter, self).__init__(**kwargs) + self.status = status + self.task_type = task_type + self.weekly_recurrence = weekly_recurrence + self.daily_recurrence = daily_recurrence + self.hourly_recurrence = hourly_recurrence + self.time_zone_id = time_zone_id + self.notification_settings = notification_settings + self.target_resource_id = target_resource_id + self.name = name + self.location = location + self.tags = tags + + +class ScheduleCreationParameterFragment(Model): + """Properties for creating a schedule. + + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: + ~azure.mgmt.devtestlabs.models.WeekDetailsFragment + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: + ~azure.mgmt.devtestlabs.models.HourDetailsFragment + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(ScheduleCreationParameterFragment, self).__init__(**kwargs) + self.status = status + self.task_type = task_type + self.weekly_recurrence = weekly_recurrence + self.daily_recurrence = daily_recurrence + self.hourly_recurrence = hourly_recurrence + self.time_zone_id = time_zone_id + self.notification_settings = notification_settings + self.target_resource_id = target_resource_id + self.name = name + self.location = location + self.tags = tags + + +class ScheduleFragment(UpdateResource): + """A schedule. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: + ~azure.mgmt.devtestlabs.models.WeekDetailsFragment + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: + ~azure.mgmt.devtestlabs.models.HourDetailsFragment + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + } + + def __init__(self, *, tags=None, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, **kwargs) -> None: + super(ScheduleFragment, self).__init__(tags=tags, **kwargs) + self.status = status + self.task_type = task_type + self.weekly_recurrence = weekly_recurrence + self.daily_recurrence = daily_recurrence + self.hourly_recurrence = hourly_recurrence + self.time_zone_id = time_zone_id + self.notification_settings = notification_settings + self.target_resource_id = target_resource_id + + +class Secret(Resource): + """A secret. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param value: The value of the secret for secret creation. + :type value: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, value: str=None, **kwargs) -> None: + super(Secret, self).__init__(location=location, tags=tags, **kwargs) + self.value = value + self.provisioning_state = None + self.unique_identifier = None + + +class SecretFragment(UpdateResource): + """A secret. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param value: The value of the secret for secret creation. + :type value: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + } + + def __init__(self, *, tags=None, value: str=None, **kwargs) -> None: + super(SecretFragment, self).__init__(tags=tags, **kwargs) + self.value = value + + +class ServiceFabric(Resource): + """A Service Fabric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param external_service_fabric_id: The backing service fabric resource's + id + :type external_service_fabric_id: str + :param environment_id: The resource id of the environment under which the + service fabric resource is present + :type environment_id: str + :ivar applicable_schedule: The applicable schedule for the virtual + machine. + :vartype applicable_schedule: + ~azure.mgmt.devtestlabs.models.ApplicableSchedule + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'applicable_schedule': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, external_service_fabric_id: str=None, environment_id: str=None, **kwargs) -> None: + super(ServiceFabric, self).__init__(location=location, tags=tags, **kwargs) + self.external_service_fabric_id = external_service_fabric_id + self.environment_id = environment_id + self.applicable_schedule = None + self.provisioning_state = None + self.unique_identifier = None + + +class ServiceFabricFragment(UpdateResource): + """A Service Fabric. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param external_service_fabric_id: The backing service fabric resource's + id + :type external_service_fabric_id: str + :param environment_id: The resource id of the environment under which the + service fabric resource is present + :type environment_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + } + + def __init__(self, *, tags=None, external_service_fabric_id: str=None, environment_id: str=None, **kwargs) -> None: + super(ServiceFabricFragment, self).__init__(tags=tags, **kwargs) + self.external_service_fabric_id = external_service_fabric_id + self.environment_id = environment_id + + +class ServiceRunner(Resource): + """A container for a managed identity to execute DevTest lab services. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.devtestlabs.models.IdentityProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, + } + + def __init__(self, *, location: str=None, tags=None, identity=None, **kwargs) -> None: + super(ServiceRunner, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity + + +class SharedPublicIpAddressConfiguration(Model): + """Properties of a virtual machine that determine how it is connected to a + load balancer. + + :param inbound_nat_rules: The incoming NAT rules + :type inbound_nat_rules: + list[~azure.mgmt.devtestlabs.models.InboundNatRule] + """ + + _attribute_map = { + 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRule]'}, + } + + def __init__(self, *, inbound_nat_rules=None, **kwargs) -> None: + super(SharedPublicIpAddressConfiguration, self).__init__(**kwargs) + self.inbound_nat_rules = inbound_nat_rules + + +class SharedPublicIpAddressConfigurationFragment(Model): + """Properties of a virtual machine that determine how it is connected to a + load balancer. + + :param inbound_nat_rules: The incoming NAT rules + :type inbound_nat_rules: + list[~azure.mgmt.devtestlabs.models.InboundNatRuleFragment] + """ + + _attribute_map = { + 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRuleFragment]'}, + } + + def __init__(self, *, inbound_nat_rules=None, **kwargs) -> None: + super(SharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) + self.inbound_nat_rules = inbound_nat_rules + + +class ShutdownNotificationContent(Model): + """The contents of a shutdown notification. Webhooks can use this type to + deserialize the request body when they get notified of an imminent + shutdown. + + :param skip_url: The URL to skip auto-shutdown. + :type skip_url: str + :param delay_url60: The URL to delay shutdown by 60 minutes. + :type delay_url60: str + :param delay_url120: The URL to delay shutdown by 2 hours. + :type delay_url120: str + :param vm_name: The virtual machine to be shut down. + :type vm_name: str + :param guid: The GUID for the virtual machine to be shut down. + :type guid: str + :param owner: The owner of the virtual machine. + :type owner: str + :param vm_url: The URL of the virtual machine. + :type vm_url: str + :param minutes_until_shutdown: Minutes remaining until shutdown + :type minutes_until_shutdown: str + :param event_type: The event for which a notification will be sent. + :type event_type: str + :param text: The text for the notification. + :type text: str + :param subscription_id: The subscription ID for the schedule. + :type subscription_id: str + :param resource_group_name: The resource group name for the schedule. + :type resource_group_name: str + :param lab_name: The lab for the schedule. + :type lab_name: str + """ + + _attribute_map = { + 'skip_url': {'key': 'skipUrl', 'type': 'str'}, + 'delay_url60': {'key': 'delayUrl60', 'type': 'str'}, + 'delay_url120': {'key': 'delayUrl120', 'type': 'str'}, + 'vm_name': {'key': 'vmName', 'type': 'str'}, + 'guid': {'key': 'guid', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'str'}, + 'vm_url': {'key': 'vmUrl', 'type': 'str'}, + 'minutes_until_shutdown': {'key': 'minutesUntilShutdown', 'type': 'str'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'lab_name': {'key': 'labName', 'type': 'str'}, + } + + def __init__(self, *, skip_url: str=None, delay_url60: str=None, delay_url120: str=None, vm_name: str=None, guid: str=None, owner: str=None, vm_url: str=None, minutes_until_shutdown: str=None, event_type: str=None, text: str=None, subscription_id: str=None, resource_group_name: str=None, lab_name: str=None, **kwargs) -> None: + super(ShutdownNotificationContent, self).__init__(**kwargs) + self.skip_url = skip_url + self.delay_url60 = delay_url60 + self.delay_url120 = delay_url120 + self.vm_name = vm_name + self.guid = guid + self.owner = owner + self.vm_url = vm_url + self.minutes_until_shutdown = minutes_until_shutdown + self.event_type = event_type + self.text = text + self.subscription_id = subscription_id + self.resource_group_name = resource_group_name + self.lab_name = lab_name + + +class Subnet(Model): + """Subnet information. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name of the subnet as seen in the lab. + :type lab_subnet_name: str + :param allow_public_ip: The permission policy of the subnet for allowing + public IP addresses (i.e. Allow, Deny)). Possible values include: + 'Default', 'Deny', 'Allow' + :type allow_public_ip: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, allow_public_ip=None, **kwargs) -> None: + super(Subnet, self).__init__(**kwargs) + self.resource_id = resource_id + self.lab_subnet_name = lab_subnet_name + self.allow_public_ip = allow_public_ip + + +class SubnetFragment(Model): + """Subnet information. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name of the subnet as seen in the lab. + :type lab_subnet_name: str + :param allow_public_ip: The permission policy of the subnet for allowing + public IP addresses (i.e. Allow, Deny)). Possible values include: + 'Default', 'Deny', 'Allow' + :type allow_public_ip: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, allow_public_ip=None, **kwargs) -> None: + super(SubnetFragment, self).__init__(**kwargs) + self.resource_id = resource_id + self.lab_subnet_name = lab_subnet_name + self.allow_public_ip = allow_public_ip + + +class SubnetOverride(Model): + """Property overrides on a subnet of a virtual network. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name given to the subnet within the lab. + :type lab_subnet_name: str + :param use_in_vm_creation_permission: Indicates whether this subnet can be + used during virtual machine creation (i.e. Allow, Deny). Possible values + include: 'Default', 'Deny', 'Allow' + :type use_in_vm_creation_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param use_public_ip_address_permission: Indicates whether public IP + addresses can be assigned to virtual machines on this subnet (i.e. Allow, + Deny). Possible values include: 'Default', 'Deny', 'Allow' + :type use_public_ip_address_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param shared_public_ip_address_configuration: Properties that virtual + machines on this subnet will share. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfiguration + :param virtual_network_pool_name: The virtual network pool associated with + this subnet. + :type virtual_network_pool_name: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, + 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfiguration'}, + 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, use_in_vm_creation_permission=None, use_public_ip_address_permission=None, shared_public_ip_address_configuration=None, virtual_network_pool_name: str=None, **kwargs) -> None: + super(SubnetOverride, self).__init__(**kwargs) + self.resource_id = resource_id + self.lab_subnet_name = lab_subnet_name + self.use_in_vm_creation_permission = use_in_vm_creation_permission + self.use_public_ip_address_permission = use_public_ip_address_permission + self.shared_public_ip_address_configuration = shared_public_ip_address_configuration + self.virtual_network_pool_name = virtual_network_pool_name + + +class SubnetOverrideFragment(Model): + """Property overrides on a subnet of a virtual network. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name given to the subnet within the lab. + :type lab_subnet_name: str + :param use_in_vm_creation_permission: Indicates whether this subnet can be + used during virtual machine creation (i.e. Allow, Deny). Possible values + include: 'Default', 'Deny', 'Allow' + :type use_in_vm_creation_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param use_public_ip_address_permission: Indicates whether public IP + addresses can be assigned to virtual machines on this subnet (i.e. Allow, + Deny). Possible values include: 'Default', 'Deny', 'Allow' + :type use_public_ip_address_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param shared_public_ip_address_configuration: Properties that virtual + machines on this subnet will share. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfigurationFragment + :param virtual_network_pool_name: The virtual network pool associated with + this subnet. + :type virtual_network_pool_name: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, + 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfigurationFragment'}, + 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, use_in_vm_creation_permission=None, use_public_ip_address_permission=None, shared_public_ip_address_configuration=None, virtual_network_pool_name: str=None, **kwargs) -> None: + super(SubnetOverrideFragment, self).__init__(**kwargs) + self.resource_id = resource_id + self.lab_subnet_name = lab_subnet_name + self.use_in_vm_creation_permission = use_in_vm_creation_permission + self.use_public_ip_address_permission = use_public_ip_address_permission + self.shared_public_ip_address_configuration = shared_public_ip_address_configuration + self.virtual_network_pool_name = virtual_network_pool_name + + +class SubnetSharedPublicIpAddressConfiguration(Model): + """Configuration for public IP address sharing. + + :param allowed_ports: Backend ports that virtual machines on this subnet + are allowed to expose + :type allowed_ports: list[~azure.mgmt.devtestlabs.models.Port] + """ + + _attribute_map = { + 'allowed_ports': {'key': 'allowedPorts', 'type': '[Port]'}, + } + + def __init__(self, *, allowed_ports=None, **kwargs) -> None: + super(SubnetSharedPublicIpAddressConfiguration, self).__init__(**kwargs) + self.allowed_ports = allowed_ports + + +class SubnetSharedPublicIpAddressConfigurationFragment(Model): + """Configuration for public IP address sharing. + + :param allowed_ports: Backend ports that virtual machines on this subnet + are allowed to expose + :type allowed_ports: list[~azure.mgmt.devtestlabs.models.PortFragment] + """ + + _attribute_map = { + 'allowed_ports': {'key': 'allowedPorts', 'type': '[PortFragment]'}, + } + + def __init__(self, *, allowed_ports=None, **kwargs) -> None: + super(SubnetSharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) + self.allowed_ports = allowed_ports + + +class TargetCostProperties(Model): + """Properties of a cost target. + + :param status: Target cost status. Possible values include: 'Enabled', + 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.TargetCostStatus + :param target: Lab target cost + :type target: int + :param cost_thresholds: Cost thresholds. + :type cost_thresholds: + list[~azure.mgmt.devtestlabs.models.CostThresholdProperties] + :param cycle_start_date_time: Reporting cycle start date. + :type cycle_start_date_time: datetime + :param cycle_end_date_time: Reporting cycle end date. + :type cycle_end_date_time: datetime + :param cycle_type: Reporting cycle type. Possible values include: + 'CalendarMonth', 'Custom' + :type cycle_type: str or ~azure.mgmt.devtestlabs.models.ReportingCycleType + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'int'}, + 'cost_thresholds': {'key': 'costThresholds', 'type': '[CostThresholdProperties]'}, + 'cycle_start_date_time': {'key': 'cycleStartDateTime', 'type': 'iso-8601'}, + 'cycle_end_date_time': {'key': 'cycleEndDateTime', 'type': 'iso-8601'}, + 'cycle_type': {'key': 'cycleType', 'type': 'str'}, + } + + def __init__(self, *, status=None, target: int=None, cost_thresholds=None, cycle_start_date_time=None, cycle_end_date_time=None, cycle_type=None, **kwargs) -> None: + super(TargetCostProperties, self).__init__(**kwargs) + self.status = status + self.target = target + self.cost_thresholds = cost_thresholds + self.cycle_start_date_time = cycle_start_date_time + self.cycle_end_date_time = cycle_end_date_time + self.cycle_type = cycle_type + + +class User(Resource): + """Profile of a lab user. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the user. + :type identity: ~azure.mgmt.devtestlabs.models.UserIdentity + :param secret_store: The secret store of the user. + :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStore + :ivar created_date: The creation date of the user profile. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'properties.identity', 'type': 'UserIdentity'}, + 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStore'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, identity=None, secret_store=None, **kwargs) -> None: + super(User, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity + self.secret_store = secret_store + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class UserFragment(UpdateResource): + """Profile of a lab user. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the user. + :type identity: ~azure.mgmt.devtestlabs.models.UserIdentityFragment + :param secret_store: The secret store of the user. + :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStoreFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'properties.identity', 'type': 'UserIdentityFragment'}, + 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStoreFragment'}, + } + + def __init__(self, *, tags=None, identity=None, secret_store=None, **kwargs) -> None: + super(UserFragment, self).__init__(tags=tags, **kwargs) + self.identity = identity + self.secret_store = secret_store + + +class UserIdentity(Model): + """Identity attributes of a lab user. + + :param principal_name: Set to the principal name / UPN of the client JWT + making the request. + :type principal_name: str + :param principal_id: Set to the principal Id of the client JWT making the + request. Service principal will not have the principal Id. + :type principal_id: str + :param tenant_id: Set to the tenant ID of the client JWT making the + request. + :type tenant_id: str + :param object_id: Set to the object Id of the client JWT making the + request. Not all users have object Id. For CSP (reseller) scenarios for + example, object Id is not available. + :type object_id: str + :param app_id: Set to the app Id of the client JWT making the request. + :type app_id: str + """ + + _attribute_map = { + 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'app_id': {'key': 'appId', 'type': 'str'}, + } + + def __init__(self, *, principal_name: str=None, principal_id: str=None, tenant_id: str=None, object_id: str=None, app_id: str=None, **kwargs) -> None: + super(UserIdentity, self).__init__(**kwargs) + self.principal_name = principal_name + self.principal_id = principal_id + self.tenant_id = tenant_id + self.object_id = object_id + self.app_id = app_id + + +class UserIdentityFragment(Model): + """Identity attributes of a lab user. + + :param principal_name: Set to the principal name / UPN of the client JWT + making the request. + :type principal_name: str + :param principal_id: Set to the principal Id of the client JWT making the + request. Service principal will not have the principal Id. + :type principal_id: str + :param tenant_id: Set to the tenant ID of the client JWT making the + request. + :type tenant_id: str + :param object_id: Set to the object Id of the client JWT making the + request. Not all users have object Id. For CSP (reseller) scenarios for + example, object Id is not available. + :type object_id: str + :param app_id: Set to the app Id of the client JWT making the request. + :type app_id: str + """ + + _attribute_map = { + 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'app_id': {'key': 'appId', 'type': 'str'}, + } + + def __init__(self, *, principal_name: str=None, principal_id: str=None, tenant_id: str=None, object_id: str=None, app_id: str=None, **kwargs) -> None: + super(UserIdentityFragment, self).__init__(**kwargs) + self.principal_name = principal_name + self.principal_id = principal_id + self.tenant_id = tenant_id + self.object_id = object_id + self.app_id = app_id + + +class UserSecretStore(Model): + """Properties of a user's secret store. + + :param key_vault_uri: The URI of the user's Key vault. + :type key_vault_uri: str + :param key_vault_id: The ID of the user's Key vault. + :type key_vault_id: str + """ + + _attribute_map = { + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + } + + def __init__(self, *, key_vault_uri: str=None, key_vault_id: str=None, **kwargs) -> None: + super(UserSecretStore, self).__init__(**kwargs) + self.key_vault_uri = key_vault_uri + self.key_vault_id = key_vault_id + + +class UserSecretStoreFragment(Model): + """Properties of a user's secret store. + + :param key_vault_uri: The URI of the user's Key vault. + :type key_vault_uri: str + :param key_vault_id: The ID of the user's Key vault. + :type key_vault_id: str + """ + + _attribute_map = { + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + } + + def __init__(self, *, key_vault_uri: str=None, key_vault_id: str=None, **kwargs) -> None: + super(UserSecretStoreFragment, self).__init__(**kwargs) + self.key_vault_uri = key_vault_uri + self.key_vault_id = key_vault_id + + +class VirtualNetwork(Resource): + """A virtual network. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param allowed_subnets: The allowed subnets of the virtual network. + :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.Subnet] + :param description: The description of the virtual network. + :type description: str + :param external_provider_resource_id: The Microsoft.Network resource + identifier of the virtual network. + :type external_provider_resource_id: str + :ivar external_subnets: The external subnet properties. + :vartype external_subnets: + list[~azure.mgmt.devtestlabs.models.ExternalSubnet] + :param subnet_overrides: The subnet overrides of the virtual network. + :type subnet_overrides: + list[~azure.mgmt.devtestlabs.models.SubnetOverride] + :ivar created_date: The creation date of the virtual network. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'external_subnets': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[Subnet]'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, + 'external_subnets': {'key': 'properties.externalSubnets', 'type': '[ExternalSubnet]'}, + 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverride]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, allowed_subnets=None, description: str=None, external_provider_resource_id: str=None, subnet_overrides=None, **kwargs) -> None: + super(VirtualNetwork, self).__init__(location=location, tags=tags, **kwargs) + self.allowed_subnets = allowed_subnets + self.description = description + self.external_provider_resource_id = external_provider_resource_id + self.external_subnets = None + self.subnet_overrides = subnet_overrides + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None + + +class VirtualNetworkFragment(UpdateResource): + """A virtual network. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param allowed_subnets: The allowed subnets of the virtual network. + :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.SubnetFragment] + :param description: The description of the virtual network. + :type description: str + :param external_provider_resource_id: The Microsoft.Network resource + identifier of the virtual network. + :type external_provider_resource_id: str + :param subnet_overrides: The subnet overrides of the virtual network. + :type subnet_overrides: + list[~azure.mgmt.devtestlabs.models.SubnetOverrideFragment] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[SubnetFragment]'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, + 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverrideFragment]'}, + } + + def __init__(self, *, tags=None, allowed_subnets=None, description: str=None, external_provider_resource_id: str=None, subnet_overrides=None, **kwargs) -> None: + super(VirtualNetworkFragment, self).__init__(tags=tags, **kwargs) + self.allowed_subnets = allowed_subnets + self.description = description + self.external_provider_resource_id = external_provider_resource_id + self.subnet_overrides = subnet_overrides + + +class WeekDetails(Model): + """Properties of a weekly schedule. + + :param weekdays: The days of the week for which the schedule is set (e.g. + Sunday, Monday, Tuesday, etc.). + :type weekdays: list[str] + :param time: The time of the day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'weekdays': {'key': 'weekdays', 'type': '[str]'}, + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, *, weekdays=None, time: str=None, **kwargs) -> None: + super(WeekDetails, self).__init__(**kwargs) + self.weekdays = weekdays + self.time = time + + +class WeekDetailsFragment(Model): + """Properties of a weekly schedule. + + :param weekdays: The days of the week for which the schedule is set (e.g. + Sunday, Monday, Tuesday, etc.). + :type weekdays: list[str] + :param time: The time of the day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'weekdays': {'key': 'weekdays', 'type': '[str]'}, + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, *, weekdays=None, time: str=None, **kwargs) -> None: + super(WeekDetailsFragment, self).__init__(**kwargs) + self.weekdays = weekdays + self.time = time + + +class WindowsOsInfo(Model): + """Information about a Windows OS. + + :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, + SysprepRequested, SysprepApplied). Possible values include: + 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' + :type windows_os_state: str or + ~azure.mgmt.devtestlabs.models.WindowsOsState + """ + + _attribute_map = { + 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, + } + + def __init__(self, *, windows_os_state=None, **kwargs) -> None: + super(WindowsOsInfo, self).__init__(**kwargs) + self.windows_os_state = windows_os_state + + +class WindowsOsInfoFragment(Model): + """Information about a Windows OS. + + :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, + SysprepRequested, SysprepApplied). Possible values include: + 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' + :type windows_os_state: str or + ~azure.mgmt.devtestlabs.models.WindowsOsState + """ + + _attribute_map = { + 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, + } + + def __init__(self, *, windows_os_state=None, **kwargs) -> None: + super(WindowsOsInfoFragment, self).__init__(**kwargs) + self.windows_os_state = windows_os_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_paged_models.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_paged_models.py new file mode 100644 index 000000000000..3e947c89d709 --- /dev/null +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_paged_models.py @@ -0,0 +1,261 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationMetadataPaged(Paged): + """ + A paging container for iterating over a list of :class:`OperationMetadata ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[OperationMetadata]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationMetadataPaged, self).__init__(*args, **kwargs) +class LabPaged(Paged): + """ + A paging container for iterating over a list of :class:`Lab ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Lab]'} + } + + def __init__(self, *args, **kwargs): + + super(LabPaged, self).__init__(*args, **kwargs) +class LabVhdPaged(Paged): + """ + A paging container for iterating over a list of :class:`LabVhd ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[LabVhd]'} + } + + def __init__(self, *args, **kwargs): + + super(LabVhdPaged, self).__init__(*args, **kwargs) +class SchedulePaged(Paged): + """ + A paging container for iterating over a list of :class:`Schedule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Schedule]'} + } + + def __init__(self, *args, **kwargs): + + super(SchedulePaged, self).__init__(*args, **kwargs) +class ArtifactSourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`ArtifactSource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ArtifactSource]'} + } + + def __init__(self, *args, **kwargs): + + super(ArtifactSourcePaged, self).__init__(*args, **kwargs) +class ArmTemplatePaged(Paged): + """ + A paging container for iterating over a list of :class:`ArmTemplate ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ArmTemplate]'} + } + + def __init__(self, *args, **kwargs): + + super(ArmTemplatePaged, self).__init__(*args, **kwargs) +class ArtifactPaged(Paged): + """ + A paging container for iterating over a list of :class:`Artifact ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Artifact]'} + } + + def __init__(self, *args, **kwargs): + + super(ArtifactPaged, self).__init__(*args, **kwargs) +class CustomImagePaged(Paged): + """ + A paging container for iterating over a list of :class:`CustomImage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CustomImage]'} + } + + def __init__(self, *args, **kwargs): + + super(CustomImagePaged, self).__init__(*args, **kwargs) +class FormulaPaged(Paged): + """ + A paging container for iterating over a list of :class:`Formula ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Formula]'} + } + + def __init__(self, *args, **kwargs): + + super(FormulaPaged, self).__init__(*args, **kwargs) +class GalleryImagePaged(Paged): + """ + A paging container for iterating over a list of :class:`GalleryImage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GalleryImage]'} + } + + def __init__(self, *args, **kwargs): + + super(GalleryImagePaged, self).__init__(*args, **kwargs) +class NotificationChannelPaged(Paged): + """ + A paging container for iterating over a list of :class:`NotificationChannel ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[NotificationChannel]'} + } + + def __init__(self, *args, **kwargs): + + super(NotificationChannelPaged, self).__init__(*args, **kwargs) +class PolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`Policy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Policy]'} + } + + def __init__(self, *args, **kwargs): + + super(PolicyPaged, self).__init__(*args, **kwargs) +class UserPaged(Paged): + """ + A paging container for iterating over a list of :class:`User ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[User]'} + } + + def __init__(self, *args, **kwargs): + + super(UserPaged, self).__init__(*args, **kwargs) +class DiskPaged(Paged): + """ + A paging container for iterating over a list of :class:`Disk ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Disk]'} + } + + def __init__(self, *args, **kwargs): + + super(DiskPaged, self).__init__(*args, **kwargs) +class DtlEnvironmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`DtlEnvironment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DtlEnvironment]'} + } + + def __init__(self, *args, **kwargs): + + super(DtlEnvironmentPaged, self).__init__(*args, **kwargs) +class SecretPaged(Paged): + """ + A paging container for iterating over a list of :class:`Secret ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Secret]'} + } + + def __init__(self, *args, **kwargs): + + super(SecretPaged, self).__init__(*args, **kwargs) +class ServiceFabricPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServiceFabric ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServiceFabric]'} + } + + def __init__(self, *args, **kwargs): + + super(ServiceFabricPaged, self).__init__(*args, **kwargs) +class LabVirtualMachinePaged(Paged): + """ + A paging container for iterating over a list of :class:`LabVirtualMachine ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[LabVirtualMachine]'} + } + + def __init__(self, *args, **kwargs): + + super(LabVirtualMachinePaged, self).__init__(*args, **kwargs) +class VirtualNetworkPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualNetwork ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualNetwork]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualNetworkPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule.py deleted file mode 100644 index bbdc049f2f3f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ApplicableSchedule(Resource): - """Schedules applicable to a virtual machine. The schedules may have been - defined on a VM or on lab level. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set - at the lab or lab resource level. - :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.Schedule - :param lab_vms_startup: The auto-startup schedule, if one has been set at - the lab or lab resource level. - :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.Schedule - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'Schedule'}, - 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'Schedule'}, - } - - def __init__(self, **kwargs): - super(ApplicableSchedule, self).__init__(**kwargs) - self.lab_vms_shutdown = kwargs.get('lab_vms_shutdown', None) - self.lab_vms_startup = kwargs.get('lab_vms_startup', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment.py deleted file mode 100644 index 8139b26bbb37..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class ApplicableScheduleFragment(UpdateResource): - """Schedules applicable to a virtual machine. The schedules may have been - defined on a VM or on lab level. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set - at the lab or lab resource level. - :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.ScheduleFragment - :param lab_vms_startup: The auto-startup schedule, if one has been set at - the lab or lab resource level. - :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.ScheduleFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'ScheduleFragment'}, - 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'ScheduleFragment'}, - } - - def __init__(self, **kwargs): - super(ApplicableScheduleFragment, self).__init__(**kwargs) - self.lab_vms_shutdown = kwargs.get('lab_vms_shutdown', None) - self.lab_vms_startup = kwargs.get('lab_vms_startup', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment_py3.py deleted file mode 100644 index d1ddb7b37caa..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class ApplicableScheduleFragment(UpdateResource): - """Schedules applicable to a virtual machine. The schedules may have been - defined on a VM or on lab level. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set - at the lab or lab resource level. - :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.ScheduleFragment - :param lab_vms_startup: The auto-startup schedule, if one has been set at - the lab or lab resource level. - :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.ScheduleFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'ScheduleFragment'}, - 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'ScheduleFragment'}, - } - - def __init__(self, *, tags=None, lab_vms_shutdown=None, lab_vms_startup=None, **kwargs) -> None: - super(ApplicableScheduleFragment, self).__init__(tags=tags, **kwargs) - self.lab_vms_shutdown = lab_vms_shutdown - self.lab_vms_startup = lab_vms_startup diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_py3.py deleted file mode 100644 index dabce38bbcae..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ApplicableSchedule(Resource): - """Schedules applicable to a virtual machine. The schedules may have been - defined on a VM or on lab level. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set - at the lab or lab resource level. - :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.Schedule - :param lab_vms_startup: The auto-startup schedule, if one has been set at - the lab or lab resource level. - :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.Schedule - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'Schedule'}, - 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'Schedule'}, - } - - def __init__(self, *, location: str=None, tags=None, lab_vms_shutdown=None, lab_vms_startup=None, **kwargs) -> None: - super(ApplicableSchedule, self).__init__(location=location, tags=tags, **kwargs) - self.lab_vms_shutdown = lab_vms_shutdown - self.lab_vms_startup = lab_vms_startup diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request.py deleted file mode 100644 index 5576e79bf0ad..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplyArtifactsRequest(Model): - """Request body for applying artifacts to a virtual machine. - - :param artifacts: The list of artifacts to apply. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - """ - - _attribute_map = { - 'artifacts': {'key': 'artifacts', 'type': '[ArtifactInstallProperties]'}, - } - - def __init__(self, **kwargs): - super(ApplyArtifactsRequest, self).__init__(**kwargs) - self.artifacts = kwargs.get('artifacts', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request_py3.py deleted file mode 100644 index 2e5de7eca69f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplyArtifactsRequest(Model): - """Request body for applying artifacts to a virtual machine. - - :param artifacts: The list of artifacts to apply. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - """ - - _attribute_map = { - 'artifacts': {'key': 'artifacts', 'type': '[ArtifactInstallProperties]'}, - } - - def __init__(self, *, artifacts=None, **kwargs) -> None: - super(ApplyArtifactsRequest, self).__init__(**kwargs) - self.artifacts = artifacts diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template.py deleted file mode 100644 index 9ff3ebed92de..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ArmTemplate(Resource): - """An Azure Resource Manager template. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar display_name: The display name of the ARM template. - :vartype display_name: str - :ivar description: The description of the ARM template. - :vartype description: str - :ivar publisher: The publisher of the ARM template. - :vartype publisher: str - :ivar icon: The URI to the icon of the ARM template. - :vartype icon: str - :ivar contents: The contents of the ARM template. - :vartype contents: object - :ivar created_date: The creation date of the armTemplate. - :vartype created_date: datetime - :ivar parameters_value_files_info: File name and parameter values - information from all azuredeploy.*.parameters.json for the ARM template. - :vartype parameters_value_files_info: - list[~azure.mgmt.devtestlabs.models.ParametersValueFileInfo] - :ivar enabled: Whether or not ARM template is enabled for use by lab user. - :vartype enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'publisher': {'readonly': True}, - 'icon': {'readonly': True}, - 'contents': {'readonly': True}, - 'created_date': {'readonly': True}, - 'parameters_value_files_info': {'readonly': True}, - 'enabled': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'contents': {'key': 'properties.contents', 'type': 'object'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'parameters_value_files_info': {'key': 'properties.parametersValueFilesInfo', 'type': '[ParametersValueFileInfo]'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ArmTemplate, self).__init__(**kwargs) - self.display_name = None - self.description = None - self.publisher = None - self.icon = None - self.contents = None - self.created_date = None - self.parameters_value_files_info = None - self.enabled = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info.py deleted file mode 100644 index 9706cf3d1122..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArmTemplateInfo(Model): - """Information about a generated ARM template. - - :param template: The template's contents. - :type template: object - :param parameters: The parameters of the ARM template. - :type parameters: object - """ - - _attribute_map = { - 'template': {'key': 'template', 'type': 'object'}, - 'parameters': {'key': 'parameters', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ArmTemplateInfo, self).__init__(**kwargs) - self.template = kwargs.get('template', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info_py3.py deleted file mode 100644 index 6194e4d20559..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArmTemplateInfo(Model): - """Information about a generated ARM template. - - :param template: The template's contents. - :type template: object - :param parameters: The parameters of the ARM template. - :type parameters: object - """ - - _attribute_map = { - 'template': {'key': 'template', 'type': 'object'}, - 'parameters': {'key': 'parameters', 'type': 'object'}, - } - - def __init__(self, *, template=None, parameters=None, **kwargs) -> None: - super(ArmTemplateInfo, self).__init__(**kwargs) - self.template = template - self.parameters = parameters diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_paged.py deleted file mode 100644 index e209fa704487..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ArmTemplatePaged(Paged): - """ - A paging container for iterating over a list of :class:`ArmTemplate ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ArmTemplate]'} - } - - def __init__(self, *args, **kwargs): - - super(ArmTemplatePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties.py deleted file mode 100644 index 9c939b46ff98..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArmTemplateParameterProperties(Model): - """Properties of an Azure Resource Manager template parameter. - - :param name: The name of the template parameter. - :type name: str - :param value: The value of the template parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArmTemplateParameterProperties, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment.py deleted file mode 100644 index c73b8c260aee..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArmTemplateParameterPropertiesFragment(Model): - """Properties of an Azure Resource Manager template parameter. - - :param name: The name of the template parameter. - :type name: str - :param value: The value of the template parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArmTemplateParameterPropertiesFragment, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment_py3.py deleted file mode 100644 index ca110d0ee441..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArmTemplateParameterPropertiesFragment(Model): - """Properties of an Azure Resource Manager template parameter. - - :param name: The name of the template parameter. - :type name: str - :param value: The value of the template parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: - super(ArmTemplateParameterPropertiesFragment, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_py3.py deleted file mode 100644 index 16ab6753be2e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArmTemplateParameterProperties(Model): - """Properties of an Azure Resource Manager template parameter. - - :param name: The name of the template parameter. - :type name: str - :param value: The value of the template parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: - super(ArmTemplateParameterProperties, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_py3.py deleted file mode 100644 index 64b55696e79c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_py3.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ArmTemplate(Resource): - """An Azure Resource Manager template. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar display_name: The display name of the ARM template. - :vartype display_name: str - :ivar description: The description of the ARM template. - :vartype description: str - :ivar publisher: The publisher of the ARM template. - :vartype publisher: str - :ivar icon: The URI to the icon of the ARM template. - :vartype icon: str - :ivar contents: The contents of the ARM template. - :vartype contents: object - :ivar created_date: The creation date of the armTemplate. - :vartype created_date: datetime - :ivar parameters_value_files_info: File name and parameter values - information from all azuredeploy.*.parameters.json for the ARM template. - :vartype parameters_value_files_info: - list[~azure.mgmt.devtestlabs.models.ParametersValueFileInfo] - :ivar enabled: Whether or not ARM template is enabled for use by lab user. - :vartype enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'publisher': {'readonly': True}, - 'icon': {'readonly': True}, - 'contents': {'readonly': True}, - 'created_date': {'readonly': True}, - 'parameters_value_files_info': {'readonly': True}, - 'enabled': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'contents': {'key': 'properties.contents', 'type': 'object'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'parameters_value_files_info': {'key': 'properties.parametersValueFilesInfo', 'type': '[ParametersValueFileInfo]'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(ArmTemplate, self).__init__(location=location, tags=tags, **kwargs) - self.display_name = None - self.description = None - self.publisher = None - self.icon = None - self.contents = None - self.created_date = None - self.parameters_value_files_info = None - self.enabled = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact.py deleted file mode 100644 index cf1884020662..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Artifact(Resource): - """An artifact. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar title: The artifact's title. - :vartype title: str - :ivar description: The artifact's description. - :vartype description: str - :ivar publisher: The artifact's publisher. - :vartype publisher: str - :ivar file_path: The file path to the artifact. - :vartype file_path: str - :ivar icon: The URI to the artifact icon. - :vartype icon: str - :ivar target_os_type: The artifact's target OS. - :vartype target_os_type: str - :ivar parameters: The artifact's parameters. - :vartype parameters: object - :ivar created_date: The artifact's creation date. - :vartype created_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'title': {'readonly': True}, - 'description': {'readonly': True}, - 'publisher': {'readonly': True}, - 'file_path': {'readonly': True}, - 'icon': {'readonly': True}, - 'target_os_type': {'readonly': True}, - 'parameters': {'readonly': True}, - 'created_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'file_path': {'key': 'properties.filePath', 'type': 'str'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'target_os_type': {'key': 'properties.targetOsType', 'type': 'str'}, - 'parameters': {'key': 'properties.parameters', 'type': 'object'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(Artifact, self).__init__(**kwargs) - self.title = None - self.description = None - self.publisher = None - self.file_path = None - self.icon = None - self.target_os_type = None - self.parameters = None - self.created_date = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties.py deleted file mode 100644 index 00e10ab200d7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactDeploymentStatusProperties(Model): - """Properties of an artifact deployment. - - :param deployment_status: The deployment status of the artifact. - :type deployment_status: str - :param artifacts_applied: The total count of the artifacts that were - successfully applied. - :type artifacts_applied: int - :param total_artifacts: The total count of the artifacts that were - tentatively applied. - :type total_artifacts: int - """ - - _attribute_map = { - 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, - 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, - 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ArtifactDeploymentStatusProperties, self).__init__(**kwargs) - self.deployment_status = kwargs.get('deployment_status', None) - self.artifacts_applied = kwargs.get('artifacts_applied', None) - self.total_artifacts = kwargs.get('total_artifacts', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment.py deleted file mode 100644 index b5231c92c635..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactDeploymentStatusPropertiesFragment(Model): - """Properties of an artifact deployment. - - :param deployment_status: The deployment status of the artifact. - :type deployment_status: str - :param artifacts_applied: The total count of the artifacts that were - successfully applied. - :type artifacts_applied: int - :param total_artifacts: The total count of the artifacts that were - tentatively applied. - :type total_artifacts: int - """ - - _attribute_map = { - 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, - 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, - 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ArtifactDeploymentStatusPropertiesFragment, self).__init__(**kwargs) - self.deployment_status = kwargs.get('deployment_status', None) - self.artifacts_applied = kwargs.get('artifacts_applied', None) - self.total_artifacts = kwargs.get('total_artifacts', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment_py3.py deleted file mode 100644 index d3dd5372ef6d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactDeploymentStatusPropertiesFragment(Model): - """Properties of an artifact deployment. - - :param deployment_status: The deployment status of the artifact. - :type deployment_status: str - :param artifacts_applied: The total count of the artifacts that were - successfully applied. - :type artifacts_applied: int - :param total_artifacts: The total count of the artifacts that were - tentatively applied. - :type total_artifacts: int - """ - - _attribute_map = { - 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, - 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, - 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, - } - - def __init__(self, *, deployment_status: str=None, artifacts_applied: int=None, total_artifacts: int=None, **kwargs) -> None: - super(ArtifactDeploymentStatusPropertiesFragment, self).__init__(**kwargs) - self.deployment_status = deployment_status - self.artifacts_applied = artifacts_applied - self.total_artifacts = total_artifacts diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_py3.py deleted file mode 100644 index 5b38610af59e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactDeploymentStatusProperties(Model): - """Properties of an artifact deployment. - - :param deployment_status: The deployment status of the artifact. - :type deployment_status: str - :param artifacts_applied: The total count of the artifacts that were - successfully applied. - :type artifacts_applied: int - :param total_artifacts: The total count of the artifacts that were - tentatively applied. - :type total_artifacts: int - """ - - _attribute_map = { - 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, - 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, - 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, - } - - def __init__(self, *, deployment_status: str=None, artifacts_applied: int=None, total_artifacts: int=None, **kwargs) -> None: - super(ArtifactDeploymentStatusProperties, self).__init__(**kwargs) - self.deployment_status = deployment_status - self.artifacts_applied = artifacts_applied - self.total_artifacts = total_artifacts diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties.py deleted file mode 100644 index 7a976ea8f7b1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactInstallProperties(Model): - """Properties of an artifact. - - :param artifact_id: The artifact's identifier. - :type artifact_id: str - :param artifact_title: The artifact's title. - :type artifact_title: str - :param parameters: The parameters of the artifact. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArtifactParameterProperties] - :param status: The status of the artifact. - :type status: str - :param deployment_status_message: The status message from the deployment. - :type deployment_status_message: str - :param vm_extension_status_message: The status message from the virtual - machine extension. - :type vm_extension_status_message: str - :param install_time: The time that the artifact starts to install on the - virtual machine. - :type install_time: datetime - """ - - _attribute_map = { - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterProperties]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, - 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, - 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ArtifactInstallProperties, self).__init__(**kwargs) - self.artifact_id = kwargs.get('artifact_id', None) - self.artifact_title = kwargs.get('artifact_title', None) - self.parameters = kwargs.get('parameters', None) - self.status = kwargs.get('status', None) - self.deployment_status_message = kwargs.get('deployment_status_message', None) - self.vm_extension_status_message = kwargs.get('vm_extension_status_message', None) - self.install_time = kwargs.get('install_time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment.py deleted file mode 100644 index 0149af16d549..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactInstallPropertiesFragment(Model): - """Properties of an artifact. - - :param artifact_id: The artifact's identifier. - :type artifact_id: str - :param artifact_title: The artifact's title. - :type artifact_title: str - :param parameters: The parameters of the artifact. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArtifactParameterPropertiesFragment] - :param status: The status of the artifact. - :type status: str - :param deployment_status_message: The status message from the deployment. - :type deployment_status_message: str - :param vm_extension_status_message: The status message from the virtual - machine extension. - :type vm_extension_status_message: str - :param install_time: The time that the artifact starts to install on the - virtual machine. - :type install_time: datetime - """ - - _attribute_map = { - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterPropertiesFragment]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, - 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, - 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ArtifactInstallPropertiesFragment, self).__init__(**kwargs) - self.artifact_id = kwargs.get('artifact_id', None) - self.artifact_title = kwargs.get('artifact_title', None) - self.parameters = kwargs.get('parameters', None) - self.status = kwargs.get('status', None) - self.deployment_status_message = kwargs.get('deployment_status_message', None) - self.vm_extension_status_message = kwargs.get('vm_extension_status_message', None) - self.install_time = kwargs.get('install_time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment_py3.py deleted file mode 100644 index 4aa552477186..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactInstallPropertiesFragment(Model): - """Properties of an artifact. - - :param artifact_id: The artifact's identifier. - :type artifact_id: str - :param artifact_title: The artifact's title. - :type artifact_title: str - :param parameters: The parameters of the artifact. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArtifactParameterPropertiesFragment] - :param status: The status of the artifact. - :type status: str - :param deployment_status_message: The status message from the deployment. - :type deployment_status_message: str - :param vm_extension_status_message: The status message from the virtual - machine extension. - :type vm_extension_status_message: str - :param install_time: The time that the artifact starts to install on the - virtual machine. - :type install_time: datetime - """ - - _attribute_map = { - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterPropertiesFragment]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, - 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, - 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, artifact_id: str=None, artifact_title: str=None, parameters=None, status: str=None, deployment_status_message: str=None, vm_extension_status_message: str=None, install_time=None, **kwargs) -> None: - super(ArtifactInstallPropertiesFragment, self).__init__(**kwargs) - self.artifact_id = artifact_id - self.artifact_title = artifact_title - self.parameters = parameters - self.status = status - self.deployment_status_message = deployment_status_message - self.vm_extension_status_message = vm_extension_status_message - self.install_time = install_time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_py3.py deleted file mode 100644 index 3df682e56bc6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactInstallProperties(Model): - """Properties of an artifact. - - :param artifact_id: The artifact's identifier. - :type artifact_id: str - :param artifact_title: The artifact's title. - :type artifact_title: str - :param parameters: The parameters of the artifact. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArtifactParameterProperties] - :param status: The status of the artifact. - :type status: str - :param deployment_status_message: The status message from the deployment. - :type deployment_status_message: str - :param vm_extension_status_message: The status message from the virtual - machine extension. - :type vm_extension_status_message: str - :param install_time: The time that the artifact starts to install on the - virtual machine. - :type install_time: datetime - """ - - _attribute_map = { - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterProperties]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, - 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, - 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, artifact_id: str=None, artifact_title: str=None, parameters=None, status: str=None, deployment_status_message: str=None, vm_extension_status_message: str=None, install_time=None, **kwargs) -> None: - super(ArtifactInstallProperties, self).__init__(**kwargs) - self.artifact_id = artifact_id - self.artifact_title = artifact_title - self.parameters = parameters - self.status = status - self.deployment_status_message = deployment_status_message - self.vm_extension_status_message = vm_extension_status_message - self.install_time = install_time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_paged.py deleted file mode 100644 index 67c8e3601237..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ArtifactPaged(Paged): - """ - A paging container for iterating over a list of :class:`Artifact ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Artifact]'} - } - - def __init__(self, *args, **kwargs): - - super(ArtifactPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties.py deleted file mode 100644 index 546480baabd2..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactParameterProperties(Model): - """Properties of an artifact parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArtifactParameterProperties, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment.py deleted file mode 100644 index 77be250d5e11..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactParameterPropertiesFragment(Model): - """Properties of an artifact parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArtifactParameterPropertiesFragment, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment_py3.py deleted file mode 100644 index 326ea3643623..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactParameterPropertiesFragment(Model): - """Properties of an artifact parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: - super(ArtifactParameterPropertiesFragment, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_py3.py deleted file mode 100644 index c3ef4207b385..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactParameterProperties(Model): - """Properties of an artifact parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: - super(ArtifactParameterProperties, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_py3.py deleted file mode 100644 index 9e36ad2abf3f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Artifact(Resource): - """An artifact. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar title: The artifact's title. - :vartype title: str - :ivar description: The artifact's description. - :vartype description: str - :ivar publisher: The artifact's publisher. - :vartype publisher: str - :ivar file_path: The file path to the artifact. - :vartype file_path: str - :ivar icon: The URI to the artifact icon. - :vartype icon: str - :ivar target_os_type: The artifact's target OS. - :vartype target_os_type: str - :ivar parameters: The artifact's parameters. - :vartype parameters: object - :ivar created_date: The artifact's creation date. - :vartype created_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'title': {'readonly': True}, - 'description': {'readonly': True}, - 'publisher': {'readonly': True}, - 'file_path': {'readonly': True}, - 'icon': {'readonly': True}, - 'target_os_type': {'readonly': True}, - 'parameters': {'readonly': True}, - 'created_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'file_path': {'key': 'properties.filePath', 'type': 'str'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'target_os_type': {'key': 'properties.targetOsType', 'type': 'str'}, - 'parameters': {'key': 'properties.parameters', 'type': 'object'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(Artifact, self).__init__(location=location, tags=tags, **kwargs) - self.title = None - self.description = None - self.publisher = None - self.file_path = None - self.icon = None - self.target_os_type = None - self.parameters = None - self.created_date = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source.py deleted file mode 100644 index ba6cbfc20988..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ArtifactSource(Resource): - """Properties of an artifact source. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param display_name: The artifact source's display name. - :type display_name: str - :param uri: The artifact source's URI. - :type uri: str - :param source_type: The artifact source's type. Possible values include: - 'VsoGit', 'GitHub' - :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType - :param folder_path: The folder containing artifacts. - :type folder_path: str - :param arm_template_folder_path: The folder containing Azure Resource - Manager templates. - :type arm_template_folder_path: str - :param branch_ref: The artifact source's branch reference. - :type branch_ref: str - :param security_token: The security token to authenticate to the artifact - source. - :type security_token: str - :param status: Indicates if the artifact source is enabled (values: - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :ivar created_date: The artifact source's creation date. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, - 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, - 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, - 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, - 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArtifactSource, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.uri = kwargs.get('uri', None) - self.source_type = kwargs.get('source_type', None) - self.folder_path = kwargs.get('folder_path', None) - self.arm_template_folder_path = kwargs.get('arm_template_folder_path', None) - self.branch_ref = kwargs.get('branch_ref', None) - self.security_token = kwargs.get('security_token', None) - self.status = kwargs.get('status', None) - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment.py deleted file mode 100644 index 3c07b25eeb13..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class ArtifactSourceFragment(UpdateResource): - """Properties of an artifact source. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param display_name: The artifact source's display name. - :type display_name: str - :param uri: The artifact source's URI. - :type uri: str - :param source_type: The artifact source's type. Possible values include: - 'VsoGit', 'GitHub' - :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType - :param folder_path: The folder containing artifacts. - :type folder_path: str - :param arm_template_folder_path: The folder containing Azure Resource - Manager templates. - :type arm_template_folder_path: str - :param branch_ref: The artifact source's branch reference. - :type branch_ref: str - :param security_token: The security token to authenticate to the artifact - source. - :type security_token: str - :param status: Indicates if the artifact source is enabled (values: - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, - 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, - 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, - 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, - 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArtifactSourceFragment, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.uri = kwargs.get('uri', None) - self.source_type = kwargs.get('source_type', None) - self.folder_path = kwargs.get('folder_path', None) - self.arm_template_folder_path = kwargs.get('arm_template_folder_path', None) - self.branch_ref = kwargs.get('branch_ref', None) - self.security_token = kwargs.get('security_token', None) - self.status = kwargs.get('status', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment_py3.py deleted file mode 100644 index a243837b76d0..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class ArtifactSourceFragment(UpdateResource): - """Properties of an artifact source. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param display_name: The artifact source's display name. - :type display_name: str - :param uri: The artifact source's URI. - :type uri: str - :param source_type: The artifact source's type. Possible values include: - 'VsoGit', 'GitHub' - :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType - :param folder_path: The folder containing artifacts. - :type folder_path: str - :param arm_template_folder_path: The folder containing Azure Resource - Manager templates. - :type arm_template_folder_path: str - :param branch_ref: The artifact source's branch reference. - :type branch_ref: str - :param security_token: The security token to authenticate to the artifact - source. - :type security_token: str - :param status: Indicates if the artifact source is enabled (values: - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, - 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, - 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, - 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, - 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - } - - def __init__(self, *, tags=None, display_name: str=None, uri: str=None, source_type=None, folder_path: str=None, arm_template_folder_path: str=None, branch_ref: str=None, security_token: str=None, status=None, **kwargs) -> None: - super(ArtifactSourceFragment, self).__init__(tags=tags, **kwargs) - self.display_name = display_name - self.uri = uri - self.source_type = source_type - self.folder_path = folder_path - self.arm_template_folder_path = arm_template_folder_path - self.branch_ref = branch_ref - self.security_token = security_token - self.status = status diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_paged.py deleted file mode 100644 index d5990ee0e94f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ArtifactSourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`ArtifactSource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ArtifactSource]'} - } - - def __init__(self, *args, **kwargs): - - super(ArtifactSourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_py3.py deleted file mode 100644 index 53eeac5462f6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_py3.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ArtifactSource(Resource): - """Properties of an artifact source. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param display_name: The artifact source's display name. - :type display_name: str - :param uri: The artifact source's URI. - :type uri: str - :param source_type: The artifact source's type. Possible values include: - 'VsoGit', 'GitHub' - :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType - :param folder_path: The folder containing artifacts. - :type folder_path: str - :param arm_template_folder_path: The folder containing Azure Resource - Manager templates. - :type arm_template_folder_path: str - :param branch_ref: The artifact source's branch reference. - :type branch_ref: str - :param security_token: The security token to authenticate to the artifact - source. - :type security_token: str - :param status: Indicates if the artifact source is enabled (values: - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :ivar created_date: The artifact source's creation date. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, - 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, - 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, - 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, - 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, display_name: str=None, uri: str=None, source_type=None, folder_path: str=None, arm_template_folder_path: str=None, branch_ref: str=None, security_token: str=None, status=None, **kwargs) -> None: - super(ArtifactSource, self).__init__(location=location, tags=tags, **kwargs) - self.display_name = display_name - self.uri = uri - self.source_type = source_type - self.folder_path = folder_path - self.arm_template_folder_path = arm_template_folder_path - self.branch_ref = branch_ref - self.security_token = security_token - self.status = status - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties.py deleted file mode 100644 index 1935925ef669..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachDiskProperties(Model): - """Properties of the disk to attach. - - :param leased_by_lab_vm_id: The resource ID of the Lab virtual machine to - which the disk is attached. - :type leased_by_lab_vm_id: str - """ - - _attribute_map = { - 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AttachDiskProperties, self).__init__(**kwargs) - self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties_py3.py deleted file mode 100644 index 6cf94213e53e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachDiskProperties(Model): - """Properties of the disk to attach. - - :param leased_by_lab_vm_id: The resource ID of the Lab virtual machine to - which the disk is attached. - :type leased_by_lab_vm_id: str - """ - - _attribute_map = { - 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, - } - - def __init__(self, *, leased_by_lab_vm_id: str=None, **kwargs) -> None: - super(AttachDiskProperties, self).__init__(**kwargs) - self.leased_by_lab_vm_id = leased_by_lab_vm_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options.py deleted file mode 100644 index c4c18be9b277..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachNewDataDiskOptions(Model): - """Properties to attach new disk to the Virtual Machine. - - :param disk_size_gi_b: Size of the disk to be attached in Gibibytes. - :type disk_size_gi_b: int - :param disk_name: The name of the disk to be attached. - :type disk_name: str - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - 'disk_name': {'key': 'diskName', 'type': 'str'}, - 'disk_type': {'key': 'diskType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AttachNewDataDiskOptions, self).__init__(**kwargs) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) - self.disk_name = kwargs.get('disk_name', None) - self.disk_type = kwargs.get('disk_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment.py deleted file mode 100644 index 4ab7695dd872..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachNewDataDiskOptionsFragment(Model): - """Properties to attach new disk to the Virtual Machine. - - :param disk_size_gi_b: Size of the disk to be attached in Gibibytes. - :type disk_size_gi_b: int - :param disk_name: The name of the disk to be attached. - :type disk_name: str - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - 'disk_name': {'key': 'diskName', 'type': 'str'}, - 'disk_type': {'key': 'diskType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AttachNewDataDiskOptionsFragment, self).__init__(**kwargs) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) - self.disk_name = kwargs.get('disk_name', None) - self.disk_type = kwargs.get('disk_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment_py3.py deleted file mode 100644 index ec8d6863f811..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachNewDataDiskOptionsFragment(Model): - """Properties to attach new disk to the Virtual Machine. - - :param disk_size_gi_b: Size of the disk to be attached in Gibibytes. - :type disk_size_gi_b: int - :param disk_name: The name of the disk to be attached. - :type disk_name: str - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - 'disk_name': {'key': 'diskName', 'type': 'str'}, - 'disk_type': {'key': 'diskType', 'type': 'str'}, - } - - def __init__(self, *, disk_size_gi_b: int=None, disk_name: str=None, disk_type=None, **kwargs) -> None: - super(AttachNewDataDiskOptionsFragment, self).__init__(**kwargs) - self.disk_size_gi_b = disk_size_gi_b - self.disk_name = disk_name - self.disk_type = disk_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_py3.py deleted file mode 100644 index a03bb685e96c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AttachNewDataDiskOptions(Model): - """Properties to attach new disk to the Virtual Machine. - - :param disk_size_gi_b: Size of the disk to be attached in Gibibytes. - :type disk_size_gi_b: int - :param disk_name: The name of the disk to be attached. - :type disk_name: str - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - 'disk_name': {'key': 'diskName', 'type': 'str'}, - 'disk_type': {'key': 'diskType', 'type': 'str'}, - } - - def __init__(self, *, disk_size_gi_b: int=None, disk_name: str=None, disk_type=None, **kwargs) -> None: - super(AttachNewDataDiskOptions, self).__init__(**kwargs) - self.disk_size_gi_b = disk_size_gi_b - self.disk_name = disk_name - self.disk_type = disk_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters.py deleted file mode 100644 index f54138ff7a98..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BulkCreationParameters(Model): - """Parameters for creating multiple virtual machines as a single action. - - :param instance_count: The number of virtual machine instances to create. - :type instance_count: int - """ - - _attribute_map = { - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(BulkCreationParameters, self).__init__(**kwargs) - self.instance_count = kwargs.get('instance_count', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment.py deleted file mode 100644 index 1f03bf7aeffd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BulkCreationParametersFragment(Model): - """Parameters for creating multiple virtual machines as a single action. - - :param instance_count: The number of virtual machine instances to create. - :type instance_count: int - """ - - _attribute_map = { - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(BulkCreationParametersFragment, self).__init__(**kwargs) - self.instance_count = kwargs.get('instance_count', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment_py3.py deleted file mode 100644 index 3d78014f88c5..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BulkCreationParametersFragment(Model): - """Parameters for creating multiple virtual machines as a single action. - - :param instance_count: The number of virtual machine instances to create. - :type instance_count: int - """ - - _attribute_map = { - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - } - - def __init__(self, *, instance_count: int=None, **kwargs) -> None: - super(BulkCreationParametersFragment, self).__init__(**kwargs) - self.instance_count = instance_count diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_py3.py deleted file mode 100644 index c17ac0c6da94..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BulkCreationParameters(Model): - """Parameters for creating multiple virtual machines as a single action. - - :param instance_count: The number of virtual machine instances to create. - :type instance_count: int - """ - - _attribute_map = { - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - } - - def __init__(self, *, instance_count: int=None, **kwargs) -> None: - super(BulkCreationParameters, self).__init__(**kwargs) - self.instance_count = instance_count diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk.py deleted file mode 100644 index 36637b964ecc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeDataDisk(Model): - """A data disks attached to a virtual machine. - - :param name: Gets data disk name. - :type name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :param disk_size_gi_b: Gets data disk size in GiB. - :type disk_size_gi_b: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'disk_uri': {'key': 'diskUri', 'type': 'str'}, - 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ComputeDataDisk, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.disk_uri = kwargs.get('disk_uri', None) - self.managed_disk_id = kwargs.get('managed_disk_id', None) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment.py deleted file mode 100644 index 5dc673a52f22..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeDataDiskFragment(Model): - """A data disks attached to a virtual machine. - - :param name: Gets data disk name. - :type name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :param disk_size_gi_b: Gets data disk size in GiB. - :type disk_size_gi_b: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'disk_uri': {'key': 'diskUri', 'type': 'str'}, - 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ComputeDataDiskFragment, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.disk_uri = kwargs.get('disk_uri', None) - self.managed_disk_id = kwargs.get('managed_disk_id', None) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment_py3.py deleted file mode 100644 index 22fcaa4b3ad8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeDataDiskFragment(Model): - """A data disks attached to a virtual machine. - - :param name: Gets data disk name. - :type name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :param disk_size_gi_b: Gets data disk size in GiB. - :type disk_size_gi_b: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'disk_uri': {'key': 'diskUri', 'type': 'str'}, - 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - } - - def __init__(self, *, name: str=None, disk_uri: str=None, managed_disk_id: str=None, disk_size_gi_b: int=None, **kwargs) -> None: - super(ComputeDataDiskFragment, self).__init__(**kwargs) - self.name = name - self.disk_uri = disk_uri - self.managed_disk_id = managed_disk_id - self.disk_size_gi_b = disk_size_gi_b diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_py3.py deleted file mode 100644 index c88f007a5c0d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeDataDisk(Model): - """A data disks attached to a virtual machine. - - :param name: Gets data disk name. - :type name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :param disk_size_gi_b: Gets data disk size in GiB. - :type disk_size_gi_b: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'disk_uri': {'key': 'diskUri', 'type': 'str'}, - 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, - } - - def __init__(self, *, name: str=None, disk_uri: str=None, managed_disk_id: str=None, disk_size_gi_b: int=None, **kwargs) -> None: - super(ComputeDataDisk, self).__init__(**kwargs) - self.name = name - self.disk_uri = disk_uri - self.managed_disk_id = managed_disk_id - self.disk_size_gi_b = disk_size_gi_b diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status.py deleted file mode 100644 index 896d9562e61d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmInstanceViewStatus(Model): - """Status information about a virtual machine. - - :param code: Gets the status Code. - :type code: str - :param display_status: Gets the short localizable label for the status. - :type display_status: str - :param message: Gets the message associated with the status. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ComputeVmInstanceViewStatus, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.display_status = kwargs.get('display_status', None) - self.message = kwargs.get('message', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment.py deleted file mode 100644 index 2b403562e4df..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmInstanceViewStatusFragment(Model): - """Status information about a virtual machine. - - :param code: Gets the status Code. - :type code: str - :param display_status: Gets the short localizable label for the status. - :type display_status: str - :param message: Gets the message associated with the status. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ComputeVmInstanceViewStatusFragment, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.display_status = kwargs.get('display_status', None) - self.message = kwargs.get('message', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment_py3.py deleted file mode 100644 index 81b1bd388f89..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmInstanceViewStatusFragment(Model): - """Status information about a virtual machine. - - :param code: Gets the status Code. - :type code: str - :param display_status: Gets the short localizable label for the status. - :type display_status: str - :param message: Gets the message associated with the status. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, display_status: str=None, message: str=None, **kwargs) -> None: - super(ComputeVmInstanceViewStatusFragment, self).__init__(**kwargs) - self.code = code - self.display_status = display_status - self.message = message diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_py3.py deleted file mode 100644 index 75fca83157a1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmInstanceViewStatus(Model): - """Status information about a virtual machine. - - :param code: Gets the status Code. - :type code: str - :param display_status: Gets the short localizable label for the status. - :type display_status: str - :param message: Gets the message associated with the status. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'display_status': {'key': 'displayStatus', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, display_status: str=None, message: str=None, **kwargs) -> None: - super(ComputeVmInstanceViewStatus, self).__init__(**kwargs) - self.code = code - self.display_status = display_status - self.message = message diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties.py deleted file mode 100644 index e4b785b9c47a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmProperties(Model): - """Properties of a virtual machine returned by the Microsoft.Compute API. - - :param statuses: Gets the statuses of the virtual machine. - :type statuses: - list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatus] - :param os_type: Gets the OS type of the virtual machine. - :type os_type: str - :param vm_size: Gets the size of the virtual machine. - :type vm_size: str - :param network_interface_id: Gets the network interface ID of the virtual - machine. - :type network_interface_id: str - :param os_disk_id: Gets OS disk blob uri for the virtual machine. - :type os_disk_id: str - :param data_disk_ids: Gets data disks blob uri for the virtual machine. - :type data_disk_ids: list[str] - :param data_disks: Gets all data disks attached to the virtual machine. - :type data_disks: list[~azure.mgmt.devtestlabs.models.ComputeDataDisk] - """ - - _attribute_map = { - 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatus]'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, - 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, - 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDisk]'}, - } - - def __init__(self, **kwargs): - super(ComputeVmProperties, self).__init__(**kwargs) - self.statuses = kwargs.get('statuses', None) - self.os_type = kwargs.get('os_type', None) - self.vm_size = kwargs.get('vm_size', None) - self.network_interface_id = kwargs.get('network_interface_id', None) - self.os_disk_id = kwargs.get('os_disk_id', None) - self.data_disk_ids = kwargs.get('data_disk_ids', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment.py deleted file mode 100644 index c6295526ebd6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmPropertiesFragment(Model): - """Properties of a virtual machine returned by the Microsoft.Compute API. - - :param statuses: Gets the statuses of the virtual machine. - :type statuses: - list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatusFragment] - :param os_type: Gets the OS type of the virtual machine. - :type os_type: str - :param vm_size: Gets the size of the virtual machine. - :type vm_size: str - :param network_interface_id: Gets the network interface ID of the virtual - machine. - :type network_interface_id: str - :param os_disk_id: Gets OS disk blob uri for the virtual machine. - :type os_disk_id: str - :param data_disk_ids: Gets data disks blob uri for the virtual machine. - :type data_disk_ids: list[str] - :param data_disks: Gets all data disks attached to the virtual machine. - :type data_disks: - list[~azure.mgmt.devtestlabs.models.ComputeDataDiskFragment] - """ - - _attribute_map = { - 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatusFragment]'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, - 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, - 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDiskFragment]'}, - } - - def __init__(self, **kwargs): - super(ComputeVmPropertiesFragment, self).__init__(**kwargs) - self.statuses = kwargs.get('statuses', None) - self.os_type = kwargs.get('os_type', None) - self.vm_size = kwargs.get('vm_size', None) - self.network_interface_id = kwargs.get('network_interface_id', None) - self.os_disk_id = kwargs.get('os_disk_id', None) - self.data_disk_ids = kwargs.get('data_disk_ids', None) - self.data_disks = kwargs.get('data_disks', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment_py3.py deleted file mode 100644 index 7668ed7983c1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmPropertiesFragment(Model): - """Properties of a virtual machine returned by the Microsoft.Compute API. - - :param statuses: Gets the statuses of the virtual machine. - :type statuses: - list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatusFragment] - :param os_type: Gets the OS type of the virtual machine. - :type os_type: str - :param vm_size: Gets the size of the virtual machine. - :type vm_size: str - :param network_interface_id: Gets the network interface ID of the virtual - machine. - :type network_interface_id: str - :param os_disk_id: Gets OS disk blob uri for the virtual machine. - :type os_disk_id: str - :param data_disk_ids: Gets data disks blob uri for the virtual machine. - :type data_disk_ids: list[str] - :param data_disks: Gets all data disks attached to the virtual machine. - :type data_disks: - list[~azure.mgmt.devtestlabs.models.ComputeDataDiskFragment] - """ - - _attribute_map = { - 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatusFragment]'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, - 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, - 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDiskFragment]'}, - } - - def __init__(self, *, statuses=None, os_type: str=None, vm_size: str=None, network_interface_id: str=None, os_disk_id: str=None, data_disk_ids=None, data_disks=None, **kwargs) -> None: - super(ComputeVmPropertiesFragment, self).__init__(**kwargs) - self.statuses = statuses - self.os_type = os_type - self.vm_size = vm_size - self.network_interface_id = network_interface_id - self.os_disk_id = os_disk_id - self.data_disk_ids = data_disk_ids - self.data_disks = data_disks diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_py3.py deleted file mode 100644 index 90c4ae4e246a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComputeVmProperties(Model): - """Properties of a virtual machine returned by the Microsoft.Compute API. - - :param statuses: Gets the statuses of the virtual machine. - :type statuses: - list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatus] - :param os_type: Gets the OS type of the virtual machine. - :type os_type: str - :param vm_size: Gets the size of the virtual machine. - :type vm_size: str - :param network_interface_id: Gets the network interface ID of the virtual - machine. - :type network_interface_id: str - :param os_disk_id: Gets OS disk blob uri for the virtual machine. - :type os_disk_id: str - :param data_disk_ids: Gets data disks blob uri for the virtual machine. - :type data_disk_ids: list[str] - :param data_disks: Gets all data disks attached to the virtual machine. - :type data_disks: list[~azure.mgmt.devtestlabs.models.ComputeDataDisk] - """ - - _attribute_map = { - 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatus]'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, - 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, - 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDisk]'}, - } - - def __init__(self, *, statuses=None, os_type: str=None, vm_size: str=None, network_interface_id: str=None, os_disk_id: str=None, data_disk_ids=None, data_disks=None, **kwargs) -> None: - super(ComputeVmProperties, self).__init__(**kwargs) - self.statuses = statuses - self.os_type = os_type - self.vm_size = vm_size - self.network_interface_id = network_interface_id - self.os_disk_id = os_disk_id - self.data_disk_ids = data_disk_ids - self.data_disks = data_disks diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties.py deleted file mode 100644 index 73269a4dd25d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CostThresholdProperties(Model): - """Properties of a cost threshold item. - - :param threshold_id: The ID of the cost threshold item. - :type threshold_id: str - :param percentage_threshold: The value of the percentage cost threshold. - :type percentage_threshold: - ~azure.mgmt.devtestlabs.models.PercentageCostThresholdProperties - :param display_on_chart: Indicates whether this threshold will be - displayed on cost charts. Possible values include: 'Enabled', 'Disabled' - :type display_on_chart: str or - ~azure.mgmt.devtestlabs.models.CostThresholdStatus - :param send_notification_when_exceeded: Indicates whether notifications - will be sent when this threshold is exceeded. Possible values include: - 'Enabled', 'Disabled' - :type send_notification_when_exceeded: str or - ~azure.mgmt.devtestlabs.models.CostThresholdStatus - :param notification_sent: Indicates the datetime when notifications were - last sent for this threshold. - :type notification_sent: str - """ - - _attribute_map = { - 'threshold_id': {'key': 'thresholdId', 'type': 'str'}, - 'percentage_threshold': {'key': 'percentageThreshold', 'type': 'PercentageCostThresholdProperties'}, - 'display_on_chart': {'key': 'displayOnChart', 'type': 'str'}, - 'send_notification_when_exceeded': {'key': 'sendNotificationWhenExceeded', 'type': 'str'}, - 'notification_sent': {'key': 'notificationSent', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CostThresholdProperties, self).__init__(**kwargs) - self.threshold_id = kwargs.get('threshold_id', None) - self.percentage_threshold = kwargs.get('percentage_threshold', None) - self.display_on_chart = kwargs.get('display_on_chart', None) - self.send_notification_when_exceeded = kwargs.get('send_notification_when_exceeded', None) - self.notification_sent = kwargs.get('notification_sent', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties_py3.py deleted file mode 100644 index fba335d6c3e5..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CostThresholdProperties(Model): - """Properties of a cost threshold item. - - :param threshold_id: The ID of the cost threshold item. - :type threshold_id: str - :param percentage_threshold: The value of the percentage cost threshold. - :type percentage_threshold: - ~azure.mgmt.devtestlabs.models.PercentageCostThresholdProperties - :param display_on_chart: Indicates whether this threshold will be - displayed on cost charts. Possible values include: 'Enabled', 'Disabled' - :type display_on_chart: str or - ~azure.mgmt.devtestlabs.models.CostThresholdStatus - :param send_notification_when_exceeded: Indicates whether notifications - will be sent when this threshold is exceeded. Possible values include: - 'Enabled', 'Disabled' - :type send_notification_when_exceeded: str or - ~azure.mgmt.devtestlabs.models.CostThresholdStatus - :param notification_sent: Indicates the datetime when notifications were - last sent for this threshold. - :type notification_sent: str - """ - - _attribute_map = { - 'threshold_id': {'key': 'thresholdId', 'type': 'str'}, - 'percentage_threshold': {'key': 'percentageThreshold', 'type': 'PercentageCostThresholdProperties'}, - 'display_on_chart': {'key': 'displayOnChart', 'type': 'str'}, - 'send_notification_when_exceeded': {'key': 'sendNotificationWhenExceeded', 'type': 'str'}, - 'notification_sent': {'key': 'notificationSent', 'type': 'str'}, - } - - def __init__(self, *, threshold_id: str=None, percentage_threshold=None, display_on_chart=None, send_notification_when_exceeded=None, notification_sent: str=None, **kwargs) -> None: - super(CostThresholdProperties, self).__init__(**kwargs) - self.threshold_id = threshold_id - self.percentage_threshold = percentage_threshold - self.display_on_chart = display_on_chart - self.send_notification_when_exceeded = send_notification_when_exceeded - self.notification_sent = notification_sent diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image.py deleted file mode 100644 index 136ee0481ee1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class CustomImage(Resource): - """A custom image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param vm: The virtual machine from which the image is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVm - :param vhd: The VHD from which the image is to be created. - :type vhd: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustom - :param description: The description of the custom image. - :type description: str - :param author: The author of the custom image. - :type author: str - :ivar creation_date: The creation date of the custom image. - :vartype creation_date: datetime - :param managed_image_id: The Managed Image Id backing the custom image. - :type managed_image_id: str - :param managed_snapshot_id: The Managed Snapshot Id backing the custom - image. - :type managed_snapshot_id: str - :param data_disk_storage_info: Storage information about the data disks - present in the custom image - :type data_disk_storage_info: - list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfo] - :param custom_image_plan: Storage information about the plan related to - this custom image - :type custom_image_plan: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlan - :param is_plan_authorized: Whether or not the custom images underlying - offer/plan has been enabled for programmatic deployment - :type is_plan_authorized: bool - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVm'}, - 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustom'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, - 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, - 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfo]'}, - 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlan'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CustomImage, self).__init__(**kwargs) - self.vm = kwargs.get('vm', None) - self.vhd = kwargs.get('vhd', None) - self.description = kwargs.get('description', None) - self.author = kwargs.get('author', None) - self.creation_date = None - self.managed_image_id = kwargs.get('managed_image_id', None) - self.managed_snapshot_id = kwargs.get('managed_snapshot_id', None) - self.data_disk_storage_info = kwargs.get('data_disk_storage_info', None) - self.custom_image_plan = kwargs.get('custom_image_plan', None) - self.is_plan_authorized = kwargs.get('is_plan_authorized', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment.py deleted file mode 100644 index 5ac36c53a6cd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class CustomImageFragment(UpdateResource): - """A custom image. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param vm: The virtual machine from which the image is to be created. - :type vm: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVmFragment - :param vhd: The VHD from which the image is to be created. - :type vhd: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustomFragment - :param description: The description of the custom image. - :type description: str - :param author: The author of the custom image. - :type author: str - :param managed_image_id: The Managed Image Id backing the custom image. - :type managed_image_id: str - :param managed_snapshot_id: The Managed Snapshot Id backing the custom - image. - :type managed_snapshot_id: str - :param data_disk_storage_info: Storage information about the data disks - present in the custom image - :type data_disk_storage_info: - list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfoFragment] - :param custom_image_plan: Storage information about the plan related to - this custom image - :type custom_image_plan: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlanFragment - :param is_plan_authorized: Whether or not the custom images underlying - offer/plan has been enabled for programmatic deployment - :type is_plan_authorized: bool - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVmFragment'}, - 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustomFragment'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, - 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, - 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfoFragment]'}, - 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlanFragment'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(CustomImageFragment, self).__init__(**kwargs) - self.vm = kwargs.get('vm', None) - self.vhd = kwargs.get('vhd', None) - self.description = kwargs.get('description', None) - self.author = kwargs.get('author', None) - self.managed_image_id = kwargs.get('managed_image_id', None) - self.managed_snapshot_id = kwargs.get('managed_snapshot_id', None) - self.data_disk_storage_info = kwargs.get('data_disk_storage_info', None) - self.custom_image_plan = kwargs.get('custom_image_plan', None) - self.is_plan_authorized = kwargs.get('is_plan_authorized', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment_py3.py deleted file mode 100644 index a3ccac2274eb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class CustomImageFragment(UpdateResource): - """A custom image. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param vm: The virtual machine from which the image is to be created. - :type vm: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVmFragment - :param vhd: The VHD from which the image is to be created. - :type vhd: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustomFragment - :param description: The description of the custom image. - :type description: str - :param author: The author of the custom image. - :type author: str - :param managed_image_id: The Managed Image Id backing the custom image. - :type managed_image_id: str - :param managed_snapshot_id: The Managed Snapshot Id backing the custom - image. - :type managed_snapshot_id: str - :param data_disk_storage_info: Storage information about the data disks - present in the custom image - :type data_disk_storage_info: - list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfoFragment] - :param custom_image_plan: Storage information about the plan related to - this custom image - :type custom_image_plan: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlanFragment - :param is_plan_authorized: Whether or not the custom images underlying - offer/plan has been enabled for programmatic deployment - :type is_plan_authorized: bool - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVmFragment'}, - 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustomFragment'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, - 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, - 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfoFragment]'}, - 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlanFragment'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - } - - def __init__(self, *, tags=None, vm=None, vhd=None, description: str=None, author: str=None, managed_image_id: str=None, managed_snapshot_id: str=None, data_disk_storage_info=None, custom_image_plan=None, is_plan_authorized: bool=None, **kwargs) -> None: - super(CustomImageFragment, self).__init__(tags=tags, **kwargs) - self.vm = vm - self.vhd = vhd - self.description = description - self.author = author - self.managed_image_id = managed_image_id - self.managed_snapshot_id = managed_snapshot_id - self.data_disk_storage_info = data_disk_storage_info - self.custom_image_plan = custom_image_plan - self.is_plan_authorized = is_plan_authorized diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_paged.py deleted file mode 100644 index d0e4b61d4560..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class CustomImagePaged(Paged): - """ - A paging container for iterating over a list of :class:`CustomImage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CustomImage]'} - } - - def __init__(self, *args, **kwargs): - - super(CustomImagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom.py deleted file mode 100644 index a1bd5ab66712..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesCustom(Model): - """Properties for creating a custom image from a VHD. - - All required parameters must be populated in order to send to Azure. - - :param image_name: The image name. - :type image_name: str - :param sys_prep: Indicates whether sysprep has been run on the VHD. - :type sys_prep: bool - :param os_type: Required. The OS type of the custom image (i.e. Windows, - Linux). Possible values include: 'Windows', 'Linux', 'None' - :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType - """ - - _validation = { - 'os_type': {'required': True}, - } - - _attribute_map = { - 'image_name': {'key': 'imageName', 'type': 'str'}, - 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesCustom, self).__init__(**kwargs) - self.image_name = kwargs.get('image_name', None) - self.sys_prep = kwargs.get('sys_prep', None) - self.os_type = kwargs.get('os_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment.py deleted file mode 100644 index 4fc581738e57..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesCustomFragment(Model): - """Properties for creating a custom image from a VHD. - - :param image_name: The image name. - :type image_name: str - :param sys_prep: Indicates whether sysprep has been run on the VHD. - :type sys_prep: bool - :param os_type: The OS type of the custom image (i.e. Windows, Linux). - Possible values include: 'Windows', 'Linux', 'None' - :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType - """ - - _attribute_map = { - 'image_name': {'key': 'imageName', 'type': 'str'}, - 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesCustomFragment, self).__init__(**kwargs) - self.image_name = kwargs.get('image_name', None) - self.sys_prep = kwargs.get('sys_prep', None) - self.os_type = kwargs.get('os_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment_py3.py deleted file mode 100644 index 3869682ca53d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesCustomFragment(Model): - """Properties for creating a custom image from a VHD. - - :param image_name: The image name. - :type image_name: str - :param sys_prep: Indicates whether sysprep has been run on the VHD. - :type sys_prep: bool - :param os_type: The OS type of the custom image (i.e. Windows, Linux). - Possible values include: 'Windows', 'Linux', 'None' - :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType - """ - - _attribute_map = { - 'image_name': {'key': 'imageName', 'type': 'str'}, - 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, *, image_name: str=None, sys_prep: bool=None, os_type=None, **kwargs) -> None: - super(CustomImagePropertiesCustomFragment, self).__init__(**kwargs) - self.image_name = image_name - self.sys_prep = sys_prep - self.os_type = os_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_py3.py deleted file mode 100644 index 5aede6b5507c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesCustom(Model): - """Properties for creating a custom image from a VHD. - - All required parameters must be populated in order to send to Azure. - - :param image_name: The image name. - :type image_name: str - :param sys_prep: Indicates whether sysprep has been run on the VHD. - :type sys_prep: bool - :param os_type: Required. The OS type of the custom image (i.e. Windows, - Linux). Possible values include: 'Windows', 'Linux', 'None' - :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType - """ - - _validation = { - 'os_type': {'required': True}, - } - - _attribute_map = { - 'image_name': {'key': 'imageName', 'type': 'str'}, - 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, *, os_type, image_name: str=None, sys_prep: bool=None, **kwargs) -> None: - super(CustomImagePropertiesCustom, self).__init__(**kwargs) - self.image_name = image_name - self.sys_prep = sys_prep - self.os_type = os_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan.py deleted file mode 100644 index 37067a750936..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromPlan(Model): - """Properties for plan on a custom image. - - :param id: The id of the plan, equivalent to name of the plan - :type id: str - :param publisher: The publisher for the plan from the marketplace image - the custom image is derived from - :type publisher: str - :param offer: The offer for the plan from the marketplace image the custom - image is derived from - :type offer: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesFromPlan, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.publisher = kwargs.get('publisher', None) - self.offer = kwargs.get('offer', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment.py deleted file mode 100644 index b8db62a3738f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromPlanFragment(Model): - """Properties for plan on a custom image. - - :param id: The id of the plan, equivalent to name of the plan - :type id: str - :param publisher: The publisher for the plan from the marketplace image - the custom image is derived from - :type publisher: str - :param offer: The offer for the plan from the marketplace image the custom - image is derived from - :type offer: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesFromPlanFragment, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.publisher = kwargs.get('publisher', None) - self.offer = kwargs.get('offer', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment_py3.py deleted file mode 100644 index 159740e13c32..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromPlanFragment(Model): - """Properties for plan on a custom image. - - :param id: The id of the plan, equivalent to name of the plan - :type id: str - :param publisher: The publisher for the plan from the marketplace image - the custom image is derived from - :type publisher: str - :param offer: The offer for the plan from the marketplace image the custom - image is derived from - :type offer: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, **kwargs) -> None: - super(CustomImagePropertiesFromPlanFragment, self).__init__(**kwargs) - self.id = id - self.publisher = publisher - self.offer = offer diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_py3.py deleted file mode 100644 index fcbfeea22012..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromPlan(Model): - """Properties for plan on a custom image. - - :param id: The id of the plan, equivalent to name of the plan - :type id: str - :param publisher: The publisher for the plan from the marketplace image - the custom image is derived from - :type publisher: str - :param offer: The offer for the plan from the marketplace image the custom - image is derived from - :type offer: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, **kwargs) -> None: - super(CustomImagePropertiesFromPlan, self).__init__(**kwargs) - self.id = id - self.publisher = publisher - self.offer = offer diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm.py deleted file mode 100644 index d08828df0def..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromVm(Model): - """Properties for creating a custom image from a virtual machine. - - :param source_vm_id: The source vm identifier. - :type source_vm_id: str - :param windows_os_info: The Windows OS information of the VM. - :type windows_os_info: ~azure.mgmt.devtestlabs.models.WindowsOsInfo - :param linux_os_info: The Linux OS information of the VM. - :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfo - """ - - _attribute_map = { - 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, - 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfo'}, - 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfo'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesFromVm, self).__init__(**kwargs) - self.source_vm_id = kwargs.get('source_vm_id', None) - self.windows_os_info = kwargs.get('windows_os_info', None) - self.linux_os_info = kwargs.get('linux_os_info', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment.py deleted file mode 100644 index c0274dab51e7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromVmFragment(Model): - """Properties for creating a custom image from a virtual machine. - - :param source_vm_id: The source vm identifier. - :type source_vm_id: str - :param windows_os_info: The Windows OS information of the VM. - :type windows_os_info: - ~azure.mgmt.devtestlabs.models.WindowsOsInfoFragment - :param linux_os_info: The Linux OS information of the VM. - :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfoFragment - """ - - _attribute_map = { - 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, - 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfoFragment'}, - 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfoFragment'}, - } - - def __init__(self, **kwargs): - super(CustomImagePropertiesFromVmFragment, self).__init__(**kwargs) - self.source_vm_id = kwargs.get('source_vm_id', None) - self.windows_os_info = kwargs.get('windows_os_info', None) - self.linux_os_info = kwargs.get('linux_os_info', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment_py3.py deleted file mode 100644 index 437a4005cf1e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromVmFragment(Model): - """Properties for creating a custom image from a virtual machine. - - :param source_vm_id: The source vm identifier. - :type source_vm_id: str - :param windows_os_info: The Windows OS information of the VM. - :type windows_os_info: - ~azure.mgmt.devtestlabs.models.WindowsOsInfoFragment - :param linux_os_info: The Linux OS information of the VM. - :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfoFragment - """ - - _attribute_map = { - 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, - 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfoFragment'}, - 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfoFragment'}, - } - - def __init__(self, *, source_vm_id: str=None, windows_os_info=None, linux_os_info=None, **kwargs) -> None: - super(CustomImagePropertiesFromVmFragment, self).__init__(**kwargs) - self.source_vm_id = source_vm_id - self.windows_os_info = windows_os_info - self.linux_os_info = linux_os_info diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_py3.py deleted file mode 100644 index 02a54467b6a7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomImagePropertiesFromVm(Model): - """Properties for creating a custom image from a virtual machine. - - :param source_vm_id: The source vm identifier. - :type source_vm_id: str - :param windows_os_info: The Windows OS information of the VM. - :type windows_os_info: ~azure.mgmt.devtestlabs.models.WindowsOsInfo - :param linux_os_info: The Linux OS information of the VM. - :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfo - """ - - _attribute_map = { - 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, - 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfo'}, - 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfo'}, - } - - def __init__(self, *, source_vm_id: str=None, windows_os_info=None, linux_os_info=None, **kwargs) -> None: - super(CustomImagePropertiesFromVm, self).__init__(**kwargs) - self.source_vm_id = source_vm_id - self.windows_os_info = windows_os_info - self.linux_os_info = linux_os_info diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_py3.py deleted file mode 100644 index fd4736a3744b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_py3.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class CustomImage(Resource): - """A custom image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param vm: The virtual machine from which the image is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVm - :param vhd: The VHD from which the image is to be created. - :type vhd: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustom - :param description: The description of the custom image. - :type description: str - :param author: The author of the custom image. - :type author: str - :ivar creation_date: The creation date of the custom image. - :vartype creation_date: datetime - :param managed_image_id: The Managed Image Id backing the custom image. - :type managed_image_id: str - :param managed_snapshot_id: The Managed Snapshot Id backing the custom - image. - :type managed_snapshot_id: str - :param data_disk_storage_info: Storage information about the data disks - present in the custom image - :type data_disk_storage_info: - list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfo] - :param custom_image_plan: Storage information about the plan related to - this custom image - :type custom_image_plan: - ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlan - :param is_plan_authorized: Whether or not the custom images underlying - offer/plan has been enabled for programmatic deployment - :type is_plan_authorized: bool - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVm'}, - 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustom'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, - 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, - 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfo]'}, - 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlan'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, vm=None, vhd=None, description: str=None, author: str=None, managed_image_id: str=None, managed_snapshot_id: str=None, data_disk_storage_info=None, custom_image_plan=None, is_plan_authorized: bool=None, **kwargs) -> None: - super(CustomImage, self).__init__(location=location, tags=tags, **kwargs) - self.vm = vm - self.vhd = vhd - self.description = description - self.author = author - self.creation_date = None - self.managed_image_id = managed_image_id - self.managed_snapshot_id = managed_snapshot_id - self.data_disk_storage_info = data_disk_storage_info - self.custom_image_plan = custom_image_plan - self.is_plan_authorized = is_plan_authorized - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties.py deleted file mode 100644 index 7bbfad08d256..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskProperties(Model): - """Request body for adding a new or existing data disk to a virtual machine. - - :param attach_new_data_disk_options: Specifies options to attach a new - disk to the virtual machine. - :type attach_new_data_disk_options: - ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptions - :param existing_lab_disk_id: Specifies the existing lab disk id to attach - to virtual machine. - :type existing_lab_disk_id: str - :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, - ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type host_caching: str or - ~azure.mgmt.devtestlabs.models.HostCachingOptions - """ - - _attribute_map = { - 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptions'}, - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - 'host_caching': {'key': 'hostCaching', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataDiskProperties, self).__init__(**kwargs) - self.attach_new_data_disk_options = kwargs.get('attach_new_data_disk_options', None) - self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) - self.host_caching = kwargs.get('host_caching', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment.py deleted file mode 100644 index 71e152680e3f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskPropertiesFragment(Model): - """Request body for adding a new or existing data disk to a virtual machine. - - :param attach_new_data_disk_options: Specifies options to attach a new - disk to the virtual machine. - :type attach_new_data_disk_options: - ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptionsFragment - :param existing_lab_disk_id: Specifies the existing lab disk id to attach - to virtual machine. - :type existing_lab_disk_id: str - :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, - ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type host_caching: str or - ~azure.mgmt.devtestlabs.models.HostCachingOptions - """ - - _attribute_map = { - 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptionsFragment'}, - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - 'host_caching': {'key': 'hostCaching', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataDiskPropertiesFragment, self).__init__(**kwargs) - self.attach_new_data_disk_options = kwargs.get('attach_new_data_disk_options', None) - self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) - self.host_caching = kwargs.get('host_caching', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment_py3.py deleted file mode 100644 index d709d92d7113..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskPropertiesFragment(Model): - """Request body for adding a new or existing data disk to a virtual machine. - - :param attach_new_data_disk_options: Specifies options to attach a new - disk to the virtual machine. - :type attach_new_data_disk_options: - ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptionsFragment - :param existing_lab_disk_id: Specifies the existing lab disk id to attach - to virtual machine. - :type existing_lab_disk_id: str - :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, - ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type host_caching: str or - ~azure.mgmt.devtestlabs.models.HostCachingOptions - """ - - _attribute_map = { - 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptionsFragment'}, - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - 'host_caching': {'key': 'hostCaching', 'type': 'str'}, - } - - def __init__(self, *, attach_new_data_disk_options=None, existing_lab_disk_id: str=None, host_caching=None, **kwargs) -> None: - super(DataDiskPropertiesFragment, self).__init__(**kwargs) - self.attach_new_data_disk_options = attach_new_data_disk_options - self.existing_lab_disk_id = existing_lab_disk_id - self.host_caching = host_caching diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_py3.py deleted file mode 100644 index 9e654d16cd45..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskProperties(Model): - """Request body for adding a new or existing data disk to a virtual machine. - - :param attach_new_data_disk_options: Specifies options to attach a new - disk to the virtual machine. - :type attach_new_data_disk_options: - ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptions - :param existing_lab_disk_id: Specifies the existing lab disk id to attach - to virtual machine. - :type existing_lab_disk_id: str - :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, - ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' - :type host_caching: str or - ~azure.mgmt.devtestlabs.models.HostCachingOptions - """ - - _attribute_map = { - 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptions'}, - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - 'host_caching': {'key': 'hostCaching', 'type': 'str'}, - } - - def __init__(self, *, attach_new_data_disk_options=None, existing_lab_disk_id: str=None, host_caching=None, **kwargs) -> None: - super(DataDiskProperties, self).__init__(**kwargs) - self.attach_new_data_disk_options = attach_new_data_disk_options - self.existing_lab_disk_id = existing_lab_disk_id - self.host_caching = host_caching diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info.py deleted file mode 100644 index 68a97bf75845..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskStorageTypeInfo(Model): - """Storage information about the data disks present in the custom image. - - :param lun: Disk Lun - :type lun: str - :param storage_type: Disk Storage Type. Possible values include: - 'Standard', 'Premium' - :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'str'}, - 'storage_type': {'key': 'storageType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataDiskStorageTypeInfo, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) - self.storage_type = kwargs.get('storage_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment.py deleted file mode 100644 index 62b512b1f863..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskStorageTypeInfoFragment(Model): - """Storage information about the data disks present in the custom image. - - :param lun: Disk Lun - :type lun: str - :param storage_type: Disk Storage Type. Possible values include: - 'Standard', 'Premium' - :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'str'}, - 'storage_type': {'key': 'storageType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataDiskStorageTypeInfoFragment, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) - self.storage_type = kwargs.get('storage_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment_py3.py deleted file mode 100644 index 9a1c830a7dcb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskStorageTypeInfoFragment(Model): - """Storage information about the data disks present in the custom image. - - :param lun: Disk Lun - :type lun: str - :param storage_type: Disk Storage Type. Possible values include: - 'Standard', 'Premium' - :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'str'}, - 'storage_type': {'key': 'storageType', 'type': 'str'}, - } - - def __init__(self, *, lun: str=None, storage_type=None, **kwargs) -> None: - super(DataDiskStorageTypeInfoFragment, self).__init__(**kwargs) - self.lun = lun - self.storage_type = storage_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_py3.py deleted file mode 100644 index d817ca84fdd8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DataDiskStorageTypeInfo(Model): - """Storage information about the data disks present in the custom image. - - :param lun: Disk Lun - :type lun: str - :param storage_type: Disk Storage Type. Possible values include: - 'Standard', 'Premium' - :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - """ - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'str'}, - 'storage_type': {'key': 'storageType', 'type': 'str'}, - } - - def __init__(self, *, lun: str=None, storage_type=None, **kwargs) -> None: - super(DataDiskStorageTypeInfo, self).__init__(**kwargs) - self.lun = lun - self.storage_type = storage_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details.py deleted file mode 100644 index 7391a793dc1b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DayDetails(Model): - """Properties of a daily schedule. - - :param time: The time of day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DayDetails, self).__init__(**kwargs) - self.time = kwargs.get('time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment.py deleted file mode 100644 index b4f977d74fdf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DayDetailsFragment(Model): - """Properties of a daily schedule. - - :param time: The time of day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DayDetailsFragment, self).__init__(**kwargs) - self.time = kwargs.get('time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment_py3.py deleted file mode 100644 index 38c15b48bc89..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DayDetailsFragment(Model): - """Properties of a daily schedule. - - :param time: The time of day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, *, time: str=None, **kwargs) -> None: - super(DayDetailsFragment, self).__init__(**kwargs) - self.time = time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_py3.py deleted file mode 100644 index 593e341169d8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DayDetails(Model): - """Properties of a daily schedule. - - :param time: The time of day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, *, time: str=None, **kwargs) -> None: - super(DayDetails, self).__init__(**kwargs) - self.time = time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties.py deleted file mode 100644 index 9e66b91c3832..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DetachDataDiskProperties(Model): - """Request body for detaching data disk from a virtual machine. - - :param existing_lab_disk_id: Specifies the disk resource ID to detach from - virtual machine. - :type existing_lab_disk_id: str - """ - - _attribute_map = { - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DetachDataDiskProperties, self).__init__(**kwargs) - self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties_py3.py deleted file mode 100644 index ece9ea7842fb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DetachDataDiskProperties(Model): - """Request body for detaching data disk from a virtual machine. - - :param existing_lab_disk_id: Specifies the disk resource ID to detach from - virtual machine. - :type existing_lab_disk_id: str - """ - - _attribute_map = { - 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, - } - - def __init__(self, *, existing_lab_disk_id: str=None, **kwargs) -> None: - super(DetachDataDiskProperties, self).__init__(**kwargs) - self.existing_lab_disk_id = existing_lab_disk_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties.py deleted file mode 100644 index 2b781ad4f7ec..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DetachDiskProperties(Model): - """Properties of the disk to detach. - - :param leased_by_lab_vm_id: The resource ID of the Lab VM to which the - disk is attached. - :type leased_by_lab_vm_id: str - """ - - _attribute_map = { - 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DetachDiskProperties, self).__init__(**kwargs) - self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties_py3.py deleted file mode 100644 index bc02a7d21dc2..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DetachDiskProperties(Model): - """Properties of the disk to detach. - - :param leased_by_lab_vm_id: The resource ID of the Lab VM to which the - disk is attached. - :type leased_by_lab_vm_id: str - """ - - _attribute_map = { - 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, - } - - def __init__(self, *, leased_by_lab_vm_id: str=None, **kwargs) -> None: - super(DetachDiskProperties, self).__init__(**kwargs) - self.leased_by_lab_vm_id = leased_by_lab_vm_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk.py deleted file mode 100644 index e61a526ec3f7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Disk(Resource): - """A Disk. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param disk_size_gi_b: The size of the disk in Gibibytes. - :type disk_size_gi_b: int - :param leased_by_lab_vm_id: The resource ID of the VM to which this disk - is leased. - :type leased_by_lab_vm_id: str - :param disk_blob_name: When backed by a blob, the name of the VHD blob - without extension. - :type disk_blob_name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :ivar created_date: The creation date of the disk. - :vartype created_date: datetime - :param host_caching: The host caching policy of the disk (i.e. None, - ReadOnly, ReadWrite). - :type host_caching: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, - 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, - 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, - 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, - 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Disk, self).__init__(**kwargs) - self.disk_type = kwargs.get('disk_type', None) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) - self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) - self.disk_blob_name = kwargs.get('disk_blob_name', None) - self.disk_uri = kwargs.get('disk_uri', None) - self.created_date = None - self.host_caching = kwargs.get('host_caching', None) - self.managed_disk_id = kwargs.get('managed_disk_id', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment.py deleted file mode 100644 index fd351baa9716..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class DiskFragment(UpdateResource): - """A Disk. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param disk_size_gi_b: The size of the disk in Gibibytes. - :type disk_size_gi_b: int - :param leased_by_lab_vm_id: The resource ID of the VM to which this disk - is leased. - :type leased_by_lab_vm_id: str - :param disk_blob_name: When backed by a blob, the name of the VHD blob - without extension. - :type disk_blob_name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param host_caching: The host caching policy of the disk (i.e. None, - ReadOnly, ReadWrite). - :type host_caching: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, - 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, - 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, - 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, - 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, - 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DiskFragment, self).__init__(**kwargs) - self.disk_type = kwargs.get('disk_type', None) - self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) - self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) - self.disk_blob_name = kwargs.get('disk_blob_name', None) - self.disk_uri = kwargs.get('disk_uri', None) - self.host_caching = kwargs.get('host_caching', None) - self.managed_disk_id = kwargs.get('managed_disk_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment_py3.py deleted file mode 100644 index 6becee37891a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class DiskFragment(UpdateResource): - """A Disk. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param disk_size_gi_b: The size of the disk in Gibibytes. - :type disk_size_gi_b: int - :param leased_by_lab_vm_id: The resource ID of the VM to which this disk - is leased. - :type leased_by_lab_vm_id: str - :param disk_blob_name: When backed by a blob, the name of the VHD blob - without extension. - :type disk_blob_name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :param host_caching: The host caching policy of the disk (i.e. None, - ReadOnly, ReadWrite). - :type host_caching: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, - 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, - 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, - 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, - 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, - 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, - } - - def __init__(self, *, tags=None, disk_type=None, disk_size_gi_b: int=None, leased_by_lab_vm_id: str=None, disk_blob_name: str=None, disk_uri: str=None, host_caching: str=None, managed_disk_id: str=None, **kwargs) -> None: - super(DiskFragment, self).__init__(tags=tags, **kwargs) - self.disk_type = disk_type - self.disk_size_gi_b = disk_size_gi_b - self.leased_by_lab_vm_id = leased_by_lab_vm_id - self.disk_blob_name = disk_blob_name - self.disk_uri = disk_uri - self.host_caching = host_caching - self.managed_disk_id = managed_disk_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_paged.py deleted file mode 100644 index 18396d66590a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DiskPaged(Paged): - """ - A paging container for iterating over a list of :class:`Disk ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Disk]'} - } - - def __init__(self, *args, **kwargs): - - super(DiskPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_py3.py deleted file mode 100644 index 5263a0668bcf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Disk(Resource): - """A Disk. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param disk_type: The storage type for the disk (i.e. Standard, Premium). - Possible values include: 'Standard', 'Premium' - :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param disk_size_gi_b: The size of the disk in Gibibytes. - :type disk_size_gi_b: int - :param leased_by_lab_vm_id: The resource ID of the VM to which this disk - is leased. - :type leased_by_lab_vm_id: str - :param disk_blob_name: When backed by a blob, the name of the VHD blob - without extension. - :type disk_blob_name: str - :param disk_uri: When backed by a blob, the URI of underlying blob. - :type disk_uri: str - :ivar created_date: The creation date of the disk. - :vartype created_date: datetime - :param host_caching: The host caching policy of the disk (i.e. None, - ReadOnly, ReadWrite). - :type host_caching: str - :param managed_disk_id: When backed by managed disk, this is the ID of the - compute disk resource. - :type managed_disk_id: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, - 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, - 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, - 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, - 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, - 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, disk_type=None, disk_size_gi_b: int=None, leased_by_lab_vm_id: str=None, disk_blob_name: str=None, disk_uri: str=None, host_caching: str=None, managed_disk_id: str=None, **kwargs) -> None: - super(Disk, self).__init__(location=location, tags=tags, **kwargs) - self.disk_type = disk_type - self.disk_size_gi_b = disk_size_gi_b - self.leased_by_lab_vm_id = leased_by_lab_vm_id - self.disk_blob_name = disk_blob_name - self.disk_uri = disk_uri - self.created_date = None - self.host_caching = host_caching - self.managed_disk_id = managed_disk_id - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment.py deleted file mode 100644 index 47f7a67992f7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DtlEnvironment(Resource): - """An environment, which is essentially an ARM template deployment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param deployment_properties: The deployment properties of the - environment. - :type deployment_properties: - ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentProperties - :param arm_template_display_name: The display name of the Azure Resource - Manager template that produced the environment. - :type arm_template_display_name: str - :ivar resource_group_id: The identifier of the resource group containing - the environment's resources. - :vartype resource_group_id: str - :ivar created_by_user: The creator of the environment. - :vartype created_by_user: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource_group_id': {'readonly': True}, - 'created_by_user': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentProperties'}, - 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, - 'resource_group_id': {'key': 'properties.resourceGroupId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DtlEnvironment, self).__init__(**kwargs) - self.deployment_properties = kwargs.get('deployment_properties', None) - self.arm_template_display_name = kwargs.get('arm_template_display_name', None) - self.resource_group_id = None - self.created_by_user = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment.py deleted file mode 100644 index 14103673db5f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class DtlEnvironmentFragment(UpdateResource): - """An environment, which is essentially an ARM template deployment. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param deployment_properties: The deployment properties of the - environment. - :type deployment_properties: - ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentPropertiesFragment - :param arm_template_display_name: The display name of the Azure Resource - Manager template that produced the environment. - :type arm_template_display_name: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentPropertiesFragment'}, - 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DtlEnvironmentFragment, self).__init__(**kwargs) - self.deployment_properties = kwargs.get('deployment_properties', None) - self.arm_template_display_name = kwargs.get('arm_template_display_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment_py3.py deleted file mode 100644 index 9cd4e5caa7bf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class DtlEnvironmentFragment(UpdateResource): - """An environment, which is essentially an ARM template deployment. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param deployment_properties: The deployment properties of the - environment. - :type deployment_properties: - ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentPropertiesFragment - :param arm_template_display_name: The display name of the Azure Resource - Manager template that produced the environment. - :type arm_template_display_name: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentPropertiesFragment'}, - 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, - } - - def __init__(self, *, tags=None, deployment_properties=None, arm_template_display_name: str=None, **kwargs) -> None: - super(DtlEnvironmentFragment, self).__init__(tags=tags, **kwargs) - self.deployment_properties = deployment_properties - self.arm_template_display_name = arm_template_display_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_paged.py deleted file mode 100644 index e7c297f07ffa..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DtlEnvironmentPaged(Paged): - """ - A paging container for iterating over a list of :class:`DtlEnvironment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DtlEnvironment]'} - } - - def __init__(self, *args, **kwargs): - - super(DtlEnvironmentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_py3.py deleted file mode 100644 index f2fbb899f8cf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class DtlEnvironment(Resource): - """An environment, which is essentially an ARM template deployment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param deployment_properties: The deployment properties of the - environment. - :type deployment_properties: - ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentProperties - :param arm_template_display_name: The display name of the Azure Resource - Manager template that produced the environment. - :type arm_template_display_name: str - :ivar resource_group_id: The identifier of the resource group containing - the environment's resources. - :vartype resource_group_id: str - :ivar created_by_user: The creator of the environment. - :vartype created_by_user: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource_group_id': {'readonly': True}, - 'created_by_user': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentProperties'}, - 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, - 'resource_group_id': {'key': 'properties.resourceGroupId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, deployment_properties=None, arm_template_display_name: str=None, **kwargs) -> None: - super(DtlEnvironment, self).__init__(location=location, tags=tags, **kwargs) - self.deployment_properties = deployment_properties - self.arm_template_display_name = arm_template_display_name - self.resource_group_id = None - self.created_by_user = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties.py deleted file mode 100644 index 31dc62dfc89e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnvironmentDeploymentProperties(Model): - """Properties of an environment deployment. - - :param arm_template_id: The Azure Resource Manager template's identifier. - :type arm_template_id: str - :param parameters: The parameters of the Azure Resource Manager template. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterProperties] - """ - - _attribute_map = { - 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterProperties]'}, - } - - def __init__(self, **kwargs): - super(EnvironmentDeploymentProperties, self).__init__(**kwargs) - self.arm_template_id = kwargs.get('arm_template_id', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment.py deleted file mode 100644 index e441cfd4a17d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnvironmentDeploymentPropertiesFragment(Model): - """Properties of an environment deployment. - - :param arm_template_id: The Azure Resource Manager template's identifier. - :type arm_template_id: str - :param parameters: The parameters of the Azure Resource Manager template. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterPropertiesFragment] - """ - - _attribute_map = { - 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterPropertiesFragment]'}, - } - - def __init__(self, **kwargs): - super(EnvironmentDeploymentPropertiesFragment, self).__init__(**kwargs) - self.arm_template_id = kwargs.get('arm_template_id', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment_py3.py deleted file mode 100644 index 1a30a6aef98e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnvironmentDeploymentPropertiesFragment(Model): - """Properties of an environment deployment. - - :param arm_template_id: The Azure Resource Manager template's identifier. - :type arm_template_id: str - :param parameters: The parameters of the Azure Resource Manager template. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterPropertiesFragment] - """ - - _attribute_map = { - 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterPropertiesFragment]'}, - } - - def __init__(self, *, arm_template_id: str=None, parameters=None, **kwargs) -> None: - super(EnvironmentDeploymentPropertiesFragment, self).__init__(**kwargs) - self.arm_template_id = arm_template_id - self.parameters = parameters diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_py3.py deleted file mode 100644 index 866bbe7d7ebf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnvironmentDeploymentProperties(Model): - """Properties of an environment deployment. - - :param arm_template_id: The Azure Resource Manager template's identifier. - :type arm_template_id: str - :param parameters: The parameters of the Azure Resource Manager template. - :type parameters: - list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterProperties] - """ - - _attribute_map = { - 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterProperties]'}, - } - - def __init__(self, *, arm_template_id: str=None, parameters=None, **kwargs) -> None: - super(EnvironmentDeploymentProperties, self).__init__(**kwargs) - self.arm_template_id = arm_template_id - self.parameters = parameters diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties.py deleted file mode 100644 index ec21cf9c743e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EvaluatePoliciesProperties(Model): - """Properties for evaluating a policy set. - - :param fact_name: The fact name. - :type fact_name: str - :param fact_data: The fact data. - :type fact_data: str - :param value_offset: The value offset. - :type value_offset: str - :param user_object_id: The user for which policies will be evaluated - :type user_object_id: str - """ - - _attribute_map = { - 'fact_name': {'key': 'factName', 'type': 'str'}, - 'fact_data': {'key': 'factData', 'type': 'str'}, - 'value_offset': {'key': 'valueOffset', 'type': 'str'}, - 'user_object_id': {'key': 'userObjectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EvaluatePoliciesProperties, self).__init__(**kwargs) - self.fact_name = kwargs.get('fact_name', None) - self.fact_data = kwargs.get('fact_data', None) - self.value_offset = kwargs.get('value_offset', None) - self.user_object_id = kwargs.get('user_object_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties_py3.py deleted file mode 100644 index 5f45b40617a1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EvaluatePoliciesProperties(Model): - """Properties for evaluating a policy set. - - :param fact_name: The fact name. - :type fact_name: str - :param fact_data: The fact data. - :type fact_data: str - :param value_offset: The value offset. - :type value_offset: str - :param user_object_id: The user for which policies will be evaluated - :type user_object_id: str - """ - - _attribute_map = { - 'fact_name': {'key': 'factName', 'type': 'str'}, - 'fact_data': {'key': 'factData', 'type': 'str'}, - 'value_offset': {'key': 'valueOffset', 'type': 'str'}, - 'user_object_id': {'key': 'userObjectId', 'type': 'str'}, - } - - def __init__(self, *, fact_name: str=None, fact_data: str=None, value_offset: str=None, user_object_id: str=None, **kwargs) -> None: - super(EvaluatePoliciesProperties, self).__init__(**kwargs) - self.fact_name = fact_name - self.fact_data = fact_data - self.value_offset = value_offset - self.user_object_id = user_object_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request.py deleted file mode 100644 index 3476c2176cd0..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EvaluatePoliciesRequest(Model): - """Request body for evaluating a policy set. - - :param policies: Policies to evaluate. - :type policies: - list[~azure.mgmt.devtestlabs.models.EvaluatePoliciesProperties] - """ - - _attribute_map = { - 'policies': {'key': 'policies', 'type': '[EvaluatePoliciesProperties]'}, - } - - def __init__(self, **kwargs): - super(EvaluatePoliciesRequest, self).__init__(**kwargs) - self.policies = kwargs.get('policies', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request_py3.py deleted file mode 100644 index 657e3a980fbb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EvaluatePoliciesRequest(Model): - """Request body for evaluating a policy set. - - :param policies: Policies to evaluate. - :type policies: - list[~azure.mgmt.devtestlabs.models.EvaluatePoliciesProperties] - """ - - _attribute_map = { - 'policies': {'key': 'policies', 'type': '[EvaluatePoliciesProperties]'}, - } - - def __init__(self, *, policies=None, **kwargs) -> None: - super(EvaluatePoliciesRequest, self).__init__(**kwargs) - self.policies = policies diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response.py deleted file mode 100644 index be1baad1d5a8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EvaluatePoliciesResponse(Model): - """Response body for evaluating a policy set. - - :param results: Results of evaluating a policy set. - :type results: list[~azure.mgmt.devtestlabs.models.PolicySetResult] - """ - - _attribute_map = { - 'results': {'key': 'results', 'type': '[PolicySetResult]'}, - } - - def __init__(self, **kwargs): - super(EvaluatePoliciesResponse, self).__init__(**kwargs) - self.results = kwargs.get('results', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response_py3.py deleted file mode 100644 index 166eb2130754..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EvaluatePoliciesResponse(Model): - """Response body for evaluating a policy set. - - :param results: Results of evaluating a policy set. - :type results: list[~azure.mgmt.devtestlabs.models.PolicySetResult] - """ - - _attribute_map = { - 'results': {'key': 'results', 'type': '[PolicySetResult]'}, - } - - def __init__(self, *, results=None, **kwargs) -> None: - super(EvaluatePoliciesResponse, self).__init__(**kwargs) - self.results = results diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event.py deleted file mode 100644 index 98395545b13e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Event(Model): - """An event to be notified for. - - :param event_name: The event type for which this notification is enabled - (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Event, self).__init__(**kwargs) - self.event_name = kwargs.get('event_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment.py deleted file mode 100644 index f6d18b5ba3e9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventFragment(Model): - """An event to be notified for. - - :param event_name: The event type for which this notification is enabled - (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EventFragment, self).__init__(**kwargs) - self.event_name = kwargs.get('event_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment_py3.py deleted file mode 100644 index a785e4b7201a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventFragment(Model): - """An event to be notified for. - - :param event_name: The event type for which this notification is enabled - (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - } - - def __init__(self, *, event_name=None, **kwargs) -> None: - super(EventFragment, self).__init__(**kwargs) - self.event_name = event_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_py3.py deleted file mode 100644 index faa50f83daea..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Event(Model): - """An event to be notified for. - - :param event_name: The event type for which this notification is enabled - (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - } - - def __init__(self, *, event_name=None, **kwargs) -> None: - super(Event, self).__init__(**kwargs) - self.event_name = event_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters.py deleted file mode 100644 index 464db115a353..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportResourceUsageParameters(Model): - """The parameters of the export operation. - - :param blob_storage_absolute_sas_uri: The blob storage absolute sas uri - with write permission to the container which the usage data needs to be - uploaded to. - :type blob_storage_absolute_sas_uri: str - :param usage_start_date: The start time of the usage. If not provided, - usage will be reported since the beginning of data collection. - :type usage_start_date: datetime - """ - - _attribute_map = { - 'blob_storage_absolute_sas_uri': {'key': 'blobStorageAbsoluteSasUri', 'type': 'str'}, - 'usage_start_date': {'key': 'usageStartDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ExportResourceUsageParameters, self).__init__(**kwargs) - self.blob_storage_absolute_sas_uri = kwargs.get('blob_storage_absolute_sas_uri', None) - self.usage_start_date = kwargs.get('usage_start_date', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters_py3.py deleted file mode 100644 index f58597733273..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportResourceUsageParameters(Model): - """The parameters of the export operation. - - :param blob_storage_absolute_sas_uri: The blob storage absolute sas uri - with write permission to the container which the usage data needs to be - uploaded to. - :type blob_storage_absolute_sas_uri: str - :param usage_start_date: The start time of the usage. If not provided, - usage will be reported since the beginning of data collection. - :type usage_start_date: datetime - """ - - _attribute_map = { - 'blob_storage_absolute_sas_uri': {'key': 'blobStorageAbsoluteSasUri', 'type': 'str'}, - 'usage_start_date': {'key': 'usageStartDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, blob_storage_absolute_sas_uri: str=None, usage_start_date=None, **kwargs) -> None: - super(ExportResourceUsageParameters, self).__init__(**kwargs) - self.blob_storage_absolute_sas_uri = blob_storage_absolute_sas_uri - self.usage_start_date = usage_start_date diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet.py deleted file mode 100644 index 6f7f1ff89fca..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExternalSubnet(Model): - """Subnet information as returned by the Microsoft.Network API. - - :param id: Gets or sets the identifier. - :type id: str - :param name: Gets or sets the name. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExternalSubnet, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment.py deleted file mode 100644 index ab2d5769fdab..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExternalSubnetFragment(Model): - """Subnet information as returned by the Microsoft.Network API. - - :param id: Gets or sets the identifier. - :type id: str - :param name: Gets or sets the name. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExternalSubnetFragment, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment_py3.py deleted file mode 100644 index f5f57186e9e5..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExternalSubnetFragment(Model): - """Subnet information as returned by the Microsoft.Network API. - - :param id: Gets or sets the identifier. - :type id: str - :param name: Gets or sets the name. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: - super(ExternalSubnetFragment, self).__init__(**kwargs) - self.id = id - self.name = name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_py3.py deleted file mode 100644 index 8a780e424313..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExternalSubnet(Model): - """Subnet information as returned by the Microsoft.Network API. - - :param id: Gets or sets the identifier. - :type id: str - :param name: Gets or sets the name. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: - super(ExternalSubnet, self).__init__(**kwargs) - self.id = id - self.name = name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula.py deleted file mode 100644 index e4b18a64b9fa..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Formula(Resource): - """A formula for creating a VM, specifying an image base and other parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the formula. - :type description: str - :param author: The author of the formula. - :type author: str - :param os_type: The OS type of the formula. - :type os_type: str - :ivar creation_date: The creation date of the formula. - :vartype creation_date: datetime - :param formula_content: The content of the formula. - :type formula_content: - ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameter - :param vm: Information about a VM from which a formula is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVm - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameter'}, - 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVm'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Formula, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.author = kwargs.get('author', None) - self.os_type = kwargs.get('os_type', None) - self.creation_date = None - self.formula_content = kwargs.get('formula_content', None) - self.vm = kwargs.get('vm', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment.py deleted file mode 100644 index f072e37b3036..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class FormulaFragment(UpdateResource): - """A formula for creating a VM, specifying an image base and other parameters. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the formula. - :type description: str - :param author: The author of the formula. - :type author: str - :param os_type: The OS type of the formula. - :type os_type: str - :param formula_content: The content of the formula. - :type formula_content: - ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameterFragment - :param vm: Information about a VM from which a formula is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVmFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameterFragment'}, - 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVmFragment'}, - } - - def __init__(self, **kwargs): - super(FormulaFragment, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.author = kwargs.get('author', None) - self.os_type = kwargs.get('os_type', None) - self.formula_content = kwargs.get('formula_content', None) - self.vm = kwargs.get('vm', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment_py3.py deleted file mode 100644 index 0f212fb85237..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class FormulaFragment(UpdateResource): - """A formula for creating a VM, specifying an image base and other parameters. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the formula. - :type description: str - :param author: The author of the formula. - :type author: str - :param os_type: The OS type of the formula. - :type os_type: str - :param formula_content: The content of the formula. - :type formula_content: - ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameterFragment - :param vm: Information about a VM from which a formula is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVmFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameterFragment'}, - 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVmFragment'}, - } - - def __init__(self, *, tags=None, description: str=None, author: str=None, os_type: str=None, formula_content=None, vm=None, **kwargs) -> None: - super(FormulaFragment, self).__init__(tags=tags, **kwargs) - self.description = description - self.author = author - self.os_type = os_type - self.formula_content = formula_content - self.vm = vm diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_paged.py deleted file mode 100644 index b8ae79e7de9d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class FormulaPaged(Paged): - """ - A paging container for iterating over a list of :class:`Formula ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Formula]'} - } - - def __init__(self, *args, **kwargs): - - super(FormulaPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm.py deleted file mode 100644 index 0811ea901b40..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FormulaPropertiesFromVm(Model): - """Information about a VM from which a formula is to be created. - - :param lab_vm_id: The identifier of the VM from which a formula is to be - created. - :type lab_vm_id: str - """ - - _attribute_map = { - 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FormulaPropertiesFromVm, self).__init__(**kwargs) - self.lab_vm_id = kwargs.get('lab_vm_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment.py deleted file mode 100644 index 240d0674d57e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FormulaPropertiesFromVmFragment(Model): - """Information about a VM from which a formula is to be created. - - :param lab_vm_id: The identifier of the VM from which a formula is to be - created. - :type lab_vm_id: str - """ - - _attribute_map = { - 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FormulaPropertiesFromVmFragment, self).__init__(**kwargs) - self.lab_vm_id = kwargs.get('lab_vm_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment_py3.py deleted file mode 100644 index 1fff926ae626..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FormulaPropertiesFromVmFragment(Model): - """Information about a VM from which a formula is to be created. - - :param lab_vm_id: The identifier of the VM from which a formula is to be - created. - :type lab_vm_id: str - """ - - _attribute_map = { - 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, - } - - def __init__(self, *, lab_vm_id: str=None, **kwargs) -> None: - super(FormulaPropertiesFromVmFragment, self).__init__(**kwargs) - self.lab_vm_id = lab_vm_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_py3.py deleted file mode 100644 index 2d7ac51274fe..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FormulaPropertiesFromVm(Model): - """Information about a VM from which a formula is to be created. - - :param lab_vm_id: The identifier of the VM from which a formula is to be - created. - :type lab_vm_id: str - """ - - _attribute_map = { - 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, - } - - def __init__(self, *, lab_vm_id: str=None, **kwargs) -> None: - super(FormulaPropertiesFromVm, self).__init__(**kwargs) - self.lab_vm_id = lab_vm_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_py3.py deleted file mode 100644 index 907919f44485..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_py3.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Formula(Resource): - """A formula for creating a VM, specifying an image base and other parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the formula. - :type description: str - :param author: The author of the formula. - :type author: str - :param os_type: The OS type of the formula. - :type os_type: str - :ivar creation_date: The creation date of the formula. - :vartype creation_date: datetime - :param formula_content: The content of the formula. - :type formula_content: - ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameter - :param vm: Information about a VM from which a formula is to be created. - :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVm - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameter'}, - 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVm'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, description: str=None, author: str=None, os_type: str=None, formula_content=None, vm=None, **kwargs) -> None: - super(Formula, self).__init__(location=location, tags=tags, **kwargs) - self.description = description - self.author = author - self.os_type = os_type - self.creation_date = None - self.formula_content = formula_content - self.vm = vm - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image.py deleted file mode 100644 index c16dcfd6e97f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class GalleryImage(Resource): - """A gallery image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param author: The author of the gallery image. - :type author: str - :ivar created_date: The creation date of the gallery image. - :vartype created_date: datetime - :param description: The description of the gallery image. - :type description: str - :param image_reference: The image reference of the gallery image. - :type image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param icon: The icon of the gallery image. - :type icon: str - :param enabled: Indicates whether this gallery image is enabled. - :type enabled: bool - :param plan_id: The third party plan that applies to this image - :type plan_id: str - :param is_plan_authorized: Indicates if the plan has been authorized for - programmatic deployment. - :type is_plan_authorized: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'image_reference': {'key': 'properties.imageReference', 'type': 'GalleryImageReference'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(GalleryImage, self).__init__(**kwargs) - self.author = kwargs.get('author', None) - self.created_date = None - self.description = kwargs.get('description', None) - self.image_reference = kwargs.get('image_reference', None) - self.icon = kwargs.get('icon', None) - self.enabled = kwargs.get('enabled', None) - self.plan_id = kwargs.get('plan_id', None) - self.is_plan_authorized = kwargs.get('is_plan_authorized', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_paged.py deleted file mode 100644 index 2712de454c83..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class GalleryImagePaged(Paged): - """ - A paging container for iterating over a list of :class:`GalleryImage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GalleryImage]'} - } - - def __init__(self, *args, **kwargs): - - super(GalleryImagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_py3.py deleted file mode 100644 index 2097997302c9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_py3.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class GalleryImage(Resource): - """A gallery image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param author: The author of the gallery image. - :type author: str - :ivar created_date: The creation date of the gallery image. - :vartype created_date: datetime - :param description: The description of the gallery image. - :type description: str - :param image_reference: The image reference of the gallery image. - :type image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param icon: The icon of the gallery image. - :type icon: str - :param enabled: Indicates whether this gallery image is enabled. - :type enabled: bool - :param plan_id: The third party plan that applies to this image - :type plan_id: str - :param is_plan_authorized: Indicates if the plan has been authorized for - programmatic deployment. - :type is_plan_authorized: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'author': {'key': 'properties.author', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'image_reference': {'key': 'properties.imageReference', 'type': 'GalleryImageReference'}, - 'icon': {'key': 'properties.icon', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, - } - - def __init__(self, *, location: str=None, tags=None, author: str=None, description: str=None, image_reference=None, icon: str=None, enabled: bool=None, plan_id: str=None, is_plan_authorized: bool=None, **kwargs) -> None: - super(GalleryImage, self).__init__(location=location, tags=tags, **kwargs) - self.author = author - self.created_date = None - self.description = description - self.image_reference = image_reference - self.icon = icon - self.enabled = enabled - self.plan_id = plan_id - self.is_plan_authorized = is_plan_authorized diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference.py deleted file mode 100644 index c896911316fd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryImageReference(Model): - """The reference information for an Azure Marketplace image. - - :param offer: The offer of the gallery image. - :type offer: str - :param publisher: The publisher of the gallery image. - :type publisher: str - :param sku: The SKU of the gallery image. - :type sku: str - :param os_type: The OS type of the gallery image. - :type os_type: str - :param version: The version of the gallery image. - :type version: str - """ - - _attribute_map = { - 'offer': {'key': 'offer', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GalleryImageReference, self).__init__(**kwargs) - self.offer = kwargs.get('offer', None) - self.publisher = kwargs.get('publisher', None) - self.sku = kwargs.get('sku', None) - self.os_type = kwargs.get('os_type', None) - self.version = kwargs.get('version', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment.py deleted file mode 100644 index 6bd266dbfbd8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryImageReferenceFragment(Model): - """The reference information for an Azure Marketplace image. - - :param offer: The offer of the gallery image. - :type offer: str - :param publisher: The publisher of the gallery image. - :type publisher: str - :param sku: The SKU of the gallery image. - :type sku: str - :param os_type: The OS type of the gallery image. - :type os_type: str - :param version: The version of the gallery image. - :type version: str - """ - - _attribute_map = { - 'offer': {'key': 'offer', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GalleryImageReferenceFragment, self).__init__(**kwargs) - self.offer = kwargs.get('offer', None) - self.publisher = kwargs.get('publisher', None) - self.sku = kwargs.get('sku', None) - self.os_type = kwargs.get('os_type', None) - self.version = kwargs.get('version', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment_py3.py deleted file mode 100644 index 3ebbfa4662f7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryImageReferenceFragment(Model): - """The reference information for an Azure Marketplace image. - - :param offer: The offer of the gallery image. - :type offer: str - :param publisher: The publisher of the gallery image. - :type publisher: str - :param sku: The SKU of the gallery image. - :type sku: str - :param os_type: The OS type of the gallery image. - :type os_type: str - :param version: The version of the gallery image. - :type version: str - """ - - _attribute_map = { - 'offer': {'key': 'offer', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, offer: str=None, publisher: str=None, sku: str=None, os_type: str=None, version: str=None, **kwargs) -> None: - super(GalleryImageReferenceFragment, self).__init__(**kwargs) - self.offer = offer - self.publisher = publisher - self.sku = sku - self.os_type = os_type - self.version = version diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_py3.py deleted file mode 100644 index 2541dc5b63e9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GalleryImageReference(Model): - """The reference information for an Azure Marketplace image. - - :param offer: The offer of the gallery image. - :type offer: str - :param publisher: The publisher of the gallery image. - :type publisher: str - :param sku: The SKU of the gallery image. - :type sku: str - :param os_type: The OS type of the gallery image. - :type os_type: str - :param version: The version of the gallery image. - :type version: str - """ - - _attribute_map = { - 'offer': {'key': 'offer', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, offer: str=None, publisher: str=None, sku: str=None, os_type: str=None, version: str=None, **kwargs) -> None: - super(GalleryImageReference, self).__init__(**kwargs) - self.offer = offer - self.publisher = publisher - self.sku = sku - self.os_type = os_type - self.version = version diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request.py deleted file mode 100644 index 3c5fb7b2fafd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GenerateArmTemplateRequest(Model): - """Parameters for generating an ARM template for deploying artifacts. - - :param virtual_machine_name: The resource name of the virtual machine. - :type virtual_machine_name: str - :param parameters: The parameters of the ARM template. - :type parameters: list[~azure.mgmt.devtestlabs.models.ParameterInfo] - :param location: The location of the virtual machine. - :type location: str - :param file_upload_options: Options for uploading the files for the - artifact. UploadFilesAndGenerateSasTokens is the default value. Possible - values include: 'UploadFilesAndGenerateSasTokens', 'None' - :type file_upload_options: str or - ~azure.mgmt.devtestlabs.models.FileUploadOptions - """ - - _attribute_map = { - 'virtual_machine_name': {'key': 'virtualMachineName', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ParameterInfo]'}, - 'location': {'key': 'location', 'type': 'str'}, - 'file_upload_options': {'key': 'fileUploadOptions', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GenerateArmTemplateRequest, self).__init__(**kwargs) - self.virtual_machine_name = kwargs.get('virtual_machine_name', None) - self.parameters = kwargs.get('parameters', None) - self.location = kwargs.get('location', None) - self.file_upload_options = kwargs.get('file_upload_options', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request_py3.py deleted file mode 100644 index 677085554d25..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GenerateArmTemplateRequest(Model): - """Parameters for generating an ARM template for deploying artifacts. - - :param virtual_machine_name: The resource name of the virtual machine. - :type virtual_machine_name: str - :param parameters: The parameters of the ARM template. - :type parameters: list[~azure.mgmt.devtestlabs.models.ParameterInfo] - :param location: The location of the virtual machine. - :type location: str - :param file_upload_options: Options for uploading the files for the - artifact. UploadFilesAndGenerateSasTokens is the default value. Possible - values include: 'UploadFilesAndGenerateSasTokens', 'None' - :type file_upload_options: str or - ~azure.mgmt.devtestlabs.models.FileUploadOptions - """ - - _attribute_map = { - 'virtual_machine_name': {'key': 'virtualMachineName', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ParameterInfo]'}, - 'location': {'key': 'location', 'type': 'str'}, - 'file_upload_options': {'key': 'fileUploadOptions', 'type': 'str'}, - } - - def __init__(self, *, virtual_machine_name: str=None, parameters=None, location: str=None, file_upload_options=None, **kwargs) -> None: - super(GenerateArmTemplateRequest, self).__init__(**kwargs) - self.virtual_machine_name = virtual_machine_name - self.parameters = parameters - self.location = location - self.file_upload_options = file_upload_options diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter.py deleted file mode 100644 index 801afae7e028..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GenerateUploadUriParameter(Model): - """Properties for generating an upload URI. - - :param blob_name: The blob name of the upload URI. - :type blob_name: str - """ - - _attribute_map = { - 'blob_name': {'key': 'blobName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GenerateUploadUriParameter, self).__init__(**kwargs) - self.blob_name = kwargs.get('blob_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter_py3.py deleted file mode 100644 index ebc5724f0614..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GenerateUploadUriParameter(Model): - """Properties for generating an upload URI. - - :param blob_name: The blob name of the upload URI. - :type blob_name: str - """ - - _attribute_map = { - 'blob_name': {'key': 'blobName', 'type': 'str'}, - } - - def __init__(self, *, blob_name: str=None, **kwargs) -> None: - super(GenerateUploadUriParameter, self).__init__(**kwargs) - self.blob_name = blob_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response.py deleted file mode 100644 index 6b89d3111051..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GenerateUploadUriResponse(Model): - """Response body for generating an upload URI. - - :param upload_uri: The upload URI for the VHD. - :type upload_uri: str - """ - - _attribute_map = { - 'upload_uri': {'key': 'uploadUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GenerateUploadUriResponse, self).__init__(**kwargs) - self.upload_uri = kwargs.get('upload_uri', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response_py3.py deleted file mode 100644 index 8807569409ac..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GenerateUploadUriResponse(Model): - """Response body for generating an upload URI. - - :param upload_uri: The upload URI for the VHD. - :type upload_uri: str - """ - - _attribute_map = { - 'upload_uri': {'key': 'uploadUri', 'type': 'str'}, - } - - def __init__(self, *, upload_uri: str=None, **kwargs) -> None: - super(GenerateUploadUriResponse, self).__init__(**kwargs) - self.upload_uri = upload_uri diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details.py deleted file mode 100644 index e310a1bbc923..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HourDetails(Model): - """Properties of an hourly schedule. - - :param minute: Minutes of the hour the schedule will run. - :type minute: int - """ - - _attribute_map = { - 'minute': {'key': 'minute', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(HourDetails, self).__init__(**kwargs) - self.minute = kwargs.get('minute', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment.py deleted file mode 100644 index 3a41af20481d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HourDetailsFragment(Model): - """Properties of an hourly schedule. - - :param minute: Minutes of the hour the schedule will run. - :type minute: int - """ - - _attribute_map = { - 'minute': {'key': 'minute', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(HourDetailsFragment, self).__init__(**kwargs) - self.minute = kwargs.get('minute', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment_py3.py deleted file mode 100644 index afa962a3c628..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HourDetailsFragment(Model): - """Properties of an hourly schedule. - - :param minute: Minutes of the hour the schedule will run. - :type minute: int - """ - - _attribute_map = { - 'minute': {'key': 'minute', 'type': 'int'}, - } - - def __init__(self, *, minute: int=None, **kwargs) -> None: - super(HourDetailsFragment, self).__init__(**kwargs) - self.minute = minute diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_py3.py deleted file mode 100644 index 52c323352b24..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HourDetails(Model): - """Properties of an hourly schedule. - - :param minute: Minutes of the hour the schedule will run. - :type minute: int - """ - - _attribute_map = { - 'minute': {'key': 'minute', 'type': 'int'}, - } - - def __init__(self, *, minute: int=None, **kwargs) -> None: - super(HourDetails, self).__init__(**kwargs) - self.minute = minute diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties.py deleted file mode 100644 index ed4b127fc39c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IdentityProperties(Model): - """Properties of a managed identity. - - :param type: Managed identity. - :type type: str - :param principal_id: The principal id of resource identity. - :type principal_id: str - :param tenant_id: The tenant identifier of resource. - :type tenant_id: str - :param client_secret_url: The client secret URL of the identity. - :type client_secret_url: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'client_secret_url': {'key': 'clientSecretUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IdentityProperties, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.principal_id = kwargs.get('principal_id', None) - self.tenant_id = kwargs.get('tenant_id', None) - self.client_secret_url = kwargs.get('client_secret_url', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties_py3.py deleted file mode 100644 index 63fb90a1b974..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IdentityProperties(Model): - """Properties of a managed identity. - - :param type: Managed identity. - :type type: str - :param principal_id: The principal id of resource identity. - :type principal_id: str - :param tenant_id: The tenant identifier of resource. - :type tenant_id: str - :param client_secret_url: The client secret URL of the identity. - :type client_secret_url: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'client_secret_url': {'key': 'clientSecretUrl', 'type': 'str'}, - } - - def __init__(self, *, type: str=None, principal_id: str=None, tenant_id: str=None, client_secret_url: str=None, **kwargs) -> None: - super(IdentityProperties, self).__init__(**kwargs) - self.type = type - self.principal_id = principal_id - self.tenant_id = tenant_id - self.client_secret_url = client_secret_url diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request.py deleted file mode 100644 index 0c910e9b203e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImportLabVirtualMachineRequest(Model): - """This represents the payload required to import a virtual machine from a - different lab into the current one. - - :param source_virtual_machine_resource_id: The full resource ID of the - virtual machine to be imported. - :type source_virtual_machine_resource_id: str - :param destination_virtual_machine_name: The name of the virtual machine - in the destination lab - :type destination_virtual_machine_name: str - """ - - _attribute_map = { - 'source_virtual_machine_resource_id': {'key': 'sourceVirtualMachineResourceId', 'type': 'str'}, - 'destination_virtual_machine_name': {'key': 'destinationVirtualMachineName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImportLabVirtualMachineRequest, self).__init__(**kwargs) - self.source_virtual_machine_resource_id = kwargs.get('source_virtual_machine_resource_id', None) - self.destination_virtual_machine_name = kwargs.get('destination_virtual_machine_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request_py3.py deleted file mode 100644 index 6ca10ecff7a6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImportLabVirtualMachineRequest(Model): - """This represents the payload required to import a virtual machine from a - different lab into the current one. - - :param source_virtual_machine_resource_id: The full resource ID of the - virtual machine to be imported. - :type source_virtual_machine_resource_id: str - :param destination_virtual_machine_name: The name of the virtual machine - in the destination lab - :type destination_virtual_machine_name: str - """ - - _attribute_map = { - 'source_virtual_machine_resource_id': {'key': 'sourceVirtualMachineResourceId', 'type': 'str'}, - 'destination_virtual_machine_name': {'key': 'destinationVirtualMachineName', 'type': 'str'}, - } - - def __init__(self, *, source_virtual_machine_resource_id: str=None, destination_virtual_machine_name: str=None, **kwargs) -> None: - super(ImportLabVirtualMachineRequest, self).__init__(**kwargs) - self.source_virtual_machine_resource_id = source_virtual_machine_resource_id - self.destination_virtual_machine_name = destination_virtual_machine_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule.py deleted file mode 100644 index 56d745d71893..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InboundNatRule(Model): - """A rule for NAT - exposing a VM's port (backendPort) on the public IP - address using a load balancer. - - :param transport_protocol: The transport protocol for the endpoint. - Possible values include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param frontend_port: The external endpoint port of the inbound - connection. Possible values range between 1 and 65535, inclusive. If - unspecified, a value will be allocated automatically. - :type frontend_port: int - :param backend_port: The port to which the external traffic will be - redirected. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(InboundNatRule, self).__init__(**kwargs) - self.transport_protocol = kwargs.get('transport_protocol', None) - self.frontend_port = kwargs.get('frontend_port', None) - self.backend_port = kwargs.get('backend_port', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment.py deleted file mode 100644 index 034404f9923f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InboundNatRuleFragment(Model): - """A rule for NAT - exposing a VM's port (backendPort) on the public IP - address using a load balancer. - - :param transport_protocol: The transport protocol for the endpoint. - Possible values include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param frontend_port: The external endpoint port of the inbound - connection. Possible values range between 1 and 65535, inclusive. If - unspecified, a value will be allocated automatically. - :type frontend_port: int - :param backend_port: The port to which the external traffic will be - redirected. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(InboundNatRuleFragment, self).__init__(**kwargs) - self.transport_protocol = kwargs.get('transport_protocol', None) - self.frontend_port = kwargs.get('frontend_port', None) - self.backend_port = kwargs.get('backend_port', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment_py3.py deleted file mode 100644 index 397d4c523e32..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InboundNatRuleFragment(Model): - """A rule for NAT - exposing a VM's port (backendPort) on the public IP - address using a load balancer. - - :param transport_protocol: The transport protocol for the endpoint. - Possible values include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param frontend_port: The external endpoint port of the inbound - connection. Possible values range between 1 and 65535, inclusive. If - unspecified, a value will be allocated automatically. - :type frontend_port: int - :param backend_port: The port to which the external traffic will be - redirected. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, *, transport_protocol=None, frontend_port: int=None, backend_port: int=None, **kwargs) -> None: - super(InboundNatRuleFragment, self).__init__(**kwargs) - self.transport_protocol = transport_protocol - self.frontend_port = frontend_port - self.backend_port = backend_port diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_py3.py deleted file mode 100644 index 9ec4bd8a3d52..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InboundNatRule(Model): - """A rule for NAT - exposing a VM's port (backendPort) on the public IP - address using a load balancer. - - :param transport_protocol: The transport protocol for the endpoint. - Possible values include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param frontend_port: The external endpoint port of the inbound - connection. Possible values range between 1 and 65535, inclusive. If - unspecified, a value will be allocated automatically. - :type frontend_port: int - :param backend_port: The port to which the external traffic will be - redirected. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, *, transport_protocol=None, frontend_port: int=None, backend_port: int=None, **kwargs) -> None: - super(InboundNatRule, self).__init__(**kwargs) - self.transport_protocol = transport_protocol - self.frontend_port = frontend_port - self.backend_port = backend_port diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab.py deleted file mode 100644 index e495c96e01fa..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Lab(Resource): - """A lab. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar default_storage_account: The lab's default storage account. - :vartype default_storage_account: str - :ivar default_premium_storage_account: The lab's default premium storage - account. - :vartype default_premium_storage_account: str - :ivar artifacts_storage_account: The lab's artifact storage account. - :vartype artifacts_storage_account: str - :ivar premium_data_disk_storage_account: The lab's premium data disk - storage account. - :vartype premium_data_disk_storage_account: str - :ivar vault_name: The lab's Key vault. - :vartype vault_name: str - :param lab_storage_type: Type of storage used by the lab. It can be either - Premium or Standard. Default is Premium. Possible values include: - 'Standard', 'Premium' - :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param mandatory_artifacts_resource_ids_linux: The ordered list of - artifact resource IDs that should be applied on all Linux VM creations by - default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_linux: list[str] - :param mandatory_artifacts_resource_ids_windows: The ordered list of - artifact resource IDs that should be applied on all Windows VM creations - by default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_windows: list[str] - :ivar created_date: The creation date of the lab. - :vartype created_date: datetime - :param premium_data_disks: The setting to enable usage of premium data - disks. - When its value is 'Enabled', creation of standard or premium data disks is - allowed. - When its value is 'Disabled', only creation of standard data disks is - allowed. Possible values include: 'Disabled', 'Enabled' - :type premium_data_disks: str or - ~azure.mgmt.devtestlabs.models.PremiumDataDisk - :param environment_permission: The access rights to be granted to the user - when provisioning an environment. Possible values include: 'Reader', - 'Contributor' - :type environment_permission: str or - ~azure.mgmt.devtestlabs.models.EnvironmentPermission - :param announcement: The properties of any lab announcement associated - with this lab - :type announcement: - ~azure.mgmt.devtestlabs.models.LabAnnouncementProperties - :param support: The properties of any lab support message associated with - this lab - :type support: ~azure.mgmt.devtestlabs.models.LabSupportProperties - :ivar vm_creation_resource_group: The resource group in which lab virtual - machines will be created in. - :vartype vm_creation_resource_group: str - :ivar public_ip_id: The public IP address for the lab's load balancer. - :vartype public_ip_id: str - :ivar load_balancer_id: The load balancer used to for lab VMs that use - shared IP address. - :vartype load_balancer_id: str - :ivar network_security_group_id: The Network Security Group attached to - the lab VMs Network interfaces to restrict open ports. - :vartype network_security_group_id: str - :param extended_properties: Extended properties of the lab used for - experimental features - :type extended_properties: dict[str, str] - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'default_storage_account': {'readonly': True}, - 'default_premium_storage_account': {'readonly': True}, - 'artifacts_storage_account': {'readonly': True}, - 'premium_data_disk_storage_account': {'readonly': True}, - 'vault_name': {'readonly': True}, - 'created_date': {'readonly': True}, - 'vm_creation_resource_group': {'readonly': True}, - 'public_ip_id': {'readonly': True}, - 'load_balancer_id': {'readonly': True}, - 'network_security_group_id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'default_storage_account': {'key': 'properties.defaultStorageAccount', 'type': 'str'}, - 'default_premium_storage_account': {'key': 'properties.defaultPremiumStorageAccount', 'type': 'str'}, - 'artifacts_storage_account': {'key': 'properties.artifactsStorageAccount', 'type': 'str'}, - 'premium_data_disk_storage_account': {'key': 'properties.premiumDataDiskStorageAccount', 'type': 'str'}, - 'vault_name': {'key': 'properties.vaultName', 'type': 'str'}, - 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, - 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, - 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, - 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, - 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementProperties'}, - 'support': {'key': 'properties.support', 'type': 'LabSupportProperties'}, - 'vm_creation_resource_group': {'key': 'properties.vmCreationResourceGroup', 'type': 'str'}, - 'public_ip_id': {'key': 'properties.publicIpId', 'type': 'str'}, - 'load_balancer_id': {'key': 'properties.loadBalancerId', 'type': 'str'}, - 'network_security_group_id': {'key': 'properties.networkSecurityGroupId', 'type': 'str'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Lab, self).__init__(**kwargs) - self.default_storage_account = None - self.default_premium_storage_account = None - self.artifacts_storage_account = None - self.premium_data_disk_storage_account = None - self.vault_name = None - self.lab_storage_type = kwargs.get('lab_storage_type', None) - self.mandatory_artifacts_resource_ids_linux = kwargs.get('mandatory_artifacts_resource_ids_linux', None) - self.mandatory_artifacts_resource_ids_windows = kwargs.get('mandatory_artifacts_resource_ids_windows', None) - self.created_date = None - self.premium_data_disks = kwargs.get('premium_data_disks', None) - self.environment_permission = kwargs.get('environment_permission', None) - self.announcement = kwargs.get('announcement', None) - self.support = kwargs.get('support', None) - self.vm_creation_resource_group = None - self.public_ip_id = None - self.load_balancer_id = None - self.network_security_group_id = None - self.extended_properties = kwargs.get('extended_properties', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties.py deleted file mode 100644 index aee243079a09..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabAnnouncementProperties(Model): - """Properties of a lab's announcement banner. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param title: The plain text title for the lab announcement - :type title: str - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - :param enabled: Is the lab announcement active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param expiration_date: The time at which the announcement expires (null - for never) - :type expiration_date: datetime - :param expired: Has this announcement expired? - :type expired: bool - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'expired': {'key': 'expired', 'type': 'bool'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabAnnouncementProperties, self).__init__(**kwargs) - self.title = kwargs.get('title', None) - self.markdown = kwargs.get('markdown', None) - self.enabled = kwargs.get('enabled', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.expired = kwargs.get('expired', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment.py deleted file mode 100644 index 9d82a4819afa..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabAnnouncementPropertiesFragment(Model): - """Properties of a lab's announcement banner. - - :param title: The plain text title for the lab announcement - :type title: str - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - :param enabled: Is the lab announcement active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param expiration_date: The time at which the announcement expires (null - for never) - :type expiration_date: datetime - :param expired: Has this announcement expired? - :type expired: bool - """ - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'expired': {'key': 'expired', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(LabAnnouncementPropertiesFragment, self).__init__(**kwargs) - self.title = kwargs.get('title', None) - self.markdown = kwargs.get('markdown', None) - self.enabled = kwargs.get('enabled', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.expired = kwargs.get('expired', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment_py3.py deleted file mode 100644 index 33eea147dcf1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabAnnouncementPropertiesFragment(Model): - """Properties of a lab's announcement banner. - - :param title: The plain text title for the lab announcement - :type title: str - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - :param enabled: Is the lab announcement active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param expiration_date: The time at which the announcement expires (null - for never) - :type expiration_date: datetime - :param expired: Has this announcement expired? - :type expired: bool - """ - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'expired': {'key': 'expired', 'type': 'bool'}, - } - - def __init__(self, *, title: str=None, markdown: str=None, enabled=None, expiration_date=None, expired: bool=None, **kwargs) -> None: - super(LabAnnouncementPropertiesFragment, self).__init__(**kwargs) - self.title = title - self.markdown = markdown - self.enabled = enabled - self.expiration_date = expiration_date - self.expired = expired diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_py3.py deleted file mode 100644 index 3d818d58a02f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabAnnouncementProperties(Model): - """Properties of a lab's announcement banner. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param title: The plain text title for the lab announcement - :type title: str - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - :param enabled: Is the lab announcement active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param expiration_date: The time at which the announcement expires (null - for never) - :type expiration_date: datetime - :param expired: Has this announcement expired? - :type expired: bool - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'expired': {'key': 'expired', 'type': 'bool'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, title: str=None, markdown: str=None, enabled=None, expiration_date=None, expired: bool=None, **kwargs) -> None: - super(LabAnnouncementProperties, self).__init__(**kwargs) - self.title = title - self.markdown = markdown - self.enabled = enabled - self.expiration_date = expiration_date - self.expired = expired - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost.py deleted file mode 100644 index 6825b1e82b74..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class LabCost(Resource): - """A cost item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param target_cost: The target cost properties - :type target_cost: ~azure.mgmt.devtestlabs.models.TargetCostProperties - :ivar lab_cost_summary: The lab cost summary component of the cost data. - :vartype lab_cost_summary: - ~azure.mgmt.devtestlabs.models.LabCostSummaryProperties - :ivar lab_cost_details: The lab cost details component of the cost data. - :vartype lab_cost_details: - list[~azure.mgmt.devtestlabs.models.LabCostDetailsProperties] - :ivar resource_costs: The resource cost component of the cost data. - :vartype resource_costs: - list[~azure.mgmt.devtestlabs.models.LabResourceCostProperties] - :param currency_code: The currency code of the cost. - :type currency_code: str - :param start_date_time: The start time of the cost data. - :type start_date_time: datetime - :param end_date_time: The end time of the cost data. - :type end_date_time: datetime - :param created_date: The creation date of the cost. - :type created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'lab_cost_summary': {'readonly': True}, - 'lab_cost_details': {'readonly': True}, - 'resource_costs': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'target_cost': {'key': 'properties.targetCost', 'type': 'TargetCostProperties'}, - 'lab_cost_summary': {'key': 'properties.labCostSummary', 'type': 'LabCostSummaryProperties'}, - 'lab_cost_details': {'key': 'properties.labCostDetails', 'type': '[LabCostDetailsProperties]'}, - 'resource_costs': {'key': 'properties.resourceCosts', 'type': '[LabResourceCostProperties]'}, - 'currency_code': {'key': 'properties.currencyCode', 'type': 'str'}, - 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, - 'end_date_time': {'key': 'properties.endDateTime', 'type': 'iso-8601'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabCost, self).__init__(**kwargs) - self.target_cost = kwargs.get('target_cost', None) - self.lab_cost_summary = None - self.lab_cost_details = None - self.resource_costs = None - self.currency_code = kwargs.get('currency_code', None) - self.start_date_time = kwargs.get('start_date_time', None) - self.end_date_time = kwargs.get('end_date_time', None) - self.created_date = kwargs.get('created_date', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties.py deleted file mode 100644 index ac7c70074036..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabCostDetailsProperties(Model): - """The properties of a lab cost item. - - :param date_property: The date of the cost item. - :type date_property: datetime - :param cost: The cost component of the cost item. - :type cost: float - :param cost_type: The type of the cost. Possible values include: - 'Unavailable', 'Reported', 'Projected' - :type cost_type: str or ~azure.mgmt.devtestlabs.models.CostType - """ - - _attribute_map = { - 'date_property': {'key': 'date', 'type': 'iso-8601'}, - 'cost': {'key': 'cost', 'type': 'float'}, - 'cost_type': {'key': 'costType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabCostDetailsProperties, self).__init__(**kwargs) - self.date_property = kwargs.get('date_property', None) - self.cost = kwargs.get('cost', None) - self.cost_type = kwargs.get('cost_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties_py3.py deleted file mode 100644 index f6690c8c2184..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabCostDetailsProperties(Model): - """The properties of a lab cost item. - - :param date_property: The date of the cost item. - :type date_property: datetime - :param cost: The cost component of the cost item. - :type cost: float - :param cost_type: The type of the cost. Possible values include: - 'Unavailable', 'Reported', 'Projected' - :type cost_type: str or ~azure.mgmt.devtestlabs.models.CostType - """ - - _attribute_map = { - 'date_property': {'key': 'date', 'type': 'iso-8601'}, - 'cost': {'key': 'cost', 'type': 'float'}, - 'cost_type': {'key': 'costType', 'type': 'str'}, - } - - def __init__(self, *, date_property=None, cost: float=None, cost_type=None, **kwargs) -> None: - super(LabCostDetailsProperties, self).__init__(**kwargs) - self.date_property = date_property - self.cost = cost - self.cost_type = cost_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_py3.py deleted file mode 100644 index cef3ac68fdf8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class LabCost(Resource): - """A cost item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param target_cost: The target cost properties - :type target_cost: ~azure.mgmt.devtestlabs.models.TargetCostProperties - :ivar lab_cost_summary: The lab cost summary component of the cost data. - :vartype lab_cost_summary: - ~azure.mgmt.devtestlabs.models.LabCostSummaryProperties - :ivar lab_cost_details: The lab cost details component of the cost data. - :vartype lab_cost_details: - list[~azure.mgmt.devtestlabs.models.LabCostDetailsProperties] - :ivar resource_costs: The resource cost component of the cost data. - :vartype resource_costs: - list[~azure.mgmt.devtestlabs.models.LabResourceCostProperties] - :param currency_code: The currency code of the cost. - :type currency_code: str - :param start_date_time: The start time of the cost data. - :type start_date_time: datetime - :param end_date_time: The end time of the cost data. - :type end_date_time: datetime - :param created_date: The creation date of the cost. - :type created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'lab_cost_summary': {'readonly': True}, - 'lab_cost_details': {'readonly': True}, - 'resource_costs': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'target_cost': {'key': 'properties.targetCost', 'type': 'TargetCostProperties'}, - 'lab_cost_summary': {'key': 'properties.labCostSummary', 'type': 'LabCostSummaryProperties'}, - 'lab_cost_details': {'key': 'properties.labCostDetails', 'type': '[LabCostDetailsProperties]'}, - 'resource_costs': {'key': 'properties.resourceCosts', 'type': '[LabResourceCostProperties]'}, - 'currency_code': {'key': 'properties.currencyCode', 'type': 'str'}, - 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, - 'end_date_time': {'key': 'properties.endDateTime', 'type': 'iso-8601'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, target_cost=None, currency_code: str=None, start_date_time=None, end_date_time=None, created_date=None, **kwargs) -> None: - super(LabCost, self).__init__(location=location, tags=tags, **kwargs) - self.target_cost = target_cost - self.lab_cost_summary = None - self.lab_cost_details = None - self.resource_costs = None - self.currency_code = currency_code - self.start_date_time = start_date_time - self.end_date_time = end_date_time - self.created_date = created_date - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties.py deleted file mode 100644 index edeb814ef472..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabCostSummaryProperties(Model): - """The properties of the cost summary. - - :param estimated_lab_cost: The cost component of the cost item. - :type estimated_lab_cost: float - """ - - _attribute_map = { - 'estimated_lab_cost': {'key': 'estimatedLabCost', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(LabCostSummaryProperties, self).__init__(**kwargs) - self.estimated_lab_cost = kwargs.get('estimated_lab_cost', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties_py3.py deleted file mode 100644 index df5a84f3e609..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabCostSummaryProperties(Model): - """The properties of the cost summary. - - :param estimated_lab_cost: The cost component of the cost item. - :type estimated_lab_cost: float - """ - - _attribute_map = { - 'estimated_lab_cost': {'key': 'estimatedLabCost', 'type': 'float'}, - } - - def __init__(self, *, estimated_lab_cost: float=None, **kwargs) -> None: - super(LabCostSummaryProperties, self).__init__(**kwargs) - self.estimated_lab_cost = estimated_lab_cost diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment.py deleted file mode 100644 index 2ad6dc84b4ae..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class LabFragment(UpdateResource): - """A lab. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_storage_type: Type of storage used by the lab. It can be either - Premium or Standard. Default is Premium. Possible values include: - 'Standard', 'Premium' - :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param mandatory_artifacts_resource_ids_linux: The ordered list of - artifact resource IDs that should be applied on all Linux VM creations by - default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_linux: list[str] - :param mandatory_artifacts_resource_ids_windows: The ordered list of - artifact resource IDs that should be applied on all Windows VM creations - by default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_windows: list[str] - :param premium_data_disks: The setting to enable usage of premium data - disks. - When its value is 'Enabled', creation of standard or premium data disks is - allowed. - When its value is 'Disabled', only creation of standard data disks is - allowed. Possible values include: 'Disabled', 'Enabled' - :type premium_data_disks: str or - ~azure.mgmt.devtestlabs.models.PremiumDataDisk - :param environment_permission: The access rights to be granted to the user - when provisioning an environment. Possible values include: 'Reader', - 'Contributor' - :type environment_permission: str or - ~azure.mgmt.devtestlabs.models.EnvironmentPermission - :param announcement: The properties of any lab announcement associated - with this lab - :type announcement: - ~azure.mgmt.devtestlabs.models.LabAnnouncementPropertiesFragment - :param support: The properties of any lab support message associated with - this lab - :type support: ~azure.mgmt.devtestlabs.models.LabSupportPropertiesFragment - :param extended_properties: Extended properties of the lab used for - experimental features - :type extended_properties: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, - 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, - 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, - 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, - 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, - 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementPropertiesFragment'}, - 'support': {'key': 'properties.support', 'type': 'LabSupportPropertiesFragment'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(LabFragment, self).__init__(**kwargs) - self.lab_storage_type = kwargs.get('lab_storage_type', None) - self.mandatory_artifacts_resource_ids_linux = kwargs.get('mandatory_artifacts_resource_ids_linux', None) - self.mandatory_artifacts_resource_ids_windows = kwargs.get('mandatory_artifacts_resource_ids_windows', None) - self.premium_data_disks = kwargs.get('premium_data_disks', None) - self.environment_permission = kwargs.get('environment_permission', None) - self.announcement = kwargs.get('announcement', None) - self.support = kwargs.get('support', None) - self.extended_properties = kwargs.get('extended_properties', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment_py3.py deleted file mode 100644 index c5aa5b816807..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class LabFragment(UpdateResource): - """A lab. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param lab_storage_type: Type of storage used by the lab. It can be either - Premium or Standard. Default is Premium. Possible values include: - 'Standard', 'Premium' - :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param mandatory_artifacts_resource_ids_linux: The ordered list of - artifact resource IDs that should be applied on all Linux VM creations by - default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_linux: list[str] - :param mandatory_artifacts_resource_ids_windows: The ordered list of - artifact resource IDs that should be applied on all Windows VM creations - by default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_windows: list[str] - :param premium_data_disks: The setting to enable usage of premium data - disks. - When its value is 'Enabled', creation of standard or premium data disks is - allowed. - When its value is 'Disabled', only creation of standard data disks is - allowed. Possible values include: 'Disabled', 'Enabled' - :type premium_data_disks: str or - ~azure.mgmt.devtestlabs.models.PremiumDataDisk - :param environment_permission: The access rights to be granted to the user - when provisioning an environment. Possible values include: 'Reader', - 'Contributor' - :type environment_permission: str or - ~azure.mgmt.devtestlabs.models.EnvironmentPermission - :param announcement: The properties of any lab announcement associated - with this lab - :type announcement: - ~azure.mgmt.devtestlabs.models.LabAnnouncementPropertiesFragment - :param support: The properties of any lab support message associated with - this lab - :type support: ~azure.mgmt.devtestlabs.models.LabSupportPropertiesFragment - :param extended_properties: Extended properties of the lab used for - experimental features - :type extended_properties: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, - 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, - 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, - 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, - 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, - 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementPropertiesFragment'}, - 'support': {'key': 'properties.support', 'type': 'LabSupportPropertiesFragment'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, lab_storage_type=None, mandatory_artifacts_resource_ids_linux=None, mandatory_artifacts_resource_ids_windows=None, premium_data_disks=None, environment_permission=None, announcement=None, support=None, extended_properties=None, **kwargs) -> None: - super(LabFragment, self).__init__(tags=tags, **kwargs) - self.lab_storage_type = lab_storage_type - self.mandatory_artifacts_resource_ids_linux = mandatory_artifacts_resource_ids_linux - self.mandatory_artifacts_resource_ids_windows = mandatory_artifacts_resource_ids_windows - self.premium_data_disks = premium_data_disks - self.environment_permission = environment_permission - self.announcement = announcement - self.support = support - self.extended_properties = extended_properties diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_paged.py deleted file mode 100644 index 869d4b1dee38..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class LabPaged(Paged): - """ - A paging container for iterating over a list of :class:`Lab ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Lab]'} - } - - def __init__(self, *args, **kwargs): - - super(LabPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_py3.py deleted file mode 100644 index ec30462d9336..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_py3.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Lab(Resource): - """A lab. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :ivar default_storage_account: The lab's default storage account. - :vartype default_storage_account: str - :ivar default_premium_storage_account: The lab's default premium storage - account. - :vartype default_premium_storage_account: str - :ivar artifacts_storage_account: The lab's artifact storage account. - :vartype artifacts_storage_account: str - :ivar premium_data_disk_storage_account: The lab's premium data disk - storage account. - :vartype premium_data_disk_storage_account: str - :ivar vault_name: The lab's Key vault. - :vartype vault_name: str - :param lab_storage_type: Type of storage used by the lab. It can be either - Premium or Standard. Default is Premium. Possible values include: - 'Standard', 'Premium' - :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param mandatory_artifacts_resource_ids_linux: The ordered list of - artifact resource IDs that should be applied on all Linux VM creations by - default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_linux: list[str] - :param mandatory_artifacts_resource_ids_windows: The ordered list of - artifact resource IDs that should be applied on all Windows VM creations - by default, prior to the artifacts specified by the user. - :type mandatory_artifacts_resource_ids_windows: list[str] - :ivar created_date: The creation date of the lab. - :vartype created_date: datetime - :param premium_data_disks: The setting to enable usage of premium data - disks. - When its value is 'Enabled', creation of standard or premium data disks is - allowed. - When its value is 'Disabled', only creation of standard data disks is - allowed. Possible values include: 'Disabled', 'Enabled' - :type premium_data_disks: str or - ~azure.mgmt.devtestlabs.models.PremiumDataDisk - :param environment_permission: The access rights to be granted to the user - when provisioning an environment. Possible values include: 'Reader', - 'Contributor' - :type environment_permission: str or - ~azure.mgmt.devtestlabs.models.EnvironmentPermission - :param announcement: The properties of any lab announcement associated - with this lab - :type announcement: - ~azure.mgmt.devtestlabs.models.LabAnnouncementProperties - :param support: The properties of any lab support message associated with - this lab - :type support: ~azure.mgmt.devtestlabs.models.LabSupportProperties - :ivar vm_creation_resource_group: The resource group in which lab virtual - machines will be created in. - :vartype vm_creation_resource_group: str - :ivar public_ip_id: The public IP address for the lab's load balancer. - :vartype public_ip_id: str - :ivar load_balancer_id: The load balancer used to for lab VMs that use - shared IP address. - :vartype load_balancer_id: str - :ivar network_security_group_id: The Network Security Group attached to - the lab VMs Network interfaces to restrict open ports. - :vartype network_security_group_id: str - :param extended_properties: Extended properties of the lab used for - experimental features - :type extended_properties: dict[str, str] - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'default_storage_account': {'readonly': True}, - 'default_premium_storage_account': {'readonly': True}, - 'artifacts_storage_account': {'readonly': True}, - 'premium_data_disk_storage_account': {'readonly': True}, - 'vault_name': {'readonly': True}, - 'created_date': {'readonly': True}, - 'vm_creation_resource_group': {'readonly': True}, - 'public_ip_id': {'readonly': True}, - 'load_balancer_id': {'readonly': True}, - 'network_security_group_id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'default_storage_account': {'key': 'properties.defaultStorageAccount', 'type': 'str'}, - 'default_premium_storage_account': {'key': 'properties.defaultPremiumStorageAccount', 'type': 'str'}, - 'artifacts_storage_account': {'key': 'properties.artifactsStorageAccount', 'type': 'str'}, - 'premium_data_disk_storage_account': {'key': 'properties.premiumDataDiskStorageAccount', 'type': 'str'}, - 'vault_name': {'key': 'properties.vaultName', 'type': 'str'}, - 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, - 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, - 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, - 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, - 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementProperties'}, - 'support': {'key': 'properties.support', 'type': 'LabSupportProperties'}, - 'vm_creation_resource_group': {'key': 'properties.vmCreationResourceGroup', 'type': 'str'}, - 'public_ip_id': {'key': 'properties.publicIpId', 'type': 'str'}, - 'load_balancer_id': {'key': 'properties.loadBalancerId', 'type': 'str'}, - 'network_security_group_id': {'key': 'properties.networkSecurityGroupId', 'type': 'str'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, lab_storage_type=None, mandatory_artifacts_resource_ids_linux=None, mandatory_artifacts_resource_ids_windows=None, premium_data_disks=None, environment_permission=None, announcement=None, support=None, extended_properties=None, **kwargs) -> None: - super(Lab, self).__init__(location=location, tags=tags, **kwargs) - self.default_storage_account = None - self.default_premium_storage_account = None - self.artifacts_storage_account = None - self.premium_data_disk_storage_account = None - self.vault_name = None - self.lab_storage_type = lab_storage_type - self.mandatory_artifacts_resource_ids_linux = mandatory_artifacts_resource_ids_linux - self.mandatory_artifacts_resource_ids_windows = mandatory_artifacts_resource_ids_windows - self.created_date = None - self.premium_data_disks = premium_data_disks - self.environment_permission = environment_permission - self.announcement = announcement - self.support = support - self.vm_creation_resource_group = None - self.public_ip_id = None - self.load_balancer_id = None - self.network_security_group_id = None - self.extended_properties = extended_properties - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties.py deleted file mode 100644 index 8883745b9735..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabResourceCostProperties(Model): - """The properties of a resource cost item. - - :param resourcename: The name of the resource. - :type resourcename: str - :param resource_uid: The unique identifier of the resource. - :type resource_uid: str - :param resource_cost: The cost component of the resource cost item. - :type resource_cost: float - :param resource_type: The logical resource type (ex. virtualmachine, - storageaccount) - :type resource_type: str - :param resource_owner: The owner of the resource (ex. - janedoe@microsoft.com) - :type resource_owner: str - :param resource_pricing_tier: The category of the resource (ex. - Premium_LRS, Standard_DS1) - :type resource_pricing_tier: str - :param resource_status: The status of the resource (ex. Active) - :type resource_status: str - :param resource_id: The ID of the resource - :type resource_id: str - :param external_resource_id: The ID of the external resource - :type external_resource_id: str - """ - - _attribute_map = { - 'resourcename': {'key': 'resourcename', 'type': 'str'}, - 'resource_uid': {'key': 'resourceUId', 'type': 'str'}, - 'resource_cost': {'key': 'resourceCost', 'type': 'float'}, - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'resource_owner': {'key': 'resourceOwner', 'type': 'str'}, - 'resource_pricing_tier': {'key': 'resourcePricingTier', 'type': 'str'}, - 'resource_status': {'key': 'resourceStatus', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'external_resource_id': {'key': 'externalResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabResourceCostProperties, self).__init__(**kwargs) - self.resourcename = kwargs.get('resourcename', None) - self.resource_uid = kwargs.get('resource_uid', None) - self.resource_cost = kwargs.get('resource_cost', None) - self.resource_type = kwargs.get('resource_type', None) - self.resource_owner = kwargs.get('resource_owner', None) - self.resource_pricing_tier = kwargs.get('resource_pricing_tier', None) - self.resource_status = kwargs.get('resource_status', None) - self.resource_id = kwargs.get('resource_id', None) - self.external_resource_id = kwargs.get('external_resource_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties_py3.py deleted file mode 100644 index 5b360dee84b9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabResourceCostProperties(Model): - """The properties of a resource cost item. - - :param resourcename: The name of the resource. - :type resourcename: str - :param resource_uid: The unique identifier of the resource. - :type resource_uid: str - :param resource_cost: The cost component of the resource cost item. - :type resource_cost: float - :param resource_type: The logical resource type (ex. virtualmachine, - storageaccount) - :type resource_type: str - :param resource_owner: The owner of the resource (ex. - janedoe@microsoft.com) - :type resource_owner: str - :param resource_pricing_tier: The category of the resource (ex. - Premium_LRS, Standard_DS1) - :type resource_pricing_tier: str - :param resource_status: The status of the resource (ex. Active) - :type resource_status: str - :param resource_id: The ID of the resource - :type resource_id: str - :param external_resource_id: The ID of the external resource - :type external_resource_id: str - """ - - _attribute_map = { - 'resourcename': {'key': 'resourcename', 'type': 'str'}, - 'resource_uid': {'key': 'resourceUId', 'type': 'str'}, - 'resource_cost': {'key': 'resourceCost', 'type': 'float'}, - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'resource_owner': {'key': 'resourceOwner', 'type': 'str'}, - 'resource_pricing_tier': {'key': 'resourcePricingTier', 'type': 'str'}, - 'resource_status': {'key': 'resourceStatus', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'external_resource_id': {'key': 'externalResourceId', 'type': 'str'}, - } - - def __init__(self, *, resourcename: str=None, resource_uid: str=None, resource_cost: float=None, resource_type: str=None, resource_owner: str=None, resource_pricing_tier: str=None, resource_status: str=None, resource_id: str=None, external_resource_id: str=None, **kwargs) -> None: - super(LabResourceCostProperties, self).__init__(**kwargs) - self.resourcename = resourcename - self.resource_uid = resource_uid - self.resource_cost = resource_cost - self.resource_type = resource_type - self.resource_owner = resource_owner - self.resource_pricing_tier = resource_pricing_tier - self.resource_status = resource_status - self.resource_id = resource_id - self.external_resource_id = external_resource_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties.py deleted file mode 100644 index e948a530fa44..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabSupportProperties(Model): - """Properties of a lab's support banner. - - :param enabled: Is the lab support banner active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabSupportProperties, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.markdown = kwargs.get('markdown', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment.py deleted file mode 100644 index 53bf876c5a2c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabSupportPropertiesFragment(Model): - """Properties of a lab's support banner. - - :param enabled: Is the lab support banner active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabSupportPropertiesFragment, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.markdown = kwargs.get('markdown', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment_py3.py deleted file mode 100644 index 0495bf2657d2..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabSupportPropertiesFragment(Model): - """Properties of a lab's support banner. - - :param enabled: Is the lab support banner active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - } - - def __init__(self, *, enabled=None, markdown: str=None, **kwargs) -> None: - super(LabSupportPropertiesFragment, self).__init__(**kwargs) - self.enabled = enabled - self.markdown = markdown diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_py3.py deleted file mode 100644 index 0eac2ef2c950..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabSupportProperties(Model): - """Properties of a lab's support banner. - - :param enabled: Is the lab support banner active/enabled at this time?. - Possible values include: 'Enabled', 'Disabled' - :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param markdown: The markdown text (if any) that this lab displays in the - UI. If left empty/null, nothing will be shown. - :type markdown: str - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'str'}, - 'markdown': {'key': 'markdown', 'type': 'str'}, - } - - def __init__(self, *, enabled=None, markdown: str=None, **kwargs) -> None: - super(LabSupportProperties, self).__init__(**kwargs) - self.enabled = enabled - self.markdown = markdown diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd.py deleted file mode 100644 index acb777ea8f1b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabVhd(Model): - """Properties of a VHD in the lab. - - :param id: The URI to the VHD. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabVhd, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_paged.py deleted file mode 100644 index 34d5dda853fe..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class LabVhdPaged(Paged): - """ - A paging container for iterating over a list of :class:`LabVhd ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[LabVhd]'} - } - - def __init__(self, *args, **kwargs): - - super(LabVhdPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_py3.py deleted file mode 100644 index 7f0adddb42ae..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabVhd(Model): - """Properties of a VHD in the lab. - - :param id: The URI to the VHD. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(LabVhd, self).__init__(**kwargs) - self.id = id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine.py deleted file mode 100644 index 079a4c3bb59f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine.py +++ /dev/null @@ -1,221 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class LabVirtualMachine(Resource): - """A virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :ivar compute_vm: The compute virtual machine properties. - :vartype compute_vm: ~azure.mgmt.devtestlabs.models.ComputeVmProperties - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties - :ivar applicable_schedule: The applicable schedule for the virtual - machine. - :vartype applicable_schedule: - ~azure.mgmt.devtestlabs.models.ApplicableSchedule - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskProperties] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'compute_vm': {'readonly': True}, - 'applicable_schedule': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'compute_vm': {'key': 'properties.computeVm', 'type': 'ComputeVmProperties'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, - 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabVirtualMachine, self).__init__(**kwargs) - self.notes = kwargs.get('notes', None) - self.owner_object_id = kwargs.get('owner_object_id', None) - self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) - self.created_by_user_id = kwargs.get('created_by_user_id', None) - self.created_by_user = kwargs.get('created_by_user', None) - self.created_date = kwargs.get('created_date', None) - self.compute_id = kwargs.get('compute_id', None) - self.custom_image_id = kwargs.get('custom_image_id', None) - self.os_type = kwargs.get('os_type', None) - self.size = kwargs.get('size', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.ssh_key = kwargs.get('ssh_key', None) - self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) - self.fqdn = kwargs.get('fqdn', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) - self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) - self.artifacts = kwargs.get('artifacts', None) - self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) - self.gallery_image_reference = kwargs.get('gallery_image_reference', None) - self.plan_id = kwargs.get('plan_id', None) - self.compute_vm = None - self.network_interface = kwargs.get('network_interface', None) - self.applicable_schedule = None - self.expiration_date = kwargs.get('expiration_date', None) - self.allow_claim = kwargs.get('allow_claim', None) - self.storage_type = kwargs.get('storage_type', None) - self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) - self.environment_id = kwargs.get('environment_id', None) - self.data_disk_parameters = kwargs.get('data_disk_parameters', None) - self.schedule_parameters = kwargs.get('schedule_parameters', None) - self.last_known_power_state = kwargs.get('last_known_power_state', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter.py deleted file mode 100644 index db9aad603356..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabVirtualMachineCreationParameter(Model): - """Properties for creating a virtual machine. - - :param bulk_creation_parameters: The number of virtual machine instances - to create. - :type bulk_creation_parameters: - ~azure.mgmt.devtestlabs.models.BulkCreationParameters - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskProperties] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParameters'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(LabVirtualMachineCreationParameter, self).__init__(**kwargs) - self.bulk_creation_parameters = kwargs.get('bulk_creation_parameters', None) - self.notes = kwargs.get('notes', None) - self.owner_object_id = kwargs.get('owner_object_id', None) - self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) - self.created_by_user_id = kwargs.get('created_by_user_id', None) - self.created_by_user = kwargs.get('created_by_user', None) - self.created_date = kwargs.get('created_date', None) - self.compute_id = kwargs.get('compute_id', None) - self.custom_image_id = kwargs.get('custom_image_id', None) - self.os_type = kwargs.get('os_type', None) - self.size = kwargs.get('size', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.ssh_key = kwargs.get('ssh_key', None) - self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) - self.fqdn = kwargs.get('fqdn', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) - self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) - self.artifacts = kwargs.get('artifacts', None) - self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) - self.gallery_image_reference = kwargs.get('gallery_image_reference', None) - self.plan_id = kwargs.get('plan_id', None) - self.network_interface = kwargs.get('network_interface', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.allow_claim = kwargs.get('allow_claim', None) - self.storage_type = kwargs.get('storage_type', None) - self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) - self.environment_id = kwargs.get('environment_id', None) - self.data_disk_parameters = kwargs.get('data_disk_parameters', None) - self.schedule_parameters = kwargs.get('schedule_parameters', None) - self.last_known_power_state = kwargs.get('last_known_power_state', None) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment.py deleted file mode 100644 index 2a58002ea2bf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabVirtualMachineCreationParameterFragment(Model): - """Properties for creating a virtual machine. - - :param bulk_creation_parameters: The number of virtual machine instances - to create. - :type bulk_creation_parameters: - ~azure.mgmt.devtestlabs.models.BulkCreationParametersFragment - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParametersFragment'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(LabVirtualMachineCreationParameterFragment, self).__init__(**kwargs) - self.bulk_creation_parameters = kwargs.get('bulk_creation_parameters', None) - self.notes = kwargs.get('notes', None) - self.owner_object_id = kwargs.get('owner_object_id', None) - self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) - self.created_by_user_id = kwargs.get('created_by_user_id', None) - self.created_by_user = kwargs.get('created_by_user', None) - self.created_date = kwargs.get('created_date', None) - self.compute_id = kwargs.get('compute_id', None) - self.custom_image_id = kwargs.get('custom_image_id', None) - self.os_type = kwargs.get('os_type', None) - self.size = kwargs.get('size', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.ssh_key = kwargs.get('ssh_key', None) - self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) - self.fqdn = kwargs.get('fqdn', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) - self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) - self.artifacts = kwargs.get('artifacts', None) - self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) - self.gallery_image_reference = kwargs.get('gallery_image_reference', None) - self.plan_id = kwargs.get('plan_id', None) - self.network_interface = kwargs.get('network_interface', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.allow_claim = kwargs.get('allow_claim', None) - self.storage_type = kwargs.get('storage_type', None) - self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) - self.environment_id = kwargs.get('environment_id', None) - self.data_disk_parameters = kwargs.get('data_disk_parameters', None) - self.schedule_parameters = kwargs.get('schedule_parameters', None) - self.last_known_power_state = kwargs.get('last_known_power_state', None) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment_py3.py deleted file mode 100644 index d583a499210f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment_py3.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabVirtualMachineCreationParameterFragment(Model): - """Properties for creating a virtual machine. - - :param bulk_creation_parameters: The number of virtual machine instances - to create. - :type bulk_creation_parameters: - ~azure.mgmt.devtestlabs.models.BulkCreationParametersFragment - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParametersFragment'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, bulk_creation_parameters=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: - super(LabVirtualMachineCreationParameterFragment, self).__init__(**kwargs) - self.bulk_creation_parameters = bulk_creation_parameters - self.notes = notes - self.owner_object_id = owner_object_id - self.owner_user_principal_name = owner_user_principal_name - self.created_by_user_id = created_by_user_id - self.created_by_user = created_by_user - self.created_date = created_date - self.compute_id = compute_id - self.custom_image_id = custom_image_id - self.os_type = os_type - self.size = size - self.user_name = user_name - self.password = password - self.ssh_key = ssh_key - self.is_authentication_with_ssh_key = is_authentication_with_ssh_key - self.fqdn = fqdn - self.lab_subnet_name = lab_subnet_name - self.lab_virtual_network_id = lab_virtual_network_id - self.disallow_public_ip_address = disallow_public_ip_address - self.artifacts = artifacts - self.artifact_deployment_status = artifact_deployment_status - self.gallery_image_reference = gallery_image_reference - self.plan_id = plan_id - self.network_interface = network_interface - self.expiration_date = expiration_date - self.allow_claim = allow_claim - self.storage_type = storage_type - self.virtual_machine_creation_source = virtual_machine_creation_source - self.environment_id = environment_id - self.data_disk_parameters = data_disk_parameters - self.schedule_parameters = schedule_parameters - self.last_known_power_state = last_known_power_state - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_py3.py deleted file mode 100644 index f6df337a6179..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_py3.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LabVirtualMachineCreationParameter(Model): - """Properties for creating a virtual machine. - - :param bulk_creation_parameters: The number of virtual machine instances - to create. - :type bulk_creation_parameters: - ~azure.mgmt.devtestlabs.models.BulkCreationParameters - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskProperties] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParameters'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, bulk_creation_parameters=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: - super(LabVirtualMachineCreationParameter, self).__init__(**kwargs) - self.bulk_creation_parameters = bulk_creation_parameters - self.notes = notes - self.owner_object_id = owner_object_id - self.owner_user_principal_name = owner_user_principal_name - self.created_by_user_id = created_by_user_id - self.created_by_user = created_by_user - self.created_date = created_date - self.compute_id = compute_id - self.custom_image_id = custom_image_id - self.os_type = os_type - self.size = size - self.user_name = user_name - self.password = password - self.ssh_key = ssh_key - self.is_authentication_with_ssh_key = is_authentication_with_ssh_key - self.fqdn = fqdn - self.lab_subnet_name = lab_subnet_name - self.lab_virtual_network_id = lab_virtual_network_id - self.disallow_public_ip_address = disallow_public_ip_address - self.artifacts = artifacts - self.artifact_deployment_status = artifact_deployment_status - self.gallery_image_reference = gallery_image_reference - self.plan_id = plan_id - self.network_interface = network_interface - self.expiration_date = expiration_date - self.allow_claim = allow_claim - self.storage_type = storage_type - self.virtual_machine_creation_source = virtual_machine_creation_source - self.environment_id = environment_id - self.data_disk_parameters = data_disk_parameters - self.schedule_parameters = schedule_parameters - self.last_known_power_state = last_known_power_state - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment.py deleted file mode 100644 index 132affe5f1ba..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment.py +++ /dev/null @@ -1,177 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class LabVirtualMachineFragment(UpdateResource): - """A virtual machine. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LabVirtualMachineFragment, self).__init__(**kwargs) - self.notes = kwargs.get('notes', None) - self.owner_object_id = kwargs.get('owner_object_id', None) - self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) - self.created_by_user_id = kwargs.get('created_by_user_id', None) - self.created_by_user = kwargs.get('created_by_user', None) - self.created_date = kwargs.get('created_date', None) - self.compute_id = kwargs.get('compute_id', None) - self.custom_image_id = kwargs.get('custom_image_id', None) - self.os_type = kwargs.get('os_type', None) - self.size = kwargs.get('size', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.ssh_key = kwargs.get('ssh_key', None) - self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) - self.fqdn = kwargs.get('fqdn', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) - self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) - self.artifacts = kwargs.get('artifacts', None) - self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) - self.gallery_image_reference = kwargs.get('gallery_image_reference', None) - self.plan_id = kwargs.get('plan_id', None) - self.network_interface = kwargs.get('network_interface', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.allow_claim = kwargs.get('allow_claim', None) - self.storage_type = kwargs.get('storage_type', None) - self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) - self.environment_id = kwargs.get('environment_id', None) - self.data_disk_parameters = kwargs.get('data_disk_parameters', None) - self.schedule_parameters = kwargs.get('schedule_parameters', None) - self.last_known_power_state = kwargs.get('last_known_power_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment_py3.py deleted file mode 100644 index 11dca443d47b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment_py3.py +++ /dev/null @@ -1,177 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class LabVirtualMachineFragment(UpdateResource): - """A virtual machine. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - } - - def __init__(self, *, tags=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, **kwargs) -> None: - super(LabVirtualMachineFragment, self).__init__(tags=tags, **kwargs) - self.notes = notes - self.owner_object_id = owner_object_id - self.owner_user_principal_name = owner_user_principal_name - self.created_by_user_id = created_by_user_id - self.created_by_user = created_by_user - self.created_date = created_date - self.compute_id = compute_id - self.custom_image_id = custom_image_id - self.os_type = os_type - self.size = size - self.user_name = user_name - self.password = password - self.ssh_key = ssh_key - self.is_authentication_with_ssh_key = is_authentication_with_ssh_key - self.fqdn = fqdn - self.lab_subnet_name = lab_subnet_name - self.lab_virtual_network_id = lab_virtual_network_id - self.disallow_public_ip_address = disallow_public_ip_address - self.artifacts = artifacts - self.artifact_deployment_status = artifact_deployment_status - self.gallery_image_reference = gallery_image_reference - self.plan_id = plan_id - self.network_interface = network_interface - self.expiration_date = expiration_date - self.allow_claim = allow_claim - self.storage_type = storage_type - self.virtual_machine_creation_source = virtual_machine_creation_source - self.environment_id = environment_id - self.data_disk_parameters = data_disk_parameters - self.schedule_parameters = schedule_parameters - self.last_known_power_state = last_known_power_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_paged.py deleted file mode 100644 index 08e2d31e58dc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class LabVirtualMachinePaged(Paged): - """ - A paging container for iterating over a list of :class:`LabVirtualMachine ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[LabVirtualMachine]'} - } - - def __init__(self, *args, **kwargs): - - super(LabVirtualMachinePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_py3.py deleted file mode 100644 index 354acb458cc9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_py3.py +++ /dev/null @@ -1,221 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class LabVirtualMachine(Resource): - """A virtual machine. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param notes: The notes of the virtual machine. - :type notes: str - :param owner_object_id: The object identifier of the owner of the virtual - machine. - :type owner_object_id: str - :param owner_user_principal_name: The user principal name of the virtual - machine owner. - :type owner_user_principal_name: str - :param created_by_user_id: The object identifier of the creator of the - virtual machine. - :type created_by_user_id: str - :param created_by_user: The email address of creator of the virtual - machine. - :type created_by_user: str - :param created_date: The creation date of the virtual machine. - :type created_date: datetime - :param compute_id: The resource identifier (Microsoft.Compute) of the - virtual machine. - :type compute_id: str - :param custom_image_id: The custom image identifier of the virtual - machine. - :type custom_image_id: str - :param os_type: The OS type of the virtual machine. - :type os_type: str - :param size: The size of the virtual machine. - :type size: str - :param user_name: The user name of the virtual machine. - :type user_name: str - :param password: The password of the virtual machine administrator. - :type password: str - :param ssh_key: The SSH key of the virtual machine administrator. - :type ssh_key: str - :param is_authentication_with_ssh_key: Indicates whether this virtual - machine uses an SSH key for authentication. - :type is_authentication_with_ssh_key: bool - :param fqdn: The fully-qualified domain name of the virtual machine. - :type fqdn: str - :param lab_subnet_name: The lab subnet name of the virtual machine. - :type lab_subnet_name: str - :param lab_virtual_network_id: The lab virtual network identifier of the - virtual machine. - :type lab_virtual_network_id: str - :param disallow_public_ip_address: Indicates whether the virtual machine - is to be created without a public IP address. - :type disallow_public_ip_address: bool - :param artifacts: The artifacts to be installed on the virtual machine. - :type artifacts: - list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] - :param artifact_deployment_status: The artifact deployment status for the - virtual machine. - :type artifact_deployment_status: - ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties - :param gallery_image_reference: The Microsoft Azure Marketplace image - reference of the virtual machine. - :type gallery_image_reference: - ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param plan_id: The id of the plan associated with the virtual machine - image - :type plan_id: str - :ivar compute_vm: The compute virtual machine properties. - :vartype compute_vm: ~azure.mgmt.devtestlabs.models.ComputeVmProperties - :param network_interface: The network interface properties. - :type network_interface: - ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties - :ivar applicable_schedule: The applicable schedule for the virtual - machine. - :vartype applicable_schedule: - ~azure.mgmt.devtestlabs.models.ApplicableSchedule - :param expiration_date: The expiration date for VM. - :type expiration_date: datetime - :param allow_claim: Indicates whether another user can take ownership of - the virtual machine - :type allow_claim: bool - :param storage_type: Storage type to use for virtual machine (i.e. - Standard, Premium). - :type storage_type: str - :param virtual_machine_creation_source: Tells source of creation of lab - virtual machine. Output property only. Possible values include: - 'FromCustomImage', 'FromGalleryImage' - :type virtual_machine_creation_source: str or - ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource - :param environment_id: The resource ID of the environment that contains - this virtual machine, if any. - :type environment_id: str - :param data_disk_parameters: New or existing data disks to attach to the - virtual machine after creation - :type data_disk_parameters: - list[~azure.mgmt.devtestlabs.models.DataDiskProperties] - :param schedule_parameters: Virtual Machine schedules to be created - :type schedule_parameters: - list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] - :param last_known_power_state: Last known compute power state captured in - DTL - :type last_known_power_state: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'compute_vm': {'readonly': True}, - 'applicable_schedule': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, - 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, - 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, - 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, - 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, - 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, - 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, - 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, - 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, - 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, - 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, - 'plan_id': {'key': 'properties.planId', 'type': 'str'}, - 'compute_vm': {'key': 'properties.computeVm', 'type': 'ComputeVmProperties'}, - 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, - 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, - 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, - 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, **kwargs) -> None: - super(LabVirtualMachine, self).__init__(location=location, tags=tags, **kwargs) - self.notes = notes - self.owner_object_id = owner_object_id - self.owner_user_principal_name = owner_user_principal_name - self.created_by_user_id = created_by_user_id - self.created_by_user = created_by_user - self.created_date = created_date - self.compute_id = compute_id - self.custom_image_id = custom_image_id - self.os_type = os_type - self.size = size - self.user_name = user_name - self.password = password - self.ssh_key = ssh_key - self.is_authentication_with_ssh_key = is_authentication_with_ssh_key - self.fqdn = fqdn - self.lab_subnet_name = lab_subnet_name - self.lab_virtual_network_id = lab_virtual_network_id - self.disallow_public_ip_address = disallow_public_ip_address - self.artifacts = artifacts - self.artifact_deployment_status = artifact_deployment_status - self.gallery_image_reference = gallery_image_reference - self.plan_id = plan_id - self.compute_vm = None - self.network_interface = network_interface - self.applicable_schedule = None - self.expiration_date = expiration_date - self.allow_claim = allow_claim - self.storage_type = storage_type - self.virtual_machine_creation_source = virtual_machine_creation_source - self.environment_id = environment_id - self.data_disk_parameters = data_disk_parameters - self.schedule_parameters = schedule_parameters - self.last_known_power_state = last_known_power_state - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info.py deleted file mode 100644 index 70154219e989..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxOsInfo(Model): - """Information about a Linux OS. - - :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, - DeprovisionRequested, DeprovisionApplied). Possible values include: - 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' - :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState - """ - - _attribute_map = { - 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LinuxOsInfo, self).__init__(**kwargs) - self.linux_os_state = kwargs.get('linux_os_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment.py deleted file mode 100644 index a7b98b278ea7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxOsInfoFragment(Model): - """Information about a Linux OS. - - :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, - DeprovisionRequested, DeprovisionApplied). Possible values include: - 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' - :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState - """ - - _attribute_map = { - 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LinuxOsInfoFragment, self).__init__(**kwargs) - self.linux_os_state = kwargs.get('linux_os_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment_py3.py deleted file mode 100644 index b8b4919c8eab..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxOsInfoFragment(Model): - """Information about a Linux OS. - - :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, - DeprovisionRequested, DeprovisionApplied). Possible values include: - 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' - :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState - """ - - _attribute_map = { - 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, - } - - def __init__(self, *, linux_os_state=None, **kwargs) -> None: - super(LinuxOsInfoFragment, self).__init__(**kwargs) - self.linux_os_state = linux_os_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_py3.py deleted file mode 100644 index a8176b7be240..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinuxOsInfo(Model): - """Information about a Linux OS. - - :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, - DeprovisionRequested, DeprovisionApplied). Possible values include: - 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' - :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState - """ - - _attribute_map = { - 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, - } - - def __init__(self, *, linux_os_state=None, **kwargs) -> None: - super(LinuxOsInfo, self).__init__(**kwargs) - self.linux_os_state = linux_os_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties.py deleted file mode 100644 index 67bd4ee0a9fc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkInterfaceProperties(Model): - """Properties of a network interface. - - :param virtual_network_id: The resource ID of the virtual network. - :type virtual_network_id: str - :param subnet_id: The resource ID of the sub net. - :type subnet_id: str - :param public_ip_address_id: The resource ID of the public IP address. - :type public_ip_address_id: str - :param public_ip_address: The public IP address. - :type public_ip_address: str - :param private_ip_address: The private IP address. - :type private_ip_address: str - :param dns_name: The DNS name. - :type dns_name: str - :param rdp_authority: The RdpAuthority property is a server DNS host name - or IP address followed by the service port number for RDP (Remote Desktop - Protocol). - :type rdp_authority: str - :param ssh_authority: The SshAuthority property is a server DNS host name - or IP address followed by the service port number for SSH. - :type ssh_authority: str - :param shared_public_ip_address_configuration: The configuration for - sharing a public IP address across multiple virtual machines. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfiguration - """ - - _attribute_map = { - 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, - 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, - 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, - 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfiguration'}, - } - - def __init__(self, **kwargs): - super(NetworkInterfaceProperties, self).__init__(**kwargs) - self.virtual_network_id = kwargs.get('virtual_network_id', None) - self.subnet_id = kwargs.get('subnet_id', None) - self.public_ip_address_id = kwargs.get('public_ip_address_id', None) - self.public_ip_address = kwargs.get('public_ip_address', None) - self.private_ip_address = kwargs.get('private_ip_address', None) - self.dns_name = kwargs.get('dns_name', None) - self.rdp_authority = kwargs.get('rdp_authority', None) - self.ssh_authority = kwargs.get('ssh_authority', None) - self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment.py deleted file mode 100644 index e42965548e38..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkInterfacePropertiesFragment(Model): - """Properties of a network interface. - - :param virtual_network_id: The resource ID of the virtual network. - :type virtual_network_id: str - :param subnet_id: The resource ID of the sub net. - :type subnet_id: str - :param public_ip_address_id: The resource ID of the public IP address. - :type public_ip_address_id: str - :param public_ip_address: The public IP address. - :type public_ip_address: str - :param private_ip_address: The private IP address. - :type private_ip_address: str - :param dns_name: The DNS name. - :type dns_name: str - :param rdp_authority: The RdpAuthority property is a server DNS host name - or IP address followed by the service port number for RDP (Remote Desktop - Protocol). - :type rdp_authority: str - :param ssh_authority: The SshAuthority property is a server DNS host name - or IP address followed by the service port number for SSH. - :type ssh_authority: str - :param shared_public_ip_address_configuration: The configuration for - sharing a public IP address across multiple virtual machines. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfigurationFragment - """ - - _attribute_map = { - 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, - 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, - 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, - 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfigurationFragment'}, - } - - def __init__(self, **kwargs): - super(NetworkInterfacePropertiesFragment, self).__init__(**kwargs) - self.virtual_network_id = kwargs.get('virtual_network_id', None) - self.subnet_id = kwargs.get('subnet_id', None) - self.public_ip_address_id = kwargs.get('public_ip_address_id', None) - self.public_ip_address = kwargs.get('public_ip_address', None) - self.private_ip_address = kwargs.get('private_ip_address', None) - self.dns_name = kwargs.get('dns_name', None) - self.rdp_authority = kwargs.get('rdp_authority', None) - self.ssh_authority = kwargs.get('ssh_authority', None) - self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment_py3.py deleted file mode 100644 index 87854401d799..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkInterfacePropertiesFragment(Model): - """Properties of a network interface. - - :param virtual_network_id: The resource ID of the virtual network. - :type virtual_network_id: str - :param subnet_id: The resource ID of the sub net. - :type subnet_id: str - :param public_ip_address_id: The resource ID of the public IP address. - :type public_ip_address_id: str - :param public_ip_address: The public IP address. - :type public_ip_address: str - :param private_ip_address: The private IP address. - :type private_ip_address: str - :param dns_name: The DNS name. - :type dns_name: str - :param rdp_authority: The RdpAuthority property is a server DNS host name - or IP address followed by the service port number for RDP (Remote Desktop - Protocol). - :type rdp_authority: str - :param ssh_authority: The SshAuthority property is a server DNS host name - or IP address followed by the service port number for SSH. - :type ssh_authority: str - :param shared_public_ip_address_configuration: The configuration for - sharing a public IP address across multiple virtual machines. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfigurationFragment - """ - - _attribute_map = { - 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, - 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, - 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, - 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfigurationFragment'}, - } - - def __init__(self, *, virtual_network_id: str=None, subnet_id: str=None, public_ip_address_id: str=None, public_ip_address: str=None, private_ip_address: str=None, dns_name: str=None, rdp_authority: str=None, ssh_authority: str=None, shared_public_ip_address_configuration=None, **kwargs) -> None: - super(NetworkInterfacePropertiesFragment, self).__init__(**kwargs) - self.virtual_network_id = virtual_network_id - self.subnet_id = subnet_id - self.public_ip_address_id = public_ip_address_id - self.public_ip_address = public_ip_address - self.private_ip_address = private_ip_address - self.dns_name = dns_name - self.rdp_authority = rdp_authority - self.ssh_authority = ssh_authority - self.shared_public_ip_address_configuration = shared_public_ip_address_configuration diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_py3.py deleted file mode 100644 index c68daf4e897b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkInterfaceProperties(Model): - """Properties of a network interface. - - :param virtual_network_id: The resource ID of the virtual network. - :type virtual_network_id: str - :param subnet_id: The resource ID of the sub net. - :type subnet_id: str - :param public_ip_address_id: The resource ID of the public IP address. - :type public_ip_address_id: str - :param public_ip_address: The public IP address. - :type public_ip_address: str - :param private_ip_address: The private IP address. - :type private_ip_address: str - :param dns_name: The DNS name. - :type dns_name: str - :param rdp_authority: The RdpAuthority property is a server DNS host name - or IP address followed by the service port number for RDP (Remote Desktop - Protocol). - :type rdp_authority: str - :param ssh_authority: The SshAuthority property is a server DNS host name - or IP address followed by the service port number for SSH. - :type ssh_authority: str - :param shared_public_ip_address_configuration: The configuration for - sharing a public IP address across multiple virtual machines. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfiguration - """ - - _attribute_map = { - 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, - 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, - 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, - 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfiguration'}, - } - - def __init__(self, *, virtual_network_id: str=None, subnet_id: str=None, public_ip_address_id: str=None, public_ip_address: str=None, private_ip_address: str=None, dns_name: str=None, rdp_authority: str=None, ssh_authority: str=None, shared_public_ip_address_configuration=None, **kwargs) -> None: - super(NetworkInterfaceProperties, self).__init__(**kwargs) - self.virtual_network_id = virtual_network_id - self.subnet_id = subnet_id - self.public_ip_address_id = public_ip_address_id - self.public_ip_address = public_ip_address - self.private_ip_address = private_ip_address - self.dns_name = dns_name - self.rdp_authority = rdp_authority - self.ssh_authority = ssh_authority - self.shared_public_ip_address_configuration = shared_public_ip_address_configuration diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel.py deleted file mode 100644 index 7132c4436c6e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class NotificationChannel(Resource): - """A notification. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param web_hook_url: The webhook URL to send notifications to. - :type web_hook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - :param description: Description of notification. - :type description: str - :param events: The list of event for which this notification is enabled. - :type events: list[~azure.mgmt.devtestlabs.models.Event] - :ivar created_date: The creation date of the notification channel. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'events': {'key': 'properties.events', 'type': '[Event]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NotificationChannel, self).__init__(**kwargs) - self.web_hook_url = kwargs.get('web_hook_url', None) - self.email_recipient = kwargs.get('email_recipient', None) - self.notification_locale = kwargs.get('notification_locale', None) - self.description = kwargs.get('description', None) - self.events = kwargs.get('events', None) - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment.py deleted file mode 100644 index 588dee5b2395..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class NotificationChannelFragment(UpdateResource): - """A notification. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param web_hook_url: The webhook URL to send notifications to. - :type web_hook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - :param description: Description of notification. - :type description: str - :param events: The list of event for which this notification is enabled. - :type events: list[~azure.mgmt.devtestlabs.models.EventFragment] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'events': {'key': 'properties.events', 'type': '[EventFragment]'}, - } - - def __init__(self, **kwargs): - super(NotificationChannelFragment, self).__init__(**kwargs) - self.web_hook_url = kwargs.get('web_hook_url', None) - self.email_recipient = kwargs.get('email_recipient', None) - self.notification_locale = kwargs.get('notification_locale', None) - self.description = kwargs.get('description', None) - self.events = kwargs.get('events', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment_py3.py deleted file mode 100644 index a7179388c512..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class NotificationChannelFragment(UpdateResource): - """A notification. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param web_hook_url: The webhook URL to send notifications to. - :type web_hook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - :param description: Description of notification. - :type description: str - :param events: The list of event for which this notification is enabled. - :type events: list[~azure.mgmt.devtestlabs.models.EventFragment] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'events': {'key': 'properties.events', 'type': '[EventFragment]'}, - } - - def __init__(self, *, tags=None, web_hook_url: str=None, email_recipient: str=None, notification_locale: str=None, description: str=None, events=None, **kwargs) -> None: - super(NotificationChannelFragment, self).__init__(tags=tags, **kwargs) - self.web_hook_url = web_hook_url - self.email_recipient = email_recipient - self.notification_locale = notification_locale - self.description = description - self.events = events diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_paged.py deleted file mode 100644 index 9a74839b31a1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class NotificationChannelPaged(Paged): - """ - A paging container for iterating over a list of :class:`NotificationChannel ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[NotificationChannel]'} - } - - def __init__(self, *args, **kwargs): - - super(NotificationChannelPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_py3.py deleted file mode 100644 index 08a0f47db1da..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_py3.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class NotificationChannel(Resource): - """A notification. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param web_hook_url: The webhook URL to send notifications to. - :type web_hook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - :param description: Description of notification. - :type description: str - :param events: The list of event for which this notification is enabled. - :type events: list[~azure.mgmt.devtestlabs.models.Event] - :ivar created_date: The creation date of the notification channel. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'events': {'key': 'properties.events', 'type': '[Event]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, web_hook_url: str=None, email_recipient: str=None, notification_locale: str=None, description: str=None, events=None, **kwargs) -> None: - super(NotificationChannel, self).__init__(location=location, tags=tags, **kwargs) - self.web_hook_url = web_hook_url - self.email_recipient = email_recipient - self.notification_locale = notification_locale - self.description = description - self.events = events - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings.py deleted file mode 100644 index 656eae9f9cb4..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NotificationSettings(Model): - """Notification settings for a schedule. - - :param status: If notifications are enabled for this schedule (i.e. - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param time_in_minutes: Time in minutes before event at which notification - will be sent. - :type time_in_minutes: int - :param webhook_url: The webhook URL to which the notification will be - sent. - :type webhook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, - 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NotificationSettings, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.time_in_minutes = kwargs.get('time_in_minutes', None) - self.webhook_url = kwargs.get('webhook_url', None) - self.email_recipient = kwargs.get('email_recipient', None) - self.notification_locale = kwargs.get('notification_locale', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.py deleted file mode 100644 index bc707e6ecfe7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NotificationSettingsFragment(Model): - """Notification settings for a schedule. - - :param status: If notifications are enabled for this schedule (i.e. - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param time_in_minutes: Time in minutes before event at which notification - will be sent. - :type time_in_minutes: int - :param webhook_url: The webhook URL to which the notification will be - sent. - :type webhook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, - 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NotificationSettingsFragment, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.time_in_minutes = kwargs.get('time_in_minutes', None) - self.webhook_url = kwargs.get('webhook_url', None) - self.email_recipient = kwargs.get('email_recipient', None) - self.notification_locale = kwargs.get('notification_locale', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment_py3.py deleted file mode 100644 index 260ce034f89d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NotificationSettingsFragment(Model): - """Notification settings for a schedule. - - :param status: If notifications are enabled for this schedule (i.e. - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param time_in_minutes: Time in minutes before event at which notification - will be sent. - :type time_in_minutes: int - :param webhook_url: The webhook URL to which the notification will be - sent. - :type webhook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, - 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, - } - - def __init__(self, *, status=None, time_in_minutes: int=None, webhook_url: str=None, email_recipient: str=None, notification_locale: str=None, **kwargs) -> None: - super(NotificationSettingsFragment, self).__init__(**kwargs) - self.status = status - self.time_in_minutes = time_in_minutes - self.webhook_url = webhook_url - self.email_recipient = email_recipient - self.notification_locale = notification_locale diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_py3.py deleted file mode 100644 index 66c77b99768a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NotificationSettings(Model): - """Notification settings for a schedule. - - :param status: If notifications are enabled for this schedule (i.e. - Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param time_in_minutes: Time in minutes before event at which notification - will be sent. - :type time_in_minutes: int - :param webhook_url: The webhook URL to which the notification will be - sent. - :type webhook_url: str - :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon separated email addresses). - :type email_recipient: str - :param notification_locale: The locale to use when sending a notification - (fallback for unsupported languages is EN). - :type notification_locale: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, - 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, - 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, - 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, - } - - def __init__(self, *, status=None, time_in_minutes: int=None, webhook_url: str=None, email_recipient: str=None, notification_locale: str=None, **kwargs) -> None: - super(NotificationSettings, self).__init__(**kwargs) - self.status = status - self.time_in_minutes = time_in_minutes - self.webhook_url = webhook_url - self.email_recipient = email_recipient - self.notification_locale = notification_locale diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters.py deleted file mode 100644 index 8adc994f1e40..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NotifyParameters(Model): - """Properties for generating a Notification. - - :param event_name: The type of event (i.e. AutoShutdown, Cost). Possible - values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - :param json_payload: Properties for the notification in json format. - :type json_payload: str - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - 'json_payload': {'key': 'jsonPayload', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NotifyParameters, self).__init__(**kwargs) - self.event_name = kwargs.get('event_name', None) - self.json_payload = kwargs.get('json_payload', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters_py3.py deleted file mode 100644 index 40b8e900f189..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NotifyParameters(Model): - """Properties for generating a Notification. - - :param event_name: The type of event (i.e. AutoShutdown, Cost). Possible - values include: 'AutoShutdown', 'Cost' - :type event_name: str or - ~azure.mgmt.devtestlabs.models.NotificationChannelEventType - :param json_payload: Properties for the notification in json format. - :type json_payload: str - """ - - _attribute_map = { - 'event_name': {'key': 'eventName', 'type': 'str'}, - 'json_payload': {'key': 'jsonPayload', 'type': 'str'}, - } - - def __init__(self, *, event_name=None, json_payload: str=None, **kwargs) -> None: - super(NotifyParameters, self).__init__(**kwargs) - self.event_name = event_name - self.json_payload = json_payload diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error.py deleted file mode 100644 index 5ee1f80b2712..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationError(Model): - """Error details for the operation in case of a failure. - - :param code: The error code of the operation error. - :type code: str - :param message: The error message of the operation error. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationError, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error_py3.py deleted file mode 100644 index 19c57b944297..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationError(Model): - """Error details for the operation in case of a failure. - - :param code: The error code of the operation error. - :type code: str - :param message: The error message of the operation error. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: - super(OperationError, self).__init__(**kwargs) - self.code = code - self.message = message diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata.py deleted file mode 100644 index 3551895bd8c6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationMetadata(Model): - """The REST API operation supported by DevTestLab ResourceProvider. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: The object that describes the operations - :type display: ~azure.mgmt.devtestlabs.models.OperationMetadataDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationMetadataDisplay'}, - } - - def __init__(self, **kwargs): - super(OperationMetadata, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display.py deleted file mode 100644 index c20b0b519d3e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationMetadataDisplay(Model): - """The object that describes the operations. - - :param provider: Friendly name of the resource provider - :type provider: str - :param resource: Resource type on which the operation is performed. - :type resource: str - :param operation: Operation type: read, write, delete, listKeys/action, - etc. - :type operation: str - :param description: Friendly name of the operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationMetadataDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display_py3.py deleted file mode 100644 index a566cc55bfe8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationMetadataDisplay(Model): - """The object that describes the operations. - - :param provider: Friendly name of the resource provider - :type provider: str - :param resource: Resource type on which the operation is performed. - :type resource: str - :param operation: Operation type: read, write, delete, listKeys/action, - etc. - :type operation: str - :param description: Friendly name of the operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - super(OperationMetadataDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_paged.py deleted file mode 100644 index f0fa25a37bed..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationMetadataPaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationMetadata ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationMetadata]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationMetadataPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_py3.py deleted file mode 100644 index c1f8e2997f51..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationMetadata(Model): - """The REST API operation supported by DevTestLab ResourceProvider. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: The object that describes the operations - :type display: ~azure.mgmt.devtestlabs.models.OperationMetadataDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationMetadataDisplay'}, - } - - def __init__(self, *, name: str=None, display=None, **kwargs) -> None: - super(OperationMetadata, self).__init__(**kwargs) - self.name = name - self.display = display diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result.py deleted file mode 100644 index 90f43aa80f9f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationResult(Model): - """An Operation Result. - - :param status: The operation status. - :type status: str - :param status_code: The status code for the operation. Possible values - include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', - 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', - 'PartialContent', 'MultipleChoices', 'MovedPermanently', 'Redirect', - 'SeeOther', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', - 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', - 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', - 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', - 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', - 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', - 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', - 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', - 'HttpVersionNotSupported' - :type status_code: str or ~azure.mgmt.devtestlabs.models.HttpStatusCode - :param error: Error details for the operation in case of a failure. - :type error: ~azure.mgmt.devtestlabs.models.OperationError - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'status_code': {'key': 'statusCode', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'OperationError'}, - } - - def __init__(self, **kwargs): - super(OperationResult, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.status_code = kwargs.get('status_code', None) - self.error = kwargs.get('error', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result_py3.py deleted file mode 100644 index cb371c521fb0..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationResult(Model): - """An Operation Result. - - :param status: The operation status. - :type status: str - :param status_code: The status code for the operation. Possible values - include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', - 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', - 'PartialContent', 'MultipleChoices', 'MovedPermanently', 'Redirect', - 'SeeOther', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', - 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', - 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', - 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', - 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', - 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', - 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', - 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', - 'HttpVersionNotSupported' - :type status_code: str or ~azure.mgmt.devtestlabs.models.HttpStatusCode - :param error: Error details for the operation in case of a failure. - :type error: ~azure.mgmt.devtestlabs.models.OperationError - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'status_code': {'key': 'statusCode', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'OperationError'}, - } - - def __init__(self, *, status: str=None, status_code=None, error=None, **kwargs) -> None: - super(OperationResult, self).__init__(**kwargs) - self.status = status - self.status_code = status_code - self.error = error diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info.py deleted file mode 100644 index 6e1972e6eace..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ParameterInfo(Model): - """Information about an artifact's parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ParameterInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info_py3.py deleted file mode 100644 index f35b39ef3fe4..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ParameterInfo(Model): - """Information about an artifact's parameter. - - :param name: The name of the artifact parameter. - :type name: str - :param value: The value of the artifact parameter. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: - super(ParameterInfo, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info.py deleted file mode 100644 index a671306eac1c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ParametersValueFileInfo(Model): - """A file containing a set of parameter values for an ARM template. - - :param file_name: File name. - :type file_name: str - :param parameters_value_info: Contents of the file. - :type parameters_value_info: object - """ - - _attribute_map = { - 'file_name': {'key': 'fileName', 'type': 'str'}, - 'parameters_value_info': {'key': 'parametersValueInfo', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ParametersValueFileInfo, self).__init__(**kwargs) - self.file_name = kwargs.get('file_name', None) - self.parameters_value_info = kwargs.get('parameters_value_info', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info_py3.py deleted file mode 100644 index fcbc00df3f23..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ParametersValueFileInfo(Model): - """A file containing a set of parameter values for an ARM template. - - :param file_name: File name. - :type file_name: str - :param parameters_value_info: Contents of the file. - :type parameters_value_info: object - """ - - _attribute_map = { - 'file_name': {'key': 'fileName', 'type': 'str'}, - 'parameters_value_info': {'key': 'parametersValueInfo', 'type': 'object'}, - } - - def __init__(self, *, file_name: str=None, parameters_value_info=None, **kwargs) -> None: - super(ParametersValueFileInfo, self).__init__(**kwargs) - self.file_name = file_name - self.parameters_value_info = parameters_value_info diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties.py deleted file mode 100644 index 73de17d9ee24..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PercentageCostThresholdProperties(Model): - """Properties of a percentage cost threshold. - - :param threshold_value: The cost threshold value. - :type threshold_value: float - """ - - _attribute_map = { - 'threshold_value': {'key': 'thresholdValue', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(PercentageCostThresholdProperties, self).__init__(**kwargs) - self.threshold_value = kwargs.get('threshold_value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties_py3.py deleted file mode 100644 index 22ae6e7d274c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PercentageCostThresholdProperties(Model): - """Properties of a percentage cost threshold. - - :param threshold_value: The cost threshold value. - :type threshold_value: float - """ - - _attribute_map = { - 'threshold_value': {'key': 'thresholdValue', 'type': 'float'}, - } - - def __init__(self, *, threshold_value: float=None, **kwargs) -> None: - super(PercentageCostThresholdProperties, self).__init__(**kwargs) - self.threshold_value = threshold_value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy.py deleted file mode 100644 index 96719fffb5d7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Policy(Resource): - """A Policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the policy. - :type description: str - :param status: The status of the policy. Possible values include: - 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus - :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, - MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', - 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', - 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', - 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' - :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName - :param fact_data: The fact data of the policy. - :type fact_data: str - :param threshold: The threshold of the policy (i.e. a number for - MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). - :type threshold: str - :param evaluator_type: The evaluator type of the policy (i.e. - AllowedValuesPolicy, MaxValuePolicy). Possible values include: - 'AllowedValuesPolicy', 'MaxValuePolicy' - :type evaluator_type: str or - ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType - :ivar created_date: The creation date of the policy. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'fact_name': {'key': 'properties.factName', 'type': 'str'}, - 'fact_data': {'key': 'properties.factData', 'type': 'str'}, - 'threshold': {'key': 'properties.threshold', 'type': 'str'}, - 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Policy, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.status = kwargs.get('status', None) - self.fact_name = kwargs.get('fact_name', None) - self.fact_data = kwargs.get('fact_data', None) - self.threshold = kwargs.get('threshold', None) - self.evaluator_type = kwargs.get('evaluator_type', None) - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment.py deleted file mode 100644 index 4d240945e5a7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class PolicyFragment(UpdateResource): - """A Policy. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the policy. - :type description: str - :param status: The status of the policy. Possible values include: - 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus - :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, - MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', - 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', - 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', - 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' - :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName - :param fact_data: The fact data of the policy. - :type fact_data: str - :param threshold: The threshold of the policy (i.e. a number for - MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). - :type threshold: str - :param evaluator_type: The evaluator type of the policy (i.e. - AllowedValuesPolicy, MaxValuePolicy). Possible values include: - 'AllowedValuesPolicy', 'MaxValuePolicy' - :type evaluator_type: str or - ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'fact_name': {'key': 'properties.factName', 'type': 'str'}, - 'fact_data': {'key': 'properties.factData', 'type': 'str'}, - 'threshold': {'key': 'properties.threshold', 'type': 'str'}, - 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PolicyFragment, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.status = kwargs.get('status', None) - self.fact_name = kwargs.get('fact_name', None) - self.fact_data = kwargs.get('fact_data', None) - self.threshold = kwargs.get('threshold', None) - self.evaluator_type = kwargs.get('evaluator_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment_py3.py deleted file mode 100644 index b10648b0cdc7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class PolicyFragment(UpdateResource): - """A Policy. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the policy. - :type description: str - :param status: The status of the policy. Possible values include: - 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus - :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, - MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', - 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', - 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', - 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' - :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName - :param fact_data: The fact data of the policy. - :type fact_data: str - :param threshold: The threshold of the policy (i.e. a number for - MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). - :type threshold: str - :param evaluator_type: The evaluator type of the policy (i.e. - AllowedValuesPolicy, MaxValuePolicy). Possible values include: - 'AllowedValuesPolicy', 'MaxValuePolicy' - :type evaluator_type: str or - ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'fact_name': {'key': 'properties.factName', 'type': 'str'}, - 'fact_data': {'key': 'properties.factData', 'type': 'str'}, - 'threshold': {'key': 'properties.threshold', 'type': 'str'}, - 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, - } - - def __init__(self, *, tags=None, description: str=None, status=None, fact_name=None, fact_data: str=None, threshold: str=None, evaluator_type=None, **kwargs) -> None: - super(PolicyFragment, self).__init__(tags=tags, **kwargs) - self.description = description - self.status = status - self.fact_name = fact_name - self.fact_data = fact_data - self.threshold = threshold - self.evaluator_type = evaluator_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_paged.py deleted file mode 100644 index 6ef7f073726e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class PolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`Policy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Policy]'} - } - - def __init__(self, *args, **kwargs): - - super(PolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_py3.py deleted file mode 100644 index 1bfd40ab2402..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Policy(Resource): - """A Policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param description: The description of the policy. - :type description: str - :param status: The status of the policy. Possible values include: - 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus - :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, - MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', - 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', - 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', - 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' - :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName - :param fact_data: The fact data of the policy. - :type fact_data: str - :param threshold: The threshold of the policy (i.e. a number for - MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). - :type threshold: str - :param evaluator_type: The evaluator type of the policy (i.e. - AllowedValuesPolicy, MaxValuePolicy). Possible values include: - 'AllowedValuesPolicy', 'MaxValuePolicy' - :type evaluator_type: str or - ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType - :ivar created_date: The creation date of the policy. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'fact_name': {'key': 'properties.factName', 'type': 'str'}, - 'fact_data': {'key': 'properties.factData', 'type': 'str'}, - 'threshold': {'key': 'properties.threshold', 'type': 'str'}, - 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, description: str=None, status=None, fact_name=None, fact_data: str=None, threshold: str=None, evaluator_type=None, **kwargs) -> None: - super(Policy, self).__init__(location=location, tags=tags, **kwargs) - self.description = description - self.status = status - self.fact_name = fact_name - self.fact_data = fact_data - self.threshold = threshold - self.evaluator_type = evaluator_type - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result.py deleted file mode 100644 index 3dc1698dc354..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicySetResult(Model): - """Result of a policy set evaluation. - - :param has_error: A value indicating whether this policy set evaluation - has discovered violations. - :type has_error: bool - :param policy_violations: The list of policy violations. - :type policy_violations: - list[~azure.mgmt.devtestlabs.models.PolicyViolation] - """ - - _attribute_map = { - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'policy_violations': {'key': 'policyViolations', 'type': '[PolicyViolation]'}, - } - - def __init__(self, **kwargs): - super(PolicySetResult, self).__init__(**kwargs) - self.has_error = kwargs.get('has_error', None) - self.policy_violations = kwargs.get('policy_violations', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result_py3.py deleted file mode 100644 index 5368647ec498..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicySetResult(Model): - """Result of a policy set evaluation. - - :param has_error: A value indicating whether this policy set evaluation - has discovered violations. - :type has_error: bool - :param policy_violations: The list of policy violations. - :type policy_violations: - list[~azure.mgmt.devtestlabs.models.PolicyViolation] - """ - - _attribute_map = { - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'policy_violations': {'key': 'policyViolations', 'type': '[PolicyViolation]'}, - } - - def __init__(self, *, has_error: bool=None, policy_violations=None, **kwargs) -> None: - super(PolicySetResult, self).__init__(**kwargs) - self.has_error = has_error - self.policy_violations = policy_violations diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation.py deleted file mode 100644 index b8404db70da6..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicyViolation(Model): - """Policy violation. - - :param code: The code of the policy violation. - :type code: str - :param message: The message of the policy violation. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PolicyViolation, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation_py3.py deleted file mode 100644 index 8f33f97afeed..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicyViolation(Model): - """Policy violation. - - :param code: The code of the policy violation. - :type code: str - :param message: The message of the policy violation. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: - super(PolicyViolation, self).__init__(**kwargs) - self.code = code - self.message = message diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port.py deleted file mode 100644 index 794610b68871..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Port(Model): - """Properties of a network port. - - :param transport_protocol: Protocol type of the port. Possible values - include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param backend_port: Backend port of the target virtual machine. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(Port, self).__init__(**kwargs) - self.transport_protocol = kwargs.get('transport_protocol', None) - self.backend_port = kwargs.get('backend_port', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment.py deleted file mode 100644 index 60e28efa9dd8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PortFragment(Model): - """Properties of a network port. - - :param transport_protocol: Protocol type of the port. Possible values - include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param backend_port: Backend port of the target virtual machine. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(PortFragment, self).__init__(**kwargs) - self.transport_protocol = kwargs.get('transport_protocol', None) - self.backend_port = kwargs.get('backend_port', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment_py3.py deleted file mode 100644 index dd39e446c5ff..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PortFragment(Model): - """Properties of a network port. - - :param transport_protocol: Protocol type of the port. Possible values - include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param backend_port: Backend port of the target virtual machine. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, *, transport_protocol=None, backend_port: int=None, **kwargs) -> None: - super(PortFragment, self).__init__(**kwargs) - self.transport_protocol = transport_protocol - self.backend_port = backend_port diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_py3.py deleted file mode 100644 index c4b7645a0a18..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Port(Model): - """Properties of a network port. - - :param transport_protocol: Protocol type of the port. Possible values - include: 'Tcp', 'Udp' - :type transport_protocol: str or - ~azure.mgmt.devtestlabs.models.TransportProtocol - :param backend_port: Backend port of the target virtual machine. - :type backend_port: int - """ - - _attribute_map = { - 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - } - - def __init__(self, *, transport_protocol=None, backend_port: int=None, **kwargs) -> None: - super(Port, self).__init__(**kwargs) - self.transport_protocol = transport_protocol - self.backend_port = backend_port diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection.py deleted file mode 100644 index 71926d62a621..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RdpConnection(Model): - """Represents a .rdp file. - - :param contents: The contents of the .rdp file - :type contents: str - """ - - _attribute_map = { - 'contents': {'key': 'contents', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RdpConnection, self).__init__(**kwargs) - self.contents = kwargs.get('contents', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection_py3.py deleted file mode 100644 index 3f92de164fea..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RdpConnection(Model): - """Represents a .rdp file. - - :param contents: The contents of the .rdp file - :type contents: str - """ - - _attribute_map = { - 'contents': {'key': 'contents', 'type': 'str'}, - } - - def __init__(self, *, contents: str=None, **kwargs) -> None: - super(RdpConnection, self).__init__(**kwargs) - self.contents = contents diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties.py deleted file mode 100644 index 13725ea5e306..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResizeLabVirtualMachineProperties(Model): - """Request body for resizing a virtual machine. - - :param size: Specifies the size of the virtual machine. - :type size: str - """ - - _attribute_map = { - 'size': {'key': 'size', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResizeLabVirtualMachineProperties, self).__init__(**kwargs) - self.size = kwargs.get('size', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties_py3.py deleted file mode 100644 index 266b19149f7a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResizeLabVirtualMachineProperties(Model): - """Request body for resizing a virtual machine. - - :param size: Specifies the size of the virtual machine. - :type size: str - """ - - _attribute_map = { - 'size': {'key': 'size', 'type': 'str'}, - } - - def __init__(self, *, size: str=None, **kwargs) -> None: - super(ResizeLabVirtualMachineProperties, self).__init__(**kwargs) - self.size = size diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource.py deleted file mode 100644 index f25b57698413..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """An Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource_py3.py deleted file mode 100644 index e59df581aa79..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """An Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties.py deleted file mode 100644 index 210f4a7b2eca..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RetargetScheduleProperties(Model): - """Properties for retargeting a virtual machine schedule. - - :param current_resource_id: The resource Id of the virtual machine on - which the schedule operates - :type current_resource_id: str - :param target_resource_id: The resource Id of the virtual machine that the - schedule should be retargeted to - :type target_resource_id: str - """ - - _attribute_map = { - 'current_resource_id': {'key': 'currentResourceId', 'type': 'str'}, - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RetargetScheduleProperties, self).__init__(**kwargs) - self.current_resource_id = kwargs.get('current_resource_id', None) - self.target_resource_id = kwargs.get('target_resource_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties_py3.py deleted file mode 100644 index debd7258fb28..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RetargetScheduleProperties(Model): - """Properties for retargeting a virtual machine schedule. - - :param current_resource_id: The resource Id of the virtual machine on - which the schedule operates - :type current_resource_id: str - :param target_resource_id: The resource Id of the virtual machine that the - schedule should be retargeted to - :type target_resource_id: str - """ - - _attribute_map = { - 'current_resource_id': {'key': 'currentResourceId', 'type': 'str'}, - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__(self, *, current_resource_id: str=None, target_resource_id: str=None, **kwargs) -> None: - super(RetargetScheduleProperties, self).__init__(**kwargs) - self.current_resource_id = current_resource_id - self.target_resource_id = target_resource_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule.py deleted file mode 100644 index a0c09919fa48..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Schedule(Resource): - """A schedule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettings - :ivar created_date: The creation date of the schedule. - :vartype created_date: datetime - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Schedule, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.task_type = kwargs.get('task_type', None) - self.weekly_recurrence = kwargs.get('weekly_recurrence', None) - self.daily_recurrence = kwargs.get('daily_recurrence', None) - self.hourly_recurrence = kwargs.get('hourly_recurrence', None) - self.time_zone_id = kwargs.get('time_zone_id', None) - self.notification_settings = kwargs.get('notification_settings', None) - self.created_date = None - self.target_resource_id = kwargs.get('target_resource_id', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter.py deleted file mode 100644 index 1eced41c432d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ScheduleCreationParameter(Model): - """Properties for creating a schedule. - - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettings - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ScheduleCreationParameter, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.task_type = kwargs.get('task_type', None) - self.weekly_recurrence = kwargs.get('weekly_recurrence', None) - self.daily_recurrence = kwargs.get('daily_recurrence', None) - self.hourly_recurrence = kwargs.get('hourly_recurrence', None) - self.time_zone_id = kwargs.get('time_zone_id', None) - self.notification_settings = kwargs.get('notification_settings', None) - self.target_resource_id = kwargs.get('target_resource_id', None) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment.py deleted file mode 100644 index e3f67d9d59bf..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ScheduleCreationParameterFragment(Model): - """Properties for creating a schedule. - - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: - ~azure.mgmt.devtestlabs.models.WeekDetailsFragment - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: - ~azure.mgmt.devtestlabs.models.HourDetailsFragment - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ScheduleCreationParameterFragment, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.task_type = kwargs.get('task_type', None) - self.weekly_recurrence = kwargs.get('weekly_recurrence', None) - self.daily_recurrence = kwargs.get('daily_recurrence', None) - self.hourly_recurrence = kwargs.get('hourly_recurrence', None) - self.time_zone_id = kwargs.get('time_zone_id', None) - self.notification_settings = kwargs.get('notification_settings', None) - self.target_resource_id = kwargs.get('target_resource_id', None) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment_py3.py deleted file mode 100644 index 47e9ece35bfb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ScheduleCreationParameterFragment(Model): - """Properties for creating a schedule. - - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: - ~azure.mgmt.devtestlabs.models.WeekDetailsFragment - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: - ~azure.mgmt.devtestlabs.models.HourDetailsFragment - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: - super(ScheduleCreationParameterFragment, self).__init__(**kwargs) - self.status = status - self.task_type = task_type - self.weekly_recurrence = weekly_recurrence - self.daily_recurrence = daily_recurrence - self.hourly_recurrence = hourly_recurrence - self.time_zone_id = time_zone_id - self.notification_settings = notification_settings - self.target_resource_id = target_resource_id - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_py3.py deleted file mode 100644 index 8254f67c85be..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_py3.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ScheduleCreationParameter(Model): - """Properties for creating a schedule. - - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettings - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :param name: The name of the virtual machine or environment - :type name: str - :param location: The location of the new virtual machine or environment - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: - super(ScheduleCreationParameter, self).__init__(**kwargs) - self.status = status - self.task_type = task_type - self.weekly_recurrence = weekly_recurrence - self.daily_recurrence = daily_recurrence - self.hourly_recurrence = hourly_recurrence - self.time_zone_id = time_zone_id - self.notification_settings = notification_settings - self.target_resource_id = target_resource_id - self.name = name - self.location = location - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment.py deleted file mode 100644 index 17cb84a52572..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class ScheduleFragment(UpdateResource): - """A schedule. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: - ~azure.mgmt.devtestlabs.models.WeekDetailsFragment - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: - ~azure.mgmt.devtestlabs.models.HourDetailsFragment - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ScheduleFragment, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.task_type = kwargs.get('task_type', None) - self.weekly_recurrence = kwargs.get('weekly_recurrence', None) - self.daily_recurrence = kwargs.get('daily_recurrence', None) - self.hourly_recurrence = kwargs.get('hourly_recurrence', None) - self.time_zone_id = kwargs.get('time_zone_id', None) - self.notification_settings = kwargs.get('notification_settings', None) - self.target_resource_id = kwargs.get('target_resource_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment_py3.py deleted file mode 100644 index a51222b2406e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class ScheduleFragment(UpdateResource): - """A schedule. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: - ~azure.mgmt.devtestlabs.models.WeekDetailsFragment - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: - ~azure.mgmt.devtestlabs.models.HourDetailsFragment - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - } - - def __init__(self, *, tags=None, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, **kwargs) -> None: - super(ScheduleFragment, self).__init__(tags=tags, **kwargs) - self.status = status - self.task_type = task_type - self.weekly_recurrence = weekly_recurrence - self.daily_recurrence = daily_recurrence - self.hourly_recurrence = hourly_recurrence - self.time_zone_id = time_zone_id - self.notification_settings = notification_settings - self.target_resource_id = target_resource_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_paged.py deleted file mode 100644 index 1aa4946ff51e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SchedulePaged(Paged): - """ - A paging container for iterating over a list of :class:`Schedule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Schedule]'} - } - - def __init__(self, *args, **kwargs): - - super(SchedulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_py3.py deleted file mode 100644 index efd16216ef6e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_py3.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Schedule(Resource): - """A schedule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param status: The status of the schedule (i.e. Enabled, Disabled). - Possible values include: 'Enabled', 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, - LabVmAutoStart). - :type task_type: str - :param weekly_recurrence: If the schedule will occur only some days of the - week, specify the weekly recurrence. - :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails - :param daily_recurrence: If the schedule will occur once each day of the - week, specify the daily recurrence. - :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails - :param hourly_recurrence: If the schedule will occur multiple times a day, - specify the hourly recurrence. - :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails - :param time_zone_id: The time zone ID (e.g. Pacific Standard time). - :type time_zone_id: str - :param notification_settings: Notification settings. - :type notification_settings: - ~azure.mgmt.devtestlabs.models.NotificationSettings - :ivar created_date: The creation date of the schedule. - :vartype created_date: datetime - :param target_resource_id: The resource ID to which the schedule belongs - :type target_resource_id: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'task_type': {'key': 'properties.taskType', 'type': 'str'}, - 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, - 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, - 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, - 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, - 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, **kwargs) -> None: - super(Schedule, self).__init__(location=location, tags=tags, **kwargs) - self.status = status - self.task_type = task_type - self.weekly_recurrence = weekly_recurrence - self.daily_recurrence = daily_recurrence - self.hourly_recurrence = hourly_recurrence - self.time_zone_id = time_zone_id - self.notification_settings = notification_settings - self.created_date = None - self.target_resource_id = target_resource_id - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret.py deleted file mode 100644 index ae1048a9e9ec..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Secret(Resource): - """A secret. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param value: The value of the secret for secret creation. - :type value: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Secret, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment.py deleted file mode 100644 index 06df551c944b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class SecretFragment(UpdateResource): - """A secret. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param value: The value of the secret for secret creation. - :type value: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SecretFragment, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment_py3.py deleted file mode 100644 index 64907637295e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class SecretFragment(UpdateResource): - """A secret. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param value: The value of the secret for secret creation. - :type value: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - } - - def __init__(self, *, tags=None, value: str=None, **kwargs) -> None: - super(SecretFragment, self).__init__(tags=tags, **kwargs) - self.value = value diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_paged.py deleted file mode 100644 index 1c6a8f295064..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SecretPaged(Paged): - """ - A paging container for iterating over a list of :class:`Secret ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Secret]'} - } - - def __init__(self, *args, **kwargs): - - super(SecretPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_py3.py deleted file mode 100644 index 16b45cb8ccde..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Secret(Resource): - """A secret. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param value: The value of the secret for secret creation. - :type value: str - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, value: str=None, **kwargs) -> None: - super(Secret, self).__init__(location=location, tags=tags, **kwargs) - self.value = value - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric.py deleted file mode 100644 index e8f46ff06337..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ServiceFabric(Resource): - """A Service Fabric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param external_service_fabric_id: The backing service fabric resource's - id - :type external_service_fabric_id: str - :param environment_id: The resource id of the environment under which the - service fabric resource is present - :type environment_id: str - :ivar applicable_schedule: The applicable schedule for the virtual - machine. - :vartype applicable_schedule: - ~azure.mgmt.devtestlabs.models.ApplicableSchedule - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'applicable_schedule': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceFabric, self).__init__(**kwargs) - self.external_service_fabric_id = kwargs.get('external_service_fabric_id', None) - self.environment_id = kwargs.get('environment_id', None) - self.applicable_schedule = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment.py deleted file mode 100644 index 8feb8f2b0dcd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class ServiceFabricFragment(UpdateResource): - """A Service Fabric. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param external_service_fabric_id: The backing service fabric resource's - id - :type external_service_fabric_id: str - :param environment_id: The resource id of the environment under which the - service fabric resource is present - :type environment_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceFabricFragment, self).__init__(**kwargs) - self.external_service_fabric_id = kwargs.get('external_service_fabric_id', None) - self.environment_id = kwargs.get('environment_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment_py3.py deleted file mode 100644 index a1471c5984ea..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class ServiceFabricFragment(UpdateResource): - """A Service Fabric. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param external_service_fabric_id: The backing service fabric resource's - id - :type external_service_fabric_id: str - :param environment_id: The resource id of the environment under which the - service fabric resource is present - :type environment_id: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - } - - def __init__(self, *, tags=None, external_service_fabric_id: str=None, environment_id: str=None, **kwargs) -> None: - super(ServiceFabricFragment, self).__init__(tags=tags, **kwargs) - self.external_service_fabric_id = external_service_fabric_id - self.environment_id = environment_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_paged.py deleted file mode 100644 index 7de95722931e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServiceFabricPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServiceFabric ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServiceFabric]'} - } - - def __init__(self, *args, **kwargs): - - super(ServiceFabricPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_py3.py deleted file mode 100644 index 50cf5f715bf4..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ServiceFabric(Resource): - """A Service Fabric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param external_service_fabric_id: The backing service fabric resource's - id - :type external_service_fabric_id: str - :param environment_id: The resource id of the environment under which the - service fabric resource is present - :type environment_id: str - :ivar applicable_schedule: The applicable schedule for the virtual - machine. - :vartype applicable_schedule: - ~azure.mgmt.devtestlabs.models.ApplicableSchedule - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'applicable_schedule': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, - 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, external_service_fabric_id: str=None, environment_id: str=None, **kwargs) -> None: - super(ServiceFabric, self).__init__(location=location, tags=tags, **kwargs) - self.external_service_fabric_id = external_service_fabric_id - self.environment_id = environment_id - self.applicable_schedule = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner.py deleted file mode 100644 index 38d8100572ac..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ServiceRunner(Resource): - """A container for a managed identity to execute DevTest lab services. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the resource. - :type identity: ~azure.mgmt.devtestlabs.models.IdentityProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, - } - - def __init__(self, **kwargs): - super(ServiceRunner, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_paged.py deleted file mode 100644 index c5f8658f70e1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServiceRunnerPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServiceRunner ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServiceRunner]'} - } - - def __init__(self, *args, **kwargs): - - super(ServiceRunnerPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_py3.py deleted file mode 100644 index 5afa18026e0c..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ServiceRunner(Resource): - """A container for a managed identity to execute DevTest lab services. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the resource. - :type identity: ~azure.mgmt.devtestlabs.models.IdentityProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, - } - - def __init__(self, *, location: str=None, tags=None, identity=None, **kwargs) -> None: - super(ServiceRunner, self).__init__(location=location, tags=tags, **kwargs) - self.identity = identity diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration.py deleted file mode 100644 index c372a21093bd..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SharedPublicIpAddressConfiguration(Model): - """Properties of a virtual machine that determine how it is connected to a - load balancer. - - :param inbound_nat_rules: The incoming NAT rules - :type inbound_nat_rules: - list[~azure.mgmt.devtestlabs.models.InboundNatRule] - """ - - _attribute_map = { - 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRule]'}, - } - - def __init__(self, **kwargs): - super(SharedPublicIpAddressConfiguration, self).__init__(**kwargs) - self.inbound_nat_rules = kwargs.get('inbound_nat_rules', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment.py deleted file mode 100644 index 48eef7b014cc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SharedPublicIpAddressConfigurationFragment(Model): - """Properties of a virtual machine that determine how it is connected to a - load balancer. - - :param inbound_nat_rules: The incoming NAT rules - :type inbound_nat_rules: - list[~azure.mgmt.devtestlabs.models.InboundNatRuleFragment] - """ - - _attribute_map = { - 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRuleFragment]'}, - } - - def __init__(self, **kwargs): - super(SharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) - self.inbound_nat_rules = kwargs.get('inbound_nat_rules', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment_py3.py deleted file mode 100644 index d2121254c806..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SharedPublicIpAddressConfigurationFragment(Model): - """Properties of a virtual machine that determine how it is connected to a - load balancer. - - :param inbound_nat_rules: The incoming NAT rules - :type inbound_nat_rules: - list[~azure.mgmt.devtestlabs.models.InboundNatRuleFragment] - """ - - _attribute_map = { - 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRuleFragment]'}, - } - - def __init__(self, *, inbound_nat_rules=None, **kwargs) -> None: - super(SharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) - self.inbound_nat_rules = inbound_nat_rules diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_py3.py deleted file mode 100644 index 13c9209e5140..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SharedPublicIpAddressConfiguration(Model): - """Properties of a virtual machine that determine how it is connected to a - load balancer. - - :param inbound_nat_rules: The incoming NAT rules - :type inbound_nat_rules: - list[~azure.mgmt.devtestlabs.models.InboundNatRule] - """ - - _attribute_map = { - 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRule]'}, - } - - def __init__(self, *, inbound_nat_rules=None, **kwargs) -> None: - super(SharedPublicIpAddressConfiguration, self).__init__(**kwargs) - self.inbound_nat_rules = inbound_nat_rules diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content.py deleted file mode 100644 index 00b760315ab8..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ShutdownNotificationContent(Model): - """The contents of a shutdown notification. Webhooks can use this type to - deserialize the request body when they get notified of an imminent - shutdown. - - :param skip_url: The URL to skip auto-shutdown. - :type skip_url: str - :param delay_url60: The URL to delay shutdown by 60 minutes. - :type delay_url60: str - :param delay_url120: The URL to delay shutdown by 2 hours. - :type delay_url120: str - :param vm_name: The virtual machine to be shut down. - :type vm_name: str - :param guid: The GUID for the virtual machine to be shut down. - :type guid: str - :param owner: The owner of the virtual machine. - :type owner: str - :param vm_url: The URL of the virtual machine. - :type vm_url: str - :param minutes_until_shutdown: Minutes remaining until shutdown - :type minutes_until_shutdown: str - :param event_type: The event for which a notification will be sent. - :type event_type: str - :param text: The text for the notification. - :type text: str - :param subscription_id: The subscription ID for the schedule. - :type subscription_id: str - :param resource_group_name: The resource group name for the schedule. - :type resource_group_name: str - :param lab_name: The lab for the schedule. - :type lab_name: str - """ - - _attribute_map = { - 'skip_url': {'key': 'skipUrl', 'type': 'str'}, - 'delay_url60': {'key': 'delayUrl60', 'type': 'str'}, - 'delay_url120': {'key': 'delayUrl120', 'type': 'str'}, - 'vm_name': {'key': 'vmName', 'type': 'str'}, - 'guid': {'key': 'guid', 'type': 'str'}, - 'owner': {'key': 'owner', 'type': 'str'}, - 'vm_url': {'key': 'vmUrl', 'type': 'str'}, - 'minutes_until_shutdown': {'key': 'minutesUntilShutdown', 'type': 'str'}, - 'event_type': {'key': 'eventType', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, - 'lab_name': {'key': 'labName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ShutdownNotificationContent, self).__init__(**kwargs) - self.skip_url = kwargs.get('skip_url', None) - self.delay_url60 = kwargs.get('delay_url60', None) - self.delay_url120 = kwargs.get('delay_url120', None) - self.vm_name = kwargs.get('vm_name', None) - self.guid = kwargs.get('guid', None) - self.owner = kwargs.get('owner', None) - self.vm_url = kwargs.get('vm_url', None) - self.minutes_until_shutdown = kwargs.get('minutes_until_shutdown', None) - self.event_type = kwargs.get('event_type', None) - self.text = kwargs.get('text', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group_name = kwargs.get('resource_group_name', None) - self.lab_name = kwargs.get('lab_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content_py3.py deleted file mode 100644 index 47242c6a1816..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ShutdownNotificationContent(Model): - """The contents of a shutdown notification. Webhooks can use this type to - deserialize the request body when they get notified of an imminent - shutdown. - - :param skip_url: The URL to skip auto-shutdown. - :type skip_url: str - :param delay_url60: The URL to delay shutdown by 60 minutes. - :type delay_url60: str - :param delay_url120: The URL to delay shutdown by 2 hours. - :type delay_url120: str - :param vm_name: The virtual machine to be shut down. - :type vm_name: str - :param guid: The GUID for the virtual machine to be shut down. - :type guid: str - :param owner: The owner of the virtual machine. - :type owner: str - :param vm_url: The URL of the virtual machine. - :type vm_url: str - :param minutes_until_shutdown: Minutes remaining until shutdown - :type minutes_until_shutdown: str - :param event_type: The event for which a notification will be sent. - :type event_type: str - :param text: The text for the notification. - :type text: str - :param subscription_id: The subscription ID for the schedule. - :type subscription_id: str - :param resource_group_name: The resource group name for the schedule. - :type resource_group_name: str - :param lab_name: The lab for the schedule. - :type lab_name: str - """ - - _attribute_map = { - 'skip_url': {'key': 'skipUrl', 'type': 'str'}, - 'delay_url60': {'key': 'delayUrl60', 'type': 'str'}, - 'delay_url120': {'key': 'delayUrl120', 'type': 'str'}, - 'vm_name': {'key': 'vmName', 'type': 'str'}, - 'guid': {'key': 'guid', 'type': 'str'}, - 'owner': {'key': 'owner', 'type': 'str'}, - 'vm_url': {'key': 'vmUrl', 'type': 'str'}, - 'minutes_until_shutdown': {'key': 'minutesUntilShutdown', 'type': 'str'}, - 'event_type': {'key': 'eventType', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, - 'lab_name': {'key': 'labName', 'type': 'str'}, - } - - def __init__(self, *, skip_url: str=None, delay_url60: str=None, delay_url120: str=None, vm_name: str=None, guid: str=None, owner: str=None, vm_url: str=None, minutes_until_shutdown: str=None, event_type: str=None, text: str=None, subscription_id: str=None, resource_group_name: str=None, lab_name: str=None, **kwargs) -> None: - super(ShutdownNotificationContent, self).__init__(**kwargs) - self.skip_url = skip_url - self.delay_url60 = delay_url60 - self.delay_url120 = delay_url120 - self.vm_name = vm_name - self.guid = guid - self.owner = owner - self.vm_url = vm_url - self.minutes_until_shutdown = minutes_until_shutdown - self.event_type = event_type - self.text = text - self.subscription_id = subscription_id - self.resource_group_name = resource_group_name - self.lab_name = lab_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet.py deleted file mode 100644 index 520ea0b84c0b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Subnet(Model): - """Subnet information. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name of the subnet as seen in the lab. - :type lab_subnet_name: str - :param allow_public_ip: The permission policy of the subnet for allowing - public IP addresses (i.e. Allow, Deny)). Possible values include: - 'Default', 'Deny', 'Allow' - :type allow_public_ip: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Subnet, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.allow_public_ip = kwargs.get('allow_public_ip', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment.py deleted file mode 100644 index db484aef5efc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetFragment(Model): - """Subnet information. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name of the subnet as seen in the lab. - :type lab_subnet_name: str - :param allow_public_ip: The permission policy of the subnet for allowing - public IP addresses (i.e. Allow, Deny)). Possible values include: - 'Default', 'Deny', 'Allow' - :type allow_public_ip: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubnetFragment, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.allow_public_ip = kwargs.get('allow_public_ip', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment_py3.py deleted file mode 100644 index bdca8f51fc58..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetFragment(Model): - """Subnet information. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name of the subnet as seen in the lab. - :type lab_subnet_name: str - :param allow_public_ip: The permission policy of the subnet for allowing - public IP addresses (i.e. Allow, Deny)). Possible values include: - 'Default', 'Deny', 'Allow' - :type allow_public_ip: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, allow_public_ip=None, **kwargs) -> None: - super(SubnetFragment, self).__init__(**kwargs) - self.resource_id = resource_id - self.lab_subnet_name = lab_subnet_name - self.allow_public_ip = allow_public_ip diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override.py deleted file mode 100644 index c091e516241d..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetOverride(Model): - """Property overrides on a subnet of a virtual network. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name given to the subnet within the lab. - :type lab_subnet_name: str - :param use_in_vm_creation_permission: Indicates whether this subnet can be - used during virtual machine creation (i.e. Allow, Deny). Possible values - include: 'Default', 'Deny', 'Allow' - :type use_in_vm_creation_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param use_public_ip_address_permission: Indicates whether public IP - addresses can be assigned to virtual machines on this subnet (i.e. Allow, - Deny). Possible values include: 'Default', 'Deny', 'Allow' - :type use_public_ip_address_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param shared_public_ip_address_configuration: Properties that virtual - machines on this subnet will share. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfiguration - :param virtual_network_pool_name: The virtual network pool associated with - this subnet. - :type virtual_network_pool_name: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, - 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfiguration'}, - 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubnetOverride, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.use_in_vm_creation_permission = kwargs.get('use_in_vm_creation_permission', None) - self.use_public_ip_address_permission = kwargs.get('use_public_ip_address_permission', None) - self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) - self.virtual_network_pool_name = kwargs.get('virtual_network_pool_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment.py deleted file mode 100644 index 839368724e6a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetOverrideFragment(Model): - """Property overrides on a subnet of a virtual network. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name given to the subnet within the lab. - :type lab_subnet_name: str - :param use_in_vm_creation_permission: Indicates whether this subnet can be - used during virtual machine creation (i.e. Allow, Deny). Possible values - include: 'Default', 'Deny', 'Allow' - :type use_in_vm_creation_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param use_public_ip_address_permission: Indicates whether public IP - addresses can be assigned to virtual machines on this subnet (i.e. Allow, - Deny). Possible values include: 'Default', 'Deny', 'Allow' - :type use_public_ip_address_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param shared_public_ip_address_configuration: Properties that virtual - machines on this subnet will share. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfigurationFragment - :param virtual_network_pool_name: The virtual network pool associated with - this subnet. - :type virtual_network_pool_name: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, - 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfigurationFragment'}, - 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubnetOverrideFragment, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.lab_subnet_name = kwargs.get('lab_subnet_name', None) - self.use_in_vm_creation_permission = kwargs.get('use_in_vm_creation_permission', None) - self.use_public_ip_address_permission = kwargs.get('use_public_ip_address_permission', None) - self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) - self.virtual_network_pool_name = kwargs.get('virtual_network_pool_name', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment_py3.py deleted file mode 100644 index a48b90a27c65..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetOverrideFragment(Model): - """Property overrides on a subnet of a virtual network. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name given to the subnet within the lab. - :type lab_subnet_name: str - :param use_in_vm_creation_permission: Indicates whether this subnet can be - used during virtual machine creation (i.e. Allow, Deny). Possible values - include: 'Default', 'Deny', 'Allow' - :type use_in_vm_creation_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param use_public_ip_address_permission: Indicates whether public IP - addresses can be assigned to virtual machines on this subnet (i.e. Allow, - Deny). Possible values include: 'Default', 'Deny', 'Allow' - :type use_public_ip_address_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param shared_public_ip_address_configuration: Properties that virtual - machines on this subnet will share. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfigurationFragment - :param virtual_network_pool_name: The virtual network pool associated with - this subnet. - :type virtual_network_pool_name: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, - 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfigurationFragment'}, - 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, use_in_vm_creation_permission=None, use_public_ip_address_permission=None, shared_public_ip_address_configuration=None, virtual_network_pool_name: str=None, **kwargs) -> None: - super(SubnetOverrideFragment, self).__init__(**kwargs) - self.resource_id = resource_id - self.lab_subnet_name = lab_subnet_name - self.use_in_vm_creation_permission = use_in_vm_creation_permission - self.use_public_ip_address_permission = use_public_ip_address_permission - self.shared_public_ip_address_configuration = shared_public_ip_address_configuration - self.virtual_network_pool_name = virtual_network_pool_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_py3.py deleted file mode 100644 index 30ddcbe9a971..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetOverride(Model): - """Property overrides on a subnet of a virtual network. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name given to the subnet within the lab. - :type lab_subnet_name: str - :param use_in_vm_creation_permission: Indicates whether this subnet can be - used during virtual machine creation (i.e. Allow, Deny). Possible values - include: 'Default', 'Deny', 'Allow' - :type use_in_vm_creation_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param use_public_ip_address_permission: Indicates whether public IP - addresses can be assigned to virtual machines on this subnet (i.e. Allow, - Deny). Possible values include: 'Default', 'Deny', 'Allow' - :type use_public_ip_address_permission: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - :param shared_public_ip_address_configuration: Properties that virtual - machines on this subnet will share. - :type shared_public_ip_address_configuration: - ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfiguration - :param virtual_network_pool_name: The virtual network pool associated with - this subnet. - :type virtual_network_pool_name: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, - 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, - 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfiguration'}, - 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, use_in_vm_creation_permission=None, use_public_ip_address_permission=None, shared_public_ip_address_configuration=None, virtual_network_pool_name: str=None, **kwargs) -> None: - super(SubnetOverride, self).__init__(**kwargs) - self.resource_id = resource_id - self.lab_subnet_name = lab_subnet_name - self.use_in_vm_creation_permission = use_in_vm_creation_permission - self.use_public_ip_address_permission = use_public_ip_address_permission - self.shared_public_ip_address_configuration = shared_public_ip_address_configuration - self.virtual_network_pool_name = virtual_network_pool_name diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_py3.py deleted file mode 100644 index 6faba11229c2..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Subnet(Model): - """Subnet information. - - :param resource_id: The resource ID of the subnet. - :type resource_id: str - :param lab_subnet_name: The name of the subnet as seen in the lab. - :type lab_subnet_name: str - :param allow_public_ip: The permission policy of the subnet for allowing - public IP addresses (i.e. Allow, Deny)). Possible values include: - 'Default', 'Deny', 'Allow' - :type allow_public_ip: str or - ~azure.mgmt.devtestlabs.models.UsagePermissionType - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, - 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, allow_public_ip=None, **kwargs) -> None: - super(Subnet, self).__init__(**kwargs) - self.resource_id = resource_id - self.lab_subnet_name = lab_subnet_name - self.allow_public_ip = allow_public_ip diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration.py deleted file mode 100644 index c300efe3e12a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetSharedPublicIpAddressConfiguration(Model): - """Configuration for public IP address sharing. - - :param allowed_ports: Backend ports that virtual machines on this subnet - are allowed to expose - :type allowed_ports: list[~azure.mgmt.devtestlabs.models.Port] - """ - - _attribute_map = { - 'allowed_ports': {'key': 'allowedPorts', 'type': '[Port]'}, - } - - def __init__(self, **kwargs): - super(SubnetSharedPublicIpAddressConfiguration, self).__init__(**kwargs) - self.allowed_ports = kwargs.get('allowed_ports', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.py deleted file mode 100644 index 737aba0c3385..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetSharedPublicIpAddressConfigurationFragment(Model): - """Configuration for public IP address sharing. - - :param allowed_ports: Backend ports that virtual machines on this subnet - are allowed to expose - :type allowed_ports: list[~azure.mgmt.devtestlabs.models.PortFragment] - """ - - _attribute_map = { - 'allowed_ports': {'key': 'allowedPorts', 'type': '[PortFragment]'}, - } - - def __init__(self, **kwargs): - super(SubnetSharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) - self.allowed_ports = kwargs.get('allowed_ports', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment_py3.py deleted file mode 100644 index b108414e8db0..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetSharedPublicIpAddressConfigurationFragment(Model): - """Configuration for public IP address sharing. - - :param allowed_ports: Backend ports that virtual machines on this subnet - are allowed to expose - :type allowed_ports: list[~azure.mgmt.devtestlabs.models.PortFragment] - """ - - _attribute_map = { - 'allowed_ports': {'key': 'allowedPorts', 'type': '[PortFragment]'}, - } - - def __init__(self, *, allowed_ports=None, **kwargs) -> None: - super(SubnetSharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) - self.allowed_ports = allowed_ports diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_py3.py deleted file mode 100644 index b0149a863f64..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubnetSharedPublicIpAddressConfiguration(Model): - """Configuration for public IP address sharing. - - :param allowed_ports: Backend ports that virtual machines on this subnet - are allowed to expose - :type allowed_ports: list[~azure.mgmt.devtestlabs.models.Port] - """ - - _attribute_map = { - 'allowed_ports': {'key': 'allowedPorts', 'type': '[Port]'}, - } - - def __init__(self, *, allowed_ports=None, **kwargs) -> None: - super(SubnetSharedPublicIpAddressConfiguration, self).__init__(**kwargs) - self.allowed_ports = allowed_ports diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties.py deleted file mode 100644 index d6eca3dfd40e..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TargetCostProperties(Model): - """Properties of a cost target. - - :param status: Target cost status. Possible values include: 'Enabled', - 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.TargetCostStatus - :param target: Lab target cost - :type target: int - :param cost_thresholds: Cost thresholds. - :type cost_thresholds: - list[~azure.mgmt.devtestlabs.models.CostThresholdProperties] - :param cycle_start_date_time: Reporting cycle start date. - :type cycle_start_date_time: datetime - :param cycle_end_date_time: Reporting cycle end date. - :type cycle_end_date_time: datetime - :param cycle_type: Reporting cycle type. Possible values include: - 'CalendarMonth', 'Custom' - :type cycle_type: str or ~azure.mgmt.devtestlabs.models.ReportingCycleType - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'int'}, - 'cost_thresholds': {'key': 'costThresholds', 'type': '[CostThresholdProperties]'}, - 'cycle_start_date_time': {'key': 'cycleStartDateTime', 'type': 'iso-8601'}, - 'cycle_end_date_time': {'key': 'cycleEndDateTime', 'type': 'iso-8601'}, - 'cycle_type': {'key': 'cycleType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TargetCostProperties, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.target = kwargs.get('target', None) - self.cost_thresholds = kwargs.get('cost_thresholds', None) - self.cycle_start_date_time = kwargs.get('cycle_start_date_time', None) - self.cycle_end_date_time = kwargs.get('cycle_end_date_time', None) - self.cycle_type = kwargs.get('cycle_type', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties_py3.py deleted file mode 100644 index 8e79d34b0ed9..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TargetCostProperties(Model): - """Properties of a cost target. - - :param status: Target cost status. Possible values include: 'Enabled', - 'Disabled' - :type status: str or ~azure.mgmt.devtestlabs.models.TargetCostStatus - :param target: Lab target cost - :type target: int - :param cost_thresholds: Cost thresholds. - :type cost_thresholds: - list[~azure.mgmt.devtestlabs.models.CostThresholdProperties] - :param cycle_start_date_time: Reporting cycle start date. - :type cycle_start_date_time: datetime - :param cycle_end_date_time: Reporting cycle end date. - :type cycle_end_date_time: datetime - :param cycle_type: Reporting cycle type. Possible values include: - 'CalendarMonth', 'Custom' - :type cycle_type: str or ~azure.mgmt.devtestlabs.models.ReportingCycleType - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'int'}, - 'cost_thresholds': {'key': 'costThresholds', 'type': '[CostThresholdProperties]'}, - 'cycle_start_date_time': {'key': 'cycleStartDateTime', 'type': 'iso-8601'}, - 'cycle_end_date_time': {'key': 'cycleEndDateTime', 'type': 'iso-8601'}, - 'cycle_type': {'key': 'cycleType', 'type': 'str'}, - } - - def __init__(self, *, status=None, target: int=None, cost_thresholds=None, cycle_start_date_time=None, cycle_end_date_time=None, cycle_type=None, **kwargs) -> None: - super(TargetCostProperties, self).__init__(**kwargs) - self.status = status - self.target = target - self.cost_thresholds = cost_thresholds - self.cycle_start_date_time = cycle_start_date_time - self.cycle_end_date_time = cycle_end_date_time - self.cycle_type = cycle_type diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource.py deleted file mode 100644 index 4849be7f6102..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateResource(Model): - """Represents an update resource. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(UpdateResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource_py3.py deleted file mode 100644 index 62a3c23c2164..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateResource(Model): - """Represents an update resource. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(UpdateResource, self).__init__(**kwargs) - self.tags = tags diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user.py deleted file mode 100644 index 28099b85f900..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class User(Resource): - """Profile of a lab user. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the user. - :type identity: ~azure.mgmt.devtestlabs.models.UserIdentity - :param secret_store: The secret store of the user. - :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStore - :ivar created_date: The creation date of the user profile. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'properties.identity', 'type': 'UserIdentity'}, - 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStore'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(User, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.secret_store = kwargs.get('secret_store', None) - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment.py deleted file mode 100644 index cd9a685bdbbe..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class UserFragment(UpdateResource): - """Profile of a lab user. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the user. - :type identity: ~azure.mgmt.devtestlabs.models.UserIdentityFragment - :param secret_store: The secret store of the user. - :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStoreFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'properties.identity', 'type': 'UserIdentityFragment'}, - 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStoreFragment'}, - } - - def __init__(self, **kwargs): - super(UserFragment, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.secret_store = kwargs.get('secret_store', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment_py3.py deleted file mode 100644 index 357a81712e45..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class UserFragment(UpdateResource): - """Profile of a lab user. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the user. - :type identity: ~azure.mgmt.devtestlabs.models.UserIdentityFragment - :param secret_store: The secret store of the user. - :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStoreFragment - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'properties.identity', 'type': 'UserIdentityFragment'}, - 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStoreFragment'}, - } - - def __init__(self, *, tags=None, identity=None, secret_store=None, **kwargs) -> None: - super(UserFragment, self).__init__(tags=tags, **kwargs) - self.identity = identity - self.secret_store = secret_store diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity.py deleted file mode 100644 index 557f65e2b82f..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserIdentity(Model): - """Identity attributes of a lab user. - - :param principal_name: Set to the principal name / UPN of the client JWT - making the request. - :type principal_name: str - :param principal_id: Set to the principal Id of the client JWT making the - request. Service principal will not have the principal Id. - :type principal_id: str - :param tenant_id: Set to the tenant ID of the client JWT making the - request. - :type tenant_id: str - :param object_id: Set to the object Id of the client JWT making the - request. Not all users have object Id. For CSP (reseller) scenarios for - example, object Id is not available. - :type object_id: str - :param app_id: Set to the app Id of the client JWT making the request. - :type app_id: str - """ - - _attribute_map = { - 'principal_name': {'key': 'principalName', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserIdentity, self).__init__(**kwargs) - self.principal_name = kwargs.get('principal_name', None) - self.principal_id = kwargs.get('principal_id', None) - self.tenant_id = kwargs.get('tenant_id', None) - self.object_id = kwargs.get('object_id', None) - self.app_id = kwargs.get('app_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment.py deleted file mode 100644 index 0783b56f47b3..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserIdentityFragment(Model): - """Identity attributes of a lab user. - - :param principal_name: Set to the principal name / UPN of the client JWT - making the request. - :type principal_name: str - :param principal_id: Set to the principal Id of the client JWT making the - request. Service principal will not have the principal Id. - :type principal_id: str - :param tenant_id: Set to the tenant ID of the client JWT making the - request. - :type tenant_id: str - :param object_id: Set to the object Id of the client JWT making the - request. Not all users have object Id. For CSP (reseller) scenarios for - example, object Id is not available. - :type object_id: str - :param app_id: Set to the app Id of the client JWT making the request. - :type app_id: str - """ - - _attribute_map = { - 'principal_name': {'key': 'principalName', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserIdentityFragment, self).__init__(**kwargs) - self.principal_name = kwargs.get('principal_name', None) - self.principal_id = kwargs.get('principal_id', None) - self.tenant_id = kwargs.get('tenant_id', None) - self.object_id = kwargs.get('object_id', None) - self.app_id = kwargs.get('app_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment_py3.py deleted file mode 100644 index 3c2fdb6e005b..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserIdentityFragment(Model): - """Identity attributes of a lab user. - - :param principal_name: Set to the principal name / UPN of the client JWT - making the request. - :type principal_name: str - :param principal_id: Set to the principal Id of the client JWT making the - request. Service principal will not have the principal Id. - :type principal_id: str - :param tenant_id: Set to the tenant ID of the client JWT making the - request. - :type tenant_id: str - :param object_id: Set to the object Id of the client JWT making the - request. Not all users have object Id. For CSP (reseller) scenarios for - example, object Id is not available. - :type object_id: str - :param app_id: Set to the app Id of the client JWT making the request. - :type app_id: str - """ - - _attribute_map = { - 'principal_name': {'key': 'principalName', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - } - - def __init__(self, *, principal_name: str=None, principal_id: str=None, tenant_id: str=None, object_id: str=None, app_id: str=None, **kwargs) -> None: - super(UserIdentityFragment, self).__init__(**kwargs) - self.principal_name = principal_name - self.principal_id = principal_id - self.tenant_id = tenant_id - self.object_id = object_id - self.app_id = app_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_py3.py deleted file mode 100644 index 03615a6e15b7..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserIdentity(Model): - """Identity attributes of a lab user. - - :param principal_name: Set to the principal name / UPN of the client JWT - making the request. - :type principal_name: str - :param principal_id: Set to the principal Id of the client JWT making the - request. Service principal will not have the principal Id. - :type principal_id: str - :param tenant_id: Set to the tenant ID of the client JWT making the - request. - :type tenant_id: str - :param object_id: Set to the object Id of the client JWT making the - request. Not all users have object Id. For CSP (reseller) scenarios for - example, object Id is not available. - :type object_id: str - :param app_id: Set to the app Id of the client JWT making the request. - :type app_id: str - """ - - _attribute_map = { - 'principal_name': {'key': 'principalName', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - } - - def __init__(self, *, principal_name: str=None, principal_id: str=None, tenant_id: str=None, object_id: str=None, app_id: str=None, **kwargs) -> None: - super(UserIdentity, self).__init__(**kwargs) - self.principal_name = principal_name - self.principal_id = principal_id - self.tenant_id = tenant_id - self.object_id = object_id - self.app_id = app_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_paged.py deleted file mode 100644 index b48ce5901d56..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class UserPaged(Paged): - """ - A paging container for iterating over a list of :class:`User ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[User]'} - } - - def __init__(self, *args, **kwargs): - - super(UserPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_py3.py deleted file mode 100644 index 96d981829827..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class User(Resource): - """Profile of a lab user. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param identity: The identity of the user. - :type identity: ~azure.mgmt.devtestlabs.models.UserIdentity - :param secret_store: The secret store of the user. - :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStore - :ivar created_date: The creation date of the user profile. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'properties.identity', 'type': 'UserIdentity'}, - 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStore'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, identity=None, secret_store=None, **kwargs) -> None: - super(User, self).__init__(location=location, tags=tags, **kwargs) - self.identity = identity - self.secret_store = secret_store - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store.py deleted file mode 100644 index de4ee5cb6447..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserSecretStore(Model): - """Properties of a user's secret store. - - :param key_vault_uri: The URI of the user's Key vault. - :type key_vault_uri: str - :param key_vault_id: The ID of the user's Key vault. - :type key_vault_id: str - """ - - _attribute_map = { - 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, - 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserSecretStore, self).__init__(**kwargs) - self.key_vault_uri = kwargs.get('key_vault_uri', None) - self.key_vault_id = kwargs.get('key_vault_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment.py deleted file mode 100644 index 7789bff72056..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserSecretStoreFragment(Model): - """Properties of a user's secret store. - - :param key_vault_uri: The URI of the user's Key vault. - :type key_vault_uri: str - :param key_vault_id: The ID of the user's Key vault. - :type key_vault_id: str - """ - - _attribute_map = { - 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, - 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserSecretStoreFragment, self).__init__(**kwargs) - self.key_vault_uri = kwargs.get('key_vault_uri', None) - self.key_vault_id = kwargs.get('key_vault_id', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment_py3.py deleted file mode 100644 index 241c44664e06..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserSecretStoreFragment(Model): - """Properties of a user's secret store. - - :param key_vault_uri: The URI of the user's Key vault. - :type key_vault_uri: str - :param key_vault_id: The ID of the user's Key vault. - :type key_vault_id: str - """ - - _attribute_map = { - 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, - 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, - } - - def __init__(self, *, key_vault_uri: str=None, key_vault_id: str=None, **kwargs) -> None: - super(UserSecretStoreFragment, self).__init__(**kwargs) - self.key_vault_uri = key_vault_uri - self.key_vault_id = key_vault_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_py3.py deleted file mode 100644 index ad56603f7926..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserSecretStore(Model): - """Properties of a user's secret store. - - :param key_vault_uri: The URI of the user's Key vault. - :type key_vault_uri: str - :param key_vault_id: The ID of the user's Key vault. - :type key_vault_id: str - """ - - _attribute_map = { - 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, - 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, - } - - def __init__(self, *, key_vault_uri: str=None, key_vault_id: str=None, **kwargs) -> None: - super(UserSecretStore, self).__init__(**kwargs) - self.key_vault_uri = key_vault_uri - self.key_vault_id = key_vault_id diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network.py deleted file mode 100644 index 460ae9a78af0..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VirtualNetwork(Resource): - """A virtual network. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param allowed_subnets: The allowed subnets of the virtual network. - :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.Subnet] - :param description: The description of the virtual network. - :type description: str - :param external_provider_resource_id: The Microsoft.Network resource - identifier of the virtual network. - :type external_provider_resource_id: str - :ivar external_subnets: The external subnet properties. - :vartype external_subnets: - list[~azure.mgmt.devtestlabs.models.ExternalSubnet] - :param subnet_overrides: The subnet overrides of the virtual network. - :type subnet_overrides: - list[~azure.mgmt.devtestlabs.models.SubnetOverride] - :ivar created_date: The creation date of the virtual network. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'external_subnets': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[Subnet]'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, - 'external_subnets': {'key': 'properties.externalSubnets', 'type': '[ExternalSubnet]'}, - 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverride]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualNetwork, self).__init__(**kwargs) - self.allowed_subnets = kwargs.get('allowed_subnets', None) - self.description = kwargs.get('description', None) - self.external_provider_resource_id = kwargs.get('external_provider_resource_id', None) - self.external_subnets = None - self.subnet_overrides = kwargs.get('subnet_overrides', None) - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment.py deleted file mode 100644 index 4840d07f21bb..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource import UpdateResource - - -class VirtualNetworkFragment(UpdateResource): - """A virtual network. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param allowed_subnets: The allowed subnets of the virtual network. - :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.SubnetFragment] - :param description: The description of the virtual network. - :type description: str - :param external_provider_resource_id: The Microsoft.Network resource - identifier of the virtual network. - :type external_provider_resource_id: str - :param subnet_overrides: The subnet overrides of the virtual network. - :type subnet_overrides: - list[~azure.mgmt.devtestlabs.models.SubnetOverrideFragment] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[SubnetFragment]'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, - 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverrideFragment]'}, - } - - def __init__(self, **kwargs): - super(VirtualNetworkFragment, self).__init__(**kwargs) - self.allowed_subnets = kwargs.get('allowed_subnets', None) - self.description = kwargs.get('description', None) - self.external_provider_resource_id = kwargs.get('external_provider_resource_id', None) - self.subnet_overrides = kwargs.get('subnet_overrides', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment_py3.py deleted file mode 100644 index bdc572018008..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_resource_py3 import UpdateResource - - -class VirtualNetworkFragment(UpdateResource): - """A virtual network. - - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param allowed_subnets: The allowed subnets of the virtual network. - :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.SubnetFragment] - :param description: The description of the virtual network. - :type description: str - :param external_provider_resource_id: The Microsoft.Network resource - identifier of the virtual network. - :type external_provider_resource_id: str - :param subnet_overrides: The subnet overrides of the virtual network. - :type subnet_overrides: - list[~azure.mgmt.devtestlabs.models.SubnetOverrideFragment] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[SubnetFragment]'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, - 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverrideFragment]'}, - } - - def __init__(self, *, tags=None, allowed_subnets=None, description: str=None, external_provider_resource_id: str=None, subnet_overrides=None, **kwargs) -> None: - super(VirtualNetworkFragment, self).__init__(tags=tags, **kwargs) - self.allowed_subnets = allowed_subnets - self.description = description - self.external_provider_resource_id = external_provider_resource_id - self.subnet_overrides = subnet_overrides diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_paged.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_paged.py deleted file mode 100644 index c4a6bac12054..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualNetworkPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualNetwork ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualNetwork]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualNetworkPaged, self).__init__(*args, **kwargs) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_py3.py deleted file mode 100644 index 4af05c325513..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class VirtualNetwork(Resource): - """A virtual network. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str - :param tags: The tags of the resource. - :type tags: dict[str, str] - :param allowed_subnets: The allowed subnets of the virtual network. - :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.Subnet] - :param description: The description of the virtual network. - :type description: str - :param external_provider_resource_id: The Microsoft.Network resource - identifier of the virtual network. - :type external_provider_resource_id: str - :ivar external_subnets: The external subnet properties. - :vartype external_subnets: - list[~azure.mgmt.devtestlabs.models.ExternalSubnet] - :param subnet_overrides: The subnet overrides of the virtual network. - :type subnet_overrides: - list[~azure.mgmt.devtestlabs.models.SubnetOverride] - :ivar created_date: The creation date of the virtual network. - :vartype created_date: datetime - :ivar provisioning_state: The provisioning status of the resource. - :vartype provisioning_state: str - :ivar unique_identifier: The unique immutable identifier of a resource - (Guid). - :vartype unique_identifier: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'external_subnets': {'readonly': True}, - 'created_date': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'unique_identifier': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[Subnet]'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, - 'external_subnets': {'key': 'properties.externalSubnets', 'type': '[ExternalSubnet]'}, - 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverride]'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, allowed_subnets=None, description: str=None, external_provider_resource_id: str=None, subnet_overrides=None, **kwargs) -> None: - super(VirtualNetwork, self).__init__(location=location, tags=tags, **kwargs) - self.allowed_subnets = allowed_subnets - self.description = description - self.external_provider_resource_id = external_provider_resource_id - self.external_subnets = None - self.subnet_overrides = subnet_overrides - self.created_date = None - self.provisioning_state = None - self.unique_identifier = None diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details.py deleted file mode 100644 index 92d7a61279c1..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WeekDetails(Model): - """Properties of a weekly schedule. - - :param weekdays: The days of the week for which the schedule is set (e.g. - Sunday, Monday, Tuesday, etc.). - :type weekdays: list[str] - :param time: The time of the day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'weekdays': {'key': 'weekdays', 'type': '[str]'}, - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WeekDetails, self).__init__(**kwargs) - self.weekdays = kwargs.get('weekdays', None) - self.time = kwargs.get('time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment.py deleted file mode 100644 index f40c5e26d54a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WeekDetailsFragment(Model): - """Properties of a weekly schedule. - - :param weekdays: The days of the week for which the schedule is set (e.g. - Sunday, Monday, Tuesday, etc.). - :type weekdays: list[str] - :param time: The time of the day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'weekdays': {'key': 'weekdays', 'type': '[str]'}, - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WeekDetailsFragment, self).__init__(**kwargs) - self.weekdays = kwargs.get('weekdays', None) - self.time = kwargs.get('time', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment_py3.py deleted file mode 100644 index 4521250deffc..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WeekDetailsFragment(Model): - """Properties of a weekly schedule. - - :param weekdays: The days of the week for which the schedule is set (e.g. - Sunday, Monday, Tuesday, etc.). - :type weekdays: list[str] - :param time: The time of the day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'weekdays': {'key': 'weekdays', 'type': '[str]'}, - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, *, weekdays=None, time: str=None, **kwargs) -> None: - super(WeekDetailsFragment, self).__init__(**kwargs) - self.weekdays = weekdays - self.time = time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_py3.py deleted file mode 100644 index d3bdddf6f4e4..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WeekDetails(Model): - """Properties of a weekly schedule. - - :param weekdays: The days of the week for which the schedule is set (e.g. - Sunday, Monday, Tuesday, etc.). - :type weekdays: list[str] - :param time: The time of the day the schedule will occur. - :type time: str - """ - - _attribute_map = { - 'weekdays': {'key': 'weekdays', 'type': '[str]'}, - 'time': {'key': 'time', 'type': 'str'}, - } - - def __init__(self, *, weekdays=None, time: str=None, **kwargs) -> None: - super(WeekDetails, self).__init__(**kwargs) - self.weekdays = weekdays - self.time = time diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info.py deleted file mode 100644 index 377c585b9162..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsOsInfo(Model): - """Information about a Windows OS. - - :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, - SysprepRequested, SysprepApplied). Possible values include: - 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' - :type windows_os_state: str or - ~azure.mgmt.devtestlabs.models.WindowsOsState - """ - - _attribute_map = { - 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WindowsOsInfo, self).__init__(**kwargs) - self.windows_os_state = kwargs.get('windows_os_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment.py deleted file mode 100644 index c54bfea8922a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsOsInfoFragment(Model): - """Information about a Windows OS. - - :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, - SysprepRequested, SysprepApplied). Possible values include: - 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' - :type windows_os_state: str or - ~azure.mgmt.devtestlabs.models.WindowsOsState - """ - - _attribute_map = { - 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WindowsOsInfoFragment, self).__init__(**kwargs) - self.windows_os_state = kwargs.get('windows_os_state', None) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment_py3.py deleted file mode 100644 index e2009eab0094..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsOsInfoFragment(Model): - """Information about a Windows OS. - - :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, - SysprepRequested, SysprepApplied). Possible values include: - 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' - :type windows_os_state: str or - ~azure.mgmt.devtestlabs.models.WindowsOsState - """ - - _attribute_map = { - 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, - } - - def __init__(self, *, windows_os_state=None, **kwargs) -> None: - super(WindowsOsInfoFragment, self).__init__(**kwargs) - self.windows_os_state = windows_os_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_py3.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_py3.py deleted file mode 100644 index 6c59c08b3f5a..000000000000 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WindowsOsInfo(Model): - """Information about a Windows OS. - - :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, - SysprepRequested, SysprepApplied). Possible values include: - 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' - :type windows_os_state: str or - ~azure.mgmt.devtestlabs.models.WindowsOsState - """ - - _attribute_map = { - 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, - } - - def __init__(self, *, windows_os_state=None, **kwargs) -> None: - super(WindowsOsInfo, self).__init__(**kwargs) - self.windows_os_state = windows_os_state diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/__init__.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/__init__.py index 89d5496052a3..659acdca2a6c 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/__init__.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/__init__.py @@ -9,31 +9,31 @@ # regenerated. # -------------------------------------------------------------------------- -from .provider_operations import ProviderOperations -from .labs_operations import LabsOperations -from .operations import Operations -from .global_schedules_operations import GlobalSchedulesOperations -from .artifact_sources_operations import ArtifactSourcesOperations -from .arm_templates_operations import ArmTemplatesOperations -from .artifacts_operations import ArtifactsOperations -from .costs_operations import CostsOperations -from .custom_images_operations import CustomImagesOperations -from .formulas_operations import FormulasOperations -from .gallery_images_operations import GalleryImagesOperations -from .notification_channels_operations import NotificationChannelsOperations -from .policy_sets_operations import PolicySetsOperations -from .policies_operations import PoliciesOperations -from .schedules_operations import SchedulesOperations -from .service_runners_operations import ServiceRunnersOperations -from .users_operations import UsersOperations -from .disks_operations import DisksOperations -from .environments_operations import EnvironmentsOperations -from .secrets_operations import SecretsOperations -from .service_fabrics_operations import ServiceFabricsOperations -from .service_fabric_schedules_operations import ServiceFabricSchedulesOperations -from .virtual_machines_operations import VirtualMachinesOperations -from .virtual_machine_schedules_operations import VirtualMachineSchedulesOperations -from .virtual_networks_operations import VirtualNetworksOperations +from ._provider_operations import ProviderOperations +from ._labs_operations import LabsOperations +from ._operations import Operations +from ._global_schedules_operations import GlobalSchedulesOperations +from ._artifact_sources_operations import ArtifactSourcesOperations +from ._arm_templates_operations import ArmTemplatesOperations +from ._artifacts_operations import ArtifactsOperations +from ._costs_operations import CostsOperations +from ._custom_images_operations import CustomImagesOperations +from ._formulas_operations import FormulasOperations +from ._gallery_images_operations import GalleryImagesOperations +from ._notification_channels_operations import NotificationChannelsOperations +from ._policy_sets_operations import PolicySetsOperations +from ._policies_operations import PoliciesOperations +from ._schedules_operations import SchedulesOperations +from ._service_runners_operations import ServiceRunnersOperations +from ._users_operations import UsersOperations +from ._disks_operations import DisksOperations +from ._environments_operations import EnvironmentsOperations +from ._secrets_operations import SecretsOperations +from ._service_fabrics_operations import ServiceFabricsOperations +from ._service_fabric_schedules_operations import ServiceFabricSchedulesOperations +from ._virtual_machines_operations import VirtualMachinesOperations +from ._virtual_machine_schedules_operations import VirtualMachineSchedulesOperations +from ._virtual_networks_operations import VirtualNetworksOperations __all__ = [ 'ProviderOperations', diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/arm_templates_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_arm_templates_operations.py similarity index 95% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/arm_templates_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_arm_templates_operations.py index fd4567544366..245a750452de 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/arm_templates_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_arm_templates_operations.py @@ -19,6 +19,8 @@ class ArmTemplatesOperations(object): """ArmTemplatesOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.ArmTemplatePaged[~azure.mgmt.devtestlabs.models.ArmTemplate] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -110,6 +111,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -120,12 +126,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ArmTemplatePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ArmTemplatePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ArmTemplatePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/armtemplates'} @@ -140,7 +144,7 @@ def get( :type lab_name: str :param artifact_source_name: The name of the artifact source. :type artifact_source_name: str - :param name: The name of the azure Resource Manager template. + :param name: The name of the azure resource manager template. :type name: str :param expand: Specify the $expand query. Example: 'properties($select=displayName)' @@ -192,7 +196,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ArmTemplate', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifact_sources_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifact_sources_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifact_sources_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifact_sources_operations.py index 67f75d5d6079..6ec87de82fc0 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifact_sources_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifact_sources_operations.py @@ -19,6 +19,8 @@ class ArtifactSourcesOperations(object): """ArtifactSourcesOperations 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. @@ -67,8 +69,7 @@ def list( ~azure.mgmt.devtestlabs.models.ArtifactSourcePaged[~azure.mgmt.devtestlabs.models.ArtifactSource] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -107,6 +108,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -117,12 +123,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ArtifactSourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ArtifactSourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ArtifactSourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources'} @@ -186,7 +190,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ArtifactSource', response) @@ -257,7 +260,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ArtifactSource', response) if response.status_code == 201: @@ -328,7 +330,8 @@ def delete( def update( self, resource_group_name, lab_name, name, artifact_source, custom_headers=None, raw=False, **operation_config): - """Modify properties of artifact sources. + """Allows modifying tags of artifact sources. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -387,7 +390,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ArtifactSource', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifacts_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifacts_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifacts_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifacts_operations.py index d036a6026f51..e4a5d9693cd5 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifacts_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_artifacts_operations.py @@ -19,6 +19,8 @@ class ArtifactsOperations(object): """ArtifactsOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.ArtifactPaged[~azure.mgmt.devtestlabs.models.Artifact] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -110,6 +111,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -120,12 +126,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ArtifactPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ArtifactPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ArtifactPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/artifacts'} @@ -192,7 +196,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Artifact', response) @@ -269,7 +272,6 @@ def generate_arm_template( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ArmTemplateInfo', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/costs_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_costs_operations.py similarity index 98% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/costs_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_costs_operations.py index b63651cdcedc..b0f9ccc59db7 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/costs_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_costs_operations.py @@ -19,6 +19,8 @@ class CostsOperations(object): """CostsOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LabCost', response) @@ -167,7 +168,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LabCost', response) if response.status_code == 201: diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/custom_images_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_custom_images_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/custom_images_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_custom_images_operations.py index 4471269a40a5..06d30d912df6 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/custom_images_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_custom_images_operations.py @@ -21,6 +21,8 @@ class CustomImagesOperations(object): """CustomImagesOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.CustomImagePaged[~azure.mgmt.devtestlabs.models.CustomImage] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -109,6 +110,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.CustomImagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.CustomImagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.CustomImagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/customimages'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CustomImage', response) @@ -391,7 +394,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, name, custom_image, custom_headers=None, raw=False, **operation_config): - """Modify properties of custom images. + """Allows modifying tags of custom images. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -449,7 +453,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CustomImage', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/disks_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_disks_operations.py similarity index 98% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/disks_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_disks_operations.py index 3fbe8eac7cb0..5e5fea17acdd 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/disks_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_disks_operations.py @@ -21,6 +21,8 @@ class DisksOperations(object): """DisksOperations 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. @@ -71,8 +73,7 @@ def list( ~azure.mgmt.devtestlabs.models.DiskPaged[~azure.mgmt.devtestlabs.models.Disk] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -112,6 +113,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -122,12 +128,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DiskPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks'} @@ -194,7 +198,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Disk', response) @@ -405,7 +408,7 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, user_name, name, disk, custom_headers=None, raw=False, **operation_config): - """Modify properties of disks. + """Allows modifying tags of disks. All other properties will be ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -466,7 +469,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Disk', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/environments_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_environments_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/environments_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_environments_operations.py index 61947381c66d..5805df9f86c1 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/environments_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_environments_operations.py @@ -21,6 +21,8 @@ class EnvironmentsOperations(object): """EnvironmentsOperations 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. @@ -71,8 +73,7 @@ def list( ~azure.mgmt.devtestlabs.models.DtlEnvironmentPaged[~azure.mgmt.devtestlabs.models.DtlEnvironment] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -112,6 +113,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -122,12 +128,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DtlEnvironmentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DtlEnvironmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DtlEnvironmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/environments'} @@ -194,7 +198,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DtlEnvironment', response) @@ -406,7 +409,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, user_name, name, dtl_environment, custom_headers=None, raw=False, **operation_config): - """Modify properties of environments. + """Allows modifying tags of environments. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -469,7 +473,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DtlEnvironment', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/formulas_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_formulas_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/formulas_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_formulas_operations.py index 366a1a2a129e..1c0665356f52 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/formulas_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_formulas_operations.py @@ -21,6 +21,8 @@ class FormulasOperations(object): """FormulasOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.FormulaPaged[~azure.mgmt.devtestlabs.models.Formula] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -109,6 +110,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.FormulaPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.FormulaPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.FormulaPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/formulas'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Formula', response) @@ -254,7 +257,7 @@ def _create_or_update_initial( def create_or_update( self, resource_group_name, lab_name, name, formula, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or replace an existing Formula. This operation can take a while + """Create or replace an existing formula. This operation can take a while to complete. :param resource_group_name: The name of the resource group. @@ -365,7 +368,8 @@ def delete( def update( self, resource_group_name, lab_name, name, formula, custom_headers=None, raw=False, **operation_config): - """Modify properties of formulas. + """Allows modifying tags of formulas. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -424,7 +428,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Formula', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/gallery_images_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_gallery_images_operations.py similarity index 93% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/gallery_images_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_gallery_images_operations.py index 849946066b15..97c3cf13e2c0 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/gallery_images_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_gallery_images_operations.py @@ -19,6 +19,8 @@ class GalleryImagesOperations(object): """GalleryImagesOperations 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. @@ -67,8 +69,7 @@ def list( ~azure.mgmt.devtestlabs.models.GalleryImagePaged[~azure.mgmt.devtestlabs.models.GalleryImage] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -107,6 +108,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -117,12 +123,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.GalleryImagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.GalleryImagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.GalleryImagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/galleryimages'} diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/global_schedules_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_global_schedules_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/global_schedules_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_global_schedules_operations.py index 736efa3c0cea..c05fe0f1308e 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/global_schedules_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_global_schedules_operations.py @@ -21,6 +21,8 @@ class GlobalSchedulesOperations(object): """GlobalSchedulesOperations 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. @@ -65,8 +67,7 @@ def list_by_subscription( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_subscription.metadata['url'] @@ -103,6 +104,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -113,12 +119,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DevTestLab/schedules'} @@ -151,8 +155,7 @@ def list_by_resource_group( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -190,6 +193,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -200,12 +208,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules'} @@ -266,7 +272,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -334,7 +339,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) if response.status_code == 201: @@ -402,7 +406,8 @@ def delete( def update( self, resource_group_name, name, schedule, custom_headers=None, raw=False, **operation_config): - """Modify properties of schedules. + """Allows modifying tags of schedules. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -457,7 +462,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/labs_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_labs_operations.py similarity index 98% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/labs_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_labs_operations.py index d6ce7c62635f..a0b03f5a0c53 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/labs_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_labs_operations.py @@ -21,6 +21,8 @@ class LabsOperations(object): """LabsOperations 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. @@ -65,8 +67,7 @@ def list_by_subscription( ~azure.mgmt.devtestlabs.models.LabPaged[~azure.mgmt.devtestlabs.models.Lab] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_subscription.metadata['url'] @@ -103,6 +104,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -113,12 +119,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.LabPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.LabPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.LabPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DevTestLab/labs'} @@ -151,8 +155,7 @@ def list_by_resource_group( ~azure.mgmt.devtestlabs.models.LabPaged[~azure.mgmt.devtestlabs.models.Lab] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -190,6 +193,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -200,12 +208,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.LabPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.LabPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.LabPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs'} @@ -266,7 +272,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Lab', response) @@ -461,7 +466,7 @@ def get_long_running_output(response): def update( self, resource_group_name, name, lab, custom_headers=None, raw=False, **operation_config): - """Modify properties of labs. + """Allows modifying tags of labs. All other properties will be ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -516,7 +521,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Lab', response) @@ -850,7 +854,6 @@ def generate_upload_uri( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('GenerateUploadUriResponse', response) @@ -973,8 +976,7 @@ def list_vhds( ~azure.mgmt.devtestlabs.models.LabVhdPaged[~azure.mgmt.devtestlabs.models.LabVhd] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_vhds.metadata['url'] @@ -1005,6 +1007,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -1015,12 +1022,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.LabVhdPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.LabVhdPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.LabVhdPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_vhds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/listVhds'} diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/notification_channels_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_notification_channels_operations.py similarity index 96% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/notification_channels_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_notification_channels_operations.py index 0c19dd07462e..d0f4de2d054b 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/notification_channels_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_notification_channels_operations.py @@ -19,6 +19,8 @@ class NotificationChannelsOperations(object): """NotificationChannelsOperations 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. @@ -67,8 +69,7 @@ def list( ~azure.mgmt.devtestlabs.models.NotificationChannelPaged[~azure.mgmt.devtestlabs.models.NotificationChannel] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -107,6 +108,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -117,12 +123,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.NotificationChannelPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.NotificationChannelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.NotificationChannelPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/notificationchannels'} @@ -135,7 +139,7 @@ def get( :type resource_group_name: str :param lab_name: The name of the lab. :type lab_name: str - :param name: The name of the notificationChannel. + :param name: The name of the notification channel. :type name: str :param expand: Specify the $expand query. Example: 'properties($select=webHookUrl)' @@ -186,7 +190,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('NotificationChannel', response) @@ -199,13 +202,13 @@ def get( def create_or_update( self, resource_group_name, lab_name, name, notification_channel, custom_headers=None, raw=False, **operation_config): - """Create or replace an existing notificationChannel. + """Create or replace an existing notification channel. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param lab_name: The name of the lab. :type lab_name: str - :param name: The name of the notificationChannel. + :param name: The name of the notification channel. :type name: str :param notification_channel: A notification. :type notification_channel: @@ -258,7 +261,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('NotificationChannel', response) if response.status_code == 201: @@ -279,7 +281,7 @@ def delete( :type resource_group_name: str :param lab_name: The name of the lab. :type lab_name: str - :param name: The name of the notificationChannel. + :param name: The name of the notification channel. :type name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -329,13 +331,14 @@ def delete( def update( self, resource_group_name, lab_name, name, notification_channel, custom_headers=None, raw=False, **operation_config): - """Modify properties of notification channels. + """Allows modifying tags of notification channels. All other properties + will be ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param lab_name: The name of the lab. :type lab_name: str - :param name: The name of the notificationChannel. + :param name: The name of the notification channel. :type name: str :param notification_channel: A notification. :type notification_channel: @@ -388,7 +391,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('NotificationChannel', response) @@ -407,7 +409,7 @@ def notify( :type resource_group_name: str :param lab_name: The name of the lab. :type lab_name: str - :param name: The name of the notificationChannel. + :param name: The name of the notification channel. :type name: str :param event_name: The type of event (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_operations.py similarity index 96% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_operations.py index 2f0636e39f26..5576b0e6fc0f 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_operations.py @@ -19,6 +19,8 @@ class Operations(object): """Operations 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. @@ -88,7 +90,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('OperationResult', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policies_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policies_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policies_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policies_operations.py index da02489f324b..90b956a0d88c 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policies_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policies_operations.py @@ -19,6 +19,8 @@ class PoliciesOperations(object): """PoliciesOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.PolicyPaged[~azure.mgmt.devtestlabs.models.Policy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -110,6 +111,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -120,12 +126,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.PolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.PolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.PolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies'} @@ -192,7 +196,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Policy', response) @@ -266,7 +269,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Policy', response) if response.status_code == 201: @@ -340,7 +342,8 @@ def delete( def update( self, resource_group_name, lab_name, policy_set_name, name, policy, custom_headers=None, raw=False, **operation_config): - """Modify properties of policies. + """Allows modifying tags of policies. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -401,7 +404,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Policy', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policy_sets_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policy_sets_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policy_sets_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policy_sets_operations.py index ed602a5ba340..66acd3ffb5e6 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policy_sets_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_policy_sets_operations.py @@ -19,6 +19,8 @@ class PolicySetsOperations(object): """PolicySetsOperations 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. @@ -100,7 +102,6 @@ def evaluate_policies( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('EvaluatePoliciesResponse', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/provider_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_provider_operations.py similarity index 90% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/provider_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_provider_operations.py index 3597edb7fa87..5b12492d4b39 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/provider_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_provider_operations.py @@ -19,6 +19,8 @@ class ProviderOperations(object): """ProviderOperations 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. @@ -51,8 +53,7 @@ def list( ~azure.mgmt.devtestlabs.models.OperationMetadataPaged[~azure.mgmt.devtestlabs.models.OperationMetadata] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -77,6 +78,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -87,12 +93,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationMetadataPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.DevTestLab/operations'} diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/schedules_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_schedules_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/schedules_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_schedules_operations.py index 5f4e9429e3a1..996b11b9e6d4 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/schedules_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_schedules_operations.py @@ -21,6 +21,8 @@ class SchedulesOperations(object): """SchedulesOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -109,6 +110,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -259,7 +262,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) if response.status_code == 201: @@ -330,7 +332,8 @@ def delete( def update( self, resource_group_name, lab_name, name, schedule, custom_headers=None, raw=False, **operation_config): - """Modify properties of schedules. + """Allows modifying tags of schedules. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -388,7 +391,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -502,8 +504,7 @@ def list_applicable( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_applicable.metadata['url'] @@ -535,6 +536,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -545,12 +551,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_applicable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}/listApplicable'} diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/secrets_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_secrets_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/secrets_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_secrets_operations.py index 46e2a62a2b88..aa04f243c68c 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/secrets_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_secrets_operations.py @@ -21,6 +21,8 @@ class SecretsOperations(object): """SecretsOperations 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. @@ -71,8 +73,7 @@ def list( ~azure.mgmt.devtestlabs.models.SecretPaged[~azure.mgmt.devtestlabs.models.Secret] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -112,6 +113,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -122,12 +128,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SecretPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SecretPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SecretPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/secrets'} @@ -194,7 +198,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Secret', response) @@ -377,7 +380,7 @@ def delete( def update( self, resource_group_name, lab_name, user_name, name, tags=None, value=None, custom_headers=None, raw=False, **operation_config): - """Modify properties of secrets. + """Allows modifying tags of secrets. All other properties will be ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -442,7 +445,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Secret', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabric_schedules_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabric_schedules_operations.py similarity index 96% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabric_schedules_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabric_schedules_operations.py index 892b9b3fb50b..62ac4ca15eb1 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabric_schedules_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabric_schedules_operations.py @@ -21,6 +21,8 @@ class ServiceFabricSchedulesOperations(object): """ServiceFabricSchedulesOperations 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. @@ -49,7 +51,7 @@ def list( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param expand: Specify the $expand query. Example: 'properties($select=status)' @@ -73,8 +75,7 @@ def list( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -115,6 +116,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -125,12 +131,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{serviceFabricName}/schedules'} @@ -145,7 +149,7 @@ def get( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param name: The name of the schedule. :type name: str @@ -200,7 +204,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -221,7 +224,7 @@ def create_or_update( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param name: The name of the schedule. :type name: str @@ -277,7 +280,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) if response.status_code == 201: @@ -300,7 +302,7 @@ def delete( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param name: The name of the schedule. :type name: str @@ -354,7 +356,8 @@ def delete( def update( self, resource_group_name, lab_name, user_name, service_fabric_name, name, schedule, custom_headers=None, raw=False, **operation_config): - """Modify properties of schedules. + """Allows modifying tags of schedules. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -362,7 +365,7 @@ def update( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param name: The name of the schedule. :type name: str @@ -418,7 +421,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -480,7 +482,7 @@ def execute( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param service_fabric_name: The name of the service Fabric. + :param service_fabric_name: The name of the service fabric. :type service_fabric_name: str :param name: The name of the schedule. :type name: str diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabrics_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabrics_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabrics_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabrics_operations.py index 076aa87a7963..f3ef18b8584e 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabrics_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_fabrics_operations.py @@ -21,6 +21,8 @@ class ServiceFabricsOperations(object): """ServiceFabricsOperations 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. @@ -71,8 +73,7 @@ def list( ~azure.mgmt.devtestlabs.models.ServiceFabricPaged[~azure.mgmt.devtestlabs.models.ServiceFabric] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -112,6 +113,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -122,12 +128,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServiceFabricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServiceFabricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServiceFabricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/servicefabrics'} @@ -142,7 +146,7 @@ def get( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param expand: Specify the $expand query. Example: 'properties($expand=applicableSchedule)' @@ -194,7 +198,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceFabric', response) @@ -261,7 +264,7 @@ def _create_or_update_initial( def create_or_update( self, resource_group_name, lab_name, user_name, name, service_fabric, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or replace an existing Service Fabric. This operation can take a + """Create or replace an existing service fabric. This operation can take a while to complete. :param resource_group_name: The name of the resource group. @@ -270,7 +273,7 @@ def create_or_update( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param service_fabric: A Service Fabric. :type service_fabric: ~azure.mgmt.devtestlabs.models.ServiceFabric @@ -366,7 +369,7 @@ def delete( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the @@ -405,7 +408,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, user_name, name, service_fabric, custom_headers=None, raw=False, **operation_config): - """Modify properties of service fabrics. + """Allows modifying tags of service fabrics. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -413,7 +417,7 @@ def update( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param service_fabric: A Service Fabric. :type service_fabric: @@ -467,7 +471,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceFabric', response) @@ -488,7 +491,7 @@ def list_applicable_schedules( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -535,7 +538,6 @@ def list_applicable_schedules( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ApplicableSchedule', response) @@ -596,7 +598,7 @@ def start( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the @@ -683,7 +685,7 @@ def stop( :type lab_name: str :param user_name: The name of the user profile. :type user_name: str - :param name: The name of the service Fabric. + :param name: The name of the service fabric. :type name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_runners_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_runners_operations.py similarity index 71% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_runners_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_runners_operations.py index 83b4e9dae88c..aa464691b2fd 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_runners_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_service_runners_operations.py @@ -19,6 +19,8 @@ class ServiceRunnersOperations(object): """ServiceRunnersOperations 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. @@ -37,91 +39,6 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def list( - self, resource_group_name, lab_name, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """List service runners in a given lab. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param lab_name: The name of the lab. - :type lab_name: str - :param filter: The filter to apply to the operation. Example: - '$filter=contains(name,'myName') - :type filter: str - :param top: The maximum number of resources to return from the - operation. Example: '$top=10' - :type top: int - :param orderby: The ordering expression for the results, using OData - notation. Example: '$orderby=name desc' - :type orderby: 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: An iterator like instance of ServiceRunner - :rtype: - ~azure.mgmt.devtestlabs.models.ServiceRunnerPaged[~azure.mgmt.devtestlabs.models.ServiceRunner] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.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'), - 'labName': self._serialize.url("lab_name", lab_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # 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 - - return response - - # Deserialize response - deserialized = models.ServiceRunnerPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ServiceRunnerPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/servicerunners'} - def get( self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): """Get service runner. @@ -176,7 +93,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceRunner', response) @@ -189,7 +105,7 @@ def get( def create_or_update( self, resource_group_name, lab_name, name, service_runner, custom_headers=None, raw=False, **operation_config): - """Create or replace an existing Service runner. + """Create or replace an existing service runner. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -248,7 +164,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceRunner', response) if response.status_code == 201: diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/users_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_users_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/users_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_users_operations.py index 5f68155fece3..7e4d74c46fab 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/users_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_users_operations.py @@ -21,6 +21,8 @@ class UsersOperations(object): """UsersOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.UserPaged[~azure.mgmt.devtestlabs.models.User] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -109,6 +110,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.UserPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.UserPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.UserPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('User', response) @@ -391,7 +394,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, name, user, custom_headers=None, raw=False, **operation_config): - """Modify properties of user profiles. + """Allows modifying tags of user profiles. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -449,7 +453,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('User', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machine_schedules_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machine_schedules_operations.py similarity index 98% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machine_schedules_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machine_schedules_operations.py index dadb93a7e064..080a6514a343 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machine_schedules_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machine_schedules_operations.py @@ -21,6 +21,8 @@ class VirtualMachineSchedulesOperations(object): """VirtualMachineSchedulesOperations 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. @@ -71,8 +73,7 @@ def list( ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -112,6 +113,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -122,12 +128,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{virtualMachineName}/schedules'} @@ -194,7 +198,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) @@ -268,7 +271,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) if response.status_code == 201: @@ -342,7 +344,8 @@ def delete( def update( self, resource_group_name, lab_name, virtual_machine_name, name, schedule, custom_headers=None, raw=False, **operation_config): - """Modify properties of schedules. + """Allows modifying tags of schedules. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -403,7 +406,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Schedule', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machines_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machines_operations.py similarity index 99% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machines_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machines_operations.py index 16c7762bfc04..32c51685fb71 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machines_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_machines_operations.py @@ -21,6 +21,8 @@ class VirtualMachinesOperations(object): """VirtualMachinesOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.LabVirtualMachinePaged[~azure.mgmt.devtestlabs.models.LabVirtualMachine] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -109,6 +110,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.LabVirtualMachinePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.LabVirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.LabVirtualMachinePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LabVirtualMachine', response) @@ -254,7 +257,7 @@ def _create_or_update_initial( def create_or_update( self, resource_group_name, lab_name, name, lab_virtual_machine, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or replace an existing Virtual machine. This operation can take + """Create or replace an existing virtual machine. This operation can take a while to complete. :param resource_group_name: The name of the resource group. @@ -392,7 +395,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, name, lab_virtual_machine, custom_headers=None, raw=False, **operation_config): - """Modify properties of virtual machines. + """Allows modifying tags of virtual machines. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -451,7 +455,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LabVirtualMachine', response) @@ -882,7 +885,6 @@ def get_rdp_file_contents( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RdpConnection', response) @@ -947,7 +949,6 @@ def list_applicable_schedules( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ApplicableSchedule', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_networks_operations.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_networks_operations.py similarity index 97% rename from sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_networks_operations.py rename to sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_networks_operations.py index 12ee56cd36ad..659a7cc31b2f 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_networks_operations.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_virtual_networks_operations.py @@ -21,6 +21,8 @@ class VirtualNetworksOperations(object): """VirtualNetworksOperations 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. @@ -69,8 +71,7 @@ def list( ~azure.mgmt.devtestlabs.models.VirtualNetworkPaged[~azure.mgmt.devtestlabs.models.VirtualNetwork] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -109,6 +110,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -119,12 +125,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VirtualNetworkPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VirtualNetworkPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VirtualNetworkPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks'} @@ -188,7 +192,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VirtualNetwork', response) @@ -391,7 +394,8 @@ def get_long_running_output(response): def update( self, resource_group_name, lab_name, name, virtual_network, custom_headers=None, raw=False, **operation_config): - """Modify properties of virtual networks. + """Allows modifying tags of virtual networks. All other properties will be + ignored. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -450,7 +454,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VirtualNetwork', response) diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py index 7f225c6aab41..20cee28211d4 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "3.0.0" +VERSION = "4.0.0" diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/setup.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/setup.py index c74bcc7d5281..b136f9c8d9bf 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/setup.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/setup.py @@ -53,6 +53,7 @@ version=version, description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), long_description=readme + '\n\n' + history, + long_description_content_type='text/x-rst', license='MIT License', author='Microsoft Corporation', author_email='azpysdkhelp@microsoft.com', @@ -63,7 +64,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', From 06312e44db904becdafd3410218de9e5d7a1d543 Mon Sep 17 00:00:00 2001 From: annatisch Date: Fri, 26 Jul 2019 12:15:22 -0700 Subject: [PATCH 143/244] [azure-core] Small fixes for aiohttp (#6490) * Aiohttp read timeout * Aiohttp response status code * Aiohttp content type header * Review feedback * Fixed typo * Fixed async transport sleep coroutine * Fix for stream generators * Reverted attribute error handling * Fixed trio sleep test * Fixed identity test mocks * Fix identity mock to return content-type as string * Fix universal policy tests --- sdk/core/azure-core/azure/core/exceptions.py | 1 + .../azure/core/pipeline/policies/universal.py | 2 +- .../azure/core/pipeline/transport/aiohttp.py | 26 +++++++++---------- .../pipeline/transport/requests_asyncio.py | 20 +++++++------- .../core/pipeline/transport/requests_basic.py | 20 ++++++-------- .../core/pipeline/transport/requests_trio.py | 17 +++++------- .../azure_core_asynctests/test_pipeline.py | 17 ++++++++++++ .../tests/test_universal_pipeline.py | 4 +-- sdk/identity/azure-identity/tests/helpers.py | 2 +- .../azure-identity/tests/test_authn_client.py | 8 +++--- .../azure-identity/tests/test_identity.py | 4 +-- .../tests/test_identity_async.py | 4 +-- 12 files changed, 66 insertions(+), 59 deletions(-) diff --git a/sdk/core/azure-core/azure/core/exceptions.py b/sdk/core/azure-core/azure/core/exceptions.py index ae6ff7c53eb8..b69912108a40 100644 --- a/sdk/core/azure-core/azure/core/exceptions.py +++ b/sdk/core/azure-core/azure/core/exceptions.py @@ -114,6 +114,7 @@ def __init__(self, message=None, response=None, **kwargs): if response: self.reason = response.reason self.status_code = response.status_code + message = message or "Operation returned an invalid status '{}'".format(self.reason) try: try: diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/universal.py b/sdk/core/azure-core/azure/core/pipeline/policies/universal.py index 79b48bb162ce..b9338950ff38 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/universal.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/universal.py @@ -350,7 +350,7 @@ def deserialize_from_http_generics(cls, response): # Try to use content-type from headers if available content_type = None if response.content_type: # type: ignore - content_type = response.content_type[0].strip().lower() # type: ignore + content_type = response.content_type.split(";")[0].strip().lower() # type: ignore # Ouch, this server did not declare what it sent... # Let's guess it's JSON... diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/aiohttp.py b/sdk/core/azure-core/azure/core/pipeline/transport/aiohttp.py index f6ee555cea1c..9fb2eb125a5c 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/aiohttp.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/aiohttp.py @@ -31,7 +31,7 @@ import aiohttp from azure.core.configuration import ConnectionConfiguration -from azure.core.exceptions import ServiceRequestError +from azure.core.exceptions import ServiceRequestError, ServiceResponseError from azure.core.pipeline import Pipeline from requests.exceptions import ( @@ -181,7 +181,8 @@ async def send(self, request: HttpRequest, **config: Any) -> Optional[AsyncHttpR await response.load_body() except aiohttp.client_exceptions.ClientConnectorError as err: error = ServiceRequestError(err, error=err) - + except asyncio.TimeoutError as err: + error = ServiceResponseError(err, error=err) if error: raise error return response @@ -191,19 +192,16 @@ class AioHttpStreamDownloadGenerator(AsyncIterator): """Streams the response body data. :param pipeline: The pipeline object - :param request: The request object :param response: The client response object. - :type response: aiohttp.ClientResponse :param block_size: block size of data sent over connection. :type block_size: int """ - def __init__(self, pipeline: Pipeline, request: HttpRequest, - response: aiohttp.ClientResponse, block_size: int) -> None: + def __init__(self, pipeline: Pipeline, response: AsyncHttpResponse) -> None: self.pipeline = pipeline - self.request = request + self.request = response.request self.response = response - self.block_size = block_size - self.content_length = int(response.headers.get('Content-Length', 0)) + self.block_size = response.block_size + self.content_length = int(response.internal_response.headers.get('Content-Length', 0)) self.downloaded = 0 def __len__(self): @@ -215,13 +213,13 @@ async def __anext__(self): retry_interval = 1000 while retry_active: try: - chunk = await self.response.content.read(self.block_size) + chunk = await self.response.internal_response.content.read(self.block_size) if not chunk: raise _ResponseStopIteration() self.downloaded += self.block_size return chunk except _ResponseStopIteration: - self.response.close() + self.response.internal_response.close() raise StopAsyncIteration() except (ChunkedEncodingError, ConnectionError): retry_total -= 1 @@ -233,7 +231,7 @@ async def __anext__(self): resp = self.pipeline.run(self.request, stream=True, headers=headers) if resp.status_code == 416: raise - chunk = await self.response.content.read(self.block_size) + chunk = await self.response.internal_response.content.read(self.block_size) if not chunk: raise StopIteration() self.downloaded += chunk @@ -243,7 +241,7 @@ async def __anext__(self): raise except Exception as err: _LOGGER.warning("Unable to stream download: %s", err) - self.response.close() + self.response.internal_response.close() raise class AioHttpTransportResponse(AsyncHttpResponse): @@ -282,4 +280,4 @@ def stream_download(self, pipeline) -> AsyncIteratorType[bytes]: :param pipeline: The pipeline object :type pipeline: azure.core.pipeline """ - return AioHttpStreamDownloadGenerator(pipeline, self.request, self.internal_response, self.block_size) + return AioHttpStreamDownloadGenerator(pipeline, self) diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/requests_asyncio.py b/sdk/core/azure-core/azure/core/pipeline/transport/requests_asyncio.py index 1f302034a173..6093713c2928 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/requests_asyncio.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/requests_asyncio.py @@ -78,6 +78,9 @@ async def __aenter__(self): async def __aexit__(self, *exc_details): # pylint: disable=arguments-differ return super(AsyncioRequestsTransport, self).__exit__() + async def sleep(self, duration): + await asyncio.sleep(duration) + async def send(self, request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: # type: ignore """Send the request using this HTTP sender. @@ -135,18 +138,16 @@ class AsyncioStreamDownloadGenerator(AsyncIterator): """Streams the response body data. :param pipeline: The pipeline object - :param request: The request object :param response: The response object. - :param int block_size: block size of data sent over connection. :param generator iter_content_func: Iterator for response data. :param int content_length: size of body in bytes. """ - def __init__(self, pipeline: Pipeline, request: HttpRequest, response: requests.Response, block_size: int) -> None: + def __init__(self, pipeline: Pipeline, response: AsyncHttpResponse) -> None: self.pipeline = pipeline - self.request = request + self.request = response.request self.response = response - self.block_size = block_size - self.iter_content_func = self.response.iter_content(self.block_size) + self.block_size = response.block_size + self.iter_content_func = self.response.internal_response.iter_content(self.block_size) self.content_length = int(response.headers.get('Content-Length', 0)) self.downloaded = 0 @@ -170,7 +171,7 @@ async def __anext__(self): self.downloaded += self.block_size return chunk except _ResponseStopIteration: - self.response.close() + self.response.internal_response.close() raise StopAsyncIteration() except (requests.exceptions.ChunkedEncodingError, requests.exceptions.ConnectionError): @@ -197,7 +198,7 @@ async def __anext__(self): raise except Exception as err: _LOGGER.warning("Unable to stream download: %s", err) - self.response.close() + self.response.internal_response.close() raise @@ -206,5 +207,4 @@ class AsyncioRequestsTransportResponse(AsyncHttpResponse, RequestsTransportRespo """ def stream_download(self, pipeline) -> AsyncIteratorType[bytes]: # type: ignore """Generator for streaming request body data.""" - return AsyncioStreamDownloadGenerator(pipeline, self.request, - self.internal_response, self.block_size) # type: ignore + return AsyncioStreamDownloadGenerator(pipeline, self) # type: ignore diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/requests_basic.py b/sdk/core/azure-core/azure/core/pipeline/transport/requests_basic.py index 8907937c9a5a..95757edb63dd 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/requests_basic.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/requests_basic.py @@ -65,9 +65,7 @@ def __init__(self, request, requests_response, block_size=None): self.status_code = requests_response.status_code self.headers = requests_response.headers self.reason = requests_response.reason - content_type = requests_response.headers.get('content-type') - if content_type: - self.content_type = content_type.split(";") + self.content_type = requests_response.headers.get('content-type') def body(self): return self.internal_response.content @@ -82,18 +80,16 @@ class StreamDownloadGenerator(object): """Generator for streaming response data. :param pipeline: The pipeline object - :param request: The request object :param response: The response object. - :param int block_size: Number of bytes to read into memory. :param generator iter_content_func: Iterator for response data. :param int content_length: size of body in bytes. """ - def __init__(self, pipeline, request, response, block_size): + def __init__(self, pipeline, response): self.pipeline = pipeline - self.request = request + self.request = response.request self.response = response - self.block_size = block_size - self.iter_content_func = self.response.iter_content(self.block_size) + self.block_size = response.block_size + self.iter_content_func = self.response.internal_response.iter_content(self.block_size) self.content_length = int(response.headers.get('Content-Length', 0)) self.downloaded = 0 @@ -115,7 +111,7 @@ def __next__(self): self.downloaded += self.block_size return chunk except StopIteration: - self.response.close() + self.response.internal_response.close() raise StopIteration() except (requests.exceptions.ChunkedEncodingError, requests.exceptions.ConnectionError): @@ -138,7 +134,7 @@ def __next__(self): raise except Exception as err: _LOGGER.warning("Unable to stream download: %s", err) - self.response.close() + self.response.internal_response.close() raise next = __next__ # Python 2 compatibility. @@ -149,7 +145,7 @@ class RequestsTransportResponse(HttpResponse, _RequestsTransportResponseBase): def stream_download(self, pipeline): # type: (PipelineType) -> Iterator[bytes] """Generator for streaming request body data.""" - return StreamDownloadGenerator(pipeline, self.request, self.internal_response, self.block_size) + return StreamDownloadGenerator(pipeline, self) class RequestsTransport(HttpTransport): diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/requests_trio.py b/sdk/core/azure-core/azure/core/pipeline/transport/requests_trio.py index c3a1c591587b..f27f034033ea 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/requests_trio.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/requests_trio.py @@ -53,18 +53,16 @@ class TrioStreamDownloadGenerator(AsyncIterator): """Generator for streaming response data. :param pipeline: The pipeline object - :param request: The request object :param response: The response object. - :param int block_size: Number of bytes to read into memory. :param generator iter_content_func: Iterator for response data. :param int content_length: size of body in bytes. """ - def __init__(self, pipeline: Pipeline, request: HttpRequest, response: requests.Response, block_size: int) -> None: + def __init__(self, pipeline: Pipeline, response: AsyncHttpResponse) -> None: self.pipeline = pipeline - self.request = request + self.request = response.request self.response = response - self.block_size = block_size - self.iter_content_func = self.response.iter_content(self.block_size) + self.block_size = response.block_size + self.iter_content_func = self.response.internal_response.iter_content(self.block_size) self.content_length = int(response.headers.get('Content-Length', 0)) self.downloaded = 0 @@ -85,7 +83,7 @@ async def __anext__(self): self.downloaded += self.block_size return chunk except _ResponseStopIteration: - self.response.close() + self.response.internal_response.close() raise StopAsyncIteration() except (requests.exceptions.ChunkedEncodingError, requests.exceptions.ConnectionError): @@ -111,7 +109,7 @@ async def __anext__(self): raise except Exception as err: _LOGGER.warning("Unable to stream download: %s", err) - self.response.close() + self.response.internal_response.close() raise class TrioRequestsTransportResponse(AsyncHttpResponse, RequestsTransportResponse): # type: ignore @@ -120,8 +118,7 @@ class TrioRequestsTransportResponse(AsyncHttpResponse, RequestsTransportResponse def stream_download(self, pipeline) -> AsyncIteratorType[bytes]: # type: ignore """Generator for streaming response data. """ - return TrioStreamDownloadGenerator(pipeline, self.request, - self.internal_response, self.block_size) # type: ignore + return TrioStreamDownloadGenerator(pipeline, self) # type: ignore class TrioRequestsTransport(RequestsTransport, AsyncHttpTransport): # type: ignore diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_pipeline.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_pipeline.py index d344a9f90fff..bcefb9b4bb1a 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_pipeline.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_pipeline.py @@ -119,6 +119,23 @@ async def test_basic_async_requests(): assert response.http_response.status_code == 200 +@pytest.mark.asyncio +async def test_async_transport_sleep(): + + async with AsyncioRequestsTransport() as transport: + await transport.sleep(1) + + async with AioHttpTransport() as transport: + await transport.sleep(1) + +def test_async_trio_transport_sleep(): + + async def do(): + async with TrioRequestsTransport() as transport: + await transport.sleep(1) + + response = trio.run(do) + @pytest.mark.asyncio async def test_conf_async_requests(): diff --git a/sdk/core/azure-core/tests/test_universal_pipeline.py b/sdk/core/azure-core/tests/test_universal_pipeline.py index 0049e2277374..cc783b0d4c74 100644 --- a/sdk/core/azure-core/tests/test_universal_pipeline.py +++ b/sdk/core/azure-core/tests/test_universal_pipeline.py @@ -123,9 +123,7 @@ class MockResponse(HttpResponse): def __init__(self, body, content_type): super(MockResponse, self).__init__(None, None) self._body = body - self.content_type = None - if content_type: - self.content_type = [content_type] + self.content_type = content_type def body(self): return self._body diff --git a/sdk/identity/azure-identity/tests/helpers.py b/sdk/identity/azure-identity/tests/helpers.py index 8acb3d5f646b..694a92df922a 100644 --- a/sdk/identity/azure-identity/tests/helpers.py +++ b/sdk/identity/azure-identity/tests/helpers.py @@ -41,7 +41,7 @@ def mock_response(status_code=200, headers={}, json_payload=None): if json_payload is not None: response.text = lambda: json.dumps(json_payload) response.headers["content-type"] = "application/json" - response.content_type = ["application/json"] + response.content_type = "application/json" return response diff --git a/sdk/identity/azure-identity/tests/test_authn_client.py b/sdk/identity/azure-identity/tests/test_authn_client.py index 39889f003627..1aca947b3d89 100644 --- a/sdk/identity/azure-identity/tests/test_authn_client.py +++ b/sdk/identity/azure-identity/tests/test_authn_client.py @@ -28,7 +28,7 @@ def test_authn_client_deserialization(): scope = "scope" mock_response = Mock( - headers={"content-type": "application/json"}, status_code=200, content_type=["application/json"] + headers={"content-type": "application/json"}, status_code=200, content_type="application/json" ) mock_send = Mock(return_value=mock_response) @@ -87,7 +87,7 @@ def test_caching_when_only_expires_in_set(): text=lambda: json.dumps({"access_token": access_token, "expires_in": expires_in, "token_type": "Bearer"}), headers={"content-type": "application/json"}, status_code=200, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) @@ -106,7 +106,7 @@ def test_expires_in_strings(): expected_token = "token" mock_response = Mock( - headers={"content-type": "application/json"}, status_code=200, content_type=["application/json"] + headers={"content-type": "application/json"}, status_code=200, content_type="application/json" ) mock_send = Mock(return_value=mock_response) @@ -133,7 +133,7 @@ def test_cache_expiry(): text=lambda: json.dumps(token_payload), headers={"content-type": "application/json"}, status_code=200, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index c9756ad3b344..b017792595a8 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -191,7 +191,7 @@ def test_imds_credential_cache(): text=lambda: json.dumps(token_payload), headers={"content-type": "application/json"}, status_code=200, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) @@ -219,7 +219,7 @@ def test_imds_credential_retries(): mock_response = Mock( text=lambda: b"{}", headers={"content-type": "application/json", "Retry-After": "0"}, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) diff --git a/sdk/identity/azure-identity/tests/test_identity_async.py b/sdk/identity/azure-identity/tests/test_identity_async.py index ba203cd2eb59..03b53db9eccd 100644 --- a/sdk/identity/azure-identity/tests/test_identity_async.py +++ b/sdk/identity/azure-identity/tests/test_identity_async.py @@ -196,7 +196,7 @@ async def test_imds_credential_cache(): text=lambda: json.dumps(token_payload), headers={"content-type": "application/json"}, status_code=200, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) @@ -225,7 +225,7 @@ async def test_imds_credential_retries(): mock_response = Mock( text=lambda: b"{}", headers={"content-type": "application/json", "Retry-After": "0"}, - content_type=["application/json"], + content_type="application/json", ) mock_send = Mock(return_value=mock_response) From 2beee0447a8201cf7d10cb06ae44ecad679582da Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Mon, 29 Jul 2019 14:05:36 -0700 Subject: [PATCH 144/244] decorator only trace very top level function (#6530) --- sdk/core/azure-core/azure/core/tracing/decorator.py | 2 +- .../azure-core/azure/core/tracing/decorator_async.py | 2 +- .../test_tracing_decorator_async.py | 9 +++------ sdk/core/azure-core/tests/test_tracing_decorator.py | 9 +++------ 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 7d5d7bfce407..3986dcaf31ed 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 781e20a6bef2..4df65fee77ef 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index 8b43ddf71a62..82b4f97dc92f 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -139,13 +139,10 @@ async def test_span_with_opencensus_complicated(value): parent = exporter.root assert len(parent.children) == 4 assert parent.children[0].span_data.name == "MockClient.__init__" + assert not parent.children[0].children assert parent.children[1].span_data.name == "MockClient.make_request" - assert parent.children[1].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[1].children[1].span_data.name == "MockClient.make_request" + assert not parent.children[1].children assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index 473060f6097a..764c09396255 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -171,13 +171,10 @@ def test_span_with_opencensus_complicated(self, value): parent = exporter.root assert len(parent.children) == 4 assert parent.children[0].span_data.name == "MockClient.__init__" + assert not parent.children[0].children assert parent.children[1].span_data.name == "MockClient.make_request" - assert parent.children[1].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[1].children[1].span_data.name == "MockClient.make_request" + assert not parent.children[1].children assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children From 42eb70d8917a4bf53fe4d81ff994f563dd83ed54 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Mon, 29 Jul 2019 14:46:26 -0700 Subject: [PATCH 145/244] Import aiohttp only when necessary (#6496) --- sdk/core/azure-core/azure/core/pipeline_client_async.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/core/azure-core/azure/core/pipeline_client_async.py b/sdk/core/azure-core/azure/core/pipeline_client_async.py index 39b6c87c61fb..ad70f9ea7434 100644 --- a/sdk/core/azure-core/azure/core/pipeline_client_async.py +++ b/sdk/core/azure-core/azure/core/pipeline_client_async.py @@ -48,7 +48,6 @@ from .pipeline import AsyncPipeline from .pipeline.transport.base import PipelineClientBase from .pipeline.policies import ContentDecodePolicy -from .pipeline.transport import AioHttpTransport from .pipeline.policies.distributed_tracing import DistributedTracingPolicy @@ -121,6 +120,7 @@ def _build_pipeline(self, config, **kwargs): # pylint: disable=no-self-use ] if not transport: + from .pipeline.transport import AioHttpTransport transport = AioHttpTransport(**kwargs) return AsyncPipeline(transport, policies) From b725551e6a38f7834833ab4f376c273dea906751 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Mon, 29 Jul 2019 19:03:11 -0700 Subject: [PATCH 146/244] document async transport requirement (#6541) --- sdk/identity/azure-identity/README.md | 6 ++++++ sdk/keyvault/azure-keyvault-keys/README.md | 10 +++++----- sdk/keyvault/azure-keyvault-secrets/README.md | 10 +++++----- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/sdk/identity/azure-identity/README.md b/sdk/identity/azure-identity/README.md index b80aa7cb539b..22b1bf6c2019 100644 --- a/sdk/identity/azure-identity/README.md +++ b/sdk/identity/azure-identity/README.md @@ -173,6 +173,12 @@ client = EventHubClient(host, event_hub_path, credential) ``` ## Async credentials: +This library includes a complete async API supported on Python 3.5+. To use the +async credentials in `azure.identity.aio`, you must first install an async +transport, such as [`aiohttp`](https://pypi.org/project/aiohttp/). See +[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/README.md#transport) +for more information. + This example demonstrates authenticating the asynchronous `SecretClient` from [`azure-keyvault-secrets`][azure_keyvault_secrets] with asynchronous credentials. ```py diff --git a/sdk/keyvault/azure-keyvault-keys/README.md b/sdk/keyvault/azure-keyvault-keys/README.md index 0690e0822427..44d5ee7e9179 100644 --- a/sdk/keyvault/azure-keyvault-keys/README.md +++ b/sdk/keyvault/azure-keyvault-keys/README.md @@ -153,10 +153,11 @@ for key in keys: ``` ### Async operations -Python’s [asyncio package][asyncio_package] and its two keywords `async` and `await` serves to declare, build, execute, and manage asynchronous code. -The package supports async API on Python 3.5+ and is identical to synchronous API. - -The following examples provide code snippets for performing async operations in the Key Client library: +This library includes a complete async API supported on Python 3.5+. To use it, you must +first install an async transport, such as [`aiohttp`](https://pypi.org/project/aiohttp/). +See +[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/README.md#transport) +for more information. ### Asynchronously create a Key `create_rsa_key` and `create_ec_key` create RSA and elliptic curve keys in the vault, respectively. @@ -257,7 +258,6 @@ When you submit a pull request, a CLA-bot will automatically determine whether y This project has adopted the [Microsoft Open Source Code of Conduct][code_of_conduct]. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. -[asyncio_package]: https://docs.python.org/3/library/asyncio.html [azure_cloud_shell]: https://shell.azure.com/bash [azure_core_exceptions]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/docs/exceptions.md [azure_identity]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/identity/azure-identity diff --git a/sdk/keyvault/azure-keyvault-secrets/README.md b/sdk/keyvault/azure-keyvault-secrets/README.md index ab50a297d194..a94af9ac724b 100644 --- a/sdk/keyvault/azure-keyvault-secrets/README.md +++ b/sdk/keyvault/azure-keyvault-secrets/README.md @@ -148,10 +148,11 @@ This example lists all the secrets in the specified Key Vault. ``` ### Async operations -Python’s [asyncio package][asyncio_package] and its two keywords `async` and `await` serves to declare, build, execute, and manage asynchronous code. -The package supports async API on Python 3.5+ and is identical to synchronous API. - -The following examples provide code snippets for performing async operations in the Secret Client library: +This library includes a complete async API supported on Python 3.5+. To use it, you must +first install an async transport, such as [`aiohttp`](https://pypi.org/project/aiohttp/). +See +[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/README.md#transport) +for more information. ### Async create a secret This example creates a secret in the Key Vault with the specified optional arguments. @@ -247,7 +248,6 @@ When you submit a pull request, a CLA-bot will automatically determine whether y This project has adopted the [Microsoft Open Source Code of Conduct][code_of_conduct]. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. -[asyncio_package]: https://docs.python.org/3/library/asyncio.html [azure_cloud_shell]: https://shell.azure.com/bash [azure_core_exceptions]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/docs/exceptions.md [azure_identity]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/identity/azure-identity From 760e0598e9c65a1ef69fdf0ae078a6eb6766ce27 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 29 Jul 2019 19:44:44 -0700 Subject: [PATCH 147/244] [AutoPR] alertsmanagement/resource-manager (#5697) * Generated from f4b30b3785ae1fa51f4333f2acd863137d9c84b2 (#5696) removed "required" field from ExpandDetectorParameter * Packaging update of azure-mgmt-alertsmanagement * Packaging update of azure-mgmt-alertsmanagement * regenerated package * recent version * update history and version... again... * added note about general breaking changes --- .../azure-mgmt-alertsmanagement/HISTORY.rst | 21 + .../azure-mgmt-alertsmanagement/MANIFEST.in | 4 + .../azure-mgmt-alertsmanagement/README.rst | 21 +- .../azure/mgmt/alertsmanagement/__init__.py | 7 +- ...client.py => _alerts_management_client.py} | 61 +- .../mgmt/alertsmanagement/_configuration.py | 55 + .../mgmt/alertsmanagement/models/__init__.py | 192 +- ....py => _alerts_management_client_enums.py} | 35 + .../mgmt/alertsmanagement/models/_models.py | 1704 +++++++++++++++++ .../alertsmanagement/models/_models_py3.py | 1704 +++++++++++++++++ .../alertsmanagement/models/_paged_models.py | 79 + .../mgmt/alertsmanagement/models/alert.py | 46 - .../models/alert_modification.py | 47 - .../models/alert_modification_item.py | 54 - .../models/alert_modification_item_py3.py | 54 - .../models/alert_modification_properties.py | 41 - .../alert_modification_properties_py3.py | 41 - .../models/alert_modification_py3.py | 47 - .../alertsmanagement/models/alert_paged.py | 27 - .../models/alert_properties.py | 36 - .../models/alert_properties_py3.py | 36 - .../mgmt/alertsmanagement/models/alert_py3.py | 46 - .../alertsmanagement/models/alerts_summary.py | 46 - .../models/alerts_summary_group.py | 41 - .../models/alerts_summary_group_item.py | 41 - .../models/alerts_summary_group_item_py3.py | 41 - .../models/alerts_summary_group_py3.py | 41 - .../models/alerts_summary_py3.py | 46 - .../alertsmanagement/models/essentials.py | 138 -- .../alertsmanagement/models/essentials_py3.py | 138 -- .../mgmt/alertsmanagement/models/operation.py | 32 - .../models/operation_display.py | 40 - .../models/operation_display_py3.py | 40 - .../models/operation_paged.py | 27 - .../alertsmanagement/models/operation_py3.py | 32 - .../mgmt/alertsmanagement/models/resource.py | 45 - .../alertsmanagement/models/resource_py3.py | 45 - .../alertsmanagement/models/smart_group.py | 118 -- .../models/smart_group_aggregated_property.py | 32 - .../smart_group_aggregated_property_py3.py | 32 - .../models/smart_group_modification.py | 47 - .../models/smart_group_modification_item.py | 54 - .../smart_group_modification_item_py3.py | 54 - .../smart_group_modification_properties.py | 45 - ...smart_group_modification_properties_py3.py | 45 - .../models/smart_group_modification_py3.py | 47 - .../models/smart_group_py3.py | 118 -- .../models/smart_groups_list.py | 32 - .../models/smart_groups_list_py3.py | 32 - .../alertsmanagement/operations/__init__.py | 10 +- .../operations/_action_rules_operations.py | 575 ++++++ ...ts_operations.py => _alerts_operations.py} | 162 +- .../{operations.py => _operations.py} | 20 +- .../_smart_detector_alert_rules_operations.py | 436 +++++ ...rations.py => _smart_groups_operations.py} | 180 +- .../azure/mgmt/alertsmanagement/version.py | 2 +- .../azure-mgmt-alertsmanagement/setup.py | 2 +- 57 files changed, 5003 insertions(+), 2191 deletions(-) rename sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/{alerts_management_client.py => _alerts_management_client.py} (57%) create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py rename sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/{alerts_management_client_enums.py => _alerts_management_client_enums.py} (84%) create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models.py create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models_py3.py create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_paged_models.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_paged.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_paged.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_py3.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list.py delete mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list_py3.py create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_action_rules_operations.py rename sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/{alerts_operations.py => _alerts_operations.py} (81%) rename sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/{operations.py => _operations.py} (87%) create mode 100644 sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py rename sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/{smart_groups_operations.py => _smart_groups_operations.py} (70%) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/HISTORY.rst b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/HISTORY.rst index 2719b1b9c080..145999b84643 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/HISTORY.rst +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/HISTORY.rst @@ -3,6 +3,27 @@ Release History =============== +0.2.0rc1 (2019-07-29) ++++++++++++++++++++++ + +**Features** + +- Added operation AlertsOperations.meta_data +- Added operation group SmartDetectorAlertRulesOperations +- Added operation group ActionRulesOperations + +**General breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes if from some import. +In summary, some modules were incorrectly visible/importable and have been renamed. This fixed several issues caused by usage of classes that were not supposed to be used in the first place. + +- AlertsManagementClient cannot be imported from `azure.mgmt.alertsmanagement.alerts_management_client` anymore (import from `azure.mgmt.alertsmanagement` works like before) +- AlertsManagementClientConfiguration import has been moved from `azure.mgmt.alertsmanagement.alerts_management_client` to `azure.mgmt.alertsmanagement` +- A model `MyClass` from a "models" sub-module cannot be imported anymore using `azure.mgmt.alertsmanagement.models.my_class` (import from `azure.mgmt.alertsmanagement.models` works like before) +- An operation class `MyClassOperations` from an `operations` sub-module cannot be imported anymore using `azure.mgmt.alertsmanagement.operations.my_class_operations` (import from `azure.mgmt.alertsmanagement.operations` works like before) + +Last but not least, HTTP connection pooling is now enabled by default. You should always use a client as a context manager, or call close(), or use no more than one client per process. + 0.1.0 (2018-09-17) ++++++++++++++++++ diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/MANIFEST.in b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/MANIFEST.in index bb37a2723dae..e4884efef41b 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/MANIFEST.in +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/MANIFEST.in @@ -1 +1,5 @@ +recursive-include tests *.py *.yaml include *.rst +include azure/__init__.py +include azure/mgmt/__init__.py + diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/README.rst b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/README.rst index aa17aea1b51f..dad7b90d290e 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/README.rst +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Alerts Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see For a more complete set of Azure libraries, see the `azure `__ bundle package. -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - Usage ===== diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/__init__.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/__init__.py index 5512ab09648e..97a96941bfdd 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/__init__.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .alerts_management_client import AlertsManagementClient -from .version import VERSION +from ._configuration import AlertsManagementClientConfiguration +from ._alerts_management_client import AlertsManagementClient +__all__ = ['AlertsManagementClient', 'AlertsManagementClientConfiguration'] -__all__ = ['AlertsManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/alerts_management_client.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_alerts_management_client.py similarity index 57% rename from sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/alerts_management_client.py rename to sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_alerts_management_client.py index 735b0c12b85c..dea82c97209f 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/alerts_management_client.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_alerts_management_client.py @@ -11,46 +11,14 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.alerts_operations import AlertsOperations -from .operations.smart_groups_operations import SmartGroupsOperations -from . import models - - -class AlertsManagementClientConfiguration(AzureConfiguration): - """Configuration for AlertsManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'http://localhost' - - super(AlertsManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-alertsmanagement/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import AlertsManagementClientConfiguration +from .operations import Operations +from .operations import AlertsOperations +from .operations import SmartGroupsOperations +from .operations import ActionRulesOperations +from .operations import SmartDetectorAlertRulesOperations +from . import models class AlertsManagementClient(SDKClient): @@ -65,6 +33,10 @@ class AlertsManagementClient(SDKClient): :vartype alerts: azure.mgmt.alertsmanagement.operations.AlertsOperations :ivar smart_groups: SmartGroups operations :vartype smart_groups: azure.mgmt.alertsmanagement.operations.SmartGroupsOperations + :ivar action_rules: ActionRules operations + :vartype action_rules: azure.mgmt.alertsmanagement.operations.ActionRulesOperations + :ivar smart_detector_alert_rules: SmartDetectorAlertRules operations + :vartype smart_detector_alert_rules: azure.mgmt.alertsmanagement.operations.SmartDetectorAlertRulesOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -73,17 +45,18 @@ class AlertsManagementClient(SDKClient): Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. :type subscription_id: str + :param subscription_id1: The Azure subscription id. + :type subscription_id1: str :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, base_url=None): + self, credentials, subscription_id, subscription_id1, base_url=None): - self.config = AlertsManagementClientConfiguration(credentials, subscription_id, base_url) + self.config = AlertsManagementClientConfiguration(credentials, subscription_id, subscription_id1, base_url) super(AlertsManagementClient, 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 = '2018-05-05' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -93,3 +66,7 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.smart_groups = SmartGroupsOperations( self._client, self.config, self._serialize, self._deserialize) + self.action_rules = ActionRulesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.smart_detector_alert_rules = SmartDetectorAlertRulesOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py new file mode 100644 index 000000000000..cc778d8d1c6d --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class AlertsManagementClientConfiguration(AzureConfiguration): + """Configuration for AlertsManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param subscription_id1: The Azure subscription id. + :type subscription_id1: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, subscription_id1, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if subscription_id1 is None: + raise ValueError("Parameter 'subscription_id1' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(AlertsManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-alertsmanagement/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + self.subscription_id1 = subscription_id1 diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py index b5d44aef16b9..84870cf01aa0 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py @@ -10,46 +10,97 @@ # -------------------------------------------------------------------------- try: - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .resource_py3 import Resource - from .essentials_py3 import Essentials - from .alert_properties_py3 import AlertProperties - from .alert_py3 import Alert - from .alert_modification_item_py3 import AlertModificationItem - from .alert_modification_properties_py3 import AlertModificationProperties - from .alert_modification_py3 import AlertModification - from .smart_group_modification_item_py3 import SmartGroupModificationItem - from .smart_group_modification_properties_py3 import SmartGroupModificationProperties - from .smart_group_modification_py3 import SmartGroupModification - from .alerts_summary_group_item_py3 import AlertsSummaryGroupItem - from .alerts_summary_group_py3 import AlertsSummaryGroup - from .alerts_summary_py3 import AlertsSummary - from .smart_group_aggregated_property_py3 import SmartGroupAggregatedProperty - from .smart_group_py3 import SmartGroup - from .smart_groups_list_py3 import SmartGroupsList + from ._models_py3 import ActionGroup + from ._models_py3 import ActionGroupsInformation + from ._models_py3 import ActionRule + from ._models_py3 import ActionRuleProperties + from ._models_py3 import Alert + from ._models_py3 import AlertModification + from ._models_py3 import AlertModificationItem + from ._models_py3 import AlertModificationProperties + from ._models_py3 import AlertProperties + from ._models_py3 import AlertRule + from ._models_py3 import AlertRulePatchObject + from ._models_py3 import AlertsMetaData + from ._models_py3 import AlertsMetaDataProperties + from ._models_py3 import AlertsSummary + from ._models_py3 import AlertsSummaryGroup + from ._models_py3 import AlertsSummaryGroupItem + from ._models_py3 import AzureResource + from ._models_py3 import Condition + from ._models_py3 import Conditions + from ._models_py3 import Detector + from ._models_py3 import Diagnostics + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import ErrorResponse1, ErrorResponse1Exception + from ._models_py3 import ErrorResponseBody + from ._models_py3 import Essentials + from ._models_py3 import ManagedResource + from ._models_py3 import MonitorServiceDetails + from ._models_py3 import MonitorServiceList + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import PatchObject + from ._models_py3 import Resource + from ._models_py3 import Scope + from ._models_py3 import SmartGroup + from ._models_py3 import SmartGroupAggregatedProperty + from ._models_py3 import SmartGroupModification + from ._models_py3 import SmartGroupModificationItem + from ._models_py3 import SmartGroupModificationProperties + from ._models_py3 import Suppression + from ._models_py3 import SuppressionConfig + from ._models_py3 import SuppressionSchedule + from ._models_py3 import ThrottlingInformation except (SyntaxError, ImportError): - from .operation_display import OperationDisplay - from .operation import Operation - from .resource import Resource - from .essentials import Essentials - from .alert_properties import AlertProperties - from .alert import Alert - from .alert_modification_item import AlertModificationItem - from .alert_modification_properties import AlertModificationProperties - from .alert_modification import AlertModification - from .smart_group_modification_item import SmartGroupModificationItem - from .smart_group_modification_properties import SmartGroupModificationProperties - from .smart_group_modification import SmartGroupModification - from .alerts_summary_group_item import AlertsSummaryGroupItem - from .alerts_summary_group import AlertsSummaryGroup - from .alerts_summary import AlertsSummary - from .smart_group_aggregated_property import SmartGroupAggregatedProperty - from .smart_group import SmartGroup - from .smart_groups_list import SmartGroupsList -from .operation_paged import OperationPaged -from .alert_paged import AlertPaged -from .alerts_management_client_enums import ( + from ._models import ActionGroup + from ._models import ActionGroupsInformation + from ._models import ActionRule + from ._models import ActionRuleProperties + from ._models import Alert + from ._models import AlertModification + from ._models import AlertModificationItem + from ._models import AlertModificationProperties + from ._models import AlertProperties + from ._models import AlertRule + from ._models import AlertRulePatchObject + from ._models import AlertsMetaData + from ._models import AlertsMetaDataProperties + from ._models import AlertsSummary + from ._models import AlertsSummaryGroup + from ._models import AlertsSummaryGroupItem + from ._models import AzureResource + from ._models import Condition + from ._models import Conditions + from ._models import Detector + from ._models import Diagnostics + from ._models import ErrorResponse, ErrorResponseException + from ._models import ErrorResponse1, ErrorResponse1Exception + from ._models import ErrorResponseBody + from ._models import Essentials + from ._models import ManagedResource + from ._models import MonitorServiceDetails + from ._models import MonitorServiceList + from ._models import Operation + from ._models import OperationDisplay + from ._models import PatchObject + from ._models import Resource + from ._models import Scope + from ._models import SmartGroup + from ._models import SmartGroupAggregatedProperty + from ._models import SmartGroupModification + from ._models import SmartGroupModificationItem + from ._models import SmartGroupModificationProperties + from ._models import Suppression + from ._models import SuppressionConfig + from ._models import SuppressionSchedule + from ._models import ThrottlingInformation +from ._paged_models import ActionRulePaged +from ._paged_models import AlertPaged +from ._paged_models import AlertRulePaged +from ._paged_models import OperationPaged +from ._paged_models import SmartGroupPaged +from ._alerts_management_client_enums import ( Severity, SignalType, AlertState, @@ -58,6 +109,11 @@ AlertModificationEvent, SmartGroupModificationEvent, State, + ScopeType, + Operator, + SuppressionType, + ActionRuleStatus, + AlertRuleState, TimeRange, AlertsSortByFields, AlertsSummaryGroupByFields, @@ -65,26 +121,53 @@ ) __all__ = [ - 'OperationDisplay', - 'Operation', - 'Resource', - 'Essentials', - 'AlertProperties', + 'ActionGroup', + 'ActionGroupsInformation', + 'ActionRule', + 'ActionRuleProperties', 'Alert', + 'AlertModification', 'AlertModificationItem', 'AlertModificationProperties', - 'AlertModification', - 'SmartGroupModificationItem', - 'SmartGroupModificationProperties', - 'SmartGroupModification', - 'AlertsSummaryGroupItem', - 'AlertsSummaryGroup', + 'AlertProperties', + 'AlertRule', + 'AlertRulePatchObject', + 'AlertsMetaData', + 'AlertsMetaDataProperties', 'AlertsSummary', - 'SmartGroupAggregatedProperty', + 'AlertsSummaryGroup', + 'AlertsSummaryGroupItem', + 'AzureResource', + 'Condition', + 'Conditions', + 'Detector', + 'Diagnostics', + 'ErrorResponse', 'ErrorResponseException', + 'ErrorResponse1', 'ErrorResponse1Exception', + 'ErrorResponseBody', + 'Essentials', + 'ManagedResource', + 'MonitorServiceDetails', + 'MonitorServiceList', + 'Operation', + 'OperationDisplay', + 'PatchObject', + 'Resource', + 'Scope', 'SmartGroup', - 'SmartGroupsList', + 'SmartGroupAggregatedProperty', + 'SmartGroupModification', + 'SmartGroupModificationItem', + 'SmartGroupModificationProperties', + 'Suppression', + 'SuppressionConfig', + 'SuppressionSchedule', + 'ThrottlingInformation', 'OperationPaged', 'AlertPaged', + 'SmartGroupPaged', + 'ActionRulePaged', + 'AlertRulePaged', 'Severity', 'SignalType', 'AlertState', @@ -93,6 +176,11 @@ 'AlertModificationEvent', 'SmartGroupModificationEvent', 'State', + 'ScopeType', + 'Operator', + 'SuppressionType', + 'ActionRuleStatus', + 'AlertRuleState', 'TimeRange', 'AlertsSortByFields', 'AlertsSummaryGroupByFields', diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_management_client_enums.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_alerts_management_client_enums.py similarity index 84% rename from sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_management_client_enums.py rename to sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_alerts_management_client_enums.py index f3295fc6ef88..2d9334e583c7 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_management_client_enums.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_alerts_management_client_enums.py @@ -81,6 +81,41 @@ class State(str, Enum): closed = "Closed" +class ScopeType(str, Enum): + + resource_group = "ResourceGroup" + resource = "Resource" + + +class Operator(str, Enum): + + equals = "Equals" + not_equals = "NotEquals" + contains = "Contains" + does_not_contain = "DoesNotContain" + + +class SuppressionType(str, Enum): + + always = "Always" + once = "Once" + daily = "Daily" + weekly = "Weekly" + monthly = "Monthly" + + +class ActionRuleStatus(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class AlertRuleState(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + class TimeRange(str, Enum): oneh = "1h" diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models.py new file mode 100644 index 000000000000..a602fe2c9347 --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models.py @@ -0,0 +1,1704 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ActionRuleProperties(Model): + """Action rule properties defining scope, conditions, suppression logic for + action rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Suppression, ActionGroup, Diagnostics + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Suppression': 'Suppression', 'ActionGroup': 'ActionGroup', 'Diagnostics': 'Diagnostics'} + } + + def __init__(self, **kwargs): + super(ActionRuleProperties, self).__init__(**kwargs) + self.scope = kwargs.get('scope', None) + self.conditions = kwargs.get('conditions', None) + self.description = kwargs.get('description', None) + self.created_at = None + self.last_modified_at = None + self.created_by = None + self.last_modified_by = None + self.status = kwargs.get('status', None) + self.type = None + + +class ActionGroup(ActionRuleProperties): + """Action Group based Action Rule. + + Action rule with action group configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + :param action_group_id: Required. Action group to trigger if action rule + matches + :type action_group_id: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + 'action_group_id': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'action_group_id': {'key': 'actionGroupId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ActionGroup, self).__init__(**kwargs) + self.action_group_id = kwargs.get('action_group_id', None) + self.type = 'ActionGroup' + + +class ActionGroupsInformation(Model): + """The Action Groups information, used by the alert rule. + + All required parameters must be populated in order to send to Azure. + + :param custom_email_subject: An optional custom email subject to use in + email notifications. + :type custom_email_subject: str + :param custom_webhook_payload: An optional custom web-hook payload to use + in web-hook notifications. + :type custom_webhook_payload: str + :param group_ids: Required. The Action Group resource IDs. + :type group_ids: list[str] + """ + + _validation = { + 'group_ids': {'required': True}, + } + + _attribute_map = { + 'custom_email_subject': {'key': 'customEmailSubject', 'type': 'str'}, + 'custom_webhook_payload': {'key': 'customWebhookPayload', 'type': 'str'}, + 'group_ids': {'key': 'groupIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ActionGroupsInformation, self).__init__(**kwargs) + self.custom_email_subject = kwargs.get('custom_email_subject', None) + self.custom_webhook_payload = kwargs.get('custom_webhook_payload', None) + self.group_ids = kwargs.get('group_ids', None) + + +class Resource(Model): + """An azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + + +class ManagedResource(Resource): + """An azure managed resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ManagedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ActionRule(ManagedResource): + """Action rule object containing target scope, conditions and suppression + logic. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param properties: action rule properties + :type properties: ~azure.mgmt.alertsmanagement.models.ActionRuleProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'ActionRuleProperties'}, + } + + def __init__(self, **kwargs): + super(ActionRule, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class Alert(Resource): + """An alert created in alert management service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: ~azure.mgmt.alertsmanagement.models.AlertProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertProperties'}, + } + + def __init__(self, **kwargs): + super(Alert, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AlertModification(Resource): + """Alert Modification details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.AlertModificationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertModificationProperties'}, + } + + def __init__(self, **kwargs): + super(AlertModification, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AlertModificationItem(Model): + """Alert modification item. + + :param modification_event: Reason for the modification. Possible values + include: 'AlertCreated', 'StateChange', 'MonitorConditionChange' + :type modification_event: str or + ~azure.mgmt.alertsmanagement.models.AlertModificationEvent + :param old_value: Old value + :type old_value: str + :param new_value: New value + :type new_value: str + :param modified_at: Modified date and time + :type modified_at: str + :param modified_by: Modified user details (Principal client name) + :type modified_by: str + :param comments: Modification comments + :type comments: str + :param description: Description of the modification + :type description: str + """ + + _attribute_map = { + 'modification_event': {'key': 'modificationEvent', 'type': 'AlertModificationEvent'}, + 'old_value': {'key': 'oldValue', 'type': 'str'}, + 'new_value': {'key': 'newValue', 'type': 'str'}, + 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AlertModificationItem, self).__init__(**kwargs) + self.modification_event = kwargs.get('modification_event', None) + self.old_value = kwargs.get('old_value', None) + self.new_value = kwargs.get('new_value', None) + self.modified_at = kwargs.get('modified_at', None) + self.modified_by = kwargs.get('modified_by', None) + self.comments = kwargs.get('comments', None) + self.description = kwargs.get('description', None) + + +class AlertModificationProperties(Model): + """Properties of the alert modification item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar alert_id: Unique Id of the alert for which the history is being + retrieved + :vartype alert_id: str + :param modifications: Modification details + :type modifications: + list[~azure.mgmt.alertsmanagement.models.AlertModificationItem] + """ + + _validation = { + 'alert_id': {'readonly': True}, + } + + _attribute_map = { + 'alert_id': {'key': 'alertId', 'type': 'str'}, + 'modifications': {'key': 'modifications', 'type': '[AlertModificationItem]'}, + } + + def __init__(self, **kwargs): + super(AlertModificationProperties, self).__init__(**kwargs) + self.alert_id = None + self.modifications = kwargs.get('modifications', None) + + +class AlertProperties(Model): + """Alert property bag. + + :param essentials: + :type essentials: ~azure.mgmt.alertsmanagement.models.Essentials + :param context: + :type context: object + :param egress_config: + :type egress_config: object + """ + + _attribute_map = { + 'essentials': {'key': 'essentials', 'type': 'Essentials'}, + 'context': {'key': 'context', 'type': 'object'}, + 'egress_config': {'key': 'egressConfig', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AlertProperties, self).__init__(**kwargs) + self.essentials = kwargs.get('essentials', None) + self.context = kwargs.get('context', None) + self.egress_config = kwargs.get('egress_config', None) + + +class AzureResource(Model): + """An Azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param location: The resource location. Default value: "global" . + :type location: str + :param tags: The resource tags. + :type tags: object + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureResource, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.location = kwargs.get('location', "global") + self.tags = kwargs.get('tags', None) + + +class AlertRule(AzureResource): + """The alert rule information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param location: The resource location. Default value: "global" . + :type location: str + :param tags: The resource tags. + :type tags: object + :param description: The alert rule description. + :type description: str + :param state: Required. The alert rule state. Possible values include: + 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.alertsmanagement.models.AlertRuleState + :param severity: Required. The alert rule severity. Possible values + include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param frequency: Required. The alert rule frequency in ISO8601 format. + The time granularity must be in minutes and minimum value is 5 minutes. + :type frequency: timedelta + :param detector: Required. The alert rule's detector. + :type detector: ~azure.mgmt.alertsmanagement.models.Detector + :param scope: Required. The alert rule resources scope. + :type scope: list[str] + :param action_groups: Required. The alert rule actions. + :type action_groups: + ~azure.mgmt.alertsmanagement.models.ActionGroupsInformation + :param throttling: The alert rule throttling information. + :type throttling: + ~azure.mgmt.alertsmanagement.models.ThrottlingInformation + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'state': {'required': True}, + 'severity': {'required': True}, + 'frequency': {'required': True}, + 'detector': {'required': True}, + 'scope': {'required': True}, + 'action_groups': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'duration'}, + 'detector': {'key': 'properties.detector', 'type': 'Detector'}, + 'scope': {'key': 'properties.scope', 'type': '[str]'}, + 'action_groups': {'key': 'properties.actionGroups', 'type': 'ActionGroupsInformation'}, + 'throttling': {'key': 'properties.throttling', 'type': 'ThrottlingInformation'}, + } + + def __init__(self, **kwargs): + super(AlertRule, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.state = kwargs.get('state', None) + self.severity = kwargs.get('severity', None) + self.frequency = kwargs.get('frequency', None) + self.detector = kwargs.get('detector', None) + self.scope = kwargs.get('scope', None) + self.action_groups = kwargs.get('action_groups', None) + self.throttling = kwargs.get('throttling', None) + + +class AlertRulePatchObject(Model): + """The alert rule patch information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param tags: The resource tags. + :type tags: object + :param description: The alert rule description. + :type description: str + :param state: The alert rule state. Possible values include: 'Enabled', + 'Disabled' + :type state: str or ~azure.mgmt.alertsmanagement.models.AlertRuleState + :param severity: The alert rule severity. Possible values include: 'Sev0', + 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param frequency: The alert rule frequency in ISO8601 format. The time + granularity must be in minutes and minimum value is 5 minutes. + :type frequency: timedelta + :param action_groups: The alert rule actions. + :type action_groups: + ~azure.mgmt.alertsmanagement.models.ActionGroupsInformation + :param throttling: The alert rule throttling information. + :type throttling: + ~azure.mgmt.alertsmanagement.models.ThrottlingInformation + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'duration'}, + 'action_groups': {'key': 'properties.actionGroups', 'type': 'ActionGroupsInformation'}, + 'throttling': {'key': 'properties.throttling', 'type': 'ThrottlingInformation'}, + } + + def __init__(self, **kwargs): + super(AlertRulePatchObject, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.tags = kwargs.get('tags', None) + self.description = kwargs.get('description', None) + self.state = kwargs.get('state', None) + self.severity = kwargs.get('severity', None) + self.frequency = kwargs.get('frequency', None) + self.action_groups = kwargs.get('action_groups', None) + self.throttling = kwargs.get('throttling', None) + + +class AlertsMetaData(Model): + """alert meta data information. + + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.AlertsMetaDataProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'AlertsMetaDataProperties'}, + } + + def __init__(self, **kwargs): + super(AlertsMetaData, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AlertsMetaDataProperties(Model): + """alert meta data property bag. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MonitorServiceList + + All required parameters must be populated in order to send to Azure. + + :param metadata_identifier: Required. Constant filled by server. + :type metadata_identifier: str + """ + + _validation = { + 'metadata_identifier': {'required': True}, + } + + _attribute_map = { + 'metadata_identifier': {'key': 'metadataIdentifier', 'type': 'str'}, + } + + _subtype_map = { + 'metadata_identifier': {'MonitorServiceList': 'MonitorServiceList'} + } + + def __init__(self, **kwargs): + super(AlertsMetaDataProperties, self).__init__(**kwargs) + self.metadata_identifier = None + + +class AlertsSummary(Resource): + """Summary of alerts based on the input filters and 'groupby' parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroup + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertsSummaryGroup'}, + } + + def __init__(self, **kwargs): + super(AlertsSummary, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AlertsSummaryGroup(Model): + """Group the result set. + + :param total: Total count of the result set. + :type total: int + :param smart_groups_count: Total count of the smart groups. + :type smart_groups_count: int + :param groupedby: Name of the field aggregated + :type groupedby: str + :param values: List of the items + :type values: + list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] + """ + + _attribute_map = { + 'total': {'key': 'total', 'type': 'int'}, + 'smart_groups_count': {'key': 'smartGroupsCount', 'type': 'int'}, + 'groupedby': {'key': 'groupedby', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryGroup, self).__init__(**kwargs) + self.total = kwargs.get('total', None) + self.smart_groups_count = kwargs.get('smart_groups_count', None) + self.groupedby = kwargs.get('groupedby', None) + self.values = kwargs.get('values', None) + + +class AlertsSummaryGroupItem(Model): + """Alerts summary group item. + + :param name: Value of the aggregated field + :type name: str + :param count: Count of the aggregated field + :type count: int + :param groupedby: Name of the field aggregated + :type groupedby: str + :param values: List of the items + :type values: + list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'groupedby': {'key': 'groupedby', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryGroupItem, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.count = kwargs.get('count', None) + self.groupedby = kwargs.get('groupedby', None) + self.values = kwargs.get('values', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Condition(Model): + """condition to trigger an action rule. + + :param operator: operator for a given condition. Possible values include: + 'Equals', 'NotEquals', 'Contains', 'DoesNotContain' + :type operator: str or ~azure.mgmt.alertsmanagement.models.Operator + :param values: list of values to match for a given condition. + :type values: list[str] + """ + + _attribute_map = { + 'operator': {'key': 'operator', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Condition, self).__init__(**kwargs) + self.operator = kwargs.get('operator', None) + self.values = kwargs.get('values', None) + + +class Conditions(Model): + """Conditions in alert instance to be matched for a given action rule. Default + value is all. Multiple values could be provided with comma separation. + + :param severity: filter alerts by severity + :type severity: ~azure.mgmt.alertsmanagement.models.Condition + :param monitor_service: filter alerts by monitor service + :type monitor_service: ~azure.mgmt.alertsmanagement.models.Condition + :param monitor_condition: filter alerts by monitor condition + :type monitor_condition: ~azure.mgmt.alertsmanagement.models.Condition + :param target_resource_type: filter alerts by target resource type + :type target_resource_type: ~azure.mgmt.alertsmanagement.models.Condition + :param alert_rule_id: filter alerts by alert rule id + :type alert_rule_id: ~azure.mgmt.alertsmanagement.models.Condition + :param description: filter alerts by alert rule description + :type description: ~azure.mgmt.alertsmanagement.models.Condition + :param alert_context: filter alerts by alert context (payload) + :type alert_context: ~azure.mgmt.alertsmanagement.models.Condition + """ + + _attribute_map = { + 'severity': {'key': 'severity', 'type': 'Condition'}, + 'monitor_service': {'key': 'monitorService', 'type': 'Condition'}, + 'monitor_condition': {'key': 'monitorCondition', 'type': 'Condition'}, + 'target_resource_type': {'key': 'targetResourceType', 'type': 'Condition'}, + 'alert_rule_id': {'key': 'alertRuleId', 'type': 'Condition'}, + 'description': {'key': 'description', 'type': 'Condition'}, + 'alert_context': {'key': 'alertContext', 'type': 'Condition'}, + } + + def __init__(self, **kwargs): + super(Conditions, self).__init__(**kwargs) + self.severity = kwargs.get('severity', None) + self.monitor_service = kwargs.get('monitor_service', None) + self.monitor_condition = kwargs.get('monitor_condition', None) + self.target_resource_type = kwargs.get('target_resource_type', None) + self.alert_rule_id = kwargs.get('alert_rule_id', None) + self.description = kwargs.get('description', None) + self.alert_context = kwargs.get('alert_context', None) + + +class Detector(Model): + """The detector information. By default this is not populated, unless it's + specified in expandDetector. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The detector id. + :type id: str + :param parameters: The detector's parameters.' + :type parameters: dict[str, object] + :param name: The Smart Detector name. By default this is not populated, + unless it's specified in expandDetector + :type name: str + :param description: The Smart Detector description. By default this is not + populated, unless it's specified in expandDetector + :type description: str + :param supported_resource_types: The Smart Detector supported resource + types. By default this is not populated, unless it's specified in + expandDetector + :type supported_resource_types: list[str] + :param image_paths: The Smart Detector image path. By default this is not + populated, unless it's specified in expandDetector + :type image_paths: list[str] + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'supported_resource_types': {'key': 'supportedResourceTypes', 'type': '[str]'}, + 'image_paths': {'key': 'imagePaths', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Detector, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.parameters = kwargs.get('parameters', None) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.supported_resource_types = kwargs.get('supported_resource_types', None) + self.image_paths = kwargs.get('image_paths', None) + + +class Diagnostics(ActionRuleProperties): + """Diagnostics based Action Rule. + + Action rule with diagnostics configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Diagnostics, self).__init__(**kwargs) + self.type = 'Diagnostics' + + +class ErrorResponse(Model): + """An error response from the service. + + :param error: + :type error: ~azure.mgmt.alertsmanagement.models.ErrorResponseBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class ErrorResponse1(Model): + """Describe the format of an Error response. + + :param code: Error code + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse1, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class ErrorResponse1Exception(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse1'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponse1Exception, self).__init__(deserialize, response, 'ErrorResponse1', *args) + + +class ErrorResponseBody(Model): + """Details of error response. + + :param code: Error code, intended to be consumed programmatically. + :type code: str + :param message: Description of the error, intended for display in user + interface. + :type message: str + :param target: Target of the particular error, for example name of the + property. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.alertsmanagement.models.ErrorResponseBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorResponseBody]'}, + } + + def __init__(self, **kwargs): + super(ErrorResponseBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class Essentials(Model): + """This object contains consistent fields across different monitor services. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar severity: Severity of alert Sev0 being highest and Sev4 being + lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :ivar signal_type: The type of signal the alert is based on, which could + be metrics, logs or activity logs. Possible values include: 'Metric', + 'Log', 'Unknown' + :vartype signal_type: str or + ~azure.mgmt.alertsmanagement.models.SignalType + :ivar alert_state: Alert object state, which can be modified by the user. + Possible values include: 'New', 'Acknowledged', 'Closed' + :vartype alert_state: str or + ~azure.mgmt.alertsmanagement.models.AlertState + :ivar monitor_condition: Condition of the rule at the monitor service. It + represents whether the underlying conditions have crossed the defined + alert rule thresholds. Possible values include: 'Fired', 'Resolved' + :vartype monitor_condition: str or + ~azure.mgmt.alertsmanagement.models.MonitorCondition + :param target_resource: Target ARM resource, on which alert got created. + :type target_resource: str + :param target_resource_name: Name of the target ARM resource name, on + which alert got created. + :type target_resource_name: str + :param target_resource_group: Resource group of target ARM resource, on + which alert got created. + :type target_resource_group: str + :param target_resource_type: Resource type of target ARM resource, on + which alert got created. + :type target_resource_type: str + :ivar monitor_service: Monitor service on which the rule(monitor) is set. + Possible values include: 'Application Insights', 'ActivityLog + Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', + 'ActivityLog Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', + 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', + 'Zabbix' + :vartype monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :ivar alert_rule: Rule(monitor) which fired alert instance. Depending on + the monitor service, this would be ARM id or name of the rule. + :vartype alert_rule: str + :ivar source_created_id: Unique Id created by monitor service for each + alert instance. This could be used to track the issue at the monitor + service, in case of Nagios, Zabbix, SCOM etc. + :vartype source_created_id: str + :ivar smart_group_id: Unique Id of the smart group + :vartype smart_group_id: str + :ivar smart_grouping_reason: Verbose reason describing the reason why this + alert instance is added to a smart group + :vartype smart_grouping_reason: str + :ivar start_date_time: Creation time(ISO-8601 format) of alert instance. + :vartype start_date_time: datetime + :ivar last_modified_date_time: Last modification time(ISO-8601 format) of + alert instance. + :vartype last_modified_date_time: datetime + :ivar monitor_condition_resolved_date_time: Resolved time(ISO-8601 format) + of alert instance. This will be updated when monitor service resolves the + alert instance because the rule condition is no longer met. + :vartype monitor_condition_resolved_date_time: datetime + :ivar last_modified_user_name: User who last modified the alert, in case + of monitor service updates user would be 'system', otherwise name of the + user. + :vartype last_modified_user_name: str + """ + + _validation = { + 'severity': {'readonly': True}, + 'signal_type': {'readonly': True}, + 'alert_state': {'readonly': True}, + 'monitor_condition': {'readonly': True}, + 'monitor_service': {'readonly': True}, + 'alert_rule': {'readonly': True}, + 'source_created_id': {'readonly': True}, + 'smart_group_id': {'readonly': True}, + 'smart_grouping_reason': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'monitor_condition_resolved_date_time': {'readonly': True}, + 'last_modified_user_name': {'readonly': True}, + } + + _attribute_map = { + 'severity': {'key': 'severity', 'type': 'str'}, + 'signal_type': {'key': 'signalType', 'type': 'str'}, + 'alert_state': {'key': 'alertState', 'type': 'str'}, + 'monitor_condition': {'key': 'monitorCondition', 'type': 'str'}, + 'target_resource': {'key': 'targetResource', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'target_resource_type': {'key': 'targetResourceType', 'type': 'str'}, + 'monitor_service': {'key': 'monitorService', 'type': 'str'}, + 'alert_rule': {'key': 'alertRule', 'type': 'str'}, + 'source_created_id': {'key': 'sourceCreatedId', 'type': 'str'}, + 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, + 'smart_grouping_reason': {'key': 'smartGroupingReason', 'type': 'str'}, + 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, + 'monitor_condition_resolved_date_time': {'key': 'monitorConditionResolvedDateTime', 'type': 'iso-8601'}, + 'last_modified_user_name': {'key': 'lastModifiedUserName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Essentials, self).__init__(**kwargs) + self.severity = None + self.signal_type = None + self.alert_state = None + self.monitor_condition = None + self.target_resource = kwargs.get('target_resource', None) + self.target_resource_name = kwargs.get('target_resource_name', None) + self.target_resource_group = kwargs.get('target_resource_group', None) + self.target_resource_type = kwargs.get('target_resource_type', None) + self.monitor_service = None + self.alert_rule = None + self.source_created_id = None + self.smart_group_id = None + self.smart_grouping_reason = None + self.start_date_time = None + self.last_modified_date_time = None + self.monitor_condition_resolved_date_time = None + self.last_modified_user_name = None + + +class MonitorServiceDetails(Model): + """Details of a monitor service. + + :param name: Monitor service name + :type name: str + :param display_name: Monitor service display name + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MonitorServiceDetails, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + + +class MonitorServiceList(AlertsMetaDataProperties): + """Monitor service details. + + Monitor service details. + + All required parameters must be populated in order to send to Azure. + + :param metadata_identifier: Required. Constant filled by server. + :type metadata_identifier: str + :param data: Required. Array of operations + :type data: + list[~azure.mgmt.alertsmanagement.models.MonitorServiceDetails] + """ + + _validation = { + 'metadata_identifier': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'metadata_identifier': {'key': 'metadataIdentifier', 'type': 'str'}, + 'data': {'key': 'data', 'type': '[MonitorServiceDetails]'}, + } + + def __init__(self, **kwargs): + super(MonitorServiceList, self).__init__(**kwargs) + self.data = kwargs.get('data', None) + self.metadata_identifier = 'MonitorServiceList' + + +class Operation(Model): + """Operation provided by provider. + + :param name: Name of the operation + :type name: str + :param display: Properties of the operation + :type display: ~azure.mgmt.alertsmanagement.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """Properties of the operation. + + :param provider: Provider name + :type provider: str + :param resource: Resource name + :type resource: str + :param operation: Operation name + :type operation: str + :param description: Description of the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class PatchObject(Model): + """Data contract for patch. + + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param tags: tags to be updated + :type tags: object + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(PatchObject, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.tags = kwargs.get('tags', None) + + +class Scope(Model): + """Target scope for a given action rule. By default scope will be the + subscription. User can also provide list of resource groups or list of + resources from the scope subscription as well. + + :param scope_type: type of target scope. Possible values include: + 'ResourceGroup', 'Resource' + :type scope_type: str or ~azure.mgmt.alertsmanagement.models.ScopeType + :param values: list of ARM IDs of the given scope type which will be the + target of the given action rule. + :type values: list[str] + """ + + _attribute_map = { + 'scope_type': {'key': 'scopeType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Scope, self).__init__(**kwargs) + self.scope_type = kwargs.get('scope_type', None) + self.values = kwargs.get('values', None) + + +class SmartGroup(Resource): + """Set of related alerts grouped together smartly by AMS. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param alerts_count: Total number of alerts in smart group + :type alerts_count: int + :ivar smart_group_state: Smart group state. Possible values include: + 'New', 'Acknowledged', 'Closed' + :vartype smart_group_state: str or + ~azure.mgmt.alertsmanagement.models.State + :ivar severity: Severity of smart group is the highest(Sev0 >... > Sev4) + severity of all the alerts in the group. Possible values include: 'Sev0', + 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :ivar start_date_time: Creation time of smart group. Date-Time in ISO-8601 + format. + :vartype start_date_time: datetime + :ivar last_modified_date_time: Last updated time of smart group. Date-Time + in ISO-8601 format. + :vartype last_modified_date_time: datetime + :ivar last_modified_user_name: Last modified by user name. + :vartype last_modified_user_name: str + :param resources: Summary of target resources in the smart group + :type resources: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param resource_types: Summary of target resource types in the smart group + :type resource_types: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param resource_groups: Summary of target resource groups in the smart + group + :type resource_groups: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param monitor_services: Summary of monitorServices in the smart group + :type monitor_services: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param monitor_conditions: Summary of monitorConditions in the smart group + :type monitor_conditions: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param alert_states: Summary of alertStates in the smart group + :type alert_states: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param alert_severities: Summary of alertSeverities in the smart group + :type alert_severities: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param next_link: The URI to fetch the next page of alerts. Call + ListNext() with this URI to fetch the next page alerts. + :type next_link: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'smart_group_state': {'readonly': True}, + 'severity': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'last_modified_user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'alerts_count': {'key': 'properties.alertsCount', 'type': 'int'}, + 'smart_group_state': {'key': 'properties.smartGroupState', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'properties.lastModifiedDateTime', 'type': 'iso-8601'}, + 'last_modified_user_name': {'key': 'properties.lastModifiedUserName', 'type': 'str'}, + 'resources': {'key': 'properties.resources', 'type': '[SmartGroupAggregatedProperty]'}, + 'resource_types': {'key': 'properties.resourceTypes', 'type': '[SmartGroupAggregatedProperty]'}, + 'resource_groups': {'key': 'properties.resourceGroups', 'type': '[SmartGroupAggregatedProperty]'}, + 'monitor_services': {'key': 'properties.monitorServices', 'type': '[SmartGroupAggregatedProperty]'}, + 'monitor_conditions': {'key': 'properties.monitorConditions', 'type': '[SmartGroupAggregatedProperty]'}, + 'alert_states': {'key': 'properties.alertStates', 'type': '[SmartGroupAggregatedProperty]'}, + 'alert_severities': {'key': 'properties.alertSeverities', 'type': '[SmartGroupAggregatedProperty]'}, + 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SmartGroup, self).__init__(**kwargs) + self.alerts_count = kwargs.get('alerts_count', None) + self.smart_group_state = None + self.severity = None + self.start_date_time = None + self.last_modified_date_time = None + self.last_modified_user_name = None + self.resources = kwargs.get('resources', None) + self.resource_types = kwargs.get('resource_types', None) + self.resource_groups = kwargs.get('resource_groups', None) + self.monitor_services = kwargs.get('monitor_services', None) + self.monitor_conditions = kwargs.get('monitor_conditions', None) + self.alert_states = kwargs.get('alert_states', None) + self.alert_severities = kwargs.get('alert_severities', None) + self.next_link = kwargs.get('next_link', None) + + +class SmartGroupAggregatedProperty(Model): + """Aggregated property of each type. + + :param name: Name of the type. + :type name: str + :param count: Total number of items of type. + :type count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(SmartGroupAggregatedProperty, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.count = kwargs.get('count', None) + + +class SmartGroupModification(Resource): + """Alert Modification details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.SmartGroupModificationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'SmartGroupModificationProperties'}, + } + + def __init__(self, **kwargs): + super(SmartGroupModification, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class SmartGroupModificationItem(Model): + """smartGroup modification item. + + :param modification_event: Reason for the modification. Possible values + include: 'SmartGroupCreated', 'StateChange', 'AlertAdded', 'AlertRemoved' + :type modification_event: str or + ~azure.mgmt.alertsmanagement.models.SmartGroupModificationEvent + :param old_value: Old value + :type old_value: str + :param new_value: New value + :type new_value: str + :param modified_at: Modified date and time + :type modified_at: str + :param modified_by: Modified user details (Principal client name) + :type modified_by: str + :param comments: Modification comments + :type comments: str + :param description: Description of the modification + :type description: str + """ + + _attribute_map = { + 'modification_event': {'key': 'modificationEvent', 'type': 'SmartGroupModificationEvent'}, + 'old_value': {'key': 'oldValue', 'type': 'str'}, + 'new_value': {'key': 'newValue', 'type': 'str'}, + 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SmartGroupModificationItem, self).__init__(**kwargs) + self.modification_event = kwargs.get('modification_event', None) + self.old_value = kwargs.get('old_value', None) + self.new_value = kwargs.get('new_value', None) + self.modified_at = kwargs.get('modified_at', None) + self.modified_by = kwargs.get('modified_by', None) + self.comments = kwargs.get('comments', None) + self.description = kwargs.get('description', None) + + +class SmartGroupModificationProperties(Model): + """Properties of the smartGroup modification item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar smart_group_id: Unique Id of the smartGroup for which the history is + being retrieved + :vartype smart_group_id: str + :param modifications: Modification details + :type modifications: + list[~azure.mgmt.alertsmanagement.models.SmartGroupModificationItem] + :param next_link: URL to fetch the next set of results. + :type next_link: str + """ + + _validation = { + 'smart_group_id': {'readonly': True}, + } + + _attribute_map = { + 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, + 'modifications': {'key': 'modifications', 'type': '[SmartGroupModificationItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SmartGroupModificationProperties, self).__init__(**kwargs) + self.smart_group_id = None + self.modifications = kwargs.get('modifications', None) + self.next_link = kwargs.get('next_link', None) + + +class Suppression(ActionRuleProperties): + """Suppression based Action Rule. + + Action rule with suppression configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + :param suppression_config: Required. suppression configuration for the + action rule + :type suppression_config: + ~azure.mgmt.alertsmanagement.models.SuppressionConfig + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + 'suppression_config': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'suppression_config': {'key': 'suppressionConfig', 'type': 'SuppressionConfig'}, + } + + def __init__(self, **kwargs): + super(Suppression, self).__init__(**kwargs) + self.suppression_config = kwargs.get('suppression_config', None) + self.type = 'Suppression' + + +class SuppressionConfig(Model): + """Suppression logic for a given action rule. + + All required parameters must be populated in order to send to Azure. + + :param recurrence_type: Required. Specifies when the suppression should be + applied. Possible values include: 'Always', 'Once', 'Daily', 'Weekly', + 'Monthly' + :type recurrence_type: str or + ~azure.mgmt.alertsmanagement.models.SuppressionType + :param schedule: suppression schedule configuration + :type schedule: ~azure.mgmt.alertsmanagement.models.SuppressionSchedule + """ + + _validation = { + 'recurrence_type': {'required': True}, + } + + _attribute_map = { + 'recurrence_type': {'key': 'recurrenceType', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'SuppressionSchedule'}, + } + + def __init__(self, **kwargs): + super(SuppressionConfig, self).__init__(**kwargs) + self.recurrence_type = kwargs.get('recurrence_type', None) + self.schedule = kwargs.get('schedule', None) + + +class SuppressionSchedule(Model): + """Schedule for a given suppression configuration. + + :param start_date: Start date for suppression + :type start_date: str + :param end_date: End date for suppression + :type end_date: str + :param start_time: Start time for suppression + :type start_time: str + :param end_time: End date for suppression + :type end_time: str + :param recurrence_values: Specifies the values for recurrence pattern + :type recurrence_values: list[int] + """ + + _attribute_map = { + 'start_date': {'key': 'startDate', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'recurrence_values': {'key': 'recurrenceValues', 'type': '[int]'}, + } + + def __init__(self, **kwargs): + super(SuppressionSchedule, self).__init__(**kwargs) + self.start_date = kwargs.get('start_date', None) + self.end_date = kwargs.get('end_date', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.recurrence_values = kwargs.get('recurrence_values', None) + + +class ThrottlingInformation(Model): + """Optional throttling information for the alert rule. + + :param duration: The required duration (in ISO8601 format) to wait before + notifying on the alert rule again. The time granularity must be in minutes + and minimum value is 0 minutes + :type duration: timedelta + """ + + _attribute_map = { + 'duration': {'key': 'duration', 'type': 'duration'}, + } + + def __init__(self, **kwargs): + super(ThrottlingInformation, self).__init__(**kwargs) + self.duration = kwargs.get('duration', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models_py3.py new file mode 100644 index 000000000000..635be9d76f8e --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models_py3.py @@ -0,0 +1,1704 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ActionRuleProperties(Model): + """Action rule properties defining scope, conditions, suppression logic for + action rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Suppression, ActionGroup, Diagnostics + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Suppression': 'Suppression', 'ActionGroup': 'ActionGroup', 'Diagnostics': 'Diagnostics'} + } + + def __init__(self, *, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(ActionRuleProperties, self).__init__(**kwargs) + self.scope = scope + self.conditions = conditions + self.description = description + self.created_at = None + self.last_modified_at = None + self.created_by = None + self.last_modified_by = None + self.status = status + self.type = None + + +class ActionGroup(ActionRuleProperties): + """Action Group based Action Rule. + + Action rule with action group configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + :param action_group_id: Required. Action group to trigger if action rule + matches + :type action_group_id: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + 'action_group_id': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'action_group_id': {'key': 'actionGroupId', 'type': 'str'}, + } + + def __init__(self, *, action_group_id: str, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(ActionGroup, self).__init__(scope=scope, conditions=conditions, description=description, status=status, **kwargs) + self.action_group_id = action_group_id + self.type = 'ActionGroup' + + +class ActionGroupsInformation(Model): + """The Action Groups information, used by the alert rule. + + All required parameters must be populated in order to send to Azure. + + :param custom_email_subject: An optional custom email subject to use in + email notifications. + :type custom_email_subject: str + :param custom_webhook_payload: An optional custom web-hook payload to use + in web-hook notifications. + :type custom_webhook_payload: str + :param group_ids: Required. The Action Group resource IDs. + :type group_ids: list[str] + """ + + _validation = { + 'group_ids': {'required': True}, + } + + _attribute_map = { + 'custom_email_subject': {'key': 'customEmailSubject', 'type': 'str'}, + 'custom_webhook_payload': {'key': 'customWebhookPayload', 'type': 'str'}, + 'group_ids': {'key': 'groupIds', 'type': '[str]'}, + } + + def __init__(self, *, group_ids, custom_email_subject: str=None, custom_webhook_payload: str=None, **kwargs) -> None: + super(ActionGroupsInformation, self).__init__(**kwargs) + self.custom_email_subject = custom_email_subject + self.custom_webhook_payload = custom_webhook_payload + self.group_ids = group_ids + + +class Resource(Model): + """An azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + + +class ManagedResource(Resource): + """An azure managed resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(ManagedResource, self).__init__(**kwargs) + self.location = location + self.tags = tags + + +class ActionRule(ManagedResource): + """Action rule object containing target scope, conditions and suppression + logic. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param properties: action rule properties + :type properties: ~azure.mgmt.alertsmanagement.models.ActionRuleProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'ActionRuleProperties'}, + } + + def __init__(self, *, location: str, tags=None, properties=None, **kwargs) -> None: + super(ActionRule, self).__init__(location=location, tags=tags, **kwargs) + self.properties = properties + + +class Alert(Resource): + """An alert created in alert management service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: ~azure.mgmt.alertsmanagement.models.AlertProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(Alert, self).__init__(**kwargs) + self.properties = properties + + +class AlertModification(Resource): + """Alert Modification details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.AlertModificationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertModificationProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(AlertModification, self).__init__(**kwargs) + self.properties = properties + + +class AlertModificationItem(Model): + """Alert modification item. + + :param modification_event: Reason for the modification. Possible values + include: 'AlertCreated', 'StateChange', 'MonitorConditionChange' + :type modification_event: str or + ~azure.mgmt.alertsmanagement.models.AlertModificationEvent + :param old_value: Old value + :type old_value: str + :param new_value: New value + :type new_value: str + :param modified_at: Modified date and time + :type modified_at: str + :param modified_by: Modified user details (Principal client name) + :type modified_by: str + :param comments: Modification comments + :type comments: str + :param description: Description of the modification + :type description: str + """ + + _attribute_map = { + 'modification_event': {'key': 'modificationEvent', 'type': 'AlertModificationEvent'}, + 'old_value': {'key': 'oldValue', 'type': 'str'}, + 'new_value': {'key': 'newValue', 'type': 'str'}, + 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, modification_event=None, old_value: str=None, new_value: str=None, modified_at: str=None, modified_by: str=None, comments: str=None, description: str=None, **kwargs) -> None: + super(AlertModificationItem, self).__init__(**kwargs) + self.modification_event = modification_event + self.old_value = old_value + self.new_value = new_value + self.modified_at = modified_at + self.modified_by = modified_by + self.comments = comments + self.description = description + + +class AlertModificationProperties(Model): + """Properties of the alert modification item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar alert_id: Unique Id of the alert for which the history is being + retrieved + :vartype alert_id: str + :param modifications: Modification details + :type modifications: + list[~azure.mgmt.alertsmanagement.models.AlertModificationItem] + """ + + _validation = { + 'alert_id': {'readonly': True}, + } + + _attribute_map = { + 'alert_id': {'key': 'alertId', 'type': 'str'}, + 'modifications': {'key': 'modifications', 'type': '[AlertModificationItem]'}, + } + + def __init__(self, *, modifications=None, **kwargs) -> None: + super(AlertModificationProperties, self).__init__(**kwargs) + self.alert_id = None + self.modifications = modifications + + +class AlertProperties(Model): + """Alert property bag. + + :param essentials: + :type essentials: ~azure.mgmt.alertsmanagement.models.Essentials + :param context: + :type context: object + :param egress_config: + :type egress_config: object + """ + + _attribute_map = { + 'essentials': {'key': 'essentials', 'type': 'Essentials'}, + 'context': {'key': 'context', 'type': 'object'}, + 'egress_config': {'key': 'egressConfig', 'type': 'object'}, + } + + def __init__(self, *, essentials=None, context=None, egress_config=None, **kwargs) -> None: + super(AlertProperties, self).__init__(**kwargs) + self.essentials = essentials + self.context = context + self.egress_config = egress_config + + +class AzureResource(Model): + """An Azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param location: The resource location. Default value: "global" . + :type location: str + :param tags: The resource tags. + :type tags: object + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + } + + def __init__(self, *, location: str="global", tags=None, **kwargs) -> None: + super(AzureResource, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.location = location + self.tags = tags + + +class AlertRule(AzureResource): + """The alert rule information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param location: The resource location. Default value: "global" . + :type location: str + :param tags: The resource tags. + :type tags: object + :param description: The alert rule description. + :type description: str + :param state: Required. The alert rule state. Possible values include: + 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.alertsmanagement.models.AlertRuleState + :param severity: Required. The alert rule severity. Possible values + include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param frequency: Required. The alert rule frequency in ISO8601 format. + The time granularity must be in minutes and minimum value is 5 minutes. + :type frequency: timedelta + :param detector: Required. The alert rule's detector. + :type detector: ~azure.mgmt.alertsmanagement.models.Detector + :param scope: Required. The alert rule resources scope. + :type scope: list[str] + :param action_groups: Required. The alert rule actions. + :type action_groups: + ~azure.mgmt.alertsmanagement.models.ActionGroupsInformation + :param throttling: The alert rule throttling information. + :type throttling: + ~azure.mgmt.alertsmanagement.models.ThrottlingInformation + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'state': {'required': True}, + 'severity': {'required': True}, + 'frequency': {'required': True}, + 'detector': {'required': True}, + 'scope': {'required': True}, + 'action_groups': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'duration'}, + 'detector': {'key': 'properties.detector', 'type': 'Detector'}, + 'scope': {'key': 'properties.scope', 'type': '[str]'}, + 'action_groups': {'key': 'properties.actionGroups', 'type': 'ActionGroupsInformation'}, + 'throttling': {'key': 'properties.throttling', 'type': 'ThrottlingInformation'}, + } + + def __init__(self, *, state, severity, frequency, detector, scope, action_groups, location: str="global", tags=None, description: str=None, throttling=None, **kwargs) -> None: + super(AlertRule, self).__init__(location=location, tags=tags, **kwargs) + self.description = description + self.state = state + self.severity = severity + self.frequency = frequency + self.detector = detector + self.scope = scope + self.action_groups = action_groups + self.throttling = throttling + + +class AlertRulePatchObject(Model): + """The alert rule patch information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param tags: The resource tags. + :type tags: object + :param description: The alert rule description. + :type description: str + :param state: The alert rule state. Possible values include: 'Enabled', + 'Disabled' + :type state: str or ~azure.mgmt.alertsmanagement.models.AlertRuleState + :param severity: The alert rule severity. Possible values include: 'Sev0', + 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param frequency: The alert rule frequency in ISO8601 format. The time + granularity must be in minutes and minimum value is 5 minutes. + :type frequency: timedelta + :param action_groups: The alert rule actions. + :type action_groups: + ~azure.mgmt.alertsmanagement.models.ActionGroupsInformation + :param throttling: The alert rule throttling information. + :type throttling: + ~azure.mgmt.alertsmanagement.models.ThrottlingInformation + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'duration'}, + 'action_groups': {'key': 'properties.actionGroups', 'type': 'ActionGroupsInformation'}, + 'throttling': {'key': 'properties.throttling', 'type': 'ThrottlingInformation'}, + } + + def __init__(self, *, tags=None, description: str=None, state=None, severity=None, frequency=None, action_groups=None, throttling=None, **kwargs) -> None: + super(AlertRulePatchObject, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.tags = tags + self.description = description + self.state = state + self.severity = severity + self.frequency = frequency + self.action_groups = action_groups + self.throttling = throttling + + +class AlertsMetaData(Model): + """alert meta data information. + + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.AlertsMetaDataProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'AlertsMetaDataProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(AlertsMetaData, self).__init__(**kwargs) + self.properties = properties + + +class AlertsMetaDataProperties(Model): + """alert meta data property bag. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MonitorServiceList + + All required parameters must be populated in order to send to Azure. + + :param metadata_identifier: Required. Constant filled by server. + :type metadata_identifier: str + """ + + _validation = { + 'metadata_identifier': {'required': True}, + } + + _attribute_map = { + 'metadata_identifier': {'key': 'metadataIdentifier', 'type': 'str'}, + } + + _subtype_map = { + 'metadata_identifier': {'MonitorServiceList': 'MonitorServiceList'} + } + + def __init__(self, **kwargs) -> None: + super(AlertsMetaDataProperties, self).__init__(**kwargs) + self.metadata_identifier = None + + +class AlertsSummary(Resource): + """Summary of alerts based on the input filters and 'groupby' parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroup + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertsSummaryGroup'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(AlertsSummary, self).__init__(**kwargs) + self.properties = properties + + +class AlertsSummaryGroup(Model): + """Group the result set. + + :param total: Total count of the result set. + :type total: int + :param smart_groups_count: Total count of the smart groups. + :type smart_groups_count: int + :param groupedby: Name of the field aggregated + :type groupedby: str + :param values: List of the items + :type values: + list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] + """ + + _attribute_map = { + 'total': {'key': 'total', 'type': 'int'}, + 'smart_groups_count': {'key': 'smartGroupsCount', 'type': 'int'}, + 'groupedby': {'key': 'groupedby', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, + } + + def __init__(self, *, total: int=None, smart_groups_count: int=None, groupedby: str=None, values=None, **kwargs) -> None: + super(AlertsSummaryGroup, self).__init__(**kwargs) + self.total = total + self.smart_groups_count = smart_groups_count + self.groupedby = groupedby + self.values = values + + +class AlertsSummaryGroupItem(Model): + """Alerts summary group item. + + :param name: Value of the aggregated field + :type name: str + :param count: Count of the aggregated field + :type count: int + :param groupedby: Name of the field aggregated + :type groupedby: str + :param values: List of the items + :type values: + list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'groupedby': {'key': 'groupedby', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, + } + + def __init__(self, *, name: str=None, count: int=None, groupedby: str=None, values=None, **kwargs) -> None: + super(AlertsSummaryGroupItem, self).__init__(**kwargs) + self.name = name + self.count = count + self.groupedby = groupedby + self.values = values + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Condition(Model): + """condition to trigger an action rule. + + :param operator: operator for a given condition. Possible values include: + 'Equals', 'NotEquals', 'Contains', 'DoesNotContain' + :type operator: str or ~azure.mgmt.alertsmanagement.models.Operator + :param values: list of values to match for a given condition. + :type values: list[str] + """ + + _attribute_map = { + 'operator': {'key': 'operator', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, *, operator=None, values=None, **kwargs) -> None: + super(Condition, self).__init__(**kwargs) + self.operator = operator + self.values = values + + +class Conditions(Model): + """Conditions in alert instance to be matched for a given action rule. Default + value is all. Multiple values could be provided with comma separation. + + :param severity: filter alerts by severity + :type severity: ~azure.mgmt.alertsmanagement.models.Condition + :param monitor_service: filter alerts by monitor service + :type monitor_service: ~azure.mgmt.alertsmanagement.models.Condition + :param monitor_condition: filter alerts by monitor condition + :type monitor_condition: ~azure.mgmt.alertsmanagement.models.Condition + :param target_resource_type: filter alerts by target resource type + :type target_resource_type: ~azure.mgmt.alertsmanagement.models.Condition + :param alert_rule_id: filter alerts by alert rule id + :type alert_rule_id: ~azure.mgmt.alertsmanagement.models.Condition + :param description: filter alerts by alert rule description + :type description: ~azure.mgmt.alertsmanagement.models.Condition + :param alert_context: filter alerts by alert context (payload) + :type alert_context: ~azure.mgmt.alertsmanagement.models.Condition + """ + + _attribute_map = { + 'severity': {'key': 'severity', 'type': 'Condition'}, + 'monitor_service': {'key': 'monitorService', 'type': 'Condition'}, + 'monitor_condition': {'key': 'monitorCondition', 'type': 'Condition'}, + 'target_resource_type': {'key': 'targetResourceType', 'type': 'Condition'}, + 'alert_rule_id': {'key': 'alertRuleId', 'type': 'Condition'}, + 'description': {'key': 'description', 'type': 'Condition'}, + 'alert_context': {'key': 'alertContext', 'type': 'Condition'}, + } + + def __init__(self, *, severity=None, monitor_service=None, monitor_condition=None, target_resource_type=None, alert_rule_id=None, description=None, alert_context=None, **kwargs) -> None: + super(Conditions, self).__init__(**kwargs) + self.severity = severity + self.monitor_service = monitor_service + self.monitor_condition = monitor_condition + self.target_resource_type = target_resource_type + self.alert_rule_id = alert_rule_id + self.description = description + self.alert_context = alert_context + + +class Detector(Model): + """The detector information. By default this is not populated, unless it's + specified in expandDetector. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The detector id. + :type id: str + :param parameters: The detector's parameters.' + :type parameters: dict[str, object] + :param name: The Smart Detector name. By default this is not populated, + unless it's specified in expandDetector + :type name: str + :param description: The Smart Detector description. By default this is not + populated, unless it's specified in expandDetector + :type description: str + :param supported_resource_types: The Smart Detector supported resource + types. By default this is not populated, unless it's specified in + expandDetector + :type supported_resource_types: list[str] + :param image_paths: The Smart Detector image path. By default this is not + populated, unless it's specified in expandDetector + :type image_paths: list[str] + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'supported_resource_types': {'key': 'supportedResourceTypes', 'type': '[str]'}, + 'image_paths': {'key': 'imagePaths', 'type': '[str]'}, + } + + def __init__(self, *, id: str, parameters=None, name: str=None, description: str=None, supported_resource_types=None, image_paths=None, **kwargs) -> None: + super(Detector, self).__init__(**kwargs) + self.id = id + self.parameters = parameters + self.name = name + self.description = description + self.supported_resource_types = supported_resource_types + self.image_paths = image_paths + + +class Diagnostics(ActionRuleProperties): + """Diagnostics based Action Rule. + + Action rule with diagnostics configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(Diagnostics, self).__init__(scope=scope, conditions=conditions, description=description, status=status, **kwargs) + self.type = 'Diagnostics' + + +class ErrorResponse(Model): + """An error response from the service. + + :param error: + :type error: ~azure.mgmt.alertsmanagement.models.ErrorResponseBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class ErrorResponse1(Model): + """Describe the format of an Error response. + + :param code: Error code + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(ErrorResponse1, self).__init__(**kwargs) + self.code = code + self.message = message + + +class ErrorResponse1Exception(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse1'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponse1Exception, self).__init__(deserialize, response, 'ErrorResponse1', *args) + + +class ErrorResponseBody(Model): + """Details of error response. + + :param code: Error code, intended to be consumed programmatically. + :type code: str + :param message: Description of the error, intended for display in user + interface. + :type message: str + :param target: Target of the particular error, for example name of the + property. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.alertsmanagement.models.ErrorResponseBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorResponseBody]'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + super(ErrorResponseBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class Essentials(Model): + """This object contains consistent fields across different monitor services. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar severity: Severity of alert Sev0 being highest and Sev4 being + lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :ivar signal_type: The type of signal the alert is based on, which could + be metrics, logs or activity logs. Possible values include: 'Metric', + 'Log', 'Unknown' + :vartype signal_type: str or + ~azure.mgmt.alertsmanagement.models.SignalType + :ivar alert_state: Alert object state, which can be modified by the user. + Possible values include: 'New', 'Acknowledged', 'Closed' + :vartype alert_state: str or + ~azure.mgmt.alertsmanagement.models.AlertState + :ivar monitor_condition: Condition of the rule at the monitor service. It + represents whether the underlying conditions have crossed the defined + alert rule thresholds. Possible values include: 'Fired', 'Resolved' + :vartype monitor_condition: str or + ~azure.mgmt.alertsmanagement.models.MonitorCondition + :param target_resource: Target ARM resource, on which alert got created. + :type target_resource: str + :param target_resource_name: Name of the target ARM resource name, on + which alert got created. + :type target_resource_name: str + :param target_resource_group: Resource group of target ARM resource, on + which alert got created. + :type target_resource_group: str + :param target_resource_type: Resource type of target ARM resource, on + which alert got created. + :type target_resource_type: str + :ivar monitor_service: Monitor service on which the rule(monitor) is set. + Possible values include: 'Application Insights', 'ActivityLog + Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', + 'ActivityLog Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', + 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', + 'Zabbix' + :vartype monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :ivar alert_rule: Rule(monitor) which fired alert instance. Depending on + the monitor service, this would be ARM id or name of the rule. + :vartype alert_rule: str + :ivar source_created_id: Unique Id created by monitor service for each + alert instance. This could be used to track the issue at the monitor + service, in case of Nagios, Zabbix, SCOM etc. + :vartype source_created_id: str + :ivar smart_group_id: Unique Id of the smart group + :vartype smart_group_id: str + :ivar smart_grouping_reason: Verbose reason describing the reason why this + alert instance is added to a smart group + :vartype smart_grouping_reason: str + :ivar start_date_time: Creation time(ISO-8601 format) of alert instance. + :vartype start_date_time: datetime + :ivar last_modified_date_time: Last modification time(ISO-8601 format) of + alert instance. + :vartype last_modified_date_time: datetime + :ivar monitor_condition_resolved_date_time: Resolved time(ISO-8601 format) + of alert instance. This will be updated when monitor service resolves the + alert instance because the rule condition is no longer met. + :vartype monitor_condition_resolved_date_time: datetime + :ivar last_modified_user_name: User who last modified the alert, in case + of monitor service updates user would be 'system', otherwise name of the + user. + :vartype last_modified_user_name: str + """ + + _validation = { + 'severity': {'readonly': True}, + 'signal_type': {'readonly': True}, + 'alert_state': {'readonly': True}, + 'monitor_condition': {'readonly': True}, + 'monitor_service': {'readonly': True}, + 'alert_rule': {'readonly': True}, + 'source_created_id': {'readonly': True}, + 'smart_group_id': {'readonly': True}, + 'smart_grouping_reason': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'monitor_condition_resolved_date_time': {'readonly': True}, + 'last_modified_user_name': {'readonly': True}, + } + + _attribute_map = { + 'severity': {'key': 'severity', 'type': 'str'}, + 'signal_type': {'key': 'signalType', 'type': 'str'}, + 'alert_state': {'key': 'alertState', 'type': 'str'}, + 'monitor_condition': {'key': 'monitorCondition', 'type': 'str'}, + 'target_resource': {'key': 'targetResource', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'target_resource_type': {'key': 'targetResourceType', 'type': 'str'}, + 'monitor_service': {'key': 'monitorService', 'type': 'str'}, + 'alert_rule': {'key': 'alertRule', 'type': 'str'}, + 'source_created_id': {'key': 'sourceCreatedId', 'type': 'str'}, + 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, + 'smart_grouping_reason': {'key': 'smartGroupingReason', 'type': 'str'}, + 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, + 'monitor_condition_resolved_date_time': {'key': 'monitorConditionResolvedDateTime', 'type': 'iso-8601'}, + 'last_modified_user_name': {'key': 'lastModifiedUserName', 'type': 'str'}, + } + + def __init__(self, *, target_resource: str=None, target_resource_name: str=None, target_resource_group: str=None, target_resource_type: str=None, **kwargs) -> None: + super(Essentials, self).__init__(**kwargs) + self.severity = None + self.signal_type = None + self.alert_state = None + self.monitor_condition = None + self.target_resource = target_resource + self.target_resource_name = target_resource_name + self.target_resource_group = target_resource_group + self.target_resource_type = target_resource_type + self.monitor_service = None + self.alert_rule = None + self.source_created_id = None + self.smart_group_id = None + self.smart_grouping_reason = None + self.start_date_time = None + self.last_modified_date_time = None + self.monitor_condition_resolved_date_time = None + self.last_modified_user_name = None + + +class MonitorServiceDetails(Model): + """Details of a monitor service. + + :param name: Monitor service name + :type name: str + :param display_name: Monitor service display name + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, **kwargs) -> None: + super(MonitorServiceDetails, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + + +class MonitorServiceList(AlertsMetaDataProperties): + """Monitor service details. + + Monitor service details. + + All required parameters must be populated in order to send to Azure. + + :param metadata_identifier: Required. Constant filled by server. + :type metadata_identifier: str + :param data: Required. Array of operations + :type data: + list[~azure.mgmt.alertsmanagement.models.MonitorServiceDetails] + """ + + _validation = { + 'metadata_identifier': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'metadata_identifier': {'key': 'metadataIdentifier', 'type': 'str'}, + 'data': {'key': 'data', 'type': '[MonitorServiceDetails]'}, + } + + def __init__(self, *, data, **kwargs) -> None: + super(MonitorServiceList, self).__init__(**kwargs) + self.data = data + self.metadata_identifier = 'MonitorServiceList' + + +class Operation(Model): + """Operation provided by provider. + + :param name: Name of the operation + :type name: str + :param display: Properties of the operation + :type display: ~azure.mgmt.alertsmanagement.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + + +class OperationDisplay(Model): + """Properties of the operation. + + :param provider: Provider name + :type provider: str + :param resource: Resource name + :type resource: str + :param operation: Operation name + :type operation: str + :param description: Description of the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class PatchObject(Model): + """Data contract for patch. + + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param tags: tags to be updated + :type tags: object + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + } + + def __init__(self, *, status=None, tags=None, **kwargs) -> None: + super(PatchObject, self).__init__(**kwargs) + self.status = status + self.tags = tags + + +class Scope(Model): + """Target scope for a given action rule. By default scope will be the + subscription. User can also provide list of resource groups or list of + resources from the scope subscription as well. + + :param scope_type: type of target scope. Possible values include: + 'ResourceGroup', 'Resource' + :type scope_type: str or ~azure.mgmt.alertsmanagement.models.ScopeType + :param values: list of ARM IDs of the given scope type which will be the + target of the given action rule. + :type values: list[str] + """ + + _attribute_map = { + 'scope_type': {'key': 'scopeType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, *, scope_type=None, values=None, **kwargs) -> None: + super(Scope, self).__init__(**kwargs) + self.scope_type = scope_type + self.values = values + + +class SmartGroup(Resource): + """Set of related alerts grouped together smartly by AMS. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param alerts_count: Total number of alerts in smart group + :type alerts_count: int + :ivar smart_group_state: Smart group state. Possible values include: + 'New', 'Acknowledged', 'Closed' + :vartype smart_group_state: str or + ~azure.mgmt.alertsmanagement.models.State + :ivar severity: Severity of smart group is the highest(Sev0 >... > Sev4) + severity of all the alerts in the group. Possible values include: 'Sev0', + 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :ivar start_date_time: Creation time of smart group. Date-Time in ISO-8601 + format. + :vartype start_date_time: datetime + :ivar last_modified_date_time: Last updated time of smart group. Date-Time + in ISO-8601 format. + :vartype last_modified_date_time: datetime + :ivar last_modified_user_name: Last modified by user name. + :vartype last_modified_user_name: str + :param resources: Summary of target resources in the smart group + :type resources: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param resource_types: Summary of target resource types in the smart group + :type resource_types: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param resource_groups: Summary of target resource groups in the smart + group + :type resource_groups: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param monitor_services: Summary of monitorServices in the smart group + :type monitor_services: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param monitor_conditions: Summary of monitorConditions in the smart group + :type monitor_conditions: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param alert_states: Summary of alertStates in the smart group + :type alert_states: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param alert_severities: Summary of alertSeverities in the smart group + :type alert_severities: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param next_link: The URI to fetch the next page of alerts. Call + ListNext() with this URI to fetch the next page alerts. + :type next_link: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'smart_group_state': {'readonly': True}, + 'severity': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'last_modified_user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'alerts_count': {'key': 'properties.alertsCount', 'type': 'int'}, + 'smart_group_state': {'key': 'properties.smartGroupState', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'properties.lastModifiedDateTime', 'type': 'iso-8601'}, + 'last_modified_user_name': {'key': 'properties.lastModifiedUserName', 'type': 'str'}, + 'resources': {'key': 'properties.resources', 'type': '[SmartGroupAggregatedProperty]'}, + 'resource_types': {'key': 'properties.resourceTypes', 'type': '[SmartGroupAggregatedProperty]'}, + 'resource_groups': {'key': 'properties.resourceGroups', 'type': '[SmartGroupAggregatedProperty]'}, + 'monitor_services': {'key': 'properties.monitorServices', 'type': '[SmartGroupAggregatedProperty]'}, + 'monitor_conditions': {'key': 'properties.monitorConditions', 'type': '[SmartGroupAggregatedProperty]'}, + 'alert_states': {'key': 'properties.alertStates', 'type': '[SmartGroupAggregatedProperty]'}, + 'alert_severities': {'key': 'properties.alertSeverities', 'type': '[SmartGroupAggregatedProperty]'}, + 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, + } + + def __init__(self, *, alerts_count: int=None, resources=None, resource_types=None, resource_groups=None, monitor_services=None, monitor_conditions=None, alert_states=None, alert_severities=None, next_link: str=None, **kwargs) -> None: + super(SmartGroup, self).__init__(**kwargs) + self.alerts_count = alerts_count + self.smart_group_state = None + self.severity = None + self.start_date_time = None + self.last_modified_date_time = None + self.last_modified_user_name = None + self.resources = resources + self.resource_types = resource_types + self.resource_groups = resource_groups + self.monitor_services = monitor_services + self.monitor_conditions = monitor_conditions + self.alert_states = alert_states + self.alert_severities = alert_severities + self.next_link = next_link + + +class SmartGroupAggregatedProperty(Model): + """Aggregated property of each type. + + :param name: Name of the type. + :type name: str + :param count: Total number of items of type. + :type count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, count: int=None, **kwargs) -> None: + super(SmartGroupAggregatedProperty, self).__init__(**kwargs) + self.name = name + self.count = count + + +class SmartGroupModification(Resource): + """Alert Modification details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.SmartGroupModificationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'SmartGroupModificationProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(SmartGroupModification, self).__init__(**kwargs) + self.properties = properties + + +class SmartGroupModificationItem(Model): + """smartGroup modification item. + + :param modification_event: Reason for the modification. Possible values + include: 'SmartGroupCreated', 'StateChange', 'AlertAdded', 'AlertRemoved' + :type modification_event: str or + ~azure.mgmt.alertsmanagement.models.SmartGroupModificationEvent + :param old_value: Old value + :type old_value: str + :param new_value: New value + :type new_value: str + :param modified_at: Modified date and time + :type modified_at: str + :param modified_by: Modified user details (Principal client name) + :type modified_by: str + :param comments: Modification comments + :type comments: str + :param description: Description of the modification + :type description: str + """ + + _attribute_map = { + 'modification_event': {'key': 'modificationEvent', 'type': 'SmartGroupModificationEvent'}, + 'old_value': {'key': 'oldValue', 'type': 'str'}, + 'new_value': {'key': 'newValue', 'type': 'str'}, + 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, modification_event=None, old_value: str=None, new_value: str=None, modified_at: str=None, modified_by: str=None, comments: str=None, description: str=None, **kwargs) -> None: + super(SmartGroupModificationItem, self).__init__(**kwargs) + self.modification_event = modification_event + self.old_value = old_value + self.new_value = new_value + self.modified_at = modified_at + self.modified_by = modified_by + self.comments = comments + self.description = description + + +class SmartGroupModificationProperties(Model): + """Properties of the smartGroup modification item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar smart_group_id: Unique Id of the smartGroup for which the history is + being retrieved + :vartype smart_group_id: str + :param modifications: Modification details + :type modifications: + list[~azure.mgmt.alertsmanagement.models.SmartGroupModificationItem] + :param next_link: URL to fetch the next set of results. + :type next_link: str + """ + + _validation = { + 'smart_group_id': {'readonly': True}, + } + + _attribute_map = { + 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, + 'modifications': {'key': 'modifications', 'type': '[SmartGroupModificationItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, modifications=None, next_link: str=None, **kwargs) -> None: + super(SmartGroupModificationProperties, self).__init__(**kwargs) + self.smart_group_id = None + self.modifications = modifications + self.next_link = next_link + + +class Suppression(ActionRuleProperties): + """Suppression based Action Rule. + + Action rule with suppression configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + :param suppression_config: Required. suppression configuration for the + action rule + :type suppression_config: + ~azure.mgmt.alertsmanagement.models.SuppressionConfig + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + 'suppression_config': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'suppression_config': {'key': 'suppressionConfig', 'type': 'SuppressionConfig'}, + } + + def __init__(self, *, suppression_config, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(Suppression, self).__init__(scope=scope, conditions=conditions, description=description, status=status, **kwargs) + self.suppression_config = suppression_config + self.type = 'Suppression' + + +class SuppressionConfig(Model): + """Suppression logic for a given action rule. + + All required parameters must be populated in order to send to Azure. + + :param recurrence_type: Required. Specifies when the suppression should be + applied. Possible values include: 'Always', 'Once', 'Daily', 'Weekly', + 'Monthly' + :type recurrence_type: str or + ~azure.mgmt.alertsmanagement.models.SuppressionType + :param schedule: suppression schedule configuration + :type schedule: ~azure.mgmt.alertsmanagement.models.SuppressionSchedule + """ + + _validation = { + 'recurrence_type': {'required': True}, + } + + _attribute_map = { + 'recurrence_type': {'key': 'recurrenceType', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'SuppressionSchedule'}, + } + + def __init__(self, *, recurrence_type, schedule=None, **kwargs) -> None: + super(SuppressionConfig, self).__init__(**kwargs) + self.recurrence_type = recurrence_type + self.schedule = schedule + + +class SuppressionSchedule(Model): + """Schedule for a given suppression configuration. + + :param start_date: Start date for suppression + :type start_date: str + :param end_date: End date for suppression + :type end_date: str + :param start_time: Start time for suppression + :type start_time: str + :param end_time: End date for suppression + :type end_time: str + :param recurrence_values: Specifies the values for recurrence pattern + :type recurrence_values: list[int] + """ + + _attribute_map = { + 'start_date': {'key': 'startDate', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'recurrence_values': {'key': 'recurrenceValues', 'type': '[int]'}, + } + + def __init__(self, *, start_date: str=None, end_date: str=None, start_time: str=None, end_time: str=None, recurrence_values=None, **kwargs) -> None: + super(SuppressionSchedule, self).__init__(**kwargs) + self.start_date = start_date + self.end_date = end_date + self.start_time = start_time + self.end_time = end_time + self.recurrence_values = recurrence_values + + +class ThrottlingInformation(Model): + """Optional throttling information for the alert rule. + + :param duration: The required duration (in ISO8601 format) to wait before + notifying on the alert rule again. The time granularity must be in minutes + and minimum value is 0 minutes + :type duration: timedelta + """ + + _attribute_map = { + 'duration': {'key': 'duration', 'type': 'duration'}, + } + + def __init__(self, *, duration=None, **kwargs) -> None: + super(ThrottlingInformation, self).__init__(**kwargs) + self.duration = duration diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_paged_models.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_paged_models.py new file mode 100644 index 000000000000..aece7093df75 --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_paged_models.py @@ -0,0 +1,79 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class AlertPaged(Paged): + """ + A paging container for iterating over a list of :class:`Alert ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Alert]'} + } + + def __init__(self, *args, **kwargs): + + super(AlertPaged, self).__init__(*args, **kwargs) +class SmartGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`SmartGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SmartGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(SmartGroupPaged, self).__init__(*args, **kwargs) +class ActionRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`ActionRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ActionRule]'} + } + + def __init__(self, *args, **kwargs): + + super(ActionRulePaged, self).__init__(*args, **kwargs) +class AlertRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`AlertRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AlertRule]'} + } + + def __init__(self, *args, **kwargs): + + super(AlertRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert.py deleted file mode 100644 index 634c2c747b17..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Alert(Resource): - """An alert created in alert management service. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: ~azure.mgmt.alertsmanagement.models.AlertProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertProperties'}, - } - - def __init__(self, **kwargs): - super(Alert, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification.py deleted file mode 100644 index e2d77167596c..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AlertModification(Resource): - """Alert Modification details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: - ~azure.mgmt.alertsmanagement.models.AlertModificationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertModificationProperties'}, - } - - def __init__(self, **kwargs): - super(AlertModification, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item.py deleted file mode 100644 index 50915b06ce40..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertModificationItem(Model): - """Alert modification item. - - :param modification_event: Reason for the modification. Possible values - include: 'AlertCreated', 'StateChange', 'MonitorConditionChange' - :type modification_event: str or - ~azure.mgmt.alertsmanagement.models.AlertModificationEvent - :param old_value: Old value - :type old_value: str - :param new_value: New value - :type new_value: str - :param modified_at: Modified date and time - :type modified_at: str - :param modified_by: Modified user details (Principal client name) - :type modified_by: str - :param comments: Modification comments - :type comments: str - :param description: Description of the modification - :type description: str - """ - - _attribute_map = { - 'modification_event': {'key': 'modificationEvent', 'type': 'AlertModificationEvent'}, - 'old_value': {'key': 'oldValue', 'type': 'str'}, - 'new_value': {'key': 'newValue', 'type': 'str'}, - 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, - 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, - 'comments': {'key': 'comments', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AlertModificationItem, self).__init__(**kwargs) - self.modification_event = kwargs.get('modification_event', None) - self.old_value = kwargs.get('old_value', None) - self.new_value = kwargs.get('new_value', None) - self.modified_at = kwargs.get('modified_at', None) - self.modified_by = kwargs.get('modified_by', None) - self.comments = kwargs.get('comments', None) - self.description = kwargs.get('description', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item_py3.py deleted file mode 100644 index b051daad6d2a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertModificationItem(Model): - """Alert modification item. - - :param modification_event: Reason for the modification. Possible values - include: 'AlertCreated', 'StateChange', 'MonitorConditionChange' - :type modification_event: str or - ~azure.mgmt.alertsmanagement.models.AlertModificationEvent - :param old_value: Old value - :type old_value: str - :param new_value: New value - :type new_value: str - :param modified_at: Modified date and time - :type modified_at: str - :param modified_by: Modified user details (Principal client name) - :type modified_by: str - :param comments: Modification comments - :type comments: str - :param description: Description of the modification - :type description: str - """ - - _attribute_map = { - 'modification_event': {'key': 'modificationEvent', 'type': 'AlertModificationEvent'}, - 'old_value': {'key': 'oldValue', 'type': 'str'}, - 'new_value': {'key': 'newValue', 'type': 'str'}, - 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, - 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, - 'comments': {'key': 'comments', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, modification_event=None, old_value: str=None, new_value: str=None, modified_at: str=None, modified_by: str=None, comments: str=None, description: str=None, **kwargs) -> None: - super(AlertModificationItem, self).__init__(**kwargs) - self.modification_event = modification_event - self.old_value = old_value - self.new_value = new_value - self.modified_at = modified_at - self.modified_by = modified_by - self.comments = comments - self.description = description diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties.py deleted file mode 100644 index c1d1b8123ecd..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertModificationProperties(Model): - """Properties of the alert modification item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar alert_id: Unique Id of the alert for which the history is being - retrieved - :vartype alert_id: str - :param modifications: Modification details - :type modifications: - list[~azure.mgmt.alertsmanagement.models.AlertModificationItem] - """ - - _validation = { - 'alert_id': {'readonly': True}, - } - - _attribute_map = { - 'alert_id': {'key': 'alertId', 'type': 'str'}, - 'modifications': {'key': 'modifications', 'type': '[AlertModificationItem]'}, - } - - def __init__(self, **kwargs): - super(AlertModificationProperties, self).__init__(**kwargs) - self.alert_id = None - self.modifications = kwargs.get('modifications', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties_py3.py deleted file mode 100644 index 51e67637a07a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertModificationProperties(Model): - """Properties of the alert modification item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar alert_id: Unique Id of the alert for which the history is being - retrieved - :vartype alert_id: str - :param modifications: Modification details - :type modifications: - list[~azure.mgmt.alertsmanagement.models.AlertModificationItem] - """ - - _validation = { - 'alert_id': {'readonly': True}, - } - - _attribute_map = { - 'alert_id': {'key': 'alertId', 'type': 'str'}, - 'modifications': {'key': 'modifications', 'type': '[AlertModificationItem]'}, - } - - def __init__(self, *, modifications=None, **kwargs) -> None: - super(AlertModificationProperties, self).__init__(**kwargs) - self.alert_id = None - self.modifications = modifications diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_py3.py deleted file mode 100644 index b7cae8114091..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AlertModification(Resource): - """Alert Modification details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: - ~azure.mgmt.alertsmanagement.models.AlertModificationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertModificationProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(AlertModification, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_paged.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_paged.py deleted file mode 100644 index 2ae2c88ee2e1..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AlertPaged(Paged): - """ - A paging container for iterating over a list of :class:`Alert ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Alert]'} - } - - def __init__(self, *args, **kwargs): - - super(AlertPaged, self).__init__(*args, **kwargs) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties.py deleted file mode 100644 index a8c7b761aba5..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertProperties(Model): - """Alert property bag. - - :param essentials: - :type essentials: ~azure.mgmt.alertsmanagement.models.Essentials - :param context: - :type context: object - :param egress_config: - :type egress_config: object - """ - - _attribute_map = { - 'essentials': {'key': 'essentials', 'type': 'Essentials'}, - 'context': {'key': 'context', 'type': 'object'}, - 'egress_config': {'key': 'egressConfig', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AlertProperties, self).__init__(**kwargs) - self.essentials = kwargs.get('essentials', None) - self.context = kwargs.get('context', None) - self.egress_config = kwargs.get('egress_config', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties_py3.py deleted file mode 100644 index a6c9cf43db24..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertProperties(Model): - """Alert property bag. - - :param essentials: - :type essentials: ~azure.mgmt.alertsmanagement.models.Essentials - :param context: - :type context: object - :param egress_config: - :type egress_config: object - """ - - _attribute_map = { - 'essentials': {'key': 'essentials', 'type': 'Essentials'}, - 'context': {'key': 'context', 'type': 'object'}, - 'egress_config': {'key': 'egressConfig', 'type': 'object'}, - } - - def __init__(self, *, essentials=None, context=None, egress_config=None, **kwargs) -> None: - super(AlertProperties, self).__init__(**kwargs) - self.essentials = essentials - self.context = context - self.egress_config = egress_config diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_py3.py deleted file mode 100644 index 4068ed33b63a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Alert(Resource): - """An alert created in alert management service. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: ~azure.mgmt.alertsmanagement.models.AlertProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(Alert, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary.py deleted file mode 100644 index 9521d5cb5d32..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AlertsSummary(Resource): - """Summary of alerts based on the input filters and 'groupby' parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroup - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertsSummaryGroup'}, - } - - def __init__(self, **kwargs): - super(AlertsSummary, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group.py deleted file mode 100644 index 470f52f8efdf..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertsSummaryGroup(Model): - """Group the result set. - - :param total: Total count of the result set. - :type total: int - :param smart_groups_count: Total count of the smart groups. - :type smart_groups_count: int - :param groupedby: Name of the field aggregated - :type groupedby: str - :param values: List of the items - :type values: - list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] - """ - - _attribute_map = { - 'total': {'key': 'total', 'type': 'int'}, - 'smart_groups_count': {'key': 'smartGroupsCount', 'type': 'int'}, - 'groupedby': {'key': 'groupedby', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, - } - - def __init__(self, **kwargs): - super(AlertsSummaryGroup, self).__init__(**kwargs) - self.total = kwargs.get('total', None) - self.smart_groups_count = kwargs.get('smart_groups_count', None) - self.groupedby = kwargs.get('groupedby', None) - self.values = kwargs.get('values', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item.py deleted file mode 100644 index 232fd9f12e08..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertsSummaryGroupItem(Model): - """Alerts summary group item. - - :param name: Value of the aggregated field - :type name: str - :param count: Count of the aggregated field - :type count: int - :param groupedby: Name of the field aggregated - :type groupedby: str - :param values: List of the items - :type values: - list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'groupedby': {'key': 'groupedby', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, - } - - def __init__(self, **kwargs): - super(AlertsSummaryGroupItem, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.count = kwargs.get('count', None) - self.groupedby = kwargs.get('groupedby', None) - self.values = kwargs.get('values', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_py3.py deleted file mode 100644 index f802c4f1eaa3..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertsSummaryGroupItem(Model): - """Alerts summary group item. - - :param name: Value of the aggregated field - :type name: str - :param count: Count of the aggregated field - :type count: int - :param groupedby: Name of the field aggregated - :type groupedby: str - :param values: List of the items - :type values: - list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'groupedby': {'key': 'groupedby', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, - } - - def __init__(self, *, name: str=None, count: int=None, groupedby: str=None, values=None, **kwargs) -> None: - super(AlertsSummaryGroupItem, self).__init__(**kwargs) - self.name = name - self.count = count - self.groupedby = groupedby - self.values = values diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_py3.py deleted file mode 100644 index b9d4c71d3403..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertsSummaryGroup(Model): - """Group the result set. - - :param total: Total count of the result set. - :type total: int - :param smart_groups_count: Total count of the smart groups. - :type smart_groups_count: int - :param groupedby: Name of the field aggregated - :type groupedby: str - :param values: List of the items - :type values: - list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] - """ - - _attribute_map = { - 'total': {'key': 'total', 'type': 'int'}, - 'smart_groups_count': {'key': 'smartGroupsCount', 'type': 'int'}, - 'groupedby': {'key': 'groupedby', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, - } - - def __init__(self, *, total: int=None, smart_groups_count: int=None, groupedby: str=None, values=None, **kwargs) -> None: - super(AlertsSummaryGroup, self).__init__(**kwargs) - self.total = total - self.smart_groups_count = smart_groups_count - self.groupedby = groupedby - self.values = values diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_py3.py deleted file mode 100644 index ed41ea6d10de..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AlertsSummary(Resource): - """Summary of alerts based on the input filters and 'groupby' parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroup - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertsSummaryGroup'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(AlertsSummary, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials.py deleted file mode 100644 index a333d42f1b82..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Essentials(Model): - """This object contains normalized fields across different monitor service and - also contains state related fields. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar severity: Severity of alert Sev0 being highest and Sev3 being - lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :ivar signal_type: Log based alert or metric based alert. Possible values - include: 'Metric', 'Log', 'Unknown' - :vartype signal_type: str or - ~azure.mgmt.alertsmanagement.models.SignalType - :ivar alert_state: Alert object state, which is modified by the user. - Possible values include: 'New', 'Acknowledged', 'Closed' - :vartype alert_state: str or - ~azure.mgmt.alertsmanagement.models.AlertState - :ivar monitor_condition: Represents rule condition(Fired/Resolved) - maintained by monitor service depending on the state of the state. - Possible values include: 'Fired', 'Resolved' - :vartype monitor_condition: str or - ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param target_resource: Target ARM resource, on which alert got created. - :type target_resource: str - :param target_resource_name: Name of the target ARM resource name, on - which alert got created. - :type target_resource_name: str - :param target_resource_group: Resource group of target ARM resource, on - which alert got created. - :type target_resource_group: str - :param target_resource_type: Resource type of target ARM resource, on - which alert got created. - :type target_resource_type: str - :ivar monitor_service: Monitor service on which the rule(monitor) is set. - Possible values include: 'Application Insights', 'ActivityLog - Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', - 'ActivityLog Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' - :vartype monitor_service: str or - ~azure.mgmt.alertsmanagement.models.MonitorService - :ivar alert_rule: Rule(monitor) which fired alert instance. Depending on - the monitor service, this would be ARM id or name of the rule. - :vartype alert_rule: str - :ivar source_created_id: Unique Id created by monitor service for each - alert instance. This could be used to track the issue at the monitor - service, in case of Nagios, Zabbix, SCOM etc. - :vartype source_created_id: str - :ivar smart_group_id: Unique Id of the smart group - :vartype smart_group_id: str - :ivar smart_grouping_reason: Verbose reason describing the reason why this - alert instance is added to a smart group - :vartype smart_grouping_reason: str - :ivar start_date_time: Creation time(ISO-8601 format) of alert instance. - :vartype start_date_time: datetime - :ivar last_modified_date_time: Last modification time(ISO-8601 format) of - alert instance. - :vartype last_modified_date_time: datetime - :ivar monitor_condition_resolved_date_time: Resolved time(ISO-8601 format) - of alert instance. This will be updated when monitor service resolves the - alert instance because of the rule condition is not met. - :vartype monitor_condition_resolved_date_time: datetime - :ivar last_modified_user_name: User who last modified the alert, in case - of monitor service updates user would be 'system', otherwise name of the - user. - :vartype last_modified_user_name: str - """ - - _validation = { - 'severity': {'readonly': True}, - 'signal_type': {'readonly': True}, - 'alert_state': {'readonly': True}, - 'monitor_condition': {'readonly': True}, - 'monitor_service': {'readonly': True}, - 'alert_rule': {'readonly': True}, - 'source_created_id': {'readonly': True}, - 'smart_group_id': {'readonly': True}, - 'smart_grouping_reason': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'last_modified_date_time': {'readonly': True}, - 'monitor_condition_resolved_date_time': {'readonly': True}, - 'last_modified_user_name': {'readonly': True}, - } - - _attribute_map = { - 'severity': {'key': 'severity', 'type': 'str'}, - 'signal_type': {'key': 'signalType', 'type': 'str'}, - 'alert_state': {'key': 'alertState', 'type': 'str'}, - 'monitor_condition': {'key': 'monitorCondition', 'type': 'str'}, - 'target_resource': {'key': 'targetResource', 'type': 'str'}, - 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, - 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, - 'target_resource_type': {'key': 'targetResourceType', 'type': 'str'}, - 'monitor_service': {'key': 'monitorService', 'type': 'str'}, - 'alert_rule': {'key': 'alertRule', 'type': 'str'}, - 'source_created_id': {'key': 'sourceCreatedId', 'type': 'str'}, - 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, - 'smart_grouping_reason': {'key': 'smartGroupingReason', 'type': 'str'}, - 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, - 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, - 'monitor_condition_resolved_date_time': {'key': 'monitorConditionResolvedDateTime', 'type': 'iso-8601'}, - 'last_modified_user_name': {'key': 'lastModifiedUserName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Essentials, self).__init__(**kwargs) - self.severity = None - self.signal_type = None - self.alert_state = None - self.monitor_condition = None - self.target_resource = kwargs.get('target_resource', None) - self.target_resource_name = kwargs.get('target_resource_name', None) - self.target_resource_group = kwargs.get('target_resource_group', None) - self.target_resource_type = kwargs.get('target_resource_type', None) - self.monitor_service = None - self.alert_rule = None - self.source_created_id = None - self.smart_group_id = None - self.smart_grouping_reason = None - self.start_date_time = None - self.last_modified_date_time = None - self.monitor_condition_resolved_date_time = None - self.last_modified_user_name = None diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials_py3.py deleted file mode 100644 index 01052b35702e..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials_py3.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Essentials(Model): - """This object contains normalized fields across different monitor service and - also contains state related fields. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar severity: Severity of alert Sev0 being highest and Sev3 being - lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :ivar signal_type: Log based alert or metric based alert. Possible values - include: 'Metric', 'Log', 'Unknown' - :vartype signal_type: str or - ~azure.mgmt.alertsmanagement.models.SignalType - :ivar alert_state: Alert object state, which is modified by the user. - Possible values include: 'New', 'Acknowledged', 'Closed' - :vartype alert_state: str or - ~azure.mgmt.alertsmanagement.models.AlertState - :ivar monitor_condition: Represents rule condition(Fired/Resolved) - maintained by monitor service depending on the state of the state. - Possible values include: 'Fired', 'Resolved' - :vartype monitor_condition: str or - ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param target_resource: Target ARM resource, on which alert got created. - :type target_resource: str - :param target_resource_name: Name of the target ARM resource name, on - which alert got created. - :type target_resource_name: str - :param target_resource_group: Resource group of target ARM resource, on - which alert got created. - :type target_resource_group: str - :param target_resource_type: Resource type of target ARM resource, on - which alert got created. - :type target_resource_type: str - :ivar monitor_service: Monitor service on which the rule(monitor) is set. - Possible values include: 'Application Insights', 'ActivityLog - Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', - 'ActivityLog Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' - :vartype monitor_service: str or - ~azure.mgmt.alertsmanagement.models.MonitorService - :ivar alert_rule: Rule(monitor) which fired alert instance. Depending on - the monitor service, this would be ARM id or name of the rule. - :vartype alert_rule: str - :ivar source_created_id: Unique Id created by monitor service for each - alert instance. This could be used to track the issue at the monitor - service, in case of Nagios, Zabbix, SCOM etc. - :vartype source_created_id: str - :ivar smart_group_id: Unique Id of the smart group - :vartype smart_group_id: str - :ivar smart_grouping_reason: Verbose reason describing the reason why this - alert instance is added to a smart group - :vartype smart_grouping_reason: str - :ivar start_date_time: Creation time(ISO-8601 format) of alert instance. - :vartype start_date_time: datetime - :ivar last_modified_date_time: Last modification time(ISO-8601 format) of - alert instance. - :vartype last_modified_date_time: datetime - :ivar monitor_condition_resolved_date_time: Resolved time(ISO-8601 format) - of alert instance. This will be updated when monitor service resolves the - alert instance because of the rule condition is not met. - :vartype monitor_condition_resolved_date_time: datetime - :ivar last_modified_user_name: User who last modified the alert, in case - of monitor service updates user would be 'system', otherwise name of the - user. - :vartype last_modified_user_name: str - """ - - _validation = { - 'severity': {'readonly': True}, - 'signal_type': {'readonly': True}, - 'alert_state': {'readonly': True}, - 'monitor_condition': {'readonly': True}, - 'monitor_service': {'readonly': True}, - 'alert_rule': {'readonly': True}, - 'source_created_id': {'readonly': True}, - 'smart_group_id': {'readonly': True}, - 'smart_grouping_reason': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'last_modified_date_time': {'readonly': True}, - 'monitor_condition_resolved_date_time': {'readonly': True}, - 'last_modified_user_name': {'readonly': True}, - } - - _attribute_map = { - 'severity': {'key': 'severity', 'type': 'str'}, - 'signal_type': {'key': 'signalType', 'type': 'str'}, - 'alert_state': {'key': 'alertState', 'type': 'str'}, - 'monitor_condition': {'key': 'monitorCondition', 'type': 'str'}, - 'target_resource': {'key': 'targetResource', 'type': 'str'}, - 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, - 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, - 'target_resource_type': {'key': 'targetResourceType', 'type': 'str'}, - 'monitor_service': {'key': 'monitorService', 'type': 'str'}, - 'alert_rule': {'key': 'alertRule', 'type': 'str'}, - 'source_created_id': {'key': 'sourceCreatedId', 'type': 'str'}, - 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, - 'smart_grouping_reason': {'key': 'smartGroupingReason', 'type': 'str'}, - 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, - 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, - 'monitor_condition_resolved_date_time': {'key': 'monitorConditionResolvedDateTime', 'type': 'iso-8601'}, - 'last_modified_user_name': {'key': 'lastModifiedUserName', 'type': 'str'}, - } - - def __init__(self, *, target_resource: str=None, target_resource_name: str=None, target_resource_group: str=None, target_resource_type: str=None, **kwargs) -> None: - super(Essentials, self).__init__(**kwargs) - self.severity = None - self.signal_type = None - self.alert_state = None - self.monitor_condition = None - self.target_resource = target_resource - self.target_resource_name = target_resource_name - self.target_resource_group = target_resource_group - self.target_resource_type = target_resource_type - self.monitor_service = None - self.alert_rule = None - self.source_created_id = None - self.smart_group_id = None - self.smart_grouping_reason = None - self.start_date_time = None - self.last_modified_date_time = None - self.monitor_condition_resolved_date_time = None - self.last_modified_user_name = None diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation.py deleted file mode 100644 index 1b5fea4ff02a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """Operation provided by provider. - - :param name: Name of the operation - :type name: str - :param display: Properties of the operation - :type display: ~azure.mgmt.alertsmanagement.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display.py deleted file mode 100644 index 89c4bdd6ccb6..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """Properties of the operation. - - :param provider: Provider name - :type provider: str - :param resource: Resource name - :type resource: str - :param operation: Operation name - :type operation: str - :param description: Description of the operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display_py3.py deleted file mode 100644 index fa3740dfc655..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """Properties of the operation. - - :param provider: Provider name - :type provider: str - :param resource: Resource name - :type resource: str - :param operation: Operation name - :type operation: str - :param description: Description of the operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_paged.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_paged.py deleted file mode 100644 index 3794d02c84f1..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_py3.py deleted file mode 100644 index ee66b4cfa181..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """Operation provided by provider. - - :param name: Name of the operation - :type name: str - :param display: Properties of the operation - :type display: ~azure.mgmt.alertsmanagement.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, name: str=None, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource.py deleted file mode 100644 index 7454d56b9033..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """An azure resource object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.type = None - self.name = None diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource_py3.py deleted file mode 100644 index 83ff9951fb91..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """An azure resource object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.type = None - self.name = None diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group.py deleted file mode 100644 index b1754f67fb4c..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class SmartGroup(Resource): - """Set of related alerts grouped together smartly by AMS. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param alerts_count: Total number of alerts in smart group - :type alerts_count: int - :ivar smart_group_state: Smart group state. Possible values include: - 'New', 'Acknowledged', 'Closed' - :vartype smart_group_state: str or - ~azure.mgmt.alertsmanagement.models.State - :ivar severity: Severity of smart group is the highest(Sev0 >... > Sev4) - severity of all the alerts in the group. Possible values include: 'Sev0', - 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :ivar start_date_time: Creation time of smart group. Date-Time in ISO-8601 - format. - :vartype start_date_time: datetime - :ivar last_modified_date_time: Last updated time of smart group. Date-Time - in ISO-8601 format. - :vartype last_modified_date_time: datetime - :ivar last_modified_user_name: Last modified by user name. - :vartype last_modified_user_name: str - :param resources: Summary of target resources in the smart group - :type resources: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param resource_types: Summary of target resource types in the smart group - :type resource_types: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param resource_groups: Summary of target resource groups in the smart - group - :type resource_groups: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param monitor_services: Summary of monitorServices in the smart group - :type monitor_services: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param monitor_conditions: Summary of monitorConditions in the smart group - :type monitor_conditions: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param alert_states: Summary of alertStates in the smart group - :type alert_states: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param alert_severities: Summary of alertSeverities in the smart group - :type alert_severities: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param next_link: The URI to fetch the next page of alerts. Call - ListNext() with this URI to fetch the next page alerts. - :type next_link: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - 'smart_group_state': {'readonly': True}, - 'severity': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'last_modified_date_time': {'readonly': True}, - 'last_modified_user_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'alerts_count': {'key': 'properties.alertsCount', 'type': 'int'}, - 'smart_group_state': {'key': 'properties.smartGroupState', 'type': 'str'}, - 'severity': {'key': 'properties.severity', 'type': 'str'}, - 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, - 'last_modified_date_time': {'key': 'properties.lastModifiedDateTime', 'type': 'iso-8601'}, - 'last_modified_user_name': {'key': 'properties.lastModifiedUserName', 'type': 'str'}, - 'resources': {'key': 'properties.resources', 'type': '[SmartGroupAggregatedProperty]'}, - 'resource_types': {'key': 'properties.resourceTypes', 'type': '[SmartGroupAggregatedProperty]'}, - 'resource_groups': {'key': 'properties.resourceGroups', 'type': '[SmartGroupAggregatedProperty]'}, - 'monitor_services': {'key': 'properties.monitorServices', 'type': '[SmartGroupAggregatedProperty]'}, - 'monitor_conditions': {'key': 'properties.monitorConditions', 'type': '[SmartGroupAggregatedProperty]'}, - 'alert_states': {'key': 'properties.alertStates', 'type': '[SmartGroupAggregatedProperty]'}, - 'alert_severities': {'key': 'properties.alertSeverities', 'type': '[SmartGroupAggregatedProperty]'}, - 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SmartGroup, self).__init__(**kwargs) - self.alerts_count = kwargs.get('alerts_count', None) - self.smart_group_state = None - self.severity = None - self.start_date_time = None - self.last_modified_date_time = None - self.last_modified_user_name = None - self.resources = kwargs.get('resources', None) - self.resource_types = kwargs.get('resource_types', None) - self.resource_groups = kwargs.get('resource_groups', None) - self.monitor_services = kwargs.get('monitor_services', None) - self.monitor_conditions = kwargs.get('monitor_conditions', None) - self.alert_states = kwargs.get('alert_states', None) - self.alert_severities = kwargs.get('alert_severities', None) - self.next_link = kwargs.get('next_link', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property.py deleted file mode 100644 index 4681ff600eff..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupAggregatedProperty(Model): - """Aggregated property of each type. - - :param name: Name of the type. - :type name: str - :param count: Total number of items of type. - :type count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(SmartGroupAggregatedProperty, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.count = kwargs.get('count', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property_py3.py deleted file mode 100644 index 5a6bfb2d896e..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupAggregatedProperty(Model): - """Aggregated property of each type. - - :param name: Name of the type. - :type name: str - :param count: Total number of items of type. - :type count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, *, name: str=None, count: int=None, **kwargs) -> None: - super(SmartGroupAggregatedProperty, self).__init__(**kwargs) - self.name = name - self.count = count diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification.py deleted file mode 100644 index b0c27ebc02c4..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class SmartGroupModification(Resource): - """Alert Modification details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: - ~azure.mgmt.alertsmanagement.models.SmartGroupModificationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'SmartGroupModificationProperties'}, - } - - def __init__(self, **kwargs): - super(SmartGroupModification, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item.py deleted file mode 100644 index b87b7a06465d..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupModificationItem(Model): - """smartGroup modification item. - - :param modification_event: Reason for the modification. Possible values - include: 'SmartGroupCreated', 'StateChange', 'AlertAdded', 'AlertRemoved' - :type modification_event: str or - ~azure.mgmt.alertsmanagement.models.SmartGroupModificationEvent - :param old_value: Old value - :type old_value: str - :param new_value: New value - :type new_value: str - :param modified_at: Modified date and time - :type modified_at: str - :param modified_by: Modified user details (Principal client name) - :type modified_by: str - :param comments: Modification comments - :type comments: str - :param description: Description of the modification - :type description: str - """ - - _attribute_map = { - 'modification_event': {'key': 'modificationEvent', 'type': 'SmartGroupModificationEvent'}, - 'old_value': {'key': 'oldValue', 'type': 'str'}, - 'new_value': {'key': 'newValue', 'type': 'str'}, - 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, - 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, - 'comments': {'key': 'comments', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SmartGroupModificationItem, self).__init__(**kwargs) - self.modification_event = kwargs.get('modification_event', None) - self.old_value = kwargs.get('old_value', None) - self.new_value = kwargs.get('new_value', None) - self.modified_at = kwargs.get('modified_at', None) - self.modified_by = kwargs.get('modified_by', None) - self.comments = kwargs.get('comments', None) - self.description = kwargs.get('description', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item_py3.py deleted file mode 100644 index aa07075fb384..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupModificationItem(Model): - """smartGroup modification item. - - :param modification_event: Reason for the modification. Possible values - include: 'SmartGroupCreated', 'StateChange', 'AlertAdded', 'AlertRemoved' - :type modification_event: str or - ~azure.mgmt.alertsmanagement.models.SmartGroupModificationEvent - :param old_value: Old value - :type old_value: str - :param new_value: New value - :type new_value: str - :param modified_at: Modified date and time - :type modified_at: str - :param modified_by: Modified user details (Principal client name) - :type modified_by: str - :param comments: Modification comments - :type comments: str - :param description: Description of the modification - :type description: str - """ - - _attribute_map = { - 'modification_event': {'key': 'modificationEvent', 'type': 'SmartGroupModificationEvent'}, - 'old_value': {'key': 'oldValue', 'type': 'str'}, - 'new_value': {'key': 'newValue', 'type': 'str'}, - 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, - 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, - 'comments': {'key': 'comments', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, modification_event=None, old_value: str=None, new_value: str=None, modified_at: str=None, modified_by: str=None, comments: str=None, description: str=None, **kwargs) -> None: - super(SmartGroupModificationItem, self).__init__(**kwargs) - self.modification_event = modification_event - self.old_value = old_value - self.new_value = new_value - self.modified_at = modified_at - self.modified_by = modified_by - self.comments = comments - self.description = description diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties.py deleted file mode 100644 index 5535552813b3..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupModificationProperties(Model): - """Properties of the smartGroup modification item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar smart_group_id: Unique Id of the smartGroup for which the history is - being retrieved - :vartype smart_group_id: str - :param modifications: Modification details - :type modifications: - list[~azure.mgmt.alertsmanagement.models.SmartGroupModificationItem] - :param next_link: URL to fetch the next set of results. - :type next_link: str - """ - - _validation = { - 'smart_group_id': {'readonly': True}, - } - - _attribute_map = { - 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, - 'modifications': {'key': 'modifications', 'type': '[SmartGroupModificationItem]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SmartGroupModificationProperties, self).__init__(**kwargs) - self.smart_group_id = None - self.modifications = kwargs.get('modifications', None) - self.next_link = kwargs.get('next_link', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties_py3.py deleted file mode 100644 index 40d128112187..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupModificationProperties(Model): - """Properties of the smartGroup modification item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar smart_group_id: Unique Id of the smartGroup for which the history is - being retrieved - :vartype smart_group_id: str - :param modifications: Modification details - :type modifications: - list[~azure.mgmt.alertsmanagement.models.SmartGroupModificationItem] - :param next_link: URL to fetch the next set of results. - :type next_link: str - """ - - _validation = { - 'smart_group_id': {'readonly': True}, - } - - _attribute_map = { - 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, - 'modifications': {'key': 'modifications', 'type': '[SmartGroupModificationItem]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, modifications=None, next_link: str=None, **kwargs) -> None: - super(SmartGroupModificationProperties, self).__init__(**kwargs) - self.smart_group_id = None - self.modifications = modifications - self.next_link = next_link diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_py3.py deleted file mode 100644 index b8cb946b706a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class SmartGroupModification(Resource): - """Alert Modification details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: - ~azure.mgmt.alertsmanagement.models.SmartGroupModificationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'SmartGroupModificationProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(SmartGroupModification, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_py3.py deleted file mode 100644 index a0c00f029485..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_py3.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class SmartGroup(Resource): - """Set of related alerts grouped together smartly by AMS. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param alerts_count: Total number of alerts in smart group - :type alerts_count: int - :ivar smart_group_state: Smart group state. Possible values include: - 'New', 'Acknowledged', 'Closed' - :vartype smart_group_state: str or - ~azure.mgmt.alertsmanagement.models.State - :ivar severity: Severity of smart group is the highest(Sev0 >... > Sev4) - severity of all the alerts in the group. Possible values include: 'Sev0', - 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :ivar start_date_time: Creation time of smart group. Date-Time in ISO-8601 - format. - :vartype start_date_time: datetime - :ivar last_modified_date_time: Last updated time of smart group. Date-Time - in ISO-8601 format. - :vartype last_modified_date_time: datetime - :ivar last_modified_user_name: Last modified by user name. - :vartype last_modified_user_name: str - :param resources: Summary of target resources in the smart group - :type resources: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param resource_types: Summary of target resource types in the smart group - :type resource_types: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param resource_groups: Summary of target resource groups in the smart - group - :type resource_groups: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param monitor_services: Summary of monitorServices in the smart group - :type monitor_services: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param monitor_conditions: Summary of monitorConditions in the smart group - :type monitor_conditions: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param alert_states: Summary of alertStates in the smart group - :type alert_states: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param alert_severities: Summary of alertSeverities in the smart group - :type alert_severities: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param next_link: The URI to fetch the next page of alerts. Call - ListNext() with this URI to fetch the next page alerts. - :type next_link: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - 'smart_group_state': {'readonly': True}, - 'severity': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'last_modified_date_time': {'readonly': True}, - 'last_modified_user_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'alerts_count': {'key': 'properties.alertsCount', 'type': 'int'}, - 'smart_group_state': {'key': 'properties.smartGroupState', 'type': 'str'}, - 'severity': {'key': 'properties.severity', 'type': 'str'}, - 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, - 'last_modified_date_time': {'key': 'properties.lastModifiedDateTime', 'type': 'iso-8601'}, - 'last_modified_user_name': {'key': 'properties.lastModifiedUserName', 'type': 'str'}, - 'resources': {'key': 'properties.resources', 'type': '[SmartGroupAggregatedProperty]'}, - 'resource_types': {'key': 'properties.resourceTypes', 'type': '[SmartGroupAggregatedProperty]'}, - 'resource_groups': {'key': 'properties.resourceGroups', 'type': '[SmartGroupAggregatedProperty]'}, - 'monitor_services': {'key': 'properties.monitorServices', 'type': '[SmartGroupAggregatedProperty]'}, - 'monitor_conditions': {'key': 'properties.monitorConditions', 'type': '[SmartGroupAggregatedProperty]'}, - 'alert_states': {'key': 'properties.alertStates', 'type': '[SmartGroupAggregatedProperty]'}, - 'alert_severities': {'key': 'properties.alertSeverities', 'type': '[SmartGroupAggregatedProperty]'}, - 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, - } - - def __init__(self, *, alerts_count: int=None, resources=None, resource_types=None, resource_groups=None, monitor_services=None, monitor_conditions=None, alert_states=None, alert_severities=None, next_link: str=None, **kwargs) -> None: - super(SmartGroup, self).__init__(**kwargs) - self.alerts_count = alerts_count - self.smart_group_state = None - self.severity = None - self.start_date_time = None - self.last_modified_date_time = None - self.last_modified_user_name = None - self.resources = resources - self.resource_types = resource_types - self.resource_groups = resource_groups - self.monitor_services = monitor_services - self.monitor_conditions = monitor_conditions - self.alert_states = alert_states - self.alert_severities = alert_severities - self.next_link = next_link diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list.py deleted file mode 100644 index 17302096edc5..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupsList(Model): - """List the alerts. - - :param next_link: URL to fetch the next set of alerts. - :type next_link: str - :param value: List of alerts - :type value: list[~azure.mgmt.alertsmanagement.models.SmartGroup] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[SmartGroup]'}, - } - - def __init__(self, **kwargs): - super(SmartGroupsList, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list_py3.py deleted file mode 100644 index 538de5af7747..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupsList(Model): - """List the alerts. - - :param next_link: URL to fetch the next set of alerts. - :type next_link: str - :param value: List of alerts - :type value: list[~azure.mgmt.alertsmanagement.models.SmartGroup] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[SmartGroup]'}, - } - - def __init__(self, *, next_link: str=None, value=None, **kwargs) -> None: - super(SmartGroupsList, self).__init__(**kwargs) - self.next_link = next_link - self.value = value diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py index 9341f4bfee3b..946b389ce5fb 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py @@ -9,12 +9,16 @@ # regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .alerts_operations import AlertsOperations -from .smart_groups_operations import SmartGroupsOperations +from ._operations import Operations +from ._alerts_operations import AlertsOperations +from ._smart_groups_operations import SmartGroupsOperations +from ._action_rules_operations import ActionRulesOperations +from ._smart_detector_alert_rules_operations import SmartDetectorAlertRulesOperations __all__ = [ 'Operations', 'AlertsOperations', 'SmartGroupsOperations', + 'ActionRulesOperations', + 'SmartDetectorAlertRulesOperations', ] diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_action_rules_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_action_rules_operations.py new file mode 100644 index 000000000000..4b988fecc8a6 --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_action_rules_operations.py @@ -0,0 +1,575 @@ +# 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 .. import models + + +class ActionRulesOperations(object): + """ActionRulesOperations 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: "2019-05-05-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-05-05-preview" + + self.config = config + + def list_by_subscription( + self, target_resource_group=None, target_resource_type=None, target_resource=None, severity=None, monitor_service=None, impacted_scope=None, description=None, alert_rule_id=None, action_group=None, name=None, custom_headers=None, raw=False, **operation_config): + """Get all action rule in a given subscription. + + List all action rules of the subscription and given input filters. + + :param target_resource_group: Filter by target resource group name. + Default value is select all. + :type target_resource_group: str + :param target_resource_type: Filter by target resource type. Default + value is select all. + :type target_resource_type: str + :param target_resource: Filter by target resource( which is full ARM + ID) Default value is select all. + :type target_resource: str + :param severity: Filter by severity. Default value is select all. + Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' + :type monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :param impacted_scope: filter by impacted/target scope (provide comma + separated list for multiple scopes). The value should be an well + constructed ARM id of the scope. + :type impacted_scope: str + :param description: filter by alert rule description + :type description: str + :param alert_rule_id: filter by alert rule id + :type alert_rule_id: str + :param action_group: filter by action group configured as part of + action rule + :type action_group: str + :param name: filter by action rule name + :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: An iterator like instance of ActionRule + :rtype: + ~azure.mgmt.alertsmanagement.models.ActionRulePaged[~azure.mgmt.alertsmanagement.models.ActionRule] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if target_resource_group is not None: + query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') + if target_resource_type is not None: + query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') + if target_resource is not None: + query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') + if severity is not None: + query_parameters['severity'] = self._serialize.query("severity", severity, 'str') + if monitor_service is not None: + query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') + if impacted_scope is not None: + query_parameters['impactedScope'] = self._serialize.query("impacted_scope", impacted_scope, 'str') + if description is not None: + query_parameters['description'] = self._serialize.query("description", description, 'str') + if alert_rule_id is not None: + query_parameters['alertRuleId'] = self._serialize.query("alert_rule_id", alert_rule_id, 'str') + if action_group is not None: + query_parameters['actionGroup'] = self._serialize.query("action_group", action_group, 'str') + if name is not None: + query_parameters['name'] = self._serialize.query("name", name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ActionRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/actionRules'} + + def list_by_resource_group( + self, resource_group_name, target_resource_group=None, target_resource_type=None, target_resource=None, severity=None, monitor_service=None, impacted_scope=None, description=None, alert_rule_id=None, action_group=None, name=None, custom_headers=None, raw=False, **operation_config): + """Get all action rules created in a resource group. + + List all action rules of the subscription, created in given resource + group and given input filters. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param target_resource_group: Filter by target resource group name. + Default value is select all. + :type target_resource_group: str + :param target_resource_type: Filter by target resource type. Default + value is select all. + :type target_resource_type: str + :param target_resource: Filter by target resource( which is full ARM + ID) Default value is select all. + :type target_resource: str + :param severity: Filter by severity. Default value is select all. + Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' + :type monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :param impacted_scope: filter by impacted/target scope (provide comma + separated list for multiple scopes). The value should be an well + constructed ARM id of the scope. + :type impacted_scope: str + :param description: filter by alert rule description + :type description: str + :param alert_rule_id: filter by alert rule id + :type alert_rule_id: str + :param action_group: filter by action group configured as part of + action rule + :type action_group: str + :param name: filter by action rule name + :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: An iterator like instance of ActionRule + :rtype: + ~azure.mgmt.alertsmanagement.models.ActionRulePaged[~azure.mgmt.alertsmanagement.models.ActionRule] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if target_resource_group is not None: + query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') + if target_resource_type is not None: + query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') + if target_resource is not None: + query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') + if severity is not None: + query_parameters['severity'] = self._serialize.query("severity", severity, 'str') + if monitor_service is not None: + query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') + if impacted_scope is not None: + query_parameters['impactedScope'] = self._serialize.query("impacted_scope", impacted_scope, 'str') + if description is not None: + query_parameters['description'] = self._serialize.query("description", description, 'str') + if alert_rule_id is not None: + query_parameters['alertRuleId'] = self._serialize.query("alert_rule_id", alert_rule_id, 'str') + if action_group is not None: + query_parameters['actionGroup'] = self._serialize.query("action_group", action_group, 'str') + if name is not None: + query_parameters['name'] = self._serialize.query("name", name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ActionRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules'} + + def get_by_name( + self, resource_group_name, action_rule_name, custom_headers=None, raw=False, **operation_config): + """Get action rule by name. + + Get a specific action rule. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param action_rule_name: The name of action rule that needs to be + fetched + :type action_rule_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: ActionRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.ActionRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_by_name.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'), + 'actionRuleName': self._serialize.url("action_rule_name", action_rule_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]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ActionRule', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}'} + + def create_update( + self, resource_group_name, action_rule_name, action_rule, custom_headers=None, raw=False, **operation_config): + """Create/update an action rule. + + Creates/Updates a specific action rule. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param action_rule_name: The name of action rule that needs to be + created/updated + :type action_rule_name: str + :param action_rule: action rule to be created/updated + :type action_rule: ~azure.mgmt.alertsmanagement.models.ActionRule + :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: ActionRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.ActionRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_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'), + 'actionRuleName': self._serialize.url("action_rule_name", action_rule_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(action_rule, 'ActionRule') + + # 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]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ActionRule', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}'} + + def delete( + self, resource_group_name, action_rule_name, custom_headers=None, raw=False, **operation_config): + """Delete action rule. + + Deletes a given action rule. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param action_rule_name: The name that needs to be deleted + :type action_rule_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: bool or ClientRawResponse if raw=true + :rtype: bool or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.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'), + 'actionRuleName': self._serialize.url("action_rule_name", action_rule_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.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('bool', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}'} + + def update( + self, resource_group_name, action_rule_name, status=None, tags=None, custom_headers=None, raw=False, **operation_config): + """Patch action rule. + + Update enabled flag and/or tags for the given action rule. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param action_rule_name: The name that needs to be updated + :type action_rule_name: str + :param status: Indicates if the given action rule is enabled or + disabled. Possible values include: 'Enabled', 'Disabled' + :type status: str or + ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param tags: tags to be updated + :type tags: object + :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: ActionRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.ActionRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + action_rule_patch = models.PatchObject(status=status, tags=tags) + + # Construct 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'), + 'actionRuleName': self._serialize.url("action_rule_name", action_rule_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(action_rule_patch, 'PatchObject') + + # 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]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ActionRule', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}'} diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/alerts_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_alerts_operations.py similarity index 81% rename from sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/alerts_operations.py rename to sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_alerts_operations.py index fd15f46bc817..7d0a9fa6d063 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/alerts_operations.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_alerts_operations.py @@ -11,6 +11,7 @@ import uuid from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError from .. import models @@ -18,11 +19,14 @@ class AlertsOperations(object): """AlertsOperations 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: API version. Constant value: "2018-05-05". + :ivar api_version: client API version. Constant value: "2019-05-05-preview". + :ivar identifier: Identification of the information to be retrieved by API call. Constant value: "MonitorServiceList". """ models = models @@ -32,15 +36,70 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-05-05" + self.api_version = "2019-05-05-preview" + self.identifier = "MonitorServiceList" self.config = config + def meta_data( + self, custom_headers=None, raw=False, **operation_config): + """List alerts meta data information based on value of identifier + parameter. + + :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: AlertsMetaData or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.AlertsMetaData or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.meta_data.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['identifier'] = self._serialize.query("self.identifier", self.identifier, '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('AlertsMetaData', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + meta_data.metadata = {'url': '/providers/Microsoft.AlertsManagement/alertsMetaData'} + def get_all( self, target_resource=None, target_resource_type=None, target_resource_group=None, monitor_service=None, monitor_condition=None, severity=None, alert_state=None, alert_rule=None, smart_group_id=None, include_context=None, include_egress_config=None, page_count=None, sort_by=None, sort_order=None, select=None, time_range=None, custom_time_range=None, custom_headers=None, raw=False, **operation_config): - """List all the existing alerts, where the results can be selective by - passing multiple filter parameters including time range and sorted on - specific fields. . + """List all existing alerts, where the results can be filtered on the + basis of multiple parameters (e.g. time range). The results can then be + sorted on the basis specific fields, with the default being + lastModifiedDateTime. . :param target_resource: Filter by target resource( which is full ARM ID) Default value is select all. @@ -51,21 +110,20 @@ def get_all( :param target_resource_group: Filter by target resource group name. Default value is select all. :type target_resource_group: str - :param monitor_service: Filter by monitor service which is the source - of the alert instance. Default value is select all. Possible values - include: 'Application Insights', 'ActivityLog Administrative', - 'ActivityLog Security', 'ActivityLog Recommendation', 'ActivityLog - Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' :type monitor_service: str or ~azure.mgmt.alertsmanagement.models.MonitorService - :param monitor_condition: Filter by monitor condition which is the - state of the monitor(alertRule) at monitor service. Default value is - to select all. Possible values include: 'Fired', 'Resolved' + :param monitor_condition: Filter by monitor condition which is either + 'Fired' or 'Resolved'. Default value is to select all. Possible values + include: 'Fired', 'Resolved' :type monitor_condition: str or ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param severity: Filter by severity. Defaut value is select all. + :param severity: Filter by severity. Default value is select all. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity :param alert_state: Filter by state of the alert instance. Default @@ -73,14 +131,14 @@ def get_all( 'Acknowledged', 'Closed' :type alert_state: str or ~azure.mgmt.alertsmanagement.models.AlertState - :param alert_rule: Filter by alert rule(monitor) which fired alert - instance. Default value is to select all. + :param alert_rule: Filter by specific alert rule. Default value is to + select all. :type alert_rule: str :param smart_group_id: Filter the alerts list by the Smart Group Id. Default value is none. :type smart_group_id: str - :param include_context: Include context which has data contextual to - the monitor service. Default value is false' + :param include_context: Include context which has contextual data + specific to the monitor service. Default value is false' :type include_context: bool :param include_egress_config: Include egress config which would be used for displaying the content in portal. Default value is 'false'. @@ -102,9 +160,9 @@ def get_all( others. Possible values include: 'asc', 'desc' :type sort_order: str :param select: This filter allows to selection of the fields(comma - seperated) which would be part of the the essential section. This - would allow to project only the required fields rather than getting - entire content. Default is to fetch all the fields in the essentials + separated) which would be part of the essential section. This would + allow to project only the required fields rather than getting entire + content. Default is to fetch all the fields in the essentials section. :type select: str :param time_range: Filter by time range by below listed values. @@ -128,8 +186,7 @@ def get_all( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.get_all.metadata['url'] @@ -192,6 +249,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -200,12 +262,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized get_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts'} @@ -259,7 +319,6 @@ def get_by_id( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Alert', response) @@ -272,7 +331,7 @@ def get_by_id( def change_state( self, alert_id, new_state, custom_headers=None, raw=False, **operation_config): - """Change the state of the alert. + """Change the state of an alert. :param alert_id: Unique ID of an alert instance. :type alert_id: str @@ -321,7 +380,6 @@ def change_state( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Alert', response) @@ -334,7 +392,9 @@ def change_state( def get_history( self, alert_id, custom_headers=None, raw=False, **operation_config): - """Get the history of the changes of an alert. + """Get the history of an alert, which captures any monitor condition + changes (Fired/Resolved) and alert state changes + (New/Acknowledged/Closed). :param alert_id: Unique ID of an alert instance. :type alert_id: str @@ -379,7 +439,6 @@ def get_history( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AlertModification', response) @@ -392,10 +451,13 @@ def get_history( def get_summary( self, groupby, include_smart_groups_count=None, target_resource=None, target_resource_type=None, target_resource_group=None, monitor_service=None, monitor_condition=None, severity=None, alert_state=None, alert_rule=None, time_range=None, custom_time_range=None, custom_headers=None, raw=False, **operation_config): - """Summary of alerts with the count each severity. + """Get a summarized count of your alerts grouped by various parameters + (e.g. grouping by 'Severity' returns the count of alerts for each + severity). - :param groupby: This parameter allows the result set to be aggregated - by input fields. For example, groupby=severity,alertstate. Possible + :param groupby: This parameter allows the result set to be grouped by + input fields (Maximum 2 comma separated fields supported). For + example, groupby=severity or groupby=severity,alertstate. Possible values include: 'severity', 'alertState', 'monitorCondition', 'monitorService', 'signalType', 'alertRule' :type groupby: str or @@ -412,21 +474,20 @@ def get_summary( :param target_resource_group: Filter by target resource group name. Default value is select all. :type target_resource_group: str - :param monitor_service: Filter by monitor service which is the source - of the alert instance. Default value is select all. Possible values - include: 'Application Insights', 'ActivityLog Administrative', - 'ActivityLog Security', 'ActivityLog Recommendation', 'ActivityLog - Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' :type monitor_service: str or ~azure.mgmt.alertsmanagement.models.MonitorService - :param monitor_condition: Filter by monitor condition which is the - state of the monitor(alertRule) at monitor service. Default value is - to select all. Possible values include: 'Fired', 'Resolved' + :param monitor_condition: Filter by monitor condition which is either + 'Fired' or 'Resolved'. Default value is to select all. Possible values + include: 'Fired', 'Resolved' :type monitor_condition: str or ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param severity: Filter by severity. Defaut value is select all. + :param severity: Filter by severity. Default value is select all. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity :param alert_state: Filter by state of the alert instance. Default @@ -434,8 +495,8 @@ def get_summary( 'Acknowledged', 'Closed' :type alert_state: str or ~azure.mgmt.alertsmanagement.models.AlertState - :param alert_rule: Filter by alert rule(monitor) which fired alert - instance. Default value is to select all. + :param alert_rule: Filter by specific alert rule. Default value is to + select all. :type alert_rule: str :param time_range: Filter by time range by below listed values. Default value is 1 day. Possible values include: '1h', '1d', '7d', @@ -510,7 +571,6 @@ def get_summary( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AlertsSummary', response) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_operations.py similarity index 87% rename from sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/operations.py rename to sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_operations.py index 9718bb4566f6..057900f678f2 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/operations.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_operations.py @@ -19,11 +19,13 @@ class Operations(object): """Operations 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: API version. Constant value: "2018-05-05". + :ivar api_version: client API version. Constant value: "2019-05-05-preview". """ models = models @@ -33,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-05-05" + self.api_version = "2019-05-05-preview" self.config = config @@ -52,8 +54,7 @@ def list( ~azure.mgmt.alertsmanagement.models.OperationPaged[~azure.mgmt.alertsmanagement.models.Operation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -78,6 +79,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -88,12 +94,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.AlertsManagement/operations'} diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py new file mode 100644 index 000000000000..2cc0b1152ea4 --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py @@ -0,0 +1,436 @@ +# 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 .. import models + + +class SmartDetectorAlertRulesOperations(object): + """SmartDetectorAlertRulesOperations 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: "2019-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-06-01" + + self.config = config + + def list( + self, expand_detector=None, custom_headers=None, raw=False, **operation_config): + """List all the existing Smart Detector alert rules within the + subscription. + + :param expand_detector: Indicates if Smart Detector should be + expanded. + :type expand_detector: bool + :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: An iterator like instance of AlertRule + :rtype: + ~azure.mgmt.alertsmanagement.models.AlertRulePaged[~azure.mgmt.alertsmanagement.models.AlertRule] + :raises: + :class:`ErrorResponse1Exception` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if expand_detector is not None: + query_parameters['expandDetector'] = self._serialize.query("expand_detector", expand_detector, 'bool') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AlertRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.alertsManagement/smartDetectorAlertRules'} + + def list_by_resource_group( + self, resource_group_name, expand_detector=None, custom_headers=None, raw=False, **operation_config): + """List all the existing Smart Detector alert rules within the + subscription and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param expand_detector: Indicates if Smart Detector should be + expanded. + :type expand_detector: bool + :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: An iterator like instance of AlertRule + :rtype: + ~azure.mgmt.alertsmanagement.models.AlertRulePaged[~azure.mgmt.alertsmanagement.models.AlertRule] + :raises: + :class:`ErrorResponse1Exception` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.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') + } + 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') + if expand_detector is not None: + query_parameters['expandDetector'] = self._serialize.query("expand_detector", expand_detector, 'bool') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AlertRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules'} + + def get( + self, resource_group_name, alert_rule_name, expand_detector=None, custom_headers=None, raw=False, **operation_config): + """Get a specific Smart Detector alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param alert_rule_name: The name of the alert rule. + :type alert_rule_name: str + :param expand_detector: Indicates if Smart Detector should be + expanded. + :type expand_detector: bool + :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: AlertRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.AlertRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponse1Exception` + """ + # 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'), + 'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_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') + if expand_detector is not None: + query_parameters['expandDetector'] = self._serialize.query("expand_detector", expand_detector, 'bool') + + # 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]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AlertRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules/{alertRuleName}'} + + def create_or_update( + self, resource_group_name, alert_rule_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or update a Smart Detector alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param alert_rule_name: The name of the alert rule. + :type alert_rule_name: str + :param parameters: Parameters supplied to the operation. + :type parameters: ~azure.mgmt.alertsmanagement.models.AlertRule + :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: AlertRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.AlertRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponse1Exception` + """ + # Construct URL + url = self.create_or_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'), + 'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_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(parameters, 'AlertRule') + + # 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, 201]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AlertRule', response) + if response.status_code == 201: + deserialized = self._deserialize('AlertRule', 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.alertsManagement/smartDetectorAlertRules/{alertRuleName}'} + + def patch( + self, resource_group_name, alert_rule_name, parameters, custom_headers=None, raw=False, **operation_config): + """Patch a specific Smart Detector alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param alert_rule_name: The name of the alert rule. + :type alert_rule_name: str + :param parameters: Parameters supplied to the operation. + :type parameters: + ~azure.mgmt.alertsmanagement.models.AlertRulePatchObject + :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: AlertRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.AlertRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponse1Exception` + """ + # Construct URL + url = self.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'), + 'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_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(parameters, 'AlertRulePatchObject') + + # 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]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AlertRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules/{alertRuleName}'} + + def delete( + self, resource_group_name, alert_rule_name, custom_headers=None, raw=False, **operation_config): + """Delete an existing Smart Detector alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param alert_rule_name: The name of the alert rule. + :type alert_rule_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:`ErrorResponse1Exception` + """ + # Construct URL + url = self.delete.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'), + 'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_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 = {} + 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.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules/{alertRuleName}'} diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/smart_groups_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_groups_operations.py similarity index 70% rename from sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/smart_groups_operations.py rename to sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_groups_operations.py index 8ff2c33ae120..bd4c0cfce5c1 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/smart_groups_operations.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_groups_operations.py @@ -18,11 +18,13 @@ class SmartGroupsOperations(object): """SmartGroupsOperations 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: API version. Constant value: "2018-05-05". + :ivar api_version: client API version. Constant value: "2019-05-05-preview". """ models = models @@ -32,15 +34,15 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-05-05" + self.api_version = "2019-05-05-preview" self.config = config def get_all( self, target_resource=None, target_resource_group=None, target_resource_type=None, monitor_service=None, monitor_condition=None, severity=None, smart_group_state=None, time_range=None, page_count=None, sort_by=None, sort_order=None, custom_headers=None, raw=False, **operation_config): - """Get all smartGroups within the subscription. + """Get all Smart Groups within a specified subscription. - List all the smartGroups within the specified subscription. . + List all the Smart Groups within a specified subscription. . :param target_resource: Filter by target resource( which is full ARM ID) Default value is select all. @@ -51,21 +53,20 @@ def get_all( :param target_resource_type: Filter by target resource type. Default value is select all. :type target_resource_type: str - :param monitor_service: Filter by monitor service which is the source - of the alert instance. Default value is select all. Possible values - include: 'Application Insights', 'ActivityLog Administrative', - 'ActivityLog Security', 'ActivityLog Recommendation', 'ActivityLog - Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' :type monitor_service: str or ~azure.mgmt.alertsmanagement.models.MonitorService - :param monitor_condition: Filter by monitor condition which is the - state of the monitor(alertRule) at monitor service. Default value is - to select all. Possible values include: 'Fired', 'Resolved' + :param monitor_condition: Filter by monitor condition which is either + 'Fired' or 'Resolved'. Default value is to select all. Possible values + include: 'Fired', 'Resolved' :type monitor_condition: str or ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param severity: Filter by severity. Defaut value is select all. + :param severity: Filter by severity. Default value is select all. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity :param smart_group_state: Filter by state of the smart group. Default @@ -82,7 +83,7 @@ def get_all( "includeContent" filter is selected, maximum value allowed is 25. Default value is 25. :type page_count: int - :param sort_by: Sort the query results by input field Default value + :param sort_by: Sort the query results by input field. Default value is sort by 'lastModifiedDateTime'. Possible values include: 'alertsCount', 'state', 'severity', 'startDateTime', 'lastModifiedDateTime' @@ -97,79 +98,89 @@ def get_all( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: SmartGroupsList or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.alertsmanagement.models.SmartGroupsList or - ~msrest.pipeline.ClientRawResponse + :return: An iterator like instance of SmartGroup + :rtype: + ~azure.mgmt.alertsmanagement.models.SmartGroupPaged[~azure.mgmt.alertsmanagement.models.SmartGroup] :raises: :class:`ErrorResponseException` """ - # Construct URL - url = self.get_all.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if target_resource is not None: - query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') - if target_resource_group is not None: - query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') - if target_resource_type is not None: - query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') - if monitor_service is not None: - query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') - if monitor_condition is not None: - query_parameters['monitorCondition'] = self._serialize.query("monitor_condition", monitor_condition, 'str') - if severity is not None: - query_parameters['severity'] = self._serialize.query("severity", severity, 'str') - if smart_group_state is not None: - query_parameters['smartGroupState'] = self._serialize.query("smart_group_state", smart_group_state, 'str') - if time_range is not None: - query_parameters['timeRange'] = self._serialize.query("time_range", time_range, 'str') - if page_count is not None: - query_parameters['pageCount'] = self._serialize.query("page_count", page_count, 'int') - if sort_by is not None: - query_parameters['sortBy'] = self._serialize.query("sort_by", sort_by, 'str') - if sort_order is not None: - query_parameters['sortOrder'] = self._serialize.query("sort_order", sort_order, 'str') - 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]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SmartGroupsList', response) - + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_all.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if target_resource is not None: + query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') + if target_resource_group is not None: + query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') + if target_resource_type is not None: + query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') + if monitor_service is not None: + query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') + if monitor_condition is not None: + query_parameters['monitorCondition'] = self._serialize.query("monitor_condition", monitor_condition, 'str') + if severity is not None: + query_parameters['severity'] = self._serialize.query("severity", severity, 'str') + if smart_group_state is not None: + query_parameters['smartGroupState'] = self._serialize.query("smart_group_state", smart_group_state, 'str') + if time_range is not None: + query_parameters['timeRange'] = self._serialize.query("time_range", time_range, 'str') + if page_count is not None: + query_parameters['pageCount'] = self._serialize.query("page_count", page_count, 'int') + if sort_by is not None: + query_parameters['sortBy'] = self._serialize.query("sort_by", sort_by, 'str') + if sort_order is not None: + query_parameters['sortOrder'] = self._serialize.query("sort_order", sort_order, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + header_dict = {} + deserialized = models.SmartGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized get_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups'} def get_by_id( self, smart_group_id, custom_headers=None, raw=False, **operation_config): - """Get information of smart alerts group. + """Get information related to a specific Smart Group. - Get details of smart group. + Get information related to a specific Smart Group. :param smart_group_id: Smart group unique id. :type smart_group_id: str @@ -213,9 +224,8 @@ def get_by_id( if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) - deserialized = None header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('SmartGroup', response) header_dict = { @@ -232,8 +242,7 @@ def get_by_id( def change_state( self, smart_group_id, new_state, custom_headers=None, raw=False, **operation_config): - """Change the state from unresolved to resolved and all the alerts within - the smart group will also be resolved. + """Change the state of a Smart Group. :param smart_group_id: Smart group unique id. :type smart_group_id: str @@ -281,9 +290,8 @@ def change_state( if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) - deserialized = None header_dict = {} - + deserialized = None if response.status_code == 200: deserialized = self._deserialize('SmartGroup', response) header_dict = { @@ -300,7 +308,8 @@ def change_state( def get_history( self, smart_group_id, custom_headers=None, raw=False, **operation_config): - """Get the history of the changes of smart group. + """Get the history a smart group, which captures any Smart Group state + changes (New/Acknowledged/Closed) . :param smart_group_id: Smart group unique id. :type smart_group_id: str @@ -345,7 +354,6 @@ def get_history( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SmartGroupModification', response) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py index e0ec669828cb..fda99682a9d1 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.0" +VERSION = "0.2.0rc1" diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py index 129b94c14ea7..899d78df4c87 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py @@ -53,6 +53,7 @@ version=version, description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), long_description=readme + '\n\n' + history, + long_description_content_type='text/x-rst', license='MIT License', author='Microsoft Corporation', author_email='azpysdkhelp@microsoft.com', @@ -63,7 +64,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', From c9d328dc73da73c7fb25ae7b74dea96387c93a90 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 08:51:19 -0700 Subject: [PATCH 148/244] Synchronous username/password auth (#6416) --- .../azure-identity/azure/identity/__init__.py | 2 + .../azure/identity/_internal/__init__.py | 4 +- .../identity/_internal/msal_credentials.py | 98 +++++++++++------ .../azure/identity/constants.py | 4 + .../azure/identity/credentials.py | 100 +++++++++++++++--- .../azure-identity/tests/test_identity.py | 31 ++++++ .../tests/{helpers.py => keys_helpers.py} | 0 .../tests/test_challenge_auth.py | 2 +- .../tests/test_challenge_auth_async.py | 2 +- 9 files changed, 194 insertions(+), 49 deletions(-) rename sdk/keyvault/azure-keyvault-keys/tests/{helpers.py => keys_helpers.py} (100%) diff --git a/sdk/identity/azure-identity/azure/identity/__init__.py b/sdk/identity/azure-identity/azure/identity/__init__.py index 512b415a27ec..fd23d51c8e32 100644 --- a/sdk/identity/azure-identity/azure/identity/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/__init__.py @@ -8,6 +8,7 @@ ClientSecretCredential, EnvironmentCredential, ManagedIdentityCredential, + UsernamePasswordCredential, ) @@ -35,4 +36,5 @@ def __init__(self, **kwargs): "DefaultAzureCredential", "EnvironmentCredential", "ManagedIdentityCredential", + "UsernamePasswordCredential", ] diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index 9ea29a25784d..cfdf935b801c 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,5 +2,5 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from .msal_credentials import ConfidentialClientCredential -from .msal_transport_adapter import MsalTransportResponse, MsalTransportAdapter +from .msal_credentials import ConfidentialClientCredential, PublicClientCredential +from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/azure/identity/_internal/msal_credentials.py b/sdk/identity/azure-identity/azure/identity/_internal/msal_credentials.py index 9bf44cbb3219..83906bf71c2e 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/msal_credentials.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/msal_credentials.py @@ -5,35 +5,40 @@ """Credentials wrapping MSAL applications and delegating token acquisition and caching to them. This entails monkeypatching MSAL's OAuth client with an adapter substituting an azure-core pipeline for Requests. """ - +import abc import time +import msal +from azure.core.credentials import AccessToken +from azure.core.exceptions import ClientAuthenticationError + +from .msal_transport_adapter import MsalTransportAdapter + try: - from typing import TYPE_CHECKING -except ImportError: - TYPE_CHECKING = False + ABC = abc.ABC +except AttributeError: # Python 2.7, abc exists, but not ABC + ABC = abc.ABCMeta("ABC", (object,), {"__slots__": ()}) # type: ignore try: from unittest import mock except ImportError: # python < 3.3 import mock # type: ignore +try: + from typing import TYPE_CHECKING +except ImportError: + TYPE_CHECKING = False + if TYPE_CHECKING: # pylint:disable=unused-import - from typing import Any, Mapping, Optional, Union + from typing import Any, Mapping, Optional, Type, Union -from azure.core.credentials import AccessToken -from azure.core.exceptions import ClientAuthenticationError -import msal - -from .msal_transport_adapter import MsalTransportAdapter - -class MsalCredential(object): +class MsalCredential(ABC): """Base class for credentials wrapping MSAL applications""" - def __init__(self, client_id, authority, app_class, client_credential=None, **kwargs): - # type: (str, str, msal.ClientApplication, Optional[Union[str, Mapping[str, str]]], Any) -> None + def __init__(self, client_id, authority, client_credential=None, **kwargs): + # type: (str, str, Optional[Union[str, Mapping[str, str]]], Any) -> None self._authority = authority self._client_credential = client_credential self._client_id = client_id @@ -41,35 +46,35 @@ def __init__(self, client_id, authority, app_class, client_credential=None, **kw self._adapter = kwargs.pop("msal_adapter", None) or MsalTransportAdapter(**kwargs) # postpone creating the wrapped application because its initializer uses the network - self._app_class = app_class self._msal_app = None # type: Optional[msal.ClientApplication] - @property - def _app(self): + @abc.abstractmethod + def get_token(self, *scopes): + # type: (str) -> AccessToken + pass + + @abc.abstractmethod + def _get_app(self): # type: () -> msal.ClientApplication - """The wrapped MSAL application""" + pass - if not self._msal_app: - # MSAL application initializers use msal.authority to send AAD tenant discovery requests - with mock.patch("msal.authority.requests", self._adapter): - app = self._app_class( - client_id=self._client_id, client_credential=self._client_credential, authority=self._authority - ) + def _create_app(self, cls): + # type: (Type[msal.ClientApplication]) -> msal.ClientApplication + """Creates an MSAL application, patching msal.authority to use an azure-core pipeline during tenant discovery""" - # monkeypatch the app to replace requests.Session with MsalTransportAdapter - app.client.session = self._adapter - self._msal_app = app + # MSAL application initializers use msal.authority to send AAD tenant discovery requests + with mock.patch("msal.authority.requests", self._adapter): + app = cls(client_id=self._client_id, client_credential=self._client_credential, authority=self._authority) - return self._msal_app + # monkeypatch the app to replace requests.Session with MsalTransportAdapter + app.client.session = self._adapter + + return app class ConfidentialClientCredential(MsalCredential): """Wraps an MSAL ConfidentialClientApplication with the TokenCredential API""" - def __init__(self, **kwargs): - # type: (Any) -> None - super(ConfidentialClientCredential, self).__init__(app_class=msal.ConfidentialClientApplication, **kwargs) - def get_token(self, *scopes): # type: (str) -> AccessToken @@ -79,10 +84,37 @@ def get_token(self, *scopes): # First try to get a cached access token or if a refresh token is cached, redeem it for an access token. # Failing that, acquire a new token. - app = self._app # type: msal.ConfidentialClientApplication + app = self._get_app() result = app.acquire_token_silent(scopes, account=None) or app.acquire_token_for_client(scopes) if "access_token" not in result: raise ClientAuthenticationError(message="authentication failed: {}".format(result.get("error_description"))) return AccessToken(result["access_token"], now + int(result["expires_in"])) + + def _get_app(self): + # type: () -> msal.ConfidentialClientApplication + if not self._msal_app: + self._msal_app = self._create_app(msal.ConfidentialClientApplication) + return self._msal_app + + +class PublicClientCredential(MsalCredential): + """Wraps an MSAL PublicClientApplication with the TokenCredential API""" + + def __init__(self, **kwargs): + # type: (Any) -> None + super(PublicClientCredential, self).__init__( + authority="https://login.microsoftonline.com/" + kwargs.pop("tenant", "organizations"), **kwargs + ) + + @abc.abstractmethod + def get_token(self, *scopes): + # type: (str) -> AccessToken + pass + + def _get_app(self): + # type: () -> msal.PublicClientApplication + if not self._msal_app: + self._msal_app = self._create_app(msal.PublicClientApplication) + return self._msal_app diff --git a/sdk/identity/azure-identity/azure/identity/constants.py b/sdk/identity/azure-identity/azure/identity/constants.py index 5b50dd98625b..1c2608e5da8b 100644 --- a/sdk/identity/azure-identity/azure/identity/constants.py +++ b/sdk/identity/azure-identity/azure/identity/constants.py @@ -13,6 +13,10 @@ class EnvironmentVariables: AZURE_CLIENT_CERTIFICATE_PATH = "AZURE_CLIENT_CERTIFICATE_PATH" CERT_VARS = (AZURE_CLIENT_ID, AZURE_CLIENT_CERTIFICATE_PATH, AZURE_TENANT_ID) + AZURE_USERNAME = "AZURE_USERNAME" + AZURE_PASSWORD = "AZURE_PASSWORD" + USERNAME_PASSWORD_VARS = (AZURE_CLIENT_ID, AZURE_USERNAME, AZURE_PASSWORD) + MSI_ENDPOINT = "MSI_ENDPOINT" MSI_SECRET = "MSI_SECRET" diff --git a/sdk/identity/azure-identity/azure/identity/credentials.py b/sdk/identity/azure-identity/azure/identity/credentials.py index d53edf8e2c62..2e09a306aa71 100644 --- a/sdk/identity/azure-identity/azure/identity/credentials.py +++ b/sdk/identity/azure-identity/azure/identity/credentials.py @@ -6,6 +6,7 @@ Credentials for Azure SDK authentication. """ import os +import time from azure.core import Configuration from azure.core.credentials import AccessToken @@ -14,6 +15,7 @@ from ._authn_client import AuthnClient from ._base import ClientSecretCredentialBase, CertificateCredentialBase +from ._internal import PublicClientCredential from ._managed_identity import ImdsCredential, MsiCredential from .constants import Endpoints, EnvironmentVariables @@ -26,6 +28,7 @@ # pylint:disable=unused-import from typing import Any, Dict, Mapping, Optional, Union from azure.core.credentials import TokenCredential + EnvironmentCredentialTypes = Union["CertificateCredential", "ClientSecretCredential", "UsernamePasswordCredential"] # pylint:disable=too-few-public-methods @@ -96,23 +99,29 @@ def get_token(self, *scopes): class EnvironmentCredential: """ - Authenticates as a service principal using a client ID/secret pair or a certificate, - depending on environment variable settings. - - These environment variables are required: + Authenticates as a service principal using a client secret or a certificate, or as a user with a username and + password, depending on environment variable settings. Configuration is attempted in this order, using these + environment variables: + Service principal with secret: - **AZURE_CLIENT_ID**: the service principal's client ID + - **AZURE_CLIENT_SECRET**: one of the service principal's client secrets - **AZURE_TENANT_ID**: ID of the service principal's tenant. Also called its 'directory' ID. - Additionally, set **one** of these to configure client secret or certificate authentication: - - - **AZURE_CLIENT_SECRET**: one of the service principal's client secrets + Service principal with certificate: + - **AZURE_CLIENT_ID**: the service principal's client ID - **AZURE_CLIENT_CERTIFICATE_PATH**: path to a PEM-encoded certificate file including the private key + - **AZURE_TENANT_ID**: ID of the service principal's tenant. Also called its 'directory' ID. + + User with username and password: + - **AZURE_CLIENT_ID**: the application's client ID + - **AZURE_USERNAME**: a username (usually an email address) + - **AZURE_PASSWORD**: that user's password """ def __init__(self, **kwargs): # type: (Mapping[str, Any]) -> None - self._credential = None # type: Optional[Union[CertificateCredential, ClientSecretCredential]] + self._credential = None # type: Optional[EnvironmentCredentialTypes] if all(os.environ.get(v) is not None for v in EnvironmentVariables.CLIENT_SECRET_VARS): self._credential = ClientSecretCredential( @@ -128,6 +137,14 @@ def __init__(self, **kwargs): certificate_path=os.environ[EnvironmentVariables.AZURE_CLIENT_CERTIFICATE_PATH], **kwargs ) + elif all(os.environ.get(v) is not None for v in EnvironmentVariables.USERNAME_PASSWORD_VARS): + self._credential = UsernamePasswordCredential( + client_id=os.environ[EnvironmentVariables.AZURE_CLIENT_ID], + username=os.environ[EnvironmentVariables.AZURE_USERNAME], + password=os.environ[EnvironmentVariables.AZURE_PASSWORD], + tenant=os.environ.get(EnvironmentVariables.AZURE_TENANT_ID), # optional for username/password auth + **kwargs + ) def get_token(self, *scopes): # type (*str) -> AccessToken @@ -139,10 +156,7 @@ def get_token(self, *scopes): :raises: :class:`azure.core.exceptions.ClientAuthenticationError` """ if not self._credential: - message = "Missing environment settings. To authenticate with one of the service principal's client secrets, set {}. To authenticate with a certificate, set {}.".format( - ", ".join(EnvironmentVariables.CLIENT_SECRET_VARS), ", ".join(EnvironmentVariables.CERT_VARS) - ) - raise ClientAuthenticationError(message=message) + raise ClientAuthenticationError(message="Incomplete environment configuration.") return self._credential.get_token(*scopes) @@ -233,3 +247,65 @@ def _get_error_message(history): else: attempts.append(credential.__class__.__name__) return "No valid token received. {}".format(". ".join(attempts)) + + +class UsernamePasswordCredential(PublicClientCredential): + """ + Authenticates a user with a username and password. In general, Microsoft doesn't recommend this kind of + authentication, because it's less secure than other authentication flows. + + Authentication with this credential is not interactive, so it is **not compatible with any form of + multi-factor authentication or consent prompting**. The application must already have the user's consent. + + This credential can only authenticate work and school accounts; Microsoft accounts are not supported. + See this document for more information about account types: + https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/sign-up-organization + + :param str client_id: the application's client ID + :param str username: the user's username (usually an email address) + :param str password: the user's password + + **Keyword arguments:** + + *tenant (str)* - a tenant ID or a domain associated with a tenant. If not provided, the credential defaults to the + 'organizations' tenant. + """ + + def __init__(self, client_id, username, password, **kwargs): + # type: (str, str, str, Any) -> None + super(UsernamePasswordCredential, self).__init__(client_id=client_id, **kwargs) + self._username = username + self._password = password + + def get_token(self, *scopes): + # type (*str) -> AccessToken + """ + Request an access token for `scopes`. + + :param str scopes: desired scopes for the token + :rtype: :class:`azure.core.credentials.AccessToken` + :raises: :class:`azure.core.exceptions.ClientAuthenticationError` + """ + + # MSAL requires scopes be a list + scopes = list(scopes) # type: ignore + now = int(time.time()) + + app = self._get_app() + accounts = app.get_accounts(username=self._username) + result = None + for account in accounts: + result = app.acquire_token_silent(scopes, account=account) + if result: + break + + if not result: + # cache miss -> request a new token + result = app.acquire_token_by_username_password( + username=self._username, password=self._password, scopes=scopes + ) + + if "access_token" not in result: + raise ClientAuthenticationError(message="authentication failed: {}".format(result.get("error_description"))) + + return AccessToken(result["access_token"], now + int(result["expires_in"])) diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index b017792595a8..4e7fb13b4f6b 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -21,6 +21,7 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, + UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential from azure.identity.constants import EnvironmentVariables @@ -239,3 +240,33 @@ def test_imds_credential_retries(): def test_default_credential(): DefaultAzureCredential() + + +def test_username_password_credential(): + expected_token = "access-token" + transport = validating_transport( + requests=[Request()] * 2, # not validating requests because they're formed by MSAL + responses=[ + # expecting tenant discovery then a token request + mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), + mock_response( + json_payload={ + "access_token": expected_token, + "expires_in": 42, + "token_type": "Bearer", + "ext_expires_in": 42, + } + ), + ], + ) + + credential = UsernamePasswordCredential( + client_id="some-guid", + username="user@azure", + password="secret_password", + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + token = credential.get_token("scope") + assert token.token == expected_token diff --git a/sdk/keyvault/azure-keyvault-keys/tests/helpers.py b/sdk/keyvault/azure-keyvault-keys/tests/keys_helpers.py similarity index 100% rename from sdk/keyvault/azure-keyvault-keys/tests/helpers.py rename to sdk/keyvault/azure-keyvault-keys/tests/keys_helpers.py diff --git a/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth.py b/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth.py index 04ead0b933b1..13054cc0b1d2 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth.py @@ -18,7 +18,7 @@ from azure.keyvault.keys._shared import ChallengeAuthPolicy, HttpChallenge, HttpChallengeCache import pytest -from helpers import mock_response, Request, validating_transport +from keys_helpers import mock_response, Request, validating_transport def test_challenge_cache(): diff --git a/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py b/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py index c4d72b1c7550..27cda5f91d8e 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py @@ -19,7 +19,7 @@ from azure.keyvault.keys._shared import AsyncChallengeAuthPolicy, HttpChallenge, HttpChallengeCache import pytest -from helpers import async_validating_transport, mock_response, Request +from keys_helpers import async_validating_transport, mock_response, Request @pytest.mark.asyncio From 1f91c27b6396d875d7a0cdbbd62113e84bc6218b Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 14:04:30 -0700 Subject: [PATCH 149/244] Synchronous interactive browser authentication (#6466) --- .../azure-identity/azure/identity/__init__.py | 2 + .../azure/identity/_internal/__init__.py | 1 + .../_internal/auth_code_redirect_handler.py | 75 +++++++++++ .../azure/identity/browser_auth.py | 121 ++++++++++++++++++ .../azure-identity/tests/test_identity.py | 73 ++++++++++- 5 files changed, 270 insertions(+), 2 deletions(-) create mode 100644 sdk/identity/azure-identity/azure/identity/_internal/auth_code_redirect_handler.py create mode 100644 sdk/identity/azure-identity/azure/identity/browser_auth.py diff --git a/sdk/identity/azure-identity/azure/identity/__init__.py b/sdk/identity/azure-identity/azure/identity/__init__.py index fd23d51c8e32..1df14dd617f5 100644 --- a/sdk/identity/azure-identity/azure/identity/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/__init__.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +from .browser_auth import InteractiveBrowserCredential from .credentials import ( CertificateCredential, ChainedTokenCredential, @@ -35,6 +36,7 @@ def __init__(self, **kwargs): "ClientSecretCredential", "DefaultAzureCredential", "EnvironmentCredential", + "InteractiveBrowserCredential", "ManagedIdentityCredential", "UsernamePasswordCredential", ] diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index cfdf935b801c..e7583139395b 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,5 +2,6 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +from .auth_code_redirect_handler import AuthCodeRedirectServer from .msal_credentials import ConfidentialClientCredential, PublicClientCredential from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/azure/identity/_internal/auth_code_redirect_handler.py b/sdk/identity/azure-identity/azure/identity/_internal/auth_code_redirect_handler.py new file mode 100644 index 000000000000..caaa9519033c --- /dev/null +++ b/sdk/identity/azure-identity/azure/identity/_internal/auth_code_redirect_handler.py @@ -0,0 +1,75 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +try: + from typing import TYPE_CHECKING +except ImportError: + TYPE_CHECKING = False + +if TYPE_CHECKING: + from typing import Any, Mapping, Optional + +try: + from http.server import HTTPServer, BaseHTTPRequestHandler +except ImportError: + from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler # type: ignore + +try: + from urllib.parse import parse_qs +except ImportError: + from urlparse import parse_qs # type: ignore + + +class AuthCodeRedirectHandler(BaseHTTPRequestHandler): + """HTTP request handler to capture the authentication server's response. + Largely from the Azure CLI: https://github.com/Azure/azure-cli/blob/dev/src/azure-cli-core/azure/cli/core/_profile.py + """ + + def do_GET(self): + if self.path.endswith("/favicon.ico"): # deal with legacy IE + self.send_response(204) + return + + query = self.path.split("?", 1)[-1] + query = parse_qs(query, keep_blank_values=True) + self.server.query_params = query + + self.send_response(200) + self.send_header("Content-Type", "text/html") + self.end_headers() + + self.wfile.write(b"Authentication complete. You can close this window.") + + def log_message(self, format, *args): # pylint: disable=redefined-builtin,unused-argument,no-self-use + pass # this prevents server dumping messages to stdout + + +class AuthCodeRedirectServer(HTTPServer): + """HTTP server that listens on localhost for the redirect request following an authorization code authentication""" + + query_params = {} # type: Mapping[str, Any] + + def __init__(self, port, timeout): + # type: (int, int) -> None + super(AuthCodeRedirectServer, self).__init__(("localhost", port), AuthCodeRedirectHandler) + self.timeout = timeout + + def wait_for_redirect(self): + # type: () -> Mapping[str, Any] + while not self.query_params: + try: + self.handle_request() + except ValueError: + # socket has been closed, probably by handle_timeout + break + + # ensure the underlying socket is closed (a no-op when the socket is already closed) + self.server_close() + + # if we timed out, this returns an empty dict + return self.query_params + + def handle_timeout(self): + """Break the request-handling loop by tearing down the server""" + self.server_close() diff --git a/sdk/identity/azure-identity/azure/identity/browser_auth.py b/sdk/identity/azure-identity/azure/identity/browser_auth.py new file mode 100644 index 000000000000..82460513092d --- /dev/null +++ b/sdk/identity/azure-identity/azure/identity/browser_auth.py @@ -0,0 +1,121 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +import socket +import time +import uuid +import webbrowser + +try: + from typing import TYPE_CHECKING +except ImportError: + TYPE_CHECKING = False + +if TYPE_CHECKING: + from typing import Any, List, Mapping + +from azure.core.credentials import AccessToken +from azure.core.exceptions import ClientAuthenticationError + +from ._internal import AuthCodeRedirectServer, ConfidentialClientCredential + + +class InteractiveBrowserCredential(ConfidentialClientCredential): + """ + Authenticates a user through the authorization code flow. This is an interactive flow: ``get_token`` opens a + browser to a login URL provided by Azure Active Directory, and waits for the user to authenticate there. + + Azure Active Directory documentation describes the authorization code flow in more detail: + https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-protocols-oauth-code + + :param str client_id: the application's client ID + :param str secret: one of the application's client secrets + + **Keyword arguments:** + + *tenant (str)* - a tenant ID or a domain associated with a tenant. If not provided, the credential defaults to the + 'organizations' tenant, which can authenticate work or school accounts. + *timeout (str)* - seconds to wait for the user to complete authentication. Defaults to 300 (5 minutes). + """ + + def __init__(self, client_id, client_secret, **kwargs): + # type: (str, str, Any) -> None + self._timeout = kwargs.pop("timeout", 300) + self._server_class = kwargs.pop("server_class", AuthCodeRedirectServer) # facilitate mocking + authority = "https://login.microsoftonline.com/" + kwargs.pop("tenant", "organizations") + super(InteractiveBrowserCredential, self).__init__( + client_id=client_id, client_credential=client_secret, authority=authority, **kwargs + ) + + def get_token(self, *scopes): + # type: (str) -> AccessToken + """ + Request an access token for `scopes`. This will open a browser to a login page and listen on localhost for a + request indicating authentication has completed. + + :param str scopes: desired scopes for the token + :rtype: :class:`azure.core.credentials.AccessToken` + :raises: :class:`azure.core.exceptions.ClientAuthenticationError` + """ + + # start an HTTP server on localhost to receive the redirect + for port in range(8400, 9000): + try: + server = self._server_class(port, timeout=self._timeout) + redirect_uri = "http://localhost:{}".format(port) + break + except socket.error: + continue # keep looking for an open port + + if not redirect_uri: + raise ClientAuthenticationError(message="Couldn't start an HTTP server on localhost") + + # get the url the user must visit to authenticate + scopes = list(scopes) # type: ignore + request_state = str(uuid.uuid4()) + app = self._get_app() + auth_url = app.get_authorization_request_url(scopes, redirect_uri=redirect_uri, state=request_state) + + # open browser to that url + webbrowser.open(auth_url) + + # block until the server times out or receives the post-authentication redirect + response = server.wait_for_redirect() + if not response: + raise ClientAuthenticationError( + message="Timed out after waiting {} seconds for the user to authenticate".format(self._timeout) + ) + + # redeem the authorization code for a token + code = self._parse_response(request_state, response) + now = int(time.time()) + result = app.acquire_token_by_authorization_code(code, scopes=scopes, redirect_uri=redirect_uri) + + if "access_token" not in result: + raise ClientAuthenticationError(message="Authentication failed: {}".format(result.get("error_description"))) + + return AccessToken(result["access_token"], now + int(result["expires_in"])) + + def _parse_response(self, request_state, response): + # type: (str, Mapping[str, Any]) -> List[str] + """ + Validates ``response`` and returns the authorization code it contains, if authentication succeeded. Raises + :class:`azure.core.exceptions.ClientAuthenticationError`, if authentication failed or ``response`` is malformed. + """ + + if "error" in response: + message = "Authentication failed: {}".format(response.get("error_description") or response["error"]) + raise ClientAuthenticationError(message=message) + if "code" not in response: + # a response with no error or code is malformed; we don't know what to do with it + message = "Authentication server didn't send an authorization code" + raise ClientAuthenticationError(message=message) + + # response must include the state sent in the auth request + if "state" not in response: + raise ClientAuthenticationError(message="Authentication response doesn't include OAuth state") + if response["state"][0] != request_state: + raise ClientAuthenticationError(message="Authentication response's OAuth state doesn't match the request's") + + return response["code"] diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 4e7fb13b4f6b..3aaa54a1f28f 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -2,15 +2,16 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +import functools import json import os import time import uuid try: - from unittest.mock import Mock + from unittest.mock import Mock, patch except ImportError: # python < 3.3 - from mock import Mock + from mock import Mock, patch import pytest from azure.core.credentials import AccessToken @@ -21,6 +22,7 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, + InteractiveBrowserCredential, UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential @@ -242,6 +244,73 @@ def test_default_credential(): DefaultAzureCredential() +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential(): + oauth_state = "state" + expected_token = "access-token" + + transport = validating_transport( + requests=[Request()] * 2, # not validating requests because they're formed by MSAL + responses=[ + # expecting tenant discovery then a token request + mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), + mock_response( + json_payload={ + "access_token": expected_token, + "expires_in": 42, + "token_type": "Bearer", + "ext_expires_in": 42, + } + ), + ], + ) + + # mock local server fakes successful authentication by immediately returning a well-formed response + auth_code_response = {"code": "authorization-code", "state": [oauth_state]} + server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + # ensure the request beginning the flow has a known state value + with patch("azure.identity.browser_auth.uuid.uuid4", lambda: oauth_state): + token = credential.get_token("scope") + assert token.token == expected_token + + +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential_timeout(): + # mock transport handles MSAL's tenant discovery + transport = Mock( + send=lambda _, **__: mock_response( + json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"} + ) + ) + + # mock local server blocks long enough to exceed the timeout + timeout = 1 + server_instance = Mock(wait_for_redirect=functools.partial(time.sleep, timeout + 1)) + server_class = Mock(return_value=server_instance) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + timeout=timeout, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + with pytest.raises(ClientAuthenticationError) as ex: + credential.get_token("scope") + assert "timed out" in ex.value.message.lower() + + def test_username_password_credential(): expected_token = "access-token" transport = validating_transport( From 5b79f2739a3413543b737354c2b22fd0fd26ff55 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Tue, 30 Jul 2019 16:27:05 -0700 Subject: [PATCH 150/244] we dont need thread locks (#6551) --- .../azure-core/azure/core/tracing/context.py | 38 +++++-------------- .../azure-core/tests/test_tracing_context.py | 11 ++---- 2 files changed, 13 insertions(+), 36 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/context.py b/sdk/core/azure-core/azure/core/tracing/context.py index a00f88f2d854..f8761cd71502 100644 --- a/sdk/core/azure-core/azure/core/tracing/context.py +++ b/sdk/core/azure-core/azure/core/tracing/context.py @@ -29,8 +29,8 @@ class ContextProtocol(Protocol): Implements set and get variables in a thread safe way. """ - def __init__(self, name, default, lock): - # type: (string, Any, threading.Lock) -> None + def __init__(self, name, default): + # type: (string, Any) -> None pass def clear(self): @@ -54,11 +54,10 @@ class _AsyncContext(object): Uses contextvars to set and get variables globally in a thread safe way. """ - def __init__(self, name, default, lock): + def __init__(self, name, default): self.name = name self.contextvar = contextvars.ContextVar(name) self.default = default if callable(default) else (lambda: default) - self.lock = lock def clear(self): # type: () -> None @@ -78,8 +77,7 @@ def get(self): def set(self, value): # type: (Any) -> None """Set the value in the context.""" - with self.lock: - self.contextvar.set(value) + self.contextvar.set(value) class _ThreadLocalContext(object): @@ -88,11 +86,10 @@ class _ThreadLocalContext(object): """ _thread_local = threading.local() - def __init__(self, name, default, lock): - # type: (str, Any, threading.Lock) -> None + def __init__(self, name, default): + # type: (str, Any) -> None self.name = name self.default = default if callable(default) else (lambda: default) - self.lock = lock def clear(self): # type: () -> None @@ -112,16 +109,14 @@ def get(self): def set(self, value): # type: (Any) -> None """Set the value in the context.""" - with self.lock: - setattr(self._thread_local, self.name, value) + setattr(self._thread_local, self.name, value) -class TracingContext: - _lock = threading.Lock() - +class TracingContext(object): def __init__(self): # type: () -> None - self.current_span = TracingContext._get_context_class("current_span", None) + context_class = _AsyncContext if contextvars else _ThreadLocalContext + self.current_span = context_class("current_span", None) def with_current_context(self, func): # type: (Callable[[Any], Any]) -> Any @@ -146,17 +141,4 @@ def call_with_current_context(*args, **kwargs): return call_with_current_context - @classmethod - def _get_context_class(cls, name, default_val): - # type: (str, Any) -> ContextProtocol - """ - Returns an instance of the the context class that stores the variable. - :param name: The key to store the variable in the context class - :param default_val: The default value of the variable if unset - :return: An instance that implements the context protocol class - """ - context_class = _AsyncContext if contextvars else _ThreadLocalContext - return context_class(name, default_val, cls._lock) - - tracing_context = TracingContext() diff --git a/sdk/core/azure-core/tests/test_tracing_context.py b/sdk/core/azure-core/tests/test_tracing_context.py index 59aa2c8a8b60..984d2ad480d3 100644 --- a/sdk/core/azure-core/tests/test_tracing_context.py +++ b/sdk/core/azure-core/tests/test_tracing_context.py @@ -34,19 +34,14 @@ def __exit__(self, exc_type, exc_val, exc_tb): class TestContext(unittest.TestCase): - def test_get_context_class(self): - with ContextHelper(): - slot = tracing_context._get_context_class("temp", 1) - assert slot.get() == 1 - slot.set(2) - assert slot.get() == 2 - def test_current_span(self): with ContextHelper(): - assert tracing_context.current_span.get() is None + assert not tracing_context.current_span.get() val = mock.Mock(spec=AbstractSpan) tracing_context.current_span.set(val) assert tracing_context.current_span.get() == val + tracing_context.current_span.clear() + assert not tracing_context.current_span.get() def test_with_current_context(self): with ContextHelper(tracer_to_use=mock.Mock(AbstractSpan)): From 8a7d2ace33f5f1a7e0e522701ba0e7d997084cf0 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Tue, 30 Jul 2019 20:19:31 -0700 Subject: [PATCH 151/244] KV aiohttp by default (#6563) * Aiohttp default async transport * Record keys with aiohttp * Record secrets with aiohttp --- .../keys/_shared/async_client_base.py | 11 +- .../tests/keys_async_preparer.py | 16 +- .../test_keys_async.test_backup_restore.yaml | 294 +- ...t_keys_async.test_key_crud_operations.yaml | 886 ++--- .../test_keys_async.test_key_list.yaml | 522 ++- ...t_keys_async.test_key_wrap_and_unwrap.yaml | 354 +- ...est_keys_async.test_list_deleted_keys.yaml | 922 +++-- .../test_keys_async.test_list_versions.yaml | 520 ++- .../test_keys_async.test_purge.yaml | 1946 +++++----- .../test_keys_async.test_recover.yaml | 3248 +++++++---------- ...sync.test_example_key_crud_operations.yaml | 472 +-- ...sync.test_example_key_list_operations.yaml | 690 ++-- ...sync.test_example_keys_backup_restore.yaml | 294 +- ..._keys_async.test_example_keys_recover.yaml | 670 ++-- .../secrets/_shared/async_client_base.py | 9 +- ...c.test_example_secret_crud_operations.yaml | 340 +- ...c.test_example_secret_list_operations.yaml | 619 ++-- ...c.test_example_secrets_backup_restore.yaml | 337 +- ...ts_async.test_example_secrets_recover.yaml | 700 ++-- ...est_secrets_async.test_backup_restore.yaml | 281 +- ...crets_async.test_list_deleted_secrets.yaml | 945 ++--- ...test_secrets_async.test_list_versions.yaml | 507 ++- .../test_secrets_async.test_purge.yaml | 2032 +++++------ .../test_secrets_async.test_recover.yaml | 2956 +++++++-------- ...ets_async.test_secret_crud_operations.yaml | 459 ++- .../test_secrets_async.test_secret_list.yaml | 507 ++- .../tests/secrets_async_preparer.py | 16 +- 27 files changed, 9104 insertions(+), 11449 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 0714edabf420..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport +from azure.core.pipeline.transport import AsyncHttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient @@ -64,7 +64,7 @@ def __init__( self, vault_url: str, credential: "TokenCredential", - transport: HttpTransport = None, + transport: AsyncHttpTransport = None, api_version: str = None, **kwargs: Any ) -> None: @@ -91,7 +91,7 @@ def __init__( self._client = KeyVaultClient(credential, api_version=api_version, pipeline=pipeline, aio=True) @staticmethod - def _build_pipeline(config: Configuration, transport: HttpTransport, **kwargs: Any) -> AsyncPipeline: + def _build_pipeline(config: Configuration, transport: AsyncHttpTransport, **kwargs: Any) -> AsyncPipeline: policies = [ config.headers_policy, config.user_agent_policy, @@ -100,11 +100,12 @@ def _build_pipeline(config: Configuration, transport: HttpTransport, **kwargs: A config.retry_policy, config.authentication_policy, config.logging_policy, - DistributedTracingPolicy() + DistributedTracingPolicy(), ] if transport is None: - transport = AsyncioRequestsTransport(**kwargs) + from azure.core.pipeline.transport import AioHttpTransport + transport = AioHttpTransport(**kwargs) return AsyncPipeline(transport, policies=policies) diff --git a/sdk/keyvault/azure-keyvault-keys/tests/keys_async_preparer.py b/sdk/keyvault/azure-keyvault-keys/tests/keys_async_preparer.py index a232358ec959..4db357acc42b 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/keys_async_preparer.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/keys_async_preparer.py @@ -6,17 +6,31 @@ from unittest.mock import Mock from azure.core.credentials import AccessToken +from azure.core.pipeline.transport import AioHttpTransport from azure.identity.aio import EnvironmentCredential +from multidict import CIMultiDict, CIMultiDictProxy + from keys_preparer import VaultClientPreparer from keys_vault_client_async import VaultClient +class AiohttpTestTransport(AioHttpTransport): + """Workaround to vcrpy bug: https://github.com/kevin1024/vcrpy/pull/461 + """ + async def send(self, request, **config): + response = await super(AiohttpTestTransport, self).send(request, **config) + if not isinstance(response.headers, CIMultiDictProxy): + response.headers = CIMultiDictProxy(CIMultiDict(response.internal_response.headers)) + response.content_type = response.headers.get("content-type") + return response + + class AsyncVaultClientPreparer(VaultClientPreparer): def create_vault_client(self, vault_uri): if self.is_live: credential = EnvironmentCredential() else: credential = Mock(get_token=asyncio.coroutine(lambda _: AccessToken("fake-token", 0))) - return VaultClient(vault_uri, credential) + return VaultClient(vault_uri, credential, transport=AiohttpTestTransport()) diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_backup_restore.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_backup_restore.yaml index 1bdab8917b58..38a47ce653ba 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_backup_restore.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_backup_restore.yaml @@ -4,256 +4,202 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:51 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:49:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault4e00e7f.vault.azure.net + - /keys/keybak4e00e7f/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/54248fddc148400a9df744075bbfe2e8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lsgBFBFSUvohGWs21xzMCFc1IRDfnH0UlZ8aJnqVozFkc9rZgaBdr5IOVmt41hxbJY2MWuJxGpS4xAZ8AmrQZ1MOmS7nUiMmorcyqZZIcZYz3P7YXLjiv-ncb9rTty7IJ2R9v111Beiq3tNdHUrQYUt1wiysQPcPk69FGq7h4B5UqDM4SHQqXF-Rm3R2fU9wct7bx3F2XqYcaMmQWZBiYMH8vbooZWyh2QziCXVB2MhfBt0gTfoLUGT4hheDyLfIgbhhky6Hi0DC-3Ecll3tlK6JHAR6V1jLxJveWPgUy2WgRMSTATWdlcYL_i9Ji9OT4dSLkCFqXWhRN8krxXf9dw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/6335121a5c4e43919f25f6688e470924","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zPfZm_2ZxRIlx2K1MjSGUuBBpyaJjU_gk2yp9T9Ow8bvac_t6RgXTmsdK-4x27G4h1XjY0QVXkuJwnNxrUbSwrrNsxJtaz-KyCpetoPLcAEp4-EbEF2w-Q5fAPB76ngr-RKlHUv6fww8rfWWRxKb-GmtmYAq_BsUG7Ci1ALoF3dIxKyEpqueY0TeWofWxUKpftXLyjAIcuBVRO5UVSUv1bSfLl1mzm5Wxl6pk6G_BtAi9cn6TS7DERSSEilg_Raz53fCXt5MaoFnDpT5oRIl5E2ZaxaLJ2KwLxoZERB4oZ2vPGgjr8MocaOGY66xwVKZQJKttZmDy-7pUKWMxoBG4w","e":"AQAB"},"attributes":{"enabled":true,"created":1564526988,"updated":1564526988,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '648' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '648' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:49:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault4e00e7f.vault.azure.net + - /keys/keybak4e00e7f/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/backup?api-version=7.0 response: body: - string: '{"value":"JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmFvY0lxQ1Z1WFpwOTZLSTZQdmVlbENFZlMzeVl4ZC1yRm5rZkNTcmdXUVlwU2tzUGVpTmJENFZuVEdEbGR6dE1GRlZ5SGdMRHVwb2VJWDlIU3ExTEQ3MVFSNWpYQUE2aUZpendrLTYxbkJ5ZFY1SEVLcHFpdjJwckp0T0FRTlQwZmpsWlJadzBiSG9zSldIenF6SDZXZktQT25pOS1GTm1TV0xvZFF1cE84WGU2bC1PN1RoWVlhc3hoLXJNN3M4QUJrekZEUkVPUm5rTnczMVJ6SDAyQjJhOGk2R3VfcUVtbTdvUDdOTnJRaTJfRGJ6YnZBOFROdHBwU1gwbnc1c2ZnaWVFWmUxTmZwVXNSZDcxMmd4YWxWNUpuWklJaDAxcnF4ZUVZaVRRNlhxdXhPbkZJd1RaTTV6WTZSSVJ4QW5rTk8zb0pMUjlkSTU1cG02ZVlxMnFoZy5DUnVlaDRPYncwWGVkMXY3TU9GSVNnLlZRVXdIMno3UWV3SXJZN0kwSXhEU2h6Y0FLQmlKdThBVFVTQWZvUTBfd3J4WEZBNkxyOGlhM0k3clFMYm15X1hLbjNwa3FFR3VnVHZlTm9BenVmaDJNR1pHV1ZtOUJibGhCV0Z1OTZUS0s4cVRqOHJHUHpaZHB0MHpsSlloOTc1S3hZSnljNkdpNExzMVVqVDAzaExEcXVpYm9SMkZpNk9oZFRQQ2p5MXd3OXlNLUhKREswUHdzSUw1VW41YXFGaTMxUW52VlVja20tZUVNRFlJRWwyeTNtang0SmtVS2Rtc3FudzYtckRRcmd1OHFxV09NNXpDaFVKRW82dkQ1bnVCLWNLa2hJS0JPOEItM3RVbnQ0bjBQWldGSzhDaW0yb0dyV1JNZWtjSGxYdFp2Z2M0OHhVRVdQdjBhQ1l5QlhzOTlac29DN2ZRd3JIUllYdzZXNTFycUJqcTA4ckt2YWhTaVBxb2dkMmNfLTB0VVlOQ1BUWnBrcjVzanA2TTVvZUZlTG1KOURlUnVES3I3bWg0eTc5UndWam9xZ1JGdlptbmVBcmY3Wi1USmZydmlLZ3lLUjlUdjN5ZFVjNzI3aGJMTGQ5NC1LNFduMU41NE9paUtRNmJEbjRoWTd6a283aTdHV2s3NmdXWlRrRGFlVTFtaDgwQUE0UGEySXNsNXMtaXNuZkYwVTFXNXh6WUZaWWVYUnlNSDZkcUpHYm81RDBnNzZhdHdvTjg4eEZlNXNDVEpYQjBnQTBRUUNRNWRlX0E4WS1rcGFWakpKNDJPQ1NEX3RkWWR4a3JDOVZwZ1FlM0Q3ZzA3QmdqVlU4aHdFZTVkTzR2QmlRekdxcGtxX1lqWkRzSTcwWkFWYlk2UTE4QjRoWnJFd3VUZEs0QVdfS3Q4YmZiYVVuQlE3d2Z4cnJ0SldZeko4eUJaaFNOV201MThfekRoMmdYLTBuNjViMm5rUlVFckszWXBEVEpMZ0RZMnk5dGtETkdHX1dJUURIWkNiV3dDRDBTbDBheHdybWxHYmYxWS1heEhudHQtd214ODROZ09DcllEZU1SUnVkbjhScWlKSXF6d3I5N1JEU1pQMGx6dVZ5Y2xMX2RRSmdTYmtrRjVTdWdZbHotOFkyN2wybWV6VldrTDgxZ2w5enVMb0RiNmFMalA5WFBqdjV0WjZsOXF1azZCcjF0X3pBTVpadzNjUGZXOUVXa2hOdGNNbEZITXBYMlFkUTd5enVQSzJEb3V3bzVWV3gzQUFTelJCb3FJQmhIZEZLUWgzNUVFQlhHcEprcG9USzktTWhINkw4Tmd1dl9MVHJQNnBlOXBvS2otTjVha1VtUWtDY3ViTGRSUjQxcnFUeXNoYUl5WHBEYnVQZ19pbUF1eWpTLWR4VlZwb0Z1bXIyMk1aMFgyRTN5R0piZGg4cjVBTk1mM2lwZUNDdThOeF9VWUxubGFqczlMR3M2bVBneEktUFY4ZHBoUUxwa2dfM1FYR2xLOHcwcTVJMU1uMFNlc1R5NGJiMG12N0ZDdUYySzFKYXR4SGJqY0FFcmlpbm9QTk1yYUt4X29Kb1k0cVc0R09rYUFkQjA3MTBnZUJuYnBXcENuOGJNWkJ4RUZHNE1XU1lfbmV0cHFDVUhUZlQ2S2QwRzU4LUZQUHpxY05naXNGMUVuY1VhU0IxTVJ0YXVPMV9rSHgzT0RPNEhfSm5nYnd2bFRENWdXcjRpU1VYYldSdWQ0ak9YNXhJYkY0NzVyeGUxa2RNc1pORWhkZTVHbU1aQm9lSUd5VEM5bDJpTXNMQzFmdXp3YjU2SVczVlRmTzlTazVqOUN1RUdsMlVGcGd3N011U0laQ1VhSWZId3V2bEpXUXp4QlkwaG9xdEtSSjRQT1dWU2FhRWJ5OUdMa1VUSmFEV0p0YWFfc2x2UkVnb1E1WFFWeC1oUHZaWFczWDJlc1JsanJtQXZnVGJFWDQ5NUpJbUNsZTByaU1adjlETE9OS0k0a2NzUU12cGNsaUpQWHhsUE11X1dfZ2RBejExdHM2RUNGY2lVdHJOU1RMU19Qb0dqSlRSa2lEcERYSFBFSWpoaVp2X2xES0NUMjF4b0VsUE9kekk3OTYtNGpaYUUtbFBxOFpmTjdzQ19iRUxtdW92TjZIOS1yQ2oyc3BuczhLSDZzQXliZDBFNmxjTU42UHlCRWJWazU1R3V3UWNrLUNjaDA0M0l2OTJVVmZsNmJROUJsc1ZjenFoMlVGV3Y4SC1qaHVFeF9XNHZidFhHRVdsSDVSRDdEWlUwRmNCbkprQW5senF0d0tnMy00UGg1bHhTSWppWVJpdTRKZzg5clRuLXZIZUZnc0hBWF91TDFjM2xSZkd6MmVtQ202Z0RrNVVKdHZSWGtmUHREUGVHckp0SVlTRExqWjduaTlpRXl5X1JFVDR0T3NEX0R2N3hieXZ5SHFHUzZOa0JLRUkwY0g4OWpTVllVaGRxZk9hMUhqUU42OW8wRmt3OHE1TG51c2NXSW40UFVyajBYOGd5c3RIMWVha1ViSU9mRm05RWtzdzh0a1Z3S1g2LVlMbHktUS1mTlpwVXF1Mm9HbkxOcmV1dmhoWkJHdnJzQ0pzUVF0NHRjTWNwakc1dmVRd2RQT2l2R0tRUmVCOE9MazJCR2RlZGZXeVlyRGk2d2ZUclJ4VjZyb2tWUlpvVk85dTd6ZjkxWl9fMHZaRlFSN2ZubE5DVHpEM1dpOWdUUEZJaThFekdfS3BiRHNmRkRNN1lCeGx6SWNkeDdLZW9aZXhHRXpUdDR6T2JfTUllWTFGWkpFbDdJRUxxUWJydXhFMjBURVYyYi1VaWJvWWpvU3hRVUNZLTg4TmJ2czZCWWF4NGs2eU9yU3ByVVg1OXNNcVFPd25uMWRZUlFaeHZ3WGh0U3pWS2d2OGtzYkNvd0RHRW5pb0cxaUJKa2NDR2tlbUxPRzlMb2xpOWxRVDJVRlpBR0VzZXp1S0h3endPOGprRkEzODk5V1JXWHBqVFRuaEN6Wkdqd2JRN3BESUVBWFhyakIxZmJ1LUZhU2VYUGVhS2VkZDdMUy12LThJaTJFaXVLcUdIaWttV3MzaVJQNTNTN0VkNlhtMHJydHpSVE10RlJ5LUdQOXlWWlNiR3JyN2lFZ2YtMFhLT3ZPZ1FrQlo5enFua1FIM09rZVlfRHlNQVJqSEdkbTRIYnQ3d0VrZjM3MHJ5M2JVNTlud1ljWEI1b1l6YUQ5STVxM0Zmc09yTWhlN3hIVDZxZWRqbXlYRHNqdi1DQmJVYUVpc1lPTmFUUW5TbF8tRjhBZU4yajJrYmtCSl9tYzBSa1BncHA3cjZJQVRCRHg5dkd0ZjZkcTRpcndybWY4MV9SM1dfQ2ZhMmZlZWtzUDBFVjB0THVUVGloM0lEUlR0eU80MjVEQ0pCSm5BVGNkc0tPOVhuTDl2NGlMbG1Bd1E2S2U2Y1N0cTNTelNNUXhLUDI4TnlXS2lKV3NLemlMZ3ZGV21zQWQ3TG5Gd1dzWUFRa1ZidjR1WlZVYXhIaWJ4OUEzZGhsZFV5cHBEaUxlcWswck12U0JnTHNZVWk5SXJHbkdfSDdISzY5bU5CS2lNel9abDdBMjBLbFlJdlRVaUFBbnFLQi1kdnlCdmNVN3l6bzkxY2l4dUVidnNtYkNFUy16WVo0MUNLWGoyZ3BTZEdlUDRBVHhOYnV1eDdZWkFPUnlFamdHYmlJS3dUN1ViU0ROcEZEeml1eHBVby1jZmxabjlZZTNNcHFlLUI2NXF1RElxcDNvelJvdGt2SzVCcUpXMkRnTEVvUjBKZTNxb0gxVVJTT3Q5MlY3bmttSWRrUWloMURuUkttSEczQUUxS2YxUS1fRFJGSmJxTkozRklFYl9ONVlMT2hGaldmN2p5ZG92WEVqUnhvYWl3ODJOR0tHZTBOZDRhNW5JanhHbWhuRkpVVkxEajhnZHNyNG9ueTR3RWtsVnVqdG1DU1prb2VSRm9tQmtfNjlEY0pFbVl3U2hlY1JJdktxeWJ5MWx2VlNWTTZuSlpPam9FSEE1clNBVGxHQ2VxbEdWaVB1YVZGdXhmOGs3S0FwcGVFMzI1aVJXVzRhU1FHeE5NVjNWWHpIa2dZRjg3UldnLWNWNDI5M0ptSC1IOTlmT09Ic3JiVW9oaFRIS0E0MFMzV3kyTWc2anllQ1Jldko0SXhYVWVZclJVcVhBWnVOalgyM2pZcExKYTk2bkoyZEwzcHRiMW1WNF9vWnM1eG5pRjhmdEFEcTZfTDZFV3dRdHdfS0pDVkE3a3dGZHBOaFM4YU56V1g3d0ltNndRQ3lsTC1jTHQzSm9EX0ZtWmhfeEhmOFludFRUUFpwaVZyc0dpRlFKRE1YSk9OQ0FEekFlbk52cFVUMTIwaEtiX3BEUjdDa2RLbThQb0t6ZWU1UzhaN0h0NTZjYWltOF9ZSXZJLURZdWFuOTJ0ZXgySk9Ca0paV2p1Mk1LZHVOUDd3UzQ1dWZhTHZyT3dKSlRRQTk3eHNnVERXejN2WGJmSTVCX2VHMzVJVG9RX3EydXJOMlBfb2NlN2FRVU1mTkpzcHNQeTBkckVfekFoUW9QclVPNk1uU0dlS3NrRVAybHJzU2dhNUpsTUZyclVNNVdtMUREcW9oWnFqTDZPeXlPVFVvUXRrQ0dQUlVTM1lmbVFJcVpQV01NSG1wbXlwZUdiX0xSVDJXQm1hSFFOUVhfdVNWVG1LUWIxbDBJa1R0eEFNQmQ2NzNTQUJNVVllQ01zUWlXRWdxT1dBbVk3MjZWeWhneFg1bjMycEV5d2x0cXFGLUd2djlUMm82blFQRnVrWmNSc3c3TGROREx4V2hkMHVyTHFneDVyQkh4QXV4NlllaE9QYV9sYVR6WUVwUFhGSm5yR1c3LXpsYkU1UmtUUUFRNm8zbnh3TWkyLWFPREthSmxWS2EzNW5ZTHZPWUZtSUg1b3gwcHVBOFZGUXNmVGdGSjZQa2U5cWxic0JwcW82S3F3di16czIyWkxhWVkyNzlhRkUySXZ2RXhHakk2cW1HV2Y4RTVPbjFwOGZWSndqQXlqc0gzLXlwelFJOWFMYzF5WHVWcXFvNzVSbGlHZGE2Z21Ec2ZSRW5wVVNrdUgtYzVXTFBsX25jdFlmY1pKUU1IbWlLNUpPT3pnTk1IOC12ek1FY214NXJQeHpuTHI2cV9tWjhKb3MzSkFiMXliYm1PNmFoR0IwQ0hqZ0ppY0FOdXRQME1SMXd2eVd5Q3ZVUzFpclVnQ1RyLWNYOGFGblNKY2REdUxhMWY5TVV3ZmJzZTV6YkpTcFRpNUplckc5Sl8wLUwwajYzc0Q4ZkxyU2l2MGRiVnlhSl9SMTg3UWRWQzRMRERWMzhhRFZNM3FOdmNwYm5MdzBtYlZzZ2NFX1czTmtlWTRsbDBLa0I5T3BmRmdNX294d1p6T0R1S0lsdHZ2YVhkbGZha2E4a1BDdXJxS1BJZGxydC12bHNLdkdpQnBjNXVTUG12aGcyUEV4YThCQ1BBZHdocXo4aDl4Y2YwVko1MWtPRG44dWFWOVlzUlhtY0pOdzhZTXZXQXJnOXU2RnJzaWtsRXQ2NUdZbnZETTN5V3V3WlV1UUw5LUVvUUpCdTM2bUY3amwtQUFrYTRhUEZONWtlOVdlMEtObEtRZDFOVG9KR2w1dmZBUV9UQ0FXQUtQZjlGSjRyOEpzVFpWWW9lZE53OUJzQ2RLX3gyQ3pTdkZubzgxbE1JT2pyYWZLT0NpZ012QTBoTkM3NE00MXo5alZ5S1d0T0JXdVRWNEFFbGtDS1FDUXVBTnVmRFIxWUNoX0lsRzhVcklFR0VIdTdGMzhHUWVvWmtCd1NNMHoxZlEtZVVPUi1GX205ZHN4bHYzNGh6TFhUckx2ZGJ6YzJuYkV5R1pnSGhBWGVIZkx3eHFNWURwY0RmSW1XcEwwekJlT3JWWkNjZjdwcmNON2FRUGxSbTVYUUNnLWlVOUY1VXdkMUVQd1pFUGlNTGxGX1k5cGg2N0lzemNReG5VTmZZYzg1bnhIWVRBUzQxakFicmdJSjdfSy1KMDR5MVBib1lDb2dRcHN3cGlyNGZNdjR2c2RuMUtVbERxdkh4UjdZTkNXU1l4dlFmek4tNzUzazQwRERYd0xlXy1yS0tzSUo1LTY1RTJXYzZkNXZYLXpzdmJTbmhDRnlidE42X2FIZzZzeHlPc3lqTnh3N1pQVER4QXRXeHlZOWpZMzNnamI3eEw1WmdSMFlKRGVfaGpNS1FpUWk4LU02VHBlOS1YY3FuakVuWnBFdVJjUVBldnZKdjF6LVQ1YkpLMDZ0VnRLc01wSU9vR3FnbXBYNktzYWxNTXg4QVdCWUoxc2VfNmRZQ2o2TVVuckpIeEUwSXhzR3pOWkJlOXlVS1dzU2h5bUhZWGRTM1RDekxfNXhycjVuVy1nbUt3MkJTZUViNm52NGFoNTh6cjZ2MVBFZ2tMTGRuaFdPbjZZQWZCMzRzMDhWMDFiUnhUNEdSNEhSOWExSVJERVFVY3c2b21POWdoeDZCTkJKN29sNnVlZnBZbzYxNmdFMXgwWEFjQlBrVUJqTmw4eTVockJsOVlGMW1MWTJ1bEZUQkctaVlOdHhIdlZOZXllYzY2NTdxWlpYcUM5WlFfQ0txT09Qc1hrdWtEdndxMjhyNXdyWjAtbXhpOWZ2Z0J1NElsZ3FpbDIwQVZtSlZJRno4c0E3cFF1VThYeVlKTHdRbllTbG1mU1NqZEtoMUtrWnlsN2pwVjJ6ZlBBV2I1RWxsSkM5QmZUXzViQ2xfbTdpWUFlRGlnTkJXZXNwaVhuLXBUOWNnc1djdUZoYm5BTlB6SGtOYzZmOWVlb3p1OUk5N194SVpKSjF6eENtQUtZck0zTTFCNE1sb1lpcWJfblJDWGExbW4wdXFBVzBqSDZ4RFFLWW5tQVQyYnpRYXdYQVhxSmd0TXlza2xVaU04MkpOR01LWGFDLUZPTEhvYWt0NENBRm9CMzg1OTJHZ1NxODV2TXRqX0d1NHVYRmRtMGFTeUZjQThSTzlVTTZPelhncUNkaTVRWjZLMlVMc0FQTEdWdDFFUmZsWlFuX19SeUhfanFfbXZKTzhHcS0wWGd1RzZkN0pLQTluSE9QaVRnUW5yeWV0OTJqTEgtVTZuMjlIZkhrUnFNQWp6eGlCTk9WQk1namd4Y2VGeEVXRVFCYk9EQk5PcFJxM29oaXZ0WlFaMFN3ajI0eWloREQ3UzRTOVg4cXhhTVBGNFhOS0M5TW1YVzkzSGhLd01ZYXJfcTZ0UERxTlJJVGV1VGZCWnN1bWJITGR1YVZnWlVLczJTQ1dEQ1lrSXpHSHVyTmY5TFNtYWppOGJhZXVBal9PTTZ3TnIzUkFTdHhadlM0bGl3RmRreFBvNFB1NE9qbDFDTDFqY05BbTlsZXBLNlJxX1QtVkREeWdkWUxsSmM4U1UtZ3JCVUFiRzJtaGpPTXF4dUd5emdXNnExLTVjelBDeUZ3TGhkaVB2MHh2TGtyNm1Id3hMbWhldVBiUzNsNVlaMENQUl9qNTVNVnFwcGFzZW5Qc2JFYnpjbWlaQlhCNF9uV3Q3bWlSUFdnbWNCcFp6MUpMNFI0N3ZyX2pIanN6SkRfbmJhRHh3c2RPakFEV0lGSTlhTUhpM3lFdUpwMzgwRlFrWmptUndwaHoxSTJfNDhXaHhqLWlJcjc1WXFlUjVaRGRDNExNUTRDU2R1cVREV1Z3dm1wY21BWXRzalJaTlFESHZlTjdYbnJBU0s2b2pBN0dvOW4ydThoWGNyS1U0Sm5uc0dod1ZRSnJlN085SDJsWG5XaGZraF9IUnB3QUJQd2xZQmJRUUFzb19YUkFaV1AzOS1oODhNUlRiaE1jaXVHdl9Yb0c3LUpkSmpWYnAtT0c1cUo2dFAtM1Z6OEtSZFdJT2Z2enUyZ3YxSmJfeEp6LXBDY2xxWjlDT1ZNRlhCNXEwRHVTTGR5S1hpa0xVZll0M1hyM0Z1N1RyeVpzMDlrR3drV09NRmFCTnJXTHlKNkJIQW1TUURjZUc2cmNhTmtRZGlCOVItNVJKWXpEWWs3SFQzdDFvZHlEUDZBdDdfVzBxcXlsak80ZlFiRzJmM1RBMjQ4bHE0dE14c0R3Q240UmRtOGowU3Uwd2lQdzRJNnlvRkZaSUh3bjJhcVljSWJ1SllyZ2xJeXZ5a1cxSzBUdlg2ZVFId2k1YTZ3MTZZOFF3S085aEFJZlV6SWtxbl9ZRUo4dGp2ZW90UXMzWFZEaGtaMnI3UkZjdTBCc2xKVEo4TFVPLXhRNEdtSjZsVlN3OUw5TjRJNjhIMzRwUU9Ta1hValNaczFYRlhJbVlQZ3pRSEhwc0gyTTVOV3NsSmlucU1oLUxLd0xsQjBpaWF6b0lMRXVFWmJjNEpuakxCa2JoU2FuUEZZU0pNUXNRc21wYmxzUXVhZVFzQUNITUJIQ3pHQ3BicE83blBBbEFpU0xpc1hlOUs1TWZScHVLVDFDQTM2Q1Vpb0xEQ0haSW9ZMEVlVDJzQWthWW1tMjR2S183cjdWSHR3NklpTUxGdzlhMXJhdVdZSl8td0tjNERYM0pubXRWRDU2M2RwNm9ta1pMSm1Xd1hQOU9BaVFKd2g1bmFvMmFkX1JQbUdTbFZpa0x5OVk3U0NKbjlUTE9jV1k0R2hxVGZzTEE2RkN0RkxLNDl0dzZCT2hZSEF3ZkJlWnNnb3cwV0hYeldENzRiUHYxWkV0Q1o0VnFoTFdzRnRaWFF2V2FMNmhLUTZaS2llcktCdTcxbnVxSE9UT2JIVXhxOGJ3Y2lDVnhXaTNJalZUZlJ0cUltSXQ3Zi1yc3BncTFzbm5QRDJGUHEwRmNrdHMyUEJIWkJMOTEwTEtKVnlsRE5uR1J5cG9zWmliRlNkVlVqeU5HYUpyVTNEZGZFTmJ2R1A1TjZFbi0yTzNqckUyWWJPY0EyNXp0eTVvblhJQXRpM2hzZlAzWE5NREFpUXY3Rno5cjZNcGdxUnUwdndUelJtSDl2ZmNJaDhRX3VPV3c2cTkxbWNWTHBzcHhSNnE3a3hZbmYzTEhTYjE4YXd2bEsyMGg0TzVFVTJNWlVkWHJNaHRIZ3hXRmFtTTNLeVh1bHM3Ym13NFhVN3ctYWxiRC1oQ2dkWTNLUjU2U3MtM3hQdUwyNUpPS29ERHdldVVJWkx2WnJwNnI5bnN3VmZIZ3h1bU1GcTFQVG0zbzl2ZmZyc0xxcmQySm9VZU5zc1lVY1R5N1QtNkZpOXgwdFB2MDlzdGkxT2JCYVVvNGRiWHRRczRTSEwzTE5aZE5yNm9SdUpUa0hHYnJtc3ctUzZ3cmtBdDE3Z2c3TmpHOU5fX09GYS1VTVlyM0tJWXdudnBHQW03YVQ5QlBkODBjbFQ1UTVUWDJPYTRNbTEtSzh2VEoyN01CUjllMjZMMUNfcnNXTE5rZE91a0ZsUHNaNXdCTU5kVXNUajhVc21JQ080c1ZQWVpnbGhEMEtZSUNyeUpXdHR4Z25TNWFzQkZPdjJWOWszWktFOFZ0VE9GckhFb0I2QTNUQy1OdE1YNHluNk9KT3Z0OEcxdE96dkU2aHdPRHV2QllFZTFtb1pDblI2OC01WFctaGRVXzRwOFFzMmtTaGgtWFh6dUdaalVJb1Z1R0NsdWQwZzdIUTZtcC1wTDhhb1ZKbnRHWjVlVHRRSDBGNmk0Q3BQVl9hMkthT3NFbzRtMVd3VjhOSVdodW1XMGR2OHpfOERrcndPTlJwUVFKQWZsRkp1enFaanRYZExLdEN3d0ZoZ3ZnMWwtVWYzYmJjc2FjODNFc0l2R2pMcW9rZVdFdzBBSHkzZkdyTGd1UlVtZGZ3MEtjQjFuaFdnLlIwTk5LazVCRlFwSXJnRUJCc0I4emc"}' + string: '{"value":"JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLk9kems3TFFIaU9MbVZjcS1ubWZIWHZPTGlRMjEzeW5NOHlzU29JYkhyV2FoSlNsb2pQa2JjOWRfMG9JX0xBVnFFWjRUQWE5dDR3M1B5emRYRDloaTRPcWh5THRvbFRmajlxUndWcE1nZXVJaVp4WndpVnlFR29FOTN4dWNfOXp0Qy1aV3hmTTR2RHRPUG9KZUNDRnIxS1d2XzFNblV5ZGNjVzhvRWxXS0JscGlkRjZJQzI2V1BRMEQyWThscFNmMnZrN3FUejJzUjRkX01RSGwzSkZtdWtaU1hYTXJyNC1LcFBqaDNtNUhvWXM1bXFhNDZDNVFQUWVLRGNuR1lGTndhV1REQW5EcTZHaFZJNS1mU2ZEWUhqZVhJcUhtN3hmdllmVlBPTGdRdFJMbGt6VHNCUUgzZjlaYnlUczFWQ1JkeTN2MlNLNjhnbFFDOGFEcXBIU1FNdy5iby1PMVE1VG5HMGx4MGdpRjVSQVFBLm9lYUJUR043ZzNMNndRVS0wU0c3ZzRwXzdzU19KSVpJUmFqbktPZjdBNldnZ1AtbEZTTlVtV3RoQ0p1SjAyaFpyZW1mamRqcFBtLTJPRWZ3UFhzVjk1YnB2RGdMc1h3T28tRHZlTTdhNXRZVUxuYXJNXzhXVmp3emVpZ1BlUVpCV0c2UXAwbVZKX2J5RG4wUWJDb1FIRGdtTkVZWi04MGNXWVpJOEowNjBZVG1xTG0wM1RNN0h3ekpuN2ZjUnU5aXQ4WVVTZGl6Vk1nb3lNM1F3RWswRUlKWFJCZ19GVElEdWJIZ0Zub3NPaG81ZFRDSV9ZZXpTMVpkQndDOE5JZnBDalRSb2pEVFJpaUgwMmhXcTVacUEyNktIOXl1MGRZNTJ5TWYzWUlnSGZ4WjJrY3N6d0UwdlRBandyMGtSY0lnTXNSZV9MREROMWl4bjJQNlpzRkQzZVBLa3VNYmNmUi11RUxSV2VPRnpuWXVqeVRPVU40YkktZ3kxTVhpbm41aGJuZDYwb0tqZW5JYlVvT00yaFcyYURVRXlpWldXZ1hPNW5RWDVPSUcybEhEYmRUNTJzOGoyQVV2blJ3bTN1ZWF3dERjMFBveENCRzZMSE5CcUZJRkhqNkZfejl6S0FUUTlDaXBON1RRZE5yek1Pd3Q4NWVNTnN3bEZOOVdQd3pTSFJTb05maWxQN2EyaklQOW44SDN2NVloUlVQRFhaQ0VyYk44UDRLWEl3c0EydWY2czFia0J3UW1QRjk4UjdsLWZ1TDVRVnpWZGt4VzQyREdoMXJGcEwyQTFhQVpmU3lON3hNVEpzZ2lBNlRReTUwVENEc3lfcUIyMUh0ckRhMlhlT2JtNWI0QlBxelVjNXZYajU5LTBYeHZjX0ZoYUV4Nkx1Y1UtTmFVaWFfME41US1iZW9vMlh2SDZTNkhOSm94bFZ5RVVfUHF1a1E1bnZ0WW1JS0F3VVFXMng5WXhFa1gxTzVpd2N6Mzk0VlF1cjc0b3hkUnpzVHhKTGNIeDlpYnNBZkxtWjUwaUZFb3g2WnJJOWdVOGtTSmZ4ekhHOHRpSGNnYzhLTUpMaTdNZHhyZzEzSG12Y0hfMW5FemloMF9OUVJVY3c3X2xQSVBuZVJEX0hlUmRiU0ktOE9wN09hT2wwWGhMYWpKVUNrMXhzV0plNXVYLTh6SGxyT0ZTSWtlLXFIRkpjeDVlcFNyVWN0ME42bVo3akQ3bzJGb2h0cl9KNDA2Rk5hdXkxM2FEWTItTFRSSmhTSWNReUVzVGs3NXZBTHV3WElZYzJzMk16VXc1cEk1Qm9GaWhWOERqMExzNmVSNXAwbkpDeGFqXzFmWU5takFHSHhSZ2NGbzItQUg0RjF3ZXVhTEhDS0NNekc2bFBrQWZQb09kTHFWY2ZvRHozOGJlVl9ST0M0SFpmV0hySDAzVmxZaFFGdEVkRVI1XzMxQmdyQkpjV1JtQjJFTzFUTzJiYW42X056Z25wMU0zRTZkUExBaWZ4aUk3amxBWUlBUGU2UkVVc0lFaXdtd244MzQzRGdOR3FpeWk1S0YtSHZ4OXdCdmtoRFVDWmsyM0JzRWkydEs5ZkF6LTI4R3RHUW1TRi1Obmk5Q3NFQUlTRXlzcFBRSDFpV0ZXbU9WdGFJSk44QlowVXdXMjZRZ2I3NE9qTlZrem9KbTBibWtjSnVEb1pxMUZPX0RSd3VHYzdzd1JPTG9yTnNUSmFEdXB5d3ZlY1dLUi1rdlBIRnh1b1R0Rng3UjBVZ0FtQWhrZFZWMWlUd201LTJFYllJNm5iYXUwN0h3VXZHbzBfazU0dURoU05uMVVST0lHd1NqUWR1c1UzZThkTzNiVVhxdTVfVGFfYlB3QkI5TFQybkNPWlBSQ3A4TzlaZ1dKRWZxamZldl83NmJ6U05BZzJwOFh3UzBmbU5NdEphb0Nub0ZOWmhRSndtZ1g3cVlYX29oT0lEM01sUW5KQl95Wi1id1RFcjRKY21fdVkwRk5pVThSTjZvTjgwMjdfRWNybEI4ckw3d3RTRHhUUUxlVnl4UVFxaENFaXJNNWVHRGVNNldWc0lMR2tfNnRxSmM2bmNJdkxDc3hxZ2RNdlpYc2dqVTdHVkV5eVJNRnAwX2NQNVBndGYwdTJuclVJRmFUbWlUR2dhMXU1UWJUVk9hRDVSbTZvOHFmaTFzeGQtMlIzdEMtdkpIcU5rUTFLWGZNRDJ6d3U2LUJzTVRLUHk0bms0aEVxXzBIdU5DNFlyUk8ydmIzclNXZ3FHVEhmeGQ2bHdjMTJMazNDdDhIWW1vR0JzVS1vYldFejRYLWgzY1F1ZUdQcmNMaWNZZmsyTkVYV0Iwem5yV3BSaFd3enNTVEc2Nm9kSDRfeDRZei1HSVB1UXRNUjFNZ1BzSFVpOWFiam9rcmxRc3NqeU0wX21idGx3VkZob2paU3JzVW9LV0tBTXV0bVlkRFZKcmNmRGxCX1dXVF9PX0xxeHEzYVl2ejF6RmJadWVBcTBBMXlCSjFjdkJvZTVQS1JZcDRkS0c1NVpfVFp3NzlvYjVkaS11SWxoUzd5Z09XRi14bnFDdmg0TlpPME45SUkyWUduVW5wcU43TlNtbXJ3LWx6QzhnS0JfUmp0T1RqVWdSWjZtakFHZ0toYmViVTBGNWdYRENNeXRLM2NtNkpiRGs0SjZMaGI2bVJLTEhmVjN4SkNwMEdQOHN2UUdyOWx3d3NyNmJNMHNUQm51NllkYTRPeE9SNDg3aG5QVFowWU01RjFoc2pFM0p5cTV6MklWQXQycGNsTHhET3I2REMzUU9oN3NhTHNVWGRkbzVlejQ5V1E5dm9qU2RqU3YtMzEtZ0hncTVUaVFYY0xwcDVaeUZCcFNzMnVaVWdCb0lKLWpmRjY0ek1kU1lzZTRzbXgydjNESWlCNFNsRi1Kb05uejRLaUxkdEdTUVlMNW41VU9iX1pQa0Fwa2FQRnYza1dNM3Y5cjUxQ2dTS21ZWXNMMmJFUHBlV045aEFkUXJtYlJ3ako1aFZXT3RZT2dWcXM1dHBYSU1reDFvSnVuanF3dlJfS291MGw4cm5rSHhHVE00V1FGb0hqWGNFS1ozNHk1QnFmSGhiUUUydGUtRXNjek1QOFFaN0l2NzFEX3JwYm1IdDg5WTRGb1Bfb1ZkYW5YSUdJT3RDdmVsWVdsdGZ3blgwYTZTeWtRc2JDcXowb1A5RmFueDhibUlyeVNSSXdZVjVKaENQR1ZlMVluaXhqVmEtcVlVT0tXWG5tZU42M29RS0gtd0FyVTgzR2lhbFlCT1pNWVBCQTB6TzlyYkVYaHNLajFXQ2VnQk1iaHRvemhuY3VmZWpQX0JlUUdBOXBIRndsNnFJU3pPUGt6UC1ucEFCbjRxWVhXWk5JbWxNb1pyNzRmNnhVSXduVThyQU5EZGgxb250ZmlSbmxFdjJucFFiRFF6ZklvemFraTlsUXkzVWZCV0ZvMWR1emUyMVRWb1lqc2E2a2RSZzVJSUNyVDlnNVY3NGptdnc2SmVROUdQRkdHTXlablN5bG5yNEN0ZC1TY2xmZnRXamxkUW92cGhzaU1sc09YQVZEaVFsNktSazFkTEpTSVVwME93MXhOMG1FNUY3UF9OLWVTWWJ6azVGcFZTaUFjNWMtNklha0toUk5wd3NyX1ZPem41amt0UFBWWTFpcFZXNUhuVUpDaElhSFRXMDB1NmU1TVd3NVMyQzJsWTdIVXNESXF4Zks4bXJJXzZlcTV6LVNlaC1jMVJfLWw0aVdlemJULWEwUWxBNGtYdWpZNzRvNVduTDNwMDNDT0l2UzZUYjhMN2VXNndyYzRab29XRHFrUTlhQjNscXdwT0tBMEFCV2tSSUprV2dsZlZMUlQxUVM3Q29abmxFeUVlbTBhRnNKdGtTZWNnX1RkUFBUNndfT0I0Y0xXY0NJZGV1ZFd3THlieGgwNkhBQVR5dGYtMHZreTJxT0hkd0dJbFoxQlhTdmlSX3Y1LV9SY0JUcEZEcjVMcnR1U1JWQmVsRmlMWjJoaUUwQi1VUGwzQ0Z5OWtHdy01TTlVNmNKNE9CZnNMemF1Q3N2eDRYeVl3VnA3N3BzR3M3M2h1T0t0T05td1BHWVlPOUFuUm5ENFRmeV92ZVdZdXpRclZHV0Y1bms1WnFJUVZ3SVBaUHhLaUpIZXdFcVRiMXN3Z2RKSnV3ZC1PV29HMnZLZ3hWdVk0UXlzVjQzSUtjYURERzNROXZEWXNTNWU4enp4NVlFQVBXaGNhZ3M5UUh2NkJFVDU0LUpCTEUxc3F4Wm9jOXRVVmQtVWV2NC0wSHU5TEN2LXNnSWROVVlHT21ZRTB4NDlsc3NwQmVod0JBaUQ2OUh3V3Nud0NpNTBFSDdQcVVoOTZSYW1VU1IwVGxSWmx4REZoSlNsMTNWWExtLWZiX2VjV0I0NHl3NWt2WDhCTFJ6c1JDLTlfV2tyOWNRUGNLMWVxWWRDeVdxUEpBMG1NUWFqRlh5QTlwQ2JwZ1hGZWloLWgxaExLdHE3anJydnh1RWVxa09BM3QxdjB0cThCRUxTTUlxTGd4R3BwU21QeEtZeUgtVXdPS1A4ck05NmFacTY5STNpVlFuV2J4OFVnMEpNQ1liNmRVWHVOdGplSlk5TEFoXzl2QWRZSGtQYUVVZzRwV1h6X0JWMjA5SVFxVk5ZNHpmX1dVU3dQNHlYUUFqdElUbUR6b1REVUEyamk0R1dPOUNxN3pRNzVUcmVoZFlNNWVhLVpwY3RKQjlCX0xOdEhVclpNdHY4SlNZMUVscWxRdGc1dXladFBid3pWOF9jUkdEZnY4M08zR3hvYzF4bld1aHQ2UDRuQi10UGVyZC1taWN1U3g1VFRjMGU2Zl94TmJUc3dpRUE0QmhRS3dZVDBKY2xvS0c0UkQtUE5UOExlZk52UFBWZnVQSEdfSm1aQUdDOVJEcWFra0tXSF9EU0Y1Y0RfdW9BTndBYkhNUFlpY2ZDOHZETXZUcGNEdUs4NlZyTVRSNjFMdXpQWWxMdENxNWdiQlhZaWZFdlFJVm11TXVHZHF0SFpiUHZFSUo4eUEwMHFxdVd5cFFVRTZ0RWhibzRNZWt4R0NqTzJDaEoydjBobnh0MFYwenFBcm1xaXFYOVJHdUVQSmstOXkwY3lfWVNPX01jRmpMWGZhYTdHQjl4aDlTSVA3UGlSUmE0MzBEaXBaSnktejJxbTNXbE1KNW42Z3g4OFE5U3FqSU9mODZHQUJLRG1XZzhFbnJZa3lxNDhReWFwdUhOUlVHMFQwTFFGYjc0U0wzMUhPbWhQV0F1WjJrRl9XTDYzZW9JTlZTeFBoU3ZSMEVWYmFpdWtvcHhVYW5pRTlCdWYta1JHTnVlX0pBdTJZYzBKcjJ3UDd6YllIZTJ2QTdGMFBvWmt0cWp4LVZTTlN4QmE3cFYxZ2hpV3ZfZlhILVQ1MF9XQXFNSUZjWWhkeFdNNXJTZnFPaWxrVmNCbkJ5TUhQLUJwTEo3RTJLVmNoRzBGemxvQkZvazBEYzdtYkJBTEM2NEQwMVA1U01zZGY3bGpaOThUdFAwc0dDcUJuOTVsTUwtSWpnOUhDblZNZ0ViODFma3hLaFBXWTUzNDNDVjhiWnNyUDhtamZZUzNqUThoSmlocjdCb0c3amZPOUI5aDJkamFScnp3OHFKeEJDRHZRZ0M4VGZjOTBMY0pxS2YxVEc5UE9GQ1dLV2tRWXNSck1JdHhDWF9kTi1jekNNV0FSSUNhYUYycFdvTXNEY2tZdTRWV241UzFpNjF1NTdvdG02NUxPV3RoSlBDc3ZKaXFGaUtoajhHYWk4OUYzcE5xTU1YN2c0V1JmUXZIVmxucmJUeTdSVmZPaE1HYnlLX0VKWXVVTnU4dzFVVWFSS0JoMW9VcWNVMnBpNG9JV1k4LTFWb2NYMkpfTW9KTFRsTWlNSFZ2V2k3bDdLMDByNE1WbFhHWWhJSXBLdEJnN3BZRVQ1YlRqeTZfWVFqZjFKbVF6TnNJT1U4aGdtc1lCcTI0eFRoSmRONmdsNlhTRzI2YmgzMkNYZnBvS0U0M0tuY2tDUm1MeTdCbzQyV0t5SFhFUk9qYzJHdHh3TmJ3ak4wWnVkX2JJSkNtOW44d1hMOEpqencxeDZRQ1RKY1hSTGdLb1J2RWRvNmlaOUMyR0F2UWw0T1B1dkxobWpEV3p4LW9Ec3NnRXZmdEFYd0dWSlZvYVJhVWJET1EwM2FBdGh1ek9LRXhaTzNZamxHTzZrWjFHRnhGbWVneXlNQ3JoOTJiVm9tYUdSaDkwX2s4ZjVIbmlHT2dGdGlRMzFaUmtCc1JyTnJoZUlLb2Q3dTZRX2xSUEhMWk5pRk9UZTU4cjUwdkdKMVdRMzhYbFBHclhoekNWYTdFVGdRUURDNGRlTDhuM3FoN1lJbHlpcnBmakxyTVBUaURYMWNQSEppR3pjMmVQbVBiUkk3VFpnRE1HR1BTdUwyRUltWXNINzhvZi1HdDVya0t0eHZidW5jblJuZVMwUm53UFRYQmdFT1FKSExoWW5PbXRmcmIxTjkzVDI5U19udnZjRUZFOEpGZWtadXhxaEZJRUlKZ0lmbHQxSURxNEZSRFJVaXh6N3R6eVlIcGFtM1gzbmxUMzA0UWthR1hLb0N6YndUVVFsdldGR3BCVHZQcnB1dmp0VllNNzc4cGUtZHZxQjM4Snl3VkNoQVhnbDV5d3dpRHlCOFlTWUs0V21BNzQ4a1A0T0k1N25oc2hwSWNVX2pfS1NQclFQd1BXN2pxbzY4TjNiYXNYTW5ORHNUcjQ5QjF2cE40NGQwWWIyRzdTZXRzaU5SV1lhdmhZa0d5YjJPZ1dqTG5LMExZbGI1Uzc3SzdXN3J6S21uUUNfb0VnX0I3aERFY2NKUlJQd2dvazJiR2dYN1R0Y3pydkNtOElMTEpnUXVvVmFoREx1OGxGT3o0aEtYUlV3dlRwdEYxV2Z2WG9QOFlDc3VLYkRTUW4tVGxOc25DQzhmX214M0Vob01vUU9YS3pRRTN2NzhLb1NSRTZXWUJmVjlCNjlzY21pdWpSOHFyYTR4dVZfbDBnWVNLNDJaQU03enFKN1NqQmt1eGd2Vm5wSmVTbTc1c2NSZFdaSFVJam8wNDB6bTFlbmlLZlBGSWFZNmQxLWt2Y1BkRFFVLXhabmgzZWRQRlNTM0NDTUI2Rk92OG9CTWZ6Y2RmZllqM3JHRHVfSFJLbF8xaElwa01xdTNfckpNVjBhcVdsZm9aSVRhZnhYZ2tPZlhaemNiQnNCOGdXLXgxZ3FMT3pqUllVRGowVTk3N1NxX2x3c0ItQ053eVFoczBNNXI4bWRPeS1hQVBOUW9xb2VlN2I2MGR2RklUZUxMUE54TnB3LWVnbDNlRThucnhNN2FrRVB6enZLZlJOMHNPOE5QZHE2SUdKM1lDZzJQNnZPeVI0aDZPcjZiQlF1cXYwVkJ6cWo5bUJuZ0pyT3p2YnI1dTZFMUhORGZObk9NbFpzeGRnQnQwOENHUXdJUTdPbXM5blYycjRrYmQyNVk2OEZLbE1DMFhGLTZHdHVFY18ycFhQR1pldXlVUGNVVDNVUnlWVUp3UFJfSy1YaEdQZnJiN1d1TERTcms2LTV2Zk1OOC1ZanUwSzk3dEx3b0lkOHVVTVg4VHZvUWF0LTJCemc4cWVzSml5ZzdiWFl3anNiQW04dm9GcDQxSTdmWWVpYzNoQnZ5OVBuYVFsZUZ1a2JZY2N3bF91YzdzRl9Ea2NiZFpuYU1SNTRvOHkwZm5tT19sbl9PYTdNTmRMcGhWWmY1LWkwTXprdjJ3U3J0REVGYmo0ZFc5UWNHWlNpY2YyaGZiUEQ2NkFKVlRKVnBxbnAwd1Bia3hGajg2TUZxWllIYmFkajNaY0tmWDh1S0dXdlhZdE9QWFAxT1kxby0xWVNVSDA0ZV9oSWhud09acTZYNVJVajNoZnExQ0RyVmxTU0lzc3NhWHRkNHR0Tm1SUjYwaUlxOXBOR2gxZzJKMEdNWHFZUnQ0cHpVNTRlMjJXUjhnWjlPTV9XNkMyV2t0N29uWWZFcU1FNjR5cTZKamF3TDRzcHN4WFVBSTZ0LV9IY3JNZGd0Nm43Sl9ZVkgtWnJRZTEtN0NYUkJYcnF1cVF3VVctMkRmOUozaWcwcXR4VlFaRG1sZXdCbUZnZ3FXS1Z0OHgzQnl3d3RLWnRaai1saGJHTlNYTEpkSlIyTW1wSEY0YnhIWUxaanlITjlRb3JZOUxaNzBabFFBX2xSQ1BSTDdIYXZWZER6YVMyNXVhOW9iNWtNb2ZfcF9SZmpYNm8waVk0dUVUMTUxRGoySzBZMHlRb1J4UWs5dDhiNTJBdUNzUTA5NDVlU1pDY3lDNG9SN09uZHJiclJuWWtDTnVMdm5ZOUJYSHZjbkwweUJRQTZIUHRRM05qNllCUzktSHV5Y0dQNDJTY3pZNUJDQ1NnYTlxaFVtTDh3UUNhbEc1akZuZ3VDbU5mMmRCaTJWUnFucmNlWUVyaHJkWmxrMWF5UjZ0X2ZJOGc0emdzQ3NkTUswN3lJck9kbWZhZXBERzZ5ZTM5YWJyN21PdmJ4eEZBNjlINTFSUENfUDhOQ2pBRmpYVVp5UHdLOVNmQ1hLb0VwZVZVWlpRWWgwVFQxR0hJTy1WZGJoR0x1T2dDNGh4RS1jc3FHQ1hGS2xFMjV4dU5maS1uZFpaZzRNc0F4cVp5VTJpbm1sN19RdkhpaUkwVFB4eXZfdUtlSFItbGJ1eEw1RlAzY1Rpc182X2pteTE4T0pIT0hXaF92WExKdk1JT3BlU3o4Y0ZWeWRwMGpUbEVfMVRyR2xmQklIQmFKRnJJQkxfc1BXZEtJSUFDUUxUemZpUHdTSGZDR183V2c2U2I2MG1yTFhSc24zUDlLTGNkYVVoanVsOTZKbWJrTnZxM3JwUDJlUjJkWW9TYXhsTTZUNGVDRzVEREtlVFZFQXYtQ3J6SzZxWElzQmxEdDFGUnpEQ3lGLW9tSFRIMTRWZUJUcWxsNWl3dFpwSTkxMkIxUDNiYXNwLVVlSFdTSy1ZVmhBSVZXN0VBSE45UVhGMm1OVFhWYnozLWd2SlgtM29wMkhXWEtBMlctQ19PMWZTZWpyY3NhTjNGNThFd2h1UEpncVd4NFdsQkY1SDdjYk9JTzkxUkZ4OW1qcTB0SjFYaDF2UEo0OUJiTjhJeFRKOEZPSG9sRXFnclhiQ3FpZnF0X19kRUlON0JhS2Y0SE93a191T3lybWs0XzBkU1FCZ0ROWFdNNkQwQVVXbHJKdkxhaVhjVlhXOFRNX0ZwRVhEUVc0MzRvNGhmdi1zTkctWUE3Y2gtUFVET0pOR0JROFhjOHRvWmtfb19mdG9sUm9rS0Y0LTlOZHp6RVdDRjNnRzVBaEJzN3lsbUtldDhxNWJoZkgySWR6Ulphaml3eHFCV3IxdXloZDFXRG9sbXd3dFc4dU8yWlAyMkRsbFhPRXB0bERfUmF5bVpDQ291Vy1CbUprVFpJaGlOeDh4aTBubGhzNTQyZUt5eXAtQk1RdXl6YzB6c0pZVEJzN3I4QXVpeTlJM0hma1dnYVNoZ3huM0Jwdjh3NUJiTjZGSWozTVRvZDljaVVFVU9GckRlTThMVFBTa2ZOcm5hUEpSTS1sWEt1Mk1ER0w1VVV1VHdqOHYxc1AwaUFMSWpOYjFraXFvWGRyXzA4YzB6OEp5QS0yQ1U4LS02YndGNEZfZFdpbmd4elBoOGt1cVFhdlk4Zi1hWVFLWm1JYW9nUjFLT1dhR2M5V3Y4N0xPXzN5SkFqVUNGVFF0amhFdm9TbjViS2xRLWpwQjlFVzh6djJwUUFwSFJyV2ZCNFJlMTlTR1BNLkR1QmVad2xRamtvb0lfNXRvRFJQVVE"}' headers: - cache-control: - - no-cache - content-length: - - '10607' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '10607' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:49:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault4e00e7f.vault.azure.net + - /keys/keybak4e00e7f/backup + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/54248fddc148400a9df744075bbfe2e8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lsgBFBFSUvohGWs21xzMCFc1IRDfnH0UlZ8aJnqVozFkc9rZgaBdr5IOVmt41hxbJY2MWuJxGpS4xAZ8AmrQZ1MOmS7nUiMmorcyqZZIcZYz3P7YXLjiv-ncb9rTty7IJ2R9v111Beiq3tNdHUrQYUt1wiysQPcPk69FGq7h4B5UqDM4SHQqXF-Rm3R2fU9wct7bx3F2XqYcaMmQWZBiYMH8vbooZWyh2QziCXVB2MhfBt0gTfoLUGT4hheDyLfIgbhhky6Hi0DC-3Ecll3tlK6JHAR6V1jLxJveWPgUy2WgRMSTATWdlcYL_i9Ji9OT4dSLkCFqXWhRN8krxXf9dw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/6335121a5c4e43919f25f6688e470924","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zPfZm_2ZxRIlx2K1MjSGUuBBpyaJjU_gk2yp9T9Ow8bvac_t6RgXTmsdK-4x27G4h1XjY0QVXkuJwnNxrUbSwrrNsxJtaz-KyCpetoPLcAEp4-EbEF2w-Q5fAPB76ngr-RKlHUv6fww8rfWWRxKb-GmtmYAq_BsUG7Ci1ALoF3dIxKyEpqueY0TeWofWxUKpftXLyjAIcuBVRO5UVSUv1bSfLl1mzm5Wxl6pk6G_BtAi9cn6TS7DERSSEilg_Raz53fCXt5MaoFnDpT5oRIl5E2ZaxaLJ2KwLxoZERB4oZ2vPGgjr8MocaOGY66xwVKZQJKttZmDy-7pUKWMxoBG4w","e":"AQAB"},"attributes":{"enabled":true,"created":1564526988,"updated":1564526988,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '648' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '648' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:49:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault4e00e7f.vault.azure.net + - /keys/keybak4e00e7f + - api-version=7.0 + - '' - request: - body: '{"value": "JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmFvY0lxQ1Z1WFpwOTZLSTZQdmVlbENFZlMzeVl4ZC1yRm5rZkNTcmdXUVlwU2tzUGVpTmJENFZuVEdEbGR6dE1GRlZ5SGdMRHVwb2VJWDlIU3ExTEQ3MVFSNWpYQUE2aUZpendrLTYxbkJ5ZFY1SEVLcHFpdjJwckp0T0FRTlQwZmpsWlJadzBiSG9zSldIenF6SDZXZktQT25pOS1GTm1TV0xvZFF1cE84WGU2bC1PN1RoWVlhc3hoLXJNN3M4QUJrekZEUkVPUm5rTnczMVJ6SDAyQjJhOGk2R3VfcUVtbTdvUDdOTnJRaTJfRGJ6YnZBOFROdHBwU1gwbnc1c2ZnaWVFWmUxTmZwVXNSZDcxMmd4YWxWNUpuWklJaDAxcnF4ZUVZaVRRNlhxdXhPbkZJd1RaTTV6WTZSSVJ4QW5rTk8zb0pMUjlkSTU1cG02ZVlxMnFoZy5DUnVlaDRPYncwWGVkMXY3TU9GSVNnLlZRVXdIMno3UWV3SXJZN0kwSXhEU2h6Y0FLQmlKdThBVFVTQWZvUTBfd3J4WEZBNkxyOGlhM0k3clFMYm15X1hLbjNwa3FFR3VnVHZlTm9BenVmaDJNR1pHV1ZtOUJibGhCV0Z1OTZUS0s4cVRqOHJHUHpaZHB0MHpsSlloOTc1S3hZSnljNkdpNExzMVVqVDAzaExEcXVpYm9SMkZpNk9oZFRQQ2p5MXd3OXlNLUhKREswUHdzSUw1VW41YXFGaTMxUW52VlVja20tZUVNRFlJRWwyeTNtang0SmtVS2Rtc3FudzYtckRRcmd1OHFxV09NNXpDaFVKRW82dkQ1bnVCLWNLa2hJS0JPOEItM3RVbnQ0bjBQWldGSzhDaW0yb0dyV1JNZWtjSGxYdFp2Z2M0OHhVRVdQdjBhQ1l5QlhzOTlac29DN2ZRd3JIUllYdzZXNTFycUJqcTA4ckt2YWhTaVBxb2dkMmNfLTB0VVlOQ1BUWnBrcjVzanA2TTVvZUZlTG1KOURlUnVES3I3bWg0eTc5UndWam9xZ1JGdlptbmVBcmY3Wi1USmZydmlLZ3lLUjlUdjN5ZFVjNzI3aGJMTGQ5NC1LNFduMU41NE9paUtRNmJEbjRoWTd6a283aTdHV2s3NmdXWlRrRGFlVTFtaDgwQUE0UGEySXNsNXMtaXNuZkYwVTFXNXh6WUZaWWVYUnlNSDZkcUpHYm81RDBnNzZhdHdvTjg4eEZlNXNDVEpYQjBnQTBRUUNRNWRlX0E4WS1rcGFWakpKNDJPQ1NEX3RkWWR4a3JDOVZwZ1FlM0Q3ZzA3QmdqVlU4aHdFZTVkTzR2QmlRekdxcGtxX1lqWkRzSTcwWkFWYlk2UTE4QjRoWnJFd3VUZEs0QVdfS3Q4YmZiYVVuQlE3d2Z4cnJ0SldZeko4eUJaaFNOV201MThfekRoMmdYLTBuNjViMm5rUlVFckszWXBEVEpMZ0RZMnk5dGtETkdHX1dJUURIWkNiV3dDRDBTbDBheHdybWxHYmYxWS1heEhudHQtd214ODROZ09DcllEZU1SUnVkbjhScWlKSXF6d3I5N1JEU1pQMGx6dVZ5Y2xMX2RRSmdTYmtrRjVTdWdZbHotOFkyN2wybWV6VldrTDgxZ2w5enVMb0RiNmFMalA5WFBqdjV0WjZsOXF1azZCcjF0X3pBTVpadzNjUGZXOUVXa2hOdGNNbEZITXBYMlFkUTd5enVQSzJEb3V3bzVWV3gzQUFTelJCb3FJQmhIZEZLUWgzNUVFQlhHcEprcG9USzktTWhINkw4Tmd1dl9MVHJQNnBlOXBvS2otTjVha1VtUWtDY3ViTGRSUjQxcnFUeXNoYUl5WHBEYnVQZ19pbUF1eWpTLWR4VlZwb0Z1bXIyMk1aMFgyRTN5R0piZGg4cjVBTk1mM2lwZUNDdThOeF9VWUxubGFqczlMR3M2bVBneEktUFY4ZHBoUUxwa2dfM1FYR2xLOHcwcTVJMU1uMFNlc1R5NGJiMG12N0ZDdUYySzFKYXR4SGJqY0FFcmlpbm9QTk1yYUt4X29Kb1k0cVc0R09rYUFkQjA3MTBnZUJuYnBXcENuOGJNWkJ4RUZHNE1XU1lfbmV0cHFDVUhUZlQ2S2QwRzU4LUZQUHpxY05naXNGMUVuY1VhU0IxTVJ0YXVPMV9rSHgzT0RPNEhfSm5nYnd2bFRENWdXcjRpU1VYYldSdWQ0ak9YNXhJYkY0NzVyeGUxa2RNc1pORWhkZTVHbU1aQm9lSUd5VEM5bDJpTXNMQzFmdXp3YjU2SVczVlRmTzlTazVqOUN1RUdsMlVGcGd3N011U0laQ1VhSWZId3V2bEpXUXp4QlkwaG9xdEtSSjRQT1dWU2FhRWJ5OUdMa1VUSmFEV0p0YWFfc2x2UkVnb1E1WFFWeC1oUHZaWFczWDJlc1JsanJtQXZnVGJFWDQ5NUpJbUNsZTByaU1adjlETE9OS0k0a2NzUU12cGNsaUpQWHhsUE11X1dfZ2RBejExdHM2RUNGY2lVdHJOU1RMU19Qb0dqSlRSa2lEcERYSFBFSWpoaVp2X2xES0NUMjF4b0VsUE9kekk3OTYtNGpaYUUtbFBxOFpmTjdzQ19iRUxtdW92TjZIOS1yQ2oyc3BuczhLSDZzQXliZDBFNmxjTU42UHlCRWJWazU1R3V3UWNrLUNjaDA0M0l2OTJVVmZsNmJROUJsc1ZjenFoMlVGV3Y4SC1qaHVFeF9XNHZidFhHRVdsSDVSRDdEWlUwRmNCbkprQW5senF0d0tnMy00UGg1bHhTSWppWVJpdTRKZzg5clRuLXZIZUZnc0hBWF91TDFjM2xSZkd6MmVtQ202Z0RrNVVKdHZSWGtmUHREUGVHckp0SVlTRExqWjduaTlpRXl5X1JFVDR0T3NEX0R2N3hieXZ5SHFHUzZOa0JLRUkwY0g4OWpTVllVaGRxZk9hMUhqUU42OW8wRmt3OHE1TG51c2NXSW40UFVyajBYOGd5c3RIMWVha1ViSU9mRm05RWtzdzh0a1Z3S1g2LVlMbHktUS1mTlpwVXF1Mm9HbkxOcmV1dmhoWkJHdnJzQ0pzUVF0NHRjTWNwakc1dmVRd2RQT2l2R0tRUmVCOE9MazJCR2RlZGZXeVlyRGk2d2ZUclJ4VjZyb2tWUlpvVk85dTd6ZjkxWl9fMHZaRlFSN2ZubE5DVHpEM1dpOWdUUEZJaThFekdfS3BiRHNmRkRNN1lCeGx6SWNkeDdLZW9aZXhHRXpUdDR6T2JfTUllWTFGWkpFbDdJRUxxUWJydXhFMjBURVYyYi1VaWJvWWpvU3hRVUNZLTg4TmJ2czZCWWF4NGs2eU9yU3ByVVg1OXNNcVFPd25uMWRZUlFaeHZ3WGh0U3pWS2d2OGtzYkNvd0RHRW5pb0cxaUJKa2NDR2tlbUxPRzlMb2xpOWxRVDJVRlpBR0VzZXp1S0h3endPOGprRkEzODk5V1JXWHBqVFRuaEN6Wkdqd2JRN3BESUVBWFhyakIxZmJ1LUZhU2VYUGVhS2VkZDdMUy12LThJaTJFaXVLcUdIaWttV3MzaVJQNTNTN0VkNlhtMHJydHpSVE10RlJ5LUdQOXlWWlNiR3JyN2lFZ2YtMFhLT3ZPZ1FrQlo5enFua1FIM09rZVlfRHlNQVJqSEdkbTRIYnQ3d0VrZjM3MHJ5M2JVNTlud1ljWEI1b1l6YUQ5STVxM0Zmc09yTWhlN3hIVDZxZWRqbXlYRHNqdi1DQmJVYUVpc1lPTmFUUW5TbF8tRjhBZU4yajJrYmtCSl9tYzBSa1BncHA3cjZJQVRCRHg5dkd0ZjZkcTRpcndybWY4MV9SM1dfQ2ZhMmZlZWtzUDBFVjB0THVUVGloM0lEUlR0eU80MjVEQ0pCSm5BVGNkc0tPOVhuTDl2NGlMbG1Bd1E2S2U2Y1N0cTNTelNNUXhLUDI4TnlXS2lKV3NLemlMZ3ZGV21zQWQ3TG5Gd1dzWUFRa1ZidjR1WlZVYXhIaWJ4OUEzZGhsZFV5cHBEaUxlcWswck12U0JnTHNZVWk5SXJHbkdfSDdISzY5bU5CS2lNel9abDdBMjBLbFlJdlRVaUFBbnFLQi1kdnlCdmNVN3l6bzkxY2l4dUVidnNtYkNFUy16WVo0MUNLWGoyZ3BTZEdlUDRBVHhOYnV1eDdZWkFPUnlFamdHYmlJS3dUN1ViU0ROcEZEeml1eHBVby1jZmxabjlZZTNNcHFlLUI2NXF1RElxcDNvelJvdGt2SzVCcUpXMkRnTEVvUjBKZTNxb0gxVVJTT3Q5MlY3bmttSWRrUWloMURuUkttSEczQUUxS2YxUS1fRFJGSmJxTkozRklFYl9ONVlMT2hGaldmN2p5ZG92WEVqUnhvYWl3ODJOR0tHZTBOZDRhNW5JanhHbWhuRkpVVkxEajhnZHNyNG9ueTR3RWtsVnVqdG1DU1prb2VSRm9tQmtfNjlEY0pFbVl3U2hlY1JJdktxeWJ5MWx2VlNWTTZuSlpPam9FSEE1clNBVGxHQ2VxbEdWaVB1YVZGdXhmOGs3S0FwcGVFMzI1aVJXVzRhU1FHeE5NVjNWWHpIa2dZRjg3UldnLWNWNDI5M0ptSC1IOTlmT09Ic3JiVW9oaFRIS0E0MFMzV3kyTWc2anllQ1Jldko0SXhYVWVZclJVcVhBWnVOalgyM2pZcExKYTk2bkoyZEwzcHRiMW1WNF9vWnM1eG5pRjhmdEFEcTZfTDZFV3dRdHdfS0pDVkE3a3dGZHBOaFM4YU56V1g3d0ltNndRQ3lsTC1jTHQzSm9EX0ZtWmhfeEhmOFludFRUUFpwaVZyc0dpRlFKRE1YSk9OQ0FEekFlbk52cFVUMTIwaEtiX3BEUjdDa2RLbThQb0t6ZWU1UzhaN0h0NTZjYWltOF9ZSXZJLURZdWFuOTJ0ZXgySk9Ca0paV2p1Mk1LZHVOUDd3UzQ1dWZhTHZyT3dKSlRRQTk3eHNnVERXejN2WGJmSTVCX2VHMzVJVG9RX3EydXJOMlBfb2NlN2FRVU1mTkpzcHNQeTBkckVfekFoUW9QclVPNk1uU0dlS3NrRVAybHJzU2dhNUpsTUZyclVNNVdtMUREcW9oWnFqTDZPeXlPVFVvUXRrQ0dQUlVTM1lmbVFJcVpQV01NSG1wbXlwZUdiX0xSVDJXQm1hSFFOUVhfdVNWVG1LUWIxbDBJa1R0eEFNQmQ2NzNTQUJNVVllQ01zUWlXRWdxT1dBbVk3MjZWeWhneFg1bjMycEV5d2x0cXFGLUd2djlUMm82blFQRnVrWmNSc3c3TGROREx4V2hkMHVyTHFneDVyQkh4QXV4NlllaE9QYV9sYVR6WUVwUFhGSm5yR1c3LXpsYkU1UmtUUUFRNm8zbnh3TWkyLWFPREthSmxWS2EzNW5ZTHZPWUZtSUg1b3gwcHVBOFZGUXNmVGdGSjZQa2U5cWxic0JwcW82S3F3di16czIyWkxhWVkyNzlhRkUySXZ2RXhHakk2cW1HV2Y4RTVPbjFwOGZWSndqQXlqc0gzLXlwelFJOWFMYzF5WHVWcXFvNzVSbGlHZGE2Z21Ec2ZSRW5wVVNrdUgtYzVXTFBsX25jdFlmY1pKUU1IbWlLNUpPT3pnTk1IOC12ek1FY214NXJQeHpuTHI2cV9tWjhKb3MzSkFiMXliYm1PNmFoR0IwQ0hqZ0ppY0FOdXRQME1SMXd2eVd5Q3ZVUzFpclVnQ1RyLWNYOGFGblNKY2REdUxhMWY5TVV3ZmJzZTV6YkpTcFRpNUplckc5Sl8wLUwwajYzc0Q4ZkxyU2l2MGRiVnlhSl9SMTg3UWRWQzRMRERWMzhhRFZNM3FOdmNwYm5MdzBtYlZzZ2NFX1czTmtlWTRsbDBLa0I5T3BmRmdNX294d1p6T0R1S0lsdHZ2YVhkbGZha2E4a1BDdXJxS1BJZGxydC12bHNLdkdpQnBjNXVTUG12aGcyUEV4YThCQ1BBZHdocXo4aDl4Y2YwVko1MWtPRG44dWFWOVlzUlhtY0pOdzhZTXZXQXJnOXU2RnJzaWtsRXQ2NUdZbnZETTN5V3V3WlV1UUw5LUVvUUpCdTM2bUY3amwtQUFrYTRhUEZONWtlOVdlMEtObEtRZDFOVG9KR2w1dmZBUV9UQ0FXQUtQZjlGSjRyOEpzVFpWWW9lZE53OUJzQ2RLX3gyQ3pTdkZubzgxbE1JT2pyYWZLT0NpZ012QTBoTkM3NE00MXo5alZ5S1d0T0JXdVRWNEFFbGtDS1FDUXVBTnVmRFIxWUNoX0lsRzhVcklFR0VIdTdGMzhHUWVvWmtCd1NNMHoxZlEtZVVPUi1GX205ZHN4bHYzNGh6TFhUckx2ZGJ6YzJuYkV5R1pnSGhBWGVIZkx3eHFNWURwY0RmSW1XcEwwekJlT3JWWkNjZjdwcmNON2FRUGxSbTVYUUNnLWlVOUY1VXdkMUVQd1pFUGlNTGxGX1k5cGg2N0lzemNReG5VTmZZYzg1bnhIWVRBUzQxakFicmdJSjdfSy1KMDR5MVBib1lDb2dRcHN3cGlyNGZNdjR2c2RuMUtVbERxdkh4UjdZTkNXU1l4dlFmek4tNzUzazQwRERYd0xlXy1yS0tzSUo1LTY1RTJXYzZkNXZYLXpzdmJTbmhDRnlidE42X2FIZzZzeHlPc3lqTnh3N1pQVER4QXRXeHlZOWpZMzNnamI3eEw1WmdSMFlKRGVfaGpNS1FpUWk4LU02VHBlOS1YY3FuakVuWnBFdVJjUVBldnZKdjF6LVQ1YkpLMDZ0VnRLc01wSU9vR3FnbXBYNktzYWxNTXg4QVdCWUoxc2VfNmRZQ2o2TVVuckpIeEUwSXhzR3pOWkJlOXlVS1dzU2h5bUhZWGRTM1RDekxfNXhycjVuVy1nbUt3MkJTZUViNm52NGFoNTh6cjZ2MVBFZ2tMTGRuaFdPbjZZQWZCMzRzMDhWMDFiUnhUNEdSNEhSOWExSVJERVFVY3c2b21POWdoeDZCTkJKN29sNnVlZnBZbzYxNmdFMXgwWEFjQlBrVUJqTmw4eTVockJsOVlGMW1MWTJ1bEZUQkctaVlOdHhIdlZOZXllYzY2NTdxWlpYcUM5WlFfQ0txT09Qc1hrdWtEdndxMjhyNXdyWjAtbXhpOWZ2Z0J1NElsZ3FpbDIwQVZtSlZJRno4c0E3cFF1VThYeVlKTHdRbllTbG1mU1NqZEtoMUtrWnlsN2pwVjJ6ZlBBV2I1RWxsSkM5QmZUXzViQ2xfbTdpWUFlRGlnTkJXZXNwaVhuLXBUOWNnc1djdUZoYm5BTlB6SGtOYzZmOWVlb3p1OUk5N194SVpKSjF6eENtQUtZck0zTTFCNE1sb1lpcWJfblJDWGExbW4wdXFBVzBqSDZ4RFFLWW5tQVQyYnpRYXdYQVhxSmd0TXlza2xVaU04MkpOR01LWGFDLUZPTEhvYWt0NENBRm9CMzg1OTJHZ1NxODV2TXRqX0d1NHVYRmRtMGFTeUZjQThSTzlVTTZPelhncUNkaTVRWjZLMlVMc0FQTEdWdDFFUmZsWlFuX19SeUhfanFfbXZKTzhHcS0wWGd1RzZkN0pLQTluSE9QaVRnUW5yeWV0OTJqTEgtVTZuMjlIZkhrUnFNQWp6eGlCTk9WQk1namd4Y2VGeEVXRVFCYk9EQk5PcFJxM29oaXZ0WlFaMFN3ajI0eWloREQ3UzRTOVg4cXhhTVBGNFhOS0M5TW1YVzkzSGhLd01ZYXJfcTZ0UERxTlJJVGV1VGZCWnN1bWJITGR1YVZnWlVLczJTQ1dEQ1lrSXpHSHVyTmY5TFNtYWppOGJhZXVBal9PTTZ3TnIzUkFTdHhadlM0bGl3RmRreFBvNFB1NE9qbDFDTDFqY05BbTlsZXBLNlJxX1QtVkREeWdkWUxsSmM4U1UtZ3JCVUFiRzJtaGpPTXF4dUd5emdXNnExLTVjelBDeUZ3TGhkaVB2MHh2TGtyNm1Id3hMbWhldVBiUzNsNVlaMENQUl9qNTVNVnFwcGFzZW5Qc2JFYnpjbWlaQlhCNF9uV3Q3bWlSUFdnbWNCcFp6MUpMNFI0N3ZyX2pIanN6SkRfbmJhRHh3c2RPakFEV0lGSTlhTUhpM3lFdUpwMzgwRlFrWmptUndwaHoxSTJfNDhXaHhqLWlJcjc1WXFlUjVaRGRDNExNUTRDU2R1cVREV1Z3dm1wY21BWXRzalJaTlFESHZlTjdYbnJBU0s2b2pBN0dvOW4ydThoWGNyS1U0Sm5uc0dod1ZRSnJlN085SDJsWG5XaGZraF9IUnB3QUJQd2xZQmJRUUFzb19YUkFaV1AzOS1oODhNUlRiaE1jaXVHdl9Yb0c3LUpkSmpWYnAtT0c1cUo2dFAtM1Z6OEtSZFdJT2Z2enUyZ3YxSmJfeEp6LXBDY2xxWjlDT1ZNRlhCNXEwRHVTTGR5S1hpa0xVZll0M1hyM0Z1N1RyeVpzMDlrR3drV09NRmFCTnJXTHlKNkJIQW1TUURjZUc2cmNhTmtRZGlCOVItNVJKWXpEWWs3SFQzdDFvZHlEUDZBdDdfVzBxcXlsak80ZlFiRzJmM1RBMjQ4bHE0dE14c0R3Q240UmRtOGowU3Uwd2lQdzRJNnlvRkZaSUh3bjJhcVljSWJ1SllyZ2xJeXZ5a1cxSzBUdlg2ZVFId2k1YTZ3MTZZOFF3S085aEFJZlV6SWtxbl9ZRUo4dGp2ZW90UXMzWFZEaGtaMnI3UkZjdTBCc2xKVEo4TFVPLXhRNEdtSjZsVlN3OUw5TjRJNjhIMzRwUU9Ta1hValNaczFYRlhJbVlQZ3pRSEhwc0gyTTVOV3NsSmlucU1oLUxLd0xsQjBpaWF6b0lMRXVFWmJjNEpuakxCa2JoU2FuUEZZU0pNUXNRc21wYmxzUXVhZVFzQUNITUJIQ3pHQ3BicE83blBBbEFpU0xpc1hlOUs1TWZScHVLVDFDQTM2Q1Vpb0xEQ0haSW9ZMEVlVDJzQWthWW1tMjR2S183cjdWSHR3NklpTUxGdzlhMXJhdVdZSl8td0tjNERYM0pubXRWRDU2M2RwNm9ta1pMSm1Xd1hQOU9BaVFKd2g1bmFvMmFkX1JQbUdTbFZpa0x5OVk3U0NKbjlUTE9jV1k0R2hxVGZzTEE2RkN0RkxLNDl0dzZCT2hZSEF3ZkJlWnNnb3cwV0hYeldENzRiUHYxWkV0Q1o0VnFoTFdzRnRaWFF2V2FMNmhLUTZaS2llcktCdTcxbnVxSE9UT2JIVXhxOGJ3Y2lDVnhXaTNJalZUZlJ0cUltSXQ3Zi1yc3BncTFzbm5QRDJGUHEwRmNrdHMyUEJIWkJMOTEwTEtKVnlsRE5uR1J5cG9zWmliRlNkVlVqeU5HYUpyVTNEZGZFTmJ2R1A1TjZFbi0yTzNqckUyWWJPY0EyNXp0eTVvblhJQXRpM2hzZlAzWE5NREFpUXY3Rno5cjZNcGdxUnUwdndUelJtSDl2ZmNJaDhRX3VPV3c2cTkxbWNWTHBzcHhSNnE3a3hZbmYzTEhTYjE4YXd2bEsyMGg0TzVFVTJNWlVkWHJNaHRIZ3hXRmFtTTNLeVh1bHM3Ym13NFhVN3ctYWxiRC1oQ2dkWTNLUjU2U3MtM3hQdUwyNUpPS29ERHdldVVJWkx2WnJwNnI5bnN3VmZIZ3h1bU1GcTFQVG0zbzl2ZmZyc0xxcmQySm9VZU5zc1lVY1R5N1QtNkZpOXgwdFB2MDlzdGkxT2JCYVVvNGRiWHRRczRTSEwzTE5aZE5yNm9SdUpUa0hHYnJtc3ctUzZ3cmtBdDE3Z2c3TmpHOU5fX09GYS1VTVlyM0tJWXdudnBHQW03YVQ5QlBkODBjbFQ1UTVUWDJPYTRNbTEtSzh2VEoyN01CUjllMjZMMUNfcnNXTE5rZE91a0ZsUHNaNXdCTU5kVXNUajhVc21JQ080c1ZQWVpnbGhEMEtZSUNyeUpXdHR4Z25TNWFzQkZPdjJWOWszWktFOFZ0VE9GckhFb0I2QTNUQy1OdE1YNHluNk9KT3Z0OEcxdE96dkU2aHdPRHV2QllFZTFtb1pDblI2OC01WFctaGRVXzRwOFFzMmtTaGgtWFh6dUdaalVJb1Z1R0NsdWQwZzdIUTZtcC1wTDhhb1ZKbnRHWjVlVHRRSDBGNmk0Q3BQVl9hMkthT3NFbzRtMVd3VjhOSVdodW1XMGR2OHpfOERrcndPTlJwUVFKQWZsRkp1enFaanRYZExLdEN3d0ZoZ3ZnMWwtVWYzYmJjc2FjODNFc0l2R2pMcW9rZVdFdzBBSHkzZkdyTGd1UlVtZGZ3MEtjQjFuaFdnLlIwTk5LazVCRlFwSXJnRUJCc0I4emc"}' + body: '{"value": "JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLk9kems3TFFIaU9MbVZjcS1ubWZIWHZPTGlRMjEzeW5NOHlzU29JYkhyV2FoSlNsb2pQa2JjOWRfMG9JX0xBVnFFWjRUQWE5dDR3M1B5emRYRDloaTRPcWh5THRvbFRmajlxUndWcE1nZXVJaVp4WndpVnlFR29FOTN4dWNfOXp0Qy1aV3hmTTR2RHRPUG9KZUNDRnIxS1d2XzFNblV5ZGNjVzhvRWxXS0JscGlkRjZJQzI2V1BRMEQyWThscFNmMnZrN3FUejJzUjRkX01RSGwzSkZtdWtaU1hYTXJyNC1LcFBqaDNtNUhvWXM1bXFhNDZDNVFQUWVLRGNuR1lGTndhV1REQW5EcTZHaFZJNS1mU2ZEWUhqZVhJcUhtN3hmdllmVlBPTGdRdFJMbGt6VHNCUUgzZjlaYnlUczFWQ1JkeTN2MlNLNjhnbFFDOGFEcXBIU1FNdy5iby1PMVE1VG5HMGx4MGdpRjVSQVFBLm9lYUJUR043ZzNMNndRVS0wU0c3ZzRwXzdzU19KSVpJUmFqbktPZjdBNldnZ1AtbEZTTlVtV3RoQ0p1SjAyaFpyZW1mamRqcFBtLTJPRWZ3UFhzVjk1YnB2RGdMc1h3T28tRHZlTTdhNXRZVUxuYXJNXzhXVmp3emVpZ1BlUVpCV0c2UXAwbVZKX2J5RG4wUWJDb1FIRGdtTkVZWi04MGNXWVpJOEowNjBZVG1xTG0wM1RNN0h3ekpuN2ZjUnU5aXQ4WVVTZGl6Vk1nb3lNM1F3RWswRUlKWFJCZ19GVElEdWJIZ0Zub3NPaG81ZFRDSV9ZZXpTMVpkQndDOE5JZnBDalRSb2pEVFJpaUgwMmhXcTVacUEyNktIOXl1MGRZNTJ5TWYzWUlnSGZ4WjJrY3N6d0UwdlRBandyMGtSY0lnTXNSZV9MREROMWl4bjJQNlpzRkQzZVBLa3VNYmNmUi11RUxSV2VPRnpuWXVqeVRPVU40YkktZ3kxTVhpbm41aGJuZDYwb0tqZW5JYlVvT00yaFcyYURVRXlpWldXZ1hPNW5RWDVPSUcybEhEYmRUNTJzOGoyQVV2blJ3bTN1ZWF3dERjMFBveENCRzZMSE5CcUZJRkhqNkZfejl6S0FUUTlDaXBON1RRZE5yek1Pd3Q4NWVNTnN3bEZOOVdQd3pTSFJTb05maWxQN2EyaklQOW44SDN2NVloUlVQRFhaQ0VyYk44UDRLWEl3c0EydWY2czFia0J3UW1QRjk4UjdsLWZ1TDVRVnpWZGt4VzQyREdoMXJGcEwyQTFhQVpmU3lON3hNVEpzZ2lBNlRReTUwVENEc3lfcUIyMUh0ckRhMlhlT2JtNWI0QlBxelVjNXZYajU5LTBYeHZjX0ZoYUV4Nkx1Y1UtTmFVaWFfME41US1iZW9vMlh2SDZTNkhOSm94bFZ5RVVfUHF1a1E1bnZ0WW1JS0F3VVFXMng5WXhFa1gxTzVpd2N6Mzk0VlF1cjc0b3hkUnpzVHhKTGNIeDlpYnNBZkxtWjUwaUZFb3g2WnJJOWdVOGtTSmZ4ekhHOHRpSGNnYzhLTUpMaTdNZHhyZzEzSG12Y0hfMW5FemloMF9OUVJVY3c3X2xQSVBuZVJEX0hlUmRiU0ktOE9wN09hT2wwWGhMYWpKVUNrMXhzV0plNXVYLTh6SGxyT0ZTSWtlLXFIRkpjeDVlcFNyVWN0ME42bVo3akQ3bzJGb2h0cl9KNDA2Rk5hdXkxM2FEWTItTFRSSmhTSWNReUVzVGs3NXZBTHV3WElZYzJzMk16VXc1cEk1Qm9GaWhWOERqMExzNmVSNXAwbkpDeGFqXzFmWU5takFHSHhSZ2NGbzItQUg0RjF3ZXVhTEhDS0NNekc2bFBrQWZQb09kTHFWY2ZvRHozOGJlVl9ST0M0SFpmV0hySDAzVmxZaFFGdEVkRVI1XzMxQmdyQkpjV1JtQjJFTzFUTzJiYW42X056Z25wMU0zRTZkUExBaWZ4aUk3amxBWUlBUGU2UkVVc0lFaXdtd244MzQzRGdOR3FpeWk1S0YtSHZ4OXdCdmtoRFVDWmsyM0JzRWkydEs5ZkF6LTI4R3RHUW1TRi1Obmk5Q3NFQUlTRXlzcFBRSDFpV0ZXbU9WdGFJSk44QlowVXdXMjZRZ2I3NE9qTlZrem9KbTBibWtjSnVEb1pxMUZPX0RSd3VHYzdzd1JPTG9yTnNUSmFEdXB5d3ZlY1dLUi1rdlBIRnh1b1R0Rng3UjBVZ0FtQWhrZFZWMWlUd201LTJFYllJNm5iYXUwN0h3VXZHbzBfazU0dURoU05uMVVST0lHd1NqUWR1c1UzZThkTzNiVVhxdTVfVGFfYlB3QkI5TFQybkNPWlBSQ3A4TzlaZ1dKRWZxamZldl83NmJ6U05BZzJwOFh3UzBmbU5NdEphb0Nub0ZOWmhRSndtZ1g3cVlYX29oT0lEM01sUW5KQl95Wi1id1RFcjRKY21fdVkwRk5pVThSTjZvTjgwMjdfRWNybEI4ckw3d3RTRHhUUUxlVnl4UVFxaENFaXJNNWVHRGVNNldWc0lMR2tfNnRxSmM2bmNJdkxDc3hxZ2RNdlpYc2dqVTdHVkV5eVJNRnAwX2NQNVBndGYwdTJuclVJRmFUbWlUR2dhMXU1UWJUVk9hRDVSbTZvOHFmaTFzeGQtMlIzdEMtdkpIcU5rUTFLWGZNRDJ6d3U2LUJzTVRLUHk0bms0aEVxXzBIdU5DNFlyUk8ydmIzclNXZ3FHVEhmeGQ2bHdjMTJMazNDdDhIWW1vR0JzVS1vYldFejRYLWgzY1F1ZUdQcmNMaWNZZmsyTkVYV0Iwem5yV3BSaFd3enNTVEc2Nm9kSDRfeDRZei1HSVB1UXRNUjFNZ1BzSFVpOWFiam9rcmxRc3NqeU0wX21idGx3VkZob2paU3JzVW9LV0tBTXV0bVlkRFZKcmNmRGxCX1dXVF9PX0xxeHEzYVl2ejF6RmJadWVBcTBBMXlCSjFjdkJvZTVQS1JZcDRkS0c1NVpfVFp3NzlvYjVkaS11SWxoUzd5Z09XRi14bnFDdmg0TlpPME45SUkyWUduVW5wcU43TlNtbXJ3LWx6QzhnS0JfUmp0T1RqVWdSWjZtakFHZ0toYmViVTBGNWdYRENNeXRLM2NtNkpiRGs0SjZMaGI2bVJLTEhmVjN4SkNwMEdQOHN2UUdyOWx3d3NyNmJNMHNUQm51NllkYTRPeE9SNDg3aG5QVFowWU01RjFoc2pFM0p5cTV6MklWQXQycGNsTHhET3I2REMzUU9oN3NhTHNVWGRkbzVlejQ5V1E5dm9qU2RqU3YtMzEtZ0hncTVUaVFYY0xwcDVaeUZCcFNzMnVaVWdCb0lKLWpmRjY0ek1kU1lzZTRzbXgydjNESWlCNFNsRi1Kb05uejRLaUxkdEdTUVlMNW41VU9iX1pQa0Fwa2FQRnYza1dNM3Y5cjUxQ2dTS21ZWXNMMmJFUHBlV045aEFkUXJtYlJ3ako1aFZXT3RZT2dWcXM1dHBYSU1reDFvSnVuanF3dlJfS291MGw4cm5rSHhHVE00V1FGb0hqWGNFS1ozNHk1QnFmSGhiUUUydGUtRXNjek1QOFFaN0l2NzFEX3JwYm1IdDg5WTRGb1Bfb1ZkYW5YSUdJT3RDdmVsWVdsdGZ3blgwYTZTeWtRc2JDcXowb1A5RmFueDhibUlyeVNSSXdZVjVKaENQR1ZlMVluaXhqVmEtcVlVT0tXWG5tZU42M29RS0gtd0FyVTgzR2lhbFlCT1pNWVBCQTB6TzlyYkVYaHNLajFXQ2VnQk1iaHRvemhuY3VmZWpQX0JlUUdBOXBIRndsNnFJU3pPUGt6UC1ucEFCbjRxWVhXWk5JbWxNb1pyNzRmNnhVSXduVThyQU5EZGgxb250ZmlSbmxFdjJucFFiRFF6ZklvemFraTlsUXkzVWZCV0ZvMWR1emUyMVRWb1lqc2E2a2RSZzVJSUNyVDlnNVY3NGptdnc2SmVROUdQRkdHTXlablN5bG5yNEN0ZC1TY2xmZnRXamxkUW92cGhzaU1sc09YQVZEaVFsNktSazFkTEpTSVVwME93MXhOMG1FNUY3UF9OLWVTWWJ6azVGcFZTaUFjNWMtNklha0toUk5wd3NyX1ZPem41amt0UFBWWTFpcFZXNUhuVUpDaElhSFRXMDB1NmU1TVd3NVMyQzJsWTdIVXNESXF4Zks4bXJJXzZlcTV6LVNlaC1jMVJfLWw0aVdlemJULWEwUWxBNGtYdWpZNzRvNVduTDNwMDNDT0l2UzZUYjhMN2VXNndyYzRab29XRHFrUTlhQjNscXdwT0tBMEFCV2tSSUprV2dsZlZMUlQxUVM3Q29abmxFeUVlbTBhRnNKdGtTZWNnX1RkUFBUNndfT0I0Y0xXY0NJZGV1ZFd3THlieGgwNkhBQVR5dGYtMHZreTJxT0hkd0dJbFoxQlhTdmlSX3Y1LV9SY0JUcEZEcjVMcnR1U1JWQmVsRmlMWjJoaUUwQi1VUGwzQ0Z5OWtHdy01TTlVNmNKNE9CZnNMemF1Q3N2eDRYeVl3VnA3N3BzR3M3M2h1T0t0T05td1BHWVlPOUFuUm5ENFRmeV92ZVdZdXpRclZHV0Y1bms1WnFJUVZ3SVBaUHhLaUpIZXdFcVRiMXN3Z2RKSnV3ZC1PV29HMnZLZ3hWdVk0UXlzVjQzSUtjYURERzNROXZEWXNTNWU4enp4NVlFQVBXaGNhZ3M5UUh2NkJFVDU0LUpCTEUxc3F4Wm9jOXRVVmQtVWV2NC0wSHU5TEN2LXNnSWROVVlHT21ZRTB4NDlsc3NwQmVod0JBaUQ2OUh3V3Nud0NpNTBFSDdQcVVoOTZSYW1VU1IwVGxSWmx4REZoSlNsMTNWWExtLWZiX2VjV0I0NHl3NWt2WDhCTFJ6c1JDLTlfV2tyOWNRUGNLMWVxWWRDeVdxUEpBMG1NUWFqRlh5QTlwQ2JwZ1hGZWloLWgxaExLdHE3anJydnh1RWVxa09BM3QxdjB0cThCRUxTTUlxTGd4R3BwU21QeEtZeUgtVXdPS1A4ck05NmFacTY5STNpVlFuV2J4OFVnMEpNQ1liNmRVWHVOdGplSlk5TEFoXzl2QWRZSGtQYUVVZzRwV1h6X0JWMjA5SVFxVk5ZNHpmX1dVU3dQNHlYUUFqdElUbUR6b1REVUEyamk0R1dPOUNxN3pRNzVUcmVoZFlNNWVhLVpwY3RKQjlCX0xOdEhVclpNdHY4SlNZMUVscWxRdGc1dXladFBid3pWOF9jUkdEZnY4M08zR3hvYzF4bld1aHQ2UDRuQi10UGVyZC1taWN1U3g1VFRjMGU2Zl94TmJUc3dpRUE0QmhRS3dZVDBKY2xvS0c0UkQtUE5UOExlZk52UFBWZnVQSEdfSm1aQUdDOVJEcWFra0tXSF9EU0Y1Y0RfdW9BTndBYkhNUFlpY2ZDOHZETXZUcGNEdUs4NlZyTVRSNjFMdXpQWWxMdENxNWdiQlhZaWZFdlFJVm11TXVHZHF0SFpiUHZFSUo4eUEwMHFxdVd5cFFVRTZ0RWhibzRNZWt4R0NqTzJDaEoydjBobnh0MFYwenFBcm1xaXFYOVJHdUVQSmstOXkwY3lfWVNPX01jRmpMWGZhYTdHQjl4aDlTSVA3UGlSUmE0MzBEaXBaSnktejJxbTNXbE1KNW42Z3g4OFE5U3FqSU9mODZHQUJLRG1XZzhFbnJZa3lxNDhReWFwdUhOUlVHMFQwTFFGYjc0U0wzMUhPbWhQV0F1WjJrRl9XTDYzZW9JTlZTeFBoU3ZSMEVWYmFpdWtvcHhVYW5pRTlCdWYta1JHTnVlX0pBdTJZYzBKcjJ3UDd6YllIZTJ2QTdGMFBvWmt0cWp4LVZTTlN4QmE3cFYxZ2hpV3ZfZlhILVQ1MF9XQXFNSUZjWWhkeFdNNXJTZnFPaWxrVmNCbkJ5TUhQLUJwTEo3RTJLVmNoRzBGemxvQkZvazBEYzdtYkJBTEM2NEQwMVA1U01zZGY3bGpaOThUdFAwc0dDcUJuOTVsTUwtSWpnOUhDblZNZ0ViODFma3hLaFBXWTUzNDNDVjhiWnNyUDhtamZZUzNqUThoSmlocjdCb0c3amZPOUI5aDJkamFScnp3OHFKeEJDRHZRZ0M4VGZjOTBMY0pxS2YxVEc5UE9GQ1dLV2tRWXNSck1JdHhDWF9kTi1jekNNV0FSSUNhYUYycFdvTXNEY2tZdTRWV241UzFpNjF1NTdvdG02NUxPV3RoSlBDc3ZKaXFGaUtoajhHYWk4OUYzcE5xTU1YN2c0V1JmUXZIVmxucmJUeTdSVmZPaE1HYnlLX0VKWXVVTnU4dzFVVWFSS0JoMW9VcWNVMnBpNG9JV1k4LTFWb2NYMkpfTW9KTFRsTWlNSFZ2V2k3bDdLMDByNE1WbFhHWWhJSXBLdEJnN3BZRVQ1YlRqeTZfWVFqZjFKbVF6TnNJT1U4aGdtc1lCcTI0eFRoSmRONmdsNlhTRzI2YmgzMkNYZnBvS0U0M0tuY2tDUm1MeTdCbzQyV0t5SFhFUk9qYzJHdHh3TmJ3ak4wWnVkX2JJSkNtOW44d1hMOEpqencxeDZRQ1RKY1hSTGdLb1J2RWRvNmlaOUMyR0F2UWw0T1B1dkxobWpEV3p4LW9Ec3NnRXZmdEFYd0dWSlZvYVJhVWJET1EwM2FBdGh1ek9LRXhaTzNZamxHTzZrWjFHRnhGbWVneXlNQ3JoOTJiVm9tYUdSaDkwX2s4ZjVIbmlHT2dGdGlRMzFaUmtCc1JyTnJoZUlLb2Q3dTZRX2xSUEhMWk5pRk9UZTU4cjUwdkdKMVdRMzhYbFBHclhoekNWYTdFVGdRUURDNGRlTDhuM3FoN1lJbHlpcnBmakxyTVBUaURYMWNQSEppR3pjMmVQbVBiUkk3VFpnRE1HR1BTdUwyRUltWXNINzhvZi1HdDVya0t0eHZidW5jblJuZVMwUm53UFRYQmdFT1FKSExoWW5PbXRmcmIxTjkzVDI5U19udnZjRUZFOEpGZWtadXhxaEZJRUlKZ0lmbHQxSURxNEZSRFJVaXh6N3R6eVlIcGFtM1gzbmxUMzA0UWthR1hLb0N6YndUVVFsdldGR3BCVHZQcnB1dmp0VllNNzc4cGUtZHZxQjM4Snl3VkNoQVhnbDV5d3dpRHlCOFlTWUs0V21BNzQ4a1A0T0k1N25oc2hwSWNVX2pfS1NQclFQd1BXN2pxbzY4TjNiYXNYTW5ORHNUcjQ5QjF2cE40NGQwWWIyRzdTZXRzaU5SV1lhdmhZa0d5YjJPZ1dqTG5LMExZbGI1Uzc3SzdXN3J6S21uUUNfb0VnX0I3aERFY2NKUlJQd2dvazJiR2dYN1R0Y3pydkNtOElMTEpnUXVvVmFoREx1OGxGT3o0aEtYUlV3dlRwdEYxV2Z2WG9QOFlDc3VLYkRTUW4tVGxOc25DQzhmX214M0Vob01vUU9YS3pRRTN2NzhLb1NSRTZXWUJmVjlCNjlzY21pdWpSOHFyYTR4dVZfbDBnWVNLNDJaQU03enFKN1NqQmt1eGd2Vm5wSmVTbTc1c2NSZFdaSFVJam8wNDB6bTFlbmlLZlBGSWFZNmQxLWt2Y1BkRFFVLXhabmgzZWRQRlNTM0NDTUI2Rk92OG9CTWZ6Y2RmZllqM3JHRHVfSFJLbF8xaElwa01xdTNfckpNVjBhcVdsZm9aSVRhZnhYZ2tPZlhaemNiQnNCOGdXLXgxZ3FMT3pqUllVRGowVTk3N1NxX2x3c0ItQ053eVFoczBNNXI4bWRPeS1hQVBOUW9xb2VlN2I2MGR2RklUZUxMUE54TnB3LWVnbDNlRThucnhNN2FrRVB6enZLZlJOMHNPOE5QZHE2SUdKM1lDZzJQNnZPeVI0aDZPcjZiQlF1cXYwVkJ6cWo5bUJuZ0pyT3p2YnI1dTZFMUhORGZObk9NbFpzeGRnQnQwOENHUXdJUTdPbXM5blYycjRrYmQyNVk2OEZLbE1DMFhGLTZHdHVFY18ycFhQR1pldXlVUGNVVDNVUnlWVUp3UFJfSy1YaEdQZnJiN1d1TERTcms2LTV2Zk1OOC1ZanUwSzk3dEx3b0lkOHVVTVg4VHZvUWF0LTJCemc4cWVzSml5ZzdiWFl3anNiQW04dm9GcDQxSTdmWWVpYzNoQnZ5OVBuYVFsZUZ1a2JZY2N3bF91YzdzRl9Ea2NiZFpuYU1SNTRvOHkwZm5tT19sbl9PYTdNTmRMcGhWWmY1LWkwTXprdjJ3U3J0REVGYmo0ZFc5UWNHWlNpY2YyaGZiUEQ2NkFKVlRKVnBxbnAwd1Bia3hGajg2TUZxWllIYmFkajNaY0tmWDh1S0dXdlhZdE9QWFAxT1kxby0xWVNVSDA0ZV9oSWhud09acTZYNVJVajNoZnExQ0RyVmxTU0lzc3NhWHRkNHR0Tm1SUjYwaUlxOXBOR2gxZzJKMEdNWHFZUnQ0cHpVNTRlMjJXUjhnWjlPTV9XNkMyV2t0N29uWWZFcU1FNjR5cTZKamF3TDRzcHN4WFVBSTZ0LV9IY3JNZGd0Nm43Sl9ZVkgtWnJRZTEtN0NYUkJYcnF1cVF3VVctMkRmOUozaWcwcXR4VlFaRG1sZXdCbUZnZ3FXS1Z0OHgzQnl3d3RLWnRaai1saGJHTlNYTEpkSlIyTW1wSEY0YnhIWUxaanlITjlRb3JZOUxaNzBabFFBX2xSQ1BSTDdIYXZWZER6YVMyNXVhOW9iNWtNb2ZfcF9SZmpYNm8waVk0dUVUMTUxRGoySzBZMHlRb1J4UWs5dDhiNTJBdUNzUTA5NDVlU1pDY3lDNG9SN09uZHJiclJuWWtDTnVMdm5ZOUJYSHZjbkwweUJRQTZIUHRRM05qNllCUzktSHV5Y0dQNDJTY3pZNUJDQ1NnYTlxaFVtTDh3UUNhbEc1akZuZ3VDbU5mMmRCaTJWUnFucmNlWUVyaHJkWmxrMWF5UjZ0X2ZJOGc0emdzQ3NkTUswN3lJck9kbWZhZXBERzZ5ZTM5YWJyN21PdmJ4eEZBNjlINTFSUENfUDhOQ2pBRmpYVVp5UHdLOVNmQ1hLb0VwZVZVWlpRWWgwVFQxR0hJTy1WZGJoR0x1T2dDNGh4RS1jc3FHQ1hGS2xFMjV4dU5maS1uZFpaZzRNc0F4cVp5VTJpbm1sN19RdkhpaUkwVFB4eXZfdUtlSFItbGJ1eEw1RlAzY1Rpc182X2pteTE4T0pIT0hXaF92WExKdk1JT3BlU3o4Y0ZWeWRwMGpUbEVfMVRyR2xmQklIQmFKRnJJQkxfc1BXZEtJSUFDUUxUemZpUHdTSGZDR183V2c2U2I2MG1yTFhSc24zUDlLTGNkYVVoanVsOTZKbWJrTnZxM3JwUDJlUjJkWW9TYXhsTTZUNGVDRzVEREtlVFZFQXYtQ3J6SzZxWElzQmxEdDFGUnpEQ3lGLW9tSFRIMTRWZUJUcWxsNWl3dFpwSTkxMkIxUDNiYXNwLVVlSFdTSy1ZVmhBSVZXN0VBSE45UVhGMm1OVFhWYnozLWd2SlgtM29wMkhXWEtBMlctQ19PMWZTZWpyY3NhTjNGNThFd2h1UEpncVd4NFdsQkY1SDdjYk9JTzkxUkZ4OW1qcTB0SjFYaDF2UEo0OUJiTjhJeFRKOEZPSG9sRXFnclhiQ3FpZnF0X19kRUlON0JhS2Y0SE93a191T3lybWs0XzBkU1FCZ0ROWFdNNkQwQVVXbHJKdkxhaVhjVlhXOFRNX0ZwRVhEUVc0MzRvNGhmdi1zTkctWUE3Y2gtUFVET0pOR0JROFhjOHRvWmtfb19mdG9sUm9rS0Y0LTlOZHp6RVdDRjNnRzVBaEJzN3lsbUtldDhxNWJoZkgySWR6Ulphaml3eHFCV3IxdXloZDFXRG9sbXd3dFc4dU8yWlAyMkRsbFhPRXB0bERfUmF5bVpDQ291Vy1CbUprVFpJaGlOeDh4aTBubGhzNTQyZUt5eXAtQk1RdXl6YzB6c0pZVEJzN3I4QXVpeTlJM0hma1dnYVNoZ3huM0Jwdjh3NUJiTjZGSWozTVRvZDljaVVFVU9GckRlTThMVFBTa2ZOcm5hUEpSTS1sWEt1Mk1ER0w1VVV1VHdqOHYxc1AwaUFMSWpOYjFraXFvWGRyXzA4YzB6OEp5QS0yQ1U4LS02YndGNEZfZFdpbmd4elBoOGt1cVFhdlk4Zi1hWVFLWm1JYW9nUjFLT1dhR2M5V3Y4N0xPXzN5SkFqVUNGVFF0amhFdm9TbjViS2xRLWpwQjlFVzh6djJwUUFwSFJyV2ZCNFJlMTlTR1BNLkR1QmVad2xRamtvb0lfNXRvRFJQVVE"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '10608' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault4e00e7f.vault.azure.net/keys/restore?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/54248fddc148400a9df744075bbfe2e8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lsgBFBFSUvohGWs21xzMCFc1IRDfnH0UlZ8aJnqVozFkc9rZgaBdr5IOVmt41hxbJY2MWuJxGpS4xAZ8AmrQZ1MOmS7nUiMmorcyqZZIcZYz3P7YXLjiv-ncb9rTty7IJ2R9v111Beiq3tNdHUrQYUt1wiysQPcPk69FGq7h4B5UqDM4SHQqXF-Rm3R2fU9wct7bx3F2XqYcaMmQWZBiYMH8vbooZWyh2QziCXVB2MhfBt0gTfoLUGT4hheDyLfIgbhhky6Hi0DC-3Ecll3tlK6JHAR6V1jLxJveWPgUy2WgRMSTATWdlcYL_i9Ji9OT4dSLkCFqXWhRN8krxXf9dw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault4e00e7f.vault.azure.net/keys/keybak4e00e7f/6335121a5c4e43919f25f6688e470924","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zPfZm_2ZxRIlx2K1MjSGUuBBpyaJjU_gk2yp9T9Ow8bvac_t6RgXTmsdK-4x27G4h1XjY0QVXkuJwnNxrUbSwrrNsxJtaz-KyCpetoPLcAEp4-EbEF2w-Q5fAPB76ngr-RKlHUv6fww8rfWWRxKb-GmtmYAq_BsUG7Ci1ALoF3dIxKyEpqueY0TeWofWxUKpftXLyjAIcuBVRO5UVSUv1bSfLl1mzm5Wxl6pk6G_BtAi9cn6TS7DERSSEilg_Raz53fCXt5MaoFnDpT5oRIl5E2ZaxaLJ2KwLxoZERB4oZ2vPGgjr8MocaOGY66xwVKZQJKttZmDy-7pUKWMxoBG4w","e":"AQAB"},"attributes":{"enabled":true,"created":1564526988,"updated":1564526988,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '648' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '648' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:49:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault4e00e7f.vault.azure.net + - /keys/restore + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_crud_operations.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_crud_operations.yaml index 15050919b2c8..bd62679835e0 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_crud_operations.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_crud_operations.yaml @@ -4,620 +4,650 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault5416109f.vault.azure.net/keys/crud-ec-key/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:51 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:50:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-ec-key/create + - api-version=7.0 + - '' - request: - body: '{"attributes": {"enabled": true}, "tags": {"purpose": "unit test", "test - name": "CreateECKeyTest"}, "kty": "EC-HSM"}' + body: '{"kty": "EC-HSM", "attributes": {"enabled": true}, "tags": {"purpose": + "unit test", "test name": "CreateECKeyTest"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '116' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault5416109f.vault.azure.net/keys/crud-ec-key/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-ec-key/7e76b0fc24ca49de8d22b283874b4aa8","kty":"EC-HSM","key_ops":["sign","verify"],"crv":"P-256","x":"FDZyxw3F8gSsjKrFwIAxsZ7UFqXykyn9dhPZqUCZ2uw","y":"uwkjuEzOUxSMEh1gm35SysHWS9wrpCUObRu3bzy5eoE"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"purpose":"unit + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-ec-key/3f38336e9de04e7ea3a3ba86094fe0c0","kty":"EC-HSM","key_ops":["sign","verify"],"crv":"P-256","x":"KPH8P9UF3zj4Mb-E16WdJk2yE1v4RYMbbI3eraGUS0Y","y":"wXamLF3U4ekD8lKEixbJ1JNaveo_aWkvD6fllRvCAz8"},"attributes":{"enabled":true,"created":1564527027,"updated":1564527027,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"purpose":"unit test","test name":"CreateECKeyTest"}}' headers: - cache-control: - - no-cache - content-length: - - '435' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '435' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-ec-key/create + - api-version=7.0 + - '' - request: - body: '{"crv": "P-256", "kty": "EC"}' + body: '{"kty": "EC", "crv": "P-256"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '29' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault5416109f.vault.azure.net/keys/crud-P-256-ec-key/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-P-256-ec-key/ccf44a9e1f0a4f65b16196c5115e7580","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"Xp3Dh254KJvTKQEI-SEno4nr47Ste9Q0OozXC1mB3os","y":"jJ2D4Cm41HnPPyqeAtcPGUAOLX7e8B2dzBLz4-HpEiw"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-P-256-ec-key/1085fdf8d174406bb92d1c4dc73559f0","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"29pQuyVmhkbuizq-9M-ngz-H59dPnQ07GpzXpWolEVE","y":"b3owWVWqXekjdSKuf5RnuJqyGAtUQr8J5DxP1CQhG4o"},"attributes":{"enabled":true,"created":1564527027,"updated":1564527027,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '376' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '376' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-P-256-ec-key/create + - api-version=7.0 + - '' - request: - body: '{"key": {"n": "AKCRTQAjSsaDshtMFdW-2Ie9yVnC5Xr1Suc06PAHINd10nXkVSB-N4TO62ClCkZV3XKnqU0nHo7o95WaZpym53W_DiO62umRtFKdl4UotL2QUh0y3SZWeWuoK2u_x2aMj17rUFN0f9GZMZ0pqEQNCPRBLVJ_-TEe2nGCWSC0exxGsRqz6R1zFkB-icfzQPe4WjQELOUXQ7J9RxhAPTTHtDivYYG-BeTRHrmF04JT1_6b9T_C8bAC0i0teT-nmlBLarQtBJKATXBx1yegbPOoiTqlQrFQP4MrKWNxtnB9Tcbjcvj-Z9je0ckI_eRc4DvAhqcUh_p15Dqg4GeaoNIO_jU", - "q": "AMPcZrZBqbc82DO8Q5zTT8ZXRGWrW36KktMllaIk1W2RHnRiQiW0jBWmcCgqUcQNHa1LwumjyNqwx28QBS37BTvG7ULGUoio6LrOeoiBGEMj-U19sX6m37plEhj5Mak7j3OPPY_T9rohjTW5aGGg9YSwq4jdz0RrmBX00ofYOjI3", - "p": "ANHerI1o3dLB_VLVmZZVss8VZSYN5SaeQ_0qhfOSgOFwj__waCFmy2EG7l6l6f_Z-Y0L7Mn_LNov68lyWSFa2EuQUeVj4UoFHc5Di8ZUGiSsTwFM-XMtNuv8HmGgDYLL5BIJD3eTz71LdgW-Ez38OZH34b7VeG8zfeUDb8Hi30zz", - "key_ops": ["encrypt", "decrypt", "sign", "verify", "wrapKey", "unwrapKey"], - "kty": "RSA", "dq": "AKC9TAo9n2RDaggjdLXK8kiLrBVoaWFTpqXkzYXRhtsx4vWPAkxhfSnze05rVMl6HiXv7FnE0f0wYawzUJzoyuXBH0zS6D9BqCZPeF543AmWB27iPf38Q9Z8Rjr6oBgMSnGDV_mm8nDVQkeaDyE4cOZh-5UKvKShTKKQVwunmDNH", - "e": "AQAB", "dp": "AMmhWb5yZcu6vJr8xJZ-t0_likxJRUMZAtEULaWZt2DgODj4y9JrZDJP6mvckzhQP0WXk2NuWbU2HR5pUeCN2wieG1B76VKoH76vfnaJDqT1NuJVBcP2SLHog3ffwZtMME5zjfygchG3kihqOSpwTQ9ETAqAJTkRC38fEhwAz_Cp", + body: '{"key": {"kty": "RSA", "key_ops": ["encrypt", "decrypt", "sign", "verify", + "wrapKey", "unwrapKey"], "n": "AKCRTQAjSsaDshtMFdW-2Ie9yVnC5Xr1Suc06PAHINd10nXkVSB-N4TO62ClCkZV3XKnqU0nHo7o95WaZpym53W_DiO62umRtFKdl4UotL2QUh0y3SZWeWuoK2u_x2aMj17rUFN0f9GZMZ0pqEQNCPRBLVJ_-TEe2nGCWSC0exxGsRqz6R1zFkB-icfzQPe4WjQELOUXQ7J9RxhAPTTHtDivYYG-BeTRHrmF04JT1_6b9T_C8bAC0i0teT-nmlBLarQtBJKATXBx1yegbPOoiTqlQrFQP4MrKWNxtnB9Tcbjcvj-Z9je0ckI_eRc4DvAhqcUh_p15Dqg4GeaoNIO_jU", + "e": "AQAB", "d": "Ynx9JGaBSP4iUsf6ZJ6opantRNdcdmzaQrKbZg6ZQE8Ohi1FYabJWvaoPSE-CiJEsDzShXZHMhUHN4X7Bn8BXaGQhK3p9HXgiwQKmix7oAJTu4ElUIyd8UC3UWHSZr40el4PaQD-HYu_eMzCXus34MnRiNbh_BUWm6T-Eidhk9d3kNIyaSi9YNDQHW6tjWrEhhq63O7JU1j9ZonFChZxpKk20jdkQKQURVAdpOdL-5j4I70ZxFuU6wHZj8DS8oRQfwGOvZKbgYDb5jgf3UNL_7eACqq92XPVX56vm7iKbqeyjCqAIx5y3hrSRIJtZlWCwjYnYQGd4unxDLi8wmJWSQ", + "dp": "AMmhWb5yZcu6vJr8xJZ-t0_likxJRUMZAtEULaWZt2DgODj4y9JrZDJP6mvckzhQP0WXk2NuWbU2HR5pUeCN2wieG1B76VKoH76vfnaJDqT1NuJVBcP2SLHog3ffwZtMME5zjfygchG3kihqOSpwTQ9ETAqAJTkRC38fEhwAz_Cp", + "dq": "AKC9TAo9n2RDaggjdLXK8kiLrBVoaWFTpqXkzYXRhtsx4vWPAkxhfSnze05rVMl6HiXv7FnE0f0wYawzUJzoyuXBH0zS6D9BqCZPeF543AmWB27iPf38Q9Z8Rjr6oBgMSnGDV_mm8nDVQkeaDyE4cOZh-5UKvKShTKKQVwunmDNH", "qi": "AJ_nrkLpK8BPzVeARkvSHQyKwMWZ-a8CD95qsKfn0dOZAvXY-2xhQYTEwbED-0bpTNEKbIpA-ZkaHygmnzJkNbbFAnb9pkkzU8ZQqDP3JNgMfVIroWx58Oth9nJza2j7i-MkPRCUPEq3Ao0J52z7WJIiLji8TTVYW_NaiM1oxzsH", - "d": "Ynx9JGaBSP4iUsf6ZJ6opantRNdcdmzaQrKbZg6ZQE8Ohi1FYabJWvaoPSE-CiJEsDzShXZHMhUHN4X7Bn8BXaGQhK3p9HXgiwQKmix7oAJTu4ElUIyd8UC3UWHSZr40el4PaQD-HYu_eMzCXus34MnRiNbh_BUWm6T-Eidhk9d3kNIyaSi9YNDQHW6tjWrEhhq63O7JU1j9ZonFChZxpKk20jdkQKQURVAdpOdL-5j4I70ZxFuU6wHZj8DS8oRQfwGOvZKbgYDb5jgf3UNL_7eACqq92XPVX56vm7iKbqeyjCqAIx5y3hrSRIJtZlWCwjYnYQGd4unxDLi8wmJWSQ"}}' + "p": "ANHerI1o3dLB_VLVmZZVss8VZSYN5SaeQ_0qhfOSgOFwj__waCFmy2EG7l6l6f_Z-Y0L7Mn_LNov68lyWSFa2EuQUeVj4UoFHc5Di8ZUGiSsTwFM-XMtNuv8HmGgDYLL5BIJD3eTz71LdgW-Ez38OZH34b7VeG8zfeUDb8Hi30zz", + "q": "AMPcZrZBqbc82DO8Q5zTT8ZXRGWrW36KktMllaIk1W2RHnRiQiW0jBWmcCgqUcQNHa1LwumjyNqwx28QBS37BTvG7ULGUoio6LrOeoiBGEMj-U19sX6m37plEhj5Mak7j3OPPY_T9rohjTW5aGGg9YSwq4jdz0RrmBX00ofYOjI3"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '1724' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5416109f.vault.azure.net/keys/import-test-key?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/import-test-key/7123c497acc9445cb23e076358438cbe","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"AKCRTQAjSsaDshtMFdW-2Ie9yVnC5Xr1Suc06PAHINd10nXkVSB-N4TO62ClCkZV3XKnqU0nHo7o95WaZpym53W_DiO62umRtFKdl4UotL2QUh0y3SZWeWuoK2u_x2aMj17rUFN0f9GZMZ0pqEQNCPRBLVJ_-TEe2nGCWSC0exxGsRqz6R1zFkB-icfzQPe4WjQELOUXQ7J9RxhAPTTHtDivYYG-BeTRHrmF04JT1_6b9T_C8bAC0i0teT-nmlBLarQtBJKATXBx1yegbPOoiTqlQrFQP4MrKWNxtnB9Tcbjcvj-Z9je0ckI_eRc4DvAhqcUh_p15Dqg4GeaoNIO_jU","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/import-test-key/42143a5692c24ebb9e9b3a5e951aead6","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"AKCRTQAjSsaDshtMFdW-2Ie9yVnC5Xr1Suc06PAHINd10nXkVSB-N4TO62ClCkZV3XKnqU0nHo7o95WaZpym53W_DiO62umRtFKdl4UotL2QUh0y3SZWeWuoK2u_x2aMj17rUFN0f9GZMZ0pqEQNCPRBLVJ_-TEe2nGCWSC0exxGsRqz6R1zFkB-icfzQPe4WjQELOUXQ7J9RxhAPTTHtDivYYG-BeTRHrmF04JT1_6b9T_C8bAC0i0teT-nmlBLarQtBJKATXBx1yegbPOoiTqlQrFQP4MrKWNxtnB9Tcbjcvj-Z9je0ckI_eRc4DvAhqcUh_p15Dqg4GeaoNIO_jU","e":"AQAB"},"attributes":{"enabled":true,"created":1564527027,"updated":1564527027,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '664' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '664' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/import-test-key + - api-version=7.0 + - '' - request: - body: '{"tags": {"test name ": "CreateRSAKeyTest", "purpose": "unit test"}, "key_ops": - ["encrypt", "decrypt", "sign", "verify", "wrapKey", "unwrapKey"], "kty": "RSA", - "key_size": 2048}' + body: '{"kty": "RSA", "key_size": 2048, "key_ops": ["encrypt", "decrypt", "sign", + "verify", "wrapKey", "unwrapKey"], "tags": {"purpose": "unit test", "test name + ": "CreateRSAKeyTest"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '177' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"test - name ":"CreateRSAKeyTest","purpose":"unit test"}}' - headers: - cache-control: - - no-cache - content-length: - - '723' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527028,"updated":1564527028,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"purpose":"unit + test","test name ":"CreateRSAKeyTest"}}' + headers: + cache-control: no-cache + content-length: '723' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-rsa-key/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123?api-version=7.0 + uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"test - name ":"CreateRSAKeyTest","purpose":"unit test"}}' - headers: - cache-control: - - no-cache - content-length: - - '723' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527028,"updated":1564527028,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"purpose":"unit + test","test name ":"CreateRSAKeyTest"}}' + headers: + cache-control: no-cache + content-length: '723' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"test - name ":"CreateRSAKeyTest","purpose":"unit test"}}' - headers: - cache-control: - - no-cache - content-length: - - '723' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527028,"updated":1564527028,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"purpose":"unit + test","test name ":"CreateRSAKeyTest"}}' + headers: + cache-control: no-cache + content-length: '723' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-rsa-key/ + - api-version=7.0 + - '' - request: body: '{"attributes": {"exp": 2524723200}, "tags": {"foo": "updated tag"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '67' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PATCH uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703473,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527028,"updated":1564527029,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '706' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '706' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-rsa-key/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault5416109f.vault.azure.net/keys/crud-rsa-key?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703473,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1564527029,"scheduledPurgeDate":1572303029,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527028,"updated":1564527029,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '841' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '841' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /keys/crud-rsa-key + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: crud-rsa-key"}}' headers: - cache-control: - - no-cache - content-length: - - '80' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '80' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: crud-rsa-key"}}' + headers: + cache-control: no-cache + content-length: '80' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:32 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703473,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: crud-rsa-key"}}' + headers: + cache-control: no-cache + content-length: '80' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:35 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: crud-rsa-key"}}' + headers: + cache-control: no-cache + content-length: '80' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:38 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: crud-rsa-key"}}' + headers: + cache-control: no-cache + content-length: '80' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 + response: + body: + string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1564527029,"scheduledPurgeDate":1572303029,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527028,"updated":1564527029,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '841' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:57 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '841' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/59a38e1f586f442b9a829c6b08e3a123","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"s0OMfLzvUEb_kRFNZUlqAvoo77gHu78NcPEIz1EybZAUoKiATABrjBA9zY-k29ruYJDsYSjeUKPK4KRriOsBFwL21WKW-bde0KAriEAwE4LarWiz2cQEZ-re0VXjReOGuLBfm_wrQIy2vEuCf7JsQYLYy5rI6yPRXtYRaB5UR7AH0i4_f9yY6tAwPNqyLp24k1pAPhBEJeysb0LgAeRlHWRBevlivGEEq7V3u36AAernUDWAIwLpajIzt3nkkBH4-zuAE2gZdZ18W4IcbUGi2A92t2oA9xwhIIRz0vuLpx6e3743oLUr6Xl0K1NallTCwWr64tys6SgwmEJxgufb5w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703473,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"recoveryId":"https://vault5416109f.vault.azure.net/deletedkeys/crud-rsa-key","deletedDate":1564527029,"scheduledPurgeDate":1572303029,"key":{"kid":"https://vault5416109f.vault.azure.net/keys/crud-rsa-key/db6917bdbdf14eb9ad0a236d48fe20a9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tk_5ujXBbz600xcv5YO_2aeb8t61DHk5Kqkkkd5PA3QHf4CRIkeEllZtU2kXM6cqqO7_Z7VnTm4jOF1kIfcbtWbwKj_ZZ9rEDvhJJXJj74DX-YhcJ5F1Y5dpBd4LF4Z7Pv3kNZzscwu7Ci4-JtrirU_pD69HhiEzr3k0JpVJPXdg_K9tmyVjTBnxi9fIqWSRC4nNhDFxvzHH6B7P4qaolwKGTMTdjx5QaY9hxAZJZlhYUBesAvX644ISvS9OY0iwyz9gL-yghTaSOMEKJXv8dFRBXgCDbFYRktxxkx2BpBG5tIjTAbUkLLRbEXMi1Gf1KSePTBpsoakhu8PMeN1J7w","e":"AQAB"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527028,"updated":1564527029,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '841' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:57 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '841' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:50:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5416109f.vault.azure.net + - /deletedkeys/crud-rsa-key + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_list.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_list.yaml index 51c87bd8cbb5..b32c1b43787b 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_list.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_list.yaml @@ -4,464 +4,374 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key0/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:51:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key0/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key0/c3878937d48c43329f222ec5d2b76c1e","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lJIfl9xtZMQVY21_qGFK5QXeCbwhavw_7CUAht9SAK_gIEG4AI4NIOeOi3dS0QdJTYfPUrcpySR7Bk3T87AqqBh-CKkWKIZ3nhYL6PAyycCddK4M4NWaQcwrjhi14AXZJi1qmokZIs92yvrXWy9oUh2QjatpCkL1EWtZph7UGHhWda4qU48-rL-e8BwN1LglFlR-fFTc6N_tfQHgdN0hQaM4YELOx9le2unTtPuR5acj_JTGBZwvttERTF5PBupYd3h3VbfTTecXG1EPsUelLHMRc1EaAw0q5vjwdbaLwDXfyvFEypkn8iEH_5CdYSFV0oPtwEpGi7yF4WThT6U4DQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703472,"updated":1562703472,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key0/f69e28d9f4324473b5bd0975bef0b17f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r5KgC3SObkSXF1aWoNtdHkM9ht3YC6Hte6-DtL8A7B0XnOJWBt6GThkjd9rmrYcLE0MXjs-oskYY0Iir6cyQapZ3HEOi_zlOU09e7dk1piADk838EImb46UZxbnDtoCRlMX87JMRWFmEqKvUvkLjEf64IvN7QAleRJdwFx79CJ_qRhZbvVTd7ZD8vt5PFTccwDb_wM4TQdPnanEGHQZFFmB75faNZefnNRbROMwgUkFHSJu4Ono8nW-LsmLZlQKEZO5JiI69wA8VjgsLQXi1ION_ujDuFp5ojMG7YlD8G_njTGjHvdmhIqZmJSumNlGEPB1k4B2O281-l-hBK6A3wQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527109,"updated":1564527109,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key1/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key1/b023d80926a5491abbdd63338ffc168b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tXG3Izs9RyCg-553a9N_Yz4N3H0AQEftAK4HNfmAM1JeEEci-F2ByaSeTs4R3jQYuQpJE1iY2YcQUop_ojFfy11CwUZnBR-wWYLj634VxuARoTDEFJTsWBACToK_D9IAsyphscqcmz3vBAnCkpnqd-Yc0UxBpLOBbv-RZfH-uuSm5xX33bU68h5ry1YDoxDK_3GEZg39SxjQu7j6T9nZmnfT1do_Ccny8TBAsViJJZga5SsjPAOwjSSw2-4ZIz2bvu65gWdck17IBulXTdatjpvdOOYoXudAHR3ZduDDkns6Id2gXuy4CHqwGCgKXpVaWd6C50w01JjGAFXuAS-TWw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key1/7abf970d281f4eb98e3f870688da9f89","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tkecVG8HJoW1QSh1DkZPm2op8q6Cvc6-0CpQjaobDBeJNSwbj_c-9Z8mEmIrGH-Inq89iSKvVXcvCOP7uiIkjOKFFzFpHc9ItdQqImNmDyLFlp8UBRyR8VTMxYiCq04i80www8Js1ALsp9Nup-2uVCrq-9z2pWUV8-QQO-1bgQJeUYkWHOsdv1uMkPBfLNNkFTSlSiAtHipNh2NtYi_OnkOofvrDFF4gX5ULllA4v17mZQspfeDU4llIJmEZNvTQXPLwQixX4hjBwXdH-7yGrEGPA_ZXPBl9ljkz0VjwJLZ294HEcLFfBcB66ePZ6rtRiMFZ345dGZKs4W38IMap8w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527109,"updated":1564527109,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key1/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key2/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key2/37574dac891145798031bdc16ae59c2c","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sG0yoon1QqM_RKNd0MAN2qmvjwSXCQ581sbogwBCNGcxX6CH2oRubUqVeQr4Nm__NGmjD4mikbKkkpxzaf9rd0-YCRpKRUL0ATCuhfIj8u0acP7uUPBrJXyqSsOUze0jvRCCCV9s3_QtqsLIxbID9uZuIu8xcJ5zkdYhtVWd2U9_601XWlboeWhWiTIMggsf5wj9PnTVYgM1tN4TY0AuFYjgb6FJD9MbJ92Y5bCDRH4Lpxze3bgskArHjOfZTVUjPd5_sCyi2a48Ky8u5N2uqEgv8OaNLML3JAeoSz07k7mg3hLnlDdldIgR0vdJPeW8MiwN1WkC2w35eRu4JGHXsQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key2/dcab406fd2b14132b97afa7241f0cdcd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"pnYNev0ZqxpCrih-DOzgA0RRXfCPF4fS2DmFWitUvpYR8PmqEzg23NSkh5lsFtQDj0zIcE_hrbrf91ZXbXTi10bBjO7SystNXHplIiQOXKYPx5J7od8ADLLZwJMGCY-FLc2zGUHAWHRJlB0oYSKOxXREwziT0qOyIhubwUXR2hDOxE4GuAeQCMgaU_HyHG42RVWoWis2Wgg26miJTzdfs9LLzrqbsvUfFSG5skFq5SltyHyzeLVzBjIvxKoMt-R_8RacsbUXc85sJfMBym4V4FRH7xkgQMc_3_TmRvBbO7fS-QzD6V7Mfdv8bv1y4398LYVHQMtdomjJrylohwUlpw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key2/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key3/90b5aac48baa474f9c13e295e3d593fe","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"y2AJUotY9EXCjtEq815wHGDerpkwIFgMRW-5vpt8RIhScsPc7-GK4Cog62_JwtRSduqJtEw3NWL6icZ8i-5HmRTfN-uDr7xt0iVs3sDVArc-osPBan07LTgiMPMyw_qlmwvzrdkl2LmSvipNZymHGcg-kUh7_7ZQS_ZxCAUNu9eA1zmjENAux3svJLl1ISXoVk9OwRXYeU7WdN82s8_GbkeAG6js-mazlO99z7iAM2eLKWV6rGqZgouBMfr3POBPhg895vgHDpCIX_1QQzGVwJld2mzuC81_dSDc6eTbQKEgf0Sr1-P8ywXo23DR76fYC7pzILh-LuFLnf-NbnmBpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key3/ff3f5ac04b114bcb8d398abd238d900d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"uefbUngKT-RjMND2guq1DLRxUHBjJYNnWdYWd58Y6xodyu2aup8wQysPurgdYMQiNQI58JPo-7dlVgAi__63cZ357df1SzQOGx2erne-RJ5MzmxnB3W-Dg5d_w8Fv7wwbnkoZx8QUi54geI1Gp0o9qratTjNLjnbEFBNZ74E9NiMT63Ps_KU4-2l5HAQPXoXpehFfY4buvsVLNBIno_kBqrqAh1tSPTE7OT-uidwtxdFZAxtL_abz5XSR0sLwRmdrmDvqlaGWTniAWUD_l3imisOYj1I3bhshCwKlge3BJ6m706fgP7LGrTmtIZBJYBBNBsG9BrAskWyBYFDwCLzCw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key4/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key4/897d30c8c9a64c5baf42ddc28cc323a2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"nBnwU-Tc_DQd5xt8pxaNa1jJytxCM6nXf0TLMG-K7fURjW8FuYpaUdLEkK8PXGzxrUdJVgR-9tRLjbDgYdqxa0RG4-jHy6Rwbm3XO7gUUoQrQzlDot7HBEvrjldOKfu-evN510V-ZrH1ABJ717cm2CPtmhyW7WQ_jGxmvFq-sWwhWOUfC6UpV7AnYyBkq_fAn9vnbPRH7dXoMf1G5lCtJ5uoAlt8ys9Vr6Bq1tkf3U2JW9-SnWwfb51dZjbRkKCVuqIVm90Ik7qnUoV-r32Ehdo1t-VbKpiTfyOdhxclV8fbgCQ2NO0P1oWoC6wDEs8ut_JaX-1V6NuiocpvmSt4Tw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key4/1783678540a949af87bb325dc25ca8a7","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"td-f0a_KPz3Koohs9dhl2kZuH9ZJa9xXhZrugBZBsOrTb6TbJuP1YcPSaKpseA_edeR-jT0gdm503PcKMskF5KQCtr5v90zOnpYWafJ_8Q16m7h9DjfChFkDxxIVvi68YMYwT-R0eL2Cr-9j5rotjqPp2wPBRFQ8hcH2FY4aJMvZ5CqTCI9Ci_S0DB26G2IbianCAYhn7_KHvZCnOFaP42UpqS5DDMnq1KJtIjImuAhOsmHtm6RvjUR9MPD4B9LxydnP0lzBhkzPXo9vnR8NeJjhGgALFyDB-09w7XzcroPDtq1--SmUpF9GqiXBoJnOa7TlQnCc7dphqGCTnPJtqQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key4/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key5/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key5/689d4f8f09004d8aab516b94aca67d00","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"67VK0tZg5Ui7KAtcdVy4I4Y-IHca4jl966D8DWcj8ZEovCAGIWlQvFSlVRvFeEqrmoVD3zSeO5yXOQwKRzDI3rrKmc2a4b_so2cuCqxtP6OuMbiCzTS5vV57UpkqIDuN1IuyKjFnS9T_ZLAQE9y_4SLRXM9vUzzC0tCaOR924WJ-mEIfKtUlab6IytrcUHLdJi5kkO-882I-HptJfjzoyGAvHTmJIDuQWgMuMAkQP1-5ZG8V3pEinuj8FtLKcfmI8RGixEEAvTxO5FAre1aEeta2EdbsdIVTi85xXOcPu5LrWdo0URY400ytWN5yQvSDsCOEqO5Apdhk5elgl6trTw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key5/4ff953ee148d4cd8816f3dfbcade0691","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1ApBVUvnMDvdH_yGJfdTzMZmtwLm2k7tg_2IVywj5ZvxxTiZ5aTTCiwuVXjXzqMdGAcj3hmrAC7m0kr8gLSAXye5Tq-5oofu-48jZ91SzY9bWfi5Ss1NpaWTJ0RIe7bEvcjdYQprz1A5FIr_B7IaHYdhbkXz3qzf96gLq8elRBeSDev1NC4bFz0CkWKOeXZF3vTOsHo38q9Ne9XZMW_hEb0ln4ZCADsVV20pLZ4IZmsRIUuwwEaSAkaPzpJYOsGc3Oh_qRXr-hMRkdZv7dPYsZ1LfdeuIb9slHgBEza5OBb9NGOhNFMfk3Kyiez4rHdlk3JF7fPIvkt9St-7lnHJbQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527111,"updated":1564527111,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key5/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultb4dd0c0a.vault.azure.net/keys/key6/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key6/a1f7acfaafc34a6495a429c6aed2eadf","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"l0gxdJyCn-voQuNg_2bqrlOXgnQStVxXHDYdvBdOlZpoq2BzzvvC73MoPcldBuI5ySRiF8B1nx82yXQKnEabXpXWvvl70Ye36l7YrDrg_Dhq38MU4Uv7i_rdqdBQPG4tr6cBz0BWR5yHqGy4LL7dcWhLtyUH3-wbC74zj2KqjCGIx3AfadEwkR8HIjCGmLhbtaUbCEU5PoHrIfLOFt1u4Ah2NripLqv54n75PeJSXaRffSzQJOU6qC4eOnHcEbP85w9SsnSlOZp4gvjqN9JvwWaoy7E20anft6zt7tjFLG_inkASqUU8QcrN9SwBkV_saE4WAWcd31-6dBpeGY9Jww","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key6/3863898fb4ea4c8ca57c47785d614ba5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"x3Hyl5Sqttjt1gg_OK1g1ghjqGiDUrUpKkq5k7hiBs9KkYK5sSvKQCalGHWStOE2YUB5tt056_PYbXIG3KO_z58BNXy3yneEiqZxAWyPKDyvQcuyPj_zqXdDDMVuBe1mrIXTU5kgyQ3JgWB69PE6ALtAY6BnFz5vx97yLdgnebHzv486Ti23VdusiDagnLkY8_chGtcZZ-9VE8OSOrNH1zk46wxDP7gERk2O64nT_EKViMBn9vWTJs093v7SIrWrJKUXL8RGMPW5jJ1uCgdBDOPz5pWz1Wl6VLcqHfUsVjgKrU9QffxugIMeFpx9vSFUOVeKiI__iRHUTE0Y_T35Ow","e":"AQAB"},"attributes":{"enabled":true,"created":1564527111,"updated":1564527111,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '640' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '640' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys/key6/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb4dd0c0a.vault.azure.net/keys?api-version=7.0&maxresults=7 + uri: https://vaultb4dd0c0a.vault.azure.net/keys?maxresults=7&api-version=7.0 response: body: - string: '{"value":[{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key0","attributes":{"enabled":true,"created":1562703472,"updated":1562703472,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key1","attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key2","attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key3","attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key4","attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key5","attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key6","attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}],"nextLink":null}' + string: '{"value":[{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key0","attributes":{"enabled":true,"created":1564527109,"updated":1564527109,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key1","attributes":{"enabled":true,"created":1564527109,"updated":1564527109,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key2","attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key3","attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key4","attributes":{"enabled":true,"created":1564527110,"updated":1564527110,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key5","attributes":{"enabled":true,"created":1564527111,"updated":1564527111,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultb4dd0c0a.vault.azure.net/keys/key6","attributes":{"enabled":true,"created":1564527111,"updated":1564527111,"recoveryLevel":"Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '1133' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '1133' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:51:51 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb4dd0c0a.vault.azure.net + - /keys + - maxresults=7&api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_wrap_and_unwrap.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_wrap_and_unwrap.yaml index f4b7259e3499..d8b5e54d09b3 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_wrap_and_unwrap.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_wrap_and_unwrap.yaml @@ -4,312 +4,252 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"ny6wNPsxof_QVouEvyn1dKEiKG8hArgSRJzUhtQKuA9A5Nij2CxUdqgezqmm4CAqyj9sBuQqIHI_BO1RKq7Jea1BzfbWmce40hhPqa1RLDG8Kb_LrYRz3GavBXCl9QR_lzn5DQYawzLCQFKvt4lXOJVhSOAiGmAayV2axTNxCM---8pwfztqf6g4dc7cUEIiLc0ZtnzcqwmgBuLu2ysrEkVRvhRY517fp5M17OLQDmIx75f9y2Nc8t_w4ZsWhIZKiUJBDfNKcBxN08Nljnowhc2CwemQ5aZLQCPZiibsOMVIi9FufjBOTBxnD2MSoaGrIuEDrLv1Y1UEK1wHE_MFuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"kUy_5eJ-0LXYETECBi2NIkf184IoLXhY30v3XFmJYSyy4roFaUr-0CQNtZ-Rztee5M1LNJpROZ4uSZjSZgabLj-IGpO27NLc8_jw1tR956bLlphc2D4jPPq9AXEDotXGAjAop8FXUCyDYmAStaEu0VZWK66S9N1mFTRG46aiy4F4sj_68ZeMQDlbzrR6aH7zq-1FEuSiQGAVMkMGS4CCoXAWm68WexBui0_CgJbcd5z-050qEBkGVvWXYkAA_uko9hsQNNCCh7-pGW4hwavS-T8s2g95UOiYlDSJwzLUqSfw_mNWjr490gtP76OaHyT3DB5JGGeHFWLsGdJhW10rvQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527149,"updated":1564527149,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096/create + - api-version=7.0 + - '' - request: body: '{"alg": "RSA-OAEP", "value": "NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '299' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/wrapkey?api-version=7.0 response: body: - string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db","value":"IQvJgnnmWgtVoYpCoo_iIDfVfgYpJSe6IA-XUdpXgkQYwjzvvtQANNJtDQY3jhbWiMV71oy6uVFmDD9ey5erJrEJHpKMEivQ0FZ6H566SFd8srhiV_x3trpoFxvXgOe6osF7YCzS-DMP7GHYVRRIDf-VldIbldpS-OL7jn6ZW3SSdmKrTfHEpOyXK_78c91VVpDbf0j8QCaj_bzNWs1Xtpgxut1f0V-Yof2fX2nh7DGauR0Vk1ryopjyciU3YAozxT7CSTPalCr-EPqY48RvCCEIMf1htLaTq20mCUHVinVOSpE-cEzF2WUdmMzZXa6zvb1Ls59lO8ZhKHUSFSuVjg"}' + string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b","value":"RC2-jG4FsccE0rV8izEDzvoxLovaDxdMek6YJHMW3MOvTy3LSm9FihBTo-XLZz4pdS7XZ7VvHVNpEbcKXRuSeCyViVt6Umv_7XOx9TkMUmmhFxgsBcPY52K4r_4W6LyYWpG6y3yN07Mj9u8HHWuf-2H-SOPykAEFd6xWteMFtGSU-RKLXHI0Xb-YdixlxUU4twfcp3uDuRMgs0NT3d4VZVi8o44YCPtMiVG1NplWKepWkTb4l_rphclayQ062Ln5o-1fWAIUhnyfYY4HzHdFh75ELkkQGi8ZeI6-rL6o-WtQrsSAyBLpS3ioytuaPazyTHeAMN69YVUJz01cc9IETg"}' headers: - cache-control: - - no-cache - content-length: - - '454' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '454' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096//wrapkey + - api-version=7.0 + - '' - request: - body: '{"alg": "RSA-OAEP", "value": "IQvJgnnmWgtVoYpCoo_iIDfVfgYpJSe6IA-XUdpXgkQYwjzvvtQANNJtDQY3jhbWiMV71oy6uVFmDD9ey5erJrEJHpKMEivQ0FZ6H566SFd8srhiV_x3trpoFxvXgOe6osF7YCzS-DMP7GHYVRRIDf-VldIbldpS-OL7jn6ZW3SSdmKrTfHEpOyXK_78c91VVpDbf0j8QCaj_bzNWs1Xtpgxut1f0V-Yof2fX2nh7DGauR0Vk1ryopjyciU3YAozxT7CSTPalCr-EPqY48RvCCEIMf1htLaTq20mCUHVinVOSpE-cEzF2WUdmMzZXa6zvb1Ls59lO8ZhKHUSFSuVjg"}' + body: '{"alg": "RSA-OAEP", "value": "RC2-jG4FsccE0rV8izEDzvoxLovaDxdMek6YJHMW3MOvTy3LSm9FihBTo-XLZz4pdS7XZ7VvHVNpEbcKXRuSeCyViVt6Umv_7XOx9TkMUmmhFxgsBcPY52K4r_4W6LyYWpG6y3yN07Mj9u8HHWuf-2H-SOPykAEFd6xWteMFtGSU-RKLXHI0Xb-YdixlxUU4twfcp3uDuRMgs0NT3d4VZVi8o44YCPtMiVG1NplWKepWkTb4l_rphclayQ062Ln5o-1fWAIUhnyfYY4HzHdFh75ELkkQGi8ZeI6-rL6o-WtQrsSAyBLpS3ioytuaPazyTHeAMN69YVUJz01cc9IETg"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '374' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/unwrapkey?api-version=7.0 response: body: - string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db","value":"NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' + string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b","value":"NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' headers: - cache-control: - - no-cache - content-length: - - '379' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '379' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096//unwrapkey + - api-version=7.0 + - '' - request: body: '{"alg": "RSA-OAEP", "value": "NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '299' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db/wrapkey?api-version=7.0 + uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b/wrapkey?api-version=7.0 response: body: - string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db","value":"Vxzu0xm5GG276Yj9qMpc_EBbTPPlv0wuH43zSp75370UohLnX-QimTYjncIpJtcFaXDmJb2_USJUbt5GBHaBpy8MAdQWwskj4eUWLtK3b53CO3lg8aoFETRbNQqAoTp3tqihmMFhNTxTXcm5bU7e3s0VdzQ8U8_J6vAmipB6IGe-T7xDWO288DoZbubPlSylnuUu5rdfZSpzoQ-UxD77uyqpS7ll0_SpOJ8DrcrsesaCDkVDuzcCDQ5lfvh7ptdJf68faiSGIJQ_0LW7jUwv4aJzN5xf9TD27WEg9XCe6grH5x6GA38E8Yc5CsCbMlAjD_dTUyjOAFqaYUV5QdMJvw"}' + string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b","value":"X768DS_JoGXi8mHl_PTmWnjSOkA5qvrlDQzvebrWTCBgHQiMuRXsyFqpS3urvodJcpatIjfqbGPaG-50d5J-BlUtvevA8a5vFVNjrmjqN1jR4PHvIEnA3Y4m940Mq0Z4-ESgCIMw12trkZfN3U0j3X9HggJNJkolepRCcF7wnn0CoK7Yqt3rMSR6aMg-gMJINApJ22jhlRz8omsI--bJEXjObz-cR041NMY8bxIm_R5s6Hxi9XId-jAMpedmuQchhliOSlIqbs0jidn-5wUCpCTKOao5lVXVN2kqmsvICWxLj15HwcRuCoi_2ciMRjcCnhrqHcQEUH-L-jKrkoI79w"}' headers: - cache-control: - - no-cache - content-length: - - '454' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '454' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b/wrapkey + - api-version=7.0 + - '' - request: - body: '{"alg": "RSA-OAEP", "value": "Vxzu0xm5GG276Yj9qMpc_EBbTPPlv0wuH43zSp75370UohLnX-QimTYjncIpJtcFaXDmJb2_USJUbt5GBHaBpy8MAdQWwskj4eUWLtK3b53CO3lg8aoFETRbNQqAoTp3tqihmMFhNTxTXcm5bU7e3s0VdzQ8U8_J6vAmipB6IGe-T7xDWO288DoZbubPlSylnuUu5rdfZSpzoQ-UxD77uyqpS7ll0_SpOJ8DrcrsesaCDkVDuzcCDQ5lfvh7ptdJf68faiSGIJQ_0LW7jUwv4aJzN5xf9TD27WEg9XCe6grH5x6GA38E8Yc5CsCbMlAjD_dTUyjOAFqaYUV5QdMJvw"}' + body: '{"alg": "RSA-OAEP", "value": "X768DS_JoGXi8mHl_PTmWnjSOkA5qvrlDQzvebrWTCBgHQiMuRXsyFqpS3urvodJcpatIjfqbGPaG-50d5J-BlUtvevA8a5vFVNjrmjqN1jR4PHvIEnA3Y4m940Mq0Z4-ESgCIMw12trkZfN3U0j3X9HggJNJkolepRCcF7wnn0CoK7Yqt3rMSR6aMg-gMJINApJ22jhlRz8omsI--bJEXjObz-cR041NMY8bxIm_R5s6Hxi9XId-jAMpedmuQchhliOSlIqbs0jidn-5wUCpCTKOao5lVXVN2kqmsvICWxLj15HwcRuCoi_2ciMRjcCnhrqHcQEUH-L-jKrkoI79w"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '374' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db/unwrapkey?api-version=7.0 + uri: https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b/unwrapkey?api-version=7.0 response: body: - string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/129fddeaefa2431a9c5bcfecfcd365db","value":"NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' + string: '{"kid":"https://vault54211096.vault.azure.net/keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b","value":"NTA2M2U2YWFhODQ1ZjE1MDIwMDU0Nzk0NGZkMTk5Njc5Yzk4ZWQ2Zjk5ZGEwYTBiMmRhZmVhZjFmNDY4NDQ5NmZkNTMyYzFjMjI5OTY4Y2I5ZGVlNDQ5NTdmY2VmN2NjZWY1OWNlZGEwYjM2MmU1NmJjZDc4ZmQzZmFlZTU3ODFjNjIzYzBiYjIyYjM1YmVhYmRlMDY2NGZkMzBlMGU4MjRhYmEzZGQxYjBhZmZmYzRhM2Q5NTVlZGUyMGNmNmE4NTRkNTJjZmQ"}' headers: - cache-control: - - no-cache - content-length: - - '379' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '379' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:52:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault54211096.vault.azure.net + - /keys/keywrap54211096/aa31dbf50b6a44ba8d6cd12fdea9607b/unwrapkey + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_deleted_keys.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_deleted_keys.yaml index 235cb77d07bd..c59b3ce7c6e0 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_deleted_keys.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_deleted_keys.yaml @@ -4,706 +4,678 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:53:13 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/a724cd7584454a3cbe29f3a05d7eef10","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"nC7idSUXK32dkqtn8M-4UB3JoMvCGygFa1TlYH0nQQUvYGn7aNp5t1vtJFqq2Jlafl5pZhdHTumt-R-Plewno2zO3iyjza1MOTdeK8FJEHPpK7I7FNH01KdYnU5Q0xY95L8tbXUcQAYW7ankxMIeKxqrokt7flCGUQeXDwOalJIyQyFvdUe4buytdGHTMFV7lgHIQx4mvekZi3yzuWgyDiuohRd8Krb0lo6suUYOIetzbcXMWqrSRmQdEO_vvptApgSOwxPrqx7OkcNsrcgJkrXQzd6xjgho57GQ6u_TxmGB7uW3LBTKnwqgWOfmELKVCH5laRfjmZk2S-Fwc1tXyQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/f96ace71d4b941eca3ae0490e503d288","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"28DloB07w40yR2-_MHpdg-prfQ_xseRn-d10ZMoZg5jZaU1prixa2ZCWOtLXPVMsFU-fNOb4QtZJ3fJbJTVU-h-tPzKsixRwVljpiAwLw2wlRExZWUbQETs6Rd8B4q_GKJZpiHzO2-NLk61PJJyLoQ1iKA0SOIAtZMROAHx5CHuEc6wsuIsGEDpwdjncXH6-REvllgkOQ_SpfeiERvMlaAoFPceg4bi6SVE47xDGl0J1yEAaXiCba49o_jhO4SQ2fh2nYR-2sN5ZlgYFFVyPfp1PyvzL-NQLNp5KXwuQQY0-GNsXz-PWZMGstAqSRWjR76vWx5-lB0ohA7JwM_VCuw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527194,"updated":1564527194,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:14 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/4c4f6f8faf7b48a7bef7972fb705379d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"k8Ow-6LTG9ELTNRnQC3MqQncYGqmUY-6EgNnX1Ed5Q_SM8hJUl7dBtb8gVn0qc3KFy6Q32gBgveziuCaEaMK_wN48RCLmRLCuFsXmnHsHDdxMzEv2YL_dV0RrpcW0O0m-bgAt6z5aOOY4Pwa5EOBTyqNS5H56Rp9mm7MQijt1mcWRwOUHIRteZWpjQ2DPoSu20bufIldM97wdC7dZd38q5NFDY9W7TCNLTD__MEl-ySmkVRIEPaMpcObNtRPiB6kadylcgBsoAAR871Wzb1tdRiQkpyEko5of_9iAdZEbUY0XiG_zJpdFxfvy9rds3fXfXhSppolt-CC20IHfyjEqQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/dca838942cc249aba2f9d052ee4d9bd0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2azn8ADVPwbppZCfxsCvr_XKqCeA49ZRxxyuIUC-_Cue-13fIKGkHqFqbJVdJuPftJxsh1MmrUVcfUGMPsTFdUBCVfpuiFXEXSe9exEudUAZNmBYb3HiCbbu3ThWw2Z5-OioKDwf-qKA_H_vooI9YP-yYEDhJcfvjsiyxzBNGoLBld6yiPi3PhCw9kqvEHUYnS-XPgTqhJChf7g4oYRT-XMVPhR8nkbQ-NQ_IQjjZzxkhkpltWfEYX_KL0-Uy4x3kz2ykPtQXRpeZuaD2PpuRXIt5ssqTC4segtWiyzCKhp4H9A8pVbJKd_9fnSArsfNQXY0e5bJac6ZhJJd_ES2XQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:14 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/5c71fbc7997e4fe2b2aff141a6886d11","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"nPBVYE_5WfYi6r0Z_rnhhYuBQe_qy67NeGm6dAJCSFT_4Mc2iitb5cJmEJO_0cUxMaiSWatpHzGYTzQ_c51yKjpW0CNX08FZi4ZO0JsZVUnUUL8gYjEK9VNNaeSJPvrNMHPsp-ee1TieBpdB-emZanoRtKVlotJ35-B5KYcs2BIv6KG81LI_F-ZFleqBAlR0u6ty1cggkEgz7OsKjIePcfG0wIdttqyzlKoYOVPTx6wWfHHZDcseTPWpikGUaSTi8GWL9HJ_BugI16JEW9WIALoWOlflQ7884UoH2S7WZ0wQ97MT0NbwdkwgcowiKzD6li0euweojvu2D8WYk1M-VQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/f50f900706a24363be08c408cd3d8908","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"oMEeM4hmofM8AW7C67c_Jubcu1t9yh3uDLGSQP8cowwyKh3IVtLgyruzGwLoXF8B9gJZaj39iaKhMdPzc8metT1746Ub3vFiIGGXDBJ_R8EXPxSjSFvOn43QwRBQhEmfsqqnjIqHvj-e_IXyLtUMFj8HteNPbfpzAdlKsXAZhNd1l9INIekQZKfuOLRdB2SIMC6saG_gkQcL5y80lDozJCOQEhHfRdvVg5H1HDa994SPwGZqygKS-JTwYvNDyjFR2HMpAYK1d-2PHCLAMD-n-b_FRcg8EPU6g8DtEBqWpXSlFmTmBDA9hs9bVUZgbPMOIg0edSHPj4n4oxcupmsw9Q","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:14 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/ae0bb0500b5a4899873962cedbd62ef3","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1XLrHrA2xR35sNHz7Bl23TuCTwcdOO8aY891NJLUnxQUvPxj90vLf9iQA7Kd_J9-XxU3ImXY-qp0kOb7qJPeRI2MydpRxbpipmmU1aMjDhHReaY-4eiEt1Wq4H1i73qE62VnQMY04pSkweNqcG5GANlpuBKqmaFvi6uLeK0b38ioK5leJsZ-bQyVveNa23hxZ7bAt3WlMe1-eoh0S5yITRFIlq3GDieFC546e2oL0H-TJOPsdZ6aUiF9Ff2D9mMtw1V44ulaZHs9wyQXPPcukY495_yBPq7W6NvEq4C7FJgYroBRNw1wg7y_iFQ8cvf3vTfK2m8ofwtoaeePWC75lw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703473,"updated":1562703473,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/7b75b1c578a94a1a814f889d2edfa79e","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vm4vIl0Qd7O-kBaGB5xZUi-1s6PjVoiOOrA1vJC3jCYDb2YB-xO5Okibq_rrmeqKCGqA1BvjAYU5koHNuI81HwYLVnSuaH05xxX4h2_tDpupmHNMyvaixEAFldoS_rY6LXu0sjU-NiTxug8qesZSk2D6Y8dtblv87MxPbz11Asc-IjhseHzkn6U8HfPx4Z0IVRtKtC83Qa_fE5PvFXE-vgzDCKbJcpQKvk_ykByxZGyYn9etCJntKuPCob1w5MnFoWbIAvLmkd_xXr1c75jhRT1Wio6eKPUYk3oj13kn0Wci5t_MYz7PeAUVlLXgx38hxU6rlkAKI5_c_mEaLF4mpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/22e7a0ac26f541309d942aae55f56069","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"i3dwC_iG7Pnosa0C-7DGNoZ1mnH-wWPwXdYDPUr0Tl4ZQna3klAnLRO-yVO4zeB3t3kgVmQ3nYSw-M4HYM4FA-_BcbddPqcelUSWgD5LMH4SKW0sQyKPfeUWqgQQq1Q2K4LO55nLjPzu87FOdGT-fJ1hNCqCOWb6WMio6fIAA7Aw91ZfgDt1_icif_c7OzIyskD657ryxPn45P2t3z-XRUmYVg2Xt4WLSlqc-jScZtGYGNwq82E-t2IviQplaBvLB4sNtCRYzqu5NChFYUXEhZal87Q0kWTq6xZa9D-82OmwCk9WnHCia_XDf8zPNcQQsvMisoD-bDbipGZIHjLrPw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/57fccb90503944cf8c8cb4f5ff94cf96","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1FfP070rHhDf3XumOs1t9fiXrXnYxt4mj1JQaz73YveKVuUGZ8MhY05So7SZlTnCaYGjY0p_pyMJK5hMRQX_gSUXFdKsB3HJZdxcEEnsgkXoLHI4tpGfGjznjj-Ky0G4rV6hQjlsIf6n4nxRCiPG4CjJw7nWlBJn4eDw1HSwEFtKcMHIW0p79rrHhuHGMYRbGWAMYgVTkGypsH45e6PyVXE5ueEERzJKA0f4S9LioIsp5LEleThm_E4CE9azlnYvl2WbKeensPKnYVlw_30gIDGsd719UJizsYxyn0Z6q-6ki7Ws4RWrWmZRaZii1c3CdhIpT8h504_DB-4DECqKSw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/39f5c626c2234116b55e89a302e37cd0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tIN4UcaySsLj1sY6wvLbFT2WCKGqf-VtnzBfNcnTNqGe0dZbX8fE4LJmPF7--uy3zN3zucHJS9TptQJuyHUI8Opb9dTnA_O7BpECmCLxdpEucmhdpX_Jn4rSZ_B2Gd6ssBO03QjwqUEiNWiIdeASyx7sCy1AazekV6jPIyiAiZH9aW9KtPp0x-hHCEnoiCTo_vsX7L0q6ZIxA1ro6pLEt6HhTFRQN3MpFU-rMMHgyqDhbgquOUzTmWaUMtMJhRvH2Fyfyd07Q3BnguhZMulT7uOWGbF3uorMcVq-TMxi3XA97ri3BQzAgDwfXxLpWxWu3cstSJwsdjs6hp-QkIFAMQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/e8ff437f48034bc08401754943403333","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"iW4vfWb9owDVk2P5GGu4qfMbIrRhcQUenHS6BRkAQPhqrDQ-8FuHO27r-fliHlm7bGNRlBgD7dMtPBrsAPdGHS21MX4T5Yo8YjQvYwGkqiMHlDeGiWqrEKZhj7yOWvqJXtCJkgCYLoswMgy6nIz3Ptj3yKhQ6nzb4djeVgNnaatxgas-QUbhLobplHq94AoxlJDqIBvBqLv2C4AR9XqtxS0mOFu_BM4eCNq_-ALK3hMpdYGfxpoDCRiWAsC8s1iHsv5DjeKF44Gmoexw7A081shyar5HW067ttOyMz_iI3lj9Dxo8n2g5o8HSQgz7ysPDR_QcxEY-rxsUhDdxwFUqw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/38ddd3f6f70d422a8aad4175d9d01acd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"rPb0on1WhFWeJd5-woJsOTbLA9Y_lFO9Mw0NtXGQ0gzwkpcvm8pSNDrudla-Dw_jKu_Yh35fL3AnsVzvttcsyNu4BrJ5lG_Nd2ApgAOtT2NqRgScCkCXheeKPtxeht7ambqKcbk7C6NBDa81zd1jqVnVojucsVAY1jkYKjw8r3WQQ53zAt2oMO4XCkEi-jQgIL4QwfY_eBfWiMZDzcYz8u8BlC07QLBHkT200YfIVDSjoKLf4pOx1hCWvzA27ndkemgt0thlL84EjLp5PE0chNtZCuLK2ojKkcSU21kZ3GV7NptS_IwyjkEvO3j9YKshOXzwFzIeMsyHMnQ5BsyRCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/2fa84ef9423a4cb5b286ca7bf77cfd02","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qInaUwEM6ZQAcb_Hk5d5rUP-DannLP_iAToOZeoUFgDi_dQBjwL5z0KMO2OBXUPgTh1ms_ePW0fvjRD7xyS-ZQ1aftrIX3pK_1OdnOpO5dDgFDOAEW9LCTz31RCCyMS9FMkjjbQ1iwX1ydEpM8eCw5_MrXhGL5FrPuorIq_GHpTbyV-ars_u1oJfdsUHOaD7riBizEk4sGld58EBoOHiH3HRojQ86E7WoXMUnX5KBX6CLggP9_SlVg2nnLPjDKWPddTPPpBmelCy9VF5g7T7UV3BtMymC-2XFZuPHOq8VjAjzZOn2Ant3IWotwRnokM1axlRqKa9rNGdEJvit6JB2w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '659' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '659' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1562703474,"scheduledPurgeDate":1570479474,"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/38ddd3f6f70d422a8aad4175d9d01acd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"rPb0on1WhFWeJd5-woJsOTbLA9Y_lFO9Mw0NtXGQ0gzwkpcvm8pSNDrudla-Dw_jKu_Yh35fL3AnsVzvttcsyNu4BrJ5lG_Nd2ApgAOtT2NqRgScCkCXheeKPtxeht7ambqKcbk7C6NBDa81zd1jqVnVojucsVAY1jkYKjw8r3WQQ53zAt2oMO4XCkEi-jQgIL4QwfY_eBfWiMZDzcYz8u8BlC07QLBHkT200YfIVDSjoKLf4pOx1hCWvzA27ndkemgt0thlL84EjLp5PE0chNtZCuLK2ojKkcSU21kZ3GV7NptS_IwyjkEvO3j9YKshOXzwFzIeMsyHMnQ5BsyRCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1564527196,"scheduledPurgeDate":1572303196,"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/2fa84ef9423a4cb5b286ca7bf77cfd02","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qInaUwEM6ZQAcb_Hk5d5rUP-DannLP_iAToOZeoUFgDi_dQBjwL5z0KMO2OBXUPgTh1ms_ePW0fvjRD7xyS-ZQ1aftrIX3pK_1OdnOpO5dDgFDOAEW9LCTz31RCCyMS9FMkjjbQ1iwX1ydEpM8eCw5_MrXhGL5FrPuorIq_GHpTbyV-ars_u1oJfdsUHOaD7riBizEk4sGld58EBoOHiH3HRojQ86E7WoXMUnX5KBX6CLggP9_SlVg2nnLPjDKWPddTPPpBmelCy9VF5g7T7UV3BtMymC-2XFZuPHOq8VjAjzZOn2Ant3IWotwRnokM1axlRqKa9rNGdEJvit6JB2w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '793' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '793' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /keys/sec32f70fb3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: sec32f70fb3"}}' headers: - cache-control: - - no-cache - content-length: - - '79' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '79' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: sec32f70fb3"}}' headers: - cache-control: - - no-cache - content-length: - - '79' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:57 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '79' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1562703474,"scheduledPurgeDate":1570479474,"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/38ddd3f6f70d422a8aad4175d9d01acd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"rPb0on1WhFWeJd5-woJsOTbLA9Y_lFO9Mw0NtXGQ0gzwkpcvm8pSNDrudla-Dw_jKu_Yh35fL3AnsVzvttcsyNu4BrJ5lG_Nd2ApgAOtT2NqRgScCkCXheeKPtxeht7ambqKcbk7C6NBDa81zd1jqVnVojucsVAY1jkYKjw8r3WQQ53zAt2oMO4XCkEi-jQgIL4QwfY_eBfWiMZDzcYz8u8BlC07QLBHkT200YfIVDSjoKLf4pOx1hCWvzA27ndkemgt0thlL84EjLp5PE0chNtZCuLK2ojKkcSU21kZ3GV7NptS_IwyjkEvO3j9YKshOXzwFzIeMsyHMnQ5BsyRCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: sec32f70fb3"}}' headers: - cache-control: - - no-cache - content-length: - - '793' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '79' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:21 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: sec32f70fb3"}}' + headers: + cache-control: no-cache + content-length: '79' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: sec32f70fb3"}}' + headers: + cache-control: no-cache + content-length: '79' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3?api-version=7.0 + response: + body: + string: '{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1564527196,"scheduledPurgeDate":1572303196,"key":{"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3/2fa84ef9423a4cb5b286ca7bf77cfd02","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qInaUwEM6ZQAcb_Hk5d5rUP-DannLP_iAToOZeoUFgDi_dQBjwL5z0KMO2OBXUPgTh1ms_ePW0fvjRD7xyS-ZQ1aftrIX3pK_1OdnOpO5dDgFDOAEW9LCTz31RCCyMS9FMkjjbQ1iwX1ydEpM8eCw5_MrXhGL5FrPuorIq_GHpTbyV-ars_u1oJfdsUHOaD7riBizEk4sGld58EBoOHiH3HRojQ86E7WoXMUnX5KBX6CLggP9_SlVg2nnLPjDKWPddTPPpBmelCy9VF5g7T7UV3BtMymC-2XFZuPHOq8VjAjzZOn2Ant3IWotwRnokM1axlRqKa9rNGdEJvit6JB2w","e":"AQAB"},"attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '793' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys/sec32f70fb3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault32f70fb3.vault.azure.net/deletedkeys?api-version=7.0 response: body: - string: '{"value":[{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1562703474,"scheduledPurgeDate":1570479474,"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3","attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + string: '{"value":[{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1564527196,"scheduledPurgeDate":1572303196,"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3","attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '338' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '338' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault32f70fb3.vault.azure.net/deletedkeys?api-version=7.0 response: body: - string: '{"value":[{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1562703474,"scheduledPurgeDate":1570479474,"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3","attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + string: '{"value":[{"recoveryId":"https://vault32f70fb3.vault.azure.net/deletedkeys/sec32f70fb3","deletedDate":1564527196,"scheduledPurgeDate":1572303196,"kid":"https://vault32f70fb3.vault.azure.net/keys/sec32f70fb3","attributes":{"enabled":true,"created":1564527195,"updated":1564527195,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '338' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '338' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:53:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f70fb3.vault.azure.net + - /deletedkeys + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_versions.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_versions.yaml index 506c1eec8c5b..8fc2e743bbf5 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_versions.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_list_versions.yaml @@ -4,464 +4,374 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:54:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/786f33cf86024134b1795f24b3f0f955","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"7koFGg8HikMmRoD_jMkk75c8jcJPc16nIpU3e3HxM8svQlFT3nM3gV2WCmkuydO98UYQIeHvm7mPNAAIpIZtnYHnDdT-YNZt4o4VEsUQvd-caLXLWaNaUkZDycCC3NLnOltKVoKNIcZz1AstY5I4o-4OYvYkTp1YeXBsHAzafCClwGbUF9bXx0N8InLGsUzNnU38Pi-RiBZQDyloHJ6x6_n5vhu2gBQUgfyCCwnknQDJD6Gw0DG0JM0lNKN3NhtMRgsuJSd0BXvty6pVN1TFvS320eNSlHIBX--hdN5U1ByKuy8MWIzSNyeF18nyW_ThlJCb-M3W4NgQN3B9hWm76w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/6c0645bada774c53829be1e9d92b8033","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1Cae7MgCaUb8l3cPvfpb97X4idEo2n6G3duPbBtVrarFg_hxNMrcRCeRhURHqZSc8vMnXnAoGWI43WWOJxm9ZCsTJ4h3KOHKv3t6BSB-cI28UNvTolGeVcs6SPfaj6ZinqkS9FNIvUQd7hanoXDq3l8qurjD1HKP8nYvnny0g8V3v_lcuIrexQbp1E3o0V3XX9eaFTD_NMNN28bELyRSM9dqnFTnelqrw4PBkaPfZ7hcUyCVHki6DCIAceuaneCwwZnOQyDYNsFdaEK8ahdorMrSQ5Z00ZYT3gWMgFjEP5mRzTOya6uMw-8Tqy5DDRf-ajTydYamzXjYzSoY00uapw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527265,"updated":1564527265,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/c2b39ea5f3ee4c1181284d3109f4f66e","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"96s63BcHVYpDmfb9hVIqsWAovKP2CaBMRrOSzB4LNxD7iVCEBubsoFoc37_CqK5dhcNIRV8Z6GQoP2gDjP317V_ToJxPk6dqhSymhQGvIT6PvTaIovmzQUgl9CCn8rRC366kcZofyB4FOZVjs2UJe30EjqdyZOBraXsWWa6DCBM7uuRTXHorOcA464mz4RFSHgyoaEhQrtTwGUBUEK_4zXSnrUO7_k4tLjCgZhvNIRaC2pBQ5XY4n-jCSRw2R-5BbjSvqoVYzQ_P-6iZs2Krj9VWNzAdWTHXDr-vS5isShwo2FODdiygabZMnwtJRUv-N_QicsXe4QRii0DHPFFtLw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/f68bb459f88048a28511a6bc9546c4f4","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"pv95cZnMAvrZ6RYvddRwe9Mh46LsolgFNHT0S_NFIL-Lk_HQkpR90iRR3hMhv8zucL8bFDo-JFVktFG1mf4kYXIwSNELfHQW5STjRzZePeE9waRtXRtvm9pwifGCS5lD8xq3zm5BMtRYJlNlrymLVbCK9U9bzB7aSi-ByTUd7SaFCFV7mHNrSaNjonLZWtWMcEh76P8DZC0GBO4cxG0XyLXd51fDNnwBd0DlXFPXUHlQ3d2TGHtd7aQCCsO3iOfdmoOJNv6RjsHR67ZUsHHE1sBm1rOoMHNUUTWSoEhYi9WeAWcahijZfcABjoXmNHyPmByDVNmxrNwgSbMlKOjzww","e":"AQAB"},"attributes":{"enabled":true,"created":1564527265,"updated":1564527265,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/8bf922cf4b0640ad8fbe53288acbcbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vkJZ9m9QRSVxUOx1X1Ag2MVp3Hnl9Fs3tQ5VXXMm7d-KxntbQH2xr5KHZe3YmUK1ZHHOH_TWjneoQS0fGwkarA0GAzhGr8O_SpDDQ8l5KttNe4niAYuxRT9_5-DTOzkMAuTKyJPJS0RblaPWxo9lQLpvQLdLPD5HyQBRlz0N4g2wi5Rcdu5rqKPBFBWnNRz-CfpEPA7ov_vec5bEATmqIphxAPasKuxGGyJ4ceLWM4dnQlxsgLjI_QE4r1UoLucZPkK8_lV9W76uh28SLY4Ve-wwyq8anPYT5oOLXWrWhqrxxCHeKpFhXgpLYd3_Mong9A6OSvGmL2nG-G7LBXxfpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/0889019e6e1146a5b4b9e2cee6f21c72","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"xk9Ix3IM9NfXTXbn7KV3Fe34jpKghO0M7X1ZwFTDa2bcWvxBewgsI5L2m017H9EoCqRpbu2-HkHGztKZfwSfpEKYA4OvdObgwBXA_IVHDUiExsjrtkcQJR_LtPrsIrZpIZt5_g_RMOhjpWG40iOHtzo7XiYjg26-MV1LNWGiooPRECJNaXZaS1fy2FCNXxHff6kR7kpKBSZQSx4qNUwnfmLmIvGSyOdLnCOvdrQtESGaSc7LMWCLJs1HlyN1wlaXmZnIIAs7Vo15ABCK3FCP5zZ0DpppAZUdMay4tWyevvlMG5CK6NpQTLkc49U884XqXILVfkEAzkwZekdr6gu_Cw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/a0d22140c0ed4278870724e54d99b938","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"n9pVD9XL43BykxzcY1c6XKmGMuN20UbSM6uaku1GdCzvuPCWO54fdRqs8JduEvUOgRTuYV52QMGLvyb2_AXrzvedEZI6o2PE2FO5kJH8qfFyCjqiqY6H-MeFfMfa2UoVSG-ykYIxqayh_HpwSwndVMPnoc0p5_lmecZqsFCJrT5OZZTmHat9iyNXEp9G-nY4EVOPnxb_HsqxWoIivjqO_OeVUXneLYzU9iCEpihr3eXYrE8nIeiGMimehDC0EF3RlJ9BvsC2Aj6EddajS9xh8mrTXMms4k-2X_8IJwQcarPpAqiz9K7GWbCcTPdQEbddQSX5FkZ_FeeLC013JEap9Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/c4cf39ef0106455198808a4ba6619fb3","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"h-72gARqMwXp7XtwAwPww4PVBoPuK5UA6mXubetsECLjnjrAU5W90bGcj9hM6qqLxZzUHWXB17SNObjBK39Up9DSaq7nX9N8MDslgW0NgQ5Sm2fRc2t7Rr87qrk8HqRQrqqo3MwArB5C-K7AYQrfihBMG8C21XTrv_NFS7VSWc1dzA9nWm7ch96I5pK7b-VCJ1M5UMuMBpu4JAOrebwiIbyt51CWkq2Qn0FBwg433ygFJFJCTjDV9biGFWePS1TknaJGFGwh6oMqokpItcWBIlD5qWbq-DaCjKD2HLnt7pWWjee6Qcjwoib4MrqBoJCZ8hK4J0oWZiYS93gfuGpDHw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/b329bb00403f4aaebbd90983b562d23d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wOKd__6i8rgLj8FY36VE4_r912xmbafiiaruIKRg0YH88kkDeFyrtuma13WFYco4C_Mpd9_VmTOBYydkLUJG3skk0pYj_lpaXgickbrUfYUO518-3rMXR6ZEfP_UAZonk6rc6rMAl1mBHPxJSI_61TKFRyDPFIVN3cfn3Rlu32MTTk4yFlGKzkx03z1DHjxNvAoDWOq4Rx7M2y-SFb3hS-Cbo9S3k3EObwpyqyLab9NuHjK8_TlaTChVSyaKegaxDKPdZSOwLpaugzKGiuYDc2Pv7FBvBysrZwWo9y8g-djQTCW7de4Sg4d1e_OgXkVd9jKM-iDmZP-0FG1KNrODUw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/4dede8ef1f0c4896876f41d26e623eda","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"pj2NZDpblOdcn9WnMuduYVQH6L4sQaHLnENAgOpBVJrmPGFaTC06UizxlnFQQgXFrWFIDV3fMRYZjvKj0CDTZw3ArUDI1AC3rAMez07CNJrxBc-pyRJo2qm7yET4JjUcoNUzPe49Jg0sTm_GjYCU5oO8hNPjmkvFBqk_tK21wn-GUezhNSw5Xt5wrNut5D9bx9Ec6SNw1jhtC58jyB4BAfyprpbPEBf7jbQ4rmEbPmFNWYtRp2wu-dd2AJ8rUzkyrtDsMIrZeki4J9VmrOd3sfxb2mrTh52u8MMUr4LpVC57YsExMluLEAgKS7BORvwL0zUhbsLE0gbYJ29ovETHbw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/b948df1fd198403b9d957fe3c2b304c8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"ywQxBhO2g4PKjb28A6xkhoNpIJpbEB7CR9XnCQYugrMCTBbgn1Wu5WUIL4nFbOHQqfZFgVm3Iz3GxQx9qbEuKZAZLrQemQvPKfJxShysmvaUvfOFkWAHreHROokOOhpz6RONaOKCExDLebh6xrwY_QX4Mu3CQRLrxXAXCpNCpLkLxSGcwf2QsxyfDgDk5_do5CHWUdDIrfYeBwphry-amLVnevfaMiy-cfuEA7uNXT-g6E0G0IKpK7d4BC_-D_Ik-H1Za5lbMDYCzIDaTyILuoQ3o6AyP2sSQFu287_RMlwny17Z1z_uUSp4t33mLBmKfqnofOpj3DTFV1cSVi_58Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/6e6d01abed4a44119e2a6f7fb100301a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"xny3krbx8hK8KQxeapgTJ062YqcjL40lwn3SaYZF6jvd_NdgExGmHBwqzZhaK0PGciDWQjUSDffKWuOAMJpZRskJ-HkHqB5s2kDQxqNcgHC0M20HA-JjiPRWHqAOpd7-CwaP4Dh0WkuCUZZ2cFHn13AzPifHE9W3uaRVm4UqsSJ9DhVYMxmtdykXkxPbamuv7C7-Cc7OJepctGFRI-z2_locTjZCjLAioOLkR-TiO8HC-dwhdVHGVLb6ndKfnK1oONyKMYmdamciR_xoswsR64k9L8zRH4mQXs1JLcK5bdZGSI9TC8HLsJ1pbISmbvcB8UBWr-vKBvLyyQxCh-oVxQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/90e449bfebae4beabf380cb73f8f9db9","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"u1FSeDgoMKXed5j9AedatfVS7qA5zOZuIV5Si5_8A9H5AbJnR6SixEbxH-en_MEeFGIegUfuV_KGnGI7prxZtNH8Wcb5j3FPRsHo4icHMGXfXIJBKsGzP6pt6SzCF3PyGW9IjLFfIf1HD3LLzd5OiaYSHxtpOuHYNPzyo26O0ElTtHBwhUnp0YLSN6_gfCXLEMwjsXMk3EJ-XCDBuPXmRz4CqWgBtA8sABeU9Sy4Ptv_MsdDjLz5wRnvE-_WPHmux2-7BjMvgxln5c_vMEhkmU3L3Jaz5vEK_JO41Q3TVT09mVqudpGCu0qGzd3U4dGn_T-lEW89bR-K9Oqt52ZChQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/e0acb596946145368fd13c8b4e0c2c31","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p6oM5Rje-NLaSvWUXblUxWhXXQ57Uu-4TshEi02pY8Prj9j77Noem7d8RjwPVhTFWEcVoBsivfU8QOHb4yv9v2vWNxCXf6pcqCQU6edvRaxT8C71FlKcMcaRCOqJJRT0lCyf6lbGKsAhpMAfztyV9HBcLUnLtQPtQtqif4tBfCkiDGSI0606lZHmP3bUd5EurPOXGpcLq9gV2m_L5_EjDa5ZgTl_weMHOrzxsIyKjDG3z0Mf66SSLkpt2e6qvsa2bvsV10m0mqAo1jHkJPa2XXdrE4EAe5X2EWoesw_voom0zsrfemdFD1poDPwWsbZvkRBR1T-GmN7cj6xjucJspQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '651' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '651' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/versions?api-version=7.0 response: body: - string: '{"value":[{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/786f33cf86024134b1795f24b3f0f955","attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/8bf922cf4b0640ad8fbe53288acbcbbb","attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/90e449bfebae4beabf380cb73f8f9db9","attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/a0d22140c0ed4278870724e54d99b938","attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/b329bb00403f4aaebbd90983b562d23d","attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/b948df1fd198403b9d957fe3c2b304c8","attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/c2b39ea5f3ee4c1181284d3109f4f66e","attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Purgeable"}}],"nextLink":null}' + string: '{"value":[{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/0889019e6e1146a5b4b9e2cee6f21c72","attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/4dede8ef1f0c4896876f41d26e623eda","attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/6c0645bada774c53829be1e9d92b8033","attributes":{"enabled":true,"created":1564527265,"updated":1564527265,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/6e6d01abed4a44119e2a6f7fb100301a","attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/c4cf39ef0106455198808a4ba6619fb3","attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/e0acb596946145368fd13c8b4e0c2c31","attributes":{"enabled":true,"created":1564527266,"updated":1564527266,"recoveryLevel":"Purgeable"}},{"kid":"https://vaultf7e00e3a.vault.azure.net/keys/testKeyf7e00e3a/f68bb459f88048a28511a6bc9546c4f4","attributes":{"enabled":true,"created":1564527265,"updated":1564527265,"recoveryLevel":"Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '1441' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '1441' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:54:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultf7e00e3a.vault.azure.net + - /keys/testKeyf7e00e3a/versions + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_purge.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_purge.yaml index 8986e7164929..2d209bec87d0 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_purge.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_purge.yaml @@ -4,1472 +4,1334 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key0/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:55:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key0/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/b7b15c069a764103aca616941247c05b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2yh-wv0OiJllHsJD2ksiZ2az_143p22PHO_3mqj_W76twCIcehvLnGrVvqBKphuOV81ZHAe0_T491wBWyagcbda_pYlYKMbhnh_U9Xm-UvQB3u6z1S7D4SotH03DCdAUFIjOad6ghlfBUJ-A-hOCOIh3QTv2vqtg7WrdUbuV_4zy1BuW0QfoBZ13apKtU-8HyalVMqkenk3__Rpqub8yifPod3Mx81JqMWGeVqKA2wwAsC8PNbu6mbjC1mGpeI1HwEZRjObRXllYLZoyN2lTOsrxZdzTQQ0biU5RL320u98tg-3a58qclvXJA8TfjEcMQyfi90fVnUBCz58A28jBUQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/a4543a8280204c68978f6f2caae4cbec","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"7wL18EOC3opS5mWL6zSV_0crQP8HuBTVxmpcE1EfePfWRFVc242HNftjbwh-D-3ypnfx0pngk5dM2Wys6K7uC8UDX7xvEIz8Q4yov6EJHFERbUH4QHy5RrywBSry31vmIHdCyLikwyekjeuYDg7jHViKLGU-aRkdSYPhXBZnGjDqzbYwH8_fh9SQnsBDVtJ5dUF0ua2xstnqjZfoTdzvMGMTqrO4rivXc34kdhMAAcbAlg7yvfN8dr9legQfIQq-vSaBuhiLpQXJ7yrCIjWtFyz52F6sVYWFRZDhAEsVfFg0KwMROwPhLDZuolRnc5113C8rZTjSrPGTvzKloqgybQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key1/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/e2105e596e1244a496166f11ef3fcc83","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"q_cGt1m0sRbgdPQvIy5YpXC4LQ49mOhVO1IH4XoTMiGgSAF5RtJzSPBWPx93I1Lmuvlml15EroYaudSZRivYgOM9BmVet_ZEAl0yL7FySYG1aepyalxZ1HU00b6Thn0MCYZawsK_HR6_VQsK4uVf0uBiwjSXgAT39yK9M6YC09ny5Tokdxi0CtlI88TBzhGVcsU4GBLB7zziUMsIdMNvU_08XXMdyFO0MZCCtZ4FKQ-LWrMXTd9TonbeyxHjKK55RYk73vOrurPdtncmL-7Tal-ReUfWNa8IBTbv2-5HF9pKeWiugPsYx5LZDkeMPShLLXLhUl9IrAWNJ75TbJnqCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/594bd6b877b549e78c65e8e6065f9b61","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vL6fWpzKR-eh3DEeb8meE7BVQhQ3EslTQ2YFnfI7z1PSJbTYL9GzOEYDOCEw3HK1-kDQlQNuG9cS9w8a-XyXN2GaIN1d3wCsvkiF8IxSgZvyzah76cnJlY9k8s2_-xpH9-eDn2V_O_oT5S05ZDGE8S3yQXX40b12GbCzox2ydAmbiG26o75ee9Ep-VcA65Sn8gSGR8GyBeu_pfuEZR2ExG6ykluUJWV5S-aHNQP1QwC5J5lN6BA6IQw_CNiu5IIen69RATOv9OUlEcb8qUzAa6w77y2BfIPW-721Al6AVsQc5qfs-fPGvlAMMTgRpUULbZtJf_Ua_x4SJLEg5gqEEQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key1/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key2/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/1d4636bd96ce41dbbca191bf2d58f491","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vUAwWk483zwp364hcyCNX8EzclzX-56CvL-UAmRkaI3rDttCvgo9lDk6unH7S1E6lB1J9ZfF5LebqqfNR7MheTPuvlq034V-eQHiMFmYgbpHkyM3YYElSQulBk7dlJ5JmVW9LgdDkVeRdKU0NXzFSbScn2gynewJx5uJDREcKRKLKbD4WXMtpUep_YgJG3tT3Moy0OrgB8GD1EeGU5xGb9HKLU6B4YxT7vOTd9oP_vrUGzWLzv2gUVcat3ey0KLymyS2UEQcXazrJ8I48plMYRFuo7rVDolp2KmqrQLYutqn5c-bW_mq0kytdH-9-NxDW_zrsVSMSjuXfa3rPXQQ1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/4cf7e15813524ce8a0cbbff407e4320f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lCN9N51jfLTckgcgoUDBIa8fKsi-BBeyz6RtKo0rxdiU8HiI8bPwjWomaGom950KKIvxVZO81xh7R7wOsVMoo4pmfM6IoSX9xRJKDG0Z3-rjkXi8wswKbcVP2EgPZ0ZZfMi1MgPHarfMXPMCtA1fOndYM_FGWijYbf6ngXvgvRsMkg-d5AOU0vP9A_Cw4f5CvdeVKGsbaHkXy8udls-Ir5we-S749TcCzpje2UJ7UftWOMynXPl5bagZ1jZBXqPI0Yn4lLUXmI2xLw-QkZPEBgMGyMwcjI3bGZUKHVQdnFymdXIN8xZyiTnWvjaYHGQK7w-c_bjBxs4WA5EgiIUAGw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key2/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/bf97328c64bc4190b7c0b5025152e0ef","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"iC40PZjyzCPorzlWM7YTGIcZp4zP9YeUzig51DOE5iAHLXaIDbjZs2H-TO0l3q205oCX3R3dBBoJvxlEDbLjSLI4NdLym0EqIWTd4B6JelFBq-3zEeJJt4SHkMRQdkWPA7dwIEi4JgfyazFN8JkL3x-S2zSqqyzmoG4U4gpxKN3NPAyk1qmszmpKjnGzNJg7ywY9tewDlqx6MiMQkODxr27rOjXHx_hbp7iKhD3ZwTKAvX7g14JzpYIkXmKsyUtCU_pLx6HEqNUVLNyV0xfAtXctSSuudeE5LDItakUEY5oFe7iT1DlqPDOGoVmtfg3wf5OocdtajvdfZGfMRUpi4w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/00e02fa485e44c17afda5770e8153dcb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1p-HLSbIn1lvsmxtwTf9Gmsd7r--sUU9C0CSjMQzz_yXSt4nnKzNbtbPfpkG1UPSyysrnNKfz9YWIaJWrYUZbdDRF_xNMV_QHiXHrsW851fZqZZYYz_KICrD9PZoBgE9SMIZznXBnx1AXEhDtZeMsHixlIWCmW1zrnwtaa1a9jjbNCArj3bF9WK7Fz4lm4sov5J98XaOHFvaFmDIVSW1mPlU7IFY7qzvim_ADeWFFZ2ibgb2fZbdo4EK1sL8HpkrVaryidFBRYVfQjIAusI8bNTcrEp2RLvaiPTh9Kqcwqz1GIJ8rWMCjflxOHsXiwpucyekYpEMX0PJD9RKYeBSZQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key4/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/df257ae8ce7445499e565c897a68dfbd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"3nDxOtRk2XEekU3CDix3JvDSL_ovOzFqQOiGcm4gAsnxKBF7KAOINLVdOU-jgDU1tW0lDU9EB7tgt09O3ZRn6wHfX11FbsWX_UQVVZZ1-9TN8qNm05VCT41hXVJXp0orAnc8oMj3zBgWuHRzNOO3H6HECD0O1rTtgpSzBVlkRjvJFoNZ_VeM4ALRdghGM5pZwDhZmXjPwWMNBhrxsehGcIwWwapylZUSjDTkv6RcVs7nROpDZiEyXxGkLMDZgQKcbZPUP8pUmWaWS9639d3NL-y8wvBrxkz2YLcLU4rVMZBKwQD-QA6kfRBZ-tSdm2Wjosn9tY_4ZaF5BT2bSZ4jWQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/7744766f37c84db6b97adf44cfdf3c01","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"5ffGsn2LropTgRfM75DCYE5k_rlbSIgAVqf4IFIHhIVwHdbco3qg8ROnX36f6jsH_x8JMvGfACIuFTwGLhw8VCK4NZOHIHFeq2kSSOHrqBLhIw7WZKCWrKfPBDtdKAvVmhMzLIn31FFAbNpbgDNVYa681ajXk7kBMdJaCX9ymT8a-DvNLDh3K33ImrqXZLNLX6KOh8-sAECfOVZcoRDfvzi6I5edrzxG-jMZnyYXMvdOWWO4SfmmD_-L6_kCksibxIbL-7LFqfO4rtcbv2ew87GA-V4Drm3OwQrX0h13xIuGZ5J6GVOQ8uhXwrHdz_UCL38_A5wLlWzMnDe7iMDMmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key4/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key5/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/1977c712eff64ef9a3384f93eec3920d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"0V3D3E6vH_DcYMtkqMZjr6Cw1M6sYzYjUlu3eyNrh2h8qq2oIWFgDRzm_wvfG0k1JOuS28L_ZkYaAsIeW3mQx0liwfi0Qw3nMWFjzcLpLw9GBM6WZBr1C8uh0DbSvoWGo82FIIWONKWYZtimkep2UtBpEkbWXtBK7HMwWr1YhQxLwya-eq7R7L_F-d5CmAJCWZAfIU7shSesGIFZLYV8UzM2rfWueyEVQw0jrC5SC7eVoiIQ9t7bkGw_mooqod7KdIDIIyeaOpe-7xd8EqntmOeOl2EYehTeH2oaUwm-SWSfE53-Jf8GzqHMYLsXO0FcYTkZO2RCl630YSJWOQ0J_Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/0b821b69a2a3451793d33595b4b52674","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2i-Yevb0gLnOGSWkCrRSfbsui3vbi5PcXH8mYAA-O5DF64zVu3tgj7MD1bHG9Xnw9KX75MRwPFZoZnXByNEWEPyndhbOsNTypLxcFYagDEB9tMH9oO_M6SO7pOotlnqKT_Zhf4w3hWK-Gsrmovl6T2729nyAOmbVjNosC-u5JCU128WXpnel8HbJXKMjtmGDVKCOBErTm1ZYTeGjr8nMnlhnOFbaRkGST3c3YcaabJ0ZZQ7BVhna_ddt4de5yGxfNUi4-E2KwwcC8EWBWAL4idDfeaRGf-J954hMdtQXvIFjM4ovpZtajP5OjjcGsp9spfChZ4UMsmk8LMWptzjukQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key5/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault92670ac9.vault.azure.net/keys/key6/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/a46d41e3df94485998d628effc1cc9fa","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2pOHXzB_Ek3t-w1EPmq6Wv9tDkaP1tekAEn1FDJNKSMPRwsoQ77_2VE3aggrKhRAEhxxXJqCpsnSK3aOxeiO3PAnPkXBg9FqQ2GcFykqXwQaKEeJi3oFo_Ik4O3VgaGca4g3LyAIjhcU5RglkrdP6gxBPd38ykGmi5kmxBViQc2LVCSwWSK34a_QoYi_mTEu4ai3yyfn4c2DvvJA4Nc-jUoQi4XydgzaDwFIHwBpJ5VZvHbfj88iEQ5r-Ym4xsDZhPv2ywyKokNSocbNDgpk5mpzOGW4v_ZkAuS1DsMd7ZdVYtuVzg1y_jNtaK985OWrJhTz0_VWXKLoR_sBGkNN1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/06c3cfdcaa30440e80108348d890bfe0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"70-948DTxaM8NbPNVnBTYQQ9bBjrA1jLjmDHW8RHZA_DvPxLHiTOLIcXX_YoZNVpjqzvBMhtoyHawmD8b6dKeyeefqkjXryxFBo2L89IDp2MKsg8iG75eeAP0p6FFWBljpfwyduuUCsOZ_x5M6_K5M3aaC2R6oTedX5Gp90dZKUQ97W4S1Im8hW0qrg_HM09vQ7RZ5w_reDC2hk18c6CnERE_W7Z8Q3AEoi17t3cRez616DvLWZxkj2YMyP5mTnYaniSIbpgBU-Eqb4UVKBAAScLHpslfS-cdQr3vyYeIOI-EO1I2K5gLq_2UVn3-VL1fySHw7zvkS9bX_TkdzZnyQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key6/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/keys/key3?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/keys/key0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key3","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/bf97328c64bc4190b7c0b5025152e0ef","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"iC40PZjyzCPorzlWM7YTGIcZp4zP9YeUzig51DOE5iAHLXaIDbjZs2H-TO0l3q205oCX3R3dBBoJvxlEDbLjSLI4NdLym0EqIWTd4B6JelFBq-3zEeJJt4SHkMRQdkWPA7dwIEi4JgfyazFN8JkL3x-S2zSqqyzmoG4U4gpxKN3NPAyk1qmszmpKjnGzNJg7ywY9tewDlqx6MiMQkODxr27rOjXHx_hbp7iKhD3ZwTKAvX7g14JzpYIkXmKsyUtCU_pLx6HEqNUVLNyV0xfAtXctSSuudeE5LDItakUEY5oFe7iT1DlqPDOGoVmtfg3wf5OocdtajvdfZGfMRUpi4w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key0","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/a4543a8280204c68978f6f2caae4cbec","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"7wL18EOC3opS5mWL6zSV_0crQP8HuBTVxmpcE1EfePfWRFVc242HNftjbwh-D-3ypnfx0pngk5dM2Wys6K7uC8UDX7xvEIz8Q4yov6EJHFERbUH4QHy5RrywBSry31vmIHdCyLikwyekjeuYDg7jHViKLGU-aRkdSYPhXBZnGjDqzbYwH8_fh9SQnsBDVtJ5dUF0ua2xstnqjZfoTdzvMGMTqrO4rivXc34kdhMAAcbAlg7yvfN8dr9legQfIQq-vSaBuhiLpQXJ7yrCIjWtFyz52F6sVYWFRZDhAEsVfFg0KwMROwPhLDZuolRnc5113C8rZTjSrPGTvzKloqgybQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/keys/key2?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/keys/key1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key2","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/1d4636bd96ce41dbbca191bf2d58f491","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vUAwWk483zwp364hcyCNX8EzclzX-56CvL-UAmRkaI3rDttCvgo9lDk6unH7S1E6lB1J9ZfF5LebqqfNR7MheTPuvlq034V-eQHiMFmYgbpHkyM3YYElSQulBk7dlJ5JmVW9LgdDkVeRdKU0NXzFSbScn2gynewJx5uJDREcKRKLKbD4WXMtpUep_YgJG3tT3Moy0OrgB8GD1EeGU5xGb9HKLU6B4YxT7vOTd9oP_vrUGzWLzv2gUVcat3ey0KLymyS2UEQcXazrJ8I48plMYRFuo7rVDolp2KmqrQLYutqn5c-bW_mq0kytdH-9-NxDW_zrsVSMSjuXfa3rPXQQ1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key1","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/594bd6b877b549e78c65e8e6065f9b61","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vL6fWpzKR-eh3DEeb8meE7BVQhQ3EslTQ2YFnfI7z1PSJbTYL9GzOEYDOCEw3HK1-kDQlQNuG9cS9w8a-XyXN2GaIN1d3wCsvkiF8IxSgZvyzah76cnJlY9k8s2_-xpH9-eDn2V_O_oT5S05ZDGE8S3yQXX40b12GbCzox2ydAmbiG26o75ee9Ep-VcA65Sn8gSGR8GyBeu_pfuEZR2ExG6ykluUJWV5S-aHNQP1QwC5J5lN6BA6IQw_CNiu5IIen69RATOv9OUlEcb8qUzAa6w77y2BfIPW-721Al6AVsQc5qfs-fPGvlAMMTgRpUULbZtJf_Ua_x4SJLEg5gqEEQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/keys/key6?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/keys/key2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key6","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/a46d41e3df94485998d628effc1cc9fa","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2pOHXzB_Ek3t-w1EPmq6Wv9tDkaP1tekAEn1FDJNKSMPRwsoQ77_2VE3aggrKhRAEhxxXJqCpsnSK3aOxeiO3PAnPkXBg9FqQ2GcFykqXwQaKEeJi3oFo_Ik4O3VgaGca4g3LyAIjhcU5RglkrdP6gxBPd38ykGmi5kmxBViQc2LVCSwWSK34a_QoYi_mTEu4ai3yyfn4c2DvvJA4Nc-jUoQi4XydgzaDwFIHwBpJ5VZvHbfj88iEQ5r-Ym4xsDZhPv2ywyKokNSocbNDgpk5mpzOGW4v_ZkAuS1DsMd7ZdVYtuVzg1y_jNtaK985OWrJhTz0_VWXKLoR_sBGkNN1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key2","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/4cf7e15813524ce8a0cbbff407e4320f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lCN9N51jfLTckgcgoUDBIa8fKsi-BBeyz6RtKo0rxdiU8HiI8bPwjWomaGom950KKIvxVZO81xh7R7wOsVMoo4pmfM6IoSX9xRJKDG0Z3-rjkXi8wswKbcVP2EgPZ0ZZfMi1MgPHarfMXPMCtA1fOndYM_FGWijYbf6ngXvgvRsMkg-d5AOU0vP9A_Cw4f5CvdeVKGsbaHkXy8udls-Ir5we-S749TcCzpje2UJ7UftWOMynXPl5bagZ1jZBXqPI0Yn4lLUXmI2xLw-QkZPEBgMGyMwcjI3bGZUKHVQdnFymdXIN8xZyiTnWvjaYHGQK7w-c_bjBxs4WA5EgiIUAGw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/keys/key0?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/keys/key3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key0","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/b7b15c069a764103aca616941247c05b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2yh-wv0OiJllHsJD2ksiZ2az_143p22PHO_3mqj_W76twCIcehvLnGrVvqBKphuOV81ZHAe0_T491wBWyagcbda_pYlYKMbhnh_U9Xm-UvQB3u6z1S7D4SotH03DCdAUFIjOad6ghlfBUJ-A-hOCOIh3QTv2vqtg7WrdUbuV_4zy1BuW0QfoBZ13apKtU-8HyalVMqkenk3__Rpqub8yifPod3Mx81JqMWGeVqKA2wwAsC8PNbu6mbjC1mGpeI1HwEZRjObRXllYLZoyN2lTOsrxZdzTQQ0biU5RL320u98tg-3a58qclvXJA8TfjEcMQyfi90fVnUBCz58A28jBUQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key3","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/00e02fa485e44c17afda5770e8153dcb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1p-HLSbIn1lvsmxtwTf9Gmsd7r--sUU9C0CSjMQzz_yXSt4nnKzNbtbPfpkG1UPSyysrnNKfz9YWIaJWrYUZbdDRF_xNMV_QHiXHrsW851fZqZZYYz_KICrD9PZoBgE9SMIZznXBnx1AXEhDtZeMsHixlIWCmW1zrnwtaa1a9jjbNCArj3bF9WK7Fz4lm4sov5J98XaOHFvaFmDIVSW1mPlU7IFY7qzvim_ADeWFFZ2ibgb2fZbdo4EK1sL8HpkrVaryidFBRYVfQjIAusI8bNTcrEp2RLvaiPTh9Kqcwqz1GIJ8rWMCjflxOHsXiwpucyekYpEMX0PJD9RKYeBSZQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault92670ac9.vault.azure.net/keys/key4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key4","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/df257ae8ce7445499e565c897a68dfbd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"3nDxOtRk2XEekU3CDix3JvDSL_ovOzFqQOiGcm4gAsnxKBF7KAOINLVdOU-jgDU1tW0lDU9EB7tgt09O3ZRn6wHfX11FbsWX_UQVVZZ1-9TN8qNm05VCT41hXVJXp0orAnc8oMj3zBgWuHRzNOO3H6HECD0O1rTtgpSzBVlkRjvJFoNZ_VeM4ALRdghGM5pZwDhZmXjPwWMNBhrxsehGcIwWwapylZUSjDTkv6RcVs7nROpDZiEyXxGkLMDZgQKcbZPUP8pUmWaWS9639d3NL-y8wvBrxkz2YLcLU4rVMZBKwQD-QA6kfRBZ-tSdm2Wjosn9tY_4ZaF5BT2bSZ4jWQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key4","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/7744766f37c84db6b97adf44cfdf3c01","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"5ffGsn2LropTgRfM75DCYE5k_rlbSIgAVqf4IFIHhIVwHdbco3qg8ROnX36f6jsH_x8JMvGfACIuFTwGLhw8VCK4NZOHIHFeq2kSSOHrqBLhIw7WZKCWrKfPBDtdKAvVmhMzLIn31FFAbNpbgDNVYa681ajXk7kBMdJaCX9ymT8a-DvNLDh3K33ImrqXZLNLX6KOh8-sAECfOVZcoRDfvzi6I5edrzxG-jMZnyYXMvdOWWO4SfmmD_-L6_kCksibxIbL-7LFqfO4rtcbv2ew87GA-V4Drm3OwQrX0h13xIuGZ5J6GVOQ8uhXwrHdz_UCL38_A5wLlWzMnDe7iMDMmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault92670ac9.vault.azure.net/keys/key5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key5","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/1977c712eff64ef9a3384f93eec3920d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"0V3D3E6vH_DcYMtkqMZjr6Cw1M6sYzYjUlu3eyNrh2h8qq2oIWFgDRzm_wvfG0k1JOuS28L_ZkYaAsIeW3mQx0liwfi0Qw3nMWFjzcLpLw9GBM6WZBr1C8uh0DbSvoWGo82FIIWONKWYZtimkep2UtBpEkbWXtBK7HMwWr1YhQxLwya-eq7R7L_F-d5CmAJCWZAfIU7shSesGIFZLYV8UzM2rfWueyEVQw0jrC5SC7eVoiIQ9t7bkGw_mooqod7KdIDIIyeaOpe-7xd8EqntmOeOl2EYehTeH2oaUwm-SWSfE53-Jf8GzqHMYLsXO0FcYTkZO2RCl630YSJWOQ0J_Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key5","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/0b821b69a2a3451793d33595b4b52674","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2i-Yevb0gLnOGSWkCrRSfbsui3vbi5PcXH8mYAA-O5DF64zVu3tgj7MD1bHG9Xnw9KX75MRwPFZoZnXByNEWEPyndhbOsNTypLxcFYagDEB9tMH9oO_M6SO7pOotlnqKT_Zhf4w3hWK-Gsrmovl6T2729nyAOmbVjNosC-u5JCU128WXpnel8HbJXKMjtmGDVKCOBErTm1ZYTeGjr8nMnlhnOFbaRkGST3c3YcaabJ0ZZQ7BVhna_ddt4de5yGxfNUi4-E2KwwcC8EWBWAL4idDfeaRGf-J954hMdtQXvIFjM4ovpZtajP5OjjcGsp9spfChZ4UMsmk8LMWptzjukQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/keys/key1?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/keys/key6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key1","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/e2105e596e1244a496166f11ef3fcc83","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"q_cGt1m0sRbgdPQvIy5YpXC4LQ49mOhVO1IH4XoTMiGgSAF5RtJzSPBWPx93I1Lmuvlml15EroYaudSZRivYgOM9BmVet_ZEAl0yL7FySYG1aepyalxZ1HU00b6Thn0MCYZawsK_HR6_VQsK4uVf0uBiwjSXgAT39yK9M6YC09ny5Tokdxi0CtlI88TBzhGVcsU4GBLB7zziUMsIdMNvU_08XXMdyFO0MZCCtZ4FKQ-LWrMXTd9TonbeyxHjKK55RYk73vOrurPdtncmL-7Tal-ReUfWNa8IBTbv2-5HF9pKeWiugPsYx5LZDkeMPShLLXLhUl9IrAWNJ75TbJnqCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key6","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/06c3cfdcaa30440e80108348d890bfe0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"70-948DTxaM8NbPNVnBTYQQ9bBjrA1jLjmDHW8RHZA_DvPxLHiTOLIcXX_YoZNVpjqzvBMhtoyHawmD8b6dKeyeefqkjXryxFBo2L89IDp2MKsg8iG75eeAP0p6FFWBljpfwyduuUCsOZ_x5M6_K5M3aaC2R6oTedX5Gp90dZKUQ97W4S1Im8hW0qrg_HM09vQ7RZ5w_reDC2hk18c6CnERE_W7Z8Q3AEoi17t3cRez616DvLWZxkj2YMyP5mTnYaniSIbpgBU-Eqb4UVKBAAScLHpslfS-cdQr3vyYeIOI-EO1I2K5gLq_2UVn3-VL1fySHw7zvkS9bX_TkdzZnyQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /keys/key6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key3?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key3"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key3?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key3","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/bf97328c64bc4190b7c0b5025152e0ef","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"iC40PZjyzCPorzlWM7YTGIcZp4zP9YeUzig51DOE5iAHLXaIDbjZs2H-TO0l3q205oCX3R3dBBoJvxlEDbLjSLI4NdLym0EqIWTd4B6JelFBq-3zEeJJt4SHkMRQdkWPA7dwIEi4JgfyazFN8JkL3x-S2zSqqyzmoG4U4gpxKN3NPAyk1qmszmpKjnGzNJg7ywY9tewDlqx6MiMQkODxr27rOjXHx_hbp7iKhD3ZwTKAvX7g14JzpYIkXmKsyUtCU_pLx6HEqNUVLNyV0xfAtXctSSuudeE5LDItakUEY5oFe7iT1DlqPDOGoVmtfg3wf5OocdtajvdfZGfMRUpi4w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' + headers: + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:33 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' + headers: + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:36 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' + headers: + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:39 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' + headers: + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + response: + body: + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key0","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/a4543a8280204c68978f6f2caae4cbec","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"7wL18EOC3opS5mWL6zSV_0crQP8HuBTVxmpcE1EfePfWRFVc242HNftjbwh-D-3ypnfx0pngk5dM2Wys6K7uC8UDX7xvEIz8Q4yov6EJHFERbUH4QHy5RrywBSry31vmIHdCyLikwyekjeuYDg7jHViKLGU-aRkdSYPhXBZnGjDqzbYwH8_fh9SQnsBDVtJ5dUF0ua2xstnqjZfoTdzvMGMTqrO4rivXc34kdhMAAcbAlg7yvfN8dr9legQfIQq-vSaBuhiLpQXJ7yrCIjWtFyz52F6sVYWFRZDhAEsVfFg0KwMROwPhLDZuolRnc5113C8rZTjSrPGTvzKloqgybQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key2?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key2","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/1d4636bd96ce41dbbca191bf2d58f491","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vUAwWk483zwp364hcyCNX8EzclzX-56CvL-UAmRkaI3rDttCvgo9lDk6unH7S1E6lB1J9ZfF5LebqqfNR7MheTPuvlq034V-eQHiMFmYgbpHkyM3YYElSQulBk7dlJ5JmVW9LgdDkVeRdKU0NXzFSbScn2gynewJx5uJDREcKRKLKbD4WXMtpUep_YgJG3tT3Moy0OrgB8GD1EeGU5xGb9HKLU6B4YxT7vOTd9oP_vrUGzWLzv2gUVcat3ey0KLymyS2UEQcXazrJ8I48plMYRFuo7rVDolp2KmqrQLYutqn5c-bW_mq0kytdH-9-NxDW_zrsVSMSjuXfa3rPXQQ1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key1","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/594bd6b877b549e78c65e8e6065f9b61","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vL6fWpzKR-eh3DEeb8meE7BVQhQ3EslTQ2YFnfI7z1PSJbTYL9GzOEYDOCEw3HK1-kDQlQNuG9cS9w8a-XyXN2GaIN1d3wCsvkiF8IxSgZvyzah76cnJlY9k8s2_-xpH9-eDn2V_O_oT5S05ZDGE8S3yQXX40b12GbCzox2ydAmbiG26o75ee9Ep-VcA65Sn8gSGR8GyBeu_pfuEZR2ExG6ykluUJWV5S-aHNQP1QwC5J5lN6BA6IQw_CNiu5IIen69RATOv9OUlEcb8qUzAa6w77y2BfIPW-721Al6AVsQc5qfs-fPGvlAMMTgRpUULbZtJf_Ua_x4SJLEg5gqEEQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527325,"updated":1564527325,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key6?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key6","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/a46d41e3df94485998d628effc1cc9fa","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2pOHXzB_Ek3t-w1EPmq6Wv9tDkaP1tekAEn1FDJNKSMPRwsoQ77_2VE3aggrKhRAEhxxXJqCpsnSK3aOxeiO3PAnPkXBg9FqQ2GcFykqXwQaKEeJi3oFo_Ik4O3VgaGca4g3LyAIjhcU5RglkrdP6gxBPd38ykGmi5kmxBViQc2LVCSwWSK34a_QoYi_mTEu4ai3yyfn4c2DvvJA4Nc-jUoQi4XydgzaDwFIHwBpJ5VZvHbfj88iEQ5r-Ym4xsDZhPv2ywyKokNSocbNDgpk5mpzOGW4v_ZkAuS1DsMd7ZdVYtuVzg1y_jNtaK985OWrJhTz0_VWXKLoR_sBGkNN1w","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key2","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key2/4cf7e15813524ce8a0cbbff407e4320f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"lCN9N51jfLTckgcgoUDBIa8fKsi-BBeyz6RtKo0rxdiU8HiI8bPwjWomaGom950KKIvxVZO81xh7R7wOsVMoo4pmfM6IoSX9xRJKDG0Z3-rjkXi8wswKbcVP2EgPZ0ZZfMi1MgPHarfMXPMCtA1fOndYM_FGWijYbf6ngXvgvRsMkg-d5AOU0vP9A_Cw4f5CvdeVKGsbaHkXy8udls-Ir5we-S749TcCzpje2UJ7UftWOMynXPl5bagZ1jZBXqPI0Yn4lLUXmI2xLw-QkZPEBgMGyMwcjI3bGZUKHVQdnFymdXIN8xZyiTnWvjaYHGQK7w-c_bjBxs4WA5EgiIUAGw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key0","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key0/b7b15c069a764103aca616941247c05b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2yh-wv0OiJllHsJD2ksiZ2az_143p22PHO_3mqj_W76twCIcehvLnGrVvqBKphuOV81ZHAe0_T491wBWyagcbda_pYlYKMbhnh_U9Xm-UvQB3u6z1S7D4SotH03DCdAUFIjOad6ghlfBUJ-A-hOCOIh3QTv2vqtg7WrdUbuV_4zy1BuW0QfoBZ13apKtU-8HyalVMqkenk3__Rpqub8yifPod3Mx81JqMWGeVqKA2wwAsC8PNbu6mbjC1mGpeI1HwEZRjObRXllYLZoyN2lTOsrxZdzTQQ0biU5RL320u98tg-3a58qclvXJA8TfjEcMQyfi90fVnUBCz58A28jBUQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key3","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key3/00e02fa485e44c17afda5770e8153dcb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"1p-HLSbIn1lvsmxtwTf9Gmsd7r--sUU9C0CSjMQzz_yXSt4nnKzNbtbPfpkG1UPSyysrnNKfz9YWIaJWrYUZbdDRF_xNMV_QHiXHrsW851fZqZZYYz_KICrD9PZoBgE9SMIZznXBnx1AXEhDtZeMsHixlIWCmW1zrnwtaa1a9jjbNCArj3bF9WK7Fz4lm4sov5J98XaOHFvaFmDIVSW1mPlU7IFY7qzvim_ADeWFFZ2ibgb2fZbdo4EK1sL8HpkrVaryidFBRYVfQjIAusI8bNTcrEp2RLvaiPTh9Kqcwqz1GIJ8rWMCjflxOHsXiwpucyekYpEMX0PJD9RKYeBSZQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault92670ac9.vault.azure.net/deletedkeys/key4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key4","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/df257ae8ce7445499e565c897a68dfbd","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"3nDxOtRk2XEekU3CDix3JvDSL_ovOzFqQOiGcm4gAsnxKBF7KAOINLVdOU-jgDU1tW0lDU9EB7tgt09O3ZRn6wHfX11FbsWX_UQVVZZ1-9TN8qNm05VCT41hXVJXp0orAnc8oMj3zBgWuHRzNOO3H6HECD0O1rTtgpSzBVlkRjvJFoNZ_VeM4ALRdghGM5pZwDhZmXjPwWMNBhrxsehGcIwWwapylZUSjDTkv6RcVs7nROpDZiEyXxGkLMDZgQKcbZPUP8pUmWaWS9639d3NL-y8wvBrxkz2YLcLU4rVMZBKwQD-QA6kfRBZ-tSdm2Wjosn9tY_4ZaF5BT2bSZ4jWQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key4","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key4/7744766f37c84db6b97adf44cfdf3c01","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"5ffGsn2LropTgRfM75DCYE5k_rlbSIgAVqf4IFIHhIVwHdbco3qg8ROnX36f6jsH_x8JMvGfACIuFTwGLhw8VCK4NZOHIHFeq2kSSOHrqBLhIw7WZKCWrKfPBDtdKAvVmhMzLIn31FFAbNpbgDNVYa681ajXk7kBMdJaCX9ymT8a-DvNLDh3K33ImrqXZLNLX6KOh8-sAECfOVZcoRDfvzi6I5edrzxG-jMZnyYXMvdOWWO4SfmmD_-L6_kCksibxIbL-7LFqfO4rtcbv2ew87GA-V4Drm3OwQrX0h13xIuGZ5J6GVOQ8uhXwrHdz_UCL38_A5wLlWzMnDe7iMDMmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault92670ac9.vault.azure.net/deletedkeys/key5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key5","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/1977c712eff64ef9a3384f93eec3920d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"0V3D3E6vH_DcYMtkqMZjr6Cw1M6sYzYjUlu3eyNrh2h8qq2oIWFgDRzm_wvfG0k1JOuS28L_ZkYaAsIeW3mQx0liwfi0Qw3nMWFjzcLpLw9GBM6WZBr1C8uh0DbSvoWGo82FIIWONKWYZtimkep2UtBpEkbWXtBK7HMwWr1YhQxLwya-eq7R7L_F-d5CmAJCWZAfIU7shSesGIFZLYV8UzM2rfWueyEVQw0jrC5SC7eVoiIQ9t7bkGw_mooqod7KdIDIIyeaOpe-7xd8EqntmOeOl2EYehTeH2oaUwm-SWSfE53-Jf8GzqHMYLsXO0FcYTkZO2RCl630YSJWOQ0J_Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key5","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key5/0b821b69a2a3451793d33595b4b52674","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"2i-Yevb0gLnOGSWkCrRSfbsui3vbi5PcXH8mYAA-O5DF64zVu3tgj7MD1bHG9Xnw9KX75MRwPFZoZnXByNEWEPyndhbOsNTypLxcFYagDEB9tMH9oO_M6SO7pOotlnqKT_Zhf4w3hWK-Gsrmovl6T2729nyAOmbVjNosC-u5JCU128WXpnel8HbJXKMjtmGDVKCOBErTm1ZYTeGjr8nMnlhnOFbaRkGST3c3YcaabJ0ZZQ7BVhna_ddt4de5yGxfNUi4-E2KwwcC8EWBWAL4idDfeaRGf-J954hMdtQXvIFjM4ovpZtajP5OjjcGsp9spfChZ4UMsmk8LMWptzjukQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key1","deletedDate":1562703475,"scheduledPurgeDate":1570479475,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key1/e2105e596e1244a496166f11ef3fcc83","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"q_cGt1m0sRbgdPQvIy5YpXC4LQ49mOhVO1IH4XoTMiGgSAF5RtJzSPBWPx93I1Lmuvlml15EroYaudSZRivYgOM9BmVet_ZEAl0yL7FySYG1aepyalxZ1HU00b6Thn0MCYZawsK_HR6_VQsK4uVf0uBiwjSXgAT39yK9M6YC09ny5Tokdxi0CtlI88TBzhGVcsU4GBLB7zziUMsIdMNvU_08XXMdyFO0MZCCtZ4FKQ-LWrMXTd9TonbeyxHjKK55RYk73vOrurPdtncmL-7Tal-ReUfWNa8IBTbv2-5HF9pKeWiugPsYx5LZDkeMPShLLXLhUl9IrAWNJ75TbJnqCw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault92670ac9.vault.azure.net/deletedkeys/key6","deletedDate":1564527327,"scheduledPurgeDate":1572303327,"key":{"kid":"https://vault92670ac9.vault.azure.net/keys/key6/06c3cfdcaa30440e80108348d890bfe0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"70-948DTxaM8NbPNVnBTYQQ9bBjrA1jLjmDHW8RHZA_DvPxLHiTOLIcXX_YoZNVpjqzvBMhtoyHawmD8b6dKeyeefqkjXryxFBo2L89IDp2MKsg8iG75eeAP0p6FFWBljpfwyduuUCsOZ_x5M6_K5M3aaC2R6oTedX5Gp90dZKUQ97W4S1Im8hW0qrg_HM09vQ7RZ5w_reDC2hk18c6CnERE_W7Z8Q3AEoi17t3cRez616DvLWZxkj2YMyP5mTnYaniSIbpgBU-Eqb4UVKBAAScLHpslfS-cdQr3vyYeIOI-EO1I2K5gLq_2UVn3-VL1fySHw7zvkS9bX_TkdzZnyQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527326,"updated":1564527326,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key6 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key3?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key2?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key1?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key1 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key6?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key2?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key2 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key0?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key3?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:47 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key3 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault92670ac9.vault.azure.net/deletedkeys/key4?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:47 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key4 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault92670ac9.vault.azure.net/deletedkeys/key5?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:59 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:47 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key5 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vault92670ac9.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vault92670ac9.vault.azure.net/deletedkeys/key6?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 09 Jul 2019 20:17:59 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 22:55:47 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault92670ac9.vault.azure.net + - /deletedkeys/key6 + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_recover.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_recover.yaml index 4ee4fb170618..e24f206c563f 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_recover.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_recover.yaml @@ -4,2604 +4,2008 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:57:22 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:22 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key1/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key1/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key2/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key4/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key5/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key6/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0","deletedDate":1564527444,"scheduledPurgeDate":1572303444,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key1?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:24 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5","deletedDate":1562703477,"scheduledPurgeDate":1570479477,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:59 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4?api-version=7.0 - response: - body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:17:59 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 200 - message: OK + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 200 - message: OK + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key1"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:35 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key1"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:04 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '72' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:37 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key1"}}' - headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:07 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0","deletedDate":1564527444,"scheduledPurgeDate":1572303444,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 404 - message: Not Found + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key1"}}' - headers: - cache-control: - - no-cache - content-length: - - '72' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:10 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 404 - message: Not Found + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2","deletedDate":1562703476,"scheduledPurgeDate":1570479476,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5","deletedDate":1562703477,"scheduledPurgeDate":1570479477,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '779' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 - method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0/recover?api-version=7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6","deletedDate":1564527445,"scheduledPurgeDate":1572303445,"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '779' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4/recover?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key0/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key0/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3/recover?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key1/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key1/recover?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key2/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6/recover?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key3/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key3/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key2/recover?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key4/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key4/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key5/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key5/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: POST + uri: https://vaulta8eb0b9c.vault.azure.net/deletedkeys/key6/recover?api-version=7.0 response: body: - string: '{"error":{"code":"KeyNotFound","message":"Key not found: key0"}}' - headers: - cache-control: - - no-cache - content-length: - - '64' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 404 - message: Not Found + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /deletedkeys/key6/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '64' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:17 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '64' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:42 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '64' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:20 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '64' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '64' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '64' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Key not found: key0"}}' headers: - cache-control: - - no-cache - content-length: - - '64' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:26 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '64' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:51 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key1/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key1/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key2/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key3/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key4/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key5/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key6/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key0/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/d713618fa742426aa657df5401a795e2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qwxWpjPAz7vNP67lCC5KeTu1X1zlsgZ7KXUL8ISU2HSjr6zKmrwrfY3mFv39I5uQ2PbL3ke2wMRxdSMgXS1D8uDEjVbnlbVw3cwvGI3-OvHl7uSZwUnHcb59QpoUSP11aghwrq2XpfkqryTz9woqjdNrHE8Mj9EtE_wMPCzdsLxCArBVfw5AJe1W7OqQqvghr5b1RS5o1ieKp3DQza7CSNF6soTDDf1sZbJKyGWBd5UM3mVRTw9sqk9WkVdQssGT7ajlhDmw3lfCKSLN8Sw6aub0kupmBgKUDj8vvTpi2J8s0gCnXbzi1s74rvdKGtaMLdTFTIYCvyl7YfEtrbufKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key0/3e0af4748be8436d854f58a846ccc1da","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"09Y9WKU0nDSplgmxDj2kVJWtzSptzaVeNOZZaK6HwzlHe4IGnDE0l4gCdkWbx9RvH7XBTWErIqKMK4j1R8-ZQB8xPB1p02gQMb2lxUfjKsnwoDJuKp3IUWM0pSQvsQHePkNTCBuwqmqJqH-T63tn5G7jAcAZRQmDNQF02tNYINRBPHH3nUvF3lNz-_C_XQaefTfaXmxfFEodcVoLYlupPTH4JC3WUVFn1SN9rUcmfxIKn5q_A_b8IyCuANmbDm_QQxDHvUZtcGrg-OopJaKOQp1oG1eEKcN0tgrtyKIjxveFF8OTC1No7yBRzfrTTvdjWuhOZTj550quYTv_zfTCKQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaulta8eb0b9c.vault.azure.net/keys/key1/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/62da9cff34814906a43a1ac2c03bdf3d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tZMzrcsWt5PEx_oqF8vI_DDfWavSCcVWbmNLKi-5UD6CzD1pfoJeiWRbrwqW6SsMvq5sqS-HTu3ytZQSK31-yNSyubk-yMj3PpIooChe5YfJdBK9-4VQKZRydetszJzmNK6o-_7ZyqWctecGJ-OYkAa5yr3DbvK1h1rvvXtGMQHKssMbe2TeZbRAE2ukwurqnznM4eiQiLr1KCspJyNxIe20Lpdc7DR1knQ-TrPgr_-pLCb2seu8Vc3yM0E7lshqUDYQclxB-5ldsH4RkFeuIeJLhm91C1WZLT6fyuGw6OI8B0hRoqVyaqsJR9x8LQgYRTHriHYwaK6YQ1Bt4gNUuw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703474,"updated":1562703474,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key1/779a56fe20fa438c8e5383b4a541bbbb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sZKUiHiCF0tq6ZBQSyJs3cBrHyt5N2oh9gywwIZWrZQD6mdRLE-OS2IZX_UbvE2xnohcB_aPSFlMPvA5aRYduF_omiZBJQOT5h8OgDodm4HrmosHkq923Gux1NvclbO2mxZUSC88H-mEXcadn0t0Z12uY1lALtd8o79oPhLRsqK5zbuDFKyEj92PGpgRGaKxm0TALChx6Yl9qhvCvvIY3Be23TpU2bMde4lJfxbmf_Lc15FE8ASo-iQZxCiNQXrKB9a1Wfmpit61d4m7o5HJ6Gv5JrIoZSn7GjM-fiLRtG-vvqByFA_4p8Q0_2OVPHFpdjvh2beDhhEswEnefG9EAQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527443,"updated":1564527443,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key1/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/e70c04ae0ed4484887b6fc24757e5150","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yBg8bWYXhPUrkFKZitG4rD7DaAeBgKXat4nhvOJMzGZSCVsngofUDokNvwYA82ge1WCOhZs2K_H1bIbF9jlMW3Gsq9ABTVbEqk2-yf00rQ1lo5VcerfrJsOJmO2z_qVaHR10A1bW9cd0K6rbCgoQQyIs6MArbCQ8QADxQEH-yU82TQBBp_Gii3wHAE43KcJAZQdWoYFYGGDigSO4CYMAjMnsJYiDfKDhDVNE38Lu9DgGbUr3s-EnFh9aDDYTGlx2vLi38iKkPErVz0brfyIT-s_pZwxaS8Sw7lTa475BjsI6KbPCKDGVxdJQS8TXvrFkcDQ8C63XK7_-o54tMjt68Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/74b2fe95a1504c508b1b075f4d5b0b1f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"zqNPQCyNBdwmcDxi3QHF27M-YnIqTf-WcEqRCx8ygJdM7hFbPY2fPxy96X5P16Rb9G8zvBj-zVMEQQiUxzH-fRpJbVcGGDCaylSD2aeZfDja2r71nGMXPvTrScqbUsjgHQDXh9ZrUQnAQr4iIfLvyemxwNeB72UeaZkdfgq3mzpA7YO5NtpnKLXOQnju1SYNoYzn_7YpDU7lqdlPPPuEnu-VtKBJF5U5lTkGW1EHYJyMclUXCHsB8OnoqVoDO8-BdzGVWLXhlZsNEWbXgCVnCYXhURSS5kuwiE6psN7XljI3Im6nAYK4iQnqI9jKee3LdJh6laB8pXftqA5aazkqmw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key2/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key3/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/992f93c3e10f4fdabf633dd95c4a917a","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vnHbhHBq2UBBnVgYQ9C_wuU8AptoHO-V3wA7VBOD4PY7QVtcWAQdd8g24aoXFXpYHaObfexbx7oZM11cOzIEY-T9TLLNjeB8cFmQb6WrNKlav02tR_wHWF2E6w46_9tpI6E0raZdtloJ7Xcjc8QixULEX11V1vJEOWQ3KSy7TUnQ97zJCeqFK_58zpbi6pzikWZ2ScyxA1npuhrltFyXl31setz_ClhwhNxo7X2FxjVbDsmkqeLAgZi-72i4LGxOGylte6FargfOXBm9hNpnsQPxDw7Ld717OtXcUvjnC3rKjvAq_h_IZdMkfgCbo-EGVnePOwaVrmzWnNGBgUBVrQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key3/50f4e238b04c4c128374ddf082b278b5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qx5IzL5WTh5Lx_FmssKaO9jEmMdIgF6AvXscsrZZoKAXGcvD9hJ4wqGjMzuAg9AC6oHmjvf4Rvw8-QkSGWx2Rqyt8phjCSqugL7J01-ucqLLTBFuPJQ5dPwAjBHn1nhUo_M2_hjwI1wjq_P8TlxJNls2zo2uPNE05WLOtJ_T5rjg6iN32gxlt3b_GX5pcRFpBpgATiL2KlZ6Kn9FvQx9el6e4pK5cmp7KyE2u1E-TfbkiUGqc5rPNOHPHlC6u2dLunwcNxvyS-3WzL28kyplNcmIDUJ470cB7Rud1O1l0An0v8Hwq6kGYC9RvJahn1mG0Wjy4MSYUYwUAxhbeO-DHQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:54 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key3/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key4/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/d1d3778b188a4f3cb994dba9f1334357","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sjpSBeT8JHd8Wq3e2oHpR2beM63IxveF1b4FzyXKVP2d8rx4XXPZ50r7C_kmTmFRWbM8Q-_8tK5Ye9wQWzJvQbsFclSTSnhrJKV1fddRREjHI604cB67ZzqdBRSRijyINZB37_JOxtrcPmpv0NlJtcoOrrffYMhCuRhC0jEl0xvdeKYIVsDqzHzPYNcc9H8F3SlViFvhwXZsYQnwjBUT8Blz_67B_C7jVKbA1wWFStqcip5SLprYzy0iCBLiSXN6eGqvdur1AZtN0LTbG3WZ0MjvwZodozcoX1RDOrm0PBiDPrRlZkzOCtcWe2Gx-0_T6P-X-nM8U8Zsfw-eceQcpQ","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key4/323c50afe9cf454d855c5535ee113bd8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-FJpfi_elv3VIbFw2QWR5Vo0SSZ2m2tDOOlr1kOS69f2pSd3Waz3fnqhWPtZlwdH7wrVTi3MxL5yMCa095gT4RTJHstUn6iVbB-YGhpW3HTBp7Ll6CIoFlvKBYeB0jxB7wwkbuI5iwG0E7WyoL0f4pbcUYJYWKjzeONUuc6wcWLuZYAQ1OsLALgnHepjK-2nQJ_B2efY8tkxuBHY4buto1fUPXMy2atvX9jx8xVppovpQinabyaKlD-UH4a1TlbQjootEblynReDPKE1qsMNMrmX4kxS3bavHjR4r3FVb035UPbUDa9ej46VS6kTj6zhbQW0Ao6MxRnHf9vxPrSVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:55 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key4/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key2/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key2/787399bc262644e58a7758ee35fd2569","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r47YSKZu7Hsf8SXx9xJXqp80rqF7Wz2mxJ84DdhjPaiCJc6pZdLnCRL-IbUZiRAcp1z1oAACRSxFnsOQwZvd7AtZmc1Dq1MSYgJ_HfncdgNPBWi_XwF--9wTMVNOFDNnF3-6UrIGUU_bmaqPdi5B7YNK_xFQT7MOnF2t6Q6pV_DS9b86PUO_DTzE_Ms0tTLL-UWkojLoy19XeREZs9qx8bc0i611-3HgnAiDgkH853eI8_TOMpTYrvuH7MVtMy78aULmWYD9UHe5a1LbPwOuZAj3lAZ5N08xCBInCJ2_wTwXfCFlcoPN1IHHC0SntUgLyjOr1XbmFkUVc9VoLsYIpw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703475,"updated":1562703475,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/7cf2acefc64d488abbe745fca7385053","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"p93hJP6ybT78c29NEwbzk9U1ozth49QJ0UOpP7Q1khrcfqCzCpNK4HeLUwuQJV9EeghRT2u3zh8aSDn1rLkSh8Od8AmasvYUZhraU2kt4rOgTR0UmWw5sXcKTRJiZb3sB4zN4rUm9Itsj-WIF66CFh4TG6clcToaol-VGVp7DHbPfGT9eyy7hH2s2QAA7Nv__AXCfP06DCYK0oPtowewkv6r-ZoAaFskI-Apb4DsvqDZ-Bx40CXB34dsQxlYzj3pwGN8QMU3QYR3qT3ccNSFbFCl3st3sbw6ppn922FzfxZjjvQ2hlIYB73cukY_rduvk7cawGSrgZIAhawfAUn1uw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:55 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key5/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaulta8eb0b9c.vault.azure.net/keys/key5/?api-version=7.0 + uri: https://vaulta8eb0b9c.vault.azure.net/keys/key6/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key5/0d6f3f79950b4e968fa21e9307ae0bb2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tFzbDseA9Ctm1Ohe9vAH5QvKgM1Ngw0EpF3Je_2pgj_PwmQ5fe4ojese6cOKYpMYlyqgWfMop0__K81iFE-27R6HGZjb8dPXjFK6hWr0zdIYI0TvCiAXe_9BaegT6zkA1wW6neuYJkmuwOx4JpfSDfJmILCZPj3pqWubFtl4tfwhrXXZFzCSkgRV3EqbW9bnFwmTlUFpL5EzbuA0R9iOZwOR4NwbV8VazDMkF7TKXcw4OlE5hMRtwJw9Pdg8erW9Ng2GFzlGQF3Tzh-i8g7a98KIsHCnMSMDB3oee5EGDmpg--i1w_k3KmBmhV6V2JlT3AmEytUnsbMw-LywvxYakw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703476,"updated":1562703476,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + string: '{"key":{"kid":"https://vaulta8eb0b9c.vault.azure.net/keys/key6/01c3e78ce8b242e18afb568997af866d","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"51LI5Ox1aKk9FBB3ixX3-WIOCeDIL4gZj7in44c60L_QcFCNeenNHFluR83yfBMjy0vg2PEaUdUNOxvkbIkF_2G28yFzQWDg8all57G9_SUzA-GcvWj1-KqGuRK_UCxNSKMaOGheXp1KDcaxlAnHK0T9bF3cCJBbzM9GRPv5j2QRtUSG3gHlUfXkwl9WVQez1hWVyRWeI4x8bZmvj7rCHQd0zcZGL9T4OtP5Zr1XW17Hhd9BHc8L4Cag0knodDGWnSIIXfdFfcK4S0XIe3I_Tzn3i4YahWcJ5jnCA214AUC6PRfCADpkG5aapS7lojhjc8jO6ahB1760ybnex5O0Bw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527444,"updated":1564527444,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:57:55 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaulta8eb0b9c.vault.azure.net + - /keys/key6/ + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_crud_operations.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_crud_operations.yaml index c4fcbb136ec5..311c72bb7799 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_crud_operations.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_crud_operations.yaml @@ -4,409 +4,327 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault9627173e.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:18:51 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:58:48 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: - body: '{"attributes": {"exp": 2527401600}, "key_ops": ["encrypt", "decrypt", "sign", - "verify", "wrapKey", "unwrapKey"], "kty": "RSA", "key_size": 2048}' + body: '{"kty": "RSA", "key_size": 2048, "key_ops": ["encrypt", "decrypt", "sign", + "verify", "wrapKey", "unwrapKey"], "attributes": {"exp": 2527401600}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '144' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault9627173e.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/1bb7bf47dd094b40aa9c050474731167","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"r-JtT7b6aQoFd3zphPJ6UkTUHc3j0wzUXYodlpplJVWbNc0wOkaeA41omIFcMIVekvTmFJrFPMw3NFTwGeO0TrbQvQJtmksfIx3dTPWOG4zlWcnWrHMhSS2m5HZwYQPWFhSHB9VtgBE6fCzosaInazhiI61f1eGULobYGiRWv3fZ8Ez4iF531AC1RbgYT9uHoOCZ6a2LvwBOOEC3vGLJGRy0A9Ez-s2Yek_fy95ZVySOD7J6OSh4h_GC9roVICi0v9fHwGd8MXCRnKzq-lUxrylIsyfXU78PbG4rojGMQswD8oPfkONH45jWSBe2e2SXkx-HiRQ4VzbMKOxm9bpSYQ","e":"AQAB"},"attributes":{"enabled":true,"exp":2527401600,"created":1562703532,"updated":1562703532,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/5bb4d99959504269a7f5e4bf00ae97a6","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"pmTUlox1v_IPM5MvQyBqp98q8Xhf9Jl_sLc_Z-GN-MSIEXJUuy9otFpP7AxaiF_EpmRWHfhvnnYvjHMEiye29zhavf_nreGFJFoTtWi0ONPF9CCEjG1xyxwnp6wA6EuvhdVzY7NZAlgqQOGULH4QSFsiQw4WZrEJBdV3nsV8aBAhe7uDhHEuy9GZR92l1p1QUrMwOfW1-ELKV0B0naLY5bScduOJADZAe_C6ChHye_e4Ha4L9xH0arfgf5A42t7UCYF7N0DAKK94EDRHTJlFXWt--MzFatkLQtaAYrR8PhBIRB3lwmPmE0LS73KHxOMqBJRlilUMCUxTUXkGYIuxsQ","e":"AQAB"},"attributes":{"enabled":true,"exp":2527401600,"created":1564527529,"updated":1564527529,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '673' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '673' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA-HSM", "key_size": 2048}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '36' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault9627173e.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/ab5beb5937e94d788ebb0ccbdc4859aa","kty":"RSA-HSM","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"pebUyWT5U8L33ZSuWtyPAcoHvB8gOQySsc1PJVzt03rA5UJrfwtJ4Qr5sHS4phxkUmG3gb4FzUHwztAPRaTdwquqM7b9Qk8OPP1BRZeZrrM78iATXd0gM_xzcFs6GE58WFc-ZFVTC9PDVb9ktwDwwf5nSLGsPlqW0dPZEaOkFwv6w9RBqyJtdvGw7zQGeKm9oRG1eQXNSenhJfiYLyDM1Ve6eiSYEBwiG3KAr7QxBIoRxIqecutM2e7MwLWedoPr0BwMUnI6x9k78ytHv9YaHkRU0cLN34o4t4sghoRGape1sg-SR8NW298U5LyukSRX68zAn89d1LU2X-gBSUA9Yw","e":"AAEAAQ"},"attributes":{"enabled":true,"created":1562703532,"updated":1562703532,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/eb05248e5ec54109bf3b4cc3d9880773","kty":"RSA-HSM","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"rlLVJ4CJfxs5CnDFBNqjxlE7c5pcfDFU7PR3v47sL0r0-pPHBya1yUY7Q5FaqCqOIaYAZ9y48MLmcBWHrY5A1xj70DnLXc4ss5KazZopPjCGDLjNzzsfd8YSb0BGm3CrmaYgTXWy3KUbBNR8GX1KaSZkL_OtlPh0jHluHukTZDCsNZWXFqC2ffms31dh-IG9JL-zwtb1zDHJ2oBI43Che5nJVY1_y4ebFDXanwyHzbww2KkbXupR2mK0GqbI3uvjD4v5BEJCX6mCtY2gEW35B1K6lsFgqEFwybD8zbjGKPmrLE0WwFZoXXtQtqch0dica4G4lZm2oX9LnHq_3tPYUQ","e":"AAEAAQ"},"attributes":{"enabled":true,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '662' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '662' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: - body: '{"crv": "P-256", "kty": "EC"}' + body: '{"kty": "EC", "crv": "P-256"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '29' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault9627173e.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"uiR3274tb0zkEvMPr_sxHsmHhutBdxftwkqFiamW1-w","y":"7xk9VqY3UcNGM3V5gnmtHb3vq_q1Q36Sp4s1zA7lDKM"},"attributes":{"enabled":true,"created":1562703532,"updated":1562703532,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"CYFBDHsovMeX0Skq-Jz-spYFLV1KvE4hOEOizQIQHz4","y":"J2E_YSzULuCNo4LZDDRn8IP7inCBoCS-85vkGd8pGf8"},"attributes":{"enabled":true,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '367' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '367' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault9627173e.vault.azure.net/keys/key-name/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"uiR3274tb0zkEvMPr_sxHsmHhutBdxftwkqFiamW1-w","y":"7xk9VqY3UcNGM3V5gnmtHb3vq_q1Q36Sp4s1zA7lDKM"},"attributes":{"enabled":true,"created":1562703532,"updated":1562703532,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"CYFBDHsovMeX0Skq-Jz-spYFLV1KvE4hOEOizQIQHz4","y":"J2E_YSzULuCNo4LZDDRn8IP7inCBoCS-85vkGd8pGf8"},"attributes":{"enabled":true,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '367' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '367' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2?api-version=7.0 + uri: https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"uiR3274tb0zkEvMPr_sxHsmHhutBdxftwkqFiamW1-w","y":"7xk9VqY3UcNGM3V5gnmtHb3vq_q1Q36Sp4s1zA7lDKM"},"attributes":{"enabled":true,"created":1562703532,"updated":1562703532,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"CYFBDHsovMeX0Skq-Jz-spYFLV1KvE4hOEOizQIQHz4","y":"J2E_YSzULuCNo4LZDDRn8IP7inCBoCS-85vkGd8pGf8"},"attributes":{"enabled":true,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '367' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '367' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f + - api-version=7.0 + - '' - request: body: '{"attributes": {"exp": 2524723200}, "tags": {"foo": "updated tag"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '67' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PATCH uri: https://vault9627173e.vault.azure.net/keys/key-name/?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"uiR3274tb0zkEvMPr_sxHsmHhutBdxftwkqFiamW1-w","y":"7xk9VqY3UcNGM3V5gnmtHb3vq_q1Q36Sp4s1zA7lDKM"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703532,"updated":1562703533,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"CYFBDHsovMeX0Skq-Jz-spYFLV1KvE4hOEOizQIQHz4","y":"J2E_YSzULuCNo4LZDDRn8IP7inCBoCS-85vkGd8pGf8"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '413' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '413' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault9627173e.vault.azure.net/keys/key-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault9627173e.vault.azure.net/deletedkeys/key-name","deletedDate":1562703533,"scheduledPurgeDate":1570479533,"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/54916f0a705d437a9a12fbc42040e0f2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"uiR3274tb0zkEvMPr_sxHsmHhutBdxftwkqFiamW1-w","y":"7xk9VqY3UcNGM3V5gnmtHb3vq_q1Q36Sp4s1zA7lDKM"},"attributes":{"enabled":true,"exp":2524723200,"created":1562703532,"updated":1562703533,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"recoveryId":"https://vault9627173e.vault.azure.net/deletedkeys/key-name","deletedDate":1564527530,"scheduledPurgeDate":1572303530,"key":{"kid":"https://vault9627173e.vault.azure.net/keys/key-name/3bf5aeb463a1496ebdbd5a2b4f5bd77f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"CYFBDHsovMeX0Skq-Jz-spYFLV1KvE4hOEOizQIQHz4","y":"J2E_YSzULuCNo4LZDDRn8IP7inCBoCS-85vkGd8pGf8"},"attributes":{"enabled":true,"exp":2524723200,"created":1564527530,"updated":1564527530,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '544' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '544' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:58:50 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault9627173e.vault.azure.net + - /keys/key-name + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_list_operations.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_list_operations.yaml index 6c925adfa57b..d69c5663290a 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_list_operations.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_key_list_operations.yaml @@ -4,612 +4,492 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key0/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 22:59:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "EC"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '13' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key0/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key0/8bd25d6c7e4d4c95b249df2ad1a06f03","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"kt3oH8H10CKe2_VPcIxBJ4PQt6O1eCkmCrtyHmdmF6Y","y":"Oje7K1kKsEoeFQn7WZgJ0pZ5n325HykdIeOXoOgVes8"},"attributes":{"enabled":true,"created":1562703511,"updated":1562703511,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key0/99a194f5b97f44ae9125c47157810df2","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"b-JfAkvIfu_ILrlz684i-pj0cpd55tzyHDWcW8T0OaA","y":"w1TcOgtEU3ehfOd5jRiZl9PNRHieGIDDwUcWCGuNeQM"},"attributes":{"enabled":true,"created":1564527584,"updated":1564527584,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '363' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '363' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "EC"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '13' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key1/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key1/986a1037ce7845eb9b3927fc07576f12","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"Ulzv_dmHaTAW68YM9dNRAAtYHSxfIWG1pJsl_ZVknvo","y":"ywMBREwV1gC0OBCHul6Mm-sbwku3DjQA1yK7CpQyFBk"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key1/fbc0bda5d70640fe85e5fb435aa55d93","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"7q_mEVJXTIDf7a0CVque6SFN5tXoJyzlZENayGeWsSI","y":"rL-ILnqU7evEpes10rf3xzsnlEbg6gdsDfc08s8LN4k"},"attributes":{"enabled":true,"created":1564527584,"updated":1564527584,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '363' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '363' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key1/create + - api-version=7.0 + - '' - request: body: '{"kty": "EC"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '13' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key2/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key2/a0501fcbc568481b829637c6a92e4abb","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"--BpzoUqMk2FLfcY1VnrLKSzW4GtjfBu_cVUFATu7mY","y":"BU_Q-pS8w3hH9elSSPe0jKzKj4Ey03I3GdgGy_tS7mo"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key2/21946cb8e9d14344a7c9ba8d3db75227","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"Qw1ppcyCUcBHgQ2UEyuTdPYTwOGn7OHLxsT8lXeKdRY","y":"gTWfs8Cjd6QWnWeaAR9lzVePttSlFLzoX1c80aNAkyI"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '363' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '363' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:44 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key2/create + - api-version=7.0 + - '' - request: body: '{"kty": "EC"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '13' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key3/b62f8f82b76b47549153d116b383815f","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"VQqpb7RotE1iQu9i-7iRZGg8GOpxVQQB6tx_7tMPMZU","y":"SRqLIoGAGpKgrXYP8JwBPSEdW50xNPXpMOeh4YkpvgI"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key3/8bb57a6e699544c6b71d279fd8df32e9","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"xs5QeiF_UBlgmjt9gcJPoI_d71xgE8RqUl_q3Gna760","y":"rfbSl_9PK-Pq704mE6SQIyrhDRK66QIme0DEZHi2rPQ"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '363' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '363' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key3/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key0/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key0/6b36301002db4081bfc37dc15a3cf31b","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"9rz853RQmmMerwKCfQpSONzDOwC9mniosBB0IWOQldmNJL53cj-yYVaXIaXyblWBA3uDkwWFLFvtz8_mxDowBxMamsJ46_njsKswVOHCgvxwilwc22EwEPyxaQimvRipMtU7mHMEyETOhvMKNhifTa3kv7YKKNGrIO2Psa2MvH7mxdYmjFhbPgdXwF_b7cINa2UGrf0fI_aXryJjY7E1L6J2GDAXiBGaVh59FMRU1DQQkRBBDVIzuGep6QLhpi9Jk4fUKYpFwL6ees5KRmg_Ztgz8E15yWkSRmsoEcNvrL6Enb05blHGNc6uCUYrRcwki1VV_mGW-DWEOE0zHaQysw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key0/0be8a06e74a14348be5604f2d9b2f3ce","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tBGkSMbkIgrbJ61a9DarlO_4f08KDkv8II8OHveKO7JCC2oWX6tOuXdn_zK00wY_Z7QkpBcsdStiPVjdyh9EsyqpaMoheM-HYFPNIMFOa8olntSvHs1D3pAoaHlJOh4-w9QF7CQALLHb6AM5t6molo8Upui1Z7XdHGKXX7RO4IYA752AzaLIakjLO3TCAMinZmnDDGAhunUB94_WpsWv1AAJSFSPjDHCz2dakZnLvreR-EVZz9nk-l3R8aQcr9y9p__ksIshnGKwJJ9l2vMO6p7MiK2RJLd-HFzEWDFKkWfYm9iRfp5vcoNxujLbXP2Rde4qvVlW5PmjLiBSLBxEhQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key0/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key1/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key1/a298f2b63271489f807d41d71a2e10c4","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wWuHzO89M8QbAl7BsuKWydhq_xj0RkrAsUjJTtRiLJs6CGl4jkvI9jBJb25Wis0anulK7cQKLv9K7MwtZtpLhnbUya-Qj_D9d9BSOCyjm_DFH9v6tNqKuexqKDu2aUrulDxXqUng4jW_4Is7P2g1uhkdoMJ0pzkToEIi0TUETmfUT7SBOgwr3zwPKcLGeO8H5jwT7AS7lVaz6MKFn07vVnE6sVq6Jxi9jyB6IHO7iwRB6w3cGVPexJGft5m3bt9Kuf47WHyOzVHqmwMMv5W2r8Wb5zVv6cVnb08o44OqGKOGXk0vqqiM2QAB__vM5MbVQMK2TcuJiotjiSHrNJZ8pw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key1/6bd05085b2d54b9093127c75e5109209","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"sUhJXxGr6fnKoM9o2q_-XBTFhglYPxfx3XpPPRaTCQlS12cWlu9mKBY1RyuJafMWsUP73N8iNJKa4qFF1C_F6PGBMPJ8lANW98WmJwaF764ZpkEkndGC7wCmqeWQkx0s3PH7mG8jj5uZdCVRAkWqGtmPfxBmV9dYRyDWVgr1r26XnqYzHhXclfIlOdg7VLg5xbtJ_rzrGP5PeETOeBDLJy_4iANPL8YVaJg8r75W_g9JjvLm2ieg66uqwvIm5RlZ8RtqcNgUXLlaCmYXL1jFbTP5lRXFPkXFl1DmXT9pXKS43Wo34MFOuU1tCJsHvtXgyeUHUKHpBdbhxSRc-UZmow","e":"AQAB"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key1/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key2/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key2/022d0289f15b460c830fcd30ddfdafca","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"z56wacSTQoxXCtyq_6uTAUvh-UESgYVJy2RbWQ5DMl1ZJDeIHTublcGy8e_kBOUgkiCFhObP29e8DaTEhuc-vJ62XX2EuDzvmMp2tUido83IIeXatP1gb4TQpXAVBviFXdPQNbce1sDZ5XpA4Zi8HCV1QqVyAJLKTJB6hOpwTW_HXG2qpYQVqOhMXv-39ZkWnVWSWLfz9kKDvfbXCeBDiLz7iVDVdB8ELExAi6vz4xjCRZPExQCCvXXu22OsbehfoW4FLb_NhcTjmTQQfCQ-3G_eskXYl8envgVsi5dxMqklnb0aHM3PTadXrY1wcnjLhYL1vgC7LKS7dc8c5rX29Q","e":"AQAB"},"attributes":{"enabled":true,"created":1562703513,"updated":1562703513,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key2/a7fd89dcc95045e9adac42c03dcc7c42","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"n1XbURcEge3wXm6Nk0F10k896dMK7xHaM4pJM6en8WHWuP0OJbTM9NzSmtyhZKh0akiphWCgfaycX4aChrB-7tYGxGcNS3iACwuciBbYeE39tzhJ5eD8byzCWUQVJkx4vsMOhICsaZcrc1Rei5b_LHu-U-T0CTdRDGM-Xvc7-5zP0fLWhhgxahTnTzEne_j4LGIp62H8ijge-btNpU4yK_lWMl0JNgtSSmkY9GTfU0hOqBvCQqWeZ2rfOczeROyzk1XEaLIsjBeSK4us8qjg74OpRGyl4khN__eYIjNPf3gO0qTQMljWtGc4iwG5n72tlx9yg8uIQP9fR38O5xXBVw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key2/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96d6174c.vault.azure.net/keys/key3/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key3/f9aabe1e98594882908b42b110e3bc82","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tazNLMksNQi1DwDd3CF2qpnUteGfDXKoraalUO1qmpnVVta8m0z3Ekl9QQocQNFoJlIAnG0PHRrnKRdLt5QMiacE4VO61G-KqP7l-2L6CbC1fEywIqE_FNC7U1neWDuSpel5s1v9HSQp616yUz4zGaBMdwzPykyp4bo2MPcRXkrpZjOBUaX2Z9MGW58Q5ic3Aj3l3MrNY_uOj8JdisNSShn0tnzez5QOV1rdEOcYzmzrNCr00xqjY1qE70uhKSFfdIuxKEsRU05dCuJTbAyLKj_vhsnnnyKQEN1pXcQCO2XaH_ZlCsXdvwWbH5Ptldyn2AHJQ2FT9iLGNOmgr820jw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703513,"updated":1562703513,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vault96d6174c.vault.azure.net/keys/key3/14a31e671a3542528b59e4dc06e16bc2","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"vJCL4Hqk2sGCa8jhMLNRXkUW5fxYdXReSH8K7p7ntVCWnTQGxQVo4gWDHT21Jl8hPCsowiPcddNMLBPV0PTH7J4hTtH-Qsf0nTxduGXvsUCPZIE8noWq4ExTUhoiBysZ6ginKjc_YHH8Dvd3Ei9CK7GP5JF2sfswra1MzU9M2sOQrcFy9-vr6HzThDyhSZpfcy3wN4RvQPLKGxS7tv9bpNrUWoP-1anA6rlj3I1qgbbKS6JFr8X8bxfbql77qOAl07j7zpdaPLGONa2WW8V7XOgR9x_2DLwLJxccBXHURPa3YvMm0av_xSuLZIEIk1cQ11WLSRUZemY-PXtXb_kXww","e":"AQAB"},"attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '652' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '652' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key3/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault96d6174c.vault.azure.net/keys?api-version=7.0 response: body: - string: '{"value":[{"kid":"https://vault96d6174c.vault.azure.net/keys/key0","attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key1","attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key2","attributes":{"enabled":true,"created":1562703513,"updated":1562703513,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key3","attributes":{"enabled":true,"created":1562703513,"updated":1562703513,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + string: '{"value":[{"kid":"https://vault96d6174c.vault.azure.net/keys/key0","attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key1","attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key2","attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}},{"kid":"https://vault96d6174c.vault.azure.net/keys/key3","attributes":{"enabled":true,"created":1564527585,"updated":1564527585,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '707' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '707' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault96d6174c.vault.azure.net/keys/key-name/versions?api-version=7.0 response: body: string: '{"value":[],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '28' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '28' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /keys/key-name/versions + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault96d6174c.vault.azure.net/deletedkeys?api-version=7.0 response: body: string: '{"value":[],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '28' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '28' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 22:59:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96d6174c.vault.azure.net + - /deletedkeys + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_backup_restore.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_backup_restore.yaml index 16f0745fa807..84db990cff27 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_backup_restore.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_backup_restore.yaml @@ -4,256 +4,202 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96041739.vault.azure.net/keys/test-key/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:00:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96041739.vault.azure.net + - /keys/test-key/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96041739.vault.azure.net/keys/test-key/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/7089b08b10a64ec68db241e20e2109d0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qbGcivUVxthKiCxcjxOGdsiItrjjTm0_-o0gkZmRSDlEY4ixbjJYBZMwZLxLm7_ZzoGTVTdON-_6bLu-ZwFqAAe2Nc_HDLkL3FTn1YkjTSA5I6FTXI-CC79m3mPLbrVNkHRUkN7QPpl9Qak8RyRl4TA5XtOp_ztKm5Lfuc1eJsosaRdqaMe2UlEbu0XCdYDoP1UoNRAhrUZwli-GHH6yWQxq0SBtnfUsXH0CkgprrnpDYM3dxUkjJJ6IRpW4acRXrFDg-ccCBQDRLty6eSRehugfZyTGciaT4fBcj245OjytQZHxz2ZGixRxN0YsvjoZXqquXKqfkKEcknMDNapyFw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/d2c863b455c9439b87fc78c6ac184217","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"uWCbdAq6V_Z3_JRNeKK4o27y-v8lL_IUNGXQHywjTU4aoVK8iDvM0ChRMhlChsMcI-SyGaAk7kiS2ywdNx5JI3rcaZiiasFZ-4CUnUQbOB_p5L_r2dDXvfdQzGaigM6cttEW5Iwze5dEd3BOcDQumxRrtSJNld4AlxEK-Kp7xaOUFc_2yAV1QPvELtjJLN1zMNw12FXNqocpZwZ8t1BGvvXKYfz3yrS6rq0nG36n3S1yA9Cb0NnrTjp84na3diRQXpuaUg65QXrbhcBW6o1aKTsuEAVH5FAqDliBa4v5lqTNsWxOGS996rMfjsJHJQ_fymvIy69zHrMe2UPupwz_OQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527628,"updated":1564527628,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '644' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '644' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:00:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96041739.vault.azure.net + - /keys/test-key/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96041739.vault.azure.net/keys/test-key/backup?api-version=7.0 response: body: - string: '{"value":"JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLk4zTkxnQUltVllzMTBLb0R6T2ZkcGI2aHRhMFBQNGxQOXh2VWQ5dEJEaUE4X2dPa1hQcnFza1dMTDd6d1psd2FOYlZNbFZpbnVzbmVwZndNUnlQdENmaHZUSjBMWG5PdUh0TmJfcTNpY1F1LUt2UnhfTHZpaGp4bnVCMUtKNW5ac08xR19RbTVPLXEwdkZySGZJNE9ZQjhIY01fR1VaOGx1dlFYWW5aSl9mY3ZaREZmazlWdVRzaW5fQmxCbXN6Q0JrdnA1LUFrMkwzQXFDUml5TUNjNTMwTVFPbjI4eElXTEhUcUdBTHpLM1pRRTNFMTdqVk9iT1ZtN2ZoWWh5Y3JHYjJWZFpQdmkzR2Vmd2xQZlFNal9VUlM3SzNUc1FkSnRUazREdVdsWkZJTThHY1R1NjZ0dDhIblA5LUE0Vjd5RTliQWJnWXlCZG9QUnhzem01TVg3US54dXBZUjhXMGdvNTI1eUlCSVdsUzF3LnJ0MHZkWFFDUlAyYjJ5b2htdk8wdlRjY1pKLWVlQWNlVHF2WVpEd0tqX1R5SE5iV0RQcFQ4ckN1Z3JpcVJ6ekFvY1hNNDZWME1Fc1JFbGNKTnBKNVNPR0pzeEQ0dVM2c194aDlCQjgwUkRxZTRHcllGckpsSlc4Wl9GLTljMGI2dm54aEhvck9vQ0VxS19VU0xTcU1wNE5pS05CMlZ4aGV4My1NSldJS0Q3M1BxaTZQdnU0MVZnUlR1NGlqTmhMeDJYQ3NtRFpxZkVuUGZHeHFQcWdVYTVvRm9uYUh1enNyRV93LVNORlhlWFQ0Skp2SWkwTFNMRDF0d25CTkVpNUo0Qk16TzJzZExJODhWX001SlpBLXp3RmtGRGNHUnJGeXJkOHVwaDhMVmFrMUpKZExvWkxocERmRjRpQWVLWW0wT0ZtdV9zNEFzbWJCR3ZuTnpUS3IxNlpNZlNrcUtuMm5uUHc2aV9JN3FzR1lEX2xEdm5KaGx2cmQweW0zb1RlSEFRR010OFRZRFhqNXZTejUyNExyNC14M0JMaWx3QlI3UF9SQVhfa2d3LTFYbjdGa3pGM0lscm8wMmNsSUxPWDcySjJUT0JRT2ZZVjRyOGxscE5Bakt0SEJ2cFFRMXV2MTRZbkhhN2VKTVlWWkEwV0VnSlg4elhJb1Nwemd4VnNLSTlRU2ZQLWZQVGdMQ3VUNm1iZVBHWWdSczE4dDdjbGhJaTJwQXRtaVYtam5GVXZJMXZwbWJzekg4SDAzYmZxZF85QmpHbzlzRklNVTBwZjR1Rk1aSmpfUnBldU00MjBmak91clpNY0xFV3lYQm0tU0E0ZUdjb0ViRTlqaVA3RUlveHVOSE5STVpWYjJtdTVzTHplZTNlNXJENzhMazV6bHpld1hPRHdyOHBiY2t5N25hTmRhMi1zOWF0WThwejBQZkhqUGpkdEh6NDEtZkhObl8tb0t4RWU4RDE5LWhRY3pGZkZkaGUyVloxYkRQRV9FckdJSGg0dndSaGNudXllS3p5bFMyQm1WSUdMZ2xzN2lRc2Zta1NpUUl0ZnoyVjZFMGh4aGFWd09PS21tNkpDbWRLR2s3aGE0a3h4aHRxNHZoQi0tclpFTlRTamc3MHdOOVVacFVlUnFQanYyQ1RVcUQxdXZPMHRRTW5zQjRVSWxwa3lqTlpaaVJqVFNaY2FhRzZGRXpDUVczV3c3T0l0S0FBc1AxNnJDYklZVUdRTkZKcUpYSnMybDEzR2JkTTU2OUx2Nnh4V2dSUm1UQ1dKMnJSTEtvY0ptOTh6S0gtV0dKQjA1cVlaT0JZYTdQOVlrdExNZTYzUkRuc0RoZzM5N054UEJFT1pvenh4Rzk0U0tLSUNyUXJYMEJvYmcxRUFlcWFfY1lvMWpIcjUzTFhBV3J2Nno3UHFCYmRVSXM1cEI2cGo0M091MDhzV0c3UTVyREZkd3JHZEpmallLR1hQZnpJcUVJWi02a2xZeE94cC1kazlKT1dpZFdQd2hmblhyWFBsa1ZnOUhDMkdrYzVwM0ptMlVCWE9MQzRZM04tYTBYT1UwSHhjbDhjbHlwVEVpNExCNV9VU25sSFVDVERuS2h0TjE1WEZieG9obnpySDJRYkFKeWM0eUJKeHNZUDRJcVV6QTdBdklfYmpxQTQwX2UxNk5yMHB6YktIU1czZWlLTzBPSmJqa0JONnBlSjdveU9vX0FUU3Q1RGsyWW5DRnBHMDFnY3V4aFdpaE1NWVVzdm1Td2RQb05FX2xnazcwS3FwbG0zbVlTM2UzSXhCNnA4NFBFT3pnMUpwRUt4U25EcHZ4SGxUTmJzSXprUTlIN2Zmb2dLcUx0T2VySkg5NGZ0d3hVNGwwRXFTUHRfMHVFTjlBLTd3WkY4REhhOHlReW9wSUxkS0JOZ0hsN3p0dzJVOVN1TEVGeTM4Wlc5THllVWRqM0dDNjN6SURXM1pHM3B3MDVHSVlMVHQzdHI0NS1LdnZlaHpLYmhfQWxGcTFnaGV5bS11R3ZyME54cUVuTDJzdUFyUy1oS2ljenZiaFNuUFRuQTNHdkVaRWZkVDcyTW4xT2JTVnBVNzZSZlUxand2MXpVOUZ0V1l3dk5YVHU5bF94cmIzSGJVeE1vQ1l2cjJnQUZ2RXVHaTJwS0NEb1J4LWlRcmZlS1Q5Rm5xZmpic1RxQ0pseHViNDA1MjRuVFhTWVJQTnJscEhJaVhBMkRyUGtBUUdGakcwTG43S2VrY3V5ajF0LVU0T0dNM2JaYnY5ZGJPV1hIcVFQUGhrcmNvTTd0SFVyT1lPUmM0ZFdsX1JyNHlqYnRmQl9Zb3BtOHl4ay1uZUJ5VzJqUldaSHhMWC1vZUlQZWFBVFBvTE4wZURsX2F2bTNiY2hfb2xNOEFfNExTdjlDMzRwN3BkcnVtd3ZaWTYyNWpqTFBxVFBOMTFzQXRDVDdma3FUODZxUU0ydGkzS2JBRmVSY0ZtTzRvQjA4YzZRWDRCWTJVQ21xT0Q1OWV2RDBhanFBdnhOSEZ4eWVnS21MZERoREN6MmJIbmJUMlhqQU53aUhIQUV4SnRINmtSMGZiRGF5QzRZZjZsZUFva2xVeF9LaGNwUjY3Y29VZWN2MTJPa0NhZXhCZFJKTmI0aGUzTEVhQ3pOUGZ3YXc5MGVMRnE4RjlKSEFLdzgwNW9URlFyMkZBcWl6OEppMnRsR1RsTW80YndNM0FJZUhpTFZzU0xheWRJMzJRbWVzeE9ScG1ZNVRPSHZLMW5QaUduZGZnWkpNajlpMTdOVUlKcTRaeDhHN1BYWERJcWlseU95UWdvN3UtcTlhd1VmcHh3Z0tMb0pQNXVqVXZucWxBV2VPZ05KbXZNcTIxRU9RTUdZdWlROU9CUTJROXpyQVNXWC1BQW1qemZEUENXcW5BOHNUQnRTZ21FY3l5eDkzek5wdjBnZDdhd2l0LVBlVlZBWXpfRGxickk4dkNOVHZxU181ZWJwZmhPZmlkbDBJV1lBZEZQOXJVLVI0M1JOZWZ3bWM5V1pLek1RZm1HR0lsN01RSjZBQ1FORVNsYUIzdXl6RmVKeVdfQWFTMWh1RS1PVGVoVGpaWEtKY2VPSEo5MXotSFFQNEk5bVhrTXllRDh6UFZUVnVNN1BUNnRYcWNoR1FSdktIckVudmFUZ2tsRGt3bXZHOXI5N3FGQ1htRDB0Um9pSXFKN3lSNFlNN0ZLVWdaRnRpVEVvWEgwb0tKc3ZQQzZBcU9ZcXNlTVBWN0t3VGdZbUdjTWRFVlBCT3BBSkF6MWtyVTN3UVRtb1pDNlhhSlZ0VHptVGo1QzhFekdEMkFsT0VFSjNrcnJyTGVRR25hTFdhOHlPUzVWa3VpNjNvQ2RhZHdqLTZ5ejVtYTQzLXQ4Slp1a1UyWC1HYTAwZ0J2aVhWcnVuNW5BczFRMmwyUTlMWlVESG45UGdCd05SNWM0WUN4d1l0a3FmR1Yxb3FLSV9rQ3lSbWYtSVdTM1BLbFpNQnZYaHFzakIySFd4aHR3RlhJWkpPZ09YUkcxdDBaNGVERWo1b0tlMGFzdHNvNnpySWZ5dEZMMHZhT2oxZ1VjR2R2ZHc2UXRNLXJ2el9tNmRUWktLb293YmJpTmt6SGRuMEQ4Q25MU3JKUW44YmstWDJyTm42VmgzRUhZZWNBSE9BNWRyUHVBdy1WNnJXQl9FblV5ckJwYVVUVTV3MWhNYnMtcnY0OUc2bk1WYjZtTFVkU2ZCZURfdE9XQXptZXhVdXB1eGxkWTdOVGRfTGxKRVFxNUVQQWt2SXM5N3Q3WnlVMVZuYzJ5N2ZXZ1N2NkVLQmNmanZDWno2V0FjaVpPRkhWcm9hQ2dsM0NFQzFkNW1wcHluWUxyS3FRRDQ3OGRoRmNuQXp3WmgxNVl2NldzR2lkRGRiOEVDQmdOZ0tZakJ4YnpmZWZJNTRtaERrRWl2Yi1nYnhfZlJJTWV3MWdBb3ZKTWQ4ZnJRaTNhRExBNVFySl9ZNkpMWGtKdzNUdVNpV3dOX0pvNmRJT1lTTEZhdk9aMXZjaDNWaTJKcWVJXzAwbEs1TGo2MmZYNzhHTDBsd2RGRk00azVBUjZMVEl6bFlNRVJuM0dHbXN0cUh2bWxpVFkzaGNnNXlpTEx5dmRsWVB0WURQTjVRRE1NaGdWdFctUm9QMVNHbk16cVVrU0pfcUxYZ3BzQjNoanFkbUFZSEk1cXJDWkdyR1pieV9Ock9zVGMxczV5QlhGOVhkWkFDZkthWFcxdmpaTjJFSWEwMzRNOEw3ak5DdFdCRmhzM1VRMm9aZmJHQ2ZqbFdqdWJsV3VON2pBWDJTVnQwREppb2ZBZFJUZXhwY2hrU0dNRGJNR2daT29Yc0dJM3I4NUttV2RQOTN1WVJ5a0dxVVBnRlJxMjVDaVh0eF9BbWdVOGRmb0F3M29takNMcTZUVUVkZVoxaWZJZDFIeWRWdDFFZFlCU1Y4cGU0dzQyVnpxY2FONkNiYVh5T2NqX0ZicUJsV1owM0FES0oxaFM4Zy1wVDF0aG9SRWQ3U2RhYlFfUFhJVlYwMFRKR3AwdS1VYW5kZ21zU1BCYTU0QVVIQjBrbzNWV2ctdmdhSmU0WC1DY054SjREbmZzVTVzNWlSVm15aEZmajNBUzVTREdPNjlMQ1RoZUlhd3d4M2NwZDZHa19nTjdwel9IbFhCNTkycFA0TXcwTk9IUG5lQ1F4SlljVkpvTC14ZVJBWHMxT1VJMDItcy1tWWE4bTRGTzU5OVZwbnBWQzd2eEZybmluUm0tU09KSktSSDJYSGRBbjlTVTZlMUlVMnZJaE14djBjdHh3NHVWa0d1cUhnRW9xWWYtQW01dkpLNWs2dE1BSVI1RDAzdlBpLWtGY2w1YlZUNnVEOWJSQmVDVnZXdzZac2lydjdmMEdPcXpiTFljWDZVSEtOYXhPV3AzMWxnRndEbjFQSG1zWmZJaHB2VWJCd2tocl9VZFNFdDdRRjAzNFdsRkV6TVRTU0dpZ2tCTlltNTZ6QVpfY2VSaS05TG91ZUUtaS1aLTNBTC1vSzVfbXNmOTl3UkdsZ2pWb2kxYy1PUTZQY1hPOEZERHNTVEw0V25vdzdJUlByRnRhTnRBcDBEX1RQNmgwSGpqYnFjdU44eU40MEhvU1NXbl9HOXJTLVozRzM3cURsZkdEcXZyOWROaFB3d0twN1BHNDZNZWF4bkI5dGYxSEZ1S2h3dkk2MEZLMC1kVFU4b2pqRDQ3SS1teXZMaDJITy1hTU9PMS1iQTA3dkltT2pobWh4RS1uSXdzQVk5TURvQ1hFQTZYeE10ckdFQkNOVFVaQ1hTSW4wYmpUYTVKNlhXLUl6XzdLU2dhclRla045N1RMVzdFdEpUNXFwekhYajViZld6c2JKMWF5bWVDczFybFkyZjBLSnpLXzk3QmlCazlMVjdwU0VfX2JOcTFpa1hvZlVRZkFKekhaWDF0M0xRUzhTUVRhRzBsX192em9pb05NeWhTZ0tUR0dGenpabE5jdmRCRTJEeURLZ2VkZ09lZDJsd0MxTjg3bFY5U1pSNUdPbTV3ZjY5MmVMYWN6cEZFMGUzUHg4T002TlM0UkQ5QXgzNDhZcU9RS2tlTElFRjR1UnVzdTlGUjhDZ1Z4dXBlckxabFdaaWZIVkdudDBrdWdqSy0zU3FwZVg0ZlVlbS04LVZBY2V6LVNpbVc4Q3JybnlCSDdWNUlqamk1MEZUNjFFVUh4aE5JeFQtendlLTRlUkRvWUVhN3hwdUs2MDNZTlFUSU84a25QeHZaUE4ybjJoZkp3ckRhbkxkaVhLSUxWUjdONE9RcGYxd0RUbFplNXJuTzJQbVBNSk1zZHZvUDZ6ellYakN6SmtqQ3kyVTBnb0pYQ0hrWi00Rm9FZkpnQWJLNGlEY0lLWGIzTGZRSE9SQUFfTmx4THU0bmFpdElaUVdfNktqR0g1eXV6ZXFKdnVqTHVqam4tUXU5MGthOU5JaS11QUxxcU1QYTJ6S0padnJlNkJBTU5QTU1PODFFckRNc3lNTDZ6cl8zSWl1ZDE1dWtaRjVDQkpmSXZWeklxSldwanJiYTRldGF5S0dLUGZSc1k4dUpNU0daUTZSa0dra1RrWU1scnhlaG9tM2JzcG5QSkJqMVUtaU1paDlKVEE3d1JMa0RsVHEta2lKbDZQYkVielVsQ2RvRFNLUkxiR0RlLXEtM0xWeV9Wa1E0OXlrUy05Tm5GRF9PTDVFNlYxSG9JMW10dVI4SmprOWlsbWxmR25NVHp3emY1UGI0Wkp2Tjc2WWRZZTE0dnoxbWtPZFZnVTVicm9PNl9aY0NWQ3E0MUxVZVhmZTJDZlN3SGJfM0x2aW5ZMWZMMVJ4UFhIZzlwendIX0lINXFjRWFybUdQcFpVNUFKenN6dVNXQ0k2QlNEdmNpbnptN3pNNjNoUlFxNG42Z1U4NERJWjRhMW1pQXJyN05rbjlDVnVRdDJEWHVUcWV1N1l2UkNtUk1qNVFYenVEeHJzdGpfaHlIdHJmUDFNdmlxWnFMckUzbzZCRm1vZlVLNGpWUEJzZC1YaHMyU0J5dlFjVjlCQ0RjRGU5X0c3bWpobTVRelprMEZxM0l2d3BpWWI2bkc5Uk9vZzZRQnJQVjFwUExjc09TMm42WWoyX0RNLXFBSzNLdVVMamdXRlNMNUVyRzhwUldHT3ZWU0p2X1c3VXBLVHI5WXZGUVEzbWZyN0REYTVER0tRbzlfblRyVDUySkh0bTNSVUE2bzlqNy1hUUVidnBNUEx6eDRGSThGWWRtejQzMXlpMDhEbVMwVkU5SVYtRzhoOXpJY19yZjZsWmU1dS15bnVZNnJQUV95bGFYSGIydHpLb0Fjdkxpckw1RVJBZFNBNk96bEU1SVdZcTNhU2JPTUdxN0dCc3d2LUR2UUxlRGtBSWhQbHFyTGpfX1pxTHkxRTVrOEt6cllnZXBjdUc4M0I0SEFfWGp5RXRPMDQ3cEZma0ptektBckdOU2V6NFN4cENIaWdyNkZIMHpaVWYxdVNFNVFPeGliUVVJa0ZQV2FQcUUyOVV4STEyQ1JETUtQLVlpZjlWQTd0NjB2XzNPS05XUVlHZl9UcGRKM3pEaC1xR0NOZFlxa3d0eTU0TUtvU3BLNzZ0X1lEZ2NCcm9SNm15NmZtbVRUei1lSDVpS0ZvSnFxYWtoX0o5dGhrU1l1alNzYm1zckcwMmZidmNMMW5uOURRSUdVMlJLRGcwWWI1cVVoek1nTHBraWNjbXZ0SGlrQVFmSW9nZWVmNTMwTnhpb3VBOTNYSEd0dTVfcHVYVGp3REJzZjhPdGQ0eE1LMWZoYnFvZXpGYzVJRklxWWt5WXlBMXFCN1E3VmVwc1djSHF1cEVtOHhjendOYnhyeXh4dmpHaUJwbjllbW9HejdQc1RuWmpGRnVRNzZxcEhqblRqUENWRnFHdEp0N3pEZnBkcGZ0cVBYVk1sQldzT3NOY2pYVFQ4eUJWa0ZSbVN2akNzeE55OHZuZGFEZWh5dno2Z3ZRbXBzNWRGekhNNmNHOWw4M2ZSNWxwTEc1a0JQbXlkQkNiRno2NHhsX2VGVW0yUFVtTWI2Q1ZSaHBmNXJjZmxHWGRRWDlDLVBGSjFVSG1pc1JWMG1VM2xnekJuTWpDSzg4MFctNGZodldLTFZ4OW5KbEJObTdtWF9ZeGVMQUg2Vjh6VFA0YTVRaEVIUGVvVFJ4WlEyQTM4emEzcG5iSS1YaXZsOTE4eHBGVUN3UExpbGRjU2ZGQU5xNDk5OU43X1lUVmd4bXRPTi00YXJkWWZwbE9yRnMwbzRzbEhYVVNOUUtNQUFLNXQzbGFtcDVNaFZRUWExWFAwVk5SdV9KS0lZYUJCV1V5T01hd25vZDA2MEY5T2N2Qkw3ZVUtQlJkak5NeVgyMFRMT3NkWUQ5SXR6STd6RVFIX3l5R1FEdVFfall0X2ttTURTMl9FTFd6TVhDSUs4Ni10bGFCT293dnZGNlVpWlRDM2N5WG9Ic0ZoNzFjRC1MWks1VXg3ZFhRNmR4bUtGRDE5SG9uNlQtV0FySk5lOEk1NGpUaHU2SWZqX3M4VDhMQVY3QU5jMl9INGZzeHFuLXg5MjJ3T21BamQzNmYzMF9wMmc2VWdlQWZNVkFFc3czWG1uUjhhbGFLOTVkMnJKSF9fNzVOSDNIUjl1RXBaNV9sLWRhNmVDOGdvUDBLbTk1UU4zeEtVSWxjb0Z2d3AwTTh4QUZMelN0RUVSN0l5dDNGRnNBalVuNzFIWlVIM3dEVHpNUW5Bdnp5RWdsNmtkRnp0dG1PQ1NOclBGTXJpQ3FCejEtRXpYT2YxR0d2NXJ0N05aUW9VX0hjM2xUN2N5eWNUSV9JNDJQUjdmRG5RUHAyLXZJRXNOQXoxNF9zXzZxUktVVldoTEJWWUVnOU1NMXR3bkNkM0d5MjBKMmdvZ2xxbzdRa3JXYXp5MzNBdVdXMV82RWxOZHQ0OS0xYWNpTHNCQUZxaDdxcUM4eDM3bGR1MFhRTzczU0pYMDV1dzRSTk5fUHFXOGY1cnJFblhuWTV4cl84d1gwOF9EOHlXNjc1NkxFT2Q3Qk9XYmRCbHl2a2lhTG5naDN5UDlPQVQ1ZjV5cHlhc0l1S3lPckFnX1JqQUtPZzNUQm1UZjJZTGs1OUNxWFpnbWhKNHJrS1M5X2p3UXI1c2lXZnNFclVXbVFRaExueGZZNGVXMVR6NDdRNnEtSThJdmJHdm9NZEc4aGRESXhzczJTQmZLZ0lpZlB6NGpuLXp2TVVzOEZnTDA4UWpDVEFheHFHOFJYbVNqSW5aRERESHlzY3owSmRabHpITDJsZkNMMVk1eE9Ha2JrTV9YZjBreER4ODF3bVFjWTNXbjl0eFlFLXhFVDloNndOTGN6UVh6TzlONXFpSDZpNGJadlR0MkxqdmJrV1M5MEw0TFVFZ2puSE9PTVQtWmtYbWI2d3FoVzlfbjNvWkRZcjlNQ0xPWU5FQ3BUVzF0aGZtTVRDTkk5dW95V1hHZDdDVXAxaUo2UGRDT3lXb19vblpnaGVQY0JNUkhmdU9NN3pfRnJIdTlqNEN2Yk5nd1A2cnFvQnNWcFJMRUp6bHhZbU0xZFF1WnFheVlYbXBiOS1XTnhtZ01tWVd3TVhaZFZWWXJhOTJmSXJUVzdkU0lkeVpZQWI0YUtIZVlMdExJTEtkRjZHLWZiNmVVZTU1Vm9sMEl5S2I1X0xqTFhRLUtBUW92OC1RaXhUODN4N3k3cFZDeEZ4R3R3ZnBOLTFVaklfTDVEZHQ3N1dxMi1wN3JaNDFoOE9ER18yUmlOVVFucUFEeDc0WVlFX2I1SlA4MjY2SDhCSEQxVjFWUFR0aVFvUFNETF9kZTBFVnZ3dUt4Y1pRYnV1UnpzRUpXZHZfWkVJRks0dXdfaHdQOEV4ZGFpb2M5a1FzMmdJem9DVW1yaGFjSkZUU2J6YXI5elBteld2Vmc0a3ZjVUMwSVkzTTMxS1JhT0plWkkxQ2FWWmlfblZHLUYtbmFJQ3hIcm9tQUVBZDBEVFJJOTNBU1E3QUlIVE10bDlfQkxOaEo0UU1RQ0dSblFXdkF0SzhvbnA2NGVzcXBubzFfODktWDFzTVBaejlOMWVOOWR5UHBfZlVfOEpUdmwtVF9lRGwtOXJaS3duUnFOdHhHeEZuVXBNdXE0MEg5dThlMHhYbXJlOGdTTzhxZEtKeFpvMkNEUE9Ca2RGcF94Rk9GNFNCUjdQWGx4aHl3SWJ4dVYyRlYtd2FERzR6UDZCa1ZKdlZHejJSNkpzTXVELUoxdWJtc2hhQTJsR19fbXItLXVUbFlybGxLanFVUHBQS1BGUDZVZU9weFVWdV9CWlZBYnBJRmV4VVdxc3hrZXdxaGlFS0lSckF5Lk9YUTNscWkxdk4wNG1sb1Mxa2xPdVE"}' + string: '{"value":"JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmR5bWh1WnJvMmhHTEdNakFVNEMzbXlJU1JPUFNDRmpvckxUcU81TkZCU25RT19LOW5BSGxoeUFHSXJnSDhmZ21CY3QxZndxdTI2TEVPVmJZT29Cbk5xMWg3U3c2S2tVTkVhY1ptcVJFYzRmb0hZVzJDYW55ZHJEb1JZY2VUME1aSEt0MTFIZF9KUndTZWNnS2ZyTVMxTFhjdlZab2MzY3hiT2wxRG1rOENsZElZZ2dROGwwcXZTclpsWV9qTHRtaTc4SHBjSTZoczE3aFRoYTkzYXIyVGszMUg4UjhFR042Y09JcW55YldCSFFRQlpOSU12RnRnY3hZRWIzWDBmMzlmdk1sajVTajFtZG00TDN3VUYzZWNHUWVIODdLQWtIemJiWWV2QTZmcU9vaHVuWUY0aE9XSzVsaS11R0pGOUprdFBDQmkydF9jSlJ2eGdBQlJpRlZLUS5EUEtzYVRwaEVKb1ZJdEpXcC1MR3pnLjRjMnlBMzFLcHdSQkNDb0pkTzdqdFk0NmxBZUlJOHhORUp6TU9xd3JwWjNQREtVa1JhOXhKdWVIVG5SU1F5bk5YSmY1LURZVjNqRGZlVjhKamIzRTZaeTQ5VTdqZ0pvV2lkZUthTHRXQjVTcWtEd0pSY1FuLW5aTVdJajgwcTM5RXV4eC0yeGdNdDlGOFhObmlWNHN3R2xOZnJYeUkzNV9OMktGNTh3RmtTcVEybmZRN2owLS0zeXBGZjZrN05TNlFJYXNWUEIxMkxXRGFQSzBVcm5NV2xyQ0hGbkp0WmZ2Zm11TnRMVnRQYUVIdDFzZFVad3lsOVhQSTk3ZzNpbXFPM3N5UjJ3ZmtTUGtXdE9kR0VQaGZKWElvN0F6NGcxckpucTN5OEd4d0hQbklHVlZTODl1aTJRdFVpMXM1VHVNZWxtTUJmczl1ZDVpQ29lSS1vNmtJQ3FqN3Rjdy1rTkN4SGQ3NWE0cXdDTnU2ZlNjM2VyY29BU2RUMEdZYVdXU1ZBWmg5cC1QZzZlVXlSUF8xbjFPcUlLWDJPR2NIelNvRWZkQmZMSVZxQUZJaDB4X0tqckcxOE5ZXzY1V1kzNkRJVjR4X2ZHcEQ5QXdzdVN2a19PSVZ3VDB4NkhtRTRhMU1pTzl4TlY1R3Q0N2dIY1NrdldpM2JteTE5VHF4X05fdm5PZnE2Q216WVhDb1JtdVZnaU53WS1fNXNoSVpHUlk5YUF3cUVxRUNkOWJLbUgzeDZlWGdUR04tWWRrSkVHdkt6RTZ5UExHdGdMX0RqQmNMcW5JNHMxOXhDRFFLTnJIZEx4WEpQcVpHYmRqTHVfbGFWcXdBUnI3S0lZUG5FNTBOalZyUEpZU2ZaRjRCMWVPTUJvang1cFJFbERDODRqSTRvTENJdTBhbTlnNVBudlhUQ2FHSUJPaTBCX0J1ZkZZajBndWp1dTdHZl8zdDhrQ1UxQklEYXQwX2JlUmx2MmJrR2RNQnBNRFlRaTZ0NmV5U2drYkZZM2dseVo2U1ZWNE1HNER0cUJCWnVISmRCZTZzSFFNRnliNHFQTkpfN1pGVEJHLWRfc2gxYWJhWEM5Wk9qV3FwZGx5RXBKaE9kd2dXZWRXcDFOQy1sSWE0eWZoLUVjVTl5VDZxU2FXcGd4SUNEdjJZekc1QjE0aGlUU2ZKb2txVG9PeEtWV1gwTjJGc2VBNHduYjBZWGdXSW5aYVk1WThsUkQydzVrNEpTaGYtUm1GejRvU0JLWEQ3UEp2dTNCTEg1RF9GVlM3SEZHajdMRG55MkF2RnY0ZVdLT1ZCWWphb2hndVhFOGc0eXFsUVZERGM5NzJVWVVsTS1SSjdqUjlGYUJGM1htdlViUjZSSjd0WTlDeURuQ0xJUWI3YUFJM01iRi1uTkI1aTZaY2RyaWNXWWo1UHM2NUpBZzFGZlRrUmRINXRkRXVlbDhqandXNDFoRWlfSl95QWVCX3BTNF9MYno3RS1qWTFOTmEtX2loYUtqVDZEM3JpQWc5WU5Ud0hndHRzTGZReTJWM25admlEUEZSRkJUVGIyNW5qeXQ2VGwxanNmMVNibkhnaXp1NDUzQXVWNXJjNzlHYlBsZ01pd0Q0TDR2Y0JLSzdVMVNNNXVXN2pPc3czeVUzMFQtSXlDUUJ5aUlpbnU0R1Z3LUhuLTZKeUFYZjExQWpsSG8tcW03dDltZmJxOUNYaU9Td2Y3N2FsNXQyMER4T2tfUkU1cW04ZEk0NWozMjBia284SkxjV3VVODdNNThYTXNVaEVycGM4OU0xeXpBMUM3TUg3VnhSZnlQNUFBdzdBVTVBUkx1VVhleXd1Zk91aEtqVjEzZ1ExNUYxS3FNVkdxWFY1U1g3Sy1waWdrN21HUFVQVW4tTXlQYXQ5OTVDZ1BGMTl4NnFmd2M3RGxZSDBLbklQd056bHVfTHA0ZXQ4T0NST0sxOFd4ZzZmNUdJdmQzOF9TWEZWMjJyOEp2enNzZDFrX3htbTdWOTVGbTE4QW5WZWRVanhueDQ3aGFyS3JQdGFsOHo0TDM1azZCSDVFQlQ3SXFxUWhodFQtenUzTUsyMzZISWdsd3hGci1kM19IRnlCMjd4M3U3ODFpQmlBTVZ2R2tERW1uVGhOQ1c5Qm1JcEJ1bnE5eS0yNE1HRUlSY0FoWFN6R3VzQUtwcUJObElTWl9ZQWVxOXJRVXowYnZfSUxsNkRJdTdGYmlGLVVuTFdOMWdRUWlkU1dHVVh3Q2YzN2JMeFpIUGFCOVFnYnp5R3ozUDNxMHNiWk1Ra1BWTVZPSWF3S29FeEdvX2lPd2pSMDJiaGh5aWI3em10NmJKZ3Z6R2xZbC1uM3lYYVZWeEx6M0pQVWVPVU40Uk1hT2F6SHYtWE5wYlFWQndUQ2MzdHlwSlJpanpHVzUxOFVNeFFMRmZYajV6eHZrb3NxSGl1c3llR0NoVWFSWm00Si1CQkRuYWxCLUlaX1NoMXR1dnRXT0dJSHRCV01qY1lmckxrSUNJUDktOGQxc3AtZVV2Um1nRzNseFFWQVNuRnJyYk9NNnVzUEc2bEtiZHVhdnU4VDFLUWlNSHdhMVdYNGJYYUp4LUxqcE5rbW0wbFltT1RwUjV4bEE4RkdwY2lvM1licGxZVnVzNHhWV0NmS1lEZTJ4elhwMGJvSWU1Nm8zYThwOERrbDhWR0Fwd2JRdDI5TXZGdnRhSWpDRnJyYUdRZjV4ZG1sa01PSFNLaDhQb3R5TG5talFSTlZva3pEYUl1dUtMSjNRaGdrNlRhejc5b0pLZGlMVkNPdXNwMERSS1I0SFlBV2pURHVCLVhITmd2YnNzWFNFTkQwMHoteDVfcjZfTnNzaVhFU0hodENTMHNjT09DZEdVNTA3MTZpZ0szYlVSU2RzZ1BzOXBnd29vZG9Cc0VQdXpFN2ItZFhVbWdxNUVFNlgzY1Itcm4wblRFczNac1dOdjhuanFfSVYxMjlNMVpNenJnT002THhmVGl5WjBScl9BOF9UQUFXRWpkODV1VUI3NnBiMUZXdXFOTHVwLW1fNUt0elc5MTJEZmVndVNoSEljS1lsT1M2U3YzZUVhWlZlTnJSWUJsUzZYLWlINVl2cVJYX19yOGYydTNYb2JpTWxNbk42TC1jN3VqVHlCa09wQ1lVU3hoNFptWHZfSHhJZ0t6OVlLMXVzNEV2Z1h2bWFoN0NXSy1NRmItSzRMLUUydWV3eGc5WlpMRm1iTE4zcXRhMm5FRGF3ckFIN0E1QTNBU0dDenFmR3c3VzlwQzA0SnpSS3FYMnZ5U2lzaVlJUWpCNUVSQzdYTlNYN2xWQ3ZpYnpsRXJlNzFSaHh5bUlLekEzQ2VTTFlIX2pMTEE4cEh5Qlo0Q2kzWlNOcVBrZXhOWlZRdkxKZWY0TV9JanV3UkxmY0pQSUxiOFM1Ymt6ZmpaSDZKdWp4Ry1ycl9LcTE3STQ4N3ZuWVVGSGM2UVQ3XzZzR0lCUzZncjRPSkFLSUdMNjQ2SXhJRTExdWw3YTZJYkZHeGl3X0c1QU9kd1Nvd0tmckVVVzFMOEE2ZWF5VjVjSFRIT0ZHUHYzM1R1U1VpN2pFMTJXdm40eThNTWJKYVhTNkFJVS0zN2Q0WjRmbFpjNU1ZbUxIVktoQ1pMYjh1Rnc2REZCamdyY0Y3MVhUVG52dVp0cEgwZ09EM3ZqV1dvZEZwNzlqdzNfNHkxbVJvbG1semhDaDBZd1IwYkJ5R21qS2dDVEQtNjdidEdZb1FHLUY4SWprUzJxcXhWWGpvWkdyOXVJZkNuQUpTUmRlYWNLaWpkc3FKYUtHSk85dEF2YXhXWXc4MUFMQUVqdElySk1fcTJ3c3liV0tSWkJmX3JUQVNfTFJUSGVpd2prRVVtZ2lWelQwUEdfSjRDWGM0YnFhcERhQURGTGlScFNwYUlKS3JhdVc4UDFsNzROeHRVbXB5SDBRZ2U4SnJ4b3lYTDQzdFI0T0dOLWg0aUUwRzNoa0MzSzFRQ0Z5NXN2VmtBdGxha2l0aXc3ZVFGN1pjcEtSeE5hREZEYllUb3pFTVJWQUtWa0RYbWEycjRxVXJPc2ROSlROQnFlWWdhbnh5Q1RpR2FNRVZEZjdEanJTWjktTVJ3a3R5UVF2d1NYa0k0VmR5SlViX2xJdEF4UERkMUNpV1BYRkgtdWdEa1RrQmRCdEpYMEN5N3Jaby1kSUJ6VHU3cDItNTJvOUotVUhfbDV3LU9FZ0dZaENnQUtGTkpaSWh0Z21nY3ljUVdHcm1RT0plN3QzNUlIeExwZ1Z6aTJGVWp0QWNGR0dPeDVuQW1DTVZOdzhxQnZQbnV4bzJSV3NZa0VJcGRRU2MwS3Z4MHBvWmEzeDhObW1BYnYxa0VzdzhZNjhFNG5wSTB6bnFLYmV4NFU2OFh3ZTBlSGVpV2lwemthREpUUnRqVWg1eE5Wak5RMktPYTEteHJjSjJ6MXdJc1JqdXp4VklNaGdpSXVleGp0aWNleU81WnBjUWVDZ3J4UWx5bFdTdnNOd21nOUJIWmNwVnZaNWN0LWVvZ1pQSUN4S1pZSmNpTXd1ZHlZdUtXdEdiTVRMWF9jYzd2NXdTa0o5VnZFQXdfUi1QeW5VY1hZY2RNcUw3WldxY2E4czVIRG1lWlNZb1RWTnBSUzdJRFZBMnh5Q3JZWjZkanppYUZHT0NSS196d0pPWVEyeE4zWGpMYXAxSWNFOV9qUkhJM3loYUQwUlVyVkppNVdGdC12VnlsYldVeVNZa3JzZElzUGVzQ2U2S3NpXy0zdHNzNDNGU0NCVkZ3azhhbkdxcGVwWmdneFkzX3JtSERiSjBaZmV5SUlkb1RKYzF4Q3dGZ0kxZ3o1X08yS1BXWWF1ZGdiMVpjRmstS1cxSG1ISmx1cU9Qa0NzZUFGYmc0M2NZTUtsNjJKY0VsVjhQdlB2Xy1pMFU4ZDJ6bEpfUm4zakpvb2NnV2o4RXR4ZEh6UGozdnMzRU13ZlpVQjIyVnZGM243N3g3STZxTkhVZlNObGo0TWxnc2ctVFJfVW9Nc0M0dUlQYnp6XzBUdlJfMXQ5LWVYaWZWcF9zYXhEWEJuS1R2LUxSaEIxRjA0d0R3SzZpX2h2cmdwd0ZVbldSME9ObURSNVp3TmVaMGZ5U1V5M3lFNnFZLXZSbXB5RjVqdE80V1dSQW9mb3R2OXJNd3FvNTlvNUNmY0kycVVockJvOERSd3JzOHFMczR6Q2Fxa190RlZ6dzVrdkoxSWs4U29EQ01COFYwWFJnblVLS2FndFJ0UFVfUGh3c1BpMlU4NGJpeU1WMmJBQlZsVEx1QmF6ekg1UE9Jc1o3bDlyLXV6ZW5XR1ZwbEpFUHB2c0ZEMy16OHJ0VXN6SjVNU0NJcERRc0xMUTB6WmZCY212ZURJMnZ0c2JvVEgwSVo2QWl6VnlTVUtaMnZDNFNCRml4Sm9GT25YT3ZUZGVfeFQwRGJLcUlac3llX1lLbG1Kd21LNHlRT3JwckY2NkRjZmV1d05YWkJ3a09RMktJVVJOenFQX01ERmtIRWIwamtlektrTjJ2amtHcXgzQ2VjZHY1SkZCWC1lSDlVeWIyajd0VGphSkVYbUtvZ3VDY1hJNjBOX3RyZGhRQUpjeExnQkloekJjQ0s0RmRkZ24zMDh6b1VHMU5pc29pWnBKekIySkZuZzFDeUpJMXlSTWhSUEdJNFRlMmJxV04weUdXS2NJTmI5NUIxcXE4Vmg3Si1IM1RZeEtydTVKTjBDNmdoVDJKXzRDdzZMNWdMd2dwWXA3VkM2WDJmY2ROcWRIUW1tRy1uLVFYc2Vfa29MNWF5U0tidkowYVN3UF84OFlYYmNBU0dhZW4zSVpwMUNhaVRfTXNMaXBXX05rOUZYcmlXcHhNZVYyQU9sZFE3MmhjYWVhNlBTS0g0blZwalhwMTk2X3lMT0JOTV9Vbl9Wc3FZZzl3NlVZSlZHYloxS0dUd1RVMGIzb2Y3b0ZnLVJNTUV0bGtBYlNUTk53ajRQSDM3a0JGVmhra0VkYmxQdlFDRk9zYzFRM1BDcVpqS2dsZHg4Q21xaHNHVDN4QlEtczd0bEdUMlJLaVdnbWZORDA4dHdOYlptZnV2QnEwYnpmandnQVhsYVZwUVp3d19sV3JoNmJUamVVREtfQmc1bHljSl9JeFhQOXl3X1pDZ28tN1dYaDlONm9fRDEwM2ZVUjBhLWRuaGs4UXhCbGc2bm1QVWVLekt3cGRrWmxYRGNMazBmMW9DNURoaGR5SEY4SkM5czRBY01LVzUxZ0pBSHRFczYwZzQwcko0eTJKWG5sbnoyenJHNG5zMkNRc3lfblNWUXlWOG8xaXdxYm1pZUN1dXBSTFNZcnF6M0xsX18yYUp2UTB1cmdqVkI1bkhhMkpkVmZvTXh5WDVwMm9KaHYxZE8tMlFuZmJoaHpZNExVNG9qNmhMMG04MXhfQXJWRjBUaVNNX2dLWlM5bHlPR0FCSHRPZi1GYmZzNVpOMmJKR0d0ek82QVRGaWFiQ3VTX0RzbHA0YUg4M0xaNGZ3WXphZFZPeG1UaHFIUXJyaGl2TDAxTzVlYk5aa2Rnc2NmblowLTNTNjA4QXNYRkFYM0lhRFR1ZVhDa3VQc1BtcWxLeXRLVmtjOU9BVktIb0I2YkR1cDVIQzZZQVY0dkt3VXAyUlN3dDIyNE52eTJ4RHRfd194c3VieGdSbnhPMEFGaFdUQ0dqMWhKeExZaXJLQVlKNTlVY3hoV195RURlcjhhTWdrWUNkWHVMNTNxQ2dLbFlVNHNmN1hGYktFWHdXUUE1RWd3cTVsRHlVbksyT2kwMlIwVFpBbWRfZFh1ZG0wMWFnZ1FiNlVwYU54VDU3MDM0Wng5U0Q2T0IxRzFlbGtITEFHcThaT2d3Qm84c2YyOWhaLVBBZDhpa3QwQkhSOHhBODA4SXJlNmtzSkJDbVk0WTB0OGo2Q1NvNVF0UWtSdzZmVmE0ZHctVWNSc2s3NkxZSGZWTVRXQnZMRlVNdEVSRUpoSGVLdlRjVHcwdXpTRHJPcFFMRXlISkRrZV9hVjRpenRYVy1nTHNDd3l3czNCLUtoQ3JJOTktZ214QTVVOVczMEdHRWY3NVFWU1FiallhU2JxVmFQMHRuWVc1R09meGFtYVdNMnRUcC1VRVRyRHhFMGMwY1pCbEdEUFpjT180Zm5nOXVvSG0zVG5EYk51Z1ZIdGI3N0F0RzJ2ZU0zc1o1WldpTWFmRXRTYUNHb242OG5kWDRFR1V3STdEMzQ0YVhFeGR0UDRaSWFnQ1d2Ukd1NHk0Ym1RbURqaHhFbnVMOFdLS2JXTDFYQ0NyNVFyU3liT3VIUl94d1RnRFFRY0k3YnVxTGhMME1jbHBTR2VTZ25VaHRkekI2ZTJiT1E0QnVyRExjbHpCVFVwMzhtWm95TVRfN05PWTYtNHktTjE2SDdiZTRQVFozTGh5eUg3dUNYYUtsbFF3VExERGIyZ3ZUdmU1N1hfNzRkbHBlNFFxVVZ6cWIxcnViVXk0Q0c3MHdsTUFGMlphdEh5WmlhVHVVR1lSbWFUQmhJamNSZFJzZUVMdmV1U3pMMVEyZGdmbGNsTGdQVU4yMFdHSURKOGxHdklqU2NzbVNjZjFNSnNRSjVPRzVzcmpMdVYxZXFHUkVBR084bmlXd1MtN3p6QlZxbGptUW56MGhmS2tVbXRMMEJuYktXYURLeUtsa192TnNBSkFqVEJRSlpTdkxaUG1xbmJ6b0p2N1dNN3Q1dngycEJsbDJ0dTBRM1R1aDdSWTFOZUROWDZta3B5bmtrR2N6V2E2TU1KWkdLYU1iSDIzVkF5V1JScC1BRkx0b3hWYXFqOUpkei1lNmUtaVNwQlFpRWFxcGpvdFpBT2twVGM5VXNsT0szQWdrZ2FMX0RBU1FDOEc3VVM0VDJlLUxrci1Dd2QxeUswdVdmVmU5LVpBYW04R2ZzclpWTHJGMEJIXzVkWlZoNlB3N3FEZS14ZVRfenljenlqOXFFYkhTTjlqd3VRMmNmWTJSZkUzZEpoTlJaYzBlZXpyVWZxa1JuRXFvX2xTMVBYampXV0VoUE1PcENYbURqMV8zWllaLUVpSlItWVZBUEJSNXQ0eE9hdFhULXVyT2N5NlByQ2s2QjNLNTNQOTdSU05WLUZ2MDE5NzJlTVdZVllOMVdjaDRfbmJGcjVhYkpQV0I2UzFuUEprU0hyU2Z4WVptRmNHaG1jc1BSMFI2V19hMm5DQmhPTFBOUVdQc184Tk1JN1ZPS1VEU0lLMVZRWmJpLW5kcElfRGxKZ0pGcnYwU3Q1NTlINThjXzZrNFBENWZsQWdkWFBKbmlRX2FYckRpTFFaSlhRM243ZUt0Z2J2VzFGek1sSHAwOG4wd3g2b29xcU1aenE4eVY3RDkzSE9wUVNLQ2hBVTNNNDVEZnZzdktFTVo0ZFRlaFJIYWo3SlZGc2pWRFVFS0JrckYwSDZsMl9zMjZmNjJGbEhSY0ppeVd3eW80Tmt2YkFCdG9LSEpSUzBLVGZUS3BRYmE3OEVqZGZoX19SOURQUFlkWnNDQzlOQnVyV1VlWm0zbTRsSFd1emNJMkpLZ1RxN3VlaUFkWVdFQkljMkNld1d1S0tGUnI0Vm5QODNNdm83NXZwd0JRT29DdWhvZkJNSGFzbThhNWEtWW05VlRLNGRSQnZ3TDI2b01hQU1PWVQ0VVhUd1plVW9UVUlQZURvZGRNbk9PSGVEelZuVGF5ajN4a2d6dDQwWUdqazZwcTlnejZoSnN5eXhSc2w1RU90NUNxZXZzY2NtZHVrQUVvQ0dhb2pTeVJ1ZUlLWUtLR2M0YktNR3RnSC1nR0FYck1GT1BZNHo5NDV5MXZfVktGZ254blBITnM1VFRxS1NFY0tLc2EwNWZIM3htSktrTnlUTy1MeXA1ZzlxMS1CeDZIUzZxVmVKLWFtaTgyUHRzcFFOZUc3cVFIbDF4LWxPWjlla29ZclVteXV4bnBJeDNnRlc0eGkyUWlHNWV4TWxxRFRWM19JTTBCSEdZbUNMTFUzTzhjTWEyUTBucFd1THJYZ1U0LXE2c1YzVlFYM1pydG9NdzVRXzRtd24xYV9PbklpNHdYSTJrVWVYSWVVOVFINzFVYWZJcHVWWUhqRDhTOTdYVVVOQnJ6YVN6d0VJcVhvc0FZazJsaG9FSy01Y3d1ekdEaUU5Z0JSMjJ2em85T0xhYy1ERGpSN3pDM2ptX2lSRlVqbFNJTE9fYXNRYm9VSnctVnlWRy1kOWFKZGV3aVV5bmEydXcyTkhsYVhFUUk0Ri1wS3hMNk04bFhMVDhDdnFVVVA3ZnFWVFZCUnRmZlRkSEtGZ3BZUFZRbk5ka202SmtVZEp1Z05NSG8xRnMtbDdBZmxnVHRKeEZ1Um5ZcVZkVVlWdkJBamVqdXZoQ1FtaGFlcDdwSEUwQVhPSGp5dC1jWjFpN2RqQTNrTTNONDJSVC1ucFNfQnExYkJoUUFLRFl5NnhzOTJTMWdHZVpMcmhYRnBMMkt0b0E0Y2g5YVNESEVhRUVoM3BTSDJydnhfRGhLYkxhazJXZWVpMXZHVWpMZDBiZjRYcm5NcExhSlV5M1htbjZVdXBsZHA3UFIyRGpZVVV3dTJHS3FONUhKLUlWVlNvNlMtaWhuLXhFZUNSVmo3QVdQM1FPLUw5OHVUQy1NR0laOW5pU0ZuUGJOZnlHMUp3ei1FbEhYOVZXdloxS0pKMVpXSU9PZ3ZtZWppY04xTUcxZ0F6V0NkRFhIaUpkU3c2RDJPMnNiUGdFWFlLZFJNWG5CYjVJQlRzZkNIc1RmNHlGZGxOaVNqNm5DdlU3VlVoeVdudmZhd1hiaTBwbkoxejV3WDRBQURRODdPdmdQRzd5dkxBM0sweXpXeXhOajhuLkxkd0syeDBvSUxocXZtMnZpSzhseXc"}' headers: - cache-control: - - no-cache - content-length: - - '10635' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '10635' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:00:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96041739.vault.azure.net + - /keys/test-key/backup + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault96041739.vault.azure.net/keys/test-key?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/7089b08b10a64ec68db241e20e2109d0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qbGcivUVxthKiCxcjxOGdsiItrjjTm0_-o0gkZmRSDlEY4ixbjJYBZMwZLxLm7_ZzoGTVTdON-_6bLu-ZwFqAAe2Nc_HDLkL3FTn1YkjTSA5I6FTXI-CC79m3mPLbrVNkHRUkN7QPpl9Qak8RyRl4TA5XtOp_ztKm5Lfuc1eJsosaRdqaMe2UlEbu0XCdYDoP1UoNRAhrUZwli-GHH6yWQxq0SBtnfUsXH0CkgprrnpDYM3dxUkjJJ6IRpW4acRXrFDg-ccCBQDRLty6eSRehugfZyTGciaT4fBcj245OjytQZHxz2ZGixRxN0YsvjoZXqquXKqfkKEcknMDNapyFw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/d2c863b455c9439b87fc78c6ac184217","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"uWCbdAq6V_Z3_JRNeKK4o27y-v8lL_IUNGXQHywjTU4aoVK8iDvM0ChRMhlChsMcI-SyGaAk7kiS2ywdNx5JI3rcaZiiasFZ-4CUnUQbOB_p5L_r2dDXvfdQzGaigM6cttEW5Iwze5dEd3BOcDQumxRrtSJNld4AlxEK-Kp7xaOUFc_2yAV1QPvELtjJLN1zMNw12FXNqocpZwZ8t1BGvvXKYfz3yrS6rq0nG36n3S1yA9Cb0NnrTjp84na3diRQXpuaUg65QXrbhcBW6o1aKTsuEAVH5FAqDliBa4v5lqTNsWxOGS996rMfjsJHJQ_fymvIy69zHrMe2UPupwz_OQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527628,"updated":1564527628,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '644' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '644' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:00:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96041739.vault.azure.net + - /keys/test-key + - api-version=7.0 + - '' - request: - body: '{"value": "JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLk4zTkxnQUltVllzMTBLb0R6T2ZkcGI2aHRhMFBQNGxQOXh2VWQ5dEJEaUE4X2dPa1hQcnFza1dMTDd6d1psd2FOYlZNbFZpbnVzbmVwZndNUnlQdENmaHZUSjBMWG5PdUh0TmJfcTNpY1F1LUt2UnhfTHZpaGp4bnVCMUtKNW5ac08xR19RbTVPLXEwdkZySGZJNE9ZQjhIY01fR1VaOGx1dlFYWW5aSl9mY3ZaREZmazlWdVRzaW5fQmxCbXN6Q0JrdnA1LUFrMkwzQXFDUml5TUNjNTMwTVFPbjI4eElXTEhUcUdBTHpLM1pRRTNFMTdqVk9iT1ZtN2ZoWWh5Y3JHYjJWZFpQdmkzR2Vmd2xQZlFNal9VUlM3SzNUc1FkSnRUazREdVdsWkZJTThHY1R1NjZ0dDhIblA5LUE0Vjd5RTliQWJnWXlCZG9QUnhzem01TVg3US54dXBZUjhXMGdvNTI1eUlCSVdsUzF3LnJ0MHZkWFFDUlAyYjJ5b2htdk8wdlRjY1pKLWVlQWNlVHF2WVpEd0tqX1R5SE5iV0RQcFQ4ckN1Z3JpcVJ6ekFvY1hNNDZWME1Fc1JFbGNKTnBKNVNPR0pzeEQ0dVM2c194aDlCQjgwUkRxZTRHcllGckpsSlc4Wl9GLTljMGI2dm54aEhvck9vQ0VxS19VU0xTcU1wNE5pS05CMlZ4aGV4My1NSldJS0Q3M1BxaTZQdnU0MVZnUlR1NGlqTmhMeDJYQ3NtRFpxZkVuUGZHeHFQcWdVYTVvRm9uYUh1enNyRV93LVNORlhlWFQ0Skp2SWkwTFNMRDF0d25CTkVpNUo0Qk16TzJzZExJODhWX001SlpBLXp3RmtGRGNHUnJGeXJkOHVwaDhMVmFrMUpKZExvWkxocERmRjRpQWVLWW0wT0ZtdV9zNEFzbWJCR3ZuTnpUS3IxNlpNZlNrcUtuMm5uUHc2aV9JN3FzR1lEX2xEdm5KaGx2cmQweW0zb1RlSEFRR010OFRZRFhqNXZTejUyNExyNC14M0JMaWx3QlI3UF9SQVhfa2d3LTFYbjdGa3pGM0lscm8wMmNsSUxPWDcySjJUT0JRT2ZZVjRyOGxscE5Bakt0SEJ2cFFRMXV2MTRZbkhhN2VKTVlWWkEwV0VnSlg4elhJb1Nwemd4VnNLSTlRU2ZQLWZQVGdMQ3VUNm1iZVBHWWdSczE4dDdjbGhJaTJwQXRtaVYtam5GVXZJMXZwbWJzekg4SDAzYmZxZF85QmpHbzlzRklNVTBwZjR1Rk1aSmpfUnBldU00MjBmak91clpNY0xFV3lYQm0tU0E0ZUdjb0ViRTlqaVA3RUlveHVOSE5STVpWYjJtdTVzTHplZTNlNXJENzhMazV6bHpld1hPRHdyOHBiY2t5N25hTmRhMi1zOWF0WThwejBQZkhqUGpkdEh6NDEtZkhObl8tb0t4RWU4RDE5LWhRY3pGZkZkaGUyVloxYkRQRV9FckdJSGg0dndSaGNudXllS3p5bFMyQm1WSUdMZ2xzN2lRc2Zta1NpUUl0ZnoyVjZFMGh4aGFWd09PS21tNkpDbWRLR2s3aGE0a3h4aHRxNHZoQi0tclpFTlRTamc3MHdOOVVacFVlUnFQanYyQ1RVcUQxdXZPMHRRTW5zQjRVSWxwa3lqTlpaaVJqVFNaY2FhRzZGRXpDUVczV3c3T0l0S0FBc1AxNnJDYklZVUdRTkZKcUpYSnMybDEzR2JkTTU2OUx2Nnh4V2dSUm1UQ1dKMnJSTEtvY0ptOTh6S0gtV0dKQjA1cVlaT0JZYTdQOVlrdExNZTYzUkRuc0RoZzM5N054UEJFT1pvenh4Rzk0U0tLSUNyUXJYMEJvYmcxRUFlcWFfY1lvMWpIcjUzTFhBV3J2Nno3UHFCYmRVSXM1cEI2cGo0M091MDhzV0c3UTVyREZkd3JHZEpmallLR1hQZnpJcUVJWi02a2xZeE94cC1kazlKT1dpZFdQd2hmblhyWFBsa1ZnOUhDMkdrYzVwM0ptMlVCWE9MQzRZM04tYTBYT1UwSHhjbDhjbHlwVEVpNExCNV9VU25sSFVDVERuS2h0TjE1WEZieG9obnpySDJRYkFKeWM0eUJKeHNZUDRJcVV6QTdBdklfYmpxQTQwX2UxNk5yMHB6YktIU1czZWlLTzBPSmJqa0JONnBlSjdveU9vX0FUU3Q1RGsyWW5DRnBHMDFnY3V4aFdpaE1NWVVzdm1Td2RQb05FX2xnazcwS3FwbG0zbVlTM2UzSXhCNnA4NFBFT3pnMUpwRUt4U25EcHZ4SGxUTmJzSXprUTlIN2Zmb2dLcUx0T2VySkg5NGZ0d3hVNGwwRXFTUHRfMHVFTjlBLTd3WkY4REhhOHlReW9wSUxkS0JOZ0hsN3p0dzJVOVN1TEVGeTM4Wlc5THllVWRqM0dDNjN6SURXM1pHM3B3MDVHSVlMVHQzdHI0NS1LdnZlaHpLYmhfQWxGcTFnaGV5bS11R3ZyME54cUVuTDJzdUFyUy1oS2ljenZiaFNuUFRuQTNHdkVaRWZkVDcyTW4xT2JTVnBVNzZSZlUxand2MXpVOUZ0V1l3dk5YVHU5bF94cmIzSGJVeE1vQ1l2cjJnQUZ2RXVHaTJwS0NEb1J4LWlRcmZlS1Q5Rm5xZmpic1RxQ0pseHViNDA1MjRuVFhTWVJQTnJscEhJaVhBMkRyUGtBUUdGakcwTG43S2VrY3V5ajF0LVU0T0dNM2JaYnY5ZGJPV1hIcVFQUGhrcmNvTTd0SFVyT1lPUmM0ZFdsX1JyNHlqYnRmQl9Zb3BtOHl4ay1uZUJ5VzJqUldaSHhMWC1vZUlQZWFBVFBvTE4wZURsX2F2bTNiY2hfb2xNOEFfNExTdjlDMzRwN3BkcnVtd3ZaWTYyNWpqTFBxVFBOMTFzQXRDVDdma3FUODZxUU0ydGkzS2JBRmVSY0ZtTzRvQjA4YzZRWDRCWTJVQ21xT0Q1OWV2RDBhanFBdnhOSEZ4eWVnS21MZERoREN6MmJIbmJUMlhqQU53aUhIQUV4SnRINmtSMGZiRGF5QzRZZjZsZUFva2xVeF9LaGNwUjY3Y29VZWN2MTJPa0NhZXhCZFJKTmI0aGUzTEVhQ3pOUGZ3YXc5MGVMRnE4RjlKSEFLdzgwNW9URlFyMkZBcWl6OEppMnRsR1RsTW80YndNM0FJZUhpTFZzU0xheWRJMzJRbWVzeE9ScG1ZNVRPSHZLMW5QaUduZGZnWkpNajlpMTdOVUlKcTRaeDhHN1BYWERJcWlseU95UWdvN3UtcTlhd1VmcHh3Z0tMb0pQNXVqVXZucWxBV2VPZ05KbXZNcTIxRU9RTUdZdWlROU9CUTJROXpyQVNXWC1BQW1qemZEUENXcW5BOHNUQnRTZ21FY3l5eDkzek5wdjBnZDdhd2l0LVBlVlZBWXpfRGxickk4dkNOVHZxU181ZWJwZmhPZmlkbDBJV1lBZEZQOXJVLVI0M1JOZWZ3bWM5V1pLek1RZm1HR0lsN01RSjZBQ1FORVNsYUIzdXl6RmVKeVdfQWFTMWh1RS1PVGVoVGpaWEtKY2VPSEo5MXotSFFQNEk5bVhrTXllRDh6UFZUVnVNN1BUNnRYcWNoR1FSdktIckVudmFUZ2tsRGt3bXZHOXI5N3FGQ1htRDB0Um9pSXFKN3lSNFlNN0ZLVWdaRnRpVEVvWEgwb0tKc3ZQQzZBcU9ZcXNlTVBWN0t3VGdZbUdjTWRFVlBCT3BBSkF6MWtyVTN3UVRtb1pDNlhhSlZ0VHptVGo1QzhFekdEMkFsT0VFSjNrcnJyTGVRR25hTFdhOHlPUzVWa3VpNjNvQ2RhZHdqLTZ5ejVtYTQzLXQ4Slp1a1UyWC1HYTAwZ0J2aVhWcnVuNW5BczFRMmwyUTlMWlVESG45UGdCd05SNWM0WUN4d1l0a3FmR1Yxb3FLSV9rQ3lSbWYtSVdTM1BLbFpNQnZYaHFzakIySFd4aHR3RlhJWkpPZ09YUkcxdDBaNGVERWo1b0tlMGFzdHNvNnpySWZ5dEZMMHZhT2oxZ1VjR2R2ZHc2UXRNLXJ2el9tNmRUWktLb293YmJpTmt6SGRuMEQ4Q25MU3JKUW44YmstWDJyTm42VmgzRUhZZWNBSE9BNWRyUHVBdy1WNnJXQl9FblV5ckJwYVVUVTV3MWhNYnMtcnY0OUc2bk1WYjZtTFVkU2ZCZURfdE9XQXptZXhVdXB1eGxkWTdOVGRfTGxKRVFxNUVQQWt2SXM5N3Q3WnlVMVZuYzJ5N2ZXZ1N2NkVLQmNmanZDWno2V0FjaVpPRkhWcm9hQ2dsM0NFQzFkNW1wcHluWUxyS3FRRDQ3OGRoRmNuQXp3WmgxNVl2NldzR2lkRGRiOEVDQmdOZ0tZakJ4YnpmZWZJNTRtaERrRWl2Yi1nYnhfZlJJTWV3MWdBb3ZKTWQ4ZnJRaTNhRExBNVFySl9ZNkpMWGtKdzNUdVNpV3dOX0pvNmRJT1lTTEZhdk9aMXZjaDNWaTJKcWVJXzAwbEs1TGo2MmZYNzhHTDBsd2RGRk00azVBUjZMVEl6bFlNRVJuM0dHbXN0cUh2bWxpVFkzaGNnNXlpTEx5dmRsWVB0WURQTjVRRE1NaGdWdFctUm9QMVNHbk16cVVrU0pfcUxYZ3BzQjNoanFkbUFZSEk1cXJDWkdyR1pieV9Ock9zVGMxczV5QlhGOVhkWkFDZkthWFcxdmpaTjJFSWEwMzRNOEw3ak5DdFdCRmhzM1VRMm9aZmJHQ2ZqbFdqdWJsV3VON2pBWDJTVnQwREppb2ZBZFJUZXhwY2hrU0dNRGJNR2daT29Yc0dJM3I4NUttV2RQOTN1WVJ5a0dxVVBnRlJxMjVDaVh0eF9BbWdVOGRmb0F3M29takNMcTZUVUVkZVoxaWZJZDFIeWRWdDFFZFlCU1Y4cGU0dzQyVnpxY2FONkNiYVh5T2NqX0ZicUJsV1owM0FES0oxaFM4Zy1wVDF0aG9SRWQ3U2RhYlFfUFhJVlYwMFRKR3AwdS1VYW5kZ21zU1BCYTU0QVVIQjBrbzNWV2ctdmdhSmU0WC1DY054SjREbmZzVTVzNWlSVm15aEZmajNBUzVTREdPNjlMQ1RoZUlhd3d4M2NwZDZHa19nTjdwel9IbFhCNTkycFA0TXcwTk9IUG5lQ1F4SlljVkpvTC14ZVJBWHMxT1VJMDItcy1tWWE4bTRGTzU5OVZwbnBWQzd2eEZybmluUm0tU09KSktSSDJYSGRBbjlTVTZlMUlVMnZJaE14djBjdHh3NHVWa0d1cUhnRW9xWWYtQW01dkpLNWs2dE1BSVI1RDAzdlBpLWtGY2w1YlZUNnVEOWJSQmVDVnZXdzZac2lydjdmMEdPcXpiTFljWDZVSEtOYXhPV3AzMWxnRndEbjFQSG1zWmZJaHB2VWJCd2tocl9VZFNFdDdRRjAzNFdsRkV6TVRTU0dpZ2tCTlltNTZ6QVpfY2VSaS05TG91ZUUtaS1aLTNBTC1vSzVfbXNmOTl3UkdsZ2pWb2kxYy1PUTZQY1hPOEZERHNTVEw0V25vdzdJUlByRnRhTnRBcDBEX1RQNmgwSGpqYnFjdU44eU40MEhvU1NXbl9HOXJTLVozRzM3cURsZkdEcXZyOWROaFB3d0twN1BHNDZNZWF4bkI5dGYxSEZ1S2h3dkk2MEZLMC1kVFU4b2pqRDQ3SS1teXZMaDJITy1hTU9PMS1iQTA3dkltT2pobWh4RS1uSXdzQVk5TURvQ1hFQTZYeE10ckdFQkNOVFVaQ1hTSW4wYmpUYTVKNlhXLUl6XzdLU2dhclRla045N1RMVzdFdEpUNXFwekhYajViZld6c2JKMWF5bWVDczFybFkyZjBLSnpLXzk3QmlCazlMVjdwU0VfX2JOcTFpa1hvZlVRZkFKekhaWDF0M0xRUzhTUVRhRzBsX192em9pb05NeWhTZ0tUR0dGenpabE5jdmRCRTJEeURLZ2VkZ09lZDJsd0MxTjg3bFY5U1pSNUdPbTV3ZjY5MmVMYWN6cEZFMGUzUHg4T002TlM0UkQ5QXgzNDhZcU9RS2tlTElFRjR1UnVzdTlGUjhDZ1Z4dXBlckxabFdaaWZIVkdudDBrdWdqSy0zU3FwZVg0ZlVlbS04LVZBY2V6LVNpbVc4Q3JybnlCSDdWNUlqamk1MEZUNjFFVUh4aE5JeFQtendlLTRlUkRvWUVhN3hwdUs2MDNZTlFUSU84a25QeHZaUE4ybjJoZkp3ckRhbkxkaVhLSUxWUjdONE9RcGYxd0RUbFplNXJuTzJQbVBNSk1zZHZvUDZ6ellYakN6SmtqQ3kyVTBnb0pYQ0hrWi00Rm9FZkpnQWJLNGlEY0lLWGIzTGZRSE9SQUFfTmx4THU0bmFpdElaUVdfNktqR0g1eXV6ZXFKdnVqTHVqam4tUXU5MGthOU5JaS11QUxxcU1QYTJ6S0padnJlNkJBTU5QTU1PODFFckRNc3lNTDZ6cl8zSWl1ZDE1dWtaRjVDQkpmSXZWeklxSldwanJiYTRldGF5S0dLUGZSc1k4dUpNU0daUTZSa0dra1RrWU1scnhlaG9tM2JzcG5QSkJqMVUtaU1paDlKVEE3d1JMa0RsVHEta2lKbDZQYkVielVsQ2RvRFNLUkxiR0RlLXEtM0xWeV9Wa1E0OXlrUy05Tm5GRF9PTDVFNlYxSG9JMW10dVI4SmprOWlsbWxmR25NVHp3emY1UGI0Wkp2Tjc2WWRZZTE0dnoxbWtPZFZnVTVicm9PNl9aY0NWQ3E0MUxVZVhmZTJDZlN3SGJfM0x2aW5ZMWZMMVJ4UFhIZzlwendIX0lINXFjRWFybUdQcFpVNUFKenN6dVNXQ0k2QlNEdmNpbnptN3pNNjNoUlFxNG42Z1U4NERJWjRhMW1pQXJyN05rbjlDVnVRdDJEWHVUcWV1N1l2UkNtUk1qNVFYenVEeHJzdGpfaHlIdHJmUDFNdmlxWnFMckUzbzZCRm1vZlVLNGpWUEJzZC1YaHMyU0J5dlFjVjlCQ0RjRGU5X0c3bWpobTVRelprMEZxM0l2d3BpWWI2bkc5Uk9vZzZRQnJQVjFwUExjc09TMm42WWoyX0RNLXFBSzNLdVVMamdXRlNMNUVyRzhwUldHT3ZWU0p2X1c3VXBLVHI5WXZGUVEzbWZyN0REYTVER0tRbzlfblRyVDUySkh0bTNSVUE2bzlqNy1hUUVidnBNUEx6eDRGSThGWWRtejQzMXlpMDhEbVMwVkU5SVYtRzhoOXpJY19yZjZsWmU1dS15bnVZNnJQUV95bGFYSGIydHpLb0Fjdkxpckw1RVJBZFNBNk96bEU1SVdZcTNhU2JPTUdxN0dCc3d2LUR2UUxlRGtBSWhQbHFyTGpfX1pxTHkxRTVrOEt6cllnZXBjdUc4M0I0SEFfWGp5RXRPMDQ3cEZma0ptektBckdOU2V6NFN4cENIaWdyNkZIMHpaVWYxdVNFNVFPeGliUVVJa0ZQV2FQcUUyOVV4STEyQ1JETUtQLVlpZjlWQTd0NjB2XzNPS05XUVlHZl9UcGRKM3pEaC1xR0NOZFlxa3d0eTU0TUtvU3BLNzZ0X1lEZ2NCcm9SNm15NmZtbVRUei1lSDVpS0ZvSnFxYWtoX0o5dGhrU1l1alNzYm1zckcwMmZidmNMMW5uOURRSUdVMlJLRGcwWWI1cVVoek1nTHBraWNjbXZ0SGlrQVFmSW9nZWVmNTMwTnhpb3VBOTNYSEd0dTVfcHVYVGp3REJzZjhPdGQ0eE1LMWZoYnFvZXpGYzVJRklxWWt5WXlBMXFCN1E3VmVwc1djSHF1cEVtOHhjendOYnhyeXh4dmpHaUJwbjllbW9HejdQc1RuWmpGRnVRNzZxcEhqblRqUENWRnFHdEp0N3pEZnBkcGZ0cVBYVk1sQldzT3NOY2pYVFQ4eUJWa0ZSbVN2akNzeE55OHZuZGFEZWh5dno2Z3ZRbXBzNWRGekhNNmNHOWw4M2ZSNWxwTEc1a0JQbXlkQkNiRno2NHhsX2VGVW0yUFVtTWI2Q1ZSaHBmNXJjZmxHWGRRWDlDLVBGSjFVSG1pc1JWMG1VM2xnekJuTWpDSzg4MFctNGZodldLTFZ4OW5KbEJObTdtWF9ZeGVMQUg2Vjh6VFA0YTVRaEVIUGVvVFJ4WlEyQTM4emEzcG5iSS1YaXZsOTE4eHBGVUN3UExpbGRjU2ZGQU5xNDk5OU43X1lUVmd4bXRPTi00YXJkWWZwbE9yRnMwbzRzbEhYVVNOUUtNQUFLNXQzbGFtcDVNaFZRUWExWFAwVk5SdV9KS0lZYUJCV1V5T01hd25vZDA2MEY5T2N2Qkw3ZVUtQlJkak5NeVgyMFRMT3NkWUQ5SXR6STd6RVFIX3l5R1FEdVFfall0X2ttTURTMl9FTFd6TVhDSUs4Ni10bGFCT293dnZGNlVpWlRDM2N5WG9Ic0ZoNzFjRC1MWks1VXg3ZFhRNmR4bUtGRDE5SG9uNlQtV0FySk5lOEk1NGpUaHU2SWZqX3M4VDhMQVY3QU5jMl9INGZzeHFuLXg5MjJ3T21BamQzNmYzMF9wMmc2VWdlQWZNVkFFc3czWG1uUjhhbGFLOTVkMnJKSF9fNzVOSDNIUjl1RXBaNV9sLWRhNmVDOGdvUDBLbTk1UU4zeEtVSWxjb0Z2d3AwTTh4QUZMelN0RUVSN0l5dDNGRnNBalVuNzFIWlVIM3dEVHpNUW5Bdnp5RWdsNmtkRnp0dG1PQ1NOclBGTXJpQ3FCejEtRXpYT2YxR0d2NXJ0N05aUW9VX0hjM2xUN2N5eWNUSV9JNDJQUjdmRG5RUHAyLXZJRXNOQXoxNF9zXzZxUktVVldoTEJWWUVnOU1NMXR3bkNkM0d5MjBKMmdvZ2xxbzdRa3JXYXp5MzNBdVdXMV82RWxOZHQ0OS0xYWNpTHNCQUZxaDdxcUM4eDM3bGR1MFhRTzczU0pYMDV1dzRSTk5fUHFXOGY1cnJFblhuWTV4cl84d1gwOF9EOHlXNjc1NkxFT2Q3Qk9XYmRCbHl2a2lhTG5naDN5UDlPQVQ1ZjV5cHlhc0l1S3lPckFnX1JqQUtPZzNUQm1UZjJZTGs1OUNxWFpnbWhKNHJrS1M5X2p3UXI1c2lXZnNFclVXbVFRaExueGZZNGVXMVR6NDdRNnEtSThJdmJHdm9NZEc4aGRESXhzczJTQmZLZ0lpZlB6NGpuLXp2TVVzOEZnTDA4UWpDVEFheHFHOFJYbVNqSW5aRERESHlzY3owSmRabHpITDJsZkNMMVk1eE9Ha2JrTV9YZjBreER4ODF3bVFjWTNXbjl0eFlFLXhFVDloNndOTGN6UVh6TzlONXFpSDZpNGJadlR0MkxqdmJrV1M5MEw0TFVFZ2puSE9PTVQtWmtYbWI2d3FoVzlfbjNvWkRZcjlNQ0xPWU5FQ3BUVzF0aGZtTVRDTkk5dW95V1hHZDdDVXAxaUo2UGRDT3lXb19vblpnaGVQY0JNUkhmdU9NN3pfRnJIdTlqNEN2Yk5nd1A2cnFvQnNWcFJMRUp6bHhZbU0xZFF1WnFheVlYbXBiOS1XTnhtZ01tWVd3TVhaZFZWWXJhOTJmSXJUVzdkU0lkeVpZQWI0YUtIZVlMdExJTEtkRjZHLWZiNmVVZTU1Vm9sMEl5S2I1X0xqTFhRLUtBUW92OC1RaXhUODN4N3k3cFZDeEZ4R3R3ZnBOLTFVaklfTDVEZHQ3N1dxMi1wN3JaNDFoOE9ER18yUmlOVVFucUFEeDc0WVlFX2I1SlA4MjY2SDhCSEQxVjFWUFR0aVFvUFNETF9kZTBFVnZ3dUt4Y1pRYnV1UnpzRUpXZHZfWkVJRks0dXdfaHdQOEV4ZGFpb2M5a1FzMmdJem9DVW1yaGFjSkZUU2J6YXI5elBteld2Vmc0a3ZjVUMwSVkzTTMxS1JhT0plWkkxQ2FWWmlfblZHLUYtbmFJQ3hIcm9tQUVBZDBEVFJJOTNBU1E3QUlIVE10bDlfQkxOaEo0UU1RQ0dSblFXdkF0SzhvbnA2NGVzcXBubzFfODktWDFzTVBaejlOMWVOOWR5UHBfZlVfOEpUdmwtVF9lRGwtOXJaS3duUnFOdHhHeEZuVXBNdXE0MEg5dThlMHhYbXJlOGdTTzhxZEtKeFpvMkNEUE9Ca2RGcF94Rk9GNFNCUjdQWGx4aHl3SWJ4dVYyRlYtd2FERzR6UDZCa1ZKdlZHejJSNkpzTXVELUoxdWJtc2hhQTJsR19fbXItLXVUbFlybGxLanFVUHBQS1BGUDZVZU9weFVWdV9CWlZBYnBJRmV4VVdxc3hrZXdxaGlFS0lSckF5Lk9YUTNscWkxdk4wNG1sb1Mxa2xPdVE"}' + body: '{"value": "JkF6dXJlS2V5VmF1bHRLZXlCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmR5bWh1WnJvMmhHTEdNakFVNEMzbXlJU1JPUFNDRmpvckxUcU81TkZCU25RT19LOW5BSGxoeUFHSXJnSDhmZ21CY3QxZndxdTI2TEVPVmJZT29Cbk5xMWg3U3c2S2tVTkVhY1ptcVJFYzRmb0hZVzJDYW55ZHJEb1JZY2VUME1aSEt0MTFIZF9KUndTZWNnS2ZyTVMxTFhjdlZab2MzY3hiT2wxRG1rOENsZElZZ2dROGwwcXZTclpsWV9qTHRtaTc4SHBjSTZoczE3aFRoYTkzYXIyVGszMUg4UjhFR042Y09JcW55YldCSFFRQlpOSU12RnRnY3hZRWIzWDBmMzlmdk1sajVTajFtZG00TDN3VUYzZWNHUWVIODdLQWtIemJiWWV2QTZmcU9vaHVuWUY0aE9XSzVsaS11R0pGOUprdFBDQmkydF9jSlJ2eGdBQlJpRlZLUS5EUEtzYVRwaEVKb1ZJdEpXcC1MR3pnLjRjMnlBMzFLcHdSQkNDb0pkTzdqdFk0NmxBZUlJOHhORUp6TU9xd3JwWjNQREtVa1JhOXhKdWVIVG5SU1F5bk5YSmY1LURZVjNqRGZlVjhKamIzRTZaeTQ5VTdqZ0pvV2lkZUthTHRXQjVTcWtEd0pSY1FuLW5aTVdJajgwcTM5RXV4eC0yeGdNdDlGOFhObmlWNHN3R2xOZnJYeUkzNV9OMktGNTh3RmtTcVEybmZRN2owLS0zeXBGZjZrN05TNlFJYXNWUEIxMkxXRGFQSzBVcm5NV2xyQ0hGbkp0WmZ2Zm11TnRMVnRQYUVIdDFzZFVad3lsOVhQSTk3ZzNpbXFPM3N5UjJ3ZmtTUGtXdE9kR0VQaGZKWElvN0F6NGcxckpucTN5OEd4d0hQbklHVlZTODl1aTJRdFVpMXM1VHVNZWxtTUJmczl1ZDVpQ29lSS1vNmtJQ3FqN3Rjdy1rTkN4SGQ3NWE0cXdDTnU2ZlNjM2VyY29BU2RUMEdZYVdXU1ZBWmg5cC1QZzZlVXlSUF8xbjFPcUlLWDJPR2NIelNvRWZkQmZMSVZxQUZJaDB4X0tqckcxOE5ZXzY1V1kzNkRJVjR4X2ZHcEQ5QXdzdVN2a19PSVZ3VDB4NkhtRTRhMU1pTzl4TlY1R3Q0N2dIY1NrdldpM2JteTE5VHF4X05fdm5PZnE2Q216WVhDb1JtdVZnaU53WS1fNXNoSVpHUlk5YUF3cUVxRUNkOWJLbUgzeDZlWGdUR04tWWRrSkVHdkt6RTZ5UExHdGdMX0RqQmNMcW5JNHMxOXhDRFFLTnJIZEx4WEpQcVpHYmRqTHVfbGFWcXdBUnI3S0lZUG5FNTBOalZyUEpZU2ZaRjRCMWVPTUJvang1cFJFbERDODRqSTRvTENJdTBhbTlnNVBudlhUQ2FHSUJPaTBCX0J1ZkZZajBndWp1dTdHZl8zdDhrQ1UxQklEYXQwX2JlUmx2MmJrR2RNQnBNRFlRaTZ0NmV5U2drYkZZM2dseVo2U1ZWNE1HNER0cUJCWnVISmRCZTZzSFFNRnliNHFQTkpfN1pGVEJHLWRfc2gxYWJhWEM5Wk9qV3FwZGx5RXBKaE9kd2dXZWRXcDFOQy1sSWE0eWZoLUVjVTl5VDZxU2FXcGd4SUNEdjJZekc1QjE0aGlUU2ZKb2txVG9PeEtWV1gwTjJGc2VBNHduYjBZWGdXSW5aYVk1WThsUkQydzVrNEpTaGYtUm1GejRvU0JLWEQ3UEp2dTNCTEg1RF9GVlM3SEZHajdMRG55MkF2RnY0ZVdLT1ZCWWphb2hndVhFOGc0eXFsUVZERGM5NzJVWVVsTS1SSjdqUjlGYUJGM1htdlViUjZSSjd0WTlDeURuQ0xJUWI3YUFJM01iRi1uTkI1aTZaY2RyaWNXWWo1UHM2NUpBZzFGZlRrUmRINXRkRXVlbDhqandXNDFoRWlfSl95QWVCX3BTNF9MYno3RS1qWTFOTmEtX2loYUtqVDZEM3JpQWc5WU5Ud0hndHRzTGZReTJWM25admlEUEZSRkJUVGIyNW5qeXQ2VGwxanNmMVNibkhnaXp1NDUzQXVWNXJjNzlHYlBsZ01pd0Q0TDR2Y0JLSzdVMVNNNXVXN2pPc3czeVUzMFQtSXlDUUJ5aUlpbnU0R1Z3LUhuLTZKeUFYZjExQWpsSG8tcW03dDltZmJxOUNYaU9Td2Y3N2FsNXQyMER4T2tfUkU1cW04ZEk0NWozMjBia284SkxjV3VVODdNNThYTXNVaEVycGM4OU0xeXpBMUM3TUg3VnhSZnlQNUFBdzdBVTVBUkx1VVhleXd1Zk91aEtqVjEzZ1ExNUYxS3FNVkdxWFY1U1g3Sy1waWdrN21HUFVQVW4tTXlQYXQ5OTVDZ1BGMTl4NnFmd2M3RGxZSDBLbklQd056bHVfTHA0ZXQ4T0NST0sxOFd4ZzZmNUdJdmQzOF9TWEZWMjJyOEp2enNzZDFrX3htbTdWOTVGbTE4QW5WZWRVanhueDQ3aGFyS3JQdGFsOHo0TDM1azZCSDVFQlQ3SXFxUWhodFQtenUzTUsyMzZISWdsd3hGci1kM19IRnlCMjd4M3U3ODFpQmlBTVZ2R2tERW1uVGhOQ1c5Qm1JcEJ1bnE5eS0yNE1HRUlSY0FoWFN6R3VzQUtwcUJObElTWl9ZQWVxOXJRVXowYnZfSUxsNkRJdTdGYmlGLVVuTFdOMWdRUWlkU1dHVVh3Q2YzN2JMeFpIUGFCOVFnYnp5R3ozUDNxMHNiWk1Ra1BWTVZPSWF3S29FeEdvX2lPd2pSMDJiaGh5aWI3em10NmJKZ3Z6R2xZbC1uM3lYYVZWeEx6M0pQVWVPVU40Uk1hT2F6SHYtWE5wYlFWQndUQ2MzdHlwSlJpanpHVzUxOFVNeFFMRmZYajV6eHZrb3NxSGl1c3llR0NoVWFSWm00Si1CQkRuYWxCLUlaX1NoMXR1dnRXT0dJSHRCV01qY1lmckxrSUNJUDktOGQxc3AtZVV2Um1nRzNseFFWQVNuRnJyYk9NNnVzUEc2bEtiZHVhdnU4VDFLUWlNSHdhMVdYNGJYYUp4LUxqcE5rbW0wbFltT1RwUjV4bEE4RkdwY2lvM1licGxZVnVzNHhWV0NmS1lEZTJ4elhwMGJvSWU1Nm8zYThwOERrbDhWR0Fwd2JRdDI5TXZGdnRhSWpDRnJyYUdRZjV4ZG1sa01PSFNLaDhQb3R5TG5talFSTlZva3pEYUl1dUtMSjNRaGdrNlRhejc5b0pLZGlMVkNPdXNwMERSS1I0SFlBV2pURHVCLVhITmd2YnNzWFNFTkQwMHoteDVfcjZfTnNzaVhFU0hodENTMHNjT09DZEdVNTA3MTZpZ0szYlVSU2RzZ1BzOXBnd29vZG9Cc0VQdXpFN2ItZFhVbWdxNUVFNlgzY1Itcm4wblRFczNac1dOdjhuanFfSVYxMjlNMVpNenJnT002THhmVGl5WjBScl9BOF9UQUFXRWpkODV1VUI3NnBiMUZXdXFOTHVwLW1fNUt0elc5MTJEZmVndVNoSEljS1lsT1M2U3YzZUVhWlZlTnJSWUJsUzZYLWlINVl2cVJYX19yOGYydTNYb2JpTWxNbk42TC1jN3VqVHlCa09wQ1lVU3hoNFptWHZfSHhJZ0t6OVlLMXVzNEV2Z1h2bWFoN0NXSy1NRmItSzRMLUUydWV3eGc5WlpMRm1iTE4zcXRhMm5FRGF3ckFIN0E1QTNBU0dDenFmR3c3VzlwQzA0SnpSS3FYMnZ5U2lzaVlJUWpCNUVSQzdYTlNYN2xWQ3ZpYnpsRXJlNzFSaHh5bUlLekEzQ2VTTFlIX2pMTEE4cEh5Qlo0Q2kzWlNOcVBrZXhOWlZRdkxKZWY0TV9JanV3UkxmY0pQSUxiOFM1Ymt6ZmpaSDZKdWp4Ry1ycl9LcTE3STQ4N3ZuWVVGSGM2UVQ3XzZzR0lCUzZncjRPSkFLSUdMNjQ2SXhJRTExdWw3YTZJYkZHeGl3X0c1QU9kd1Nvd0tmckVVVzFMOEE2ZWF5VjVjSFRIT0ZHUHYzM1R1U1VpN2pFMTJXdm40eThNTWJKYVhTNkFJVS0zN2Q0WjRmbFpjNU1ZbUxIVktoQ1pMYjh1Rnc2REZCamdyY0Y3MVhUVG52dVp0cEgwZ09EM3ZqV1dvZEZwNzlqdzNfNHkxbVJvbG1semhDaDBZd1IwYkJ5R21qS2dDVEQtNjdidEdZb1FHLUY4SWprUzJxcXhWWGpvWkdyOXVJZkNuQUpTUmRlYWNLaWpkc3FKYUtHSk85dEF2YXhXWXc4MUFMQUVqdElySk1fcTJ3c3liV0tSWkJmX3JUQVNfTFJUSGVpd2prRVVtZ2lWelQwUEdfSjRDWGM0YnFhcERhQURGTGlScFNwYUlKS3JhdVc4UDFsNzROeHRVbXB5SDBRZ2U4SnJ4b3lYTDQzdFI0T0dOLWg0aUUwRzNoa0MzSzFRQ0Z5NXN2VmtBdGxha2l0aXc3ZVFGN1pjcEtSeE5hREZEYllUb3pFTVJWQUtWa0RYbWEycjRxVXJPc2ROSlROQnFlWWdhbnh5Q1RpR2FNRVZEZjdEanJTWjktTVJ3a3R5UVF2d1NYa0k0VmR5SlViX2xJdEF4UERkMUNpV1BYRkgtdWdEa1RrQmRCdEpYMEN5N3Jaby1kSUJ6VHU3cDItNTJvOUotVUhfbDV3LU9FZ0dZaENnQUtGTkpaSWh0Z21nY3ljUVdHcm1RT0plN3QzNUlIeExwZ1Z6aTJGVWp0QWNGR0dPeDVuQW1DTVZOdzhxQnZQbnV4bzJSV3NZa0VJcGRRU2MwS3Z4MHBvWmEzeDhObW1BYnYxa0VzdzhZNjhFNG5wSTB6bnFLYmV4NFU2OFh3ZTBlSGVpV2lwemthREpUUnRqVWg1eE5Wak5RMktPYTEteHJjSjJ6MXdJc1JqdXp4VklNaGdpSXVleGp0aWNleU81WnBjUWVDZ3J4UWx5bFdTdnNOd21nOUJIWmNwVnZaNWN0LWVvZ1pQSUN4S1pZSmNpTXd1ZHlZdUtXdEdiTVRMWF9jYzd2NXdTa0o5VnZFQXdfUi1QeW5VY1hZY2RNcUw3WldxY2E4czVIRG1lWlNZb1RWTnBSUzdJRFZBMnh5Q3JZWjZkanppYUZHT0NSS196d0pPWVEyeE4zWGpMYXAxSWNFOV9qUkhJM3loYUQwUlVyVkppNVdGdC12VnlsYldVeVNZa3JzZElzUGVzQ2U2S3NpXy0zdHNzNDNGU0NCVkZ3azhhbkdxcGVwWmdneFkzX3JtSERiSjBaZmV5SUlkb1RKYzF4Q3dGZ0kxZ3o1X08yS1BXWWF1ZGdiMVpjRmstS1cxSG1ISmx1cU9Qa0NzZUFGYmc0M2NZTUtsNjJKY0VsVjhQdlB2Xy1pMFU4ZDJ6bEpfUm4zakpvb2NnV2o4RXR4ZEh6UGozdnMzRU13ZlpVQjIyVnZGM243N3g3STZxTkhVZlNObGo0TWxnc2ctVFJfVW9Nc0M0dUlQYnp6XzBUdlJfMXQ5LWVYaWZWcF9zYXhEWEJuS1R2LUxSaEIxRjA0d0R3SzZpX2h2cmdwd0ZVbldSME9ObURSNVp3TmVaMGZ5U1V5M3lFNnFZLXZSbXB5RjVqdE80V1dSQW9mb3R2OXJNd3FvNTlvNUNmY0kycVVockJvOERSd3JzOHFMczR6Q2Fxa190RlZ6dzVrdkoxSWs4U29EQ01COFYwWFJnblVLS2FndFJ0UFVfUGh3c1BpMlU4NGJpeU1WMmJBQlZsVEx1QmF6ekg1UE9Jc1o3bDlyLXV6ZW5XR1ZwbEpFUHB2c0ZEMy16OHJ0VXN6SjVNU0NJcERRc0xMUTB6WmZCY212ZURJMnZ0c2JvVEgwSVo2QWl6VnlTVUtaMnZDNFNCRml4Sm9GT25YT3ZUZGVfeFQwRGJLcUlac3llX1lLbG1Kd21LNHlRT3JwckY2NkRjZmV1d05YWkJ3a09RMktJVVJOenFQX01ERmtIRWIwamtlektrTjJ2amtHcXgzQ2VjZHY1SkZCWC1lSDlVeWIyajd0VGphSkVYbUtvZ3VDY1hJNjBOX3RyZGhRQUpjeExnQkloekJjQ0s0RmRkZ24zMDh6b1VHMU5pc29pWnBKekIySkZuZzFDeUpJMXlSTWhSUEdJNFRlMmJxV04weUdXS2NJTmI5NUIxcXE4Vmg3Si1IM1RZeEtydTVKTjBDNmdoVDJKXzRDdzZMNWdMd2dwWXA3VkM2WDJmY2ROcWRIUW1tRy1uLVFYc2Vfa29MNWF5U0tidkowYVN3UF84OFlYYmNBU0dhZW4zSVpwMUNhaVRfTXNMaXBXX05rOUZYcmlXcHhNZVYyQU9sZFE3MmhjYWVhNlBTS0g0blZwalhwMTk2X3lMT0JOTV9Vbl9Wc3FZZzl3NlVZSlZHYloxS0dUd1RVMGIzb2Y3b0ZnLVJNTUV0bGtBYlNUTk53ajRQSDM3a0JGVmhra0VkYmxQdlFDRk9zYzFRM1BDcVpqS2dsZHg4Q21xaHNHVDN4QlEtczd0bEdUMlJLaVdnbWZORDA4dHdOYlptZnV2QnEwYnpmandnQVhsYVZwUVp3d19sV3JoNmJUamVVREtfQmc1bHljSl9JeFhQOXl3X1pDZ28tN1dYaDlONm9fRDEwM2ZVUjBhLWRuaGs4UXhCbGc2bm1QVWVLekt3cGRrWmxYRGNMazBmMW9DNURoaGR5SEY4SkM5czRBY01LVzUxZ0pBSHRFczYwZzQwcko0eTJKWG5sbnoyenJHNG5zMkNRc3lfblNWUXlWOG8xaXdxYm1pZUN1dXBSTFNZcnF6M0xsX18yYUp2UTB1cmdqVkI1bkhhMkpkVmZvTXh5WDVwMm9KaHYxZE8tMlFuZmJoaHpZNExVNG9qNmhMMG04MXhfQXJWRjBUaVNNX2dLWlM5bHlPR0FCSHRPZi1GYmZzNVpOMmJKR0d0ek82QVRGaWFiQ3VTX0RzbHA0YUg4M0xaNGZ3WXphZFZPeG1UaHFIUXJyaGl2TDAxTzVlYk5aa2Rnc2NmblowLTNTNjA4QXNYRkFYM0lhRFR1ZVhDa3VQc1BtcWxLeXRLVmtjOU9BVktIb0I2YkR1cDVIQzZZQVY0dkt3VXAyUlN3dDIyNE52eTJ4RHRfd194c3VieGdSbnhPMEFGaFdUQ0dqMWhKeExZaXJLQVlKNTlVY3hoV195RURlcjhhTWdrWUNkWHVMNTNxQ2dLbFlVNHNmN1hGYktFWHdXUUE1RWd3cTVsRHlVbksyT2kwMlIwVFpBbWRfZFh1ZG0wMWFnZ1FiNlVwYU54VDU3MDM0Wng5U0Q2T0IxRzFlbGtITEFHcThaT2d3Qm84c2YyOWhaLVBBZDhpa3QwQkhSOHhBODA4SXJlNmtzSkJDbVk0WTB0OGo2Q1NvNVF0UWtSdzZmVmE0ZHctVWNSc2s3NkxZSGZWTVRXQnZMRlVNdEVSRUpoSGVLdlRjVHcwdXpTRHJPcFFMRXlISkRrZV9hVjRpenRYVy1nTHNDd3l3czNCLUtoQ3JJOTktZ214QTVVOVczMEdHRWY3NVFWU1FiallhU2JxVmFQMHRuWVc1R09meGFtYVdNMnRUcC1VRVRyRHhFMGMwY1pCbEdEUFpjT180Zm5nOXVvSG0zVG5EYk51Z1ZIdGI3N0F0RzJ2ZU0zc1o1WldpTWFmRXRTYUNHb242OG5kWDRFR1V3STdEMzQ0YVhFeGR0UDRaSWFnQ1d2Ukd1NHk0Ym1RbURqaHhFbnVMOFdLS2JXTDFYQ0NyNVFyU3liT3VIUl94d1RnRFFRY0k3YnVxTGhMME1jbHBTR2VTZ25VaHRkekI2ZTJiT1E0QnVyRExjbHpCVFVwMzhtWm95TVRfN05PWTYtNHktTjE2SDdiZTRQVFozTGh5eUg3dUNYYUtsbFF3VExERGIyZ3ZUdmU1N1hfNzRkbHBlNFFxVVZ6cWIxcnViVXk0Q0c3MHdsTUFGMlphdEh5WmlhVHVVR1lSbWFUQmhJamNSZFJzZUVMdmV1U3pMMVEyZGdmbGNsTGdQVU4yMFdHSURKOGxHdklqU2NzbVNjZjFNSnNRSjVPRzVzcmpMdVYxZXFHUkVBR084bmlXd1MtN3p6QlZxbGptUW56MGhmS2tVbXRMMEJuYktXYURLeUtsa192TnNBSkFqVEJRSlpTdkxaUG1xbmJ6b0p2N1dNN3Q1dngycEJsbDJ0dTBRM1R1aDdSWTFOZUROWDZta3B5bmtrR2N6V2E2TU1KWkdLYU1iSDIzVkF5V1JScC1BRkx0b3hWYXFqOUpkei1lNmUtaVNwQlFpRWFxcGpvdFpBT2twVGM5VXNsT0szQWdrZ2FMX0RBU1FDOEc3VVM0VDJlLUxrci1Dd2QxeUswdVdmVmU5LVpBYW04R2ZzclpWTHJGMEJIXzVkWlZoNlB3N3FEZS14ZVRfenljenlqOXFFYkhTTjlqd3VRMmNmWTJSZkUzZEpoTlJaYzBlZXpyVWZxa1JuRXFvX2xTMVBYampXV0VoUE1PcENYbURqMV8zWllaLUVpSlItWVZBUEJSNXQ0eE9hdFhULXVyT2N5NlByQ2s2QjNLNTNQOTdSU05WLUZ2MDE5NzJlTVdZVllOMVdjaDRfbmJGcjVhYkpQV0I2UzFuUEprU0hyU2Z4WVptRmNHaG1jc1BSMFI2V19hMm5DQmhPTFBOUVdQc184Tk1JN1ZPS1VEU0lLMVZRWmJpLW5kcElfRGxKZ0pGcnYwU3Q1NTlINThjXzZrNFBENWZsQWdkWFBKbmlRX2FYckRpTFFaSlhRM243ZUt0Z2J2VzFGek1sSHAwOG4wd3g2b29xcU1aenE4eVY3RDkzSE9wUVNLQ2hBVTNNNDVEZnZzdktFTVo0ZFRlaFJIYWo3SlZGc2pWRFVFS0JrckYwSDZsMl9zMjZmNjJGbEhSY0ppeVd3eW80Tmt2YkFCdG9LSEpSUzBLVGZUS3BRYmE3OEVqZGZoX19SOURQUFlkWnNDQzlOQnVyV1VlWm0zbTRsSFd1emNJMkpLZ1RxN3VlaUFkWVdFQkljMkNld1d1S0tGUnI0Vm5QODNNdm83NXZwd0JRT29DdWhvZkJNSGFzbThhNWEtWW05VlRLNGRSQnZ3TDI2b01hQU1PWVQ0VVhUd1plVW9UVUlQZURvZGRNbk9PSGVEelZuVGF5ajN4a2d6dDQwWUdqazZwcTlnejZoSnN5eXhSc2w1RU90NUNxZXZzY2NtZHVrQUVvQ0dhb2pTeVJ1ZUlLWUtLR2M0YktNR3RnSC1nR0FYck1GT1BZNHo5NDV5MXZfVktGZ254blBITnM1VFRxS1NFY0tLc2EwNWZIM3htSktrTnlUTy1MeXA1ZzlxMS1CeDZIUzZxVmVKLWFtaTgyUHRzcFFOZUc3cVFIbDF4LWxPWjlla29ZclVteXV4bnBJeDNnRlc0eGkyUWlHNWV4TWxxRFRWM19JTTBCSEdZbUNMTFUzTzhjTWEyUTBucFd1THJYZ1U0LXE2c1YzVlFYM1pydG9NdzVRXzRtd24xYV9PbklpNHdYSTJrVWVYSWVVOVFINzFVYWZJcHVWWUhqRDhTOTdYVVVOQnJ6YVN6d0VJcVhvc0FZazJsaG9FSy01Y3d1ekdEaUU5Z0JSMjJ2em85T0xhYy1ERGpSN3pDM2ptX2lSRlVqbFNJTE9fYXNRYm9VSnctVnlWRy1kOWFKZGV3aVV5bmEydXcyTkhsYVhFUUk0Ri1wS3hMNk04bFhMVDhDdnFVVVA3ZnFWVFZCUnRmZlRkSEtGZ3BZUFZRbk5ka202SmtVZEp1Z05NSG8xRnMtbDdBZmxnVHRKeEZ1Um5ZcVZkVVlWdkJBamVqdXZoQ1FtaGFlcDdwSEUwQVhPSGp5dC1jWjFpN2RqQTNrTTNONDJSVC1ucFNfQnExYkJoUUFLRFl5NnhzOTJTMWdHZVpMcmhYRnBMMkt0b0E0Y2g5YVNESEVhRUVoM3BTSDJydnhfRGhLYkxhazJXZWVpMXZHVWpMZDBiZjRYcm5NcExhSlV5M1htbjZVdXBsZHA3UFIyRGpZVVV3dTJHS3FONUhKLUlWVlNvNlMtaWhuLXhFZUNSVmo3QVdQM1FPLUw5OHVUQy1NR0laOW5pU0ZuUGJOZnlHMUp3ei1FbEhYOVZXdloxS0pKMVpXSU9PZ3ZtZWppY04xTUcxZ0F6V0NkRFhIaUpkU3c2RDJPMnNiUGdFWFlLZFJNWG5CYjVJQlRzZkNIc1RmNHlGZGxOaVNqNm5DdlU3VlVoeVdudmZhd1hiaTBwbkoxejV3WDRBQURRODdPdmdQRzd5dkxBM0sweXpXeXhOajhuLkxkd0syeDBvSUxocXZtMnZpSzhseXc"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '10636' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault96041739.vault.azure.net/keys/restore?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/7089b08b10a64ec68db241e20e2109d0","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"qbGcivUVxthKiCxcjxOGdsiItrjjTm0_-o0gkZmRSDlEY4ixbjJYBZMwZLxLm7_ZzoGTVTdON-_6bLu-ZwFqAAe2Nc_HDLkL3FTn1YkjTSA5I6FTXI-CC79m3mPLbrVNkHRUkN7QPpl9Qak8RyRl4TA5XtOp_ztKm5Lfuc1eJsosaRdqaMe2UlEbu0XCdYDoP1UoNRAhrUZwli-GHH6yWQxq0SBtnfUsXH0CkgprrnpDYM3dxUkjJJ6IRpW4acRXrFDg-ccCBQDRLty6eSRehugfZyTGciaT4fBcj245OjytQZHxz2ZGixRxN0YsvjoZXqquXKqfkKEcknMDNapyFw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703512,"updated":1562703512,"recoveryLevel":"Purgeable"}}' + string: '{"key":{"kid":"https://vault96041739.vault.azure.net/keys/test-key/d2c863b455c9439b87fc78c6ac184217","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"uWCbdAq6V_Z3_JRNeKK4o27y-v8lL_IUNGXQHywjTU4aoVK8iDvM0ChRMhlChsMcI-SyGaAk7kiS2ywdNx5JI3rcaZiiasFZ-4CUnUQbOB_p5L_r2dDXvfdQzGaigM6cttEW5Iwze5dEd3BOcDQumxRrtSJNld4AlxEK-Kp7xaOUFc_2yAV1QPvELtjJLN1zMNw12FXNqocpZwZ8t1BGvvXKYfz3yrS6rq0nG36n3S1yA9Cb0NnrTjp84na3diRQXpuaUg65QXrbhcBW6o1aKTsuEAVH5FAqDliBa4v5lqTNsWxOGS996rMfjsJHJQ_fymvIy69zHrMe2UPupwz_OQ","e":"AQAB"},"attributes":{"enabled":true,"created":1564527628,"updated":1564527628,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '644' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '644' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:00:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault96041739.vault.azure.net + - /keys/restore + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_recover.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_recover.yaml index d1318da0dda6..f2bac86a4b60 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_recover.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_samples_keys_async.test_example_keys_recover.yaml @@ -4,444 +4,502 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultfcf91456.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Tue, 09 Jul 2019 20:18:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:01:06 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 401 message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: body: '{"kty": "RSA"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '14' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultfcf91456.vault.azure.net/keys/key-name/create?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/c062f7d6222743fc8ce103b1d9850298","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wTcadP8ONiTwlvzh9KqAqaScUg1734Ux7ykEs-X3wyoi7MjSFaGb-ZAhDrH7iKSbArQeT_Pp4EvCl2axAvOJvT_P2Kw9CE9rtOaD2p6lMZjqY2R0jiMQVyYHpvOICi-87uhEe_N3pdoWxS93WXjo8NblF2dmvwbwCmuAD4IPWD5Ve0VGf2kKh9QtGmJHrQ2C1tdkPP1VHQmfgLNjBQmvPPxK1aAUgTf1jw1NxNErOyHOyiKuYe_phcO8qg0st7Q3wRuDfRYs2_J_1veYQGytghxlAlZ8DjiyUyKNK2fTDUKU5-zDCFWnn9mI1eiTVKXo_4FgEWLfno9vhZEvsO4EOw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703534,"updated":1562703534,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/896fd129ece84f1781b0fbc146a5ecf5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tC-zwt_MYEF4cZ4DDFjtfMUrlie9a0s5ZdkhA2p-BpOGpfcR1jkXQtOirLaC-c7vCyHTj7FauK-j-sZp6tLLQVTrjxuF4yr23qnJPaOsmmMT5um36xNg8eNaMF7p7z9VYEAwXOAWx1ei77MdfgBRV_YMzdxRLYvyzvorUDWhHg58Ple1ZM37VStOpU8layK0T12wJOsqJnPvOvz_m24WlbaP94UJcjs79GZPCXdrK-XRmmaw0ibKbE2mtAltfJHOMdQ7etmlUUW4eY838dTGudYi3vdvJI77h6700K7QH8xRm9jlUlp9AH8PIcBqfW-QI1a45N4GvsGYfHFYCz4piw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527667,"updated":1564527667,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '656' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '656' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /keys/key-name/create + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vaultfcf91456.vault.azure.net/keys/key-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1562703534,"scheduledPurgeDate":1570479534,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/c062f7d6222743fc8ce103b1d9850298","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wTcadP8ONiTwlvzh9KqAqaScUg1734Ux7ykEs-X3wyoi7MjSFaGb-ZAhDrH7iKSbArQeT_Pp4EvCl2axAvOJvT_P2Kw9CE9rtOaD2p6lMZjqY2R0jiMQVyYHpvOICi-87uhEe_N3pdoWxS93WXjo8NblF2dmvwbwCmuAD4IPWD5Ve0VGf2kKh9QtGmJHrQ2C1tdkPP1VHQmfgLNjBQmvPPxK1aAUgTf1jw1NxNErOyHOyiKuYe_phcO8qg0st7Q3wRuDfRYs2_J_1veYQGytghxlAlZ8DjiyUyKNK2fTDUKU5-zDCFWnn9mI1eiTVKXo_4FgEWLfno9vhZEvsO4EOw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703534,"updated":1562703534,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1564527667,"scheduledPurgeDate":1572303667,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/896fd129ece84f1781b0fbc146a5ecf5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tC-zwt_MYEF4cZ4DDFjtfMUrlie9a0s5ZdkhA2p-BpOGpfcR1jkXQtOirLaC-c7vCyHTj7FauK-j-sZp6tLLQVTrjxuF4yr23qnJPaOsmmMT5um36xNg8eNaMF7p7z9VYEAwXOAWx1ei77MdfgBRV_YMzdxRLYvyzvorUDWhHg58Ple1ZM37VStOpU8layK0T12wJOsqJnPvOvz_m24WlbaP94UJcjs79GZPCXdrK-XRmmaw0ibKbE2mtAltfJHOMdQ7etmlUUW4eY838dTGudYi3vdvJI77h6700K7QH8xRm9jlUlp9AH8PIcBqfW-QI1a45N4GvsGYfHFYCz4piw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527667,"updated":1564527667,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '787' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '787' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /keys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' headers: - cache-control: - - no-cache - content-length: - - '76' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' headers: - cache-control: - - no-cache - content-length: - - '76' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:18:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:10 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 response: body: string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' headers: - cache-control: - - no-cache - content-length: - - '76' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:19:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:13 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1562703534,"scheduledPurgeDate":1570479534,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/c062f7d6222743fc8ce103b1d9850298","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wTcadP8ONiTwlvzh9KqAqaScUg1734Ux7ykEs-X3wyoi7MjSFaGb-ZAhDrH7iKSbArQeT_Pp4EvCl2axAvOJvT_P2Kw9CE9rtOaD2p6lMZjqY2R0jiMQVyYHpvOICi-87uhEe_N3pdoWxS93WXjo8NblF2dmvwbwCmuAD4IPWD5Ve0VGf2kKh9QtGmJHrQ2C1tdkPP1VHQmfgLNjBQmvPPxK1aAUgTf1jw1NxNErOyHOyiKuYe_phcO8qg0st7Q3wRuDfRYs2_J_1veYQGytghxlAlZ8DjiyUyKNK2fTDUKU5-zDCFWnn9mI1eiTVKXo_4FgEWLfno9vhZEvsO4EOw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703534,"updated":1562703534,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' headers: - cache-control: - - no-cache - content-length: - - '787' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:19:03 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:16 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' + headers: + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' + headers: + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:22 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"KeyNotFound","message":"Deleted Key not found: key-name"}}' + headers: + cache-control: no-cache + content-length: '76' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 + response: + body: + string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1564527667,"scheduledPurgeDate":1572303667,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/896fd129ece84f1781b0fbc146a5ecf5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tC-zwt_MYEF4cZ4DDFjtfMUrlie9a0s5ZdkhA2p-BpOGpfcR1jkXQtOirLaC-c7vCyHTj7FauK-j-sZp6tLLQVTrjxuF4yr23qnJPaOsmmMT5um36xNg8eNaMF7p7z9VYEAwXOAWx1ei77MdfgBRV_YMzdxRLYvyzvorUDWhHg58Ple1ZM37VStOpU8layK0T12wJOsqJnPvOvz_m24WlbaP94UJcjs79GZPCXdrK-XRmmaw0ibKbE2mtAltfJHOMdQ7etmlUUW4eY838dTGudYi3vdvJI77h6700K7QH8xRm9jlUlp9AH8PIcBqfW-QI1a45N4GvsGYfHFYCz4piw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527667,"updated":1564527667,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '787' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1562703534,"scheduledPurgeDate":1570479534,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/c062f7d6222743fc8ce103b1d9850298","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wTcadP8ONiTwlvzh9KqAqaScUg1734Ux7ykEs-X3wyoi7MjSFaGb-ZAhDrH7iKSbArQeT_Pp4EvCl2axAvOJvT_P2Kw9CE9rtOaD2p6lMZjqY2R0jiMQVyYHpvOICi-87uhEe_N3pdoWxS93WXjo8NblF2dmvwbwCmuAD4IPWD5Ve0VGf2kKh9QtGmJHrQ2C1tdkPP1VHQmfgLNjBQmvPPxK1aAUgTf1jw1NxNErOyHOyiKuYe_phcO8qg0st7Q3wRuDfRYs2_J_1veYQGytghxlAlZ8DjiyUyKNK2fTDUKU5-zDCFWnn9mI1eiTVKXo_4FgEWLfno9vhZEvsO4EOw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703534,"updated":1562703534,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vaultfcf91456.vault.azure.net/deletedkeys/key-name","deletedDate":1564527667,"scheduledPurgeDate":1572303667,"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/896fd129ece84f1781b0fbc146a5ecf5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tC-zwt_MYEF4cZ4DDFjtfMUrlie9a0s5ZdkhA2p-BpOGpfcR1jkXQtOirLaC-c7vCyHTj7FauK-j-sZp6tLLQVTrjxuF4yr23qnJPaOsmmMT5um36xNg8eNaMF7p7z9VYEAwXOAWx1ei77MdfgBRV_YMzdxRLYvyzvorUDWhHg58Ple1ZM37VStOpU8layK0T12wJOsqJnPvOvz_m24WlbaP94UJcjs79GZPCXdrK-XRmmaw0ibKbE2mtAltfJHOMdQ7etmlUUW4eY838dTGudYi3vdvJI77h6700K7QH8xRm9jlUlp9AH8PIcBqfW-QI1a45N4GvsGYfHFYCz4piw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527667,"updated":1564527667,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '787' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:19:03 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '787' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vaultfcf91456.vault.azure.net/deletedkeys/key-name/recover?api-version=7.0 response: body: - string: '{"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/c062f7d6222743fc8ce103b1d9850298","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"wTcadP8ONiTwlvzh9KqAqaScUg1734Ux7ykEs-X3wyoi7MjSFaGb-ZAhDrH7iKSbArQeT_Pp4EvCl2axAvOJvT_P2Kw9CE9rtOaD2p6lMZjqY2R0jiMQVyYHpvOICi-87uhEe_N3pdoWxS93WXjo8NblF2dmvwbwCmuAD4IPWD5Ve0VGf2kKh9QtGmJHrQ2C1tdkPP1VHQmfgLNjBQmvPPxK1aAUgTf1jw1NxNErOyHOyiKuYe_phcO8qg0st7Q3wRuDfRYs2_J_1veYQGytghxlAlZ8DjiyUyKNK2fTDUKU5-zDCFWnn9mI1eiTVKXo_4FgEWLfno9vhZEvsO4EOw","e":"AQAB"},"attributes":{"enabled":true,"created":1562703534,"updated":1562703534,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"key":{"kid":"https://vaultfcf91456.vault.azure.net/keys/key-name/896fd129ece84f1781b0fbc146a5ecf5","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"tC-zwt_MYEF4cZ4DDFjtfMUrlie9a0s5ZdkhA2p-BpOGpfcR1jkXQtOirLaC-c7vCyHTj7FauK-j-sZp6tLLQVTrjxuF4yr23qnJPaOsmmMT5um36xNg8eNaMF7p7z9VYEAwXOAWx1ei77MdfgBRV_YMzdxRLYvyzvorUDWhHg58Ple1ZM37VStOpU8layK0T12wJOsqJnPvOvz_m24WlbaP94UJcjs79GZPCXdrK-XRmmaw0ibKbE2mtAltfJHOMdQ7etmlUUW4eY838dTGudYi3vdvJI77h6700K7QH8xRm9jlUlp9AH8PIcBqfW-QI1a45N4GvsGYfHFYCz4piw","e":"AQAB"},"attributes":{"enabled":true,"created":1564527667,"updated":1564527667,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '656' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 20:19:03 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '656' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:01:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultfcf91456.vault.azure.net + - /deletedkeys/key-name/recover + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index dd2c6f0a9b95..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport +from azure.core.pipeline.transport import AsyncHttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient @@ -64,7 +64,7 @@ def __init__( self, vault_url: str, credential: "TokenCredential", - transport: HttpTransport = None, + transport: AsyncHttpTransport = None, api_version: str = None, **kwargs: Any ) -> None: @@ -91,7 +91,7 @@ def __init__( self._client = KeyVaultClient(credential, api_version=api_version, pipeline=pipeline, aio=True) @staticmethod - def _build_pipeline(config: Configuration, transport: HttpTransport, **kwargs: Any) -> AsyncPipeline: + def _build_pipeline(config: Configuration, transport: AsyncHttpTransport, **kwargs: Any) -> AsyncPipeline: policies = [ config.headers_policy, config.user_agent_policy, @@ -104,7 +104,8 @@ def _build_pipeline(config: Configuration, transport: HttpTransport, **kwargs: A ] if transport is None: - transport = AsyncioRequestsTransport(**kwargs) + from azure.core.pipeline.transport import AioHttpTransport + transport = AioHttpTransport(**kwargs) return AsyncPipeline(transport, policies=policies) diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_crud_operations.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_crud_operations.yaml index aa5bf8efab58..cc15961c68b4 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_crud_operations.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_crud_operations.yaml @@ -1,255 +1,245 @@ interactions: - request: - body: '{"value": "secret-value", "attributes": {"exp": 2527401600, "enabled": - true}}' + body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - - '77' + - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43","attributes":{"enabled":true,"exp":2527401600,"created":1562687784,"updated":1562687784,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' +- request: + body: '{"value": "secret-value", "attributes": {"enabled": true, "exp": 2527401600}}' headers: - cache-control: - - no-cache - content-length: - - '251' - content-type: + Accept: + - application/json + Content-Length: + - '77' + Content-Type: - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name?api-version=7.0 + response: + body: + string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d","attributes":{"enabled":true,"exp":2527401600,"created":1564528272,"updated":1564528272,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '251' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name/?api-version=7.0 response: body: - string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43","attributes":{"enabled":true,"exp":2527401600,"created":1562687784,"updated":1562687784,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d","attributes":{"enabled":true,"exp":2527401600,"created":1564528272,"updated":1564528272,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '251' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '251' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43?api-version=7.0 + uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d?api-version=7.0 response: body: - string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43","attributes":{"enabled":true,"exp":2527401600,"created":1562687784,"updated":1562687784,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"secret-value","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d","attributes":{"enabled":true,"exp":2527401600,"created":1564528272,"updated":1564528272,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '251' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '251' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name/20166f0199b14d72b73abfd7de4a766d + - api-version=7.0 + - '' - request: body: '{"contentType": "text/plain", "tags": {"foo": "updated tag"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '61' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PATCH uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name/?api-version=7.0 response: body: - string: '{"contentType":"text/plain","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43","attributes":{"enabled":true,"exp":2527401600,"created":1562687784,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"contentType":"text/plain","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d","attributes":{"enabled":true,"exp":2527401600,"created":1564528272,"updated":1564528273,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '284' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '284' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault29fe19b8.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault29fe19b8.vault.azure.net/deletedsecrets/secret-name","deletedDate":1562687785,"scheduledPurgeDate":1570463785,"contentType":"text/plain","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/4842c97900d34cf9933ee47a1793dc43","attributes":{"enabled":true,"exp":2527401600,"created":1562687784,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated + string: '{"recoveryId":"https://vault29fe19b8.vault.azure.net/deletedsecrets/secret-name","deletedDate":1564528273,"scheduledPurgeDate":1572304273,"contentType":"text/plain","id":"https://vault29fe19b8.vault.azure.net/secrets/secret-name/20166f0199b14d72b73abfd7de4a766d","attributes":{"enabled":true,"exp":2527401600,"created":1564528272,"updated":1564528273,"recoveryLevel":"Recoverable+Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '421' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '421' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:11:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29fe19b8.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_list_operations.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_list_operations.yaml index a8f8117e3c14..d51d5f132c6f 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_list_operations.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secret_list_operations.yaml @@ -1,510 +1,453 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault2aad19c6.vault.azure.net/secrets/key0?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:12:01 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key0 + - api-version=7.0 + - '' - request: body: '{"value": "value0"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key0?api-version=7.0 response: body: - string: '{"value":"value0","id":"https://vault2aad19c6.vault.azure.net/secrets/key0/7b96a58d018e4599ab88e88b9572c2bf","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value0","id":"https://vault2aad19c6.vault.azure.net/secrets/key0/36914dd1657f4c27a5b0b018511debd4","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:01 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key0 + - api-version=7.0 + - '' - request: body: '{"value": "value1"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key1?api-version=7.0 response: body: - string: '{"value":"value1","id":"https://vault2aad19c6.vault.azure.net/secrets/key1/c83f87d170cb4436b96399150e087f63","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value1","id":"https://vault2aad19c6.vault.azure.net/secrets/key1/4ba6609ebc11430eb24e151319af2559","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key1 + - api-version=7.0 + - '' - request: body: '{"value": "value2"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key2?api-version=7.0 response: body: - string: '{"value":"value2","id":"https://vault2aad19c6.vault.azure.net/secrets/key2/5f6ee6ed44b044edb5a6f00fe7f9061d","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value2","id":"https://vault2aad19c6.vault.azure.net/secrets/key2/407135ffe3844dfda97b308d219da2bc","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key2 + - api-version=7.0 + - '' - request: body: '{"value": "value3"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key3?api-version=7.0 response: body: - string: '{"value":"value3","id":"https://vault2aad19c6.vault.azure.net/secrets/key3/39faf9645abe43a7afa4833e92ca1fff","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value3","id":"https://vault2aad19c6.vault.azure.net/secrets/key3/64057abdfdb845e49ba1693718fde7ae","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key3 + - api-version=7.0 + - '' - request: body: '{"value": "value4"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key4?api-version=7.0 response: body: - string: '{"value":"value4","id":"https://vault2aad19c6.vault.azure.net/secrets/key4/15315d867b184d72968338963ef8306c","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value4","id":"https://vault2aad19c6.vault.azure.net/secrets/key4/ec5f2a5b6971486e87bbb9a0c9c6ed5a","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key4 + - api-version=7.0 + - '' - request: body: '{"value": "value5"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key5?api-version=7.0 response: body: - string: '{"value":"value5","id":"https://vault2aad19c6.vault.azure.net/secrets/key5/e5301eed3f1d4dec927bf145794b0465","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value5","id":"https://vault2aad19c6.vault.azure.net/secrets/key5/22314f577cda4d898c295eaf427c83e6","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key5 + - api-version=7.0 + - '' - request: body: '{"value": "value6"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault2aad19c6.vault.azure.net/secrets/key6?api-version=7.0 response: body: - string: '{"value":"value6","id":"https://vault2aad19c6.vault.azure.net/secrets/key6/82158634aff74f8881ccef96e604a47b","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"value6","id":"https://vault2aad19c6.vault.azure.net/secrets/key6/f78f624a3cb046c4927a84f599e6eeb1","attributes":{"enabled":true,"created":1564528323,"updated":1564528323,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '221' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '221' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/key6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault2aad19c6.vault.azure.net/secrets?api-version=7.0 response: body: - string: '{"value":[{"id":"https://vault2aad19c6.vault.azure.net/secrets/key0","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key1","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key2","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key3","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key4","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key5","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key6","attributes":{"enabled":true,"created":1562687786,"updated":1562687786,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + string: '{"value":[{"id":"https://vault2aad19c6.vault.azure.net/secrets/key0","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key1","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key2","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key3","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key4","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key5","attributes":{"enabled":true,"created":1564528322,"updated":1564528322,"recoveryLevel":"Recoverable+Purgeable"}},{"id":"https://vault2aad19c6.vault.azure.net/secrets/key6","attributes":{"enabled":true,"created":1564528323,"updated":1564528323,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '1231' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '1231' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault2aad19c6.vault.azure.net/secrets/secret-name/versions?api-version=7.0 response: body: string: '{"value":[],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '28' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '28' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /secrets/secret-name/versions + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault2aad19c6.vault.azure.net/deletedsecrets?api-version=7.0 response: body: string: '{"value":[],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '28' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '28' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:02 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault2aad19c6.vault.azure.net + - /deletedsecrets + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_backup_restore.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_backup_restore.yaml index 9f94d903ad43..28cbfb841c0e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_backup_restore.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_backup_restore.yaml @@ -1,254 +1,243 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault29db19b3.vault.azure.net/secrets/secret-name?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:12:51 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: '{"value": "secret-value"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '25' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault29db19b3.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"value":"secret-value","id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/16a8591563fc434f8ea6e2ed9a17d76b","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secret-value","id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/53a7c0e391b243b98ff0838306e5f101","attributes":{"enabled":true,"created":1564528371,"updated":1564528371,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '222' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '222' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:51 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault29db19b3.vault.azure.net/secrets/secret-name/backup?api-version=7.0 response: body: - string: '{"value":"KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLlJWZjNKWlg0WEpua3QyOGF5VUplTTdDNFBvMV9kYWRVZHVYbjlqUUF0MGFkdUJOeTcxTm5ZSEtXbmpOWW1kTWU2WXZMR2pUMGFFeXcwaWVSNWczMEZsNXI0MVFhaWFnZUNYbGxkNER2VGd2cmFxZ3BCY21WYVlXQkRhQm4wRm51SzV6Z2QweG1IUmhOamh1bks4aVZ6ZzRFN0RETHBNMlZiaVBkb09ZOEhSNVNlMUNHZUloRWpQMms0VkVtVzlPOWxKM2lHdTNLRk45SVVKVjE5TmVOOVo2bnJmOHhlOVhtdHRoZnlaUWhMdzdWQjM1WnlTd01pR2dsN2o2XzlTWnl4azkwbVFCUDhMLUVNbHVFZjhXNUlQckFIdXAyRHZydDZrSEo5RGdhX2RrVzExVy1UeVhzZW8xSGhHRWFrUkVBVExGckFuU2VFeTVRTjFFRzhHYk1Kdy40WmNsbDNmcHo4Tkw4SkhTUnRGRnFRLlhnUm9mbXBEX2YtVFpJRkxFWnJpQ2w2ZTA0OFN6THc5VGE0TkVCTDFGcW81ZjdYLU9uQjE3cURWOExabW5WRWhLNXZVVzktNHlPNS1CdGprR0xFV3c2QnZMZjlhd2NCcVhLUlYxeHI5RXBqWTN6UWpVTV9aQVI2YzdCbzVOMC1oQnNEbERiUU1iYVlSX2JxTTQ2LWtOMHdKX1FpbkRHSllzLWFZSC1BR2liOUlhdE9IbzlPdk1vVUtUckxkMGwtWDJrSlFTVUhvb1d5QmNKeExlZlBiMGNOamRtVk5uTlhFS1VCRy1nLU9IWDNPTUdSVmQ0amZiZFBIMGI3MGxvbWlLOEZRcFhpcUw2dXJxOG1zTGJrQlhSMnpjYVlNMmJWUU9DS1l3U0FLb0t0MWU0d0JXNUdvdnJHZnl3YVB1YzFyaUoxWmMwZFpyZk5WVGZaQVJ3bk1IMldsZkMxVm5GUm1hUThGQTZ2VnJrb3FVRVVYQzN3M011UVktaWk4UFVYMTAtWVV6RTdHN1RWWHFuN1l6a2s4NmdRdzdub1pDNGtNS1J6WS11OUQxYlVlYzEzdjg2SXJXZldVZWN2NldtLTlCWC1YenliS2djdVRTQ3ZUY1ZWdF9wSVdMZkpoMkZZb040ZWV5YThLRmZUV3BqZnc2ZmlpSUgzN0ZtVHJUYUt0X3dFdTV4MDd1WkUzdkJHV3BPWktrYmlsX1pGQUhJYWtMaS1yR0ZuTEp3cGJKV0pLSDZGM1VBYVE5anpBOVB1UnpxaVp2VWNHcUJDam9HUGphaF8zcWxsazZCLWZaQ0c2aERYRlpTei1WX1NGWkViNU0ydlA5Z3Y4OU03QjJOeXRpd1hZRzhhMFBlc2VSdXFGNkRNTXQ1SXJyY1g4TjZ5QlVDMF9Ya1hZT2Yxb2phM0xMeFZKUVEzdVdhRTJLbW0waEZla25hc0lLNzA2MjFRSUFncTNyel9YS3RNakU2MGpZT21UUWpNY3BNbFRBMzNTWjlwTTlRX3dEdFVXLTZualZOMXJla1huZEFFZzRJMTFsZkQzck42b1k1WTdHb0dBYW8tRWE2dkVkS0dfMlk5eGNUbEtiMHpyRWxtNk83TDd5ZGFVcGJBblNaRDVPdm84UHFFQUVzeWJwb1lCVnQ3dTFXRXFUQVBJa0ZrRC1sZWFaWHlnalViZFZPV1BaNEtnUlBrU0ZSakNxblhTTVpWcDQzaUh6ODVjTnRJSVVzMXVnNXVpU2dNS3ZpYW4zVTZjWkVEd1NkaTE1bFpDVGZ5ZmZmbUxyLURabFpTdWxEYjN5dk9DZmE1ajB5emRNOC1Jd0pWZUJJM2pZNXZJVWlYRnRuM2pTRC1CMERLaHliS2FsMGZ3NTV0T25zZzIyRFM1TnJ0TTgyWGw0SGF0ZG92Sm5OSGp0bVVYNFpxYTI2RmRzdmVraUdLQ2ZxWWdtbUZpX1dXaXphZU5rM3dzNTFOZmpCQTBKQnhORVBKeUFsZlcwN3NtbVhDdHZ5dDZ4Y3FtRVc0NXpQeWxNX21yazhoQ09HcnVlR3RENExGcURqTW1mT0Z5Mjc1eXlRTDNCU3lJOExfNktzblBaTGJtc0M1LU50ZzE4VjVRVmNkOVZQY0UzMlI5dTRUOHYxS1pqbXQ3S19tYmJGS2x2NkZEQ0lvRDJ4S015UzhFSURSd3VqbUotRTRiQWEzVlhtSmZ5MlpPaUVYNTJnZVlFVGswTUhqaWxlVzhsOWNaNHZJTzZnYVp1UW1kMEM3Zi02Umx3WG9jaWtYeWtCeWYxbU1Qakt4blYtWTRRenZObENmaU1fczNJdnUxUWRUUTRValh1OERDOTcxTk92VWJuNGJCVVN6NW1KY0FQRkQ4dGhVVXE2UFJnVW1WcVB2dlEtcFZiNmxNeUFxSDF1RWlpd240eFBwRWp2V2tmX2ltVGtBb2ZhTmNhdnYxcmpHS1ZrX0J1MmZINVlxWUZqSXFIQzJ3TE0tZzhhY3ZjMHk1MmM2MVpwcjc0aGxmSTc5WV9Oc1BwUng2RmI1XzUtbzVQZWw3Y0VOd05mZ0pPdTk4d3d3RGFSOUktLVJrUDJnTDloVVRsY0JYcUJRalpWZTR3aGVxT00yTW0ybmpIWEFIU0ZRSDZ1bHFvb0V3YXl1LXZ3d25ZU1lzX3Roa2RTQjJUZG5rY3VHbTRtQWxJSGM4YW5vU2prTnI5cklsSDc1M0dNNXJiM2ZHb3IzWm1kOGJ1RUExcmN2YlpmWFlkWjF1MmdlT0VZN2FwZWtUMFFIeHJtU1M4NFZnOXhMM2VHSl81cmVzcW5XYmJhVTdqZU44RTRlWGx6OUhiTzM5aGpuNVhsMkpsTWVLV0JnWTRvOG1lYmJNNG94QndRWkUxVGJPcThXSGRzSE9TQ2VHNmF6U2ZHSTAySUEzYmtEcUNSNjluVG1RbTY2NWM4LUxKc2NFT1dQSWoxX1c3bnUzY18ya1J4RDFHbDBtWFNIM1BRMl9qdE03bVpNSm9tdkdGemRlRUNZdWFVRlVPWjJ4Rnk4ZlU3Ulk2V2ZHUGFBeVF6Z0V3ajdnV3I0RUd4cFJ6d0tzUnI3NXJWd3ZtbE5XR1VtM1VLc01DTmwxckluc0lfd0I3Y184STU4S1hCbUk0dGNUdEF6MGNsd25RMDFIY2dod3BrbkhiRWZ3VVZybkhnNGRZdG1OeDE0T0J0QXFRTG5lMHVoSndyWTlrblN1Tlh1eWNENmt6d3JCQVVKSXgySXpvcXVENVhJRVV1UG55UFVlWDZiLU9BTmR4dTR1WGZBWFc0TWd2dHVDcnQ4VS13TlpMTkNBQjQ5eWRKSGItWUhVSlRWLXVKaTBQb0NzOWhCTzJWZkZDSUh6VERicGVXdk40bGFYRFNCc3dsdGdURXdIai1kcVBLUVl3aUpCcjk5akI2ekZZWVp1MkRtMXNuRjUtR0t1VUZyU2M5UTU4Mnk2a3ZLLS0zYXRwNUN5SlJRQkRqMnY1VnBmdWJCNmc4R3FpdGV4ZzAwaXJwc0c4TW11clNwTTRhQUF4SHMwV2xFQWtCZ18tTEZ2ODIzNGg0aFBzY1FVdnNaeTcySlJXTzVsdC1Ka0lQandZNC1pOV9CMXRzZmRlVlI5eGdzM2RHU1ZHSkpfQlcxQWhmUGppSndhWGFwOEFNRzFzYzJQQnBwQ0wxdk5admNDTzRHOWhkTEFsenNUaGtUaFE5M2YwWVhjTzRhNThNSGNpVjZaUlZOOTNXWVpsbzZxOFZBdWZuZ0t3b2sxd1d0ZVhLVk5DVk8tWjVBV05LMkp6Nmg0eW9FSmU0SGUweFQ5VlJISWU4V0MwSlpMVFZaaXZUY1ZyOXR1cFk1YVNBUFUzRi1hV3B1SzVfRFg4ZkdHX1kybnp2MmsycmtmcFNRMTdRR1lRQ2RMTUxDN3hRNHFEbUMzVGlKTVBGNDB1bGZBQ0hiZDh4RkdBV050LTl1MU5obE9aNGNPM1VhRlVOT0h2dEVFbHRRMUpkQzF6RVpSUGx3VFMxYTVJdkVWV2pockNoZnEwTG43Uk1XaktNOERQNjdfbDJ3MU9rd3VUM3VOejFpTnBZeUZSdEpORjh3NUxjYV9LTkdSVU50V3ZyZUVwU0k0UXlPY1V1REpLc0p1YjY4M2pmaVlHaUJXX0FyblRkS0x1cks3Nlc4UUQ5VFM1aTdWeHhockxwaGFvbkluMjVMMGxpeXJSRmt0UnNGT0JvSXY3LVoxd19tTmpRdXlrQU1DSTBZTG0tandkb3M2TllncXFUQktWS01YRGwzZTFhRUlOa2NEZ0gzcEg2MUNMZTR3c2hRSGl4X3FDQ21lbVBSN0l6T28wY1hzeHdKb21jS1J4bk56QTFKakZUenFJQUhTNm9GbHQ5LXJObU1Sb0ZpNTRlRkJDOFctLUw4QjFIVWVTYkF6WnU1MzFfbUJadWdRVUllV0NLQzJta1B5cjFhZFVYa1QwUTRQVjVlSVhmTWVWcHBPSnJGQ1dXSGJkelB5WkVtZ0psTFlsSGZBMXJ2Z2cyRTJMVDFfd1NzSEtMb2t2UWFNaTNSRUFmSEpINGRoUlZjOGlHM1RyUkFsZ0ZUSnZ4NVY3aXJzcW92RkVsQVhRY0w2UHB6OUJrVFhCcFlxRGhRNXhvS01vcDdrSkRmSXFscXZxWVo3NG15X0FNNDhMZ1AzQzhKMEFjMTJzNzFjR2gzel9QTWpnN282WE0ya21VX2dzT0llY2FTM0czMEtPdjNxSmFHVmk1QzVqTVpfQjUtMTJtZll2R2h0aGYzUVBqUl9PUmpWY3pxT2wxUUpqSEFqN29FU1R6dDQ2SEd6MFJnbG1mVFNVdFl1ODdNNmpfaFpwWktIUXB1RVpkaDViWXFpYjhJQWY1d3pvYl83RGNoRHU2WU5CbW1raHIweThEMlBuZmMyazlrRjhDbVVBaFZQX19YSng1eV9lbGJpTGhhWmh4N0V0UHVHaEdwX3FjNlI3c1laZmNwdGt1RUVxM043aWRDd24tYnpabDFObndMRGQ2MjhyLTNDdGlwVGJsMVNsRVdYX0h1Nk5oMTh1V0l0bmdXanNJcUt2RUlZV1hsSHlEN29meEhKaHAyWms2V2JRRTdfcWFDM3F1TnZmR2hjZHVmb1VkemxPMFdVanRVbm93TnRjamVsV1BMUVBTVE5yN1kuRmg3TzJVbHIyTzdzVVhJZ2FiY0dNdw"}' + string: '{"value":"KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLkhpSUhtRzluUXFhVUZXcnRlQ0Z1TEEwVV90YnlPczJ4TnN5YnBEUUR5SkltNWlKWVJmeUZhVFVlLXZsVFI1VDFxMm5SU3NFaHBnWkk4Z1ZBZ3ZmN3Q3Z0VDZVQ1RUVzRXZzTjFKS0lPc1JzeVlXRGVwWnU0U2pOQWtScHkxT0RfbnFmeWpCLXpqNUswaW9KVVJTS09Md0d2Tm1MUXlJZjZObUZFSE1CUEpVaXQ0OWpOYXNHYlphalhsYUk5Qjk0SERsVlI1bEFzYVNKMnlMM2JlRTBncGYyNUFLX3NDa1hFc1RFbFU2bmVnUjdjQjllUS1IWXNqY3dTaGVNWmM4cFdibE50cXFJZGhOMkpBYW1wR3J2dHc0VDRpd0UtTEVCUDJCaWt4TmctNWN6ajN5azdHSHpaSDJlOWhpak0tRDVGZ2VaMGhiZ19paHV5R0FlWDFmbHBCUS5SQ2Q5RUhTZ28yenlNbTJQZ04yUExBLlJLRkVyZnl1ck1MNGFHOUhKQ3pfc1U3ZUFOMnBTV1AwdWU2YzRGYU9XY2VGaDJDNUppVlBqOGFFRFVxaWFzNEJWVGd4Q2htbHNpMmpQd0V1SENGY3RqRHNSVzZtSGhINUJSZFFKUG94a0V3eEpGZi1PQ0poN3RPR21CczdIbWFOTGo2aGd3Skl3TnZPX0VsSGdhZTEwd2VqTWxTQ19WZDIzYWRiSGRuUXRCQWlVYTVydi0wOTdWRUdwWnpvMHN0a2w2QUFvcjYweXo3WWpWcWdKRm85X2t3TTFIcVY3bWtNSWJKUVhTSTI3YWpHYVBUdTcyZFpkUGdvX21la2FJaDRlSmVRZWlfMDZZeEtwSUZDTS1QaUxNSUpzWU12X2c5ZDJjbEQwQU8wWmNhaEhaeXZfOEZJS3g0RHpYV1E0bkNRS1dDeDh0Nlh6TmlBYnNsMk1OM2lFb3l3VUhma0w5WFNQYVJXZExJamo0SzY4eUpJU2R6aVhudDlaNS02VE9qYUdXdUtSQ0lvSlZOM2FHVUt3aXVBcEtDdkVSbXlNLXctaWNHZmNfZVFHUHNlNTZHQVR5dG02SFZ4OTlUYnpYUHJaeWtqY0tfT2ZlRVRHc0tzSkZZQmtWVE9UTXdJdDFid0JDT1ZuNEdkSndsWDd2eUx2RVRTOHIzM1lqNXo1OUZ5TnJ6QjBqamRaLXBPeFc3ZU9zRUl6MTFVcnMxYkJzcWpXcXV5bTdGdk42dktNdFp3cGgwYUoxMXNULVJkcHgtX3E2a1lsTWc1MHpVWlRYUnpPY0VzQktselNkRjROdUx4ZlFUUVd5UmtWdEQ4UlEyV2czV0JhaTZrZUFpOWpjdVNTN2F2VUw0ODZJMmlpTFJtOEItVG9vQnl2XzJOd0s4OTRlNjc4bTdna0ZtS0pwUUJhMVdOclU3cDV3SUJ0eUQ4RlYyRURYMjc5QThISzNCZnNNZ0NTUWxLdmUtRURzTzdOaTBTclRHN29RLVRVVWpIdmM0RHY4RkUxOW9Yc3VYMHd4dm9CczdRZ2k1eTV2Q2FYSmtMbGVHc3hSeGV1cUhaUE1STHZ0eVBvMEVoTUhSblMtbXp6WWVhcHh4V05VSUhRWFB6MDdLSDZiY1JOMkptbndnb2ZhcDdxYUNyV1l1OGNjLU0zM2N1UnlOc05pRDhWWV94WlhTdXZNT0RmWXo1VkpMX29JZlRjMEVCWDlOQm5ISlZ2Qk5KZ2lUemZXYWlRdE4wdlZ5elg4TjBoOXY3UXMzTENJbmp1aXczbzJSdThISEY1cDNubVhQbFFaOFVOUWdENlZTaXBQUzNwS1RGRF9fTjNDWUYxNzNobHo1ei1MRVFSX25LYTZjREQ5QXAxRkExZDRNX29JWFJvSktkV1JUV0pHdThXaG5OSWFDN0ZlNzlhWk9XYnJwTWlad1hfSUdUWHU5Y0dzYTljbHN4Q05yN2dmUnN4c3VJOGlNMDBTVHZHUkUya0t1RGRRT3JyOXRkMDFoQXhIZmh2cFYyc3lHRnVSTjA5aUc1YVc5Rlo1UnNoMGVybWl1c29WRUlwREMtYWZFbWNLa0l6WmJWb3NSZnktSF9BV3d4VWVMb3hnN3NuUFBmaE5SYTM4TU43bGdhOW43Mk1ZZzN4Zl91VWl2aEw5SWF6OFdRdHlTZzhMMnh1VmwxazZDTjZ3SF9JV09vVGljNzh2bk5qLXBoTU84cFFqYklaMnhueWRzdi1ZRTlFR1RjOHFFc2ozdEpXUVhOOFc1MC1CREtlLTZTMGxjRXdQQkM4cnVuQ19VVHJxc3MwSTd1Mmk0V3k5azBWSzdZb090UWhuTGc0MHJOZERubTdHUDg4R0JTamdvU2JTeURmQUNhRDREMXlJWFVqWG1vQ2pGZ1o3bUQxWTludk1YUFZjSWp2V3F2Ml9kUU15eXlkeDgxRnNEVVNyTE1sODZQYmlnSVlJV2NPY0FLSGdsWnRKTVZHNXZ6ZWNhUU93ek9iMEQyVGdKSmladndOa3MwWWpIQ0ZXa0xXTDZEcnB4b1lEVGRwUzNoWFhYSDRRN2VaOFV5M3U5MjFmWjQ4Z0JodEpDSVVtY2U5Q05EemttUHlKS0kyVkJiWDgxQUxkVzNyTVZlY0lheG1hOEdLNS1DbGFDcUVUWGpheU9yNFNxUW1ZWEI5YnFQeXlQZDVwSTZUVkJ3M2lYdWVSV2VxcDdjVnZ6UmE2YjhvTE1aSlFoR3JxX2VGOElMLVlnRE52NmRXLTlPRk5ad29TOGtRM3RUbGNLUXlIT05WUmVMWXhZNjRPM1ZVYm9iSXY0RzVaZUljV2VaS2NjN3I5ZVBMdTJrcllRbXIwRzd6Y2M4cUdfOWo2eHhDU2NIVlk1Zm1OcWxBRlMtcEcyM01mRW41aUNxdzA5R0c3bWY4a01qMThTZF9kbGw5RC1MbW1UWFZzYi1QMDVZSHBqTHB2TFFQYlZVSTQxRU5VVENnUFFpd2I3US15ODNJdm1IZ3IyVkdTRllrZm9wam5yVWMzM1VXTERnc1pDQzgwTGF3ZGxtZWxFYThDZ1FnVm5EeFJBZ0NMN1BmQWhyV0h1YkduZlQwbndyc1h1ZkRWa0llTkJfVjhrZTlPMXY5WVRlYkZiaFJvR0JBbC1ndHdCNlcyaXY1emxVR2dfcGdQUUlqdXgyMHRtNVZCVGlYbzBLV3ZidGdLVm51V2c5U1dUSnEzOWs1WnRieFpGX0M2NGNvSnlBOUE2TTlHRjlPMkd2WHVPd0lpU1JZazBySGNDMmpudkJwVzMxVjF4TDE3RE84NGpreVNUaF95WW1sSnBkd3VrSlJaNUJsOWpWTnI3bGFrNW15R3ZuTU5PS1NvejF3dXVBY1IyRFBSdEJXVFgzZUVraG9DaFR1V3ZwSmF0Ung2a1ZFTUY1eDcxLTBJMUlkZEJFYlhLM0pxSnJFVTVmTmZBdU9TMU0wSE5mLXNQZjFfZHpVY05vVkN1cUMza1pSSVViY3RwT1pORFBxd282amdyak92MWlOeGFtemZJWHVyZXJuSW5fcDV3OFRmSmUwZHIxTXVycTAwdHhEamxJR0lIMjJoQm9TYW1adkNYUktJYk00LUhiYzlmTlhudnZSRVROWjV6MlFqS2lieDBJd2tDWjZxVS1OTnBnZGN4SHZ4SGhJTWlieVBRWkxkS0t2ZHo4S01ucjNaUGVnWTAwTWx5VkpKY1BGRm1MMloyeVBzb25uT0tjd05lNUFpVkt1S0gwbTJyQmRZMXVzbGljaF9MZEdmbHdrMHA0TTBSaUZBaXluRWlqMl8tZTVjcWJoWFdXdGYyWUZGNmNZSF9OeVhYallIWGZQTllkNzlOV0d5dVk1N051WXk5ZllfY21WVVdPTVFnd1NWcW9qeC00NHEwRWlkTE1RLUVEcFduTlpPX0xaOWNSeTl6anhOSjR1cXRnY2Z4STNXX0ltTTRKbGNuOWJDMzA4WGJSM2dHVkl1OUdkeS13NERVcTFwVWVITGdQbFRfVFg0eVYtbHFRWHNTc0ZkSkZLbzlic3NUS0V1dGNBQTZKRzcwOUJCSkdoMDFIT3BpUFFPWTYzSmNoMFBiSXZubmxmeXc3M2tCWU40MWJMTGxRUnV5dXA4emtzOFVvVW5uT3ZIb2xveE0wQ3VlX0owTmZBdExtU0xEWHozVHUxeDV0RGVJdjlHcDBheUlJZy1wcHZ6RzNMb3pnQUowUjVrMzNkeG9udjVxVFI2MXhnc2JaNUZZT0ljMXBqTVgwQUU4WVZLMGpVcTZ3QzlnTnRDN0M5LXg1cW56Z0pjdHQwbkRHV3NFdElnX3J6SFJhdlFpNlF1SGJIS3doOTBBekVVems5VXFPWjdnTjVoa2FvVkprVFdYZlhTc3B0Zml6WGU2MDFfMlFKNkhtUG1FbGJSeFRCbU1janhiSDE1SDJCcHR6bHdxVWJhSlB3MWd4Q2h1LTNGWC04S3RaY25DaGNrOXBya3VCaEl4czdVaDdDYjE0T1VjVExlcjZGVHZaa3FLczBhcXJPZGpZaDBVeFE1amRIQTc5TDJrMFF1enNYWkNfZXA4YkJQa094RzRCUGpaN2ZSVkRPcjdaaFlRenRQbnpHZXo1eFJoVGhEWWU5eEZTTkRsM1pqXzYyNzduMXllNFAwLU54V3ZTWExFc1ZJUzVabVNYd25KOUpjX3YwTWRkMjliZno4aXFBSVpXX2QzakNsWVBzWG0tMlNzTjBkYnJ0TG5NUzNkOXV0cC13blRfRDN4Qmc2R000MGZSZzFnaG5uM3dhWnB6YzU0T2xORDNZR2RnclQtc3dNY1NwcExiM0FRZEVSQVFycjFSUXJNUHczaUpEdlVKdFFyVElTMHJpRE5rb2kyMFJHQjMzYUtRR2VSZkt0ZldOUFJmSGh5Z0lTdUpWLVZqdHZHT2dWTFAyZ0RUZGNMZ1VQX19kNUxlUzllWEFiaUZWVUJyOWhhdTNzVnFYazR1QWE1QkZRaFlTQWVyN3RxclZGbGRhM1N5UURSU0dETWtyaksyZHFlVlVpTHRYTnJ3VHRfQ01iLXd3LWhhTDcyTmZSaEQtYkpoS2s3X1JIM09GQV9DaDZnaUZQUDBzTzF3a0t6NHNJelhQQ0pUY0pTMTZFNV9sSkkxTGtHOGVfMFItMEk1ejk2blVKRS1RTDQuMktGazBXd2JUdVBadHJMMnFRSXF4QQ"}' headers: - cache-control: - - no-cache - content-length: - - '5406' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '5406' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:51 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/secret-name/backup + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault29db19b3.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/16a8591563fc434f8ea6e2ed9a17d76b","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Purgeable"}}' + string: '{"id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/53a7c0e391b243b98ff0838306e5f101","attributes":{"enabled":true,"created":1564528371,"updated":1564528371,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '199' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '199' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:52 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault29db19b3.vault.azure.net/secrets/secret-name/?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret-name"}}' headers: - cache-control: - - no-cache - content-length: - - '77' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '77' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:52 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/secret-name/ + - api-version=7.0 + - '' - request: - body: '{"value": "KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLlJWZjNKWlg0WEpua3QyOGF5VUplTTdDNFBvMV9kYWRVZHVYbjlqUUF0MGFkdUJOeTcxTm5ZSEtXbmpOWW1kTWU2WXZMR2pUMGFFeXcwaWVSNWczMEZsNXI0MVFhaWFnZUNYbGxkNER2VGd2cmFxZ3BCY21WYVlXQkRhQm4wRm51SzV6Z2QweG1IUmhOamh1bks4aVZ6ZzRFN0RETHBNMlZiaVBkb09ZOEhSNVNlMUNHZUloRWpQMms0VkVtVzlPOWxKM2lHdTNLRk45SVVKVjE5TmVOOVo2bnJmOHhlOVhtdHRoZnlaUWhMdzdWQjM1WnlTd01pR2dsN2o2XzlTWnl4azkwbVFCUDhMLUVNbHVFZjhXNUlQckFIdXAyRHZydDZrSEo5RGdhX2RrVzExVy1UeVhzZW8xSGhHRWFrUkVBVExGckFuU2VFeTVRTjFFRzhHYk1Kdy40WmNsbDNmcHo4Tkw4SkhTUnRGRnFRLlhnUm9mbXBEX2YtVFpJRkxFWnJpQ2w2ZTA0OFN6THc5VGE0TkVCTDFGcW81ZjdYLU9uQjE3cURWOExabW5WRWhLNXZVVzktNHlPNS1CdGprR0xFV3c2QnZMZjlhd2NCcVhLUlYxeHI5RXBqWTN6UWpVTV9aQVI2YzdCbzVOMC1oQnNEbERiUU1iYVlSX2JxTTQ2LWtOMHdKX1FpbkRHSllzLWFZSC1BR2liOUlhdE9IbzlPdk1vVUtUckxkMGwtWDJrSlFTVUhvb1d5QmNKeExlZlBiMGNOamRtVk5uTlhFS1VCRy1nLU9IWDNPTUdSVmQ0amZiZFBIMGI3MGxvbWlLOEZRcFhpcUw2dXJxOG1zTGJrQlhSMnpjYVlNMmJWUU9DS1l3U0FLb0t0MWU0d0JXNUdvdnJHZnl3YVB1YzFyaUoxWmMwZFpyZk5WVGZaQVJ3bk1IMldsZkMxVm5GUm1hUThGQTZ2VnJrb3FVRVVYQzN3M011UVktaWk4UFVYMTAtWVV6RTdHN1RWWHFuN1l6a2s4NmdRdzdub1pDNGtNS1J6WS11OUQxYlVlYzEzdjg2SXJXZldVZWN2NldtLTlCWC1YenliS2djdVRTQ3ZUY1ZWdF9wSVdMZkpoMkZZb040ZWV5YThLRmZUV3BqZnc2ZmlpSUgzN0ZtVHJUYUt0X3dFdTV4MDd1WkUzdkJHV3BPWktrYmlsX1pGQUhJYWtMaS1yR0ZuTEp3cGJKV0pLSDZGM1VBYVE5anpBOVB1UnpxaVp2VWNHcUJDam9HUGphaF8zcWxsazZCLWZaQ0c2aERYRlpTei1WX1NGWkViNU0ydlA5Z3Y4OU03QjJOeXRpd1hZRzhhMFBlc2VSdXFGNkRNTXQ1SXJyY1g4TjZ5QlVDMF9Ya1hZT2Yxb2phM0xMeFZKUVEzdVdhRTJLbW0waEZla25hc0lLNzA2MjFRSUFncTNyel9YS3RNakU2MGpZT21UUWpNY3BNbFRBMzNTWjlwTTlRX3dEdFVXLTZualZOMXJla1huZEFFZzRJMTFsZkQzck42b1k1WTdHb0dBYW8tRWE2dkVkS0dfMlk5eGNUbEtiMHpyRWxtNk83TDd5ZGFVcGJBblNaRDVPdm84UHFFQUVzeWJwb1lCVnQ3dTFXRXFUQVBJa0ZrRC1sZWFaWHlnalViZFZPV1BaNEtnUlBrU0ZSakNxblhTTVpWcDQzaUh6ODVjTnRJSVVzMXVnNXVpU2dNS3ZpYW4zVTZjWkVEd1NkaTE1bFpDVGZ5ZmZmbUxyLURabFpTdWxEYjN5dk9DZmE1ajB5emRNOC1Jd0pWZUJJM2pZNXZJVWlYRnRuM2pTRC1CMERLaHliS2FsMGZ3NTV0T25zZzIyRFM1TnJ0TTgyWGw0SGF0ZG92Sm5OSGp0bVVYNFpxYTI2RmRzdmVraUdLQ2ZxWWdtbUZpX1dXaXphZU5rM3dzNTFOZmpCQTBKQnhORVBKeUFsZlcwN3NtbVhDdHZ5dDZ4Y3FtRVc0NXpQeWxNX21yazhoQ09HcnVlR3RENExGcURqTW1mT0Z5Mjc1eXlRTDNCU3lJOExfNktzblBaTGJtc0M1LU50ZzE4VjVRVmNkOVZQY0UzMlI5dTRUOHYxS1pqbXQ3S19tYmJGS2x2NkZEQ0lvRDJ4S015UzhFSURSd3VqbUotRTRiQWEzVlhtSmZ5MlpPaUVYNTJnZVlFVGswTUhqaWxlVzhsOWNaNHZJTzZnYVp1UW1kMEM3Zi02Umx3WG9jaWtYeWtCeWYxbU1Qakt4blYtWTRRenZObENmaU1fczNJdnUxUWRUUTRValh1OERDOTcxTk92VWJuNGJCVVN6NW1KY0FQRkQ4dGhVVXE2UFJnVW1WcVB2dlEtcFZiNmxNeUFxSDF1RWlpd240eFBwRWp2V2tmX2ltVGtBb2ZhTmNhdnYxcmpHS1ZrX0J1MmZINVlxWUZqSXFIQzJ3TE0tZzhhY3ZjMHk1MmM2MVpwcjc0aGxmSTc5WV9Oc1BwUng2RmI1XzUtbzVQZWw3Y0VOd05mZ0pPdTk4d3d3RGFSOUktLVJrUDJnTDloVVRsY0JYcUJRalpWZTR3aGVxT00yTW0ybmpIWEFIU0ZRSDZ1bHFvb0V3YXl1LXZ3d25ZU1lzX3Roa2RTQjJUZG5rY3VHbTRtQWxJSGM4YW5vU2prTnI5cklsSDc1M0dNNXJiM2ZHb3IzWm1kOGJ1RUExcmN2YlpmWFlkWjF1MmdlT0VZN2FwZWtUMFFIeHJtU1M4NFZnOXhMM2VHSl81cmVzcW5XYmJhVTdqZU44RTRlWGx6OUhiTzM5aGpuNVhsMkpsTWVLV0JnWTRvOG1lYmJNNG94QndRWkUxVGJPcThXSGRzSE9TQ2VHNmF6U2ZHSTAySUEzYmtEcUNSNjluVG1RbTY2NWM4LUxKc2NFT1dQSWoxX1c3bnUzY18ya1J4RDFHbDBtWFNIM1BRMl9qdE03bVpNSm9tdkdGemRlRUNZdWFVRlVPWjJ4Rnk4ZlU3Ulk2V2ZHUGFBeVF6Z0V3ajdnV3I0RUd4cFJ6d0tzUnI3NXJWd3ZtbE5XR1VtM1VLc01DTmwxckluc0lfd0I3Y184STU4S1hCbUk0dGNUdEF6MGNsd25RMDFIY2dod3BrbkhiRWZ3VVZybkhnNGRZdG1OeDE0T0J0QXFRTG5lMHVoSndyWTlrblN1Tlh1eWNENmt6d3JCQVVKSXgySXpvcXVENVhJRVV1UG55UFVlWDZiLU9BTmR4dTR1WGZBWFc0TWd2dHVDcnQ4VS13TlpMTkNBQjQ5eWRKSGItWUhVSlRWLXVKaTBQb0NzOWhCTzJWZkZDSUh6VERicGVXdk40bGFYRFNCc3dsdGdURXdIai1kcVBLUVl3aUpCcjk5akI2ekZZWVp1MkRtMXNuRjUtR0t1VUZyU2M5UTU4Mnk2a3ZLLS0zYXRwNUN5SlJRQkRqMnY1VnBmdWJCNmc4R3FpdGV4ZzAwaXJwc0c4TW11clNwTTRhQUF4SHMwV2xFQWtCZ18tTEZ2ODIzNGg0aFBzY1FVdnNaeTcySlJXTzVsdC1Ka0lQandZNC1pOV9CMXRzZmRlVlI5eGdzM2RHU1ZHSkpfQlcxQWhmUGppSndhWGFwOEFNRzFzYzJQQnBwQ0wxdk5admNDTzRHOWhkTEFsenNUaGtUaFE5M2YwWVhjTzRhNThNSGNpVjZaUlZOOTNXWVpsbzZxOFZBdWZuZ0t3b2sxd1d0ZVhLVk5DVk8tWjVBV05LMkp6Nmg0eW9FSmU0SGUweFQ5VlJISWU4V0MwSlpMVFZaaXZUY1ZyOXR1cFk1YVNBUFUzRi1hV3B1SzVfRFg4ZkdHX1kybnp2MmsycmtmcFNRMTdRR1lRQ2RMTUxDN3hRNHFEbUMzVGlKTVBGNDB1bGZBQ0hiZDh4RkdBV050LTl1MU5obE9aNGNPM1VhRlVOT0h2dEVFbHRRMUpkQzF6RVpSUGx3VFMxYTVJdkVWV2pockNoZnEwTG43Uk1XaktNOERQNjdfbDJ3MU9rd3VUM3VOejFpTnBZeUZSdEpORjh3NUxjYV9LTkdSVU50V3ZyZUVwU0k0UXlPY1V1REpLc0p1YjY4M2pmaVlHaUJXX0FyblRkS0x1cks3Nlc4UUQ5VFM1aTdWeHhockxwaGFvbkluMjVMMGxpeXJSRmt0UnNGT0JvSXY3LVoxd19tTmpRdXlrQU1DSTBZTG0tandkb3M2TllncXFUQktWS01YRGwzZTFhRUlOa2NEZ0gzcEg2MUNMZTR3c2hRSGl4X3FDQ21lbVBSN0l6T28wY1hzeHdKb21jS1J4bk56QTFKakZUenFJQUhTNm9GbHQ5LXJObU1Sb0ZpNTRlRkJDOFctLUw4QjFIVWVTYkF6WnU1MzFfbUJadWdRVUllV0NLQzJta1B5cjFhZFVYa1QwUTRQVjVlSVhmTWVWcHBPSnJGQ1dXSGJkelB5WkVtZ0psTFlsSGZBMXJ2Z2cyRTJMVDFfd1NzSEtMb2t2UWFNaTNSRUFmSEpINGRoUlZjOGlHM1RyUkFsZ0ZUSnZ4NVY3aXJzcW92RkVsQVhRY0w2UHB6OUJrVFhCcFlxRGhRNXhvS01vcDdrSkRmSXFscXZxWVo3NG15X0FNNDhMZ1AzQzhKMEFjMTJzNzFjR2gzel9QTWpnN282WE0ya21VX2dzT0llY2FTM0czMEtPdjNxSmFHVmk1QzVqTVpfQjUtMTJtZll2R2h0aGYzUVBqUl9PUmpWY3pxT2wxUUpqSEFqN29FU1R6dDQ2SEd6MFJnbG1mVFNVdFl1ODdNNmpfaFpwWktIUXB1RVpkaDViWXFpYjhJQWY1d3pvYl83RGNoRHU2WU5CbW1raHIweThEMlBuZmMyazlrRjhDbVVBaFZQX19YSng1eV9lbGJpTGhhWmh4N0V0UHVHaEdwX3FjNlI3c1laZmNwdGt1RUVxM043aWRDd24tYnpabDFObndMRGQ2MjhyLTNDdGlwVGJsMVNsRVdYX0h1Nk5oMTh1V0l0bmdXanNJcUt2RUlZV1hsSHlEN29meEhKaHAyWms2V2JRRTdfcWFDM3F1TnZmR2hjZHVmb1VkemxPMFdVanRVbm93TnRjamVsV1BMUVBTVE5yN1kuRmg3TzJVbHIyTzdzVVhJZ2FiY0dNdw"}' + body: '{"value": "KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLkhpSUhtRzluUXFhVUZXcnRlQ0Z1TEEwVV90YnlPczJ4TnN5YnBEUUR5SkltNWlKWVJmeUZhVFVlLXZsVFI1VDFxMm5SU3NFaHBnWkk4Z1ZBZ3ZmN3Q3Z0VDZVQ1RUVzRXZzTjFKS0lPc1JzeVlXRGVwWnU0U2pOQWtScHkxT0RfbnFmeWpCLXpqNUswaW9KVVJTS09Md0d2Tm1MUXlJZjZObUZFSE1CUEpVaXQ0OWpOYXNHYlphalhsYUk5Qjk0SERsVlI1bEFzYVNKMnlMM2JlRTBncGYyNUFLX3NDa1hFc1RFbFU2bmVnUjdjQjllUS1IWXNqY3dTaGVNWmM4cFdibE50cXFJZGhOMkpBYW1wR3J2dHc0VDRpd0UtTEVCUDJCaWt4TmctNWN6ajN5azdHSHpaSDJlOWhpak0tRDVGZ2VaMGhiZ19paHV5R0FlWDFmbHBCUS5SQ2Q5RUhTZ28yenlNbTJQZ04yUExBLlJLRkVyZnl1ck1MNGFHOUhKQ3pfc1U3ZUFOMnBTV1AwdWU2YzRGYU9XY2VGaDJDNUppVlBqOGFFRFVxaWFzNEJWVGd4Q2htbHNpMmpQd0V1SENGY3RqRHNSVzZtSGhINUJSZFFKUG94a0V3eEpGZi1PQ0poN3RPR21CczdIbWFOTGo2aGd3Skl3TnZPX0VsSGdhZTEwd2VqTWxTQ19WZDIzYWRiSGRuUXRCQWlVYTVydi0wOTdWRUdwWnpvMHN0a2w2QUFvcjYweXo3WWpWcWdKRm85X2t3TTFIcVY3bWtNSWJKUVhTSTI3YWpHYVBUdTcyZFpkUGdvX21la2FJaDRlSmVRZWlfMDZZeEtwSUZDTS1QaUxNSUpzWU12X2c5ZDJjbEQwQU8wWmNhaEhaeXZfOEZJS3g0RHpYV1E0bkNRS1dDeDh0Nlh6TmlBYnNsMk1OM2lFb3l3VUhma0w5WFNQYVJXZExJamo0SzY4eUpJU2R6aVhudDlaNS02VE9qYUdXdUtSQ0lvSlZOM2FHVUt3aXVBcEtDdkVSbXlNLXctaWNHZmNfZVFHUHNlNTZHQVR5dG02SFZ4OTlUYnpYUHJaeWtqY0tfT2ZlRVRHc0tzSkZZQmtWVE9UTXdJdDFid0JDT1ZuNEdkSndsWDd2eUx2RVRTOHIzM1lqNXo1OUZ5TnJ6QjBqamRaLXBPeFc3ZU9zRUl6MTFVcnMxYkJzcWpXcXV5bTdGdk42dktNdFp3cGgwYUoxMXNULVJkcHgtX3E2a1lsTWc1MHpVWlRYUnpPY0VzQktselNkRjROdUx4ZlFUUVd5UmtWdEQ4UlEyV2czV0JhaTZrZUFpOWpjdVNTN2F2VUw0ODZJMmlpTFJtOEItVG9vQnl2XzJOd0s4OTRlNjc4bTdna0ZtS0pwUUJhMVdOclU3cDV3SUJ0eUQ4RlYyRURYMjc5QThISzNCZnNNZ0NTUWxLdmUtRURzTzdOaTBTclRHN29RLVRVVWpIdmM0RHY4RkUxOW9Yc3VYMHd4dm9CczdRZ2k1eTV2Q2FYSmtMbGVHc3hSeGV1cUhaUE1STHZ0eVBvMEVoTUhSblMtbXp6WWVhcHh4V05VSUhRWFB6MDdLSDZiY1JOMkptbndnb2ZhcDdxYUNyV1l1OGNjLU0zM2N1UnlOc05pRDhWWV94WlhTdXZNT0RmWXo1VkpMX29JZlRjMEVCWDlOQm5ISlZ2Qk5KZ2lUemZXYWlRdE4wdlZ5elg4TjBoOXY3UXMzTENJbmp1aXczbzJSdThISEY1cDNubVhQbFFaOFVOUWdENlZTaXBQUzNwS1RGRF9fTjNDWUYxNzNobHo1ei1MRVFSX25LYTZjREQ5QXAxRkExZDRNX29JWFJvSktkV1JUV0pHdThXaG5OSWFDN0ZlNzlhWk9XYnJwTWlad1hfSUdUWHU5Y0dzYTljbHN4Q05yN2dmUnN4c3VJOGlNMDBTVHZHUkUya0t1RGRRT3JyOXRkMDFoQXhIZmh2cFYyc3lHRnVSTjA5aUc1YVc5Rlo1UnNoMGVybWl1c29WRUlwREMtYWZFbWNLa0l6WmJWb3NSZnktSF9BV3d4VWVMb3hnN3NuUFBmaE5SYTM4TU43bGdhOW43Mk1ZZzN4Zl91VWl2aEw5SWF6OFdRdHlTZzhMMnh1VmwxazZDTjZ3SF9JV09vVGljNzh2bk5qLXBoTU84cFFqYklaMnhueWRzdi1ZRTlFR1RjOHFFc2ozdEpXUVhOOFc1MC1CREtlLTZTMGxjRXdQQkM4cnVuQ19VVHJxc3MwSTd1Mmk0V3k5azBWSzdZb090UWhuTGc0MHJOZERubTdHUDg4R0JTamdvU2JTeURmQUNhRDREMXlJWFVqWG1vQ2pGZ1o3bUQxWTludk1YUFZjSWp2V3F2Ml9kUU15eXlkeDgxRnNEVVNyTE1sODZQYmlnSVlJV2NPY0FLSGdsWnRKTVZHNXZ6ZWNhUU93ek9iMEQyVGdKSmladndOa3MwWWpIQ0ZXa0xXTDZEcnB4b1lEVGRwUzNoWFhYSDRRN2VaOFV5M3U5MjFmWjQ4Z0JodEpDSVVtY2U5Q05EemttUHlKS0kyVkJiWDgxQUxkVzNyTVZlY0lheG1hOEdLNS1DbGFDcUVUWGpheU9yNFNxUW1ZWEI5YnFQeXlQZDVwSTZUVkJ3M2lYdWVSV2VxcDdjVnZ6UmE2YjhvTE1aSlFoR3JxX2VGOElMLVlnRE52NmRXLTlPRk5ad29TOGtRM3RUbGNLUXlIT05WUmVMWXhZNjRPM1ZVYm9iSXY0RzVaZUljV2VaS2NjN3I5ZVBMdTJrcllRbXIwRzd6Y2M4cUdfOWo2eHhDU2NIVlk1Zm1OcWxBRlMtcEcyM01mRW41aUNxdzA5R0c3bWY4a01qMThTZF9kbGw5RC1MbW1UWFZzYi1QMDVZSHBqTHB2TFFQYlZVSTQxRU5VVENnUFFpd2I3US15ODNJdm1IZ3IyVkdTRllrZm9wam5yVWMzM1VXTERnc1pDQzgwTGF3ZGxtZWxFYThDZ1FnVm5EeFJBZ0NMN1BmQWhyV0h1YkduZlQwbndyc1h1ZkRWa0llTkJfVjhrZTlPMXY5WVRlYkZiaFJvR0JBbC1ndHdCNlcyaXY1emxVR2dfcGdQUUlqdXgyMHRtNVZCVGlYbzBLV3ZidGdLVm51V2c5U1dUSnEzOWs1WnRieFpGX0M2NGNvSnlBOUE2TTlHRjlPMkd2WHVPd0lpU1JZazBySGNDMmpudkJwVzMxVjF4TDE3RE84NGpreVNUaF95WW1sSnBkd3VrSlJaNUJsOWpWTnI3bGFrNW15R3ZuTU5PS1NvejF3dXVBY1IyRFBSdEJXVFgzZUVraG9DaFR1V3ZwSmF0Ung2a1ZFTUY1eDcxLTBJMUlkZEJFYlhLM0pxSnJFVTVmTmZBdU9TMU0wSE5mLXNQZjFfZHpVY05vVkN1cUMza1pSSVViY3RwT1pORFBxd282amdyak92MWlOeGFtemZJWHVyZXJuSW5fcDV3OFRmSmUwZHIxTXVycTAwdHhEamxJR0lIMjJoQm9TYW1adkNYUktJYk00LUhiYzlmTlhudnZSRVROWjV6MlFqS2lieDBJd2tDWjZxVS1OTnBnZGN4SHZ4SGhJTWlieVBRWkxkS0t2ZHo4S01ucjNaUGVnWTAwTWx5VkpKY1BGRm1MMloyeVBzb25uT0tjd05lNUFpVkt1S0gwbTJyQmRZMXVzbGljaF9MZEdmbHdrMHA0TTBSaUZBaXluRWlqMl8tZTVjcWJoWFdXdGYyWUZGNmNZSF9OeVhYallIWGZQTllkNzlOV0d5dVk1N051WXk5ZllfY21WVVdPTVFnd1NWcW9qeC00NHEwRWlkTE1RLUVEcFduTlpPX0xaOWNSeTl6anhOSjR1cXRnY2Z4STNXX0ltTTRKbGNuOWJDMzA4WGJSM2dHVkl1OUdkeS13NERVcTFwVWVITGdQbFRfVFg0eVYtbHFRWHNTc0ZkSkZLbzlic3NUS0V1dGNBQTZKRzcwOUJCSkdoMDFIT3BpUFFPWTYzSmNoMFBiSXZubmxmeXc3M2tCWU40MWJMTGxRUnV5dXA4emtzOFVvVW5uT3ZIb2xveE0wQ3VlX0owTmZBdExtU0xEWHozVHUxeDV0RGVJdjlHcDBheUlJZy1wcHZ6RzNMb3pnQUowUjVrMzNkeG9udjVxVFI2MXhnc2JaNUZZT0ljMXBqTVgwQUU4WVZLMGpVcTZ3QzlnTnRDN0M5LXg1cW56Z0pjdHQwbkRHV3NFdElnX3J6SFJhdlFpNlF1SGJIS3doOTBBekVVems5VXFPWjdnTjVoa2FvVkprVFdYZlhTc3B0Zml6WGU2MDFfMlFKNkhtUG1FbGJSeFRCbU1janhiSDE1SDJCcHR6bHdxVWJhSlB3MWd4Q2h1LTNGWC04S3RaY25DaGNrOXBya3VCaEl4czdVaDdDYjE0T1VjVExlcjZGVHZaa3FLczBhcXJPZGpZaDBVeFE1amRIQTc5TDJrMFF1enNYWkNfZXA4YkJQa094RzRCUGpaN2ZSVkRPcjdaaFlRenRQbnpHZXo1eFJoVGhEWWU5eEZTTkRsM1pqXzYyNzduMXllNFAwLU54V3ZTWExFc1ZJUzVabVNYd25KOUpjX3YwTWRkMjliZno4aXFBSVpXX2QzakNsWVBzWG0tMlNzTjBkYnJ0TG5NUzNkOXV0cC13blRfRDN4Qmc2R000MGZSZzFnaG5uM3dhWnB6YzU0T2xORDNZR2RnclQtc3dNY1NwcExiM0FRZEVSQVFycjFSUXJNUHczaUpEdlVKdFFyVElTMHJpRE5rb2kyMFJHQjMzYUtRR2VSZkt0ZldOUFJmSGh5Z0lTdUpWLVZqdHZHT2dWTFAyZ0RUZGNMZ1VQX19kNUxlUzllWEFiaUZWVUJyOWhhdTNzVnFYazR1QWE1QkZRaFlTQWVyN3RxclZGbGRhM1N5UURSU0dETWtyaksyZHFlVlVpTHRYTnJ3VHRfQ01iLXd3LWhhTDcyTmZSaEQtYkpoS2s3X1JIM09GQV9DaDZnaUZQUDBzTzF3a0t6NHNJelhQQ0pUY0pTMTZFNV9sSkkxTGtHOGVfMFItMEk1ejk2blVKRS1RTDQuMktGazBXd2JUdVBadHJMMnFRSXF4QQ"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '5407' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault29db19b3.vault.azure.net/secrets/restore?api-version=7.0 response: body: - string: '{"id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/16a8591563fc434f8ea6e2ed9a17d76b","attributes":{"enabled":true,"created":1562687785,"updated":1562687785,"recoveryLevel":"Purgeable"}}' + string: '{"id":"https://vault29db19b3.vault.azure.net/secrets/secret-name/53a7c0e391b243b98ff0838306e5f101","attributes":{"enabled":true,"created":1564528371,"updated":1564528371,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '199' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:56:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '199' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:12:52 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault29db19b3.vault.azure.net + - /secrets/restore + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_recover.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_recover.yaml index c42445d00a55..8936cbf3e59b 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_recover.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_samples_secrets_async.test_example_secrets_recover.yaml @@ -1,117 +1,134 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault7f7a16d0.vault.azure.net/secrets/secret-name?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:13:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: '{"value": "secret-value"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '25' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault7f7a16d0.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"value":"secret-value","id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/387abddfcc2c4b7eb4a4604d274a39cb","attributes":{"enabled":true,"created":1562687832,"updated":1562687832,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"value":"secret-value","id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/731695cfdc604c60809900f0dded0c26","attributes":{"enabled":true,"created":1564528411,"updated":1564528411,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '234' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:12 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '234' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault7f7a16d0.vault.azure.net/secrets/secret-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1562687832,"scheduledPurgeDate":1570463832,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/387abddfcc2c4b7eb4a4604d274a39cb","attributes":{"enabled":true,"created":1562687832,"updated":1562687832,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1564528411,"scheduledPurgeDate":1572304411,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/731695cfdc604c60809900f0dded0c26","attributes":{"enabled":true,"created":1564528411,"updated":1564528411,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '348' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:12 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '348' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /secrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 response: @@ -119,48 +136,38 @@ interactions: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: secret-name"}}' headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:12 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 response: @@ -168,48 +175,38 @@ interactions: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: secret-name"}}' headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:15 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:34 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 response: @@ -217,181 +214,338 @@ interactions: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: secret-name"}}' headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:37 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1562687832,"scheduledPurgeDate":1570463832,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/387abddfcc2c4b7eb4a4604d274a39cb","attributes":{"enabled":true,"created":1562687832,"updated":1562687832,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: + secret-name"}}' headers: - cache-control: - - no-cache - content-length: - - '348' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:40 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: + secret-name"}}' + headers: + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:43 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: + secret-name"}}' + headers: + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: + secret-name"}}' + headers: + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 + response: + body: + string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: + secret-name"}}' + headers: + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:52 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 404 + message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: GET + uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 + response: + body: + string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1564528411,"scheduledPurgeDate":1572304411,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/731695cfdc604c60809900f0dded0c26","attributes":{"enabled":true,"created":1564528411,"updated":1564528411,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '348' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:55 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1562687832,"scheduledPurgeDate":1570463832,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/387abddfcc2c4b7eb4a4604d274a39cb","attributes":{"enabled":true,"created":1562687832,"updated":1562687832,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"recoveryId":"https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name","deletedDate":1564528411,"scheduledPurgeDate":1572304411,"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/731695cfdc604c60809900f0dded0c26","attributes":{"enabled":true,"created":1564528411,"updated":1564528411,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '348' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '348' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:55 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault7f7a16d0.vault.azure.net/deletedsecrets/secret-name/recover?api-version=7.0 response: body: - string: '{"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/387abddfcc2c4b7eb4a4604d274a39cb","attributes":{"enabled":true,"created":1562687832,"updated":1562687832,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '{"id":"https://vault7f7a16d0.vault.azure.net/secrets/secret-name/731695cfdc604c60809900f0dded0c26","attributes":{"enabled":true,"created":1564528411,"updated":1564528411,"recoveryLevel":"Recoverable+Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '211' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 09 Jul 2019 15:57:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.160.58;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.872 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '211' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:13:56 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault7f7a16d0.vault.azure.net + - /deletedsecrets/secret-name/recover + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_backup_restore.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_backup_restore.yaml index b6c8060bf441..90c8d9b81ab1 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_backup_restore.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_backup_restore.yaml @@ -1,206 +1,205 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:14:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f60fbc.vault.azure.net + - /secrets/secbak32f60fbc + - api-version=7.0 + - '' - request: body: '{"value": "secVal32f60fbc"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc?api-version=7.0 response: body: - string: '{"value":"secVal32f60fbc","id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/8968fbea165844c6ba86c8774431bfd2","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal32f60fbc","id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/778d727d3bae4014a6285fdaad85736f","attributes":{"enabled":true,"created":1564528490,"updated":1564528490,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '227' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '227' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:14:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f60fbc.vault.azure.net + - /secrets/secbak32f60fbc + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/backup?api-version=7.0 response: body: - string: '{"value":"KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmZENXM5Qkl4M3FfWWd4OHAteWRFVXF1SDRqRWUxalhCZUczbkh2WFZtaHQtaXZXWnZaLUpGV2hKTGg3SmJkOGhMTlJzSnJ0OGtJeEVENW1rNnc3blpkVDRiRUIzRWlVdkx0eE9UakpsX1JwdWxhTDhabmY4a1B4RHdsSzh3VWpTX3hSTjI0Y2M3WU1KR2o1aHUxT29oZXJHT2FzRmthM2w3ek1ZMlVWVFFFck5GLXlyOHkyYnd1WW9HNGpUSGtNZkN5OWZ1OEMwdHcyRWVwWlNGdl9aMk94bjY3aVZLTDU2LTZybVhRZnBMYmhic2t3QTRUaGJiRl8yRlhXZTg2a2s3NEp2cjJzazczMVFkTGdWNGc2TFlpV2lISmR4aXdKOEsyZ01BX2RXLVBMZHA3N2d4endzTk1Tb2hHeVFLbU15M3ltVFRkMHRjS0g2VVp6d1Rnb1AwQS5oR2F2aHlIMzRPRnBVTmVJUVNrbWdRLjl0alJIYkpDUjgtbkFzLUh6VHM1RDl6ZzV6dlR2ZC1YbDFfREpZbzBJYnRBanNBWVBFWGdUQUFDUTlMTDFJdTA4OUhpblN3MWUwUDRyd3poNHpTdG5saHlDNGlPdDQ4SzVoMGZUR2dPa1ZsOE1PdGl1bFhwTHJtZUdzeHJaVjFoaE0tUW8yb2g2VGJwUmM3bnphcTBpcnBNeUxiRTU0S2EwRTNCNlpEb3ExQkpzRmNMZ2RTeTRMLXhyRk9ZclEzc0xYUU1FTFRIRkNMVHV4dFlianBtdUlrTHo0UHFjV0p5TFFSQ1EwV2ZObHVFel9razY3N0VpS0V3UDcyb095RElnZ0ZjT0k1VEh0VVFGeXRRX3BpMEtvajJkRExRM3J2WXhYVVRqUm9uN3BnVmxnZVltZGM4aTR5QmFYUm10TW5VYWV3WC1fblNQWkhTNUJ1MlV2VEMxVEJGQk8wWUhpamlVWnd2WTNrLXVtY0xlT0lGeWxzNnBMLTdELXJRZk5SWnowVkh4dF91aThSMUZaSFZHeGlyMmI1N0xJU3hBUDBHejJPQ3NDQWVGMy1Gb2NaSVM2UkRsbE1WdHlCNE9kUFUxTktOdUwwdlY4bVdyRzVlSU5ncVFWZFRUN0EwRjBOd2dSd2l5dTFHcXo1NVhXVVVxMjN3cDhMdDR2R2wwelNzblJsNldrRWtrRDZUcFFrTm1xdU4zM1p0UjZHejJ3NmpBRGJHMzFreHhkVEMyN095QUJiWjdUUWF6ZzZKcUlaZllpdkFJOVpuNXIxV05RWDQxV2s4aEo4bXdWc1ZXbkRFeURLRFhGUF8yYWNSX3hDSjlpU2gycnlQeEFtaUFySi1vSHFoSWI0TFlJZTIxbmNGMFRoYzNoNnZrMVNPS1JTSl9zemFnazRySEVfZm04WWkzNi1RU2pMdlJ6SFJtTEpPNWVvQzNNMF9Vb2FQdHpEUE1FUGpXVk1GY2FNbmZ0QmxjY3AwSUo4Rk5nR0YzTmttcFpEcmFPcWRtYWc5TnViaXpQM0V3YjBuR0lwUWc4QzNHOHdtWmdwV3ItV3BQQUszRXo4SVVXc2xOVmZKMjBQSEg5SVIyS2UxMmVsM3ZlbkdsYWtXbW1ZR1NMLUFOTHI5TXQtUWdLeGtGdW1leVFRdTJZaEZxMDlHU2tBcFk5WkVENDFDa2JocVlOTUcwbzVGR1BmSWFGM3FYcGNPdEdhd0k1RkI0Zzh6LXktUXd4UDhnUzI5X3hSWEZLd3BJYU5sRDVHWi1rYVJVSU5kTXY0SC1LcUZ4VlFKYUxiOHRCbTNsdWp4dHYyelJ0cXRlRkVoRnBhLW5MRmhlR0ktdjJJSF9idUJDNHVSajJyRDZNYjVYZjBGSGo3bnNtdl9GX1h0VDlsNXFwbmV6U294MWdhUExKY1pzSlZVbzNCR2hiQ1VMTkt6ZnFNWm1jNml6QW1hcGpCUGtRRDNtejVoT1l4RUxOWUhiUHJjZlFuaGR4Z3ZHVjFJa1lSbVFZb2ltUkx2ay0wWVpMMzVIT2xEYWxNTmNnUkNZdXRTSmJpZ3B3MjBHVG9tdkVQUV94TTRQUXh2MFU1bl9hMzIza3ZNY25nbGFyQldMb0NBMjJtbXZlYm5GbXAyUGwtY1BOYS1zd0FHYnRHVlhQMV9jd25hUzlwbWRlZTJ2MlBmVlhWa1Boa3l6TVB1bEpKNUp0bkt1SWhyTk1SWEFwT3FoTzlFVG1WOXRYTTNhT19aY2wxWDBaSlRQMS1EZXdQTVNpUGdzMjJuM2sxWmVOUEFMYjM2MmxsZzk0RFBuTkxLeTVTaUkwWkdpWjd1U0psdTNFSWFUQW9NbVRseDZBSmI5T3R4aUtCMjNTODhJYV9SNmR5Z0ZmTHd2SzBZSjN2WjdEakctWDBLRU5QbTRqTl9kamwxOEJ3eUJuZXZoRG1DbTZjLWpndFJWcHo0bTUxcGFjMHVKaFBJLWt4cElCSmlaZC1HUW1wc01hOGs1MFdHdHctU0E1c0JxeUVuRkNXdi12QWZEUzl2VHRoOFhGUE5hM05JUWdZaUYzUE5mMk0xZzlEZ0poQ053OW5yRTcwVkVIeHNRRFdNR1pib1NoSEhLWW5UbUVfOGVRbXY1c3BEbDcxaVR6OHdCT2MyeE1seTNkY1pUT2pzMFFQUTY3N2xNd2VoWVh4NFFSMG5MT2psd3h5WGs4VG42LWpFdWlaS1pFaGJVclA2OExKSHc4YnVJOWFoeXRuWFRKVWZfWlB3a1NBU0VBRjV1V2JEeG1ISTdFUE9SejgyN2t4anBZcnAtSmJ5NHFzRW5MUFlqS3Z5OEY1Yk1POGc4djRralB3YXhYRHgzSHI4VlJoUlRiN2dpcjhIb3A4UkNtYkM1c3lwZy16MmNaVmk4dmh1NWxjN3l6elg2Qmp4Vy1zUzlDV2YtM0FWX0NlQ1JJUmJjV0dSR21PeVZ1czBpTGlmVVhEdEdhazVBdkhtLUNxZDNkdDFrRlBmbk5TbmZvMHZYWUhTTmljaGVQVm9xNGkzZm1FYlJmazFqQlNXT0FDT3NyS3pIQU1BWEVZNGxCWXUxWDRQVExOYTlFS1BCd1h1RmdveURKSkdHSWp4RmN3Z1JBeXp0TEZBV0o2MFJ4YnpUd3VhdENqREUyM1BEZlZNMm9nYkxKNVZ3NDlLWUR3UmRMN0EtbGQ0V0daSHVVYTE1djA1ZlF4d3ZsYTQ5Mngyek9OdG1NajZtbGZYUTJhMlVGTTVWeTVnQUJEMmFjbVZZSzV0dTR2SDFTT19kckxIZmdJR2lEcUluemNyQmtSZ3ZvQjd6Rng3OVBkdllXVllxODFWQmxfWkZHRk9lZ2dxSXNFdkhZZjRHdVdwTXo1T21WVERCWTh5Yzh6RExxTUhGa1M5bEQtbXFxTTdrUmFxdHlOMkdvenp0M1ZVNjFRbjBFQ1FXNG8zYmcwS0NsWUxWVXpPNjVrRnl0VVQ5bGt6Zm9HYkdJMWphS0ZwVFMxSk01RUFwVm1fSkJJOTRRdk5vSjUzWmg3T0xPWTQ5UUpUTTZvY1U5MmhHUmtyeThyRVpsc2VPN2lZenVhX0sxZTUwS01INzlrM09DdDlkMXpBZVdTakVyWHpHMW5zemFXRE1XSk5BVXlFTVpGZVRDX3FraGJhZzd2a0ROS1hvQVB4R2oyQWNMWXNaRXhUa3IzUFBTYThjSVphWmk3T09xOEpjb0JSMG5BQXJXSTR0YlRQRHJ6NHBNaXRjQ1lVVG5RYUpFV2N3WWpqQWp3eTZzLVhqNHZDSXBmQTNEei1mSS1MSHdHeTZMcExuZ0pnLTVHVVFiS0dEbW5OSGdmXzd1YXo3YUp5OGhaV0VTd2cxQ2poMGJkNXIxS24tOW1WZ21ZcVpHckQ4YUZCNVA0ZGxYWVotNXpqMThkU2VlNE5sbjZGRTllbUdWVnN3SnFSblo2V1ZJaVZJUDNKN19iVmdGSW5INklQSWFNY1dLU2tZbmVZUFRjODFFZ2ZndDBEWjFTaklYRWI0eWxmV0tjenJyODR1WGJYLThUaGJCRklMSk5oazhWTDJKOVVkSS1hcTFES1lUbmc4TzlyMS1qa0NnRjNYNmd0MHpnWW1qcmxZR2NNVm1ENTR6WHRkbENGWDBPN0RpMHJmemZ0WEhXV25IaHFjNzQzR3YwUjVtbnVndEJkQXN1SzJFS1p3bUFOc2hnRV9EbmVZOW1sckZYc3g2NVZlOE44SGlMdlFBb1ZkR0lsXzdSMG15b21IOWowam1idnhGeDJCUEZ6RHQwREJyZFdVRWdXOU9pRTUtNFRWOWEwWEs3UHY1UVJ0SFRIMHhfSEw5bndFeTN4VlE1eHQ5WGs0NWM1djhTRXBCd0czamJDM1A5UkZZWnp3YWo0SjBnazlPbloxSXRvaDQwZmJfLVNjZ0k0WE9pUnBkaGM2bnJIWkhjckg3dHFqeFVVNTlUaDJjSURLQnJEcVJIX1E5emVmODlMNUZDakxsUTJIVXlmT0tZOHh2LWpqS0hldkt2OUFuZ0JTd2FrcklCU0tLV2JvZks3bXJHamJzcWp5SC1TX2RLT3ZkRmFxVlM4c2xyeWwtUnNwWFJscENpem16R19OWm40ZjBhN1JGVmZPSGxMVUV4Q1BWVDllMVFIVmhmUk9Ld2FpNGRLcDVtNGZTZ1FubGkzbEs3QW90OXFVTkZhX1F4aWxya01jM19OOGFlRklmZjN5ZVlGWUluOHpqd1RrZVJURmtEeGFKOGlJa09HVHhYNEhtWXhpSmkxZ2ZiTXpiYWlBeHBtdU9QOXI2dEZvTTQtVmpaUnFFTkJqUnNKSGQtZnpLVE5OV3VrVlNfYkN1dkhzZEZkSkxmZm80NXBWMmVUS1dZVUNibHhEU2hTZ1JqUXo5Z2tJTXd1RW5iNTZ2amcxUzNkMDhGNDBTU3hKYXhPcTRqUW85ZEpPaFR5NXRaaWc1djluaDFhVU8wSUtFZ2tsVERJR2hyVjZkWUFiSW5FbWhZWi1LejJEdjlRNzZ3MXQ3Y0trQ28tb3I0UU1XM3dVUm5NdkRCYjZubVNkOS12M0xKZWN2dDF1dS1RMzNCb2kyYk9fdTNtSk5nRVBBalhMQ3MtQ3RCNnhBNnVxbU1HSTU2R1pYdHVwTXloVXcuOGc3M3ZHQVdDam1YYW0xeVYzbXhnUQ"}' + string: '{"value":"KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLkFMc0piLWlWcUk5Y01EcVRhS2w1d3g0UTd4dGtzZ3FTWjFfdVEtRGxuR19yaXZ4bGlWakFfbGlxQ3dhZ2lNaTQydkRGa29Jd2U3UnYwYmwzMXlzY1NpQmdkSmxvSzl4SjBJVWJQdjI0Y182amd4TmVVNWx0M2hKRTZ1R1JFQTZYSWpOeEJkazQ1a18yMTZ2a2hRbEt0X3g4dC1oZzk3ems2bkNpT0RTLWtWQmhIS2RST1RmRFZXUmJhVlcyQm9wTHBKM0E2cEpadEtPMjF1dHgwQWRkTVVSMXQyamdkZEs0eTJxWDJTX2hrY3ZUdnR5VGxiUXkxTmF2WnFodlptc0ZIY3ZZT0ZWdW83VTEtWWR1TUI4SmtuaFljanZkSU5lNmJSdzg0UWxQQzQwNzZXTk5TSlh0V2NNbkVMaWF0ZnFLT0RGQzY3TUVTVlA4TVNMWHZQOGIxZy5TTXhZMkRyaDlzckJCQldYNDJMVDBBLjY3S0pxd3FQekFPMVR6ZGNOTHpOY2ROQmNsVWc1SE5CSFRRYWNqNFJHN0RlWGRZMWJ1c05UMUdYUXFqTDNURzVqM0Y2TVVGYXh2R2drcjQ3czJ3cW1KVmRON2JEYlhyR2dobU9ENThmanBXbzA4ZHQ2ZHJWTC1yX0FDeV9CRGFERFFrb3Q5VHU2RW9FSjB0WjVsNFpPWUxaSmVFS0JfaUlCVWRfaW02MzkyeWtrZDIzT0dlNFRuZ2xNSzlJc25sMWMyN2JySl82aUR5R2hheEpiQTBHc0ZDM1I2Q3dlenRjdV9COUY2WE9WNlJTLWoyOW9vd29URUxpM3pwZXJaN0h0OGFlSnFzRHFkMzFLT2tlUDNEcEpVdnpEczJKNDRTNC1Qanl5dDV6UTk2LVFrLVhaZ3FSVndETWQ1VFAweHFQZXdTX3Y0dmlDRUxfbTBvTW5jY3lYTEhvMmVvMzdRUDUzU2Nodm1ocFVCTEpmYUl1dG11TC1XN0Fla0xJbjU0R0NfMzVWV2VHR1lQWnJtNERYbHp3d3huY1E5U3h0OVAtQXctTHJleHVFUWlOWGlrVXh6R2djYm9HVWJ2VFlzdnBGR2JWN21oN3B6SHQtc21Td0hoRkczczd2Z0xvc2tPbUNuQVJ6REwxcXR4dzRERmNONERQRk93YzMzUUdTb3Z6ZVByblVnTU1NRHlvT1NwS1ZwdlA2Wm9zdTdTTy1LUUV2MlJ4TE5ZaHJVZWtKdnlXMkRGbFhkV3VwaXZnbU1fcWFYM09ZVHZtbnlwNDNtcDFyNHFqSzNOTkZKNEJ3M0VCT2xHSV9UdHo5cjF6ancxenJXcTNWVTlkdzQyeXJQSk5na3REY1dzWGdoN1NNRWV5X213R21sNEJLRmtnTWpCVWYtV0kwWkdhVDVrT1QwZGVjRGxaUXpHcG1KTVI3N0p3ZUZsaDhTZDd1ZXVEU285ZkhCODFfeGIzUVhWb29iUXJfcUtMRmpMbFZSLThjd1BLeURCUEhtLTBrd1JyN3FGb3BmQjNfOG81UHFhSENvbHBRQ00wTlhhaXhaN2xBV1daRUxyTXI1RGxzMlE4cUh1UWo0dE91VzRFbW9xb3Vpb1ZYclZwMlBOMGV1ZmkzU1YtRUJhdXZfZ0Jzcy13YzZQSEZ4TFRaRGJyTDBpSDlsSE5YOTZLS1dQQjV5YktNM0x2cWdQMk0wOTlESS02TnN4V1B3U2tTdGFjQzJlUk04MmZQNENyS1Z2c1BqTkFTd256M3NqbXUzR0xBWDlKem56d1Vrem1mVC13SDVqM1FIMUs3T0lzeEdnWXQ0THlWSnZQQWFJenU5Mzd6bmpyQ2JNUmloM1ctMzNGZG5QdFdJa1FrN254VmtITHlfaTU2NS1FZHBZNW1sVTBIMnJCTjE4cEoyZUJscmpWcXFMT0VPMzFxQy12M0dJS1lTbkVhdTZGNjY4ZVE0dU91R1AwZUhqLWFzNm1pLUVZSXk4WVhKTlBxanB1OHEtZG5BdkdSRFFUaWs1bHZHQW9JMXBzcU94aENNdVp4amhNbHA2aXY5aTctMWxNUkpKVnpoY3BwRmdXLVpvX3I1Y1NDbmFsZkN2UzhvQklOdVdJdzNWMERIREw1ZGhUTTBfZ3JEazdheEpjVlZISFZMR0tMSi1hbTJBLUc1MjlxMGJ4UzJJUVVWV1lhcGNHZjdvVHc5TXluOFdJOTVhRVN1a0Y4XzluVFdqVmI2d1VQeXpIRWpUOHhGVTVuTW1HSDdLSnpIT2cxNDM4eV9lVjJPZTNqX3kxclN2Sm1FUFM4OWpHa3dNOXZGSWxGcDY2Xzc3Y2FUR201MmRoemo2d1dkbi1rVVBWS1dwZW00VHcxSTZ0eTdkWUYweUtRQTFRWmppMm00dlUyS1JSeXV4NFF6alVVUWtPQzJ2dW9ZMXdzbGFkNVdycjI1VDMtMkIyODdtaUVOSGdGNEt5eFhiLUFmZ0hiWU5SbWVwR2c4UktRX2dnbEQ5Qllib1ZfMWM2RkpjaUszemZDQzB4QVBMSU9ZYzZZQTE2QV9XWGJ1RWZVM3Vwclh1TjhWckFTeTlPV3Q2UnhDVjB4Wmc0R28xeFhxRDROaC1KZ1NibExCOEVkNG9MZ3hDRUtwWVdUbU91alFlQ2R3STVZZUxBTS1Sdm5zN09HN0JRN0JaTlpEOXBoeHZmcjZLM1oyVGRNMVBSRTI2YjEwSUZTMmJiY05tVERxcjRfOTd4RzF0cURqQWFTX1loMWgxczM3QWxpQ01RRS16TDY4MHA5ai1XeURnTW1IVWs3ZEpFcGo5RlBPdEthcXdmLTZlc0ZmazdCQkxvSGl3YUx1SDZqTmVRNXdpMjRNeUZ3NlJqTTlzTlpHQm9HRTk3RmFwdXg3T3ZYWHRQWjhxYkpmSUtJYzR6Q2NHdDRDakhQMWdqX2tERkJLeGZuNlItekRlS3hGX1NuSlJpWUNnRGJnVjlUMU9OcXhqLXA4LXNFdTRleWdIcVhHaDVGcXZ1dld4OTd2X0lkVF9HYUtTWUN5bGxDaFVwS1hWbWZnVUtnQVNZWkx1RnJrd3V5VGFmODloQVY4YmVXVkNZaUxORDd1bDRwZHlMajlnZ0ZFSTdaYVNXSFRsX29uZndDNUZmRGs5VGI4aHp3NVBWanNWNU9pU2QweENpSlotbGdvTnQwaFRsYUZ5UUYyWnBxU0FrRm9SSWVnYlNxTVlpSDRGcE1IZWY2eEZFblpxSUpxeG0yc2VycWhRTWZfVURBYVotZ05Ra09qalptcHg1Y0NRTXpvdUpKcnNrVzBDNHFpZ25CQTdlWmZCQ01TYkIzREtPbjJQNEQxTDdIUnZ3TnZUVXpDS3RYWGlnUWk4dWpvWUc1SUdQMVNVS2dRMTZqMEgtc1hTZGFBR0RiRDFvNk1ocjNZNzhQV0NEd0toWkpmNkpxaXNZYWNEUXZuYWg0LWdhbGd6dDY4dzBoWncybDNKRmFUNnJNMjBsdWR5eHluZW1ldXJISUE1c0Rfb1d3YmZmemcxaHlKbDRQVjVORmNLZlZ3THBJNU9PbEFXRW00VTRDbl9sR3lZak15cDFRSTVieEVwRjR4NUg2dXI2WW1vQks0Uk1kMDBHdUowMUZ0cEVENFJ1akFiNUhIVVhseEp3TkMwanNrYVpMVW5kcGdIYnZqMVV5YnhZc055VnFRUjVvWjFqSHFkT0ZLckc5dmxnN25EZHpFekJoeTdndWtuV0xmb3duRnhlZVZyaGVSOEhzZDE5SW1lTHI3a0FOWkhEVjh1czdsZHV2bkNjWlFYaGZxSnBtcUozZEgwblhuWWZCalpEZV92eHpoUkYwbGc1SFhZanhybVNpYXI5dHBWV1hVWmJnRVE0Zkp5bllES0JLOVdWZjBxMnBveVpGRzA0Q3ZYeUpIeTZCaktzNXRIRTRZLV9EbE12OUI4NXN5OXFBb2N2d2N1d0UzbGRXbzdoZnBCN2lkekthaTlqN0lNV1E4YWE4RURFclNnUXpnVFdDZW12VGZPUlVPVXRtWnJZZGt0TWNpYXZibVFvd0Uwb3RxZ3ZQM211NHJkMUFjdHA4eWFGNDVTUlhtQkZuS1pWTkdMM2Z0dFZuR25QbXdLNU1qOFB6NWs4c2RqZ1I4akhLSjUydEdkQzV1TWE2RjVLb3FROUVGNEJKMWNLemhkSE1kRkRieVhLazJyaDN2UVY3a1FiRHZmMjh2ZnNWUFNqWHJXWUpXZ0hIUXlFdVItUzJIRExuVUtPa3BGbkwtUWhjcW5iWE51VHZtOUxRbEFJeEdoRUo1M0gzUW44S1RjODViUWxLeU5aa2RtOWxhRTAyemExRXJzYnQwU1E2ZGhIR1hRblFHUS1HSzFJcE0wT3loLVdWYmZidzNwN19GeTVlRnZ3S3duNzhxQWZtM2N6alQ4NUlacWJxb3dmb1VvS25rUVVlNEdJWmQtZ29LS0d0WTlFZDRxb3BqV1hOM1dYVHlYRWdmOGVuUXhqblhLeEM4MDdqWWhaeE0zWmVDNE01d1hyMzJZRmRPc3Z5SmtLb2FTampER3liblNaOFdHVHR4Mk1HM0hHR0NHdW5xWG9vOFZHRjQzemVteVU5RGtZQ3pmZm9qU09tc2pERkUyTW1LWTNYd04wdmdGSkExY0pjWjVySE8taVROZ1Bsa2h3eXNkek1GdDFoVEdFaEY2aERWQ2taQ2NpSEktNEdfVEJFZmJ3eTZJV0tPeHpETTlRejlRNV9lWGlVbUR0M2hBdXZyMkdHZDJNWEI4R29PWGhJekNKbl9IalA1QzlMclh5VFQ0TEQxSVh1UWRpSXJqNWJUTVFKX0oxeFlRQW1EaG9QVXhCdGlGSVRxaWJOcGk2V0lzMWF3VlhWUWRwcWlaMjVfRG8yRjQ5QnU5UHRuX3Z3SHR4REdGUlMzQTF6QUtYUlBjTlpCWHl1a1JjWGVCb2lHR2I0OHNVOXhBMUtnZlNSTDRUS1NOV0JjTTJtLUNPN0VnMDM1QldQUGU3ZGhEWE5CWl82VzJRMzVKcWlYd3FqZTBPUmNUY0FmR0NSTC1NZHFvWVYtaHd3UnQtdEtwbEdDMElXS1d1Yk5ldm43NzRQbGpqV2ZJMFR4ZEkzNkFKa1YzdzN2WlVfUDAwQlEuY0Y5bXk4cXZWMjRVV2JKcGZJRDVCQQ"}' headers: - cache-control: - - no-cache - content-length: - - '5378' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '5378' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:14:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f60fbc.vault.azure.net + - /secrets/secbak32f60fbc/backup + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc?api-version=7.0 response: body: - string: '{"id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/8968fbea165844c6ba86c8774431bfd2","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/778d727d3bae4014a6285fdaad85736f","attributes":{"enabled":true,"created":1564528490,"updated":1564528490,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '202' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '202' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:14:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f60fbc.vault.azure.net + - /secrets/secbak32f60fbc + - api-version=7.0 + - '' - request: - body: '{"value": "KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLmZENXM5Qkl4M3FfWWd4OHAteWRFVXF1SDRqRWUxalhCZUczbkh2WFZtaHQtaXZXWnZaLUpGV2hKTGg3SmJkOGhMTlJzSnJ0OGtJeEVENW1rNnc3blpkVDRiRUIzRWlVdkx0eE9UakpsX1JwdWxhTDhabmY4a1B4RHdsSzh3VWpTX3hSTjI0Y2M3WU1KR2o1aHUxT29oZXJHT2FzRmthM2w3ek1ZMlVWVFFFck5GLXlyOHkyYnd1WW9HNGpUSGtNZkN5OWZ1OEMwdHcyRWVwWlNGdl9aMk94bjY3aVZLTDU2LTZybVhRZnBMYmhic2t3QTRUaGJiRl8yRlhXZTg2a2s3NEp2cjJzazczMVFkTGdWNGc2TFlpV2lISmR4aXdKOEsyZ01BX2RXLVBMZHA3N2d4endzTk1Tb2hHeVFLbU15M3ltVFRkMHRjS0g2VVp6d1Rnb1AwQS5oR2F2aHlIMzRPRnBVTmVJUVNrbWdRLjl0alJIYkpDUjgtbkFzLUh6VHM1RDl6ZzV6dlR2ZC1YbDFfREpZbzBJYnRBanNBWVBFWGdUQUFDUTlMTDFJdTA4OUhpblN3MWUwUDRyd3poNHpTdG5saHlDNGlPdDQ4SzVoMGZUR2dPa1ZsOE1PdGl1bFhwTHJtZUdzeHJaVjFoaE0tUW8yb2g2VGJwUmM3bnphcTBpcnBNeUxiRTU0S2EwRTNCNlpEb3ExQkpzRmNMZ2RTeTRMLXhyRk9ZclEzc0xYUU1FTFRIRkNMVHV4dFlianBtdUlrTHo0UHFjV0p5TFFSQ1EwV2ZObHVFel9razY3N0VpS0V3UDcyb095RElnZ0ZjT0k1VEh0VVFGeXRRX3BpMEtvajJkRExRM3J2WXhYVVRqUm9uN3BnVmxnZVltZGM4aTR5QmFYUm10TW5VYWV3WC1fblNQWkhTNUJ1MlV2VEMxVEJGQk8wWUhpamlVWnd2WTNrLXVtY0xlT0lGeWxzNnBMLTdELXJRZk5SWnowVkh4dF91aThSMUZaSFZHeGlyMmI1N0xJU3hBUDBHejJPQ3NDQWVGMy1Gb2NaSVM2UkRsbE1WdHlCNE9kUFUxTktOdUwwdlY4bVdyRzVlSU5ncVFWZFRUN0EwRjBOd2dSd2l5dTFHcXo1NVhXVVVxMjN3cDhMdDR2R2wwelNzblJsNldrRWtrRDZUcFFrTm1xdU4zM1p0UjZHejJ3NmpBRGJHMzFreHhkVEMyN095QUJiWjdUUWF6ZzZKcUlaZllpdkFJOVpuNXIxV05RWDQxV2s4aEo4bXdWc1ZXbkRFeURLRFhGUF8yYWNSX3hDSjlpU2gycnlQeEFtaUFySi1vSHFoSWI0TFlJZTIxbmNGMFRoYzNoNnZrMVNPS1JTSl9zemFnazRySEVfZm04WWkzNi1RU2pMdlJ6SFJtTEpPNWVvQzNNMF9Vb2FQdHpEUE1FUGpXVk1GY2FNbmZ0QmxjY3AwSUo4Rk5nR0YzTmttcFpEcmFPcWRtYWc5TnViaXpQM0V3YjBuR0lwUWc4QzNHOHdtWmdwV3ItV3BQQUszRXo4SVVXc2xOVmZKMjBQSEg5SVIyS2UxMmVsM3ZlbkdsYWtXbW1ZR1NMLUFOTHI5TXQtUWdLeGtGdW1leVFRdTJZaEZxMDlHU2tBcFk5WkVENDFDa2JocVlOTUcwbzVGR1BmSWFGM3FYcGNPdEdhd0k1RkI0Zzh6LXktUXd4UDhnUzI5X3hSWEZLd3BJYU5sRDVHWi1rYVJVSU5kTXY0SC1LcUZ4VlFKYUxiOHRCbTNsdWp4dHYyelJ0cXRlRkVoRnBhLW5MRmhlR0ktdjJJSF9idUJDNHVSajJyRDZNYjVYZjBGSGo3bnNtdl9GX1h0VDlsNXFwbmV6U294MWdhUExKY1pzSlZVbzNCR2hiQ1VMTkt6ZnFNWm1jNml6QW1hcGpCUGtRRDNtejVoT1l4RUxOWUhiUHJjZlFuaGR4Z3ZHVjFJa1lSbVFZb2ltUkx2ay0wWVpMMzVIT2xEYWxNTmNnUkNZdXRTSmJpZ3B3MjBHVG9tdkVQUV94TTRQUXh2MFU1bl9hMzIza3ZNY25nbGFyQldMb0NBMjJtbXZlYm5GbXAyUGwtY1BOYS1zd0FHYnRHVlhQMV9jd25hUzlwbWRlZTJ2MlBmVlhWa1Boa3l6TVB1bEpKNUp0bkt1SWhyTk1SWEFwT3FoTzlFVG1WOXRYTTNhT19aY2wxWDBaSlRQMS1EZXdQTVNpUGdzMjJuM2sxWmVOUEFMYjM2MmxsZzk0RFBuTkxLeTVTaUkwWkdpWjd1U0psdTNFSWFUQW9NbVRseDZBSmI5T3R4aUtCMjNTODhJYV9SNmR5Z0ZmTHd2SzBZSjN2WjdEakctWDBLRU5QbTRqTl9kamwxOEJ3eUJuZXZoRG1DbTZjLWpndFJWcHo0bTUxcGFjMHVKaFBJLWt4cElCSmlaZC1HUW1wc01hOGs1MFdHdHctU0E1c0JxeUVuRkNXdi12QWZEUzl2VHRoOFhGUE5hM05JUWdZaUYzUE5mMk0xZzlEZ0poQ053OW5yRTcwVkVIeHNRRFdNR1pib1NoSEhLWW5UbUVfOGVRbXY1c3BEbDcxaVR6OHdCT2MyeE1seTNkY1pUT2pzMFFQUTY3N2xNd2VoWVh4NFFSMG5MT2psd3h5WGs4VG42LWpFdWlaS1pFaGJVclA2OExKSHc4YnVJOWFoeXRuWFRKVWZfWlB3a1NBU0VBRjV1V2JEeG1ISTdFUE9SejgyN2t4anBZcnAtSmJ5NHFzRW5MUFlqS3Z5OEY1Yk1POGc4djRralB3YXhYRHgzSHI4VlJoUlRiN2dpcjhIb3A4UkNtYkM1c3lwZy16MmNaVmk4dmh1NWxjN3l6elg2Qmp4Vy1zUzlDV2YtM0FWX0NlQ1JJUmJjV0dSR21PeVZ1czBpTGlmVVhEdEdhazVBdkhtLUNxZDNkdDFrRlBmbk5TbmZvMHZYWUhTTmljaGVQVm9xNGkzZm1FYlJmazFqQlNXT0FDT3NyS3pIQU1BWEVZNGxCWXUxWDRQVExOYTlFS1BCd1h1RmdveURKSkdHSWp4RmN3Z1JBeXp0TEZBV0o2MFJ4YnpUd3VhdENqREUyM1BEZlZNMm9nYkxKNVZ3NDlLWUR3UmRMN0EtbGQ0V0daSHVVYTE1djA1ZlF4d3ZsYTQ5Mngyek9OdG1NajZtbGZYUTJhMlVGTTVWeTVnQUJEMmFjbVZZSzV0dTR2SDFTT19kckxIZmdJR2lEcUluemNyQmtSZ3ZvQjd6Rng3OVBkdllXVllxODFWQmxfWkZHRk9lZ2dxSXNFdkhZZjRHdVdwTXo1T21WVERCWTh5Yzh6RExxTUhGa1M5bEQtbXFxTTdrUmFxdHlOMkdvenp0M1ZVNjFRbjBFQ1FXNG8zYmcwS0NsWUxWVXpPNjVrRnl0VVQ5bGt6Zm9HYkdJMWphS0ZwVFMxSk01RUFwVm1fSkJJOTRRdk5vSjUzWmg3T0xPWTQ5UUpUTTZvY1U5MmhHUmtyeThyRVpsc2VPN2lZenVhX0sxZTUwS01INzlrM09DdDlkMXpBZVdTakVyWHpHMW5zemFXRE1XSk5BVXlFTVpGZVRDX3FraGJhZzd2a0ROS1hvQVB4R2oyQWNMWXNaRXhUa3IzUFBTYThjSVphWmk3T09xOEpjb0JSMG5BQXJXSTR0YlRQRHJ6NHBNaXRjQ1lVVG5RYUpFV2N3WWpqQWp3eTZzLVhqNHZDSXBmQTNEei1mSS1MSHdHeTZMcExuZ0pnLTVHVVFiS0dEbW5OSGdmXzd1YXo3YUp5OGhaV0VTd2cxQ2poMGJkNXIxS24tOW1WZ21ZcVpHckQ4YUZCNVA0ZGxYWVotNXpqMThkU2VlNE5sbjZGRTllbUdWVnN3SnFSblo2V1ZJaVZJUDNKN19iVmdGSW5INklQSWFNY1dLU2tZbmVZUFRjODFFZ2ZndDBEWjFTaklYRWI0eWxmV0tjenJyODR1WGJYLThUaGJCRklMSk5oazhWTDJKOVVkSS1hcTFES1lUbmc4TzlyMS1qa0NnRjNYNmd0MHpnWW1qcmxZR2NNVm1ENTR6WHRkbENGWDBPN0RpMHJmemZ0WEhXV25IaHFjNzQzR3YwUjVtbnVndEJkQXN1SzJFS1p3bUFOc2hnRV9EbmVZOW1sckZYc3g2NVZlOE44SGlMdlFBb1ZkR0lsXzdSMG15b21IOWowam1idnhGeDJCUEZ6RHQwREJyZFdVRWdXOU9pRTUtNFRWOWEwWEs3UHY1UVJ0SFRIMHhfSEw5bndFeTN4VlE1eHQ5WGs0NWM1djhTRXBCd0czamJDM1A5UkZZWnp3YWo0SjBnazlPbloxSXRvaDQwZmJfLVNjZ0k0WE9pUnBkaGM2bnJIWkhjckg3dHFqeFVVNTlUaDJjSURLQnJEcVJIX1E5emVmODlMNUZDakxsUTJIVXlmT0tZOHh2LWpqS0hldkt2OUFuZ0JTd2FrcklCU0tLV2JvZks3bXJHamJzcWp5SC1TX2RLT3ZkRmFxVlM4c2xyeWwtUnNwWFJscENpem16R19OWm40ZjBhN1JGVmZPSGxMVUV4Q1BWVDllMVFIVmhmUk9Ld2FpNGRLcDVtNGZTZ1FubGkzbEs3QW90OXFVTkZhX1F4aWxya01jM19OOGFlRklmZjN5ZVlGWUluOHpqd1RrZVJURmtEeGFKOGlJa09HVHhYNEhtWXhpSmkxZ2ZiTXpiYWlBeHBtdU9QOXI2dEZvTTQtVmpaUnFFTkJqUnNKSGQtZnpLVE5OV3VrVlNfYkN1dkhzZEZkSkxmZm80NXBWMmVUS1dZVUNibHhEU2hTZ1JqUXo5Z2tJTXd1RW5iNTZ2amcxUzNkMDhGNDBTU3hKYXhPcTRqUW85ZEpPaFR5NXRaaWc1djluaDFhVU8wSUtFZ2tsVERJR2hyVjZkWUFiSW5FbWhZWi1LejJEdjlRNzZ3MXQ3Y0trQ28tb3I0UU1XM3dVUm5NdkRCYjZubVNkOS12M0xKZWN2dDF1dS1RMzNCb2kyYk9fdTNtSk5nRVBBalhMQ3MtQ3RCNnhBNnVxbU1HSTU2R1pYdHVwTXloVXcuOGc3M3ZHQVdDam1YYW0xeVYzbXhnUQ"}' + body: '{"value": "KUF6dXJlS2V5VmF1bHRTZWNyZXRCYWNrdXBWMS5taWNyb3NvZnQuY29tZXlKcmFXUWlPaUkwTXpnMVlqQTNZaTFrTlRRM0xUUXlaVFV0WVdVNVpTMDJNVEJrWXpNNVpHWmhaamdpTENKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V4TWpoRFFrTXRTRk15TlRZaWZRLkFMc0piLWlWcUk5Y01EcVRhS2w1d3g0UTd4dGtzZ3FTWjFfdVEtRGxuR19yaXZ4bGlWakFfbGlxQ3dhZ2lNaTQydkRGa29Jd2U3UnYwYmwzMXlzY1NpQmdkSmxvSzl4SjBJVWJQdjI0Y182amd4TmVVNWx0M2hKRTZ1R1JFQTZYSWpOeEJkazQ1a18yMTZ2a2hRbEt0X3g4dC1oZzk3ems2bkNpT0RTLWtWQmhIS2RST1RmRFZXUmJhVlcyQm9wTHBKM0E2cEpadEtPMjF1dHgwQWRkTVVSMXQyamdkZEs0eTJxWDJTX2hrY3ZUdnR5VGxiUXkxTmF2WnFodlptc0ZIY3ZZT0ZWdW83VTEtWWR1TUI4SmtuaFljanZkSU5lNmJSdzg0UWxQQzQwNzZXTk5TSlh0V2NNbkVMaWF0ZnFLT0RGQzY3TUVTVlA4TVNMWHZQOGIxZy5TTXhZMkRyaDlzckJCQldYNDJMVDBBLjY3S0pxd3FQekFPMVR6ZGNOTHpOY2ROQmNsVWc1SE5CSFRRYWNqNFJHN0RlWGRZMWJ1c05UMUdYUXFqTDNURzVqM0Y2TVVGYXh2R2drcjQ3czJ3cW1KVmRON2JEYlhyR2dobU9ENThmanBXbzA4ZHQ2ZHJWTC1yX0FDeV9CRGFERFFrb3Q5VHU2RW9FSjB0WjVsNFpPWUxaSmVFS0JfaUlCVWRfaW02MzkyeWtrZDIzT0dlNFRuZ2xNSzlJc25sMWMyN2JySl82aUR5R2hheEpiQTBHc0ZDM1I2Q3dlenRjdV9COUY2WE9WNlJTLWoyOW9vd29URUxpM3pwZXJaN0h0OGFlSnFzRHFkMzFLT2tlUDNEcEpVdnpEczJKNDRTNC1Qanl5dDV6UTk2LVFrLVhaZ3FSVndETWQ1VFAweHFQZXdTX3Y0dmlDRUxfbTBvTW5jY3lYTEhvMmVvMzdRUDUzU2Nodm1ocFVCTEpmYUl1dG11TC1XN0Fla0xJbjU0R0NfMzVWV2VHR1lQWnJtNERYbHp3d3huY1E5U3h0OVAtQXctTHJleHVFUWlOWGlrVXh6R2djYm9HVWJ2VFlzdnBGR2JWN21oN3B6SHQtc21Td0hoRkczczd2Z0xvc2tPbUNuQVJ6REwxcXR4dzRERmNONERQRk93YzMzUUdTb3Z6ZVByblVnTU1NRHlvT1NwS1ZwdlA2Wm9zdTdTTy1LUUV2MlJ4TE5ZaHJVZWtKdnlXMkRGbFhkV3VwaXZnbU1fcWFYM09ZVHZtbnlwNDNtcDFyNHFqSzNOTkZKNEJ3M0VCT2xHSV9UdHo5cjF6ancxenJXcTNWVTlkdzQyeXJQSk5na3REY1dzWGdoN1NNRWV5X213R21sNEJLRmtnTWpCVWYtV0kwWkdhVDVrT1QwZGVjRGxaUXpHcG1KTVI3N0p3ZUZsaDhTZDd1ZXVEU285ZkhCODFfeGIzUVhWb29iUXJfcUtMRmpMbFZSLThjd1BLeURCUEhtLTBrd1JyN3FGb3BmQjNfOG81UHFhSENvbHBRQ00wTlhhaXhaN2xBV1daRUxyTXI1RGxzMlE4cUh1UWo0dE91VzRFbW9xb3Vpb1ZYclZwMlBOMGV1ZmkzU1YtRUJhdXZfZ0Jzcy13YzZQSEZ4TFRaRGJyTDBpSDlsSE5YOTZLS1dQQjV5YktNM0x2cWdQMk0wOTlESS02TnN4V1B3U2tTdGFjQzJlUk04MmZQNENyS1Z2c1BqTkFTd256M3NqbXUzR0xBWDlKem56d1Vrem1mVC13SDVqM1FIMUs3T0lzeEdnWXQ0THlWSnZQQWFJenU5Mzd6bmpyQ2JNUmloM1ctMzNGZG5QdFdJa1FrN254VmtITHlfaTU2NS1FZHBZNW1sVTBIMnJCTjE4cEoyZUJscmpWcXFMT0VPMzFxQy12M0dJS1lTbkVhdTZGNjY4ZVE0dU91R1AwZUhqLWFzNm1pLUVZSXk4WVhKTlBxanB1OHEtZG5BdkdSRFFUaWs1bHZHQW9JMXBzcU94aENNdVp4amhNbHA2aXY5aTctMWxNUkpKVnpoY3BwRmdXLVpvX3I1Y1NDbmFsZkN2UzhvQklOdVdJdzNWMERIREw1ZGhUTTBfZ3JEazdheEpjVlZISFZMR0tMSi1hbTJBLUc1MjlxMGJ4UzJJUVVWV1lhcGNHZjdvVHc5TXluOFdJOTVhRVN1a0Y4XzluVFdqVmI2d1VQeXpIRWpUOHhGVTVuTW1HSDdLSnpIT2cxNDM4eV9lVjJPZTNqX3kxclN2Sm1FUFM4OWpHa3dNOXZGSWxGcDY2Xzc3Y2FUR201MmRoemo2d1dkbi1rVVBWS1dwZW00VHcxSTZ0eTdkWUYweUtRQTFRWmppMm00dlUyS1JSeXV4NFF6alVVUWtPQzJ2dW9ZMXdzbGFkNVdycjI1VDMtMkIyODdtaUVOSGdGNEt5eFhiLUFmZ0hiWU5SbWVwR2c4UktRX2dnbEQ5Qllib1ZfMWM2RkpjaUszemZDQzB4QVBMSU9ZYzZZQTE2QV9XWGJ1RWZVM3Vwclh1TjhWckFTeTlPV3Q2UnhDVjB4Wmc0R28xeFhxRDROaC1KZ1NibExCOEVkNG9MZ3hDRUtwWVdUbU91alFlQ2R3STVZZUxBTS1Sdm5zN09HN0JRN0JaTlpEOXBoeHZmcjZLM1oyVGRNMVBSRTI2YjEwSUZTMmJiY05tVERxcjRfOTd4RzF0cURqQWFTX1loMWgxczM3QWxpQ01RRS16TDY4MHA5ai1XeURnTW1IVWs3ZEpFcGo5RlBPdEthcXdmLTZlc0ZmazdCQkxvSGl3YUx1SDZqTmVRNXdpMjRNeUZ3NlJqTTlzTlpHQm9HRTk3RmFwdXg3T3ZYWHRQWjhxYkpmSUtJYzR6Q2NHdDRDakhQMWdqX2tERkJLeGZuNlItekRlS3hGX1NuSlJpWUNnRGJnVjlUMU9OcXhqLXA4LXNFdTRleWdIcVhHaDVGcXZ1dld4OTd2X0lkVF9HYUtTWUN5bGxDaFVwS1hWbWZnVUtnQVNZWkx1RnJrd3V5VGFmODloQVY4YmVXVkNZaUxORDd1bDRwZHlMajlnZ0ZFSTdaYVNXSFRsX29uZndDNUZmRGs5VGI4aHp3NVBWanNWNU9pU2QweENpSlotbGdvTnQwaFRsYUZ5UUYyWnBxU0FrRm9SSWVnYlNxTVlpSDRGcE1IZWY2eEZFblpxSUpxeG0yc2VycWhRTWZfVURBYVotZ05Ra09qalptcHg1Y0NRTXpvdUpKcnNrVzBDNHFpZ25CQTdlWmZCQ01TYkIzREtPbjJQNEQxTDdIUnZ3TnZUVXpDS3RYWGlnUWk4dWpvWUc1SUdQMVNVS2dRMTZqMEgtc1hTZGFBR0RiRDFvNk1ocjNZNzhQV0NEd0toWkpmNkpxaXNZYWNEUXZuYWg0LWdhbGd6dDY4dzBoWncybDNKRmFUNnJNMjBsdWR5eHluZW1ldXJISUE1c0Rfb1d3YmZmemcxaHlKbDRQVjVORmNLZlZ3THBJNU9PbEFXRW00VTRDbl9sR3lZak15cDFRSTVieEVwRjR4NUg2dXI2WW1vQks0Uk1kMDBHdUowMUZ0cEVENFJ1akFiNUhIVVhseEp3TkMwanNrYVpMVW5kcGdIYnZqMVV5YnhZc055VnFRUjVvWjFqSHFkT0ZLckc5dmxnN25EZHpFekJoeTdndWtuV0xmb3duRnhlZVZyaGVSOEhzZDE5SW1lTHI3a0FOWkhEVjh1czdsZHV2bkNjWlFYaGZxSnBtcUozZEgwblhuWWZCalpEZV92eHpoUkYwbGc1SFhZanhybVNpYXI5dHBWV1hVWmJnRVE0Zkp5bllES0JLOVdWZjBxMnBveVpGRzA0Q3ZYeUpIeTZCaktzNXRIRTRZLV9EbE12OUI4NXN5OXFBb2N2d2N1d0UzbGRXbzdoZnBCN2lkekthaTlqN0lNV1E4YWE4RURFclNnUXpnVFdDZW12VGZPUlVPVXRtWnJZZGt0TWNpYXZibVFvd0Uwb3RxZ3ZQM211NHJkMUFjdHA4eWFGNDVTUlhtQkZuS1pWTkdMM2Z0dFZuR25QbXdLNU1qOFB6NWs4c2RqZ1I4akhLSjUydEdkQzV1TWE2RjVLb3FROUVGNEJKMWNLemhkSE1kRkRieVhLazJyaDN2UVY3a1FiRHZmMjh2ZnNWUFNqWHJXWUpXZ0hIUXlFdVItUzJIRExuVUtPa3BGbkwtUWhjcW5iWE51VHZtOUxRbEFJeEdoRUo1M0gzUW44S1RjODViUWxLeU5aa2RtOWxhRTAyemExRXJzYnQwU1E2ZGhIR1hRblFHUS1HSzFJcE0wT3loLVdWYmZidzNwN19GeTVlRnZ3S3duNzhxQWZtM2N6alQ4NUlacWJxb3dmb1VvS25rUVVlNEdJWmQtZ29LS0d0WTlFZDRxb3BqV1hOM1dYVHlYRWdmOGVuUXhqblhLeEM4MDdqWWhaeE0zWmVDNE01d1hyMzJZRmRPc3Z5SmtLb2FTampER3liblNaOFdHVHR4Mk1HM0hHR0NHdW5xWG9vOFZHRjQzemVteVU5RGtZQ3pmZm9qU09tc2pERkUyTW1LWTNYd04wdmdGSkExY0pjWjVySE8taVROZ1Bsa2h3eXNkek1GdDFoVEdFaEY2aERWQ2taQ2NpSEktNEdfVEJFZmJ3eTZJV0tPeHpETTlRejlRNV9lWGlVbUR0M2hBdXZyMkdHZDJNWEI4R29PWGhJekNKbl9IalA1QzlMclh5VFQ0TEQxSVh1UWRpSXJqNWJUTVFKX0oxeFlRQW1EaG9QVXhCdGlGSVRxaWJOcGk2V0lzMWF3VlhWUWRwcWlaMjVfRG8yRjQ5QnU5UHRuX3Z3SHR4REdGUlMzQTF6QUtYUlBjTlpCWHl1a1JjWGVCb2lHR2I0OHNVOXhBMUtnZlNSTDRUS1NOV0JjTTJtLUNPN0VnMDM1QldQUGU3ZGhEWE5CWl82VzJRMzVKcWlYd3FqZTBPUmNUY0FmR0NSTC1NZHFvWVYtaHd3UnQtdEtwbEdDMElXS1d1Yk5ldm43NzRQbGpqV2ZJMFR4ZEkzNkFKa1YzdzN2WlVfUDAwQlEuY0Y5bXk4cXZWMjRVV2JKcGZJRDVCQQ"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '5379' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST uri: https://vault32f60fbc.vault.azure.net/secrets/restore?api-version=7.0 response: body: - string: '{"id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/8968fbea165844c6ba86c8774431bfd2","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"id":"https://vault32f60fbc.vault.azure.net/secrets/secbak32f60fbc/778d727d3bae4014a6285fdaad85736f","attributes":{"enabled":true,"created":1564528490,"updated":1564528490,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '202' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '202' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:14:49 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault32f60fbc.vault.azure.net + - /secrets/restore + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_deleted_secrets.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_deleted_secrets.yaml index e8638c8abf32..dba0b9685274 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_deleted_secrets.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_deleted_secrets.yaml @@ -1,625 +1,386 @@ interactions: - request: - body: '{"value": "secval99e4122d"}' + body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - - '27' + - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/4176712f5ccc49e69605dba983a4f344","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:17 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:15:26 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 200 - message: OK + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/bebb1fbf2bf34988b8e02c8ee5f925ad","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/093a7c0702ba41e2920961edf29252e1","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/2c24f5bc003541cca1fea12d2bd5f82b","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/1b12330c84764ba9a010e7cc65d06ea3","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/398ba2a5091d435ca4b7ac05058b509b","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/1c47984da2fd45ca960731c2d62031ab","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/b76683bd312a4f129eb83d59901cae55","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/354aa036d79d4ec9aacc5a0c762e8e88","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/ac1f506c933b41c3a5732247e2334429","attributes":{"enabled":true,"created":1560538518,"updated":1560538518,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/c591ae13276d4e84848e59c8bda9db05","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/e99017ab4bc14aa6a8aabd4482f4b784","attributes":{"enabled":true,"created":1560538519,"updated":1560538519,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '236' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/6eec08471fbc443daa555c8b44a4ed6f","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: - body: null + body: '{"value": "secval99e4122d"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - - '0' + - '27' + Content-Type: + - application/json; charset=utf-8 User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: DELETE + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1560538519,"scheduledPurgeDate":1568314519,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/e99017ab4bc14aa6a8aabd4482f4b784","attributes":{"enabled":true,"created":1560538519,"updated":1560538519,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '348' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:19 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"secval99e4122d","id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/fa8f25489fac47afa288a741ab227858","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '236' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 - response: - body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - sec99e4122d"}}' - headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:19 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 - response: - body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - sec99e4122d"}}' - headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 - response: - body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - sec99e4122d"}}' - headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: DELETE + uri: https://vault99e4122d.vault.azure.net/secrets/sec99e4122d?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - sec99e4122d"}}' - headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:28 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1564528528,"scheduledPurgeDate":1572304528,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/fa8f25489fac47afa288a741ab227858","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '348' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: - code: 404 - message: Not Found + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /secrets/sec99e4122d + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 response: @@ -627,48 +388,38 @@ interactions: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: sec99e4122d"}}' headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /deletedsecrets/sec99e4122d + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 response: @@ -676,131 +427,105 @@ interactions: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: sec99e4122d"}}' headers: - cache-control: - - no-cache - content-length: - - '85' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '85' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:31 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /deletedsecrets/sec99e4122d + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d?api-version=7.0 response: body: - string: '{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1560538519,"scheduledPurgeDate":1568314519,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/e99017ab4bc14aa6a8aabd4482f4b784","attributes":{"enabled":true,"created":1560538519,"updated":1560538519,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '348' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:38 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1564528528,"scheduledPurgeDate":1572304528,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d/fa8f25489fac47afa288a741ab227858","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '348' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:34 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /deletedsecrets/sec99e4122d + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault99e4122d.vault.azure.net/deletedsecrets?api-version=7.0 response: body: - string: '{"value":[{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1560538519,"scheduledPurgeDate":1568314519,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d","attributes":{"enabled":true,"created":1560538519,"updated":1560538519,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' - headers: - cache-control: - - no-cache - content-length: - - '343' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 14 Jun 2019 18:55:38 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=131.107.147.26;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":[{"recoveryId":"https://vault99e4122d.vault.azure.net/deletedsecrets/sec99e4122d","deletedDate":1564528528,"scheduledPurgeDate":1572304528,"id":"https://vault99e4122d.vault.azure.net/secrets/sec99e4122d","attributes":{"enabled":true,"created":1564528528,"updated":1564528528,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + headers: + cache-control: no-cache + content-length: '343' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:15:34 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault99e4122d.vault.azure.net + - /deletedsecrets + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_versions.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_versions.yaml index 0891a7d98254..f21aa267f8e2 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_versions.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_list_versions.yaml @@ -1,414 +1,377 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:16:27 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/01a1c421f99d4e11bd1faf3385a638ca","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/d14f229e00a0466588945a17f72f9ef4","attributes":{"enabled":true,"created":1564528588,"updated":1564528588,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/6df9785175c94931bb8f9f7bf54a43bf","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/62bd3e1ae4c943b0834475dcf0593813","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/5aaaf0401ced49dbb6b5376220eb6bd4","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/548690f3d6e448a4afa1946ddd2ad9a3","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/bdf0770f231b4f13bc5f6dabfb907e9c","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/6e93babb4bf34f64a3096fe587c1a874","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/194031008cdc435abc85946271e16fb9","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/8ef101e684de4189ae32349d68c7563c","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/416f926b2a2c415da3756c2cf9110302","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/877971b0463b4d4f8f0b3dd1c8ee74ab","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: '{"value": "secVal24c80f77"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77?api-version=7.0 response: body: - string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/ab4bd70148bf4d1984aa143b95d7f738","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal24c80f77","id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/581cbd091a3646daa866c6c54732fed3","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/versions?api-version=7.0 response: body: - string: '{"value":[{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/01a1c421f99d4e11bd1faf3385a638ca","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/194031008cdc435abc85946271e16fb9","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/416f926b2a2c415da3756c2cf9110302","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/5aaaf0401ced49dbb6b5376220eb6bd4","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/6df9785175c94931bb8f9f7bf54a43bf","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/ab4bd70148bf4d1984aa143b95d7f738","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/bdf0770f231b4f13bc5f6dabfb907e9c","attributes":{"enabled":true,"created":1560219284,"updated":1560219284,"recoveryLevel":"Purgeable"}}],"nextLink":null}' + string: '{"value":[{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/548690f3d6e448a4afa1946ddd2ad9a3","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/581cbd091a3646daa866c6c54732fed3","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/62bd3e1ae4c943b0834475dcf0593813","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/6e93babb4bf34f64a3096fe587c1a874","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/877971b0463b4d4f8f0b3dd1c8ee74ab","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/8ef101e684de4189ae32349d68c7563c","attributes":{"enabled":true,"created":1564528589,"updated":1564528589,"recoveryLevel":"Purgeable"}},{"id":"https://vault24c80f77.vault.azure.net/secrets/sec24c80f77/d14f229e00a0466588945a17f72f9ef4","attributes":{"enabled":true,"created":1564528588,"updated":1564528588,"recoveryLevel":"Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '1427' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:45 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '1427' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:16:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault24c80f77.vault.azure.net + - /secrets/sec24c80f77/versions + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_purge.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_purge.yaml index c68d8212f97b..2a5134de0b12 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_purge.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_purge.yaml @@ -1,1618 +1,1264 @@ interactions: - request: - body: '{"value": "value0"}' + body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - - '19' + - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret0?api-version=7.0 response: body: - string: '{"value":"value0","id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/c31d65f64d5b40fa805f9e3eb67bde05","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:17:06 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' +- request: + body: '{"value": "value0"}' + headers: + Accept: + - application/json + Content-Length: + - '19' + Content-Type: - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vaultb5580c06.vault.azure.net/secrets/secret0?api-version=7.0 + response: + body: + string: '{"value":"value0","id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/8966cffcb88e467687e8634e8837df4e","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:06 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' - request: body: '{"value": "value1"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret1?api-version=7.0 response: body: - string: '{"value":"value1","id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/0cc8e9fc0e1642f6a1041ff4ad2c013e","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value1","id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/01a16d10e4834f40a9f50ee36ec02781","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret1 + - api-version=7.0 + - '' - request: body: '{"value": "value2"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret2?api-version=7.0 response: body: - string: '{"value":"value2","id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/de7fc9fd9f4448f081cb23de8ed7da0d","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value2","id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/3fff9d5c111a42b1bd1815f56ed4c797","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret2 + - api-version=7.0 + - '' - request: body: '{"value": "value3"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret3?api-version=7.0 response: body: - string: '{"value":"value3","id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/47e941e1cdbd4a558231536fff8e05ab","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value3","id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/b4be0b4560154409a4ac6f740b272133","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret3 + - api-version=7.0 + - '' - request: body: '{"value": "value4"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret4?api-version=7.0 response: body: - string: '{"value":"value4","id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/333b17ecad69484f84a8dfd4b8d6b5f7","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value4","id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/eb62dde290ba42da9735cf34b575fcfd","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret4 + - api-version=7.0 + - '' - request: body: '{"value": "value5"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret5?api-version=7.0 response: body: - string: '{"value":"value5","id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/571e47d981d64ad0b5b35d692dd1fd29","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value5","id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/13d1a85f33f94d95afadf8cef91c3d17","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret5 + - api-version=7.0 + - '' - request: body: '{"value": "value6"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultb5580c06.vault.azure.net/secrets/secret6?api-version=7.0 response: body: - string: '{"value":"value6","id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/d2ff1a7f7fd14e989fdb7ebbac87d7ff","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value6","id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/b7804c43991a414ba965299128f66458","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/333b17ecad69484f84a8dfd4b8d6b5f7","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/8966cffcb88e467687e8634e8837df4e","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret3?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/47e941e1cdbd4a558231536fff8e05ab","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/01a16d10e4834f40a9f50ee36ec02781","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret5?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/571e47d981d64ad0b5b35d692dd1fd29","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/3fff9d5c111a42b1bd1815f56ed4c797","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:07 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret0?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/c31d65f64d5b40fa805f9e3eb67bde05","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/b4be0b4560154409a4ac6f740b272133","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:08 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret6?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/d2ff1a7f7fd14e989fdb7ebbac87d7ff","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/eb62dde290ba42da9735cf34b575fcfd","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:08 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret1?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/0cc8e9fc0e1642f6a1041ff4ad2c013e","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/13d1a85f33f94d95afadf8cef91c3d17","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:08 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/secrets/secret2?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/secrets/secret6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/de7fc9fd9f4448f081cb23de8ed7da0d","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528629,"scheduledPurgeDate":1572304629,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/b7804c43991a414ba965299128f66458","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:08 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /secrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 - response: - body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret4"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret4"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:08 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret4"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret4"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:15 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/333b17ecad69484f84a8dfd4b8d6b5f7","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/8966cffcb88e467687e8634e8837df4e","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/47e941e1cdbd4a558231536fff8e05ab","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/01a16d10e4834f40a9f50ee36ec02781","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/571e47d981d64ad0b5b35d692dd1fd29","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/3fff9d5c111a42b1bd1815f56ed4c797","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0/c31d65f64d5b40fa805f9e3eb67bde05","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3/b4be0b4560154409a4ac6f740b272133","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/d2ff1a7f7fd14e989fdb7ebbac87d7ff","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4/eb62dde290ba42da9735cf34b575fcfd","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1/0cc8e9fc0e1642f6a1041ff4ad2c013e","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5/13d1a85f33f94d95afadf8cef91c3d17","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2/de7fc9fd9f4448f081cb23de8ed7da0d","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528629,"scheduledPurgeDate":1572304629,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6/b7804c43991a414ba965299128f66458","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultb5580c06.vault.azure.net/deletedsecrets?api-version=7.0 response: body: - string: '{"value":[{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3","attributes":{"enabled":true,"created":1560219261,"updated":1560219261,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219262,"scheduledPurgeDate":1567995262,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219263,"scheduledPurgeDate":1567995263,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6","attributes":{"enabled":true,"created":1560219262,"updated":1560219262,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' - headers: - cache-control: - - no-cache - content-length: - - '2183' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:14:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":[{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret0","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret1","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret2","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret3","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret4","attributes":{"enabled":true,"created":1564528627,"updated":1564528627,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528628,"scheduledPurgeDate":1572304628,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret5","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528629,"scheduledPurgeDate":1572304629,"id":"https://vaultb5580c06.vault.azure.net/secrets/secret6","attributes":{"enabled":true,"created":1564528628,"updated":1564528628,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + headers: + cache-control: no-cache + content-length: '2183' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret1 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret2 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret0?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret3?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret3 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret4?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret4 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret1?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret5?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret5 + - api-version=7.0 + - '' - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultb5580c06.vault.azure.net/deletedsecrets/secret6?api-version=7.0 response: body: string: '' headers: - cache-control: - - no-cache - date: - - Tue, 11 Jun 2019 02:14:38 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + date: Tue, 30 Jul 2019 23:17:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 204 message: No Content + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultb5580c06.vault.azure.net + - /deletedsecrets/secret6 + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_recover.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_recover.yaml index 57e1f8288b5f..aee5c8738d11 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_recover.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_recover.yaml @@ -1,2320 +1,1826 @@ interactions: - request: - body: '{"value": "value0"}' + body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - - '19' + - '0' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret0?api-version=7.0 response: body: - string: '{"value":"value0","id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/fa36e67096af4f899772f9950aaa0f72","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' +- request: + body: '{"value": "value0"}' headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: + Accept: + - application/json + Content-Length: + - '19' + Content-Type: - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0?api-version=7.0 + response: + body: + string: '{"value":"value0","id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/d1f164c23b8d4dd99f17bb50e84c5d1f","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' - request: body: '{"value": "value1"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret1?api-version=7.0 response: body: - string: '{"value":"value1","id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/fbb5f0622390490dbb7848336086f4cc","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value1","id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/07653aa977ab498f8cae0d495ecda5f3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret1 + - api-version=7.0 + - '' - request: body: '{"value": "value2"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret2?api-version=7.0 response: body: - string: '{"value":"value2","id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/f3332fded0d54da6b5a61a96aab2a3d7","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value2","id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/9a46000095e543a6b265060a97979e76","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret2 + - api-version=7.0 + - '' - request: body: '{"value": "value3"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret3?api-version=7.0 response: body: - string: '{"value":"value3","id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/23599f329eb74f91b52de1268affa7a2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value3","id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/a9a6431ed3af4764a21358fe1670f659","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret3 + - api-version=7.0 + - '' - request: body: '{"value": "value4"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret4?api-version=7.0 response: body: - string: '{"value":"value4","id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/41dcbf735cd546e98fd732857184ee41","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value4","id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/5519e4d02b96446c920e66b494eef218","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:11 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret4 + - api-version=7.0 + - '' - request: body: '{"value": "value5"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret5?api-version=7.0 response: body: - string: '{"value":"value5","id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/aa198d7afe694c34acc709384cbe2d77","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value5","id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/1d21e63d093447d48133cf4350e1b5bc","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret5 + - api-version=7.0 + - '' - request: body: '{"value": "value6"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '19' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultce560cd9.vault.azure.net/secrets/secret6?api-version=7.0 response: body: - string: '{"value":"value6","id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/a8b0b304c73441f4a9c609f10edaf8c9","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value6","id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/04d8d9d3f519485683412facb79f3240","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/f3332fded0d54da6b5a61a96aab2a3d7","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/d1f164c23b8d4dd99f17bb50e84c5d1f","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret3?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/23599f329eb74f91b52de1268affa7a2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/07653aa977ab498f8cae0d495ecda5f3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret1?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/fbb5f0622390490dbb7848336086f4cc","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/9a46000095e543a6b265060a97979e76","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret0?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/fa36e67096af4f899772f9950aaa0f72","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/a9a6431ed3af4764a21358fe1670f659","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret5?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/aa198d7afe694c34acc709384cbe2d77","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/5519e4d02b96446c920e66b494eef218","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret6?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/a8b0b304c73441f4a9c609f10edaf8c9","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/1d21e63d093447d48133cf4350e1b5bc","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:12 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE - uri: https://vaultce560cd9.vault.azure.net/secrets/secret4?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/41dcbf735cd546e98fd732857184ee41","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/04d8d9d3f519485683412facb79f3240","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:13 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 - response: - body: - string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 - method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:05 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:13 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:09 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:16 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:12 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:20 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:15 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:23 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Deleted Secret not found: - secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '81' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + secret0"}}' + headers: + cache-control: no-cache + content-length: '81' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:25 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/f3332fded0d54da6b5a61a96aab2a3d7","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/d1f164c23b8d4dd99f17bb50e84c5d1f","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/23599f329eb74f91b52de1268affa7a2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/07653aa977ab498f8cae0d495ecda5f3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:28 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret1 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/fbb5f0622390490dbb7848336086f4cc","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/9a46000095e543a6b265060a97979e76","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret2 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/fa36e67096af4f899772f9950aaa0f72","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/a9a6431ed3af4764a21358fe1670f659","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret3 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/aa198d7afe694c34acc709384cbe2d77","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/5519e4d02b96446c920e66b494eef218","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret4 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/a8b0b304c73441f4a9c609f10edaf8c9","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/1d21e63d093447d48133cf4350e1b5bc","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret5 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6?api-version=7.0 response: body: - string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/41dcbf735cd546e98fd732857184ee41","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '340' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/04d8d9d3f519485683412facb79f3240","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '340' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultce560cd9.vault.azure.net/deletedsecrets?api-version=7.0 response: body: - string: '{"value":[{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1560219302,"scheduledPurgeDate":1567995302,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1560219303,"scheduledPurgeDate":1567995303,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' - headers: - cache-control: - - no-cache - content-length: - - '2183' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":[{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}},{"recoveryId":"https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6","deletedDate":1564528693,"scheduledPurgeDate":1572304693,"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}],"nextLink":null}' + headers: + cache-control: no-cache + content-length: '2183' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/f3332fded0d54da6b5a61a96aab2a3d7","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/d1f164c23b8d4dd99f17bb50e84c5d1f","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret0/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/23599f329eb74f91b52de1268affa7a2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/07653aa977ab498f8cae0d495ecda5f3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret1/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret1/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret2/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/fbb5f0622390490dbb7848336086f4cc","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/9a46000095e543a6b265060a97979e76","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret2/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret0/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret3/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/fa36e67096af4f899772f9950aaa0f72","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/a9a6431ed3af4764a21358fe1670f659","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret3/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/aa198d7afe694c34acc709384cbe2d77","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/5519e4d02b96446c920e66b494eef218","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:29 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret4/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret5/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/a8b0b304c73441f4a9c609f10edaf8c9","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/1d21e63d093447d48133cf4350e1b5bc","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret5/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: POST - uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret4/recover?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/deletedsecrets/secret6/recover?api-version=7.0 response: body: - string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/41dcbf735cd546e98fd732857184ee41","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '207' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/04d8d9d3f519485683412facb79f3240","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '207' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /deletedsecrets/secret6/recover + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '73' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret0"}}' + headers: + cache-control: no-cache + content-length: '73' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:30 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '73' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:26 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret0"}}' + headers: + cache-control: no-cache + content-length: '73' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:33 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '73' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret0"}}' + headers: + cache-control: no-cache + content-length: '73' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:36 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '73' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret0"}}' + headers: + cache-control: no-cache + content-length: '73' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:39 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret2"}}' - headers: - cache-control: - - no-cache - content-length: - - '73' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"error":{"code":"SecretNotFound","message":"Secret not found: secret0"}}' + headers: + cache-control: no-cache + content-length: '73' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:41 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 response: body: - string: '{"value":"value2","id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/f3332fded0d54da6b5a61a96aab2a3d7","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value0","id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/d1f164c23b8d4dd99f17bb50e84c5d1f","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret0/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret3/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret1/?api-version=7.0 response: body: - string: '{"value":"value3","id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/23599f329eb74f91b52de1268affa7a2","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value1","id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/07653aa977ab498f8cae0d495ecda5f3","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret1/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret1/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret2/?api-version=7.0 response: body: - string: '{"value":"value1","id":"https://vaultce560cd9.vault.azure.net/secrets/secret1/fbb5f0622390490dbb7848336086f4cc","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value2","id":"https://vaultce560cd9.vault.azure.net/secrets/secret2/9a46000095e543a6b265060a97979e76","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:45 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret2/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret0/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret3/?api-version=7.0 response: body: - string: '{"value":"value0","id":"https://vaultce560cd9.vault.azure.net/secrets/secret0/fa36e67096af4f899772f9950aaa0f72","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value3","id":"https://vaultce560cd9.vault.azure.net/secrets/secret3/a9a6431ed3af4764a21358fe1670f659","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret3/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret5/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret4/?api-version=7.0 response: body: - string: '{"value":"value5","id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/aa198d7afe694c34acc709384cbe2d77","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value4","id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/5519e4d02b96446c920e66b494eef218","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret4/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret6/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret5/?api-version=7.0 response: body: - string: '{"value":"value6","id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/a8b0b304c73441f4a9c609f10edaf8c9","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value5","id":"https://vaultce560cd9.vault.azure.net/secrets/secret5/1d21e63d093447d48133cf4350e1b5bc","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret5/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultce560cd9.vault.azure.net/secrets/secret4/?api-version=7.0 + uri: https://vaultce560cd9.vault.azure.net/secrets/secret6/?api-version=7.0 response: body: - string: '{"value":"value4","id":"https://vaultce560cd9.vault.azure.net/secrets/secret4/41dcbf735cd546e98fd732857184ee41","attributes":{"enabled":true,"created":1560219302,"updated":1560219302,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '224' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + string: '{"value":"value6","id":"https://vaultce560cd9.vault.azure.net/secrets/secret6/04d8d9d3f519485683412facb79f3240","attributes":{"enabled":true,"created":1564528692,"updated":1564528692,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '224' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:18:46 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultce560cd9.vault.azure.net + - /secrets/secret6/ + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_crud_operations.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_crud_operations.yaml index 5267d8020874..5d9a0991c11a 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_crud_operations.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_crud_operations.yaml @@ -1,359 +1,330 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:19:38 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret + - api-version=7.0 + - '' - request: body: '{"value": "crud_secret_valuec01d1319"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '38' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret?api-version=7.0 response: body: - string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/177427fb4ac34d35be6430082742ca9d","attributes":{"enabled":true,"created":1560296924,"updated":1560296924,"recoveryLevel":"Purgeable"}}' + string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/eeecb8113ad344299d57e9d44eb3694c","attributes":{"enabled":true,"created":1564528779,"updated":1564528779,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '235' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:44 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '235' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:38 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret + - api-version=7.0 + - '' - request: - body: '{"value": "crud_secret_valuec01d1319", "attributes": {"enabled": true, - "nbf": 1422864000}, "tags": {"foo": "created tag"}}' + body: '{"value": "crud_secret_valuec01d1319", "tags": {"foo": "created tag"}, + "attributes": {"enabled": true, "nbf": 1422864000}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '122' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret?api-version=7.0 response: body: - string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd","attributes":{"enabled":true,"nbf":1422864000,"created":1560296924,"updated":1560296924,"recoveryLevel":"Purgeable"},"tags":{"foo":"created + string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27","attributes":{"enabled":true,"nbf":1422864000,"created":1564528779,"updated":1564528779,"recoveryLevel":"Purgeable"},"tags":{"foo":"created tag"}}' headers: - cache-control: - - no-cache - content-length: - - '281' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:44 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '281' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:38 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/?api-version=7.0 response: body: - string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd","attributes":{"enabled":true,"nbf":1422864000,"created":1560296924,"updated":1560296924,"recoveryLevel":"Purgeable"},"tags":{"foo":"created + string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27","attributes":{"enabled":true,"nbf":1422864000,"created":1564528779,"updated":1564528779,"recoveryLevel":"Purgeable"},"tags":{"foo":"created tag"}}' headers: - cache-control: - - no-cache - content-length: - - '281' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:44 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '281' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:38 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret/ + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET - uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd?api-version=7.0 + uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27?api-version=7.0 response: body: - string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd","attributes":{"enabled":true,"nbf":1422864000,"created":1560296924,"updated":1560296924,"recoveryLevel":"Purgeable"},"tags":{"foo":"created + string: '{"value":"crud_secret_valuec01d1319","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27","attributes":{"enabled":true,"nbf":1422864000,"created":1564528779,"updated":1564528779,"recoveryLevel":"Purgeable"},"tags":{"foo":"created tag"}}' headers: - cache-control: - - no-cache - content-length: - - '281' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:44 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '281' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:39 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret/f75b715b3c51403198b5cbd26287da27 + - api-version=7.0 + - '' - request: - body: '{"attributes": {"exp": 2527401600, "enabled": false}, "contentType": "text/plain", + body: '{"contentType": "text/plain", "attributes": {"enabled": false, "exp": 2527401600}, "tags": {"foo": "updated tag"}}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '114' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PATCH - uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd?api-version=7.0 + uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27?api-version=7.0 response: body: - string: '{"contentType":"text/plain","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd","attributes":{"enabled":false,"nbf":1422864000,"exp":2527401600,"created":1560296924,"updated":1560296926,"recoveryLevel":"Purgeable"},"tags":{"foo":"updated + string: '{"contentType":"text/plain","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27","attributes":{"enabled":false,"nbf":1422864000,"exp":2527401600,"created":1564528779,"updated":1564528780,"recoveryLevel":"Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '290' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:45 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '290' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:40 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret/f75b715b3c51403198b5cbd26287da27 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: DELETE uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret?api-version=7.0 response: body: - string: '{"contentType":"text/plain","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/259ce6cd4405435a9c10114cde527ecd","attributes":{"enabled":false,"nbf":1422864000,"exp":2527401600,"created":1560296924,"updated":1560296926,"recoveryLevel":"Purgeable"},"tags":{"foo":"updated + string: '{"contentType":"text/plain","id":"https://vaultc01d1319.vault.azure.net/secrets/crud-secret/f75b715b3c51403198b5cbd26287da27","attributes":{"enabled":false,"nbf":1422864000,"exp":2527401600,"created":1564528779,"updated":1564528780,"recoveryLevel":"Purgeable"},"tags":{"foo":"updated tag"}}' headers: - cache-control: - - no-cache - content-length: - - '290' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:45 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '290' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:40 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vaultc01d1319.vault.azure.net/secrets/crud-secret/?api-version=7.0 response: body: string: '{"error":{"code":"SecretNotFound","message":"Secret not found: crud-secret"}}' headers: - cache-control: - - no-cache - content-length: - - '77' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 23:48:46 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=166.255.251.53;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '77' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:19:40 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 404 message: Not Found + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vaultc01d1319.vault.azure.net + - /secrets/crud-secret/ + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_list.yaml b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_list.yaml index 35c4ed11f967..96d5382039a5 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_list.yaml +++ b/sdk/keyvault/azure-keyvault-secrets/tests/recordings/test_secrets_async.test_secret_list.yaml @@ -1,414 +1,377 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 + method: PUT + uri: https://vault5b50e84.vault.azure.net/secrets/sec0?api-version=7.0 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec0 + - api-version=7.0 + - '' - request: body: '{"value": "secVal05b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec0?api-version=7.0 response: body: - string: '{"value":"secVal05b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec0/bfaad709fbaa4d57ae07facbff500795","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal05b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec0/7f3cb1f832414f19a13156842b138e4f","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec0 + - api-version=7.0 + - '' - request: body: '{"value": "secVal15b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec1?api-version=7.0 response: body: - string: '{"value":"secVal15b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec1/392da3f3b4b44b71aefb2e9ffdba9321","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal15b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec1/b11f6d6c11ec4c84b08b9b759540bf96","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec1 + - api-version=7.0 + - '' - request: body: '{"value": "secVal25b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec2?api-version=7.0 response: body: - string: '{"value":"secVal25b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec2/59fa973224914f6fb53d37c20f2e87e6","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal25b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec2/f50f507c68ff48e593f32de9f03de503","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec2 + - api-version=7.0 + - '' - request: body: '{"value": "secVal35b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec3?api-version=7.0 response: body: - string: '{"value":"secVal35b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec3/050564bf189641819bc88c0d70d31ee6","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal35b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec3/699ddadf328143de8c19b32677a5b3ac","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec3 + - api-version=7.0 + - '' - request: body: '{"value": "secVal45b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec4?api-version=7.0 response: body: - string: '{"value":"secVal45b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec4/aae71679bf754b668f14bcd9bd9fe2f9","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal45b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec4/b57c587071b4448a89ecac767c62435f","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec4 + - api-version=7.0 + - '' - request: body: '{"value": "secVal55b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec5?api-version=7.0 response: body: - string: '{"value":"secVal55b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec5/48cf92ab65f340f6a98002ebf0ca4dcd","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal55b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec5/ea4090f7b0294803b170516bc009cc16","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:18 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec5 + - api-version=7.0 + - '' - request: body: '{"value": "secVal65b50e84"}' headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive Content-Length: - '27' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: PUT uri: https://vault5b50e84.vault.azure.net/secrets/sec6?api-version=7.0 response: body: - string: '{"value":"secVal65b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec6/53fcee1dc3ac4805940914670cc50199","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}}' + string: '{"value":"secVal65b50e84","id":"https://vault5b50e84.vault.azure.net/secrets/sec6/2eb7ddee8282440fb1cf9d0b37517c41","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}}' headers: - cache-control: - - no-cache - content-length: - - '216' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '216' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets/sec6 + - api-version=7.0 + - '' - request: body: null headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - python/3.5.4 (Windows-10-10.0.18362-SP0) azure-core/0.0.1 azsdk-python-azure-keyvault/7.0 + - python/3.6.3 (Windows-10-10.0.18362-SP0) azure-core/1.0.0b2 azsdk-python-azure-keyvault/7.0 method: GET uri: https://vault5b50e84.vault.azure.net/secrets?api-version=7.0 response: body: - string: '{"value":[{"id":"https://vault5b50e84.vault.azure.net/secrets/sec0","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec1","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec2","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec3","attributes":{"enabled":true,"created":1560219300,"updated":1560219300,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec4","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec5","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec6","attributes":{"enabled":true,"created":1560219301,"updated":1560219301,"recoveryLevel":"Purgeable"}}],"nextLink":null}' + string: '{"value":[{"id":"https://vault5b50e84.vault.azure.net/secrets/sec0","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec1","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec2","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec3","attributes":{"enabled":true,"created":1564528818,"updated":1564528818,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec4","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec5","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}},{"id":"https://vault5b50e84.vault.azure.net/secrets/sec6","attributes":{"enabled":true,"created":1564528819,"updated":1564528819,"recoveryLevel":"Purgeable"}}],"nextLink":null}' headers: - cache-control: - - no-cache - content-length: - - '1140' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Jun 2019 02:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.866 - x-powered-by: - - ASP.NET + cache-control: no-cache + content-length: '1140' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jul 2019 23:20:19 GMT + expires: '-1' + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: addr=24.16.158.132;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.0.872 + x-powered-by: ASP.NET status: code: 200 message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - vault5b50e84.vault.azure.net + - /secrets + - api-version=7.0 + - '' version: 1 diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/secrets_async_preparer.py b/sdk/keyvault/azure-keyvault-secrets/tests/secrets_async_preparer.py index 6472b3d3308d..da13fcdc54c8 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/secrets_async_preparer.py +++ b/sdk/keyvault/azure-keyvault-secrets/tests/secrets_async_preparer.py @@ -6,17 +6,31 @@ from unittest.mock import Mock from azure.core.credentials import AccessToken +from azure.core.pipeline.transport import AioHttpTransport from azure.identity.aio import EnvironmentCredential +from multidict import CIMultiDict, CIMultiDictProxy + from secrets_preparer import VaultClientPreparer from secrets_vault_client_async import VaultClient +class AiohttpTestTransport(AioHttpTransport): + """Workaround to vcrpy bug: https://github.com/kevin1024/vcrpy/pull/461 + """ + async def send(self, request, **config): + response = await super(AiohttpTestTransport, self).send(request, **config) + if not isinstance(response.headers, CIMultiDictProxy): + response.headers = CIMultiDictProxy(CIMultiDict(response.internal_response.headers)) + response.content_type = response.headers.get("content-type") + return response + + class AsyncVaultClientPreparer(VaultClientPreparer): def create_vault_client(self, vault_uri): if self.is_live: credential = EnvironmentCredential() else: credential = Mock(get_token=asyncio.coroutine(lambda _: AccessToken("fake-token", 0))) - return VaultClient(vault_uri, credential) + return VaultClient(vault_uri, credential, transport=AiohttpTestTransport()) From 77662a356511321c95c57cab01b49199286eb7a2 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 31 Jul 2019 01:19:55 -0700 Subject: [PATCH 152/244] [AutoPR hanaonazure/resource-manager] Removing monitoring hana instance API (#6535) * Generated from 70b51057c4cca0cdb6a743b4e02f39c132121570 Removing monitoring hana instance API * Generated from a6757c439ed37f69147b6a7b50a20f1ca69789be Removing monitoring hana instance API * Packaging update of azure-mgmt-hanaonazure * Updated Release History --- .../azure-mgmt-hanaonazure/HISTORY.rst | 12 +++ .../azure-mgmt-hanaonazure/README.rst | 2 +- .../azure/mgmt/hanaonazure/models/_models.py | 10 +++ .../mgmt/hanaonazure/models/_models_py3.py | 12 ++- .../operations/_hana_instances_operations.py | 89 ------------------- .../azure/mgmt/hanaonazure/version.py | 2 +- .../azure-mgmt-hanaonazure/setup.py | 1 - 7 files changed, 35 insertions(+), 93 deletions(-) diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/HISTORY.rst b/sdk/hanaonazure/azure-mgmt-hanaonazure/HISTORY.rst index b99767ae2a90..cdda9582b52b 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/HISTORY.rst +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/HISTORY.rst @@ -3,6 +3,18 @@ Release History =============== +0.9.0 (2019-07-31) +++++++++++++++++++ + +**Features** + +- Model SapMonitor has a new parameter hana_db_credentials_msi_id +- Model SapMonitor has a new parameter hana_db_password_key_vault_url + +**Breaking changes** + +- Removed operation HanaInstancesOperations.enable_monitoring + 0.8.0 (2019-06-26) ++++++++++++++++++ diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/README.rst b/sdk/hanaonazure/azure-mgmt-hanaonazure/README.rst index 3751f89d5670..1c9ad134cc31 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/README.rst +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure SAP Hana on Azure Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models.py index d9c93b5d62d8..2643e4c67737 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models.py @@ -489,6 +489,12 @@ class SapMonitor(Resource): :type hana_db_username: str :param hana_db_password: Database password of the HANA instance. :type hana_db_password: str + :param hana_db_password_key_vault_url: KeyVault URL link to the password + for the HANA database. + :type hana_db_password_key_vault_url: str + :param hana_db_credentials_msi_id: MSI ID passed by customer which has + access to customer's KeyVault and to be assigned to the Collector VM. + :type hana_db_credentials_msi_id: str :ivar provisioning_state: State of provisioning of the HanaInstance. Possible values include: 'Accepted', 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', 'Migrating' @@ -516,6 +522,8 @@ class SapMonitor(Resource): 'hana_db_sql_port': {'key': 'properties.hanaDbSqlPort', 'type': 'int'}, 'hana_db_username': {'key': 'properties.hanaDbUsername', 'type': 'str'}, 'hana_db_password': {'key': 'properties.hanaDbPassword', 'type': 'str'}, + 'hana_db_password_key_vault_url': {'key': 'properties.hanaDbPasswordKeyVaultUrl', 'type': 'str'}, + 'hana_db_credentials_msi_id': {'key': 'properties.hanaDbCredentialsMsiId', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } @@ -527,6 +535,8 @@ def __init__(self, **kwargs): self.hana_db_sql_port = kwargs.get('hana_db_sql_port', None) self.hana_db_username = kwargs.get('hana_db_username', None) self.hana_db_password = kwargs.get('hana_db_password', None) + self.hana_db_password_key_vault_url = kwargs.get('hana_db_password_key_vault_url', None) + self.hana_db_credentials_msi_id = kwargs.get('hana_db_credentials_msi_id', None) self.provisioning_state = None diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models_py3.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models_py3.py index dece72c8661c..9f6950525157 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models_py3.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models_py3.py @@ -489,6 +489,12 @@ class SapMonitor(Resource): :type hana_db_username: str :param hana_db_password: Database password of the HANA instance. :type hana_db_password: str + :param hana_db_password_key_vault_url: KeyVault URL link to the password + for the HANA database. + :type hana_db_password_key_vault_url: str + :param hana_db_credentials_msi_id: MSI ID passed by customer which has + access to customer's KeyVault and to be assigned to the Collector VM. + :type hana_db_credentials_msi_id: str :ivar provisioning_state: State of provisioning of the HanaInstance. Possible values include: 'Accepted', 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', 'Migrating' @@ -516,10 +522,12 @@ class SapMonitor(Resource): 'hana_db_sql_port': {'key': 'properties.hanaDbSqlPort', 'type': 'int'}, 'hana_db_username': {'key': 'properties.hanaDbUsername', 'type': 'str'}, 'hana_db_password': {'key': 'properties.hanaDbPassword', 'type': 'str'}, + 'hana_db_password_key_vault_url': {'key': 'properties.hanaDbPasswordKeyVaultUrl', 'type': 'str'}, + 'hana_db_credentials_msi_id': {'key': 'properties.hanaDbCredentialsMsiId', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, *, location: str=None, hana_subnet: str=None, hana_hostname: str=None, hana_db_name: str=None, hana_db_sql_port: int=None, hana_db_username: str=None, hana_db_password: str=None, **kwargs) -> None: + def __init__(self, *, location: str=None, hana_subnet: str=None, hana_hostname: str=None, hana_db_name: str=None, hana_db_sql_port: int=None, hana_db_username: str=None, hana_db_password: str=None, hana_db_password_key_vault_url: str=None, hana_db_credentials_msi_id: str=None, **kwargs) -> None: super(SapMonitor, self).__init__(location=location, **kwargs) self.hana_subnet = hana_subnet self.hana_hostname = hana_hostname @@ -527,6 +535,8 @@ def __init__(self, *, location: str=None, hana_subnet: str=None, hana_hostname: self.hana_db_sql_port = hana_db_sql_port self.hana_db_username = hana_db_username self.hana_db_password = hana_db_password + self.hana_db_password_key_vault_url = hana_db_password_key_vault_url + self.hana_db_credentials_msi_id = hana_db_credentials_msi_id self.provisioning_state = None diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_hana_instances_operations.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_hana_instances_operations.py index b4932fa45b64..2165693784cd 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_hana_instances_operations.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_hana_instances_operations.py @@ -11,7 +11,6 @@ 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 @@ -737,91 +736,3 @@ def get_long_running_output(response): else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) shutdown.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}/shutdown'} - - - def _enable_monitoring_initial( - self, resource_group_name, hana_instance_name, monitoring_parameter, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.enable_monitoring.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'), - 'hanaInstanceName': self._serialize.url("hana_instance_name", hana_instance_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['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_parameter, 'MonitoringDetails') - - # 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def enable_monitoring( - self, resource_group_name, hana_instance_name, monitoring_parameter, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to add a monitor to an SAP HANA instance. - - :param resource_group_name: Name of the resource group. - :type resource_group_name: str - :param hana_instance_name: Name of the SAP HANA on Azure instance. - :type hana_instance_name: str - :param monitoring_parameter: Request body that only contains - monitoring attributes - :type monitoring_parameter: - ~azure.mgmt.hanaonazure.models.MonitoringDetails - :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._enable_monitoring_initial( - resource_group_name=resource_group_name, - hana_instance_name=hana_instance_name, - monitoring_parameter=monitoring_parameter, - 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) - enable_monitoring.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}/monitoring'} diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py index e4f3d5055303..3697d9b71739 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.8.0" +VERSION = "0.9.0" diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/setup.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/setup.py index d88dbac05eaf..57c68ff652aa 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/setup.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/setup.py @@ -64,7 +64,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', From d498597a516f4e93f0c2319646f2e4ff66aebc4c Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 10:27:22 -0700 Subject: [PATCH 153/244] KV moved paging return type to ItemPaged (#6558) * KV with latest autorest * Make KV return ItemPaged from azure-core --- .../azure/keyvault/keys/_client.py | 25 +++++-- .../azure/keyvault/keys/_shared/__init__.py | 4 +- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_generated/v2016_10_01/models/_models.py | 8 --- .../v2016_10_01/models/_models_py3.py | 8 --- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_shared/_generated/v7_0/models/_models.py | 8 --- .../_generated/v7_0/models/_models_py3.py | 8 --- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../keys/_shared/async_client_base.py | 19 ----- .../azure/keyvault/keys/aio/_client.py | 30 +++++--- .../azure/keyvault/secrets/_client.py | 25 +++++-- .../keyvault/secrets/_shared/__init__.py | 4 +- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_generated/v2016_10_01/models/_models.py | 8 --- .../v2016_10_01/models/_models_py3.py | 8 --- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_shared/_generated/v7_0/models/_models.py | 8 --- .../_generated/v7_0/models/_models_py3.py | 8 --- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../secrets/_shared/async_client_base.py | 19 ----- .../azure/keyvault/secrets/aio/_client.py | 30 +++++--- 24 files changed, 498 insertions(+), 242 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py index ee0e81d07f73..b591ffdcaf0f 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py @@ -353,8 +353,12 @@ def list_deleted_keys(self, **kwargs): :dedent: 8 """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_deleted_keys(self._vault_url, maxresults=max_page_size, **kwargs) - return (DeletedKey._from_deleted_key_item(item) for item in pages) + return self._client.get_deleted_keys( + self._vault_url, + maxresults=max_page_size, + cls=lambda objs: [DeletedKey._from_deleted_key_item(x) for x in objs], + **kwargs + ) @distributed_trace def list_keys(self, **kwargs): @@ -381,8 +385,12 @@ def list_keys(self, **kwargs): :dedent: 8 """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_keys(self._vault_url, maxresults=max_page_size, **kwargs) - return (KeyBase._from_key_item(item) for item in pages) + return self._client.get_keys( + self._vault_url, + maxresults=max_page_size, + cls=lambda objs: [KeyBase._from_key_item(x) for x in objs], + **kwargs + ) @distributed_trace def list_key_versions(self, name, **kwargs): @@ -407,8 +415,13 @@ def list_key_versions(self, name, **kwargs): :dedent: 8 """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_key_versions(self._vault_url, name, maxresults=max_page_size, **kwargs) - return (KeyBase._from_key_item(item) for item in pages) + return self._client.get_key_versions( + self._vault_url, + name, + maxresults=max_page_size, + cls=lambda objs: [KeyBase._from_key_item(x) for x in objs], + **kwargs + ) @distributed_trace def purge_deleted_key(self, name, **kwargs): diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py index beb24c202495..72fb27441900 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py @@ -49,8 +49,8 @@ def parse_vault_id(url): try: from .async_challenge_auth_policy import AsyncChallengeAuthPolicy - from .async_client_base import AsyncKeyVaultClientBase, AsyncPagingAdapter + from .async_client_base import AsyncKeyVaultClientBase - __all__.extend(["AsyncChallengeAuthPolicy", "AsyncKeyVaultClientBase", "AsyncPagingAdapter"]) + __all__.extend(["AsyncChallengeAuthPolicy", "AsyncKeyVaultClientBase"]) except (SyntaxError, ImportError): pass diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py index e918a167f2dd..d1b025916b46 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models.py @@ -692,14 +692,6 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py index 07d530b486f6..94ec3b96083e 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/models/_models_py3.py @@ -692,14 +692,6 @@ def __init__(self, *, certificate_policy=None, certificate_attributes=None, tags self.tags = tags -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py index 24dfe4beb6a9..8b8ed5a83d62 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models.py @@ -753,14 +753,6 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py index 52f4aa981815..59e6f039d4b6 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/models/_models_py3.py @@ -753,14 +753,6 @@ def __init__(self, *, certificate_policy=None, certificate_attributes=None, tags self.tags = tags -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py index 51f916d2938f..28bccc61f053 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py @@ -9,7 +9,7 @@ from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.keyvault.keys._models import Key, DeletedKey, KeyBase, KeyOperationResult -from azure.keyvault.keys._shared import AsyncKeyVaultClientBase, AsyncPagingAdapter +from azure.keyvault.keys._shared import AsyncKeyVaultClientBase class KeyClient(AsyncKeyVaultClientBase): @@ -354,9 +354,12 @@ def list_keys(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[KeyBase]: :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_keys(self.vault_url, maxresults=max_results, **kwargs) - iterable = AsyncPagingAdapter(pages, KeyBase._from_key_item) - return iterable + return self._client.get_keys( + self.vault_url, + maxresults=max_results, + cls=lambda objs: [KeyBase._from_key_item(x) for x in objs], + **kwargs + ) @distributed_trace def list_key_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncIterable[KeyBase]: @@ -380,9 +383,13 @@ def list_key_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncIter :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_key_versions(self.vault_url, name, maxresults=max_results, **kwargs) - iterable = AsyncPagingAdapter(pages, KeyBase._from_key_item) - return iterable + return self._client.get_key_versions( + self.vault_url, + name, + maxresults=max_results, + cls=lambda objs: [KeyBase._from_key_item(x) for x in objs], + **kwargs + ) @distributed_trace_async async def backup_key(self, name: str, **kwargs: Mapping[str, Any]) -> bytes: @@ -538,9 +545,12 @@ def list_deleted_keys(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[Delete :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_deleted_keys(self.vault_url, maxresults=max_results, **kwargs) - iterable = AsyncPagingAdapter(pages, DeletedKey._from_deleted_key_item) - return iterable + return self._client.get_deleted_keys( + self.vault_url, + maxresults=max_results, + cls=lambda objs: [DeletedKey._from_deleted_key_item(x) for x in objs], + **kwargs + ) @distributed_trace_async async def purge_deleted_key(self, name: str, **kwargs: Mapping[str, Any]) -> None: diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py index 1f0a670bf217..40678aabf7d4 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py @@ -179,8 +179,12 @@ def list_secrets(self, **kwargs): """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_secrets(self._vault_url, maxresults=max_page_size, **kwargs) - return (SecretAttributes._from_secret_item(item) for item in pages) + return self._client.get_secrets( + self._vault_url, + maxresults=max_page_size, + cls=lambda objs: [DeletedSecret._from_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace def list_secret_versions(self, name, **kwargs): @@ -206,8 +210,13 @@ def list_secret_versions(self, name, **kwargs): """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_secret_versions(self._vault_url, name, maxresults=max_page_size, **kwargs) - return (SecretAttributes._from_secret_item(item) for item in pages) + return self._client.get_secret_versions( + self._vault_url, + name, + maxresults=max_page_size, + cls=lambda objs: [DeletedSecret._from_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace def backup_secret(self, name, **kwargs): @@ -336,8 +345,12 @@ def list_deleted_secrets(self, **kwargs): """ max_page_size = kwargs.get("max_page_size", None) - pages = self._client.get_deleted_secrets(self._vault_url, maxresults=max_page_size, **kwargs) - return (DeletedSecret._from_deleted_secret_item(item) for item in pages) + return self._client.get_deleted_secrets( + self._vault_url, + maxresults=max_page_size, + cls=lambda objs: [DeletedSecret._from_deleted_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace def purge_deleted_secret(self, name, **kwargs): diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/__init__.py index beb24c202495..72fb27441900 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/__init__.py @@ -49,8 +49,8 @@ def parse_vault_id(url): try: from .async_challenge_auth_policy import AsyncChallengeAuthPolicy - from .async_client_base import AsyncKeyVaultClientBase, AsyncPagingAdapter + from .async_client_base import AsyncKeyVaultClientBase - __all__.extend(["AsyncChallengeAuthPolicy", "AsyncKeyVaultClientBase", "AsyncPagingAdapter"]) + __all__.extend(["AsyncChallengeAuthPolicy", "AsyncKeyVaultClientBase"]) except (SyntaxError, ImportError): pass diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py index e918a167f2dd..d1b025916b46 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models.py @@ -692,14 +692,6 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py index 07d530b486f6..94ec3b96083e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/models/_models_py3.py @@ -692,14 +692,6 @@ def __init__(self, *, certificate_policy=None, certificate_attributes=None, tags self.tags = tags -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py index 24dfe4beb6a9..8b8ed5a83d62 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models.py @@ -753,14 +753,6 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py index 52f4aa981815..59e6f039d4b6 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/models/_models_py3.py @@ -753,14 +753,6 @@ def __init__(self, *, certificate_policy=None, certificate_attributes=None, tags self.tags = tags -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - class Contact(Model): """The contact information for the vault certificates. diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py index 89a0fa98836e..9a4a92375ad9 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py @@ -10,7 +10,7 @@ from azure.core.tracing.decorator_async import distributed_trace_async from azure.keyvault.secrets._models import Secret, DeletedSecret, SecretAttributes -from .._shared import AsyncKeyVaultClientBase, AsyncPagingAdapter +from .._shared import AsyncKeyVaultClientBase class SecretClient(AsyncKeyVaultClientBase): @@ -182,9 +182,12 @@ def list_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[SecretAttri :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_secrets(self.vault_url, maxresults=max_results) - iterable = AsyncPagingAdapter(pages, SecretAttributes._from_secret_item) - return iterable + return self._client.get_secrets( + self.vault_url, + maxresults=max_results, + cls=lambda objs: [SecretAttributes._from_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace def list_secret_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncIterable[SecretAttributes]: @@ -208,9 +211,13 @@ def list_secret_versions(self, name: str, **kwargs: Mapping[str, Any]) -> AsyncI :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_secret_versions(self.vault_url, name, maxresults=max_results) - iterable = AsyncPagingAdapter(pages, SecretAttributes._from_secret_item) - return iterable + return self._client.get_secret_versions( + self.vault_url, + name, + maxresults=max_results, + cls=lambda objs: [SecretAttributes._from_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace_async async def backup_secret(self, name: str, **kwargs: Mapping[str, Any]) -> bytes: @@ -335,9 +342,12 @@ def list_deleted_secrets(self, **kwargs: Mapping[str, Any]) -> AsyncIterable[Del :dedent: 8 """ max_results = kwargs.get("max_page_size") - pages = self._client.get_deleted_secrets(self.vault_url, maxresults=max_results, **kwargs) - iterable = AsyncPagingAdapter(pages, DeletedSecret._from_deleted_secret_item) - return iterable + return self._client.get_deleted_secrets( + self.vault_url, + maxresults=max_results, + cls=lambda objs: [DeletedSecret._from_deleted_secret_item(x) for x in objs], + **kwargs + ) @distributed_trace_async async def purge_deleted_secret(self, name: str, **kwargs: Mapping[str, Any]) -> None: From a2a2b66cfa85156814299b5da31fc03770a50747 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 10:33:30 -0700 Subject: [PATCH 154/244] azure-core history 1.0.0b2 (#6562) * azure-core history * Update HISTORY.md --- sdk/core/azure-core/HISTORY.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/sdk/core/azure-core/HISTORY.md b/sdk/core/azure-core/HISTORY.md index b54129f9c2e0..2123f6308b80 100644 --- a/sdk/core/azure-core/HISTORY.md +++ b/sdk/core/azure-core/HISTORY.md @@ -3,6 +3,27 @@ ------------------- +2019-08-XX Version 1.0.0b2 + +## Breaking changes + +- Transport classes don't take `config` parameter anymore (use kwargs instead) #6372 +- `azure.core.paging` has been completely refactored #6420 +- HttpResponse.content_type attribute is now a string (was a list) #6490 +- For `StreamDownloadGenerator` subclasses, `response` is now an `HttpResponse`, and not a transport response like `aiohttp.ClientResponse` or `requests.Response`. The transport response is available in `internal_response` attribute #6490 + +## Bug fixes + +- aiohttp is not required to import async pipelines classes #6496 +- `AsyncioRequestsTransport.sleep` is now a coroutine as expected #6490 +- `RequestsTransport` is not tight to `ProxyPolicy` implementation details anymore #6372 +- `AiohttpTransport` does not raise on unexpected kwargs #6355 + +## Features + +- New paging base classes that support `continuation_token` and `by_page()` #6420 +- Proxy support for `AiohttpTransport` #6372 + 2019-06-26 Version 1.0.0b1 - Preview 1 release From d19d16916ff2b95c15d30c35577d2b6fbc20add8 Mon Sep 17 00:00:00 2001 From: Bryan Van de Ven Date: Wed, 31 Jul 2019 11:28:59 -0700 Subject: [PATCH 155/244] Make private Cosmos modules private [WIP] (#6329) * make consistent_hash_ring private * make default_retry_policy private * make endpoint_discovery_retry_policy private * make hash_partition_resolver private * make location_cache private * make murmur_hash private * make range private * make range_partition_resolver private * make vector_session_token private * make resource_throttle_retry_policy private * make retry_utility private * make utils private * make routing private * make execution_context private * make cosmos_client_connection private * make retry_options private * make query_iterable private * make constants private * make synchronized_request private * make session_retry_policy private * make partition private * make global_endpoint_manager private * make runtime_constants private * make session private * make request_object private * make base private --- .../azure/cosmos/{base.py => _base.py} | 8 +- ..._hash_ring.py => _consistent_hash_ring.py} | 8 +- .../cosmos/{constants.py => _constants.py} | 0 ...ection.py => _cosmos_client_connection.py} | 48 ++++++------ ...try_policy.py => _default_retry_policy.py} | 4 +- ...py => _endpoint_discovery_retry_policy.py} | 6 +- .../__init__.py | 0 .../aggregators.py | 2 +- .../base_execution_context.py | 14 ++-- .../document_producer.py | 8 +- .../endpoint_component.py | 2 +- .../execution_dispatcher.py | 10 +-- .../multi_execution_aggregator.py | 8 +- .../query_execution_info.py | 0 ...manager.py => _global_endpoint_manager.py} | 4 +- ...esolver.py => _hash_partition_resolver.py} | 8 +- .../{location_cache.py => _location_cache.py} | 1 - .../{murmur_hash.py => _murmur_hash.py} | 2 +- .../cosmos/{partition.py => _partition.py} | 2 +- .../{query_iterable.py => _query_iterable.py} | 4 +- .../azure/cosmos/{range.py => _range.py} | 0 ...solver.py => _range_partition_resolver.py} | 0 .../{request_object.py => _request_object.py} | 2 +- ....py => _resource_throttle_retry_policy.py} | 2 +- .../{retry_options.py => _retry_options.py} | 0 .../{retry_utility.py => _retry_utility.py} | 24 +++--- .../cosmos/{routing => _routing}/__init__.py | 0 .../collection_routing_map.py | 34 ++++---- .../routing_map_provider.py | 42 +++++----- .../{routing => _routing}/routing_range.py | 12 +-- ...ime_constants.py => _runtime_constants.py} | 0 .../azure/cosmos/{session.py => _session.py} | 12 +-- ...try_policy.py => _session_retry_policy.py} | 0 ...ed_request.py => _synchronized_request.py} | 4 +- .../azure/cosmos/{utils.py => _utils.py} | 10 +-- ...sion_token.py => _vector_session_token.py} | 1 - .../azure-cosmos/azure/cosmos/container.py | 14 ++-- .../azure/cosmos/cosmos_client.py | 8 +- .../azure-cosmos/azure/cosmos/database.py | 12 +-- .../azure-cosmos/azure/cosmos/documents.py | 4 +- .../azure-cosmos/azure/cosmos/scripts.py | 16 ++-- sdk/cosmos/azure-cosmos/azure/cosmos/user.py | 6 +- .../MultiMasterOperations/ConflictWorker.py | 1 - .../MultiMasterScenario.py | 2 +- .../azure-cosmos/test/base_unit_tests.py | 2 +- sdk/cosmos/azure-cosmos/test/crud_tests.py | 52 ++++++------- .../azure-cosmos/test/globaldb_mock_tests.py | 18 ++--- .../azure-cosmos/test/globaldb_tests.py | 18 ++--- .../azure-cosmos/test/location_cache_tests.py | 24 +++--- .../azure-cosmos/test/multimaster_tests.py | 10 +-- sdk/cosmos/azure-cosmos/test/orderby_tests.py | 4 +- sdk/cosmos/azure-cosmos/test/proxy_tests.py | 2 +- .../test/query_execution_context_tests.py | 4 +- .../azure-cosmos/test/retry_policy_tests.py | 46 +++++------ .../routing/collection_routing_map_test.py | 34 ++++---- .../routing/routing_map_provider_tests.py | 78 +++++++++---------- .../azure-cosmos/test/routing_map_tests.py | 8 +- sdk/cosmos/azure-cosmos/test/session_tests.py | 16 ++-- .../test/session_token_unit_tests.py | 2 +- .../test/streaming_failover_test.py | 24 +++--- sdk/cosmos/azure-cosmos/test/utils_tests.py | 4 +- 61 files changed, 344 insertions(+), 347 deletions(-) rename sdk/cosmos/azure-cosmos/azure/cosmos/{base.py => _base.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{consistent_hash_ring.py => _consistent_hash_ring.py} (96%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{constants.py => _constants.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{cosmos_client_connection.py => _cosmos_client_connection.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{default_retry_policy.py => _default_retry_policy.py} (96%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{endpoint_discovery_retry_policy.py => _endpoint_discovery_retry_policy.py} (94%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/__init__.py (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/aggregators.py (97%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/base_execution_context.py (94%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/document_producer.py (97%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/endpoint_component.py (97%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/execution_dispatcher.py (94%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/multi_execution_aggregator.py (95%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{execution_context => _execution_context}/query_execution_info.py (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{global_endpoint_manager.py => _global_endpoint_manager.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{hash_partition_resolver.py => _hash_partition_resolver.py} (95%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{location_cache.py => _location_cache.py} (99%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{murmur_hash.py => _murmur_hash.py} (99%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{partition.py => _partition.py} (99%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{query_iterable.py => _query_iterable.py} (97%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{range.py => _range.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{range_partition_resolver.py => _range_partition_resolver.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{request_object.py => _request_object.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{resource_throttle_retry_policy.py => _resource_throttle_retry_policy.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{retry_options.py => _retry_options.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{retry_utility.py => _retry_utility.py} (83%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{routing => _routing}/__init__.py (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{routing => _routing}/collection_routing_map.py (79%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{routing => _routing}/routing_map_provider.py (80%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{routing => _routing}/routing_range.py (89%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{runtime_constants.py => _runtime_constants.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{session.py => _session.py} (95%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{session_retry_policy.py => _session_retry_policy.py} (100%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{synchronized_request.py => _synchronized_request.py} (98%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{utils.py => _utils.py} (86%) rename sdk/cosmos/azure-cosmos/azure/cosmos/{vector_session_token.py => _vector_session_token.py} (99%) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/base.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_base.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/base.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_base.py index 5fa2839f0b0d..6e4bf3e10888 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/base.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_base.py @@ -33,8 +33,8 @@ from . import documents from . import partition_key from . import http_constants -from . import constants -from . import runtime_constants +from . import _constants as constants +from . import _runtime_constants import six from six.moves.urllib.parse import quote as urllib_quote @@ -178,10 +178,10 @@ def GetHeaders(cosmos_client_connection, if verb == 'post' or verb == 'put': if not headers.get(http_constants.HttpHeaders.ContentType): - headers[http_constants.HttpHeaders.ContentType] = runtime_constants.MediaTypes.Json + headers[http_constants.HttpHeaders.ContentType] = _runtime_constants.MediaTypes.Json if not headers.get(http_constants.HttpHeaders.Accept): - headers[http_constants.HttpHeaders.Accept] = runtime_constants.MediaTypes.Json + headers[http_constants.HttpHeaders.Accept] = _runtime_constants.MediaTypes.Json if partition_key_range_id is not None: headers[http_constants.HttpHeaders.PartitionKeyRangeID] = partition_key_range_id diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/consistent_hash_ring.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_consistent_hash_ring.py similarity index 96% rename from sdk/cosmos/azure-cosmos/azure/cosmos/consistent_hash_ring.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_consistent_hash_ring.py index 6b6bdd086b62..93198b3f1d72 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/consistent_hash_ring.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_consistent_hash_ring.py @@ -26,10 +26,10 @@ import six from six.moves import xrange -from . import partition +from . import _partition -class _ConsistentHashRing(object): +class ConsistentHashRing(object): """The ConsistentHashRing class implements a consistent hash ring using the hash generator specified. """ @@ -79,13 +79,13 @@ def _ConstructPartitions(self, collection_links, partitions_per_node): using the hashing algorithm and then finally sorting the partitions based on the hash value. """ collections_node_count = len(collection_links) - partitions = [partition._Partition() for _ in xrange(0, partitions_per_node * collections_node_count)] + partitions = [_partition.Partition() for _ in xrange(0, partitions_per_node * collections_node_count)] index = 0 for collection_node in collection_links: hash_value = self.hash_generator.ComputeHash(self._GetBytes(collection_node)) for _ in xrange(0, partitions_per_node): - partitions[index] = partition._Partition(hash_value, collection_node) + partitions[index] = _partition.Partition(hash_value, collection_node) index += 1 hash_value = self.hash_generator.ComputeHash(hash_value) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/constants.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_constants.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/constants.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_constants.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client_connection.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_client_connection.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client_connection.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_client_connection.py index f7b2fe1cca57..6f9fe50a1c86 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client_connection.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_client_connection.py @@ -25,18 +25,18 @@ import six from typing import cast -from . import base +from . import _base as base from . import documents -from . import constants +from . import _constants as constants from . import http_constants -from . import query_iterable -from . import runtime_constants -from . import request_object -from . import synchronized_request -from . import global_endpoint_manager -from .routing import routing_map_provider as routing_map_provider -from . import session -from . import utils +from . import _query_iterable as query_iterable +from . import _runtime_constants as runtime_constants +from . import _request_object +from . import _synchronized_request as synchronized_request +from . import _global_endpoint_manager as global_endpoint_manager +from ._routing import routing_map_provider as routing_map_provider +from . import _session +from . import _utils from .partition_key import _Undefined, _Empty @@ -110,7 +110,7 @@ def __init__(self, http_constants.HttpHeaders.Version: http_constants.Versions.CurrentVersion, http_constants.HttpHeaders.UserAgent: - utils._get_user_agent(), + _utils.get_user_agent(), # For single partition query with aggregate functions we would try to accumulate the results on the SDK. # We need to set continuation as not expected. http_constants.HttpHeaders.IsContinuationExpected: False @@ -127,7 +127,7 @@ def __init__(self, '''create a session - this is maintained only if the default consistency level on the client is set to session, or if the user explicitly sets it as a property via setter''' - self.session = session.Session(self.url_connection) + self.session = _session.Session(self.url_connection) else: self.session = None @@ -150,7 +150,7 @@ def __init__(self, self._query_compatibility_mode = CosmosClientConnection._QueryCompatibilityMode.Default # Routing map provider - self._routing_map_provider = routing_map_provider._SmartRoutingMapProvider(self) + self._routing_map_provider = routing_map_provider.SmartRoutingMapProvider(self) database_account = self._global_endpoint_manager._GetDatabaseAccount() self._global_endpoint_manager.force_refresh(database_account) @@ -1932,7 +1932,7 @@ def ReadMedia(self, media_link): {}) # ReadMedia will always use WriteEndpoint since it's not replicated in readable Geo regions - request = request_object._RequestObject('media', documents._OperationType.Read) + request = _request_object.RequestObject('media', documents._OperationType.Read) result, self.last_response_headers = self.__Get(path, request, headers) @@ -1981,7 +1981,7 @@ def UpdateMedia(self, media_link, readable_stream, options=None): options) # UpdateMedia will use WriteEndpoint since it uses PUT operation - request = request_object._RequestObject('media', documents._OperationType.Update) + request = _request_object.RequestObject('media', documents._OperationType.Update) result, self.last_response_headers = self.__Put(path, request, readable_stream, @@ -2200,7 +2200,7 @@ def ExecuteStoredProcedure(self, sproc_link, params, options=None): options) # ExecuteStoredProcedure will use WriteEndpoint since it uses POST operation - request = request_object._RequestObject('sprocs', documents._OperationType.ExecuteJavaScript) + request = _request_object.RequestObject('sprocs', documents._OperationType.ExecuteJavaScript) result, self.last_response_headers = self.__Post(path, request, params, @@ -2389,7 +2389,7 @@ def GetDatabaseAccount(self, url_connection=None): '', # type {}) - request = request_object._RequestObject('databaseaccount', documents._OperationType.Read, url_connection) + request = _request_object.RequestObject('databaseaccount', documents._OperationType.Read, url_connection) result, self.last_response_headers = self.__Get('', request, headers) @@ -2449,7 +2449,7 @@ def Create(self, body, path, type, id, initial_headers, options=None): options) # Create will use WriteEndpoint since it uses POST operation - request = request_object._RequestObject(type, documents._OperationType.Create) + request = _request_object.RequestObject(type, documents._OperationType.Create) result, self.last_response_headers = self.__Post(path, request, body, @@ -2491,7 +2491,7 @@ def Upsert(self, body, path, type, id, initial_headers, options=None): headers[http_constants.HttpHeaders.IsUpsert] = True # Upsert will use WriteEndpoint since it uses POST operation - request = request_object._RequestObject(type, documents._OperationType.Upsert) + request = _request_object.RequestObject(type, documents._OperationType.Upsert) result, self.last_response_headers = self.__Post(path, request, body, @@ -2529,7 +2529,7 @@ def Replace(self, resource, path, type, id, initial_headers, options=None): type, options) # Replace will use WriteEndpoint since it uses PUT operation - request = request_object._RequestObject(type, documents._OperationType.Replace) + request = _request_object.RequestObject(type, documents._OperationType.Replace) result, self.last_response_headers = self.__Put(path, request, resource, @@ -2567,7 +2567,7 @@ def Read(self, path, type, id, initial_headers, options=None): type, options) # Read will use ReadEndpoint since it uses GET operation - request = request_object._RequestObject(type, documents._OperationType.Read) + request = _request_object.RequestObject(type, documents._OperationType.Read) result, self.last_response_headers = self.__Get(path, request, headers) @@ -2601,7 +2601,7 @@ def DeleteResource(self, path, type, id, initial_headers, options=None): type, options) # Delete will use WriteEndpoint since it uses DELETE operation - request = request_object._RequestObject(type, documents._OperationType.Delete) + request = _request_object.RequestObject(type, documents._OperationType.Delete) result, self.last_response_headers = self.__Delete(path, request, headers) @@ -2783,7 +2783,7 @@ def __GetBodiesFromQueryResult(result): # Copy to make sure that default_headers won't be changed. if query is None: # Query operations will use ReadEndpoint even though it uses GET(for feed requests) - request = request_object._RequestObject(type, documents._OperationType.ReadFeed) + request = _request_object.RequestObject(type, documents._OperationType.ReadFeed) headers = base.GetHeaders(self, initial_headers, 'get', @@ -2811,7 +2811,7 @@ def __GetBodiesFromQueryResult(result): raise SystemError('Unexpected query compatibility mode.') # Query operations will use ReadEndpoint even though it uses POST(for regular query operations) - request = request_object._RequestObject(type, documents._OperationType.SqlQuery) + request = _request_object.RequestObject(type, documents._OperationType.SqlQuery) headers = base.GetHeaders(self, initial_headers, 'post', diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/default_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_default_retry_policy.py similarity index 96% rename from sdk/cosmos/azure-cosmos/azure/cosmos/default_retry_policy.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_default_retry_policy.py index 1fc309c98302..8cb094c1552a 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/default_retry_policy.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_default_retry_policy.py @@ -23,7 +23,7 @@ """ from . import http_constants -class _DefaultRetryPolicy(object): +class DefaultRetryPolicy(object): error_codes = http_constants._ErrorCodes CONNECTION_ERROR_CODES = [ @@ -52,7 +52,7 @@ def __init__(self, *args): self.args = args def needsRetry(self, error_code): - if error_code in _DefaultRetryPolicy.CONNECTION_ERROR_CODES: + if error_code in DefaultRetryPolicy.CONNECTION_ERROR_CODES: if (len(self.args) > 0): if (self.args[4]['method'] == 'GET') or (http_constants.HttpHeaders.IsQuery in self.args[4]['headers']): return True diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/endpoint_discovery_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_endpoint_discovery_retry_policy.py similarity index 94% rename from sdk/cosmos/azure-cosmos/azure/cosmos/endpoint_discovery_retry_policy.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_endpoint_discovery_retry_policy.py index dbc1e41f845f..d3158cd20035 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/endpoint_discovery_retry_policy.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_endpoint_discovery_retry_policy.py @@ -33,7 +33,7 @@ logger.addHandler(log_handler) -class _EndpointDiscoveryRetryPolicy(object): +class EndpointDiscoveryRetryPolicy(object): """The endpoint discovery retry policy class used for geo-replicated database accounts to handle the write forbidden exceptions due to writable/readable location changes (say, after a failover). @@ -44,9 +44,9 @@ class _EndpointDiscoveryRetryPolicy(object): def __init__(self, connection_policy, global_endpoint_manager, *args): self.global_endpoint_manager = global_endpoint_manager - self._max_retry_attempt_count = _EndpointDiscoveryRetryPolicy.Max_retry_attempt_count + self._max_retry_attempt_count = EndpointDiscoveryRetryPolicy.Max_retry_attempt_count self.failover_retry_count = 0 - self.retry_after_in_milliseconds = _EndpointDiscoveryRetryPolicy.Retry_after_in_milliseconds + self.retry_after_in_milliseconds = EndpointDiscoveryRetryPolicy.Retry_after_in_milliseconds self.connection_policy = connection_policy self.request = args[0] if args else None #clear previous location-based routing directive diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/__init__.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/__init__.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/__init__.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/__init__.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/aggregators.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aggregators.py similarity index 97% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/aggregators.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aggregators.py index 402acb514fbc..2a3ed76bce64 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/aggregators.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aggregators.py @@ -22,7 +22,7 @@ """Internal class for aggregation queries implementation in the Azure Cosmos database service. """ from abc import abstractmethod, ABCMeta -from azure.cosmos.execution_context.document_producer import _OrderByHelper +from azure.cosmos._execution_context.document_producer import _OrderByHelper class _Aggregator(object): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/base_execution_context.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/base_execution_context.py similarity index 94% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/base_execution_context.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/base_execution_context.py index 42bd23269da2..e32fb2e95b28 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/base_execution_context.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/base_execution_context.py @@ -23,9 +23,9 @@ """ from collections import deque -from .. import retry_utility +from .. import _retry_utility from .. import http_constants -from .. import base +from .. import _base class _QueryExecutionContextBase(object): """ @@ -140,7 +140,7 @@ def _fetch_items_helper_with_retries(self, fetch_function): def callback(): return self._fetch_items_helper_no_retries(fetch_function) - return retry_utility._Execute(self._client, self._client._global_endpoint_manager, callback) + return _retry_utility.Execute(self._client, self._client._global_endpoint_manager, callback) class _DefaultQueryExecutionContext(_QueryExecutionContextBase): @@ -208,8 +208,8 @@ def __init__(self, client, options, database_link, query, partition_key): raise ValueError("_collection_links_length is not greater than 0.") # Creating the QueryFeed for the first collection - path = base.GetPathFromLink(self._collection_links[self._current_collection_index], 'docs') - collection_id = base.GetResourceIdOrFullNameFromLink(self._collection_links[self._current_collection_index]) + path = _base.GetPathFromLink(self._collection_links[self._current_collection_index], 'docs') + collection_id = _base.GetResourceIdOrFullNameFromLink(self._collection_links[self._current_collection_index]) self._current_collection_index += 1 @@ -241,8 +241,8 @@ def _fetch_next_block(self): # creating separate feed queries for each collection and fetching the items while not fetched_items: if self._collection_links and self._current_collection_index < self._collection_links_length: - path = base.GetPathFromLink(self._collection_links[self._current_collection_index], 'docs') - collection_id = base.GetResourceIdOrFullNameFromLink(self._collection_links[self._current_collection_index]) + path = _base.GetPathFromLink(self._collection_links[self._current_collection_index], 'docs') + collection_id = _base.GetResourceIdOrFullNameFromLink(self._collection_links[self._current_collection_index]) self._continuation = None self._has_started = False diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/document_producer.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/document_producer.py similarity index 97% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/document_producer.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/document_producer.py index c74a60e3bade..f6f7db7e911e 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/document_producer.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/document_producer.py @@ -25,8 +25,8 @@ import six import numbers from collections import deque -from azure.cosmos import base -from azure.cosmos.execution_context.base_execution_context import _DefaultQueryExecutionContext +from azure.cosmos import _base +from azure.cosmos._execution_context.base_execution_context import _DefaultQueryExecutionContext from six.moves import xrange class _DocumentProducer(object): @@ -51,8 +51,8 @@ def __init__(self, partition_key_target_range, client, collection_link, query, d self._cur_item = None # initiate execution context - path = base.GetPathFromLink(collection_link, 'docs') - collection_id = base.GetResourceIdOrFullNameFromLink(collection_link) + path = _base.GetPathFromLink(collection_link, 'docs') + collection_id = _base.GetResourceIdOrFullNameFromLink(collection_link) def fetch_fn(options): return self._client.QueryFeed(path, collection_id, diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/endpoint_component.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/endpoint_component.py similarity index 97% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/endpoint_component.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/endpoint_component.py index 868a55464639..77dda8512b00 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/endpoint_component.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/endpoint_component.py @@ -23,7 +23,7 @@ """ import numbers -from azure.cosmos.execution_context.aggregators import _AverageAggregator, _CountAggregator, _MaxAggregator, \ +from azure.cosmos._execution_context.aggregators import _AverageAggregator, _CountAggregator, _MaxAggregator, \ _MinAggregator, _SumAggregator diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/execution_dispatcher.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/execution_dispatcher.py similarity index 94% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/execution_dispatcher.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/execution_dispatcher.py index 6f7740af4f43..acc7452da9ab 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/execution_dispatcher.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/execution_dispatcher.py @@ -25,11 +25,11 @@ import json from six.moves import xrange from azure.cosmos.errors import HTTPFailure -from azure.cosmos.execution_context.base_execution_context import _QueryExecutionContextBase -from azure.cosmos.execution_context.base_execution_context import _DefaultQueryExecutionContext -from azure.cosmos.execution_context.query_execution_info import _PartitionedQueryExecutionInfo -from azure.cosmos.execution_context import endpoint_component -from azure.cosmos.execution_context import multi_execution_aggregator +from azure.cosmos._execution_context.base_execution_context import _QueryExecutionContextBase +from azure.cosmos._execution_context.base_execution_context import _DefaultQueryExecutionContext +from azure.cosmos._execution_context.query_execution_info import _PartitionedQueryExecutionInfo +from azure.cosmos._execution_context import endpoint_component +from azure.cosmos._execution_context import multi_execution_aggregator from azure.cosmos.http_constants import StatusCodes, SubStatusCodes class _ProxyQueryExecutionContext(_QueryExecutionContextBase): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/multi_execution_aggregator.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/multi_execution_aggregator.py similarity index 95% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/multi_execution_aggregator.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/multi_execution_aggregator.py index 63a2dfb3b706..f0bfb8887fd1 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/multi_execution_aggregator.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/multi_execution_aggregator.py @@ -23,9 +23,9 @@ """ import heapq -from azure.cosmos.execution_context.base_execution_context import _QueryExecutionContextBase -from azure.cosmos.execution_context import document_producer -from azure.cosmos.routing import routing_range +from azure.cosmos._execution_context.base_execution_context import _QueryExecutionContextBase +from azure.cosmos._execution_context import document_producer +from azure.cosmos._routing import routing_range class _MultiExecutionContextAggregator(_QueryExecutionContextBase): """This class is capable of queries which requires rewriting based on @@ -147,4 +147,4 @@ def _createTargetPartitionQueryExecutionContext(self, partition_key_target_range def _get_target_parition_key_range(self): query_ranges = self._partitioned_query_ex_info.get_query_ranges() - return self._routing_provider.get_overlapping_ranges(self._resource_link, [routing_range._Range.ParseFromDict(range_as_dict) for range_as_dict in query_ranges]) + return self._routing_provider.get_overlapping_ranges(self._resource_link, [routing_range.Range.ParseFromDict(range_as_dict) for range_as_dict in query_ranges]) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/query_execution_info.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/query_execution_info.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/execution_context/query_execution_info.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/query_execution_info.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/global_endpoint_manager.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_global_endpoint_manager.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/global_endpoint_manager.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_global_endpoint_manager.py index 0d7ff3936b76..0c44a81a138a 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/global_endpoint_manager.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_global_endpoint_manager.py @@ -24,9 +24,9 @@ from six.moves.urllib.parse import urlparse import threading -from . import constants +from . import _constants as constants from . import errors -from .location_cache import LocationCache +from ._location_cache import LocationCache class _GlobalEndpointManager(object): """ diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/hash_partition_resolver.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_hash_partition_resolver.py similarity index 95% rename from sdk/cosmos/azure-cosmos/azure/cosmos/hash_partition_resolver.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_hash_partition_resolver.py index 8b15926ec680..fca0cfe85d6f 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/hash_partition_resolver.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_hash_partition_resolver.py @@ -22,8 +22,8 @@ """Hash partition resolver implementation in the Azure Cosmos database service. """ -from . import murmur_hash -from . import consistent_hash_ring +from . import _murmur_hash +from . import _consistent_hash_ring class HashPartitionResolver(object): """HashPartitionResolver implements partitioning based on the value of a hash function, allowing you to evenly @@ -51,9 +51,9 @@ def __init__(self, partition_key_extractor, collection_links, default_number_of_ self.collection_links = collection_links if hash_generator is None: - hash_generator = murmur_hash._MurmurHash() + hash_generator = _murmur_hash.MurmurHash() - self.consistent_hash_ring = consistent_hash_ring._ConsistentHashRing(self.collection_links, default_number_of_virtual_nodes_per_collection, hash_generator) + self.consistent_hash_ring = _consistent_hash_ring.ConsistentHashRing(self.collection_links, default_number_of_virtual_nodes_per_collection, hash_generator) def ResolveForCreate(self, document): """Resolves the collection for creating the document based on the partition key. diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/location_cache.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_location_cache.py similarity index 99% rename from sdk/cosmos/azure-cosmos/azure/cosmos/location_cache.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_location_cache.py index 1534cef4f9ea..68f7cdb23a24 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/location_cache.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_location_cache.py @@ -25,7 +25,6 @@ import collections import time -from . import base from . import documents from . import http_constants diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/murmur_hash.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_murmur_hash.py similarity index 99% rename from sdk/cosmos/azure-cosmos/azure/cosmos/murmur_hash.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_murmur_hash.py index d94b5f39044b..0785b75096e6 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/murmur_hash.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_murmur_hash.py @@ -43,7 +43,7 @@ https://pypi.python.org/pypi/mmh3/2.0 ''' -class _MurmurHash(object): +class MurmurHash(object): """ The 32 bit x86 version of MurmurHash3 implementation. """ def ComputeHash(self, key): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/partition.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_partition.py similarity index 99% rename from sdk/cosmos/azure-cosmos/azure/cosmos/partition.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_partition.py index ffd931965bca..35f1611a21bc 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/partition.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_partition.py @@ -24,7 +24,7 @@ from six.moves import xrange -class _Partition(object): +class Partition(object): """Represents a class that holds the hash value and node name for each partition. """ def __init__(self, hash_value = None, node = None): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/query_iterable.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_query_iterable.py similarity index 97% rename from sdk/cosmos/azure-cosmos/azure/cosmos/query_iterable.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_query_iterable.py index ad2e8cd98d96..8abd73b4f8c1 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/query_iterable.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_query_iterable.py @@ -21,8 +21,8 @@ """Iterable query results in the Azure Cosmos database service. """ -from azure.cosmos.execution_context import execution_dispatcher -from azure.cosmos.execution_context import base_execution_context +from azure.cosmos._execution_context import execution_dispatcher +from azure.cosmos._execution_context import base_execution_context class QueryIterable(object): """Represents an iterable object of the query results. diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/range.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_range.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/range.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_range.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/range_partition_resolver.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_range_partition_resolver.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/range_partition_resolver.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_range_partition_resolver.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/request_object.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_request_object.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/request_object.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_request_object.py index db9ef786765f..fa882a0a0c54 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/request_object.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_request_object.py @@ -21,7 +21,7 @@ """Represents a request object. """ -class _RequestObject(object): +class RequestObject(object): def __init__(self, resource_type, operation_type, endpoint_override = None): self.resource_type = resource_type self.operation_type = operation_type diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/resource_throttle_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_resource_throttle_retry_policy.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/resource_throttle_retry_policy.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_resource_throttle_retry_policy.py index f3179a1902ef..57d32fd2b8e7 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/resource_throttle_retry_policy.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_resource_throttle_retry_policy.py @@ -24,7 +24,7 @@ from . import http_constants -class _ResourceThrottleRetryPolicy(object): +class ResourceThrottleRetryPolicy(object): def __init__(self, max_retry_attempt_count, fixed_retry_interval_in_milliseconds, max_wait_time_in_seconds): self._max_retry_attempt_count = max_retry_attempt_count diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/retry_options.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_retry_options.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/retry_options.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_retry_options.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/retry_utility.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_retry_utility.py similarity index 83% rename from sdk/cosmos/azure-cosmos/azure/cosmos/retry_utility.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_retry_utility.py index 1daa9a1f8c26..95f611fe4f2d 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/retry_utility.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_retry_utility.py @@ -25,13 +25,13 @@ import time from . import errors -from . import endpoint_discovery_retry_policy -from . import resource_throttle_retry_policy -from . import default_retry_policy -from . import session_retry_policy +from . import _endpoint_discovery_retry_policy +from . import _resource_throttle_retry_policy +from . import _default_retry_policy +from . import _session_retry_policy from .http_constants import HttpHeaders, StatusCodes, SubStatusCodes -def _Execute(client, global_endpoint_manager, function, *args, **kwargs): +def Execute(client, global_endpoint_manager, function, *args, **kwargs): """Exectutes the function with passed parameters applying all retry policies :param object client: @@ -45,20 +45,20 @@ def _Execute(client, global_endpoint_manager, function, *args, **kwargs): """ # instantiate all retry policies here to be applied for each request execution - endpointDiscovery_retry_policy = endpoint_discovery_retry_policy._EndpointDiscoveryRetryPolicy(client.connection_policy, global_endpoint_manager, *args) + endpointDiscovery_retry_policy = _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy(client.connection_policy, global_endpoint_manager, *args) - resourceThrottle_retry_policy = resource_throttle_retry_policy._ResourceThrottleRetryPolicy(client.connection_policy.RetryOptions.MaxRetryAttemptCount, + resourceThrottle_retry_policy = _resource_throttle_retry_policy.ResourceThrottleRetryPolicy(client.connection_policy.RetryOptions.MaxRetryAttemptCount, client.connection_policy.RetryOptions.FixedRetryIntervalInMilliseconds, client.connection_policy.RetryOptions.MaxWaitTimeInSeconds) - defaultRetry_policy = default_retry_policy._DefaultRetryPolicy(*args) + defaultRetry_policy = _default_retry_policy.DefaultRetryPolicy(*args) - sessionRetry_policy = session_retry_policy._SessionRetryPolicy(client.connection_policy.EnableEndpointDiscovery, global_endpoint_manager, *args) + sessionRetry_policy = _session_retry_policy._SessionRetryPolicy(client.connection_policy.EnableEndpointDiscovery, global_endpoint_manager, *args) while True: try: if args: - result = _ExecuteFunction(function, global_endpoint_manager, *args, **kwargs) + result = ExecuteFunction(function, global_endpoint_manager, *args, **kwargs) else: - result = _ExecuteFunction(function, *args, **kwargs) + result = ExecuteFunction(function, *args, **kwargs) if not client.last_response_headers: client.last_response_headers = {} @@ -94,7 +94,7 @@ def _Execute(client, global_endpoint_manager, function, *args, **kwargs): # Wait for retry_after_in_milliseconds time before the next retry time.sleep(retry_policy.retry_after_in_milliseconds / 1000.0) -def _ExecuteFunction(function, *args, **kwargs): +def ExecuteFunction(function, *args, **kwargs): """ Stub method so that it can be used for mocking purposes as well. """ return function(*args, **kwargs) \ No newline at end of file diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/__init__.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/__init__.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/routing/__init__.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_routing/__init__.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/collection_routing_map.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/collection_routing_map.py similarity index 79% rename from sdk/cosmos/azure-cosmos/azure/cosmos/routing/collection_routing_map.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_routing/collection_routing_map.py index bb030c3fc223..d1f86eb05b89 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/collection_routing_map.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/collection_routing_map.py @@ -23,11 +23,11 @@ """ import bisect -from azure.cosmos.routing import routing_range -from azure.cosmos.routing.routing_range import _PartitionKeyRange +from azure.cosmos._routing import routing_range +from azure.cosmos._routing.routing_range import PartitionKeyRange from six.moves import xrange -class _CollectionRoutingMap(object): +class CollectionRoutingMap(object): """Stores partition key ranges in an efficient way with some additional information and provides convenience methods for working with set of ranges. """ @@ -40,7 +40,7 @@ def __init__(self, range_by_id, range_by_info, ordered_partition_key_ranges, ord self._rangeByInfo = range_by_info self._orderedPartitionKeyRanges = ordered_partition_key_ranges - self._orderedRanges = [routing_range._Range(pkr[_PartitionKeyRange.MinInclusive], pkr[_PartitionKeyRange.MaxExclusive], True, False) for pkr in ordered_partition_key_ranges] + self._orderedRanges = [routing_range.Range(pkr[PartitionKeyRange.MinInclusive], pkr[PartitionKeyRange.MaxExclusive], True, False) for pkr in ordered_partition_key_ranges] self._orderedPartitionInfo = ordered_partition_info self._collectionUniqueId = collection_unique_id @@ -51,15 +51,15 @@ def CompleteRoutingMap(cls, partition_key_range_info_tupple_list, collection_uni sortedRanges = [] for r in partition_key_range_info_tupple_list: - rangeById[r[0][_PartitionKeyRange.Id]] = r + rangeById[r[0][PartitionKeyRange.Id]] = r rangeByInfo[r[1]] = r[0] sortedRanges.append(r) - sortedRanges.sort(key = lambda r: r[0][_PartitionKeyRange.MinInclusive]) + sortedRanges.sort(key = lambda r: r[0][PartitionKeyRange.MinInclusive]) partitionKeyOrderedRange = [r[0] for r in sortedRanges] orderedPartitionInfo = [r[1] for r in sortedRanges] - if not _CollectionRoutingMap.is_complete_set_of_range(partitionKeyOrderedRange): return None + if not CollectionRoutingMap.is_complete_set_of_range(partitionKeyOrderedRange): return None return cls(rangeById, rangeByInfo, partitionKeyOrderedRange, orderedPartitionInfo, collection_unique_id) def get_ordered_partition_key_ranges(self): @@ -80,10 +80,10 @@ def get_range_by_effective_partition_key(self, effective_partition_key_value): The partition key range. :rtype: dict """ - if _CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey == effective_partition_key_value: + if CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey == effective_partition_key_value: return self._orderedPartitionKeyRanges[0] - if _CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey == effective_partition_key_value: + if CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey == effective_partition_key_value: return None sortedLow = [(r.min, not r.isMinInclusive) for r in self._orderedRanges] @@ -118,7 +118,7 @@ def get_overlapping_ranges(self, provided_partition_key_ranges): :rtype: list """ - if isinstance(provided_partition_key_ranges, routing_range._Range): + if isinstance(provided_partition_key_ranges, routing_range.Range): return self.get_overlapping_ranges([provided_partition_key_ranges]) minToPartitionRange = {} @@ -135,14 +135,14 @@ def get_overlapping_ranges(self, provided_partition_key_ranges): maxIndex = maxIndex - 1 for i in xrange(minIndex, maxIndex + 1): - if routing_range._Range.overlaps(self._orderedRanges[i], providedRange): - minToPartitionRange[self._orderedPartitionKeyRanges[i][_PartitionKeyRange.MinInclusive]] = self._orderedPartitionKeyRanges[i] + if routing_range.Range.overlaps(self._orderedRanges[i], providedRange): + minToPartitionRange[self._orderedPartitionKeyRanges[i][PartitionKeyRange.MinInclusive]] = self._orderedPartitionKeyRanges[i] overlapping_partition_key_ranges = list(minToPartitionRange.values()) def getKey(r): - return r[_PartitionKeyRange.MinInclusive] + return r[PartitionKeyRange.MinInclusive] overlapping_partition_key_ranges.sort(key = getKey) return overlapping_partition_key_ranges @@ -153,16 +153,16 @@ def is_complete_set_of_range(ordered_partition_key_range_list): firstRange = ordered_partition_key_range_list[0] lastRange = ordered_partition_key_range_list[-1] - isComplete = (firstRange[_PartitionKeyRange.MinInclusive] == _CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey) - isComplete &= (lastRange[_PartitionKeyRange.MaxExclusive] == _CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey) + isComplete = (firstRange[PartitionKeyRange.MinInclusive] == CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey) + isComplete &= (lastRange[PartitionKeyRange.MaxExclusive] == CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey) for i in range(1, len(ordered_partition_key_range_list)): previousRange = ordered_partition_key_range_list[i - 1] currentRange = ordered_partition_key_range_list[i] - isComplete &= previousRange[_PartitionKeyRange.MaxExclusive] == currentRange[_PartitionKeyRange.MinInclusive] + isComplete &= previousRange[PartitionKeyRange.MaxExclusive] == currentRange[PartitionKeyRange.MinInclusive] if not isComplete: - if previousRange[_PartitionKeyRange.MaxExclusive] > currentRange[_PartitionKeyRange.MinInclusive]: + if previousRange[PartitionKeyRange.MaxExclusive] > currentRange[PartitionKeyRange.MinInclusive]: raise ValueError("Ranges overlap") break diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_map_provider.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_map_provider.py similarity index 80% rename from sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_map_provider.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_map_provider.py index 73c9ed56529d..7b371e97e2d3 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_map_provider.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_map_provider.py @@ -22,14 +22,14 @@ """Internal class for partition key range cache implementation in the Azure Cosmos database service. """ -from .. import base -from .collection_routing_map import _CollectionRoutingMap +from .. import _base +from .collection_routing_map import CollectionRoutingMap from . import routing_range -from .routing_range import _PartitionKeyRange +from .routing_range import PartitionKeyRange -class _PartitionKeyRangeCache(object): +class PartitionKeyRangeCache(object): ''' - _PartitionKeyRangeCache provides list of effective partition key ranges for a collection. + PartitionKeyRangeCache provides list of effective partition key ranges for a collection. This implementation loads and caches the collection routing map per collection on demand. ''' @@ -59,7 +59,7 @@ def get_overlapping_ranges(self, collection_link, partition_key_ranges): ''' cl = self._documentClient - collection_id = base.GetResourceIdOrFullNameFromLink(collection_link) + collection_id = _base.GetResourceIdOrFullNameFromLink(collection_link) collection_routing_map = self._collection_routing_map_by_item.get(collection_id) if collection_routing_map is None: @@ -67,8 +67,8 @@ def get_overlapping_ranges(self, collection_link, partition_key_ranges): # for large collections, a split may complete between the read partition key ranges query page responses, # causing the partitionKeyRanges to have both the children ranges and their parents. Therefore, we need # to discard the parent ranges to have a valid routing map. - collection_pk_ranges = _PartitionKeyRangeCache._discard_parent_ranges(collection_pk_ranges) - collection_routing_map = _CollectionRoutingMap.CompleteRoutingMap([(r, True) for r in collection_pk_ranges], collection_id) + collection_pk_ranges = PartitionKeyRangeCache._discard_parent_ranges(collection_pk_ranges) + collection_routing_map = CollectionRoutingMap.CompleteRoutingMap([(r, True) for r in collection_pk_ranges], collection_id) self._collection_routing_map_by_item[collection_id] = collection_routing_map return collection_routing_map.get_overlapping_ranges(partition_key_ranges) @@ -76,17 +76,17 @@ def get_overlapping_ranges(self, collection_link, partition_key_ranges): def _discard_parent_ranges(partitionKeyRanges): parentIds = set() for r in partitionKeyRanges: - if isinstance(r, dict) and _PartitionKeyRange.Parents in r: - for parentId in r[_PartitionKeyRange.Parents]: + if isinstance(r, dict) and PartitionKeyRange.Parents in r: + for parentId in r[PartitionKeyRange.Parents]: parentIds.add(parentId) - return (r for r in partitionKeyRanges if r[_PartitionKeyRange.Id] not in parentIds) + return (r for r in partitionKeyRanges if r[PartitionKeyRange.Id] not in parentIds) -class _SmartRoutingMapProvider(_PartitionKeyRangeCache): +class SmartRoutingMapProvider(PartitionKeyRangeCache): """ - Efficiently uses PartitionKeyRangeCach and minimizes the unnecessary invocation of _CollectionRoutingMap.get_overlapping_ranges() + Efficiently uses PartitionKeyRangeCach and minimizes the unnecessary invocation of CollectionRoutingMap.get_overlapping_ranges() """ def __init__(self, client): - super(_SmartRoutingMapProvider, self).__init__(client) + super(SmartRoutingMapProvider, self).__init__(client) def _second_range_is_after_first_range(self, range1, range2): @@ -112,20 +112,20 @@ def _subtract_range(self, r, partition_key_range): Evaluates and returns r - partition_key_range :param dict partition_key_range: Partition key range. - :param routing_range._Range r: query range. + :param routing_range.Range r: query range. :return: The subtract r - partition_key_range. - :rtype: routing_range._Range + :rtype: routing_range.Range """ - left = max(partition_key_range[routing_range._PartitionKeyRange.MaxExclusive], r.min) + left = max(partition_key_range[routing_range.PartitionKeyRange.MaxExclusive], r.min) if left == r.min: leftInclusive = r.isMinInclusive else: leftInclusive = False - queryRange = routing_range._Range(left, r.max, leftInclusive, + queryRange = routing_range.Range(left, r.max, leftInclusive, r.isMaxInclusive) return queryRange @@ -136,7 +136,7 @@ def get_overlapping_ranges(self, collection_link, sorted_ranges): :param str collection_link: The collection link. - :param (list of routing_range._Range) sorted_ranges: The sorted list of non-overlapping ranges. + :param (list of routing_range.Range) sorted_ranges: The sorted list of non-overlapping ranges. :return: List of partition key ranges. :rtype: list of dict @@ -163,11 +163,11 @@ def get_overlapping_ranges(self, collection_link, sorted_ranges): else: queryRange = currentProvidedRange - overlappingRanges = _PartitionKeyRangeCache.get_overlapping_ranges(self, collection_link, queryRange) + overlappingRanges = PartitionKeyRangeCache.get_overlapping_ranges(self, collection_link, queryRange) assert len(overlappingRanges), ("code bug: returned overlapping ranges for queryRange {} is empty".format(queryRange)) target_partition_key_ranges.extend(overlappingRanges) - lastKnownTargetRange = routing_range._Range.PartitionKeyRangeToRange(target_partition_key_ranges[-1]) + lastKnownTargetRange = routing_range.Range.PartitionKeyRangeToRange(target_partition_key_ranges[-1]) # the overlapping ranges must contain the requested range assert currentProvidedRange.max <= lastKnownTargetRange.max, "code bug: returned overlapping ranges {} does not contain the requested range {}".format(overlappingRanges, queryRange) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_range.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_range.py similarity index 89% rename from sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_range.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_range.py index f2ca0d76e148..fa0678f5b57c 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/routing/routing_range.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_range.py @@ -22,14 +22,14 @@ """Internal class for partition key range implementation in the Azure Cosmos database service. """ -class _PartitionKeyRange(object): +class PartitionKeyRange(object): """Partition Key Range Constants""" MinInclusive = 'minInclusive' MaxExclusive = 'maxExclusive' Id = 'id' Parents = 'parents' -class _Range(object): +class Range(object): """description of class""" MinPath = 'min' @@ -58,13 +58,13 @@ def contains(self, value): @classmethod def PartitionKeyRangeToRange(cls, partition_key_range): - self = cls(partition_key_range[_PartitionKeyRange.MinInclusive], partition_key_range[_PartitionKeyRange.MaxExclusive], + self = cls(partition_key_range[PartitionKeyRange.MinInclusive], partition_key_range[PartitionKeyRange.MaxExclusive], True, False) return self @classmethod def ParseFromDict(cls, range_as_dict): - self = cls(range_as_dict[_Range.MinPath], range_as_dict[_Range.MaxPath], range_as_dict[_Range.IsMinInclusivePath], range_as_dict[_Range.IsMaxInclusivePath]) + self = cls(range_as_dict[Range.MinPath], range_as_dict[Range.MaxPath], range_as_dict[Range.IsMinInclusivePath], range_as_dict[Range.IsMaxInclusivePath]) return self def isSingleValue(self): @@ -97,8 +97,8 @@ def overlaps(range1, range2): if range1 is None or range2 is None: return False if range1.isEmpty() or range2.isEmpty(): return False - cmp1 = _Range._compare_helper(range1.min, range2.max) - cmp2 = _Range._compare_helper(range2.min, range1.max) + cmp1 = Range._compare_helper(range1.min, range2.max) + cmp2 = Range._compare_helper(range2.min, range1.max) if (cmp1 <= 0 or cmp2 <= 0): if ((cmp1 == 0 and not(range1.isMinInclusive and range2.isMaxInclusive)) or (cmp2 == 0 and not(range2.isMinInclusive and range1.isMaxInclusive))): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/runtime_constants.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_runtime_constants.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/runtime_constants.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_runtime_constants.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/session.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_session.py similarity index 95% rename from sdk/cosmos/azure-cosmos/azure/cosmos/session.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_session.py index 38eece56dec2..fe7c35cdf9d6 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/session.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_session.py @@ -25,9 +25,9 @@ import sys, traceback import threading -from . import base +from . import _base from . import http_constants -from .vector_session_token import VectorSessionToken +from ._vector_session_token import VectorSessionToken from .errors import HTTPFailure class SessionContainer(object): @@ -51,17 +51,17 @@ def get_session_token(self, resource_path): """ with self.session_lock: - is_name_based = base.IsNameBased(resource_path) + is_name_based = _base.IsNameBased(resource_path) collection_rid = '' session_token = '' try: if is_name_based: # get the collection name - collection_name = base.GetItemContainerLink(resource_path) + collection_name = _base.GetItemContainerLink(resource_path) collection_rid = self.collection_name_to_rid[collection_name] else: - collection_rid = base.GetItemContainerLink(resource_path) + collection_rid = _base.GetItemContainerLink(resource_path) if collection_rid in self.rid_to_session_token: token_dict = self.rid_to_session_token[collection_rid] @@ -112,7 +112,7 @@ def set_session_token(self, response_result, response_headers): response_result_id = response_result[response_result_id_key] else: return - collection_rid, collection_name = base.GetItemContainerInfo(self_link, alt_content_path, response_result_id) + collection_rid, collection_name = _base.GetItemContainerInfo(self_link, alt_content_path, response_result_id) except ValueError: return diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/session_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_session_retry_policy.py similarity index 100% rename from sdk/cosmos/azure-cosmos/azure/cosmos/session_retry_policy.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_session_retry_policy.py diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/synchronized_request.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_synchronized_request.py similarity index 98% rename from sdk/cosmos/azure-cosmos/azure/cosmos/synchronized_request.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_synchronized_request.py index 9538a993580c..2ba8c1b2cdd8 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/synchronized_request.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_synchronized_request.py @@ -30,7 +30,7 @@ from . import documents from . import errors from . import http_constants -from . import retry_utility +from . import _retry_utility def _IsReadableStream(obj): """Checks whether obj is a file-like readable stream. @@ -224,5 +224,5 @@ def SynchronizedRequest(client, request_options['headers'][http_constants.HttpHeaders.ContentLength] = 0 # Pass _Request function with it's parameters to retry_utility's Execute method that wraps the call with retries - return retry_utility._Execute(client, global_endpoint_manager, _Request, request, connection_policy, requests_session, path, request_options, request_body) + return _retry_utility.Execute(client, global_endpoint_manager, _Request, request, connection_policy, requests_session, path, request_options, request_body) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/utils.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_utils.py similarity index 86% rename from sdk/cosmos/azure-cosmos/azure/cosmos/utils.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_utils.py index e20216199ef5..8178ef426084 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/utils.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_utils.py @@ -26,17 +26,17 @@ import re as re from . import http_constants -def _get_user_agent(): - os_name = _safe_user_agent_header(platform.system()) - os_version = _safe_user_agent_header(platform.release()) - python_version = _safe_user_agent_header(platform.python_version()) +def get_user_agent(): + os_name = safe_user_agent_header(platform.system()) + os_version = safe_user_agent_header(platform.release()) + python_version = safe_user_agent_header(platform.python_version()) user_agent = "{}/{} Python/{} {}/{}".format(os_name, os_version, python_version, http_constants.Versions.SDKName, http_constants.Versions.SDKVersion) return user_agent -def _safe_user_agent_header(s): +def safe_user_agent_header(s): if s is None: s = "unknown" # remove all white spaces diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/vector_session_token.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_vector_session_token.py similarity index 99% rename from sdk/cosmos/azure-cosmos/azure/cosmos/vector_session_token.py rename to sdk/cosmos/azure-cosmos/azure/cosmos/_vector_session_token.py index 1dfee1974e6b..d2cd6920fc1c 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/vector_session_token.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_vector_session_token.py @@ -23,7 +23,6 @@ """ from . import errors -from . import base from .http_constants import StatusCodes class VectorSessionToken(object): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/container.py b/sdk/cosmos/azure-cosmos/azure/cosmos/container.py index 8326d5224260..7d2b9fd35795 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/container.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/container.py @@ -23,12 +23,12 @@ """ import six -from .cosmos_client_connection import CosmosClientConnection +from ._cosmos_client_connection import CosmosClientConnection from .errors import HTTPFailure from .http_constants import StatusCodes from .offer import Offer from .scripts import Scripts -from .query_iterable import QueryIterable +from ._query_iterable import QueryIterable from .partition_key import NonePartitionKeyValue from typing import ( Any, @@ -222,7 +222,7 @@ def read_all_items( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of items (dicts). + :returns: An Iterable of items (dicts). """ if not feed_options: feed_options = {} # type: Dict[str, Any] @@ -264,7 +264,7 @@ def query_items_change_feed( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of items (dicts). + :returns: An Iterable of items (dicts). """ if not feed_options: @@ -317,7 +317,7 @@ def query_items( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of items (dicts). + :returns: An Iterable of items (dicts). You can use any value for the container name in the FROM clause, but typically the container name is used. In the examples below, the container name is "products," and is aliased as "p" for easier referencing @@ -675,7 +675,7 @@ def read_all_conflicts( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of conflicts (dicts). + :returns: An Iterable of conflicts (dicts). """ if not feed_options: @@ -712,7 +712,7 @@ def query_conflicts( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of conflicts (dicts). + :returns: An Iterable of conflicts (dicts). """ if not feed_options: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client.py b/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client.py index f1de1976f98a..a4d5ff828734 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client.py @@ -23,10 +23,10 @@ """ import six -from .cosmos_client_connection import CosmosClientConnection +from ._cosmos_client_connection import CosmosClientConnection from .database import Database from .documents import ConnectionPolicy, DatabaseAccount -from .query_iterable import QueryIterable +from ._query_iterable import QueryIterable from typing import ( Any, Callable, @@ -184,7 +184,7 @@ def read_all_databases( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of database properties (dicts). + :returns: An Iterable of database properties (dicts). """ if not feed_options: @@ -231,7 +231,7 @@ def query_databases( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of database properties (dicts). + :returns: An Iterable of database properties (dicts). """ if not feed_options: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/database.py b/sdk/cosmos/azure-cosmos/azure/cosmos/database.py index 68ef288106e5..21df096ca050 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/database.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/database.py @@ -23,13 +23,13 @@ """ import six -from .cosmos_client_connection import CosmosClientConnection +from ._cosmos_client_connection import CosmosClientConnection from .container import Container from .offer import Offer from .http_constants import StatusCodes from .errors import HTTPFailure from .user import User -from .query_iterable import QueryIterable +from ._query_iterable import QueryIterable from .partition_key import PartitionKey from typing import ( @@ -332,7 +332,7 @@ def read_all_containers( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of container properties (dicts). + :returns: An Iterable of container properties (dicts). .. literalinclude:: ../../examples/examples.py :start-after: [START list_containers] @@ -385,7 +385,7 @@ def query_containers( :param populate_query_metrics: Enable returning query metrics in response headers. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of container properties (dicts). + :returns: An Iterable of container properties (dicts). """ if not feed_options: @@ -503,7 +503,7 @@ def read_all_users( :param max_item_count: Max number of users to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of user properties (dicts). + :returns: An Iterable of user properties (dicts). """ if not feed_options: @@ -536,7 +536,7 @@ def query_users( :param max_item_count: Max number of users to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of user properties (dicts). + :returns: An Iterable of user properties (dicts). """ if not feed_options: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/documents.py b/sdk/cosmos/azure-cosmos/azure/cosmos/documents.py index fc45f5157dfc..33be86d9004f 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/documents.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/documents.py @@ -22,7 +22,7 @@ """AzureDocument classes and enums for the Azure Cosmos database service. """ -from . import retry_options +from . import _retry_options class DatabaseAccount(object): """Database account. A DatabaseAccount is the container for databases. @@ -368,7 +368,7 @@ def __init__(self): self.ProxyConfiguration = None self.EnableEndpointDiscovery = True self.PreferredLocations = [] - self.RetryOptions = retry_options.RetryOptions() + self.RetryOptions = _retry_options.RetryOptions() self.DisableSSLVerification = False self.UseMultipleWriteLocations = False diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/scripts.py b/sdk/cosmos/azure-cosmos/azure/cosmos/scripts.py index 7487c36a4d3b..52f9ccfdd6e3 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/scripts.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/scripts.py @@ -23,9 +23,9 @@ """ import six -from azure.cosmos.cosmos_client_connection import CosmosClientConnection +from azure.cosmos._cosmos_client_connection import CosmosClientConnection from .partition_key import NonePartitionKeyValue -from.query_iterable import QueryIterable +from ._query_iterable import QueryIterable from typing import ( Any, List, @@ -64,7 +64,7 @@ def list_stored_procedures( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of stored procedures (dicts). + :returns: An Iterable of stored procedures (dicts). """ if not feed_options: @@ -91,7 +91,7 @@ def query_stored_procedures( :param parameters: Optional array of parameters to the query. Ignored if no query is provided. :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of stored procedures (dicts). + :returns: An Iterable of stored procedures (dicts). """ if not feed_options: @@ -246,7 +246,7 @@ def list_triggers( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of triggers (dicts). + :returns: An Iterable of triggers (dicts). """ if not feed_options: @@ -273,7 +273,7 @@ def query_triggers( :param parameters: Optional array of parameters to the query. Ignored if no query is provided. :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of triggers (dicts). + :returns: An Iterable of triggers (dicts). """ if not feed_options: @@ -394,7 +394,7 @@ def list_user_defined_functions( :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of user defined functions (dicts). + :returns: An Iterable of user defined functions (dicts). """ if not feed_options: @@ -421,7 +421,7 @@ def query_user_defined_functions( :param parameters: Optional array of parameters to the query. Ignored if no query is provided. :param max_item_count: Max number of items to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. - :returns: A :class:`QueryIterable` instance representing an iterable of user defined functions (dicts). + :returns: An Iterable of user defined functions (dicts). """ if not feed_options: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/user.py b/sdk/cosmos/azure-cosmos/azure/cosmos/user.py index f7c212c56c27..9b1eaf39236b 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/user.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/user.py @@ -23,7 +23,7 @@ """ import six -from .cosmos_client_connection import CosmosClientConnection +from ._cosmos_client_connection import CosmosClientConnection from typing import ( Any, List, @@ -99,7 +99,7 @@ def read_all_permissions( :param max_item_count: Max number of permissions to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of permissions (dicts). + :returns: An Iterable of permissions (dicts). """ if not feed_options: @@ -133,7 +133,7 @@ def query_permissions( :param max_item_count: Max number of permissions to be returned in the enumeration operation. :param feed_options: Dictionary of additional properties to be used for the request. :param response_hook: a callable invoked with the response metadata - :returns: A :class:`QueryIterable` instance representing an iterable of permissions (dicts). + :returns: An Iterable of permissions (dicts). """ if not feed_options: diff --git a/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/ConflictWorker.py b/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/ConflictWorker.py index 52f31029be52..a714278dc71d 100644 --- a/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/ConflictWorker.py +++ b/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/ConflictWorker.py @@ -4,7 +4,6 @@ import json import azure.cosmos.errors as errors from azure.cosmos.http_constants import StatusCodes -import azure.cosmos.base as base class ConflictWorker(object): def __init__(self, database_name, basic_collection_name, manual_collection_name, lww_collection_name, udp_collection_name): diff --git a/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/MultiMasterScenario.py b/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/MultiMasterScenario.py index 8b36c27ba0fe..8b97f0899838 100644 --- a/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/MultiMasterScenario.py +++ b/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/MultiMasterScenario.py @@ -3,7 +3,7 @@ from Worker import Worker from multiprocessing.pool import ThreadPool import azure.cosmos.documents as documents -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection class MultiMasterScenario(object): def __init__(self): diff --git a/sdk/cosmos/azure-cosmos/test/base_unit_tests.py b/sdk/cosmos/azure-cosmos/test/base_unit_tests.py index 2dd41a646231..cd0082c5582e 100644 --- a/sdk/cosmos/azure-cosmos/test/base_unit_tests.py +++ b/sdk/cosmos/azure-cosmos/test/base_unit_tests.py @@ -1,6 +1,6 @@ import unittest import pytest -import azure.cosmos.base as base +import azure.cosmos._base as base pytestmark = pytest.mark.cosmosEmulator diff --git a/sdk/cosmos/azure-cosmos/test/crud_tests.py b/sdk/cosmos/azure-cosmos/test/crud_tests.py index 12f1d53df464..77a20f52709c 100644 --- a/sdk/cosmos/azure-cosmos/test/crud_tests.py +++ b/sdk/cosmos/azure-cosmos/test/crud_tests.py @@ -41,18 +41,18 @@ import urllib.parse as urllib import uuid import pytest -import azure.cosmos.consistent_hash_ring as consistent_hash_ring +from azure.cosmos import _consistent_hash_ring import azure.cosmos.documents as documents import azure.cosmos.errors as errors from azure.cosmos.http_constants import HttpHeaders, StatusCodes, SubStatusCodes -import azure.cosmos.murmur_hash as murmur_hash +import azure.cosmos._murmur_hash as _murmur_hash import test_config -import azure.cosmos.base as base +import azure.cosmos._base as base import azure.cosmos.cosmos_client as cosmos_client from azure.cosmos.diagnostics import RecordDiagnostics from azure.cosmos.partition_key import PartitionKey import conftest -import azure.cosmos.retry_utility as retry_utility +from azure.cosmos import _retry_utility pytestmark = pytest.mark.cosmosEmulator @@ -298,11 +298,11 @@ def test_partitioned_collection_partition_key_extraction(self): } } - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction # create document without partition key being specified created_document = created_collection.create_item(body=document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction self.assertEquals(self.last_headers[1], '["WA"]') del self.last_headers[:] @@ -315,11 +315,11 @@ def test_partitioned_collection_partition_key_extraction(self): partition_key=PartitionKey(path='/address', kind=documents.PartitionKind.Hash) ) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction # Create document with partitionkey not present as a leaf level property but a dict created_document = created_collection1.create_item(document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction self.assertEquals(self.last_headers[1], [{}]) del self.last_headers[:] @@ -331,11 +331,11 @@ def test_partitioned_collection_partition_key_extraction(self): partition_key=PartitionKey(path='/address/state/city', kind=documents.PartitionKind.Hash) ) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction # Create document with partitionkey not present in the document created_document = created_collection2.create_item(document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction self.assertEquals(self.last_headers[1], [{}]) del self.last_headers[:] @@ -358,10 +358,10 @@ def test_partitioned_collection_partition_key_extraction_special_chars(self): "level' 1*()": {"le/vel2": 'val1'} } - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction created_document = created_collection1.create_item(body=document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction self.assertEquals(self.last_headers[1], '["val1"]') del self.last_headers[:] @@ -385,11 +385,11 @@ def test_partitioned_collection_partition_key_extraction_special_chars(self): 'level\" 1*()': {'le/vel2': 'val2'} } - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction # create document without partition key being specified created_document = created_collection2.create_item(body=document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction self.assertEquals(self.last_headers[1], '["val2"]') del self.last_headers[:] @@ -851,13 +851,13 @@ def test_murmur_hash(self): str = 'afdgdd' bytes = bytearray(str, encoding='utf-8') - hash_value = murmur_hash._MurmurHash._ComputeHash(bytes) + hash_value = _murmur_hash.MurmurHash._ComputeHash(bytes) self.assertEqual(1099701186, hash_value) num = 374.0 bytes = bytearray(pack('d', num)) - hash_value = murmur_hash._MurmurHash._ComputeHash(bytes) + hash_value = _murmur_hash.MurmurHash._ComputeHash(bytes) self.assertEqual(3717946798, hash_value) self._validate_bytes("", 0x1B873593, bytearray(b'\xEE\xA8\xA2\x67'), 1738713326) @@ -878,25 +878,25 @@ def test_murmur_hash(self): 3381504877) def _validate_bytes(self, str, seed, expected_hash_bytes, expected_value): - hash_value = murmur_hash._MurmurHash._ComputeHash(bytearray(str, encoding='utf-8'), seed) + hash_value = _murmur_hash.MurmurHash._ComputeHash(bytearray(str, encoding='utf-8'), seed) bytes = bytearray(pack('I', hash_value)) self.assertEqual(expected_value, hash_value) self.assertEqual(expected_hash_bytes, bytes) def test_get_bytes(self): - actual_bytes = consistent_hash_ring._ConsistentHashRing._GetBytes("documentdb") + actual_bytes = _consistent_hash_ring.ConsistentHashRing._GetBytes("documentdb") expected_bytes = bytearray(b'\x64\x6F\x63\x75\x6D\x65\x6E\x74\x64\x62') self.assertEqual(expected_bytes, actual_bytes) - actual_bytes = consistent_hash_ring._ConsistentHashRing._GetBytes("azure") + actual_bytes = _consistent_hash_ring.ConsistentHashRing._GetBytes("azure") expected_bytes = bytearray(b'\x61\x7A\x75\x72\x65') self.assertEqual(expected_bytes, actual_bytes) - actual_bytes = consistent_hash_ring._ConsistentHashRing._GetBytes("json") + actual_bytes = _consistent_hash_ring.ConsistentHashRing._GetBytes("json") expected_bytes = bytearray(b'\x6A\x73\x6F\x6E') self.assertEqual(expected_bytes, actual_bytes) - actual_bytes = consistent_hash_ring._ConsistentHashRing._GetBytes("nosql") + actual_bytes = _consistent_hash_ring.ConsistentHashRing._GetBytes("nosql") expected_bytes = bytearray(b'\x6E\x6F\x73\x71\x6C') self.assertEqual(expected_bytes, actual_bytes) diff --git a/sdk/cosmos/azure-cosmos/test/globaldb_mock_tests.py b/sdk/cosmos/azure-cosmos/test/globaldb_mock_tests.py index c387000390d9..5c07812625bf 100644 --- a/sdk/cosmos/azure-cosmos/test/globaldb_mock_tests.py +++ b/sdk/cosmos/azure-cosmos/test/globaldb_mock_tests.py @@ -23,13 +23,13 @@ import json import pytest -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection import azure.cosmos.documents as documents import azure.cosmos.errors as errors -import azure.cosmos.constants as constants +import azure.cosmos._constants as constants from azure.cosmos.http_constants import StatusCodes -import azure.cosmos.global_endpoint_manager as global_endpoint_manager -import azure.cosmos.retry_utility as retry_utility +import azure.cosmos._global_endpoint_manager as global_endpoint_manager +from azure.cosmos import _retry_utility import test_config pytestmark = pytest.mark.cosmosEmulator @@ -132,7 +132,7 @@ def setUp(self): # Copying the original objects and functions before assigning the mock versions of them self.OriginalGetDatabaseAccountStub = global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub self.OriginalGlobalEndpointManager = global_endpoint_manager._GlobalEndpointManager - self.OriginalExecuteFunction = retry_utility._ExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction # Make azure-cosmos use the MockGlobalEndpointManager global_endpoint_manager._GlobalEndpointManager = MockGlobalEndpointManager @@ -141,13 +141,13 @@ def tearDown(self): # Restoring the original objects and functions global_endpoint_manager._GlobalEndpointManager = self.OriginalGlobalEndpointManager global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = self.OriginalGetDatabaseAccountStub - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def MockExecuteFunction(self, function, *args, **kwargs): global location_changed if self.endpoint_discovery_retry_count == 2: - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction return (json.dumps([{ 'id': 'mock database' }]), None) else: self.endpoint_discovery_retry_count += 1 @@ -158,8 +158,8 @@ def MockGetDatabaseAccountStub(self, endpoint): raise errors.HTTPFailure(StatusCodes.SERVICE_UNAVAILABLE, "Service unavailable") def MockCreateDatabase(self, client, database): - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self.MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self.MockExecuteFunction client.CreateDatabase(database) def test_globaldb_endpoint_discovery_retry_policy(self): diff --git a/sdk/cosmos/azure-cosmos/test/globaldb_tests.py b/sdk/cosmos/azure-cosmos/test/globaldb_tests.py index 5241118dbfa7..e0e8eb41db7e 100644 --- a/sdk/cosmos/azure-cosmos/test/globaldb_tests.py +++ b/sdk/cosmos/azure-cosmos/test/globaldb_tests.py @@ -26,12 +26,12 @@ import time import pytest -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection import azure.cosmos.documents as documents import azure.cosmos.errors as errors -import azure.cosmos.global_endpoint_manager as global_endpoint_manager -import azure.cosmos.endpoint_discovery_retry_policy as endpoint_discovery_retry_policy -import azure.cosmos.retry_utility as retry_utility +import azure.cosmos._global_endpoint_manager as global_endpoint_manager +from azure.cosmos import _endpoint_discovery_retry_policy +from azure.cosmos import _retry_utility from azure.cosmos.http_constants import HttpHeaders, StatusCodes, SubStatusCodes import test_config @@ -359,8 +359,8 @@ def test_globaldb_locational_endpoint_parser(self): def test_globaldb_endpoint_discovery_retry_policy_mock(self): client = cosmos_client_connection.CosmosClientConnection(Test_globaldb_tests.host, {'masterKey': Test_globaldb_tests.masterKey}) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction self.OriginalGetDatabaseAccount = client.GetDatabaseAccount client.GetDatabaseAccount = self._MockGetDatabaseAccount @@ -368,8 +368,8 @@ def test_globaldb_endpoint_discovery_retry_policy_mock(self): max_retry_attempt_count = 10 retry_after_in_milliseconds = 500 - endpoint_discovery_retry_policy._EndpointDiscoveryRetryPolicy.Max_retry_attempt_count = max_retry_attempt_count - endpoint_discovery_retry_policy._EndpointDiscoveryRetryPolicy.Retry_after_in_milliseconds = retry_after_in_milliseconds + _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy.Max_retry_attempt_count = max_retry_attempt_count + _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy.Retry_after_in_milliseconds = retry_after_in_milliseconds document_definition = { 'id': 'doc', 'name': 'sample document', @@ -382,7 +382,7 @@ def test_globaldb_endpoint_discovery_retry_policy_mock(self): self.test_coll['_self'], document_definition) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def _MockExecuteFunction(self, function, *args, **kwargs): raise errors.HTTPFailure(StatusCodes.FORBIDDEN, "Write Forbidden", {'x-ms-substatus' : SubStatusCodes.WRITE_FORBIDDEN}) diff --git a/sdk/cosmos/azure-cosmos/test/location_cache_tests.py b/sdk/cosmos/azure-cosmos/test/location_cache_tests.py index 22e2689cded4..a2772ce270e8 100644 --- a/sdk/cosmos/azure-cosmos/test/location_cache_tests.py +++ b/sdk/cosmos/azure-cosmos/test/location_cache_tests.py @@ -4,13 +4,13 @@ from time import sleep from azure.cosmos.http_constants import ResourceType -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection import azure.cosmos.documents as documents -from azure.cosmos.request_object import _RequestObject -from azure.cosmos.location_cache import LocationCache +from azure.cosmos._request_object import RequestObject +from azure.cosmos._location_cache import LocationCache import azure.cosmos.errors as errors from azure.cosmos.http_constants import StatusCodes, SubStatusCodes, HttpHeaders -import azure.cosmos.retry_utility as retry_utility +from azure.cosmos import _retry_utility import six pytestmark = pytest.mark.cosmosEmulator @@ -74,8 +74,8 @@ def test_validate_retry_on_session_not_availabe_with_disable_multiple_write_loca def validate_retry_on_session_not_availabe_with_endpoint_discovery_disabled(self, is_preferred_locations_list_empty, use_multiple_write_locations, is_read_request): self.counter = 0 - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunctionSessionReadFailureOnce + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunctionSessionReadFailureOnce self.original_get_database_account = cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount = self.mock_create_db_with_flag_enabled if use_multiple_write_locations else self.mock_create_db_with_flag_disabled enable_endpoint_discovery = False @@ -95,7 +95,7 @@ def validate_retry_on_session_not_availabe_with_endpoint_discovery_disabled(self self.assertEqual(e.sub_status, SubStatusCodes.READ_SESSION_NOTAVAILABLE) cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount = self.original_get_database_account - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def _MockExecuteFunctionSessionReadFailureOnce(self, function, *args, **kwargs): self.counter += 1 @@ -116,8 +116,8 @@ def test_validate_retry_on_session_not_availabe_with_endpoint_discovery_enabled( def validate_retry_on_session_not_availabe(self, is_preferred_locations_list_empty, use_multiple_write_locations): self.counter = 0 - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunctionSessionReadFailureTwice + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunctionSessionReadFailureTwice self.original_get_database_account = cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount = self.mock_create_db_with_flag_enabled if use_multiple_write_locations else self.mock_create_db_with_flag_disabled @@ -136,7 +136,7 @@ def validate_retry_on_session_not_availabe(self, is_preferred_locations_list_emp self.assertEqual(e.sub_status, SubStatusCodes.READ_SESSION_NOTAVAILABLE) cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount = self.original_get_database_account - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def _MockExecuteFunctionSessionReadFailureTwice(self, function, *args, **kwargs): request = args[1] @@ -376,11 +376,11 @@ def validate_request_endpoint_resolution(self, use_multiple_write_locations, end def resolve_endpoint_for_read_request(self, master_resource_type): operation_type = documents._OperationType.Read resource_type = ResourceType.Database if master_resource_type else ResourceType.Document - request = _RequestObject(resource_type, operation_type) + request = RequestObject(resource_type, operation_type) return self.location_cache.resolve_service_endpoint(request) def resolve_endpoint_for_write_request(self, resource_type, use_alternate_write_endpoint): operation_type = documents._OperationType.Create - request = _RequestObject(resource_type, operation_type) + request = RequestObject(resource_type, operation_type) request.route_to_location_with_preferred_location_flag(1 if use_alternate_write_endpoint else 0, ResourceType.IsCollectionChild(resource_type)) return self.location_cache.resolve_service_endpoint(request) diff --git a/sdk/cosmos/azure-cosmos/test/multimaster_tests.py b/sdk/cosmos/azure-cosmos/test/multimaster_tests.py index 8c0b5b24fa1a..11c740244dcc 100644 --- a/sdk/cosmos/azure-cosmos/test/multimaster_tests.py +++ b/sdk/cosmos/azure-cosmos/test/multimaster_tests.py @@ -2,9 +2,9 @@ import uuid import azure.cosmos.cosmos_client as cosmos_client import pytest -import azure.cosmos.constants as constants +import azure.cosmos._constants as constants from azure.cosmos.http_constants import HttpHeaders -import azure.cosmos.retry_utility as retry_utility +from azure.cosmos import _retry_utility import test_config from azure.cosmos.partition_key import PartitionKey @@ -31,8 +31,8 @@ def test_tentative_writes_header_not_present(self): def _validate_tentative_write_headers(self): - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction connectionPolicy = MultiMasterTests.connectionPolicy connectionPolicy.UseMultipleWriteLocations = True @@ -115,7 +115,7 @@ def _validate_tentative_write_headers(self): # Delete Database self.assertEqual(self.last_headers[10], is_allow_tentative_writes_set) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def _MockExecuteFunction(self, function, *args, **kwargs): self.counter += 1 diff --git a/sdk/cosmos/azure-cosmos/test/orderby_tests.py b/sdk/cosmos/azure-cosmos/test/orderby_tests.py index d8f85a49eb03..7b84ed856aaa 100644 --- a/sdk/cosmos/azure-cosmos/test/orderby_tests.py +++ b/sdk/cosmos/azure-cosmos/test/orderby_tests.py @@ -25,8 +25,8 @@ import azure.cosmos.documents as documents from azure.cosmos.partition_key import PartitionKey import azure.cosmos.cosmos_client as cosmos_client -from azure.cosmos import query_iterable -import azure.cosmos.base as base +from azure.cosmos import _query_iterable as query_iterable +import azure.cosmos._base as base from six.moves import xrange import test_config diff --git a/sdk/cosmos/azure-cosmos/test/proxy_tests.py b/sdk/cosmos/azure-cosmos/test/proxy_tests.py index c9144b8bec9e..552f76ee301c 100644 --- a/sdk/cosmos/azure-cosmos/test/proxy_tests.py +++ b/sdk/cosmos/azure-cosmos/test/proxy_tests.py @@ -22,7 +22,7 @@ import unittest import pytest import azure.cosmos.documents as documents -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection import test_config import six if six.PY2: diff --git a/sdk/cosmos/azure-cosmos/test/query_execution_context_tests.py b/sdk/cosmos/azure-cosmos/test/query_execution_context_tests.py index 4a0ac5692459..f8138b6d5a8a 100644 --- a/sdk/cosmos/azure-cosmos/test/query_execution_context_tests.py +++ b/sdk/cosmos/azure-cosmos/test/query_execution_context_tests.py @@ -24,8 +24,8 @@ import pytest from six.moves import xrange import azure.cosmos.cosmos_client as cosmos_client -from azure.cosmos.execution_context import base_execution_context as base_execution_context -import azure.cosmos.base as base +from azure.cosmos._execution_context import base_execution_context as base_execution_context +import azure.cosmos._base as base import test_config from azure.cosmos.partition_key import PartitionKey diff --git a/sdk/cosmos/azure-cosmos/test/retry_policy_tests.py b/sdk/cosmos/azure-cosmos/test/retry_policy_tests.py index bffe7a194d0e..f25dfce77e78 100644 --- a/sdk/cosmos/azure-cosmos/test/retry_policy_tests.py +++ b/sdk/cosmos/azure-cosmos/test/retry_policy_tests.py @@ -25,9 +25,9 @@ import pytest import azure.cosmos.documents as documents import azure.cosmos.errors as errors -import azure.cosmos.retry_options as retry_options +import azure.cosmos._retry_options as retry_options from azure.cosmos.http_constants import HttpHeaders, StatusCodes, SubStatusCodes -import azure.cosmos.retry_utility as retry_utility +from azure.cosmos import _retry_utility import test_config pytestmark = pytest.mark.cosmosEmulator @@ -78,9 +78,9 @@ def test_resource_throttle_retry_policy_default_retry_after(self): connection_policy = Test_retry_policy_tests.connectionPolicy connection_policy.RetryOptions = retry_options.RetryOptions(5) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction try: - retry_utility._ExecuteFunction = self._MockExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction document_definition = { 'id': 'doc', 'name': 'sample document', @@ -94,15 +94,15 @@ def test_resource_throttle_retry_policy_default_retry_after(self): self.assertGreaterEqual( self.created_collection.client_connection.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs], connection_policy.RetryOptions.MaxRetryAttemptCount * self.retry_after_in_milliseconds) finally: - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def test_resource_throttle_retry_policy_fixed_retry_after(self): connection_policy = Test_retry_policy_tests.connectionPolicy connection_policy.RetryOptions = retry_options.RetryOptions(5, 2000) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction try: - retry_utility._ExecuteFunction = self._MockExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction document_definition = { 'id': 'doc', 'name': 'sample document', @@ -117,15 +117,15 @@ def test_resource_throttle_retry_policy_fixed_retry_after(self): connection_policy.RetryOptions.MaxRetryAttemptCount * connection_policy.RetryOptions.FixedRetryIntervalInMilliseconds) finally: - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def test_resource_throttle_retry_policy_max_wait_time(self): connection_policy = Test_retry_policy_tests.connectionPolicy connection_policy.RetryOptions = retry_options.RetryOptions(5, 2000, 3) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction try: - retry_utility._ExecuteFunction = self._MockExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction document_definition = { 'id': 'doc', 'name': 'sample document', @@ -138,7 +138,7 @@ def test_resource_throttle_retry_policy_max_wait_time(self): self.assertGreaterEqual(self.created_collection.client_connection.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs], connection_policy.RetryOptions.MaxWaitTimeInSeconds * 1000) finally: - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def test_resource_throttle_retry_policy_query(self): connection_policy = Test_retry_policy_tests.connectionPolicy @@ -150,9 +150,9 @@ def test_resource_throttle_retry_policy_query(self): self.created_collection.create_item(body=document_definition) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction try: - retry_utility._ExecuteFunction = self._MockExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunction try: list(self.created_collection.query_items( @@ -169,7 +169,7 @@ def test_resource_throttle_retry_policy_query(self): self.assertGreaterEqual(self.created_collection.client_connection.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs], connection_policy.RetryOptions.MaxRetryAttemptCount * self.retry_after_in_milliseconds) finally: - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def test_default_retry_policy_for_query(self): document_definition_1 = { 'id': 'doc1', @@ -183,9 +183,9 @@ def test_default_retry_policy_for_query(self): self.created_collection.create_item(body=document_definition_2) try: - original_execute_function = retry_utility._ExecuteFunction + original_execute_function = _retry_utility.ExecuteFunction mf = self.MockExecuteFunctionConnectionReset(original_execute_function) - retry_utility._ExecuteFunction = mf + _retry_utility.ExecuteFunction = mf docs = self.created_collection.query_items(query="Select * from c", max_item_count=1, enable_cross_partition_query=True) @@ -194,7 +194,7 @@ def test_default_retry_policy_for_query(self): self.assertEqual(result_docs[1]['id'], 'doc2') self.assertEqual(mf.counter, 12) finally: - retry_utility._ExecuteFunction = original_execute_function + _retry_utility.ExecuteFunction = original_execute_function self.created_collection.delete_item(item=result_docs[0], partition_key=result_docs[0]['id']) self.created_collection.delete_item(item=result_docs[1], partition_key=result_docs[1]['id']) @@ -207,16 +207,16 @@ def test_default_retry_policy_for_read(self): created_document = self.created_collection.create_item(body=document_definition) try: - original_execute_function = retry_utility._ExecuteFunction + original_execute_function = _retry_utility.ExecuteFunction mf = self.MockExecuteFunctionConnectionReset(original_execute_function) - retry_utility._ExecuteFunction = mf + _retry_utility.ExecuteFunction = mf doc = self.created_collection.read_item(item=created_document['id'], partition_key=created_document['id']) self.assertEqual(doc['id'], 'doc') self.assertEqual(mf.counter, 3) finally: - retry_utility._ExecuteFunction = original_execute_function + _retry_utility.ExecuteFunction = original_execute_function self.created_collection.delete_item(item=created_document, partition_key=created_document['id']) @@ -226,9 +226,9 @@ def test_default_retry_policy_for_create(self): 'key': 'value'} try: - original_execute_function = retry_utility._ExecuteFunction + original_execute_function = _retry_utility.ExecuteFunction mf = self.MockExecuteFunctionConnectionReset(original_execute_function) - retry_utility._ExecuteFunction = mf + _retry_utility.ExecuteFunction = mf created_document = {} try : @@ -241,7 +241,7 @@ def test_default_retry_policy_for_create(self): # 3 retries for readCollection. No retry for createDocument. self.assertEqual(mf.counter, 1) # TODO: The comment above implies that there should be a read in the test. But there isn't... finally: - retry_utility._ExecuteFunction = original_execute_function + _retry_utility.ExecuteFunction = original_execute_function def _MockExecuteFunction(self, function, *args, **kwargs): raise errors.HTTPFailure(StatusCodes.TOO_MANY_REQUESTS, "Request rate is too large", {HttpHeaders.RetryAfterInMilliseconds: self.retry_after_in_milliseconds}) diff --git a/sdk/cosmos/azure-cosmos/test/routing/collection_routing_map_test.py b/sdk/cosmos/azure-cosmos/test/routing/collection_routing_map_test.py index ae5fa2c011af..c6cae9afd4ce 100644 --- a/sdk/cosmos/azure-cosmos/test/routing/collection_routing_map_test.py +++ b/sdk/cosmos/azure-cosmos/test/routing/collection_routing_map_test.py @@ -21,9 +21,9 @@ import unittest import pytest -from azure.cosmos.routing.collection_routing_map import _CollectionRoutingMap -import azure.cosmos.routing.routing_range as routing_range -from azure.cosmos.routing.routing_map_provider import _PartitionKeyRangeCache +from azure.cosmos._routing.collection_routing_map import CollectionRoutingMap +import azure.cosmos._routing.routing_range as routing_range +from azure.cosmos._routing.routing_map_provider import PartitionKeyRangeCache pytestmark = pytest.mark.cosmosEmulator @@ -34,8 +34,8 @@ def test_advanced(self): partition_key_ranges = [{u'id': u'0', u'minInclusive': u'', u'maxExclusive': u'05C1C9CD673398'}, {u'id': u'1', u'minInclusive': u'05C1C9CD673398', u'maxExclusive': u'05C1D9CD673398'}, {u'id': u'2', u'minInclusive': u'05C1D9CD673398', u'maxExclusive': u'05C1E399CD6732'}, {u'id': u'3', u'minInclusive': u'05C1E399CD6732', u'maxExclusive': u'05C1E9CD673398'}, {u'id': u'4', u'minInclusive': u'05C1E9CD673398', u'maxExclusive': u'FF'}] partitionRangeWithInfo = [(r, True) for r in partition_key_ranges] - pkRange = routing_range._Range("", "FF", True, False) - collection_routing_map = _CollectionRoutingMap.CompleteRoutingMap(partitionRangeWithInfo, 'sample collection id') + pkRange = routing_range.Range("", "FF", True, False) + collection_routing_map = CollectionRoutingMap.CompleteRoutingMap(partitionRangeWithInfo, 'sample collection id') overlapping_partition_key_ranges = collection_routing_map.get_overlapping_ranges(pkRange) self.assertEqual(len(overlapping_partition_key_ranges), len(partition_key_ranges)) @@ -74,7 +74,7 @@ def get_range_id(r): return r[Id] # verify no thing is filtered out since there is no children ranges - filteredRanges = _PartitionKeyRangeCache._discard_parent_ranges(partitionKeyRanges) + filteredRanges = PartitionKeyRangeCache._discard_parent_ranges(partitionKeyRanges) self.assertEqual(['2', '0', '1', '3'], list(map(get_range_id, filteredRanges))) # add some children partition key ranges with parents Ids @@ -93,7 +93,7 @@ def get_range_id(r): Parents : ["0"]}) # verify the filtered range list has children ranges and the parent Ids are discarded - filteredRanges = _PartitionKeyRangeCache._discard_parent_ranges(partitionKeyRanges) + filteredRanges = PartitionKeyRangeCache._discard_parent_ranges(partitionKeyRanges) expectedRanges = ['2', '1', '3', '6', '7', '5'] self.assertEqual(expectedRanges, list(map(get_range_id, filteredRanges))) @@ -123,7 +123,7 @@ def test_collection_routing_map(self): 3) ] - crm = _CollectionRoutingMap.CompleteRoutingMap(partitionKeyRanges, "") + crm = CollectionRoutingMap.CompleteRoutingMap(partitionKeyRanges, "") self.assertEqual("0", crm._orderedPartitionKeyRanges[0][Id]) self.assertEqual("1", crm._orderedPartitionKeyRanges[1][Id]) @@ -144,7 +144,7 @@ def test_collection_routing_map(self): self.assertEqual("0", crm.get_range_by_partition_key_range_id("0")[Id]) self.assertEqual("1", crm.get_range_by_partition_key_range_id("1")[Id]) - fullRangeMinToMaxRange = routing_range._Range(_CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, _CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey, True, False) + fullRangeMinToMaxRange = routing_range.Range(CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey, True, False) overlappingRanges = crm.get_overlapping_ranges([fullRangeMinToMaxRange]) self.assertEqual(4, len(overlappingRanges)) @@ -154,18 +154,18 @@ def getKey(r): onlyParitionRanges.sort(key = getKey) self.assertEqual(overlappingRanges, onlyParitionRanges) - noPoint = routing_range._Range(_CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, _CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, False, False) + noPoint = routing_range.Range(CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, False, False) self.assertEqual(0, len(crm.get_overlapping_ranges([noPoint]))) - onePoint = routing_range._Range("0000000040", "0000000040", True, True) + onePoint = routing_range.Range("0000000040", "0000000040", True, True) overlappingPartitionKeyRanges = crm.get_overlapping_ranges([onePoint]) self.assertEqual(1, len(overlappingPartitionKeyRanges)) self.assertEqual("1", overlappingPartitionKeyRanges[0][Id]) ranges = [ - routing_range._Range("0000000040", "0000000045", True, True), - routing_range._Range("0000000045", "0000000046", True, True), - routing_range._Range("0000000046", "0000000050", True, True) + routing_range.Range("0000000040", "0000000045", True, True), + routing_range.Range("0000000045", "0000000046", True, True), + routing_range.Range("0000000046", "0000000050", True, True) ] overlappingPartitionKeyRanges = crm.get_overlapping_ranges(ranges) @@ -182,12 +182,12 @@ def test_invalid_routing_map(self): collectionUniqueId = "" def createRoutingMap(): - _CollectionRoutingMap.CompleteRoutingMap(partitionKeyRanges, collectionUniqueId) + CollectionRoutingMap.CompleteRoutingMap(partitionKeyRanges, collectionUniqueId) self.assertRaises(ValueError, createRoutingMap) def test_incomplete_routing_map(self): - crm = _CollectionRoutingMap.CompleteRoutingMap( + crm = CollectionRoutingMap.CompleteRoutingMap( [ ({ 'id' : "2", 'minInclusive' : "", 'maxExclusive' : "0000000030"}, 2), ({ 'id' : "3", 'minInclusive' : "0000000031", 'maxExclusive' : "FF"}, 2), @@ -195,7 +195,7 @@ def test_incomplete_routing_map(self): , "") self.assertIsNone(crm) - crm = _CollectionRoutingMap.CompleteRoutingMap( + crm = CollectionRoutingMap.CompleteRoutingMap( [ ({ 'id' : "2", 'minInclusive' : "", 'maxExclusive' : "0000000030"}, 2), ({ 'id' : "2", 'minInclusive' : "0000000030", 'maxExclusive' : "FF"}, 2), diff --git a/sdk/cosmos/azure-cosmos/test/routing/routing_map_provider_tests.py b/sdk/cosmos/azure-cosmos/test/routing/routing_map_provider_tests.py index 252c79e418d3..2601084c6fa4 100644 --- a/sdk/cosmos/azure-cosmos/test/routing/routing_map_provider_tests.py +++ b/sdk/cosmos/azure-cosmos/test/routing/routing_map_provider_tests.py @@ -21,9 +21,9 @@ import unittest import pytest -from azure.cosmos.routing.routing_map_provider import _SmartRoutingMapProvider -from azure.cosmos.routing.routing_map_provider import _CollectionRoutingMap -from azure.cosmos.routing import routing_range as routing_range +from azure.cosmos._routing.routing_map_provider import SmartRoutingMapProvider +from azure.cosmos._routing.routing_map_provider import CollectionRoutingMap +from azure.cosmos._routing import routing_range as routing_range pytestmark = pytest.mark.cosmosEmulator @@ -43,27 +43,27 @@ def setUp(self): self.smart_routing_map_provider = self.instantiate_smart_routing_map_provider(self.partition_key_ranges) partitionRangeWithInfo = map(lambda r: (r, True), self.partition_key_ranges) - self.cached_collection_routing_map = _CollectionRoutingMap.CompleteRoutingMap(partitionRangeWithInfo, 'sample collection id') + self.cached_collection_routing_map = CollectionRoutingMap.CompleteRoutingMap(partitionRangeWithInfo, 'sample collection id') def instantiate_smart_routing_map_provider(self, partition_key_ranges): client = RoutingMapProviderTests.MockedCosmosClientConnection(partition_key_ranges) - return _SmartRoutingMapProvider(client) + return SmartRoutingMapProvider(client) def test_full_range(self): # query range is the whole partition key range - pkRange = routing_range._Range("", "FF", True, False) + pkRange = routing_range.Range("", "FF", True, False) overlapping_partition_key_ranges = self.get_overlapping_ranges([pkRange]) self.assertEqual(len(overlapping_partition_key_ranges), len(self.partition_key_ranges)) self.assertEqual(overlapping_partition_key_ranges, self.partition_key_ranges) - pkRange = routing_range._Range("", "FF", False, False) + pkRange = routing_range.Range("", "FF", False, False) overlapping_partition_key_ranges = self.get_overlapping_ranges([pkRange]) self.assertEqual(overlapping_partition_key_ranges, self.partition_key_ranges) self.assertEqual(self.cached_collection_routing_map.get_overlapping_ranges([pkRange]), self.partition_key_ranges) def test_empty_ranges(self): # query range is the whole partition key range - pkRange = routing_range._Range("", "FF", True, False) + pkRange = routing_range.Range("", "FF", True, False) overlapping_partition_key_ranges = self.get_overlapping_ranges([pkRange]) self.assertEqual(len(overlapping_partition_key_ranges), len(self.partition_key_ranges)) self.assertEqual(overlapping_partition_key_ranges, self.partition_key_ranges) @@ -73,17 +73,17 @@ def test_empty_ranges(self): self.assertEqual(len(overlapping_partition_key_ranges), 0) # validate the overlaping partition key ranges results for empty ranges is empty - empty_start_range = routing_range._Range("", "", False, True) - empty_end_range = routing_range._Range("FF", "FF", False, True) - empty_range = routing_range._Range("AA", "AA", False, True) + empty_start_range = routing_range.Range("", "", False, True) + empty_end_range = routing_range.Range("FF", "FF", False, True) + empty_range = routing_range.Range("AA", "AA", False, True) self.validate_empty_query_ranges([empty_range], [empty_start_range], [empty_end_range], [empty_start_range, empty_range], [empty_start_range, empty_end_range], [empty_range, empty_end_range], [empty_range, empty_range, empty_end_range]) def test_bad_overlapping_query_ranges(self): # they share AA point - r1 = routing_range._Range("", "AA", True, True) - r2 = routing_range._Range("AA", "FF", True, False) + r1 = routing_range.Range("", "AA", True, True) + r2 = routing_range.Range("AA", "FF", True, False) def func_one_point_overlap(): self.smart_routing_map_provider.get_overlapping_ranges("sample collection id", [r1, r2]) @@ -91,16 +91,16 @@ def func_one_point_overlap(): self.assertRaises(ValueError, func_one_point_overlap) # overlapping range - r1 = routing_range._Range("", "AB", True, False) - r2 = routing_range._Range("AA", "FA", True, False) + r1 = routing_range.Range("", "AB", True, False) + r2 = routing_range.Range("AA", "FA", True, False) def func_overlap(): self.smart_routing_map_provider.get_overlapping_ranges("sample collection id", [r1, r2]) self.assertRaises(ValueError, func_overlap) - r1 = routing_range._Range("AB", "AC", True, False) - r1 = routing_range._Range("AA", "AB", True, False) + r1 = routing_range.Range("AB", "AC", True, False) + r1 = routing_range.Range("AA", "AB", True, False) def func_non_sorted(): self.smart_routing_map_provider.get_overlapping_ranges("sample collection id", [r1, r2]) @@ -108,31 +108,31 @@ def func_non_sorted(): self.assertRaises(ValueError, func_overlap) def test_empty_ranges_are_thrown_away(self): - e1 = routing_range._Range("", "", True, False) - r1 = routing_range._Range("", "AB", True, False) - e2 = routing_range._Range("AB", "AB", True, False) - r2 = routing_range._Range("AB", "AC", True, False) - e3 = routing_range._Range("AC", "AC", True, False) - e4 = routing_range._Range("AD", "AD", True, False) + e1 = routing_range.Range("", "", True, False) + r1 = routing_range.Range("", "AB", True, False) + e2 = routing_range.Range("AB", "AB", True, False) + r2 = routing_range.Range("AB", "AC", True, False) + e3 = routing_range.Range("AC", "AC", True, False) + e4 = routing_range.Range("AD", "AD", True, False) self.validate_overlapping_ranges_results([e1, r1, e2, r2, e3, e4], self.get_overlapping_ranges([r1, r2])) self.validate_against_cached_collection_results([e1, r1, e2, r2, e3, e4]) def test_simple(self): - r = routing_range._Range("AB", "AC", True, False) + r = routing_range.Range("AB", "AC", True, False) self.validate_against_cached_collection_results([r]) ranges = [ - routing_range._Range("0000000040", "0000000045", True, False), - routing_range._Range("0000000045", "0000000046", True, False), - routing_range._Range("0000000046", "0000000050", True, False) + routing_range.Range("0000000040", "0000000045", True, False), + routing_range.Range("0000000045", "0000000046", True, False), + routing_range.Range("0000000046", "0000000050", True, False) ] self.validate_against_cached_collection_results(ranges) def test_simple_boundary(self): ranges = [ - routing_range._Range("05C1C9CD673398", "05C1D9CD673398", True, False), + routing_range.Range("05C1C9CD673398", "05C1D9CD673398", True, False), ] self.validate_against_cached_collection_results(ranges) self.validate_overlapping_ranges_results(ranges, self.partition_key_ranges[1:2]) @@ -140,10 +140,10 @@ def test_simple_boundary(self): def test_two_adjacent_boundary(self): ranges = [ # self.partition_key_ranges[1] - routing_range._Range("05C1C9CD673398", "05C1D9CD673398", True, False), + routing_range.Range("05C1C9CD673398", "05C1D9CD673398", True, False), # self.partition_key_ranges[2] - routing_range._Range("05C1D9CD673398", "05C1D9CD673399", True, False), + routing_range.Range("05C1D9CD673398", "05C1D9CD673399", True, False), ] self.validate_against_cached_collection_results(ranges) self.validate_overlapping_ranges_results(ranges, self.partition_key_ranges[1:3]) @@ -151,8 +151,8 @@ def test_two_adjacent_boundary(self): def test_two_ranges_in_one_partition_key_range(self): # two ranges fall in the same partition key range ranges = [ - routing_range._Range("05C1C9CD673400", "05C1C9CD673401", True, False), - routing_range._Range("05C1C9CD673402", "05C1C9CD673403", True, False), + routing_range.Range("05C1C9CD673400", "05C1C9CD673401", True, False), + routing_range.Range("05C1C9CD673402", "05C1C9CD673403", True, False), ] self.validate_against_cached_collection_results(ranges) @@ -161,15 +161,15 @@ def test_two_ranges_in_one_partition_key_range(self): def test_complex(self): ranges = [ # all are covered by self.partition_key_ranges[1] - routing_range._Range("05C1C9CD673398", "05C1D9CD673391", True, False), - routing_range._Range("05C1D9CD673391", "05C1D9CD673392", True, False), - routing_range._Range("05C1D9CD673393", "05C1D9CD673395", True, False), - routing_range._Range("05C1D9CD673395", "05C1D9CD673395", True, False), + routing_range.Range("05C1C9CD673398", "05C1D9CD673391", True, False), + routing_range.Range("05C1D9CD673391", "05C1D9CD673392", True, False), + routing_range.Range("05C1D9CD673393", "05C1D9CD673395", True, False), + routing_range.Range("05C1D9CD673395", "05C1D9CD673395", True, False), # all are covered by self.partition_key_ranges[4]] - routing_range._Range("05C1E9CD673398", "05C1E9CD673401", True, False), - routing_range._Range("05C1E9CD673402", "05C1E9CD673403", True, False), + routing_range.Range("05C1E9CD673398", "05C1E9CD673401", True, False), + routing_range.Range("05C1E9CD673402", "05C1E9CD673403", True, False), # empty range - routing_range._Range("FF", "FF", True, False), + routing_range.Range("FF", "FF", True, False), ] self.validate_against_cached_collection_results(ranges) self.validate_overlapping_ranges_results(ranges, [self.partition_key_ranges[1], self.partition_key_ranges[4]]) diff --git a/sdk/cosmos/azure-cosmos/test/routing_map_tests.py b/sdk/cosmos/azure-cosmos/test/routing_map_tests.py index 48bbae7b173c..f2f396700be2 100644 --- a/sdk/cosmos/azure-cosmos/test/routing_map_tests.py +++ b/sdk/cosmos/azure-cosmos/test/routing_map_tests.py @@ -23,8 +23,8 @@ import pytest import azure.cosmos.documents as documents import azure.cosmos.cosmos_client as cosmos_client -from azure.cosmos.routing.routing_map_provider import _PartitionKeyRangeCache -from azure.cosmos.routing import routing_range as routing_range +from azure.cosmos._routing.routing_map_provider import PartitionKeyRangeCache +from azure.cosmos._routing import routing_range as routing_range import test_config pytestmark = pytest.mark.cosmosEmulator @@ -66,8 +66,8 @@ def test_read_partition_key_ranges(self): def test_routing_map_provider(self): partition_key_ranges = list(self.client.client_connection._ReadPartitionKeyRanges(self.collection_link)) - routing_mp = _PartitionKeyRangeCache(self.client.client_connection) - overlapping_partition_key_ranges = routing_mp.get_overlapping_ranges(self.collection_link, routing_range._Range("", "FF", True, False)) + routing_mp = PartitionKeyRangeCache(self.client.client_connection) + overlapping_partition_key_ranges = routing_mp.get_overlapping_ranges(self.collection_link, routing_range.Range("", "FF", True, False)) self.assertEqual(len(overlapping_partition_key_ranges), len(partition_key_ranges)) self.assertEqual(overlapping_partition_key_ranges, partition_key_ranges) diff --git a/sdk/cosmos/azure-cosmos/test/session_tests.py b/sdk/cosmos/azure-cosmos/test/session_tests.py index 03c28703615b..cdd0799dafd5 100644 --- a/sdk/cosmos/azure-cosmos/test/session_tests.py +++ b/sdk/cosmos/azure-cosmos/test/session_tests.py @@ -9,8 +9,8 @@ import test_config import azure.cosmos.errors as errors from azure.cosmos.http_constants import StatusCodes, SubStatusCodes, HttpHeaders -import azure.cosmos.synchronized_request as synchronized_request -import azure.cosmos.retry_utility as retry_utility +import azure.cosmos._synchronized_request as synchronized_request +from azure.cosmos import _retry_utility pytestmark = pytest.mark.cosmosEmulator @@ -62,8 +62,8 @@ def _MockExecuteFunctionSessionReadFailureOnce(self, function, *args, **kwargs): def test_clear_session_token(self): created_document = self.created_collection.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}) - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunctionSessionReadFailureOnce + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunctionSessionReadFailureOnce try: self.created_collection.read_item(item=created_document['id'], partition_key='mypk') except errors.HTTPFailure as e: @@ -71,7 +71,7 @@ def test_clear_session_token(self): 'dbs/' + self.created_db.id + '/colls/' + self.created_collection.id), "") self.assertEqual(e.status_code, StatusCodes.NOT_FOUND) self.assertEqual(e.sub_status, SubStatusCodes.READ_SESSION_NOTAVAILABLE) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def _MockExecuteFunctionInvalidSessionToken(self, function, *args, **kwargs): response = {'_self':'dbs/90U1AA==/colls/90U1AJ4o6iA=/docs/90U1AJ4o6iABCT0AAAAABA==/', 'id':'1'} @@ -79,12 +79,12 @@ def _MockExecuteFunctionInvalidSessionToken(self, function, *args, **kwargs): return (response, headers) def test_internal_server_error_raised_for_invalid_session_token_received_from_server(self): - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunctionInvalidSessionToken + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunctionInvalidSessionToken try: self.created_collection.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}) self.fail() except errors.HTTPFailure as e: self.assertEqual(e._http_error_message, "Could not parse the received session token: 2") self.assertEqual(e.status_code, StatusCodes.INTERNAL_SERVER_ERROR) - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction diff --git a/sdk/cosmos/azure-cosmos/test/session_token_unit_tests.py b/sdk/cosmos/azure-cosmos/test/session_token_unit_tests.py index ecdc2b1de238..76e9482ade4f 100644 --- a/sdk/cosmos/azure-cosmos/test/session_token_unit_tests.py +++ b/sdk/cosmos/azure-cosmos/test/session_token_unit_tests.py @@ -1,6 +1,6 @@ import unittest import pytest -from azure.cosmos.vector_session_token import VectorSessionToken +from azure.cosmos._vector_session_token import VectorSessionToken from azure.cosmos.errors import CosmosError pytestmark = pytest.mark.cosmosEmulator diff --git a/sdk/cosmos/azure-cosmos/test/streaming_failover_test.py b/sdk/cosmos/azure-cosmos/test/streaming_failover_test.py index 4a594fed9e96..73ab656627b2 100644 --- a/sdk/cosmos/azure-cosmos/test/streaming_failover_test.py +++ b/sdk/cosmos/azure-cosmos/test/streaming_failover_test.py @@ -1,13 +1,13 @@ import unittest -import azure.cosmos.cosmos_client_connection as cosmos_client_connection +import azure.cosmos._cosmos_client_connection as cosmos_client_connection import pytest import azure.cosmos.documents as documents import azure.cosmos.errors as errors from azure.cosmos.http_constants import HttpHeaders, StatusCodes, SubStatusCodes -import azure.cosmos.retry_utility as retry_utility -import azure.cosmos.endpoint_discovery_retry_policy as endpoint_discovery_retry_policy -from azure.cosmos.request_object import _RequestObject -import azure.cosmos.global_endpoint_manager as global_endpoint_manager +from azure.cosmos import _retry_utility +from azure.cosmos import _endpoint_discovery_retry_policy +from azure.cosmos._request_object import RequestObject +import azure.cosmos._global_endpoint_manager as global_endpoint_manager import azure.cosmos.http_constants as http_constants pytestmark = pytest.mark.cosmosEmulator @@ -30,8 +30,8 @@ class TestStreamingFailover(unittest.TestCase): endpoint_sequence = [] def test_streaming_failover(self): - self.OriginalExecuteFunction = retry_utility._ExecuteFunction - retry_utility._ExecuteFunction = self._MockExecuteFunctionEndpointDiscover + self.OriginalExecuteFunction = _retry_utility.ExecuteFunction + _retry_utility.ExecuteFunction = self._MockExecuteFunctionEndpointDiscover connection_policy = documents.ConnectionPolicy() connection_policy.PreferredLocations = self.preferred_regional_endpoints connection_policy.DisableSSLVerification = True @@ -62,7 +62,7 @@ def test_streaming_failover(self): self.assertEqual(self.endpoint_sequence[i], self.WRITE_ENDPOINT2) cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount = self.original_get_database_account - retry_utility._ExecuteFunction = self.OriginalExecuteFunction + _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def mock_get_database_account(self, url_connection = None): database_account = documents.DatabaseAccount() @@ -105,16 +105,16 @@ def test_retry_policy_does_not_mark_null_locations_unavailable(self): # these functions should not be called self._read_counter = 0 self._write_counter = 0 - request = _RequestObject(http_constants.ResourceType.Document, documents._OperationType.Read) - endpointDiscovery_retry_policy = endpoint_discovery_retry_policy._EndpointDiscoveryRetryPolicy(documents.ConnectionPolicy(), endpoint_manager, request) + request = RequestObject(http_constants.ResourceType.Document, documents._OperationType.Read) + endpointDiscovery_retry_policy = _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy(documents.ConnectionPolicy(), endpoint_manager, request) endpointDiscovery_retry_policy.ShouldRetry(errors.HTTPFailure(http_constants.StatusCodes.FORBIDDEN)) self.assertEqual(self._read_counter, 0) self.assertEqual(self._write_counter, 0) self._read_counter = 0 self._write_counter = 0 - request = _RequestObject(http_constants.ResourceType.Document, documents._OperationType.Create) - endpointDiscovery_retry_policy = endpoint_discovery_retry_policy._EndpointDiscoveryRetryPolicy(documents.ConnectionPolicy(), endpoint_manager, request) + request = RequestObject(http_constants.ResourceType.Document, documents._OperationType.Create) + endpointDiscovery_retry_policy = _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy(documents.ConnectionPolicy(), endpoint_manager, request) endpointDiscovery_retry_policy.ShouldRetry(errors.HTTPFailure(http_constants.StatusCodes.FORBIDDEN)) self.assertEqual(self._read_counter, 0) self.assertEqual(self._write_counter, 0) diff --git a/sdk/cosmos/azure-cosmos/test/utils_tests.py b/sdk/cosmos/azure-cosmos/test/utils_tests.py index 0dc7d7b8315a..4349502fe854 100644 --- a/sdk/cosmos/azure-cosmos/test/utils_tests.py +++ b/sdk/cosmos/azure-cosmos/test/utils_tests.py @@ -21,7 +21,7 @@ import unittest import pytest -import azure.cosmos.utils as utils +import azure.cosmos._utils as _utils import platform import azure.cosmos.http_constants as http_constants @@ -33,7 +33,7 @@ class UtilsTests(unittest.TestCase): """ def test_user_agent(self): - user_agent = utils._get_user_agent() + user_agent = _utils.get_user_agent() expected_user_agent = "{}/{} Python/{} azure-cosmos/{}".format( platform.system(), platform.release(), platform.python_version(), From 6125bc517c578722819c63c5c264bd945b8c119f Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:17:51 -0700 Subject: [PATCH 156/244] Accept extension of JSON content-type (#6583) * Accept extension of JSON content-type * Adding text/something+json test * Support digit --- .../azure/core/pipeline/policies/universal.py | 9 ++++----- sdk/core/azure-core/tests/test_universal_pipeline.py | 12 ++++++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/universal.py b/sdk/core/azure-core/azure/core/pipeline/policies/universal.py index b9338950ff38..77ffd69c6a39 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/universal.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/universal.py @@ -266,10 +266,9 @@ def on_response(self, request, response): class ContentDecodePolicy(SansIOHTTPPolicy): """Policy for decoding unstreamed response content. """ - JSON_MIMETYPES = [ - 'application/json', - 'text/json' # Because we're open minded people... - ] + # Accept "text" because we're open minded people... + JSON_REGEXP = re.compile(r'^(application|text)/([0-9a-z+.]+\+)?json$') + # Name used in context CONTEXT_NAME = "deserialized_data" @@ -301,7 +300,7 @@ def deserialize_from_text(cls, response, content_type=None): if content_type is None: return data - if content_type in cls.JSON_MIMETYPES: + if cls.JSON_REGEXP.match(content_type): try: return json.loads(data_as_str) except ValueError as err: diff --git a/sdk/core/azure-core/tests/test_universal_pipeline.py b/sdk/core/azure-core/tests/test_universal_pipeline.py index cc783b0d4c74..035a462d388a 100644 --- a/sdk/core/azure-core/tests/test_universal_pipeline.py +++ b/sdk/core/azure-core/tests/test_universal_pipeline.py @@ -160,6 +160,18 @@ def body(self): result = response.context["deserialized_data"] assert result["success"] is True + # Simple JSON with complex content_type + response = build_response(b'{"success": true}', content_type="application/vnd.microsoft.appconfig.kv.v1+json") + raw_deserializer.on_response(None, response) + result = response.context["deserialized_data"] + assert result["success"] is True + + # Simple JSON with complex content_type, v2 + response = build_response(b'{"success": true}', content_type="text/vnd.microsoft.appconfig.kv.v1+json") + raw_deserializer.on_response(None, response) + result = response.context["deserialized_data"] + assert result["success"] is True + # For compat, if no content-type, decode JSON response = build_response(b'"data"') raw_deserializer.on_response(None, response) From c7f8a6052b01a3d3558fd1e97b00b3828cdd5f09 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:40:30 -0700 Subject: [PATCH 157/244] Remove docdb mgmt package from master (#6585) --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 - sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 - sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 - .../azure-mgmt-documentdb/azure/__init__.py | 1 - .../azure/mgmt/__init__.py | 1 - .../azure/mgmt/documentdb/__init__.py | 18 - .../azure/mgmt/documentdb/document_db.py | 83 -- .../azure/mgmt/documentdb/models/__init__.py | 52 - .../documentdb/models/consistency_policy.py | 50 - .../documentdb/models/database_account.py | 117 --- .../database_account_connection_string.py | 39 - ...tabase_account_create_update_parameters.py | 90 -- ..._account_list_connection_strings_result.py | 29 - .../database_account_list_keys_result.py | 53 - ...base_account_list_read_only_keys_result.py | 41 - .../models/database_account_paged.py | 27 - .../database_account_patch_parameters.py | 31 - ...abase_account_regenerate_key_parameters.py | 33 - .../documentdb/models/document_db_enums.py | 41 - .../documentdb/models/failover_policies.py | 28 - .../mgmt/documentdb/models/failover_policy.py | 48 - .../azure/mgmt/documentdb/models/location.py | 58 -- .../azure/mgmt/documentdb/models/resource.py | 54 -- .../mgmt/documentdb/operations/__init__.py | 16 - .../database_accounts_operations.py | 918 ------------------ .../azure/mgmt/documentdb/version.py | 13 - .../azure_bdist_wheel.py | 54 -- sdk/cosmos/azure-mgmt-documentdb/build.json | 5 - .../dev_requirements.txt | 1 - .../azure-mgmt-documentdb/sdk_packaging.toml | 2 - sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 - sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 -- ..._mgmt_documentdb.test_accounts_create.yaml | 193 ---- ..._mgmt_documentdb.test_accounts_delete.yaml | 467 --------- ...gmt_documentdb.test_accounts_features.yaml | 272 ------ .../tests/test_mgmt_documentdb.py | 146 --- 36 files changed, 3147 deletions(-) delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst deleted file mode 100644 index eb7345b4071e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. :changelog: - -Release History -=============== - -0.1.3 (2017-05-02) -++++++++++++++++++ - -* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix - -0.1.2 (2017-04-20) -++++++++++++++++++ - -This wheel package is now built with the azure wheel extension - -0.1.1 (2017-03-21) -++++++++++++++++++ - -* Added support for listing database account connection strings - -0.1.0 (2017-01-31) -++++++++++++++++++ - -* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in deleted file mode 100644 index 9ecaeb15de50..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst deleted file mode 100644 index a5204ea75358..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/README.rst +++ /dev/null @@ -1,52 +0,0 @@ -Microsoft Azure SDK for Python -============================== - -This is the Microsoft Azure DocumentDB Management Client Library. - -Azure Resource Manager (ARM) is the next generation of management APIs that -replace the old Azure Service Management (ASM). - -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. - -For the older Azure Service Management (ASM) libraries, see -`azure-servicemanagement-legacy `__ library. - -For a more complete set of Azure libraries, see the `azure `__ bundle package. - - -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - -Usage -===== - -For code examples, see `DocumentDB Management -`__ -on readthedocs.org. - - -Provide Feedback -================ - -If you encounter any bugs or have suggestions, please file an issue in the -`Issues `__ -section of the project. - - -.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py deleted file mode 100755 index 3ec900145f1e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .document_db import DocumentDB -from .version import VERSION - -__all__ = ['DocumentDB'] - -__version__ = VERSION - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py deleted file mode 100755 index 5eda44ab3e32..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import ServiceClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.database_accounts_operations import DatabaseAccountsOperations -from . import models - - -class DocumentDBConfiguration(AzureConfiguration): - """Configuration for DocumentDB - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") - if not base_url: - base_url = 'https://management.azure.com' - - super(DocumentDBConfiguration, self).__init__(base_url) - - self.add_user_agent('documentdb/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class DocumentDB(object): - """Azure DocumentDB Database Service Resource Provider REST API - - :ivar config: Configuration for client. - :vartype config: DocumentDBConfiguration - - :ivar database_accounts: DatabaseAccounts operations - :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2015-04-08' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.database_accounts = DatabaseAccountsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py deleted file mode 100755 index 2ed68c568a84..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .consistency_policy import ConsistencyPolicy -from .location import Location -from .failover_policy import FailoverPolicy -from .database_account import DatabaseAccount -from .failover_policies import FailoverPolicies -from .resource import Resource -from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters -from .database_account_patch_parameters import DatabaseAccountPatchParameters -from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult -from .database_account_list_keys_result import DatabaseAccountListKeysResult -from .database_account_connection_string import DatabaseAccountConnectionString -from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult -from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters -from .database_account_paged import DatabaseAccountPaged -from .document_db_enums import ( - DatabaseAccountKind, - DatabaseAccountOfferType, - DefaultConsistencyLevel, - KeyKind, -) - -__all__ = [ - 'ConsistencyPolicy', - 'Location', - 'FailoverPolicy', - 'DatabaseAccount', - 'FailoverPolicies', - 'Resource', - 'DatabaseAccountCreateUpdateParameters', - 'DatabaseAccountPatchParameters', - 'DatabaseAccountListReadOnlyKeysResult', - 'DatabaseAccountListKeysResult', - 'DatabaseAccountConnectionString', - 'DatabaseAccountListConnectionStringsResult', - 'DatabaseAccountRegenerateKeyParameters', - 'DatabaseAccountPaged', - 'DatabaseAccountKind', - 'DatabaseAccountOfferType', - 'DefaultConsistencyLevel', - 'KeyKind', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py deleted file mode 100755 index d8cefd4c0b59..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConsistencyPolicy(Model): - """The consistency policy for the DocumentDB database account. - - :param default_consistency_level: The default consistency level and - configuration settings of the DocumentDB account. Possible values include: - 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' - :type default_consistency_level: str or :class:`DefaultConsistencyLevel - ` - :param max_staleness_prefix: When used with the Bounded Staleness - consistency level, this value represents the number of stale requests - tolerated. Accepted range for this value is 1 – 2,147,483,647. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_staleness_prefix: long - :param max_interval_in_seconds: When used with the Bounded Staleness - consistency level, this value represents the time amount of staleness (in - seconds) tolerated. Accepted range for this value is 1 - 100. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_interval_in_seconds: int - """ - - _validation = { - 'default_consistency_level': {'required': True}, - 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, - 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, - 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, - 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, - } - - def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): - self.default_consistency_level = default_consistency_level - self.max_staleness_prefix = max_staleness_prefix - self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py deleted file mode 100755 index 89031adc35cb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccount(Resource): - """A DocumentDB database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param provisioning_state: - :type provisioning_state: str - :ivar document_endpoint: The connection endpoint for the DocumentDB - database account. - :vartype document_endpoint: str - :ivar database_account_offer_type: The offer type for the DocumentDB - database account. Default value: Standard. Possible values include: - 'Standard' - :vartype database_account_offer_type: str or - :class:`DatabaseAccountOfferType - ` - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - :param consistency_policy: The consistency policy for the DocumentDB - database account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :ivar write_locations: An array that contains the write location for the - DocumentDB account. - :vartype write_locations: list of :class:`Location - ` - :ivar read_locations: An array that contains of the read locations enabled - for the DocumentDB account. - :vartype read_locations: list of :class:`Location - ` - :ivar failover_policies: An array that contains the regions ordered by - their failover priorities. - :vartype failover_policies: list of :class:`FailoverPolicy - ` - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'document_endpoint': {'readonly': True}, - 'database_account_offer_type': {'readonly': True}, - 'write_locations': {'readonly': True}, - 'read_locations': {'readonly': True}, - 'failover_policies': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, - 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, - 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): - super(DatabaseAccount, self).__init__(location=location, tags=tags) - self.kind = kind - self.provisioning_state = provisioning_state - self.document_endpoint = None - self.database_account_offer_type = None - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover - self.consistency_policy = consistency_policy - self.write_locations = None - self.read_locations = None - self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py deleted file mode 100755 index db1828208069..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountConnectionString(Model): - """Connection string for the DocumentDB account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar connection_string: Value of the connection string - :vartype connection_string: str - :ivar description: Description of the connection string - :vartype description: str - """ - - _validation = { - 'connection_string': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self): - self.connection_string = None - self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py deleted file mode 100755 index 30978f482f0b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccountCreateUpdateParameters(Resource): - """Parameters to create and update DocumentDB database accounts. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param consistency_policy: The consistency policy for the DocumentDB - account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :param locations: An array that contains the georeplication locations - enabled for the DocumentDB account. - :type locations: list of :class:`Location - ` - :ivar database_account_offer_type: Default value: "Standard" . - :vartype database_account_offer_type: str - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - } - - database_account_offer_type = "Standard" - - def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): - super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) - self.kind = kind - self.consistency_policy = consistency_policy - self.locations = locations - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py deleted file mode 100755 index 7cddc00a3de1..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListConnectionStringsResult(Model): - """The connection strings for the given database account. - - :param connection_strings: An array that contains the connection strings - for the DocumentDB account. - :type connection_strings: list of :class:`DatabaseAccountConnectionString - ` - """ - - _attribute_map = { - 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, - } - - def __init__(self, connection_strings=None): - self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py deleted file mode 100755 index 4d775054ac14..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListKeysResult(Model): - """The access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_master_key: Base 64 encoded value of the primary read-write - key. - :vartype primary_master_key: str - :ivar secondary_master_key: Base 64 encoded value of the secondary - read-write key. - :vartype secondary_master_key: str - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_master_key': {'readonly': True}, - 'secondary_master_key': {'readonly': True}, - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, - 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, - 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_master_key = None - self.secondary_master_key = None - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py deleted file mode 100755 index 3330353950c6..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListReadOnlyKeysResult(Model): - """The read-only access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py deleted file mode 100755 index 4cb94909c515..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseAccountPaged(Paged): - """ - A paging container for iterating over a list of DatabaseAccount object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py deleted file mode 100755 index be78a4fd6817..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountPatchParameters(Model): - """Parameters for patching Azure DocumentDB database account properties. - - :param tags: - :type tags: dict - """ - - _validation = { - 'tags': {'required': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, tags): - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py deleted file mode 100755 index 3bff90d33db3..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountRegenerateKeyParameters(Model): - """Parameters to regenerate the keys within the database account. - - :param key_kind: The access key to regenerate. Possible values include: - 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - """ - - _validation = { - 'key_kind': {'required': True}, - } - - _attribute_map = { - 'key_kind': {'key': 'keyKind', 'type': 'str'}, - } - - def __init__(self, key_kind): - self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py deleted file mode 100755 index 1e87cecaeb2a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class DatabaseAccountKind(Enum): - - global_document_db = "GlobalDocumentDB" - mongo_db = "MongoDB" - parse = "Parse" - - -class DatabaseAccountOfferType(Enum): - - standard = "Standard" - - -class DefaultConsistencyLevel(Enum): - - eventual = "Eventual" - session = "Session" - bounded_staleness = "BoundedStaleness" - strong = "Strong" - consistent_prefix = "ConsistentPrefix" - - -class KeyKind(Enum): - - primary = "primary" - secondary = "secondary" - primary_readonly = "primaryReadonly" - secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py deleted file mode 100755 index 4c3ebff5e3b5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicies(Model): - """The list of new failover policies for the failover priority change. - - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - """ - - _attribute_map = { - 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, failover_policies=None): - self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py deleted file mode 100755 index 99cc2769403b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicy(Model): - """The failover policy for a given region of a database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region in which the database - account replicates to. Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region in which the database account - exists. - :type location_name: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py deleted file mode 100755 index 8bc82bde2c3f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Location(Model): - """A region in which the Azure DocumentDB database account is deployed. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region within the database account. - Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region. - :type location_name: str - :ivar document_endpoint: The connection endpoint for the specific region. - Example: - https://<accountName>-<locationName>.documents.azure.com:443/ - :vartype document_endpoint: str - :param provisioning_state: - :type provisioning_state: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.document_endpoint = None - self.provisioning_state = provisioning_state - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py deleted file mode 100755 index d5e887d0b78a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """A database account resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, location, tags=None): - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py deleted file mode 100755 index 27ed7c069537..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .database_accounts_operations import DatabaseAccountsOperations - -__all__ = [ - 'DatabaseAccountsOperations', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py deleted file mode 100755 index 2bb39b1f6839..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py +++ /dev/null @@ -1,918 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrestazure.azure_operation import AzureOperationPoller -import uuid - -from .. import models - - -class DatabaseAccountsOperations(object): - """DatabaseAccountsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". - """ - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-04-08" - - self.config = config - - def get( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Retrieves the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def patch( - self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): - """Patches the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param tags: - :type tags: dict - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - update_parameters = models.DatabaseAccountPatchParameters(tags=tags) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(update_parameters, 'DatabaseAccountPatchParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.patch(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def create_or_update( - self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): - """Creates or updates an Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param create_update_parameters: The parameters to provide for the - current database account. - :type create_update_parameters: - :class:`DatabaseAccountCreateUpdateParameters - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def delete( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Deletes an existing Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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 - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - def long_running_send(): - - request = self._client.delete(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def failover_priority_change( - self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): - """Changes the failover priority for the Azure DocumentDB database - account. A failover priority of 0 indicates a write region. The maximum - value for a failover priority = (total number of regions - 1). Failover - priority values must be unique for each of the regions in which the - database account exists. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(failover_parameters, 'FailoverPolicies') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - subscription. - - :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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - given resource group. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the access keys for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_connection_strings( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the connection strings for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListConnectionStringsResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_read_only_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the read-only access keys for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListReadOnlyKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def regenerate_key( - self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): - """Regenerates an access key for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param key_kind: The access key to regenerate. Possible values - include: 'primary', 'secondary', 'primaryReadonly', - 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def check_name_exists( - self, account_name, custom_headers=None, raw=False, **operation_config): - """Checks that the Azure DocumentDB account name already exists. A valid - account name may contain only lowercase letters, numbers, and the '-' - character, and must be between 3 and 50 characters. - - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: bool - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' - path_format_arguments = { - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.head(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = (response.status_code == 200) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py deleted file mode 100755 index 95ed79d29108..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.3" - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -from distutils import log as logger -import os.path - -from wheel.bdist_wheel import bdist_wheel -class azure_bdist_wheel(bdist_wheel): - """The purpose of this class is to build wheel a little differently than the sdist, - without requiring to build the wheel from the sdist (i.e. you can build the wheel - directly from source). - """ - - description = "Create an Azure wheel distribution" - - user_options = bdist_wheel.user_options + \ - [('azure-namespace-package=', None, - "Name of the deepest nspkg used")] - - def initialize_options(self): - bdist_wheel.initialize_options(self) - self.azure_namespace_package = None - - def finalize_options(self): - bdist_wheel.finalize_options(self) - if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): - raise ValueError("azure_namespace_package must finish by -nspkg") - - def run(self): - if not self.distribution.install_requires: - self.distribution.install_requires = [] - self.distribution.install_requires.append( - "{}>=2.0.0".format(self.azure_namespace_package)) - bdist_wheel.run(self) - - def write_record(self, bdist_dir, distinfo_dir): - if self.azure_namespace_package: - # Split and remove last part, assuming it's "nspkg" - subparts = self.azure_namespace_package.split('-')[0:-1] - folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] - for azure_sub_package in folder_with_init: - init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') - if os.path.isfile(init_file): - logger.info("manually remove {} while building the wheel".format(init_file)) - os.remove(init_file) - else: - raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) - bdist_wheel.write_record(self, bdist_dir, distinfo_dir) -cmdclass = { - 'bdist_wheel': azure_bdist_wheel, -} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json deleted file mode 100644 index 4d98fc12a39e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/build.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "autorest": "1.0.1-20170501-2300-nightly", - "date": "2017-05-01T20:13:42Z", - "version": "0.1.3" -} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt deleted file mode 100644 index 6ccb7f031ddd..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt +++ /dev/null @@ -1 +0,0 @@ --e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml deleted file mode 100644 index e7687fdae93b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml +++ /dev/null @@ -1,2 +0,0 @@ -[packaging] -auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg deleted file mode 100644 index 856f4164982c..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[bdist_wheel] -universal=1 -azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py deleted file mode 100644 index ddef54e31bb5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.py +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env python - -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup -try: - from azure_bdist_wheel import cmdclass -except ImportError: - from distutils import log as logger - logger.warn("Wheel is not available, disabling bdist_wheel hook") - cmdclass = {} - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-documentdb" -PACKAGE_PPRINT_NAME = "DocumentDB Management" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') - -# azure v0.x is not compatible with this package -# azure v0.x used to have a __version__ attribute (newer versions don't) -try: - import azure - try: - ver = azure.__version__ - raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' - ) - except AttributeError: - pass -except ImportError: - pass - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError('Cannot find version information') - -with open('README.rst', encoding='utf-8') as f: - readme = f.read() -with open('HISTORY.rst', encoding='utf-8') as f: - history = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + history, - license='MIT License', - author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', - classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'License :: OSI Approved :: MIT License', - ], - zip_safe=False, - packages=find_packages(), - install_requires=[ - 'msrestazure~=0.4.7', - 'azure-common~=1.1.5', - ], - cmdclass=cmdclass -) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml deleted file mode 100644 index d470d7f8673d..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml +++ /dev/null @@ -1,193 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] - method: HEAD - uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: ''} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['142'] - Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-ratelimit-remaining-tenant-reads: ['14999'] - x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] - status: {code: 404, message: NotFound} -- request: - body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], - "databaseAccountOfferType": "Standard"}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['121'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['910'] - x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Completed","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['33'] - x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml deleted file mode 100644 index e6f4e2348f8f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml +++ /dev/null @@ -1,467 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' - under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' - was not found."}}'} - headers: - Cache-Control: [no-cache] - Content-Length: ['214'] - Content-Type: [application/json; charset=utf-8] - Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-failure-cause: [gateway] - x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] - status: {code: 404, message: Not Found} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml deleted file mode 100644 index b2e4b82a9d9e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml +++ /dev/null @@ -1,272 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1144'] - x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1156'] - x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['2225'] - x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] - status: {code: 200, message: Ok} -- request: - body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['73'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 - response: - body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique - and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['170'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] - status: {code: 400, message: BadRequest} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 - response: - body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['239'] - x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] - status: {code: 200, message: Ok} -- request: - body: '{"keyKind": "primary"}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['22'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] - x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py deleted file mode 100644 index 902666a22cf0..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py +++ /dev/null @@ -1,146 +0,0 @@ -# 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. -#-------------------------------------------------------------------------- -import unittest - -import azure.mgmt.documentdb -from msrestazure.azure_exceptions import CloudError -from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer - - -class MgmtDocDBTest(AzureMgmtTestCase): - - def setUp(self): - super(MgmtDocDBTest, self).setUp() - self.client = self.create_mgmt_client( - azure.mgmt.documentdb.DocumentDB - ) - - @ResourceGroupPreparer() - def test_accounts_create(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtst') - - self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) - - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - account = async_docdb_create.result() - self.assertIsNotNone(account) - # Rest API issue - # self.assertEqual(account.name, account_name) - - @ResourceGroupPreparer() - def test_accounts_features(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtest') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - account = self.client.database_accounts.get( - resource_group.name, - account_name - ) - self.assertEqual(account.name, account_name) - - my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) - self.assertEqual(len(my_accounts), 1) - self.assertEqual(my_accounts[0].name, account_name) - - my_accounts = list(self.client.database_accounts.list()) - self.assertTrue(len(my_accounts) >= 1) - self.assertTrue(any(db.name == account_name for db in my_accounts)) - - # I guess we can make this test with no error, need to check with DocDB team - # This is an interesting test anyway, this implies that the serialization works - # and error message is available. Since this method does not return an object - # (i.e. no deserialization to test), this is a complete test. - # We are NOT here to test the RestAPI, but the Swagger file and Python code. - with self.assertRaises(CloudError) as cm: - async_change = self.client.database_accounts.failover_priority_change( - resource_group.name, - account_name, - [{ - 'location_name': self.region, - 'failover_priority': 0 - }] - ) - async_change.wait() - self.assertIn('Failover priorities must be unique', cm.exception.message) - - my_keys = self.client.database_accounts.list_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_master_key) - self.assertIsNotNone(my_keys.secondary_master_key) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - my_keys = self.client.database_accounts.list_read_only_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - async_regenerate = self.client.database_accounts.regenerate_key( - resource_group.name, - account_name, - "primary" - ) - async_regenerate.wait() - - @ResourceGroupPreparer() - def test_accounts_delete(self, resource_group, location): - account_name = self.get_resource_name('pydocumentdbtst') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - # Current implementation of msrestazure does not support 404 as a end of LRO delete - # https://github.com/Azure/msrestazure-for-python/issues/7 - async_delete = self.client.database_accounts.delete(resource_group.name, account_name) - try: - async_delete.wait() - except CloudError as err: - if err.response.status_code != 404: - raise - - -#------------------------------------------------------------------------------ -if __name__ == '__main__': - unittest.main() From 3cc51d7bc49839833e83a545a61bf4b5d052afe8 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:42:03 -0700 Subject: [PATCH 158/244] Revert "Remove docdb mgmt package from master (#6585)" (#6593) This reverts commit d2ed7d87997eac9b715ee9802c15349a12446b84. --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 + sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 + sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 + .../azure-mgmt-documentdb/azure/__init__.py | 1 + .../azure/mgmt/__init__.py | 1 + .../azure/mgmt/documentdb/__init__.py | 18 + .../azure/mgmt/documentdb/document_db.py | 83 ++ .../azure/mgmt/documentdb/models/__init__.py | 52 + .../documentdb/models/consistency_policy.py | 50 + .../documentdb/models/database_account.py | 117 +++ .../database_account_connection_string.py | 39 + ...tabase_account_create_update_parameters.py | 90 ++ ..._account_list_connection_strings_result.py | 29 + .../database_account_list_keys_result.py | 53 + ...base_account_list_read_only_keys_result.py | 41 + .../models/database_account_paged.py | 27 + .../database_account_patch_parameters.py | 31 + ...abase_account_regenerate_key_parameters.py | 33 + .../documentdb/models/document_db_enums.py | 41 + .../documentdb/models/failover_policies.py | 28 + .../mgmt/documentdb/models/failover_policy.py | 48 + .../azure/mgmt/documentdb/models/location.py | 58 ++ .../azure/mgmt/documentdb/models/resource.py | 54 ++ .../mgmt/documentdb/operations/__init__.py | 16 + .../database_accounts_operations.py | 918 ++++++++++++++++++ .../azure/mgmt/documentdb/version.py | 13 + .../azure_bdist_wheel.py | 54 ++ sdk/cosmos/azure-mgmt-documentdb/build.json | 5 + .../dev_requirements.txt | 1 + .../azure-mgmt-documentdb/sdk_packaging.toml | 2 + sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 + sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 ++ ..._mgmt_documentdb.test_accounts_create.yaml | 193 ++++ ..._mgmt_documentdb.test_accounts_delete.yaml | 467 +++++++++ ...gmt_documentdb.test_accounts_features.yaml | 272 ++++++ .../tests/test_mgmt_documentdb.py | 146 +++ 36 files changed, 3147 insertions(+) create mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in create mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json create mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt create mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst new file mode 100644 index 000000000000..eb7345b4071e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst @@ -0,0 +1,24 @@ +.. :changelog: + +Release History +=============== + +0.1.3 (2017-05-02) +++++++++++++++++++ + +* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix + +0.1.2 (2017-04-20) +++++++++++++++++++ + +This wheel package is now built with the azure wheel extension + +0.1.1 (2017-03-21) +++++++++++++++++++ + +* Added support for listing database account connection strings + +0.1.0 (2017-01-31) +++++++++++++++++++ + +* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in new file mode 100644 index 000000000000..9ecaeb15de50 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in @@ -0,0 +1,2 @@ +include *.rst +include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst new file mode 100644 index 000000000000..a5204ea75358 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/README.rst @@ -0,0 +1,52 @@ +Microsoft Azure SDK for Python +============================== + +This is the Microsoft Azure DocumentDB Management Client Library. + +Azure Resource Manager (ARM) is the next generation of management APIs that +replace the old Azure Service Management (ASM). + +This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. + +For the older Azure Service Management (ASM) libraries, see +`azure-servicemanagement-legacy `__ library. + +For a more complete set of Azure libraries, see the `azure `__ bundle package. + + +Compatibility +============= + +**IMPORTANT**: If you have an earlier version of the azure package +(version < 1.0), you should uninstall it before installing this package. + +You can check the version using pip: + +.. code:: shell + + pip freeze + +If you see azure==0.11.0 (or any version below 1.0), uninstall it first: + +.. code:: shell + + pip uninstall azure + + +Usage +===== + +For code examples, see `DocumentDB Management +`__ +on readthedocs.org. + + +Provide Feedback +================ + +If you encounter any bugs or have suggestions, please file an issue in the +`Issues `__ +section of the project. + + +.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py new file mode 100755 index 000000000000..3ec900145f1e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .document_db import DocumentDB +from .version import VERSION + +__all__ = ['DocumentDB'] + +__version__ = VERSION + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py new file mode 100755 index 000000000000..5eda44ab3e32 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import ServiceClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.database_accounts_operations import DatabaseAccountsOperations +from . import models + + +class DocumentDBConfiguration(AzureConfiguration): + """Configuration for DocumentDB + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not isinstance(subscription_id, str): + raise TypeError("Parameter 'subscription_id' must be str.") + if not base_url: + base_url = 'https://management.azure.com' + + super(DocumentDBConfiguration, self).__init__(base_url) + + self.add_user_agent('documentdb/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class DocumentDB(object): + """Azure DocumentDB Database Service Resource Provider REST API + + :ivar config: Configuration for client. + :vartype config: DocumentDBConfiguration + + :ivar database_accounts: DatabaseAccounts operations + :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) + self._client = ServiceClient(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2015-04-08' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.database_accounts = DatabaseAccountsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py new file mode 100755 index 000000000000..2ed68c568a84 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .consistency_policy import ConsistencyPolicy +from .location import Location +from .failover_policy import FailoverPolicy +from .database_account import DatabaseAccount +from .failover_policies import FailoverPolicies +from .resource import Resource +from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters +from .database_account_patch_parameters import DatabaseAccountPatchParameters +from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult +from .database_account_list_keys_result import DatabaseAccountListKeysResult +from .database_account_connection_string import DatabaseAccountConnectionString +from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult +from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters +from .database_account_paged import DatabaseAccountPaged +from .document_db_enums import ( + DatabaseAccountKind, + DatabaseAccountOfferType, + DefaultConsistencyLevel, + KeyKind, +) + +__all__ = [ + 'ConsistencyPolicy', + 'Location', + 'FailoverPolicy', + 'DatabaseAccount', + 'FailoverPolicies', + 'Resource', + 'DatabaseAccountCreateUpdateParameters', + 'DatabaseAccountPatchParameters', + 'DatabaseAccountListReadOnlyKeysResult', + 'DatabaseAccountListKeysResult', + 'DatabaseAccountConnectionString', + 'DatabaseAccountListConnectionStringsResult', + 'DatabaseAccountRegenerateKeyParameters', + 'DatabaseAccountPaged', + 'DatabaseAccountKind', + 'DatabaseAccountOfferType', + 'DefaultConsistencyLevel', + 'KeyKind', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py new file mode 100755 index 000000000000..d8cefd4c0b59 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConsistencyPolicy(Model): + """The consistency policy for the DocumentDB database account. + + :param default_consistency_level: The default consistency level and + configuration settings of the DocumentDB account. Possible values include: + 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' + :type default_consistency_level: str or :class:`DefaultConsistencyLevel + ` + :param max_staleness_prefix: When used with the Bounded Staleness + consistency level, this value represents the number of stale requests + tolerated. Accepted range for this value is 1 – 2,147,483,647. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_staleness_prefix: long + :param max_interval_in_seconds: When used with the Bounded Staleness + consistency level, this value represents the time amount of staleness (in + seconds) tolerated. Accepted range for this value is 1 - 100. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_interval_in_seconds: int + """ + + _validation = { + 'default_consistency_level': {'required': True}, + 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, + 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, + 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, + 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, + } + + def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): + self.default_consistency_level = default_consistency_level + self.max_staleness_prefix = max_staleness_prefix + self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py new file mode 100755 index 000000000000..89031adc35cb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py @@ -0,0 +1,117 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccount(Resource): + """A DocumentDB database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param provisioning_state: + :type provisioning_state: str + :ivar document_endpoint: The connection endpoint for the DocumentDB + database account. + :vartype document_endpoint: str + :ivar database_account_offer_type: The offer type for the DocumentDB + database account. Default value: Standard. Possible values include: + 'Standard' + :vartype database_account_offer_type: str or + :class:`DatabaseAccountOfferType + ` + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + :param consistency_policy: The consistency policy for the DocumentDB + database account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :ivar write_locations: An array that contains the write location for the + DocumentDB account. + :vartype write_locations: list of :class:`Location + ` + :ivar read_locations: An array that contains of the read locations enabled + for the DocumentDB account. + :vartype read_locations: list of :class:`Location + ` + :ivar failover_policies: An array that contains the regions ordered by + their failover priorities. + :vartype failover_policies: list of :class:`FailoverPolicy + ` + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'document_endpoint': {'readonly': True}, + 'database_account_offer_type': {'readonly': True}, + 'write_locations': {'readonly': True}, + 'read_locations': {'readonly': True}, + 'failover_policies': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, + 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, + 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): + super(DatabaseAccount, self).__init__(location=location, tags=tags) + self.kind = kind + self.provisioning_state = provisioning_state + self.document_endpoint = None + self.database_account_offer_type = None + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover + self.consistency_policy = consistency_policy + self.write_locations = None + self.read_locations = None + self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py new file mode 100755 index 000000000000..db1828208069 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountConnectionString(Model): + """Connection string for the DocumentDB account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar connection_string: Value of the connection string + :vartype connection_string: str + :ivar description: Description of the connection string + :vartype description: str + """ + + _validation = { + 'connection_string': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self): + self.connection_string = None + self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py new file mode 100755 index 000000000000..30978f482f0b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccountCreateUpdateParameters(Resource): + """Parameters to create and update DocumentDB database accounts. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param consistency_policy: The consistency policy for the DocumentDB + account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :param locations: An array that contains the georeplication locations + enabled for the DocumentDB account. + :type locations: list of :class:`Location + ` + :ivar database_account_offer_type: Default value: "Standard" . + :vartype database_account_offer_type: str + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'locations': {'required': True}, + 'database_account_offer_type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + } + + database_account_offer_type = "Standard" + + def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): + super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) + self.kind = kind + self.consistency_policy = consistency_policy + self.locations = locations + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py new file mode 100755 index 000000000000..7cddc00a3de1 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListConnectionStringsResult(Model): + """The connection strings for the given database account. + + :param connection_strings: An array that contains the connection strings + for the DocumentDB account. + :type connection_strings: list of :class:`DatabaseAccountConnectionString + ` + """ + + _attribute_map = { + 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, + } + + def __init__(self, connection_strings=None): + self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py new file mode 100755 index 000000000000..4d775054ac14 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListKeysResult(Model): + """The access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_master_key: Base 64 encoded value of the primary read-write + key. + :vartype primary_master_key: str + :ivar secondary_master_key: Base 64 encoded value of the secondary + read-write key. + :vartype secondary_master_key: str + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_master_key': {'readonly': True}, + 'secondary_master_key': {'readonly': True}, + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, + 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, + 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_master_key = None + self.secondary_master_key = None + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py new file mode 100755 index 000000000000..3330353950c6 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListReadOnlyKeysResult(Model): + """The read-only access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py new file mode 100755 index 000000000000..4cb94909c515 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class DatabaseAccountPaged(Paged): + """ + A paging container for iterating over a list of DatabaseAccount object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py new file mode 100755 index 000000000000..be78a4fd6817 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountPatchParameters(Model): + """Parameters for patching Azure DocumentDB database account properties. + + :param tags: + :type tags: dict + """ + + _validation = { + 'tags': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, tags): + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py new file mode 100755 index 000000000000..3bff90d33db3 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountRegenerateKeyParameters(Model): + """Parameters to regenerate the keys within the database account. + + :param key_kind: The access key to regenerate. Possible values include: + 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + """ + + _validation = { + 'key_kind': {'required': True}, + } + + _attribute_map = { + 'key_kind': {'key': 'keyKind', 'type': 'str'}, + } + + def __init__(self, key_kind): + self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py new file mode 100755 index 000000000000..1e87cecaeb2a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class DatabaseAccountKind(Enum): + + global_document_db = "GlobalDocumentDB" + mongo_db = "MongoDB" + parse = "Parse" + + +class DatabaseAccountOfferType(Enum): + + standard = "Standard" + + +class DefaultConsistencyLevel(Enum): + + eventual = "Eventual" + session = "Session" + bounded_staleness = "BoundedStaleness" + strong = "Strong" + consistent_prefix = "ConsistentPrefix" + + +class KeyKind(Enum): + + primary = "primary" + secondary = "secondary" + primary_readonly = "primaryReadonly" + secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py new file mode 100755 index 000000000000..4c3ebff5e3b5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicies(Model): + """The list of new failover policies for the failover priority change. + + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + """ + + _attribute_map = { + 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, failover_policies=None): + self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py new file mode 100755 index 000000000000..99cc2769403b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicy(Model): + """The failover policy for a given region of a database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region in which the database + account replicates to. Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region in which the database account + exists. + :type location_name: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py new file mode 100755 index 000000000000..8bc82bde2c3f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Location(Model): + """A region in which the Azure DocumentDB database account is deployed. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region within the database account. + Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region. + :type location_name: str + :ivar document_endpoint: The connection endpoint for the specific region. + Example: + https://<accountName>-<locationName>.documents.azure.com:443/ + :vartype document_endpoint: str + :param provisioning_state: + :type provisioning_state: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'document_endpoint': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.document_endpoint = None + self.provisioning_state = provisioning_state + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py new file mode 100755 index 000000000000..d5e887d0b78a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """A database account resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, location, tags=None): + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py new file mode 100755 index 000000000000..27ed7c069537 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py @@ -0,0 +1,16 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .database_accounts_operations import DatabaseAccountsOperations + +__all__ = [ + 'DatabaseAccountsOperations', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py new file mode 100755 index 000000000000..2bb39b1f6839 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py @@ -0,0 +1,918 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrestazure.azure_operation import AzureOperationPoller +import uuid + +from .. import models + + +class DatabaseAccountsOperations(object): + """DatabaseAccountsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". + """ + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-04-08" + + self.config = config + + def get( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Retrieves the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def patch( + self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): + """Patches the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param tags: + :type tags: dict + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + update_parameters = models.DatabaseAccountPatchParameters(tags=tags) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(update_parameters, 'DatabaseAccountPatchParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.patch(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def create_or_update( + self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates an Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param create_update_parameters: The parameters to provide for the + current database account. + :type create_update_parameters: + :class:`DatabaseAccountCreateUpdateParameters + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.put(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def delete( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Deletes an existing Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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 + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + def long_running_send(): + + request = self._client.delete(url, query_parameters) + return self._client.send(request, header_parameters, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def failover_priority_change( + self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): + """Changes the failover priority for the Azure DocumentDB database + account. A failover priority of 0 indicates a write region. The maximum + value for a failover priority = (total number of regions - 1). Failover + priority values must be unique for each of the regions in which the + database account exists. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(failover_parameters, 'FailoverPolicies') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + subscription. + + :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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + given resource group. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the access keys for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_connection_strings( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the connection strings for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListConnectionStringsResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_read_only_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the read-only access keys for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListReadOnlyKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def regenerate_key( + self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): + """Regenerates an access key for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param key_kind: The access key to regenerate. Possible values + include: 'primary', 'secondary', 'primaryReadonly', + 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def check_name_exists( + self, account_name, custom_headers=None, raw=False, **operation_config): + """Checks that the Azure DocumentDB account name already exists. A valid + account name may contain only lowercase letters, numbers, and the '-' + character, and must be between 3 and 50 characters. + + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: bool + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' + path_format_arguments = { + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.head(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = (response.status_code == 200) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py new file mode 100755 index 000000000000..95ed79d29108 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.3" + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py new file mode 100644 index 000000000000..8a81d1b61775 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py @@ -0,0 +1,54 @@ +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +from distutils import log as logger +import os.path + +from wheel.bdist_wheel import bdist_wheel +class azure_bdist_wheel(bdist_wheel): + """The purpose of this class is to build wheel a little differently than the sdist, + without requiring to build the wheel from the sdist (i.e. you can build the wheel + directly from source). + """ + + description = "Create an Azure wheel distribution" + + user_options = bdist_wheel.user_options + \ + [('azure-namespace-package=', None, + "Name of the deepest nspkg used")] + + def initialize_options(self): + bdist_wheel.initialize_options(self) + self.azure_namespace_package = None + + def finalize_options(self): + bdist_wheel.finalize_options(self) + if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): + raise ValueError("azure_namespace_package must finish by -nspkg") + + def run(self): + if not self.distribution.install_requires: + self.distribution.install_requires = [] + self.distribution.install_requires.append( + "{}>=2.0.0".format(self.azure_namespace_package)) + bdist_wheel.run(self) + + def write_record(self, bdist_dir, distinfo_dir): + if self.azure_namespace_package: + # Split and remove last part, assuming it's "nspkg" + subparts = self.azure_namespace_package.split('-')[0:-1] + folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] + for azure_sub_package in folder_with_init: + init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') + if os.path.isfile(init_file): + logger.info("manually remove {} while building the wheel".format(init_file)) + os.remove(init_file) + else: + raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) + bdist_wheel.write_record(self, bdist_dir, distinfo_dir) +cmdclass = { + 'bdist_wheel': azure_bdist_wheel, +} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json new file mode 100644 index 000000000000..4d98fc12a39e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/build.json @@ -0,0 +1,5 @@ +{ + "autorest": "1.0.1-20170501-2300-nightly", + "date": "2017-05-01T20:13:42Z", + "version": "0.1.3" +} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt new file mode 100644 index 000000000000..6ccb7f031ddd --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt @@ -0,0 +1 @@ +-e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml new file mode 100644 index 000000000000..e7687fdae93b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg new file mode 100644 index 000000000000..856f4164982c --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg @@ -0,0 +1,3 @@ +[bdist_wheel] +universal=1 +azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py new file mode 100644 index 000000000000..ddef54e31bb5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup +try: + from azure_bdist_wheel import cmdclass +except ImportError: + from distutils import log as logger + logger.warn("Wheel is not available, disabling bdist_wheel hook") + cmdclass = {} + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-documentdb" +PACKAGE_PPRINT_NAME = "DocumentDB Management" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.rst', encoding='utf-8') as f: + readme = f.read() +with open('HISTORY.rst', encoding='utf-8') as f: + history = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + history, + license='MIT License', + author='Microsoft Corporation', + author_email='ptvshelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(), + install_requires=[ + 'msrestazure~=0.4.7', + 'azure-common~=1.1.5', + ], + cmdclass=cmdclass +) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml new file mode 100644 index 000000000000..d470d7f8673d --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml @@ -0,0 +1,193 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] + method: HEAD + uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: ''} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['142'] + Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-ratelimit-remaining-tenant-reads: ['14999'] + x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] + status: {code: 404, message: NotFound} +- request: + body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], + "databaseAccountOfferType": "Standard"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['121'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['910'] + x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Completed","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['33'] + x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml new file mode 100644 index 000000000000..e6f4e2348f8f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml @@ -0,0 +1,467 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' + under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' + was not found."}}'} + headers: + Cache-Control: [no-cache] + Content-Length: ['214'] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-failure-cause: [gateway] + x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] + status: {code: 404, message: Not Found} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml new file mode 100644 index 000000000000..b2e4b82a9d9e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml @@ -0,0 +1,272 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1144'] + x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1156'] + x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2225'] + x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] + status: {code: 200, message: Ok} +- request: + body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['73'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 + response: + body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique + and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['170'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] + status: {code: 400, message: BadRequest} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 + response: + body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['239'] + x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] + status: {code: 200, message: Ok} +- request: + body: '{"keyKind": "primary"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['22'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] + x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py new file mode 100644 index 000000000000..902666a22cf0 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py @@ -0,0 +1,146 @@ +# 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. +#-------------------------------------------------------------------------- +import unittest + +import azure.mgmt.documentdb +from msrestazure.azure_exceptions import CloudError +from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer + + +class MgmtDocDBTest(AzureMgmtTestCase): + + def setUp(self): + super(MgmtDocDBTest, self).setUp() + self.client = self.create_mgmt_client( + azure.mgmt.documentdb.DocumentDB + ) + + @ResourceGroupPreparer() + def test_accounts_create(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtst') + + self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) + + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + account = async_docdb_create.result() + self.assertIsNotNone(account) + # Rest API issue + # self.assertEqual(account.name, account_name) + + @ResourceGroupPreparer() + def test_accounts_features(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtest') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + account = self.client.database_accounts.get( + resource_group.name, + account_name + ) + self.assertEqual(account.name, account_name) + + my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) + self.assertEqual(len(my_accounts), 1) + self.assertEqual(my_accounts[0].name, account_name) + + my_accounts = list(self.client.database_accounts.list()) + self.assertTrue(len(my_accounts) >= 1) + self.assertTrue(any(db.name == account_name for db in my_accounts)) + + # I guess we can make this test with no error, need to check with DocDB team + # This is an interesting test anyway, this implies that the serialization works + # and error message is available. Since this method does not return an object + # (i.e. no deserialization to test), this is a complete test. + # We are NOT here to test the RestAPI, but the Swagger file and Python code. + with self.assertRaises(CloudError) as cm: + async_change = self.client.database_accounts.failover_priority_change( + resource_group.name, + account_name, + [{ + 'location_name': self.region, + 'failover_priority': 0 + }] + ) + async_change.wait() + self.assertIn('Failover priorities must be unique', cm.exception.message) + + my_keys = self.client.database_accounts.list_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_master_key) + self.assertIsNotNone(my_keys.secondary_master_key) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + my_keys = self.client.database_accounts.list_read_only_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + async_regenerate = self.client.database_accounts.regenerate_key( + resource_group.name, + account_name, + "primary" + ) + async_regenerate.wait() + + @ResourceGroupPreparer() + def test_accounts_delete(self, resource_group, location): + account_name = self.get_resource_name('pydocumentdbtst') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + # Current implementation of msrestazure does not support 404 as a end of LRO delete + # https://github.com/Azure/msrestazure-for-python/issues/7 + async_delete = self.client.database_accounts.delete(resource_group.name, account_name) + try: + async_delete.wait() + except CloudError as err: + if err.response.status_code != 404: + raise + + +#------------------------------------------------------------------------------ +if __name__ == '__main__': + unittest.main() From 8057ef7a2a053367db43ab925d5a8a4b135df3d4 Mon Sep 17 00:00:00 2001 From: "openapi-bot[bot]" <37845953+openapi-bot[bot]@users.noreply.github.com> Date: Thu, 1 Aug 2019 05:35:08 +0000 Subject: [PATCH 159/244] Generated from 368b5914a375e09ef413285c932b72038a8af7e4 (#48) fix: sql preview model validation errors - Remove empty "body" for RESPONSE_SCHEMA_NOT_IN_SPEC errors - IsAzureMonitorTargetEnabled -> isAzureMonitorTargetEnabled - "State" -> "state" - emailAccountAdmins "true" -> true - Add 202 response for RestorePoints_Create - password -> certPassword for ManagedInstanceTdeCertificates_Create and TdeCertificates_Create --- .../azure-mgmt-sql/azure/mgmt/sql/__init__.py | 7 +- .../azure/mgmt/sql/_configuration.py | 49 + ...nt_client.py => _sql_management_client.py} | 215 +- .../azure/mgmt/sql/models/__init__.py | 1004 +- .../azure/mgmt/sql/models/_models.py | 8891 +++++++++++++++++ .../azure/mgmt/sql/models/_models_py3.py | 8891 +++++++++++++++++ .../azure/mgmt/sql/models/_paged_models.py | 885 ++ ...ums.py => _sql_management_client_enums.py} | 49 +- .../sql/models/automatic_tuning_options.py | 57 - .../models/automatic_tuning_options_py3.py | 57 - .../models/automatic_tuning_server_options.py | 56 - .../automatic_tuning_server_options_py3.py | 56 - .../backup_long_term_retention_policy.py | 62 - .../backup_long_term_retention_policy_py3.py | 62 - .../backup_short_term_retention_policy.py | 47 - ...ackup_short_term_retention_policy_paged.py | 27 - .../backup_short_term_retention_policy_py3.py | 47 - .../models/check_name_availability_request.py | 44 - .../check_name_availability_request_py3.py | 44 - .../check_name_availability_response.py | 54 - .../check_name_availability_response_py3.py | 54 - .../complete_database_restore_definition.py | 35 - ...omplete_database_restore_definition_py3.py | 35 - ...reate_database_restore_point_definition.py | 35 - ...e_database_restore_point_definition_py3.py | 35 - .../mgmt/sql/models/data_masking_policy.py | 80 - .../sql/models/data_masking_policy_py3.py | 80 - .../mgmt/sql/models/data_masking_rule.py | 129 - .../sql/models/data_masking_rule_paged.py | 27 - .../mgmt/sql/models/data_masking_rule_py3.py | 129 - .../azure/mgmt/sql/models/database.py | 237 - .../sql/models/database_automatic_tuning.py | 57 - .../models/database_automatic_tuning_py3.py | 57 - .../models/database_blob_auditing_policy.py | 165 - .../database_blob_auditing_policy_py3.py | 165 - .../mgmt/sql/models/database_operation.py | 115 - .../sql/models/database_operation_paged.py | 27 - .../mgmt/sql/models/database_operation_py3.py | 115 - .../azure/mgmt/sql/models/database_paged.py | 27 - .../azure/mgmt/sql/models/database_py3.py | 237 - .../models/database_security_alert_policy.py | 102 - .../database_security_alert_policy_py3.py | 102 - .../azure/mgmt/sql/models/database_update.py | 209 - .../mgmt/sql/models/database_update_py3.py | 209 - .../azure/mgmt/sql/models/database_usage.py | 66 - .../mgmt/sql/models/database_usage_paged.py | 27 - .../mgmt/sql/models/database_usage_py3.py | 66 - .../database_vulnerability_assessment.py | 67 - ...database_vulnerability_assessment_paged.py | 27 - .../database_vulnerability_assessment_py3.py | 67 - ..._vulnerability_assessment_rule_baseline.py | 50 - ...erability_assessment_rule_baseline_item.py | 35 - ...ility_assessment_rule_baseline_item_py3.py | 35 - ...nerability_assessment_rule_baseline_py3.py | 50 - ...e_vulnerability_assessment_scans_export.py | 48 - ...lnerability_assessment_scans_export_py3.py | 48 - .../mgmt/sql/models/edition_capability.py | 58 - .../mgmt/sql/models/edition_capability_py3.py | 58 - .../azure/mgmt/sql/models/elastic_pool.py | 95 - .../mgmt/sql/models/elastic_pool_activity.py | 151 - .../sql/models/elastic_pool_activity_paged.py | 27 - .../sql/models/elastic_pool_activity_py3.py | 151 - .../models/elastic_pool_database_activity.py | 125 - .../elastic_pool_database_activity_paged.py | 27 - .../elastic_pool_database_activity_py3.py | 125 - .../models/elastic_pool_edition_capability.py | 58 - .../elastic_pool_edition_capability_py3.py | 58 - .../mgmt/sql/models/elastic_pool_operation.py | 114 - .../models/elastic_pool_operation_paged.py | 27 - .../sql/models/elastic_pool_operation_py3.py | 114 - .../mgmt/sql/models/elastic_pool_paged.py | 27 - ...tabase_max_performance_level_capability.py | 58 - ...se_max_performance_level_capability_py3.py | 58 - ...tabase_min_performance_level_capability.py | 51 - ...se_min_performance_level_capability_py3.py | 51 - .../elastic_pool_per_database_settings.py | 32 - .../elastic_pool_per_database_settings_py3.py | 32 - ...astic_pool_performance_level_capability.py | 88 - ...c_pool_performance_level_capability_py3.py | 88 - .../azure/mgmt/sql/models/elastic_pool_py3.py | 95 - .../mgmt/sql/models/elastic_pool_update.py | 54 - .../sql/models/elastic_pool_update_py3.py | 54 - .../mgmt/sql/models/encryption_protector.py | 80 - .../sql/models/encryption_protector_paged.py | 27 - .../sql/models/encryption_protector_py3.py | 80 - .../azure/mgmt/sql/models/export_request.py | 63 - .../mgmt/sql/models/export_request_py3.py | 63 - .../extended_database_blob_auditing_policy.py | 165 - ...ended_database_blob_auditing_policy_py3.py | 165 - .../extended_server_blob_auditing_policy.py | 165 - ...xtended_server_blob_auditing_policy_py3.py | 165 - .../azure/mgmt/sql/models/failover_group.py | 88 - .../mgmt/sql/models/failover_group_paged.py | 27 - .../mgmt/sql/models/failover_group_py3.py | 88 - .../failover_group_read_only_endpoint.py | 30 - .../failover_group_read_only_endpoint_py3.py | 30 - .../failover_group_read_write_endpoint.py | 45 - .../failover_group_read_write_endpoint_py3.py | 45 - .../mgmt/sql/models/failover_group_update.py | 44 - .../sql/models/failover_group_update_py3.py | 44 - .../azure/mgmt/sql/models/firewall_rule.py | 68 - .../mgmt/sql/models/firewall_rule_paged.py | 27 - .../mgmt/sql/models/firewall_rule_py3.py | 68 - .../mgmt/sql/models/geo_backup_policy.py | 66 - .../sql/models/geo_backup_policy_paged.py | 27 - .../mgmt/sql/models/geo_backup_policy_py3.py | 66 - .../mgmt/sql/models/import_export_response.py | 87 - .../sql/models/import_export_response_py3.py | 87 - .../sql/models/import_extension_request.py | 81 - .../models/import_extension_request_py3.py | 81 - .../azure/mgmt/sql/models/import_request.py | 91 - .../mgmt/sql/models/import_request_py3.py | 91 - .../sql/models/instance_failover_group.py | 82 - .../models/instance_failover_group_paged.py | 27 - .../sql/models/instance_failover_group_py3.py | 82 - ...tance_failover_group_read_only_endpoint.py | 30 - ...e_failover_group_read_only_endpoint_py3.py | 30 - ...ance_failover_group_read_write_endpoint.py | 45 - ..._failover_group_read_write_endpoint_py3.py | 45 - .../azure/mgmt/sql/models/job.py | 56 - .../azure/mgmt/sql/models/job_agent.py | 67 - .../azure/mgmt/sql/models/job_agent_paged.py | 27 - .../azure/mgmt/sql/models/job_agent_py3.py | 67 - .../azure/mgmt/sql/models/job_agent_update.py | 28 - .../mgmt/sql/models/job_agent_update_py3.py | 28 - .../azure/mgmt/sql/models/job_credential.py | 55 - .../mgmt/sql/models/job_credential_paged.py | 27 - .../mgmt/sql/models/job_credential_py3.py | 55 - .../azure/mgmt/sql/models/job_execution.py | 113 - .../mgmt/sql/models/job_execution_paged.py | 27 - .../mgmt/sql/models/job_execution_py3.py | 113 - .../mgmt/sql/models/job_execution_target.py | 46 - .../sql/models/job_execution_target_py3.py | 46 - .../azure/mgmt/sql/models/job_paged.py | 27 - .../azure/mgmt/sql/models/job_py3.py | 56 - .../azure/mgmt/sql/models/job_schedule.py | 48 - .../azure/mgmt/sql/models/job_schedule_py3.py | 48 - .../azure/mgmt/sql/models/job_step.py | 75 - .../azure/mgmt/sql/models/job_step_action.py | 45 - .../mgmt/sql/models/job_step_action_py3.py | 45 - .../sql/models/job_step_execution_options.py | 49 - .../models/job_step_execution_options_py3.py | 49 - .../azure/mgmt/sql/models/job_step_output.py | 67 - .../mgmt/sql/models/job_step_output_py3.py | 67 - .../azure/mgmt/sql/models/job_step_paged.py | 27 - .../azure/mgmt/sql/models/job_step_py3.py | 75 - .../azure/mgmt/sql/models/job_target.py | 65 - .../azure/mgmt/sql/models/job_target_group.py | 49 - .../mgmt/sql/models/job_target_group_paged.py | 27 - .../mgmt/sql/models/job_target_group_py3.py | 49 - .../azure/mgmt/sql/models/job_target_py3.py | 65 - .../azure/mgmt/sql/models/job_version.py | 42 - .../mgmt/sql/models/job_version_paged.py | 27 - .../azure/mgmt/sql/models/job_version_py3.py | 42 - .../sql/models/license_type_capability.py | 45 - .../sql/models/license_type_capability_py3.py | 45 - .../mgmt/sql/models/location_capabilities.py | 58 - .../sql/models/location_capabilities_py3.py | 58 - .../mgmt/sql/models/log_size_capability.py | 41 - .../sql/models/log_size_capability_py3.py | 41 - .../sql/models/long_term_retention_backup.py | 73 - .../long_term_retention_backup_paged.py | 27 - .../models/long_term_retention_backup_py3.py | 73 - ...aged_backup_short_term_retention_policy.py | 47 - ...ackup_short_term_retention_policy_paged.py | 27 - ..._backup_short_term_retention_policy_py3.py | 47 - .../azure/mgmt/sql/models/managed_database.py | 136 - .../mgmt/sql/models/managed_database_paged.py | 27 - .../mgmt/sql/models/managed_database_py3.py | 136 - .../managed_database_security_alert_policy.py | 88 - ...ed_database_security_alert_policy_paged.py | 27 - ...aged_database_security_alert_policy_py3.py | 88 - .../sql/models/managed_database_update.py | 119 - .../sql/models/managed_database_update_py3.py | 119 - .../azure/mgmt/sql/models/managed_instance.py | 139 - .../managed_instance_edition_capability.py | 51 - ...managed_instance_edition_capability_py3.py | 51 - .../managed_instance_encryption_protector.py | 71 - ...ged_instance_encryption_protector_paged.py | 27 - ...naged_instance_encryption_protector_py3.py | 71 - .../managed_instance_family_capability.py | 73 - .../managed_instance_family_capability_py3.py | 73 - .../mgmt/sql/models/managed_instance_key.py | 72 - .../sql/models/managed_instance_key_paged.py | 27 - .../sql/models/managed_instance_key_py3.py | 72 - .../mgmt/sql/models/managed_instance_paged.py | 27 - .../sql/models/managed_instance_pair_info.py | 34 - .../models/managed_instance_pair_info_py3.py | 34 - .../mgmt/sql/models/managed_instance_py3.py | 139 - .../sql/models/managed_instance_update.py | 117 - .../sql/models/managed_instance_update_py3.py | 117 - .../managed_instance_vcores_capability.py | 50 - .../managed_instance_vcores_capability_py3.py | 50 - .../managed_instance_version_capability.py | 51 - ...managed_instance_version_capability_py3.py | 51 - ...naged_instance_vulnerability_assessment.py | 70 - ...instance_vulnerability_assessment_paged.py | 27 - ...d_instance_vulnerability_assessment_py3.py | 70 - .../managed_server_security_alert_policy.py | 88 - ...aged_server_security_alert_policy_paged.py | 27 - ...anaged_server_security_alert_policy_py3.py | 88 - .../mgmt/sql/models/max_size_capability.py | 41 - .../sql/models/max_size_capability_py3.py | 41 - .../sql/models/max_size_range_capability.py | 61 - .../models/max_size_range_capability_py3.py | 61 - .../azure/mgmt/sql/models/metric.py | 62 - .../mgmt/sql/models/metric_availability.py | 40 - .../sql/models/metric_availability_py3.py | 40 - .../mgmt/sql/models/metric_definition.py | 61 - .../sql/models/metric_definition_paged.py | 27 - .../mgmt/sql/models/metric_definition_py3.py | 61 - .../azure/mgmt/sql/models/metric_name.py | 40 - .../azure/mgmt/sql/models/metric_name_py3.py | 40 - .../azure/mgmt/sql/models/metric_paged.py | 27 - .../azure/mgmt/sql/models/metric_py3.py | 62 - .../azure/mgmt/sql/models/metric_value.py | 60 - .../azure/mgmt/sql/models/metric_value_py3.py | 60 - .../azure/mgmt/sql/models/operation.py | 53 - .../mgmt/sql/models/operation_display.py | 51 - .../mgmt/sql/models/operation_display_py3.py | 51 - .../azure/mgmt/sql/models/operation_impact.py | 51 - .../mgmt/sql/models/operation_impact_py3.py | 51 - .../azure/mgmt/sql/models/operation_paged.py | 27 - .../azure/mgmt/sql/models/operation_py3.py | 53 - .../azure/mgmt/sql/models/partner_info.py | 49 - .../azure/mgmt/sql/models/partner_info_py3.py | 49 - .../mgmt/sql/models/partner_region_info.py | 41 - .../sql/models/partner_region_info_py3.py | 41 - .../models/performance_level_capability.py | 41 - .../performance_level_capability_py3.py | 41 - .../azure/mgmt/sql/models/proxy_resource.py | 42 - .../mgmt/sql/models/proxy_resource_py3.py | 42 - .../sql/models/recommended_elastic_pool.py | 100 - .../models/recommended_elastic_pool_metric.py | 37 - .../recommended_elastic_pool_metric_paged.py | 27 - .../recommended_elastic_pool_metric_py3.py | 37 - .../models/recommended_elastic_pool_paged.py | 27 - .../models/recommended_elastic_pool_py3.py | 100 - .../mgmt/sql/models/recommended_index.py | 112 - .../mgmt/sql/models/recommended_index_py3.py | 112 - .../mgmt/sql/models/recoverable_database.py | 64 - .../sql/models/recoverable_database_paged.py | 27 - .../sql/models/recoverable_database_py3.py | 64 - .../models/recoverable_managed_database.py | 47 - .../recoverable_managed_database_paged.py | 27 - .../recoverable_managed_database_py3.py | 47 - .../azure/mgmt/sql/models/replication_link.py | 104 - .../mgmt/sql/models/replication_link_paged.py | 27 - .../mgmt/sql/models/replication_link_py3.py | 104 - .../azure/mgmt/sql/models/resource.py | 45 - .../mgmt/sql/models/resource_identity.py | 46 - .../mgmt/sql/models/resource_identity_py3.py | 46 - .../sql/models/resource_move_definition.py | 34 - .../models/resource_move_definition_py3.py | 34 - .../azure/mgmt/sql/models/resource_py3.py | 45 - .../sql/models/restorable_dropped_database.py | 89 - .../restorable_dropped_database_paged.py | 27 - .../models/restorable_dropped_database_py3.py | 89 - .../restorable_dropped_managed_database.py | 72 - ...storable_dropped_managed_database_paged.py | 27 - ...restorable_dropped_managed_database_py3.py | 72 - .../azure/mgmt/sql/models/restore_point.py | 71 - .../mgmt/sql/models/restore_point_paged.py | 27 - .../mgmt/sql/models/restore_point_py3.py | 71 - .../mgmt/sql/models/sensitivity_label.py | 58 - .../sql/models/sensitivity_label_paged.py | 27 - .../mgmt/sql/models/sensitivity_label_py3.py | 58 - .../azure/mgmt/sql/models/server.py | 86 - .../sql/models/server_automatic_tuning.py | 60 - .../sql/models/server_automatic_tuning_py3.py | 60 - .../models/server_azure_ad_administrator.py | 67 - .../server_azure_ad_administrator_paged.py | 27 - .../server_azure_ad_administrator_py3.py | 67 - .../sql/models/server_blob_auditing_policy.py | 160 - .../models/server_blob_auditing_policy_py3.py | 160 - .../sql/models/server_communication_link.py | 65 - .../models/server_communication_link_paged.py | 27 - .../models/server_communication_link_py3.py | 65 - .../sql/models/server_connection_policy.py | 60 - .../models/server_connection_policy_py3.py | 60 - .../azure/mgmt/sql/models/server_dns_alias.py | 47 - .../models/server_dns_alias_acquisition.py | 29 - .../server_dns_alias_acquisition_py3.py | 29 - .../mgmt/sql/models/server_dns_alias_paged.py | 27 - .../mgmt/sql/models/server_dns_alias_py3.py | 47 - .../azure/mgmt/sql/models/server_key.py | 78 - .../azure/mgmt/sql/models/server_key_paged.py | 27 - .../azure/mgmt/sql/models/server_key_py3.py | 78 - .../azure/mgmt/sql/models/server_paged.py | 27 - .../azure/mgmt/sql/models/server_py3.py | 86 - .../models/server_security_alert_policy.py | 88 - .../server_security_alert_policy_paged.py | 27 - .../server_security_alert_policy_py3.py | 88 - .../azure/mgmt/sql/models/server_update.py | 59 - .../mgmt/sql/models/server_update_py3.py | 59 - .../azure/mgmt/sql/models/server_usage.py | 66 - .../mgmt/sql/models/server_usage_paged.py | 27 - .../azure/mgmt/sql/models/server_usage_py3.py | 66 - .../sql/models/server_version_capability.py | 58 - .../models/server_version_capability_py3.py | 58 - .../models/server_vulnerability_assessment.py | 70 - .../server_vulnerability_assessment_paged.py | 27 - .../server_vulnerability_assessment_py3.py | 70 - .../mgmt/sql/models/service_objective.py | 69 - .../models/service_objective_capability.py | 78 - .../service_objective_capability_py3.py | 78 - .../sql/models/service_objective_paged.py | 27 - .../mgmt/sql/models/service_objective_py3.py | 69 - .../mgmt/sql/models/service_tier_advisor.py | 157 - .../sql/models/service_tier_advisor_paged.py | 27 - .../sql/models/service_tier_advisor_py3.py | 157 - .../azure/mgmt/sql/models/sku.py | 57 - .../azure/mgmt/sql/models/sku_py3.py | 57 - .../azure/mgmt/sql/models/slo_usage_metric.py | 57 - .../mgmt/sql/models/slo_usage_metric_py3.py | 57 - .../mgmt/sql/models/subscription_usage.py | 62 - .../sql/models/subscription_usage_paged.py | 27 - .../mgmt/sql/models/subscription_usage_py3.py | 62 - .../azure/mgmt/sql/models/sync_agent.py | 78 - .../sql/models/sync_agent_key_properties.py | 35 - .../models/sync_agent_key_properties_py3.py | 35 - .../sql/models/sync_agent_linked_database.py | 73 - .../sync_agent_linked_database_paged.py | 27 - .../models/sync_agent_linked_database_py3.py | 73 - .../azure/mgmt/sql/models/sync_agent_paged.py | 27 - .../azure/mgmt/sql/models/sync_agent_py3.py | 78 - .../sql/models/sync_database_id_properties.py | 35 - .../sync_database_id_properties_paged.py | 27 - .../models/sync_database_id_properties_py3.py | 35 - .../sql/models/sync_full_schema_properties.py | 40 - .../sync_full_schema_properties_paged.py | 27 - .../models/sync_full_schema_properties_py3.py | 40 - .../mgmt/sql/models/sync_full_schema_table.py | 55 - .../models/sync_full_schema_table_column.py | 65 - .../sync_full_schema_table_column_py3.py | 65 - .../sql/models/sync_full_schema_table_py3.py | 55 - .../azure/mgmt/sql/models/sync_group.py | 82 - .../sql/models/sync_group_log_properties.py | 61 - .../models/sync_group_log_properties_paged.py | 27 - .../models/sync_group_log_properties_py3.py | 61 - .../azure/mgmt/sql/models/sync_group_paged.py | 27 - .../azure/mgmt/sql/models/sync_group_py3.py | 82 - .../mgmt/sql/models/sync_group_schema.py | 33 - .../mgmt/sql/models/sync_group_schema_py3.py | 33 - .../sql/models/sync_group_schema_table.py | 32 - .../models/sync_group_schema_table_column.py | 36 - .../sync_group_schema_table_column_py3.py | 36 - .../sql/models/sync_group_schema_table_py3.py | 32 - .../azure/mgmt/sql/models/sync_member.py | 89 - .../mgmt/sql/models/sync_member_paged.py | 27 - .../azure/mgmt/sql/models/sync_member_py3.py | 89 - .../azure/mgmt/sql/models/tde_certificate.py | 54 - .../mgmt/sql/models/tde_certificate_py3.py | 54 - .../azure/mgmt/sql/models/tracked_resource.py | 53 - .../mgmt/sql/models/tracked_resource_py3.py | 53 - .../sql/models/transparent_data_encryption.py | 53 - .../transparent_data_encryption_activity.py | 60 - ...nsparent_data_encryption_activity_paged.py | 27 - ...ransparent_data_encryption_activity_py3.py | 60 - .../models/transparent_data_encryption_py3.py | 53 - .../azure/mgmt/sql/models/virtual_cluster.py | 66 - .../mgmt/sql/models/virtual_cluster_paged.py | 27 - .../mgmt/sql/models/virtual_cluster_py3.py | 66 - .../mgmt/sql/models/virtual_cluster_update.py | 49 - .../sql/models/virtual_cluster_update_py3.py | 49 - .../mgmt/sql/models/virtual_network_rule.py | 61 - .../sql/models/virtual_network_rule_paged.py | 27 - .../sql/models/virtual_network_rule_py3.py | 61 - ...y_assessment_recurring_scans_properties.py | 39 - ...sessment_recurring_scans_properties_py3.py | 39 - .../vulnerability_assessment_scan_error.py | 40 - ...vulnerability_assessment_scan_error_py3.py | 40 - .../vulnerability_assessment_scan_record.py | 88 - ...nerability_assessment_scan_record_paged.py | 27 - ...ulnerability_assessment_scan_record_py3.py | 88 - .../azure/mgmt/sql/operations/__init__.py | 166 +- ...ong_term_retention_policies_operations.py} | 4 +- ...ort_term_retention_policies_operations.py} | 17 +- ...rations.py => _capabilities_operations.py} | 3 +- ...y => _data_masking_policies_operations.py} | 4 +- ...s.py => _data_masking_rules_operations.py} | 17 +- ... _database_automatic_tuning_operations.py} | 4 +- ...base_blob_auditing_policies_operations.py} | 4 +- ..._operations.py => _database_operations.py} | 16 +- ...e_threat_detection_policies_operations.py} | 4 +- ...ions.py => _database_usages_operations.py} | 16 +- ...y_assessment_rule_baselines_operations.py} | 4 +- ...nerability_assessment_scans_operations.py} | 18 +- ...e_vulnerability_assessments_operations.py} | 18 +- ...operations.py => _databases_operations.py} | 146 +- ...=> _elastic_pool_activities_operations.py} | 16 +- ...ic_pool_database_activities_operations.py} | 16 +- ...rations.py => _elastic_pool_operations.py} | 16 +- ...ations.py => _elastic_pools_operations.py} | 132 +- ...y => _encryption_protectors_operations.py} | 17 +- ...base_blob_auditing_policies_operations.py} | 4 +- ...rver_blob_auditing_policies_operations.py} | 3 +- ...ions.py => _failover_groups_operations.py} | 17 +- ...tions.py => _firewall_rules_operations.py} | 18 +- ....py => _geo_backup_policies_operations.py} | 18 +- ...> _instance_failover_groups_operations.py} | 17 +- .../operations/_instance_pools_operations.py | 534 + ...perations.py => _job_agents_operations.py} | 17 +- ...ions.py => _job_credentials_operations.py} | 18 +- ...tions.py => _job_executions_operations.py} | 31 +- ....py => _job_step_executions_operations.py} | 17 +- ...operations.py => _job_steps_operations.py} | 33 +- ...y => _job_target_executions_operations.py} | 31 +- ...ns.py => _job_target_groups_operations.py} | 18 +- ...rations.py => _job_versions_operations.py} | 17 +- ...jobs_operations.py => _jobs_operations.py} | 18 +- ..._long_term_retention_backups_operations.py | 880 ++ ...ort_term_retention_policies_operations.py} | 17 +- ...ase_security_alert_policies_operations.py} | 18 +- ...database_sensitivity_labels_operations.py} | 190 +- ...y_assessment_rule_baselines_operations.py} | 4 +- ...nerability_assessment_scans_operations.py} | 18 +- ...e_vulnerability_assessments_operations.py} | 18 +- ...ns.py => _managed_databases_operations.py} | 17 +- ...tance_encryption_protectors_operations.py} | 17 +- ...y => _managed_instance_keys_operations.py} | 17 +- ...d_instance_tde_certificates_operations.py} | 2 + ...e_vulnerability_assessments_operations.py} | 18 +- ...ns.py => _managed_instances_operations.py} | 119 +- ...ort_term_retention_policies_operations.py} | 17 +- ...ver_security_alert_policies_operations.py} | 17 +- .../{operations.py => _operations.py} | 16 +- ... _recommended_elastic_pools_operations.py} | 31 +- ...y => _recoverable_databases_operations.py} | 17 +- ...coverable_managed_databases_operations.py} | 17 +- ...ns.py => _replication_links_operations.py} | 17 +- ...estorable_dropped_databases_operations.py} | 17 +- ...e_dropped_managed_databases_operations.py} | 17 +- ...tions.py => _restore_points_operations.py} | 17 +- ...s.py => _sensitivity_labels_operations.py} | 190 +- ...=> _server_automatic_tuning_operations.py} | 4 +- ...ver_azure_ad_administrators_operations.py} | 17 +- ...rver_blob_auditing_policies_operations.py} | 3 +- ..._server_communication_links_operations.py} | 17 +- ..._server_connection_policies_operations.py} | 4 +- ...s.py => _server_dns_aliases_operations.py} | 17 +- ...erations.py => _server_keys_operations.py} | 17 +- ...ver_security_alert_policies_operations.py} | 17 +- ...ations.py => _server_usages_operations.py} | 16 +- ...r_vulnerability_assessments_operations.py} | 18 +- ...s_operations.py => _servers_operations.py} | 32 +- ...s.py => _service_objectives_operations.py} | 17 +- ...y => _service_tier_advisors_operations.py} | 17 +- ....py => _subscription_usages_operations.py} | 17 +- ...erations.py => _sync_agents_operations.py} | 32 +- ...erations.py => _sync_groups_operations.py} | 59 +- ...rations.py => _sync_members_operations.py} | 31 +- ...ons.py => _tde_certificates_operations.py} | 2 + ..._data_encryption_activities_operations.py} | 16 +- ...ransparent_data_encryptions_operations.py} | 4 +- .../mgmt/sql/operations/_usages_operations.py | 120 + ...ons.py => _virtual_clusters_operations.py} | 31 +- ...y => _virtual_network_rules_operations.py} | 17 +- .../long_term_retention_backups_operations.py | 441 - 459 files changed, 22360 insertions(+), 24337 deletions(-) create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_configuration.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/{sql_management_client.py => _sql_management_client.py} (75%) create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/{sql_management_client_enums.py => _sql_management_client_enums.py} (95%) delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error_py3.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_paged.py delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_py3.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{backup_long_term_retention_policies_operations.py => _backup_long_term_retention_policies_operations.py} (99%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{backup_short_term_retention_policies_operations.py => _backup_short_term_retention_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{capabilities_operations.py => _capabilities_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{data_masking_policies_operations.py => _data_masking_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{data_masking_rules_operations.py => _data_masking_rules_operations.py} (96%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_automatic_tuning_operations.py => _database_automatic_tuning_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_blob_auditing_policies_operations.py => _database_blob_auditing_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_operations.py => _database_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_threat_detection_policies_operations.py => _database_threat_detection_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_usages_operations.py => _database_usages_operations.py} (92%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_vulnerability_assessment_rule_baselines_operations.py => _database_vulnerability_assessment_rule_baselines_operations.py} (99%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_vulnerability_assessment_scans_operations.py => _database_vulnerability_assessment_scans_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{database_vulnerability_assessments_operations.py => _database_vulnerability_assessments_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{databases_operations.py => _databases_operations.py} (92%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{elastic_pool_activities_operations.py => _elastic_pool_activities_operations.py} (92%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{elastic_pool_database_activities_operations.py => _elastic_pool_database_activities_operations.py} (92%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{elastic_pool_operations.py => _elastic_pool_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{elastic_pools_operations.py => _elastic_pools_operations.py} (85%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{encryption_protectors_operations.py => _encryption_protectors_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{extended_database_blob_auditing_policies_operations.py => _extended_database_blob_auditing_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{extended_server_blob_auditing_policies_operations.py => _extended_server_blob_auditing_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{failover_groups_operations.py => _failover_groups_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{firewall_rules_operations.py => _firewall_rules_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{geo_backup_policies_operations.py => _geo_backup_policies_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{instance_failover_groups_operations.py => _instance_failover_groups_operations.py} (98%) create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_pools_operations.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_agents_operations.py => _job_agents_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_credentials_operations.py => _job_credentials_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_executions_operations.py => _job_executions_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_step_executions_operations.py => _job_step_executions_operations.py} (96%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_steps_operations.py => _job_steps_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_target_executions_operations.py => _job_target_executions_operations.py} (96%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_target_groups_operations.py => _job_target_groups_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{job_versions_operations.py => _job_versions_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{jobs_operations.py => _jobs_operations.py} (97%) create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_backups_operations.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_backup_short_term_retention_policies_operations.py => _managed_backup_short_term_retention_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_database_security_alert_policies_operations.py => _managed_database_security_alert_policies_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_database_sensitivity_labels_operations.py => _managed_database_sensitivity_labels_operations.py} (70%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_database_vulnerability_assessment_rule_baselines_operations.py => _managed_database_vulnerability_assessment_rule_baselines_operations.py} (99%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_database_vulnerability_assessment_scans_operations.py => _managed_database_vulnerability_assessment_scans_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_database_vulnerability_assessments_operations.py => _managed_database_vulnerability_assessments_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_databases_operations.py => _managed_databases_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_instance_encryption_protectors_operations.py => _managed_instance_encryption_protectors_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_instance_keys_operations.py => _managed_instance_keys_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_instance_tde_certificates_operations.py => _managed_instance_tde_certificates_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_instance_vulnerability_assessments_operations.py => _managed_instance_vulnerability_assessments_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_instances_operations.py => _managed_instances_operations.py} (84%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py => _managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{managed_server_security_alert_policies_operations.py => _managed_server_security_alert_policies_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{operations.py => _operations.py} (90%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{recommended_elastic_pools_operations.py => _recommended_elastic_pools_operations.py} (94%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{recoverable_databases_operations.py => _recoverable_databases_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{recoverable_managed_databases_operations.py => _recoverable_managed_databases_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{replication_links_operations.py => _replication_links_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{restorable_dropped_databases_operations.py => _restorable_dropped_databases_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{restorable_dropped_managed_databases_operations.py => _restorable_dropped_managed_databases_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{restore_points_operations.py => _restore_points_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{sensitivity_labels_operations.py => _sensitivity_labels_operations.py} (70%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_automatic_tuning_operations.py => _server_automatic_tuning_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_azure_ad_administrators_operations.py => _server_azure_ad_administrators_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_blob_auditing_policies_operations.py => _server_blob_auditing_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_communication_links_operations.py => _server_communication_links_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_connection_policies_operations.py => _server_connection_policies_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_dns_aliases_operations.py => _server_dns_aliases_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_keys_operations.py => _server_keys_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_security_alert_policies_operations.py => _server_security_alert_policies_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_usages_operations.py => _server_usages_operations.py} (92%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{server_vulnerability_assessments_operations.py => _server_vulnerability_assessments_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{servers_operations.py => _servers_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{service_objectives_operations.py => _service_objectives_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{service_tier_advisors_operations.py => _service_tier_advisors_operations.py} (95%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{subscription_usages_operations.py => _subscription_usages_operations.py} (94%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{sync_agents_operations.py => _sync_agents_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{sync_groups_operations.py => _sync_groups_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{sync_members_operations.py => _sync_members_operations.py} (98%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{tde_certificates_operations.py => _tde_certificates_operations.py} (97%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{transparent_data_encryption_activities_operations.py => _transparent_data_encryption_activities_operations.py} (93%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{transparent_data_encryptions_operations.py => _transparent_data_encryptions_operations.py} (98%) create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_usages_operations.py rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{virtual_clusters_operations.py => _virtual_clusters_operations.py} (96%) rename sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/{virtual_network_rules_operations.py => _virtual_network_rules_operations.py} (97%) delete mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/long_term_retention_backups_operations.py diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/__init__.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/__init__.py index 33b83233be3c..48b056c94dfa 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/__init__.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .sql_management_client import SqlManagementClient -from .version import VERSION +from ._configuration import SqlManagementClientConfiguration +from ._sql_management_client import SqlManagementClient +__all__ = ['SqlManagementClient', 'SqlManagementClientConfiguration'] -__all__ = ['SqlManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_configuration.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_configuration.py new file mode 100644 index 000000000000..ca7086f8dadf --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_configuration.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class SqlManagementClientConfiguration(AzureConfiguration): + """Configuration for SqlManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription ID that identifies an Azure + subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(SqlManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-sql/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py similarity index 75% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py index aae1ce917e14..1bedc764b599 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py @@ -11,122 +11,91 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.recoverable_databases_operations import RecoverableDatabasesOperations -from .operations.restorable_dropped_databases_operations import RestorableDroppedDatabasesOperations -from .operations.servers_operations import ServersOperations -from .operations.server_connection_policies_operations import ServerConnectionPoliciesOperations -from .operations.database_threat_detection_policies_operations import DatabaseThreatDetectionPoliciesOperations -from .operations.data_masking_policies_operations import DataMaskingPoliciesOperations -from .operations.data_masking_rules_operations import DataMaskingRulesOperations -from .operations.firewall_rules_operations import FirewallRulesOperations -from .operations.geo_backup_policies_operations import GeoBackupPoliciesOperations -from .operations.databases_operations import DatabasesOperations -from .operations.elastic_pools_operations import ElasticPoolsOperations -from .operations.recommended_elastic_pools_operations import RecommendedElasticPoolsOperations -from .operations.replication_links_operations import ReplicationLinksOperations -from .operations.server_azure_ad_administrators_operations import ServerAzureADAdministratorsOperations -from .operations.server_communication_links_operations import ServerCommunicationLinksOperations -from .operations.service_objectives_operations import ServiceObjectivesOperations -from .operations.elastic_pool_activities_operations import ElasticPoolActivitiesOperations -from .operations.elastic_pool_database_activities_operations import ElasticPoolDatabaseActivitiesOperations -from .operations.service_tier_advisors_operations import ServiceTierAdvisorsOperations -from .operations.transparent_data_encryptions_operations import TransparentDataEncryptionsOperations -from .operations.transparent_data_encryption_activities_operations import TransparentDataEncryptionActivitiesOperations -from .operations.server_usages_operations import ServerUsagesOperations -from .operations.database_usages_operations import DatabaseUsagesOperations -from .operations.database_automatic_tuning_operations import DatabaseAutomaticTuningOperations -from .operations.encryption_protectors_operations import EncryptionProtectorsOperations -from .operations.failover_groups_operations import FailoverGroupsOperations -from .operations.managed_instances_operations import ManagedInstancesOperations -from .operations.operations import Operations -from .operations.server_keys_operations import ServerKeysOperations -from .operations.sync_agents_operations import SyncAgentsOperations -from .operations.sync_groups_operations import SyncGroupsOperations -from .operations.sync_members_operations import SyncMembersOperations -from .operations.subscription_usages_operations import SubscriptionUsagesOperations -from .operations.virtual_clusters_operations import VirtualClustersOperations -from .operations.virtual_network_rules_operations import VirtualNetworkRulesOperations -from .operations.extended_database_blob_auditing_policies_operations import ExtendedDatabaseBlobAuditingPoliciesOperations -from .operations.extended_server_blob_auditing_policies_operations import ExtendedServerBlobAuditingPoliciesOperations -from .operations.server_blob_auditing_policies_operations import ServerBlobAuditingPoliciesOperations -from .operations.database_blob_auditing_policies_operations import DatabaseBlobAuditingPoliciesOperations -from .operations.database_vulnerability_assessment_rule_baselines_operations import DatabaseVulnerabilityAssessmentRuleBaselinesOperations -from .operations.database_vulnerability_assessments_operations import DatabaseVulnerabilityAssessmentsOperations -from .operations.job_agents_operations import JobAgentsOperations -from .operations.job_credentials_operations import JobCredentialsOperations -from .operations.job_executions_operations import JobExecutionsOperations -from .operations.jobs_operations import JobsOperations -from .operations.job_step_executions_operations import JobStepExecutionsOperations -from .operations.job_steps_operations import JobStepsOperations -from .operations.job_target_executions_operations import JobTargetExecutionsOperations -from .operations.job_target_groups_operations import JobTargetGroupsOperations -from .operations.job_versions_operations import JobVersionsOperations -from .operations.long_term_retention_backups_operations import LongTermRetentionBackupsOperations -from .operations.backup_long_term_retention_policies_operations import BackupLongTermRetentionPoliciesOperations -from .operations.managed_backup_short_term_retention_policies_operations import ManagedBackupShortTermRetentionPoliciesOperations -from .operations.managed_databases_operations import ManagedDatabasesOperations -from .operations.managed_restorable_dropped_database_backup_short_term_retention_policies_operations import ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations -from .operations.server_automatic_tuning_operations import ServerAutomaticTuningOperations -from .operations.server_dns_aliases_operations import ServerDnsAliasesOperations -from .operations.server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations -from .operations.restorable_dropped_managed_databases_operations import RestorableDroppedManagedDatabasesOperations -from .operations.restore_points_operations import RestorePointsOperations -from .operations.managed_database_security_alert_policies_operations import ManagedDatabaseSecurityAlertPoliciesOperations -from .operations.managed_server_security_alert_policies_operations import ManagedServerSecurityAlertPoliciesOperations -from .operations.sensitivity_labels_operations import SensitivityLabelsOperations -from .operations.database_operations import DatabaseOperations -from .operations.elastic_pool_operations import ElasticPoolOperations -from .operations.capabilities_operations import CapabilitiesOperations -from .operations.database_vulnerability_assessment_scans_operations import DatabaseVulnerabilityAssessmentScansOperations -from .operations.managed_database_vulnerability_assessment_rule_baselines_operations import ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations -from .operations.managed_database_vulnerability_assessment_scans_operations import ManagedDatabaseVulnerabilityAssessmentScansOperations -from .operations.managed_database_vulnerability_assessments_operations import ManagedDatabaseVulnerabilityAssessmentsOperations -from .operations.instance_failover_groups_operations import InstanceFailoverGroupsOperations -from .operations.backup_short_term_retention_policies_operations import BackupShortTermRetentionPoliciesOperations -from .operations.tde_certificates_operations import TdeCertificatesOperations -from .operations.managed_instance_tde_certificates_operations import ManagedInstanceTdeCertificatesOperations -from .operations.managed_instance_keys_operations import ManagedInstanceKeysOperations -from .operations.managed_instance_encryption_protectors_operations import ManagedInstanceEncryptionProtectorsOperations -from .operations.recoverable_managed_databases_operations import RecoverableManagedDatabasesOperations -from .operations.managed_instance_vulnerability_assessments_operations import ManagedInstanceVulnerabilityAssessmentsOperations -from .operations.server_vulnerability_assessments_operations import ServerVulnerabilityAssessmentsOperations -from .operations.managed_database_sensitivity_labels_operations import ManagedDatabaseSensitivityLabelsOperations -from . import models - - -class SqlManagementClientConfiguration(AzureConfiguration): - """Configuration for SqlManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The subscription ID that identifies an Azure - subscription. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(SqlManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-sql/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import SqlManagementClientConfiguration +from .operations import RecoverableDatabasesOperations +from .operations import RestorableDroppedDatabasesOperations +from .operations import ServersOperations +from .operations import ServerConnectionPoliciesOperations +from .operations import DatabaseThreatDetectionPoliciesOperations +from .operations import DataMaskingPoliciesOperations +from .operations import DataMaskingRulesOperations +from .operations import FirewallRulesOperations +from .operations import GeoBackupPoliciesOperations +from .operations import DatabasesOperations +from .operations import ElasticPoolsOperations +from .operations import RecommendedElasticPoolsOperations +from .operations import ReplicationLinksOperations +from .operations import ServerAzureADAdministratorsOperations +from .operations import ServerCommunicationLinksOperations +from .operations import ServiceObjectivesOperations +from .operations import ElasticPoolActivitiesOperations +from .operations import ElasticPoolDatabaseActivitiesOperations +from .operations import ServiceTierAdvisorsOperations +from .operations import TransparentDataEncryptionsOperations +from .operations import TransparentDataEncryptionActivitiesOperations +from .operations import ServerUsagesOperations +from .operations import DatabaseUsagesOperations +from .operations import DatabaseAutomaticTuningOperations +from .operations import EncryptionProtectorsOperations +from .operations import FailoverGroupsOperations +from .operations import Operations +from .operations import ServerKeysOperations +from .operations import SyncAgentsOperations +from .operations import SyncGroupsOperations +from .operations import SyncMembersOperations +from .operations import SubscriptionUsagesOperations +from .operations import VirtualClustersOperations +from .operations import VirtualNetworkRulesOperations +from .operations import ExtendedDatabaseBlobAuditingPoliciesOperations +from .operations import ExtendedServerBlobAuditingPoliciesOperations +from .operations import ServerBlobAuditingPoliciesOperations +from .operations import DatabaseBlobAuditingPoliciesOperations +from .operations import DatabaseVulnerabilityAssessmentRuleBaselinesOperations +from .operations import DatabaseVulnerabilityAssessmentsOperations +from .operations import JobAgentsOperations +from .operations import JobCredentialsOperations +from .operations import JobExecutionsOperations +from .operations import JobsOperations +from .operations import JobStepExecutionsOperations +from .operations import JobStepsOperations +from .operations import JobTargetExecutionsOperations +from .operations import JobTargetGroupsOperations +from .operations import JobVersionsOperations +from .operations import LongTermRetentionBackupsOperations +from .operations import BackupLongTermRetentionPoliciesOperations +from .operations import ManagedBackupShortTermRetentionPoliciesOperations +from .operations import ManagedDatabasesOperations +from .operations import ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations +from .operations import ServerAutomaticTuningOperations +from .operations import ServerDnsAliasesOperations +from .operations import ServerSecurityAlertPoliciesOperations +from .operations import RestorableDroppedManagedDatabasesOperations +from .operations import RestorePointsOperations +from .operations import ManagedDatabaseSecurityAlertPoliciesOperations +from .operations import ManagedServerSecurityAlertPoliciesOperations +from .operations import SensitivityLabelsOperations +from .operations import DatabaseOperations +from .operations import ElasticPoolOperations +from .operations import CapabilitiesOperations +from .operations import DatabaseVulnerabilityAssessmentScansOperations +from .operations import ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations +from .operations import ManagedDatabaseVulnerabilityAssessmentScansOperations +from .operations import ManagedDatabaseVulnerabilityAssessmentsOperations +from .operations import InstanceFailoverGroupsOperations +from .operations import BackupShortTermRetentionPoliciesOperations +from .operations import TdeCertificatesOperations +from .operations import ManagedInstanceTdeCertificatesOperations +from .operations import ManagedInstanceKeysOperations +from .operations import ManagedInstanceEncryptionProtectorsOperations +from .operations import RecoverableManagedDatabasesOperations +from .operations import ManagedInstanceVulnerabilityAssessmentsOperations +from .operations import ServerVulnerabilityAssessmentsOperations +from .operations import ManagedDatabaseSensitivityLabelsOperations +from .operations import InstancePoolsOperations +from .operations import UsagesOperations +from .operations import ManagedInstancesOperations +from . import models class SqlManagementClient(SDKClient): @@ -187,8 +156,6 @@ class SqlManagementClient(SDKClient): :vartype encryption_protectors: azure.mgmt.sql.operations.EncryptionProtectorsOperations :ivar failover_groups: FailoverGroups operations :vartype failover_groups: azure.mgmt.sql.operations.FailoverGroupsOperations - :ivar managed_instances: ManagedInstances operations - :vartype managed_instances: azure.mgmt.sql.operations.ManagedInstancesOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.sql.operations.Operations :ivar server_keys: ServerKeys operations @@ -295,6 +262,12 @@ class SqlManagementClient(SDKClient): :vartype server_vulnerability_assessments: azure.mgmt.sql.operations.ServerVulnerabilityAssessmentsOperations :ivar managed_database_sensitivity_labels: ManagedDatabaseSensitivityLabels operations :vartype managed_database_sensitivity_labels: azure.mgmt.sql.operations.ManagedDatabaseSensitivityLabelsOperations + :ivar instance_pools: InstancePools operations + :vartype instance_pools: azure.mgmt.sql.operations.InstancePoolsOperations + :ivar usages: Usages operations + :vartype usages: azure.mgmt.sql.operations.UsagesOperations + :ivar managed_instances: ManagedInstances operations + :vartype managed_instances: azure.mgmt.sql.operations.ManagedInstancesOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -367,8 +340,6 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.failover_groups = FailoverGroupsOperations( self._client, self.config, self._serialize, self._deserialize) - self.managed_instances = ManagedInstancesOperations( - self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) self.server_keys = ServerKeysOperations( @@ -475,3 +446,9 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.managed_database_sensitivity_labels = ManagedDatabaseSensitivityLabelsOperations( self._client, self.config, self._serialize, self._deserialize) + self.instance_pools = InstancePoolsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.usages = UsagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.managed_instances = ManagedInstancesOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py index 0a543180d7e4..57ac98e75568 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py @@ -10,375 +10,385 @@ # -------------------------------------------------------------------------- try: - from .recoverable_database_py3 import RecoverableDatabase - from .restorable_dropped_database_py3 import RestorableDroppedDatabase - from .tracked_resource_py3 import TrackedResource - from .resource_py3 import Resource - from .proxy_resource_py3 import ProxyResource - from .check_name_availability_request_py3 import CheckNameAvailabilityRequest - from .check_name_availability_response_py3 import CheckNameAvailabilityResponse - from .server_connection_policy_py3 import ServerConnectionPolicy - from .database_security_alert_policy_py3 import DatabaseSecurityAlertPolicy - from .data_masking_policy_py3 import DataMaskingPolicy - from .data_masking_rule_py3 import DataMaskingRule - from .firewall_rule_py3 import FirewallRule - from .geo_backup_policy_py3 import GeoBackupPolicy - from .import_extension_request_py3 import ImportExtensionRequest - from .import_export_response_py3 import ImportExportResponse - from .import_request_py3 import ImportRequest - from .export_request_py3 import ExportRequest - from .metric_value_py3 import MetricValue - from .metric_name_py3 import MetricName - from .metric_py3 import Metric - from .metric_availability_py3 import MetricAvailability - from .metric_definition_py3 import MetricDefinition - from .recommended_elastic_pool_metric_py3 import RecommendedElasticPoolMetric - from .recommended_elastic_pool_py3 import RecommendedElasticPool - from .replication_link_py3 import ReplicationLink - from .server_azure_ad_administrator_py3 import ServerAzureADAdministrator - from .server_communication_link_py3 import ServerCommunicationLink - from .service_objective_py3 import ServiceObjective - from .elastic_pool_activity_py3 import ElasticPoolActivity - from .elastic_pool_database_activity_py3 import ElasticPoolDatabaseActivity - from .operation_impact_py3 import OperationImpact - from .recommended_index_py3 import RecommendedIndex - from .transparent_data_encryption_py3 import TransparentDataEncryption - from .slo_usage_metric_py3 import SloUsageMetric - from .service_tier_advisor_py3 import ServiceTierAdvisor - from .transparent_data_encryption_activity_py3 import TransparentDataEncryptionActivity - from .server_usage_py3 import ServerUsage - from .database_usage_py3 import DatabaseUsage - from .automatic_tuning_options_py3 import AutomaticTuningOptions - from .database_automatic_tuning_py3 import DatabaseAutomaticTuning - from .encryption_protector_py3 import EncryptionProtector - from .failover_group_read_write_endpoint_py3 import FailoverGroupReadWriteEndpoint - from .failover_group_read_only_endpoint_py3 import FailoverGroupReadOnlyEndpoint - from .partner_info_py3 import PartnerInfo - from .failover_group_py3 import FailoverGroup - from .failover_group_update_py3 import FailoverGroupUpdate - from .resource_identity_py3 import ResourceIdentity - from .sku_py3 import Sku - from .managed_instance_py3 import ManagedInstance - from .managed_instance_update_py3 import ManagedInstanceUpdate - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .server_key_py3 import ServerKey - from .server_py3 import Server - from .server_update_py3 import ServerUpdate - from .sync_agent_py3 import SyncAgent - from .sync_agent_key_properties_py3 import SyncAgentKeyProperties - from .sync_agent_linked_database_py3 import SyncAgentLinkedDatabase - from .sync_database_id_properties_py3 import SyncDatabaseIdProperties - from .sync_full_schema_table_column_py3 import SyncFullSchemaTableColumn - from .sync_full_schema_table_py3 import SyncFullSchemaTable - from .sync_full_schema_properties_py3 import SyncFullSchemaProperties - from .sync_group_log_properties_py3 import SyncGroupLogProperties - from .sync_group_schema_table_column_py3 import SyncGroupSchemaTableColumn - from .sync_group_schema_table_py3 import SyncGroupSchemaTable - from .sync_group_schema_py3 import SyncGroupSchema - from .sync_group_py3 import SyncGroup - from .sync_member_py3 import SyncMember - from .subscription_usage_py3 import SubscriptionUsage - from .virtual_cluster_py3 import VirtualCluster - from .virtual_cluster_update_py3 import VirtualClusterUpdate - from .virtual_network_rule_py3 import VirtualNetworkRule - from .extended_database_blob_auditing_policy_py3 import ExtendedDatabaseBlobAuditingPolicy - from .extended_server_blob_auditing_policy_py3 import ExtendedServerBlobAuditingPolicy - from .server_blob_auditing_policy_py3 import ServerBlobAuditingPolicy - from .database_blob_auditing_policy_py3 import DatabaseBlobAuditingPolicy - from .database_vulnerability_assessment_rule_baseline_item_py3 import DatabaseVulnerabilityAssessmentRuleBaselineItem - from .database_vulnerability_assessment_rule_baseline_py3 import DatabaseVulnerabilityAssessmentRuleBaseline - from .vulnerability_assessment_recurring_scans_properties_py3 import VulnerabilityAssessmentRecurringScansProperties - from .database_vulnerability_assessment_py3 import DatabaseVulnerabilityAssessment - from .job_agent_py3 import JobAgent - from .job_agent_update_py3 import JobAgentUpdate - from .job_credential_py3 import JobCredential - from .job_execution_target_py3 import JobExecutionTarget - from .job_execution_py3 import JobExecution - from .job_schedule_py3 import JobSchedule - from .job_py3 import Job - from .job_step_action_py3 import JobStepAction - from .job_step_output_py3 import JobStepOutput - from .job_step_execution_options_py3 import JobStepExecutionOptions - from .job_step_py3 import JobStep - from .job_target_py3 import JobTarget - from .job_target_group_py3 import JobTargetGroup - from .job_version_py3 import JobVersion - from .long_term_retention_backup_py3 import LongTermRetentionBackup - from .backup_long_term_retention_policy_py3 import BackupLongTermRetentionPolicy - from .managed_backup_short_term_retention_policy_py3 import ManagedBackupShortTermRetentionPolicy - from .complete_database_restore_definition_py3 import CompleteDatabaseRestoreDefinition - from .managed_database_py3 import ManagedDatabase - from .managed_database_update_py3 import ManagedDatabaseUpdate - from .automatic_tuning_server_options_py3 import AutomaticTuningServerOptions - from .server_automatic_tuning_py3 import ServerAutomaticTuning - from .server_dns_alias_py3 import ServerDnsAlias - from .server_dns_alias_acquisition_py3 import ServerDnsAliasAcquisition - from .server_security_alert_policy_py3 import ServerSecurityAlertPolicy - from .restorable_dropped_managed_database_py3 import RestorableDroppedManagedDatabase - from .restore_point_py3 import RestorePoint - from .create_database_restore_point_definition_py3 import CreateDatabaseRestorePointDefinition - from .managed_database_security_alert_policy_py3 import ManagedDatabaseSecurityAlertPolicy - from .managed_server_security_alert_policy_py3 import ManagedServerSecurityAlertPolicy - from .sensitivity_label_py3 import SensitivityLabel - from .database_operation_py3 import DatabaseOperation - from .elastic_pool_operation_py3 import ElasticPoolOperation - from .max_size_capability_py3 import MaxSizeCapability - from .log_size_capability_py3 import LogSizeCapability - from .max_size_range_capability_py3 import MaxSizeRangeCapability - from .performance_level_capability_py3 import PerformanceLevelCapability - from .license_type_capability_py3 import LicenseTypeCapability - from .service_objective_capability_py3 import ServiceObjectiveCapability - from .edition_capability_py3 import EditionCapability - from .elastic_pool_per_database_min_performance_level_capability_py3 import ElasticPoolPerDatabaseMinPerformanceLevelCapability - from .elastic_pool_per_database_max_performance_level_capability_py3 import ElasticPoolPerDatabaseMaxPerformanceLevelCapability - from .elastic_pool_performance_level_capability_py3 import ElasticPoolPerformanceLevelCapability - from .elastic_pool_edition_capability_py3 import ElasticPoolEditionCapability - from .server_version_capability_py3 import ServerVersionCapability - from .managed_instance_vcores_capability_py3 import ManagedInstanceVcoresCapability - from .managed_instance_family_capability_py3 import ManagedInstanceFamilyCapability - from .managed_instance_edition_capability_py3 import ManagedInstanceEditionCapability - from .managed_instance_version_capability_py3 import ManagedInstanceVersionCapability - from .location_capabilities_py3 import LocationCapabilities - from .database_py3 import Database - from .database_update_py3 import DatabaseUpdate - from .resource_move_definition_py3 import ResourceMoveDefinition - from .elastic_pool_per_database_settings_py3 import ElasticPoolPerDatabaseSettings - from .elastic_pool_py3 import ElasticPool - from .elastic_pool_update_py3 import ElasticPoolUpdate - from .vulnerability_assessment_scan_error_py3 import VulnerabilityAssessmentScanError - from .vulnerability_assessment_scan_record_py3 import VulnerabilityAssessmentScanRecord - from .database_vulnerability_assessment_scans_export_py3 import DatabaseVulnerabilityAssessmentScansExport - from .instance_failover_group_read_write_endpoint_py3 import InstanceFailoverGroupReadWriteEndpoint - from .instance_failover_group_read_only_endpoint_py3 import InstanceFailoverGroupReadOnlyEndpoint - from .partner_region_info_py3 import PartnerRegionInfo - from .managed_instance_pair_info_py3 import ManagedInstancePairInfo - from .instance_failover_group_py3 import InstanceFailoverGroup - from .backup_short_term_retention_policy_py3 import BackupShortTermRetentionPolicy - from .tde_certificate_py3 import TdeCertificate - from .managed_instance_key_py3 import ManagedInstanceKey - from .managed_instance_encryption_protector_py3 import ManagedInstanceEncryptionProtector - from .recoverable_managed_database_py3 import RecoverableManagedDatabase - from .managed_instance_vulnerability_assessment_py3 import ManagedInstanceVulnerabilityAssessment - from .server_vulnerability_assessment_py3 import ServerVulnerabilityAssessment + from ._models_py3 import AutomaticTuningOptions + from ._models_py3 import AutomaticTuningServerOptions + from ._models_py3 import BackupLongTermRetentionPolicy + from ._models_py3 import BackupShortTermRetentionPolicy + from ._models_py3 import CheckNameAvailabilityRequest + from ._models_py3 import CheckNameAvailabilityResponse + from ._models_py3 import CompleteDatabaseRestoreDefinition + from ._models_py3 import CreateDatabaseRestorePointDefinition + from ._models_py3 import Database + from ._models_py3 import DatabaseAutomaticTuning + from ._models_py3 import DatabaseBlobAuditingPolicy + from ._models_py3 import DatabaseOperation + from ._models_py3 import DatabaseSecurityAlertPolicy + from ._models_py3 import DatabaseUpdate + from ._models_py3 import DatabaseUsage + from ._models_py3 import DatabaseVulnerabilityAssessment + from ._models_py3 import DatabaseVulnerabilityAssessmentRuleBaseline + from ._models_py3 import DatabaseVulnerabilityAssessmentRuleBaselineItem + from ._models_py3 import DatabaseVulnerabilityAssessmentScansExport + from ._models_py3 import DataMaskingPolicy + from ._models_py3 import DataMaskingRule + from ._models_py3 import EditionCapability + from ._models_py3 import ElasticPool + from ._models_py3 import ElasticPoolActivity + from ._models_py3 import ElasticPoolDatabaseActivity + from ._models_py3 import ElasticPoolEditionCapability + from ._models_py3 import ElasticPoolOperation + from ._models_py3 import ElasticPoolPerDatabaseMaxPerformanceLevelCapability + from ._models_py3 import ElasticPoolPerDatabaseMinPerformanceLevelCapability + from ._models_py3 import ElasticPoolPerDatabaseSettings + from ._models_py3 import ElasticPoolPerformanceLevelCapability + from ._models_py3 import ElasticPoolUpdate + from ._models_py3 import EncryptionProtector + from ._models_py3 import ExportRequest + from ._models_py3 import ExtendedDatabaseBlobAuditingPolicy + from ._models_py3 import ExtendedServerBlobAuditingPolicy + from ._models_py3 import FailoverGroup + from ._models_py3 import FailoverGroupReadOnlyEndpoint + from ._models_py3 import FailoverGroupReadWriteEndpoint + from ._models_py3 import FailoverGroupUpdate + from ._models_py3 import FirewallRule + from ._models_py3 import GeoBackupPolicy + from ._models_py3 import ImportExportResponse + from ._models_py3 import ImportExtensionRequest + from ._models_py3 import ImportRequest + from ._models_py3 import InstanceFailoverGroup + from ._models_py3 import InstanceFailoverGroupReadOnlyEndpoint + from ._models_py3 import InstanceFailoverGroupReadWriteEndpoint + from ._models_py3 import InstancePool + from ._models_py3 import InstancePoolUpdate + from ._models_py3 import Job + from ._models_py3 import JobAgent + from ._models_py3 import JobAgentUpdate + from ._models_py3 import JobCredential + from ._models_py3 import JobExecution + from ._models_py3 import JobExecutionTarget + from ._models_py3 import JobSchedule + from ._models_py3 import JobStep + from ._models_py3 import JobStepAction + from ._models_py3 import JobStepExecutionOptions + from ._models_py3 import JobStepOutput + from ._models_py3 import JobTarget + from ._models_py3 import JobTargetGroup + from ._models_py3 import JobVersion + from ._models_py3 import LicenseTypeCapability + from ._models_py3 import LocationCapabilities + from ._models_py3 import LogSizeCapability + from ._models_py3 import LongTermRetentionBackup + from ._models_py3 import ManagedBackupShortTermRetentionPolicy + from ._models_py3 import ManagedDatabase + from ._models_py3 import ManagedDatabaseSecurityAlertPolicy + from ._models_py3 import ManagedDatabaseUpdate + from ._models_py3 import ManagedInstance + from ._models_py3 import ManagedInstanceEditionCapability + from ._models_py3 import ManagedInstanceEncryptionProtector + from ._models_py3 import ManagedInstanceFamilyCapability + from ._models_py3 import ManagedInstanceKey + from ._models_py3 import ManagedInstancePairInfo + from ._models_py3 import ManagedInstanceUpdate + from ._models_py3 import ManagedInstanceVcoresCapability + from ._models_py3 import ManagedInstanceVersionCapability + from ._models_py3 import ManagedInstanceVulnerabilityAssessment + from ._models_py3 import ManagedServerSecurityAlertPolicy + from ._models_py3 import MaxSizeCapability + from ._models_py3 import MaxSizeRangeCapability + from ._models_py3 import Metric + from ._models_py3 import MetricAvailability + from ._models_py3 import MetricDefinition + from ._models_py3 import MetricName + from ._models_py3 import MetricValue + from ._models_py3 import Name + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationImpact + from ._models_py3 import PartnerInfo + from ._models_py3 import PartnerRegionInfo + from ._models_py3 import PerformanceLevelCapability + from ._models_py3 import ProxyResource + from ._models_py3 import RecommendedElasticPool + from ._models_py3 import RecommendedElasticPoolMetric + from ._models_py3 import RecommendedIndex + from ._models_py3 import RecoverableDatabase + from ._models_py3 import RecoverableManagedDatabase + from ._models_py3 import ReplicationLink + from ._models_py3 import Resource + from ._models_py3 import ResourceIdentity + from ._models_py3 import ResourceMoveDefinition + from ._models_py3 import RestorableDroppedDatabase + from ._models_py3 import RestorableDroppedManagedDatabase + from ._models_py3 import RestorePoint + from ._models_py3 import SensitivityLabel + from ._models_py3 import Server + from ._models_py3 import ServerAutomaticTuning + from ._models_py3 import ServerAzureADAdministrator + from ._models_py3 import ServerBlobAuditingPolicy + from ._models_py3 import ServerCommunicationLink + from ._models_py3 import ServerConnectionPolicy + from ._models_py3 import ServerDnsAlias + from ._models_py3 import ServerDnsAliasAcquisition + from ._models_py3 import ServerKey + from ._models_py3 import ServerSecurityAlertPolicy + from ._models_py3 import ServerUpdate + from ._models_py3 import ServerUsage + from ._models_py3 import ServerVersionCapability + from ._models_py3 import ServerVulnerabilityAssessment + from ._models_py3 import ServiceObjective + from ._models_py3 import ServiceObjectiveCapability + from ._models_py3 import ServiceTierAdvisor + from ._models_py3 import Sku + from ._models_py3 import SloUsageMetric + from ._models_py3 import SubscriptionUsage + from ._models_py3 import SyncAgent + from ._models_py3 import SyncAgentKeyProperties + from ._models_py3 import SyncAgentLinkedDatabase + from ._models_py3 import SyncDatabaseIdProperties + from ._models_py3 import SyncFullSchemaProperties + from ._models_py3 import SyncFullSchemaTable + from ._models_py3 import SyncFullSchemaTableColumn + from ._models_py3 import SyncGroup + from ._models_py3 import SyncGroupLogProperties + from ._models_py3 import SyncGroupSchema + from ._models_py3 import SyncGroupSchemaTable + from ._models_py3 import SyncGroupSchemaTableColumn + from ._models_py3 import SyncMember + from ._models_py3 import TdeCertificate + from ._models_py3 import TrackedResource + from ._models_py3 import TransparentDataEncryption + from ._models_py3 import TransparentDataEncryptionActivity + from ._models_py3 import Usage + from ._models_py3 import VirtualCluster + from ._models_py3 import VirtualClusterUpdate + from ._models_py3 import VirtualNetworkRule + from ._models_py3 import VulnerabilityAssessmentRecurringScansProperties + from ._models_py3 import VulnerabilityAssessmentScanError + from ._models_py3 import VulnerabilityAssessmentScanRecord except (SyntaxError, ImportError): - from .recoverable_database import RecoverableDatabase - from .restorable_dropped_database import RestorableDroppedDatabase - from .tracked_resource import TrackedResource - from .resource import Resource - from .proxy_resource import ProxyResource - from .check_name_availability_request import CheckNameAvailabilityRequest - from .check_name_availability_response import CheckNameAvailabilityResponse - from .server_connection_policy import ServerConnectionPolicy - from .database_security_alert_policy import DatabaseSecurityAlertPolicy - from .data_masking_policy import DataMaskingPolicy - from .data_masking_rule import DataMaskingRule - from .firewall_rule import FirewallRule - from .geo_backup_policy import GeoBackupPolicy - from .import_extension_request import ImportExtensionRequest - from .import_export_response import ImportExportResponse - from .import_request import ImportRequest - from .export_request import ExportRequest - from .metric_value import MetricValue - from .metric_name import MetricName - from .metric import Metric - from .metric_availability import MetricAvailability - from .metric_definition import MetricDefinition - from .recommended_elastic_pool_metric import RecommendedElasticPoolMetric - from .recommended_elastic_pool import RecommendedElasticPool - from .replication_link import ReplicationLink - from .server_azure_ad_administrator import ServerAzureADAdministrator - from .server_communication_link import ServerCommunicationLink - from .service_objective import ServiceObjective - from .elastic_pool_activity import ElasticPoolActivity - from .elastic_pool_database_activity import ElasticPoolDatabaseActivity - from .operation_impact import OperationImpact - from .recommended_index import RecommendedIndex - from .transparent_data_encryption import TransparentDataEncryption - from .slo_usage_metric import SloUsageMetric - from .service_tier_advisor import ServiceTierAdvisor - from .transparent_data_encryption_activity import TransparentDataEncryptionActivity - from .server_usage import ServerUsage - from .database_usage import DatabaseUsage - from .automatic_tuning_options import AutomaticTuningOptions - from .database_automatic_tuning import DatabaseAutomaticTuning - from .encryption_protector import EncryptionProtector - from .failover_group_read_write_endpoint import FailoverGroupReadWriteEndpoint - from .failover_group_read_only_endpoint import FailoverGroupReadOnlyEndpoint - from .partner_info import PartnerInfo - from .failover_group import FailoverGroup - from .failover_group_update import FailoverGroupUpdate - from .resource_identity import ResourceIdentity - from .sku import Sku - from .managed_instance import ManagedInstance - from .managed_instance_update import ManagedInstanceUpdate - from .operation_display import OperationDisplay - from .operation import Operation - from .server_key import ServerKey - from .server import Server - from .server_update import ServerUpdate - from .sync_agent import SyncAgent - from .sync_agent_key_properties import SyncAgentKeyProperties - from .sync_agent_linked_database import SyncAgentLinkedDatabase - from .sync_database_id_properties import SyncDatabaseIdProperties - from .sync_full_schema_table_column import SyncFullSchemaTableColumn - from .sync_full_schema_table import SyncFullSchemaTable - from .sync_full_schema_properties import SyncFullSchemaProperties - from .sync_group_log_properties import SyncGroupLogProperties - from .sync_group_schema_table_column import SyncGroupSchemaTableColumn - from .sync_group_schema_table import SyncGroupSchemaTable - from .sync_group_schema import SyncGroupSchema - from .sync_group import SyncGroup - from .sync_member import SyncMember - from .subscription_usage import SubscriptionUsage - from .virtual_cluster import VirtualCluster - from .virtual_cluster_update import VirtualClusterUpdate - from .virtual_network_rule import VirtualNetworkRule - from .extended_database_blob_auditing_policy import ExtendedDatabaseBlobAuditingPolicy - from .extended_server_blob_auditing_policy import ExtendedServerBlobAuditingPolicy - from .server_blob_auditing_policy import ServerBlobAuditingPolicy - from .database_blob_auditing_policy import DatabaseBlobAuditingPolicy - from .database_vulnerability_assessment_rule_baseline_item import DatabaseVulnerabilityAssessmentRuleBaselineItem - from .database_vulnerability_assessment_rule_baseline import DatabaseVulnerabilityAssessmentRuleBaseline - from .vulnerability_assessment_recurring_scans_properties import VulnerabilityAssessmentRecurringScansProperties - from .database_vulnerability_assessment import DatabaseVulnerabilityAssessment - from .job_agent import JobAgent - from .job_agent_update import JobAgentUpdate - from .job_credential import JobCredential - from .job_execution_target import JobExecutionTarget - from .job_execution import JobExecution - from .job_schedule import JobSchedule - from .job import Job - from .job_step_action import JobStepAction - from .job_step_output import JobStepOutput - from .job_step_execution_options import JobStepExecutionOptions - from .job_step import JobStep - from .job_target import JobTarget - from .job_target_group import JobTargetGroup - from .job_version import JobVersion - from .long_term_retention_backup import LongTermRetentionBackup - from .backup_long_term_retention_policy import BackupLongTermRetentionPolicy - from .managed_backup_short_term_retention_policy import ManagedBackupShortTermRetentionPolicy - from .complete_database_restore_definition import CompleteDatabaseRestoreDefinition - from .managed_database import ManagedDatabase - from .managed_database_update import ManagedDatabaseUpdate - from .automatic_tuning_server_options import AutomaticTuningServerOptions - from .server_automatic_tuning import ServerAutomaticTuning - from .server_dns_alias import ServerDnsAlias - from .server_dns_alias_acquisition import ServerDnsAliasAcquisition - from .server_security_alert_policy import ServerSecurityAlertPolicy - from .restorable_dropped_managed_database import RestorableDroppedManagedDatabase - from .restore_point import RestorePoint - from .create_database_restore_point_definition import CreateDatabaseRestorePointDefinition - from .managed_database_security_alert_policy import ManagedDatabaseSecurityAlertPolicy - from .managed_server_security_alert_policy import ManagedServerSecurityAlertPolicy - from .sensitivity_label import SensitivityLabel - from .database_operation import DatabaseOperation - from .elastic_pool_operation import ElasticPoolOperation - from .max_size_capability import MaxSizeCapability - from .log_size_capability import LogSizeCapability - from .max_size_range_capability import MaxSizeRangeCapability - from .performance_level_capability import PerformanceLevelCapability - from .license_type_capability import LicenseTypeCapability - from .service_objective_capability import ServiceObjectiveCapability - from .edition_capability import EditionCapability - from .elastic_pool_per_database_min_performance_level_capability import ElasticPoolPerDatabaseMinPerformanceLevelCapability - from .elastic_pool_per_database_max_performance_level_capability import ElasticPoolPerDatabaseMaxPerformanceLevelCapability - from .elastic_pool_performance_level_capability import ElasticPoolPerformanceLevelCapability - from .elastic_pool_edition_capability import ElasticPoolEditionCapability - from .server_version_capability import ServerVersionCapability - from .managed_instance_vcores_capability import ManagedInstanceVcoresCapability - from .managed_instance_family_capability import ManagedInstanceFamilyCapability - from .managed_instance_edition_capability import ManagedInstanceEditionCapability - from .managed_instance_version_capability import ManagedInstanceVersionCapability - from .location_capabilities import LocationCapabilities - from .database import Database - from .database_update import DatabaseUpdate - from .resource_move_definition import ResourceMoveDefinition - from .elastic_pool_per_database_settings import ElasticPoolPerDatabaseSettings - from .elastic_pool import ElasticPool - from .elastic_pool_update import ElasticPoolUpdate - from .vulnerability_assessment_scan_error import VulnerabilityAssessmentScanError - from .vulnerability_assessment_scan_record import VulnerabilityAssessmentScanRecord - from .database_vulnerability_assessment_scans_export import DatabaseVulnerabilityAssessmentScansExport - from .instance_failover_group_read_write_endpoint import InstanceFailoverGroupReadWriteEndpoint - from .instance_failover_group_read_only_endpoint import InstanceFailoverGroupReadOnlyEndpoint - from .partner_region_info import PartnerRegionInfo - from .managed_instance_pair_info import ManagedInstancePairInfo - from .instance_failover_group import InstanceFailoverGroup - from .backup_short_term_retention_policy import BackupShortTermRetentionPolicy - from .tde_certificate import TdeCertificate - from .managed_instance_key import ManagedInstanceKey - from .managed_instance_encryption_protector import ManagedInstanceEncryptionProtector - from .recoverable_managed_database import RecoverableManagedDatabase - from .managed_instance_vulnerability_assessment import ManagedInstanceVulnerabilityAssessment - from .server_vulnerability_assessment import ServerVulnerabilityAssessment -from .recoverable_database_paged import RecoverableDatabasePaged -from .restorable_dropped_database_paged import RestorableDroppedDatabasePaged -from .server_paged import ServerPaged -from .data_masking_rule_paged import DataMaskingRulePaged -from .firewall_rule_paged import FirewallRulePaged -from .geo_backup_policy_paged import GeoBackupPolicyPaged -from .metric_paged import MetricPaged -from .metric_definition_paged import MetricDefinitionPaged -from .database_paged import DatabasePaged -from .elastic_pool_paged import ElasticPoolPaged -from .recommended_elastic_pool_paged import RecommendedElasticPoolPaged -from .recommended_elastic_pool_metric_paged import RecommendedElasticPoolMetricPaged -from .replication_link_paged import ReplicationLinkPaged -from .server_azure_ad_administrator_paged import ServerAzureADAdministratorPaged -from .server_communication_link_paged import ServerCommunicationLinkPaged -from .service_objective_paged import ServiceObjectivePaged -from .elastic_pool_activity_paged import ElasticPoolActivityPaged -from .elastic_pool_database_activity_paged import ElasticPoolDatabaseActivityPaged -from .service_tier_advisor_paged import ServiceTierAdvisorPaged -from .transparent_data_encryption_activity_paged import TransparentDataEncryptionActivityPaged -from .server_usage_paged import ServerUsagePaged -from .database_usage_paged import DatabaseUsagePaged -from .encryption_protector_paged import EncryptionProtectorPaged -from .failover_group_paged import FailoverGroupPaged -from .managed_instance_paged import ManagedInstancePaged -from .operation_paged import OperationPaged -from .server_key_paged import ServerKeyPaged -from .sync_agent_paged import SyncAgentPaged -from .sync_agent_linked_database_paged import SyncAgentLinkedDatabasePaged -from .sync_database_id_properties_paged import SyncDatabaseIdPropertiesPaged -from .sync_full_schema_properties_paged import SyncFullSchemaPropertiesPaged -from .sync_group_log_properties_paged import SyncGroupLogPropertiesPaged -from .sync_group_paged import SyncGroupPaged -from .sync_member_paged import SyncMemberPaged -from .subscription_usage_paged import SubscriptionUsagePaged -from .virtual_cluster_paged import VirtualClusterPaged -from .virtual_network_rule_paged import VirtualNetworkRulePaged -from .database_vulnerability_assessment_paged import DatabaseVulnerabilityAssessmentPaged -from .job_agent_paged import JobAgentPaged -from .job_credential_paged import JobCredentialPaged -from .job_execution_paged import JobExecutionPaged -from .job_paged import JobPaged -from .job_step_paged import JobStepPaged -from .job_target_group_paged import JobTargetGroupPaged -from .job_version_paged import JobVersionPaged -from .long_term_retention_backup_paged import LongTermRetentionBackupPaged -from .managed_backup_short_term_retention_policy_paged import ManagedBackupShortTermRetentionPolicyPaged -from .managed_database_paged import ManagedDatabasePaged -from .server_dns_alias_paged import ServerDnsAliasPaged -from .server_security_alert_policy_paged import ServerSecurityAlertPolicyPaged -from .restorable_dropped_managed_database_paged import RestorableDroppedManagedDatabasePaged -from .restore_point_paged import RestorePointPaged -from .managed_database_security_alert_policy_paged import ManagedDatabaseSecurityAlertPolicyPaged -from .managed_server_security_alert_policy_paged import ManagedServerSecurityAlertPolicyPaged -from .sensitivity_label_paged import SensitivityLabelPaged -from .database_operation_paged import DatabaseOperationPaged -from .elastic_pool_operation_paged import ElasticPoolOperationPaged -from .vulnerability_assessment_scan_record_paged import VulnerabilityAssessmentScanRecordPaged -from .instance_failover_group_paged import InstanceFailoverGroupPaged -from .backup_short_term_retention_policy_paged import BackupShortTermRetentionPolicyPaged -from .managed_instance_key_paged import ManagedInstanceKeyPaged -from .managed_instance_encryption_protector_paged import ManagedInstanceEncryptionProtectorPaged -from .recoverable_managed_database_paged import RecoverableManagedDatabasePaged -from .managed_instance_vulnerability_assessment_paged import ManagedInstanceVulnerabilityAssessmentPaged -from .server_vulnerability_assessment_paged import ServerVulnerabilityAssessmentPaged -from .sql_management_client_enums import ( + from ._models import AutomaticTuningOptions + from ._models import AutomaticTuningServerOptions + from ._models import BackupLongTermRetentionPolicy + from ._models import BackupShortTermRetentionPolicy + from ._models import CheckNameAvailabilityRequest + from ._models import CheckNameAvailabilityResponse + from ._models import CompleteDatabaseRestoreDefinition + from ._models import CreateDatabaseRestorePointDefinition + from ._models import Database + from ._models import DatabaseAutomaticTuning + from ._models import DatabaseBlobAuditingPolicy + from ._models import DatabaseOperation + from ._models import DatabaseSecurityAlertPolicy + from ._models import DatabaseUpdate + from ._models import DatabaseUsage + from ._models import DatabaseVulnerabilityAssessment + from ._models import DatabaseVulnerabilityAssessmentRuleBaseline + from ._models import DatabaseVulnerabilityAssessmentRuleBaselineItem + from ._models import DatabaseVulnerabilityAssessmentScansExport + from ._models import DataMaskingPolicy + from ._models import DataMaskingRule + from ._models import EditionCapability + from ._models import ElasticPool + from ._models import ElasticPoolActivity + from ._models import ElasticPoolDatabaseActivity + from ._models import ElasticPoolEditionCapability + from ._models import ElasticPoolOperation + from ._models import ElasticPoolPerDatabaseMaxPerformanceLevelCapability + from ._models import ElasticPoolPerDatabaseMinPerformanceLevelCapability + from ._models import ElasticPoolPerDatabaseSettings + from ._models import ElasticPoolPerformanceLevelCapability + from ._models import ElasticPoolUpdate + from ._models import EncryptionProtector + from ._models import ExportRequest + from ._models import ExtendedDatabaseBlobAuditingPolicy + from ._models import ExtendedServerBlobAuditingPolicy + from ._models import FailoverGroup + from ._models import FailoverGroupReadOnlyEndpoint + from ._models import FailoverGroupReadWriteEndpoint + from ._models import FailoverGroupUpdate + from ._models import FirewallRule + from ._models import GeoBackupPolicy + from ._models import ImportExportResponse + from ._models import ImportExtensionRequest + from ._models import ImportRequest + from ._models import InstanceFailoverGroup + from ._models import InstanceFailoverGroupReadOnlyEndpoint + from ._models import InstanceFailoverGroupReadWriteEndpoint + from ._models import InstancePool + from ._models import InstancePoolUpdate + from ._models import Job + from ._models import JobAgent + from ._models import JobAgentUpdate + from ._models import JobCredential + from ._models import JobExecution + from ._models import JobExecutionTarget + from ._models import JobSchedule + from ._models import JobStep + from ._models import JobStepAction + from ._models import JobStepExecutionOptions + from ._models import JobStepOutput + from ._models import JobTarget + from ._models import JobTargetGroup + from ._models import JobVersion + from ._models import LicenseTypeCapability + from ._models import LocationCapabilities + from ._models import LogSizeCapability + from ._models import LongTermRetentionBackup + from ._models import ManagedBackupShortTermRetentionPolicy + from ._models import ManagedDatabase + from ._models import ManagedDatabaseSecurityAlertPolicy + from ._models import ManagedDatabaseUpdate + from ._models import ManagedInstance + from ._models import ManagedInstanceEditionCapability + from ._models import ManagedInstanceEncryptionProtector + from ._models import ManagedInstanceFamilyCapability + from ._models import ManagedInstanceKey + from ._models import ManagedInstancePairInfo + from ._models import ManagedInstanceUpdate + from ._models import ManagedInstanceVcoresCapability + from ._models import ManagedInstanceVersionCapability + from ._models import ManagedInstanceVulnerabilityAssessment + from ._models import ManagedServerSecurityAlertPolicy + from ._models import MaxSizeCapability + from ._models import MaxSizeRangeCapability + from ._models import Metric + from ._models import MetricAvailability + from ._models import MetricDefinition + from ._models import MetricName + from ._models import MetricValue + from ._models import Name + from ._models import Operation + from ._models import OperationDisplay + from ._models import OperationImpact + from ._models import PartnerInfo + from ._models import PartnerRegionInfo + from ._models import PerformanceLevelCapability + from ._models import ProxyResource + from ._models import RecommendedElasticPool + from ._models import RecommendedElasticPoolMetric + from ._models import RecommendedIndex + from ._models import RecoverableDatabase + from ._models import RecoverableManagedDatabase + from ._models import ReplicationLink + from ._models import Resource + from ._models import ResourceIdentity + from ._models import ResourceMoveDefinition + from ._models import RestorableDroppedDatabase + from ._models import RestorableDroppedManagedDatabase + from ._models import RestorePoint + from ._models import SensitivityLabel + from ._models import Server + from ._models import ServerAutomaticTuning + from ._models import ServerAzureADAdministrator + from ._models import ServerBlobAuditingPolicy + from ._models import ServerCommunicationLink + from ._models import ServerConnectionPolicy + from ._models import ServerDnsAlias + from ._models import ServerDnsAliasAcquisition + from ._models import ServerKey + from ._models import ServerSecurityAlertPolicy + from ._models import ServerUpdate + from ._models import ServerUsage + from ._models import ServerVersionCapability + from ._models import ServerVulnerabilityAssessment + from ._models import ServiceObjective + from ._models import ServiceObjectiveCapability + from ._models import ServiceTierAdvisor + from ._models import Sku + from ._models import SloUsageMetric + from ._models import SubscriptionUsage + from ._models import SyncAgent + from ._models import SyncAgentKeyProperties + from ._models import SyncAgentLinkedDatabase + from ._models import SyncDatabaseIdProperties + from ._models import SyncFullSchemaProperties + from ._models import SyncFullSchemaTable + from ._models import SyncFullSchemaTableColumn + from ._models import SyncGroup + from ._models import SyncGroupLogProperties + from ._models import SyncGroupSchema + from ._models import SyncGroupSchemaTable + from ._models import SyncGroupSchemaTableColumn + from ._models import SyncMember + from ._models import TdeCertificate + from ._models import TrackedResource + from ._models import TransparentDataEncryption + from ._models import TransparentDataEncryptionActivity + from ._models import Usage + from ._models import VirtualCluster + from ._models import VirtualClusterUpdate + from ._models import VirtualNetworkRule + from ._models import VulnerabilityAssessmentRecurringScansProperties + from ._models import VulnerabilityAssessmentScanError + from ._models import VulnerabilityAssessmentScanRecord +from ._paged_models import BackupShortTermRetentionPolicyPaged +from ._paged_models import DatabaseOperationPaged +from ._paged_models import DatabasePaged +from ._paged_models import DatabaseUsagePaged +from ._paged_models import DatabaseVulnerabilityAssessmentPaged +from ._paged_models import DataMaskingRulePaged +from ._paged_models import ElasticPoolActivityPaged +from ._paged_models import ElasticPoolDatabaseActivityPaged +from ._paged_models import ElasticPoolOperationPaged +from ._paged_models import ElasticPoolPaged +from ._paged_models import EncryptionProtectorPaged +from ._paged_models import FailoverGroupPaged +from ._paged_models import FirewallRulePaged +from ._paged_models import GeoBackupPolicyPaged +from ._paged_models import InstanceFailoverGroupPaged +from ._paged_models import InstancePoolPaged +from ._paged_models import JobAgentPaged +from ._paged_models import JobCredentialPaged +from ._paged_models import JobExecutionPaged +from ._paged_models import JobPaged +from ._paged_models import JobStepPaged +from ._paged_models import JobTargetGroupPaged +from ._paged_models import JobVersionPaged +from ._paged_models import LongTermRetentionBackupPaged +from ._paged_models import ManagedBackupShortTermRetentionPolicyPaged +from ._paged_models import ManagedDatabasePaged +from ._paged_models import ManagedDatabaseSecurityAlertPolicyPaged +from ._paged_models import ManagedInstanceEncryptionProtectorPaged +from ._paged_models import ManagedInstanceKeyPaged +from ._paged_models import ManagedInstancePaged +from ._paged_models import ManagedInstanceVulnerabilityAssessmentPaged +from ._paged_models import ManagedServerSecurityAlertPolicyPaged +from ._paged_models import MetricDefinitionPaged +from ._paged_models import MetricPaged +from ._paged_models import OperationPaged +from ._paged_models import RecommendedElasticPoolMetricPaged +from ._paged_models import RecommendedElasticPoolPaged +from ._paged_models import RecoverableDatabasePaged +from ._paged_models import RecoverableManagedDatabasePaged +from ._paged_models import ReplicationLinkPaged +from ._paged_models import RestorableDroppedDatabasePaged +from ._paged_models import RestorableDroppedManagedDatabasePaged +from ._paged_models import RestorePointPaged +from ._paged_models import SensitivityLabelPaged +from ._paged_models import ServerAzureADAdministratorPaged +from ._paged_models import ServerCommunicationLinkPaged +from ._paged_models import ServerDnsAliasPaged +from ._paged_models import ServerKeyPaged +from ._paged_models import ServerPaged +from ._paged_models import ServerSecurityAlertPolicyPaged +from ._paged_models import ServerUsagePaged +from ._paged_models import ServerVulnerabilityAssessmentPaged +from ._paged_models import ServiceObjectivePaged +from ._paged_models import ServiceTierAdvisorPaged +from ._paged_models import SubscriptionUsagePaged +from ._paged_models import SyncAgentLinkedDatabasePaged +from ._paged_models import SyncAgentPaged +from ._paged_models import SyncDatabaseIdPropertiesPaged +from ._paged_models import SyncFullSchemaPropertiesPaged +from ._paged_models import SyncGroupLogPropertiesPaged +from ._paged_models import SyncGroupPaged +from ._paged_models import SyncMemberPaged +from ._paged_models import TransparentDataEncryptionActivityPaged +from ._paged_models import UsagePaged +from ._paged_models import VirtualClusterPaged +from ._paged_models import VirtualNetworkRulePaged +from ._paged_models import VulnerabilityAssessmentScanRecordPaged +from ._sql_management_client_enums import ( CheckNameAvailabilityReason, ServerConnectionType, SecurityAlertPolicyState, @@ -411,9 +421,8 @@ ReadWriteEndpointFailoverPolicy, ReadOnlyEndpointFailoverPolicy, FailoverGroupReplicationRole, - IdentityType, - ManagedInstanceProxyOverride, OperationOrigin, + IdentityType, SyncAgentState, SyncMemberDbType, SyncGroupLogType, @@ -453,6 +462,10 @@ VulnerabilityAssessmentScanTriggerType, VulnerabilityAssessmentScanState, InstanceFailoverGroupReplicationRole, + InstancePoolLicenseType, + ManagedServerCreateMode, + ManagedInstanceLicenseType, + ManagedInstanceProxyOverride, LongTermRetentionDatabaseState, VulnerabilityAssessmentPolicyBaselineName, SensitivityLabelSource, @@ -460,157 +473,161 @@ ) __all__ = [ - 'RecoverableDatabase', - 'RestorableDroppedDatabase', - 'TrackedResource', - 'Resource', - 'ProxyResource', + 'AutomaticTuningOptions', + 'AutomaticTuningServerOptions', + 'BackupLongTermRetentionPolicy', + 'BackupShortTermRetentionPolicy', 'CheckNameAvailabilityRequest', 'CheckNameAvailabilityResponse', - 'ServerConnectionPolicy', + 'CompleteDatabaseRestoreDefinition', + 'CreateDatabaseRestorePointDefinition', + 'Database', + 'DatabaseAutomaticTuning', + 'DatabaseBlobAuditingPolicy', + 'DatabaseOperation', 'DatabaseSecurityAlertPolicy', + 'DatabaseUpdate', + 'DatabaseUsage', + 'DatabaseVulnerabilityAssessment', + 'DatabaseVulnerabilityAssessmentRuleBaseline', + 'DatabaseVulnerabilityAssessmentRuleBaselineItem', + 'DatabaseVulnerabilityAssessmentScansExport', 'DataMaskingPolicy', 'DataMaskingRule', + 'EditionCapability', + 'ElasticPool', + 'ElasticPoolActivity', + 'ElasticPoolDatabaseActivity', + 'ElasticPoolEditionCapability', + 'ElasticPoolOperation', + 'ElasticPoolPerDatabaseMaxPerformanceLevelCapability', + 'ElasticPoolPerDatabaseMinPerformanceLevelCapability', + 'ElasticPoolPerDatabaseSettings', + 'ElasticPoolPerformanceLevelCapability', + 'ElasticPoolUpdate', + 'EncryptionProtector', + 'ExportRequest', + 'ExtendedDatabaseBlobAuditingPolicy', + 'ExtendedServerBlobAuditingPolicy', + 'FailoverGroup', + 'FailoverGroupReadOnlyEndpoint', + 'FailoverGroupReadWriteEndpoint', + 'FailoverGroupUpdate', 'FirewallRule', 'GeoBackupPolicy', - 'ImportExtensionRequest', 'ImportExportResponse', + 'ImportExtensionRequest', 'ImportRequest', - 'ExportRequest', - 'MetricValue', - 'MetricName', + 'InstanceFailoverGroup', + 'InstanceFailoverGroupReadOnlyEndpoint', + 'InstanceFailoverGroupReadWriteEndpoint', + 'InstancePool', + 'InstancePoolUpdate', + 'Job', + 'JobAgent', + 'JobAgentUpdate', + 'JobCredential', + 'JobExecution', + 'JobExecutionTarget', + 'JobSchedule', + 'JobStep', + 'JobStepAction', + 'JobStepExecutionOptions', + 'JobStepOutput', + 'JobTarget', + 'JobTargetGroup', + 'JobVersion', + 'LicenseTypeCapability', + 'LocationCapabilities', + 'LogSizeCapability', + 'LongTermRetentionBackup', + 'ManagedBackupShortTermRetentionPolicy', + 'ManagedDatabase', + 'ManagedDatabaseSecurityAlertPolicy', + 'ManagedDatabaseUpdate', + 'ManagedInstance', + 'ManagedInstanceEditionCapability', + 'ManagedInstanceEncryptionProtector', + 'ManagedInstanceFamilyCapability', + 'ManagedInstanceKey', + 'ManagedInstancePairInfo', + 'ManagedInstanceUpdate', + 'ManagedInstanceVcoresCapability', + 'ManagedInstanceVersionCapability', + 'ManagedInstanceVulnerabilityAssessment', + 'ManagedServerSecurityAlertPolicy', + 'MaxSizeCapability', + 'MaxSizeRangeCapability', 'Metric', 'MetricAvailability', 'MetricDefinition', - 'RecommendedElasticPoolMetric', + 'MetricName', + 'MetricValue', + 'Name', + 'Operation', + 'OperationDisplay', + 'OperationImpact', + 'PartnerInfo', + 'PartnerRegionInfo', + 'PerformanceLevelCapability', + 'ProxyResource', 'RecommendedElasticPool', + 'RecommendedElasticPoolMetric', + 'RecommendedIndex', + 'RecoverableDatabase', + 'RecoverableManagedDatabase', 'ReplicationLink', + 'Resource', + 'ResourceIdentity', + 'ResourceMoveDefinition', + 'RestorableDroppedDatabase', + 'RestorableDroppedManagedDatabase', + 'RestorePoint', + 'SensitivityLabel', + 'Server', + 'ServerAutomaticTuning', 'ServerAzureADAdministrator', + 'ServerBlobAuditingPolicy', 'ServerCommunicationLink', + 'ServerConnectionPolicy', + 'ServerDnsAlias', + 'ServerDnsAliasAcquisition', + 'ServerKey', + 'ServerSecurityAlertPolicy', + 'ServerUpdate', + 'ServerUsage', + 'ServerVersionCapability', + 'ServerVulnerabilityAssessment', 'ServiceObjective', - 'ElasticPoolActivity', - 'ElasticPoolDatabaseActivity', - 'OperationImpact', - 'RecommendedIndex', - 'TransparentDataEncryption', - 'SloUsageMetric', + 'ServiceObjectiveCapability', 'ServiceTierAdvisor', - 'TransparentDataEncryptionActivity', - 'ServerUsage', - 'DatabaseUsage', - 'AutomaticTuningOptions', - 'DatabaseAutomaticTuning', - 'EncryptionProtector', - 'FailoverGroupReadWriteEndpoint', - 'FailoverGroupReadOnlyEndpoint', - 'PartnerInfo', - 'FailoverGroup', - 'FailoverGroupUpdate', - 'ResourceIdentity', 'Sku', - 'ManagedInstance', - 'ManagedInstanceUpdate', - 'OperationDisplay', - 'Operation', - 'ServerKey', - 'Server', - 'ServerUpdate', + 'SloUsageMetric', + 'SubscriptionUsage', 'SyncAgent', 'SyncAgentKeyProperties', 'SyncAgentLinkedDatabase', 'SyncDatabaseIdProperties', - 'SyncFullSchemaTableColumn', - 'SyncFullSchemaTable', 'SyncFullSchemaProperties', + 'SyncFullSchemaTable', + 'SyncFullSchemaTableColumn', + 'SyncGroup', 'SyncGroupLogProperties', - 'SyncGroupSchemaTableColumn', - 'SyncGroupSchemaTable', 'SyncGroupSchema', - 'SyncGroup', + 'SyncGroupSchemaTable', + 'SyncGroupSchemaTableColumn', 'SyncMember', - 'SubscriptionUsage', + 'TdeCertificate', + 'TrackedResource', + 'TransparentDataEncryption', + 'TransparentDataEncryptionActivity', + 'Usage', 'VirtualCluster', 'VirtualClusterUpdate', 'VirtualNetworkRule', - 'ExtendedDatabaseBlobAuditingPolicy', - 'ExtendedServerBlobAuditingPolicy', - 'ServerBlobAuditingPolicy', - 'DatabaseBlobAuditingPolicy', - 'DatabaseVulnerabilityAssessmentRuleBaselineItem', - 'DatabaseVulnerabilityAssessmentRuleBaseline', 'VulnerabilityAssessmentRecurringScansProperties', - 'DatabaseVulnerabilityAssessment', - 'JobAgent', - 'JobAgentUpdate', - 'JobCredential', - 'JobExecutionTarget', - 'JobExecution', - 'JobSchedule', - 'Job', - 'JobStepAction', - 'JobStepOutput', - 'JobStepExecutionOptions', - 'JobStep', - 'JobTarget', - 'JobTargetGroup', - 'JobVersion', - 'LongTermRetentionBackup', - 'BackupLongTermRetentionPolicy', - 'ManagedBackupShortTermRetentionPolicy', - 'CompleteDatabaseRestoreDefinition', - 'ManagedDatabase', - 'ManagedDatabaseUpdate', - 'AutomaticTuningServerOptions', - 'ServerAutomaticTuning', - 'ServerDnsAlias', - 'ServerDnsAliasAcquisition', - 'ServerSecurityAlertPolicy', - 'RestorableDroppedManagedDatabase', - 'RestorePoint', - 'CreateDatabaseRestorePointDefinition', - 'ManagedDatabaseSecurityAlertPolicy', - 'ManagedServerSecurityAlertPolicy', - 'SensitivityLabel', - 'DatabaseOperation', - 'ElasticPoolOperation', - 'MaxSizeCapability', - 'LogSizeCapability', - 'MaxSizeRangeCapability', - 'PerformanceLevelCapability', - 'LicenseTypeCapability', - 'ServiceObjectiveCapability', - 'EditionCapability', - 'ElasticPoolPerDatabaseMinPerformanceLevelCapability', - 'ElasticPoolPerDatabaseMaxPerformanceLevelCapability', - 'ElasticPoolPerformanceLevelCapability', - 'ElasticPoolEditionCapability', - 'ServerVersionCapability', - 'ManagedInstanceVcoresCapability', - 'ManagedInstanceFamilyCapability', - 'ManagedInstanceEditionCapability', - 'ManagedInstanceVersionCapability', - 'LocationCapabilities', - 'Database', - 'DatabaseUpdate', - 'ResourceMoveDefinition', - 'ElasticPoolPerDatabaseSettings', - 'ElasticPool', - 'ElasticPoolUpdate', 'VulnerabilityAssessmentScanError', 'VulnerabilityAssessmentScanRecord', - 'DatabaseVulnerabilityAssessmentScansExport', - 'InstanceFailoverGroupReadWriteEndpoint', - 'InstanceFailoverGroupReadOnlyEndpoint', - 'PartnerRegionInfo', - 'ManagedInstancePairInfo', - 'InstanceFailoverGroup', - 'BackupShortTermRetentionPolicy', - 'TdeCertificate', - 'ManagedInstanceKey', - 'ManagedInstanceEncryptionProtector', - 'RecoverableManagedDatabase', - 'ManagedInstanceVulnerabilityAssessment', - 'ServerVulnerabilityAssessment', 'RecoverableDatabasePaged', 'RestorableDroppedDatabasePaged', 'ServerPaged', @@ -635,7 +652,6 @@ 'DatabaseUsagePaged', 'EncryptionProtectorPaged', 'FailoverGroupPaged', - 'ManagedInstancePaged', 'OperationPaged', 'ServerKeyPaged', 'SyncAgentPaged', @@ -676,6 +692,9 @@ 'RecoverableManagedDatabasePaged', 'ManagedInstanceVulnerabilityAssessmentPaged', 'ServerVulnerabilityAssessmentPaged', + 'InstancePoolPaged', + 'UsagePaged', + 'ManagedInstancePaged', 'CheckNameAvailabilityReason', 'ServerConnectionType', 'SecurityAlertPolicyState', @@ -708,9 +727,8 @@ 'ReadWriteEndpointFailoverPolicy', 'ReadOnlyEndpointFailoverPolicy', 'FailoverGroupReplicationRole', - 'IdentityType', - 'ManagedInstanceProxyOverride', 'OperationOrigin', + 'IdentityType', 'SyncAgentState', 'SyncMemberDbType', 'SyncGroupLogType', @@ -750,6 +768,10 @@ 'VulnerabilityAssessmentScanTriggerType', 'VulnerabilityAssessmentScanState', 'InstanceFailoverGroupReplicationRole', + 'InstancePoolLicenseType', + 'ManagedServerCreateMode', + 'ManagedInstanceLicenseType', + 'ManagedInstanceProxyOverride', 'LongTermRetentionDatabaseState', 'VulnerabilityAssessmentPolicyBaselineName', 'SensitivityLabelSource', diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py new file mode 100644 index 000000000000..afc88d2be7ad --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py @@ -0,0 +1,8891 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AutomaticTuningOptions(Model): + """Automatic tuning properties for individual advisors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param desired_state: Automatic tuning option desired state. Possible + values include: 'Off', 'On', 'Default' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired + :ivar actual_state: Automatic tuning option actual state. Possible values + include: 'Off', 'On' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual + :ivar reason_code: Reason code if desired and actual state are different. + :vartype reason_code: int + :ivar reason_desc: Reason description if desired and actual state are + different. Possible values include: 'Default', 'Disabled', + 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', + 'QueryStoreReadOnly', 'NotSupported' + :vartype reason_desc: str or + ~azure.mgmt.sql.models.AutomaticTuningDisabledReason + """ + + _validation = { + 'actual_state': {'readonly': True}, + 'reason_code': {'readonly': True}, + 'reason_desc': {'readonly': True}, + } + + _attribute_map = { + 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, + 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, + 'reason_code': {'key': 'reasonCode', 'type': 'int'}, + 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningDisabledReason'}, + } + + def __init__(self, **kwargs): + super(AutomaticTuningOptions, self).__init__(**kwargs) + self.desired_state = kwargs.get('desired_state', None) + self.actual_state = None + self.reason_code = None + self.reason_desc = None + + +class AutomaticTuningServerOptions(Model): + """Automatic tuning properties for individual advisors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param desired_state: Automatic tuning option desired state. Possible + values include: 'Off', 'On', 'Default' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired + :ivar actual_state: Automatic tuning option actual state. Possible values + include: 'Off', 'On' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual + :ivar reason_code: Reason code if desired and actual state are different. + :vartype reason_code: int + :ivar reason_desc: Reason description if desired and actual state are + different. Possible values include: 'Default', 'Disabled', + 'AutoConfigured' + :vartype reason_desc: str or + ~azure.mgmt.sql.models.AutomaticTuningServerReason + """ + + _validation = { + 'actual_state': {'readonly': True}, + 'reason_code': {'readonly': True}, + 'reason_desc': {'readonly': True}, + } + + _attribute_map = { + 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, + 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, + 'reason_code': {'key': 'reasonCode', 'type': 'int'}, + 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningServerReason'}, + } + + def __init__(self, **kwargs): + super(AutomaticTuningServerOptions, self).__init__(**kwargs) + self.desired_state = kwargs.get('desired_state', None) + self.actual_state = None + self.reason_code = None + self.reason_desc = None + + +class Resource(Model): + """ARM resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ProxyResource(Resource): + """ARM proxy resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) + + +class BackupLongTermRetentionPolicy(ProxyResource): + """A long term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param weekly_retention: The weekly retention policy for an LTR backup in + an ISO 8601 format. + :type weekly_retention: str + :param monthly_retention: The monthly retention policy for an LTR backup + in an ISO 8601 format. + :type monthly_retention: str + :param yearly_retention: The yearly retention policy for an LTR backup in + an ISO 8601 format. + :type yearly_retention: str + :param week_of_year: The week of year to take the yearly backup in an ISO + 8601 format. + :type week_of_year: int + """ + + _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'}, + 'weekly_retention': {'key': 'properties.weeklyRetention', 'type': 'str'}, + 'monthly_retention': {'key': 'properties.monthlyRetention', 'type': 'str'}, + 'yearly_retention': {'key': 'properties.yearlyRetention', 'type': 'str'}, + 'week_of_year': {'key': 'properties.weekOfYear', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BackupLongTermRetentionPolicy, self).__init__(**kwargs) + self.weekly_retention = kwargs.get('weekly_retention', None) + self.monthly_retention = kwargs.get('monthly_retention', None) + self.yearly_retention = kwargs.get('yearly_retention', None) + self.week_of_year = kwargs.get('week_of_year', None) + + +class BackupShortTermRetentionPolicy(ProxyResource): + """A short term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param retention_days: The backup retention period in days. This is how + many days Point-in-Time Restore will be supported. + :type retention_days: int + """ + + _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'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) + self.retention_days = kwargs.get('retention_days', None) + + +class CheckNameAvailabilityRequest(Model): + """A request to check whether the specified name for a resource is available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name whose availability is to be checked. + :type name: str + :ivar type: Required. The type of resource that is used as the scope of + the availability check. Default value: "Microsoft.Sql/servers" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.Sql/servers" + + def __init__(self, **kwargs): + super(CheckNameAvailabilityRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class CheckNameAvailabilityResponse(Model): + """A response indicating whether the specified name for a resource is + available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar available: True if the name is available, otherwise false. + :vartype available: bool + :ivar message: A message explaining why the name is unavailable. Will be + null if the name is available. + :vartype message: str + :ivar name: The name whose availability was checked. + :vartype name: str + :ivar reason: The reason code explaining why the name is unavailable. Will + be null if the name is available. Possible values include: 'Invalid', + 'AlreadyExists' + :vartype reason: str or ~azure.mgmt.sql.models.CheckNameAvailabilityReason + """ + + _validation = { + 'available': {'readonly': True}, + 'message': {'readonly': True}, + 'name': {'readonly': True}, + 'reason': {'readonly': True}, + } + + _attribute_map = { + 'available': {'key': 'available', 'type': 'bool'}, + 'message': {'key': 'message', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'CheckNameAvailabilityReason'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailabilityResponse, self).__init__(**kwargs) + self.available = None + self.message = None + self.name = None + self.reason = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class CompleteDatabaseRestoreDefinition(Model): + """Contains the information necessary to perform a complete database restore + operation. + + All required parameters must be populated in order to send to Azure. + + :param last_backup_name: Required. The last backup name to apply + :type last_backup_name: str + """ + + _validation = { + 'last_backup_name': {'required': True}, + } + + _attribute_map = { + 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CompleteDatabaseRestoreDefinition, self).__init__(**kwargs) + self.last_backup_name = kwargs.get('last_backup_name', None) + + +class CreateDatabaseRestorePointDefinition(Model): + """Contains the information necessary to perform a create database restore + point operation. + + All required parameters must be populated in order to send to Azure. + + :param restore_point_label: Required. The restore point label to apply + :type restore_point_label: str + """ + + _validation = { + 'restore_point_label': {'required': True}, + } + + _attribute_map = { + 'restore_point_label': {'key': 'restorePointLabel', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CreateDatabaseRestorePointDefinition, self).__init__(**kwargs) + self.restore_point_label = kwargs.get('restore_point_label', None) + + +class TrackedResource(Resource): + """ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class Database(TrackedResource): + """A database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The database SKU. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location + ```` + :type sku: ~azure.mgmt.sql.models.Sku + :ivar kind: Kind of database. This is metadata used for the Azure portal + experience. + :vartype kind: str + :ivar managed_by: Resource that manages the database. + :vartype managed_by: str + :param create_mode: Specifies the mode of database creation. + Default: regular database creation. + Copy: creates a database as a copy of an existing database. + sourceDatabaseId must be specified as the resource ID of the source + database. + Secondary: creates a database as a secondary replica of an existing + database. sourceDatabaseId must be specified as the resource ID of the + existing primary database. + PointInTimeRestore: Creates a database by restoring a point in time backup + of an existing database. sourceDatabaseId must be specified as the + resource ID of the existing database, and restorePointInTime must be + specified. + Recovery: Creates a database by restoring a geo-replicated backup. + sourceDatabaseId must be specified as the recoverable database resource ID + to restore. + Restore: Creates a database by restoring a backup of a deleted database. + sourceDatabaseId must be specified. If sourceDatabaseId is the database's + original resource ID, then sourceDatabaseDeletionDate must be specified. + Otherwise sourceDatabaseId must be the restorable dropped database + resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime + may also be specified to restore from an earlier point in time. + RestoreLongTermRetentionBackup: Creates a database by restoring from a + long term retention vault. recoveryServicesRecoveryPointResourceId must be + specified as the recovery point resource ID. + Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for + DataWarehouse edition. Possible values include: 'Default', 'Copy', + 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', + 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', + 'RestoreLongTermRetentionBackup', 'OnlineSecondary' + :type create_mode: str or ~azure.mgmt.sql.models.CreateMode + :param collation: The collation of the database. + :type collation: str + :param max_size_bytes: The max size of the database expressed in bytes. + :type max_size_bytes: long + :param sample_name: The name of the sample schema to apply when creating + this database. Possible values include: 'AdventureWorksLT', + 'WideWorldImportersStd', 'WideWorldImportersFull' + :type sample_name: str or ~azure.mgmt.sql.models.SampleName + :param elastic_pool_id: The resource identifier of the elastic pool + containing this database. + :type elastic_pool_id: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :ivar status: The status of the database. Possible values include: + 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', + 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', + 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', + 'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers', + 'OnlineChangingDwPerformanceTiers' + :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus + :ivar database_id: The ID of the database. + :vartype database_id: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar current_service_objective_name: The current service level objective + name of the database. + :vartype current_service_objective_name: str + :ivar requested_service_objective_name: The requested service level + objective name of the database. + :vartype requested_service_objective_name: str + :ivar default_secondary_location: The default secondary region for this + database. + :vartype default_secondary_location: str + :ivar failover_group_id: Failover Group resource identifier that this + database belongs to. + :vartype failover_group_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param source_database_deletion_date: Specifies the time that the database + was deleted. + :type source_database_deletion_date: datetime + :param recovery_services_recovery_point_id: The resource identifier of the + recovery point associated with create operation of this database. + :type recovery_services_recovery_point_id: str + :param long_term_retention_backup_resource_id: The resource identifier of + the long term retention backup associated with create operation of this + database. + :type long_term_retention_backup_resource_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param restorable_dropped_database_id: The resource identifier of the + restorable dropped database associated with create operation of this + database. + :type restorable_dropped_database_id: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param zone_redundant: Whether or not this database is zone redundant, + which means the replicas of this database will be spread across multiple + availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this database. Possible + values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType + :ivar max_log_size_bytes: The max log size for this database. + :vartype max_log_size_bytes: long + :ivar earliest_restore_date: This records the earliest start date and time + that restore is available for this database (ISO8601 format). + :vartype earliest_restore_date: datetime + :param read_scale: The state of read-only routing. If enabled, connections + that have application intent set to readonly in their connection string + may be routed to a readonly secondary replica in the same region. Possible + values include: 'Enabled', 'Disabled' + :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale + :ivar current_sku: The name and tier of the SKU. + :vartype current_sku: ~azure.mgmt.sql.models.Sku + :param auto_pause_delay: Time in minutes after which database is + automatically paused. A value of -1 means that automatic pause is disabled + :type auto_pause_delay: int + :param min_capacity: Minimal capacity that database will always have + allocated, if not paused + :type min_capacity: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'managed_by': {'readonly': True}, + 'status': {'readonly': True}, + 'database_id': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'current_service_objective_name': {'readonly': True}, + 'requested_service_objective_name': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + 'max_log_size_bytes': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'current_sku': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, + 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, + 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, + 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, + 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, + 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, + 'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'}, + 'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(Database, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.kind = None + self.managed_by = None + self.create_mode = kwargs.get('create_mode', None) + self.collation = kwargs.get('collation', None) + self.max_size_bytes = kwargs.get('max_size_bytes', None) + self.sample_name = kwargs.get('sample_name', None) + self.elastic_pool_id = kwargs.get('elastic_pool_id', None) + self.source_database_id = kwargs.get('source_database_id', None) + self.status = None + self.database_id = None + self.creation_date = None + self.current_service_objective_name = None + self.requested_service_objective_name = None + self.default_secondary_location = None + self.failover_group_id = None + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.source_database_deletion_date = kwargs.get('source_database_deletion_date', None) + self.recovery_services_recovery_point_id = kwargs.get('recovery_services_recovery_point_id', None) + self.long_term_retention_backup_resource_id = kwargs.get('long_term_retention_backup_resource_id', None) + self.recoverable_database_id = kwargs.get('recoverable_database_id', None) + self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) + self.catalog_collation = kwargs.get('catalog_collation', None) + self.zone_redundant = kwargs.get('zone_redundant', None) + self.license_type = kwargs.get('license_type', None) + self.max_log_size_bytes = None + self.earliest_restore_date = None + self.read_scale = kwargs.get('read_scale', None) + self.current_sku = None + self.auto_pause_delay = kwargs.get('auto_pause_delay', None) + self.min_capacity = kwargs.get('min_capacity', None) + + +class DatabaseAutomaticTuning(ProxyResource): + """Database-level Automatic Tuning. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param desired_state: Automatic tuning desired state. Possible values + include: 'Inherit', 'Custom', 'Auto', 'Unspecified' + :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode + :ivar actual_state: Automatic tuning actual state. Possible values + include: 'Inherit', 'Custom', 'Auto', 'Unspecified' + :vartype actual_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode + :param options: Automatic tuning options definition. + :type options: dict[str, ~azure.mgmt.sql.models.AutomaticTuningOptions] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'actual_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningMode'}, + 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningMode'}, + 'options': {'key': 'properties.options', 'type': '{AutomaticTuningOptions}'}, + } + + def __init__(self, **kwargs): + super(DatabaseAutomaticTuning, self).__init__(**kwargs) + self.desired_state = kwargs.get('desired_state', None) + self.actual_state = None + self.options = kwargs.get('options', None) + + +class DatabaseBlobAuditingPolicy(ProxyResource): + """A database blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Resource kind. + :vartype kind: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DatabaseBlobAuditingPolicy, self).__init__(**kwargs) + self.kind = None + self.state = kwargs.get('state', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) + self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) + self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) + self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) + + +class DatabaseOperation(ProxyResource): + """A database operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_name: The name of the database the operation is being + performed on. + :vartype database_name: str + :ivar operation: The name of operation. + :vartype operation: str + :ivar operation_friendly_name: The friendly name of operation. + :vartype operation_friendly_name: str + :ivar percent_complete: The percentage of the operation completed. + :vartype percent_complete: int + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar start_time: The operation start time. + :vartype start_time: datetime + :ivar state: The operation state. Possible values include: 'Pending', + 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', 'Cancelled' + :vartype state: str or ~azure.mgmt.sql.models.ManagementOperationState + :ivar error_code: The operation error code. + :vartype error_code: int + :ivar error_description: The operation error description. + :vartype error_description: str + :ivar error_severity: The operation error severity. + :vartype error_severity: int + :ivar is_user_error: Whether or not the error is a user error. + :vartype is_user_error: bool + :ivar estimated_completion_time: The estimated completion time of the + operation. + :vartype estimated_completion_time: datetime + :ivar description: The operation description. + :vartype description: str + :ivar is_cancellable: Whether the operation can be cancelled. + :vartype is_cancellable: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_name': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_friendly_name': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_description': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'is_user_error': {'readonly': True}, + 'estimated_completion_time': {'readonly': True}, + 'description': {'readonly': True}, + 'is_cancellable': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, + 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DatabaseOperation, self).__init__(**kwargs) + self.database_name = None + self.operation = None + self.operation_friendly_name = None + self.percent_complete = None + self.server_name = None + self.start_time = None + self.state = None + self.error_code = None + self.error_description = None + self.error_severity = None + self.is_user_error = None + self.estimated_completion_time = None + self.description = None + self.is_cancellable = None + + +class DatabaseSecurityAlertPolicy(ProxyResource): + """Contains information about a database Threat Detection policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar kind: Resource kind. + :vartype kind: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint and storageAccountAccessKey are required. + Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies the semicolon-separated list of alerts + that are disabled, or empty string to disable no alerts. Possible values: + Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; + Data_Exfiltration; Unsafe_Action. + :type disabled_alerts: str + :param email_addresses: Specifies the semicolon-separated list of e-mail + addresses to which the alert is sent. + :type email_addresses: str + :param email_account_admins: Specifies that the alert is sent to the + account administrators. Possible values include: 'Enabled', 'Disabled' + :type email_account_admins: str or + ~azure.mgmt.sql.models.SecurityAlertPolicyEmailAccountAdmins + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. If state is Enabled, storageEndpoint is + required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. If state is Enabled, + storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :param use_server_default: Specifies whether to use the default server + policy. Possible values include: 'Enabled', 'Disabled' + :type use_server_default: str or + ~azure.mgmt.sql.models.SecurityAlertPolicyUseServerDefault + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': 'str'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': 'str'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'SecurityAlertPolicyEmailAccountAdmins'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'use_server_default': {'key': 'properties.useServerDefault', 'type': 'SecurityAlertPolicyUseServerDefault'}, + } + + def __init__(self, **kwargs): + super(DatabaseSecurityAlertPolicy, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.kind = None + self.state = kwargs.get('state', None) + self.disabled_alerts = kwargs.get('disabled_alerts', None) + self.email_addresses = kwargs.get('email_addresses', None) + self.email_account_admins = kwargs.get('email_account_admins', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.use_server_default = kwargs.get('use_server_default', None) + + +class DatabaseUpdate(Model): + """A database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param create_mode: Specifies the mode of database creation. + Default: regular database creation. + Copy: creates a database as a copy of an existing database. + sourceDatabaseId must be specified as the resource ID of the source + database. + Secondary: creates a database as a secondary replica of an existing + database. sourceDatabaseId must be specified as the resource ID of the + existing primary database. + PointInTimeRestore: Creates a database by restoring a point in time backup + of an existing database. sourceDatabaseId must be specified as the + resource ID of the existing database, and restorePointInTime must be + specified. + Recovery: Creates a database by restoring a geo-replicated backup. + sourceDatabaseId must be specified as the recoverable database resource ID + to restore. + Restore: Creates a database by restoring a backup of a deleted database. + sourceDatabaseId must be specified. If sourceDatabaseId is the database's + original resource ID, then sourceDatabaseDeletionDate must be specified. + Otherwise sourceDatabaseId must be the restorable dropped database + resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime + may also be specified to restore from an earlier point in time. + RestoreLongTermRetentionBackup: Creates a database by restoring from a + long term retention vault. recoveryServicesRecoveryPointResourceId must be + specified as the recovery point resource ID. + Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for + DataWarehouse edition. Possible values include: 'Default', 'Copy', + 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', + 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', + 'RestoreLongTermRetentionBackup', 'OnlineSecondary' + :type create_mode: str or ~azure.mgmt.sql.models.CreateMode + :param collation: The collation of the database. + :type collation: str + :param max_size_bytes: The max size of the database expressed in bytes. + :type max_size_bytes: long + :param sample_name: The name of the sample schema to apply when creating + this database. Possible values include: 'AdventureWorksLT', + 'WideWorldImportersStd', 'WideWorldImportersFull' + :type sample_name: str or ~azure.mgmt.sql.models.SampleName + :param elastic_pool_id: The resource identifier of the elastic pool + containing this database. + :type elastic_pool_id: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :ivar status: The status of the database. Possible values include: + 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', + 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', + 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', + 'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers', + 'OnlineChangingDwPerformanceTiers' + :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus + :ivar database_id: The ID of the database. + :vartype database_id: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar current_service_objective_name: The current service level objective + name of the database. + :vartype current_service_objective_name: str + :ivar requested_service_objective_name: The requested service level + objective name of the database. + :vartype requested_service_objective_name: str + :ivar default_secondary_location: The default secondary region for this + database. + :vartype default_secondary_location: str + :ivar failover_group_id: Failover Group resource identifier that this + database belongs to. + :vartype failover_group_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param source_database_deletion_date: Specifies the time that the database + was deleted. + :type source_database_deletion_date: datetime + :param recovery_services_recovery_point_id: The resource identifier of the + recovery point associated with create operation of this database. + :type recovery_services_recovery_point_id: str + :param long_term_retention_backup_resource_id: The resource identifier of + the long term retention backup associated with create operation of this + database. + :type long_term_retention_backup_resource_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param restorable_dropped_database_id: The resource identifier of the + restorable dropped database associated with create operation of this + database. + :type restorable_dropped_database_id: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param zone_redundant: Whether or not this database is zone redundant, + which means the replicas of this database will be spread across multiple + availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this database. Possible + values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType + :ivar max_log_size_bytes: The max log size for this database. + :vartype max_log_size_bytes: long + :ivar earliest_restore_date: This records the earliest start date and time + that restore is available for this database (ISO8601 format). + :vartype earliest_restore_date: datetime + :param read_scale: The state of read-only routing. If enabled, connections + that have application intent set to readonly in their connection string + may be routed to a readonly secondary replica in the same region. Possible + values include: 'Enabled', 'Disabled' + :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale + :ivar current_sku: The name and tier of the SKU. + :vartype current_sku: ~azure.mgmt.sql.models.Sku + :param auto_pause_delay: Time in minutes after which database is + automatically paused. A value of -1 means that automatic pause is disabled + :type auto_pause_delay: int + :param min_capacity: Minimal capacity that database will always have + allocated, if not paused + :type min_capacity: float + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'status': {'readonly': True}, + 'database_id': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'current_service_objective_name': {'readonly': True}, + 'requested_service_objective_name': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + 'max_log_size_bytes': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'current_sku': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, + 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, + 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, + 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, + 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, + 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, + 'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'}, + 'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(DatabaseUpdate, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.create_mode = kwargs.get('create_mode', None) + self.collation = kwargs.get('collation', None) + self.max_size_bytes = kwargs.get('max_size_bytes', None) + self.sample_name = kwargs.get('sample_name', None) + self.elastic_pool_id = kwargs.get('elastic_pool_id', None) + self.source_database_id = kwargs.get('source_database_id', None) + self.status = None + self.database_id = None + self.creation_date = None + self.current_service_objective_name = None + self.requested_service_objective_name = None + self.default_secondary_location = None + self.failover_group_id = None + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.source_database_deletion_date = kwargs.get('source_database_deletion_date', None) + self.recovery_services_recovery_point_id = kwargs.get('recovery_services_recovery_point_id', None) + self.long_term_retention_backup_resource_id = kwargs.get('long_term_retention_backup_resource_id', None) + self.recoverable_database_id = kwargs.get('recoverable_database_id', None) + self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) + self.catalog_collation = kwargs.get('catalog_collation', None) + self.zone_redundant = kwargs.get('zone_redundant', None) + self.license_type = kwargs.get('license_type', None) + self.max_log_size_bytes = None + self.earliest_restore_date = None + self.read_scale = kwargs.get('read_scale', None) + self.current_sku = None + self.auto_pause_delay = kwargs.get('auto_pause_delay', None) + self.min_capacity = kwargs.get('min_capacity', None) + self.tags = kwargs.get('tags', None) + + +class DatabaseUsage(Model): + """The database usages. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the usage metric. + :vartype name: str + :ivar resource_name: The name of the resource. + :vartype resource_name: str + :ivar display_name: The usage metric display name. + :vartype display_name: str + :ivar current_value: The current value of the usage metric. + :vartype current_value: float + :ivar limit: The current limit of the usage metric. + :vartype limit: float + :ivar unit: The units of the usage metric. + :vartype unit: str + :ivar next_reset_time: The next reset time for the usage metric (ISO8601 + format). + :vartype next_reset_time: datetime + """ + + _validation = { + 'name': {'readonly': True}, + 'resource_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'next_reset_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(DatabaseUsage, self).__init__(**kwargs) + self.name = None + self.resource_name = None + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + self.next_reset_time = None + + +class DatabaseVulnerabilityAssessment(ProxyResource): + """A database vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: A blob storage container path to hold the + scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It + is required if server level vulnerability assessment policy doesn't set + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _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'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, **kwargs): + super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = kwargs.get('storage_container_path', None) + self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.recurring_scans = kwargs.get('recurring_scans', None) + + +class DatabaseVulnerabilityAssessmentRuleBaseline(ProxyResource): + """A database vulnerability assessment rule baseline. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param baseline_results: Required. The rule baseline result + :type baseline_results: + list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'baseline_results': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'baseline_results': {'key': 'properties.baselineResults', 'type': '[DatabaseVulnerabilityAssessmentRuleBaselineItem]'}, + } + + def __init__(self, **kwargs): + super(DatabaseVulnerabilityAssessmentRuleBaseline, self).__init__(**kwargs) + self.baseline_results = kwargs.get('baseline_results', None) + + +class DatabaseVulnerabilityAssessmentRuleBaselineItem(Model): + """Properties for an Azure SQL Database Vulnerability Assessment rule + baseline's result. + + All required parameters must be populated in order to send to Azure. + + :param result: Required. The rule baseline result + :type result: list[str] + """ + + _validation = { + 'result': {'required': True}, + } + + _attribute_map = { + 'result': {'key': 'result', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(DatabaseVulnerabilityAssessmentRuleBaselineItem, self).__init__(**kwargs) + self.result = kwargs.get('result', None) + + +class DatabaseVulnerabilityAssessmentScansExport(ProxyResource): + """A database Vulnerability Assessment scan export resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar exported_report_location: Location of the exported report (e.g. + https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). + :vartype exported_report_location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'exported_report_location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs) + self.exported_report_location = None + + +class DataMaskingPolicy(ProxyResource): + """Represents a database data masking policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param data_masking_state: Required. The state of the data masking policy. + Possible values include: 'Disabled', 'Enabled' + :type data_masking_state: str or ~azure.mgmt.sql.models.DataMaskingState + :param exempt_principals: The list of the exempt principals. Specifies the + semicolon-separated list of database users for which the data masking + policy does not apply. The specified users receive data results without + masking for all of the database queries. + :type exempt_principals: str + :ivar application_principals: The list of the application principals. This + is a legacy parameter and is no longer used. + :vartype application_principals: str + :ivar masking_level: The masking level. This is a legacy parameter and is + no longer used. + :vartype masking_level: str + :ivar location: The location of the data masking policy. + :vartype location: str + :ivar kind: The kind of data masking policy. Metadata, used for Azure + portal. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_masking_state': {'required': True}, + 'application_principals': {'readonly': True}, + 'masking_level': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_masking_state': {'key': 'properties.dataMaskingState', 'type': 'DataMaskingState'}, + 'exempt_principals': {'key': 'properties.exemptPrincipals', 'type': 'str'}, + 'application_principals': {'key': 'properties.applicationPrincipals', 'type': 'str'}, + 'masking_level': {'key': 'properties.maskingLevel', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataMaskingPolicy, self).__init__(**kwargs) + self.data_masking_state = kwargs.get('data_masking_state', None) + self.exempt_principals = kwargs.get('exempt_principals', None) + self.application_principals = None + self.masking_level = None + self.location = None + self.kind = None + + +class DataMaskingRule(ProxyResource): + """Represents a database data masking rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar data_masking_rule_id: The rule Id. + :vartype data_masking_rule_id: str + :param alias_name: The alias name. This is a legacy parameter and is no + longer used. + :type alias_name: str + :param rule_state: The rule state. Used to delete a rule. To delete an + existing rule, specify the schemaName, tableName, columnName, + maskingFunction, and specify ruleState as disabled. However, if the rule + doesn't already exist, the rule will be created with ruleState set to + enabled, regardless of the provided value of ruleState. Possible values + include: 'Disabled', 'Enabled' + :type rule_state: str or ~azure.mgmt.sql.models.DataMaskingRuleState + :param schema_name: Required. The schema name on which the data masking + rule is applied. + :type schema_name: str + :param table_name: Required. The table name on which the data masking rule + is applied. + :type table_name: str + :param column_name: Required. The column name on which the data masking + rule is applied. + :type column_name: str + :param masking_function: Required. The masking function that is used for + the data masking rule. Possible values include: 'Default', 'CCN', 'Email', + 'Number', 'SSN', 'Text' + :type masking_function: str or ~azure.mgmt.sql.models.DataMaskingFunction + :param number_from: The numberFrom property of the masking rule. Required + if maskingFunction is set to Number, otherwise this parameter will be + ignored. + :type number_from: str + :param number_to: The numberTo property of the data masking rule. Required + if maskingFunction is set to Number, otherwise this parameter will be + ignored. + :type number_to: str + :param prefix_size: If maskingFunction is set to Text, the number of + characters to show unmasked in the beginning of the string. Otherwise, + this parameter will be ignored. + :type prefix_size: str + :param suffix_size: If maskingFunction is set to Text, the number of + characters to show unmasked at the end of the string. Otherwise, this + parameter will be ignored. + :type suffix_size: str + :param replacement_string: If maskingFunction is set to Text, the + character to use for masking the unexposed part of the string. Otherwise, + this parameter will be ignored. + :type replacement_string: str + :ivar location: The location of the data masking rule. + :vartype location: str + :ivar kind: The kind of Data Masking Rule. Metadata, used for Azure + portal. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_masking_rule_id': {'readonly': True}, + 'schema_name': {'required': True}, + 'table_name': {'required': True}, + 'column_name': {'required': True}, + 'masking_function': {'required': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_masking_rule_id': {'key': 'properties.id', 'type': 'str'}, + 'alias_name': {'key': 'properties.aliasName', 'type': 'str'}, + 'rule_state': {'key': 'properties.ruleState', 'type': 'DataMaskingRuleState'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, + 'table_name': {'key': 'properties.tableName', 'type': 'str'}, + 'column_name': {'key': 'properties.columnName', 'type': 'str'}, + 'masking_function': {'key': 'properties.maskingFunction', 'type': 'DataMaskingFunction'}, + 'number_from': {'key': 'properties.numberFrom', 'type': 'str'}, + 'number_to': {'key': 'properties.numberTo', 'type': 'str'}, + 'prefix_size': {'key': 'properties.prefixSize', 'type': 'str'}, + 'suffix_size': {'key': 'properties.suffixSize', 'type': 'str'}, + 'replacement_string': {'key': 'properties.replacementString', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataMaskingRule, self).__init__(**kwargs) + self.data_masking_rule_id = None + self.alias_name = kwargs.get('alias_name', None) + self.rule_state = kwargs.get('rule_state', None) + self.schema_name = kwargs.get('schema_name', None) + self.table_name = kwargs.get('table_name', None) + self.column_name = kwargs.get('column_name', None) + self.masking_function = kwargs.get('masking_function', None) + self.number_from = kwargs.get('number_from', None) + self.number_to = kwargs.get('number_to', None) + self.prefix_size = kwargs.get('prefix_size', None) + self.suffix_size = kwargs.get('suffix_size', None) + self.replacement_string = kwargs.get('replacement_string', None) + self.location = None + self.kind = None + + +class EditionCapability(Model): + """The edition capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The database edition name. + :vartype name: str + :ivar supported_service_level_objectives: The list of supported service + objectives for the edition. + :vartype supported_service_level_objectives: + list[~azure.mgmt.sql.models.ServiceObjectiveCapability] + :ivar zone_redundant: Whether or not zone redundancy is supported for the + edition. + :vartype zone_redundant: bool + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_service_level_objectives': {'readonly': True}, + 'zone_redundant': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_service_level_objectives': {'key': 'supportedServiceLevelObjectives', 'type': '[ServiceObjectiveCapability]'}, + 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_service_level_objectives = None + self.zone_redundant = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ElasticPool(TrackedResource): + """An elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The elastic pool SKU. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or the following command: + ```azurecli + az sql elastic-pool list-editions -l -o table + ```` + :type sku: ~azure.mgmt.sql.models.Sku + :ivar kind: Kind of elastic pool. This is metadata used for the Azure + portal experience. + :vartype kind: str + :ivar state: The state of the elastic pool. Possible values include: + 'Creating', 'Ready', 'Disabled' + :vartype state: str or ~azure.mgmt.sql.models.ElasticPoolState + :ivar creation_date: The creation date of the elastic pool (ISO8601 + format). + :vartype creation_date: datetime + :param max_size_bytes: The storage limit for the database elastic pool in + bytes. + :type max_size_bytes: long + :param per_database_settings: The per database settings for the elastic + pool. + :type per_database_settings: + ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings + :param zone_redundant: Whether or not this elastic pool is zone redundant, + which means the replicas of this elastic pool will be spread across + multiple availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this elastic pool. + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'state': {'readonly': True}, + 'creation_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPool, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.kind = None + self.state = None + self.creation_date = None + self.max_size_bytes = kwargs.get('max_size_bytes', None) + self.per_database_settings = kwargs.get('per_database_settings', None) + self.zone_redundant = kwargs.get('zone_redundant', None) + self.license_type = kwargs.get('license_type', None) + + +class ElasticPoolActivity(ProxyResource): + """Represents the activity on an elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar end_time: The time the operation finished (ISO8601 format). + :vartype end_time: datetime + :ivar error_code: The error code if available. + :vartype error_code: int + :ivar error_message: The error message if available. + :vartype error_message: str + :ivar error_severity: The error severity if available. + :vartype error_severity: int + :ivar operation: The operation name. + :vartype operation: str + :ivar operation_id: The unique operation ID. + :vartype operation_id: str + :ivar percent_complete: The percentage complete if available. + :vartype percent_complete: int + :ivar requested_database_dtu_max: The requested max DTU per database if + available. + :vartype requested_database_dtu_max: int + :ivar requested_database_dtu_min: The requested min DTU per database if + available. + :vartype requested_database_dtu_min: int + :ivar requested_dtu: The requested DTU for the pool if available. + :vartype requested_dtu: int + :ivar requested_elastic_pool_name: The requested name for the elastic pool + if available. + :vartype requested_elastic_pool_name: str + :ivar requested_storage_limit_in_gb: The requested storage limit for the + pool in GB if available. + :vartype requested_storage_limit_in_gb: long + :ivar elastic_pool_name: The name of the elastic pool. + :vartype elastic_pool_name: str + :ivar server_name: The name of the server the elastic pool is in. + :vartype server_name: str + :ivar start_time: The time the operation started (ISO8601 format). + :vartype start_time: datetime + :ivar state: The current state of the operation. + :vartype state: str + :ivar requested_storage_limit_in_mb: The requested storage limit in MB. + :vartype requested_storage_limit_in_mb: int + :ivar requested_database_dtu_guarantee: The requested per database DTU + guarantee. + :vartype requested_database_dtu_guarantee: int + :ivar requested_database_dtu_cap: The requested per database DTU cap. + :vartype requested_database_dtu_cap: int + :ivar requested_dtu_guarantee: The requested DTU guarantee. + :vartype requested_dtu_guarantee: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_message': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_id': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'requested_database_dtu_max': {'readonly': True}, + 'requested_database_dtu_min': {'readonly': True}, + 'requested_dtu': {'readonly': True}, + 'requested_elastic_pool_name': {'readonly': True}, + 'requested_storage_limit_in_gb': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'requested_storage_limit_in_mb': {'readonly': True}, + 'requested_database_dtu_guarantee': {'readonly': True}, + 'requested_database_dtu_cap': {'readonly': True}, + 'requested_dtu_guarantee': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'requested_database_dtu_max': {'key': 'properties.requestedDatabaseDtuMax', 'type': 'int'}, + 'requested_database_dtu_min': {'key': 'properties.requestedDatabaseDtuMin', 'type': 'int'}, + 'requested_dtu': {'key': 'properties.requestedDtu', 'type': 'int'}, + 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, + 'requested_storage_limit_in_gb': {'key': 'properties.requestedStorageLimitInGB', 'type': 'long'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'requested_storage_limit_in_mb': {'key': 'properties.requestedStorageLimitInMB', 'type': 'int'}, + 'requested_database_dtu_guarantee': {'key': 'properties.requestedDatabaseDtuGuarantee', 'type': 'int'}, + 'requested_database_dtu_cap': {'key': 'properties.requestedDatabaseDtuCap', 'type': 'int'}, + 'requested_dtu_guarantee': {'key': 'properties.requestedDtuGuarantee', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolActivity, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.end_time = None + self.error_code = None + self.error_message = None + self.error_severity = None + self.operation = None + self.operation_id = None + self.percent_complete = None + self.requested_database_dtu_max = None + self.requested_database_dtu_min = None + self.requested_dtu = None + self.requested_elastic_pool_name = None + self.requested_storage_limit_in_gb = None + self.elastic_pool_name = None + self.server_name = None + self.start_time = None + self.state = None + self.requested_storage_limit_in_mb = None + self.requested_database_dtu_guarantee = None + self.requested_database_dtu_cap = None + self.requested_dtu_guarantee = None + + +class ElasticPoolDatabaseActivity(ProxyResource): + """Represents the activity on an elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar database_name: The database name. + :vartype database_name: str + :ivar end_time: The time the operation finished (ISO8601 format). + :vartype end_time: datetime + :ivar error_code: The error code if available. + :vartype error_code: int + :ivar error_message: The error message if available. + :vartype error_message: str + :ivar error_severity: The error severity if available. + :vartype error_severity: int + :ivar operation: The operation name. + :vartype operation: str + :ivar operation_id: The unique operation ID. + :vartype operation_id: str + :ivar percent_complete: The percentage complete if available. + :vartype percent_complete: int + :ivar requested_elastic_pool_name: The name for the elastic pool the + database is moving into if available. + :vartype requested_elastic_pool_name: str + :ivar current_elastic_pool_name: The name of the current elastic pool the + database is in if available. + :vartype current_elastic_pool_name: str + :ivar current_service_objective: The name of the current service objective + if available. + :vartype current_service_objective: str + :ivar requested_service_objective: The name of the requested service + objective if available. + :vartype requested_service_objective: str + :ivar server_name: The name of the server the elastic pool is in. + :vartype server_name: str + :ivar start_time: The time the operation started (ISO8601 format). + :vartype start_time: datetime + :ivar state: The current state of the operation. + :vartype state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_name': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_message': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_id': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'requested_elastic_pool_name': {'readonly': True}, + 'current_elastic_pool_name': {'readonly': True}, + 'current_service_objective': {'readonly': True}, + 'requested_service_objective': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, + 'current_elastic_pool_name': {'key': 'properties.currentElasticPoolName', 'type': 'str'}, + 'current_service_objective': {'key': 'properties.currentServiceObjective', 'type': 'str'}, + 'requested_service_objective': {'key': 'properties.requestedServiceObjective', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolDatabaseActivity, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.database_name = None + self.end_time = None + self.error_code = None + self.error_message = None + self.error_severity = None + self.operation = None + self.operation_id = None + self.percent_complete = None + self.requested_elastic_pool_name = None + self.current_elastic_pool_name = None + self.current_service_objective = None + self.requested_service_objective = None + self.server_name = None + self.start_time = None + self.state = None + + +class ElasticPoolEditionCapability(Model): + """The elastic pool edition capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The elastic pool edition name. + :vartype name: str + :ivar supported_elastic_pool_performance_levels: The list of supported + elastic pool DTU levels for the edition. + :vartype supported_elastic_pool_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerformanceLevelCapability] + :ivar zone_redundant: Whether or not zone redundancy is supported for the + edition. + :vartype zone_redundant: bool + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_elastic_pool_performance_levels': {'readonly': True}, + 'zone_redundant': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_elastic_pool_performance_levels': {'key': 'supportedElasticPoolPerformanceLevels', 'type': '[ElasticPoolPerformanceLevelCapability]'}, + 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolEditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_elastic_pool_performance_levels = None + self.zone_redundant = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ElasticPoolOperation(ProxyResource): + """A elastic pool operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar elastic_pool_name: The name of the elastic pool the operation is + being performed on. + :vartype elastic_pool_name: str + :ivar operation: The name of operation. + :vartype operation: str + :ivar operation_friendly_name: The friendly name of operation. + :vartype operation_friendly_name: str + :ivar percent_complete: The percentage of the operation completed. + :vartype percent_complete: int + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar start_time: The operation start time. + :vartype start_time: datetime + :ivar state: The operation state. + :vartype state: str + :ivar error_code: The operation error code. + :vartype error_code: int + :ivar error_description: The operation error description. + :vartype error_description: str + :ivar error_severity: The operation error severity. + :vartype error_severity: int + :ivar is_user_error: Whether or not the error is a user error. + :vartype is_user_error: bool + :ivar estimated_completion_time: The estimated completion time of the + operation. + :vartype estimated_completion_time: datetime + :ivar description: The operation description. + :vartype description: str + :ivar is_cancellable: Whether the operation can be cancelled. + :vartype is_cancellable: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_friendly_name': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_description': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'is_user_error': {'readonly': True}, + 'estimated_completion_time': {'readonly': True}, + 'description': {'readonly': True}, + 'is_cancellable': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, + 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolOperation, self).__init__(**kwargs) + self.elastic_pool_name = None + self.operation = None + self.operation_friendly_name = None + self.percent_complete = None + self.server_name = None + self.start_time = None + self.state = None + self.error_code = None + self.error_description = None + self.error_severity = None + self.is_user_error = None + self.estimated_completion_time = None + self.description = None + self.is_cancellable = None + + +class ElasticPoolPerDatabaseMaxPerformanceLevelCapability(Model): + """The max per-database performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The maximum performance level per database. + :vartype limit: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + :ivar supported_per_database_min_performance_levels: The list of supported + min database performance levels. + :vartype supported_per_database_min_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMinPerformanceLevelCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'supported_per_database_min_performance_levels': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'supported_per_database_min_performance_levels': {'key': 'supportedPerDatabaseMinPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMinPerformanceLevelCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolPerDatabaseMaxPerformanceLevelCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + self.supported_per_database_min_performance_levels = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ElasticPoolPerDatabaseMinPerformanceLevelCapability(Model): + """The minimum per-database performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The minimum performance level per database. + :vartype limit: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolPerDatabaseMinPerformanceLevelCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ElasticPoolPerDatabaseSettings(Model): + """Per database settings of an elastic pool. + + :param min_capacity: The minimum capacity all databases are guaranteed. + :type min_capacity: float + :param max_capacity: The maximum capacity any one database can consume. + :type max_capacity: float + """ + + _attribute_map = { + 'min_capacity': {'key': 'minCapacity', 'type': 'float'}, + 'max_capacity': {'key': 'maxCapacity', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolPerDatabaseSettings, self).__init__(**kwargs) + self.min_capacity = kwargs.get('min_capacity', None) + self.max_capacity = kwargs.get('max_capacity', None) + + +class ElasticPoolPerformanceLevelCapability(Model): + """The Elastic Pool performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar performance_level: The performance level for the pool. + :vartype performance_level: + ~azure.mgmt.sql.models.PerformanceLevelCapability + :ivar sku: The sku. + :vartype sku: ~azure.mgmt.sql.models.Sku + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar max_database_count: The maximum number of databases supported. + :vartype max_database_count: int + :ivar included_max_size: The included (free) max size for this performance + level. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar supported_max_sizes: The list of supported max sizes. + :vartype supported_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar supported_per_database_max_sizes: The list of supported per database + max sizes. + :vartype supported_per_database_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar supported_per_database_max_performance_levels: The list of supported + per database max performance levels. + :vartype supported_per_database_max_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMaxPerformanceLevelCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'performance_level': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'max_database_count': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'supported_max_sizes': {'readonly': True}, + 'supported_per_database_max_sizes': {'readonly': True}, + 'supported_per_database_max_performance_levels': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'max_database_count': {'key': 'maxDatabaseCount', 'type': 'int'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'supported_per_database_max_sizes': {'key': 'supportedPerDatabaseMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'supported_per_database_max_performance_levels': {'key': 'supportedPerDatabaseMaxPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMaxPerformanceLevelCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolPerformanceLevelCapability, self).__init__(**kwargs) + self.performance_level = None + self.sku = None + self.supported_license_types = None + self.max_database_count = None + self.included_max_size = None + self.supported_max_sizes = None + self.supported_per_database_max_sizes = None + self.supported_per_database_max_performance_levels = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ElasticPoolUpdate(Model): + """An elastic pool update. + + :param sku: + :type sku: ~azure.mgmt.sql.models.Sku + :param max_size_bytes: The storage limit for the database elastic pool in + bytes. + :type max_size_bytes: long + :param per_database_settings: The per database settings for the elastic + pool. + :type per_database_settings: + ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings + :param zone_redundant: Whether or not this elastic pool is zone redundant, + which means the replicas of this elastic pool will be spread across + multiple availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this elastic pool. + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ElasticPoolUpdate, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.max_size_bytes = kwargs.get('max_size_bytes', None) + self.per_database_settings = kwargs.get('per_database_settings', None) + self.zone_redundant = kwargs.get('zone_redundant', None) + self.license_type = kwargs.get('license_type', None) + self.tags = kwargs.get('tags', None) + + +class EncryptionProtector(ProxyResource): + """The server encryption protector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :type kind: str + :ivar location: Resource location. + :vartype location: str + :ivar subregion: Subregion of the encryption protector. + :vartype subregion: str + :param server_key_name: The name of the server key. + :type server_key_name: str + :param server_key_type: Required. The encryption protector type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :ivar uri: The URI of the server key. + :vartype uri: str + :ivar thumbprint: Thumbprint of the server key. + :vartype thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'subregion': {'readonly': True}, + 'server_key_type': {'required': True}, + 'uri': {'readonly': True}, + 'thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'subregion': {'key': 'properties.subregion', 'type': 'str'}, + 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EncryptionProtector, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + self.location = None + self.subregion = None + self.server_key_name = kwargs.get('server_key_name', None) + self.server_key_type = kwargs.get('server_key_type', None) + self.uri = None + self.thumbprint = None + + +class ExportRequest(Model): + """Export database parameters. + + All required parameters must be populated in order to send to Azure. + + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + } + + _attribute_map = { + 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, + } + + def __init__(self, **kwargs): + super(ExportRequest, self).__init__(**kwargs) + self.storage_key_type = kwargs.get('storage_key_type', None) + self.storage_key = kwargs.get('storage_key', None) + self.storage_uri = kwargs.get('storage_uri', None) + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.authentication_type = kwargs.get('authentication_type', "SQL") + + +class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): + """An extended database blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param predicate_expression: Specifies condition of where clause when + creating an audit. + :type predicate_expression: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ExtendedDatabaseBlobAuditingPolicy, self).__init__(**kwargs) + self.predicate_expression = kwargs.get('predicate_expression', None) + self.state = kwargs.get('state', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) + self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) + self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) + self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) + + +class ExtendedServerBlobAuditingPolicy(ProxyResource): + """An extended server blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param predicate_expression: Specifies condition of where clause when + creating an audit. + :type predicate_expression: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ExtendedServerBlobAuditingPolicy, self).__init__(**kwargs) + self.predicate_expression = kwargs.get('predicate_expression', None) + self.state = kwargs.get('state', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) + self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) + self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) + self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) + + +class FailoverGroup(ProxyResource): + """A failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param read_write_endpoint: Required. Read-write endpoint of the failover + group instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint + :ivar replication_role: Local replication role of the failover group + instance. Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.FailoverGroupReplicationRole + :ivar replication_state: Replication state of the failover group instance. + :vartype replication_state: str + :param partner_servers: Required. List of partner server information for + the failover group. + :type partner_servers: list[~azure.mgmt.sql.models.PartnerInfo] + :param databases: List of databases in the failover group. + :type databases: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'read_write_endpoint': {'required': True}, + 'replication_role': {'readonly': True}, + 'replication_state': {'readonly': True}, + 'partner_servers': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, + 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + 'partner_servers': {'key': 'properties.partnerServers', 'type': '[PartnerInfo]'}, + 'databases': {'key': 'properties.databases', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(FailoverGroup, self).__init__(**kwargs) + self.location = None + self.tags = kwargs.get('tags', None) + self.read_write_endpoint = kwargs.get('read_write_endpoint', None) + self.read_only_endpoint = kwargs.get('read_only_endpoint', None) + self.replication_role = None + self.replication_state = None + self.partner_servers = kwargs.get('partner_servers', None) + self.databases = kwargs.get('databases', None) + + +class FailoverGroupReadOnlyEndpoint(Model): + """Read-only endpoint of the failover group instance. + + :param failover_policy: Failover policy of the read-only endpoint for the + failover group. Possible values include: 'Disabled', 'Enabled' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy + """ + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) + self.failover_policy = kwargs.get('failover_policy', None) + + +class FailoverGroupReadWriteEndpoint(Model): + """Read-write endpoint of the failover group instance. + + All required parameters must be populated in order to send to Azure. + + :param failover_policy: Required. Failover policy of the read-write + endpoint for the failover group. If failoverPolicy is Automatic then + failoverWithDataLossGracePeriodMinutes is required. Possible values + include: 'Manual', 'Automatic' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy + :param failover_with_data_loss_grace_period_minutes: Grace period before + failover with data loss is attempted for the read-write endpoint. If + failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is + required. + :type failover_with_data_loss_grace_period_minutes: int + """ + + _validation = { + 'failover_policy': {'required': True}, + } + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(FailoverGroupReadWriteEndpoint, self).__init__(**kwargs) + self.failover_policy = kwargs.get('failover_policy', None) + self.failover_with_data_loss_grace_period_minutes = kwargs.get('failover_with_data_loss_grace_period_minutes', None) + + +class FailoverGroupUpdate(Model): + """A failover group update request. + + :param read_write_endpoint: Read-write endpoint of the failover group + instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint + :param databases: List of databases in the failover group. + :type databases: list[str] + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, + 'databases': {'key': 'properties.databases', 'type': '[str]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(FailoverGroupUpdate, self).__init__(**kwargs) + self.read_write_endpoint = kwargs.get('read_write_endpoint', None) + self.read_only_endpoint = kwargs.get('read_only_endpoint', None) + self.databases = kwargs.get('databases', None) + self.tags = kwargs.get('tags', None) + + +class FirewallRule(ProxyResource): + """Represents a server firewall rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of server that contains this firewall rule. + :vartype kind: str + :ivar location: Location of the server that contains this firewall rule. + :vartype location: str + :param start_ip_address: Required. The start IP address of the firewall + rule. Must be IPv4 format. Use value '0.0.0.0' to represent all + Azure-internal IP addresses. + :type start_ip_address: str + :param end_ip_address: Required. The end IP address of the firewall rule. + Must be IPv4 format. Must be greater than or equal to startIpAddress. Use + value '0.0.0.0' to represent all Azure-internal IP addresses. + :type end_ip_address: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + 'start_ip_address': {'required': True}, + 'end_ip_address': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FirewallRule, self).__init__(**kwargs) + self.kind = None + self.location = None + self.start_ip_address = kwargs.get('start_ip_address', None) + self.end_ip_address = kwargs.get('end_ip_address', None) + + +class GeoBackupPolicy(ProxyResource): + """A database geo backup policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. The state of the geo backup policy. Possible + values include: 'Disabled', 'Enabled' + :type state: str or ~azure.mgmt.sql.models.GeoBackupPolicyState + :ivar storage_type: The storage type of the geo backup policy. + :vartype storage_type: str + :ivar kind: Kind of geo backup policy. This is metadata used for the + Azure portal experience. + :vartype kind: str + :ivar location: Backup policy location. + :vartype location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'storage_type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'GeoBackupPolicyState'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GeoBackupPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.storage_type = None + self.kind = None + self.location = None + + +class ImportExportResponse(ProxyResource): + """Response for Import/Export Get operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar request_type: The request type of the operation. + :vartype request_type: str + :ivar request_id: The request type of the operation. + :vartype request_id: str + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar database_name: The name of the database. + :vartype database_name: str + :ivar status: The status message returned from the server. + :vartype status: str + :ivar last_modified_time: The operation status last modified time. + :vartype last_modified_time: str + :ivar queued_time: The operation queued time. + :vartype queued_time: str + :ivar blob_uri: The blob uri. + :vartype blob_uri: str + :ivar error_message: The error message returned from the server. + :vartype error_message: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'request_type': {'readonly': True}, + 'request_id': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'status': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'queued_time': {'readonly': True}, + 'blob_uri': {'readonly': True}, + 'error_message': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'request_type': {'key': 'properties.requestType', 'type': 'str'}, + 'request_id': {'key': 'properties.requestId', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'str'}, + 'queued_time': {'key': 'properties.queuedTime', 'type': 'str'}, + 'blob_uri': {'key': 'properties.blobUri', 'type': 'str'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImportExportResponse, self).__init__(**kwargs) + self.request_type = None + self.request_id = None + self.server_name = None + self.database_name = None + self.status = None + self.last_modified_time = None + self.queued_time = None + self.blob_uri = None + self.error_message = None + + +class ImportExtensionRequest(Model): + """Import database parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: The name of the extension. + :type name: str + :param type: The type of the extension. + :type type: str + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + :ivar operation_mode: Required. The type of import operation being + performed. This is always Import. Default value: "Import" . + :vartype operation_mode: str + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + 'operation_mode': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_key_type': {'key': 'properties.storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'properties.storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'properties.storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'properties.authenticationType', 'type': 'AuthenticationType'}, + 'operation_mode': {'key': 'properties.operationMode', 'type': 'str'}, + } + + operation_mode = "Import" + + def __init__(self, **kwargs): + super(ImportExtensionRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.storage_key_type = kwargs.get('storage_key_type', None) + self.storage_key = kwargs.get('storage_key', None) + self.storage_uri = kwargs.get('storage_uri', None) + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.authentication_type = kwargs.get('authentication_type', "SQL") + + +class ImportRequest(ExportRequest): + """Import database parameters. + + All required parameters must be populated in order to send to Azure. + + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + :param database_name: Required. The name of the database to import. + :type database_name: str + :param edition: Required. The edition for the database being created. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location + ```` + . Possible values include: 'Web', 'Business', 'Basic', 'Standard', + 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', + 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale' + :type edition: str or ~azure.mgmt.sql.models.DatabaseEdition + :param service_objective_name: Required. The name of the service objective + to assign to the database. Possible values include: 'System', 'System0', + 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', + 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', + 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', + 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', + 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', + 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', + 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', + 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' + :type service_objective_name: str or + ~azure.mgmt.sql.models.ServiceObjectiveName + :param max_size_bytes: Required. The maximum size for the newly imported + database. + :type max_size_bytes: str + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + 'database_name': {'required': True}, + 'edition': {'required': True}, + 'service_objective_name': {'required': True}, + 'max_size_bytes': {'required': True}, + } + + _attribute_map = { + 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'edition': {'key': 'edition', 'type': 'str'}, + 'service_objective_name': {'key': 'serviceObjectiveName', 'type': 'str'}, + 'max_size_bytes': {'key': 'maxSizeBytes', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImportRequest, self).__init__(**kwargs) + self.database_name = kwargs.get('database_name', None) + self.edition = kwargs.get('edition', None) + self.service_objective_name = kwargs.get('service_objective_name', None) + self.max_size_bytes = kwargs.get('max_size_bytes', None) + + +class InstanceFailoverGroup(ProxyResource): + """An instance failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param read_write_endpoint: Required. Read-write endpoint of the failover + group instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.InstanceFailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.InstanceFailoverGroupReadOnlyEndpoint + :ivar replication_role: Local replication role of the failover group + instance. Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole + :ivar replication_state: Replication state of the failover group instance. + :vartype replication_state: str + :param partner_regions: Required. Partner region information for the + failover group. + :type partner_regions: list[~azure.mgmt.sql.models.PartnerRegionInfo] + :param managed_instance_pairs: Required. List of managed instance pairs in + the failover group. + :type managed_instance_pairs: + list[~azure.mgmt.sql.models.ManagedInstancePairInfo] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'read_write_endpoint': {'required': True}, + 'replication_role': {'readonly': True}, + 'replication_state': {'readonly': True}, + 'partner_regions': {'required': True}, + 'managed_instance_pairs': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'InstanceFailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'InstanceFailoverGroupReadOnlyEndpoint'}, + 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + 'partner_regions': {'key': 'properties.partnerRegions', 'type': '[PartnerRegionInfo]'}, + 'managed_instance_pairs': {'key': 'properties.managedInstancePairs', 'type': '[ManagedInstancePairInfo]'}, + } + + def __init__(self, **kwargs): + super(InstanceFailoverGroup, self).__init__(**kwargs) + self.read_write_endpoint = kwargs.get('read_write_endpoint', None) + self.read_only_endpoint = kwargs.get('read_only_endpoint', None) + self.replication_role = None + self.replication_state = None + self.partner_regions = kwargs.get('partner_regions', None) + self.managed_instance_pairs = kwargs.get('managed_instance_pairs', None) + + +class InstanceFailoverGroupReadOnlyEndpoint(Model): + """Read-only endpoint of the failover group instance. + + :param failover_policy: Failover policy of the read-only endpoint for the + failover group. Possible values include: 'Disabled', 'Enabled' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy + """ + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InstanceFailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) + self.failover_policy = kwargs.get('failover_policy', None) + + +class InstanceFailoverGroupReadWriteEndpoint(Model): + """Read-write endpoint of the failover group instance. + + All required parameters must be populated in order to send to Azure. + + :param failover_policy: Required. Failover policy of the read-write + endpoint for the failover group. If failoverPolicy is Automatic then + failoverWithDataLossGracePeriodMinutes is required. Possible values + include: 'Manual', 'Automatic' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy + :param failover_with_data_loss_grace_period_minutes: Grace period before + failover with data loss is attempted for the read-write endpoint. If + failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is + required. + :type failover_with_data_loss_grace_period_minutes: int + """ + + _validation = { + 'failover_policy': {'required': True}, + } + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(InstanceFailoverGroupReadWriteEndpoint, self).__init__(**kwargs) + self.failover_policy = kwargs.get('failover_policy', None) + self.failover_with_data_loss_grace_period_minutes = kwargs.get('failover_with_data_loss_grace_period_minutes', None) + + +class InstancePool(TrackedResource): + """An Azure SQL instance pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param subnet_id: Required. Resource ID of the subnet to place this + instance pool in. + :type subnet_id: str + :param v_cores: Required. Count of vCores belonging to this instance pool. + :type v_cores: int + :param license_type: Required. The license type. Possible values are + 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' + (without SQL license price). Possible values include: 'LicenseIncluded', + 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.InstancePoolLicenseType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'subnet_id': {'required': True}, + 'v_cores': {'required': True}, + 'license_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InstancePool, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.v_cores = kwargs.get('v_cores', None) + self.license_type = kwargs.get('license_type', None) + + +class InstancePoolUpdate(Model): + """An update to an Instance pool. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(InstancePoolUpdate, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class Job(ProxyResource): + """A job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param description: User-defined description of the job. Default value: "" + . + :type description: str + :ivar version: The job version number. + :vartype version: int + :param schedule: Schedule properties of the job. + :type schedule: ~azure.mgmt.sql.models.JobSchedule + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'int'}, + 'schedule': {'key': 'properties.schedule', 'type': 'JobSchedule'}, + } + + def __init__(self, **kwargs): + super(Job, self).__init__(**kwargs) + self.description = kwargs.get('description', "") + self.version = None + self.schedule = kwargs.get('schedule', None) + + +class JobAgent(TrackedResource): + """An Azure SQL job agent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param database_id: Required. Resource ID of the database to store job + metadata in. + :type database_id: str + :ivar state: The state of the job agent. Possible values include: + 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' + :vartype state: str or ~azure.mgmt.sql.models.JobAgentState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'database_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobAgent, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.database_id = kwargs.get('database_id', None) + self.state = None + + +class JobAgentUpdate(Model): + """An update to an Azure SQL job agent. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(JobAgentUpdate, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class JobCredential(ProxyResource): + """A stored credential that can be used by a job to connect to target + databases. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param username: Required. The credential user name. + :type username: str + :param password: Required. The credential password. + :type password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'username': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'username': {'key': 'properties.username', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobCredential, self).__init__(**kwargs) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + + +class JobExecution(ProxyResource): + """An execution of a job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar job_version: The job version number. + :vartype job_version: int + :ivar step_name: The job step name. + :vartype step_name: str + :ivar step_id: The job step id. + :vartype step_id: int + :ivar job_execution_id: The unique identifier of the job execution. + :vartype job_execution_id: str + :ivar lifecycle: The detailed state of the job execution. Possible values + include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', + 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', + 'TimedOut', 'Canceled', 'Skipped' + :vartype lifecycle: str or ~azure.mgmt.sql.models.JobExecutionLifecycle + :ivar provisioning_state: The ARM provisioning state of the job execution. + Possible values include: 'Created', 'InProgress', 'Succeeded', 'Failed', + 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.sql.models.ProvisioningState + :ivar create_time: The time that the job execution was created. + :vartype create_time: datetime + :ivar start_time: The time that the job execution started. + :vartype start_time: datetime + :ivar end_time: The time that the job execution completed. + :vartype end_time: datetime + :param current_attempts: Number of times the job execution has been + attempted. + :type current_attempts: int + :ivar current_attempt_start_time: Start time of the current attempt. + :vartype current_attempt_start_time: datetime + :ivar last_message: The last status or error message. + :vartype last_message: str + :ivar target: The target that this execution is executed on. + :vartype target: ~azure.mgmt.sql.models.JobExecutionTarget + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'job_version': {'readonly': True}, + 'step_name': {'readonly': True}, + 'step_id': {'readonly': True}, + 'job_execution_id': {'readonly': True}, + 'lifecycle': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'create_time': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'current_attempt_start_time': {'readonly': True}, + 'last_message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'job_version': {'key': 'properties.jobVersion', 'type': 'int'}, + 'step_name': {'key': 'properties.stepName', 'type': 'str'}, + 'step_id': {'key': 'properties.stepId', 'type': 'int'}, + 'job_execution_id': {'key': 'properties.jobExecutionId', 'type': 'str'}, + 'lifecycle': {'key': 'properties.lifecycle', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'current_attempts': {'key': 'properties.currentAttempts', 'type': 'int'}, + 'current_attempt_start_time': {'key': 'properties.currentAttemptStartTime', 'type': 'iso-8601'}, + 'last_message': {'key': 'properties.lastMessage', 'type': 'str'}, + 'target': {'key': 'properties.target', 'type': 'JobExecutionTarget'}, + } + + def __init__(self, **kwargs): + super(JobExecution, self).__init__(**kwargs) + self.job_version = None + self.step_name = None + self.step_id = None + self.job_execution_id = None + self.lifecycle = None + self.provisioning_state = None + self.create_time = None + self.start_time = None + self.end_time = None + self.current_attempts = kwargs.get('current_attempts', None) + self.current_attempt_start_time = None + self.last_message = None + self.target = None + + +class JobExecutionTarget(Model): + """The target that a job execution is executed on. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of the target. Possible values include: + 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + :vartype type: str or ~azure.mgmt.sql.models.JobTargetType + :ivar server_name: The server name. + :vartype server_name: str + :ivar database_name: The database name. + :vartype database_name: str + """ + + _validation = { + 'type': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobExecutionTarget, self).__init__(**kwargs) + self.type = None + self.server_name = None + self.database_name = None + + +class JobSchedule(Model): + """Scheduling properties of a job. + + :param start_time: Schedule start time. Default value: + "0001-01-01T00:00:00Z" . + :type start_time: datetime + :param end_time: Schedule end time. Default value: "9999-12-31T11:59:59Z" + . + :type end_time: datetime + :param type: Schedule interval type. Possible values include: 'Once', + 'Recurring'. Default value: "Once" . + :type type: str or ~azure.mgmt.sql.models.JobScheduleType + :param enabled: Whether or not the schedule is enabled. + :type enabled: bool + :param interval: Value of the schedule's recurring interval, if the + schedule type is recurring. ISO8601 duration format. + :type interval: str + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'JobScheduleType'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'interval': {'key': 'interval', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobSchedule, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', "0001-01-01T00:00:00Z") + self.end_time = kwargs.get('end_time', "9999-12-31T11:59:59Z") + self.type = kwargs.get('type', "Once") + self.enabled = kwargs.get('enabled', None) + self.interval = kwargs.get('interval', None) + + +class JobStep(ProxyResource): + """A job step. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param step_id: The job step's index within the job. If not specified when + creating the job step, it will be created as the last step. If not + specified when updating the job step, the step id is not modified. + :type step_id: int + :param target_group: Required. The resource ID of the target group that + the job step will be executed on. + :type target_group: str + :param credential: Required. The resource ID of the job credential that + will be used to connect to the targets. + :type credential: str + :param action: Required. The action payload of the job step. + :type action: ~azure.mgmt.sql.models.JobStepAction + :param output: Output destination properties of the job step. + :type output: ~azure.mgmt.sql.models.JobStepOutput + :param execution_options: Execution options for the job step. + :type execution_options: ~azure.mgmt.sql.models.JobStepExecutionOptions + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'target_group': {'required': True}, + 'credential': {'required': True}, + 'action': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'step_id': {'key': 'properties.stepId', 'type': 'int'}, + 'target_group': {'key': 'properties.targetGroup', 'type': 'str'}, + 'credential': {'key': 'properties.credential', 'type': 'str'}, + 'action': {'key': 'properties.action', 'type': 'JobStepAction'}, + 'output': {'key': 'properties.output', 'type': 'JobStepOutput'}, + 'execution_options': {'key': 'properties.executionOptions', 'type': 'JobStepExecutionOptions'}, + } + + def __init__(self, **kwargs): + super(JobStep, self).__init__(**kwargs) + self.step_id = kwargs.get('step_id', None) + self.target_group = kwargs.get('target_group', None) + self.credential = kwargs.get('credential', None) + self.action = kwargs.get('action', None) + self.output = kwargs.get('output', None) + self.execution_options = kwargs.get('execution_options', None) + + +class JobStepAction(Model): + """The action to be executed by a job step. + + All required parameters must be populated in order to send to Azure. + + :param type: Type of action being executed by the job step. Possible + values include: 'TSql'. Default value: "TSql" . + :type type: str or ~azure.mgmt.sql.models.JobStepActionType + :param source: The source of the action to execute. Possible values + include: 'Inline'. Default value: "Inline" . + :type source: str or ~azure.mgmt.sql.models.JobStepActionSource + :param value: Required. The action value, for example the text of the + T-SQL script to execute. + :type value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobStepAction, self).__init__(**kwargs) + self.type = kwargs.get('type', "TSql") + self.source = kwargs.get('source', "Inline") + self.value = kwargs.get('value', None) + + +class JobStepExecutionOptions(Model): + """The execution options of a job step. + + :param timeout_seconds: Execution timeout for the job step. Default value: + 43200 . + :type timeout_seconds: int + :param retry_attempts: Maximum number of times the job step will be + reattempted if the first attempt fails. Default value: 10 . + :type retry_attempts: int + :param initial_retry_interval_seconds: Initial delay between retries for + job step execution. Default value: 1 . + :type initial_retry_interval_seconds: int + :param maximum_retry_interval_seconds: The maximum amount of time to wait + between retries for job step execution. Default value: 120 . + :type maximum_retry_interval_seconds: int + :param retry_interval_backoff_multiplier: The backoff multiplier for the + time between retries. Default value: 2 . + :type retry_interval_backoff_multiplier: float + """ + + _attribute_map = { + 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, + 'retry_attempts': {'key': 'retryAttempts', 'type': 'int'}, + 'initial_retry_interval_seconds': {'key': 'initialRetryIntervalSeconds', 'type': 'int'}, + 'maximum_retry_interval_seconds': {'key': 'maximumRetryIntervalSeconds', 'type': 'int'}, + 'retry_interval_backoff_multiplier': {'key': 'retryIntervalBackoffMultiplier', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(JobStepExecutionOptions, self).__init__(**kwargs) + self.timeout_seconds = kwargs.get('timeout_seconds', 43200) + self.retry_attempts = kwargs.get('retry_attempts', 10) + self.initial_retry_interval_seconds = kwargs.get('initial_retry_interval_seconds', 1) + self.maximum_retry_interval_seconds = kwargs.get('maximum_retry_interval_seconds', 120) + self.retry_interval_backoff_multiplier = kwargs.get('retry_interval_backoff_multiplier', 2) + + +class JobStepOutput(Model): + """The output configuration of a job step. + + All required parameters must be populated in order to send to Azure. + + :param type: The output destination type. Possible values include: + 'SqlDatabase'. Default value: "SqlDatabase" . + :type type: str or ~azure.mgmt.sql.models.JobStepOutputType + :param subscription_id: The output destination subscription id. + :type subscription_id: str + :param resource_group_name: The output destination resource group. + :type resource_group_name: str + :param server_name: Required. The output destination server name. + :type server_name: str + :param database_name: Required. The output destination database. + :type database_name: str + :param schema_name: The output destination schema. Default value: "dbo" . + :type schema_name: str + :param table_name: Required. The output destination table. + :type table_name: str + :param credential: Required. The resource ID of the credential to use to + connect to the output destination. + :type credential: str + """ + + _validation = { + 'server_name': {'required': True}, + 'database_name': {'required': True}, + 'table_name': {'required': True}, + 'credential': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'credential': {'key': 'credential', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobStepOutput, self).__init__(**kwargs) + self.type = kwargs.get('type', "SqlDatabase") + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group_name = kwargs.get('resource_group_name', None) + self.server_name = kwargs.get('server_name', None) + self.database_name = kwargs.get('database_name', None) + self.schema_name = kwargs.get('schema_name', "dbo") + self.table_name = kwargs.get('table_name', None) + self.credential = kwargs.get('credential', None) + + +class JobTarget(Model): + """A job target, for example a specific database or a container of databases + that is evaluated during job execution. + + All required parameters must be populated in order to send to Azure. + + :param membership_type: Whether the target is included or excluded from + the group. Possible values include: 'Include', 'Exclude'. Default value: + "Include" . + :type membership_type: str or + ~azure.mgmt.sql.models.JobTargetGroupMembershipType + :param type: Required. The target type. Possible values include: + 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + :type type: str or ~azure.mgmt.sql.models.JobTargetType + :param server_name: The target server name. + :type server_name: str + :param database_name: The target database name. + :type database_name: str + :param elastic_pool_name: The target elastic pool name. + :type elastic_pool_name: str + :param shard_map_name: The target shard map. + :type shard_map_name: str + :param refresh_credential: The resource ID of the credential that is used + during job execution to connect to the target and determine the list of + databases inside the target. + :type refresh_credential: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'membership_type': {'key': 'membershipType', 'type': 'JobTargetGroupMembershipType'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'elastic_pool_name': {'key': 'elasticPoolName', 'type': 'str'}, + 'shard_map_name': {'key': 'shardMapName', 'type': 'str'}, + 'refresh_credential': {'key': 'refreshCredential', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobTarget, self).__init__(**kwargs) + self.membership_type = kwargs.get('membership_type', "Include") + self.type = kwargs.get('type', None) + self.server_name = kwargs.get('server_name', None) + self.database_name = kwargs.get('database_name', None) + self.elastic_pool_name = kwargs.get('elastic_pool_name', None) + self.shard_map_name = kwargs.get('shard_map_name', None) + self.refresh_credential = kwargs.get('refresh_credential', None) + + +class JobTargetGroup(ProxyResource): + """A group of job targets. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param members: Required. Members of the target group. + :type members: list[~azure.mgmt.sql.models.JobTarget] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'members': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'members': {'key': 'properties.members', 'type': '[JobTarget]'}, + } + + def __init__(self, **kwargs): + super(JobTargetGroup, self).__init__(**kwargs) + self.members = kwargs.get('members', None) + + +class JobVersion(ProxyResource): + """A job version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobVersion, self).__init__(**kwargs) + + +class LicenseTypeCapability(Model): + """The license type capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: License type identifier. + :vartype name: str + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LicenseTypeCapability, self).__init__(**kwargs) + self.name = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class LocationCapabilities(Model): + """The location capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The location name. + :vartype name: str + :ivar supported_server_versions: The list of supported server versions. + :vartype supported_server_versions: + list[~azure.mgmt.sql.models.ServerVersionCapability] + :ivar supported_managed_instance_versions: The list of supported managed + instance versions. + :vartype supported_managed_instance_versions: + list[~azure.mgmt.sql.models.ManagedInstanceVersionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_server_versions': {'readonly': True}, + 'supported_managed_instance_versions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_server_versions': {'key': 'supportedServerVersions', 'type': '[ServerVersionCapability]'}, + 'supported_managed_instance_versions': {'key': 'supportedManagedInstanceVersions', 'type': '[ManagedInstanceVersionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LocationCapabilities, self).__init__(**kwargs) + self.name = None + self.supported_server_versions = None + self.supported_managed_instance_versions = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class LogSizeCapability(Model): + """The log size capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The log size limit (see 'unit' for the units). + :vartype limit: int + :ivar unit: The units that the limit is expressed in. Possible values + include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes', 'Percent' + :vartype unit: str or ~azure.mgmt.sql.models.LogSizeUnit + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'int'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LogSizeCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + + +class LongTermRetentionBackup(ProxyResource): + """A long term retention backup. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar server_name: The server name that the backup database belong to. + :vartype server_name: str + :ivar server_create_time: The create time of the server. + :vartype server_create_time: datetime + :ivar database_name: The name of the database the backup belong to + :vartype database_name: str + :ivar database_deletion_time: The delete time of the database + :vartype database_deletion_time: datetime + :ivar backup_time: The time the backup was taken + :vartype backup_time: datetime + :ivar backup_expiration_time: The time the long term retention backup will + expire. + :vartype backup_expiration_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'server_name': {'readonly': True}, + 'server_create_time': {'readonly': True}, + 'database_name': {'readonly': True}, + 'database_deletion_time': {'readonly': True}, + 'backup_time': {'readonly': True}, + 'backup_expiration_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'server_create_time': {'key': 'properties.serverCreateTime', 'type': 'iso-8601'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'database_deletion_time': {'key': 'properties.databaseDeletionTime', 'type': 'iso-8601'}, + 'backup_time': {'key': 'properties.backupTime', 'type': 'iso-8601'}, + 'backup_expiration_time': {'key': 'properties.backupExpirationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(LongTermRetentionBackup, self).__init__(**kwargs) + self.server_name = None + self.server_create_time = None + self.database_name = None + self.database_deletion_time = None + self.backup_time = None + self.backup_expiration_time = None + + +class ManagedBackupShortTermRetentionPolicy(ProxyResource): + """A short term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param retention_days: The backup retention period in days. This is how + many days Point-in-Time Restore will be supported. + :type retention_days: int + """ + + _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'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ManagedBackupShortTermRetentionPolicy, self).__init__(**kwargs) + self.retention_days = kwargs.get('retention_days', None) + + +class ManagedDatabase(TrackedResource): + """A managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param collation: Collation of the managed database. + :type collation: str + :ivar status: Status of the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' + :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus + :ivar creation_date: Creation date of the database. + :vartype creation_date: datetime + :ivar earliest_restore_point: Earliest restore point in time for point in + time restore. + :vartype earliest_restore_point: datetime + :param restore_point_in_time: Conditional. If createMode is + PointInTimeRestore, this value is required. Specifies the point in time + (ISO8601 format) of the source database that will be restored to create + the new database. + :type restore_point_in_time: datetime + :ivar default_secondary_location: Geo paired region. + :vartype default_secondary_location: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param create_mode: Managed database create mode. PointInTimeRestore: + Create a database by restoring a point in time backup of an existing + database. SourceDatabaseName, SourceManagedInstanceName and PointInTime + must be specified. RestoreExternalBackup: Create a database by restoring + from external backup files. Collation, StorageContainerUri and + StorageContainerSasToken must be specified. Recovery: Creates a database + by restoring a geo-replicated backup. RecoverableDatabaseId must be + specified as the recoverable database resource ID to restore. Possible + values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', + 'Recovery' + :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode + :param storage_container_uri: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the uri of the + storage container where backups for this restore are stored. + :type storage_container_uri: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :param restorable_dropped_database_id: The restorable dropped database + resource id to restore when creating this database. + :type restorable_dropped_database_id: str + :param storage_container_sas_token: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the storage + container sas token. + :type storage_container_sas_token: str + :ivar failover_group_id: Instance Failover Group resource identifier that + this managed database belongs to. + :vartype failover_group_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'status': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'earliest_restore_point': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedDatabase, self).__init__(**kwargs) + self.collation = kwargs.get('collation', None) + self.status = None + self.creation_date = None + self.earliest_restore_point = None + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.default_secondary_location = None + self.catalog_collation = kwargs.get('catalog_collation', None) + self.create_mode = kwargs.get('create_mode', None) + self.storage_container_uri = kwargs.get('storage_container_uri', None) + self.source_database_id = kwargs.get('source_database_id', None) + self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) + self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None) + self.failover_group_id = None + self.recoverable_database_id = kwargs.get('recoverable_database_id', None) + + +class ManagedDatabaseSecurityAlertPolicy(ProxyResource): + """A managed database security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ManagedDatabaseSecurityAlertPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.disabled_alerts = kwargs.get('disabled_alerts', None) + self.email_addresses = kwargs.get('email_addresses', None) + self.email_account_admins = kwargs.get('email_account_admins', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.creation_time = None + + +class ManagedDatabaseUpdate(Model): + """An managed database update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param collation: Collation of the managed database. + :type collation: str + :ivar status: Status of the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' + :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus + :ivar creation_date: Creation date of the database. + :vartype creation_date: datetime + :ivar earliest_restore_point: Earliest restore point in time for point in + time restore. + :vartype earliest_restore_point: datetime + :param restore_point_in_time: Conditional. If createMode is + PointInTimeRestore, this value is required. Specifies the point in time + (ISO8601 format) of the source database that will be restored to create + the new database. + :type restore_point_in_time: datetime + :ivar default_secondary_location: Geo paired region. + :vartype default_secondary_location: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param create_mode: Managed database create mode. PointInTimeRestore: + Create a database by restoring a point in time backup of an existing + database. SourceDatabaseName, SourceManagedInstanceName and PointInTime + must be specified. RestoreExternalBackup: Create a database by restoring + from external backup files. Collation, StorageContainerUri and + StorageContainerSasToken must be specified. Recovery: Creates a database + by restoring a geo-replicated backup. RecoverableDatabaseId must be + specified as the recoverable database resource ID to restore. Possible + values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', + 'Recovery' + :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode + :param storage_container_uri: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the uri of the + storage container where backups for this restore are stored. + :type storage_container_uri: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :param restorable_dropped_database_id: The restorable dropped database + resource id to restore when creating this database. + :type restorable_dropped_database_id: str + :param storage_container_sas_token: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the storage + container sas token. + :type storage_container_sas_token: str + :ivar failover_group_id: Instance Failover Group resource identifier that + this managed database belongs to. + :vartype failover_group_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'status': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'earliest_restore_point': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + } + + _attribute_map = { + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ManagedDatabaseUpdate, self).__init__(**kwargs) + self.collation = kwargs.get('collation', None) + self.status = None + self.creation_date = None + self.earliest_restore_point = None + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.default_secondary_location = None + self.catalog_collation = kwargs.get('catalog_collation', None) + self.create_mode = kwargs.get('create_mode', None) + self.storage_container_uri = kwargs.get('storage_container_uri', None) + self.source_database_id = kwargs.get('source_database_id', None) + self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) + self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None) + self.failover_group_id = None + self.recoverable_database_id = kwargs.get('recoverable_database_id', None) + self.tags = kwargs.get('tags', None) + + +class ManagedInstance(TrackedResource): + """An Azure SQL managed instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param identity: The Azure Active Directory identity of the managed + instance. + :type identity: ~azure.mgmt.sql.models.ResourceIdentity + :param sku: Managed instance SKU. Allowed values for sku.name: GP_Gen4, + GP_Gen5, BC_Gen4, BC_Gen5 + :type sku: ~azure.mgmt.sql.models.Sku + :param managed_instance_create_mode: Specifies the mode of database + creation. + Default: Regular instance creation. + Restore: Creates an instance by restoring a set of backups to specific + point in time. RestorePointInTime and SourceManagedInstanceId must be + specified. Possible values include: 'Default', 'PointInTimeRestore' + :type managed_instance_create_mode: str or + ~azure.mgmt.sql.models.ManagedServerCreateMode + :ivar fully_qualified_domain_name: The fully qualified domain name of the + managed instance. + :vartype fully_qualified_domain_name: str + :param administrator_login: Administrator username for the managed + instance. Can only be specified when the managed instance is being created + (and is required for creation). + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for managed instance creation). + :type administrator_login_password: str + :param subnet_id: Subnet resource ID for the managed instance. + :type subnet_id: str + :ivar state: The state of the managed instance. + :vartype state: str + :param license_type: The license type. Possible values are + 'LicenseIncluded' (regular price inclusive of a new SQL license) and + 'BasePrice' (discounted AHB price for bringing your own SQL licenses). + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or + ~azure.mgmt.sql.models.ManagedInstanceLicenseType + :param v_cores: The number of vCores. Allowed values: 8, 16, 24, 32, 40, + 64, 80. + :type v_cores: int + :param storage_size_in_gb: Storage size in GB. Minimum value: 32. Maximum + value: 8192. Increments of 32 GB allowed only. + :type storage_size_in_gb: int + :param collation: Collation of the managed instance. + :type collation: str + :ivar dns_zone: The Dns Zone that the managed instance is in. + :vartype dns_zone: str + :param dns_zone_partner: The resource id of another managed instance whose + DNS zone this managed instance will share after creation. + :type dns_zone_partner: str + :param public_data_endpoint_enabled: Whether or not the public data + endpoint is enabled. + :type public_data_endpoint_enabled: bool + :param source_managed_instance_id: The resource identifier of the source + managed instance associated with create operation of this instance. + :type source_managed_instance_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param proxy_override: Connection type used for connecting to the + instance. Possible values include: 'Proxy', 'Redirect', 'Default' + :type proxy_override: str or + ~azure.mgmt.sql.models.ManagedInstanceProxyOverride + :param timezone_id: Id of the timezone. Allowed values are timezones + supported by Windows. + Windows keeps details on supported timezones, including the id, in + registry under + KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time + Zones. + You can get those registry values via SQL Server by querying SELECT name + AS timezone_id FROM sys.time_zone_info. + List of Ids can also be obtained by executing + [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + An example of valid timezone id is "Pacific Standard Time" or "W. Europe + Standard Time". + :type timezone_id: str + :param instance_pool_id: The Id of the instance pool this managed server + belongs to. + :type instance_pool_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'fully_qualified_domain_name': {'readonly': True}, + 'state': {'readonly': True}, + 'dns_zone': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, + 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, + 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, + 'source_managed_instance_id': {'key': 'properties.sourceManagedInstanceId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, + 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, + 'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstance, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.sku = kwargs.get('sku', None) + self.managed_instance_create_mode = kwargs.get('managed_instance_create_mode', None) + self.fully_qualified_domain_name = None + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.state = None + self.license_type = kwargs.get('license_type', None) + self.v_cores = kwargs.get('v_cores', None) + self.storage_size_in_gb = kwargs.get('storage_size_in_gb', None) + self.collation = kwargs.get('collation', None) + self.dns_zone = None + self.dns_zone_partner = kwargs.get('dns_zone_partner', None) + self.public_data_endpoint_enabled = kwargs.get('public_data_endpoint_enabled', None) + self.source_managed_instance_id = kwargs.get('source_managed_instance_id', None) + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.proxy_override = kwargs.get('proxy_override', None) + self.timezone_id = kwargs.get('timezone_id', None) + self.instance_pool_id = kwargs.get('instance_pool_id', None) + + +class ManagedInstanceEditionCapability(Model): + """The managed server capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The managed server version name. + :vartype name: str + :ivar supported_families: The supported families. + :vartype supported_families: + list[~azure.mgmt.sql.models.ManagedInstanceFamilyCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_families': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_families': {'key': 'supportedFamilies', 'type': '[ManagedInstanceFamilyCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceEditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_families = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ManagedInstanceEncryptionProtector(ProxyResource): + """The managed instance encryption protector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :vartype kind: str + :param server_key_name: The name of the managed instance key. + :type server_key_name: str + :param server_key_type: Required. The encryption protector type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :ivar uri: The URI of the server key. + :vartype uri: str + :ivar thumbprint: Thumbprint of the server key. + :vartype thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'server_key_type': {'required': True}, + 'uri': {'readonly': True}, + 'thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceEncryptionProtector, self).__init__(**kwargs) + self.kind = None + self.server_key_name = kwargs.get('server_key_name', None) + self.server_key_type = kwargs.get('server_key_type', None) + self.uri = None + self.thumbprint = None + + +class ManagedInstanceFamilyCapability(Model): + """The managed server family capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Family name. + :vartype name: str + :ivar sku: SKU name. + :vartype sku: str + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar supported_vcores_values: List of supported virtual cores values. + :vartype supported_vcores_values: + list[~azure.mgmt.sql.models.ManagedInstanceVcoresCapability] + :ivar included_max_size: Included size. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar supported_storage_sizes: Storage size ranges. + :vartype supported_storage_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'supported_vcores_values': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'supported_storage_sizes': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'supported_vcores_values': {'key': 'supportedVcoresValues', 'type': '[ManagedInstanceVcoresCapability]'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'supported_storage_sizes': {'key': 'supportedStorageSizes', 'type': '[MaxSizeRangeCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceFamilyCapability, self).__init__(**kwargs) + self.name = None + self.sku = None + self.supported_license_types = None + self.supported_vcores_values = None + self.included_max_size = None + self.supported_storage_sizes = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ManagedInstanceKey(ProxyResource): + """A managed instance key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :vartype kind: str + :param server_key_type: Required. The key type like 'ServiceManaged', + 'AzureKeyVault'. Possible values include: 'ServiceManaged', + 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :param uri: The URI of the key. If the ServerKeyType is AzureKeyVault, + then the URI is required. + :type uri: str + :ivar thumbprint: Thumbprint of the key. + :vartype thumbprint: str + :ivar creation_date: The key creation date. + :vartype creation_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'server_key_type': {'required': True}, + 'thumbprint': {'readonly': True}, + 'creation_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceKey, self).__init__(**kwargs) + self.kind = None + self.server_key_type = kwargs.get('server_key_type', None) + self.uri = kwargs.get('uri', None) + self.thumbprint = None + self.creation_date = None + + +class ManagedInstancePairInfo(Model): + """Pairs of Managed Instances in the failover group. + + :param primary_managed_instance_id: Id of Primary Managed Instance in + pair. + :type primary_managed_instance_id: str + :param partner_managed_instance_id: Id of Partner Managed Instance in + pair. + :type partner_managed_instance_id: str + """ + + _attribute_map = { + 'primary_managed_instance_id': {'key': 'primaryManagedInstanceId', 'type': 'str'}, + 'partner_managed_instance_id': {'key': 'partnerManagedInstanceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstancePairInfo, self).__init__(**kwargs) + self.primary_managed_instance_id = kwargs.get('primary_managed_instance_id', None) + self.partner_managed_instance_id = kwargs.get('partner_managed_instance_id', None) + + +class ManagedInstanceUpdate(Model): + """An update request for an Azure SQL Database managed instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param sku: Managed instance sku + :type sku: ~azure.mgmt.sql.models.Sku + :param managed_instance_create_mode: Specifies the mode of database + creation. + Default: Regular instance creation. + Restore: Creates an instance by restoring a set of backups to specific + point in time. RestorePointInTime and SourceManagedInstanceId must be + specified. Possible values include: 'Default', 'PointInTimeRestore' + :type managed_instance_create_mode: str or + ~azure.mgmt.sql.models.ManagedServerCreateMode + :ivar fully_qualified_domain_name: The fully qualified domain name of the + managed instance. + :vartype fully_qualified_domain_name: str + :param administrator_login: Administrator username for the managed + instance. Can only be specified when the managed instance is being created + (and is required for creation). + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for managed instance creation). + :type administrator_login_password: str + :param subnet_id: Subnet resource ID for the managed instance. + :type subnet_id: str + :ivar state: The state of the managed instance. + :vartype state: str + :param license_type: The license type. Possible values are + 'LicenseIncluded' (regular price inclusive of a new SQL license) and + 'BasePrice' (discounted AHB price for bringing your own SQL licenses). + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or + ~azure.mgmt.sql.models.ManagedInstanceLicenseType + :param v_cores: The number of vCores. Allowed values: 8, 16, 24, 32, 40, + 64, 80. + :type v_cores: int + :param storage_size_in_gb: Storage size in GB. Minimum value: 32. Maximum + value: 8192. Increments of 32 GB allowed only. + :type storage_size_in_gb: int + :param collation: Collation of the managed instance. + :type collation: str + :ivar dns_zone: The Dns Zone that the managed instance is in. + :vartype dns_zone: str + :param dns_zone_partner: The resource id of another managed instance whose + DNS zone this managed instance will share after creation. + :type dns_zone_partner: str + :param public_data_endpoint_enabled: Whether or not the public data + endpoint is enabled. + :type public_data_endpoint_enabled: bool + :param source_managed_instance_id: The resource identifier of the source + managed instance associated with create operation of this instance. + :type source_managed_instance_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param proxy_override: Connection type used for connecting to the + instance. Possible values include: 'Proxy', 'Redirect', 'Default' + :type proxy_override: str or + ~azure.mgmt.sql.models.ManagedInstanceProxyOverride + :param timezone_id: Id of the timezone. Allowed values are timezones + supported by Windows. + Windows keeps details on supported timezones, including the id, in + registry under + KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time + Zones. + You can get those registry values via SQL Server by querying SELECT name + AS timezone_id FROM sys.time_zone_info. + List of Ids can also be obtained by executing + [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + An example of valid timezone id is "Pacific Standard Time" or "W. Europe + Standard Time". + :type timezone_id: str + :param instance_pool_id: The Id of the instance pool this managed server + belongs to. + :type instance_pool_id: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'fully_qualified_domain_name': {'readonly': True}, + 'state': {'readonly': True}, + 'dns_zone': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, + 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, + 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, + 'source_managed_instance_id': {'key': 'properties.sourceManagedInstanceId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, + 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, + 'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceUpdate, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.managed_instance_create_mode = kwargs.get('managed_instance_create_mode', None) + self.fully_qualified_domain_name = None + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.state = None + self.license_type = kwargs.get('license_type', None) + self.v_cores = kwargs.get('v_cores', None) + self.storage_size_in_gb = kwargs.get('storage_size_in_gb', None) + self.collation = kwargs.get('collation', None) + self.dns_zone = None + self.dns_zone_partner = kwargs.get('dns_zone_partner', None) + self.public_data_endpoint_enabled = kwargs.get('public_data_endpoint_enabled', None) + self.source_managed_instance_id = kwargs.get('source_managed_instance_id', None) + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.proxy_override = kwargs.get('proxy_override', None) + self.timezone_id = kwargs.get('timezone_id', None) + self.instance_pool_id = kwargs.get('instance_pool_id', None) + self.tags = kwargs.get('tags', None) + + +class ManagedInstanceVcoresCapability(Model): + """The managed instance virtual cores capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The virtual cores identifier. + :vartype name: str + :ivar value: The virtual cores value. + :vartype value: int + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'int'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceVcoresCapability, self).__init__(**kwargs) + self.name = None + self.value = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ManagedInstanceVersionCapability(Model): + """The managed instance capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The server version name. + :vartype name: str + :ivar supported_editions: The list of supported managed instance editions. + :vartype supported_editions: + list[~azure.mgmt.sql.models.ManagedInstanceEditionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_editions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_editions': {'key': 'supportedEditions', 'type': '[ManagedInstanceEditionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceVersionCapability, self).__init__(**kwargs) + self.name = None + self.supported_editions = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ManagedInstanceVulnerabilityAssessment(ProxyResource): + """A managed instance vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: Required. A blob storage container path to + hold the scan results (e.g. + https://myStorage.blob.core.windows.net/VaScans/). + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_container_path': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = kwargs.get('storage_container_path', None) + self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.recurring_scans = kwargs.get('recurring_scans', None) + + +class ManagedServerSecurityAlertPolicy(ProxyResource): + """A managed server security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ManagedServerSecurityAlertPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.disabled_alerts = kwargs.get('disabled_alerts', None) + self.email_addresses = kwargs.get('email_addresses', None) + self.email_account_admins = kwargs.get('email_account_admins', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.creation_time = None + + +class MaxSizeCapability(Model): + """The maximum size capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The maximum size limit (see 'unit' for the units). + :vartype limit: int + :ivar unit: The units that the limit is expressed in. Possible values + include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' + :vartype unit: str or ~azure.mgmt.sql.models.MaxSizeUnit + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'int'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MaxSizeCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + + +class MaxSizeRangeCapability(Model): + """The maximum size range capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar min_value: Minimum value. + :vartype min_value: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar max_value: Maximum value. + :vartype max_value: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar scale_size: Scale/step size for discrete values between the minimum + value and the maximum value. + :vartype scale_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar log_size: Size of transaction log. + :vartype log_size: ~azure.mgmt.sql.models.LogSizeCapability + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'min_value': {'readonly': True}, + 'max_value': {'readonly': True}, + 'scale_size': {'readonly': True}, + 'log_size': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'min_value': {'key': 'minValue', 'type': 'MaxSizeCapability'}, + 'max_value': {'key': 'maxValue', 'type': 'MaxSizeCapability'}, + 'scale_size': {'key': 'scaleSize', 'type': 'MaxSizeCapability'}, + 'log_size': {'key': 'logSize', 'type': 'LogSizeCapability'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MaxSizeRangeCapability, self).__init__(**kwargs) + self.min_value = None + self.max_value = None + self.scale_size = None + self.log_size = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class Metric(Model): + """Database metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar start_time: The start time for the metric (ISO-8601 format). + :vartype start_time: datetime + :ivar end_time: The end time for the metric (ISO-8601 format). + :vartype end_time: datetime + :ivar time_grain: The time step to be used to summarize the metric values. + :vartype time_grain: str + :ivar unit: The unit of the metric. Possible values include: 'count', + 'bytes', 'seconds', 'percent', 'countPerSecond', 'bytesPerSecond' + :vartype unit: str or ~azure.mgmt.sql.models.UnitType + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.sql.models.MetricName + :ivar metric_values: The metric values for the specified time window and + timestep. + :vartype metric_values: list[~azure.mgmt.sql.models.MetricValue] + """ + + _validation = { + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'time_grain': {'readonly': True}, + 'unit': {'readonly': True}, + 'name': {'readonly': True}, + 'metric_values': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'MetricName'}, + 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, + } + + def __init__(self, **kwargs): + super(Metric, self).__init__(**kwargs) + self.start_time = None + self.end_time = None + self.time_grain = None + self.unit = None + self.name = None + self.metric_values = None + + +class MetricAvailability(Model): + """A metric availability value. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar retention: The length of retention for the database metric. + :vartype retention: str + :ivar time_grain: The granularity of the database metric. + :vartype time_grain: str + """ + + _validation = { + 'retention': {'readonly': True}, + 'time_grain': {'readonly': True}, + } + + _attribute_map = { + 'retention': {'key': 'retention', 'type': 'str'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetricAvailability, self).__init__(**kwargs) + self.retention = None + self.time_grain = None + + +class MetricDefinition(Model): + """A database metric definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.sql.models.MetricName + :ivar primary_aggregation_type: The primary aggregation type defining how + metric values are displayed. Possible values include: 'None', 'Average', + 'Count', 'Minimum', 'Maximum', 'Total' + :vartype primary_aggregation_type: str or + ~azure.mgmt.sql.models.PrimaryAggregationType + :ivar resource_uri: The resource uri of the database. + :vartype resource_uri: str + :ivar unit: The unit of the metric. Possible values include: 'Count', + 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' + :vartype unit: str or ~azure.mgmt.sql.models.UnitDefinitionType + :ivar metric_availabilities: The list of database metric availabilities + for the metric. + :vartype metric_availabilities: + list[~azure.mgmt.sql.models.MetricAvailability] + """ + + _validation = { + 'name': {'readonly': True}, + 'primary_aggregation_type': {'readonly': True}, + 'resource_uri': {'readonly': True}, + 'unit': {'readonly': True}, + 'metric_availabilities': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'MetricName'}, + 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, + } + + def __init__(self, **kwargs): + super(MetricDefinition, self).__init__(**kwargs) + self.name = None + self.primary_aggregation_type = None + self.resource_uri = None + self.unit = None + self.metric_availabilities = None + + +class MetricName(Model): + """A database metric name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The name of the database metric. + :vartype value: str + :ivar localized_value: The friendly name of the database metric. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetricName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class MetricValue(Model): + """Represents database metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar count: The number of values for the metric. + :vartype count: float + :ivar average: The average value of the metric. + :vartype average: float + :ivar maximum: The max value of the metric. + :vartype maximum: float + :ivar minimum: The min value of the metric. + :vartype minimum: float + :ivar timestamp: The metric timestamp (ISO-8601 format). + :vartype timestamp: datetime + :ivar total: The total value of the metric. + :vartype total: float + """ + + _validation = { + 'count': {'readonly': True}, + 'average': {'readonly': True}, + 'maximum': {'readonly': True}, + 'minimum': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'total': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'float'}, + 'average': {'key': 'average', 'type': 'float'}, + 'maximum': {'key': 'maximum', 'type': 'float'}, + 'minimum': {'key': 'minimum', 'type': 'float'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'total': {'key': 'total', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(MetricValue, self).__init__(**kwargs) + self.count = None + self.average = None + self.maximum = None + self.minimum = None + self.timestamp = None + self.total = None + + +class Name(Model): + """ARM Usage Name. + + :param value: Usage name value + :type value: str + :param localized_value: Usage name localized value. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Name, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) + + +class Operation(Model): + """SQL REST API operation definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the operation being performed on this particular + object. + :vartype name: str + :ivar display: The localized display information for this particular + operation / action. + :vartype display: ~azure.mgmt.sql.models.OperationDisplay + :ivar origin: The intended executor of the operation. Possible values + include: 'user', 'system' + :vartype origin: str or ~azure.mgmt.sql.models.OperationOrigin + :ivar properties: Additional descriptions for the operation. + :vartype properties: dict[str, object] + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + 'origin': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + self.origin = None + self.properties = None + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The localized friendly form of the resource provider name. + :vartype provider: str + :ivar resource: The localized friendly form of the resource type related + to this action/operation. + :vartype resource: str + :ivar operation: The localized friendly name for the operation. + :vartype operation: str + :ivar description: The localized friendly description for the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class OperationImpact(Model): + """The impact of an operation, both in absolute and relative terms. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the impact dimension. + :vartype name: str + :ivar unit: The unit in which estimated impact to dimension is measured. + :vartype unit: str + :ivar change_value_absolute: The absolute impact to dimension. + :vartype change_value_absolute: float + :ivar change_value_relative: The relative impact to dimension (null if not + applicable) + :vartype change_value_relative: float + """ + + _validation = { + 'name': {'readonly': True}, + 'unit': {'readonly': True}, + 'change_value_absolute': {'readonly': True}, + 'change_value_relative': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'change_value_absolute': {'key': 'changeValueAbsolute', 'type': 'float'}, + 'change_value_relative': {'key': 'changeValueRelative', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(OperationImpact, self).__init__(**kwargs) + self.name = None + self.unit = None + self.change_value_absolute = None + self.change_value_relative = None + + +class PartnerInfo(Model): + """Partner server information for the failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource identifier of the partner server. + :type id: str + :ivar location: Geo location of the partner server. + :vartype location: str + :ivar replication_role: Replication role of the partner server. Possible + values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.FailoverGroupReplicationRole + """ + + _validation = { + 'id': {'required': True}, + 'location': {'readonly': True}, + 'replication_role': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'replication_role': {'key': 'replicationRole', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PartnerInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.location = None + self.replication_role = None + + +class PartnerRegionInfo(Model): + """Partner region information for the failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param location: Geo location of the partner managed instances. + :type location: str + :ivar replication_role: Replication role of the partner managed instances. + Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole + """ + + _validation = { + 'replication_role': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'replication_role': {'key': 'replicationRole', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PartnerRegionInfo, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.replication_role = None + + +class PerformanceLevelCapability(Model): + """The performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: Performance level value. + :vartype value: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + """ + + _validation = { + 'value': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PerformanceLevelCapability, self).__init__(**kwargs) + self.value = None + self.unit = None + + +class RecommendedElasticPool(ProxyResource): + """Represents a recommended elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_edition: The edition of the recommended elastic pool. The + ElasticPoolEdition enumeration contains all the valid editions. Possible + values include: 'Basic', 'Standard', 'Premium', 'GeneralPurpose', + 'BusinessCritical' + :vartype database_edition: str or + ~azure.mgmt.sql.models.ElasticPoolEdition + :param dtu: The DTU for the recommended elastic pool. + :type dtu: float + :param database_dtu_min: The minimum DTU for the database. + :type database_dtu_min: float + :param database_dtu_max: The maximum DTU for the database. + :type database_dtu_max: float + :param storage_mb: Gets storage size in megabytes. + :type storage_mb: float + :ivar observation_period_start: The observation period start (ISO8601 + format). + :vartype observation_period_start: datetime + :ivar observation_period_end: The observation period start (ISO8601 + format). + :vartype observation_period_end: datetime + :ivar max_observed_dtu: Gets maximum observed DTU. + :vartype max_observed_dtu: float + :ivar max_observed_storage_mb: Gets maximum observed storage in megabytes. + :vartype max_observed_storage_mb: float + :ivar databases: The list of databases in this pool. Expanded property + :vartype databases: list[~azure.mgmt.sql.models.TrackedResource] + :ivar metrics: The list of databases housed in the server. Expanded + property + :vartype metrics: + list[~azure.mgmt.sql.models.RecommendedElasticPoolMetric] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_edition': {'readonly': True}, + 'observation_period_start': {'readonly': True}, + 'observation_period_end': {'readonly': True}, + 'max_observed_dtu': {'readonly': True}, + 'max_observed_storage_mb': {'readonly': True}, + 'databases': {'readonly': True}, + 'metrics': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'dtu': {'key': 'properties.dtu', 'type': 'float'}, + 'database_dtu_min': {'key': 'properties.databaseDtuMin', 'type': 'float'}, + 'database_dtu_max': {'key': 'properties.databaseDtuMax', 'type': 'float'}, + 'storage_mb': {'key': 'properties.storageMB', 'type': 'float'}, + 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, + 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, + 'max_observed_dtu': {'key': 'properties.maxObservedDtu', 'type': 'float'}, + 'max_observed_storage_mb': {'key': 'properties.maxObservedStorageMB', 'type': 'float'}, + 'databases': {'key': 'properties.databases', 'type': '[TrackedResource]'}, + 'metrics': {'key': 'properties.metrics', 'type': '[RecommendedElasticPoolMetric]'}, + } + + def __init__(self, **kwargs): + super(RecommendedElasticPool, self).__init__(**kwargs) + self.database_edition = None + self.dtu = kwargs.get('dtu', None) + self.database_dtu_min = kwargs.get('database_dtu_min', None) + self.database_dtu_max = kwargs.get('database_dtu_max', None) + self.storage_mb = kwargs.get('storage_mb', None) + self.observation_period_start = None + self.observation_period_end = None + self.max_observed_dtu = None + self.max_observed_storage_mb = None + self.databases = None + self.metrics = None + + +class RecommendedElasticPoolMetric(Model): + """Represents recommended elastic pool metric. + + :param date_time_property: The time of metric (ISO8601 format). + :type date_time_property: datetime + :param dtu: Gets or sets the DTUs (Database Transaction Units). See + https://azure.microsoft.com/documentation/articles/sql-database-what-is-a-dtu/ + :type dtu: float + :param size_gb: Gets or sets size in gigabytes. + :type size_gb: float + """ + + _attribute_map = { + 'date_time_property': {'key': 'dateTime', 'type': 'iso-8601'}, + 'dtu': {'key': 'dtu', 'type': 'float'}, + 'size_gb': {'key': 'sizeGB', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(RecommendedElasticPoolMetric, self).__init__(**kwargs) + self.date_time_property = kwargs.get('date_time_property', None) + self.dtu = kwargs.get('dtu', None) + self.size_gb = kwargs.get('size_gb', None) + + +class RecommendedIndex(ProxyResource): + """Represents a database recommended index. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar action: The proposed index action. You can create a missing index, + drop an unused index, or rebuild an existing index to improve its + performance. Possible values include: 'Create', 'Drop', 'Rebuild' + :vartype action: str or ~azure.mgmt.sql.models.RecommendedIndexAction + :ivar state: The current recommendation state. Possible values include: + 'Active', 'Pending', 'Executing', 'Verifying', 'Pending Revert', + 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success' + :vartype state: str or ~azure.mgmt.sql.models.RecommendedIndexState + :ivar created: The UTC datetime showing when this resource was created + (ISO8601 format). + :vartype created: datetime + :ivar last_modified: The UTC datetime of when was this resource last + changed (ISO8601 format). + :vartype last_modified: datetime + :ivar index_type: The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, + CLUSTERED COLUMNSTORE). Possible values include: 'CLUSTERED', + 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED COLUMNSTORE' + :vartype index_type: str or ~azure.mgmt.sql.models.RecommendedIndexType + :ivar schema: The schema where table to build index over resides + :vartype schema: str + :ivar table: The table on which to build index. + :vartype table: str + :ivar columns: Columns over which to build index + :vartype columns: list[str] + :ivar included_columns: The list of column names to be included in the + index + :vartype included_columns: list[str] + :ivar index_script: The full build index script + :vartype index_script: str + :ivar estimated_impact: The estimated impact of doing recommended index + action. + :vartype estimated_impact: list[~azure.mgmt.sql.models.OperationImpact] + :ivar reported_impact: The values reported after index action is complete. + :vartype reported_impact: list[~azure.mgmt.sql.models.OperationImpact] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'action': {'readonly': True}, + 'state': {'readonly': True}, + 'created': {'readonly': True}, + 'last_modified': {'readonly': True}, + 'index_type': {'readonly': True}, + 'schema': {'readonly': True}, + 'table': {'readonly': True}, + 'columns': {'readonly': True}, + 'included_columns': {'readonly': True}, + 'index_script': {'readonly': True}, + 'estimated_impact': {'readonly': True}, + 'reported_impact': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'action': {'key': 'properties.action', 'type': 'RecommendedIndexAction'}, + 'state': {'key': 'properties.state', 'type': 'RecommendedIndexState'}, + 'created': {'key': 'properties.created', 'type': 'iso-8601'}, + 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, + 'index_type': {'key': 'properties.indexType', 'type': 'RecommendedIndexType'}, + 'schema': {'key': 'properties.schema', 'type': 'str'}, + 'table': {'key': 'properties.table', 'type': 'str'}, + 'columns': {'key': 'properties.columns', 'type': '[str]'}, + 'included_columns': {'key': 'properties.includedColumns', 'type': '[str]'}, + 'index_script': {'key': 'properties.indexScript', 'type': 'str'}, + 'estimated_impact': {'key': 'properties.estimatedImpact', 'type': '[OperationImpact]'}, + 'reported_impact': {'key': 'properties.reportedImpact', 'type': '[OperationImpact]'}, + } + + def __init__(self, **kwargs): + super(RecommendedIndex, self).__init__(**kwargs) + self.action = None + self.state = None + self.created = None + self.last_modified = None + self.index_type = None + self.schema = None + self.table = None + self.columns = None + self.included_columns = None + self.index_script = None + self.estimated_impact = None + self.reported_impact = None + + +class RecoverableDatabase(ProxyResource): + """A recoverable database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar edition: The edition of the database + :vartype edition: str + :ivar service_level_objective: The service level objective name of the + database + :vartype service_level_objective: str + :ivar elastic_pool_name: The elastic pool name of the database + :vartype elastic_pool_name: str + :ivar last_available_backup_date: The last available backup date of the + database (ISO8601 format) + :vartype last_available_backup_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'edition': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'last_available_backup_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(RecoverableDatabase, self).__init__(**kwargs) + self.edition = None + self.service_level_objective = None + self.elastic_pool_name = None + self.last_available_backup_date = None + + +class RecoverableManagedDatabase(ProxyResource): + """A recoverable managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar last_available_backup_date: The last available backup date. + :vartype last_available_backup_date: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_available_backup_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RecoverableManagedDatabase, self).__init__(**kwargs) + self.last_available_backup_date = None + + +class ReplicationLink(ProxyResource): + """Represents a database replication link. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Location of the server that contains this firewall rule. + :vartype location: str + :ivar is_termination_allowed: Legacy value indicating whether termination + is allowed. Currently always returns true. + :vartype is_termination_allowed: bool + :ivar replication_mode: Replication mode of this replication link. + :vartype replication_mode: str + :ivar partner_server: The name of the server hosting the partner database. + :vartype partner_server: str + :ivar partner_database: The name of the partner database. + :vartype partner_database: str + :ivar partner_location: The Azure Region of the partner database. + :vartype partner_location: str + :ivar role: The role of the database in the replication link. Possible + values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', + 'Copy' + :vartype role: str or ~azure.mgmt.sql.models.ReplicationRole + :ivar partner_role: The role of the partner database in the replication + link. Possible values include: 'Primary', 'Secondary', + 'NonReadableSecondary', 'Source', 'Copy' + :vartype partner_role: str or ~azure.mgmt.sql.models.ReplicationRole + :ivar start_time: The start time for the replication link. + :vartype start_time: datetime + :ivar percent_complete: The percentage of seeding complete for the + replication link. + :vartype percent_complete: int + :ivar replication_state: The replication state for the replication link. + Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP', 'SUSPENDED' + :vartype replication_state: str or ~azure.mgmt.sql.models.ReplicationState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'is_termination_allowed': {'readonly': True}, + 'replication_mode': {'readonly': True}, + 'partner_server': {'readonly': True}, + 'partner_database': {'readonly': True}, + 'partner_location': {'readonly': True}, + 'role': {'readonly': True}, + 'partner_role': {'readonly': True}, + 'start_time': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'replication_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'is_termination_allowed': {'key': 'properties.isTerminationAllowed', 'type': 'bool'}, + 'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'}, + 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, + 'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'}, + 'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'}, + 'role': {'key': 'properties.role', 'type': 'ReplicationRole'}, + 'partner_role': {'key': 'properties.partnerRole', 'type': 'ReplicationRole'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ReplicationLink, self).__init__(**kwargs) + self.location = None + self.is_termination_allowed = None + self.replication_mode = None + self.partner_server = None + self.partner_database = None + self.partner_location = None + self.role = None + self.partner_role = None + self.start_time = None + self.percent_complete = None + self.replication_state = None + + +class ResourceIdentity(Model): + """Azure Active Directory identity configuration for a resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The Azure Active Directory principal id. + :vartype principal_id: str + :param type: The identity type. Set this to 'SystemAssigned' in order to + automatically create and assign an Azure Active Directory principal for + the resource. Possible values include: 'SystemAssigned' + :type type: str or ~azure.mgmt.sql.models.IdentityType + :ivar tenant_id: The Azure Active Directory tenant id. + :vartype tenant_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.type = kwargs.get('type', None) + self.tenant_id = None + + +class ResourceMoveDefinition(Model): + """Contains the information necessary to perform a resource move (rename). + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The target ID for the resource + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceMoveDefinition, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class RestorableDroppedDatabase(ProxyResource): + """A restorable dropped database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: The geo-location where the resource lives + :vartype location: str + :ivar database_name: The name of the database + :vartype database_name: str + :ivar edition: The edition of the database + :vartype edition: str + :ivar max_size_bytes: The max size in bytes of the database + :vartype max_size_bytes: str + :ivar service_level_objective: The service level objective name of the + database + :vartype service_level_objective: str + :ivar elastic_pool_name: The elastic pool name of the database + :vartype elastic_pool_name: str + :ivar creation_date: The creation date of the database (ISO8601 format) + :vartype creation_date: datetime + :ivar deletion_date: The deletion date of the database (ISO8601 format) + :vartype deletion_date: datetime + :ivar earliest_restore_date: The earliest restore date of the database + (ISO8601 format) + :vartype earliest_restore_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'database_name': {'readonly': True}, + 'edition': {'readonly': True}, + 'max_size_bytes': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(RestorableDroppedDatabase, self).__init__(**kwargs) + self.location = None + self.database_name = None + self.edition = None + self.max_size_bytes = None + self.service_level_objective = None + self.elastic_pool_name = None + self.creation_date = None + self.deletion_date = None + self.earliest_restore_date = None + + +class RestorableDroppedManagedDatabase(TrackedResource): + """A restorable dropped managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar database_name: The name of the database. + :vartype database_name: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar deletion_date: The deletion date of the database (ISO8601 format). + :vartype deletion_date: datetime + :ivar earliest_restore_date: The earliest restore date of the database + (ISO8601 format). + :vartype earliest_restore_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'database_name': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(RestorableDroppedManagedDatabase, self).__init__(**kwargs) + self.database_name = None + self.creation_date = None + self.deletion_date = None + self.earliest_restore_date = None + + +class RestorePoint(ProxyResource): + """Database restore points. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar restore_point_type: The type of restore point. Possible values + include: 'CONTINUOUS', 'DISCRETE' + :vartype restore_point_type: str or + ~azure.mgmt.sql.models.RestorePointType + :ivar earliest_restore_date: The earliest time to which this database can + be restored + :vartype earliest_restore_date: datetime + :ivar restore_point_creation_date: The time the backup was taken + :vartype restore_point_creation_date: datetime + :ivar restore_point_label: The label of restore point for backup request + by user + :vartype restore_point_label: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'restore_point_type': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'restore_point_creation_date': {'readonly': True}, + 'restore_point_label': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'restore_point_type': {'key': 'properties.restorePointType', 'type': 'RestorePointType'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, + 'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RestorePoint, self).__init__(**kwargs) + self.location = None + self.restore_point_type = None + self.earliest_restore_date = None + self.restore_point_creation_date = None + self.restore_point_label = None + + +class SensitivityLabel(ProxyResource): + """A sensitivity label. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param label_name: The label name. + :type label_name: str + :param label_id: The label ID. + :type label_id: str + :param information_type: The information type. + :type information_type: str + :param information_type_id: The information type ID. + :type information_type_id: str + :ivar is_disabled: Is sensitivity recommendation disabled. Applicable for + recommended sensitivity label only. Specifies whether the sensitivity + recommendation on this column is disabled (dismissed) or not. + :vartype is_disabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'is_disabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'label_name': {'key': 'properties.labelName', 'type': 'str'}, + 'label_id': {'key': 'properties.labelId', 'type': 'str'}, + 'information_type': {'key': 'properties.informationType', 'type': 'str'}, + 'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'}, + 'is_disabled': {'key': 'properties.isDisabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(SensitivityLabel, self).__init__(**kwargs) + self.label_name = kwargs.get('label_name', None) + self.label_id = kwargs.get('label_id', None) + self.information_type = kwargs.get('information_type', None) + self.information_type_id = kwargs.get('information_type_id', None) + self.is_disabled = None + + +class Server(TrackedResource): + """An Azure SQL Database server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param identity: The Azure Active Directory identity of the server. + :type identity: ~azure.mgmt.sql.models.ResourceIdentity + :ivar kind: Kind of sql server. This is metadata used for the Azure portal + experience. + :vartype kind: str + :param administrator_login: Administrator username for the server. Once + created it cannot be changed. + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for server creation). + :type administrator_login_password: str + :param version: The version of the server. + :type version: str + :ivar state: The state of the server. + :vartype state: str + :ivar fully_qualified_domain_name: The fully qualified domain name of the + server. + :vartype fully_qualified_domain_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'state': {'readonly': True}, + 'fully_qualified_domain_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Server, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.kind = None + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.version = kwargs.get('version', None) + self.state = None + self.fully_qualified_domain_name = None + + +class ServerAutomaticTuning(ProxyResource): + """Server-level Automatic Tuning. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param desired_state: Automatic tuning desired state. Possible values + include: 'Custom', 'Auto', 'Unspecified' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningServerMode + :ivar actual_state: Automatic tuning actual state. Possible values + include: 'Custom', 'Auto', 'Unspecified' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningServerMode + :param options: Automatic tuning options definition. + :type options: dict[str, + ~azure.mgmt.sql.models.AutomaticTuningServerOptions] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'actual_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningServerMode'}, + 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningServerMode'}, + 'options': {'key': 'properties.options', 'type': '{AutomaticTuningServerOptions}'}, + } + + def __init__(self, **kwargs): + super(ServerAutomaticTuning, self).__init__(**kwargs) + self.desired_state = kwargs.get('desired_state', None) + self.actual_state = None + self.options = kwargs.get('options', None) + + +class ServerAzureADAdministrator(ProxyResource): + """An server Active Directory Administrator. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar administrator_type: Required. The type of administrator. Default + value: "ActiveDirectory" . + :vartype administrator_type: str + :param login: Required. The server administrator login value. + :type login: str + :param sid: Required. The server administrator Sid (Secure ID). + :type sid: str + :param tenant_id: Required. The server Active Directory Administrator + tenant id. + :type tenant_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'administrator_type': {'required': True, 'constant': True}, + 'login': {'required': True}, + 'sid': {'required': True}, + 'tenant_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, + 'login': {'key': 'properties.login', 'type': 'str'}, + 'sid': {'key': 'properties.sid', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + } + + administrator_type = "ActiveDirectory" + + def __init__(self, **kwargs): + super(ServerAzureADAdministrator, self).__init__(**kwargs) + self.login = kwargs.get('login', None) + self.sid = kwargs.get('sid', None) + self.tenant_id = kwargs.get('tenant_id', None) + + +class ServerBlobAuditingPolicy(ProxyResource): + """A server blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ServerBlobAuditingPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) + self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) + self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) + self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) + + +class ServerCommunicationLink(ProxyResource): + """Server communication link. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar state: The state. + :vartype state: str + :param partner_server: Required. The name of the partner server. + :type partner_server: str + :ivar location: Communication link location. + :vartype location: str + :ivar kind: Communication link kind. This property is used for Azure + Portal metadata. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'partner_server': {'required': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerCommunicationLink, self).__init__(**kwargs) + self.state = None + self.partner_server = kwargs.get('partner_server', None) + self.location = None + self.kind = None + + +class ServerConnectionPolicy(ProxyResource): + """A server secure connection policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Metadata used for the Azure portal experience. + :vartype kind: str + :ivar location: Resource location. + :vartype location: str + :param connection_type: Required. The server connection type. Possible + values include: 'Default', 'Proxy', 'Redirect' + :type connection_type: str or ~azure.mgmt.sql.models.ServerConnectionType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + 'connection_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'connection_type': {'key': 'properties.connectionType', 'type': 'ServerConnectionType'}, + } + + def __init__(self, **kwargs): + super(ServerConnectionPolicy, self).__init__(**kwargs) + self.kind = None + self.location = None + self.connection_type = kwargs.get('connection_type', None) + + +class ServerDnsAlias(ProxyResource): + """A server DNS alias. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar azure_dns_record: The fully qualified DNS record for alias + :vartype azure_dns_record: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'azure_dns_record': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'azure_dns_record': {'key': 'properties.azureDnsRecord', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerDnsAlias, self).__init__(**kwargs) + self.azure_dns_record = None + + +class ServerDnsAliasAcquisition(Model): + """A server DNS alias acquisition request. + + :param old_server_dns_alias_id: The id of the server alias that will be + acquired to point to this server instead. + :type old_server_dns_alias_id: str + """ + + _attribute_map = { + 'old_server_dns_alias_id': {'key': 'oldServerDnsAliasId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerDnsAliasAcquisition, self).__init__(**kwargs) + self.old_server_dns_alias_id = kwargs.get('old_server_dns_alias_id', None) + + +class ServerKey(ProxyResource): + """A server key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :type kind: str + :ivar location: Resource location. + :vartype location: str + :ivar subregion: Subregion of the server key. + :vartype subregion: str + :param server_key_type: Required. The server key type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :param uri: The URI of the server key. + :type uri: str + :param thumbprint: Thumbprint of the server key. + :type thumbprint: str + :param creation_date: The server key creation date. + :type creation_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'subregion': {'readonly': True}, + 'server_key_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'subregion': {'key': 'properties.subregion', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ServerKey, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + self.location = None + self.subregion = None + self.server_key_type = kwargs.get('server_key_type', None) + self.uri = kwargs.get('uri', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.creation_date = kwargs.get('creation_date', None) + + +class ServerSecurityAlertPolicy(ProxyResource): + """A server security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ServerSecurityAlertPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.disabled_alerts = kwargs.get('disabled_alerts', None) + self.email_addresses = kwargs.get('email_addresses', None) + self.email_account_admins = kwargs.get('email_account_admins', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.creation_time = None + + +class ServerUpdate(Model): + """An update request for an Azure SQL Database server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param administrator_login: Administrator username for the server. Once + created it cannot be changed. + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for server creation). + :type administrator_login_password: str + :param version: The version of the server. + :type version: str + :ivar state: The state of the server. + :vartype state: str + :ivar fully_qualified_domain_name: The fully qualified domain name of the + server. + :vartype fully_qualified_domain_name: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'state': {'readonly': True}, + 'fully_qualified_domain_name': {'readonly': True}, + } + + _attribute_map = { + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ServerUpdate, self).__init__(**kwargs) + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.version = kwargs.get('version', None) + self.state = None + self.fully_qualified_domain_name = None + self.tags = kwargs.get('tags', None) + + +class ServerUsage(Model): + """Represents server metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the server usage metric. + :vartype name: str + :ivar resource_name: The name of the resource. + :vartype resource_name: str + :ivar display_name: The metric display name. + :vartype display_name: str + :ivar current_value: The current value of the metric. + :vartype current_value: float + :ivar limit: The current limit of the metric. + :vartype limit: float + :ivar unit: The units of the metric. + :vartype unit: str + :ivar next_reset_time: The next reset time for the metric (ISO8601 + format). + :vartype next_reset_time: datetime + """ + + _validation = { + 'name': {'readonly': True}, + 'resource_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'next_reset_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ServerUsage, self).__init__(**kwargs) + self.name = None + self.resource_name = None + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + self.next_reset_time = None + + +class ServerVersionCapability(Model): + """The server capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The server version name. + :vartype name: str + :ivar supported_editions: The list of supported database editions. + :vartype supported_editions: + list[~azure.mgmt.sql.models.EditionCapability] + :ivar supported_elastic_pool_editions: The list of supported elastic pool + editions. + :vartype supported_elastic_pool_editions: + list[~azure.mgmt.sql.models.ElasticPoolEditionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_editions': {'readonly': True}, + 'supported_elastic_pool_editions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_editions': {'key': 'supportedEditions', 'type': '[EditionCapability]'}, + 'supported_elastic_pool_editions': {'key': 'supportedElasticPoolEditions', 'type': '[ElasticPoolEditionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerVersionCapability, self).__init__(**kwargs) + self.name = None + self.supported_editions = None + self.supported_elastic_pool_editions = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ServerVulnerabilityAssessment(ProxyResource): + """A server vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: Required. A blob storage container path to + hold the scan results (e.g. + https://myStorage.blob.core.windows.net/VaScans/). + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_container_path': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, **kwargs): + super(ServerVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = kwargs.get('storage_container_path', None) + self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.recurring_scans = kwargs.get('recurring_scans', None) + + +class ServiceObjective(ProxyResource): + """Represents a database service objective. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar service_objective_name: The name for the service objective. + :vartype service_objective_name: str + :ivar is_default: Gets whether the service level objective is the default + service objective. + :vartype is_default: bool + :ivar is_system: Gets whether the service level objective is a system + service objective. + :vartype is_system: bool + :ivar description: The description for the service level objective. + :vartype description: str + :ivar enabled: Gets whether the service level objective is enabled. + :vartype enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'service_objective_name': {'readonly': True}, + 'is_default': {'readonly': True}, + 'is_system': {'readonly': True}, + 'description': {'readonly': True}, + 'enabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'service_objective_name': {'key': 'properties.serviceObjectiveName', 'type': 'str'}, + 'is_default': {'key': 'properties.isDefault', 'type': 'bool'}, + 'is_system': {'key': 'properties.isSystem', 'type': 'bool'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ServiceObjective, self).__init__(**kwargs) + self.service_objective_name = None + self.is_default = None + self.is_system = None + self.description = None + self.enabled = None + + +class ServiceObjectiveCapability(Model): + """The service objectives capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique ID of the service objective. + :vartype id: str + :ivar name: The service objective name. + :vartype name: str + :ivar supported_max_sizes: The list of supported maximum database sizes. + :vartype supported_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar performance_level: The performance level. + :vartype performance_level: + ~azure.mgmt.sql.models.PerformanceLevelCapability + :ivar sku: The sku. + :vartype sku: ~azure.mgmt.sql.models.Sku + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar included_max_size: The included (free) max size. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'supported_max_sizes': {'readonly': True}, + 'performance_level': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceObjectiveCapability, self).__init__(**kwargs) + self.id = None + self.name = None + self.supported_max_sizes = None + self.performance_level = None + self.sku = None + self.supported_license_types = None + self.included_max_size = None + self.status = None + self.reason = kwargs.get('reason', None) + + +class ServiceTierAdvisor(ProxyResource): + """Represents a Service Tier Advisor. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar observation_period_start: The observation period start (ISO8601 + format). + :vartype observation_period_start: datetime + :ivar observation_period_end: The observation period start (ISO8601 + format). + :vartype observation_period_end: datetime + :ivar active_time_ratio: The activeTimeRatio for service tier advisor. + :vartype active_time_ratio: float + :ivar min_dtu: Gets or sets minDtu for service tier advisor. + :vartype min_dtu: float + :ivar avg_dtu: Gets or sets avgDtu for service tier advisor. + :vartype avg_dtu: float + :ivar max_dtu: Gets or sets maxDtu for service tier advisor. + :vartype max_dtu: float + :ivar max_size_in_gb: Gets or sets maxSizeInGB for service tier advisor. + :vartype max_size_in_gb: float + :ivar service_level_objective_usage_metrics: Gets or sets + serviceLevelObjectiveUsageMetrics for the service tier advisor. + :vartype service_level_objective_usage_metrics: + list[~azure.mgmt.sql.models.SloUsageMetric] + :ivar current_service_level_objective: Gets or sets + currentServiceLevelObjective for service tier advisor. + :vartype current_service_level_objective: str + :ivar current_service_level_objective_id: Gets or sets + currentServiceLevelObjectiveId for service tier advisor. + :vartype current_service_level_objective_id: str + :ivar usage_based_recommendation_service_level_objective: Gets or sets + usageBasedRecommendationServiceLevelObjective for service tier advisor. + :vartype usage_based_recommendation_service_level_objective: str + :ivar usage_based_recommendation_service_level_objective_id: Gets or sets + usageBasedRecommendationServiceLevelObjectiveId for service tier advisor. + :vartype usage_based_recommendation_service_level_objective_id: str + :ivar database_size_based_recommendation_service_level_objective: Gets or + sets databaseSizeBasedRecommendationServiceLevelObjective for service tier + advisor. + :vartype database_size_based_recommendation_service_level_objective: str + :ivar database_size_based_recommendation_service_level_objective_id: Gets + or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service + tier advisor. + :vartype database_size_based_recommendation_service_level_objective_id: + str + :ivar disaster_plan_based_recommendation_service_level_objective: Gets or + sets disasterPlanBasedRecommendationServiceLevelObjective for service tier + advisor. + :vartype disaster_plan_based_recommendation_service_level_objective: str + :ivar disaster_plan_based_recommendation_service_level_objective_id: Gets + or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service + tier advisor. + :vartype disaster_plan_based_recommendation_service_level_objective_id: + str + :ivar overall_recommendation_service_level_objective: Gets or sets + overallRecommendationServiceLevelObjective for service tier advisor. + :vartype overall_recommendation_service_level_objective: str + :ivar overall_recommendation_service_level_objective_id: Gets or sets + overallRecommendationServiceLevelObjectiveId for service tier advisor. + :vartype overall_recommendation_service_level_objective_id: str + :ivar confidence: Gets or sets confidence for service tier advisor. + :vartype confidence: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'observation_period_start': {'readonly': True}, + 'observation_period_end': {'readonly': True}, + 'active_time_ratio': {'readonly': True}, + 'min_dtu': {'readonly': True}, + 'avg_dtu': {'readonly': True}, + 'max_dtu': {'readonly': True}, + 'max_size_in_gb': {'readonly': True}, + 'service_level_objective_usage_metrics': {'readonly': True}, + 'current_service_level_objective': {'readonly': True}, + 'current_service_level_objective_id': {'readonly': True}, + 'usage_based_recommendation_service_level_objective': {'readonly': True}, + 'usage_based_recommendation_service_level_objective_id': {'readonly': True}, + 'database_size_based_recommendation_service_level_objective': {'readonly': True}, + 'database_size_based_recommendation_service_level_objective_id': {'readonly': True}, + 'disaster_plan_based_recommendation_service_level_objective': {'readonly': True}, + 'disaster_plan_based_recommendation_service_level_objective_id': {'readonly': True}, + 'overall_recommendation_service_level_objective': {'readonly': True}, + 'overall_recommendation_service_level_objective_id': {'readonly': True}, + 'confidence': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, + 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, + 'active_time_ratio': {'key': 'properties.activeTimeRatio', 'type': 'float'}, + 'min_dtu': {'key': 'properties.minDtu', 'type': 'float'}, + 'avg_dtu': {'key': 'properties.avgDtu', 'type': 'float'}, + 'max_dtu': {'key': 'properties.maxDtu', 'type': 'float'}, + 'max_size_in_gb': {'key': 'properties.maxSizeInGB', 'type': 'float'}, + 'service_level_objective_usage_metrics': {'key': 'properties.serviceLevelObjectiveUsageMetrics', 'type': '[SloUsageMetric]'}, + 'current_service_level_objective': {'key': 'properties.currentServiceLevelObjective', 'type': 'str'}, + 'current_service_level_objective_id': {'key': 'properties.currentServiceLevelObjectiveId', 'type': 'str'}, + 'usage_based_recommendation_service_level_objective': {'key': 'properties.usageBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'usage_based_recommendation_service_level_objective_id': {'key': 'properties.usageBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'database_size_based_recommendation_service_level_objective': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'database_size_based_recommendation_service_level_objective_id': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'disaster_plan_based_recommendation_service_level_objective': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'disaster_plan_based_recommendation_service_level_objective_id': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'overall_recommendation_service_level_objective': {'key': 'properties.overallRecommendationServiceLevelObjective', 'type': 'str'}, + 'overall_recommendation_service_level_objective_id': {'key': 'properties.overallRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'confidence': {'key': 'properties.confidence', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ServiceTierAdvisor, self).__init__(**kwargs) + self.observation_period_start = None + self.observation_period_end = None + self.active_time_ratio = None + self.min_dtu = None + self.avg_dtu = None + self.max_dtu = None + self.max_size_in_gb = None + self.service_level_objective_usage_metrics = None + self.current_service_level_objective = None + self.current_service_level_objective_id = None + self.usage_based_recommendation_service_level_objective = None + self.usage_based_recommendation_service_level_objective_id = None + self.database_size_based_recommendation_service_level_objective = None + self.database_size_based_recommendation_service_level_objective_id = None + self.disaster_plan_based_recommendation_service_level_objective = None + self.disaster_plan_based_recommendation_service_level_objective_id = None + self.overall_recommendation_service_level_objective = None + self.overall_recommendation_service_level_objective_id = None + self.confidence = None + + +class Sku(Model): + """The resource model definition representing SKU. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Ex - P3. It is typically a + letter+number code + :type name: str + :param tier: This field is required to be implemented by the Resource + Provider if the service has more than one tier, but is not required on a + PUT. + :type tier: str + :param size: The SKU size. When the name field is the combination of tier + and some other value, this would be the standalone code. + :type size: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :param capacity: If the SKU supports scale out/in then the capacity + integer should be included. If scale out/in is not possible for the + resource this may be omitted. + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.size = kwargs.get('size', None) + self.family = kwargs.get('family', None) + self.capacity = kwargs.get('capacity', None) + + +class SloUsageMetric(Model): + """A Slo Usage Metric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar service_level_objective: The serviceLevelObjective for SLO usage + metric. Possible values include: 'System', 'System0', 'System1', + 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', + 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', + 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', + 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', + 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', + 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', + 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', + 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' + :vartype service_level_objective: str or + ~azure.mgmt.sql.models.ServiceObjectiveName + :ivar service_level_objective_id: The serviceLevelObjectiveId for SLO + usage metric. + :vartype service_level_objective_id: str + :ivar in_range_time_ratio: Gets or sets inRangeTimeRatio for SLO usage + metric. + :vartype in_range_time_ratio: float + """ + + _validation = { + 'service_level_objective': {'readonly': True}, + 'service_level_objective_id': {'readonly': True}, + 'in_range_time_ratio': {'readonly': True}, + } + + _attribute_map = { + 'service_level_objective': {'key': 'serviceLevelObjective', 'type': 'str'}, + 'service_level_objective_id': {'key': 'serviceLevelObjectiveId', 'type': 'str'}, + 'in_range_time_ratio': {'key': 'inRangeTimeRatio', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(SloUsageMetric, self).__init__(**kwargs) + self.service_level_objective = None + self.service_level_objective_id = None + self.in_range_time_ratio = None + + +class SubscriptionUsage(ProxyResource): + """Usage Metric of a Subscription in a Location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar display_name: User-readable name of the metric. + :vartype display_name: str + :ivar current_value: Current value of the metric. + :vartype current_value: float + :ivar limit: Boundary value of the metric. + :vartype limit: float + :ivar unit: Unit of the metric. + :vartype unit: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'current_value': {'key': 'properties.currentValue', 'type': 'float'}, + 'limit': {'key': 'properties.limit', 'type': 'float'}, + 'unit': {'key': 'properties.unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubscriptionUsage, self).__init__(**kwargs) + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + + +class SyncAgent(ProxyResource): + """An Azure SQL Database sync agent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar sync_agent_name: Name of the sync agent. + :vartype sync_agent_name: str + :param sync_database_id: ARM resource id of the sync database in the sync + agent. + :type sync_database_id: str + :ivar last_alive_time: Last alive time of the sync agent. + :vartype last_alive_time: datetime + :ivar state: State of the sync agent. Possible values include: 'Online', + 'Offline', 'NeverConnected' + :vartype state: str or ~azure.mgmt.sql.models.SyncAgentState + :ivar is_up_to_date: If the sync agent version is up to date. + :vartype is_up_to_date: bool + :ivar expiry_time: Expiration time of the sync agent version. + :vartype expiry_time: datetime + :ivar version: Version of the sync agent. + :vartype version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sync_agent_name': {'readonly': True}, + 'last_alive_time': {'readonly': True}, + 'state': {'readonly': True}, + 'is_up_to_date': {'readonly': True}, + 'expiry_time': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sync_agent_name': {'key': 'properties.name', 'type': 'str'}, + 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, + 'last_alive_time': {'key': 'properties.lastAliveTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'is_up_to_date': {'key': 'properties.isUpToDate', 'type': 'bool'}, + 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncAgent, self).__init__(**kwargs) + self.sync_agent_name = None + self.sync_database_id = kwargs.get('sync_database_id', None) + self.last_alive_time = None + self.state = None + self.is_up_to_date = None + self.expiry_time = None + self.version = None + + +class SyncAgentKeyProperties(Model): + """Properties of an Azure SQL Database sync agent key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar sync_agent_key: Key of sync agent. + :vartype sync_agent_key: str + """ + + _validation = { + 'sync_agent_key': {'readonly': True}, + } + + _attribute_map = { + 'sync_agent_key': {'key': 'syncAgentKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncAgentKeyProperties, self).__init__(**kwargs) + self.sync_agent_key = None + + +class SyncAgentLinkedDatabase(ProxyResource): + """An Azure SQL Database sync agent linked database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_type: Type of the sync agent linked database. Possible + values include: 'AzureSqlDatabase', 'SqlServerDatabase' + :vartype database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType + :ivar database_id: Id of the sync agent linked database. + :vartype database_id: str + :ivar description: Description of the sync agent linked database. + :vartype description: str + :ivar server_name: Server name of the sync agent linked database. + :vartype server_name: str + :ivar database_name: Database name of the sync agent linked database. + :vartype database_name: str + :ivar user_name: User name of the sync agent linked database. + :vartype user_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_type': {'readonly': True}, + 'database_id': {'readonly': True}, + 'description': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncAgentLinkedDatabase, self).__init__(**kwargs) + self.database_type = None + self.database_id = None + self.description = None + self.server_name = None + self.database_name = None + self.user_name = None + + +class SyncDatabaseIdProperties(Model): + """Properties of the sync database id. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: ARM resource id of sync database. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncDatabaseIdProperties, self).__init__(**kwargs) + self.id = None + + +class SyncFullSchemaProperties(Model): + """Properties of the database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar tables: List of tables in the database full schema. + :vartype tables: list[~azure.mgmt.sql.models.SyncFullSchemaTable] + :ivar last_update_time: Last update time of the database schema. + :vartype last_update_time: datetime + """ + + _validation = { + 'tables': {'readonly': True}, + 'last_update_time': {'readonly': True}, + } + + _attribute_map = { + 'tables': {'key': 'tables', 'type': '[SyncFullSchemaTable]'}, + 'last_update_time': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(SyncFullSchemaProperties, self).__init__(**kwargs) + self.tables = None + self.last_update_time = None + + +class SyncFullSchemaTable(Model): + """Properties of the table in the database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar columns: List of columns in the table of database full schema. + :vartype columns: list[~azure.mgmt.sql.models.SyncFullSchemaTableColumn] + :ivar error_id: Error id of the table. + :vartype error_id: str + :ivar has_error: If there is error in the table. + :vartype has_error: bool + :ivar name: Name of the table. + :vartype name: str + :ivar quoted_name: Quoted name of the table. + :vartype quoted_name: str + """ + + _validation = { + 'columns': {'readonly': True}, + 'error_id': {'readonly': True}, + 'has_error': {'readonly': True}, + 'name': {'readonly': True}, + 'quoted_name': {'readonly': True}, + } + + _attribute_map = { + 'columns': {'key': 'columns', 'type': '[SyncFullSchemaTableColumn]'}, + 'error_id': {'key': 'errorId', 'type': 'str'}, + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncFullSchemaTable, self).__init__(**kwargs) + self.columns = None + self.error_id = None + self.has_error = None + self.name = None + self.quoted_name = None + + +class SyncFullSchemaTableColumn(Model): + """Properties of the column in the table of database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar data_size: Data size of the column. + :vartype data_size: str + :ivar data_type: Data type of the column. + :vartype data_type: str + :ivar error_id: Error id of the column. + :vartype error_id: str + :ivar has_error: If there is error in the table. + :vartype has_error: bool + :ivar is_primary_key: If it is the primary key of the table. + :vartype is_primary_key: bool + :ivar name: Name of the column. + :vartype name: str + :ivar quoted_name: Quoted name of the column. + :vartype quoted_name: str + """ + + _validation = { + 'data_size': {'readonly': True}, + 'data_type': {'readonly': True}, + 'error_id': {'readonly': True}, + 'has_error': {'readonly': True}, + 'is_primary_key': {'readonly': True}, + 'name': {'readonly': True}, + 'quoted_name': {'readonly': True}, + } + + _attribute_map = { + 'data_size': {'key': 'dataSize', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + 'error_id': {'key': 'errorId', 'type': 'str'}, + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'is_primary_key': {'key': 'isPrimaryKey', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncFullSchemaTableColumn, self).__init__(**kwargs) + self.data_size = None + self.data_type = None + self.error_id = None + self.has_error = None + self.is_primary_key = None + self.name = None + self.quoted_name = None + + +class SyncGroup(ProxyResource): + """An Azure SQL Database sync group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param interval: Sync interval of the sync group. + :type interval: int + :ivar last_sync_time: Last sync time of the sync group. + :vartype last_sync_time: datetime + :param conflict_resolution_policy: Conflict resolution policy of the sync + group. Possible values include: 'HubWin', 'MemberWin' + :type conflict_resolution_policy: str or + ~azure.mgmt.sql.models.SyncConflictResolutionPolicy + :param sync_database_id: ARM resource id of the sync database in the sync + group. + :type sync_database_id: str + :param hub_database_user_name: User name for the sync group hub database + credential. + :type hub_database_user_name: str + :param hub_database_password: Password for the sync group hub database + credential. + :type hub_database_password: str + :ivar sync_state: Sync state of the sync group. Possible values include: + 'NotReady', 'Error', 'Warning', 'Progressing', 'Good' + :vartype sync_state: str or ~azure.mgmt.sql.models.SyncGroupState + :param schema: Sync schema of the sync group. + :type schema: ~azure.mgmt.sql.models.SyncGroupSchema + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_sync_time': {'readonly': True}, + 'sync_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'interval': {'key': 'properties.interval', 'type': 'int'}, + 'last_sync_time': {'key': 'properties.lastSyncTime', 'type': 'iso-8601'}, + 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'str'}, + 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, + 'hub_database_user_name': {'key': 'properties.hubDatabaseUserName', 'type': 'str'}, + 'hub_database_password': {'key': 'properties.hubDatabasePassword', 'type': 'str'}, + 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, + 'schema': {'key': 'properties.schema', 'type': 'SyncGroupSchema'}, + } + + def __init__(self, **kwargs): + super(SyncGroup, self).__init__(**kwargs) + self.interval = kwargs.get('interval', None) + self.last_sync_time = None + self.conflict_resolution_policy = kwargs.get('conflict_resolution_policy', None) + self.sync_database_id = kwargs.get('sync_database_id', None) + self.hub_database_user_name = kwargs.get('hub_database_user_name', None) + self.hub_database_password = kwargs.get('hub_database_password', None) + self.sync_state = None + self.schema = kwargs.get('schema', None) + + +class SyncGroupLogProperties(Model): + """Properties of an Azure SQL Database sync group log. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar timestamp: Timestamp of the sync group log. + :vartype timestamp: datetime + :ivar type: Type of the sync group log. Possible values include: 'All', + 'Error', 'Warning', 'Success' + :vartype type: str or ~azure.mgmt.sql.models.SyncGroupLogType + :ivar source: Source of the sync group log. + :vartype source: str + :ivar details: Details of the sync group log. + :vartype details: str + :ivar tracing_id: TracingId of the sync group log. + :vartype tracing_id: str + :ivar operation_status: OperationStatus of the sync group log. + :vartype operation_status: str + """ + + _validation = { + 'timestamp': {'readonly': True}, + 'type': {'readonly': True}, + 'source': {'readonly': True}, + 'details': {'readonly': True}, + 'tracing_id': {'readonly': True}, + 'operation_status': {'readonly': True}, + } + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, + 'tracing_id': {'key': 'tracingId', 'type': 'str'}, + 'operation_status': {'key': 'operationStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncGroupLogProperties, self).__init__(**kwargs) + self.timestamp = None + self.type = None + self.source = None + self.details = None + self.tracing_id = None + self.operation_status = None + + +class SyncGroupSchema(Model): + """Properties of sync group schema. + + :param tables: List of tables in sync group schema. + :type tables: list[~azure.mgmt.sql.models.SyncGroupSchemaTable] + :param master_sync_member_name: Name of master sync member where the + schema is from. + :type master_sync_member_name: str + """ + + _attribute_map = { + 'tables': {'key': 'tables', 'type': '[SyncGroupSchemaTable]'}, + 'master_sync_member_name': {'key': 'masterSyncMemberName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncGroupSchema, self).__init__(**kwargs) + self.tables = kwargs.get('tables', None) + self.master_sync_member_name = kwargs.get('master_sync_member_name', None) + + +class SyncGroupSchemaTable(Model): + """Properties of table in sync group schema. + + :param columns: List of columns in sync group schema. + :type columns: list[~azure.mgmt.sql.models.SyncGroupSchemaTableColumn] + :param quoted_name: Quoted name of sync group schema table. + :type quoted_name: str + """ + + _attribute_map = { + 'columns': {'key': 'columns', 'type': '[SyncGroupSchemaTableColumn]'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncGroupSchemaTable, self).__init__(**kwargs) + self.columns = kwargs.get('columns', None) + self.quoted_name = kwargs.get('quoted_name', None) + + +class SyncGroupSchemaTableColumn(Model): + """Properties of column in sync group table. + + :param quoted_name: Quoted name of sync group table column. + :type quoted_name: str + :param data_size: Data size of the column. + :type data_size: str + :param data_type: Data type of the column. + :type data_type: str + """ + + _attribute_map = { + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + 'data_size': {'key': 'dataSize', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncGroupSchemaTableColumn, self).__init__(**kwargs) + self.quoted_name = kwargs.get('quoted_name', None) + self.data_size = kwargs.get('data_size', None) + self.data_type = kwargs.get('data_type', None) + + +class SyncMember(ProxyResource): + """An Azure SQL Database sync member. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param database_type: Database type of the sync member. Possible values + include: 'AzureSqlDatabase', 'SqlServerDatabase' + :type database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType + :param sync_agent_id: ARM resource id of the sync agent in the sync + member. + :type sync_agent_id: str + :param sql_server_database_id: SQL Server database id of the sync member. + :type sql_server_database_id: str + :param server_name: Server name of the member database in the sync member + :type server_name: str + :param database_name: Database name of the member database in the sync + member. + :type database_name: str + :param user_name: User name of the member database in the sync member. + :type user_name: str + :param password: Password of the member database in the sync member. + :type password: str + :param sync_direction: Sync direction of the sync member. Possible values + include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember' + :type sync_direction: str or ~azure.mgmt.sql.models.SyncDirection + :ivar sync_state: Sync state of the sync member. Possible values include: + 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', + 'DisabledTombstoneCleanup', 'DisabledBackupRestore', + 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', + 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', + 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', + 'ReprovisionFailed', 'UnReprovisioned' + :vartype sync_state: str or ~azure.mgmt.sql.models.SyncMemberState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sync_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, + 'sync_agent_id': {'key': 'properties.syncAgentId', 'type': 'str'}, + 'sql_server_database_id': {'key': 'properties.sqlServerDatabaseId', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'sync_direction': {'key': 'properties.syncDirection', 'type': 'str'}, + 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncMember, self).__init__(**kwargs) + self.database_type = kwargs.get('database_type', None) + self.sync_agent_id = kwargs.get('sync_agent_id', None) + self.sql_server_database_id = kwargs.get('sql_server_database_id', None) + self.server_name = kwargs.get('server_name', None) + self.database_name = kwargs.get('database_name', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.sync_direction = kwargs.get('sync_direction', None) + self.sync_state = None + + +class TdeCertificate(ProxyResource): + """A TDE certificate that can be uploaded into a server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param private_blob: Required. The base64 encoded certificate private + blob. + :type private_blob: str + :param cert_password: The certificate password. + :type cert_password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'private_blob': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_blob': {'key': 'properties.privateBlob', 'type': 'str'}, + 'cert_password': {'key': 'properties.certPassword', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TdeCertificate, self).__init__(**kwargs) + self.private_blob = kwargs.get('private_blob', None) + self.cert_password = kwargs.get('cert_password', None) + + +class TransparentDataEncryption(ProxyResource): + """Represents a database transparent data encryption configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :param status: The status of the database transparent data encryption. + Possible values include: 'Enabled', 'Disabled' + :type status: str or + ~azure.mgmt.sql.models.TransparentDataEncryptionStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'TransparentDataEncryptionStatus'}, + } + + def __init__(self, **kwargs): + super(TransparentDataEncryption, self).__init__(**kwargs) + self.location = None + self.status = kwargs.get('status', None) + + +class TransparentDataEncryptionActivity(ProxyResource): + """Represents a database transparent data encryption Scan. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar status: The status of the database. Possible values include: + 'Encrypting', 'Decrypting' + :vartype status: str or + ~azure.mgmt.sql.models.TransparentDataEncryptionActivityStatus + :ivar percent_complete: The percent complete of the transparent data + encryption scan for a database. + :vartype percent_complete: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'status': {'readonly': True}, + 'percent_complete': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(TransparentDataEncryptionActivity, self).__init__(**kwargs) + self.location = None + self.status = None + self.percent_complete = None + + +class Usage(Model): + """ARM usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: ~azure.mgmt.sql.models.Name + :ivar type: Resource type. + :vartype type: str + :ivar unit: Usage unit. + :vartype unit: str + :ivar current_value: Usage current value. + :vartype current_value: int + :ivar limit: Usage limit. + :vartype limit: int + :ivar requested_limit: Usage requested limit. + :vartype requested_limit: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'unit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'requested_limit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'Name'}, + 'type': {'key': 'type', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'int'}, + 'requested_limit': {'key': 'requestedLimit', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(Usage, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.unit = None + self.current_value = None + self.limit = None + self.requested_limit = None + + +class VirtualCluster(TrackedResource): + """An Azure SQL virtual cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar subnet_id: Subnet resource ID for the virtual cluster. + :vartype subnet_id: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :ivar child_resources: List of resources in this virtual cluster. + :vartype child_resources: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'subnet_id': {'readonly': True}, + 'child_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'family': {'key': 'properties.family', 'type': 'str'}, + 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualCluster, self).__init__(**kwargs) + self.subnet_id = None + self.family = kwargs.get('family', None) + self.child_resources = None + + +class VirtualClusterUpdate(Model): + """An update request for an Azure SQL Database virtual cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar subnet_id: Subnet resource ID for the virtual cluster. + :vartype subnet_id: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :ivar child_resources: List of resources in this virtual cluster. + :vartype child_resources: list[str] + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'subnet_id': {'readonly': True}, + 'child_resources': {'readonly': True}, + } + + _attribute_map = { + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'family': {'key': 'properties.family', 'type': 'str'}, + 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(VirtualClusterUpdate, self).__init__(**kwargs) + self.subnet_id = None + self.family = kwargs.get('family', None) + self.child_resources = None + self.tags = kwargs.get('tags', None) + + +class VirtualNetworkRule(ProxyResource): + """A virtual network rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param virtual_network_subnet_id: Required. The ARM resource id of the + virtual network subnet. + :type virtual_network_subnet_id: str + :param ignore_missing_vnet_service_endpoint: Create firewall rule before + the virtual network has vnet service endpoint enabled. + :type ignore_missing_vnet_service_endpoint: bool + :ivar state: Virtual Network Rule State. Possible values include: + 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' + :vartype state: str or ~azure.mgmt.sql.models.VirtualNetworkRuleState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'virtual_network_subnet_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, + 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkRule, self).__init__(**kwargs) + self.virtual_network_subnet_id = kwargs.get('virtual_network_subnet_id', None) + self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) + self.state = None + + +class VulnerabilityAssessmentRecurringScansProperties(Model): + """Properties of a Vulnerability Assessment recurring scans. + + :param is_enabled: Recurring scans state. + :type is_enabled: bool + :param email_subscription_admins: Specifies that the schedule scan + notification will be is sent to the subscription administrators. Default + value: True . + :type email_subscription_admins: bool + :param emails: Specifies an array of e-mail addresses to which the scan + notification is sent. + :type emails: list[str] + """ + + _attribute_map = { + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'}, + 'emails': {'key': 'emails', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs) + self.is_enabled = kwargs.get('is_enabled', None) + self.email_subscription_admins = kwargs.get('email_subscription_admins', True) + self.emails = kwargs.get('emails', None) + + +class VulnerabilityAssessmentScanError(Model): + """Properties of a vulnerability assessment scan error. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VulnerabilityAssessmentScanError, self).__init__(**kwargs) + self.code = None + self.message = None + + +class VulnerabilityAssessmentScanRecord(ProxyResource): + """A vulnerability assessment scan record. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar scan_id: The scan ID. + :vartype scan_id: str + :ivar trigger_type: The scan trigger type. Possible values include: + 'OnDemand', 'Recurring' + :vartype trigger_type: str or + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanTriggerType + :ivar state: The scan status. Possible values include: 'Passed', 'Failed', + 'FailedToRun', 'InProgress' + :vartype state: str or + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanState + :ivar start_time: The scan start time (UTC). + :vartype start_time: datetime + :ivar end_time: The scan end time (UTC). + :vartype end_time: datetime + :ivar errors: The scan errors. + :vartype errors: + list[~azure.mgmt.sql.models.VulnerabilityAssessmentScanError] + :ivar storage_container_path: The scan results storage container path. + :vartype storage_container_path: str + :ivar number_of_failed_security_checks: The number of failed security + checks. + :vartype number_of_failed_security_checks: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'scan_id': {'readonly': True}, + 'trigger_type': {'readonly': True}, + 'state': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'errors': {'readonly': True}, + 'storage_container_path': {'readonly': True}, + 'number_of_failed_security_checks': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'scan_id': {'key': 'properties.scanId', 'type': 'str'}, + 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'errors': {'key': 'properties.errors', 'type': '[VulnerabilityAssessmentScanError]'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'number_of_failed_security_checks': {'key': 'properties.numberOfFailedSecurityChecks', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(VulnerabilityAssessmentScanRecord, self).__init__(**kwargs) + self.scan_id = None + self.trigger_type = None + self.state = None + self.start_time = None + self.end_time = None + self.errors = None + self.storage_container_path = None + self.number_of_failed_security_checks = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py new file mode 100644 index 000000000000..24ba7183e418 --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py @@ -0,0 +1,8891 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AutomaticTuningOptions(Model): + """Automatic tuning properties for individual advisors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param desired_state: Automatic tuning option desired state. Possible + values include: 'Off', 'On', 'Default' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired + :ivar actual_state: Automatic tuning option actual state. Possible values + include: 'Off', 'On' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual + :ivar reason_code: Reason code if desired and actual state are different. + :vartype reason_code: int + :ivar reason_desc: Reason description if desired and actual state are + different. Possible values include: 'Default', 'Disabled', + 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', + 'QueryStoreReadOnly', 'NotSupported' + :vartype reason_desc: str or + ~azure.mgmt.sql.models.AutomaticTuningDisabledReason + """ + + _validation = { + 'actual_state': {'readonly': True}, + 'reason_code': {'readonly': True}, + 'reason_desc': {'readonly': True}, + } + + _attribute_map = { + 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, + 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, + 'reason_code': {'key': 'reasonCode', 'type': 'int'}, + 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningDisabledReason'}, + } + + def __init__(self, *, desired_state=None, **kwargs) -> None: + super(AutomaticTuningOptions, self).__init__(**kwargs) + self.desired_state = desired_state + self.actual_state = None + self.reason_code = None + self.reason_desc = None + + +class AutomaticTuningServerOptions(Model): + """Automatic tuning properties for individual advisors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param desired_state: Automatic tuning option desired state. Possible + values include: 'Off', 'On', 'Default' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired + :ivar actual_state: Automatic tuning option actual state. Possible values + include: 'Off', 'On' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual + :ivar reason_code: Reason code if desired and actual state are different. + :vartype reason_code: int + :ivar reason_desc: Reason description if desired and actual state are + different. Possible values include: 'Default', 'Disabled', + 'AutoConfigured' + :vartype reason_desc: str or + ~azure.mgmt.sql.models.AutomaticTuningServerReason + """ + + _validation = { + 'actual_state': {'readonly': True}, + 'reason_code': {'readonly': True}, + 'reason_desc': {'readonly': True}, + } + + _attribute_map = { + 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, + 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, + 'reason_code': {'key': 'reasonCode', 'type': 'int'}, + 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningServerReason'}, + } + + def __init__(self, *, desired_state=None, **kwargs) -> None: + super(AutomaticTuningServerOptions, self).__init__(**kwargs) + self.desired_state = desired_state + self.actual_state = None + self.reason_code = None + self.reason_desc = None + + +class Resource(Model): + """ARM resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ProxyResource(Resource): + """ARM proxy resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) + + +class BackupLongTermRetentionPolicy(ProxyResource): + """A long term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param weekly_retention: The weekly retention policy for an LTR backup in + an ISO 8601 format. + :type weekly_retention: str + :param monthly_retention: The monthly retention policy for an LTR backup + in an ISO 8601 format. + :type monthly_retention: str + :param yearly_retention: The yearly retention policy for an LTR backup in + an ISO 8601 format. + :type yearly_retention: str + :param week_of_year: The week of year to take the yearly backup in an ISO + 8601 format. + :type week_of_year: int + """ + + _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'}, + 'weekly_retention': {'key': 'properties.weeklyRetention', 'type': 'str'}, + 'monthly_retention': {'key': 'properties.monthlyRetention', 'type': 'str'}, + 'yearly_retention': {'key': 'properties.yearlyRetention', 'type': 'str'}, + 'week_of_year': {'key': 'properties.weekOfYear', 'type': 'int'}, + } + + def __init__(self, *, weekly_retention: str=None, monthly_retention: str=None, yearly_retention: str=None, week_of_year: int=None, **kwargs) -> None: + super(BackupLongTermRetentionPolicy, self).__init__(**kwargs) + self.weekly_retention = weekly_retention + self.monthly_retention = monthly_retention + self.yearly_retention = yearly_retention + self.week_of_year = week_of_year + + +class BackupShortTermRetentionPolicy(ProxyResource): + """A short term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param retention_days: The backup retention period in days. This is how + many days Point-in-Time Restore will be supported. + :type retention_days: int + """ + + _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'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + } + + def __init__(self, *, retention_days: int=None, **kwargs) -> None: + super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) + self.retention_days = retention_days + + +class CheckNameAvailabilityRequest(Model): + """A request to check whether the specified name for a resource is available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name whose availability is to be checked. + :type name: str + :ivar type: Required. The type of resource that is used as the scope of + the availability check. Default value: "Microsoft.Sql/servers" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.Sql/servers" + + def __init__(self, *, name: str, **kwargs) -> None: + super(CheckNameAvailabilityRequest, self).__init__(**kwargs) + self.name = name + + +class CheckNameAvailabilityResponse(Model): + """A response indicating whether the specified name for a resource is + available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar available: True if the name is available, otherwise false. + :vartype available: bool + :ivar message: A message explaining why the name is unavailable. Will be + null if the name is available. + :vartype message: str + :ivar name: The name whose availability was checked. + :vartype name: str + :ivar reason: The reason code explaining why the name is unavailable. Will + be null if the name is available. Possible values include: 'Invalid', + 'AlreadyExists' + :vartype reason: str or ~azure.mgmt.sql.models.CheckNameAvailabilityReason + """ + + _validation = { + 'available': {'readonly': True}, + 'message': {'readonly': True}, + 'name': {'readonly': True}, + 'reason': {'readonly': True}, + } + + _attribute_map = { + 'available': {'key': 'available', 'type': 'bool'}, + 'message': {'key': 'message', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'CheckNameAvailabilityReason'}, + } + + def __init__(self, **kwargs) -> None: + super(CheckNameAvailabilityResponse, self).__init__(**kwargs) + self.available = None + self.message = None + self.name = None + self.reason = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class CompleteDatabaseRestoreDefinition(Model): + """Contains the information necessary to perform a complete database restore + operation. + + All required parameters must be populated in order to send to Azure. + + :param last_backup_name: Required. The last backup name to apply + :type last_backup_name: str + """ + + _validation = { + 'last_backup_name': {'required': True}, + } + + _attribute_map = { + 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, + } + + def __init__(self, *, last_backup_name: str, **kwargs) -> None: + super(CompleteDatabaseRestoreDefinition, self).__init__(**kwargs) + self.last_backup_name = last_backup_name + + +class CreateDatabaseRestorePointDefinition(Model): + """Contains the information necessary to perform a create database restore + point operation. + + All required parameters must be populated in order to send to Azure. + + :param restore_point_label: Required. The restore point label to apply + :type restore_point_label: str + """ + + _validation = { + 'restore_point_label': {'required': True}, + } + + _attribute_map = { + 'restore_point_label': {'key': 'restorePointLabel', 'type': 'str'}, + } + + def __init__(self, *, restore_point_label: str, **kwargs) -> None: + super(CreateDatabaseRestorePointDefinition, self).__init__(**kwargs) + self.restore_point_label = restore_point_label + + +class TrackedResource(Resource): + """ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.location = location + self.tags = tags + + +class Database(TrackedResource): + """A database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The database SKU. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location + ```` + :type sku: ~azure.mgmt.sql.models.Sku + :ivar kind: Kind of database. This is metadata used for the Azure portal + experience. + :vartype kind: str + :ivar managed_by: Resource that manages the database. + :vartype managed_by: str + :param create_mode: Specifies the mode of database creation. + Default: regular database creation. + Copy: creates a database as a copy of an existing database. + sourceDatabaseId must be specified as the resource ID of the source + database. + Secondary: creates a database as a secondary replica of an existing + database. sourceDatabaseId must be specified as the resource ID of the + existing primary database. + PointInTimeRestore: Creates a database by restoring a point in time backup + of an existing database. sourceDatabaseId must be specified as the + resource ID of the existing database, and restorePointInTime must be + specified. + Recovery: Creates a database by restoring a geo-replicated backup. + sourceDatabaseId must be specified as the recoverable database resource ID + to restore. + Restore: Creates a database by restoring a backup of a deleted database. + sourceDatabaseId must be specified. If sourceDatabaseId is the database's + original resource ID, then sourceDatabaseDeletionDate must be specified. + Otherwise sourceDatabaseId must be the restorable dropped database + resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime + may also be specified to restore from an earlier point in time. + RestoreLongTermRetentionBackup: Creates a database by restoring from a + long term retention vault. recoveryServicesRecoveryPointResourceId must be + specified as the recovery point resource ID. + Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for + DataWarehouse edition. Possible values include: 'Default', 'Copy', + 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', + 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', + 'RestoreLongTermRetentionBackup', 'OnlineSecondary' + :type create_mode: str or ~azure.mgmt.sql.models.CreateMode + :param collation: The collation of the database. + :type collation: str + :param max_size_bytes: The max size of the database expressed in bytes. + :type max_size_bytes: long + :param sample_name: The name of the sample schema to apply when creating + this database. Possible values include: 'AdventureWorksLT', + 'WideWorldImportersStd', 'WideWorldImportersFull' + :type sample_name: str or ~azure.mgmt.sql.models.SampleName + :param elastic_pool_id: The resource identifier of the elastic pool + containing this database. + :type elastic_pool_id: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :ivar status: The status of the database. Possible values include: + 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', + 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', + 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', + 'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers', + 'OnlineChangingDwPerformanceTiers' + :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus + :ivar database_id: The ID of the database. + :vartype database_id: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar current_service_objective_name: The current service level objective + name of the database. + :vartype current_service_objective_name: str + :ivar requested_service_objective_name: The requested service level + objective name of the database. + :vartype requested_service_objective_name: str + :ivar default_secondary_location: The default secondary region for this + database. + :vartype default_secondary_location: str + :ivar failover_group_id: Failover Group resource identifier that this + database belongs to. + :vartype failover_group_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param source_database_deletion_date: Specifies the time that the database + was deleted. + :type source_database_deletion_date: datetime + :param recovery_services_recovery_point_id: The resource identifier of the + recovery point associated with create operation of this database. + :type recovery_services_recovery_point_id: str + :param long_term_retention_backup_resource_id: The resource identifier of + the long term retention backup associated with create operation of this + database. + :type long_term_retention_backup_resource_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param restorable_dropped_database_id: The resource identifier of the + restorable dropped database associated with create operation of this + database. + :type restorable_dropped_database_id: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param zone_redundant: Whether or not this database is zone redundant, + which means the replicas of this database will be spread across multiple + availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this database. Possible + values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType + :ivar max_log_size_bytes: The max log size for this database. + :vartype max_log_size_bytes: long + :ivar earliest_restore_date: This records the earliest start date and time + that restore is available for this database (ISO8601 format). + :vartype earliest_restore_date: datetime + :param read_scale: The state of read-only routing. If enabled, connections + that have application intent set to readonly in their connection string + may be routed to a readonly secondary replica in the same region. Possible + values include: 'Enabled', 'Disabled' + :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale + :ivar current_sku: The name and tier of the SKU. + :vartype current_sku: ~azure.mgmt.sql.models.Sku + :param auto_pause_delay: Time in minutes after which database is + automatically paused. A value of -1 means that automatic pause is disabled + :type auto_pause_delay: int + :param min_capacity: Minimal capacity that database will always have + allocated, if not paused + :type min_capacity: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'managed_by': {'readonly': True}, + 'status': {'readonly': True}, + 'database_id': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'current_service_objective_name': {'readonly': True}, + 'requested_service_objective_name': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + 'max_log_size_bytes': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'current_sku': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, + 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, + 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, + 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, + 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, + 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, + 'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'}, + 'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'}, + } + + def __init__(self, *, location: str, tags=None, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, auto_pause_delay: int=None, min_capacity: float=None, **kwargs) -> None: + super(Database, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.kind = None + self.managed_by = None + self.create_mode = create_mode + self.collation = collation + self.max_size_bytes = max_size_bytes + self.sample_name = sample_name + self.elastic_pool_id = elastic_pool_id + self.source_database_id = source_database_id + self.status = None + self.database_id = None + self.creation_date = None + self.current_service_objective_name = None + self.requested_service_objective_name = None + self.default_secondary_location = None + self.failover_group_id = None + self.restore_point_in_time = restore_point_in_time + self.source_database_deletion_date = source_database_deletion_date + self.recovery_services_recovery_point_id = recovery_services_recovery_point_id + self.long_term_retention_backup_resource_id = long_term_retention_backup_resource_id + self.recoverable_database_id = recoverable_database_id + self.restorable_dropped_database_id = restorable_dropped_database_id + self.catalog_collation = catalog_collation + self.zone_redundant = zone_redundant + self.license_type = license_type + self.max_log_size_bytes = None + self.earliest_restore_date = None + self.read_scale = read_scale + self.current_sku = None + self.auto_pause_delay = auto_pause_delay + self.min_capacity = min_capacity + + +class DatabaseAutomaticTuning(ProxyResource): + """Database-level Automatic Tuning. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param desired_state: Automatic tuning desired state. Possible values + include: 'Inherit', 'Custom', 'Auto', 'Unspecified' + :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode + :ivar actual_state: Automatic tuning actual state. Possible values + include: 'Inherit', 'Custom', 'Auto', 'Unspecified' + :vartype actual_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode + :param options: Automatic tuning options definition. + :type options: dict[str, ~azure.mgmt.sql.models.AutomaticTuningOptions] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'actual_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningMode'}, + 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningMode'}, + 'options': {'key': 'properties.options', 'type': '{AutomaticTuningOptions}'}, + } + + def __init__(self, *, desired_state=None, options=None, **kwargs) -> None: + super(DatabaseAutomaticTuning, self).__init__(**kwargs) + self.desired_state = desired_state + self.actual_state = None + self.options = options + + +class DatabaseBlobAuditingPolicy(ProxyResource): + """A database blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Resource kind. + :vartype kind: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: + super(DatabaseBlobAuditingPolicy, self).__init__(**kwargs) + self.kind = None + self.state = state + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.audit_actions_and_groups = audit_actions_and_groups + self.storage_account_subscription_id = storage_account_subscription_id + self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use + self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + + +class DatabaseOperation(ProxyResource): + """A database operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_name: The name of the database the operation is being + performed on. + :vartype database_name: str + :ivar operation: The name of operation. + :vartype operation: str + :ivar operation_friendly_name: The friendly name of operation. + :vartype operation_friendly_name: str + :ivar percent_complete: The percentage of the operation completed. + :vartype percent_complete: int + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar start_time: The operation start time. + :vartype start_time: datetime + :ivar state: The operation state. Possible values include: 'Pending', + 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', 'Cancelled' + :vartype state: str or ~azure.mgmt.sql.models.ManagementOperationState + :ivar error_code: The operation error code. + :vartype error_code: int + :ivar error_description: The operation error description. + :vartype error_description: str + :ivar error_severity: The operation error severity. + :vartype error_severity: int + :ivar is_user_error: Whether or not the error is a user error. + :vartype is_user_error: bool + :ivar estimated_completion_time: The estimated completion time of the + operation. + :vartype estimated_completion_time: datetime + :ivar description: The operation description. + :vartype description: str + :ivar is_cancellable: Whether the operation can be cancelled. + :vartype is_cancellable: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_name': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_friendly_name': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_description': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'is_user_error': {'readonly': True}, + 'estimated_completion_time': {'readonly': True}, + 'description': {'readonly': True}, + 'is_cancellable': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, + 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(DatabaseOperation, self).__init__(**kwargs) + self.database_name = None + self.operation = None + self.operation_friendly_name = None + self.percent_complete = None + self.server_name = None + self.start_time = None + self.state = None + self.error_code = None + self.error_description = None + self.error_severity = None + self.is_user_error = None + self.estimated_completion_time = None + self.description = None + self.is_cancellable = None + + +class DatabaseSecurityAlertPolicy(ProxyResource): + """Contains information about a database Threat Detection policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar kind: Resource kind. + :vartype kind: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint and storageAccountAccessKey are required. + Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies the semicolon-separated list of alerts + that are disabled, or empty string to disable no alerts. Possible values: + Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; + Data_Exfiltration; Unsafe_Action. + :type disabled_alerts: str + :param email_addresses: Specifies the semicolon-separated list of e-mail + addresses to which the alert is sent. + :type email_addresses: str + :param email_account_admins: Specifies that the alert is sent to the + account administrators. Possible values include: 'Enabled', 'Disabled' + :type email_account_admins: str or + ~azure.mgmt.sql.models.SecurityAlertPolicyEmailAccountAdmins + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. If state is Enabled, storageEndpoint is + required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. If state is Enabled, + storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :param use_server_default: Specifies whether to use the default server + policy. Possible values include: 'Enabled', 'Disabled' + :type use_server_default: str or + ~azure.mgmt.sql.models.SecurityAlertPolicyUseServerDefault + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': 'str'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': 'str'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'SecurityAlertPolicyEmailAccountAdmins'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'use_server_default': {'key': 'properties.useServerDefault', 'type': 'SecurityAlertPolicyUseServerDefault'}, + } + + def __init__(self, *, state, location: str=None, disabled_alerts: str=None, email_addresses: str=None, email_account_admins=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, use_server_default=None, **kwargs) -> None: + super(DatabaseSecurityAlertPolicy, self).__init__(**kwargs) + self.location = location + self.kind = None + self.state = state + self.disabled_alerts = disabled_alerts + self.email_addresses = email_addresses + self.email_account_admins = email_account_admins + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.use_server_default = use_server_default + + +class DatabaseUpdate(Model): + """A database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param create_mode: Specifies the mode of database creation. + Default: regular database creation. + Copy: creates a database as a copy of an existing database. + sourceDatabaseId must be specified as the resource ID of the source + database. + Secondary: creates a database as a secondary replica of an existing + database. sourceDatabaseId must be specified as the resource ID of the + existing primary database. + PointInTimeRestore: Creates a database by restoring a point in time backup + of an existing database. sourceDatabaseId must be specified as the + resource ID of the existing database, and restorePointInTime must be + specified. + Recovery: Creates a database by restoring a geo-replicated backup. + sourceDatabaseId must be specified as the recoverable database resource ID + to restore. + Restore: Creates a database by restoring a backup of a deleted database. + sourceDatabaseId must be specified. If sourceDatabaseId is the database's + original resource ID, then sourceDatabaseDeletionDate must be specified. + Otherwise sourceDatabaseId must be the restorable dropped database + resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime + may also be specified to restore from an earlier point in time. + RestoreLongTermRetentionBackup: Creates a database by restoring from a + long term retention vault. recoveryServicesRecoveryPointResourceId must be + specified as the recovery point resource ID. + Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for + DataWarehouse edition. Possible values include: 'Default', 'Copy', + 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', + 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', + 'RestoreLongTermRetentionBackup', 'OnlineSecondary' + :type create_mode: str or ~azure.mgmt.sql.models.CreateMode + :param collation: The collation of the database. + :type collation: str + :param max_size_bytes: The max size of the database expressed in bytes. + :type max_size_bytes: long + :param sample_name: The name of the sample schema to apply when creating + this database. Possible values include: 'AdventureWorksLT', + 'WideWorldImportersStd', 'WideWorldImportersFull' + :type sample_name: str or ~azure.mgmt.sql.models.SampleName + :param elastic_pool_id: The resource identifier of the elastic pool + containing this database. + :type elastic_pool_id: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :ivar status: The status of the database. Possible values include: + 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', + 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', + 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', + 'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers', + 'OnlineChangingDwPerformanceTiers' + :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus + :ivar database_id: The ID of the database. + :vartype database_id: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar current_service_objective_name: The current service level objective + name of the database. + :vartype current_service_objective_name: str + :ivar requested_service_objective_name: The requested service level + objective name of the database. + :vartype requested_service_objective_name: str + :ivar default_secondary_location: The default secondary region for this + database. + :vartype default_secondary_location: str + :ivar failover_group_id: Failover Group resource identifier that this + database belongs to. + :vartype failover_group_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param source_database_deletion_date: Specifies the time that the database + was deleted. + :type source_database_deletion_date: datetime + :param recovery_services_recovery_point_id: The resource identifier of the + recovery point associated with create operation of this database. + :type recovery_services_recovery_point_id: str + :param long_term_retention_backup_resource_id: The resource identifier of + the long term retention backup associated with create operation of this + database. + :type long_term_retention_backup_resource_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param restorable_dropped_database_id: The resource identifier of the + restorable dropped database associated with create operation of this + database. + :type restorable_dropped_database_id: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param zone_redundant: Whether or not this database is zone redundant, + which means the replicas of this database will be spread across multiple + availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this database. Possible + values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType + :ivar max_log_size_bytes: The max log size for this database. + :vartype max_log_size_bytes: long + :ivar earliest_restore_date: This records the earliest start date and time + that restore is available for this database (ISO8601 format). + :vartype earliest_restore_date: datetime + :param read_scale: The state of read-only routing. If enabled, connections + that have application intent set to readonly in their connection string + may be routed to a readonly secondary replica in the same region. Possible + values include: 'Enabled', 'Disabled' + :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale + :ivar current_sku: The name and tier of the SKU. + :vartype current_sku: ~azure.mgmt.sql.models.Sku + :param auto_pause_delay: Time in minutes after which database is + automatically paused. A value of -1 means that automatic pause is disabled + :type auto_pause_delay: int + :param min_capacity: Minimal capacity that database will always have + allocated, if not paused + :type min_capacity: float + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'status': {'readonly': True}, + 'database_id': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'current_service_objective_name': {'readonly': True}, + 'requested_service_objective_name': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + 'max_log_size_bytes': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'current_sku': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, + 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, + 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, + 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, + 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, + 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, + 'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'}, + 'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, auto_pause_delay: int=None, min_capacity: float=None, tags=None, **kwargs) -> None: + super(DatabaseUpdate, self).__init__(**kwargs) + self.sku = sku + self.create_mode = create_mode + self.collation = collation + self.max_size_bytes = max_size_bytes + self.sample_name = sample_name + self.elastic_pool_id = elastic_pool_id + self.source_database_id = source_database_id + self.status = None + self.database_id = None + self.creation_date = None + self.current_service_objective_name = None + self.requested_service_objective_name = None + self.default_secondary_location = None + self.failover_group_id = None + self.restore_point_in_time = restore_point_in_time + self.source_database_deletion_date = source_database_deletion_date + self.recovery_services_recovery_point_id = recovery_services_recovery_point_id + self.long_term_retention_backup_resource_id = long_term_retention_backup_resource_id + self.recoverable_database_id = recoverable_database_id + self.restorable_dropped_database_id = restorable_dropped_database_id + self.catalog_collation = catalog_collation + self.zone_redundant = zone_redundant + self.license_type = license_type + self.max_log_size_bytes = None + self.earliest_restore_date = None + self.read_scale = read_scale + self.current_sku = None + self.auto_pause_delay = auto_pause_delay + self.min_capacity = min_capacity + self.tags = tags + + +class DatabaseUsage(Model): + """The database usages. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the usage metric. + :vartype name: str + :ivar resource_name: The name of the resource. + :vartype resource_name: str + :ivar display_name: The usage metric display name. + :vartype display_name: str + :ivar current_value: The current value of the usage metric. + :vartype current_value: float + :ivar limit: The current limit of the usage metric. + :vartype limit: float + :ivar unit: The units of the usage metric. + :vartype unit: str + :ivar next_reset_time: The next reset time for the usage metric (ISO8601 + format). + :vartype next_reset_time: datetime + """ + + _validation = { + 'name': {'readonly': True}, + 'resource_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'next_reset_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(DatabaseUsage, self).__init__(**kwargs) + self.name = None + self.resource_name = None + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + self.next_reset_time = None + + +class DatabaseVulnerabilityAssessment(ProxyResource): + """A database vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: A blob storage container path to hold the + scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It + is required if server level vulnerability assessment policy doesn't set + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _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'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, *, storage_container_path: str=None, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: + super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = storage_container_path + self.storage_container_sas_key = storage_container_sas_key + self.storage_account_access_key = storage_account_access_key + self.recurring_scans = recurring_scans + + +class DatabaseVulnerabilityAssessmentRuleBaseline(ProxyResource): + """A database vulnerability assessment rule baseline. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param baseline_results: Required. The rule baseline result + :type baseline_results: + list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'baseline_results': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'baseline_results': {'key': 'properties.baselineResults', 'type': '[DatabaseVulnerabilityAssessmentRuleBaselineItem]'}, + } + + def __init__(self, *, baseline_results, **kwargs) -> None: + super(DatabaseVulnerabilityAssessmentRuleBaseline, self).__init__(**kwargs) + self.baseline_results = baseline_results + + +class DatabaseVulnerabilityAssessmentRuleBaselineItem(Model): + """Properties for an Azure SQL Database Vulnerability Assessment rule + baseline's result. + + All required parameters must be populated in order to send to Azure. + + :param result: Required. The rule baseline result + :type result: list[str] + """ + + _validation = { + 'result': {'required': True}, + } + + _attribute_map = { + 'result': {'key': 'result', 'type': '[str]'}, + } + + def __init__(self, *, result, **kwargs) -> None: + super(DatabaseVulnerabilityAssessmentRuleBaselineItem, self).__init__(**kwargs) + self.result = result + + +class DatabaseVulnerabilityAssessmentScansExport(ProxyResource): + """A database Vulnerability Assessment scan export resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar exported_report_location: Location of the exported report (e.g. + https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). + :vartype exported_report_location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'exported_report_location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs) + self.exported_report_location = None + + +class DataMaskingPolicy(ProxyResource): + """Represents a database data masking policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param data_masking_state: Required. The state of the data masking policy. + Possible values include: 'Disabled', 'Enabled' + :type data_masking_state: str or ~azure.mgmt.sql.models.DataMaskingState + :param exempt_principals: The list of the exempt principals. Specifies the + semicolon-separated list of database users for which the data masking + policy does not apply. The specified users receive data results without + masking for all of the database queries. + :type exempt_principals: str + :ivar application_principals: The list of the application principals. This + is a legacy parameter and is no longer used. + :vartype application_principals: str + :ivar masking_level: The masking level. This is a legacy parameter and is + no longer used. + :vartype masking_level: str + :ivar location: The location of the data masking policy. + :vartype location: str + :ivar kind: The kind of data masking policy. Metadata, used for Azure + portal. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_masking_state': {'required': True}, + 'application_principals': {'readonly': True}, + 'masking_level': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_masking_state': {'key': 'properties.dataMaskingState', 'type': 'DataMaskingState'}, + 'exempt_principals': {'key': 'properties.exemptPrincipals', 'type': 'str'}, + 'application_principals': {'key': 'properties.applicationPrincipals', 'type': 'str'}, + 'masking_level': {'key': 'properties.maskingLevel', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, data_masking_state, exempt_principals: str=None, **kwargs) -> None: + super(DataMaskingPolicy, self).__init__(**kwargs) + self.data_masking_state = data_masking_state + self.exempt_principals = exempt_principals + self.application_principals = None + self.masking_level = None + self.location = None + self.kind = None + + +class DataMaskingRule(ProxyResource): + """Represents a database data masking rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar data_masking_rule_id: The rule Id. + :vartype data_masking_rule_id: str + :param alias_name: The alias name. This is a legacy parameter and is no + longer used. + :type alias_name: str + :param rule_state: The rule state. Used to delete a rule. To delete an + existing rule, specify the schemaName, tableName, columnName, + maskingFunction, and specify ruleState as disabled. However, if the rule + doesn't already exist, the rule will be created with ruleState set to + enabled, regardless of the provided value of ruleState. Possible values + include: 'Disabled', 'Enabled' + :type rule_state: str or ~azure.mgmt.sql.models.DataMaskingRuleState + :param schema_name: Required. The schema name on which the data masking + rule is applied. + :type schema_name: str + :param table_name: Required. The table name on which the data masking rule + is applied. + :type table_name: str + :param column_name: Required. The column name on which the data masking + rule is applied. + :type column_name: str + :param masking_function: Required. The masking function that is used for + the data masking rule. Possible values include: 'Default', 'CCN', 'Email', + 'Number', 'SSN', 'Text' + :type masking_function: str or ~azure.mgmt.sql.models.DataMaskingFunction + :param number_from: The numberFrom property of the masking rule. Required + if maskingFunction is set to Number, otherwise this parameter will be + ignored. + :type number_from: str + :param number_to: The numberTo property of the data masking rule. Required + if maskingFunction is set to Number, otherwise this parameter will be + ignored. + :type number_to: str + :param prefix_size: If maskingFunction is set to Text, the number of + characters to show unmasked in the beginning of the string. Otherwise, + this parameter will be ignored. + :type prefix_size: str + :param suffix_size: If maskingFunction is set to Text, the number of + characters to show unmasked at the end of the string. Otherwise, this + parameter will be ignored. + :type suffix_size: str + :param replacement_string: If maskingFunction is set to Text, the + character to use for masking the unexposed part of the string. Otherwise, + this parameter will be ignored. + :type replacement_string: str + :ivar location: The location of the data masking rule. + :vartype location: str + :ivar kind: The kind of Data Masking Rule. Metadata, used for Azure + portal. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_masking_rule_id': {'readonly': True}, + 'schema_name': {'required': True}, + 'table_name': {'required': True}, + 'column_name': {'required': True}, + 'masking_function': {'required': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_masking_rule_id': {'key': 'properties.id', 'type': 'str'}, + 'alias_name': {'key': 'properties.aliasName', 'type': 'str'}, + 'rule_state': {'key': 'properties.ruleState', 'type': 'DataMaskingRuleState'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, + 'table_name': {'key': 'properties.tableName', 'type': 'str'}, + 'column_name': {'key': 'properties.columnName', 'type': 'str'}, + 'masking_function': {'key': 'properties.maskingFunction', 'type': 'DataMaskingFunction'}, + 'number_from': {'key': 'properties.numberFrom', 'type': 'str'}, + 'number_to': {'key': 'properties.numberTo', 'type': 'str'}, + 'prefix_size': {'key': 'properties.prefixSize', 'type': 'str'}, + 'suffix_size': {'key': 'properties.suffixSize', 'type': 'str'}, + 'replacement_string': {'key': 'properties.replacementString', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, schema_name: str, table_name: str, column_name: str, masking_function, alias_name: str=None, rule_state=None, number_from: str=None, number_to: str=None, prefix_size: str=None, suffix_size: str=None, replacement_string: str=None, **kwargs) -> None: + super(DataMaskingRule, self).__init__(**kwargs) + self.data_masking_rule_id = None + self.alias_name = alias_name + self.rule_state = rule_state + self.schema_name = schema_name + self.table_name = table_name + self.column_name = column_name + self.masking_function = masking_function + self.number_from = number_from + self.number_to = number_to + self.prefix_size = prefix_size + self.suffix_size = suffix_size + self.replacement_string = replacement_string + self.location = None + self.kind = None + + +class EditionCapability(Model): + """The edition capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The database edition name. + :vartype name: str + :ivar supported_service_level_objectives: The list of supported service + objectives for the edition. + :vartype supported_service_level_objectives: + list[~azure.mgmt.sql.models.ServiceObjectiveCapability] + :ivar zone_redundant: Whether or not zone redundancy is supported for the + edition. + :vartype zone_redundant: bool + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_service_level_objectives': {'readonly': True}, + 'zone_redundant': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_service_level_objectives': {'key': 'supportedServiceLevelObjectives', 'type': '[ServiceObjectiveCapability]'}, + 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(EditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_service_level_objectives = None + self.zone_redundant = None + self.status = None + self.reason = reason + + +class ElasticPool(TrackedResource): + """An elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The elastic pool SKU. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or the following command: + ```azurecli + az sql elastic-pool list-editions -l -o table + ```` + :type sku: ~azure.mgmt.sql.models.Sku + :ivar kind: Kind of elastic pool. This is metadata used for the Azure + portal experience. + :vartype kind: str + :ivar state: The state of the elastic pool. Possible values include: + 'Creating', 'Ready', 'Disabled' + :vartype state: str or ~azure.mgmt.sql.models.ElasticPoolState + :ivar creation_date: The creation date of the elastic pool (ISO8601 + format). + :vartype creation_date: datetime + :param max_size_bytes: The storage limit for the database elastic pool in + bytes. + :type max_size_bytes: long + :param per_database_settings: The per database settings for the elastic + pool. + :type per_database_settings: + ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings + :param zone_redundant: Whether or not this elastic pool is zone redundant, + which means the replicas of this elastic pool will be spread across + multiple availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this elastic pool. + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'state': {'readonly': True}, + 'creation_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, sku=None, max_size_bytes: int=None, per_database_settings=None, zone_redundant: bool=None, license_type=None, **kwargs) -> None: + super(ElasticPool, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.kind = None + self.state = None + self.creation_date = None + self.max_size_bytes = max_size_bytes + self.per_database_settings = per_database_settings + self.zone_redundant = zone_redundant + self.license_type = license_type + + +class ElasticPoolActivity(ProxyResource): + """Represents the activity on an elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar end_time: The time the operation finished (ISO8601 format). + :vartype end_time: datetime + :ivar error_code: The error code if available. + :vartype error_code: int + :ivar error_message: The error message if available. + :vartype error_message: str + :ivar error_severity: The error severity if available. + :vartype error_severity: int + :ivar operation: The operation name. + :vartype operation: str + :ivar operation_id: The unique operation ID. + :vartype operation_id: str + :ivar percent_complete: The percentage complete if available. + :vartype percent_complete: int + :ivar requested_database_dtu_max: The requested max DTU per database if + available. + :vartype requested_database_dtu_max: int + :ivar requested_database_dtu_min: The requested min DTU per database if + available. + :vartype requested_database_dtu_min: int + :ivar requested_dtu: The requested DTU for the pool if available. + :vartype requested_dtu: int + :ivar requested_elastic_pool_name: The requested name for the elastic pool + if available. + :vartype requested_elastic_pool_name: str + :ivar requested_storage_limit_in_gb: The requested storage limit for the + pool in GB if available. + :vartype requested_storage_limit_in_gb: long + :ivar elastic_pool_name: The name of the elastic pool. + :vartype elastic_pool_name: str + :ivar server_name: The name of the server the elastic pool is in. + :vartype server_name: str + :ivar start_time: The time the operation started (ISO8601 format). + :vartype start_time: datetime + :ivar state: The current state of the operation. + :vartype state: str + :ivar requested_storage_limit_in_mb: The requested storage limit in MB. + :vartype requested_storage_limit_in_mb: int + :ivar requested_database_dtu_guarantee: The requested per database DTU + guarantee. + :vartype requested_database_dtu_guarantee: int + :ivar requested_database_dtu_cap: The requested per database DTU cap. + :vartype requested_database_dtu_cap: int + :ivar requested_dtu_guarantee: The requested DTU guarantee. + :vartype requested_dtu_guarantee: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_message': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_id': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'requested_database_dtu_max': {'readonly': True}, + 'requested_database_dtu_min': {'readonly': True}, + 'requested_dtu': {'readonly': True}, + 'requested_elastic_pool_name': {'readonly': True}, + 'requested_storage_limit_in_gb': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'requested_storage_limit_in_mb': {'readonly': True}, + 'requested_database_dtu_guarantee': {'readonly': True}, + 'requested_database_dtu_cap': {'readonly': True}, + 'requested_dtu_guarantee': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'requested_database_dtu_max': {'key': 'properties.requestedDatabaseDtuMax', 'type': 'int'}, + 'requested_database_dtu_min': {'key': 'properties.requestedDatabaseDtuMin', 'type': 'int'}, + 'requested_dtu': {'key': 'properties.requestedDtu', 'type': 'int'}, + 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, + 'requested_storage_limit_in_gb': {'key': 'properties.requestedStorageLimitInGB', 'type': 'long'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'requested_storage_limit_in_mb': {'key': 'properties.requestedStorageLimitInMB', 'type': 'int'}, + 'requested_database_dtu_guarantee': {'key': 'properties.requestedDatabaseDtuGuarantee', 'type': 'int'}, + 'requested_database_dtu_cap': {'key': 'properties.requestedDatabaseDtuCap', 'type': 'int'}, + 'requested_dtu_guarantee': {'key': 'properties.requestedDtuGuarantee', 'type': 'int'}, + } + + def __init__(self, *, location: str=None, **kwargs) -> None: + super(ElasticPoolActivity, self).__init__(**kwargs) + self.location = location + self.end_time = None + self.error_code = None + self.error_message = None + self.error_severity = None + self.operation = None + self.operation_id = None + self.percent_complete = None + self.requested_database_dtu_max = None + self.requested_database_dtu_min = None + self.requested_dtu = None + self.requested_elastic_pool_name = None + self.requested_storage_limit_in_gb = None + self.elastic_pool_name = None + self.server_name = None + self.start_time = None + self.state = None + self.requested_storage_limit_in_mb = None + self.requested_database_dtu_guarantee = None + self.requested_database_dtu_cap = None + self.requested_dtu_guarantee = None + + +class ElasticPoolDatabaseActivity(ProxyResource): + """Represents the activity on an elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :ivar database_name: The database name. + :vartype database_name: str + :ivar end_time: The time the operation finished (ISO8601 format). + :vartype end_time: datetime + :ivar error_code: The error code if available. + :vartype error_code: int + :ivar error_message: The error message if available. + :vartype error_message: str + :ivar error_severity: The error severity if available. + :vartype error_severity: int + :ivar operation: The operation name. + :vartype operation: str + :ivar operation_id: The unique operation ID. + :vartype operation_id: str + :ivar percent_complete: The percentage complete if available. + :vartype percent_complete: int + :ivar requested_elastic_pool_name: The name for the elastic pool the + database is moving into if available. + :vartype requested_elastic_pool_name: str + :ivar current_elastic_pool_name: The name of the current elastic pool the + database is in if available. + :vartype current_elastic_pool_name: str + :ivar current_service_objective: The name of the current service objective + if available. + :vartype current_service_objective: str + :ivar requested_service_objective: The name of the requested service + objective if available. + :vartype requested_service_objective: str + :ivar server_name: The name of the server the elastic pool is in. + :vartype server_name: str + :ivar start_time: The time the operation started (ISO8601 format). + :vartype start_time: datetime + :ivar state: The current state of the operation. + :vartype state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_name': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_message': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_id': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'requested_elastic_pool_name': {'readonly': True}, + 'current_elastic_pool_name': {'readonly': True}, + 'current_service_objective': {'readonly': True}, + 'requested_service_objective': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, + 'current_elastic_pool_name': {'key': 'properties.currentElasticPoolName', 'type': 'str'}, + 'current_service_objective': {'key': 'properties.currentServiceObjective', 'type': 'str'}, + 'requested_service_objective': {'key': 'properties.requestedServiceObjective', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, **kwargs) -> None: + super(ElasticPoolDatabaseActivity, self).__init__(**kwargs) + self.location = location + self.database_name = None + self.end_time = None + self.error_code = None + self.error_message = None + self.error_severity = None + self.operation = None + self.operation_id = None + self.percent_complete = None + self.requested_elastic_pool_name = None + self.current_elastic_pool_name = None + self.current_service_objective = None + self.requested_service_objective = None + self.server_name = None + self.start_time = None + self.state = None + + +class ElasticPoolEditionCapability(Model): + """The elastic pool edition capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The elastic pool edition name. + :vartype name: str + :ivar supported_elastic_pool_performance_levels: The list of supported + elastic pool DTU levels for the edition. + :vartype supported_elastic_pool_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerformanceLevelCapability] + :ivar zone_redundant: Whether or not zone redundancy is supported for the + edition. + :vartype zone_redundant: bool + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_elastic_pool_performance_levels': {'readonly': True}, + 'zone_redundant': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_elastic_pool_performance_levels': {'key': 'supportedElasticPoolPerformanceLevels', 'type': '[ElasticPoolPerformanceLevelCapability]'}, + 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ElasticPoolEditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_elastic_pool_performance_levels = None + self.zone_redundant = None + self.status = None + self.reason = reason + + +class ElasticPoolOperation(ProxyResource): + """A elastic pool operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar elastic_pool_name: The name of the elastic pool the operation is + being performed on. + :vartype elastic_pool_name: str + :ivar operation: The name of operation. + :vartype operation: str + :ivar operation_friendly_name: The friendly name of operation. + :vartype operation_friendly_name: str + :ivar percent_complete: The percentage of the operation completed. + :vartype percent_complete: int + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar start_time: The operation start time. + :vartype start_time: datetime + :ivar state: The operation state. + :vartype state: str + :ivar error_code: The operation error code. + :vartype error_code: int + :ivar error_description: The operation error description. + :vartype error_description: str + :ivar error_severity: The operation error severity. + :vartype error_severity: int + :ivar is_user_error: Whether or not the error is a user error. + :vartype is_user_error: bool + :ivar estimated_completion_time: The estimated completion time of the + operation. + :vartype estimated_completion_time: datetime + :ivar description: The operation description. + :vartype description: str + :ivar is_cancellable: Whether the operation can be cancelled. + :vartype is_cancellable: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'operation': {'readonly': True}, + 'operation_friendly_name': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'server_name': {'readonly': True}, + 'start_time': {'readonly': True}, + 'state': {'readonly': True}, + 'error_code': {'readonly': True}, + 'error_description': {'readonly': True}, + 'error_severity': {'readonly': True}, + 'is_user_error': {'readonly': True}, + 'estimated_completion_time': {'readonly': True}, + 'description': {'readonly': True}, + 'is_cancellable': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'operation': {'key': 'properties.operation', 'type': 'str'}, + 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, + 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, + 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, + 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, + 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(ElasticPoolOperation, self).__init__(**kwargs) + self.elastic_pool_name = None + self.operation = None + self.operation_friendly_name = None + self.percent_complete = None + self.server_name = None + self.start_time = None + self.state = None + self.error_code = None + self.error_description = None + self.error_severity = None + self.is_user_error = None + self.estimated_completion_time = None + self.description = None + self.is_cancellable = None + + +class ElasticPoolPerDatabaseMaxPerformanceLevelCapability(Model): + """The max per-database performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The maximum performance level per database. + :vartype limit: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + :ivar supported_per_database_min_performance_levels: The list of supported + min database performance levels. + :vartype supported_per_database_min_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMinPerformanceLevelCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'supported_per_database_min_performance_levels': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'supported_per_database_min_performance_levels': {'key': 'supportedPerDatabaseMinPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMinPerformanceLevelCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ElasticPoolPerDatabaseMaxPerformanceLevelCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + self.supported_per_database_min_performance_levels = None + self.status = None + self.reason = reason + + +class ElasticPoolPerDatabaseMinPerformanceLevelCapability(Model): + """The minimum per-database performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The minimum performance level per database. + :vartype limit: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ElasticPoolPerDatabaseMinPerformanceLevelCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + self.status = None + self.reason = reason + + +class ElasticPoolPerDatabaseSettings(Model): + """Per database settings of an elastic pool. + + :param min_capacity: The minimum capacity all databases are guaranteed. + :type min_capacity: float + :param max_capacity: The maximum capacity any one database can consume. + :type max_capacity: float + """ + + _attribute_map = { + 'min_capacity': {'key': 'minCapacity', 'type': 'float'}, + 'max_capacity': {'key': 'maxCapacity', 'type': 'float'}, + } + + def __init__(self, *, min_capacity: float=None, max_capacity: float=None, **kwargs) -> None: + super(ElasticPoolPerDatabaseSettings, self).__init__(**kwargs) + self.min_capacity = min_capacity + self.max_capacity = max_capacity + + +class ElasticPoolPerformanceLevelCapability(Model): + """The Elastic Pool performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar performance_level: The performance level for the pool. + :vartype performance_level: + ~azure.mgmt.sql.models.PerformanceLevelCapability + :ivar sku: The sku. + :vartype sku: ~azure.mgmt.sql.models.Sku + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar max_database_count: The maximum number of databases supported. + :vartype max_database_count: int + :ivar included_max_size: The included (free) max size for this performance + level. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar supported_max_sizes: The list of supported max sizes. + :vartype supported_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar supported_per_database_max_sizes: The list of supported per database + max sizes. + :vartype supported_per_database_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar supported_per_database_max_performance_levels: The list of supported + per database max performance levels. + :vartype supported_per_database_max_performance_levels: + list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMaxPerformanceLevelCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'performance_level': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'max_database_count': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'supported_max_sizes': {'readonly': True}, + 'supported_per_database_max_sizes': {'readonly': True}, + 'supported_per_database_max_performance_levels': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'max_database_count': {'key': 'maxDatabaseCount', 'type': 'int'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'supported_per_database_max_sizes': {'key': 'supportedPerDatabaseMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'supported_per_database_max_performance_levels': {'key': 'supportedPerDatabaseMaxPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMaxPerformanceLevelCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ElasticPoolPerformanceLevelCapability, self).__init__(**kwargs) + self.performance_level = None + self.sku = None + self.supported_license_types = None + self.max_database_count = None + self.included_max_size = None + self.supported_max_sizes = None + self.supported_per_database_max_sizes = None + self.supported_per_database_max_performance_levels = None + self.status = None + self.reason = reason + + +class ElasticPoolUpdate(Model): + """An elastic pool update. + + :param sku: + :type sku: ~azure.mgmt.sql.models.Sku + :param max_size_bytes: The storage limit for the database elastic pool in + bytes. + :type max_size_bytes: long + :param per_database_settings: The per database settings for the elastic + pool. + :type per_database_settings: + ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings + :param zone_redundant: Whether or not this elastic pool is zone redundant, + which means the replicas of this elastic pool will be spread across + multiple availability zones. + :type zone_redundant: bool + :param license_type: The license type to apply for this elastic pool. + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, + 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, sku=None, max_size_bytes: int=None, per_database_settings=None, zone_redundant: bool=None, license_type=None, tags=None, **kwargs) -> None: + super(ElasticPoolUpdate, self).__init__(**kwargs) + self.sku = sku + self.max_size_bytes = max_size_bytes + self.per_database_settings = per_database_settings + self.zone_redundant = zone_redundant + self.license_type = license_type + self.tags = tags + + +class EncryptionProtector(ProxyResource): + """The server encryption protector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :type kind: str + :ivar location: Resource location. + :vartype location: str + :ivar subregion: Subregion of the encryption protector. + :vartype subregion: str + :param server_key_name: The name of the server key. + :type server_key_name: str + :param server_key_type: Required. The encryption protector type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :ivar uri: The URI of the server key. + :vartype uri: str + :ivar thumbprint: Thumbprint of the server key. + :vartype thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'subregion': {'readonly': True}, + 'server_key_type': {'required': True}, + 'uri': {'readonly': True}, + 'thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'subregion': {'key': 'properties.subregion', 'type': 'str'}, + 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, *, server_key_type, kind: str=None, server_key_name: str=None, **kwargs) -> None: + super(EncryptionProtector, self).__init__(**kwargs) + self.kind = kind + self.location = None + self.subregion = None + self.server_key_name = server_key_name + self.server_key_type = server_key_type + self.uri = None + self.thumbprint = None + + +class ExportRequest(Model): + """Export database parameters. + + All required parameters must be populated in order to send to Azure. + + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + } + + _attribute_map = { + 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, + } + + def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, authentication_type="SQL", **kwargs) -> None: + super(ExportRequest, self).__init__(**kwargs) + self.storage_key_type = storage_key_type + self.storage_key = storage_key + self.storage_uri = storage_uri + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.authentication_type = authentication_type + + +class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): + """An extended database blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param predicate_expression: Specifies condition of where clause when + creating an audit. + :type predicate_expression: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: + super(ExtendedDatabaseBlobAuditingPolicy, self).__init__(**kwargs) + self.predicate_expression = predicate_expression + self.state = state + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.audit_actions_and_groups = audit_actions_and_groups + self.storage_account_subscription_id = storage_account_subscription_id + self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use + self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + + +class ExtendedServerBlobAuditingPolicy(ProxyResource): + """An extended server blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param predicate_expression: Specifies condition of where clause when + creating an audit. + :type predicate_expression: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: + super(ExtendedServerBlobAuditingPolicy, self).__init__(**kwargs) + self.predicate_expression = predicate_expression + self.state = state + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.audit_actions_and_groups = audit_actions_and_groups + self.storage_account_subscription_id = storage_account_subscription_id + self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use + self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + + +class FailoverGroup(ProxyResource): + """A failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param read_write_endpoint: Required. Read-write endpoint of the failover + group instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint + :ivar replication_role: Local replication role of the failover group + instance. Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.FailoverGroupReplicationRole + :ivar replication_state: Replication state of the failover group instance. + :vartype replication_state: str + :param partner_servers: Required. List of partner server information for + the failover group. + :type partner_servers: list[~azure.mgmt.sql.models.PartnerInfo] + :param databases: List of databases in the failover group. + :type databases: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'read_write_endpoint': {'required': True}, + 'replication_role': {'readonly': True}, + 'replication_state': {'readonly': True}, + 'partner_servers': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, + 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + 'partner_servers': {'key': 'properties.partnerServers', 'type': '[PartnerInfo]'}, + 'databases': {'key': 'properties.databases', 'type': '[str]'}, + } + + def __init__(self, *, read_write_endpoint, partner_servers, tags=None, read_only_endpoint=None, databases=None, **kwargs) -> None: + super(FailoverGroup, self).__init__(**kwargs) + self.location = None + self.tags = tags + self.read_write_endpoint = read_write_endpoint + self.read_only_endpoint = read_only_endpoint + self.replication_role = None + self.replication_state = None + self.partner_servers = partner_servers + self.databases = databases + + +class FailoverGroupReadOnlyEndpoint(Model): + """Read-only endpoint of the failover group instance. + + :param failover_policy: Failover policy of the read-only endpoint for the + failover group. Possible values include: 'Disabled', 'Enabled' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy + """ + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + } + + def __init__(self, *, failover_policy=None, **kwargs) -> None: + super(FailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) + self.failover_policy = failover_policy + + +class FailoverGroupReadWriteEndpoint(Model): + """Read-write endpoint of the failover group instance. + + All required parameters must be populated in order to send to Azure. + + :param failover_policy: Required. Failover policy of the read-write + endpoint for the failover group. If failoverPolicy is Automatic then + failoverWithDataLossGracePeriodMinutes is required. Possible values + include: 'Manual', 'Automatic' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy + :param failover_with_data_loss_grace_period_minutes: Grace period before + failover with data loss is attempted for the read-write endpoint. If + failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is + required. + :type failover_with_data_loss_grace_period_minutes: int + """ + + _validation = { + 'failover_policy': {'required': True}, + } + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, + } + + def __init__(self, *, failover_policy, failover_with_data_loss_grace_period_minutes: int=None, **kwargs) -> None: + super(FailoverGroupReadWriteEndpoint, self).__init__(**kwargs) + self.failover_policy = failover_policy + self.failover_with_data_loss_grace_period_minutes = failover_with_data_loss_grace_period_minutes + + +class FailoverGroupUpdate(Model): + """A failover group update request. + + :param read_write_endpoint: Read-write endpoint of the failover group + instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint + :param databases: List of databases in the failover group. + :type databases: list[str] + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, + 'databases': {'key': 'properties.databases', 'type': '[str]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, read_write_endpoint=None, read_only_endpoint=None, databases=None, tags=None, **kwargs) -> None: + super(FailoverGroupUpdate, self).__init__(**kwargs) + self.read_write_endpoint = read_write_endpoint + self.read_only_endpoint = read_only_endpoint + self.databases = databases + self.tags = tags + + +class FirewallRule(ProxyResource): + """Represents a server firewall rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of server that contains this firewall rule. + :vartype kind: str + :ivar location: Location of the server that contains this firewall rule. + :vartype location: str + :param start_ip_address: Required. The start IP address of the firewall + rule. Must be IPv4 format. Use value '0.0.0.0' to represent all + Azure-internal IP addresses. + :type start_ip_address: str + :param end_ip_address: Required. The end IP address of the firewall rule. + Must be IPv4 format. Must be greater than or equal to startIpAddress. Use + value '0.0.0.0' to represent all Azure-internal IP addresses. + :type end_ip_address: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + 'start_ip_address': {'required': True}, + 'end_ip_address': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + } + + def __init__(self, *, start_ip_address: str, end_ip_address: str, **kwargs) -> None: + super(FirewallRule, self).__init__(**kwargs) + self.kind = None + self.location = None + self.start_ip_address = start_ip_address + self.end_ip_address = end_ip_address + + +class GeoBackupPolicy(ProxyResource): + """A database geo backup policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. The state of the geo backup policy. Possible + values include: 'Disabled', 'Enabled' + :type state: str or ~azure.mgmt.sql.models.GeoBackupPolicyState + :ivar storage_type: The storage type of the geo backup policy. + :vartype storage_type: str + :ivar kind: Kind of geo backup policy. This is metadata used for the + Azure portal experience. + :vartype kind: str + :ivar location: Backup policy location. + :vartype location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'storage_type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'GeoBackupPolicyState'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, state, **kwargs) -> None: + super(GeoBackupPolicy, self).__init__(**kwargs) + self.state = state + self.storage_type = None + self.kind = None + self.location = None + + +class ImportExportResponse(ProxyResource): + """Response for Import/Export Get operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar request_type: The request type of the operation. + :vartype request_type: str + :ivar request_id: The request type of the operation. + :vartype request_id: str + :ivar server_name: The name of the server. + :vartype server_name: str + :ivar database_name: The name of the database. + :vartype database_name: str + :ivar status: The status message returned from the server. + :vartype status: str + :ivar last_modified_time: The operation status last modified time. + :vartype last_modified_time: str + :ivar queued_time: The operation queued time. + :vartype queued_time: str + :ivar blob_uri: The blob uri. + :vartype blob_uri: str + :ivar error_message: The error message returned from the server. + :vartype error_message: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'request_type': {'readonly': True}, + 'request_id': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'status': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'queued_time': {'readonly': True}, + 'blob_uri': {'readonly': True}, + 'error_message': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'request_type': {'key': 'properties.requestType', 'type': 'str'}, + 'request_id': {'key': 'properties.requestId', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'str'}, + 'queued_time': {'key': 'properties.queuedTime', 'type': 'str'}, + 'blob_uri': {'key': 'properties.blobUri', 'type': 'str'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ImportExportResponse, self).__init__(**kwargs) + self.request_type = None + self.request_id = None + self.server_name = None + self.database_name = None + self.status = None + self.last_modified_time = None + self.queued_time = None + self.blob_uri = None + self.error_message = None + + +class ImportExtensionRequest(Model): + """Import database parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: The name of the extension. + :type name: str + :param type: The type of the extension. + :type type: str + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + :ivar operation_mode: Required. The type of import operation being + performed. This is always Import. Default value: "Import" . + :vartype operation_mode: str + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + 'operation_mode': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_key_type': {'key': 'properties.storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'properties.storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'properties.storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'properties.authenticationType', 'type': 'AuthenticationType'}, + 'operation_mode': {'key': 'properties.operationMode', 'type': 'str'}, + } + + operation_mode = "Import" + + def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, name: str=None, type: str=None, authentication_type="SQL", **kwargs) -> None: + super(ImportExtensionRequest, self).__init__(**kwargs) + self.name = name + self.type = type + self.storage_key_type = storage_key_type + self.storage_key = storage_key + self.storage_uri = storage_uri + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.authentication_type = authentication_type + + +class ImportRequest(ExportRequest): + """Import database parameters. + + All required parameters must be populated in order to send to Azure. + + :param storage_key_type: Required. The type of the storage key to use. + Possible values include: 'StorageAccessKey', 'SharedAccessKey' + :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType + :param storage_key: Required. The storage key to use. If storage key type + is SharedAccessKey, it must be preceded with a "?." + :type storage_key: str + :param storage_uri: Required. The storage uri to use. + :type storage_uri: str + :param administrator_login: Required. The name of the SQL administrator. + :type administrator_login: str + :param administrator_login_password: Required. The password of the SQL + administrator. + :type administrator_login_password: str + :param authentication_type: The authentication type. Possible values + include: 'SQL', 'ADPassword'. Default value: "SQL" . + :type authentication_type: str or + ~azure.mgmt.sql.models.AuthenticationType + :param database_name: Required. The name of the database to import. + :type database_name: str + :param edition: Required. The edition for the database being created. + The list of SKUs may vary by region and support offer. To determine the + SKUs (including the SKU name, tier/edition, family, and capacity) that are + available to your subscription in an Azure region, use the + `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location + ```` + . Possible values include: 'Web', 'Business', 'Basic', 'Standard', + 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', + 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale' + :type edition: str or ~azure.mgmt.sql.models.DatabaseEdition + :param service_objective_name: Required. The name of the service objective + to assign to the database. Possible values include: 'System', 'System0', + 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', + 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', + 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', + 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', + 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', + 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', + 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', + 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' + :type service_objective_name: str or + ~azure.mgmt.sql.models.ServiceObjectiveName + :param max_size_bytes: Required. The maximum size for the newly imported + database. + :type max_size_bytes: str + """ + + _validation = { + 'storage_key_type': {'required': True}, + 'storage_key': {'required': True}, + 'storage_uri': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + 'database_name': {'required': True}, + 'edition': {'required': True}, + 'service_objective_name': {'required': True}, + 'max_size_bytes': {'required': True}, + } + + _attribute_map = { + 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, + 'storage_key': {'key': 'storageKey', 'type': 'str'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'edition': {'key': 'edition', 'type': 'str'}, + 'service_objective_name': {'key': 'serviceObjectiveName', 'type': 'str'}, + 'max_size_bytes': {'key': 'maxSizeBytes', 'type': 'str'}, + } + + def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, database_name: str, edition, service_objective_name, max_size_bytes: str, authentication_type="SQL", **kwargs) -> None: + super(ImportRequest, self).__init__(storage_key_type=storage_key_type, storage_key=storage_key, storage_uri=storage_uri, administrator_login=administrator_login, administrator_login_password=administrator_login_password, authentication_type=authentication_type, **kwargs) + self.database_name = database_name + self.edition = edition + self.service_objective_name = service_objective_name + self.max_size_bytes = max_size_bytes + + +class InstanceFailoverGroup(ProxyResource): + """An instance failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param read_write_endpoint: Required. Read-write endpoint of the failover + group instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.InstanceFailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.InstanceFailoverGroupReadOnlyEndpoint + :ivar replication_role: Local replication role of the failover group + instance. Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole + :ivar replication_state: Replication state of the failover group instance. + :vartype replication_state: str + :param partner_regions: Required. Partner region information for the + failover group. + :type partner_regions: list[~azure.mgmt.sql.models.PartnerRegionInfo] + :param managed_instance_pairs: Required. List of managed instance pairs in + the failover group. + :type managed_instance_pairs: + list[~azure.mgmt.sql.models.ManagedInstancePairInfo] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'read_write_endpoint': {'required': True}, + 'replication_role': {'readonly': True}, + 'replication_state': {'readonly': True}, + 'partner_regions': {'required': True}, + 'managed_instance_pairs': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'InstanceFailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'InstanceFailoverGroupReadOnlyEndpoint'}, + 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + 'partner_regions': {'key': 'properties.partnerRegions', 'type': '[PartnerRegionInfo]'}, + 'managed_instance_pairs': {'key': 'properties.managedInstancePairs', 'type': '[ManagedInstancePairInfo]'}, + } + + def __init__(self, *, read_write_endpoint, partner_regions, managed_instance_pairs, read_only_endpoint=None, **kwargs) -> None: + super(InstanceFailoverGroup, self).__init__(**kwargs) + self.read_write_endpoint = read_write_endpoint + self.read_only_endpoint = read_only_endpoint + self.replication_role = None + self.replication_state = None + self.partner_regions = partner_regions + self.managed_instance_pairs = managed_instance_pairs + + +class InstanceFailoverGroupReadOnlyEndpoint(Model): + """Read-only endpoint of the failover group instance. + + :param failover_policy: Failover policy of the read-only endpoint for the + failover group. Possible values include: 'Disabled', 'Enabled' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy + """ + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + } + + def __init__(self, *, failover_policy=None, **kwargs) -> None: + super(InstanceFailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) + self.failover_policy = failover_policy + + +class InstanceFailoverGroupReadWriteEndpoint(Model): + """Read-write endpoint of the failover group instance. + + All required parameters must be populated in order to send to Azure. + + :param failover_policy: Required. Failover policy of the read-write + endpoint for the failover group. If failoverPolicy is Automatic then + failoverWithDataLossGracePeriodMinutes is required. Possible values + include: 'Manual', 'Automatic' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy + :param failover_with_data_loss_grace_period_minutes: Grace period before + failover with data loss is attempted for the read-write endpoint. If + failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is + required. + :type failover_with_data_loss_grace_period_minutes: int + """ + + _validation = { + 'failover_policy': {'required': True}, + } + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, + } + + def __init__(self, *, failover_policy, failover_with_data_loss_grace_period_minutes: int=None, **kwargs) -> None: + super(InstanceFailoverGroupReadWriteEndpoint, self).__init__(**kwargs) + self.failover_policy = failover_policy + self.failover_with_data_loss_grace_period_minutes = failover_with_data_loss_grace_period_minutes + + +class InstancePool(TrackedResource): + """An Azure SQL instance pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param subnet_id: Required. Resource ID of the subnet to place this + instance pool in. + :type subnet_id: str + :param v_cores: Required. Count of vCores belonging to this instance pool. + :type v_cores: int + :param license_type: Required. The license type. Possible values are + 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' + (without SQL license price). Possible values include: 'LicenseIncluded', + 'BasePrice' + :type license_type: str or ~azure.mgmt.sql.models.InstancePoolLicenseType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'subnet_id': {'required': True}, + 'v_cores': {'required': True}, + 'license_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + } + + def __init__(self, *, location: str, subnet_id: str, v_cores: int, license_type, tags=None, sku=None, **kwargs) -> None: + super(InstancePool, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.subnet_id = subnet_id + self.v_cores = v_cores + self.license_type = license_type + + +class InstancePoolUpdate(Model): + """An update to an Instance pool. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(InstancePoolUpdate, self).__init__(**kwargs) + self.tags = tags + + +class Job(ProxyResource): + """A job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param description: User-defined description of the job. Default value: "" + . + :type description: str + :ivar version: The job version number. + :vartype version: int + :param schedule: Schedule properties of the job. + :type schedule: ~azure.mgmt.sql.models.JobSchedule + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'int'}, + 'schedule': {'key': 'properties.schedule', 'type': 'JobSchedule'}, + } + + def __init__(self, *, description: str="", schedule=None, **kwargs) -> None: + super(Job, self).__init__(**kwargs) + self.description = description + self.version = None + self.schedule = schedule + + +class JobAgent(TrackedResource): + """An Azure SQL job agent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param database_id: Required. Resource ID of the database to store job + metadata in. + :type database_id: str + :ivar state: The state of the job agent. Possible values include: + 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' + :vartype state: str or ~azure.mgmt.sql.models.JobAgentState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'database_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, *, location: str, database_id: str, tags=None, sku=None, **kwargs) -> None: + super(JobAgent, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.database_id = database_id + self.state = None + + +class JobAgentUpdate(Model): + """An update to an Azure SQL job agent. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(JobAgentUpdate, self).__init__(**kwargs) + self.tags = tags + + +class JobCredential(ProxyResource): + """A stored credential that can be used by a job to connect to target + databases. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param username: Required. The credential user name. + :type username: str + :param password: Required. The credential password. + :type password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'username': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'username': {'key': 'properties.username', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + } + + def __init__(self, *, username: str, password: str, **kwargs) -> None: + super(JobCredential, self).__init__(**kwargs) + self.username = username + self.password = password + + +class JobExecution(ProxyResource): + """An execution of a job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar job_version: The job version number. + :vartype job_version: int + :ivar step_name: The job step name. + :vartype step_name: str + :ivar step_id: The job step id. + :vartype step_id: int + :ivar job_execution_id: The unique identifier of the job execution. + :vartype job_execution_id: str + :ivar lifecycle: The detailed state of the job execution. Possible values + include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', + 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', + 'TimedOut', 'Canceled', 'Skipped' + :vartype lifecycle: str or ~azure.mgmt.sql.models.JobExecutionLifecycle + :ivar provisioning_state: The ARM provisioning state of the job execution. + Possible values include: 'Created', 'InProgress', 'Succeeded', 'Failed', + 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.sql.models.ProvisioningState + :ivar create_time: The time that the job execution was created. + :vartype create_time: datetime + :ivar start_time: The time that the job execution started. + :vartype start_time: datetime + :ivar end_time: The time that the job execution completed. + :vartype end_time: datetime + :param current_attempts: Number of times the job execution has been + attempted. + :type current_attempts: int + :ivar current_attempt_start_time: Start time of the current attempt. + :vartype current_attempt_start_time: datetime + :ivar last_message: The last status or error message. + :vartype last_message: str + :ivar target: The target that this execution is executed on. + :vartype target: ~azure.mgmt.sql.models.JobExecutionTarget + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'job_version': {'readonly': True}, + 'step_name': {'readonly': True}, + 'step_id': {'readonly': True}, + 'job_execution_id': {'readonly': True}, + 'lifecycle': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'create_time': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'current_attempt_start_time': {'readonly': True}, + 'last_message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'job_version': {'key': 'properties.jobVersion', 'type': 'int'}, + 'step_name': {'key': 'properties.stepName', 'type': 'str'}, + 'step_id': {'key': 'properties.stepId', 'type': 'int'}, + 'job_execution_id': {'key': 'properties.jobExecutionId', 'type': 'str'}, + 'lifecycle': {'key': 'properties.lifecycle', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'current_attempts': {'key': 'properties.currentAttempts', 'type': 'int'}, + 'current_attempt_start_time': {'key': 'properties.currentAttemptStartTime', 'type': 'iso-8601'}, + 'last_message': {'key': 'properties.lastMessage', 'type': 'str'}, + 'target': {'key': 'properties.target', 'type': 'JobExecutionTarget'}, + } + + def __init__(self, *, current_attempts: int=None, **kwargs) -> None: + super(JobExecution, self).__init__(**kwargs) + self.job_version = None + self.step_name = None + self.step_id = None + self.job_execution_id = None + self.lifecycle = None + self.provisioning_state = None + self.create_time = None + self.start_time = None + self.end_time = None + self.current_attempts = current_attempts + self.current_attempt_start_time = None + self.last_message = None + self.target = None + + +class JobExecutionTarget(Model): + """The target that a job execution is executed on. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of the target. Possible values include: + 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + :vartype type: str or ~azure.mgmt.sql.models.JobTargetType + :ivar server_name: The server name. + :vartype server_name: str + :ivar database_name: The database name. + :vartype database_name: str + """ + + _validation = { + 'type': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(JobExecutionTarget, self).__init__(**kwargs) + self.type = None + self.server_name = None + self.database_name = None + + +class JobSchedule(Model): + """Scheduling properties of a job. + + :param start_time: Schedule start time. Default value: + "0001-01-01T00:00:00Z" . + :type start_time: datetime + :param end_time: Schedule end time. Default value: "9999-12-31T11:59:59Z" + . + :type end_time: datetime + :param type: Schedule interval type. Possible values include: 'Once', + 'Recurring'. Default value: "Once" . + :type type: str or ~azure.mgmt.sql.models.JobScheduleType + :param enabled: Whether or not the schedule is enabled. + :type enabled: bool + :param interval: Value of the schedule's recurring interval, if the + schedule type is recurring. ISO8601 duration format. + :type interval: str + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'JobScheduleType'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'interval': {'key': 'interval', 'type': 'str'}, + } + + def __init__(self, *, start_time="0001-01-01T00:00:00Z", end_time="9999-12-31T11:59:59Z", type="Once", enabled: bool=None, interval: str=None, **kwargs) -> None: + super(JobSchedule, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.type = type + self.enabled = enabled + self.interval = interval + + +class JobStep(ProxyResource): + """A job step. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param step_id: The job step's index within the job. If not specified when + creating the job step, it will be created as the last step. If not + specified when updating the job step, the step id is not modified. + :type step_id: int + :param target_group: Required. The resource ID of the target group that + the job step will be executed on. + :type target_group: str + :param credential: Required. The resource ID of the job credential that + will be used to connect to the targets. + :type credential: str + :param action: Required. The action payload of the job step. + :type action: ~azure.mgmt.sql.models.JobStepAction + :param output: Output destination properties of the job step. + :type output: ~azure.mgmt.sql.models.JobStepOutput + :param execution_options: Execution options for the job step. + :type execution_options: ~azure.mgmt.sql.models.JobStepExecutionOptions + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'target_group': {'required': True}, + 'credential': {'required': True}, + 'action': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'step_id': {'key': 'properties.stepId', 'type': 'int'}, + 'target_group': {'key': 'properties.targetGroup', 'type': 'str'}, + 'credential': {'key': 'properties.credential', 'type': 'str'}, + 'action': {'key': 'properties.action', 'type': 'JobStepAction'}, + 'output': {'key': 'properties.output', 'type': 'JobStepOutput'}, + 'execution_options': {'key': 'properties.executionOptions', 'type': 'JobStepExecutionOptions'}, + } + + def __init__(self, *, target_group: str, credential: str, action, step_id: int=None, output=None, execution_options=None, **kwargs) -> None: + super(JobStep, self).__init__(**kwargs) + self.step_id = step_id + self.target_group = target_group + self.credential = credential + self.action = action + self.output = output + self.execution_options = execution_options + + +class JobStepAction(Model): + """The action to be executed by a job step. + + All required parameters must be populated in order to send to Azure. + + :param type: Type of action being executed by the job step. Possible + values include: 'TSql'. Default value: "TSql" . + :type type: str or ~azure.mgmt.sql.models.JobStepActionType + :param source: The source of the action to execute. Possible values + include: 'Inline'. Default value: "Inline" . + :type source: str or ~azure.mgmt.sql.models.JobStepActionSource + :param value: Required. The action value, for example the text of the + T-SQL script to execute. + :type value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, value: str, type="TSql", source="Inline", **kwargs) -> None: + super(JobStepAction, self).__init__(**kwargs) + self.type = type + self.source = source + self.value = value + + +class JobStepExecutionOptions(Model): + """The execution options of a job step. + + :param timeout_seconds: Execution timeout for the job step. Default value: + 43200 . + :type timeout_seconds: int + :param retry_attempts: Maximum number of times the job step will be + reattempted if the first attempt fails. Default value: 10 . + :type retry_attempts: int + :param initial_retry_interval_seconds: Initial delay between retries for + job step execution. Default value: 1 . + :type initial_retry_interval_seconds: int + :param maximum_retry_interval_seconds: The maximum amount of time to wait + between retries for job step execution. Default value: 120 . + :type maximum_retry_interval_seconds: int + :param retry_interval_backoff_multiplier: The backoff multiplier for the + time between retries. Default value: 2 . + :type retry_interval_backoff_multiplier: float + """ + + _attribute_map = { + 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, + 'retry_attempts': {'key': 'retryAttempts', 'type': 'int'}, + 'initial_retry_interval_seconds': {'key': 'initialRetryIntervalSeconds', 'type': 'int'}, + 'maximum_retry_interval_seconds': {'key': 'maximumRetryIntervalSeconds', 'type': 'int'}, + 'retry_interval_backoff_multiplier': {'key': 'retryIntervalBackoffMultiplier', 'type': 'float'}, + } + + def __init__(self, *, timeout_seconds: int=43200, retry_attempts: int=10, initial_retry_interval_seconds: int=1, maximum_retry_interval_seconds: int=120, retry_interval_backoff_multiplier: float=2, **kwargs) -> None: + super(JobStepExecutionOptions, self).__init__(**kwargs) + self.timeout_seconds = timeout_seconds + self.retry_attempts = retry_attempts + self.initial_retry_interval_seconds = initial_retry_interval_seconds + self.maximum_retry_interval_seconds = maximum_retry_interval_seconds + self.retry_interval_backoff_multiplier = retry_interval_backoff_multiplier + + +class JobStepOutput(Model): + """The output configuration of a job step. + + All required parameters must be populated in order to send to Azure. + + :param type: The output destination type. Possible values include: + 'SqlDatabase'. Default value: "SqlDatabase" . + :type type: str or ~azure.mgmt.sql.models.JobStepOutputType + :param subscription_id: The output destination subscription id. + :type subscription_id: str + :param resource_group_name: The output destination resource group. + :type resource_group_name: str + :param server_name: Required. The output destination server name. + :type server_name: str + :param database_name: Required. The output destination database. + :type database_name: str + :param schema_name: The output destination schema. Default value: "dbo" . + :type schema_name: str + :param table_name: Required. The output destination table. + :type table_name: str + :param credential: Required. The resource ID of the credential to use to + connect to the output destination. + :type credential: str + """ + + _validation = { + 'server_name': {'required': True}, + 'database_name': {'required': True}, + 'table_name': {'required': True}, + 'credential': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'credential': {'key': 'credential', 'type': 'str'}, + } + + def __init__(self, *, server_name: str, database_name: str, table_name: str, credential: str, type="SqlDatabase", subscription_id: str=None, resource_group_name: str=None, schema_name: str="dbo", **kwargs) -> None: + super(JobStepOutput, self).__init__(**kwargs) + self.type = type + self.subscription_id = subscription_id + self.resource_group_name = resource_group_name + self.server_name = server_name + self.database_name = database_name + self.schema_name = schema_name + self.table_name = table_name + self.credential = credential + + +class JobTarget(Model): + """A job target, for example a specific database or a container of databases + that is evaluated during job execution. + + All required parameters must be populated in order to send to Azure. + + :param membership_type: Whether the target is included or excluded from + the group. Possible values include: 'Include', 'Exclude'. Default value: + "Include" . + :type membership_type: str or + ~azure.mgmt.sql.models.JobTargetGroupMembershipType + :param type: Required. The target type. Possible values include: + 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + :type type: str or ~azure.mgmt.sql.models.JobTargetType + :param server_name: The target server name. + :type server_name: str + :param database_name: The target database name. + :type database_name: str + :param elastic_pool_name: The target elastic pool name. + :type elastic_pool_name: str + :param shard_map_name: The target shard map. + :type shard_map_name: str + :param refresh_credential: The resource ID of the credential that is used + during job execution to connect to the target and determine the list of + databases inside the target. + :type refresh_credential: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'membership_type': {'key': 'membershipType', 'type': 'JobTargetGroupMembershipType'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'elastic_pool_name': {'key': 'elasticPoolName', 'type': 'str'}, + 'shard_map_name': {'key': 'shardMapName', 'type': 'str'}, + 'refresh_credential': {'key': 'refreshCredential', 'type': 'str'}, + } + + def __init__(self, *, type, membership_type="Include", server_name: str=None, database_name: str=None, elastic_pool_name: str=None, shard_map_name: str=None, refresh_credential: str=None, **kwargs) -> None: + super(JobTarget, self).__init__(**kwargs) + self.membership_type = membership_type + self.type = type + self.server_name = server_name + self.database_name = database_name + self.elastic_pool_name = elastic_pool_name + self.shard_map_name = shard_map_name + self.refresh_credential = refresh_credential + + +class JobTargetGroup(ProxyResource): + """A group of job targets. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param members: Required. Members of the target group. + :type members: list[~azure.mgmt.sql.models.JobTarget] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'members': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'members': {'key': 'properties.members', 'type': '[JobTarget]'}, + } + + def __init__(self, *, members, **kwargs) -> None: + super(JobTargetGroup, self).__init__(**kwargs) + self.members = members + + +class JobVersion(ProxyResource): + """A job version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(JobVersion, self).__init__(**kwargs) + + +class LicenseTypeCapability(Model): + """The license type capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: License type identifier. + :vartype name: str + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(LicenseTypeCapability, self).__init__(**kwargs) + self.name = None + self.status = None + self.reason = reason + + +class LocationCapabilities(Model): + """The location capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The location name. + :vartype name: str + :ivar supported_server_versions: The list of supported server versions. + :vartype supported_server_versions: + list[~azure.mgmt.sql.models.ServerVersionCapability] + :ivar supported_managed_instance_versions: The list of supported managed + instance versions. + :vartype supported_managed_instance_versions: + list[~azure.mgmt.sql.models.ManagedInstanceVersionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_server_versions': {'readonly': True}, + 'supported_managed_instance_versions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_server_versions': {'key': 'supportedServerVersions', 'type': '[ServerVersionCapability]'}, + 'supported_managed_instance_versions': {'key': 'supportedManagedInstanceVersions', 'type': '[ManagedInstanceVersionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(LocationCapabilities, self).__init__(**kwargs) + self.name = None + self.supported_server_versions = None + self.supported_managed_instance_versions = None + self.status = None + self.reason = reason + + +class LogSizeCapability(Model): + """The log size capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The log size limit (see 'unit' for the units). + :vartype limit: int + :ivar unit: The units that the limit is expressed in. Possible values + include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes', 'Percent' + :vartype unit: str or ~azure.mgmt.sql.models.LogSizeUnit + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'int'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(LogSizeCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + + +class LongTermRetentionBackup(ProxyResource): + """A long term retention backup. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar server_name: The server name that the backup database belong to. + :vartype server_name: str + :ivar server_create_time: The create time of the server. + :vartype server_create_time: datetime + :ivar database_name: The name of the database the backup belong to + :vartype database_name: str + :ivar database_deletion_time: The delete time of the database + :vartype database_deletion_time: datetime + :ivar backup_time: The time the backup was taken + :vartype backup_time: datetime + :ivar backup_expiration_time: The time the long term retention backup will + expire. + :vartype backup_expiration_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'server_name': {'readonly': True}, + 'server_create_time': {'readonly': True}, + 'database_name': {'readonly': True}, + 'database_deletion_time': {'readonly': True}, + 'backup_time': {'readonly': True}, + 'backup_expiration_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'server_create_time': {'key': 'properties.serverCreateTime', 'type': 'iso-8601'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'database_deletion_time': {'key': 'properties.databaseDeletionTime', 'type': 'iso-8601'}, + 'backup_time': {'key': 'properties.backupTime', 'type': 'iso-8601'}, + 'backup_expiration_time': {'key': 'properties.backupExpirationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(LongTermRetentionBackup, self).__init__(**kwargs) + self.server_name = None + self.server_create_time = None + self.database_name = None + self.database_deletion_time = None + self.backup_time = None + self.backup_expiration_time = None + + +class ManagedBackupShortTermRetentionPolicy(ProxyResource): + """A short term retention policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param retention_days: The backup retention period in days. This is how + many days Point-in-Time Restore will be supported. + :type retention_days: int + """ + + _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'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + } + + def __init__(self, *, retention_days: int=None, **kwargs) -> None: + super(ManagedBackupShortTermRetentionPolicy, self).__init__(**kwargs) + self.retention_days = retention_days + + +class ManagedDatabase(TrackedResource): + """A managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param collation: Collation of the managed database. + :type collation: str + :ivar status: Status of the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' + :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus + :ivar creation_date: Creation date of the database. + :vartype creation_date: datetime + :ivar earliest_restore_point: Earliest restore point in time for point in + time restore. + :vartype earliest_restore_point: datetime + :param restore_point_in_time: Conditional. If createMode is + PointInTimeRestore, this value is required. Specifies the point in time + (ISO8601 format) of the source database that will be restored to create + the new database. + :type restore_point_in_time: datetime + :ivar default_secondary_location: Geo paired region. + :vartype default_secondary_location: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param create_mode: Managed database create mode. PointInTimeRestore: + Create a database by restoring a point in time backup of an existing + database. SourceDatabaseName, SourceManagedInstanceName and PointInTime + must be specified. RestoreExternalBackup: Create a database by restoring + from external backup files. Collation, StorageContainerUri and + StorageContainerSasToken must be specified. Recovery: Creates a database + by restoring a geo-replicated backup. RecoverableDatabaseId must be + specified as the recoverable database resource ID to restore. Possible + values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', + 'Recovery' + :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode + :param storage_container_uri: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the uri of the + storage container where backups for this restore are stored. + :type storage_container_uri: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :param restorable_dropped_database_id: The restorable dropped database + resource id to restore when creating this database. + :type restorable_dropped_database_id: str + :param storage_container_sas_token: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the storage + container sas token. + :type storage_container_sas_token: str + :ivar failover_group_id: Instance Failover Group resource identifier that + this managed database belongs to. + :vartype failover_group_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'status': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'earliest_restore_point': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, restorable_dropped_database_id: str=None, storage_container_sas_token: str=None, recoverable_database_id: str=None, **kwargs) -> None: + super(ManagedDatabase, self).__init__(location=location, tags=tags, **kwargs) + self.collation = collation + self.status = None + self.creation_date = None + self.earliest_restore_point = None + self.restore_point_in_time = restore_point_in_time + self.default_secondary_location = None + self.catalog_collation = catalog_collation + self.create_mode = create_mode + self.storage_container_uri = storage_container_uri + self.source_database_id = source_database_id + self.restorable_dropped_database_id = restorable_dropped_database_id + self.storage_container_sas_token = storage_container_sas_token + self.failover_group_id = None + self.recoverable_database_id = recoverable_database_id + + +class ManagedDatabaseSecurityAlertPolicy(ProxyResource): + """A managed database security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: + super(ManagedDatabaseSecurityAlertPolicy, self).__init__(**kwargs) + self.state = state + self.disabled_alerts = disabled_alerts + self.email_addresses = email_addresses + self.email_account_admins = email_account_admins + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.creation_time = None + + +class ManagedDatabaseUpdate(Model): + """An managed database update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param collation: Collation of the managed database. + :type collation: str + :ivar status: Status of the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' + :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus + :ivar creation_date: Creation date of the database. + :vartype creation_date: datetime + :ivar earliest_restore_point: Earliest restore point in time for point in + time restore. + :vartype earliest_restore_point: datetime + :param restore_point_in_time: Conditional. If createMode is + PointInTimeRestore, this value is required. Specifies the point in time + (ISO8601 format) of the source database that will be restored to create + the new database. + :type restore_point_in_time: datetime + :ivar default_secondary_location: Geo paired region. + :vartype default_secondary_location: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param create_mode: Managed database create mode. PointInTimeRestore: + Create a database by restoring a point in time backup of an existing + database. SourceDatabaseName, SourceManagedInstanceName and PointInTime + must be specified. RestoreExternalBackup: Create a database by restoring + from external backup files. Collation, StorageContainerUri and + StorageContainerSasToken must be specified. Recovery: Creates a database + by restoring a geo-replicated backup. RecoverableDatabaseId must be + specified as the recoverable database resource ID to restore. Possible + values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', + 'Recovery' + :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode + :param storage_container_uri: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the uri of the + storage container where backups for this restore are stored. + :type storage_container_uri: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :param restorable_dropped_database_id: The restorable dropped database + resource id to restore when creating this database. + :type restorable_dropped_database_id: str + :param storage_container_sas_token: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the storage + container sas token. + :type storage_container_sas_token: str + :ivar failover_group_id: Instance Failover Group resource identifier that + this managed database belongs to. + :vartype failover_group_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'status': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'earliest_restore_point': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + } + + _attribute_map = { + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, + 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, restorable_dropped_database_id: str=None, storage_container_sas_token: str=None, recoverable_database_id: str=None, tags=None, **kwargs) -> None: + super(ManagedDatabaseUpdate, self).__init__(**kwargs) + self.collation = collation + self.status = None + self.creation_date = None + self.earliest_restore_point = None + self.restore_point_in_time = restore_point_in_time + self.default_secondary_location = None + self.catalog_collation = catalog_collation + self.create_mode = create_mode + self.storage_container_uri = storage_container_uri + self.source_database_id = source_database_id + self.restorable_dropped_database_id = restorable_dropped_database_id + self.storage_container_sas_token = storage_container_sas_token + self.failover_group_id = None + self.recoverable_database_id = recoverable_database_id + self.tags = tags + + +class ManagedInstance(TrackedResource): + """An Azure SQL managed instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param identity: The Azure Active Directory identity of the managed + instance. + :type identity: ~azure.mgmt.sql.models.ResourceIdentity + :param sku: Managed instance SKU. Allowed values for sku.name: GP_Gen4, + GP_Gen5, BC_Gen4, BC_Gen5 + :type sku: ~azure.mgmt.sql.models.Sku + :param managed_instance_create_mode: Specifies the mode of database + creation. + Default: Regular instance creation. + Restore: Creates an instance by restoring a set of backups to specific + point in time. RestorePointInTime and SourceManagedInstanceId must be + specified. Possible values include: 'Default', 'PointInTimeRestore' + :type managed_instance_create_mode: str or + ~azure.mgmt.sql.models.ManagedServerCreateMode + :ivar fully_qualified_domain_name: The fully qualified domain name of the + managed instance. + :vartype fully_qualified_domain_name: str + :param administrator_login: Administrator username for the managed + instance. Can only be specified when the managed instance is being created + (and is required for creation). + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for managed instance creation). + :type administrator_login_password: str + :param subnet_id: Subnet resource ID for the managed instance. + :type subnet_id: str + :ivar state: The state of the managed instance. + :vartype state: str + :param license_type: The license type. Possible values are + 'LicenseIncluded' (regular price inclusive of a new SQL license) and + 'BasePrice' (discounted AHB price for bringing your own SQL licenses). + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or + ~azure.mgmt.sql.models.ManagedInstanceLicenseType + :param v_cores: The number of vCores. Allowed values: 8, 16, 24, 32, 40, + 64, 80. + :type v_cores: int + :param storage_size_in_gb: Storage size in GB. Minimum value: 32. Maximum + value: 8192. Increments of 32 GB allowed only. + :type storage_size_in_gb: int + :param collation: Collation of the managed instance. + :type collation: str + :ivar dns_zone: The Dns Zone that the managed instance is in. + :vartype dns_zone: str + :param dns_zone_partner: The resource id of another managed instance whose + DNS zone this managed instance will share after creation. + :type dns_zone_partner: str + :param public_data_endpoint_enabled: Whether or not the public data + endpoint is enabled. + :type public_data_endpoint_enabled: bool + :param source_managed_instance_id: The resource identifier of the source + managed instance associated with create operation of this instance. + :type source_managed_instance_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param proxy_override: Connection type used for connecting to the + instance. Possible values include: 'Proxy', 'Redirect', 'Default' + :type proxy_override: str or + ~azure.mgmt.sql.models.ManagedInstanceProxyOverride + :param timezone_id: Id of the timezone. Allowed values are timezones + supported by Windows. + Windows keeps details on supported timezones, including the id, in + registry under + KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time + Zones. + You can get those registry values via SQL Server by querying SELECT name + AS timezone_id FROM sys.time_zone_info. + List of Ids can also be obtained by executing + [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + An example of valid timezone id is "Pacific Standard Time" or "W. Europe + Standard Time". + :type timezone_id: str + :param instance_pool_id: The Id of the instance pool this managed server + belongs to. + :type instance_pool_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'fully_qualified_domain_name': {'readonly': True}, + 'state': {'readonly': True}, + 'dns_zone': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, + 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, + 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, + 'source_managed_instance_id': {'key': 'properties.sourceManagedInstanceId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, + 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, + 'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, identity=None, sku=None, managed_instance_create_mode=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type=None, v_cores: int=None, storage_size_in_gb: int=None, collation: str=None, dns_zone_partner: str=None, public_data_endpoint_enabled: bool=None, source_managed_instance_id: str=None, restore_point_in_time=None, proxy_override=None, timezone_id: str=None, instance_pool_id: str=None, **kwargs) -> None: + super(ManagedInstance, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity + self.sku = sku + self.managed_instance_create_mode = managed_instance_create_mode + self.fully_qualified_domain_name = None + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.subnet_id = subnet_id + self.state = None + self.license_type = license_type + self.v_cores = v_cores + self.storage_size_in_gb = storage_size_in_gb + self.collation = collation + self.dns_zone = None + self.dns_zone_partner = dns_zone_partner + self.public_data_endpoint_enabled = public_data_endpoint_enabled + self.source_managed_instance_id = source_managed_instance_id + self.restore_point_in_time = restore_point_in_time + self.proxy_override = proxy_override + self.timezone_id = timezone_id + self.instance_pool_id = instance_pool_id + + +class ManagedInstanceEditionCapability(Model): + """The managed server capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The managed server version name. + :vartype name: str + :ivar supported_families: The supported families. + :vartype supported_families: + list[~azure.mgmt.sql.models.ManagedInstanceFamilyCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_families': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_families': {'key': 'supportedFamilies', 'type': '[ManagedInstanceFamilyCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ManagedInstanceEditionCapability, self).__init__(**kwargs) + self.name = None + self.supported_families = None + self.status = None + self.reason = reason + + +class ManagedInstanceEncryptionProtector(ProxyResource): + """The managed instance encryption protector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :vartype kind: str + :param server_key_name: The name of the managed instance key. + :type server_key_name: str + :param server_key_type: Required. The encryption protector type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :ivar uri: The URI of the server key. + :vartype uri: str + :ivar thumbprint: Thumbprint of the server key. + :vartype thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'server_key_type': {'required': True}, + 'uri': {'readonly': True}, + 'thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, *, server_key_type, server_key_name: str=None, **kwargs) -> None: + super(ManagedInstanceEncryptionProtector, self).__init__(**kwargs) + self.kind = None + self.server_key_name = server_key_name + self.server_key_type = server_key_type + self.uri = None + self.thumbprint = None + + +class ManagedInstanceFamilyCapability(Model): + """The managed server family capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Family name. + :vartype name: str + :ivar sku: SKU name. + :vartype sku: str + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar supported_vcores_values: List of supported virtual cores values. + :vartype supported_vcores_values: + list[~azure.mgmt.sql.models.ManagedInstanceVcoresCapability] + :ivar included_max_size: Included size. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar supported_storage_sizes: Storage size ranges. + :vartype supported_storage_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'supported_vcores_values': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'supported_storage_sizes': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'supported_vcores_values': {'key': 'supportedVcoresValues', 'type': '[ManagedInstanceVcoresCapability]'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'supported_storage_sizes': {'key': 'supportedStorageSizes', 'type': '[MaxSizeRangeCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ManagedInstanceFamilyCapability, self).__init__(**kwargs) + self.name = None + self.sku = None + self.supported_license_types = None + self.supported_vcores_values = None + self.included_max_size = None + self.supported_storage_sizes = None + self.status = None + self.reason = reason + + +class ManagedInstanceKey(ProxyResource): + """A managed instance key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :vartype kind: str + :param server_key_type: Required. The key type like 'ServiceManaged', + 'AzureKeyVault'. Possible values include: 'ServiceManaged', + 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :param uri: The URI of the key. If the ServerKeyType is AzureKeyVault, + then the URI is required. + :type uri: str + :ivar thumbprint: Thumbprint of the key. + :vartype thumbprint: str + :ivar creation_date: The key creation date. + :vartype creation_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'server_key_type': {'required': True}, + 'thumbprint': {'readonly': True}, + 'creation_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, server_key_type, uri: str=None, **kwargs) -> None: + super(ManagedInstanceKey, self).__init__(**kwargs) + self.kind = None + self.server_key_type = server_key_type + self.uri = uri + self.thumbprint = None + self.creation_date = None + + +class ManagedInstancePairInfo(Model): + """Pairs of Managed Instances in the failover group. + + :param primary_managed_instance_id: Id of Primary Managed Instance in + pair. + :type primary_managed_instance_id: str + :param partner_managed_instance_id: Id of Partner Managed Instance in + pair. + :type partner_managed_instance_id: str + """ + + _attribute_map = { + 'primary_managed_instance_id': {'key': 'primaryManagedInstanceId', 'type': 'str'}, + 'partner_managed_instance_id': {'key': 'partnerManagedInstanceId', 'type': 'str'}, + } + + def __init__(self, *, primary_managed_instance_id: str=None, partner_managed_instance_id: str=None, **kwargs) -> None: + super(ManagedInstancePairInfo, self).__init__(**kwargs) + self.primary_managed_instance_id = primary_managed_instance_id + self.partner_managed_instance_id = partner_managed_instance_id + + +class ManagedInstanceUpdate(Model): + """An update request for an Azure SQL Database managed instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param sku: Managed instance sku + :type sku: ~azure.mgmt.sql.models.Sku + :param managed_instance_create_mode: Specifies the mode of database + creation. + Default: Regular instance creation. + Restore: Creates an instance by restoring a set of backups to specific + point in time. RestorePointInTime and SourceManagedInstanceId must be + specified. Possible values include: 'Default', 'PointInTimeRestore' + :type managed_instance_create_mode: str or + ~azure.mgmt.sql.models.ManagedServerCreateMode + :ivar fully_qualified_domain_name: The fully qualified domain name of the + managed instance. + :vartype fully_qualified_domain_name: str + :param administrator_login: Administrator username for the managed + instance. Can only be specified when the managed instance is being created + (and is required for creation). + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for managed instance creation). + :type administrator_login_password: str + :param subnet_id: Subnet resource ID for the managed instance. + :type subnet_id: str + :ivar state: The state of the managed instance. + :vartype state: str + :param license_type: The license type. Possible values are + 'LicenseIncluded' (regular price inclusive of a new SQL license) and + 'BasePrice' (discounted AHB price for bringing your own SQL licenses). + Possible values include: 'LicenseIncluded', 'BasePrice' + :type license_type: str or + ~azure.mgmt.sql.models.ManagedInstanceLicenseType + :param v_cores: The number of vCores. Allowed values: 8, 16, 24, 32, 40, + 64, 80. + :type v_cores: int + :param storage_size_in_gb: Storage size in GB. Minimum value: 32. Maximum + value: 8192. Increments of 32 GB allowed only. + :type storage_size_in_gb: int + :param collation: Collation of the managed instance. + :type collation: str + :ivar dns_zone: The Dns Zone that the managed instance is in. + :vartype dns_zone: str + :param dns_zone_partner: The resource id of another managed instance whose + DNS zone this managed instance will share after creation. + :type dns_zone_partner: str + :param public_data_endpoint_enabled: Whether or not the public data + endpoint is enabled. + :type public_data_endpoint_enabled: bool + :param source_managed_instance_id: The resource identifier of the source + managed instance associated with create operation of this instance. + :type source_managed_instance_id: str + :param restore_point_in_time: Specifies the point in time (ISO8601 format) + of the source database that will be restored to create the new database. + :type restore_point_in_time: datetime + :param proxy_override: Connection type used for connecting to the + instance. Possible values include: 'Proxy', 'Redirect', 'Default' + :type proxy_override: str or + ~azure.mgmt.sql.models.ManagedInstanceProxyOverride + :param timezone_id: Id of the timezone. Allowed values are timezones + supported by Windows. + Windows keeps details on supported timezones, including the id, in + registry under + KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time + Zones. + You can get those registry values via SQL Server by querying SELECT name + AS timezone_id FROM sys.time_zone_info. + List of Ids can also be obtained by executing + [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + An example of valid timezone id is "Pacific Standard Time" or "W. Europe + Standard Time". + :type timezone_id: str + :param instance_pool_id: The Id of the instance pool this managed server + belongs to. + :type instance_pool_id: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'fully_qualified_domain_name': {'readonly': True}, + 'state': {'readonly': True}, + 'dns_zone': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, + 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, + 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, + 'source_managed_instance_id': {'key': 'properties.sourceManagedInstanceId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, + 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, + 'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, sku=None, managed_instance_create_mode=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type=None, v_cores: int=None, storage_size_in_gb: int=None, collation: str=None, dns_zone_partner: str=None, public_data_endpoint_enabled: bool=None, source_managed_instance_id: str=None, restore_point_in_time=None, proxy_override=None, timezone_id: str=None, instance_pool_id: str=None, tags=None, **kwargs) -> None: + super(ManagedInstanceUpdate, self).__init__(**kwargs) + self.sku = sku + self.managed_instance_create_mode = managed_instance_create_mode + self.fully_qualified_domain_name = None + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.subnet_id = subnet_id + self.state = None + self.license_type = license_type + self.v_cores = v_cores + self.storage_size_in_gb = storage_size_in_gb + self.collation = collation + self.dns_zone = None + self.dns_zone_partner = dns_zone_partner + self.public_data_endpoint_enabled = public_data_endpoint_enabled + self.source_managed_instance_id = source_managed_instance_id + self.restore_point_in_time = restore_point_in_time + self.proxy_override = proxy_override + self.timezone_id = timezone_id + self.instance_pool_id = instance_pool_id + self.tags = tags + + +class ManagedInstanceVcoresCapability(Model): + """The managed instance virtual cores capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The virtual cores identifier. + :vartype name: str + :ivar value: The virtual cores value. + :vartype value: int + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'int'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ManagedInstanceVcoresCapability, self).__init__(**kwargs) + self.name = None + self.value = None + self.status = None + self.reason = reason + + +class ManagedInstanceVersionCapability(Model): + """The managed instance capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The server version name. + :vartype name: str + :ivar supported_editions: The list of supported managed instance editions. + :vartype supported_editions: + list[~azure.mgmt.sql.models.ManagedInstanceEditionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_editions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_editions': {'key': 'supportedEditions', 'type': '[ManagedInstanceEditionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ManagedInstanceVersionCapability, self).__init__(**kwargs) + self.name = None + self.supported_editions = None + self.status = None + self.reason = reason + + +class ManagedInstanceVulnerabilityAssessment(ProxyResource): + """A managed instance vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: Required. A blob storage container path to + hold the scan results (e.g. + https://myStorage.blob.core.windows.net/VaScans/). + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_container_path': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, *, storage_container_path: str, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: + super(ManagedInstanceVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = storage_container_path + self.storage_container_sas_key = storage_container_sas_key + self.storage_account_access_key = storage_account_access_key + self.recurring_scans = recurring_scans + + +class ManagedServerSecurityAlertPolicy(ProxyResource): + """A managed server security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: + super(ManagedServerSecurityAlertPolicy, self).__init__(**kwargs) + self.state = state + self.disabled_alerts = disabled_alerts + self.email_addresses = email_addresses + self.email_account_admins = email_account_admins + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.creation_time = None + + +class MaxSizeCapability(Model): + """The maximum size capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar limit: The maximum size limit (see 'unit' for the units). + :vartype limit: int + :ivar unit: The units that the limit is expressed in. Possible values + include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' + :vartype unit: str or ~azure.mgmt.sql.models.MaxSizeUnit + """ + + _validation = { + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'limit': {'key': 'limit', 'type': 'int'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MaxSizeCapability, self).__init__(**kwargs) + self.limit = None + self.unit = None + + +class MaxSizeRangeCapability(Model): + """The maximum size range capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar min_value: Minimum value. + :vartype min_value: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar max_value: Maximum value. + :vartype max_value: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar scale_size: Scale/step size for discrete values between the minimum + value and the maximum value. + :vartype scale_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar log_size: Size of transaction log. + :vartype log_size: ~azure.mgmt.sql.models.LogSizeCapability + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'min_value': {'readonly': True}, + 'max_value': {'readonly': True}, + 'scale_size': {'readonly': True}, + 'log_size': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'min_value': {'key': 'minValue', 'type': 'MaxSizeCapability'}, + 'max_value': {'key': 'maxValue', 'type': 'MaxSizeCapability'}, + 'scale_size': {'key': 'scaleSize', 'type': 'MaxSizeCapability'}, + 'log_size': {'key': 'logSize', 'type': 'LogSizeCapability'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(MaxSizeRangeCapability, self).__init__(**kwargs) + self.min_value = None + self.max_value = None + self.scale_size = None + self.log_size = None + self.status = None + self.reason = reason + + +class Metric(Model): + """Database metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar start_time: The start time for the metric (ISO-8601 format). + :vartype start_time: datetime + :ivar end_time: The end time for the metric (ISO-8601 format). + :vartype end_time: datetime + :ivar time_grain: The time step to be used to summarize the metric values. + :vartype time_grain: str + :ivar unit: The unit of the metric. Possible values include: 'count', + 'bytes', 'seconds', 'percent', 'countPerSecond', 'bytesPerSecond' + :vartype unit: str or ~azure.mgmt.sql.models.UnitType + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.sql.models.MetricName + :ivar metric_values: The metric values for the specified time window and + timestep. + :vartype metric_values: list[~azure.mgmt.sql.models.MetricValue] + """ + + _validation = { + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'time_grain': {'readonly': True}, + 'unit': {'readonly': True}, + 'name': {'readonly': True}, + 'metric_values': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'MetricName'}, + 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, + } + + def __init__(self, **kwargs) -> None: + super(Metric, self).__init__(**kwargs) + self.start_time = None + self.end_time = None + self.time_grain = None + self.unit = None + self.name = None + self.metric_values = None + + +class MetricAvailability(Model): + """A metric availability value. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar retention: The length of retention for the database metric. + :vartype retention: str + :ivar time_grain: The granularity of the database metric. + :vartype time_grain: str + """ + + _validation = { + 'retention': {'readonly': True}, + 'time_grain': {'readonly': True}, + } + + _attribute_map = { + 'retention': {'key': 'retention', 'type': 'str'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MetricAvailability, self).__init__(**kwargs) + self.retention = None + self.time_grain = None + + +class MetricDefinition(Model): + """A database metric definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.sql.models.MetricName + :ivar primary_aggregation_type: The primary aggregation type defining how + metric values are displayed. Possible values include: 'None', 'Average', + 'Count', 'Minimum', 'Maximum', 'Total' + :vartype primary_aggregation_type: str or + ~azure.mgmt.sql.models.PrimaryAggregationType + :ivar resource_uri: The resource uri of the database. + :vartype resource_uri: str + :ivar unit: The unit of the metric. Possible values include: 'Count', + 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' + :vartype unit: str or ~azure.mgmt.sql.models.UnitDefinitionType + :ivar metric_availabilities: The list of database metric availabilities + for the metric. + :vartype metric_availabilities: + list[~azure.mgmt.sql.models.MetricAvailability] + """ + + _validation = { + 'name': {'readonly': True}, + 'primary_aggregation_type': {'readonly': True}, + 'resource_uri': {'readonly': True}, + 'unit': {'readonly': True}, + 'metric_availabilities': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'MetricName'}, + 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, + } + + def __init__(self, **kwargs) -> None: + super(MetricDefinition, self).__init__(**kwargs) + self.name = None + self.primary_aggregation_type = None + self.resource_uri = None + self.unit = None + self.metric_availabilities = None + + +class MetricName(Model): + """A database metric name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The name of the database metric. + :vartype value: str + :ivar localized_value: The friendly name of the database metric. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MetricName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class MetricValue(Model): + """Represents database metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar count: The number of values for the metric. + :vartype count: float + :ivar average: The average value of the metric. + :vartype average: float + :ivar maximum: The max value of the metric. + :vartype maximum: float + :ivar minimum: The min value of the metric. + :vartype minimum: float + :ivar timestamp: The metric timestamp (ISO-8601 format). + :vartype timestamp: datetime + :ivar total: The total value of the metric. + :vartype total: float + """ + + _validation = { + 'count': {'readonly': True}, + 'average': {'readonly': True}, + 'maximum': {'readonly': True}, + 'minimum': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'total': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'float'}, + 'average': {'key': 'average', 'type': 'float'}, + 'maximum': {'key': 'maximum', 'type': 'float'}, + 'minimum': {'key': 'minimum', 'type': 'float'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'total': {'key': 'total', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(MetricValue, self).__init__(**kwargs) + self.count = None + self.average = None + self.maximum = None + self.minimum = None + self.timestamp = None + self.total = None + + +class Name(Model): + """ARM Usage Name. + + :param value: Usage name value + :type value: str + :param localized_value: Usage name localized value. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: + super(Name, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class Operation(Model): + """SQL REST API operation definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the operation being performed on this particular + object. + :vartype name: str + :ivar display: The localized display information for this particular + operation / action. + :vartype display: ~azure.mgmt.sql.models.OperationDisplay + :ivar origin: The intended executor of the operation. Possible values + include: 'user', 'system' + :vartype origin: str or ~azure.mgmt.sql.models.OperationOrigin + :ivar properties: Additional descriptions for the operation. + :vartype properties: dict[str, object] + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + 'origin': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + } + + def __init__(self, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + self.origin = None + self.properties = None + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The localized friendly form of the resource provider name. + :vartype provider: str + :ivar resource: The localized friendly form of the resource type related + to this action/operation. + :vartype resource: str + :ivar operation: The localized friendly name for the operation. + :vartype operation: str + :ivar description: The localized friendly description for the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class OperationImpact(Model): + """The impact of an operation, both in absolute and relative terms. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the impact dimension. + :vartype name: str + :ivar unit: The unit in which estimated impact to dimension is measured. + :vartype unit: str + :ivar change_value_absolute: The absolute impact to dimension. + :vartype change_value_absolute: float + :ivar change_value_relative: The relative impact to dimension (null if not + applicable) + :vartype change_value_relative: float + """ + + _validation = { + 'name': {'readonly': True}, + 'unit': {'readonly': True}, + 'change_value_absolute': {'readonly': True}, + 'change_value_relative': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'change_value_absolute': {'key': 'changeValueAbsolute', 'type': 'float'}, + 'change_value_relative': {'key': 'changeValueRelative', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationImpact, self).__init__(**kwargs) + self.name = None + self.unit = None + self.change_value_absolute = None + self.change_value_relative = None + + +class PartnerInfo(Model): + """Partner server information for the failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource identifier of the partner server. + :type id: str + :ivar location: Geo location of the partner server. + :vartype location: str + :ivar replication_role: Replication role of the partner server. Possible + values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.FailoverGroupReplicationRole + """ + + _validation = { + 'id': {'required': True}, + 'location': {'readonly': True}, + 'replication_role': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'replication_role': {'key': 'replicationRole', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(PartnerInfo, self).__init__(**kwargs) + self.id = id + self.location = None + self.replication_role = None + + +class PartnerRegionInfo(Model): + """Partner region information for the failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param location: Geo location of the partner managed instances. + :type location: str + :ivar replication_role: Replication role of the partner managed instances. + Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole + """ + + _validation = { + 'replication_role': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'replication_role': {'key': 'replicationRole', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, **kwargs) -> None: + super(PartnerRegionInfo, self).__init__(**kwargs) + self.location = location + self.replication_role = None + + +class PerformanceLevelCapability(Model): + """The performance level capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: Performance level value. + :vartype value: float + :ivar unit: Unit type used to measure performance level. Possible values + include: 'DTU', 'VCores' + :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit + """ + + _validation = { + 'value': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(PerformanceLevelCapability, self).__init__(**kwargs) + self.value = None + self.unit = None + + +class RecommendedElasticPool(ProxyResource): + """Represents a recommended elastic pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_edition: The edition of the recommended elastic pool. The + ElasticPoolEdition enumeration contains all the valid editions. Possible + values include: 'Basic', 'Standard', 'Premium', 'GeneralPurpose', + 'BusinessCritical' + :vartype database_edition: str or + ~azure.mgmt.sql.models.ElasticPoolEdition + :param dtu: The DTU for the recommended elastic pool. + :type dtu: float + :param database_dtu_min: The minimum DTU for the database. + :type database_dtu_min: float + :param database_dtu_max: The maximum DTU for the database. + :type database_dtu_max: float + :param storage_mb: Gets storage size in megabytes. + :type storage_mb: float + :ivar observation_period_start: The observation period start (ISO8601 + format). + :vartype observation_period_start: datetime + :ivar observation_period_end: The observation period start (ISO8601 + format). + :vartype observation_period_end: datetime + :ivar max_observed_dtu: Gets maximum observed DTU. + :vartype max_observed_dtu: float + :ivar max_observed_storage_mb: Gets maximum observed storage in megabytes. + :vartype max_observed_storage_mb: float + :ivar databases: The list of databases in this pool. Expanded property + :vartype databases: list[~azure.mgmt.sql.models.TrackedResource] + :ivar metrics: The list of databases housed in the server. Expanded + property + :vartype metrics: + list[~azure.mgmt.sql.models.RecommendedElasticPoolMetric] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_edition': {'readonly': True}, + 'observation_period_start': {'readonly': True}, + 'observation_period_end': {'readonly': True}, + 'max_observed_dtu': {'readonly': True}, + 'max_observed_storage_mb': {'readonly': True}, + 'databases': {'readonly': True}, + 'metrics': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, + 'dtu': {'key': 'properties.dtu', 'type': 'float'}, + 'database_dtu_min': {'key': 'properties.databaseDtuMin', 'type': 'float'}, + 'database_dtu_max': {'key': 'properties.databaseDtuMax', 'type': 'float'}, + 'storage_mb': {'key': 'properties.storageMB', 'type': 'float'}, + 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, + 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, + 'max_observed_dtu': {'key': 'properties.maxObservedDtu', 'type': 'float'}, + 'max_observed_storage_mb': {'key': 'properties.maxObservedStorageMB', 'type': 'float'}, + 'databases': {'key': 'properties.databases', 'type': '[TrackedResource]'}, + 'metrics': {'key': 'properties.metrics', 'type': '[RecommendedElasticPoolMetric]'}, + } + + def __init__(self, *, dtu: float=None, database_dtu_min: float=None, database_dtu_max: float=None, storage_mb: float=None, **kwargs) -> None: + super(RecommendedElasticPool, self).__init__(**kwargs) + self.database_edition = None + self.dtu = dtu + self.database_dtu_min = database_dtu_min + self.database_dtu_max = database_dtu_max + self.storage_mb = storage_mb + self.observation_period_start = None + self.observation_period_end = None + self.max_observed_dtu = None + self.max_observed_storage_mb = None + self.databases = None + self.metrics = None + + +class RecommendedElasticPoolMetric(Model): + """Represents recommended elastic pool metric. + + :param date_time_property: The time of metric (ISO8601 format). + :type date_time_property: datetime + :param dtu: Gets or sets the DTUs (Database Transaction Units). See + https://azure.microsoft.com/documentation/articles/sql-database-what-is-a-dtu/ + :type dtu: float + :param size_gb: Gets or sets size in gigabytes. + :type size_gb: float + """ + + _attribute_map = { + 'date_time_property': {'key': 'dateTime', 'type': 'iso-8601'}, + 'dtu': {'key': 'dtu', 'type': 'float'}, + 'size_gb': {'key': 'sizeGB', 'type': 'float'}, + } + + def __init__(self, *, date_time_property=None, dtu: float=None, size_gb: float=None, **kwargs) -> None: + super(RecommendedElasticPoolMetric, self).__init__(**kwargs) + self.date_time_property = date_time_property + self.dtu = dtu + self.size_gb = size_gb + + +class RecommendedIndex(ProxyResource): + """Represents a database recommended index. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar action: The proposed index action. You can create a missing index, + drop an unused index, or rebuild an existing index to improve its + performance. Possible values include: 'Create', 'Drop', 'Rebuild' + :vartype action: str or ~azure.mgmt.sql.models.RecommendedIndexAction + :ivar state: The current recommendation state. Possible values include: + 'Active', 'Pending', 'Executing', 'Verifying', 'Pending Revert', + 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success' + :vartype state: str or ~azure.mgmt.sql.models.RecommendedIndexState + :ivar created: The UTC datetime showing when this resource was created + (ISO8601 format). + :vartype created: datetime + :ivar last_modified: The UTC datetime of when was this resource last + changed (ISO8601 format). + :vartype last_modified: datetime + :ivar index_type: The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, + CLUSTERED COLUMNSTORE). Possible values include: 'CLUSTERED', + 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED COLUMNSTORE' + :vartype index_type: str or ~azure.mgmt.sql.models.RecommendedIndexType + :ivar schema: The schema where table to build index over resides + :vartype schema: str + :ivar table: The table on which to build index. + :vartype table: str + :ivar columns: Columns over which to build index + :vartype columns: list[str] + :ivar included_columns: The list of column names to be included in the + index + :vartype included_columns: list[str] + :ivar index_script: The full build index script + :vartype index_script: str + :ivar estimated_impact: The estimated impact of doing recommended index + action. + :vartype estimated_impact: list[~azure.mgmt.sql.models.OperationImpact] + :ivar reported_impact: The values reported after index action is complete. + :vartype reported_impact: list[~azure.mgmt.sql.models.OperationImpact] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'action': {'readonly': True}, + 'state': {'readonly': True}, + 'created': {'readonly': True}, + 'last_modified': {'readonly': True}, + 'index_type': {'readonly': True}, + 'schema': {'readonly': True}, + 'table': {'readonly': True}, + 'columns': {'readonly': True}, + 'included_columns': {'readonly': True}, + 'index_script': {'readonly': True}, + 'estimated_impact': {'readonly': True}, + 'reported_impact': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'action': {'key': 'properties.action', 'type': 'RecommendedIndexAction'}, + 'state': {'key': 'properties.state', 'type': 'RecommendedIndexState'}, + 'created': {'key': 'properties.created', 'type': 'iso-8601'}, + 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, + 'index_type': {'key': 'properties.indexType', 'type': 'RecommendedIndexType'}, + 'schema': {'key': 'properties.schema', 'type': 'str'}, + 'table': {'key': 'properties.table', 'type': 'str'}, + 'columns': {'key': 'properties.columns', 'type': '[str]'}, + 'included_columns': {'key': 'properties.includedColumns', 'type': '[str]'}, + 'index_script': {'key': 'properties.indexScript', 'type': 'str'}, + 'estimated_impact': {'key': 'properties.estimatedImpact', 'type': '[OperationImpact]'}, + 'reported_impact': {'key': 'properties.reportedImpact', 'type': '[OperationImpact]'}, + } + + def __init__(self, **kwargs) -> None: + super(RecommendedIndex, self).__init__(**kwargs) + self.action = None + self.state = None + self.created = None + self.last_modified = None + self.index_type = None + self.schema = None + self.table = None + self.columns = None + self.included_columns = None + self.index_script = None + self.estimated_impact = None + self.reported_impact = None + + +class RecoverableDatabase(ProxyResource): + """A recoverable database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar edition: The edition of the database + :vartype edition: str + :ivar service_level_objective: The service level objective name of the + database + :vartype service_level_objective: str + :ivar elastic_pool_name: The elastic pool name of the database + :vartype elastic_pool_name: str + :ivar last_available_backup_date: The last available backup date of the + database (ISO8601 format) + :vartype last_available_backup_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'edition': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'last_available_backup_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(RecoverableDatabase, self).__init__(**kwargs) + self.edition = None + self.service_level_objective = None + self.elastic_pool_name = None + self.last_available_backup_date = None + + +class RecoverableManagedDatabase(ProxyResource): + """A recoverable managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar last_available_backup_date: The last available backup date. + :vartype last_available_backup_date: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_available_backup_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(RecoverableManagedDatabase, self).__init__(**kwargs) + self.last_available_backup_date = None + + +class ReplicationLink(ProxyResource): + """Represents a database replication link. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Location of the server that contains this firewall rule. + :vartype location: str + :ivar is_termination_allowed: Legacy value indicating whether termination + is allowed. Currently always returns true. + :vartype is_termination_allowed: bool + :ivar replication_mode: Replication mode of this replication link. + :vartype replication_mode: str + :ivar partner_server: The name of the server hosting the partner database. + :vartype partner_server: str + :ivar partner_database: The name of the partner database. + :vartype partner_database: str + :ivar partner_location: The Azure Region of the partner database. + :vartype partner_location: str + :ivar role: The role of the database in the replication link. Possible + values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', + 'Copy' + :vartype role: str or ~azure.mgmt.sql.models.ReplicationRole + :ivar partner_role: The role of the partner database in the replication + link. Possible values include: 'Primary', 'Secondary', + 'NonReadableSecondary', 'Source', 'Copy' + :vartype partner_role: str or ~azure.mgmt.sql.models.ReplicationRole + :ivar start_time: The start time for the replication link. + :vartype start_time: datetime + :ivar percent_complete: The percentage of seeding complete for the + replication link. + :vartype percent_complete: int + :ivar replication_state: The replication state for the replication link. + Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP', 'SUSPENDED' + :vartype replication_state: str or ~azure.mgmt.sql.models.ReplicationState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'is_termination_allowed': {'readonly': True}, + 'replication_mode': {'readonly': True}, + 'partner_server': {'readonly': True}, + 'partner_database': {'readonly': True}, + 'partner_location': {'readonly': True}, + 'role': {'readonly': True}, + 'partner_role': {'readonly': True}, + 'start_time': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'replication_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'is_termination_allowed': {'key': 'properties.isTerminationAllowed', 'type': 'bool'}, + 'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'}, + 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, + 'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'}, + 'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'}, + 'role': {'key': 'properties.role', 'type': 'ReplicationRole'}, + 'partner_role': {'key': 'properties.partnerRole', 'type': 'ReplicationRole'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ReplicationLink, self).__init__(**kwargs) + self.location = None + self.is_termination_allowed = None + self.replication_mode = None + self.partner_server = None + self.partner_database = None + self.partner_location = None + self.role = None + self.partner_role = None + self.start_time = None + self.percent_complete = None + self.replication_state = None + + +class ResourceIdentity(Model): + """Azure Active Directory identity configuration for a resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The Azure Active Directory principal id. + :vartype principal_id: str + :param type: The identity type. Set this to 'SystemAssigned' in order to + automatically create and assign an Azure Active Directory principal for + the resource. Possible values include: 'SystemAssigned' + :type type: str or ~azure.mgmt.sql.models.IdentityType + :ivar tenant_id: The Azure Active Directory tenant id. + :vartype tenant_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(ResourceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.type = type + self.tenant_id = None + + +class ResourceMoveDefinition(Model): + """Contains the information necessary to perform a resource move (rename). + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The target ID for the resource + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(ResourceMoveDefinition, self).__init__(**kwargs) + self.id = id + + +class RestorableDroppedDatabase(ProxyResource): + """A restorable dropped database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: The geo-location where the resource lives + :vartype location: str + :ivar database_name: The name of the database + :vartype database_name: str + :ivar edition: The edition of the database + :vartype edition: str + :ivar max_size_bytes: The max size in bytes of the database + :vartype max_size_bytes: str + :ivar service_level_objective: The service level objective name of the + database + :vartype service_level_objective: str + :ivar elastic_pool_name: The elastic pool name of the database + :vartype elastic_pool_name: str + :ivar creation_date: The creation date of the database (ISO8601 format) + :vartype creation_date: datetime + :ivar deletion_date: The deletion date of the database (ISO8601 format) + :vartype deletion_date: datetime + :ivar earliest_restore_date: The earliest restore date of the database + (ISO8601 format) + :vartype earliest_restore_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'database_name': {'readonly': True}, + 'edition': {'readonly': True}, + 'max_size_bytes': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(RestorableDroppedDatabase, self).__init__(**kwargs) + self.location = None + self.database_name = None + self.edition = None + self.max_size_bytes = None + self.service_level_objective = None + self.elastic_pool_name = None + self.creation_date = None + self.deletion_date = None + self.earliest_restore_date = None + + +class RestorableDroppedManagedDatabase(TrackedResource): + """A restorable dropped managed database resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar database_name: The name of the database. + :vartype database_name: str + :ivar creation_date: The creation date of the database (ISO8601 format). + :vartype creation_date: datetime + :ivar deletion_date: The deletion date of the database (ISO8601 format). + :vartype deletion_date: datetime + :ivar earliest_restore_date: The earliest restore date of the database + (ISO8601 format). + :vartype earliest_restore_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'database_name': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(RestorableDroppedManagedDatabase, self).__init__(location=location, tags=tags, **kwargs) + self.database_name = None + self.creation_date = None + self.deletion_date = None + self.earliest_restore_date = None + + +class RestorePoint(ProxyResource): + """Database restore points. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar restore_point_type: The type of restore point. Possible values + include: 'CONTINUOUS', 'DISCRETE' + :vartype restore_point_type: str or + ~azure.mgmt.sql.models.RestorePointType + :ivar earliest_restore_date: The earliest time to which this database can + be restored + :vartype earliest_restore_date: datetime + :ivar restore_point_creation_date: The time the backup was taken + :vartype restore_point_creation_date: datetime + :ivar restore_point_label: The label of restore point for backup request + by user + :vartype restore_point_label: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'restore_point_type': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'restore_point_creation_date': {'readonly': True}, + 'restore_point_label': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'restore_point_type': {'key': 'properties.restorePointType', 'type': 'RestorePointType'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, + 'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(RestorePoint, self).__init__(**kwargs) + self.location = None + self.restore_point_type = None + self.earliest_restore_date = None + self.restore_point_creation_date = None + self.restore_point_label = None + + +class SensitivityLabel(ProxyResource): + """A sensitivity label. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param label_name: The label name. + :type label_name: str + :param label_id: The label ID. + :type label_id: str + :param information_type: The information type. + :type information_type: str + :param information_type_id: The information type ID. + :type information_type_id: str + :ivar is_disabled: Is sensitivity recommendation disabled. Applicable for + recommended sensitivity label only. Specifies whether the sensitivity + recommendation on this column is disabled (dismissed) or not. + :vartype is_disabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'is_disabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'label_name': {'key': 'properties.labelName', 'type': 'str'}, + 'label_id': {'key': 'properties.labelId', 'type': 'str'}, + 'information_type': {'key': 'properties.informationType', 'type': 'str'}, + 'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'}, + 'is_disabled': {'key': 'properties.isDisabled', 'type': 'bool'}, + } + + def __init__(self, *, label_name: str=None, label_id: str=None, information_type: str=None, information_type_id: str=None, **kwargs) -> None: + super(SensitivityLabel, self).__init__(**kwargs) + self.label_name = label_name + self.label_id = label_id + self.information_type = information_type + self.information_type_id = information_type_id + self.is_disabled = None + + +class Server(TrackedResource): + """An Azure SQL Database server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param identity: The Azure Active Directory identity of the server. + :type identity: ~azure.mgmt.sql.models.ResourceIdentity + :ivar kind: Kind of sql server. This is metadata used for the Azure portal + experience. + :vartype kind: str + :param administrator_login: Administrator username for the server. Once + created it cannot be changed. + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for server creation). + :type administrator_login_password: str + :param version: The version of the server. + :type version: str + :ivar state: The state of the server. + :vartype state: str + :ivar fully_qualified_domain_name: The fully qualified domain name of the + server. + :vartype fully_qualified_domain_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'readonly': True}, + 'state': {'readonly': True}, + 'fully_qualified_domain_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, identity=None, administrator_login: str=None, administrator_login_password: str=None, version: str=None, **kwargs) -> None: + super(Server, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity + self.kind = None + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.version = version + self.state = None + self.fully_qualified_domain_name = None + + +class ServerAutomaticTuning(ProxyResource): + """Server-level Automatic Tuning. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param desired_state: Automatic tuning desired state. Possible values + include: 'Custom', 'Auto', 'Unspecified' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningServerMode + :ivar actual_state: Automatic tuning actual state. Possible values + include: 'Custom', 'Auto', 'Unspecified' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningServerMode + :param options: Automatic tuning options definition. + :type options: dict[str, + ~azure.mgmt.sql.models.AutomaticTuningServerOptions] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'actual_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningServerMode'}, + 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningServerMode'}, + 'options': {'key': 'properties.options', 'type': '{AutomaticTuningServerOptions}'}, + } + + def __init__(self, *, desired_state=None, options=None, **kwargs) -> None: + super(ServerAutomaticTuning, self).__init__(**kwargs) + self.desired_state = desired_state + self.actual_state = None + self.options = options + + +class ServerAzureADAdministrator(ProxyResource): + """An server Active Directory Administrator. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar administrator_type: Required. The type of administrator. Default + value: "ActiveDirectory" . + :vartype administrator_type: str + :param login: Required. The server administrator login value. + :type login: str + :param sid: Required. The server administrator Sid (Secure ID). + :type sid: str + :param tenant_id: Required. The server Active Directory Administrator + tenant id. + :type tenant_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'administrator_type': {'required': True, 'constant': True}, + 'login': {'required': True}, + 'sid': {'required': True}, + 'tenant_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, + 'login': {'key': 'properties.login', 'type': 'str'}, + 'sid': {'key': 'properties.sid', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + } + + administrator_type = "ActiveDirectory" + + def __init__(self, *, login: str, sid: str, tenant_id: str, **kwargs) -> None: + super(ServerAzureADAdministrator, self).__init__(**kwargs) + self.login = login + self.sid = sid + self.tenant_id = tenant_id + + +class ServerBlobAuditingPolicy(ProxyResource): + """A server blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. If state is Enabled and storageEndpoint is + specified, storageAccountAccessKey is required. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + } + + def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: + super(ServerBlobAuditingPolicy, self).__init__(**kwargs) + self.state = state + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.audit_actions_and_groups = audit_actions_and_groups + self.storage_account_subscription_id = storage_account_subscription_id + self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use + self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + + +class ServerCommunicationLink(ProxyResource): + """Server communication link. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar state: The state. + :vartype state: str + :param partner_server: Required. The name of the partner server. + :type partner_server: str + :ivar location: Communication link location. + :vartype location: str + :ivar kind: Communication link kind. This property is used for Azure + Portal metadata. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'partner_server': {'required': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, partner_server: str, **kwargs) -> None: + super(ServerCommunicationLink, self).__init__(**kwargs) + self.state = None + self.partner_server = partner_server + self.location = None + self.kind = None + + +class ServerConnectionPolicy(ProxyResource): + """A server secure connection policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar kind: Metadata used for the Azure portal experience. + :vartype kind: str + :ivar location: Resource location. + :vartype location: str + :param connection_type: Required. The server connection type. Possible + values include: 'Default', 'Proxy', 'Redirect' + :type connection_type: str or ~azure.mgmt.sql.models.ServerConnectionType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + 'connection_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'connection_type': {'key': 'properties.connectionType', 'type': 'ServerConnectionType'}, + } + + def __init__(self, *, connection_type, **kwargs) -> None: + super(ServerConnectionPolicy, self).__init__(**kwargs) + self.kind = None + self.location = None + self.connection_type = connection_type + + +class ServerDnsAlias(ProxyResource): + """A server DNS alias. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar azure_dns_record: The fully qualified DNS record for alias + :vartype azure_dns_record: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'azure_dns_record': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'azure_dns_record': {'key': 'properties.azureDnsRecord', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ServerDnsAlias, self).__init__(**kwargs) + self.azure_dns_record = None + + +class ServerDnsAliasAcquisition(Model): + """A server DNS alias acquisition request. + + :param old_server_dns_alias_id: The id of the server alias that will be + acquired to point to this server instead. + :type old_server_dns_alias_id: str + """ + + _attribute_map = { + 'old_server_dns_alias_id': {'key': 'oldServerDnsAliasId', 'type': 'str'}, + } + + def __init__(self, *, old_server_dns_alias_id: str=None, **kwargs) -> None: + super(ServerDnsAliasAcquisition, self).__init__(**kwargs) + self.old_server_dns_alias_id = old_server_dns_alias_id + + +class ServerKey(ProxyResource): + """A server key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :type kind: str + :ivar location: Resource location. + :vartype location: str + :ivar subregion: Subregion of the server key. + :vartype subregion: str + :param server_key_type: Required. The server key type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType + :param uri: The URI of the server key. + :type uri: str + :param thumbprint: Thumbprint of the server key. + :type thumbprint: str + :param creation_date: The server key creation date. + :type creation_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'subregion': {'readonly': True}, + 'server_key_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'subregion': {'key': 'properties.subregion', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, server_key_type, kind: str=None, uri: str=None, thumbprint: str=None, creation_date=None, **kwargs) -> None: + super(ServerKey, self).__init__(**kwargs) + self.kind = kind + self.location = None + self.subregion = None + self.server_key_type = server_key_type + self.uri = uri + self.thumbprint = thumbprint + self.creation_date = creation_date + + +class ServerSecurityAlertPolicy(ProxyResource): + """A server security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + database. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: + super(ServerSecurityAlertPolicy, self).__init__(**kwargs) + self.state = state + self.disabled_alerts = disabled_alerts + self.email_addresses = email_addresses + self.email_account_admins = email_account_admins + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.creation_time = None + + +class ServerUpdate(Model): + """An update request for an Azure SQL Database server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param administrator_login: Administrator username for the server. Once + created it cannot be changed. + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for server creation). + :type administrator_login_password: str + :param version: The version of the server. + :type version: str + :ivar state: The state of the server. + :vartype state: str + :ivar fully_qualified_domain_name: The fully qualified domain name of the + server. + :vartype fully_qualified_domain_name: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'state': {'readonly': True}, + 'fully_qualified_domain_name': {'readonly': True}, + } + + _attribute_map = { + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, administrator_login: str=None, administrator_login_password: str=None, version: str=None, tags=None, **kwargs) -> None: + super(ServerUpdate, self).__init__(**kwargs) + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.version = version + self.state = None + self.fully_qualified_domain_name = None + self.tags = tags + + +class ServerUsage(Model): + """Represents server metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the server usage metric. + :vartype name: str + :ivar resource_name: The name of the resource. + :vartype resource_name: str + :ivar display_name: The metric display name. + :vartype display_name: str + :ivar current_value: The current value of the metric. + :vartype current_value: float + :ivar limit: The current limit of the metric. + :vartype limit: float + :ivar unit: The units of the metric. + :vartype unit: str + :ivar next_reset_time: The next reset time for the metric (ISO8601 + format). + :vartype next_reset_time: datetime + """ + + _validation = { + 'name': {'readonly': True}, + 'resource_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'next_reset_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(ServerUsage, self).__init__(**kwargs) + self.name = None + self.resource_name = None + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + self.next_reset_time = None + + +class ServerVersionCapability(Model): + """The server capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The server version name. + :vartype name: str + :ivar supported_editions: The list of supported database editions. + :vartype supported_editions: + list[~azure.mgmt.sql.models.EditionCapability] + :ivar supported_elastic_pool_editions: The list of supported elastic pool + editions. + :vartype supported_elastic_pool_editions: + list[~azure.mgmt.sql.models.ElasticPoolEditionCapability] + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'name': {'readonly': True}, + 'supported_editions': {'readonly': True}, + 'supported_elastic_pool_editions': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_editions': {'key': 'supportedEditions', 'type': '[EditionCapability]'}, + 'supported_elastic_pool_editions': {'key': 'supportedElasticPoolEditions', 'type': '[ElasticPoolEditionCapability]'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ServerVersionCapability, self).__init__(**kwargs) + self.name = None + self.supported_editions = None + self.supported_elastic_pool_editions = None + self.status = None + self.reason = reason + + +class ServerVulnerabilityAssessment(ProxyResource): + """A server vulnerability assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param storage_container_path: Required. A blob storage container path to + hold the scan results (e.g. + https://myStorage.blob.core.windows.net/VaScans/). + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has write access to the blob container specified in 'storageContainerPath' + parameter. If 'storageAccountAccessKey' isn't specified, + StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_container_path': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, *, storage_container_path: str, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: + super(ServerVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = storage_container_path + self.storage_container_sas_key = storage_container_sas_key + self.storage_account_access_key = storage_account_access_key + self.recurring_scans = recurring_scans + + +class ServiceObjective(ProxyResource): + """Represents a database service objective. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar service_objective_name: The name for the service objective. + :vartype service_objective_name: str + :ivar is_default: Gets whether the service level objective is the default + service objective. + :vartype is_default: bool + :ivar is_system: Gets whether the service level objective is a system + service objective. + :vartype is_system: bool + :ivar description: The description for the service level objective. + :vartype description: str + :ivar enabled: Gets whether the service level objective is enabled. + :vartype enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'service_objective_name': {'readonly': True}, + 'is_default': {'readonly': True}, + 'is_system': {'readonly': True}, + 'description': {'readonly': True}, + 'enabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'service_objective_name': {'key': 'properties.serviceObjectiveName', 'type': 'str'}, + 'is_default': {'key': 'properties.isDefault', 'type': 'bool'}, + 'is_system': {'key': 'properties.isSystem', 'type': 'bool'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(ServiceObjective, self).__init__(**kwargs) + self.service_objective_name = None + self.is_default = None + self.is_system = None + self.description = None + self.enabled = None + + +class ServiceObjectiveCapability(Model): + """The service objectives capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique ID of the service objective. + :vartype id: str + :ivar name: The service objective name. + :vartype name: str + :ivar supported_max_sizes: The list of supported maximum database sizes. + :vartype supported_max_sizes: + list[~azure.mgmt.sql.models.MaxSizeRangeCapability] + :ivar performance_level: The performance level. + :vartype performance_level: + ~azure.mgmt.sql.models.PerformanceLevelCapability + :ivar sku: The sku. + :vartype sku: ~azure.mgmt.sql.models.Sku + :ivar supported_license_types: List of supported license types. + :vartype supported_license_types: + list[~azure.mgmt.sql.models.LicenseTypeCapability] + :ivar included_max_size: The included (free) max size. + :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability + :ivar status: The status of the capability. Possible values include: + 'Visible', 'Available', 'Default', 'Disabled' + :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus + :param reason: The reason for the capability not being available. + :type reason: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'supported_max_sizes': {'readonly': True}, + 'performance_level': {'readonly': True}, + 'sku': {'readonly': True}, + 'supported_license_types': {'readonly': True}, + 'included_max_size': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, + 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, + 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, + 'status': {'key': 'status', 'type': 'CapabilityStatus'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, reason: str=None, **kwargs) -> None: + super(ServiceObjectiveCapability, self).__init__(**kwargs) + self.id = None + self.name = None + self.supported_max_sizes = None + self.performance_level = None + self.sku = None + self.supported_license_types = None + self.included_max_size = None + self.status = None + self.reason = reason + + +class ServiceTierAdvisor(ProxyResource): + """Represents a Service Tier Advisor. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar observation_period_start: The observation period start (ISO8601 + format). + :vartype observation_period_start: datetime + :ivar observation_period_end: The observation period start (ISO8601 + format). + :vartype observation_period_end: datetime + :ivar active_time_ratio: The activeTimeRatio for service tier advisor. + :vartype active_time_ratio: float + :ivar min_dtu: Gets or sets minDtu for service tier advisor. + :vartype min_dtu: float + :ivar avg_dtu: Gets or sets avgDtu for service tier advisor. + :vartype avg_dtu: float + :ivar max_dtu: Gets or sets maxDtu for service tier advisor. + :vartype max_dtu: float + :ivar max_size_in_gb: Gets or sets maxSizeInGB for service tier advisor. + :vartype max_size_in_gb: float + :ivar service_level_objective_usage_metrics: Gets or sets + serviceLevelObjectiveUsageMetrics for the service tier advisor. + :vartype service_level_objective_usage_metrics: + list[~azure.mgmt.sql.models.SloUsageMetric] + :ivar current_service_level_objective: Gets or sets + currentServiceLevelObjective for service tier advisor. + :vartype current_service_level_objective: str + :ivar current_service_level_objective_id: Gets or sets + currentServiceLevelObjectiveId for service tier advisor. + :vartype current_service_level_objective_id: str + :ivar usage_based_recommendation_service_level_objective: Gets or sets + usageBasedRecommendationServiceLevelObjective for service tier advisor. + :vartype usage_based_recommendation_service_level_objective: str + :ivar usage_based_recommendation_service_level_objective_id: Gets or sets + usageBasedRecommendationServiceLevelObjectiveId for service tier advisor. + :vartype usage_based_recommendation_service_level_objective_id: str + :ivar database_size_based_recommendation_service_level_objective: Gets or + sets databaseSizeBasedRecommendationServiceLevelObjective for service tier + advisor. + :vartype database_size_based_recommendation_service_level_objective: str + :ivar database_size_based_recommendation_service_level_objective_id: Gets + or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service + tier advisor. + :vartype database_size_based_recommendation_service_level_objective_id: + str + :ivar disaster_plan_based_recommendation_service_level_objective: Gets or + sets disasterPlanBasedRecommendationServiceLevelObjective for service tier + advisor. + :vartype disaster_plan_based_recommendation_service_level_objective: str + :ivar disaster_plan_based_recommendation_service_level_objective_id: Gets + or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service + tier advisor. + :vartype disaster_plan_based_recommendation_service_level_objective_id: + str + :ivar overall_recommendation_service_level_objective: Gets or sets + overallRecommendationServiceLevelObjective for service tier advisor. + :vartype overall_recommendation_service_level_objective: str + :ivar overall_recommendation_service_level_objective_id: Gets or sets + overallRecommendationServiceLevelObjectiveId for service tier advisor. + :vartype overall_recommendation_service_level_objective_id: str + :ivar confidence: Gets or sets confidence for service tier advisor. + :vartype confidence: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'observation_period_start': {'readonly': True}, + 'observation_period_end': {'readonly': True}, + 'active_time_ratio': {'readonly': True}, + 'min_dtu': {'readonly': True}, + 'avg_dtu': {'readonly': True}, + 'max_dtu': {'readonly': True}, + 'max_size_in_gb': {'readonly': True}, + 'service_level_objective_usage_metrics': {'readonly': True}, + 'current_service_level_objective': {'readonly': True}, + 'current_service_level_objective_id': {'readonly': True}, + 'usage_based_recommendation_service_level_objective': {'readonly': True}, + 'usage_based_recommendation_service_level_objective_id': {'readonly': True}, + 'database_size_based_recommendation_service_level_objective': {'readonly': True}, + 'database_size_based_recommendation_service_level_objective_id': {'readonly': True}, + 'disaster_plan_based_recommendation_service_level_objective': {'readonly': True}, + 'disaster_plan_based_recommendation_service_level_objective_id': {'readonly': True}, + 'overall_recommendation_service_level_objective': {'readonly': True}, + 'overall_recommendation_service_level_objective_id': {'readonly': True}, + 'confidence': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, + 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, + 'active_time_ratio': {'key': 'properties.activeTimeRatio', 'type': 'float'}, + 'min_dtu': {'key': 'properties.minDtu', 'type': 'float'}, + 'avg_dtu': {'key': 'properties.avgDtu', 'type': 'float'}, + 'max_dtu': {'key': 'properties.maxDtu', 'type': 'float'}, + 'max_size_in_gb': {'key': 'properties.maxSizeInGB', 'type': 'float'}, + 'service_level_objective_usage_metrics': {'key': 'properties.serviceLevelObjectiveUsageMetrics', 'type': '[SloUsageMetric]'}, + 'current_service_level_objective': {'key': 'properties.currentServiceLevelObjective', 'type': 'str'}, + 'current_service_level_objective_id': {'key': 'properties.currentServiceLevelObjectiveId', 'type': 'str'}, + 'usage_based_recommendation_service_level_objective': {'key': 'properties.usageBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'usage_based_recommendation_service_level_objective_id': {'key': 'properties.usageBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'database_size_based_recommendation_service_level_objective': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'database_size_based_recommendation_service_level_objective_id': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'disaster_plan_based_recommendation_service_level_objective': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjective', 'type': 'str'}, + 'disaster_plan_based_recommendation_service_level_objective_id': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'overall_recommendation_service_level_objective': {'key': 'properties.overallRecommendationServiceLevelObjective', 'type': 'str'}, + 'overall_recommendation_service_level_objective_id': {'key': 'properties.overallRecommendationServiceLevelObjectiveId', 'type': 'str'}, + 'confidence': {'key': 'properties.confidence', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(ServiceTierAdvisor, self).__init__(**kwargs) + self.observation_period_start = None + self.observation_period_end = None + self.active_time_ratio = None + self.min_dtu = None + self.avg_dtu = None + self.max_dtu = None + self.max_size_in_gb = None + self.service_level_objective_usage_metrics = None + self.current_service_level_objective = None + self.current_service_level_objective_id = None + self.usage_based_recommendation_service_level_objective = None + self.usage_based_recommendation_service_level_objective_id = None + self.database_size_based_recommendation_service_level_objective = None + self.database_size_based_recommendation_service_level_objective_id = None + self.disaster_plan_based_recommendation_service_level_objective = None + self.disaster_plan_based_recommendation_service_level_objective_id = None + self.overall_recommendation_service_level_objective = None + self.overall_recommendation_service_level_objective_id = None + self.confidence = None + + +class Sku(Model): + """The resource model definition representing SKU. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Ex - P3. It is typically a + letter+number code + :type name: str + :param tier: This field is required to be implemented by the Resource + Provider if the service has more than one tier, but is not required on a + PUT. + :type tier: str + :param size: The SKU size. When the name field is the combination of tier + and some other value, this would be the standalone code. + :type size: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :param capacity: If the SKU supports scale out/in then the capacity + integer should be included. If scale out/in is not possible for the + resource this may be omitted. + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, *, name: str, tier: str=None, size: str=None, family: str=None, capacity: int=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.size = size + self.family = family + self.capacity = capacity + + +class SloUsageMetric(Model): + """A Slo Usage Metric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar service_level_objective: The serviceLevelObjective for SLO usage + metric. Possible values include: 'System', 'System0', 'System1', + 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', + 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', + 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', + 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', + 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', + 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', + 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', + 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' + :vartype service_level_objective: str or + ~azure.mgmt.sql.models.ServiceObjectiveName + :ivar service_level_objective_id: The serviceLevelObjectiveId for SLO + usage metric. + :vartype service_level_objective_id: str + :ivar in_range_time_ratio: Gets or sets inRangeTimeRatio for SLO usage + metric. + :vartype in_range_time_ratio: float + """ + + _validation = { + 'service_level_objective': {'readonly': True}, + 'service_level_objective_id': {'readonly': True}, + 'in_range_time_ratio': {'readonly': True}, + } + + _attribute_map = { + 'service_level_objective': {'key': 'serviceLevelObjective', 'type': 'str'}, + 'service_level_objective_id': {'key': 'serviceLevelObjectiveId', 'type': 'str'}, + 'in_range_time_ratio': {'key': 'inRangeTimeRatio', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(SloUsageMetric, self).__init__(**kwargs) + self.service_level_objective = None + self.service_level_objective_id = None + self.in_range_time_ratio = None + + +class SubscriptionUsage(ProxyResource): + """Usage Metric of a Subscription in a Location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar display_name: User-readable name of the metric. + :vartype display_name: str + :ivar current_value: Current value of the metric. + :vartype current_value: float + :ivar limit: Boundary value of the metric. + :vartype limit: float + :ivar unit: Unit of the metric. + :vartype unit: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'current_value': {'key': 'properties.currentValue', 'type': 'float'}, + 'limit': {'key': 'properties.limit', 'type': 'float'}, + 'unit': {'key': 'properties.unit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubscriptionUsage, self).__init__(**kwargs) + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + + +class SyncAgent(ProxyResource): + """An Azure SQL Database sync agent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar sync_agent_name: Name of the sync agent. + :vartype sync_agent_name: str + :param sync_database_id: ARM resource id of the sync database in the sync + agent. + :type sync_database_id: str + :ivar last_alive_time: Last alive time of the sync agent. + :vartype last_alive_time: datetime + :ivar state: State of the sync agent. Possible values include: 'Online', + 'Offline', 'NeverConnected' + :vartype state: str or ~azure.mgmt.sql.models.SyncAgentState + :ivar is_up_to_date: If the sync agent version is up to date. + :vartype is_up_to_date: bool + :ivar expiry_time: Expiration time of the sync agent version. + :vartype expiry_time: datetime + :ivar version: Version of the sync agent. + :vartype version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sync_agent_name': {'readonly': True}, + 'last_alive_time': {'readonly': True}, + 'state': {'readonly': True}, + 'is_up_to_date': {'readonly': True}, + 'expiry_time': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sync_agent_name': {'key': 'properties.name', 'type': 'str'}, + 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, + 'last_alive_time': {'key': 'properties.lastAliveTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'is_up_to_date': {'key': 'properties.isUpToDate', 'type': 'bool'}, + 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + } + + def __init__(self, *, sync_database_id: str=None, **kwargs) -> None: + super(SyncAgent, self).__init__(**kwargs) + self.sync_agent_name = None + self.sync_database_id = sync_database_id + self.last_alive_time = None + self.state = None + self.is_up_to_date = None + self.expiry_time = None + self.version = None + + +class SyncAgentKeyProperties(Model): + """Properties of an Azure SQL Database sync agent key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar sync_agent_key: Key of sync agent. + :vartype sync_agent_key: str + """ + + _validation = { + 'sync_agent_key': {'readonly': True}, + } + + _attribute_map = { + 'sync_agent_key': {'key': 'syncAgentKey', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncAgentKeyProperties, self).__init__(**kwargs) + self.sync_agent_key = None + + +class SyncAgentLinkedDatabase(ProxyResource): + """An Azure SQL Database sync agent linked database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar database_type: Type of the sync agent linked database. Possible + values include: 'AzureSqlDatabase', 'SqlServerDatabase' + :vartype database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType + :ivar database_id: Id of the sync agent linked database. + :vartype database_id: str + :ivar description: Description of the sync agent linked database. + :vartype description: str + :ivar server_name: Server name of the sync agent linked database. + :vartype server_name: str + :ivar database_name: Database name of the sync agent linked database. + :vartype database_name: str + :ivar user_name: User name of the sync agent linked database. + :vartype user_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'database_type': {'readonly': True}, + 'database_id': {'readonly': True}, + 'description': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncAgentLinkedDatabase, self).__init__(**kwargs) + self.database_type = None + self.database_id = None + self.description = None + self.server_name = None + self.database_name = None + self.user_name = None + + +class SyncDatabaseIdProperties(Model): + """Properties of the sync database id. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: ARM resource id of sync database. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncDatabaseIdProperties, self).__init__(**kwargs) + self.id = None + + +class SyncFullSchemaProperties(Model): + """Properties of the database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar tables: List of tables in the database full schema. + :vartype tables: list[~azure.mgmt.sql.models.SyncFullSchemaTable] + :ivar last_update_time: Last update time of the database schema. + :vartype last_update_time: datetime + """ + + _validation = { + 'tables': {'readonly': True}, + 'last_update_time': {'readonly': True}, + } + + _attribute_map = { + 'tables': {'key': 'tables', 'type': '[SyncFullSchemaTable]'}, + 'last_update_time': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncFullSchemaProperties, self).__init__(**kwargs) + self.tables = None + self.last_update_time = None + + +class SyncFullSchemaTable(Model): + """Properties of the table in the database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar columns: List of columns in the table of database full schema. + :vartype columns: list[~azure.mgmt.sql.models.SyncFullSchemaTableColumn] + :ivar error_id: Error id of the table. + :vartype error_id: str + :ivar has_error: If there is error in the table. + :vartype has_error: bool + :ivar name: Name of the table. + :vartype name: str + :ivar quoted_name: Quoted name of the table. + :vartype quoted_name: str + """ + + _validation = { + 'columns': {'readonly': True}, + 'error_id': {'readonly': True}, + 'has_error': {'readonly': True}, + 'name': {'readonly': True}, + 'quoted_name': {'readonly': True}, + } + + _attribute_map = { + 'columns': {'key': 'columns', 'type': '[SyncFullSchemaTableColumn]'}, + 'error_id': {'key': 'errorId', 'type': 'str'}, + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncFullSchemaTable, self).__init__(**kwargs) + self.columns = None + self.error_id = None + self.has_error = None + self.name = None + self.quoted_name = None + + +class SyncFullSchemaTableColumn(Model): + """Properties of the column in the table of database full schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar data_size: Data size of the column. + :vartype data_size: str + :ivar data_type: Data type of the column. + :vartype data_type: str + :ivar error_id: Error id of the column. + :vartype error_id: str + :ivar has_error: If there is error in the table. + :vartype has_error: bool + :ivar is_primary_key: If it is the primary key of the table. + :vartype is_primary_key: bool + :ivar name: Name of the column. + :vartype name: str + :ivar quoted_name: Quoted name of the column. + :vartype quoted_name: str + """ + + _validation = { + 'data_size': {'readonly': True}, + 'data_type': {'readonly': True}, + 'error_id': {'readonly': True}, + 'has_error': {'readonly': True}, + 'is_primary_key': {'readonly': True}, + 'name': {'readonly': True}, + 'quoted_name': {'readonly': True}, + } + + _attribute_map = { + 'data_size': {'key': 'dataSize', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + 'error_id': {'key': 'errorId', 'type': 'str'}, + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'is_primary_key': {'key': 'isPrimaryKey', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncFullSchemaTableColumn, self).__init__(**kwargs) + self.data_size = None + self.data_type = None + self.error_id = None + self.has_error = None + self.is_primary_key = None + self.name = None + self.quoted_name = None + + +class SyncGroup(ProxyResource): + """An Azure SQL Database sync group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param interval: Sync interval of the sync group. + :type interval: int + :ivar last_sync_time: Last sync time of the sync group. + :vartype last_sync_time: datetime + :param conflict_resolution_policy: Conflict resolution policy of the sync + group. Possible values include: 'HubWin', 'MemberWin' + :type conflict_resolution_policy: str or + ~azure.mgmt.sql.models.SyncConflictResolutionPolicy + :param sync_database_id: ARM resource id of the sync database in the sync + group. + :type sync_database_id: str + :param hub_database_user_name: User name for the sync group hub database + credential. + :type hub_database_user_name: str + :param hub_database_password: Password for the sync group hub database + credential. + :type hub_database_password: str + :ivar sync_state: Sync state of the sync group. Possible values include: + 'NotReady', 'Error', 'Warning', 'Progressing', 'Good' + :vartype sync_state: str or ~azure.mgmt.sql.models.SyncGroupState + :param schema: Sync schema of the sync group. + :type schema: ~azure.mgmt.sql.models.SyncGroupSchema + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_sync_time': {'readonly': True}, + 'sync_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'interval': {'key': 'properties.interval', 'type': 'int'}, + 'last_sync_time': {'key': 'properties.lastSyncTime', 'type': 'iso-8601'}, + 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'str'}, + 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, + 'hub_database_user_name': {'key': 'properties.hubDatabaseUserName', 'type': 'str'}, + 'hub_database_password': {'key': 'properties.hubDatabasePassword', 'type': 'str'}, + 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, + 'schema': {'key': 'properties.schema', 'type': 'SyncGroupSchema'}, + } + + def __init__(self, *, interval: int=None, conflict_resolution_policy=None, sync_database_id: str=None, hub_database_user_name: str=None, hub_database_password: str=None, schema=None, **kwargs) -> None: + super(SyncGroup, self).__init__(**kwargs) + self.interval = interval + self.last_sync_time = None + self.conflict_resolution_policy = conflict_resolution_policy + self.sync_database_id = sync_database_id + self.hub_database_user_name = hub_database_user_name + self.hub_database_password = hub_database_password + self.sync_state = None + self.schema = schema + + +class SyncGroupLogProperties(Model): + """Properties of an Azure SQL Database sync group log. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar timestamp: Timestamp of the sync group log. + :vartype timestamp: datetime + :ivar type: Type of the sync group log. Possible values include: 'All', + 'Error', 'Warning', 'Success' + :vartype type: str or ~azure.mgmt.sql.models.SyncGroupLogType + :ivar source: Source of the sync group log. + :vartype source: str + :ivar details: Details of the sync group log. + :vartype details: str + :ivar tracing_id: TracingId of the sync group log. + :vartype tracing_id: str + :ivar operation_status: OperationStatus of the sync group log. + :vartype operation_status: str + """ + + _validation = { + 'timestamp': {'readonly': True}, + 'type': {'readonly': True}, + 'source': {'readonly': True}, + 'details': {'readonly': True}, + 'tracing_id': {'readonly': True}, + 'operation_status': {'readonly': True}, + } + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, + 'tracing_id': {'key': 'tracingId', 'type': 'str'}, + 'operation_status': {'key': 'operationStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncGroupLogProperties, self).__init__(**kwargs) + self.timestamp = None + self.type = None + self.source = None + self.details = None + self.tracing_id = None + self.operation_status = None + + +class SyncGroupSchema(Model): + """Properties of sync group schema. + + :param tables: List of tables in sync group schema. + :type tables: list[~azure.mgmt.sql.models.SyncGroupSchemaTable] + :param master_sync_member_name: Name of master sync member where the + schema is from. + :type master_sync_member_name: str + """ + + _attribute_map = { + 'tables': {'key': 'tables', 'type': '[SyncGroupSchemaTable]'}, + 'master_sync_member_name': {'key': 'masterSyncMemberName', 'type': 'str'}, + } + + def __init__(self, *, tables=None, master_sync_member_name: str=None, **kwargs) -> None: + super(SyncGroupSchema, self).__init__(**kwargs) + self.tables = tables + self.master_sync_member_name = master_sync_member_name + + +class SyncGroupSchemaTable(Model): + """Properties of table in sync group schema. + + :param columns: List of columns in sync group schema. + :type columns: list[~azure.mgmt.sql.models.SyncGroupSchemaTableColumn] + :param quoted_name: Quoted name of sync group schema table. + :type quoted_name: str + """ + + _attribute_map = { + 'columns': {'key': 'columns', 'type': '[SyncGroupSchemaTableColumn]'}, + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + } + + def __init__(self, *, columns=None, quoted_name: str=None, **kwargs) -> None: + super(SyncGroupSchemaTable, self).__init__(**kwargs) + self.columns = columns + self.quoted_name = quoted_name + + +class SyncGroupSchemaTableColumn(Model): + """Properties of column in sync group table. + + :param quoted_name: Quoted name of sync group table column. + :type quoted_name: str + :param data_size: Data size of the column. + :type data_size: str + :param data_type: Data type of the column. + :type data_type: str + """ + + _attribute_map = { + 'quoted_name': {'key': 'quotedName', 'type': 'str'}, + 'data_size': {'key': 'dataSize', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + } + + def __init__(self, *, quoted_name: str=None, data_size: str=None, data_type: str=None, **kwargs) -> None: + super(SyncGroupSchemaTableColumn, self).__init__(**kwargs) + self.quoted_name = quoted_name + self.data_size = data_size + self.data_type = data_type + + +class SyncMember(ProxyResource): + """An Azure SQL Database sync member. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param database_type: Database type of the sync member. Possible values + include: 'AzureSqlDatabase', 'SqlServerDatabase' + :type database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType + :param sync_agent_id: ARM resource id of the sync agent in the sync + member. + :type sync_agent_id: str + :param sql_server_database_id: SQL Server database id of the sync member. + :type sql_server_database_id: str + :param server_name: Server name of the member database in the sync member + :type server_name: str + :param database_name: Database name of the member database in the sync + member. + :type database_name: str + :param user_name: User name of the member database in the sync member. + :type user_name: str + :param password: Password of the member database in the sync member. + :type password: str + :param sync_direction: Sync direction of the sync member. Possible values + include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember' + :type sync_direction: str or ~azure.mgmt.sql.models.SyncDirection + :ivar sync_state: Sync state of the sync member. Possible values include: + 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', + 'DisabledTombstoneCleanup', 'DisabledBackupRestore', + 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', + 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', + 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', + 'ReprovisionFailed', 'UnReprovisioned' + :vartype sync_state: str or ~azure.mgmt.sql.models.SyncMemberState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sync_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, + 'sync_agent_id': {'key': 'properties.syncAgentId', 'type': 'str'}, + 'sql_server_database_id': {'key': 'properties.sqlServerDatabaseId', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'sync_direction': {'key': 'properties.syncDirection', 'type': 'str'}, + 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, + } + + def __init__(self, *, database_type=None, sync_agent_id: str=None, sql_server_database_id: str=None, server_name: str=None, database_name: str=None, user_name: str=None, password: str=None, sync_direction=None, **kwargs) -> None: + super(SyncMember, self).__init__(**kwargs) + self.database_type = database_type + self.sync_agent_id = sync_agent_id + self.sql_server_database_id = sql_server_database_id + self.server_name = server_name + self.database_name = database_name + self.user_name = user_name + self.password = password + self.sync_direction = sync_direction + self.sync_state = None + + +class TdeCertificate(ProxyResource): + """A TDE certificate that can be uploaded into a server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param private_blob: Required. The base64 encoded certificate private + blob. + :type private_blob: str + :param cert_password: The certificate password. + :type cert_password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'private_blob': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_blob': {'key': 'properties.privateBlob', 'type': 'str'}, + 'cert_password': {'key': 'properties.certPassword', 'type': 'str'}, + } + + def __init__(self, *, private_blob: str, cert_password: str=None, **kwargs) -> None: + super(TdeCertificate, self).__init__(**kwargs) + self.private_blob = private_blob + self.cert_password = cert_password + + +class TransparentDataEncryption(ProxyResource): + """Represents a database transparent data encryption configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :param status: The status of the database transparent data encryption. + Possible values include: 'Enabled', 'Disabled' + :type status: str or + ~azure.mgmt.sql.models.TransparentDataEncryptionStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'TransparentDataEncryptionStatus'}, + } + + def __init__(self, *, status=None, **kwargs) -> None: + super(TransparentDataEncryption, self).__init__(**kwargs) + self.location = None + self.status = status + + +class TransparentDataEncryptionActivity(ProxyResource): + """Represents a database transparent data encryption Scan. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar status: The status of the database. Possible values include: + 'Encrypting', 'Decrypting' + :vartype status: str or + ~azure.mgmt.sql.models.TransparentDataEncryptionActivityStatus + :ivar percent_complete: The percent complete of the transparent data + encryption scan for a database. + :vartype percent_complete: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'status': {'readonly': True}, + 'percent_complete': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(TransparentDataEncryptionActivity, self).__init__(**kwargs) + self.location = None + self.status = None + self.percent_complete = None + + +class Usage(Model): + """ARM usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: ~azure.mgmt.sql.models.Name + :ivar type: Resource type. + :vartype type: str + :ivar unit: Usage unit. + :vartype unit: str + :ivar current_value: Usage current value. + :vartype current_value: int + :ivar limit: Usage limit. + :vartype limit: int + :ivar requested_limit: Usage requested limit. + :vartype requested_limit: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'unit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'requested_limit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'Name'}, + 'type': {'key': 'type', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'int'}, + 'requested_limit': {'key': 'requestedLimit', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(Usage, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.unit = None + self.current_value = None + self.limit = None + self.requested_limit = None + + +class VirtualCluster(TrackedResource): + """An Azure SQL virtual cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar subnet_id: Subnet resource ID for the virtual cluster. + :vartype subnet_id: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :ivar child_resources: List of resources in this virtual cluster. + :vartype child_resources: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'subnet_id': {'readonly': True}, + 'child_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'family': {'key': 'properties.family', 'type': 'str'}, + 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, + } + + def __init__(self, *, location: str, tags=None, family: str=None, **kwargs) -> None: + super(VirtualCluster, self).__init__(location=location, tags=tags, **kwargs) + self.subnet_id = None + self.family = family + self.child_resources = None + + +class VirtualClusterUpdate(Model): + """An update request for an Azure SQL Database virtual cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar subnet_id: Subnet resource ID for the virtual cluster. + :vartype subnet_id: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :ivar child_resources: List of resources in this virtual cluster. + :vartype child_resources: list[str] + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'subnet_id': {'readonly': True}, + 'child_resources': {'readonly': True}, + } + + _attribute_map = { + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'family': {'key': 'properties.family', 'type': 'str'}, + 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, family: str=None, tags=None, **kwargs) -> None: + super(VirtualClusterUpdate, self).__init__(**kwargs) + self.subnet_id = None + self.family = family + self.child_resources = None + self.tags = tags + + +class VirtualNetworkRule(ProxyResource): + """A virtual network rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param virtual_network_subnet_id: Required. The ARM resource id of the + virtual network subnet. + :type virtual_network_subnet_id: str + :param ignore_missing_vnet_service_endpoint: Create firewall rule before + the virtual network has vnet service endpoint enabled. + :type ignore_missing_vnet_service_endpoint: bool + :ivar state: Virtual Network Rule State. Possible values include: + 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' + :vartype state: str or ~azure.mgmt.sql.models.VirtualNetworkRuleState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'virtual_network_subnet_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, + 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, *, virtual_network_subnet_id: str, ignore_missing_vnet_service_endpoint: bool=None, **kwargs) -> None: + super(VirtualNetworkRule, self).__init__(**kwargs) + self.virtual_network_subnet_id = virtual_network_subnet_id + self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint + self.state = None + + +class VulnerabilityAssessmentRecurringScansProperties(Model): + """Properties of a Vulnerability Assessment recurring scans. + + :param is_enabled: Recurring scans state. + :type is_enabled: bool + :param email_subscription_admins: Specifies that the schedule scan + notification will be is sent to the subscription administrators. Default + value: True . + :type email_subscription_admins: bool + :param emails: Specifies an array of e-mail addresses to which the scan + notification is sent. + :type emails: list[str] + """ + + _attribute_map = { + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'}, + 'emails': {'key': 'emails', 'type': '[str]'}, + } + + def __init__(self, *, is_enabled: bool=None, email_subscription_admins: bool=True, emails=None, **kwargs) -> None: + super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs) + self.is_enabled = is_enabled + self.email_subscription_admins = email_subscription_admins + self.emails = emails + + +class VulnerabilityAssessmentScanError(Model): + """Properties of a vulnerability assessment scan error. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(VulnerabilityAssessmentScanError, self).__init__(**kwargs) + self.code = None + self.message = None + + +class VulnerabilityAssessmentScanRecord(ProxyResource): + """A vulnerability assessment scan record. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar scan_id: The scan ID. + :vartype scan_id: str + :ivar trigger_type: The scan trigger type. Possible values include: + 'OnDemand', 'Recurring' + :vartype trigger_type: str or + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanTriggerType + :ivar state: The scan status. Possible values include: 'Passed', 'Failed', + 'FailedToRun', 'InProgress' + :vartype state: str or + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanState + :ivar start_time: The scan start time (UTC). + :vartype start_time: datetime + :ivar end_time: The scan end time (UTC). + :vartype end_time: datetime + :ivar errors: The scan errors. + :vartype errors: + list[~azure.mgmt.sql.models.VulnerabilityAssessmentScanError] + :ivar storage_container_path: The scan results storage container path. + :vartype storage_container_path: str + :ivar number_of_failed_security_checks: The number of failed security + checks. + :vartype number_of_failed_security_checks: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'scan_id': {'readonly': True}, + 'trigger_type': {'readonly': True}, + 'state': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'errors': {'readonly': True}, + 'storage_container_path': {'readonly': True}, + 'number_of_failed_security_checks': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'scan_id': {'key': 'properties.scanId', 'type': 'str'}, + 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'errors': {'key': 'properties.errors', 'type': '[VulnerabilityAssessmentScanError]'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'number_of_failed_security_checks': {'key': 'properties.numberOfFailedSecurityChecks', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(VulnerabilityAssessmentScanRecord, self).__init__(**kwargs) + self.scan_id = None + self.trigger_type = None + self.state = None + self.start_time = None + self.end_time = None + self.errors = None + self.storage_container_path = None + self.number_of_failed_security_checks = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py new file mode 100644 index 000000000000..43eb7dc78de9 --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py @@ -0,0 +1,885 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class RecoverableDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`RecoverableDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RecoverableDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(RecoverableDatabasePaged, self).__init__(*args, **kwargs) +class RestorableDroppedDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`RestorableDroppedDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RestorableDroppedDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(RestorableDroppedDatabasePaged, self).__init__(*args, **kwargs) +class ServerPaged(Paged): + """ + A paging container for iterating over a list of :class:`Server ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Server]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerPaged, self).__init__(*args, **kwargs) +class DataMaskingRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`DataMaskingRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DataMaskingRule]'} + } + + def __init__(self, *args, **kwargs): + + super(DataMaskingRulePaged, self).__init__(*args, **kwargs) +class FirewallRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`FirewallRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[FirewallRule]'} + } + + def __init__(self, *args, **kwargs): + + super(FirewallRulePaged, self).__init__(*args, **kwargs) +class GeoBackupPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`GeoBackupPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GeoBackupPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(GeoBackupPolicyPaged, self).__init__(*args, **kwargs) +class MetricPaged(Paged): + """ + A paging container for iterating over a list of :class:`Metric ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Metric]'} + } + + def __init__(self, *args, **kwargs): + + super(MetricPaged, self).__init__(*args, **kwargs) +class MetricDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`MetricDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[MetricDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(MetricDefinitionPaged, self).__init__(*args, **kwargs) +class DatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`Database ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Database]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabasePaged, self).__init__(*args, **kwargs) +class ElasticPoolPaged(Paged): + """ + A paging container for iterating over a list of :class:`ElasticPool ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ElasticPool]'} + } + + def __init__(self, *args, **kwargs): + + super(ElasticPoolPaged, self).__init__(*args, **kwargs) +class RecommendedElasticPoolPaged(Paged): + """ + A paging container for iterating over a list of :class:`RecommendedElasticPool ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RecommendedElasticPool]'} + } + + def __init__(self, *args, **kwargs): + + super(RecommendedElasticPoolPaged, self).__init__(*args, **kwargs) +class RecommendedElasticPoolMetricPaged(Paged): + """ + A paging container for iterating over a list of :class:`RecommendedElasticPoolMetric ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RecommendedElasticPoolMetric]'} + } + + def __init__(self, *args, **kwargs): + + super(RecommendedElasticPoolMetricPaged, self).__init__(*args, **kwargs) +class ReplicationLinkPaged(Paged): + """ + A paging container for iterating over a list of :class:`ReplicationLink ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ReplicationLink]'} + } + + def __init__(self, *args, **kwargs): + + super(ReplicationLinkPaged, self).__init__(*args, **kwargs) +class ServerAzureADAdministratorPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerAzureADAdministrator ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerAzureADAdministrator]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerAzureADAdministratorPaged, self).__init__(*args, **kwargs) +class ServerCommunicationLinkPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerCommunicationLink ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerCommunicationLink]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerCommunicationLinkPaged, self).__init__(*args, **kwargs) +class ServiceObjectivePaged(Paged): + """ + A paging container for iterating over a list of :class:`ServiceObjective ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServiceObjective]'} + } + + def __init__(self, *args, **kwargs): + + super(ServiceObjectivePaged, self).__init__(*args, **kwargs) +class ElasticPoolActivityPaged(Paged): + """ + A paging container for iterating over a list of :class:`ElasticPoolActivity ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ElasticPoolActivity]'} + } + + def __init__(self, *args, **kwargs): + + super(ElasticPoolActivityPaged, self).__init__(*args, **kwargs) +class ElasticPoolDatabaseActivityPaged(Paged): + """ + A paging container for iterating over a list of :class:`ElasticPoolDatabaseActivity ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ElasticPoolDatabaseActivity]'} + } + + def __init__(self, *args, **kwargs): + + super(ElasticPoolDatabaseActivityPaged, self).__init__(*args, **kwargs) +class ServiceTierAdvisorPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServiceTierAdvisor ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServiceTierAdvisor]'} + } + + def __init__(self, *args, **kwargs): + + super(ServiceTierAdvisorPaged, self).__init__(*args, **kwargs) +class TransparentDataEncryptionActivityPaged(Paged): + """ + A paging container for iterating over a list of :class:`TransparentDataEncryptionActivity ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TransparentDataEncryptionActivity]'} + } + + def __init__(self, *args, **kwargs): + + super(TransparentDataEncryptionActivityPaged, self).__init__(*args, **kwargs) +class ServerUsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerUsage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerUsage]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerUsagePaged, self).__init__(*args, **kwargs) +class DatabaseUsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`DatabaseUsage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseUsage]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseUsagePaged, self).__init__(*args, **kwargs) +class EncryptionProtectorPaged(Paged): + """ + A paging container for iterating over a list of :class:`EncryptionProtector ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[EncryptionProtector]'} + } + + def __init__(self, *args, **kwargs): + + super(EncryptionProtectorPaged, self).__init__(*args, **kwargs) +class FailoverGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`FailoverGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[FailoverGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(FailoverGroupPaged, self).__init__(*args, **kwargs) +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class ServerKeyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerKey ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerKey]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerKeyPaged, self).__init__(*args, **kwargs) +class SyncAgentPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncAgent ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncAgent]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncAgentPaged, self).__init__(*args, **kwargs) +class SyncAgentLinkedDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncAgentLinkedDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncAgentLinkedDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncAgentLinkedDatabasePaged, self).__init__(*args, **kwargs) +class SyncDatabaseIdPropertiesPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncDatabaseIdProperties ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncDatabaseIdProperties]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncDatabaseIdPropertiesPaged, self).__init__(*args, **kwargs) +class SyncFullSchemaPropertiesPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncFullSchemaProperties ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncFullSchemaProperties]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncFullSchemaPropertiesPaged, self).__init__(*args, **kwargs) +class SyncGroupLogPropertiesPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncGroupLogProperties ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncGroupLogProperties]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncGroupLogPropertiesPaged, self).__init__(*args, **kwargs) +class SyncGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncGroupPaged, self).__init__(*args, **kwargs) +class SyncMemberPaged(Paged): + """ + A paging container for iterating over a list of :class:`SyncMember ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SyncMember]'} + } + + def __init__(self, *args, **kwargs): + + super(SyncMemberPaged, self).__init__(*args, **kwargs) +class SubscriptionUsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`SubscriptionUsage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SubscriptionUsage]'} + } + + def __init__(self, *args, **kwargs): + + super(SubscriptionUsagePaged, self).__init__(*args, **kwargs) +class VirtualClusterPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualCluster ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualCluster]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualClusterPaged, self).__init__(*args, **kwargs) +class VirtualNetworkRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualNetworkRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualNetworkRule]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualNetworkRulePaged, self).__init__(*args, **kwargs) +class DatabaseVulnerabilityAssessmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`DatabaseVulnerabilityAssessment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseVulnerabilityAssessment]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) +class JobAgentPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobAgent ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobAgent]'} + } + + def __init__(self, *args, **kwargs): + + super(JobAgentPaged, self).__init__(*args, **kwargs) +class JobCredentialPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobCredential ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobCredential]'} + } + + def __init__(self, *args, **kwargs): + + super(JobCredentialPaged, self).__init__(*args, **kwargs) +class JobExecutionPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobExecution ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobExecution]'} + } + + def __init__(self, *args, **kwargs): + + super(JobExecutionPaged, self).__init__(*args, **kwargs) +class JobPaged(Paged): + """ + A paging container for iterating over a list of :class:`Job ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Job]'} + } + + def __init__(self, *args, **kwargs): + + super(JobPaged, self).__init__(*args, **kwargs) +class JobStepPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobStep ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobStep]'} + } + + def __init__(self, *args, **kwargs): + + super(JobStepPaged, self).__init__(*args, **kwargs) +class JobTargetGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobTargetGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobTargetGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(JobTargetGroupPaged, self).__init__(*args, **kwargs) +class JobVersionPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobVersion ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobVersion]'} + } + + def __init__(self, *args, **kwargs): + + super(JobVersionPaged, self).__init__(*args, **kwargs) +class LongTermRetentionBackupPaged(Paged): + """ + A paging container for iterating over a list of :class:`LongTermRetentionBackup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[LongTermRetentionBackup]'} + } + + def __init__(self, *args, **kwargs): + + super(LongTermRetentionBackupPaged, self).__init__(*args, **kwargs) +class ManagedBackupShortTermRetentionPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedBackupShortTermRetentionPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedBackupShortTermRetentionPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedBackupShortTermRetentionPolicyPaged, self).__init__(*args, **kwargs) +class ManagedDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedDatabasePaged, self).__init__(*args, **kwargs) +class ServerDnsAliasPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerDnsAlias ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerDnsAlias]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerDnsAliasPaged, self).__init__(*args, **kwargs) +class ServerSecurityAlertPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerSecurityAlertPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerSecurityAlertPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) +class RestorableDroppedManagedDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`RestorableDroppedManagedDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RestorableDroppedManagedDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(RestorableDroppedManagedDatabasePaged, self).__init__(*args, **kwargs) +class RestorePointPaged(Paged): + """ + A paging container for iterating over a list of :class:`RestorePoint ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RestorePoint]'} + } + + def __init__(self, *args, **kwargs): + + super(RestorePointPaged, self).__init__(*args, **kwargs) +class ManagedDatabaseSecurityAlertPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedDatabaseSecurityAlertPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedDatabaseSecurityAlertPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedDatabaseSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) +class ManagedServerSecurityAlertPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedServerSecurityAlertPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedServerSecurityAlertPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedServerSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) +class SensitivityLabelPaged(Paged): + """ + A paging container for iterating over a list of :class:`SensitivityLabel ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SensitivityLabel]'} + } + + def __init__(self, *args, **kwargs): + + super(SensitivityLabelPaged, self).__init__(*args, **kwargs) +class DatabaseOperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`DatabaseOperation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseOperation]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseOperationPaged, self).__init__(*args, **kwargs) +class ElasticPoolOperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`ElasticPoolOperation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ElasticPoolOperation]'} + } + + def __init__(self, *args, **kwargs): + + super(ElasticPoolOperationPaged, self).__init__(*args, **kwargs) +class VulnerabilityAssessmentScanRecordPaged(Paged): + """ + A paging container for iterating over a list of :class:`VulnerabilityAssessmentScanRecord ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VulnerabilityAssessmentScanRecord]'} + } + + def __init__(self, *args, **kwargs): + + super(VulnerabilityAssessmentScanRecordPaged, self).__init__(*args, **kwargs) +class InstanceFailoverGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`InstanceFailoverGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[InstanceFailoverGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(InstanceFailoverGroupPaged, self).__init__(*args, **kwargs) +class BackupShortTermRetentionPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`BackupShortTermRetentionPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BackupShortTermRetentionPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(BackupShortTermRetentionPolicyPaged, self).__init__(*args, **kwargs) +class ManagedInstanceKeyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedInstanceKey ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedInstanceKey]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedInstanceKeyPaged, self).__init__(*args, **kwargs) +class ManagedInstanceEncryptionProtectorPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedInstanceEncryptionProtector ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedInstanceEncryptionProtector]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedInstanceEncryptionProtectorPaged, self).__init__(*args, **kwargs) +class RecoverableManagedDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`RecoverableManagedDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RecoverableManagedDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(RecoverableManagedDatabasePaged, self).__init__(*args, **kwargs) +class ManagedInstanceVulnerabilityAssessmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedInstanceVulnerabilityAssessment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedInstanceVulnerabilityAssessment]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedInstanceVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) +class ServerVulnerabilityAssessmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerVulnerabilityAssessment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerVulnerabilityAssessment]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) +class InstancePoolPaged(Paged): + """ + A paging container for iterating over a list of :class:`InstancePool ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[InstancePool]'} + } + + def __init__(self, *args, **kwargs): + + super(InstancePoolPaged, self).__init__(*args, **kwargs) +class UsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Usage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Usage]'} + } + + def __init__(self, *args, **kwargs): + + super(UsagePaged, self).__init__(*args, **kwargs) +class ManagedInstancePaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedInstance ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedInstance]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedInstancePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py index de1d73caf27c..0ac10a4f69f8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py @@ -85,6 +85,9 @@ class DatabaseEdition(str, Enum): data_warehouse = "DataWarehouse" system = "System" system2 = "System2" + general_purpose = "GeneralPurpose" + business_critical = "BusinessCritical" + hyperscale = "Hyperscale" class ServiceObjectiveName(str, Enum): @@ -203,6 +206,8 @@ class ElasticPoolEdition(str, Enum): basic = "Basic" standard = "Standard" premium = "Premium" + general_purpose = "GeneralPurpose" + business_critical = "BusinessCritical" class ReplicationRole(str, Enum): @@ -320,24 +325,17 @@ class FailoverGroupReplicationRole(str, Enum): secondary = "Secondary" -class IdentityType(str, Enum): - - system_assigned = "SystemAssigned" - - -class ManagedInstanceProxyOverride(str, Enum): - - proxy = "Proxy" - redirect = "Redirect" - default = "Default" - - class OperationOrigin(str, Enum): user = "user" system = "system" +class IdentityType(str, Enum): + + system_assigned = "SystemAssigned" + + class SyncAgentState(str, Enum): online = "Online" @@ -612,6 +610,8 @@ class DatabaseStatus(str, Enum): paused = "Paused" resuming = "Resuming" scaling = "Scaling" + offline_changing_dw_performance_tiers = "OfflineChangingDwPerformanceTiers" + online_changing_dw_performance_tiers = "OnlineChangingDwPerformanceTiers" class DatabaseLicenseType(str, Enum): @@ -659,6 +659,31 @@ class InstanceFailoverGroupReplicationRole(str, Enum): secondary = "Secondary" +class InstancePoolLicenseType(str, Enum): + + license_included = "LicenseIncluded" + base_price = "BasePrice" + + +class ManagedServerCreateMode(str, Enum): + + default = "Default" + point_in_time_restore = "PointInTimeRestore" + + +class ManagedInstanceLicenseType(str, Enum): + + license_included = "LicenseIncluded" + base_price = "BasePrice" + + +class ManagedInstanceProxyOverride(str, Enum): + + proxy = "Proxy" + redirect = "Redirect" + default = "Default" + + class LongTermRetentionDatabaseState(str, Enum): all = "All" diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options.py deleted file mode 100644 index 42c5aa7ac8a1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutomaticTuningOptions(Model): - """Automatic tuning properties for individual advisors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param desired_state: Automatic tuning option desired state. Possible - values include: 'Off', 'On', 'Default' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired - :ivar actual_state: Automatic tuning option actual state. Possible values - include: 'Off', 'On' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual - :ivar reason_code: Reason code if desired and actual state are different. - :vartype reason_code: int - :ivar reason_desc: Reason description if desired and actual state are - different. Possible values include: 'Default', 'Disabled', - 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', - 'QueryStoreReadOnly', 'NotSupported' - :vartype reason_desc: str or - ~azure.mgmt.sql.models.AutomaticTuningDisabledReason - """ - - _validation = { - 'actual_state': {'readonly': True}, - 'reason_code': {'readonly': True}, - 'reason_desc': {'readonly': True}, - } - - _attribute_map = { - 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, - 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, - 'reason_code': {'key': 'reasonCode', 'type': 'int'}, - 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningDisabledReason'}, - } - - def __init__(self, **kwargs): - super(AutomaticTuningOptions, self).__init__(**kwargs) - self.desired_state = kwargs.get('desired_state', None) - self.actual_state = None - self.reason_code = None - self.reason_desc = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options_py3.py deleted file mode 100644 index b55fd35d8157..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutomaticTuningOptions(Model): - """Automatic tuning properties for individual advisors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param desired_state: Automatic tuning option desired state. Possible - values include: 'Off', 'On', 'Default' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired - :ivar actual_state: Automatic tuning option actual state. Possible values - include: 'Off', 'On' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual - :ivar reason_code: Reason code if desired and actual state are different. - :vartype reason_code: int - :ivar reason_desc: Reason description if desired and actual state are - different. Possible values include: 'Default', 'Disabled', - 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', - 'QueryStoreReadOnly', 'NotSupported' - :vartype reason_desc: str or - ~azure.mgmt.sql.models.AutomaticTuningDisabledReason - """ - - _validation = { - 'actual_state': {'readonly': True}, - 'reason_code': {'readonly': True}, - 'reason_desc': {'readonly': True}, - } - - _attribute_map = { - 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, - 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, - 'reason_code': {'key': 'reasonCode', 'type': 'int'}, - 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningDisabledReason'}, - } - - def __init__(self, *, desired_state=None, **kwargs) -> None: - super(AutomaticTuningOptions, self).__init__(**kwargs) - self.desired_state = desired_state - self.actual_state = None - self.reason_code = None - self.reason_desc = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options.py deleted file mode 100644 index ef7fbcc75e4b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutomaticTuningServerOptions(Model): - """Automatic tuning properties for individual advisors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param desired_state: Automatic tuning option desired state. Possible - values include: 'Off', 'On', 'Default' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired - :ivar actual_state: Automatic tuning option actual state. Possible values - include: 'Off', 'On' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual - :ivar reason_code: Reason code if desired and actual state are different. - :vartype reason_code: int - :ivar reason_desc: Reason description if desired and actual state are - different. Possible values include: 'Default', 'Disabled', - 'AutoConfigured' - :vartype reason_desc: str or - ~azure.mgmt.sql.models.AutomaticTuningServerReason - """ - - _validation = { - 'actual_state': {'readonly': True}, - 'reason_code': {'readonly': True}, - 'reason_desc': {'readonly': True}, - } - - _attribute_map = { - 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, - 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, - 'reason_code': {'key': 'reasonCode', 'type': 'int'}, - 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningServerReason'}, - } - - def __init__(self, **kwargs): - super(AutomaticTuningServerOptions, self).__init__(**kwargs) - self.desired_state = kwargs.get('desired_state', None) - self.actual_state = None - self.reason_code = None - self.reason_desc = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options_py3.py deleted file mode 100644 index 28e5fc0873ad..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutomaticTuningServerOptions(Model): - """Automatic tuning properties for individual advisors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param desired_state: Automatic tuning option desired state. Possible - values include: 'Off', 'On', 'Default' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired - :ivar actual_state: Automatic tuning option actual state. Possible values - include: 'Off', 'On' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual - :ivar reason_code: Reason code if desired and actual state are different. - :vartype reason_code: int - :ivar reason_desc: Reason description if desired and actual state are - different. Possible values include: 'Default', 'Disabled', - 'AutoConfigured' - :vartype reason_desc: str or - ~azure.mgmt.sql.models.AutomaticTuningServerReason - """ - - _validation = { - 'actual_state': {'readonly': True}, - 'reason_code': {'readonly': True}, - 'reason_desc': {'readonly': True}, - } - - _attribute_map = { - 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, - 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, - 'reason_code': {'key': 'reasonCode', 'type': 'int'}, - 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningServerReason'}, - } - - def __init__(self, *, desired_state=None, **kwargs) -> None: - super(AutomaticTuningServerOptions, self).__init__(**kwargs) - self.desired_state = desired_state - self.actual_state = None - self.reason_code = None - self.reason_desc = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy.py deleted file mode 100644 index 544110988a82..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class BackupLongTermRetentionPolicy(ProxyResource): - """A long term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param weekly_retention: The weekly retention policy for an LTR backup in - an ISO 8601 format. - :type weekly_retention: str - :param monthly_retention: The monthly retention policy for an LTR backup - in an ISO 8601 format. - :type monthly_retention: str - :param yearly_retention: The yearly retention policy for an LTR backup in - an ISO 8601 format. - :type yearly_retention: str - :param week_of_year: The week of year to take the yearly backup in an ISO - 8601 format. - :type week_of_year: int - """ - - _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'}, - 'weekly_retention': {'key': 'properties.weeklyRetention', 'type': 'str'}, - 'monthly_retention': {'key': 'properties.monthlyRetention', 'type': 'str'}, - 'yearly_retention': {'key': 'properties.yearlyRetention', 'type': 'str'}, - 'week_of_year': {'key': 'properties.weekOfYear', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(BackupLongTermRetentionPolicy, self).__init__(**kwargs) - self.weekly_retention = kwargs.get('weekly_retention', None) - self.monthly_retention = kwargs.get('monthly_retention', None) - self.yearly_retention = kwargs.get('yearly_retention', None) - self.week_of_year = kwargs.get('week_of_year', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_py3.py deleted file mode 100644 index 6e7cb8ace394..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class BackupLongTermRetentionPolicy(ProxyResource): - """A long term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param weekly_retention: The weekly retention policy for an LTR backup in - an ISO 8601 format. - :type weekly_retention: str - :param monthly_retention: The monthly retention policy for an LTR backup - in an ISO 8601 format. - :type monthly_retention: str - :param yearly_retention: The yearly retention policy for an LTR backup in - an ISO 8601 format. - :type yearly_retention: str - :param week_of_year: The week of year to take the yearly backup in an ISO - 8601 format. - :type week_of_year: int - """ - - _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'}, - 'weekly_retention': {'key': 'properties.weeklyRetention', 'type': 'str'}, - 'monthly_retention': {'key': 'properties.monthlyRetention', 'type': 'str'}, - 'yearly_retention': {'key': 'properties.yearlyRetention', 'type': 'str'}, - 'week_of_year': {'key': 'properties.weekOfYear', 'type': 'int'}, - } - - def __init__(self, *, weekly_retention: str=None, monthly_retention: str=None, yearly_retention: str=None, week_of_year: int=None, **kwargs) -> None: - super(BackupLongTermRetentionPolicy, self).__init__(**kwargs) - self.weekly_retention = weekly_retention - self.monthly_retention = monthly_retention - self.yearly_retention = yearly_retention - self.week_of_year = week_of_year diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy.py deleted file mode 100644 index 1d4fba2cfff4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class BackupShortTermRetentionPolicy(ProxyResource): - """A short term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param retention_days: The backup retention period in days. This is how - many days Point-in-Time Restore will be supported. - :type retention_days: int - """ - - _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'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) - self.retention_days = kwargs.get('retention_days', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_paged.py deleted file mode 100644 index 16d31e341795..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class BackupShortTermRetentionPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`BackupShortTermRetentionPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[BackupShortTermRetentionPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(BackupShortTermRetentionPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_py3.py deleted file mode 100644 index 9df25577baf3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class BackupShortTermRetentionPolicy(ProxyResource): - """A short term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param retention_days: The backup retention period in days. This is how - many days Point-in-Time Restore will be supported. - :type retention_days: int - """ - - _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'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, *, retention_days: int=None, **kwargs) -> None: - super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) - self.retention_days = retention_days diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request.py deleted file mode 100644 index 345059f6dd49..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailabilityRequest(Model): - """A request to check whether the specified name for a resource is available. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name whose availability is to be checked. - :type name: str - :ivar type: Required. The type of resource that is used as the scope of - the availability check. Default value: "Microsoft.Sql/servers" . - :vartype type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - type = "Microsoft.Sql/servers" - - def __init__(self, **kwargs): - super(CheckNameAvailabilityRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request_py3.py deleted file mode 100644 index 5399ec3a7ffb..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailabilityRequest(Model): - """A request to check whether the specified name for a resource is available. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name whose availability is to be checked. - :type name: str - :ivar type: Required. The type of resource that is used as the scope of - the availability check. Default value: "Microsoft.Sql/servers" . - :vartype type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - type = "Microsoft.Sql/servers" - - def __init__(self, *, name: str, **kwargs) -> None: - super(CheckNameAvailabilityRequest, self).__init__(**kwargs) - self.name = name diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response.py deleted file mode 100644 index 40f429db82da..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailabilityResponse(Model): - """A response indicating whether the specified name for a resource is - available. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar available: True if the name is available, otherwise false. - :vartype available: bool - :ivar message: A message explaining why the name is unavailable. Will be - null if the name is available. - :vartype message: str - :ivar name: The name whose availability was checked. - :vartype name: str - :ivar reason: The reason code explaining why the name is unavailable. Will - be null if the name is available. Possible values include: 'Invalid', - 'AlreadyExists' - :vartype reason: str or ~azure.mgmt.sql.models.CheckNameAvailabilityReason - """ - - _validation = { - 'available': {'readonly': True}, - 'message': {'readonly': True}, - 'name': {'readonly': True}, - 'reason': {'readonly': True}, - } - - _attribute_map = { - 'available': {'key': 'available', 'type': 'bool'}, - 'message': {'key': 'message', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'reason': {'key': 'reason', 'type': 'CheckNameAvailabilityReason'}, - } - - def __init__(self, **kwargs): - super(CheckNameAvailabilityResponse, self).__init__(**kwargs) - self.available = None - self.message = None - self.name = None - self.reason = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response_py3.py deleted file mode 100644 index 613c8fd41661..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailabilityResponse(Model): - """A response indicating whether the specified name for a resource is - available. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar available: True if the name is available, otherwise false. - :vartype available: bool - :ivar message: A message explaining why the name is unavailable. Will be - null if the name is available. - :vartype message: str - :ivar name: The name whose availability was checked. - :vartype name: str - :ivar reason: The reason code explaining why the name is unavailable. Will - be null if the name is available. Possible values include: 'Invalid', - 'AlreadyExists' - :vartype reason: str or ~azure.mgmt.sql.models.CheckNameAvailabilityReason - """ - - _validation = { - 'available': {'readonly': True}, - 'message': {'readonly': True}, - 'name': {'readonly': True}, - 'reason': {'readonly': True}, - } - - _attribute_map = { - 'available': {'key': 'available', 'type': 'bool'}, - 'message': {'key': 'message', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'reason': {'key': 'reason', 'type': 'CheckNameAvailabilityReason'}, - } - - def __init__(self, **kwargs) -> None: - super(CheckNameAvailabilityResponse, self).__init__(**kwargs) - self.available = None - self.message = None - self.name = None - self.reason = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition.py deleted file mode 100644 index 926012a21f09..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CompleteDatabaseRestoreDefinition(Model): - """Contains the information necessary to perform a complete database restore - operation. - - All required parameters must be populated in order to send to Azure. - - :param last_backup_name: Required. The last backup name to apply - :type last_backup_name: str - """ - - _validation = { - 'last_backup_name': {'required': True}, - } - - _attribute_map = { - 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CompleteDatabaseRestoreDefinition, self).__init__(**kwargs) - self.last_backup_name = kwargs.get('last_backup_name', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition_py3.py deleted file mode 100644 index 8b3c7f3da1f8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CompleteDatabaseRestoreDefinition(Model): - """Contains the information necessary to perform a complete database restore - operation. - - All required parameters must be populated in order to send to Azure. - - :param last_backup_name: Required. The last backup name to apply - :type last_backup_name: str - """ - - _validation = { - 'last_backup_name': {'required': True}, - } - - _attribute_map = { - 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, - } - - def __init__(self, *, last_backup_name: str, **kwargs) -> None: - super(CompleteDatabaseRestoreDefinition, self).__init__(**kwargs) - self.last_backup_name = last_backup_name diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition.py deleted file mode 100644 index 34ae6626306e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreateDatabaseRestorePointDefinition(Model): - """Contains the information necessary to perform a create database restore - point operation. - - All required parameters must be populated in order to send to Azure. - - :param restore_point_label: Required. The restore point label to apply - :type restore_point_label: str - """ - - _validation = { - 'restore_point_label': {'required': True}, - } - - _attribute_map = { - 'restore_point_label': {'key': 'restorePointLabel', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CreateDatabaseRestorePointDefinition, self).__init__(**kwargs) - self.restore_point_label = kwargs.get('restore_point_label', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition_py3.py deleted file mode 100644 index 7200fc8c236a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreateDatabaseRestorePointDefinition(Model): - """Contains the information necessary to perform a create database restore - point operation. - - All required parameters must be populated in order to send to Azure. - - :param restore_point_label: Required. The restore point label to apply - :type restore_point_label: str - """ - - _validation = { - 'restore_point_label': {'required': True}, - } - - _attribute_map = { - 'restore_point_label': {'key': 'restorePointLabel', 'type': 'str'}, - } - - def __init__(self, *, restore_point_label: str, **kwargs) -> None: - super(CreateDatabaseRestorePointDefinition, self).__init__(**kwargs) - self.restore_point_label = restore_point_label diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy.py deleted file mode 100644 index a872d3af9676..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DataMaskingPolicy(ProxyResource): - """Represents a database data masking policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param data_masking_state: Required. The state of the data masking policy. - Possible values include: 'Disabled', 'Enabled' - :type data_masking_state: str or ~azure.mgmt.sql.models.DataMaskingState - :param exempt_principals: The list of the exempt principals. Specifies the - semicolon-separated list of database users for which the data masking - policy does not apply. The specified users receive data results without - masking for all of the database queries. - :type exempt_principals: str - :ivar application_principals: The list of the application principals. This - is a legacy parameter and is no longer used. - :vartype application_principals: str - :ivar masking_level: The masking level. This is a legacy parameter and is - no longer used. - :vartype masking_level: str - :ivar location: The location of the data masking policy. - :vartype location: str - :ivar kind: The kind of data masking policy. Metadata, used for Azure - portal. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'data_masking_state': {'required': True}, - 'application_principals': {'readonly': True}, - 'masking_level': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data_masking_state': {'key': 'properties.dataMaskingState', 'type': 'DataMaskingState'}, - 'exempt_principals': {'key': 'properties.exemptPrincipals', 'type': 'str'}, - 'application_principals': {'key': 'properties.applicationPrincipals', 'type': 'str'}, - 'masking_level': {'key': 'properties.maskingLevel', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataMaskingPolicy, self).__init__(**kwargs) - self.data_masking_state = kwargs.get('data_masking_state', None) - self.exempt_principals = kwargs.get('exempt_principals', None) - self.application_principals = None - self.masking_level = None - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy_py3.py deleted file mode 100644 index c2227aeb60da..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DataMaskingPolicy(ProxyResource): - """Represents a database data masking policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param data_masking_state: Required. The state of the data masking policy. - Possible values include: 'Disabled', 'Enabled' - :type data_masking_state: str or ~azure.mgmt.sql.models.DataMaskingState - :param exempt_principals: The list of the exempt principals. Specifies the - semicolon-separated list of database users for which the data masking - policy does not apply. The specified users receive data results without - masking for all of the database queries. - :type exempt_principals: str - :ivar application_principals: The list of the application principals. This - is a legacy parameter and is no longer used. - :vartype application_principals: str - :ivar masking_level: The masking level. This is a legacy parameter and is - no longer used. - :vartype masking_level: str - :ivar location: The location of the data masking policy. - :vartype location: str - :ivar kind: The kind of data masking policy. Metadata, used for Azure - portal. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'data_masking_state': {'required': True}, - 'application_principals': {'readonly': True}, - 'masking_level': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data_masking_state': {'key': 'properties.dataMaskingState', 'type': 'DataMaskingState'}, - 'exempt_principals': {'key': 'properties.exemptPrincipals', 'type': 'str'}, - 'application_principals': {'key': 'properties.applicationPrincipals', 'type': 'str'}, - 'masking_level': {'key': 'properties.maskingLevel', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, data_masking_state, exempt_principals: str=None, **kwargs) -> None: - super(DataMaskingPolicy, self).__init__(**kwargs) - self.data_masking_state = data_masking_state - self.exempt_principals = exempt_principals - self.application_principals = None - self.masking_level = None - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule.py deleted file mode 100644 index 9c31fca591b6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DataMaskingRule(ProxyResource): - """Represents a database data masking rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar data_masking_rule_id: The rule Id. - :vartype data_masking_rule_id: str - :param alias_name: The alias name. This is a legacy parameter and is no - longer used. - :type alias_name: str - :param rule_state: The rule state. Used to delete a rule. To delete an - existing rule, specify the schemaName, tableName, columnName, - maskingFunction, and specify ruleState as disabled. However, if the rule - doesn't already exist, the rule will be created with ruleState set to - enabled, regardless of the provided value of ruleState. Possible values - include: 'Disabled', 'Enabled' - :type rule_state: str or ~azure.mgmt.sql.models.DataMaskingRuleState - :param schema_name: Required. The schema name on which the data masking - rule is applied. - :type schema_name: str - :param table_name: Required. The table name on which the data masking rule - is applied. - :type table_name: str - :param column_name: Required. The column name on which the data masking - rule is applied. - :type column_name: str - :param masking_function: Required. The masking function that is used for - the data masking rule. Possible values include: 'Default', 'CCN', 'Email', - 'Number', 'SSN', 'Text' - :type masking_function: str or ~azure.mgmt.sql.models.DataMaskingFunction - :param number_from: The numberFrom property of the masking rule. Required - if maskingFunction is set to Number, otherwise this parameter will be - ignored. - :type number_from: str - :param number_to: The numberTo property of the data masking rule. Required - if maskingFunction is set to Number, otherwise this parameter will be - ignored. - :type number_to: str - :param prefix_size: If maskingFunction is set to Text, the number of - characters to show unmasked in the beginning of the string. Otherwise, - this parameter will be ignored. - :type prefix_size: str - :param suffix_size: If maskingFunction is set to Text, the number of - characters to show unmasked at the end of the string. Otherwise, this - parameter will be ignored. - :type suffix_size: str - :param replacement_string: If maskingFunction is set to Text, the - character to use for masking the unexposed part of the string. Otherwise, - this parameter will be ignored. - :type replacement_string: str - :ivar location: The location of the data masking rule. - :vartype location: str - :ivar kind: The kind of Data Masking Rule. Metadata, used for Azure - portal. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'data_masking_rule_id': {'readonly': True}, - 'schema_name': {'required': True}, - 'table_name': {'required': True}, - 'column_name': {'required': True}, - 'masking_function': {'required': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data_masking_rule_id': {'key': 'properties.id', 'type': 'str'}, - 'alias_name': {'key': 'properties.aliasName', 'type': 'str'}, - 'rule_state': {'key': 'properties.ruleState', 'type': 'DataMaskingRuleState'}, - 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, - 'table_name': {'key': 'properties.tableName', 'type': 'str'}, - 'column_name': {'key': 'properties.columnName', 'type': 'str'}, - 'masking_function': {'key': 'properties.maskingFunction', 'type': 'DataMaskingFunction'}, - 'number_from': {'key': 'properties.numberFrom', 'type': 'str'}, - 'number_to': {'key': 'properties.numberTo', 'type': 'str'}, - 'prefix_size': {'key': 'properties.prefixSize', 'type': 'str'}, - 'suffix_size': {'key': 'properties.suffixSize', 'type': 'str'}, - 'replacement_string': {'key': 'properties.replacementString', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataMaskingRule, self).__init__(**kwargs) - self.data_masking_rule_id = None - self.alias_name = kwargs.get('alias_name', None) - self.rule_state = kwargs.get('rule_state', None) - self.schema_name = kwargs.get('schema_name', None) - self.table_name = kwargs.get('table_name', None) - self.column_name = kwargs.get('column_name', None) - self.masking_function = kwargs.get('masking_function', None) - self.number_from = kwargs.get('number_from', None) - self.number_to = kwargs.get('number_to', None) - self.prefix_size = kwargs.get('prefix_size', None) - self.suffix_size = kwargs.get('suffix_size', None) - self.replacement_string = kwargs.get('replacement_string', None) - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_paged.py deleted file mode 100644 index 4e1eed7b9f51..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DataMaskingRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`DataMaskingRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DataMaskingRule]'} - } - - def __init__(self, *args, **kwargs): - - super(DataMaskingRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_py3.py deleted file mode 100644 index 775fd78a2d6b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_py3.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DataMaskingRule(ProxyResource): - """Represents a database data masking rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar data_masking_rule_id: The rule Id. - :vartype data_masking_rule_id: str - :param alias_name: The alias name. This is a legacy parameter and is no - longer used. - :type alias_name: str - :param rule_state: The rule state. Used to delete a rule. To delete an - existing rule, specify the schemaName, tableName, columnName, - maskingFunction, and specify ruleState as disabled. However, if the rule - doesn't already exist, the rule will be created with ruleState set to - enabled, regardless of the provided value of ruleState. Possible values - include: 'Disabled', 'Enabled' - :type rule_state: str or ~azure.mgmt.sql.models.DataMaskingRuleState - :param schema_name: Required. The schema name on which the data masking - rule is applied. - :type schema_name: str - :param table_name: Required. The table name on which the data masking rule - is applied. - :type table_name: str - :param column_name: Required. The column name on which the data masking - rule is applied. - :type column_name: str - :param masking_function: Required. The masking function that is used for - the data masking rule. Possible values include: 'Default', 'CCN', 'Email', - 'Number', 'SSN', 'Text' - :type masking_function: str or ~azure.mgmt.sql.models.DataMaskingFunction - :param number_from: The numberFrom property of the masking rule. Required - if maskingFunction is set to Number, otherwise this parameter will be - ignored. - :type number_from: str - :param number_to: The numberTo property of the data masking rule. Required - if maskingFunction is set to Number, otherwise this parameter will be - ignored. - :type number_to: str - :param prefix_size: If maskingFunction is set to Text, the number of - characters to show unmasked in the beginning of the string. Otherwise, - this parameter will be ignored. - :type prefix_size: str - :param suffix_size: If maskingFunction is set to Text, the number of - characters to show unmasked at the end of the string. Otherwise, this - parameter will be ignored. - :type suffix_size: str - :param replacement_string: If maskingFunction is set to Text, the - character to use for masking the unexposed part of the string. Otherwise, - this parameter will be ignored. - :type replacement_string: str - :ivar location: The location of the data masking rule. - :vartype location: str - :ivar kind: The kind of Data Masking Rule. Metadata, used for Azure - portal. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'data_masking_rule_id': {'readonly': True}, - 'schema_name': {'required': True}, - 'table_name': {'required': True}, - 'column_name': {'required': True}, - 'masking_function': {'required': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data_masking_rule_id': {'key': 'properties.id', 'type': 'str'}, - 'alias_name': {'key': 'properties.aliasName', 'type': 'str'}, - 'rule_state': {'key': 'properties.ruleState', 'type': 'DataMaskingRuleState'}, - 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, - 'table_name': {'key': 'properties.tableName', 'type': 'str'}, - 'column_name': {'key': 'properties.columnName', 'type': 'str'}, - 'masking_function': {'key': 'properties.maskingFunction', 'type': 'DataMaskingFunction'}, - 'number_from': {'key': 'properties.numberFrom', 'type': 'str'}, - 'number_to': {'key': 'properties.numberTo', 'type': 'str'}, - 'prefix_size': {'key': 'properties.prefixSize', 'type': 'str'}, - 'suffix_size': {'key': 'properties.suffixSize', 'type': 'str'}, - 'replacement_string': {'key': 'properties.replacementString', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, schema_name: str, table_name: str, column_name: str, masking_function, alias_name: str=None, rule_state=None, number_from: str=None, number_to: str=None, prefix_size: str=None, suffix_size: str=None, replacement_string: str=None, **kwargs) -> None: - super(DataMaskingRule, self).__init__(**kwargs) - self.data_masking_rule_id = None - self.alias_name = alias_name - self.rule_state = rule_state - self.schema_name = schema_name - self.table_name = table_name - self.column_name = column_name - self.masking_function = masking_function - self.number_from = number_from - self.number_to = number_to - self.prefix_size = prefix_size - self.suffix_size = suffix_size - self.replacement_string = replacement_string - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database.py deleted file mode 100644 index f3f66d024a7a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database.py +++ /dev/null @@ -1,237 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class Database(TrackedResource): - """A database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :ivar kind: Kind of database. This is metadata used for the Azure portal - experience. - :vartype kind: str - :ivar managed_by: Resource that manages the database. - :vartype managed_by: str - :param create_mode: Specifies the mode of database creation. - Default: regular database creation. - Copy: creates a database as a copy of an existing database. - sourceDatabaseId must be specified as the resource ID of the source - database. - Secondary: creates a database as a secondary replica of an existing - database. sourceDatabaseId must be specified as the resource ID of the - existing primary database. - PointInTimeRestore: Creates a database by restoring a point in time backup - of an existing database. sourceDatabaseId must be specified as the - resource ID of the existing database, and restorePointInTime must be - specified. - Recovery: Creates a database by restoring a geo-replicated backup. - sourceDatabaseId must be specified as the recoverable database resource ID - to restore. - Restore: Creates a database by restoring a backup of a deleted database. - sourceDatabaseId must be specified. If sourceDatabaseId is the database's - original resource ID, then sourceDatabaseDeletionDate must be specified. - Otherwise sourceDatabaseId must be the restorable dropped database - resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime - may also be specified to restore from an earlier point in time. - RestoreLongTermRetentionBackup: Creates a database by restoring from a - long term retention vault. recoveryServicesRecoveryPointResourceId must be - specified as the recovery point resource ID. - Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for - DataWarehouse edition. Possible values include: 'Default', 'Copy', - 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', - 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', - 'RestoreLongTermRetentionBackup', 'OnlineSecondary' - :type create_mode: str or ~azure.mgmt.sql.models.CreateMode - :param collation: The collation of the database. - :type collation: str - :param max_size_bytes: The max size of the database expressed in bytes. - :type max_size_bytes: long - :param sample_name: The name of the sample schema to apply when creating - this database. Possible values include: 'AdventureWorksLT', - 'WideWorldImportersStd', 'WideWorldImportersFull' - :type sample_name: str or ~azure.mgmt.sql.models.SampleName - :param elastic_pool_id: The resource identifier of the elastic pool - containing this database. - :type elastic_pool_id: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :ivar status: The status of the database. Possible values include: - 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', - 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', - 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', - 'Paused', 'Resuming', 'Scaling' - :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus - :ivar database_id: The ID of the database. - :vartype database_id: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar current_service_objective_name: The current service level objective - name of the database. - :vartype current_service_objective_name: str - :ivar requested_service_objective_name: The requested service level - objective name of the database. - :vartype requested_service_objective_name: str - :ivar default_secondary_location: The default secondary region for this - database. - :vartype default_secondary_location: str - :ivar failover_group_id: Failover Group resource identifier that this - database belongs to. - :vartype failover_group_id: str - :param restore_point_in_time: Specifies the point in time (ISO8601 format) - of the source database that will be restored to create the new database. - :type restore_point_in_time: datetime - :param source_database_deletion_date: Specifies the time that the database - was deleted. - :type source_database_deletion_date: datetime - :param recovery_services_recovery_point_id: The resource identifier of the - recovery point associated with create operation of this database. - :type recovery_services_recovery_point_id: str - :param long_term_retention_backup_resource_id: The resource identifier of - the long term retention backup associated with create operation of this - database. - :type long_term_retention_backup_resource_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param restorable_dropped_database_id: The resource identifier of the - restorable dropped database associated with create operation of this - database. - :type restorable_dropped_database_id: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param zone_redundant: Whether or not this database is zone redundant, - which means the replicas of this database will be spread across multiple - availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this database. Possible - values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType - :ivar max_log_size_bytes: The max log size for this database. - :vartype max_log_size_bytes: long - :ivar earliest_restore_date: This records the earliest start date and time - that restore is available for this database (ISO8601 format). - :vartype earliest_restore_date: datetime - :param read_scale: The state of read-only routing. If enabled, connections - that have application intent set to readonly in their connection string - may be routed to a readonly secondary replica in the same region. Possible - values include: 'Enabled', 'Disabled' - :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale - :ivar current_sku: The name and tier of the SKU. - :vartype current_sku: ~azure.mgmt.sql.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'managed_by': {'readonly': True}, - 'status': {'readonly': True}, - 'database_id': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'current_service_objective_name': {'readonly': True}, - 'requested_service_objective_name': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - 'max_log_size_bytes': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'current_sku': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, - 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, - 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, - 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, - 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, - 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs): - super(Database, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.kind = None - self.managed_by = None - self.create_mode = kwargs.get('create_mode', None) - self.collation = kwargs.get('collation', None) - self.max_size_bytes = kwargs.get('max_size_bytes', None) - self.sample_name = kwargs.get('sample_name', None) - self.elastic_pool_id = kwargs.get('elastic_pool_id', None) - self.source_database_id = kwargs.get('source_database_id', None) - self.status = None - self.database_id = None - self.creation_date = None - self.current_service_objective_name = None - self.requested_service_objective_name = None - self.default_secondary_location = None - self.failover_group_id = None - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.source_database_deletion_date = kwargs.get('source_database_deletion_date', None) - self.recovery_services_recovery_point_id = kwargs.get('recovery_services_recovery_point_id', None) - self.long_term_retention_backup_resource_id = kwargs.get('long_term_retention_backup_resource_id', None) - self.recoverable_database_id = kwargs.get('recoverable_database_id', None) - self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) - self.catalog_collation = kwargs.get('catalog_collation', None) - self.zone_redundant = kwargs.get('zone_redundant', None) - self.license_type = kwargs.get('license_type', None) - self.max_log_size_bytes = None - self.earliest_restore_date = None - self.read_scale = kwargs.get('read_scale', None) - self.current_sku = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning.py deleted file mode 100644 index eca56cffda2c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseAutomaticTuning(ProxyResource): - """Database-level Automatic Tuning. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param desired_state: Automatic tuning desired state. Possible values - include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode - :ivar actual_state: Automatic tuning actual state. Possible values - include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - :vartype actual_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode - :param options: Automatic tuning options definition. - :type options: dict[str, ~azure.mgmt.sql.models.AutomaticTuningOptions] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'actual_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningMode'}, - 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningMode'}, - 'options': {'key': 'properties.options', 'type': '{AutomaticTuningOptions}'}, - } - - def __init__(self, **kwargs): - super(DatabaseAutomaticTuning, self).__init__(**kwargs) - self.desired_state = kwargs.get('desired_state', None) - self.actual_state = None - self.options = kwargs.get('options', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning_py3.py deleted file mode 100644 index 86bb068ce54f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseAutomaticTuning(ProxyResource): - """Database-level Automatic Tuning. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param desired_state: Automatic tuning desired state. Possible values - include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode - :ivar actual_state: Automatic tuning actual state. Possible values - include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - :vartype actual_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode - :param options: Automatic tuning options definition. - :type options: dict[str, ~azure.mgmt.sql.models.AutomaticTuningOptions] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'actual_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningMode'}, - 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningMode'}, - 'options': {'key': 'properties.options', 'type': '{AutomaticTuningOptions}'}, - } - - def __init__(self, *, desired_state=None, options=None, **kwargs) -> None: - super(DatabaseAutomaticTuning, self).__init__(**kwargs) - self.desired_state = desired_state - self.actual_state = None - self.options = options diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy.py deleted file mode 100644 index 6db06ede30ad..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseBlobAuditingPolicy(ProxyResource): - """A database blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Resource kind. - :vartype kind: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DatabaseBlobAuditingPolicy, self).__init__(**kwargs) - self.kind = None - self.state = kwargs.get('state', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) - self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) - self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) - self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy_py3.py deleted file mode 100644 index 2acc43dae952..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy_py3.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseBlobAuditingPolicy(ProxyResource): - """A database blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Resource kind. - :vartype kind: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: - super(DatabaseBlobAuditingPolicy, self).__init__(**kwargs) - self.kind = None - self.state = state - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.audit_actions_and_groups = audit_actions_and_groups - self.storage_account_subscription_id = storage_account_subscription_id - self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use - self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation.py deleted file mode 100644 index fec6e0e19b64..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseOperation(ProxyResource): - """A database operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_name: The name of the database the operation is being - performed on. - :vartype database_name: str - :ivar operation: The name of operation. - :vartype operation: str - :ivar operation_friendly_name: The friendly name of operation. - :vartype operation_friendly_name: str - :ivar percent_complete: The percentage of the operation completed. - :vartype percent_complete: int - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar start_time: The operation start time. - :vartype start_time: datetime - :ivar state: The operation state. Possible values include: 'Pending', - 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', 'Cancelled' - :vartype state: str or ~azure.mgmt.sql.models.ManagementOperationState - :ivar error_code: The operation error code. - :vartype error_code: int - :ivar error_description: The operation error description. - :vartype error_description: str - :ivar error_severity: The operation error severity. - :vartype error_severity: int - :ivar is_user_error: Whether or not the error is a user error. - :vartype is_user_error: bool - :ivar estimated_completion_time: The estimated completion time of the - operation. - :vartype estimated_completion_time: datetime - :ivar description: The operation description. - :vartype description: str - :ivar is_cancellable: Whether the operation can be cancelled. - :vartype is_cancellable: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_name': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_friendly_name': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_description': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'is_user_error': {'readonly': True}, - 'estimated_completion_time': {'readonly': True}, - 'description': {'readonly': True}, - 'is_cancellable': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, - 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DatabaseOperation, self).__init__(**kwargs) - self.database_name = None - self.operation = None - self.operation_friendly_name = None - self.percent_complete = None - self.server_name = None - self.start_time = None - self.state = None - self.error_code = None - self.error_description = None - self.error_severity = None - self.is_user_error = None - self.estimated_completion_time = None - self.description = None - self.is_cancellable = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_paged.py deleted file mode 100644 index 4c22372df877..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseOperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`DatabaseOperation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseOperation]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseOperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_py3.py deleted file mode 100644 index 66fb0bb0c602..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_py3.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseOperation(ProxyResource): - """A database operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_name: The name of the database the operation is being - performed on. - :vartype database_name: str - :ivar operation: The name of operation. - :vartype operation: str - :ivar operation_friendly_name: The friendly name of operation. - :vartype operation_friendly_name: str - :ivar percent_complete: The percentage of the operation completed. - :vartype percent_complete: int - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar start_time: The operation start time. - :vartype start_time: datetime - :ivar state: The operation state. Possible values include: 'Pending', - 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', 'Cancelled' - :vartype state: str or ~azure.mgmt.sql.models.ManagementOperationState - :ivar error_code: The operation error code. - :vartype error_code: int - :ivar error_description: The operation error description. - :vartype error_description: str - :ivar error_severity: The operation error severity. - :vartype error_severity: int - :ivar is_user_error: Whether or not the error is a user error. - :vartype is_user_error: bool - :ivar estimated_completion_time: The estimated completion time of the - operation. - :vartype estimated_completion_time: datetime - :ivar description: The operation description. - :vartype description: str - :ivar is_cancellable: Whether the operation can be cancelled. - :vartype is_cancellable: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_name': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_friendly_name': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_description': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'is_user_error': {'readonly': True}, - 'estimated_completion_time': {'readonly': True}, - 'description': {'readonly': True}, - 'is_cancellable': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, - 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, - } - - def __init__(self, **kwargs) -> None: - super(DatabaseOperation, self).__init__(**kwargs) - self.database_name = None - self.operation = None - self.operation_friendly_name = None - self.percent_complete = None - self.server_name = None - self.start_time = None - self.state = None - self.error_code = None - self.error_description = None - self.error_severity = None - self.is_user_error = None - self.estimated_completion_time = None - self.description = None - self.is_cancellable = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_paged.py deleted file mode 100644 index bc3842934a39..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`Database ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Database]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py deleted file mode 100644 index 9cfb4d07a7e6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py +++ /dev/null @@ -1,237 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class Database(TrackedResource): - """A database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :ivar kind: Kind of database. This is metadata used for the Azure portal - experience. - :vartype kind: str - :ivar managed_by: Resource that manages the database. - :vartype managed_by: str - :param create_mode: Specifies the mode of database creation. - Default: regular database creation. - Copy: creates a database as a copy of an existing database. - sourceDatabaseId must be specified as the resource ID of the source - database. - Secondary: creates a database as a secondary replica of an existing - database. sourceDatabaseId must be specified as the resource ID of the - existing primary database. - PointInTimeRestore: Creates a database by restoring a point in time backup - of an existing database. sourceDatabaseId must be specified as the - resource ID of the existing database, and restorePointInTime must be - specified. - Recovery: Creates a database by restoring a geo-replicated backup. - sourceDatabaseId must be specified as the recoverable database resource ID - to restore. - Restore: Creates a database by restoring a backup of a deleted database. - sourceDatabaseId must be specified. If sourceDatabaseId is the database's - original resource ID, then sourceDatabaseDeletionDate must be specified. - Otherwise sourceDatabaseId must be the restorable dropped database - resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime - may also be specified to restore from an earlier point in time. - RestoreLongTermRetentionBackup: Creates a database by restoring from a - long term retention vault. recoveryServicesRecoveryPointResourceId must be - specified as the recovery point resource ID. - Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for - DataWarehouse edition. Possible values include: 'Default', 'Copy', - 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', - 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', - 'RestoreLongTermRetentionBackup', 'OnlineSecondary' - :type create_mode: str or ~azure.mgmt.sql.models.CreateMode - :param collation: The collation of the database. - :type collation: str - :param max_size_bytes: The max size of the database expressed in bytes. - :type max_size_bytes: long - :param sample_name: The name of the sample schema to apply when creating - this database. Possible values include: 'AdventureWorksLT', - 'WideWorldImportersStd', 'WideWorldImportersFull' - :type sample_name: str or ~azure.mgmt.sql.models.SampleName - :param elastic_pool_id: The resource identifier of the elastic pool - containing this database. - :type elastic_pool_id: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :ivar status: The status of the database. Possible values include: - 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', - 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', - 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', - 'Paused', 'Resuming', 'Scaling' - :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus - :ivar database_id: The ID of the database. - :vartype database_id: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar current_service_objective_name: The current service level objective - name of the database. - :vartype current_service_objective_name: str - :ivar requested_service_objective_name: The requested service level - objective name of the database. - :vartype requested_service_objective_name: str - :ivar default_secondary_location: The default secondary region for this - database. - :vartype default_secondary_location: str - :ivar failover_group_id: Failover Group resource identifier that this - database belongs to. - :vartype failover_group_id: str - :param restore_point_in_time: Specifies the point in time (ISO8601 format) - of the source database that will be restored to create the new database. - :type restore_point_in_time: datetime - :param source_database_deletion_date: Specifies the time that the database - was deleted. - :type source_database_deletion_date: datetime - :param recovery_services_recovery_point_id: The resource identifier of the - recovery point associated with create operation of this database. - :type recovery_services_recovery_point_id: str - :param long_term_retention_backup_resource_id: The resource identifier of - the long term retention backup associated with create operation of this - database. - :type long_term_retention_backup_resource_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param restorable_dropped_database_id: The resource identifier of the - restorable dropped database associated with create operation of this - database. - :type restorable_dropped_database_id: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param zone_redundant: Whether or not this database is zone redundant, - which means the replicas of this database will be spread across multiple - availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this database. Possible - values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType - :ivar max_log_size_bytes: The max log size for this database. - :vartype max_log_size_bytes: long - :ivar earliest_restore_date: This records the earliest start date and time - that restore is available for this database (ISO8601 format). - :vartype earliest_restore_date: datetime - :param read_scale: The state of read-only routing. If enabled, connections - that have application intent set to readonly in their connection string - may be routed to a readonly secondary replica in the same region. Possible - values include: 'Enabled', 'Disabled' - :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale - :ivar current_sku: The name and tier of the SKU. - :vartype current_sku: ~azure.mgmt.sql.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'managed_by': {'readonly': True}, - 'status': {'readonly': True}, - 'database_id': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'current_service_objective_name': {'readonly': True}, - 'requested_service_objective_name': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - 'max_log_size_bytes': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'current_sku': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, - 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, - 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, - 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, - 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, - 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, - } - - def __init__(self, *, location: str, tags=None, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, **kwargs) -> None: - super(Database, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.kind = None - self.managed_by = None - self.create_mode = create_mode - self.collation = collation - self.max_size_bytes = max_size_bytes - self.sample_name = sample_name - self.elastic_pool_id = elastic_pool_id - self.source_database_id = source_database_id - self.status = None - self.database_id = None - self.creation_date = None - self.current_service_objective_name = None - self.requested_service_objective_name = None - self.default_secondary_location = None - self.failover_group_id = None - self.restore_point_in_time = restore_point_in_time - self.source_database_deletion_date = source_database_deletion_date - self.recovery_services_recovery_point_id = recovery_services_recovery_point_id - self.long_term_retention_backup_resource_id = long_term_retention_backup_resource_id - self.recoverable_database_id = recoverable_database_id - self.restorable_dropped_database_id = restorable_dropped_database_id - self.catalog_collation = catalog_collation - self.zone_redundant = zone_redundant - self.license_type = license_type - self.max_log_size_bytes = None - self.earliest_restore_date = None - self.read_scale = read_scale - self.current_sku = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy.py deleted file mode 100644 index c425573a5a91..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseSecurityAlertPolicy(ProxyResource): - """Contains information about a database Threat Detection policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar kind: Resource kind. - :vartype kind: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint and storageAccountAccessKey are required. - Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies the semicolon-separated list of alerts - that are disabled, or empty string to disable no alerts. Possible values: - Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; - Data_Exfiltration; Unsafe_Action. - :type disabled_alerts: str - :param email_addresses: Specifies the semicolon-separated list of e-mail - addresses to which the alert is sent. - :type email_addresses: str - :param email_account_admins: Specifies that the alert is sent to the - account administrators. Possible values include: 'Enabled', 'Disabled' - :type email_account_admins: str or - ~azure.mgmt.sql.models.SecurityAlertPolicyEmailAccountAdmins - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. If state is Enabled, storageEndpoint is - required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. If state is Enabled, - storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :param use_server_default: Specifies whether to use the default server - policy. Possible values include: 'Enabled', 'Disabled' - :type use_server_default: str or - ~azure.mgmt.sql.models.SecurityAlertPolicyUseServerDefault - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': 'str'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': 'str'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'SecurityAlertPolicyEmailAccountAdmins'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'use_server_default': {'key': 'properties.useServerDefault', 'type': 'SecurityAlertPolicyUseServerDefault'}, - } - - def __init__(self, **kwargs): - super(DatabaseSecurityAlertPolicy, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.kind = None - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.use_server_default = kwargs.get('use_server_default', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy_py3.py deleted file mode 100644 index 3d85e01a6635..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy_py3.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseSecurityAlertPolicy(ProxyResource): - """Contains information about a database Threat Detection policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar kind: Resource kind. - :vartype kind: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint and storageAccountAccessKey are required. - Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies the semicolon-separated list of alerts - that are disabled, or empty string to disable no alerts. Possible values: - Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; - Data_Exfiltration; Unsafe_Action. - :type disabled_alerts: str - :param email_addresses: Specifies the semicolon-separated list of e-mail - addresses to which the alert is sent. - :type email_addresses: str - :param email_account_admins: Specifies that the alert is sent to the - account administrators. Possible values include: 'Enabled', 'Disabled' - :type email_account_admins: str or - ~azure.mgmt.sql.models.SecurityAlertPolicyEmailAccountAdmins - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. If state is Enabled, storageEndpoint is - required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. If state is Enabled, - storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :param use_server_default: Specifies whether to use the default server - policy. Possible values include: 'Enabled', 'Disabled' - :type use_server_default: str or - ~azure.mgmt.sql.models.SecurityAlertPolicyUseServerDefault - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': 'str'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': 'str'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'SecurityAlertPolicyEmailAccountAdmins'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'use_server_default': {'key': 'properties.useServerDefault', 'type': 'SecurityAlertPolicyUseServerDefault'}, - } - - def __init__(self, *, state, location: str=None, disabled_alerts: str=None, email_addresses: str=None, email_account_admins=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, use_server_default=None, **kwargs) -> None: - super(DatabaseSecurityAlertPolicy, self).__init__(**kwargs) - self.location = location - self.kind = None - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.use_server_default = use_server_default diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update.py deleted file mode 100644 index d4d4cbdf4270..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update.py +++ /dev/null @@ -1,209 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseUpdate(Model): - """A database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :param create_mode: Specifies the mode of database creation. - Default: regular database creation. - Copy: creates a database as a copy of an existing database. - sourceDatabaseId must be specified as the resource ID of the source - database. - Secondary: creates a database as a secondary replica of an existing - database. sourceDatabaseId must be specified as the resource ID of the - existing primary database. - PointInTimeRestore: Creates a database by restoring a point in time backup - of an existing database. sourceDatabaseId must be specified as the - resource ID of the existing database, and restorePointInTime must be - specified. - Recovery: Creates a database by restoring a geo-replicated backup. - sourceDatabaseId must be specified as the recoverable database resource ID - to restore. - Restore: Creates a database by restoring a backup of a deleted database. - sourceDatabaseId must be specified. If sourceDatabaseId is the database's - original resource ID, then sourceDatabaseDeletionDate must be specified. - Otherwise sourceDatabaseId must be the restorable dropped database - resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime - may also be specified to restore from an earlier point in time. - RestoreLongTermRetentionBackup: Creates a database by restoring from a - long term retention vault. recoveryServicesRecoveryPointResourceId must be - specified as the recovery point resource ID. - Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for - DataWarehouse edition. Possible values include: 'Default', 'Copy', - 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', - 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', - 'RestoreLongTermRetentionBackup', 'OnlineSecondary' - :type create_mode: str or ~azure.mgmt.sql.models.CreateMode - :param collation: The collation of the database. - :type collation: str - :param max_size_bytes: The max size of the database expressed in bytes. - :type max_size_bytes: long - :param sample_name: The name of the sample schema to apply when creating - this database. Possible values include: 'AdventureWorksLT', - 'WideWorldImportersStd', 'WideWorldImportersFull' - :type sample_name: str or ~azure.mgmt.sql.models.SampleName - :param elastic_pool_id: The resource identifier of the elastic pool - containing this database. - :type elastic_pool_id: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :ivar status: The status of the database. Possible values include: - 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', - 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', - 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', - 'Paused', 'Resuming', 'Scaling' - :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus - :ivar database_id: The ID of the database. - :vartype database_id: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar current_service_objective_name: The current service level objective - name of the database. - :vartype current_service_objective_name: str - :ivar requested_service_objective_name: The requested service level - objective name of the database. - :vartype requested_service_objective_name: str - :ivar default_secondary_location: The default secondary region for this - database. - :vartype default_secondary_location: str - :ivar failover_group_id: Failover Group resource identifier that this - database belongs to. - :vartype failover_group_id: str - :param restore_point_in_time: Specifies the point in time (ISO8601 format) - of the source database that will be restored to create the new database. - :type restore_point_in_time: datetime - :param source_database_deletion_date: Specifies the time that the database - was deleted. - :type source_database_deletion_date: datetime - :param recovery_services_recovery_point_id: The resource identifier of the - recovery point associated with create operation of this database. - :type recovery_services_recovery_point_id: str - :param long_term_retention_backup_resource_id: The resource identifier of - the long term retention backup associated with create operation of this - database. - :type long_term_retention_backup_resource_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param restorable_dropped_database_id: The resource identifier of the - restorable dropped database associated with create operation of this - database. - :type restorable_dropped_database_id: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param zone_redundant: Whether or not this database is zone redundant, - which means the replicas of this database will be spread across multiple - availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this database. Possible - values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType - :ivar max_log_size_bytes: The max log size for this database. - :vartype max_log_size_bytes: long - :ivar earliest_restore_date: This records the earliest start date and time - that restore is available for this database (ISO8601 format). - :vartype earliest_restore_date: datetime - :param read_scale: The state of read-only routing. If enabled, connections - that have application intent set to readonly in their connection string - may be routed to a readonly secondary replica in the same region. Possible - values include: 'Enabled', 'Disabled' - :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale - :ivar current_sku: The name and tier of the SKU. - :vartype current_sku: ~azure.mgmt.sql.models.Sku - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'status': {'readonly': True}, - 'database_id': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'current_service_objective_name': {'readonly': True}, - 'requested_service_objective_name': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - 'max_log_size_bytes': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'current_sku': {'readonly': True}, - } - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, - 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, - 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, - 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, - 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, - 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(DatabaseUpdate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.create_mode = kwargs.get('create_mode', None) - self.collation = kwargs.get('collation', None) - self.max_size_bytes = kwargs.get('max_size_bytes', None) - self.sample_name = kwargs.get('sample_name', None) - self.elastic_pool_id = kwargs.get('elastic_pool_id', None) - self.source_database_id = kwargs.get('source_database_id', None) - self.status = None - self.database_id = None - self.creation_date = None - self.current_service_objective_name = None - self.requested_service_objective_name = None - self.default_secondary_location = None - self.failover_group_id = None - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.source_database_deletion_date = kwargs.get('source_database_deletion_date', None) - self.recovery_services_recovery_point_id = kwargs.get('recovery_services_recovery_point_id', None) - self.long_term_retention_backup_resource_id = kwargs.get('long_term_retention_backup_resource_id', None) - self.recoverable_database_id = kwargs.get('recoverable_database_id', None) - self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) - self.catalog_collation = kwargs.get('catalog_collation', None) - self.zone_redundant = kwargs.get('zone_redundant', None) - self.license_type = kwargs.get('license_type', None) - self.max_log_size_bytes = None - self.earliest_restore_date = None - self.read_scale = kwargs.get('read_scale', None) - self.current_sku = None - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update_py3.py deleted file mode 100644 index 5a9a6f3b742d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update_py3.py +++ /dev/null @@ -1,209 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseUpdate(Model): - """A database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :param create_mode: Specifies the mode of database creation. - Default: regular database creation. - Copy: creates a database as a copy of an existing database. - sourceDatabaseId must be specified as the resource ID of the source - database. - Secondary: creates a database as a secondary replica of an existing - database. sourceDatabaseId must be specified as the resource ID of the - existing primary database. - PointInTimeRestore: Creates a database by restoring a point in time backup - of an existing database. sourceDatabaseId must be specified as the - resource ID of the existing database, and restorePointInTime must be - specified. - Recovery: Creates a database by restoring a geo-replicated backup. - sourceDatabaseId must be specified as the recoverable database resource ID - to restore. - Restore: Creates a database by restoring a backup of a deleted database. - sourceDatabaseId must be specified. If sourceDatabaseId is the database's - original resource ID, then sourceDatabaseDeletionDate must be specified. - Otherwise sourceDatabaseId must be the restorable dropped database - resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime - may also be specified to restore from an earlier point in time. - RestoreLongTermRetentionBackup: Creates a database by restoring from a - long term retention vault. recoveryServicesRecoveryPointResourceId must be - specified as the recovery point resource ID. - Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for - DataWarehouse edition. Possible values include: 'Default', 'Copy', - 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', - 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', - 'RestoreLongTermRetentionBackup', 'OnlineSecondary' - :type create_mode: str or ~azure.mgmt.sql.models.CreateMode - :param collation: The collation of the database. - :type collation: str - :param max_size_bytes: The max size of the database expressed in bytes. - :type max_size_bytes: long - :param sample_name: The name of the sample schema to apply when creating - this database. Possible values include: 'AdventureWorksLT', - 'WideWorldImportersStd', 'WideWorldImportersFull' - :type sample_name: str or ~azure.mgmt.sql.models.SampleName - :param elastic_pool_id: The resource identifier of the elastic pool - containing this database. - :type elastic_pool_id: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :ivar status: The status of the database. Possible values include: - 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', - 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', - 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', - 'Paused', 'Resuming', 'Scaling' - :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus - :ivar database_id: The ID of the database. - :vartype database_id: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar current_service_objective_name: The current service level objective - name of the database. - :vartype current_service_objective_name: str - :ivar requested_service_objective_name: The requested service level - objective name of the database. - :vartype requested_service_objective_name: str - :ivar default_secondary_location: The default secondary region for this - database. - :vartype default_secondary_location: str - :ivar failover_group_id: Failover Group resource identifier that this - database belongs to. - :vartype failover_group_id: str - :param restore_point_in_time: Specifies the point in time (ISO8601 format) - of the source database that will be restored to create the new database. - :type restore_point_in_time: datetime - :param source_database_deletion_date: Specifies the time that the database - was deleted. - :type source_database_deletion_date: datetime - :param recovery_services_recovery_point_id: The resource identifier of the - recovery point associated with create operation of this database. - :type recovery_services_recovery_point_id: str - :param long_term_retention_backup_resource_id: The resource identifier of - the long term retention backup associated with create operation of this - database. - :type long_term_retention_backup_resource_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param restorable_dropped_database_id: The resource identifier of the - restorable dropped database associated with create operation of this - database. - :type restorable_dropped_database_id: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param zone_redundant: Whether or not this database is zone redundant, - which means the replicas of this database will be spread across multiple - availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this database. Possible - values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType - :ivar max_log_size_bytes: The max log size for this database. - :vartype max_log_size_bytes: long - :ivar earliest_restore_date: This records the earliest start date and time - that restore is available for this database (ISO8601 format). - :vartype earliest_restore_date: datetime - :param read_scale: The state of read-only routing. If enabled, connections - that have application intent set to readonly in their connection string - may be routed to a readonly secondary replica in the same region. Possible - values include: 'Enabled', 'Disabled' - :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale - :ivar current_sku: The name and tier of the SKU. - :vartype current_sku: ~azure.mgmt.sql.models.Sku - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'status': {'readonly': True}, - 'database_id': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'current_service_objective_name': {'readonly': True}, - 'requested_service_objective_name': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - 'max_log_size_bytes': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'current_sku': {'readonly': True}, - } - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, - 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, - 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, - 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, - 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, - 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, tags=None, **kwargs) -> None: - super(DatabaseUpdate, self).__init__(**kwargs) - self.sku = sku - self.create_mode = create_mode - self.collation = collation - self.max_size_bytes = max_size_bytes - self.sample_name = sample_name - self.elastic_pool_id = elastic_pool_id - self.source_database_id = source_database_id - self.status = None - self.database_id = None - self.creation_date = None - self.current_service_objective_name = None - self.requested_service_objective_name = None - self.default_secondary_location = None - self.failover_group_id = None - self.restore_point_in_time = restore_point_in_time - self.source_database_deletion_date = source_database_deletion_date - self.recovery_services_recovery_point_id = recovery_services_recovery_point_id - self.long_term_retention_backup_resource_id = long_term_retention_backup_resource_id - self.recoverable_database_id = recoverable_database_id - self.restorable_dropped_database_id = restorable_dropped_database_id - self.catalog_collation = catalog_collation - self.zone_redundant = zone_redundant - self.license_type = license_type - self.max_log_size_bytes = None - self.earliest_restore_date = None - self.read_scale = read_scale - self.current_sku = None - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage.py deleted file mode 100644 index 948942f56124..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseUsage(Model): - """The database usages. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the usage metric. - :vartype name: str - :ivar resource_name: The name of the resource. - :vartype resource_name: str - :ivar display_name: The usage metric display name. - :vartype display_name: str - :ivar current_value: The current value of the usage metric. - :vartype current_value: float - :ivar limit: The current limit of the usage metric. - :vartype limit: float - :ivar unit: The units of the usage metric. - :vartype unit: str - :ivar next_reset_time: The next reset time for the usage metric (ISO8601 - format). - :vartype next_reset_time: datetime - """ - - _validation = { - 'name': {'readonly': True}, - 'resource_name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'next_reset_time': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_name': {'key': 'resourceName', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(DatabaseUsage, self).__init__(**kwargs) - self.name = None - self.resource_name = None - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None - self.next_reset_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_paged.py deleted file mode 100644 index 9641161225df..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseUsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`DatabaseUsage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseUsage]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseUsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_py3.py deleted file mode 100644 index 46a0f5ca4ba9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_usage_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseUsage(Model): - """The database usages. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the usage metric. - :vartype name: str - :ivar resource_name: The name of the resource. - :vartype resource_name: str - :ivar display_name: The usage metric display name. - :vartype display_name: str - :ivar current_value: The current value of the usage metric. - :vartype current_value: float - :ivar limit: The current limit of the usage metric. - :vartype limit: float - :ivar unit: The units of the usage metric. - :vartype unit: str - :ivar next_reset_time: The next reset time for the usage metric (ISO8601 - format). - :vartype next_reset_time: datetime - """ - - _validation = { - 'name': {'readonly': True}, - 'resource_name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'next_reset_time': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_name': {'key': 'resourceName', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(DatabaseUsage, self).__init__(**kwargs) - self.name = None - self.resource_name = None - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None - self.next_reset_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment.py deleted file mode 100644 index b4fbd42f864b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseVulnerabilityAssessment(ProxyResource): - """A database vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: A blob storage container path to hold the - scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It - is required if server level vulnerability assessment policy doesn't set - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _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'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, **kwargs): - super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = kwargs.get('storage_container_path', None) - self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.recurring_scans = kwargs.get('recurring_scans', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_paged.py deleted file mode 100644 index 8ec2fe4eae5f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseVulnerabilityAssessmentPaged(Paged): - """ - A paging container for iterating over a list of :class:`DatabaseVulnerabilityAssessment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseVulnerabilityAssessment]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_py3.py deleted file mode 100644 index e0d54f6105f1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseVulnerabilityAssessment(ProxyResource): - """A database vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: A blob storage container path to hold the - scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It - is required if server level vulnerability assessment policy doesn't set - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _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'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, *, storage_container_path: str=None, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: - super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = storage_container_path - self.storage_container_sas_key = storage_container_sas_key - self.storage_account_access_key = storage_account_access_key - self.recurring_scans = recurring_scans diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline.py deleted file mode 100644 index 66881dfb9b5c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseVulnerabilityAssessmentRuleBaseline(ProxyResource): - """A database vulnerability assessment rule baseline. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param baseline_results: Required. The rule baseline result - :type baseline_results: - list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'baseline_results': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'baseline_results': {'key': 'properties.baselineResults', 'type': '[DatabaseVulnerabilityAssessmentRuleBaselineItem]'}, - } - - def __init__(self, **kwargs): - super(DatabaseVulnerabilityAssessmentRuleBaseline, self).__init__(**kwargs) - self.baseline_results = kwargs.get('baseline_results', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item.py deleted file mode 100644 index 4bd7d0e16f52..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseVulnerabilityAssessmentRuleBaselineItem(Model): - """Properties for an Azure SQL Database Vulnerability Assessment rule - baseline's result. - - All required parameters must be populated in order to send to Azure. - - :param result: Required. The rule baseline result - :type result: list[str] - """ - - _validation = { - 'result': {'required': True}, - } - - _attribute_map = { - 'result': {'key': 'result', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(DatabaseVulnerabilityAssessmentRuleBaselineItem, self).__init__(**kwargs) - self.result = kwargs.get('result', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py deleted file mode 100644 index 9378a89cc0f0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseVulnerabilityAssessmentRuleBaselineItem(Model): - """Properties for an Azure SQL Database Vulnerability Assessment rule - baseline's result. - - All required parameters must be populated in order to send to Azure. - - :param result: Required. The rule baseline result - :type result: list[str] - """ - - _validation = { - 'result': {'required': True}, - } - - _attribute_map = { - 'result': {'key': 'result', 'type': '[str]'}, - } - - def __init__(self, *, result, **kwargs) -> None: - super(DatabaseVulnerabilityAssessmentRuleBaselineItem, self).__init__(**kwargs) - self.result = result diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_py3.py deleted file mode 100644 index 4997c258c475..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseVulnerabilityAssessmentRuleBaseline(ProxyResource): - """A database vulnerability assessment rule baseline. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param baseline_results: Required. The rule baseline result - :type baseline_results: - list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'baseline_results': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'baseline_results': {'key': 'properties.baselineResults', 'type': '[DatabaseVulnerabilityAssessmentRuleBaselineItem]'}, - } - - def __init__(self, *, baseline_results, **kwargs) -> None: - super(DatabaseVulnerabilityAssessmentRuleBaseline, self).__init__(**kwargs) - self.baseline_results = baseline_results diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export.py deleted file mode 100644 index 4d088fd265c0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class DatabaseVulnerabilityAssessmentScansExport(ProxyResource): - """A database Vulnerability Assessment scan export resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar exported_report_location: Location of the exported report (e.g. - https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). - :vartype exported_report_location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'exported_report_location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs) - self.exported_report_location = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export_py3.py deleted file mode 100644 index 7e925fb428ce..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class DatabaseVulnerabilityAssessmentScansExport(ProxyResource): - """A database Vulnerability Assessment scan export resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar exported_report_location: Location of the exported report (e.g. - https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). - :vartype exported_report_location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'exported_report_location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs) - self.exported_report_location = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability.py deleted file mode 100644 index e2b212e365b0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EditionCapability(Model): - """The edition capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The database edition name. - :vartype name: str - :ivar supported_service_level_objectives: The list of supported service - objectives for the edition. - :vartype supported_service_level_objectives: - list[~azure.mgmt.sql.models.ServiceObjectiveCapability] - :ivar zone_redundant: Whether or not zone redundancy is supported for the - edition. - :vartype zone_redundant: bool - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_service_level_objectives': {'readonly': True}, - 'zone_redundant': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_service_level_objectives': {'key': 'supportedServiceLevelObjectives', 'type': '[ServiceObjectiveCapability]'}, - 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_service_level_objectives = None - self.zone_redundant = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability_py3.py deleted file mode 100644 index e2eaad22c5d5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EditionCapability(Model): - """The edition capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The database edition name. - :vartype name: str - :ivar supported_service_level_objectives: The list of supported service - objectives for the edition. - :vartype supported_service_level_objectives: - list[~azure.mgmt.sql.models.ServiceObjectiveCapability] - :ivar zone_redundant: Whether or not zone redundancy is supported for the - edition. - :vartype zone_redundant: bool - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_service_level_objectives': {'readonly': True}, - 'zone_redundant': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_service_level_objectives': {'key': 'supportedServiceLevelObjectives', 'type': '[ServiceObjectiveCapability]'}, - 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(EditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_service_level_objectives = None - self.zone_redundant = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py deleted file mode 100644 index 10a28ea0f6e3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class ElasticPool(TrackedResource): - """An elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.sql.models.Sku - :ivar kind: Kind of elastic pool. This is metadata used for the Azure - portal experience. - :vartype kind: str - :ivar state: The state of the elastic pool. Possible values include: - 'Creating', 'Ready', 'Disabled' - :vartype state: str or ~azure.mgmt.sql.models.ElasticPoolState - :ivar creation_date: The creation date of the elastic pool (ISO8601 - format). - :vartype creation_date: datetime - :param max_size_bytes: The storage limit for the database elastic pool in - bytes. - :type max_size_bytes: long - :param per_database_settings: The per database settings for the elastic - pool. - :type per_database_settings: - ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings - :param zone_redundant: Whether or not this elastic pool is zone redundant, - which means the replicas of this elastic pool will be spread across - multiple availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this elastic pool. - Possible values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'state': {'readonly': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPool, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.kind = None - self.state = None - self.creation_date = None - self.max_size_bytes = kwargs.get('max_size_bytes', None) - self.per_database_settings = kwargs.get('per_database_settings', None) - self.zone_redundant = kwargs.get('zone_redundant', None) - self.license_type = kwargs.get('license_type', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity.py deleted file mode 100644 index 30c56a11077d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ElasticPoolActivity(ProxyResource): - """Represents the activity on an elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar end_time: The time the operation finished (ISO8601 format). - :vartype end_time: datetime - :ivar error_code: The error code if available. - :vartype error_code: int - :ivar error_message: The error message if available. - :vartype error_message: str - :ivar error_severity: The error severity if available. - :vartype error_severity: int - :ivar operation: The operation name. - :vartype operation: str - :ivar operation_id: The unique operation ID. - :vartype operation_id: str - :ivar percent_complete: The percentage complete if available. - :vartype percent_complete: int - :ivar requested_database_dtu_max: The requested max DTU per database if - available. - :vartype requested_database_dtu_max: int - :ivar requested_database_dtu_min: The requested min DTU per database if - available. - :vartype requested_database_dtu_min: int - :ivar requested_dtu: The requested DTU for the pool if available. - :vartype requested_dtu: int - :ivar requested_elastic_pool_name: The requested name for the elastic pool - if available. - :vartype requested_elastic_pool_name: str - :ivar requested_storage_limit_in_gb: The requested storage limit for the - pool in GB if available. - :vartype requested_storage_limit_in_gb: long - :ivar elastic_pool_name: The name of the elastic pool. - :vartype elastic_pool_name: str - :ivar server_name: The name of the server the elastic pool is in. - :vartype server_name: str - :ivar start_time: The time the operation started (ISO8601 format). - :vartype start_time: datetime - :ivar state: The current state of the operation. - :vartype state: str - :ivar requested_storage_limit_in_mb: The requested storage limit in MB. - :vartype requested_storage_limit_in_mb: int - :ivar requested_database_dtu_guarantee: The requested per database DTU - guarantee. - :vartype requested_database_dtu_guarantee: int - :ivar requested_database_dtu_cap: The requested per database DTU cap. - :vartype requested_database_dtu_cap: int - :ivar requested_dtu_guarantee: The requested DTU guarantee. - :vartype requested_dtu_guarantee: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_message': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_id': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'requested_database_dtu_max': {'readonly': True}, - 'requested_database_dtu_min': {'readonly': True}, - 'requested_dtu': {'readonly': True}, - 'requested_elastic_pool_name': {'readonly': True}, - 'requested_storage_limit_in_gb': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'requested_storage_limit_in_mb': {'readonly': True}, - 'requested_database_dtu_guarantee': {'readonly': True}, - 'requested_database_dtu_cap': {'readonly': True}, - 'requested_dtu_guarantee': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'requested_database_dtu_max': {'key': 'properties.requestedDatabaseDtuMax', 'type': 'int'}, - 'requested_database_dtu_min': {'key': 'properties.requestedDatabaseDtuMin', 'type': 'int'}, - 'requested_dtu': {'key': 'properties.requestedDtu', 'type': 'int'}, - 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, - 'requested_storage_limit_in_gb': {'key': 'properties.requestedStorageLimitInGB', 'type': 'long'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'requested_storage_limit_in_mb': {'key': 'properties.requestedStorageLimitInMB', 'type': 'int'}, - 'requested_database_dtu_guarantee': {'key': 'properties.requestedDatabaseDtuGuarantee', 'type': 'int'}, - 'requested_database_dtu_cap': {'key': 'properties.requestedDatabaseDtuCap', 'type': 'int'}, - 'requested_dtu_guarantee': {'key': 'properties.requestedDtuGuarantee', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolActivity, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.end_time = None - self.error_code = None - self.error_message = None - self.error_severity = None - self.operation = None - self.operation_id = None - self.percent_complete = None - self.requested_database_dtu_max = None - self.requested_database_dtu_min = None - self.requested_dtu = None - self.requested_elastic_pool_name = None - self.requested_storage_limit_in_gb = None - self.elastic_pool_name = None - self.server_name = None - self.start_time = None - self.state = None - self.requested_storage_limit_in_mb = None - self.requested_database_dtu_guarantee = None - self.requested_database_dtu_cap = None - self.requested_dtu_guarantee = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_paged.py deleted file mode 100644 index 729a44a94bb5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ElasticPoolActivityPaged(Paged): - """ - A paging container for iterating over a list of :class:`ElasticPoolActivity ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ElasticPoolActivity]'} - } - - def __init__(self, *args, **kwargs): - - super(ElasticPoolActivityPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_py3.py deleted file mode 100644 index 5d8d4f61727a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_py3.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ElasticPoolActivity(ProxyResource): - """Represents the activity on an elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar end_time: The time the operation finished (ISO8601 format). - :vartype end_time: datetime - :ivar error_code: The error code if available. - :vartype error_code: int - :ivar error_message: The error message if available. - :vartype error_message: str - :ivar error_severity: The error severity if available. - :vartype error_severity: int - :ivar operation: The operation name. - :vartype operation: str - :ivar operation_id: The unique operation ID. - :vartype operation_id: str - :ivar percent_complete: The percentage complete if available. - :vartype percent_complete: int - :ivar requested_database_dtu_max: The requested max DTU per database if - available. - :vartype requested_database_dtu_max: int - :ivar requested_database_dtu_min: The requested min DTU per database if - available. - :vartype requested_database_dtu_min: int - :ivar requested_dtu: The requested DTU for the pool if available. - :vartype requested_dtu: int - :ivar requested_elastic_pool_name: The requested name for the elastic pool - if available. - :vartype requested_elastic_pool_name: str - :ivar requested_storage_limit_in_gb: The requested storage limit for the - pool in GB if available. - :vartype requested_storage_limit_in_gb: long - :ivar elastic_pool_name: The name of the elastic pool. - :vartype elastic_pool_name: str - :ivar server_name: The name of the server the elastic pool is in. - :vartype server_name: str - :ivar start_time: The time the operation started (ISO8601 format). - :vartype start_time: datetime - :ivar state: The current state of the operation. - :vartype state: str - :ivar requested_storage_limit_in_mb: The requested storage limit in MB. - :vartype requested_storage_limit_in_mb: int - :ivar requested_database_dtu_guarantee: The requested per database DTU - guarantee. - :vartype requested_database_dtu_guarantee: int - :ivar requested_database_dtu_cap: The requested per database DTU cap. - :vartype requested_database_dtu_cap: int - :ivar requested_dtu_guarantee: The requested DTU guarantee. - :vartype requested_dtu_guarantee: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_message': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_id': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'requested_database_dtu_max': {'readonly': True}, - 'requested_database_dtu_min': {'readonly': True}, - 'requested_dtu': {'readonly': True}, - 'requested_elastic_pool_name': {'readonly': True}, - 'requested_storage_limit_in_gb': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'requested_storage_limit_in_mb': {'readonly': True}, - 'requested_database_dtu_guarantee': {'readonly': True}, - 'requested_database_dtu_cap': {'readonly': True}, - 'requested_dtu_guarantee': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'requested_database_dtu_max': {'key': 'properties.requestedDatabaseDtuMax', 'type': 'int'}, - 'requested_database_dtu_min': {'key': 'properties.requestedDatabaseDtuMin', 'type': 'int'}, - 'requested_dtu': {'key': 'properties.requestedDtu', 'type': 'int'}, - 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, - 'requested_storage_limit_in_gb': {'key': 'properties.requestedStorageLimitInGB', 'type': 'long'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'requested_storage_limit_in_mb': {'key': 'properties.requestedStorageLimitInMB', 'type': 'int'}, - 'requested_database_dtu_guarantee': {'key': 'properties.requestedDatabaseDtuGuarantee', 'type': 'int'}, - 'requested_database_dtu_cap': {'key': 'properties.requestedDatabaseDtuCap', 'type': 'int'}, - 'requested_dtu_guarantee': {'key': 'properties.requestedDtuGuarantee', 'type': 'int'}, - } - - def __init__(self, *, location: str=None, **kwargs) -> None: - super(ElasticPoolActivity, self).__init__(**kwargs) - self.location = location - self.end_time = None - self.error_code = None - self.error_message = None - self.error_severity = None - self.operation = None - self.operation_id = None - self.percent_complete = None - self.requested_database_dtu_max = None - self.requested_database_dtu_min = None - self.requested_dtu = None - self.requested_elastic_pool_name = None - self.requested_storage_limit_in_gb = None - self.elastic_pool_name = None - self.server_name = None - self.start_time = None - self.state = None - self.requested_storage_limit_in_mb = None - self.requested_database_dtu_guarantee = None - self.requested_database_dtu_cap = None - self.requested_dtu_guarantee = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity.py deleted file mode 100644 index 9427b6973ff9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity.py +++ /dev/null @@ -1,125 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ElasticPoolDatabaseActivity(ProxyResource): - """Represents the activity on an elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar database_name: The database name. - :vartype database_name: str - :ivar end_time: The time the operation finished (ISO8601 format). - :vartype end_time: datetime - :ivar error_code: The error code if available. - :vartype error_code: int - :ivar error_message: The error message if available. - :vartype error_message: str - :ivar error_severity: The error severity if available. - :vartype error_severity: int - :ivar operation: The operation name. - :vartype operation: str - :ivar operation_id: The unique operation ID. - :vartype operation_id: str - :ivar percent_complete: The percentage complete if available. - :vartype percent_complete: int - :ivar requested_elastic_pool_name: The name for the elastic pool the - database is moving into if available. - :vartype requested_elastic_pool_name: str - :ivar current_elastic_pool_name: The name of the current elastic pool the - database is in if available. - :vartype current_elastic_pool_name: str - :ivar current_service_objective: The name of the current service objective - if available. - :vartype current_service_objective: str - :ivar requested_service_objective: The name of the requested service - objective if available. - :vartype requested_service_objective: str - :ivar server_name: The name of the server the elastic pool is in. - :vartype server_name: str - :ivar start_time: The time the operation started (ISO8601 format). - :vartype start_time: datetime - :ivar state: The current state of the operation. - :vartype state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_name': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_message': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_id': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'requested_elastic_pool_name': {'readonly': True}, - 'current_elastic_pool_name': {'readonly': True}, - 'current_service_objective': {'readonly': True}, - 'requested_service_objective': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, - 'current_elastic_pool_name': {'key': 'properties.currentElasticPoolName', 'type': 'str'}, - 'current_service_objective': {'key': 'properties.currentServiceObjective', 'type': 'str'}, - 'requested_service_objective': {'key': 'properties.requestedServiceObjective', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolDatabaseActivity, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.database_name = None - self.end_time = None - self.error_code = None - self.error_message = None - self.error_severity = None - self.operation = None - self.operation_id = None - self.percent_complete = None - self.requested_elastic_pool_name = None - self.current_elastic_pool_name = None - self.current_service_objective = None - self.requested_service_objective = None - self.server_name = None - self.start_time = None - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_paged.py deleted file mode 100644 index e4d12fc20b4a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ElasticPoolDatabaseActivityPaged(Paged): - """ - A paging container for iterating over a list of :class:`ElasticPoolDatabaseActivity ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ElasticPoolDatabaseActivity]'} - } - - def __init__(self, *args, **kwargs): - - super(ElasticPoolDatabaseActivityPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_py3.py deleted file mode 100644 index 2e2818eee69a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_py3.py +++ /dev/null @@ -1,125 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ElasticPoolDatabaseActivity(ProxyResource): - """Represents the activity on an elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :ivar database_name: The database name. - :vartype database_name: str - :ivar end_time: The time the operation finished (ISO8601 format). - :vartype end_time: datetime - :ivar error_code: The error code if available. - :vartype error_code: int - :ivar error_message: The error message if available. - :vartype error_message: str - :ivar error_severity: The error severity if available. - :vartype error_severity: int - :ivar operation: The operation name. - :vartype operation: str - :ivar operation_id: The unique operation ID. - :vartype operation_id: str - :ivar percent_complete: The percentage complete if available. - :vartype percent_complete: int - :ivar requested_elastic_pool_name: The name for the elastic pool the - database is moving into if available. - :vartype requested_elastic_pool_name: str - :ivar current_elastic_pool_name: The name of the current elastic pool the - database is in if available. - :vartype current_elastic_pool_name: str - :ivar current_service_objective: The name of the current service objective - if available. - :vartype current_service_objective: str - :ivar requested_service_objective: The name of the requested service - objective if available. - :vartype requested_service_objective: str - :ivar server_name: The name of the server the elastic pool is in. - :vartype server_name: str - :ivar start_time: The time the operation started (ISO8601 format). - :vartype start_time: datetime - :ivar state: The current state of the operation. - :vartype state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_name': {'readonly': True}, - 'end_time': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_message': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_id': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'requested_elastic_pool_name': {'readonly': True}, - 'current_elastic_pool_name': {'readonly': True}, - 'current_service_objective': {'readonly': True}, - 'requested_service_objective': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, - 'current_elastic_pool_name': {'key': 'properties.currentElasticPoolName', 'type': 'str'}, - 'current_service_objective': {'key': 'properties.currentServiceObjective', 'type': 'str'}, - 'requested_service_objective': {'key': 'properties.requestedServiceObjective', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, **kwargs) -> None: - super(ElasticPoolDatabaseActivity, self).__init__(**kwargs) - self.location = location - self.database_name = None - self.end_time = None - self.error_code = None - self.error_message = None - self.error_severity = None - self.operation = None - self.operation_id = None - self.percent_complete = None - self.requested_elastic_pool_name = None - self.current_elastic_pool_name = None - self.current_service_objective = None - self.requested_service_objective = None - self.server_name = None - self.start_time = None - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability.py deleted file mode 100644 index f870c33b6143..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolEditionCapability(Model): - """The elastic pool edition capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The elastic pool edition name. - :vartype name: str - :ivar supported_elastic_pool_performance_levels: The list of supported - elastic pool DTU levels for the edition. - :vartype supported_elastic_pool_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerformanceLevelCapability] - :ivar zone_redundant: Whether or not zone redundancy is supported for the - edition. - :vartype zone_redundant: bool - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_elastic_pool_performance_levels': {'readonly': True}, - 'zone_redundant': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_elastic_pool_performance_levels': {'key': 'supportedElasticPoolPerformanceLevels', 'type': '[ElasticPoolPerformanceLevelCapability]'}, - 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_elastic_pool_performance_levels = None - self.zone_redundant = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability_py3.py deleted file mode 100644 index 54af1f63906f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolEditionCapability(Model): - """The elastic pool edition capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The elastic pool edition name. - :vartype name: str - :ivar supported_elastic_pool_performance_levels: The list of supported - elastic pool DTU levels for the edition. - :vartype supported_elastic_pool_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerformanceLevelCapability] - :ivar zone_redundant: Whether or not zone redundancy is supported for the - edition. - :vartype zone_redundant: bool - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_elastic_pool_performance_levels': {'readonly': True}, - 'zone_redundant': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_elastic_pool_performance_levels': {'key': 'supportedElasticPoolPerformanceLevels', 'type': '[ElasticPoolPerformanceLevelCapability]'}, - 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ElasticPoolEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_elastic_pool_performance_levels = None - self.zone_redundant = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation.py deleted file mode 100644 index 7f01bbf3f1af..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ElasticPoolOperation(ProxyResource): - """A elastic pool operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar elastic_pool_name: The name of the elastic pool the operation is - being performed on. - :vartype elastic_pool_name: str - :ivar operation: The name of operation. - :vartype operation: str - :ivar operation_friendly_name: The friendly name of operation. - :vartype operation_friendly_name: str - :ivar percent_complete: The percentage of the operation completed. - :vartype percent_complete: int - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar start_time: The operation start time. - :vartype start_time: datetime - :ivar state: The operation state. - :vartype state: str - :ivar error_code: The operation error code. - :vartype error_code: int - :ivar error_description: The operation error description. - :vartype error_description: str - :ivar error_severity: The operation error severity. - :vartype error_severity: int - :ivar is_user_error: Whether or not the error is a user error. - :vartype is_user_error: bool - :ivar estimated_completion_time: The estimated completion time of the - operation. - :vartype estimated_completion_time: datetime - :ivar description: The operation description. - :vartype description: str - :ivar is_cancellable: Whether the operation can be cancelled. - :vartype is_cancellable: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_friendly_name': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_description': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'is_user_error': {'readonly': True}, - 'estimated_completion_time': {'readonly': True}, - 'description': {'readonly': True}, - 'is_cancellable': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, - 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolOperation, self).__init__(**kwargs) - self.elastic_pool_name = None - self.operation = None - self.operation_friendly_name = None - self.percent_complete = None - self.server_name = None - self.start_time = None - self.state = None - self.error_code = None - self.error_description = None - self.error_severity = None - self.is_user_error = None - self.estimated_completion_time = None - self.description = None - self.is_cancellable = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_paged.py deleted file mode 100644 index 530637e1479c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ElasticPoolOperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`ElasticPoolOperation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ElasticPoolOperation]'} - } - - def __init__(self, *args, **kwargs): - - super(ElasticPoolOperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_py3.py deleted file mode 100644 index c214b66532a5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_py3.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ElasticPoolOperation(ProxyResource): - """A elastic pool operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar elastic_pool_name: The name of the elastic pool the operation is - being performed on. - :vartype elastic_pool_name: str - :ivar operation: The name of operation. - :vartype operation: str - :ivar operation_friendly_name: The friendly name of operation. - :vartype operation_friendly_name: str - :ivar percent_complete: The percentage of the operation completed. - :vartype percent_complete: int - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar start_time: The operation start time. - :vartype start_time: datetime - :ivar state: The operation state. - :vartype state: str - :ivar error_code: The operation error code. - :vartype error_code: int - :ivar error_description: The operation error description. - :vartype error_description: str - :ivar error_severity: The operation error severity. - :vartype error_severity: int - :ivar is_user_error: Whether or not the error is a user error. - :vartype is_user_error: bool - :ivar estimated_completion_time: The estimated completion time of the - operation. - :vartype estimated_completion_time: datetime - :ivar description: The operation description. - :vartype description: str - :ivar is_cancellable: Whether the operation can be cancelled. - :vartype is_cancellable: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'operation': {'readonly': True}, - 'operation_friendly_name': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'server_name': {'readonly': True}, - 'start_time': {'readonly': True}, - 'state': {'readonly': True}, - 'error_code': {'readonly': True}, - 'error_description': {'readonly': True}, - 'error_severity': {'readonly': True}, - 'is_user_error': {'readonly': True}, - 'estimated_completion_time': {'readonly': True}, - 'description': {'readonly': True}, - 'is_cancellable': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'operation': {'key': 'properties.operation', 'type': 'str'}, - 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, - 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, - 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, - 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, - 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, - } - - def __init__(self, **kwargs) -> None: - super(ElasticPoolOperation, self).__init__(**kwargs) - self.elastic_pool_name = None - self.operation = None - self.operation_friendly_name = None - self.percent_complete = None - self.server_name = None - self.start_time = None - self.state = None - self.error_code = None - self.error_description = None - self.error_severity = None - self.is_user_error = None - self.estimated_completion_time = None - self.description = None - self.is_cancellable = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_paged.py deleted file mode 100644 index 4c391860ee2d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ElasticPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`ElasticPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ElasticPool]'} - } - - def __init__(self, *args, **kwargs): - - super(ElasticPoolPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability.py deleted file mode 100644 index 1f99b527f962..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseMaxPerformanceLevelCapability(Model): - """The max per-database performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The maximum performance level per database. - :vartype limit: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - :ivar supported_per_database_min_performance_levels: The list of supported - min database performance levels. - :vartype supported_per_database_min_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMinPerformanceLevelCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'supported_per_database_min_performance_levels': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'supported_per_database_min_performance_levels': {'key': 'supportedPerDatabaseMinPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMinPerformanceLevelCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolPerDatabaseMaxPerformanceLevelCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None - self.supported_per_database_min_performance_levels = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability_py3.py deleted file mode 100644 index 7e80c9d6cd5e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_performance_level_capability_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseMaxPerformanceLevelCapability(Model): - """The max per-database performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The maximum performance level per database. - :vartype limit: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - :ivar supported_per_database_min_performance_levels: The list of supported - min database performance levels. - :vartype supported_per_database_min_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMinPerformanceLevelCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'supported_per_database_min_performance_levels': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'supported_per_database_min_performance_levels': {'key': 'supportedPerDatabaseMinPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMinPerformanceLevelCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ElasticPoolPerDatabaseMaxPerformanceLevelCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None - self.supported_per_database_min_performance_levels = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability.py deleted file mode 100644 index 52306e685c47..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseMinPerformanceLevelCapability(Model): - """The minimum per-database performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The minimum performance level per database. - :vartype limit: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolPerDatabaseMinPerformanceLevelCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability_py3.py deleted file mode 100644 index d1dceda281f6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_performance_level_capability_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseMinPerformanceLevelCapability(Model): - """The minimum per-database performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The minimum performance level per database. - :vartype limit: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ElasticPoolPerDatabaseMinPerformanceLevelCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings.py deleted file mode 100644 index 5c7951cd9c4b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseSettings(Model): - """Per database settings of an elastic pool. - - :param min_capacity: The minimum capacity all databases are guaranteed. - :type min_capacity: float - :param max_capacity: The maximum capacity any one database can consume. - :type max_capacity: float - """ - - _attribute_map = { - 'min_capacity': {'key': 'minCapacity', 'type': 'float'}, - 'max_capacity': {'key': 'maxCapacity', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolPerDatabaseSettings, self).__init__(**kwargs) - self.min_capacity = kwargs.get('min_capacity', None) - self.max_capacity = kwargs.get('max_capacity', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings_py3.py deleted file mode 100644 index 64ab19c4217d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_settings_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerDatabaseSettings(Model): - """Per database settings of an elastic pool. - - :param min_capacity: The minimum capacity all databases are guaranteed. - :type min_capacity: float - :param max_capacity: The maximum capacity any one database can consume. - :type max_capacity: float - """ - - _attribute_map = { - 'min_capacity': {'key': 'minCapacity', 'type': 'float'}, - 'max_capacity': {'key': 'maxCapacity', 'type': 'float'}, - } - - def __init__(self, *, min_capacity: float=None, max_capacity: float=None, **kwargs) -> None: - super(ElasticPoolPerDatabaseSettings, self).__init__(**kwargs) - self.min_capacity = min_capacity - self.max_capacity = max_capacity diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability.py deleted file mode 100644 index 8d5de8c9e0db..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerformanceLevelCapability(Model): - """The Elastic Pool performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar performance_level: The performance level for the pool. - :vartype performance_level: - ~azure.mgmt.sql.models.PerformanceLevelCapability - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.sql.models.Sku - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar max_database_count: The maximum number of databases supported. - :vartype max_database_count: int - :ivar included_max_size: The included (free) max size for this performance - level. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar supported_max_sizes: The list of supported max sizes. - :vartype supported_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar supported_per_database_max_sizes: The list of supported per database - max sizes. - :vartype supported_per_database_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar supported_per_database_max_performance_levels: The list of supported - per database max performance levels. - :vartype supported_per_database_max_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMaxPerformanceLevelCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'performance_level': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'max_database_count': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'supported_max_sizes': {'readonly': True}, - 'supported_per_database_max_sizes': {'readonly': True}, - 'supported_per_database_max_performance_levels': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'max_database_count': {'key': 'maxDatabaseCount', 'type': 'int'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'supported_per_database_max_sizes': {'key': 'supportedPerDatabaseMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'supported_per_database_max_performance_levels': {'key': 'supportedPerDatabaseMaxPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMaxPerformanceLevelCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolPerformanceLevelCapability, self).__init__(**kwargs) - self.performance_level = None - self.sku = None - self.supported_license_types = None - self.max_database_count = None - self.included_max_size = None - self.supported_max_sizes = None - self.supported_per_database_max_sizes = None - self.supported_per_database_max_performance_levels = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability_py3.py deleted file mode 100644 index 6842c7fed8b8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_performance_level_capability_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolPerformanceLevelCapability(Model): - """The Elastic Pool performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar performance_level: The performance level for the pool. - :vartype performance_level: - ~azure.mgmt.sql.models.PerformanceLevelCapability - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.sql.models.Sku - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar max_database_count: The maximum number of databases supported. - :vartype max_database_count: int - :ivar included_max_size: The included (free) max size for this performance - level. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar supported_max_sizes: The list of supported max sizes. - :vartype supported_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar supported_per_database_max_sizes: The list of supported per database - max sizes. - :vartype supported_per_database_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar supported_per_database_max_performance_levels: The list of supported - per database max performance levels. - :vartype supported_per_database_max_performance_levels: - list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMaxPerformanceLevelCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'performance_level': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'max_database_count': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'supported_max_sizes': {'readonly': True}, - 'supported_per_database_max_sizes': {'readonly': True}, - 'supported_per_database_max_performance_levels': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'max_database_count': {'key': 'maxDatabaseCount', 'type': 'int'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'supported_per_database_max_sizes': {'key': 'supportedPerDatabaseMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'supported_per_database_max_performance_levels': {'key': 'supportedPerDatabaseMaxPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMaxPerformanceLevelCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ElasticPoolPerformanceLevelCapability, self).__init__(**kwargs) - self.performance_level = None - self.sku = None - self.supported_license_types = None - self.max_database_count = None - self.included_max_size = None - self.supported_max_sizes = None - self.supported_per_database_max_sizes = None - self.supported_per_database_max_performance_levels = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py deleted file mode 100644 index eb092529ac3b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class ElasticPool(TrackedResource): - """An elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.sql.models.Sku - :ivar kind: Kind of elastic pool. This is metadata used for the Azure - portal experience. - :vartype kind: str - :ivar state: The state of the elastic pool. Possible values include: - 'Creating', 'Ready', 'Disabled' - :vartype state: str or ~azure.mgmt.sql.models.ElasticPoolState - :ivar creation_date: The creation date of the elastic pool (ISO8601 - format). - :vartype creation_date: datetime - :param max_size_bytes: The storage limit for the database elastic pool in - bytes. - :type max_size_bytes: long - :param per_database_settings: The per database settings for the elastic - pool. - :type per_database_settings: - ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings - :param zone_redundant: Whether or not this elastic pool is zone redundant, - which means the replicas of this elastic pool will be spread across - multiple availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this elastic pool. - Possible values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'state': {'readonly': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, sku=None, max_size_bytes: int=None, per_database_settings=None, zone_redundant: bool=None, license_type=None, **kwargs) -> None: - super(ElasticPool, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.kind = None - self.state = None - self.creation_date = None - self.max_size_bytes = max_size_bytes - self.per_database_settings = per_database_settings - self.zone_redundant = zone_redundant - self.license_type = license_type diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update.py deleted file mode 100644 index ce71dfa7257e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolUpdate(Model): - """An elastic pool update. - - :param sku: - :type sku: ~azure.mgmt.sql.models.Sku - :param max_size_bytes: The storage limit for the database elastic pool in - bytes. - :type max_size_bytes: long - :param per_database_settings: The per database settings for the elastic - pool. - :type per_database_settings: - ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings - :param zone_redundant: Whether or not this elastic pool is zone redundant, - which means the replicas of this elastic pool will be spread across - multiple availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this elastic pool. - Possible values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ElasticPoolUpdate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.max_size_bytes = kwargs.get('max_size_bytes', None) - self.per_database_settings = kwargs.get('per_database_settings', None) - self.zone_redundant = kwargs.get('zone_redundant', None) - self.license_type = kwargs.get('license_type', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update_py3.py deleted file mode 100644 index d51753795c8a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_update_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ElasticPoolUpdate(Model): - """An elastic pool update. - - :param sku: - :type sku: ~azure.mgmt.sql.models.Sku - :param max_size_bytes: The storage limit for the database elastic pool in - bytes. - :type max_size_bytes: long - :param per_database_settings: The per database settings for the elastic - pool. - :type per_database_settings: - ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings - :param zone_redundant: Whether or not this elastic pool is zone redundant, - which means the replicas of this elastic pool will be spread across - multiple availability zones. - :type zone_redundant: bool - :param license_type: The license type to apply for this elastic pool. - Possible values include: 'LicenseIncluded', 'BasePrice' - :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, - 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, - 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, sku=None, max_size_bytes: int=None, per_database_settings=None, zone_redundant: bool=None, license_type=None, tags=None, **kwargs) -> None: - super(ElasticPoolUpdate, self).__init__(**kwargs) - self.sku = sku - self.max_size_bytes = max_size_bytes - self.per_database_settings = per_database_settings - self.zone_redundant = zone_redundant - self.license_type = license_type - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector.py deleted file mode 100644 index f6fe4ba3732d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class EncryptionProtector(ProxyResource): - """The server encryption protector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :type kind: str - :ivar location: Resource location. - :vartype location: str - :ivar subregion: Subregion of the encryption protector. - :vartype subregion: str - :param server_key_name: The name of the server key. - :type server_key_name: str - :param server_key_type: Required. The encryption protector type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :ivar uri: The URI of the server key. - :vartype uri: str - :ivar thumbprint: Thumbprint of the server key. - :vartype thumbprint: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'subregion': {'readonly': True}, - 'server_key_type': {'required': True}, - 'uri': {'readonly': True}, - 'thumbprint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'subregion': {'key': 'properties.subregion', 'type': 'str'}, - 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EncryptionProtector, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) - self.location = None - self.subregion = None - self.server_key_name = kwargs.get('server_key_name', None) - self.server_key_type = kwargs.get('server_key_type', None) - self.uri = None - self.thumbprint = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_paged.py deleted file mode 100644 index afb096561566..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class EncryptionProtectorPaged(Paged): - """ - A paging container for iterating over a list of :class:`EncryptionProtector ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[EncryptionProtector]'} - } - - def __init__(self, *args, **kwargs): - - super(EncryptionProtectorPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_py3.py deleted file mode 100644 index 6dd4bad3cfbe..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class EncryptionProtector(ProxyResource): - """The server encryption protector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :type kind: str - :ivar location: Resource location. - :vartype location: str - :ivar subregion: Subregion of the encryption protector. - :vartype subregion: str - :param server_key_name: The name of the server key. - :type server_key_name: str - :param server_key_type: Required. The encryption protector type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :ivar uri: The URI of the server key. - :vartype uri: str - :ivar thumbprint: Thumbprint of the server key. - :vartype thumbprint: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'subregion': {'readonly': True}, - 'server_key_type': {'required': True}, - 'uri': {'readonly': True}, - 'thumbprint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'subregion': {'key': 'properties.subregion', 'type': 'str'}, - 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, *, server_key_type, kind: str=None, server_key_name: str=None, **kwargs) -> None: - super(EncryptionProtector, self).__init__(**kwargs) - self.kind = kind - self.location = None - self.subregion = None - self.server_key_name = server_key_name - self.server_key_type = server_key_type - self.uri = None - self.thumbprint = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request.py deleted file mode 100644 index c0eb27d98299..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportRequest(Model): - """Export database parameters. - - All required parameters must be populated in order to send to Azure. - - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - } - - _attribute_map = { - 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, - } - - def __init__(self, **kwargs): - super(ExportRequest, self).__init__(**kwargs) - self.storage_key_type = kwargs.get('storage_key_type', None) - self.storage_key = kwargs.get('storage_key', None) - self.storage_uri = kwargs.get('storage_uri', None) - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.authentication_type = kwargs.get('authentication_type', "SQL") diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request_py3.py deleted file mode 100644 index 1cb99a5fe8fe..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/export_request_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportRequest(Model): - """Export database parameters. - - All required parameters must be populated in order to send to Azure. - - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - } - - _attribute_map = { - 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, - } - - def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, authentication_type="SQL", **kwargs) -> None: - super(ExportRequest, self).__init__(**kwargs) - self.storage_key_type = storage_key_type - self.storage_key = storage_key - self.storage_uri = storage_uri - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.authentication_type = authentication_type diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy.py deleted file mode 100644 index 48c324aa3153..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): - """An extended database blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param predicate_expression: Specifies condition of where clause when - creating an audit. - :type predicate_expression: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ExtendedDatabaseBlobAuditingPolicy, self).__init__(**kwargs) - self.predicate_expression = kwargs.get('predicate_expression', None) - self.state = kwargs.get('state', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) - self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) - self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) - self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy_py3.py deleted file mode 100644 index 9550f279968c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_database_blob_auditing_policy_py3.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): - """An extended database blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param predicate_expression: Specifies condition of where clause when - creating an audit. - :type predicate_expression: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: - super(ExtendedDatabaseBlobAuditingPolicy, self).__init__(**kwargs) - self.predicate_expression = predicate_expression - self.state = state - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.audit_actions_and_groups = audit_actions_and_groups - self.storage_account_subscription_id = storage_account_subscription_id - self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use - self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy.py deleted file mode 100644 index ac110357f4b8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ExtendedServerBlobAuditingPolicy(ProxyResource): - """An extended server blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param predicate_expression: Specifies condition of where clause when - creating an audit. - :type predicate_expression: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ExtendedServerBlobAuditingPolicy, self).__init__(**kwargs) - self.predicate_expression = kwargs.get('predicate_expression', None) - self.state = kwargs.get('state', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) - self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) - self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) - self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy_py3.py deleted file mode 100644 index 89b96febe17d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/extended_server_blob_auditing_policy_py3.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ExtendedServerBlobAuditingPolicy(ProxyResource): - """An extended server blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param predicate_expression: Specifies condition of where clause when - creating an audit. - :type predicate_expression: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: - super(ExtendedServerBlobAuditingPolicy, self).__init__(**kwargs) - self.predicate_expression = predicate_expression - self.state = state - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.audit_actions_and_groups = audit_actions_and_groups - self.storage_account_subscription_id = storage_account_subscription_id - self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use - self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group.py deleted file mode 100644 index 1fd973aae6ff..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class FailoverGroup(ProxyResource): - """A failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param read_write_endpoint: Required. Read-write endpoint of the failover - group instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint - :ivar replication_role: Local replication role of the failover group - instance. Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.FailoverGroupReplicationRole - :ivar replication_state: Replication state of the failover group instance. - :vartype replication_state: str - :param partner_servers: Required. List of partner server information for - the failover group. - :type partner_servers: list[~azure.mgmt.sql.models.PartnerInfo] - :param databases: List of databases in the failover group. - :type databases: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'read_write_endpoint': {'required': True}, - 'replication_role': {'readonly': True}, - 'replication_state': {'readonly': True}, - 'partner_servers': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - 'partner_servers': {'key': 'properties.partnerServers', 'type': '[PartnerInfo]'}, - 'databases': {'key': 'properties.databases', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(FailoverGroup, self).__init__(**kwargs) - self.location = None - self.tags = kwargs.get('tags', None) - self.read_write_endpoint = kwargs.get('read_write_endpoint', None) - self.read_only_endpoint = kwargs.get('read_only_endpoint', None) - self.replication_role = None - self.replication_state = None - self.partner_servers = kwargs.get('partner_servers', None) - self.databases = kwargs.get('databases', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_paged.py deleted file mode 100644 index 5bdb8723cdc3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class FailoverGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`FailoverGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[FailoverGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(FailoverGroupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_py3.py deleted file mode 100644 index 4b179cf5b45f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class FailoverGroup(ProxyResource): - """A failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param read_write_endpoint: Required. Read-write endpoint of the failover - group instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint - :ivar replication_role: Local replication role of the failover group - instance. Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.FailoverGroupReplicationRole - :ivar replication_state: Replication state of the failover group instance. - :vartype replication_state: str - :param partner_servers: Required. List of partner server information for - the failover group. - :type partner_servers: list[~azure.mgmt.sql.models.PartnerInfo] - :param databases: List of databases in the failover group. - :type databases: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'read_write_endpoint': {'required': True}, - 'replication_role': {'readonly': True}, - 'replication_state': {'readonly': True}, - 'partner_servers': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - 'partner_servers': {'key': 'properties.partnerServers', 'type': '[PartnerInfo]'}, - 'databases': {'key': 'properties.databases', 'type': '[str]'}, - } - - def __init__(self, *, read_write_endpoint, partner_servers, tags=None, read_only_endpoint=None, databases=None, **kwargs) -> None: - super(FailoverGroup, self).__init__(**kwargs) - self.location = None - self.tags = tags - self.read_write_endpoint = read_write_endpoint - self.read_only_endpoint = read_only_endpoint - self.replication_role = None - self.replication_state = None - self.partner_servers = partner_servers - self.databases = databases diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint.py deleted file mode 100644 index c64da55dfec9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupReadOnlyEndpoint(Model): - """Read-only endpoint of the failover group instance. - - :param failover_policy: Failover policy of the read-only endpoint for the - failover group. Possible values include: 'Disabled', 'Enabled' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy - """ - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) - self.failover_policy = kwargs.get('failover_policy', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint_py3.py deleted file mode 100644 index aa923c8b0ce8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupReadOnlyEndpoint(Model): - """Read-only endpoint of the failover group instance. - - :param failover_policy: Failover policy of the read-only endpoint for the - failover group. Possible values include: 'Disabled', 'Enabled' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy - """ - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - } - - def __init__(self, *, failover_policy=None, **kwargs) -> None: - super(FailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) - self.failover_policy = failover_policy diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint.py deleted file mode 100644 index 8eb4368fe7be..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupReadWriteEndpoint(Model): - """Read-write endpoint of the failover group instance. - - All required parameters must be populated in order to send to Azure. - - :param failover_policy: Required. Failover policy of the read-write - endpoint for the failover group. If failoverPolicy is Automatic then - failoverWithDataLossGracePeriodMinutes is required. Possible values - include: 'Manual', 'Automatic' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy - :param failover_with_data_loss_grace_period_minutes: Grace period before - failover with data loss is attempted for the read-write endpoint. If - failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is - required. - :type failover_with_data_loss_grace_period_minutes: int - """ - - _validation = { - 'failover_policy': {'required': True}, - } - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(FailoverGroupReadWriteEndpoint, self).__init__(**kwargs) - self.failover_policy = kwargs.get('failover_policy', None) - self.failover_with_data_loss_grace_period_minutes = kwargs.get('failover_with_data_loss_grace_period_minutes', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint_py3.py deleted file mode 100644 index f9ffb4558ebc..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupReadWriteEndpoint(Model): - """Read-write endpoint of the failover group instance. - - All required parameters must be populated in order to send to Azure. - - :param failover_policy: Required. Failover policy of the read-write - endpoint for the failover group. If failoverPolicy is Automatic then - failoverWithDataLossGracePeriodMinutes is required. Possible values - include: 'Manual', 'Automatic' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy - :param failover_with_data_loss_grace_period_minutes: Grace period before - failover with data loss is attempted for the read-write endpoint. If - failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is - required. - :type failover_with_data_loss_grace_period_minutes: int - """ - - _validation = { - 'failover_policy': {'required': True}, - } - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, - } - - def __init__(self, *, failover_policy, failover_with_data_loss_grace_period_minutes: int=None, **kwargs) -> None: - super(FailoverGroupReadWriteEndpoint, self).__init__(**kwargs) - self.failover_policy = failover_policy - self.failover_with_data_loss_grace_period_minutes = failover_with_data_loss_grace_period_minutes diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update.py deleted file mode 100644 index e491b250f0da..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupUpdate(Model): - """A failover group update request. - - :param read_write_endpoint: Read-write endpoint of the failover group - instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint - :param databases: List of databases in the failover group. - :type databases: list[str] - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, - 'databases': {'key': 'properties.databases', 'type': '[str]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(FailoverGroupUpdate, self).__init__(**kwargs) - self.read_write_endpoint = kwargs.get('read_write_endpoint', None) - self.read_only_endpoint = kwargs.get('read_only_endpoint', None) - self.databases = kwargs.get('databases', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update_py3.py deleted file mode 100644 index 3aee1ee5c78c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverGroupUpdate(Model): - """A failover group update request. - - :param read_write_endpoint: Read-write endpoint of the failover group - instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint - :param databases: List of databases in the failover group. - :type databases: list[str] - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, - 'databases': {'key': 'properties.databases', 'type': '[str]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, read_write_endpoint=None, read_only_endpoint=None, databases=None, tags=None, **kwargs) -> None: - super(FailoverGroupUpdate, self).__init__(**kwargs) - self.read_write_endpoint = read_write_endpoint - self.read_only_endpoint = read_only_endpoint - self.databases = databases - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule.py deleted file mode 100644 index 48004048c43a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class FirewallRule(ProxyResource): - """Represents a server firewall rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of server that contains this firewall rule. - :vartype kind: str - :ivar location: Location of the server that contains this firewall rule. - :vartype location: str - :param start_ip_address: Required. The start IP address of the firewall - rule. Must be IPv4 format. Use value '0.0.0.0' to represent all - Azure-internal IP addresses. - :type start_ip_address: str - :param end_ip_address: Required. The end IP address of the firewall rule. - Must be IPv4 format. Must be greater than or equal to startIpAddress. Use - value '0.0.0.0' to represent all Azure-internal IP addresses. - :type end_ip_address: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - 'start_ip_address': {'required': True}, - 'end_ip_address': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, - 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FirewallRule, self).__init__(**kwargs) - self.kind = None - self.location = None - self.start_ip_address = kwargs.get('start_ip_address', None) - self.end_ip_address = kwargs.get('end_ip_address', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_paged.py deleted file mode 100644 index 07586a09287a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class FirewallRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`FirewallRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[FirewallRule]'} - } - - def __init__(self, *args, **kwargs): - - super(FirewallRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_py3.py deleted file mode 100644 index c292730d9653..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_py3.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class FirewallRule(ProxyResource): - """Represents a server firewall rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of server that contains this firewall rule. - :vartype kind: str - :ivar location: Location of the server that contains this firewall rule. - :vartype location: str - :param start_ip_address: Required. The start IP address of the firewall - rule. Must be IPv4 format. Use value '0.0.0.0' to represent all - Azure-internal IP addresses. - :type start_ip_address: str - :param end_ip_address: Required. The end IP address of the firewall rule. - Must be IPv4 format. Must be greater than or equal to startIpAddress. Use - value '0.0.0.0' to represent all Azure-internal IP addresses. - :type end_ip_address: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - 'start_ip_address': {'required': True}, - 'end_ip_address': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, - 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, - } - - def __init__(self, *, start_ip_address: str, end_ip_address: str, **kwargs) -> None: - super(FirewallRule, self).__init__(**kwargs) - self.kind = None - self.location = None - self.start_ip_address = start_ip_address - self.end_ip_address = end_ip_address diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy.py deleted file mode 100644 index 3d8203075617..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class GeoBackupPolicy(ProxyResource): - """A database geo backup policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. The state of the geo backup policy. Possible - values include: 'Disabled', 'Enabled' - :type state: str or ~azure.mgmt.sql.models.GeoBackupPolicyState - :ivar storage_type: The storage type of the geo backup policy. - :vartype storage_type: str - :ivar kind: Kind of geo backup policy. This is metadata used for the - Azure portal experience. - :vartype kind: str - :ivar location: Backup policy location. - :vartype location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'storage_type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'GeoBackupPolicyState'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GeoBackupPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.storage_type = None - self.kind = None - self.location = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_paged.py deleted file mode 100644 index 7a207daa100e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class GeoBackupPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`GeoBackupPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GeoBackupPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(GeoBackupPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_py3.py deleted file mode 100644 index 23941df5ee47..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class GeoBackupPolicy(ProxyResource): - """A database geo backup policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. The state of the geo backup policy. Possible - values include: 'Disabled', 'Enabled' - :type state: str or ~azure.mgmt.sql.models.GeoBackupPolicyState - :ivar storage_type: The storage type of the geo backup policy. - :vartype storage_type: str - :ivar kind: Kind of geo backup policy. This is metadata used for the - Azure portal experience. - :vartype kind: str - :ivar location: Backup policy location. - :vartype location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'storage_type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'GeoBackupPolicyState'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, *, state, **kwargs) -> None: - super(GeoBackupPolicy, self).__init__(**kwargs) - self.state = state - self.storage_type = None - self.kind = None - self.location = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response.py deleted file mode 100644 index 5cfb638398f0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ImportExportResponse(ProxyResource): - """Response for Import/Export Get operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar request_type: The request type of the operation. - :vartype request_type: str - :ivar request_id: The request type of the operation. - :vartype request_id: str - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar database_name: The name of the database. - :vartype database_name: str - :ivar status: The status message returned from the server. - :vartype status: str - :ivar last_modified_time: The operation status last modified time. - :vartype last_modified_time: str - :ivar queued_time: The operation queued time. - :vartype queued_time: str - :ivar blob_uri: The blob uri. - :vartype blob_uri: str - :ivar error_message: The error message returned from the server. - :vartype error_message: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'request_type': {'readonly': True}, - 'request_id': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - 'status': {'readonly': True}, - 'last_modified_time': {'readonly': True}, - 'queued_time': {'readonly': True}, - 'blob_uri': {'readonly': True}, - 'error_message': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'request_type': {'key': 'properties.requestType', 'type': 'str'}, - 'request_id': {'key': 'properties.requestId', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'str'}, - 'queued_time': {'key': 'properties.queuedTime', 'type': 'str'}, - 'blob_uri': {'key': 'properties.blobUri', 'type': 'str'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImportExportResponse, self).__init__(**kwargs) - self.request_type = None - self.request_id = None - self.server_name = None - self.database_name = None - self.status = None - self.last_modified_time = None - self.queued_time = None - self.blob_uri = None - self.error_message = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response_py3.py deleted file mode 100644 index a344fc99266b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response_py3.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ImportExportResponse(ProxyResource): - """Response for Import/Export Get operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar request_type: The request type of the operation. - :vartype request_type: str - :ivar request_id: The request type of the operation. - :vartype request_id: str - :ivar server_name: The name of the server. - :vartype server_name: str - :ivar database_name: The name of the database. - :vartype database_name: str - :ivar status: The status message returned from the server. - :vartype status: str - :ivar last_modified_time: The operation status last modified time. - :vartype last_modified_time: str - :ivar queued_time: The operation queued time. - :vartype queued_time: str - :ivar blob_uri: The blob uri. - :vartype blob_uri: str - :ivar error_message: The error message returned from the server. - :vartype error_message: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'request_type': {'readonly': True}, - 'request_id': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - 'status': {'readonly': True}, - 'last_modified_time': {'readonly': True}, - 'queued_time': {'readonly': True}, - 'blob_uri': {'readonly': True}, - 'error_message': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'request_type': {'key': 'properties.requestType', 'type': 'str'}, - 'request_id': {'key': 'properties.requestId', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'str'}, - 'queued_time': {'key': 'properties.queuedTime', 'type': 'str'}, - 'blob_uri': {'key': 'properties.blobUri', 'type': 'str'}, - 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ImportExportResponse, self).__init__(**kwargs) - self.request_type = None - self.request_id = None - self.server_name = None - self.database_name = None - self.status = None - self.last_modified_time = None - self.queued_time = None - self.blob_uri = None - self.error_message = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request.py deleted file mode 100644 index 3eba93dcec8e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImportExtensionRequest(Model): - """Import database parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: The name of the extension. - :type name: str - :param type: The type of the extension. - :type type: str - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - :ivar operation_mode: Required. The type of import operation being - performed. This is always Import. Default value: "Import" . - :vartype operation_mode: str - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - 'operation_mode': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_key_type': {'key': 'properties.storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'properties.storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'properties.storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'properties.authenticationType', 'type': 'AuthenticationType'}, - 'operation_mode': {'key': 'properties.operationMode', 'type': 'str'}, - } - - operation_mode = "Import" - - def __init__(self, **kwargs): - super(ImportExtensionRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.storage_key_type = kwargs.get('storage_key_type', None) - self.storage_key = kwargs.get('storage_key', None) - self.storage_uri = kwargs.get('storage_uri', None) - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.authentication_type = kwargs.get('authentication_type', "SQL") diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request_py3.py deleted file mode 100644 index 0486f0a68dbe..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImportExtensionRequest(Model): - """Import database parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: The name of the extension. - :type name: str - :param type: The type of the extension. - :type type: str - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - :ivar operation_mode: Required. The type of import operation being - performed. This is always Import. Default value: "Import" . - :vartype operation_mode: str - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - 'operation_mode': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_key_type': {'key': 'properties.storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'properties.storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'properties.storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'properties.authenticationType', 'type': 'AuthenticationType'}, - 'operation_mode': {'key': 'properties.operationMode', 'type': 'str'}, - } - - operation_mode = "Import" - - def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, name: str=None, type: str=None, authentication_type="SQL", **kwargs) -> None: - super(ImportExtensionRequest, self).__init__(**kwargs) - self.name = name - self.type = type - self.storage_key_type = storage_key_type - self.storage_key = storage_key - self.storage_uri = storage_uri - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.authentication_type = authentication_type diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request.py deleted file mode 100644 index a1683ffad9b4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .export_request import ExportRequest - - -class ImportRequest(ExportRequest): - """Import database parameters. - - All required parameters must be populated in order to send to Azure. - - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - :param database_name: Required. The name of the database to import. - :type database_name: str - :param edition: Required. The edition for the database being created. - Possible values include: 'Web', 'Business', 'Basic', 'Standard', - 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', - 'System2' - :type edition: str or ~azure.mgmt.sql.models.DatabaseEdition - :param service_objective_name: Required. The name of the service objective - to assign to the database. Possible values include: 'System', 'System0', - 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', - 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', - 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', - 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', - 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', - 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', - 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', - 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - :type service_objective_name: str or - ~azure.mgmt.sql.models.ServiceObjectiveName - :param max_size_bytes: Required. The maximum size for the newly imported - database. - :type max_size_bytes: str - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - 'database_name': {'required': True}, - 'edition': {'required': True}, - 'service_objective_name': {'required': True}, - 'max_size_bytes': {'required': True}, - } - - _attribute_map = { - 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'edition': {'key': 'edition', 'type': 'str'}, - 'service_objective_name': {'key': 'serviceObjectiveName', 'type': 'str'}, - 'max_size_bytes': {'key': 'maxSizeBytes', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImportRequest, self).__init__(**kwargs) - self.database_name = kwargs.get('database_name', None) - self.edition = kwargs.get('edition', None) - self.service_objective_name = kwargs.get('service_objective_name', None) - self.max_size_bytes = kwargs.get('max_size_bytes', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py deleted file mode 100644 index 68b97ae814a3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .export_request_py3 import ExportRequest - - -class ImportRequest(ExportRequest): - """Import database parameters. - - All required parameters must be populated in order to send to Azure. - - :param storage_key_type: Required. The type of the storage key to use. - Possible values include: 'StorageAccessKey', 'SharedAccessKey' - :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType - :param storage_key: Required. The storage key to use. If storage key type - is SharedAccessKey, it must be preceded with a "?." - :type storage_key: str - :param storage_uri: Required. The storage uri to use. - :type storage_uri: str - :param administrator_login: Required. The name of the SQL administrator. - :type administrator_login: str - :param administrator_login_password: Required. The password of the SQL - administrator. - :type administrator_login_password: str - :param authentication_type: The authentication type. Possible values - include: 'SQL', 'ADPassword'. Default value: "SQL" . - :type authentication_type: str or - ~azure.mgmt.sql.models.AuthenticationType - :param database_name: Required. The name of the database to import. - :type database_name: str - :param edition: Required. The edition for the database being created. - Possible values include: 'Web', 'Business', 'Basic', 'Standard', - 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', - 'System2' - :type edition: str or ~azure.mgmt.sql.models.DatabaseEdition - :param service_objective_name: Required. The name of the service objective - to assign to the database. Possible values include: 'System', 'System0', - 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', - 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', - 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', - 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', - 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', - 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', - 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', - 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - :type service_objective_name: str or - ~azure.mgmt.sql.models.ServiceObjectiveName - :param max_size_bytes: Required. The maximum size for the newly imported - database. - :type max_size_bytes: str - """ - - _validation = { - 'storage_key_type': {'required': True}, - 'storage_key': {'required': True}, - 'storage_uri': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - 'database_name': {'required': True}, - 'edition': {'required': True}, - 'service_objective_name': {'required': True}, - 'max_size_bytes': {'required': True}, - } - - _attribute_map = { - 'storage_key_type': {'key': 'storageKeyType', 'type': 'StorageKeyType'}, - 'storage_key': {'key': 'storageKey', 'type': 'str'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'AuthenticationType'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'edition': {'key': 'edition', 'type': 'str'}, - 'service_objective_name': {'key': 'serviceObjectiveName', 'type': 'str'}, - 'max_size_bytes': {'key': 'maxSizeBytes', 'type': 'str'}, - } - - def __init__(self, *, storage_key_type, storage_key: str, storage_uri: str, administrator_login: str, administrator_login_password: str, database_name: str, edition, service_objective_name, max_size_bytes: str, authentication_type="SQL", **kwargs) -> None: - super(ImportRequest, self).__init__(storage_key_type=storage_key_type, storage_key=storage_key, storage_uri=storage_uri, administrator_login=administrator_login, administrator_login_password=administrator_login_password, authentication_type=authentication_type, **kwargs) - self.database_name = database_name - self.edition = edition - self.service_objective_name = service_objective_name - self.max_size_bytes = max_size_bytes diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group.py deleted file mode 100644 index f360ffbfed57..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class InstanceFailoverGroup(ProxyResource): - """An instance failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param read_write_endpoint: Required. Read-write endpoint of the failover - group instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.InstanceFailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.InstanceFailoverGroupReadOnlyEndpoint - :ivar replication_role: Local replication role of the failover group - instance. Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole - :ivar replication_state: Replication state of the failover group instance. - :vartype replication_state: str - :param partner_regions: Required. Partner region information for the - failover group. - :type partner_regions: list[~azure.mgmt.sql.models.PartnerRegionInfo] - :param managed_instance_pairs: Required. List of managed instance pairs in - the failover group. - :type managed_instance_pairs: - list[~azure.mgmt.sql.models.ManagedInstancePairInfo] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'read_write_endpoint': {'required': True}, - 'replication_role': {'readonly': True}, - 'replication_state': {'readonly': True}, - 'partner_regions': {'required': True}, - 'managed_instance_pairs': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'InstanceFailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'InstanceFailoverGroupReadOnlyEndpoint'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - 'partner_regions': {'key': 'properties.partnerRegions', 'type': '[PartnerRegionInfo]'}, - 'managed_instance_pairs': {'key': 'properties.managedInstancePairs', 'type': '[ManagedInstancePairInfo]'}, - } - - def __init__(self, **kwargs): - super(InstanceFailoverGroup, self).__init__(**kwargs) - self.read_write_endpoint = kwargs.get('read_write_endpoint', None) - self.read_only_endpoint = kwargs.get('read_only_endpoint', None) - self.replication_role = None - self.replication_state = None - self.partner_regions = kwargs.get('partner_regions', None) - self.managed_instance_pairs = kwargs.get('managed_instance_pairs', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_paged.py deleted file mode 100644 index c67eaf2ef670..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class InstanceFailoverGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`InstanceFailoverGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[InstanceFailoverGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(InstanceFailoverGroupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_py3.py deleted file mode 100644 index 8959f26c9f69..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_py3.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class InstanceFailoverGroup(ProxyResource): - """An instance failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param read_write_endpoint: Required. Read-write endpoint of the failover - group instance. - :type read_write_endpoint: - ~azure.mgmt.sql.models.InstanceFailoverGroupReadWriteEndpoint - :param read_only_endpoint: Read-only endpoint of the failover group - instance. - :type read_only_endpoint: - ~azure.mgmt.sql.models.InstanceFailoverGroupReadOnlyEndpoint - :ivar replication_role: Local replication role of the failover group - instance. Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole - :ivar replication_state: Replication state of the failover group instance. - :vartype replication_state: str - :param partner_regions: Required. Partner region information for the - failover group. - :type partner_regions: list[~azure.mgmt.sql.models.PartnerRegionInfo] - :param managed_instance_pairs: Required. List of managed instance pairs in - the failover group. - :type managed_instance_pairs: - list[~azure.mgmt.sql.models.ManagedInstancePairInfo] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'read_write_endpoint': {'required': True}, - 'replication_role': {'readonly': True}, - 'replication_state': {'readonly': True}, - 'partner_regions': {'required': True}, - 'managed_instance_pairs': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'InstanceFailoverGroupReadWriteEndpoint'}, - 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'InstanceFailoverGroupReadOnlyEndpoint'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - 'partner_regions': {'key': 'properties.partnerRegions', 'type': '[PartnerRegionInfo]'}, - 'managed_instance_pairs': {'key': 'properties.managedInstancePairs', 'type': '[ManagedInstancePairInfo]'}, - } - - def __init__(self, *, read_write_endpoint, partner_regions, managed_instance_pairs, read_only_endpoint=None, **kwargs) -> None: - super(InstanceFailoverGroup, self).__init__(**kwargs) - self.read_write_endpoint = read_write_endpoint - self.read_only_endpoint = read_only_endpoint - self.replication_role = None - self.replication_state = None - self.partner_regions = partner_regions - self.managed_instance_pairs = managed_instance_pairs diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint.py deleted file mode 100644 index 2a9857817ae4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceFailoverGroupReadOnlyEndpoint(Model): - """Read-only endpoint of the failover group instance. - - :param failover_policy: Failover policy of the read-only endpoint for the - failover group. Possible values include: 'Disabled', 'Enabled' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy - """ - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(InstanceFailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) - self.failover_policy = kwargs.get('failover_policy', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint_py3.py deleted file mode 100644 index 71c9f180cdf7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceFailoverGroupReadOnlyEndpoint(Model): - """Read-only endpoint of the failover group instance. - - :param failover_policy: Failover policy of the read-only endpoint for the - failover group. Possible values include: 'Disabled', 'Enabled' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy - """ - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - } - - def __init__(self, *, failover_policy=None, **kwargs) -> None: - super(InstanceFailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) - self.failover_policy = failover_policy diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint.py deleted file mode 100644 index 89a86899e503..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceFailoverGroupReadWriteEndpoint(Model): - """Read-write endpoint of the failover group instance. - - All required parameters must be populated in order to send to Azure. - - :param failover_policy: Required. Failover policy of the read-write - endpoint for the failover group. If failoverPolicy is Automatic then - failoverWithDataLossGracePeriodMinutes is required. Possible values - include: 'Manual', 'Automatic' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy - :param failover_with_data_loss_grace_period_minutes: Grace period before - failover with data loss is attempted for the read-write endpoint. If - failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is - required. - :type failover_with_data_loss_grace_period_minutes: int - """ - - _validation = { - 'failover_policy': {'required': True}, - } - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(InstanceFailoverGroupReadWriteEndpoint, self).__init__(**kwargs) - self.failover_policy = kwargs.get('failover_policy', None) - self.failover_with_data_loss_grace_period_minutes = kwargs.get('failover_with_data_loss_grace_period_minutes', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint_py3.py deleted file mode 100644 index 7fdc047ba37c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceFailoverGroupReadWriteEndpoint(Model): - """Read-write endpoint of the failover group instance. - - All required parameters must be populated in order to send to Azure. - - :param failover_policy: Required. Failover policy of the read-write - endpoint for the failover group. If failoverPolicy is Automatic then - failoverWithDataLossGracePeriodMinutes is required. Possible values - include: 'Manual', 'Automatic' - :type failover_policy: str or - ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy - :param failover_with_data_loss_grace_period_minutes: Grace period before - failover with data loss is attempted for the read-write endpoint. If - failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is - required. - :type failover_with_data_loss_grace_period_minutes: int - """ - - _validation = { - 'failover_policy': {'required': True}, - } - - _attribute_map = { - 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, - 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, - } - - def __init__(self, *, failover_policy, failover_with_data_loss_grace_period_minutes: int=None, **kwargs) -> None: - super(InstanceFailoverGroupReadWriteEndpoint, self).__init__(**kwargs) - self.failover_policy = failover_policy - self.failover_with_data_loss_grace_period_minutes = failover_with_data_loss_grace_period_minutes diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job.py deleted file mode 100644 index 6b2c60fd1d4b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class Job(ProxyResource): - """A job. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param description: User-defined description of the job. Default value: "" - . - :type description: str - :ivar version: The job version number. - :vartype version: int - :param schedule: Schedule properties of the job. - :type schedule: ~azure.mgmt.sql.models.JobSchedule - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'version': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'int'}, - 'schedule': {'key': 'properties.schedule', 'type': 'JobSchedule'}, - } - - def __init__(self, **kwargs): - super(Job, self).__init__(**kwargs) - self.description = kwargs.get('description', "") - self.version = None - self.schedule = kwargs.get('schedule', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent.py deleted file mode 100644 index 48d42c28260c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class JobAgent(TrackedResource): - """An Azure SQL job agent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :param database_id: Required. Resource ID of the database to store job - metadata in. - :type database_id: str - :ivar state: The state of the job agent. Possible values include: - 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' - :vartype state: str or ~azure.mgmt.sql.models.JobAgentState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'database_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobAgent, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.database_id = kwargs.get('database_id', None) - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_paged.py deleted file mode 100644 index 25dd750b9d1f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobAgentPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobAgent ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobAgent]'} - } - - def __init__(self, *args, **kwargs): - - super(JobAgentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_py3.py deleted file mode 100644 index 936d87932ebc..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class JobAgent(TrackedResource): - """An Azure SQL job agent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: The name and tier of the SKU. - :type sku: ~azure.mgmt.sql.models.Sku - :param database_id: Required. Resource ID of the database to store job - metadata in. - :type database_id: str - :ivar state: The state of the job agent. Possible values include: - 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' - :vartype state: str or ~azure.mgmt.sql.models.JobAgentState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'database_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, *, location: str, database_id: str, tags=None, sku=None, **kwargs) -> None: - super(JobAgent, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.database_id = database_id - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update.py deleted file mode 100644 index af781de91cbf..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobAgentUpdate(Model): - """An update to an Azure SQL job agent. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(JobAgentUpdate, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update_py3.py deleted file mode 100644 index ab5e71f7b1d1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobAgentUpdate(Model): - """An update to an Azure SQL job agent. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(JobAgentUpdate, self).__init__(**kwargs) - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential.py deleted file mode 100644 index 807d34975114..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class JobCredential(ProxyResource): - """A stored credential that can be used by a job to connect to target - databases. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param username: Required. The credential user name. - :type username: str - :param password: Required. The credential password. - :type password: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'username': {'required': True}, - 'password': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'username': {'key': 'properties.username', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobCredential, self).__init__(**kwargs) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_paged.py deleted file mode 100644 index 550108e41c93..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobCredentialPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobCredential ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobCredential]'} - } - - def __init__(self, *args, **kwargs): - - super(JobCredentialPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_py3.py deleted file mode 100644 index 5158010b9c74..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class JobCredential(ProxyResource): - """A stored credential that can be used by a job to connect to target - databases. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param username: Required. The credential user name. - :type username: str - :param password: Required. The credential password. - :type password: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'username': {'required': True}, - 'password': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'username': {'key': 'properties.username', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - } - - def __init__(self, *, username: str, password: str, **kwargs) -> None: - super(JobCredential, self).__init__(**kwargs) - self.username = username - self.password = password diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution.py deleted file mode 100644 index 92744fb7c75b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class JobExecution(ProxyResource): - """An execution of a job. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar job_version: The job version number. - :vartype job_version: int - :ivar step_name: The job step name. - :vartype step_name: str - :ivar step_id: The job step id. - :vartype step_id: int - :ivar job_execution_id: The unique identifier of the job execution. - :vartype job_execution_id: str - :ivar lifecycle: The detailed state of the job execution. Possible values - include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', - 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', - 'TimedOut', 'Canceled', 'Skipped' - :vartype lifecycle: str or ~azure.mgmt.sql.models.JobExecutionLifecycle - :ivar provisioning_state: The ARM provisioning state of the job execution. - Possible values include: 'Created', 'InProgress', 'Succeeded', 'Failed', - 'Canceled' - :vartype provisioning_state: str or - ~azure.mgmt.sql.models.ProvisioningState - :ivar create_time: The time that the job execution was created. - :vartype create_time: datetime - :ivar start_time: The time that the job execution started. - :vartype start_time: datetime - :ivar end_time: The time that the job execution completed. - :vartype end_time: datetime - :param current_attempts: Number of times the job execution has been - attempted. - :type current_attempts: int - :ivar current_attempt_start_time: Start time of the current attempt. - :vartype current_attempt_start_time: datetime - :ivar last_message: The last status or error message. - :vartype last_message: str - :ivar target: The target that this execution is executed on. - :vartype target: ~azure.mgmt.sql.models.JobExecutionTarget - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'job_version': {'readonly': True}, - 'step_name': {'readonly': True}, - 'step_id': {'readonly': True}, - 'job_execution_id': {'readonly': True}, - 'lifecycle': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'create_time': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'current_attempt_start_time': {'readonly': True}, - 'last_message': {'readonly': True}, - 'target': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'job_version': {'key': 'properties.jobVersion', 'type': 'int'}, - 'step_name': {'key': 'properties.stepName', 'type': 'str'}, - 'step_id': {'key': 'properties.stepId', 'type': 'int'}, - 'job_execution_id': {'key': 'properties.jobExecutionId', 'type': 'str'}, - 'lifecycle': {'key': 'properties.lifecycle', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'current_attempts': {'key': 'properties.currentAttempts', 'type': 'int'}, - 'current_attempt_start_time': {'key': 'properties.currentAttemptStartTime', 'type': 'iso-8601'}, - 'last_message': {'key': 'properties.lastMessage', 'type': 'str'}, - 'target': {'key': 'properties.target', 'type': 'JobExecutionTarget'}, - } - - def __init__(self, **kwargs): - super(JobExecution, self).__init__(**kwargs) - self.job_version = None - self.step_name = None - self.step_id = None - self.job_execution_id = None - self.lifecycle = None - self.provisioning_state = None - self.create_time = None - self.start_time = None - self.end_time = None - self.current_attempts = kwargs.get('current_attempts', None) - self.current_attempt_start_time = None - self.last_message = None - self.target = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_paged.py deleted file mode 100644 index bfcdb03ea9aa..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobExecutionPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobExecution ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobExecution]'} - } - - def __init__(self, *args, **kwargs): - - super(JobExecutionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_py3.py deleted file mode 100644 index b7fdaba7c147..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_py3.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class JobExecution(ProxyResource): - """An execution of a job. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar job_version: The job version number. - :vartype job_version: int - :ivar step_name: The job step name. - :vartype step_name: str - :ivar step_id: The job step id. - :vartype step_id: int - :ivar job_execution_id: The unique identifier of the job execution. - :vartype job_execution_id: str - :ivar lifecycle: The detailed state of the job execution. Possible values - include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', - 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', - 'TimedOut', 'Canceled', 'Skipped' - :vartype lifecycle: str or ~azure.mgmt.sql.models.JobExecutionLifecycle - :ivar provisioning_state: The ARM provisioning state of the job execution. - Possible values include: 'Created', 'InProgress', 'Succeeded', 'Failed', - 'Canceled' - :vartype provisioning_state: str or - ~azure.mgmt.sql.models.ProvisioningState - :ivar create_time: The time that the job execution was created. - :vartype create_time: datetime - :ivar start_time: The time that the job execution started. - :vartype start_time: datetime - :ivar end_time: The time that the job execution completed. - :vartype end_time: datetime - :param current_attempts: Number of times the job execution has been - attempted. - :type current_attempts: int - :ivar current_attempt_start_time: Start time of the current attempt. - :vartype current_attempt_start_time: datetime - :ivar last_message: The last status or error message. - :vartype last_message: str - :ivar target: The target that this execution is executed on. - :vartype target: ~azure.mgmt.sql.models.JobExecutionTarget - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'job_version': {'readonly': True}, - 'step_name': {'readonly': True}, - 'step_id': {'readonly': True}, - 'job_execution_id': {'readonly': True}, - 'lifecycle': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'create_time': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'current_attempt_start_time': {'readonly': True}, - 'last_message': {'readonly': True}, - 'target': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'job_version': {'key': 'properties.jobVersion', 'type': 'int'}, - 'step_name': {'key': 'properties.stepName', 'type': 'str'}, - 'step_id': {'key': 'properties.stepId', 'type': 'int'}, - 'job_execution_id': {'key': 'properties.jobExecutionId', 'type': 'str'}, - 'lifecycle': {'key': 'properties.lifecycle', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'current_attempts': {'key': 'properties.currentAttempts', 'type': 'int'}, - 'current_attempt_start_time': {'key': 'properties.currentAttemptStartTime', 'type': 'iso-8601'}, - 'last_message': {'key': 'properties.lastMessage', 'type': 'str'}, - 'target': {'key': 'properties.target', 'type': 'JobExecutionTarget'}, - } - - def __init__(self, *, current_attempts: int=None, **kwargs) -> None: - super(JobExecution, self).__init__(**kwargs) - self.job_version = None - self.step_name = None - self.step_id = None - self.job_execution_id = None - self.lifecycle = None - self.provisioning_state = None - self.create_time = None - self.start_time = None - self.end_time = None - self.current_attempts = current_attempts - self.current_attempt_start_time = None - self.last_message = None - self.target = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target.py deleted file mode 100644 index 50557aaf96d0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobExecutionTarget(Model): - """The target that a job execution is executed on. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The type of the target. Possible values include: - 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' - :vartype type: str or ~azure.mgmt.sql.models.JobTargetType - :ivar server_name: The server name. - :vartype server_name: str - :ivar database_name: The database name. - :vartype database_name: str - """ - - _validation = { - 'type': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobExecutionTarget, self).__init__(**kwargs) - self.type = None - self.server_name = None - self.database_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target_py3.py deleted file mode 100644 index 551716c3cd31..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobExecutionTarget(Model): - """The target that a job execution is executed on. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The type of the target. Possible values include: - 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' - :vartype type: str or ~azure.mgmt.sql.models.JobTargetType - :ivar server_name: The server name. - :vartype server_name: str - :ivar database_name: The database name. - :vartype database_name: str - """ - - _validation = { - 'type': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(JobExecutionTarget, self).__init__(**kwargs) - self.type = None - self.server_name = None - self.database_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_paged.py deleted file mode 100644 index 3b85770570f2..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobPaged(Paged): - """ - A paging container for iterating over a list of :class:`Job ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Job]'} - } - - def __init__(self, *args, **kwargs): - - super(JobPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_py3.py deleted file mode 100644 index 5bfb9b53f03f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class Job(ProxyResource): - """A job. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param description: User-defined description of the job. Default value: "" - . - :type description: str - :ivar version: The job version number. - :vartype version: int - :param schedule: Schedule properties of the job. - :type schedule: ~azure.mgmt.sql.models.JobSchedule - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'version': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'int'}, - 'schedule': {'key': 'properties.schedule', 'type': 'JobSchedule'}, - } - - def __init__(self, *, description: str="", schedule=None, **kwargs) -> None: - super(Job, self).__init__(**kwargs) - self.description = description - self.version = None - self.schedule = schedule diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule.py deleted file mode 100644 index 354e32c4f5b0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobSchedule(Model): - """Scheduling properties of a job. - - :param start_time: Schedule start time. Default value: - "0001-01-01T00:00:00Z" . - :type start_time: datetime - :param end_time: Schedule end time. Default value: "9999-12-31T11:59:59Z" - . - :type end_time: datetime - :param type: Schedule interval type. Possible values include: 'Once', - 'Recurring'. Default value: "Once" . - :type type: str or ~azure.mgmt.sql.models.JobScheduleType - :param enabled: Whether or not the schedule is enabled. - :type enabled: bool - :param interval: Value of the schedule's recurring interval, if the - schedule type is recurring. ISO8601 duration format. - :type interval: str - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'JobScheduleType'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'interval': {'key': 'interval', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobSchedule, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', "0001-01-01T00:00:00Z") - self.end_time = kwargs.get('end_time', "9999-12-31T11:59:59Z") - self.type = kwargs.get('type', "Once") - self.enabled = kwargs.get('enabled', None) - self.interval = kwargs.get('interval', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule_py3.py deleted file mode 100644 index 4b4a6a8f8971..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobSchedule(Model): - """Scheduling properties of a job. - - :param start_time: Schedule start time. Default value: - "0001-01-01T00:00:00Z" . - :type start_time: datetime - :param end_time: Schedule end time. Default value: "9999-12-31T11:59:59Z" - . - :type end_time: datetime - :param type: Schedule interval type. Possible values include: 'Once', - 'Recurring'. Default value: "Once" . - :type type: str or ~azure.mgmt.sql.models.JobScheduleType - :param enabled: Whether or not the schedule is enabled. - :type enabled: bool - :param interval: Value of the schedule's recurring interval, if the - schedule type is recurring. ISO8601 duration format. - :type interval: str - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'JobScheduleType'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'interval': {'key': 'interval', 'type': 'str'}, - } - - def __init__(self, *, start_time="0001-01-01T00:00:00Z", end_time="9999-12-31T11:59:59Z", type="Once", enabled: bool=None, interval: str=None, **kwargs) -> None: - super(JobSchedule, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time - self.type = type - self.enabled = enabled - self.interval = interval diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step.py deleted file mode 100644 index f032375dec32..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class JobStep(ProxyResource): - """A job step. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param step_id: The job step's index within the job. If not specified when - creating the job step, it will be created as the last step. If not - specified when updating the job step, the step id is not modified. - :type step_id: int - :param target_group: Required. The resource ID of the target group that - the job step will be executed on. - :type target_group: str - :param credential: Required. The resource ID of the job credential that - will be used to connect to the targets. - :type credential: str - :param action: Required. The action payload of the job step. - :type action: ~azure.mgmt.sql.models.JobStepAction - :param output: Output destination properties of the job step. - :type output: ~azure.mgmt.sql.models.JobStepOutput - :param execution_options: Execution options for the job step. - :type execution_options: ~azure.mgmt.sql.models.JobStepExecutionOptions - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'target_group': {'required': True}, - 'credential': {'required': True}, - 'action': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'step_id': {'key': 'properties.stepId', 'type': 'int'}, - 'target_group': {'key': 'properties.targetGroup', 'type': 'str'}, - 'credential': {'key': 'properties.credential', 'type': 'str'}, - 'action': {'key': 'properties.action', 'type': 'JobStepAction'}, - 'output': {'key': 'properties.output', 'type': 'JobStepOutput'}, - 'execution_options': {'key': 'properties.executionOptions', 'type': 'JobStepExecutionOptions'}, - } - - def __init__(self, **kwargs): - super(JobStep, self).__init__(**kwargs) - self.step_id = kwargs.get('step_id', None) - self.target_group = kwargs.get('target_group', None) - self.credential = kwargs.get('credential', None) - self.action = kwargs.get('action', None) - self.output = kwargs.get('output', None) - self.execution_options = kwargs.get('execution_options', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action.py deleted file mode 100644 index 68e55b1fa38f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepAction(Model): - """The action to be executed by a job step. - - All required parameters must be populated in order to send to Azure. - - :param type: Type of action being executed by the job step. Possible - values include: 'TSql'. Default value: "TSql" . - :type type: str or ~azure.mgmt.sql.models.JobStepActionType - :param source: The source of the action to execute. Possible values - include: 'Inline'. Default value: "Inline" . - :type source: str or ~azure.mgmt.sql.models.JobStepActionSource - :param value: Required. The action value, for example the text of the - T-SQL script to execute. - :type value: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobStepAction, self).__init__(**kwargs) - self.type = kwargs.get('type', "TSql") - self.source = kwargs.get('source', "Inline") - self.value = kwargs.get('value', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action_py3.py deleted file mode 100644 index 4d8848c8eaef..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepAction(Model): - """The action to be executed by a job step. - - All required parameters must be populated in order to send to Azure. - - :param type: Type of action being executed by the job step. Possible - values include: 'TSql'. Default value: "TSql" . - :type type: str or ~azure.mgmt.sql.models.JobStepActionType - :param source: The source of the action to execute. Possible values - include: 'Inline'. Default value: "Inline" . - :type source: str or ~azure.mgmt.sql.models.JobStepActionSource - :param value: Required. The action value, for example the text of the - T-SQL script to execute. - :type value: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, value: str, type="TSql", source="Inline", **kwargs) -> None: - super(JobStepAction, self).__init__(**kwargs) - self.type = type - self.source = source - self.value = value diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options.py deleted file mode 100644 index 6a49f1d10f25..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepExecutionOptions(Model): - """The execution options of a job step. - - :param timeout_seconds: Execution timeout for the job step. Default value: - 43200 . - :type timeout_seconds: int - :param retry_attempts: Maximum number of times the job step will be - reattempted if the first attempt fails. Default value: 10 . - :type retry_attempts: int - :param initial_retry_interval_seconds: Initial delay between retries for - job step execution. Default value: 1 . - :type initial_retry_interval_seconds: int - :param maximum_retry_interval_seconds: The maximum amount of time to wait - between retries for job step execution. Default value: 120 . - :type maximum_retry_interval_seconds: int - :param retry_interval_backoff_multiplier: The backoff multiplier for the - time between retries. Default value: 2 . - :type retry_interval_backoff_multiplier: float - """ - - _attribute_map = { - 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, - 'retry_attempts': {'key': 'retryAttempts', 'type': 'int'}, - 'initial_retry_interval_seconds': {'key': 'initialRetryIntervalSeconds', 'type': 'int'}, - 'maximum_retry_interval_seconds': {'key': 'maximumRetryIntervalSeconds', 'type': 'int'}, - 'retry_interval_backoff_multiplier': {'key': 'retryIntervalBackoffMultiplier', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(JobStepExecutionOptions, self).__init__(**kwargs) - self.timeout_seconds = kwargs.get('timeout_seconds', 43200) - self.retry_attempts = kwargs.get('retry_attempts', 10) - self.initial_retry_interval_seconds = kwargs.get('initial_retry_interval_seconds', 1) - self.maximum_retry_interval_seconds = kwargs.get('maximum_retry_interval_seconds', 120) - self.retry_interval_backoff_multiplier = kwargs.get('retry_interval_backoff_multiplier', 2) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options_py3.py deleted file mode 100644 index 712f0e947436..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepExecutionOptions(Model): - """The execution options of a job step. - - :param timeout_seconds: Execution timeout for the job step. Default value: - 43200 . - :type timeout_seconds: int - :param retry_attempts: Maximum number of times the job step will be - reattempted if the first attempt fails. Default value: 10 . - :type retry_attempts: int - :param initial_retry_interval_seconds: Initial delay between retries for - job step execution. Default value: 1 . - :type initial_retry_interval_seconds: int - :param maximum_retry_interval_seconds: The maximum amount of time to wait - between retries for job step execution. Default value: 120 . - :type maximum_retry_interval_seconds: int - :param retry_interval_backoff_multiplier: The backoff multiplier for the - time between retries. Default value: 2 . - :type retry_interval_backoff_multiplier: float - """ - - _attribute_map = { - 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, - 'retry_attempts': {'key': 'retryAttempts', 'type': 'int'}, - 'initial_retry_interval_seconds': {'key': 'initialRetryIntervalSeconds', 'type': 'int'}, - 'maximum_retry_interval_seconds': {'key': 'maximumRetryIntervalSeconds', 'type': 'int'}, - 'retry_interval_backoff_multiplier': {'key': 'retryIntervalBackoffMultiplier', 'type': 'float'}, - } - - def __init__(self, *, timeout_seconds: int=43200, retry_attempts: int=10, initial_retry_interval_seconds: int=1, maximum_retry_interval_seconds: int=120, retry_interval_backoff_multiplier: float=2, **kwargs) -> None: - super(JobStepExecutionOptions, self).__init__(**kwargs) - self.timeout_seconds = timeout_seconds - self.retry_attempts = retry_attempts - self.initial_retry_interval_seconds = initial_retry_interval_seconds - self.maximum_retry_interval_seconds = maximum_retry_interval_seconds - self.retry_interval_backoff_multiplier = retry_interval_backoff_multiplier diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output.py deleted file mode 100644 index 8a015a7505bd..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepOutput(Model): - """The output configuration of a job step. - - All required parameters must be populated in order to send to Azure. - - :param type: The output destination type. Possible values include: - 'SqlDatabase'. Default value: "SqlDatabase" . - :type type: str or ~azure.mgmt.sql.models.JobStepOutputType - :param subscription_id: The output destination subscription id. - :type subscription_id: str - :param resource_group_name: The output destination resource group. - :type resource_group_name: str - :param server_name: Required. The output destination server name. - :type server_name: str - :param database_name: Required. The output destination database. - :type database_name: str - :param schema_name: The output destination schema. Default value: "dbo" . - :type schema_name: str - :param table_name: Required. The output destination table. - :type table_name: str - :param credential: Required. The resource ID of the credential to use to - connect to the output destination. - :type credential: str - """ - - _validation = { - 'server_name': {'required': True}, - 'database_name': {'required': True}, - 'table_name': {'required': True}, - 'credential': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'schema_name': {'key': 'schemaName', 'type': 'str'}, - 'table_name': {'key': 'tableName', 'type': 'str'}, - 'credential': {'key': 'credential', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobStepOutput, self).__init__(**kwargs) - self.type = kwargs.get('type', "SqlDatabase") - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group_name = kwargs.get('resource_group_name', None) - self.server_name = kwargs.get('server_name', None) - self.database_name = kwargs.get('database_name', None) - self.schema_name = kwargs.get('schema_name', "dbo") - self.table_name = kwargs.get('table_name', None) - self.credential = kwargs.get('credential', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output_py3.py deleted file mode 100644 index d10ecbbd6f8c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStepOutput(Model): - """The output configuration of a job step. - - All required parameters must be populated in order to send to Azure. - - :param type: The output destination type. Possible values include: - 'SqlDatabase'. Default value: "SqlDatabase" . - :type type: str or ~azure.mgmt.sql.models.JobStepOutputType - :param subscription_id: The output destination subscription id. - :type subscription_id: str - :param resource_group_name: The output destination resource group. - :type resource_group_name: str - :param server_name: Required. The output destination server name. - :type server_name: str - :param database_name: Required. The output destination database. - :type database_name: str - :param schema_name: The output destination schema. Default value: "dbo" . - :type schema_name: str - :param table_name: Required. The output destination table. - :type table_name: str - :param credential: Required. The resource ID of the credential to use to - connect to the output destination. - :type credential: str - """ - - _validation = { - 'server_name': {'required': True}, - 'database_name': {'required': True}, - 'table_name': {'required': True}, - 'credential': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'schema_name': {'key': 'schemaName', 'type': 'str'}, - 'table_name': {'key': 'tableName', 'type': 'str'}, - 'credential': {'key': 'credential', 'type': 'str'}, - } - - def __init__(self, *, server_name: str, database_name: str, table_name: str, credential: str, type="SqlDatabase", subscription_id: str=None, resource_group_name: str=None, schema_name: str="dbo", **kwargs) -> None: - super(JobStepOutput, self).__init__(**kwargs) - self.type = type - self.subscription_id = subscription_id - self.resource_group_name = resource_group_name - self.server_name = server_name - self.database_name = database_name - self.schema_name = schema_name - self.table_name = table_name - self.credential = credential diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_paged.py deleted file mode 100644 index 1bda4f5adf6e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobStepPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobStep ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobStep]'} - } - - def __init__(self, *args, **kwargs): - - super(JobStepPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_py3.py deleted file mode 100644 index bd267f9fd9a6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_step_py3.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class JobStep(ProxyResource): - """A job step. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param step_id: The job step's index within the job. If not specified when - creating the job step, it will be created as the last step. If not - specified when updating the job step, the step id is not modified. - :type step_id: int - :param target_group: Required. The resource ID of the target group that - the job step will be executed on. - :type target_group: str - :param credential: Required. The resource ID of the job credential that - will be used to connect to the targets. - :type credential: str - :param action: Required. The action payload of the job step. - :type action: ~azure.mgmt.sql.models.JobStepAction - :param output: Output destination properties of the job step. - :type output: ~azure.mgmt.sql.models.JobStepOutput - :param execution_options: Execution options for the job step. - :type execution_options: ~azure.mgmt.sql.models.JobStepExecutionOptions - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'target_group': {'required': True}, - 'credential': {'required': True}, - 'action': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'step_id': {'key': 'properties.stepId', 'type': 'int'}, - 'target_group': {'key': 'properties.targetGroup', 'type': 'str'}, - 'credential': {'key': 'properties.credential', 'type': 'str'}, - 'action': {'key': 'properties.action', 'type': 'JobStepAction'}, - 'output': {'key': 'properties.output', 'type': 'JobStepOutput'}, - 'execution_options': {'key': 'properties.executionOptions', 'type': 'JobStepExecutionOptions'}, - } - - def __init__(self, *, target_group: str, credential: str, action, step_id: int=None, output=None, execution_options=None, **kwargs) -> None: - super(JobStep, self).__init__(**kwargs) - self.step_id = step_id - self.target_group = target_group - self.credential = credential - self.action = action - self.output = output - self.execution_options = execution_options diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target.py deleted file mode 100644 index a608d87c1af1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobTarget(Model): - """A job target, for example a specific database or a container of databases - that is evaluated during job execution. - - All required parameters must be populated in order to send to Azure. - - :param membership_type: Whether the target is included or excluded from - the group. Possible values include: 'Include', 'Exclude'. Default value: - "Include" . - :type membership_type: str or - ~azure.mgmt.sql.models.JobTargetGroupMembershipType - :param type: Required. The target type. Possible values include: - 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' - :type type: str or ~azure.mgmt.sql.models.JobTargetType - :param server_name: The target server name. - :type server_name: str - :param database_name: The target database name. - :type database_name: str - :param elastic_pool_name: The target elastic pool name. - :type elastic_pool_name: str - :param shard_map_name: The target shard map. - :type shard_map_name: str - :param refresh_credential: The resource ID of the credential that is used - during job execution to connect to the target and determine the list of - databases inside the target. - :type refresh_credential: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'membership_type': {'key': 'membershipType', 'type': 'JobTargetGroupMembershipType'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'elastic_pool_name': {'key': 'elasticPoolName', 'type': 'str'}, - 'shard_map_name': {'key': 'shardMapName', 'type': 'str'}, - 'refresh_credential': {'key': 'refreshCredential', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobTarget, self).__init__(**kwargs) - self.membership_type = kwargs.get('membership_type', "Include") - self.type = kwargs.get('type', None) - self.server_name = kwargs.get('server_name', None) - self.database_name = kwargs.get('database_name', None) - self.elastic_pool_name = kwargs.get('elastic_pool_name', None) - self.shard_map_name = kwargs.get('shard_map_name', None) - self.refresh_credential = kwargs.get('refresh_credential', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group.py deleted file mode 100644 index 38148fb244c4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class JobTargetGroup(ProxyResource): - """A group of job targets. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param members: Required. Members of the target group. - :type members: list[~azure.mgmt.sql.models.JobTarget] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'members': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'members': {'key': 'properties.members', 'type': '[JobTarget]'}, - } - - def __init__(self, **kwargs): - super(JobTargetGroup, self).__init__(**kwargs) - self.members = kwargs.get('members', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_paged.py deleted file mode 100644 index cd466e5afa84..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobTargetGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobTargetGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobTargetGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(JobTargetGroupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_py3.py deleted file mode 100644 index a9582212ff82..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class JobTargetGroup(ProxyResource): - """A group of job targets. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param members: Required. Members of the target group. - :type members: list[~azure.mgmt.sql.models.JobTarget] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'members': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'members': {'key': 'properties.members', 'type': '[JobTarget]'}, - } - - def __init__(self, *, members, **kwargs) -> None: - super(JobTargetGroup, self).__init__(**kwargs) - self.members = members diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_py3.py deleted file mode 100644 index 281eb7598f18..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_target_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobTarget(Model): - """A job target, for example a specific database or a container of databases - that is evaluated during job execution. - - All required parameters must be populated in order to send to Azure. - - :param membership_type: Whether the target is included or excluded from - the group. Possible values include: 'Include', 'Exclude'. Default value: - "Include" . - :type membership_type: str or - ~azure.mgmt.sql.models.JobTargetGroupMembershipType - :param type: Required. The target type. Possible values include: - 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' - :type type: str or ~azure.mgmt.sql.models.JobTargetType - :param server_name: The target server name. - :type server_name: str - :param database_name: The target database name. - :type database_name: str - :param elastic_pool_name: The target elastic pool name. - :type elastic_pool_name: str - :param shard_map_name: The target shard map. - :type shard_map_name: str - :param refresh_credential: The resource ID of the credential that is used - during job execution to connect to the target and determine the list of - databases inside the target. - :type refresh_credential: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'membership_type': {'key': 'membershipType', 'type': 'JobTargetGroupMembershipType'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'elastic_pool_name': {'key': 'elasticPoolName', 'type': 'str'}, - 'shard_map_name': {'key': 'shardMapName', 'type': 'str'}, - 'refresh_credential': {'key': 'refreshCredential', 'type': 'str'}, - } - - def __init__(self, *, type, membership_type="Include", server_name: str=None, database_name: str=None, elastic_pool_name: str=None, shard_map_name: str=None, refresh_credential: str=None, **kwargs) -> None: - super(JobTarget, self).__init__(**kwargs) - self.membership_type = membership_type - self.type = type - self.server_name = server_name - self.database_name = database_name - self.elastic_pool_name = elastic_pool_name - self.shard_map_name = shard_map_name - self.refresh_credential = refresh_credential diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version.py deleted file mode 100644 index 3c480e739607..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class JobVersion(ProxyResource): - """A job version. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobVersion, self).__init__(**kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_paged.py deleted file mode 100644 index 162e4d8cfb5e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobVersionPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobVersion ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobVersion]'} - } - - def __init__(self, *args, **kwargs): - - super(JobVersionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_py3.py deleted file mode 100644 index 16a8798c5949..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/job_version_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class JobVersion(ProxyResource): - """A job version. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(JobVersion, self).__init__(**kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability.py deleted file mode 100644 index f40ad624e1c5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LicenseTypeCapability(Model): - """The license type capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: License type identifier. - :vartype name: str - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LicenseTypeCapability, self).__init__(**kwargs) - self.name = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability_py3.py deleted file mode 100644 index ecfa1918210a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/license_type_capability_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LicenseTypeCapability(Model): - """The license type capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: License type identifier. - :vartype name: str - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(LicenseTypeCapability, self).__init__(**kwargs) - self.name = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities.py deleted file mode 100644 index b7e7f0980834..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LocationCapabilities(Model): - """The location capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The location name. - :vartype name: str - :ivar supported_server_versions: The list of supported server versions. - :vartype supported_server_versions: - list[~azure.mgmt.sql.models.ServerVersionCapability] - :ivar supported_managed_instance_versions: The list of supported managed - instance versions. - :vartype supported_managed_instance_versions: - list[~azure.mgmt.sql.models.ManagedInstanceVersionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_server_versions': {'readonly': True}, - 'supported_managed_instance_versions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_server_versions': {'key': 'supportedServerVersions', 'type': '[ServerVersionCapability]'}, - 'supported_managed_instance_versions': {'key': 'supportedManagedInstanceVersions', 'type': '[ManagedInstanceVersionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LocationCapabilities, self).__init__(**kwargs) - self.name = None - self.supported_server_versions = None - self.supported_managed_instance_versions = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities_py3.py deleted file mode 100644 index 69b257f605a9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LocationCapabilities(Model): - """The location capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The location name. - :vartype name: str - :ivar supported_server_versions: The list of supported server versions. - :vartype supported_server_versions: - list[~azure.mgmt.sql.models.ServerVersionCapability] - :ivar supported_managed_instance_versions: The list of supported managed - instance versions. - :vartype supported_managed_instance_versions: - list[~azure.mgmt.sql.models.ManagedInstanceVersionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_server_versions': {'readonly': True}, - 'supported_managed_instance_versions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_server_versions': {'key': 'supportedServerVersions', 'type': '[ServerVersionCapability]'}, - 'supported_managed_instance_versions': {'key': 'supportedManagedInstanceVersions', 'type': '[ManagedInstanceVersionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(LocationCapabilities, self).__init__(**kwargs) - self.name = None - self.supported_server_versions = None - self.supported_managed_instance_versions = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability.py deleted file mode 100644 index ad86f97123cf..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogSizeCapability(Model): - """The log size capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The log size limit (see 'unit' for the units). - :vartype limit: int - :ivar unit: The units that the limit is expressed in. Possible values - include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes', 'Percent' - :vartype unit: str or ~azure.mgmt.sql.models.LogSizeUnit - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'int'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LogSizeCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability_py3.py deleted file mode 100644 index 787e781b3025..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/log_size_capability_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogSizeCapability(Model): - """The log size capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The log size limit (see 'unit' for the units). - :vartype limit: int - :ivar unit: The units that the limit is expressed in. Possible values - include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes', 'Percent' - :vartype unit: str or ~azure.mgmt.sql.models.LogSizeUnit - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'int'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(LogSizeCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup.py deleted file mode 100644 index 288ac55f501f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class LongTermRetentionBackup(ProxyResource): - """A long term retention backup. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar server_name: The server name that the backup database belong to. - :vartype server_name: str - :ivar server_create_time: The create time of the server. - :vartype server_create_time: datetime - :ivar database_name: The name of the database the backup belong to - :vartype database_name: str - :ivar database_deletion_time: The delete time of the database - :vartype database_deletion_time: datetime - :ivar backup_time: The time the backup was taken - :vartype backup_time: datetime - :ivar backup_expiration_time: The time the long term retention backup will - expire. - :vartype backup_expiration_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'server_name': {'readonly': True}, - 'server_create_time': {'readonly': True}, - 'database_name': {'readonly': True}, - 'database_deletion_time': {'readonly': True}, - 'backup_time': {'readonly': True}, - 'backup_expiration_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'server_create_time': {'key': 'properties.serverCreateTime', 'type': 'iso-8601'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'database_deletion_time': {'key': 'properties.databaseDeletionTime', 'type': 'iso-8601'}, - 'backup_time': {'key': 'properties.backupTime', 'type': 'iso-8601'}, - 'backup_expiration_time': {'key': 'properties.backupExpirationTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(LongTermRetentionBackup, self).__init__(**kwargs) - self.server_name = None - self.server_create_time = None - self.database_name = None - self.database_deletion_time = None - self.backup_time = None - self.backup_expiration_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_paged.py deleted file mode 100644 index 15e32283bbd7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class LongTermRetentionBackupPaged(Paged): - """ - A paging container for iterating over a list of :class:`LongTermRetentionBackup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[LongTermRetentionBackup]'} - } - - def __init__(self, *args, **kwargs): - - super(LongTermRetentionBackupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_py3.py deleted file mode 100644 index eb1372180fb0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class LongTermRetentionBackup(ProxyResource): - """A long term retention backup. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar server_name: The server name that the backup database belong to. - :vartype server_name: str - :ivar server_create_time: The create time of the server. - :vartype server_create_time: datetime - :ivar database_name: The name of the database the backup belong to - :vartype database_name: str - :ivar database_deletion_time: The delete time of the database - :vartype database_deletion_time: datetime - :ivar backup_time: The time the backup was taken - :vartype backup_time: datetime - :ivar backup_expiration_time: The time the long term retention backup will - expire. - :vartype backup_expiration_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'server_name': {'readonly': True}, - 'server_create_time': {'readonly': True}, - 'database_name': {'readonly': True}, - 'database_deletion_time': {'readonly': True}, - 'backup_time': {'readonly': True}, - 'backup_expiration_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'server_create_time': {'key': 'properties.serverCreateTime', 'type': 'iso-8601'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'database_deletion_time': {'key': 'properties.databaseDeletionTime', 'type': 'iso-8601'}, - 'backup_time': {'key': 'properties.backupTime', 'type': 'iso-8601'}, - 'backup_expiration_time': {'key': 'properties.backupExpirationTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(LongTermRetentionBackup, self).__init__(**kwargs) - self.server_name = None - self.server_create_time = None - self.database_name = None - self.database_deletion_time = None - self.backup_time = None - self.backup_expiration_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy.py deleted file mode 100644 index 4cab44ce75c7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedBackupShortTermRetentionPolicy(ProxyResource): - """A short term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param retention_days: The backup retention period in days. This is how - many days Point-in-Time Restore will be supported. - :type retention_days: int - """ - - _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'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedBackupShortTermRetentionPolicy, self).__init__(**kwargs) - self.retention_days = kwargs.get('retention_days', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_paged.py deleted file mode 100644 index 17bcf3e363fc..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedBackupShortTermRetentionPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedBackupShortTermRetentionPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedBackupShortTermRetentionPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedBackupShortTermRetentionPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_py3.py deleted file mode 100644 index 46a3fafddeee..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_backup_short_term_retention_policy_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedBackupShortTermRetentionPolicy(ProxyResource): - """A short term retention policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param retention_days: The backup retention period in days. This is how - many days Point-in-Time Restore will be supported. - :type retention_days: int - """ - - _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'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, *, retention_days: int=None, **kwargs) -> None: - super(ManagedBackupShortTermRetentionPolicy, self).__init__(**kwargs) - self.retention_days = retention_days diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py deleted file mode 100644 index 0c5141eaaef5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class ManagedDatabase(TrackedResource): - """A managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param collation: Collation of the managed database. - :type collation: str - :ivar status: Status of the database. Possible values include: 'Online', - 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' - :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus - :ivar creation_date: Creation date of the database. - :vartype creation_date: datetime - :ivar earliest_restore_point: Earliest restore point in time for point in - time restore. - :vartype earliest_restore_point: datetime - :param restore_point_in_time: Conditional. If createMode is - PointInTimeRestore, this value is required. Specifies the point in time - (ISO8601 format) of the source database that will be restored to create - the new database. - :type restore_point_in_time: datetime - :ivar default_secondary_location: Geo paired region. - :vartype default_secondary_location: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param create_mode: Managed database create mode. PointInTimeRestore: - Create a database by restoring a point in time backup of an existing - database. SourceDatabaseName, SourceManagedInstanceName and PointInTime - must be specified. RestoreExternalBackup: Create a database by restoring - from external backup files. Collation, StorageContainerUri and - StorageContainerSasToken must be specified. Recovery: Creates a database - by restoring a geo-replicated backup. RecoverableDatabaseId must be - specified as the recoverable database resource ID to restore. Possible - values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', - 'Recovery' - :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode - :param storage_container_uri: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the uri of the - storage container where backups for this restore are stored. - :type storage_container_uri: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :param restorable_dropped_database_id: The restorable dropped database - resource id to restore when creating this database. - :type restorable_dropped_database_id: str - :param storage_container_sas_token: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the storage - container sas token. - :type storage_container_sas_token: str - :ivar failover_group_id: Instance Failover Group resource identifier that - this managed database belongs to. - :vartype failover_group_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'status': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'earliest_restore_point': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedDatabase, self).__init__(**kwargs) - self.collation = kwargs.get('collation', None) - self.status = None - self.creation_date = None - self.earliest_restore_point = None - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.default_secondary_location = None - self.catalog_collation = kwargs.get('catalog_collation', None) - self.create_mode = kwargs.get('create_mode', None) - self.storage_container_uri = kwargs.get('storage_container_uri', None) - self.source_database_id = kwargs.get('source_database_id', None) - self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) - self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None) - self.failover_group_id = None - self.recoverable_database_id = kwargs.get('recoverable_database_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_paged.py deleted file mode 100644 index e15d9d532b5a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py deleted file mode 100644 index cc5b655604ad..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class ManagedDatabase(TrackedResource): - """A managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param collation: Collation of the managed database. - :type collation: str - :ivar status: Status of the database. Possible values include: 'Online', - 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' - :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus - :ivar creation_date: Creation date of the database. - :vartype creation_date: datetime - :ivar earliest_restore_point: Earliest restore point in time for point in - time restore. - :vartype earliest_restore_point: datetime - :param restore_point_in_time: Conditional. If createMode is - PointInTimeRestore, this value is required. Specifies the point in time - (ISO8601 format) of the source database that will be restored to create - the new database. - :type restore_point_in_time: datetime - :ivar default_secondary_location: Geo paired region. - :vartype default_secondary_location: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param create_mode: Managed database create mode. PointInTimeRestore: - Create a database by restoring a point in time backup of an existing - database. SourceDatabaseName, SourceManagedInstanceName and PointInTime - must be specified. RestoreExternalBackup: Create a database by restoring - from external backup files. Collation, StorageContainerUri and - StorageContainerSasToken must be specified. Recovery: Creates a database - by restoring a geo-replicated backup. RecoverableDatabaseId must be - specified as the recoverable database resource ID to restore. Possible - values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', - 'Recovery' - :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode - :param storage_container_uri: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the uri of the - storage container where backups for this restore are stored. - :type storage_container_uri: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :param restorable_dropped_database_id: The restorable dropped database - resource id to restore when creating this database. - :type restorable_dropped_database_id: str - :param storage_container_sas_token: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the storage - container sas token. - :type storage_container_sas_token: str - :ivar failover_group_id: Instance Failover Group resource identifier that - this managed database belongs to. - :vartype failover_group_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'status': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'earliest_restore_point': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, restorable_dropped_database_id: str=None, storage_container_sas_token: str=None, recoverable_database_id: str=None, **kwargs) -> None: - super(ManagedDatabase, self).__init__(location=location, tags=tags, **kwargs) - self.collation = collation - self.status = None - self.creation_date = None - self.earliest_restore_point = None - self.restore_point_in_time = restore_point_in_time - self.default_secondary_location = None - self.catalog_collation = catalog_collation - self.create_mode = create_mode - self.storage_container_uri = storage_container_uri - self.source_database_id = source_database_id - self.restorable_dropped_database_id = restorable_dropped_database_id - self.storage_container_sas_token = storage_container_sas_token - self.failover_group_id = None - self.recoverable_database_id = recoverable_database_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy.py deleted file mode 100644 index e3117c33610e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedDatabaseSecurityAlertPolicy(ProxyResource): - """A managed database security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ManagedDatabaseSecurityAlertPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_paged.py deleted file mode 100644 index e05f23ba364c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedDatabaseSecurityAlertPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedDatabaseSecurityAlertPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedDatabaseSecurityAlertPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedDatabaseSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_py3.py deleted file mode 100644 index 365f34280641..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_security_alert_policy_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedDatabaseSecurityAlertPolicy(ProxyResource): - """A managed database security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: - super(ManagedDatabaseSecurityAlertPolicy, self).__init__(**kwargs) - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py deleted file mode 100644 index 5ce3a036dcb9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedDatabaseUpdate(Model): - """An managed database update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param collation: Collation of the managed database. - :type collation: str - :ivar status: Status of the database. Possible values include: 'Online', - 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' - :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus - :ivar creation_date: Creation date of the database. - :vartype creation_date: datetime - :ivar earliest_restore_point: Earliest restore point in time for point in - time restore. - :vartype earliest_restore_point: datetime - :param restore_point_in_time: Conditional. If createMode is - PointInTimeRestore, this value is required. Specifies the point in time - (ISO8601 format) of the source database that will be restored to create - the new database. - :type restore_point_in_time: datetime - :ivar default_secondary_location: Geo paired region. - :vartype default_secondary_location: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param create_mode: Managed database create mode. PointInTimeRestore: - Create a database by restoring a point in time backup of an existing - database. SourceDatabaseName, SourceManagedInstanceName and PointInTime - must be specified. RestoreExternalBackup: Create a database by restoring - from external backup files. Collation, StorageContainerUri and - StorageContainerSasToken must be specified. Recovery: Creates a database - by restoring a geo-replicated backup. RecoverableDatabaseId must be - specified as the recoverable database resource ID to restore. Possible - values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', - 'Recovery' - :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode - :param storage_container_uri: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the uri of the - storage container where backups for this restore are stored. - :type storage_container_uri: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :param restorable_dropped_database_id: The restorable dropped database - resource id to restore when creating this database. - :type restorable_dropped_database_id: str - :param storage_container_sas_token: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the storage - container sas token. - :type storage_container_sas_token: str - :ivar failover_group_id: Instance Failover Group resource identifier that - this managed database belongs to. - :vartype failover_group_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'status': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'earliest_restore_point': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - } - - _attribute_map = { - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedDatabaseUpdate, self).__init__(**kwargs) - self.collation = kwargs.get('collation', None) - self.status = None - self.creation_date = None - self.earliest_restore_point = None - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.default_secondary_location = None - self.catalog_collation = kwargs.get('catalog_collation', None) - self.create_mode = kwargs.get('create_mode', None) - self.storage_container_uri = kwargs.get('storage_container_uri', None) - self.source_database_id = kwargs.get('source_database_id', None) - self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) - self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None) - self.failover_group_id = None - self.recoverable_database_id = kwargs.get('recoverable_database_id', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py deleted file mode 100644 index 34ae1be2b3fe..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedDatabaseUpdate(Model): - """An managed database update. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param collation: Collation of the managed database. - :type collation: str - :ivar status: Status of the database. Possible values include: 'Online', - 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' - :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus - :ivar creation_date: Creation date of the database. - :vartype creation_date: datetime - :ivar earliest_restore_point: Earliest restore point in time for point in - time restore. - :vartype earliest_restore_point: datetime - :param restore_point_in_time: Conditional. If createMode is - PointInTimeRestore, this value is required. Specifies the point in time - (ISO8601 format) of the source database that will be restored to create - the new database. - :type restore_point_in_time: datetime - :ivar default_secondary_location: Geo paired region. - :vartype default_secondary_location: str - :param catalog_collation: Collation of the metadata catalog. Possible - values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - :type catalog_collation: str or - ~azure.mgmt.sql.models.CatalogCollationType - :param create_mode: Managed database create mode. PointInTimeRestore: - Create a database by restoring a point in time backup of an existing - database. SourceDatabaseName, SourceManagedInstanceName and PointInTime - must be specified. RestoreExternalBackup: Create a database by restoring - from external backup files. Collation, StorageContainerUri and - StorageContainerSasToken must be specified. Recovery: Creates a database - by restoring a geo-replicated backup. RecoverableDatabaseId must be - specified as the recoverable database resource ID to restore. Possible - values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', - 'Recovery' - :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode - :param storage_container_uri: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the uri of the - storage container where backups for this restore are stored. - :type storage_container_uri: str - :param source_database_id: The resource identifier of the source database - associated with create operation of this database. - :type source_database_id: str - :param restorable_dropped_database_id: The restorable dropped database - resource id to restore when creating this database. - :type restorable_dropped_database_id: str - :param storage_container_sas_token: Conditional. If createMode is - RestoreExternalBackup, this value is required. Specifies the storage - container sas token. - :type storage_container_sas_token: str - :ivar failover_group_id: Instance Failover Group resource identifier that - this managed database belongs to. - :vartype failover_group_id: str - :param recoverable_database_id: The resource identifier of the recoverable - database associated with create operation of this database. - :type recoverable_database_id: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'status': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'earliest_restore_point': {'readonly': True}, - 'default_secondary_location': {'readonly': True}, - 'failover_group_id': {'readonly': True}, - } - - _attribute_map = { - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, - 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, - 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, - 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, - 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, - 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, - 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, restorable_dropped_database_id: str=None, storage_container_sas_token: str=None, recoverable_database_id: str=None, tags=None, **kwargs) -> None: - super(ManagedDatabaseUpdate, self).__init__(**kwargs) - self.collation = collation - self.status = None - self.creation_date = None - self.earliest_restore_point = None - self.restore_point_in_time = restore_point_in_time - self.default_secondary_location = None - self.catalog_collation = catalog_collation - self.create_mode = create_mode - self.storage_container_uri = storage_container_uri - self.source_database_id = source_database_id - self.restorable_dropped_database_id = restorable_dropped_database_id - self.storage_container_sas_token = storage_container_sas_token - self.failover_group_id = None - self.recoverable_database_id = recoverable_database_id - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance.py deleted file mode 100644 index cf680e0ddac0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class ManagedInstance(TrackedResource): - """An Azure SQL managed instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param identity: The Azure Active Directory identity of the managed - instance. - :type identity: ~azure.mgmt.sql.models.ResourceIdentity - :param sku: Managed instance sku - :type sku: ~azure.mgmt.sql.models.Sku - :ivar fully_qualified_domain_name: The fully qualified domain name of the - managed instance. - :vartype fully_qualified_domain_name: str - :param administrator_login: Administrator username for the managed - instance. Can only be specified when the managed instance is being created - (and is required for creation). - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for managed instance creation). - :type administrator_login_password: str - :param subnet_id: Subnet resource ID for the managed instance. - :type subnet_id: str - :ivar state: The state of the managed instance. - :vartype state: str - :param license_type: The license type. Possible values are - 'LicenseIncluded' and 'BasePrice'. - :type license_type: str - :param v_cores: The number of VCores. - :type v_cores: int - :param storage_size_in_gb: The maximum storage size in GB. - :type storage_size_in_gb: int - :param collation: Collation of the managed instance. - :type collation: str - :ivar dns_zone: The Dns Zone that the managed instance is in. - :vartype dns_zone: str - :param dns_zone_partner: The resource id of another managed instance whose - DNS zone this managed instance will share after creation. - :type dns_zone_partner: str - :param public_data_endpoint_enabled: Whether or not the public data - endpoint is enabled. - :type public_data_endpoint_enabled: bool - :param proxy_override: Connection type used for connecting to the - instance. Possible values include: 'Proxy', 'Redirect', 'Default' - :type proxy_override: str or - ~azure.mgmt.sql.models.ManagedInstanceProxyOverride - :param timezone_id: Id of the timezone. Allowed values are timezones - supported by Windows. - Windows keeps details on supported timezones, including the id, in - registry under - KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time - Zones. - You can get those registry values via SQL Server by querying SELECT name - AS timezone_id FROM sys.time_zone_info. - List of Ids can also be obtained by executing - [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. - An example of valid timezone id is "Pacific Standard Time" or "W. Europe - Standard Time". - :type timezone_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'fully_qualified_domain_name': {'readonly': True}, - 'state': {'readonly': True}, - 'dns_zone': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, - 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, - 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, - 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, - 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, - 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstance, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - self.fully_qualified_domain_name = None - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.subnet_id = kwargs.get('subnet_id', None) - self.state = None - self.license_type = kwargs.get('license_type', None) - self.v_cores = kwargs.get('v_cores', None) - self.storage_size_in_gb = kwargs.get('storage_size_in_gb', None) - self.collation = kwargs.get('collation', None) - self.dns_zone = None - self.dns_zone_partner = kwargs.get('dns_zone_partner', None) - self.public_data_endpoint_enabled = kwargs.get('public_data_endpoint_enabled', None) - self.proxy_override = kwargs.get('proxy_override', None) - self.timezone_id = kwargs.get('timezone_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability.py deleted file mode 100644 index adeab90a3543..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceEditionCapability(Model): - """The managed server capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The managed server version name. - :vartype name: str - :ivar supported_families: The supported families. - :vartype supported_families: - list[~azure.mgmt.sql.models.ManagedInstanceFamilyCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_families': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_families': {'key': 'supportedFamilies', 'type': '[ManagedInstanceFamilyCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_families = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability_py3.py deleted file mode 100644 index 1627f4652fec..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_edition_capability_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceEditionCapability(Model): - """The managed server capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The managed server version name. - :vartype name: str - :ivar supported_families: The supported families. - :vartype supported_families: - list[~azure.mgmt.sql.models.ManagedInstanceFamilyCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_families': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_families': {'key': 'supportedFamilies', 'type': '[ManagedInstanceFamilyCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ManagedInstanceEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_families = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector.py deleted file mode 100644 index 87ffcbf35af7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedInstanceEncryptionProtector(ProxyResource): - """The managed instance encryption protector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :vartype kind: str - :param server_key_name: The name of the managed instance key. - :type server_key_name: str - :param server_key_type: Required. The encryption protector type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :ivar uri: The URI of the server key. - :vartype uri: str - :ivar thumbprint: Thumbprint of the server key. - :vartype thumbprint: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True}, - 'uri': {'readonly': True}, - 'thumbprint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceEncryptionProtector, self).__init__(**kwargs) - self.kind = None - self.server_key_name = kwargs.get('server_key_name', None) - self.server_key_type = kwargs.get('server_key_type', None) - self.uri = None - self.thumbprint = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_paged.py deleted file mode 100644 index 39ba69c33e17..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedInstanceEncryptionProtectorPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedInstanceEncryptionProtector ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedInstanceEncryptionProtector]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedInstanceEncryptionProtectorPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_py3.py deleted file mode 100644 index 4d45efcf8c5d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedInstanceEncryptionProtector(ProxyResource): - """The managed instance encryption protector. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :vartype kind: str - :param server_key_name: The name of the managed instance key. - :type server_key_name: str - :param server_key_type: Required. The encryption protector type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :ivar uri: The URI of the server key. - :vartype uri: str - :ivar thumbprint: Thumbprint of the server key. - :vartype thumbprint: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True}, - 'uri': {'readonly': True}, - 'thumbprint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__(self, *, server_key_type, server_key_name: str=None, **kwargs) -> None: - super(ManagedInstanceEncryptionProtector, self).__init__(**kwargs) - self.kind = None - self.server_key_name = server_key_name - self.server_key_type = server_key_type - self.uri = None - self.thumbprint = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability.py deleted file mode 100644 index df08ea8764c9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceFamilyCapability(Model): - """The managed server family capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Family name. - :vartype name: str - :ivar sku: SKU name. - :vartype sku: str - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar supported_vcores_values: List of supported virtual cores values. - :vartype supported_vcores_values: - list[~azure.mgmt.sql.models.ManagedInstanceVcoresCapability] - :ivar included_max_size: Included size. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar supported_storage_sizes: Storage size ranges. - :vartype supported_storage_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'supported_vcores_values': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'supported_storage_sizes': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'supported_vcores_values': {'key': 'supportedVcoresValues', 'type': '[ManagedInstanceVcoresCapability]'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'supported_storage_sizes': {'key': 'supportedStorageSizes', 'type': '[MaxSizeRangeCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceFamilyCapability, self).__init__(**kwargs) - self.name = None - self.sku = None - self.supported_license_types = None - self.supported_vcores_values = None - self.included_max_size = None - self.supported_storage_sizes = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability_py3.py deleted file mode 100644 index 5ea36be729d5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_family_capability_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceFamilyCapability(Model): - """The managed server family capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Family name. - :vartype name: str - :ivar sku: SKU name. - :vartype sku: str - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar supported_vcores_values: List of supported virtual cores values. - :vartype supported_vcores_values: - list[~azure.mgmt.sql.models.ManagedInstanceVcoresCapability] - :ivar included_max_size: Included size. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar supported_storage_sizes: Storage size ranges. - :vartype supported_storage_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'supported_vcores_values': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'supported_storage_sizes': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'supported_vcores_values': {'key': 'supportedVcoresValues', 'type': '[ManagedInstanceVcoresCapability]'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'supported_storage_sizes': {'key': 'supportedStorageSizes', 'type': '[MaxSizeRangeCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ManagedInstanceFamilyCapability, self).__init__(**kwargs) - self.name = None - self.sku = None - self.supported_license_types = None - self.supported_vcores_values = None - self.included_max_size = None - self.supported_storage_sizes = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key.py deleted file mode 100644 index 5a7ee9724f96..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedInstanceKey(ProxyResource): - """A managed instance key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :vartype kind: str - :param server_key_type: Required. The key type like 'ServiceManaged', - 'AzureKeyVault'. Possible values include: 'ServiceManaged', - 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :param uri: The URI of the key. If the ServerKeyType is AzureKeyVault, - then the URI is required. - :type uri: str - :ivar thumbprint: Thumbprint of the key. - :vartype thumbprint: str - :ivar creation_date: The key creation date. - :vartype creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True}, - 'thumbprint': {'readonly': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceKey, self).__init__(**kwargs) - self.kind = None - self.server_key_type = kwargs.get('server_key_type', None) - self.uri = kwargs.get('uri', None) - self.thumbprint = None - self.creation_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_paged.py deleted file mode 100644 index 8c730f73a383..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedInstanceKeyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedInstanceKey ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedInstanceKey]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedInstanceKeyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_py3.py deleted file mode 100644 index f00bafa838f2..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedInstanceKey(ProxyResource): - """A managed instance key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :vartype kind: str - :param server_key_type: Required. The key type like 'ServiceManaged', - 'AzureKeyVault'. Possible values include: 'ServiceManaged', - 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :param uri: The URI of the key. If the ServerKeyType is AzureKeyVault, - then the URI is required. - :type uri: str - :ivar thumbprint: Thumbprint of the key. - :vartype thumbprint: str - :ivar creation_date: The key creation date. - :vartype creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True}, - 'thumbprint': {'readonly': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, server_key_type, uri: str=None, **kwargs) -> None: - super(ManagedInstanceKey, self).__init__(**kwargs) - self.kind = None - self.server_key_type = server_key_type - self.uri = uri - self.thumbprint = None - self.creation_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_paged.py deleted file mode 100644 index c39881da9f3b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedInstancePaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedInstance ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedInstance]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedInstancePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info.py deleted file mode 100644 index ee49c1db0c62..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstancePairInfo(Model): - """Pairs of Managed Instances in the failover group. - - :param primary_managed_instance_id: Id of Primary Managed Instance in - pair. - :type primary_managed_instance_id: str - :param partner_managed_instance_id: Id of Partner Managed Instance in - pair. - :type partner_managed_instance_id: str - """ - - _attribute_map = { - 'primary_managed_instance_id': {'key': 'primaryManagedInstanceId', 'type': 'str'}, - 'partner_managed_instance_id': {'key': 'partnerManagedInstanceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstancePairInfo, self).__init__(**kwargs) - self.primary_managed_instance_id = kwargs.get('primary_managed_instance_id', None) - self.partner_managed_instance_id = kwargs.get('partner_managed_instance_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info_py3.py deleted file mode 100644 index 49f52752b439..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstancePairInfo(Model): - """Pairs of Managed Instances in the failover group. - - :param primary_managed_instance_id: Id of Primary Managed Instance in - pair. - :type primary_managed_instance_id: str - :param partner_managed_instance_id: Id of Partner Managed Instance in - pair. - :type partner_managed_instance_id: str - """ - - _attribute_map = { - 'primary_managed_instance_id': {'key': 'primaryManagedInstanceId', 'type': 'str'}, - 'partner_managed_instance_id': {'key': 'partnerManagedInstanceId', 'type': 'str'}, - } - - def __init__(self, *, primary_managed_instance_id: str=None, partner_managed_instance_id: str=None, **kwargs) -> None: - super(ManagedInstancePairInfo, self).__init__(**kwargs) - self.primary_managed_instance_id = primary_managed_instance_id - self.partner_managed_instance_id = partner_managed_instance_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_py3.py deleted file mode 100644 index 9233da80dae4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_py3.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class ManagedInstance(TrackedResource): - """An Azure SQL managed instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param identity: The Azure Active Directory identity of the managed - instance. - :type identity: ~azure.mgmt.sql.models.ResourceIdentity - :param sku: Managed instance sku - :type sku: ~azure.mgmt.sql.models.Sku - :ivar fully_qualified_domain_name: The fully qualified domain name of the - managed instance. - :vartype fully_qualified_domain_name: str - :param administrator_login: Administrator username for the managed - instance. Can only be specified when the managed instance is being created - (and is required for creation). - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for managed instance creation). - :type administrator_login_password: str - :param subnet_id: Subnet resource ID for the managed instance. - :type subnet_id: str - :ivar state: The state of the managed instance. - :vartype state: str - :param license_type: The license type. Possible values are - 'LicenseIncluded' and 'BasePrice'. - :type license_type: str - :param v_cores: The number of VCores. - :type v_cores: int - :param storage_size_in_gb: The maximum storage size in GB. - :type storage_size_in_gb: int - :param collation: Collation of the managed instance. - :type collation: str - :ivar dns_zone: The Dns Zone that the managed instance is in. - :vartype dns_zone: str - :param dns_zone_partner: The resource id of another managed instance whose - DNS zone this managed instance will share after creation. - :type dns_zone_partner: str - :param public_data_endpoint_enabled: Whether or not the public data - endpoint is enabled. - :type public_data_endpoint_enabled: bool - :param proxy_override: Connection type used for connecting to the - instance. Possible values include: 'Proxy', 'Redirect', 'Default' - :type proxy_override: str or - ~azure.mgmt.sql.models.ManagedInstanceProxyOverride - :param timezone_id: Id of the timezone. Allowed values are timezones - supported by Windows. - Windows keeps details on supported timezones, including the id, in - registry under - KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time - Zones. - You can get those registry values via SQL Server by querying SELECT name - AS timezone_id FROM sys.time_zone_info. - List of Ids can also be obtained by executing - [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. - An example of valid timezone id is "Pacific Standard Time" or "W. Europe - Standard Time". - :type timezone_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'fully_qualified_domain_name': {'readonly': True}, - 'state': {'readonly': True}, - 'dns_zone': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, - 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, - 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, - 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, - 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, - 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, identity=None, sku=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type: str=None, v_cores: int=None, storage_size_in_gb: int=None, collation: str=None, dns_zone_partner: str=None, public_data_endpoint_enabled: bool=None, proxy_override=None, timezone_id: str=None, **kwargs) -> None: - super(ManagedInstance, self).__init__(location=location, tags=tags, **kwargs) - self.identity = identity - self.sku = sku - self.fully_qualified_domain_name = None - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.subnet_id = subnet_id - self.state = None - self.license_type = license_type - self.v_cores = v_cores - self.storage_size_in_gb = storage_size_in_gb - self.collation = collation - self.dns_zone = None - self.dns_zone_partner = dns_zone_partner - self.public_data_endpoint_enabled = public_data_endpoint_enabled - self.proxy_override = proxy_override - self.timezone_id = timezone_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update.py deleted file mode 100644 index e3c543f0a6b1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceUpdate(Model): - """An update request for an Azure SQL Database managed instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param sku: Managed instance sku - :type sku: ~azure.mgmt.sql.models.Sku - :ivar fully_qualified_domain_name: The fully qualified domain name of the - managed instance. - :vartype fully_qualified_domain_name: str - :param administrator_login: Administrator username for the managed - instance. Can only be specified when the managed instance is being created - (and is required for creation). - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for managed instance creation). - :type administrator_login_password: str - :param subnet_id: Subnet resource ID for the managed instance. - :type subnet_id: str - :ivar state: The state of the managed instance. - :vartype state: str - :param license_type: The license type. Possible values are - 'LicenseIncluded' and 'BasePrice'. - :type license_type: str - :param v_cores: The number of VCores. - :type v_cores: int - :param storage_size_in_gb: The maximum storage size in GB. - :type storage_size_in_gb: int - :param collation: Collation of the managed instance. - :type collation: str - :ivar dns_zone: The Dns Zone that the managed instance is in. - :vartype dns_zone: str - :param dns_zone_partner: The resource id of another managed instance whose - DNS zone this managed instance will share after creation. - :type dns_zone_partner: str - :param public_data_endpoint_enabled: Whether or not the public data - endpoint is enabled. - :type public_data_endpoint_enabled: bool - :param proxy_override: Connection type used for connecting to the - instance. Possible values include: 'Proxy', 'Redirect', 'Default' - :type proxy_override: str or - ~azure.mgmt.sql.models.ManagedInstanceProxyOverride - :param timezone_id: Id of the timezone. Allowed values are timezones - supported by Windows. - Windows keeps details on supported timezones, including the id, in - registry under - KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time - Zones. - You can get those registry values via SQL Server by querying SELECT name - AS timezone_id FROM sys.time_zone_info. - List of Ids can also be obtained by executing - [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. - An example of valid timezone id is "Pacific Standard Time" or "W. Europe - Standard Time". - :type timezone_id: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'fully_qualified_domain_name': {'readonly': True}, - 'state': {'readonly': True}, - 'dns_zone': {'readonly': True}, - } - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, - 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, - 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, - 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, - 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, - 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceUpdate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.fully_qualified_domain_name = None - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.subnet_id = kwargs.get('subnet_id', None) - self.state = None - self.license_type = kwargs.get('license_type', None) - self.v_cores = kwargs.get('v_cores', None) - self.storage_size_in_gb = kwargs.get('storage_size_in_gb', None) - self.collation = kwargs.get('collation', None) - self.dns_zone = None - self.dns_zone_partner = kwargs.get('dns_zone_partner', None) - self.public_data_endpoint_enabled = kwargs.get('public_data_endpoint_enabled', None) - self.proxy_override = kwargs.get('proxy_override', None) - self.timezone_id = kwargs.get('timezone_id', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update_py3.py deleted file mode 100644 index 4a2e6aa0bd78..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update_py3.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceUpdate(Model): - """An update request for an Azure SQL Database managed instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param sku: Managed instance sku - :type sku: ~azure.mgmt.sql.models.Sku - :ivar fully_qualified_domain_name: The fully qualified domain name of the - managed instance. - :vartype fully_qualified_domain_name: str - :param administrator_login: Administrator username for the managed - instance. Can only be specified when the managed instance is being created - (and is required for creation). - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for managed instance creation). - :type administrator_login_password: str - :param subnet_id: Subnet resource ID for the managed instance. - :type subnet_id: str - :ivar state: The state of the managed instance. - :vartype state: str - :param license_type: The license type. Possible values are - 'LicenseIncluded' and 'BasePrice'. - :type license_type: str - :param v_cores: The number of VCores. - :type v_cores: int - :param storage_size_in_gb: The maximum storage size in GB. - :type storage_size_in_gb: int - :param collation: Collation of the managed instance. - :type collation: str - :ivar dns_zone: The Dns Zone that the managed instance is in. - :vartype dns_zone: str - :param dns_zone_partner: The resource id of another managed instance whose - DNS zone this managed instance will share after creation. - :type dns_zone_partner: str - :param public_data_endpoint_enabled: Whether or not the public data - endpoint is enabled. - :type public_data_endpoint_enabled: bool - :param proxy_override: Connection type used for connecting to the - instance. Possible values include: 'Proxy', 'Redirect', 'Default' - :type proxy_override: str or - ~azure.mgmt.sql.models.ManagedInstanceProxyOverride - :param timezone_id: Id of the timezone. Allowed values are timezones - supported by Windows. - Windows keeps details on supported timezones, including the id, in - registry under - KEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time - Zones. - You can get those registry values via SQL Server by querying SELECT name - AS timezone_id FROM sys.time_zone_info. - List of Ids can also be obtained by executing - [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. - An example of valid timezone id is "Pacific Standard Time" or "W. Europe - Standard Time". - :type timezone_id: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'fully_qualified_domain_name': {'readonly': True}, - 'state': {'readonly': True}, - 'dns_zone': {'readonly': True}, - } - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, - 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, - 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, - 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, - 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, - 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, - 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, sku=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type: str=None, v_cores: int=None, storage_size_in_gb: int=None, collation: str=None, dns_zone_partner: str=None, public_data_endpoint_enabled: bool=None, proxy_override=None, timezone_id: str=None, tags=None, **kwargs) -> None: - super(ManagedInstanceUpdate, self).__init__(**kwargs) - self.sku = sku - self.fully_qualified_domain_name = None - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.subnet_id = subnet_id - self.state = None - self.license_type = license_type - self.v_cores = v_cores - self.storage_size_in_gb = storage_size_in_gb - self.collation = collation - self.dns_zone = None - self.dns_zone_partner = dns_zone_partner - self.public_data_endpoint_enabled = public_data_endpoint_enabled - self.proxy_override = proxy_override - self.timezone_id = timezone_id - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability.py deleted file mode 100644 index 29503dd20ae2..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceVcoresCapability(Model): - """The managed instance virtual cores capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The virtual cores identifier. - :vartype name: str - :ivar value: The virtual cores value. - :vartype value: int - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'int'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceVcoresCapability, self).__init__(**kwargs) - self.name = None - self.value = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability_py3.py deleted file mode 100644 index 23d3bb49d4e8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vcores_capability_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceVcoresCapability(Model): - """The managed instance virtual cores capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The virtual cores identifier. - :vartype name: str - :ivar value: The virtual cores value. - :vartype value: int - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'int'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ManagedInstanceVcoresCapability, self).__init__(**kwargs) - self.name = None - self.value = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability.py deleted file mode 100644 index 949b1fcf4ad5..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceVersionCapability(Model): - """The managed instance capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The server version name. - :vartype name: str - :ivar supported_editions: The list of supported managed instance editions. - :vartype supported_editions: - list[~azure.mgmt.sql.models.ManagedInstanceEditionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_editions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_editions': {'key': 'supportedEditions', 'type': '[ManagedInstanceEditionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceVersionCapability, self).__init__(**kwargs) - self.name = None - self.supported_editions = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability_py3.py deleted file mode 100644 index 6d078061def9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_version_capability_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedInstanceVersionCapability(Model): - """The managed instance capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The server version name. - :vartype name: str - :ivar supported_editions: The list of supported managed instance editions. - :vartype supported_editions: - list[~azure.mgmt.sql.models.ManagedInstanceEditionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_editions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_editions': {'key': 'supportedEditions', 'type': '[ManagedInstanceEditionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ManagedInstanceVersionCapability, self).__init__(**kwargs) - self.name = None - self.supported_editions = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment.py deleted file mode 100644 index 78d257382e26..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedInstanceVulnerabilityAssessment(ProxyResource): - """A managed instance vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: Required. A blob storage container path to - hold the scan results (e.g. - https://myStorage.blob.core.windows.net/VaScans/). - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_container_path': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, **kwargs): - super(ManagedInstanceVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = kwargs.get('storage_container_path', None) - self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.recurring_scans = kwargs.get('recurring_scans', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_paged.py deleted file mode 100644 index a7322fe506bf..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedInstanceVulnerabilityAssessmentPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedInstanceVulnerabilityAssessment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedInstanceVulnerabilityAssessment]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedInstanceVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_py3.py deleted file mode 100644 index 6f3da10fea84..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_vulnerability_assessment_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedInstanceVulnerabilityAssessment(ProxyResource): - """A managed instance vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: Required. A blob storage container path to - hold the scan results (e.g. - https://myStorage.blob.core.windows.net/VaScans/). - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_container_path': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, *, storage_container_path: str, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: - super(ManagedInstanceVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = storage_container_path - self.storage_container_sas_key = storage_container_sas_key - self.storage_account_access_key = storage_account_access_key - self.recurring_scans = recurring_scans diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy.py deleted file mode 100644 index e3a0a5062157..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ManagedServerSecurityAlertPolicy(ProxyResource): - """A managed server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ManagedServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_paged.py deleted file mode 100644 index 2d99504f4744..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedServerSecurityAlertPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedServerSecurityAlertPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedServerSecurityAlertPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedServerSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_py3.py deleted file mode 100644 index b16c97c79bea..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/managed_server_security_alert_policy_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ManagedServerSecurityAlertPolicy(ProxyResource): - """A managed server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: - super(ManagedServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability.py deleted file mode 100644 index d103c6f969f7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaxSizeCapability(Model): - """The maximum size capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The maximum size limit (see 'unit' for the units). - :vartype limit: int - :ivar unit: The units that the limit is expressed in. Possible values - include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' - :vartype unit: str or ~azure.mgmt.sql.models.MaxSizeUnit - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'int'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MaxSizeCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability_py3.py deleted file mode 100644 index 54bd7cb00171..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaxSizeCapability(Model): - """The maximum size capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar limit: The maximum size limit (see 'unit' for the units). - :vartype limit: int - :ivar unit: The units that the limit is expressed in. Possible values - include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' - :vartype unit: str or ~azure.mgmt.sql.models.MaxSizeUnit - """ - - _validation = { - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'limit': {'key': 'limit', 'type': 'int'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MaxSizeCapability, self).__init__(**kwargs) - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability.py deleted file mode 100644 index 3ec6c663b559..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaxSizeRangeCapability(Model): - """The maximum size range capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar min_value: Minimum value. - :vartype min_value: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar max_value: Maximum value. - :vartype max_value: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar scale_size: Scale/step size for discrete values between the minimum - value and the maximum value. - :vartype scale_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar log_size: Size of transaction log. - :vartype log_size: ~azure.mgmt.sql.models.LogSizeCapability - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'min_value': {'readonly': True}, - 'max_value': {'readonly': True}, - 'scale_size': {'readonly': True}, - 'log_size': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'min_value': {'key': 'minValue', 'type': 'MaxSizeCapability'}, - 'max_value': {'key': 'maxValue', 'type': 'MaxSizeCapability'}, - 'scale_size': {'key': 'scaleSize', 'type': 'MaxSizeCapability'}, - 'log_size': {'key': 'logSize', 'type': 'LogSizeCapability'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MaxSizeRangeCapability, self).__init__(**kwargs) - self.min_value = None - self.max_value = None - self.scale_size = None - self.log_size = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability_py3.py deleted file mode 100644 index f0f95ebd7f36..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/max_size_range_capability_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MaxSizeRangeCapability(Model): - """The maximum size range capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar min_value: Minimum value. - :vartype min_value: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar max_value: Maximum value. - :vartype max_value: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar scale_size: Scale/step size for discrete values between the minimum - value and the maximum value. - :vartype scale_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar log_size: Size of transaction log. - :vartype log_size: ~azure.mgmt.sql.models.LogSizeCapability - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'min_value': {'readonly': True}, - 'max_value': {'readonly': True}, - 'scale_size': {'readonly': True}, - 'log_size': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'min_value': {'key': 'minValue', 'type': 'MaxSizeCapability'}, - 'max_value': {'key': 'maxValue', 'type': 'MaxSizeCapability'}, - 'scale_size': {'key': 'scaleSize', 'type': 'MaxSizeCapability'}, - 'log_size': {'key': 'logSize', 'type': 'LogSizeCapability'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(MaxSizeRangeCapability, self).__init__(**kwargs) - self.min_value = None - self.max_value = None - self.scale_size = None - self.log_size = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric.py deleted file mode 100644 index 3d3b4b8df154..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Metric(Model): - """Database metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar start_time: The start time for the metric (ISO-8601 format). - :vartype start_time: datetime - :ivar end_time: The end time for the metric (ISO-8601 format). - :vartype end_time: datetime - :ivar time_grain: The time step to be used to summarize the metric values. - :vartype time_grain: str - :ivar unit: The unit of the metric. Possible values include: 'count', - 'bytes', 'seconds', 'percent', 'countPerSecond', 'bytesPerSecond' - :vartype unit: str or ~azure.mgmt.sql.models.UnitType - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.sql.models.MetricName - :ivar metric_values: The metric values for the specified time window and - timestep. - :vartype metric_values: list[~azure.mgmt.sql.models.MetricValue] - """ - - _validation = { - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'unit': {'readonly': True}, - 'name': {'readonly': True}, - 'metric_values': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, - } - - def __init__(self, **kwargs): - super(Metric, self).__init__(**kwargs) - self.start_time = None - self.end_time = None - self.time_grain = None - self.unit = None - self.name = None - self.metric_values = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability.py deleted file mode 100644 index ef43027b61ba..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricAvailability(Model): - """A metric availability value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar retention: The length of retention for the database metric. - :vartype retention: str - :ivar time_grain: The granularity of the database metric. - :vartype time_grain: str - """ - - _validation = { - 'retention': {'readonly': True}, - 'time_grain': {'readonly': True}, - } - - _attribute_map = { - 'retention': {'key': 'retention', 'type': 'str'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MetricAvailability, self).__init__(**kwargs) - self.retention = None - self.time_grain = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability_py3.py deleted file mode 100644 index 6e47c8134a38..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricAvailability(Model): - """A metric availability value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar retention: The length of retention for the database metric. - :vartype retention: str - :ivar time_grain: The granularity of the database metric. - :vartype time_grain: str - """ - - _validation = { - 'retention': {'readonly': True}, - 'time_grain': {'readonly': True}, - } - - _attribute_map = { - 'retention': {'key': 'retention', 'type': 'str'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MetricAvailability, self).__init__(**kwargs) - self.retention = None - self.time_grain = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition.py deleted file mode 100644 index 0b760f50f3ba..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricDefinition(Model): - """A database metric definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.sql.models.MetricName - :ivar primary_aggregation_type: The primary aggregation type defining how - metric values are displayed. Possible values include: 'None', 'Average', - 'Count', 'Minimum', 'Maximum', 'Total' - :vartype primary_aggregation_type: str or - ~azure.mgmt.sql.models.PrimaryAggregationType - :ivar resource_uri: The resource uri of the database. - :vartype resource_uri: str - :ivar unit: The unit of the metric. Possible values include: 'Count', - 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' - :vartype unit: str or ~azure.mgmt.sql.models.UnitDefinitionType - :ivar metric_availabilities: The list of database metric availabilities - for the metric. - :vartype metric_availabilities: - list[~azure.mgmt.sql.models.MetricAvailability] - """ - - _validation = { - 'name': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'resource_uri': {'readonly': True}, - 'unit': {'readonly': True}, - 'metric_availabilities': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'MetricName'}, - 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, - } - - def __init__(self, **kwargs): - super(MetricDefinition, self).__init__(**kwargs) - self.name = None - self.primary_aggregation_type = None - self.resource_uri = None - self.unit = None - self.metric_availabilities = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_paged.py deleted file mode 100644 index 95a01ebf4e85..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class MetricDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`MetricDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[MetricDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(MetricDefinitionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_py3.py deleted file mode 100644 index 33d5fa9e1323..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricDefinition(Model): - """A database metric definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.sql.models.MetricName - :ivar primary_aggregation_type: The primary aggregation type defining how - metric values are displayed. Possible values include: 'None', 'Average', - 'Count', 'Minimum', 'Maximum', 'Total' - :vartype primary_aggregation_type: str or - ~azure.mgmt.sql.models.PrimaryAggregationType - :ivar resource_uri: The resource uri of the database. - :vartype resource_uri: str - :ivar unit: The unit of the metric. Possible values include: 'Count', - 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' - :vartype unit: str or ~azure.mgmt.sql.models.UnitDefinitionType - :ivar metric_availabilities: The list of database metric availabilities - for the metric. - :vartype metric_availabilities: - list[~azure.mgmt.sql.models.MetricAvailability] - """ - - _validation = { - 'name': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'resource_uri': {'readonly': True}, - 'unit': {'readonly': True}, - 'metric_availabilities': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'MetricName'}, - 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, - } - - def __init__(self, **kwargs) -> None: - super(MetricDefinition, self).__init__(**kwargs) - self.name = None - self.primary_aggregation_type = None - self.resource_uri = None - self.unit = None - self.metric_availabilities = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name.py deleted file mode 100644 index 10643031ce5a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricName(Model): - """A database metric name. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: The name of the database metric. - :vartype value: str - :ivar localized_value: The friendly name of the database metric. - :vartype localized_value: str - """ - - _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MetricName, self).__init__(**kwargs) - self.value = None - self.localized_value = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name_py3.py deleted file mode 100644 index 67551bc7aed9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_name_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricName(Model): - """A database metric name. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: The name of the database metric. - :vartype value: str - :ivar localized_value: The friendly name of the database metric. - :vartype localized_value: str - """ - - _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MetricName, self).__init__(**kwargs) - self.value = None - self.localized_value = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_paged.py deleted file mode 100644 index 61aa43a2fced..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class MetricPaged(Paged): - """ - A paging container for iterating over a list of :class:`Metric ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Metric]'} - } - - def __init__(self, *args, **kwargs): - - super(MetricPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_py3.py deleted file mode 100644 index 5eae901bca7e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Metric(Model): - """Database metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar start_time: The start time for the metric (ISO-8601 format). - :vartype start_time: datetime - :ivar end_time: The end time for the metric (ISO-8601 format). - :vartype end_time: datetime - :ivar time_grain: The time step to be used to summarize the metric values. - :vartype time_grain: str - :ivar unit: The unit of the metric. Possible values include: 'count', - 'bytes', 'seconds', 'percent', 'countPerSecond', 'bytesPerSecond' - :vartype unit: str or ~azure.mgmt.sql.models.UnitType - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.sql.models.MetricName - :ivar metric_values: The metric values for the specified time window and - timestep. - :vartype metric_values: list[~azure.mgmt.sql.models.MetricValue] - """ - - _validation = { - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'unit': {'readonly': True}, - 'name': {'readonly': True}, - 'metric_values': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, - } - - def __init__(self, **kwargs) -> None: - super(Metric, self).__init__(**kwargs) - self.start_time = None - self.end_time = None - self.time_grain = None - self.unit = None - self.name = None - self.metric_values = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value.py deleted file mode 100644 index a506295d5bfb..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricValue(Model): - """Represents database metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar count: The number of values for the metric. - :vartype count: float - :ivar average: The average value of the metric. - :vartype average: float - :ivar maximum: The max value of the metric. - :vartype maximum: float - :ivar minimum: The min value of the metric. - :vartype minimum: float - :ivar timestamp: The metric timestamp (ISO-8601 format). - :vartype timestamp: datetime - :ivar total: The total value of the metric. - :vartype total: float - """ - - _validation = { - 'count': {'readonly': True}, - 'average': {'readonly': True}, - 'maximum': {'readonly': True}, - 'minimum': {'readonly': True}, - 'timestamp': {'readonly': True}, - 'total': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'float'}, - 'average': {'key': 'average', 'type': 'float'}, - 'maximum': {'key': 'maximum', 'type': 'float'}, - 'minimum': {'key': 'minimum', 'type': 'float'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'total': {'key': 'total', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(MetricValue, self).__init__(**kwargs) - self.count = None - self.average = None - self.maximum = None - self.minimum = None - self.timestamp = None - self.total = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value_py3.py deleted file mode 100644 index a1b027d62864..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/metric_value_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricValue(Model): - """Represents database metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar count: The number of values for the metric. - :vartype count: float - :ivar average: The average value of the metric. - :vartype average: float - :ivar maximum: The max value of the metric. - :vartype maximum: float - :ivar minimum: The min value of the metric. - :vartype minimum: float - :ivar timestamp: The metric timestamp (ISO-8601 format). - :vartype timestamp: datetime - :ivar total: The total value of the metric. - :vartype total: float - """ - - _validation = { - 'count': {'readonly': True}, - 'average': {'readonly': True}, - 'maximum': {'readonly': True}, - 'minimum': {'readonly': True}, - 'timestamp': {'readonly': True}, - 'total': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'float'}, - 'average': {'key': 'average', 'type': 'float'}, - 'maximum': {'key': 'maximum', 'type': 'float'}, - 'minimum': {'key': 'minimum', 'type': 'float'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'total': {'key': 'total', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(MetricValue, self).__init__(**kwargs) - self.count = None - self.average = None - self.maximum = None - self.minimum = None - self.timestamp = None - self.total = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation.py deleted file mode 100644 index 09138c4b9086..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """SQL REST API operation definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the operation being performed on this particular - object. - :vartype name: str - :ivar display: The localized display information for this particular - operation / action. - :vartype display: ~azure.mgmt.sql.models.OperationDisplay - :ivar origin: The intended executor of the operation. Possible values - include: 'user', 'system' - :vartype origin: str or ~azure.mgmt.sql.models.OperationOrigin - :ivar properties: Additional descriptions for the operation. - :vartype properties: dict[str, object] - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - 'origin': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{object}'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.origin = None - self.properties = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display.py deleted file mode 100644 index dfbc4a6fcff3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """Display metadata associated with the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: The localized friendly form of the resource provider name. - :vartype provider: str - :ivar resource: The localized friendly form of the resource type related - to this action/operation. - :vartype resource: str - :ivar operation: The localized friendly name for the operation. - :vartype operation: str - :ivar description: The localized friendly description for the operation. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display_py3.py deleted file mode 100644 index 0541321c178c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_display_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """Display metadata associated with the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: The localized friendly form of the resource provider name. - :vartype provider: str - :ivar resource: The localized friendly form of the resource type related - to this action/operation. - :vartype resource: str - :ivar operation: The localized friendly name for the operation. - :vartype operation: str - :ivar description: The localized friendly description for the operation. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact.py deleted file mode 100644 index 6b69a122de4c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationImpact(Model): - """The impact of an operation, both in absolute and relative terms. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the impact dimension. - :vartype name: str - :ivar unit: The unit in which estimated impact to dimension is measured. - :vartype unit: str - :ivar change_value_absolute: The absolute impact to dimension. - :vartype change_value_absolute: float - :ivar change_value_relative: The relative impact to dimension (null if not - applicable) - :vartype change_value_relative: float - """ - - _validation = { - 'name': {'readonly': True}, - 'unit': {'readonly': True}, - 'change_value_absolute': {'readonly': True}, - 'change_value_relative': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'change_value_absolute': {'key': 'changeValueAbsolute', 'type': 'float'}, - 'change_value_relative': {'key': 'changeValueRelative', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(OperationImpact, self).__init__(**kwargs) - self.name = None - self.unit = None - self.change_value_absolute = None - self.change_value_relative = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact_py3.py deleted file mode 100644 index f53b9445f998..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationImpact(Model): - """The impact of an operation, both in absolute and relative terms. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the impact dimension. - :vartype name: str - :ivar unit: The unit in which estimated impact to dimension is measured. - :vartype unit: str - :ivar change_value_absolute: The absolute impact to dimension. - :vartype change_value_absolute: float - :ivar change_value_relative: The relative impact to dimension (null if not - applicable) - :vartype change_value_relative: float - """ - - _validation = { - 'name': {'readonly': True}, - 'unit': {'readonly': True}, - 'change_value_absolute': {'readonly': True}, - 'change_value_relative': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'change_value_absolute': {'key': 'changeValueAbsolute', 'type': 'float'}, - 'change_value_relative': {'key': 'changeValueRelative', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationImpact, self).__init__(**kwargs) - self.name = None - self.unit = None - self.change_value_absolute = None - self.change_value_relative = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_paged.py deleted file mode 100644 index ec8c4dc4c1c7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_py3.py deleted file mode 100644 index 4968981d1858..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/operation_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """SQL REST API operation definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the operation being performed on this particular - object. - :vartype name: str - :ivar display: The localized display information for this particular - operation / action. - :vartype display: ~azure.mgmt.sql.models.OperationDisplay - :ivar origin: The intended executor of the operation. Possible values - include: 'user', 'system' - :vartype origin: str or ~azure.mgmt.sql.models.OperationOrigin - :ivar properties: Additional descriptions for the operation. - :vartype properties: dict[str, object] - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - 'origin': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{object}'}, - } - - def __init__(self, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.origin = None - self.properties = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info.py deleted file mode 100644 index de30bd259f7a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartnerInfo(Model): - """Partner server information for the failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource identifier of the partner server. - :type id: str - :ivar location: Geo location of the partner server. - :vartype location: str - :ivar replication_role: Replication role of the partner server. Possible - values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.FailoverGroupReplicationRole - """ - - _validation = { - 'id': {'required': True}, - 'location': {'readonly': True}, - 'replication_role': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'replication_role': {'key': 'replicationRole', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PartnerInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.location = None - self.replication_role = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info_py3.py deleted file mode 100644 index 0edede88118a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_info_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartnerInfo(Model): - """Partner server information for the failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource identifier of the partner server. - :type id: str - :ivar location: Geo location of the partner server. - :vartype location: str - :ivar replication_role: Replication role of the partner server. Possible - values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.FailoverGroupReplicationRole - """ - - _validation = { - 'id': {'required': True}, - 'location': {'readonly': True}, - 'replication_role': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'replication_role': {'key': 'replicationRole', 'type': 'str'}, - } - - def __init__(self, *, id: str, **kwargs) -> None: - super(PartnerInfo, self).__init__(**kwargs) - self.id = id - self.location = None - self.replication_role = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info.py deleted file mode 100644 index 4d8e2688acb1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartnerRegionInfo(Model): - """Partner region information for the failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param location: Geo location of the partner managed instances. - :type location: str - :ivar replication_role: Replication role of the partner managed instances. - Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole - """ - - _validation = { - 'replication_role': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'replication_role': {'key': 'replicationRole', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PartnerRegionInfo, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.replication_role = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info_py3.py deleted file mode 100644 index 76c52b49c0ba..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartnerRegionInfo(Model): - """Partner region information for the failover group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param location: Geo location of the partner managed instances. - :type location: str - :ivar replication_role: Replication role of the partner managed instances. - Possible values include: 'Primary', 'Secondary' - :vartype replication_role: str or - ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole - """ - - _validation = { - 'replication_role': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'replication_role': {'key': 'replicationRole', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, **kwargs) -> None: - super(PartnerRegionInfo, self).__init__(**kwargs) - self.location = location - self.replication_role = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability.py deleted file mode 100644 index 2463e1818718..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PerformanceLevelCapability(Model): - """The performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: Performance level value. - :vartype value: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - """ - - _validation = { - 'value': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PerformanceLevelCapability, self).__init__(**kwargs) - self.value = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability_py3.py deleted file mode 100644 index 96119e14568d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/performance_level_capability_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PerformanceLevelCapability(Model): - """The performance level capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: Performance level value. - :vartype value: float - :ivar unit: Unit type used to measure performance level. Possible values - include: 'DTU', 'VCores' - :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit - """ - - _validation = { - 'value': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(PerformanceLevelCapability, self).__init__(**kwargs) - self.value = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource.py deleted file mode 100644 index 21fea4f24360..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ProxyResource(Resource): - """ARM proxy resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProxyResource, self).__init__(**kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource_py3.py deleted file mode 100644 index 707323dfc134..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ProxyResource(Resource): - """ARM proxy resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ProxyResource, self).__init__(**kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool.py deleted file mode 100644 index 0d80a9a31ac9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RecommendedElasticPool(ProxyResource): - """Represents a recommended elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_edition: The edition of the recommended elastic pool. The - ElasticPoolEdition enumeration contains all the valid editions. Possible - values include: 'Basic', 'Standard', 'Premium' - :vartype database_edition: str or - ~azure.mgmt.sql.models.ElasticPoolEdition - :param dtu: The DTU for the recommended elastic pool. - :type dtu: float - :param database_dtu_min: The minimum DTU for the database. - :type database_dtu_min: float - :param database_dtu_max: The maximum DTU for the database. - :type database_dtu_max: float - :param storage_mb: Gets storage size in megabytes. - :type storage_mb: float - :ivar observation_period_start: The observation period start (ISO8601 - format). - :vartype observation_period_start: datetime - :ivar observation_period_end: The observation period start (ISO8601 - format). - :vartype observation_period_end: datetime - :ivar max_observed_dtu: Gets maximum observed DTU. - :vartype max_observed_dtu: float - :ivar max_observed_storage_mb: Gets maximum observed storage in megabytes. - :vartype max_observed_storage_mb: float - :ivar databases: The list of databases in this pool. Expanded property - :vartype databases: list[~azure.mgmt.sql.models.TrackedResource] - :ivar metrics: The list of databases housed in the server. Expanded - property - :vartype metrics: - list[~azure.mgmt.sql.models.RecommendedElasticPoolMetric] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_edition': {'readonly': True}, - 'observation_period_start': {'readonly': True}, - 'observation_period_end': {'readonly': True}, - 'max_observed_dtu': {'readonly': True}, - 'max_observed_storage_mb': {'readonly': True}, - 'databases': {'readonly': True}, - 'metrics': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'dtu': {'key': 'properties.dtu', 'type': 'float'}, - 'database_dtu_min': {'key': 'properties.databaseDtuMin', 'type': 'float'}, - 'database_dtu_max': {'key': 'properties.databaseDtuMax', 'type': 'float'}, - 'storage_mb': {'key': 'properties.storageMB', 'type': 'float'}, - 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, - 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, - 'max_observed_dtu': {'key': 'properties.maxObservedDtu', 'type': 'float'}, - 'max_observed_storage_mb': {'key': 'properties.maxObservedStorageMB', 'type': 'float'}, - 'databases': {'key': 'properties.databases', 'type': '[TrackedResource]'}, - 'metrics': {'key': 'properties.metrics', 'type': '[RecommendedElasticPoolMetric]'}, - } - - def __init__(self, **kwargs): - super(RecommendedElasticPool, self).__init__(**kwargs) - self.database_edition = None - self.dtu = kwargs.get('dtu', None) - self.database_dtu_min = kwargs.get('database_dtu_min', None) - self.database_dtu_max = kwargs.get('database_dtu_max', None) - self.storage_mb = kwargs.get('storage_mb', None) - self.observation_period_start = None - self.observation_period_end = None - self.max_observed_dtu = None - self.max_observed_storage_mb = None - self.databases = None - self.metrics = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric.py deleted file mode 100644 index 9ed07ced53d7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecommendedElasticPoolMetric(Model): - """Represents recommended elastic pool metric. - - :param date_time_property: The time of metric (ISO8601 format). - :type date_time_property: datetime - :param dtu: Gets or sets the DTUs (Database Transaction Units). See - https://azure.microsoft.com/documentation/articles/sql-database-what-is-a-dtu/ - :type dtu: float - :param size_gb: Gets or sets size in gigabytes. - :type size_gb: float - """ - - _attribute_map = { - 'date_time_property': {'key': 'dateTime', 'type': 'iso-8601'}, - 'dtu': {'key': 'dtu', 'type': 'float'}, - 'size_gb': {'key': 'sizeGB', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(RecommendedElasticPoolMetric, self).__init__(**kwargs) - self.date_time_property = kwargs.get('date_time_property', None) - self.dtu = kwargs.get('dtu', None) - self.size_gb = kwargs.get('size_gb', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_paged.py deleted file mode 100644 index a5106f989535..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RecommendedElasticPoolMetricPaged(Paged): - """ - A paging container for iterating over a list of :class:`RecommendedElasticPoolMetric ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RecommendedElasticPoolMetric]'} - } - - def __init__(self, *args, **kwargs): - - super(RecommendedElasticPoolMetricPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_py3.py deleted file mode 100644 index d33210bf6e58..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecommendedElasticPoolMetric(Model): - """Represents recommended elastic pool metric. - - :param date_time_property: The time of metric (ISO8601 format). - :type date_time_property: datetime - :param dtu: Gets or sets the DTUs (Database Transaction Units). See - https://azure.microsoft.com/documentation/articles/sql-database-what-is-a-dtu/ - :type dtu: float - :param size_gb: Gets or sets size in gigabytes. - :type size_gb: float - """ - - _attribute_map = { - 'date_time_property': {'key': 'dateTime', 'type': 'iso-8601'}, - 'dtu': {'key': 'dtu', 'type': 'float'}, - 'size_gb': {'key': 'sizeGB', 'type': 'float'}, - } - - def __init__(self, *, date_time_property=None, dtu: float=None, size_gb: float=None, **kwargs) -> None: - super(RecommendedElasticPoolMetric, self).__init__(**kwargs) - self.date_time_property = date_time_property - self.dtu = dtu - self.size_gb = size_gb diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_paged.py deleted file mode 100644 index ceb235126fbe..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RecommendedElasticPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`RecommendedElasticPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RecommendedElasticPool]'} - } - - def __init__(self, *args, **kwargs): - - super(RecommendedElasticPoolPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_py3.py deleted file mode 100644 index 2f8a14d6abfa..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_py3.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RecommendedElasticPool(ProxyResource): - """Represents a recommended elastic pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_edition: The edition of the recommended elastic pool. The - ElasticPoolEdition enumeration contains all the valid editions. Possible - values include: 'Basic', 'Standard', 'Premium' - :vartype database_edition: str or - ~azure.mgmt.sql.models.ElasticPoolEdition - :param dtu: The DTU for the recommended elastic pool. - :type dtu: float - :param database_dtu_min: The minimum DTU for the database. - :type database_dtu_min: float - :param database_dtu_max: The maximum DTU for the database. - :type database_dtu_max: float - :param storage_mb: Gets storage size in megabytes. - :type storage_mb: float - :ivar observation_period_start: The observation period start (ISO8601 - format). - :vartype observation_period_start: datetime - :ivar observation_period_end: The observation period start (ISO8601 - format). - :vartype observation_period_end: datetime - :ivar max_observed_dtu: Gets maximum observed DTU. - :vartype max_observed_dtu: float - :ivar max_observed_storage_mb: Gets maximum observed storage in megabytes. - :vartype max_observed_storage_mb: float - :ivar databases: The list of databases in this pool. Expanded property - :vartype databases: list[~azure.mgmt.sql.models.TrackedResource] - :ivar metrics: The list of databases housed in the server. Expanded - property - :vartype metrics: - list[~azure.mgmt.sql.models.RecommendedElasticPoolMetric] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_edition': {'readonly': True}, - 'observation_period_start': {'readonly': True}, - 'observation_period_end': {'readonly': True}, - 'max_observed_dtu': {'readonly': True}, - 'max_observed_storage_mb': {'readonly': True}, - 'databases': {'readonly': True}, - 'metrics': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_edition': {'key': 'properties.databaseEdition', 'type': 'str'}, - 'dtu': {'key': 'properties.dtu', 'type': 'float'}, - 'database_dtu_min': {'key': 'properties.databaseDtuMin', 'type': 'float'}, - 'database_dtu_max': {'key': 'properties.databaseDtuMax', 'type': 'float'}, - 'storage_mb': {'key': 'properties.storageMB', 'type': 'float'}, - 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, - 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, - 'max_observed_dtu': {'key': 'properties.maxObservedDtu', 'type': 'float'}, - 'max_observed_storage_mb': {'key': 'properties.maxObservedStorageMB', 'type': 'float'}, - 'databases': {'key': 'properties.databases', 'type': '[TrackedResource]'}, - 'metrics': {'key': 'properties.metrics', 'type': '[RecommendedElasticPoolMetric]'}, - } - - def __init__(self, *, dtu: float=None, database_dtu_min: float=None, database_dtu_max: float=None, storage_mb: float=None, **kwargs) -> None: - super(RecommendedElasticPool, self).__init__(**kwargs) - self.database_edition = None - self.dtu = dtu - self.database_dtu_min = database_dtu_min - self.database_dtu_max = database_dtu_max - self.storage_mb = storage_mb - self.observation_period_start = None - self.observation_period_end = None - self.max_observed_dtu = None - self.max_observed_storage_mb = None - self.databases = None - self.metrics = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index.py deleted file mode 100644 index df1eba91f84f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RecommendedIndex(ProxyResource): - """Represents a database recommended index. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar action: The proposed index action. You can create a missing index, - drop an unused index, or rebuild an existing index to improve its - performance. Possible values include: 'Create', 'Drop', 'Rebuild' - :vartype action: str or ~azure.mgmt.sql.models.RecommendedIndexAction - :ivar state: The current recommendation state. Possible values include: - 'Active', 'Pending', 'Executing', 'Verifying', 'Pending Revert', - 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success' - :vartype state: str or ~azure.mgmt.sql.models.RecommendedIndexState - :ivar created: The UTC datetime showing when this resource was created - (ISO8601 format). - :vartype created: datetime - :ivar last_modified: The UTC datetime of when was this resource last - changed (ISO8601 format). - :vartype last_modified: datetime - :ivar index_type: The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, - CLUSTERED COLUMNSTORE). Possible values include: 'CLUSTERED', - 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED COLUMNSTORE' - :vartype index_type: str or ~azure.mgmt.sql.models.RecommendedIndexType - :ivar schema: The schema where table to build index over resides - :vartype schema: str - :ivar table: The table on which to build index. - :vartype table: str - :ivar columns: Columns over which to build index - :vartype columns: list[str] - :ivar included_columns: The list of column names to be included in the - index - :vartype included_columns: list[str] - :ivar index_script: The full build index script - :vartype index_script: str - :ivar estimated_impact: The estimated impact of doing recommended index - action. - :vartype estimated_impact: list[~azure.mgmt.sql.models.OperationImpact] - :ivar reported_impact: The values reported after index action is complete. - :vartype reported_impact: list[~azure.mgmt.sql.models.OperationImpact] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'action': {'readonly': True}, - 'state': {'readonly': True}, - 'created': {'readonly': True}, - 'last_modified': {'readonly': True}, - 'index_type': {'readonly': True}, - 'schema': {'readonly': True}, - 'table': {'readonly': True}, - 'columns': {'readonly': True}, - 'included_columns': {'readonly': True}, - 'index_script': {'readonly': True}, - 'estimated_impact': {'readonly': True}, - 'reported_impact': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'action': {'key': 'properties.action', 'type': 'RecommendedIndexAction'}, - 'state': {'key': 'properties.state', 'type': 'RecommendedIndexState'}, - 'created': {'key': 'properties.created', 'type': 'iso-8601'}, - 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, - 'index_type': {'key': 'properties.indexType', 'type': 'RecommendedIndexType'}, - 'schema': {'key': 'properties.schema', 'type': 'str'}, - 'table': {'key': 'properties.table', 'type': 'str'}, - 'columns': {'key': 'properties.columns', 'type': '[str]'}, - 'included_columns': {'key': 'properties.includedColumns', 'type': '[str]'}, - 'index_script': {'key': 'properties.indexScript', 'type': 'str'}, - 'estimated_impact': {'key': 'properties.estimatedImpact', 'type': '[OperationImpact]'}, - 'reported_impact': {'key': 'properties.reportedImpact', 'type': '[OperationImpact]'}, - } - - def __init__(self, **kwargs): - super(RecommendedIndex, self).__init__(**kwargs) - self.action = None - self.state = None - self.created = None - self.last_modified = None - self.index_type = None - self.schema = None - self.table = None - self.columns = None - self.included_columns = None - self.index_script = None - self.estimated_impact = None - self.reported_impact = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index_py3.py deleted file mode 100644 index 5aea5620371e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index_py3.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RecommendedIndex(ProxyResource): - """Represents a database recommended index. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar action: The proposed index action. You can create a missing index, - drop an unused index, or rebuild an existing index to improve its - performance. Possible values include: 'Create', 'Drop', 'Rebuild' - :vartype action: str or ~azure.mgmt.sql.models.RecommendedIndexAction - :ivar state: The current recommendation state. Possible values include: - 'Active', 'Pending', 'Executing', 'Verifying', 'Pending Revert', - 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success' - :vartype state: str or ~azure.mgmt.sql.models.RecommendedIndexState - :ivar created: The UTC datetime showing when this resource was created - (ISO8601 format). - :vartype created: datetime - :ivar last_modified: The UTC datetime of when was this resource last - changed (ISO8601 format). - :vartype last_modified: datetime - :ivar index_type: The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, - CLUSTERED COLUMNSTORE). Possible values include: 'CLUSTERED', - 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED COLUMNSTORE' - :vartype index_type: str or ~azure.mgmt.sql.models.RecommendedIndexType - :ivar schema: The schema where table to build index over resides - :vartype schema: str - :ivar table: The table on which to build index. - :vartype table: str - :ivar columns: Columns over which to build index - :vartype columns: list[str] - :ivar included_columns: The list of column names to be included in the - index - :vartype included_columns: list[str] - :ivar index_script: The full build index script - :vartype index_script: str - :ivar estimated_impact: The estimated impact of doing recommended index - action. - :vartype estimated_impact: list[~azure.mgmt.sql.models.OperationImpact] - :ivar reported_impact: The values reported after index action is complete. - :vartype reported_impact: list[~azure.mgmt.sql.models.OperationImpact] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'action': {'readonly': True}, - 'state': {'readonly': True}, - 'created': {'readonly': True}, - 'last_modified': {'readonly': True}, - 'index_type': {'readonly': True}, - 'schema': {'readonly': True}, - 'table': {'readonly': True}, - 'columns': {'readonly': True}, - 'included_columns': {'readonly': True}, - 'index_script': {'readonly': True}, - 'estimated_impact': {'readonly': True}, - 'reported_impact': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'action': {'key': 'properties.action', 'type': 'RecommendedIndexAction'}, - 'state': {'key': 'properties.state', 'type': 'RecommendedIndexState'}, - 'created': {'key': 'properties.created', 'type': 'iso-8601'}, - 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, - 'index_type': {'key': 'properties.indexType', 'type': 'RecommendedIndexType'}, - 'schema': {'key': 'properties.schema', 'type': 'str'}, - 'table': {'key': 'properties.table', 'type': 'str'}, - 'columns': {'key': 'properties.columns', 'type': '[str]'}, - 'included_columns': {'key': 'properties.includedColumns', 'type': '[str]'}, - 'index_script': {'key': 'properties.indexScript', 'type': 'str'}, - 'estimated_impact': {'key': 'properties.estimatedImpact', 'type': '[OperationImpact]'}, - 'reported_impact': {'key': 'properties.reportedImpact', 'type': '[OperationImpact]'}, - } - - def __init__(self, **kwargs) -> None: - super(RecommendedIndex, self).__init__(**kwargs) - self.action = None - self.state = None - self.created = None - self.last_modified = None - self.index_type = None - self.schema = None - self.table = None - self.columns = None - self.included_columns = None - self.index_script = None - self.estimated_impact = None - self.reported_impact = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database.py deleted file mode 100644 index 0d3b630ce18d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RecoverableDatabase(ProxyResource): - """A recoverable database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar edition: The edition of the database - :vartype edition: str - :ivar service_level_objective: The service level objective name of the - database - :vartype service_level_objective: str - :ivar elastic_pool_name: The elastic pool name of the database - :vartype elastic_pool_name: str - :ivar last_available_backup_date: The last available backup date of the - database (ISO8601 format) - :vartype last_available_backup_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'edition': {'readonly': True}, - 'service_level_objective': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'last_available_backup_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'edition': {'key': 'properties.edition', 'type': 'str'}, - 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(RecoverableDatabase, self).__init__(**kwargs) - self.edition = None - self.service_level_objective = None - self.elastic_pool_name = None - self.last_available_backup_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_paged.py deleted file mode 100644 index cf4cde8ae7e0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RecoverableDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`RecoverableDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RecoverableDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(RecoverableDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_py3.py deleted file mode 100644 index 8eb9d5510689..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RecoverableDatabase(ProxyResource): - """A recoverable database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar edition: The edition of the database - :vartype edition: str - :ivar service_level_objective: The service level objective name of the - database - :vartype service_level_objective: str - :ivar elastic_pool_name: The elastic pool name of the database - :vartype elastic_pool_name: str - :ivar last_available_backup_date: The last available backup date of the - database (ISO8601 format) - :vartype last_available_backup_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'edition': {'readonly': True}, - 'service_level_objective': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'last_available_backup_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'edition': {'key': 'properties.edition', 'type': 'str'}, - 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(RecoverableDatabase, self).__init__(**kwargs) - self.edition = None - self.service_level_objective = None - self.elastic_pool_name = None - self.last_available_backup_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database.py deleted file mode 100644 index cd6adeaeac89..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RecoverableManagedDatabase(ProxyResource): - """A recoverable managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar last_available_backup_date: The last available backup date. - :vartype last_available_backup_date: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'last_available_backup_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RecoverableManagedDatabase, self).__init__(**kwargs) - self.last_available_backup_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_paged.py deleted file mode 100644 index 9c3a35713275..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RecoverableManagedDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`RecoverableManagedDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RecoverableManagedDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(RecoverableManagedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_py3.py deleted file mode 100644 index b6f295aceffb..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_managed_database_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RecoverableManagedDatabase(ProxyResource): - """A recoverable managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar last_available_backup_date: The last available backup date. - :vartype last_available_backup_date: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'last_available_backup_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(RecoverableManagedDatabase, self).__init__(**kwargs) - self.last_available_backup_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link.py deleted file mode 100644 index 450161ab6c9b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ReplicationLink(ProxyResource): - """Represents a database replication link. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Location of the server that contains this firewall rule. - :vartype location: str - :ivar is_termination_allowed: Legacy value indicating whether termination - is allowed. Currently always returns true. - :vartype is_termination_allowed: bool - :ivar replication_mode: Replication mode of this replication link. - :vartype replication_mode: str - :ivar partner_server: The name of the server hosting the partner database. - :vartype partner_server: str - :ivar partner_database: The name of the partner database. - :vartype partner_database: str - :ivar partner_location: The Azure Region of the partner database. - :vartype partner_location: str - :ivar role: The role of the database in the replication link. Possible - values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', - 'Copy' - :vartype role: str or ~azure.mgmt.sql.models.ReplicationRole - :ivar partner_role: The role of the partner database in the replication - link. Possible values include: 'Primary', 'Secondary', - 'NonReadableSecondary', 'Source', 'Copy' - :vartype partner_role: str or ~azure.mgmt.sql.models.ReplicationRole - :ivar start_time: The start time for the replication link. - :vartype start_time: datetime - :ivar percent_complete: The percentage of seeding complete for the - replication link. - :vartype percent_complete: int - :ivar replication_state: The replication state for the replication link. - Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP', 'SUSPENDED' - :vartype replication_state: str or ~azure.mgmt.sql.models.ReplicationState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'is_termination_allowed': {'readonly': True}, - 'replication_mode': {'readonly': True}, - 'partner_server': {'readonly': True}, - 'partner_database': {'readonly': True}, - 'partner_location': {'readonly': True}, - 'role': {'readonly': True}, - 'partner_role': {'readonly': True}, - 'start_time': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'replication_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'is_termination_allowed': {'key': 'properties.isTerminationAllowed', 'type': 'bool'}, - 'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'}, - 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, - 'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'}, - 'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'}, - 'role': {'key': 'properties.role', 'type': 'ReplicationRole'}, - 'partner_role': {'key': 'properties.partnerRole', 'type': 'ReplicationRole'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ReplicationLink, self).__init__(**kwargs) - self.location = None - self.is_termination_allowed = None - self.replication_mode = None - self.partner_server = None - self.partner_database = None - self.partner_location = None - self.role = None - self.partner_role = None - self.start_time = None - self.percent_complete = None - self.replication_state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_paged.py deleted file mode 100644 index 18b96c9e0e3c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ReplicationLinkPaged(Paged): - """ - A paging container for iterating over a list of :class:`ReplicationLink ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ReplicationLink]'} - } - - def __init__(self, *args, **kwargs): - - super(ReplicationLinkPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_py3.py deleted file mode 100644 index 740748f154b2..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_py3.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ReplicationLink(ProxyResource): - """Represents a database replication link. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Location of the server that contains this firewall rule. - :vartype location: str - :ivar is_termination_allowed: Legacy value indicating whether termination - is allowed. Currently always returns true. - :vartype is_termination_allowed: bool - :ivar replication_mode: Replication mode of this replication link. - :vartype replication_mode: str - :ivar partner_server: The name of the server hosting the partner database. - :vartype partner_server: str - :ivar partner_database: The name of the partner database. - :vartype partner_database: str - :ivar partner_location: The Azure Region of the partner database. - :vartype partner_location: str - :ivar role: The role of the database in the replication link. Possible - values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', - 'Copy' - :vartype role: str or ~azure.mgmt.sql.models.ReplicationRole - :ivar partner_role: The role of the partner database in the replication - link. Possible values include: 'Primary', 'Secondary', - 'NonReadableSecondary', 'Source', 'Copy' - :vartype partner_role: str or ~azure.mgmt.sql.models.ReplicationRole - :ivar start_time: The start time for the replication link. - :vartype start_time: datetime - :ivar percent_complete: The percentage of seeding complete for the - replication link. - :vartype percent_complete: int - :ivar replication_state: The replication state for the replication link. - Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP', 'SUSPENDED' - :vartype replication_state: str or ~azure.mgmt.sql.models.ReplicationState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'is_termination_allowed': {'readonly': True}, - 'replication_mode': {'readonly': True}, - 'partner_server': {'readonly': True}, - 'partner_database': {'readonly': True}, - 'partner_location': {'readonly': True}, - 'role': {'readonly': True}, - 'partner_role': {'readonly': True}, - 'start_time': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'replication_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'is_termination_allowed': {'key': 'properties.isTerminationAllowed', 'type': 'bool'}, - 'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'}, - 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, - 'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'}, - 'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'}, - 'role': {'key': 'properties.role', 'type': 'ReplicationRole'}, - 'partner_role': {'key': 'properties.partnerRole', 'type': 'ReplicationRole'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ReplicationLink, self).__init__(**kwargs) - self.location = None - self.is_termination_allowed = None - self.replication_mode = None - self.partner_server = None - self.partner_database = None - self.partner_location = None - self.role = None - self.partner_role = None - self.start_time = None - self.percent_complete = None - self.replication_state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource.py deleted file mode 100644 index fc92549d32e9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """ARM resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity.py deleted file mode 100644 index 57a9e4b4a161..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceIdentity(Model): - """Azure Active Directory identity configuration for a resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The Azure Active Directory principal id. - :vartype principal_id: str - :param type: The identity type. Set this to 'SystemAssigned' in order to - automatically create and assign an Azure Active Directory principal for - the resource. Possible values include: 'SystemAssigned' - :type type: str or ~azure.mgmt.sql.models.IdentityType - :ivar tenant_id: The Azure Active Directory tenant id. - :vartype tenant_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceIdentity, self).__init__(**kwargs) - self.principal_id = None - self.type = kwargs.get('type', None) - self.tenant_id = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity_py3.py deleted file mode 100644 index 3b1d8d90f100..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceIdentity(Model): - """Azure Active Directory identity configuration for a resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The Azure Active Directory principal id. - :vartype principal_id: str - :param type: The identity type. Set this to 'SystemAssigned' in order to - automatically create and assign an Azure Active Directory principal for - the resource. Possible values include: 'SystemAssigned' - :type type: str or ~azure.mgmt.sql.models.IdentityType - :ivar tenant_id: The Azure Active Directory tenant id. - :vartype tenant_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ResourceIdentity, self).__init__(**kwargs) - self.principal_id = None - self.type = type - self.tenant_id = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition.py deleted file mode 100644 index 2c933120d7c8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceMoveDefinition(Model): - """Contains the information necessary to perform a resource move (rename). - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The target ID for the resource - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceMoveDefinition, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition_py3.py deleted file mode 100644 index f6ce2ac0f628..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceMoveDefinition(Model): - """Contains the information necessary to perform a resource move (rename). - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The target ID for the resource - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str, **kwargs) -> None: - super(ResourceMoveDefinition, self).__init__(**kwargs) - self.id = id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_py3.py deleted file mode 100644 index aedc5cfaf0b9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/resource_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """ARM resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database.py deleted file mode 100644 index 8e419fb0b50b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RestorableDroppedDatabase(ProxyResource): - """A restorable dropped database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: The geo-location where the resource lives - :vartype location: str - :ivar database_name: The name of the database - :vartype database_name: str - :ivar edition: The edition of the database - :vartype edition: str - :ivar max_size_bytes: The max size in bytes of the database - :vartype max_size_bytes: str - :ivar service_level_objective: The service level objective name of the - database - :vartype service_level_objective: str - :ivar elastic_pool_name: The elastic pool name of the database - :vartype elastic_pool_name: str - :ivar creation_date: The creation date of the database (ISO8601 format) - :vartype creation_date: datetime - :ivar deletion_date: The deletion date of the database (ISO8601 format) - :vartype deletion_date: datetime - :ivar earliest_restore_date: The earliest restore date of the database - (ISO8601 format) - :vartype earliest_restore_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'database_name': {'readonly': True}, - 'edition': {'readonly': True}, - 'max_size_bytes': {'readonly': True}, - 'service_level_objective': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'edition': {'key': 'properties.edition', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'str'}, - 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(RestorableDroppedDatabase, self).__init__(**kwargs) - self.location = None - self.database_name = None - self.edition = None - self.max_size_bytes = None - self.service_level_objective = None - self.elastic_pool_name = None - self.creation_date = None - self.deletion_date = None - self.earliest_restore_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_paged.py deleted file mode 100644 index b0eb93010942..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RestorableDroppedDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`RestorableDroppedDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RestorableDroppedDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(RestorableDroppedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_py3.py deleted file mode 100644 index 0e4a5f45ec89..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_py3.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RestorableDroppedDatabase(ProxyResource): - """A restorable dropped database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: The geo-location where the resource lives - :vartype location: str - :ivar database_name: The name of the database - :vartype database_name: str - :ivar edition: The edition of the database - :vartype edition: str - :ivar max_size_bytes: The max size in bytes of the database - :vartype max_size_bytes: str - :ivar service_level_objective: The service level objective name of the - database - :vartype service_level_objective: str - :ivar elastic_pool_name: The elastic pool name of the database - :vartype elastic_pool_name: str - :ivar creation_date: The creation date of the database (ISO8601 format) - :vartype creation_date: datetime - :ivar deletion_date: The deletion date of the database (ISO8601 format) - :vartype deletion_date: datetime - :ivar earliest_restore_date: The earliest restore date of the database - (ISO8601 format) - :vartype earliest_restore_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'database_name': {'readonly': True}, - 'edition': {'readonly': True}, - 'max_size_bytes': {'readonly': True}, - 'service_level_objective': {'readonly': True}, - 'elastic_pool_name': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'edition': {'key': 'properties.edition', 'type': 'str'}, - 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'str'}, - 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, - 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(RestorableDroppedDatabase, self).__init__(**kwargs) - self.location = None - self.database_name = None - self.edition = None - self.max_size_bytes = None - self.service_level_objective = None - self.elastic_pool_name = None - self.creation_date = None - self.deletion_date = None - self.earliest_restore_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database.py deleted file mode 100644 index e23713aa2a2d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class RestorableDroppedManagedDatabase(TrackedResource): - """A restorable dropped managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :ivar database_name: The name of the database. - :vartype database_name: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar deletion_date: The deletion date of the database (ISO8601 format). - :vartype deletion_date: datetime - :ivar earliest_restore_date: The earliest restore date of the database - (ISO8601 format). - :vartype earliest_restore_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'database_name': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(RestorableDroppedManagedDatabase, self).__init__(**kwargs) - self.database_name = None - self.creation_date = None - self.deletion_date = None - self.earliest_restore_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_paged.py deleted file mode 100644 index d6e432c2c351..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RestorableDroppedManagedDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`RestorableDroppedManagedDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RestorableDroppedManagedDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(RestorableDroppedManagedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_py3.py deleted file mode 100644 index 7997b13a21ce..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_managed_database_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class RestorableDroppedManagedDatabase(TrackedResource): - """A restorable dropped managed database resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :ivar database_name: The name of the database. - :vartype database_name: str - :ivar creation_date: The creation date of the database (ISO8601 format). - :vartype creation_date: datetime - :ivar deletion_date: The deletion date of the database (ISO8601 format). - :vartype deletion_date: datetime - :ivar earliest_restore_date: The earliest restore date of the database - (ISO8601 format). - :vartype earliest_restore_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'database_name': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(RestorableDroppedManagedDatabase, self).__init__(location=location, tags=tags, **kwargs) - self.database_name = None - self.creation_date = None - self.deletion_date = None - self.earliest_restore_date = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point.py deleted file mode 100644 index 86cf0382ffc8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RestorePoint(ProxyResource): - """Database restore points. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar restore_point_type: The type of restore point. Possible values - include: 'CONTINUOUS', 'DISCRETE' - :vartype restore_point_type: str or - ~azure.mgmt.sql.models.RestorePointType - :ivar earliest_restore_date: The earliest time to which this database can - be restored - :vartype earliest_restore_date: datetime - :ivar restore_point_creation_date: The time the backup was taken - :vartype restore_point_creation_date: datetime - :ivar restore_point_label: The label of restore point for backup request - by user - :vartype restore_point_label: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'restore_point_type': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'restore_point_creation_date': {'readonly': True}, - 'restore_point_label': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'restore_point_type': {'key': 'properties.restorePointType', 'type': 'RestorePointType'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, - 'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RestorePoint, self).__init__(**kwargs) - self.location = None - self.restore_point_type = None - self.earliest_restore_date = None - self.restore_point_creation_date = None - self.restore_point_label = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_paged.py deleted file mode 100644 index b77cde666dd0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RestorePointPaged(Paged): - """ - A paging container for iterating over a list of :class:`RestorePoint ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RestorePoint]'} - } - - def __init__(self, *args, **kwargs): - - super(RestorePointPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_py3.py deleted file mode 100644 index 886f576a4575..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RestorePoint(ProxyResource): - """Database restore points. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar restore_point_type: The type of restore point. Possible values - include: 'CONTINUOUS', 'DISCRETE' - :vartype restore_point_type: str or - ~azure.mgmt.sql.models.RestorePointType - :ivar earliest_restore_date: The earliest time to which this database can - be restored - :vartype earliest_restore_date: datetime - :ivar restore_point_creation_date: The time the backup was taken - :vartype restore_point_creation_date: datetime - :ivar restore_point_label: The label of restore point for backup request - by user - :vartype restore_point_label: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'restore_point_type': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'restore_point_creation_date': {'readonly': True}, - 'restore_point_label': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'restore_point_type': {'key': 'properties.restorePointType', 'type': 'RestorePointType'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, - 'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(RestorePoint, self).__init__(**kwargs) - self.location = None - self.restore_point_type = None - self.earliest_restore_date = None - self.restore_point_creation_date = None - self.restore_point_label = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label.py deleted file mode 100644 index a076a11634e6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SensitivityLabel(ProxyResource): - """A sensitivity label. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param label_name: The label name. - :type label_name: str - :param label_id: The label ID. - :type label_id: str - :param information_type: The information type. - :type information_type: str - :param information_type_id: The information type ID. - :type information_type_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'label_name': {'key': 'properties.labelName', 'type': 'str'}, - 'label_id': {'key': 'properties.labelId', 'type': 'str'}, - 'information_type': {'key': 'properties.informationType', 'type': 'str'}, - 'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SensitivityLabel, self).__init__(**kwargs) - self.label_name = kwargs.get('label_name', None) - self.label_id = kwargs.get('label_id', None) - self.information_type = kwargs.get('information_type', None) - self.information_type_id = kwargs.get('information_type_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_paged.py deleted file mode 100644 index 438bfd86f9be..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SensitivityLabelPaged(Paged): - """ - A paging container for iterating over a list of :class:`SensitivityLabel ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SensitivityLabel]'} - } - - def __init__(self, *args, **kwargs): - - super(SensitivityLabelPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_py3.py deleted file mode 100644 index f304363d916b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SensitivityLabel(ProxyResource): - """A sensitivity label. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param label_name: The label name. - :type label_name: str - :param label_id: The label ID. - :type label_id: str - :param information_type: The information type. - :type information_type: str - :param information_type_id: The information type ID. - :type information_type_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'label_name': {'key': 'properties.labelName', 'type': 'str'}, - 'label_id': {'key': 'properties.labelId', 'type': 'str'}, - 'information_type': {'key': 'properties.informationType', 'type': 'str'}, - 'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'}, - } - - def __init__(self, *, label_name: str=None, label_id: str=None, information_type: str=None, information_type_id: str=None, **kwargs) -> None: - super(SensitivityLabel, self).__init__(**kwargs) - self.label_name = label_name - self.label_id = label_id - self.information_type = information_type - self.information_type_id = information_type_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server.py deleted file mode 100644 index 1c399fadb353..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class Server(TrackedResource): - """An Azure SQL Database server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.sql.models.ResourceIdentity - :ivar kind: Kind of sql server. This is metadata used for the Azure portal - experience. - :vartype kind: str - :param administrator_login: Administrator username for the server. Once - created it cannot be changed. - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for server creation). - :type administrator_login_password: str - :param version: The version of the server. - :type version: str - :ivar state: The state of the server. - :vartype state: str - :ivar fully_qualified_domain_name: The fully qualified domain name of the - server. - :vartype fully_qualified_domain_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'state': {'readonly': True}, - 'fully_qualified_domain_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Server, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.kind = None - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.version = kwargs.get('version', None) - self.state = None - self.fully_qualified_domain_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning.py deleted file mode 100644 index 583c0b843c1b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerAutomaticTuning(ProxyResource): - """Server-level Automatic Tuning. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param desired_state: Automatic tuning desired state. Possible values - include: 'Custom', 'Auto', 'Unspecified' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningServerMode - :ivar actual_state: Automatic tuning actual state. Possible values - include: 'Custom', 'Auto', 'Unspecified' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningServerMode - :param options: Automatic tuning options definition. - :type options: dict[str, - ~azure.mgmt.sql.models.AutomaticTuningServerOptions] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'actual_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningServerMode'}, - 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningServerMode'}, - 'options': {'key': 'properties.options', 'type': '{AutomaticTuningServerOptions}'}, - } - - def __init__(self, **kwargs): - super(ServerAutomaticTuning, self).__init__(**kwargs) - self.desired_state = kwargs.get('desired_state', None) - self.actual_state = None - self.options = kwargs.get('options', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning_py3.py deleted file mode 100644 index fb8fb4804610..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerAutomaticTuning(ProxyResource): - """Server-level Automatic Tuning. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param desired_state: Automatic tuning desired state. Possible values - include: 'Custom', 'Auto', 'Unspecified' - :type desired_state: str or - ~azure.mgmt.sql.models.AutomaticTuningServerMode - :ivar actual_state: Automatic tuning actual state. Possible values - include: 'Custom', 'Auto', 'Unspecified' - :vartype actual_state: str or - ~azure.mgmt.sql.models.AutomaticTuningServerMode - :param options: Automatic tuning options definition. - :type options: dict[str, - ~azure.mgmt.sql.models.AutomaticTuningServerOptions] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'actual_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningServerMode'}, - 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningServerMode'}, - 'options': {'key': 'properties.options', 'type': '{AutomaticTuningServerOptions}'}, - } - - def __init__(self, *, desired_state=None, options=None, **kwargs) -> None: - super(ServerAutomaticTuning, self).__init__(**kwargs) - self.desired_state = desired_state - self.actual_state = None - self.options = options diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator.py deleted file mode 100644 index ef037e8a9dc8..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerAzureADAdministrator(ProxyResource): - """An server Active Directory Administrator. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar administrator_type: Required. The type of administrator. Default - value: "ActiveDirectory" . - :vartype administrator_type: str - :param login: Required. The server administrator login value. - :type login: str - :param sid: Required. The server administrator Sid (Secure ID). - :type sid: str - :param tenant_id: Required. The server Active Directory Administrator - tenant id. - :type tenant_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'administrator_type': {'required': True, 'constant': True}, - 'login': {'required': True}, - 'sid': {'required': True}, - 'tenant_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, - 'login': {'key': 'properties.login', 'type': 'str'}, - 'sid': {'key': 'properties.sid', 'type': 'str'}, - 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, - } - - administrator_type = "ActiveDirectory" - - def __init__(self, **kwargs): - super(ServerAzureADAdministrator, self).__init__(**kwargs) - self.login = kwargs.get('login', None) - self.sid = kwargs.get('sid', None) - self.tenant_id = kwargs.get('tenant_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_paged.py deleted file mode 100644 index 519adc226385..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerAzureADAdministratorPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerAzureADAdministrator ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerAzureADAdministrator]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerAzureADAdministratorPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_py3.py deleted file mode 100644 index 3dfeb71123c3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerAzureADAdministrator(ProxyResource): - """An server Active Directory Administrator. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar administrator_type: Required. The type of administrator. Default - value: "ActiveDirectory" . - :vartype administrator_type: str - :param login: Required. The server administrator login value. - :type login: str - :param sid: Required. The server administrator Sid (Secure ID). - :type sid: str - :param tenant_id: Required. The server Active Directory Administrator - tenant id. - :type tenant_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'administrator_type': {'required': True, 'constant': True}, - 'login': {'required': True}, - 'sid': {'required': True}, - 'tenant_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, - 'login': {'key': 'properties.login', 'type': 'str'}, - 'sid': {'key': 'properties.sid', 'type': 'str'}, - 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, - } - - administrator_type = "ActiveDirectory" - - def __init__(self, *, login: str, sid: str, tenant_id: str, **kwargs) -> None: - super(ServerAzureADAdministrator, self).__init__(**kwargs) - self.login = login - self.sid = sid - self.tenant_id = tenant_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy.py deleted file mode 100644 index 9a7bc69b8c5d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy.py +++ /dev/null @@ -1,160 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerBlobAuditingPolicy(ProxyResource): - """A server blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ServerBlobAuditingPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) - self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) - self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) - self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy_py3.py deleted file mode 100644 index 120d066e6427..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_blob_auditing_policy_py3.py +++ /dev/null @@ -1,160 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerBlobAuditingPolicy(ProxyResource): - """A server blob auditing policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy. If state is - Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - Possible values include: 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - auditing storage account. If state is Enabled and storageEndpoint is - specified, storageAccountAccessKey is required. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the audit - logs in the storage account. - :type retention_days: int - :param audit_actions_and_groups: Specifies the Actions-Groups and Actions - to audit. - The recommended set of action groups to use is the following combination - - this will audit all the queries and stored procedures executed against the - database, as well as successful and failed logins: - BATCH_COMPLETED_GROUP, - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - FAILED_DATABASE_AUTHENTICATION_GROUP. - This above combination is also the set that is configured by default when - enabling auditing from the Azure portal. - The supported action groups to audit are (note: choose only specific - groups that cover your auditing needs. Using unnecessary groups could lead - to very large quantities of audit records): - APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - BACKUP_RESTORE_GROUP - DATABASE_LOGOUT_GROUP - DATABASE_OBJECT_CHANGE_GROUP - DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - DATABASE_OPERATION_GROUP - DATABASE_PERMISSION_CHANGE_GROUP - DATABASE_PRINCIPAL_CHANGE_GROUP - DATABASE_PRINCIPAL_IMPERSONATION_GROUP - DATABASE_ROLE_MEMBER_CHANGE_GROUP - FAILED_DATABASE_AUTHENTICATION_GROUP - SCHEMA_OBJECT_ACCESS_GROUP - SCHEMA_OBJECT_CHANGE_GROUP - SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - USER_CHANGE_PASSWORD_GROUP - BATCH_STARTED_GROUP - BATCH_COMPLETED_GROUP - These are groups that cover all sql statements and stored procedures - executed against the database, and should not be used in combination with - other groups as this will result in duplicate audit logs. - For more information, see [Database-Level Audit Action - Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - For Database auditing policy, specific Actions can also be specified (note - that Actions cannot be specified for Server auditing policy). The - supported actions to audit are: - SELECT - UPDATE - INSERT - DELETE - EXECUTE - RECEIVE - REFERENCES - The general form for defining an action to be audited is: - {action} ON {object} BY {principal} - Note that in the above format can refer to an object like a - table, view, or stored procedure, or an entire database or schema. For the - latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are - used, respectively. - For example: - SELECT on dbo.myTable by public - SELECT on DATABASE::myDatabase by public - SELECT on SCHEMA::mySchema by public - For more information, see [Database-Level Audit - Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - :type audit_actions_and_groups: list[str] - :param storage_account_subscription_id: Specifies the blob storage - subscription Id. - :type storage_account_subscription_id: str - :param is_storage_secondary_key_in_use: Specifies whether - storageAccountAccessKey value is the storage's secondary key. - :type is_storage_secondary_key_in_use: bool - :param is_azure_monitor_target_enabled: Specifies whether audit events are - sent to Azure Monitor. - In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - and 'IsAzureMonitorTargetEnabled' as true. - When using REST API to configure auditing, Diagnostic Settings with - 'SQLSecurityAuditEvents' diagnostic logs category on the database should - be also created. - Note that for server level audit you should use the 'master' database as - {databaseName}. - Diagnostic Settings URI format: - PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - For more information, see [Diagnostic Settings REST - API](https://go.microsoft.com/fwlink/?linkid=2033207) - or [Diagnostic Settings - PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - :type is_azure_monitor_target_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, - 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, - 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, - 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, - } - - def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: - super(ServerBlobAuditingPolicy, self).__init__(**kwargs) - self.state = state - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.audit_actions_and_groups = audit_actions_and_groups - self.storage_account_subscription_id = storage_account_subscription_id - self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use - self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link.py deleted file mode 100644 index 88fef4fa788f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerCommunicationLink(ProxyResource): - """Server communication link. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar state: The state. - :vartype state: str - :param partner_server: Required. The name of the partner server. - :type partner_server: str - :ivar location: Communication link location. - :vartype location: str - :ivar kind: Communication link kind. This property is used for Azure - Portal metadata. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'readonly': True}, - 'partner_server': {'required': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerCommunicationLink, self).__init__(**kwargs) - self.state = None - self.partner_server = kwargs.get('partner_server', None) - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_paged.py deleted file mode 100644 index 6e2fef5d7ce0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerCommunicationLinkPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerCommunicationLink ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerCommunicationLink]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerCommunicationLinkPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_py3.py deleted file mode 100644 index 6a32069ca067..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerCommunicationLink(ProxyResource): - """Server communication link. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar state: The state. - :vartype state: str - :param partner_server: Required. The name of the partner server. - :type partner_server: str - :ivar location: Communication link location. - :vartype location: str - :ivar kind: Communication link kind. This property is used for Azure - Portal metadata. - :vartype kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'readonly': True}, - 'partner_server': {'required': True}, - 'location': {'readonly': True}, - 'kind': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, partner_server: str, **kwargs) -> None: - super(ServerCommunicationLink, self).__init__(**kwargs) - self.state = None - self.partner_server = partner_server - self.location = None - self.kind = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy.py deleted file mode 100644 index dd0097235550..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerConnectionPolicy(ProxyResource): - """A server secure connection policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Metadata used for the Azure portal experience. - :vartype kind: str - :ivar location: Resource location. - :vartype location: str - :param connection_type: Required. The server connection type. Possible - values include: 'Default', 'Proxy', 'Redirect' - :type connection_type: str or ~azure.mgmt.sql.models.ServerConnectionType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - 'connection_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'connection_type': {'key': 'properties.connectionType', 'type': 'ServerConnectionType'}, - } - - def __init__(self, **kwargs): - super(ServerConnectionPolicy, self).__init__(**kwargs) - self.kind = None - self.location = None - self.connection_type = kwargs.get('connection_type', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy_py3.py deleted file mode 100644 index 10bd81052301..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerConnectionPolicy(ProxyResource): - """A server secure connection policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar kind: Metadata used for the Azure portal experience. - :vartype kind: str - :ivar location: Resource location. - :vartype location: str - :param connection_type: Required. The server connection type. Possible - values include: 'Default', 'Proxy', 'Redirect' - :type connection_type: str or ~azure.mgmt.sql.models.ServerConnectionType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - 'connection_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'connection_type': {'key': 'properties.connectionType', 'type': 'ServerConnectionType'}, - } - - def __init__(self, *, connection_type, **kwargs) -> None: - super(ServerConnectionPolicy, self).__init__(**kwargs) - self.kind = None - self.location = None - self.connection_type = connection_type diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias.py deleted file mode 100644 index 691db960c1a7..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerDnsAlias(ProxyResource): - """A server DNS alias. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar azure_dns_record: The fully qualified DNS record for alias - :vartype azure_dns_record: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'azure_dns_record': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'azure_dns_record': {'key': 'properties.azureDnsRecord', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerDnsAlias, self).__init__(**kwargs) - self.azure_dns_record = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition.py deleted file mode 100644 index 2f7757f5daf2..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerDnsAliasAcquisition(Model): - """A server DNS alias acquisition request. - - :param old_server_dns_alias_id: The id of the server alias that will be - acquired to point to this server instead. - :type old_server_dns_alias_id: str - """ - - _attribute_map = { - 'old_server_dns_alias_id': {'key': 'oldServerDnsAliasId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerDnsAliasAcquisition, self).__init__(**kwargs) - self.old_server_dns_alias_id = kwargs.get('old_server_dns_alias_id', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition_py3.py deleted file mode 100644 index 93cf9e0027c9..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerDnsAliasAcquisition(Model): - """A server DNS alias acquisition request. - - :param old_server_dns_alias_id: The id of the server alias that will be - acquired to point to this server instead. - :type old_server_dns_alias_id: str - """ - - _attribute_map = { - 'old_server_dns_alias_id': {'key': 'oldServerDnsAliasId', 'type': 'str'}, - } - - def __init__(self, *, old_server_dns_alias_id: str=None, **kwargs) -> None: - super(ServerDnsAliasAcquisition, self).__init__(**kwargs) - self.old_server_dns_alias_id = old_server_dns_alias_id diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_paged.py deleted file mode 100644 index 2fdd93879f3b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerDnsAliasPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerDnsAlias ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerDnsAlias]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerDnsAliasPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_py3.py deleted file mode 100644 index c57df1a85f06..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerDnsAlias(ProxyResource): - """A server DNS alias. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar azure_dns_record: The fully qualified DNS record for alias - :vartype azure_dns_record: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'azure_dns_record': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'azure_dns_record': {'key': 'properties.azureDnsRecord', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ServerDnsAlias, self).__init__(**kwargs) - self.azure_dns_record = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key.py deleted file mode 100644 index 1258d1e0da7f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerKey(ProxyResource): - """A server key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :type kind: str - :ivar location: Resource location. - :vartype location: str - :ivar subregion: Subregion of the server key. - :vartype subregion: str - :param server_key_type: Required. The server key type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :param uri: The URI of the server key. - :type uri: str - :param thumbprint: Thumbprint of the server key. - :type thumbprint: str - :param creation_date: The server key creation date. - :type creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'subregion': {'readonly': True}, - 'server_key_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'subregion': {'key': 'properties.subregion', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ServerKey, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) - self.location = None - self.subregion = None - self.server_key_type = kwargs.get('server_key_type', None) - self.uri = kwargs.get('uri', None) - self.thumbprint = kwargs.get('thumbprint', None) - self.creation_date = kwargs.get('creation_date', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_paged.py deleted file mode 100644 index 1d5e262c9c89..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerKeyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerKey ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerKey]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerKeyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_py3.py deleted file mode 100644 index 41ef40ab165a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_key_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerKey(ProxyResource): - """A server key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param kind: Kind of encryption protector. This is metadata used for the - Azure portal experience. - :type kind: str - :ivar location: Resource location. - :vartype location: str - :ivar subregion: Subregion of the server key. - :vartype subregion: str - :param server_key_type: Required. The server key type like - 'ServiceManaged', 'AzureKeyVault'. Possible values include: - 'ServiceManaged', 'AzureKeyVault' - :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType - :param uri: The URI of the server key. - :type uri: str - :param thumbprint: Thumbprint of the server key. - :type thumbprint: str - :param creation_date: The server key creation date. - :type creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'subregion': {'readonly': True}, - 'server_key_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'subregion': {'key': 'properties.subregion', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, server_key_type, kind: str=None, uri: str=None, thumbprint: str=None, creation_date=None, **kwargs) -> None: - super(ServerKey, self).__init__(**kwargs) - self.kind = kind - self.location = None - self.subregion = None - self.server_key_type = server_key_type - self.uri = uri - self.thumbprint = thumbprint - self.creation_date = creation_date diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_paged.py deleted file mode 100644 index 2d6e6fe0e114..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerPaged(Paged): - """ - A paging container for iterating over a list of :class:`Server ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Server]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_py3.py deleted file mode 100644 index 625c4d0aea4c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_py3.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class Server(TrackedResource): - """An Azure SQL Database server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.sql.models.ResourceIdentity - :ivar kind: Kind of sql server. This is metadata used for the Azure portal - experience. - :vartype kind: str - :param administrator_login: Administrator username for the server. Once - created it cannot be changed. - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for server creation). - :type administrator_login_password: str - :param version: The version of the server. - :type version: str - :ivar state: The state of the server. - :vartype state: str - :ivar fully_qualified_domain_name: The fully qualified domain name of the - server. - :vartype fully_qualified_domain_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'readonly': True}, - 'state': {'readonly': True}, - 'fully_qualified_domain_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, identity=None, administrator_login: str=None, administrator_login_password: str=None, version: str=None, **kwargs) -> None: - super(Server, self).__init__(location=location, tags=tags, **kwargs) - self.identity = identity - self.kind = None - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.version = version - self.state = None - self.fully_qualified_domain_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy.py deleted file mode 100644 index 06c40dd93125..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerSecurityAlertPolicy(ProxyResource): - """A server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_paged.py deleted file mode 100644 index 3a8836b45245..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerSecurityAlertPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerSecurityAlertPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerSecurityAlertPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_py3.py deleted file mode 100644 index 38c0c87b0372..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_security_alert_policy_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerSecurityAlertPolicy(ProxyResource): - """A server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled or a policy has not been applied yet on the specific - database. Possible values include: 'New', 'Enabled', 'Disabled' - :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly, Data_Exfiltration, Unsafe_Action - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - :ivar creation_time: Specifies the UTC creation time of the policy. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: - super(ServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - self.creation_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update.py deleted file mode 100644 index d39d49bea953..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerUpdate(Model): - """An update request for an Azure SQL Database server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param administrator_login: Administrator username for the server. Once - created it cannot be changed. - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for server creation). - :type administrator_login_password: str - :param version: The version of the server. - :type version: str - :ivar state: The state of the server. - :vartype state: str - :ivar fully_qualified_domain_name: The fully qualified domain name of the - server. - :vartype fully_qualified_domain_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'state': {'readonly': True}, - 'fully_qualified_domain_name': {'readonly': True}, - } - - _attribute_map = { - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ServerUpdate, self).__init__(**kwargs) - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.version = kwargs.get('version', None) - self.state = None - self.fully_qualified_domain_name = None - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update_py3.py deleted file mode 100644 index 863f2b52fa01..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_update_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerUpdate(Model): - """An update request for an Azure SQL Database server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param administrator_login: Administrator username for the server. Once - created it cannot be changed. - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for server creation). - :type administrator_login_password: str - :param version: The version of the server. - :type version: str - :ivar state: The state of the server. - :vartype state: str - :ivar fully_qualified_domain_name: The fully qualified domain name of the - server. - :vartype fully_qualified_domain_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'state': {'readonly': True}, - 'fully_qualified_domain_name': {'readonly': True}, - } - - _attribute_map = { - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, administrator_login: str=None, administrator_login_password: str=None, version: str=None, tags=None, **kwargs) -> None: - super(ServerUpdate, self).__init__(**kwargs) - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.version = version - self.state = None - self.fully_qualified_domain_name = None - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage.py deleted file mode 100644 index e04fb8c60a82..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerUsage(Model): - """Represents server metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of the server usage metric. - :vartype name: str - :ivar resource_name: The name of the resource. - :vartype resource_name: str - :ivar display_name: The metric display name. - :vartype display_name: str - :ivar current_value: The current value of the metric. - :vartype current_value: float - :ivar limit: The current limit of the metric. - :vartype limit: float - :ivar unit: The units of the metric. - :vartype unit: str - :ivar next_reset_time: The next reset time for the metric (ISO8601 - format). - :vartype next_reset_time: datetime - """ - - _validation = { - 'name': {'readonly': True}, - 'resource_name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'next_reset_time': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_name': {'key': 'resourceName', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ServerUsage, self).__init__(**kwargs) - self.name = None - self.resource_name = None - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None - self.next_reset_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_paged.py deleted file mode 100644 index 688d3b408383..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerUsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerUsage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerUsage]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerUsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_py3.py deleted file mode 100644 index 3a6feaecdc8d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_usage_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerUsage(Model): - """Represents server metrics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of the server usage metric. - :vartype name: str - :ivar resource_name: The name of the resource. - :vartype resource_name: str - :ivar display_name: The metric display name. - :vartype display_name: str - :ivar current_value: The current value of the metric. - :vartype current_value: float - :ivar limit: The current limit of the metric. - :vartype limit: float - :ivar unit: The units of the metric. - :vartype unit: str - :ivar next_reset_time: The next reset time for the metric (ISO8601 - format). - :vartype next_reset_time: datetime - """ - - _validation = { - 'name': {'readonly': True}, - 'resource_name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - 'next_reset_time': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_name': {'key': 'resourceName', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(ServerUsage, self).__init__(**kwargs) - self.name = None - self.resource_name = None - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None - self.next_reset_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability.py deleted file mode 100644 index 811e93df8aa4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerVersionCapability(Model): - """The server capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The server version name. - :vartype name: str - :ivar supported_editions: The list of supported database editions. - :vartype supported_editions: - list[~azure.mgmt.sql.models.EditionCapability] - :ivar supported_elastic_pool_editions: The list of supported elastic pool - editions. - :vartype supported_elastic_pool_editions: - list[~azure.mgmt.sql.models.ElasticPoolEditionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_editions': {'readonly': True}, - 'supported_elastic_pool_editions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_editions': {'key': 'supportedEditions', 'type': '[EditionCapability]'}, - 'supported_elastic_pool_editions': {'key': 'supportedElasticPoolEditions', 'type': '[ElasticPoolEditionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerVersionCapability, self).__init__(**kwargs) - self.name = None - self.supported_editions = None - self.supported_elastic_pool_editions = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability_py3.py deleted file mode 100644 index 66a1a0251ede..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServerVersionCapability(Model): - """The server capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The server version name. - :vartype name: str - :ivar supported_editions: The list of supported database editions. - :vartype supported_editions: - list[~azure.mgmt.sql.models.EditionCapability] - :ivar supported_elastic_pool_editions: The list of supported elastic pool - editions. - :vartype supported_elastic_pool_editions: - list[~azure.mgmt.sql.models.ElasticPoolEditionCapability] - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_editions': {'readonly': True}, - 'supported_elastic_pool_editions': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_editions': {'key': 'supportedEditions', 'type': '[EditionCapability]'}, - 'supported_elastic_pool_editions': {'key': 'supportedElasticPoolEditions', 'type': '[ElasticPoolEditionCapability]'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ServerVersionCapability, self).__init__(**kwargs) - self.name = None - self.supported_editions = None - self.supported_elastic_pool_editions = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment.py deleted file mode 100644 index eecad7a9b04d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServerVulnerabilityAssessment(ProxyResource): - """A server vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: Required. A blob storage container path to - hold the scan results (e.g. - https://myStorage.blob.core.windows.net/VaScans/). - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_container_path': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, **kwargs): - super(ServerVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = kwargs.get('storage_container_path', None) - self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.recurring_scans = kwargs.get('recurring_scans', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_paged.py deleted file mode 100644 index 43c1a3b65779..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerVulnerabilityAssessmentPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerVulnerabilityAssessment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerVulnerabilityAssessment]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_py3.py deleted file mode 100644 index bb42c3866a3f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/server_vulnerability_assessment_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServerVulnerabilityAssessment(ProxyResource): - """A server vulnerability assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param storage_container_path: Required. A blob storage container path to - hold the scan results (e.g. - https://myStorage.blob.core.windows.net/VaScans/). - :type storage_container_path: str - :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. - :type storage_container_sas_key: str - :param storage_account_access_key: Specifies the identifier key of the - storage account for vulnerability assessment scan results. If - 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - required. - :type storage_account_access_key: str - :param recurring_scans: The recurring scans settings - :type recurring_scans: - ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_container_path': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, - } - - def __init__(self, *, storage_container_path: str, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: - super(ServerVulnerabilityAssessment, self).__init__(**kwargs) - self.storage_container_path = storage_container_path - self.storage_container_sas_key = storage_container_sas_key - self.storage_account_access_key = storage_account_access_key - self.recurring_scans = recurring_scans diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective.py deleted file mode 100644 index 71133da2f551..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServiceObjective(ProxyResource): - """Represents a database service objective. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar service_objective_name: The name for the service objective. - :vartype service_objective_name: str - :ivar is_default: Gets whether the service level objective is the default - service objective. - :vartype is_default: bool - :ivar is_system: Gets whether the service level objective is a system - service objective. - :vartype is_system: bool - :ivar description: The description for the service level objective. - :vartype description: str - :ivar enabled: Gets whether the service level objective is enabled. - :vartype enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'service_objective_name': {'readonly': True}, - 'is_default': {'readonly': True}, - 'is_system': {'readonly': True}, - 'description': {'readonly': True}, - 'enabled': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'service_objective_name': {'key': 'properties.serviceObjectiveName', 'type': 'str'}, - 'is_default': {'key': 'properties.isDefault', 'type': 'bool'}, - 'is_system': {'key': 'properties.isSystem', 'type': 'bool'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ServiceObjective, self).__init__(**kwargs) - self.service_objective_name = None - self.is_default = None - self.is_system = None - self.description = None - self.enabled = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability.py deleted file mode 100644 index 1e6c2158be9a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceObjectiveCapability(Model): - """The service objectives capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique ID of the service objective. - :vartype id: str - :ivar name: The service objective name. - :vartype name: str - :ivar supported_max_sizes: The list of supported maximum database sizes. - :vartype supported_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar performance_level: The performance level. - :vartype performance_level: - ~azure.mgmt.sql.models.PerformanceLevelCapability - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.sql.models.Sku - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar included_max_size: The included (free) max size. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'supported_max_sizes': {'readonly': True}, - 'performance_level': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceObjectiveCapability, self).__init__(**kwargs) - self.id = None - self.name = None - self.supported_max_sizes = None - self.performance_level = None - self.sku = None - self.supported_license_types = None - self.included_max_size = None - self.status = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability_py3.py deleted file mode 100644 index f777ffd74f97..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceObjectiveCapability(Model): - """The service objectives capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique ID of the service objective. - :vartype id: str - :ivar name: The service objective name. - :vartype name: str - :ivar supported_max_sizes: The list of supported maximum database sizes. - :vartype supported_max_sizes: - list[~azure.mgmt.sql.models.MaxSizeRangeCapability] - :ivar performance_level: The performance level. - :vartype performance_level: - ~azure.mgmt.sql.models.PerformanceLevelCapability - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.sql.models.Sku - :ivar supported_license_types: List of supported license types. - :vartype supported_license_types: - list[~azure.mgmt.sql.models.LicenseTypeCapability] - :ivar included_max_size: The included (free) max size. - :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability - :ivar status: The status of the capability. Possible values include: - 'Visible', 'Available', 'Default', 'Disabled' - :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus - :param reason: The reason for the capability not being available. - :type reason: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'supported_max_sizes': {'readonly': True}, - 'performance_level': {'readonly': True}, - 'sku': {'readonly': True}, - 'supported_license_types': {'readonly': True}, - 'included_max_size': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, - 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, - 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, - 'status': {'key': 'status', 'type': 'CapabilityStatus'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, reason: str=None, **kwargs) -> None: - super(ServiceObjectiveCapability, self).__init__(**kwargs) - self.id = None - self.name = None - self.supported_max_sizes = None - self.performance_level = None - self.sku = None - self.supported_license_types = None - self.included_max_size = None - self.status = None - self.reason = reason diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_paged.py deleted file mode 100644 index 7afe16629d1d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServiceObjectivePaged(Paged): - """ - A paging container for iterating over a list of :class:`ServiceObjective ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServiceObjective]'} - } - - def __init__(self, *args, **kwargs): - - super(ServiceObjectivePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_py3.py deleted file mode 100644 index 2fc00134e6ec..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServiceObjective(ProxyResource): - """Represents a database service objective. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar service_objective_name: The name for the service objective. - :vartype service_objective_name: str - :ivar is_default: Gets whether the service level objective is the default - service objective. - :vartype is_default: bool - :ivar is_system: Gets whether the service level objective is a system - service objective. - :vartype is_system: bool - :ivar description: The description for the service level objective. - :vartype description: str - :ivar enabled: Gets whether the service level objective is enabled. - :vartype enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'service_objective_name': {'readonly': True}, - 'is_default': {'readonly': True}, - 'is_system': {'readonly': True}, - 'description': {'readonly': True}, - 'enabled': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'service_objective_name': {'key': 'properties.serviceObjectiveName', 'type': 'str'}, - 'is_default': {'key': 'properties.isDefault', 'type': 'bool'}, - 'is_system': {'key': 'properties.isSystem', 'type': 'bool'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs) -> None: - super(ServiceObjective, self).__init__(**kwargs) - self.service_objective_name = None - self.is_default = None - self.is_system = None - self.description = None - self.enabled = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor.py deleted file mode 100644 index cb8974906ee6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class ServiceTierAdvisor(ProxyResource): - """Represents a Service Tier Advisor. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar observation_period_start: The observation period start (ISO8601 - format). - :vartype observation_period_start: datetime - :ivar observation_period_end: The observation period start (ISO8601 - format). - :vartype observation_period_end: datetime - :ivar active_time_ratio: The activeTimeRatio for service tier advisor. - :vartype active_time_ratio: float - :ivar min_dtu: Gets or sets minDtu for service tier advisor. - :vartype min_dtu: float - :ivar avg_dtu: Gets or sets avgDtu for service tier advisor. - :vartype avg_dtu: float - :ivar max_dtu: Gets or sets maxDtu for service tier advisor. - :vartype max_dtu: float - :ivar max_size_in_gb: Gets or sets maxSizeInGB for service tier advisor. - :vartype max_size_in_gb: float - :ivar service_level_objective_usage_metrics: Gets or sets - serviceLevelObjectiveUsageMetrics for the service tier advisor. - :vartype service_level_objective_usage_metrics: - list[~azure.mgmt.sql.models.SloUsageMetric] - :ivar current_service_level_objective: Gets or sets - currentServiceLevelObjective for service tier advisor. - :vartype current_service_level_objective: str - :ivar current_service_level_objective_id: Gets or sets - currentServiceLevelObjectiveId for service tier advisor. - :vartype current_service_level_objective_id: str - :ivar usage_based_recommendation_service_level_objective: Gets or sets - usageBasedRecommendationServiceLevelObjective for service tier advisor. - :vartype usage_based_recommendation_service_level_objective: str - :ivar usage_based_recommendation_service_level_objective_id: Gets or sets - usageBasedRecommendationServiceLevelObjectiveId for service tier advisor. - :vartype usage_based_recommendation_service_level_objective_id: str - :ivar database_size_based_recommendation_service_level_objective: Gets or - sets databaseSizeBasedRecommendationServiceLevelObjective for service tier - advisor. - :vartype database_size_based_recommendation_service_level_objective: str - :ivar database_size_based_recommendation_service_level_objective_id: Gets - or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service - tier advisor. - :vartype database_size_based_recommendation_service_level_objective_id: - str - :ivar disaster_plan_based_recommendation_service_level_objective: Gets or - sets disasterPlanBasedRecommendationServiceLevelObjective for service tier - advisor. - :vartype disaster_plan_based_recommendation_service_level_objective: str - :ivar disaster_plan_based_recommendation_service_level_objective_id: Gets - or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service - tier advisor. - :vartype disaster_plan_based_recommendation_service_level_objective_id: - str - :ivar overall_recommendation_service_level_objective: Gets or sets - overallRecommendationServiceLevelObjective for service tier advisor. - :vartype overall_recommendation_service_level_objective: str - :ivar overall_recommendation_service_level_objective_id: Gets or sets - overallRecommendationServiceLevelObjectiveId for service tier advisor. - :vartype overall_recommendation_service_level_objective_id: str - :ivar confidence: Gets or sets confidence for service tier advisor. - :vartype confidence: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'observation_period_start': {'readonly': True}, - 'observation_period_end': {'readonly': True}, - 'active_time_ratio': {'readonly': True}, - 'min_dtu': {'readonly': True}, - 'avg_dtu': {'readonly': True}, - 'max_dtu': {'readonly': True}, - 'max_size_in_gb': {'readonly': True}, - 'service_level_objective_usage_metrics': {'readonly': True}, - 'current_service_level_objective': {'readonly': True}, - 'current_service_level_objective_id': {'readonly': True}, - 'usage_based_recommendation_service_level_objective': {'readonly': True}, - 'usage_based_recommendation_service_level_objective_id': {'readonly': True}, - 'database_size_based_recommendation_service_level_objective': {'readonly': True}, - 'database_size_based_recommendation_service_level_objective_id': {'readonly': True}, - 'disaster_plan_based_recommendation_service_level_objective': {'readonly': True}, - 'disaster_plan_based_recommendation_service_level_objective_id': {'readonly': True}, - 'overall_recommendation_service_level_objective': {'readonly': True}, - 'overall_recommendation_service_level_objective_id': {'readonly': True}, - 'confidence': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, - 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, - 'active_time_ratio': {'key': 'properties.activeTimeRatio', 'type': 'float'}, - 'min_dtu': {'key': 'properties.minDtu', 'type': 'float'}, - 'avg_dtu': {'key': 'properties.avgDtu', 'type': 'float'}, - 'max_dtu': {'key': 'properties.maxDtu', 'type': 'float'}, - 'max_size_in_gb': {'key': 'properties.maxSizeInGB', 'type': 'float'}, - 'service_level_objective_usage_metrics': {'key': 'properties.serviceLevelObjectiveUsageMetrics', 'type': '[SloUsageMetric]'}, - 'current_service_level_objective': {'key': 'properties.currentServiceLevelObjective', 'type': 'str'}, - 'current_service_level_objective_id': {'key': 'properties.currentServiceLevelObjectiveId', 'type': 'str'}, - 'usage_based_recommendation_service_level_objective': {'key': 'properties.usageBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'usage_based_recommendation_service_level_objective_id': {'key': 'properties.usageBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'database_size_based_recommendation_service_level_objective': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'database_size_based_recommendation_service_level_objective_id': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'disaster_plan_based_recommendation_service_level_objective': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'disaster_plan_based_recommendation_service_level_objective_id': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'overall_recommendation_service_level_objective': {'key': 'properties.overallRecommendationServiceLevelObjective', 'type': 'str'}, - 'overall_recommendation_service_level_objective_id': {'key': 'properties.overallRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'confidence': {'key': 'properties.confidence', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ServiceTierAdvisor, self).__init__(**kwargs) - self.observation_period_start = None - self.observation_period_end = None - self.active_time_ratio = None - self.min_dtu = None - self.avg_dtu = None - self.max_dtu = None - self.max_size_in_gb = None - self.service_level_objective_usage_metrics = None - self.current_service_level_objective = None - self.current_service_level_objective_id = None - self.usage_based_recommendation_service_level_objective = None - self.usage_based_recommendation_service_level_objective_id = None - self.database_size_based_recommendation_service_level_objective = None - self.database_size_based_recommendation_service_level_objective_id = None - self.disaster_plan_based_recommendation_service_level_objective = None - self.disaster_plan_based_recommendation_service_level_objective_id = None - self.overall_recommendation_service_level_objective = None - self.overall_recommendation_service_level_objective_id = None - self.confidence = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_paged.py deleted file mode 100644 index 8275906eb639..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServiceTierAdvisorPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServiceTierAdvisor ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServiceTierAdvisor]'} - } - - def __init__(self, *args, **kwargs): - - super(ServiceTierAdvisorPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_py3.py deleted file mode 100644 index 04f5dceca1c0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_py3.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class ServiceTierAdvisor(ProxyResource): - """Represents a Service Tier Advisor. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar observation_period_start: The observation period start (ISO8601 - format). - :vartype observation_period_start: datetime - :ivar observation_period_end: The observation period start (ISO8601 - format). - :vartype observation_period_end: datetime - :ivar active_time_ratio: The activeTimeRatio for service tier advisor. - :vartype active_time_ratio: float - :ivar min_dtu: Gets or sets minDtu for service tier advisor. - :vartype min_dtu: float - :ivar avg_dtu: Gets or sets avgDtu for service tier advisor. - :vartype avg_dtu: float - :ivar max_dtu: Gets or sets maxDtu for service tier advisor. - :vartype max_dtu: float - :ivar max_size_in_gb: Gets or sets maxSizeInGB for service tier advisor. - :vartype max_size_in_gb: float - :ivar service_level_objective_usage_metrics: Gets or sets - serviceLevelObjectiveUsageMetrics for the service tier advisor. - :vartype service_level_objective_usage_metrics: - list[~azure.mgmt.sql.models.SloUsageMetric] - :ivar current_service_level_objective: Gets or sets - currentServiceLevelObjective for service tier advisor. - :vartype current_service_level_objective: str - :ivar current_service_level_objective_id: Gets or sets - currentServiceLevelObjectiveId for service tier advisor. - :vartype current_service_level_objective_id: str - :ivar usage_based_recommendation_service_level_objective: Gets or sets - usageBasedRecommendationServiceLevelObjective for service tier advisor. - :vartype usage_based_recommendation_service_level_objective: str - :ivar usage_based_recommendation_service_level_objective_id: Gets or sets - usageBasedRecommendationServiceLevelObjectiveId for service tier advisor. - :vartype usage_based_recommendation_service_level_objective_id: str - :ivar database_size_based_recommendation_service_level_objective: Gets or - sets databaseSizeBasedRecommendationServiceLevelObjective for service tier - advisor. - :vartype database_size_based_recommendation_service_level_objective: str - :ivar database_size_based_recommendation_service_level_objective_id: Gets - or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service - tier advisor. - :vartype database_size_based_recommendation_service_level_objective_id: - str - :ivar disaster_plan_based_recommendation_service_level_objective: Gets or - sets disasterPlanBasedRecommendationServiceLevelObjective for service tier - advisor. - :vartype disaster_plan_based_recommendation_service_level_objective: str - :ivar disaster_plan_based_recommendation_service_level_objective_id: Gets - or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service - tier advisor. - :vartype disaster_plan_based_recommendation_service_level_objective_id: - str - :ivar overall_recommendation_service_level_objective: Gets or sets - overallRecommendationServiceLevelObjective for service tier advisor. - :vartype overall_recommendation_service_level_objective: str - :ivar overall_recommendation_service_level_objective_id: Gets or sets - overallRecommendationServiceLevelObjectiveId for service tier advisor. - :vartype overall_recommendation_service_level_objective_id: str - :ivar confidence: Gets or sets confidence for service tier advisor. - :vartype confidence: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'observation_period_start': {'readonly': True}, - 'observation_period_end': {'readonly': True}, - 'active_time_ratio': {'readonly': True}, - 'min_dtu': {'readonly': True}, - 'avg_dtu': {'readonly': True}, - 'max_dtu': {'readonly': True}, - 'max_size_in_gb': {'readonly': True}, - 'service_level_objective_usage_metrics': {'readonly': True}, - 'current_service_level_objective': {'readonly': True}, - 'current_service_level_objective_id': {'readonly': True}, - 'usage_based_recommendation_service_level_objective': {'readonly': True}, - 'usage_based_recommendation_service_level_objective_id': {'readonly': True}, - 'database_size_based_recommendation_service_level_objective': {'readonly': True}, - 'database_size_based_recommendation_service_level_objective_id': {'readonly': True}, - 'disaster_plan_based_recommendation_service_level_objective': {'readonly': True}, - 'disaster_plan_based_recommendation_service_level_objective_id': {'readonly': True}, - 'overall_recommendation_service_level_objective': {'readonly': True}, - 'overall_recommendation_service_level_objective_id': {'readonly': True}, - 'confidence': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'observation_period_start': {'key': 'properties.observationPeriodStart', 'type': 'iso-8601'}, - 'observation_period_end': {'key': 'properties.observationPeriodEnd', 'type': 'iso-8601'}, - 'active_time_ratio': {'key': 'properties.activeTimeRatio', 'type': 'float'}, - 'min_dtu': {'key': 'properties.minDtu', 'type': 'float'}, - 'avg_dtu': {'key': 'properties.avgDtu', 'type': 'float'}, - 'max_dtu': {'key': 'properties.maxDtu', 'type': 'float'}, - 'max_size_in_gb': {'key': 'properties.maxSizeInGB', 'type': 'float'}, - 'service_level_objective_usage_metrics': {'key': 'properties.serviceLevelObjectiveUsageMetrics', 'type': '[SloUsageMetric]'}, - 'current_service_level_objective': {'key': 'properties.currentServiceLevelObjective', 'type': 'str'}, - 'current_service_level_objective_id': {'key': 'properties.currentServiceLevelObjectiveId', 'type': 'str'}, - 'usage_based_recommendation_service_level_objective': {'key': 'properties.usageBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'usage_based_recommendation_service_level_objective_id': {'key': 'properties.usageBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'database_size_based_recommendation_service_level_objective': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'database_size_based_recommendation_service_level_objective_id': {'key': 'properties.databaseSizeBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'disaster_plan_based_recommendation_service_level_objective': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjective', 'type': 'str'}, - 'disaster_plan_based_recommendation_service_level_objective_id': {'key': 'properties.disasterPlanBasedRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'overall_recommendation_service_level_objective': {'key': 'properties.overallRecommendationServiceLevelObjective', 'type': 'str'}, - 'overall_recommendation_service_level_objective_id': {'key': 'properties.overallRecommendationServiceLevelObjectiveId', 'type': 'str'}, - 'confidence': {'key': 'properties.confidence', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(ServiceTierAdvisor, self).__init__(**kwargs) - self.observation_period_start = None - self.observation_period_end = None - self.active_time_ratio = None - self.min_dtu = None - self.avg_dtu = None - self.max_dtu = None - self.max_size_in_gb = None - self.service_level_objective_usage_metrics = None - self.current_service_level_objective = None - self.current_service_level_objective_id = None - self.usage_based_recommendation_service_level_objective = None - self.usage_based_recommendation_service_level_objective_id = None - self.database_size_based_recommendation_service_level_objective = None - self.database_size_based_recommendation_service_level_objective_id = None - self.disaster_plan_based_recommendation_service_level_objective = None - self.disaster_plan_based_recommendation_service_level_objective_id = None - self.overall_recommendation_service_level_objective = None - self.overall_recommendation_service_level_objective_id = None - self.confidence = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku.py deleted file mode 100644 index e37091dc4e2f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """The resource model definition representing SKU. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU. Ex - P3. It is typically a - letter+number code - :type name: str - :param tier: This field is required to be implemented by the Resource - Provider if the service has more than one tier, but is not required on a - PUT. - :type tier: str - :param size: The SKU size. When the name field is the combination of tier - and some other value, this would be the standalone code. - :type size: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :param capacity: If the SKU supports scale out/in then the capacity - integer should be included. If scale out/in is not possible for the - resource this may be omitted. - :type capacity: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.size = kwargs.get('size', None) - self.family = kwargs.get('family', None) - self.capacity = kwargs.get('capacity', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku_py3.py deleted file mode 100644 index a6f04765e87c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sku_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """The resource model definition representing SKU. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU. Ex - P3. It is typically a - letter+number code - :type name: str - :param tier: This field is required to be implemented by the Resource - Provider if the service has more than one tier, but is not required on a - PUT. - :type tier: str - :param size: The SKU size. When the name field is the combination of tier - and some other value, this would be the standalone code. - :type size: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :param capacity: If the SKU supports scale out/in then the capacity - integer should be included. If scale out/in is not possible for the - resource this may be omitted. - :type capacity: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__(self, *, name: str, tier: str=None, size: str=None, family: str=None, capacity: int=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.size = size - self.family = family - self.capacity = capacity diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric.py deleted file mode 100644 index 262017a0b87c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SloUsageMetric(Model): - """A Slo Usage Metric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar service_level_objective: The serviceLevelObjective for SLO usage - metric. Possible values include: 'System', 'System0', 'System1', - 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', - 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', - 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', - 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', - 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', - 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', - 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', - 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - :vartype service_level_objective: str or - ~azure.mgmt.sql.models.ServiceObjectiveName - :ivar service_level_objective_id: The serviceLevelObjectiveId for SLO - usage metric. - :vartype service_level_objective_id: str - :ivar in_range_time_ratio: Gets or sets inRangeTimeRatio for SLO usage - metric. - :vartype in_range_time_ratio: float - """ - - _validation = { - 'service_level_objective': {'readonly': True}, - 'service_level_objective_id': {'readonly': True}, - 'in_range_time_ratio': {'readonly': True}, - } - - _attribute_map = { - 'service_level_objective': {'key': 'serviceLevelObjective', 'type': 'str'}, - 'service_level_objective_id': {'key': 'serviceLevelObjectiveId', 'type': 'str'}, - 'in_range_time_ratio': {'key': 'inRangeTimeRatio', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(SloUsageMetric, self).__init__(**kwargs) - self.service_level_objective = None - self.service_level_objective_id = None - self.in_range_time_ratio = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric_py3.py deleted file mode 100644 index 6b221a8eb36f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SloUsageMetric(Model): - """A Slo Usage Metric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar service_level_objective: The serviceLevelObjective for SLO usage - metric. Possible values include: 'System', 'System0', 'System1', - 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', - 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', - 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', - 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', - 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', - 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', - 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', - 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - :vartype service_level_objective: str or - ~azure.mgmt.sql.models.ServiceObjectiveName - :ivar service_level_objective_id: The serviceLevelObjectiveId for SLO - usage metric. - :vartype service_level_objective_id: str - :ivar in_range_time_ratio: Gets or sets inRangeTimeRatio for SLO usage - metric. - :vartype in_range_time_ratio: float - """ - - _validation = { - 'service_level_objective': {'readonly': True}, - 'service_level_objective_id': {'readonly': True}, - 'in_range_time_ratio': {'readonly': True}, - } - - _attribute_map = { - 'service_level_objective': {'key': 'serviceLevelObjective', 'type': 'str'}, - 'service_level_objective_id': {'key': 'serviceLevelObjectiveId', 'type': 'str'}, - 'in_range_time_ratio': {'key': 'inRangeTimeRatio', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(SloUsageMetric, self).__init__(**kwargs) - self.service_level_objective = None - self.service_level_objective_id = None - self.in_range_time_ratio = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage.py deleted file mode 100644 index 5fe0b0fe90a0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SubscriptionUsage(ProxyResource): - """Usage Metric of a Subscription in a Location. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar display_name: User-readable name of the metric. - :vartype display_name: str - :ivar current_value: Current value of the metric. - :vartype current_value: float - :ivar limit: Boundary value of the metric. - :vartype limit: float - :ivar unit: Unit of the metric. - :vartype unit: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'current_value': {'key': 'properties.currentValue', 'type': 'float'}, - 'limit': {'key': 'properties.limit', 'type': 'float'}, - 'unit': {'key': 'properties.unit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubscriptionUsage, self).__init__(**kwargs) - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_paged.py deleted file mode 100644 index 14875f12bfe6..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SubscriptionUsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`SubscriptionUsage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SubscriptionUsage]'} - } - - def __init__(self, *args, **kwargs): - - super(SubscriptionUsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_py3.py deleted file mode 100644 index d55e3275a74b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SubscriptionUsage(ProxyResource): - """Usage Metric of a Subscription in a Location. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar display_name: User-readable name of the metric. - :vartype display_name: str - :ivar current_value: Current value of the metric. - :vartype current_value: float - :ivar limit: Boundary value of the metric. - :vartype limit: float - :ivar unit: Unit of the metric. - :vartype unit: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'current_value': {'key': 'properties.currentValue', 'type': 'float'}, - 'limit': {'key': 'properties.limit', 'type': 'float'}, - 'unit': {'key': 'properties.unit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubscriptionUsage, self).__init__(**kwargs) - self.display_name = None - self.current_value = None - self.limit = None - self.unit = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent.py deleted file mode 100644 index c617de5bdf26..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SyncAgent(ProxyResource): - """An Azure SQL Database sync agent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar sync_agent_name: Name of the sync agent. - :vartype sync_agent_name: str - :param sync_database_id: ARM resource id of the sync database in the sync - agent. - :type sync_database_id: str - :ivar last_alive_time: Last alive time of the sync agent. - :vartype last_alive_time: datetime - :ivar state: State of the sync agent. Possible values include: 'Online', - 'Offline', 'NeverConnected' - :vartype state: str or ~azure.mgmt.sql.models.SyncAgentState - :ivar is_up_to_date: If the sync agent version is up to date. - :vartype is_up_to_date: bool - :ivar expiry_time: Expiration time of the sync agent version. - :vartype expiry_time: datetime - :ivar version: Version of the sync agent. - :vartype version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sync_agent_name': {'readonly': True}, - 'last_alive_time': {'readonly': True}, - 'state': {'readonly': True}, - 'is_up_to_date': {'readonly': True}, - 'expiry_time': {'readonly': True}, - 'version': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'sync_agent_name': {'key': 'properties.name', 'type': 'str'}, - 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, - 'last_alive_time': {'key': 'properties.lastAliveTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'is_up_to_date': {'key': 'properties.isUpToDate', 'type': 'bool'}, - 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncAgent, self).__init__(**kwargs) - self.sync_agent_name = None - self.sync_database_id = kwargs.get('sync_database_id', None) - self.last_alive_time = None - self.state = None - self.is_up_to_date = None - self.expiry_time = None - self.version = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties.py deleted file mode 100644 index da65194bc61a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncAgentKeyProperties(Model): - """Properties of an Azure SQL Database sync agent key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar sync_agent_key: Key of sync agent. - :vartype sync_agent_key: str - """ - - _validation = { - 'sync_agent_key': {'readonly': True}, - } - - _attribute_map = { - 'sync_agent_key': {'key': 'syncAgentKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncAgentKeyProperties, self).__init__(**kwargs) - self.sync_agent_key = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties_py3.py deleted file mode 100644 index 4230f4d95712..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncAgentKeyProperties(Model): - """Properties of an Azure SQL Database sync agent key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar sync_agent_key: Key of sync agent. - :vartype sync_agent_key: str - """ - - _validation = { - 'sync_agent_key': {'readonly': True}, - } - - _attribute_map = { - 'sync_agent_key': {'key': 'syncAgentKey', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncAgentKeyProperties, self).__init__(**kwargs) - self.sync_agent_key = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database.py deleted file mode 100644 index 597c51388f47..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SyncAgentLinkedDatabase(ProxyResource): - """An Azure SQL Database sync agent linked database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_type: Type of the sync agent linked database. Possible - values include: 'AzureSqlDatabase', 'SqlServerDatabase' - :vartype database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType - :ivar database_id: Id of the sync agent linked database. - :vartype database_id: str - :ivar description: Description of the sync agent linked database. - :vartype description: str - :ivar server_name: Server name of the sync agent linked database. - :vartype server_name: str - :ivar database_name: Database name of the sync agent linked database. - :vartype database_name: str - :ivar user_name: User name of the sync agent linked database. - :vartype user_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_type': {'readonly': True}, - 'database_id': {'readonly': True}, - 'description': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - 'user_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncAgentLinkedDatabase, self).__init__(**kwargs) - self.database_type = None - self.database_id = None - self.description = None - self.server_name = None - self.database_name = None - self.user_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_paged.py deleted file mode 100644 index 6c0fad6ae749..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncAgentLinkedDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncAgentLinkedDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncAgentLinkedDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncAgentLinkedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_py3.py deleted file mode 100644 index 7d92287e1a37..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SyncAgentLinkedDatabase(ProxyResource): - """An Azure SQL Database sync agent linked database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar database_type: Type of the sync agent linked database. Possible - values include: 'AzureSqlDatabase', 'SqlServerDatabase' - :vartype database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType - :ivar database_id: Id of the sync agent linked database. - :vartype database_id: str - :ivar description: Description of the sync agent linked database. - :vartype description: str - :ivar server_name: Server name of the sync agent linked database. - :vartype server_name: str - :ivar database_name: Database name of the sync agent linked database. - :vartype database_name: str - :ivar user_name: User name of the sync agent linked database. - :vartype user_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'database_type': {'readonly': True}, - 'database_id': {'readonly': True}, - 'description': {'readonly': True}, - 'server_name': {'readonly': True}, - 'database_name': {'readonly': True}, - 'user_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, - 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncAgentLinkedDatabase, self).__init__(**kwargs) - self.database_type = None - self.database_id = None - self.description = None - self.server_name = None - self.database_name = None - self.user_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_paged.py deleted file mode 100644 index 116fc542dbbd..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncAgentPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncAgent ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncAgent]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncAgentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_py3.py deleted file mode 100644 index f07649750457..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SyncAgent(ProxyResource): - """An Azure SQL Database sync agent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar sync_agent_name: Name of the sync agent. - :vartype sync_agent_name: str - :param sync_database_id: ARM resource id of the sync database in the sync - agent. - :type sync_database_id: str - :ivar last_alive_time: Last alive time of the sync agent. - :vartype last_alive_time: datetime - :ivar state: State of the sync agent. Possible values include: 'Online', - 'Offline', 'NeverConnected' - :vartype state: str or ~azure.mgmt.sql.models.SyncAgentState - :ivar is_up_to_date: If the sync agent version is up to date. - :vartype is_up_to_date: bool - :ivar expiry_time: Expiration time of the sync agent version. - :vartype expiry_time: datetime - :ivar version: Version of the sync agent. - :vartype version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sync_agent_name': {'readonly': True}, - 'last_alive_time': {'readonly': True}, - 'state': {'readonly': True}, - 'is_up_to_date': {'readonly': True}, - 'expiry_time': {'readonly': True}, - 'version': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'sync_agent_name': {'key': 'properties.name', 'type': 'str'}, - 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, - 'last_alive_time': {'key': 'properties.lastAliveTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'is_up_to_date': {'key': 'properties.isUpToDate', 'type': 'bool'}, - 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - } - - def __init__(self, *, sync_database_id: str=None, **kwargs) -> None: - super(SyncAgent, self).__init__(**kwargs) - self.sync_agent_name = None - self.sync_database_id = sync_database_id - self.last_alive_time = None - self.state = None - self.is_up_to_date = None - self.expiry_time = None - self.version = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties.py deleted file mode 100644 index 6dd5a323fd61..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncDatabaseIdProperties(Model): - """Properties of the sync database id. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: ARM resource id of sync database. - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncDatabaseIdProperties, self).__init__(**kwargs) - self.id = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_paged.py deleted file mode 100644 index 2f70734f930a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncDatabaseIdPropertiesPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncDatabaseIdProperties ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncDatabaseIdProperties]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncDatabaseIdPropertiesPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_py3.py deleted file mode 100644 index cdb7ce89c435..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncDatabaseIdProperties(Model): - """Properties of the sync database id. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: ARM resource id of sync database. - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncDatabaseIdProperties, self).__init__(**kwargs) - self.id = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties.py deleted file mode 100644 index 984d4c7a5d56..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaProperties(Model): - """Properties of the database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar tables: List of tables in the database full schema. - :vartype tables: list[~azure.mgmt.sql.models.SyncFullSchemaTable] - :ivar last_update_time: Last update time of the database schema. - :vartype last_update_time: datetime - """ - - _validation = { - 'tables': {'readonly': True}, - 'last_update_time': {'readonly': True}, - } - - _attribute_map = { - 'tables': {'key': 'tables', 'type': '[SyncFullSchemaTable]'}, - 'last_update_time': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(SyncFullSchemaProperties, self).__init__(**kwargs) - self.tables = None - self.last_update_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_paged.py deleted file mode 100644 index 20c3b2df16d4..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncFullSchemaPropertiesPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncFullSchemaProperties ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncFullSchemaProperties]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncFullSchemaPropertiesPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_py3.py deleted file mode 100644 index b3d4a75c65bf..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaProperties(Model): - """Properties of the database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar tables: List of tables in the database full schema. - :vartype tables: list[~azure.mgmt.sql.models.SyncFullSchemaTable] - :ivar last_update_time: Last update time of the database schema. - :vartype last_update_time: datetime - """ - - _validation = { - 'tables': {'readonly': True}, - 'last_update_time': {'readonly': True}, - } - - _attribute_map = { - 'tables': {'key': 'tables', 'type': '[SyncFullSchemaTable]'}, - 'last_update_time': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncFullSchemaProperties, self).__init__(**kwargs) - self.tables = None - self.last_update_time = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table.py deleted file mode 100644 index dcec31c48f1c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaTable(Model): - """Properties of the table in the database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar columns: List of columns in the table of database full schema. - :vartype columns: list[~azure.mgmt.sql.models.SyncFullSchemaTableColumn] - :ivar error_id: Error id of the table. - :vartype error_id: str - :ivar has_error: If there is error in the table. - :vartype has_error: bool - :ivar name: Name of the table. - :vartype name: str - :ivar quoted_name: Quoted name of the table. - :vartype quoted_name: str - """ - - _validation = { - 'columns': {'readonly': True}, - 'error_id': {'readonly': True}, - 'has_error': {'readonly': True}, - 'name': {'readonly': True}, - 'quoted_name': {'readonly': True}, - } - - _attribute_map = { - 'columns': {'key': 'columns', 'type': '[SyncFullSchemaTableColumn]'}, - 'error_id': {'key': 'errorId', 'type': 'str'}, - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncFullSchemaTable, self).__init__(**kwargs) - self.columns = None - self.error_id = None - self.has_error = None - self.name = None - self.quoted_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column.py deleted file mode 100644 index 8eaa3659873b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaTableColumn(Model): - """Properties of the column in the table of database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar data_size: Data size of the column. - :vartype data_size: str - :ivar data_type: Data type of the column. - :vartype data_type: str - :ivar error_id: Error id of the column. - :vartype error_id: str - :ivar has_error: If there is error in the table. - :vartype has_error: bool - :ivar is_primary_key: If it is the primary key of the table. - :vartype is_primary_key: bool - :ivar name: Name of the column. - :vartype name: str - :ivar quoted_name: Quoted name of the column. - :vartype quoted_name: str - """ - - _validation = { - 'data_size': {'readonly': True}, - 'data_type': {'readonly': True}, - 'error_id': {'readonly': True}, - 'has_error': {'readonly': True}, - 'is_primary_key': {'readonly': True}, - 'name': {'readonly': True}, - 'quoted_name': {'readonly': True}, - } - - _attribute_map = { - 'data_size': {'key': 'dataSize', 'type': 'str'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'error_id': {'key': 'errorId', 'type': 'str'}, - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'is_primary_key': {'key': 'isPrimaryKey', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncFullSchemaTableColumn, self).__init__(**kwargs) - self.data_size = None - self.data_type = None - self.error_id = None - self.has_error = None - self.is_primary_key = None - self.name = None - self.quoted_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column_py3.py deleted file mode 100644 index 33df54b37b59..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaTableColumn(Model): - """Properties of the column in the table of database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar data_size: Data size of the column. - :vartype data_size: str - :ivar data_type: Data type of the column. - :vartype data_type: str - :ivar error_id: Error id of the column. - :vartype error_id: str - :ivar has_error: If there is error in the table. - :vartype has_error: bool - :ivar is_primary_key: If it is the primary key of the table. - :vartype is_primary_key: bool - :ivar name: Name of the column. - :vartype name: str - :ivar quoted_name: Quoted name of the column. - :vartype quoted_name: str - """ - - _validation = { - 'data_size': {'readonly': True}, - 'data_type': {'readonly': True}, - 'error_id': {'readonly': True}, - 'has_error': {'readonly': True}, - 'is_primary_key': {'readonly': True}, - 'name': {'readonly': True}, - 'quoted_name': {'readonly': True}, - } - - _attribute_map = { - 'data_size': {'key': 'dataSize', 'type': 'str'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'error_id': {'key': 'errorId', 'type': 'str'}, - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'is_primary_key': {'key': 'isPrimaryKey', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncFullSchemaTableColumn, self).__init__(**kwargs) - self.data_size = None - self.data_type = None - self.error_id = None - self.has_error = None - self.is_primary_key = None - self.name = None - self.quoted_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_py3.py deleted file mode 100644 index 194f50826875..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncFullSchemaTable(Model): - """Properties of the table in the database full schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar columns: List of columns in the table of database full schema. - :vartype columns: list[~azure.mgmt.sql.models.SyncFullSchemaTableColumn] - :ivar error_id: Error id of the table. - :vartype error_id: str - :ivar has_error: If there is error in the table. - :vartype has_error: bool - :ivar name: Name of the table. - :vartype name: str - :ivar quoted_name: Quoted name of the table. - :vartype quoted_name: str - """ - - _validation = { - 'columns': {'readonly': True}, - 'error_id': {'readonly': True}, - 'has_error': {'readonly': True}, - 'name': {'readonly': True}, - 'quoted_name': {'readonly': True}, - } - - _attribute_map = { - 'columns': {'key': 'columns', 'type': '[SyncFullSchemaTableColumn]'}, - 'error_id': {'key': 'errorId', 'type': 'str'}, - 'has_error': {'key': 'hasError', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncFullSchemaTable, self).__init__(**kwargs) - self.columns = None - self.error_id = None - self.has_error = None - self.name = None - self.quoted_name = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group.py deleted file mode 100644 index 5a252358a340..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SyncGroup(ProxyResource): - """An Azure SQL Database sync group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param interval: Sync interval of the sync group. - :type interval: int - :ivar last_sync_time: Last sync time of the sync group. - :vartype last_sync_time: datetime - :param conflict_resolution_policy: Conflict resolution policy of the sync - group. Possible values include: 'HubWin', 'MemberWin' - :type conflict_resolution_policy: str or - ~azure.mgmt.sql.models.SyncConflictResolutionPolicy - :param sync_database_id: ARM resource id of the sync database in the sync - group. - :type sync_database_id: str - :param hub_database_user_name: User name for the sync group hub database - credential. - :type hub_database_user_name: str - :param hub_database_password: Password for the sync group hub database - credential. - :type hub_database_password: str - :ivar sync_state: Sync state of the sync group. Possible values include: - 'NotReady', 'Error', 'Warning', 'Progressing', 'Good' - :vartype sync_state: str or ~azure.mgmt.sql.models.SyncGroupState - :param schema: Sync schema of the sync group. - :type schema: ~azure.mgmt.sql.models.SyncGroupSchema - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'last_sync_time': {'readonly': True}, - 'sync_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'interval': {'key': 'properties.interval', 'type': 'int'}, - 'last_sync_time': {'key': 'properties.lastSyncTime', 'type': 'iso-8601'}, - 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'str'}, - 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, - 'hub_database_user_name': {'key': 'properties.hubDatabaseUserName', 'type': 'str'}, - 'hub_database_password': {'key': 'properties.hubDatabasePassword', 'type': 'str'}, - 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, - 'schema': {'key': 'properties.schema', 'type': 'SyncGroupSchema'}, - } - - def __init__(self, **kwargs): - super(SyncGroup, self).__init__(**kwargs) - self.interval = kwargs.get('interval', None) - self.last_sync_time = None - self.conflict_resolution_policy = kwargs.get('conflict_resolution_policy', None) - self.sync_database_id = kwargs.get('sync_database_id', None) - self.hub_database_user_name = kwargs.get('hub_database_user_name', None) - self.hub_database_password = kwargs.get('hub_database_password', None) - self.sync_state = None - self.schema = kwargs.get('schema', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties.py deleted file mode 100644 index 22cb584b67be..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupLogProperties(Model): - """Properties of an Azure SQL Database sync group log. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar timestamp: Timestamp of the sync group log. - :vartype timestamp: datetime - :ivar type: Type of the sync group log. Possible values include: 'All', - 'Error', 'Warning', 'Success' - :vartype type: str or ~azure.mgmt.sql.models.SyncGroupLogType - :ivar source: Source of the sync group log. - :vartype source: str - :ivar details: Details of the sync group log. - :vartype details: str - :ivar tracing_id: TracingId of the sync group log. - :vartype tracing_id: str - :ivar operation_status: OperationStatus of the sync group log. - :vartype operation_status: str - """ - - _validation = { - 'timestamp': {'readonly': True}, - 'type': {'readonly': True}, - 'source': {'readonly': True}, - 'details': {'readonly': True}, - 'tracing_id': {'readonly': True}, - 'operation_status': {'readonly': True}, - } - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'str'}, - 'tracing_id': {'key': 'tracingId', 'type': 'str'}, - 'operation_status': {'key': 'operationStatus', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncGroupLogProperties, self).__init__(**kwargs) - self.timestamp = None - self.type = None - self.source = None - self.details = None - self.tracing_id = None - self.operation_status = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_paged.py deleted file mode 100644 index bc7e0c3e7750..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncGroupLogPropertiesPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncGroupLogProperties ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncGroupLogProperties]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncGroupLogPropertiesPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_py3.py deleted file mode 100644 index 067424b40232..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupLogProperties(Model): - """Properties of an Azure SQL Database sync group log. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar timestamp: Timestamp of the sync group log. - :vartype timestamp: datetime - :ivar type: Type of the sync group log. Possible values include: 'All', - 'Error', 'Warning', 'Success' - :vartype type: str or ~azure.mgmt.sql.models.SyncGroupLogType - :ivar source: Source of the sync group log. - :vartype source: str - :ivar details: Details of the sync group log. - :vartype details: str - :ivar tracing_id: TracingId of the sync group log. - :vartype tracing_id: str - :ivar operation_status: OperationStatus of the sync group log. - :vartype operation_status: str - """ - - _validation = { - 'timestamp': {'readonly': True}, - 'type': {'readonly': True}, - 'source': {'readonly': True}, - 'details': {'readonly': True}, - 'tracing_id': {'readonly': True}, - 'operation_status': {'readonly': True}, - } - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'str'}, - 'tracing_id': {'key': 'tracingId', 'type': 'str'}, - 'operation_status': {'key': 'operationStatus', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SyncGroupLogProperties, self).__init__(**kwargs) - self.timestamp = None - self.type = None - self.source = None - self.details = None - self.tracing_id = None - self.operation_status = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_paged.py deleted file mode 100644 index b20ca4d8e098..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncGroupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_py3.py deleted file mode 100644 index 1654af79245f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_py3.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SyncGroup(ProxyResource): - """An Azure SQL Database sync group. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param interval: Sync interval of the sync group. - :type interval: int - :ivar last_sync_time: Last sync time of the sync group. - :vartype last_sync_time: datetime - :param conflict_resolution_policy: Conflict resolution policy of the sync - group. Possible values include: 'HubWin', 'MemberWin' - :type conflict_resolution_policy: str or - ~azure.mgmt.sql.models.SyncConflictResolutionPolicy - :param sync_database_id: ARM resource id of the sync database in the sync - group. - :type sync_database_id: str - :param hub_database_user_name: User name for the sync group hub database - credential. - :type hub_database_user_name: str - :param hub_database_password: Password for the sync group hub database - credential. - :type hub_database_password: str - :ivar sync_state: Sync state of the sync group. Possible values include: - 'NotReady', 'Error', 'Warning', 'Progressing', 'Good' - :vartype sync_state: str or ~azure.mgmt.sql.models.SyncGroupState - :param schema: Sync schema of the sync group. - :type schema: ~azure.mgmt.sql.models.SyncGroupSchema - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'last_sync_time': {'readonly': True}, - 'sync_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'interval': {'key': 'properties.interval', 'type': 'int'}, - 'last_sync_time': {'key': 'properties.lastSyncTime', 'type': 'iso-8601'}, - 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'str'}, - 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, - 'hub_database_user_name': {'key': 'properties.hubDatabaseUserName', 'type': 'str'}, - 'hub_database_password': {'key': 'properties.hubDatabasePassword', 'type': 'str'}, - 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, - 'schema': {'key': 'properties.schema', 'type': 'SyncGroupSchema'}, - } - - def __init__(self, *, interval: int=None, conflict_resolution_policy=None, sync_database_id: str=None, hub_database_user_name: str=None, hub_database_password: str=None, schema=None, **kwargs) -> None: - super(SyncGroup, self).__init__(**kwargs) - self.interval = interval - self.last_sync_time = None - self.conflict_resolution_policy = conflict_resolution_policy - self.sync_database_id = sync_database_id - self.hub_database_user_name = hub_database_user_name - self.hub_database_password = hub_database_password - self.sync_state = None - self.schema = schema diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema.py deleted file mode 100644 index ece05d7301d0..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchema(Model): - """Properties of sync group schema. - - :param tables: List of tables in sync group schema. - :type tables: list[~azure.mgmt.sql.models.SyncGroupSchemaTable] - :param master_sync_member_name: Name of master sync member where the - schema is from. - :type master_sync_member_name: str - """ - - _attribute_map = { - 'tables': {'key': 'tables', 'type': '[SyncGroupSchemaTable]'}, - 'master_sync_member_name': {'key': 'masterSyncMemberName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncGroupSchema, self).__init__(**kwargs) - self.tables = kwargs.get('tables', None) - self.master_sync_member_name = kwargs.get('master_sync_member_name', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_py3.py deleted file mode 100644 index b26d4b1b791c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchema(Model): - """Properties of sync group schema. - - :param tables: List of tables in sync group schema. - :type tables: list[~azure.mgmt.sql.models.SyncGroupSchemaTable] - :param master_sync_member_name: Name of master sync member where the - schema is from. - :type master_sync_member_name: str - """ - - _attribute_map = { - 'tables': {'key': 'tables', 'type': '[SyncGroupSchemaTable]'}, - 'master_sync_member_name': {'key': 'masterSyncMemberName', 'type': 'str'}, - } - - def __init__(self, *, tables=None, master_sync_member_name: str=None, **kwargs) -> None: - super(SyncGroupSchema, self).__init__(**kwargs) - self.tables = tables - self.master_sync_member_name = master_sync_member_name diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table.py deleted file mode 100644 index cf83bba5825d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchemaTable(Model): - """Properties of table in sync group schema. - - :param columns: List of columns in sync group schema. - :type columns: list[~azure.mgmt.sql.models.SyncGroupSchemaTableColumn] - :param quoted_name: Quoted name of sync group schema table. - :type quoted_name: str - """ - - _attribute_map = { - 'columns': {'key': 'columns', 'type': '[SyncGroupSchemaTableColumn]'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncGroupSchemaTable, self).__init__(**kwargs) - self.columns = kwargs.get('columns', None) - self.quoted_name = kwargs.get('quoted_name', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column.py deleted file mode 100644 index 705810d1d2a3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchemaTableColumn(Model): - """Properties of column in sync group table. - - :param quoted_name: Quoted name of sync group table column. - :type quoted_name: str - :param data_size: Data size of the column. - :type data_size: str - :param data_type: Data type of the column. - :type data_type: str - """ - - _attribute_map = { - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - 'data_size': {'key': 'dataSize', 'type': 'str'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncGroupSchemaTableColumn, self).__init__(**kwargs) - self.quoted_name = kwargs.get('quoted_name', None) - self.data_size = kwargs.get('data_size', None) - self.data_type = kwargs.get('data_type', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column_py3.py deleted file mode 100644 index bb8cce2d8c34..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchemaTableColumn(Model): - """Properties of column in sync group table. - - :param quoted_name: Quoted name of sync group table column. - :type quoted_name: str - :param data_size: Data size of the column. - :type data_size: str - :param data_type: Data type of the column. - :type data_type: str - """ - - _attribute_map = { - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - 'data_size': {'key': 'dataSize', 'type': 'str'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - } - - def __init__(self, *, quoted_name: str=None, data_size: str=None, data_type: str=None, **kwargs) -> None: - super(SyncGroupSchemaTableColumn, self).__init__(**kwargs) - self.quoted_name = quoted_name - self.data_size = data_size - self.data_type = data_type diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_py3.py deleted file mode 100644 index ecbbd26a576d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SyncGroupSchemaTable(Model): - """Properties of table in sync group schema. - - :param columns: List of columns in sync group schema. - :type columns: list[~azure.mgmt.sql.models.SyncGroupSchemaTableColumn] - :param quoted_name: Quoted name of sync group schema table. - :type quoted_name: str - """ - - _attribute_map = { - 'columns': {'key': 'columns', 'type': '[SyncGroupSchemaTableColumn]'}, - 'quoted_name': {'key': 'quotedName', 'type': 'str'}, - } - - def __init__(self, *, columns=None, quoted_name: str=None, **kwargs) -> None: - super(SyncGroupSchemaTable, self).__init__(**kwargs) - self.columns = columns - self.quoted_name = quoted_name diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member.py deleted file mode 100644 index 1474c6320dc1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class SyncMember(ProxyResource): - """An Azure SQL Database sync member. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param database_type: Database type of the sync member. Possible values - include: 'AzureSqlDatabase', 'SqlServerDatabase' - :type database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType - :param sync_agent_id: ARM resource id of the sync agent in the sync - member. - :type sync_agent_id: str - :param sql_server_database_id: SQL Server database id of the sync member. - :type sql_server_database_id: str - :param server_name: Server name of the member database in the sync member - :type server_name: str - :param database_name: Database name of the member database in the sync - member. - :type database_name: str - :param user_name: User name of the member database in the sync member. - :type user_name: str - :param password: Password of the member database in the sync member. - :type password: str - :param sync_direction: Sync direction of the sync member. Possible values - include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember' - :type sync_direction: str or ~azure.mgmt.sql.models.SyncDirection - :ivar sync_state: Sync state of the sync member. Possible values include: - 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', - 'DisabledTombstoneCleanup', 'DisabledBackupRestore', - 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', - 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', - 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', - 'ReprovisionFailed', 'UnReprovisioned' - :vartype sync_state: str or ~azure.mgmt.sql.models.SyncMemberState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sync_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, - 'sync_agent_id': {'key': 'properties.syncAgentId', 'type': 'str'}, - 'sql_server_database_id': {'key': 'properties.sqlServerDatabaseId', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'sync_direction': {'key': 'properties.syncDirection', 'type': 'str'}, - 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SyncMember, self).__init__(**kwargs) - self.database_type = kwargs.get('database_type', None) - self.sync_agent_id = kwargs.get('sync_agent_id', None) - self.sql_server_database_id = kwargs.get('sql_server_database_id', None) - self.server_name = kwargs.get('server_name', None) - self.database_name = kwargs.get('database_name', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.sync_direction = kwargs.get('sync_direction', None) - self.sync_state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_paged.py deleted file mode 100644 index 68bddeeeec1b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SyncMemberPaged(Paged): - """ - A paging container for iterating over a list of :class:`SyncMember ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SyncMember]'} - } - - def __init__(self, *args, **kwargs): - - super(SyncMemberPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_py3.py deleted file mode 100644 index 50cf8fe2d65c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_py3.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class SyncMember(ProxyResource): - """An Azure SQL Database sync member. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param database_type: Database type of the sync member. Possible values - include: 'AzureSqlDatabase', 'SqlServerDatabase' - :type database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType - :param sync_agent_id: ARM resource id of the sync agent in the sync - member. - :type sync_agent_id: str - :param sql_server_database_id: SQL Server database id of the sync member. - :type sql_server_database_id: str - :param server_name: Server name of the member database in the sync member - :type server_name: str - :param database_name: Database name of the member database in the sync - member. - :type database_name: str - :param user_name: User name of the member database in the sync member. - :type user_name: str - :param password: Password of the member database in the sync member. - :type password: str - :param sync_direction: Sync direction of the sync member. Possible values - include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember' - :type sync_direction: str or ~azure.mgmt.sql.models.SyncDirection - :ivar sync_state: Sync state of the sync member. Possible values include: - 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', - 'DisabledTombstoneCleanup', 'DisabledBackupRestore', - 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', - 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', - 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', - 'ReprovisionFailed', 'UnReprovisioned' - :vartype sync_state: str or ~azure.mgmt.sql.models.SyncMemberState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sync_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, - 'sync_agent_id': {'key': 'properties.syncAgentId', 'type': 'str'}, - 'sql_server_database_id': {'key': 'properties.sqlServerDatabaseId', 'type': 'str'}, - 'server_name': {'key': 'properties.serverName', 'type': 'str'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'sync_direction': {'key': 'properties.syncDirection', 'type': 'str'}, - 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, - } - - def __init__(self, *, database_type=None, sync_agent_id: str=None, sql_server_database_id: str=None, server_name: str=None, database_name: str=None, user_name: str=None, password: str=None, sync_direction=None, **kwargs) -> None: - super(SyncMember, self).__init__(**kwargs) - self.database_type = database_type - self.sync_agent_id = sync_agent_id - self.sql_server_database_id = sql_server_database_id - self.server_name = server_name - self.database_name = database_name - self.user_name = user_name - self.password = password - self.sync_direction = sync_direction - self.sync_state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate.py deleted file mode 100644 index 1171ee8adf94..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class TdeCertificate(ProxyResource): - """A TDE certificate that can be uploaded into a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param private_blob: Required. The base64 encoded certificate private - blob. - :type private_blob: str - :param cert_password: The certificate password. - :type cert_password: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'private_blob': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'private_blob': {'key': 'properties.privateBlob', 'type': 'str'}, - 'cert_password': {'key': 'properties.certPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TdeCertificate, self).__init__(**kwargs) - self.private_blob = kwargs.get('private_blob', None) - self.cert_password = kwargs.get('cert_password', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate_py3.py deleted file mode 100644 index b4e54453cae1..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tde_certificate_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class TdeCertificate(ProxyResource): - """A TDE certificate that can be uploaded into a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param private_blob: Required. The base64 encoded certificate private - blob. - :type private_blob: str - :param cert_password: The certificate password. - :type cert_password: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'private_blob': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'private_blob': {'key': 'properties.privateBlob', 'type': 'str'}, - 'cert_password': {'key': 'properties.certPassword', 'type': 'str'}, - } - - def __init__(self, *, private_blob: str, cert_password: str=None, **kwargs) -> None: - super(TdeCertificate, self).__init__(**kwargs) - self.private_blob = private_blob - self.cert_password = cert_password diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource.py deleted file mode 100644 index dc99e096cf18..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class TrackedResource(Resource): - """ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TrackedResource, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource_py3.py deleted file mode 100644 index 5edf04ac0a73..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class TrackedResource(Resource): - """ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(TrackedResource, self).__init__(**kwargs) - self.location = location - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption.py deleted file mode 100644 index 4270fa860c1d..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class TransparentDataEncryption(ProxyResource): - """Represents a database transparent data encryption configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :param status: The status of the database transparent data encryption. - Possible values include: 'Enabled', 'Disabled' - :type status: str or - ~azure.mgmt.sql.models.TransparentDataEncryptionStatus - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'TransparentDataEncryptionStatus'}, - } - - def __init__(self, **kwargs): - super(TransparentDataEncryption, self).__init__(**kwargs) - self.location = None - self.status = kwargs.get('status', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity.py deleted file mode 100644 index 60e9505eba4c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class TransparentDataEncryptionActivity(ProxyResource): - """Represents a database transparent data encryption Scan. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar status: The status of the database. Possible values include: - 'Encrypting', 'Decrypting' - :vartype status: str or - ~azure.mgmt.sql.models.TransparentDataEncryptionActivityStatus - :ivar percent_complete: The percent complete of the transparent data - encryption scan for a database. - :vartype percent_complete: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, - 'percent_complete': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(TransparentDataEncryptionActivity, self).__init__(**kwargs) - self.location = None - self.status = None - self.percent_complete = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_paged.py deleted file mode 100644 index b86dce24923c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class TransparentDataEncryptionActivityPaged(Paged): - """ - A paging container for iterating over a list of :class:`TransparentDataEncryptionActivity ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TransparentDataEncryptionActivity]'} - } - - def __init__(self, *args, **kwargs): - - super(TransparentDataEncryptionActivityPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_py3.py deleted file mode 100644 index 9bf146137c20..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class TransparentDataEncryptionActivity(ProxyResource): - """Represents a database transparent data encryption Scan. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar status: The status of the database. Possible values include: - 'Encrypting', 'Decrypting' - :vartype status: str or - ~azure.mgmt.sql.models.TransparentDataEncryptionActivityStatus - :ivar percent_complete: The percent complete of the transparent data - encryption scan for a database. - :vartype percent_complete: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, - 'percent_complete': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(TransparentDataEncryptionActivity, self).__init__(**kwargs) - self.location = None - self.status = None - self.percent_complete = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_py3.py deleted file mode 100644 index db2b2096f798..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class TransparentDataEncryption(ProxyResource): - """Represents a database transparent data encryption configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :param status: The status of the database transparent data encryption. - Possible values include: 'Enabled', 'Disabled' - :type status: str or - ~azure.mgmt.sql.models.TransparentDataEncryptionStatus - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'TransparentDataEncryptionStatus'}, - } - - def __init__(self, *, status=None, **kwargs) -> None: - super(TransparentDataEncryption, self).__init__(**kwargs) - self.location = None - self.status = status diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster.py deleted file mode 100644 index a3c9dd04abca..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class VirtualCluster(TrackedResource): - """An Azure SQL virtual cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :ivar subnet_id: Subnet resource ID for the virtual cluster. - :vartype subnet_id: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :ivar child_resources: List of resources in this virtual cluster. - :vartype child_resources: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'subnet_id': {'readonly': True}, - 'child_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'family': {'key': 'properties.family', 'type': 'str'}, - 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VirtualCluster, self).__init__(**kwargs) - self.subnet_id = None - self.family = kwargs.get('family', None) - self.child_resources = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_paged.py deleted file mode 100644 index 865bbd5e9f86..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualClusterPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_py3.py deleted file mode 100644 index e11fb730e2be..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class VirtualCluster(TrackedResource): - """An Azure SQL virtual cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :ivar subnet_id: Subnet resource ID for the virtual cluster. - :vartype subnet_id: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :ivar child_resources: List of resources in this virtual cluster. - :vartype child_resources: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'subnet_id': {'readonly': True}, - 'child_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'family': {'key': 'properties.family', 'type': 'str'}, - 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, - } - - def __init__(self, *, location: str, tags=None, family: str=None, **kwargs) -> None: - super(VirtualCluster, self).__init__(location=location, tags=tags, **kwargs) - self.subnet_id = None - self.family = family - self.child_resources = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update.py deleted file mode 100644 index c6604df3568a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualClusterUpdate(Model): - """An update request for an Azure SQL Database virtual cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar subnet_id: Subnet resource ID for the virtual cluster. - :vartype subnet_id: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :ivar child_resources: List of resources in this virtual cluster. - :vartype child_resources: list[str] - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'subnet_id': {'readonly': True}, - 'child_resources': {'readonly': True}, - } - - _attribute_map = { - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'family': {'key': 'properties.family', 'type': 'str'}, - 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(VirtualClusterUpdate, self).__init__(**kwargs) - self.subnet_id = None - self.family = kwargs.get('family', None) - self.child_resources = None - self.tags = kwargs.get('tags', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update_py3.py deleted file mode 100644 index ec26101b089a..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualClusterUpdate(Model): - """An update request for an Azure SQL Database virtual cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar subnet_id: Subnet resource ID for the virtual cluster. - :vartype subnet_id: str - :param family: If the service has different generations of hardware, for - the same SKU, then that can be captured here. - :type family: str - :ivar child_resources: List of resources in this virtual cluster. - :vartype child_resources: list[str] - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'subnet_id': {'readonly': True}, - 'child_resources': {'readonly': True}, - } - - _attribute_map = { - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'family': {'key': 'properties.family', 'type': 'str'}, - 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, family: str=None, tags=None, **kwargs) -> None: - super(VirtualClusterUpdate, self).__init__(**kwargs) - self.subnet_id = None - self.family = family - self.child_resources = None - self.tags = tags diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule.py deleted file mode 100644 index 0960e4289c66..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class VirtualNetworkRule(ProxyResource): - """A virtual network rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param virtual_network_subnet_id: Required. The ARM resource id of the - virtual network subnet. - :type virtual_network_subnet_id: str - :param ignore_missing_vnet_service_endpoint: Create firewall rule before - the virtual network has vnet service endpoint enabled. - :type ignore_missing_vnet_service_endpoint: bool - :ivar state: Virtual Network Rule State. Possible values include: - 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' - :vartype state: str or ~azure.mgmt.sql.models.VirtualNetworkRuleState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_subnet_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, - 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualNetworkRule, self).__init__(**kwargs) - self.virtual_network_subnet_id = kwargs.get('virtual_network_subnet_id', None) - self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_paged.py deleted file mode 100644 index 1cc23039a558..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VirtualNetworkRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualNetworkRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualNetworkRule]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualNetworkRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_py3.py deleted file mode 100644 index 19e6bd30ff5e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class VirtualNetworkRule(ProxyResource): - """A virtual network rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param virtual_network_subnet_id: Required. The ARM resource id of the - virtual network subnet. - :type virtual_network_subnet_id: str - :param ignore_missing_vnet_service_endpoint: Create firewall rule before - the virtual network has vnet service endpoint enabled. - :type ignore_missing_vnet_service_endpoint: bool - :ivar state: Virtual Network Rule State. Possible values include: - 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' - :vartype state: str or ~azure.mgmt.sql.models.VirtualNetworkRuleState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_subnet_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, - 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, *, virtual_network_subnet_id: str, ignore_missing_vnet_service_endpoint: bool=None, **kwargs) -> None: - super(VirtualNetworkRule, self).__init__(**kwargs) - self.virtual_network_subnet_id = virtual_network_subnet_id - self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint - self.state = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties.py deleted file mode 100644 index e7d424543f2b..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VulnerabilityAssessmentRecurringScansProperties(Model): - """Properties of a Vulnerability Assessment recurring scans. - - :param is_enabled: Recurring scans state. - :type is_enabled: bool - :param email_subscription_admins: Specifies that the schedule scan - notification will be is sent to the subscription administrators. Default - value: True . - :type email_subscription_admins: bool - :param emails: Specifies an array of e-mail addresses to which the scan - notification is sent. - :type emails: list[str] - """ - - _attribute_map = { - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'}, - 'emails': {'key': 'emails', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs) - self.is_enabled = kwargs.get('is_enabled', None) - self.email_subscription_admins = kwargs.get('email_subscription_admins', True) - self.emails = kwargs.get('emails', None) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py deleted file mode 100644 index 3a55afaa0a5e..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VulnerabilityAssessmentRecurringScansProperties(Model): - """Properties of a Vulnerability Assessment recurring scans. - - :param is_enabled: Recurring scans state. - :type is_enabled: bool - :param email_subscription_admins: Specifies that the schedule scan - notification will be is sent to the subscription administrators. Default - value: True . - :type email_subscription_admins: bool - :param emails: Specifies an array of e-mail addresses to which the scan - notification is sent. - :type emails: list[str] - """ - - _attribute_map = { - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'}, - 'emails': {'key': 'emails', 'type': '[str]'}, - } - - def __init__(self, *, is_enabled: bool=None, email_subscription_admins: bool=True, emails=None, **kwargs) -> None: - super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs) - self.is_enabled = is_enabled - self.email_subscription_admins = email_subscription_admins - self.emails = emails diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error.py deleted file mode 100644 index 1d465691ba60..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VulnerabilityAssessmentScanError(Model): - """Properties of a vulnerability assessment scan error. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VulnerabilityAssessmentScanError, self).__init__(**kwargs) - self.code = None - self.message = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error_py3.py deleted file mode 100644 index 93c13998eb25..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VulnerabilityAssessmentScanError(Model): - """Properties of a vulnerability assessment scan error. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(VulnerabilityAssessmentScanError, self).__init__(**kwargs) - self.code = None - self.message = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record.py deleted file mode 100644 index 67a6d163f90c..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class VulnerabilityAssessmentScanRecord(ProxyResource): - """A vulnerability assessment scan record. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar scan_id: The scan ID. - :vartype scan_id: str - :ivar trigger_type: The scan trigger type. Possible values include: - 'OnDemand', 'Recurring' - :vartype trigger_type: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentScanTriggerType - :ivar state: The scan status. Possible values include: 'Passed', 'Failed', - 'FailedToRun', 'InProgress' - :vartype state: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentScanState - :ivar start_time: The scan start time (UTC). - :vartype start_time: datetime - :ivar end_time: The scan end time (UTC). - :vartype end_time: datetime - :ivar errors: The scan errors. - :vartype errors: - list[~azure.mgmt.sql.models.VulnerabilityAssessmentScanError] - :ivar storage_container_path: The scan results storage container path. - :vartype storage_container_path: str - :ivar number_of_failed_security_checks: The number of failed security - checks. - :vartype number_of_failed_security_checks: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'scan_id': {'readonly': True}, - 'trigger_type': {'readonly': True}, - 'state': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'errors': {'readonly': True}, - 'storage_container_path': {'readonly': True}, - 'number_of_failed_security_checks': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'scan_id': {'key': 'properties.scanId', 'type': 'str'}, - 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'errors': {'key': 'properties.errors', 'type': '[VulnerabilityAssessmentScanError]'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'number_of_failed_security_checks': {'key': 'properties.numberOfFailedSecurityChecks', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(VulnerabilityAssessmentScanRecord, self).__init__(**kwargs) - self.scan_id = None - self.trigger_type = None - self.state = None - self.start_time = None - self.end_time = None - self.errors = None - self.storage_container_path = None - self.number_of_failed_security_checks = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_paged.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_paged.py deleted file mode 100644 index 7076acc9290f..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VulnerabilityAssessmentScanRecordPaged(Paged): - """ - A paging container for iterating over a list of :class:`VulnerabilityAssessmentScanRecord ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VulnerabilityAssessmentScanRecord]'} - } - - def __init__(self, *args, **kwargs): - - super(VulnerabilityAssessmentScanRecordPaged, self).__init__(*args, **kwargs) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_py3.py deleted file mode 100644 index e31d141065af..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class VulnerabilityAssessmentScanRecord(ProxyResource): - """A vulnerability assessment scan record. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar scan_id: The scan ID. - :vartype scan_id: str - :ivar trigger_type: The scan trigger type. Possible values include: - 'OnDemand', 'Recurring' - :vartype trigger_type: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentScanTriggerType - :ivar state: The scan status. Possible values include: 'Passed', 'Failed', - 'FailedToRun', 'InProgress' - :vartype state: str or - ~azure.mgmt.sql.models.VulnerabilityAssessmentScanState - :ivar start_time: The scan start time (UTC). - :vartype start_time: datetime - :ivar end_time: The scan end time (UTC). - :vartype end_time: datetime - :ivar errors: The scan errors. - :vartype errors: - list[~azure.mgmt.sql.models.VulnerabilityAssessmentScanError] - :ivar storage_container_path: The scan results storage container path. - :vartype storage_container_path: str - :ivar number_of_failed_security_checks: The number of failed security - checks. - :vartype number_of_failed_security_checks: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'scan_id': {'readonly': True}, - 'trigger_type': {'readonly': True}, - 'state': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'errors': {'readonly': True}, - 'storage_container_path': {'readonly': True}, - 'number_of_failed_security_checks': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'scan_id': {'key': 'properties.scanId', 'type': 'str'}, - 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'errors': {'key': 'properties.errors', 'type': '[VulnerabilityAssessmentScanError]'}, - 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, - 'number_of_failed_security_checks': {'key': 'properties.numberOfFailedSecurityChecks', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(VulnerabilityAssessmentScanRecord, self).__init__(**kwargs) - self.scan_id = None - self.trigger_type = None - self.state = None - self.start_time = None - self.end_time = None - self.errors = None - self.storage_container_path = None - self.number_of_failed_security_checks = None diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py index 3db410ac9cd7..57aa89c2fe9a 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py @@ -9,86 +9,88 @@ # regenerated. # -------------------------------------------------------------------------- -from .recoverable_databases_operations import RecoverableDatabasesOperations -from .restorable_dropped_databases_operations import RestorableDroppedDatabasesOperations -from .servers_operations import ServersOperations -from .server_connection_policies_operations import ServerConnectionPoliciesOperations -from .database_threat_detection_policies_operations import DatabaseThreatDetectionPoliciesOperations -from .data_masking_policies_operations import DataMaskingPoliciesOperations -from .data_masking_rules_operations import DataMaskingRulesOperations -from .firewall_rules_operations import FirewallRulesOperations -from .geo_backup_policies_operations import GeoBackupPoliciesOperations -from .databases_operations import DatabasesOperations -from .elastic_pools_operations import ElasticPoolsOperations -from .recommended_elastic_pools_operations import RecommendedElasticPoolsOperations -from .replication_links_operations import ReplicationLinksOperations -from .server_azure_ad_administrators_operations import ServerAzureADAdministratorsOperations -from .server_communication_links_operations import ServerCommunicationLinksOperations -from .service_objectives_operations import ServiceObjectivesOperations -from .elastic_pool_activities_operations import ElasticPoolActivitiesOperations -from .elastic_pool_database_activities_operations import ElasticPoolDatabaseActivitiesOperations -from .service_tier_advisors_operations import ServiceTierAdvisorsOperations -from .transparent_data_encryptions_operations import TransparentDataEncryptionsOperations -from .transparent_data_encryption_activities_operations import TransparentDataEncryptionActivitiesOperations -from .server_usages_operations import ServerUsagesOperations -from .database_usages_operations import DatabaseUsagesOperations -from .database_automatic_tuning_operations import DatabaseAutomaticTuningOperations -from .encryption_protectors_operations import EncryptionProtectorsOperations -from .failover_groups_operations import FailoverGroupsOperations -from .managed_instances_operations import ManagedInstancesOperations -from .operations import Operations -from .server_keys_operations import ServerKeysOperations -from .sync_agents_operations import SyncAgentsOperations -from .sync_groups_operations import SyncGroupsOperations -from .sync_members_operations import SyncMembersOperations -from .subscription_usages_operations import SubscriptionUsagesOperations -from .virtual_clusters_operations import VirtualClustersOperations -from .virtual_network_rules_operations import VirtualNetworkRulesOperations -from .extended_database_blob_auditing_policies_operations import ExtendedDatabaseBlobAuditingPoliciesOperations -from .extended_server_blob_auditing_policies_operations import ExtendedServerBlobAuditingPoliciesOperations -from .server_blob_auditing_policies_operations import ServerBlobAuditingPoliciesOperations -from .database_blob_auditing_policies_operations import DatabaseBlobAuditingPoliciesOperations -from .database_vulnerability_assessment_rule_baselines_operations import DatabaseVulnerabilityAssessmentRuleBaselinesOperations -from .database_vulnerability_assessments_operations import DatabaseVulnerabilityAssessmentsOperations -from .job_agents_operations import JobAgentsOperations -from .job_credentials_operations import JobCredentialsOperations -from .job_executions_operations import JobExecutionsOperations -from .jobs_operations import JobsOperations -from .job_step_executions_operations import JobStepExecutionsOperations -from .job_steps_operations import JobStepsOperations -from .job_target_executions_operations import JobTargetExecutionsOperations -from .job_target_groups_operations import JobTargetGroupsOperations -from .job_versions_operations import JobVersionsOperations -from .long_term_retention_backups_operations import LongTermRetentionBackupsOperations -from .backup_long_term_retention_policies_operations import BackupLongTermRetentionPoliciesOperations -from .managed_backup_short_term_retention_policies_operations import ManagedBackupShortTermRetentionPoliciesOperations -from .managed_databases_operations import ManagedDatabasesOperations -from .managed_restorable_dropped_database_backup_short_term_retention_policies_operations import ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations -from .server_automatic_tuning_operations import ServerAutomaticTuningOperations -from .server_dns_aliases_operations import ServerDnsAliasesOperations -from .server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations -from .restorable_dropped_managed_databases_operations import RestorableDroppedManagedDatabasesOperations -from .restore_points_operations import RestorePointsOperations -from .managed_database_security_alert_policies_operations import ManagedDatabaseSecurityAlertPoliciesOperations -from .managed_server_security_alert_policies_operations import ManagedServerSecurityAlertPoliciesOperations -from .sensitivity_labels_operations import SensitivityLabelsOperations -from .database_operations import DatabaseOperations -from .elastic_pool_operations import ElasticPoolOperations -from .capabilities_operations import CapabilitiesOperations -from .database_vulnerability_assessment_scans_operations import DatabaseVulnerabilityAssessmentScansOperations -from .managed_database_vulnerability_assessment_rule_baselines_operations import ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations -from .managed_database_vulnerability_assessment_scans_operations import ManagedDatabaseVulnerabilityAssessmentScansOperations -from .managed_database_vulnerability_assessments_operations import ManagedDatabaseVulnerabilityAssessmentsOperations -from .instance_failover_groups_operations import InstanceFailoverGroupsOperations -from .backup_short_term_retention_policies_operations import BackupShortTermRetentionPoliciesOperations -from .tde_certificates_operations import TdeCertificatesOperations -from .managed_instance_tde_certificates_operations import ManagedInstanceTdeCertificatesOperations -from .managed_instance_keys_operations import ManagedInstanceKeysOperations -from .managed_instance_encryption_protectors_operations import ManagedInstanceEncryptionProtectorsOperations -from .recoverable_managed_databases_operations import RecoverableManagedDatabasesOperations -from .managed_instance_vulnerability_assessments_operations import ManagedInstanceVulnerabilityAssessmentsOperations -from .server_vulnerability_assessments_operations import ServerVulnerabilityAssessmentsOperations -from .managed_database_sensitivity_labels_operations import ManagedDatabaseSensitivityLabelsOperations +from ._recoverable_databases_operations import RecoverableDatabasesOperations +from ._restorable_dropped_databases_operations import RestorableDroppedDatabasesOperations +from ._servers_operations import ServersOperations +from ._server_connection_policies_operations import ServerConnectionPoliciesOperations +from ._database_threat_detection_policies_operations import DatabaseThreatDetectionPoliciesOperations +from ._data_masking_policies_operations import DataMaskingPoliciesOperations +from ._data_masking_rules_operations import DataMaskingRulesOperations +from ._firewall_rules_operations import FirewallRulesOperations +from ._geo_backup_policies_operations import GeoBackupPoliciesOperations +from ._databases_operations import DatabasesOperations +from ._elastic_pools_operations import ElasticPoolsOperations +from ._recommended_elastic_pools_operations import RecommendedElasticPoolsOperations +from ._replication_links_operations import ReplicationLinksOperations +from ._server_azure_ad_administrators_operations import ServerAzureADAdministratorsOperations +from ._server_communication_links_operations import ServerCommunicationLinksOperations +from ._service_objectives_operations import ServiceObjectivesOperations +from ._elastic_pool_activities_operations import ElasticPoolActivitiesOperations +from ._elastic_pool_database_activities_operations import ElasticPoolDatabaseActivitiesOperations +from ._service_tier_advisors_operations import ServiceTierAdvisorsOperations +from ._transparent_data_encryptions_operations import TransparentDataEncryptionsOperations +from ._transparent_data_encryption_activities_operations import TransparentDataEncryptionActivitiesOperations +from ._server_usages_operations import ServerUsagesOperations +from ._database_usages_operations import DatabaseUsagesOperations +from ._database_automatic_tuning_operations import DatabaseAutomaticTuningOperations +from ._encryption_protectors_operations import EncryptionProtectorsOperations +from ._failover_groups_operations import FailoverGroupsOperations +from ._operations import Operations +from ._server_keys_operations import ServerKeysOperations +from ._sync_agents_operations import SyncAgentsOperations +from ._sync_groups_operations import SyncGroupsOperations +from ._sync_members_operations import SyncMembersOperations +from ._subscription_usages_operations import SubscriptionUsagesOperations +from ._virtual_clusters_operations import VirtualClustersOperations +from ._virtual_network_rules_operations import VirtualNetworkRulesOperations +from ._extended_database_blob_auditing_policies_operations import ExtendedDatabaseBlobAuditingPoliciesOperations +from ._extended_server_blob_auditing_policies_operations import ExtendedServerBlobAuditingPoliciesOperations +from ._server_blob_auditing_policies_operations import ServerBlobAuditingPoliciesOperations +from ._database_blob_auditing_policies_operations import DatabaseBlobAuditingPoliciesOperations +from ._database_vulnerability_assessment_rule_baselines_operations import DatabaseVulnerabilityAssessmentRuleBaselinesOperations +from ._database_vulnerability_assessments_operations import DatabaseVulnerabilityAssessmentsOperations +from ._job_agents_operations import JobAgentsOperations +from ._job_credentials_operations import JobCredentialsOperations +from ._job_executions_operations import JobExecutionsOperations +from ._jobs_operations import JobsOperations +from ._job_step_executions_operations import JobStepExecutionsOperations +from ._job_steps_operations import JobStepsOperations +from ._job_target_executions_operations import JobTargetExecutionsOperations +from ._job_target_groups_operations import JobTargetGroupsOperations +from ._job_versions_operations import JobVersionsOperations +from ._long_term_retention_backups_operations import LongTermRetentionBackupsOperations +from ._backup_long_term_retention_policies_operations import BackupLongTermRetentionPoliciesOperations +from ._managed_backup_short_term_retention_policies_operations import ManagedBackupShortTermRetentionPoliciesOperations +from ._managed_databases_operations import ManagedDatabasesOperations +from ._managed_restorable_dropped_database_backup_short_term_retention_policies_operations import ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations +from ._server_automatic_tuning_operations import ServerAutomaticTuningOperations +from ._server_dns_aliases_operations import ServerDnsAliasesOperations +from ._server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations +from ._restorable_dropped_managed_databases_operations import RestorableDroppedManagedDatabasesOperations +from ._restore_points_operations import RestorePointsOperations +from ._managed_database_security_alert_policies_operations import ManagedDatabaseSecurityAlertPoliciesOperations +from ._managed_server_security_alert_policies_operations import ManagedServerSecurityAlertPoliciesOperations +from ._sensitivity_labels_operations import SensitivityLabelsOperations +from ._database_operations import DatabaseOperations +from ._elastic_pool_operations import ElasticPoolOperations +from ._capabilities_operations import CapabilitiesOperations +from ._database_vulnerability_assessment_scans_operations import DatabaseVulnerabilityAssessmentScansOperations +from ._managed_database_vulnerability_assessment_rule_baselines_operations import ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations +from ._managed_database_vulnerability_assessment_scans_operations import ManagedDatabaseVulnerabilityAssessmentScansOperations +from ._managed_database_vulnerability_assessments_operations import ManagedDatabaseVulnerabilityAssessmentsOperations +from ._instance_failover_groups_operations import InstanceFailoverGroupsOperations +from ._backup_short_term_retention_policies_operations import BackupShortTermRetentionPoliciesOperations +from ._tde_certificates_operations import TdeCertificatesOperations +from ._managed_instance_tde_certificates_operations import ManagedInstanceTdeCertificatesOperations +from ._managed_instance_keys_operations import ManagedInstanceKeysOperations +from ._managed_instance_encryption_protectors_operations import ManagedInstanceEncryptionProtectorsOperations +from ._recoverable_managed_databases_operations import RecoverableManagedDatabasesOperations +from ._managed_instance_vulnerability_assessments_operations import ManagedInstanceVulnerabilityAssessmentsOperations +from ._server_vulnerability_assessments_operations import ServerVulnerabilityAssessmentsOperations +from ._managed_database_sensitivity_labels_operations import ManagedDatabaseSensitivityLabelsOperations +from ._instance_pools_operations import InstancePoolsOperations +from ._usages_operations import UsagesOperations +from ._managed_instances_operations import ManagedInstancesOperations __all__ = [ 'RecoverableDatabasesOperations', @@ -117,7 +119,6 @@ 'DatabaseAutomaticTuningOperations', 'EncryptionProtectorsOperations', 'FailoverGroupsOperations', - 'ManagedInstancesOperations', 'Operations', 'ServerKeysOperations', 'SyncAgentsOperations', @@ -171,4 +172,7 @@ 'ManagedInstanceVulnerabilityAssessmentsOperations', 'ServerVulnerabilityAssessmentsOperations', 'ManagedDatabaseSensitivityLabelsOperations', + 'InstancePoolsOperations', + 'UsagesOperations', + 'ManagedInstancesOperations', ] diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_long_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_long_term_retention_policies_operations.py similarity index 99% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_long_term_retention_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_long_term_retention_policies_operations.py index c42ba1ab812b..532ce23b9aef 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_long_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_long_term_retention_policies_operations.py @@ -21,6 +21,8 @@ class BackupLongTermRetentionPoliciesOperations(object): """BackupLongTermRetentionPoliciesOperations 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. @@ -99,7 +101,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BackupLongTermRetentionPolicy', response) @@ -275,7 +276,6 @@ def list_by_database( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BackupLongTermRetentionPolicy', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_short_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_short_term_retention_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_short_term_retention_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_short_term_retention_policies_operations.py index c7957810c281..1fab2366624f 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/backup_short_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_short_term_retention_policies_operations.py @@ -21,6 +21,8 @@ class BackupShortTermRetentionPoliciesOperations(object): """BackupShortTermRetentionPoliciesOperations 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. @@ -99,7 +101,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('BackupShortTermRetentionPolicy', response) @@ -354,8 +355,7 @@ def list_by_database( ~azure.mgmt.sql.models.BackupShortTermRetentionPolicyPaged[~azure.mgmt.sql.models.BackupShortTermRetentionPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -387,6 +387,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -397,12 +402,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.BackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.BackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.BackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/capabilities_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_capabilities_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/capabilities_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_capabilities_operations.py index a873a3a87f92..755f2dd6c70f 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/capabilities_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_capabilities_operations.py @@ -19,6 +19,8 @@ class CapabilitiesOperations(object): """CapabilitiesOperations 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. @@ -93,7 +95,6 @@ def list_by_location( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LocationCapabilities', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_policies_operations.py index 2d1099c8be0d..3d51678f036d 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_policies_operations.py @@ -19,6 +19,8 @@ class DataMaskingPoliciesOperations(object): """DataMaskingPoliciesOperations 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. @@ -111,7 +113,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DataMaskingPolicy', response) @@ -179,7 +180,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DataMaskingPolicy', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_rules_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_rules_operations.py similarity index 96% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_rules_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_rules_operations.py index c5fd4c63ab46..4430f4d7bc9c 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_rules_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_masking_rules_operations.py @@ -19,6 +19,8 @@ class DataMaskingRulesOperations(object): """DataMaskingRulesOperations 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. @@ -106,7 +108,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DataMaskingRule', response) if response.status_code == 201: @@ -141,8 +142,7 @@ def list_by_database( ~azure.mgmt.sql.models.DataMaskingRulePaged[~azure.mgmt.sql.models.DataMaskingRule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -175,6 +175,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -185,12 +190,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DataMaskingRulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DataMaskingRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DataMaskingRulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_automatic_tuning_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_automatic_tuning_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_automatic_tuning_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_automatic_tuning_operations.py index 7a94b97b9546..30b493d10191 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_automatic_tuning_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_automatic_tuning_operations.py @@ -19,6 +19,8 @@ class DatabaseAutomaticTuningOperations(object): """DatabaseAutomaticTuningOperations 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. @@ -93,7 +95,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseAutomaticTuning', response) @@ -172,7 +173,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseAutomaticTuning', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_blob_auditing_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_blob_auditing_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_blob_auditing_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_blob_auditing_policies_operations.py index a0c09cfd8f09..873e1dc55d36 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_blob_auditing_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_blob_auditing_policies_operations.py @@ -19,6 +19,8 @@ class DatabaseBlobAuditingPoliciesOperations(object): """DatabaseBlobAuditingPoliciesOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseBlobAuditingPolicy', response) @@ -170,7 +171,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseBlobAuditingPolicy', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_operations.py index 8d482411f199..9fdb5969fcff 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_operations.py @@ -19,6 +19,8 @@ class DatabaseOperations(object): """DatabaseOperations 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. @@ -120,8 +122,7 @@ def list_by_database( ~azure.mgmt.sql.models.DatabaseOperationPaged[~azure.mgmt.sql.models.DatabaseOperation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -153,6 +154,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -163,12 +169,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabaseOperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabaseOperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabaseOperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_threat_detection_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_threat_detection_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_threat_detection_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_threat_detection_policies_operations.py index 38501854c428..888228ba55d3 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_threat_detection_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_threat_detection_policies_operations.py @@ -19,6 +19,8 @@ class DatabaseThreatDetectionPoliciesOperations(object): """DatabaseThreatDetectionPoliciesOperations 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. @@ -97,7 +99,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseSecurityAlertPolicy', response) @@ -172,7 +173,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseSecurityAlertPolicy', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_usages_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_usages_operations.py similarity index 92% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_usages_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_usages_operations.py index 543a8ba6f509..8cf8df83a5a8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_usages_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_usages_operations.py @@ -19,6 +19,8 @@ class DatabaseUsagesOperations(object): """DatabaseUsagesOperations 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. @@ -59,8 +61,7 @@ def list_by_database( ~azure.mgmt.sql.models.DatabaseUsagePaged[~azure.mgmt.sql.models.DatabaseUsage] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -92,6 +93,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -102,12 +108,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabaseUsagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabaseUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabaseUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/usages'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_rule_baselines_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_rule_baselines_operations.py similarity index 99% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_rule_baselines_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_rule_baselines_operations.py index 9dba003a5ff2..8e04b1fbc4a1 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_rule_baselines_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_rule_baselines_operations.py @@ -19,6 +19,8 @@ class DatabaseVulnerabilityAssessmentRuleBaselinesOperations(object): """DatabaseVulnerabilityAssessmentRuleBaselinesOperations 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. @@ -109,7 +111,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentRuleBaseline', response) @@ -199,7 +200,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentRuleBaseline', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_scans_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_scans_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_scans_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_scans_operations.py index 97725d782e9e..06efd2638038 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_scans_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_scans_operations.py @@ -21,6 +21,8 @@ class DatabaseVulnerabilityAssessmentScansOperations(object): """DatabaseVulnerabilityAssessmentScansOperations 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. @@ -64,8 +66,7 @@ def list_by_database( ~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecordPaged[~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecord] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -98,6 +99,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -108,12 +114,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans'} @@ -180,7 +184,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VulnerabilityAssessmentScanRecord', response) @@ -345,7 +348,6 @@ def export( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentScansExport', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessments_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessments_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessments_operations.py index 5fa6a1ef7ade..4fbf4f24a995 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessments_operations.py @@ -19,6 +19,8 @@ class DatabaseVulnerabilityAssessmentsOperations(object): """DatabaseVulnerabilityAssessmentsOperations 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. @@ -98,7 +100,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessment', response) @@ -175,7 +176,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessment', response) if response.status_code == 201: @@ -271,8 +271,7 @@ def list_by_database( ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentPaged[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessment] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -304,6 +303,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -314,12 +318,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_databases_operations.py similarity index 92% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_databases_operations.py index 3b4e01e8a397..e3b5174323da 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_databases_operations.py @@ -21,6 +21,8 @@ class DatabasesOperations(object): """DatabasesOperations 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. @@ -390,8 +392,7 @@ def list_metrics( """ api_version = "2014-04-01" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metrics.metadata['url'] @@ -424,6 +425,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -434,12 +440,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metrics'} @@ -468,8 +472,7 @@ def list_metric_definitions( """ api_version = "2014-04-01" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metric_definitions.metadata['url'] @@ -501,6 +504,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -511,12 +519,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metricDefinitions'} @@ -630,8 +636,7 @@ def list_by_server( """ api_version = "2017-10-01-preview" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -662,6 +667,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -672,12 +682,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases'} @@ -740,7 +748,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Database', response) @@ -1080,8 +1087,7 @@ def list_by_elastic_pool( """ api_version = "2017-10-01-preview" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_elastic_pool.metadata['url'] @@ -1113,6 +1119,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -1123,12 +1134,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_elastic_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases'} @@ -1402,3 +1411,90 @@ def rename( client_raw_response = ClientRawResponse(None, response) return client_raw_response rename.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/move'} + + + def _failover_initial( + self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): + api_version = "2018-06-01-preview" + + # Construct URL + url = self.failover.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def failover( + self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Failovers a database. + + :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 server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database to failover. + :type database_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._failover_initial( + resource_group_name=resource_group_name, + server_name=server_name, + database_name=database_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) + failover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/failover'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_activities_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_activities_operations.py similarity index 92% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_activities_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_activities_operations.py index a2d2dc49c203..3fb2cfc9bb14 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_activities_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_activities_operations.py @@ -19,6 +19,8 @@ class ElasticPoolActivitiesOperations(object): """ElasticPoolActivitiesOperations 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. @@ -60,8 +62,7 @@ def list_by_elastic_pool( ~azure.mgmt.sql.models.ElasticPoolActivityPaged[~azure.mgmt.sql.models.ElasticPoolActivity] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_elastic_pool.metadata['url'] @@ -93,6 +94,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -103,12 +109,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ElasticPoolActivityPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ElasticPoolActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ElasticPoolActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_elastic_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolActivity'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_database_activities_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_database_activities_operations.py similarity index 92% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_database_activities_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_database_activities_operations.py index 5ed1492b9615..6280285c5e59 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_database_activities_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_database_activities_operations.py @@ -19,6 +19,8 @@ class ElasticPoolDatabaseActivitiesOperations(object): """ElasticPoolDatabaseActivitiesOperations 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. @@ -59,8 +61,7 @@ def list_by_elastic_pool( ~azure.mgmt.sql.models.ElasticPoolDatabaseActivityPaged[~azure.mgmt.sql.models.ElasticPoolDatabaseActivity] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_elastic_pool.metadata['url'] @@ -92,6 +93,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -102,12 +108,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ElasticPoolDatabaseActivityPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ElasticPoolDatabaseActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ElasticPoolDatabaseActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_elastic_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolDatabaseActivity'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_operations.py index eb71face0db1..26dd59fe4abf 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pool_operations.py @@ -19,6 +19,8 @@ class ElasticPoolOperations(object): """ElasticPoolOperations 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. @@ -120,8 +122,7 @@ def list_by_elastic_pool( ~azure.mgmt.sql.models.ElasticPoolOperationPaged[~azure.mgmt.sql.models.ElasticPoolOperation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_elastic_pool.metadata['url'] @@ -153,6 +154,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -163,12 +169,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ElasticPoolOperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ElasticPoolOperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ElasticPoolOperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_elastic_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/operations'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pools_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pools_operations.py similarity index 85% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pools_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pools_operations.py index e7fba924b0c6..8f780c6995e1 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pools_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_elastic_pools_operations.py @@ -21,6 +21,8 @@ class ElasticPoolsOperations(object): """ElasticPoolsOperations 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. @@ -64,8 +66,7 @@ def list_metrics( """ api_version = "2014-04-01" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metrics.metadata['url'] @@ -98,6 +99,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -108,12 +114,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metrics'} @@ -142,8 +146,7 @@ def list_metric_definitions( """ api_version = "2014-04-01" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metric_definitions.metadata['url'] @@ -175,6 +178,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -185,12 +193,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metricDefinitions'} @@ -219,8 +225,7 @@ def list_by_server( """ api_version = "2017-10-01-preview" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -253,6 +258,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -263,12 +273,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ElasticPoolPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ElasticPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ElasticPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools'} @@ -331,7 +339,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ElasticPool', response) @@ -646,3 +653,90 @@ def get_long_running_output(response): 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.Sql/servers/{serverName}/elasticPools/{elasticPoolName}'} + + + def _failover_initial( + self, resource_group_name, server_name, elastic_pool_name, custom_headers=None, raw=False, **operation_config): + api_version = "2018-06-01-preview" + + # Construct URL + url = self.failover.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'elasticPoolName': self._serialize.url("elastic_pool_name", elastic_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def failover( + self, resource_group_name, server_name, elastic_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Failovers an elastic pool. + + :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 server_name: The name of the server. + :type server_name: str + :param elastic_pool_name: The name of the elastic pool to failover. + :type elastic_pool_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._failover_initial( + resource_group_name=resource_group_name, + server_name=server_name, + elastic_pool_name=elastic_pool_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) + failover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/failover'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/encryption_protectors_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_encryption_protectors_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/encryption_protectors_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_encryption_protectors_operations.py index d19233971f4c..4ee94af811f2 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/encryption_protectors_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_encryption_protectors_operations.py @@ -21,6 +21,8 @@ class EncryptionProtectorsOperations(object): """EncryptionProtectorsOperations 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. @@ -61,8 +63,7 @@ def list_by_server( ~azure.mgmt.sql.models.EncryptionProtectorPaged[~azure.mgmt.sql.models.EncryptionProtector] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -93,6 +94,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -103,12 +109,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.EncryptionProtectorPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.EncryptionProtectorPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.EncryptionProtectorPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector'} @@ -167,7 +171,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('EncryptionProtector', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_database_blob_auditing_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_database_blob_auditing_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_database_blob_auditing_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_database_blob_auditing_policies_operations.py index 38bdfb2a0875..ea9c9d8d7aaf 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_database_blob_auditing_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_database_blob_auditing_policies_operations.py @@ -19,6 +19,8 @@ class ExtendedDatabaseBlobAuditingPoliciesOperations(object): """ExtendedDatabaseBlobAuditingPoliciesOperations 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. @@ -97,7 +99,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ExtendedDatabaseBlobAuditingPolicy', response) @@ -173,7 +174,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ExtendedDatabaseBlobAuditingPolicy', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_server_blob_auditing_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_server_blob_auditing_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_server_blob_auditing_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_server_blob_auditing_policies_operations.py index 64524eb42a17..dff8fac62031 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/extended_server_blob_auditing_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_extended_server_blob_auditing_policies_operations.py @@ -21,6 +21,8 @@ class ExtendedServerBlobAuditingPoliciesOperations(object): """ExtendedServerBlobAuditingPoliciesOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ExtendedServerBlobAuditingPolicy', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/failover_groups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_failover_groups_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/failover_groups_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_failover_groups_operations.py index fb779255c2a8..797c0d27ab17 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/failover_groups_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_failover_groups_operations.py @@ -21,6 +21,8 @@ class FailoverGroupsOperations(object): """FailoverGroupsOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('FailoverGroup', response) @@ -430,8 +431,7 @@ def list_by_server( ~azure.mgmt.sql.models.FailoverGroupPaged[~azure.mgmt.sql.models.FailoverGroup] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -462,6 +462,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -472,12 +477,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.FailoverGroupPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.FailoverGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.FailoverGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/firewall_rules_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_firewall_rules_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/firewall_rules_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_firewall_rules_operations.py index 7f62a3fa0811..e211cff58cbb 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/firewall_rules_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_firewall_rules_operations.py @@ -19,6 +19,8 @@ class FirewallRulesOperations(object): """FirewallRulesOperations 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. @@ -107,7 +109,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('FirewallRule', response) if response.status_code == 201: @@ -234,7 +235,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('FirewallRule', response) @@ -265,8 +265,7 @@ def list_by_server( ~azure.mgmt.sql.models.FirewallRulePaged[~azure.mgmt.sql.models.FirewallRule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -297,6 +296,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -307,12 +311,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.FirewallRulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.FirewallRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.FirewallRulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/geo_backup_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_geo_backup_policies_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/geo_backup_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_geo_backup_policies_operations.py index bd81aeca5fa6..e3b1cc9cd7ec 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/geo_backup_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_geo_backup_policies_operations.py @@ -19,6 +19,8 @@ class GeoBackupPoliciesOperations(object): """GeoBackupPoliciesOperations 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. @@ -105,7 +107,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('GeoBackupPolicy', response) if response.status_code == 201: @@ -175,7 +176,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('GeoBackupPolicy', response) @@ -208,8 +208,7 @@ def list_by_database( ~azure.mgmt.sql.models.GeoBackupPolicyPaged[~azure.mgmt.sql.models.GeoBackupPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -241,6 +240,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -251,12 +255,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.GeoBackupPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.GeoBackupPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.GeoBackupPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/instance_failover_groups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_failover_groups_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/instance_failover_groups_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_failover_groups_operations.py index 795d169692ab..33960af71031 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/instance_failover_groups_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_failover_groups_operations.py @@ -21,6 +21,8 @@ class InstanceFailoverGroupsOperations(object): """InstanceFailoverGroupsOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('InstanceFailoverGroup', response) @@ -323,8 +324,7 @@ def list_by_location( ~azure.mgmt.sql.models.InstanceFailoverGroupPaged[~azure.mgmt.sql.models.InstanceFailoverGroup] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_location.metadata['url'] @@ -355,6 +355,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -365,12 +370,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.InstanceFailoverGroupPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.InstanceFailoverGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.InstanceFailoverGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_pools_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_pools_operations.py new file mode 100644 index 000000000000..43721ed26b1b --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_instance_pools_operations.py @@ -0,0 +1,534 @@ +# 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 InstancePoolsOperations(object): + """InstancePoolsOperations 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: The API version to use for the request. Constant value: "2018-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01-preview" + + self.config = config + + def get( + self, resource_group_name, instance_pool_name, custom_headers=None, raw=False, **operation_config): + """Gets an instance pool. + + :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 instance_pool_name: The name of the instance pool to be + retrieved. + :type instance_pool_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: InstancePool or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.InstancePool or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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('InstancePool', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}'} + + + def _create_or_update_initial( + self, resource_group_name, instance_pool_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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(parameters, 'InstancePool') + + # 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, 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('InstancePool', response) + if response.status_code == 201: + deserialized = self._deserialize('InstancePool', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, instance_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates an instance pool. + + :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 instance_pool_name: The name of the instance pool to be created + or updated. + :type instance_pool_name: str + :param parameters: The requested instance pool resource state. + :type parameters: ~azure.mgmt.sql.models.InstancePool + :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 InstancePool or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.InstancePool] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.InstancePool]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + instance_pool_name=instance_pool_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('InstancePool', 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.Sql/instancePools/{instancePoolName}'} + + + def _delete_initial( + self, resource_group_name, instance_pool_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, instance_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an instance pool. + + :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 instance_pool_name: The name of the instance pool to be deleted + :type instance_pool_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, + instance_pool_name=instance_pool_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.Sql/instancePools/{instancePoolName}'} + + + def _update_initial( + self, resource_group_name, instance_pool_name, tags=None, custom_headers=None, raw=False, **operation_config): + parameters = models.InstancePoolUpdate(tags=tags) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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(parameters, 'InstancePoolUpdate') + + # 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('InstancePool', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, instance_pool_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates an instance pool. + + :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 instance_pool_name: The name of the instance pool to be + updated. + :type instance_pool_name: str + :param tags: Resource tags. + :type tags: dict[str, 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 InstancePool or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.InstancePool] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.InstancePool]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + instance_pool_name=instance_pool_name, + tags=tags, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('InstancePool', 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.Sql/instancePools/{instancePoolName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of instance pools in the resource group. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :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: An iterator like instance of InstancePool + :rtype: + ~azure.mgmt.sql.models.InstancePoolPaged[~azure.mgmt.sql.models.InstancePool] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.InstancePoolPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of all instance pools in the subscription. + + :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: An iterator like instance of InstancePool + :rtype: + ~azure.mgmt.sql.models.InstancePoolPaged[~azure.mgmt.sql.models.InstancePool] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.InstancePoolPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/instancePools'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_agents_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_agents_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_agents_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_agents_operations.py index eaeb4480cab8..a6641946abaf 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_agents_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_agents_operations.py @@ -21,6 +21,8 @@ class JobAgentsOperations(object): """JobAgentsOperations 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. @@ -59,8 +61,7 @@ def list_by_server( ~azure.mgmt.sql.models.JobAgentPaged[~azure.mgmt.sql.models.JobAgent] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -91,6 +92,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -101,12 +107,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobAgentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobAgentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobAgentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents'} @@ -167,7 +171,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobAgent', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_credentials_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_credentials_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_credentials_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_credentials_operations.py index 309d5212b81e..9c469c605600 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_credentials_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_credentials_operations.py @@ -19,6 +19,8 @@ class JobCredentialsOperations(object): """JobCredentialsOperations 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. @@ -59,8 +61,7 @@ def list_by_agent( ~azure.mgmt.sql.models.JobCredentialPaged[~azure.mgmt.sql.models.JobCredential] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_agent.metadata['url'] @@ -92,6 +93,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -102,12 +108,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobCredentialPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobCredentialPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobCredentialPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials'} @@ -171,7 +175,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobCredential', response) @@ -251,7 +254,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobCredential', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_executions_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_executions_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_executions_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_executions_operations.py index f874991f8510..71885bdb661e 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_executions_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_executions_operations.py @@ -21,6 +21,8 @@ class JobExecutionsOperations(object): """JobExecutionsOperations 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. @@ -80,8 +82,7 @@ def list_by_agent( ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_agent.metadata['url'] @@ -127,6 +128,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -137,12 +143,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/executions'} @@ -357,8 +361,7 @@ def list_by_job( ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_job.metadata['url'] @@ -405,6 +408,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -415,12 +423,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions'} @@ -487,7 +493,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobExecution', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_step_executions_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_step_executions_operations.py similarity index 96% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_step_executions_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_step_executions_operations.py index 92c6442fc7e5..8410a94138e8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_step_executions_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_step_executions_operations.py @@ -19,6 +19,8 @@ class JobStepExecutionsOperations(object): """JobStepExecutionsOperations 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. @@ -82,8 +84,7 @@ def list_by_job_execution( ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_job_execution.metadata['url'] @@ -131,6 +132,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -141,12 +147,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_job_execution.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps'} @@ -216,7 +220,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobExecution', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_steps_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_steps_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_steps_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_steps_operations.py index a37bfc3f4474..e7383e961171 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_steps_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_steps_operations.py @@ -19,6 +19,8 @@ class JobStepsOperations(object): """JobStepsOperations 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. @@ -63,8 +65,7 @@ def list_by_version( ~azure.mgmt.sql.models.JobStepPaged[~azure.mgmt.sql.models.JobStep] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_version.metadata['url'] @@ -98,6 +99,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -108,12 +114,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobStepPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobStepPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobStepPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps'} @@ -183,7 +187,6 @@ def get_by_version( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobStep', response) @@ -218,8 +221,7 @@ def list_by_job( ~azure.mgmt.sql.models.JobStepPaged[~azure.mgmt.sql.models.JobStep] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_job.metadata['url'] @@ -252,6 +254,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -262,12 +269,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobStepPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobStepPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobStepPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps'} @@ -334,7 +339,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobStep', response) @@ -414,7 +418,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobStep', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_executions_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_executions_operations.py similarity index 96% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_executions_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_executions_operations.py index 6c664709c063..a6722c0278bc 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_executions_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_executions_operations.py @@ -19,6 +19,8 @@ class JobTargetExecutionsOperations(object): """JobTargetExecutionsOperations 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. @@ -82,8 +84,7 @@ def list_by_job_execution( ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_job_execution.metadata['url'] @@ -131,6 +132,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -141,12 +147,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_job_execution.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/targets'} @@ -198,8 +202,7 @@ def list_by_step( ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_step.metadata['url'] @@ -248,6 +251,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -258,12 +266,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_step.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets'} @@ -336,7 +342,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobExecution', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_groups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_groups_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_groups_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_groups_operations.py index 6a8bf6eed349..a3769c0e2bcb 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_groups_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_target_groups_operations.py @@ -19,6 +19,8 @@ class JobTargetGroupsOperations(object): """JobTargetGroupsOperations 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. @@ -59,8 +61,7 @@ def list_by_agent( ~azure.mgmt.sql.models.JobTargetGroupPaged[~azure.mgmt.sql.models.JobTargetGroup] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_agent.metadata['url'] @@ -92,6 +93,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -102,12 +108,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobTargetGroupPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobTargetGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobTargetGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups'} @@ -171,7 +175,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobTargetGroup', response) @@ -249,7 +252,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobTargetGroup', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_versions_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_versions_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_versions_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_versions_operations.py index d03635534ff4..da92973e0695 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/job_versions_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_job_versions_operations.py @@ -19,6 +19,8 @@ class JobVersionsOperations(object): """JobVersionsOperations 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. @@ -61,8 +63,7 @@ def list_by_job( ~azure.mgmt.sql.models.JobVersionPaged[~azure.mgmt.sql.models.JobVersion] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_job.metadata['url'] @@ -95,6 +96,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -105,12 +111,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobVersionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobVersionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobVersionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions'} @@ -177,7 +181,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobVersion', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/jobs_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_jobs_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/jobs_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_jobs_operations.py index 2545fc1514e5..f0830d089829 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/jobs_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_jobs_operations.py @@ -19,6 +19,8 @@ class JobsOperations(object): """JobsOperations 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. @@ -58,8 +60,7 @@ def list_by_agent( :rtype: ~azure.mgmt.sql.models.JobPaged[~azure.mgmt.sql.models.Job] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_agent.metadata['url'] @@ -91,6 +92,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -101,12 +107,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs'} @@ -170,7 +174,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Job', response) @@ -250,7 +253,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Job', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_backups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_backups_operations.py new file mode 100644 index 000000000000..55a0bbdd777a --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_backups_operations.py @@ -0,0 +1,880 @@ +# 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 LongTermRetentionBackupsOperations(object): + """LongTermRetentionBackupsOperations 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: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-01-preview" + + self.config = config + + def get_by_resource_group( + self, resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): + """Gets a long term retention backup. + + :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 location_name: The location of the database. + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param backup_name: The backup name. + :type backup_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: LongTermRetentionBackup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.LongTermRetentionBackup or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'backupName': self._serialize.url("backup_name", backup_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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('LongTermRetentionBackup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} + + + def _delete_by_resource_group_initial( + self, resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'backupName': self._serialize.url("backup_name", backup_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.delete(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete_by_resource_group( + self, resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a long term retention backup. + + :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 location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param backup_name: The backup name. + :type backup_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_by_resource_group_initial( + resource_group_name=resource_group_name, + location_name=location_name, + long_term_retention_server_name=long_term_retention_server_name, + long_term_retention_database_name=long_term_retention_database_name, + backup_name=backup_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_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} + + def list_by_resource_group_database( + self, resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists all long term retention backups for a database. + + :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 location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group_database.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups'} + + def list_by_resource_group_location( + self, resource_group_name, location_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists the long term retention backups for a given location. + + :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 location_name: The location of the database + :type location_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group_location.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group_location.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups'} + + def list_by_resource_group_server( + self, resource_group_name, location_name, long_term_retention_server_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists the long term retention backups for a given 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 location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group_server.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups'} + + def get( + self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): + """Gets a long term retention backup. + + :param location_name: The location of the database. + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param backup_name: The backup name. + :type backup_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: LongTermRetentionBackup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.LongTermRetentionBackup or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'backupName': self._serialize.url("backup_name", backup_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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('LongTermRetentionBackup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} + + + def _delete_initial( + self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'backupName': self._serialize.url("backup_name", backup_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.delete(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a long term retention backup. + + :param location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param backup_name: The backup name. + :type backup_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( + location_name=location_name, + long_term_retention_server_name=long_term_retention_server_name, + long_term_retention_database_name=long_term_retention_database_name, + backup_name=backup_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}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} + + def list_by_database( + self, location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists all long term retention backups for a database. + + :param location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param long_term_retention_database_name: The name of the database + :type long_term_retention_database_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_database.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups'} + + def list_by_location( + self, location_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists the long term retention backups for a given location. + + :param location_name: The location of the database + :type location_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_location.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups'} + + def list_by_server( + self, location_name, long_term_retention_server_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): + """Lists the long term retention backups for a given server. + + :param location_name: The location of the database + :type location_name: str + :param long_term_retention_server_name: The name of the server + :type long_term_retention_server_name: str + :param only_latest_per_database: Whether or not to only get the latest + backup for each database. + :type only_latest_per_database: bool + :param database_state: Whether to query against just live databases, + just deleted databases, or all databases. Possible values include: + 'All', 'Live', 'Deleted' + :type database_state: str or + ~azure.mgmt.sql.models.LongTermRetentionDatabaseState + :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: An iterator like instance of LongTermRetentionBackup + :rtype: + ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if only_latest_per_database is not None: + query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') + if database_state is not None: + query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_backup_short_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_backup_short_term_retention_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_backup_short_term_retention_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_backup_short_term_retention_policies_operations.py index 8f50f44b5354..475f8b2228e1 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_backup_short_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_backup_short_term_retention_policies_operations.py @@ -21,6 +21,8 @@ class ManagedBackupShortTermRetentionPoliciesOperations(object): """ManagedBackupShortTermRetentionPoliciesOperations 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. @@ -99,7 +101,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedBackupShortTermRetentionPolicy', response) @@ -355,8 +356,7 @@ def list_by_database( ~azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicyPaged[~azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -388,6 +388,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -398,12 +403,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_security_alert_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_security_alert_policies_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_security_alert_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_security_alert_policies_operations.py index 87ba42c8193a..c1f7467d795c 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_security_alert_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_security_alert_policies_operations.py @@ -19,6 +19,8 @@ class ManagedDatabaseSecurityAlertPoliciesOperations(object): """ManagedDatabaseSecurityAlertPoliciesOperations 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. @@ -98,7 +100,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedDatabaseSecurityAlertPolicy', response) @@ -175,7 +176,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedDatabaseSecurityAlertPolicy', response) if response.status_code == 201: @@ -212,8 +212,7 @@ def list_by_database( ~azure.mgmt.sql.models.ManagedDatabaseSecurityAlertPolicyPaged[~azure.mgmt.sql.models.ManagedDatabaseSecurityAlertPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -245,6 +244,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -255,12 +259,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedDatabaseSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedDatabaseSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedDatabaseSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_sensitivity_labels_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_sensitivity_labels_operations.py similarity index 70% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_sensitivity_labels_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_sensitivity_labels_operations.py index 1b03564854f8..5ff97dd77a49 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_sensitivity_labels_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_sensitivity_labels_operations.py @@ -19,12 +19,13 @@ class ManagedDatabaseSensitivityLabelsOperations(object): """ManagedDatabaseSensitivityLabelsOperations 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: The API version to use for the request. Constant value: "2018-06-01-preview". - :ivar sensitivity_label_source: The source of the sensitivity label. Constant value: "current". """ models = models @@ -35,7 +36,6 @@ def __init__(self, client, config, serializer, deserializer): self._serialize = serializer self._deserialize = deserializer self.api_version = "2018-06-01-preview" - self.sensitivity_label_source = "current" self.config = config @@ -109,7 +109,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SensitivityLabel', response) @@ -150,6 +149,8 @@ def create_or_update( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + sensitivity_label_source = "current" + # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { @@ -159,7 +160,7 @@ def create_or_update( 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), 'tableName': self._serialize.url("table_name", table_name, 'str'), 'columnName': self._serialize.url("column_name", column_name, 'str'), - 'sensitivityLabelSource': self._serialize.url("self.sensitivity_label_source", self.sensitivity_label_source, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -192,7 +193,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SensitivityLabel', response) if response.status_code == 201: @@ -232,6 +232,8 @@ def delete( :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + sensitivity_label_source = "current" + # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -241,7 +243,7 @@ def delete( 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), 'tableName': self._serialize.url("table_name", table_name, 'str'), 'columnName': self._serialize.url("column_name", column_name, 'str'), - 'sensitivityLabelSource': self._serialize.url("self.sensitivity_label_source", self.sensitivity_label_source, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -273,6 +275,147 @@ def delete( return client_raw_response delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}'} + def disable_recommendation( + self, resource_group_name, managed_instance_name, database_name, schema_name, table_name, column_name, custom_headers=None, raw=False, **operation_config): + """Disables sensitivity recommendations on a given column. + + :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 managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param database_name: The name of the database. + :type database_name: str + :param schema_name: The name of the schema. + :type schema_name: str + :param table_name: The name of the table. + :type table_name: str + :param column_name: The name of the column. + :type column_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` + """ + sensitivity_label_source = "recommended" + + # Construct URL + url = self.disable_recommendation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str'), + 'columnName': self._serialize.url("column_name", column_name, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_recommendation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable'} + + def enable_recommendation( + self, resource_group_name, managed_instance_name, database_name, schema_name, table_name, column_name, custom_headers=None, raw=False, **operation_config): + """Enables sensitivity recommendations on a given column (recommendations + are enabled by default on all columns). + + :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 managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param database_name: The name of the database. + :type database_name: str + :param schema_name: The name of the schema. + :type schema_name: str + :param table_name: The name of the table. + :type table_name: str + :param column_name: The name of the column. + :type column_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` + """ + sensitivity_label_source = "recommended" + + # Construct URL + url = self.enable_recommendation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str'), + 'columnName': self._serialize.url("column_name", column_name, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + enable_recommendation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable'} + def list_current_by_database( self, resource_group_name, managed_instance_name, database_name, filter=None, custom_headers=None, raw=False, **operation_config): """Gets the sensitivity labels of a given database. @@ -298,8 +441,7 @@ def list_current_by_database( ~azure.mgmt.sql.models.SensitivityLabelPaged[~azure.mgmt.sql.models.SensitivityLabel] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_current_by_database.metadata['url'] @@ -333,6 +475,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -343,18 +490,16 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_current_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels'} def list_recommended_by_database( - self, resource_group_name, managed_instance_name, database_name, skip_token=None, filter=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, managed_instance_name, database_name, include_disabled_recommendations=None, skip_token=None, filter=None, custom_headers=None, raw=False, **operation_config): """Gets the sensitivity labels of a given database. :param resource_group_name: The name of the resource group that @@ -365,6 +510,9 @@ def list_recommended_by_database( :type managed_instance_name: str :param database_name: The name of the database. :type database_name: str + :param include_disabled_recommendations: Specifies whether to include + disabled recommendations or not. + :type include_disabled_recommendations: bool :param skip_token: :type skip_token: str :param filter: An OData filter expression that filters elements in the @@ -380,8 +528,7 @@ def list_recommended_by_database( ~azure.mgmt.sql.models.SensitivityLabelPaged[~azure.mgmt.sql.models.SensitivityLabel] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_recommended_by_database.metadata['url'] @@ -395,6 +542,8 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} + if include_disabled_recommendations is not None: + query_parameters['includeDisabledRecommendations'] = self._serialize.query("include_disabled_recommendations", include_disabled_recommendations, 'bool') if skip_token is not None: query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') if filter is not None: @@ -417,6 +566,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -427,12 +581,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_recommended_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/recommendedSensitivityLabels'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_rule_baselines_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_rule_baselines_operations.py similarity index 99% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_rule_baselines_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_rule_baselines_operations.py index bf5121b3707b..2c4017b6193b 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_rule_baselines_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_rule_baselines_operations.py @@ -19,6 +19,8 @@ class ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations(object): """ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations 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. @@ -109,7 +111,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentRuleBaseline', response) @@ -199,7 +200,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentRuleBaseline', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_scans_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_scans_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_scans_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_scans_operations.py index d45dc1beb3b7..e3a2b20ffdc4 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessment_scans_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_scans_operations.py @@ -21,6 +21,8 @@ class ManagedDatabaseVulnerabilityAssessmentScansOperations(object): """ManagedDatabaseVulnerabilityAssessmentScansOperations 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. @@ -64,8 +66,7 @@ def list_by_database( ~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecordPaged[~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecord] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -98,6 +99,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -108,12 +114,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans'} @@ -180,7 +184,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VulnerabilityAssessmentScanRecord', response) @@ -345,7 +348,6 @@ def export( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessmentScansExport', response) if response.status_code == 201: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessments_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessments_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessments_operations.py index 6c224244c8fc..c5d8e57cb81f 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_database_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessments_operations.py @@ -19,6 +19,8 @@ class ManagedDatabaseVulnerabilityAssessmentsOperations(object): """ManagedDatabaseVulnerabilityAssessmentsOperations 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. @@ -98,7 +100,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessment', response) @@ -175,7 +176,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseVulnerabilityAssessment', response) if response.status_code == 201: @@ -271,8 +271,7 @@ def list_by_database( ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentPaged[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessment] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -304,6 +303,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -314,12 +318,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabaseVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_databases_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_databases_operations.py index e2b8d02ae534..9825283b3ab6 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_databases_operations.py @@ -21,6 +21,8 @@ class ManagedDatabasesOperations(object): """ManagedDatabasesOperations 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. @@ -149,8 +151,7 @@ def list_by_instance( ~azure.mgmt.sql.models.ManagedDatabasePaged[~azure.mgmt.sql.models.ManagedDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -181,6 +182,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -191,12 +197,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases'} @@ -257,7 +261,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedDatabase', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_encryption_protectors_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_encryption_protectors_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_encryption_protectors_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_encryption_protectors_operations.py index 61ab8baa5d32..5c35d34aac66 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_encryption_protectors_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_encryption_protectors_operations.py @@ -21,6 +21,8 @@ class ManagedInstanceEncryptionProtectorsOperations(object): """ManagedInstanceEncryptionProtectorsOperations 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. @@ -62,8 +64,7 @@ def list_by_instance( ~azure.mgmt.sql.models.ManagedInstanceEncryptionProtectorPaged[~azure.mgmt.sql.models.ManagedInstanceEncryptionProtector] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -94,6 +95,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -104,12 +110,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedInstanceEncryptionProtectorPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedInstanceEncryptionProtectorPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedInstanceEncryptionProtectorPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector'} @@ -169,7 +173,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedInstanceEncryptionProtector', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_keys_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_keys_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_keys_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_keys_operations.py index adb5c4bfa0f0..7d7876efc7bd 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_keys_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_keys_operations.py @@ -21,6 +21,8 @@ class ManagedInstanceKeysOperations(object): """ManagedInstanceKeysOperations 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. @@ -62,8 +64,7 @@ def list_by_instance( ~azure.mgmt.sql.models.ManagedInstanceKeyPaged[~azure.mgmt.sql.models.ManagedInstanceKey] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -96,6 +97,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -106,12 +112,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedInstanceKeyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedInstanceKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedInstanceKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys'} @@ -172,7 +176,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedInstanceKey', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_tde_certificates_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_tde_certificates_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_tde_certificates_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_tde_certificates_operations.py index be4ee1969fdd..c3f3e3fdc8e5 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_tde_certificates_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_tde_certificates_operations.py @@ -21,6 +21,8 @@ class ManagedInstanceTdeCertificatesOperations(object): """ManagedInstanceTdeCertificatesOperations 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. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_vulnerability_assessments_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_vulnerability_assessments_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_vulnerability_assessments_operations.py index 601294eb6777..04c452d37993 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instance_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_vulnerability_assessments_operations.py @@ -19,6 +19,8 @@ class ManagedInstanceVulnerabilityAssessmentsOperations(object): """ManagedInstanceVulnerabilityAssessmentsOperations 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. @@ -95,7 +97,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedInstanceVulnerabilityAssessment', response) @@ -169,7 +170,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedInstanceVulnerabilityAssessment', response) if response.status_code == 201: @@ -261,8 +261,7 @@ def list_by_instance( ~azure.mgmt.sql.models.ManagedInstanceVulnerabilityAssessmentPaged[~azure.mgmt.sql.models.ManagedInstanceVulnerabilityAssessment] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -293,6 +292,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -303,12 +307,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedInstanceVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedInstanceVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedInstanceVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instances_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instances_operations.py similarity index 84% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instances_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instances_operations.py index 1fee247c7c96..c1cb3d973264 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instances_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instances_operations.py @@ -21,11 +21,13 @@ class ManagedInstancesOperations(object): """ManagedInstancesOperations 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: The API version to use for the request. Constant value: "2015-05-01-preview". + :ivar api_version: The API version to use for the request. Constant value: "2018-06-01-preview". """ models = models @@ -35,14 +37,20 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-05-01-preview" + self.api_version = "2018-06-01-preview" self.config = config - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of all managed instances in the subscription. + def list_by_instance_pool( + self, resource_group_name, instance_pool_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of all managed instances in an instance pool. + :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 instance_pool_name: The instance pool name. + :type instance_pool_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 @@ -53,12 +61,13 @@ def list( ~azure.mgmt.sql.models.ManagedInstancePaged[~azure.mgmt.sql.models.ManagedInstance] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list_by_instance_pool.metadata['url'] path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -83,6 +92,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -93,15 +107,13 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances'} + list_by_instance_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/managedInstances'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -121,8 +133,7 @@ def list_by_resource_group( ~azure.mgmt.sql.models.ManagedInstancePaged[~azure.mgmt.sql.models.ManagedInstance] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -152,6 +163,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -162,12 +178,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances'} @@ -225,7 +239,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedInstance', response) @@ -522,3 +535,69 @@ def get_long_running_output(response): 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.Sql/managedInstances/{managedInstanceName}'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of all managed instances in the subscription. + + :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: An iterator like instance of ManagedInstance + :rtype: + ~azure.mgmt.sql.models.ManagedInstancePaged[~azure.mgmt.sql.models.ManagedInstance] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py index df833033a1b9..882500ff53e5 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py @@ -21,6 +21,8 @@ class ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations(object): """ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations 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. @@ -99,7 +101,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedBackupShortTermRetentionPolicy', response) @@ -355,8 +356,7 @@ def list_by_restorable_dropped_database( ~azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicyPaged[~azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_restorable_dropped_database.metadata['url'] @@ -388,6 +388,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -398,12 +403,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedBackupShortTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_restorable_dropped_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_server_security_alert_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_server_security_alert_policies_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_server_security_alert_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_server_security_alert_policies_operations.py index 16ad81dac173..1f75bd170197 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/managed_server_security_alert_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_server_security_alert_policies_operations.py @@ -21,6 +21,8 @@ class ManagedServerSecurityAlertPoliciesOperations(object): """ManagedServerSecurityAlertPoliciesOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagedServerSecurityAlertPolicy', response) @@ -232,8 +233,7 @@ def list_by_instance( ~azure.mgmt.sql.models.ManagedServerSecurityAlertPolicyPaged[~azure.mgmt.sql.models.ManagedServerSecurityAlertPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -264,6 +264,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -274,12 +279,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagedServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagedServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagedServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/securityAlertPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_operations.py similarity index 90% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_operations.py index 5f8f397a39b9..7ccdf683aa8a 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_operations.py @@ -19,6 +19,8 @@ class Operations(object): """Operations 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. @@ -51,8 +53,7 @@ def list( ~azure.mgmt.sql.models.OperationPaged[~azure.mgmt.sql.models.Operation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -77,6 +78,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -87,12 +93,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.Sql/operations'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recommended_elastic_pools_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recommended_elastic_pools_operations.py similarity index 94% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recommended_elastic_pools_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recommended_elastic_pools_operations.py index 960bd52a034b..95c89bf1df1b 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recommended_elastic_pools_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recommended_elastic_pools_operations.py @@ -19,6 +19,8 @@ class RecommendedElasticPoolsOperations(object): """RecommendedElasticPoolsOperations 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. @@ -94,7 +96,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RecommendedElasticPool', response) @@ -125,8 +126,7 @@ def list_by_server( ~azure.mgmt.sql.models.RecommendedElasticPoolPaged[~azure.mgmt.sql.models.RecommendedElasticPool] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -157,6 +157,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -167,12 +172,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RecommendedElasticPoolPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RecommendedElasticPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RecommendedElasticPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools'} @@ -200,8 +203,7 @@ def list_metrics( ~azure.mgmt.sql.models.RecommendedElasticPoolMetricPaged[~azure.mgmt.sql.models.RecommendedElasticPoolMetric] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metrics.metadata['url'] @@ -233,6 +235,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -243,12 +250,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RecommendedElasticPoolMetricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RecommendedElasticPoolMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RecommendedElasticPoolMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}/metrics'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_databases_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_databases_operations.py index 87b5873c5619..178abf85f1b5 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_databases_operations.py @@ -19,6 +19,8 @@ class RecoverableDatabasesOperations(object): """RecoverableDatabasesOperations 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. @@ -94,7 +96,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RecoverableDatabase', response) @@ -125,8 +126,7 @@ def list_by_server( ~azure.mgmt.sql.models.RecoverableDatabasePaged[~azure.mgmt.sql.models.RecoverableDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -157,6 +157,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -167,12 +172,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RecoverableDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RecoverableDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RecoverableDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_managed_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_managed_databases_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_managed_databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_managed_databases_operations.py index d8bf8cbb6665..2595a4069152 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_managed_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_recoverable_managed_databases_operations.py @@ -19,6 +19,8 @@ class RecoverableManagedDatabasesOperations(object): """RecoverableManagedDatabasesOperations 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. @@ -57,8 +59,7 @@ def list_by_instance( ~azure.mgmt.sql.models.RecoverableManagedDatabasePaged[~azure.mgmt.sql.models.RecoverableManagedDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -89,6 +90,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -99,12 +105,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RecoverableManagedDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RecoverableManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RecoverableManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/recoverableDatabases'} @@ -165,7 +169,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RecoverableManagedDatabase', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/replication_links_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_replication_links_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/replication_links_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_replication_links_operations.py index d3d3cee87622..bebd9d62e04d 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/replication_links_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_replication_links_operations.py @@ -21,6 +21,8 @@ class ReplicationLinksOperations(object): """ReplicationLinksOperations 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. @@ -160,7 +162,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ReplicationLink', response) @@ -375,8 +376,7 @@ def list_by_database( ~azure.mgmt.sql.models.ReplicationLinkPaged[~azure.mgmt.sql.models.ReplicationLink] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -408,6 +408,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -418,12 +423,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ReplicationLinkPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ReplicationLinkPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ReplicationLinkPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_databases_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_databases_operations.py index 0dfb4989691a..aa2480c63f73 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_databases_operations.py @@ -19,6 +19,8 @@ class RestorableDroppedDatabasesOperations(object): """RestorableDroppedDatabasesOperations 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. @@ -94,7 +96,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RestorableDroppedDatabase', response) @@ -125,8 +126,7 @@ def list_by_server( ~azure.mgmt.sql.models.RestorableDroppedDatabasePaged[~azure.mgmt.sql.models.RestorableDroppedDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -157,6 +157,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -167,12 +172,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RestorableDroppedDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RestorableDroppedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RestorableDroppedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_managed_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_managed_databases_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_managed_databases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_managed_databases_operations.py index 58e81f79908a..0ef3d7b7c3c8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_managed_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restorable_dropped_managed_databases_operations.py @@ -19,6 +19,8 @@ class RestorableDroppedManagedDatabasesOperations(object): """RestorableDroppedManagedDatabasesOperations 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. @@ -57,8 +59,7 @@ def list_by_instance( ~azure.mgmt.sql.models.RestorableDroppedManagedDatabasePaged[~azure.mgmt.sql.models.RestorableDroppedManagedDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_instance.metadata['url'] @@ -89,6 +90,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -99,12 +105,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RestorableDroppedManagedDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RestorableDroppedManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RestorableDroppedManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases'} @@ -166,7 +170,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RestorableDroppedManagedDatabase', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restore_points_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restore_points_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restore_points_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restore_points_operations.py index e5b49d9d1ed3..0a7f74a92b42 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/restore_points_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_restore_points_operations.py @@ -21,6 +21,8 @@ class RestorePointsOperations(object): """RestorePointsOperations 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. @@ -61,8 +63,7 @@ def list_by_database( ~azure.mgmt.sql.models.RestorePointPaged[~azure.mgmt.sql.models.RestorePoint] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -94,6 +95,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -104,12 +110,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RestorePointPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RestorePointPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RestorePointPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints'} @@ -283,7 +287,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RestorePoint', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sensitivity_labels_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sensitivity_labels_operations.py similarity index 70% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sensitivity_labels_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sensitivity_labels_operations.py index 5be551f7fd12..2cfb2974a8b8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sensitivity_labels_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sensitivity_labels_operations.py @@ -19,12 +19,13 @@ class SensitivityLabelsOperations(object): """SensitivityLabelsOperations 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: The API version to use for the request. Constant value: "2017-03-01-preview". - :ivar sensitivity_label_source: The source of the sensitivity label. Constant value: "current". """ models = models @@ -35,7 +36,6 @@ def __init__(self, client, config, serializer, deserializer): self._serialize = serializer self._deserialize = deserializer self.api_version = "2017-03-01-preview" - self.sensitivity_label_source = "current" self.config = config @@ -64,8 +64,7 @@ def list_current_by_database( ~azure.mgmt.sql.models.SensitivityLabelPaged[~azure.mgmt.sql.models.SensitivityLabel] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_current_by_database.metadata['url'] @@ -99,6 +98,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -109,18 +113,16 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_current_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/currentSensitivityLabels'} def list_recommended_by_database( - self, resource_group_name, server_name, database_name, skip_token=None, filter=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, server_name, database_name, include_disabled_recommendations=None, skip_token=None, filter=None, custom_headers=None, raw=False, **operation_config): """Gets the sensitivity labels of a given database. :param resource_group_name: The name of the resource group that @@ -131,6 +133,9 @@ def list_recommended_by_database( :type server_name: str :param database_name: The name of the database. :type database_name: str + :param include_disabled_recommendations: Specifies whether to include + disabled recommendations or not. + :type include_disabled_recommendations: bool :param skip_token: :type skip_token: str :param filter: An OData filter expression that filters elements in the @@ -146,8 +151,7 @@ def list_recommended_by_database( ~azure.mgmt.sql.models.SensitivityLabelPaged[~azure.mgmt.sql.models.SensitivityLabel] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_recommended_by_database.metadata['url'] @@ -161,6 +165,8 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} + if include_disabled_recommendations is not None: + query_parameters['includeDisabledRecommendations'] = self._serialize.query("include_disabled_recommendations", include_disabled_recommendations, 'bool') if skip_token is not None: query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') if filter is not None: @@ -183,6 +189,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -193,16 +204,155 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SensitivityLabelPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_recommended_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/recommendedSensitivityLabels'} + def enable_recommendation( + self, resource_group_name, server_name, database_name, schema_name, table_name, column_name, custom_headers=None, raw=False, **operation_config): + """Enables sensitivity recommendations on a given column (recommendations + are enabled by default on all columns). + + :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 server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param schema_name: The name of the schema. + :type schema_name: str + :param table_name: The name of the table. + :type table_name: str + :param column_name: The name of the column. + :type column_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` + """ + sensitivity_label_source = "recommended" + + # Construct URL + url = self.enable_recommendation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str'), + 'columnName': self._serialize.url("column_name", column_name, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + enable_recommendation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable'} + + def disable_recommendation( + self, resource_group_name, server_name, database_name, schema_name, table_name, column_name, custom_headers=None, raw=False, **operation_config): + """Disables sensitivity recommendations on a given column. + + :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 server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param schema_name: The name of the schema. + :type schema_name: str + :param table_name: The name of the table. + :type table_name: str + :param column_name: The name of the column. + :type column_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` + """ + sensitivity_label_source = "recommended" + + # Construct URL + url = self.disable_recommendation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str'), + 'columnName': self._serialize.url("column_name", column_name, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.post(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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_recommendation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable'} + def get( self, resource_group_name, server_name, database_name, schema_name, table_name, column_name, sensitivity_label_source, custom_headers=None, raw=False, **operation_config): """Gets the sensitivity label of a given column. @@ -273,7 +423,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SensitivityLabel', response) @@ -314,6 +463,8 @@ def create_or_update( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + sensitivity_label_source = "current" + # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { @@ -323,7 +474,7 @@ def create_or_update( 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), 'tableName': self._serialize.url("table_name", table_name, 'str'), 'columnName': self._serialize.url("column_name", column_name, 'str'), - 'sensitivityLabelSource': self._serialize.url("self.sensitivity_label_source", self.sensitivity_label_source, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -356,7 +507,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SensitivityLabel', response) if response.status_code == 201: @@ -396,6 +546,8 @@ def delete( :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + sensitivity_label_source = "current" + # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -405,7 +557,7 @@ def delete( 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), 'tableName': self._serialize.url("table_name", table_name, 'str'), 'columnName': self._serialize.url("column_name", column_name, 'str'), - 'sensitivityLabelSource': self._serialize.url("self.sensitivity_label_source", self.sensitivity_label_source, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_automatic_tuning_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_automatic_tuning_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_automatic_tuning_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_automatic_tuning_operations.py index 675d886377c6..243174bc107d 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_automatic_tuning_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_automatic_tuning_operations.py @@ -19,6 +19,8 @@ class ServerAutomaticTuningOperations(object): """ServerAutomaticTuningOperations 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. @@ -90,7 +92,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerAutomaticTuning', response) @@ -167,7 +168,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerAutomaticTuning', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_azure_ad_administrators_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_administrators_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_azure_ad_administrators_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_administrators_operations.py index c7a66d57ea08..7fdf686673b7 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_azure_ad_administrators_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_administrators_operations.py @@ -21,6 +21,8 @@ class ServerAzureADAdministratorsOperations(object): """ServerAzureADAdministratorsOperations 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. @@ -306,7 +308,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerAzureADAdministrator', response) @@ -337,8 +338,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerAzureADAdministratorPaged[~azure.mgmt.sql.models.ServerAzureADAdministrator] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -369,6 +369,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -379,12 +384,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerAzureADAdministratorPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerAzureADAdministratorPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerAzureADAdministratorPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_blob_auditing_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_blob_auditing_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_blob_auditing_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_blob_auditing_policies_operations.py index ac7c8ef280ac..88cb823e64e9 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_blob_auditing_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_blob_auditing_policies_operations.py @@ -21,6 +21,8 @@ class ServerBlobAuditingPoliciesOperations(object): """ServerBlobAuditingPoliciesOperations 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. @@ -95,7 +97,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerBlobAuditingPolicy', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_communication_links_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_communication_links_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_communication_links_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_communication_links_operations.py index 2844c4068ea4..3a8782c7510f 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_communication_links_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_communication_links_operations.py @@ -21,6 +21,8 @@ class ServerCommunicationLinksOperations(object): """ServerCommunicationLinksOperations 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. @@ -155,7 +157,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerCommunicationLink', response) @@ -295,8 +296,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerCommunicationLinkPaged[~azure.mgmt.sql.models.ServerCommunicationLink] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -327,6 +327,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -337,12 +342,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerCommunicationLinkPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerCommunicationLinkPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerCommunicationLinkPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_connection_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_connection_policies_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_connection_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_connection_policies_operations.py index c1d5c68e7f7f..4813f39f62ac 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_connection_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_connection_policies_operations.py @@ -19,6 +19,8 @@ class ServerConnectionPoliciesOperations(object): """ServerConnectionPoliciesOperations 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. @@ -103,7 +105,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerConnectionPolicy', response) if response.status_code == 201: @@ -170,7 +171,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerConnectionPolicy', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_dns_aliases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_dns_aliases_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_dns_aliases_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_dns_aliases_operations.py index a4f79dfce854..d8ec5ec33941 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_dns_aliases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_dns_aliases_operations.py @@ -21,6 +21,8 @@ class ServerDnsAliasesOperations(object): """ServerDnsAliasesOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerDnsAlias', response) @@ -316,8 +317,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerDnsAliasPaged[~azure.mgmt.sql.models.ServerDnsAlias] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -348,6 +348,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -358,12 +363,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerDnsAliasPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerDnsAliasPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerDnsAliasPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_keys_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_keys_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_keys_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_keys_operations.py index e52b751d7eb8..ffbd75711807 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_keys_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_keys_operations.py @@ -21,6 +21,8 @@ class ServerKeysOperations(object): """ServerKeysOperations 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. @@ -59,8 +61,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerKeyPaged[~azure.mgmt.sql.models.ServerKey] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -91,6 +92,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -101,12 +107,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerKeyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys'} @@ -167,7 +171,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerKey', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_security_alert_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_security_alert_policies_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_security_alert_policies_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_security_alert_policies_operations.py index 95e884990da2..b5b8e4d82427 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_security_alert_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_security_alert_policies_operations.py @@ -21,6 +21,8 @@ class ServerSecurityAlertPoliciesOperations(object): """ServerSecurityAlertPoliciesOperations 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. @@ -95,7 +97,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerSecurityAlertPolicy', response) @@ -230,8 +231,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerSecurityAlertPolicyPaged[~azure.mgmt.sql.models.ServerSecurityAlertPolicy] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -262,6 +262,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -272,12 +277,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_usages_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_usages_operations.py similarity index 92% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_usages_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_usages_operations.py index 4d60726ff42f..5ac207d27f69 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_usages_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_usages_operations.py @@ -19,6 +19,8 @@ class ServerUsagesOperations(object): """ServerUsagesOperations 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. @@ -57,8 +59,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerUsagePaged[~azure.mgmt.sql.models.ServerUsage] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -89,6 +90,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -99,12 +105,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerUsagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/usages'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_vulnerability_assessments_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_vulnerability_assessments_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_vulnerability_assessments_operations.py index ffe8dd567342..4caee1f1fb49 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/server_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_vulnerability_assessments_operations.py @@ -19,6 +19,8 @@ class ServerVulnerabilityAssessmentsOperations(object): """ServerVulnerabilityAssessmentsOperations 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. @@ -95,7 +97,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerVulnerabilityAssessment', response) @@ -168,7 +169,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerVulnerabilityAssessment', response) if response.status_code == 201: @@ -258,8 +258,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServerVulnerabilityAssessmentPaged[~azure.mgmt.sql.models.ServerVulnerabilityAssessment] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -290,6 +289,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -300,12 +304,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/servers_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_servers_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/servers_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_servers_operations.py index 7abad6723542..16fd05d12be8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/servers_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_servers_operations.py @@ -21,6 +21,8 @@ class ServersOperations(object): """ServersOperations 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. @@ -93,7 +95,6 @@ def check_name_availability( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CheckNameAvailabilityResponse', response) @@ -120,8 +121,7 @@ def list( """ api_version = "2015-05-01-preview" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -150,6 +150,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -160,12 +165,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers'} @@ -190,8 +193,7 @@ def list_by_resource_group( """ api_version = "2015-05-01-preview" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -221,6 +223,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -231,12 +238,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers'} @@ -296,7 +301,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Server', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_objectives_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_objectives_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_objectives_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_objectives_operations.py index d4f53c7313af..f1ae98c7828e 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_objectives_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_objectives_operations.py @@ -19,6 +19,8 @@ class ServiceObjectivesOperations(object): """ServiceObjectivesOperations 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. @@ -94,7 +96,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceObjective', response) @@ -125,8 +126,7 @@ def list_by_server( ~azure.mgmt.sql.models.ServiceObjectivePaged[~azure.mgmt.sql.models.ServiceObjective] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -157,6 +157,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -167,12 +172,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServiceObjectivePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServiceObjectivePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServiceObjectivePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/serviceObjectives'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_tier_advisors_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_tier_advisors_operations.py similarity index 95% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_tier_advisors_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_tier_advisors_operations.py index cc9ba091db21..ff0328f21bd7 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/service_tier_advisors_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_service_tier_advisors_operations.py @@ -19,6 +19,8 @@ class ServiceTierAdvisorsOperations(object): """ServiceTierAdvisorsOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServiceTierAdvisor', response) @@ -129,8 +130,7 @@ def list_by_database( ~azure.mgmt.sql.models.ServiceTierAdvisorPaged[~azure.mgmt.sql.models.ServiceTierAdvisor] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -162,6 +162,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -172,12 +177,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServiceTierAdvisorPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServiceTierAdvisorPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServiceTierAdvisorPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/serviceTierAdvisors'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/subscription_usages_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_subscription_usages_operations.py similarity index 94% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/subscription_usages_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_subscription_usages_operations.py index b70973ca790e..355be5f6fd68 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/subscription_usages_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_subscription_usages_operations.py @@ -19,6 +19,8 @@ class SubscriptionUsagesOperations(object): """SubscriptionUsagesOperations 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. @@ -54,8 +56,7 @@ def list_by_location( ~azure.mgmt.sql.models.SubscriptionUsagePaged[~azure.mgmt.sql.models.SubscriptionUsage] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_location.metadata['url'] @@ -85,6 +86,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -95,12 +101,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SubscriptionUsagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SubscriptionUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SubscriptionUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages'} @@ -157,7 +161,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SubscriptionUsage', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_agents_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_agents_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_agents_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_agents_operations.py index 9ac0651a57d3..ec00730c027a 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_agents_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_agents_operations.py @@ -21,6 +21,8 @@ class SyncAgentsOperations(object): """SyncAgentsOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SyncAgent', response) @@ -326,8 +327,7 @@ def list_by_server( ~azure.mgmt.sql.models.SyncAgentPaged[~azure.mgmt.sql.models.SyncAgent] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -358,6 +358,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -368,12 +373,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncAgentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncAgentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncAgentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents'} @@ -435,7 +438,6 @@ def generate_key( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SyncAgentKeyProperties', response) @@ -469,8 +471,7 @@ def list_linked_databases( ~azure.mgmt.sql.models.SyncAgentLinkedDatabasePaged[~azure.mgmt.sql.models.SyncAgentLinkedDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_linked_databases.metadata['url'] @@ -502,6 +503,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -512,12 +518,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncAgentLinkedDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncAgentLinkedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncAgentLinkedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_linked_databases.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}/linkedDatabases'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_groups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_groups_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_groups_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_groups_operations.py index 484f24f33781..bf78088e717b 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_groups_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_groups_operations.py @@ -21,6 +21,8 @@ class SyncGroupsOperations(object): """SyncGroupsOperations 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. @@ -56,8 +58,7 @@ def list_sync_database_ids( ~azure.mgmt.sql.models.SyncDatabaseIdPropertiesPaged[~azure.mgmt.sql.models.SyncDatabaseIdProperties] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_sync_database_ids.metadata['url'] @@ -87,6 +88,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -97,12 +103,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncDatabaseIdPropertiesPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncDatabaseIdPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncDatabaseIdPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_sync_database_ids.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds'} @@ -222,8 +226,7 @@ def list_hub_schemas( ~azure.mgmt.sql.models.SyncFullSchemaPropertiesPaged[~azure.mgmt.sql.models.SyncFullSchemaProperties] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_hub_schemas.metadata['url'] @@ -256,6 +259,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -266,12 +274,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_hub_schemas.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/hubSchemas'} @@ -310,8 +316,7 @@ def list_logs( ~azure.mgmt.sql.models.SyncGroupLogPropertiesPaged[~azure.mgmt.sql.models.SyncGroupLogProperties] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_logs.metadata['url'] @@ -349,6 +354,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -359,12 +369,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncGroupLogPropertiesPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncGroupLogPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncGroupLogPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/logs'} @@ -553,7 +561,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SyncGroup', response) @@ -901,8 +908,7 @@ def list_by_database( ~azure.mgmt.sql.models.SyncGroupPaged[~azure.mgmt.sql.models.SyncGroup] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_database.metadata['url'] @@ -934,6 +940,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -944,12 +955,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncGroupPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_members_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_members_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_members_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_members_operations.py index 4eab11133d05..23343d374072 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/sync_members_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_members_operations.py @@ -21,6 +21,8 @@ class SyncMembersOperations(object): """SyncMembersOperations 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. @@ -103,7 +105,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SyncMember', response) @@ -468,8 +469,7 @@ def list_by_sync_group( ~azure.mgmt.sql.models.SyncMemberPaged[~azure.mgmt.sql.models.SyncMember] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_sync_group.metadata['url'] @@ -502,6 +502,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -512,12 +517,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncMemberPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncMemberPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncMemberPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_sync_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers'} @@ -550,8 +553,7 @@ def list_member_schemas( ~azure.mgmt.sql.models.SyncFullSchemaPropertiesPaged[~azure.mgmt.sql.models.SyncFullSchemaProperties] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_member_schemas.metadata['url'] @@ -585,6 +587,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -595,12 +602,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SyncFullSchemaPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_member_schemas.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/schemas'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/tde_certificates_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_tde_certificates_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/tde_certificates_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_tde_certificates_operations.py index bc529a38043f..86037d49ca05 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/tde_certificates_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_tde_certificates_operations.py @@ -21,6 +21,8 @@ class TdeCertificatesOperations(object): """TdeCertificatesOperations 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. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryption_activities_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryption_activities_operations.py similarity index 93% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryption_activities_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryption_activities_operations.py index ae930a401246..6807645bd6c0 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryption_activities_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryption_activities_operations.py @@ -19,6 +19,8 @@ class TransparentDataEncryptionActivitiesOperations(object): """TransparentDataEncryptionActivitiesOperations 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. @@ -63,8 +65,7 @@ def list_by_configuration( ~azure.mgmt.sql.models.TransparentDataEncryptionActivityPaged[~azure.mgmt.sql.models.TransparentDataEncryptionActivity] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_configuration.metadata['url'] @@ -97,6 +98,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -107,12 +113,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.TransparentDataEncryptionActivityPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.TransparentDataEncryptionActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.TransparentDataEncryptionActivityPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{transparentDataEncryptionName}/operationResults'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryptions_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryptions_operations.py similarity index 98% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryptions_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryptions_operations.py index a0f3c8184f57..b497a7ee5656 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryptions_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryptions_operations.py @@ -19,6 +19,8 @@ class TransparentDataEncryptionsOperations(object): """TransparentDataEncryptionsOperations 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. @@ -108,7 +110,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('TransparentDataEncryption', response) if response.status_code == 201: @@ -179,7 +180,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('TransparentDataEncryption', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_usages_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_usages_operations.py new file mode 100644 index 000000000000..59164a38e347 --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_usages_operations.py @@ -0,0 +1,120 @@ +# 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 .. import models + + +class UsagesOperations(object): + """UsagesOperations 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: The API version to use for the request. Constant value: "2018-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01-preview" + + self.config = config + + def list_by_instance_pool( + self, resource_group_name, instance_pool_name, expand_children=None, custom_headers=None, raw=False, **operation_config): + """Gets all instance pool usage metrics. + + :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 instance_pool_name: The name of the instance pool to be + retrieved. + :type instance_pool_name: str + :param expand_children: Optional request parameter to include managed + instance usages within the instance pool. + :type expand_children: bool + :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: An iterator like instance of Usage + :rtype: + ~azure.mgmt.sql.models.UsagePaged[~azure.mgmt.sql.models.Usage] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_instance_pool.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'instancePoolName': self._serialize.url("instance_pool_name", instance_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand_children is not None: + query_parameters['expandChildren'] = self._serialize.query("expand_children", expand_children, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_instance_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/usages'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_clusters_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_clusters_operations.py similarity index 96% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_clusters_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_clusters_operations.py index 90a685e001a5..b91ece534ef3 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_clusters_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_clusters_operations.py @@ -21,6 +21,8 @@ class VirtualClustersOperations(object): """VirtualClustersOperations 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. @@ -53,8 +55,7 @@ def list( ~azure.mgmt.sql.models.VirtualClusterPaged[~azure.mgmt.sql.models.VirtualCluster] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -83,6 +84,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -93,12 +99,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/virtualClusters'} @@ -121,8 +125,7 @@ def list_by_resource_group( ~azure.mgmt.sql.models.VirtualClusterPaged[~azure.mgmt.sql.models.VirtualCluster] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -152,6 +155,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -162,12 +170,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VirtualClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters'} @@ -225,7 +231,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VirtualCluster', response) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_network_rules_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_network_rules_operations.py similarity index 97% rename from sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_network_rules_operations.py rename to sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_network_rules_operations.py index 01bc6f5bdf3e..3485f42e9f85 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_network_rules_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_virtual_network_rules_operations.py @@ -21,6 +21,8 @@ class VirtualNetworkRulesOperations(object): """VirtualNetworkRulesOperations 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. @@ -96,7 +98,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VirtualNetworkRule', response) @@ -329,8 +330,7 @@ def list_by_server( ~azure.mgmt.sql.models.VirtualNetworkRulePaged[~azure.mgmt.sql.models.VirtualNetworkRule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_server.metadata['url'] @@ -361,6 +361,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -371,12 +376,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules'} diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/long_term_retention_backups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/long_term_retention_backups_operations.py deleted file mode 100644 index c803786f5ff3..000000000000 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/long_term_retention_backups_operations.py +++ /dev/null @@ -1,441 +0,0 @@ -# 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 LongTermRetentionBackupsOperations(object): - """LongTermRetentionBackupsOperations operations. - - :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: The API version to use for the request. Constant value: "2017-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-03-01-preview" - - self.config = config - - def get( - self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): - """Gets a long term retention backup. - - :param location_name: The location of the database. - :type location_name: str - :param long_term_retention_server_name: The name of the server - :type long_term_retention_server_name: str - :param long_term_retention_database_name: The name of the database - :type long_term_retention_database_name: str - :param backup_name: The backup name. - :type backup_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: LongTermRetentionBackup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.sql.models.LongTermRetentionBackup or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), - 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), - 'backupName': self._serialize.url("backup_name", backup_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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('LongTermRetentionBackup', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} - - - def _delete_initial( - self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), - 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), - 'backupName': self._serialize.url("backup_name", backup_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - 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.delete(url, query_parameters, header_parameters) - 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a long term retention backup. - - :param location_name: The location of the database - :type location_name: str - :param long_term_retention_server_name: The name of the server - :type long_term_retention_server_name: str - :param long_term_retention_database_name: The name of the database - :type long_term_retention_database_name: str - :param backup_name: The backup name. - :type backup_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( - location_name=location_name, - long_term_retention_server_name=long_term_retention_server_name, - long_term_retention_database_name=long_term_retention_database_name, - backup_name=backup_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}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'} - - def list_by_database( - self, location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): - """Lists all long term retention backups for a database. - - :param location_name: The location of the database - :type location_name: str - :param long_term_retention_server_name: The name of the server - :type long_term_retention_server_name: str - :param long_term_retention_database_name: The name of the database - :type long_term_retention_database_name: str - :param only_latest_per_database: Whether or not to only get the latest - backup for each database. - :type only_latest_per_database: bool - :param database_state: Whether to query against just live databases, - just deleted databases, or all databases. Possible values include: - 'All', 'Live', 'Deleted' - :type database_state: str or - ~azure.mgmt.sql.models.LongTermRetentionDatabaseState - :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: An iterator like instance of LongTermRetentionBackup - :rtype: - ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_database.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), - 'longTermRetentionDatabaseName': self._serialize.url("long_term_retention_database_name", long_term_retention_database_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if only_latest_per_database is not None: - query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') - if database_state is not None: - query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # 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 - - return response - - # Deserialize response - deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups'} - - def list_by_location( - self, location_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): - """Lists the long term retention backups for a given location. - - :param location_name: The location of the database - :type location_name: str - :param only_latest_per_database: Whether or not to only get the latest - backup for each database. - :type only_latest_per_database: bool - :param database_state: Whether to query against just live databases, - just deleted databases, or all databases. Possible values include: - 'All', 'Live', 'Deleted' - :type database_state: str or - ~azure.mgmt.sql.models.LongTermRetentionDatabaseState - :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: An iterator like instance of LongTermRetentionBackup - :rtype: - ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_location.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if only_latest_per_database is not None: - query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') - if database_state is not None: - query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # 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 - - return response - - # Deserialize response - deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups'} - - def list_by_server( - self, location_name, long_term_retention_server_name, only_latest_per_database=None, database_state=None, custom_headers=None, raw=False, **operation_config): - """Lists the long term retention backups for a given server. - - :param location_name: The location of the database - :type location_name: str - :param long_term_retention_server_name: The name of the server - :type long_term_retention_server_name: str - :param only_latest_per_database: Whether or not to only get the latest - backup for each database. - :type only_latest_per_database: bool - :param database_state: Whether to query against just live databases, - just deleted databases, or all databases. Possible values include: - 'All', 'Live', 'Deleted' - :type database_state: str or - ~azure.mgmt.sql.models.LongTermRetentionDatabaseState - :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: An iterator like instance of LongTermRetentionBackup - :rtype: - ~azure.mgmt.sql.models.LongTermRetentionBackupPaged[~azure.mgmt.sql.models.LongTermRetentionBackup] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'longTermRetentionServerName': self._serialize.url("long_term_retention_server_name", long_term_retention_server_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if only_latest_per_database is not None: - query_parameters['onlyLatestPerDatabase'] = self._serialize.query("only_latest_per_database", only_latest_per_database, 'bool') - if database_state is not None: - query_parameters['databaseState'] = self._serialize.query("database_state", database_state, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # 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 - - return response - - # Deserialize response - deserialized = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.LongTermRetentionBackupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups'} From ba3fa3aa9b886ea46431692f3065ab5cd0d25489 Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 10:16:27 -0700 Subject: [PATCH 160/244] Update CODEOWNERS --- .github/CODEOWNERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 07d57ac48320..0172563e9a84 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -40,6 +40,9 @@ # Management Plane /**/*mgmt*/ @zikalino +# Management Plane +/**/*mgmt*/ @zikalino + ########### # Eng Sys ########### From 9a5ce71f68722406efcf1be2cb3412048377e4b3 Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 11:03:35 -0700 Subject: [PATCH 161/244] more code owners --- .github/CODEOWNERS | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0172563e9a84..07d57ac48320 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -40,9 +40,6 @@ # Management Plane /**/*mgmt*/ @zikalino -# Management Plane -/**/*mgmt*/ @zikalino - ########### # Eng Sys ########### From b1f3c7d0057681fa6b71ad67cdd01f27434e0ca7 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 11:58:35 -0700 Subject: [PATCH 162/244] add policy and decorators for secrets (#6453) --- .../azure/keyvault/secrets/_shared/async_client_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 193e6e324c7e..c451ffb1e766 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncHttpTransport +from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient From 47bac65d3c91acbc2f79b819a2cbd0313c8c90a4 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Thu, 25 Jul 2019 12:41:38 -0700 Subject: [PATCH 163/244] Paging v2 (#6420) * First version of paging * Clean sync paging * Async paging * Name AsyncList without underscore * MyPy happyness * pylint * black * PageIterator as conf * Simplify ItemPaged * Use chain to link iterable * Make Paging more open * Docstring * pylint / mypy / black * Regenerate KV with latest Autorest + Paging branch (#6479) * Regenerate KV with latest Autorest + Paging branch * Remove unused import in tests * Make the async adapter more generic * Regeneration after operation mixin fix in Autorest * COmmit changes forgotten in #6418 * Fixing syntax for 2.7 * Move Storage Queue to new Paging (#6447) * Move Storage Queue to new Paging * Working Storage queue on new paging * Fix types * First shot of blob tests update * Fixing blob tests * File to new paging * Doc fix * Feedbacks from @annatisch * Fix last @annatisch comment * Simplify paging contract * Fix storage queue after new paging contract --- .../_key_vault_client_operations_async.py | 60 ++++------------ .../_key_vault_client_operations.py | 60 ++++------------ .../_key_vault_client_operations_async.py | 70 ++++--------------- .../_key_vault_client_operations.py | 70 ++++--------------- .../keys/_shared/async_client_base.py | 19 +++++ .../_key_vault_client_operations_async.py | 60 ++++------------ .../_key_vault_client_operations.py | 60 ++++------------ .../_key_vault_client_operations_async.py | 70 ++++--------------- .../_key_vault_client_operations.py | 70 ++++--------------- .../secrets/_shared/async_client_base.py | 19 +++++ 10 files changed, 142 insertions(+), 416 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index b5cc965119ed..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 0ae7fd5fb025..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index 08e45c2b44a7..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index b9ed6e10ea21..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 193e6e324c7e..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -21,6 +21,25 @@ pass +class AsyncPagingAdapter: + """For each item in an AsyncIterator, returns the result of applying fn to that item. + Python 3.6 added syntax that could replace this (yield within async for).""" + + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: + self._pages = pages + self._fn = fn + + def __aiter__(self): + return self + + async def __anext__(self) -> Any: + item = await self._pages.__anext__() + if not item: + raise StopAsyncIteration + return self._fn(item) + # TODO: expected type Model got Coroutine instead? + + class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index b5cc965119ed..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 0ae7fd5fb025..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index 08e45c2b44a7..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index b9ed6e10ea21..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index c451ffb1e766..0119ef5a6e44 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -21,6 +21,25 @@ pass +class AsyncPagingAdapter: + """For each item in an AsyncIterator, returns the result of applying fn to that item. + Python 3.6 added syntax that could replace this (yield within async for).""" + + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: + self._pages = pages + self._fn = fn + + def __aiter__(self): + return self + + async def __anext__(self) -> Any: + item = await self._pages.__anext__() + if not item: + raise StopAsyncIteration + return self._fn(item) + # TODO: expected type Model got Coroutine instead? + + class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, From 235c9c0a67a8ca4de52843f6a5d47b0d2c20f723 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 15:48:49 -0700 Subject: [PATCH 164/244] get rid of should only propagate (#6497) --- sdk/core/azure-core/azure/core/tracing/decorator.py | 2 +- sdk/core/azure-core/azure/core/tracing/decorator_async.py | 2 +- .../azure_core_asynctests/test_tracing_decorator_async.py | 5 ++++- sdk/core/azure-core/tests/test_tracing_decorator.py | 5 ++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 3986dcaf31ed..7d5d7bfce407 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None and orig_wrapped_span is None: + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 4df65fee77ef..781e20a6bef2 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None and orig_wrapped_span is None: + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index 82b4f97dc92f..e2a5c92e60b9 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -145,4 +145,7 @@ async def test_span_with_opencensus_complicated(value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert not parent.children[3].children + assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" + assert parent.children[3].children[1].span_data.name == "MockClient.make_request" + children = parent.children[1].children + assert len(children) == 2 diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index 764c09396255..eedd34c0afdd 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -177,4 +177,7 @@ def test_span_with_opencensus_complicated(self, value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert not parent.children[3].children + assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" + assert parent.children[3].children[1].span_data.name == "MockClient.make_request" + children = parent.children[1].children + assert len(children) == 2 From 76cf0c326af64d5cfa3121681ba4ea8bf5ac74fc Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Mon, 29 Jul 2019 14:05:36 -0700 Subject: [PATCH 165/244] decorator only trace very top level function (#6530) --- sdk/core/azure-core/azure/core/tracing/decorator.py | 2 +- sdk/core/azure-core/azure/core/tracing/decorator_async.py | 2 +- .../azure_core_asynctests/test_tracing_decorator_async.py | 5 +---- sdk/core/azure-core/tests/test_tracing_decorator.py | 5 +---- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 7d5d7bfce407..3986dcaf31ed 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 781e20a6bef2..4df65fee77ef 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index e2a5c92e60b9..82b4f97dc92f 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -145,7 +145,4 @@ async def test_span_with_opencensus_complicated(value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index eedd34c0afdd..764c09396255 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -177,7 +177,4 @@ def test_span_with_opencensus_complicated(self, value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children From 146bcd1e4291c3c783be9b853e081c7f94c55e88 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 08:51:19 -0700 Subject: [PATCH 166/244] Synchronous username/password auth (#6416) --- .../azure/identity/_internal/__init__.py | 1 - .../azure-identity/tests/test_identity.py | 68 ------------------- 2 files changed, 69 deletions(-) diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index e7583139395b..cfdf935b801c 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,6 +2,5 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from .auth_code_redirect_handler import AuthCodeRedirectServer from .msal_credentials import ConfidentialClientCredential, PublicClientCredential from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 3aaa54a1f28f..8e7245522519 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -22,7 +22,6 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, - InteractiveBrowserCredential, UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential @@ -244,73 +243,6 @@ def test_default_credential(): DefaultAzureCredential() -@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser -def test_interactive_credential(): - oauth_state = "state" - expected_token = "access-token" - - transport = validating_transport( - requests=[Request()] * 2, # not validating requests because they're formed by MSAL - responses=[ - # expecting tenant discovery then a token request - mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), - mock_response( - json_payload={ - "access_token": expected_token, - "expires_in": 42, - "token_type": "Bearer", - "ext_expires_in": 42, - } - ), - ], - ) - - # mock local server fakes successful authentication by immediately returning a well-formed response - auth_code_response = {"code": "authorization-code", "state": [oauth_state]} - server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) - - credential = InteractiveBrowserCredential( - client_id="guid", - client_secret="secret", - server_class=server_class, - transport=transport, - instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request - ) - - # ensure the request beginning the flow has a known state value - with patch("azure.identity.browser_auth.uuid.uuid4", lambda: oauth_state): - token = credential.get_token("scope") - assert token.token == expected_token - - -@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser -def test_interactive_credential_timeout(): - # mock transport handles MSAL's tenant discovery - transport = Mock( - send=lambda _, **__: mock_response( - json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"} - ) - ) - - # mock local server blocks long enough to exceed the timeout - timeout = 1 - server_instance = Mock(wait_for_redirect=functools.partial(time.sleep, timeout + 1)) - server_class = Mock(return_value=server_instance) - - credential = InteractiveBrowserCredential( - client_id="guid", - client_secret="secret", - server_class=server_class, - timeout=timeout, - transport=transport, - instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request - ) - - with pytest.raises(ClientAuthenticationError) as ex: - credential.get_token("scope") - assert "timed out" in ex.value.message.lower() - - def test_username_password_credential(): expected_token = "access-token" transport = validating_transport( From 6ca718f8a398feb7f14de22457c5433113c64668 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 14:04:30 -0700 Subject: [PATCH 167/244] Synchronous interactive browser authentication (#6466) --- .../azure/identity/_internal/__init__.py | 1 + .../azure-identity/tests/test_identity.py | 68 +++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index cfdf935b801c..e7583139395b 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,5 +2,6 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +from .auth_code_redirect_handler import AuthCodeRedirectServer from .msal_credentials import ConfidentialClientCredential, PublicClientCredential from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 8e7245522519..3aaa54a1f28f 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -22,6 +22,7 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, + InteractiveBrowserCredential, UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential @@ -243,6 +244,73 @@ def test_default_credential(): DefaultAzureCredential() +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential(): + oauth_state = "state" + expected_token = "access-token" + + transport = validating_transport( + requests=[Request()] * 2, # not validating requests because they're formed by MSAL + responses=[ + # expecting tenant discovery then a token request + mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), + mock_response( + json_payload={ + "access_token": expected_token, + "expires_in": 42, + "token_type": "Bearer", + "ext_expires_in": 42, + } + ), + ], + ) + + # mock local server fakes successful authentication by immediately returning a well-formed response + auth_code_response = {"code": "authorization-code", "state": [oauth_state]} + server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + # ensure the request beginning the flow has a known state value + with patch("azure.identity.browser_auth.uuid.uuid4", lambda: oauth_state): + token = credential.get_token("scope") + assert token.token == expected_token + + +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential_timeout(): + # mock transport handles MSAL's tenant discovery + transport = Mock( + send=lambda _, **__: mock_response( + json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"} + ) + ) + + # mock local server blocks long enough to exceed the timeout + timeout = 1 + server_instance = Mock(wait_for_redirect=functools.partial(time.sleep, timeout + 1)) + server_class = Mock(return_value=server_instance) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + timeout=timeout, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + with pytest.raises(ClientAuthenticationError) as ex: + credential.get_token("scope") + assert "timed out" in ex.value.message.lower() + + def test_username_password_credential(): expected_token = "access-token" transport = validating_transport( From 1255e65425463a88cd338ed91282c87c2aba9ae6 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Tue, 30 Jul 2019 20:19:31 -0700 Subject: [PATCH 168/244] KV aiohttp by default (#6563) * Aiohttp default async transport * Record keys with aiohttp * Record secrets with aiohttp --- .../azure/keyvault/secrets/_shared/async_client_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 0119ef5a6e44..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport +from azure.core.pipeline.transport import AsyncHttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient From 7090e9223a1caa190759bc6efcf5f7a36f7f9d2f Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 10:27:22 -0700 Subject: [PATCH 169/244] KV moved paging return type to ItemPaged (#6558) * KV with latest autorest * Make KV return ItemPaged from azure-core --- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../keys/_shared/async_client_base.py | 19 ----- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../secrets/_shared/async_client_base.py | 19 ----- 10 files changed, 416 insertions(+), 142 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, From 77c4504d45499c5eae89bf00b0182622264c03ee Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:40:30 -0700 Subject: [PATCH 170/244] Remove docdb mgmt package from master (#6585) --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 - sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 - sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 - .../azure-mgmt-documentdb/azure/__init__.py | 1 - .../azure/mgmt/__init__.py | 1 - .../azure/mgmt/documentdb/__init__.py | 18 - .../azure/mgmt/documentdb/document_db.py | 83 -- .../azure/mgmt/documentdb/models/__init__.py | 52 - .../documentdb/models/consistency_policy.py | 50 - .../documentdb/models/database_account.py | 117 --- .../database_account_connection_string.py | 39 - ...tabase_account_create_update_parameters.py | 90 -- ..._account_list_connection_strings_result.py | 29 - .../database_account_list_keys_result.py | 53 - ...base_account_list_read_only_keys_result.py | 41 - .../models/database_account_paged.py | 27 - .../database_account_patch_parameters.py | 31 - ...abase_account_regenerate_key_parameters.py | 33 - .../documentdb/models/document_db_enums.py | 41 - .../documentdb/models/failover_policies.py | 28 - .../mgmt/documentdb/models/failover_policy.py | 48 - .../azure/mgmt/documentdb/models/location.py | 58 -- .../azure/mgmt/documentdb/models/resource.py | 54 -- .../mgmt/documentdb/operations/__init__.py | 16 - .../database_accounts_operations.py | 918 ------------------ .../azure/mgmt/documentdb/version.py | 13 - .../azure_bdist_wheel.py | 54 -- sdk/cosmos/azure-mgmt-documentdb/build.json | 5 - .../dev_requirements.txt | 1 - .../azure-mgmt-documentdb/sdk_packaging.toml | 2 - sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 - sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 -- ..._mgmt_documentdb.test_accounts_create.yaml | 193 ---- ..._mgmt_documentdb.test_accounts_delete.yaml | 467 --------- ...gmt_documentdb.test_accounts_features.yaml | 272 ------ .../tests/test_mgmt_documentdb.py | 146 --- 36 files changed, 3147 deletions(-) delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst deleted file mode 100644 index eb7345b4071e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. :changelog: - -Release History -=============== - -0.1.3 (2017-05-02) -++++++++++++++++++ - -* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix - -0.1.2 (2017-04-20) -++++++++++++++++++ - -This wheel package is now built with the azure wheel extension - -0.1.1 (2017-03-21) -++++++++++++++++++ - -* Added support for listing database account connection strings - -0.1.0 (2017-01-31) -++++++++++++++++++ - -* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in deleted file mode 100644 index 9ecaeb15de50..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst deleted file mode 100644 index a5204ea75358..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/README.rst +++ /dev/null @@ -1,52 +0,0 @@ -Microsoft Azure SDK for Python -============================== - -This is the Microsoft Azure DocumentDB Management Client Library. - -Azure Resource Manager (ARM) is the next generation of management APIs that -replace the old Azure Service Management (ASM). - -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. - -For the older Azure Service Management (ASM) libraries, see -`azure-servicemanagement-legacy `__ library. - -For a more complete set of Azure libraries, see the `azure `__ bundle package. - - -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - -Usage -===== - -For code examples, see `DocumentDB Management -`__ -on readthedocs.org. - - -Provide Feedback -================ - -If you encounter any bugs or have suggestions, please file an issue in the -`Issues `__ -section of the project. - - -.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py deleted file mode 100755 index 3ec900145f1e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .document_db import DocumentDB -from .version import VERSION - -__all__ = ['DocumentDB'] - -__version__ = VERSION - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py deleted file mode 100755 index 5eda44ab3e32..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import ServiceClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.database_accounts_operations import DatabaseAccountsOperations -from . import models - - -class DocumentDBConfiguration(AzureConfiguration): - """Configuration for DocumentDB - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") - if not base_url: - base_url = 'https://management.azure.com' - - super(DocumentDBConfiguration, self).__init__(base_url) - - self.add_user_agent('documentdb/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class DocumentDB(object): - """Azure DocumentDB Database Service Resource Provider REST API - - :ivar config: Configuration for client. - :vartype config: DocumentDBConfiguration - - :ivar database_accounts: DatabaseAccounts operations - :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2015-04-08' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.database_accounts = DatabaseAccountsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py deleted file mode 100755 index 2ed68c568a84..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .consistency_policy import ConsistencyPolicy -from .location import Location -from .failover_policy import FailoverPolicy -from .database_account import DatabaseAccount -from .failover_policies import FailoverPolicies -from .resource import Resource -from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters -from .database_account_patch_parameters import DatabaseAccountPatchParameters -from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult -from .database_account_list_keys_result import DatabaseAccountListKeysResult -from .database_account_connection_string import DatabaseAccountConnectionString -from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult -from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters -from .database_account_paged import DatabaseAccountPaged -from .document_db_enums import ( - DatabaseAccountKind, - DatabaseAccountOfferType, - DefaultConsistencyLevel, - KeyKind, -) - -__all__ = [ - 'ConsistencyPolicy', - 'Location', - 'FailoverPolicy', - 'DatabaseAccount', - 'FailoverPolicies', - 'Resource', - 'DatabaseAccountCreateUpdateParameters', - 'DatabaseAccountPatchParameters', - 'DatabaseAccountListReadOnlyKeysResult', - 'DatabaseAccountListKeysResult', - 'DatabaseAccountConnectionString', - 'DatabaseAccountListConnectionStringsResult', - 'DatabaseAccountRegenerateKeyParameters', - 'DatabaseAccountPaged', - 'DatabaseAccountKind', - 'DatabaseAccountOfferType', - 'DefaultConsistencyLevel', - 'KeyKind', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py deleted file mode 100755 index d8cefd4c0b59..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConsistencyPolicy(Model): - """The consistency policy for the DocumentDB database account. - - :param default_consistency_level: The default consistency level and - configuration settings of the DocumentDB account. Possible values include: - 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' - :type default_consistency_level: str or :class:`DefaultConsistencyLevel - ` - :param max_staleness_prefix: When used with the Bounded Staleness - consistency level, this value represents the number of stale requests - tolerated. Accepted range for this value is 1 – 2,147,483,647. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_staleness_prefix: long - :param max_interval_in_seconds: When used with the Bounded Staleness - consistency level, this value represents the time amount of staleness (in - seconds) tolerated. Accepted range for this value is 1 - 100. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_interval_in_seconds: int - """ - - _validation = { - 'default_consistency_level': {'required': True}, - 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, - 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, - 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, - 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, - } - - def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): - self.default_consistency_level = default_consistency_level - self.max_staleness_prefix = max_staleness_prefix - self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py deleted file mode 100755 index 89031adc35cb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccount(Resource): - """A DocumentDB database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param provisioning_state: - :type provisioning_state: str - :ivar document_endpoint: The connection endpoint for the DocumentDB - database account. - :vartype document_endpoint: str - :ivar database_account_offer_type: The offer type for the DocumentDB - database account. Default value: Standard. Possible values include: - 'Standard' - :vartype database_account_offer_type: str or - :class:`DatabaseAccountOfferType - ` - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - :param consistency_policy: The consistency policy for the DocumentDB - database account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :ivar write_locations: An array that contains the write location for the - DocumentDB account. - :vartype write_locations: list of :class:`Location - ` - :ivar read_locations: An array that contains of the read locations enabled - for the DocumentDB account. - :vartype read_locations: list of :class:`Location - ` - :ivar failover_policies: An array that contains the regions ordered by - their failover priorities. - :vartype failover_policies: list of :class:`FailoverPolicy - ` - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'document_endpoint': {'readonly': True}, - 'database_account_offer_type': {'readonly': True}, - 'write_locations': {'readonly': True}, - 'read_locations': {'readonly': True}, - 'failover_policies': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, - 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, - 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): - super(DatabaseAccount, self).__init__(location=location, tags=tags) - self.kind = kind - self.provisioning_state = provisioning_state - self.document_endpoint = None - self.database_account_offer_type = None - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover - self.consistency_policy = consistency_policy - self.write_locations = None - self.read_locations = None - self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py deleted file mode 100755 index db1828208069..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountConnectionString(Model): - """Connection string for the DocumentDB account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar connection_string: Value of the connection string - :vartype connection_string: str - :ivar description: Description of the connection string - :vartype description: str - """ - - _validation = { - 'connection_string': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self): - self.connection_string = None - self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py deleted file mode 100755 index 30978f482f0b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccountCreateUpdateParameters(Resource): - """Parameters to create and update DocumentDB database accounts. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param consistency_policy: The consistency policy for the DocumentDB - account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :param locations: An array that contains the georeplication locations - enabled for the DocumentDB account. - :type locations: list of :class:`Location - ` - :ivar database_account_offer_type: Default value: "Standard" . - :vartype database_account_offer_type: str - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - } - - database_account_offer_type = "Standard" - - def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): - super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) - self.kind = kind - self.consistency_policy = consistency_policy - self.locations = locations - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py deleted file mode 100755 index 7cddc00a3de1..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListConnectionStringsResult(Model): - """The connection strings for the given database account. - - :param connection_strings: An array that contains the connection strings - for the DocumentDB account. - :type connection_strings: list of :class:`DatabaseAccountConnectionString - ` - """ - - _attribute_map = { - 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, - } - - def __init__(self, connection_strings=None): - self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py deleted file mode 100755 index 4d775054ac14..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListKeysResult(Model): - """The access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_master_key: Base 64 encoded value of the primary read-write - key. - :vartype primary_master_key: str - :ivar secondary_master_key: Base 64 encoded value of the secondary - read-write key. - :vartype secondary_master_key: str - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_master_key': {'readonly': True}, - 'secondary_master_key': {'readonly': True}, - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, - 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, - 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_master_key = None - self.secondary_master_key = None - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py deleted file mode 100755 index 3330353950c6..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListReadOnlyKeysResult(Model): - """The read-only access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py deleted file mode 100755 index 4cb94909c515..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseAccountPaged(Paged): - """ - A paging container for iterating over a list of DatabaseAccount object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py deleted file mode 100755 index be78a4fd6817..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountPatchParameters(Model): - """Parameters for patching Azure DocumentDB database account properties. - - :param tags: - :type tags: dict - """ - - _validation = { - 'tags': {'required': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, tags): - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py deleted file mode 100755 index 3bff90d33db3..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountRegenerateKeyParameters(Model): - """Parameters to regenerate the keys within the database account. - - :param key_kind: The access key to regenerate. Possible values include: - 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - """ - - _validation = { - 'key_kind': {'required': True}, - } - - _attribute_map = { - 'key_kind': {'key': 'keyKind', 'type': 'str'}, - } - - def __init__(self, key_kind): - self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py deleted file mode 100755 index 1e87cecaeb2a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class DatabaseAccountKind(Enum): - - global_document_db = "GlobalDocumentDB" - mongo_db = "MongoDB" - parse = "Parse" - - -class DatabaseAccountOfferType(Enum): - - standard = "Standard" - - -class DefaultConsistencyLevel(Enum): - - eventual = "Eventual" - session = "Session" - bounded_staleness = "BoundedStaleness" - strong = "Strong" - consistent_prefix = "ConsistentPrefix" - - -class KeyKind(Enum): - - primary = "primary" - secondary = "secondary" - primary_readonly = "primaryReadonly" - secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py deleted file mode 100755 index 4c3ebff5e3b5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicies(Model): - """The list of new failover policies for the failover priority change. - - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - """ - - _attribute_map = { - 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, failover_policies=None): - self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py deleted file mode 100755 index 99cc2769403b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicy(Model): - """The failover policy for a given region of a database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region in which the database - account replicates to. Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region in which the database account - exists. - :type location_name: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py deleted file mode 100755 index 8bc82bde2c3f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Location(Model): - """A region in which the Azure DocumentDB database account is deployed. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region within the database account. - Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region. - :type location_name: str - :ivar document_endpoint: The connection endpoint for the specific region. - Example: - https://<accountName>-<locationName>.documents.azure.com:443/ - :vartype document_endpoint: str - :param provisioning_state: - :type provisioning_state: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.document_endpoint = None - self.provisioning_state = provisioning_state - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py deleted file mode 100755 index d5e887d0b78a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """A database account resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, location, tags=None): - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py deleted file mode 100755 index 27ed7c069537..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .database_accounts_operations import DatabaseAccountsOperations - -__all__ = [ - 'DatabaseAccountsOperations', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py deleted file mode 100755 index 2bb39b1f6839..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py +++ /dev/null @@ -1,918 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrestazure.azure_operation import AzureOperationPoller -import uuid - -from .. import models - - -class DatabaseAccountsOperations(object): - """DatabaseAccountsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". - """ - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-04-08" - - self.config = config - - def get( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Retrieves the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def patch( - self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): - """Patches the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param tags: - :type tags: dict - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - update_parameters = models.DatabaseAccountPatchParameters(tags=tags) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(update_parameters, 'DatabaseAccountPatchParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.patch(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def create_or_update( - self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): - """Creates or updates an Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param create_update_parameters: The parameters to provide for the - current database account. - :type create_update_parameters: - :class:`DatabaseAccountCreateUpdateParameters - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def delete( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Deletes an existing Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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 - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - def long_running_send(): - - request = self._client.delete(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def failover_priority_change( - self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): - """Changes the failover priority for the Azure DocumentDB database - account. A failover priority of 0 indicates a write region. The maximum - value for a failover priority = (total number of regions - 1). Failover - priority values must be unique for each of the regions in which the - database account exists. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(failover_parameters, 'FailoverPolicies') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - subscription. - - :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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - given resource group. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the access keys for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_connection_strings( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the connection strings for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListConnectionStringsResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_read_only_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the read-only access keys for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListReadOnlyKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def regenerate_key( - self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): - """Regenerates an access key for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param key_kind: The access key to regenerate. Possible values - include: 'primary', 'secondary', 'primaryReadonly', - 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def check_name_exists( - self, account_name, custom_headers=None, raw=False, **operation_config): - """Checks that the Azure DocumentDB account name already exists. A valid - account name may contain only lowercase letters, numbers, and the '-' - character, and must be between 3 and 50 characters. - - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: bool - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' - path_format_arguments = { - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.head(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = (response.status_code == 200) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py deleted file mode 100755 index 95ed79d29108..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.3" - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -from distutils import log as logger -import os.path - -from wheel.bdist_wheel import bdist_wheel -class azure_bdist_wheel(bdist_wheel): - """The purpose of this class is to build wheel a little differently than the sdist, - without requiring to build the wheel from the sdist (i.e. you can build the wheel - directly from source). - """ - - description = "Create an Azure wheel distribution" - - user_options = bdist_wheel.user_options + \ - [('azure-namespace-package=', None, - "Name of the deepest nspkg used")] - - def initialize_options(self): - bdist_wheel.initialize_options(self) - self.azure_namespace_package = None - - def finalize_options(self): - bdist_wheel.finalize_options(self) - if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): - raise ValueError("azure_namespace_package must finish by -nspkg") - - def run(self): - if not self.distribution.install_requires: - self.distribution.install_requires = [] - self.distribution.install_requires.append( - "{}>=2.0.0".format(self.azure_namespace_package)) - bdist_wheel.run(self) - - def write_record(self, bdist_dir, distinfo_dir): - if self.azure_namespace_package: - # Split and remove last part, assuming it's "nspkg" - subparts = self.azure_namespace_package.split('-')[0:-1] - folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] - for azure_sub_package in folder_with_init: - init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') - if os.path.isfile(init_file): - logger.info("manually remove {} while building the wheel".format(init_file)) - os.remove(init_file) - else: - raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) - bdist_wheel.write_record(self, bdist_dir, distinfo_dir) -cmdclass = { - 'bdist_wheel': azure_bdist_wheel, -} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json deleted file mode 100644 index 4d98fc12a39e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/build.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "autorest": "1.0.1-20170501-2300-nightly", - "date": "2017-05-01T20:13:42Z", - "version": "0.1.3" -} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt deleted file mode 100644 index 6ccb7f031ddd..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt +++ /dev/null @@ -1 +0,0 @@ --e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml deleted file mode 100644 index e7687fdae93b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml +++ /dev/null @@ -1,2 +0,0 @@ -[packaging] -auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg deleted file mode 100644 index 856f4164982c..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[bdist_wheel] -universal=1 -azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py deleted file mode 100644 index ddef54e31bb5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.py +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env python - -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup -try: - from azure_bdist_wheel import cmdclass -except ImportError: - from distutils import log as logger - logger.warn("Wheel is not available, disabling bdist_wheel hook") - cmdclass = {} - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-documentdb" -PACKAGE_PPRINT_NAME = "DocumentDB Management" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') - -# azure v0.x is not compatible with this package -# azure v0.x used to have a __version__ attribute (newer versions don't) -try: - import azure - try: - ver = azure.__version__ - raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' - ) - except AttributeError: - pass -except ImportError: - pass - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError('Cannot find version information') - -with open('README.rst', encoding='utf-8') as f: - readme = f.read() -with open('HISTORY.rst', encoding='utf-8') as f: - history = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + history, - license='MIT License', - author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', - classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'License :: OSI Approved :: MIT License', - ], - zip_safe=False, - packages=find_packages(), - install_requires=[ - 'msrestazure~=0.4.7', - 'azure-common~=1.1.5', - ], - cmdclass=cmdclass -) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml deleted file mode 100644 index d470d7f8673d..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml +++ /dev/null @@ -1,193 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] - method: HEAD - uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: ''} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['142'] - Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-ratelimit-remaining-tenant-reads: ['14999'] - x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] - status: {code: 404, message: NotFound} -- request: - body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], - "databaseAccountOfferType": "Standard"}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['121'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['910'] - x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Completed","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['33'] - x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml deleted file mode 100644 index e6f4e2348f8f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml +++ /dev/null @@ -1,467 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' - under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' - was not found."}}'} - headers: - Cache-Control: [no-cache] - Content-Length: ['214'] - Content-Type: [application/json; charset=utf-8] - Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-failure-cause: [gateway] - x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] - status: {code: 404, message: Not Found} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml deleted file mode 100644 index b2e4b82a9d9e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml +++ /dev/null @@ -1,272 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1144'] - x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1156'] - x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['2225'] - x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] - status: {code: 200, message: Ok} -- request: - body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['73'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 - response: - body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique - and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['170'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] - status: {code: 400, message: BadRequest} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 - response: - body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['239'] - x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] - status: {code: 200, message: Ok} -- request: - body: '{"keyKind": "primary"}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['22'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] - x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py deleted file mode 100644 index 902666a22cf0..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py +++ /dev/null @@ -1,146 +0,0 @@ -# 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. -#-------------------------------------------------------------------------- -import unittest - -import azure.mgmt.documentdb -from msrestazure.azure_exceptions import CloudError -from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer - - -class MgmtDocDBTest(AzureMgmtTestCase): - - def setUp(self): - super(MgmtDocDBTest, self).setUp() - self.client = self.create_mgmt_client( - azure.mgmt.documentdb.DocumentDB - ) - - @ResourceGroupPreparer() - def test_accounts_create(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtst') - - self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) - - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - account = async_docdb_create.result() - self.assertIsNotNone(account) - # Rest API issue - # self.assertEqual(account.name, account_name) - - @ResourceGroupPreparer() - def test_accounts_features(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtest') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - account = self.client.database_accounts.get( - resource_group.name, - account_name - ) - self.assertEqual(account.name, account_name) - - my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) - self.assertEqual(len(my_accounts), 1) - self.assertEqual(my_accounts[0].name, account_name) - - my_accounts = list(self.client.database_accounts.list()) - self.assertTrue(len(my_accounts) >= 1) - self.assertTrue(any(db.name == account_name for db in my_accounts)) - - # I guess we can make this test with no error, need to check with DocDB team - # This is an interesting test anyway, this implies that the serialization works - # and error message is available. Since this method does not return an object - # (i.e. no deserialization to test), this is a complete test. - # We are NOT here to test the RestAPI, but the Swagger file and Python code. - with self.assertRaises(CloudError) as cm: - async_change = self.client.database_accounts.failover_priority_change( - resource_group.name, - account_name, - [{ - 'location_name': self.region, - 'failover_priority': 0 - }] - ) - async_change.wait() - self.assertIn('Failover priorities must be unique', cm.exception.message) - - my_keys = self.client.database_accounts.list_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_master_key) - self.assertIsNotNone(my_keys.secondary_master_key) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - my_keys = self.client.database_accounts.list_read_only_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - async_regenerate = self.client.database_accounts.regenerate_key( - resource_group.name, - account_name, - "primary" - ) - async_regenerate.wait() - - @ResourceGroupPreparer() - def test_accounts_delete(self, resource_group, location): - account_name = self.get_resource_name('pydocumentdbtst') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - # Current implementation of msrestazure does not support 404 as a end of LRO delete - # https://github.com/Azure/msrestazure-for-python/issues/7 - async_delete = self.client.database_accounts.delete(resource_group.name, account_name) - try: - async_delete.wait() - except CloudError as err: - if err.response.status_code != 404: - raise - - -#------------------------------------------------------------------------------ -if __name__ == '__main__': - unittest.main() From 3463ad0e57e44d151630580cf47d97081888fd66 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:42:03 -0700 Subject: [PATCH 171/244] Revert "Remove docdb mgmt package from master (#6585)" (#6593) This reverts commit d2ed7d87997eac9b715ee9802c15349a12446b84. --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 + sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 + sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 + .../azure-mgmt-documentdb/azure/__init__.py | 1 + .../azure/mgmt/__init__.py | 1 + .../azure/mgmt/documentdb/__init__.py | 18 + .../azure/mgmt/documentdb/document_db.py | 83 ++ .../azure/mgmt/documentdb/models/__init__.py | 52 + .../documentdb/models/consistency_policy.py | 50 + .../documentdb/models/database_account.py | 117 +++ .../database_account_connection_string.py | 39 + ...tabase_account_create_update_parameters.py | 90 ++ ..._account_list_connection_strings_result.py | 29 + .../database_account_list_keys_result.py | 53 + ...base_account_list_read_only_keys_result.py | 41 + .../models/database_account_paged.py | 27 + .../database_account_patch_parameters.py | 31 + ...abase_account_regenerate_key_parameters.py | 33 + .../documentdb/models/document_db_enums.py | 41 + .../documentdb/models/failover_policies.py | 28 + .../mgmt/documentdb/models/failover_policy.py | 48 + .../azure/mgmt/documentdb/models/location.py | 58 ++ .../azure/mgmt/documentdb/models/resource.py | 54 ++ .../mgmt/documentdb/operations/__init__.py | 16 + .../database_accounts_operations.py | 918 ++++++++++++++++++ .../azure/mgmt/documentdb/version.py | 13 + .../azure_bdist_wheel.py | 54 ++ sdk/cosmos/azure-mgmt-documentdb/build.json | 5 + .../dev_requirements.txt | 1 + .../azure-mgmt-documentdb/sdk_packaging.toml | 2 + sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 + sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 ++ ..._mgmt_documentdb.test_accounts_create.yaml | 193 ++++ ..._mgmt_documentdb.test_accounts_delete.yaml | 467 +++++++++ ...gmt_documentdb.test_accounts_features.yaml | 272 ++++++ .../tests/test_mgmt_documentdb.py | 146 +++ 36 files changed, 3147 insertions(+) create mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in create mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json create mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt create mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst new file mode 100644 index 000000000000..eb7345b4071e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst @@ -0,0 +1,24 @@ +.. :changelog: + +Release History +=============== + +0.1.3 (2017-05-02) +++++++++++++++++++ + +* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix + +0.1.2 (2017-04-20) +++++++++++++++++++ + +This wheel package is now built with the azure wheel extension + +0.1.1 (2017-03-21) +++++++++++++++++++ + +* Added support for listing database account connection strings + +0.1.0 (2017-01-31) +++++++++++++++++++ + +* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in new file mode 100644 index 000000000000..9ecaeb15de50 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in @@ -0,0 +1,2 @@ +include *.rst +include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst new file mode 100644 index 000000000000..a5204ea75358 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/README.rst @@ -0,0 +1,52 @@ +Microsoft Azure SDK for Python +============================== + +This is the Microsoft Azure DocumentDB Management Client Library. + +Azure Resource Manager (ARM) is the next generation of management APIs that +replace the old Azure Service Management (ASM). + +This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. + +For the older Azure Service Management (ASM) libraries, see +`azure-servicemanagement-legacy `__ library. + +For a more complete set of Azure libraries, see the `azure `__ bundle package. + + +Compatibility +============= + +**IMPORTANT**: If you have an earlier version of the azure package +(version < 1.0), you should uninstall it before installing this package. + +You can check the version using pip: + +.. code:: shell + + pip freeze + +If you see azure==0.11.0 (or any version below 1.0), uninstall it first: + +.. code:: shell + + pip uninstall azure + + +Usage +===== + +For code examples, see `DocumentDB Management +`__ +on readthedocs.org. + + +Provide Feedback +================ + +If you encounter any bugs or have suggestions, please file an issue in the +`Issues `__ +section of the project. + + +.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py new file mode 100755 index 000000000000..3ec900145f1e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .document_db import DocumentDB +from .version import VERSION + +__all__ = ['DocumentDB'] + +__version__ = VERSION + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py new file mode 100755 index 000000000000..5eda44ab3e32 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import ServiceClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.database_accounts_operations import DatabaseAccountsOperations +from . import models + + +class DocumentDBConfiguration(AzureConfiguration): + """Configuration for DocumentDB + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not isinstance(subscription_id, str): + raise TypeError("Parameter 'subscription_id' must be str.") + if not base_url: + base_url = 'https://management.azure.com' + + super(DocumentDBConfiguration, self).__init__(base_url) + + self.add_user_agent('documentdb/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class DocumentDB(object): + """Azure DocumentDB Database Service Resource Provider REST API + + :ivar config: Configuration for client. + :vartype config: DocumentDBConfiguration + + :ivar database_accounts: DatabaseAccounts operations + :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) + self._client = ServiceClient(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2015-04-08' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.database_accounts = DatabaseAccountsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py new file mode 100755 index 000000000000..2ed68c568a84 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .consistency_policy import ConsistencyPolicy +from .location import Location +from .failover_policy import FailoverPolicy +from .database_account import DatabaseAccount +from .failover_policies import FailoverPolicies +from .resource import Resource +from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters +from .database_account_patch_parameters import DatabaseAccountPatchParameters +from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult +from .database_account_list_keys_result import DatabaseAccountListKeysResult +from .database_account_connection_string import DatabaseAccountConnectionString +from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult +from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters +from .database_account_paged import DatabaseAccountPaged +from .document_db_enums import ( + DatabaseAccountKind, + DatabaseAccountOfferType, + DefaultConsistencyLevel, + KeyKind, +) + +__all__ = [ + 'ConsistencyPolicy', + 'Location', + 'FailoverPolicy', + 'DatabaseAccount', + 'FailoverPolicies', + 'Resource', + 'DatabaseAccountCreateUpdateParameters', + 'DatabaseAccountPatchParameters', + 'DatabaseAccountListReadOnlyKeysResult', + 'DatabaseAccountListKeysResult', + 'DatabaseAccountConnectionString', + 'DatabaseAccountListConnectionStringsResult', + 'DatabaseAccountRegenerateKeyParameters', + 'DatabaseAccountPaged', + 'DatabaseAccountKind', + 'DatabaseAccountOfferType', + 'DefaultConsistencyLevel', + 'KeyKind', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py new file mode 100755 index 000000000000..d8cefd4c0b59 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConsistencyPolicy(Model): + """The consistency policy for the DocumentDB database account. + + :param default_consistency_level: The default consistency level and + configuration settings of the DocumentDB account. Possible values include: + 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' + :type default_consistency_level: str or :class:`DefaultConsistencyLevel + ` + :param max_staleness_prefix: When used with the Bounded Staleness + consistency level, this value represents the number of stale requests + tolerated. Accepted range for this value is 1 – 2,147,483,647. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_staleness_prefix: long + :param max_interval_in_seconds: When used with the Bounded Staleness + consistency level, this value represents the time amount of staleness (in + seconds) tolerated. Accepted range for this value is 1 - 100. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_interval_in_seconds: int + """ + + _validation = { + 'default_consistency_level': {'required': True}, + 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, + 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, + 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, + 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, + } + + def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): + self.default_consistency_level = default_consistency_level + self.max_staleness_prefix = max_staleness_prefix + self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py new file mode 100755 index 000000000000..89031adc35cb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py @@ -0,0 +1,117 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccount(Resource): + """A DocumentDB database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param provisioning_state: + :type provisioning_state: str + :ivar document_endpoint: The connection endpoint for the DocumentDB + database account. + :vartype document_endpoint: str + :ivar database_account_offer_type: The offer type for the DocumentDB + database account. Default value: Standard. Possible values include: + 'Standard' + :vartype database_account_offer_type: str or + :class:`DatabaseAccountOfferType + ` + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + :param consistency_policy: The consistency policy for the DocumentDB + database account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :ivar write_locations: An array that contains the write location for the + DocumentDB account. + :vartype write_locations: list of :class:`Location + ` + :ivar read_locations: An array that contains of the read locations enabled + for the DocumentDB account. + :vartype read_locations: list of :class:`Location + ` + :ivar failover_policies: An array that contains the regions ordered by + their failover priorities. + :vartype failover_policies: list of :class:`FailoverPolicy + ` + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'document_endpoint': {'readonly': True}, + 'database_account_offer_type': {'readonly': True}, + 'write_locations': {'readonly': True}, + 'read_locations': {'readonly': True}, + 'failover_policies': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, + 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, + 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): + super(DatabaseAccount, self).__init__(location=location, tags=tags) + self.kind = kind + self.provisioning_state = provisioning_state + self.document_endpoint = None + self.database_account_offer_type = None + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover + self.consistency_policy = consistency_policy + self.write_locations = None + self.read_locations = None + self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py new file mode 100755 index 000000000000..db1828208069 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountConnectionString(Model): + """Connection string for the DocumentDB account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar connection_string: Value of the connection string + :vartype connection_string: str + :ivar description: Description of the connection string + :vartype description: str + """ + + _validation = { + 'connection_string': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self): + self.connection_string = None + self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py new file mode 100755 index 000000000000..30978f482f0b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccountCreateUpdateParameters(Resource): + """Parameters to create and update DocumentDB database accounts. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param consistency_policy: The consistency policy for the DocumentDB + account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :param locations: An array that contains the georeplication locations + enabled for the DocumentDB account. + :type locations: list of :class:`Location + ` + :ivar database_account_offer_type: Default value: "Standard" . + :vartype database_account_offer_type: str + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'locations': {'required': True}, + 'database_account_offer_type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + } + + database_account_offer_type = "Standard" + + def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): + super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) + self.kind = kind + self.consistency_policy = consistency_policy + self.locations = locations + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py new file mode 100755 index 000000000000..7cddc00a3de1 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListConnectionStringsResult(Model): + """The connection strings for the given database account. + + :param connection_strings: An array that contains the connection strings + for the DocumentDB account. + :type connection_strings: list of :class:`DatabaseAccountConnectionString + ` + """ + + _attribute_map = { + 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, + } + + def __init__(self, connection_strings=None): + self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py new file mode 100755 index 000000000000..4d775054ac14 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListKeysResult(Model): + """The access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_master_key: Base 64 encoded value of the primary read-write + key. + :vartype primary_master_key: str + :ivar secondary_master_key: Base 64 encoded value of the secondary + read-write key. + :vartype secondary_master_key: str + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_master_key': {'readonly': True}, + 'secondary_master_key': {'readonly': True}, + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, + 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, + 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_master_key = None + self.secondary_master_key = None + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py new file mode 100755 index 000000000000..3330353950c6 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListReadOnlyKeysResult(Model): + """The read-only access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py new file mode 100755 index 000000000000..4cb94909c515 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class DatabaseAccountPaged(Paged): + """ + A paging container for iterating over a list of DatabaseAccount object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py new file mode 100755 index 000000000000..be78a4fd6817 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountPatchParameters(Model): + """Parameters for patching Azure DocumentDB database account properties. + + :param tags: + :type tags: dict + """ + + _validation = { + 'tags': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, tags): + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py new file mode 100755 index 000000000000..3bff90d33db3 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountRegenerateKeyParameters(Model): + """Parameters to regenerate the keys within the database account. + + :param key_kind: The access key to regenerate. Possible values include: + 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + """ + + _validation = { + 'key_kind': {'required': True}, + } + + _attribute_map = { + 'key_kind': {'key': 'keyKind', 'type': 'str'}, + } + + def __init__(self, key_kind): + self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py new file mode 100755 index 000000000000..1e87cecaeb2a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class DatabaseAccountKind(Enum): + + global_document_db = "GlobalDocumentDB" + mongo_db = "MongoDB" + parse = "Parse" + + +class DatabaseAccountOfferType(Enum): + + standard = "Standard" + + +class DefaultConsistencyLevel(Enum): + + eventual = "Eventual" + session = "Session" + bounded_staleness = "BoundedStaleness" + strong = "Strong" + consistent_prefix = "ConsistentPrefix" + + +class KeyKind(Enum): + + primary = "primary" + secondary = "secondary" + primary_readonly = "primaryReadonly" + secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py new file mode 100755 index 000000000000..4c3ebff5e3b5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicies(Model): + """The list of new failover policies for the failover priority change. + + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + """ + + _attribute_map = { + 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, failover_policies=None): + self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py new file mode 100755 index 000000000000..99cc2769403b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicy(Model): + """The failover policy for a given region of a database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region in which the database + account replicates to. Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region in which the database account + exists. + :type location_name: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py new file mode 100755 index 000000000000..8bc82bde2c3f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Location(Model): + """A region in which the Azure DocumentDB database account is deployed. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region within the database account. + Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region. + :type location_name: str + :ivar document_endpoint: The connection endpoint for the specific region. + Example: + https://<accountName>-<locationName>.documents.azure.com:443/ + :vartype document_endpoint: str + :param provisioning_state: + :type provisioning_state: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'document_endpoint': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.document_endpoint = None + self.provisioning_state = provisioning_state + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py new file mode 100755 index 000000000000..d5e887d0b78a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """A database account resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, location, tags=None): + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py new file mode 100755 index 000000000000..27ed7c069537 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py @@ -0,0 +1,16 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .database_accounts_operations import DatabaseAccountsOperations + +__all__ = [ + 'DatabaseAccountsOperations', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py new file mode 100755 index 000000000000..2bb39b1f6839 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py @@ -0,0 +1,918 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrestazure.azure_operation import AzureOperationPoller +import uuid + +from .. import models + + +class DatabaseAccountsOperations(object): + """DatabaseAccountsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". + """ + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-04-08" + + self.config = config + + def get( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Retrieves the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def patch( + self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): + """Patches the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param tags: + :type tags: dict + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + update_parameters = models.DatabaseAccountPatchParameters(tags=tags) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(update_parameters, 'DatabaseAccountPatchParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.patch(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def create_or_update( + self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates an Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param create_update_parameters: The parameters to provide for the + current database account. + :type create_update_parameters: + :class:`DatabaseAccountCreateUpdateParameters + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.put(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def delete( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Deletes an existing Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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 + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + def long_running_send(): + + request = self._client.delete(url, query_parameters) + return self._client.send(request, header_parameters, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def failover_priority_change( + self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): + """Changes the failover priority for the Azure DocumentDB database + account. A failover priority of 0 indicates a write region. The maximum + value for a failover priority = (total number of regions - 1). Failover + priority values must be unique for each of the regions in which the + database account exists. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(failover_parameters, 'FailoverPolicies') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + subscription. + + :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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + given resource group. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the access keys for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_connection_strings( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the connection strings for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListConnectionStringsResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_read_only_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the read-only access keys for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListReadOnlyKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def regenerate_key( + self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): + """Regenerates an access key for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param key_kind: The access key to regenerate. Possible values + include: 'primary', 'secondary', 'primaryReadonly', + 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def check_name_exists( + self, account_name, custom_headers=None, raw=False, **operation_config): + """Checks that the Azure DocumentDB account name already exists. A valid + account name may contain only lowercase letters, numbers, and the '-' + character, and must be between 3 and 50 characters. + + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: bool + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' + path_format_arguments = { + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.head(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = (response.status_code == 200) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py new file mode 100755 index 000000000000..95ed79d29108 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.3" + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py new file mode 100644 index 000000000000..8a81d1b61775 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py @@ -0,0 +1,54 @@ +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +from distutils import log as logger +import os.path + +from wheel.bdist_wheel import bdist_wheel +class azure_bdist_wheel(bdist_wheel): + """The purpose of this class is to build wheel a little differently than the sdist, + without requiring to build the wheel from the sdist (i.e. you can build the wheel + directly from source). + """ + + description = "Create an Azure wheel distribution" + + user_options = bdist_wheel.user_options + \ + [('azure-namespace-package=', None, + "Name of the deepest nspkg used")] + + def initialize_options(self): + bdist_wheel.initialize_options(self) + self.azure_namespace_package = None + + def finalize_options(self): + bdist_wheel.finalize_options(self) + if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): + raise ValueError("azure_namespace_package must finish by -nspkg") + + def run(self): + if not self.distribution.install_requires: + self.distribution.install_requires = [] + self.distribution.install_requires.append( + "{}>=2.0.0".format(self.azure_namespace_package)) + bdist_wheel.run(self) + + def write_record(self, bdist_dir, distinfo_dir): + if self.azure_namespace_package: + # Split and remove last part, assuming it's "nspkg" + subparts = self.azure_namespace_package.split('-')[0:-1] + folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] + for azure_sub_package in folder_with_init: + init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') + if os.path.isfile(init_file): + logger.info("manually remove {} while building the wheel".format(init_file)) + os.remove(init_file) + else: + raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) + bdist_wheel.write_record(self, bdist_dir, distinfo_dir) +cmdclass = { + 'bdist_wheel': azure_bdist_wheel, +} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json new file mode 100644 index 000000000000..4d98fc12a39e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/build.json @@ -0,0 +1,5 @@ +{ + "autorest": "1.0.1-20170501-2300-nightly", + "date": "2017-05-01T20:13:42Z", + "version": "0.1.3" +} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt new file mode 100644 index 000000000000..6ccb7f031ddd --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt @@ -0,0 +1 @@ +-e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml new file mode 100644 index 000000000000..e7687fdae93b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg new file mode 100644 index 000000000000..856f4164982c --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg @@ -0,0 +1,3 @@ +[bdist_wheel] +universal=1 +azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py new file mode 100644 index 000000000000..ddef54e31bb5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup +try: + from azure_bdist_wheel import cmdclass +except ImportError: + from distutils import log as logger + logger.warn("Wheel is not available, disabling bdist_wheel hook") + cmdclass = {} + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-documentdb" +PACKAGE_PPRINT_NAME = "DocumentDB Management" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.rst', encoding='utf-8') as f: + readme = f.read() +with open('HISTORY.rst', encoding='utf-8') as f: + history = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + history, + license='MIT License', + author='Microsoft Corporation', + author_email='ptvshelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(), + install_requires=[ + 'msrestazure~=0.4.7', + 'azure-common~=1.1.5', + ], + cmdclass=cmdclass +) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml new file mode 100644 index 000000000000..d470d7f8673d --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml @@ -0,0 +1,193 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] + method: HEAD + uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: ''} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['142'] + Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-ratelimit-remaining-tenant-reads: ['14999'] + x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] + status: {code: 404, message: NotFound} +- request: + body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], + "databaseAccountOfferType": "Standard"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['121'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['910'] + x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Completed","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['33'] + x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml new file mode 100644 index 000000000000..e6f4e2348f8f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml @@ -0,0 +1,467 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' + under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' + was not found."}}'} + headers: + Cache-Control: [no-cache] + Content-Length: ['214'] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-failure-cause: [gateway] + x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] + status: {code: 404, message: Not Found} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml new file mode 100644 index 000000000000..b2e4b82a9d9e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml @@ -0,0 +1,272 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1144'] + x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1156'] + x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2225'] + x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] + status: {code: 200, message: Ok} +- request: + body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['73'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 + response: + body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique + and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['170'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] + status: {code: 400, message: BadRequest} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 + response: + body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['239'] + x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] + status: {code: 200, message: Ok} +- request: + body: '{"keyKind": "primary"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['22'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] + x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py new file mode 100644 index 000000000000..902666a22cf0 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py @@ -0,0 +1,146 @@ +# 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. +#-------------------------------------------------------------------------- +import unittest + +import azure.mgmt.documentdb +from msrestazure.azure_exceptions import CloudError +from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer + + +class MgmtDocDBTest(AzureMgmtTestCase): + + def setUp(self): + super(MgmtDocDBTest, self).setUp() + self.client = self.create_mgmt_client( + azure.mgmt.documentdb.DocumentDB + ) + + @ResourceGroupPreparer() + def test_accounts_create(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtst') + + self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) + + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + account = async_docdb_create.result() + self.assertIsNotNone(account) + # Rest API issue + # self.assertEqual(account.name, account_name) + + @ResourceGroupPreparer() + def test_accounts_features(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtest') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + account = self.client.database_accounts.get( + resource_group.name, + account_name + ) + self.assertEqual(account.name, account_name) + + my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) + self.assertEqual(len(my_accounts), 1) + self.assertEqual(my_accounts[0].name, account_name) + + my_accounts = list(self.client.database_accounts.list()) + self.assertTrue(len(my_accounts) >= 1) + self.assertTrue(any(db.name == account_name for db in my_accounts)) + + # I guess we can make this test with no error, need to check with DocDB team + # This is an interesting test anyway, this implies that the serialization works + # and error message is available. Since this method does not return an object + # (i.e. no deserialization to test), this is a complete test. + # We are NOT here to test the RestAPI, but the Swagger file and Python code. + with self.assertRaises(CloudError) as cm: + async_change = self.client.database_accounts.failover_priority_change( + resource_group.name, + account_name, + [{ + 'location_name': self.region, + 'failover_priority': 0 + }] + ) + async_change.wait() + self.assertIn('Failover priorities must be unique', cm.exception.message) + + my_keys = self.client.database_accounts.list_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_master_key) + self.assertIsNotNone(my_keys.secondary_master_key) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + my_keys = self.client.database_accounts.list_read_only_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + async_regenerate = self.client.database_accounts.regenerate_key( + resource_group.name, + account_name, + "primary" + ) + async_regenerate.wait() + + @ResourceGroupPreparer() + def test_accounts_delete(self, resource_group, location): + account_name = self.get_resource_name('pydocumentdbtst') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + # Current implementation of msrestazure does not support 404 as a end of LRO delete + # https://github.com/Azure/msrestazure-for-python/issues/7 + async_delete = self.client.database_accounts.delete(resource_group.name, account_name) + try: + async_delete.wait() + except CloudError as err: + if err.response.status_code != 404: + raise + + +#------------------------------------------------------------------------------ +if __name__ == '__main__': + unittest.main() From a347365ee86bfee0ef66fddf1dd9b54e9630d434 Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 10:16:27 -0700 Subject: [PATCH 172/244] Update CODEOWNERS --- .github/CODEOWNERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 07d57ac48320..0172563e9a84 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -40,6 +40,9 @@ # Management Plane /**/*mgmt*/ @zikalino +# Management Plane +/**/*mgmt*/ @zikalino + ########### # Eng Sys ########### From 1dfb447abb8df7579eb1e6258486801fc79485b5 Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 11:03:35 -0700 Subject: [PATCH 173/244] more code owners --- .github/CODEOWNERS | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0172563e9a84..07d57ac48320 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -40,9 +40,6 @@ # Management Plane /**/*mgmt*/ @zikalino -# Management Plane -/**/*mgmt*/ @zikalino - ########### # Eng Sys ########### From 5244ff2852d5d9e3418df5322138e0358cb20749 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 11:58:35 -0700 Subject: [PATCH 174/244] add policy and decorators for secrets (#6453) --- .../azure/keyvault/secrets/_shared/async_client_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 193e6e324c7e..c451ffb1e766 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncHttpTransport +from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient From 8ab31e1d07fb87de903108ee1a7db03787162885 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Thu, 25 Jul 2019 12:41:38 -0700 Subject: [PATCH 175/244] Paging v2 (#6420) * First version of paging * Clean sync paging * Async paging * Name AsyncList without underscore * MyPy happyness * pylint * black * PageIterator as conf * Simplify ItemPaged * Use chain to link iterable * Make Paging more open * Docstring * pylint / mypy / black * Regenerate KV with latest Autorest + Paging branch (#6479) * Regenerate KV with latest Autorest + Paging branch * Remove unused import in tests * Make the async adapter more generic * Regeneration after operation mixin fix in Autorest * COmmit changes forgotten in #6418 * Fixing syntax for 2.7 * Move Storage Queue to new Paging (#6447) * Move Storage Queue to new Paging * Working Storage queue on new paging * Fix types * First shot of blob tests update * Fixing blob tests * File to new paging * Doc fix * Feedbacks from @annatisch * Fix last @annatisch comment * Simplify paging contract * Fix storage queue after new paging contract --- .../_key_vault_client_operations_async.py | 60 ++++------------ .../_key_vault_client_operations.py | 60 ++++------------ .../_key_vault_client_operations_async.py | 70 ++++--------------- .../_key_vault_client_operations.py | 70 ++++--------------- .../keys/_shared/async_client_base.py | 19 +++++ .../_key_vault_client_operations_async.py | 60 ++++------------ .../_key_vault_client_operations.py | 60 ++++------------ .../_key_vault_client_operations_async.py | 70 ++++--------------- .../_key_vault_client_operations.py | 70 ++++--------------- .../secrets/_shared/async_client_base.py | 19 +++++ 10 files changed, 142 insertions(+), 416 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index b5cc965119ed..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 0ae7fd5fb025..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index 08e45c2b44a7..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index b9ed6e10ea21..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 193e6e324c7e..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -21,6 +21,25 @@ pass +class AsyncPagingAdapter: + """For each item in an AsyncIterator, returns the result of applying fn to that item. + Python 3.6 added syntax that could replace this (yield within async for).""" + + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: + self._pages = pages + self._fn = fn + + def __aiter__(self): + return self + + async def __anext__(self) -> Any: + item = await self._pages.__anext__() + if not item: + raise StopAsyncIteration + return self._fn(item) + # TODO: expected type Model got Coroutine instead? + + class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index b5cc965119ed..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 0ae7fd5fb025..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index 08e45c2b44a7..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index b9ed6e10ea21..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index c451ffb1e766..0119ef5a6e44 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -21,6 +21,25 @@ pass +class AsyncPagingAdapter: + """For each item in an AsyncIterator, returns the result of applying fn to that item. + Python 3.6 added syntax that could replace this (yield within async for).""" + + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: + self._pages = pages + self._fn = fn + + def __aiter__(self): + return self + + async def __anext__(self) -> Any: + item = await self._pages.__anext__() + if not item: + raise StopAsyncIteration + return self._fn(item) + # TODO: expected type Model got Coroutine instead? + + class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, From b9284a794959fb7248d4856e5ea4eb830dd6597e Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 15:48:49 -0700 Subject: [PATCH 176/244] get rid of should only propagate (#6497) --- sdk/core/azure-core/azure/core/tracing/decorator.py | 2 +- sdk/core/azure-core/azure/core/tracing/decorator_async.py | 2 +- .../azure_core_asynctests/test_tracing_decorator_async.py | 5 ++++- sdk/core/azure-core/tests/test_tracing_decorator.py | 5 ++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 3986dcaf31ed..7d5d7bfce407 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None and orig_wrapped_span is None: + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 4df65fee77ef..781e20a6bef2 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None and orig_wrapped_span is None: + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index 82b4f97dc92f..e2a5c92e60b9 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -145,4 +145,7 @@ async def test_span_with_opencensus_complicated(value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert not parent.children[3].children + assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" + assert parent.children[3].children[1].span_data.name == "MockClient.make_request" + children = parent.children[1].children + assert len(children) == 2 diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index 764c09396255..eedd34c0afdd 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -177,4 +177,7 @@ def test_span_with_opencensus_complicated(self, value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert not parent.children[3].children + assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" + assert parent.children[3].children[1].span_data.name == "MockClient.make_request" + children = parent.children[1].children + assert len(children) == 2 From 1e743bd3fe8ad908e048aed4d9e4a2cbfcffe512 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Mon, 29 Jul 2019 14:05:36 -0700 Subject: [PATCH 177/244] decorator only trace very top level function (#6530) --- sdk/core/azure-core/azure/core/tracing/decorator.py | 2 +- sdk/core/azure-core/azure/core/tracing/decorator_async.py | 2 +- .../azure_core_asynctests/test_tracing_decorator_async.py | 5 +---- sdk/core/azure-core/tests/test_tracing_decorator.py | 5 +---- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 7d5d7bfce407..3986dcaf31ed 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 781e20a6bef2..4df65fee77ef 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index e2a5c92e60b9..82b4f97dc92f 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -145,7 +145,4 @@ async def test_span_with_opencensus_complicated(value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index eedd34c0afdd..764c09396255 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -177,7 +177,4 @@ def test_span_with_opencensus_complicated(self, value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children From 3b62776f20d3076d58c2beee777009d4a90140a1 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 08:51:19 -0700 Subject: [PATCH 178/244] Synchronous username/password auth (#6416) --- .../azure/identity/_internal/__init__.py | 1 - .../azure-identity/tests/test_identity.py | 68 ------------------- 2 files changed, 69 deletions(-) diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index e7583139395b..cfdf935b801c 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,6 +2,5 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from .auth_code_redirect_handler import AuthCodeRedirectServer from .msal_credentials import ConfidentialClientCredential, PublicClientCredential from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 3aaa54a1f28f..8e7245522519 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -22,7 +22,6 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, - InteractiveBrowserCredential, UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential @@ -244,73 +243,6 @@ def test_default_credential(): DefaultAzureCredential() -@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser -def test_interactive_credential(): - oauth_state = "state" - expected_token = "access-token" - - transport = validating_transport( - requests=[Request()] * 2, # not validating requests because they're formed by MSAL - responses=[ - # expecting tenant discovery then a token request - mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), - mock_response( - json_payload={ - "access_token": expected_token, - "expires_in": 42, - "token_type": "Bearer", - "ext_expires_in": 42, - } - ), - ], - ) - - # mock local server fakes successful authentication by immediately returning a well-formed response - auth_code_response = {"code": "authorization-code", "state": [oauth_state]} - server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) - - credential = InteractiveBrowserCredential( - client_id="guid", - client_secret="secret", - server_class=server_class, - transport=transport, - instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request - ) - - # ensure the request beginning the flow has a known state value - with patch("azure.identity.browser_auth.uuid.uuid4", lambda: oauth_state): - token = credential.get_token("scope") - assert token.token == expected_token - - -@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser -def test_interactive_credential_timeout(): - # mock transport handles MSAL's tenant discovery - transport = Mock( - send=lambda _, **__: mock_response( - json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"} - ) - ) - - # mock local server blocks long enough to exceed the timeout - timeout = 1 - server_instance = Mock(wait_for_redirect=functools.partial(time.sleep, timeout + 1)) - server_class = Mock(return_value=server_instance) - - credential = InteractiveBrowserCredential( - client_id="guid", - client_secret="secret", - server_class=server_class, - timeout=timeout, - transport=transport, - instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request - ) - - with pytest.raises(ClientAuthenticationError) as ex: - credential.get_token("scope") - assert "timed out" in ex.value.message.lower() - - def test_username_password_credential(): expected_token = "access-token" transport = validating_transport( From ebe0944e529975f91051a58bf7cd52812df4c492 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 14:04:30 -0700 Subject: [PATCH 179/244] Synchronous interactive browser authentication (#6466) --- .../azure/identity/_internal/__init__.py | 1 + .../azure-identity/tests/test_identity.py | 68 +++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index cfdf935b801c..e7583139395b 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,5 +2,6 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +from .auth_code_redirect_handler import AuthCodeRedirectServer from .msal_credentials import ConfidentialClientCredential, PublicClientCredential from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 8e7245522519..3aaa54a1f28f 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -22,6 +22,7 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, + InteractiveBrowserCredential, UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential @@ -243,6 +244,73 @@ def test_default_credential(): DefaultAzureCredential() +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential(): + oauth_state = "state" + expected_token = "access-token" + + transport = validating_transport( + requests=[Request()] * 2, # not validating requests because they're formed by MSAL + responses=[ + # expecting tenant discovery then a token request + mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), + mock_response( + json_payload={ + "access_token": expected_token, + "expires_in": 42, + "token_type": "Bearer", + "ext_expires_in": 42, + } + ), + ], + ) + + # mock local server fakes successful authentication by immediately returning a well-formed response + auth_code_response = {"code": "authorization-code", "state": [oauth_state]} + server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + # ensure the request beginning the flow has a known state value + with patch("azure.identity.browser_auth.uuid.uuid4", lambda: oauth_state): + token = credential.get_token("scope") + assert token.token == expected_token + + +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential_timeout(): + # mock transport handles MSAL's tenant discovery + transport = Mock( + send=lambda _, **__: mock_response( + json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"} + ) + ) + + # mock local server blocks long enough to exceed the timeout + timeout = 1 + server_instance = Mock(wait_for_redirect=functools.partial(time.sleep, timeout + 1)) + server_class = Mock(return_value=server_instance) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + timeout=timeout, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + with pytest.raises(ClientAuthenticationError) as ex: + credential.get_token("scope") + assert "timed out" in ex.value.message.lower() + + def test_username_password_credential(): expected_token = "access-token" transport = validating_transport( From c8b76a858f60e060e56b951d43e71c41ce7ac9f3 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Tue, 30 Jul 2019 20:19:31 -0700 Subject: [PATCH 180/244] KV aiohttp by default (#6563) * Aiohttp default async transport * Record keys with aiohttp * Record secrets with aiohttp --- .../azure/keyvault/secrets/_shared/async_client_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 0119ef5a6e44..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport +from azure.core.pipeline.transport import AsyncHttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient From d590e0d86e79c31289296784183b7f325fea3f7b Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 10:27:22 -0700 Subject: [PATCH 181/244] KV moved paging return type to ItemPaged (#6558) * KV with latest autorest * Make KV return ItemPaged from azure-core --- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../keys/_shared/async_client_base.py | 19 ----- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../secrets/_shared/async_client_base.py | 19 ----- 10 files changed, 416 insertions(+), 142 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, From 5f9cea33960f408d078ff4e918b2d4692e625054 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:40:30 -0700 Subject: [PATCH 182/244] Remove docdb mgmt package from master (#6585) --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 - sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 - sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 - .../azure-mgmt-documentdb/azure/__init__.py | 1 - .../azure/mgmt/__init__.py | 1 - .../azure/mgmt/documentdb/__init__.py | 18 - .../azure/mgmt/documentdb/document_db.py | 83 -- .../azure/mgmt/documentdb/models/__init__.py | 52 - .../documentdb/models/consistency_policy.py | 50 - .../documentdb/models/database_account.py | 117 --- .../database_account_connection_string.py | 39 - ...tabase_account_create_update_parameters.py | 90 -- ..._account_list_connection_strings_result.py | 29 - .../database_account_list_keys_result.py | 53 - ...base_account_list_read_only_keys_result.py | 41 - .../models/database_account_paged.py | 27 - .../database_account_patch_parameters.py | 31 - ...abase_account_regenerate_key_parameters.py | 33 - .../documentdb/models/document_db_enums.py | 41 - .../documentdb/models/failover_policies.py | 28 - .../mgmt/documentdb/models/failover_policy.py | 48 - .../azure/mgmt/documentdb/models/location.py | 58 -- .../azure/mgmt/documentdb/models/resource.py | 54 -- .../mgmt/documentdb/operations/__init__.py | 16 - .../database_accounts_operations.py | 918 ------------------ .../azure/mgmt/documentdb/version.py | 13 - .../azure_bdist_wheel.py | 54 -- sdk/cosmos/azure-mgmt-documentdb/build.json | 5 - .../dev_requirements.txt | 1 - .../azure-mgmt-documentdb/sdk_packaging.toml | 2 - sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 - sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 -- ..._mgmt_documentdb.test_accounts_create.yaml | 193 ---- ..._mgmt_documentdb.test_accounts_delete.yaml | 467 --------- ...gmt_documentdb.test_accounts_features.yaml | 272 ------ .../tests/test_mgmt_documentdb.py | 146 --- 36 files changed, 3147 deletions(-) delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst deleted file mode 100644 index eb7345b4071e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. :changelog: - -Release History -=============== - -0.1.3 (2017-05-02) -++++++++++++++++++ - -* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix - -0.1.2 (2017-04-20) -++++++++++++++++++ - -This wheel package is now built with the azure wheel extension - -0.1.1 (2017-03-21) -++++++++++++++++++ - -* Added support for listing database account connection strings - -0.1.0 (2017-01-31) -++++++++++++++++++ - -* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in deleted file mode 100644 index 9ecaeb15de50..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst deleted file mode 100644 index a5204ea75358..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/README.rst +++ /dev/null @@ -1,52 +0,0 @@ -Microsoft Azure SDK for Python -============================== - -This is the Microsoft Azure DocumentDB Management Client Library. - -Azure Resource Manager (ARM) is the next generation of management APIs that -replace the old Azure Service Management (ASM). - -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. - -For the older Azure Service Management (ASM) libraries, see -`azure-servicemanagement-legacy `__ library. - -For a more complete set of Azure libraries, see the `azure `__ bundle package. - - -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - -Usage -===== - -For code examples, see `DocumentDB Management -`__ -on readthedocs.org. - - -Provide Feedback -================ - -If you encounter any bugs or have suggestions, please file an issue in the -`Issues `__ -section of the project. - - -.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py deleted file mode 100755 index 3ec900145f1e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .document_db import DocumentDB -from .version import VERSION - -__all__ = ['DocumentDB'] - -__version__ = VERSION - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py deleted file mode 100755 index 5eda44ab3e32..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import ServiceClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.database_accounts_operations import DatabaseAccountsOperations -from . import models - - -class DocumentDBConfiguration(AzureConfiguration): - """Configuration for DocumentDB - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") - if not base_url: - base_url = 'https://management.azure.com' - - super(DocumentDBConfiguration, self).__init__(base_url) - - self.add_user_agent('documentdb/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class DocumentDB(object): - """Azure DocumentDB Database Service Resource Provider REST API - - :ivar config: Configuration for client. - :vartype config: DocumentDBConfiguration - - :ivar database_accounts: DatabaseAccounts operations - :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2015-04-08' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.database_accounts = DatabaseAccountsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py deleted file mode 100755 index 2ed68c568a84..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .consistency_policy import ConsistencyPolicy -from .location import Location -from .failover_policy import FailoverPolicy -from .database_account import DatabaseAccount -from .failover_policies import FailoverPolicies -from .resource import Resource -from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters -from .database_account_patch_parameters import DatabaseAccountPatchParameters -from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult -from .database_account_list_keys_result import DatabaseAccountListKeysResult -from .database_account_connection_string import DatabaseAccountConnectionString -from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult -from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters -from .database_account_paged import DatabaseAccountPaged -from .document_db_enums import ( - DatabaseAccountKind, - DatabaseAccountOfferType, - DefaultConsistencyLevel, - KeyKind, -) - -__all__ = [ - 'ConsistencyPolicy', - 'Location', - 'FailoverPolicy', - 'DatabaseAccount', - 'FailoverPolicies', - 'Resource', - 'DatabaseAccountCreateUpdateParameters', - 'DatabaseAccountPatchParameters', - 'DatabaseAccountListReadOnlyKeysResult', - 'DatabaseAccountListKeysResult', - 'DatabaseAccountConnectionString', - 'DatabaseAccountListConnectionStringsResult', - 'DatabaseAccountRegenerateKeyParameters', - 'DatabaseAccountPaged', - 'DatabaseAccountKind', - 'DatabaseAccountOfferType', - 'DefaultConsistencyLevel', - 'KeyKind', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py deleted file mode 100755 index d8cefd4c0b59..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConsistencyPolicy(Model): - """The consistency policy for the DocumentDB database account. - - :param default_consistency_level: The default consistency level and - configuration settings of the DocumentDB account. Possible values include: - 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' - :type default_consistency_level: str or :class:`DefaultConsistencyLevel - ` - :param max_staleness_prefix: When used with the Bounded Staleness - consistency level, this value represents the number of stale requests - tolerated. Accepted range for this value is 1 – 2,147,483,647. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_staleness_prefix: long - :param max_interval_in_seconds: When used with the Bounded Staleness - consistency level, this value represents the time amount of staleness (in - seconds) tolerated. Accepted range for this value is 1 - 100. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_interval_in_seconds: int - """ - - _validation = { - 'default_consistency_level': {'required': True}, - 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, - 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, - 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, - 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, - } - - def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): - self.default_consistency_level = default_consistency_level - self.max_staleness_prefix = max_staleness_prefix - self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py deleted file mode 100755 index 89031adc35cb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccount(Resource): - """A DocumentDB database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param provisioning_state: - :type provisioning_state: str - :ivar document_endpoint: The connection endpoint for the DocumentDB - database account. - :vartype document_endpoint: str - :ivar database_account_offer_type: The offer type for the DocumentDB - database account. Default value: Standard. Possible values include: - 'Standard' - :vartype database_account_offer_type: str or - :class:`DatabaseAccountOfferType - ` - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - :param consistency_policy: The consistency policy for the DocumentDB - database account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :ivar write_locations: An array that contains the write location for the - DocumentDB account. - :vartype write_locations: list of :class:`Location - ` - :ivar read_locations: An array that contains of the read locations enabled - for the DocumentDB account. - :vartype read_locations: list of :class:`Location - ` - :ivar failover_policies: An array that contains the regions ordered by - their failover priorities. - :vartype failover_policies: list of :class:`FailoverPolicy - ` - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'document_endpoint': {'readonly': True}, - 'database_account_offer_type': {'readonly': True}, - 'write_locations': {'readonly': True}, - 'read_locations': {'readonly': True}, - 'failover_policies': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, - 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, - 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): - super(DatabaseAccount, self).__init__(location=location, tags=tags) - self.kind = kind - self.provisioning_state = provisioning_state - self.document_endpoint = None - self.database_account_offer_type = None - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover - self.consistency_policy = consistency_policy - self.write_locations = None - self.read_locations = None - self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py deleted file mode 100755 index db1828208069..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountConnectionString(Model): - """Connection string for the DocumentDB account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar connection_string: Value of the connection string - :vartype connection_string: str - :ivar description: Description of the connection string - :vartype description: str - """ - - _validation = { - 'connection_string': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self): - self.connection_string = None - self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py deleted file mode 100755 index 30978f482f0b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccountCreateUpdateParameters(Resource): - """Parameters to create and update DocumentDB database accounts. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param consistency_policy: The consistency policy for the DocumentDB - account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :param locations: An array that contains the georeplication locations - enabled for the DocumentDB account. - :type locations: list of :class:`Location - ` - :ivar database_account_offer_type: Default value: "Standard" . - :vartype database_account_offer_type: str - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - } - - database_account_offer_type = "Standard" - - def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): - super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) - self.kind = kind - self.consistency_policy = consistency_policy - self.locations = locations - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py deleted file mode 100755 index 7cddc00a3de1..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListConnectionStringsResult(Model): - """The connection strings for the given database account. - - :param connection_strings: An array that contains the connection strings - for the DocumentDB account. - :type connection_strings: list of :class:`DatabaseAccountConnectionString - ` - """ - - _attribute_map = { - 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, - } - - def __init__(self, connection_strings=None): - self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py deleted file mode 100755 index 4d775054ac14..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListKeysResult(Model): - """The access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_master_key: Base 64 encoded value of the primary read-write - key. - :vartype primary_master_key: str - :ivar secondary_master_key: Base 64 encoded value of the secondary - read-write key. - :vartype secondary_master_key: str - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_master_key': {'readonly': True}, - 'secondary_master_key': {'readonly': True}, - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, - 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, - 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_master_key = None - self.secondary_master_key = None - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py deleted file mode 100755 index 3330353950c6..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListReadOnlyKeysResult(Model): - """The read-only access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py deleted file mode 100755 index 4cb94909c515..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseAccountPaged(Paged): - """ - A paging container for iterating over a list of DatabaseAccount object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py deleted file mode 100755 index be78a4fd6817..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountPatchParameters(Model): - """Parameters for patching Azure DocumentDB database account properties. - - :param tags: - :type tags: dict - """ - - _validation = { - 'tags': {'required': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, tags): - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py deleted file mode 100755 index 3bff90d33db3..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountRegenerateKeyParameters(Model): - """Parameters to regenerate the keys within the database account. - - :param key_kind: The access key to regenerate. Possible values include: - 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - """ - - _validation = { - 'key_kind': {'required': True}, - } - - _attribute_map = { - 'key_kind': {'key': 'keyKind', 'type': 'str'}, - } - - def __init__(self, key_kind): - self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py deleted file mode 100755 index 1e87cecaeb2a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class DatabaseAccountKind(Enum): - - global_document_db = "GlobalDocumentDB" - mongo_db = "MongoDB" - parse = "Parse" - - -class DatabaseAccountOfferType(Enum): - - standard = "Standard" - - -class DefaultConsistencyLevel(Enum): - - eventual = "Eventual" - session = "Session" - bounded_staleness = "BoundedStaleness" - strong = "Strong" - consistent_prefix = "ConsistentPrefix" - - -class KeyKind(Enum): - - primary = "primary" - secondary = "secondary" - primary_readonly = "primaryReadonly" - secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py deleted file mode 100755 index 4c3ebff5e3b5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicies(Model): - """The list of new failover policies for the failover priority change. - - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - """ - - _attribute_map = { - 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, failover_policies=None): - self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py deleted file mode 100755 index 99cc2769403b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicy(Model): - """The failover policy for a given region of a database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region in which the database - account replicates to. Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region in which the database account - exists. - :type location_name: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py deleted file mode 100755 index 8bc82bde2c3f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Location(Model): - """A region in which the Azure DocumentDB database account is deployed. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region within the database account. - Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region. - :type location_name: str - :ivar document_endpoint: The connection endpoint for the specific region. - Example: - https://<accountName>-<locationName>.documents.azure.com:443/ - :vartype document_endpoint: str - :param provisioning_state: - :type provisioning_state: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.document_endpoint = None - self.provisioning_state = provisioning_state - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py deleted file mode 100755 index d5e887d0b78a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """A database account resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, location, tags=None): - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py deleted file mode 100755 index 27ed7c069537..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .database_accounts_operations import DatabaseAccountsOperations - -__all__ = [ - 'DatabaseAccountsOperations', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py deleted file mode 100755 index 2bb39b1f6839..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py +++ /dev/null @@ -1,918 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrestazure.azure_operation import AzureOperationPoller -import uuid - -from .. import models - - -class DatabaseAccountsOperations(object): - """DatabaseAccountsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". - """ - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-04-08" - - self.config = config - - def get( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Retrieves the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def patch( - self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): - """Patches the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param tags: - :type tags: dict - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - update_parameters = models.DatabaseAccountPatchParameters(tags=tags) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(update_parameters, 'DatabaseAccountPatchParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.patch(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def create_or_update( - self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): - """Creates or updates an Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param create_update_parameters: The parameters to provide for the - current database account. - :type create_update_parameters: - :class:`DatabaseAccountCreateUpdateParameters - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def delete( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Deletes an existing Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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 - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - def long_running_send(): - - request = self._client.delete(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def failover_priority_change( - self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): - """Changes the failover priority for the Azure DocumentDB database - account. A failover priority of 0 indicates a write region. The maximum - value for a failover priority = (total number of regions - 1). Failover - priority values must be unique for each of the regions in which the - database account exists. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(failover_parameters, 'FailoverPolicies') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - subscription. - - :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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - given resource group. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the access keys for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_connection_strings( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the connection strings for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListConnectionStringsResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_read_only_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the read-only access keys for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListReadOnlyKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def regenerate_key( - self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): - """Regenerates an access key for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param key_kind: The access key to regenerate. Possible values - include: 'primary', 'secondary', 'primaryReadonly', - 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def check_name_exists( - self, account_name, custom_headers=None, raw=False, **operation_config): - """Checks that the Azure DocumentDB account name already exists. A valid - account name may contain only lowercase letters, numbers, and the '-' - character, and must be between 3 and 50 characters. - - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: bool - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' - path_format_arguments = { - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.head(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = (response.status_code == 200) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py deleted file mode 100755 index 95ed79d29108..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.3" - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -from distutils import log as logger -import os.path - -from wheel.bdist_wheel import bdist_wheel -class azure_bdist_wheel(bdist_wheel): - """The purpose of this class is to build wheel a little differently than the sdist, - without requiring to build the wheel from the sdist (i.e. you can build the wheel - directly from source). - """ - - description = "Create an Azure wheel distribution" - - user_options = bdist_wheel.user_options + \ - [('azure-namespace-package=', None, - "Name of the deepest nspkg used")] - - def initialize_options(self): - bdist_wheel.initialize_options(self) - self.azure_namespace_package = None - - def finalize_options(self): - bdist_wheel.finalize_options(self) - if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): - raise ValueError("azure_namespace_package must finish by -nspkg") - - def run(self): - if not self.distribution.install_requires: - self.distribution.install_requires = [] - self.distribution.install_requires.append( - "{}>=2.0.0".format(self.azure_namespace_package)) - bdist_wheel.run(self) - - def write_record(self, bdist_dir, distinfo_dir): - if self.azure_namespace_package: - # Split and remove last part, assuming it's "nspkg" - subparts = self.azure_namespace_package.split('-')[0:-1] - folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] - for azure_sub_package in folder_with_init: - init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') - if os.path.isfile(init_file): - logger.info("manually remove {} while building the wheel".format(init_file)) - os.remove(init_file) - else: - raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) - bdist_wheel.write_record(self, bdist_dir, distinfo_dir) -cmdclass = { - 'bdist_wheel': azure_bdist_wheel, -} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json deleted file mode 100644 index 4d98fc12a39e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/build.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "autorest": "1.0.1-20170501-2300-nightly", - "date": "2017-05-01T20:13:42Z", - "version": "0.1.3" -} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt deleted file mode 100644 index 6ccb7f031ddd..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt +++ /dev/null @@ -1 +0,0 @@ --e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml deleted file mode 100644 index e7687fdae93b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml +++ /dev/null @@ -1,2 +0,0 @@ -[packaging] -auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg deleted file mode 100644 index 856f4164982c..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[bdist_wheel] -universal=1 -azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py deleted file mode 100644 index ddef54e31bb5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.py +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env python - -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup -try: - from azure_bdist_wheel import cmdclass -except ImportError: - from distutils import log as logger - logger.warn("Wheel is not available, disabling bdist_wheel hook") - cmdclass = {} - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-documentdb" -PACKAGE_PPRINT_NAME = "DocumentDB Management" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') - -# azure v0.x is not compatible with this package -# azure v0.x used to have a __version__ attribute (newer versions don't) -try: - import azure - try: - ver = azure.__version__ - raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' - ) - except AttributeError: - pass -except ImportError: - pass - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError('Cannot find version information') - -with open('README.rst', encoding='utf-8') as f: - readme = f.read() -with open('HISTORY.rst', encoding='utf-8') as f: - history = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + history, - license='MIT License', - author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', - classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'License :: OSI Approved :: MIT License', - ], - zip_safe=False, - packages=find_packages(), - install_requires=[ - 'msrestazure~=0.4.7', - 'azure-common~=1.1.5', - ], - cmdclass=cmdclass -) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml deleted file mode 100644 index d470d7f8673d..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml +++ /dev/null @@ -1,193 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] - method: HEAD - uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: ''} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['142'] - Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-ratelimit-remaining-tenant-reads: ['14999'] - x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] - status: {code: 404, message: NotFound} -- request: - body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], - "databaseAccountOfferType": "Standard"}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['121'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['910'] - x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Completed","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['33'] - x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml deleted file mode 100644 index e6f4e2348f8f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml +++ /dev/null @@ -1,467 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' - under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' - was not found."}}'} - headers: - Cache-Control: [no-cache] - Content-Length: ['214'] - Content-Type: [application/json; charset=utf-8] - Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-failure-cause: [gateway] - x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] - status: {code: 404, message: Not Found} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml deleted file mode 100644 index b2e4b82a9d9e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml +++ /dev/null @@ -1,272 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1144'] - x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1156'] - x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['2225'] - x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] - status: {code: 200, message: Ok} -- request: - body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['73'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 - response: - body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique - and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['170'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] - status: {code: 400, message: BadRequest} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 - response: - body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['239'] - x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] - status: {code: 200, message: Ok} -- request: - body: '{"keyKind": "primary"}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['22'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] - x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py deleted file mode 100644 index 902666a22cf0..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py +++ /dev/null @@ -1,146 +0,0 @@ -# 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. -#-------------------------------------------------------------------------- -import unittest - -import azure.mgmt.documentdb -from msrestazure.azure_exceptions import CloudError -from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer - - -class MgmtDocDBTest(AzureMgmtTestCase): - - def setUp(self): - super(MgmtDocDBTest, self).setUp() - self.client = self.create_mgmt_client( - azure.mgmt.documentdb.DocumentDB - ) - - @ResourceGroupPreparer() - def test_accounts_create(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtst') - - self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) - - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - account = async_docdb_create.result() - self.assertIsNotNone(account) - # Rest API issue - # self.assertEqual(account.name, account_name) - - @ResourceGroupPreparer() - def test_accounts_features(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtest') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - account = self.client.database_accounts.get( - resource_group.name, - account_name - ) - self.assertEqual(account.name, account_name) - - my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) - self.assertEqual(len(my_accounts), 1) - self.assertEqual(my_accounts[0].name, account_name) - - my_accounts = list(self.client.database_accounts.list()) - self.assertTrue(len(my_accounts) >= 1) - self.assertTrue(any(db.name == account_name for db in my_accounts)) - - # I guess we can make this test with no error, need to check with DocDB team - # This is an interesting test anyway, this implies that the serialization works - # and error message is available. Since this method does not return an object - # (i.e. no deserialization to test), this is a complete test. - # We are NOT here to test the RestAPI, but the Swagger file and Python code. - with self.assertRaises(CloudError) as cm: - async_change = self.client.database_accounts.failover_priority_change( - resource_group.name, - account_name, - [{ - 'location_name': self.region, - 'failover_priority': 0 - }] - ) - async_change.wait() - self.assertIn('Failover priorities must be unique', cm.exception.message) - - my_keys = self.client.database_accounts.list_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_master_key) - self.assertIsNotNone(my_keys.secondary_master_key) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - my_keys = self.client.database_accounts.list_read_only_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - async_regenerate = self.client.database_accounts.regenerate_key( - resource_group.name, - account_name, - "primary" - ) - async_regenerate.wait() - - @ResourceGroupPreparer() - def test_accounts_delete(self, resource_group, location): - account_name = self.get_resource_name('pydocumentdbtst') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - # Current implementation of msrestazure does not support 404 as a end of LRO delete - # https://github.com/Azure/msrestazure-for-python/issues/7 - async_delete = self.client.database_accounts.delete(resource_group.name, account_name) - try: - async_delete.wait() - except CloudError as err: - if err.response.status_code != 404: - raise - - -#------------------------------------------------------------------------------ -if __name__ == '__main__': - unittest.main() From 23b298c353ff5fc7872b8f534c9572fb2dacbce8 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:42:03 -0700 Subject: [PATCH 183/244] Revert "Remove docdb mgmt package from master (#6585)" (#6593) This reverts commit d2ed7d87997eac9b715ee9802c15349a12446b84. --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 + sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 + sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 + .../azure-mgmt-documentdb/azure/__init__.py | 1 + .../azure/mgmt/__init__.py | 1 + .../azure/mgmt/documentdb/__init__.py | 18 + .../azure/mgmt/documentdb/document_db.py | 83 ++ .../azure/mgmt/documentdb/models/__init__.py | 52 + .../documentdb/models/consistency_policy.py | 50 + .../documentdb/models/database_account.py | 117 +++ .../database_account_connection_string.py | 39 + ...tabase_account_create_update_parameters.py | 90 ++ ..._account_list_connection_strings_result.py | 29 + .../database_account_list_keys_result.py | 53 + ...base_account_list_read_only_keys_result.py | 41 + .../models/database_account_paged.py | 27 + .../database_account_patch_parameters.py | 31 + ...abase_account_regenerate_key_parameters.py | 33 + .../documentdb/models/document_db_enums.py | 41 + .../documentdb/models/failover_policies.py | 28 + .../mgmt/documentdb/models/failover_policy.py | 48 + .../azure/mgmt/documentdb/models/location.py | 58 ++ .../azure/mgmt/documentdb/models/resource.py | 54 ++ .../mgmt/documentdb/operations/__init__.py | 16 + .../database_accounts_operations.py | 918 ++++++++++++++++++ .../azure/mgmt/documentdb/version.py | 13 + .../azure_bdist_wheel.py | 54 ++ sdk/cosmos/azure-mgmt-documentdb/build.json | 5 + .../dev_requirements.txt | 1 + .../azure-mgmt-documentdb/sdk_packaging.toml | 2 + sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 + sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 ++ ..._mgmt_documentdb.test_accounts_create.yaml | 193 ++++ ..._mgmt_documentdb.test_accounts_delete.yaml | 467 +++++++++ ...gmt_documentdb.test_accounts_features.yaml | 272 ++++++ .../tests/test_mgmt_documentdb.py | 146 +++ 36 files changed, 3147 insertions(+) create mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in create mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json create mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt create mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst new file mode 100644 index 000000000000..eb7345b4071e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst @@ -0,0 +1,24 @@ +.. :changelog: + +Release History +=============== + +0.1.3 (2017-05-02) +++++++++++++++++++ + +* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix + +0.1.2 (2017-04-20) +++++++++++++++++++ + +This wheel package is now built with the azure wheel extension + +0.1.1 (2017-03-21) +++++++++++++++++++ + +* Added support for listing database account connection strings + +0.1.0 (2017-01-31) +++++++++++++++++++ + +* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in new file mode 100644 index 000000000000..9ecaeb15de50 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in @@ -0,0 +1,2 @@ +include *.rst +include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst new file mode 100644 index 000000000000..a5204ea75358 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/README.rst @@ -0,0 +1,52 @@ +Microsoft Azure SDK for Python +============================== + +This is the Microsoft Azure DocumentDB Management Client Library. + +Azure Resource Manager (ARM) is the next generation of management APIs that +replace the old Azure Service Management (ASM). + +This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. + +For the older Azure Service Management (ASM) libraries, see +`azure-servicemanagement-legacy `__ library. + +For a more complete set of Azure libraries, see the `azure `__ bundle package. + + +Compatibility +============= + +**IMPORTANT**: If you have an earlier version of the azure package +(version < 1.0), you should uninstall it before installing this package. + +You can check the version using pip: + +.. code:: shell + + pip freeze + +If you see azure==0.11.0 (or any version below 1.0), uninstall it first: + +.. code:: shell + + pip uninstall azure + + +Usage +===== + +For code examples, see `DocumentDB Management +`__ +on readthedocs.org. + + +Provide Feedback +================ + +If you encounter any bugs or have suggestions, please file an issue in the +`Issues `__ +section of the project. + + +.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py new file mode 100755 index 000000000000..3ec900145f1e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .document_db import DocumentDB +from .version import VERSION + +__all__ = ['DocumentDB'] + +__version__ = VERSION + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py new file mode 100755 index 000000000000..5eda44ab3e32 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import ServiceClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.database_accounts_operations import DatabaseAccountsOperations +from . import models + + +class DocumentDBConfiguration(AzureConfiguration): + """Configuration for DocumentDB + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not isinstance(subscription_id, str): + raise TypeError("Parameter 'subscription_id' must be str.") + if not base_url: + base_url = 'https://management.azure.com' + + super(DocumentDBConfiguration, self).__init__(base_url) + + self.add_user_agent('documentdb/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class DocumentDB(object): + """Azure DocumentDB Database Service Resource Provider REST API + + :ivar config: Configuration for client. + :vartype config: DocumentDBConfiguration + + :ivar database_accounts: DatabaseAccounts operations + :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) + self._client = ServiceClient(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2015-04-08' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.database_accounts = DatabaseAccountsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py new file mode 100755 index 000000000000..2ed68c568a84 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .consistency_policy import ConsistencyPolicy +from .location import Location +from .failover_policy import FailoverPolicy +from .database_account import DatabaseAccount +from .failover_policies import FailoverPolicies +from .resource import Resource +from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters +from .database_account_patch_parameters import DatabaseAccountPatchParameters +from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult +from .database_account_list_keys_result import DatabaseAccountListKeysResult +from .database_account_connection_string import DatabaseAccountConnectionString +from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult +from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters +from .database_account_paged import DatabaseAccountPaged +from .document_db_enums import ( + DatabaseAccountKind, + DatabaseAccountOfferType, + DefaultConsistencyLevel, + KeyKind, +) + +__all__ = [ + 'ConsistencyPolicy', + 'Location', + 'FailoverPolicy', + 'DatabaseAccount', + 'FailoverPolicies', + 'Resource', + 'DatabaseAccountCreateUpdateParameters', + 'DatabaseAccountPatchParameters', + 'DatabaseAccountListReadOnlyKeysResult', + 'DatabaseAccountListKeysResult', + 'DatabaseAccountConnectionString', + 'DatabaseAccountListConnectionStringsResult', + 'DatabaseAccountRegenerateKeyParameters', + 'DatabaseAccountPaged', + 'DatabaseAccountKind', + 'DatabaseAccountOfferType', + 'DefaultConsistencyLevel', + 'KeyKind', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py new file mode 100755 index 000000000000..d8cefd4c0b59 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConsistencyPolicy(Model): + """The consistency policy for the DocumentDB database account. + + :param default_consistency_level: The default consistency level and + configuration settings of the DocumentDB account. Possible values include: + 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' + :type default_consistency_level: str or :class:`DefaultConsistencyLevel + ` + :param max_staleness_prefix: When used with the Bounded Staleness + consistency level, this value represents the number of stale requests + tolerated. Accepted range for this value is 1 – 2,147,483,647. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_staleness_prefix: long + :param max_interval_in_seconds: When used with the Bounded Staleness + consistency level, this value represents the time amount of staleness (in + seconds) tolerated. Accepted range for this value is 1 - 100. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_interval_in_seconds: int + """ + + _validation = { + 'default_consistency_level': {'required': True}, + 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, + 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, + 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, + 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, + } + + def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): + self.default_consistency_level = default_consistency_level + self.max_staleness_prefix = max_staleness_prefix + self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py new file mode 100755 index 000000000000..89031adc35cb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py @@ -0,0 +1,117 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccount(Resource): + """A DocumentDB database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param provisioning_state: + :type provisioning_state: str + :ivar document_endpoint: The connection endpoint for the DocumentDB + database account. + :vartype document_endpoint: str + :ivar database_account_offer_type: The offer type for the DocumentDB + database account. Default value: Standard. Possible values include: + 'Standard' + :vartype database_account_offer_type: str or + :class:`DatabaseAccountOfferType + ` + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + :param consistency_policy: The consistency policy for the DocumentDB + database account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :ivar write_locations: An array that contains the write location for the + DocumentDB account. + :vartype write_locations: list of :class:`Location + ` + :ivar read_locations: An array that contains of the read locations enabled + for the DocumentDB account. + :vartype read_locations: list of :class:`Location + ` + :ivar failover_policies: An array that contains the regions ordered by + their failover priorities. + :vartype failover_policies: list of :class:`FailoverPolicy + ` + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'document_endpoint': {'readonly': True}, + 'database_account_offer_type': {'readonly': True}, + 'write_locations': {'readonly': True}, + 'read_locations': {'readonly': True}, + 'failover_policies': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, + 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, + 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): + super(DatabaseAccount, self).__init__(location=location, tags=tags) + self.kind = kind + self.provisioning_state = provisioning_state + self.document_endpoint = None + self.database_account_offer_type = None + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover + self.consistency_policy = consistency_policy + self.write_locations = None + self.read_locations = None + self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py new file mode 100755 index 000000000000..db1828208069 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountConnectionString(Model): + """Connection string for the DocumentDB account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar connection_string: Value of the connection string + :vartype connection_string: str + :ivar description: Description of the connection string + :vartype description: str + """ + + _validation = { + 'connection_string': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self): + self.connection_string = None + self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py new file mode 100755 index 000000000000..30978f482f0b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccountCreateUpdateParameters(Resource): + """Parameters to create and update DocumentDB database accounts. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param consistency_policy: The consistency policy for the DocumentDB + account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :param locations: An array that contains the georeplication locations + enabled for the DocumentDB account. + :type locations: list of :class:`Location + ` + :ivar database_account_offer_type: Default value: "Standard" . + :vartype database_account_offer_type: str + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'locations': {'required': True}, + 'database_account_offer_type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + } + + database_account_offer_type = "Standard" + + def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): + super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) + self.kind = kind + self.consistency_policy = consistency_policy + self.locations = locations + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py new file mode 100755 index 000000000000..7cddc00a3de1 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListConnectionStringsResult(Model): + """The connection strings for the given database account. + + :param connection_strings: An array that contains the connection strings + for the DocumentDB account. + :type connection_strings: list of :class:`DatabaseAccountConnectionString + ` + """ + + _attribute_map = { + 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, + } + + def __init__(self, connection_strings=None): + self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py new file mode 100755 index 000000000000..4d775054ac14 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListKeysResult(Model): + """The access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_master_key: Base 64 encoded value of the primary read-write + key. + :vartype primary_master_key: str + :ivar secondary_master_key: Base 64 encoded value of the secondary + read-write key. + :vartype secondary_master_key: str + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_master_key': {'readonly': True}, + 'secondary_master_key': {'readonly': True}, + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, + 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, + 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_master_key = None + self.secondary_master_key = None + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py new file mode 100755 index 000000000000..3330353950c6 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListReadOnlyKeysResult(Model): + """The read-only access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py new file mode 100755 index 000000000000..4cb94909c515 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class DatabaseAccountPaged(Paged): + """ + A paging container for iterating over a list of DatabaseAccount object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py new file mode 100755 index 000000000000..be78a4fd6817 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountPatchParameters(Model): + """Parameters for patching Azure DocumentDB database account properties. + + :param tags: + :type tags: dict + """ + + _validation = { + 'tags': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, tags): + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py new file mode 100755 index 000000000000..3bff90d33db3 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountRegenerateKeyParameters(Model): + """Parameters to regenerate the keys within the database account. + + :param key_kind: The access key to regenerate. Possible values include: + 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + """ + + _validation = { + 'key_kind': {'required': True}, + } + + _attribute_map = { + 'key_kind': {'key': 'keyKind', 'type': 'str'}, + } + + def __init__(self, key_kind): + self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py new file mode 100755 index 000000000000..1e87cecaeb2a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class DatabaseAccountKind(Enum): + + global_document_db = "GlobalDocumentDB" + mongo_db = "MongoDB" + parse = "Parse" + + +class DatabaseAccountOfferType(Enum): + + standard = "Standard" + + +class DefaultConsistencyLevel(Enum): + + eventual = "Eventual" + session = "Session" + bounded_staleness = "BoundedStaleness" + strong = "Strong" + consistent_prefix = "ConsistentPrefix" + + +class KeyKind(Enum): + + primary = "primary" + secondary = "secondary" + primary_readonly = "primaryReadonly" + secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py new file mode 100755 index 000000000000..4c3ebff5e3b5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicies(Model): + """The list of new failover policies for the failover priority change. + + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + """ + + _attribute_map = { + 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, failover_policies=None): + self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py new file mode 100755 index 000000000000..99cc2769403b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicy(Model): + """The failover policy for a given region of a database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region in which the database + account replicates to. Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region in which the database account + exists. + :type location_name: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py new file mode 100755 index 000000000000..8bc82bde2c3f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Location(Model): + """A region in which the Azure DocumentDB database account is deployed. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region within the database account. + Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region. + :type location_name: str + :ivar document_endpoint: The connection endpoint for the specific region. + Example: + https://<accountName>-<locationName>.documents.azure.com:443/ + :vartype document_endpoint: str + :param provisioning_state: + :type provisioning_state: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'document_endpoint': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.document_endpoint = None + self.provisioning_state = provisioning_state + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py new file mode 100755 index 000000000000..d5e887d0b78a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """A database account resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, location, tags=None): + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py new file mode 100755 index 000000000000..27ed7c069537 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py @@ -0,0 +1,16 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .database_accounts_operations import DatabaseAccountsOperations + +__all__ = [ + 'DatabaseAccountsOperations', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py new file mode 100755 index 000000000000..2bb39b1f6839 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py @@ -0,0 +1,918 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrestazure.azure_operation import AzureOperationPoller +import uuid + +from .. import models + + +class DatabaseAccountsOperations(object): + """DatabaseAccountsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". + """ + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-04-08" + + self.config = config + + def get( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Retrieves the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def patch( + self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): + """Patches the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param tags: + :type tags: dict + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + update_parameters = models.DatabaseAccountPatchParameters(tags=tags) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(update_parameters, 'DatabaseAccountPatchParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.patch(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def create_or_update( + self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates an Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param create_update_parameters: The parameters to provide for the + current database account. + :type create_update_parameters: + :class:`DatabaseAccountCreateUpdateParameters + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.put(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def delete( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Deletes an existing Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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 + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + def long_running_send(): + + request = self._client.delete(url, query_parameters) + return self._client.send(request, header_parameters, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def failover_priority_change( + self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): + """Changes the failover priority for the Azure DocumentDB database + account. A failover priority of 0 indicates a write region. The maximum + value for a failover priority = (total number of regions - 1). Failover + priority values must be unique for each of the regions in which the + database account exists. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(failover_parameters, 'FailoverPolicies') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + subscription. + + :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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + given resource group. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the access keys for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_connection_strings( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the connection strings for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListConnectionStringsResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_read_only_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the read-only access keys for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListReadOnlyKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def regenerate_key( + self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): + """Regenerates an access key for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param key_kind: The access key to regenerate. Possible values + include: 'primary', 'secondary', 'primaryReadonly', + 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def check_name_exists( + self, account_name, custom_headers=None, raw=False, **operation_config): + """Checks that the Azure DocumentDB account name already exists. A valid + account name may contain only lowercase letters, numbers, and the '-' + character, and must be between 3 and 50 characters. + + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: bool + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' + path_format_arguments = { + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.head(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = (response.status_code == 200) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py new file mode 100755 index 000000000000..95ed79d29108 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.3" + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py new file mode 100644 index 000000000000..8a81d1b61775 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py @@ -0,0 +1,54 @@ +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +from distutils import log as logger +import os.path + +from wheel.bdist_wheel import bdist_wheel +class azure_bdist_wheel(bdist_wheel): + """The purpose of this class is to build wheel a little differently than the sdist, + without requiring to build the wheel from the sdist (i.e. you can build the wheel + directly from source). + """ + + description = "Create an Azure wheel distribution" + + user_options = bdist_wheel.user_options + \ + [('azure-namespace-package=', None, + "Name of the deepest nspkg used")] + + def initialize_options(self): + bdist_wheel.initialize_options(self) + self.azure_namespace_package = None + + def finalize_options(self): + bdist_wheel.finalize_options(self) + if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): + raise ValueError("azure_namespace_package must finish by -nspkg") + + def run(self): + if not self.distribution.install_requires: + self.distribution.install_requires = [] + self.distribution.install_requires.append( + "{}>=2.0.0".format(self.azure_namespace_package)) + bdist_wheel.run(self) + + def write_record(self, bdist_dir, distinfo_dir): + if self.azure_namespace_package: + # Split and remove last part, assuming it's "nspkg" + subparts = self.azure_namespace_package.split('-')[0:-1] + folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] + for azure_sub_package in folder_with_init: + init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') + if os.path.isfile(init_file): + logger.info("manually remove {} while building the wheel".format(init_file)) + os.remove(init_file) + else: + raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) + bdist_wheel.write_record(self, bdist_dir, distinfo_dir) +cmdclass = { + 'bdist_wheel': azure_bdist_wheel, +} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json new file mode 100644 index 000000000000..4d98fc12a39e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/build.json @@ -0,0 +1,5 @@ +{ + "autorest": "1.0.1-20170501-2300-nightly", + "date": "2017-05-01T20:13:42Z", + "version": "0.1.3" +} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt new file mode 100644 index 000000000000..6ccb7f031ddd --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt @@ -0,0 +1 @@ +-e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml new file mode 100644 index 000000000000..e7687fdae93b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg new file mode 100644 index 000000000000..856f4164982c --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg @@ -0,0 +1,3 @@ +[bdist_wheel] +universal=1 +azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py new file mode 100644 index 000000000000..ddef54e31bb5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup +try: + from azure_bdist_wheel import cmdclass +except ImportError: + from distutils import log as logger + logger.warn("Wheel is not available, disabling bdist_wheel hook") + cmdclass = {} + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-documentdb" +PACKAGE_PPRINT_NAME = "DocumentDB Management" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.rst', encoding='utf-8') as f: + readme = f.read() +with open('HISTORY.rst', encoding='utf-8') as f: + history = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + history, + license='MIT License', + author='Microsoft Corporation', + author_email='ptvshelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(), + install_requires=[ + 'msrestazure~=0.4.7', + 'azure-common~=1.1.5', + ], + cmdclass=cmdclass +) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml new file mode 100644 index 000000000000..d470d7f8673d --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml @@ -0,0 +1,193 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] + method: HEAD + uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: ''} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['142'] + Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-ratelimit-remaining-tenant-reads: ['14999'] + x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] + status: {code: 404, message: NotFound} +- request: + body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], + "databaseAccountOfferType": "Standard"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['121'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['910'] + x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Completed","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['33'] + x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml new file mode 100644 index 000000000000..e6f4e2348f8f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml @@ -0,0 +1,467 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' + under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' + was not found."}}'} + headers: + Cache-Control: [no-cache] + Content-Length: ['214'] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-failure-cause: [gateway] + x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] + status: {code: 404, message: Not Found} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml new file mode 100644 index 000000000000..b2e4b82a9d9e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml @@ -0,0 +1,272 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1144'] + x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1156'] + x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2225'] + x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] + status: {code: 200, message: Ok} +- request: + body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['73'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 + response: + body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique + and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['170'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] + status: {code: 400, message: BadRequest} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 + response: + body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['239'] + x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] + status: {code: 200, message: Ok} +- request: + body: '{"keyKind": "primary"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['22'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] + x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py new file mode 100644 index 000000000000..902666a22cf0 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py @@ -0,0 +1,146 @@ +# 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. +#-------------------------------------------------------------------------- +import unittest + +import azure.mgmt.documentdb +from msrestazure.azure_exceptions import CloudError +from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer + + +class MgmtDocDBTest(AzureMgmtTestCase): + + def setUp(self): + super(MgmtDocDBTest, self).setUp() + self.client = self.create_mgmt_client( + azure.mgmt.documentdb.DocumentDB + ) + + @ResourceGroupPreparer() + def test_accounts_create(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtst') + + self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) + + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + account = async_docdb_create.result() + self.assertIsNotNone(account) + # Rest API issue + # self.assertEqual(account.name, account_name) + + @ResourceGroupPreparer() + def test_accounts_features(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtest') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + account = self.client.database_accounts.get( + resource_group.name, + account_name + ) + self.assertEqual(account.name, account_name) + + my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) + self.assertEqual(len(my_accounts), 1) + self.assertEqual(my_accounts[0].name, account_name) + + my_accounts = list(self.client.database_accounts.list()) + self.assertTrue(len(my_accounts) >= 1) + self.assertTrue(any(db.name == account_name for db in my_accounts)) + + # I guess we can make this test with no error, need to check with DocDB team + # This is an interesting test anyway, this implies that the serialization works + # and error message is available. Since this method does not return an object + # (i.e. no deserialization to test), this is a complete test. + # We are NOT here to test the RestAPI, but the Swagger file and Python code. + with self.assertRaises(CloudError) as cm: + async_change = self.client.database_accounts.failover_priority_change( + resource_group.name, + account_name, + [{ + 'location_name': self.region, + 'failover_priority': 0 + }] + ) + async_change.wait() + self.assertIn('Failover priorities must be unique', cm.exception.message) + + my_keys = self.client.database_accounts.list_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_master_key) + self.assertIsNotNone(my_keys.secondary_master_key) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + my_keys = self.client.database_accounts.list_read_only_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + async_regenerate = self.client.database_accounts.regenerate_key( + resource_group.name, + account_name, + "primary" + ) + async_regenerate.wait() + + @ResourceGroupPreparer() + def test_accounts_delete(self, resource_group, location): + account_name = self.get_resource_name('pydocumentdbtst') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + # Current implementation of msrestazure does not support 404 as a end of LRO delete + # https://github.com/Azure/msrestazure-for-python/issues/7 + async_delete = self.client.database_accounts.delete(resource_group.name, account_name) + try: + async_delete.wait() + except CloudError as err: + if err.response.status_code != 404: + raise + + +#------------------------------------------------------------------------------ +if __name__ == '__main__': + unittest.main() From 760ecf9d6f0f17d255590d06bea0b03e94a6015e Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 10:16:27 -0700 Subject: [PATCH 184/244] Update CODEOWNERS --- .github/CODEOWNERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 07d57ac48320..0172563e9a84 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -40,6 +40,9 @@ # Management Plane /**/*mgmt*/ @zikalino +# Management Plane +/**/*mgmt*/ @zikalino + ########### # Eng Sys ########### From cfd5c56fbf2987772581e3375cbc3f85291eb2c3 Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 11:03:35 -0700 Subject: [PATCH 185/244] more code owners --- .github/CODEOWNERS | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0172563e9a84..07d57ac48320 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -40,9 +40,6 @@ # Management Plane /**/*mgmt*/ @zikalino -# Management Plane -/**/*mgmt*/ @zikalino - ########### # Eng Sys ########### From 8795821b9e677e9923a64186331189e5677f3509 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 11:58:35 -0700 Subject: [PATCH 186/244] add policy and decorators for secrets (#6453) --- .../azure/keyvault/secrets/_shared/async_client_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 193e6e324c7e..c451ffb1e766 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncHttpTransport +from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient From fe247241409be2a0f43d08775d50b95559e7bb61 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Thu, 25 Jul 2019 12:41:38 -0700 Subject: [PATCH 187/244] Paging v2 (#6420) * First version of paging * Clean sync paging * Async paging * Name AsyncList without underscore * MyPy happyness * pylint * black * PageIterator as conf * Simplify ItemPaged * Use chain to link iterable * Make Paging more open * Docstring * pylint / mypy / black * Regenerate KV with latest Autorest + Paging branch (#6479) * Regenerate KV with latest Autorest + Paging branch * Remove unused import in tests * Make the async adapter more generic * Regeneration after operation mixin fix in Autorest * COmmit changes forgotten in #6418 * Fixing syntax for 2.7 * Move Storage Queue to new Paging (#6447) * Move Storage Queue to new Paging * Working Storage queue on new paging * Fix types * First shot of blob tests update * Fixing blob tests * File to new paging * Doc fix * Feedbacks from @annatisch * Fix last @annatisch comment * Simplify paging contract * Fix storage queue after new paging contract --- .../_key_vault_client_operations_async.py | 60 ++++------------ .../_key_vault_client_operations.py | 60 ++++------------ .../_key_vault_client_operations_async.py | 70 ++++--------------- .../_key_vault_client_operations.py | 70 ++++--------------- .../keys/_shared/async_client_base.py | 19 +++++ .../_key_vault_client_operations_async.py | 60 ++++------------ .../_key_vault_client_operations.py | 60 ++++------------ .../_key_vault_client_operations_async.py | 70 ++++--------------- .../_key_vault_client_operations.py | 70 ++++--------------- .../secrets/_shared/async_client_base.py | 19 +++++ 10 files changed, 142 insertions(+), 416 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index b5cc965119ed..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 0ae7fd5fb025..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index 08e45c2b44a7..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index b9ed6e10ea21..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 193e6e324c7e..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -21,6 +21,25 @@ pass +class AsyncPagingAdapter: + """For each item in an AsyncIterator, returns the result of applying fn to that item. + Python 3.6 added syntax that could replace this (yield within async for).""" + + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: + self._pages = pages + self._fn = fn + + def __aiter__(self): + return self + + async def __anext__(self) -> Any: + item = await self._pages.__anext__() + if not item: + raise StopAsyncIteration + return self._fn(item) + # TODO: expected type Model got Coroutine instead? + + class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index b5cc965119ed..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 0ae7fd5fb025..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index 08e45c2b44a7..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index b9ed6e10ea21..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index c451ffb1e766..0119ef5a6e44 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -21,6 +21,25 @@ pass +class AsyncPagingAdapter: + """For each item in an AsyncIterator, returns the result of applying fn to that item. + Python 3.6 added syntax that could replace this (yield within async for).""" + + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: + self._pages = pages + self._fn = fn + + def __aiter__(self): + return self + + async def __anext__(self) -> Any: + item = await self._pages.__anext__() + if not item: + raise StopAsyncIteration + return self._fn(item) + # TODO: expected type Model got Coroutine instead? + + class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, From 67f6ffd8aa2bdb02b1d53cdd76f48c6502f816d9 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 15:48:49 -0700 Subject: [PATCH 188/244] get rid of should only propagate (#6497) --- sdk/core/azure-core/azure/core/tracing/decorator.py | 2 +- sdk/core/azure-core/azure/core/tracing/decorator_async.py | 2 +- .../azure_core_asynctests/test_tracing_decorator_async.py | 5 ++++- sdk/core/azure-core/tests/test_tracing_decorator.py | 5 ++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 3986dcaf31ed..7d5d7bfce407 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None and orig_wrapped_span is None: + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 4df65fee77ef..781e20a6bef2 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None and orig_wrapped_span is None: + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index 82b4f97dc92f..e2a5c92e60b9 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -145,4 +145,7 @@ async def test_span_with_opencensus_complicated(value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert not parent.children[3].children + assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" + assert parent.children[3].children[1].span_data.name == "MockClient.make_request" + children = parent.children[1].children + assert len(children) == 2 diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index 764c09396255..eedd34c0afdd 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -177,4 +177,7 @@ def test_span_with_opencensus_complicated(self, value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert not parent.children[3].children + assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" + assert parent.children[3].children[1].span_data.name == "MockClient.make_request" + children = parent.children[1].children + assert len(children) == 2 From c75c8ff3793bba2e44fa795fa29125d48b21527c Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Mon, 29 Jul 2019 14:05:36 -0700 Subject: [PATCH 189/244] decorator only trace very top level function (#6530) --- sdk/core/azure-core/azure/core/tracing/decorator.py | 2 +- sdk/core/azure-core/azure/core/tracing/decorator_async.py | 2 +- .../azure_core_asynctests/test_tracing_decorator_async.py | 5 +---- sdk/core/azure-core/tests/test_tracing_decorator.py | 5 +---- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 7d5d7bfce407..3986dcaf31ed 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 781e20a6bef2..4df65fee77ef 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index e2a5c92e60b9..82b4f97dc92f 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -145,7 +145,4 @@ async def test_span_with_opencensus_complicated(value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index eedd34c0afdd..764c09396255 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -177,7 +177,4 @@ def test_span_with_opencensus_complicated(self, value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children From ecc4a9c03bb4a44692baf07f20139e5ab04f97b5 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 08:51:19 -0700 Subject: [PATCH 190/244] Synchronous username/password auth (#6416) --- .../azure/identity/_internal/__init__.py | 1 - .../azure-identity/tests/test_identity.py | 68 ------------------- 2 files changed, 69 deletions(-) diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index e7583139395b..cfdf935b801c 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,6 +2,5 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from .auth_code_redirect_handler import AuthCodeRedirectServer from .msal_credentials import ConfidentialClientCredential, PublicClientCredential from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 3aaa54a1f28f..8e7245522519 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -22,7 +22,6 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, - InteractiveBrowserCredential, UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential @@ -244,73 +243,6 @@ def test_default_credential(): DefaultAzureCredential() -@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser -def test_interactive_credential(): - oauth_state = "state" - expected_token = "access-token" - - transport = validating_transport( - requests=[Request()] * 2, # not validating requests because they're formed by MSAL - responses=[ - # expecting tenant discovery then a token request - mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), - mock_response( - json_payload={ - "access_token": expected_token, - "expires_in": 42, - "token_type": "Bearer", - "ext_expires_in": 42, - } - ), - ], - ) - - # mock local server fakes successful authentication by immediately returning a well-formed response - auth_code_response = {"code": "authorization-code", "state": [oauth_state]} - server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) - - credential = InteractiveBrowserCredential( - client_id="guid", - client_secret="secret", - server_class=server_class, - transport=transport, - instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request - ) - - # ensure the request beginning the flow has a known state value - with patch("azure.identity.browser_auth.uuid.uuid4", lambda: oauth_state): - token = credential.get_token("scope") - assert token.token == expected_token - - -@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser -def test_interactive_credential_timeout(): - # mock transport handles MSAL's tenant discovery - transport = Mock( - send=lambda _, **__: mock_response( - json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"} - ) - ) - - # mock local server blocks long enough to exceed the timeout - timeout = 1 - server_instance = Mock(wait_for_redirect=functools.partial(time.sleep, timeout + 1)) - server_class = Mock(return_value=server_instance) - - credential = InteractiveBrowserCredential( - client_id="guid", - client_secret="secret", - server_class=server_class, - timeout=timeout, - transport=transport, - instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request - ) - - with pytest.raises(ClientAuthenticationError) as ex: - credential.get_token("scope") - assert "timed out" in ex.value.message.lower() - - def test_username_password_credential(): expected_token = "access-token" transport = validating_transport( From 04878ff2507a1ba10211085eb7f01263c3dcd76b Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 14:04:30 -0700 Subject: [PATCH 191/244] Synchronous interactive browser authentication (#6466) --- .../azure/identity/_internal/__init__.py | 1 + .../azure-identity/tests/test_identity.py | 68 +++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index cfdf935b801c..e7583139395b 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,5 +2,6 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +from .auth_code_redirect_handler import AuthCodeRedirectServer from .msal_credentials import ConfidentialClientCredential, PublicClientCredential from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 8e7245522519..3aaa54a1f28f 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -22,6 +22,7 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, + InteractiveBrowserCredential, UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential @@ -243,6 +244,73 @@ def test_default_credential(): DefaultAzureCredential() +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential(): + oauth_state = "state" + expected_token = "access-token" + + transport = validating_transport( + requests=[Request()] * 2, # not validating requests because they're formed by MSAL + responses=[ + # expecting tenant discovery then a token request + mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), + mock_response( + json_payload={ + "access_token": expected_token, + "expires_in": 42, + "token_type": "Bearer", + "ext_expires_in": 42, + } + ), + ], + ) + + # mock local server fakes successful authentication by immediately returning a well-formed response + auth_code_response = {"code": "authorization-code", "state": [oauth_state]} + server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + # ensure the request beginning the flow has a known state value + with patch("azure.identity.browser_auth.uuid.uuid4", lambda: oauth_state): + token = credential.get_token("scope") + assert token.token == expected_token + + +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential_timeout(): + # mock transport handles MSAL's tenant discovery + transport = Mock( + send=lambda _, **__: mock_response( + json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"} + ) + ) + + # mock local server blocks long enough to exceed the timeout + timeout = 1 + server_instance = Mock(wait_for_redirect=functools.partial(time.sleep, timeout + 1)) + server_class = Mock(return_value=server_instance) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + timeout=timeout, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + with pytest.raises(ClientAuthenticationError) as ex: + credential.get_token("scope") + assert "timed out" in ex.value.message.lower() + + def test_username_password_credential(): expected_token = "access-token" transport = validating_transport( From 484cb94624c4e95a206df1b8b1ac76c6a7f89524 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Tue, 30 Jul 2019 20:19:31 -0700 Subject: [PATCH 192/244] KV aiohttp by default (#6563) * Aiohttp default async transport * Record keys with aiohttp * Record secrets with aiohttp --- .../azure/keyvault/secrets/_shared/async_client_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 0119ef5a6e44..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport +from azure.core.pipeline.transport import AsyncHttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient From 823851c0cb5dbdfac80efef5649dd84b95fc48ae Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 10:27:22 -0700 Subject: [PATCH 193/244] KV moved paging return type to ItemPaged (#6558) * KV with latest autorest * Make KV return ItemPaged from azure-core --- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../keys/_shared/async_client_base.py | 19 ----- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../secrets/_shared/async_client_base.py | 19 ----- 10 files changed, 416 insertions(+), 142 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, From 303ea8c77bc231d6e355fb2116f5751880d737ce Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:40:30 -0700 Subject: [PATCH 194/244] Remove docdb mgmt package from master (#6585) --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 - sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 - sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 - .../azure-mgmt-documentdb/azure/__init__.py | 1 - .../azure/mgmt/__init__.py | 1 - .../azure/mgmt/documentdb/__init__.py | 18 - .../azure/mgmt/documentdb/document_db.py | 83 -- .../azure/mgmt/documentdb/models/__init__.py | 52 - .../documentdb/models/consistency_policy.py | 50 - .../documentdb/models/database_account.py | 117 --- .../database_account_connection_string.py | 39 - ...tabase_account_create_update_parameters.py | 90 -- ..._account_list_connection_strings_result.py | 29 - .../database_account_list_keys_result.py | 53 - ...base_account_list_read_only_keys_result.py | 41 - .../models/database_account_paged.py | 27 - .../database_account_patch_parameters.py | 31 - ...abase_account_regenerate_key_parameters.py | 33 - .../documentdb/models/document_db_enums.py | 41 - .../documentdb/models/failover_policies.py | 28 - .../mgmt/documentdb/models/failover_policy.py | 48 - .../azure/mgmt/documentdb/models/location.py | 58 -- .../azure/mgmt/documentdb/models/resource.py | 54 -- .../mgmt/documentdb/operations/__init__.py | 16 - .../database_accounts_operations.py | 918 ------------------ .../azure/mgmt/documentdb/version.py | 13 - .../azure_bdist_wheel.py | 54 -- sdk/cosmos/azure-mgmt-documentdb/build.json | 5 - .../dev_requirements.txt | 1 - .../azure-mgmt-documentdb/sdk_packaging.toml | 2 - sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 - sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 -- ..._mgmt_documentdb.test_accounts_create.yaml | 193 ---- ..._mgmt_documentdb.test_accounts_delete.yaml | 467 --------- ...gmt_documentdb.test_accounts_features.yaml | 272 ------ .../tests/test_mgmt_documentdb.py | 146 --- 36 files changed, 3147 deletions(-) delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst deleted file mode 100644 index eb7345b4071e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. :changelog: - -Release History -=============== - -0.1.3 (2017-05-02) -++++++++++++++++++ - -* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix - -0.1.2 (2017-04-20) -++++++++++++++++++ - -This wheel package is now built with the azure wheel extension - -0.1.1 (2017-03-21) -++++++++++++++++++ - -* Added support for listing database account connection strings - -0.1.0 (2017-01-31) -++++++++++++++++++ - -* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in deleted file mode 100644 index 9ecaeb15de50..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst deleted file mode 100644 index a5204ea75358..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/README.rst +++ /dev/null @@ -1,52 +0,0 @@ -Microsoft Azure SDK for Python -============================== - -This is the Microsoft Azure DocumentDB Management Client Library. - -Azure Resource Manager (ARM) is the next generation of management APIs that -replace the old Azure Service Management (ASM). - -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. - -For the older Azure Service Management (ASM) libraries, see -`azure-servicemanagement-legacy `__ library. - -For a more complete set of Azure libraries, see the `azure `__ bundle package. - - -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - -Usage -===== - -For code examples, see `DocumentDB Management -`__ -on readthedocs.org. - - -Provide Feedback -================ - -If you encounter any bugs or have suggestions, please file an issue in the -`Issues `__ -section of the project. - - -.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py deleted file mode 100755 index 3ec900145f1e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .document_db import DocumentDB -from .version import VERSION - -__all__ = ['DocumentDB'] - -__version__ = VERSION - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py deleted file mode 100755 index 5eda44ab3e32..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import ServiceClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.database_accounts_operations import DatabaseAccountsOperations -from . import models - - -class DocumentDBConfiguration(AzureConfiguration): - """Configuration for DocumentDB - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") - if not base_url: - base_url = 'https://management.azure.com' - - super(DocumentDBConfiguration, self).__init__(base_url) - - self.add_user_agent('documentdb/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class DocumentDB(object): - """Azure DocumentDB Database Service Resource Provider REST API - - :ivar config: Configuration for client. - :vartype config: DocumentDBConfiguration - - :ivar database_accounts: DatabaseAccounts operations - :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2015-04-08' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.database_accounts = DatabaseAccountsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py deleted file mode 100755 index 2ed68c568a84..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .consistency_policy import ConsistencyPolicy -from .location import Location -from .failover_policy import FailoverPolicy -from .database_account import DatabaseAccount -from .failover_policies import FailoverPolicies -from .resource import Resource -from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters -from .database_account_patch_parameters import DatabaseAccountPatchParameters -from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult -from .database_account_list_keys_result import DatabaseAccountListKeysResult -from .database_account_connection_string import DatabaseAccountConnectionString -from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult -from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters -from .database_account_paged import DatabaseAccountPaged -from .document_db_enums import ( - DatabaseAccountKind, - DatabaseAccountOfferType, - DefaultConsistencyLevel, - KeyKind, -) - -__all__ = [ - 'ConsistencyPolicy', - 'Location', - 'FailoverPolicy', - 'DatabaseAccount', - 'FailoverPolicies', - 'Resource', - 'DatabaseAccountCreateUpdateParameters', - 'DatabaseAccountPatchParameters', - 'DatabaseAccountListReadOnlyKeysResult', - 'DatabaseAccountListKeysResult', - 'DatabaseAccountConnectionString', - 'DatabaseAccountListConnectionStringsResult', - 'DatabaseAccountRegenerateKeyParameters', - 'DatabaseAccountPaged', - 'DatabaseAccountKind', - 'DatabaseAccountOfferType', - 'DefaultConsistencyLevel', - 'KeyKind', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py deleted file mode 100755 index d8cefd4c0b59..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConsistencyPolicy(Model): - """The consistency policy for the DocumentDB database account. - - :param default_consistency_level: The default consistency level and - configuration settings of the DocumentDB account. Possible values include: - 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' - :type default_consistency_level: str or :class:`DefaultConsistencyLevel - ` - :param max_staleness_prefix: When used with the Bounded Staleness - consistency level, this value represents the number of stale requests - tolerated. Accepted range for this value is 1 – 2,147,483,647. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_staleness_prefix: long - :param max_interval_in_seconds: When used with the Bounded Staleness - consistency level, this value represents the time amount of staleness (in - seconds) tolerated. Accepted range for this value is 1 - 100. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_interval_in_seconds: int - """ - - _validation = { - 'default_consistency_level': {'required': True}, - 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, - 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, - 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, - 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, - } - - def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): - self.default_consistency_level = default_consistency_level - self.max_staleness_prefix = max_staleness_prefix - self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py deleted file mode 100755 index 89031adc35cb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccount(Resource): - """A DocumentDB database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param provisioning_state: - :type provisioning_state: str - :ivar document_endpoint: The connection endpoint for the DocumentDB - database account. - :vartype document_endpoint: str - :ivar database_account_offer_type: The offer type for the DocumentDB - database account. Default value: Standard. Possible values include: - 'Standard' - :vartype database_account_offer_type: str or - :class:`DatabaseAccountOfferType - ` - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - :param consistency_policy: The consistency policy for the DocumentDB - database account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :ivar write_locations: An array that contains the write location for the - DocumentDB account. - :vartype write_locations: list of :class:`Location - ` - :ivar read_locations: An array that contains of the read locations enabled - for the DocumentDB account. - :vartype read_locations: list of :class:`Location - ` - :ivar failover_policies: An array that contains the regions ordered by - their failover priorities. - :vartype failover_policies: list of :class:`FailoverPolicy - ` - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'document_endpoint': {'readonly': True}, - 'database_account_offer_type': {'readonly': True}, - 'write_locations': {'readonly': True}, - 'read_locations': {'readonly': True}, - 'failover_policies': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, - 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, - 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): - super(DatabaseAccount, self).__init__(location=location, tags=tags) - self.kind = kind - self.provisioning_state = provisioning_state - self.document_endpoint = None - self.database_account_offer_type = None - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover - self.consistency_policy = consistency_policy - self.write_locations = None - self.read_locations = None - self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py deleted file mode 100755 index db1828208069..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountConnectionString(Model): - """Connection string for the DocumentDB account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar connection_string: Value of the connection string - :vartype connection_string: str - :ivar description: Description of the connection string - :vartype description: str - """ - - _validation = { - 'connection_string': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self): - self.connection_string = None - self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py deleted file mode 100755 index 30978f482f0b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccountCreateUpdateParameters(Resource): - """Parameters to create and update DocumentDB database accounts. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param consistency_policy: The consistency policy for the DocumentDB - account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :param locations: An array that contains the georeplication locations - enabled for the DocumentDB account. - :type locations: list of :class:`Location - ` - :ivar database_account_offer_type: Default value: "Standard" . - :vartype database_account_offer_type: str - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - } - - database_account_offer_type = "Standard" - - def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): - super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) - self.kind = kind - self.consistency_policy = consistency_policy - self.locations = locations - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py deleted file mode 100755 index 7cddc00a3de1..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListConnectionStringsResult(Model): - """The connection strings for the given database account. - - :param connection_strings: An array that contains the connection strings - for the DocumentDB account. - :type connection_strings: list of :class:`DatabaseAccountConnectionString - ` - """ - - _attribute_map = { - 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, - } - - def __init__(self, connection_strings=None): - self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py deleted file mode 100755 index 4d775054ac14..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListKeysResult(Model): - """The access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_master_key: Base 64 encoded value of the primary read-write - key. - :vartype primary_master_key: str - :ivar secondary_master_key: Base 64 encoded value of the secondary - read-write key. - :vartype secondary_master_key: str - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_master_key': {'readonly': True}, - 'secondary_master_key': {'readonly': True}, - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, - 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, - 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_master_key = None - self.secondary_master_key = None - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py deleted file mode 100755 index 3330353950c6..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListReadOnlyKeysResult(Model): - """The read-only access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py deleted file mode 100755 index 4cb94909c515..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseAccountPaged(Paged): - """ - A paging container for iterating over a list of DatabaseAccount object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py deleted file mode 100755 index be78a4fd6817..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountPatchParameters(Model): - """Parameters for patching Azure DocumentDB database account properties. - - :param tags: - :type tags: dict - """ - - _validation = { - 'tags': {'required': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, tags): - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py deleted file mode 100755 index 3bff90d33db3..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountRegenerateKeyParameters(Model): - """Parameters to regenerate the keys within the database account. - - :param key_kind: The access key to regenerate. Possible values include: - 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - """ - - _validation = { - 'key_kind': {'required': True}, - } - - _attribute_map = { - 'key_kind': {'key': 'keyKind', 'type': 'str'}, - } - - def __init__(self, key_kind): - self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py deleted file mode 100755 index 1e87cecaeb2a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class DatabaseAccountKind(Enum): - - global_document_db = "GlobalDocumentDB" - mongo_db = "MongoDB" - parse = "Parse" - - -class DatabaseAccountOfferType(Enum): - - standard = "Standard" - - -class DefaultConsistencyLevel(Enum): - - eventual = "Eventual" - session = "Session" - bounded_staleness = "BoundedStaleness" - strong = "Strong" - consistent_prefix = "ConsistentPrefix" - - -class KeyKind(Enum): - - primary = "primary" - secondary = "secondary" - primary_readonly = "primaryReadonly" - secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py deleted file mode 100755 index 4c3ebff5e3b5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicies(Model): - """The list of new failover policies for the failover priority change. - - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - """ - - _attribute_map = { - 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, failover_policies=None): - self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py deleted file mode 100755 index 99cc2769403b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicy(Model): - """The failover policy for a given region of a database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region in which the database - account replicates to. Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region in which the database account - exists. - :type location_name: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py deleted file mode 100755 index 8bc82bde2c3f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Location(Model): - """A region in which the Azure DocumentDB database account is deployed. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region within the database account. - Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region. - :type location_name: str - :ivar document_endpoint: The connection endpoint for the specific region. - Example: - https://<accountName>-<locationName>.documents.azure.com:443/ - :vartype document_endpoint: str - :param provisioning_state: - :type provisioning_state: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.document_endpoint = None - self.provisioning_state = provisioning_state - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py deleted file mode 100755 index d5e887d0b78a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """A database account resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, location, tags=None): - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py deleted file mode 100755 index 27ed7c069537..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .database_accounts_operations import DatabaseAccountsOperations - -__all__ = [ - 'DatabaseAccountsOperations', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py deleted file mode 100755 index 2bb39b1f6839..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py +++ /dev/null @@ -1,918 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrestazure.azure_operation import AzureOperationPoller -import uuid - -from .. import models - - -class DatabaseAccountsOperations(object): - """DatabaseAccountsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". - """ - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-04-08" - - self.config = config - - def get( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Retrieves the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def patch( - self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): - """Patches the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param tags: - :type tags: dict - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - update_parameters = models.DatabaseAccountPatchParameters(tags=tags) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(update_parameters, 'DatabaseAccountPatchParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.patch(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def create_or_update( - self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): - """Creates or updates an Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param create_update_parameters: The parameters to provide for the - current database account. - :type create_update_parameters: - :class:`DatabaseAccountCreateUpdateParameters - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def delete( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Deletes an existing Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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 - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - def long_running_send(): - - request = self._client.delete(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def failover_priority_change( - self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): - """Changes the failover priority for the Azure DocumentDB database - account. A failover priority of 0 indicates a write region. The maximum - value for a failover priority = (total number of regions - 1). Failover - priority values must be unique for each of the regions in which the - database account exists. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(failover_parameters, 'FailoverPolicies') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - subscription. - - :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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - given resource group. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the access keys for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_connection_strings( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the connection strings for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListConnectionStringsResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_read_only_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the read-only access keys for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListReadOnlyKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def regenerate_key( - self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): - """Regenerates an access key for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param key_kind: The access key to regenerate. Possible values - include: 'primary', 'secondary', 'primaryReadonly', - 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def check_name_exists( - self, account_name, custom_headers=None, raw=False, **operation_config): - """Checks that the Azure DocumentDB account name already exists. A valid - account name may contain only lowercase letters, numbers, and the '-' - character, and must be between 3 and 50 characters. - - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: bool - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' - path_format_arguments = { - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.head(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = (response.status_code == 200) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py deleted file mode 100755 index 95ed79d29108..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.3" - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -from distutils import log as logger -import os.path - -from wheel.bdist_wheel import bdist_wheel -class azure_bdist_wheel(bdist_wheel): - """The purpose of this class is to build wheel a little differently than the sdist, - without requiring to build the wheel from the sdist (i.e. you can build the wheel - directly from source). - """ - - description = "Create an Azure wheel distribution" - - user_options = bdist_wheel.user_options + \ - [('azure-namespace-package=', None, - "Name of the deepest nspkg used")] - - def initialize_options(self): - bdist_wheel.initialize_options(self) - self.azure_namespace_package = None - - def finalize_options(self): - bdist_wheel.finalize_options(self) - if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): - raise ValueError("azure_namespace_package must finish by -nspkg") - - def run(self): - if not self.distribution.install_requires: - self.distribution.install_requires = [] - self.distribution.install_requires.append( - "{}>=2.0.0".format(self.azure_namespace_package)) - bdist_wheel.run(self) - - def write_record(self, bdist_dir, distinfo_dir): - if self.azure_namespace_package: - # Split and remove last part, assuming it's "nspkg" - subparts = self.azure_namespace_package.split('-')[0:-1] - folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] - for azure_sub_package in folder_with_init: - init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') - if os.path.isfile(init_file): - logger.info("manually remove {} while building the wheel".format(init_file)) - os.remove(init_file) - else: - raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) - bdist_wheel.write_record(self, bdist_dir, distinfo_dir) -cmdclass = { - 'bdist_wheel': azure_bdist_wheel, -} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json deleted file mode 100644 index 4d98fc12a39e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/build.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "autorest": "1.0.1-20170501-2300-nightly", - "date": "2017-05-01T20:13:42Z", - "version": "0.1.3" -} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt deleted file mode 100644 index 6ccb7f031ddd..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt +++ /dev/null @@ -1 +0,0 @@ --e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml deleted file mode 100644 index e7687fdae93b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml +++ /dev/null @@ -1,2 +0,0 @@ -[packaging] -auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg deleted file mode 100644 index 856f4164982c..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[bdist_wheel] -universal=1 -azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py deleted file mode 100644 index ddef54e31bb5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.py +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env python - -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup -try: - from azure_bdist_wheel import cmdclass -except ImportError: - from distutils import log as logger - logger.warn("Wheel is not available, disabling bdist_wheel hook") - cmdclass = {} - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-documentdb" -PACKAGE_PPRINT_NAME = "DocumentDB Management" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') - -# azure v0.x is not compatible with this package -# azure v0.x used to have a __version__ attribute (newer versions don't) -try: - import azure - try: - ver = azure.__version__ - raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' - ) - except AttributeError: - pass -except ImportError: - pass - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError('Cannot find version information') - -with open('README.rst', encoding='utf-8') as f: - readme = f.read() -with open('HISTORY.rst', encoding='utf-8') as f: - history = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + history, - license='MIT License', - author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', - classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'License :: OSI Approved :: MIT License', - ], - zip_safe=False, - packages=find_packages(), - install_requires=[ - 'msrestazure~=0.4.7', - 'azure-common~=1.1.5', - ], - cmdclass=cmdclass -) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml deleted file mode 100644 index d470d7f8673d..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml +++ /dev/null @@ -1,193 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] - method: HEAD - uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: ''} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['142'] - Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-ratelimit-remaining-tenant-reads: ['14999'] - x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] - status: {code: 404, message: NotFound} -- request: - body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], - "databaseAccountOfferType": "Standard"}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['121'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['910'] - x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Completed","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['33'] - x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml deleted file mode 100644 index e6f4e2348f8f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml +++ /dev/null @@ -1,467 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' - under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' - was not found."}}'} - headers: - Cache-Control: [no-cache] - Content-Length: ['214'] - Content-Type: [application/json; charset=utf-8] - Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-failure-cause: [gateway] - x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] - status: {code: 404, message: Not Found} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml deleted file mode 100644 index b2e4b82a9d9e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml +++ /dev/null @@ -1,272 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1144'] - x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1156'] - x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['2225'] - x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] - status: {code: 200, message: Ok} -- request: - body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['73'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 - response: - body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique - and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['170'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] - status: {code: 400, message: BadRequest} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 - response: - body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['239'] - x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] - status: {code: 200, message: Ok} -- request: - body: '{"keyKind": "primary"}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['22'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] - x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py deleted file mode 100644 index 902666a22cf0..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py +++ /dev/null @@ -1,146 +0,0 @@ -# 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. -#-------------------------------------------------------------------------- -import unittest - -import azure.mgmt.documentdb -from msrestazure.azure_exceptions import CloudError -from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer - - -class MgmtDocDBTest(AzureMgmtTestCase): - - def setUp(self): - super(MgmtDocDBTest, self).setUp() - self.client = self.create_mgmt_client( - azure.mgmt.documentdb.DocumentDB - ) - - @ResourceGroupPreparer() - def test_accounts_create(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtst') - - self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) - - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - account = async_docdb_create.result() - self.assertIsNotNone(account) - # Rest API issue - # self.assertEqual(account.name, account_name) - - @ResourceGroupPreparer() - def test_accounts_features(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtest') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - account = self.client.database_accounts.get( - resource_group.name, - account_name - ) - self.assertEqual(account.name, account_name) - - my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) - self.assertEqual(len(my_accounts), 1) - self.assertEqual(my_accounts[0].name, account_name) - - my_accounts = list(self.client.database_accounts.list()) - self.assertTrue(len(my_accounts) >= 1) - self.assertTrue(any(db.name == account_name for db in my_accounts)) - - # I guess we can make this test with no error, need to check with DocDB team - # This is an interesting test anyway, this implies that the serialization works - # and error message is available. Since this method does not return an object - # (i.e. no deserialization to test), this is a complete test. - # We are NOT here to test the RestAPI, but the Swagger file and Python code. - with self.assertRaises(CloudError) as cm: - async_change = self.client.database_accounts.failover_priority_change( - resource_group.name, - account_name, - [{ - 'location_name': self.region, - 'failover_priority': 0 - }] - ) - async_change.wait() - self.assertIn('Failover priorities must be unique', cm.exception.message) - - my_keys = self.client.database_accounts.list_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_master_key) - self.assertIsNotNone(my_keys.secondary_master_key) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - my_keys = self.client.database_accounts.list_read_only_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - async_regenerate = self.client.database_accounts.regenerate_key( - resource_group.name, - account_name, - "primary" - ) - async_regenerate.wait() - - @ResourceGroupPreparer() - def test_accounts_delete(self, resource_group, location): - account_name = self.get_resource_name('pydocumentdbtst') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - # Current implementation of msrestazure does not support 404 as a end of LRO delete - # https://github.com/Azure/msrestazure-for-python/issues/7 - async_delete = self.client.database_accounts.delete(resource_group.name, account_name) - try: - async_delete.wait() - except CloudError as err: - if err.response.status_code != 404: - raise - - -#------------------------------------------------------------------------------ -if __name__ == '__main__': - unittest.main() From 3ddaf0879c0f2ba5092595bed985bde0d1d4be52 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:42:03 -0700 Subject: [PATCH 195/244] Revert "Remove docdb mgmt package from master (#6585)" (#6593) This reverts commit d2ed7d87997eac9b715ee9802c15349a12446b84. --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 + sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 + sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 + .../azure-mgmt-documentdb/azure/__init__.py | 1 + .../azure/mgmt/__init__.py | 1 + .../azure/mgmt/documentdb/__init__.py | 18 + .../azure/mgmt/documentdb/document_db.py | 83 ++ .../azure/mgmt/documentdb/models/__init__.py | 52 + .../documentdb/models/consistency_policy.py | 50 + .../documentdb/models/database_account.py | 117 +++ .../database_account_connection_string.py | 39 + ...tabase_account_create_update_parameters.py | 90 ++ ..._account_list_connection_strings_result.py | 29 + .../database_account_list_keys_result.py | 53 + ...base_account_list_read_only_keys_result.py | 41 + .../models/database_account_paged.py | 27 + .../database_account_patch_parameters.py | 31 + ...abase_account_regenerate_key_parameters.py | 33 + .../documentdb/models/document_db_enums.py | 41 + .../documentdb/models/failover_policies.py | 28 + .../mgmt/documentdb/models/failover_policy.py | 48 + .../azure/mgmt/documentdb/models/location.py | 58 ++ .../azure/mgmt/documentdb/models/resource.py | 54 ++ .../mgmt/documentdb/operations/__init__.py | 16 + .../database_accounts_operations.py | 918 ++++++++++++++++++ .../azure/mgmt/documentdb/version.py | 13 + .../azure_bdist_wheel.py | 54 ++ sdk/cosmos/azure-mgmt-documentdb/build.json | 5 + .../dev_requirements.txt | 1 + .../azure-mgmt-documentdb/sdk_packaging.toml | 2 + sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 + sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 ++ ..._mgmt_documentdb.test_accounts_create.yaml | 193 ++++ ..._mgmt_documentdb.test_accounts_delete.yaml | 467 +++++++++ ...gmt_documentdb.test_accounts_features.yaml | 272 ++++++ .../tests/test_mgmt_documentdb.py | 146 +++ 36 files changed, 3147 insertions(+) create mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in create mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json create mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt create mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst new file mode 100644 index 000000000000..eb7345b4071e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst @@ -0,0 +1,24 @@ +.. :changelog: + +Release History +=============== + +0.1.3 (2017-05-02) +++++++++++++++++++ + +* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix + +0.1.2 (2017-04-20) +++++++++++++++++++ + +This wheel package is now built with the azure wheel extension + +0.1.1 (2017-03-21) +++++++++++++++++++ + +* Added support for listing database account connection strings + +0.1.0 (2017-01-31) +++++++++++++++++++ + +* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in new file mode 100644 index 000000000000..9ecaeb15de50 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in @@ -0,0 +1,2 @@ +include *.rst +include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst new file mode 100644 index 000000000000..a5204ea75358 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/README.rst @@ -0,0 +1,52 @@ +Microsoft Azure SDK for Python +============================== + +This is the Microsoft Azure DocumentDB Management Client Library. + +Azure Resource Manager (ARM) is the next generation of management APIs that +replace the old Azure Service Management (ASM). + +This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. + +For the older Azure Service Management (ASM) libraries, see +`azure-servicemanagement-legacy `__ library. + +For a more complete set of Azure libraries, see the `azure `__ bundle package. + + +Compatibility +============= + +**IMPORTANT**: If you have an earlier version of the azure package +(version < 1.0), you should uninstall it before installing this package. + +You can check the version using pip: + +.. code:: shell + + pip freeze + +If you see azure==0.11.0 (or any version below 1.0), uninstall it first: + +.. code:: shell + + pip uninstall azure + + +Usage +===== + +For code examples, see `DocumentDB Management +`__ +on readthedocs.org. + + +Provide Feedback +================ + +If you encounter any bugs or have suggestions, please file an issue in the +`Issues `__ +section of the project. + + +.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py new file mode 100755 index 000000000000..3ec900145f1e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .document_db import DocumentDB +from .version import VERSION + +__all__ = ['DocumentDB'] + +__version__ = VERSION + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py new file mode 100755 index 000000000000..5eda44ab3e32 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import ServiceClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.database_accounts_operations import DatabaseAccountsOperations +from . import models + + +class DocumentDBConfiguration(AzureConfiguration): + """Configuration for DocumentDB + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not isinstance(subscription_id, str): + raise TypeError("Parameter 'subscription_id' must be str.") + if not base_url: + base_url = 'https://management.azure.com' + + super(DocumentDBConfiguration, self).__init__(base_url) + + self.add_user_agent('documentdb/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class DocumentDB(object): + """Azure DocumentDB Database Service Resource Provider REST API + + :ivar config: Configuration for client. + :vartype config: DocumentDBConfiguration + + :ivar database_accounts: DatabaseAccounts operations + :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) + self._client = ServiceClient(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2015-04-08' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.database_accounts = DatabaseAccountsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py new file mode 100755 index 000000000000..2ed68c568a84 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .consistency_policy import ConsistencyPolicy +from .location import Location +from .failover_policy import FailoverPolicy +from .database_account import DatabaseAccount +from .failover_policies import FailoverPolicies +from .resource import Resource +from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters +from .database_account_patch_parameters import DatabaseAccountPatchParameters +from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult +from .database_account_list_keys_result import DatabaseAccountListKeysResult +from .database_account_connection_string import DatabaseAccountConnectionString +from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult +from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters +from .database_account_paged import DatabaseAccountPaged +from .document_db_enums import ( + DatabaseAccountKind, + DatabaseAccountOfferType, + DefaultConsistencyLevel, + KeyKind, +) + +__all__ = [ + 'ConsistencyPolicy', + 'Location', + 'FailoverPolicy', + 'DatabaseAccount', + 'FailoverPolicies', + 'Resource', + 'DatabaseAccountCreateUpdateParameters', + 'DatabaseAccountPatchParameters', + 'DatabaseAccountListReadOnlyKeysResult', + 'DatabaseAccountListKeysResult', + 'DatabaseAccountConnectionString', + 'DatabaseAccountListConnectionStringsResult', + 'DatabaseAccountRegenerateKeyParameters', + 'DatabaseAccountPaged', + 'DatabaseAccountKind', + 'DatabaseAccountOfferType', + 'DefaultConsistencyLevel', + 'KeyKind', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py new file mode 100755 index 000000000000..d8cefd4c0b59 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConsistencyPolicy(Model): + """The consistency policy for the DocumentDB database account. + + :param default_consistency_level: The default consistency level and + configuration settings of the DocumentDB account. Possible values include: + 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' + :type default_consistency_level: str or :class:`DefaultConsistencyLevel + ` + :param max_staleness_prefix: When used with the Bounded Staleness + consistency level, this value represents the number of stale requests + tolerated. Accepted range for this value is 1 – 2,147,483,647. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_staleness_prefix: long + :param max_interval_in_seconds: When used with the Bounded Staleness + consistency level, this value represents the time amount of staleness (in + seconds) tolerated. Accepted range for this value is 1 - 100. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_interval_in_seconds: int + """ + + _validation = { + 'default_consistency_level': {'required': True}, + 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, + 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, + 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, + 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, + } + + def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): + self.default_consistency_level = default_consistency_level + self.max_staleness_prefix = max_staleness_prefix + self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py new file mode 100755 index 000000000000..89031adc35cb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py @@ -0,0 +1,117 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccount(Resource): + """A DocumentDB database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param provisioning_state: + :type provisioning_state: str + :ivar document_endpoint: The connection endpoint for the DocumentDB + database account. + :vartype document_endpoint: str + :ivar database_account_offer_type: The offer type for the DocumentDB + database account. Default value: Standard. Possible values include: + 'Standard' + :vartype database_account_offer_type: str or + :class:`DatabaseAccountOfferType + ` + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + :param consistency_policy: The consistency policy for the DocumentDB + database account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :ivar write_locations: An array that contains the write location for the + DocumentDB account. + :vartype write_locations: list of :class:`Location + ` + :ivar read_locations: An array that contains of the read locations enabled + for the DocumentDB account. + :vartype read_locations: list of :class:`Location + ` + :ivar failover_policies: An array that contains the regions ordered by + their failover priorities. + :vartype failover_policies: list of :class:`FailoverPolicy + ` + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'document_endpoint': {'readonly': True}, + 'database_account_offer_type': {'readonly': True}, + 'write_locations': {'readonly': True}, + 'read_locations': {'readonly': True}, + 'failover_policies': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, + 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, + 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): + super(DatabaseAccount, self).__init__(location=location, tags=tags) + self.kind = kind + self.provisioning_state = provisioning_state + self.document_endpoint = None + self.database_account_offer_type = None + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover + self.consistency_policy = consistency_policy + self.write_locations = None + self.read_locations = None + self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py new file mode 100755 index 000000000000..db1828208069 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountConnectionString(Model): + """Connection string for the DocumentDB account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar connection_string: Value of the connection string + :vartype connection_string: str + :ivar description: Description of the connection string + :vartype description: str + """ + + _validation = { + 'connection_string': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self): + self.connection_string = None + self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py new file mode 100755 index 000000000000..30978f482f0b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccountCreateUpdateParameters(Resource): + """Parameters to create and update DocumentDB database accounts. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param consistency_policy: The consistency policy for the DocumentDB + account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :param locations: An array that contains the georeplication locations + enabled for the DocumentDB account. + :type locations: list of :class:`Location + ` + :ivar database_account_offer_type: Default value: "Standard" . + :vartype database_account_offer_type: str + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'locations': {'required': True}, + 'database_account_offer_type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + } + + database_account_offer_type = "Standard" + + def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): + super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) + self.kind = kind + self.consistency_policy = consistency_policy + self.locations = locations + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py new file mode 100755 index 000000000000..7cddc00a3de1 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListConnectionStringsResult(Model): + """The connection strings for the given database account. + + :param connection_strings: An array that contains the connection strings + for the DocumentDB account. + :type connection_strings: list of :class:`DatabaseAccountConnectionString + ` + """ + + _attribute_map = { + 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, + } + + def __init__(self, connection_strings=None): + self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py new file mode 100755 index 000000000000..4d775054ac14 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListKeysResult(Model): + """The access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_master_key: Base 64 encoded value of the primary read-write + key. + :vartype primary_master_key: str + :ivar secondary_master_key: Base 64 encoded value of the secondary + read-write key. + :vartype secondary_master_key: str + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_master_key': {'readonly': True}, + 'secondary_master_key': {'readonly': True}, + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, + 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, + 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_master_key = None + self.secondary_master_key = None + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py new file mode 100755 index 000000000000..3330353950c6 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListReadOnlyKeysResult(Model): + """The read-only access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py new file mode 100755 index 000000000000..4cb94909c515 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class DatabaseAccountPaged(Paged): + """ + A paging container for iterating over a list of DatabaseAccount object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py new file mode 100755 index 000000000000..be78a4fd6817 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountPatchParameters(Model): + """Parameters for patching Azure DocumentDB database account properties. + + :param tags: + :type tags: dict + """ + + _validation = { + 'tags': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, tags): + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py new file mode 100755 index 000000000000..3bff90d33db3 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountRegenerateKeyParameters(Model): + """Parameters to regenerate the keys within the database account. + + :param key_kind: The access key to regenerate. Possible values include: + 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + """ + + _validation = { + 'key_kind': {'required': True}, + } + + _attribute_map = { + 'key_kind': {'key': 'keyKind', 'type': 'str'}, + } + + def __init__(self, key_kind): + self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py new file mode 100755 index 000000000000..1e87cecaeb2a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class DatabaseAccountKind(Enum): + + global_document_db = "GlobalDocumentDB" + mongo_db = "MongoDB" + parse = "Parse" + + +class DatabaseAccountOfferType(Enum): + + standard = "Standard" + + +class DefaultConsistencyLevel(Enum): + + eventual = "Eventual" + session = "Session" + bounded_staleness = "BoundedStaleness" + strong = "Strong" + consistent_prefix = "ConsistentPrefix" + + +class KeyKind(Enum): + + primary = "primary" + secondary = "secondary" + primary_readonly = "primaryReadonly" + secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py new file mode 100755 index 000000000000..4c3ebff5e3b5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicies(Model): + """The list of new failover policies for the failover priority change. + + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + """ + + _attribute_map = { + 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, failover_policies=None): + self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py new file mode 100755 index 000000000000..99cc2769403b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicy(Model): + """The failover policy for a given region of a database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region in which the database + account replicates to. Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region in which the database account + exists. + :type location_name: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py new file mode 100755 index 000000000000..8bc82bde2c3f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Location(Model): + """A region in which the Azure DocumentDB database account is deployed. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region within the database account. + Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region. + :type location_name: str + :ivar document_endpoint: The connection endpoint for the specific region. + Example: + https://<accountName>-<locationName>.documents.azure.com:443/ + :vartype document_endpoint: str + :param provisioning_state: + :type provisioning_state: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'document_endpoint': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.document_endpoint = None + self.provisioning_state = provisioning_state + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py new file mode 100755 index 000000000000..d5e887d0b78a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """A database account resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, location, tags=None): + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py new file mode 100755 index 000000000000..27ed7c069537 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py @@ -0,0 +1,16 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .database_accounts_operations import DatabaseAccountsOperations + +__all__ = [ + 'DatabaseAccountsOperations', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py new file mode 100755 index 000000000000..2bb39b1f6839 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py @@ -0,0 +1,918 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrestazure.azure_operation import AzureOperationPoller +import uuid + +from .. import models + + +class DatabaseAccountsOperations(object): + """DatabaseAccountsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". + """ + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-04-08" + + self.config = config + + def get( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Retrieves the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def patch( + self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): + """Patches the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param tags: + :type tags: dict + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + update_parameters = models.DatabaseAccountPatchParameters(tags=tags) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(update_parameters, 'DatabaseAccountPatchParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.patch(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def create_or_update( + self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates an Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param create_update_parameters: The parameters to provide for the + current database account. + :type create_update_parameters: + :class:`DatabaseAccountCreateUpdateParameters + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.put(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def delete( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Deletes an existing Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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 + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + def long_running_send(): + + request = self._client.delete(url, query_parameters) + return self._client.send(request, header_parameters, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def failover_priority_change( + self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): + """Changes the failover priority for the Azure DocumentDB database + account. A failover priority of 0 indicates a write region. The maximum + value for a failover priority = (total number of regions - 1). Failover + priority values must be unique for each of the regions in which the + database account exists. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(failover_parameters, 'FailoverPolicies') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + subscription. + + :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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + given resource group. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the access keys for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_connection_strings( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the connection strings for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListConnectionStringsResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_read_only_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the read-only access keys for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListReadOnlyKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def regenerate_key( + self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): + """Regenerates an access key for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param key_kind: The access key to regenerate. Possible values + include: 'primary', 'secondary', 'primaryReadonly', + 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def check_name_exists( + self, account_name, custom_headers=None, raw=False, **operation_config): + """Checks that the Azure DocumentDB account name already exists. A valid + account name may contain only lowercase letters, numbers, and the '-' + character, and must be between 3 and 50 characters. + + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: bool + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' + path_format_arguments = { + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.head(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = (response.status_code == 200) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py new file mode 100755 index 000000000000..95ed79d29108 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.3" + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py new file mode 100644 index 000000000000..8a81d1b61775 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py @@ -0,0 +1,54 @@ +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +from distutils import log as logger +import os.path + +from wheel.bdist_wheel import bdist_wheel +class azure_bdist_wheel(bdist_wheel): + """The purpose of this class is to build wheel a little differently than the sdist, + without requiring to build the wheel from the sdist (i.e. you can build the wheel + directly from source). + """ + + description = "Create an Azure wheel distribution" + + user_options = bdist_wheel.user_options + \ + [('azure-namespace-package=', None, + "Name of the deepest nspkg used")] + + def initialize_options(self): + bdist_wheel.initialize_options(self) + self.azure_namespace_package = None + + def finalize_options(self): + bdist_wheel.finalize_options(self) + if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): + raise ValueError("azure_namespace_package must finish by -nspkg") + + def run(self): + if not self.distribution.install_requires: + self.distribution.install_requires = [] + self.distribution.install_requires.append( + "{}>=2.0.0".format(self.azure_namespace_package)) + bdist_wheel.run(self) + + def write_record(self, bdist_dir, distinfo_dir): + if self.azure_namespace_package: + # Split and remove last part, assuming it's "nspkg" + subparts = self.azure_namespace_package.split('-')[0:-1] + folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] + for azure_sub_package in folder_with_init: + init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') + if os.path.isfile(init_file): + logger.info("manually remove {} while building the wheel".format(init_file)) + os.remove(init_file) + else: + raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) + bdist_wheel.write_record(self, bdist_dir, distinfo_dir) +cmdclass = { + 'bdist_wheel': azure_bdist_wheel, +} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json new file mode 100644 index 000000000000..4d98fc12a39e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/build.json @@ -0,0 +1,5 @@ +{ + "autorest": "1.0.1-20170501-2300-nightly", + "date": "2017-05-01T20:13:42Z", + "version": "0.1.3" +} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt new file mode 100644 index 000000000000..6ccb7f031ddd --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt @@ -0,0 +1 @@ +-e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml new file mode 100644 index 000000000000..e7687fdae93b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg new file mode 100644 index 000000000000..856f4164982c --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg @@ -0,0 +1,3 @@ +[bdist_wheel] +universal=1 +azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py new file mode 100644 index 000000000000..ddef54e31bb5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup +try: + from azure_bdist_wheel import cmdclass +except ImportError: + from distutils import log as logger + logger.warn("Wheel is not available, disabling bdist_wheel hook") + cmdclass = {} + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-documentdb" +PACKAGE_PPRINT_NAME = "DocumentDB Management" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.rst', encoding='utf-8') as f: + readme = f.read() +with open('HISTORY.rst', encoding='utf-8') as f: + history = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + history, + license='MIT License', + author='Microsoft Corporation', + author_email='ptvshelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(), + install_requires=[ + 'msrestazure~=0.4.7', + 'azure-common~=1.1.5', + ], + cmdclass=cmdclass +) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml new file mode 100644 index 000000000000..d470d7f8673d --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml @@ -0,0 +1,193 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] + method: HEAD + uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: ''} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['142'] + Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-ratelimit-remaining-tenant-reads: ['14999'] + x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] + status: {code: 404, message: NotFound} +- request: + body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], + "databaseAccountOfferType": "Standard"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['121'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['910'] + x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Completed","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['33'] + x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml new file mode 100644 index 000000000000..e6f4e2348f8f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml @@ -0,0 +1,467 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' + under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' + was not found."}}'} + headers: + Cache-Control: [no-cache] + Content-Length: ['214'] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-failure-cause: [gateway] + x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] + status: {code: 404, message: Not Found} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml new file mode 100644 index 000000000000..b2e4b82a9d9e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml @@ -0,0 +1,272 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1144'] + x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1156'] + x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2225'] + x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] + status: {code: 200, message: Ok} +- request: + body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['73'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 + response: + body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique + and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['170'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] + status: {code: 400, message: BadRequest} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 + response: + body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['239'] + x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] + status: {code: 200, message: Ok} +- request: + body: '{"keyKind": "primary"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['22'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] + x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py new file mode 100644 index 000000000000..902666a22cf0 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py @@ -0,0 +1,146 @@ +# 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. +#-------------------------------------------------------------------------- +import unittest + +import azure.mgmt.documentdb +from msrestazure.azure_exceptions import CloudError +from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer + + +class MgmtDocDBTest(AzureMgmtTestCase): + + def setUp(self): + super(MgmtDocDBTest, self).setUp() + self.client = self.create_mgmt_client( + azure.mgmt.documentdb.DocumentDB + ) + + @ResourceGroupPreparer() + def test_accounts_create(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtst') + + self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) + + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + account = async_docdb_create.result() + self.assertIsNotNone(account) + # Rest API issue + # self.assertEqual(account.name, account_name) + + @ResourceGroupPreparer() + def test_accounts_features(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtest') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + account = self.client.database_accounts.get( + resource_group.name, + account_name + ) + self.assertEqual(account.name, account_name) + + my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) + self.assertEqual(len(my_accounts), 1) + self.assertEqual(my_accounts[0].name, account_name) + + my_accounts = list(self.client.database_accounts.list()) + self.assertTrue(len(my_accounts) >= 1) + self.assertTrue(any(db.name == account_name for db in my_accounts)) + + # I guess we can make this test with no error, need to check with DocDB team + # This is an interesting test anyway, this implies that the serialization works + # and error message is available. Since this method does not return an object + # (i.e. no deserialization to test), this is a complete test. + # We are NOT here to test the RestAPI, but the Swagger file and Python code. + with self.assertRaises(CloudError) as cm: + async_change = self.client.database_accounts.failover_priority_change( + resource_group.name, + account_name, + [{ + 'location_name': self.region, + 'failover_priority': 0 + }] + ) + async_change.wait() + self.assertIn('Failover priorities must be unique', cm.exception.message) + + my_keys = self.client.database_accounts.list_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_master_key) + self.assertIsNotNone(my_keys.secondary_master_key) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + my_keys = self.client.database_accounts.list_read_only_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + async_regenerate = self.client.database_accounts.regenerate_key( + resource_group.name, + account_name, + "primary" + ) + async_regenerate.wait() + + @ResourceGroupPreparer() + def test_accounts_delete(self, resource_group, location): + account_name = self.get_resource_name('pydocumentdbtst') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + # Current implementation of msrestazure does not support 404 as a end of LRO delete + # https://github.com/Azure/msrestazure-for-python/issues/7 + async_delete = self.client.database_accounts.delete(resource_group.name, account_name) + try: + async_delete.wait() + except CloudError as err: + if err.response.status_code != 404: + raise + + +#------------------------------------------------------------------------------ +if __name__ == '__main__': + unittest.main() From 6e4d25e5974580d3852d4d53f643104d901ede6e Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 10:16:27 -0700 Subject: [PATCH 196/244] Update CODEOWNERS --- .github/CODEOWNERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 07d57ac48320..0172563e9a84 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -40,6 +40,9 @@ # Management Plane /**/*mgmt*/ @zikalino +# Management Plane +/**/*mgmt*/ @zikalino + ########### # Eng Sys ########### From 26b582119592dd3c130337755c3a32b6f91dcd5b Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 11:03:35 -0700 Subject: [PATCH 197/244] more code owners --- .github/CODEOWNERS | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0172563e9a84..07d57ac48320 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -40,9 +40,6 @@ # Management Plane /**/*mgmt*/ @zikalino -# Management Plane -/**/*mgmt*/ @zikalino - ########### # Eng Sys ########### From 53a09881554dd0e99d114a01f2bc6fb1fa5b58ac Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 11:58:35 -0700 Subject: [PATCH 198/244] add policy and decorators for secrets (#6453) --- .../azure/keyvault/secrets/_shared/async_client_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 193e6e324c7e..c451ffb1e766 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncHttpTransport +from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient From dff604ab00063f95beee00865e34e59f8c28312e Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Thu, 25 Jul 2019 12:41:38 -0700 Subject: [PATCH 199/244] Paging v2 (#6420) * First version of paging * Clean sync paging * Async paging * Name AsyncList without underscore * MyPy happyness * pylint * black * PageIterator as conf * Simplify ItemPaged * Use chain to link iterable * Make Paging more open * Docstring * pylint / mypy / black * Regenerate KV with latest Autorest + Paging branch (#6479) * Regenerate KV with latest Autorest + Paging branch * Remove unused import in tests * Make the async adapter more generic * Regeneration after operation mixin fix in Autorest * COmmit changes forgotten in #6418 * Fixing syntax for 2.7 * Move Storage Queue to new Paging (#6447) * Move Storage Queue to new Paging * Working Storage queue on new paging * Fix types * First shot of blob tests update * Fixing blob tests * File to new paging * Doc fix * Feedbacks from @annatisch * Fix last @annatisch comment * Simplify paging contract * Fix storage queue after new paging contract --- .../_key_vault_client_operations_async.py | 60 ++++------------ .../_key_vault_client_operations.py | 60 ++++------------ .../_key_vault_client_operations_async.py | 70 ++++--------------- .../_key_vault_client_operations.py | 70 ++++--------------- .../keys/_shared/async_client_base.py | 19 +++++ .../_key_vault_client_operations_async.py | 60 ++++------------ .../_key_vault_client_operations.py | 60 ++++------------ .../_key_vault_client_operations_async.py | 70 ++++--------------- .../_key_vault_client_operations.py | 70 ++++--------------- .../secrets/_shared/async_client_base.py | 19 +++++ 10 files changed, 142 insertions(+), 416 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index b5cc965119ed..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 0ae7fd5fb025..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index 08e45c2b44a7..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index b9ed6e10ea21..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 193e6e324c7e..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -21,6 +21,25 @@ pass +class AsyncPagingAdapter: + """For each item in an AsyncIterator, returns the result of applying fn to that item. + Python 3.6 added syntax that could replace this (yield within async for).""" + + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: + self._pages = pages + self._fn = fn + + def __aiter__(self): + return self + + async def __anext__(self) -> Any: + item = await self._pages.__anext__() + if not item: + raise StopAsyncIteration + return self._fn(item) + # TODO: expected type Model got Coroutine instead? + + class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index b5cc965119ed..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 0ae7fd5fb025..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index 08e45c2b44a7..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index b9ed6e10ea21..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index c451ffb1e766..0119ef5a6e44 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -21,6 +21,25 @@ pass +class AsyncPagingAdapter: + """For each item in an AsyncIterator, returns the result of applying fn to that item. + Python 3.6 added syntax that could replace this (yield within async for).""" + + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: + self._pages = pages + self._fn = fn + + def __aiter__(self): + return self + + async def __anext__(self) -> Any: + item = await self._pages.__anext__() + if not item: + raise StopAsyncIteration + return self._fn(item) + # TODO: expected type Model got Coroutine instead? + + class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, From 687f95b5d10056c5bb1b2753fa2730656788aeb8 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 15:48:49 -0700 Subject: [PATCH 200/244] get rid of should only propagate (#6497) --- sdk/core/azure-core/azure/core/tracing/decorator.py | 2 +- sdk/core/azure-core/azure/core/tracing/decorator_async.py | 2 +- .../azure_core_asynctests/test_tracing_decorator_async.py | 5 ++++- sdk/core/azure-core/tests/test_tracing_decorator.py | 5 ++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 3986dcaf31ed..7d5d7bfce407 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None and orig_wrapped_span is None: + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 4df65fee77ef..781e20a6bef2 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None and orig_wrapped_span is None: + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index 82b4f97dc92f..e2a5c92e60b9 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -145,4 +145,7 @@ async def test_span_with_opencensus_complicated(value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert not parent.children[3].children + assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" + assert parent.children[3].children[1].span_data.name == "MockClient.make_request" + children = parent.children[1].children + assert len(children) == 2 diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index 764c09396255..eedd34c0afdd 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -177,4 +177,7 @@ def test_span_with_opencensus_complicated(self, value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert not parent.children[3].children + assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" + assert parent.children[3].children[1].span_data.name == "MockClient.make_request" + children = parent.children[1].children + assert len(children) == 2 From b9f5a933190838215d84a63e3b0d740e2a1a09f0 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Mon, 29 Jul 2019 14:05:36 -0700 Subject: [PATCH 201/244] decorator only trace very top level function (#6530) --- sdk/core/azure-core/azure/core/tracing/decorator.py | 2 +- sdk/core/azure-core/azure/core/tracing/decorator_async.py | 2 +- .../azure_core_asynctests/test_tracing_decorator_async.py | 5 +---- sdk/core/azure-core/tests/test_tracing_decorator.py | 5 +---- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 7d5d7bfce407..3986dcaf31ed 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 781e20a6bef2..4df65fee77ef 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index e2a5c92e60b9..82b4f97dc92f 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -145,7 +145,4 @@ async def test_span_with_opencensus_complicated(value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index eedd34c0afdd..764c09396255 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -177,7 +177,4 @@ def test_span_with_opencensus_complicated(self, value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children From 7c6732dda1d3f92dee105a739184466bbea25515 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 08:51:19 -0700 Subject: [PATCH 202/244] Synchronous username/password auth (#6416) --- .../azure/identity/_internal/__init__.py | 1 - .../azure-identity/tests/test_identity.py | 68 ------------------- 2 files changed, 69 deletions(-) diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index e7583139395b..cfdf935b801c 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,6 +2,5 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from .auth_code_redirect_handler import AuthCodeRedirectServer from .msal_credentials import ConfidentialClientCredential, PublicClientCredential from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 3aaa54a1f28f..8e7245522519 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -22,7 +22,6 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, - InteractiveBrowserCredential, UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential @@ -244,73 +243,6 @@ def test_default_credential(): DefaultAzureCredential() -@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser -def test_interactive_credential(): - oauth_state = "state" - expected_token = "access-token" - - transport = validating_transport( - requests=[Request()] * 2, # not validating requests because they're formed by MSAL - responses=[ - # expecting tenant discovery then a token request - mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), - mock_response( - json_payload={ - "access_token": expected_token, - "expires_in": 42, - "token_type": "Bearer", - "ext_expires_in": 42, - } - ), - ], - ) - - # mock local server fakes successful authentication by immediately returning a well-formed response - auth_code_response = {"code": "authorization-code", "state": [oauth_state]} - server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) - - credential = InteractiveBrowserCredential( - client_id="guid", - client_secret="secret", - server_class=server_class, - transport=transport, - instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request - ) - - # ensure the request beginning the flow has a known state value - with patch("azure.identity.browser_auth.uuid.uuid4", lambda: oauth_state): - token = credential.get_token("scope") - assert token.token == expected_token - - -@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser -def test_interactive_credential_timeout(): - # mock transport handles MSAL's tenant discovery - transport = Mock( - send=lambda _, **__: mock_response( - json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"} - ) - ) - - # mock local server blocks long enough to exceed the timeout - timeout = 1 - server_instance = Mock(wait_for_redirect=functools.partial(time.sleep, timeout + 1)) - server_class = Mock(return_value=server_instance) - - credential = InteractiveBrowserCredential( - client_id="guid", - client_secret="secret", - server_class=server_class, - timeout=timeout, - transport=transport, - instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request - ) - - with pytest.raises(ClientAuthenticationError) as ex: - credential.get_token("scope") - assert "timed out" in ex.value.message.lower() - - def test_username_password_credential(): expected_token = "access-token" transport = validating_transport( From f9ec0a507df59e2f19dbeddb83085f3dfd9615b7 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 14:04:30 -0700 Subject: [PATCH 203/244] Synchronous interactive browser authentication (#6466) --- .../azure/identity/_internal/__init__.py | 1 + .../azure-identity/tests/test_identity.py | 68 +++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index cfdf935b801c..e7583139395b 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,5 +2,6 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +from .auth_code_redirect_handler import AuthCodeRedirectServer from .msal_credentials import ConfidentialClientCredential, PublicClientCredential from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 8e7245522519..3aaa54a1f28f 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -22,6 +22,7 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, + InteractiveBrowserCredential, UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential @@ -243,6 +244,73 @@ def test_default_credential(): DefaultAzureCredential() +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential(): + oauth_state = "state" + expected_token = "access-token" + + transport = validating_transport( + requests=[Request()] * 2, # not validating requests because they're formed by MSAL + responses=[ + # expecting tenant discovery then a token request + mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), + mock_response( + json_payload={ + "access_token": expected_token, + "expires_in": 42, + "token_type": "Bearer", + "ext_expires_in": 42, + } + ), + ], + ) + + # mock local server fakes successful authentication by immediately returning a well-formed response + auth_code_response = {"code": "authorization-code", "state": [oauth_state]} + server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + # ensure the request beginning the flow has a known state value + with patch("azure.identity.browser_auth.uuid.uuid4", lambda: oauth_state): + token = credential.get_token("scope") + assert token.token == expected_token + + +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential_timeout(): + # mock transport handles MSAL's tenant discovery + transport = Mock( + send=lambda _, **__: mock_response( + json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"} + ) + ) + + # mock local server blocks long enough to exceed the timeout + timeout = 1 + server_instance = Mock(wait_for_redirect=functools.partial(time.sleep, timeout + 1)) + server_class = Mock(return_value=server_instance) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + timeout=timeout, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + with pytest.raises(ClientAuthenticationError) as ex: + credential.get_token("scope") + assert "timed out" in ex.value.message.lower() + + def test_username_password_credential(): expected_token = "access-token" transport = validating_transport( From 6e82b5b3c74595de7e837df62c851ee3cb3bd2fa Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Tue, 30 Jul 2019 20:19:31 -0700 Subject: [PATCH 204/244] KV aiohttp by default (#6563) * Aiohttp default async transport * Record keys with aiohttp * Record secrets with aiohttp --- .../azure/keyvault/secrets/_shared/async_client_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 0119ef5a6e44..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport +from azure.core.pipeline.transport import AsyncHttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient From 183fb56db2c485a978f28810e448bb24d6536503 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 10:27:22 -0700 Subject: [PATCH 205/244] KV moved paging return type to ItemPaged (#6558) * KV with latest autorest * Make KV return ItemPaged from azure-core --- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../keys/_shared/async_client_base.py | 19 ----- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../secrets/_shared/async_client_base.py | 19 ----- 10 files changed, 416 insertions(+), 142 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, From 4ee6fb8cd7228bff0cc8db689ebe15703e503a6f Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:40:30 -0700 Subject: [PATCH 206/244] Remove docdb mgmt package from master (#6585) --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 - sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 - sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 - .../azure-mgmt-documentdb/azure/__init__.py | 1 - .../azure/mgmt/__init__.py | 1 - .../azure/mgmt/documentdb/__init__.py | 18 - .../azure/mgmt/documentdb/document_db.py | 83 -- .../azure/mgmt/documentdb/models/__init__.py | 52 - .../documentdb/models/consistency_policy.py | 50 - .../documentdb/models/database_account.py | 117 --- .../database_account_connection_string.py | 39 - ...tabase_account_create_update_parameters.py | 90 -- ..._account_list_connection_strings_result.py | 29 - .../database_account_list_keys_result.py | 53 - ...base_account_list_read_only_keys_result.py | 41 - .../models/database_account_paged.py | 27 - .../database_account_patch_parameters.py | 31 - ...abase_account_regenerate_key_parameters.py | 33 - .../documentdb/models/document_db_enums.py | 41 - .../documentdb/models/failover_policies.py | 28 - .../mgmt/documentdb/models/failover_policy.py | 48 - .../azure/mgmt/documentdb/models/location.py | 58 -- .../azure/mgmt/documentdb/models/resource.py | 54 -- .../mgmt/documentdb/operations/__init__.py | 16 - .../database_accounts_operations.py | 918 ------------------ .../azure/mgmt/documentdb/version.py | 13 - .../azure_bdist_wheel.py | 54 -- sdk/cosmos/azure-mgmt-documentdb/build.json | 5 - .../dev_requirements.txt | 1 - .../azure-mgmt-documentdb/sdk_packaging.toml | 2 - sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 - sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 -- ..._mgmt_documentdb.test_accounts_create.yaml | 193 ---- ..._mgmt_documentdb.test_accounts_delete.yaml | 467 --------- ...gmt_documentdb.test_accounts_features.yaml | 272 ------ .../tests/test_mgmt_documentdb.py | 146 --- 36 files changed, 3147 deletions(-) delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst deleted file mode 100644 index eb7345b4071e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. :changelog: - -Release History -=============== - -0.1.3 (2017-05-02) -++++++++++++++++++ - -* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix - -0.1.2 (2017-04-20) -++++++++++++++++++ - -This wheel package is now built with the azure wheel extension - -0.1.1 (2017-03-21) -++++++++++++++++++ - -* Added support for listing database account connection strings - -0.1.0 (2017-01-31) -++++++++++++++++++ - -* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in deleted file mode 100644 index 9ecaeb15de50..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst deleted file mode 100644 index a5204ea75358..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/README.rst +++ /dev/null @@ -1,52 +0,0 @@ -Microsoft Azure SDK for Python -============================== - -This is the Microsoft Azure DocumentDB Management Client Library. - -Azure Resource Manager (ARM) is the next generation of management APIs that -replace the old Azure Service Management (ASM). - -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. - -For the older Azure Service Management (ASM) libraries, see -`azure-servicemanagement-legacy `__ library. - -For a more complete set of Azure libraries, see the `azure `__ bundle package. - - -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - -Usage -===== - -For code examples, see `DocumentDB Management -`__ -on readthedocs.org. - - -Provide Feedback -================ - -If you encounter any bugs or have suggestions, please file an issue in the -`Issues `__ -section of the project. - - -.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py deleted file mode 100755 index 3ec900145f1e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .document_db import DocumentDB -from .version import VERSION - -__all__ = ['DocumentDB'] - -__version__ = VERSION - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py deleted file mode 100755 index 5eda44ab3e32..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import ServiceClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.database_accounts_operations import DatabaseAccountsOperations -from . import models - - -class DocumentDBConfiguration(AzureConfiguration): - """Configuration for DocumentDB - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") - if not base_url: - base_url = 'https://management.azure.com' - - super(DocumentDBConfiguration, self).__init__(base_url) - - self.add_user_agent('documentdb/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class DocumentDB(object): - """Azure DocumentDB Database Service Resource Provider REST API - - :ivar config: Configuration for client. - :vartype config: DocumentDBConfiguration - - :ivar database_accounts: DatabaseAccounts operations - :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2015-04-08' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.database_accounts = DatabaseAccountsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py deleted file mode 100755 index 2ed68c568a84..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .consistency_policy import ConsistencyPolicy -from .location import Location -from .failover_policy import FailoverPolicy -from .database_account import DatabaseAccount -from .failover_policies import FailoverPolicies -from .resource import Resource -from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters -from .database_account_patch_parameters import DatabaseAccountPatchParameters -from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult -from .database_account_list_keys_result import DatabaseAccountListKeysResult -from .database_account_connection_string import DatabaseAccountConnectionString -from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult -from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters -from .database_account_paged import DatabaseAccountPaged -from .document_db_enums import ( - DatabaseAccountKind, - DatabaseAccountOfferType, - DefaultConsistencyLevel, - KeyKind, -) - -__all__ = [ - 'ConsistencyPolicy', - 'Location', - 'FailoverPolicy', - 'DatabaseAccount', - 'FailoverPolicies', - 'Resource', - 'DatabaseAccountCreateUpdateParameters', - 'DatabaseAccountPatchParameters', - 'DatabaseAccountListReadOnlyKeysResult', - 'DatabaseAccountListKeysResult', - 'DatabaseAccountConnectionString', - 'DatabaseAccountListConnectionStringsResult', - 'DatabaseAccountRegenerateKeyParameters', - 'DatabaseAccountPaged', - 'DatabaseAccountKind', - 'DatabaseAccountOfferType', - 'DefaultConsistencyLevel', - 'KeyKind', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py deleted file mode 100755 index d8cefd4c0b59..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConsistencyPolicy(Model): - """The consistency policy for the DocumentDB database account. - - :param default_consistency_level: The default consistency level and - configuration settings of the DocumentDB account. Possible values include: - 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' - :type default_consistency_level: str or :class:`DefaultConsistencyLevel - ` - :param max_staleness_prefix: When used with the Bounded Staleness - consistency level, this value represents the number of stale requests - tolerated. Accepted range for this value is 1 – 2,147,483,647. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_staleness_prefix: long - :param max_interval_in_seconds: When used with the Bounded Staleness - consistency level, this value represents the time amount of staleness (in - seconds) tolerated. Accepted range for this value is 1 - 100. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_interval_in_seconds: int - """ - - _validation = { - 'default_consistency_level': {'required': True}, - 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, - 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, - 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, - 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, - } - - def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): - self.default_consistency_level = default_consistency_level - self.max_staleness_prefix = max_staleness_prefix - self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py deleted file mode 100755 index 89031adc35cb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccount(Resource): - """A DocumentDB database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param provisioning_state: - :type provisioning_state: str - :ivar document_endpoint: The connection endpoint for the DocumentDB - database account. - :vartype document_endpoint: str - :ivar database_account_offer_type: The offer type for the DocumentDB - database account. Default value: Standard. Possible values include: - 'Standard' - :vartype database_account_offer_type: str or - :class:`DatabaseAccountOfferType - ` - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - :param consistency_policy: The consistency policy for the DocumentDB - database account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :ivar write_locations: An array that contains the write location for the - DocumentDB account. - :vartype write_locations: list of :class:`Location - ` - :ivar read_locations: An array that contains of the read locations enabled - for the DocumentDB account. - :vartype read_locations: list of :class:`Location - ` - :ivar failover_policies: An array that contains the regions ordered by - their failover priorities. - :vartype failover_policies: list of :class:`FailoverPolicy - ` - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'document_endpoint': {'readonly': True}, - 'database_account_offer_type': {'readonly': True}, - 'write_locations': {'readonly': True}, - 'read_locations': {'readonly': True}, - 'failover_policies': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, - 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, - 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): - super(DatabaseAccount, self).__init__(location=location, tags=tags) - self.kind = kind - self.provisioning_state = provisioning_state - self.document_endpoint = None - self.database_account_offer_type = None - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover - self.consistency_policy = consistency_policy - self.write_locations = None - self.read_locations = None - self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py deleted file mode 100755 index db1828208069..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountConnectionString(Model): - """Connection string for the DocumentDB account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar connection_string: Value of the connection string - :vartype connection_string: str - :ivar description: Description of the connection string - :vartype description: str - """ - - _validation = { - 'connection_string': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self): - self.connection_string = None - self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py deleted file mode 100755 index 30978f482f0b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccountCreateUpdateParameters(Resource): - """Parameters to create and update DocumentDB database accounts. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param consistency_policy: The consistency policy for the DocumentDB - account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :param locations: An array that contains the georeplication locations - enabled for the DocumentDB account. - :type locations: list of :class:`Location - ` - :ivar database_account_offer_type: Default value: "Standard" . - :vartype database_account_offer_type: str - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - } - - database_account_offer_type = "Standard" - - def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): - super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) - self.kind = kind - self.consistency_policy = consistency_policy - self.locations = locations - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py deleted file mode 100755 index 7cddc00a3de1..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListConnectionStringsResult(Model): - """The connection strings for the given database account. - - :param connection_strings: An array that contains the connection strings - for the DocumentDB account. - :type connection_strings: list of :class:`DatabaseAccountConnectionString - ` - """ - - _attribute_map = { - 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, - } - - def __init__(self, connection_strings=None): - self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py deleted file mode 100755 index 4d775054ac14..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListKeysResult(Model): - """The access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_master_key: Base 64 encoded value of the primary read-write - key. - :vartype primary_master_key: str - :ivar secondary_master_key: Base 64 encoded value of the secondary - read-write key. - :vartype secondary_master_key: str - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_master_key': {'readonly': True}, - 'secondary_master_key': {'readonly': True}, - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, - 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, - 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_master_key = None - self.secondary_master_key = None - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py deleted file mode 100755 index 3330353950c6..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListReadOnlyKeysResult(Model): - """The read-only access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py deleted file mode 100755 index 4cb94909c515..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseAccountPaged(Paged): - """ - A paging container for iterating over a list of DatabaseAccount object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py deleted file mode 100755 index be78a4fd6817..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountPatchParameters(Model): - """Parameters for patching Azure DocumentDB database account properties. - - :param tags: - :type tags: dict - """ - - _validation = { - 'tags': {'required': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, tags): - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py deleted file mode 100755 index 3bff90d33db3..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountRegenerateKeyParameters(Model): - """Parameters to regenerate the keys within the database account. - - :param key_kind: The access key to regenerate. Possible values include: - 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - """ - - _validation = { - 'key_kind': {'required': True}, - } - - _attribute_map = { - 'key_kind': {'key': 'keyKind', 'type': 'str'}, - } - - def __init__(self, key_kind): - self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py deleted file mode 100755 index 1e87cecaeb2a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class DatabaseAccountKind(Enum): - - global_document_db = "GlobalDocumentDB" - mongo_db = "MongoDB" - parse = "Parse" - - -class DatabaseAccountOfferType(Enum): - - standard = "Standard" - - -class DefaultConsistencyLevel(Enum): - - eventual = "Eventual" - session = "Session" - bounded_staleness = "BoundedStaleness" - strong = "Strong" - consistent_prefix = "ConsistentPrefix" - - -class KeyKind(Enum): - - primary = "primary" - secondary = "secondary" - primary_readonly = "primaryReadonly" - secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py deleted file mode 100755 index 4c3ebff5e3b5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicies(Model): - """The list of new failover policies for the failover priority change. - - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - """ - - _attribute_map = { - 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, failover_policies=None): - self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py deleted file mode 100755 index 99cc2769403b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicy(Model): - """The failover policy for a given region of a database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region in which the database - account replicates to. Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region in which the database account - exists. - :type location_name: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py deleted file mode 100755 index 8bc82bde2c3f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Location(Model): - """A region in which the Azure DocumentDB database account is deployed. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region within the database account. - Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region. - :type location_name: str - :ivar document_endpoint: The connection endpoint for the specific region. - Example: - https://<accountName>-<locationName>.documents.azure.com:443/ - :vartype document_endpoint: str - :param provisioning_state: - :type provisioning_state: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.document_endpoint = None - self.provisioning_state = provisioning_state - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py deleted file mode 100755 index d5e887d0b78a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """A database account resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, location, tags=None): - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py deleted file mode 100755 index 27ed7c069537..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .database_accounts_operations import DatabaseAccountsOperations - -__all__ = [ - 'DatabaseAccountsOperations', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py deleted file mode 100755 index 2bb39b1f6839..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py +++ /dev/null @@ -1,918 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrestazure.azure_operation import AzureOperationPoller -import uuid - -from .. import models - - -class DatabaseAccountsOperations(object): - """DatabaseAccountsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". - """ - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-04-08" - - self.config = config - - def get( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Retrieves the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def patch( - self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): - """Patches the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param tags: - :type tags: dict - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - update_parameters = models.DatabaseAccountPatchParameters(tags=tags) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(update_parameters, 'DatabaseAccountPatchParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.patch(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def create_or_update( - self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): - """Creates or updates an Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param create_update_parameters: The parameters to provide for the - current database account. - :type create_update_parameters: - :class:`DatabaseAccountCreateUpdateParameters - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def delete( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Deletes an existing Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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 - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - def long_running_send(): - - request = self._client.delete(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def failover_priority_change( - self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): - """Changes the failover priority for the Azure DocumentDB database - account. A failover priority of 0 indicates a write region. The maximum - value for a failover priority = (total number of regions - 1). Failover - priority values must be unique for each of the regions in which the - database account exists. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(failover_parameters, 'FailoverPolicies') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - subscription. - - :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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - given resource group. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the access keys for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_connection_strings( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the connection strings for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListConnectionStringsResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_read_only_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the read-only access keys for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListReadOnlyKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def regenerate_key( - self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): - """Regenerates an access key for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param key_kind: The access key to regenerate. Possible values - include: 'primary', 'secondary', 'primaryReadonly', - 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def check_name_exists( - self, account_name, custom_headers=None, raw=False, **operation_config): - """Checks that the Azure DocumentDB account name already exists. A valid - account name may contain only lowercase letters, numbers, and the '-' - character, and must be between 3 and 50 characters. - - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: bool - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' - path_format_arguments = { - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.head(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = (response.status_code == 200) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py deleted file mode 100755 index 95ed79d29108..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.3" - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -from distutils import log as logger -import os.path - -from wheel.bdist_wheel import bdist_wheel -class azure_bdist_wheel(bdist_wheel): - """The purpose of this class is to build wheel a little differently than the sdist, - without requiring to build the wheel from the sdist (i.e. you can build the wheel - directly from source). - """ - - description = "Create an Azure wheel distribution" - - user_options = bdist_wheel.user_options + \ - [('azure-namespace-package=', None, - "Name of the deepest nspkg used")] - - def initialize_options(self): - bdist_wheel.initialize_options(self) - self.azure_namespace_package = None - - def finalize_options(self): - bdist_wheel.finalize_options(self) - if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): - raise ValueError("azure_namespace_package must finish by -nspkg") - - def run(self): - if not self.distribution.install_requires: - self.distribution.install_requires = [] - self.distribution.install_requires.append( - "{}>=2.0.0".format(self.azure_namespace_package)) - bdist_wheel.run(self) - - def write_record(self, bdist_dir, distinfo_dir): - if self.azure_namespace_package: - # Split and remove last part, assuming it's "nspkg" - subparts = self.azure_namespace_package.split('-')[0:-1] - folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] - for azure_sub_package in folder_with_init: - init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') - if os.path.isfile(init_file): - logger.info("manually remove {} while building the wheel".format(init_file)) - os.remove(init_file) - else: - raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) - bdist_wheel.write_record(self, bdist_dir, distinfo_dir) -cmdclass = { - 'bdist_wheel': azure_bdist_wheel, -} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json deleted file mode 100644 index 4d98fc12a39e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/build.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "autorest": "1.0.1-20170501-2300-nightly", - "date": "2017-05-01T20:13:42Z", - "version": "0.1.3" -} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt deleted file mode 100644 index 6ccb7f031ddd..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt +++ /dev/null @@ -1 +0,0 @@ --e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml deleted file mode 100644 index e7687fdae93b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml +++ /dev/null @@ -1,2 +0,0 @@ -[packaging] -auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg deleted file mode 100644 index 856f4164982c..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[bdist_wheel] -universal=1 -azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py deleted file mode 100644 index ddef54e31bb5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.py +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env python - -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup -try: - from azure_bdist_wheel import cmdclass -except ImportError: - from distutils import log as logger - logger.warn("Wheel is not available, disabling bdist_wheel hook") - cmdclass = {} - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-documentdb" -PACKAGE_PPRINT_NAME = "DocumentDB Management" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') - -# azure v0.x is not compatible with this package -# azure v0.x used to have a __version__ attribute (newer versions don't) -try: - import azure - try: - ver = azure.__version__ - raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' - ) - except AttributeError: - pass -except ImportError: - pass - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError('Cannot find version information') - -with open('README.rst', encoding='utf-8') as f: - readme = f.read() -with open('HISTORY.rst', encoding='utf-8') as f: - history = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + history, - license='MIT License', - author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', - classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'License :: OSI Approved :: MIT License', - ], - zip_safe=False, - packages=find_packages(), - install_requires=[ - 'msrestazure~=0.4.7', - 'azure-common~=1.1.5', - ], - cmdclass=cmdclass -) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml deleted file mode 100644 index d470d7f8673d..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml +++ /dev/null @@ -1,193 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] - method: HEAD - uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: ''} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['142'] - Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-ratelimit-remaining-tenant-reads: ['14999'] - x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] - status: {code: 404, message: NotFound} -- request: - body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], - "databaseAccountOfferType": "Standard"}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['121'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['910'] - x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Completed","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['33'] - x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml deleted file mode 100644 index e6f4e2348f8f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml +++ /dev/null @@ -1,467 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' - under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' - was not found."}}'} - headers: - Cache-Control: [no-cache] - Content-Length: ['214'] - Content-Type: [application/json; charset=utf-8] - Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-failure-cause: [gateway] - x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] - status: {code: 404, message: Not Found} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml deleted file mode 100644 index b2e4b82a9d9e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml +++ /dev/null @@ -1,272 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1144'] - x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1156'] - x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['2225'] - x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] - status: {code: 200, message: Ok} -- request: - body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['73'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 - response: - body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique - and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['170'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] - status: {code: 400, message: BadRequest} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 - response: - body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['239'] - x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] - status: {code: 200, message: Ok} -- request: - body: '{"keyKind": "primary"}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['22'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] - x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py deleted file mode 100644 index 902666a22cf0..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py +++ /dev/null @@ -1,146 +0,0 @@ -# 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. -#-------------------------------------------------------------------------- -import unittest - -import azure.mgmt.documentdb -from msrestazure.azure_exceptions import CloudError -from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer - - -class MgmtDocDBTest(AzureMgmtTestCase): - - def setUp(self): - super(MgmtDocDBTest, self).setUp() - self.client = self.create_mgmt_client( - azure.mgmt.documentdb.DocumentDB - ) - - @ResourceGroupPreparer() - def test_accounts_create(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtst') - - self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) - - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - account = async_docdb_create.result() - self.assertIsNotNone(account) - # Rest API issue - # self.assertEqual(account.name, account_name) - - @ResourceGroupPreparer() - def test_accounts_features(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtest') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - account = self.client.database_accounts.get( - resource_group.name, - account_name - ) - self.assertEqual(account.name, account_name) - - my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) - self.assertEqual(len(my_accounts), 1) - self.assertEqual(my_accounts[0].name, account_name) - - my_accounts = list(self.client.database_accounts.list()) - self.assertTrue(len(my_accounts) >= 1) - self.assertTrue(any(db.name == account_name for db in my_accounts)) - - # I guess we can make this test with no error, need to check with DocDB team - # This is an interesting test anyway, this implies that the serialization works - # and error message is available. Since this method does not return an object - # (i.e. no deserialization to test), this is a complete test. - # We are NOT here to test the RestAPI, but the Swagger file and Python code. - with self.assertRaises(CloudError) as cm: - async_change = self.client.database_accounts.failover_priority_change( - resource_group.name, - account_name, - [{ - 'location_name': self.region, - 'failover_priority': 0 - }] - ) - async_change.wait() - self.assertIn('Failover priorities must be unique', cm.exception.message) - - my_keys = self.client.database_accounts.list_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_master_key) - self.assertIsNotNone(my_keys.secondary_master_key) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - my_keys = self.client.database_accounts.list_read_only_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - async_regenerate = self.client.database_accounts.regenerate_key( - resource_group.name, - account_name, - "primary" - ) - async_regenerate.wait() - - @ResourceGroupPreparer() - def test_accounts_delete(self, resource_group, location): - account_name = self.get_resource_name('pydocumentdbtst') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - # Current implementation of msrestazure does not support 404 as a end of LRO delete - # https://github.com/Azure/msrestazure-for-python/issues/7 - async_delete = self.client.database_accounts.delete(resource_group.name, account_name) - try: - async_delete.wait() - except CloudError as err: - if err.response.status_code != 404: - raise - - -#------------------------------------------------------------------------------ -if __name__ == '__main__': - unittest.main() From 6bde13f9ce4b93d433b6c9169ea30119fee4569d Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:42:03 -0700 Subject: [PATCH 207/244] Revert "Remove docdb mgmt package from master (#6585)" (#6593) This reverts commit d2ed7d87997eac9b715ee9802c15349a12446b84. --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 + sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 + sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 + .../azure-mgmt-documentdb/azure/__init__.py | 1 + .../azure/mgmt/__init__.py | 1 + .../azure/mgmt/documentdb/__init__.py | 18 + .../azure/mgmt/documentdb/document_db.py | 83 ++ .../azure/mgmt/documentdb/models/__init__.py | 52 + .../documentdb/models/consistency_policy.py | 50 + .../documentdb/models/database_account.py | 117 +++ .../database_account_connection_string.py | 39 + ...tabase_account_create_update_parameters.py | 90 ++ ..._account_list_connection_strings_result.py | 29 + .../database_account_list_keys_result.py | 53 + ...base_account_list_read_only_keys_result.py | 41 + .../models/database_account_paged.py | 27 + .../database_account_patch_parameters.py | 31 + ...abase_account_regenerate_key_parameters.py | 33 + .../documentdb/models/document_db_enums.py | 41 + .../documentdb/models/failover_policies.py | 28 + .../mgmt/documentdb/models/failover_policy.py | 48 + .../azure/mgmt/documentdb/models/location.py | 58 ++ .../azure/mgmt/documentdb/models/resource.py | 54 ++ .../mgmt/documentdb/operations/__init__.py | 16 + .../database_accounts_operations.py | 918 ++++++++++++++++++ .../azure/mgmt/documentdb/version.py | 13 + .../azure_bdist_wheel.py | 54 ++ sdk/cosmos/azure-mgmt-documentdb/build.json | 5 + .../dev_requirements.txt | 1 + .../azure-mgmt-documentdb/sdk_packaging.toml | 2 + sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 + sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 ++ ..._mgmt_documentdb.test_accounts_create.yaml | 193 ++++ ..._mgmt_documentdb.test_accounts_delete.yaml | 467 +++++++++ ...gmt_documentdb.test_accounts_features.yaml | 272 ++++++ .../tests/test_mgmt_documentdb.py | 146 +++ 36 files changed, 3147 insertions(+) create mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in create mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json create mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt create mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst new file mode 100644 index 000000000000..eb7345b4071e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst @@ -0,0 +1,24 @@ +.. :changelog: + +Release History +=============== + +0.1.3 (2017-05-02) +++++++++++++++++++ + +* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix + +0.1.2 (2017-04-20) +++++++++++++++++++ + +This wheel package is now built with the azure wheel extension + +0.1.1 (2017-03-21) +++++++++++++++++++ + +* Added support for listing database account connection strings + +0.1.0 (2017-01-31) +++++++++++++++++++ + +* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in new file mode 100644 index 000000000000..9ecaeb15de50 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in @@ -0,0 +1,2 @@ +include *.rst +include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst new file mode 100644 index 000000000000..a5204ea75358 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/README.rst @@ -0,0 +1,52 @@ +Microsoft Azure SDK for Python +============================== + +This is the Microsoft Azure DocumentDB Management Client Library. + +Azure Resource Manager (ARM) is the next generation of management APIs that +replace the old Azure Service Management (ASM). + +This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. + +For the older Azure Service Management (ASM) libraries, see +`azure-servicemanagement-legacy `__ library. + +For a more complete set of Azure libraries, see the `azure `__ bundle package. + + +Compatibility +============= + +**IMPORTANT**: If you have an earlier version of the azure package +(version < 1.0), you should uninstall it before installing this package. + +You can check the version using pip: + +.. code:: shell + + pip freeze + +If you see azure==0.11.0 (or any version below 1.0), uninstall it first: + +.. code:: shell + + pip uninstall azure + + +Usage +===== + +For code examples, see `DocumentDB Management +`__ +on readthedocs.org. + + +Provide Feedback +================ + +If you encounter any bugs or have suggestions, please file an issue in the +`Issues `__ +section of the project. + + +.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py new file mode 100755 index 000000000000..3ec900145f1e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .document_db import DocumentDB +from .version import VERSION + +__all__ = ['DocumentDB'] + +__version__ = VERSION + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py new file mode 100755 index 000000000000..5eda44ab3e32 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import ServiceClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.database_accounts_operations import DatabaseAccountsOperations +from . import models + + +class DocumentDBConfiguration(AzureConfiguration): + """Configuration for DocumentDB + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not isinstance(subscription_id, str): + raise TypeError("Parameter 'subscription_id' must be str.") + if not base_url: + base_url = 'https://management.azure.com' + + super(DocumentDBConfiguration, self).__init__(base_url) + + self.add_user_agent('documentdb/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class DocumentDB(object): + """Azure DocumentDB Database Service Resource Provider REST API + + :ivar config: Configuration for client. + :vartype config: DocumentDBConfiguration + + :ivar database_accounts: DatabaseAccounts operations + :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) + self._client = ServiceClient(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2015-04-08' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.database_accounts = DatabaseAccountsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py new file mode 100755 index 000000000000..2ed68c568a84 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .consistency_policy import ConsistencyPolicy +from .location import Location +from .failover_policy import FailoverPolicy +from .database_account import DatabaseAccount +from .failover_policies import FailoverPolicies +from .resource import Resource +from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters +from .database_account_patch_parameters import DatabaseAccountPatchParameters +from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult +from .database_account_list_keys_result import DatabaseAccountListKeysResult +from .database_account_connection_string import DatabaseAccountConnectionString +from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult +from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters +from .database_account_paged import DatabaseAccountPaged +from .document_db_enums import ( + DatabaseAccountKind, + DatabaseAccountOfferType, + DefaultConsistencyLevel, + KeyKind, +) + +__all__ = [ + 'ConsistencyPolicy', + 'Location', + 'FailoverPolicy', + 'DatabaseAccount', + 'FailoverPolicies', + 'Resource', + 'DatabaseAccountCreateUpdateParameters', + 'DatabaseAccountPatchParameters', + 'DatabaseAccountListReadOnlyKeysResult', + 'DatabaseAccountListKeysResult', + 'DatabaseAccountConnectionString', + 'DatabaseAccountListConnectionStringsResult', + 'DatabaseAccountRegenerateKeyParameters', + 'DatabaseAccountPaged', + 'DatabaseAccountKind', + 'DatabaseAccountOfferType', + 'DefaultConsistencyLevel', + 'KeyKind', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py new file mode 100755 index 000000000000..d8cefd4c0b59 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConsistencyPolicy(Model): + """The consistency policy for the DocumentDB database account. + + :param default_consistency_level: The default consistency level and + configuration settings of the DocumentDB account. Possible values include: + 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' + :type default_consistency_level: str or :class:`DefaultConsistencyLevel + ` + :param max_staleness_prefix: When used with the Bounded Staleness + consistency level, this value represents the number of stale requests + tolerated. Accepted range for this value is 1 – 2,147,483,647. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_staleness_prefix: long + :param max_interval_in_seconds: When used with the Bounded Staleness + consistency level, this value represents the time amount of staleness (in + seconds) tolerated. Accepted range for this value is 1 - 100. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_interval_in_seconds: int + """ + + _validation = { + 'default_consistency_level': {'required': True}, + 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, + 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, + 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, + 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, + } + + def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): + self.default_consistency_level = default_consistency_level + self.max_staleness_prefix = max_staleness_prefix + self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py new file mode 100755 index 000000000000..89031adc35cb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py @@ -0,0 +1,117 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccount(Resource): + """A DocumentDB database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param provisioning_state: + :type provisioning_state: str + :ivar document_endpoint: The connection endpoint for the DocumentDB + database account. + :vartype document_endpoint: str + :ivar database_account_offer_type: The offer type for the DocumentDB + database account. Default value: Standard. Possible values include: + 'Standard' + :vartype database_account_offer_type: str or + :class:`DatabaseAccountOfferType + ` + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + :param consistency_policy: The consistency policy for the DocumentDB + database account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :ivar write_locations: An array that contains the write location for the + DocumentDB account. + :vartype write_locations: list of :class:`Location + ` + :ivar read_locations: An array that contains of the read locations enabled + for the DocumentDB account. + :vartype read_locations: list of :class:`Location + ` + :ivar failover_policies: An array that contains the regions ordered by + their failover priorities. + :vartype failover_policies: list of :class:`FailoverPolicy + ` + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'document_endpoint': {'readonly': True}, + 'database_account_offer_type': {'readonly': True}, + 'write_locations': {'readonly': True}, + 'read_locations': {'readonly': True}, + 'failover_policies': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, + 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, + 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): + super(DatabaseAccount, self).__init__(location=location, tags=tags) + self.kind = kind + self.provisioning_state = provisioning_state + self.document_endpoint = None + self.database_account_offer_type = None + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover + self.consistency_policy = consistency_policy + self.write_locations = None + self.read_locations = None + self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py new file mode 100755 index 000000000000..db1828208069 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountConnectionString(Model): + """Connection string for the DocumentDB account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar connection_string: Value of the connection string + :vartype connection_string: str + :ivar description: Description of the connection string + :vartype description: str + """ + + _validation = { + 'connection_string': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self): + self.connection_string = None + self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py new file mode 100755 index 000000000000..30978f482f0b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccountCreateUpdateParameters(Resource): + """Parameters to create and update DocumentDB database accounts. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param consistency_policy: The consistency policy for the DocumentDB + account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :param locations: An array that contains the georeplication locations + enabled for the DocumentDB account. + :type locations: list of :class:`Location + ` + :ivar database_account_offer_type: Default value: "Standard" . + :vartype database_account_offer_type: str + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'locations': {'required': True}, + 'database_account_offer_type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + } + + database_account_offer_type = "Standard" + + def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): + super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) + self.kind = kind + self.consistency_policy = consistency_policy + self.locations = locations + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py new file mode 100755 index 000000000000..7cddc00a3de1 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListConnectionStringsResult(Model): + """The connection strings for the given database account. + + :param connection_strings: An array that contains the connection strings + for the DocumentDB account. + :type connection_strings: list of :class:`DatabaseAccountConnectionString + ` + """ + + _attribute_map = { + 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, + } + + def __init__(self, connection_strings=None): + self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py new file mode 100755 index 000000000000..4d775054ac14 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListKeysResult(Model): + """The access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_master_key: Base 64 encoded value of the primary read-write + key. + :vartype primary_master_key: str + :ivar secondary_master_key: Base 64 encoded value of the secondary + read-write key. + :vartype secondary_master_key: str + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_master_key': {'readonly': True}, + 'secondary_master_key': {'readonly': True}, + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, + 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, + 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_master_key = None + self.secondary_master_key = None + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py new file mode 100755 index 000000000000..3330353950c6 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListReadOnlyKeysResult(Model): + """The read-only access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py new file mode 100755 index 000000000000..4cb94909c515 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class DatabaseAccountPaged(Paged): + """ + A paging container for iterating over a list of DatabaseAccount object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py new file mode 100755 index 000000000000..be78a4fd6817 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountPatchParameters(Model): + """Parameters for patching Azure DocumentDB database account properties. + + :param tags: + :type tags: dict + """ + + _validation = { + 'tags': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, tags): + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py new file mode 100755 index 000000000000..3bff90d33db3 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountRegenerateKeyParameters(Model): + """Parameters to regenerate the keys within the database account. + + :param key_kind: The access key to regenerate. Possible values include: + 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + """ + + _validation = { + 'key_kind': {'required': True}, + } + + _attribute_map = { + 'key_kind': {'key': 'keyKind', 'type': 'str'}, + } + + def __init__(self, key_kind): + self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py new file mode 100755 index 000000000000..1e87cecaeb2a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class DatabaseAccountKind(Enum): + + global_document_db = "GlobalDocumentDB" + mongo_db = "MongoDB" + parse = "Parse" + + +class DatabaseAccountOfferType(Enum): + + standard = "Standard" + + +class DefaultConsistencyLevel(Enum): + + eventual = "Eventual" + session = "Session" + bounded_staleness = "BoundedStaleness" + strong = "Strong" + consistent_prefix = "ConsistentPrefix" + + +class KeyKind(Enum): + + primary = "primary" + secondary = "secondary" + primary_readonly = "primaryReadonly" + secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py new file mode 100755 index 000000000000..4c3ebff5e3b5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicies(Model): + """The list of new failover policies for the failover priority change. + + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + """ + + _attribute_map = { + 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, failover_policies=None): + self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py new file mode 100755 index 000000000000..99cc2769403b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicy(Model): + """The failover policy for a given region of a database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region in which the database + account replicates to. Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region in which the database account + exists. + :type location_name: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py new file mode 100755 index 000000000000..8bc82bde2c3f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Location(Model): + """A region in which the Azure DocumentDB database account is deployed. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region within the database account. + Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region. + :type location_name: str + :ivar document_endpoint: The connection endpoint for the specific region. + Example: + https://<accountName>-<locationName>.documents.azure.com:443/ + :vartype document_endpoint: str + :param provisioning_state: + :type provisioning_state: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'document_endpoint': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.document_endpoint = None + self.provisioning_state = provisioning_state + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py new file mode 100755 index 000000000000..d5e887d0b78a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """A database account resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, location, tags=None): + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py new file mode 100755 index 000000000000..27ed7c069537 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py @@ -0,0 +1,16 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .database_accounts_operations import DatabaseAccountsOperations + +__all__ = [ + 'DatabaseAccountsOperations', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py new file mode 100755 index 000000000000..2bb39b1f6839 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py @@ -0,0 +1,918 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrestazure.azure_operation import AzureOperationPoller +import uuid + +from .. import models + + +class DatabaseAccountsOperations(object): + """DatabaseAccountsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". + """ + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-04-08" + + self.config = config + + def get( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Retrieves the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def patch( + self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): + """Patches the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param tags: + :type tags: dict + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + update_parameters = models.DatabaseAccountPatchParameters(tags=tags) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(update_parameters, 'DatabaseAccountPatchParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.patch(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def create_or_update( + self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates an Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param create_update_parameters: The parameters to provide for the + current database account. + :type create_update_parameters: + :class:`DatabaseAccountCreateUpdateParameters + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.put(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def delete( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Deletes an existing Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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 + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + def long_running_send(): + + request = self._client.delete(url, query_parameters) + return self._client.send(request, header_parameters, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def failover_priority_change( + self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): + """Changes the failover priority for the Azure DocumentDB database + account. A failover priority of 0 indicates a write region. The maximum + value for a failover priority = (total number of regions - 1). Failover + priority values must be unique for each of the regions in which the + database account exists. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(failover_parameters, 'FailoverPolicies') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + subscription. + + :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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + given resource group. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the access keys for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_connection_strings( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the connection strings for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListConnectionStringsResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_read_only_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the read-only access keys for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListReadOnlyKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def regenerate_key( + self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): + """Regenerates an access key for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param key_kind: The access key to regenerate. Possible values + include: 'primary', 'secondary', 'primaryReadonly', + 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def check_name_exists( + self, account_name, custom_headers=None, raw=False, **operation_config): + """Checks that the Azure DocumentDB account name already exists. A valid + account name may contain only lowercase letters, numbers, and the '-' + character, and must be between 3 and 50 characters. + + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: bool + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' + path_format_arguments = { + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.head(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = (response.status_code == 200) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py new file mode 100755 index 000000000000..95ed79d29108 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.3" + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py new file mode 100644 index 000000000000..8a81d1b61775 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py @@ -0,0 +1,54 @@ +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +from distutils import log as logger +import os.path + +from wheel.bdist_wheel import bdist_wheel +class azure_bdist_wheel(bdist_wheel): + """The purpose of this class is to build wheel a little differently than the sdist, + without requiring to build the wheel from the sdist (i.e. you can build the wheel + directly from source). + """ + + description = "Create an Azure wheel distribution" + + user_options = bdist_wheel.user_options + \ + [('azure-namespace-package=', None, + "Name of the deepest nspkg used")] + + def initialize_options(self): + bdist_wheel.initialize_options(self) + self.azure_namespace_package = None + + def finalize_options(self): + bdist_wheel.finalize_options(self) + if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): + raise ValueError("azure_namespace_package must finish by -nspkg") + + def run(self): + if not self.distribution.install_requires: + self.distribution.install_requires = [] + self.distribution.install_requires.append( + "{}>=2.0.0".format(self.azure_namespace_package)) + bdist_wheel.run(self) + + def write_record(self, bdist_dir, distinfo_dir): + if self.azure_namespace_package: + # Split and remove last part, assuming it's "nspkg" + subparts = self.azure_namespace_package.split('-')[0:-1] + folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] + for azure_sub_package in folder_with_init: + init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') + if os.path.isfile(init_file): + logger.info("manually remove {} while building the wheel".format(init_file)) + os.remove(init_file) + else: + raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) + bdist_wheel.write_record(self, bdist_dir, distinfo_dir) +cmdclass = { + 'bdist_wheel': azure_bdist_wheel, +} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json new file mode 100644 index 000000000000..4d98fc12a39e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/build.json @@ -0,0 +1,5 @@ +{ + "autorest": "1.0.1-20170501-2300-nightly", + "date": "2017-05-01T20:13:42Z", + "version": "0.1.3" +} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt new file mode 100644 index 000000000000..6ccb7f031ddd --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt @@ -0,0 +1 @@ +-e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml new file mode 100644 index 000000000000..e7687fdae93b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg new file mode 100644 index 000000000000..856f4164982c --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg @@ -0,0 +1,3 @@ +[bdist_wheel] +universal=1 +azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py new file mode 100644 index 000000000000..ddef54e31bb5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup +try: + from azure_bdist_wheel import cmdclass +except ImportError: + from distutils import log as logger + logger.warn("Wheel is not available, disabling bdist_wheel hook") + cmdclass = {} + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-documentdb" +PACKAGE_PPRINT_NAME = "DocumentDB Management" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.rst', encoding='utf-8') as f: + readme = f.read() +with open('HISTORY.rst', encoding='utf-8') as f: + history = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + history, + license='MIT License', + author='Microsoft Corporation', + author_email='ptvshelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(), + install_requires=[ + 'msrestazure~=0.4.7', + 'azure-common~=1.1.5', + ], + cmdclass=cmdclass +) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml new file mode 100644 index 000000000000..d470d7f8673d --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml @@ -0,0 +1,193 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] + method: HEAD + uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: ''} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['142'] + Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-ratelimit-remaining-tenant-reads: ['14999'] + x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] + status: {code: 404, message: NotFound} +- request: + body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], + "databaseAccountOfferType": "Standard"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['121'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['910'] + x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Completed","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['33'] + x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml new file mode 100644 index 000000000000..e6f4e2348f8f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml @@ -0,0 +1,467 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' + under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' + was not found."}}'} + headers: + Cache-Control: [no-cache] + Content-Length: ['214'] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-failure-cause: [gateway] + x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] + status: {code: 404, message: Not Found} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml new file mode 100644 index 000000000000..b2e4b82a9d9e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml @@ -0,0 +1,272 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1144'] + x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1156'] + x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2225'] + x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] + status: {code: 200, message: Ok} +- request: + body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['73'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 + response: + body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique + and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['170'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] + status: {code: 400, message: BadRequest} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 + response: + body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['239'] + x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] + status: {code: 200, message: Ok} +- request: + body: '{"keyKind": "primary"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['22'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] + x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py new file mode 100644 index 000000000000..902666a22cf0 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py @@ -0,0 +1,146 @@ +# 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. +#-------------------------------------------------------------------------- +import unittest + +import azure.mgmt.documentdb +from msrestazure.azure_exceptions import CloudError +from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer + + +class MgmtDocDBTest(AzureMgmtTestCase): + + def setUp(self): + super(MgmtDocDBTest, self).setUp() + self.client = self.create_mgmt_client( + azure.mgmt.documentdb.DocumentDB + ) + + @ResourceGroupPreparer() + def test_accounts_create(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtst') + + self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) + + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + account = async_docdb_create.result() + self.assertIsNotNone(account) + # Rest API issue + # self.assertEqual(account.name, account_name) + + @ResourceGroupPreparer() + def test_accounts_features(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtest') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + account = self.client.database_accounts.get( + resource_group.name, + account_name + ) + self.assertEqual(account.name, account_name) + + my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) + self.assertEqual(len(my_accounts), 1) + self.assertEqual(my_accounts[0].name, account_name) + + my_accounts = list(self.client.database_accounts.list()) + self.assertTrue(len(my_accounts) >= 1) + self.assertTrue(any(db.name == account_name for db in my_accounts)) + + # I guess we can make this test with no error, need to check with DocDB team + # This is an interesting test anyway, this implies that the serialization works + # and error message is available. Since this method does not return an object + # (i.e. no deserialization to test), this is a complete test. + # We are NOT here to test the RestAPI, but the Swagger file and Python code. + with self.assertRaises(CloudError) as cm: + async_change = self.client.database_accounts.failover_priority_change( + resource_group.name, + account_name, + [{ + 'location_name': self.region, + 'failover_priority': 0 + }] + ) + async_change.wait() + self.assertIn('Failover priorities must be unique', cm.exception.message) + + my_keys = self.client.database_accounts.list_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_master_key) + self.assertIsNotNone(my_keys.secondary_master_key) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + my_keys = self.client.database_accounts.list_read_only_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + async_regenerate = self.client.database_accounts.regenerate_key( + resource_group.name, + account_name, + "primary" + ) + async_regenerate.wait() + + @ResourceGroupPreparer() + def test_accounts_delete(self, resource_group, location): + account_name = self.get_resource_name('pydocumentdbtst') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + # Current implementation of msrestazure does not support 404 as a end of LRO delete + # https://github.com/Azure/msrestazure-for-python/issues/7 + async_delete = self.client.database_accounts.delete(resource_group.name, account_name) + try: + async_delete.wait() + except CloudError as err: + if err.response.status_code != 404: + raise + + +#------------------------------------------------------------------------------ +if __name__ == '__main__': + unittest.main() From 5625662e62f39085729486134245c32c1c04ce22 Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 10:16:27 -0700 Subject: [PATCH 208/244] Update CODEOWNERS --- .github/CODEOWNERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 07d57ac48320..0172563e9a84 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -40,6 +40,9 @@ # Management Plane /**/*mgmt*/ @zikalino +# Management Plane +/**/*mgmt*/ @zikalino + ########### # Eng Sys ########### From 36ef81d39fb02ec9af92db0e4dd911989701f66c Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 11:03:35 -0700 Subject: [PATCH 209/244] more code owners --- .github/CODEOWNERS | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0172563e9a84..07d57ac48320 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -40,9 +40,6 @@ # Management Plane /**/*mgmt*/ @zikalino -# Management Plane -/**/*mgmt*/ @zikalino - ########### # Eng Sys ########### From eb9a2ddbe2859c8b89bca172aa0d89b01e3ab7ef Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 11:58:35 -0700 Subject: [PATCH 210/244] add policy and decorators for secrets (#6453) --- .../azure/keyvault/secrets/_shared/async_client_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 193e6e324c7e..c451ffb1e766 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncHttpTransport +from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient From e7c60ea5dcc6b1758111fbf4045118bf491e28c6 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Thu, 25 Jul 2019 12:41:38 -0700 Subject: [PATCH 211/244] Paging v2 (#6420) * First version of paging * Clean sync paging * Async paging * Name AsyncList without underscore * MyPy happyness * pylint * black * PageIterator as conf * Simplify ItemPaged * Use chain to link iterable * Make Paging more open * Docstring * pylint / mypy / black * Regenerate KV with latest Autorest + Paging branch (#6479) * Regenerate KV with latest Autorest + Paging branch * Remove unused import in tests * Make the async adapter more generic * Regeneration after operation mixin fix in Autorest * COmmit changes forgotten in #6418 * Fixing syntax for 2.7 * Move Storage Queue to new Paging (#6447) * Move Storage Queue to new Paging * Working Storage queue on new paging * Fix types * First shot of blob tests update * Fixing blob tests * File to new paging * Doc fix * Feedbacks from @annatisch * Fix last @annatisch comment * Simplify paging contract * Fix storage queue after new paging contract --- .../_key_vault_client_operations_async.py | 60 ++++------------ .../_key_vault_client_operations.py | 60 ++++------------ .../_key_vault_client_operations_async.py | 70 ++++--------------- .../_key_vault_client_operations.py | 70 ++++--------------- .../keys/_shared/async_client_base.py | 19 +++++ .../_key_vault_client_operations_async.py | 60 ++++------------ .../_key_vault_client_operations.py | 60 ++++------------ .../_key_vault_client_operations_async.py | 70 ++++--------------- .../_key_vault_client_operations.py | 70 ++++--------------- .../secrets/_shared/async_client_base.py | 19 +++++ 10 files changed, 142 insertions(+), 416 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index b5cc965119ed..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 0ae7fd5fb025..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index 08e45c2b44a7..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index b9ed6e10ea21..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 193e6e324c7e..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -21,6 +21,25 @@ pass +class AsyncPagingAdapter: + """For each item in an AsyncIterator, returns the result of applying fn to that item. + Python 3.6 added syntax that could replace this (yield within async for).""" + + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: + self._pages = pages + self._fn = fn + + def __aiter__(self): + return self + + async def __anext__(self) -> Any: + item = await self._pages.__anext__() + if not item: + raise StopAsyncIteration + return self._fn(item) + # TODO: expected type Model got Coroutine instead? + + class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index b5cc965119ed..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 0ae7fd5fb025..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index 08e45c2b44a7..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index b9ed6e10ea21..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index c451ffb1e766..0119ef5a6e44 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -21,6 +21,25 @@ pass +class AsyncPagingAdapter: + """For each item in an AsyncIterator, returns the result of applying fn to that item. + Python 3.6 added syntax that could replace this (yield within async for).""" + + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: + self._pages = pages + self._fn = fn + + def __aiter__(self): + return self + + async def __anext__(self) -> Any: + item = await self._pages.__anext__() + if not item: + raise StopAsyncIteration + return self._fn(item) + # TODO: expected type Model got Coroutine instead? + + class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, From 444809a5179e8b7c9998b8c1d84330c2e949983c Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 15:48:49 -0700 Subject: [PATCH 212/244] get rid of should only propagate (#6497) --- sdk/core/azure-core/azure/core/tracing/decorator.py | 2 +- sdk/core/azure-core/azure/core/tracing/decorator_async.py | 2 +- .../azure_core_asynctests/test_tracing_decorator_async.py | 5 ++++- sdk/core/azure-core/tests/test_tracing_decorator.py | 5 ++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 3986dcaf31ed..7d5d7bfce407 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None and orig_wrapped_span is None: + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 4df65fee77ef..781e20a6bef2 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None and orig_wrapped_span is None: + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index 82b4f97dc92f..e2a5c92e60b9 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -145,4 +145,7 @@ async def test_span_with_opencensus_complicated(value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert not parent.children[3].children + assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" + assert parent.children[3].children[1].span_data.name == "MockClient.make_request" + children = parent.children[1].children + assert len(children) == 2 diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index 764c09396255..eedd34c0afdd 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -177,4 +177,7 @@ def test_span_with_opencensus_complicated(self, value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert not parent.children[3].children + assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" + assert parent.children[3].children[1].span_data.name == "MockClient.make_request" + children = parent.children[1].children + assert len(children) == 2 From 58e947cf3fccc8fa039cdf7a7c08388e373f3560 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Mon, 29 Jul 2019 14:05:36 -0700 Subject: [PATCH 213/244] decorator only trace very top level function (#6530) --- sdk/core/azure-core/azure/core/tracing/decorator.py | 2 +- sdk/core/azure-core/azure/core/tracing/decorator_async.py | 2 +- .../azure_core_asynctests/test_tracing_decorator_async.py | 5 +---- sdk/core/azure-core/tests/test_tracing_decorator.py | 5 +---- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 7d5d7bfce407..3986dcaf31ed 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 781e20a6bef2..4df65fee77ef 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index e2a5c92e60b9..82b4f97dc92f 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -145,7 +145,4 @@ async def test_span_with_opencensus_complicated(value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index eedd34c0afdd..764c09396255 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -177,7 +177,4 @@ def test_span_with_opencensus_complicated(self, value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children From d4a87effd350cf08884ae71c6586e7367d81c0dd Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 08:51:19 -0700 Subject: [PATCH 214/244] Synchronous username/password auth (#6416) --- .../azure/identity/_internal/__init__.py | 1 - .../azure-identity/tests/test_identity.py | 68 ------------------- 2 files changed, 69 deletions(-) diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index e7583139395b..cfdf935b801c 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,6 +2,5 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from .auth_code_redirect_handler import AuthCodeRedirectServer from .msal_credentials import ConfidentialClientCredential, PublicClientCredential from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 3aaa54a1f28f..8e7245522519 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -22,7 +22,6 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, - InteractiveBrowserCredential, UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential @@ -244,73 +243,6 @@ def test_default_credential(): DefaultAzureCredential() -@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser -def test_interactive_credential(): - oauth_state = "state" - expected_token = "access-token" - - transport = validating_transport( - requests=[Request()] * 2, # not validating requests because they're formed by MSAL - responses=[ - # expecting tenant discovery then a token request - mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), - mock_response( - json_payload={ - "access_token": expected_token, - "expires_in": 42, - "token_type": "Bearer", - "ext_expires_in": 42, - } - ), - ], - ) - - # mock local server fakes successful authentication by immediately returning a well-formed response - auth_code_response = {"code": "authorization-code", "state": [oauth_state]} - server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) - - credential = InteractiveBrowserCredential( - client_id="guid", - client_secret="secret", - server_class=server_class, - transport=transport, - instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request - ) - - # ensure the request beginning the flow has a known state value - with patch("azure.identity.browser_auth.uuid.uuid4", lambda: oauth_state): - token = credential.get_token("scope") - assert token.token == expected_token - - -@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser -def test_interactive_credential_timeout(): - # mock transport handles MSAL's tenant discovery - transport = Mock( - send=lambda _, **__: mock_response( - json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"} - ) - ) - - # mock local server blocks long enough to exceed the timeout - timeout = 1 - server_instance = Mock(wait_for_redirect=functools.partial(time.sleep, timeout + 1)) - server_class = Mock(return_value=server_instance) - - credential = InteractiveBrowserCredential( - client_id="guid", - client_secret="secret", - server_class=server_class, - timeout=timeout, - transport=transport, - instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request - ) - - with pytest.raises(ClientAuthenticationError) as ex: - credential.get_token("scope") - assert "timed out" in ex.value.message.lower() - - def test_username_password_credential(): expected_token = "access-token" transport = validating_transport( From 6d60faa278e398b2916aa5a6b67ebec53d5002a5 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 14:04:30 -0700 Subject: [PATCH 215/244] Synchronous interactive browser authentication (#6466) --- .../azure/identity/_internal/__init__.py | 1 + .../azure-identity/tests/test_identity.py | 68 +++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index cfdf935b801c..e7583139395b 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,5 +2,6 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +from .auth_code_redirect_handler import AuthCodeRedirectServer from .msal_credentials import ConfidentialClientCredential, PublicClientCredential from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 8e7245522519..3aaa54a1f28f 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -22,6 +22,7 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, + InteractiveBrowserCredential, UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential @@ -243,6 +244,73 @@ def test_default_credential(): DefaultAzureCredential() +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential(): + oauth_state = "state" + expected_token = "access-token" + + transport = validating_transport( + requests=[Request()] * 2, # not validating requests because they're formed by MSAL + responses=[ + # expecting tenant discovery then a token request + mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), + mock_response( + json_payload={ + "access_token": expected_token, + "expires_in": 42, + "token_type": "Bearer", + "ext_expires_in": 42, + } + ), + ], + ) + + # mock local server fakes successful authentication by immediately returning a well-formed response + auth_code_response = {"code": "authorization-code", "state": [oauth_state]} + server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + # ensure the request beginning the flow has a known state value + with patch("azure.identity.browser_auth.uuid.uuid4", lambda: oauth_state): + token = credential.get_token("scope") + assert token.token == expected_token + + +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential_timeout(): + # mock transport handles MSAL's tenant discovery + transport = Mock( + send=lambda _, **__: mock_response( + json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"} + ) + ) + + # mock local server blocks long enough to exceed the timeout + timeout = 1 + server_instance = Mock(wait_for_redirect=functools.partial(time.sleep, timeout + 1)) + server_class = Mock(return_value=server_instance) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + timeout=timeout, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + with pytest.raises(ClientAuthenticationError) as ex: + credential.get_token("scope") + assert "timed out" in ex.value.message.lower() + + def test_username_password_credential(): expected_token = "access-token" transport = validating_transport( From 6fada2079b2f49f7bd4a0f31fdc0168b66c722c3 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Tue, 30 Jul 2019 20:19:31 -0700 Subject: [PATCH 216/244] KV aiohttp by default (#6563) * Aiohttp default async transport * Record keys with aiohttp * Record secrets with aiohttp --- .../azure/keyvault/secrets/_shared/async_client_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 0119ef5a6e44..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport +from azure.core.pipeline.transport import AsyncHttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient From 7ff58cd4232388ea1ca73c5380a4a3f113f29a51 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 10:27:22 -0700 Subject: [PATCH 217/244] KV moved paging return type to ItemPaged (#6558) * KV with latest autorest * Make KV return ItemPaged from azure-core --- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../keys/_shared/async_client_base.py | 19 ----- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../secrets/_shared/async_client_base.py | 19 ----- 10 files changed, 416 insertions(+), 142 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, From eed97d6d3d3097ea823a1480b2db5d8827a3db3b Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:40:30 -0700 Subject: [PATCH 218/244] Remove docdb mgmt package from master (#6585) --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 - sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 - sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 - .../azure-mgmt-documentdb/azure/__init__.py | 1 - .../azure/mgmt/__init__.py | 1 - .../azure/mgmt/documentdb/__init__.py | 18 - .../azure/mgmt/documentdb/document_db.py | 83 -- .../azure/mgmt/documentdb/models/__init__.py | 52 - .../documentdb/models/consistency_policy.py | 50 - .../documentdb/models/database_account.py | 117 --- .../database_account_connection_string.py | 39 - ...tabase_account_create_update_parameters.py | 90 -- ..._account_list_connection_strings_result.py | 29 - .../database_account_list_keys_result.py | 53 - ...base_account_list_read_only_keys_result.py | 41 - .../models/database_account_paged.py | 27 - .../database_account_patch_parameters.py | 31 - ...abase_account_regenerate_key_parameters.py | 33 - .../documentdb/models/document_db_enums.py | 41 - .../documentdb/models/failover_policies.py | 28 - .../mgmt/documentdb/models/failover_policy.py | 48 - .../azure/mgmt/documentdb/models/location.py | 58 -- .../azure/mgmt/documentdb/models/resource.py | 54 -- .../mgmt/documentdb/operations/__init__.py | 16 - .../database_accounts_operations.py | 918 ------------------ .../azure/mgmt/documentdb/version.py | 13 - .../azure_bdist_wheel.py | 54 -- sdk/cosmos/azure-mgmt-documentdb/build.json | 5 - .../dev_requirements.txt | 1 - .../azure-mgmt-documentdb/sdk_packaging.toml | 2 - sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 - sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 -- ..._mgmt_documentdb.test_accounts_create.yaml | 193 ---- ..._mgmt_documentdb.test_accounts_delete.yaml | 467 --------- ...gmt_documentdb.test_accounts_features.yaml | 272 ------ .../tests/test_mgmt_documentdb.py | 146 --- 36 files changed, 3147 deletions(-) delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst deleted file mode 100644 index eb7345b4071e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. :changelog: - -Release History -=============== - -0.1.3 (2017-05-02) -++++++++++++++++++ - -* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix - -0.1.2 (2017-04-20) -++++++++++++++++++ - -This wheel package is now built with the azure wheel extension - -0.1.1 (2017-03-21) -++++++++++++++++++ - -* Added support for listing database account connection strings - -0.1.0 (2017-01-31) -++++++++++++++++++ - -* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in deleted file mode 100644 index 9ecaeb15de50..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst deleted file mode 100644 index a5204ea75358..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/README.rst +++ /dev/null @@ -1,52 +0,0 @@ -Microsoft Azure SDK for Python -============================== - -This is the Microsoft Azure DocumentDB Management Client Library. - -Azure Resource Manager (ARM) is the next generation of management APIs that -replace the old Azure Service Management (ASM). - -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. - -For the older Azure Service Management (ASM) libraries, see -`azure-servicemanagement-legacy `__ library. - -For a more complete set of Azure libraries, see the `azure `__ bundle package. - - -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - -Usage -===== - -For code examples, see `DocumentDB Management -`__ -on readthedocs.org. - - -Provide Feedback -================ - -If you encounter any bugs or have suggestions, please file an issue in the -`Issues `__ -section of the project. - - -.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py deleted file mode 100755 index 3ec900145f1e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .document_db import DocumentDB -from .version import VERSION - -__all__ = ['DocumentDB'] - -__version__ = VERSION - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py deleted file mode 100755 index 5eda44ab3e32..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import ServiceClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.database_accounts_operations import DatabaseAccountsOperations -from . import models - - -class DocumentDBConfiguration(AzureConfiguration): - """Configuration for DocumentDB - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") - if not base_url: - base_url = 'https://management.azure.com' - - super(DocumentDBConfiguration, self).__init__(base_url) - - self.add_user_agent('documentdb/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class DocumentDB(object): - """Azure DocumentDB Database Service Resource Provider REST API - - :ivar config: Configuration for client. - :vartype config: DocumentDBConfiguration - - :ivar database_accounts: DatabaseAccounts operations - :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2015-04-08' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.database_accounts = DatabaseAccountsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py deleted file mode 100755 index 2ed68c568a84..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .consistency_policy import ConsistencyPolicy -from .location import Location -from .failover_policy import FailoverPolicy -from .database_account import DatabaseAccount -from .failover_policies import FailoverPolicies -from .resource import Resource -from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters -from .database_account_patch_parameters import DatabaseAccountPatchParameters -from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult -from .database_account_list_keys_result import DatabaseAccountListKeysResult -from .database_account_connection_string import DatabaseAccountConnectionString -from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult -from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters -from .database_account_paged import DatabaseAccountPaged -from .document_db_enums import ( - DatabaseAccountKind, - DatabaseAccountOfferType, - DefaultConsistencyLevel, - KeyKind, -) - -__all__ = [ - 'ConsistencyPolicy', - 'Location', - 'FailoverPolicy', - 'DatabaseAccount', - 'FailoverPolicies', - 'Resource', - 'DatabaseAccountCreateUpdateParameters', - 'DatabaseAccountPatchParameters', - 'DatabaseAccountListReadOnlyKeysResult', - 'DatabaseAccountListKeysResult', - 'DatabaseAccountConnectionString', - 'DatabaseAccountListConnectionStringsResult', - 'DatabaseAccountRegenerateKeyParameters', - 'DatabaseAccountPaged', - 'DatabaseAccountKind', - 'DatabaseAccountOfferType', - 'DefaultConsistencyLevel', - 'KeyKind', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py deleted file mode 100755 index d8cefd4c0b59..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConsistencyPolicy(Model): - """The consistency policy for the DocumentDB database account. - - :param default_consistency_level: The default consistency level and - configuration settings of the DocumentDB account. Possible values include: - 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' - :type default_consistency_level: str or :class:`DefaultConsistencyLevel - ` - :param max_staleness_prefix: When used with the Bounded Staleness - consistency level, this value represents the number of stale requests - tolerated. Accepted range for this value is 1 – 2,147,483,647. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_staleness_prefix: long - :param max_interval_in_seconds: When used with the Bounded Staleness - consistency level, this value represents the time amount of staleness (in - seconds) tolerated. Accepted range for this value is 1 - 100. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_interval_in_seconds: int - """ - - _validation = { - 'default_consistency_level': {'required': True}, - 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, - 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, - 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, - 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, - } - - def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): - self.default_consistency_level = default_consistency_level - self.max_staleness_prefix = max_staleness_prefix - self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py deleted file mode 100755 index 89031adc35cb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccount(Resource): - """A DocumentDB database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param provisioning_state: - :type provisioning_state: str - :ivar document_endpoint: The connection endpoint for the DocumentDB - database account. - :vartype document_endpoint: str - :ivar database_account_offer_type: The offer type for the DocumentDB - database account. Default value: Standard. Possible values include: - 'Standard' - :vartype database_account_offer_type: str or - :class:`DatabaseAccountOfferType - ` - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - :param consistency_policy: The consistency policy for the DocumentDB - database account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :ivar write_locations: An array that contains the write location for the - DocumentDB account. - :vartype write_locations: list of :class:`Location - ` - :ivar read_locations: An array that contains of the read locations enabled - for the DocumentDB account. - :vartype read_locations: list of :class:`Location - ` - :ivar failover_policies: An array that contains the regions ordered by - their failover priorities. - :vartype failover_policies: list of :class:`FailoverPolicy - ` - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'document_endpoint': {'readonly': True}, - 'database_account_offer_type': {'readonly': True}, - 'write_locations': {'readonly': True}, - 'read_locations': {'readonly': True}, - 'failover_policies': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, - 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, - 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): - super(DatabaseAccount, self).__init__(location=location, tags=tags) - self.kind = kind - self.provisioning_state = provisioning_state - self.document_endpoint = None - self.database_account_offer_type = None - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover - self.consistency_policy = consistency_policy - self.write_locations = None - self.read_locations = None - self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py deleted file mode 100755 index db1828208069..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountConnectionString(Model): - """Connection string for the DocumentDB account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar connection_string: Value of the connection string - :vartype connection_string: str - :ivar description: Description of the connection string - :vartype description: str - """ - - _validation = { - 'connection_string': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self): - self.connection_string = None - self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py deleted file mode 100755 index 30978f482f0b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccountCreateUpdateParameters(Resource): - """Parameters to create and update DocumentDB database accounts. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param consistency_policy: The consistency policy for the DocumentDB - account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :param locations: An array that contains the georeplication locations - enabled for the DocumentDB account. - :type locations: list of :class:`Location - ` - :ivar database_account_offer_type: Default value: "Standard" . - :vartype database_account_offer_type: str - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - } - - database_account_offer_type = "Standard" - - def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): - super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) - self.kind = kind - self.consistency_policy = consistency_policy - self.locations = locations - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py deleted file mode 100755 index 7cddc00a3de1..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListConnectionStringsResult(Model): - """The connection strings for the given database account. - - :param connection_strings: An array that contains the connection strings - for the DocumentDB account. - :type connection_strings: list of :class:`DatabaseAccountConnectionString - ` - """ - - _attribute_map = { - 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, - } - - def __init__(self, connection_strings=None): - self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py deleted file mode 100755 index 4d775054ac14..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListKeysResult(Model): - """The access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_master_key: Base 64 encoded value of the primary read-write - key. - :vartype primary_master_key: str - :ivar secondary_master_key: Base 64 encoded value of the secondary - read-write key. - :vartype secondary_master_key: str - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_master_key': {'readonly': True}, - 'secondary_master_key': {'readonly': True}, - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, - 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, - 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_master_key = None - self.secondary_master_key = None - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py deleted file mode 100755 index 3330353950c6..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListReadOnlyKeysResult(Model): - """The read-only access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py deleted file mode 100755 index 4cb94909c515..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseAccountPaged(Paged): - """ - A paging container for iterating over a list of DatabaseAccount object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py deleted file mode 100755 index be78a4fd6817..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountPatchParameters(Model): - """Parameters for patching Azure DocumentDB database account properties. - - :param tags: - :type tags: dict - """ - - _validation = { - 'tags': {'required': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, tags): - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py deleted file mode 100755 index 3bff90d33db3..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountRegenerateKeyParameters(Model): - """Parameters to regenerate the keys within the database account. - - :param key_kind: The access key to regenerate. Possible values include: - 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - """ - - _validation = { - 'key_kind': {'required': True}, - } - - _attribute_map = { - 'key_kind': {'key': 'keyKind', 'type': 'str'}, - } - - def __init__(self, key_kind): - self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py deleted file mode 100755 index 1e87cecaeb2a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class DatabaseAccountKind(Enum): - - global_document_db = "GlobalDocumentDB" - mongo_db = "MongoDB" - parse = "Parse" - - -class DatabaseAccountOfferType(Enum): - - standard = "Standard" - - -class DefaultConsistencyLevel(Enum): - - eventual = "Eventual" - session = "Session" - bounded_staleness = "BoundedStaleness" - strong = "Strong" - consistent_prefix = "ConsistentPrefix" - - -class KeyKind(Enum): - - primary = "primary" - secondary = "secondary" - primary_readonly = "primaryReadonly" - secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py deleted file mode 100755 index 4c3ebff5e3b5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicies(Model): - """The list of new failover policies for the failover priority change. - - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - """ - - _attribute_map = { - 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, failover_policies=None): - self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py deleted file mode 100755 index 99cc2769403b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicy(Model): - """The failover policy for a given region of a database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region in which the database - account replicates to. Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region in which the database account - exists. - :type location_name: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py deleted file mode 100755 index 8bc82bde2c3f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Location(Model): - """A region in which the Azure DocumentDB database account is deployed. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region within the database account. - Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region. - :type location_name: str - :ivar document_endpoint: The connection endpoint for the specific region. - Example: - https://<accountName>-<locationName>.documents.azure.com:443/ - :vartype document_endpoint: str - :param provisioning_state: - :type provisioning_state: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.document_endpoint = None - self.provisioning_state = provisioning_state - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py deleted file mode 100755 index d5e887d0b78a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """A database account resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, location, tags=None): - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py deleted file mode 100755 index 27ed7c069537..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .database_accounts_operations import DatabaseAccountsOperations - -__all__ = [ - 'DatabaseAccountsOperations', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py deleted file mode 100755 index 2bb39b1f6839..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py +++ /dev/null @@ -1,918 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrestazure.azure_operation import AzureOperationPoller -import uuid - -from .. import models - - -class DatabaseAccountsOperations(object): - """DatabaseAccountsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". - """ - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-04-08" - - self.config = config - - def get( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Retrieves the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def patch( - self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): - """Patches the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param tags: - :type tags: dict - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - update_parameters = models.DatabaseAccountPatchParameters(tags=tags) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(update_parameters, 'DatabaseAccountPatchParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.patch(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def create_or_update( - self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): - """Creates or updates an Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param create_update_parameters: The parameters to provide for the - current database account. - :type create_update_parameters: - :class:`DatabaseAccountCreateUpdateParameters - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def delete( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Deletes an existing Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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 - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - def long_running_send(): - - request = self._client.delete(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def failover_priority_change( - self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): - """Changes the failover priority for the Azure DocumentDB database - account. A failover priority of 0 indicates a write region. The maximum - value for a failover priority = (total number of regions - 1). Failover - priority values must be unique for each of the regions in which the - database account exists. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(failover_parameters, 'FailoverPolicies') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - subscription. - - :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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - given resource group. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the access keys for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_connection_strings( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the connection strings for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListConnectionStringsResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_read_only_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the read-only access keys for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListReadOnlyKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def regenerate_key( - self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): - """Regenerates an access key for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param key_kind: The access key to regenerate. Possible values - include: 'primary', 'secondary', 'primaryReadonly', - 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def check_name_exists( - self, account_name, custom_headers=None, raw=False, **operation_config): - """Checks that the Azure DocumentDB account name already exists. A valid - account name may contain only lowercase letters, numbers, and the '-' - character, and must be between 3 and 50 characters. - - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: bool - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' - path_format_arguments = { - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.head(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = (response.status_code == 200) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py deleted file mode 100755 index 95ed79d29108..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.3" - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -from distutils import log as logger -import os.path - -from wheel.bdist_wheel import bdist_wheel -class azure_bdist_wheel(bdist_wheel): - """The purpose of this class is to build wheel a little differently than the sdist, - without requiring to build the wheel from the sdist (i.e. you can build the wheel - directly from source). - """ - - description = "Create an Azure wheel distribution" - - user_options = bdist_wheel.user_options + \ - [('azure-namespace-package=', None, - "Name of the deepest nspkg used")] - - def initialize_options(self): - bdist_wheel.initialize_options(self) - self.azure_namespace_package = None - - def finalize_options(self): - bdist_wheel.finalize_options(self) - if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): - raise ValueError("azure_namespace_package must finish by -nspkg") - - def run(self): - if not self.distribution.install_requires: - self.distribution.install_requires = [] - self.distribution.install_requires.append( - "{}>=2.0.0".format(self.azure_namespace_package)) - bdist_wheel.run(self) - - def write_record(self, bdist_dir, distinfo_dir): - if self.azure_namespace_package: - # Split and remove last part, assuming it's "nspkg" - subparts = self.azure_namespace_package.split('-')[0:-1] - folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] - for azure_sub_package in folder_with_init: - init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') - if os.path.isfile(init_file): - logger.info("manually remove {} while building the wheel".format(init_file)) - os.remove(init_file) - else: - raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) - bdist_wheel.write_record(self, bdist_dir, distinfo_dir) -cmdclass = { - 'bdist_wheel': azure_bdist_wheel, -} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json deleted file mode 100644 index 4d98fc12a39e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/build.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "autorest": "1.0.1-20170501-2300-nightly", - "date": "2017-05-01T20:13:42Z", - "version": "0.1.3" -} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt deleted file mode 100644 index 6ccb7f031ddd..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt +++ /dev/null @@ -1 +0,0 @@ --e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml deleted file mode 100644 index e7687fdae93b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml +++ /dev/null @@ -1,2 +0,0 @@ -[packaging] -auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg deleted file mode 100644 index 856f4164982c..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[bdist_wheel] -universal=1 -azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py deleted file mode 100644 index ddef54e31bb5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.py +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env python - -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup -try: - from azure_bdist_wheel import cmdclass -except ImportError: - from distutils import log as logger - logger.warn("Wheel is not available, disabling bdist_wheel hook") - cmdclass = {} - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-documentdb" -PACKAGE_PPRINT_NAME = "DocumentDB Management" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') - -# azure v0.x is not compatible with this package -# azure v0.x used to have a __version__ attribute (newer versions don't) -try: - import azure - try: - ver = azure.__version__ - raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' - ) - except AttributeError: - pass -except ImportError: - pass - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError('Cannot find version information') - -with open('README.rst', encoding='utf-8') as f: - readme = f.read() -with open('HISTORY.rst', encoding='utf-8') as f: - history = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + history, - license='MIT License', - author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', - classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'License :: OSI Approved :: MIT License', - ], - zip_safe=False, - packages=find_packages(), - install_requires=[ - 'msrestazure~=0.4.7', - 'azure-common~=1.1.5', - ], - cmdclass=cmdclass -) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml deleted file mode 100644 index d470d7f8673d..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml +++ /dev/null @@ -1,193 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] - method: HEAD - uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: ''} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['142'] - Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-ratelimit-remaining-tenant-reads: ['14999'] - x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] - status: {code: 404, message: NotFound} -- request: - body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], - "databaseAccountOfferType": "Standard"}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['121'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['910'] - x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Completed","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['33'] - x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml deleted file mode 100644 index e6f4e2348f8f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml +++ /dev/null @@ -1,467 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' - under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' - was not found."}}'} - headers: - Cache-Control: [no-cache] - Content-Length: ['214'] - Content-Type: [application/json; charset=utf-8] - Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-failure-cause: [gateway] - x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] - status: {code: 404, message: Not Found} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml deleted file mode 100644 index b2e4b82a9d9e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml +++ /dev/null @@ -1,272 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1144'] - x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1156'] - x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['2225'] - x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] - status: {code: 200, message: Ok} -- request: - body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['73'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 - response: - body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique - and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['170'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] - status: {code: 400, message: BadRequest} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 - response: - body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['239'] - x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] - status: {code: 200, message: Ok} -- request: - body: '{"keyKind": "primary"}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['22'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] - x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py deleted file mode 100644 index 902666a22cf0..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py +++ /dev/null @@ -1,146 +0,0 @@ -# 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. -#-------------------------------------------------------------------------- -import unittest - -import azure.mgmt.documentdb -from msrestazure.azure_exceptions import CloudError -from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer - - -class MgmtDocDBTest(AzureMgmtTestCase): - - def setUp(self): - super(MgmtDocDBTest, self).setUp() - self.client = self.create_mgmt_client( - azure.mgmt.documentdb.DocumentDB - ) - - @ResourceGroupPreparer() - def test_accounts_create(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtst') - - self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) - - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - account = async_docdb_create.result() - self.assertIsNotNone(account) - # Rest API issue - # self.assertEqual(account.name, account_name) - - @ResourceGroupPreparer() - def test_accounts_features(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtest') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - account = self.client.database_accounts.get( - resource_group.name, - account_name - ) - self.assertEqual(account.name, account_name) - - my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) - self.assertEqual(len(my_accounts), 1) - self.assertEqual(my_accounts[0].name, account_name) - - my_accounts = list(self.client.database_accounts.list()) - self.assertTrue(len(my_accounts) >= 1) - self.assertTrue(any(db.name == account_name for db in my_accounts)) - - # I guess we can make this test with no error, need to check with DocDB team - # This is an interesting test anyway, this implies that the serialization works - # and error message is available. Since this method does not return an object - # (i.e. no deserialization to test), this is a complete test. - # We are NOT here to test the RestAPI, but the Swagger file and Python code. - with self.assertRaises(CloudError) as cm: - async_change = self.client.database_accounts.failover_priority_change( - resource_group.name, - account_name, - [{ - 'location_name': self.region, - 'failover_priority': 0 - }] - ) - async_change.wait() - self.assertIn('Failover priorities must be unique', cm.exception.message) - - my_keys = self.client.database_accounts.list_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_master_key) - self.assertIsNotNone(my_keys.secondary_master_key) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - my_keys = self.client.database_accounts.list_read_only_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - async_regenerate = self.client.database_accounts.regenerate_key( - resource_group.name, - account_name, - "primary" - ) - async_regenerate.wait() - - @ResourceGroupPreparer() - def test_accounts_delete(self, resource_group, location): - account_name = self.get_resource_name('pydocumentdbtst') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - # Current implementation of msrestazure does not support 404 as a end of LRO delete - # https://github.com/Azure/msrestazure-for-python/issues/7 - async_delete = self.client.database_accounts.delete(resource_group.name, account_name) - try: - async_delete.wait() - except CloudError as err: - if err.response.status_code != 404: - raise - - -#------------------------------------------------------------------------------ -if __name__ == '__main__': - unittest.main() From 3295928b3f9bba8e6ddc7831041744cde1f9f603 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:42:03 -0700 Subject: [PATCH 219/244] Revert "Remove docdb mgmt package from master (#6585)" (#6593) This reverts commit d2ed7d87997eac9b715ee9802c15349a12446b84. --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 + sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 + sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 + .../azure-mgmt-documentdb/azure/__init__.py | 1 + .../azure/mgmt/__init__.py | 1 + .../azure/mgmt/documentdb/__init__.py | 18 + .../azure/mgmt/documentdb/document_db.py | 83 ++ .../azure/mgmt/documentdb/models/__init__.py | 52 + .../documentdb/models/consistency_policy.py | 50 + .../documentdb/models/database_account.py | 117 +++ .../database_account_connection_string.py | 39 + ...tabase_account_create_update_parameters.py | 90 ++ ..._account_list_connection_strings_result.py | 29 + .../database_account_list_keys_result.py | 53 + ...base_account_list_read_only_keys_result.py | 41 + .../models/database_account_paged.py | 27 + .../database_account_patch_parameters.py | 31 + ...abase_account_regenerate_key_parameters.py | 33 + .../documentdb/models/document_db_enums.py | 41 + .../documentdb/models/failover_policies.py | 28 + .../mgmt/documentdb/models/failover_policy.py | 48 + .../azure/mgmt/documentdb/models/location.py | 58 ++ .../azure/mgmt/documentdb/models/resource.py | 54 ++ .../mgmt/documentdb/operations/__init__.py | 16 + .../database_accounts_operations.py | 918 ++++++++++++++++++ .../azure/mgmt/documentdb/version.py | 13 + .../azure_bdist_wheel.py | 54 ++ sdk/cosmos/azure-mgmt-documentdb/build.json | 5 + .../dev_requirements.txt | 1 + .../azure-mgmt-documentdb/sdk_packaging.toml | 2 + sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 + sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 ++ ..._mgmt_documentdb.test_accounts_create.yaml | 193 ++++ ..._mgmt_documentdb.test_accounts_delete.yaml | 467 +++++++++ ...gmt_documentdb.test_accounts_features.yaml | 272 ++++++ .../tests/test_mgmt_documentdb.py | 146 +++ 36 files changed, 3147 insertions(+) create mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in create mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json create mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt create mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst new file mode 100644 index 000000000000..eb7345b4071e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst @@ -0,0 +1,24 @@ +.. :changelog: + +Release History +=============== + +0.1.3 (2017-05-02) +++++++++++++++++++ + +* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix + +0.1.2 (2017-04-20) +++++++++++++++++++ + +This wheel package is now built with the azure wheel extension + +0.1.1 (2017-03-21) +++++++++++++++++++ + +* Added support for listing database account connection strings + +0.1.0 (2017-01-31) +++++++++++++++++++ + +* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in new file mode 100644 index 000000000000..9ecaeb15de50 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in @@ -0,0 +1,2 @@ +include *.rst +include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst new file mode 100644 index 000000000000..a5204ea75358 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/README.rst @@ -0,0 +1,52 @@ +Microsoft Azure SDK for Python +============================== + +This is the Microsoft Azure DocumentDB Management Client Library. + +Azure Resource Manager (ARM) is the next generation of management APIs that +replace the old Azure Service Management (ASM). + +This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. + +For the older Azure Service Management (ASM) libraries, see +`azure-servicemanagement-legacy `__ library. + +For a more complete set of Azure libraries, see the `azure `__ bundle package. + + +Compatibility +============= + +**IMPORTANT**: If you have an earlier version of the azure package +(version < 1.0), you should uninstall it before installing this package. + +You can check the version using pip: + +.. code:: shell + + pip freeze + +If you see azure==0.11.0 (or any version below 1.0), uninstall it first: + +.. code:: shell + + pip uninstall azure + + +Usage +===== + +For code examples, see `DocumentDB Management +`__ +on readthedocs.org. + + +Provide Feedback +================ + +If you encounter any bugs or have suggestions, please file an issue in the +`Issues `__ +section of the project. + + +.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py new file mode 100755 index 000000000000..3ec900145f1e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .document_db import DocumentDB +from .version import VERSION + +__all__ = ['DocumentDB'] + +__version__ = VERSION + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py new file mode 100755 index 000000000000..5eda44ab3e32 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import ServiceClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.database_accounts_operations import DatabaseAccountsOperations +from . import models + + +class DocumentDBConfiguration(AzureConfiguration): + """Configuration for DocumentDB + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not isinstance(subscription_id, str): + raise TypeError("Parameter 'subscription_id' must be str.") + if not base_url: + base_url = 'https://management.azure.com' + + super(DocumentDBConfiguration, self).__init__(base_url) + + self.add_user_agent('documentdb/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class DocumentDB(object): + """Azure DocumentDB Database Service Resource Provider REST API + + :ivar config: Configuration for client. + :vartype config: DocumentDBConfiguration + + :ivar database_accounts: DatabaseAccounts operations + :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) + self._client = ServiceClient(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2015-04-08' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.database_accounts = DatabaseAccountsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py new file mode 100755 index 000000000000..2ed68c568a84 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .consistency_policy import ConsistencyPolicy +from .location import Location +from .failover_policy import FailoverPolicy +from .database_account import DatabaseAccount +from .failover_policies import FailoverPolicies +from .resource import Resource +from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters +from .database_account_patch_parameters import DatabaseAccountPatchParameters +from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult +from .database_account_list_keys_result import DatabaseAccountListKeysResult +from .database_account_connection_string import DatabaseAccountConnectionString +from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult +from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters +from .database_account_paged import DatabaseAccountPaged +from .document_db_enums import ( + DatabaseAccountKind, + DatabaseAccountOfferType, + DefaultConsistencyLevel, + KeyKind, +) + +__all__ = [ + 'ConsistencyPolicy', + 'Location', + 'FailoverPolicy', + 'DatabaseAccount', + 'FailoverPolicies', + 'Resource', + 'DatabaseAccountCreateUpdateParameters', + 'DatabaseAccountPatchParameters', + 'DatabaseAccountListReadOnlyKeysResult', + 'DatabaseAccountListKeysResult', + 'DatabaseAccountConnectionString', + 'DatabaseAccountListConnectionStringsResult', + 'DatabaseAccountRegenerateKeyParameters', + 'DatabaseAccountPaged', + 'DatabaseAccountKind', + 'DatabaseAccountOfferType', + 'DefaultConsistencyLevel', + 'KeyKind', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py new file mode 100755 index 000000000000..d8cefd4c0b59 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConsistencyPolicy(Model): + """The consistency policy for the DocumentDB database account. + + :param default_consistency_level: The default consistency level and + configuration settings of the DocumentDB account. Possible values include: + 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' + :type default_consistency_level: str or :class:`DefaultConsistencyLevel + ` + :param max_staleness_prefix: When used with the Bounded Staleness + consistency level, this value represents the number of stale requests + tolerated. Accepted range for this value is 1 – 2,147,483,647. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_staleness_prefix: long + :param max_interval_in_seconds: When used with the Bounded Staleness + consistency level, this value represents the time amount of staleness (in + seconds) tolerated. Accepted range for this value is 1 - 100. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_interval_in_seconds: int + """ + + _validation = { + 'default_consistency_level': {'required': True}, + 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, + 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, + 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, + 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, + } + + def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): + self.default_consistency_level = default_consistency_level + self.max_staleness_prefix = max_staleness_prefix + self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py new file mode 100755 index 000000000000..89031adc35cb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py @@ -0,0 +1,117 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccount(Resource): + """A DocumentDB database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param provisioning_state: + :type provisioning_state: str + :ivar document_endpoint: The connection endpoint for the DocumentDB + database account. + :vartype document_endpoint: str + :ivar database_account_offer_type: The offer type for the DocumentDB + database account. Default value: Standard. Possible values include: + 'Standard' + :vartype database_account_offer_type: str or + :class:`DatabaseAccountOfferType + ` + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + :param consistency_policy: The consistency policy for the DocumentDB + database account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :ivar write_locations: An array that contains the write location for the + DocumentDB account. + :vartype write_locations: list of :class:`Location + ` + :ivar read_locations: An array that contains of the read locations enabled + for the DocumentDB account. + :vartype read_locations: list of :class:`Location + ` + :ivar failover_policies: An array that contains the regions ordered by + their failover priorities. + :vartype failover_policies: list of :class:`FailoverPolicy + ` + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'document_endpoint': {'readonly': True}, + 'database_account_offer_type': {'readonly': True}, + 'write_locations': {'readonly': True}, + 'read_locations': {'readonly': True}, + 'failover_policies': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, + 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, + 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): + super(DatabaseAccount, self).__init__(location=location, tags=tags) + self.kind = kind + self.provisioning_state = provisioning_state + self.document_endpoint = None + self.database_account_offer_type = None + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover + self.consistency_policy = consistency_policy + self.write_locations = None + self.read_locations = None + self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py new file mode 100755 index 000000000000..db1828208069 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountConnectionString(Model): + """Connection string for the DocumentDB account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar connection_string: Value of the connection string + :vartype connection_string: str + :ivar description: Description of the connection string + :vartype description: str + """ + + _validation = { + 'connection_string': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self): + self.connection_string = None + self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py new file mode 100755 index 000000000000..30978f482f0b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccountCreateUpdateParameters(Resource): + """Parameters to create and update DocumentDB database accounts. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param consistency_policy: The consistency policy for the DocumentDB + account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :param locations: An array that contains the georeplication locations + enabled for the DocumentDB account. + :type locations: list of :class:`Location + ` + :ivar database_account_offer_type: Default value: "Standard" . + :vartype database_account_offer_type: str + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'locations': {'required': True}, + 'database_account_offer_type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + } + + database_account_offer_type = "Standard" + + def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): + super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) + self.kind = kind + self.consistency_policy = consistency_policy + self.locations = locations + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py new file mode 100755 index 000000000000..7cddc00a3de1 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListConnectionStringsResult(Model): + """The connection strings for the given database account. + + :param connection_strings: An array that contains the connection strings + for the DocumentDB account. + :type connection_strings: list of :class:`DatabaseAccountConnectionString + ` + """ + + _attribute_map = { + 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, + } + + def __init__(self, connection_strings=None): + self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py new file mode 100755 index 000000000000..4d775054ac14 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListKeysResult(Model): + """The access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_master_key: Base 64 encoded value of the primary read-write + key. + :vartype primary_master_key: str + :ivar secondary_master_key: Base 64 encoded value of the secondary + read-write key. + :vartype secondary_master_key: str + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_master_key': {'readonly': True}, + 'secondary_master_key': {'readonly': True}, + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, + 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, + 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_master_key = None + self.secondary_master_key = None + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py new file mode 100755 index 000000000000..3330353950c6 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListReadOnlyKeysResult(Model): + """The read-only access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py new file mode 100755 index 000000000000..4cb94909c515 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class DatabaseAccountPaged(Paged): + """ + A paging container for iterating over a list of DatabaseAccount object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py new file mode 100755 index 000000000000..be78a4fd6817 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountPatchParameters(Model): + """Parameters for patching Azure DocumentDB database account properties. + + :param tags: + :type tags: dict + """ + + _validation = { + 'tags': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, tags): + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py new file mode 100755 index 000000000000..3bff90d33db3 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountRegenerateKeyParameters(Model): + """Parameters to regenerate the keys within the database account. + + :param key_kind: The access key to regenerate. Possible values include: + 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + """ + + _validation = { + 'key_kind': {'required': True}, + } + + _attribute_map = { + 'key_kind': {'key': 'keyKind', 'type': 'str'}, + } + + def __init__(self, key_kind): + self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py new file mode 100755 index 000000000000..1e87cecaeb2a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class DatabaseAccountKind(Enum): + + global_document_db = "GlobalDocumentDB" + mongo_db = "MongoDB" + parse = "Parse" + + +class DatabaseAccountOfferType(Enum): + + standard = "Standard" + + +class DefaultConsistencyLevel(Enum): + + eventual = "Eventual" + session = "Session" + bounded_staleness = "BoundedStaleness" + strong = "Strong" + consistent_prefix = "ConsistentPrefix" + + +class KeyKind(Enum): + + primary = "primary" + secondary = "secondary" + primary_readonly = "primaryReadonly" + secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py new file mode 100755 index 000000000000..4c3ebff5e3b5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicies(Model): + """The list of new failover policies for the failover priority change. + + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + """ + + _attribute_map = { + 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, failover_policies=None): + self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py new file mode 100755 index 000000000000..99cc2769403b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicy(Model): + """The failover policy for a given region of a database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region in which the database + account replicates to. Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region in which the database account + exists. + :type location_name: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py new file mode 100755 index 000000000000..8bc82bde2c3f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Location(Model): + """A region in which the Azure DocumentDB database account is deployed. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region within the database account. + Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region. + :type location_name: str + :ivar document_endpoint: The connection endpoint for the specific region. + Example: + https://<accountName>-<locationName>.documents.azure.com:443/ + :vartype document_endpoint: str + :param provisioning_state: + :type provisioning_state: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'document_endpoint': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.document_endpoint = None + self.provisioning_state = provisioning_state + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py new file mode 100755 index 000000000000..d5e887d0b78a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """A database account resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, location, tags=None): + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py new file mode 100755 index 000000000000..27ed7c069537 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py @@ -0,0 +1,16 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .database_accounts_operations import DatabaseAccountsOperations + +__all__ = [ + 'DatabaseAccountsOperations', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py new file mode 100755 index 000000000000..2bb39b1f6839 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py @@ -0,0 +1,918 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrestazure.azure_operation import AzureOperationPoller +import uuid + +from .. import models + + +class DatabaseAccountsOperations(object): + """DatabaseAccountsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". + """ + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-04-08" + + self.config = config + + def get( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Retrieves the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def patch( + self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): + """Patches the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param tags: + :type tags: dict + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + update_parameters = models.DatabaseAccountPatchParameters(tags=tags) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(update_parameters, 'DatabaseAccountPatchParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.patch(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def create_or_update( + self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates an Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param create_update_parameters: The parameters to provide for the + current database account. + :type create_update_parameters: + :class:`DatabaseAccountCreateUpdateParameters + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.put(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def delete( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Deletes an existing Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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 + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + def long_running_send(): + + request = self._client.delete(url, query_parameters) + return self._client.send(request, header_parameters, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def failover_priority_change( + self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): + """Changes the failover priority for the Azure DocumentDB database + account. A failover priority of 0 indicates a write region. The maximum + value for a failover priority = (total number of regions - 1). Failover + priority values must be unique for each of the regions in which the + database account exists. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(failover_parameters, 'FailoverPolicies') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + subscription. + + :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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + given resource group. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the access keys for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_connection_strings( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the connection strings for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListConnectionStringsResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_read_only_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the read-only access keys for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListReadOnlyKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def regenerate_key( + self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): + """Regenerates an access key for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param key_kind: The access key to regenerate. Possible values + include: 'primary', 'secondary', 'primaryReadonly', + 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def check_name_exists( + self, account_name, custom_headers=None, raw=False, **operation_config): + """Checks that the Azure DocumentDB account name already exists. A valid + account name may contain only lowercase letters, numbers, and the '-' + character, and must be between 3 and 50 characters. + + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: bool + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' + path_format_arguments = { + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.head(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = (response.status_code == 200) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py new file mode 100755 index 000000000000..95ed79d29108 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.3" + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py new file mode 100644 index 000000000000..8a81d1b61775 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py @@ -0,0 +1,54 @@ +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +from distutils import log as logger +import os.path + +from wheel.bdist_wheel import bdist_wheel +class azure_bdist_wheel(bdist_wheel): + """The purpose of this class is to build wheel a little differently than the sdist, + without requiring to build the wheel from the sdist (i.e. you can build the wheel + directly from source). + """ + + description = "Create an Azure wheel distribution" + + user_options = bdist_wheel.user_options + \ + [('azure-namespace-package=', None, + "Name of the deepest nspkg used")] + + def initialize_options(self): + bdist_wheel.initialize_options(self) + self.azure_namespace_package = None + + def finalize_options(self): + bdist_wheel.finalize_options(self) + if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): + raise ValueError("azure_namespace_package must finish by -nspkg") + + def run(self): + if not self.distribution.install_requires: + self.distribution.install_requires = [] + self.distribution.install_requires.append( + "{}>=2.0.0".format(self.azure_namespace_package)) + bdist_wheel.run(self) + + def write_record(self, bdist_dir, distinfo_dir): + if self.azure_namespace_package: + # Split and remove last part, assuming it's "nspkg" + subparts = self.azure_namespace_package.split('-')[0:-1] + folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] + for azure_sub_package in folder_with_init: + init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') + if os.path.isfile(init_file): + logger.info("manually remove {} while building the wheel".format(init_file)) + os.remove(init_file) + else: + raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) + bdist_wheel.write_record(self, bdist_dir, distinfo_dir) +cmdclass = { + 'bdist_wheel': azure_bdist_wheel, +} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json new file mode 100644 index 000000000000..4d98fc12a39e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/build.json @@ -0,0 +1,5 @@ +{ + "autorest": "1.0.1-20170501-2300-nightly", + "date": "2017-05-01T20:13:42Z", + "version": "0.1.3" +} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt new file mode 100644 index 000000000000..6ccb7f031ddd --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt @@ -0,0 +1 @@ +-e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml new file mode 100644 index 000000000000..e7687fdae93b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg new file mode 100644 index 000000000000..856f4164982c --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg @@ -0,0 +1,3 @@ +[bdist_wheel] +universal=1 +azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py new file mode 100644 index 000000000000..ddef54e31bb5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup +try: + from azure_bdist_wheel import cmdclass +except ImportError: + from distutils import log as logger + logger.warn("Wheel is not available, disabling bdist_wheel hook") + cmdclass = {} + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-documentdb" +PACKAGE_PPRINT_NAME = "DocumentDB Management" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.rst', encoding='utf-8') as f: + readme = f.read() +with open('HISTORY.rst', encoding='utf-8') as f: + history = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + history, + license='MIT License', + author='Microsoft Corporation', + author_email='ptvshelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(), + install_requires=[ + 'msrestazure~=0.4.7', + 'azure-common~=1.1.5', + ], + cmdclass=cmdclass +) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml new file mode 100644 index 000000000000..d470d7f8673d --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml @@ -0,0 +1,193 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] + method: HEAD + uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: ''} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['142'] + Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-ratelimit-remaining-tenant-reads: ['14999'] + x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] + status: {code: 404, message: NotFound} +- request: + body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], + "databaseAccountOfferType": "Standard"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['121'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['910'] + x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Completed","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['33'] + x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml new file mode 100644 index 000000000000..e6f4e2348f8f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml @@ -0,0 +1,467 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' + under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' + was not found."}}'} + headers: + Cache-Control: [no-cache] + Content-Length: ['214'] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-failure-cause: [gateway] + x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] + status: {code: 404, message: Not Found} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml new file mode 100644 index 000000000000..b2e4b82a9d9e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml @@ -0,0 +1,272 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1144'] + x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1156'] + x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2225'] + x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] + status: {code: 200, message: Ok} +- request: + body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['73'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 + response: + body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique + and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['170'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] + status: {code: 400, message: BadRequest} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 + response: + body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['239'] + x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] + status: {code: 200, message: Ok} +- request: + body: '{"keyKind": "primary"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['22'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] + x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py new file mode 100644 index 000000000000..902666a22cf0 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py @@ -0,0 +1,146 @@ +# 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. +#-------------------------------------------------------------------------- +import unittest + +import azure.mgmt.documentdb +from msrestazure.azure_exceptions import CloudError +from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer + + +class MgmtDocDBTest(AzureMgmtTestCase): + + def setUp(self): + super(MgmtDocDBTest, self).setUp() + self.client = self.create_mgmt_client( + azure.mgmt.documentdb.DocumentDB + ) + + @ResourceGroupPreparer() + def test_accounts_create(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtst') + + self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) + + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + account = async_docdb_create.result() + self.assertIsNotNone(account) + # Rest API issue + # self.assertEqual(account.name, account_name) + + @ResourceGroupPreparer() + def test_accounts_features(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtest') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + account = self.client.database_accounts.get( + resource_group.name, + account_name + ) + self.assertEqual(account.name, account_name) + + my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) + self.assertEqual(len(my_accounts), 1) + self.assertEqual(my_accounts[0].name, account_name) + + my_accounts = list(self.client.database_accounts.list()) + self.assertTrue(len(my_accounts) >= 1) + self.assertTrue(any(db.name == account_name for db in my_accounts)) + + # I guess we can make this test with no error, need to check with DocDB team + # This is an interesting test anyway, this implies that the serialization works + # and error message is available. Since this method does not return an object + # (i.e. no deserialization to test), this is a complete test. + # We are NOT here to test the RestAPI, but the Swagger file and Python code. + with self.assertRaises(CloudError) as cm: + async_change = self.client.database_accounts.failover_priority_change( + resource_group.name, + account_name, + [{ + 'location_name': self.region, + 'failover_priority': 0 + }] + ) + async_change.wait() + self.assertIn('Failover priorities must be unique', cm.exception.message) + + my_keys = self.client.database_accounts.list_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_master_key) + self.assertIsNotNone(my_keys.secondary_master_key) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + my_keys = self.client.database_accounts.list_read_only_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + async_regenerate = self.client.database_accounts.regenerate_key( + resource_group.name, + account_name, + "primary" + ) + async_regenerate.wait() + + @ResourceGroupPreparer() + def test_accounts_delete(self, resource_group, location): + account_name = self.get_resource_name('pydocumentdbtst') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + # Current implementation of msrestazure does not support 404 as a end of LRO delete + # https://github.com/Azure/msrestazure-for-python/issues/7 + async_delete = self.client.database_accounts.delete(resource_group.name, account_name) + try: + async_delete.wait() + except CloudError as err: + if err.response.status_code != 404: + raise + + +#------------------------------------------------------------------------------ +if __name__ == '__main__': + unittest.main() From f7e3704985f163a4d2751be9ca69d381c7e75d1c Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 10:16:27 -0700 Subject: [PATCH 220/244] Update CODEOWNERS --- .github/CODEOWNERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 07d57ac48320..0172563e9a84 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -40,6 +40,9 @@ # Management Plane /**/*mgmt*/ @zikalino +# Management Plane +/**/*mgmt*/ @zikalino + ########### # Eng Sys ########### From deee46ad63f2e8afc506be2dc14d3a78ddd173fb Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 11:03:35 -0700 Subject: [PATCH 221/244] more code owners --- .github/CODEOWNERS | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0172563e9a84..07d57ac48320 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -40,9 +40,6 @@ # Management Plane /**/*mgmt*/ @zikalino -# Management Plane -/**/*mgmt*/ @zikalino - ########### # Eng Sys ########### From e702ae313a8e90f81e9eb7216c36e8a61d56cc6d Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 11:58:35 -0700 Subject: [PATCH 222/244] add policy and decorators for secrets (#6453) --- .../azure/keyvault/secrets/_shared/async_client_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 193e6e324c7e..c451ffb1e766 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncHttpTransport +from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient From ddcbf91f217624c10f1d1fb81a1f37b19b09eae1 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Thu, 25 Jul 2019 12:41:38 -0700 Subject: [PATCH 223/244] Paging v2 (#6420) * First version of paging * Clean sync paging * Async paging * Name AsyncList without underscore * MyPy happyness * pylint * black * PageIterator as conf * Simplify ItemPaged * Use chain to link iterable * Make Paging more open * Docstring * pylint / mypy / black * Regenerate KV with latest Autorest + Paging branch (#6479) * Regenerate KV with latest Autorest + Paging branch * Remove unused import in tests * Make the async adapter more generic * Regeneration after operation mixin fix in Autorest * COmmit changes forgotten in #6418 * Fixing syntax for 2.7 * Move Storage Queue to new Paging (#6447) * Move Storage Queue to new Paging * Working Storage queue on new paging * Fix types * First shot of blob tests update * Fixing blob tests * File to new paging * Doc fix * Feedbacks from @annatisch * Fix last @annatisch comment * Simplify paging contract * Fix storage queue after new paging contract --- .../_key_vault_client_operations_async.py | 60 ++++------------ .../_key_vault_client_operations.py | 60 ++++------------ .../_key_vault_client_operations_async.py | 70 ++++--------------- .../_key_vault_client_operations.py | 70 ++++--------------- .../keys/_shared/async_client_base.py | 19 +++++ .../_key_vault_client_operations_async.py | 60 ++++------------ .../_key_vault_client_operations.py | 60 ++++------------ .../_key_vault_client_operations_async.py | 70 ++++--------------- .../_key_vault_client_operations.py | 70 ++++--------------- .../secrets/_shared/async_client_base.py | 19 +++++ 10 files changed, 142 insertions(+), 416 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index b5cc965119ed..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 0ae7fd5fb025..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index 08e45c2b44a7..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index b9ed6e10ea21..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 193e6e324c7e..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -21,6 +21,25 @@ pass +class AsyncPagingAdapter: + """For each item in an AsyncIterator, returns the result of applying fn to that item. + Python 3.6 added syntax that could replace this (yield within async for).""" + + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: + self._pages = pages + self._fn = fn + + def __aiter__(self): + return self + + async def __anext__(self) -> Any: + item = await self._pages.__anext__() + if not item: + raise StopAsyncIteration + return self._fn(item) + # TODO: expected type Model got Coroutine instead? + + class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index b5cc965119ed..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 0ae7fd5fb025..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index 08e45c2b44a7..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index b9ed6e10ea21..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index c451ffb1e766..0119ef5a6e44 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -21,6 +21,25 @@ pass +class AsyncPagingAdapter: + """For each item in an AsyncIterator, returns the result of applying fn to that item. + Python 3.6 added syntax that could replace this (yield within async for).""" + + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: + self._pages = pages + self._fn = fn + + def __aiter__(self): + return self + + async def __anext__(self) -> Any: + item = await self._pages.__anext__() + if not item: + raise StopAsyncIteration + return self._fn(item) + # TODO: expected type Model got Coroutine instead? + + class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, From 4a5149bec406998bf1eea95e5cd1cc85bb9fb574 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 15:48:49 -0700 Subject: [PATCH 224/244] get rid of should only propagate (#6497) --- sdk/core/azure-core/azure/core/tracing/decorator.py | 2 +- sdk/core/azure-core/azure/core/tracing/decorator_async.py | 2 +- .../azure_core_asynctests/test_tracing_decorator_async.py | 5 ++++- sdk/core/azure-core/tests/test_tracing_decorator.py | 5 ++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 3986dcaf31ed..7d5d7bfce407 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None and orig_wrapped_span is None: + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 4df65fee77ef..781e20a6bef2 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None and orig_wrapped_span is None: + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index 82b4f97dc92f..e2a5c92e60b9 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -145,4 +145,7 @@ async def test_span_with_opencensus_complicated(value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert not parent.children[3].children + assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" + assert parent.children[3].children[1].span_data.name == "MockClient.make_request" + children = parent.children[1].children + assert len(children) == 2 diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index 764c09396255..eedd34c0afdd 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -177,4 +177,7 @@ def test_span_with_opencensus_complicated(self, value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert not parent.children[3].children + assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" + assert parent.children[3].children[1].span_data.name == "MockClient.make_request" + children = parent.children[1].children + assert len(children) == 2 From 91830e6328ec095bd52e26c4abb1f111cdae899a Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Mon, 29 Jul 2019 14:05:36 -0700 Subject: [PATCH 225/244] decorator only trace very top level function (#6530) --- sdk/core/azure-core/azure/core/tracing/decorator.py | 2 +- sdk/core/azure-core/azure/core/tracing/decorator_async.py | 2 +- .../azure_core_asynctests/test_tracing_decorator_async.py | 5 +---- sdk/core/azure-core/tests/test_tracing_decorator.py | 5 +---- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 7d5d7bfce407..3986dcaf31ed 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 781e20a6bef2..4df65fee77ef 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index e2a5c92e60b9..82b4f97dc92f 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -145,7 +145,4 @@ async def test_span_with_opencensus_complicated(value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index eedd34c0afdd..764c09396255 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -177,7 +177,4 @@ def test_span_with_opencensus_complicated(self, value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children From a0f4fcbef54cc5a373a197a7918ab8a4494a357e Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 08:51:19 -0700 Subject: [PATCH 226/244] Synchronous username/password auth (#6416) --- .../azure/identity/_internal/__init__.py | 1 - .../azure-identity/tests/test_identity.py | 68 ------------------- 2 files changed, 69 deletions(-) diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index e7583139395b..cfdf935b801c 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,6 +2,5 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from .auth_code_redirect_handler import AuthCodeRedirectServer from .msal_credentials import ConfidentialClientCredential, PublicClientCredential from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 3aaa54a1f28f..8e7245522519 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -22,7 +22,6 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, - InteractiveBrowserCredential, UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential @@ -244,73 +243,6 @@ def test_default_credential(): DefaultAzureCredential() -@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser -def test_interactive_credential(): - oauth_state = "state" - expected_token = "access-token" - - transport = validating_transport( - requests=[Request()] * 2, # not validating requests because they're formed by MSAL - responses=[ - # expecting tenant discovery then a token request - mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), - mock_response( - json_payload={ - "access_token": expected_token, - "expires_in": 42, - "token_type": "Bearer", - "ext_expires_in": 42, - } - ), - ], - ) - - # mock local server fakes successful authentication by immediately returning a well-formed response - auth_code_response = {"code": "authorization-code", "state": [oauth_state]} - server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) - - credential = InteractiveBrowserCredential( - client_id="guid", - client_secret="secret", - server_class=server_class, - transport=transport, - instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request - ) - - # ensure the request beginning the flow has a known state value - with patch("azure.identity.browser_auth.uuid.uuid4", lambda: oauth_state): - token = credential.get_token("scope") - assert token.token == expected_token - - -@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser -def test_interactive_credential_timeout(): - # mock transport handles MSAL's tenant discovery - transport = Mock( - send=lambda _, **__: mock_response( - json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"} - ) - ) - - # mock local server blocks long enough to exceed the timeout - timeout = 1 - server_instance = Mock(wait_for_redirect=functools.partial(time.sleep, timeout + 1)) - server_class = Mock(return_value=server_instance) - - credential = InteractiveBrowserCredential( - client_id="guid", - client_secret="secret", - server_class=server_class, - timeout=timeout, - transport=transport, - instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request - ) - - with pytest.raises(ClientAuthenticationError) as ex: - credential.get_token("scope") - assert "timed out" in ex.value.message.lower() - - def test_username_password_credential(): expected_token = "access-token" transport = validating_transport( From 5929f2e00ea3b978c381dd48cc6b28d8976f1b61 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 14:04:30 -0700 Subject: [PATCH 227/244] Synchronous interactive browser authentication (#6466) --- .../azure/identity/_internal/__init__.py | 1 + .../azure-identity/tests/test_identity.py | 68 +++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index cfdf935b801c..e7583139395b 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,5 +2,6 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +from .auth_code_redirect_handler import AuthCodeRedirectServer from .msal_credentials import ConfidentialClientCredential, PublicClientCredential from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 8e7245522519..3aaa54a1f28f 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -22,6 +22,7 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, + InteractiveBrowserCredential, UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential @@ -243,6 +244,73 @@ def test_default_credential(): DefaultAzureCredential() +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential(): + oauth_state = "state" + expected_token = "access-token" + + transport = validating_transport( + requests=[Request()] * 2, # not validating requests because they're formed by MSAL + responses=[ + # expecting tenant discovery then a token request + mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), + mock_response( + json_payload={ + "access_token": expected_token, + "expires_in": 42, + "token_type": "Bearer", + "ext_expires_in": 42, + } + ), + ], + ) + + # mock local server fakes successful authentication by immediately returning a well-formed response + auth_code_response = {"code": "authorization-code", "state": [oauth_state]} + server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + # ensure the request beginning the flow has a known state value + with patch("azure.identity.browser_auth.uuid.uuid4", lambda: oauth_state): + token = credential.get_token("scope") + assert token.token == expected_token + + +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential_timeout(): + # mock transport handles MSAL's tenant discovery + transport = Mock( + send=lambda _, **__: mock_response( + json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"} + ) + ) + + # mock local server blocks long enough to exceed the timeout + timeout = 1 + server_instance = Mock(wait_for_redirect=functools.partial(time.sleep, timeout + 1)) + server_class = Mock(return_value=server_instance) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + timeout=timeout, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + with pytest.raises(ClientAuthenticationError) as ex: + credential.get_token("scope") + assert "timed out" in ex.value.message.lower() + + def test_username_password_credential(): expected_token = "access-token" transport = validating_transport( From a0c3fb51ebe7ca77c92d9fdacff82f28d829e65d Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Tue, 30 Jul 2019 20:19:31 -0700 Subject: [PATCH 228/244] KV aiohttp by default (#6563) * Aiohttp default async transport * Record keys with aiohttp * Record secrets with aiohttp --- .../azure/keyvault/secrets/_shared/async_client_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 0119ef5a6e44..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport +from azure.core.pipeline.transport import AsyncHttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient From 30b8199b25a4aad2065d2f5539dd9fa87aa453f1 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 10:27:22 -0700 Subject: [PATCH 229/244] KV moved paging return type to ItemPaged (#6558) * KV with latest autorest * Make KV return ItemPaged from azure-core --- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../keys/_shared/async_client_base.py | 19 ----- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../secrets/_shared/async_client_base.py | 19 ----- 10 files changed, 416 insertions(+), 142 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, From bd58dd1d03b172490f7b6a234fcdaae8a1b38022 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:40:30 -0700 Subject: [PATCH 230/244] Remove docdb mgmt package from master (#6585) --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 - sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 - sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 - .../azure-mgmt-documentdb/azure/__init__.py | 1 - .../azure/mgmt/__init__.py | 1 - .../azure/mgmt/documentdb/__init__.py | 18 - .../azure/mgmt/documentdb/document_db.py | 83 -- .../azure/mgmt/documentdb/models/__init__.py | 52 - .../documentdb/models/consistency_policy.py | 50 - .../documentdb/models/database_account.py | 117 --- .../database_account_connection_string.py | 39 - ...tabase_account_create_update_parameters.py | 90 -- ..._account_list_connection_strings_result.py | 29 - .../database_account_list_keys_result.py | 53 - ...base_account_list_read_only_keys_result.py | 41 - .../models/database_account_paged.py | 27 - .../database_account_patch_parameters.py | 31 - ...abase_account_regenerate_key_parameters.py | 33 - .../documentdb/models/document_db_enums.py | 41 - .../documentdb/models/failover_policies.py | 28 - .../mgmt/documentdb/models/failover_policy.py | 48 - .../azure/mgmt/documentdb/models/location.py | 58 -- .../azure/mgmt/documentdb/models/resource.py | 54 -- .../mgmt/documentdb/operations/__init__.py | 16 - .../database_accounts_operations.py | 918 ------------------ .../azure/mgmt/documentdb/version.py | 13 - .../azure_bdist_wheel.py | 54 -- sdk/cosmos/azure-mgmt-documentdb/build.json | 5 - .../dev_requirements.txt | 1 - .../azure-mgmt-documentdb/sdk_packaging.toml | 2 - sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 - sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 -- ..._mgmt_documentdb.test_accounts_create.yaml | 193 ---- ..._mgmt_documentdb.test_accounts_delete.yaml | 467 --------- ...gmt_documentdb.test_accounts_features.yaml | 272 ------ .../tests/test_mgmt_documentdb.py | 146 --- 36 files changed, 3147 deletions(-) delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst deleted file mode 100644 index eb7345b4071e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. :changelog: - -Release History -=============== - -0.1.3 (2017-05-02) -++++++++++++++++++ - -* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix - -0.1.2 (2017-04-20) -++++++++++++++++++ - -This wheel package is now built with the azure wheel extension - -0.1.1 (2017-03-21) -++++++++++++++++++ - -* Added support for listing database account connection strings - -0.1.0 (2017-01-31) -++++++++++++++++++ - -* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in deleted file mode 100644 index 9ecaeb15de50..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst deleted file mode 100644 index a5204ea75358..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/README.rst +++ /dev/null @@ -1,52 +0,0 @@ -Microsoft Azure SDK for Python -============================== - -This is the Microsoft Azure DocumentDB Management Client Library. - -Azure Resource Manager (ARM) is the next generation of management APIs that -replace the old Azure Service Management (ASM). - -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. - -For the older Azure Service Management (ASM) libraries, see -`azure-servicemanagement-legacy `__ library. - -For a more complete set of Azure libraries, see the `azure `__ bundle package. - - -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - -Usage -===== - -For code examples, see `DocumentDB Management -`__ -on readthedocs.org. - - -Provide Feedback -================ - -If you encounter any bugs or have suggestions, please file an issue in the -`Issues `__ -section of the project. - - -.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py deleted file mode 100755 index 3ec900145f1e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .document_db import DocumentDB -from .version import VERSION - -__all__ = ['DocumentDB'] - -__version__ = VERSION - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py deleted file mode 100755 index 5eda44ab3e32..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import ServiceClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.database_accounts_operations import DatabaseAccountsOperations -from . import models - - -class DocumentDBConfiguration(AzureConfiguration): - """Configuration for DocumentDB - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") - if not base_url: - base_url = 'https://management.azure.com' - - super(DocumentDBConfiguration, self).__init__(base_url) - - self.add_user_agent('documentdb/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class DocumentDB(object): - """Azure DocumentDB Database Service Resource Provider REST API - - :ivar config: Configuration for client. - :vartype config: DocumentDBConfiguration - - :ivar database_accounts: DatabaseAccounts operations - :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2015-04-08' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.database_accounts = DatabaseAccountsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py deleted file mode 100755 index 2ed68c568a84..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .consistency_policy import ConsistencyPolicy -from .location import Location -from .failover_policy import FailoverPolicy -from .database_account import DatabaseAccount -from .failover_policies import FailoverPolicies -from .resource import Resource -from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters -from .database_account_patch_parameters import DatabaseAccountPatchParameters -from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult -from .database_account_list_keys_result import DatabaseAccountListKeysResult -from .database_account_connection_string import DatabaseAccountConnectionString -from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult -from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters -from .database_account_paged import DatabaseAccountPaged -from .document_db_enums import ( - DatabaseAccountKind, - DatabaseAccountOfferType, - DefaultConsistencyLevel, - KeyKind, -) - -__all__ = [ - 'ConsistencyPolicy', - 'Location', - 'FailoverPolicy', - 'DatabaseAccount', - 'FailoverPolicies', - 'Resource', - 'DatabaseAccountCreateUpdateParameters', - 'DatabaseAccountPatchParameters', - 'DatabaseAccountListReadOnlyKeysResult', - 'DatabaseAccountListKeysResult', - 'DatabaseAccountConnectionString', - 'DatabaseAccountListConnectionStringsResult', - 'DatabaseAccountRegenerateKeyParameters', - 'DatabaseAccountPaged', - 'DatabaseAccountKind', - 'DatabaseAccountOfferType', - 'DefaultConsistencyLevel', - 'KeyKind', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py deleted file mode 100755 index d8cefd4c0b59..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConsistencyPolicy(Model): - """The consistency policy for the DocumentDB database account. - - :param default_consistency_level: The default consistency level and - configuration settings of the DocumentDB account. Possible values include: - 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' - :type default_consistency_level: str or :class:`DefaultConsistencyLevel - ` - :param max_staleness_prefix: When used with the Bounded Staleness - consistency level, this value represents the number of stale requests - tolerated. Accepted range for this value is 1 – 2,147,483,647. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_staleness_prefix: long - :param max_interval_in_seconds: When used with the Bounded Staleness - consistency level, this value represents the time amount of staleness (in - seconds) tolerated. Accepted range for this value is 1 - 100. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_interval_in_seconds: int - """ - - _validation = { - 'default_consistency_level': {'required': True}, - 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, - 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, - 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, - 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, - } - - def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): - self.default_consistency_level = default_consistency_level - self.max_staleness_prefix = max_staleness_prefix - self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py deleted file mode 100755 index 89031adc35cb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccount(Resource): - """A DocumentDB database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param provisioning_state: - :type provisioning_state: str - :ivar document_endpoint: The connection endpoint for the DocumentDB - database account. - :vartype document_endpoint: str - :ivar database_account_offer_type: The offer type for the DocumentDB - database account. Default value: Standard. Possible values include: - 'Standard' - :vartype database_account_offer_type: str or - :class:`DatabaseAccountOfferType - ` - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - :param consistency_policy: The consistency policy for the DocumentDB - database account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :ivar write_locations: An array that contains the write location for the - DocumentDB account. - :vartype write_locations: list of :class:`Location - ` - :ivar read_locations: An array that contains of the read locations enabled - for the DocumentDB account. - :vartype read_locations: list of :class:`Location - ` - :ivar failover_policies: An array that contains the regions ordered by - their failover priorities. - :vartype failover_policies: list of :class:`FailoverPolicy - ` - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'document_endpoint': {'readonly': True}, - 'database_account_offer_type': {'readonly': True}, - 'write_locations': {'readonly': True}, - 'read_locations': {'readonly': True}, - 'failover_policies': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, - 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, - 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): - super(DatabaseAccount, self).__init__(location=location, tags=tags) - self.kind = kind - self.provisioning_state = provisioning_state - self.document_endpoint = None - self.database_account_offer_type = None - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover - self.consistency_policy = consistency_policy - self.write_locations = None - self.read_locations = None - self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py deleted file mode 100755 index db1828208069..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountConnectionString(Model): - """Connection string for the DocumentDB account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar connection_string: Value of the connection string - :vartype connection_string: str - :ivar description: Description of the connection string - :vartype description: str - """ - - _validation = { - 'connection_string': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self): - self.connection_string = None - self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py deleted file mode 100755 index 30978f482f0b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccountCreateUpdateParameters(Resource): - """Parameters to create and update DocumentDB database accounts. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param consistency_policy: The consistency policy for the DocumentDB - account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :param locations: An array that contains the georeplication locations - enabled for the DocumentDB account. - :type locations: list of :class:`Location - ` - :ivar database_account_offer_type: Default value: "Standard" . - :vartype database_account_offer_type: str - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - } - - database_account_offer_type = "Standard" - - def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): - super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) - self.kind = kind - self.consistency_policy = consistency_policy - self.locations = locations - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py deleted file mode 100755 index 7cddc00a3de1..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListConnectionStringsResult(Model): - """The connection strings for the given database account. - - :param connection_strings: An array that contains the connection strings - for the DocumentDB account. - :type connection_strings: list of :class:`DatabaseAccountConnectionString - ` - """ - - _attribute_map = { - 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, - } - - def __init__(self, connection_strings=None): - self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py deleted file mode 100755 index 4d775054ac14..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListKeysResult(Model): - """The access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_master_key: Base 64 encoded value of the primary read-write - key. - :vartype primary_master_key: str - :ivar secondary_master_key: Base 64 encoded value of the secondary - read-write key. - :vartype secondary_master_key: str - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_master_key': {'readonly': True}, - 'secondary_master_key': {'readonly': True}, - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, - 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, - 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_master_key = None - self.secondary_master_key = None - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py deleted file mode 100755 index 3330353950c6..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListReadOnlyKeysResult(Model): - """The read-only access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py deleted file mode 100755 index 4cb94909c515..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseAccountPaged(Paged): - """ - A paging container for iterating over a list of DatabaseAccount object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py deleted file mode 100755 index be78a4fd6817..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountPatchParameters(Model): - """Parameters for patching Azure DocumentDB database account properties. - - :param tags: - :type tags: dict - """ - - _validation = { - 'tags': {'required': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, tags): - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py deleted file mode 100755 index 3bff90d33db3..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountRegenerateKeyParameters(Model): - """Parameters to regenerate the keys within the database account. - - :param key_kind: The access key to regenerate. Possible values include: - 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - """ - - _validation = { - 'key_kind': {'required': True}, - } - - _attribute_map = { - 'key_kind': {'key': 'keyKind', 'type': 'str'}, - } - - def __init__(self, key_kind): - self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py deleted file mode 100755 index 1e87cecaeb2a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class DatabaseAccountKind(Enum): - - global_document_db = "GlobalDocumentDB" - mongo_db = "MongoDB" - parse = "Parse" - - -class DatabaseAccountOfferType(Enum): - - standard = "Standard" - - -class DefaultConsistencyLevel(Enum): - - eventual = "Eventual" - session = "Session" - bounded_staleness = "BoundedStaleness" - strong = "Strong" - consistent_prefix = "ConsistentPrefix" - - -class KeyKind(Enum): - - primary = "primary" - secondary = "secondary" - primary_readonly = "primaryReadonly" - secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py deleted file mode 100755 index 4c3ebff5e3b5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicies(Model): - """The list of new failover policies for the failover priority change. - - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - """ - - _attribute_map = { - 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, failover_policies=None): - self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py deleted file mode 100755 index 99cc2769403b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicy(Model): - """The failover policy for a given region of a database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region in which the database - account replicates to. Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region in which the database account - exists. - :type location_name: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py deleted file mode 100755 index 8bc82bde2c3f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Location(Model): - """A region in which the Azure DocumentDB database account is deployed. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region within the database account. - Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region. - :type location_name: str - :ivar document_endpoint: The connection endpoint for the specific region. - Example: - https://<accountName>-<locationName>.documents.azure.com:443/ - :vartype document_endpoint: str - :param provisioning_state: - :type provisioning_state: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.document_endpoint = None - self.provisioning_state = provisioning_state - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py deleted file mode 100755 index d5e887d0b78a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """A database account resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, location, tags=None): - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py deleted file mode 100755 index 27ed7c069537..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .database_accounts_operations import DatabaseAccountsOperations - -__all__ = [ - 'DatabaseAccountsOperations', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py deleted file mode 100755 index 2bb39b1f6839..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py +++ /dev/null @@ -1,918 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrestazure.azure_operation import AzureOperationPoller -import uuid - -from .. import models - - -class DatabaseAccountsOperations(object): - """DatabaseAccountsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". - """ - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-04-08" - - self.config = config - - def get( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Retrieves the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def patch( - self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): - """Patches the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param tags: - :type tags: dict - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - update_parameters = models.DatabaseAccountPatchParameters(tags=tags) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(update_parameters, 'DatabaseAccountPatchParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.patch(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def create_or_update( - self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): - """Creates or updates an Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param create_update_parameters: The parameters to provide for the - current database account. - :type create_update_parameters: - :class:`DatabaseAccountCreateUpdateParameters - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def delete( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Deletes an existing Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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 - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - def long_running_send(): - - request = self._client.delete(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def failover_priority_change( - self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): - """Changes the failover priority for the Azure DocumentDB database - account. A failover priority of 0 indicates a write region. The maximum - value for a failover priority = (total number of regions - 1). Failover - priority values must be unique for each of the regions in which the - database account exists. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(failover_parameters, 'FailoverPolicies') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - subscription. - - :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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - given resource group. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the access keys for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_connection_strings( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the connection strings for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListConnectionStringsResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_read_only_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the read-only access keys for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListReadOnlyKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def regenerate_key( - self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): - """Regenerates an access key for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param key_kind: The access key to regenerate. Possible values - include: 'primary', 'secondary', 'primaryReadonly', - 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def check_name_exists( - self, account_name, custom_headers=None, raw=False, **operation_config): - """Checks that the Azure DocumentDB account name already exists. A valid - account name may contain only lowercase letters, numbers, and the '-' - character, and must be between 3 and 50 characters. - - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: bool - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' - path_format_arguments = { - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.head(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = (response.status_code == 200) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py deleted file mode 100755 index 95ed79d29108..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.3" - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -from distutils import log as logger -import os.path - -from wheel.bdist_wheel import bdist_wheel -class azure_bdist_wheel(bdist_wheel): - """The purpose of this class is to build wheel a little differently than the sdist, - without requiring to build the wheel from the sdist (i.e. you can build the wheel - directly from source). - """ - - description = "Create an Azure wheel distribution" - - user_options = bdist_wheel.user_options + \ - [('azure-namespace-package=', None, - "Name of the deepest nspkg used")] - - def initialize_options(self): - bdist_wheel.initialize_options(self) - self.azure_namespace_package = None - - def finalize_options(self): - bdist_wheel.finalize_options(self) - if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): - raise ValueError("azure_namespace_package must finish by -nspkg") - - def run(self): - if not self.distribution.install_requires: - self.distribution.install_requires = [] - self.distribution.install_requires.append( - "{}>=2.0.0".format(self.azure_namespace_package)) - bdist_wheel.run(self) - - def write_record(self, bdist_dir, distinfo_dir): - if self.azure_namespace_package: - # Split and remove last part, assuming it's "nspkg" - subparts = self.azure_namespace_package.split('-')[0:-1] - folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] - for azure_sub_package in folder_with_init: - init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') - if os.path.isfile(init_file): - logger.info("manually remove {} while building the wheel".format(init_file)) - os.remove(init_file) - else: - raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) - bdist_wheel.write_record(self, bdist_dir, distinfo_dir) -cmdclass = { - 'bdist_wheel': azure_bdist_wheel, -} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json deleted file mode 100644 index 4d98fc12a39e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/build.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "autorest": "1.0.1-20170501-2300-nightly", - "date": "2017-05-01T20:13:42Z", - "version": "0.1.3" -} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt deleted file mode 100644 index 6ccb7f031ddd..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt +++ /dev/null @@ -1 +0,0 @@ --e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml deleted file mode 100644 index e7687fdae93b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml +++ /dev/null @@ -1,2 +0,0 @@ -[packaging] -auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg deleted file mode 100644 index 856f4164982c..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[bdist_wheel] -universal=1 -azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py deleted file mode 100644 index ddef54e31bb5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.py +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env python - -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup -try: - from azure_bdist_wheel import cmdclass -except ImportError: - from distutils import log as logger - logger.warn("Wheel is not available, disabling bdist_wheel hook") - cmdclass = {} - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-documentdb" -PACKAGE_PPRINT_NAME = "DocumentDB Management" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') - -# azure v0.x is not compatible with this package -# azure v0.x used to have a __version__ attribute (newer versions don't) -try: - import azure - try: - ver = azure.__version__ - raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' - ) - except AttributeError: - pass -except ImportError: - pass - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError('Cannot find version information') - -with open('README.rst', encoding='utf-8') as f: - readme = f.read() -with open('HISTORY.rst', encoding='utf-8') as f: - history = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + history, - license='MIT License', - author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', - classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'License :: OSI Approved :: MIT License', - ], - zip_safe=False, - packages=find_packages(), - install_requires=[ - 'msrestazure~=0.4.7', - 'azure-common~=1.1.5', - ], - cmdclass=cmdclass -) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml deleted file mode 100644 index d470d7f8673d..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml +++ /dev/null @@ -1,193 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] - method: HEAD - uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: ''} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['142'] - Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-ratelimit-remaining-tenant-reads: ['14999'] - x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] - status: {code: 404, message: NotFound} -- request: - body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], - "databaseAccountOfferType": "Standard"}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['121'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['910'] - x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Completed","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['33'] - x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml deleted file mode 100644 index e6f4e2348f8f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml +++ /dev/null @@ -1,467 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' - under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' - was not found."}}'} - headers: - Cache-Control: [no-cache] - Content-Length: ['214'] - Content-Type: [application/json; charset=utf-8] - Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-failure-cause: [gateway] - x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] - status: {code: 404, message: Not Found} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml deleted file mode 100644 index b2e4b82a9d9e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml +++ /dev/null @@ -1,272 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1144'] - x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1156'] - x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['2225'] - x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] - status: {code: 200, message: Ok} -- request: - body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['73'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 - response: - body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique - and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['170'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] - status: {code: 400, message: BadRequest} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 - response: - body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['239'] - x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] - status: {code: 200, message: Ok} -- request: - body: '{"keyKind": "primary"}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['22'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] - x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py deleted file mode 100644 index 902666a22cf0..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py +++ /dev/null @@ -1,146 +0,0 @@ -# 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. -#-------------------------------------------------------------------------- -import unittest - -import azure.mgmt.documentdb -from msrestazure.azure_exceptions import CloudError -from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer - - -class MgmtDocDBTest(AzureMgmtTestCase): - - def setUp(self): - super(MgmtDocDBTest, self).setUp() - self.client = self.create_mgmt_client( - azure.mgmt.documentdb.DocumentDB - ) - - @ResourceGroupPreparer() - def test_accounts_create(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtst') - - self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) - - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - account = async_docdb_create.result() - self.assertIsNotNone(account) - # Rest API issue - # self.assertEqual(account.name, account_name) - - @ResourceGroupPreparer() - def test_accounts_features(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtest') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - account = self.client.database_accounts.get( - resource_group.name, - account_name - ) - self.assertEqual(account.name, account_name) - - my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) - self.assertEqual(len(my_accounts), 1) - self.assertEqual(my_accounts[0].name, account_name) - - my_accounts = list(self.client.database_accounts.list()) - self.assertTrue(len(my_accounts) >= 1) - self.assertTrue(any(db.name == account_name for db in my_accounts)) - - # I guess we can make this test with no error, need to check with DocDB team - # This is an interesting test anyway, this implies that the serialization works - # and error message is available. Since this method does not return an object - # (i.e. no deserialization to test), this is a complete test. - # We are NOT here to test the RestAPI, but the Swagger file and Python code. - with self.assertRaises(CloudError) as cm: - async_change = self.client.database_accounts.failover_priority_change( - resource_group.name, - account_name, - [{ - 'location_name': self.region, - 'failover_priority': 0 - }] - ) - async_change.wait() - self.assertIn('Failover priorities must be unique', cm.exception.message) - - my_keys = self.client.database_accounts.list_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_master_key) - self.assertIsNotNone(my_keys.secondary_master_key) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - my_keys = self.client.database_accounts.list_read_only_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - async_regenerate = self.client.database_accounts.regenerate_key( - resource_group.name, - account_name, - "primary" - ) - async_regenerate.wait() - - @ResourceGroupPreparer() - def test_accounts_delete(self, resource_group, location): - account_name = self.get_resource_name('pydocumentdbtst') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - # Current implementation of msrestazure does not support 404 as a end of LRO delete - # https://github.com/Azure/msrestazure-for-python/issues/7 - async_delete = self.client.database_accounts.delete(resource_group.name, account_name) - try: - async_delete.wait() - except CloudError as err: - if err.response.status_code != 404: - raise - - -#------------------------------------------------------------------------------ -if __name__ == '__main__': - unittest.main() From ef2dd752e58f098516f4f50d5287d8c10f2b40c2 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:42:03 -0700 Subject: [PATCH 231/244] Revert "Remove docdb mgmt package from master (#6585)" (#6593) This reverts commit d2ed7d87997eac9b715ee9802c15349a12446b84. --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 + sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 + sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 + .../azure-mgmt-documentdb/azure/__init__.py | 1 + .../azure/mgmt/__init__.py | 1 + .../azure/mgmt/documentdb/__init__.py | 18 + .../azure/mgmt/documentdb/document_db.py | 83 ++ .../azure/mgmt/documentdb/models/__init__.py | 52 + .../documentdb/models/consistency_policy.py | 50 + .../documentdb/models/database_account.py | 117 +++ .../database_account_connection_string.py | 39 + ...tabase_account_create_update_parameters.py | 90 ++ ..._account_list_connection_strings_result.py | 29 + .../database_account_list_keys_result.py | 53 + ...base_account_list_read_only_keys_result.py | 41 + .../models/database_account_paged.py | 27 + .../database_account_patch_parameters.py | 31 + ...abase_account_regenerate_key_parameters.py | 33 + .../documentdb/models/document_db_enums.py | 41 + .../documentdb/models/failover_policies.py | 28 + .../mgmt/documentdb/models/failover_policy.py | 48 + .../azure/mgmt/documentdb/models/location.py | 58 ++ .../azure/mgmt/documentdb/models/resource.py | 54 ++ .../mgmt/documentdb/operations/__init__.py | 16 + .../database_accounts_operations.py | 918 ++++++++++++++++++ .../azure/mgmt/documentdb/version.py | 13 + .../azure_bdist_wheel.py | 54 ++ sdk/cosmos/azure-mgmt-documentdb/build.json | 5 + .../dev_requirements.txt | 1 + .../azure-mgmt-documentdb/sdk_packaging.toml | 2 + sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 + sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 ++ ..._mgmt_documentdb.test_accounts_create.yaml | 193 ++++ ..._mgmt_documentdb.test_accounts_delete.yaml | 467 +++++++++ ...gmt_documentdb.test_accounts_features.yaml | 272 ++++++ .../tests/test_mgmt_documentdb.py | 146 +++ 36 files changed, 3147 insertions(+) create mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in create mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json create mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt create mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst new file mode 100644 index 000000000000..eb7345b4071e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst @@ -0,0 +1,24 @@ +.. :changelog: + +Release History +=============== + +0.1.3 (2017-05-02) +++++++++++++++++++ + +* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix + +0.1.2 (2017-04-20) +++++++++++++++++++ + +This wheel package is now built with the azure wheel extension + +0.1.1 (2017-03-21) +++++++++++++++++++ + +* Added support for listing database account connection strings + +0.1.0 (2017-01-31) +++++++++++++++++++ + +* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in new file mode 100644 index 000000000000..9ecaeb15de50 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in @@ -0,0 +1,2 @@ +include *.rst +include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst new file mode 100644 index 000000000000..a5204ea75358 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/README.rst @@ -0,0 +1,52 @@ +Microsoft Azure SDK for Python +============================== + +This is the Microsoft Azure DocumentDB Management Client Library. + +Azure Resource Manager (ARM) is the next generation of management APIs that +replace the old Azure Service Management (ASM). + +This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. + +For the older Azure Service Management (ASM) libraries, see +`azure-servicemanagement-legacy `__ library. + +For a more complete set of Azure libraries, see the `azure `__ bundle package. + + +Compatibility +============= + +**IMPORTANT**: If you have an earlier version of the azure package +(version < 1.0), you should uninstall it before installing this package. + +You can check the version using pip: + +.. code:: shell + + pip freeze + +If you see azure==0.11.0 (or any version below 1.0), uninstall it first: + +.. code:: shell + + pip uninstall azure + + +Usage +===== + +For code examples, see `DocumentDB Management +`__ +on readthedocs.org. + + +Provide Feedback +================ + +If you encounter any bugs or have suggestions, please file an issue in the +`Issues `__ +section of the project. + + +.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py new file mode 100755 index 000000000000..3ec900145f1e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .document_db import DocumentDB +from .version import VERSION + +__all__ = ['DocumentDB'] + +__version__ = VERSION + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py new file mode 100755 index 000000000000..5eda44ab3e32 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import ServiceClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.database_accounts_operations import DatabaseAccountsOperations +from . import models + + +class DocumentDBConfiguration(AzureConfiguration): + """Configuration for DocumentDB + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not isinstance(subscription_id, str): + raise TypeError("Parameter 'subscription_id' must be str.") + if not base_url: + base_url = 'https://management.azure.com' + + super(DocumentDBConfiguration, self).__init__(base_url) + + self.add_user_agent('documentdb/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class DocumentDB(object): + """Azure DocumentDB Database Service Resource Provider REST API + + :ivar config: Configuration for client. + :vartype config: DocumentDBConfiguration + + :ivar database_accounts: DatabaseAccounts operations + :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) + self._client = ServiceClient(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2015-04-08' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.database_accounts = DatabaseAccountsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py new file mode 100755 index 000000000000..2ed68c568a84 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .consistency_policy import ConsistencyPolicy +from .location import Location +from .failover_policy import FailoverPolicy +from .database_account import DatabaseAccount +from .failover_policies import FailoverPolicies +from .resource import Resource +from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters +from .database_account_patch_parameters import DatabaseAccountPatchParameters +from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult +from .database_account_list_keys_result import DatabaseAccountListKeysResult +from .database_account_connection_string import DatabaseAccountConnectionString +from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult +from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters +from .database_account_paged import DatabaseAccountPaged +from .document_db_enums import ( + DatabaseAccountKind, + DatabaseAccountOfferType, + DefaultConsistencyLevel, + KeyKind, +) + +__all__ = [ + 'ConsistencyPolicy', + 'Location', + 'FailoverPolicy', + 'DatabaseAccount', + 'FailoverPolicies', + 'Resource', + 'DatabaseAccountCreateUpdateParameters', + 'DatabaseAccountPatchParameters', + 'DatabaseAccountListReadOnlyKeysResult', + 'DatabaseAccountListKeysResult', + 'DatabaseAccountConnectionString', + 'DatabaseAccountListConnectionStringsResult', + 'DatabaseAccountRegenerateKeyParameters', + 'DatabaseAccountPaged', + 'DatabaseAccountKind', + 'DatabaseAccountOfferType', + 'DefaultConsistencyLevel', + 'KeyKind', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py new file mode 100755 index 000000000000..d8cefd4c0b59 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConsistencyPolicy(Model): + """The consistency policy for the DocumentDB database account. + + :param default_consistency_level: The default consistency level and + configuration settings of the DocumentDB account. Possible values include: + 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' + :type default_consistency_level: str or :class:`DefaultConsistencyLevel + ` + :param max_staleness_prefix: When used with the Bounded Staleness + consistency level, this value represents the number of stale requests + tolerated. Accepted range for this value is 1 – 2,147,483,647. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_staleness_prefix: long + :param max_interval_in_seconds: When used with the Bounded Staleness + consistency level, this value represents the time amount of staleness (in + seconds) tolerated. Accepted range for this value is 1 - 100. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_interval_in_seconds: int + """ + + _validation = { + 'default_consistency_level': {'required': True}, + 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, + 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, + 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, + 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, + } + + def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): + self.default_consistency_level = default_consistency_level + self.max_staleness_prefix = max_staleness_prefix + self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py new file mode 100755 index 000000000000..89031adc35cb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py @@ -0,0 +1,117 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccount(Resource): + """A DocumentDB database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param provisioning_state: + :type provisioning_state: str + :ivar document_endpoint: The connection endpoint for the DocumentDB + database account. + :vartype document_endpoint: str + :ivar database_account_offer_type: The offer type for the DocumentDB + database account. Default value: Standard. Possible values include: + 'Standard' + :vartype database_account_offer_type: str or + :class:`DatabaseAccountOfferType + ` + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + :param consistency_policy: The consistency policy for the DocumentDB + database account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :ivar write_locations: An array that contains the write location for the + DocumentDB account. + :vartype write_locations: list of :class:`Location + ` + :ivar read_locations: An array that contains of the read locations enabled + for the DocumentDB account. + :vartype read_locations: list of :class:`Location + ` + :ivar failover_policies: An array that contains the regions ordered by + their failover priorities. + :vartype failover_policies: list of :class:`FailoverPolicy + ` + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'document_endpoint': {'readonly': True}, + 'database_account_offer_type': {'readonly': True}, + 'write_locations': {'readonly': True}, + 'read_locations': {'readonly': True}, + 'failover_policies': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, + 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, + 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): + super(DatabaseAccount, self).__init__(location=location, tags=tags) + self.kind = kind + self.provisioning_state = provisioning_state + self.document_endpoint = None + self.database_account_offer_type = None + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover + self.consistency_policy = consistency_policy + self.write_locations = None + self.read_locations = None + self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py new file mode 100755 index 000000000000..db1828208069 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountConnectionString(Model): + """Connection string for the DocumentDB account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar connection_string: Value of the connection string + :vartype connection_string: str + :ivar description: Description of the connection string + :vartype description: str + """ + + _validation = { + 'connection_string': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self): + self.connection_string = None + self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py new file mode 100755 index 000000000000..30978f482f0b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccountCreateUpdateParameters(Resource): + """Parameters to create and update DocumentDB database accounts. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param consistency_policy: The consistency policy for the DocumentDB + account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :param locations: An array that contains the georeplication locations + enabled for the DocumentDB account. + :type locations: list of :class:`Location + ` + :ivar database_account_offer_type: Default value: "Standard" . + :vartype database_account_offer_type: str + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'locations': {'required': True}, + 'database_account_offer_type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + } + + database_account_offer_type = "Standard" + + def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): + super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) + self.kind = kind + self.consistency_policy = consistency_policy + self.locations = locations + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py new file mode 100755 index 000000000000..7cddc00a3de1 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListConnectionStringsResult(Model): + """The connection strings for the given database account. + + :param connection_strings: An array that contains the connection strings + for the DocumentDB account. + :type connection_strings: list of :class:`DatabaseAccountConnectionString + ` + """ + + _attribute_map = { + 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, + } + + def __init__(self, connection_strings=None): + self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py new file mode 100755 index 000000000000..4d775054ac14 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListKeysResult(Model): + """The access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_master_key: Base 64 encoded value of the primary read-write + key. + :vartype primary_master_key: str + :ivar secondary_master_key: Base 64 encoded value of the secondary + read-write key. + :vartype secondary_master_key: str + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_master_key': {'readonly': True}, + 'secondary_master_key': {'readonly': True}, + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, + 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, + 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_master_key = None + self.secondary_master_key = None + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py new file mode 100755 index 000000000000..3330353950c6 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListReadOnlyKeysResult(Model): + """The read-only access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py new file mode 100755 index 000000000000..4cb94909c515 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class DatabaseAccountPaged(Paged): + """ + A paging container for iterating over a list of DatabaseAccount object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py new file mode 100755 index 000000000000..be78a4fd6817 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountPatchParameters(Model): + """Parameters for patching Azure DocumentDB database account properties. + + :param tags: + :type tags: dict + """ + + _validation = { + 'tags': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, tags): + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py new file mode 100755 index 000000000000..3bff90d33db3 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountRegenerateKeyParameters(Model): + """Parameters to regenerate the keys within the database account. + + :param key_kind: The access key to regenerate. Possible values include: + 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + """ + + _validation = { + 'key_kind': {'required': True}, + } + + _attribute_map = { + 'key_kind': {'key': 'keyKind', 'type': 'str'}, + } + + def __init__(self, key_kind): + self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py new file mode 100755 index 000000000000..1e87cecaeb2a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class DatabaseAccountKind(Enum): + + global_document_db = "GlobalDocumentDB" + mongo_db = "MongoDB" + parse = "Parse" + + +class DatabaseAccountOfferType(Enum): + + standard = "Standard" + + +class DefaultConsistencyLevel(Enum): + + eventual = "Eventual" + session = "Session" + bounded_staleness = "BoundedStaleness" + strong = "Strong" + consistent_prefix = "ConsistentPrefix" + + +class KeyKind(Enum): + + primary = "primary" + secondary = "secondary" + primary_readonly = "primaryReadonly" + secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py new file mode 100755 index 000000000000..4c3ebff5e3b5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicies(Model): + """The list of new failover policies for the failover priority change. + + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + """ + + _attribute_map = { + 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, failover_policies=None): + self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py new file mode 100755 index 000000000000..99cc2769403b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicy(Model): + """The failover policy for a given region of a database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region in which the database + account replicates to. Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region in which the database account + exists. + :type location_name: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py new file mode 100755 index 000000000000..8bc82bde2c3f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Location(Model): + """A region in which the Azure DocumentDB database account is deployed. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region within the database account. + Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region. + :type location_name: str + :ivar document_endpoint: The connection endpoint for the specific region. + Example: + https://<accountName>-<locationName>.documents.azure.com:443/ + :vartype document_endpoint: str + :param provisioning_state: + :type provisioning_state: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'document_endpoint': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.document_endpoint = None + self.provisioning_state = provisioning_state + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py new file mode 100755 index 000000000000..d5e887d0b78a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """A database account resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, location, tags=None): + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py new file mode 100755 index 000000000000..27ed7c069537 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py @@ -0,0 +1,16 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .database_accounts_operations import DatabaseAccountsOperations + +__all__ = [ + 'DatabaseAccountsOperations', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py new file mode 100755 index 000000000000..2bb39b1f6839 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py @@ -0,0 +1,918 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrestazure.azure_operation import AzureOperationPoller +import uuid + +from .. import models + + +class DatabaseAccountsOperations(object): + """DatabaseAccountsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". + """ + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-04-08" + + self.config = config + + def get( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Retrieves the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def patch( + self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): + """Patches the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param tags: + :type tags: dict + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + update_parameters = models.DatabaseAccountPatchParameters(tags=tags) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(update_parameters, 'DatabaseAccountPatchParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.patch(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def create_or_update( + self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates an Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param create_update_parameters: The parameters to provide for the + current database account. + :type create_update_parameters: + :class:`DatabaseAccountCreateUpdateParameters + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.put(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def delete( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Deletes an existing Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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 + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + def long_running_send(): + + request = self._client.delete(url, query_parameters) + return self._client.send(request, header_parameters, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def failover_priority_change( + self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): + """Changes the failover priority for the Azure DocumentDB database + account. A failover priority of 0 indicates a write region. The maximum + value for a failover priority = (total number of regions - 1). Failover + priority values must be unique for each of the regions in which the + database account exists. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(failover_parameters, 'FailoverPolicies') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + subscription. + + :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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + given resource group. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the access keys for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_connection_strings( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the connection strings for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListConnectionStringsResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_read_only_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the read-only access keys for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListReadOnlyKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def regenerate_key( + self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): + """Regenerates an access key for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param key_kind: The access key to regenerate. Possible values + include: 'primary', 'secondary', 'primaryReadonly', + 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def check_name_exists( + self, account_name, custom_headers=None, raw=False, **operation_config): + """Checks that the Azure DocumentDB account name already exists. A valid + account name may contain only lowercase letters, numbers, and the '-' + character, and must be between 3 and 50 characters. + + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: bool + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' + path_format_arguments = { + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.head(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = (response.status_code == 200) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py new file mode 100755 index 000000000000..95ed79d29108 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.3" + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py new file mode 100644 index 000000000000..8a81d1b61775 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py @@ -0,0 +1,54 @@ +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +from distutils import log as logger +import os.path + +from wheel.bdist_wheel import bdist_wheel +class azure_bdist_wheel(bdist_wheel): + """The purpose of this class is to build wheel a little differently than the sdist, + without requiring to build the wheel from the sdist (i.e. you can build the wheel + directly from source). + """ + + description = "Create an Azure wheel distribution" + + user_options = bdist_wheel.user_options + \ + [('azure-namespace-package=', None, + "Name of the deepest nspkg used")] + + def initialize_options(self): + bdist_wheel.initialize_options(self) + self.azure_namespace_package = None + + def finalize_options(self): + bdist_wheel.finalize_options(self) + if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): + raise ValueError("azure_namespace_package must finish by -nspkg") + + def run(self): + if not self.distribution.install_requires: + self.distribution.install_requires = [] + self.distribution.install_requires.append( + "{}>=2.0.0".format(self.azure_namespace_package)) + bdist_wheel.run(self) + + def write_record(self, bdist_dir, distinfo_dir): + if self.azure_namespace_package: + # Split and remove last part, assuming it's "nspkg" + subparts = self.azure_namespace_package.split('-')[0:-1] + folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] + for azure_sub_package in folder_with_init: + init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') + if os.path.isfile(init_file): + logger.info("manually remove {} while building the wheel".format(init_file)) + os.remove(init_file) + else: + raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) + bdist_wheel.write_record(self, bdist_dir, distinfo_dir) +cmdclass = { + 'bdist_wheel': azure_bdist_wheel, +} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json new file mode 100644 index 000000000000..4d98fc12a39e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/build.json @@ -0,0 +1,5 @@ +{ + "autorest": "1.0.1-20170501-2300-nightly", + "date": "2017-05-01T20:13:42Z", + "version": "0.1.3" +} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt new file mode 100644 index 000000000000..6ccb7f031ddd --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt @@ -0,0 +1 @@ +-e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml new file mode 100644 index 000000000000..e7687fdae93b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg new file mode 100644 index 000000000000..856f4164982c --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg @@ -0,0 +1,3 @@ +[bdist_wheel] +universal=1 +azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py new file mode 100644 index 000000000000..ddef54e31bb5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup +try: + from azure_bdist_wheel import cmdclass +except ImportError: + from distutils import log as logger + logger.warn("Wheel is not available, disabling bdist_wheel hook") + cmdclass = {} + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-documentdb" +PACKAGE_PPRINT_NAME = "DocumentDB Management" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.rst', encoding='utf-8') as f: + readme = f.read() +with open('HISTORY.rst', encoding='utf-8') as f: + history = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + history, + license='MIT License', + author='Microsoft Corporation', + author_email='ptvshelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(), + install_requires=[ + 'msrestazure~=0.4.7', + 'azure-common~=1.1.5', + ], + cmdclass=cmdclass +) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml new file mode 100644 index 000000000000..d470d7f8673d --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml @@ -0,0 +1,193 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] + method: HEAD + uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: ''} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['142'] + Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-ratelimit-remaining-tenant-reads: ['14999'] + x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] + status: {code: 404, message: NotFound} +- request: + body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], + "databaseAccountOfferType": "Standard"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['121'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['910'] + x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Completed","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['33'] + x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml new file mode 100644 index 000000000000..e6f4e2348f8f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml @@ -0,0 +1,467 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' + under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' + was not found."}}'} + headers: + Cache-Control: [no-cache] + Content-Length: ['214'] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-failure-cause: [gateway] + x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] + status: {code: 404, message: Not Found} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml new file mode 100644 index 000000000000..b2e4b82a9d9e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml @@ -0,0 +1,272 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1144'] + x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1156'] + x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2225'] + x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] + status: {code: 200, message: Ok} +- request: + body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['73'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 + response: + body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique + and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['170'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] + status: {code: 400, message: BadRequest} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 + response: + body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['239'] + x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] + status: {code: 200, message: Ok} +- request: + body: '{"keyKind": "primary"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['22'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] + x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py new file mode 100644 index 000000000000..902666a22cf0 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py @@ -0,0 +1,146 @@ +# 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. +#-------------------------------------------------------------------------- +import unittest + +import azure.mgmt.documentdb +from msrestazure.azure_exceptions import CloudError +from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer + + +class MgmtDocDBTest(AzureMgmtTestCase): + + def setUp(self): + super(MgmtDocDBTest, self).setUp() + self.client = self.create_mgmt_client( + azure.mgmt.documentdb.DocumentDB + ) + + @ResourceGroupPreparer() + def test_accounts_create(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtst') + + self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) + + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + account = async_docdb_create.result() + self.assertIsNotNone(account) + # Rest API issue + # self.assertEqual(account.name, account_name) + + @ResourceGroupPreparer() + def test_accounts_features(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtest') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + account = self.client.database_accounts.get( + resource_group.name, + account_name + ) + self.assertEqual(account.name, account_name) + + my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) + self.assertEqual(len(my_accounts), 1) + self.assertEqual(my_accounts[0].name, account_name) + + my_accounts = list(self.client.database_accounts.list()) + self.assertTrue(len(my_accounts) >= 1) + self.assertTrue(any(db.name == account_name for db in my_accounts)) + + # I guess we can make this test with no error, need to check with DocDB team + # This is an interesting test anyway, this implies that the serialization works + # and error message is available. Since this method does not return an object + # (i.e. no deserialization to test), this is a complete test. + # We are NOT here to test the RestAPI, but the Swagger file and Python code. + with self.assertRaises(CloudError) as cm: + async_change = self.client.database_accounts.failover_priority_change( + resource_group.name, + account_name, + [{ + 'location_name': self.region, + 'failover_priority': 0 + }] + ) + async_change.wait() + self.assertIn('Failover priorities must be unique', cm.exception.message) + + my_keys = self.client.database_accounts.list_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_master_key) + self.assertIsNotNone(my_keys.secondary_master_key) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + my_keys = self.client.database_accounts.list_read_only_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + async_regenerate = self.client.database_accounts.regenerate_key( + resource_group.name, + account_name, + "primary" + ) + async_regenerate.wait() + + @ResourceGroupPreparer() + def test_accounts_delete(self, resource_group, location): + account_name = self.get_resource_name('pydocumentdbtst') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + # Current implementation of msrestazure does not support 404 as a end of LRO delete + # https://github.com/Azure/msrestazure-for-python/issues/7 + async_delete = self.client.database_accounts.delete(resource_group.name, account_name) + try: + async_delete.wait() + except CloudError as err: + if err.response.status_code != 404: + raise + + +#------------------------------------------------------------------------------ +if __name__ == '__main__': + unittest.main() From 1a6b9deb4a734886a4336c90e718cfd1e632940c Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 10:16:27 -0700 Subject: [PATCH 232/244] Update CODEOWNERS --- .github/CODEOWNERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 07d57ac48320..0172563e9a84 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -40,6 +40,9 @@ # Management Plane /**/*mgmt*/ @zikalino +# Management Plane +/**/*mgmt*/ @zikalino + ########### # Eng Sys ########### From 9d7777a9d9ba80cf5be0db049b7f69bfae079cda Mon Sep 17 00:00:00 2001 From: Scott Kurtzeborn Date: Thu, 25 Jul 2019 11:03:35 -0700 Subject: [PATCH 233/244] more code owners --- .github/CODEOWNERS | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0172563e9a84..07d57ac48320 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -40,9 +40,6 @@ # Management Plane /**/*mgmt*/ @zikalino -# Management Plane -/**/*mgmt*/ @zikalino - ########### # Eng Sys ########### From 95bd3e65a576177b781ea3985f410167b2d92f30 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 11:58:35 -0700 Subject: [PATCH 234/244] add policy and decorators for secrets (#6453) --- .../azure/keyvault/secrets/_shared/async_client_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 193e6e324c7e..c451ffb1e766 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncHttpTransport +from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient From 00d06bd77b995c17545379d8695369ec0789ccd1 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Thu, 25 Jul 2019 12:41:38 -0700 Subject: [PATCH 235/244] Paging v2 (#6420) * First version of paging * Clean sync paging * Async paging * Name AsyncList without underscore * MyPy happyness * pylint * black * PageIterator as conf * Simplify ItemPaged * Use chain to link iterable * Make Paging more open * Docstring * pylint / mypy / black * Regenerate KV with latest Autorest + Paging branch (#6479) * Regenerate KV with latest Autorest + Paging branch * Remove unused import in tests * Make the async adapter more generic * Regeneration after operation mixin fix in Autorest * COmmit changes forgotten in #6418 * Fixing syntax for 2.7 * Move Storage Queue to new Paging (#6447) * Move Storage Queue to new Paging * Working Storage queue on new paging * Fix types * First shot of blob tests update * Fixing blob tests * File to new paging * Doc fix * Feedbacks from @annatisch * Fix last @annatisch comment * Simplify paging contract * Fix storage queue after new paging contract --- .../_key_vault_client_operations_async.py | 60 ++++------------ .../_key_vault_client_operations.py | 60 ++++------------ .../_key_vault_client_operations_async.py | 70 ++++--------------- .../_key_vault_client_operations.py | 70 ++++--------------- .../keys/_shared/async_client_base.py | 19 +++++ .../_key_vault_client_operations_async.py | 60 ++++------------ .../_key_vault_client_operations.py | 60 ++++------------ .../_key_vault_client_operations_async.py | 70 ++++--------------- .../_key_vault_client_operations.py | 70 ++++--------------- .../secrets/_shared/async_client_base.py | 19 +++++ 10 files changed, 142 insertions(+), 416 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index b5cc965119ed..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 0ae7fd5fb025..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index 08e45c2b44a7..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index b9ed6e10ea21..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 193e6e324c7e..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -21,6 +21,25 @@ pass +class AsyncPagingAdapter: + """For each item in an AsyncIterator, returns the result of applying fn to that item. + Python 3.6 added syntax that could replace this (yield within async for).""" + + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: + self._pages = pages + self._fn = fn + + def __aiter__(self): + return self + + async def __anext__(self) -> Any: + item = await self._pages.__anext__() + if not item: + raise StopAsyncIteration + return self._fn(item) + # TODO: expected type Model got Coroutine instead? + + class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index b5cc965119ed..857e446e899c 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 0ae7fd5fb025..50a82e217aa9 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,10 +423,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -497,10 +494,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1180,10 +1174,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1687,10 +1678,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1761,10 +1749,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1832,10 +1817,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2188,10 +2170,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2485,10 +2464,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3560,10 +3533,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3798,10 +3768,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4191,10 +4158,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index 08e45c2b44a7..d11b4bd0e615 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, AsyncList(list_of_elem) + return deserialized.next_link, AsyncList(deserialized.value) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index b9ed6e10ea21..d52fb73651e7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,10 +422,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -496,10 +493,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1179,10 +1173,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1684,10 +1675,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1758,10 +1746,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -1829,10 +1814,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2190,10 +2172,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2487,10 +2466,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -2975,10 +2951,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3684,10 +3657,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3922,10 +3892,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -3993,10 +3960,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4670,10 +4634,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) @@ -4745,10 +4706,7 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link, iter(list_of_elem) + return deserialized.next_link, iter(deserialized.value) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index c451ffb1e766..0119ef5a6e44 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -21,6 +21,25 @@ pass +class AsyncPagingAdapter: + """For each item in an AsyncIterator, returns the result of applying fn to that item. + Python 3.6 added syntax that could replace this (yield within async for).""" + + def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: + self._pages = pages + self._fn = fn + + def __aiter__(self): + return self + + async def __anext__(self) -> Any: + item = await self._pages.__anext__() + if not item: + raise StopAsyncIteration + return self._fn(item) + # TODO: expected type Model got Coroutine instead? + + class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, From e8434670241fcd59450617ca398076dee67f687d Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Thu, 25 Jul 2019 15:48:49 -0700 Subject: [PATCH 236/244] get rid of should only propagate (#6497) --- sdk/core/azure-core/azure/core/tracing/decorator.py | 2 +- sdk/core/azure-core/azure/core/tracing/decorator_async.py | 2 +- .../azure_core_asynctests/test_tracing_decorator_async.py | 5 ++++- sdk/core/azure-core/tests/test_tracing_decorator.py | 5 ++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 3986dcaf31ed..7d5d7bfce407 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None and orig_wrapped_span is None: + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 4df65fee77ef..781e20a6bef2 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None and orig_wrapped_span is None: + if parent_span is not None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index 82b4f97dc92f..e2a5c92e60b9 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -145,4 +145,7 @@ async def test_span_with_opencensus_complicated(value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert not parent.children[3].children + assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" + assert parent.children[3].children[1].span_data.name == "MockClient.make_request" + children = parent.children[1].children + assert len(children) == 2 diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index 764c09396255..eedd34c0afdd 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -177,4 +177,7 @@ def test_span_with_opencensus_complicated(self, value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert not parent.children[3].children + assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" + assert parent.children[3].children[1].span_data.name == "MockClient.make_request" + children = parent.children[1].children + assert len(children) == 2 From d26f5906d6be38443f656d3d4dade3d54ecbb89d Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Mon, 29 Jul 2019 14:05:36 -0700 Subject: [PATCH 237/244] decorator only trace very top level function (#6530) --- sdk/core/azure-core/azure/core/tracing/decorator.py | 2 +- sdk/core/azure-core/azure/core/tracing/decorator_async.py | 2 +- .../azure_core_asynctests/test_tracing_decorator_async.py | 5 +---- sdk/core/azure-core/tests/test_tracing_decorator.py | 5 +---- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 7d5d7bfce407..3986dcaf31ed 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -48,7 +48,7 @@ def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 781e20a6bef2..4df65fee77ef 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -48,7 +48,7 @@ async def wrapper_use_tracer(self, *args, **kwargs): original_span_instance = wrapper_class.get_current_span() parent_span = common.get_parent_span(passed_in_parent) ans = None - if parent_span is not None: + if parent_span is not None and orig_wrapped_span is None: common.set_span_contexts(parent_span) name = name_of_span or self.__class__.__name__ + "." + func.__name__ child = parent_span.span(name=name) diff --git a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py index e2a5c92e60b9..82b4f97dc92f 100644 --- a/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py +++ b/sdk/core/azure-core/tests/azure_core_asynctests/test_tracing_decorator_async.py @@ -145,7 +145,4 @@ async def test_span_with_opencensus_complicated(value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index eedd34c0afdd..764c09396255 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -177,7 +177,4 @@ def test_span_with_opencensus_complicated(self, value): assert parent.children[2].span_data.name == "child" assert parent.children[2].children[0].span_data.name == "MockClient.make_request" assert parent.children[3].span_data.name == "MockClient.make_request" - assert parent.children[3].children[0].span_data.name == "MockClient.get_foo" - assert parent.children[3].children[1].span_data.name == "MockClient.make_request" - children = parent.children[1].children - assert len(children) == 2 + assert not parent.children[3].children From 854808a4c067c422d463e3489b2d13f97e788b0c Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 08:51:19 -0700 Subject: [PATCH 238/244] Synchronous username/password auth (#6416) --- .../azure/identity/_internal/__init__.py | 1 - .../azure-identity/tests/test_identity.py | 68 ------------------- 2 files changed, 69 deletions(-) diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index e7583139395b..cfdf935b801c 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,6 +2,5 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from .auth_code_redirect_handler import AuthCodeRedirectServer from .msal_credentials import ConfidentialClientCredential, PublicClientCredential from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 3aaa54a1f28f..8e7245522519 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -22,7 +22,6 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, - InteractiveBrowserCredential, UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential @@ -244,73 +243,6 @@ def test_default_credential(): DefaultAzureCredential() -@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser -def test_interactive_credential(): - oauth_state = "state" - expected_token = "access-token" - - transport = validating_transport( - requests=[Request()] * 2, # not validating requests because they're formed by MSAL - responses=[ - # expecting tenant discovery then a token request - mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), - mock_response( - json_payload={ - "access_token": expected_token, - "expires_in": 42, - "token_type": "Bearer", - "ext_expires_in": 42, - } - ), - ], - ) - - # mock local server fakes successful authentication by immediately returning a well-formed response - auth_code_response = {"code": "authorization-code", "state": [oauth_state]} - server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) - - credential = InteractiveBrowserCredential( - client_id="guid", - client_secret="secret", - server_class=server_class, - transport=transport, - instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request - ) - - # ensure the request beginning the flow has a known state value - with patch("azure.identity.browser_auth.uuid.uuid4", lambda: oauth_state): - token = credential.get_token("scope") - assert token.token == expected_token - - -@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser -def test_interactive_credential_timeout(): - # mock transport handles MSAL's tenant discovery - transport = Mock( - send=lambda _, **__: mock_response( - json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"} - ) - ) - - # mock local server blocks long enough to exceed the timeout - timeout = 1 - server_instance = Mock(wait_for_redirect=functools.partial(time.sleep, timeout + 1)) - server_class = Mock(return_value=server_instance) - - credential = InteractiveBrowserCredential( - client_id="guid", - client_secret="secret", - server_class=server_class, - timeout=timeout, - transport=transport, - instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request - ) - - with pytest.raises(ClientAuthenticationError) as ex: - credential.get_token("scope") - assert "timed out" in ex.value.message.lower() - - def test_username_password_credential(): expected_token = "access-token" transport = validating_transport( From 24bd7e1ca24c41801a057b2508848357f2732603 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 30 Jul 2019 14:04:30 -0700 Subject: [PATCH 239/244] Synchronous interactive browser authentication (#6466) --- .../azure/identity/_internal/__init__.py | 1 + .../azure-identity/tests/test_identity.py | 68 +++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py index cfdf935b801c..e7583139395b 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/__init__.py @@ -2,5 +2,6 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +from .auth_code_redirect_handler import AuthCodeRedirectServer from .msal_credentials import ConfidentialClientCredential, PublicClientCredential from .msal_transport_adapter import MsalTransportAdapter, MsalTransportResponse diff --git a/sdk/identity/azure-identity/tests/test_identity.py b/sdk/identity/azure-identity/tests/test_identity.py index 8e7245522519..3aaa54a1f28f 100644 --- a/sdk/identity/azure-identity/tests/test_identity.py +++ b/sdk/identity/azure-identity/tests/test_identity.py @@ -22,6 +22,7 @@ EnvironmentCredential, ManagedIdentityCredential, ChainedTokenCredential, + InteractiveBrowserCredential, UsernamePasswordCredential, ) from azure.identity._managed_identity import ImdsCredential @@ -243,6 +244,73 @@ def test_default_credential(): DefaultAzureCredential() +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential(): + oauth_state = "state" + expected_token = "access-token" + + transport = validating_transport( + requests=[Request()] * 2, # not validating requests because they're formed by MSAL + responses=[ + # expecting tenant discovery then a token request + mock_response(json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"}), + mock_response( + json_payload={ + "access_token": expected_token, + "expires_in": 42, + "token_type": "Bearer", + "ext_expires_in": 42, + } + ), + ], + ) + + # mock local server fakes successful authentication by immediately returning a well-formed response + auth_code_response = {"code": "authorization-code", "state": [oauth_state]} + server_class = Mock(return_value=Mock(wait_for_redirect=lambda: auth_code_response)) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + # ensure the request beginning the flow has a known state value + with patch("azure.identity.browser_auth.uuid.uuid4", lambda: oauth_state): + token = credential.get_token("scope") + assert token.token == expected_token + + +@patch("azure.identity.browser_auth.webbrowser.open", lambda _: None) # prevent the credential opening a browser +def test_interactive_credential_timeout(): + # mock transport handles MSAL's tenant discovery + transport = Mock( + send=lambda _, **__: mock_response( + json_payload={"authorization_endpoint": "https://a/b", "token_endpoint": "https://a/b"} + ) + ) + + # mock local server blocks long enough to exceed the timeout + timeout = 1 + server_instance = Mock(wait_for_redirect=functools.partial(time.sleep, timeout + 1)) + server_class = Mock(return_value=server_instance) + + credential = InteractiveBrowserCredential( + client_id="guid", + client_secret="secret", + server_class=server_class, + timeout=timeout, + transport=transport, + instance_discovery=False, # kwargs are passed to MSAL; this one prevents an AAD verification request + ) + + with pytest.raises(ClientAuthenticationError) as ex: + credential.get_token("scope") + assert "timed out" in ex.value.message.lower() + + def test_username_password_credential(): expected_token = "access-token" transport = validating_transport( From 6b1b91181da402c107384097131414ab702af1ed Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Tue, 30 Jul 2019 20:19:31 -0700 Subject: [PATCH 240/244] KV aiohttp by default (#6563) * Aiohttp default async transport * Record keys with aiohttp * Record secrets with aiohttp --- .../azure/keyvault/secrets/_shared/async_client_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 0119ef5a6e44..43368a0c6bc8 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -6,7 +6,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies.distributed_tracing import DistributedTracingPolicy -from azure.core.pipeline.transport import AsyncioRequestsTransport, HttpTransport +from azure.core.pipeline.transport import AsyncHttpTransport from msrest.serialization import Model from ._generated import KeyVaultClient From ae794b7cfc7d1c9c60fb518896a35f97735d1cbd Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 10:27:22 -0700 Subject: [PATCH 241/244] KV moved paging return type to ItemPaged (#6558) * KV with latest autorest * Make KV return ItemPaged from azure-core --- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../keys/_shared/async_client_base.py | 19 ----- .../_key_vault_client_operations_async.py | 60 ++++++++++++---- .../_key_vault_client_operations.py | 60 ++++++++++++---- .../_key_vault_client_operations_async.py | 70 +++++++++++++++---- .../_key_vault_client_operations.py | 70 +++++++++++++++---- .../secrets/_shared/async_client_base.py | 19 ----- 10 files changed, 416 insertions(+), 142 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py index 857e446e899c..b5cc965119ed 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/aio/operations_async/_key_vault_client_operations_async.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py index 50a82e217aa9..0ae7fd5fb025 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v2016_10_01/operations/_key_vault_client_operations.py @@ -423,7 +423,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -494,7 +497,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1174,7 +1180,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1678,7 +1687,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1749,7 +1761,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1817,7 +1832,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2170,7 +2188,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2464,7 +2485,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3533,7 +3560,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3768,7 +3798,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4158,7 +4191,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py index d11b4bd0e615..08e45c2b44a7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/aio/operations_async/_key_vault_client_operations_async.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): async def extract_data_async(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, AsyncList(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, AsyncList(list_of_elem) async def get_next_async(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py index d52fb73651e7..b9ed6e10ea21 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_generated/v7_0/operations/_key_vault_client_operations.py @@ -422,7 +422,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -493,7 +496,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('KeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1173,7 +1179,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedKeyListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1675,7 +1684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1746,7 +1758,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -1814,7 +1829,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSecretListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2172,7 +2190,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2466,7 +2487,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateIssuerListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -2951,7 +2975,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('CertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3657,7 +3684,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedCertificateListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3892,7 +3922,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('StorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -3960,7 +3993,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedStorageListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4634,7 +4670,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('SasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -4706,7 +4745,10 @@ def prepare_request(next_link=None): def extract_data(response): deserialized = self._deserialize('DeletedSasDefinitionListResult', response) - return deserialized.next_link, iter(deserialized.value) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py index 43368a0c6bc8..193e6e324c7e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py @@ -21,25 +21,6 @@ pass -class AsyncPagingAdapter: - """For each item in an AsyncIterator, returns the result of applying fn to that item. - Python 3.6 added syntax that could replace this (yield within async for).""" - - def __init__(self, pages: AsyncIterator, fn: Callable[[Model], Any]) -> None: - self._pages = pages - self._fn = fn - - def __aiter__(self): - return self - - async def __anext__(self) -> Any: - item = await self._pages.__anext__() - if not item: - raise StopAsyncIteration - return self._fn(item) - # TODO: expected type Model got Coroutine instead? - - class AsyncKeyVaultClientBase: """ :param credential: A credential or credential provider which can be used to authenticate to the vault, From 84d46d77792c4f6d9c22fc035449786cca5aeb63 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:40:30 -0700 Subject: [PATCH 242/244] Remove docdb mgmt package from master (#6585) --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 - sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 - sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 - .../azure-mgmt-documentdb/azure/__init__.py | 1 - .../azure/mgmt/__init__.py | 1 - .../azure/mgmt/documentdb/__init__.py | 18 - .../azure/mgmt/documentdb/document_db.py | 83 -- .../azure/mgmt/documentdb/models/__init__.py | 52 - .../documentdb/models/consistency_policy.py | 50 - .../documentdb/models/database_account.py | 117 --- .../database_account_connection_string.py | 39 - ...tabase_account_create_update_parameters.py | 90 -- ..._account_list_connection_strings_result.py | 29 - .../database_account_list_keys_result.py | 53 - ...base_account_list_read_only_keys_result.py | 41 - .../models/database_account_paged.py | 27 - .../database_account_patch_parameters.py | 31 - ...abase_account_regenerate_key_parameters.py | 33 - .../documentdb/models/document_db_enums.py | 41 - .../documentdb/models/failover_policies.py | 28 - .../mgmt/documentdb/models/failover_policy.py | 48 - .../azure/mgmt/documentdb/models/location.py | 58 -- .../azure/mgmt/documentdb/models/resource.py | 54 -- .../mgmt/documentdb/operations/__init__.py | 16 - .../database_accounts_operations.py | 918 ------------------ .../azure/mgmt/documentdb/version.py | 13 - .../azure_bdist_wheel.py | 54 -- sdk/cosmos/azure-mgmt-documentdb/build.json | 5 - .../dev_requirements.txt | 1 - .../azure-mgmt-documentdb/sdk_packaging.toml | 2 - sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 - sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 -- ..._mgmt_documentdb.test_accounts_create.yaml | 193 ---- ..._mgmt_documentdb.test_accounts_delete.yaml | 467 --------- ...gmt_documentdb.test_accounts_features.yaml | 272 ------ .../tests/test_mgmt_documentdb.py | 146 --- 36 files changed, 3147 deletions(-) delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py delete mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml delete mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst deleted file mode 100644 index eb7345b4071e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. :changelog: - -Release History -=============== - -0.1.3 (2017-05-02) -++++++++++++++++++ - -* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix - -0.1.2 (2017-04-20) -++++++++++++++++++ - -This wheel package is now built with the azure wheel extension - -0.1.1 (2017-03-21) -++++++++++++++++++ - -* Added support for listing database account connection strings - -0.1.0 (2017-01-31) -++++++++++++++++++ - -* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in deleted file mode 100644 index 9ecaeb15de50..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst deleted file mode 100644 index a5204ea75358..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/README.rst +++ /dev/null @@ -1,52 +0,0 @@ -Microsoft Azure SDK for Python -============================== - -This is the Microsoft Azure DocumentDB Management Client Library. - -Azure Resource Manager (ARM) is the next generation of management APIs that -replace the old Azure Service Management (ASM). - -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. - -For the older Azure Service Management (ASM) libraries, see -`azure-servicemanagement-legacy `__ library. - -For a more complete set of Azure libraries, see the `azure `__ bundle package. - - -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - -Usage -===== - -For code examples, see `DocumentDB Management -`__ -on readthedocs.org. - - -Provide Feedback -================ - -If you encounter any bugs or have suggestions, please file an issue in the -`Issues `__ -section of the project. - - -.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py deleted file mode 100755 index 3ec900145f1e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .document_db import DocumentDB -from .version import VERSION - -__all__ = ['DocumentDB'] - -__version__ = VERSION - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py deleted file mode 100755 index 5eda44ab3e32..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import ServiceClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.database_accounts_operations import DatabaseAccountsOperations -from . import models - - -class DocumentDBConfiguration(AzureConfiguration): - """Configuration for DocumentDB - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") - if not base_url: - base_url = 'https://management.azure.com' - - super(DocumentDBConfiguration, self).__init__(base_url) - - self.add_user_agent('documentdb/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class DocumentDB(object): - """Azure DocumentDB Database Service Resource Provider REST API - - :ivar config: Configuration for client. - :vartype config: DocumentDBConfiguration - - :ivar database_accounts: DatabaseAccounts operations - :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2015-04-08' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.database_accounts = DatabaseAccountsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py deleted file mode 100755 index 2ed68c568a84..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .consistency_policy import ConsistencyPolicy -from .location import Location -from .failover_policy import FailoverPolicy -from .database_account import DatabaseAccount -from .failover_policies import FailoverPolicies -from .resource import Resource -from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters -from .database_account_patch_parameters import DatabaseAccountPatchParameters -from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult -from .database_account_list_keys_result import DatabaseAccountListKeysResult -from .database_account_connection_string import DatabaseAccountConnectionString -from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult -from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters -from .database_account_paged import DatabaseAccountPaged -from .document_db_enums import ( - DatabaseAccountKind, - DatabaseAccountOfferType, - DefaultConsistencyLevel, - KeyKind, -) - -__all__ = [ - 'ConsistencyPolicy', - 'Location', - 'FailoverPolicy', - 'DatabaseAccount', - 'FailoverPolicies', - 'Resource', - 'DatabaseAccountCreateUpdateParameters', - 'DatabaseAccountPatchParameters', - 'DatabaseAccountListReadOnlyKeysResult', - 'DatabaseAccountListKeysResult', - 'DatabaseAccountConnectionString', - 'DatabaseAccountListConnectionStringsResult', - 'DatabaseAccountRegenerateKeyParameters', - 'DatabaseAccountPaged', - 'DatabaseAccountKind', - 'DatabaseAccountOfferType', - 'DefaultConsistencyLevel', - 'KeyKind', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py deleted file mode 100755 index d8cefd4c0b59..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConsistencyPolicy(Model): - """The consistency policy for the DocumentDB database account. - - :param default_consistency_level: The default consistency level and - configuration settings of the DocumentDB account. Possible values include: - 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' - :type default_consistency_level: str or :class:`DefaultConsistencyLevel - ` - :param max_staleness_prefix: When used with the Bounded Staleness - consistency level, this value represents the number of stale requests - tolerated. Accepted range for this value is 1 – 2,147,483,647. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_staleness_prefix: long - :param max_interval_in_seconds: When used with the Bounded Staleness - consistency level, this value represents the time amount of staleness (in - seconds) tolerated. Accepted range for this value is 1 - 100. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_interval_in_seconds: int - """ - - _validation = { - 'default_consistency_level': {'required': True}, - 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, - 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, - 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, - 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, - } - - def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): - self.default_consistency_level = default_consistency_level - self.max_staleness_prefix = max_staleness_prefix - self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py deleted file mode 100755 index 89031adc35cb..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccount(Resource): - """A DocumentDB database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param provisioning_state: - :type provisioning_state: str - :ivar document_endpoint: The connection endpoint for the DocumentDB - database account. - :vartype document_endpoint: str - :ivar database_account_offer_type: The offer type for the DocumentDB - database account. Default value: Standard. Possible values include: - 'Standard' - :vartype database_account_offer_type: str or - :class:`DatabaseAccountOfferType - ` - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - :param consistency_policy: The consistency policy for the DocumentDB - database account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :ivar write_locations: An array that contains the write location for the - DocumentDB account. - :vartype write_locations: list of :class:`Location - ` - :ivar read_locations: An array that contains of the read locations enabled - for the DocumentDB account. - :vartype read_locations: list of :class:`Location - ` - :ivar failover_policies: An array that contains the regions ordered by - their failover priorities. - :vartype failover_policies: list of :class:`FailoverPolicy - ` - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'document_endpoint': {'readonly': True}, - 'database_account_offer_type': {'readonly': True}, - 'write_locations': {'readonly': True}, - 'read_locations': {'readonly': True}, - 'failover_policies': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, - 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, - 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): - super(DatabaseAccount, self).__init__(location=location, tags=tags) - self.kind = kind - self.provisioning_state = provisioning_state - self.document_endpoint = None - self.database_account_offer_type = None - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover - self.consistency_policy = consistency_policy - self.write_locations = None - self.read_locations = None - self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py deleted file mode 100755 index db1828208069..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountConnectionString(Model): - """Connection string for the DocumentDB account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar connection_string: Value of the connection string - :vartype connection_string: str - :ivar description: Description of the connection string - :vartype description: str - """ - - _validation = { - 'connection_string': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self): - self.connection_string = None - self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py deleted file mode 100755 index 30978f482f0b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DatabaseAccountCreateUpdateParameters(Resource): - """Parameters to create and update DocumentDB database accounts. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or :class:`DatabaseAccountKind - ` - :param consistency_policy: The consistency policy for the DocumentDB - account. - :type consistency_policy: :class:`ConsistencyPolicy - ` - :param locations: An array that contains the georeplication locations - enabled for the DocumentDB account. - :type locations: list of :class:`Location - ` - :ivar database_account_offer_type: Default value: "Standard" . - :vartype database_account_offer_type: str - :param ip_range_filter: DocumentDB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - as the allowed list of client IPs for a given database account. IP - addresses/ranges must be comma separated and must not contain any spaces. - :type ip_range_filter: str - :param enable_automatic_failover: Enables automatic failover of the write - region in the rare event that the region is unavailable due to an outage. - Automatic failover will result in a new write region for the account and - is chosen based on the failover priorities configured for the account. - :type enable_automatic_failover: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, - 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - } - - database_account_offer_type = "Standard" - - def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): - super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) - self.kind = kind - self.consistency_policy = consistency_policy - self.locations = locations - self.ip_range_filter = ip_range_filter - self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py deleted file mode 100755 index 7cddc00a3de1..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListConnectionStringsResult(Model): - """The connection strings for the given database account. - - :param connection_strings: An array that contains the connection strings - for the DocumentDB account. - :type connection_strings: list of :class:`DatabaseAccountConnectionString - ` - """ - - _attribute_map = { - 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, - } - - def __init__(self, connection_strings=None): - self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py deleted file mode 100755 index 4d775054ac14..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListKeysResult(Model): - """The access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_master_key: Base 64 encoded value of the primary read-write - key. - :vartype primary_master_key: str - :ivar secondary_master_key: Base 64 encoded value of the secondary - read-write key. - :vartype secondary_master_key: str - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_master_key': {'readonly': True}, - 'secondary_master_key': {'readonly': True}, - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, - 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, - 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_master_key = None - self.secondary_master_key = None - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py deleted file mode 100755 index 3330353950c6..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountListReadOnlyKeysResult(Model): - """The read-only access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self): - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py deleted file mode 100755 index 4cb94909c515..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatabaseAccountPaged(Paged): - """ - A paging container for iterating over a list of DatabaseAccount object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py deleted file mode 100755 index be78a4fd6817..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountPatchParameters(Model): - """Parameters for patching Azure DocumentDB database account properties. - - :param tags: - :type tags: dict - """ - - _validation = { - 'tags': {'required': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, tags): - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py deleted file mode 100755 index 3bff90d33db3..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatabaseAccountRegenerateKeyParameters(Model): - """Parameters to regenerate the keys within the database account. - - :param key_kind: The access key to regenerate. Possible values include: - 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - """ - - _validation = { - 'key_kind': {'required': True}, - } - - _attribute_map = { - 'key_kind': {'key': 'keyKind', 'type': 'str'}, - } - - def __init__(self, key_kind): - self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py deleted file mode 100755 index 1e87cecaeb2a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class DatabaseAccountKind(Enum): - - global_document_db = "GlobalDocumentDB" - mongo_db = "MongoDB" - parse = "Parse" - - -class DatabaseAccountOfferType(Enum): - - standard = "Standard" - - -class DefaultConsistencyLevel(Enum): - - eventual = "Eventual" - session = "Session" - bounded_staleness = "BoundedStaleness" - strong = "Strong" - consistent_prefix = "ConsistentPrefix" - - -class KeyKind(Enum): - - primary = "primary" - secondary = "secondary" - primary_readonly = "primaryReadonly" - secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py deleted file mode 100755 index 4c3ebff5e3b5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicies(Model): - """The list of new failover policies for the failover priority change. - - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - """ - - _attribute_map = { - 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, failover_policies=None): - self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py deleted file mode 100755 index 99cc2769403b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverPolicy(Model): - """The failover policy for a given region of a database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region in which the database - account replicates to. Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region in which the database account - exists. - :type location_name: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py deleted file mode 100755 index 8bc82bde2c3f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Location(Model): - """A region in which the Azure DocumentDB database account is deployed. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region within the database account. - Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region. - :type location_name: str - :ivar document_endpoint: The connection endpoint for the specific region. - Example: - https://<accountName>-<locationName>.documents.azure.com:443/ - :vartype document_endpoint: str - :param provisioning_state: - :type provisioning_state: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): - self.id = None - self.location_name = location_name - self.document_endpoint = None - self.provisioning_state = provisioning_state - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py deleted file mode 100755 index d5e887d0b78a..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """A database account resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, location, tags=None): - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py deleted file mode 100755 index 27ed7c069537..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .database_accounts_operations import DatabaseAccountsOperations - -__all__ = [ - 'DatabaseAccountsOperations', -] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py deleted file mode 100755 index 2bb39b1f6839..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py +++ /dev/null @@ -1,918 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrestazure.azure_operation import AzureOperationPoller -import uuid - -from .. import models - - -class DatabaseAccountsOperations(object): - """DatabaseAccountsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". - """ - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-04-08" - - self.config = config - - def get( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Retrieves the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def patch( - self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): - """Patches the properties of an existing Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param tags: - :type tags: dict - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - update_parameters = models.DatabaseAccountPatchParameters(tags=tags) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(update_parameters, 'DatabaseAccountPatchParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.patch(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def create_or_update( - self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): - """Creates or updates an Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param create_update_parameters: The parameters to provide for the - current database account. - :type create_update_parameters: - :class:`DatabaseAccountCreateUpdateParameters - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`DatabaseAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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('DatabaseAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def delete( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Deletes an existing Azure DocumentDB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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 - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - def long_running_send(): - - request = self._client.delete(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def failover_priority_change( - self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): - """Changes the failover priority for the Azure DocumentDB database - account. A failover priority of 0 indicates a write region. The maximum - value for a failover priority = (total number of regions - 1). Failover - priority values must be unique for each of the regions in which the - database account exists. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param failover_policies: List of failover policies. - :type failover_policies: list of :class:`FailoverPolicy - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(failover_parameters, 'FailoverPolicies') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - subscription. - - :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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all the Azure DocumentDB database accounts available under the - given resource group. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_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`. - :rtype: :class:`DatabaseAccountPaged - ` - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the access keys for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_connection_strings( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the connection strings for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListConnectionStringsResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def list_read_only_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the read-only access keys for the specified Azure DocumentDB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: :class:`DatabaseAccountListReadOnlyKeysResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def regenerate_key( - self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): - """Regenerates an access key for the specified Azure DocumentDB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: DocumentDB database account name. - :type account_name: str - :param key_kind: The access key to regenerate. Possible values - include: 'primary', 'secondary', 'primaryReadonly', - 'secondaryReadonly' - :type key_kind: str or :class:`KeyKind - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' - 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') - - # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def check_name_exists( - self, account_name, custom_headers=None, raw=False, **operation_config): - """Checks that the Azure DocumentDB account name already exists. A valid - account name may contain only lowercase letters, numbers, and the '-' - character, and must be between 3 and 50 characters. - - :param account_name: DocumentDB database account name. - :type account_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`. - :rtype: bool - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' - path_format_arguments = { - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) - } - 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['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 and send request - request = self._client.head(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = (response.status_code == 200) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py deleted file mode 100755 index 95ed79d29108..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.3" - diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -from distutils import log as logger -import os.path - -from wheel.bdist_wheel import bdist_wheel -class azure_bdist_wheel(bdist_wheel): - """The purpose of this class is to build wheel a little differently than the sdist, - without requiring to build the wheel from the sdist (i.e. you can build the wheel - directly from source). - """ - - description = "Create an Azure wheel distribution" - - user_options = bdist_wheel.user_options + \ - [('azure-namespace-package=', None, - "Name of the deepest nspkg used")] - - def initialize_options(self): - bdist_wheel.initialize_options(self) - self.azure_namespace_package = None - - def finalize_options(self): - bdist_wheel.finalize_options(self) - if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): - raise ValueError("azure_namespace_package must finish by -nspkg") - - def run(self): - if not self.distribution.install_requires: - self.distribution.install_requires = [] - self.distribution.install_requires.append( - "{}>=2.0.0".format(self.azure_namespace_package)) - bdist_wheel.run(self) - - def write_record(self, bdist_dir, distinfo_dir): - if self.azure_namespace_package: - # Split and remove last part, assuming it's "nspkg" - subparts = self.azure_namespace_package.split('-')[0:-1] - folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] - for azure_sub_package in folder_with_init: - init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') - if os.path.isfile(init_file): - logger.info("manually remove {} while building the wheel".format(init_file)) - os.remove(init_file) - else: - raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) - bdist_wheel.write_record(self, bdist_dir, distinfo_dir) -cmdclass = { - 'bdist_wheel': azure_bdist_wheel, -} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json deleted file mode 100644 index 4d98fc12a39e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/build.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "autorest": "1.0.1-20170501-2300-nightly", - "date": "2017-05-01T20:13:42Z", - "version": "0.1.3" -} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt deleted file mode 100644 index 6ccb7f031ddd..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt +++ /dev/null @@ -1 +0,0 @@ --e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml deleted file mode 100644 index e7687fdae93b..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml +++ /dev/null @@ -1,2 +0,0 @@ -[packaging] -auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg deleted file mode 100644 index 856f4164982c..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[bdist_wheel] -universal=1 -azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py deleted file mode 100644 index ddef54e31bb5..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/setup.py +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env python - -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup -try: - from azure_bdist_wheel import cmdclass -except ImportError: - from distutils import log as logger - logger.warn("Wheel is not available, disabling bdist_wheel hook") - cmdclass = {} - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-documentdb" -PACKAGE_PPRINT_NAME = "DocumentDB Management" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') - -# azure v0.x is not compatible with this package -# azure v0.x used to have a __version__ attribute (newer versions don't) -try: - import azure - try: - ver = azure.__version__ - raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' - ) - except AttributeError: - pass -except ImportError: - pass - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError('Cannot find version information') - -with open('README.rst', encoding='utf-8') as f: - readme = f.read() -with open('HISTORY.rst', encoding='utf-8') as f: - history = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + history, - license='MIT License', - author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', - classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'License :: OSI Approved :: MIT License', - ], - zip_safe=False, - packages=find_packages(), - install_requires=[ - 'msrestazure~=0.4.7', - 'azure-common~=1.1.5', - ], - cmdclass=cmdclass -) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml deleted file mode 100644 index d470d7f8673d..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml +++ /dev/null @@ -1,193 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] - method: HEAD - uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: ''} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['142'] - Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-ratelimit-remaining-tenant-reads: ['14999'] - x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] - x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] - status: {code: 404, message: NotFound} -- request: - body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], - "databaseAccountOfferType": "Standard"}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['121'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['910'] - x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] - x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 - response: - body: {string: '{"status":"Completed","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['33'] - x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] - x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml deleted file mode 100644 index e6f4e2348f8f..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml +++ /dev/null @@ -1,467 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"status":"Dequeued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] - x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 - response: - body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' - under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' - was not found."}}'} - headers: - Cache-Control: [no-cache] - Content-Length: ['214'] - Content-Type: [application/json; charset=utf-8] - Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-failure-cause: [gateway] - x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] - x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] - status: {code: 404, message: Not Found} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml deleted file mode 100644 index b2e4b82a9d9e..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml +++ /dev/null @@ -1,272 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1144'] - x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] - x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1156'] - x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14997'] - x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] - x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West - US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West - US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West - US","failoverPriority":0}]}}]}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['2225'] - x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] - x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] - status: {code: 200, message: Ok} -- request: - body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['73'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 - response: - body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique - and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['170'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] - status: {code: 400, message: BadRequest} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] - x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] - status: {code: 200, message: Ok} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 - response: - body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['239'] - x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] - x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] - status: {code: 200, message: Ok} -- request: - body: '{"keyKind": "primary"}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['22'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 - response: - body: {string: '{"status":"Enqueued","error":{}}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Length: ['32'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] - Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] - x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 - response: - body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} - headers: - Cache-Control: ['no-store, no-cache'] - Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] - Content-Type: [application/json] - Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['461'] - x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-gatewayversion: [version=1.10.121.4] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] - x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] - status: {code: 200, message: Ok} -version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py deleted file mode 100644 index 902666a22cf0..000000000000 --- a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py +++ /dev/null @@ -1,146 +0,0 @@ -# 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. -#-------------------------------------------------------------------------- -import unittest - -import azure.mgmt.documentdb -from msrestazure.azure_exceptions import CloudError -from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer - - -class MgmtDocDBTest(AzureMgmtTestCase): - - def setUp(self): - super(MgmtDocDBTest, self).setUp() - self.client = self.create_mgmt_client( - azure.mgmt.documentdb.DocumentDB - ) - - @ResourceGroupPreparer() - def test_accounts_create(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtst') - - self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) - - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - account = async_docdb_create.result() - self.assertIsNotNone(account) - # Rest API issue - # self.assertEqual(account.name, account_name) - - @ResourceGroupPreparer() - def test_accounts_features(self, resource_group, location): - account_name = self.get_resource_name('pydocdbtest') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - account = self.client.database_accounts.get( - resource_group.name, - account_name - ) - self.assertEqual(account.name, account_name) - - my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) - self.assertEqual(len(my_accounts), 1) - self.assertEqual(my_accounts[0].name, account_name) - - my_accounts = list(self.client.database_accounts.list()) - self.assertTrue(len(my_accounts) >= 1) - self.assertTrue(any(db.name == account_name for db in my_accounts)) - - # I guess we can make this test with no error, need to check with DocDB team - # This is an interesting test anyway, this implies that the serialization works - # and error message is available. Since this method does not return an object - # (i.e. no deserialization to test), this is a complete test. - # We are NOT here to test the RestAPI, but the Swagger file and Python code. - with self.assertRaises(CloudError) as cm: - async_change = self.client.database_accounts.failover_priority_change( - resource_group.name, - account_name, - [{ - 'location_name': self.region, - 'failover_priority': 0 - }] - ) - async_change.wait() - self.assertIn('Failover priorities must be unique', cm.exception.message) - - my_keys = self.client.database_accounts.list_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_master_key) - self.assertIsNotNone(my_keys.secondary_master_key) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - my_keys = self.client.database_accounts.list_read_only_keys( - resource_group.name, - account_name - ) - self.assertIsNotNone(my_keys.primary_readonly_master_key) - self.assertIsNotNone(my_keys.secondary_readonly_master_key) - - - async_regenerate = self.client.database_accounts.regenerate_key( - resource_group.name, - account_name, - "primary" - ) - async_regenerate.wait() - - @ResourceGroupPreparer() - def test_accounts_delete(self, resource_group, location): - account_name = self.get_resource_name('pydocumentdbtst') - - if not self.is_playback(): - async_docdb_create = self.client.database_accounts.create_or_update( - resource_group.name, - account_name, - { - 'location': location, - 'locations': [{ - 'location_name': self.region - }] - } - ) - async_docdb_create.wait() - - # Current implementation of msrestazure does not support 404 as a end of LRO delete - # https://github.com/Azure/msrestazure-for-python/issues/7 - async_delete = self.client.database_accounts.delete(resource_group.name, account_name) - try: - async_delete.wait() - except CloudError as err: - if err.response.status_code != 404: - raise - - -#------------------------------------------------------------------------------ -if __name__ == '__main__': - unittest.main() From cf098dfcb9e52371e75ffc25135ecfd9837687ab Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 31 Jul 2019 15:42:03 -0700 Subject: [PATCH 243/244] Revert "Remove docdb mgmt package from master (#6585)" (#6593) This reverts commit d2ed7d87997eac9b715ee9802c15349a12446b84. --- sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst | 24 + sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in | 2 + sdk/cosmos/azure-mgmt-documentdb/README.rst | 52 + .../azure-mgmt-documentdb/azure/__init__.py | 1 + .../azure/mgmt/__init__.py | 1 + .../azure/mgmt/documentdb/__init__.py | 18 + .../azure/mgmt/documentdb/document_db.py | 83 ++ .../azure/mgmt/documentdb/models/__init__.py | 52 + .../documentdb/models/consistency_policy.py | 50 + .../documentdb/models/database_account.py | 117 +++ .../database_account_connection_string.py | 39 + ...tabase_account_create_update_parameters.py | 90 ++ ..._account_list_connection_strings_result.py | 29 + .../database_account_list_keys_result.py | 53 + ...base_account_list_read_only_keys_result.py | 41 + .../models/database_account_paged.py | 27 + .../database_account_patch_parameters.py | 31 + ...abase_account_regenerate_key_parameters.py | 33 + .../documentdb/models/document_db_enums.py | 41 + .../documentdb/models/failover_policies.py | 28 + .../mgmt/documentdb/models/failover_policy.py | 48 + .../azure/mgmt/documentdb/models/location.py | 58 ++ .../azure/mgmt/documentdb/models/resource.py | 54 ++ .../mgmt/documentdb/operations/__init__.py | 16 + .../database_accounts_operations.py | 918 ++++++++++++++++++ .../azure/mgmt/documentdb/version.py | 13 + .../azure_bdist_wheel.py | 54 ++ sdk/cosmos/azure-mgmt-documentdb/build.json | 5 + .../dev_requirements.txt | 1 + .../azure-mgmt-documentdb/sdk_packaging.toml | 2 + sdk/cosmos/azure-mgmt-documentdb/setup.cfg | 3 + sdk/cosmos/azure-mgmt-documentdb/setup.py | 85 ++ ..._mgmt_documentdb.test_accounts_create.yaml | 193 ++++ ..._mgmt_documentdb.test_accounts_delete.yaml | 467 +++++++++ ...gmt_documentdb.test_accounts_features.yaml | 272 ++++++ .../tests/test_mgmt_documentdb.py | 146 +++ 36 files changed, 3147 insertions(+) create mode 100644 sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in create mode 100644 sdk/cosmos/azure-mgmt-documentdb/README.rst create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py create mode 100755 sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/build.json create mode 100644 sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt create mode 100644 sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.cfg create mode 100644 sdk/cosmos/azure-mgmt-documentdb/setup.py create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml create mode 100644 sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py diff --git a/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst new file mode 100644 index 000000000000..eb7345b4071e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/HISTORY.rst @@ -0,0 +1,24 @@ +.. :changelog: + +Release History +=============== + +0.1.3 (2017-05-02) +++++++++++++++++++ + +* Added property enableAutomaticFailover and consistencyPolicy ConsistentPrefix + +0.1.2 (2017-04-20) +++++++++++++++++++ + +This wheel package is now built with the azure wheel extension + +0.1.1 (2017-03-21) +++++++++++++++++++ + +* Added support for listing database account connection strings + +0.1.0 (2017-01-31) +++++++++++++++++++ + +* Initial Release diff --git a/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in new file mode 100644 index 000000000000..9ecaeb15de50 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/MANIFEST.in @@ -0,0 +1,2 @@ +include *.rst +include azure_bdist_wheel.py \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/README.rst b/sdk/cosmos/azure-mgmt-documentdb/README.rst new file mode 100644 index 000000000000..a5204ea75358 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/README.rst @@ -0,0 +1,52 @@ +Microsoft Azure SDK for Python +============================== + +This is the Microsoft Azure DocumentDB Management Client Library. + +Azure Resource Manager (ARM) is the next generation of management APIs that +replace the old Azure Service Management (ASM). + +This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. + +For the older Azure Service Management (ASM) libraries, see +`azure-servicemanagement-legacy `__ library. + +For a more complete set of Azure libraries, see the `azure `__ bundle package. + + +Compatibility +============= + +**IMPORTANT**: If you have an earlier version of the azure package +(version < 1.0), you should uninstall it before installing this package. + +You can check the version using pip: + +.. code:: shell + + pip freeze + +If you see azure==0.11.0 (or any version below 1.0), uninstall it first: + +.. code:: shell + + pip uninstall azure + + +Usage +===== + +For code examples, see `DocumentDB Management +`__ +on readthedocs.org. + + +Provide Feedback +================ + +If you encounter any bugs or have suggestions, please file an issue in the +`Issues `__ +section of the project. + + +.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-documentdb%2FREADME.png diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py new file mode 100755 index 000000000000..3ec900145f1e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .document_db import DocumentDB +from .version import VERSION + +__all__ = ['DocumentDB'] + +__version__ = VERSION + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py new file mode 100755 index 000000000000..5eda44ab3e32 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/document_db.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import ServiceClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.database_accounts_operations import DatabaseAccountsOperations +from . import models + + +class DocumentDBConfiguration(AzureConfiguration): + """Configuration for DocumentDB + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not isinstance(subscription_id, str): + raise TypeError("Parameter 'subscription_id' must be str.") + if not base_url: + base_url = 'https://management.azure.com' + + super(DocumentDBConfiguration, self).__init__(base_url) + + self.add_user_agent('documentdb/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class DocumentDB(object): + """Azure DocumentDB Database Service Resource Provider REST API + + :ivar config: Configuration for client. + :vartype config: DocumentDBConfiguration + + :ivar database_accounts: DatabaseAccounts operations + :vartype database_accounts: azure.mgmt.documentdb.operations.DatabaseAccountsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = DocumentDBConfiguration(credentials, subscription_id, base_url) + self._client = ServiceClient(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2015-04-08' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.database_accounts = DatabaseAccountsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py new file mode 100755 index 000000000000..2ed68c568a84 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/__init__.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .consistency_policy import ConsistencyPolicy +from .location import Location +from .failover_policy import FailoverPolicy +from .database_account import DatabaseAccount +from .failover_policies import FailoverPolicies +from .resource import Resource +from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters +from .database_account_patch_parameters import DatabaseAccountPatchParameters +from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult +from .database_account_list_keys_result import DatabaseAccountListKeysResult +from .database_account_connection_string import DatabaseAccountConnectionString +from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult +from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters +from .database_account_paged import DatabaseAccountPaged +from .document_db_enums import ( + DatabaseAccountKind, + DatabaseAccountOfferType, + DefaultConsistencyLevel, + KeyKind, +) + +__all__ = [ + 'ConsistencyPolicy', + 'Location', + 'FailoverPolicy', + 'DatabaseAccount', + 'FailoverPolicies', + 'Resource', + 'DatabaseAccountCreateUpdateParameters', + 'DatabaseAccountPatchParameters', + 'DatabaseAccountListReadOnlyKeysResult', + 'DatabaseAccountListKeysResult', + 'DatabaseAccountConnectionString', + 'DatabaseAccountListConnectionStringsResult', + 'DatabaseAccountRegenerateKeyParameters', + 'DatabaseAccountPaged', + 'DatabaseAccountKind', + 'DatabaseAccountOfferType', + 'DefaultConsistencyLevel', + 'KeyKind', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py new file mode 100755 index 000000000000..d8cefd4c0b59 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/consistency_policy.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConsistencyPolicy(Model): + """The consistency policy for the DocumentDB database account. + + :param default_consistency_level: The default consistency level and + configuration settings of the DocumentDB account. Possible values include: + 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' + :type default_consistency_level: str or :class:`DefaultConsistencyLevel + ` + :param max_staleness_prefix: When used with the Bounded Staleness + consistency level, this value represents the number of stale requests + tolerated. Accepted range for this value is 1 – 2,147,483,647. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_staleness_prefix: long + :param max_interval_in_seconds: When used with the Bounded Staleness + consistency level, this value represents the time amount of staleness (in + seconds) tolerated. Accepted range for this value is 1 - 100. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_interval_in_seconds: int + """ + + _validation = { + 'default_consistency_level': {'required': True}, + 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, + 'max_interval_in_seconds': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, + 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, + 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, + } + + def __init__(self, default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None): + self.default_consistency_level = default_consistency_level + self.max_staleness_prefix = max_staleness_prefix + self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py new file mode 100755 index 000000000000..89031adc35cb --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account.py @@ -0,0 +1,117 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccount(Resource): + """A DocumentDB database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param provisioning_state: + :type provisioning_state: str + :ivar document_endpoint: The connection endpoint for the DocumentDB + database account. + :vartype document_endpoint: str + :ivar database_account_offer_type: The offer type for the DocumentDB + database account. Default value: Standard. Possible values include: + 'Standard' + :vartype database_account_offer_type: str or + :class:`DatabaseAccountOfferType + ` + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + :param consistency_policy: The consistency policy for the DocumentDB + database account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :ivar write_locations: An array that contains the write location for the + DocumentDB account. + :vartype write_locations: list of :class:`Location + ` + :ivar read_locations: An array that contains of the read locations enabled + for the DocumentDB account. + :vartype read_locations: list of :class:`Location + ` + :ivar failover_policies: An array that contains the regions ordered by + their failover priorities. + :vartype failover_policies: list of :class:`FailoverPolicy + ` + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'document_endpoint': {'readonly': True}, + 'database_account_offer_type': {'readonly': True}, + 'write_locations': {'readonly': True}, + 'read_locations': {'readonly': True}, + 'failover_policies': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, + 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, + 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, location, tags=None, kind="GlobalDocumentDB", provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None): + super(DatabaseAccount, self).__init__(location=location, tags=tags) + self.kind = kind + self.provisioning_state = provisioning_state + self.document_endpoint = None + self.database_account_offer_type = None + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover + self.consistency_policy = consistency_policy + self.write_locations = None + self.read_locations = None + self.failover_policies = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py new file mode 100755 index 000000000000..db1828208069 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_connection_string.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountConnectionString(Model): + """Connection string for the DocumentDB account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar connection_string: Value of the connection string + :vartype connection_string: str + :ivar description: Description of the connection string + :vartype description: str + """ + + _validation = { + 'connection_string': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self): + self.connection_string = None + self.description = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py new file mode 100755 index 000000000000..30978f482f0b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_create_update_parameters.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class DatabaseAccountCreateUpdateParameters(Resource): + """Parameters to create and update DocumentDB database accounts. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or :class:`DatabaseAccountKind + ` + :param consistency_policy: The consistency policy for the DocumentDB + account. + :type consistency_policy: :class:`ConsistencyPolicy + ` + :param locations: An array that contains the georeplication locations + enabled for the DocumentDB account. + :type locations: list of :class:`Location + ` + :ivar database_account_offer_type: Default value: "Standard" . + :vartype database_account_offer_type: str + :param ip_range_filter: DocumentDB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + as the allowed list of client IPs for a given database account. IP + addresses/ranges must be comma separated and must not contain any spaces. + :type ip_range_filter: str + :param enable_automatic_failover: Enables automatic failover of the write + region in the rare event that the region is unavailable due to an outage. + Automatic failover will result in a new write region for the account and + is chosen based on the failover priorities configured for the account. + :type enable_automatic_failover: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'locations': {'required': True}, + 'database_account_offer_type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, + 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + } + + database_account_offer_type = "Standard" + + def __init__(self, location, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None): + super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags) + self.kind = kind + self.consistency_policy = consistency_policy + self.locations = locations + self.ip_range_filter = ip_range_filter + self.enable_automatic_failover = enable_automatic_failover diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py new file mode 100755 index 000000000000..7cddc00a3de1 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_connection_strings_result.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListConnectionStringsResult(Model): + """The connection strings for the given database account. + + :param connection_strings: An array that contains the connection strings + for the DocumentDB account. + :type connection_strings: list of :class:`DatabaseAccountConnectionString + ` + """ + + _attribute_map = { + 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, + } + + def __init__(self, connection_strings=None): + self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py new file mode 100755 index 000000000000..4d775054ac14 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_keys_result.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListKeysResult(Model): + """The access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_master_key: Base 64 encoded value of the primary read-write + key. + :vartype primary_master_key: str + :ivar secondary_master_key: Base 64 encoded value of the secondary + read-write key. + :vartype secondary_master_key: str + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_master_key': {'readonly': True}, + 'secondary_master_key': {'readonly': True}, + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, + 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, + 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_master_key = None + self.secondary_master_key = None + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py new file mode 100755 index 000000000000..3330353950c6 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_list_read_only_keys_result.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountListReadOnlyKeysResult(Model): + """The read-only access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self): + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py new file mode 100755 index 000000000000..4cb94909c515 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class DatabaseAccountPaged(Paged): + """ + A paging container for iterating over a list of DatabaseAccount object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py new file mode 100755 index 000000000000..be78a4fd6817 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_patch_parameters.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountPatchParameters(Model): + """Parameters for patching Azure DocumentDB database account properties. + + :param tags: + :type tags: dict + """ + + _validation = { + 'tags': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, tags): + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py new file mode 100755 index 000000000000..3bff90d33db3 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/database_account_regenerate_key_parameters.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseAccountRegenerateKeyParameters(Model): + """Parameters to regenerate the keys within the database account. + + :param key_kind: The access key to regenerate. Possible values include: + 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + """ + + _validation = { + 'key_kind': {'required': True}, + } + + _attribute_map = { + 'key_kind': {'key': 'keyKind', 'type': 'str'}, + } + + def __init__(self, key_kind): + self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py new file mode 100755 index 000000000000..1e87cecaeb2a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/document_db_enums.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class DatabaseAccountKind(Enum): + + global_document_db = "GlobalDocumentDB" + mongo_db = "MongoDB" + parse = "Parse" + + +class DatabaseAccountOfferType(Enum): + + standard = "Standard" + + +class DefaultConsistencyLevel(Enum): + + eventual = "Eventual" + session = "Session" + bounded_staleness = "BoundedStaleness" + strong = "Strong" + consistent_prefix = "ConsistentPrefix" + + +class KeyKind(Enum): + + primary = "primary" + secondary = "secondary" + primary_readonly = "primaryReadonly" + secondary_readonly = "secondaryReadonly" diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py new file mode 100755 index 000000000000..4c3ebff5e3b5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policies.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicies(Model): + """The list of new failover policies for the failover priority change. + + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + """ + + _attribute_map = { + 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, failover_policies=None): + self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py new file mode 100755 index 000000000000..99cc2769403b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/failover_policy.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailoverPolicy(Model): + """The failover policy for a given region of a database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region in which the database + account replicates to. Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region in which the database account + exists. + :type location_name: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py new file mode 100755 index 000000000000..8bc82bde2c3f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/location.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Location(Model): + """A region in which the Azure DocumentDB database account is deployed. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region within the database account. + Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region. + :type location_name: str + :ivar document_endpoint: The connection endpoint for the specific region. + Example: + https://<accountName>-<locationName>.documents.azure.com:443/ + :vartype document_endpoint: str + :param provisioning_state: + :type provisioning_state: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'document_endpoint': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, location_name=None, provisioning_state=None, failover_priority=None): + self.id = None + self.location_name = location_name + self.document_endpoint = None + self.provisioning_state = provisioning_state + self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py new file mode 100755 index 000000000000..d5e887d0b78a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/models/resource.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """A database account resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, location, tags=None): + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py new file mode 100755 index 000000000000..27ed7c069537 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/__init__.py @@ -0,0 +1,16 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .database_accounts_operations import DatabaseAccountsOperations + +__all__ = [ + 'DatabaseAccountsOperations', +] diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py new file mode 100755 index 000000000000..2bb39b1f6839 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/operations/database_accounts_operations.py @@ -0,0 +1,918 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrestazure.azure_operation import AzureOperationPoller +import uuid + +from .. import models + + +class DatabaseAccountsOperations(object): + """DatabaseAccountsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2015-04-08. Constant value: "2015-04-08". + """ + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-04-08" + + self.config = config + + def get( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Retrieves the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def patch( + self, resource_group_name, account_name, tags, custom_headers=None, raw=False, **operation_config): + """Patches the properties of an existing Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param tags: + :type tags: dict + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + update_parameters = models.DatabaseAccountPatchParameters(tags=tags) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(update_parameters, 'DatabaseAccountPatchParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.patch(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def create_or_update( + self, resource_group_name, account_name, create_update_parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates an Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param create_update_parameters: The parameters to provide for the + current database account. + :type create_update_parameters: + :class:`DatabaseAccountCreateUpdateParameters + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns :class:`DatabaseAccount + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(create_update_parameters, 'DatabaseAccountCreateUpdateParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.put(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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('DatabaseAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def delete( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Deletes an existing Azure DocumentDB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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 + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + def long_running_send(): + + request = self._client.delete(url, query_parameters) + return self._client.send(request, header_parameters, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def failover_priority_change( + self, resource_group_name, account_name, failover_policies=None, custom_headers=None, raw=False, **operation_config): + """Changes the failover priority for the Azure DocumentDB database + account. A failover priority of 0 indicates a write region. The maximum + value for a failover priority = (total number of regions - 1). Failover + priority values must be unique for each of the regions in which the + database account exists. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param failover_policies: List of failover policies. + :type failover_policies: list of :class:`FailoverPolicy + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + failover_parameters = models.FailoverPolicies(failover_policies=failover_policies) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(failover_parameters, 'FailoverPolicies') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + subscription. + + :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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the Azure DocumentDB database accounts available under the + given resource group. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_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`. + :rtype: :class:`DatabaseAccountPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def list_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the access keys for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_connection_strings( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the connection strings for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListConnectionStringsResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListConnectionStringsResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_read_only_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the read-only access keys for the specified Azure DocumentDB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: :class:`DatabaseAccountListReadOnlyKeysResult + ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('DatabaseAccountListReadOnlyKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def regenerate_key( + self, resource_group_name, account_name, key_kind, custom_headers=None, raw=False, **operation_config): + """Regenerates an access key for the specified Azure DocumentDB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: DocumentDB database account name. + :type account_name: str + :param key_kind: The access key to regenerate. Possible values + include: 'primary', 'secondary', 'primaryReadonly', + 'secondaryReadonly' + :type key_kind: str or :class:`KeyKind + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :rtype: + :class:`AzureOperationPoller` + instance that returns None + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + key_to_regenerate = models.DatabaseAccountRegenerateKeyParameters(key_kind=key_kind) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey' + 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', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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(key_to_regenerate, 'DatabaseAccountRegenerateKeyParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def check_name_exists( + self, account_name, custom_headers=None, raw=False, **operation_config): + """Checks that the Azure DocumentDB account name already exists. A valid + account name may contain only lowercase letters, numbers, and the '-' + character, and must be between 3 and 50 characters. + + :param account_name: DocumentDB database account name. + :type account_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`. + :rtype: bool + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + # Construct URL + url = '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}' + path_format_arguments = { + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + } + 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['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 and send request + request = self._client.head(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = (response.status_code == 200) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + return deserialized diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py new file mode 100755 index 000000000000..95ed79d29108 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure/mgmt/documentdb/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.3" + diff --git a/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py new file mode 100644 index 000000000000..8a81d1b61775 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/azure_bdist_wheel.py @@ -0,0 +1,54 @@ +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +from distutils import log as logger +import os.path + +from wheel.bdist_wheel import bdist_wheel +class azure_bdist_wheel(bdist_wheel): + """The purpose of this class is to build wheel a little differently than the sdist, + without requiring to build the wheel from the sdist (i.e. you can build the wheel + directly from source). + """ + + description = "Create an Azure wheel distribution" + + user_options = bdist_wheel.user_options + \ + [('azure-namespace-package=', None, + "Name of the deepest nspkg used")] + + def initialize_options(self): + bdist_wheel.initialize_options(self) + self.azure_namespace_package = None + + def finalize_options(self): + bdist_wheel.finalize_options(self) + if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): + raise ValueError("azure_namespace_package must finish by -nspkg") + + def run(self): + if not self.distribution.install_requires: + self.distribution.install_requires = [] + self.distribution.install_requires.append( + "{}>=2.0.0".format(self.azure_namespace_package)) + bdist_wheel.run(self) + + def write_record(self, bdist_dir, distinfo_dir): + if self.azure_namespace_package: + # Split and remove last part, assuming it's "nspkg" + subparts = self.azure_namespace_package.split('-')[0:-1] + folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] + for azure_sub_package in folder_with_init: + init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') + if os.path.isfile(init_file): + logger.info("manually remove {} while building the wheel".format(init_file)) + os.remove(init_file) + else: + raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) + bdist_wheel.write_record(self, bdist_dir, distinfo_dir) +cmdclass = { + 'bdist_wheel': azure_bdist_wheel, +} diff --git a/sdk/cosmos/azure-mgmt-documentdb/build.json b/sdk/cosmos/azure-mgmt-documentdb/build.json new file mode 100644 index 000000000000..4d98fc12a39e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/build.json @@ -0,0 +1,5 @@ +{ + "autorest": "1.0.1-20170501-2300-nightly", + "date": "2017-05-01T20:13:42Z", + "version": "0.1.3" +} \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt new file mode 100644 index 000000000000..6ccb7f031ddd --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/dev_requirements.txt @@ -0,0 +1 @@ +-e ../../../tools/azure-sdk-tools diff --git a/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml new file mode 100644 index 000000000000..e7687fdae93b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.cfg b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg new file mode 100644 index 000000000000..856f4164982c --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.cfg @@ -0,0 +1,3 @@ +[bdist_wheel] +universal=1 +azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-documentdb/setup.py b/sdk/cosmos/azure-mgmt-documentdb/setup.py new file mode 100644 index 000000000000..ddef54e31bb5 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/setup.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup +try: + from azure_bdist_wheel import cmdclass +except ImportError: + from distutils import log as logger + logger.warn("Wheel is not available, disabling bdist_wheel hook") + cmdclass = {} + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-documentdb" +PACKAGE_PPRINT_NAME = "DocumentDB Management" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.rst', encoding='utf-8') as f: + readme = f.read() +with open('HISTORY.rst', encoding='utf-8') as f: + history = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + history, + license='MIT License', + author='Microsoft Corporation', + author_email='ptvshelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(), + install_requires=[ + 'msrestazure~=0.4.7', + 'azure-common~=1.1.5', + ], + cmdclass=cmdclass +) diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml new file mode 100644 index 000000000000..d470d7f8673d --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_create.yaml @@ -0,0 +1,193 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee04e7e4-df68-11e6-8adf-ecb1d756380e] + method: HEAD + uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: ''} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['142'] + Date: ['Fri, 20 Jan 2017 23:34:04 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-ratelimit-remaining-tenant-reads: ['14999'] + x-ms-request-id: [de835205-e886-4a4b-b113-1d9aa4058abf] + x-ms-routing-request-id: ['WESTUS2:20170120T233404Z:de835205-e886-4a4b-b113-1d9aa4058abf'] + status: {code: 404, message: NotFound} +- request: + body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus"}], + "databaseAccountOfferType": "Standard"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['121'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9","name":"pydocdbtst633610d9","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"readLocations":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","provisioningState":"Initializing","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtst633610d9-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:06 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['910'] + x-ms-correlation-request-id: [2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233406Z:2b6e0aba-5e47-4ff4-8ee4-b1d07ea42ac2'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:34:36 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a77929e1-2fa1-43c4-ab70-b5554663bbef] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['WESTUS2:20170120T233437Z:a77929e1-2fa1-43c4-ab70-b5554663bbef'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:07 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3b823538-b756-42f5-ab5a-984fcb0784e9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233507Z:3b823538-b756-42f5-ab5a-984fcb0784e9'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:35:37 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [688431b3-6581-4d37-97c6-f31ec251c7f5] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [166b85c6-9a92-4a6a-bea6-5e0efaf2fe68] + x-ms-routing-request-id: ['CENTRALUS:20170120T233538Z:688431b3-6581-4d37-97c6-f31ec251c7f5'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [ee5bccc6-df68-11e6-9757-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08 + response: + body: {string: '{"status":"Completed","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_create633610d9/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtst633610d9/operationResults/166b85c6-9a92-4a6a-bea6-5e0efaf2fe68?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:36:08 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['33'] + x-ms-correlation-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [92158f40-6108-4371-8e11-481bfab5290d] + x-ms-routing-request-id: ['WESTUS2:20170120T233609Z:92158f40-6108-4371-8e11-481bfab5290d'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml new file mode 100644 index 000000000000..e6f4e2348f8f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_delete.yaml @@ -0,0 +1,467 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:26:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [3a704aa4-486b-4231-b95d-f778b23a86f0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232652Z:3a704aa4-486b-4231-b95d-f778b23a86f0'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:22 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1367d949-a5ed-4098-b4de-95c182fec7de] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232722Z:1367d949-a5ed-4098-b4de-95c182fec7de'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:27:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [fe9ceb95-f76c-489d-b74e-c7a99321a2f1] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232752Z:fe9ceb95-f76c-489d-b74e-c7a99321a2f1'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:21 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [8f603df8-c522-4f5e-91c7-61cd4a8f6d44] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232822Z:8f603df8-c522-4f5e-91c7-61cd4a8f6d44'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:28:52 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [35596a0f-c028-4a58-ac06-5af8f1326d9b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T232853Z:35596a0f-c028-4a58-ac06-5af8f1326d9b'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:23 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [f8a54ad1-961f-4019-9c1c-5af6f66111c4] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232924Z:f8a54ad1-961f-4019-9c1c-5af6f66111c4'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:29:54 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T232954Z:5c65ca5c-00b2-4d6a-a0d9-0eb423fe5c72'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:24 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [1b5c9b56-d541-41a1-94d0-33363fa5a6a3] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233025Z:1b5c9b56-d541-41a1-94d0-33363fa5a6a3'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:30:55 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [695e75e7-3d93-4a5a-bd6c-893b1200af83] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233055Z:695e75e7-3d93-4a5a-bd6c-893b1200af83'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:25 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [7f11cc64-36c6-4b07-be23-4d0e0f4baf14] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233126Z:7f11cc64-36c6-4b07-be23-4d0e0f4baf14'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:31:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [79add0ae-6249-4b40-8831-77b9149cf9c8] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233156Z:79add0ae-6249-4b40-8831-77b9149cf9c8'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:26 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [81e966da-a139-4cc1-8a88-2c75aa9d55fa] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['CENTRALUS:20170120T233226Z:81e966da-a139-4cc1-8a88-2c75aa9d55fa'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:32:56 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [a0a7285f-196f-4667-8eb9-9f3bac9a6868] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233257Z:a0a7285f-196f-4667-8eb9-9f3bac9a6868'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"status":"Dequeued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:33:28 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [23a882c3-b3a4-4c65-9027-fd38d0cb0833] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [aa3450d5-b368-4741-a59d-b83eb2e98aab] + x-ms-routing-request-id: ['WESTUS2:20170120T233328Z:23a882c3-b3a4-4c65-9027-fd38d0cb0833'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [eb4a2bb4-df67-11e6-b06b-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_delete632310d8/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8/operationResults/aa3450d5-b368-4741-a59d-b83eb2e98aab?api-version=2015-04-08 + response: + body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.DocumentDB/databaseAccounts/pydocumentdbtst632310d8'' + under resource group ''test_mgmt_documentdb_test_accounts_delete632310d8'' + was not found."}}'} + headers: + Cache-Control: [no-cache] + Content-Length: ['214'] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 20 Jan 2017 23:33:57 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-failure-cause: [gateway] + x-ms-request-id: [974e9b1b-17f3-4f38-8025-710c32e33a3e] + x-ms-routing-request-id: ['WESTUS2:20170120T233358Z:974e9b1b-17f3-4f38-8025-710c32e33a3e'] + status: {code: 404, message: Not Found} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml new file mode 100644 index 000000000000..b2e4b82a9d9e --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/recordings/test_mgmt_documentdb.test_accounts_features.yaml @@ -0,0 +1,272 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9815b206-df69-11e6-9440-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:50 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1144'] + x-ms-correlation-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [2cdea2e5-159c-4b93-81f8-393920f283d0] + x-ms-routing-request-id: ['WESTUS2:20170120T233850Z:2cdea2e5-159c-4b93-81f8-393920f283d0'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [989fe466-df69-11e6-905d-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:51 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1156'] + x-ms-correlation-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14997'] + x-ms-request-id: [9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d] + x-ms-routing-request-id: ['WESTUS2:20170120T233852Z:9e8c6d5a-eb2b-4c39-a1d8-ee3bebde6e0d'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [99854f92-df69-11e6-bd5a-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4","name":"pydocdbtest865411c4","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocdbtest865411c4.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","documentEndpoint":"https://pydocdbtest865411c4-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pydocdbtest865411c4-westus","locationName":"West + US","failoverPriority":0}]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MonitorTestsDoNotDelete/providers/Microsoft.DocumentDB/databaseAccounts/pymonitortest","name":"pymonitortest","location":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pymonitortest.documents.azure.com:443/","ipRangeFilter":"","databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"writeLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"readLocations":[{"id":"pymonitortest-westus","locationName":"West + US","documentEndpoint":"https://pymonitortest-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0}],"failoverPolicies":[{"id":"pymonitortest-westus","locationName":"West + US","failoverPriority":0}]}}]}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:53 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2225'] + x-ms-correlation-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14998'] + x-ms-request-id: [5392927e-859b-4e7e-b2fa-daa0d18fc56b] + x-ms-routing-request-id: ['WESTUS2:20170120T233853Z:5392927e-859b-4e7e-b2fa-daa0d18fc56b'] + status: {code: 200, message: Ok} +- request: + body: '{"failoverPolicies": [{"failoverPriority": 0, "locationName": "westus"}]}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['73'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9a6594c0-df69-11e6-a509-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/failoverPriorityChange?api-version=2015-04-08 + response: + body: {string: '{"code":"BadRequest","message":"Failover priorities must be unique + and 0 <= priority < (number of failover policies)\r\nActivityId: 9a6594c0-df69-11e6-a509-ecb1d756380e"}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['170'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:54 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [2ae1bbe2-bc79-4a01-b79d-68763a6b75a9] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:2ae1bbe2-bc79-4a01-b79d-68763a6b75a9'] + status: {code: 400, message: BadRequest} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9b3e704a-df69-11e6-9960-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/listKeys?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"3Df7h2mE2s2WIq251e2ifBJxAu5E1NO80c4cYp5mBBKwk2jJT22YFtcgAG9gkV8Y2r01HF5xfPJdO3WoDHaNDA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:55 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-id: [7cd2d42d-6546-49ea-a107-37f22e802552] + x-ms-routing-request-id: ['WESTUS2:20170120T233855Z:7cd2d42d-6546-49ea-a107-37f22e802552'] + status: {code: 200, message: Ok} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9bb1c630-df69-11e6-935e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08 + response: + body: {string: '{"primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/readonlykeys?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:56 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['239'] + x-ms-correlation-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14999'] + x-ms-request-id: [b7bfff95-7f1a-43f3-9c08-c221b5f96cdf] + x-ms-routing-request-id: ['WESTUS2:20170120T233856Z:b7bfff95-7f1a-43f3-9c08-c221b5f96cdf'] + status: {code: 200, message: Ok} +- request: + body: '{"keyKind": "primary"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['22'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey?api-version=2015-04-08 + response: + body: {string: '{"status":"Enqueued","error":{}}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Length: ['32'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:38:57 GMT'] + Location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-correlation-request-id: [9a0f4757-a9ec-45a1-bd99-9b26a1cbea09] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-request-id: [44aa0082-8ba8-4d51-ae31-2a802947d174] + x-ms-routing-request-id: ['WESTUS2:20170120T233858Z:9a0f4757-a9ec-45a1-bd99-9b26a1cbea09'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 + msrest_azure/0.4.6 documentdb/0.1.0 Azure-SDK-For-Python] + accept-language: [en-US] + x-ms-client-request-id: [9c295c3e-df69-11e6-8c6e-ecb1d756380e] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08 + response: + body: {string: '{"primaryMasterKey":"lVtaTfspMCi6OxKnwwqkfQWbPMuk7qNOWhnrdDtVcHHUuF91qorW3xYYufyTS0sgK7QvAydyGSOxQk5yyq2UKA==","secondaryMasterKey":"TBemTAFWd0LRnqZzzjbQtHmwaw0T7fOm0TKQDx4leaFHcqBiOftHRC9wyGUN1XCVDOvoc3W2Ag8itbX5Pzs8JA==","primaryReadonlyMasterKey":"YdVKJP3JJ4fffFTSa9YuFOGEmVx3KblW8MsNDytFWKKurfa8xU1h8XufE6Z4AZcYMu1LVbS2J2n4dCdDbwvkVQ==","secondaryReadonlyMasterKey":"s8HQlRxk6EfWiXOxoXvEVpK5Um2EOc9zohZpoe6wYDrulyguxaF7iw22j3VZgXXYDCg1gsMngmtmTfmvj3QWLQ=="}'} + headers: + Cache-Control: ['no-store, no-cache'] + Content-Location: ['https://management.documents.azure.com:450/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_documentdb_test_accounts_features865411c4/providers/Microsoft.DocumentDB/databaseAccounts/pydocdbtest865411c4/regenerateKey/operationResults/44aa0082-8ba8-4d51-ae31-2a802947d174?api-version=2015-04-08'] + Content-Type: [application/json] + Date: ['Fri, 20 Jan 2017 23:39:28 GMT'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['461'] + x-ms-correlation-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-gatewayversion: [version=1.10.121.4] + x-ms-ratelimit-remaining-subscription-reads: ['14996'] + x-ms-request-id: [4173bb90-a962-4ace-bf4d-5f4504d75a66] + x-ms-routing-request-id: ['WESTUS2:20170120T233928Z:4173bb90-a962-4ace-bf4d-5f4504d75a66'] + status: {code: 200, message: Ok} +version: 1 diff --git a/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py new file mode 100644 index 000000000000..902666a22cf0 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-documentdb/tests/test_mgmt_documentdb.py @@ -0,0 +1,146 @@ +# 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. +#-------------------------------------------------------------------------- +import unittest + +import azure.mgmt.documentdb +from msrestazure.azure_exceptions import CloudError +from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer + + +class MgmtDocDBTest(AzureMgmtTestCase): + + def setUp(self): + super(MgmtDocDBTest, self).setUp() + self.client = self.create_mgmt_client( + azure.mgmt.documentdb.DocumentDB + ) + + @ResourceGroupPreparer() + def test_accounts_create(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtst') + + self.assertFalse(self.client.database_accounts.check_name_exists(account_name)) + + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + account = async_docdb_create.result() + self.assertIsNotNone(account) + # Rest API issue + # self.assertEqual(account.name, account_name) + + @ResourceGroupPreparer() + def test_accounts_features(self, resource_group, location): + account_name = self.get_resource_name('pydocdbtest') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + account = self.client.database_accounts.get( + resource_group.name, + account_name + ) + self.assertEqual(account.name, account_name) + + my_accounts = list(self.client.database_accounts.list_by_resource_group(resource_group.name)) + self.assertEqual(len(my_accounts), 1) + self.assertEqual(my_accounts[0].name, account_name) + + my_accounts = list(self.client.database_accounts.list()) + self.assertTrue(len(my_accounts) >= 1) + self.assertTrue(any(db.name == account_name for db in my_accounts)) + + # I guess we can make this test with no error, need to check with DocDB team + # This is an interesting test anyway, this implies that the serialization works + # and error message is available. Since this method does not return an object + # (i.e. no deserialization to test), this is a complete test. + # We are NOT here to test the RestAPI, but the Swagger file and Python code. + with self.assertRaises(CloudError) as cm: + async_change = self.client.database_accounts.failover_priority_change( + resource_group.name, + account_name, + [{ + 'location_name': self.region, + 'failover_priority': 0 + }] + ) + async_change.wait() + self.assertIn('Failover priorities must be unique', cm.exception.message) + + my_keys = self.client.database_accounts.list_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_master_key) + self.assertIsNotNone(my_keys.secondary_master_key) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + my_keys = self.client.database_accounts.list_read_only_keys( + resource_group.name, + account_name + ) + self.assertIsNotNone(my_keys.primary_readonly_master_key) + self.assertIsNotNone(my_keys.secondary_readonly_master_key) + + + async_regenerate = self.client.database_accounts.regenerate_key( + resource_group.name, + account_name, + "primary" + ) + async_regenerate.wait() + + @ResourceGroupPreparer() + def test_accounts_delete(self, resource_group, location): + account_name = self.get_resource_name('pydocumentdbtst') + + if not self.is_playback(): + async_docdb_create = self.client.database_accounts.create_or_update( + resource_group.name, + account_name, + { + 'location': location, + 'locations': [{ + 'location_name': self.region + }] + } + ) + async_docdb_create.wait() + + # Current implementation of msrestazure does not support 404 as a end of LRO delete + # https://github.com/Azure/msrestazure-for-python/issues/7 + async_delete = self.client.database_accounts.delete(resource_group.name, account_name) + try: + async_delete.wait() + except CloudError as err: + if err.response.status_code != 404: + raise + + +#------------------------------------------------------------------------------ +if __name__ == '__main__': + unittest.main() From 7ac2b36f8f1a3595e1e656d673ce989546e9ced2 Mon Sep 17 00:00:00 2001 From: "openapi-bot[bot]" <37845953+openapi-bot[bot]@users.noreply.github.com> Date: Thu, 15 Aug 2019 18:09:02 +0000 Subject: [PATCH 244/244] Generated from 23f4c95562b46fa4d5639c5320769bc149818363 (#74) Add managedInstaceAdministrators.json to readme file, which reprepresents AutoRest configuration file for Sql --- .../azure/mgmt/sql/_sql_management_client.py | 5 + .../azure/mgmt/sql/models/__init__.py | 5 + .../azure/mgmt/sql/models/_models.py | 54 +++ .../azure/mgmt/sql/models/_models_py3.py | 54 +++ .../azure/mgmt/sql/models/_paged_models.py | 13 + .../azure/mgmt/sql/operations/__init__.py | 2 + ...aged_instance_administrators_operations.py | 376 ++++++++++++++++++ 7 files changed, 509 insertions(+) create mode 100644 sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_administrators_operations.py diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py index 1bedc764b599..45e2c589c2e4 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py @@ -75,6 +75,7 @@ from .operations import ManagedDatabaseSecurityAlertPoliciesOperations from .operations import ManagedServerSecurityAlertPoliciesOperations from .operations import SensitivityLabelsOperations +from .operations import ManagedInstanceAdministratorsOperations from .operations import DatabaseOperations from .operations import ElasticPoolOperations from .operations import CapabilitiesOperations @@ -228,6 +229,8 @@ class SqlManagementClient(SDKClient): :vartype managed_server_security_alert_policies: azure.mgmt.sql.operations.ManagedServerSecurityAlertPoliciesOperations :ivar sensitivity_labels: SensitivityLabels operations :vartype sensitivity_labels: azure.mgmt.sql.operations.SensitivityLabelsOperations + :ivar managed_instance_administrators: ManagedInstanceAdministrators operations + :vartype managed_instance_administrators: azure.mgmt.sql.operations.ManagedInstanceAdministratorsOperations :ivar database_operations: DatabaseOperations operations :vartype database_operations: azure.mgmt.sql.operations.DatabaseOperations :ivar elastic_pool_operations: ElasticPoolOperations operations @@ -412,6 +415,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.sensitivity_labels = SensitivityLabelsOperations( self._client, self.config, self._serialize, self._deserialize) + self.managed_instance_administrators = ManagedInstanceAdministratorsOperations( + self._client, self.config, self._serialize, self._deserialize) self.database_operations = DatabaseOperations( self._client, self.config, self._serialize, self._deserialize) self.elastic_pool_operations = ElasticPoolOperations( diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py index 57ac98e75568..8d0e4206357d 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py @@ -83,6 +83,7 @@ from ._models_py3 import ManagedDatabaseSecurityAlertPolicy from ._models_py3 import ManagedDatabaseUpdate from ._models_py3 import ManagedInstance + from ._models_py3 import ManagedInstanceAdministrator from ._models_py3 import ManagedInstanceEditionCapability from ._models_py3 import ManagedInstanceEncryptionProtector from ._models_py3 import ManagedInstanceFamilyCapability @@ -239,6 +240,7 @@ from ._models import ManagedDatabaseSecurityAlertPolicy from ._models import ManagedDatabaseUpdate from ._models import ManagedInstance + from ._models import ManagedInstanceAdministrator from ._models import ManagedInstanceEditionCapability from ._models import ManagedInstanceEncryptionProtector from ._models import ManagedInstanceFamilyCapability @@ -348,6 +350,7 @@ from ._paged_models import ManagedBackupShortTermRetentionPolicyPaged from ._paged_models import ManagedDatabasePaged from ._paged_models import ManagedDatabaseSecurityAlertPolicyPaged +from ._paged_models import ManagedInstanceAdministratorPaged from ._paged_models import ManagedInstanceEncryptionProtectorPaged from ._paged_models import ManagedInstanceKeyPaged from ._paged_models import ManagedInstancePaged @@ -546,6 +549,7 @@ 'ManagedDatabaseSecurityAlertPolicy', 'ManagedDatabaseUpdate', 'ManagedInstance', + 'ManagedInstanceAdministrator', 'ManagedInstanceEditionCapability', 'ManagedInstanceEncryptionProtector', 'ManagedInstanceFamilyCapability', @@ -682,6 +686,7 @@ 'ManagedDatabaseSecurityAlertPolicyPaged', 'ManagedServerSecurityAlertPolicyPaged', 'SensitivityLabelPaged', + 'ManagedInstanceAdministratorPaged', 'DatabaseOperationPaged', 'ElasticPoolOperationPaged', 'VulnerabilityAssessmentScanRecordPaged', diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py index afc88d2be7ad..da21d9c2378a 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py @@ -4845,6 +4845,60 @@ def __init__(self, **kwargs): self.instance_pool_id = kwargs.get('instance_pool_id', None) +class ManagedInstanceAdministrator(ProxyResource): + """An Azure SQL managed instance administrator. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar administrator_type: Required. Type of the managed instance + administrator. Default value: "ActiveDirectory" . + :vartype administrator_type: str + :param login: Required. Login name of the managed instance administrator. + :type login: str + :param sid: Required. SID (object ID) of the managed instance + administrator. + :type sid: str + :param tenant_id: Tenant ID of the managed instance administrator. + :type tenant_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'administrator_type': {'required': True, 'constant': True}, + 'login': {'required': True}, + 'sid': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, + 'login': {'key': 'properties.login', 'type': 'str'}, + 'sid': {'key': 'properties.sid', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + } + + administrator_type = "ActiveDirectory" + + def __init__(self, **kwargs): + super(ManagedInstanceAdministrator, self).__init__(**kwargs) + self.login = kwargs.get('login', None) + self.sid = kwargs.get('sid', None) + self.tenant_id = kwargs.get('tenant_id', None) + + class ManagedInstanceEditionCapability(Model): """The managed server capability. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py index 24ba7183e418..09b1ecca1e06 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py @@ -4845,6 +4845,60 @@ def __init__(self, *, location: str, tags=None, identity=None, sku=None, managed self.instance_pool_id = instance_pool_id +class ManagedInstanceAdministrator(ProxyResource): + """An Azure SQL managed instance administrator. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar administrator_type: Required. Type of the managed instance + administrator. Default value: "ActiveDirectory" . + :vartype administrator_type: str + :param login: Required. Login name of the managed instance administrator. + :type login: str + :param sid: Required. SID (object ID) of the managed instance + administrator. + :type sid: str + :param tenant_id: Tenant ID of the managed instance administrator. + :type tenant_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'administrator_type': {'required': True, 'constant': True}, + 'login': {'required': True}, + 'sid': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, + 'login': {'key': 'properties.login', 'type': 'str'}, + 'sid': {'key': 'properties.sid', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + } + + administrator_type = "ActiveDirectory" + + def __init__(self, *, login: str, sid: str, tenant_id: str=None, **kwargs) -> None: + super(ManagedInstanceAdministrator, self).__init__(**kwargs) + self.login = login + self.sid = sid + self.tenant_id = tenant_id + + class ManagedInstanceEditionCapability(Model): """The managed server capability. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py index 43eb7dc78de9..da6a96dcc92b 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py @@ -714,6 +714,19 @@ class SensitivityLabelPaged(Paged): def __init__(self, *args, **kwargs): super(SensitivityLabelPaged, self).__init__(*args, **kwargs) +class ManagedInstanceAdministratorPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedInstanceAdministrator ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedInstanceAdministrator]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedInstanceAdministratorPaged, self).__init__(*args, **kwargs) class DatabaseOperationPaged(Paged): """ A paging container for iterating over a list of :class:`DatabaseOperation ` object diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py index 57aa89c2fe9a..00be2fa7a796 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py @@ -71,6 +71,7 @@ from ._managed_database_security_alert_policies_operations import ManagedDatabaseSecurityAlertPoliciesOperations from ._managed_server_security_alert_policies_operations import ManagedServerSecurityAlertPoliciesOperations from ._sensitivity_labels_operations import SensitivityLabelsOperations +from ._managed_instance_administrators_operations import ManagedInstanceAdministratorsOperations from ._database_operations import DatabaseOperations from ._elastic_pool_operations import ElasticPoolOperations from ._capabilities_operations import CapabilitiesOperations @@ -155,6 +156,7 @@ 'ManagedDatabaseSecurityAlertPoliciesOperations', 'ManagedServerSecurityAlertPoliciesOperations', 'SensitivityLabelsOperations', + 'ManagedInstanceAdministratorsOperations', 'DatabaseOperations', 'ElasticPoolOperations', 'CapabilitiesOperations', diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_administrators_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_administrators_operations.py new file mode 100644 index 000000000000..fd4465fbbca3 --- /dev/null +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_administrators_operations.py @@ -0,0 +1,376 @@ +# 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 ManagedInstanceAdministratorsOperations(object): + """ManagedInstanceAdministratorsOperations 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: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-01-preview" + + self.config = config + + def list_by_instance( + self, resource_group_name, managed_instance_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of managed instance administrators. + + :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 managed_instance_name: The name of the managed instance. + :type managed_instance_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: An iterator like instance of ManagedInstanceAdministrator + :rtype: + ~azure.mgmt.sql.models.ManagedInstanceAdministratorPaged[~azure.mgmt.sql.models.ManagedInstanceAdministrator] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_instance.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ManagedInstanceAdministratorPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/administrators'} + + def get( + self, resource_group_name, managed_instance_name, administrator_name, custom_headers=None, raw=False, **operation_config): + """Gets a managed instance administrator. + + :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 managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param administrator_name: The administrator name. + :type administrator_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: ManagedInstanceAdministrator or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.ManagedInstanceAdministrator or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'administratorName': self._serialize.url("administrator_name", administrator_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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('ManagedInstanceAdministrator', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/administrators/{administratorName}'} + + + def _create_or_update_initial( + self, resource_group_name, managed_instance_name, administrator_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'administratorName': self._serialize.url("administrator_name", administrator_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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(parameters, 'ManagedInstanceAdministrator') + + # 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, 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('ManagedInstanceAdministrator', response) + if response.status_code == 201: + deserialized = self._deserialize('ManagedInstanceAdministrator', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, managed_instance_name, administrator_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a managed instance administrator. + + :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 managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param administrator_name: The requested administrator name. + :type administrator_name: str + :param parameters: The requested administrator parameters. + :type parameters: ~azure.mgmt.sql.models.ManagedInstanceAdministrator + :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 + ManagedInstanceAdministrator or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ManagedInstanceAdministrator] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ManagedInstanceAdministrator]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + managed_instance_name=managed_instance_name, + administrator_name=administrator_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ManagedInstanceAdministrator', 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.Sql/managedInstances/{managedInstanceName}/administrators/{administratorName}'} + + + def _delete_initial( + self, resource_group_name, managed_instance_name, administrator_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'administratorName': self._serialize.url("administrator_name", administrator_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.delete(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, managed_instance_name, administrator_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a managed instance administrator. + + :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 managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param administrator_name: The administrator name. + :type administrator_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, + managed_instance_name=managed_instance_name, + administrator_name=administrator_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.Sql/managedInstances/{managedInstanceName}/administrators/{administratorName}'}